summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--COPYRIGHT2
-rw-r--r--Makefile.inc119
-rw-r--r--ObsoleteFiles.inc5
-rw-r--r--UPDATING27
-rw-r--r--bin/chio/chio.c6
-rw-r--r--bin/ed/io.c6
-rw-r--r--bin/ed/main.c32
-rw-r--r--bin/ps/print.c126
-rw-r--r--bin/ps/ps.c2
-rw-r--r--bin/sh/arith_yacc.c3
-rw-r--r--bin/sh/arith_yylex.c2
-rw-r--r--bin/sh/cd.c7
-rw-r--r--bin/sh/eval.c47
-rw-r--r--bin/sh/eval.h1
-rw-r--r--bin/sh/exec.c5
-rw-r--r--bin/sh/exec.h1
-rw-r--r--bin/sh/expand.c116
-rw-r--r--bin/sh/expand.h1
-rw-r--r--bin/sh/funcs/kill49
-rw-r--r--bin/sh/histedit.c9
-rw-r--r--bin/sh/input.c15
-rw-r--r--bin/sh/input.h1
-rw-r--r--bin/sh/jobs.c1
-rw-r--r--bin/sh/main.c3
-rw-r--r--bin/sh/main.h1
-rw-r--r--bin/sh/mksyntax.c8
-rw-r--r--bin/sh/myhistedit.h2
-rw-r--r--bin/sh/mystring.c19
-rw-r--r--bin/sh/mystring.h1
-rw-r--r--bin/sh/trap.c37
-rw-r--r--bin/stty/modes.c10
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/dtrace.c5
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.c2
-rw-r--r--cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c32
-rw-r--r--cddl/contrib/opensolaris/cmd/zfs/zfs_iter.h2
-rw-r--r--cddl/contrib/opensolaris/cmd/zfs/zfs_main.c29
-rw-r--r--cddl/contrib/opensolaris/lib/libdtrace/common/drti.c2
-rw-r--r--cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c7
-rw-r--r--cddl/contrib/opensolaris/lib/libdtrace/common/dt_handle.c6
-rw-r--r--cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c2
-rw-r--r--cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c1
-rw-r--r--cddl/contrib/opensolaris/lib/libdtrace/i386/dt_isadep.c2
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h4
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c20
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h2
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c25
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c4
-rw-r--r--cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c2
-rw-r--r--contrib/bsnmp/snmp_mibII/mibII.c14
-rw-r--r--contrib/bsnmp/snmpd/snmpmod.h1
-rw-r--r--contrib/bzip2/bzip2recover.c2
-rw-r--r--contrib/compiler-rt/LICENSE.TXT26
-rw-r--r--contrib/compiler-rt/README.txt9
-rw-r--r--contrib/compiler-rt/lib/abi.h23
-rw-r--r--contrib/compiler-rt/lib/absvdi2.c2
-rw-r--r--contrib/compiler-rt/lib/absvsi2.c2
-rw-r--r--contrib/compiler-rt/lib/absvti2.c1
-rw-r--r--contrib/compiler-rt/lib/adddf3.c2
-rw-r--r--contrib/compiler-rt/lib/addsf3.c2
-rw-r--r--contrib/compiler-rt/lib/addvdi3.c2
-rw-r--r--contrib/compiler-rt/lib/addvsi3.c2
-rw-r--r--contrib/compiler-rt/lib/addvti3.c1
-rw-r--r--contrib/compiler-rt/lib/apple_versioning.c291
-rw-r--r--contrib/compiler-rt/lib/arm/adddf3vfp.S9
-rw-r--r--contrib/compiler-rt/lib/arm/addsf3vfp.S9
-rw-r--r--contrib/compiler-rt/lib/arm/divdf3vfp.S9
-rw-r--r--contrib/compiler-rt/lib/arm/divsf3vfp.S9
-rw-r--r--contrib/compiler-rt/lib/arm/eqdf2vfp.S9
-rw-r--r--contrib/compiler-rt/lib/arm/eqsf2vfp.S9
-rw-r--r--contrib/compiler-rt/lib/arm/extendsfdf2vfp.S7
-rw-r--r--contrib/compiler-rt/lib/arm/fixdfsivfp.S7
-rw-r--r--contrib/compiler-rt/lib/arm/fixsfsivfp.S7
-rw-r--r--contrib/compiler-rt/lib/arm/fixunsdfsivfp.S7
-rw-r--r--contrib/compiler-rt/lib/arm/fixunssfsivfp.S7
-rw-r--r--contrib/compiler-rt/lib/arm/floatsidfvfp.S7
-rw-r--r--contrib/compiler-rt/lib/arm/floatsisfvfp.S7
-rw-r--r--contrib/compiler-rt/lib/arm/floatunssidfvfp.S7
-rw-r--r--contrib/compiler-rt/lib/arm/floatunssisfvfp.S7
-rw-r--r--contrib/compiler-rt/lib/arm/gedf2vfp.S9
-rw-r--r--contrib/compiler-rt/lib/arm/gesf2vfp.S9
-rw-r--r--contrib/compiler-rt/lib/arm/gtdf2vfp.S9
-rw-r--r--contrib/compiler-rt/lib/arm/gtsf2vfp.S9
-rw-r--r--contrib/compiler-rt/lib/arm/ledf2vfp.S9
-rw-r--r--contrib/compiler-rt/lib/arm/lesf2vfp.S9
-rw-r--r--contrib/compiler-rt/lib/arm/ltdf2vfp.S9
-rw-r--r--contrib/compiler-rt/lib/arm/ltsf2vfp.S9
-rw-r--r--contrib/compiler-rt/lib/arm/muldf3vfp.S9
-rw-r--r--contrib/compiler-rt/lib/arm/mulsf3vfp.S9
-rw-r--r--contrib/compiler-rt/lib/arm/nedf2vfp.S9
-rw-r--r--contrib/compiler-rt/lib/arm/negdf2vfp.S1
-rw-r--r--contrib/compiler-rt/lib/arm/negsf2vfp.S1
-rw-r--r--contrib/compiler-rt/lib/arm/nesf2vfp.S9
-rw-r--r--contrib/compiler-rt/lib/arm/subdf3vfp.S9
-rw-r--r--contrib/compiler-rt/lib/arm/subsf3vfp.S9
-rw-r--r--contrib/compiler-rt/lib/arm/truncdfsf2vfp.S7
-rw-r--r--contrib/compiler-rt/lib/arm/unorddf2vfp.S9
-rw-r--r--contrib/compiler-rt/lib/arm/unordsf2vfp.S9
-rw-r--r--contrib/compiler-rt/lib/ashldi3.c1
-rw-r--r--contrib/compiler-rt/lib/ashrdi3.c1
-rw-r--r--contrib/compiler-rt/lib/assembly.h11
-rw-r--r--contrib/compiler-rt/lib/clear_cache.c1
-rw-r--r--contrib/compiler-rt/lib/clzdi2.c1
-rw-r--r--contrib/compiler-rt/lib/clzsi2.c1
-rw-r--r--contrib/compiler-rt/lib/cmpdi2.c1
-rw-r--r--contrib/compiler-rt/lib/ctzdi2.c1
-rw-r--r--contrib/compiler-rt/lib/ctzsi2.c1
-rw-r--r--contrib/compiler-rt/lib/divdc3.c41
-rw-r--r--contrib/compiler-rt/lib/divdf3.c1
-rw-r--r--contrib/compiler-rt/lib/divdi3.c1
-rw-r--r--contrib/compiler-rt/lib/divmoddi4.c1
-rw-r--r--contrib/compiler-rt/lib/divmodsi4.c1
-rw-r--r--contrib/compiler-rt/lib/divsc3.c41
-rw-r--r--contrib/compiler-rt/lib/divsf3.c1
-rw-r--r--contrib/compiler-rt/lib/divsi3.c1
-rw-r--r--contrib/compiler-rt/lib/divxc3.c41
-rw-r--r--contrib/compiler-rt/lib/enable_execute_stack.c3
-rw-r--r--contrib/compiler-rt/lib/endianness.h94
-rw-r--r--contrib/compiler-rt/lib/eprintf.c1
-rw-r--r--contrib/compiler-rt/lib/extendsfdf2.c5
-rw-r--r--contrib/compiler-rt/lib/ffsdi2.c1
-rw-r--r--contrib/compiler-rt/lib/fixdfdi.c1
-rw-r--r--contrib/compiler-rt/lib/fixdfsi.c1
-rw-r--r--contrib/compiler-rt/lib/fixsfdi.c1
-rw-r--r--contrib/compiler-rt/lib/fixsfsi.c1
-rw-r--r--contrib/compiler-rt/lib/fixunsdfdi.c1
-rw-r--r--contrib/compiler-rt/lib/fixunsdfsi.c1
-rw-r--r--contrib/compiler-rt/lib/fixunssfdi.c1
-rw-r--r--contrib/compiler-rt/lib/fixunssfsi.c1
-rw-r--r--contrib/compiler-rt/lib/floatdidf.c3
-rw-r--r--contrib/compiler-rt/lib/floatdisf.c3
-rw-r--r--contrib/compiler-rt/lib/floatsidf.c1
-rw-r--r--contrib/compiler-rt/lib/floatsisf.c1
-rw-r--r--contrib/compiler-rt/lib/floattidf.c1
-rw-r--r--contrib/compiler-rt/lib/floattisf.c1
-rw-r--r--contrib/compiler-rt/lib/floattixf.c1
-rw-r--r--contrib/compiler-rt/lib/floatundidf.c4
-rw-r--r--contrib/compiler-rt/lib/floatundisf.c3
-rw-r--r--contrib/compiler-rt/lib/floatunsidf.c1
-rw-r--r--contrib/compiler-rt/lib/floatunsisf.c1
-rw-r--r--contrib/compiler-rt/lib/floatuntidf.c1
-rw-r--r--contrib/compiler-rt/lib/floatuntisf.c1
-rw-r--r--contrib/compiler-rt/lib/floatuntixf.c1
-rw-r--r--contrib/compiler-rt/lib/fp_lib.h1
-rw-r--r--contrib/compiler-rt/lib/gcc_personality_v0.c6
-rw-r--r--contrib/compiler-rt/lib/int_endianness.h89
-rw-r--r--contrib/compiler-rt/lib/int_lib.h166
-rw-r--r--contrib/compiler-rt/lib/int_math.h67
-rw-r--r--contrib/compiler-rt/lib/int_types.h140
-rw-r--r--contrib/compiler-rt/lib/int_util.c43
-rw-r--r--contrib/compiler-rt/lib/int_util.h32
-rw-r--r--contrib/compiler-rt/lib/lshrdi3.c1
-rw-r--r--contrib/compiler-rt/lib/moddi3.c1
-rw-r--r--contrib/compiler-rt/lib/modsi3.c1
-rw-r--r--contrib/compiler-rt/lib/muldc3.c57
-rw-r--r--contrib/compiler-rt/lib/muldf3.c1
-rw-r--r--contrib/compiler-rt/lib/muldi3.c1
-rw-r--r--contrib/compiler-rt/lib/mulodi4.c58
-rw-r--r--contrib/compiler-rt/lib/mulosi4.c58
-rw-r--r--contrib/compiler-rt/lib/muloti4.c62
-rw-r--r--contrib/compiler-rt/lib/mulsc3.c57
-rw-r--r--contrib/compiler-rt/lib/mulsf3.c1
-rw-r--r--contrib/compiler-rt/lib/mulvdi3.c1
-rw-r--r--contrib/compiler-rt/lib/mulvsi3.c1
-rw-r--r--contrib/compiler-rt/lib/mulvti3.c1
-rw-r--r--contrib/compiler-rt/lib/mulxc3.c57
-rw-r--r--contrib/compiler-rt/lib/negdf2.c1
-rw-r--r--contrib/compiler-rt/lib/negsf2.c1
-rw-r--r--contrib/compiler-rt/lib/negvdi2.c2
-rw-r--r--contrib/compiler-rt/lib/negvsi2.c2
-rw-r--r--contrib/compiler-rt/lib/negvti2.c1
-rw-r--r--contrib/compiler-rt/lib/paritydi2.c1
-rw-r--r--contrib/compiler-rt/lib/paritysi2.c1
-rw-r--r--contrib/compiler-rt/lib/popcountdi2.c1
-rw-r--r--contrib/compiler-rt/lib/popcountsi2.c1
-rw-r--r--contrib/compiler-rt/lib/powidf2.c1
-rw-r--r--contrib/compiler-rt/lib/powisf2.c1
-rw-r--r--contrib/compiler-rt/lib/ppc/DD.h2
-rw-r--r--contrib/compiler-rt/lib/ppc/divtc3.c59
-rw-r--r--contrib/compiler-rt/lib/ppc/fixtfdi.c4
-rw-r--r--contrib/compiler-rt/lib/ppc/fixunstfdi.c1
-rw-r--r--contrib/compiler-rt/lib/ppc/floatditf.c1
-rw-r--r--contrib/compiler-rt/lib/ppc/floatunditf.c1
-rw-r--r--contrib/compiler-rt/lib/ppc/multc3.c39
-rw-r--r--contrib/compiler-rt/lib/sparc64/divmod.m4250
-rw-r--r--contrib/compiler-rt/lib/sparc64/divsi3.S333
-rw-r--r--contrib/compiler-rt/lib/sparc64/generate.sh6
-rw-r--r--contrib/compiler-rt/lib/sparc64/modsi3.S333
-rw-r--r--contrib/compiler-rt/lib/sparc64/udivsi3.S1
-rw-r--r--contrib/compiler-rt/lib/sparc64/umodsi3.S1
-rw-r--r--contrib/compiler-rt/lib/subdf3.c1
-rw-r--r--contrib/compiler-rt/lib/subsf3.c1
-rw-r--r--contrib/compiler-rt/lib/subvdi3.c2
-rw-r--r--contrib/compiler-rt/lib/subvsi3.c2
-rw-r--r--contrib/compiler-rt/lib/subvti3.c1
-rw-r--r--contrib/compiler-rt/lib/trampoline_setup.c5
-rw-r--r--contrib/compiler-rt/lib/truncdfsf2.c6
-rw-r--r--contrib/compiler-rt/lib/ucmpdi2.c1
-rw-r--r--contrib/compiler-rt/lib/udivdi3.c1
-rw-r--r--contrib/compiler-rt/lib/udivmoddi4.c3
-rw-r--r--contrib/compiler-rt/lib/udivmodsi4.c1
-rw-r--r--contrib/compiler-rt/lib/udivmodti4.c2
-rw-r--r--contrib/compiler-rt/lib/udivsi3.c1
-rw-r--r--contrib/compiler-rt/lib/umoddi3.c1
-rw-r--r--contrib/compiler-rt/lib/umodsi3.c1
-rw-r--r--contrib/compiler-rt/lib/x86_64/floatdidf.c2
-rw-r--r--contrib/compiler-rt/lib/x86_64/floatdisf.c2
-rw-r--r--contrib/compiler-rt/lib/x86_64/floatdixf.c2
-rwxr-xr-xcontrib/ee/ee.c14
-rw-r--r--contrib/file/softmagic.c2
-rw-r--r--contrib/gcc/ChangeLog.gcc438
-rw-r--r--contrib/gcc/builtins.c14
-rw-r--r--contrib/gcc/config/freebsd.h1
-rw-r--r--contrib/gcclibs/libcpp/include/cpplib.h3
-rw-r--r--contrib/gcclibs/libcpp/init.c1
-rw-r--r--contrib/gcclibs/libcpp/internal.h2
-rw-r--r--contrib/gcclibs/libcpp/macro.c4
-rw-r--r--contrib/gperf/src/output.cc2
-rw-r--r--contrib/groff/tmac/doc-syms3
-rw-r--r--contrib/groff/tmac/groff_mdoc.man4
-rw-r--r--contrib/less/command.c4
-rw-r--r--contrib/less/prompt.c12
-rw-r--r--contrib/libarchive/COPYING60
-rw-r--r--contrib/libarchive/FREEBSD-Xlist30
-rw-r--r--contrib/libarchive/FREEBSD-upgrade24
-rw-r--r--contrib/libarchive/NEWS550
-rw-r--r--contrib/libarchive/README137
-rw-r--r--contrib/libarchive/cpio/bsdcpio.1 (renamed from usr.bin/cpio/bsdcpio.1)0
-rw-r--r--contrib/libarchive/cpio/cmdline.c (renamed from usr.bin/cpio/cmdline.c)0
-rw-r--r--contrib/libarchive/cpio/cpio.c (renamed from usr.bin/cpio/cpio.c)0
-rw-r--r--contrib/libarchive/cpio/cpio.h (renamed from usr.bin/cpio/cpio.h)0
-rw-r--r--contrib/libarchive/cpio/cpio_platform.h (renamed from usr.bin/cpio/cpio_platform.h)0
-rw-r--r--contrib/libarchive/cpio/test/main.c (renamed from usr.bin/cpio/test/main.c)0
-rw-r--r--contrib/libarchive/cpio/test/test.h (renamed from usr.bin/cpio/test/test.h)0
-rw-r--r--contrib/libarchive/cpio/test/test_0.c (renamed from usr.bin/cpio/test/test_0.c)0
-rw-r--r--contrib/libarchive/cpio/test/test_basic.c (renamed from usr.bin/cpio/test/test_basic.c)0
-rw-r--r--contrib/libarchive/cpio/test/test_cmdline.c (renamed from usr.bin/cpio/test/test_cmdline.c)0
-rw-r--r--contrib/libarchive/cpio/test/test_format_newc.c (renamed from usr.bin/cpio/test/test_format_newc.c)0
-rw-r--r--contrib/libarchive/cpio/test/test_gcpio_compat.c (renamed from usr.bin/cpio/test/test_gcpio_compat.c)0
-rw-r--r--contrib/libarchive/cpio/test/test_gcpio_compat_ref.bin.uu (renamed from usr.bin/cpio/test/test_gcpio_compat_ref.bin.uu)0
-rw-r--r--contrib/libarchive/cpio/test/test_gcpio_compat_ref.crc.uu (renamed from usr.bin/cpio/test/test_gcpio_compat_ref.crc.uu)0
-rw-r--r--contrib/libarchive/cpio/test/test_gcpio_compat_ref.newc.uu (renamed from usr.bin/cpio/test/test_gcpio_compat_ref.newc.uu)0
-rw-r--r--contrib/libarchive/cpio/test/test_gcpio_compat_ref.ustar.uu (renamed from usr.bin/cpio/test/test_gcpio_compat_ref.ustar.uu)0
-rw-r--r--contrib/libarchive/cpio/test/test_gcpio_compat_ref_nosym.bin.uu15
-rw-r--r--contrib/libarchive/cpio/test/test_gcpio_compat_ref_nosym.crc.uu15
-rw-r--r--contrib/libarchive/cpio/test/test_gcpio_compat_ref_nosym.newc.uu15
-rw-r--r--contrib/libarchive/cpio/test/test_gcpio_compat_ref_nosym.ustar.uu72
-rw-r--r--contrib/libarchive/cpio/test/test_option_B_upper.c (renamed from usr.bin/cpio/test/test_option_B_upper.c)0
-rw-r--r--contrib/libarchive/cpio/test/test_option_C_upper.c (renamed from usr.bin/cpio/test/test_option_C_upper.c)0
-rw-r--r--contrib/libarchive/cpio/test/test_option_J_upper.c (renamed from usr.bin/cpio/test/test_option_J_upper.c)0
-rw-r--r--contrib/libarchive/cpio/test/test_option_L_upper.c (renamed from usr.bin/cpio/test/test_option_L_upper.c)0
-rw-r--r--contrib/libarchive/cpio/test/test_option_Z_upper.c (renamed from usr.bin/cpio/test/test_option_Z_upper.c)0
-rw-r--r--contrib/libarchive/cpio/test/test_option_a.c (renamed from usr.bin/cpio/test/test_option_a.c)0
-rw-r--r--contrib/libarchive/cpio/test/test_option_c.c221
-rw-r--r--contrib/libarchive/cpio/test/test_option_d.c (renamed from usr.bin/cpio/test/test_option_d.c)0
-rw-r--r--contrib/libarchive/cpio/test/test_option_f.c (renamed from usr.bin/cpio/test/test_option_f.c)0
-rw-r--r--contrib/libarchive/cpio/test/test_option_f.cpio.uu (renamed from usr.bin/cpio/test/test_option_f.cpio.uu)0
-rw-r--r--contrib/libarchive/cpio/test/test_option_help.c (renamed from usr.bin/cpio/test/test_option_help.c)0
-rw-r--r--contrib/libarchive/cpio/test/test_option_l.c (renamed from usr.bin/cpio/test/test_option_l.c)0
-rw-r--r--contrib/libarchive/cpio/test/test_option_lzma.c (renamed from usr.bin/cpio/test/test_option_lzma.c)0
-rw-r--r--contrib/libarchive/cpio/test/test_option_m.c (renamed from usr.bin/cpio/test/test_option_m.c)0
-rw-r--r--contrib/libarchive/cpio/test/test_option_m.cpio.uu (renamed from usr.bin/cpio/test/test_option_m.cpio.uu)0
-rw-r--r--contrib/libarchive/cpio/test/test_option_t.c (renamed from usr.bin/cpio/test/test_option_t.c)0
-rw-r--r--contrib/libarchive/cpio/test/test_option_t.cpio.uu (renamed from usr.bin/cpio/test/test_option_t.cpio.uu)0
-rw-r--r--contrib/libarchive/cpio/test/test_option_t.stdout.uu (renamed from usr.bin/cpio/test/test_option_t.stdout.uu)0
-rw-r--r--contrib/libarchive/cpio/test/test_option_tv.stdout.uu (renamed from usr.bin/cpio/test/test_option_tv.stdout.uu)0
-rw-r--r--contrib/libarchive/cpio/test/test_option_u.c (renamed from usr.bin/cpio/test/test_option_u.c)0
-rw-r--r--contrib/libarchive/cpio/test/test_option_version.c (renamed from usr.bin/cpio/test/test_option_version.c)0
-rw-r--r--contrib/libarchive/cpio/test/test_option_y.c (renamed from usr.bin/cpio/test/test_option_y.c)0
-rw-r--r--contrib/libarchive/cpio/test/test_option_z.c (renamed from usr.bin/cpio/test/test_option_z.c)0
-rw-r--r--contrib/libarchive/cpio/test/test_owner_parse.c (renamed from usr.bin/cpio/test/test_owner_parse.c)0
-rw-r--r--contrib/libarchive/cpio/test/test_passthrough_dotdot.c (renamed from usr.bin/cpio/test/test_passthrough_dotdot.c)0
-rw-r--r--contrib/libarchive/cpio/test/test_passthrough_reverse.c (renamed from usr.bin/cpio/test/test_passthrough_reverse.c)0
-rw-r--r--contrib/libarchive/cpio/test/test_pathmatch.c (renamed from usr.bin/cpio/test/test_pathmatch.c)0
-rw-r--r--contrib/libarchive/libarchive/archive.h746
-rw-r--r--contrib/libarchive/libarchive/archive_check_magic.c (renamed from lib/libarchive/archive_check_magic.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_crc32.h (renamed from lib/libarchive/archive_crc32.h)0
-rw-r--r--contrib/libarchive/libarchive/archive_endian.h (renamed from lib/libarchive/archive_endian.h)0
-rw-r--r--contrib/libarchive/libarchive/archive_entry.3 (renamed from lib/libarchive/archive_entry.3)0
-rw-r--r--contrib/libarchive/libarchive/archive_entry.c (renamed from lib/libarchive/archive_entry.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_entry.h (renamed from lib/libarchive/archive_entry.h)0
-rw-r--r--contrib/libarchive/libarchive/archive_entry_copy_stat.c (renamed from lib/libarchive/archive_entry_copy_stat.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_entry_link_resolver.c (renamed from lib/libarchive/archive_entry_link_resolver.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_entry_private.h (renamed from lib/libarchive/archive_entry_private.h)0
-rw-r--r--contrib/libarchive/libarchive/archive_entry_stat.c (renamed from lib/libarchive/archive_entry_stat.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_entry_strmode.c (renamed from lib/libarchive/archive_entry_strmode.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_entry_xattr.c (renamed from lib/libarchive/archive_entry_xattr.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_hash.h (renamed from lib/libarchive/archive_hash.h)0
-rw-r--r--contrib/libarchive/libarchive/archive_platform.h (renamed from lib/libarchive/archive_platform.h)0
-rw-r--r--contrib/libarchive/libarchive/archive_private.h (renamed from lib/libarchive/archive_private.h)0
-rw-r--r--contrib/libarchive/libarchive/archive_read.3 (renamed from lib/libarchive/archive_read.3)0
-rw-r--r--contrib/libarchive/libarchive/archive_read.c (renamed from lib/libarchive/archive_read.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_read_data_into_fd.c (renamed from lib/libarchive/archive_read_data_into_fd.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_read_disk.3 (renamed from lib/libarchive/archive_read_disk.3)0
-rw-r--r--contrib/libarchive/libarchive/archive_read_disk.c (renamed from lib/libarchive/archive_read_disk.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c570
-rw-r--r--contrib/libarchive/libarchive/archive_read_disk_private.h (renamed from lib/libarchive/archive_read_disk_private.h)0
-rw-r--r--contrib/libarchive/libarchive/archive_read_disk_set_standard_lookup.c (renamed from lib/libarchive/archive_read_disk_set_standard_lookup.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_read_extract.c180
-rw-r--r--contrib/libarchive/libarchive/archive_read_open_fd.c (renamed from lib/libarchive/archive_read_open_fd.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_read_open_file.c (renamed from lib/libarchive/archive_read_open_file.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_read_open_filename.c (renamed from lib/libarchive/archive_read_open_filename.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_read_open_memory.c (renamed from lib/libarchive/archive_read_open_memory.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_read_private.h (renamed from lib/libarchive/archive_read_private.h)0
-rw-r--r--contrib/libarchive/libarchive/archive_read_support_compression_all.c (renamed from lib/libarchive/archive_read_support_compression_all.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_read_support_compression_bzip2.c353
-rw-r--r--contrib/libarchive/libarchive/archive_read_support_compression_compress.c (renamed from lib/libarchive/archive_read_support_compression_compress.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_read_support_compression_gzip.c (renamed from lib/libarchive/archive_read_support_compression_gzip.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_read_support_compression_none.c (renamed from lib/libarchive/archive_read_support_compression_none.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_read_support_compression_program.c (renamed from lib/libarchive/archive_read_support_compression_program.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_read_support_compression_rpm.c287
-rw-r--r--contrib/libarchive/libarchive/archive_read_support_compression_uu.c637
-rw-r--r--contrib/libarchive/libarchive/archive_read_support_compression_xz.c (renamed from lib/libarchive/archive_read_support_compression_xz.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_read_support_format_all.c51
-rw-r--r--contrib/libarchive/libarchive/archive_read_support_format_ar.c (renamed from lib/libarchive/archive_read_support_format_ar.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_read_support_format_cpio.c786
-rw-r--r--contrib/libarchive/libarchive/archive_read_support_format_empty.c (renamed from lib/libarchive/archive_read_support_format_empty.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_read_support_format_iso9660.c3022
-rw-r--r--contrib/libarchive/libarchive/archive_read_support_format_mtree.c (renamed from lib/libarchive/archive_read_support_format_mtree.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_read_support_format_raw.c (renamed from lib/libarchive/archive_read_support_format_raw.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_read_support_format_tar.c2418
-rw-r--r--contrib/libarchive/libarchive/archive_read_support_format_xar.c (renamed from lib/libarchive/archive_read_support_format_xar.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_read_support_format_zip.c950
-rw-r--r--contrib/libarchive/libarchive/archive_string.c453
-rw-r--r--contrib/libarchive/libarchive/archive_string.h151
-rw-r--r--contrib/libarchive/libarchive/archive_string_sprintf.c (renamed from lib/libarchive/archive_string_sprintf.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_util.3 (renamed from lib/libarchive/archive_util.3)0
-rw-r--r--contrib/libarchive/libarchive/archive_util.c392
-rw-r--r--contrib/libarchive/libarchive/archive_virtual.c (renamed from lib/libarchive/archive_virtual.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_write.3 (renamed from lib/libarchive/archive_write.3)0
-rw-r--r--contrib/libarchive/libarchive/archive_write.c (renamed from lib/libarchive/archive_write.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_write_disk.3375
-rw-r--r--contrib/libarchive/libarchive/archive_write_disk.c2712
-rw-r--r--contrib/libarchive/libarchive/archive_write_disk_private.h (renamed from lib/libarchive/archive_write_disk_private.h)0
-rw-r--r--contrib/libarchive/libarchive/archive_write_disk_set_standard_lookup.c (renamed from lib/libarchive/archive_write_disk_set_standard_lookup.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_write_open_fd.c (renamed from lib/libarchive/archive_write_open_fd.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_write_open_file.c (renamed from lib/libarchive/archive_write_open_file.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_write_open_filename.c (renamed from lib/libarchive/archive_write_open_filename.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_write_open_memory.c (renamed from lib/libarchive/archive_write_open_memory.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_write_private.h (renamed from lib/libarchive/archive_write_private.h)0
-rw-r--r--contrib/libarchive/libarchive/archive_write_set_compression_bzip2.c (renamed from lib/libarchive/archive_write_set_compression_bzip2.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_write_set_compression_compress.c (renamed from lib/libarchive/archive_write_set_compression_compress.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_write_set_compression_gzip.c (renamed from lib/libarchive/archive_write_set_compression_gzip.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_write_set_compression_none.c (renamed from lib/libarchive/archive_write_set_compression_none.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_write_set_compression_program.c (renamed from lib/libarchive/archive_write_set_compression_program.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_write_set_compression_xz.c439
-rw-r--r--contrib/libarchive/libarchive/archive_write_set_format.c (renamed from lib/libarchive/archive_write_set_format.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_write_set_format_ar.c550
-rw-r--r--contrib/libarchive/libarchive/archive_write_set_format_by_name.c (renamed from lib/libarchive/archive_write_set_format_by_name.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_write_set_format_cpio.c354
-rw-r--r--contrib/libarchive/libarchive/archive_write_set_format_cpio_newc.c (renamed from lib/libarchive/archive_write_set_format_cpio_newc.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_write_set_format_mtree.c (renamed from lib/libarchive/archive_write_set_format_mtree.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_write_set_format_pax.c (renamed from lib/libarchive/archive_write_set_format_pax.c)0
-rw-r--r--contrib/libarchive/libarchive/archive_write_set_format_shar.c625
-rw-r--r--contrib/libarchive/libarchive/archive_write_set_format_ustar.c587
-rw-r--r--contrib/libarchive/libarchive/archive_write_set_format_zip.c (renamed from lib/libarchive/archive_write_set_format_zip.c)0
-rw-r--r--contrib/libarchive/libarchive/cpio.5 (renamed from lib/libarchive/cpio.5)0
-rw-r--r--contrib/libarchive/libarchive/filter_fork.c (renamed from lib/libarchive/filter_fork.c)0
-rw-r--r--contrib/libarchive/libarchive/filter_fork.h (renamed from lib/libarchive/filter_fork.h)0
-rw-r--r--contrib/libarchive/libarchive/libarchive-formats.5355
-rw-r--r--contrib/libarchive/libarchive/libarchive.3369
-rw-r--r--contrib/libarchive/libarchive/libarchive_internals.3365
-rw-r--r--contrib/libarchive/libarchive/tar.5 (renamed from lib/libarchive/tar.5)0
-rw-r--r--contrib/libarchive/libarchive/test/README (renamed from lib/libarchive/test/README)0
-rw-r--r--contrib/libarchive/libarchive/test/main.c (renamed from lib/libarchive/test/main.c)0
-rw-r--r--contrib/libarchive/libarchive/test/read_open_memory.c (renamed from lib/libarchive/test/read_open_memory.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test.h (renamed from lib/libarchive/test/test.h)0
-rw-r--r--contrib/libarchive/libarchive/test/test_acl_basic.c (renamed from lib/libarchive/test/test_acl_basic.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_acl_freebsd.c (renamed from lib/libarchive/test/test_acl_freebsd.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_acl_pax.c (renamed from lib/libarchive/test/test_acl_pax.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_archive_api_feature.c (renamed from lib/libarchive/test/test_archive_api_feature.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_bad_fd.c (renamed from lib/libarchive/test/test_bad_fd.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_compat_bzip2.c (renamed from lib/libarchive/test/test_compat_bzip2.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_compat_bzip2_1.tbz.uu (renamed from lib/libarchive/test/test_compat_bzip2_1.tbz.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_compat_bzip2_2.tbz.uu (renamed from lib/libarchive/test/test_compat_bzip2_2.tbz.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_compat_cpio.c (renamed from lib/libarchive/test/test_compat_cpio.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_compat_cpio_1.cpio.uu (renamed from lib/libarchive/test/test_compat_cpio_1.cpio.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_compat_gtar.c (renamed from lib/libarchive/test/test_compat_gtar.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_compat_gtar_1.tar.uu (renamed from lib/libarchive/test/test_compat_gtar_1.tar.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_compat_gzip.c (renamed from lib/libarchive/test/test_compat_gzip.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_compat_gzip_1.tgz.uu (renamed from lib/libarchive/test/test_compat_gzip_1.tgz.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_compat_gzip_2.tgz.uu (renamed from lib/libarchive/test/test_compat_gzip_2.tgz.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_compat_lzma.c (renamed from lib/libarchive/test/test_compat_lzma.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_compat_lzma_1.tlz.uu (renamed from lib/libarchive/test/test_compat_lzma_1.tlz.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_compat_lzma_2.tlz.uu (renamed from lib/libarchive/test/test_compat_lzma_2.tlz.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_compat_lzma_3.tlz.uu (renamed from lib/libarchive/test/test_compat_lzma_3.tlz.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_compat_solaris_tar_acl.c (renamed from lib/libarchive/test/test_compat_solaris_tar_acl.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_compat_solaris_tar_acl.tar.uu (renamed from lib/libarchive/test/test_compat_solaris_tar_acl.tar.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_compat_tar_hardlink.c (renamed from lib/libarchive/test/test_compat_tar_hardlink.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_compat_tar_hardlink_1.tar.uu (renamed from lib/libarchive/test/test_compat_tar_hardlink_1.tar.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_compat_xz.c (renamed from lib/libarchive/test/test_compat_xz.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_compat_xz_1.txz.uu (renamed from lib/libarchive/test/test_compat_xz_1.txz.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_compat_zip.c (renamed from lib/libarchive/test/test_compat_zip.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_compat_zip_1.zip.uu (renamed from lib/libarchive/test/test_compat_zip_1.zip.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_compat_zip_2.zip.uu (renamed from lib/libarchive/test/test_compat_zip_2.zip.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_empty_write.c (renamed from lib/libarchive/test/test_empty_write.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_entry.c (renamed from lib/libarchive/test/test_entry.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_entry_strmode.c (renamed from lib/libarchive/test/test_entry_strmode.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_extattr_freebsd.c (renamed from lib/libarchive/test/test_extattr_freebsd.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_fuzz.c (renamed from lib/libarchive/test/test_fuzz.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_fuzz_1.iso.Z.uu (renamed from lib/libarchive/test/test_fuzz_1.iso.Z.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_link_resolver.c (renamed from lib/libarchive/test/test_link_resolver.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_open_failure.c (renamed from lib/libarchive/test/test_open_failure.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_open_fd.c (renamed from lib/libarchive/test/test_open_fd.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_open_file.c (renamed from lib/libarchive/test/test_open_file.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_open_filename.c (renamed from lib/libarchive/test/test_open_filename.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_pax_filename_encoding.c (renamed from lib/libarchive/test/test_pax_filename_encoding.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_pax_filename_encoding.tar.uu (renamed from lib/libarchive/test/test_pax_filename_encoding.tar.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_compress_program.c (renamed from lib/libarchive/test/test_read_compress_program.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_data_large.c (renamed from lib/libarchive/test/test_read_data_large.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_disk.c (renamed from lib/libarchive/test/test_read_disk.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_disk_entry_from_file.c (renamed from lib/libarchive/test/test_read_disk_entry_from_file.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_extract.c (renamed from lib/libarchive/test/test_read_extract.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_file_nonexistent.c (renamed from lib/libarchive/test/test_read_file_nonexistent.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_ar.ar.uu (renamed from lib/libarchive/test/test_read_format_ar.ar.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_ar.c (renamed from lib/libarchive/test/test_read_format_ar.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_cpio_bin.c (renamed from lib/libarchive/test/test_read_format_cpio_bin.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_cpio_bin_Z.c (renamed from lib/libarchive/test/test_read_format_cpio_bin_Z.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_cpio_bin_be.c (renamed from lib/libarchive/test/test_read_format_cpio_bin_be.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_cpio_bin_be.cpio.uu (renamed from lib/libarchive/test/test_read_format_cpio_bin_be.cpio.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_cpio_bin_bz2.c (renamed from lib/libarchive/test/test_read_format_cpio_bin_bz2.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_cpio_bin_gz.c (renamed from lib/libarchive/test/test_read_format_cpio_bin_gz.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_cpio_bin_lzma.c (renamed from lib/libarchive/test/test_read_format_cpio_bin_lzma.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_cpio_bin_xz.c (renamed from lib/libarchive/test/test_read_format_cpio_bin_xz.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_cpio_odc.c (renamed from lib/libarchive/test/test_read_format_cpio_odc.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.c127
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.rpm.uu47
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_cpio_svr4_gzip.c (renamed from lib/libarchive/test/test_read_format_cpio_svr4_gzip.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.c127
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.rpm.uu46
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_cpio_svr4c_Z.c (renamed from lib/libarchive/test/test_read_format_cpio_svr4c_Z.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_empty.c (renamed from lib/libarchive/test/test_read_format_empty.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_gtar_gz.c (renamed from lib/libarchive/test/test_read_format_gtar_gz.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_gtar_lzma.c (renamed from lib/libarchive/test/test_read_format_gtar_lzma.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_gtar_sparse.c (renamed from lib/libarchive/test/test_read_format_gtar_sparse.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_gtar_sparse_1_13.tar.uu (renamed from lib/libarchive/test/test_read_format_gtar_sparse_1_13.tar.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_gtar_sparse_1_17.tar.uu (renamed from lib/libarchive/test/test_read_format_gtar_sparse_1_17.tar.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_gtar_sparse_1_17_posix00.tar.uu (renamed from lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix00.tar.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_gtar_sparse_1_17_posix01.tar.uu (renamed from lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix01.tar.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_gtar_sparse_1_17_posix10.tar.uu (renamed from lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix10.tar.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_gtar_sparse_1_17_posix10_modified.tar.uu (renamed from lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix10_modified.tar.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_iso.iso.Z.uu (renamed from lib/libarchive/test/test_read_format_iso.iso.Z.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_iso_2.iso.Z.uu35
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_iso_Z.c99
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_iso_joliet.iso.Z.uu (renamed from lib/libarchive/test/test_read_format_iso_joliet.iso.Z.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_iso_joliet_long.iso.Z.uu (renamed from lib/libarchive/test/test_read_format_iso_joliet_long.iso.Z.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_iso_joliet_rockridge.iso.Z.uu (renamed from lib/libarchive/test/test_read_format_iso_joliet_rockridge.iso.Z.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_iso_multi_extent.c (renamed from lib/libarchive/test/test_read_format_iso_multi_extent.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_iso_multi_extent.iso.Z.uu (renamed from lib/libarchive/test/test_read_format_iso_multi_extent.iso.Z.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_iso_rockridge.iso.Z.uu (renamed from lib/libarchive/test/test_read_format_iso_rockridge.iso.Z.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_iso_rockridge_ce.iso.Z.uu (renamed from lib/libarchive/test/test_read_format_iso_rockridge_ce.iso.Z.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_iso_rockridge_new.iso.Z.uu (renamed from lib/libarchive/test/test_read_format_iso_rockridge_new.iso.Z.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_iso_rockridge_rr_moved.iso.Z.uu (renamed from lib/libarchive/test/test_read_format_iso_rockridge_rr_moved.iso.Z.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_iso_zisofs.iso.Z.uu (renamed from lib/libarchive/test/test_read_format_iso_zisofs.iso.Z.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_isojoliet_bz2.c (renamed from lib/libarchive/test/test_read_format_isojoliet_bz2.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_isojoliet_long.c (renamed from lib/libarchive/test/test_read_format_isojoliet_long.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_isojoliet_rr.c (renamed from lib/libarchive/test/test_read_format_isojoliet_rr.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_isorr_bz2.c (renamed from lib/libarchive/test/test_read_format_isorr_bz2.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_isorr_ce.c (renamed from lib/libarchive/test/test_read_format_isorr_ce.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_isorr_new_bz2.c (renamed from lib/libarchive/test/test_read_format_isorr_new_bz2.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_isorr_rr_moved.c (renamed from lib/libarchive/test/test_read_format_isorr_rr_moved.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_isozisofs_bz2.c (renamed from lib/libarchive/test/test_read_format_isozisofs_bz2.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_mtree.c (renamed from lib/libarchive/test/test_read_format_mtree.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_mtree.mtree.uu (renamed from lib/libarchive/test/test_read_format_mtree.mtree.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_pax_bz2.c (renamed from lib/libarchive/test/test_read_format_pax_bz2.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_raw.c (renamed from lib/libarchive/test/test_read_format_raw.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_raw.data.Z.uu (renamed from lib/libarchive/test/test_read_format_raw.data.Z.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_raw.data.uu (renamed from lib/libarchive/test/test_read_format_raw.data.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_tar.c (renamed from lib/libarchive/test/test_read_format_tar.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_tar_empty_filename.c (renamed from lib/libarchive/test/test_read_format_tar_empty_filename.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_tar_empty_filename.tar.uu (renamed from lib/libarchive/test/test_read_format_tar_empty_filename.tar.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_tbz.c (renamed from lib/libarchive/test/test_read_format_tbz.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_tgz.c (renamed from lib/libarchive/test/test_read_format_tgz.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_tlz.c (renamed from lib/libarchive/test/test_read_format_tlz.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_txz.c (renamed from lib/libarchive/test/test_read_format_txz.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_tz.c (renamed from lib/libarchive/test/test_read_format_tz.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_xar.c (renamed from lib/libarchive/test/test_read_format_xar.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_zip.c (renamed from lib/libarchive/test/test_read_format_zip.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_zip.zip.uu (renamed from lib/libarchive/test/test_read_format_zip.zip.uu)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_large.c (renamed from lib/libarchive/test/test_read_large.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_pax_truncated.c (renamed from lib/libarchive/test/test_read_pax_truncated.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_position.c (renamed from lib/libarchive/test/test_read_position.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_truncated.c (renamed from lib/libarchive/test/test_read_truncated.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_read_uu.c (renamed from lib/libarchive/test/test_read_uu.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_tar_filenames.c (renamed from lib/libarchive/test/test_tar_filenames.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_tar_large.c (renamed from lib/libarchive/test/test_tar_large.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_ustar_filenames.c (renamed from lib/libarchive/test/test_ustar_filenames.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_write_compress.c (renamed from lib/libarchive/test/test_write_compress.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_write_compress_bzip2.c (renamed from lib/libarchive/test/test_write_compress_bzip2.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_write_compress_gzip.c (renamed from lib/libarchive/test/test_write_compress_gzip.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_write_compress_lzma.c (renamed from lib/libarchive/test/test_write_compress_lzma.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_write_compress_program.c (renamed from lib/libarchive/test/test_write_compress_program.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_write_compress_xz.c (renamed from lib/libarchive/test/test_write_compress_xz.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_write_disk.c (renamed from lib/libarchive/test/test_write_disk.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_write_disk_failures.c (renamed from lib/libarchive/test/test_write_disk_failures.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_write_disk_hardlink.c (renamed from lib/libarchive/test/test_write_disk_hardlink.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_write_disk_perms.c (renamed from lib/libarchive/test/test_write_disk_perms.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_write_disk_secure.c (renamed from lib/libarchive/test/test_write_disk_secure.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_write_disk_sparse.c (renamed from lib/libarchive/test/test_write_disk_sparse.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_write_disk_symlink.c (renamed from lib/libarchive/test/test_write_disk_symlink.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_write_disk_times.c (renamed from lib/libarchive/test/test_write_disk_times.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_write_format_ar.c (renamed from lib/libarchive/test/test_write_format_ar.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_write_format_cpio.c (renamed from lib/libarchive/test/test_write_format_cpio.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_write_format_cpio_empty.c (renamed from lib/libarchive/test/test_write_format_cpio_empty.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_write_format_cpio_newc.c (renamed from lib/libarchive/test/test_write_format_cpio_newc.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_write_format_cpio_odc.c (renamed from lib/libarchive/test/test_write_format_cpio_odc.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_write_format_mtree.c (renamed from lib/libarchive/test/test_write_format_mtree.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_write_format_pax.c (renamed from lib/libarchive/test/test_write_format_pax.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_write_format_shar_empty.c (renamed from lib/libarchive/test/test_write_format_shar_empty.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_write_format_tar.c (renamed from lib/libarchive/test/test_write_format_tar.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_write_format_tar_empty.c (renamed from lib/libarchive/test/test_write_format_tar_empty.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_write_format_tar_ustar.c (renamed from lib/libarchive/test/test_write_format_tar_ustar.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_write_format_zip.c (renamed from lib/libarchive/test/test_write_format_zip.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_write_format_zip_empty.c (renamed from lib/libarchive/test/test_write_format_zip_empty.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_write_format_zip_no_compression.c (renamed from lib/libarchive/test/test_write_format_zip_no_compression.c)0
-rw-r--r--contrib/libarchive/libarchive/test/test_write_open_memory.c (renamed from lib/libarchive/test/test_write_open_memory.c)0
-rw-r--r--contrib/libarchive/libarchive_fe/err.c (renamed from lib/libarchive/libarchive_fe/err.c)0
-rw-r--r--contrib/libarchive/libarchive_fe/err.h (renamed from lib/libarchive/libarchive_fe/err.h)0
-rw-r--r--contrib/libarchive/libarchive_fe/lafe_platform.h (renamed from lib/libarchive/libarchive_fe/lafe_platform.h)0
-rw-r--r--contrib/libarchive/libarchive_fe/line_reader.c (renamed from lib/libarchive/libarchive_fe/line_reader.c)0
-rw-r--r--contrib/libarchive/libarchive_fe/line_reader.h (renamed from lib/libarchive/libarchive_fe/line_reader.h)0
-rw-r--r--contrib/libarchive/libarchive_fe/matching.c284
-rw-r--r--contrib/libarchive/libarchive_fe/matching.h (renamed from lib/libarchive/libarchive_fe/matching.h)0
-rw-r--r--contrib/libarchive/libarchive_fe/pathmatch.c (renamed from lib/libarchive/libarchive_fe/pathmatch.c)0
-rw-r--r--contrib/libarchive/libarchive_fe/pathmatch.h (renamed from lib/libarchive/libarchive_fe/pathmatch.h)0
-rw-r--r--contrib/libarchive/tar/bsdtar.1 (renamed from usr.bin/tar/bsdtar.1)0
-rw-r--r--contrib/libarchive/tar/bsdtar.c757
-rw-r--r--contrib/libarchive/tar/bsdtar.h165
-rw-r--r--contrib/libarchive/tar/bsdtar_platform.h (renamed from usr.bin/tar/bsdtar_platform.h)0
-rw-r--r--contrib/libarchive/tar/cmdline.c (renamed from usr.bin/tar/cmdline.c)0
-rw-r--r--contrib/libarchive/tar/getdate.c (renamed from usr.bin/tar/getdate.c)0
-rw-r--r--contrib/libarchive/tar/read.c (renamed from usr.bin/tar/read.c)0
-rw-r--r--contrib/libarchive/tar/subst.c (renamed from usr.bin/tar/subst.c)0
-rw-r--r--contrib/libarchive/tar/test/main.c (renamed from usr.bin/tar/test/main.c)0
-rw-r--r--contrib/libarchive/tar/test/test.h (renamed from usr.bin/tar/test/test.h)0
-rw-r--r--contrib/libarchive/tar/test/test_0.c (renamed from usr.bin/tar/test/test_0.c)0
-rw-r--r--contrib/libarchive/tar/test/test_basic.c (renamed from usr.bin/tar/test/test_basic.c)0
-rw-r--r--contrib/libarchive/tar/test/test_copy.c (renamed from usr.bin/tar/test/test_copy.c)0
-rw-r--r--contrib/libarchive/tar/test/test_empty_mtree.c (renamed from usr.bin/tar/test/test_empty_mtree.c)0
-rw-r--r--contrib/libarchive/tar/test/test_getdate.c (renamed from usr.bin/tar/test/test_getdate.c)0
-rw-r--r--contrib/libarchive/tar/test/test_help.c (renamed from usr.bin/tar/test/test_help.c)0
-rw-r--r--contrib/libarchive/tar/test/test_option_T_upper.c (renamed from usr.bin/tar/test/test_option_T_upper.c)0
-rw-r--r--contrib/libarchive/tar/test/test_option_q.c (renamed from usr.bin/tar/test/test_option_q.c)0
-rw-r--r--contrib/libarchive/tar/test/test_option_r.c (renamed from usr.bin/tar/test/test_option_r.c)0
-rw-r--r--contrib/libarchive/tar/test/test_option_s.c107
-rw-r--r--contrib/libarchive/tar/test/test_patterns.c (renamed from usr.bin/tar/test/test_patterns.c)0
-rw-r--r--contrib/libarchive/tar/test/test_patterns_2.tar.uu231
-rw-r--r--contrib/libarchive/tar/test/test_patterns_3.tar.uu231
-rw-r--r--contrib/libarchive/tar/test/test_patterns_4.tar.uu641
-rw-r--r--contrib/libarchive/tar/test/test_stdio.c (renamed from usr.bin/tar/test/test_stdio.c)0
-rw-r--r--contrib/libarchive/tar/test/test_strip_components.c (renamed from usr.bin/tar/test/test_strip_components.c)0
-rw-r--r--contrib/libarchive/tar/test/test_symlink_dir.c (renamed from usr.bin/tar/test/test_symlink_dir.c)0
-rw-r--r--contrib/libarchive/tar/test/test_version.c (renamed from usr.bin/tar/test/test_version.c)0
-rw-r--r--contrib/libarchive/tar/tree.c821
-rw-r--r--contrib/libarchive/tar/tree.h (renamed from usr.bin/tar/tree.h)0
-rw-r--r--contrib/libarchive/tar/util.c (renamed from usr.bin/tar/util.c)0
-rw-r--r--contrib/libarchive/tar/write.c1176
-rw-r--r--contrib/libstdc++/ChangeLog130
-rw-r--r--contrib/libstdc++/config/os/aix/os_defines.h7
-rw-r--r--contrib/libstdc++/include/bits/allocator.h10
-rw-r--r--contrib/libstdc++/include/bits/basic_string.h26
-rw-r--r--contrib/libstdc++/include/bits/fstream.tcc2
-rw-r--r--contrib/libstdc++/include/bits/locale_facets.tcc8
-rw-r--r--contrib/libstdc++/include/ext/atomicity.h2
-rw-r--r--contrib/libstdc++/include/ext/codecvt_specializations.h6
-rw-r--r--contrib/libstdc++/include/ext/concurrence.h2
-rw-r--r--contrib/libstdc++/include/ext/vstring.h26
-rw-r--r--contrib/libstdc++/include/tr1/boost_shared_ptr.h2
-rw-r--r--contrib/libstdc++/include/tr1/random9
-rw-r--r--contrib/libstdc++/libsupc++/eh_personality.cc4
-rw-r--r--contrib/libstdc++/libsupc++/typeinfo14
-rw-r--r--contrib/libstdc++/src/valarray-inst.cc2
-rw-r--r--contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp16
-rw-r--r--contrib/llvm/lib/CodeGen/LLVMTargetMachine.cpp3
-rw-r--r--contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp11
-rw-r--r--contrib/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp8
-rw-r--r--contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp15
-rw-r--r--contrib/llvm/lib/Target/ARM/ARMCallingConv.td19
-rw-r--r--contrib/llvm/lib/Target/ARM/ARMFastISel.cpp5
-rw-r--r--contrib/llvm/lib/Target/ARM/ARMFrameLowering.cpp10
-rw-r--r--contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp2
-rw-r--r--contrib/llvm/lib/Target/ARM/ARMInstrThumb2.td12
-rw-r--r--contrib/llvm/lib/Target/CppBackend/CPPBackend.cpp99
-rw-r--r--contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td40
-rw-r--r--contrib/llvm/lib/Target/Mips/MipsCodeEmitter.cpp31
-rw-r--r--contrib/llvm/lib/Target/Mips/MipsInstrFPU.td56
-rw-r--r--contrib/llvm/lib/Target/Mips/MipsInstrFormats.td83
-rw-r--r--contrib/llvm/lib/Target/Mips/MipsInstrInfo.td97
-rw-r--r--contrib/llvm/lib/Target/Mips/MipsJITInfo.cpp14
-rw-r--r--contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp4
-rw-r--r--contrib/llvm/lib/Target/X86/X86CodeEmitter.cpp33
-rw-r--r--contrib/llvm/lib/Target/X86/X86InstrCompiler.td2
-rw-r--r--contrib/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp7
-rw-r--r--contrib/llvm/tools/clang/include/clang/Driver/CC1Options.td11
-rw-r--r--contrib/llvm/tools/clang/include/clang/Driver/ToolChain.h12
-rw-r--r--contrib/llvm/tools/clang/include/clang/Frontend/HeaderSearchOptions.h23
-rw-r--r--contrib/llvm/tools/clang/lib/Basic/Version.cpp2
-rw-r--r--contrib/llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp42
-rw-r--r--contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp59
-rw-r--r--contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.h2
-rw-r--r--contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp35
-rw-r--r--contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp1024
-rw-r--r--contrib/llvm/tools/clang/lib/Driver/ToolChains.h91
-rw-r--r--contrib/llvm/tools/clang/lib/Driver/Tools.cpp27
-rw-r--r--contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp25
-rw-r--r--contrib/llvm/tools/clang/lib/Frontend/InitHeaderSearch.cpp534
-rw-r--r--contrib/netcat/netcat.c2
-rw-r--r--contrib/openpam/CREDITS16
-rw-r--r--contrib/openpam/HISTORY30
-rw-r--r--contrib/openpam/LICENSE4
-rw-r--r--contrib/openpam/Makefile.am4
-rw-r--r--contrib/openpam/Makefile.in353
-rw-r--r--contrib/openpam/README4
-rw-r--r--contrib/openpam/RELNOTES23
-rw-r--r--contrib/openpam/aclocal.m410139
-rw-r--r--contrib/openpam/bin/Makefile.am6
-rw-r--r--contrib/openpam/bin/Makefile.in298
-rw-r--r--contrib/openpam/bin/pamtest/Makefile.am9
-rw-r--r--contrib/openpam/bin/pamtest/Makefile.in588
-rw-r--r--contrib/openpam/bin/pamtest/pamtest.1177
-rw-r--r--contrib/openpam/bin/pamtest/pamtest.c420
-rw-r--r--contrib/openpam/bin/su/Makefile.am4
-rw-r--r--contrib/openpam/bin/su/Makefile.in377
-rw-r--r--contrib/openpam/bin/su/su.162
-rw-r--r--contrib/openpam/bin/su/su.c13
-rw-r--r--contrib/openpam/config.h.in68
-rwxr-xr-xcontrib/openpam/configure24228
-rw-r--r--contrib/openpam/configure.ac205
-rwxr-xr-xcontrib/openpam/depcomp172
-rw-r--r--contrib/openpam/doc/Makefile.in289
-rw-r--r--contrib/openpam/doc/man/Makefile.am23
-rw-r--r--contrib/openpam/doc/man/Makefile.in358
-rw-r--r--contrib/openpam/doc/man/openpam.310
-rw-r--r--contrib/openpam/doc/man/openpam_borrow_cred.39
-rw-r--r--contrib/openpam/doc/man/openpam_free_data.39
-rw-r--r--contrib/openpam/doc/man/openpam_free_envlist.314
-rw-r--r--contrib/openpam/doc/man/openpam_get_option.39
-rw-r--r--contrib/openpam/doc/man/openpam_log.311
-rw-r--r--contrib/openpam/doc/man/openpam_nullconv.39
-rw-r--r--contrib/openpam/doc/man/openpam_readline.321
-rw-r--r--contrib/openpam/doc/man/openpam_restore_cred.39
-rw-r--r--contrib/openpam/doc/man/openpam_set_option.39
-rw-r--r--contrib/openpam/doc/man/openpam_subst.3142
-rw-r--r--contrib/openpam/doc/man/openpam_ttyconv.39
-rw-r--r--contrib/openpam/doc/man/pam.36
-rw-r--r--contrib/openpam/doc/man/pam.conf.527
-rw-r--r--contrib/openpam/doc/man/pam_acct_mgmt.39
-rw-r--r--contrib/openpam/doc/man/pam_authenticate.39
-rw-r--r--contrib/openpam/doc/man/pam_chauthtok.39
-rw-r--r--contrib/openpam/doc/man/pam_close_session.39
-rw-r--r--contrib/openpam/doc/man/pam_conv.34
-rw-r--r--contrib/openpam/doc/man/pam_end.39
-rw-r--r--contrib/openpam/doc/man/pam_error.39
-rw-r--r--contrib/openpam/doc/man/pam_get_authtok.329
-rw-r--r--contrib/openpam/doc/man/pam_get_data.314
-rw-r--r--contrib/openpam/doc/man/pam_get_item.319
-rw-r--r--contrib/openpam/doc/man/pam_get_user.328
-rw-r--r--contrib/openpam/doc/man/pam_getenv.39
-rw-r--r--contrib/openpam/doc/man/pam_getenvlist.39
-rw-r--r--contrib/openpam/doc/man/pam_info.39
-rw-r--r--contrib/openpam/doc/man/pam_open_session.39
-rw-r--r--contrib/openpam/doc/man/pam_prompt.39
-rw-r--r--contrib/openpam/doc/man/pam_putenv.39
-rw-r--r--contrib/openpam/doc/man/pam_set_data.39
-rw-r--r--contrib/openpam/doc/man/pam_set_item.39
-rw-r--r--contrib/openpam/doc/man/pam_setcred.39
-rw-r--r--contrib/openpam/doc/man/pam_setenv.39
-rw-r--r--contrib/openpam/doc/man/pam_sm_acct_mgmt.39
-rw-r--r--contrib/openpam/doc/man/pam_sm_authenticate.39
-rw-r--r--contrib/openpam/doc/man/pam_sm_chauthtok.319
-rw-r--r--contrib/openpam/doc/man/pam_sm_close_session.39
-rw-r--r--contrib/openpam/doc/man/pam_sm_open_session.39
-rw-r--r--contrib/openpam/doc/man/pam_sm_setcred.39
-rw-r--r--contrib/openpam/doc/man/pam_start.39
-rw-r--r--contrib/openpam/doc/man/pam_strerror.322
-rw-r--r--contrib/openpam/doc/man/pam_verror.39
-rw-r--r--contrib/openpam/doc/man/pam_vinfo.39
-rw-r--r--contrib/openpam/doc/man/pam_vprompt.39
-rw-r--r--contrib/openpam/include/Makefile.in289
-rw-r--r--contrib/openpam/include/security/Makefile.in242
-rw-r--r--contrib/openpam/include/security/openpam.h10
-rw-r--r--contrib/openpam/include/security/openpam_version.h11
-rw-r--r--contrib/openpam/include/security/pam_appl.h4
-rw-r--r--contrib/openpam/include/security/pam_constants.h5
-rw-r--r--contrib/openpam/include/security/pam_modules.h4
-rw-r--r--contrib/openpam/include/security/pam_types.h4
-rwxr-xr-xcontrib/openpam/install-sh517
-rw-r--r--contrib/openpam/lib/Makefile.am17
-rw-r--r--contrib/openpam/lib/Makefile.in700
-rw-r--r--contrib/openpam/lib/openpam_borrow_cred.c8
-rw-r--r--contrib/openpam/lib/openpam_check_owner_perms.c129
-rw-r--r--contrib/openpam/lib/openpam_configure.c494
-rw-r--r--contrib/openpam/lib/openpam_constants.c127
-rw-r--r--contrib/openpam/lib/openpam_constants.h40
-rw-r--r--contrib/openpam/lib/openpam_debug.h103
-rw-r--r--contrib/openpam/lib/openpam_dispatch.c40
-rw-r--r--contrib/openpam/lib/openpam_dynamic.c40
-rw-r--r--contrib/openpam/lib/openpam_findenv.c8
-rw-r--r--contrib/openpam/lib/openpam_free_data.c8
-rw-r--r--contrib/openpam/lib/openpam_free_envlist.c10
-rw-r--r--contrib/openpam/lib/openpam_get_option.c8
-rw-r--r--contrib/openpam/lib/openpam_impl.h115
-rw-r--r--contrib/openpam/lib/openpam_load.c30
-rw-r--r--contrib/openpam/lib/openpam_log.c18
-rw-r--r--contrib/openpam/lib/openpam_nullconv.c8
-rw-r--r--contrib/openpam/lib/openpam_readline.c49
-rw-r--r--contrib/openpam/lib/openpam_restore_cred.c8
-rw-r--r--contrib/openpam/lib/openpam_set_option.c8
-rw-r--r--contrib/openpam/lib/openpam_static.c12
-rw-r--r--contrib/openpam/lib/openpam_strlcmp.h46
-rw-r--r--contrib/openpam/lib/openpam_strlcpy.h49
-rw-r--r--contrib/openpam/lib/openpam_subst.c168
-rw-r--r--contrib/openpam/lib/openpam_ttyconv.c10
-rw-r--r--contrib/openpam/lib/pam_acct_mgmt.c8
-rw-r--r--contrib/openpam/lib/pam_authenticate.c8
-rw-r--r--contrib/openpam/lib/pam_authenticate_secondary.c8
-rw-r--r--contrib/openpam/lib/pam_chauthtok.c8
-rw-r--r--contrib/openpam/lib/pam_close_session.c8
-rw-r--r--contrib/openpam/lib/pam_end.c8
-rw-r--r--contrib/openpam/lib/pam_error.c8
-rw-r--r--contrib/openpam/lib/pam_get_authtok.c42
-rw-r--r--contrib/openpam/lib/pam_get_data.c9
-rw-r--r--contrib/openpam/lib/pam_get_item.c33
-rw-r--r--contrib/openpam/lib/pam_get_mapped_authtok.c8
-rw-r--r--contrib/openpam/lib/pam_get_mapped_username.c8
-rw-r--r--contrib/openpam/lib/pam_get_user.c40
-rw-r--r--contrib/openpam/lib/pam_getenv.c8
-rw-r--r--contrib/openpam/lib/pam_getenvlist.c8
-rw-r--r--contrib/openpam/lib/pam_info.c8
-rw-r--r--contrib/openpam/lib/pam_open_session.c8
-rw-r--r--contrib/openpam/lib/pam_prompt.c8
-rw-r--r--contrib/openpam/lib/pam_putenv.c8
-rw-r--r--contrib/openpam/lib/pam_set_data.c8
-rw-r--r--contrib/openpam/lib/pam_set_item.c13
-rw-r--r--contrib/openpam/lib/pam_set_mapped_authtok.c8
-rw-r--r--contrib/openpam/lib/pam_set_mapped_username.c8
-rw-r--r--contrib/openpam/lib/pam_setcred.c8
-rw-r--r--contrib/openpam/lib/pam_setenv.c8
-rw-r--r--contrib/openpam/lib/pam_sm_acct_mgmt.c8
-rw-r--r--contrib/openpam/lib/pam_sm_authenticate.c8
-rw-r--r--contrib/openpam/lib/pam_sm_authenticate_secondary.c8
-rw-r--r--contrib/openpam/lib/pam_sm_chauthtok.c12
-rw-r--r--contrib/openpam/lib/pam_sm_close_session.c8
-rw-r--r--contrib/openpam/lib/pam_sm_get_mapped_authtok.c8
-rw-r--r--contrib/openpam/lib/pam_sm_get_mapped_username.c8
-rw-r--r--contrib/openpam/lib/pam_sm_open_session.c8
-rw-r--r--contrib/openpam/lib/pam_sm_set_mapped_authtok.c8
-rw-r--r--contrib/openpam/lib/pam_sm_set_mapped_username.c8
-rw-r--r--contrib/openpam/lib/pam_sm_setcred.c8
-rw-r--r--contrib/openpam/lib/pam_start.c30
-rw-r--r--contrib/openpam/lib/pam_strerror.c45
-rw-r--r--contrib/openpam/lib/pam_verror.c8
-rw-r--r--contrib/openpam/lib/pam_vinfo.c8
-rw-r--r--contrib/openpam/lib/pam_vprompt.c8
-rwxr-xr-xcontrib/openpam/ltmain.sh9993
-rw-r--r--contrib/openpam/misc/gendoc.pl100
-rw-r--r--contrib/openpam/missing104
-rw-r--r--contrib/openpam/modules/Makefile.in289
-rw-r--r--contrib/openpam/modules/pam_deny/Makefile.in267
-rw-r--r--contrib/openpam/modules/pam_deny/pam_deny.c6
-rw-r--r--contrib/openpam/modules/pam_permit/Makefile.in267
-rw-r--r--contrib/openpam/modules/pam_permit/pam_permit.c6
-rw-r--r--contrib/openpam/modules/pam_unix/Makefile.am6
-rw-r--r--contrib/openpam/modules/pam_unix/Makefile.in273
-rw-r--r--contrib/openpam/modules/pam_unix/pam_unix.c6
-rw-r--r--contrib/pf/man/pfsync.440
-rw-r--r--contrib/pf/pfctl/pfctl.82
-rw-r--r--contrib/pnpinfo/pnpinfo.c2
-rw-r--r--contrib/tcpdump/print-eigrp.c4
-rw-r--r--contrib/tcpdump/print-icmp6.c15
-rw-r--r--contrib/tcpdump/print-ldp.c2
-rw-r--r--contrib/tcpdump/print-lmp.c2
-rw-r--r--contrib/tcpdump/print-lspping.c2
-rw-r--r--contrib/tcpdump/print-rsvp.c2
-rw-r--r--contrib/tcpdump/print-slow.c4
-rw-r--r--contrib/telnet/libtelnet/encrypt.c3
-rw-r--r--contrib/telnet/libtelnet/sra.c2
-rw-r--r--contrib/telnet/telnet/utilities.c8
-rw-r--r--contrib/telnet/telnetd/utility.c8
-rw-r--r--crypto/heimdal/appl/telnet/libtelnet/encrypt.c3
-rw-r--r--etc/mac.conf2
-rw-r--r--etc/namedb/named.conf2
-rwxr-xr-xetc/netstart1
-rw-r--r--etc/network.subr33
-rw-r--r--etc/rc.d/Makefile193
-rwxr-xr-xetc/rc.d/accounting2
-rwxr-xr-xetc/rc.d/amd2
-rwxr-xr-xetc/rc.d/apm2
-rwxr-xr-xetc/rc.d/apmd2
-rwxr-xr-xetc/rc.d/auditd2
-rwxr-xr-xetc/rc.d/bgfsck2
-rwxr-xr-xetc/rc.d/bootparams2
-rwxr-xr-xetc/rc.d/bsnmpd2
-rwxr-xr-xetc/rc.d/bthidd2
-rwxr-xr-xetc/rc.d/cleanvar2
-rwxr-xr-xetc/rc.d/cleartmp2
-rwxr-xr-xetc/rc.d/cron2
-rwxr-xr-xetc/rc.d/ddb2
-rwxr-xr-xetc/rc.d/devd2
-rwxr-xr-xetc/rc.d/dhclient9
-rwxr-xr-xetc/rc.d/dmesg2
-rwxr-xr-xetc/rc.d/ftp-proxy2
-rwxr-xr-xetc/rc.d/ftpd2
-rwxr-xr-xetc/rc.d/gptboot2
-rwxr-xr-xetc/rc.d/hastd2
-rwxr-xr-xetc/rc.d/hcsecd2
-rwxr-xr-xetc/rc.d/hostapd2
-rwxr-xr-xetc/rc.d/hostname2
-rwxr-xr-xetc/rc.d/inetd2
-rwxr-xr-xetc/rc.d/ip6addrctl2
-rwxr-xr-xetc/rc.d/ipfilter2
-rwxr-xr-xetc/rc.d/ipfs2
-rwxr-xr-xetc/rc.d/ipmon2
-rwxr-xr-xetc/rc.d/ipnat2
-rwxr-xr-xetc/rc.d/ipsec2
-rwxr-xr-xetc/rc.d/ipxrouted2
-rwxr-xr-xetc/rc.d/jail7
-rwxr-xr-xetc/rc.d/keyserv2
-rwxr-xr-xetc/rc.d/lpd2
-rwxr-xr-xetc/rc.d/mountd2
-rwxr-xr-xetc/rc.d/moused4
-rwxr-xr-xetc/rc.d/mroute6d2
-rwxr-xr-xetc/rc.d/mrouted2
-rwxr-xr-xetc/rc.d/natd2
-rwxr-xr-xetc/rc.d/netif10
-rwxr-xr-xetc/rc.d/netwait2
-rwxr-xr-xetc/rc.d/newsyslog2
-rwxr-xr-xetc/rc.d/nfscbd2
-rwxr-xr-xetc/rc.d/nfsd2
-rwxr-xr-xetc/rc.d/nfsuserd2
-rwxr-xr-xetc/rc.d/nscd2
-rwxr-xr-xetc/rc.d/ntpd2
-rwxr-xr-xetc/rc.d/ntpdate2
-rwxr-xr-xetc/rc.d/pf2
-rwxr-xr-xetc/rc.d/pflog2
-rwxr-xr-xetc/rc.d/pfsync9
-rwxr-xr-xetc/rc.d/powerd2
-rwxr-xr-xetc/rc.d/ppp2
-rwxr-xr-xetc/rc.d/pppoed2
-rwxr-xr-xetc/rc.d/quota2
-rwxr-xr-xetc/rc.d/rarpd2
-rwxr-xr-xetc/rc.d/rfcomm_pppd_server2
-rwxr-xr-xetc/rc.d/route6d2
-rwxr-xr-xetc/rc.d/routed2
-rwxr-xr-xetc/rc.d/rpcbind2
-rwxr-xr-xetc/rc.d/rtadvd2
-rwxr-xr-xetc/rc.d/rtsold2
-rwxr-xr-xetc/rc.d/rwho2
-rwxr-xr-xetc/rc.d/sdpd2
-rwxr-xr-xetc/rc.d/sendmail6
-rwxr-xr-xetc/rc.d/sshd2
-rwxr-xr-xetc/rc.d/syslogd4
-rwxr-xr-xetc/rc.d/timed2
-rwxr-xr-xetc/rc.d/ubthidhci2
-rwxr-xr-xetc/rc.d/virecover2
-rwxr-xr-xetc/rc.d/watchdogd2
-rw-r--r--etc/rc.firewall10
-rw-r--r--etc/rc.initdiskless6
-rw-r--r--etc/rc.subr60
-rw-r--r--etc/services8
-rw-r--r--games/factor/factor.c2
-rw-r--r--games/fortune/datfiles/fortunes645
-rw-r--r--games/fortune/datfiles/fortunes-o.real46
-rw-r--r--games/fortune/datfiles/murphy33
-rw-r--r--games/fortune/fortune/fortune.c6
-rw-r--r--games/morse/morse.c175
-rw-r--r--gnu/usr.bin/binutils/libbinutils/Makefile1
-rw-r--r--gnu/usr.bin/cvs/lib/config.h.proto2
-rw-r--r--gnu/usr.bin/gdb/kgdb/main.c2
-rw-r--r--gnu/usr.bin/gdb/kgdb/trgt_amd64.c2
-rw-r--r--include/Makefile4
-rw-r--r--include/arpa/nameser_compat.h4
-rw-r--r--include/assert.h15
-rw-r--r--include/complex.h11
-rw-r--r--include/dlfcn.h1
-rw-r--r--include/glob.h3
-rw-r--r--include/gssapi/gssapi.h4
-rw-r--r--include/netdb.h2
-rw-r--r--include/regex.h2
-rw-r--r--include/resolv.h2
-rw-r--r--include/rpc/svc.h2
-rw-r--r--include/rpcsvc/mount.x4
-rw-r--r--include/rpcsvc/nfs_prot.x4
-rw-r--r--include/rpcsvc/nis.x4
-rw-r--r--include/signal.h6
-rw-r--r--include/stdalign.h47
-rw-r--r--include/stdatomic.h329
-rw-r--r--include/stdbool.h7
-rw-r--r--include/stdio.h10
-rw-r--r--include/stdlib.h15
-rw-r--r--include/stdnoreturn.h38
-rw-r--r--include/tgmath.h132
-rw-r--r--include/unistd.h1
-rw-r--r--include/xlocale.h4
-rw-r--r--lib/Makefile3
-rw-r--r--lib/clang/clang.build.mk6
-rw-r--r--lib/clang/include/MipsGenCodeEmitter.inc2
-rw-r--r--lib/clang/include/clang/Basic/Version.inc4
-rw-r--r--lib/clang/libllvmarminfo/Makefile2
-rw-r--r--lib/clang/libllvmmipscodegen/Makefile1
-rw-r--r--lib/clang/libllvmmipsinfo/Makefile2
-rw-r--r--lib/clang/libllvmpowerpcinfo/Makefile2
-rw-r--r--lib/clang/libllvmx86info/Makefile2
-rw-r--r--lib/libarchive/COPYING36
-rw-r--r--lib/libarchive/Makefile13
-rw-r--r--lib/libarchive/README102
-rw-r--r--lib/libarchive/archive.h739
-rw-r--r--lib/libarchive/archive_read_disk_entry_from_file.c570
-rw-r--r--lib/libarchive/archive_read_extract.c180
-rw-r--r--lib/libarchive/archive_read_support_compression_bzip2.c353
-rw-r--r--lib/libarchive/archive_read_support_compression_rpm.c288
-rw-r--r--lib/libarchive/archive_read_support_compression_uu.c637
-rw-r--r--lib/libarchive/archive_read_support_format_all.c43
-rw-r--r--lib/libarchive/archive_read_support_format_cpio.c777
-rw-r--r--lib/libarchive/archive_read_support_format_iso9660.c2956
-rw-r--r--lib/libarchive/archive_read_support_format_tar.c2418
-rw-r--r--lib/libarchive/archive_read_support_format_zip.c950
-rw-r--r--lib/libarchive/archive_string.c453
-rw-r--r--lib/libarchive/archive_string.h148
-rw-r--r--lib/libarchive/archive_util.c391
-rw-r--r--lib/libarchive/archive_write_disk.3375
-rw-r--r--lib/libarchive/archive_write_disk.c2628
-rw-r--r--lib/libarchive/archive_write_set_compression_xz.c438
-rw-r--r--lib/libarchive/archive_write_set_format_ar.c550
-rw-r--r--lib/libarchive/archive_write_set_format_cpio.c344
-rw-r--r--lib/libarchive/archive_write_set_format_shar.c626
-rw-r--r--lib/libarchive/archive_write_set_format_ustar.c587
-rw-r--r--lib/libarchive/config_freebsd.h1
-rw-r--r--lib/libarchive/libarchive-formats.5354
-rw-r--r--lib/libarchive/libarchive.3369
-rw-r--r--lib/libarchive/libarchive_fe/matching.c281
-rw-r--r--lib/libarchive/libarchive_internals.3365
-rw-r--r--lib/libarchive/test/.cvsignore10
-rw-r--r--lib/libarchive/test/Makefile41
-rw-r--r--lib/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.c128
-rw-r--r--lib/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.rpm.uu49
-rw-r--r--lib/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.c128
-rw-r--r--lib/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.rpm.uu48
-rw-r--r--lib/libarchive/test/test_read_format_iso_2.iso.Z.uu37
-rw-r--r--lib/libarchive/test/test_read_format_iso_gz.c99
-rw-r--r--lib/libc/Makefile4
-rw-r--r--lib/libc/amd64/gen/Makefile.inc2
-rw-r--r--lib/libc/amd64/gen/getcontextx.c101
-rw-r--r--lib/libc/arm/_fpmath.h3
-rw-r--r--lib/libc/arm/gen/Makefile.inc4
-rw-r--r--lib/libc/arm/gen/flt_rounds.c65
-rw-r--r--lib/libc/arm/gen/getcontextx.c69
-rw-r--r--lib/libc/arm/softfloat/softfloat.h28
-rw-r--r--lib/libc/arm/string/Makefile.inc7
-rw-r--r--lib/libc/gen/Makefile.inc5
-rw-r--r--lib/libc/gen/Symbol.map8
-rw-r--r--lib/libc/gen/dlfcn.c9
-rw-r--r--lib/libc/gen/dlopen.336
-rw-r--r--lib/libc/gen/exec.c2
-rw-r--r--lib/libc/gen/getcontext.331
-rw-r--r--lib/libc/gen/getosreldate.c7
-rw-r--r--lib/libc/gen/getttyent.c6
-rw-r--r--lib/libc/gen/getusershell.c15
-rw-r--r--lib/libc/gen/getutxent.31
-rw-r--r--lib/libc/gen/glob.34
-rw-r--r--lib/libc/gen/glob.c73
-rw-r--r--lib/libc/gen/libc_dlopen.c61
-rw-r--r--lib/libc/gen/sem.c2
-rw-r--r--lib/libc/gen/sem_new.c1
-rw-r--r--lib/libc/gen/strtofflags.c49
-rw-r--r--lib/libc/gen/timezone.c2
-rw-r--r--lib/libc/gen/ucontext.34
-rw-r--r--lib/libc/i386/gen/Makefile.inc2
-rw-r--r--lib/libc/i386/gen/getcontextx.c133
-rw-r--r--lib/libc/i386/string/Makefile.inc7
-rw-r--r--lib/libc/i386/string/index.S66
-rw-r--r--lib/libc/i386/string/rindex.S67
-rw-r--r--lib/libc/i386/string/strchr.S2
-rw-r--r--lib/libc/i386/string/strrchr.S2
-rw-r--r--lib/libc/ia64/gen/Makefile.inc2
-rw-r--r--lib/libc/ia64/gen/getcontextx.c69
-rw-r--r--lib/libc/iconv/citrus_module.c3
-rw-r--r--lib/libc/include/libc_private.h11
-rw-r--r--lib/libc/locale/setlocale.c2
-rw-r--r--lib/libc/mips/gen/Makefile.inc3
-rw-r--r--lib/libc/mips/gen/getcontextx.c69
-rw-r--r--lib/libc/mips/softfloat/softfloat.h28
-rw-r--r--lib/libc/mips/string/Makefile.inc6
-rw-r--r--lib/libc/mips/string/index.S59
-rw-r--r--lib/libc/mips/string/rindex.S57
-rw-r--r--lib/libc/mips/string/strchr.S61
-rw-r--r--lib/libc/mips/string/strrchr.S59
-rw-r--r--lib/libc/net/getaddrinfo.c3
-rw-r--r--lib/libc/net/gethostbynis.c2
-rw-r--r--lib/libc/net/getifaddrs.c2
-rw-r--r--lib/libc/net/getnetbynis.c2
-rw-r--r--lib/libc/net/nsdispatch.c4
-rw-r--r--lib/libc/net/sctp_sys_calls.c65
-rw-r--r--lib/libc/powerpc/SYS.h15
-rw-r--r--lib/libc/powerpc/gen/Makefile.inc2
-rw-r--r--lib/libc/powerpc/gen/getcontextx.c69
-rw-r--r--lib/libc/powerpc/gen/setjmp.S3
-rw-r--r--lib/libc/powerpc64/SYS.h15
-rw-r--r--lib/libc/powerpc64/gen/Makefile.inc2
-rw-r--r--lib/libc/powerpc64/gen/getcontextx.c69
-rw-r--r--lib/libc/powerpc64/gen/setjmp.S5
-rw-r--r--lib/libc/powerpc64/sys/cerror.S2
-rw-r--r--lib/libc/resolv/res_send.c2
-rw-r--r--lib/libc/rpc/crypt_client.c4
-rw-r--r--lib/libc/softfloat/Makefile.inc12
-rw-r--r--lib/libc/softfloat/Symbol.map14
-rw-r--r--lib/libc/softfloat/bits32/softfloat-macros4
-rw-r--r--lib/libc/softfloat/bits32/softfloat.c4
-rw-r--r--lib/libc/softfloat/bits64/softfloat-macros6
-rw-r--r--lib/libc/softfloat/bits64/softfloat.c107
-rw-r--r--lib/libc/softfloat/eqtf2.c24
-rw-r--r--lib/libc/softfloat/getf2.c26
-rw-r--r--lib/libc/softfloat/gexf2.c25
-rw-r--r--lib/libc/softfloat/gttf2.c26
-rw-r--r--lib/libc/softfloat/gtxf2.c25
-rw-r--r--lib/libc/softfloat/letf2.c26
-rw-r--r--lib/libc/softfloat/lttf2.c26
-rw-r--r--lib/libc/softfloat/negtf2.c27
-rw-r--r--lib/libc/softfloat/negxf2.c25
-rw-r--r--lib/libc/softfloat/netf2.c26
-rw-r--r--lib/libc/softfloat/nexf2.c25
-rw-r--r--lib/libc/softfloat/softfloat-for-gcc.h148
-rw-r--r--lib/libc/softfloat/softfloat-source.txt4
-rw-r--r--lib/libc/softfloat/softfloat-specialize37
-rw-r--r--lib/libc/softfloat/softfloat.txt4
-rw-r--r--lib/libc/sparc64/fpu/fpu_emu.h3
-rw-r--r--lib/libc/sparc64/fpu/fpu_mul.c4
-rw-r--r--lib/libc/sparc64/gen/Makefile.inc2
-rw-r--r--lib/libc/sparc64/gen/getcontextx.c69
-rw-r--r--lib/libc/stdlib/Makefile.inc7
-rw-r--r--lib/libc/stdlib/Symbol.map7
-rw-r--r--lib/libc/stdlib/aligned_alloc.3126
-rw-r--r--lib/libc/stdlib/getopt_long.35
-rw-r--r--lib/libc/stdlib/getsubopt.34
-rw-r--r--lib/libc/stdlib/malloc.c26
-rw-r--r--lib/libc/stdlib/posix_memalign.396
-rw-r--r--lib/libc/stdlib/quick_exit.c6
-rw-r--r--lib/libc/string/Makefile.inc4
-rw-r--r--lib/libc/string/index.c61
-rw-r--r--lib/libc/string/rindex.c62
-rw-r--r--lib/libc/string/strchr.c53
-rw-r--r--lib/libc/string/strrchr.c54
-rw-r--r--lib/libc/sys/Makefile.inc1
-rw-r--r--lib/libc/sys/cap_new.228
-rw-r--r--lib/libc/sys/chroot.220
-rw-r--r--lib/libc/sys/close.26
-rw-r--r--lib/libc/sys/read.24
-rw-r--r--lib/libc/sys/rtprio.298
-rw-r--r--lib/libc/sys/setuid.22
-rw-r--r--lib/libc/sys/write.24
-rw-r--r--lib/libc/yp/xdryp.c11
-rw-r--r--lib/libc/yp/yplib.c46
-rw-r--r--lib/libcam/camlib.c2
-rw-r--r--lib/libcompiler_rt/Makefile24
-rw-r--r--lib/libcompiler_rt/__sync_fetch_and_add_4.c6
-rw-r--r--lib/libcompiler_rt/__sync_fetch_and_add_8.c6
-rw-r--r--lib/libcompiler_rt/__sync_fetch_and_and_4.c7
-rw-r--r--lib/libcompiler_rt/__sync_fetch_and_and_8.c7
-rw-r--r--lib/libcompiler_rt/__sync_fetch_and_op_n.h47
-rw-r--r--lib/libcompiler_rt/__sync_fetch_and_or_4.c7
-rw-r--r--lib/libcompiler_rt/__sync_fetch_and_or_8.c7
-rw-r--r--lib/libcompiler_rt/__sync_fetch_and_sub_4.c6
-rw-r--r--lib/libcompiler_rt/__sync_fetch_and_sub_8.c6
-rw-r--r--lib/libcompiler_rt/__sync_fetch_and_xor_4.c7
-rw-r--r--lib/libcompiler_rt/__sync_fetch_and_xor_8.c7
-rw-r--r--lib/libcompiler_rt/__sync_lock_test_and_set_4.c7
-rw-r--r--lib/libcompiler_rt/__sync_lock_test_and_set_8.c7
-rw-r--r--lib/libcompiler_rt/__sync_val_compare_and_swap_4.c6
-rw-r--r--lib/libcompiler_rt/__sync_val_compare_and_swap_8.c6
-rw-r--r--lib/libcompiler_rt/__sync_val_compare_and_swap_n.h45
-rw-r--r--lib/libdevstat/devstat.c40
-rw-r--r--lib/libdisk/libdisk.h2
-rw-r--r--lib/libedit/histedit.h4
-rw-r--r--lib/libfetch/common.c57
-rw-r--r--lib/libfetch/common.h7
-rw-r--r--lib/libfetch/http.c17
-rw-r--r--lib/libgssapi/gss_display_status.c4
-rw-r--r--lib/libgssapi/gss_pseudo_random.c4
-rw-r--r--lib/libgssapi/gss_release_oid.c2
-rw-r--r--lib/libipsec/policy_token.l1
-rw-r--r--lib/libkvm/kvm_proc.c54
-rw-r--r--lib/libopie/config.h2
-rw-r--r--lib/libpam/libpam/Makefile5
-rw-r--r--lib/libpam/modules/pam_unix/Makefile4
-rw-r--r--lib/libpmc/libpmc.c64
-rw-r--r--lib/libpmc/pmc.corei7.317
-rw-r--r--lib/libradius/Makefile1
-rw-r--r--lib/libradius/libradius.36
-rw-r--r--lib/libradius/radlib.c9
-rw-r--r--lib/libradius/radlib.h1
-rw-r--r--lib/libradius/radlib_private.h1
-rw-r--r--lib/libsm/Makefile7
-rw-r--r--lib/libstand/Makefile15
-rw-r--r--lib/libstand/bootp.c6
-rw-r--r--lib/libstand/tftp.c7
-rw-r--r--lib/libstdthreads/Makefile41
-rw-r--r--lib/libstdthreads/Symbol.map31
-rw-r--r--lib/libstdthreads/call_once.c44
-rw-r--r--lib/libstdthreads/cnd.c98
-rw-r--r--lib/libstdthreads/mtx.c116
-rw-r--r--lib/libstdthreads/thrd.c127
-rw-r--r--lib/libstdthreads/thrd_create.3260
-rw-r--r--lib/libstdthreads/threads.h106
-rw-r--r--lib/libstdthreads/tss.c69
-rw-r--r--lib/libthr/arch/amd64/include/pthread_md.h2
-rw-r--r--lib/libthr/arch/i386/include/pthread_md.h2
-rw-r--r--lib/libthr/thread/thr_sig.c17
-rw-r--r--lib/libthread_db/Makefile6
-rw-r--r--lib/libutil/Makefile75
-rw-r--r--lib/libutil/flopen.32
-rw-r--r--lib/libutil/gr_util.c296
-rw-r--r--lib/libutil/kld.32
-rw-r--r--lib/libutil/libutil.h216
-rw-r--r--lib/libutil/pidfile.336
-rw-r--r--lib/libutil/pidfile.c23
-rw-r--r--lib/libutil/property.31
-rw-r--r--lib/libutil/pw_util.c57
-rw-r--r--lib/libutil/quotafile.c2
-rw-r--r--lib/libutil/realhostname.32
-rw-r--r--lib/libvgl/bitmap.c2
-rw-r--r--lib/libvgl/keyboard.c2
-rw-r--r--lib/libvgl/main.c2
-rw-r--r--lib/libvgl/mouse.c2
-rw-r--r--lib/libvgl/simple.c215
-rw-r--r--lib/libvgl/text.c2
-rw-r--r--lib/libvgl/vgl.33
-rw-r--r--lib/libvgl/vgl.h2
-rw-r--r--lib/msun/Makefile2
-rw-r--r--lib/msun/arm/Symbol.map5
-rw-r--r--lib/msun/arm/fenv.c14
-rw-r--r--lib/msun/arm/fenv.h23
-rw-r--r--lib/msun/src/fenv-softfloat.h184
-rw-r--r--lib/msun/src/k_expf.c2
-rw-r--r--lib/msun/src/s_fabsl.c2
-rw-r--r--libexec/bootpd/bootpd.c4
-rw-r--r--libexec/bootpd/bootpgw/bootpgw.c4
-rw-r--r--libexec/bootpd/hash.h2
-rw-r--r--libexec/bootpd/tools/bootptest/bootptest.c2
-rw-r--r--libexec/bootpd/tools/bootptest/print-bootp.c4
-rw-r--r--libexec/comsat/comsat.c20
-rw-r--r--libexec/ftpd/ftpcmd.y2
-rw-r--r--libexec/ftpd/ftpd.c1
-rw-r--r--libexec/ftpd/popen.c3
-rw-r--r--libexec/getty/chat.c2
-rw-r--r--libexec/getty/init.c2
-rw-r--r--libexec/lukemftpd/nbsd_pidfile.h2
-rw-r--r--libexec/mail.local/Makefile7
-rw-r--r--libexec/mknetid/parse_group.c2
-rw-r--r--libexec/pppoed/pppoed.c4
-rw-r--r--libexec/rbootd/parseconf.c6
-rw-r--r--libexec/rbootd/rbootd.c2
-rw-r--r--libexec/rbootd/rmpproto.c4
-rw-r--r--libexec/rbootd/utils.c6
-rw-r--r--libexec/revnetgroup/parse_netgroup.c4
-rw-r--r--libexec/rlogind/rlogind.c7
-rw-r--r--libexec/rshd/rshd.82
-rw-r--r--libexec/rtld-aout/shlib.c2
-rw-r--r--libexec/rtld-elf/Symbol.map4
-rw-r--r--libexec/rtld-elf/amd64/reloc.c118
-rw-r--r--libexec/rtld-elf/arm/reloc.c16
-rw-r--r--libexec/rtld-elf/i386/reloc.c121
-rw-r--r--libexec/rtld-elf/ia64/reloc.c16
-rw-r--r--libexec/rtld-elf/mips/reloc.c18
-rw-r--r--libexec/rtld-elf/powerpc/reloc.c34
-rw-r--r--libexec/rtld-elf/powerpc64/reloc.c23
-rw-r--r--libexec/rtld-elf/rtld.c222
-rw-r--r--libexec/rtld-elf/rtld.h7
-rw-r--r--libexec/rtld-elf/sparc64/reloc.c26
-rw-r--r--libexec/smrsh/Makefile7
-rw-r--r--libexec/tftpd/tftp-io.c6
-rw-r--r--libexec/tftpd/tftp-utils.h4
-rw-r--r--libexec/ypxfr/ypxfr_getmap.c4
-rw-r--r--libexec/ypxfr/ypxfr_main.c10
-rw-r--r--libexec/ypxfr/ypxfr_misc.c32
-rw-r--r--release/Makefile2
-rw-r--r--release/doc/en_US.ISO8859-1/hardware/article.sgml3
-rw-r--r--release/doc/en_US.ISO8859-1/relnotes/article.sgml22
-rw-r--r--release/doc/share/misc/dev.archlist.txt1
-rw-r--r--release/doc/share/misc/man2hwnotes.pl5
-rwxr-xr-xrelease/generate-release.sh38
-rw-r--r--release/picobsd/build/Makefile.conf5
-rwxr-xr-xrelease/picobsd/build/picobsd166
-rw-r--r--release/picobsd/tinyware/passwd/local_passwd.c2
-rw-r--r--release/picobsd/tinyware/passwd/pw_copy.c2
-rw-r--r--release/picobsd/tinyware/simple_httpd/README10
-rwxr-xr-xrelease/rc.local11
-rw-r--r--sbin/atm/atmconfig/diag.c8
-rw-r--r--sbin/bsdlabel/bsdlabel.c20
-rw-r--r--sbin/camcontrol/camcontrol.c21
-rw-r--r--sbin/camcontrol/fwdownload.c20
-rw-r--r--sbin/camcontrol/modeedit.c8
-rw-r--r--sbin/devd/devd.cc1
-rw-r--r--sbin/devd/devd.conf.53
-rw-r--r--sbin/devd/devd.hh4
-rw-r--r--sbin/devfs/rule.c2
-rw-r--r--sbin/dhclient/clparse.c6
-rwxr-xr-x[-rw-r--r--]sbin/dhclient/dhclient-script2
-rw-r--r--sbin/dhclient/dhclient-script.82
-rw-r--r--sbin/dhclient/options.c30
-rw-r--r--sbin/dhclient/parse.c12
-rw-r--r--sbin/dump/main.c2
-rw-r--r--sbin/dumpfs/dumpfs.c42
-rw-r--r--sbin/fsck_ffs/fsck.h4
-rw-r--r--sbin/fsck_ffs/fsutil.c2
-rw-r--r--sbin/fsck_ffs/gjournal.c3
-rw-r--r--sbin/fsck_ffs/pass2.c2
-rw-r--r--sbin/fsck_ffs/suj.c2
-rw-r--r--sbin/fsdb/Makefile4
-rw-r--r--sbin/fsirand/fsirand.c3
-rw-r--r--sbin/gbde/Makefile8
-rw-r--r--sbin/geom/class/part/geom_part.c3
-rw-r--r--sbin/geom/class/part/gpart.847
-rw-r--r--sbin/geom/class/raid/graid.82
-rw-r--r--sbin/growfs/growfs.c4
-rw-r--r--sbin/gvinum/gvinum.c7
-rw-r--r--sbin/hastctl/Makefile1
-rw-r--r--sbin/hastctl/hastctl.82
-rw-r--r--sbin/hastctl/hastctl.c18
-rw-r--r--sbin/hastd/Makefile4
-rw-r--r--sbin/hastd/activemap.c4
-rw-r--r--sbin/hastd/control.c18
-rw-r--r--sbin/hastd/ebuf.c4
-rw-r--r--sbin/hastd/event.c8
-rw-r--r--sbin/hastd/hast.conf.510
-rw-r--r--sbin/hastd/hast_checksum.c21
-rw-r--r--sbin/hastd/hast_compression.c2
-rw-r--r--sbin/hastd/hast_proto.c14
-rw-r--r--sbin/hastd/hastd.c94
-rw-r--r--sbin/hastd/hooks.c10
-rw-r--r--sbin/hastd/lzf.h4
-rw-r--r--sbin/hastd/metadata.c10
-rw-r--r--sbin/hastd/nv.c12
-rw-r--r--sbin/hastd/parse.y5
-rw-r--r--sbin/hastd/pjdlog.h2
-rw-r--r--sbin/hastd/primary.c80
-rw-r--r--sbin/hastd/proto.c10
-rw-r--r--sbin/hastd/proto_common.c4
-rw-r--r--sbin/hastd/proto_socketpair.c2
-rw-r--r--sbin/hastd/proto_tcp.c16
-rw-r--r--sbin/hastd/proto_uds.c12
-rw-r--r--sbin/hastd/secondary.c49
-rw-r--r--sbin/hastd/subr.c10
-rw-r--r--sbin/hastd/subr.h2
-rw-r--r--sbin/hastd/token.l4
-rw-r--r--sbin/ifconfig/Makefile2
-rw-r--r--sbin/ifconfig/af_inet.c6
-rw-r--r--sbin/ifconfig/af_inet6.c2
-rw-r--r--sbin/ifconfig/carp.c228
-rw-r--r--sbin/ifconfig/ifcarp.c200
-rw-r--r--sbin/ifconfig/ifconfig.857
-rw-r--r--sbin/ifconfig/ifconfig.c15
-rw-r--r--sbin/ifconfig/ifconfig.h3
-rw-r--r--sbin/ifconfig/ifieee80211.c5
-rw-r--r--sbin/ifconfig/ifvlan.c2
-rw-r--r--sbin/ipf/Makefile.inc2
-rw-r--r--sbin/ipfw/ipfw2.c8
-rw-r--r--sbin/ipfw/main.c13
-rw-r--r--sbin/mdconfig/mdconfig.c33
-rw-r--r--sbin/mdmfs/mdmfs.c2
-rw-r--r--sbin/mount/getmntopts.c15
-rw-r--r--sbin/mount/mntopts.h2
-rw-r--r--sbin/mount/mount.c5
-rw-r--r--sbin/mount/mount_fs.c19
-rw-r--r--sbin/mount_cd9660/mount_cd9660.c3
-rw-r--r--sbin/mount_ext2fs/mount_ext2fs.c3
-rw-r--r--sbin/mount_msdosfs/mount_msdosfs.c3
-rw-r--r--sbin/mount_nfs/mount_nfs.84
-rw-r--r--sbin/mount_nfs/mount_nfs.c5
-rw-r--r--sbin/mount_ntfs/mount_ntfs.c3
-rw-r--r--sbin/mount_nullfs/mount_nullfs.c6
-rw-r--r--sbin/mount_reiserfs/mount_reiserfs.c3
-rw-r--r--sbin/mount_std/mount_std.c3
-rw-r--r--sbin/mount_udf/mount_udf.c3
-rw-r--r--sbin/mount_unionfs/mount_unionfs.c6
-rw-r--r--sbin/newfs/mkfs.c2
-rw-r--r--sbin/newfs/newfs.h2
-rw-r--r--sbin/newfs_msdos/newfs_msdos.836
-rw-r--r--sbin/newfs_msdos/newfs_msdos.c138
-rw-r--r--sbin/ping6/ping6.c5
-rw-r--r--sbin/rcorder/rcorder.c95
-rw-r--r--sbin/reboot/nextboot.82
-rw-r--r--sbin/reboot/reboot.c6
-rw-r--r--sbin/recoverdisk/recoverdisk.120
-rw-r--r--sbin/route/route.c9
-rw-r--r--sbin/routed/main.c4
-rw-r--r--sbin/routed/parms.c2
-rw-r--r--sbin/routed/radix.c4
-rw-r--r--sbin/routed/rtquery/Makefile1
-rw-r--r--sbin/routed/table.c2
-rw-r--r--sbin/shutdown/shutdown.c2
-rw-r--r--sbin/tunefs/tunefs.c3
-rw-r--r--share/doc/IPv6/IMPLEMENTATION34
-rw-r--r--share/examples/diskless/README.TEMPLATING6
-rw-r--r--share/examples/etc/make.conf12
-rw-r--r--share/examples/ppp/ppp.linkdown.sample2
-rw-r--r--share/examples/printing/hpvf4
-rw-r--r--share/examples/scsi_target/scsi_cmds.c14
-rw-r--r--share/examples/scsi_target/scsi_target.c16
-rw-r--r--share/man/man3/ATOMIC_VAR_INIT.3301
-rw-r--r--share/man/man3/Makefile25
-rw-r--r--share/man/man3/tgmath.321
-rw-r--r--share/man/man4/Makefile18
-rw-r--r--share/man/man4/apic.477
-rw-r--r--share/man/man4/atrtc.45
-rw-r--r--share/man/man4/attimer.44
-rw-r--r--share/man/man4/bce.42
-rw-r--r--share/man/man4/bge.47
-rw-r--r--share/man/man4/carp.4283
-rw-r--r--share/man/man4/ciss.44
-rw-r--r--share/man/man4/cpufreq.41
-rw-r--r--share/man/man4/cxgbe.478
-rw-r--r--share/man/man4/ddb.412
-rw-r--r--share/man/man4/ed.48
-rw-r--r--share/man/man4/eventtimers.4153
-rw-r--r--share/man/man4/ffclock.41
-rw-r--r--share/man/man4/h_ertt.44
-rw-r--r--share/man/man4/hpet.44
-rw-r--r--share/man/man4/hpt27xx.4101
-rw-r--r--share/man/man4/man4.i386/CPU_ELAN.41
-rw-r--r--share/man/man4/ng_ksocket.410
-rw-r--r--share/man/man4/pcm.415
-rw-r--r--share/man/man4/snd_hda.4365
-rw-r--r--share/man/man4/splash.427
-rw-r--r--share/man/man4/targ.418
-rw-r--r--share/man/man4/timecounters.4106
-rw-r--r--share/man/man4/viawd.479
-rw-r--r--share/man/man4/virtio.421
-rw-r--r--share/man/man4/virtio_balloon.46
-rw-r--r--share/man/man4/virtio_blk.46
-rw-r--r--share/man/man4/vtnet.415
-rw-r--r--share/man/man5/Makefile1
-rw-r--r--share/man/man5/ar.54
-rw-r--r--share/man/man5/make.conf.512
-rw-r--r--share/man/man5/rc.conf.510
-rw-r--r--share/man/man5/src.conf.510
-rw-r--r--share/man/man7/Makefile1
-rw-r--r--share/man/man7/eventtimers.7133
-rw-r--r--share/man/man7/release.76
-rw-r--r--share/man/man8/rc.86
-rw-r--r--share/man/man8/rc.subr.848
-rw-r--r--share/man/man8/yp.816
-rw-r--r--share/man/man9/DEV_MODULE.94
-rw-r--r--share/man/man9/Makefile21
-rw-r--r--share/man/man9/devtoname.96
-rw-r--r--share/man/man9/eventtimers.9236
-rw-r--r--share/man/man9/memcchr.959
-rw-r--r--share/man/man9/namei.94
-rw-r--r--share/man/man9/physio.94
-rw-r--r--share/man/man9/rtalloc.9261
-rw-r--r--share/man/man9/sbuf.96
-rw-r--r--share/man/man9/shm_map.9186
-rw-r--r--share/man/man9/taskqueue.98
-rw-r--r--share/man/man9/uio.94
-rw-r--r--share/man/man9/vcount.96
-rw-r--r--share/man/man9/vnode.94
-rw-r--r--share/misc/bsd-family-tree13
-rw-r--r--share/misc/committers-ports.dot5
-rw-r--r--share/misc/committers-src.dot2
-rw-r--r--share/mk/bsd.crunchgen.mk5
-rw-r--r--share/mk/bsd.own.mk1
-rw-r--r--share/mk/bsd.sys.mk18
-rw-r--r--share/termcap/termcap.src6
-rw-r--r--sys/Makefile12
-rw-r--r--sys/amd64/acpica/acpi_switch.S13
-rw-r--r--sys/amd64/acpica/acpi_wakecode.S2
-rw-r--r--sys/amd64/acpica/acpi_wakeup.c11
-rw-r--r--sys/amd64/amd64/cpu_switch.S30
-rw-r--r--sys/amd64/amd64/fpu.c275
-rw-r--r--sys/amd64/amd64/genassym.c2
-rw-r--r--sys/amd64/amd64/initcpu.c1
-rw-r--r--sys/amd64/amd64/machdep.c147
-rw-r--r--sys/amd64/amd64/mp_machdep.c4
-rw-r--r--sys/amd64/amd64/pmap.c7
-rw-r--r--sys/amd64/amd64/ptrace_machdep.c141
-rw-r--r--sys/amd64/amd64/sys_machdep.c26
-rw-r--r--sys/amd64/amd64/trap.c2
-rw-r--r--sys/amd64/amd64/vm_machdep.c72
-rw-r--r--sys/amd64/conf/GENERIC5
-rw-r--r--sys/amd64/conf/NOTES6
-rw-r--r--sys/amd64/ia32/ia32_reg.c4
-rw-r--r--sys/amd64/ia32/ia32_signal.c117
-rw-r--r--sys/amd64/include/_types.h2
-rw-r--r--sys/amd64/include/cpufunc.h38
-rw-r--r--sys/amd64/include/float.h16
-rw-r--r--sys/amd64/include/fpu.h75
-rw-r--r--sys/amd64/include/frame.h3
-rw-r--r--sys/amd64/include/md_var.h10
-rw-r--r--sys/amd64/include/pcb.h4
-rw-r--r--sys/amd64/include/pcpu.h2
-rw-r--r--sys/amd64/include/ptrace.h5
-rw-r--r--sys/amd64/include/specialreg.h13
-rw-r--r--sys/amd64/include/sysarch.h12
-rw-r--r--sys/amd64/include/ucontext.h8
-rw-r--r--sys/amd64/linux32/linux.h12
-rw-r--r--sys/amd64/linux32/linux32_dummy.c4
-rw-r--r--sys/amd64/linux32/linux32_proto.h12
-rw-r--r--sys/amd64/linux32/linux32_syscall.h2
-rw-r--r--sys/amd64/linux32/linux32_syscalls.c2
-rw-r--r--sys/amd64/linux32/linux32_sysent.c6
-rw-r--r--sys/amd64/linux32/linux32_systrace_args.c52
-rw-r--r--sys/amd64/linux32/linux32_sysvec.c2
-rw-r--r--sys/amd64/linux32/syscalls.master7
-rw-r--r--sys/arm/arm/irq_dispatch.S3
-rw-r--r--sys/arm/arm/machdep.c2
-rw-r--r--sys/arm/arm/pmap.c1
-rw-r--r--sys/arm/arm/vm_machdep.c4
-rw-r--r--sys/arm/at91/at91_st.c2
-rw-r--r--sys/arm/conf/KB920X3
-rw-r--r--sys/arm/econa/ehci_ebus.c55
-rw-r--r--sys/arm/econa/ohci_ec.c8
-rw-r--r--sys/arm/include/_types.h4
-rw-r--r--sys/arm/include/float.h32
-rw-r--r--sys/arm/include/pmap.h6
-rw-r--r--sys/arm/sa11x0/sa11x0_ost.c2
-rw-r--r--sys/arm/xscale/ixp425/ixdp425_pci.c3
-rw-r--r--sys/arm/xscale/ixp425/ixp425_pci.c3
-rw-r--r--sys/arm/xscale/ixp425/ixp425var.h1
-rw-r--r--sys/boot/arm/at91/libat91/sd-card.c4
-rw-r--r--sys/boot/common/interp_parse.c2
-rw-r--r--sys/boot/common/loader.843
-rw-r--r--sys/boot/forth/loader.4th30
-rw-r--r--sys/boot/forth/loader.conf5
-rw-r--r--sys/boot/forth/menu.4th70
-rw-r--r--sys/boot/forth/menu.4th.810
-rw-r--r--sys/boot/forth/menu.rc36
-rw-r--r--sys/boot/i386/boot0/boot0.S2
-rw-r--r--sys/boot/i386/libi386/biospci.c6
-rw-r--r--sys/boot/i386/libi386/comconsole.c219
-rw-r--r--sys/boot/i386/libi386/libi386.h1
-rw-r--r--sys/boot/i386/libi386/pxe.c2
-rw-r--r--sys/boot/i386/libi386/time.c10
-rw-r--r--sys/boot/ofw/common/main.c2
-rw-r--r--sys/boot/ofw/libofw/ofw_net.c2
-rw-r--r--sys/boot/pc98/boot2/boot1.S2
-rw-r--r--sys/boot/pc98/libpc98/comconsole.c219
-rw-r--r--sys/boot/powerpc/boot1.chrp/Makefile1
-rw-r--r--sys/boot/powerpc/ps3/ps3mmu.c2
-rw-r--r--sys/boot/userboot/libstand/Makefile8
-rw-r--r--sys/cam/ata/ata_da.c37
-rw-r--r--sys/cam/cam_periph.c90
-rw-r--r--sys/cam/cam_periph.h2
-rw-r--r--sys/cam/cam_xpt.c120
-rw-r--r--sys/cam/ctl/README.ctl.txt449
-rw-r--r--sys/cam/ctl/ctl.c13085
-rw-r--r--sys/cam/ctl/ctl.h216
-rw-r--r--sys/cam/ctl/ctl_backend.c177
-rw-r--r--sys/cam/ctl/ctl_backend.h288
-rw-r--r--sys/cam/ctl/ctl_backend_block.c2213
-rw-r--r--sys/cam/ctl/ctl_backend_block.h72
-rw-r--r--sys/cam/ctl/ctl_backend_ramdisk.c835
-rw-r--r--sys/cam/ctl/ctl_cmd_table.c984
-rw-r--r--sys/cam/ctl/ctl_debug.h52
-rw-r--r--sys/cam/ctl/ctl_error.c796
-rw-r--r--sys/cam/ctl/ctl_error.h85
-rw-r--r--sys/cam/ctl/ctl_frontend.c187
-rw-r--r--sys/cam/ctl/ctl_frontend.h295
-rw-r--r--sys/cam/ctl/ctl_frontend_cam_sim.c866
-rw-r--r--sys/cam/ctl/ctl_frontend_internal.c1782
-rw-r--r--sys/cam/ctl/ctl_frontend_internal.h154
-rw-r--r--sys/cam/ctl/ctl_ha.h270
-rw-r--r--sys/cam/ctl/ctl_io.h474
-rw-r--r--sys/cam/ctl/ctl_ioctl.h604
-rw-r--r--sys/cam/ctl/ctl_mem_pool.c192
-rw-r--r--sys/cam/ctl/ctl_mem_pool.h83
-rw-r--r--sys/cam/ctl/ctl_private.h493
-rw-r--r--sys/cam/ctl/ctl_scsi_all.c227
-rw-r--r--sys/cam/ctl/ctl_scsi_all.h52
-rw-r--r--sys/cam/ctl/ctl_ser_table.c81
-rw-r--r--sys/cam/ctl/ctl_util.c843
-rw-r--r--sys/cam/ctl/ctl_util.h119
-rw-r--r--sys/cam/ctl/scsi_ctl.c2053
-rw-r--r--sys/cam/scsi/scsi_all.c109
-rw-r--r--sys/cam/scsi/scsi_all.h116
-rw-r--r--sys/cam/scsi/scsi_cd.c25
-rw-r--r--sys/cam/scsi/scsi_da.c835
-rw-r--r--sys/cam/scsi/scsi_da.h50
-rw-r--r--sys/cam/scsi/scsi_sa.c32
-rw-r--r--sys/cam/scsi/scsi_ses.c2
-rw-r--r--sys/cam/scsi/scsi_sg.c8
-rw-r--r--sys/cam/scsi/scsi_targ_bh.c2
-rw-r--r--sys/cam/scsi/scsi_target.c159
-rw-r--r--sys/cam/scsi/scsi_xpt.c10
-rw-r--r--sys/cddl/compat/opensolaris/kern/opensolaris_cmn_err.c22
-rw-r--r--sys/cddl/compat/opensolaris/sys/sid.h6
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c3
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c11
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c4
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c2
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c4
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c19
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c26
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h3
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h3
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c20
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fm.c8
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c13
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c27
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c4
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c19
-rw-r--r--sys/compat/freebsd32/freebsd32_misc.c14
-rw-r--r--sys/compat/ia32/ia32_signal.h12
-rw-r--r--sys/compat/linprocfs/linprocfs.c4
-rw-r--r--sys/compat/linux/linux_file.c47
-rw-r--r--sys/compat/linux/linux_ioctl.c4
-rw-r--r--sys/compat/linux/linux_ipc.c2
-rw-r--r--sys/compat/linux/linux_misc.c2
-rw-r--r--sys/compat/linux/linux_signal.c2
-rw-r--r--sys/compat/linux/linux_socket.c2
-rw-r--r--sys/compat/linux/linux_stats.c2
-rw-r--r--sys/compat/ndis/subr_ntoskrnl.c5
-rw-r--r--sys/compat/svr4/imgact_svr4.c2
-rw-r--r--sys/conf/NOTES4
-rw-r--r--sys/conf/files142
-rw-r--r--sys/conf/files.amd6410
-rw-r--r--sys/conf/files.i38611
-rw-r--r--sys/conf/kern.mk23
-rw-r--r--sys/conf/kern.pre.mk8
-rw-r--r--sys/conf/kmod.mk2
-rw-r--r--sys/conf/ldscript.powerpc6416
-rw-r--r--sys/conf/options8
-rw-r--r--sys/contrib/dev/acpica/changes.txt54
-rw-r--r--sys/contrib/dev/acpica/common/adfile.c2
-rw-r--r--sys/contrib/dev/acpica/common/adisasm.c57
-rw-r--r--sys/contrib/dev/acpica/common/adwalk.c2
-rw-r--r--sys/contrib/dev/acpica/common/dmextern.c2
-rw-r--r--sys/contrib/dev/acpica/common/dmrestag.c2
-rw-r--r--sys/contrib/dev/acpica/common/dmtable.c5
-rw-r--r--sys/contrib/dev/acpica/common/dmtbdump.c2
-rw-r--r--sys/contrib/dev/acpica/common/dmtbinfo.c229
-rw-r--r--sys/contrib/dev/acpica/common/getopt.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/aslanalyze.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/aslbtypes.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/aslcodegen.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/aslcompile.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/aslcompiler.h2
-rw-r--r--sys/contrib/dev/acpica/compiler/aslcompiler.l2
-rw-r--r--sys/contrib/dev/acpica/compiler/aslcompiler.y2
-rw-r--r--sys/contrib/dev/acpica/compiler/asldefine.h2
-rw-r--r--sys/contrib/dev/acpica/compiler/aslerror.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/aslfiles.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/aslfold.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/aslglobal.h2
-rw-r--r--sys/contrib/dev/acpica/compiler/asllength.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/asllisting.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/aslload.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/asllookup.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/aslmain.c6
-rw-r--r--sys/contrib/dev/acpica/compiler/aslmap.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/aslmessages.h2
-rw-r--r--sys/contrib/dev/acpica/compiler/aslopcodes.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/asloperands.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/aslopt.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/aslpredef.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/aslresource.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/aslrestype1.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/aslrestype1i.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/aslrestype2.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/aslrestype2d.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/aslrestype2e.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/aslrestype2q.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/aslrestype2s.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/aslrestype2w.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/aslstartup.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/aslstubs.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/asltransform.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/asltree.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/asltypes.h2
-rw-r--r--sys/contrib/dev/acpica/compiler/aslutils.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/asluuid.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/aslwalks.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/dtcompile.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/dtcompiler.h2
-rw-r--r--sys/contrib/dev/acpica/compiler/dtexpress.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/dtfield.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/dtio.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/dtparser.l2
-rw-r--r--sys/contrib/dev/acpica/compiler/dtparser.y2
-rw-r--r--sys/contrib/dev/acpica/compiler/dtsubtable.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/dttable.c6
-rw-r--r--sys/contrib/dev/acpica/compiler/dttemplate.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/dttemplate.h15
-rw-r--r--sys/contrib/dev/acpica/compiler/dtutils.c2
-rw-r--r--sys/contrib/dev/acpica/debugger/dbcmds.c2
-rw-r--r--sys/contrib/dev/acpica/debugger/dbdisply.c2
-rw-r--r--sys/contrib/dev/acpica/debugger/dbexec.c2
-rw-r--r--sys/contrib/dev/acpica/debugger/dbfileio.c2
-rw-r--r--sys/contrib/dev/acpica/debugger/dbhistry.c2
-rw-r--r--sys/contrib/dev/acpica/debugger/dbinput.c2
-rw-r--r--sys/contrib/dev/acpica/debugger/dbmethod.c2
-rw-r--r--sys/contrib/dev/acpica/debugger/dbnames.c2
-rw-r--r--sys/contrib/dev/acpica/debugger/dbstats.c2
-rw-r--r--sys/contrib/dev/acpica/debugger/dbutils.c2
-rw-r--r--sys/contrib/dev/acpica/debugger/dbxface.c2
-rw-r--r--sys/contrib/dev/acpica/disassembler/dmbuffer.c2
-rw-r--r--sys/contrib/dev/acpica/disassembler/dmnames.c2
-rw-r--r--sys/contrib/dev/acpica/disassembler/dmobject.c2
-rw-r--r--sys/contrib/dev/acpica/disassembler/dmopcode.c2
-rw-r--r--sys/contrib/dev/acpica/disassembler/dmresrc.c2
-rw-r--r--sys/contrib/dev/acpica/disassembler/dmresrcl.c2
-rw-r--r--sys/contrib/dev/acpica/disassembler/dmresrcl2.c2
-rw-r--r--sys/contrib/dev/acpica/disassembler/dmresrcs.c2
-rw-r--r--sys/contrib/dev/acpica/disassembler/dmutils.c2
-rw-r--r--sys/contrib/dev/acpica/disassembler/dmwalk.c2
-rw-r--r--sys/contrib/dev/acpica/dispatcher/dsargs.c10
-rw-r--r--sys/contrib/dev/acpica/dispatcher/dscontrol.c2
-rw-r--r--sys/contrib/dev/acpica/dispatcher/dsfield.c2
-rw-r--r--sys/contrib/dev/acpica/dispatcher/dsinit.c2
-rw-r--r--sys/contrib/dev/acpica/dispatcher/dsmethod.c2
-rw-r--r--sys/contrib/dev/acpica/dispatcher/dsmthdat.c2
-rw-r--r--sys/contrib/dev/acpica/dispatcher/dsobject.c2
-rw-r--r--sys/contrib/dev/acpica/dispatcher/dsopcode.c2
-rw-r--r--sys/contrib/dev/acpica/dispatcher/dsutils.c2
-rw-r--r--sys/contrib/dev/acpica/dispatcher/dswexec.c2
-rw-r--r--sys/contrib/dev/acpica/dispatcher/dswload.c2
-rw-r--r--sys/contrib/dev/acpica/dispatcher/dswload2.c2
-rw-r--r--sys/contrib/dev/acpica/dispatcher/dswscope.c2
-rw-r--r--sys/contrib/dev/acpica/dispatcher/dswstate.c2
-rw-r--r--sys/contrib/dev/acpica/events/evevent.c2
-rw-r--r--sys/contrib/dev/acpica/events/evglock.c2
-rw-r--r--sys/contrib/dev/acpica/events/evgpe.c2
-rw-r--r--sys/contrib/dev/acpica/events/evgpeblk.c2
-rw-r--r--sys/contrib/dev/acpica/events/evgpeinit.c2
-rw-r--r--sys/contrib/dev/acpica/events/evgpeutil.c2
-rw-r--r--sys/contrib/dev/acpica/events/evmisc.c2
-rw-r--r--sys/contrib/dev/acpica/events/evregion.c2
-rw-r--r--sys/contrib/dev/acpica/events/evrgnini.c2
-rw-r--r--sys/contrib/dev/acpica/events/evsci.c2
-rw-r--r--sys/contrib/dev/acpica/events/evxface.c2
-rw-r--r--sys/contrib/dev/acpica/events/evxfevnt.c2
-rw-r--r--sys/contrib/dev/acpica/events/evxfgpe.c2
-rw-r--r--sys/contrib/dev/acpica/events/evxfregn.c2
-rw-r--r--sys/contrib/dev/acpica/executer/exconfig.c2
-rw-r--r--sys/contrib/dev/acpica/executer/exconvrt.c2
-rw-r--r--sys/contrib/dev/acpica/executer/excreate.c2
-rw-r--r--sys/contrib/dev/acpica/executer/exdebug.c2
-rw-r--r--sys/contrib/dev/acpica/executer/exdump.c2
-rw-r--r--sys/contrib/dev/acpica/executer/exfield.c2
-rw-r--r--sys/contrib/dev/acpica/executer/exfldio.c2
-rw-r--r--sys/contrib/dev/acpica/executer/exmisc.c2
-rw-r--r--sys/contrib/dev/acpica/executer/exmutex.c2
-rw-r--r--sys/contrib/dev/acpica/executer/exnames.c2
-rw-r--r--sys/contrib/dev/acpica/executer/exoparg1.c2
-rw-r--r--sys/contrib/dev/acpica/executer/exoparg2.c2
-rw-r--r--sys/contrib/dev/acpica/executer/exoparg3.c2
-rw-r--r--sys/contrib/dev/acpica/executer/exoparg6.c2
-rw-r--r--sys/contrib/dev/acpica/executer/exprep.c2
-rw-r--r--sys/contrib/dev/acpica/executer/exregion.c2
-rw-r--r--sys/contrib/dev/acpica/executer/exresnte.c2
-rw-r--r--sys/contrib/dev/acpica/executer/exresolv.c2
-rw-r--r--sys/contrib/dev/acpica/executer/exresop.c2
-rw-r--r--sys/contrib/dev/acpica/executer/exstore.c2
-rw-r--r--sys/contrib/dev/acpica/executer/exstoren.c2
-rw-r--r--sys/contrib/dev/acpica/executer/exstorob.c2
-rw-r--r--sys/contrib/dev/acpica/executer/exsystem.c2
-rw-r--r--sys/contrib/dev/acpica/executer/exutils.c2
-rw-r--r--sys/contrib/dev/acpica/hardware/hwacpi.c2
-rw-r--r--sys/contrib/dev/acpica/hardware/hwgpe.c2
-rw-r--r--sys/contrib/dev/acpica/hardware/hwpci.c2
-rw-r--r--sys/contrib/dev/acpica/hardware/hwregs.c2
-rw-r--r--sys/contrib/dev/acpica/hardware/hwsleep.c2
-rw-r--r--sys/contrib/dev/acpica/hardware/hwtimer.c2
-rw-r--r--sys/contrib/dev/acpica/hardware/hwvalid.c2
-rw-r--r--sys/contrib/dev/acpica/hardware/hwxface.c2
-rw-r--r--sys/contrib/dev/acpica/include/acapps.h4
-rw-r--r--sys/contrib/dev/acpica/include/accommon.h2
-rw-r--r--sys/contrib/dev/acpica/include/acconfig.h6
-rw-r--r--sys/contrib/dev/acpica/include/acdebug.h2
-rw-r--r--sys/contrib/dev/acpica/include/acdisasm.h4
-rw-r--r--sys/contrib/dev/acpica/include/acdispat.h2
-rw-r--r--sys/contrib/dev/acpica/include/acevents.h2
-rw-r--r--sys/contrib/dev/acpica/include/acexcep.h2
-rw-r--r--sys/contrib/dev/acpica/include/acglobal.h3
-rw-r--r--sys/contrib/dev/acpica/include/achware.h2
-rw-r--r--sys/contrib/dev/acpica/include/acinterp.h2
-rw-r--r--sys/contrib/dev/acpica/include/aclocal.h13
-rw-r--r--sys/contrib/dev/acpica/include/acmacros.h2
-rw-r--r--sys/contrib/dev/acpica/include/acnames.h2
-rw-r--r--sys/contrib/dev/acpica/include/acnamesp.h2
-rw-r--r--sys/contrib/dev/acpica/include/acobject.h2
-rw-r--r--sys/contrib/dev/acpica/include/acopcode.h2
-rw-r--r--sys/contrib/dev/acpica/include/acoutput.h2
-rw-r--r--sys/contrib/dev/acpica/include/acparser.h2
-rw-r--r--sys/contrib/dev/acpica/include/acpi.h2
-rw-r--r--sys/contrib/dev/acpica/include/acpiosxf.h2
-rw-r--r--sys/contrib/dev/acpica/include/acpixf.h11
-rw-r--r--sys/contrib/dev/acpica/include/acpredef.h2
-rw-r--r--sys/contrib/dev/acpica/include/acresrc.h2
-rw-r--r--sys/contrib/dev/acpica/include/acrestyp.h2
-rw-r--r--sys/contrib/dev/acpica/include/acstruct.h2
-rw-r--r--sys/contrib/dev/acpica/include/actables.h2
-rw-r--r--sys/contrib/dev/acpica/include/actbl.h16
-rw-r--r--sys/contrib/dev/acpica/include/actbl1.h2
-rw-r--r--sys/contrib/dev/acpica/include/actbl2.h2
-rw-r--r--sys/contrib/dev/acpica/include/actbl3.h2
-rw-r--r--sys/contrib/dev/acpica/include/actypes.h2
-rw-r--r--sys/contrib/dev/acpica/include/acutils.h33
-rw-r--r--sys/contrib/dev/acpica/include/amlcode.h2
-rw-r--r--sys/contrib/dev/acpica/include/amlresrc.h2
-rw-r--r--sys/contrib/dev/acpica/include/platform/acenv.h2
-rw-r--r--sys/contrib/dev/acpica/include/platform/acfreebsd.h2
-rw-r--r--sys/contrib/dev/acpica/include/platform/acgcc.h2
-rw-r--r--sys/contrib/dev/acpica/namespace/nsaccess.c2
-rw-r--r--sys/contrib/dev/acpica/namespace/nsalloc.c2
-rw-r--r--sys/contrib/dev/acpica/namespace/nsdump.c2
-rw-r--r--sys/contrib/dev/acpica/namespace/nsdumpdv.c2
-rw-r--r--sys/contrib/dev/acpica/namespace/nseval.c2
-rw-r--r--sys/contrib/dev/acpica/namespace/nsinit.c2
-rw-r--r--sys/contrib/dev/acpica/namespace/nsload.c2
-rw-r--r--sys/contrib/dev/acpica/namespace/nsnames.c2
-rw-r--r--sys/contrib/dev/acpica/namespace/nsobject.c2
-rw-r--r--sys/contrib/dev/acpica/namespace/nsparse.c2
-rw-r--r--sys/contrib/dev/acpica/namespace/nspredef.c2
-rw-r--r--sys/contrib/dev/acpica/namespace/nsrepair.c2
-rw-r--r--sys/contrib/dev/acpica/namespace/nsrepair2.c2
-rw-r--r--sys/contrib/dev/acpica/namespace/nssearch.c2
-rw-r--r--sys/contrib/dev/acpica/namespace/nsutils.c2
-rw-r--r--sys/contrib/dev/acpica/namespace/nswalk.c2
-rw-r--r--sys/contrib/dev/acpica/namespace/nsxfeval.c2
-rw-r--r--sys/contrib/dev/acpica/namespace/nsxfname.c2
-rw-r--r--sys/contrib/dev/acpica/namespace/nsxfobj.c2
-rw-r--r--sys/contrib/dev/acpica/os_specific/service_layers/osunixxf.c2
-rw-r--r--sys/contrib/dev/acpica/parser/psargs.c2
-rw-r--r--sys/contrib/dev/acpica/parser/psloop.c2
-rw-r--r--sys/contrib/dev/acpica/parser/psopcode.c2
-rw-r--r--sys/contrib/dev/acpica/parser/psparse.c2
-rw-r--r--sys/contrib/dev/acpica/parser/psscope.c2
-rw-r--r--sys/contrib/dev/acpica/parser/pstree.c2
-rw-r--r--sys/contrib/dev/acpica/parser/psutils.c2
-rw-r--r--sys/contrib/dev/acpica/parser/pswalk.c2
-rw-r--r--sys/contrib/dev/acpica/parser/psxface.c2
-rw-r--r--sys/contrib/dev/acpica/resources/rsaddr.c2
-rw-r--r--sys/contrib/dev/acpica/resources/rscalc.c2
-rw-r--r--sys/contrib/dev/acpica/resources/rscreate.c2
-rw-r--r--sys/contrib/dev/acpica/resources/rsdump.c2
-rw-r--r--sys/contrib/dev/acpica/resources/rsinfo.c2
-rw-r--r--sys/contrib/dev/acpica/resources/rsio.c2
-rw-r--r--sys/contrib/dev/acpica/resources/rsirq.c2
-rw-r--r--sys/contrib/dev/acpica/resources/rslist.c2
-rw-r--r--sys/contrib/dev/acpica/resources/rsmemory.c2
-rw-r--r--sys/contrib/dev/acpica/resources/rsmisc.c2
-rw-r--r--sys/contrib/dev/acpica/resources/rsserial.c2
-rw-r--r--sys/contrib/dev/acpica/resources/rsutils.c2
-rw-r--r--sys/contrib/dev/acpica/resources/rsxface.c2
-rw-r--r--sys/contrib/dev/acpica/tables/tbfadt.c15
-rw-r--r--sys/contrib/dev/acpica/tables/tbfind.c2
-rw-r--r--sys/contrib/dev/acpica/tables/tbinstal.c2
-rw-r--r--sys/contrib/dev/acpica/tables/tbutils.c2
-rw-r--r--sys/contrib/dev/acpica/tables/tbxface.c2
-rw-r--r--sys/contrib/dev/acpica/tables/tbxfroot.c2
-rw-r--r--sys/contrib/dev/acpica/utilities/utaddress.c322
-rw-r--r--sys/contrib/dev/acpica/utilities/utalloc.c2
-rw-r--r--sys/contrib/dev/acpica/utilities/utcache.c2
-rw-r--r--sys/contrib/dev/acpica/utilities/utcopy.c2
-rw-r--r--sys/contrib/dev/acpica/utilities/utdebug.c2
-rw-r--r--sys/contrib/dev/acpica/utilities/utdecode.c2
-rw-r--r--sys/contrib/dev/acpica/utilities/utdelete.c12
-rw-r--r--sys/contrib/dev/acpica/utilities/uteval.c2
-rw-r--r--sys/contrib/dev/acpica/utilities/utglobal.c9
-rw-r--r--sys/contrib/dev/acpica/utilities/utids.c2
-rw-r--r--sys/contrib/dev/acpica/utilities/utinit.c3
-rw-r--r--sys/contrib/dev/acpica/utilities/utlock.c2
-rw-r--r--sys/contrib/dev/acpica/utilities/utmath.c2
-rw-r--r--sys/contrib/dev/acpica/utilities/utmisc.c40
-rw-r--r--sys/contrib/dev/acpica/utilities/utmutex.c2
-rw-r--r--sys/contrib/dev/acpica/utilities/utobject.c2
-rw-r--r--sys/contrib/dev/acpica/utilities/utosi.c2
-rw-r--r--sys/contrib/dev/acpica/utilities/utresrc.c2
-rw-r--r--sys/contrib/dev/acpica/utilities/utstate.c2
-rw-r--r--sys/contrib/dev/acpica/utilities/uttrack.c2
-rw-r--r--sys/contrib/dev/acpica/utilities/utxface.c47
-rw-r--r--sys/contrib/dev/acpica/utilities/utxferror.c2
-rw-r--r--sys/contrib/dev/acpica/utilities/utxfmutex.c2
-rw-r--r--sys/contrib/dev/npe/LICENSE2
-rw-r--r--sys/contrib/dev/nve/amd64/nvenetlib.README2
-rw-r--r--sys/contrib/dev/nve/i386/nvenetlib.README2
-rw-r--r--sys/contrib/ngatm/netnatm/msg/uni_ie.c84
-rw-r--r--sys/contrib/octeon-sdk/cvmx-helper-board.c3
-rw-r--r--sys/contrib/octeon-sdk/cvmx-pcie.c6
-rw-r--r--sys/contrib/octeon-sdk/cvmx-usb.c2
-rw-r--r--sys/contrib/pf/net/if_pfsync.c567
-rw-r--r--sys/contrib/pf/net/pf.c18
-rw-r--r--sys/contrib/pf/net/pf_ioctl.c93
-rw-r--r--sys/contrib/pf/net/pf_table.c16
-rw-r--r--sys/contrib/pf/net/pfvar.h11
-rw-r--r--sys/contrib/rdma/ib_addr.h2
-rw-r--r--sys/contrib/xz-embedded/COPYING10
-rw-r--r--sys/contrib/xz-embedded/README127
-rw-r--r--sys/contrib/xz-embedded/freebsd/xz_config.h73
-rw-r--r--sys/contrib/xz-embedded/freebsd/xz_malloc.c49
-rw-r--r--sys/contrib/xz-embedded/freebsd/xz_malloc.h34
-rw-r--r--sys/contrib/xz-embedded/linux/Documentation/xz.txt122
-rw-r--r--sys/contrib/xz-embedded/linux/include/linux/decompress/unxz.h19
-rw-r--r--sys/contrib/xz-embedded/linux/include/linux/xz.h278
-rw-r--r--sys/contrib/xz-embedded/linux/lib/decompress_unxz.c397
-rw-r--r--sys/contrib/xz-embedded/linux/lib/xz/Kconfig59
-rw-r--r--sys/contrib/xz-embedded/linux/lib/xz/Makefile5
-rw-r--r--sys/contrib/xz-embedded/linux/lib/xz/xz_crc32.c59
-rw-r--r--sys/contrib/xz-embedded/linux/lib/xz/xz_dec_bcj.c574
-rw-r--r--sys/contrib/xz-embedded/linux/lib/xz/xz_dec_lzma2.c1171
-rw-r--r--sys/contrib/xz-embedded/linux/lib/xz/xz_dec_stream.c821
-rw-r--r--sys/contrib/xz-embedded/linux/lib/xz/xz_dec_syms.c26
-rw-r--r--sys/contrib/xz-embedded/linux/lib/xz/xz_dec_test.c220
-rw-r--r--sys/contrib/xz-embedded/linux/lib/xz/xz_lzma2.h204
-rw-r--r--sys/contrib/xz-embedded/linux/lib/xz/xz_private.h156
-rw-r--r--sys/contrib/xz-embedded/linux/lib/xz/xz_stream.h62
-rwxr-xr-xsys/contrib/xz-embedded/linux/scripts/xz_wrap.sh23
-rw-r--r--sys/contrib/xz-embedded/userspace/Makefile48
-rw-r--r--sys/contrib/xz-embedded/userspace/boottest.c93
-rw-r--r--sys/contrib/xz-embedded/userspace/buftest.c48
-rw-r--r--sys/contrib/xz-embedded/userspace/xz_config.h109
-rw-r--r--sys/contrib/xz-embedded/userspace/xzminidec.c132
-rw-r--r--sys/crypto/aesni/aesni.c13
-rw-r--r--sys/crypto/aesni/aesni.h2
-rw-r--r--sys/crypto/aesni/aesni_wrap.c8
-rw-r--r--sys/crypto/via/padlock.c15
-rw-r--r--sys/crypto/via/padlock.h2
-rw-r--r--sys/crypto/via/padlock_cipher.c4
-rw-r--r--sys/crypto/via/padlock_hash.c4
-rw-r--r--sys/ddb/db_command.c1
-rw-r--r--sys/ddb/db_input.c2
-rw-r--r--sys/ddb/db_ps.c37
-rw-r--r--sys/ddb/db_thread.c3
-rw-r--r--sys/ddb/ddb.h1
-rw-r--r--sys/dev/acpica/acpi_pcib_acpi.c11
-rw-r--r--sys/dev/ahci/ahci.c1
-rw-r--r--sys/dev/ahci/ahci.h2
-rw-r--r--sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l2
-rw-r--r--sys/dev/aic7xxx/aicasm/aicasm_scan.l2
-rw-r--r--sys/dev/an/if_an.c5
-rw-r--r--sys/dev/ata/ata-all.c2
-rw-r--r--sys/dev/ata/ata-all.h2
-rw-r--r--sys/dev/ata/ata-card.c2
-rw-r--r--sys/dev/ata/ata-cbus.c2
-rw-r--r--sys/dev/ata/ata-disk.c6
-rw-r--r--sys/dev/ata/ata-disk.h2
-rw-r--r--sys/dev/ata/ata-dma.c2
-rw-r--r--sys/dev/ata/ata-isa.c2
-rw-r--r--sys/dev/ata/ata-lowlevel.c2
-rw-r--r--sys/dev/ata/ata-pci.c2
-rw-r--r--sys/dev/ata/ata-pci.h7
-rw-r--r--sys/dev/ata/ata-queue.c2
-rw-r--r--sys/dev/ata/ata-raid.c8
-rw-r--r--sys/dev/ata/ata-raid.h2
-rw-r--r--sys/dev/ata/ata-sata.c2
-rw-r--r--sys/dev/ata/ata_if.m2
-rw-r--r--sys/dev/ata/atapi-cam.c5
-rw-r--r--sys/dev/ata/atapi-cd.c2
-rw-r--r--sys/dev/ata/atapi-cd.h2
-rw-r--r--sys/dev/ata/atapi-fd.c2
-rw-r--r--sys/dev/ata/atapi-fd.h2
-rw-r--r--sys/dev/ata/atapi-tape.c2
-rw-r--r--sys/dev/ata/atapi-tape.h2
-rw-r--r--sys/dev/ata/chipsets/ata-acard.c2
-rw-r--r--sys/dev/ata/chipsets/ata-acerlabs.c2
-rw-r--r--sys/dev/ata/chipsets/ata-adaptec.c2
-rw-r--r--sys/dev/ata/chipsets/ata-ahci.c2
-rw-r--r--sys/dev/ata/chipsets/ata-amd.c2
-rw-r--r--sys/dev/ata/chipsets/ata-ati.c2
-rw-r--r--sys/dev/ata/chipsets/ata-cenatek.c2
-rw-r--r--sys/dev/ata/chipsets/ata-cypress.c2
-rw-r--r--sys/dev/ata/chipsets/ata-cyrix.c2
-rw-r--r--sys/dev/ata/chipsets/ata-highpoint.c2
-rw-r--r--sys/dev/ata/chipsets/ata-intel.c7
-rw-r--r--sys/dev/ata/chipsets/ata-ite.c2
-rw-r--r--sys/dev/ata/chipsets/ata-jmicron.c2
-rw-r--r--sys/dev/ata/chipsets/ata-marvell.c2
-rw-r--r--sys/dev/ata/chipsets/ata-micron.c2
-rw-r--r--sys/dev/ata/chipsets/ata-national.c2
-rw-r--r--sys/dev/ata/chipsets/ata-netcell.c2
-rw-r--r--sys/dev/ata/chipsets/ata-nvidia.c2
-rw-r--r--sys/dev/ata/chipsets/ata-promise.c2
-rw-r--r--sys/dev/ata/chipsets/ata-serverworks.c2
-rw-r--r--sys/dev/ata/chipsets/ata-siliconimage.c2
-rw-r--r--sys/dev/ata/chipsets/ata-sis.c2
-rw-r--r--sys/dev/ata/chipsets/ata-via.c2
-rw-r--r--sys/dev/ath/ath_hal/ah.c24
-rw-r--r--sys/dev/ath/ath_hal/ah.h6
-rw-r--r--sys/dev/ath/ath_hal/ah_desc.h13
-rw-r--r--sys/dev/ath/ath_hal/ah_internal.h4
-rw-r--r--sys/dev/ath/ath_hal/ar5210/ar5210reg.h17
-rw-r--r--sys/dev/ath/ath_hal/ar5211/ar5211reg.h17
-rw-r--r--sys/dev/ath/ath_hal/ar5212/ar5212_misc.c2
-rw-r--r--sys/dev/ath/ath_hal/ar5416/ar2133.c8
-rw-r--r--sys/dev/ath/ath_hal/ar5416/ar5416_attach.c4
-rw-r--r--sys/dev/ath/ath_hal/ar5416/ar5416_gpio.c35
-rw-r--r--sys/dev/ath/ath_hal/ar5416/ar5416_misc.c32
-rw-r--r--sys/dev/ath/ath_hal/ar5416/ar5416reg.h8
-rw-r--r--sys/dev/ath/ath_hal/ar9001/ar9130_attach.c8
-rw-r--r--sys/dev/ath/ath_hal/ar9001/ar9130_eeprom.c25
-rw-r--r--sys/dev/ath/ath_hal/ar9001/ar9130_eeprom.h2
-rw-r--r--sys/dev/ath/ath_hal/ar9002/ar9280.c8
-rw-r--r--sys/dev/ath/ath_hal/ar9002/ar9280_attach.c13
-rw-r--r--sys/dev/ath/ath_hal/ar9002/ar9285.c8
-rw-r--r--sys/dev/ath/ath_hal/ar9002/ar9287.c8
-rw-r--r--sys/dev/ath/ath_hal/ar9002/ar9287.h2
-rw-r--r--sys/dev/ath/if_ath.c245
-rw-r--r--sys/dev/ath/if_ath_led.c190
-rw-r--r--sys/dev/ath/if_ath_led.h37
-rw-r--r--sys/dev/ath/if_ath_sysctl.c45
-rw-r--r--sys/dev/ath/if_ath_tx.c114
-rw-r--r--sys/dev/ath/if_athvar.h55
-rw-r--r--sys/dev/bce/if_bce.c107
-rw-r--r--sys/dev/bce/if_bcereg.h1
-rw-r--r--sys/dev/bfe/if_bfe.c1
-rw-r--r--sys/dev/bge/if_bge.c31
-rw-r--r--sys/dev/bge/if_bgereg.h2
-rw-r--r--sys/dev/bm/if_bm.c1
-rw-r--r--sys/dev/bwi/if_bwi.c26
-rw-r--r--sys/dev/bwn/if_bwn.c12
-rw-r--r--sys/dev/bwn/if_bwnvar.h2
-rw-r--r--sys/dev/bxe/bxe_hsi.h2
-rw-r--r--sys/dev/bxe/bxe_reg.h2
-rw-r--r--sys/dev/bxe/if_bxe.c9
-rw-r--r--sys/dev/ce/if_ce.c4
-rw-r--r--sys/dev/cfe/cfe_console.c14
-rw-r--r--sys/dev/ciss/ciss.c3
-rw-r--r--sys/dev/cm/smc90cx6.c2
-rw-r--r--sys/dev/cp/if_cp.c4
-rw-r--r--sys/dev/cpuctl/cpuctl.c81
-rw-r--r--sys/dev/cxgb/common/cxgb_aq100x.c2
-rw-r--r--sys/dev/cxgbe/adapter.h231
-rw-r--r--sys/dev/cxgbe/common/common.h35
-rw-r--r--sys/dev/cxgbe/common/t4_hw.c365
-rw-r--r--sys/dev/cxgbe/common/t4_hw.h78
-rw-r--r--sys/dev/cxgbe/common/t4fw_interface.h5625
-rw-r--r--sys/dev/cxgbe/firmware/t4fw_cfg.txt132
-rw-r--r--sys/dev/cxgbe/firmware/t4fw_cfg_uwire.txt503
-rw-r--r--sys/dev/cxgbe/firmware/t4fw_interface.h6077
-rw-r--r--sys/dev/cxgbe/offload.h71
-rw-r--r--sys/dev/cxgbe/osdep.h3
-rw-r--r--sys/dev/cxgbe/t4_ioctl.h27
-rw-r--r--sys/dev/cxgbe/t4_l2t.c675
-rw-r--r--sys/dev/cxgbe/t4_l2t.h12
-rw-r--r--sys/dev/cxgbe/t4_main.c3023
-rw-r--r--sys/dev/cxgbe/t4_sge.c2193
-rw-r--r--sys/dev/dcons/dcons_os.c12
-rw-r--r--sys/dev/de/if_de.c2
-rw-r--r--sys/dev/drm/i915_drv.h2
-rw-r--r--sys/dev/drm/mga_drv.h4
-rw-r--r--sys/dev/drm/radeon_state.c2
-rw-r--r--sys/dev/e1000/e1000_80003es2lan.c229
-rw-r--r--sys/dev/e1000/e1000_80003es2lan.h67
-rw-r--r--sys/dev/e1000/e1000_82540.c105
-rw-r--r--sys/dev/e1000/e1000_82541.c10
-rw-r--r--sys/dev/e1000/e1000_82543.c7
-rw-r--r--sys/dev/e1000/e1000_82571.c183
-rw-r--r--sys/dev/e1000/e1000_82575.c1237
-rw-r--r--sys/dev/e1000/e1000_82575.h594
-rw-r--r--sys/dev/e1000/e1000_api.c29
-rw-r--r--sys/dev/e1000/e1000_api.h154
-rw-r--r--sys/dev/e1000/e1000_defines.h2939
-rw-r--r--sys/dev/e1000/e1000_hw.h376
-rw-r--r--sys/dev/e1000/e1000_ich8lan.c890
-rw-r--r--sys/dev/e1000/e1000_ich8lan.h347
-rw-r--r--sys/dev/e1000/e1000_mac.c112
-rw-r--r--sys/dev/e1000/e1000_nvm.c31
-rw-r--r--sys/dev/e1000/e1000_nvm.h16
-rw-r--r--sys/dev/e1000/e1000_osdep.h6
-rw-r--r--sys/dev/e1000/e1000_phy.c879
-rw-r--r--sys/dev/e1000/e1000_phy.h280
-rw-r--r--sys/dev/e1000/e1000_regs.h1052
-rw-r--r--sys/dev/e1000/e1000_vf.c60
-rw-r--r--sys/dev/e1000/if_em.c573
-rw-r--r--sys/dev/e1000/if_em.h7
-rw-r--r--sys/dev/e1000/if_igb.c509
-rw-r--r--sys/dev/e1000/if_igb.h11
-rw-r--r--sys/dev/e1000/if_lem.c84
-rw-r--r--sys/dev/e1000/if_lem.h4
-rw-r--r--sys/dev/ep/if_ep.c1
-rw-r--r--sys/dev/esp/ncr53c9x.c2
-rw-r--r--sys/dev/et/if_et.c102
-rw-r--r--sys/dev/et/if_etvar.h1
-rw-r--r--sys/dev/ex/if_ex.c3
-rw-r--r--sys/dev/ex/if_exreg.h2
-rw-r--r--sys/dev/fb/boot_font.c194
-rw-r--r--sys/dev/fb/splash_pcx.c2
-rw-r--r--sys/dev/fb/splash_txt.c135
-rw-r--r--sys/dev/fb/vga.c2
-rw-r--r--sys/dev/fdc/fdc.c4
-rw-r--r--sys/dev/fdt/fdt_pci.c3
-rw-r--r--sys/dev/fdt/fdtbus.c3
-rw-r--r--sys/dev/fdt/simplebus.c3
-rw-r--r--sys/dev/firewire/if_fwe.c1
-rw-r--r--sys/dev/flash/mx25l.c2
-rw-r--r--sys/dev/fxp/if_fxp.c4
-rw-r--r--sys/dev/gpio/gpioiic.c9
-rw-r--r--sys/dev/hpt27xx/README196
-rw-r--r--sys/dev/hpt27xx/amd64-elf.hpt27xx_lib.o.uu22893
-rw-r--r--sys/dev/hpt27xx/array.h187
-rw-r--r--sys/dev/hpt27xx/him.h496
-rw-r--r--sys/dev/hpt27xx/himfuncs.h107
-rw-r--r--sys/dev/hpt27xx/hpt27xx_config.c67
-rw-r--r--sys/dev/hpt27xx/hpt27xx_config.h155
-rw-r--r--sys/dev/hpt27xx/hptintf.h2112
-rw-r--r--sys/dev/hpt27xx/i386-elf.hpt27xx_lib.o.uu15583
-rw-r--r--sys/dev/hpt27xx/ldm.h533
-rw-r--r--sys/dev/hpt27xx/list.h130
-rw-r--r--sys/dev/hpt27xx/os_bsd.c370
-rw-r--r--sys/dev/hpt27xx/os_bsd.h263
-rw-r--r--sys/dev/hpt27xx/osm.h240
-rw-r--r--sys/dev/hpt27xx/osm_bsd.c1421
-rw-r--r--sys/dev/hpt27xx/wj.h56
-rw-r--r--sys/dev/hptmv/readme.txt2
-rw-r--r--sys/dev/hwpmc/hwpmc_amd.c4
-rw-r--r--sys/dev/hwpmc/hwpmc_core.c26
-rw-r--r--sys/dev/hwpmc/hwpmc_powerpc.c807
-rw-r--r--sys/dev/hwpmc/hwpmc_uncore.c32
-rw-r--r--sys/dev/hwpmc/hwpmc_uncore.h6
-rw-r--r--sys/dev/hwpmc/pmc_events.h259
-rw-r--r--sys/dev/ichwd/ichwd.c30
-rw-r--r--sys/dev/ichwd/ichwd.h6
-rw-r--r--sys/dev/ie/if_ie.c1
-rw-r--r--sys/dev/ieee488/ibfoo.c2
-rw-r--r--sys/dev/ieee488/pcii.c8
-rw-r--r--sys/dev/ieee488/upd7210.c4
-rw-r--r--sys/dev/ieee488/upd7210.h6
-rw-r--r--sys/dev/if_ndis/if_ndis.c15
-rw-r--r--sys/dev/if_ndis/if_ndis_pccard.c2
-rw-r--r--sys/dev/iicbus/iicbb.c73
-rw-r--r--sys/dev/ipw/if_ipw.c14
-rw-r--r--sys/dev/isp/isp_freebsd.c82
-rw-r--r--sys/dev/isp/isp_freebsd.h7
-rw-r--r--sys/dev/iwi/if_iwi.c14
-rw-r--r--sys/dev/iwn/if_iwn.c12
-rw-r--r--sys/dev/ixgb/if_ixgb.c1
-rw-r--r--sys/dev/ixgbe/ixgbe.c96
-rw-r--r--sys/dev/ixgbe/ixgbe_osdep.h2
-rw-r--r--sys/dev/ixgbe/ixv.c9
-rw-r--r--sys/dev/lge/if_lge.c1
-rw-r--r--sys/dev/malo/if_malo.c16
-rw-r--r--sys/dev/md/md.c6
-rw-r--r--sys/dev/mps/mps_sas.c1
-rw-r--r--sys/dev/msk/if_msk.c5
-rw-r--r--sys/dev/mwl/if_mwl.c14
-rw-r--r--sys/dev/mxge/if_mxge.c2
-rw-r--r--sys/dev/my/if_my.c1
-rw-r--r--sys/dev/netmap/if_em_netmap.h20
-rw-r--r--sys/dev/netmap/if_igb_netmap.h17
-rw-r--r--sys/dev/netmap/if_lem_netmap.h16
-rw-r--r--sys/dev/netmap/if_re_netmap.h31
-rw-r--r--sys/dev/netmap/ixgbe_netmap.h21
-rw-r--r--sys/dev/netmap/netmap.c100
-rw-r--r--sys/dev/netmap/netmap_kern.h80
-rw-r--r--sys/dev/nfe/if_nfe.c1
-rw-r--r--sys/dev/null/null.c48
-rw-r--r--sys/dev/nve/if_nve.c1
-rw-r--r--sys/dev/nxge/include/xgehal-channel.h2
-rw-r--r--sys/dev/nxge/include/xgehal-config.h2
-rw-r--r--sys/dev/nxge/xgehal/xgehal-fifo-fp.c4
-rw-r--r--sys/dev/ofw/ofw_console.c12
-rw-r--r--sys/dev/pccard/pccardvar.h14
-rw-r--r--sys/dev/pci/isa_pci.c1
-rw-r--r--sys/dev/pci/pci.c4
-rw-r--r--sys/dev/pst/pst-iop.c2
-rw-r--r--sys/dev/pst/pst-iop.h2
-rw-r--r--sys/dev/pst/pst-pci.c4
-rw-r--r--sys/dev/pst/pst-raid.c2
-rw-r--r--sys/dev/qlxgb/qla_misc.c2
-rw-r--r--sys/dev/qlxgb/qla_os.c5
-rw-r--r--sys/dev/ral/rt2560.c14
-rw-r--r--sys/dev/ral/rt2661.c14
-rw-r--r--sys/dev/random/harvest.c8
-rw-r--r--sys/dev/random/nehemiah.c9
-rw-r--r--sys/dev/random/probe.c4
-rw-r--r--sys/dev/re/if_re.c20
-rw-r--r--sys/dev/rt/if_rt.c1
-rw-r--r--sys/dev/sfxge/sfxge_port.c8
-rw-r--r--sys/dev/sio/sio.c12
-rw-r--r--sys/dev/sis/if_sis.c1
-rw-r--r--sys/dev/sk/if_sk.c1
-rw-r--r--sys/dev/sn/if_sn.c1
-rw-r--r--sys/dev/snc/dp83932.c1
-rw-r--r--sys/dev/sound/pci/allegro_code.h218
-rw-r--r--sys/dev/sound/pci/allegro_reg.h790
-rw-r--r--sys/dev/sound/pci/ds1-fw.h4
-rw-r--r--sys/dev/sound/pci/emu10k1.c552
-rw-r--r--sys/dev/sound/pci/emu10kx-midi.c30
-rw-r--r--sys/dev/sound/pci/emu10kx-pcm.c98
-rw-r--r--sys/dev/sound/pci/emu10kx.c469
-rw-r--r--sys/dev/sound/pci/emu10kx.h8
-rw-r--r--sys/dev/sound/pci/emuxkireg.h689
-rw-r--r--sys/dev/sound/pci/hda/hda_reg.h56
-rw-r--r--sys/dev/sound/pci/hda/hdaa.c6747
-rw-r--r--sys/dev/sound/pci/hda/hdaa.h274
-rw-r--r--sys/dev/sound/pci/hda/hdaa_patches.c638
-rw-r--r--sys/dev/sound/pci/hda/hdac.c7845
-rw-r--r--sys/dev/sound/pci/hda/hdac.h565
-rw-r--r--sys/dev/sound/pci/hda/hdac_if.m115
-rw-r--r--sys/dev/sound/pci/hda/hdac_private.h225
-rw-r--r--sys/dev/sound/pci/hda/hdac_reg.h8
-rw-r--r--sys/dev/sound/pci/hda/hdacc.c658
-rw-r--r--sys/dev/sound/pci/maestro3.c75
-rw-r--r--sys/dev/sound/pcm/channel.c3
-rw-r--r--sys/dev/sound/usb/uaudio.c12
-rw-r--r--sys/dev/sound/usb/uaudio.h5
-rw-r--r--sys/dev/speaker/spkr.c2
-rw-r--r--sys/dev/spibus/spibusvar.h2
-rw-r--r--sys/dev/stge/if_stge.c1
-rw-r--r--sys/dev/syscons/blank/blank_saver.c2
-rw-r--r--sys/dev/syscons/fade/fade_saver.c2
-rw-r--r--sys/dev/syscons/green/green_saver.c2
-rw-r--r--sys/dev/syscons/logo/logo_saver.c2
-rw-r--r--sys/dev/syscons/rain/rain_saver.c2
-rw-r--r--sys/dev/syscons/schistory.c2
-rw-r--r--sys/dev/syscons/snake/snake_saver.c2
-rw-r--r--sys/dev/syscons/star/star_saver.c2
-rw-r--r--sys/dev/syscons/syscons.c78
-rw-r--r--sys/dev/syscons/syscons.h5
-rw-r--r--sys/dev/syscons/warp/warp_saver.c2
-rw-r--r--sys/dev/ti/if_ti.c3
-rw-r--r--sys/dev/tl/if_tl.c1
-rw-r--r--sys/dev/tsec/if_tsec.c1
-rw-r--r--sys/dev/twa/tw_osl.h2
-rw-r--r--sys/dev/tws/tws.c1
-rw-r--r--sys/dev/tws/tws.h4
-rw-r--r--sys/dev/uart/uart_bus_fdt.c2
-rw-r--r--sys/dev/uart/uart_bus_pci.c8
-rw-r--r--sys/dev/uart/uart_cpu_sparc64.c2
-rw-r--r--sys/dev/uart/uart_subr.c12
-rw-r--r--sys/dev/uart/uart_tty.c12
-rw-r--r--sys/dev/usb/controller/at91dci.c29
-rw-r--r--sys/dev/usb/controller/at91dci.h2
-rw-r--r--sys/dev/usb/controller/at91dci_atmelarm.c26
-rw-r--r--sys/dev/usb/controller/atmegadci.c29
-rw-r--r--sys/dev/usb/controller/atmegadci.h2
-rw-r--r--sys/dev/usb/controller/atmegadci_atmelarm.c26
-rw-r--r--sys/dev/usb/controller/avr32dci.c86
-rw-r--r--sys/dev/usb/controller/avr32dci.h3
-rw-r--r--sys/dev/usb/controller/dwc_otg.c2612
-rw-r--r--sys/dev/usb/controller/dwc_otg.h437
-rw-r--r--sys/dev/usb/controller/dwc_otg_atmelarm.c199
-rw-r--r--sys/dev/usb/controller/ehci.c252
-rw-r--r--sys/dev/usb/controller/ehci.h5
-rw-r--r--sys/dev/usb/controller/ehci_ixp4xx.c48
-rw-r--r--sys/dev/usb/controller/ehci_mv.c48
-rw-r--r--sys/dev/usb/controller/ehci_pci.c82
-rw-r--r--sys/dev/usb/controller/musb_otg.c29
-rw-r--r--sys/dev/usb/controller/musb_otg.h2
-rw-r--r--sys/dev/usb/controller/musb_otg_atmelarm.c26
-rw-r--r--sys/dev/usb/controller/ohci.c100
-rw-r--r--sys/dev/usb/controller/ohci.h4
-rw-r--r--sys/dev/usb/controller/ohci_atmelarm.c8
-rw-r--r--sys/dev/usb/controller/ohci_pci.c55
-rw-r--r--sys/dev/usb/controller/ohci_s3c24x0.c8
-rw-r--r--sys/dev/usb/controller/uhci.c56
-rw-r--r--sys/dev/usb/controller/uhci.h4
-rw-r--r--sys/dev/usb/controller/uhci_pci.c54
-rw-r--r--sys/dev/usb/controller/usb_controller.c284
-rw-r--r--sys/dev/usb/controller/uss820dci.c29
-rw-r--r--sys/dev/usb/controller/uss820dci.h2
-rw-r--r--sys/dev/usb/controller/uss820dci_atmelarm.c50
-rw-r--r--sys/dev/usb/controller/xhci.c64
-rw-r--r--sys/dev/usb/controller/xhci.h3
-rw-r--r--sys/dev/usb/controller/xhci_pci.c59
-rw-r--r--sys/dev/usb/controller/xhcireg.h2
-rw-r--r--sys/dev/usb/input/ukbd.c380
-rw-r--r--sys/dev/usb/net/if_axe.c1
-rw-r--r--sys/dev/usb/net/usb_ethernet.c1
-rw-r--r--sys/dev/usb/quirk/usb_quirk.c1
-rw-r--r--sys/dev/usb/serial/u3g.c1
-rw-r--r--sys/dev/usb/serial/ucycom.c2
-rw-r--r--sys/dev/usb/serial/uftdi.c2
-rw-r--r--sys/dev/usb/serial/usb_serial.c65
-rw-r--r--sys/dev/usb/serial/usb_serial.h8
-rw-r--r--sys/dev/usb/usb.h1
-rw-r--r--sys/dev/usb/usb_bus.h6
-rw-r--r--sys/dev/usb/usb_controller.h14
-rw-r--r--sys/dev/usb/usb_hub.c71
-rw-r--r--sys/dev/usb/usb_if.m10
-rw-r--r--sys/dev/usb/usb_request.c98
-rw-r--r--sys/dev/usb/usb_request.h2
-rw-r--r--sys/dev/usb/usb_transfer.c6
-rw-r--r--sys/dev/usb/usbdevs10
-rw-r--r--sys/dev/usb/wlan/if_rum.c14
-rw-r--r--sys/dev/usb/wlan/if_run.c33
-rw-r--r--sys/dev/usb/wlan/if_uath.c14
-rw-r--r--sys/dev/usb/wlan/if_upgt.c14
-rw-r--r--sys/dev/usb/wlan/if_ural.c14
-rw-r--r--sys/dev/usb/wlan/if_urtw.c14
-rw-r--r--sys/dev/usb/wlan/if_zyd.c14
-rw-r--r--sys/dev/viawd/viawd.c248
-rw-r--r--sys/dev/viawd/viawd.h73
-rw-r--r--sys/dev/vx/if_vx.c1
-rw-r--r--sys/dev/vxge/include/vxgehal-ll.h22
-rw-r--r--sys/dev/vxge/vxge-osdep.h2
-rw-r--r--sys/dev/vxge/vxge.c1
-rw-r--r--sys/dev/wb/if_wb.c1
-rw-r--r--sys/dev/wi/if_wi.c16
-rw-r--r--sys/dev/wpi/if_wpi.c14
-rw-r--r--sys/dev/wtap/if_medium.c120
-rw-r--r--sys/dev/wtap/if_medium.h72
-rw-r--r--sys/dev/wtap/if_wtap.c904
-rw-r--r--sys/dev/wtap/if_wtap_module.c186
-rw-r--r--sys/dev/wtap/if_wtapioctl.h180
-rw-r--r--sys/dev/wtap/if_wtapvar.h163
-rw-r--r--sys/dev/wtap/plugins/visibility.c241
-rw-r--r--sys/dev/wtap/plugins/visibility.h56
-rw-r--r--sys/dev/wtap/plugins/visibility_ioctl.h51
-rw-r--r--sys/dev/wtap/plugins/wtap_plugin.h48
-rw-r--r--sys/dev/wtap/wtap_hal/hal.c213
-rw-r--r--sys/dev/wtap/wtap_hal/hal.h55
-rw-r--r--sys/dev/wtap/wtap_hal/handler.h50
-rw-r--r--sys/dev/xen/console/console.c12
-rw-r--r--sys/dev/xen/netback/netback.c3
-rw-r--r--sys/dev/xen/netfront/netfront.c1
-rw-r--r--sys/dev/xen/xenpci/evtchn.c2
-rw-r--r--sys/fs/cd9660/cd9660_vfsops.c2
-rw-r--r--sys/fs/ext2fs/ext2_alloc.c233
-rw-r--r--sys/fs/ext2fs/ext2_balloc.c2
-rw-r--r--sys/fs/ext2fs/ext2_bmap.c2
-rw-r--r--sys/fs/ext2fs/ext2_extern.h3
-rw-r--r--sys/fs/ext2fs/ext2_inode.c8
-rw-r--r--sys/fs/ext2fs/ext2_lookup.c4
-rw-r--r--sys/fs/ext2fs/ext2_readwrite.c380
-rw-r--r--sys/fs/ext2fs/ext2_subr.c104
-rw-r--r--sys/fs/ext2fs/ext2_vfsops.c64
-rw-r--r--sys/fs/ext2fs/ext2_vnops.c337
-rwxr-xr-xsys/fs/ext2fs/ext2fs.h31
-rw-r--r--sys/fs/ext2fs/fs.h5
-rw-r--r--sys/fs/fdescfs/fdesc_vfsops.c2
-rw-r--r--sys/fs/hpfs/hpfs_vfsops.c2
-rw-r--r--sys/fs/msdosfs/msdosfs_conv.c28
-rw-r--r--sys/fs/msdosfs/msdosfs_vfsops.c2
-rw-r--r--sys/fs/nfs/nfs_commonkrpc.c111
-rw-r--r--sys/fs/nfs/nfs_commonport.c1
-rw-r--r--sys/fs/nfs/nfs_commonsubs.c2
-rw-r--r--sys/fs/nfs/nfsport.h2
-rw-r--r--sys/fs/nfsclient/nfs_clkrpc.c1
-rw-r--r--sys/fs/nfsclient/nfs_clport.c1
-rw-r--r--sys/fs/nfsclient/nfs_clrpcops.c17
-rw-r--r--sys/fs/nfsclient/nfs_clvfsops.c48
-rw-r--r--sys/fs/nfsclient/nfs_clvnops.c128
-rw-r--r--sys/fs/nfsclient/nfsmount.h5
-rw-r--r--sys/fs/nfsclient/nfsnode.h3
-rw-r--r--sys/fs/nfsserver/nfs_nfsdport.c8
-rw-r--r--sys/fs/nfsserver/nfs_nfsdstate.c4
-rw-r--r--sys/fs/ntfs/ntfs_compr.c10
-rw-r--r--sys/fs/ntfs/ntfs_subr.c10
-rw-r--r--sys/fs/ntfs/ntfs_subr.h4
-rw-r--r--sys/fs/ntfs/ntfs_vfsops.c2
-rw-r--r--sys/fs/ntfs/ntfs_vnops.c2
-rw-r--r--sys/fs/nullfs/null_subr.c8
-rw-r--r--sys/fs/nullfs/null_vfsops.c3
-rw-r--r--sys/fs/nullfs/null_vnops.c8
-rw-r--r--sys/fs/nwfs/nwfs_vfsops.c6
-rw-r--r--sys/fs/portalfs/portal_vfsops.c2
-rw-r--r--sys/fs/procfs/procfs.c2
-rw-r--r--sys/fs/procfs/procfs_ioctl.c2
-rw-r--r--sys/fs/procfs/procfs_status.c2
-rw-r--r--sys/fs/pseudofs/pseudofs.c4
-rw-r--r--sys/fs/pseudofs/pseudofs.h4
-rw-r--r--sys/fs/pseudofs/pseudofs_fileno.c2
-rw-r--r--sys/fs/pseudofs/pseudofs_internal.h2
-rw-r--r--sys/fs/pseudofs/pseudofs_vncache.c2
-rw-r--r--sys/fs/pseudofs/pseudofs_vnops.c26
-rw-r--r--sys/fs/smbfs/smbfs_vfsops.c6
-rw-r--r--sys/fs/smbfs/smbfs_vnops.c10
-rw-r--r--sys/fs/tmpfs/tmpfs.h2
-rw-r--r--sys/fs/tmpfs/tmpfs_subr.c86
-rw-r--r--sys/fs/tmpfs/tmpfs_vfsops.c10
-rw-r--r--sys/fs/tmpfs/tmpfs_vnops.c49
-rw-r--r--sys/gdb/gdb_cons.c10
-rw-r--r--sys/geom/eli/g_eli.c3
-rw-r--r--sys/geom/part/g_part_ebr.c5
-rw-r--r--sys/geom/part/g_part_mbr.c6
-rw-r--r--sys/geom/raid/md_intel.c171
-rw-r--r--sys/geom/uncompress/g_uncompress.c670
-rw-r--r--sys/gnu/dev/sound/pci/emu10k1-alsa.h1601
-rw-r--r--sys/gnu/dev/sound/pci/maestro3_dsp.h214
-rw-r--r--sys/gnu/dev/sound/pci/maestro3_reg.h692
-rw-r--r--sys/gnu/dev/sound/pci/p16v-alsa.h301
-rw-r--r--sys/gnu/dev/sound/pci/p17v-alsa.h113
-rw-r--r--sys/gnu/fs/reiserfs/reiserfs_fs.h2
-rw-r--r--sys/gnu/fs/reiserfs/reiserfs_fs_i.h2
-rw-r--r--sys/gnu/fs/reiserfs/reiserfs_fs_sb.h2
-rw-r--r--sys/gnu/fs/reiserfs/reiserfs_hashes.c2
-rw-r--r--sys/gnu/fs/reiserfs/reiserfs_inode.c2
-rw-r--r--sys/gnu/fs/reiserfs/reiserfs_item_ops.c2
-rw-r--r--sys/gnu/fs/reiserfs/reiserfs_mount.h2
-rw-r--r--sys/gnu/fs/reiserfs/reiserfs_namei.c2
-rw-r--r--sys/gnu/fs/reiserfs/reiserfs_prints.c2
-rw-r--r--sys/gnu/fs/reiserfs/reiserfs_stree.c4
-rw-r--r--sys/gnu/fs/reiserfs/reiserfs_vfsops.c4
-rw-r--r--sys/gnu/fs/reiserfs/reiserfs_vnops.c2
-rw-r--r--sys/gnu/fs/xfs/xfs_vfsops.c3
-rw-r--r--sys/i386/conf/GENERIC5
-rw-r--r--sys/i386/conf/NOTES6
-rw-r--r--sys/i386/conf/PAE3
-rw-r--r--sys/i386/conf/XEN4
-rw-r--r--sys/i386/conf/XENHVM24
-rw-r--r--sys/i386/i386/locore.s3
-rw-r--r--sys/i386/i386/machdep.c12
-rw-r--r--sys/i386/i386/mp_machdep.c9
-rw-r--r--sys/i386/i386/pmap.c73
-rw-r--r--sys/i386/i386/sys_machdep.c2
-rw-r--r--sys/i386/ibcs2/coff.h2
-rw-r--r--sys/i386/ibcs2/ibcs2_isc.c2
-rw-r--r--sys/i386/ibcs2/ibcs2_socksys.c4
-rw-r--r--sys/i386/ibcs2/ibcs2_stat.c2
-rw-r--r--sys/i386/ibcs2/ibcs2_sysi86.c2
-rw-r--r--sys/i386/ibcs2/ibcs2_xenix.c2
-rw-r--r--sys/i386/ibcs2/imgact_coff.c2
-rw-r--r--sys/i386/include/_types.h2
-rw-r--r--sys/i386/include/asm.h14
-rw-r--r--sys/i386/include/float.h16
-rw-r--r--sys/i386/include/npx.h37
-rw-r--r--sys/i386/include/pcaudioio.h2
-rw-r--r--sys/i386/include/ptrace.h2
-rw-r--r--sys/i386/include/specialreg.h1
-rw-r--r--sys/i386/include/sysarch.h6
-rw-r--r--sys/i386/include/ucontext.h21
-rw-r--r--sys/i386/include/vmparam.h7
-rw-r--r--sys/i386/isa/npx.c46
-rw-r--r--sys/i386/linux/imgact_linux.c2
-rw-r--r--sys/i386/linux/linux.h12
-rw-r--r--sys/i386/linux/linux_dummy.c4
-rw-r--r--sys/i386/linux/linux_proto.h12
-rw-r--r--sys/i386/linux/linux_syscall.h2
-rw-r--r--sys/i386/linux/linux_syscalls.c2
-rw-r--r--sys/i386/linux/linux_sysent.c6
-rw-r--r--sys/i386/linux/linux_systrace_args.c52
-rw-r--r--sys/i386/linux/linux_sysvec.c2
-rw-r--r--sys/i386/linux/syscalls.master7
-rw-r--r--sys/i386/xen/mp_machdep.c11
-rw-r--r--sys/i386/xen/pmap.c367
-rw-r--r--sys/ia64/conf/GENERIC14
-rw-r--r--sys/ia64/ia64/ssc.c10
-rw-r--r--sys/ia64/ia64/uma_machdep.c3
-rw-r--r--sys/ia64/include/_types.h2
-rw-r--r--sys/ia64/include/float.h23
-rw-r--r--sys/kern/imgact_elf.c56
-rw-r--r--sys/kern/init_main.c3
-rw-r--r--sys/kern/kern_conf.c12
-rw-r--r--sys/kern/kern_cons.c80
-rw-r--r--sys/kern/kern_exec.c13
-rw-r--r--sys/kern/kern_intr.c10
-rw-r--r--sys/kern/kern_jail.c59
-rw-r--r--sys/kern/kern_ktr.c6
-rw-r--r--sys/kern/kern_linker.c6
-rw-r--r--sys/kern/kern_lock.c3
-rw-r--r--sys/kern/kern_mutex.c25
-rw-r--r--sys/kern/kern_ntptime.c18
-rw-r--r--sys/kern/kern_proc.c309
-rw-r--r--sys/kern/kern_prot.c2
-rw-r--r--sys/kern/kern_racct.c3
-rw-r--r--sys/kern/kern_resource.c75
-rw-r--r--sys/kern/kern_rmlock.c22
-rw-r--r--sys/kern/kern_rwlock.c28
-rw-r--r--sys/kern/kern_shutdown.c59
-rw-r--r--sys/kern/kern_sx.c34
-rw-r--r--sys/kern/kern_synch.c6
-rw-r--r--sys/kern/kern_tc.c144
-rw-r--r--sys/kern/kern_thr.c4
-rw-r--r--sys/kern/kern_thread.c25
-rw-r--r--sys/kern/kern_umtx.c5
-rw-r--r--sys/kern/kern_uuid.c6
-rw-r--r--sys/kern/link_elf_obj.c4
-rw-r--r--sys/kern/sched_4bsd.c4
-rw-r--r--sys/kern/sched_ule.c11
-rw-r--r--sys/kern/subr_bus.c10
-rw-r--r--sys/kern/subr_hash.c10
-rw-r--r--sys/kern/subr_hints.c11
-rw-r--r--sys/kern/subr_kdb.c27
-rw-r--r--sys/kern/subr_lock.c5
-rw-r--r--sys/kern/subr_mchain.c2
-rw-r--r--sys/kern/subr_witness.c18
-rw-r--r--sys/kern/sys_pipe.c6
-rw-r--r--sys/kern/tty_inq.c2
-rw-r--r--sys/kern/uipc_mqueue.c4
-rw-r--r--sys/kern/uipc_shm.c213
-rw-r--r--sys/kern/uipc_sockbuf.c2
-rw-r--r--sys/kern/vfs_cache.c277
-rw-r--r--sys/kern/vfs_lookup.c21
-rw-r--r--sys/kern/vfs_mount.c84
-rw-r--r--sys/kern/vfs_mountroot.c4
-rw-r--r--sys/kern/vfs_subr.c41
-rw-r--r--sys/kern/vfs_syscalls.c21
-rw-r--r--sys/kern/vnode_if.src29
-rw-r--r--sys/libkern/fnmatch.c4
-rw-r--r--sys/libkern/gets.c77
-rw-r--r--sys/libkern/index.c58
-rw-r--r--sys/libkern/memcchr.c115
-rw-r--r--sys/libkern/rindex.c59
-rw-r--r--sys/libkern/skpc.c49
-rw-r--r--sys/libkern/strchr.c52
-rw-r--r--sys/libkern/strrchr.c53
-rw-r--r--sys/mips/adm5120/console.c14
-rw-r--r--sys/mips/atheros/ar71xx_chip.c57
-rw-r--r--sys/mips/atheros/ar71xx_ehci.c54
-rw-r--r--sys/mips/atheros/ar71xx_gpio.c76
-rw-r--r--sys/mips/atheros/ar71xx_machdep.c1
-rw-r--r--sys/mips/atheros/ar71xx_ohci.c8
-rw-r--r--sys/mips/atheros/ar71xx_pci.c83
-rw-r--r--sys/mips/atheros/ar724x_chip.c86
-rw-r--r--sys/mips/atheros/ar724x_pci.c2
-rw-r--r--sys/mips/atheros/ar91xx_chip.c116
-rw-r--r--sys/mips/cavium/cryptocteon/cavium_crypto.c86
-rw-r--r--sys/mips/cavium/files.octeon14
-rw-r--r--sys/mips/cavium/octeon_cop2.S225
-rw-r--r--sys/mips/cavium/octeon_cop2.h210
-rw-r--r--sys/mips/cavium/octeon_ds1337.c27
-rw-r--r--sys/mips/cavium/octeon_gpio.c494
-rw-r--r--sys/mips/cavium/octeon_gpiovar.h55
-rw-r--r--sys/mips/cavium/octeon_machdep.c4
-rw-r--r--sys/mips/cavium/usb/octusb.c72
-rw-r--r--sys/mips/cavium/usb/octusb.h15
-rw-r--r--sys/mips/cavium/usb/octusb_octeon.c99
-rw-r--r--sys/mips/conf/AR71XX93
-rw-r--r--sys/mips/conf/AR71XX.hints77
-rw-r--r--sys/mips/conf/AR71XX_BASE127
-rw-r--r--sys/mips/conf/AR71XX_BASE.hints66
-rw-r--r--sys/mips/conf/AR91XX_BASE6
-rw-r--r--sys/mips/conf/AR91XX_BASE.hints6
-rw-r--r--sys/mips/conf/PB4742
-rw-r--r--sys/mips/conf/PB47.hints79
-rw-r--r--sys/mips/conf/ROUTERSTATION24
-rw-r--r--sys/mips/conf/ROUTERSTATION.hints19
-rw-r--r--sys/mips/conf/ROUTERSTATION_MFS19
-rw-r--r--sys/mips/conf/RSPRO26
-rw-r--r--sys/mips/conf/RSPRO.hints31
-rw-r--r--sys/mips/conf/RSPRO_MFS23
-rw-r--r--sys/mips/conf/RSPRO_STANDALONE26
-rw-r--r--sys/mips/conf/TP-WN1043ND.hints41
-rw-r--r--sys/mips/include/_stdint.h14
-rw-r--r--sys/mips/include/_types.h4
-rw-r--r--sys/mips/include/cpuregs.h1
-rw-r--r--sys/mips/include/db_machdep.h3
-rw-r--r--sys/mips/include/float.h30
-rw-r--r--sys/mips/include/frame.h5
-rw-r--r--sys/mips/include/intr_machdep.h8
-rw-r--r--sys/mips/include/octeon_cop2.h215
-rw-r--r--sys/mips/include/proc.h12
-rw-r--r--sys/mips/mips/db_disasm.c1
-rw-r--r--sys/mips/mips/db_trace.c31
-rw-r--r--sys/mips/mips/elf_machdep.c105
-rw-r--r--sys/mips/mips/exception.S14
-rw-r--r--sys/mips/mips/gdb_machdep.c4
-rw-r--r--sys/mips/mips/genassym.c71
-rw-r--r--sys/mips/mips/locore.S4
-rw-r--r--sys/mips/mips/octeon_cop2.c62
-rw-r--r--sys/mips/mips/octeon_cop2_swtch.S246
-rw-r--r--sys/mips/mips/pm_machdep.c2
-rw-r--r--sys/mips/mips/support.S19
-rw-r--r--sys/mips/mips/swtch.S55
-rw-r--r--sys/mips/mips/trap.c83
-rw-r--r--sys/mips/mips/vm_machdep.c49
-rw-r--r--sys/mips/rmi/xls_ehci.c58
-rw-r--r--sys/mips/rt305x/rt305x_dotg.c26
-rw-r--r--sys/modules/Makefile28
-rw-r--r--sys/modules/acpi/acpi/Makefile7
-rw-r--r--sys/modules/aic7xxx/ahc/ahc_pci/Makefile3
-rw-r--r--sys/modules/aic7xxx/ahd/Makefile3
-rw-r--r--sys/modules/ar71xx/Makefile30
-rw-r--r--sys/modules/ar71xx/ar71xx_ehci/Makefile43
-rw-r--r--sys/modules/ar71xx/ar71xx_ohci/Makefile43
-rw-r--r--sys/modules/asr/Makefile3
-rw-r--r--sys/modules/ath/Makefile7
-rw-r--r--sys/modules/carp/Makefile25
-rw-r--r--sys/modules/ce/Makefile3
-rw-r--r--sys/modules/cfi/Makefile19
-rw-r--r--sys/modules/cxgbe/Makefile1
-rw-r--r--sys/modules/cxgbe/firmware/Makefile27
-rw-r--r--sys/modules/drm/r128/Makefile4
-rw-r--r--sys/modules/drm/radeon/Makefile4
-rw-r--r--sys/modules/drm/via/Makefile4
-rw-r--r--sys/modules/geom/geom_uncompress/Makefile17
-rw-r--r--sys/modules/gpio/Makefile30
-rw-r--r--sys/modules/gpio/gpiobus/Makefile40
-rw-r--r--sys/modules/gpio/gpioiic/Makefile40
-rw-r--r--sys/modules/gpio/gpioled/Makefile40
-rw-r--r--sys/modules/hpt27xx/Makefile14
-rw-r--r--sys/modules/if_carp/Makefile23
-rw-r--r--sys/modules/ipdivert/Makefile10
-rw-r--r--sys/modules/ipfilter/Makefile5
-rw-r--r--sys/modules/kgssapi_krb5/Makefile1
-rw-r--r--sys/modules/nve/Makefile1
-rw-r--r--sys/modules/nxge/Makefile10
-rw-r--r--sys/modules/pfsync/Makefile5
-rw-r--r--sys/modules/random/Makefile2
-rw-r--r--sys/modules/sound/driver/emu10k1/Makefile10
-rw-r--r--sys/modules/sound/driver/emu10kx/Makefile25
-rw-r--r--sys/modules/sound/driver/hda/Makefile5
-rw-r--r--sys/modules/sound/driver/maestro3/Makefile1
-rw-r--r--sys/modules/splash/Makefile2
-rw-r--r--sys/modules/splash/txt/Makefile7
-rw-r--r--sys/modules/usb/Makefile6
-rw-r--r--sys/modules/usb/avr32dci/Makefile38
-rw-r--r--sys/modules/viawd/Makefile8
-rw-r--r--sys/modules/wlan/Makefile3
-rw-r--r--sys/modules/wtap/Makefile30
-rw-r--r--sys/modules/xfs/Makefile7
-rw-r--r--sys/net/bpf.c53
-rw-r--r--sys/net/bpf_buffer.c2
-rw-r--r--sys/net/bpf_buffer.h2
-rw-r--r--sys/net/bpf_zerocopy.c2
-rw-r--r--sys/net/bpf_zerocopy.h2
-rw-r--r--sys/net/if.c152
-rw-r--r--sys/net/if.h13
-rw-r--r--sys/net/if_ethersubr.c2
-rw-r--r--sys/net/if_llatbl.c3
-rw-r--r--sys/net/if_media.h8
-rw-r--r--sys/net/if_types.h1
-rw-r--r--sys/net/if_var.h24
-rw-r--r--sys/net/if_vlan.c124
-rw-r--r--sys/net/if_vlan_var.h10
-rw-r--r--sys/net/route.c21
-rw-r--r--sys/net/rtsock.c37
-rw-r--r--sys/net80211/ieee80211.c16
-rw-r--r--sys/net80211/ieee80211_acl.c6
-rw-r--r--sys/net80211/ieee80211_hostap.c12
-rw-r--r--sys/net80211/ieee80211_ht.c9
-rw-r--r--sys/net80211/ieee80211_hwmp.c209
-rw-r--r--sys/net80211/ieee80211_ioctl.c15
-rw-r--r--sys/net80211/ieee80211_mesh.c5
-rw-r--r--sys/net80211/ieee80211_output.c2
-rw-r--r--sys/net80211/ieee80211_proto.h2
-rw-r--r--sys/net80211/ieee80211_radiotap.c4
-rw-r--r--sys/net80211/ieee80211_radiotap.h2
-rw-r--r--sys/net80211/ieee80211_tdma.c4
-rw-r--r--sys/net80211/ieee80211_var.h11
-rw-r--r--sys/netatalk/aarp.c6
-rw-r--r--sys/netatalk/at_control.c8
-rw-r--r--sys/netgraph/ng_base.c303
-rw-r--r--sys/netgraph/ng_ipfw.c2
-rw-r--r--sys/netgraph/ng_ksocket.c6
-rw-r--r--sys/netgraph/ng_socket.c200
-rw-r--r--sys/netgraph/ng_socketvar.h14
-rw-r--r--sys/netgraph/ng_tag.c5
-rw-r--r--sys/netinet/if_ether.c75
-rw-r--r--sys/netinet/if_ether.h3
-rw-r--r--sys/netinet/igmp.c47
-rw-r--r--sys/netinet/in.c208
-rw-r--r--sys/netinet/in_mcast.c58
-rw-r--r--sys/netinet/in_pcb.c43
-rw-r--r--sys/netinet/in_proto.c20
-rw-r--r--sys/netinet/in_var.h8
-rw-r--r--sys/netinet/ip_carp.c2452
-rw-r--r--sys/netinet/ip_carp.h54
-rw-r--r--sys/netinet/ip_divert.c6
-rw-r--r--sys/netinet/ip_gre.c2
-rw-r--r--sys/netinet/ip_icmp.c20
-rw-r--r--sys/netinet/ip_input.c8
-rw-r--r--sys/netinet/ip_ipsec.c2
-rw-r--r--sys/netinet/ip_var.h1
-rw-r--r--sys/netinet/ipfw/ip_fw2.c2
-rw-r--r--sys/netinet/raw_ip.c2
-rw-r--r--sys/netinet/sctp.h4
-rw-r--r--sys/netinet/sctp_asconf.c108
-rw-r--r--sys/netinet/sctp_asconf.h4
-rw-r--r--sys/netinet/sctp_auth.c8
-rw-r--r--sys/netinet/sctp_auth.h4
-rw-r--r--sys/netinet/sctp_bsd_addr.c12
-rw-r--r--sys/netinet/sctp_bsd_addr.h4
-rw-r--r--sys/netinet/sctp_cc_functions.c85
-rw-r--r--sys/netinet/sctp_constants.h25
-rw-r--r--sys/netinet/sctp_crc32.h4
-rw-r--r--sys/netinet/sctp_dtrace_declare.h4
-rw-r--r--sys/netinet/sctp_dtrace_define.h4
-rw-r--r--sys/netinet/sctp_header.h4
-rw-r--r--sys/netinet/sctp_indata.c87
-rw-r--r--sys/netinet/sctp_indata.h11
-rw-r--r--sys/netinet/sctp_input.c315
-rw-r--r--sys/netinet/sctp_input.h4
-rw-r--r--sys/netinet/sctp_os.h4
-rw-r--r--sys/netinet/sctp_output.c206
-rw-r--r--sys/netinet/sctp_output.h6
-rw-r--r--sys/netinet/sctp_pcb.c62
-rw-r--r--sys/netinet/sctp_pcb.h12
-rw-r--r--sys/netinet/sctp_peeloff.c4
-rw-r--r--sys/netinet/sctp_peeloff.h4
-rw-r--r--sys/netinet/sctp_ss_functions.c70
-rw-r--r--sys/netinet/sctp_structs.h4
-rw-r--r--sys/netinet/sctp_sysctl.c38
-rw-r--r--sys/netinet/sctp_sysctl.h17
-rw-r--r--sys/netinet/sctp_timer.c55
-rw-r--r--sys/netinet/sctp_timer.h4
-rw-r--r--sys/netinet/sctp_uio.h4
-rw-r--r--sys/netinet/sctp_usrreq.c85
-rw-r--r--sys/netinet/sctp_var.h19
-rw-r--r--sys/netinet/sctputil.c166
-rw-r--r--sys/netinet/sctputil.h11
-rw-r--r--sys/netinet/tcp_input.c3
-rw-r--r--sys/netinet/tcp_timewait.c8
-rw-r--r--sys/netinet/tcp_usrreq.c4
-rw-r--r--sys/netinet6/icmp6.c15
-rw-r--r--sys/netinet6/in6.c105
-rw-r--r--sys/netinet6/in6_ifattach.c48
-rw-r--r--sys/netinet6/in6_mcast.c14
-rw-r--r--sys/netinet6/in6_proto.c6
-rw-r--r--sys/netinet6/in6_var.h21
-rw-r--r--sys/netinet6/ip6_input.c4
-rw-r--r--sys/netinet6/ip6_ipsec.c2
-rw-r--r--sys/netinet6/ip6_mroute.c2
-rw-r--r--sys/netinet6/mld6.c101
-rw-r--r--sys/netinet6/nd6.c93
-rw-r--r--sys/netinet6/nd6.h6
-rw-r--r--sys/netinet6/nd6_nbr.c14
-rw-r--r--sys/netinet6/nd6_rtr.c69
-rw-r--r--sys/netinet6/scope6_var.h1
-rw-r--r--sys/netinet6/sctp6_usrreq.c111
-rw-r--r--sys/netinet6/sctp6_var.h5
-rw-r--r--sys/netipsec/xform_ipip.c2
-rw-r--r--sys/netipx/ipx.c8
-rw-r--r--sys/nfs/bootp_subr.c413
-rw-r--r--sys/nfsclient/nfs_krpc.c62
-rw-r--r--sys/nfsclient/nfs_subs.c8
-rw-r--r--sys/nfsclient/nfs_vfsops.c41
-rw-r--r--sys/nfsclient/nfs_vnops.c124
-rw-r--r--sys/nfsclient/nfsm_subs.h13
-rw-r--r--sys/nfsclient/nfsmount.h5
-rw-r--r--sys/nfsclient/nfsnode.h3
-rw-r--r--sys/nfsserver/nfs_serv.c7
-rw-r--r--sys/ofed/drivers/infiniband/core/local_sa.c2
-rw-r--r--sys/ofed/drivers/infiniband/core/notice.c2
-rw-r--r--sys/ofed/include/asm/types.h8
-rw-r--r--sys/ofed/include/linux/types.h2
-rw-r--r--sys/pc98/cbus/scterm-sck.c4
-rw-r--r--sys/pc98/cbus/scvtb.c2
-rw-r--r--sys/pc98/cbus/sio.c12
-rw-r--r--sys/pc98/conf/GENERIC6
-rw-r--r--sys/pc98/pc98/machdep.c5
-rw-r--r--sys/powerpc/aim/locore32.S11
-rw-r--r--sys/powerpc/aim/locore64.S4
-rw-r--r--sys/powerpc/aim/machdep.c6
-rw-r--r--sys/powerpc/aim/mmu_oea.c127
-rw-r--r--sys/powerpc/aim/mmu_oea64.c28
-rw-r--r--sys/powerpc/aim/slb.c18
-rw-r--r--sys/powerpc/aim/swtch64.S9
-rw-r--r--sys/powerpc/aim/trap.c99
-rw-r--r--sys/powerpc/aim/trap_subr64.S181
-rw-r--r--sys/powerpc/aim/uma_machdep.c3
-rw-r--r--sys/powerpc/conf/GENERIC6
-rw-r--r--sys/powerpc/conf/GENERIC644
-rw-r--r--sys/powerpc/include/_stdint.h14
-rw-r--r--sys/powerpc/include/_types.h4
-rw-r--r--sys/powerpc/include/asm.h24
-rw-r--r--sys/powerpc/include/float.h25
-rw-r--r--sys/powerpc/include/pcpu.h4
-rw-r--r--sys/powerpc/include/pmap.h36
-rw-r--r--sys/powerpc/include/pmc_mdep.h6
-rw-r--r--sys/powerpc/include/profile.h1
-rw-r--r--sys/powerpc/include/spr.h12
-rw-r--r--sys/powerpc/include/vmparam.h19
-rw-r--r--sys/powerpc/mambo/mambo_console.c12
-rw-r--r--sys/powerpc/ofw/ofw_machdep.c4
-rw-r--r--sys/powerpc/ofw/ofwcall64.S4
-rw-r--r--sys/powerpc/powermac/macio.c2
-rw-r--r--sys/powerpc/powermac/windtunnel.c44
-rw-r--r--sys/powerpc/powerpc/atomic.S16
-rw-r--r--sys/powerpc/powerpc/busdma_machdep.c3
-rw-r--r--sys/powerpc/powerpc/genassym.c3
-rw-r--r--sys/powerpc/powerpc/setjmp.S4
-rw-r--r--sys/powerpc/ps3/ehci_ps3.c9
-rw-r--r--sys/powerpc/ps3/ohci_ps3.c9
-rw-r--r--sys/powerpc/ps3/platform_ps3.c10
-rw-r--r--sys/powerpc/ps3/ps3-hv-asm.awk1
-rw-r--r--sys/powerpc/ps3/ps3-hvcall.S26
-rw-r--r--sys/powerpc/ps3/ps3-hvcall.h3
-rw-r--r--sys/powerpc/ps3/ps3-hvcall.master3
-rw-r--r--sys/powerpc/ps3/ps3_syscons.c25
-rw-r--r--sys/powerpc/ps3/ps3pic.c14
-rw-r--r--sys/security/mac/mac_framework.c2
-rw-r--r--sys/security/mac_lomac/mac_lomac.c10
-rw-r--r--sys/sparc64/conf/GENERIC3
-rw-r--r--sys/sparc64/include/_types.h2
-rw-r--r--sys/sparc64/include/float.h15
-rw-r--r--sys/sparc64/sparc64/vm_machdep.c3
-rw-r--r--sys/sys/_kstack_cache.h43
-rw-r--r--sys/sys/_null.h4
-rw-r--r--sys/sys/ata.h2
-rw-r--r--sys/sys/cdefs.h75
-rw-r--r--sys/sys/cdrio.h2
-rw-r--r--sys/sys/cons.h16
-rw-r--r--sys/sys/consio.h2
-rw-r--r--sys/sys/copyright.h4
-rw-r--r--sys/sys/diskmbr.h1
-rw-r--r--sys/sys/dvdio.h2
-rw-r--r--sys/sys/elf_common.h5
-rw-r--r--sys/sys/imgact_elf.h2
-rw-r--r--sys/sys/libkern.h22
-rw-r--r--sys/sys/mbuf.h57
-rw-r--r--sys/sys/mdioctl.h2
-rw-r--r--sys/sys/mman.h5
-rw-r--r--sys/sys/mount.h7
-rw-r--r--sys/sys/mutex.h3
-rw-r--r--sys/sys/namei.h2
-rw-r--r--sys/sys/param.h2
-rw-r--r--sys/sys/pmc.h10
-rw-r--r--sys/sys/proc.h20
-rw-r--r--sys/sys/resourcevar.h2
-rw-r--r--sys/sys/sockio.h4
-rw-r--r--sys/sys/stdint.h7
-rw-r--r--sys/sys/systm.h15
-rw-r--r--sys/sys/taskqueue.h6
-rw-r--r--sys/sys/timeffc.h80
-rw-r--r--sys/sys/types.h12
-rw-r--r--sys/sys/ucontext.h6
-rw-r--r--sys/sys/vnode.h16
-rw-r--r--sys/ufs/ffs/ffs_alloc.c20
-rw-r--r--sys/ufs/ffs/ffs_snapshot.c10
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c130
-rw-r--r--sys/ufs/ufs/ufs_dirhash.c7
-rw-r--r--sys/ufs/ufs/ufs_quota.c21
-rw-r--r--sys/vm/swap_pager.c2
-rw-r--r--sys/vm/vm_glue.c9
-rw-r--r--sys/vm/vm_meter.c174
-rw-r--r--sys/vm/vm_object.c52
-rw-r--r--sys/vm/vm_object.h2
-rw-r--r--sys/vm/vm_pageout.c7
-rw-r--r--sys/x86/acpica/srat.c17
-rw-r--r--sys/xen/xenstore/xenstore.c2
-rw-r--r--tools/KSE/ksetest/kse_threads_test.c2
-rw-r--r--tools/bsdbox/Makefile115
-rw-r--r--tools/bsdbox/Makefile.base55
-rw-r--r--tools/bsdbox/Makefile.fs17
-rw-r--r--tools/bsdbox/Makefile.hostapd15
-rw-r--r--tools/bsdbox/Makefile.kld6
-rw-r--r--tools/bsdbox/Makefile.login9
-rw-r--r--tools/bsdbox/Makefile.net32
-rw-r--r--tools/bsdbox/Makefile.telnetd14
-rw-r--r--tools/bsdbox/Makefile.textproc20
-rw-r--r--tools/bsdbox/README12
-rw-r--r--tools/build/mk/OptionalObsoleteFiles.inc35
-rw-r--r--tools/build/options/WITHOUT_CAPSICUM2
-rw-r--r--tools/build/options/WITHOUT_UTMPX1
-rw-r--r--tools/debugscripts/gdbinit.i3862
-rw-r--r--tools/debugscripts/kld_deb.py6
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_aac22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_acpi_support22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_acpica22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_adb22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_adlink22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_advansys22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_ae22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_age22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_agp22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_aha22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_ahb22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_ahci22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_aic22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_aic7xxx22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_alc22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_ale22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_amdsbwd22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_amdtemp22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_amr22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_an22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_arcmsr22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_asmc22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_asr22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_ata22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_ath22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_atkbdc22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_auxio22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_bce22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_bfe22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_bge22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_bktr22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_bm22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_buslogic22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_bwi22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_bwn22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_bxe22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_cardbus22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_cas22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_ce22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_cesa22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_cfe22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_cfi22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_ciss22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_cm22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_cmx22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_coretemp22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_cp22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_cpuctl22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_cpufreq22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_cs22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_ct22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_ctau22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_cx22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_cxgb22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_cxgbe22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_cy22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_dc22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_dcons22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_de22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_digi22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_dpms22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_dpt22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_drm22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_e100022
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_ed22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_eisa22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_en22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_ep22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_esp22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_et22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_ex22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_exca22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_fatm22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_fb22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_fdc22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_fdt22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_fe22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_firewire22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_flash22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_fxp22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_gem22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_glxiic22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_glxsb22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_gpio22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_hatm22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_hifn22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_hme22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_hpt27xx22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_hptiop22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_hptmv22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_hptrr22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_hwpmc22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_ic22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_ichsmb22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_ichwd22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_ida22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_ie22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_ieee48822
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_if_ndis22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_iicbus22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_iir22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_io22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_ipmi22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_ips22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_ipw22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_iscsi22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_isp22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_ispfw22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_iwi22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_iwn22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_ixgb22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_ixgbe22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_jme22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_joy22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_kbd22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_kbdmux22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_ksyms22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_le22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_led22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_lge22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_lindev22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_lmc22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_malo22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_mc14681822
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_mca22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_mcd22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_md22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_mem22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_mfi22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_mge22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_mii22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_mk48txx22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_mlx22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_mly22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_mmc22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_mn22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_mps22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_mpt22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_mse22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_msk22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_mvs22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_mwl22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_mxge22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_my22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_ncv22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_netmap22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_nfe22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_nge22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_nmdm22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_nsp22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_null22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_nve22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_nvram22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_nvram2env22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_nxge22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_ofw22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_patm22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_pbio22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_pccard22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_pccbb22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_pcf22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_pcn22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_pdq22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_powermac_nvram22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_ppbus22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_ppc22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_pst22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_pty22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_puc22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_qlxgb22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_quicc22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_ral22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_random22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_rc22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_re22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_rndtest22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_rp22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_rt22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_safe22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_sbni22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_scc22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_scd22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_sdhci22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_sec22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_sf22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_sfxge22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_sge22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_si22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_siba22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_siis22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_sio22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_sis22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_sk22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_smbus22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_smc22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_sn22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_snc22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_snp22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_speaker22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_spibus22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_ste22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_stg22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_stge22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_streams22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_sym22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_syscons22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_tdfx22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_ti22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_tl22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_tpm22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_trm22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_tsec22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_twa22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_twe22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_tws22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_tx22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_txp22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_uart22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_ubsec22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_utopia22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_vge22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_viawd22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_virtio22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_vkbd22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_vr22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_vte22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_vx22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_vxge22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_watchdog22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_wb22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_wds22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_wi22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_wl22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_wpi22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_wtap22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_xe22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_xen22
-rw-r--r--tools/kerneldoc/subsys/Doxyfile-dev_xl22
-rw-r--r--tools/kerneldoc/subsys/common-Doxyfile6
-rw-r--r--tools/regression/README2
-rw-r--r--tools/regression/bin/sh/builtins/case13.012
-rw-r--r--tools/regression/bin/sh/builtins/case14.05
-rw-r--r--tools/regression/bin/sh/builtins/case15.05
-rw-r--r--tools/regression/bin/sh/builtins/case16.07
-rw-r--r--tools/regression/bin/sh/builtins/case17.03
-rw-r--r--tools/regression/bin/sh/builtins/case18.07
-rw-r--r--tools/regression/bin/sh/builtins/case19.07
-rw-r--r--tools/regression/bin/sh/builtins/cd1.02
-rw-r--r--tools/regression/bin/sh/builtins/cd8.026
-rw-r--r--tools/regression/bin/sh/builtins/for2.09
-rw-r--r--tools/regression/bin/sh/builtins/for3.08
-rw-r--r--tools/regression/bin/sh/builtins/getopts1.06
-rw-r--r--tools/regression/bin/sh/builtins/trap10.06
-rw-r--r--tools/regression/bin/sh/builtins/trap11.08
-rw-r--r--tools/regression/bin/sh/builtins/trap9.03
-rw-r--r--tools/regression/bin/sh/expansion/cmdsubst12.06
-rw-r--r--tools/regression/bin/sh/expansion/cmdsubst13.012
-rw-r--r--tools/regression/bin/sh/parameters/positional2.065
-rw-r--r--tools/regression/fifo/fifo_io/fifo_io.c2
-rw-r--r--tools/regression/file/dup/dup.c2
-rw-r--r--tools/regression/kthread/kld/kthrdlk.c2
-rw-r--r--tools/regression/lib/libc/nss/README2
-rw-r--r--tools/regression/lib/libc/stdio/test-getdelim.t10
-rw-r--r--tools/regression/lib/libc/stdio/test-print-positional.t10
-rw-r--r--tools/regression/lib/libc/stdio/test-printbasic.t10
-rw-r--r--tools/regression/lib/libc/stdio/test-printfloat.c6
-rw-r--r--tools/regression/lib/msun/test-next.c2
-rw-r--r--tools/regression/msdosfs/msdosfstest-3.sh6
-rw-r--r--tools/regression/msdosfs/msdosfstest-4.sh8
-rw-r--r--tools/regression/msdosfs/msdosfstest-5.sh12
-rw-r--r--tools/regression/msdosfs/msdosfstest-6.sh9
-rw-r--r--tools/regression/nfsmmap/Makefile2
-rw-r--r--tools/regression/nfsmmap/README3
-rw-r--r--tools/regression/pipe/pipe-reverse2.c67
-rw-r--r--tools/regression/pjdfstest/tests/chown/00.t2
-rw-r--r--tools/regression/priv/priv_cred.c2
-rw-r--r--tools/regression/pthread/mutex_isowned_np/mutex_isowned_np.c2
-rw-r--r--tools/regression/sbin/dhclient/fake.c6
-rw-r--r--tools/regression/sbin/mdconfig/00.t47
-rw-r--r--tools/regression/sbin/mdconfig/mdconfig.test192
-rwxr-xr-xtools/regression/sbin/mdconfig/run329
-rw-r--r--tools/regression/security/open_to_operation/open_to_operation.c4
-rw-r--r--tools/regression/usr.bin/cc/Makefile12
-rw-r--r--tools/regression/usr.bin/cc/float.c271
-rw-r--r--tools/regression/usr.bin/cc/float.t10
-rw-r--r--tools/regression/usr.bin/env/regress-sb.rb2
-rw-r--r--tools/regression/usr.bin/make/README2
-rw-r--r--tools/regression/usr.bin/make/execution/joberr/Makefile10
-rw-r--r--tools/regression/usr.bin/make/execution/joberr/expected.status.11
-rw-r--r--tools/regression/usr.bin/make/execution/joberr/expected.stderr.130
-rw-r--r--tools/regression/usr.bin/make/execution/joberr/expected.stdout.190
-rw-r--r--tools/regression/usr.bin/make/execution/joberr/test.t15
-rw-r--r--tools/regression/usr.bin/make/variables/modifier_M/Makefile2
-rw-r--r--tools/regression/usr.bin/make/variables/modifier_M/expected.stdout.12
-rw-r--r--tools/regression/usr.bin/sed/math.sed2
-rwxr-xr-xtools/regression/usr.sbin/newsyslog/regress.sh4
-rw-r--r--tools/test/posixshm/shm_test.c2
-rw-r--r--tools/test/testfloat/systemBugs.txt2
-rw-r--r--tools/test/testfloat/testfloat-source.txt4
-rw-r--r--tools/test/testfloat/testfloat.txt4
-rw-r--r--tools/tools/ansify/ansify.pl2
-rw-r--r--tools/tools/ath/Makefile4
-rw-r--r--tools/tools/bus_autoconf/bus_autoconf.c2
-rwxr-xr-xtools/tools/cd2dvd/cd2dvd.sh2
-rw-r--r--tools/tools/cxgbetool/cxgbetool.c239
-rwxr-xr-xtools/tools/genericize/genericize.pl2
-rw-r--r--tools/tools/hcomp/hcomp.pl2
-rw-r--r--tools/tools/mtxstat/mtxstat.pl2
-rw-r--r--tools/tools/nanobsd/pcengines/Files/root/.cshrc2
-rw-r--r--tools/tools/net80211/wesside/wesside/wesside.c2
-rw-r--r--tools/tools/net80211/wlaninject/README2
-rw-r--r--tools/tools/netmap/bridge.c2
-rw-r--r--tools/tools/netmap/pkt-gen.c10
-rw-r--r--tools/tools/netrate/netreceive/netreceive.c2
-rw-r--r--tools/tools/netrate/tcpp/tcpp_client.c2
-rw-r--r--tools/tools/prstats/prstats.pl2
-rw-r--r--tools/tools/sysbuild/README2
-rw-r--r--tools/tools/tinybsd/README2
-rw-r--r--tools/tools/whereintheworld/whereintheworld.pl2
-rw-r--r--tools/tools/wtap/Makefile5
-rw-r--r--tools/tools/wtap/vis_map/Makefile9
-rw-r--r--tools/tools/wtap/vis_map/vis_map.c117
-rw-r--r--tools/tools/wtap/wtap/Makefile9
-rw-r--r--tools/tools/wtap/wtap/wtap.c82
-rw-r--r--usr.bin/Makefile5
-rw-r--r--usr.bin/ar/ar.110
-rw-r--r--usr.bin/bc/bc.12
-rw-r--r--usr.bin/brandelf/brandelf.c6
-rw-r--r--usr.bin/bsdiff/bsdiff/bsdiff.c2
-rw-r--r--usr.bin/calendar/calendars/calendar.birthday2
-rw-r--r--usr.bin/calendar/calendars/calendar.freebsd3
-rw-r--r--usr.bin/calendar/calendars/calendar.history2
-rw-r--r--usr.bin/calendar/calendars/calendar.music2
-rw-r--r--usr.bin/cksum/cksum.c2
-rw-r--r--usr.bin/compress/compress.c6
-rw-r--r--usr.bin/cpio/Makefile18
-rw-r--r--usr.bin/cpio/test/Makefile23
-rw-r--r--usr.bin/cpio/test/test_gcpio_compat_ref_nosym.bin.uu17
-rw-r--r--usr.bin/cpio/test/test_gcpio_compat_ref_nosym.crc.uu17
-rw-r--r--usr.bin/cpio/test/test_gcpio_compat_ref_nosym.newc.uu17
-rw-r--r--usr.bin/cpio/test/test_gcpio_compat_ref_nosym.ustar.uu74
-rw-r--r--usr.bin/cpio/test/test_option_c.c221
-rw-r--r--usr.bin/csup/Makefile4
-rw-r--r--usr.bin/csup/auth.c8
-rw-r--r--usr.bin/csup/fixups.c2
-rw-r--r--usr.bin/csup/misc.c1
-rw-r--r--usr.bin/csup/misc.h12
-rw-r--r--usr.bin/csup/mux.c2
-rw-r--r--usr.bin/csup/proto.c3
-rw-r--r--usr.bin/csup/rcsfile.c4
-rw-r--r--usr.bin/ctlstat/Makefile8
-rw-r--r--usr.bin/ctlstat/ctlstat.8122
-rw-r--r--usr.bin/ctlstat/ctlstat.c730
-rw-r--r--usr.bin/du/du.19
-rw-r--r--usr.bin/du/du.c28
-rw-r--r--usr.bin/fetch/fetch.c19
-rw-r--r--usr.bin/find/main.c2
-rw-r--r--usr.bin/finger/finger.c6
-rw-r--r--usr.bin/fstat/fstat.c2
-rw-r--r--usr.bin/gprof/aout.c4
-rw-r--r--usr.bin/gprof/arcs.c6
-rw-r--r--usr.bin/grep/grep.c3
-rw-r--r--usr.bin/hexdump/conv.c4
-rw-r--r--usr.bin/hexdump/display.c2
-rw-r--r--usr.bin/hexdump/hexdump.c2
-rw-r--r--usr.bin/hexdump/hexsyntax.c2
-rw-r--r--usr.bin/hexdump/od.114
-rw-r--r--usr.bin/hexdump/parse.c39
-rw-r--r--usr.bin/indent/indent.c8
-rw-r--r--usr.bin/indent/io.c6
-rw-r--r--usr.bin/ipcs/ipc.c2
-rw-r--r--usr.bin/ipcs/ipc.h2
-rw-r--r--usr.bin/last/last.11
-rw-r--r--usr.bin/last/last.c10
-rw-r--r--usr.bin/lex/NEWS6
-rw-r--r--usr.bin/lex/flexdef.h2
-rw-r--r--usr.bin/lex/main.c2
-rw-r--r--usr.bin/lex/tblcmp.c2
-rw-r--r--usr.bin/limits/limits.17
-rw-r--r--usr.bin/limits/limits.c93
-rw-r--r--usr.bin/locate/locate/fastfind.c2
-rw-r--r--usr.bin/locate/locate/locate.c2
-rw-r--r--usr.bin/locate/locate/util.c20
-rw-r--r--usr.bin/login/login_fbtab.c2
-rw-r--r--usr.bin/logins/logins.12
-rw-r--r--usr.bin/logins/logins.c2
-rw-r--r--usr.bin/m4/Makefile2
-rw-r--r--usr.bin/m4/eval.c11
-rw-r--r--usr.bin/m4/parser.y3
-rw-r--r--usr.bin/m4/tokenizer.l1
-rw-r--r--usr.bin/mail/cmd1.c2
-rw-r--r--usr.bin/mail/edit.c2
-rw-r--r--usr.bin/mail/extern.h2
-rw-r--r--usr.bin/mail/head.c2
-rw-r--r--usr.bin/mail/lex.c2
-rw-r--r--usr.bin/mail/main.c4
-rw-r--r--usr.bin/mail/util.c2
-rw-r--r--usr.bin/make/GNode.h2
-rw-r--r--usr.bin/make/arch.c10
-rw-r--r--usr.bin/make/buf.c2
-rw-r--r--usr.bin/make/for.c2
-rw-r--r--usr.bin/make/job.c2
-rw-r--r--usr.bin/make/main.c29
-rw-r--r--usr.bin/make/str.c4
-rw-r--r--usr.bin/make/var.c2
-rwxr-xr-xusr.bin/man/man.sh2
-rw-r--r--usr.bin/mkesdb/Makefile.inc3
-rw-r--r--usr.bin/mkulzma/Makefile8
-rw-r--r--usr.bin/mkulzma/mkulzma.8107
-rw-r--r--usr.bin/mkulzma/mkulzma.c330
-rw-r--r--usr.bin/mt/mt.c2
-rw-r--r--usr.bin/ncplist/Makefile1
-rw-r--r--usr.bin/ncplist/ncplist.c7
-rw-r--r--usr.bin/ncplogin/ncplogin.c4
-rw-r--r--usr.bin/netstat/Makefile5
-rw-r--r--usr.bin/netstat/if.c4
-rw-r--r--usr.bin/netstat/inet.c2
-rw-r--r--usr.bin/netstat/inet6.c26
-rw-r--r--usr.bin/netstat/ipx.c2
-rw-r--r--usr.bin/netstat/netgraph.c10
-rw-r--r--usr.bin/netstat/sctp.c9
-rw-r--r--usr.bin/newgrp/newgrp.c10
-rw-r--r--usr.bin/pr/pr.c6
-rw-r--r--usr.bin/printf/printf.c36
-rw-r--r--usr.bin/procstat/procstat_auxv.c103
-rw-r--r--usr.bin/procstat/procstat_rlimit.c85
-rw-r--r--usr.bin/rctl/rctl.854
-rw-r--r--usr.bin/rlogin/rlogin.c2
-rw-r--r--usr.bin/rpcgen/rpc_main.c8
-rw-r--r--usr.bin/rpcgen/rpc_svcout.c2
-rw-r--r--usr.bin/rpcinfo/rpcinfo.c2
-rw-r--r--usr.bin/sockstat/sockstat.128
-rw-r--r--usr.bin/sockstat/sockstat.c120
-rw-r--r--usr.bin/split/split.c3
-rw-r--r--usr.bin/systat/devs.c2
-rw-r--r--usr.bin/systat/icmp6.c4
-rw-r--r--usr.bin/systat/netcmds.c2
-rw-r--r--usr.bin/systat/netstat.c4
-rw-r--r--usr.bin/talk/ctl_transact.c2
-rw-r--r--usr.bin/talk/get_names.c3
-rw-r--r--usr.bin/talk/invite.c4
-rw-r--r--usr.bin/tar/COPYING62
-rw-r--r--usr.bin/tar/Makefile21
-rw-r--r--usr.bin/tar/bsdtar.c756
-rw-r--r--usr.bin/tar/bsdtar.h164
-rw-r--r--usr.bin/tar/test/Makefile23
-rw-r--r--usr.bin/tar/test/test_option_s.c107
-rw-r--r--usr.bin/tar/test/test_patterns_2.tar.uu233
-rw-r--r--usr.bin/tar/test/test_patterns_3.tar.uu233
-rw-r--r--usr.bin/tar/test/test_patterns_4.tar.uu643
-rw-r--r--usr.bin/tar/tree.c602
-rw-r--r--usr.bin/tar/write.c1177
-rw-r--r--usr.bin/tftp/main.c16
-rw-r--r--usr.bin/tip/tip/tip.h4
-rw-r--r--usr.bin/top/machine.c2
-rw-r--r--usr.bin/tr/str.c2
-rw-r--r--usr.bin/truss/amd64-linux32.c2
-rw-r--r--usr.bin/truss/i386-linux.c2
-rw-r--r--usr.bin/truss/main.c2
-rw-r--r--usr.bin/truss/syscalls.c4
-rw-r--r--usr.bin/tset/map.c2
-rw-r--r--usr.bin/tset/term.c4
-rw-r--r--usr.bin/tset/wrterm.c2
-rw-r--r--usr.bin/unzip/unzip.12
-rw-r--r--usr.bin/unzip/unzip.c4
-rw-r--r--usr.bin/vacation/Makefile7
-rw-r--r--usr.bin/vgrind/extern.h2
-rw-r--r--usr.bin/vgrind/vfontedpr.c2
-rw-r--r--usr.bin/vmstat/vmstat.c18
-rw-r--r--usr.bin/whereis/pathnames.h2
-rw-r--r--usr.bin/whereis/whereis.c2
-rw-r--r--usr.bin/wtmpcvt/Makefile5
-rw-r--r--usr.bin/wtmpcvt/wtmpcvt.166
-rw-r--r--usr.bin/wtmpcvt/wtmpcvt.c138
-rw-r--r--usr.bin/xlint/lint1/decl.c12
-rw-r--r--usr.bin/xlint/lint1/emit1.c2
-rw-r--r--usr.bin/xlint/lint1/func.c14
-rw-r--r--usr.bin/xlint/lint1/mem1.c2
-rw-r--r--usr.bin/xlint/lint2/chk.c12
-rw-r--r--usr.bin/xlint/lint2/read.c2
-rw-r--r--usr.bin/xlint/xlint/xlint.c2
-rw-r--r--usr.bin/yacc/NEW_FEATURES4
-rw-r--r--usr.bin/yacc/reader.c2
-rw-r--r--usr.sbin/IPXrouted/sap_input.c2
-rw-r--r--usr.sbin/IPXrouted/sap_tables.c2
-rw-r--r--usr.sbin/Makefile1
-rw-r--r--usr.sbin/acpi/acpiconf/acpiconf.82
-rw-r--r--usr.sbin/acpi/acpidb/Makefile14
-rw-r--r--usr.sbin/acpi/iasl/Makefile16
-rw-r--r--usr.sbin/adduser/adduser.sh4
-rw-r--r--usr.sbin/bluetooth/btpand/event.h2
-rw-r--r--usr.sbin/bluetooth/hccontrol/host_controller_baseband.c8
-rw-r--r--usr.sbin/bluetooth/sdpd/server.c4
-rw-r--r--usr.sbin/boot0cfg/Makefile2
-rw-r--r--usr.sbin/boot0cfg/boot0cfg.83
-rw-r--r--usr.sbin/boot0cfg/boot0cfg.c9
-rw-r--r--usr.sbin/bootparamd/bootparamd/README16
-rw-r--r--usr.sbin/bootparamd/bootparamd/bootparamd.c4
-rw-r--r--usr.sbin/bootparamd/callbootd/callbootd.c5
-rw-r--r--usr.sbin/bsdinstall/partedit/partedit.c26
-rw-r--r--usr.sbin/bsdinstall/partedit/partedit_powerpc.c4
-rw-r--r--usr.sbin/bsnmpd/modules/snmp_bridge/bridge_addrs.c4
-rw-r--r--usr.sbin/bsnmpd/modules/snmp_bridge/bridge_if.c2
-rw-r--r--usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c4
-rw-r--r--usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c4
-rw-r--r--usr.sbin/bsnmpd/modules/snmp_hostres/hostres_device_tbl.c2
-rw-r--r--usr.sbin/bsnmpd/modules/snmp_hostres/hostres_scalars.c4
-rw-r--r--usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.h2
-rw-r--r--usr.sbin/bsnmpd/modules/snmp_hostres/hostres_storage_tbl.c2
-rw-r--r--usr.sbin/bsnmpd/modules/snmp_wlan/BEGEMOT-WIRELESS-MIB.txt42
-rw-r--r--usr.sbin/bsnmpd/modules/snmp_wlan/wlan_snmp.h4
-rw-r--r--usr.sbin/bsnmpd/modules/snmp_wlan/wlan_tree.def4
-rw-r--r--usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.125
-rw-r--r--usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.c60
-rw-r--r--usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.c2
-rwxr-xr-xusr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c35
-rw-r--r--usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.h10
-rw-r--r--usr.sbin/burncd/burncd.82
-rw-r--r--usr.sbin/burncd/burncd.c2
-rw-r--r--usr.sbin/chkgrp/chkgrp.82
-rw-r--r--usr.sbin/chkgrp/chkgrp.c2
-rw-r--r--usr.sbin/config/main.c2
-rw-r--r--usr.sbin/config/mkmakefile.c22
-rw-r--r--usr.sbin/cpucontrol/Makefile4
-rw-r--r--usr.sbin/cpucontrol/cpucontrol.c2
-rw-r--r--usr.sbin/cpucontrol/via.c221
-rw-r--r--usr.sbin/cpucontrol/via.h63
-rw-r--r--usr.sbin/cron/cron/do_command.c2
-rw-r--r--usr.sbin/cron/doc/CHANGES7
-rw-r--r--usr.sbin/cron/doc/MAIL2
-rw-r--r--usr.sbin/cron/lib/entry.c2
-rw-r--r--usr.sbin/ctladm/Makefile21
-rw-r--r--usr.sbin/ctladm/ctladm.8963
-rw-r--r--usr.sbin/ctladm/ctladm.c4005
-rw-r--r--usr.sbin/ctladm/ctladm.h50
-rw-r--r--usr.sbin/ctladm/util.c156
-rw-r--r--usr.sbin/ctm/ctm_dequeue/ctm_dequeue.c2
-rw-r--r--usr.sbin/daemon/daemon.84
-rw-r--r--usr.sbin/edquota/edquota.c2
-rw-r--r--usr.sbin/faithd/prefix.c4
-rw-r--r--usr.sbin/fwcontrol/fwcontrol.c5
-rw-r--r--usr.sbin/fwcontrol/fwmpegts.c2
-rw-r--r--usr.sbin/i2c/i2c.c7
-rw-r--r--usr.sbin/ifmcstat/ifmcstat.c2
-rw-r--r--usr.sbin/inetd/builtins.c2
-rw-r--r--usr.sbin/inetd/inetd.c4
-rw-r--r--usr.sbin/iostat/iostat.c17
-rw-r--r--usr.sbin/ipfwpcap/ipfwpcap.c2
-rw-r--r--usr.sbin/jail/jail.c10
-rw-r--r--usr.sbin/kbdcontrol/kbdcontrol.c129
-rw-r--r--usr.sbin/kbdcontrol/lex.h2
-rw-r--r--usr.sbin/kbdcontrol/lex.l2
-rw-r--r--usr.sbin/kbdmap/kbdmap.c2
-rw-r--r--usr.sbin/keyserv/crypt_server.c4
-rw-r--r--usr.sbin/keyserv/keyserv.c20
-rw-r--r--usr.sbin/kgmon/kgmon.c8
-rw-r--r--usr.sbin/kldxref/kldxref.82
-rw-r--r--usr.sbin/lpr/common_source/rmjob.c8
-rw-r--r--usr.sbin/lpr/filters/lpf.c3
-rw-r--r--usr.sbin/lpr/lpc/cmds.c8
-rw-r--r--usr.sbin/lpr/lpc/lpc.c2
-rw-r--r--usr.sbin/lpr/lpd/printjob.c10
-rw-r--r--usr.sbin/lpr/pac/pac.c2
-rw-r--r--usr.sbin/makefs/cd9660.c20
-rw-r--r--usr.sbin/makefs/cd9660/cd9660_eltorito.c2
-rw-r--r--usr.sbin/makefs/cd9660/cd9660_write.c4
-rw-r--r--usr.sbin/makefs/cd9660/iso9660_rrip.c2
-rw-r--r--usr.sbin/makefs/ffs.c2
-rw-r--r--usr.sbin/makefs/ffs/ffs_extern.h5
-rw-r--r--usr.sbin/makefs/ffs/ffs_subr.c8
-rw-r--r--usr.sbin/makefs/walk.c2
-rw-r--r--usr.sbin/mlxcontrol/interface.c2
-rw-r--r--usr.sbin/mount_portalfs/cred.c2
-rw-r--r--usr.sbin/mount_portalfs/mount_portalfs.c5
-rw-r--r--usr.sbin/mount_portalfs/pt_pipe.c4
-rw-r--r--usr.sbin/mount_portalfs/pt_tcplisten.c2
-rw-r--r--usr.sbin/mountd/mountd.c7
-rw-r--r--usr.sbin/moused/moused.c7
-rw-r--r--usr.sbin/mptable/mptable.c2
-rw-r--r--usr.sbin/mptutil/mpt_config.c2
-rw-r--r--usr.sbin/mtree/spec.c4
-rw-r--r--usr.sbin/ndiscvt/Makefile1
-rw-r--r--usr.sbin/ndiscvt/inf-token.l1
-rw-r--r--usr.sbin/newsyslog/newsyslog.c29
-rw-r--r--usr.sbin/nscd/protocol.h2
-rw-r--r--usr.sbin/ntp/doc/ntp.conf.52
-rwxr-xr-xusr.sbin/pc-sysinstall/backend-partmanager/delete-part.sh2
-rwxr-xr-xusr.sbin/pc-sysinstall/backend/functions-disk.sh2
-rwxr-xr-xusr.sbin/pc-sysinstall/backend/functions-parse.sh6
-rw-r--r--usr.sbin/pciconf/pciconf.c4
-rw-r--r--usr.sbin/pkg_install/README4
-rw-r--r--usr.sbin/pkg_install/add/add.h2
-rw-r--r--usr.sbin/pkg_install/add/extract.c2
-rw-r--r--usr.sbin/pkg_install/add/futil.c2
-rw-r--r--usr.sbin/pkg_install/add/main.c4
-rw-r--r--usr.sbin/pkg_install/add/perform.c2
-rw-r--r--usr.sbin/pkg_install/add/pkg_add.12
-rw-r--r--usr.sbin/pkg_install/create/create.h2
-rw-r--r--usr.sbin/pkg_install/create/main.c2
-rw-r--r--usr.sbin/pkg_install/create/perform.c2
-rw-r--r--usr.sbin/pkg_install/create/pkg_create.12
-rw-r--r--usr.sbin/pkg_install/create/pl.c2
-rw-r--r--usr.sbin/pkg_install/delete/delete.h2
-rw-r--r--usr.sbin/pkg_install/delete/main.c2
-rw-r--r--usr.sbin/pkg_install/delete/perform.c2
-rw-r--r--usr.sbin/pkg_install/delete/pkg_delete.12
-rw-r--r--usr.sbin/pkg_install/info/info.h2
-rw-r--r--usr.sbin/pkg_install/info/main.c2
-rw-r--r--usr.sbin/pkg_install/info/perform.c2
-rw-r--r--usr.sbin/pkg_install/info/show.c2
-rw-r--r--usr.sbin/pkg_install/lib/deps.c4
-rw-r--r--usr.sbin/pkg_install/lib/exec.c2
-rw-r--r--usr.sbin/pkg_install/lib/file.c2
-rw-r--r--usr.sbin/pkg_install/lib/global.c2
-rw-r--r--usr.sbin/pkg_install/lib/lib.h2
-rw-r--r--usr.sbin/pkg_install/lib/match.c4
-rw-r--r--usr.sbin/pkg_install/lib/msg.c2
-rw-r--r--usr.sbin/pkg_install/lib/pen.c2
-rw-r--r--usr.sbin/pkg_install/lib/plist.c4
-rw-r--r--usr.sbin/pkg_install/lib/str.c2
-rw-r--r--usr.sbin/pkg_install/lib/url.c2
-rw-r--r--usr.sbin/pkg_install/updating/main.c6
-rw-r--r--usr.sbin/pkg_install/updating/pathnames.h2
-rw-r--r--usr.sbin/pkg_install/updating/pkg_updating.12
-rw-r--r--usr.sbin/pkg_install/version/main.c2
-rw-r--r--usr.sbin/pkg_install/version/perform.c2
-rw-r--r--usr.sbin/pkg_install/version/version.h2
-rw-r--r--usr.sbin/pmccontrol/pmccontrol.c4
-rw-r--r--usr.sbin/pmcstat/pmcpl_calltree.c2
-rw-r--r--usr.sbin/pmcstat/pmcpl_gprof.c2
-rw-r--r--usr.sbin/pmcstat/pmcstat.c5
-rw-r--r--usr.sbin/pmcstat/pmcstat_log.c2
-rw-r--r--usr.sbin/powerd/powerd.c2
-rw-r--r--usr.sbin/ppp/cbcp.c2
-rw-r--r--usr.sbin/ppp/chat.h4
-rw-r--r--usr.sbin/ppp/command.c10
-rw-r--r--usr.sbin/ppp/iface.c3
-rw-r--r--usr.sbin/ppp/lqr.c3
-rw-r--r--usr.sbin/ppp/mp.c4
-rw-r--r--usr.sbin/ppp/physical.c3
-rw-r--r--usr.sbin/ppp/ppp.8.m42
-rw-r--r--usr.sbin/ppp/vjcomp.c2
-rw-r--r--usr.sbin/pw/cpdir.c8
-rw-r--r--usr.sbin/pw/pw.813
-rw-r--r--usr.sbin/pw/pw_user.c2
-rw-r--r--usr.sbin/quotaon/quotaon.c6
-rw-r--r--usr.sbin/rarpd/rarpd.c3
-rw-r--r--usr.sbin/route6d/route6d.c4
-rw-r--r--usr.sbin/rpc.lockd/kern.c2
-rw-r--r--usr.sbin/rpc.lockd/lockd_lock.c8
-rw-r--r--usr.sbin/rpc.ypupdated/yp_dbupdate.c3
-rw-r--r--usr.sbin/rpcbind/check_bound.c2
-rw-r--r--usr.sbin/rpcbind/rpcbind.c4
-rw-r--r--usr.sbin/rtadvd/config.c2
-rw-r--r--usr.sbin/rtadvd/rtadvd.c4
-rw-r--r--usr.sbin/rtprio/rtprio.c42
-rw-r--r--usr.sbin/rtsold/rtsold.82
-rw-r--r--usr.sbin/rtsold/rtsold.c3
-rw-r--r--usr.sbin/rwhod/rwhod.c2
-rw-r--r--usr.sbin/sa/db.c4
-rw-r--r--usr.sbin/sade/devices.c4
-rw-r--r--usr.sbin/sade/install.c4
-rw-r--r--usr.sbin/sade/label.c18
-rw-r--r--usr.sbin/sade/variable.c12
-rw-r--r--usr.sbin/sendmail/Makefile7
-rw-r--r--usr.sbin/tcpdump/tcpdump/tcpdump.14
-rw-r--r--usr.sbin/timed/timed/CHANGES2
-rw-r--r--usr.sbin/timed/timed/correct.c4
-rw-r--r--usr.sbin/timed/timed/globals.h1
-rw-r--r--usr.sbin/timed/timed/networkdelta.c2
-rw-r--r--usr.sbin/timed/timed/readmsg.c8
-rw-r--r--usr.sbin/timed/timedc/cmds.c8
-rw-r--r--usr.sbin/timed/timedc/timedc.c2
-rw-r--r--usr.sbin/tzsetup/tzsetup.c120
-rw-r--r--usr.sbin/uhsoctl/uhsoctl.c6
-rw-r--r--usr.sbin/vidcontrol/decode.c2
-rw-r--r--usr.sbin/vidcontrol/vidcontrol.c34
-rw-r--r--usr.sbin/wpa/hostapd/driver_freebsd.c6
-rw-r--r--usr.sbin/wpa/wpa_supplicant/Makefile2
-rw-r--r--usr.sbin/yp_mkdb/yp_mkdb.c6
-rw-r--r--usr.sbin/ypserv/yp_access.c2
-rw-r--r--usr.sbin/ypserv/yp_main.c3
3409 files changed, 215142 insertions, 90327 deletions
diff --git a/COPYRIGHT b/COPYRIGHT
index 6dc5d16..8130d57 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -4,7 +4,7 @@
The compilation of software known as FreeBSD is distributed under the
following terms:
-Copyright (c) 1992-2011 The FreeBSD Project. All rights reserved.
+Copyright (c) 1992-2012 The FreeBSD Project. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
diff --git a/Makefile.inc1 b/Makefile.inc1
index c0ada42..8dc4594 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -15,6 +15,8 @@
# -DNO_WWWUPDATE do not update www in ${MAKE} update
# -DNO_CTF do not run the DTrace CTF conversion tools on built objects
# LOCAL_DIRS="list of dirs" to add additional dirs to the SUBDIR list
+# LOCAL_TOOL_DIRS="list of dirs" to add additional dirs to the build-tools
+# list
# TARGET="machine" to crossbuild world for a different machine type
# TARGET_ARCH= may be required when a TARGET supports multiple endians
@@ -104,6 +106,8 @@ CLEANDIR= clean cleandepend
CLEANDIR= cleandir
.endif
+LOCAL_TOOL_DIRS?=
+
CVS?= cvs
CVSFLAGS?= -A -P -d -I!
SVN?= svn
@@ -276,7 +280,6 @@ LIB32CPUFLAGS= -march=i686 -mmmx -msse -msse2
.else
LIB32CPUFLAGS= -march=${TARGET_CPUTYPE}
.endif
-LIB32CPUFLAGS+= -mfancy-math-387
LIB32WMAKEENV= MACHINE=i386 MACHINE_ARCH=i386 \
MACHINE_CPU="i686 mmx sse sse2" \
LD="${LD} -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32" \
@@ -884,10 +887,21 @@ distributekernel distributekernel.debug:
${CROSSENV} PATH=${TMPPATH} ${MAKE} KERNEL=${INSTKERNNAME} \
DESTDIR=${DESTDIR}/${DISTDIR}/kernel \
${.TARGET:S/distributekernel/install/}
+.for _kernel in ${BUILDKERNELS:S/${INSTALLKERNEL}//}
+ cd ${KRNLOBJDIR}/${_kernel}; \
+ ${CROSSENV} PATH=${TMPPATH} ${MAKE} \
+ KERNEL=${INSTKERNNAME}.${_kernel} \
+ DESTDIR=${DESTDIR}/${DISTDIR}/kernel.${_kernel} \
+ ${.TARGET:S/distributekernel/install/}
+.endfor
packagekernel:
- ${_+_}cd ${DESTDIR}/${DISTDIR}/kernel; \
+ cd ${DESTDIR}/${DISTDIR}/kernel; \
tar cvJf ${DESTDIR}/${DISTDIR}/kernel.txz .
+.for _kernel in ${BUILDKERNELS:S/${INSTALLKERNEL}//}
+ cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \
+ tar cvJf ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.txz .
+.endfor
#
# doxygen
@@ -1102,6 +1116,7 @@ build-tools:
bin/csh \
bin/sh \
${_rescue} \
+ ${LOCAL_TOOL_DIRS} \
lib/ncurses/ncurses \
lib/ncurses/ncursesw \
${_share} \
diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc
index dde440d..4bb7d4f 100644
--- a/ObsoleteFiles.inc
+++ b/ObsoleteFiles.inc
@@ -38,6 +38,11 @@
# xargs -n1 | sort | uniq -d;
# done
+# 20120113: removal of wtmpcvt(1)
+OLD_FILES+=usr/bin/wtmpcvt
+OLD_FILES+=usr/share/man/man1/wtmpcvt.1.gz
+# 20111214: eventtimers(7) moved to eventtimers(4)
+OLD_FILES+=usr/share/man/man7/eventtimers.7.gz
# 20111125: amd(4) removed
OLD_FILES+=usr/share/man/man4/amd.4.gz
# 20111125: libodialog removed
diff --git a/UPDATING b/UPDATING
index 44f902d..9a7699b 100644
--- a/UPDATING
+++ b/UPDATING
@@ -22,6 +22,33 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10.x IS SLOW:
machines to maximize performance. (To disable malloc debugging, run
ln -s aj /etc/malloc.conf.)
+20120114:
+ The set_rcvar() function has been removed from /etc/rc.subr. All
+ base and ports rc.d scripts have been updated, so if you have a
+ port installed with a script in /usr/local/etc/rc.d you can either
+ hand-edit the rcvar= line, or reinstall the port.
+
+ An easy way to handle the mass-update of /etc/rc.d:
+ rm /etc/rc.d/* && mergemaster -i
+
+20120109:
+ panic(9) now stops other CPUs in the SMP systems, disables interrupts
+ on the current CPU and prevents other threads from running.
+ This behavior can be reverted using the kern.stop_scheduler_on_panic
+ tunable/sysctl.
+ The new behavior can be incompatible with kern.sync_on_panic.
+
+20111215:
+ The carp(4) facility has been changed significantly. Configuration
+ of the CARP protocol via ifconfig(8) has changed, as well as format
+ of CARP events submitted to devd(8) has changed. See manual pages
+ for more information. The arpbalance feature of carp(4) is currently
+ not supported anymore.
+
+ Size of struct in_aliasreq, struct in6_aliasreq has changed. User
+ utilities using SIOCAIFADDR, SIOCAIFADDR_IN6, e.g. ifconfig(8),
+ need to be recompiled.
+
20111122:
The acpi_wmi(4) status device /dev/wmistat has been renamed to
/dev/wmistat0.
diff --git a/bin/chio/chio.c b/bin/chio/chio.c
index 16e8800..9bb11d7 100644
--- a/bin/chio/chio.c
+++ b/bin/chio/chio.c
@@ -87,7 +87,7 @@ static int do_voltag(const char *, int, char **);
#endif
/* Valid changer element types. */
-const struct element_type elements[] = {
+static const struct element_type elements[] = {
{ "drive", CHET_DT },
{ "picker", CHET_MT },
{ "portal", CHET_IE },
@@ -97,7 +97,7 @@ const struct element_type elements[] = {
};
/* Valid commands. */
-const struct changer_command commands[] = {
+static const struct changer_command commands[] = {
{ "exchange", do_exchange },
{ "getpicker", do_getpicker },
{ "ielem", do_ielem },
@@ -112,7 +112,7 @@ const struct changer_command commands[] = {
};
/* Valid special words. */
-const struct special_word specials[] = {
+static const struct special_word specials[] = {
{ "inv", SW_INVERT },
{ "inv1", SW_INVERT1 },
{ "inv2", SW_INVERT2 },
diff --git a/bin/ed/io.c b/bin/ed/io.c
index 85ba0de..63fe10c 100644
--- a/bin/ed/io.c
+++ b/bin/ed/io.c
@@ -53,7 +53,8 @@ read_file(char *fn, long n)
errmsg = "cannot close input file";
return ERR;
}
- fprintf(stdout, !scripted ? "%lu\n" : "", size);
+ if (!scripted)
+ fprintf(stdout, "%lu\n", size);
return current_addr - n;
}
@@ -161,7 +162,8 @@ write_file(char *fn, const char *mode, long n, long m)
errmsg = "cannot close output file";
return ERR;
}
- fprintf(stdout, !scripted ? "%lu\n" : "", size);
+ if (!scripted)
+ fprintf(stdout, "%lu\n", size);
return n ? m - n + 1 : 0;
}
diff --git a/bin/ed/main.c b/bin/ed/main.c
index fad1866..f414d40 100644
--- a/bin/ed/main.c
+++ b/bin/ed/main.c
@@ -192,9 +192,10 @@ top:
fputs("?\n", stderr);
errmsg = "warning: file modified";
if (!isatty(0)) {
- fprintf(stderr, garrulous ?
- "script, line %d: %s\n" :
- "", lineno, errmsg);
+ if (garrulous)
+ fprintf(stderr,
+ "script, line %d: %s\n",
+ lineno, errmsg);
quit(2);
}
clearerr(stdin);
@@ -225,27 +226,26 @@ top:
fputs("?\n", stderr); /* give warning */
errmsg = "warning: file modified";
if (!isatty(0)) {
- fprintf(stderr, garrulous ?
- "script, line %d: %s\n" :
- "", lineno, errmsg);
+ if (garrulous)
+ fprintf(stderr, "script, line %d: %s\n",
+ lineno, errmsg);
quit(2);
}
break;
case FATAL:
- if (!isatty(0))
- fprintf(stderr, garrulous ?
- "script, line %d: %s\n" : "",
- lineno, errmsg);
- else
- fprintf(stderr, garrulous ? "%s\n" : "",
- errmsg);
+ if (!isatty(0)) {
+ if (garrulous)
+ fprintf(stderr, "script, line %d: %s\n",
+ lineno, errmsg);
+ } else if (garrulous)
+ fprintf(stderr, "%s\n", errmsg);
quit(3);
default:
fputs("?\n", stderr);
if (!isatty(0)) {
- fprintf(stderr, garrulous ?
- "script, line %d: %s\n" : "",
- lineno, errmsg);
+ if (garrulous)
+ fprintf(stderr, "script, line %d: %s\n",
+ lineno, errmsg);
quit(2);
}
break;
diff --git a/bin/ps/print.c b/bin/ps/print.c
index 021415f..5c9398d 100644
--- a/bin/ps/print.c
+++ b/bin/ps/print.c
@@ -99,10 +99,8 @@ printheader(void)
char *
arguments(KINFO *k, VARENT *ve)
{
- VAR *v;
char *vis_args;
- v = ve->var;
if ((vis_args = malloc(strlen(k->ki_args) * 4 + 1)) == NULL)
errx(1, "malloc failed");
strvis(vis_args, k->ki_args, VIS_TAB | VIS_NL | VIS_NOSLASH);
@@ -116,10 +114,8 @@ arguments(KINFO *k, VARENT *ve)
char *
command(KINFO *k, VARENT *ve)
{
- VAR *v;
char *vis_args, *vis_env, *str;
- v = ve->var;
if (cflag) {
/* If it is the last field, then don't pad */
if (STAILQ_NEXT(ve, next_ve) == NULL) {
@@ -172,10 +168,8 @@ command(KINFO *k, VARENT *ve)
char *
ucomm(KINFO *k, VARENT *ve)
{
- VAR *v;
char *str;
- v = ve->var;
if (STAILQ_NEXT(ve, next_ve) == NULL) { /* last field, don't pad */
asprintf(&str, "%s%s%s%s",
k->ki_d.prefix ? k->ki_d.prefix : "",
@@ -192,12 +186,10 @@ ucomm(KINFO *k, VARENT *ve)
}
char *
-tdnam(KINFO *k, VARENT *ve)
+tdnam(KINFO *k, VARENT *ve __unused)
{
- VAR *v;
char *str;
- v = ve->var;
if (showthreads && k->ki_p->ki_numthreads > 1)
str = strdup(k->ki_p->ki_tdname);
else
@@ -207,28 +199,24 @@ tdnam(KINFO *k, VARENT *ve)
}
char *
-logname(KINFO *k, VARENT *ve)
+logname(KINFO *k, VARENT *ve __unused)
{
- VAR *v;
- v = ve->var;
if (*k->ki_p->ki_login == '\0')
return (NULL);
return (strdup(k->ki_p->ki_login));
}
char *
-state(KINFO *k, VARENT *ve)
+state(KINFO *k, VARENT *ve __unused)
{
int flag, tdflags;
char *cp, *buf;
- VAR *v;
buf = malloc(16);
if (buf == NULL)
errx(1, "malloc failed");
- v = ve->var;
flag = k->ki_p->ki_flag;
tdflags = k->ki_p->ki_tdflags; /* XXXKSE */
cp = buf;
@@ -294,72 +282,58 @@ state(KINFO *k, VARENT *ve)
#define scalepri(x) ((x) - PZERO)
char *
-pri(KINFO *k, VARENT *ve)
+pri(KINFO *k, VARENT *ve __unused)
{
- VAR *v;
char *str;
- v = ve->var;
asprintf(&str, "%d", scalepri(k->ki_p->ki_pri.pri_level));
return (str);
}
char *
-upr(KINFO *k, VARENT *ve)
+upr(KINFO *k, VARENT *ve __unused)
{
- VAR *v;
char *str;
- v = ve->var;
asprintf(&str, "%d", scalepri(k->ki_p->ki_pri.pri_user));
return (str);
}
#undef scalepri
char *
-uname(KINFO *k, VARENT *ve)
+uname(KINFO *k, VARENT *ve __unused)
{
- VAR *v;
- v = ve->var;
return (strdup(user_from_uid(k->ki_p->ki_uid, 0)));
}
char *
-egroupname(KINFO *k, VARENT *ve)
+egroupname(KINFO *k, VARENT *ve __unused)
{
- VAR *v;
- v = ve->var;
return (strdup(group_from_gid(k->ki_p->ki_groups[0], 0)));
}
char *
-rgroupname(KINFO *k, VARENT *ve)
+rgroupname(KINFO *k, VARENT *ve __unused)
{
- VAR *v;
- v = ve->var;
return (strdup(group_from_gid(k->ki_p->ki_rgid, 0)));
}
char *
-runame(KINFO *k, VARENT *ve)
+runame(KINFO *k, VARENT *ve __unused)
{
- VAR *v;
- v = ve->var;
return (strdup(user_from_uid(k->ki_p->ki_ruid, 0)));
}
char *
-tdev(KINFO *k, VARENT *ve)
+tdev(KINFO *k, VARENT *ve __unused)
{
- VAR *v;
dev_t dev;
char *str;
- v = ve->var;
dev = k->ki_p->ki_tdev;
if (dev == NODEV)
str = strdup("-");
@@ -370,13 +344,11 @@ tdev(KINFO *k, VARENT *ve)
}
char *
-tname(KINFO *k, VARENT *ve)
+tname(KINFO *k, VARENT *ve __unused)
{
- VAR *v;
dev_t dev;
char *ttname, *str;
- v = ve->var;
dev = k->ki_p->ki_tdev;
if (dev == NODEV || (ttname = devname(dev, S_IFCHR)) == NULL)
str = strdup("- ");
@@ -394,13 +366,11 @@ tname(KINFO *k, VARENT *ve)
}
char *
-longtname(KINFO *k, VARENT *ve)
+longtname(KINFO *k, VARENT *ve __unused)
{
- VAR *v;
dev_t dev;
const char *ttname;
- v = ve->var;
dev = k->ki_p->ki_tdev;
if (dev == NODEV || (ttname = devname(dev, S_IFCHR)) == NULL)
ttname = "-";
@@ -409,9 +379,8 @@ longtname(KINFO *k, VARENT *ve)
}
char *
-started(KINFO *k, VARENT *ve)
+started(KINFO *k, VARENT *ve __unused)
{
- VAR *v;
time_t then;
struct tm *tp;
static int use_ampm = -1;
@@ -422,7 +391,6 @@ started(KINFO *k, VARENT *ve)
if (buf == NULL)
errx(1, "malloc failed");
- v = ve->var;
if (!k->ki_valid)
return (NULL);
if (use_ampm < 0)
@@ -441,9 +409,8 @@ started(KINFO *k, VARENT *ve)
}
char *
-lstarted(KINFO *k, VARENT *ve)
+lstarted(KINFO *k, VARENT *ve __unused)
{
- VAR *v;
time_t then;
char *buf;
size_t buflen = 100;
@@ -452,7 +419,6 @@ lstarted(KINFO *k, VARENT *ve)
if (buf == NULL)
errx(1, "malloc failed");
- v = ve->var;
if (!k->ki_valid)
return (NULL);
then = k->ki_p->ki_start.tv_sec;
@@ -461,12 +427,10 @@ lstarted(KINFO *k, VARENT *ve)
}
char *
-lockname(KINFO *k, VARENT *ve)
+lockname(KINFO *k, VARENT *ve __unused)
{
- VAR *v;
char *str;
- v = ve->var;
if (k->ki_p->ki_kiflag & KI_LOCKBLOCK) {
if (k->ki_p->ki_lockname[0] != 0)
str = strdup(k->ki_p->ki_lockname);
@@ -479,12 +443,10 @@ lockname(KINFO *k, VARENT *ve)
}
char *
-wchan(KINFO *k, VARENT *ve)
+wchan(KINFO *k, VARENT *ve __unused)
{
- VAR *v;
char *str;
- v = ve->var;
if (k->ki_p->ki_wchan) {
if (k->ki_p->ki_wmesg[0] != 0)
str = strdup(k->ki_p->ki_wmesg);
@@ -497,12 +459,10 @@ wchan(KINFO *k, VARENT *ve)
}
char *
-nwchan(KINFO *k, VARENT *ve)
+nwchan(KINFO *k, VARENT *ve __unused)
{
- VAR *v;
char *str;
- v = ve->var;
if (k->ki_p->ki_wchan)
asprintf(&str, "%0lx", (long)k->ki_p->ki_wchan);
else
@@ -512,12 +472,10 @@ nwchan(KINFO *k, VARENT *ve)
}
char *
-mwchan(KINFO *k, VARENT *ve)
+mwchan(KINFO *k, VARENT *ve __unused)
{
- VAR *v;
char *str;
- v = ve->var;
if (k->ki_p->ki_wchan) {
if (k->ki_p->ki_wmesg[0] != 0)
str = strdup(k->ki_p->ki_wmesg);
@@ -535,27 +493,23 @@ mwchan(KINFO *k, VARENT *ve)
}
char *
-vsize(KINFO *k, VARENT *ve)
+vsize(KINFO *k, VARENT *ve __unused)
{
- VAR *v;
char *str;
- v = ve->var;
asprintf(&str, "%lu", (u_long)(k->ki_p->ki_size / 1024));
return (str);
}
static char *
-printtime(KINFO *k, VARENT *ve, long secs, long psecs)
+printtime(KINFO *k, VARENT *ve __unused, long secs, long psecs)
/* psecs is "parts" of a second. first micro, then centi */
{
- VAR *v;
static char decimal_point;
char *str;
if (decimal_point == '\0')
decimal_point = localeconv()->decimal_point[0];
- v = ve->var;
if (!k->ki_valid) {
secs = 0;
psecs = 0;
@@ -618,14 +572,12 @@ usertime(KINFO *k, VARENT *ve)
}
char *
-elapsed(KINFO *k, VARENT *ve)
+elapsed(KINFO *k, VARENT *ve __unused)
{
- VAR *v;
time_t val;
int days, hours, mins, secs;
char *str;
- v = ve->var;
if (!k->ki_valid)
return (NULL);
val = now - k->ki_p->ki_start.tv_sec;
@@ -646,13 +598,11 @@ elapsed(KINFO *k, VARENT *ve)
}
char *
-elapseds(KINFO *k, VARENT *ve)
+elapseds(KINFO *k, VARENT *ve __unused)
{
- VAR *v;
time_t val;
char *str;
- v = ve->var;
if (!k->ki_valid)
return (NULL);
val = now - k->ki_p->ki_start.tv_sec;
@@ -682,12 +632,10 @@ getpcpu(const KINFO *k)
}
char *
-pcpu(KINFO *k, VARENT *ve)
+pcpu(KINFO *k, VARENT *ve __unused)
{
- VAR *v;
char *str;
- v = ve->var;
asprintf(&str, "%.1f", getpcpu(k));
return (str);
}
@@ -712,47 +660,39 @@ getpmem(KINFO *k)
}
char *
-pmem(KINFO *k, VARENT *ve)
+pmem(KINFO *k, VARENT *ve __unused)
{
- VAR *v;
char *str;
- v = ve->var;
asprintf(&str, "%.1f", getpmem(k));
return (str);
}
char *
-pagein(KINFO *k, VARENT *ve)
+pagein(KINFO *k, VARENT *ve __unused)
{
- VAR *v;
char *str;
- v = ve->var;
asprintf(&str, "%ld", k->ki_valid ? k->ki_p->ki_rusage.ru_majflt : 0);
return (str);
}
/* ARGSUSED */
char *
-maxrss(KINFO *k __unused, VARENT *ve)
+maxrss(KINFO *k __unused, VARENT *ve __unused)
{
- VAR *v;
- v = ve->var;
/* XXX not yet */
return (NULL);
}
char *
-priorityr(KINFO *k, VARENT *ve)
+priorityr(KINFO *k, VARENT *ve __unused)
{
- VAR *v;
struct priority *lpri;
char *str;
unsigned class, level;
- v = ve->var;
lpri = &k->ki_p->ki_pri;
class = lpri->pri_class;
level = lpri->pri_level;
@@ -852,25 +792,21 @@ rvar(KINFO *k, VARENT *ve)
}
char *
-emulname(KINFO *k, VARENT *ve)
+emulname(KINFO *k, VARENT *ve __unused)
{
- VAR *v;
- v = ve->var;
if (k->ki_p->ki_emul == NULL)
return (NULL);
return (strdup(k->ki_p->ki_emul));
}
char *
-label(KINFO *k, VARENT *ve)
+label(KINFO *k, VARENT *ve __unused)
{
char *string;
- VAR *v;
mac_t proclabel;
int error;
- v = ve->var;
string = NULL;
if (mac_prepare_process_label(&proclabel) == -1) {
warn("mac_prepare_process_label");
@@ -887,12 +823,10 @@ out:
}
char *
-loginclass(KINFO *k, VARENT *ve)
+loginclass(KINFO *k, VARENT *ve __unused)
{
- VAR *v;
char *s;
- v = ve->var;
/*
* Don't display login class for system processes;
* login classes are used for resource limits,
diff --git a/bin/ps/ps.c b/bin/ps/ps.c
index 2171bc1..f507b6a 100644
--- a/bin/ps/ps.c
+++ b/bin/ps/ps.c
@@ -625,7 +625,7 @@ main(int argc, char *argv[])
ks = STAILQ_FIRST(&kinfo[i].ki_ks);
STAILQ_REMOVE_HEAD(&kinfo[i].ki_ks, ks_next);
- /* Truncate rightmost column if neccessary. */
+ /* Truncate rightmost column if necessary. */
if (STAILQ_NEXT(vent, next_ve) == NULL &&
termwidth != UNLIMITED && ks->ks_str != NULL) {
left = termwidth - linelen;
diff --git a/bin/sh/arith_yacc.c b/bin/sh/arith_yacc.c
index 48c63ea..fbf9a64 100644
--- a/bin/sh/arith_yacc.c
+++ b/bin/sh/arith_yacc.c
@@ -84,6 +84,8 @@ static const char prec[ARITH_BINOP_MAX - ARITH_BINOP_MIN] = {
#define ARITH_MAX_PREC 8
+int letcmd(int, char **);
+
static __dead2 void yyerror(const char *s)
{
error("arithmetic expression: %s: \"%s\"", s, arith_startbuf);
@@ -377,4 +379,3 @@ letcmd(int argc, char **argv)
out1fmt(ARITH_FORMAT_STR "\n", i);
return !i;
}
-
diff --git a/bin/sh/arith_yylex.c b/bin/sh/arith_yylex.c
index cfb9724d..f6eebdb 100644
--- a/bin/sh/arith_yylex.c
+++ b/bin/sh/arith_yylex.c
@@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$");
extern const char *arith_buf;
int
-yylex()
+yylex(void)
{
int value;
const char *buf = arith_buf;
diff --git a/bin/sh/cd.c b/bin/sh/cd.c
index 6fb1039..1330c85 100644
--- a/bin/sh/cd.c
+++ b/bin/sh/cd.c
@@ -130,7 +130,12 @@ cdcmd(int argc, char **argv)
(path = bltinlookup("CDPATH", 1)) == NULL)
path = nullstr;
while ((p = padvance(&path, dest)) != NULL) {
- if (stat(p, &statb) >= 0 && S_ISDIR(statb.st_mode)) {
+ if (stat(p, &statb) < 0) {
+ if (errno != ENOENT)
+ errno1 = errno;
+ } else if (!S_ISDIR(statb.st_mode))
+ errno1 = ENOTDIR;
+ else {
if (!print) {
/*
* XXX - rethink
diff --git a/bin/sh/eval.c b/bin/sh/eval.c
index 5e42f79..a5f0aff 100644
--- a/bin/sh/eval.c
+++ b/bin/sh/eval.c
@@ -75,7 +75,7 @@ __FBSDID("$FreeBSD$");
int evalskip; /* set if we are skipping commands */
-static int skipcount; /* number of levels to skip */
+int skipcount; /* number of levels to skip */
MKINIT int loopnest; /* current loop nesting level */
int funcnest; /* depth of function calls */
static int builtin_flags; /* evalcommand flags for builtins */
@@ -89,7 +89,7 @@ int oexitstatus; /* saved exit status */
static void evalloop(union node *, int);
static void evalfor(union node *, int);
-static union node *evalcase(union node *, int);
+static union node *evalcase(union node *);
static void evalsubshell(union node *, int);
static void evalredir(union node *, int);
static void expredir(union node *);
@@ -256,7 +256,18 @@ evaltree(union node *n, int flags)
evalfor(n, flags & ~EV_EXIT);
break;
case NCASE:
- next = evalcase(n, flags);
+ next = evalcase(n);
+ break;
+ case NCLIST:
+ next = n->nclist.body;
+ break;
+ case NCLISTFALLTHRU:
+ if (n->nclist.body) {
+ evaltree(n->nclist.body, flags & ~EV_EXIT);
+ if (evalskip)
+ goto out;
+ }
+ next = n->nclist.next;
break;
case NDEFUN:
defun(n->narg.text, n->narg.next);
@@ -337,6 +348,7 @@ evalfor(union node *n, int flags)
union node *argp;
struct strlist *sp;
struct stackmark smark;
+ int status;
setstackmark(&smark);
arglist.lastp = &arglist.list;
@@ -346,11 +358,12 @@ evalfor(union node *n, int flags)
}
*arglist.lastp = NULL;
- exitstatus = 0;
loopnest++;
+ status = 0;
for (sp = arglist.list ; sp ; sp = sp->next) {
setvar(n->nfor.var, sp->text, 0);
evaltree(n->nfor.body, flags);
+ status = exitstatus;
if (evalskip) {
if (evalskip == SKIPCONT && --skipcount <= 0) {
evalskip = 0;
@@ -363,12 +376,18 @@ evalfor(union node *n, int flags)
}
loopnest--;
popstackmark(&smark);
+ exitstatus = status;
}
+/*
+ * Evaluate a case statement, returning the selected tree.
+ *
+ * The exit status needs care to get right.
+ */
static union node *
-evalcase(union node *n, int flags)
+evalcase(union node *n)
{
union node *cp;
union node *patp;
@@ -378,25 +397,26 @@ evalcase(union node *n, int flags)
setstackmark(&smark);
arglist.lastp = &arglist.list;
oexitstatus = exitstatus;
- exitstatus = 0;
expandarg(n->ncase.expr, &arglist, EXP_TILDE);
for (cp = n->ncase.cases ; cp ; cp = cp->nclist.next) {
for (patp = cp->nclist.pattern ; patp ; patp = patp->narg.next) {
if (casematch(patp, arglist.list->text)) {
popstackmark(&smark);
while (cp->nclist.next &&
- cp->type == NCLISTFALLTHRU) {
- evaltree(cp->nclist.body,
- flags & ~EV_EXIT);
- if (evalskip != 0)
- return (NULL);
+ cp->type == NCLISTFALLTHRU &&
+ cp->nclist.body == NULL)
cp = cp->nclist.next;
- }
+ if (cp->nclist.next &&
+ cp->type == NCLISTFALLTHRU)
+ return (cp);
+ if (cp->nclist.body == NULL)
+ exitstatus = 0;
return (cp->nclist.body);
}
}
}
popstackmark(&smark);
+ exitstatus = 0;
return (NULL);
}
@@ -978,7 +998,6 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
memout.nextc = memout.buf;
memout.bufsize = 64;
mode |= REDIR_BACKQ;
- cmdentry.special = 0;
}
savecmdname = commandname;
savetopfile = getcurrentfile();
@@ -999,7 +1018,7 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
* If there is no command word, redirection errors should
* not be fatal but assignment errors should.
*/
- if (argc == 0 && !(flags & EV_BACKCMD))
+ if (argc == 0)
cmdentry.special = 1;
listsetvar(cmdenviron, cmdentry.special ? 0 : VNOSET);
if (argc > 0)
diff --git a/bin/sh/eval.h b/bin/sh/eval.h
index fba6f9a..724e157 100644
--- a/bin/sh/eval.h
+++ b/bin/sh/eval.h
@@ -60,6 +60,7 @@ void evalbackcmd(union node *, struct backcmd *);
#define in_function() funcnest
extern int funcnest;
extern int evalskip;
+extern int skipcount;
/* reasons for skipping commands (see comment on breakcmd routine) */
#define SKIPBREAK 1
diff --git a/bin/sh/exec.c b/bin/sh/exec.c
index 044fc30..82cb3ac 100644
--- a/bin/sh/exec.c
+++ b/bin/sh/exec.c
@@ -100,6 +100,7 @@ static void tryexec(char *, char **, char **);
static void printentry(struct tblentry *, int);
static struct tblentry *cmdlookup(const char *, int);
static void delete_cmd_entry(void);
+static void addcmdentry(const char *, struct cmdentry *);
@@ -492,7 +493,7 @@ hashcd(void)
*/
void
-changepath(const char *newval)
+changepath(const char *newval __unused)
{
clearcmdentry();
}
@@ -593,7 +594,7 @@ delete_cmd_entry(void)
* the same name.
*/
-void
+static void
addcmdentry(const char *name, struct cmdentry *entry)
{
struct tblentry *cmdp;
diff --git a/bin/sh/exec.h b/bin/sh/exec.h
index 31f11c0..0948421 100644
--- a/bin/sh/exec.h
+++ b/bin/sh/exec.h
@@ -70,7 +70,6 @@ void find_command(const char *, struct cmdentry *, int, const char *);
int find_builtin(const char *, int *);
void hashcd(void);
void changepath(const char *);
-void addcmdentry(const char *, struct cmdentry *);
void defun(const char *, union node *);
int unsetfunc(const char *);
int typecmd_impl(int, char **, int, const char *);
diff --git a/bin/sh/expand.c b/bin/sh/expand.c
index ea8d78d..d43cc35 100644
--- a/bin/sh/expand.c
+++ b/bin/sh/expand.c
@@ -113,6 +113,7 @@ static void expmeta(char *, char *);
static void addfname(char *);
static struct strlist *expsort(struct strlist *);
static struct strlist *msort(struct strlist *, int);
+static int patmatch(const char *, const char *, int);
static char *cvtnum(int, char *);
static int collate_range_cmp(wchar_t, wchar_t);
@@ -1186,6 +1187,7 @@ expmeta(char *enddir, char *name)
int atend;
int matchdot;
int esc;
+ int namlen;
metaflag = 0;
start = name;
@@ -1284,17 +1286,22 @@ expmeta(char *enddir, char *name)
if (dp->d_name[0] == '.' && ! matchdot)
continue;
if (patmatch(start, dp->d_name, 0)) {
- if (enddir + dp->d_namlen + 1 > expdir_end)
+ namlen = dp->d_namlen;
+ if (enddir + namlen + 1 > expdir_end)
continue;
- memcpy(enddir, dp->d_name, dp->d_namlen + 1);
+ memcpy(enddir, dp->d_name, namlen + 1);
if (atend)
addfname(expdir);
else {
- if (enddir + dp->d_namlen + 2 > expdir_end)
+ if (dp->d_type != DT_UNKNOWN &&
+ dp->d_type != DT_DIR &&
+ dp->d_type != DT_LNK)
continue;
- enddir[dp->d_namlen] = '/';
- enddir[dp->d_namlen + 1] = '\0';
- expmeta(enddir + dp->d_namlen + 1, endname);
+ if (enddir + namlen + 2 > expdir_end)
+ continue;
+ enddir[namlen] = '/';
+ enddir[namlen + 1] = '\0';
+ expmeta(enddir + namlen + 1, endname);
}
}
}
@@ -1435,61 +1442,67 @@ match_charclass(const char *p, wchar_t chr, const char **end)
* Returns true if the pattern matches the string.
*/
-int
+static int
patmatch(const char *pattern, const char *string, int squoted)
{
const char *p, *q, *end;
+ const char *bt_p, *bt_q;
char c;
wchar_t wc, wc2;
p = pattern;
q = string;
+ bt_p = NULL;
+ bt_q = NULL;
for (;;) {
switch (c = *p++) {
case '\0':
- goto breakloop;
+ if (*q != '\0')
+ goto backtrack;
+ return 1;
case CTLESC:
if (squoted && *q == CTLESC)
q++;
if (*q++ != *p++)
- return 0;
+ goto backtrack;
break;
case CTLQUOTEMARK:
continue;
case '?':
if (squoted && *q == CTLESC)
q++;
- if (localeisutf8)
+ if (*q == '\0')
+ return 0;
+ if (localeisutf8) {
wc = get_wc(&q);
- else
+ /*
+ * A '?' does not match invalid UTF-8 but a
+ * '*' does, so backtrack.
+ */
+ if (wc == 0)
+ goto backtrack;
+ } else
wc = (unsigned char)*q++;
- if (wc == '\0')
- return 0;
break;
case '*':
c = *p;
while (c == CTLQUOTEMARK || c == '*')
c = *++p;
- if (c != CTLESC && c != CTLQUOTEMARK &&
- c != '?' && c != '*' && c != '[') {
- while (*q != c) {
- if (squoted && *q == CTLESC &&
- q[1] == c)
- break;
- if (*q == '\0')
- return 0;
- if (squoted && *q == CTLESC)
- q++;
- q++;
- }
- }
- do {
- if (patmatch(p, q, squoted))
- return 1;
- if (squoted && *q == CTLESC)
- q++;
- } while (*q++ != '\0');
- return 0;
+ /*
+ * If the pattern ends here, we know the string
+ * matches without needing to look at the rest of it.
+ */
+ if (c == '\0')
+ return 1;
+ /*
+ * First try the shortest match for the '*' that
+ * could work. We can forget any earlier '*' since
+ * there is no way having it match more characters
+ * can help us, given that we are already here.
+ */
+ bt_p = p;
+ bt_q = q;
+ break;
case '[': {
const char *endp;
int invert, found;
@@ -1501,7 +1514,7 @@ patmatch(const char *pattern, const char *string, int squoted)
for (;;) {
while (*endp == CTLQUOTEMARK)
endp++;
- if (*endp == '\0')
+ if (*endp == 0)
goto dft; /* no matching ] */
if (*endp == CTLESC)
endp++;
@@ -1516,12 +1529,14 @@ patmatch(const char *pattern, const char *string, int squoted)
found = 0;
if (squoted && *q == CTLESC)
q++;
- if (localeisutf8)
+ if (*q == '\0')
+ return 0;
+ if (localeisutf8) {
chr = get_wc(&q);
- else
+ if (chr == 0)
+ goto backtrack;
+ } else
chr = (unsigned char)*q++;
- if (chr == '\0')
- return 0;
c = *p++;
do {
if (c == CTLQUOTEMARK)
@@ -1562,21 +1577,34 @@ patmatch(const char *pattern, const char *string, int squoted)
}
} while ((c = *p++) != ']');
if (found == invert)
- return 0;
+ goto backtrack;
break;
}
dft: default:
if (squoted && *q == CTLESC)
q++;
- if (*q++ != c)
+ if (*q == '\0')
+ return 0;
+ if (*q++ == c)
+ break;
+backtrack:
+ /*
+ * If we have a mismatch (other than hitting the end
+ * of the string), go back to the last '*' seen and
+ * have it match one additional character.
+ */
+ if (bt_p == NULL)
+ return 0;
+ if (squoted && *bt_q == CTLESC)
+ bt_q++;
+ if (*bt_q == '\0')
return 0;
+ bt_q++;
+ p = bt_p;
+ q = bt_q;
break;
}
}
-breakloop:
- if (*q != '\0')
- return 0;
- return 1;
}
diff --git a/bin/sh/expand.h b/bin/sh/expand.h
index 5029552..8114e2b 100644
--- a/bin/sh/expand.h
+++ b/bin/sh/expand.h
@@ -60,6 +60,5 @@ union node;
void expandhere(union node *, int);
void expandarg(union node *, struct arglist *, int);
void expari(int);
-int patmatch(const char *, const char *, int);
void rmescapes(char *);
int casematch(union node *, const char *);
diff --git a/bin/sh/funcs/kill b/bin/sh/funcs/kill
deleted file mode 100644
index 16f0c9b..0000000
--- a/bin/sh/funcs/kill
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/sh
-
-#-
-# Copyright (c) 1991, 1993
-# The Regents of the University of California. All rights reserved.
-#
-# This code is derived from software contributed to Berkeley by
-# Kenneth Almquist.
-#
-# 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.
-# 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.
-#
-# @(#)kill 8.2 (Berkeley) 5/4/95
-# $FreeBSD$
-
-# Convert job names to process ids and then run /bin/kill.
-
-kill() {
- local args x
- args=
- for x in "$@"
- do case $x in
- %*) x=`jobid "$x"` ;;
- esac
- args="$args $x"
- done
- /bin/kill $args
-}
diff --git a/bin/sh/histedit.c b/bin/sh/histedit.c
index 4619baf..6371599 100644
--- a/bin/sh/histedit.c
+++ b/bin/sh/histedit.c
@@ -70,6 +70,8 @@ int displayhist;
static FILE *el_in, *el_out, *el_err;
static char *fc_replace(const char *, char *, char *);
+static int not_fcnumber(const char *);
+static int str_to_event(const char *, int);
/*
* Set history and editing status. Called whenever the status may
@@ -158,8 +160,7 @@ bad:
void
-sethistsize(hs)
- const char *hs;
+sethistsize(const char *hs)
{
int histsize;
HistEvent he;
@@ -425,7 +426,7 @@ fc_replace(const char *s, char *p, char *r)
return (dest);
}
-int
+static int
not_fcnumber(const char *s)
{
if (s == NULL)
@@ -435,7 +436,7 @@ not_fcnumber(const char *s)
return (!is_number(s));
}
-int
+static int
str_to_event(const char *str, int last)
{
HistEvent he;
diff --git a/bin/sh/input.c b/bin/sh/input.c
index c8b1a45..3ceaea4 100644
--- a/bin/sh/input.c
+++ b/bin/sh/input.c
@@ -97,7 +97,7 @@ int parsenleft; /* copy of parsefile->nleft */
MKINIT int parselleft; /* copy of parsefile->lleft */
char *parsenextc; /* copy of parsefile->nextc */
MKINIT struct parsefile basepf; /* top level input file */
-char basebuf[BUFSIZ]; /* buffer for top level input file */
+char basebuf[BUFSIZ + 1]; /* buffer for top level input file */
static struct parsefile *parsefile = &basepf; /* current input file */
int init_editline = 0; /* editline library initialized? */
int whichprompt; /* 1 == PS1, 2 == PS2 */
@@ -106,6 +106,7 @@ EditLine *el; /* cookie for editline package */
static void pushfile(void);
static int preadfd(void);
+static void popstring(void);
#ifdef mkinit
INCLUDE "input.h"
@@ -188,8 +189,8 @@ retry:
nr = 0;
else {
nr = el_len;
- if (nr > BUFSIZ - 1)
- nr = BUFSIZ - 1;
+ if (nr > BUFSIZ)
+ nr = BUFSIZ;
memcpy(parsenextc, rl_cp, nr);
if (nr != el_len) {
el_len -= nr;
@@ -199,7 +200,7 @@ retry:
}
} else
#endif
- nr = read(parsefile->fd, parsenextc, BUFSIZ - 1);
+ nr = read(parsefile->fd, parsenextc, BUFSIZ);
if (nr <= 0) {
if (nr < 0) {
@@ -372,7 +373,7 @@ pushstring(char *s, int len, void *ap)
INTON;
}
-void
+static void
popstring(void)
{
struct strpush *sp = parsefile->strpush;
@@ -427,13 +428,13 @@ setinputfd(int fd, int push)
(void)fcntl(fd, F_SETFD, FD_CLOEXEC);
if (push) {
pushfile();
- parsefile->buf = ckmalloc(BUFSIZ);
+ parsefile->buf = ckmalloc(BUFSIZ + 1);
}
if (parsefile->fd > 0)
close(parsefile->fd);
parsefile->fd = fd;
if (parsefile->buf == NULL)
- parsefile->buf = ckmalloc(BUFSIZ);
+ parsefile->buf = ckmalloc(BUFSIZ + 1);
parselleft = parsenleft = 0;
plinno = 1;
}
diff --git a/bin/sh/input.h b/bin/sh/input.h
index abbb2ce..92aba45 100644
--- a/bin/sh/input.h
+++ b/bin/sh/input.h
@@ -53,7 +53,6 @@ int preadbuffer(void);
int preadateof(void);
void pungetc(void);
void pushstring(char *, int, void *);
-void popstring(void);
void setinputfile(const char *, int);
void setinputfd(int, int);
void setinputstring(char *, int);
diff --git a/bin/sh/jobs.c b/bin/sh/jobs.c
index 75b503e..232be8b 100644
--- a/bin/sh/jobs.c
+++ b/bin/sh/jobs.c
@@ -92,6 +92,7 @@ static void restartjob(struct job *);
#endif
static void freejob(struct job *);
static struct job *getjob(char *);
+pid_t getjobpgrp(char *);
static pid_t dowait(int, struct job *);
static pid_t waitproc(int, int *);
static void checkzombies(void);
diff --git a/bin/sh/main.c b/bin/sh/main.c
index e6c8a20..5eb12e0 100644
--- a/bin/sh/main.c
+++ b/bin/sh/main.c
@@ -79,6 +79,7 @@ int rootshell;
struct jmploc main_handler;
int localeisutf8, initial_localeisutf8;
+static void cmdloop(int);
static void read_profile(char *);
static char *find_dot_file(char *);
@@ -184,7 +185,7 @@ state4: /* XXX ??? - why isn't this before the "if" statement */
* loop; it turns on prompting if the shell is interactive.
*/
-void
+static void
cmdloop(int top)
{
union node *n;
diff --git a/bin/sh/main.h b/bin/sh/main.h
index 6d4cc4a..3c48e33 100644
--- a/bin/sh/main.h
+++ b/bin/sh/main.h
@@ -38,4 +38,3 @@ extern int rootshell; /* true if we aren't a child of the main shell */
extern struct jmploc main_handler; /* top level exception handler */
void readcmdfile(const char *);
-void cmdloop(int);
diff --git a/bin/sh/mksyntax.c b/bin/sh/mksyntax.c
index 9aa7450..07dc2f1 100644
--- a/bin/sh/mksyntax.c
+++ b/bin/sh/mksyntax.c
@@ -219,16 +219,16 @@ main(int argc __unused, char **argv __unused)
add("`", "CBQUOTE");
add("$", "CVAR");
add("}", "CENDVAR");
- /* ':/' for tilde expansion, '-' for [a\-x] pattern ranges */
- add("!*?[=~:/-", "CCTL");
+ /* ':/' for tilde expansion, '-^]' for [a\-x] pattern ranges */
+ add("!*?[]=~:/-^", "CCTL");
print("dqsyntax");
init();
fputs("\n/* syntax table used when in single quotes */\n", cfile);
add("\n", "CNL");
add("\\", "CSBACK");
add("'", "CENDQUOTE");
- /* ':/' for tilde expansion, '-' for [a\-x] pattern ranges */
- add("!*?[=~:/-", "CCTL");
+ /* ':/' for tilde expansion, '-^]' for [a\-x] pattern ranges */
+ add("!*?[]=~:/-^", "CCTL");
print("sqsyntax");
init();
fputs("\n/* syntax table used when in arithmetic */\n", cfile);
diff --git a/bin/sh/myhistedit.h b/bin/sh/myhistedit.h
index 9a649ec..e31276d 100644
--- a/bin/sh/myhistedit.h
+++ b/bin/sh/myhistedit.h
@@ -39,6 +39,4 @@ extern int displayhist;
void histedit(void);
void sethistsize(const char *);
void setterm(const char *);
-int not_fcnumber(const char *);
-int str_to_event(const char *, int);
diff --git a/bin/sh/mystring.c b/bin/sh/mystring.c
index 53d703d..67617ec 100644
--- a/bin/sh/mystring.c
+++ b/bin/sh/mystring.c
@@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$");
*
* equal(s1, s2) Return true if strings are equal.
* scopy(from, to) Copy a string.
- * scopyn(from, to, n) Like scopy, but checks for overflow.
* number(s) Convert a string of digits to an integer.
* is_number(s) Return true if s is a string of digits.
*/
@@ -67,24 +66,6 @@ char nullstr[1]; /* zero length string */
/*
- * scopyn - copy a string from "from" to "to", truncating the string
- * if necessary. "To" is always nul terminated, even if
- * truncation is performed. "Size" is the size of "to".
- */
-
-void
-scopyn(const char *from, char *to, int size)
-{
-
- while (--size > 0) {
- if ((*to++ = *from++) == '\0')
- return;
- }
- *to = '\0';
-}
-
-
-/*
* prefix -- see if pfx is a prefix of string.
*/
diff --git a/bin/sh/mystring.h b/bin/sh/mystring.h
index 1b27a1b..5a6e3d8 100644
--- a/bin/sh/mystring.h
+++ b/bin/sh/mystring.h
@@ -35,7 +35,6 @@
#include <string.h>
-void scopyn(const char *, char *, int);
int prefix(const char *, const char *);
int number(const char *);
int is_number(const char *);
diff --git a/bin/sh/trap.c b/bin/sh/trap.c
index 2b6d8a5..834992f 100644
--- a/bin/sh/trap.c
+++ b/bin/sh/trap.c
@@ -191,10 +191,11 @@ trapcmd(int argc, char **argv)
argv++;
}
}
- while (*argv) {
+ for (; *argv; argv++) {
if ((signo = sigstring_to_signum(*argv)) == -1) {
warning("bad signal %s", *argv);
errors = 1;
+ continue;
}
INTOFF;
if (action)
@@ -205,7 +206,6 @@ trapcmd(int argc, char **argv)
if (signo != 0)
setsignal(signo);
INTON;
- argv++;
}
return errors;
}
@@ -412,7 +412,7 @@ void
dotrap(void)
{
int i;
- int savestatus;
+ int savestatus, prev_evalskip, prev_skipcount;
in_dotrap++;
for (;;) {
@@ -427,10 +427,36 @@ dotrap(void)
*/
if (i == SIGCHLD)
ignore_sigchld++;
+
+ /*
+ * Backup current evalskip
+ * state and reset it before
+ * executing a trap, so that the
+ * trap is not disturbed by an
+ * ongoing break/continue/return
+ * statement.
+ */
+ prev_evalskip = evalskip;
+ prev_skipcount = skipcount;
+ evalskip = 0;
+
last_trapsig = i;
savestatus = exitstatus;
evalstring(trap[i], 0);
exitstatus = savestatus;
+
+ /*
+ * If such a command was not
+ * already in progress, allow a
+ * break/continue/return in the
+ * trap action to have an effect
+ * outside of it.
+ */
+ if (prev_evalskip != 0) {
+ evalskip = prev_evalskip;
+ skipcount = prev_skipcount;
+ }
+
if (i == SIGCHLD)
ignore_sigchld--;
}
@@ -501,6 +527,11 @@ exitshell_savedstatus(void)
}
handler = &loc1;
if ((p = trap[0]) != NULL && *p != '\0') {
+ /*
+ * Reset evalskip, or the trap on EXIT could be
+ * interrupted if the last command was a "return".
+ */
+ evalskip = 0;
trap[0] = NULL;
evalstring(p, 0);
}
diff --git a/bin/stty/modes.c b/bin/stty/modes.c
index cc18d2c..2bf211e 100644
--- a/bin/stty/modes.c
+++ b/bin/stty/modes.c
@@ -52,7 +52,7 @@ struct modes {
* The code in optlist() depends on minus options following regular
* options, i.e. "foo" must immediately precede "-foo".
*/
-struct modes cmodes[] = {
+static const struct modes cmodes[] = {
{ "cs5", CS5, CSIZE },
{ "cs6", CS6, CSIZE },
{ "cs7", CS7, CSIZE },
@@ -94,7 +94,7 @@ struct modes cmodes[] = {
{ NULL, 0, 0 },
};
-struct modes imodes[] = {
+static const struct modes imodes[] = {
{ "ignbrk", IGNBRK, 0 },
{ "-ignbrk", 0, IGNBRK },
{ "brkint", BRKINT, 0 },
@@ -130,7 +130,7 @@ struct modes imodes[] = {
{ NULL, 0, 0 },
};
-struct modes lmodes[] = {
+static const struct modes lmodes[] = {
{ "echo", ECHO, 0 },
{ "-echo", 0, ECHO },
{ "echoe", ECHOE, 0 },
@@ -182,7 +182,7 @@ struct modes lmodes[] = {
{ NULL, 0, 0 },
};
-struct modes omodes[] = {
+static const struct modes omodes[] = {
{ "opost", OPOST, 0 },
{ "-opost", 0, OPOST },
{ "litout", 0, OPOST },
@@ -209,7 +209,7 @@ struct modes omodes[] = {
int
msearch(char ***argvp, struct info *ip)
{
- struct modes *mp;
+ const struct modes *mp;
char *name;
name = **argvp;
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c b/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c
index 63721ab..a276659 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c
+++ b/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c
@@ -671,9 +671,12 @@ link_prog(dtrace_cmd_t *dcp)
p[0] = '\0'; /* strip .d suffix */
(void) snprintf(dcp->dc_ofile, sizeof (dcp->dc_ofile),
"%s.o", basename(dcp->dc_arg));
+ } else if (g_cmdc > 1) {
+ (void) snprintf(dcp->dc_ofile, sizeof (dcp->dc_ofile),
+ "d.out.%td", dcp - g_cmdv);
} else {
(void) snprintf(dcp->dc_ofile, sizeof (dcp->dc_ofile),
- g_cmdc > 1 ? "%s.%d" : "%s", "d.out", (int)(dcp - g_cmdv));
+ "d.out");
}
if (dtrace_program_link(g_dtp, dcp->dc_prog, DTRACE_D_PROBES,
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.c
index 2785b51..3cded11 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.c
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.c
@@ -82,7 +82,7 @@ main(int argc, char *argv[])
fds[n++] = open(file, O_RDWR | O_APPEND | O_CREAT | O_DSYNC |
O_LARGEFILE | O_NOCTTY | O_NONBLOCK | O_NDELAY | O_RSYNC |
- O_SYNC | O_TRUNC | O_XATTR);
+ O_SYNC | O_TRUNC | O_XATTR, 0666);
fds[n++] = open(file, O_RDWR);
(void) lseek(fds[n - 1], 123, SEEK_SET);
diff --git a/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c b/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c
index e2ab90e..62cd9d0 100644
--- a/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c
+++ b/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c
@@ -20,6 +20,8 @@
*/
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012 Pawel Jakub Dawidek <pawel@dawidek.net>.
+ * All rights reserved.
*/
#include <libintl.h>
@@ -129,8 +131,11 @@ zfs_callback(zfs_handle_t *zhp, void *data)
cb->cb_depth++;
if (zfs_get_type(zhp) == ZFS_TYPE_FILESYSTEM)
(void) zfs_iter_filesystems(zhp, zfs_callback, data);
- if ((zfs_get_type(zhp) != ZFS_TYPE_SNAPSHOT) && include_snaps)
- (void) zfs_iter_snapshots(zhp, zfs_callback, data);
+ if ((zfs_get_type(zhp) != ZFS_TYPE_SNAPSHOT) && include_snaps) {
+ (void) zfs_iter_snapshots(zhp,
+ (cb->cb_flags & ZFS_ITER_SIMPLE) != 0, zfs_callback,
+ data);
+ }
cb->cb_depth--;
}
@@ -184,6 +189,14 @@ zfs_free_sort_columns(zfs_sort_column_t *sc)
}
}
+boolean_t
+zfs_sort_only_by_name(const zfs_sort_column_t *sc)
+{
+
+ return (sc != NULL && sc->sc_next == NULL &&
+ sc->sc_prop == ZFS_PROP_NAME);
+}
+
/* ARGSUSED */
static int
zfs_compare(const void *larg, const void *rarg, void *unused)
@@ -224,7 +237,13 @@ zfs_compare(const void *larg, const void *rarg, void *unused)
lcreate = zfs_prop_get_int(l, ZFS_PROP_CREATETXG);
rcreate = zfs_prop_get_int(r, ZFS_PROP_CREATETXG);
- if (lcreate < rcreate)
+ /*
+ * Both lcreate and rcreate being 0 means we don't have
+ * properties and we should compare full name.
+ */
+ if (lcreate == 0 && rcreate == 0)
+ ret = strcmp(lat + 1, rat + 1);
+ else if (lcreate < rcreate)
ret = -1;
else if (lcreate > rcreate)
ret = 1;
@@ -290,7 +309,14 @@ zfs_sort(const void *larg, const void *rarg, void *data)
if (rvalid)
verify(nvlist_lookup_string(rval,
ZPROP_VALUE, &rstr) == 0);
+ } else if (psc->sc_prop == ZFS_PROP_NAME) {
+ lvalid = rvalid = B_TRUE;
+
+ (void) strlcpy(lbuf, zfs_get_name(l), sizeof(lbuf));
+ (void) strlcpy(rbuf, zfs_get_name(r), sizeof(rbuf));
+ lstr = lbuf;
+ rstr = rbuf;
} else if (zfs_prop_is_string(psc->sc_prop)) {
lvalid = (zfs_prop_get(l, psc->sc_prop, lbuf,
sizeof (lbuf), NULL, NULL, 0, B_TRUE) == 0);
diff --git a/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.h b/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.h
index 8c6b9fd..a287374 100644
--- a/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.h
+++ b/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.h
@@ -43,11 +43,13 @@ typedef struct zfs_sort_column {
#define ZFS_ITER_PROP_LISTSNAPS (1 << 2)
#define ZFS_ITER_DEPTH_LIMIT (1 << 3)
#define ZFS_ITER_RECVD_PROPS (1 << 4)
+#define ZFS_ITER_SIMPLE (1 << 5)
int zfs_for_each(int, char **, int options, zfs_type_t,
zfs_sort_column_t *, zprop_list_t **, int, zfs_iter_f, void *);
int zfs_add_sort_column(zfs_sort_column_t **, const char *, boolean_t);
void zfs_free_sort_columns(zfs_sort_column_t *);
+boolean_t zfs_sort_only_by_name(const zfs_sort_column_t *);
#ifdef __cplusplus
}
diff --git a/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c b/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
index 78037d4..27d882e 100644
--- a/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
+++ b/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
@@ -21,9 +21,10 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
+ * Copyright 2012 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2011 by Delphix. All rights reserved.
- * Copyright (c) 2011 Pawel Jakub Dawidek <pawel@dawidek.net>.
+ * Copyright (c) 2011-2012 Pawel Jakub Dawidek <pawel@dawidek.net>.
+ * All rights reserved.
* Copyright (c) 2011 Martin Matuska <mm@FreeBSD.org>. All rights reserved.
*/
@@ -2837,7 +2838,12 @@ print_dataset(zfs_handle_t *zhp, zprop_list_t *pl, boolean_t scripted)
first = B_FALSE;
}
- if (pl->pl_prop != ZPROP_INVAL) {
+ if (pl->pl_prop == ZFS_PROP_NAME) {
+ (void) strlcpy(property, zfs_get_name(zhp),
+ sizeof(property));
+ propstr = property;
+ right_justify = zfs_prop_align_right(pl->pl_prop);
+ } else if (pl->pl_prop != ZPROP_INVAL) {
if (zfs_prop_get(zhp, pl->pl_prop, property,
sizeof (property), NULL, NULL, 0, B_FALSE) != 0)
propstr = "-";
@@ -3004,6 +3010,13 @@ zfs_do_list(int argc, char **argv)
fields = default_fields;
/*
+ * If we are only going to list snapshot names and sort by name,
+ * then we can use faster version.
+ */
+ if (strcmp(fields, "name") == 0 && zfs_sort_only_by_name(sortcol))
+ flags |= ZFS_ITER_SIMPLE;
+
+ /*
* If "-o space" and no types were specified, don't display snapshots.
*/
if (strcmp(fields, "space") == 0 && types_specified == B_FALSE)
@@ -4488,7 +4501,7 @@ parse_allow_args(int argc, char **argv, boolean_t un, struct allow_opts *opts)
argc--;
argv++;
opts->dataset = munge_args(argc, argv, un, 2, &opts->perms);
- } else if (argc == 1) {
+ } else if (argc == 1 && !un) {
opts->prt_perms = B_TRUE;
opts->dataset = argv[argc-1];
} else {
@@ -4975,9 +4988,9 @@ zfs_do_allow_unallow_impl(int argc, char **argv, boolean_t un)
parse_allow_args(argc, argv, un, &opts);
/* try to open the dataset */
- if ((zhp = zfs_open(g_zfs, opts.dataset, ZFS_TYPE_FILESYSTEM))
- == NULL) {
- (void) fprintf(stderr, "Failed to open Dataset *%s*\n",
+ if ((zhp = zfs_open(g_zfs, opts.dataset, ZFS_TYPE_FILESYSTEM |
+ ZFS_TYPE_VOLUME)) == NULL) {
+ (void) fprintf(stderr, "Failed to open dataset: %s\n",
opts.dataset);
return (-1);
}
@@ -4987,7 +5000,7 @@ zfs_do_allow_unallow_impl(int argc, char **argv, boolean_t un)
fs_perm_set_init(&fs_perm_set);
if (parse_fs_perm_set(&fs_perm_set, perm_nvl) != 0) {
- (void) fprintf(stderr, "Failed to parse fsacl permissionsn");
+ (void) fprintf(stderr, "Failed to parse fsacl permissions\n");
goto cleanup1;
}
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c b/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c
index 7a14dd3..3b4a38c 100644
--- a/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c
+++ b/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c
@@ -102,7 +102,7 @@ fixsymbol(Elf *e, Elf_Data *data, size_t idx, int nprobes, char *buf,
int ndx;
while (gelf_getsym(data, j++, &sym) != NULL) {
- prb = (dof_probe_t *)(buf + sec->dofs_offset);
+ prb = (dof_probe_t *)(void *)(buf + sec->dofs_offset);
for (ndx = nprobes; ndx; ndx--, prb += 1) {
funcname = dofstrtab + prb->dofpr_func;
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c
index 911478e..af4af8a 100644
--- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c
+++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c
@@ -873,7 +873,7 @@ dt_print_stack(dtrace_hdl_t *dtp, FILE *fp, const char *format,
if (pc > sym.st_value) {
(void) snprintf(c, sizeof (c), "%s`%s+0x%llx",
dts.dts_object, dts.dts_name,
- pc - sym.st_value);
+ (u_longlong_t)(pc - sym.st_value));
} else {
(void) snprintf(c, sizeof (c), "%s`%s",
dts.dts_object, dts.dts_name);
@@ -886,9 +886,10 @@ dt_print_stack(dtrace_hdl_t *dtp, FILE *fp, const char *format,
*/
if (dtrace_lookup_by_addr(dtp, pc, NULL, &dts) == 0) {
(void) snprintf(c, sizeof (c), "%s`0x%llx",
- dts.dts_object, pc);
+ dts.dts_object, (u_longlong_t)pc);
} else {
- (void) snprintf(c, sizeof (c), "0x%llx", pc);
+ (void) snprintf(c, sizeof (c), "0x%llx",
+ (u_longlong_t)pc);
}
}
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_handle.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_handle.c
index ea039e9..fe1ec7a 100644
--- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_handle.c
+++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_handle.c
@@ -335,7 +335,8 @@ dt_handle_cpudrop(dtrace_hdl_t *dtp, processorid_t cpu,
}
(void) snprintf(s, size, "%llu %sdrop%s on CPU %d\n",
- howmany, what == DTRACEDROP_PRINCIPAL ? "" : "aggregation ",
+ (u_longlong_t)howmany,
+ what == DTRACEDROP_PRINCIPAL ? "" : "aggregation ",
howmany > 1 ? "s" : "", cpu);
if (dtp->dt_drophdlr == NULL)
@@ -427,7 +428,8 @@ dt_handle_status(dtrace_hdl_t *dtp, dtrace_status_t *old, dtrace_status_t *new)
size = sizeof (str);
}
- (void) snprintf(s, size, "%llu %s%s%s\n", nval - oval,
+ (void) snprintf(s, size, "%llu %s%s%s\n",
+ (u_longlong_t)(nval - oval),
_dt_droptab[i].dtdrt_str, (nval - oval > 1) ? "s" : "",
_dt_droptab[i].dtdrt_msg != NULL ?
_dt_droptab[i].dtdrt_msg : "");
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c
index ca355ea..2d0428a 100644
--- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c
+++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c
@@ -1106,7 +1106,7 @@ process_obj(dtrace_hdl_t *dtp, const char *obj, int *eprobesp)
static const char dt_prefix[] = "__dtrace";
static const char dt_enabled[] = "enabled";
static const char dt_symprefix[] = "$dtrace";
- static const char dt_symfmt[] = "%s%d.%s";
+ static const char dt_symfmt[] = "%s%ld.%s";
int fd, i, ndx, eprobe, mod = 0;
Elf *elf = NULL;
GElf_Ehdr ehdr;
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c
index ea4607f..839ce06 100644
--- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c
+++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c
@@ -27,6 +27,7 @@
#if defined(sun)
#include <sys/sysmacros.h>
#endif
+#include <sys/isa_defs.h>
#include <strings.h>
#include <unistd.h>
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/i386/dt_isadep.c b/cddl/contrib/opensolaris/lib/libdtrace/i386/dt_isadep.c
index ad1c032..f11ae48 100644
--- a/cddl/contrib/opensolaris/lib/libdtrace/i386/dt_isadep.c
+++ b/cddl/contrib/opensolaris/lib/libdtrace/i386/dt_isadep.c
@@ -436,7 +436,7 @@ dt_pid_create_glob_offset_probes(struct ps_prochandle *P, dtrace_hdl_t *dtp,
char name[sizeof (i) * 2 + 1];
for (i = 0; i < end; i += size) {
- (void) snprintf(name, sizeof (name), "%x", i);
+ (void) snprintf(name, sizeof (name), "%lx", i);
if (gmatch(name, pattern))
ftp->ftps_offs[ftp->ftps_noffs++] = i;
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h
index e1d9c93..b11356d 100644
--- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h
+++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h
@@ -22,6 +22,8 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
+ * Copyright (c) 2011 Pawel Jakub Dawidek <pawel@dawidek.net>.
+ * All rights reserved.
* Copyright (c) 2011 by Delphix. All rights reserved.
* All rights reserved.
*/
@@ -505,7 +507,7 @@ extern int zfs_iter_root(libzfs_handle_t *, zfs_iter_f, void *);
extern int zfs_iter_children(zfs_handle_t *, zfs_iter_f, void *);
extern int zfs_iter_dependents(zfs_handle_t *, boolean_t, zfs_iter_f, void *);
extern int zfs_iter_filesystems(zfs_handle_t *, zfs_iter_f, void *);
-extern int zfs_iter_snapshots(zfs_handle_t *, zfs_iter_f, void *);
+extern int zfs_iter_snapshots(zfs_handle_t *, boolean_t, zfs_iter_f, void *);
extern int zfs_iter_snapshots_sorted(zfs_handle_t *, zfs_iter_f, void *);
extern int zfs_iter_snapspec(zfs_handle_t *, const char *, zfs_iter_f, void *);
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
index bff0586..dba47ef 100644
--- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
+++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
@@ -23,7 +23,7 @@
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright 2010 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2011 by Delphix. All rights reserved.
- * Copyright (c) 2011 Pawel Jakub Dawidek <pawel@dawidek.net>.
+ * Copyright (c) 2011-2012 Pawel Jakub Dawidek <pawel@dawidek.net>.
* All rights reserved.
*/
@@ -514,6 +514,22 @@ make_dataset_handle_zc(libzfs_handle_t *hdl, zfs_cmd_t *zc)
}
zfs_handle_t *
+make_dataset_simple_handle_zc(zfs_handle_t *pzhp, zfs_cmd_t *zc)
+{
+ zfs_handle_t *zhp = calloc(sizeof (zfs_handle_t), 1);
+
+ if (zhp == NULL)
+ return (NULL);
+
+ zhp->zfs_hdl = pzhp->zfs_hdl;
+ (void) strlcpy(zhp->zfs_name, zc->zc_name, sizeof (zhp->zfs_name));
+ zhp->zfs_head_type = pzhp->zfs_type;
+ zhp->zfs_type = ZFS_TYPE_SNAPSHOT;
+ zhp->zpool_hdl = zpool_handle(zhp);
+ return (zhp);
+}
+
+zfs_handle_t *
zfs_handle_dup(zfs_handle_t *zhp_orig)
{
zfs_handle_t *zhp = calloc(sizeof (zfs_handle_t), 1);
@@ -4197,7 +4213,7 @@ tryagain:
(void) strlcpy(zc.zc_name, zhp->zfs_name, ZFS_MAXNAMELEN);
- if (zfs_ioctl(hdl, ZFS_IOC_GET_FSACL, &zc) != 0) {
+ if (ioctl(hdl->libzfs_fd, ZFS_IOC_GET_FSACL, &zc) != 0) {
(void) snprintf(errbuf, sizeof (errbuf),
dgettext(TEXT_DOMAIN, "cannot get permissions on '%s'"),
zc.zc_name);
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h
index 48a8edb..1c46d32 100644
--- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h
+++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h
@@ -150,7 +150,7 @@ int zpool_standard_error_fmt(libzfs_handle_t *, int, const char *, ...);
int get_dependents(libzfs_handle_t *, boolean_t, const char *, char ***,
size_t *);
zfs_handle_t *make_dataset_handle_zc(libzfs_handle_t *, zfs_cmd_t *);
-
+zfs_handle_t *make_dataset_simple_handle_zc(zfs_handle_t *, zfs_cmd_t *);
int zprop_parse_value(libzfs_handle_t *, nvpair_t *, int, zfs_type_t,
nvlist_t *, char **, uint64_t *, const char *);
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c
index a3e1b9f..a4db909 100644
--- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c
+++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c
@@ -23,6 +23,8 @@
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright 2010 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2011 by Delphix. All rights reserved.
+ * Copyright (c) 2012 Pawel Jakub Dawidek <pawel@dawidek.net>.
+ * All rights reserved.
*/
#include <stdio.h>
@@ -137,7 +139,8 @@ zfs_iter_filesystems(zfs_handle_t *zhp, zfs_iter_f func, void *data)
* Iterate over all snapshots
*/
int
-zfs_iter_snapshots(zfs_handle_t *zhp, zfs_iter_f func, void *data)
+zfs_iter_snapshots(zfs_handle_t *zhp, boolean_t simple, zfs_iter_f func,
+ void *data)
{
zfs_cmd_t zc = { 0 };
zfs_handle_t *nzhp;
@@ -146,15 +149,19 @@ zfs_iter_snapshots(zfs_handle_t *zhp, zfs_iter_f func, void *data)
if (zhp->zfs_type == ZFS_TYPE_SNAPSHOT)
return (0);
+ zc.zc_simple = simple;
+
if (zcmd_alloc_dst_nvlist(zhp->zfs_hdl, &zc, 0) != 0)
return (-1);
while ((ret = zfs_do_list_ioctl(zhp, ZFS_IOC_SNAPSHOT_LIST_NEXT,
&zc)) == 0) {
- if ((nzhp = make_dataset_handle_zc(zhp->zfs_hdl,
- &zc)) == NULL) {
+ if (simple)
+ nzhp = make_dataset_simple_handle_zc(zhp, &zc);
+ else
+ nzhp = make_dataset_handle_zc(zhp->zfs_hdl, &zc);
+ if (nzhp == NULL)
continue;
- }
if ((ret = func(nzhp, data)) != 0) {
zcmd_free_nvlists(&zc);
@@ -234,7 +241,7 @@ zfs_iter_snapshots_sorted(zfs_handle_t *zhp, zfs_iter_f callback, void *data)
avl_create(&avl, zfs_snapshot_compare,
sizeof (zfs_node_t), offsetof(zfs_node_t, zn_avlnode));
- ret = zfs_iter_snapshots(zhp, zfs_sort_snaps, &avl);
+ ret = zfs_iter_snapshots(zhp, B_FALSE, zfs_sort_snaps, &avl);
for (node = avl_first(&avl); node != NULL; node = AVL_NEXT(&avl, node))
ret |= callback(node->zn_handle, data);
@@ -378,7 +385,7 @@ zfs_iter_children(zfs_handle_t *zhp, zfs_iter_f func, void *data)
if ((ret = zfs_iter_filesystems(zhp, func, data)) != 0)
return (ret);
- return (zfs_iter_snapshots(zhp, func, data));
+ return (zfs_iter_snapshots(zhp, B_FALSE, func, data));
}
@@ -439,8 +446,10 @@ iter_dependents_cb(zfs_handle_t *zhp, void *arg)
isf.next = ida->stack;
ida->stack = &isf;
err = zfs_iter_filesystems(zhp, iter_dependents_cb, ida);
- if (err == 0)
- err = zfs_iter_snapshots(zhp, iter_dependents_cb, ida);
+ if (err == 0) {
+ err = zfs_iter_snapshots(zhp, B_FALSE,
+ iter_dependents_cb, ida);
+ }
ida->stack = isf.next;
}
if (!first && err == 0)
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
index b0f034b..1a305fd 100644
--- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
+++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
@@ -22,6 +22,8 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011 by Delphix. All rights reserved.
+ * Copyright (c) 2012 Pawel Jakub Dawidek <pawel@dawidek.net>.
+ * All rights reserved.
*/
#include <assert.h>
@@ -717,7 +719,7 @@ send_iterate_fs(zfs_handle_t *zhp, void *arg)
sd->parent_fromsnap_guid = 0;
VERIFY(0 == nvlist_alloc(&sd->parent_snaps, NV_UNIQUE_NAME, 0));
VERIFY(0 == nvlist_alloc(&sd->snapprops, NV_UNIQUE_NAME, 0));
- (void) zfs_iter_snapshots(zhp, send_iterate_snap, sd);
+ (void) zfs_iter_snapshots(zhp, B_FALSE, send_iterate_snap, sd);
VERIFY(0 == nvlist_add_nvlist(nvfs, "snaps", sd->parent_snaps));
VERIFY(0 == nvlist_add_nvlist(nvfs, "snapprops", sd->snapprops));
nvlist_free(sd->parent_snaps);
diff --git a/cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c b/cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c
index fa4fbeb..105112d 100644
--- a/cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c
+++ b/cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c
@@ -228,7 +228,7 @@ usage(void)
"\n"
" Note: if -L labelenv is specified and labelenv is not set in\n"
" the environment, a default value is used.\n",
- progname, progname, strlen(progname), " ",
+ progname, progname, (int)strlen(progname), " ",
progname, progname);
}
diff --git a/contrib/bsnmp/snmp_mibII/mibII.c b/contrib/bsnmp/snmp_mibII/mibII.c
index 9258a5d..27ebede 100644
--- a/contrib/bsnmp/snmp_mibII/mibII.c
+++ b/contrib/bsnmp/snmp_mibII/mibII.c
@@ -941,7 +941,7 @@ handle_rtmsg(struct rt_msghdr *rtm)
{
struct sockaddr *addrs[RTAX_MAX];
struct if_msghdr *ifm;
- struct ifa_msghdr *ifam;
+ struct ifa_msghdr ifam;
struct ifma_msghdr *ifmam;
#ifdef RTM_IFANNOUNCE
struct if_announcemsghdr *ifan;
@@ -961,17 +961,17 @@ handle_rtmsg(struct rt_msghdr *rtm)
switch (rtm->rtm_type) {
case RTM_NEWADDR:
- ifam = (struct ifa_msghdr *)rtm;
- mib_extract_addrs(ifam->ifam_addrs, (u_char *)(ifam + 1), addrs);
+ memcpy(&ifam, rtm, sizeof(ifam));
+ mib_extract_addrs(ifam.ifam_addrs, (u_char *)(&ifam + 1), addrs);
if (addrs[RTAX_IFA] == NULL || addrs[RTAX_NETMASK] == NULL)
break;
sa = (struct sockaddr_in *)(void *)addrs[RTAX_IFA];
if ((ifa = mib_find_ifa(sa->sin_addr)) == NULL) {
/* unknown address */
- if ((ifp = mib_find_if_sys(ifam->ifam_index)) == NULL) {
+ if ((ifp = mib_find_if_sys(ifam.ifam_index)) == NULL) {
syslog(LOG_WARNING, "RTM_NEWADDR for unknown "
- "interface %u", ifam->ifam_index);
+ "interface %u", ifam.ifam_index);
break;
}
if ((ifa = alloc_ifa(ifp->index, sa->sin_addr)) == NULL)
@@ -988,8 +988,8 @@ handle_rtmsg(struct rt_msghdr *rtm)
break;
case RTM_DELADDR:
- ifam = (struct ifa_msghdr *)rtm;
- mib_extract_addrs(ifam->ifam_addrs, (u_char *)(ifam + 1), addrs);
+ memcpy(&ifam, rtm, sizeof(ifam));
+ mib_extract_addrs(ifam.ifam_addrs, (u_char *)(&ifam + 1), addrs);
if (addrs[RTAX_IFA] == NULL)
break;
diff --git a/contrib/bsnmp/snmpd/snmpmod.h b/contrib/bsnmp/snmpd/snmpmod.h
index 9025366..ad73566 100644
--- a/contrib/bsnmp/snmpd/snmpmod.h
+++ b/contrib/bsnmp/snmpd/snmpmod.h
@@ -40,6 +40,7 @@
#define snmpmod_h_
#include <sys/types.h>
+#include <sys/queue.h>
#include <sys/socket.h>
#include <net/if.h>
#include <netinet/in.h>
diff --git a/contrib/bzip2/bzip2recover.c b/contrib/bzip2/bzip2recover.c
index f9de049..bf3bca5 100644
--- a/contrib/bzip2/bzip2recover.c
+++ b/contrib/bzip2/bzip2recover.c
@@ -37,7 +37,7 @@
*/
#ifdef __GNUC__
typedef unsigned long long int MaybeUInt64;
-# define MaybeUInt64_FMT "%Lu"
+# define MaybeUInt64_FMT "%llu"
#else
#ifdef _MSC_VER
typedef unsigned __int64 MaybeUInt64;
diff --git a/contrib/compiler-rt/LICENSE.TXT b/contrib/compiler-rt/LICENSE.TXT
index 2552e8c..c41925e 100644
--- a/contrib/compiler-rt/LICENSE.TXT
+++ b/contrib/compiler-rt/LICENSE.TXT
@@ -14,7 +14,7 @@ Full text of the relevant licenses is included below.
University of Illinois/NCSA
Open Source License
-Copyright (c) 2009-2010 by the contributors listed in CREDITS.TXT
+Copyright (c) 2009-2012 by the contributors listed in CREDITS.TXT
All rights reserved.
@@ -55,7 +55,7 @@ SOFTWARE.
==============================================================================
-Copyright (c) 2009-2010 by the contributors listed in CREDITS.TXT
+Copyright (c) 2009-2012 by the contributors listed in CREDITS.TXT
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -74,3 +74,25 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
+
+==============================================================================
+Copyrights and Licenses for Third Party Software Distributed with LLVM:
+==============================================================================
+The LLVM software contains code written by third parties. Such software will
+have its own individual LICENSE.TXT file in the directory in which it appears.
+This file will describe the copyrights, license, and restrictions which apply
+to that code.
+
+The disclaimer of warranty in the University of Illinois Open Source License
+applies to all code in the LLVM Distribution, and nothing in any of the
+other licenses gives permission to use the names of the LLVM Team or the
+University of Illinois to endorse or promote products derived from this
+Software.
+
+The following pieces of software have additional or alternate copyrights,
+licenses, and/or restrictions:
+
+Program Directory
+------- ---------
+sysinfo lib/asan/sysinfo
+mach_override lib/asan/mach_override
diff --git a/contrib/compiler-rt/README.txt b/contrib/compiler-rt/README.txt
index cbeb10c..b37c0ae 100644
--- a/contrib/compiler-rt/README.txt
+++ b/contrib/compiler-rt/README.txt
@@ -106,6 +106,15 @@ si_int __mulvsi3(si_int a, si_int b); // a * b
di_int __mulvdi3(di_int a, di_int b); // a * b
ti_int __mulvti3(ti_int a, ti_int b); // a * b
+
+// Integral arithmetic which returns if overflow
+
+si_int __mulosi4(si_int a, si_int b, int* overflow); // a * b, overflow set to one if result not in signed range
+di_int __mulodi4(di_int a, di_int b, int* overflow); // a * b, overflow set to one if result not in signed range
+ti_int __muloti4(ti_int a, ti_int b, int* overflow); // a * b, overflow set to
+ one if result not in signed range
+
+
// Integral comparison: a < b -> 0
// a == b -> 1
// a > b -> 2
diff --git a/contrib/compiler-rt/lib/abi.h b/contrib/compiler-rt/lib/abi.h
deleted file mode 100644
index 2534317..0000000
--- a/contrib/compiler-rt/lib/abi.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* ===------ abi.h - configuration header for compiler-rt -----------------===
- *
- * The LLVM Compiler Infrastructure
- *
- * This file is dual licensed under the MIT and the University of Illinois Open
- * Source Licenses. See LICENSE.TXT for details.
- *
- * ===----------------------------------------------------------------------===
- *
- * This file is a configuration header for compiler-rt.
- * This file is not part of the interface of this library.
- *
- * ===----------------------------------------------------------------------===
- */
-
-#if __ARM_EABI__
-# define ARM_EABI_FNALIAS(aeabi_name, name) \
- void __aeabi_##aeabi_name() __attribute__((alias("__" #name)));
-# define COMPILER_RT_ABI __attribute__((pcs("aapcs")))
-#else
-# define ARM_EABI_FNALIAS(aeabi_name, name)
-# define COMPILER_RT_ABI
-#endif
diff --git a/contrib/compiler-rt/lib/absvdi2.c b/contrib/compiler-rt/lib/absvdi2.c
index 9c5d4a2..682c235 100644
--- a/contrib/compiler-rt/lib/absvdi2.c
+++ b/contrib/compiler-rt/lib/absvdi2.c
@@ -11,10 +11,8 @@
*
*===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
-#include <stdlib.h>
/* Returns: absolute value */
diff --git a/contrib/compiler-rt/lib/absvsi2.c b/contrib/compiler-rt/lib/absvsi2.c
index 80a1a78..4812af8 100644
--- a/contrib/compiler-rt/lib/absvsi2.c
+++ b/contrib/compiler-rt/lib/absvsi2.c
@@ -11,10 +11,8 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
-#include <stdlib.h>
/* Returns: absolute value */
diff --git a/contrib/compiler-rt/lib/absvti2.c b/contrib/compiler-rt/lib/absvti2.c
index 9e73a26..8f2bddc 100644
--- a/contrib/compiler-rt/lib/absvti2.c
+++ b/contrib/compiler-rt/lib/absvti2.c
@@ -15,7 +15,6 @@
#if __x86_64
#include "int_lib.h"
-#include <stdlib.h>
/* Returns: absolute value */
diff --git a/contrib/compiler-rt/lib/adddf3.c b/contrib/compiler-rt/lib/adddf3.c
index 3cc997b..7eb40a1 100644
--- a/contrib/compiler-rt/lib/adddf3.c
+++ b/contrib/compiler-rt/lib/adddf3.c
@@ -12,8 +12,6 @@
//
//===----------------------------------------------------------------------===//
-#include "abi.h"
-
#define DOUBLE_PRECISION
#include "fp_lib.h"
diff --git a/contrib/compiler-rt/lib/addsf3.c b/contrib/compiler-rt/lib/addsf3.c
index 20610ef..e57270a 100644
--- a/contrib/compiler-rt/lib/addsf3.c
+++ b/contrib/compiler-rt/lib/addsf3.c
@@ -12,8 +12,6 @@
//
//===----------------------------------------------------------------------===//
-#include "abi.h"
-
#define SINGLE_PRECISION
#include "fp_lib.h"
diff --git a/contrib/compiler-rt/lib/addvdi3.c b/contrib/compiler-rt/lib/addvdi3.c
index 51ad397..db45a27 100644
--- a/contrib/compiler-rt/lib/addvdi3.c
+++ b/contrib/compiler-rt/lib/addvdi3.c
@@ -11,10 +11,8 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
-#include <stdlib.h>
/* Returns: a + b */
diff --git a/contrib/compiler-rt/lib/addvsi3.c b/contrib/compiler-rt/lib/addvsi3.c
index c18f7bd..81f515c 100644
--- a/contrib/compiler-rt/lib/addvsi3.c
+++ b/contrib/compiler-rt/lib/addvsi3.c
@@ -11,10 +11,8 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
-#include <stdlib.h>
/* Returns: a + b */
diff --git a/contrib/compiler-rt/lib/addvti3.c b/contrib/compiler-rt/lib/addvti3.c
index ba220f5..9105c17 100644
--- a/contrib/compiler-rt/lib/addvti3.c
+++ b/contrib/compiler-rt/lib/addvti3.c
@@ -15,7 +15,6 @@
#if __x86_64
#include "int_lib.h"
-#include <stdlib.h>
/* Returns: a + b */
diff --git a/contrib/compiler-rt/lib/apple_versioning.c b/contrib/compiler-rt/lib/apple_versioning.c
deleted file mode 100644
index e838d72..0000000
--- a/contrib/compiler-rt/lib/apple_versioning.c
+++ /dev/null
@@ -1,291 +0,0 @@
-/* ===-- apple_versioning.c - Adds versioning symbols for ld ---------------===
- *
- * The LLVM Compiler Infrastructure
- *
- * This file is dual licensed under the MIT and the University of Illinois Open
- * Source Licenses. See LICENSE.TXT for details.
- *
- * ===----------------------------------------------------------------------===
- */
-
-
-
-#if __APPLE__
- #if __arm__
- #define NOT_HERE_BEFORE_10_6(sym)
- #elif __ppc__
- #define NOT_HERE_BEFORE_10_6(sym) \
- extern const char sym##_tmp3 __asm("$ld$hide$os10.3$_" #sym ); \
- __attribute__((visibility("default"))) const char sym##_tmp3 = 0; \
- extern const char sym##_tmp4 __asm("$ld$hide$os10.4$_" #sym ); \
- __attribute__((visibility("default"))) const char sym##_tmp4 = 0; \
- extern const char sym##_tmp5 __asm("$ld$hide$os10.5$_" #sym ); \
- __attribute__((visibility("default"))) const char sym##_tmp5 = 0;
- #else
- #define NOT_HERE_BEFORE_10_6(sym) \
- extern const char sym##_tmp4 __asm("$ld$hide$os10.4$_" #sym ); \
- __attribute__((visibility("default"))) const char sym##_tmp4 = 0; \
- extern const char sym##_tmp5 __asm("$ld$hide$os10.5$_" #sym ); \
- __attribute__((visibility("default"))) const char sym##_tmp5 = 0;
- #endif /* __ppc__ */
-
-
-/* Symbols in libSystem.dylib in 10.6 and later,
- * but are in libgcc_s.dylib in earlier versions
- */
-
-NOT_HERE_BEFORE_10_6(__absvdi2)
-NOT_HERE_BEFORE_10_6(__absvsi2)
-NOT_HERE_BEFORE_10_6(__absvti2)
-NOT_HERE_BEFORE_10_6(__addvdi3)
-NOT_HERE_BEFORE_10_6(__addvsi3)
-NOT_HERE_BEFORE_10_6(__addvti3)
-NOT_HERE_BEFORE_10_6(__ashldi3)
-NOT_HERE_BEFORE_10_6(__ashlti3)
-NOT_HERE_BEFORE_10_6(__ashrdi3)
-NOT_HERE_BEFORE_10_6(__ashrti3)
-NOT_HERE_BEFORE_10_6(__clear_cache)
-NOT_HERE_BEFORE_10_6(__clzdi2)
-NOT_HERE_BEFORE_10_6(__clzsi2)
-NOT_HERE_BEFORE_10_6(__clzti2)
-NOT_HERE_BEFORE_10_6(__cmpdi2)
-NOT_HERE_BEFORE_10_6(__cmpti2)
-NOT_HERE_BEFORE_10_6(__ctzdi2)
-NOT_HERE_BEFORE_10_6(__ctzsi2)
-NOT_HERE_BEFORE_10_6(__ctzti2)
-NOT_HERE_BEFORE_10_6(__divdc3)
-NOT_HERE_BEFORE_10_6(__divdi3)
-NOT_HERE_BEFORE_10_6(__divsc3)
-NOT_HERE_BEFORE_10_6(__divtc3)
-NOT_HERE_BEFORE_10_6(__divti3)
-NOT_HERE_BEFORE_10_6(__divxc3)
-NOT_HERE_BEFORE_10_6(__enable_execute_stack)
-NOT_HERE_BEFORE_10_6(__ffsdi2)
-NOT_HERE_BEFORE_10_6(__ffsti2)
-NOT_HERE_BEFORE_10_6(__fixdfdi)
-NOT_HERE_BEFORE_10_6(__fixdfti)
-NOT_HERE_BEFORE_10_6(__fixsfdi)
-NOT_HERE_BEFORE_10_6(__fixsfti)
-NOT_HERE_BEFORE_10_6(__fixtfdi)
-NOT_HERE_BEFORE_10_6(__fixunsdfdi)
-NOT_HERE_BEFORE_10_6(__fixunsdfsi)
-NOT_HERE_BEFORE_10_6(__fixunsdfti)
-NOT_HERE_BEFORE_10_6(__fixunssfdi)
-NOT_HERE_BEFORE_10_6(__fixunssfsi)
-NOT_HERE_BEFORE_10_6(__fixunssfti)
-NOT_HERE_BEFORE_10_6(__fixunstfdi)
-NOT_HERE_BEFORE_10_6(__fixunsxfdi)
-NOT_HERE_BEFORE_10_6(__fixunsxfsi)
-NOT_HERE_BEFORE_10_6(__fixunsxfti)
-NOT_HERE_BEFORE_10_6(__fixxfdi)
-NOT_HERE_BEFORE_10_6(__fixxfti)
-NOT_HERE_BEFORE_10_6(__floatdidf)
-NOT_HERE_BEFORE_10_6(__floatdisf)
-NOT_HERE_BEFORE_10_6(__floatditf)
-NOT_HERE_BEFORE_10_6(__floatdixf)
-NOT_HERE_BEFORE_10_6(__floattidf)
-NOT_HERE_BEFORE_10_6(__floattisf)
-NOT_HERE_BEFORE_10_6(__floattixf)
-NOT_HERE_BEFORE_10_6(__floatundidf)
-NOT_HERE_BEFORE_10_6(__floatundisf)
-NOT_HERE_BEFORE_10_6(__floatunditf)
-NOT_HERE_BEFORE_10_6(__floatundixf)
-NOT_HERE_BEFORE_10_6(__floatuntidf)
-NOT_HERE_BEFORE_10_6(__floatuntisf)
-NOT_HERE_BEFORE_10_6(__floatuntixf)
-NOT_HERE_BEFORE_10_6(__gcc_personality_v0)
-NOT_HERE_BEFORE_10_6(__lshrdi3)
-NOT_HERE_BEFORE_10_6(__lshrti3)
-NOT_HERE_BEFORE_10_6(__moddi3)
-NOT_HERE_BEFORE_10_6(__modti3)
-NOT_HERE_BEFORE_10_6(__muldc3)
-NOT_HERE_BEFORE_10_6(__muldi3)
-NOT_HERE_BEFORE_10_6(__mulsc3)
-NOT_HERE_BEFORE_10_6(__multc3)
-NOT_HERE_BEFORE_10_6(__multi3)
-NOT_HERE_BEFORE_10_6(__mulvdi3)
-NOT_HERE_BEFORE_10_6(__mulvsi3)
-NOT_HERE_BEFORE_10_6(__mulvti3)
-NOT_HERE_BEFORE_10_6(__mulxc3)
-NOT_HERE_BEFORE_10_6(__negdi2)
-NOT_HERE_BEFORE_10_6(__negti2)
-NOT_HERE_BEFORE_10_6(__negvdi2)
-NOT_HERE_BEFORE_10_6(__negvsi2)
-NOT_HERE_BEFORE_10_6(__negvti2)
-NOT_HERE_BEFORE_10_6(__paritydi2)
-NOT_HERE_BEFORE_10_6(__paritysi2)
-NOT_HERE_BEFORE_10_6(__parityti2)
-NOT_HERE_BEFORE_10_6(__popcountdi2)
-NOT_HERE_BEFORE_10_6(__popcountsi2)
-NOT_HERE_BEFORE_10_6(__popcountti2)
-NOT_HERE_BEFORE_10_6(__powidf2)
-NOT_HERE_BEFORE_10_6(__powisf2)
-NOT_HERE_BEFORE_10_6(__powitf2)
-NOT_HERE_BEFORE_10_6(__powixf2)
-NOT_HERE_BEFORE_10_6(__subvdi3)
-NOT_HERE_BEFORE_10_6(__subvsi3)
-NOT_HERE_BEFORE_10_6(__subvti3)
-NOT_HERE_BEFORE_10_6(__ucmpdi2)
-NOT_HERE_BEFORE_10_6(__ucmpti2)
-NOT_HERE_BEFORE_10_6(__udivdi3)
-NOT_HERE_BEFORE_10_6(__udivmoddi4)
-NOT_HERE_BEFORE_10_6(__udivmodti4)
-NOT_HERE_BEFORE_10_6(__udivti3)
-NOT_HERE_BEFORE_10_6(__umoddi3)
-NOT_HERE_BEFORE_10_6(__umodti3)
-
-
-#if __ppc__
-NOT_HERE_BEFORE_10_6(__gcc_qadd)
-NOT_HERE_BEFORE_10_6(__gcc_qdiv)
-NOT_HERE_BEFORE_10_6(__gcc_qmul)
-NOT_HERE_BEFORE_10_6(__gcc_qsub)
-NOT_HERE_BEFORE_10_6(__trampoline_setup)
-#endif /* __ppc__ */
-
-#if __arm__ && __DYNAMIC__
- #define NOT_HERE_UNTIL_AFTER_4_3(sym) \
- extern const char sym##_tmp1 __asm("$ld$hide$os3.0$_" #sym ); \
- __attribute__((visibility("default"))) const char sym##_tmp1 = 0; \
- extern const char sym##_tmp2 __asm("$ld$hide$os3.1$_" #sym ); \
- __attribute__((visibility("default"))) const char sym##_tmp2 = 0; \
- extern const char sym##_tmp3 __asm("$ld$hide$os3.2$_" #sym ); \
- __attribute__((visibility("default"))) const char sym##_tmp3 = 0; \
- extern const char sym##_tmp4 __asm("$ld$hide$os4.0$_" #sym ); \
- __attribute__((visibility("default"))) const char sym##_tmp4 = 0; \
- extern const char sym##_tmp5 __asm("$ld$hide$os4.1$_" #sym ); \
- __attribute__((visibility("default"))) const char sym##_tmp5 = 0; \
- extern const char sym##_tmp6 __asm("$ld$hide$os4.2$_" #sym ); \
- __attribute__((visibility("default"))) const char sym##_tmp6 = 0; \
- extern const char sym##_tmp7 __asm("$ld$hide$os4.3$_" #sym ); \
- __attribute__((visibility("default"))) const char sym##_tmp7 = 0;
-
-NOT_HERE_UNTIL_AFTER_4_3(__absvdi2)
-NOT_HERE_UNTIL_AFTER_4_3(__absvsi2)
-NOT_HERE_UNTIL_AFTER_4_3(__adddf3)
-NOT_HERE_UNTIL_AFTER_4_3(__adddf3vfp)
-NOT_HERE_UNTIL_AFTER_4_3(__addsf3)
-NOT_HERE_UNTIL_AFTER_4_3(__addsf3vfp)
-NOT_HERE_UNTIL_AFTER_4_3(__addvdi3)
-NOT_HERE_UNTIL_AFTER_4_3(__addvsi3)
-NOT_HERE_UNTIL_AFTER_4_3(__ashldi3)
-NOT_HERE_UNTIL_AFTER_4_3(__ashrdi3)
-NOT_HERE_UNTIL_AFTER_4_3(__bswapdi2)
-NOT_HERE_UNTIL_AFTER_4_3(__bswapsi2)
-NOT_HERE_UNTIL_AFTER_4_3(__clzdi2)
-NOT_HERE_UNTIL_AFTER_4_3(__clzsi2)
-NOT_HERE_UNTIL_AFTER_4_3(__cmpdi2)
-NOT_HERE_UNTIL_AFTER_4_3(__ctzdi2)
-NOT_HERE_UNTIL_AFTER_4_3(__ctzsi2)
-NOT_HERE_UNTIL_AFTER_4_3(__divdc3)
-NOT_HERE_UNTIL_AFTER_4_3(__divdf3)
-NOT_HERE_UNTIL_AFTER_4_3(__divdf3vfp)
-NOT_HERE_UNTIL_AFTER_4_3(__divdi3)
-NOT_HERE_UNTIL_AFTER_4_3(__divsc3)
-NOT_HERE_UNTIL_AFTER_4_3(__divsf3)
-NOT_HERE_UNTIL_AFTER_4_3(__divsf3vfp)
-NOT_HERE_UNTIL_AFTER_4_3(__divsi3)
-NOT_HERE_UNTIL_AFTER_4_3(__eqdf2)
-NOT_HERE_UNTIL_AFTER_4_3(__eqdf2vfp)
-NOT_HERE_UNTIL_AFTER_4_3(__eqsf2)
-NOT_HERE_UNTIL_AFTER_4_3(__eqsf2vfp)
-NOT_HERE_UNTIL_AFTER_4_3(__extendsfdf2)
-NOT_HERE_UNTIL_AFTER_4_3(__extendsfdf2vfp)
-NOT_HERE_UNTIL_AFTER_4_3(__ffsdi2)
-NOT_HERE_UNTIL_AFTER_4_3(__fixdfdi)
-NOT_HERE_UNTIL_AFTER_4_3(__fixdfsi)
-NOT_HERE_UNTIL_AFTER_4_3(__fixdfsivfp)
-NOT_HERE_UNTIL_AFTER_4_3(__fixsfdi)
-NOT_HERE_UNTIL_AFTER_4_3(__fixsfsi)
-NOT_HERE_UNTIL_AFTER_4_3(__fixsfsivfp)
-NOT_HERE_UNTIL_AFTER_4_3(__fixunsdfdi)
-NOT_HERE_UNTIL_AFTER_4_3(__fixunsdfsi)
-NOT_HERE_UNTIL_AFTER_4_3(__fixunsdfsivfp)
-NOT_HERE_UNTIL_AFTER_4_3(__fixunssfdi)
-NOT_HERE_UNTIL_AFTER_4_3(__fixunssfsi)
-NOT_HERE_UNTIL_AFTER_4_3(__fixunssfsivfp)
-NOT_HERE_UNTIL_AFTER_4_3(__floatdidf)
-NOT_HERE_UNTIL_AFTER_4_3(__floatdisf)
-NOT_HERE_UNTIL_AFTER_4_3(__floatsidf)
-NOT_HERE_UNTIL_AFTER_4_3(__floatsidfvfp)
-NOT_HERE_UNTIL_AFTER_4_3(__floatsisf)
-NOT_HERE_UNTIL_AFTER_4_3(__floatsisfvfp)
-NOT_HERE_UNTIL_AFTER_4_3(__floatundidf)
-NOT_HERE_UNTIL_AFTER_4_3(__floatundisf)
-NOT_HERE_UNTIL_AFTER_4_3(__floatunsidf)
-NOT_HERE_UNTIL_AFTER_4_3(__floatunsisf)
-NOT_HERE_UNTIL_AFTER_4_3(__floatunssidfvfp)
-NOT_HERE_UNTIL_AFTER_4_3(__floatunssisfvfp)
-NOT_HERE_UNTIL_AFTER_4_3(__gedf2)
-NOT_HERE_UNTIL_AFTER_4_3(__gedf2vfp)
-NOT_HERE_UNTIL_AFTER_4_3(__gesf2)
-NOT_HERE_UNTIL_AFTER_4_3(__gesf2vfp)
-NOT_HERE_UNTIL_AFTER_4_3(__gtdf2)
-NOT_HERE_UNTIL_AFTER_4_3(__gtdf2vfp)
-NOT_HERE_UNTIL_AFTER_4_3(__gtsf2)
-NOT_HERE_UNTIL_AFTER_4_3(__gtsf2vfp)
-NOT_HERE_UNTIL_AFTER_4_3(__ledf2)
-NOT_HERE_UNTIL_AFTER_4_3(__ledf2vfp)
-NOT_HERE_UNTIL_AFTER_4_3(__lesf2)
-NOT_HERE_UNTIL_AFTER_4_3(__lesf2vfp)
-NOT_HERE_UNTIL_AFTER_4_3(__lshrdi3)
-NOT_HERE_UNTIL_AFTER_4_3(__ltdf2)
-NOT_HERE_UNTIL_AFTER_4_3(__ltdf2vfp)
-NOT_HERE_UNTIL_AFTER_4_3(__ltsf2)
-NOT_HERE_UNTIL_AFTER_4_3(__ltsf2vfp)
-NOT_HERE_UNTIL_AFTER_4_3(__moddi3)
-NOT_HERE_UNTIL_AFTER_4_3(__modsi3)
-NOT_HERE_UNTIL_AFTER_4_3(__muldc3)
-NOT_HERE_UNTIL_AFTER_4_3(__muldf3)
-NOT_HERE_UNTIL_AFTER_4_3(__muldf3vfp)
-NOT_HERE_UNTIL_AFTER_4_3(__muldi3)
-NOT_HERE_UNTIL_AFTER_4_3(__mulsc3)
-NOT_HERE_UNTIL_AFTER_4_3(__mulsf3)
-NOT_HERE_UNTIL_AFTER_4_3(__mulsf3vfp)
-NOT_HERE_UNTIL_AFTER_4_3(__mulvdi3)
-NOT_HERE_UNTIL_AFTER_4_3(__mulvsi3)
-NOT_HERE_UNTIL_AFTER_4_3(__nedf2)
-NOT_HERE_UNTIL_AFTER_4_3(__nedf2vfp)
-NOT_HERE_UNTIL_AFTER_4_3(__negdi2)
-NOT_HERE_UNTIL_AFTER_4_3(__negvdi2)
-NOT_HERE_UNTIL_AFTER_4_3(__negvsi2)
-NOT_HERE_UNTIL_AFTER_4_3(__nesf2)
-NOT_HERE_UNTIL_AFTER_4_3(__nesf2vfp)
-NOT_HERE_UNTIL_AFTER_4_3(__paritydi2)
-NOT_HERE_UNTIL_AFTER_4_3(__paritysi2)
-NOT_HERE_UNTIL_AFTER_4_3(__popcountdi2)
-NOT_HERE_UNTIL_AFTER_4_3(__popcountsi2)
-NOT_HERE_UNTIL_AFTER_4_3(__powidf2)
-NOT_HERE_UNTIL_AFTER_4_3(__powisf2)
-NOT_HERE_UNTIL_AFTER_4_3(__subdf3)
-NOT_HERE_UNTIL_AFTER_4_3(__subdf3vfp)
-NOT_HERE_UNTIL_AFTER_4_3(__subsf3)
-NOT_HERE_UNTIL_AFTER_4_3(__subsf3vfp)
-NOT_HERE_UNTIL_AFTER_4_3(__subvdi3)
-NOT_HERE_UNTIL_AFTER_4_3(__subvsi3)
-NOT_HERE_UNTIL_AFTER_4_3(__truncdfsf2)
-NOT_HERE_UNTIL_AFTER_4_3(__truncdfsf2vfp)
-NOT_HERE_UNTIL_AFTER_4_3(__ucmpdi2)
-NOT_HERE_UNTIL_AFTER_4_3(__udivdi3)
-NOT_HERE_UNTIL_AFTER_4_3(__udivmoddi4)
-NOT_HERE_UNTIL_AFTER_4_3(__udivsi3)
-NOT_HERE_UNTIL_AFTER_4_3(__umoddi3)
-NOT_HERE_UNTIL_AFTER_4_3(__umodsi3)
-NOT_HERE_UNTIL_AFTER_4_3(__unorddf2)
-NOT_HERE_UNTIL_AFTER_4_3(__unorddf2vfp)
-NOT_HERE_UNTIL_AFTER_4_3(__unordsf2)
-NOT_HERE_UNTIL_AFTER_4_3(__unordsf2vfp)
-
-NOT_HERE_UNTIL_AFTER_4_3(__divmodsi4)
-NOT_HERE_UNTIL_AFTER_4_3(__udivmodsi4)
-#endif // __arm__ && __DYNAMIC__
-
-
-
-
-
-#else /* !__APPLE__ */
-
-extern int avoid_empty_file;
-
-#endif /* !__APPLE__*/
diff --git a/contrib/compiler-rt/lib/arm/adddf3vfp.S b/contrib/compiler-rt/lib/arm/adddf3vfp.S
index cced1e0..c90b0c2 100644
--- a/contrib/compiler-rt/lib/arm/adddf3vfp.S
+++ b/contrib/compiler-rt/lib/arm/adddf3vfp.S
@@ -15,10 +15,11 @@
// Adds two double precision floating point numbers using the Darwin
// calling convention where double arguments are passsed in GPR pairs
//
+ .syntax unified
.align 2
DEFINE_COMPILERRT_FUNCTION(__adddf3vfp)
- fmdrr d6, r0, r1 // move first param from r0/r1 pair into d6
- fmdrr d7, r2, r3 // move second param from r2/r3 pair into d7
- faddd d6, d6, d7
- fmrrd r0, r1, d6 // move result back to r0/r1 pair
+ vmov d6, r0, r1 // move first param from r0/r1 pair into d6
+ vmov d7, r2, r3 // move second param from r2/r3 pair into d7
+ vadd.f64 d6, d6, d7
+ vmov r0, r1, d6 // move result back to r0/r1 pair
bx lr
diff --git a/contrib/compiler-rt/lib/arm/addsf3vfp.S b/contrib/compiler-rt/lib/arm/addsf3vfp.S
index b747528..43653d5 100644
--- a/contrib/compiler-rt/lib/arm/addsf3vfp.S
+++ b/contrib/compiler-rt/lib/arm/addsf3vfp.S
@@ -15,10 +15,11 @@
// Adds two single precision floating point numbers using the Darwin
// calling convention where single arguments are passsed in GPRs
//
+ .syntax unified
.align 2
DEFINE_COMPILERRT_FUNCTION(__addsf3vfp)
- fmsr s14, r0 // move first param from r0 into float register
- fmsr s15, r1 // move second param from r1 into float register
- fadds s14, s14, s15
- fmrs r0, s14 // move result back to r0
+ vmov s14, r0 // move first param from r0 into float register
+ vmov s15, r1 // move second param from r1 into float register
+ vadd.f32 s14, s14, s15
+ vmov r0, s14 // move result back to r0
bx lr
diff --git a/contrib/compiler-rt/lib/arm/divdf3vfp.S b/contrib/compiler-rt/lib/arm/divdf3vfp.S
index 74ef0ea..52de67f 100644
--- a/contrib/compiler-rt/lib/arm/divdf3vfp.S
+++ b/contrib/compiler-rt/lib/arm/divdf3vfp.S
@@ -15,10 +15,11 @@
// Divides two double precision floating point numbers using the Darwin
// calling convention where double arguments are passsed in GPR pairs
//
+ .syntax unified
.align 2
DEFINE_COMPILERRT_FUNCTION(__divdf3vfp)
- fmdrr d6, r0, r1 // move first param from r0/r1 pair into d6
- fmdrr d7, r2, r3 // move second param from r2/r3 pair into d7
- fdivd d5, d6, d7
- fmrrd r0, r1, d5 // move result back to r0/r1 pair
+ vmov d6, r0, r1 // move first param from r0/r1 pair into d6
+ vmov d7, r2, r3 // move second param from r2/r3 pair into d7
+ vdiv.f64 d5, d6, d7
+ vmov r0, r1, d5 // move result back to r0/r1 pair
bx lr
diff --git a/contrib/compiler-rt/lib/arm/divsf3vfp.S b/contrib/compiler-rt/lib/arm/divsf3vfp.S
index 9eefcf31e..81ba903 100644
--- a/contrib/compiler-rt/lib/arm/divsf3vfp.S
+++ b/contrib/compiler-rt/lib/arm/divsf3vfp.S
@@ -15,10 +15,11 @@
// Divides two single precision floating point numbers using the Darwin
// calling convention where single arguments are passsed like 32-bit ints.
//
+ .syntax unified
.align 2
DEFINE_COMPILERRT_FUNCTION(__divsf3vfp)
- fmsr s14, r0 // move first param from r0 into float register
- fmsr s15, r1 // move second param from r1 into float register
- fdivs s13, s14, s15
- fmrs r0, s13 // move result back to r0
+ vmov s14, r0 // move first param from r0 into float register
+ vmov s15, r1 // move second param from r1 into float register
+ vdiv.f32 s13, s14, s15
+ vmov r0, s13 // move result back to r0
bx lr
diff --git a/contrib/compiler-rt/lib/arm/eqdf2vfp.S b/contrib/compiler-rt/lib/arm/eqdf2vfp.S
index 2998a76..c41e55a 100644
--- a/contrib/compiler-rt/lib/arm/eqdf2vfp.S
+++ b/contrib/compiler-rt/lib/arm/eqdf2vfp.S
@@ -16,12 +16,13 @@
// Uses Darwin calling convention where double precision arguments are passsed
// like in GPR pairs.
//
+ .syntax unified
.align 2
DEFINE_COMPILERRT_FUNCTION(__eqdf2vfp)
- fmdrr d6, r0, r1 // load r0/r1 pair in double register
- fmdrr d7, r2, r3 // load r2/r3 pair in double register
- fcmpd d6, d7
- fmstat
+ vmov d6, r0, r1 // load r0/r1 pair in double register
+ vmov d7, r2, r3 // load r2/r3 pair in double register
+ vcmp.f64 d6, d7
+ vmrs apsr_nzcv, fpscr
moveq r0, #1 // set result register to 1 if equal
movne r0, #0
bx lr
diff --git a/contrib/compiler-rt/lib/arm/eqsf2vfp.S b/contrib/compiler-rt/lib/arm/eqsf2vfp.S
index 927566e..730ef88 100644
--- a/contrib/compiler-rt/lib/arm/eqsf2vfp.S
+++ b/contrib/compiler-rt/lib/arm/eqsf2vfp.S
@@ -16,12 +16,13 @@
// Uses Darwin calling convention where single precision arguments are passsed
// like 32-bit ints
//
+ .syntax unified
.align 2
DEFINE_COMPILERRT_FUNCTION(__eqsf2vfp)
- fmsr s14, r0 // move from GPR 0 to float register
- fmsr s15, r1 // move from GPR 1 to float register
- fcmps s14, s15
- fmstat
+ vmov s14, r0 // move from GPR 0 to float register
+ vmov s15, r1 // move from GPR 1 to float register
+ vcmp.f32 s14, s15
+ vmrs apsr_nzcv, fpscr
moveq r0, #1 // set result register to 1 if equal
movne r0, #0
bx lr
diff --git a/contrib/compiler-rt/lib/arm/extendsfdf2vfp.S b/contrib/compiler-rt/lib/arm/extendsfdf2vfp.S
index b1aa88e..17a146e 100644
--- a/contrib/compiler-rt/lib/arm/extendsfdf2vfp.S
+++ b/contrib/compiler-rt/lib/arm/extendsfdf2vfp.S
@@ -16,9 +16,10 @@
// Uses Darwin calling convention where a single precision parameter is
// passed in a GPR and a double precision result is returned in R0/R1 pair.
//
+ .syntax unified
.align 2
DEFINE_COMPILERRT_FUNCTION(__extendsfdf2vfp)
- fmsr s15, r0 // load float register from R0
- fcvtds d7, s15 // convert single to double
- fmrrd r0, r1, d7 // return result in r0/r1 pair
+ vmov s15, r0 // load float register from R0
+ vcvt.f64.f32 d7, s15 // convert single to double
+ vmov r0, r1, d7 // return result in r0/r1 pair
bx lr
diff --git a/contrib/compiler-rt/lib/arm/fixdfsivfp.S b/contrib/compiler-rt/lib/arm/fixdfsivfp.S
index 0285a17..b7c3299 100644
--- a/contrib/compiler-rt/lib/arm/fixdfsivfp.S
+++ b/contrib/compiler-rt/lib/arm/fixdfsivfp.S
@@ -16,9 +16,10 @@
// Uses Darwin calling convention where a double precision parameter is
// passed in GPR register pair.
//
+ .syntax unified
.align 2
DEFINE_COMPILERRT_FUNCTION(__fixdfsivfp)
- fmdrr d7, r0, r1 // load double register from R0/R1
- ftosizd s15, d7 // convert double to 32-bit int into s15
- fmrs r0, s15 // move s15 to result register
+ vmov d7, r0, r1 // load double register from R0/R1
+ vcvt.s32.f64 s15, d7 // convert double to 32-bit int into s15
+ vmov r0, s15 // move s15 to result register
bx lr
diff --git a/contrib/compiler-rt/lib/arm/fixsfsivfp.S b/contrib/compiler-rt/lib/arm/fixsfsivfp.S
index d05ba74..1cea6a4 100644
--- a/contrib/compiler-rt/lib/arm/fixsfsivfp.S
+++ b/contrib/compiler-rt/lib/arm/fixsfsivfp.S
@@ -16,9 +16,10 @@
// Uses Darwin calling convention where a single precision parameter is
// passed in a GPR..
//
+ .syntax unified
.align 2
DEFINE_COMPILERRT_FUNCTION(__fixsfsivfp)
- fmsr s15, r0 // load float register from R0
- ftosizs s15, s15 // convert single to 32-bit int into s15
- fmrs r0, s15 // move s15 to result register
+ vmov s15, r0 // load float register from R0
+ vcvt.s32.f32 s15, s15 // convert single to 32-bit int into s15
+ vmov r0, s15 // move s15 to result register
bx lr
diff --git a/contrib/compiler-rt/lib/arm/fixunsdfsivfp.S b/contrib/compiler-rt/lib/arm/fixunsdfsivfp.S
index ddb703c..54b0359 100644
--- a/contrib/compiler-rt/lib/arm/fixunsdfsivfp.S
+++ b/contrib/compiler-rt/lib/arm/fixunsdfsivfp.S
@@ -17,9 +17,10 @@
// Uses Darwin calling convention where a double precision parameter is
// passed in GPR register pair.
//
+ .syntax unified
.align 2
DEFINE_COMPILERRT_FUNCTION(__fixunsdfsivfp)
- fmdrr d7, r0, r1 // load double register from R0/R1
- ftouizd s15, d7 // convert double to 32-bit int into s15
- fmrs r0, s15 // move s15 to result register
+ vmov d7, r0, r1 // load double register from R0/R1
+ vcvt.u32.f64 s15, d7 // convert double to 32-bit int into s15
+ vmov r0, s15 // move s15 to result register
bx lr
diff --git a/contrib/compiler-rt/lib/arm/fixunssfsivfp.S b/contrib/compiler-rt/lib/arm/fixunssfsivfp.S
index afbb64f..12adb52 100644
--- a/contrib/compiler-rt/lib/arm/fixunssfsivfp.S
+++ b/contrib/compiler-rt/lib/arm/fixunssfsivfp.S
@@ -17,9 +17,10 @@
// Uses Darwin calling convention where a single precision parameter is
// passed in a GPR..
//
+ .syntax unified
.align 2
DEFINE_COMPILERRT_FUNCTION(__fixunssfsivfp)
- fmsr s15, r0 // load float register from R0
- ftouizs s15, s15 // convert single to 32-bit unsigned into s15
- fmrs r0, s15 // move s15 to result register
+ vmov s15, r0 // load float register from R0
+ vcvt.u32.f32 s15, s15 // convert single to 32-bit unsigned into s15
+ vmov r0, s15 // move s15 to result register
bx lr
diff --git a/contrib/compiler-rt/lib/arm/floatsidfvfp.S b/contrib/compiler-rt/lib/arm/floatsidfvfp.S
index fe3366a..e6a1eb3 100644
--- a/contrib/compiler-rt/lib/arm/floatsidfvfp.S
+++ b/contrib/compiler-rt/lib/arm/floatsidfvfp.S
@@ -16,9 +16,10 @@
// Uses Darwin calling convention where a double precision result is
// return in GPR register pair.
//
+ .syntax unified
.align 2
DEFINE_COMPILERRT_FUNCTION(__floatsidfvfp)
- fmsr s15, r0 // move int to float register s15
- fsitod d7, s15 // convert 32-bit int in s15 to double in d7
- fmrrd r0, r1, d7 // move d7 to result register pair r0/r1
+ vmov s15, r0 // move int to float register s15
+ vcvt.f64.s32 d7, s15 // convert 32-bit int in s15 to double in d7
+ vmov r0, r1, d7 // move d7 to result register pair r0/r1
bx lr
diff --git a/contrib/compiler-rt/lib/arm/floatsisfvfp.S b/contrib/compiler-rt/lib/arm/floatsisfvfp.S
index 5b41610..0d3a24f 100644
--- a/contrib/compiler-rt/lib/arm/floatsisfvfp.S
+++ b/contrib/compiler-rt/lib/arm/floatsisfvfp.S
@@ -16,9 +16,10 @@
// Uses Darwin calling convention where a single precision result is
// return in a GPR..
//
+ .syntax unified
.align 2
DEFINE_COMPILERRT_FUNCTION(__floatsisfvfp)
- fmsr s15, r0 // move int to float register s15
- fsitos s15, s15 // convert 32-bit int in s15 to float in s15
- fmrs r0, s15 // move s15 to result register
+ vmov s15, r0 // move int to float register s15
+ vcvt.f32.s32 s15, s15 // convert 32-bit int in s15 to float in s15
+ vmov r0, s15 // move s15 to result register
bx lr
diff --git a/contrib/compiler-rt/lib/arm/floatunssidfvfp.S b/contrib/compiler-rt/lib/arm/floatunssidfvfp.S
index 9b22a6f..770b202 100644
--- a/contrib/compiler-rt/lib/arm/floatunssidfvfp.S
+++ b/contrib/compiler-rt/lib/arm/floatunssidfvfp.S
@@ -16,9 +16,10 @@
// Uses Darwin calling convention where a double precision result is
// return in GPR register pair.
//
+ .syntax unified
.align 2
DEFINE_COMPILERRT_FUNCTION(__floatunssidfvfp)
- fmsr s15, r0 // move int to float register s15
- fuitod d7, s15 // convert 32-bit int in s15 to double in d7
- fmrrd r0, r1, d7 // move d7 to result register pair r0/r1
+ vmov s15, r0 // move int to float register s15
+ vcvt.f64.u32 d7, s15 // convert 32-bit int in s15 to double in d7
+ vmov r0, r1, d7 // move d7 to result register pair r0/r1
bx lr
diff --git a/contrib/compiler-rt/lib/arm/floatunssisfvfp.S b/contrib/compiler-rt/lib/arm/floatunssisfvfp.S
index 44d5e93..16b3ffb 100644
--- a/contrib/compiler-rt/lib/arm/floatunssisfvfp.S
+++ b/contrib/compiler-rt/lib/arm/floatunssisfvfp.S
@@ -16,9 +16,10 @@
// Uses Darwin calling convention where a single precision result is
// return in a GPR..
//
+ .syntax unified
.align 2
DEFINE_COMPILERRT_FUNCTION(__floatunssisfvfp)
- fmsr s15, r0 // move int to float register s15
- fuitos s15, s15 // convert 32-bit int in s15 to float in s15
- fmrs r0, s15 // move s15 to result register
+ vmov s15, r0 // move int to float register s15
+ vcvt.f32.u32 s15, s15 // convert 32-bit int in s15 to float in s15
+ vmov r0, s15 // move s15 to result register
bx lr
diff --git a/contrib/compiler-rt/lib/arm/gedf2vfp.S b/contrib/compiler-rt/lib/arm/gedf2vfp.S
index 9993f52..55603b8 100644
--- a/contrib/compiler-rt/lib/arm/gedf2vfp.S
+++ b/contrib/compiler-rt/lib/arm/gedf2vfp.S
@@ -16,12 +16,13 @@
// Uses Darwin calling convention where double precision arguments are passsed
// like in GPR pairs.
//
+ .syntax unified
.align 2
DEFINE_COMPILERRT_FUNCTION(__gedf2vfp)
- fmdrr d6, r0, r1 // load r0/r1 pair in double register
- fmdrr d7, r2, r3 // load r2/r3 pair in double register
- fcmpd d6, d7
- fmstat
+ vmov d6, r0, r1 // load r0/r1 pair in double register
+ vmov d7, r2, r3 // load r2/r3 pair in double register
+ vcmp.f64 d6, d7
+ vmrs apsr_nzcv, fpscr
movge r0, #1 // set result register to 1 if greater than or equal
movlt r0, #0
bx lr
diff --git a/contrib/compiler-rt/lib/arm/gesf2vfp.S b/contrib/compiler-rt/lib/arm/gesf2vfp.S
index 9ce1682..02da35c 100644
--- a/contrib/compiler-rt/lib/arm/gesf2vfp.S
+++ b/contrib/compiler-rt/lib/arm/gesf2vfp.S
@@ -16,12 +16,13 @@
// Uses Darwin calling convention where single precision arguments are passsed
// like 32-bit ints
//
+ .syntax unified
.align 2
DEFINE_COMPILERRT_FUNCTION(__gesf2vfp)
- fmsr s14, r0 // move from GPR 0 to float register
- fmsr s15, r1 // move from GPR 1 to float register
- fcmps s14, s15
- fmstat
+ vmov s14, r0 // move from GPR 0 to float register
+ vmov s15, r1 // move from GPR 1 to float register
+ vcmp.f32 s14, s15
+ vmrs apsr_nzcv, fpscr
movge r0, #1 // set result register to 1 if greater than or equal
movlt r0, #0
bx lr
diff --git a/contrib/compiler-rt/lib/arm/gtdf2vfp.S b/contrib/compiler-rt/lib/arm/gtdf2vfp.S
index 8a049c8..b5b1e14 100644
--- a/contrib/compiler-rt/lib/arm/gtdf2vfp.S
+++ b/contrib/compiler-rt/lib/arm/gtdf2vfp.S
@@ -16,12 +16,13 @@
// Uses Darwin calling convention where double precision arguments are passsed
// like in GPR pairs.
//
+ .syntax unified
.align 2
DEFINE_COMPILERRT_FUNCTION(__gtdf2vfp)
- fmdrr d6, r0, r1 // load r0/r1 pair in double register
- fmdrr d7, r2, r3 // load r2/r3 pair in double register
- fcmpd d6, d7
- fmstat
+ vmov d6, r0, r1 // load r0/r1 pair in double register
+ vmov d7, r2, r3 // load r2/r3 pair in double register
+ vcmp.f64 d6, d7
+ vmrs apsr_nzcv, fpscr
movgt r0, #1 // set result register to 1 if equal
movle r0, #0
bx lr
diff --git a/contrib/compiler-rt/lib/arm/gtsf2vfp.S b/contrib/compiler-rt/lib/arm/gtsf2vfp.S
index 1ffe1ec..685a9ce 100644
--- a/contrib/compiler-rt/lib/arm/gtsf2vfp.S
+++ b/contrib/compiler-rt/lib/arm/gtsf2vfp.S
@@ -16,12 +16,13 @@
// Uses Darwin calling convention where single precision arguments are passsed
// like 32-bit ints
//
+ .syntax unified
.align 2
DEFINE_COMPILERRT_FUNCTION(__gtsf2vfp)
- fmsr s14, r0 // move from GPR 0 to float register
- fmsr s15, r1 // move from GPR 1 to float register
- fcmps s14, s15
- fmstat
+ vmov s14, r0 // move from GPR 0 to float register
+ vmov s15, r1 // move from GPR 1 to float register
+ vcmp.f32 s14, s15
+ vmrs apsr_nzcv, fpscr
movgt r0, #1 // set result register to 1 if equal
movle r0, #0
bx lr
diff --git a/contrib/compiler-rt/lib/arm/ledf2vfp.S b/contrib/compiler-rt/lib/arm/ledf2vfp.S
index a04d0f2..6e140dd 100644
--- a/contrib/compiler-rt/lib/arm/ledf2vfp.S
+++ b/contrib/compiler-rt/lib/arm/ledf2vfp.S
@@ -16,12 +16,13 @@
// Uses Darwin calling convention where double precision arguments are passsed
// like in GPR pairs.
//
+ .syntax unified
.align 2
DEFINE_COMPILERRT_FUNCTION(__ledf2vfp)
- fmdrr d6, r0, r1 // load r0/r1 pair in double register
- fmdrr d7, r2, r3 // load r2/r3 pair in double register
- fcmpd d6, d7
- fmstat
+ vmov d6, r0, r1 // load r0/r1 pair in double register
+ vmov d7, r2, r3 // load r2/r3 pair in double register
+ vcmp.f64 d6, d7
+ vmrs apsr_nzcv, fpscr
movls r0, #1 // set result register to 1 if equal
movhi r0, #0
bx lr
diff --git a/contrib/compiler-rt/lib/arm/lesf2vfp.S b/contrib/compiler-rt/lib/arm/lesf2vfp.S
index 3011200..7b28250 100644
--- a/contrib/compiler-rt/lib/arm/lesf2vfp.S
+++ b/contrib/compiler-rt/lib/arm/lesf2vfp.S
@@ -16,12 +16,13 @@
// Uses Darwin calling convention where single precision arguments are passsed
// like 32-bit ints
//
+ .syntax unified
.align 2
DEFINE_COMPILERRT_FUNCTION(__lesf2vfp)
- fmsr s14, r0 // move from GPR 0 to float register
- fmsr s15, r1 // move from GPR 1 to float register
- fcmps s14, s15
- fmstat
+ vmov s14, r0 // move from GPR 0 to float register
+ vmov s15, r1 // move from GPR 1 to float register
+ vcmp.f32 s14, s15
+ vmrs apsr_nzcv, fpscr
movls r0, #1 // set result register to 1 if equal
movhi r0, #0
bx lr
diff --git a/contrib/compiler-rt/lib/arm/ltdf2vfp.S b/contrib/compiler-rt/lib/arm/ltdf2vfp.S
index 87144a8..a09e67a 100644
--- a/contrib/compiler-rt/lib/arm/ltdf2vfp.S
+++ b/contrib/compiler-rt/lib/arm/ltdf2vfp.S
@@ -16,12 +16,13 @@
// Uses Darwin calling convention where double precision arguments are passsed
// like in GPR pairs.
//
+ .syntax unified
.align 2
DEFINE_COMPILERRT_FUNCTION(__ltdf2vfp)
- fmdrr d6, r0, r1 // load r0/r1 pair in double register
- fmdrr d7, r2, r3 // load r2/r3 pair in double register
- fcmpd d6, d7
- fmstat
+ vmov d6, r0, r1 // load r0/r1 pair in double register
+ vmov d7, r2, r3 // load r2/r3 pair in double register
+ vcmp.f64 d6, d7
+ vmrs apsr_nzcv, fpscr
movmi r0, #1 // set result register to 1 if equal
movpl r0, #0
bx lr
diff --git a/contrib/compiler-rt/lib/arm/ltsf2vfp.S b/contrib/compiler-rt/lib/arm/ltsf2vfp.S
index ca06ae2..8c7f9a8 100644
--- a/contrib/compiler-rt/lib/arm/ltsf2vfp.S
+++ b/contrib/compiler-rt/lib/arm/ltsf2vfp.S
@@ -16,12 +16,13 @@
// Uses Darwin calling convention where single precision arguments are passsed
// like 32-bit ints
//
+ .syntax unified
.align 2
DEFINE_COMPILERRT_FUNCTION(__ltsf2vfp)
- fmsr s14, r0 // move from GPR 0 to float register
- fmsr s15, r1 // move from GPR 1 to float register
- fcmps s14, s15
- fmstat
+ vmov s14, r0 // move from GPR 0 to float register
+ vmov s15, r1 // move from GPR 1 to float register
+ vcmp.f32 s14, s15
+ vmrs apsr_nzcv, fpscr
movmi r0, #1 // set result register to 1 if equal
movpl r0, #0
bx lr
diff --git a/contrib/compiler-rt/lib/arm/muldf3vfp.S b/contrib/compiler-rt/lib/arm/muldf3vfp.S
index 96bba06..838581e 100644
--- a/contrib/compiler-rt/lib/arm/muldf3vfp.S
+++ b/contrib/compiler-rt/lib/arm/muldf3vfp.S
@@ -15,10 +15,11 @@
// Multiplies two double precision floating point numbers using the Darwin
// calling convention where double arguments are passsed in GPR pairs
//
+ .syntax unified
.align 2
DEFINE_COMPILERRT_FUNCTION(__muldf3vfp)
- fmdrr d6, r0, r1 // move first param from r0/r1 pair into d6
- fmdrr d7, r2, r3 // move second param from r2/r3 pair into d7
- fmuld d6, d6, d7
- fmrrd r0, r1, d6 // move result back to r0/r1 pair
+ vmov d6, r0, r1 // move first param from r0/r1 pair into d6
+ vmov d7, r2, r3 // move second param from r2/r3 pair into d7
+ vmul.f64 d6, d6, d7
+ vmov r0, r1, d6 // move result back to r0/r1 pair
bx lr
diff --git a/contrib/compiler-rt/lib/arm/mulsf3vfp.S b/contrib/compiler-rt/lib/arm/mulsf3vfp.S
index c56991d..ea25913 100644
--- a/contrib/compiler-rt/lib/arm/mulsf3vfp.S
+++ b/contrib/compiler-rt/lib/arm/mulsf3vfp.S
@@ -15,10 +15,11 @@
// Multiplies two single precision floating point numbers using the Darwin
// calling convention where single arguments are passsed like 32-bit ints.
//
+ .syntax unified
.align 2
DEFINE_COMPILERRT_FUNCTION(__mulsf3vfp)
- fmsr s14, r0 // move first param from r0 into float register
- fmsr s15, r1 // move second param from r1 into float register
- fmuls s13, s14, s15
- fmrs r0, s13 // move result back to r0
+ vmov s14, r0 // move first param from r0 into float register
+ vmov s15, r1 // move second param from r1 into float register
+ vmul.f32 s13, s14, s15
+ vmov r0, s13 // move result back to r0
bx lr
diff --git a/contrib/compiler-rt/lib/arm/nedf2vfp.S b/contrib/compiler-rt/lib/arm/nedf2vfp.S
index a02b09c..2167081 100644
--- a/contrib/compiler-rt/lib/arm/nedf2vfp.S
+++ b/contrib/compiler-rt/lib/arm/nedf2vfp.S
@@ -16,12 +16,13 @@
// Uses Darwin calling convention where double precision arguments are passsed
// like in GPR pairs.
//
+ .syntax unified
.align 2
DEFINE_COMPILERRT_FUNCTION(__nedf2vfp)
- fmdrr d6, r0, r1 // load r0/r1 pair in double register
- fmdrr d7, r2, r3 // load r2/r3 pair in double register
- fcmpd d6, d7
- fmstat
+ vmov d6, r0, r1 // load r0/r1 pair in double register
+ vmov d7, r2, r3 // load r2/r3 pair in double register
+ vcmp.f64 d6, d7
+ vmrs apsr_nzcv, fpscr
movne r0, #1 // set result register to 0 if unequal
moveq r0, #0
bx lr
diff --git a/contrib/compiler-rt/lib/arm/negdf2vfp.S b/contrib/compiler-rt/lib/arm/negdf2vfp.S
index 100f4fd..64c9b69 100644
--- a/contrib/compiler-rt/lib/arm/negdf2vfp.S
+++ b/contrib/compiler-rt/lib/arm/negdf2vfp.S
@@ -15,6 +15,7 @@
// Returns the negation a double precision floating point numbers using the
// Darwin calling convention where double arguments are passsed in GPR pairs.
//
+ .syntax unified
.align 2
DEFINE_COMPILERRT_FUNCTION(__negdf2vfp)
eor r1, r1, #-2147483648 // flip sign bit on double in r0/r1 pair
diff --git a/contrib/compiler-rt/lib/arm/negsf2vfp.S b/contrib/compiler-rt/lib/arm/negsf2vfp.S
index f96c8ad..b883b73 100644
--- a/contrib/compiler-rt/lib/arm/negsf2vfp.S
+++ b/contrib/compiler-rt/lib/arm/negsf2vfp.S
@@ -15,6 +15,7 @@
// Returns the negation of a single precision floating point numbers using the
// Darwin calling convention where single arguments are passsed like 32-bit ints
//
+ .syntax unified
.align 2
DEFINE_COMPILERRT_FUNCTION(__negsf2vfp)
eor r0, r0, #-2147483648 // flip sign bit on float in r0
diff --git a/contrib/compiler-rt/lib/arm/nesf2vfp.S b/contrib/compiler-rt/lib/arm/nesf2vfp.S
index d620549..fa7aa80 100644
--- a/contrib/compiler-rt/lib/arm/nesf2vfp.S
+++ b/contrib/compiler-rt/lib/arm/nesf2vfp.S
@@ -16,12 +16,13 @@
// Uses Darwin calling convention where single precision arguments are passsed
// like 32-bit ints
//
+ .syntax unified
.align 2
DEFINE_COMPILERRT_FUNCTION(__nesf2vfp)
- fmsr s14, r0 // move from GPR 0 to float register
- fmsr s15, r1 // move from GPR 1 to float register
- fcmps s14, s15
- fmstat
+ vmov s14, r0 // move from GPR 0 to float register
+ vmov s15, r1 // move from GPR 1 to float register
+ vcmp.f32 s14, s15
+ vmrs apsr_nzcv, fpscr
movne r0, #1 // set result register to 1 if unequal
moveq r0, #0
bx lr
diff --git a/contrib/compiler-rt/lib/arm/subdf3vfp.S b/contrib/compiler-rt/lib/arm/subdf3vfp.S
index ff53b30..3f88baa 100644
--- a/contrib/compiler-rt/lib/arm/subdf3vfp.S
+++ b/contrib/compiler-rt/lib/arm/subdf3vfp.S
@@ -15,10 +15,11 @@
// Returns difference between two double precision floating point numbers using
// the Darwin calling convention where double arguments are passsed in GPR pairs
//
+ .syntax unified
.align 2
DEFINE_COMPILERRT_FUNCTION(__subdf3vfp)
- fmdrr d6, r0, r1 // move first param from r0/r1 pair into d6
- fmdrr d7, r2, r3 // move second param from r2/r3 pair into d7
- fsubd d6, d6, d7
- fmrrd r0, r1, d6 // move result back to r0/r1 pair
+ vmov d6, r0, r1 // move first param from r0/r1 pair into d6
+ vmov d7, r2, r3 // move second param from r2/r3 pair into d7
+ vsub.f64 d6, d6, d7
+ vmov r0, r1, d6 // move result back to r0/r1 pair
bx lr
diff --git a/contrib/compiler-rt/lib/arm/subsf3vfp.S b/contrib/compiler-rt/lib/arm/subsf3vfp.S
index 238f3f0..ed02ba9 100644
--- a/contrib/compiler-rt/lib/arm/subsf3vfp.S
+++ b/contrib/compiler-rt/lib/arm/subsf3vfp.S
@@ -16,10 +16,11 @@
// using the Darwin calling convention where single arguments are passsed
// like 32-bit ints.
//
+ .syntax unified
.align 2
DEFINE_COMPILERRT_FUNCTION(__subsf3vfp)
- fmsr s14, r0 // move first param from r0 into float register
- fmsr s15, r1 // move second param from r1 into float register
- fsubs s14, s14, s15
- fmrs r0, s14 // move result back to r0
+ vmov s14, r0 // move first param from r0 into float register
+ vmov s15, r1 // move second param from r1 into float register
+ vsub.f32 s14, s14, s15
+ vmov r0, s14 // move result back to r0
bx lr
diff --git a/contrib/compiler-rt/lib/arm/truncdfsf2vfp.S b/contrib/compiler-rt/lib/arm/truncdfsf2vfp.S
index 6e55c7f..371aee94 100644
--- a/contrib/compiler-rt/lib/arm/truncdfsf2vfp.S
+++ b/contrib/compiler-rt/lib/arm/truncdfsf2vfp.S
@@ -16,9 +16,10 @@
// Uses Darwin calling convention where a double precision parameter is
// passed in a R0/R1 pair and a signle precision result is returned in R0.
//
+ .syntax unified
.align 2
DEFINE_COMPILERRT_FUNCTION(__truncdfsf2vfp)
- fmdrr d7, r0, r1 // load double from r0/r1 pair
- fcvtsd s15, d7 // convert double to single (trucate precision)
- fmrs r0, s15 // return result in r0
+ vmov d7, r0, r1 // load double from r0/r1 pair
+ vcvt.f32.f64 s15, d7 // convert double to single (trucate precision)
+ vmov r0, s15 // return result in r0
bx lr
diff --git a/contrib/compiler-rt/lib/arm/unorddf2vfp.S b/contrib/compiler-rt/lib/arm/unorddf2vfp.S
index 9b52131..c49e55f 100644
--- a/contrib/compiler-rt/lib/arm/unorddf2vfp.S
+++ b/contrib/compiler-rt/lib/arm/unorddf2vfp.S
@@ -16,12 +16,13 @@
// Uses Darwin calling convention where double precision arguments are passsed
// like in GPR pairs.
//
+ .syntax unified
.align 2
DEFINE_COMPILERRT_FUNCTION(__unorddf2vfp)
- fmdrr d6, r0, r1 // load r0/r1 pair in double register
- fmdrr d7, r2, r3 // load r2/r3 pair in double register
- fcmpd d6, d7
- fmstat
+ vmov d6, r0, r1 // load r0/r1 pair in double register
+ vmov d7, r2, r3 // load r2/r3 pair in double register
+ vcmp.f64 d6, d7
+ vmrs apsr_nzcv, fpscr
movvs r0, #1 // set result register to 1 if "overflow" (any NaNs)
movvc r0, #0
bx lr
diff --git a/contrib/compiler-rt/lib/arm/unordsf2vfp.S b/contrib/compiler-rt/lib/arm/unordsf2vfp.S
index e486533..0ab27ed 100644
--- a/contrib/compiler-rt/lib/arm/unordsf2vfp.S
+++ b/contrib/compiler-rt/lib/arm/unordsf2vfp.S
@@ -16,12 +16,13 @@
// Uses Darwin calling convention where single precision arguments are passsed
// like 32-bit ints
//
+ .syntax unified
.align 2
DEFINE_COMPILERRT_FUNCTION(__unordsf2vfp)
- fmsr s14, r0 // move from GPR 0 to float register
- fmsr s15, r1 // move from GPR 1 to float register
- fcmps s14, s15
- fmstat
+ vmov s14, r0 // move from GPR 0 to float register
+ vmov s15, r1 // move from GPR 1 to float register
+ vcmp.f32 s14, s15
+ vmrs apsr_nzcv, fpscr
movvs r0, #1 // set result register to 1 if "overflow" (any NaNs)
movvc r0, #0
bx lr
diff --git a/contrib/compiler-rt/lib/ashldi3.c b/contrib/compiler-rt/lib/ashldi3.c
index adce4e2..6c558fe 100644
--- a/contrib/compiler-rt/lib/ashldi3.c
+++ b/contrib/compiler-rt/lib/ashldi3.c
@@ -11,7 +11,6 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
diff --git a/contrib/compiler-rt/lib/ashrdi3.c b/contrib/compiler-rt/lib/ashrdi3.c
index 03692a3..38ab716 100644
--- a/contrib/compiler-rt/lib/ashrdi3.c
+++ b/contrib/compiler-rt/lib/ashrdi3.c
@@ -11,7 +11,6 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
diff --git a/contrib/compiler-rt/lib/assembly.h b/contrib/compiler-rt/lib/assembly.h
index 0ce83ac..83bed12 100644
--- a/contrib/compiler-rt/lib/assembly.h
+++ b/contrib/compiler-rt/lib/assembly.h
@@ -35,15 +35,16 @@
#define SYMBOL_NAME(name) GLUE(__USER_LABEL_PREFIX__, name)
#ifdef VISIBILITY_HIDDEN
-#define DEFINE_COMPILERRT_FUNCTION(name) \
- .globl SYMBOL_NAME(name) SEPARATOR \
- HIDDEN_DIRECTIVE SYMBOL_NAME(name) SEPARATOR \
- SYMBOL_NAME(name):
+#define DECLARE_SYMBOL_VISIBILITY(name) \
+ HIDDEN_DIRECTIVE SYMBOL_NAME(name) SEPARATOR
#else
+#define DECLARE_SYMBOL_VISIBILITY(name)
+#endif
+
#define DEFINE_COMPILERRT_FUNCTION(name) \
.globl SYMBOL_NAME(name) SEPARATOR \
+ DECLARE_SYMBOL_VISIBILITY(name) \
SYMBOL_NAME(name):
-#endif
#define DEFINE_COMPILERRT_PRIVATE_FUNCTION(name) \
.globl SYMBOL_NAME(name) SEPARATOR \
diff --git a/contrib/compiler-rt/lib/clear_cache.c b/contrib/compiler-rt/lib/clear_cache.c
index 7b59a7f..b934fd4 100644
--- a/contrib/compiler-rt/lib/clear_cache.c
+++ b/contrib/compiler-rt/lib/clear_cache.c
@@ -9,7 +9,6 @@
*/
#include "int_lib.h"
-#include <stdlib.h>
#if __APPLE__
#include <libkern/OSCacheControl.h>
diff --git a/contrib/compiler-rt/lib/clzdi2.c b/contrib/compiler-rt/lib/clzdi2.c
index c281945..b9e64da 100644
--- a/contrib/compiler-rt/lib/clzdi2.c
+++ b/contrib/compiler-rt/lib/clzdi2.c
@@ -11,7 +11,6 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
diff --git a/contrib/compiler-rt/lib/clzsi2.c b/contrib/compiler-rt/lib/clzsi2.c
index d0a6aea..25b8ed2 100644
--- a/contrib/compiler-rt/lib/clzsi2.c
+++ b/contrib/compiler-rt/lib/clzsi2.c
@@ -11,7 +11,6 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
diff --git a/contrib/compiler-rt/lib/cmpdi2.c b/contrib/compiler-rt/lib/cmpdi2.c
index 999c3d2..c2b1f69 100644
--- a/contrib/compiler-rt/lib/cmpdi2.c
+++ b/contrib/compiler-rt/lib/cmpdi2.c
@@ -11,7 +11,6 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
diff --git a/contrib/compiler-rt/lib/ctzdi2.c b/contrib/compiler-rt/lib/ctzdi2.c
index b3d37d0..db3c6fd 100644
--- a/contrib/compiler-rt/lib/ctzdi2.c
+++ b/contrib/compiler-rt/lib/ctzdi2.c
@@ -11,7 +11,6 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
diff --git a/contrib/compiler-rt/lib/ctzsi2.c b/contrib/compiler-rt/lib/ctzsi2.c
index 2ff0e5d..c69486e 100644
--- a/contrib/compiler-rt/lib/ctzsi2.c
+++ b/contrib/compiler-rt/lib/ctzsi2.c
@@ -11,7 +11,6 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
diff --git a/contrib/compiler-rt/lib/divdc3.c b/contrib/compiler-rt/lib/divdc3.c
index 5f63298..cfbc498 100644
--- a/contrib/compiler-rt/lib/divdc3.c
+++ b/contrib/compiler-rt/lib/divdc3.c
@@ -13,8 +13,7 @@
*/
#include "int_lib.h"
-#include <math.h>
-#include <complex.h>
+#include "int_math.h"
/* Returns: the quotient of (a + ib) / (c + id) */
@@ -22,35 +21,37 @@ double _Complex
__divdc3(double __a, double __b, double __c, double __d)
{
int __ilogbw = 0;
- double __logbw = logb(fmax(fabs(__c), fabs(__d)));
- if (isfinite(__logbw))
+ double __logbw = crt_logb(crt_fmax(crt_fabs(__c), crt_fabs(__d)));
+ if (crt_isfinite(__logbw))
{
__ilogbw = (int)__logbw;
- __c = scalbn(__c, -__ilogbw);
- __d = scalbn(__d, -__ilogbw);
+ __c = crt_scalbn(__c, -__ilogbw);
+ __d = crt_scalbn(__d, -__ilogbw);
}
double __denom = __c * __c + __d * __d;
double _Complex z;
- __real__ z = scalbn((__a * __c + __b * __d) / __denom, -__ilogbw);
- __imag__ z = scalbn((__b * __c - __a * __d) / __denom, -__ilogbw);
- if (isnan(__real__ z) && isnan(__imag__ z))
+ __real__ z = crt_scalbn((__a * __c + __b * __d) / __denom, -__ilogbw);
+ __imag__ z = crt_scalbn((__b * __c - __a * __d) / __denom, -__ilogbw);
+ if (crt_isnan(__real__ z) && crt_isnan(__imag__ z))
{
- if ((__denom == 0.0) && (!isnan(__a) || !isnan(__b)))
+ if ((__denom == 0.0) && (!crt_isnan(__a) || !crt_isnan(__b)))
{
- __real__ z = copysign(INFINITY, __c) * __a;
- __imag__ z = copysign(INFINITY, __c) * __b;
+ __real__ z = crt_copysign(CRT_INFINITY, __c) * __a;
+ __imag__ z = crt_copysign(CRT_INFINITY, __c) * __b;
}
- else if ((isinf(__a) || isinf(__b)) && isfinite(__c) && isfinite(__d))
+ else if ((crt_isinf(__a) || crt_isinf(__b)) &&
+ crt_isfinite(__c) && crt_isfinite(__d))
{
- __a = copysign(isinf(__a) ? 1.0 : 0.0, __a);
- __b = copysign(isinf(__b) ? 1.0 : 0.0, __b);
- __real__ z = INFINITY * (__a * __c + __b * __d);
- __imag__ z = INFINITY * (__b * __c - __a * __d);
+ __a = crt_copysign(crt_isinf(__a) ? 1.0 : 0.0, __a);
+ __b = crt_copysign(crt_isinf(__b) ? 1.0 : 0.0, __b);
+ __real__ z = CRT_INFINITY * (__a * __c + __b * __d);
+ __imag__ z = CRT_INFINITY * (__b * __c - __a * __d);
}
- else if (isinf(__logbw) && __logbw > 0.0 && isfinite(__a) && isfinite(__b))
+ else if (crt_isinf(__logbw) && __logbw > 0.0 &&
+ crt_isfinite(__a) && crt_isfinite(__b))
{
- __c = copysign(isinf(__c) ? 1.0 : 0.0, __c);
- __d = copysign(isinf(__d) ? 1.0 : 0.0, __d);
+ __c = crt_copysign(crt_isinf(__c) ? 1.0 : 0.0, __c);
+ __d = crt_copysign(crt_isinf(__d) ? 1.0 : 0.0, __d);
__real__ z = 0.0 * (__a * __c + __b * __d);
__imag__ z = 0.0 * (__b * __c - __a * __d);
}
diff --git a/contrib/compiler-rt/lib/divdf3.c b/contrib/compiler-rt/lib/divdf3.c
index 925abd5..cc034dd 100644
--- a/contrib/compiler-rt/lib/divdf3.c
+++ b/contrib/compiler-rt/lib/divdf3.c
@@ -15,7 +15,6 @@
// underflow with correct rounding.
//
//===----------------------------------------------------------------------===//
-#include "abi.h"
#define DOUBLE_PRECISION
#include "fp_lib.h"
diff --git a/contrib/compiler-rt/lib/divdi3.c b/contrib/compiler-rt/lib/divdi3.c
index d62df56..2c2bcc2 100644
--- a/contrib/compiler-rt/lib/divdi3.c
+++ b/contrib/compiler-rt/lib/divdi3.c
@@ -11,7 +11,6 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
diff --git a/contrib/compiler-rt/lib/divmoddi4.c b/contrib/compiler-rt/lib/divmoddi4.c
index d3ca745..a2b8714 100644
--- a/contrib/compiler-rt/lib/divmoddi4.c
+++ b/contrib/compiler-rt/lib/divmoddi4.c
@@ -11,7 +11,6 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
diff --git a/contrib/compiler-rt/lib/divmodsi4.c b/contrib/compiler-rt/lib/divmodsi4.c
index 4dc1978..c7f7b1a 100644
--- a/contrib/compiler-rt/lib/divmodsi4.c
+++ b/contrib/compiler-rt/lib/divmodsi4.c
@@ -11,7 +11,6 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
diff --git a/contrib/compiler-rt/lib/divsc3.c b/contrib/compiler-rt/lib/divsc3.c
index a05f429..caa0c407 100644
--- a/contrib/compiler-rt/lib/divsc3.c
+++ b/contrib/compiler-rt/lib/divsc3.c
@@ -13,8 +13,7 @@
*/
#include "int_lib.h"
-#include <math.h>
-#include <complex.h>
+#include "int_math.h"
/* Returns: the quotient of (a + ib) / (c + id) */
@@ -22,35 +21,37 @@ float _Complex
__divsc3(float __a, float __b, float __c, float __d)
{
int __ilogbw = 0;
- float __logbw = logbf(fmaxf(fabsf(__c), fabsf(__d)));
- if (isfinite(__logbw))
+ float __logbw = crt_logbf(crt_fmaxf(crt_fabsf(__c), crt_fabsf(__d)));
+ if (crt_isfinite(__logbw))
{
__ilogbw = (int)__logbw;
- __c = scalbnf(__c, -__ilogbw);
- __d = scalbnf(__d, -__ilogbw);
+ __c = crt_scalbnf(__c, -__ilogbw);
+ __d = crt_scalbnf(__d, -__ilogbw);
}
float __denom = __c * __c + __d * __d;
float _Complex z;
- __real__ z = scalbnf((__a * __c + __b * __d) / __denom, -__ilogbw);
- __imag__ z = scalbnf((__b * __c - __a * __d) / __denom, -__ilogbw);
- if (isnan(__real__ z) && isnan(__imag__ z))
+ __real__ z = crt_scalbnf((__a * __c + __b * __d) / __denom, -__ilogbw);
+ __imag__ z = crt_scalbnf((__b * __c - __a * __d) / __denom, -__ilogbw);
+ if (crt_isnan(__real__ z) && crt_isnan(__imag__ z))
{
- if ((__denom == 0) && (!isnan(__a) || !isnan(__b)))
+ if ((__denom == 0) && (!crt_isnan(__a) || !crt_isnan(__b)))
{
- __real__ z = copysignf(INFINITY, __c) * __a;
- __imag__ z = copysignf(INFINITY, __c) * __b;
+ __real__ z = crt_copysignf(CRT_INFINITY, __c) * __a;
+ __imag__ z = crt_copysignf(CRT_INFINITY, __c) * __b;
}
- else if ((isinf(__a) || isinf(__b)) && isfinite(__c) && isfinite(__d))
+ else if ((crt_isinf(__a) || crt_isinf(__b)) &&
+ crt_isfinite(__c) && crt_isfinite(__d))
{
- __a = copysignf(isinf(__a) ? 1 : 0, __a);
- __b = copysignf(isinf(__b) ? 1 : 0, __b);
- __real__ z = INFINITY * (__a * __c + __b * __d);
- __imag__ z = INFINITY * (__b * __c - __a * __d);
+ __a = crt_copysignf(crt_isinf(__a) ? 1 : 0, __a);
+ __b = crt_copysignf(crt_isinf(__b) ? 1 : 0, __b);
+ __real__ z = CRT_INFINITY * (__a * __c + __b * __d);
+ __imag__ z = CRT_INFINITY * (__b * __c - __a * __d);
}
- else if (isinf(__logbw) && __logbw > 0 && isfinite(__a) && isfinite(__b))
+ else if (crt_isinf(__logbw) && __logbw > 0 &&
+ crt_isfinite(__a) && crt_isfinite(__b))
{
- __c = copysignf(isinf(__c) ? 1 : 0, __c);
- __d = copysignf(isinf(__d) ? 1 : 0, __d);
+ __c = crt_copysignf(crt_isinf(__c) ? 1 : 0, __c);
+ __d = crt_copysignf(crt_isinf(__d) ? 1 : 0, __d);
__real__ z = 0 * (__a * __c + __b * __d);
__imag__ z = 0 * (__b * __c - __a * __d);
}
diff --git a/contrib/compiler-rt/lib/divsf3.c b/contrib/compiler-rt/lib/divsf3.c
index b733307..a8230e4 100644
--- a/contrib/compiler-rt/lib/divsf3.c
+++ b/contrib/compiler-rt/lib/divsf3.c
@@ -15,7 +15,6 @@
// underflow with correct rounding.
//
//===----------------------------------------------------------------------===//
-#include "abi.h"
#define SINGLE_PRECISION
#include "fp_lib.h"
diff --git a/contrib/compiler-rt/lib/divsi3.c b/contrib/compiler-rt/lib/divsi3.c
index 01ef274..0d81cb8 100644
--- a/contrib/compiler-rt/lib/divsi3.c
+++ b/contrib/compiler-rt/lib/divsi3.c
@@ -11,7 +11,6 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
diff --git a/contrib/compiler-rt/lib/divxc3.c b/contrib/compiler-rt/lib/divxc3.c
index f054d40..5f240e9 100644
--- a/contrib/compiler-rt/lib/divxc3.c
+++ b/contrib/compiler-rt/lib/divxc3.c
@@ -14,8 +14,7 @@
#if !_ARCH_PPC
#include "int_lib.h"
-#include <math.h>
-#include <complex.h>
+#include "int_math.h"
/* Returns: the quotient of (a + ib) / (c + id) */
@@ -23,35 +22,37 @@ long double _Complex
__divxc3(long double __a, long double __b, long double __c, long double __d)
{
int __ilogbw = 0;
- long double __logbw = logbl(fmaxl(fabsl(__c), fabsl(__d)));
- if (isfinite(__logbw))
+ long double __logbw = crt_logbl(crt_fmaxl(crt_fabsl(__c), crt_fabsl(__d)));
+ if (crt_isfinite(__logbw))
{
__ilogbw = (int)__logbw;
- __c = scalbnl(__c, -__ilogbw);
- __d = scalbnl(__d, -__ilogbw);
+ __c = crt_scalbnl(__c, -__ilogbw);
+ __d = crt_scalbnl(__d, -__ilogbw);
}
long double __denom = __c * __c + __d * __d;
long double _Complex z;
- __real__ z = scalbnl((__a * __c + __b * __d) / __denom, -__ilogbw);
- __imag__ z = scalbnl((__b * __c - __a * __d) / __denom, -__ilogbw);
- if (isnan(__real__ z) && isnan(__imag__ z))
+ __real__ z = crt_scalbnl((__a * __c + __b * __d) / __denom, -__ilogbw);
+ __imag__ z = crt_scalbnl((__b * __c - __a * __d) / __denom, -__ilogbw);
+ if (crt_isnan(__real__ z) && crt_isnan(__imag__ z))
{
- if ((__denom == 0) && (!isnan(__a) || !isnan(__b)))
+ if ((__denom == 0) && (!crt_isnan(__a) || !crt_isnan(__b)))
{
- __real__ z = copysignl(INFINITY, __c) * __a;
- __imag__ z = copysignl(INFINITY, __c) * __b;
+ __real__ z = crt_copysignl(CRT_INFINITY, __c) * __a;
+ __imag__ z = crt_copysignl(CRT_INFINITY, __c) * __b;
}
- else if ((isinf(__a) || isinf(__b)) && isfinite(__c) && isfinite(__d))
+ else if ((crt_isinf(__a) || crt_isinf(__b)) &&
+ crt_isfinite(__c) && crt_isfinite(__d))
{
- __a = copysignl(isinf(__a) ? 1 : 0, __a);
- __b = copysignl(isinf(__b) ? 1 : 0, __b);
- __real__ z = INFINITY * (__a * __c + __b * __d);
- __imag__ z = INFINITY * (__b * __c - __a * __d);
+ __a = crt_copysignl(crt_isinf(__a) ? 1 : 0, __a);
+ __b = crt_copysignl(crt_isinf(__b) ? 1 : 0, __b);
+ __real__ z = CRT_INFINITY * (__a * __c + __b * __d);
+ __imag__ z = CRT_INFINITY * (__b * __c - __a * __d);
}
- else if (isinf(__logbw) && __logbw > 0 && isfinite(__a) && isfinite(__b))
+ else if (crt_isinf(__logbw) && __logbw > 0 &&
+ crt_isfinite(__a) && crt_isfinite(__b))
{
- __c = copysignl(isinf(__c) ? 1 : 0, __c);
- __d = copysignl(isinf(__d) ? 1 : 0, __d);
+ __c = crt_copysignl(crt_isinf(__c) ? 1 : 0, __c);
+ __d = crt_copysignl(crt_isinf(__d) ? 1 : 0, __d);
__real__ z = 0 * (__a * __c + __b * __d);
__imag__ z = 0 * (__b * __c - __a * __d);
}
diff --git a/contrib/compiler-rt/lib/enable_execute_stack.c b/contrib/compiler-rt/lib/enable_execute_stack.c
index 7ab8e8d..278ca24 100644
--- a/contrib/compiler-rt/lib/enable_execute_stack.c
+++ b/contrib/compiler-rt/lib/enable_execute_stack.c
@@ -8,7 +8,8 @@
* ===----------------------------------------------------------------------===
*/
-#include <stdint.h>
+#include "int_lib.h"
+
#include <sys/mman.h>
/* #include "config.h"
diff --git a/contrib/compiler-rt/lib/endianness.h b/contrib/compiler-rt/lib/endianness.h
deleted file mode 100644
index 9b7e7c1..0000000
--- a/contrib/compiler-rt/lib/endianness.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/* ===-- endianness.h - configuration header for compiler-rt ---------------===
- *
- * The LLVM Compiler Infrastructure
- *
- * This file is dual licensed under the MIT and the University of Illinois Open
- * Source Licenses. See LICENSE.TXT for details.
- *
- * ===----------------------------------------------------------------------===
- *
- * This file is a configuration header for compiler-rt.
- * This file is not part of the interface of this library.
- *
- * ===----------------------------------------------------------------------===
- */
-
-#ifndef ENDIANNESS_H
-#define ENDIANNESS_H
-
-/*
- * Known limitations:
- * Middle endian systems are not handled currently.
- */
-
-#if defined(__SVR4) && defined(__sun)
-#include <sys/byteorder.h>
-
-#if _BYTE_ORDER == _BIG_ENDIAN
-#define _YUGA_LITTLE_ENDIAN 0
-#define _YUGA_BIG_ENDIAN 1
-#elif _BYTE_ORDER == _LITTLE_ENDIAN
-#define _YUGA_LITTLE_ENDIAN 1
-#define _YUGA_BIG_ENDIAN 0
-#endif /* _BYTE_ORDER */
-
-#endif /* Solaris and AuroraUX. */
-
-/* .. */
-
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
-#include <sys/endian.h>
-
-#if _BYTE_ORDER == _BIG_ENDIAN
-#define _YUGA_LITTLE_ENDIAN 0
-#define _YUGA_BIG_ENDIAN 1
-#elif _BYTE_ORDER == _LITTLE_ENDIAN
-#define _YUGA_LITTLE_ENDIAN 1
-#define _YUGA_BIG_ENDIAN 0
-#endif /* _BYTE_ORDER */
-
-#endif /* *BSD */
-
-/* .. */
-
-/* Mac OSX has __BIG_ENDIAN__ or __LITTLE_ENDIAN__ automatically set by the compiler (at least with GCC) */
-#if defined(__APPLE__) && defined(__MACH__) || defined(__ellcc__ )
-
-#ifdef __BIG_ENDIAN__
-#if __BIG_ENDIAN__
-#define _YUGA_LITTLE_ENDIAN 0
-#define _YUGA_BIG_ENDIAN 1
-#endif
-#endif /* __BIG_ENDIAN__ */
-
-#ifdef __LITTLE_ENDIAN__
-#if __LITTLE_ENDIAN__
-#define _YUGA_LITTLE_ENDIAN 1
-#define _YUGA_BIG_ENDIAN 0
-#endif
-#endif /* __LITTLE_ENDIAN__ */
-
-#endif /* Mac OSX */
-
-/* .. */
-
-#if defined(__linux__)
-#include <endian.h>
-
-#if __BYTE_ORDER == __BIG_ENDIAN
-#define _YUGA_LITTLE_ENDIAN 0
-#define _YUGA_BIG_ENDIAN 1
-#elif __BYTE_ORDER == __LITTLE_ENDIAN
-#define _YUGA_LITTLE_ENDIAN 1
-#define _YUGA_BIG_ENDIAN 0
-#endif /* __BYTE_ORDER */
-
-#endif /* GNU/Linux */
-
-/* . */
-
-#if !defined(_YUGA_LITTLE_ENDIAN) || !defined(_YUGA_BIG_ENDIAN)
-#error Unable to determine endian
-#endif /* Check we found an endianness correctly. */
-
-#endif /* ENDIANNESS_H */
diff --git a/contrib/compiler-rt/lib/eprintf.c b/contrib/compiler-rt/lib/eprintf.c
index 7c79174..b07d624 100644
--- a/contrib/compiler-rt/lib/eprintf.c
+++ b/contrib/compiler-rt/lib/eprintf.c
@@ -12,7 +12,6 @@
#include "int_lib.h"
#include <stdio.h>
-#include <stdlib.h>
/*
diff --git a/contrib/compiler-rt/lib/extendsfdf2.c b/contrib/compiler-rt/lib/extendsfdf2.c
index c0b628d..9466de7 100644
--- a/contrib/compiler-rt/lib/extendsfdf2.c
+++ b/contrib/compiler-rt/lib/extendsfdf2.c
@@ -38,10 +38,7 @@
//
//===----------------------------------------------------------------------===//
-#include <stdint.h>
-#include <limits.h>
-
-#include "abi.h"
+#include "int_lib.h"
typedef float src_t;
typedef uint32_t src_rep_t;
diff --git a/contrib/compiler-rt/lib/ffsdi2.c b/contrib/compiler-rt/lib/ffsdi2.c
index 89f1b7b..a5ac990 100644
--- a/contrib/compiler-rt/lib/ffsdi2.c
+++ b/contrib/compiler-rt/lib/ffsdi2.c
@@ -11,7 +11,6 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
diff --git a/contrib/compiler-rt/lib/fixdfdi.c b/contrib/compiler-rt/lib/fixdfdi.c
index 85a456d..c6732db 100644
--- a/contrib/compiler-rt/lib/fixdfdi.c
+++ b/contrib/compiler-rt/lib/fixdfdi.c
@@ -11,7 +11,6 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
diff --git a/contrib/compiler-rt/lib/fixdfsi.c b/contrib/compiler-rt/lib/fixdfsi.c
index fbcf147..3d4379e 100644
--- a/contrib/compiler-rt/lib/fixdfsi.c
+++ b/contrib/compiler-rt/lib/fixdfsi.c
@@ -12,7 +12,6 @@
// conversion is undefined for out of range values in the C standard.
//
//===----------------------------------------------------------------------===//
-#include "abi.h"
#define DOUBLE_PRECISION
#include "fp_lib.h"
diff --git a/contrib/compiler-rt/lib/fixsfdi.c b/contrib/compiler-rt/lib/fixsfdi.c
index d80e33e..81ceab0 100644
--- a/contrib/compiler-rt/lib/fixsfdi.c
+++ b/contrib/compiler-rt/lib/fixsfdi.c
@@ -11,7 +11,6 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
diff --git a/contrib/compiler-rt/lib/fixsfsi.c b/contrib/compiler-rt/lib/fixsfsi.c
index 67749a5..f6de609 100644
--- a/contrib/compiler-rt/lib/fixsfsi.c
+++ b/contrib/compiler-rt/lib/fixsfsi.c
@@ -12,7 +12,6 @@
// conversion is undefined for out of range values in the C standard.
//
//===----------------------------------------------------------------------===//
-#include "abi.h"
#define SINGLE_PRECISION
#include "fp_lib.h"
diff --git a/contrib/compiler-rt/lib/fixunsdfdi.c b/contrib/compiler-rt/lib/fixunsdfdi.c
index d80b84a..c0ff160 100644
--- a/contrib/compiler-rt/lib/fixunsdfdi.c
+++ b/contrib/compiler-rt/lib/fixunsdfdi.c
@@ -11,7 +11,6 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
diff --git a/contrib/compiler-rt/lib/fixunsdfsi.c b/contrib/compiler-rt/lib/fixunsdfsi.c
index ecdfb5d..2ce4999 100644
--- a/contrib/compiler-rt/lib/fixunsdfsi.c
+++ b/contrib/compiler-rt/lib/fixunsdfsi.c
@@ -11,7 +11,6 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
diff --git a/contrib/compiler-rt/lib/fixunssfdi.c b/contrib/compiler-rt/lib/fixunssfdi.c
index 1506420..09078db 100644
--- a/contrib/compiler-rt/lib/fixunssfdi.c
+++ b/contrib/compiler-rt/lib/fixunssfdi.c
@@ -11,7 +11,6 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
/* Returns: convert a to a unsigned long long, rounding toward zero.
diff --git a/contrib/compiler-rt/lib/fixunssfsi.c b/contrib/compiler-rt/lib/fixunssfsi.c
index dbaa511..d80ed18 100644
--- a/contrib/compiler-rt/lib/fixunssfsi.c
+++ b/contrib/compiler-rt/lib/fixunssfsi.c
@@ -11,7 +11,6 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
diff --git a/contrib/compiler-rt/lib/floatdidf.c b/contrib/compiler-rt/lib/floatdidf.c
index 5ba9526..2af9e10 100644
--- a/contrib/compiler-rt/lib/floatdidf.c
+++ b/contrib/compiler-rt/lib/floatdidf.c
@@ -11,10 +11,8 @@
*
*===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
-#include <float.h>
/* Returns: convert a to a double, rounding toward even. */
@@ -30,7 +28,6 @@ ARM_EABI_FNALIAS(l2d, floatdidf);
/* Support for systems that have hardware floating-point; we'll set the inexact flag
* as a side-effect of this computation.
*/
-#include <stdint.h>
COMPILER_RT_ABI double
__floatdidf(di_int a)
diff --git a/contrib/compiler-rt/lib/floatdisf.c b/contrib/compiler-rt/lib/floatdisf.c
index 4dc13ca..6607307 100644
--- a/contrib/compiler-rt/lib/floatdisf.c
+++ b/contrib/compiler-rt/lib/floatdisf.c
@@ -12,9 +12,6 @@
*===----------------------------------------------------------------------===
*/
-#include "abi.h"
-#include <float.h>
-
/* Returns: convert a to a float, rounding toward even.*/
/* Assumption: float is a IEEE 32 bit floating point type
diff --git a/contrib/compiler-rt/lib/floatsidf.c b/contrib/compiler-rt/lib/floatsidf.c
index 7227335..74cb66b 100644
--- a/contrib/compiler-rt/lib/floatsidf.c
+++ b/contrib/compiler-rt/lib/floatsidf.c
@@ -12,7 +12,6 @@
// mode.
//
//===----------------------------------------------------------------------===//
-#include "abi.h"
#define DOUBLE_PRECISION
#include "fp_lib.h"
diff --git a/contrib/compiler-rt/lib/floatsisf.c b/contrib/compiler-rt/lib/floatsisf.c
index e5250ff..a981391 100644
--- a/contrib/compiler-rt/lib/floatsisf.c
+++ b/contrib/compiler-rt/lib/floatsisf.c
@@ -12,7 +12,6 @@
// mode.
//
//===----------------------------------------------------------------------===//
-#include "abi.h"
#define SINGLE_PRECISION
#include "fp_lib.h"
diff --git a/contrib/compiler-rt/lib/floattidf.c b/contrib/compiler-rt/lib/floattidf.c
index f61844d..3cafea8 100644
--- a/contrib/compiler-rt/lib/floattidf.c
+++ b/contrib/compiler-rt/lib/floattidf.c
@@ -15,7 +15,6 @@
#if __x86_64
#include "int_lib.h"
-#include <float.h>
/* Returns: convert a to a double, rounding toward even.*/
diff --git a/contrib/compiler-rt/lib/floattisf.c b/contrib/compiler-rt/lib/floattisf.c
index 7eb761d..ab33e4a 100644
--- a/contrib/compiler-rt/lib/floattisf.c
+++ b/contrib/compiler-rt/lib/floattisf.c
@@ -15,7 +15,6 @@
#if __x86_64
#include "int_lib.h"
-#include <float.h>
/* Returns: convert a to a float, rounding toward even. */
diff --git a/contrib/compiler-rt/lib/floattixf.c b/contrib/compiler-rt/lib/floattixf.c
index e4bcb5f..852acc7 100644
--- a/contrib/compiler-rt/lib/floattixf.c
+++ b/contrib/compiler-rt/lib/floattixf.c
@@ -15,7 +15,6 @@
#if __x86_64
#include "int_lib.h"
-#include <float.h>
/* Returns: convert a to a long double, rounding toward even. */
diff --git a/contrib/compiler-rt/lib/floatundidf.c b/contrib/compiler-rt/lib/floatundidf.c
index e74e9d8..6791701 100644
--- a/contrib/compiler-rt/lib/floatundidf.c
+++ b/contrib/compiler-rt/lib/floatundidf.c
@@ -12,9 +12,6 @@
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
-#include <float.h>
-
/* Returns: convert a to a double, rounding toward even. */
/* Assumption: double is a IEEE 64 bit floating point type
@@ -32,7 +29,6 @@ ARM_EABI_FNALIAS(ul2d, floatundidf);
* as a side-effect of this computation.
*/
-#include <stdint.h>
COMPILER_RT_ABI double
__floatundidf(du_int a)
diff --git a/contrib/compiler-rt/lib/floatundisf.c b/contrib/compiler-rt/lib/floatundisf.c
index eea45a7..1bf5fbb 100644
--- a/contrib/compiler-rt/lib/floatundisf.c
+++ b/contrib/compiler-rt/lib/floatundisf.c
@@ -12,9 +12,6 @@
*===----------------------------------------------------------------------===
*/
-#include "abi.h"
-#include <float.h>
-
/* Returns: convert a to a float, rounding toward even. */
/* Assumption: float is a IEEE 32 bit floating point type
diff --git a/contrib/compiler-rt/lib/floatunsidf.c b/contrib/compiler-rt/lib/floatunsidf.c
index 3756299..0722248 100644
--- a/contrib/compiler-rt/lib/floatunsidf.c
+++ b/contrib/compiler-rt/lib/floatunsidf.c
@@ -12,7 +12,6 @@
// mode.
//
//===----------------------------------------------------------------------===//
-#include "abi.h"
#define DOUBLE_PRECISION
#include "fp_lib.h"
diff --git a/contrib/compiler-rt/lib/floatunsisf.c b/contrib/compiler-rt/lib/floatunsisf.c
index 14ef103..3dc1cd4 100644
--- a/contrib/compiler-rt/lib/floatunsisf.c
+++ b/contrib/compiler-rt/lib/floatunsisf.c
@@ -12,7 +12,6 @@
// mode.
//
//===----------------------------------------------------------------------===//
-#include "abi.h"
#define SINGLE_PRECISION
#include "fp_lib.h"
diff --git a/contrib/compiler-rt/lib/floatuntidf.c b/contrib/compiler-rt/lib/floatuntidf.c
index bab7483..d0889a0 100644
--- a/contrib/compiler-rt/lib/floatuntidf.c
+++ b/contrib/compiler-rt/lib/floatuntidf.c
@@ -15,7 +15,6 @@
#if __x86_64
#include "int_lib.h"
-#include <float.h>
/* Returns: convert a to a double, rounding toward even. */
diff --git a/contrib/compiler-rt/lib/floatuntisf.c b/contrib/compiler-rt/lib/floatuntisf.c
index 0ab6d7e..f552758 100644
--- a/contrib/compiler-rt/lib/floatuntisf.c
+++ b/contrib/compiler-rt/lib/floatuntisf.c
@@ -15,7 +15,6 @@
#if __x86_64
#include "int_lib.h"
-#include <float.h>
/* Returns: convert a to a float, rounding toward even. */
diff --git a/contrib/compiler-rt/lib/floatuntixf.c b/contrib/compiler-rt/lib/floatuntixf.c
index a84709a..00c07d8 100644
--- a/contrib/compiler-rt/lib/floatuntixf.c
+++ b/contrib/compiler-rt/lib/floatuntixf.c
@@ -15,7 +15,6 @@
#if __x86_64
#include "int_lib.h"
-#include <float.h>
/* Returns: convert a to a long double, rounding toward even. */
diff --git a/contrib/compiler-rt/lib/fp_lib.h b/contrib/compiler-rt/lib/fp_lib.h
index 6c9455a..de5f17f 100644
--- a/contrib/compiler-rt/lib/fp_lib.h
+++ b/contrib/compiler-rt/lib/fp_lib.h
@@ -24,6 +24,7 @@
#include <stdint.h>
#include <stdbool.h>
#include <limits.h>
+#include "int_lib.h"
#if defined SINGLE_PRECISION
diff --git a/contrib/compiler-rt/lib/gcc_personality_v0.c b/contrib/compiler-rt/lib/gcc_personality_v0.c
index c840eef..8a708ca 100644
--- a/contrib/compiler-rt/lib/gcc_personality_v0.c
+++ b/contrib/compiler-rt/lib/gcc_personality_v0.c
@@ -9,10 +9,6 @@
*
*/
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-
#include "int_lib.h"
/*
@@ -202,7 +198,7 @@ _Unwind_Reason_Code __gcc_personality_v0(int version, _Unwind_Action actions,
/* There is nothing to do if there is no LSDA for this frame. */
const uint8_t* lsda = _Unwind_GetLanguageSpecificData(context);
- if ( lsda == NULL )
+ if ( lsda == (uint8_t*) 0 )
return _URC_CONTINUE_UNWIND;
uintptr_t pc = _Unwind_GetIP(context)-1;
diff --git a/contrib/compiler-rt/lib/int_endianness.h b/contrib/compiler-rt/lib/int_endianness.h
new file mode 100644
index 0000000..9466ed4
--- /dev/null
+++ b/contrib/compiler-rt/lib/int_endianness.h
@@ -0,0 +1,89 @@
+/* ===-- int_endianness.h - configuration header for compiler-rt ------------===
+ *
+ * The LLVM Compiler Infrastructure
+ *
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
+ *
+ * ===----------------------------------------------------------------------===
+ *
+ * This file is a configuration header for compiler-rt.
+ * This file is not part of the interface of this library.
+ *
+ * ===----------------------------------------------------------------------===
+ */
+
+#ifndef INT_ENDIANNESS_H
+#define INT_ENDIANNESS_H
+
+#if defined(__SVR4) && defined(__sun)
+#include <sys/byteorder.h>
+
+#if _BYTE_ORDER == _BIG_ENDIAN
+#define _YUGA_LITTLE_ENDIAN 0
+#define _YUGA_BIG_ENDIAN 1
+#elif _BYTE_ORDER == _LITTLE_ENDIAN
+#define _YUGA_LITTLE_ENDIAN 1
+#define _YUGA_BIG_ENDIAN 0
+#endif /* _BYTE_ORDER */
+
+#endif /* Solaris and AuroraUX. */
+
+/* .. */
+
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
+#include <sys/endian.h>
+
+#if _BYTE_ORDER == _BIG_ENDIAN
+#define _YUGA_LITTLE_ENDIAN 0
+#define _YUGA_BIG_ENDIAN 1
+#elif _BYTE_ORDER == _LITTLE_ENDIAN
+#define _YUGA_LITTLE_ENDIAN 1
+#define _YUGA_BIG_ENDIAN 0
+#endif /* _BYTE_ORDER */
+
+#endif /* *BSD */
+
+/* .. */
+
+/* Mac OSX has __BIG_ENDIAN__ or __LITTLE_ENDIAN__ automatically set by the compiler (at least with GCC) */
+#if defined(__APPLE__) && defined(__MACH__) || defined(__ellcc__ )
+
+#ifdef __BIG_ENDIAN__
+#if __BIG_ENDIAN__
+#define _YUGA_LITTLE_ENDIAN 0
+#define _YUGA_BIG_ENDIAN 1
+#endif
+#endif /* __BIG_ENDIAN__ */
+
+#ifdef __LITTLE_ENDIAN__
+#if __LITTLE_ENDIAN__
+#define _YUGA_LITTLE_ENDIAN 1
+#define _YUGA_BIG_ENDIAN 0
+#endif
+#endif /* __LITTLE_ENDIAN__ */
+
+#endif /* Mac OSX */
+
+/* .. */
+
+#if defined(__linux__)
+#include <endian.h>
+
+#if __BYTE_ORDER == __BIG_ENDIAN
+#define _YUGA_LITTLE_ENDIAN 0
+#define _YUGA_BIG_ENDIAN 1
+#elif __BYTE_ORDER == __LITTLE_ENDIAN
+#define _YUGA_LITTLE_ENDIAN 1
+#define _YUGA_BIG_ENDIAN 0
+#endif /* __BYTE_ORDER */
+
+#endif /* GNU/Linux */
+
+/* . */
+
+#if !defined(_YUGA_LITTLE_ENDIAN) || !defined(_YUGA_BIG_ENDIAN)
+#error Unable to determine endian
+#endif /* Check we found an endianness correctly. */
+
+#endif /* INT_ENDIANNESS_H */
diff --git a/contrib/compiler-rt/lib/int_lib.h b/contrib/compiler-rt/lib/int_lib.h
index e1fd6b7..2328a1d 100644
--- a/contrib/compiler-rt/lib/int_lib.h
+++ b/contrib/compiler-rt/lib/int_lib.h
@@ -16,141 +16,51 @@
#ifndef INT_LIB_H
#define INT_LIB_H
-/* Assumption: signed integral is 2's complement */
-/* Assumption: right shift of signed negative is arithmetic shift */
+/* Assumption: Signed integral is 2's complement. */
+/* Assumption: Right shift of signed negative is arithmetic shift. */
+/* Assumption: Endianness is little or big (not mixed). */
-#include <limits.h>
-#include <stdint.h>
-#include "endianness.h"
-#include <math.h>
+/* ABI macro definitions */
-/* If compiling for kernel use, call panic() instead of abort(). */
-#ifdef KERNEL_USE
-extern void panic (const char *, ...);
-#define compilerrt_abort() \
- panic("%s:%d: abort in %s", __FILE__, __LINE__, __FUNCTION__)
+#if __ARM_EABI__
+# define ARM_EABI_FNALIAS(aeabi_name, name) \
+ void __aeabi_##aeabi_name() __attribute__((alias("__" #name)));
+# define COMPILER_RT_ABI __attribute__((pcs("aapcs")))
#else
-#define compilerrt_abort() abort()
+# define ARM_EABI_FNALIAS(aeabi_name, name)
+# define COMPILER_RT_ABI
#endif
-#if !defined(INFINITY) && defined(HUGE_VAL)
-#define INFINITY HUGE_VAL
-#endif /* INFINITY */
-
-typedef int si_int;
-typedef unsigned su_int;
-
-typedef long long di_int;
-typedef unsigned long long du_int;
-
-typedef union
-{
- di_int all;
- struct
- {
-#if _YUGA_LITTLE_ENDIAN
- su_int low;
- si_int high;
-#else
- si_int high;
- su_int low;
-#endif /* _YUGA_LITTLE_ENDIAN */
- }s;
-} dwords;
-
-typedef union
-{
- du_int all;
- struct
- {
-#if _YUGA_LITTLE_ENDIAN
- su_int low;
- su_int high;
-#else
- su_int high;
- su_int low;
-#endif /* _YUGA_LITTLE_ENDIAN */
- }s;
-} udwords;
-
-#if __x86_64
-
-typedef int ti_int __attribute__ ((mode (TI)));
-typedef unsigned tu_int __attribute__ ((mode (TI)));
-
-typedef union
-{
- ti_int all;
- struct
- {
-#if _YUGA_LITTLE_ENDIAN
- du_int low;
- di_int high;
-#else
- di_int high;
- du_int low;
-#endif /* _YUGA_LITTLE_ENDIAN */
- }s;
-} twords;
-
-typedef union
-{
- tu_int all;
- struct
- {
-#if _YUGA_LITTLE_ENDIAN
- du_int low;
- du_int high;
-#else
- du_int high;
- du_int low;
-#endif /* _YUGA_LITTLE_ENDIAN */
- }s;
-} utwords;
-
-static inline ti_int make_ti(di_int h, di_int l) {
- twords r;
- r.s.high = h;
- r.s.low = l;
- return r.all;
-}
-
-static inline tu_int make_tu(du_int h, du_int l) {
- utwords r;
- r.s.high = h;
- r.s.low = l;
- return r.all;
-}
-
-#endif /* __x86_64 */
-
-typedef union
-{
- su_int u;
- float f;
-} float_bits;
+/* Include the standard compiler builtin headers we use functionality from. */
+#include <limits.h>
+#include <stdint.h>
+#include <stdbool.h>
+#include <float.h>
-typedef union
-{
- udwords u;
- double f;
-} double_bits;
+/* Include the commonly used internal type definitions. */
+#include "int_types.h"
-typedef struct
-{
-#if _YUGA_LITTLE_ENDIAN
- udwords low;
- udwords high;
-#else
- udwords high;
- udwords low;
-#endif /* _YUGA_LITTLE_ENDIAN */
-} uqwords;
+/* Include internal utility function declarations. */
+#include "int_util.h"
-typedef union
-{
- uqwords u;
- long double f;
-} long_double_bits;
+/*
+ * Workaround for LLVM bug 11663. Prevent endless recursion in
+ * __c?zdi2(), where calls to __builtin_c?z() are expanded to
+ * __c?zdi2() instead of __c?zsi2().
+ *
+ * Instead of placing this workaround in c?zdi2.c, put it in this
+ * global header to prevent other C files from making the detour
+ * through __c?zdi2() as well.
+ *
+ * This problem has only been observed on FreeBSD for sparc64 and
+ * mips64 with GCC 4.2.1.
+ */
+#if defined(__FreeBSD__) && (defined(__sparc64__) || \
+ defined(__mips_n64) || defined(__mips_o64))
+si_int __clzsi2(si_int);
+si_int __ctzsi2(si_int);
+#define __builtin_clz __clzsi2
+#define __builtin_ctz __ctzsi2
+#endif
#endif /* INT_LIB_H */
diff --git a/contrib/compiler-rt/lib/int_math.h b/contrib/compiler-rt/lib/int_math.h
new file mode 100644
index 0000000..d6b4bda
--- /dev/null
+++ b/contrib/compiler-rt/lib/int_math.h
@@ -0,0 +1,67 @@
+/* ===-- int_math.h - internal math inlines ---------------------------------===
+ *
+ * The LLVM Compiler Infrastructure
+ *
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
+ *
+ * ===-----------------------------------------------------------------------===
+ *
+ * This file is not part of the interface of this library.
+ *
+ * This file defines substitutes for the libm functions used in some of the
+ * compiler-rt implementations, defined in such a way that there is not a direct
+ * dependency on libm or math.h. Instead, we use the compiler builtin versions
+ * where available. This reduces our dependencies on the system SDK by foisting
+ * the responsibility onto the compiler.
+ *
+ * ===-----------------------------------------------------------------------===
+ */
+
+#ifndef INT_MATH_H
+#define INT_MATH_H
+
+#ifndef __has_builtin
+# define __has_builtin(x) 0
+#endif
+
+#define CRT_INFINITY __builtin_huge_valf()
+
+#define crt_isinf(x) __builtin_isinf((x))
+#define crt_isnan(x) __builtin_isnan((x))
+
+/* Define crt_isfinite in terms of the builtin if available, otherwise provide
+ * an alternate version in terms of our other functions. This supports some
+ * versions of GCC which didn't have __builtin_isfinite.
+ */
+#if __has_builtin(__builtin_isfinite)
+# define crt_isfinite(x) __builtin_isfinite((x))
+#else
+# define crt_isfinite(x) \
+ __extension__(({ \
+ __typeof((x)) x_ = (x); \
+ !crt_isinf(x_) && !crt_isnan(x_); \
+ }))
+#endif
+
+#define crt_copysign(x, y) __builtin_copysign((x), (y))
+#define crt_copysignf(x, y) __builtin_copysignf((x), (y))
+#define crt_copysignl(x, y) __builtin_copysignl((x), (y))
+
+#define crt_fabs(x) __builtin_fabs((x))
+#define crt_fabsf(x) __builtin_fabsf((x))
+#define crt_fabsl(x) __builtin_fabsl((x))
+
+#define crt_fmax(x, y) __builtin_fmax((x), (y))
+#define crt_fmaxf(x, y) __builtin_fmaxf((x), (y))
+#define crt_fmaxl(x, y) __builtin_fmaxl((x), (y))
+
+#define crt_logb(x) __builtin_logb((x))
+#define crt_logbf(x) __builtin_logbf((x))
+#define crt_logbl(x) __builtin_logbl((x))
+
+#define crt_scalbn(x, y) __builtin_scalbn((x), (y))
+#define crt_scalbnf(x, y) __builtin_scalbnf((x), (y))
+#define crt_scalbnl(x, y) __builtin_scalbnl((x), (y))
+
+#endif /* INT_MATH_H */
diff --git a/contrib/compiler-rt/lib/int_types.h b/contrib/compiler-rt/lib/int_types.h
new file mode 100644
index 0000000..fcce390
--- /dev/null
+++ b/contrib/compiler-rt/lib/int_types.h
@@ -0,0 +1,140 @@
+/* ===-- int_lib.h - configuration header for compiler-rt -----------------===
+ *
+ * The LLVM Compiler Infrastructure
+ *
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
+ *
+ * ===----------------------------------------------------------------------===
+ *
+ * This file is not part of the interface of this library.
+ *
+ * This file defines various standard types, most importantly a number of unions
+ * used to access parts of larger types.
+ *
+ * ===----------------------------------------------------------------------===
+ */
+
+#ifndef INT_TYPES_H
+#define INT_TYPES_H
+
+#include "int_endianness.h"
+
+typedef int si_int;
+typedef unsigned su_int;
+
+typedef long long di_int;
+typedef unsigned long long du_int;
+
+typedef union
+{
+ di_int all;
+ struct
+ {
+#if _YUGA_LITTLE_ENDIAN
+ su_int low;
+ si_int high;
+#else
+ si_int high;
+ su_int low;
+#endif /* _YUGA_LITTLE_ENDIAN */
+ }s;
+} dwords;
+
+typedef union
+{
+ du_int all;
+ struct
+ {
+#if _YUGA_LITTLE_ENDIAN
+ su_int low;
+ su_int high;
+#else
+ su_int high;
+ su_int low;
+#endif /* _YUGA_LITTLE_ENDIAN */
+ }s;
+} udwords;
+
+#if __x86_64
+
+typedef int ti_int __attribute__ ((mode (TI)));
+typedef unsigned tu_int __attribute__ ((mode (TI)));
+
+typedef union
+{
+ ti_int all;
+ struct
+ {
+#if _YUGA_LITTLE_ENDIAN
+ du_int low;
+ di_int high;
+#else
+ di_int high;
+ du_int low;
+#endif /* _YUGA_LITTLE_ENDIAN */
+ }s;
+} twords;
+
+typedef union
+{
+ tu_int all;
+ struct
+ {
+#if _YUGA_LITTLE_ENDIAN
+ du_int low;
+ du_int high;
+#else
+ du_int high;
+ du_int low;
+#endif /* _YUGA_LITTLE_ENDIAN */
+ }s;
+} utwords;
+
+static inline ti_int make_ti(di_int h, di_int l) {
+ twords r;
+ r.s.high = h;
+ r.s.low = l;
+ return r.all;
+}
+
+static inline tu_int make_tu(du_int h, du_int l) {
+ utwords r;
+ r.s.high = h;
+ r.s.low = l;
+ return r.all;
+}
+
+#endif /* __x86_64 */
+
+typedef union
+{
+ su_int u;
+ float f;
+} float_bits;
+
+typedef union
+{
+ udwords u;
+ double f;
+} double_bits;
+
+typedef struct
+{
+#if _YUGA_LITTLE_ENDIAN
+ udwords low;
+ udwords high;
+#else
+ udwords high;
+ udwords low;
+#endif /* _YUGA_LITTLE_ENDIAN */
+} uqwords;
+
+typedef union
+{
+ uqwords u;
+ long double f;
+} long_double_bits;
+
+#endif /* INT_TYPES_H */
+
diff --git a/contrib/compiler-rt/lib/int_util.c b/contrib/compiler-rt/lib/int_util.c
new file mode 100644
index 0000000..f194768
--- /dev/null
+++ b/contrib/compiler-rt/lib/int_util.c
@@ -0,0 +1,43 @@
+/* ===-- int_util.c - Implement internal utilities --------------------------===
+ *
+ * The LLVM Compiler Infrastructure
+ *
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
+ *
+ * ===----------------------------------------------------------------------===
+ */
+
+#include "int_util.h"
+#include "int_lib.h"
+
+/* NOTE: The definitions in this file are declared weak because we clients to be
+ * able to arbitrarily package individual functions into separate .a files. If
+ * we did not declare these weak, some link situations might end up seeing
+ * duplicate strong definitions of the same symbol.
+ *
+ * We can't use this solution for kernel use (which may not support weak), but
+ * currently expect that when built for kernel use all the functionality is
+ * packaged into a single library.
+ */
+
+#ifdef KERNEL_USE
+
+extern void panic(const char *, ...) __attribute__((noreturn));
+__attribute__((visibility("hidden")))
+void compilerrt_abort_impl(const char *file, int line, const char *function) {
+ panic("%s:%d: abort in %s", file, line, function);
+}
+
+#else
+
+/* Get the system definition of abort() */
+#include <stdlib.h>
+
+__attribute__((weak))
+__attribute__((visibility("hidden")))
+void compilerrt_abort_impl(const char *file, int line, const char *function) {
+ abort();
+}
+
+#endif
diff --git a/contrib/compiler-rt/lib/int_util.h b/contrib/compiler-rt/lib/int_util.h
new file mode 100644
index 0000000..17d7722
--- /dev/null
+++ b/contrib/compiler-rt/lib/int_util.h
@@ -0,0 +1,32 @@
+/* ===-- int_util.h - internal utility functions ----------------------------===
+ *
+ * The LLVM Compiler Infrastructure
+ *
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
+ *
+ * ===-----------------------------------------------------------------------===
+ *
+ * This file is not part of the interface of this library.
+ *
+ * This file defines non-inline utilities which are available for use in the
+ * library. The function definitions themselves are all contained in int_util.c
+ * which will always be compiled into any compiler-rt library.
+ *
+ * ===-----------------------------------------------------------------------===
+ */
+
+#ifndef INT_UTIL_H
+#define INT_UTIL_H
+
+/** \brief Trigger a program abort (or panic for kernel code). */
+#define compilerrt_abort() compilerrt_abort_impl(__FILE__, __LINE__, \
+ __FUNCTION__)
+void compilerrt_abort_impl(const char *file, int line,
+ const char *function)
+#ifndef KERNEL_USE
+ __attribute__((weak))
+#endif
+ __attribute__((noreturn)) __attribute__((visibility("hidden")));
+
+#endif /* INT_UTIL_H */
diff --git a/contrib/compiler-rt/lib/lshrdi3.c b/contrib/compiler-rt/lib/lshrdi3.c
index 911edb1..8af3e0c 100644
--- a/contrib/compiler-rt/lib/lshrdi3.c
+++ b/contrib/compiler-rt/lib/lshrdi3.c
@@ -11,7 +11,6 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
diff --git a/contrib/compiler-rt/lib/moddi3.c b/contrib/compiler-rt/lib/moddi3.c
index af0a8083..2f3b9cc 100644
--- a/contrib/compiler-rt/lib/moddi3.c
+++ b/contrib/compiler-rt/lib/moddi3.c
@@ -11,7 +11,6 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
diff --git a/contrib/compiler-rt/lib/modsi3.c b/contrib/compiler-rt/lib/modsi3.c
index 05ce806..d16213c 100644
--- a/contrib/compiler-rt/lib/modsi3.c
+++ b/contrib/compiler-rt/lib/modsi3.c
@@ -11,7 +11,6 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
diff --git a/contrib/compiler-rt/lib/muldc3.c b/contrib/compiler-rt/lib/muldc3.c
index 9f9bd2a..5f4a6d1 100644
--- a/contrib/compiler-rt/lib/muldc3.c
+++ b/contrib/compiler-rt/lib/muldc3.c
@@ -13,8 +13,7 @@
*/
#include "int_lib.h"
-#include <math.h>
-#include <complex.h>
+#include "int_math.h"
/* Returns: the product of a + ib and c + id */
@@ -28,46 +27,46 @@ __muldc3(double __a, double __b, double __c, double __d)
double _Complex z;
__real__ z = __ac - __bd;
__imag__ z = __ad + __bc;
- if (isnan(__real__ z) && isnan(__imag__ z))
+ if (crt_isnan(__real__ z) && crt_isnan(__imag__ z))
{
int __recalc = 0;
- if (isinf(__a) || isinf(__b))
+ if (crt_isinf(__a) || crt_isinf(__b))
{
- __a = copysign(isinf(__a) ? 1 : 0, __a);
- __b = copysign(isinf(__b) ? 1 : 0, __b);
- if (isnan(__c))
- __c = copysign(0, __c);
- if (isnan(__d))
- __d = copysign(0, __d);
+ __a = crt_copysign(crt_isinf(__a) ? 1 : 0, __a);
+ __b = crt_copysign(crt_isinf(__b) ? 1 : 0, __b);
+ if (crt_isnan(__c))
+ __c = crt_copysign(0, __c);
+ if (crt_isnan(__d))
+ __d = crt_copysign(0, __d);
__recalc = 1;
}
- if (isinf(__c) || isinf(__d))
+ if (crt_isinf(__c) || crt_isinf(__d))
{
- __c = copysign(isinf(__c) ? 1 : 0, __c);
- __d = copysign(isinf(__d) ? 1 : 0, __d);
- if (isnan(__a))
- __a = copysign(0, __a);
- if (isnan(__b))
- __b = copysign(0, __b);
+ __c = crt_copysign(crt_isinf(__c) ? 1 : 0, __c);
+ __d = crt_copysign(crt_isinf(__d) ? 1 : 0, __d);
+ if (crt_isnan(__a))
+ __a = crt_copysign(0, __a);
+ if (crt_isnan(__b))
+ __b = crt_copysign(0, __b);
__recalc = 1;
}
- if (!__recalc && (isinf(__ac) || isinf(__bd) ||
- isinf(__ad) || isinf(__bc)))
+ if (!__recalc && (crt_isinf(__ac) || crt_isinf(__bd) ||
+ crt_isinf(__ad) || crt_isinf(__bc)))
{
- if (isnan(__a))
- __a = copysign(0, __a);
- if (isnan(__b))
- __b = copysign(0, __b);
- if (isnan(__c))
- __c = copysign(0, __c);
- if (isnan(__d))
- __d = copysign(0, __d);
+ if (crt_isnan(__a))
+ __a = crt_copysign(0, __a);
+ if (crt_isnan(__b))
+ __b = crt_copysign(0, __b);
+ if (crt_isnan(__c))
+ __c = crt_copysign(0, __c);
+ if (crt_isnan(__d))
+ __d = crt_copysign(0, __d);
__recalc = 1;
}
if (__recalc)
{
- __real__ z = INFINITY * (__a * __c - __b * __d);
- __imag__ z = INFINITY * (__a * __d + __b * __c);
+ __real__ z = CRT_INFINITY * (__a * __c - __b * __d);
+ __imag__ z = CRT_INFINITY * (__a * __d + __b * __c);
}
}
return z;
diff --git a/contrib/compiler-rt/lib/muldf3.c b/contrib/compiler-rt/lib/muldf3.c
index f402cfb..86d72d8 100644
--- a/contrib/compiler-rt/lib/muldf3.c
+++ b/contrib/compiler-rt/lib/muldf3.c
@@ -11,7 +11,6 @@
// with the IEEE-754 default rounding (to nearest, ties to even).
//
//===----------------------------------------------------------------------===//
-#include "abi.h"
#define DOUBLE_PRECISION
#include "fp_lib.h"
diff --git a/contrib/compiler-rt/lib/muldi3.c b/contrib/compiler-rt/lib/muldi3.c
index e6322bf..3e99630 100644
--- a/contrib/compiler-rt/lib/muldi3.c
+++ b/contrib/compiler-rt/lib/muldi3.c
@@ -11,7 +11,6 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
diff --git a/contrib/compiler-rt/lib/mulodi4.c b/contrib/compiler-rt/lib/mulodi4.c
new file mode 100644
index 0000000..0c1b5cd
--- /dev/null
+++ b/contrib/compiler-rt/lib/mulodi4.c
@@ -0,0 +1,58 @@
+/*===-- mulodi4.c - Implement __mulodi4 -----------------------------------===
+ *
+ * The LLVM Compiler Infrastructure
+ *
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
+ *
+ * ===----------------------------------------------------------------------===
+ *
+ * This file implements __mulodi4 for the compiler_rt library.
+ *
+ * ===----------------------------------------------------------------------===
+ */
+
+#include "int_lib.h"
+
+/* Returns: a * b */
+
+/* Effects: sets *overflow to 1 if a * b overflows */
+
+di_int
+__mulodi4(di_int a, di_int b, int* overflow)
+{
+ const int N = (int)(sizeof(di_int) * CHAR_BIT);
+ const di_int MIN = (di_int)1 << (N-1);
+ const di_int MAX = ~MIN;
+ *overflow = 0;
+ di_int result = a * b;
+ if (a == MIN)
+ {
+ if (b != 0 && b != 1)
+ *overflow = 1;
+ return result;
+ }
+ if (b == MIN)
+ {
+ if (a != 0 && a != 1)
+ *overflow = 1;
+ return result;
+ }
+ di_int sa = a >> (N - 1);
+ di_int abs_a = (a ^ sa) - sa;
+ di_int sb = b >> (N - 1);
+ di_int abs_b = (b ^ sb) - sb;
+ if (abs_a < 2 || abs_b < 2)
+ return result;
+ if (sa == sb)
+ {
+ if (abs_a > MAX / abs_b)
+ *overflow = 1;
+ }
+ else
+ {
+ if (abs_a > MIN / -abs_b)
+ *overflow = 1;
+ }
+ return result;
+}
diff --git a/contrib/compiler-rt/lib/mulosi4.c b/contrib/compiler-rt/lib/mulosi4.c
new file mode 100644
index 0000000..f3398d1
--- /dev/null
+++ b/contrib/compiler-rt/lib/mulosi4.c
@@ -0,0 +1,58 @@
+/*===-- mulosi4.c - Implement __mulosi4 -----------------------------------===
+ *
+ * The LLVM Compiler Infrastructure
+ *
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
+ *
+ * ===----------------------------------------------------------------------===
+ *
+ * This file implements __mulosi4 for the compiler_rt library.
+ *
+ * ===----------------------------------------------------------------------===
+ */
+
+#include "int_lib.h"
+
+/* Returns: a * b */
+
+/* Effects: sets *overflow to 1 if a * b overflows */
+
+si_int
+__mulosi4(si_int a, si_int b, int* overflow)
+{
+ const int N = (int)(sizeof(si_int) * CHAR_BIT);
+ const si_int MIN = (si_int)1 << (N-1);
+ const si_int MAX = ~MIN;
+ *overflow = 0;
+ si_int result = a * b;
+ if (a == MIN)
+ {
+ if (b != 0 && b != 1)
+ *overflow = 1;
+ return result;
+ }
+ if (b == MIN)
+ {
+ if (a != 0 && a != 1)
+ *overflow = 1;
+ return result;
+ }
+ si_int sa = a >> (N - 1);
+ si_int abs_a = (a ^ sa) - sa;
+ si_int sb = b >> (N - 1);
+ si_int abs_b = (b ^ sb) - sb;
+ if (abs_a < 2 || abs_b < 2)
+ return result;
+ if (sa == sb)
+ {
+ if (abs_a > MAX / abs_b)
+ *overflow = 1;
+ }
+ else
+ {
+ if (abs_a > MIN / -abs_b)
+ *overflow = 1;
+ }
+ return result;
+}
diff --git a/contrib/compiler-rt/lib/muloti4.c b/contrib/compiler-rt/lib/muloti4.c
new file mode 100644
index 0000000..1fcd0ba
--- /dev/null
+++ b/contrib/compiler-rt/lib/muloti4.c
@@ -0,0 +1,62 @@
+/*===-- muloti4.c - Implement __muloti4 -----------------------------------===
+ *
+ * The LLVM Compiler Infrastructure
+ *
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
+ *
+ * ===----------------------------------------------------------------------===
+ *
+ * This file implements __muloti4 for the compiler_rt library.
+ *
+ * ===----------------------------------------------------------------------===
+ */
+
+#if __x86_64
+
+#include "int_lib.h"
+
+/* Returns: a * b */
+
+/* Effects: sets *overflow to 1 if a * b overflows */
+
+ti_int
+__muloti4(ti_int a, ti_int b, int* overflow)
+{
+ const int N = (int)(sizeof(ti_int) * CHAR_BIT);
+ const ti_int MIN = (ti_int)1 << (N-1);
+ const ti_int MAX = ~MIN;
+ *overflow = 0;
+ ti_int result = a * b;
+ if (a == MIN)
+ {
+ if (b != 0 && b != 1)
+ *overflow = 1;
+ return result;
+ }
+ if (b == MIN)
+ {
+ if (a != 0 && a != 1)
+ *overflow = 1;
+ return result;
+ }
+ ti_int sa = a >> (N - 1);
+ ti_int abs_a = (a ^ sa) - sa;
+ ti_int sb = b >> (N - 1);
+ ti_int abs_b = (b ^ sb) - sb;
+ if (abs_a < 2 || abs_b < 2)
+ return result;
+ if (sa == sb)
+ {
+ if (abs_a > MAX / abs_b)
+ *overflow = 1;
+ }
+ else
+ {
+ if (abs_a > MIN / -abs_b)
+ *overflow = 1;
+ }
+ return result;
+}
+
+#endif
diff --git a/contrib/compiler-rt/lib/mulsc3.c b/contrib/compiler-rt/lib/mulsc3.c
index a878ba1..6d433fb 100644
--- a/contrib/compiler-rt/lib/mulsc3.c
+++ b/contrib/compiler-rt/lib/mulsc3.c
@@ -13,8 +13,7 @@
*/
#include "int_lib.h"
-#include <math.h>
-#include <complex.h>
+#include "int_math.h"
/* Returns: the product of a + ib and c + id */
@@ -28,46 +27,46 @@ __mulsc3(float __a, float __b, float __c, float __d)
float _Complex z;
__real__ z = __ac - __bd;
__imag__ z = __ad + __bc;
- if (isnan(__real__ z) && isnan(__imag__ z))
+ if (crt_isnan(__real__ z) && crt_isnan(__imag__ z))
{
int __recalc = 0;
- if (isinf(__a) || isinf(__b))
+ if (crt_isinf(__a) || crt_isinf(__b))
{
- __a = copysignf(isinf(__a) ? 1 : 0, __a);
- __b = copysignf(isinf(__b) ? 1 : 0, __b);
- if (isnan(__c))
- __c = copysignf(0, __c);
- if (isnan(__d))
- __d = copysignf(0, __d);
+ __a = crt_copysignf(crt_isinf(__a) ? 1 : 0, __a);
+ __b = crt_copysignf(crt_isinf(__b) ? 1 : 0, __b);
+ if (crt_isnan(__c))
+ __c = crt_copysignf(0, __c);
+ if (crt_isnan(__d))
+ __d = crt_copysignf(0, __d);
__recalc = 1;
}
- if (isinf(__c) || isinf(__d))
+ if (crt_isinf(__c) || crt_isinf(__d))
{
- __c = copysignf(isinf(__c) ? 1 : 0, __c);
- __d = copysignf(isinf(__d) ? 1 : 0, __d);
- if (isnan(__a))
- __a = copysignf(0, __a);
- if (isnan(__b))
- __b = copysignf(0, __b);
+ __c = crt_copysignf(crt_isinf(__c) ? 1 : 0, __c);
+ __d = crt_copysignf(crt_isinf(__d) ? 1 : 0, __d);
+ if (crt_isnan(__a))
+ __a = crt_copysignf(0, __a);
+ if (crt_isnan(__b))
+ __b = crt_copysignf(0, __b);
__recalc = 1;
}
- if (!__recalc && (isinf(__ac) || isinf(__bd) ||
- isinf(__ad) || isinf(__bc)))
+ if (!__recalc && (crt_isinf(__ac) || crt_isinf(__bd) ||
+ crt_isinf(__ad) || crt_isinf(__bc)))
{
- if (isnan(__a))
- __a = copysignf(0, __a);
- if (isnan(__b))
- __b = copysignf(0, __b);
- if (isnan(__c))
- __c = copysignf(0, __c);
- if (isnan(__d))
- __d = copysignf(0, __d);
+ if (crt_isnan(__a))
+ __a = crt_copysignf(0, __a);
+ if (crt_isnan(__b))
+ __b = crt_copysignf(0, __b);
+ if (crt_isnan(__c))
+ __c = crt_copysignf(0, __c);
+ if (crt_isnan(__d))
+ __d = crt_copysignf(0, __d);
__recalc = 1;
}
if (__recalc)
{
- __real__ z = INFINITY * (__a * __c - __b * __d);
- __imag__ z = INFINITY * (__a * __d + __b * __c);
+ __real__ z = CRT_INFINITY * (__a * __c - __b * __d);
+ __imag__ z = CRT_INFINITY * (__a * __d + __b * __c);
}
}
return z;
diff --git a/contrib/compiler-rt/lib/mulsf3.c b/contrib/compiler-rt/lib/mulsf3.c
index bf46e14..fce2fd4 100644
--- a/contrib/compiler-rt/lib/mulsf3.c
+++ b/contrib/compiler-rt/lib/mulsf3.c
@@ -11,7 +11,6 @@
// with the IEEE-754 default rounding (to nearest, ties to even).
//
//===----------------------------------------------------------------------===//
-#include "abi.h"
#define SINGLE_PRECISION
#include "fp_lib.h"
diff --git a/contrib/compiler-rt/lib/mulvdi3.c b/contrib/compiler-rt/lib/mulvdi3.c
index fcbb5b3..bcc8e65 100644
--- a/contrib/compiler-rt/lib/mulvdi3.c
+++ b/contrib/compiler-rt/lib/mulvdi3.c
@@ -13,7 +13,6 @@
*/
#include "int_lib.h"
-#include <stdlib.h>
/* Returns: a * b */
diff --git a/contrib/compiler-rt/lib/mulvsi3.c b/contrib/compiler-rt/lib/mulvsi3.c
index 6271cd4..d372b201 100644
--- a/contrib/compiler-rt/lib/mulvsi3.c
+++ b/contrib/compiler-rt/lib/mulvsi3.c
@@ -13,7 +13,6 @@
*/
#include "int_lib.h"
-#include <stdlib.h>
/* Returns: a * b */
diff --git a/contrib/compiler-rt/lib/mulvti3.c b/contrib/compiler-rt/lib/mulvti3.c
index 7da9187..ae65cf8 100644
--- a/contrib/compiler-rt/lib/mulvti3.c
+++ b/contrib/compiler-rt/lib/mulvti3.c
@@ -15,7 +15,6 @@
#if __x86_64
#include "int_lib.h"
-#include <stdlib.h>
/* Returns: a * b */
diff --git a/contrib/compiler-rt/lib/mulxc3.c b/contrib/compiler-rt/lib/mulxc3.c
index b5ae865..cec0573 100644
--- a/contrib/compiler-rt/lib/mulxc3.c
+++ b/contrib/compiler-rt/lib/mulxc3.c
@@ -15,8 +15,7 @@
#if !_ARCH_PPC
#include "int_lib.h"
-#include <math.h>
-#include <complex.h>
+#include "int_math.h"
/* Returns: the product of a + ib and c + id */
@@ -30,46 +29,46 @@ __mulxc3(long double __a, long double __b, long double __c, long double __d)
long double _Complex z;
__real__ z = __ac - __bd;
__imag__ z = __ad + __bc;
- if (isnan(__real__ z) && isnan(__imag__ z))
+ if (crt_isnan(__real__ z) && crt_isnan(__imag__ z))
{
int __recalc = 0;
- if (isinf(__a) || isinf(__b))
+ if (crt_isinf(__a) || crt_isinf(__b))
{
- __a = copysignl(isinf(__a) ? 1 : 0, __a);
- __b = copysignl(isinf(__b) ? 1 : 0, __b);
- if (isnan(__c))
- __c = copysignl(0, __c);
- if (isnan(__d))
- __d = copysignl(0, __d);
+ __a = crt_copysignl(crt_isinf(__a) ? 1 : 0, __a);
+ __b = crt_copysignl(crt_isinf(__b) ? 1 : 0, __b);
+ if (crt_isnan(__c))
+ __c = crt_copysignl(0, __c);
+ if (crt_isnan(__d))
+ __d = crt_copysignl(0, __d);
__recalc = 1;
}
- if (isinf(__c) || isinf(__d))
+ if (crt_isinf(__c) || crt_isinf(__d))
{
- __c = copysignl(isinf(__c) ? 1 : 0, __c);
- __d = copysignl(isinf(__d) ? 1 : 0, __d);
- if (isnan(__a))
- __a = copysignl(0, __a);
- if (isnan(__b))
- __b = copysignl(0, __b);
+ __c = crt_copysignl(crt_isinf(__c) ? 1 : 0, __c);
+ __d = crt_copysignl(crt_isinf(__d) ? 1 : 0, __d);
+ if (crt_isnan(__a))
+ __a = crt_copysignl(0, __a);
+ if (crt_isnan(__b))
+ __b = crt_copysignl(0, __b);
__recalc = 1;
}
- if (!__recalc && (isinf(__ac) || isinf(__bd) ||
- isinf(__ad) || isinf(__bc)))
+ if (!__recalc && (crt_isinf(__ac) || crt_isinf(__bd) ||
+ crt_isinf(__ad) || crt_isinf(__bc)))
{
- if (isnan(__a))
- __a = copysignl(0, __a);
- if (isnan(__b))
- __b = copysignl(0, __b);
- if (isnan(__c))
- __c = copysignl(0, __c);
- if (isnan(__d))
- __d = copysignl(0, __d);
+ if (crt_isnan(__a))
+ __a = crt_copysignl(0, __a);
+ if (crt_isnan(__b))
+ __b = crt_copysignl(0, __b);
+ if (crt_isnan(__c))
+ __c = crt_copysignl(0, __c);
+ if (crt_isnan(__d))
+ __d = crt_copysignl(0, __d);
__recalc = 1;
}
if (__recalc)
{
- __real__ z = INFINITY * (__a * __c - __b * __d);
- __imag__ z = INFINITY * (__a * __d + __b * __c);
+ __real__ z = CRT_INFINITY * (__a * __c - __b * __d);
+ __imag__ z = CRT_INFINITY * (__a * __d + __b * __c);
}
}
return z;
diff --git a/contrib/compiler-rt/lib/negdf2.c b/contrib/compiler-rt/lib/negdf2.c
index b47f397..b11b480 100644
--- a/contrib/compiler-rt/lib/negdf2.c
+++ b/contrib/compiler-rt/lib/negdf2.c
@@ -10,7 +10,6 @@
// This file implements double-precision soft-float negation.
//
//===----------------------------------------------------------------------===//
-#include "abi.h"
#define DOUBLE_PRECISION
#include "fp_lib.h"
diff --git a/contrib/compiler-rt/lib/negsf2.c b/contrib/compiler-rt/lib/negsf2.c
index 98f9fc0..f8ef2d1 100644
--- a/contrib/compiler-rt/lib/negsf2.c
+++ b/contrib/compiler-rt/lib/negsf2.c
@@ -10,7 +10,6 @@
// This file implements single-precision soft-float negation.
//
//===----------------------------------------------------------------------===//
-#include "abi.h"
#define SINGLE_PRECISION
#include "fp_lib.h"
diff --git a/contrib/compiler-rt/lib/negvdi2.c b/contrib/compiler-rt/lib/negvdi2.c
index aafaa9d..e336ecf 100644
--- a/contrib/compiler-rt/lib/negvdi2.c
+++ b/contrib/compiler-rt/lib/negvdi2.c
@@ -11,10 +11,8 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
-#include <stdlib.h>
/* Returns: -a */
diff --git a/contrib/compiler-rt/lib/negvsi2.c b/contrib/compiler-rt/lib/negvsi2.c
index 559ea18..b9e93fe 100644
--- a/contrib/compiler-rt/lib/negvsi2.c
+++ b/contrib/compiler-rt/lib/negvsi2.c
@@ -11,10 +11,8 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
-#include <stdlib.h>
/* Returns: -a */
diff --git a/contrib/compiler-rt/lib/negvti2.c b/contrib/compiler-rt/lib/negvti2.c
index d931305..ef766bb 100644
--- a/contrib/compiler-rt/lib/negvti2.c
+++ b/contrib/compiler-rt/lib/negvti2.c
@@ -15,7 +15,6 @@
#if __x86_64
#include "int_lib.h"
-#include <stdlib.h>
/* Returns: -a */
diff --git a/contrib/compiler-rt/lib/paritydi2.c b/contrib/compiler-rt/lib/paritydi2.c
index e7bebf6..2ded54c 100644
--- a/contrib/compiler-rt/lib/paritydi2.c
+++ b/contrib/compiler-rt/lib/paritydi2.c
@@ -11,7 +11,6 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
diff --git a/contrib/compiler-rt/lib/paritysi2.c b/contrib/compiler-rt/lib/paritysi2.c
index 64d509f..5999846 100644
--- a/contrib/compiler-rt/lib/paritysi2.c
+++ b/contrib/compiler-rt/lib/paritysi2.c
@@ -11,7 +11,6 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
diff --git a/contrib/compiler-rt/lib/popcountdi2.c b/contrib/compiler-rt/lib/popcountdi2.c
index 136fc04..5e8a62f 100644
--- a/contrib/compiler-rt/lib/popcountdi2.c
+++ b/contrib/compiler-rt/lib/popcountdi2.c
@@ -11,7 +11,6 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
diff --git a/contrib/compiler-rt/lib/popcountsi2.c b/contrib/compiler-rt/lib/popcountsi2.c
index bfaa3ff..44544ff 100644
--- a/contrib/compiler-rt/lib/popcountsi2.c
+++ b/contrib/compiler-rt/lib/popcountsi2.c
@@ -11,7 +11,6 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
diff --git a/contrib/compiler-rt/lib/powidf2.c b/contrib/compiler-rt/lib/powidf2.c
index 2e211eb..ac13b17 100644
--- a/contrib/compiler-rt/lib/powidf2.c
+++ b/contrib/compiler-rt/lib/powidf2.c
@@ -11,7 +11,6 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
diff --git a/contrib/compiler-rt/lib/powisf2.c b/contrib/compiler-rt/lib/powisf2.c
index e6b43b3..0c400ec 100644
--- a/contrib/compiler-rt/lib/powisf2.c
+++ b/contrib/compiler-rt/lib/powisf2.c
@@ -11,7 +11,6 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
diff --git a/contrib/compiler-rt/lib/ppc/DD.h b/contrib/compiler-rt/lib/ppc/DD.h
index 9ecd1f5..13862dc 100644
--- a/contrib/compiler-rt/lib/ppc/DD.h
+++ b/contrib/compiler-rt/lib/ppc/DD.h
@@ -1,7 +1,7 @@
#ifndef __DD_HEADER
#define __DD_HEADER
-#include <stdint.h>
+#include "../int_lib.h"
typedef union {
long double ld;
diff --git a/contrib/compiler-rt/lib/ppc/divtc3.c b/contrib/compiler-rt/lib/ppc/divtc3.c
index d41f621..2991281 100644
--- a/contrib/compiler-rt/lib/ppc/divtc3.c
+++ b/contrib/compiler-rt/lib/ppc/divtc3.c
@@ -3,16 +3,16 @@
*/
#include "DD.h"
-#include <math.h>
+#include "../int_math.h"
-#if !defined(INFINITY) && defined(HUGE_VAL)
-#define INFINITY HUGE_VAL
-#endif /* INFINITY */
+#if !defined(CRT_INFINITY) && defined(HUGE_VAL)
+#define CRT_INFINITY HUGE_VAL
+#endif /* CRT_INFINITY */
-#define makeFinite(x) { \
- (x).s.hi = __builtin_copysign(isinf((x).s.hi) ? 1.0 : 0.0, (x).s.hi); \
- (x).s.lo = 0.0; \
- }
+#define makeFinite(x) { \
+ (x).s.hi = crt_copysign(crt_isinf((x).s.hi) ? 1.0 : 0.0, (x).s.hi); \
+ (x).s.lo = 0.0; \
+ }
long double __gcc_qadd(long double, long double);
long double __gcc_qsub(long double, long double);
@@ -26,16 +26,16 @@ __divtc3(long double a, long double b, long double c, long double d)
DD dDD = { .ld = d };
int ilogbw = 0;
- const double logbw = logb(__builtin_fmax( __builtin_fabs(cDD.s.hi), __builtin_fabs(dDD.s.hi) ));
+ const double logbw = crt_logb(crt_fmax(crt_fabs(cDD.s.hi), crt_fabs(dDD.s.hi) ));
- if (isfinite(logbw))
+ if (crt_isfinite(logbw))
{
ilogbw = (int)logbw;
- cDD.s.hi = scalbn(cDD.s.hi, -ilogbw);
- cDD.s.lo = scalbn(cDD.s.lo, -ilogbw);
- dDD.s.hi = scalbn(dDD.s.hi, -ilogbw);
- dDD.s.lo = scalbn(dDD.s.lo, -ilogbw);
+ cDD.s.hi = crt_scalbn(cDD.s.hi, -ilogbw);
+ cDD.s.lo = crt_scalbn(cDD.s.lo, -ilogbw);
+ dDD.s.hi = crt_scalbn(dDD.s.hi, -ilogbw);
+ dDD.s.lo = crt_scalbn(dDD.s.lo, -ilogbw);
}
const long double denom = __gcc_qadd(__gcc_qmul(cDD.ld, cDD.ld), __gcc_qmul(dDD.ld, dDD.ld));
@@ -45,42 +45,45 @@ __divtc3(long double a, long double b, long double c, long double d)
DD real = { .ld = __gcc_qdiv(realNumerator, denom) };
DD imag = { .ld = __gcc_qdiv(imagNumerator, denom) };
- real.s.hi = scalbn(real.s.hi, -ilogbw);
- real.s.lo = scalbn(real.s.lo, -ilogbw);
- imag.s.hi = scalbn(imag.s.hi, -ilogbw);
- imag.s.lo = scalbn(imag.s.lo, -ilogbw);
+ real.s.hi = crt_scalbn(real.s.hi, -ilogbw);
+ real.s.lo = crt_scalbn(real.s.lo, -ilogbw);
+ imag.s.hi = crt_scalbn(imag.s.hi, -ilogbw);
+ imag.s.lo = crt_scalbn(imag.s.lo, -ilogbw);
- if (isnan(real.s.hi) && isnan(imag.s.hi))
+ if (crt_isnan(real.s.hi) && crt_isnan(imag.s.hi))
{
DD aDD = { .ld = a };
DD bDD = { .ld = b };
DD rDD = { .ld = denom };
- if ((rDD.s.hi == 0.0) && (!isnan(aDD.s.hi) || !isnan(bDD.s.hi)))
+ if ((rDD.s.hi == 0.0) && (!crt_isnan(aDD.s.hi) ||
+ !crt_isnan(bDD.s.hi)))
{
- real.s.hi = __builtin_copysign(INFINITY,cDD.s.hi) * aDD.s.hi;
+ real.s.hi = crt_copysign(CRT_INFINITY,cDD.s.hi) * aDD.s.hi;
real.s.lo = 0.0;
- imag.s.hi = __builtin_copysign(INFINITY,cDD.s.hi) * bDD.s.hi;
+ imag.s.hi = crt_copysign(CRT_INFINITY,cDD.s.hi) * bDD.s.hi;
imag.s.lo = 0.0;
}
- else if ((isinf(aDD.s.hi) || isinf(bDD.s.hi)) && isfinite(cDD.s.hi) && isfinite(dDD.s.hi))
+ else if ((crt_isinf(aDD.s.hi) || crt_isinf(bDD.s.hi)) &&
+ crt_isfinite(cDD.s.hi) && crt_isfinite(dDD.s.hi))
{
makeFinite(aDD);
makeFinite(bDD);
- real.s.hi = INFINITY * (aDD.s.hi*cDD.s.hi + bDD.s.hi*dDD.s.hi);
+ real.s.hi = CRT_INFINITY * (aDD.s.hi*cDD.s.hi + bDD.s.hi*dDD.s.hi);
real.s.lo = 0.0;
- imag.s.hi = INFINITY * (bDD.s.hi*cDD.s.hi - aDD.s.hi*dDD.s.hi);
+ imag.s.hi = CRT_INFINITY * (bDD.s.hi*cDD.s.hi - aDD.s.hi*dDD.s.hi);
imag.s.lo = 0.0;
}
- else if ((isinf(cDD.s.hi) || isinf(dDD.s.hi)) && isfinite(aDD.s.hi) && isfinite(bDD.s.hi))
+ else if ((crt_isinf(cDD.s.hi) || crt_isinf(dDD.s.hi)) &&
+ crt_isfinite(aDD.s.hi) && crt_isfinite(bDD.s.hi))
{
makeFinite(cDD);
makeFinite(dDD);
- real.s.hi = __builtin_copysign(0.0,(aDD.s.hi*cDD.s.hi + bDD.s.hi*dDD.s.hi));
+ real.s.hi = crt_copysign(0.0,(aDD.s.hi*cDD.s.hi + bDD.s.hi*dDD.s.hi));
real.s.lo = 0.0;
- imag.s.hi = __builtin_copysign(0.0,(bDD.s.hi*cDD.s.hi - aDD.s.hi*dDD.s.hi));
+ imag.s.hi = crt_copysign(0.0,(bDD.s.hi*cDD.s.hi - aDD.s.hi*dDD.s.hi));
imag.s.lo = 0.0;
}
}
diff --git a/contrib/compiler-rt/lib/ppc/fixtfdi.c b/contrib/compiler-rt/lib/ppc/fixtfdi.c
index fa113a0..56e7b3f 100644
--- a/contrib/compiler-rt/lib/ppc/fixtfdi.c
+++ b/contrib/compiler-rt/lib/ppc/fixtfdi.c
@@ -7,7 +7,7 @@
*/
#include "DD.h"
-#include <stdint.h>
+#include "../int_math.h"
uint64_t __fixtfdi(long double input)
{
@@ -65,7 +65,7 @@ uint64_t __fixtfdi(long double input)
/* Edge cases handled here: */
/* |x| < 1, result is zero. */
- if (1.0 > __builtin_fabs(x.s.hi))
+ if (1.0 > crt_fabs(x.s.hi))
return INT64_C(0);
/* x very close to INT64_MIN, care must be taken to see which side we are on. */
diff --git a/contrib/compiler-rt/lib/ppc/fixunstfdi.c b/contrib/compiler-rt/lib/ppc/fixunstfdi.c
index 1fb5248..5e6e2ce 100644
--- a/contrib/compiler-rt/lib/ppc/fixunstfdi.c
+++ b/contrib/compiler-rt/lib/ppc/fixunstfdi.c
@@ -6,7 +6,6 @@
/* This file implements the PowerPC 128-bit double-double -> uint64_t conversion */
#include "DD.h"
-#include <stdint.h>
uint64_t __fixunstfdi(long double input)
{
diff --git a/contrib/compiler-rt/lib/ppc/floatditf.c b/contrib/compiler-rt/lib/ppc/floatditf.c
index ed23dc8..beabdd0 100644
--- a/contrib/compiler-rt/lib/ppc/floatditf.c
+++ b/contrib/compiler-rt/lib/ppc/floatditf.c
@@ -6,7 +6,6 @@
/* This file implements the PowerPC long long -> long double conversion */
#include "DD.h"
-#include <stdint.h>
long double __floatditf(int64_t a) {
diff --git a/contrib/compiler-rt/lib/ppc/floatunditf.c b/contrib/compiler-rt/lib/ppc/floatunditf.c
index 20a3b71..b12e1e7 100644
--- a/contrib/compiler-rt/lib/ppc/floatunditf.c
+++ b/contrib/compiler-rt/lib/ppc/floatunditf.c
@@ -6,7 +6,6 @@
/* This file implements the PowerPC unsigned long long -> long double conversion */
#include "DD.h"
-#include <stdint.h>
long double __floatunditf(uint64_t a) {
diff --git a/contrib/compiler-rt/lib/ppc/multc3.c b/contrib/compiler-rt/lib/ppc/multc3.c
index 9d17a2c..738b65a 100644
--- a/contrib/compiler-rt/lib/ppc/multc3.c
+++ b/contrib/compiler-rt/lib/ppc/multc3.c
@@ -3,23 +3,19 @@
*/
#include "DD.h"
-#include <math.h>
+#include "../int_math.h"
-#if !defined(INFINITY) && defined(HUGE_VAL)
-#define INFINITY HUGE_VAL
-#endif /* INFINITY */
+#define makeFinite(x) { \
+ (x).s.hi = crt_copysign(crt_isinf((x).s.hi) ? 1.0 : 0.0, (x).s.hi); \
+ (x).s.lo = 0.0; \
+ }
-#define makeFinite(x) { \
- (x).s.hi = __builtin_copysign(isinf((x).s.hi) ? 1.0 : 0.0, (x).s.hi); \
- (x).s.lo = 0.0; \
- }
-
-#define zeroNaN(x) { \
- if (isnan((x).s.hi)) { \
- (x).s.hi = __builtin_copysign(0.0, (x).s.hi); \
- (x).s.lo = 0.0; \
- } \
- }
+#define zeroNaN(x) { \
+ if (crt_isnan((x).s.hi)) { \
+ (x).s.hi = crt_copysign(0.0, (x).s.hi); \
+ (x).s.lo = 0.0; \
+ } \
+ }
long double __gcc_qadd(long double, long double);
long double __gcc_qsub(long double, long double);
@@ -36,7 +32,7 @@ __multc3(long double a, long double b, long double c, long double d)
DD real = { .ld = __gcc_qsub(ac,bd) };
DD imag = { .ld = __gcc_qadd(ad,bc) };
- if (isnan(real.s.hi) && isnan(imag.s.hi))
+ if (crt_isnan(real.s.hi) && crt_isnan(imag.s.hi))
{
int recalc = 0;
@@ -45,7 +41,7 @@ __multc3(long double a, long double b, long double c, long double d)
DD cDD = { .ld = c };
DD dDD = { .ld = d };
- if (isinf(aDD.s.hi) || isinf(bDD.s.hi))
+ if (crt_isinf(aDD.s.hi) || crt_isinf(bDD.s.hi))
{
makeFinite(aDD);
makeFinite(bDD);
@@ -54,7 +50,7 @@ __multc3(long double a, long double b, long double c, long double d)
recalc = 1;
}
- if (isinf(cDD.s.hi) || isinf(dDD.s.hi))
+ if (crt_isinf(cDD.s.hi) || crt_isinf(dDD.s.hi))
{
makeFinite(cDD);
makeFinite(dDD);
@@ -70,7 +66,8 @@ __multc3(long double a, long double b, long double c, long double d)
DD adDD = { .ld = ad };
DD bcDD = { .ld = bc };
- if (isinf(acDD.s.hi) || isinf(bdDD.s.hi) || isinf(adDD.s.hi) || isinf(bcDD.s.hi))
+ if (crt_isinf(acDD.s.hi) || crt_isinf(bdDD.s.hi) ||
+ crt_isinf(adDD.s.hi) || crt_isinf(bcDD.s.hi))
{
zeroNaN(aDD);
zeroNaN(bDD);
@@ -82,9 +79,9 @@ __multc3(long double a, long double b, long double c, long double d)
if (recalc)
{
- real.s.hi = INFINITY * (aDD.s.hi*cDD.s.hi - bDD.s.hi*dDD.s.hi);
+ real.s.hi = CRT_INFINITY * (aDD.s.hi*cDD.s.hi - bDD.s.hi*dDD.s.hi);
real.s.lo = 0.0;
- imag.s.hi = INFINITY * (aDD.s.hi*dDD.s.hi + bDD.s.hi*cDD.s.hi);
+ imag.s.hi = CRT_INFINITY * (aDD.s.hi*dDD.s.hi + bDD.s.hi*cDD.s.hi);
imag.s.lo = 0.0;
}
}
diff --git a/contrib/compiler-rt/lib/sparc64/divmod.m4 b/contrib/compiler-rt/lib/sparc64/divmod.m4
new file mode 100644
index 0000000..6338199
--- /dev/null
+++ b/contrib/compiler-rt/lib/sparc64/divmod.m4
@@ -0,0 +1,250 @@
+/*
+ * This m4 code has been taken from The SPARC Architecture Manual Version 8.
+ */
+
+/*
+ * Division/Remainder
+ *
+ * Input is:
+ * dividend -- the thing being divided
+ * divisor -- how many ways to divide it
+ * Important parameters:
+ * N -- how many bits per iteration we try to get
+ * as our current guess: define(N, 4) define(TWOSUPN, 16)
+ * WORDSIZE -- how many bits altogether we're talking about:
+ * obviously: define(WORDSIZE, 32)
+ * A derived constant:
+ * TOPBITS -- how many bits are in the top "decade" of a number:
+ * define(TOPBITS, eval( WORDSIZE - N*((WORDSIZE-1)/N) ) )
+ * Important variables are:
+ * Q -- the partial quotient under development -- initially 0
+ * R -- the remainder so far -- initially == the dividend
+ * ITER -- number of iterations of the main division loop which will
+ * be required. Equal to CEIL( lg2(quotient)/N )
+ * Note that this is log_base_(2ˆN) of the quotient.
+ * V -- the current comparand -- initially divisor*2ˆ(ITER*N-1)
+ * Cost:
+ * current estimate for non-large dividend is
+ * CEIL( lg2(quotient) / N ) x ( 10 + 7N/2 ) + C
+ * a large dividend is one greater than 2ˆ(31-TOPBITS) and takes a
+ * different path, as the upper bits of the quotient must be developed
+ * one bit at a time.
+ * This uses the m4 and cpp macro preprocessors.
+ */
+
+define(dividend, `%o0')
+define(divisor,`%o1')
+define(Q, `%o2')
+define(R, `%o3')
+define(ITER, `%o4')
+define(V, `%o5')
+define(SIGN, `%g3')
+define(T, `%g1')
+define(SC,`%g2')
+/*
+ * This is the recursive definition of how we develop quotient digits.
+ * It takes three important parameters:
+ * $1 -- the current depth, 1<=$1<=N
+ * $2 -- the current accumulation of quotient bits
+ * N -- max depth
+ * We add a new bit to $2 and either recurse or insert the bits in the quotient.
+ * Dynamic input:
+ * R -- current remainder
+ * Q -- current quotient
+ * V -- current comparand
+ * cc -- set on current value of R
+ * Dynamic output:
+ * R', Q', V', cc'
+ */
+
+#include "../assembly.h"
+
+.text
+ .align 4
+
+define(DEVELOP_QUOTIENT_BITS,
+` !depth $1, accumulated bits $2
+ bl L.$1.eval(TWOSUPN+$2)
+ srl V,1,V
+ ! remainder is nonnegative
+ subcc R,V,R
+ ifelse( $1, N,
+ ` b 9f
+ add Q, ($2*2+1), Q
+ ',` DEVELOP_QUOTIENT_BITS( incr($1), `eval(2*$2+1)')
+ ')
+L.$1.eval(TWOSUPN+$2):
+ ! remainder is negative
+ addcc R,V,R
+ ifelse( $1, N,
+ ` b 9f
+ add Q, ($2*2-1), Q
+ ',` DEVELOP_QUOTIENT_BITS( incr($1), `eval(2*$2-1)')
+ ')
+ ifelse( $1, 1, `9:')
+')
+ifelse( ANSWER, `quotient', `
+DEFINE_COMPILERRT_FUNCTION(__udivsi3)
+ save %sp,-64,%sp ! do this for debugging
+ b divide
+ mov 0,SIGN ! result always nonnegative
+DEFINE_COMPILERRT_FUNCTION(__divsi3)
+ save %sp,-64,%sp ! do this for debugging
+ orcc divisor,dividend,%g0 ! are either dividend or divisor negative
+ bge divide ! if not, skip this junk
+ xor divisor,dividend,SIGN ! record sign of result in sign of SIGN
+ tst divisor
+ bge 2f
+ tst dividend
+ ! divisor < 0
+ bge divide
+ neg divisor
+ 2:
+ ! dividend < 0
+ neg dividend
+ ! FALL THROUGH
+',`
+DEFINE_COMPILERRT_FUNCTION(__umodsi3)
+ save %sp,-64,%sp ! do this for debugging
+ b divide
+ mov 0,SIGN ! result always nonnegative
+DEFINE_COMPILERRT_FUNCTION(__modsi3)
+ save %sp,-64,%sp ! do this for debugging
+ orcc divisor,dividend,%g0 ! are either dividend or divisor negative
+ bge divide ! if not, skip this junk
+ mov dividend,SIGN ! record sign of result in sign of SIGN
+ tst divisor
+ bge 2f
+ tst dividend
+ ! divisor < 0
+ bge divide
+ neg divisor
+ 2:
+ ! dividend < 0
+ neg dividend
+ ! FALL THROUGH
+')
+
+divide:
+ ! Compute size of quotient, scale comparand.
+ orcc divisor,%g0,V ! movcc divisor,V
+ te 2 ! if divisor = 0
+ mov dividend,R
+ mov 0,Q
+ sethi %hi(1<<(WORDSIZE-TOPBITS-1)),T
+ cmp R,T
+ blu not_really_big
+ mov 0,ITER
+ !
+ ! Here, the dividend is >= 2ˆ(31-N) or so. We must be careful here,
+ ! as our usual N-at-a-shot divide step will cause overflow and havoc.
+ ! The total number of bits in the result here is N*ITER+SC, where
+ ! SC <= N.
+ ! Compute ITER in an unorthodox manner: know we need to Shift V into
+! the top decade: so don't even bother to compare to R.
+1:
+ cmp V,T
+ bgeu 3f
+ mov 1,SC
+ sll V,N,V
+ b 1b
+ inc ITER
+! Now compute SC
+2: addcc V,V,V
+ bcc not_too_big
+ add SC,1,SC
+ ! We're here if the divisor overflowed when Shifting.
+ ! This means that R has the high-order bit set.
+ ! Restore V and subtract from R.
+ sll T,TOPBITS,T ! high order bit
+ srl V,1,V ! rest of V
+ add V,T,V
+ b do_single_div
+ dec SC
+not_too_big:
+3: cmp V,R
+ blu 2b
+ nop
+ be do_single_div
+ nop
+! V > R: went too far: back up 1 step
+! srl V,1,V
+! dec SC
+! do single-bit divide steps
+!
+! We have to be careful here. We know that R >= V, so we can do the
+! first divide step without thinking. BUT, the others are conditional,
+! and are only done if R >= 0. Because both R and V may have the high-
+! order bit set in the first step, just falling into the regular
+! division loop will mess up the first time around.
+! So we unroll slightly...
+do_single_div:
+ deccc SC
+ bl end_regular_divide
+ nop
+ sub R,V,R
+ mov 1,Q
+ b end_single_divloop
+ nop
+single_divloop:
+ sll Q,1,Q
+ bl 1f
+ srl V,1,V
+ ! R >= 0
+ sub R,V,R
+ b 2f
+ inc Q
+ 1: ! R < 0
+ add R,V,R
+ dec Q
+ 2:
+ end_single_divloop:
+ deccc SC
+ bge single_divloop
+ tst R
+ b end_regular_divide
+ nop
+
+not_really_big:
+1:
+ sll V,N,V
+ cmp V,R
+ bleu 1b
+ inccc ITER
+ be got_result
+ dec ITER
+do_regular_divide:
+ ! Do the main division iteration
+ tst R
+ ! Fall through into divide loop
+divloop:
+ sll Q,N,Q
+ DEVELOP_QUOTIENT_BITS( 1, 0 )
+end_regular_divide:
+ deccc ITER
+ bge divloop
+ tst R
+ bge got_result
+ nop
+ ! non-restoring fixup here
+ifelse( ANSWER, `quotient',
+` dec Q
+',` add R,divisor,R
+')
+
+got_result:
+ tst SIGN
+ bge 1f
+ restore
+ ! answer < 0
+ retl ! leaf-routine return
+ifelse( ANSWER, `quotient',
+` neg %o2,%o0 ! quotient <- -Q
+',` neg %o3,%o0 ! remainder <- -R
+')
+1:
+ retl ! leaf-routine return
+ifelse( ANSWER, `quotient',
+` mov %o2,%o0 ! quotient <- Q
+',` mov %o3,%o0 ! remainder <- R
+')
diff --git a/contrib/compiler-rt/lib/sparc64/divsi3.S b/contrib/compiler-rt/lib/sparc64/divsi3.S
new file mode 100644
index 0000000..52133f7
--- /dev/null
+++ b/contrib/compiler-rt/lib/sparc64/divsi3.S
@@ -0,0 +1,333 @@
+/*
+ * This m4 code has been taken from The SPARC Architecture Manual Version 8.
+ */
+/*
+ * Division/Remainder
+ *
+ * Input is:
+ * dividend -- the thing being divided
+ * divisor -- how many ways to divide it
+ * Important parameters:
+ * N -- how many bits per iteration we try to get
+ * as our current guess:
+ * WORDSIZE -- how many bits altogether we're talking about:
+ * obviously:
+ * A derived constant:
+ * TOPBITS -- how many bits are in the top "decade" of a number:
+ *
+ * Important variables are:
+ * Q -- the partial quotient under development -- initially 0
+ * R -- the remainder so far -- initially == the dividend
+ * ITER -- number of iterations of the main division loop which will
+ * be required. Equal to CEIL( lg2(quotient)/4 )
+ * Note that this is log_base_(2ˆ4) of the quotient.
+ * V -- the current comparand -- initially divisor*2ˆ(ITER*4-1)
+ * Cost:
+ * current estimate for non-large dividend is
+ * CEIL( lg2(quotient) / 4 ) x ( 10 + 74/2 ) + C
+ * a large dividend is one greater than 2ˆ(31-4 ) and takes a
+ * different path, as the upper bits of the quotient must be developed
+ * one bit at a time.
+ * This uses the m4 and cpp macro preprocessors.
+ */
+/*
+ * This is the recursive definition of how we develop quotient digits.
+ * It takes three important parameters:
+ * $1 -- the current depth, 1<=$1<=4
+ * $2 -- the current accumulation of quotient bits
+ * 4 -- max depth
+ * We add a new bit to $2 and either recurse or insert the bits in the quotient.
+ * Dynamic input:
+ * %o3 -- current remainder
+ * %o2 -- current quotient
+ * %o5 -- current comparand
+ * cc -- set on current value of %o3
+ * Dynamic output:
+ * %o3', %o2', %o5', cc'
+ */
+#include "../assembly.h"
+.text
+ .align 4
+DEFINE_COMPILERRT_FUNCTION(__udivsi3)
+ save %sp,-64,%sp ! do this for debugging
+ b divide
+ mov 0,%g3 ! result always nonnegative
+DEFINE_COMPILERRT_FUNCTION(__divsi3)
+ save %sp,-64,%sp ! do this for debugging
+ orcc %o1,%o0,%g0 ! are either %o0 or %o1 negative
+ bge divide ! if not, skip this junk
+ xor %o1,%o0,%g3 ! record sign of result in sign of %g3
+ tst %o1
+ bge 2f
+ tst %o0
+ ! %o1 < 0
+ bge divide
+ neg %o1
+ 2:
+ ! %o0 < 0
+ neg %o0
+ ! FALL THROUGH
+divide:
+ ! Compute size of quotient, scale comparand.
+ orcc %o1,%g0,%o5 ! movcc %o1,%o5
+ te 2 ! if %o1 = 0
+ mov %o0,%o3
+ mov 0,%o2
+ sethi %hi(1<<(32-4 -1)),%g1
+ cmp %o3,%g1
+ blu not_really_big
+ mov 0,%o4
+ !
+ ! Here, the %o0 is >= 2ˆ(31-4) or so. We must be careful here,
+ ! as our usual 4-at-a-shot divide step will cause overflow and havoc.
+ ! The total number of bits in the result here is 4*%o4+%g2, where
+ ! %g2 <= 4.
+ ! Compute %o4 in an unorthodox manner: know we need to Shift %o5 into
+! the top decade: so don't even bother to compare to %o3.
+1:
+ cmp %o5,%g1
+ bgeu 3f
+ mov 1,%g2
+ sll %o5,4,%o5
+ b 1b
+ inc %o4
+! Now compute %g2
+2: addcc %o5,%o5,%o5
+ bcc not_too_big
+ add %g2,1,%g2
+ ! We're here if the %o1 overflowed when Shifting.
+ ! This means that %o3 has the high-order bit set.
+ ! Restore %o5 and subtract from %o3.
+ sll %g1,4 ,%g1 ! high order bit
+ srl %o5,1,%o5 ! rest of %o5
+ add %o5,%g1,%o5
+ b do_single_div
+ dec %g2
+not_too_big:
+3: cmp %o5,%o3
+ blu 2b
+ nop
+ be do_single_div
+ nop
+! %o5 > %o3: went too far: back up 1 step
+! srl %o5,1,%o5
+! dec %g2
+! do single-bit divide steps
+!
+! We have to be careful here. We know that %o3 >= %o5, so we can do the
+! first divide step without thinking. BUT, the others are conditional,
+! and are only done if %o3 >= 0. Because both %o3 and %o5 may have the high-
+! order bit set in the first step, just falling into the regular
+! division loop will mess up the first time around.
+! So we unroll slightly...
+do_single_div:
+ deccc %g2
+ bl end_regular_divide
+ nop
+ sub %o3,%o5,%o3
+ mov 1,%o2
+ b end_single_divloop
+ nop
+single_divloop:
+ sll %o2,1,%o2
+ bl 1f
+ srl %o5,1,%o5
+ ! %o3 >= 0
+ sub %o3,%o5,%o3
+ b 2f
+ inc %o2
+ 1: ! %o3 < 0
+ add %o3,%o5,%o3
+ dec %o2
+ 2:
+ end_single_divloop:
+ deccc %g2
+ bge single_divloop
+ tst %o3
+ b end_regular_divide
+ nop
+not_really_big:
+1:
+ sll %o5,4,%o5
+ cmp %o5,%o3
+ bleu 1b
+ inccc %o4
+ be got_result
+ dec %o4
+do_regular_divide:
+ ! Do the main division iteration
+ tst %o3
+ ! Fall through into divide loop
+divloop:
+ sll %o2,4,%o2
+ !depth 1, accumulated bits 0
+ bl L.1.16
+ srl %o5,1,%o5
+ ! remainder is nonnegative
+ subcc %o3,%o5,%o3
+ !depth 2, accumulated bits 1
+ bl L.2.17
+ srl %o5,1,%o5
+ ! remainder is nonnegative
+ subcc %o3,%o5,%o3
+ !depth 3, accumulated bits 3
+ bl L.3.19
+ srl %o5,1,%o5
+ ! remainder is nonnegative
+ subcc %o3,%o5,%o3
+ !depth 4, accumulated bits 7
+ bl L.4.23
+ srl %o5,1,%o5
+ ! remainder is nonnegative
+ subcc %o3,%o5,%o3
+ b 9f
+ add %o2, (7*2+1), %o2
+L.4.23:
+ ! remainder is negative
+ addcc %o3,%o5,%o3
+ b 9f
+ add %o2, (7*2-1), %o2
+L.3.19:
+ ! remainder is negative
+ addcc %o3,%o5,%o3
+ !depth 4, accumulated bits 5
+ bl L.4.21
+ srl %o5,1,%o5
+ ! remainder is nonnegative
+ subcc %o3,%o5,%o3
+ b 9f
+ add %o2, (5*2+1), %o2
+L.4.21:
+ ! remainder is negative
+ addcc %o3,%o5,%o3
+ b 9f
+ add %o2, (5*2-1), %o2
+L.2.17:
+ ! remainder is negative
+ addcc %o3,%o5,%o3
+ !depth 3, accumulated bits 1
+ bl L.3.17
+ srl %o5,1,%o5
+ ! remainder is nonnegative
+ subcc %o3,%o5,%o3
+ !depth 4, accumulated bits 3
+ bl L.4.19
+ srl %o5,1,%o5
+ ! remainder is nonnegative
+ subcc %o3,%o5,%o3
+ b 9f
+ add %o2, (3*2+1), %o2
+L.4.19:
+ ! remainder is negative
+ addcc %o3,%o5,%o3
+ b 9f
+ add %o2, (3*2-1), %o2
+L.3.17:
+ ! remainder is negative
+ addcc %o3,%o5,%o3
+ !depth 4, accumulated bits 1
+ bl L.4.17
+ srl %o5,1,%o5
+ ! remainder is nonnegative
+ subcc %o3,%o5,%o3
+ b 9f
+ add %o2, (1*2+1), %o2
+L.4.17:
+ ! remainder is negative
+ addcc %o3,%o5,%o3
+ b 9f
+ add %o2, (1*2-1), %o2
+L.1.16:
+ ! remainder is negative
+ addcc %o3,%o5,%o3
+ !depth 2, accumulated bits -1
+ bl L.2.15
+ srl %o5,1,%o5
+ ! remainder is nonnegative
+ subcc %o3,%o5,%o3
+ !depth 3, accumulated bits -1
+ bl L.3.15
+ srl %o5,1,%o5
+ ! remainder is nonnegative
+ subcc %o3,%o5,%o3
+ !depth 4, accumulated bits -1
+ bl L.4.15
+ srl %o5,1,%o5
+ ! remainder is nonnegative
+ subcc %o3,%o5,%o3
+ b 9f
+ add %o2, (-1*2+1), %o2
+L.4.15:
+ ! remainder is negative
+ addcc %o3,%o5,%o3
+ b 9f
+ add %o2, (-1*2-1), %o2
+L.3.15:
+ ! remainder is negative
+ addcc %o3,%o5,%o3
+ !depth 4, accumulated bits -3
+ bl L.4.13
+ srl %o5,1,%o5
+ ! remainder is nonnegative
+ subcc %o3,%o5,%o3
+ b 9f
+ add %o2, (-3*2+1), %o2
+L.4.13:
+ ! remainder is negative
+ addcc %o3,%o5,%o3
+ b 9f
+ add %o2, (-3*2-1), %o2
+L.2.15:
+ ! remainder is negative
+ addcc %o3,%o5,%o3
+ !depth 3, accumulated bits -3
+ bl L.3.13
+ srl %o5,1,%o5
+ ! remainder is nonnegative
+ subcc %o3,%o5,%o3
+ !depth 4, accumulated bits -5
+ bl L.4.11
+ srl %o5,1,%o5
+ ! remainder is nonnegative
+ subcc %o3,%o5,%o3
+ b 9f
+ add %o2, (-5*2+1), %o2
+L.4.11:
+ ! remainder is negative
+ addcc %o3,%o5,%o3
+ b 9f
+ add %o2, (-5*2-1), %o2
+L.3.13:
+ ! remainder is negative
+ addcc %o3,%o5,%o3
+ !depth 4, accumulated bits -7
+ bl L.4.9
+ srl %o5,1,%o5
+ ! remainder is nonnegative
+ subcc %o3,%o5,%o3
+ b 9f
+ add %o2, (-7*2+1), %o2
+L.4.9:
+ ! remainder is negative
+ addcc %o3,%o5,%o3
+ b 9f
+ add %o2, (-7*2-1), %o2
+ 9:
+end_regular_divide:
+ deccc %o4
+ bge divloop
+ tst %o3
+ bge got_result
+ nop
+ ! non-restoring fixup here
+ dec %o2
+got_result:
+ tst %g3
+ bge 1f
+ restore
+ ! answer < 0
+ retl ! leaf-routine return
+ neg %o2,%o0 ! quotient <- -%o2
+1:
+ retl ! leaf-routine return
+ mov %o2,%o0 ! quotient <- %o2
diff --git a/contrib/compiler-rt/lib/sparc64/generate.sh b/contrib/compiler-rt/lib/sparc64/generate.sh
new file mode 100644
index 0000000..17c1106
--- /dev/null
+++ b/contrib/compiler-rt/lib/sparc64/generate.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+m4 divmod.m4 | sed -e 's/[[:space:]]*$//' | grep -v '^$' > modsi3.S
+m4 -DANSWER=quotient divmod.m4 | sed -e 's/[[:space:]]*$//' | grep -v '^$' > divsi3.S
+echo '! This file intentionally left blank' > umodsi3.S
+echo '! This file intentionally left blank' > udivsi3.S
diff --git a/contrib/compiler-rt/lib/sparc64/modsi3.S b/contrib/compiler-rt/lib/sparc64/modsi3.S
new file mode 100644
index 0000000..98deb9d
--- /dev/null
+++ b/contrib/compiler-rt/lib/sparc64/modsi3.S
@@ -0,0 +1,333 @@
+/*
+ * This m4 code has been taken from The SPARC Architecture Manual Version 8.
+ */
+/*
+ * Division/Remainder
+ *
+ * Input is:
+ * dividend -- the thing being divided
+ * divisor -- how many ways to divide it
+ * Important parameters:
+ * N -- how many bits per iteration we try to get
+ * as our current guess:
+ * WORDSIZE -- how many bits altogether we're talking about:
+ * obviously:
+ * A derived constant:
+ * TOPBITS -- how many bits are in the top "decade" of a number:
+ *
+ * Important variables are:
+ * Q -- the partial quotient under development -- initially 0
+ * R -- the remainder so far -- initially == the dividend
+ * ITER -- number of iterations of the main division loop which will
+ * be required. Equal to CEIL( lg2(quotient)/4 )
+ * Note that this is log_base_(2ˆ4) of the quotient.
+ * V -- the current comparand -- initially divisor*2ˆ(ITER*4-1)
+ * Cost:
+ * current estimate for non-large dividend is
+ * CEIL( lg2(quotient) / 4 ) x ( 10 + 74/2 ) + C
+ * a large dividend is one greater than 2ˆ(31-4 ) and takes a
+ * different path, as the upper bits of the quotient must be developed
+ * one bit at a time.
+ * This uses the m4 and cpp macro preprocessors.
+ */
+/*
+ * This is the recursive definition of how we develop quotient digits.
+ * It takes three important parameters:
+ * $1 -- the current depth, 1<=$1<=4
+ * $2 -- the current accumulation of quotient bits
+ * 4 -- max depth
+ * We add a new bit to $2 and either recurse or insert the bits in the quotient.
+ * Dynamic input:
+ * %o3 -- current remainder
+ * %o2 -- current quotient
+ * %o5 -- current comparand
+ * cc -- set on current value of %o3
+ * Dynamic output:
+ * %o3', %o2', %o5', cc'
+ */
+#include "../assembly.h"
+.text
+ .align 4
+DEFINE_COMPILERRT_FUNCTION(__umodsi3)
+ save %sp,-64,%sp ! do this for debugging
+ b divide
+ mov 0,%g3 ! result always nonnegative
+DEFINE_COMPILERRT_FUNCTION(__modsi3)
+ save %sp,-64,%sp ! do this for debugging
+ orcc %o1,%o0,%g0 ! are either %o0 or %o1 negative
+ bge divide ! if not, skip this junk
+ mov %o0,%g3 ! record sign of result in sign of %g3
+ tst %o1
+ bge 2f
+ tst %o0
+ ! %o1 < 0
+ bge divide
+ neg %o1
+ 2:
+ ! %o0 < 0
+ neg %o0
+ ! FALL THROUGH
+divide:
+ ! Compute size of quotient, scale comparand.
+ orcc %o1,%g0,%o5 ! movcc %o1,%o5
+ te 2 ! if %o1 = 0
+ mov %o0,%o3
+ mov 0,%o2
+ sethi %hi(1<<(32-4 -1)),%g1
+ cmp %o3,%g1
+ blu not_really_big
+ mov 0,%o4
+ !
+ ! Here, the %o0 is >= 2ˆ(31-4) or so. We must be careful here,
+ ! as our usual 4-at-a-shot divide step will cause overflow and havoc.
+ ! The total number of bits in the result here is 4*%o4+%g2, where
+ ! %g2 <= 4.
+ ! Compute %o4 in an unorthodox manner: know we need to Shift %o5 into
+! the top decade: so don't even bother to compare to %o3.
+1:
+ cmp %o5,%g1
+ bgeu 3f
+ mov 1,%g2
+ sll %o5,4,%o5
+ b 1b
+ inc %o4
+! Now compute %g2
+2: addcc %o5,%o5,%o5
+ bcc not_too_big
+ add %g2,1,%g2
+ ! We're here if the %o1 overflowed when Shifting.
+ ! This means that %o3 has the high-order bit set.
+ ! Restore %o5 and subtract from %o3.
+ sll %g1,4 ,%g1 ! high order bit
+ srl %o5,1,%o5 ! rest of %o5
+ add %o5,%g1,%o5
+ b do_single_div
+ dec %g2
+not_too_big:
+3: cmp %o5,%o3
+ blu 2b
+ nop
+ be do_single_div
+ nop
+! %o5 > %o3: went too far: back up 1 step
+! srl %o5,1,%o5
+! dec %g2
+! do single-bit divide steps
+!
+! We have to be careful here. We know that %o3 >= %o5, so we can do the
+! first divide step without thinking. BUT, the others are conditional,
+! and are only done if %o3 >= 0. Because both %o3 and %o5 may have the high-
+! order bit set in the first step, just falling into the regular
+! division loop will mess up the first time around.
+! So we unroll slightly...
+do_single_div:
+ deccc %g2
+ bl end_regular_divide
+ nop
+ sub %o3,%o5,%o3
+ mov 1,%o2
+ b end_single_divloop
+ nop
+single_divloop:
+ sll %o2,1,%o2
+ bl 1f
+ srl %o5,1,%o5
+ ! %o3 >= 0
+ sub %o3,%o5,%o3
+ b 2f
+ inc %o2
+ 1: ! %o3 < 0
+ add %o3,%o5,%o3
+ dec %o2
+ 2:
+ end_single_divloop:
+ deccc %g2
+ bge single_divloop
+ tst %o3
+ b end_regular_divide
+ nop
+not_really_big:
+1:
+ sll %o5,4,%o5
+ cmp %o5,%o3
+ bleu 1b
+ inccc %o4
+ be got_result
+ dec %o4
+do_regular_divide:
+ ! Do the main division iteration
+ tst %o3
+ ! Fall through into divide loop
+divloop:
+ sll %o2,4,%o2
+ !depth 1, accumulated bits 0
+ bl L.1.16
+ srl %o5,1,%o5
+ ! remainder is nonnegative
+ subcc %o3,%o5,%o3
+ !depth 2, accumulated bits 1
+ bl L.2.17
+ srl %o5,1,%o5
+ ! remainder is nonnegative
+ subcc %o3,%o5,%o3
+ !depth 3, accumulated bits 3
+ bl L.3.19
+ srl %o5,1,%o5
+ ! remainder is nonnegative
+ subcc %o3,%o5,%o3
+ !depth 4, accumulated bits 7
+ bl L.4.23
+ srl %o5,1,%o5
+ ! remainder is nonnegative
+ subcc %o3,%o5,%o3
+ b 9f
+ add %o2, (7*2+1), %o2
+L.4.23:
+ ! remainder is negative
+ addcc %o3,%o5,%o3
+ b 9f
+ add %o2, (7*2-1), %o2
+L.3.19:
+ ! remainder is negative
+ addcc %o3,%o5,%o3
+ !depth 4, accumulated bits 5
+ bl L.4.21
+ srl %o5,1,%o5
+ ! remainder is nonnegative
+ subcc %o3,%o5,%o3
+ b 9f
+ add %o2, (5*2+1), %o2
+L.4.21:
+ ! remainder is negative
+ addcc %o3,%o5,%o3
+ b 9f
+ add %o2, (5*2-1), %o2
+L.2.17:
+ ! remainder is negative
+ addcc %o3,%o5,%o3
+ !depth 3, accumulated bits 1
+ bl L.3.17
+ srl %o5,1,%o5
+ ! remainder is nonnegative
+ subcc %o3,%o5,%o3
+ !depth 4, accumulated bits 3
+ bl L.4.19
+ srl %o5,1,%o5
+ ! remainder is nonnegative
+ subcc %o3,%o5,%o3
+ b 9f
+ add %o2, (3*2+1), %o2
+L.4.19:
+ ! remainder is negative
+ addcc %o3,%o5,%o3
+ b 9f
+ add %o2, (3*2-1), %o2
+L.3.17:
+ ! remainder is negative
+ addcc %o3,%o5,%o3
+ !depth 4, accumulated bits 1
+ bl L.4.17
+ srl %o5,1,%o5
+ ! remainder is nonnegative
+ subcc %o3,%o5,%o3
+ b 9f
+ add %o2, (1*2+1), %o2
+L.4.17:
+ ! remainder is negative
+ addcc %o3,%o5,%o3
+ b 9f
+ add %o2, (1*2-1), %o2
+L.1.16:
+ ! remainder is negative
+ addcc %o3,%o5,%o3
+ !depth 2, accumulated bits -1
+ bl L.2.15
+ srl %o5,1,%o5
+ ! remainder is nonnegative
+ subcc %o3,%o5,%o3
+ !depth 3, accumulated bits -1
+ bl L.3.15
+ srl %o5,1,%o5
+ ! remainder is nonnegative
+ subcc %o3,%o5,%o3
+ !depth 4, accumulated bits -1
+ bl L.4.15
+ srl %o5,1,%o5
+ ! remainder is nonnegative
+ subcc %o3,%o5,%o3
+ b 9f
+ add %o2, (-1*2+1), %o2
+L.4.15:
+ ! remainder is negative
+ addcc %o3,%o5,%o3
+ b 9f
+ add %o2, (-1*2-1), %o2
+L.3.15:
+ ! remainder is negative
+ addcc %o3,%o5,%o3
+ !depth 4, accumulated bits -3
+ bl L.4.13
+ srl %o5,1,%o5
+ ! remainder is nonnegative
+ subcc %o3,%o5,%o3
+ b 9f
+ add %o2, (-3*2+1), %o2
+L.4.13:
+ ! remainder is negative
+ addcc %o3,%o5,%o3
+ b 9f
+ add %o2, (-3*2-1), %o2
+L.2.15:
+ ! remainder is negative
+ addcc %o3,%o5,%o3
+ !depth 3, accumulated bits -3
+ bl L.3.13
+ srl %o5,1,%o5
+ ! remainder is nonnegative
+ subcc %o3,%o5,%o3
+ !depth 4, accumulated bits -5
+ bl L.4.11
+ srl %o5,1,%o5
+ ! remainder is nonnegative
+ subcc %o3,%o5,%o3
+ b 9f
+ add %o2, (-5*2+1), %o2
+L.4.11:
+ ! remainder is negative
+ addcc %o3,%o5,%o3
+ b 9f
+ add %o2, (-5*2-1), %o2
+L.3.13:
+ ! remainder is negative
+ addcc %o3,%o5,%o3
+ !depth 4, accumulated bits -7
+ bl L.4.9
+ srl %o5,1,%o5
+ ! remainder is nonnegative
+ subcc %o3,%o5,%o3
+ b 9f
+ add %o2, (-7*2+1), %o2
+L.4.9:
+ ! remainder is negative
+ addcc %o3,%o5,%o3
+ b 9f
+ add %o2, (-7*2-1), %o2
+ 9:
+end_regular_divide:
+ deccc %o4
+ bge divloop
+ tst %o3
+ bge got_result
+ nop
+ ! non-restoring fixup here
+ add %o3,%o1,%o3
+got_result:
+ tst %g3
+ bge 1f
+ restore
+ ! answer < 0
+ retl ! leaf-routine return
+ neg %o3,%o0 ! remainder <- -%o3
+1:
+ retl ! leaf-routine return
+ mov %o3,%o0 ! remainder <- %o3
diff --git a/contrib/compiler-rt/lib/sparc64/udivsi3.S b/contrib/compiler-rt/lib/sparc64/udivsi3.S
new file mode 100644
index 0000000..a418852
--- /dev/null
+++ b/contrib/compiler-rt/lib/sparc64/udivsi3.S
@@ -0,0 +1 @@
+! This file intentionally left blank
diff --git a/contrib/compiler-rt/lib/sparc64/umodsi3.S b/contrib/compiler-rt/lib/sparc64/umodsi3.S
new file mode 100644
index 0000000..a418852
--- /dev/null
+++ b/contrib/compiler-rt/lib/sparc64/umodsi3.S
@@ -0,0 +1 @@
+! This file intentionally left blank
diff --git a/contrib/compiler-rt/lib/subdf3.c b/contrib/compiler-rt/lib/subdf3.c
index 825e3c6..5eb1853 100644
--- a/contrib/compiler-rt/lib/subdf3.c
+++ b/contrib/compiler-rt/lib/subdf3.c
@@ -11,7 +11,6 @@
// IEEE-754 default rounding (to nearest, ties to even).
//
//===----------------------------------------------------------------------===//
-#include "abi.h"
#define DOUBLE_PRECISION
#include "fp_lib.h"
diff --git a/contrib/compiler-rt/lib/subsf3.c b/contrib/compiler-rt/lib/subsf3.c
index 625376a..351be0ef 100644
--- a/contrib/compiler-rt/lib/subsf3.c
+++ b/contrib/compiler-rt/lib/subsf3.c
@@ -11,7 +11,6 @@
// IEEE-754 default rounding (to nearest, ties to even).
//
//===----------------------------------------------------------------------===//
-#include "abi.h"
#define SINGLE_PRECISION
#include "fp_lib.h"
diff --git a/contrib/compiler-rt/lib/subvdi3.c b/contrib/compiler-rt/lib/subvdi3.c
index 36b51ad..0f1f924 100644
--- a/contrib/compiler-rt/lib/subvdi3.c
+++ b/contrib/compiler-rt/lib/subvdi3.c
@@ -11,10 +11,8 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
-#include <stdlib.h>
/* Returns: a - b */
diff --git a/contrib/compiler-rt/lib/subvsi3.c b/contrib/compiler-rt/lib/subvsi3.c
index 03983f7..ec4594c 100644
--- a/contrib/compiler-rt/lib/subvsi3.c
+++ b/contrib/compiler-rt/lib/subvsi3.c
@@ -11,10 +11,8 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
-#include <stdlib.h>
/* Returns: a - b */
diff --git a/contrib/compiler-rt/lib/subvti3.c b/contrib/compiler-rt/lib/subvti3.c
index 5d693dc..44127b7 100644
--- a/contrib/compiler-rt/lib/subvti3.c
+++ b/contrib/compiler-rt/lib/subvti3.c
@@ -15,7 +15,6 @@
#if __x86_64
#include "int_lib.h"
-#include <stdlib.h>
/* Returns: a - b */
diff --git a/contrib/compiler-rt/lib/trampoline_setup.c b/contrib/compiler-rt/lib/trampoline_setup.c
index a22199e..e0765b1 100644
--- a/contrib/compiler-rt/lib/trampoline_setup.c
+++ b/contrib/compiler-rt/lib/trampoline_setup.c
@@ -8,9 +8,6 @@
* ===----------------------------------------------------------------------===
*/
-#include <stdint.h>
-#include <stdlib.h>
-
#include "int_lib.h"
extern void __clear_cache(void* start, void* end);
@@ -47,4 +44,4 @@ void __trampoline_setup(uint32_t* trampOnStack, int trampSizeAllocated,
/* clear instruction cache */
__clear_cache(trampOnStack, &trampOnStack[10]);
}
-#endif /* __ppc__ */
+#endif /* __ppc__ && !defined(__powerpc64__) */
diff --git a/contrib/compiler-rt/lib/truncdfsf2.c b/contrib/compiler-rt/lib/truncdfsf2.c
index 1dbf02f..f57af7e 100644
--- a/contrib/compiler-rt/lib/truncdfsf2.c
+++ b/contrib/compiler-rt/lib/truncdfsf2.c
@@ -37,11 +37,7 @@
//
//===----------------------------------------------------------------------===//
-#include <stdint.h>
-#include <limits.h>
-#include <stdbool.h>
-
-#include "abi.h"
+#include "int_lib.h"
typedef double src_t;
typedef uint64_t src_rep_t;
diff --git a/contrib/compiler-rt/lib/ucmpdi2.c b/contrib/compiler-rt/lib/ucmpdi2.c
index f2d3f99..3242bbf 100644
--- a/contrib/compiler-rt/lib/ucmpdi2.c
+++ b/contrib/compiler-rt/lib/ucmpdi2.c
@@ -11,7 +11,6 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
diff --git a/contrib/compiler-rt/lib/udivdi3.c b/contrib/compiler-rt/lib/udivdi3.c
index bbd551a..6c0303d 100644
--- a/contrib/compiler-rt/lib/udivdi3.c
+++ b/contrib/compiler-rt/lib/udivdi3.c
@@ -11,7 +11,6 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
diff --git a/contrib/compiler-rt/lib/udivmoddi4.c b/contrib/compiler-rt/lib/udivmoddi4.c
index c5db21c..73043d4 100644
--- a/contrib/compiler-rt/lib/udivmoddi4.c
+++ b/contrib/compiler-rt/lib/udivmoddi4.c
@@ -11,7 +11,6 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
@@ -133,7 +132,7 @@ __udivmoddi4(du_int a, du_int b, du_int* rem)
*rem = n.s.low & (d.s.low - 1);
if (d.s.low == 1)
return n.all;
- unsigned sr = __builtin_ctz(d.s.low);
+ sr = __builtin_ctz(d.s.low);
q.s.high = n.s.high >> sr;
q.s.low = (n.s.high << (n_uword_bits - sr)) | (n.s.low >> sr);
return q.all;
diff --git a/contrib/compiler-rt/lib/udivmodsi4.c b/contrib/compiler-rt/lib/udivmodsi4.c
index 2a3ee27..5b49089 100644
--- a/contrib/compiler-rt/lib/udivmodsi4.c
+++ b/contrib/compiler-rt/lib/udivmodsi4.c
@@ -11,7 +11,6 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
diff --git a/contrib/compiler-rt/lib/udivmodti4.c b/contrib/compiler-rt/lib/udivmodti4.c
index d1e19ed..427861b 100644
--- a/contrib/compiler-rt/lib/udivmodti4.c
+++ b/contrib/compiler-rt/lib/udivmodti4.c
@@ -132,7 +132,7 @@ __udivmodti4(tu_int a, tu_int b, tu_int* rem)
*rem = n.s.low & (d.s.low - 1);
if (d.s.low == 1)
return n.all;
- unsigned sr = __builtin_ctzll(d.s.low);
+ sr = __builtin_ctzll(d.s.low);
q.s.high = n.s.high >> sr;
q.s.low = (n.s.high << (n_udword_bits - sr)) | (n.s.low >> sr);
return q.all;
diff --git a/contrib/compiler-rt/lib/udivsi3.c b/contrib/compiler-rt/lib/udivsi3.c
index 721ae89..39ef48b 100644
--- a/contrib/compiler-rt/lib/udivsi3.c
+++ b/contrib/compiler-rt/lib/udivsi3.c
@@ -11,7 +11,6 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
diff --git a/contrib/compiler-rt/lib/umoddi3.c b/contrib/compiler-rt/lib/umoddi3.c
index 9de1a64..3541ab6 100644
--- a/contrib/compiler-rt/lib/umoddi3.c
+++ b/contrib/compiler-rt/lib/umoddi3.c
@@ -11,7 +11,6 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
diff --git a/contrib/compiler-rt/lib/umodsi3.c b/contrib/compiler-rt/lib/umodsi3.c
index 569b7fc..aae741d 100644
--- a/contrib/compiler-rt/lib/umodsi3.c
+++ b/contrib/compiler-rt/lib/umodsi3.c
@@ -11,7 +11,6 @@
*
* ===----------------------------------------------------------------------===
*/
-#include "abi.h"
#include "int_lib.h"
diff --git a/contrib/compiler-rt/lib/x86_64/floatdidf.c b/contrib/compiler-rt/lib/x86_64/floatdidf.c
index cce3cd5..388404e 100644
--- a/contrib/compiler-rt/lib/x86_64/floatdidf.c
+++ b/contrib/compiler-rt/lib/x86_64/floatdidf.c
@@ -6,7 +6,7 @@
#ifdef __x86_64__
-#include <stdint.h>
+#include "../int_lib.h"
double __floatdidf(int64_t a)
{
diff --git a/contrib/compiler-rt/lib/x86_64/floatdisf.c b/contrib/compiler-rt/lib/x86_64/floatdisf.c
index 753ba90..96c3728 100644
--- a/contrib/compiler-rt/lib/x86_64/floatdisf.c
+++ b/contrib/compiler-rt/lib/x86_64/floatdisf.c
@@ -4,7 +4,7 @@
#ifdef __x86_64__
-#include <stdint.h>
+#include "../int_lib.h"
float __floatdisf(int64_t a)
{
diff --git a/contrib/compiler-rt/lib/x86_64/floatdixf.c b/contrib/compiler-rt/lib/x86_64/floatdixf.c
index 569f727..c01193a 100644
--- a/contrib/compiler-rt/lib/x86_64/floatdixf.c
+++ b/contrib/compiler-rt/lib/x86_64/floatdixf.c
@@ -6,7 +6,7 @@
#ifdef __x86_64__
-#include <stdint.h>
+#include "../int_lib.h"
long double __floatdixf(int64_t a)
{
diff --git a/contrib/ee/ee.c b/contrib/ee/ee.c
index ebc1069..70a4407 100755
--- a/contrib/ee/ee.c
+++ b/contrib/ee/ee.c
@@ -307,7 +307,7 @@ void undel_word P_((void));
void del_line P_((void));
void undel_line P_((void));
void adv_word P_((void));
-void move_rel P_((char direction, int lines));
+void move_rel P_((int direction, int lines));
void eol P_((void));
void bol P_((void));
void adv_line P_((void));
@@ -2105,10 +2105,10 @@ char *arguments[];
else if (!strcmp("-?", buff))
{
fprintf(stderr, usage0, arguments[0]);
- fprintf(stderr, usage1);
- fprintf(stderr, usage2);
- fprintf(stderr, usage3);
- fprintf(stderr, usage4);
+ fputs(usage1, stderr);
+ fputs(usage2, stderr);
+ fputs(usage3, stderr);
+ fputs(usage4, stderr);
exit(1);
}
else if ((*buff == '+') && (start_at_line == NULL))
@@ -2939,7 +2939,7 @@ while ((position < curr_line->line_length) && ((*point == 32) || (*point == 9)))
void
move_rel(direction, lines) /* move relative to current line */
-char direction;
+int direction;
int lines;
{
int i;
@@ -3242,7 +3242,7 @@ char *string; /* string containing user command */
}
if (shell_fork)
{
- printf(continue_msg);
+ fputs(continue_msg, stdout);
fflush(stdout);
while ((in = getchar()) != '\n')
;
diff --git a/contrib/file/softmagic.c b/contrib/file/softmagic.c
index 88f5214..174115e 100644
--- a/contrib/file/softmagic.c
+++ b/contrib/file/softmagic.c
@@ -1582,7 +1582,7 @@ mget(struct magic_set *ms, const unsigned char *s,
case FILE_INDIRECT:
if ((ms->flags & (MAGIC_MIME|MAGIC_APPLE)) == 0 &&
- file_printf(ms, m->desc) == -1)
+ file_printf(ms, "%s", m->desc) == -1)
return -1;
if (nbytes < offset)
return 0;
diff --git a/contrib/gcc/ChangeLog.gcc43 b/contrib/gcc/ChangeLog.gcc43
index fbd462e..94abc02 100644
--- a/contrib/gcc/ChangeLog.gcc43
+++ b/contrib/gcc/ChangeLog.gcc43
@@ -96,6 +96,14 @@
* doc/invoke.texi: Add entry about geode processor.
+2006-10-24 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/28796
+ * builtins.c (fold_builtin_classify): Use HONOR_INFINITIES
+ and HONOR_NANS instead of MODE_HAS_INFINITIES and MODE_HAS_NANS
+ for deciding optimizations in consistency with fold-const.c
+ (fold_builtin_unordered_cmp): Likewise.
+
2006-10-22 H.J. Lu <hongjiu.lu@intel.com> (r117958)
* config.gcc (i[34567]86-*-*): Add tmmintrin.h to extra_headers.
diff --git a/contrib/gcc/builtins.c b/contrib/gcc/builtins.c
index 27f1989..2359a51 100644
--- a/contrib/gcc/builtins.c
+++ b/contrib/gcc/builtins.c
@@ -8720,7 +8720,7 @@ fold_builtin_classify (tree fndecl, tree arglist, int builtin_index)
switch (builtin_index)
{
case BUILT_IN_ISINF:
- if (!MODE_HAS_INFINITIES (TYPE_MODE (TREE_TYPE (arg))))
+ if (!HONOR_INFINITIES (TYPE_MODE (TREE_TYPE (arg))))
return omit_one_operand (type, integer_zero_node, arg);
if (TREE_CODE (arg) == REAL_CST)
@@ -8736,8 +8736,8 @@ fold_builtin_classify (tree fndecl, tree arglist, int builtin_index)
return NULL_TREE;
case BUILT_IN_FINITE:
- if (!MODE_HAS_NANS (TYPE_MODE (TREE_TYPE (arg)))
- && !MODE_HAS_INFINITIES (TYPE_MODE (TREE_TYPE (arg))))
+ if (!HONOR_NANS (TYPE_MODE (TREE_TYPE (arg)))
+ && !HONOR_INFINITIES (TYPE_MODE (TREE_TYPE (arg))))
return omit_one_operand (type, integer_zero_node, arg);
if (TREE_CODE (arg) == REAL_CST)
@@ -8750,7 +8750,7 @@ fold_builtin_classify (tree fndecl, tree arglist, int builtin_index)
return NULL_TREE;
case BUILT_IN_ISNAN:
- if (!MODE_HAS_NANS (TYPE_MODE (TREE_TYPE (arg))))
+ if (!HONOR_NANS (TYPE_MODE (TREE_TYPE (arg))))
return omit_one_operand (type, integer_zero_node, arg);
if (TREE_CODE (arg) == REAL_CST)
@@ -8833,13 +8833,13 @@ fold_builtin_unordered_cmp (tree fndecl, tree arglist,
if (unordered_code == UNORDERED_EXPR)
{
- if (!MODE_HAS_NANS (TYPE_MODE (TREE_TYPE (arg0))))
+ if (!HONOR_NANS (TYPE_MODE (TREE_TYPE (arg0))))
return omit_two_operands (type, integer_zero_node, arg0, arg1);
return fold_build2 (UNORDERED_EXPR, type, arg0, arg1);
}
- code = MODE_HAS_NANS (TYPE_MODE (TREE_TYPE (arg0))) ? unordered_code
- : ordered_code;
+ code = HONOR_NANS (TYPE_MODE (TREE_TYPE (arg0))) ? unordered_code
+ : ordered_code;
return fold_build1 (TRUTH_NOT_EXPR, type,
fold_build2 (code, type, arg0, arg1));
}
diff --git a/contrib/gcc/config/freebsd.h b/contrib/gcc/config/freebsd.h
index 8eb434e..6486e11 100644
--- a/contrib/gcc/config/freebsd.h
+++ b/contrib/gcc/config/freebsd.h
@@ -63,6 +63,7 @@ Boston, MA 02110-1301, USA. */
/* All FreeBSD Architectures support the ELF object file format. */
#undef OBJECT_FORMAT_ELF
#define OBJECT_FORMAT_ELF 1
+#undef TARGET_ELF
#define TARGET_ELF 1
/* Don't assume anything about the header files. */
diff --git a/contrib/gcclibs/libcpp/include/cpplib.h b/contrib/gcclibs/libcpp/include/cpplib.h
index 5fb80d9..c6a5efc 100644
--- a/contrib/gcclibs/libcpp/include/cpplib.h
+++ b/contrib/gcclibs/libcpp/include/cpplib.h
@@ -555,7 +555,8 @@ enum builtin_type
BT_TIME, /* `__TIME__' */
BT_STDC, /* `__STDC__' */
BT_PRAGMA, /* `_Pragma' operator */
- BT_TIMESTAMP /* `__TIMESTAMP__' */
+ BT_TIMESTAMP, /* `__TIMESTAMP__' */
+ BT_COUNTER /* `__COUNTER__' */
};
#define CPP_HASHNODE(HNODE) ((cpp_hashnode *) (HNODE))
diff --git a/contrib/gcclibs/libcpp/init.c b/contrib/gcclibs/libcpp/init.c
index 4330f88..8280f2f 100644
--- a/contrib/gcclibs/libcpp/init.c
+++ b/contrib/gcclibs/libcpp/init.c
@@ -308,6 +308,7 @@ static const struct builtin builtin_array[] =
B("__BASE_FILE__", BT_BASE_FILE),
B("__LINE__", BT_SPECLINE),
B("__INCLUDE_LEVEL__", BT_INCLUDE_LEVEL),
+ B("__COUNTER__", BT_COUNTER),
/* Keep builtins not used for -traditional-cpp at the end, and
update init_builtins() if any more are added. */
B("_Pragma", BT_PRAGMA),
diff --git a/contrib/gcclibs/libcpp/internal.h b/contrib/gcclibs/libcpp/internal.h
index 857bfe1..addff61 100644
--- a/contrib/gcclibs/libcpp/internal.h
+++ b/contrib/gcclibs/libcpp/internal.h
@@ -448,6 +448,8 @@ struct cpp_reader
/* A saved list of the defined macros, for dependency checking
of precompiled headers. */
struct cpp_savedstate *savedstate;
+
+ unsigned int nextcounter;
};
/* Character classes. Based on the more primitive macros in safe-ctype.h.
diff --git a/contrib/gcclibs/libcpp/macro.c b/contrib/gcclibs/libcpp/macro.c
index be50c11..1eec578 100644
--- a/contrib/gcclibs/libcpp/macro.c
+++ b/contrib/gcclibs/libcpp/macro.c
@@ -262,6 +262,10 @@ _cpp_builtin_macro_text (cpp_reader *pfile, cpp_hashnode *node)
else
result = pfile->time;
break;
+
+ case BT_COUNTER:
+ number = pfile->nextcounter++;
+ break;
}
if (result == NULL)
diff --git a/contrib/gperf/src/output.cc b/contrib/gperf/src/output.cc
index c0c8e6c..2732057 100644
--- a/contrib/gperf/src/output.cc
+++ b/contrib/gperf/src/output.cc
@@ -1300,7 +1300,7 @@ Output::output_lookup_array () const
if (option[DEBUG])
fprintf (stderr,
- "dup_ptr[%d]: hash_value = %d, index = %d, count = %d\n",
+ "dup_ptr[%td]: hash_value = %d, index = %d, count = %d\n",
dup_ptr - duplicates,
dup_ptr->hash_value, dup_ptr->index, dup_ptr->count);
diff --git a/contrib/groff/tmac/doc-syms b/contrib/groff/tmac/doc-syms
index 30c406f..27afb84 100644
--- a/contrib/groff/tmac/doc-syms
+++ b/contrib/groff/tmac/doc-syms
@@ -605,6 +605,8 @@
.ds doc-str-St--isoC \*[doc-Tn-font-size]ISO/IEC\*[doc-str-St] 9899:1990
.as doc-str-St--isoC " (\*[Lq]\*[doc-Tn-font-size]ISO\~C\^90\*[doc-str-St]\*[Rq])
.als doc-str-St--isoC-90 doc-str-St--isoC
+.ds doc-str-St--isoC-2011 \*[doc-Tn-font-size]ISO/IEC\*[doc-str-St] 9899:2011
+.as doc-str-St--isoC-2011 " (\*[Lq]\*[doc-Tn-font-size]ISO\~C\^11\*[doc-str-St]\*[Rq])
.ds doc-str-St--isoC-99 \*[doc-Tn-font-size]ISO/IEC\*[doc-str-St] 9899:1999
.as doc-str-St--isoC-99 " (\*[Lq]\*[doc-Tn-font-size]ISO\~C\^99\*[doc-str-St]\*[Rq])
.ds doc-str-St--isoC-amd1 \*[doc-Tn-font-size]ISO/IEC\*[doc-str-St] 9899/AMD1:1995
@@ -812,6 +814,7 @@
.ds doc-str-Lb-librt \*[Px] \*[doc-str-Lb]Real-time Library (librt, \-lrt)
.ds doc-str-Lb-libsdp Bluetooth Service Discovery Protocol User Library (libsdp, \-lsdp)
.ds doc-str-Lb-libssp Buffer Overflow Protection Library (libssp, \-lssp)
+.ds doc-str-Lb-libstdthreads C11 Threads Library (libstdthreads, \-lstdthreads)
.ds doc-str-Lb-libSystem System Library (libSystem, \-lSystem)
.ds doc-str-Lb-libtermcap Termcap Access Library (libtermcap, \-ltermcap)
.ds doc-str-Lb-libterminfo Terminal Information Library (libterminfo, \-lterminfo)
diff --git a/contrib/groff/tmac/groff_mdoc.man b/contrib/groff/tmac/groff_mdoc.man
index 05b9305..1e24528 100644
--- a/contrib/groff/tmac/groff_mdoc.man
+++ b/contrib/groff/tmac/groff_mdoc.man
@@ -1797,6 +1797,8 @@ and their results are:
.Lb libsdp
.It Li libssp
.Lb libssp
+.It Li libstdthreads
+.Lb libstdthreads
.It Li libSystem
.Lb libSystem
.It Li libtermcap
@@ -2036,6 +2038,8 @@ are:
.St -isoC-90
.It Li \-isoC\-99
.St -isoC-99
+.It Li \-isoC\-2011
+.St -isoC-2011
.El
.Pp
.
diff --git a/contrib/less/command.c b/contrib/less/command.c
index 41c3869..def3d36 100644
--- a/contrib/less/command.c
+++ b/contrib/less/command.c
@@ -105,7 +105,7 @@ cmd_exec()
start_mca(action, prompt, mlist, cmdflags)
int action;
char *prompt;
- void *mlist;
+ void constant *mlist;
int cmdflags;
{
mca = action;
@@ -686,7 +686,7 @@ make_display()
static void
prompt()
{
- register char *p;
+ register char constant *p;
if (ungot != NULL)
{
diff --git a/contrib/less/prompt.c b/contrib/less/prompt.c
index daad00d..53e66dc 100644
--- a/contrib/less/prompt.c
+++ b/contrib/less/prompt.c
@@ -394,9 +394,9 @@ protochar(c, where, iseditproto)
* where to resume parsing the string.
* We must keep track of nested IFs and skip them properly.
*/
- static char *
+ static char constant *
skipcond(p)
- register char *p;
+ register char constant *p;
{
register int iflevel;
@@ -452,9 +452,9 @@ skipcond(p)
/*
* Decode a char that represents a position on the screen.
*/
- static char *
+ static char constant *
wherechar(p, wp)
- char *p;
+ char constant *p;
int *wp;
{
switch (*p)
@@ -478,10 +478,10 @@ wherechar(p, wp)
*/
public char *
pr_expand(proto, maxwidth)
- char *proto;
+ char constant *proto;
int maxwidth;
{
- register char *p;
+ register char constant *p;
register int c;
int where;
diff --git a/contrib/libarchive/COPYING b/contrib/libarchive/COPYING
new file mode 100644
index 0000000..9dbf49d
--- /dev/null
+++ b/contrib/libarchive/COPYING
@@ -0,0 +1,60 @@
+The libarchive distribution as a whole is Copyright by Tim Kientzle
+and is subject to the copyright notice reproduced at the bottom of
+this file.
+
+Each individual file in this distribution should have a clear
+copyright/licensing statement at the beginning of the file. If any do
+not, please let me know and I will rectify it. The following is
+intended to summarize the copyright status of the individual files;
+the actual statements in the files are controlling.
+
+* Except as listed below, all C sources (including .c and .h files)
+ and documentation files are subject to the copyright notice reproduced
+ at the bottom of this file.
+
+* The following source files are also subject in whole or in part to
+ a 3-clause UC Regents copyright; please read the individual source
+ files for details:
+ libarchive/archive_entry.c
+ libarchive/archive_read_support_compression_compress.c
+ libarchive/archive_write_set_compression_compress.c
+ libarchive/mtree.5
+ tar/matching.c
+
+* The following source files are in the public domain:
+ tar/getdate.c
+
+* The build files---including Makefiles, configure scripts,
+ and auxiliary scripts used as part of the compile process---have
+ widely varying licensing terms. Please check individual files before
+ distributing them to see if those restrictions apply to you.
+
+I intend for all new source code to use the license below and hope over
+time to replace code with other licenses with new implementations that
+do use the license below. The varying licensing of the build scripts
+seems to be an unavoidable mess.
+
+
+Copyright (c) 2003-2009 <author(s)>
+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
+ in this position and unchanged.
+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.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/contrib/libarchive/FREEBSD-Xlist b/contrib/libarchive/FREEBSD-Xlist
new file mode 100644
index 0000000..b87a53b
--- /dev/null
+++ b/contrib/libarchive/FREEBSD-Xlist
@@ -0,0 +1,30 @@
+$FreeBSD$
+CMakeLists.txt
+CTestConfig.cmake
+INSTALL
+Makefile.am
+build
+configure.ac
+contrib
+cpio/CMakeLists.txt
+cpio/cpio_windows.c
+cpio/cpio_windows.h
+cpio/config_freebsd.h
+cpio/test/CMakeLists.txt
+doc
+examples
+libarchive/CMakeLists.txt
+libarchive/archive_entry_copy_bhfi.c
+libarchive/archive_windows.c
+libarchive/archive_windows.h
+libarchive/config_freebsd.h
+libarchive/filter_fork_windows.c
+libarchive/mtree.5
+libarchive/test/.cvsignore
+libarchive/test/CMakeLists.txt
+tar/CMakeLists.txt
+tar/bsdtar_windows.c
+tar/bsdtar_windows.h
+tar/config_freebsd.h
+tar/test/CMakeLists.txt
+tar/test/test_windows.c
diff --git a/contrib/libarchive/FREEBSD-upgrade b/contrib/libarchive/FREEBSD-upgrade
new file mode 100644
index 0000000..12890c3
--- /dev/null
+++ b/contrib/libarchive/FREEBSD-upgrade
@@ -0,0 +1,24 @@
+$FreeBSD$
+
+libarchive
+
+The source code is pulled with svn:
+
+ svn checkout http://libarchive.googlecode.com/svn/release/2.8
+
+For the contrib directory files and directories were pruned by:
+
+sh -c 'for F in `cat FREEBSD-Xlist | grep -v FreeBSD`; do rm -rf ./$F ; done'
+
+You may check if there are any new files that we don't need.
+
+The instructions for importing new release and merging to HEAD can be found
+at FreeBSD wiki:
+
+ http://wiki.freebsd.org/SubversionPrimer/VendorImports
+
+To make local changes to libarchive, simply patch and commit to the trunk
+branch (aka HEAD). Never make local changes on the vendor branch.
+
+mm@FreeBSD.org
+21-December-2011
diff --git a/contrib/libarchive/NEWS b/contrib/libarchive/NEWS
new file mode 100644
index 0000000..4a25fe3
--- /dev/null
+++ b/contrib/libarchive/NEWS
@@ -0,0 +1,550 @@
+Feb 05, 2011: Fix issue 134: Improve handling of open failures
+Dec 06, 2010: Fix issue 119: Relax ISO verification
+Dec 06, 2010: Fix issue 121: mtree parsing
+Dec 05, 2010: Fix extraction of GNU tar 'D' directory entries
+Dec 05, 2010: Be less demanding in LZMA/XZ compression tests
+Jun 30, 2010: libarchive 2.8.4 released
+Jun 30, 2010: Improved reliability of hash function detection
+Jun 30, 2010: Fix issues on ancient FreeBSD, QNX, ancient NetBSD and Minix
+
+Mar 14, 2010: libarchive 2.8.3 released
+Mar 14, 2010: Symlink dereference fix for Linux broke the build there; corrected.
+
+Mar 14, 2010: libarchive 2.8.2 released
+Mar 12, 2010: Fix NULL deference for short self-extracting zip archives.
+Mar 12, 2010: Don't dereference symlinks on Linux when reading ACLs.
+Mar 07, 2010: Better detection of SHA2 support for old OpenSSL versions.
+Mar 07, 2010: Fix parsing of input files for bsdtar -T.
+Mar 07, 2010: Do not leak setup_xattr into the global namespace.
+
+Mar 06, 2010: libarchive 2.8.1 released
+Mar 06, 2010: Fix build when an older libarchive is already installed
+Mar 03, 2010: Use O_BINARY opening files in bsdtar
+Mar 02, 2010: Include missing archive_crc32.h
+Mar 01, 2010: Correctly include iconv.h required by libxml2.
+
+Feb 04, 2010: libarchive 2.8.0 released
+Jan 17, 2010: Fix error handling for 'echo nonexistent | cpio -o'
+Jan 17, 2010: Don't use futimes() on Cygwin
+
+Jan 02, 2010: libarchive 2.7.902a released (test release for 2.8)
+Jan 02, 2010: Fix tar/test/test_windows on MinGW
+Jan 02, 2010: Fix memory leaks in libarchive tests
+Jan 01, 2010: Fix memory leak when filter startup fails
+
+Dec 27, 2009: libarchive 2.7.901a released (test release for 2.8)
+
+Aug 04, 2009: libarchive 2.7.1 released
+Jul 20, 2009: Suppress bogus warning about unxz
+Jul 19, 2009: Support Cygwin 1.7
+Jun 11, 2009: Support lzma/xz files compressed with larger buffer sizes.
+May 24, 2009: Handle gzip files signed with OpenBSD "gzsig" program.
+May 07, 2009: Avoid false failures when reading from pipe.
+
+Apr 16, 2009: libarchive 2.7.0 released
+
+Apr 10, 2009: libarchive 2.6.992a released
+Apr 09, 2009: Fix SIGPIPE issue building with MSVC.
+Apr 09, 2009: Fix several minor memory leaks in libarchive and libarchive_test
+
+Apr 08, 2009: libarchive 2.6.991a released
+Apr 07, 2009: Additional tests added to bsdcpio_test
+
+Apr 01, 2009: libarchive 2.6.990a released
+Apr 01, 2009: Use command-line gunzip, bunzip2, unxz, unlzma for
+ decompression if the library is built without suitable
+ libraries. The setup functions return ARCHIVE_WARN
+ in this case so clients can adapt if necessary.
+Apr 01, 2009: Use getpw*_r and getgr*_r functions for thread-safety.
+Mar 24, 2009: Add archive_read_next_header2(), which is up to 25%
+ more efficient for some clients; from Brian Harring.
+Mar 22, 2009: PDF versions of manpages are now included in the distribution.
+Mar, 2009: Major work to improve Cygwin build by Charles Wilson.
+Feb/Mar, 2009: Major work on cmake build support, mostly by Michihiro NAKAJIMA.
+Feb/Mar, 2009: Major work on Visual Studio support by Michihiro NAKAJIMA.
+ All tests now pass.
+Feb 25, 2009: Fix Debian Bug #516577
+Feb 21, 2009: Yacc is no longer needed to build; date parser rewritten in C.
+Jan/Feb, 2009: Mtree work by Michihiro.
+Feb, 2009: Joliet support by Andreas Henriksson.
+Jan/Feb, 2009: New options framework by Michihiro.
+Feb, 2009: High-res timestamps on Tru64, AIX, and GNU Hurd, by Björn Jacke.
+Jan 18, 2009: Extended attributes work on FreeBSD and Linux now with pax format.
+Jan 07, 2009: New archive_read_disk_entry_from_file() knows about ACLs,
+ extended attributes, etc so that bsdtar and bsdcpio don't require
+ such system-specific knowledge.
+Jan 03, 2009: Read filter system extensively refactored. In particular,
+ read filter pipelines are now built out automatically and individual
+ filters should be much easier to implement. Documentation on the
+ Googlecode Wiki explains how to implement new filters.
+Dec 28, 2008: Many Windows/Visual Studio fixes from Michihiro NAKAJIMA.
+
+Dec 28, 2008: Main libarchive development moved from FreeBSD Perforce
+ server to Google Code. This should make it easier for more
+ people to participate in libarchive development.
+
+Dec 28, 2008: libarchive 2.6.0 released
+Dec 25, 2008: libarchive 2.5.905a released
+Dec 10, 2008: libarchive 2.5.904a released
+Dec 04, 2008: libarchive 2.5.903a released
+Nov 09, 2008: libarchive 2.5.902a released
+Nov 08, 2008: libarchive 2.5.901a released
+Nov 08, 2008: Start of pre-release testing for libarchive 2.6
+
+Nov 07, 2008: Read filter refactor: The decompression routines just
+ consume and produce arbitrarily-sized blocks. The reblocking
+ from read_support_compression_none() has been pulled into the
+ read core. Also, the decompression bid now makes multiple
+ passes and stacks read filters.
+Oct 21, 2008: bsdcpio: New command-line parser.
+Oct 19, 2008: Internal read_ahead change: short reads are now an error
+Oct 06, 2008: bsdtar: option parser no longer uses getopt_long(),
+ gives consistent option parsing on all platforms.
+Sep 19, 2008: Jaakko Heinonen: shar utility built on libarchive
+Sep 17, 2008: Pedro Giffuni: birthtime support
+Sep 17, 2008: Miklos Vajna: lzma reader and test. Note: I still have
+ some concerns about the auto-detection (LZMA file format
+ doesn't support auto-detection well), so this is not yet
+ enabled under archive_read_support_compression_all(). For
+ now, you must call archive_read_support_compression_lzma() if
+ you want LZMA read support.
+Sep 11, 2008: Ivailo Petrov: Many fixes to Windows build, new solution files
+Jul 26, 2008: archive_entry now tracks which values have not been set.
+ This helps zip extraction (file size is often "unknown") and
+ time restores (tar usually doesn't know atime).
+Jul 26, 2008: Joerg Sonnenberger: Performance improvements to shar writer
+Jul 25, 2008: Joerg Sonnenberger: mtree write support
+
+Jul 02, 2008: libarchive 2.5.5 released
+
+Jul 02, 2008: libarchive 2.5.5b released
+Jul 01, 2008: bsdcpio is being used by enough people, we can call it 1.0.0 now
+Jun 20, 2008: bsdcpio: If a -l link fails with EXDEV, copy the file instead
+Jun 19, 2008: bsdcpio: additional long options for better GNU cpio compat
+Jun 15, 2008: Many small portability and bugfixes since 2.5.4b.
+
+May 25, 2008: libarchive 2.5.4b released
+May 21, 2008: Joerg Sonnenberger: fix bsdtar hardlink handling for newc format
+
+May 21, 2008: More progress on Windows building. Thanks to "Scott"
+ for the Windows makefiles, thanks to Kees Zeelenberg for
+ code contributions.
+
+May 21, 2008: Fix a number of non-exploitable integer and buffer overflows,
+ thanks to David Remahl at Apple for pointing these out.
+
+May 21, 2008: Colin Percival: SIGINFO or SIGUSR1 to bsdtar prints progress info
+
+May 16, 2008: bsdtar's test harness no longer depends on file ordering.
+ This was causing spurious test failures on a lot of systems.
+ Thanks to Bernhard R. Link for the diagnosis.
+
+May 14, 2008: Joerg Sonnenberger: -s substitution support for bsdtar
+
+May 13, 2008: Joerg Sonnenberger: Many mtree improvements
+
+May 11, 2008: Joerg Sonnenberger: fix hardlink extraction when
+ hardlinks have different permissions from original file
+
+April 30, 2008: Primary libarchive work has been moved into the FreeBSD
+ project's Perforce repository: http://perforce.freebsd.org/
+ The libarchive project can be browsed at
+ //depot/user/kientzle/libarchive-portable
+ Direct link: http://preview.tinyurl.com/46mdgr
+
+May 04, 2008: libarchive 2.5.3b released
+ * libarchive: Several fixes to link resolver to address bsdcpio crashes
+ * bsdcpio: -p hardlink handling fixes
+ * tar/pax: Ensure ustar dirnames end in '/'; be more careful about
+ measuring filenames when deciding what pathname fields to use
+ * libarchive: Mark which entry strings are set; be accurate about
+ distinguishing empty strings ("") from unset ones (NULL)
+ * tar: Don't crash reading entries with empty filenames
+ * libarchive_test, bsdtar_test, bsdcpio_test: Better detaults:
+ run all tests, delete temp dirs, summarize repeated failures
+ * -no-undefined to libtool for Cygwin
+ * libarchive_test: Skip large file tests on systems with 32-bit off_t
+ * iso9660: Don't bother trying to find the body of an empty file;
+ this works around strange behavior from some ISO9660 writers
+ * tar: allow -r -T to be used together
+ * tar: allow --format with -r or -u
+ * libarchive: Don't build archive.h
+
+May 04, 2008: Simplified building: archive.h is no longer constructed
+ This may require additional #if conditionals on some platforms.
+
+Mar 30, 2008: libarchive 2.5.1b released
+
+Mar 15, 2008: libarchive 2.5.0b released
+Mar 15, 2008: bsdcpio now seems to correctly write hardlinks into newc,
+ ustar, and old cpio archives. Just a little more testing before
+ bsdcpio 1.0 becomes a reality.
+Mar 15, 2008: I think the new linkify() interface is finally handling
+ all known hardlink strategies.
+Mar 15, 2008: Mtree read fixes from Joerg Sonnenberger.
+Mar 15, 2008: Many new bsdtar and bsdcpio options from Joerg Sonnenberger.
+Mar 15, 2008: test harnesses no longer require uudecode; they
+ now have built-in decoding logic that decodes the reference
+ files as they are needed.
+
+Mar 14, 2008: libarchive 2.4.14 released; identical to 2.4.13 except for
+ a point fix for gname/uname mixup in pax format that was introduced
+ with the UTF-8 fixes.
+
+Feb 26, 2008: libarchive 2.4.13 released
+Feb 25, 2008: Handle path, linkname, gname, or uname that can't be converted
+ to/from UTF-8. Implement "hdrcharset" attribute from SUS-2008.
+Feb 25, 2008: Fix name clash on NetBSD.
+Feb 18, 2008: Fix writing empty 'ar' archives, per Kai Wang
+Feb 18, 2008: [bsdtar] Permit appending on block devices.
+Feb 09, 2008: New "linkify" resolver to help with newc hardlink writing;
+ bsdcpio still needs to be converted to use this.
+Feb 02, 2008: Windows compatibility fixes from Ivailo Petrov, Kees Zeelenberg
+Jan 30, 2008: Ignore hardlink size for non-POSIX tar archives.
+
+Jan 22, 2008: libarchive 2.4.12 released
+Jan 22, 2008: Fix bad padding when writing symlinks to newc cpio archives.
+Jan 22, 2008: Verify bsdcpio_test by getting it to work against GNU cpio 2.9.
+ bsdcpio_test complains about missing options (-y and -z), format
+ of informational messages (--version, --help), and a minor formatting
+ issue in odc format output. After this update, bsdcpio_test uncovered
+ several more cosmetic issues in bsdcpio, all now fixed.
+Jan 22, 2008: Experimental support for self-extracting Zip archives.
+Jan 22, 2008: Extend hardlink restore strategy to work correctly with
+ hardlinks extracted from newc cpio files. (Which store the body
+ only with the last occurrence of a link.)
+
+Dec 30, 2007: libarchive 2.4.11 released
+Dec 30, 2007: Fixed a compile error in bsdcpio on some systems.
+
+Dec 29, 2007: libarchive 2.4.10 released
+Dec 29, 2007: bsdcpio 0.9.0 is ready for wider use.
+Dec 29, 2007: Completed initial test harness for bsdcpio.
+
+Dec 22, 2007: libarchive 2.4.9 released
+Dec 22, 2007: Implement the remaining options for bsdcpio: -a, -q, -L, -f,
+ pattern selection for -i and -it.
+
+Dec 13, 2007: libarchive 2.4.8 released
+Dec 13, 2007: gzip and bzip2 compression now handle zero-byte writes correctly,
+ Thanks to Damien Golding for bringing this to my attention.
+
+Dec 12, 2007: libarchive 2.4.7 released
+
+Dec 10, 2007: libarchive 2.4.6 released
+Dec 09, 2007: tar/test/test_copy.c verifies "tar -c | tar -x" copy pipeline
+Dec 07, 2007: Fix a couple of minor memory leaks.
+
+Dec 04, 2007: libarchive 2.4.5 released
+Dec 04, 2007: Fix cpio/test/test_write_odc by setting the umask first.
+
+Dec 03, 2007: libarchive 2.4.4 released
+Dec 03, 2007: New configure options --disable-xattr and --disable-acl,
+ thanks to Samuli Suominen.
+
+Dec 03, 2007: libarchive 2.4.3 released
+Dec 03, 2007: Thanks to Lapo Luchini for sending me a ZIP file that
+ libarchive couldn't handle. Fixed a bug in handling of
+ "length at end" flags in ZIP files.
+Dec 03, 2007: Fixed bsdcpio -help, bsdtar -help tests.
+Dec 02, 2007: First cut at real bsdtar test harness.
+
+Dec 02, 2007: libarchive 2.4.2 released
+
+Dec 02, 2007: libarchive 2.4.1 released
+Dec 02, 2007: Minor fixes, rough cut of mdoc-to-man conversion for
+ man pages.
+
+Oct 30, 2007: libarchive 2.4.0 released
+Oct 30, 2007: Minor compile fix thanks to Joerg Schilling.
+Oct 30, 2007: Only run the format auction once at the beginning of the
+ archive. This is simpler and supports better error recovery.
+Oct 29, 2007: Test support for very large entries in tar archives:
+ libarchive_test now exercises entries from 2GB up to 1TB.
+
+Oct 27, 2007: libarchive 2.3.5 released
+Oct 27, 2007: Correct some unnecessary internal data copying in the
+ "compression none" reader and writer; this reduces user time
+ by up to 2/3 in some tests. (Thanks to Jan Psota for
+ publishing his performance test results to GNU tar's bug-tar
+ mailing list; those results pointed me towards this problem.)
+Oct 27, 2007: Fix for skipping archive entries that are exactly
+ a multiple of 4G on 32-bit platforms.
+Oct 25, 2007: Fix for reading very large (>8G) tar archives; this was
+ broken when I put in support for new GNU tar sparse formats.
+Oct 20, 2007: Initial work on new pattern-matching code for cpio; I
+ hope this eventually replaces the code currently in bsdtar.
+
+Oct 08, 2007: libarchive 2.3.4 released
+Oct 05, 2007: Continuing work on bsdcpio test suite.
+Oct 05, 2007: New cpio.5 manpage, updates to "History" of bsdcpio.1 and
+ bsdtar.1 manpages.
+Oct 05, 2007: Fix zip reader to immediately return EOF if you try
+ to read body of non-regular file. In particular, this fixes
+ bsdtar extraction of zip archives.
+
+Sep 30, 2007: libarchive 2.3.3 released
+Sep 26, 2007: Rework Makefile.am so that the enable/disable options
+ actually do the right things.
+Sep 26, 2007: cpio-odc and cpio-newc archives no longer write bodies
+ for non-regular files.
+Sep 26, 2007: Test harness for bsdcpio is in place, needs more tests written.
+ This is much nicer than the ragtag collection of test scripts
+ that bsdtar has.
+
+Sep 20, 2007: libarchive 2.3.2 released
+Sep 20, 2007: libarchive 2.3.1 broke bsdtar because the archive_write_data()
+ fix was implemented incorrectly.
+
+Sep 16, 2007: libarchive 2.3.1 released
+Sep 16, 2007: Many fixes to bsdcpio 0.3: handle hardlinks with -p, recognize
+ block size on writing, fix a couple of segfaults.
+Sep 16, 2007: Fixed return value from archive_write_data() when used
+ with archive_write_disk() to match the documentation and other
+ instances of this same function.
+Sep 15, 2007: Add archive_entry_link_resolver, archive_entry_strmode
+
+Sep 11, 2007: libarchive 2.2.8 released
+Sep 09, 2007: bsdcpio 0.2 supports most (not yet all) of the old POSIX spec.
+
+Sep 01, 2007: libarchive 2.2.7 released
+Aug 31, 2007: Support for reading mtree files, including an mtree.5 manpage
+ (A little experimental still.)
+Aug 18, 2007: Read gtar 1.17 --posix --sparse entries.
+Aug 13, 2007: Refined suid/sgid restore handling; it is no longer
+ an error if suid/sgid bits are dropped when you request
+ perm restore but don't request owner restore.
+Aug 06, 2007: Use --enable-bsdcpio if you want to try bsdcpio
+
+Aug 05, 2007: libarchive 2.2.6 released
+Aug 05, 2007: New configure option --disable-bsdtar, thanks to Joerg
+ Sonnenberger.
+Aug 05, 2007: Several bug fixes from FreeBSD CVS repo.
+
+Jul 13, 2007: libarchive 2.2.5 released
+
+Jul 12, 2007: libarchive 2.2.4 released
+Jul 12, 2007: Thanks to Colin Percival's help in diagnosing and
+ fixing several critical security bugs. Details available at
+ http://security.freebsd.org/advisories/FreeBSD-SA-07:05.libarchive.asc
+
+May 26, 2007: libarchive 2.2.3 released
+May 26, 2007: Fix memory leaks in ZIP reader and shar writer, add some
+ missing system headers to archive_entry.h, dead code cleanup
+ from Colin Percival, more tests for gzip/bzip2, fix an
+ EOF anomaly in bzip2 decompression.
+
+May 12, 2007: libarchive 2.2.2 released
+May 12, 2007: Fix archive_write_disk permission restore by cloning
+ entry passed into write_header so that permission info is
+ still available at finish_entry time. (archive_read_extract()
+ worked okay because it held onto the passed-in entry, but
+ direct consumers of archive_write_disk would break). This
+ required fixing archive_entry_clone(), which now works and has
+ a reasonably complete test case.
+May 10, 2007: Skeletal cpio implementation.
+
+May 06, 2007: libarchive 2.2.1 released
+May 06, 2007: Flesh out a lot more of test_entry.c so as to catch
+ problems such as the device node breakage before releasing <sigh>.
+May 05, 2007: Fix a bad bug introduced in 2.1.9 that broke device
+ node entries in tar archives.
+May 03, 2007: Move 'struct stat' out of archive_entry core as well.
+ This removes some portability headaches and fixes a bunch
+ of corner cases that arise when manipulating archives on
+ dissimilar systems.
+
+Apr 30, 2007: libarchive 2.1.10 released
+Apr 31, 2007: Minor code cleanup.
+
+Apr 24, 2007: libarchive 2.1.9 released
+Apr 24, 2007: Fix some recently-introduced problems with libraries
+ (Just let automake handle it and it all works much better.)
+ Finish isolating major()/minor()/makedev() in archive_entry.c.
+
+Apr 23, 2007: libarchive 2.1.8 released
+Apr 23, 2007: Minor fixes found from building on MacOS X
+
+Apr 22, 2007: libarchive 2.1.7 released
+Apr 22, 2007: Eliminated all uses of 'struct stat' from the
+ format readers/writers. This should improve portability;
+ 'struct stat' is now only used in archive_entry and in
+ code that actually touches the disk.
+
+Apr 17, 2007: libarchive 2.1.6 released
+ Libarchive now compiles and passes all tests on Interix.
+
+Apr 16, 2007: libarchive 2.1.5 released
+
+Apr 15, 2007: libarchive 2.1b2 released
+Apr 15, 2007: New libarchive_internals.3 documentation of internal APIs.
+ Not complete, but should prove helpful.
+Apr 15, 2007: Experimental "read_compress_program" and "write_compress_program"
+ for using libarchive with external compression. Not yet
+ well tested, and likely has portability issues. Feedback
+ appreciated.
+
+Apr 14, 2007: libarchive 2.0.31 released
+Apr 14, 2007: More fixes for Interix, more 'ar' work
+
+Apr 14, 2007: libarchive 2.0.30 released
+Apr 13, 2007: libarchive now enforces trailing '/' on dirs
+ written to tar archives
+
+Apr 11, 2007: libarchive 2.0.29 released
+Apr 11, 2007: Make it easier to statically configure for different platforms.
+Apr 11, 2007: Updated config.guess, config.sub, libtool
+
+Apr 06, 2007: libarchive 2.0.28 released
+Apr 06, 2007: 'ar' format read/write support thanks to Kai Wang.
+
+Apr 01, 2007: libarchive 2.0.27 released
+Mar 31, 2007: Several minor fixes from Colin Percival and Joerg Sonnenberger.
+
+Mar 12, 2007: libarchive 2.0.25 released
+Mar 12, 2007: Fix broken --unlink flag.
+
+Mar 11, 2007: libarchive 2.0.24 released
+Mar 10, 2007: Correct an ACL blunder that causes any ACL with an entry
+ that refers to a non-existent user or group to not be restored correctly.
+ The fix both makes the parser more tolerant (so that archives created
+ with the buggy ACLs can be read now) and corrects the ACL formatter.
+Mar 10, 2007: More work on test portability to Linux.
+
+Mar 10, 2007: libarchive 2.0.22 released
+Mar 10, 2007: Header cleanups; added linux/fs.h, removed
+ some unnecessary headers, added #include guards in bsdtar.
+ If you see any obvious compile failures from this, let me know.
+Mar 10, 2007: Work on bsdtar test scripts: not yet robust enough
+ to enable as part of "make check", but getting better.
+Mar 10, 2007: libarchive now returns ARCHIVE_FAILED when
+ a header write fails in a way that only affects this item.
+ Less bad than ARCHIVE_FATAL, but worse than ARCHIVE_WARN.
+
+Mar 07, 2007: libarchive 2.0.21 released
+Mar 07, 2007: Add some ACL tests (only for the system-independent
+ portion of the ACL support for now).
+Mar 07, 2007: tar's ability to read ACLs off disk got
+ turned off for FreeBSD; re-enable it. (ACL restores and
+ libarchive support for storing/reading ACLs from pax
+ archives was unaffected.)
+
+Mar 02, 2007: libarchive 2.0.20 released
+Mar 2, 2007: It's not perfect, but it's pretty good.
+ Libarchive 2.0 is officially out of beta.
+
+Feb 28, 2007: libarchive 2.0b17 released
+Feb 27, 2007: Make the GID restore checks more robust by checking
+ whether the current user has too few or too many privileges.
+
+Feb 26, 2007: libarchive 2.0b15 released
+Feb 26, 2007: Don't lose symlinks when extracting from ISOs.
+ Thanks to Diego "Flameeyes" Pettenò for telling me about the
+ broken testcase on Gentoo that (finally!) led me to the cause
+ of this long-standing bug.
+
+Feb 26, 2007: libarchive 2.0b14 released
+Feb 26, 2007: Fix a broken test on platforms that lack lchmod().
+
+Feb 25, 2007: libarchive 2.0b13 released
+Feb 25, 2007: Empty archives were being written as empty files,
+ without a proper end-of-archive marker. Fixed.
+
+Feb 23, 2007: libarchive 2.0b12 released
+Feb 22, 2007: Basic security checks added: _EXTRACT_SECURE_NODOTDOT
+ and _EXTRACT_SECURE_SYMLINK. These checks used to be in bsdtar,
+ but they belong down in libarchive where they can be used by
+ other tools and where they can be better optimized.
+
+Feb 11, 2007: libarchive 2.0b11 released
+Feb 10, 2007: Fixed a bunch of errors in libarchive's handling
+ of EXTRACT_PERM and EXTRACT_OWNER, especially relating
+ to SUID and SGID bits.
+
+Jan 31, 2007: libarchive 2.0b9 released
+Jan 31, 2007: Added read support for "empty" archives as a
+ distinct archive format. Bsdtar uses this to handle, e.g.,
+ "touch foo.tar; tar -rf foo.tar"
+
+Jan 22, 2007: libarchive 2.0b6 released
+Jan 22, 2007: archive_write_disk API is now in place. It provides
+ a finer-grained interface than archive_read_extract. In particular,
+ you can use it to create objects on disk without having an archive
+ around (just feed it archive_entry objects describing what you
+ want to create), you can override the uname/gname-to-uid/gid lookups
+ (minitar uses this to avoid getpwXXX() and getgrXXX() bloat).
+
+Jan 09, 2007: libarchive 2.0a3 released
+Jan 9, 2007: archive_extract is now much better; it handles the
+ most common cases with a minimal number of system calls.
+ Some features still need a lot of testing, especially corner
+ cases involving objects that already exist on disk. I expect
+ the next round of API overhaul will simplify building test cases.
+Jan 9, 2007: a number of fixes thanks to Colin Percival, especially
+ corrections to the skip() framework and handling of large files.
+Jan 9, 2007: Fixes for large ISOs. The code should correctly handle
+ very large ISOs with entries up to 4G. Thanks to Robert Sciuk
+ for pointing out these issues.
+
+Sep 05, 2006: libarchive 1.3.1 released
+Sep 5, 2006: Bump version to 1.3 for new I/O wrappers.
+Sep 4, 2006: New memory and FILE read/write wrappers.
+Sep 4, 2006: libarchive test harness is now minimally functional;
+ it's located a few minor bugs in error-handling logic
+
+Aug 17, 2006: libarchive 1.2.54 released
+Aug 17, 2006: Outline ABI changes for libarchive 2.0; these
+ are protected behind #ifdef's until I think I've found everything
+ that needs to change.
+Aug 17, 2006: Fix error-handling in archive_read/write_close()
+ They weren't returning any errors before.
+Aug 17, 2006: Fix recursive-add logic to not trigger if it's not set
+ Fixes a bug adding files when writing archive to pipe or when
+ using archive_write_open() directly.
+Jul 2006: New "skip" handling improves performance extracting
+ single files from large uncompressed archives.
+
+Mar 21, 2006: 1.2.52 released
+Mar 21, 2006: Fix -p on platforms that don't have platform-specific
+ extended attribute code.
+Mar 20, 2006: Add NEWS file; fill in some older history from other
+ files. I'll try to keep this file up-to-date from now on.
+
+OLDER NEWS SUMMARIES
+
+Mar 19, 2006: libarchive 1.2.51 released
+Mar 18, 2006: Many fixes to extended attribute support, including a redesign
+ of the storage format to simplify debugging.
+Mar 12, 2006: Remove 'tp' support; it was a fun idea, but not worth
+ spending much time on.
+Mar 11, 2006: Incorporated Jaakko Heinonen's still-experimental support
+ for extended attributes (Currently Linux-only.).
+Mar 11, 2006: Reorganized distribution package: There is now one tar.gz
+ file that builds both libarchive and bsdtar.
+Feb 13, 2006: Minor bug fixes: correctly read cpio device entries, write
+ Pax attribute entry names.
+Nov 7, 2005: Experimental 'tp' format support in libarchive. Feedback
+ appreciated; this is not enabled by archive_read_support_format_all()
+ yet as I'm not quite content with the format detection heuristics.
+Nov 7, 2005: Some more portability improvements thanks to Darin Broady,
+ minor bugfixes.
+Oct 12, 2005: Use GNU libtool to build shared libraries on many systems.
+Aug 9, 2005: Correctly detect that MacOS X does not have POSIX ACLs.
+Apr 17, 2005: Kees Zeelenberg has ported libarchive and bsdtar to Windows:
+ http://gnuwin32.sourceforge.net/
+Apr 11, 2005: Extended Zip/Zip64 support thanks to Dan Nelson. -L/-h
+ fix from Jaakko Heinonen.
+Mar 12, 2005: archive_read_extract can now handle very long
+ pathnames (I've tested with pathnames up to 1MB).
+Mar 12, 2005: Marcus Geiger has written an article about libarchive
+ http://xsnil.antbear.org/2005/02/05/archive-mit-libarchive-verarbeiten/
+ including examples of using it from Objective-C. His MoinX
+ http://moinx.antbear.org/ desktop Wiki uses
+ libarchive for archiving and restoring Wiki pages.
+Jan 22, 2005: Preliminary ZIP extraction support,
+ new directory-walking code for bsdtar.
+Jan 16, 2005: ISO9660 extraction code added; manpage corrections.
+May 22, 2004: Many gtar-compatible long options have been added; almost
+ all FreeBSD ports extract correctly with bsdtar.
+May 18, 2004: bsdtar can read Solaris, HP-UX, Unixware, star, gtar,
+ and pdtar archives.
diff --git a/contrib/libarchive/README b/contrib/libarchive/README
new file mode 100644
index 0000000..03e47e8
--- /dev/null
+++ b/contrib/libarchive/README
@@ -0,0 +1,137 @@
+README for libarchive bundle.
+
+Questions? Issues?
+ * http://libarchive.googlecode.com/ is the home for ongoing
+ libarchive development, including issue tracker, additional
+ documentation, and links to the libarchive mailing lists.
+
+This distribution bundle includes the following components:
+ * libarchive: a library for reading and writing streaming archives
+ * tar: the 'bsdtar' program is a full-featured 'tar'
+ replacement built on libarchive
+ * cpio: the 'bsdcpio' program is a different interface to
+ essentially the same functionality
+ * examples: Some small example programs that you may find useful.
+ * examples/minitar: a compact sample demonstrating use of libarchive.
+ I use this for testing link pollution; it should produce a very
+ small executable file on most systems.
+ * contrib: Various items sent to me by third parties;
+ please contact the authors with any questions.
+
+The top-level directory contains the following information files:
+ * NEWS - highlights of recent changes
+ * COPYING - what you can do with this
+ * INSTALL - installation instructions
+ * README - this file
+ * configure - configuration script, see INSTALL for details.
+ * CMakeLists.txt - input for "cmake" build tool, see INSTALL
+
+The following files in the top-level directory are used by the
+'configure' script:
+ * Makefile.am, aclocal.m4, configure.ac
+ - used to build this distribution, only needed by maintainers
+ * Makefile.in, config.h.in
+ - templates used by configure script
+
+Guide to Documentation installed by this system:
+ * bsdtar.1 explains the use of the bsdtar program
+ * bsdcpio.1 explains the use of the bsdcpio program
+ * libarchive.3 gives an overview of the library as a whole
+ * archive_read.3, archive_write.3, archive_write_disk.3, and
+ archive_read_disk.3 provide detailed calling sequences for the read
+ and write APIs
+ * archive_entry.3 details the "struct archive_entry" utility class
+ * archive_internals.3 provides some insight into libarchive's
+ internal structure and operation.
+ * libarchive-formats.5 documents the file formats supported by the library
+ * cpio.5, mtree.5, and tar.5 provide detailed information about these
+ popular archive formats, including hard-to-find details about
+ modern cpio and tar variants.
+The manual pages above are provided in the 'doc' directory in
+a number of different formats.
+
+You should also read the copious comments in "archive.h" and the
+source code for the sample programs for more details. Please let me
+know about any errors or omissions you find.
+
+Currently, the library automatically detects and reads the following:
+ * gzip compression
+ * bzip2 compression
+ * compress/LZW compression
+ * lzma and xz compression
+ * GNU tar format (including GNU long filenames, long link names, and
+ sparse files)
+ * Solaris 9 extended tar format (including ACLs)
+ * Old V7 tar archives
+ * POSIX ustar
+ * POSIX pax interchange format
+ * POSIX octet-oriented cpio
+ * SVR4 ASCII cpio
+ * POSIX octet-oriented cpio
+ * Binary cpio (big-endian or little-endian)
+ * ISO9660 CD-ROM images (with optional Rockridge or Joliet extensions)
+ * ZIP archives (with uncompressed or "deflate" compressed entries)
+ * GNU and BSD 'ar' archives
+ * 'mtree' format
+
+The library can write:
+ * gzip compression
+ * bzip2 compression
+ * compress/LZW compression
+ * lzma and xz compression
+ * POSIX ustar
+ * POSIX pax interchange format
+ * "restricted" pax format, which will create ustar archives except for
+ entries that require pax extensions (for long filenames, ACLs, etc).
+ * POSIX octet-oriented cpio
+ * SVR4 "newc" cpio
+ * shar archives
+ * ZIP archives (with uncompressed or "deflate" compressed entries)
+ * GNU and BSD 'ar' archives
+ * 'mtree' format
+
+Notes about the library architecture:
+
+ * This is a heavily stream-oriented system. There is no direct
+ support for in-place modification or random access.
+
+ * The library is designed to be extended with new compression and
+ archive formats. The only requirement is that the format be
+ readable or writable as a stream and that each archive entry be
+ independent. There are articles on the libarchive Wiki explaining
+ how to extend libarchive.
+
+ * On read, compression and format are always detected automatically.
+
+ * I've attempted to minimize static link pollution. If you don't
+ explicitly invoke a particular feature (such as support for a
+ particular compression or format), it won't get pulled in.
+ In particular, if you don't explicitly enable a particular
+ compression or decompression support, you won't need to link
+ against the corresponding compression or decompression libraries.
+ This also reduces the size of statically-linked binaries in
+ environments where that matters.
+
+ * On read, the library accepts whatever blocks you hand it.
+ Your read callback is free to pass the library a byte at a time
+ or mmap the entire archive and give it to the library at once.
+ On write, the library always produces correctly-blocked output.
+
+ * The object-style approach allows you to have multiple archive streams
+ open at once. bsdtar uses this in its "@archive" extension.
+
+ * The archive itself is read/written using callback functions.
+ You can read an archive directly from an in-memory buffer or
+ write it to a socket, if you wish. There are some utility
+ functions to provide easy-to-use "open file," etc, capabilities.
+
+ * The read/write APIs are designed to allow individual entries
+ to be read or written to any data source: You can create
+ a block of data in memory and add it to a tar archive without
+ first writing a temporary file. You can also read an entry from
+ an archive and write the data directly to a socket. If you want
+ to read/write entries to disk, there are convenience functions to
+ make this especially easy.
+
+ * Note: "pax interchange format" is really an extended tar format,
+ despite what the name says.
diff --git a/usr.bin/cpio/bsdcpio.1 b/contrib/libarchive/cpio/bsdcpio.1
index 789ce74..789ce74 100644
--- a/usr.bin/cpio/bsdcpio.1
+++ b/contrib/libarchive/cpio/bsdcpio.1
diff --git a/usr.bin/cpio/cmdline.c b/contrib/libarchive/cpio/cmdline.c
index 687fa62..687fa62 100644
--- a/usr.bin/cpio/cmdline.c
+++ b/contrib/libarchive/cpio/cmdline.c
diff --git a/usr.bin/cpio/cpio.c b/contrib/libarchive/cpio/cpio.c
index cd81050..cd81050 100644
--- a/usr.bin/cpio/cpio.c
+++ b/contrib/libarchive/cpio/cpio.c
diff --git a/usr.bin/cpio/cpio.h b/contrib/libarchive/cpio/cpio.h
index 2d5b548..2d5b548 100644
--- a/usr.bin/cpio/cpio.h
+++ b/contrib/libarchive/cpio/cpio.h
diff --git a/usr.bin/cpio/cpio_platform.h b/contrib/libarchive/cpio/cpio_platform.h
index 3043828..3043828 100644
--- a/usr.bin/cpio/cpio_platform.h
+++ b/contrib/libarchive/cpio/cpio_platform.h
diff --git a/usr.bin/cpio/test/main.c b/contrib/libarchive/cpio/test/main.c
index bca4c96..bca4c96 100644
--- a/usr.bin/cpio/test/main.c
+++ b/contrib/libarchive/cpio/test/main.c
diff --git a/usr.bin/cpio/test/test.h b/contrib/libarchive/cpio/test/test.h
index 8b1352a..8b1352a 100644
--- a/usr.bin/cpio/test/test.h
+++ b/contrib/libarchive/cpio/test/test.h
diff --git a/usr.bin/cpio/test/test_0.c b/contrib/libarchive/cpio/test/test_0.c
index 75a1437..75a1437 100644
--- a/usr.bin/cpio/test/test_0.c
+++ b/contrib/libarchive/cpio/test/test_0.c
diff --git a/usr.bin/cpio/test/test_basic.c b/contrib/libarchive/cpio/test/test_basic.c
index 3a3fae8..3a3fae8 100644
--- a/usr.bin/cpio/test/test_basic.c
+++ b/contrib/libarchive/cpio/test/test_basic.c
diff --git a/usr.bin/cpio/test/test_cmdline.c b/contrib/libarchive/cpio/test/test_cmdline.c
index 2dd7d65..2dd7d65 100644
--- a/usr.bin/cpio/test/test_cmdline.c
+++ b/contrib/libarchive/cpio/test/test_cmdline.c
diff --git a/usr.bin/cpio/test/test_format_newc.c b/contrib/libarchive/cpio/test/test_format_newc.c
index eb87c31..eb87c31 100644
--- a/usr.bin/cpio/test/test_format_newc.c
+++ b/contrib/libarchive/cpio/test/test_format_newc.c
diff --git a/usr.bin/cpio/test/test_gcpio_compat.c b/contrib/libarchive/cpio/test/test_gcpio_compat.c
index 3d992c4..3d992c4 100644
--- a/usr.bin/cpio/test/test_gcpio_compat.c
+++ b/contrib/libarchive/cpio/test/test_gcpio_compat.c
diff --git a/usr.bin/cpio/test/test_gcpio_compat_ref.bin.uu b/contrib/libarchive/cpio/test/test_gcpio_compat_ref.bin.uu
index 745d8ab..745d8ab 100644
--- a/usr.bin/cpio/test/test_gcpio_compat_ref.bin.uu
+++ b/contrib/libarchive/cpio/test/test_gcpio_compat_ref.bin.uu
diff --git a/usr.bin/cpio/test/test_gcpio_compat_ref.crc.uu b/contrib/libarchive/cpio/test/test_gcpio_compat_ref.crc.uu
index df8dde0..df8dde0 100644
--- a/usr.bin/cpio/test/test_gcpio_compat_ref.crc.uu
+++ b/contrib/libarchive/cpio/test/test_gcpio_compat_ref.crc.uu
diff --git a/usr.bin/cpio/test/test_gcpio_compat_ref.newc.uu b/contrib/libarchive/cpio/test/test_gcpio_compat_ref.newc.uu
index 1e29ba9..1e29ba9 100644
--- a/usr.bin/cpio/test/test_gcpio_compat_ref.newc.uu
+++ b/contrib/libarchive/cpio/test/test_gcpio_compat_ref.newc.uu
diff --git a/usr.bin/cpio/test/test_gcpio_compat_ref.ustar.uu b/contrib/libarchive/cpio/test/test_gcpio_compat_ref.ustar.uu
index 77989f4..77989f4 100644
--- a/usr.bin/cpio/test/test_gcpio_compat_ref.ustar.uu
+++ b/contrib/libarchive/cpio/test/test_gcpio_compat_ref.ustar.uu
diff --git a/contrib/libarchive/cpio/test/test_gcpio_compat_ref_nosym.bin.uu b/contrib/libarchive/cpio/test/test_gcpio_compat_ref_nosym.bin.uu
new file mode 100644
index 0000000..a3e87a7
--- /dev/null
+++ b/contrib/libarchive/cpio/test/test_gcpio_compat_ref_nosym.bin.uu
@@ -0,0 +1,15 @@
+begin 644 test_gcpio_compat_ref_nosym.bin
+MQW%4`-[Z_4'H`^@#`@`VNZU*NQX$``````!D:7(`QW%4`-SZI('H`^@#`@`G
+MNZU*NQX%````"@!F:6QE```Q,C,T-38W.#D*QW%4`-SZI('H`^@#`@`GNZU*
+MNQX)````"@!L:6YK9FEL90``,3(S-#4V-S@Y"L=Q``````````````$`````
+M````"P``````5%)!24Q%4B$A(0``````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+1````````````````````````
+`
+end
diff --git a/contrib/libarchive/cpio/test/test_gcpio_compat_ref_nosym.crc.uu b/contrib/libarchive/cpio/test/test_gcpio_compat_ref_nosym.crc.uu
new file mode 100644
index 0000000..38ba9fe
--- /dev/null
+++ b/contrib/libarchive/cpio/test/test_gcpio_compat_ref_nosym.crc.uu
@@ -0,0 +1,15 @@
+begin 644 test_gcpio_compat_ref_nosym.crc
+M,#<P-S`R,#`U-D9!1$4P,#`P-#%&1#`P,#`P,T4X,#`P,#`S13@P,#`P,#`P
+M,C1!040Q14)",#`P,#`P,#`P,#`P,#`P,#`P,#`P,#4T,#`P,#`P0D(P,35"
+M,#`S-C`P,#`P,#`T,#`P,#`P,#!D:7(````P-S`W,#(P,#4V1D%$0S`P,#`X
+M,4$T,#`P,#`S13@P,#`P,#-%.#`P,#`P,#`R-$%!1#%%0D(P,#`P,#`P,#`P
+M,#`P,#`P,#`P,#`P-30P,#`P,#!"0C`Q-4(P,#(W,#`P,#`P,#4P,#`P,#`P
+M,&9I;&4``#`W,#<P,C`P-39&041#,#`P,#@Q030P,#`P,#-%.#`P,#`P,T4X
+M,#`P,#`P,#(T04%$,45"0C`P,#`P,#!!,#`P,#`P,#`P,#`P,#`U-#`P,#`P
+M,$)",#$U0C`P,C<P,#`P,#`P.3`P,#`P,44W;&EN:V9I;&4``#$R,S0U-C<X
+M.0H``#`W,#<P,C`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P
+M,#`P,#$P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P
+M,#`P,#`P,#`P,#`P,#`P0C`P,#`P,#`P5%)!24Q%4B$A(0``````````````
+1````````````````````````
+`
+end
diff --git a/contrib/libarchive/cpio/test/test_gcpio_compat_ref_nosym.newc.uu b/contrib/libarchive/cpio/test/test_gcpio_compat_ref_nosym.newc.uu
new file mode 100644
index 0000000..2404964
--- /dev/null
+++ b/contrib/libarchive/cpio/test/test_gcpio_compat_ref_nosym.newc.uu
@@ -0,0 +1,15 @@
+begin 644 test_gcpio_compat_ref_nosym.newc
+M,#<P-S`Q,#`U-D9!1$4P,#`P-#%&1#`P,#`P,T4X,#`P,#`S13@P,#`P,#`P
+M,C1!040Q14)",#`P,#`P,#`P,#`P,#`P,#`P,#`P,#4T,#`P,#`P0D(P,35"
+M,#`S-C`P,#`P,#`T,#`P,#`P,#!D:7(````P-S`W,#$P,#4V1D%$0S`P,#`X
+M,4$T,#`P,#`S13@P,#`P,#-%.#`P,#`P,#`R-$%!1#%%0D(P,#`P,#`P,#`P
+M,#`P,#`P,#`P,#`P-30P,#`P,#!"0C`Q-4(P,#(W,#`P,#`P,#4P,#`P,#`P
+M,&9I;&4``#`W,#<P,3`P-39&041#,#`P,#@Q030P,#`P,#-%.#`P,#`P,T4X
+M,#`P,#`P,#(T04%$,45"0C`P,#`P,#!!,#`P,#`P,#`P,#`P,#`U-#`P,#`P
+M,$)",#$U0C`P,C<P,#`P,#`P.3`P,#`P,#`P;&EN:V9I;&4``#$R,S0U-C<X
+M.0H``#`W,#<P,3`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P
+M,#`P,#$P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P
+M,#`P,#`P,#`P,#`P,#`P0C`P,#`P,#`P5%)!24Q%4B$A(0``````````````
+1````````````````````````
+`
+end
diff --git a/contrib/libarchive/cpio/test/test_gcpio_compat_ref_nosym.ustar.uu b/contrib/libarchive/cpio/test/test_gcpio_compat_ref_nosym.ustar.uu
new file mode 100644
index 0000000..5f9fcbe
--- /dev/null
+++ b/contrib/libarchive/cpio/test/test_gcpio_compat_ref_nosym.ustar.uu
@@ -0,0 +1,72 @@
+begin 644 test_gcpio_compat_ref_nosym.ustar
+M9&ER+P``````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````#`P,#`W-S4`,#`P,3<U,``P,#`Q-S4P`#`P,#`P,#`P,#`P
+M`#$Q,C4S,C$W,C<S`#`P,3$S-3$`-0``````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````````````````````````!U<W1A<@`P,'1I;0``
+M````````````````````````````````````=&EM````````````````````
+M```````````````````P,#`P,C<S`#8V,#`P-C8`````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````!F:6QE````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````,#`P,#8T-``P,#`Q-S4P`#`P
+M,#$W-3``,#`P,#`P,#`P,3(`,3$R-3,R,3<R-S,`,#`Q,30R,P`P````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````'5S=&%R`#`P=&EM``````````````````````````````````````!T
+M:6T``````````````````````````````````````#`P,#`R-S,`-C8P,#`T
+M-P``````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````````````````````````````#$R,S0U-C<X.0H`
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````;&EN:V9I;&4`````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````#`P,#`V-#0`,#`P,3<U,``P,#`Q-S4P`#`P,#`P
+M,#`P,#`P`#$Q,C4S,C$W,C<S`#`P,3,Q,S<`,69I;&4`````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````````````````````````````````!U<W1A<@`P
+M,'1I;0``````````````````````````````````````=&EM````````````
+M```````````````````````````P,#`P,C<S`#8V,#`P-#<`````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+,````````````````
+`
+end
diff --git a/usr.bin/cpio/test/test_option_B_upper.c b/contrib/libarchive/cpio/test/test_option_B_upper.c
index b040354..b040354 100644
--- a/usr.bin/cpio/test/test_option_B_upper.c
+++ b/contrib/libarchive/cpio/test/test_option_B_upper.c
diff --git a/usr.bin/cpio/test/test_option_C_upper.c b/contrib/libarchive/cpio/test/test_option_C_upper.c
index c8e63fd..c8e63fd 100644
--- a/usr.bin/cpio/test/test_option_C_upper.c
+++ b/contrib/libarchive/cpio/test/test_option_C_upper.c
diff --git a/usr.bin/cpio/test/test_option_J_upper.c b/contrib/libarchive/cpio/test/test_option_J_upper.c
index 532aacf..532aacf 100644
--- a/usr.bin/cpio/test/test_option_J_upper.c
+++ b/contrib/libarchive/cpio/test/test_option_J_upper.c
diff --git a/usr.bin/cpio/test/test_option_L_upper.c b/contrib/libarchive/cpio/test/test_option_L_upper.c
index 0acc100..0acc100 100644
--- a/usr.bin/cpio/test/test_option_L_upper.c
+++ b/contrib/libarchive/cpio/test/test_option_L_upper.c
diff --git a/usr.bin/cpio/test/test_option_Z_upper.c b/contrib/libarchive/cpio/test/test_option_Z_upper.c
index 936ce0c..936ce0c 100644
--- a/usr.bin/cpio/test/test_option_Z_upper.c
+++ b/contrib/libarchive/cpio/test/test_option_Z_upper.c
diff --git a/usr.bin/cpio/test/test_option_a.c b/contrib/libarchive/cpio/test/test_option_a.c
index af4b48e..af4b48e 100644
--- a/usr.bin/cpio/test/test_option_a.c
+++ b/contrib/libarchive/cpio/test/test_option_a.c
diff --git a/contrib/libarchive/cpio/test/test_option_c.c b/contrib/libarchive/cpio/test/test_option_c.c
new file mode 100644
index 0000000..63dcdbd
--- /dev/null
+++ b/contrib/libarchive/cpio/test/test_option_c.c
@@ -0,0 +1,221 @@
+/*-
+ * Copyright (c) 2003-2007 Tim Kientzle
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include "test.h"
+__FBSDID("$FreeBSD$");
+
+static int
+is_octal(const char *p, size_t l)
+{
+ while (l > 0) {
+ if (*p < '0' || *p > '7')
+ return (0);
+ --l;
+ ++p;
+ }
+ return (1);
+}
+
+static int
+from_octal(const char *p, size_t l)
+{
+ int r = 0;
+
+ while (l > 0) {
+ r *= 8;
+ r += *p - '0';
+ --l;
+ ++p;
+ }
+ return (r);
+}
+
+DEFINE_TEST(test_option_c)
+{
+ FILE *filelist;
+ int r;
+ int uid = -1;
+ int dev, ino, gid;
+ time_t t, now;
+ char *p, *e;
+ size_t s;
+
+ assertUmask(0);
+
+#if !defined(_WIN32)
+ uid = getuid();
+#endif
+
+ /*
+ * Create an assortment of files.
+ * TODO: Extend this to cover more filetypes.
+ */
+ filelist = fopen("filelist", "w");
+
+ /* "file" */
+ assertMakeFile("file", 0644, "1234567890");
+ fprintf(filelist, "file\n");
+
+ /* "symlink" */
+ if (canSymlink()) {
+ assertMakeSymlink("symlink", "file");
+ fprintf(filelist, "symlink\n");
+ }
+
+ /* "dir" */
+ assertMakeDir("dir", 0775);
+ /* Record some facts about what we just created: */
+ now = time(NULL); /* They were all created w/in last two seconds. */
+ fprintf(filelist, "dir\n");
+
+ /* Use the cpio program to create an archive. */
+ fclose(filelist);
+ r = systemf("%s -oc <filelist >basic.out 2>basic.err", testprog);
+ /* Verify that nothing went to stderr. */
+ assertTextFileContents("1 block\n", "basic.err");
+
+ /* Assert that the program finished. */
+ failure("%s -oc crashed", testprog);
+ if (!assertEqualInt(r, 0))
+ return;
+
+ /* Verify that stdout is a well-formed cpio file in "odc" format. */
+ p = slurpfile(&s, "basic.out");
+ assertEqualInt(s, 512);
+ e = p;
+
+ /*
+ * Some of these assertions could be stronger, but it's
+ * a little tricky because they depend on the local environment.
+ */
+
+ /* First entry is "file" */
+ assert(is_octal(e, 76)); /* Entire header is octal digits. */
+ assertEqualMem(e + 0, "070707", 6); /* Magic */
+ assert(is_octal(e + 6, 6)); /* dev */
+ dev = from_octal(e + 6, 6);
+ assert(is_octal(e + 12, 6)); /* ino */
+ ino = from_octal(e + 12, 6);
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ /* Group members bits and others bits do not work. */
+ assertEqualMem(e + 18, "100666", 6); /* Mode */
+#else
+ assertEqualMem(e + 18, "100644", 6); /* Mode */
+#endif
+ if (uid < 0)
+ uid = from_octal(e + 24, 6);
+ assertEqualInt(from_octal(e + 24, 6), uid); /* uid */
+ assert(is_octal(e + 30, 6)); /* gid */
+ gid = from_octal(e + 30, 6);
+ assertEqualMem(e + 36, "000001", 6); /* nlink */
+ failure("file entries should not have rdev set (dev field was 0%o)",
+ dev);
+ assertEqualMem(e + 42, "000000", 6); /* rdev */
+ t = from_octal(e + 48, 11); /* mtime */
+ assert(t <= now); /* File wasn't created in future. */
+ assert(t >= now - 2); /* File was created w/in last 2 secs. */
+ assertEqualMem(e + 59, "000005", 6); /* Name size */
+ assertEqualMem(e + 65, "00000000012", 11); /* File size */
+ assertEqualMem(e + 76, "file\0", 5); /* Name contents */
+ assertEqualMem(e + 81, "1234567890", 10); /* File contents */
+ e += 91;
+
+ /* "symlink" pointing to "file" */
+ if (canSymlink()) {
+ assert(is_octal(e, 76)); /* Entire header is octal digits. */
+ assertEqualMem(e + 0, "070707", 6); /* Magic */
+ assertEqualInt(dev, from_octal(e + 6, 6)); /* dev */
+ assert(ino != from_octal(e + 12, 6)); /* ino */
+#if !defined(_WIN32) || defined(__CYGWIN__)
+ /* On Windows, symbolic link and group members bits and
+ * others bits do not work. */
+ assertEqualMem(e + 18, "120777", 6); /* Mode */
+#endif
+ assertEqualInt(from_octal(e + 24, 6), uid); /* uid */
+ assertEqualInt(gid, from_octal(e + 30, 6)); /* gid */
+ assertEqualMem(e + 36, "000001", 6); /* nlink */
+ failure("file entries should have rdev == 0 (dev was 0%o)",
+ from_octal(e + 6, 6));
+ assertEqualMem(e + 42, "000000", 6); /* rdev */
+ t = from_octal(e + 48, 11); /* mtime */
+ assert(t <= now); /* File wasn't created in future. */
+ assert(t >= now - 2); /* File was created w/in last 2 secs. */
+ assertEqualMem(e + 59, "000010", 6); /* Name size */
+ assertEqualMem(e + 65, "00000000004", 11); /* File size */
+ assertEqualMem(e + 76, "symlink\0", 8); /* Name contents */
+ assertEqualMem(e + 84, "file", 4); /* Symlink target. */
+ e += 88;
+ }
+
+ /* "dir" */
+ assert(is_octal(e, 76));
+ assertEqualMem(e + 0, "070707", 6); /* Magic */
+ /* Dev should be same as first entry. */
+ assert(is_octal(e + 6, 6)); /* dev */
+ assertEqualInt(dev, from_octal(e + 6, 6));
+ /* Ino must be different from first entry. */
+ assert(is_octal(e + 12, 6)); /* ino */
+ assert(ino != from_octal(e + 12, 6));
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ /* Group members bits and others bits do not work. */
+ assertEqualMem(e + 18, "040777", 6); /* Mode */
+#else
+ /* Accept 042775 to accomodate systems where sgid bit propagates. */
+ if (memcmp(e + 18, "042775", 6) != 0)
+ assertEqualMem(e + 18, "040775", 6); /* Mode */
+#endif
+ assertEqualInt(from_octal(e + 24, 6), uid); /* uid */
+ /* Gid should be same as first entry. */
+ assert(is_octal(e + 30, 6)); /* gid */
+ assertEqualInt(gid, from_octal(e + 30, 6));
+#ifndef NLINKS_INACCURATE_FOR_DIRS
+ assertEqualMem(e + 36, "000002", 6); /* Nlink */
+#endif
+ t = from_octal(e + 48, 11); /* mtime */
+ assert(t <= now); /* File wasn't created in future. */
+ assert(t >= now - 2); /* File was created w/in last 2 secs. */
+ assertEqualMem(e + 59, "000004", 6); /* Name size */
+ assertEqualMem(e + 65, "00000000000", 11); /* File size */
+ assertEqualMem(e + 76, "dir\0", 4); /* name */
+ e += 80;
+
+ /* TODO: Verify other types of entries. */
+
+ /* Last entry is end-of-archive marker. */
+ assert(is_octal(e, 76));
+ assertEqualMem(e + 0, "070707", 6); /* Magic */
+ assertEqualMem(e + 6, "000000", 6); /* dev */
+ assertEqualMem(e + 12, "000000", 6); /* ino */
+ assertEqualMem(e + 18, "000000", 6); /* Mode */
+ assertEqualMem(e + 24, "000000", 6); /* uid */
+ assertEqualMem(e + 30, "000000", 6); /* gid */
+ assertEqualMem(e + 36, "000001", 6); /* Nlink */
+ assertEqualMem(e + 42, "000000", 6); /* rdev */
+ assertEqualMem(e + 48, "00000000000", 11); /* mtime */
+ assertEqualMem(e + 59, "000013", 6); /* Name size */
+ assertEqualMem(e + 65, "00000000000", 11); /* File size */
+ assertEqualMem(e + 76, "TRAILER!!!\0", 11); /* Name */
+
+ free(p);
+}
diff --git a/usr.bin/cpio/test/test_option_d.c b/contrib/libarchive/cpio/test/test_option_d.c
index 9ff1453..9ff1453 100644
--- a/usr.bin/cpio/test/test_option_d.c
+++ b/contrib/libarchive/cpio/test/test_option_d.c
diff --git a/usr.bin/cpio/test/test_option_f.c b/contrib/libarchive/cpio/test/test_option_f.c
index 784e085..784e085 100644
--- a/usr.bin/cpio/test/test_option_f.c
+++ b/contrib/libarchive/cpio/test/test_option_f.c
diff --git a/usr.bin/cpio/test/test_option_f.cpio.uu b/contrib/libarchive/cpio/test/test_option_f.cpio.uu
index 42c63c3..42c63c3 100644
--- a/usr.bin/cpio/test/test_option_f.cpio.uu
+++ b/contrib/libarchive/cpio/test/test_option_f.cpio.uu
diff --git a/usr.bin/cpio/test/test_option_help.c b/contrib/libarchive/cpio/test/test_option_help.c
index 5623430..5623430 100644
--- a/usr.bin/cpio/test/test_option_help.c
+++ b/contrib/libarchive/cpio/test/test_option_help.c
diff --git a/usr.bin/cpio/test/test_option_l.c b/contrib/libarchive/cpio/test/test_option_l.c
index 5c76e68..5c76e68 100644
--- a/usr.bin/cpio/test/test_option_l.c
+++ b/contrib/libarchive/cpio/test/test_option_l.c
diff --git a/usr.bin/cpio/test/test_option_lzma.c b/contrib/libarchive/cpio/test/test_option_lzma.c
index c6e3353..c6e3353 100644
--- a/usr.bin/cpio/test/test_option_lzma.c
+++ b/contrib/libarchive/cpio/test/test_option_lzma.c
diff --git a/usr.bin/cpio/test/test_option_m.c b/contrib/libarchive/cpio/test/test_option_m.c
index de880b2..de880b2 100644
--- a/usr.bin/cpio/test/test_option_m.c
+++ b/contrib/libarchive/cpio/test/test_option_m.c
diff --git a/usr.bin/cpio/test/test_option_m.cpio.uu b/contrib/libarchive/cpio/test/test_option_m.cpio.uu
index 3d20023..3d20023 100644
--- a/usr.bin/cpio/test/test_option_m.cpio.uu
+++ b/contrib/libarchive/cpio/test/test_option_m.cpio.uu
diff --git a/usr.bin/cpio/test/test_option_t.c b/contrib/libarchive/cpio/test/test_option_t.c
index 4427bb3..4427bb3 100644
--- a/usr.bin/cpio/test/test_option_t.c
+++ b/contrib/libarchive/cpio/test/test_option_t.c
diff --git a/usr.bin/cpio/test/test_option_t.cpio.uu b/contrib/libarchive/cpio/test/test_option_t.cpio.uu
index 055fe74..055fe74 100644
--- a/usr.bin/cpio/test/test_option_t.cpio.uu
+++ b/contrib/libarchive/cpio/test/test_option_t.cpio.uu
diff --git a/usr.bin/cpio/test/test_option_t.stdout.uu b/contrib/libarchive/cpio/test/test_option_t.stdout.uu
index 2457706..2457706 100644
--- a/usr.bin/cpio/test/test_option_t.stdout.uu
+++ b/contrib/libarchive/cpio/test/test_option_t.stdout.uu
diff --git a/usr.bin/cpio/test/test_option_tv.stdout.uu b/contrib/libarchive/cpio/test/test_option_tv.stdout.uu
index 7f1879c..7f1879c 100644
--- a/usr.bin/cpio/test/test_option_tv.stdout.uu
+++ b/contrib/libarchive/cpio/test/test_option_tv.stdout.uu
diff --git a/usr.bin/cpio/test/test_option_u.c b/contrib/libarchive/cpio/test/test_option_u.c
index 08058aa..08058aa 100644
--- a/usr.bin/cpio/test/test_option_u.c
+++ b/contrib/libarchive/cpio/test/test_option_u.c
diff --git a/usr.bin/cpio/test/test_option_version.c b/contrib/libarchive/cpio/test/test_option_version.c
index 7345da1..7345da1 100644
--- a/usr.bin/cpio/test/test_option_version.c
+++ b/contrib/libarchive/cpio/test/test_option_version.c
diff --git a/usr.bin/cpio/test/test_option_y.c b/contrib/libarchive/cpio/test/test_option_y.c
index 8e81ee7..8e81ee7 100644
--- a/usr.bin/cpio/test/test_option_y.c
+++ b/contrib/libarchive/cpio/test/test_option_y.c
diff --git a/usr.bin/cpio/test/test_option_z.c b/contrib/libarchive/cpio/test/test_option_z.c
index 91d37ac..91d37ac 100644
--- a/usr.bin/cpio/test/test_option_z.c
+++ b/contrib/libarchive/cpio/test/test_option_z.c
diff --git a/usr.bin/cpio/test/test_owner_parse.c b/contrib/libarchive/cpio/test/test_owner_parse.c
index d07724e..d07724e 100644
--- a/usr.bin/cpio/test/test_owner_parse.c
+++ b/contrib/libarchive/cpio/test/test_owner_parse.c
diff --git a/usr.bin/cpio/test/test_passthrough_dotdot.c b/contrib/libarchive/cpio/test/test_passthrough_dotdot.c
index 58d8234..58d8234 100644
--- a/usr.bin/cpio/test/test_passthrough_dotdot.c
+++ b/contrib/libarchive/cpio/test/test_passthrough_dotdot.c
diff --git a/usr.bin/cpio/test/test_passthrough_reverse.c b/contrib/libarchive/cpio/test/test_passthrough_reverse.c
index 42df75a..42df75a 100644
--- a/usr.bin/cpio/test/test_passthrough_reverse.c
+++ b/contrib/libarchive/cpio/test/test_passthrough_reverse.c
diff --git a/usr.bin/cpio/test/test_pathmatch.c b/contrib/libarchive/cpio/test/test_pathmatch.c
index 177c2bc..177c2bc 100644
--- a/usr.bin/cpio/test/test_pathmatch.c
+++ b/contrib/libarchive/cpio/test/test_pathmatch.c
diff --git a/contrib/libarchive/libarchive/archive.h b/contrib/libarchive/libarchive/archive.h
new file mode 100644
index 0000000..bac93f0
--- /dev/null
+++ b/contrib/libarchive/libarchive/archive.h
@@ -0,0 +1,746 @@
+/*-
+ * Copyright (c) 2003-2007 Tim Kientzle
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef ARCHIVE_H_INCLUDED
+#define ARCHIVE_H_INCLUDED
+
+/*
+ * Note: archive.h is for use outside of libarchive; the configuration
+ * headers (config.h, archive_platform.h, etc.) are purely internal.
+ * Do NOT use HAVE_XXX configuration macros to control the behavior of
+ * this header! If you must conditionalize, use predefined compiler and/or
+ * platform macros.
+ */
+#if defined(__BORLANDC__) && __BORLANDC__ >= 0x560
+# define __LA_STDINT_H <stdint.h>
+#elif !defined(__WATCOMC__) && !defined(_MSC_VER) && !defined(__INTERIX) && !defined(__BORLANDC__)
+# define __LA_STDINT_H <inttypes.h>
+#endif
+
+#include <sys/stat.h>
+#include <sys/types.h> /* Linux requires this for off_t */
+#ifdef __LA_STDINT_H
+# include __LA_STDINT_H /* int64_t, etc. */
+#endif
+#include <stdio.h> /* For FILE * */
+
+/* Get appropriate definitions of standard POSIX-style types. */
+/* These should match the types used in 'struct stat' */
+#if defined(_WIN32) && !defined(__CYGWIN__)
+#define __LA_INT64_T __int64
+# if defined(_SSIZE_T_DEFINED) || defined(_SSIZE_T_)
+# define __LA_SSIZE_T ssize_t
+# elif defined(_WIN64)
+# define __LA_SSIZE_T __int64
+# else
+# define __LA_SSIZE_T long
+# endif
+# if defined(__BORLANDC__)
+# define __LA_UID_T uid_t
+# define __LA_GID_T gid_t
+# else
+# define __LA_UID_T short
+# define __LA_GID_T short
+# endif
+#else
+#include <unistd.h> /* ssize_t, uid_t, and gid_t */
+#define __LA_INT64_T int64_t
+#define __LA_SSIZE_T ssize_t
+#define __LA_UID_T uid_t
+#define __LA_GID_T gid_t
+#endif
+
+/*
+ * On Windows, define LIBARCHIVE_STATIC if you're building or using a
+ * .lib. The default here assumes you're building a DLL. Only
+ * libarchive source should ever define __LIBARCHIVE_BUILD.
+ */
+#if ((defined __WIN32__) || (defined _WIN32) || defined(__CYGWIN__)) && (!defined LIBARCHIVE_STATIC)
+# ifdef __LIBARCHIVE_BUILD
+# ifdef __GNUC__
+# define __LA_DECL __attribute__((dllexport)) extern
+# else
+# define __LA_DECL __declspec(dllexport)
+# endif
+# else
+# ifdef __GNUC__
+# define __LA_DECL __attribute__((dllimport)) extern
+# else
+# define __LA_DECL __declspec(dllimport)
+# endif
+# endif
+#else
+/* Static libraries or non-Windows needs no special declaration. */
+# define __LA_DECL
+#endif
+
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define __LA_PRINTF(fmtarg, firstvararg) \
+ __attribute__((__format__ (__printf__, fmtarg, firstvararg)))
+#else
+#define __LA_PRINTF(fmtarg, firstvararg) /* nothing */
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * The version number is provided as both a macro and a function.
+ * The macro identifies the installed header; the function identifies
+ * the library version (which may not be the same if you're using a
+ * dynamically-linked version of the library). Of course, if the
+ * header and library are very different, you should expect some
+ * strangeness. Don't do that.
+ */
+
+/*
+ * The version number is expressed as a single integer that makes it
+ * easy to compare versions at build time: for version a.b.c, the
+ * version number is printf("%d%03d%03d",a,b,c). For example, if you
+ * know your application requires version 2.12.108 or later, you can
+ * assert that ARCHIVE_VERSION >= 2012108.
+ *
+ * This single-number format was introduced with libarchive 1.9.0 in
+ * the libarchive 1.x family and libarchive 2.2.4 in the libarchive
+ * 2.x family. The following may be useful if you really want to do
+ * feature detection for earlier libarchive versions (which defined
+ * ARCHIVE_API_VERSION and ARCHIVE_API_FEATURE instead):
+ *
+ * #ifndef ARCHIVE_VERSION_NUMBER
+ * #define ARCHIVE_VERSION_NUMBER \
+ * (ARCHIVE_API_VERSION * 1000000 + ARCHIVE_API_FEATURE * 1000)
+ * #endif
+ */
+#define ARCHIVE_VERSION_NUMBER 2008005
+__LA_DECL int archive_version_number(void);
+
+/*
+ * Textual name/version of the library, useful for version displays.
+ */
+#define ARCHIVE_VERSION_STRING "libarchive 2.8.5"
+__LA_DECL const char * archive_version_string(void);
+
+#if ARCHIVE_VERSION_NUMBER < 3000000
+/*
+ * Deprecated; these are older names that will be removed in favor of
+ * the simpler definitions above.
+ */
+#define ARCHIVE_VERSION_STAMP ARCHIVE_VERSION_NUMBER
+__LA_DECL int archive_version_stamp(void);
+#define ARCHIVE_LIBRARY_VERSION ARCHIVE_VERSION_STRING
+__LA_DECL const char * archive_version(void);
+#define ARCHIVE_API_VERSION (ARCHIVE_VERSION_NUMBER / 1000000)
+__LA_DECL int archive_api_version(void);
+#define ARCHIVE_API_FEATURE ((ARCHIVE_VERSION_NUMBER / 1000) % 1000)
+__LA_DECL int archive_api_feature(void);
+#endif
+
+#if ARCHIVE_VERSION_NUMBER < 3000000
+/* This should never have been here in the first place. */
+/* Legacy of old tar assumptions, will be removed in libarchive 3.0. */
+#define ARCHIVE_BYTES_PER_RECORD 512
+#define ARCHIVE_DEFAULT_BYTES_PER_BLOCK 10240
+#endif
+
+/* Declare our basic types. */
+struct archive;
+struct archive_entry;
+
+/*
+ * Error codes: Use archive_errno() and archive_error_string()
+ * to retrieve details. Unless specified otherwise, all functions
+ * that return 'int' use these codes.
+ */
+#define ARCHIVE_EOF 1 /* Found end of archive. */
+#define ARCHIVE_OK 0 /* Operation was successful. */
+#define ARCHIVE_RETRY (-10) /* Retry might succeed. */
+#define ARCHIVE_WARN (-20) /* Partial success. */
+/* For example, if write_header "fails", then you can't push data. */
+#define ARCHIVE_FAILED (-25) /* Current operation cannot complete. */
+/* But if write_header is "fatal," then this archive is dead and useless. */
+#define ARCHIVE_FATAL (-30) /* No more operations are possible. */
+
+/*
+ * As far as possible, archive_errno returns standard platform errno codes.
+ * Of course, the details vary by platform, so the actual definitions
+ * here are stored in "archive_platform.h". The symbols are listed here
+ * for reference; as a rule, clients should not need to know the exact
+ * platform-dependent error code.
+ */
+/* Unrecognized or invalid file format. */
+/* #define ARCHIVE_ERRNO_FILE_FORMAT */
+/* Illegal usage of the library. */
+/* #define ARCHIVE_ERRNO_PROGRAMMER_ERROR */
+/* Unknown or unclassified error. */
+/* #define ARCHIVE_ERRNO_MISC */
+
+/*
+ * Callbacks are invoked to automatically read/skip/write/open/close the
+ * archive. You can provide your own for complex tasks (like breaking
+ * archives across multiple tapes) or use standard ones built into the
+ * library.
+ */
+
+/* Returns pointer and size of next block of data from archive. */
+typedef __LA_SSIZE_T archive_read_callback(struct archive *,
+ void *_client_data, const void **_buffer);
+
+/* Skips at most request bytes from archive and returns the skipped amount */
+#if ARCHIVE_VERSION_NUMBER < 2000000
+/* Libarchive 1.0 used ssize_t for the return, which is only 32 bits
+ * on most 32-bit platforms; not large enough. */
+typedef __LA_SSIZE_T archive_skip_callback(struct archive *,
+ void *_client_data, size_t request);
+#elif ARCHIVE_VERSION_NUMBER < 3000000
+/* Libarchive 2.0 used off_t here, but that is a bad idea on Linux and a
+ * few other platforms where off_t varies with build settings. */
+typedef off_t archive_skip_callback(struct archive *,
+ void *_client_data, off_t request);
+#else
+/* Libarchive 3.0 uses int64_t here, which is actually guaranteed to be
+ * 64 bits on every platform. */
+typedef __LA_INT64_T archive_skip_callback(struct archive *,
+ void *_client_data, __LA_INT64_T request);
+#endif
+
+/* Returns size actually written, zero on EOF, -1 on error. */
+typedef __LA_SSIZE_T archive_write_callback(struct archive *,
+ void *_client_data,
+ const void *_buffer, size_t _length);
+
+#if ARCHIVE_VERSION_NUMBER < 3000000
+/* Open callback is actually never needed; remove it in libarchive 3.0. */
+typedef int archive_open_callback(struct archive *, void *_client_data);
+#endif
+
+typedef int archive_close_callback(struct archive *, void *_client_data);
+
+/*
+ * Codes for archive_compression.
+ */
+#define ARCHIVE_COMPRESSION_NONE 0
+#define ARCHIVE_COMPRESSION_GZIP 1
+#define ARCHIVE_COMPRESSION_BZIP2 2
+#define ARCHIVE_COMPRESSION_COMPRESS 3
+#define ARCHIVE_COMPRESSION_PROGRAM 4
+#define ARCHIVE_COMPRESSION_LZMA 5
+#define ARCHIVE_COMPRESSION_XZ 6
+#define ARCHIVE_COMPRESSION_UU 7
+#define ARCHIVE_COMPRESSION_RPM 8
+
+/*
+ * Codes returned by archive_format.
+ *
+ * Top 16 bits identifies the format family (e.g., "tar"); lower
+ * 16 bits indicate the variant. This is updated by read_next_header.
+ * Note that the lower 16 bits will often vary from entry to entry.
+ * In some cases, this variation occurs as libarchive learns more about
+ * the archive (for example, later entries might utilize extensions that
+ * weren't necessary earlier in the archive; in this case, libarchive
+ * will change the format code to indicate the extended format that
+ * was used). In other cases, it's because different tools have
+ * modified the archive and so different parts of the archive
+ * actually have slightly different formts. (Both tar and cpio store
+ * format codes in each entry, so it is quite possible for each
+ * entry to be in a different format.)
+ */
+#define ARCHIVE_FORMAT_BASE_MASK 0xff0000
+#define ARCHIVE_FORMAT_CPIO 0x10000
+#define ARCHIVE_FORMAT_CPIO_POSIX (ARCHIVE_FORMAT_CPIO | 1)
+#define ARCHIVE_FORMAT_CPIO_BIN_LE (ARCHIVE_FORMAT_CPIO | 2)
+#define ARCHIVE_FORMAT_CPIO_BIN_BE (ARCHIVE_FORMAT_CPIO | 3)
+#define ARCHIVE_FORMAT_CPIO_SVR4_NOCRC (ARCHIVE_FORMAT_CPIO | 4)
+#define ARCHIVE_FORMAT_CPIO_SVR4_CRC (ARCHIVE_FORMAT_CPIO | 5)
+#define ARCHIVE_FORMAT_SHAR 0x20000
+#define ARCHIVE_FORMAT_SHAR_BASE (ARCHIVE_FORMAT_SHAR | 1)
+#define ARCHIVE_FORMAT_SHAR_DUMP (ARCHIVE_FORMAT_SHAR | 2)
+#define ARCHIVE_FORMAT_TAR 0x30000
+#define ARCHIVE_FORMAT_TAR_USTAR (ARCHIVE_FORMAT_TAR | 1)
+#define ARCHIVE_FORMAT_TAR_PAX_INTERCHANGE (ARCHIVE_FORMAT_TAR | 2)
+#define ARCHIVE_FORMAT_TAR_PAX_RESTRICTED (ARCHIVE_FORMAT_TAR | 3)
+#define ARCHIVE_FORMAT_TAR_GNUTAR (ARCHIVE_FORMAT_TAR | 4)
+#define ARCHIVE_FORMAT_ISO9660 0x40000
+#define ARCHIVE_FORMAT_ISO9660_ROCKRIDGE (ARCHIVE_FORMAT_ISO9660 | 1)
+#define ARCHIVE_FORMAT_ZIP 0x50000
+#define ARCHIVE_FORMAT_EMPTY 0x60000
+#define ARCHIVE_FORMAT_AR 0x70000
+#define ARCHIVE_FORMAT_AR_GNU (ARCHIVE_FORMAT_AR | 1)
+#define ARCHIVE_FORMAT_AR_BSD (ARCHIVE_FORMAT_AR | 2)
+#define ARCHIVE_FORMAT_MTREE 0x80000
+#define ARCHIVE_FORMAT_RAW 0x90000
+#define ARCHIVE_FORMAT_XAR 0xA0000
+
+/*-
+ * Basic outline for reading an archive:
+ * 1) Ask archive_read_new for an archive reader object.
+ * 2) Update any global properties as appropriate.
+ * In particular, you'll certainly want to call appropriate
+ * archive_read_support_XXX functions.
+ * 3) Call archive_read_open_XXX to open the archive
+ * 4) Repeatedly call archive_read_next_header to get information about
+ * successive archive entries. Call archive_read_data to extract
+ * data for entries of interest.
+ * 5) Call archive_read_finish to end processing.
+ */
+__LA_DECL struct archive *archive_read_new(void);
+
+/*
+ * The archive_read_support_XXX calls enable auto-detect for this
+ * archive handle. They also link in the necessary support code.
+ * For example, if you don't want bzlib linked in, don't invoke
+ * support_compression_bzip2(). The "all" functions provide the
+ * obvious shorthand.
+ */
+__LA_DECL int archive_read_support_compression_all(struct archive *);
+__LA_DECL int archive_read_support_compression_bzip2(struct archive *);
+__LA_DECL int archive_read_support_compression_compress(struct archive *);
+__LA_DECL int archive_read_support_compression_gzip(struct archive *);
+__LA_DECL int archive_read_support_compression_lzma(struct archive *);
+__LA_DECL int archive_read_support_compression_none(struct archive *);
+__LA_DECL int archive_read_support_compression_program(struct archive *,
+ const char *command);
+__LA_DECL int archive_read_support_compression_program_signature
+ (struct archive *, const char *,
+ const void * /* match */, size_t);
+
+__LA_DECL int archive_read_support_compression_rpm(struct archive *);
+__LA_DECL int archive_read_support_compression_uu(struct archive *);
+__LA_DECL int archive_read_support_compression_xz(struct archive *);
+
+__LA_DECL int archive_read_support_format_all(struct archive *);
+__LA_DECL int archive_read_support_format_ar(struct archive *);
+__LA_DECL int archive_read_support_format_cpio(struct archive *);
+__LA_DECL int archive_read_support_format_empty(struct archive *);
+__LA_DECL int archive_read_support_format_gnutar(struct archive *);
+__LA_DECL int archive_read_support_format_iso9660(struct archive *);
+__LA_DECL int archive_read_support_format_mtree(struct archive *);
+__LA_DECL int archive_read_support_format_raw(struct archive *);
+__LA_DECL int archive_read_support_format_tar(struct archive *);
+__LA_DECL int archive_read_support_format_xar(struct archive *);
+__LA_DECL int archive_read_support_format_zip(struct archive *);
+
+
+/* Open the archive using callbacks for archive I/O. */
+__LA_DECL int archive_read_open(struct archive *, void *_client_data,
+ archive_open_callback *, archive_read_callback *,
+ archive_close_callback *);
+__LA_DECL int archive_read_open2(struct archive *, void *_client_data,
+ archive_open_callback *, archive_read_callback *,
+ archive_skip_callback *, archive_close_callback *);
+
+/*
+ * A variety of shortcuts that invoke archive_read_open() with
+ * canned callbacks suitable for common situations. The ones that
+ * accept a block size handle tape blocking correctly.
+ */
+/* Use this if you know the filename. Note: NULL indicates stdin. */
+__LA_DECL int archive_read_open_filename(struct archive *,
+ const char *_filename, size_t _block_size);
+/* archive_read_open_file() is a deprecated synonym for ..._open_filename(). */
+__LA_DECL int archive_read_open_file(struct archive *,
+ const char *_filename, size_t _block_size);
+/* Read an archive that's stored in memory. */
+__LA_DECL int archive_read_open_memory(struct archive *,
+ void * buff, size_t size);
+/* A more involved version that is only used for internal testing. */
+__LA_DECL int archive_read_open_memory2(struct archive *a, void *buff,
+ size_t size, size_t read_size);
+/* Read an archive that's already open, using the file descriptor. */
+__LA_DECL int archive_read_open_fd(struct archive *, int _fd,
+ size_t _block_size);
+/* Read an archive that's already open, using a FILE *. */
+/* Note: DO NOT use this with tape drives. */
+__LA_DECL int archive_read_open_FILE(struct archive *, FILE *_file);
+
+/* Parses and returns next entry header. */
+__LA_DECL int archive_read_next_header(struct archive *,
+ struct archive_entry **);
+
+/* Parses and returns next entry header using the archive_entry passed in */
+__LA_DECL int archive_read_next_header2(struct archive *,
+ struct archive_entry *);
+
+/*
+ * Retrieve the byte offset in UNCOMPRESSED data where last-read
+ * header started.
+ */
+__LA_DECL __LA_INT64_T archive_read_header_position(struct archive *);
+
+/* Read data from the body of an entry. Similar to read(2). */
+__LA_DECL __LA_SSIZE_T archive_read_data(struct archive *,
+ void *, size_t);
+
+/*
+ * A zero-copy version of archive_read_data that also exposes the file offset
+ * of each returned block. Note that the client has no way to specify
+ * the desired size of the block. The API does guarantee that offsets will
+ * be strictly increasing and that returned blocks will not overlap.
+ */
+#if ARCHIVE_VERSION_NUMBER < 3000000
+__LA_DECL int archive_read_data_block(struct archive *a,
+ const void **buff, size_t *size, off_t *offset);
+#else
+__LA_DECL int archive_read_data_block(struct archive *a,
+ const void **buff, size_t *size,
+ __LA_INT64_T *offset);
+#endif
+
+/*-
+ * Some convenience functions that are built on archive_read_data:
+ * 'skip': skips entire entry
+ * 'into_buffer': writes data into memory buffer that you provide
+ * 'into_fd': writes data to specified filedes
+ */
+__LA_DECL int archive_read_data_skip(struct archive *);
+__LA_DECL int archive_read_data_into_buffer(struct archive *,
+ void *buffer, __LA_SSIZE_T len);
+__LA_DECL int archive_read_data_into_fd(struct archive *, int fd);
+
+/*
+ * Set read options.
+ */
+/* Apply option string to the format only. */
+__LA_DECL int archive_read_set_format_options(struct archive *_a,
+ const char *s);
+/* Apply option string to the filter only. */
+__LA_DECL int archive_read_set_filter_options(struct archive *_a,
+ const char *s);
+/* Apply option string to both the format and the filter. */
+__LA_DECL int archive_read_set_options(struct archive *_a,
+ const char *s);
+
+/*-
+ * Convenience function to recreate the current entry (whose header
+ * has just been read) on disk.
+ *
+ * This does quite a bit more than just copy data to disk. It also:
+ * - Creates intermediate directories as required.
+ * - Manages directory permissions: non-writable directories will
+ * be initially created with write permission enabled; when the
+ * archive is closed, dir permissions are edited to the values specified
+ * in the archive.
+ * - Checks hardlinks: hardlinks will not be extracted unless the
+ * linked-to file was also extracted within the same session. (TODO)
+ */
+
+/* The "flags" argument selects optional behavior, 'OR' the flags you want. */
+
+/* Default: Do not try to set owner/group. */
+#define ARCHIVE_EXTRACT_OWNER (0x0001)
+/* Default: Do obey umask, do not restore SUID/SGID/SVTX bits. */
+#define ARCHIVE_EXTRACT_PERM (0x0002)
+/* Default: Do not restore mtime/atime. */
+#define ARCHIVE_EXTRACT_TIME (0x0004)
+/* Default: Replace existing files. */
+#define ARCHIVE_EXTRACT_NO_OVERWRITE (0x0008)
+/* Default: Try create first, unlink only if create fails with EEXIST. */
+#define ARCHIVE_EXTRACT_UNLINK (0x0010)
+/* Default: Do not restore ACLs. */
+#define ARCHIVE_EXTRACT_ACL (0x0020)
+/* Default: Do not restore fflags. */
+#define ARCHIVE_EXTRACT_FFLAGS (0x0040)
+/* Default: Do not restore xattrs. */
+#define ARCHIVE_EXTRACT_XATTR (0x0080)
+/* Default: Do not try to guard against extracts redirected by symlinks. */
+/* Note: With ARCHIVE_EXTRACT_UNLINK, will remove any intermediate symlink. */
+#define ARCHIVE_EXTRACT_SECURE_SYMLINKS (0x0100)
+/* Default: Do not reject entries with '..' as path elements. */
+#define ARCHIVE_EXTRACT_SECURE_NODOTDOT (0x0200)
+/* Default: Create parent directories as needed. */
+#define ARCHIVE_EXTRACT_NO_AUTODIR (0x0400)
+/* Default: Overwrite files, even if one on disk is newer. */
+#define ARCHIVE_EXTRACT_NO_OVERWRITE_NEWER (0x0800)
+/* Detect blocks of 0 and write holes instead. */
+#define ARCHIVE_EXTRACT_SPARSE (0x1000)
+
+__LA_DECL int archive_read_extract(struct archive *, struct archive_entry *,
+ int flags);
+__LA_DECL int archive_read_extract2(struct archive *, struct archive_entry *,
+ struct archive * /* dest */);
+__LA_DECL void archive_read_extract_set_progress_callback(struct archive *,
+ void (*_progress_func)(void *), void *_user_data);
+
+/* Record the dev/ino of a file that will not be written. This is
+ * generally set to the dev/ino of the archive being read. */
+__LA_DECL void archive_read_extract_set_skip_file(struct archive *,
+ dev_t, ino_t);
+
+/* Close the file and release most resources. */
+__LA_DECL int archive_read_close(struct archive *);
+/* Release all resources and destroy the object. */
+/* Note that archive_read_free will call archive_read_close for you. */
+__LA_DECL int archive_read_free(struct archive *);
+#if ARCHIVE_VERSION_NUMBER < 4000000
+/* Synonym for archive_read_free() for backwards compatibility. */
+__LA_DECL int archive_read_finish(struct archive *);
+#endif
+
+/*-
+ * To create an archive:
+ * 1) Ask archive_write_new for a archive writer object.
+ * 2) Set any global properties. In particular, you should set
+ * the compression and format to use.
+ * 3) Call archive_write_open to open the file (most people
+ * will use archive_write_open_file or archive_write_open_fd,
+ * which provide convenient canned I/O callbacks for you).
+ * 4) For each entry:
+ * - construct an appropriate struct archive_entry structure
+ * - archive_write_header to write the header
+ * - archive_write_data to write the entry data
+ * 5) archive_write_close to close the output
+ * 6) archive_write_free to cleanup the writer and release resources
+ */
+__LA_DECL struct archive *archive_write_new(void);
+__LA_DECL int archive_write_set_bytes_per_block(struct archive *,
+ int bytes_per_block);
+__LA_DECL int archive_write_get_bytes_per_block(struct archive *);
+/* XXX This is badly misnamed; suggestions appreciated. XXX */
+__LA_DECL int archive_write_set_bytes_in_last_block(struct archive *,
+ int bytes_in_last_block);
+__LA_DECL int archive_write_get_bytes_in_last_block(struct archive *);
+
+/* The dev/ino of a file that won't be archived. This is used
+ * to avoid recursively adding an archive to itself. */
+__LA_DECL int archive_write_set_skip_file(struct archive *, dev_t, ino_t);
+
+__LA_DECL int archive_write_set_compression_bzip2(struct archive *);
+__LA_DECL int archive_write_set_compression_compress(struct archive *);
+__LA_DECL int archive_write_set_compression_gzip(struct archive *);
+__LA_DECL int archive_write_set_compression_lzma(struct archive *);
+__LA_DECL int archive_write_set_compression_none(struct archive *);
+__LA_DECL int archive_write_set_compression_program(struct archive *,
+ const char *cmd);
+__LA_DECL int archive_write_set_compression_xz(struct archive *);
+/* A convenience function to set the format based on the code or name. */
+__LA_DECL int archive_write_set_format(struct archive *, int format_code);
+__LA_DECL int archive_write_set_format_by_name(struct archive *,
+ const char *name);
+/* To minimize link pollution, use one or more of the following. */
+__LA_DECL int archive_write_set_format_ar_bsd(struct archive *);
+__LA_DECL int archive_write_set_format_ar_svr4(struct archive *);
+__LA_DECL int archive_write_set_format_cpio(struct archive *);
+__LA_DECL int archive_write_set_format_cpio_newc(struct archive *);
+__LA_DECL int archive_write_set_format_mtree(struct archive *);
+/* TODO: int archive_write_set_format_old_tar(struct archive *); */
+__LA_DECL int archive_write_set_format_pax(struct archive *);
+__LA_DECL int archive_write_set_format_pax_restricted(struct archive *);
+__LA_DECL int archive_write_set_format_shar(struct archive *);
+__LA_DECL int archive_write_set_format_shar_dump(struct archive *);
+__LA_DECL int archive_write_set_format_ustar(struct archive *);
+__LA_DECL int archive_write_set_format_zip(struct archive *);
+__LA_DECL int archive_write_open(struct archive *, void *,
+ archive_open_callback *, archive_write_callback *,
+ archive_close_callback *);
+__LA_DECL int archive_write_open_fd(struct archive *, int _fd);
+__LA_DECL int archive_write_open_filename(struct archive *, const char *_file);
+/* A deprecated synonym for archive_write_open_filename() */
+__LA_DECL int archive_write_open_file(struct archive *, const char *_file);
+__LA_DECL int archive_write_open_FILE(struct archive *, FILE *);
+/* _buffSize is the size of the buffer, _used refers to a variable that
+ * will be updated after each write into the buffer. */
+__LA_DECL int archive_write_open_memory(struct archive *,
+ void *_buffer, size_t _buffSize, size_t *_used);
+
+/*
+ * Note that the library will truncate writes beyond the size provided
+ * to archive_write_header or pad if the provided data is short.
+ */
+__LA_DECL int archive_write_header(struct archive *,
+ struct archive_entry *);
+#if ARCHIVE_VERSION_NUMBER < 2000000
+/* This was erroneously declared to return "int" in libarchive 1.x. */
+__LA_DECL int archive_write_data(struct archive *,
+ const void *, size_t);
+#else
+/* Libarchive 2.0 and later return ssize_t here. */
+__LA_DECL __LA_SSIZE_T archive_write_data(struct archive *,
+ const void *, size_t);
+#endif
+
+#if ARCHIVE_VERSION_NUMBER < 3000000
+/* Libarchive 1.x and 2.x use off_t for the argument, but that's not
+ * stable on Linux. */
+__LA_DECL __LA_SSIZE_T archive_write_data_block(struct archive *,
+ const void *, size_t, off_t);
+#else
+/* Libarchive 3.0 uses explicit int64_t to ensure consistent 64-bit support. */
+__LA_DECL __LA_SSIZE_T archive_write_data_block(struct archive *,
+ const void *, size_t, __LA_INT64_T);
+#endif
+__LA_DECL int archive_write_finish_entry(struct archive *);
+__LA_DECL int archive_write_close(struct archive *);
+
+/* This can fail if the archive wasn't already closed, in which case
+ * archive_write_free() will implicitly call archive_write_close(). */
+__LA_DECL int archive_write_free(struct archive *);
+#if ARCHIVE_VERSION_NUMBER < 4000000
+/* Synonym for archive_write_free() for backwards compatibility. */
+__LA_DECL int archive_write_finish(struct archive *);
+#endif
+
+/*
+ * Set write options.
+ */
+/* Apply option string to the format only. */
+__LA_DECL int archive_write_set_format_options(struct archive *_a,
+ const char *s);
+/* Apply option string to the compressor only. */
+__LA_DECL int archive_write_set_compressor_options(struct archive *_a,
+ const char *s);
+/* Apply option string to both the format and the compressor. */
+__LA_DECL int archive_write_set_options(struct archive *_a,
+ const char *s);
+
+
+/*-
+ * ARCHIVE_WRITE_DISK API
+ *
+ * To create objects on disk:
+ * 1) Ask archive_write_disk_new for a new archive_write_disk object.
+ * 2) Set any global properties. In particular, you probably
+ * want to set the options.
+ * 3) For each entry:
+ * - construct an appropriate struct archive_entry structure
+ * - archive_write_header to create the file/dir/etc on disk
+ * - archive_write_data to write the entry data
+ * 4) archive_write_free to cleanup the writer and release resources
+ *
+ * In particular, you can use this in conjunction with archive_read()
+ * to pull entries out of an archive and create them on disk.
+ */
+__LA_DECL struct archive *archive_write_disk_new(void);
+/* This file will not be overwritten. */
+__LA_DECL int archive_write_disk_set_skip_file(struct archive *,
+ dev_t, ino_t);
+/* Set flags to control how the next item gets created.
+ * This accepts a bitmask of ARCHIVE_EXTRACT_XXX flags defined above. */
+__LA_DECL int archive_write_disk_set_options(struct archive *,
+ int flags);
+/*
+ * The lookup functions are given uname/uid (or gname/gid) pairs and
+ * return a uid (gid) suitable for this system. These are used for
+ * restoring ownership and for setting ACLs. The default functions
+ * are naive, they just return the uid/gid. These are small, so reasonable
+ * for applications that don't need to preserve ownership; they
+ * are probably also appropriate for applications that are doing
+ * same-system backup and restore.
+ */
+/*
+ * The "standard" lookup functions use common system calls to lookup
+ * the uname/gname, falling back to the uid/gid if the names can't be
+ * found. They cache lookups and are reasonably fast, but can be very
+ * large, so they are not used unless you ask for them. In
+ * particular, these match the specifications of POSIX "pax" and old
+ * POSIX "tar".
+ */
+__LA_DECL int archive_write_disk_set_standard_lookup(struct archive *);
+/*
+ * If neither the default (naive) nor the standard (big) functions suit
+ * your needs, you can write your own and register them. Be sure to
+ * include a cleanup function if you have allocated private data.
+ */
+__LA_DECL int archive_write_disk_set_group_lookup(struct archive *,
+ void * /* private_data */,
+ __LA_GID_T (*)(void *, const char *, __LA_GID_T),
+ void (* /* cleanup */)(void *));
+__LA_DECL int archive_write_disk_set_user_lookup(struct archive *,
+ void * /* private_data */,
+ __LA_UID_T (*)(void *, const char *, __LA_UID_T),
+ void (* /* cleanup */)(void *));
+
+/*
+ * ARCHIVE_READ_DISK API
+ *
+ * This is still evolving and somewhat experimental.
+ */
+__LA_DECL struct archive *archive_read_disk_new(void);
+/* The names for symlink modes here correspond to an old BSD
+ * command-line argument convention: -L, -P, -H */
+/* Follow all symlinks. */
+__LA_DECL int archive_read_disk_set_symlink_logical(struct archive *);
+/* Follow no symlinks. */
+__LA_DECL int archive_read_disk_set_symlink_physical(struct archive *);
+/* Follow symlink initially, then not. */
+__LA_DECL int archive_read_disk_set_symlink_hybrid(struct archive *);
+/* TODO: Handle Linux stat32/stat64 ugliness. <sigh> */
+__LA_DECL int archive_read_disk_entry_from_file(struct archive *,
+ struct archive_entry *, int /* fd */, const struct stat *);
+/* Look up gname for gid or uname for uid. */
+/* Default implementations are very, very stupid. */
+__LA_DECL const char *archive_read_disk_gname(struct archive *, __LA_GID_T);
+__LA_DECL const char *archive_read_disk_uname(struct archive *, __LA_UID_T);
+/* "Standard" implementation uses getpwuid_r, getgrgid_r and caches the
+ * results for performance. */
+__LA_DECL int archive_read_disk_set_standard_lookup(struct archive *);
+/* You can install your own lookups if you like. */
+__LA_DECL int archive_read_disk_set_gname_lookup(struct archive *,
+ void * /* private_data */,
+ const char *(* /* lookup_fn */)(void *, __LA_GID_T),
+ void (* /* cleanup_fn */)(void *));
+__LA_DECL int archive_read_disk_set_uname_lookup(struct archive *,
+ void * /* private_data */,
+ const char *(* /* lookup_fn */)(void *, __LA_UID_T),
+ void (* /* cleanup_fn */)(void *));
+
+/*
+ * Accessor functions to read/set various information in
+ * the struct archive object:
+ */
+/* Bytes written after compression or read before decompression. */
+__LA_DECL __LA_INT64_T archive_position_compressed(struct archive *);
+/* Bytes written to compressor or read from decompressor. */
+__LA_DECL __LA_INT64_T archive_position_uncompressed(struct archive *);
+
+__LA_DECL const char *archive_compression_name(struct archive *);
+__LA_DECL int archive_compression(struct archive *);
+__LA_DECL int archive_errno(struct archive *);
+__LA_DECL const char *archive_error_string(struct archive *);
+__LA_DECL const char *archive_format_name(struct archive *);
+__LA_DECL int archive_format(struct archive *);
+__LA_DECL void archive_clear_error(struct archive *);
+__LA_DECL void archive_set_error(struct archive *, int _err,
+ const char *fmt, ...) __LA_PRINTF(3, 4);
+__LA_DECL void archive_copy_error(struct archive *dest,
+ struct archive *src);
+__LA_DECL int archive_file_count(struct archive *);
+
+#ifdef __cplusplus
+}
+#endif
+
+/* These are meaningless outside of this header. */
+#undef __LA_DECL
+#undef __LA_GID_T
+#undef __LA_UID_T
+
+/* These need to remain defined because they're used in the
+ * callback type definitions. XXX Fix this. This is ugly. XXX */
+/* #undef __LA_INT64_T */
+/* #undef __LA_SSIZE_T */
+
+#endif /* !ARCHIVE_H_INCLUDED */
diff --git a/lib/libarchive/archive_check_magic.c b/contrib/libarchive/libarchive/archive_check_magic.c
index 1381a18..1381a18 100644
--- a/lib/libarchive/archive_check_magic.c
+++ b/contrib/libarchive/libarchive/archive_check_magic.c
diff --git a/lib/libarchive/archive_crc32.h b/contrib/libarchive/libarchive/archive_crc32.h
index 7715754..7715754 100644
--- a/lib/libarchive/archive_crc32.h
+++ b/contrib/libarchive/libarchive/archive_crc32.h
diff --git a/lib/libarchive/archive_endian.h b/contrib/libarchive/libarchive/archive_endian.h
index 9d01365..9d01365 100644
--- a/lib/libarchive/archive_endian.h
+++ b/contrib/libarchive/libarchive/archive_endian.h
diff --git a/lib/libarchive/archive_entry.3 b/contrib/libarchive/libarchive/archive_entry.3
index 35cb385..35cb385 100644
--- a/lib/libarchive/archive_entry.3
+++ b/contrib/libarchive/libarchive/archive_entry.3
diff --git a/lib/libarchive/archive_entry.c b/contrib/libarchive/libarchive/archive_entry.c
index 1202a8a..1202a8a 100644
--- a/lib/libarchive/archive_entry.c
+++ b/contrib/libarchive/libarchive/archive_entry.c
diff --git a/lib/libarchive/archive_entry.h b/contrib/libarchive/libarchive/archive_entry.h
index 7ed2dde..7ed2dde 100644
--- a/lib/libarchive/archive_entry.h
+++ b/contrib/libarchive/libarchive/archive_entry.h
diff --git a/lib/libarchive/archive_entry_copy_stat.c b/contrib/libarchive/libarchive/archive_entry_copy_stat.c
index 615d3b0..615d3b0 100644
--- a/lib/libarchive/archive_entry_copy_stat.c
+++ b/contrib/libarchive/libarchive/archive_entry_copy_stat.c
diff --git a/lib/libarchive/archive_entry_link_resolver.c b/contrib/libarchive/libarchive/archive_entry_link_resolver.c
index a5eb624..a5eb624 100644
--- a/lib/libarchive/archive_entry_link_resolver.c
+++ b/contrib/libarchive/libarchive/archive_entry_link_resolver.c
diff --git a/lib/libarchive/archive_entry_private.h b/contrib/libarchive/libarchive/archive_entry_private.h
index d59021c..d59021c 100644
--- a/lib/libarchive/archive_entry_private.h
+++ b/contrib/libarchive/libarchive/archive_entry_private.h
diff --git a/lib/libarchive/archive_entry_stat.c b/contrib/libarchive/libarchive/archive_entry_stat.c
index cdaeac3..cdaeac3 100644
--- a/lib/libarchive/archive_entry_stat.c
+++ b/contrib/libarchive/libarchive/archive_entry_stat.c
diff --git a/lib/libarchive/archive_entry_strmode.c b/contrib/libarchive/libarchive/archive_entry_strmode.c
index 8d7006a..8d7006a 100644
--- a/lib/libarchive/archive_entry_strmode.c
+++ b/contrib/libarchive/libarchive/archive_entry_strmode.c
diff --git a/lib/libarchive/archive_entry_xattr.c b/contrib/libarchive/libarchive/archive_entry_xattr.c
index b7e53e3..b7e53e3 100644
--- a/lib/libarchive/archive_entry_xattr.c
+++ b/contrib/libarchive/libarchive/archive_entry_xattr.c
diff --git a/lib/libarchive/archive_hash.h b/contrib/libarchive/libarchive/archive_hash.h
index 43f398c..43f398c 100644
--- a/lib/libarchive/archive_hash.h
+++ b/contrib/libarchive/libarchive/archive_hash.h
diff --git a/lib/libarchive/archive_platform.h b/contrib/libarchive/libarchive/archive_platform.h
index 9dc4643..9dc4643 100644
--- a/lib/libarchive/archive_platform.h
+++ b/contrib/libarchive/libarchive/archive_platform.h
diff --git a/lib/libarchive/archive_private.h b/contrib/libarchive/libarchive/archive_private.h
index dc83048..dc83048 100644
--- a/lib/libarchive/archive_private.h
+++ b/contrib/libarchive/libarchive/archive_private.h
diff --git a/lib/libarchive/archive_read.3 b/contrib/libarchive/libarchive/archive_read.3
index 4df0db6..4df0db6 100644
--- a/lib/libarchive/archive_read.3
+++ b/contrib/libarchive/libarchive/archive_read.3
diff --git a/lib/libarchive/archive_read.c b/contrib/libarchive/libarchive/archive_read.c
index 7873d45..7873d45 100644
--- a/lib/libarchive/archive_read.c
+++ b/contrib/libarchive/libarchive/archive_read.c
diff --git a/lib/libarchive/archive_read_data_into_fd.c b/contrib/libarchive/libarchive/archive_read_data_into_fd.c
index b2421bb..b2421bb 100644
--- a/lib/libarchive/archive_read_data_into_fd.c
+++ b/contrib/libarchive/libarchive/archive_read_data_into_fd.c
diff --git a/lib/libarchive/archive_read_disk.3 b/contrib/libarchive/libarchive/archive_read_disk.3
index 638c158..638c158 100644
--- a/lib/libarchive/archive_read_disk.3
+++ b/contrib/libarchive/libarchive/archive_read_disk.3
diff --git a/lib/libarchive/archive_read_disk.c b/contrib/libarchive/libarchive/archive_read_disk.c
index 3fd3133..3fd3133 100644
--- a/lib/libarchive/archive_read_disk.c
+++ b/contrib/libarchive/libarchive/archive_read_disk.c
diff --git a/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c b/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c
new file mode 100644
index 0000000..7ada371
--- /dev/null
+++ b/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c
@@ -0,0 +1,570 @@
+/*-
+ * Copyright (c) 2003-2009 Tim Kientzle
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "archive_platform.h"
+__FBSDID("$FreeBSD$");
+
+#ifdef HAVE_SYS_TYPES_H
+/* Mac OSX requires sys/types.h before sys/acl.h. */
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_ACL_H
+#include <sys/acl.h>
+#endif
+#ifdef HAVE_SYS_EXTATTR_H
+#include <sys/extattr.h>
+#endif
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_SYS_XATTR_H
+#include <sys/xattr.h>
+#endif
+#ifdef HAVE_ACL_LIBACL_H
+#include <acl/libacl.h>
+#endif
+#ifdef HAVE_ATTR_XATTR_H
+#include <attr/xattr.h>
+#endif
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+#ifdef HAVE_WINDOWS_H
+#include <windows.h>
+#endif
+
+#include "archive.h"
+#include "archive_entry.h"
+#include "archive_private.h"
+#include "archive_read_disk_private.h"
+
+/*
+ * Linux and FreeBSD plug this obvious hole in POSIX.1e in
+ * different ways.
+ */
+#if HAVE_ACL_GET_PERM
+#define ACL_GET_PERM acl_get_perm
+#elif HAVE_ACL_GET_PERM_NP
+#define ACL_GET_PERM acl_get_perm_np
+#endif
+
+static int setup_acls_posix1e(struct archive_read_disk *,
+ struct archive_entry *, int fd);
+static int setup_xattrs(struct archive_read_disk *,
+ struct archive_entry *, int fd);
+
+int
+archive_read_disk_entry_from_file(struct archive *_a,
+ struct archive_entry *entry,
+ int fd, const struct stat *st)
+{
+ struct archive_read_disk *a = (struct archive_read_disk *)_a;
+ const char *path, *name;
+ struct stat s;
+ int initial_fd = fd;
+ int r, r1;
+
+ archive_clear_error(_a);
+ path = archive_entry_sourcepath(entry);
+ if (path == NULL)
+ path = archive_entry_pathname(entry);
+
+#ifdef EXT2_IOC_GETFLAGS
+ /* Linux requires an extra ioctl to pull the flags. Although
+ * this is an extra step, it has a nice side-effect: We get an
+ * open file descriptor which we can use in the subsequent lookups. */
+ if ((S_ISREG(st->st_mode) || S_ISDIR(st->st_mode))) {
+ if (fd < 0)
+ fd = open(pathname, O_RDONLY | O_NONBLOCK | O_BINARY);
+ if (fd >= 0) {
+ unsigned long stflags;
+ int r = ioctl(fd, EXT2_IOC_GETFLAGS, &stflags);
+ if (r == 0 && stflags != 0)
+ archive_entry_set_fflags(entry, stflags, 0);
+ }
+ }
+#endif
+
+ if (st == NULL) {
+ /* TODO: On Windows, use GetFileInfoByHandle() here.
+ * Using Windows stat() call is badly broken, but
+ * even the stat() wrapper has problems because
+ * 'struct stat' is broken on Windows.
+ */
+#if HAVE_FSTAT
+ if (fd >= 0) {
+ if (fstat(fd, &s) != 0) {
+ archive_set_error(&a->archive, errno,
+ "Can't fstat");
+ return (ARCHIVE_FAILED);
+ }
+ } else
+#endif
+#if HAVE_LSTAT
+ if (!a->follow_symlinks) {
+ if (lstat(path, &s) != 0) {
+ archive_set_error(&a->archive, errno,
+ "Can't lstat %s", path);
+ return (ARCHIVE_FAILED);
+ }
+ } else
+#endif
+ if (stat(path, &s) != 0) {
+ archive_set_error(&a->archive, errno,
+ "Can't lstat %s", path);
+ return (ARCHIVE_FAILED);
+ }
+ st = &s;
+ }
+ archive_entry_copy_stat(entry, st);
+
+ /* Lookup uname/gname */
+ name = archive_read_disk_uname(_a, archive_entry_uid(entry));
+ if (name != NULL)
+ archive_entry_copy_uname(entry, name);
+ name = archive_read_disk_gname(_a, archive_entry_gid(entry));
+ if (name != NULL)
+ archive_entry_copy_gname(entry, name);
+
+#ifdef HAVE_STRUCT_STAT_ST_FLAGS
+ /* On FreeBSD, we get flags for free with the stat. */
+ /* TODO: Does this belong in copy_stat()? */
+ if (st->st_flags != 0)
+ archive_entry_set_fflags(entry, st->st_flags, 0);
+#endif
+
+#ifdef HAVE_READLINK
+ if (S_ISLNK(st->st_mode)) {
+ char linkbuffer[PATH_MAX + 1];
+ int lnklen = readlink(path, linkbuffer, PATH_MAX);
+ if (lnklen < 0) {
+ archive_set_error(&a->archive, errno,
+ "Couldn't read link data");
+ return (ARCHIVE_FAILED);
+ }
+ linkbuffer[lnklen] = 0;
+ archive_entry_set_symlink(entry, linkbuffer);
+ }
+#endif
+
+ r = setup_acls_posix1e(a, entry, fd);
+ r1 = setup_xattrs(a, entry, fd);
+ if (r1 < r)
+ r = r1;
+ /* If we opened the file earlier in this function, close it. */
+ if (initial_fd != fd)
+ close(fd);
+ return (r);
+}
+
+#ifdef HAVE_POSIX_ACL
+static void setup_acl_posix1e(struct archive_read_disk *a,
+ struct archive_entry *entry, acl_t acl, int archive_entry_acl_type);
+
+static int
+setup_acls_posix1e(struct archive_read_disk *a,
+ struct archive_entry *entry, int fd)
+{
+ const char *accpath;
+ acl_t acl;
+
+ accpath = archive_entry_sourcepath(entry);
+ if (accpath == NULL)
+ accpath = archive_entry_pathname(entry);
+
+ archive_entry_acl_clear(entry);
+
+ /* Retrieve access ACL from file. */
+ if (fd >= 0)
+ acl = acl_get_fd(fd);
+#if HAVE_ACL_GET_LINK_NP
+ else if (!a->follow_symlinks)
+ acl = acl_get_link_np(accpath, ACL_TYPE_ACCESS);
+#else
+ else if ((!a->follow_symlinks)
+ && (archive_entry_filetype(entry) == AE_IFLNK))
+ /* We can't get the ACL of a symlink, so we assume it can't
+ have one. */
+ acl = NULL;
+#endif
+ else
+ acl = acl_get_file(accpath, ACL_TYPE_ACCESS);
+ if (acl != NULL) {
+ setup_acl_posix1e(a, entry, acl,
+ ARCHIVE_ENTRY_ACL_TYPE_ACCESS);
+ acl_free(acl);
+ }
+
+ /* Only directories can have default ACLs. */
+ if (S_ISDIR(archive_entry_mode(entry))) {
+ acl = acl_get_file(accpath, ACL_TYPE_DEFAULT);
+ if (acl != NULL) {
+ setup_acl_posix1e(a, entry, acl,
+ ARCHIVE_ENTRY_ACL_TYPE_DEFAULT);
+ acl_free(acl);
+ }
+ }
+ return (ARCHIVE_OK);
+}
+
+/*
+ * Translate POSIX.1e ACL into libarchive internal structure.
+ */
+static void
+setup_acl_posix1e(struct archive_read_disk *a,
+ struct archive_entry *entry, acl_t acl, int archive_entry_acl_type)
+{
+ acl_tag_t acl_tag;
+ acl_entry_t acl_entry;
+ acl_permset_t acl_permset;
+ int s, ae_id, ae_tag, ae_perm;
+ const char *ae_name;
+
+ s = acl_get_entry(acl, ACL_FIRST_ENTRY, &acl_entry);
+ while (s == 1) {
+ ae_id = -1;
+ ae_name = NULL;
+
+ acl_get_tag_type(acl_entry, &acl_tag);
+ if (acl_tag == ACL_USER) {
+ ae_id = (int)*(uid_t *)acl_get_qualifier(acl_entry);
+ ae_name = archive_read_disk_uname(&a->archive, ae_id);
+ ae_tag = ARCHIVE_ENTRY_ACL_USER;
+ } else if (acl_tag == ACL_GROUP) {
+ ae_id = (int)*(gid_t *)acl_get_qualifier(acl_entry);
+ ae_name = archive_read_disk_gname(&a->archive, ae_id);
+ ae_tag = ARCHIVE_ENTRY_ACL_GROUP;
+ } else if (acl_tag == ACL_MASK) {
+ ae_tag = ARCHIVE_ENTRY_ACL_MASK;
+ } else if (acl_tag == ACL_USER_OBJ) {
+ ae_tag = ARCHIVE_ENTRY_ACL_USER_OBJ;
+ } else if (acl_tag == ACL_GROUP_OBJ) {
+ ae_tag = ARCHIVE_ENTRY_ACL_GROUP_OBJ;
+ } else if (acl_tag == ACL_OTHER) {
+ ae_tag = ARCHIVE_ENTRY_ACL_OTHER;
+ } else {
+ /* Skip types that libarchive can't support. */
+ continue;
+ }
+
+ acl_get_permset(acl_entry, &acl_permset);
+ ae_perm = 0;
+ /*
+ * acl_get_perm() is spelled differently on different
+ * platforms; see above.
+ */
+ if (ACL_GET_PERM(acl_permset, ACL_EXECUTE))
+ ae_perm |= ARCHIVE_ENTRY_ACL_EXECUTE;
+ if (ACL_GET_PERM(acl_permset, ACL_READ))
+ ae_perm |= ARCHIVE_ENTRY_ACL_READ;
+ if (ACL_GET_PERM(acl_permset, ACL_WRITE))
+ ae_perm |= ARCHIVE_ENTRY_ACL_WRITE;
+
+ archive_entry_acl_add_entry(entry,
+ archive_entry_acl_type, ae_perm, ae_tag,
+ ae_id, ae_name);
+
+ s = acl_get_entry(acl, ACL_NEXT_ENTRY, &acl_entry);
+ }
+}
+#else
+static int
+setup_acls_posix1e(struct archive_read_disk *a,
+ struct archive_entry *entry, int fd)
+{
+ (void)a; /* UNUSED */
+ (void)entry; /* UNUSED */
+ (void)fd; /* UNUSED */
+ return (ARCHIVE_OK);
+}
+#endif
+
+#if HAVE_LISTXATTR && HAVE_LLISTXATTR && HAVE_GETXATTR && HAVE_LGETXATTR
+
+/*
+ * Linux extended attribute support.
+ *
+ * TODO: By using a stack-allocated buffer for the first
+ * call to getxattr(), we might be able to avoid the second
+ * call entirely. We only need the second call if the
+ * stack-allocated buffer is too small. But a modest buffer
+ * of 1024 bytes or so will often be big enough. Same applies
+ * to listxattr().
+ */
+
+
+static int
+setup_xattr(struct archive_read_disk *a,
+ struct archive_entry *entry, const char *name, int fd)
+{
+ ssize_t size;
+ void *value = NULL;
+ const char *accpath;
+
+ (void)fd; /* UNUSED */
+
+ accpath = archive_entry_sourcepath(entry);
+ if (accpath == NULL)
+ accpath = archive_entry_pathname(entry);
+
+ if (!a->follow_symlinks)
+ size = lgetxattr(accpath, name, NULL, 0);
+ else
+ size = getxattr(accpath, name, NULL, 0);
+
+ if (size == -1) {
+ archive_set_error(&a->archive, errno,
+ "Couldn't query extended attribute");
+ return (ARCHIVE_WARN);
+ }
+
+ if (size > 0 && (value = malloc(size)) == NULL) {
+ archive_set_error(&a->archive, errno, "Out of memory");
+ return (ARCHIVE_FATAL);
+ }
+
+ if (!a->follow_symlinks)
+ size = lgetxattr(accpath, name, value, size);
+ else
+ size = getxattr(accpath, name, value, size);
+
+ if (size == -1) {
+ archive_set_error(&a->archive, errno,
+ "Couldn't read extended attribute");
+ return (ARCHIVE_WARN);
+ }
+
+ archive_entry_xattr_add_entry(entry, name, value, size);
+
+ free(value);
+ return (ARCHIVE_OK);
+}
+
+static int
+setup_xattrs(struct archive_read_disk *a,
+ struct archive_entry *entry, int fd)
+{
+ char *list, *p;
+ const char *path;
+ ssize_t list_size;
+
+
+ path = archive_entry_sourcepath(entry);
+ if (path == NULL)
+ path = archive_entry_pathname(entry);
+
+ if (!a->follow_symlinks)
+ list_size = llistxattr(path, NULL, 0);
+ else
+ list_size = listxattr(path, NULL, 0);
+
+ if (list_size == -1) {
+ if (errno == ENOTSUP)
+ return (ARCHIVE_OK);
+ archive_set_error(&a->archive, errno,
+ "Couldn't list extended attributes");
+ return (ARCHIVE_WARN);
+ }
+
+ if (list_size == 0)
+ return (ARCHIVE_OK);
+
+ if ((list = malloc(list_size)) == NULL) {
+ archive_set_error(&a->archive, errno, "Out of memory");
+ return (ARCHIVE_FATAL);
+ }
+
+ if (!a->follow_symlinks)
+ list_size = llistxattr(path, list, list_size);
+ else
+ list_size = listxattr(path, list, list_size);
+
+ if (list_size == -1) {
+ archive_set_error(&a->archive, errno,
+ "Couldn't retrieve extended attributes");
+ free(list);
+ return (ARCHIVE_WARN);
+ }
+
+ for (p = list; (p - list) < list_size; p += strlen(p) + 1) {
+ if (strncmp(p, "system.", 7) == 0 ||
+ strncmp(p, "xfsroot.", 8) == 0)
+ continue;
+ setup_xattr(a, entry, p, fd);
+ }
+
+ free(list);
+ return (ARCHIVE_OK);
+}
+
+#elif HAVE_EXTATTR_GET_FILE && HAVE_EXTATTR_LIST_FILE && \
+ HAVE_DECL_EXTATTR_NAMESPACE_USER
+
+/*
+ * FreeBSD extattr interface.
+ */
+
+/* TODO: Implement this. Follow the Linux model above, but
+ * with FreeBSD-specific system calls, of course. Be careful
+ * to not include the system extattrs that hold ACLs; we handle
+ * those separately.
+ */
+static int
+setup_xattr(struct archive_read_disk *a, struct archive_entry *entry,
+ int namespace, const char *name, const char *fullname, int fd);
+
+static int
+setup_xattr(struct archive_read_disk *a, struct archive_entry *entry,
+ int namespace, const char *name, const char *fullname, int fd)
+{
+ ssize_t size;
+ void *value = NULL;
+ const char *accpath;
+
+ (void)fd; /* UNUSED */
+
+ accpath = archive_entry_sourcepath(entry);
+ if (accpath == NULL)
+ accpath = archive_entry_pathname(entry);
+
+ if (!a->follow_symlinks)
+ size = extattr_get_link(accpath, namespace, name, NULL, 0);
+ else
+ size = extattr_get_file(accpath, namespace, name, NULL, 0);
+
+ if (size == -1) {
+ archive_set_error(&a->archive, errno,
+ "Couldn't query extended attribute");
+ return (ARCHIVE_WARN);
+ }
+
+ if (size > 0 && (value = malloc(size)) == NULL) {
+ archive_set_error(&a->archive, errno, "Out of memory");
+ return (ARCHIVE_FATAL);
+ }
+
+ if (!a->follow_symlinks)
+ size = extattr_get_link(accpath, namespace, name, value, size);
+ else
+ size = extattr_get_file(accpath, namespace, name, value, size);
+
+ if (size == -1) {
+ archive_set_error(&a->archive, errno,
+ "Couldn't read extended attribute");
+ return (ARCHIVE_WARN);
+ }
+
+ archive_entry_xattr_add_entry(entry, fullname, value, size);
+
+ free(value);
+ return (ARCHIVE_OK);
+}
+
+static int
+setup_xattrs(struct archive_read_disk *a,
+ struct archive_entry *entry, int fd)
+{
+ char buff[512];
+ char *list, *p;
+ ssize_t list_size;
+ const char *path;
+ int namespace = EXTATTR_NAMESPACE_USER;
+
+ path = archive_entry_sourcepath(entry);
+ if (path == NULL)
+ path = archive_entry_pathname(entry);
+
+ if (!a->follow_symlinks)
+ list_size = extattr_list_link(path, namespace, NULL, 0);
+ else
+ list_size = extattr_list_file(path, namespace, NULL, 0);
+
+ if (list_size == -1 && errno == EOPNOTSUPP)
+ return (ARCHIVE_OK);
+ if (list_size == -1) {
+ archive_set_error(&a->archive, errno,
+ "Couldn't list extended attributes");
+ return (ARCHIVE_WARN);
+ }
+
+ if (list_size == 0)
+ return (ARCHIVE_OK);
+
+ if ((list = malloc(list_size)) == NULL) {
+ archive_set_error(&a->archive, errno, "Out of memory");
+ return (ARCHIVE_FATAL);
+ }
+
+ if (!a->follow_symlinks)
+ list_size = extattr_list_link(path, namespace, list, list_size);
+ else
+ list_size = extattr_list_file(path, namespace, list, list_size);
+
+ if (list_size == -1) {
+ archive_set_error(&a->archive, errno,
+ "Couldn't retrieve extended attributes");
+ free(list);
+ return (ARCHIVE_WARN);
+ }
+
+ p = list;
+ while ((p - list) < list_size) {
+ size_t len = 255 & (int)*p;
+ char *name;
+
+ strcpy(buff, "user.");
+ name = buff + strlen(buff);
+ memcpy(name, p + 1, len);
+ name[len] = '\0';
+ setup_xattr(a, entry, namespace, name, buff, fd);
+ p += 1 + len;
+ }
+
+ free(list);
+ return (ARCHIVE_OK);
+}
+
+#else
+
+/*
+ * Generic (stub) extended attribute support.
+ */
+static int
+setup_xattrs(struct archive_read_disk *a,
+ struct archive_entry *entry, int fd)
+{
+ (void)a; /* UNUSED */
+ (void)entry; /* UNUSED */
+ (void)fd; /* UNUSED */
+ return (ARCHIVE_OK);
+}
+
+#endif
diff --git a/lib/libarchive/archive_read_disk_private.h b/contrib/libarchive/libarchive/archive_read_disk_private.h
index 3e8884b..3e8884b 100644
--- a/lib/libarchive/archive_read_disk_private.h
+++ b/contrib/libarchive/libarchive/archive_read_disk_private.h
diff --git a/lib/libarchive/archive_read_disk_set_standard_lookup.c b/contrib/libarchive/libarchive/archive_read_disk_set_standard_lookup.c
index 45f8b43..45f8b43 100644
--- a/lib/libarchive/archive_read_disk_set_standard_lookup.c
+++ b/contrib/libarchive/libarchive/archive_read_disk_set_standard_lookup.c
diff --git a/contrib/libarchive/libarchive/archive_read_extract.c b/contrib/libarchive/libarchive/archive_read_extract.c
new file mode 100644
index 0000000..5c69f59
--- /dev/null
+++ b/contrib/libarchive/libarchive/archive_read_extract.c
@@ -0,0 +1,180 @@
+/*-
+ * Copyright (c) 2003-2007 Tim Kientzle
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "archive_platform.h"
+__FBSDID("$FreeBSD$");
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+#include "archive.h"
+#include "archive_entry.h"
+#include "archive_private.h"
+#include "archive_read_private.h"
+#include "archive_write_disk_private.h"
+
+struct extract {
+ struct archive *ad; /* archive_write_disk object */
+
+ /* Progress function invoked during extract. */
+ void (*extract_progress)(void *);
+ void *extract_progress_user_data;
+};
+
+static int archive_read_extract_cleanup(struct archive_read *);
+static int copy_data(struct archive *ar, struct archive *aw);
+static struct extract *get_extract(struct archive_read *);
+
+static struct extract *
+get_extract(struct archive_read *a)
+{
+ /* If we haven't initialized, do it now. */
+ /* This also sets up a lot of global state. */
+ if (a->extract == NULL) {
+ a->extract = (struct extract *)malloc(sizeof(*a->extract));
+ if (a->extract == NULL) {
+ archive_set_error(&a->archive, ENOMEM, "Can't extract");
+ return (NULL);
+ }
+ memset(a->extract, 0, sizeof(*a->extract));
+ a->extract->ad = archive_write_disk_new();
+ if (a->extract->ad == NULL) {
+ archive_set_error(&a->archive, ENOMEM, "Can't extract");
+ return (NULL);
+ }
+ archive_write_disk_set_standard_lookup(a->extract->ad);
+ a->cleanup_archive_extract = archive_read_extract_cleanup;
+ }
+ return (a->extract);
+}
+
+int
+archive_read_extract(struct archive *_a, struct archive_entry *entry, int flags)
+{
+ struct extract *extract;
+
+ extract = get_extract((struct archive_read *)_a);
+ if (extract == NULL)
+ return (ARCHIVE_FATAL);
+ archive_write_disk_set_options(extract->ad, flags);
+ return (archive_read_extract2(_a, entry, extract->ad));
+}
+
+int
+archive_read_extract2(struct archive *_a, struct archive_entry *entry,
+ struct archive *ad)
+{
+ struct archive_read *a = (struct archive_read *)_a;
+ int r, r2;
+
+ /* Set up for this particular entry. */
+ archive_write_disk_set_skip_file(ad,
+ a->skip_file_dev, a->skip_file_ino);
+ r = archive_write_header(ad, entry);
+ if (r < ARCHIVE_WARN)
+ r = ARCHIVE_WARN;
+ if (r != ARCHIVE_OK)
+ /* If _write_header failed, copy the error. */
+ archive_copy_error(&a->archive, ad);
+ else if (!archive_entry_size_is_set(entry) || archive_entry_size(entry) > 0)
+ /* Otherwise, pour data into the entry. */
+ r = copy_data(_a, ad);
+ r2 = archive_write_finish_entry(ad);
+ if (r2 < ARCHIVE_WARN)
+ r2 = ARCHIVE_WARN;
+ /* Use the first message. */
+ if (r2 != ARCHIVE_OK && r == ARCHIVE_OK)
+ archive_copy_error(&a->archive, ad);
+ /* Use the worst error return. */
+ if (r2 < r)
+ r = r2;
+ return (r);
+}
+
+void
+archive_read_extract_set_progress_callback(struct archive *_a,
+ void (*progress_func)(void *), void *user_data)
+{
+ struct archive_read *a = (struct archive_read *)_a;
+ struct extract *extract = get_extract(a);
+ if (extract != NULL) {
+ extract->extract_progress = progress_func;
+ extract->extract_progress_user_data = user_data;
+ }
+}
+
+static int
+copy_data(struct archive *ar, struct archive *aw)
+{
+ off_t offset;
+ const void *buff;
+ struct extract *extract;
+ size_t size;
+ int r;
+
+ extract = get_extract((struct archive_read *)ar);
+ for (;;) {
+ r = archive_read_data_block(ar, &buff, &size, &offset);
+ if (r == ARCHIVE_EOF)
+ return (ARCHIVE_OK);
+ if (r != ARCHIVE_OK)
+ return (r);
+ r = archive_write_data_block(aw, buff, size, offset);
+ if (r < ARCHIVE_WARN)
+ r = ARCHIVE_WARN;
+ if (r != ARCHIVE_OK) {
+ archive_set_error(ar, archive_errno(aw),
+ "%s", archive_error_string(aw));
+ return (r);
+ }
+ if (extract->extract_progress)
+ (extract->extract_progress)
+ (extract->extract_progress_user_data);
+ }
+}
+
+/*
+ * Cleanup function for archive_extract.
+ */
+static int
+archive_read_extract_cleanup(struct archive_read *a)
+{
+ int ret = ARCHIVE_OK;
+
+ ret = archive_write_free(a->extract->ad);
+ free(a->extract);
+ a->extract = NULL;
+ return (ret);
+}
diff --git a/lib/libarchive/archive_read_open_fd.c b/contrib/libarchive/libarchive/archive_read_open_fd.c
index 90e764a..90e764a 100644
--- a/lib/libarchive/archive_read_open_fd.c
+++ b/contrib/libarchive/libarchive/archive_read_open_fd.c
diff --git a/lib/libarchive/archive_read_open_file.c b/contrib/libarchive/libarchive/archive_read_open_file.c
index 1575f94..1575f94 100644
--- a/lib/libarchive/archive_read_open_file.c
+++ b/contrib/libarchive/libarchive/archive_read_open_file.c
diff --git a/lib/libarchive/archive_read_open_filename.c b/contrib/libarchive/libarchive/archive_read_open_filename.c
index 3d6c5dc..3d6c5dc 100644
--- a/lib/libarchive/archive_read_open_filename.c
+++ b/contrib/libarchive/libarchive/archive_read_open_filename.c
diff --git a/lib/libarchive/archive_read_open_memory.c b/contrib/libarchive/libarchive/archive_read_open_memory.c
index 7f52117..7f52117 100644
--- a/lib/libarchive/archive_read_open_memory.c
+++ b/contrib/libarchive/libarchive/archive_read_open_memory.c
diff --git a/lib/libarchive/archive_read_private.h b/contrib/libarchive/libarchive/archive_read_private.h
index ed8a889..ed8a889 100644
--- a/lib/libarchive/archive_read_private.h
+++ b/contrib/libarchive/libarchive/archive_read_private.h
diff --git a/lib/libarchive/archive_read_support_compression_all.c b/contrib/libarchive/libarchive/archive_read_support_compression_all.c
index 484e557..484e557 100644
--- a/lib/libarchive/archive_read_support_compression_all.c
+++ b/contrib/libarchive/libarchive/archive_read_support_compression_all.c
diff --git a/contrib/libarchive/libarchive/archive_read_support_compression_bzip2.c b/contrib/libarchive/libarchive/archive_read_support_compression_bzip2.c
new file mode 100644
index 0000000..891742f
--- /dev/null
+++ b/contrib/libarchive/libarchive/archive_read_support_compression_bzip2.c
@@ -0,0 +1,353 @@
+/*-
+ * Copyright (c) 2003-2007 Tim Kientzle
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "archive_platform.h"
+
+__FBSDID("$FreeBSD$");
+
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <stdio.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_BZLIB_H
+#include <bzlib.h>
+#endif
+
+#include "archive.h"
+#include "archive_private.h"
+#include "archive_read_private.h"
+
+#if defined(HAVE_BZLIB_H) && defined(BZ_CONFIG_ERROR)
+struct private_data {
+ bz_stream stream;
+ char *out_block;
+ size_t out_block_size;
+ char valid; /* True = decompressor is initialized */
+ char eof; /* True = found end of compressed data. */
+};
+
+/* Bzip2 filter */
+static ssize_t bzip2_filter_read(struct archive_read_filter *, const void **);
+static int bzip2_filter_close(struct archive_read_filter *);
+#endif
+
+/*
+ * Note that we can detect bzip2 archives even if we can't decompress
+ * them. (In fact, we like detecting them because we can give better
+ * error messages.) So the bid framework here gets compiled even
+ * if bzlib is unavailable.
+ */
+static int bzip2_reader_bid(struct archive_read_filter_bidder *, struct archive_read_filter *);
+static int bzip2_reader_init(struct archive_read_filter *);
+static int bzip2_reader_free(struct archive_read_filter_bidder *);
+
+int
+archive_read_support_compression_bzip2(struct archive *_a)
+{
+ struct archive_read *a = (struct archive_read *)_a;
+ struct archive_read_filter_bidder *reader = __archive_read_get_bidder(a);
+
+ if (reader == NULL)
+ return (ARCHIVE_FATAL);
+
+ reader->data = NULL;
+ reader->bid = bzip2_reader_bid;
+ reader->init = bzip2_reader_init;
+ reader->options = NULL;
+ reader->free = bzip2_reader_free;
+#if defined(HAVE_BZLIB_H) && defined(BZ_CONFIG_ERROR)
+ return (ARCHIVE_OK);
+#else
+ archive_set_error(_a, ARCHIVE_ERRNO_MISC,
+ "Using external bunzip2 program");
+ return (ARCHIVE_WARN);
+#endif
+}
+
+static int
+bzip2_reader_free(struct archive_read_filter_bidder *self){
+ (void)self; /* UNUSED */
+ return (ARCHIVE_OK);
+}
+
+/*
+ * Test whether we can handle this data.
+ *
+ * This logic returns zero if any part of the signature fails. It
+ * also tries to Do The Right Thing if a very short buffer prevents us
+ * from verifying as much as we would like.
+ */
+static int
+bzip2_reader_bid(struct archive_read_filter_bidder *self, struct archive_read_filter *filter)
+{
+ const unsigned char *buffer;
+ ssize_t avail;
+ int bits_checked;
+
+ (void)self; /* UNUSED */
+
+ /* Minimal bzip2 archive is 14 bytes. */
+ buffer = __archive_read_filter_ahead(filter, 14, &avail);
+ if (buffer == NULL)
+ return (0);
+
+ /* First three bytes must be "BZh" */
+ bits_checked = 0;
+ if (buffer[0] != 'B' || buffer[1] != 'Z' || buffer[2] != 'h')
+ return (0);
+ bits_checked += 24;
+
+ /* Next follows a compression flag which must be an ASCII digit. */
+ if (buffer[3] < '1' || buffer[3] > '9')
+ return (0);
+ bits_checked += 5;
+
+ /* After BZh[1-9], there must be either a data block
+ * which begins with 0x314159265359 or an end-of-data
+ * marker of 0x177245385090. */
+ if (memcmp(buffer + 4, "\x31\x41\x59\x26\x53\x59", 6) == 0)
+ bits_checked += 48;
+ else if (memcmp(buffer + 4, "\x17\x72\x45\x38\x50\x90", 6) == 0)
+ bits_checked += 48;
+ else
+ return (0);
+
+ return (bits_checked);
+}
+
+#if !defined(HAVE_BZLIB_H) || !defined(BZ_CONFIG_ERROR)
+
+/*
+ * If we don't have the library on this system, we can't actually do the
+ * decompression. We can, however, still detect compressed archives
+ * and emit a useful message.
+ */
+static int
+bzip2_reader_init(struct archive_read_filter *self)
+{
+ int r;
+
+ r = __archive_read_program(self, "bunzip2");
+ /* Note: We set the format here even if __archive_read_program()
+ * above fails. We do, after all, know what the format is
+ * even if we weren't able to read it. */
+ self->code = ARCHIVE_COMPRESSION_BZIP2;
+ self->name = "bzip2";
+ return (r);
+}
+
+
+#else
+
+/*
+ * Setup the callbacks.
+ */
+static int
+bzip2_reader_init(struct archive_read_filter *self)
+{
+ static const size_t out_block_size = 64 * 1024;
+ void *out_block;
+ struct private_data *state;
+
+ self->code = ARCHIVE_COMPRESSION_BZIP2;
+ self->name = "bzip2";
+
+ state = (struct private_data *)calloc(sizeof(*state), 1);
+ out_block = (unsigned char *)malloc(out_block_size);
+ if (self == NULL || state == NULL || out_block == NULL) {
+ archive_set_error(&self->archive->archive, ENOMEM,
+ "Can't allocate data for bzip2 decompression");
+ free(out_block);
+ free(state);
+ return (ARCHIVE_FATAL);
+ }
+
+ self->data = state;
+ state->out_block_size = out_block_size;
+ state->out_block = out_block;
+ self->read = bzip2_filter_read;
+ self->skip = NULL; /* not supported */
+ self->close = bzip2_filter_close;
+
+ return (ARCHIVE_OK);
+}
+
+/*
+ * Return the next block of decompressed data.
+ */
+static ssize_t
+bzip2_filter_read(struct archive_read_filter *self, const void **p)
+{
+ struct private_data *state;
+ size_t decompressed;
+ const char *read_buf;
+ ssize_t ret;
+
+ state = (struct private_data *)self->data;
+
+ if (state->eof) {
+ *p = NULL;
+ return (0);
+ }
+
+ /* Empty our output buffer. */
+ state->stream.next_out = state->out_block;
+ state->stream.avail_out = state->out_block_size;
+
+ /* Try to fill the output buffer. */
+ for (;;) {
+ if (!state->valid) {
+ if (bzip2_reader_bid(self->bidder, self->upstream) == 0) {
+ state->eof = 1;
+ *p = state->out_block;
+ decompressed = state->stream.next_out
+ - state->out_block;
+ return (decompressed);
+ }
+ /* Initialize compression library. */
+ ret = BZ2_bzDecompressInit(&(state->stream),
+ 0 /* library verbosity */,
+ 0 /* don't use low-mem algorithm */);
+
+ /* If init fails, try low-memory algorithm instead. */
+ if (ret == BZ_MEM_ERROR)
+ ret = BZ2_bzDecompressInit(&(state->stream),
+ 0 /* library verbosity */,
+ 1 /* do use low-mem algo */);
+
+ if (ret != BZ_OK) {
+ const char *detail = NULL;
+ int err = ARCHIVE_ERRNO_MISC;
+ switch (ret) {
+ case BZ_PARAM_ERROR:
+ detail = "invalid setup parameter";
+ break;
+ case BZ_MEM_ERROR:
+ err = ENOMEM;
+ detail = "out of memory";
+ break;
+ case BZ_CONFIG_ERROR:
+ detail = "mis-compiled library";
+ break;
+ }
+ archive_set_error(&self->archive->archive, err,
+ "Internal error initializing decompressor%s%s",
+ detail == NULL ? "" : ": ",
+ detail);
+ return (ARCHIVE_FATAL);
+ }
+ state->valid = 1;
+ }
+
+ /* stream.next_in is really const, but bzlib
+ * doesn't declare it so. <sigh> */
+ read_buf =
+ __archive_read_filter_ahead(self->upstream, 1, &ret);
+ if (read_buf == NULL)
+ return (ARCHIVE_FATAL);
+ state->stream.next_in = (char *)(uintptr_t)read_buf;
+ state->stream.avail_in = ret;
+ /* There is no more data, return whatever we have. */
+ if (ret == 0) {
+ state->eof = 1;
+ *p = state->out_block;
+ decompressed = state->stream.next_out
+ - state->out_block;
+ return (decompressed);
+ }
+
+ /* Decompress as much as we can in one pass. */
+ ret = BZ2_bzDecompress(&(state->stream));
+ __archive_read_filter_consume(self->upstream,
+ state->stream.next_in - read_buf);
+
+ switch (ret) {
+ case BZ_STREAM_END: /* Found end of stream. */
+ switch (BZ2_bzDecompressEnd(&(state->stream))) {
+ case BZ_OK:
+ break;
+ default:
+ archive_set_error(&(self->archive->archive),
+ ARCHIVE_ERRNO_MISC,
+ "Failed to clean up decompressor");
+ return (ARCHIVE_FATAL);
+ }
+ state->valid = 0;
+ /* FALLTHROUGH */
+ case BZ_OK: /* Decompressor made some progress. */
+ /* If we filled our buffer, update stats and return. */
+ if (state->stream.avail_out == 0) {
+ *p = state->out_block;
+ decompressed = state->stream.next_out
+ - state->out_block;
+ return (decompressed);
+ }
+ break;
+ default: /* Return an error. */
+ archive_set_error(&self->archive->archive,
+ ARCHIVE_ERRNO_MISC, "bzip decompression failed");
+ return (ARCHIVE_FATAL);
+ }
+ }
+}
+
+/*
+ * Clean up the decompressor.
+ */
+static int
+bzip2_filter_close(struct archive_read_filter *self)
+{
+ struct private_data *state;
+ int ret = ARCHIVE_OK;
+
+ state = (struct private_data *)self->data;
+
+ if (state->valid) {
+ switch (BZ2_bzDecompressEnd(&state->stream)) {
+ case BZ_OK:
+ break;
+ default:
+ archive_set_error(&self->archive->archive,
+ ARCHIVE_ERRNO_MISC,
+ "Failed to clean up decompressor");
+ ret = ARCHIVE_FATAL;
+ }
+ }
+
+ free(state->out_block);
+ free(state);
+ return (ret);
+}
+
+#endif /* HAVE_BZLIB_H && BZ_CONFIG_ERROR */
diff --git a/lib/libarchive/archive_read_support_compression_compress.c b/contrib/libarchive/libarchive/archive_read_support_compression_compress.c
index c6d4e85..c6d4e85 100644
--- a/lib/libarchive/archive_read_support_compression_compress.c
+++ b/contrib/libarchive/libarchive/archive_read_support_compression_compress.c
diff --git a/lib/libarchive/archive_read_support_compression_gzip.c b/contrib/libarchive/libarchive/archive_read_support_compression_gzip.c
index bf6ee46..bf6ee46 100644
--- a/lib/libarchive/archive_read_support_compression_gzip.c
+++ b/contrib/libarchive/libarchive/archive_read_support_compression_gzip.c
diff --git a/lib/libarchive/archive_read_support_compression_none.c b/contrib/libarchive/libarchive/archive_read_support_compression_none.c
index e05614f..e05614f 100644
--- a/lib/libarchive/archive_read_support_compression_none.c
+++ b/contrib/libarchive/libarchive/archive_read_support_compression_none.c
diff --git a/lib/libarchive/archive_read_support_compression_program.c b/contrib/libarchive/libarchive/archive_read_support_compression_program.c
index 01552ba..01552ba 100644
--- a/lib/libarchive/archive_read_support_compression_program.c
+++ b/contrib/libarchive/libarchive/archive_read_support_compression_program.c
diff --git a/contrib/libarchive/libarchive/archive_read_support_compression_rpm.c b/contrib/libarchive/libarchive/archive_read_support_compression_rpm.c
new file mode 100644
index 0000000..051baa5
--- /dev/null
+++ b/contrib/libarchive/libarchive/archive_read_support_compression_rpm.c
@@ -0,0 +1,287 @@
+/*-
+ * Copyright (c) 2009 Michihiro NAKAJIMA
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "archive_platform.h"
+
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#include "archive.h"
+#include "archive_endian.h"
+#include "archive_private.h"
+#include "archive_read_private.h"
+
+struct rpm {
+ int64_t total_in;
+ size_t hpos;
+ size_t hlen;
+ unsigned char header[16];
+ enum {
+ ST_LEAD, /* Skipping 'Lead' section. */
+ ST_HEADER, /* Reading 'Header' section;
+ * first 16 bytes. */
+ ST_HEADER_DATA, /* Skipping 'Header' section. */
+ ST_PADDING, /* Skipping padding data after the
+ * 'Header' section. */
+ ST_ARCHIVE /* Reading 'Archive' section. */
+ } state;
+ int first_header;
+};
+#define RPM_LEAD_SIZE 96 /* Size of 'Lead' section. */
+
+static int rpm_bidder_bid(struct archive_read_filter_bidder *,
+ struct archive_read_filter *);
+static int rpm_bidder_init(struct archive_read_filter *);
+
+static ssize_t rpm_filter_read(struct archive_read_filter *,
+ const void **);
+static int rpm_filter_close(struct archive_read_filter *);
+
+int
+archive_read_support_compression_rpm(struct archive *_a)
+{
+ struct archive_read *a = (struct archive_read *)_a;
+ struct archive_read_filter_bidder *bidder;
+
+ bidder = __archive_read_get_bidder(a);
+ archive_clear_error(_a);
+ if (bidder == NULL)
+ return (ARCHIVE_FATAL);
+
+ bidder->data = NULL;
+ bidder->bid = rpm_bidder_bid;
+ bidder->init = rpm_bidder_init;
+ bidder->options = NULL;
+ bidder->free = NULL;
+ return (ARCHIVE_OK);
+}
+
+static int
+rpm_bidder_bid(struct archive_read_filter_bidder *self,
+ struct archive_read_filter *filter)
+{
+ const unsigned char *b;
+ ssize_t avail;
+ int bits_checked;
+
+ (void)self; /* UNUSED */
+
+ b = __archive_read_filter_ahead(filter, 8, &avail);
+ if (b == NULL)
+ return (0);
+
+ bits_checked = 0;
+ /*
+ * Verify Header Magic Bytes : 0xed 0xab 0xee 0xdb
+ */
+ if (b[0] != 0xed)
+ return (0);
+ bits_checked += 8;
+ if (b[1] != 0xab)
+ return (0);
+ bits_checked += 8;
+ if (b[2] != 0xee)
+ return (0);
+ bits_checked += 8;
+ if (b[3] != 0xdb)
+ return (0);
+ bits_checked += 8;
+ /*
+ * Check major version.
+ */
+ if (b[4] != 3 && b[4] != 4)
+ return (0);
+ bits_checked += 8;
+ /*
+ * Check package type; binary or source.
+ */
+ if (b[6] != 0)
+ return (0);
+ bits_checked += 8;
+ if (b[7] != 0 && b[7] != 1)
+ return (0);
+ bits_checked += 8;
+
+ return (bits_checked);
+}
+
+static int
+rpm_bidder_init(struct archive_read_filter *self)
+{
+ struct rpm *rpm;
+
+ self->code = ARCHIVE_COMPRESSION_RPM;
+ self->name = "rpm";
+ self->read = rpm_filter_read;
+ self->skip = NULL; /* not supported */
+ self->close = rpm_filter_close;
+
+ rpm = (struct rpm *)calloc(sizeof(*rpm), 1);
+ if (rpm == NULL) {
+ archive_set_error(&self->archive->archive, ENOMEM,
+ "Can't allocate data for rpm");
+ return (ARCHIVE_FATAL);
+ }
+
+ self->data = rpm;
+ rpm->state = ST_LEAD;
+
+ return (ARCHIVE_OK);
+}
+
+static ssize_t
+rpm_filter_read(struct archive_read_filter *self, const void **buff)
+{
+ struct rpm *rpm;
+ const unsigned char *b;
+ ssize_t avail_in, total;
+ size_t used, n;
+ uint32_t section;
+ uint32_t bytes;
+
+ rpm = (struct rpm *)self->data;
+ *buff = NULL;
+ total = avail_in = 0;
+ b = NULL;
+ used = 0;
+ do {
+ if (b == NULL) {
+ b = __archive_read_filter_ahead(self->upstream, 1,
+ &avail_in);
+ if (b == NULL) {
+ if (avail_in < 0)
+ return (ARCHIVE_FATAL);
+ else
+ break;
+ }
+ }
+
+ switch (rpm->state) {
+ case ST_LEAD:
+ if (rpm->total_in + avail_in < RPM_LEAD_SIZE)
+ used += avail_in;
+ else {
+ n = RPM_LEAD_SIZE - rpm->total_in;
+ used += n;
+ b += n;
+ rpm->state = ST_HEADER;
+ rpm->hpos = 0;
+ rpm->hlen = 0;
+ rpm->first_header = 1;
+ }
+ break;
+ case ST_HEADER:
+ n = 16 - rpm->hpos;
+ if (n > avail_in - used)
+ n = avail_in - used;
+ memcpy(rpm->header+rpm->hpos, b, n);
+ b += n;
+ used += n;
+ rpm->hpos += n;
+
+ if (rpm->hpos == 16) {
+ if (rpm->header[0] != 0x8e ||
+ rpm->header[1] != 0xad ||
+ rpm->header[2] != 0xe8 ||
+ rpm->header[3] != 0x01) {
+ if (rpm->first_header) {
+ archive_set_error(
+ &self->archive->archive,
+ ARCHIVE_ERRNO_FILE_FORMAT,
+ "Unrecoginized rpm header");
+ return (ARCHIVE_FATAL);
+ }
+ rpm->state = ST_ARCHIVE;
+ *buff = rpm->header;
+ total = rpm->hpos;
+ break;
+ }
+ /* Calculate 'Header' length. */
+ section = archive_be32dec(rpm->header+8);
+ bytes = archive_be32dec(rpm->header+12);
+ rpm->hlen = 16 + section * 16 + bytes;
+ rpm->state = ST_HEADER_DATA;
+ rpm->first_header = 0;
+ }
+ break;
+ case ST_HEADER_DATA:
+ n = rpm->hlen - rpm->hpos;
+ if (n > avail_in - used)
+ n = avail_in - used;
+ b += n;
+ used += n;
+ rpm->hpos += n;
+ if (rpm->hpos == rpm->hlen)
+ rpm->state = ST_PADDING;
+ break;
+ case ST_PADDING:
+ while (used < (size_t)avail_in) {
+ if (*b != 0) {
+ /* Read next header. */
+ rpm->state = ST_HEADER;
+ rpm->hpos = 0;
+ rpm->hlen = 0;
+ break;
+ }
+ b++;
+ used++;
+ }
+ break;
+ case ST_ARCHIVE:
+ *buff = b;
+ total = avail_in;
+ used = avail_in;
+ break;
+ }
+ if (used == (size_t)avail_in) {
+ rpm->total_in += used;
+ __archive_read_filter_consume(self->upstream, used);
+ b = NULL;
+ used = 0;
+ }
+ } while (total == 0 && avail_in > 0);
+
+ if (used > 0 && b != NULL) {
+ rpm->total_in += used;
+ __archive_read_filter_consume(self->upstream, used);
+ }
+ return (total);
+}
+
+static int
+rpm_filter_close(struct archive_read_filter *self)
+{
+ struct rpm *rpm;
+
+ rpm = (struct rpm *)self->data;
+ free(rpm);
+
+ return (ARCHIVE_OK);
+}
+
diff --git a/contrib/libarchive/libarchive/archive_read_support_compression_uu.c b/contrib/libarchive/libarchive/archive_read_support_compression_uu.c
new file mode 100644
index 0000000..1b6a54c
--- /dev/null
+++ b/contrib/libarchive/libarchive/archive_read_support_compression_uu.c
@@ -0,0 +1,637 @@
+/*-
+ * Copyright (c) 2009 Michihiro NAKAJIMA
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "archive_platform.h"
+__FBSDID("$FreeBSD$");
+
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+#include "archive.h"
+#include "archive_private.h"
+#include "archive_read_private.h"
+
+struct uudecode {
+ int64_t total;
+ unsigned char *in_buff;
+#define IN_BUFF_SIZE (1024)
+ int in_cnt;
+ size_t in_allocated;
+ unsigned char *out_buff;
+#define OUT_BUFF_SIZE (64 * 1024)
+ int state;
+#define ST_FIND_HEAD 0
+#define ST_READ_UU 1
+#define ST_UUEND 2
+#define ST_READ_BASE64 3
+};
+
+static int uudecode_bidder_bid(struct archive_read_filter_bidder *,
+ struct archive_read_filter *filter);
+static int uudecode_bidder_init(struct archive_read_filter *);
+
+static ssize_t uudecode_filter_read(struct archive_read_filter *,
+ const void **);
+static int uudecode_filter_close(struct archive_read_filter *);
+
+int
+archive_read_support_compression_uu(struct archive *_a)
+{
+ struct archive_read *a = (struct archive_read *)_a;
+ struct archive_read_filter_bidder *bidder;
+
+ bidder = __archive_read_get_bidder(a);
+ archive_clear_error(_a);
+ if (bidder == NULL)
+ return (ARCHIVE_FATAL);
+
+ bidder->data = NULL;
+ bidder->bid = uudecode_bidder_bid;
+ bidder->init = uudecode_bidder_init;
+ bidder->options = NULL;
+ bidder->free = NULL;
+ return (ARCHIVE_OK);
+}
+
+static const unsigned char ascii[256] = {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '\n', 0, 0, '\r', 0, 0, /* 00 - 0F */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 10 - 1F */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 20 - 2F */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 30 - 3F */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 40 - 4F */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 50 - 5F */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 60 - 6F */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, /* 70 - 7F */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 80 - 8F */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 90 - 9F */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* A0 - AF */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* B0 - BF */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* C0 - CF */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* D0 - DF */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* E0 - EF */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* F0 - FF */
+};
+
+static const unsigned char uuchar[256] = {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 00 - 0F */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 10 - 1F */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 20 - 2F */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 30 - 3F */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 40 - 4F */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 50 - 5F */
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 60 - 6F */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 70 - 7F */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 80 - 8F */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 90 - 9F */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* A0 - AF */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* B0 - BF */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* C0 - CF */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* D0 - DF */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* E0 - EF */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* F0 - FF */
+};
+
+static const unsigned char base64[256] = {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 00 - 0F */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 10 - 1F */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, /* 20 - 2F */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, /* 30 - 3F */
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 40 - 4F */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, /* 50 - 5F */
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 60 - 6F */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, /* 70 - 7F */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 80 - 8F */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 90 - 9F */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* A0 - AF */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* B0 - BF */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* C0 - CF */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* D0 - DF */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* E0 - EF */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* F0 - FF */
+};
+
+static const int base64num[128] = {
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, /* 00 - 0F */
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, /* 10 - 1F */
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 62, 0, 0, 0, 63, /* 20 - 2F */
+ 52, 53, 54, 55, 56, 57, 58, 59,
+ 60, 61, 0, 0, 0, 0, 0, 0, /* 30 - 3F */
+ 0, 0, 1, 2, 3, 4, 5, 6,
+ 7, 8, 9, 10, 11, 12, 13, 14, /* 40 - 4F */
+ 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 24, 25, 0, 0, 0, 0, 0, /* 50 - 5F */
+ 0, 26, 27, 28, 29, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, /* 60 - 6F */
+ 41, 42, 43, 44, 45, 46, 47, 48,
+ 49, 50, 51, 0, 0, 0, 0, 0, /* 70 - 7F */
+};
+
+static ssize_t
+get_line(const unsigned char *b, ssize_t avail, ssize_t *nlsize)
+{
+ ssize_t len;
+
+ len = 0;
+ while (len < avail) {
+ switch (ascii[*b]) {
+ case 0: /* Non-ascii character or control character. */
+ if (nlsize != NULL)
+ *nlsize = 0;
+ return (-1);
+ case '\r':
+ if (avail-len > 1 && b[1] == '\n') {
+ if (nlsize != NULL)
+ *nlsize = 2;
+ return (len+2);
+ }
+ /* FALL THROUGH */
+ case '\n':
+ if (nlsize != NULL)
+ *nlsize = 1;
+ return (len+1);
+ case 1:
+ b++;
+ len++;
+ break;
+ }
+ }
+ if (nlsize != NULL)
+ *nlsize = 0;
+ return (avail);
+}
+
+static ssize_t
+bid_get_line(struct archive_read_filter *filter,
+ const unsigned char **b, ssize_t *avail, ssize_t *ravail, ssize_t *nl)
+{
+ ssize_t len;
+ int quit;
+
+ quit = 0;
+ if (*avail == 0) {
+ *nl = 0;
+ len = 0;
+ } else
+ len = get_line(*b, *avail, nl);
+ /*
+ * Read bytes more while it does not reach the end of line.
+ */
+ while (*nl == 0 && len == *avail && !quit) {
+ ssize_t diff = *ravail - *avail;
+
+ *b = __archive_read_filter_ahead(filter, 160 + *ravail, avail);
+ if (*b == NULL) {
+ if (*ravail >= *avail)
+ return (0);
+ /* Reading bytes reaches the end of file. */
+ *b = __archive_read_filter_ahead(filter, *avail, avail);
+ quit = 1;
+ }
+ *ravail = *avail;
+ *b += diff;
+ *avail -= diff;
+ len = get_line(*b, *avail, nl);
+ }
+ return (len);
+}
+
+#define UUDECODE(c) (((c) - 0x20) & 0x3f)
+
+static int
+uudecode_bidder_bid(struct archive_read_filter_bidder *self,
+ struct archive_read_filter *filter)
+{
+ const unsigned char *b;
+ ssize_t avail, ravail;
+ ssize_t len, nl;
+ int l;
+ int firstline;
+
+ (void)self; /* UNUSED */
+
+ b = __archive_read_filter_ahead(filter, 1, &avail);
+ if (b == NULL)
+ return (0);
+
+ firstline = 20;
+ ravail = avail;
+ for (;;) {
+ len = bid_get_line(filter, &b, &avail, &ravail, &nl);
+ if (len < 0 || nl == 0)
+ return (0);/* Binary data. */
+ if (memcmp(b, "begin ", 6) == 0 && len - nl >= 11)
+ l = 6;
+ else if (memcmp(b, "begin-base64 ", 13) == 0 && len - nl >= 18)
+ l = 13;
+ else
+ l = 0;
+
+ if (l > 0 && (b[l] < '0' || b[l] > '7' ||
+ b[l+1] < '0' || b[l+1] > '7' ||
+ b[l+2] < '0' || b[l+2] > '7' || b[l+3] != ' '))
+ l = 0;
+
+ b += len;
+ avail -= len;
+ if (l)
+ break;
+ firstline = 0;
+ }
+ if (!avail)
+ return (0);
+ len = bid_get_line(filter, &b, &avail, &ravail, &nl);
+ if (len < 0 || nl == 0)
+ return (0);/* There are non-ascii characters. */
+ avail -= len;
+
+ if (l == 6) {
+ if (!uuchar[*b])
+ return (0);
+ /* Get a length of decoded bytes. */
+ l = UUDECODE(*b++); len--;
+ if (l > 45)
+ /* Normally, maximum length is 45(character 'M'). */
+ return (0);
+ while (l && len-nl > 0) {
+ if (l > 0) {
+ if (!uuchar[*b++])
+ return (0);
+ if (!uuchar[*b++])
+ return (0);
+ len -= 2;
+ --l;
+ }
+ if (l > 0) {
+ if (!uuchar[*b++])
+ return (0);
+ --len;
+ --l;
+ }
+ if (l > 0) {
+ if (!uuchar[*b++])
+ return (0);
+ --len;
+ --l;
+ }
+ }
+ if (len-nl < 0)
+ return (0);
+ if (len-nl == 1 &&
+ (uuchar[*b] || /* Check sum. */
+ (*b >= 'a' && *b <= 'z'))) {/* Padding data(MINIX). */
+ ++b;
+ --len;
+ }
+ b += nl;
+ if (avail && uuchar[*b])
+ return (firstline+30);
+ }
+ if (l == 13) {
+ while (len-nl > 0) {
+ if (!base64[*b++])
+ return (0);
+ --len;
+ }
+ b += nl;
+
+ if (avail >= 5 && memcmp(b, "====\n", 5) == 0)
+ return (firstline+40);
+ if (avail >= 6 && memcmp(b, "====\r\n", 6) == 0)
+ return (firstline+40);
+ if (avail > 0 && base64[*b])
+ return (firstline+30);
+ }
+
+ return (0);
+}
+
+static int
+uudecode_bidder_init(struct archive_read_filter *self)
+{
+ struct uudecode *uudecode;
+ void *out_buff;
+ void *in_buff;
+
+ self->code = ARCHIVE_COMPRESSION_UU;
+ self->name = "uu";
+ self->read = uudecode_filter_read;
+ self->skip = NULL; /* not supported */
+ self->close = uudecode_filter_close;
+
+ uudecode = (struct uudecode *)calloc(sizeof(*uudecode), 1);
+ out_buff = malloc(OUT_BUFF_SIZE);
+ in_buff = malloc(IN_BUFF_SIZE);
+ if (uudecode == NULL || out_buff == NULL || in_buff == NULL) {
+ archive_set_error(&self->archive->archive, ENOMEM,
+ "Can't allocate data for uudecode");
+ free(uudecode);
+ free(out_buff);
+ free(in_buff);
+ return (ARCHIVE_FATAL);
+ }
+
+ self->data = uudecode;
+ uudecode->in_buff = in_buff;
+ uudecode->in_cnt = 0;
+ uudecode->in_allocated = IN_BUFF_SIZE;
+ uudecode->out_buff = out_buff;
+ uudecode->state = ST_FIND_HEAD;
+
+ return (ARCHIVE_OK);
+}
+
+static int
+ensure_in_buff_size(struct archive_read_filter *self,
+ struct uudecode *uudecode, size_t size)
+{
+
+ if (size > uudecode->in_allocated) {
+ unsigned char *ptr;
+ size_t newsize;
+
+ /*
+ * Calculate a new buffer size for in_buff.
+ * Increase its value until it has enough size we need.
+ */
+ newsize = uudecode->in_allocated;
+ do {
+ if (newsize < IN_BUFF_SIZE*32)
+ newsize <<= 1;
+ else
+ newsize += IN_BUFF_SIZE;
+ } while (size > newsize);
+ ptr = malloc(newsize);
+ if (ptr == NULL ||
+ newsize < uudecode->in_allocated) {
+ free(ptr);
+ archive_set_error(&self->archive->archive,
+ ENOMEM,
+ "Can't allocate data for uudecode");
+ return (ARCHIVE_FATAL);
+ }
+ if (uudecode->in_cnt)
+ memmove(ptr, uudecode->in_buff,
+ uudecode->in_cnt);
+ free(uudecode->in_buff);
+ uudecode->in_buff = ptr;
+ uudecode->in_allocated = newsize;
+ }
+ return (ARCHIVE_OK);
+}
+
+static ssize_t
+uudecode_filter_read(struct archive_read_filter *self, const void **buff)
+{
+ struct uudecode *uudecode;
+ const unsigned char *b, *d;
+ unsigned char *out;
+ ssize_t avail_in, ravail;
+ ssize_t used;
+ ssize_t total;
+ ssize_t len, llen, nl;
+
+ uudecode = (struct uudecode *)self->data;
+
+read_more:
+ d = __archive_read_filter_ahead(self->upstream, 1, &avail_in);
+ if (d == NULL && avail_in < 0)
+ return (ARCHIVE_FATAL);
+ /* Quiet a code analyzer; make sure avail_in must be zero
+ * when d is NULL. */
+ if (d == NULL)
+ avail_in = 0;
+ used = 0;
+ total = 0;
+ out = uudecode->out_buff;
+ ravail = avail_in;
+ if (uudecode->in_cnt) {
+ /*
+ * If there is remaining data which is saved by
+ * previous calling, use it first.
+ */
+ if (ensure_in_buff_size(self, uudecode,
+ avail_in + uudecode->in_cnt) != ARCHIVE_OK)
+ return (ARCHIVE_FATAL);
+ memcpy(uudecode->in_buff + uudecode->in_cnt,
+ d, avail_in);
+ d = uudecode->in_buff;
+ avail_in += uudecode->in_cnt;
+ uudecode->in_cnt = 0;
+ }
+ for (;used < avail_in; d += llen, used += llen) {
+ int l, body;
+
+ b = d;
+ len = get_line(b, avail_in - used, &nl);
+ if (len < 0) {
+ /* Non-ascii character is found. */
+ archive_set_error(&self->archive->archive,
+ ARCHIVE_ERRNO_MISC,
+ "Insufficient compressed data");
+ return (ARCHIVE_FATAL);
+ }
+ llen = len;
+ if (nl == 0) {
+ /*
+ * Save remaining data which does not contain
+ * NL('\n','\r').
+ */
+ if (ensure_in_buff_size(self, uudecode, len)
+ != ARCHIVE_OK)
+ return (ARCHIVE_FATAL);
+ if (uudecode->in_buff != b)
+ memmove(uudecode->in_buff, b, len);
+ uudecode->in_cnt = len;
+ if (total == 0) {
+ /* Do not return 0; it means end-of-file.
+ * We should try to read bytes more. */
+ __archive_read_filter_consume(
+ self->upstream, ravail);
+ goto read_more;
+ }
+ break;
+ }
+ if (total + len * 2 > OUT_BUFF_SIZE)
+ break;
+ switch (uudecode->state) {
+ default:
+ case ST_FIND_HEAD:
+ if (len - nl >= 11 && memcmp(b, "begin ", 6) == 0)
+ l = 6;
+ else if (len - nl >= 18 &&
+ memcmp(b, "begin-base64 ", 13) == 0)
+ l = 13;
+ else
+ l = 0;
+ if (l != 0 && b[l] >= '0' && b[l] <= '7' &&
+ b[l+1] >= '0' && b[l+1] <= '7' &&
+ b[l+2] >= '0' && b[l+2] <= '7' && b[l+3] == ' ') {
+ if (l == 6)
+ uudecode->state = ST_READ_UU;
+ else
+ uudecode->state = ST_READ_BASE64;
+ }
+ break;
+ case ST_READ_UU:
+ body = len - nl;
+ if (!uuchar[*b] || body <= 0) {
+ archive_set_error(&self->archive->archive,
+ ARCHIVE_ERRNO_MISC,
+ "Insufficient compressed data");
+ return (ARCHIVE_FATAL);
+ }
+ /* Get length of undecoded bytes of curent line. */
+ l = UUDECODE(*b++);
+ body--;
+ if (l > body) {
+ archive_set_error(&self->archive->archive,
+ ARCHIVE_ERRNO_MISC,
+ "Insufficient compressed data");
+ return (ARCHIVE_FATAL);
+ }
+ if (l == 0) {
+ uudecode->state = ST_UUEND;
+ break;
+ }
+ while (l > 0) {
+ int n = 0;
+
+ if (l > 0) {
+ if (!uuchar[b[0]] || !uuchar[b[1]])
+ break;
+ n = UUDECODE(*b++) << 18;
+ n |= UUDECODE(*b++) << 12;
+ *out++ = n >> 16; total++;
+ --l;
+ }
+ if (l > 0) {
+ if (!uuchar[b[0]])
+ break;
+ n |= UUDECODE(*b++) << 6;
+ *out++ = (n >> 8) & 0xFF; total++;
+ --l;
+ }
+ if (l > 0) {
+ if (!uuchar[b[0]])
+ break;
+ n |= UUDECODE(*b++);
+ *out++ = n & 0xFF; total++;
+ --l;
+ }
+ }
+ if (l) {
+ archive_set_error(&self->archive->archive,
+ ARCHIVE_ERRNO_MISC,
+ "Insufficient compressed data");
+ return (ARCHIVE_FATAL);
+ }
+ break;
+ case ST_UUEND:
+ if (len - nl == 3 && memcmp(b, "end ", 3) == 0)
+ uudecode->state = ST_FIND_HEAD;
+ else {
+ archive_set_error(&self->archive->archive,
+ ARCHIVE_ERRNO_MISC,
+ "Insufficient compressed data");
+ return (ARCHIVE_FATAL);
+ }
+ break;
+ case ST_READ_BASE64:
+ l = len - nl;
+ if (l >= 3 && b[0] == '=' && b[1] == '=' &&
+ b[2] == '=') {
+ uudecode->state = ST_FIND_HEAD;
+ break;
+ }
+ while (l > 0) {
+ int n = 0;
+
+ if (l > 0) {
+ if (!base64[b[0]] || !base64[b[1]])
+ break;
+ n = base64num[*b++] << 18;
+ n |= base64num[*b++] << 12;
+ *out++ = n >> 16; total++;
+ l -= 2;
+ }
+ if (l > 0) {
+ if (*b == '=')
+ break;
+ if (!base64[*b])
+ break;
+ n |= base64num[*b++] << 6;
+ *out++ = (n >> 8) & 0xFF; total++;
+ --l;
+ }
+ if (l > 0) {
+ if (*b == '=')
+ break;
+ if (!base64[*b])
+ break;
+ n |= base64num[*b++];
+ *out++ = n & 0xFF; total++;
+ --l;
+ }
+ }
+ if (l && *b != '=') {
+ archive_set_error(&self->archive->archive,
+ ARCHIVE_ERRNO_MISC,
+ "Insufficient compressed data");
+ return (ARCHIVE_FATAL);
+ }
+ break;
+ }
+ }
+
+ __archive_read_filter_consume(self->upstream, ravail);
+
+ *buff = uudecode->out_buff;
+ uudecode->total += total;
+ return (total);
+}
+
+static int
+uudecode_filter_close(struct archive_read_filter *self)
+{
+ struct uudecode *uudecode;
+
+ uudecode = (struct uudecode *)self->data;
+ free(uudecode->in_buff);
+ free(uudecode->out_buff);
+ free(uudecode);
+
+ return (ARCHIVE_OK);
+}
+
diff --git a/lib/libarchive/archive_read_support_compression_xz.c b/contrib/libarchive/libarchive/archive_read_support_compression_xz.c
index 1554d99..1554d99 100644
--- a/lib/libarchive/archive_read_support_compression_xz.c
+++ b/contrib/libarchive/libarchive/archive_read_support_compression_xz.c
diff --git a/contrib/libarchive/libarchive/archive_read_support_format_all.c b/contrib/libarchive/libarchive/archive_read_support_format_all.c
new file mode 100644
index 0000000..e57cd43
--- /dev/null
+++ b/contrib/libarchive/libarchive/archive_read_support_format_all.c
@@ -0,0 +1,51 @@
+/*-
+ * Copyright (c) 2003-2011 Tim Kientzle
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "archive_platform.h"
+__FBSDID("$FreeBSD$");
+
+#include "archive.h"
+
+int
+archive_read_support_format_all(struct archive *a)
+{
+ archive_read_support_format_ar(a);
+ archive_read_support_format_cpio(a);
+ archive_read_support_format_empty(a);
+ archive_read_support_format_iso9660(a);
+ archive_read_support_format_mtree(a);
+ archive_read_support_format_tar(a);
+ archive_read_support_format_xar(a);
+ archive_read_support_format_zip(a);
+
+ /* Note: We always return ARCHIVE_OK here, even if some of the
+ * above return ARCHIVE_WARN. The intent here is to enable
+ * "as much as possible." Clients who need specific
+ * compression should enable those individually so they can
+ * verify the level of support. */
+ /* Clear any warning messages set by the above functions. */
+ archive_clear_error(a);
+ return (ARCHIVE_OK);
+}
diff --git a/lib/libarchive/archive_read_support_format_ar.c b/contrib/libarchive/libarchive/archive_read_support_format_ar.c
index 8b95f22..8b95f22 100644
--- a/lib/libarchive/archive_read_support_format_ar.c
+++ b/contrib/libarchive/libarchive/archive_read_support_format_ar.c
diff --git a/contrib/libarchive/libarchive/archive_read_support_format_cpio.c b/contrib/libarchive/libarchive/archive_read_support_format_cpio.c
new file mode 100644
index 0000000..87e2bf1
--- /dev/null
+++ b/contrib/libarchive/libarchive/archive_read_support_format_cpio.c
@@ -0,0 +1,786 @@
+/*-
+ * Copyright (c) 2003-2007 Tim Kientzle
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "archive_platform.h"
+__FBSDID("$FreeBSD$");
+
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+/* #include <stdint.h> */ /* See archive_platform.h */
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+#include "archive.h"
+#include "archive_entry.h"
+#include "archive_private.h"
+#include "archive_read_private.h"
+
+#ifdef _MSC_VER
+#define __packed
+#pragma pack(push, 1)
+#endif
+struct cpio_bin_header {
+ unsigned char c_magic[2];
+ unsigned char c_dev[2];
+ unsigned char c_ino[2];
+ unsigned char c_mode[2];
+ unsigned char c_uid[2];
+ unsigned char c_gid[2];
+ unsigned char c_nlink[2];
+ unsigned char c_rdev[2];
+ unsigned char c_mtime[4];
+ unsigned char c_namesize[2];
+ unsigned char c_filesize[4];
+} __packed;
+
+struct cpio_odc_header {
+ char c_magic[6];
+ char c_dev[6];
+ char c_ino[6];
+ char c_mode[6];
+ char c_uid[6];
+ char c_gid[6];
+ char c_nlink[6];
+ char c_rdev[6];
+ char c_mtime[11];
+ char c_namesize[6];
+ char c_filesize[11];
+} __packed;
+
+struct cpio_newc_header {
+ char c_magic[6];
+ char c_ino[8];
+ char c_mode[8];
+ char c_uid[8];
+ char c_gid[8];
+ char c_nlink[8];
+ char c_mtime[8];
+ char c_filesize[8];
+ char c_devmajor[8];
+ char c_devminor[8];
+ char c_rdevmajor[8];
+ char c_rdevminor[8];
+ char c_namesize[8];
+ char c_crc[8];
+} __packed;
+
+#ifdef _MSC_VER
+#undef __packed
+#pragma pack(pop)
+#endif
+
+struct links_entry {
+ struct links_entry *next;
+ struct links_entry *previous;
+ int links;
+ dev_t dev;
+ int64_t ino;
+ char *name;
+};
+
+#define CPIO_MAGIC 0x13141516
+struct cpio {
+ int magic;
+ int (*read_header)(struct archive_read *, struct cpio *,
+ struct archive_entry *, size_t *, size_t *);
+ struct links_entry *links_head;
+ struct archive_string entry_name;
+ struct archive_string entry_linkname;
+ off_t entry_bytes_remaining;
+ off_t entry_offset;
+ off_t entry_padding;
+};
+
+static int64_t atol16(const char *, unsigned);
+static int64_t atol8(const char *, unsigned);
+static int archive_read_format_cpio_bid(struct archive_read *);
+static int archive_read_format_cpio_cleanup(struct archive_read *);
+static int archive_read_format_cpio_read_data(struct archive_read *,
+ const void **, size_t *, off_t *);
+static int archive_read_format_cpio_read_header(struct archive_read *,
+ struct archive_entry *);
+static int be4(const unsigned char *);
+static int find_odc_header(struct archive_read *);
+static int find_newc_header(struct archive_read *);
+static int header_bin_be(struct archive_read *, struct cpio *,
+ struct archive_entry *, size_t *, size_t *);
+static int header_bin_le(struct archive_read *, struct cpio *,
+ struct archive_entry *, size_t *, size_t *);
+static int header_newc(struct archive_read *, struct cpio *,
+ struct archive_entry *, size_t *, size_t *);
+static int header_odc(struct archive_read *, struct cpio *,
+ struct archive_entry *, size_t *, size_t *);
+static int is_octal(const char *, size_t);
+static int is_hex(const char *, size_t);
+static int le4(const unsigned char *);
+static void record_hardlink(struct cpio *cpio, struct archive_entry *entry);
+
+int
+archive_read_support_format_cpio(struct archive *_a)
+{
+ struct archive_read *a = (struct archive_read *)_a;
+ struct cpio *cpio;
+ int r;
+
+ cpio = (struct cpio *)malloc(sizeof(*cpio));
+ if (cpio == NULL) {
+ archive_set_error(&a->archive, ENOMEM, "Can't allocate cpio data");
+ return (ARCHIVE_FATAL);
+ }
+ memset(cpio, 0, sizeof(*cpio));
+ cpio->magic = CPIO_MAGIC;
+
+ r = __archive_read_register_format(a,
+ cpio,
+ "cpio",
+ archive_read_format_cpio_bid,
+ NULL,
+ archive_read_format_cpio_read_header,
+ archive_read_format_cpio_read_data,
+ NULL,
+ archive_read_format_cpio_cleanup);
+
+ if (r != ARCHIVE_OK)
+ free(cpio);
+ return (ARCHIVE_OK);
+}
+
+
+static int
+archive_read_format_cpio_bid(struct archive_read *a)
+{
+ const void *h;
+ const unsigned char *p;
+ struct cpio *cpio;
+ int bid;
+
+ cpio = (struct cpio *)(a->format->data);
+
+ if ((h = __archive_read_ahead(a, 6, NULL)) == NULL)
+ return (-1);
+
+ p = (const unsigned char *)h;
+ bid = 0;
+ if (memcmp(p, "070707", 6) == 0) {
+ /* ASCII cpio archive (odc, POSIX.1) */
+ cpio->read_header = header_odc;
+ bid += 48;
+ /*
+ * XXX TODO: More verification; Could check that only octal
+ * digits appear in appropriate header locations. XXX
+ */
+ } else if (memcmp(p, "070701", 6) == 0) {
+ /* ASCII cpio archive (SVR4 without CRC) */
+ cpio->read_header = header_newc;
+ bid += 48;
+ /*
+ * XXX TODO: More verification; Could check that only hex
+ * digits appear in appropriate header locations. XXX
+ */
+ } else if (memcmp(p, "070702", 6) == 0) {
+ /* ASCII cpio archive (SVR4 with CRC) */
+ /* XXX TODO: Flag that we should check the CRC. XXX */
+ cpio->read_header = header_newc;
+ bid += 48;
+ /*
+ * XXX TODO: More verification; Could check that only hex
+ * digits appear in appropriate header locations. XXX
+ */
+ } else if (p[0] * 256 + p[1] == 070707) {
+ /* big-endian binary cpio archives */
+ cpio->read_header = header_bin_be;
+ bid += 16;
+ /* Is more verification possible here? */
+ } else if (p[0] + p[1] * 256 == 070707) {
+ /* little-endian binary cpio archives */
+ cpio->read_header = header_bin_le;
+ bid += 16;
+ /* Is more verification possible here? */
+ } else
+ return (ARCHIVE_WARN);
+
+ return (bid);
+}
+
+static int
+archive_read_format_cpio_read_header(struct archive_read *a,
+ struct archive_entry *entry)
+{
+ struct cpio *cpio;
+ const void *h;
+ size_t namelength;
+ size_t name_pad;
+ int r;
+
+ cpio = (struct cpio *)(a->format->data);
+ r = (cpio->read_header(a, cpio, entry, &namelength, &name_pad));
+
+ if (r < ARCHIVE_WARN)
+ return (r);
+
+ /* Read name from buffer. */
+ h = __archive_read_ahead(a, namelength + name_pad, NULL);
+ if (h == NULL)
+ return (ARCHIVE_FATAL);
+ __archive_read_consume(a, namelength + name_pad);
+ archive_strncpy(&cpio->entry_name, (const char *)h, namelength);
+ archive_entry_set_pathname(entry, cpio->entry_name.s);
+ cpio->entry_offset = 0;
+
+ /* If this is a symlink, read the link contents. */
+ if (archive_entry_filetype(entry) == AE_IFLNK) {
+ h = __archive_read_ahead(a, cpio->entry_bytes_remaining, NULL);
+ if (h == NULL)
+ return (ARCHIVE_FATAL);
+ __archive_read_consume(a, cpio->entry_bytes_remaining);
+ archive_strncpy(&cpio->entry_linkname, (const char *)h,
+ cpio->entry_bytes_remaining);
+ archive_entry_set_symlink(entry, cpio->entry_linkname.s);
+ cpio->entry_bytes_remaining = 0;
+ }
+
+ /* XXX TODO: If the full mode is 0160200, then this is a Solaris
+ * ACL description for the following entry. Read this body
+ * and parse it as a Solaris-style ACL, then read the next
+ * header. XXX */
+
+ /* Compare name to "TRAILER!!!" to test for end-of-archive. */
+ if (namelength == 11 && strcmp((const char *)h, "TRAILER!!!") == 0) {
+ /* TODO: Store file location of start of block. */
+ archive_clear_error(&a->archive);
+ return (ARCHIVE_EOF);
+ }
+
+ /* Detect and record hardlinks to previously-extracted entries. */
+ record_hardlink(cpio, entry);
+
+ return (r);
+}
+
+static int
+archive_read_format_cpio_read_data(struct archive_read *a,
+ const void **buff, size_t *size, off_t *offset)
+{
+ ssize_t bytes_read;
+ struct cpio *cpio;
+
+ cpio = (struct cpio *)(a->format->data);
+ if (cpio->entry_bytes_remaining > 0) {
+ *buff = __archive_read_ahead(a, 1, &bytes_read);
+ if (bytes_read <= 0)
+ return (ARCHIVE_FATAL);
+ if (bytes_read > cpio->entry_bytes_remaining)
+ bytes_read = cpio->entry_bytes_remaining;
+ *size = bytes_read;
+ *offset = cpio->entry_offset;
+ cpio->entry_offset += bytes_read;
+ cpio->entry_bytes_remaining -= bytes_read;
+ __archive_read_consume(a, bytes_read);
+ return (ARCHIVE_OK);
+ } else {
+ while (cpio->entry_padding > 0) {
+ *buff = __archive_read_ahead(a, 1, &bytes_read);
+ if (bytes_read <= 0)
+ return (ARCHIVE_FATAL);
+ if (bytes_read > cpio->entry_padding)
+ bytes_read = cpio->entry_padding;
+ __archive_read_consume(a, bytes_read);
+ cpio->entry_padding -= bytes_read;
+ }
+ *buff = NULL;
+ *size = 0;
+ *offset = cpio->entry_offset;
+ return (ARCHIVE_EOF);
+ }
+}
+
+/*
+ * Skip forward to the next cpio newc header by searching for the
+ * 07070[12] string. This should be generalized and merged with
+ * find_odc_header below.
+ */
+static int
+is_hex(const char *p, size_t len)
+{
+ while (len-- > 0) {
+ if ((*p >= '0' && *p <= '9')
+ || (*p >= 'a' && *p <= 'f')
+ || (*p >= 'A' && *p <= 'F'))
+ ++p;
+ else
+ return (0);
+ }
+ return (1);
+}
+
+static int
+find_newc_header(struct archive_read *a)
+{
+ const void *h;
+ const char *p, *q;
+ size_t skip, skipped = 0;
+ ssize_t bytes;
+
+ for (;;) {
+ h = __archive_read_ahead(a, sizeof(struct cpio_newc_header), &bytes);
+ if (h == NULL)
+ return (ARCHIVE_FATAL);
+ p = h;
+ q = p + bytes;
+
+ /* Try the typical case first, then go into the slow search.*/
+ if (memcmp("07070", p, 5) == 0
+ && (p[5] == '1' || p[5] == '2')
+ && is_hex(p, sizeof(struct cpio_newc_header)))
+ return (ARCHIVE_OK);
+
+ /*
+ * Scan ahead until we find something that looks
+ * like an odc header.
+ */
+ while (p + sizeof(struct cpio_newc_header) <= q) {
+ switch (p[5]) {
+ case '1':
+ case '2':
+ if (memcmp("07070", p, 5) == 0
+ && is_hex(p, sizeof(struct cpio_newc_header))) {
+ skip = p - (const char *)h;
+ __archive_read_consume(a, skip);
+ skipped += skip;
+ if (skipped > 0) {
+ archive_set_error(&a->archive,
+ 0,
+ "Skipped %d bytes before "
+ "finding valid header",
+ (int)skipped);
+ return (ARCHIVE_WARN);
+ }
+ return (ARCHIVE_OK);
+ }
+ p += 2;
+ break;
+ case '0':
+ p++;
+ break;
+ default:
+ p += 6;
+ break;
+ }
+ }
+ skip = p - (const char *)h;
+ __archive_read_consume(a, skip);
+ skipped += skip;
+ }
+}
+
+static int
+header_newc(struct archive_read *a, struct cpio *cpio,
+ struct archive_entry *entry, size_t *namelength, size_t *name_pad)
+{
+ const void *h;
+ const struct cpio_newc_header *header;
+ int r;
+
+ r = find_newc_header(a);
+ if (r < ARCHIVE_WARN)
+ return (r);
+
+ /* Read fixed-size portion of header. */
+ h = __archive_read_ahead(a, sizeof(struct cpio_newc_header), NULL);
+ if (h == NULL)
+ return (ARCHIVE_FATAL);
+ __archive_read_consume(a, sizeof(struct cpio_newc_header));
+
+ /* Parse out hex fields. */
+ header = (const struct cpio_newc_header *)h;
+
+ if (memcmp(header->c_magic, "070701", 6) == 0) {
+ a->archive.archive_format = ARCHIVE_FORMAT_CPIO_SVR4_NOCRC;
+ a->archive.archive_format_name = "ASCII cpio (SVR4 with no CRC)";
+ } else if (memcmp(header->c_magic, "070702", 6) == 0) {
+ a->archive.archive_format = ARCHIVE_FORMAT_CPIO_SVR4_CRC;
+ a->archive.archive_format_name = "ASCII cpio (SVR4 with CRC)";
+ } else {
+ /* TODO: Abort here? */
+ }
+
+ archive_entry_set_devmajor(entry, atol16(header->c_devmajor, sizeof(header->c_devmajor)));
+ archive_entry_set_devminor(entry, atol16(header->c_devminor, sizeof(header->c_devminor)));
+ archive_entry_set_ino(entry, atol16(header->c_ino, sizeof(header->c_ino)));
+ archive_entry_set_mode(entry, atol16(header->c_mode, sizeof(header->c_mode)));
+ archive_entry_set_uid(entry, atol16(header->c_uid, sizeof(header->c_uid)));
+ archive_entry_set_gid(entry, atol16(header->c_gid, sizeof(header->c_gid)));
+ archive_entry_set_nlink(entry, atol16(header->c_nlink, sizeof(header->c_nlink)));
+ archive_entry_set_rdevmajor(entry, atol16(header->c_rdevmajor, sizeof(header->c_rdevmajor)));
+ archive_entry_set_rdevminor(entry, atol16(header->c_rdevminor, sizeof(header->c_rdevminor)));
+ archive_entry_set_mtime(entry, atol16(header->c_mtime, sizeof(header->c_mtime)), 0);
+ *namelength = atol16(header->c_namesize, sizeof(header->c_namesize));
+ /* Pad name to 2 more than a multiple of 4. */
+ *name_pad = (2 - *namelength) & 3;
+
+ /*
+ * Note: entry_bytes_remaining is at least 64 bits and
+ * therefore guaranteed to be big enough for a 33-bit file
+ * size.
+ */
+ cpio->entry_bytes_remaining =
+ atol16(header->c_filesize, sizeof(header->c_filesize));
+ archive_entry_set_size(entry, cpio->entry_bytes_remaining);
+ /* Pad file contents to a multiple of 4. */
+ cpio->entry_padding = 3 & -cpio->entry_bytes_remaining;
+ return (r);
+}
+
+/*
+ * Skip forward to the next cpio odc header by searching for the
+ * 070707 string. This is a hand-optimized search that could
+ * probably be easily generalized to handle all character-based
+ * cpio variants.
+ */
+static int
+is_octal(const char *p, size_t len)
+{
+ while (len-- > 0) {
+ if (*p < '0' || *p > '7')
+ return (0);
+ ++p;
+ }
+ return (1);
+}
+
+static int
+find_odc_header(struct archive_read *a)
+{
+ const void *h;
+ const char *p, *q;
+ size_t skip, skipped = 0;
+ ssize_t bytes;
+
+ for (;;) {
+ h = __archive_read_ahead(a, sizeof(struct cpio_odc_header), &bytes);
+ if (h == NULL)
+ return (ARCHIVE_FATAL);
+ p = h;
+ q = p + bytes;
+
+ /* Try the typical case first, then go into the slow search.*/
+ if (memcmp("070707", p, 6) == 0
+ && is_octal(p, sizeof(struct cpio_odc_header)))
+ return (ARCHIVE_OK);
+
+ /*
+ * Scan ahead until we find something that looks
+ * like an odc header.
+ */
+ while (p + sizeof(struct cpio_odc_header) <= q) {
+ switch (p[5]) {
+ case '7':
+ if (memcmp("070707", p, 6) == 0
+ && is_octal(p, sizeof(struct cpio_odc_header))) {
+ skip = p - (const char *)h;
+ __archive_read_consume(a, skip);
+ skipped += skip;
+ if (skipped > 0) {
+ archive_set_error(&a->archive,
+ 0,
+ "Skipped %d bytes before "
+ "finding valid header",
+ (int)skipped);
+ return (ARCHIVE_WARN);
+ }
+ return (ARCHIVE_OK);
+ }
+ p += 2;
+ break;
+ case '0':
+ p++;
+ break;
+ default:
+ p += 6;
+ break;
+ }
+ }
+ skip = p - (const char *)h;
+ __archive_read_consume(a, skip);
+ skipped += skip;
+ }
+}
+
+static int
+header_odc(struct archive_read *a, struct cpio *cpio,
+ struct archive_entry *entry, size_t *namelength, size_t *name_pad)
+{
+ const void *h;
+ int r;
+ const struct cpio_odc_header *header;
+
+ a->archive.archive_format = ARCHIVE_FORMAT_CPIO_POSIX;
+ a->archive.archive_format_name = "POSIX octet-oriented cpio";
+
+ /* Find the start of the next header. */
+ r = find_odc_header(a);
+ if (r < ARCHIVE_WARN)
+ return (r);
+
+ /* Read fixed-size portion of header. */
+ h = __archive_read_ahead(a, sizeof(struct cpio_odc_header), NULL);
+ if (h == NULL)
+ return (ARCHIVE_FATAL);
+ __archive_read_consume(a, sizeof(struct cpio_odc_header));
+
+ /* Parse out octal fields. */
+ header = (const struct cpio_odc_header *)h;
+
+ archive_entry_set_dev(entry, atol8(header->c_dev, sizeof(header->c_dev)));
+ archive_entry_set_ino(entry, atol8(header->c_ino, sizeof(header->c_ino)));
+ archive_entry_set_mode(entry, atol8(header->c_mode, sizeof(header->c_mode)));
+ archive_entry_set_uid(entry, atol8(header->c_uid, sizeof(header->c_uid)));
+ archive_entry_set_gid(entry, atol8(header->c_gid, sizeof(header->c_gid)));
+ archive_entry_set_nlink(entry, atol8(header->c_nlink, sizeof(header->c_nlink)));
+ archive_entry_set_rdev(entry, atol8(header->c_rdev, sizeof(header->c_rdev)));
+ archive_entry_set_mtime(entry, atol8(header->c_mtime, sizeof(header->c_mtime)), 0);
+ *namelength = atol8(header->c_namesize, sizeof(header->c_namesize));
+ *name_pad = 0; /* No padding of filename. */
+
+ /*
+ * Note: entry_bytes_remaining is at least 64 bits and
+ * therefore guaranteed to be big enough for a 33-bit file
+ * size.
+ */
+ cpio->entry_bytes_remaining =
+ atol8(header->c_filesize, sizeof(header->c_filesize));
+ archive_entry_set_size(entry, cpio->entry_bytes_remaining);
+ cpio->entry_padding = 0;
+ return (r);
+}
+
+static int
+header_bin_le(struct archive_read *a, struct cpio *cpio,
+ struct archive_entry *entry, size_t *namelength, size_t *name_pad)
+{
+ const void *h;
+ const struct cpio_bin_header *header;
+
+ a->archive.archive_format = ARCHIVE_FORMAT_CPIO_BIN_LE;
+ a->archive.archive_format_name = "cpio (little-endian binary)";
+
+ /* Read fixed-size portion of header. */
+ h = __archive_read_ahead(a, sizeof(struct cpio_bin_header), NULL);
+ if (h == NULL)
+ return (ARCHIVE_FATAL);
+ __archive_read_consume(a, sizeof(struct cpio_bin_header));
+
+ /* Parse out binary fields. */
+ header = (const struct cpio_bin_header *)h;
+
+ archive_entry_set_dev(entry, header->c_dev[0] + header->c_dev[1] * 256);
+ archive_entry_set_ino(entry, header->c_ino[0] + header->c_ino[1] * 256);
+ archive_entry_set_mode(entry, header->c_mode[0] + header->c_mode[1] * 256);
+ archive_entry_set_uid(entry, header->c_uid[0] + header->c_uid[1] * 256);
+ archive_entry_set_gid(entry, header->c_gid[0] + header->c_gid[1] * 256);
+ archive_entry_set_nlink(entry, header->c_nlink[0] + header->c_nlink[1] * 256);
+ archive_entry_set_rdev(entry, header->c_rdev[0] + header->c_rdev[1] * 256);
+ archive_entry_set_mtime(entry, le4(header->c_mtime), 0);
+ *namelength = header->c_namesize[0] + header->c_namesize[1] * 256;
+ *name_pad = *namelength & 1; /* Pad to even. */
+
+ cpio->entry_bytes_remaining = le4(header->c_filesize);
+ archive_entry_set_size(entry, cpio->entry_bytes_remaining);
+ cpio->entry_padding = cpio->entry_bytes_remaining & 1; /* Pad to even. */
+ return (ARCHIVE_OK);
+}
+
+static int
+header_bin_be(struct archive_read *a, struct cpio *cpio,
+ struct archive_entry *entry, size_t *namelength, size_t *name_pad)
+{
+ const void *h;
+ const struct cpio_bin_header *header;
+
+ a->archive.archive_format = ARCHIVE_FORMAT_CPIO_BIN_BE;
+ a->archive.archive_format_name = "cpio (big-endian binary)";
+
+ /* Read fixed-size portion of header. */
+ h = __archive_read_ahead(a, sizeof(struct cpio_bin_header), NULL);
+ if (h == NULL)
+ return (ARCHIVE_FATAL);
+ __archive_read_consume(a, sizeof(struct cpio_bin_header));
+
+ /* Parse out binary fields. */
+ header = (const struct cpio_bin_header *)h;
+ archive_entry_set_dev(entry, header->c_dev[0] * 256 + header->c_dev[1]);
+ archive_entry_set_ino(entry, header->c_ino[0] * 256 + header->c_ino[1]);
+ archive_entry_set_mode(entry, header->c_mode[0] * 256 + header->c_mode[1]);
+ archive_entry_set_uid(entry, header->c_uid[0] * 256 + header->c_uid[1]);
+ archive_entry_set_gid(entry, header->c_gid[0] * 256 + header->c_gid[1]);
+ archive_entry_set_nlink(entry, header->c_nlink[0] * 256 + header->c_nlink[1]);
+ archive_entry_set_rdev(entry, header->c_rdev[0] * 256 + header->c_rdev[1]);
+ archive_entry_set_mtime(entry, be4(header->c_mtime), 0);
+ *namelength = header->c_namesize[0] * 256 + header->c_namesize[1];
+ *name_pad = *namelength & 1; /* Pad to even. */
+
+ cpio->entry_bytes_remaining = be4(header->c_filesize);
+ archive_entry_set_size(entry, cpio->entry_bytes_remaining);
+ cpio->entry_padding = cpio->entry_bytes_remaining & 1; /* Pad to even. */
+ return (ARCHIVE_OK);
+}
+
+static int
+archive_read_format_cpio_cleanup(struct archive_read *a)
+{
+ struct cpio *cpio;
+
+ cpio = (struct cpio *)(a->format->data);
+ /* Free inode->name map */
+ while (cpio->links_head != NULL) {
+ struct links_entry *lp = cpio->links_head->next;
+
+ if (cpio->links_head->name)
+ free(cpio->links_head->name);
+ free(cpio->links_head);
+ cpio->links_head = lp;
+ }
+ archive_string_free(&cpio->entry_name);
+ free(cpio);
+ (a->format->data) = NULL;
+ return (ARCHIVE_OK);
+}
+
+static int
+le4(const unsigned char *p)
+{
+ return ((p[0]<<16) + (p[1]<<24) + (p[2]<<0) + (p[3]<<8));
+}
+
+
+static int
+be4(const unsigned char *p)
+{
+ return ((p[0]<<24) + (p[1]<<16) + (p[2]<<8) + (p[3]));
+}
+
+/*
+ * Note that this implementation does not (and should not!) obey
+ * locale settings; you cannot simply substitute strtol here, since
+ * it does obey locale.
+ */
+static int64_t
+atol8(const char *p, unsigned char_cnt)
+{
+ int64_t l;
+ int digit;
+
+ l = 0;
+ while (char_cnt-- > 0) {
+ if (*p >= '0' && *p <= '7')
+ digit = *p - '0';
+ else
+ return (l);
+ p++;
+ l <<= 3;
+ l |= digit;
+ }
+ return (l);
+}
+
+static int64_t
+atol16(const char *p, unsigned char_cnt)
+{
+ int64_t l;
+ int digit;
+
+ l = 0;
+ while (char_cnt-- > 0) {
+ if (*p >= 'a' && *p <= 'f')
+ digit = *p - 'a' + 10;
+ else if (*p >= 'A' && *p <= 'F')
+ digit = *p - 'A' + 10;
+ else if (*p >= '0' && *p <= '9')
+ digit = *p - '0';
+ else
+ return (l);
+ p++;
+ l <<= 4;
+ l |= digit;
+ }
+ return (l);
+}
+
+static void
+record_hardlink(struct cpio *cpio, struct archive_entry *entry)
+{
+ struct links_entry *le;
+ dev_t dev;
+ int64_t ino;
+
+ if (archive_entry_nlink(entry) <= 1)
+ return;
+
+ dev = archive_entry_dev(entry);
+ ino = archive_entry_ino64(entry);
+
+ /*
+ * First look in the list of multiply-linked files. If we've
+ * already dumped it, convert this entry to a hard link entry.
+ */
+ for (le = cpio->links_head; le; le = le->next) {
+ if (le->dev == dev && le->ino == ino) {
+ archive_entry_copy_hardlink(entry, le->name);
+
+ if (--le->links <= 0) {
+ if (le->previous != NULL)
+ le->previous->next = le->next;
+ if (le->next != NULL)
+ le->next->previous = le->previous;
+ if (cpio->links_head == le)
+ cpio->links_head = le->next;
+ free(le->name);
+ free(le);
+ }
+
+ return;
+ }
+ }
+
+ le = (struct links_entry *)malloc(sizeof(struct links_entry));
+ if (le == NULL)
+ __archive_errx(1, "Out of memory adding file to list");
+ if (cpio->links_head != NULL)
+ cpio->links_head->previous = le;
+ le->next = cpio->links_head;
+ le->previous = NULL;
+ cpio->links_head = le;
+ le->dev = dev;
+ le->ino = ino;
+ le->links = archive_entry_nlink(entry) - 1;
+ le->name = strdup(archive_entry_pathname(entry));
+ if (le->name == NULL)
+ __archive_errx(1, "Out of memory adding file to list");
+}
diff --git a/lib/libarchive/archive_read_support_format_empty.c b/contrib/libarchive/libarchive/archive_read_support_format_empty.c
index 05c4958..05c4958 100644
--- a/lib/libarchive/archive_read_support_format_empty.c
+++ b/contrib/libarchive/libarchive/archive_read_support_format_empty.c
diff --git a/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c b/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c
new file mode 100644
index 0000000..5c5addbb
--- /dev/null
+++ b/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c
@@ -0,0 +1,3022 @@
+/*-
+ * Copyright (c) 2003-2007 Tim Kientzle
+ * Copyright (c) 2009 Andreas Henriksson <andreas@fatal.se>
+ * Copyright (c) 2009-2011 Michihiro NAKAJIMA
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "archive_platform.h"
+__FBSDID("$FreeBSD$");
+
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+/* #include <stdint.h> */ /* See archive_platform.h */
+#include <stdio.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#include <time.h>
+#ifdef HAVE_ZLIB_H
+#include <zlib.h>
+#endif
+
+#include "archive.h"
+#include "archive_endian.h"
+#include "archive_entry.h"
+#include "archive_private.h"
+#include "archive_read_private.h"
+#include "archive_string.h"
+
+/*
+ * An overview of ISO 9660 format:
+ *
+ * Each disk is laid out as follows:
+ * * 32k reserved for private use
+ * * Volume descriptor table. Each volume descriptor
+ * is 2k and specifies basic format information.
+ * The "Primary Volume Descriptor" (PVD) is defined by the
+ * standard and should always be present; other volume
+ * descriptors include various vendor-specific extensions.
+ * * Files and directories. Each file/dir is specified by
+ * an "extent" (starting sector and length in bytes).
+ * Dirs are just files with directory records packed one
+ * after another. The PVD contains a single dir entry
+ * specifying the location of the root directory. Everything
+ * else follows from there.
+ *
+ * This module works by first reading the volume descriptors, then
+ * building a list of directory entries, sorted by starting
+ * sector. At each step, I look for the earliest dir entry that
+ * hasn't yet been read, seek forward to that location and read
+ * that entry. If it's a dir, I slurp in the new dir entries and
+ * add them to the heap; if it's a regular file, I return the
+ * corresponding archive_entry and wait for the client to request
+ * the file body. This strategy allows us to read most compliant
+ * CDs with a single pass through the data, as required by libarchive.
+ */
+#define LOGICAL_BLOCK_SIZE 2048
+#define SYSTEM_AREA_BLOCK 16
+
+/* Structure of on-disk primary volume descriptor. */
+#define PVD_type_offset 0
+#define PVD_type_size 1
+#define PVD_id_offset (PVD_type_offset + PVD_type_size)
+#define PVD_id_size 5
+#define PVD_version_offset (PVD_id_offset + PVD_id_size)
+#define PVD_version_size 1
+#define PVD_reserved1_offset (PVD_version_offset + PVD_version_size)
+#define PVD_reserved1_size 1
+#define PVD_system_id_offset (PVD_reserved1_offset + PVD_reserved1_size)
+#define PVD_system_id_size 32
+#define PVD_volume_id_offset (PVD_system_id_offset + PVD_system_id_size)
+#define PVD_volume_id_size 32
+#define PVD_reserved2_offset (PVD_volume_id_offset + PVD_volume_id_size)
+#define PVD_reserved2_size 8
+#define PVD_volume_space_size_offset (PVD_reserved2_offset + PVD_reserved2_size)
+#define PVD_volume_space_size_size 8
+#define PVD_reserved3_offset (PVD_volume_space_size_offset + PVD_volume_space_size_size)
+#define PVD_reserved3_size 32
+#define PVD_volume_set_size_offset (PVD_reserved3_offset + PVD_reserved3_size)
+#define PVD_volume_set_size_size 4
+#define PVD_volume_sequence_number_offset (PVD_volume_set_size_offset + PVD_volume_set_size_size)
+#define PVD_volume_sequence_number_size 4
+#define PVD_logical_block_size_offset (PVD_volume_sequence_number_offset + PVD_volume_sequence_number_size)
+#define PVD_logical_block_size_size 4
+#define PVD_path_table_size_offset (PVD_logical_block_size_offset + PVD_logical_block_size_size)
+#define PVD_path_table_size_size 8
+#define PVD_type_1_path_table_offset (PVD_path_table_size_offset + PVD_path_table_size_size)
+#define PVD_type_1_path_table_size 4
+#define PVD_opt_type_1_path_table_offset (PVD_type_1_path_table_offset + PVD_type_1_path_table_size)
+#define PVD_opt_type_1_path_table_size 4
+#define PVD_type_m_path_table_offset (PVD_opt_type_1_path_table_offset + PVD_opt_type_1_path_table_size)
+#define PVD_type_m_path_table_size 4
+#define PVD_opt_type_m_path_table_offset (PVD_type_m_path_table_offset + PVD_type_m_path_table_size)
+#define PVD_opt_type_m_path_table_size 4
+#define PVD_root_directory_record_offset (PVD_opt_type_m_path_table_offset + PVD_opt_type_m_path_table_size)
+#define PVD_root_directory_record_size 34
+#define PVD_volume_set_id_offset (PVD_root_directory_record_offset + PVD_root_directory_record_size)
+#define PVD_volume_set_id_size 128
+#define PVD_publisher_id_offset (PVD_volume_set_id_offset + PVD_volume_set_id_size)
+#define PVD_publisher_id_size 128
+#define PVD_preparer_id_offset (PVD_publisher_id_offset + PVD_publisher_id_size)
+#define PVD_preparer_id_size 128
+#define PVD_application_id_offset (PVD_preparer_id_offset + PVD_preparer_id_size)
+#define PVD_application_id_size 128
+#define PVD_copyright_file_id_offset (PVD_application_id_offset + PVD_application_id_size)
+#define PVD_copyright_file_id_size 37
+#define PVD_abstract_file_id_offset (PVD_copyright_file_id_offset + PVD_copyright_file_id_size)
+#define PVD_abstract_file_id_size 37
+#define PVD_bibliographic_file_id_offset (PVD_abstract_file_id_offset + PVD_abstract_file_id_size)
+#define PVD_bibliographic_file_id_size 37
+#define PVD_creation_date_offset (PVD_bibliographic_file_id_offset + PVD_bibliographic_file_id_size)
+#define PVD_creation_date_size 17
+#define PVD_modification_date_offset (PVD_creation_date_offset + PVD_creation_date_size)
+#define PVD_modification_date_size 17
+#define PVD_expiration_date_offset (PVD_modification_date_offset + PVD_modification_date_size)
+#define PVD_expiration_date_size 17
+#define PVD_effective_date_offset (PVD_expiration_date_offset + PVD_expiration_date_size)
+#define PVD_effective_date_size 17
+#define PVD_file_structure_version_offset (PVD_effective_date_offset + PVD_effective_date_size)
+#define PVD_file_structure_version_size 1
+#define PVD_reserved4_offset (PVD_file_structure_version_offset + PVD_file_structure_version_size)
+#define PVD_reserved4_size 1
+#define PVD_application_data_offset (PVD_reserved4_offset + PVD_reserved4_size)
+#define PVD_application_data_size 512
+#define PVD_reserved5_offset (PVD_application_data_offset + PVD_application_data_size)
+#define PVD_reserved5_size (2048 - PVD_reserved5_offset)
+
+/* TODO: It would make future maintenance easier to just hardcode the
+ * above values. In particular, ECMA119 states the offsets as part of
+ * the standard. That would eliminate the need for the following check.*/
+#if PVD_reserved5_offset != 1395
+#error PVD offset and size definitions are wrong.
+#endif
+
+
+/* Structure of optional on-disk supplementary volume descriptor. */
+#define SVD_type_offset 0
+#define SVD_type_size 1
+#define SVD_id_offset (SVD_type_offset + SVD_type_size)
+#define SVD_id_size 5
+#define SVD_version_offset (SVD_id_offset + SVD_id_size)
+#define SVD_version_size 1
+/* ... */
+#define SVD_reserved1_offset 72
+#define SVD_reserved1_size 8
+#define SVD_volume_space_size_offset 80
+#define SVD_volume_space_size_size 8
+#define SVD_escape_sequences_offset (SVD_volume_space_size_offset + SVD_volume_space_size_size)
+#define SVD_escape_sequences_size 32
+/* ... */
+#define SVD_logical_block_size_offset 128
+#define SVD_logical_block_size_size 4
+#define SVD_type_L_path_table_offset 140
+#define SVD_type_M_path_table_offset 148
+/* ... */
+#define SVD_root_directory_record_offset 156
+#define SVD_root_directory_record_size 34
+#define SVD_file_structure_version_offset 881
+#define SVD_reserved2_offset 882
+#define SVD_reserved2_size 1
+#define SVD_reserved3_offset 1395
+#define SVD_reserved3_size 653
+/* ... */
+/* FIXME: validate correctness of last SVD entry offset. */
+
+/* Structure of an on-disk directory record. */
+/* Note: ISO9660 stores each multi-byte integer twice, once in
+ * each byte order. The sizes here are the size of just one
+ * of the two integers. (This is why the offset of a field isn't
+ * the same as the offset+size of the previous field.) */
+#define DR_length_offset 0
+#define DR_length_size 1
+#define DR_ext_attr_length_offset 1
+#define DR_ext_attr_length_size 1
+#define DR_extent_offset 2
+#define DR_extent_size 4
+#define DR_size_offset 10
+#define DR_size_size 4
+#define DR_date_offset 18
+#define DR_date_size 7
+#define DR_flags_offset 25
+#define DR_flags_size 1
+#define DR_file_unit_size_offset 26
+#define DR_file_unit_size_size 1
+#define DR_interleave_offset 27
+#define DR_interleave_size 1
+#define DR_volume_sequence_number_offset 28
+#define DR_volume_sequence_number_size 2
+#define DR_name_len_offset 32
+#define DR_name_len_size 1
+#define DR_name_offset 33
+
+#ifdef HAVE_ZLIB_H
+static const unsigned char zisofs_magic[8] = {
+ 0x37, 0xE4, 0x53, 0x96, 0xC9, 0xDB, 0xD6, 0x07
+};
+
+struct zisofs {
+ /* Set 1 if this file compressed by paged zlib */
+ int pz;
+ int pz_log2_bs; /* Log2 of block size */
+ uint64_t pz_uncompressed_size;
+
+ int initialized;
+ unsigned char *uncompressed_buffer;
+ size_t uncompressed_buffer_size;
+
+ uint32_t pz_offset;
+ unsigned char header[16];
+ size_t header_avail;
+ int header_passed;
+ unsigned char *block_pointers;
+ size_t block_pointers_alloc;
+ size_t block_pointers_size;
+ size_t block_pointers_avail;
+ size_t block_off;
+ uint32_t block_avail;
+
+ z_stream stream;
+ int stream_valid;
+};
+#else
+struct zisofs {
+ /* Set 1 if this file compressed by paged zlib */
+ int pz;
+};
+#endif
+
+struct content {
+ uint64_t offset;/* Offset on disk. */
+ uint64_t size; /* File size in bytes. */
+ struct content *next;
+};
+
+/* In-memory storage for a directory record. */
+struct file_info {
+ struct file_info *use_next;
+ struct file_info *parent;
+ struct file_info *next;
+ struct file_info *re_next;
+ int subdirs;
+ uint64_t key; /* Heap Key. */
+ uint64_t offset; /* Offset on disk. */
+ uint64_t size; /* File size in bytes. */
+ uint32_t ce_offset; /* Offset of CE. */
+ uint32_t ce_size; /* Size of CE. */
+ char rr_moved; /* Flag to rr_moved. */
+ char rr_moved_has_re_only;
+ char re; /* Having RRIP "RE" extension. */
+ char re_descendant;
+ uint64_t cl_offset; /* Having RRIP "CL" extension. */
+ int birthtime_is_set;
+ time_t birthtime; /* File created time. */
+ time_t mtime; /* File last modified time. */
+ time_t atime; /* File last accessed time. */
+ time_t ctime; /* File attribute change time. */
+ uint64_t rdev; /* Device number. */
+ mode_t mode;
+ uid_t uid;
+ gid_t gid;
+ int64_t number;
+ int nlinks;
+ struct archive_string name; /* Pathname */
+ char name_continues; /* Non-zero if name continues */
+ struct archive_string symlink;
+ char symlink_continues; /* Non-zero if link continues */
+ /* Set 1 if this file compressed by paged zlib(zisofs) */
+ int pz;
+ int pz_log2_bs; /* Log2 of block size */
+ uint64_t pz_uncompressed_size;
+ /* Set 1 if this file is multi extent. */
+ int multi_extent;
+ struct {
+ struct content *first;
+ struct content **last;
+ } contents;
+ struct {
+ struct file_info *first;
+ struct file_info **last;
+ } rede_files;
+};
+
+struct heap_queue {
+ struct file_info **files;
+ int allocated;
+ int used;
+};
+
+struct iso9660 {
+ int magic;
+#define ISO9660_MAGIC 0x96609660
+
+ int opt_support_joliet;
+ int opt_support_rockridge;
+
+ struct archive_string pathname;
+ char seenRockridge; /* Set true if RR extensions are used. */
+ char seenSUSP; /* Set true if SUSP is beging used. */
+ char seenJoliet;
+
+ unsigned char suspOffset;
+ struct file_info *rr_moved;
+ struct read_ce_queue {
+ struct read_ce_req {
+ uint64_t offset;/* Offset of CE on disk. */
+ struct file_info *file;
+ } *reqs;
+ int cnt;
+ int allocated;
+ } read_ce_req;
+
+ int64_t previous_number;
+ struct archive_string previous_pathname;
+
+ struct file_info *use_files;
+ struct heap_queue pending_files;
+ struct {
+ struct file_info *first;
+ struct file_info **last;
+ } cache_files;
+ struct {
+ struct file_info *first;
+ struct file_info **last;
+ } re_files;
+
+ uint64_t current_position;
+ ssize_t logical_block_size;
+ uint64_t volume_size; /* Total size of volume in bytes. */
+ int32_t volume_block;/* Total size of volume in logical blocks. */
+
+ struct vd {
+ int location; /* Location of Extent. */
+ uint32_t size;
+ } primary, joliet;
+
+ off_t entry_sparse_offset;
+ int64_t entry_bytes_remaining;
+ struct zisofs entry_zisofs;
+ struct content *entry_content;
+};
+
+static int archive_read_format_iso9660_bid(struct archive_read *);
+static int archive_read_format_iso9660_options(struct archive_read *,
+ const char *, const char *);
+static int archive_read_format_iso9660_cleanup(struct archive_read *);
+static int archive_read_format_iso9660_read_data(struct archive_read *,
+ const void **, size_t *, off_t *);
+static int archive_read_format_iso9660_read_data_skip(struct archive_read *);
+static int archive_read_format_iso9660_read_header(struct archive_read *,
+ struct archive_entry *);
+static const char *build_pathname(struct archive_string *, struct file_info *);
+#if DEBUG
+static void dump_isodirrec(FILE *, const unsigned char *isodirrec);
+#endif
+static time_t time_from_tm(struct tm *);
+static time_t isodate17(const unsigned char *);
+static time_t isodate7(const unsigned char *);
+static int isBootRecord(struct iso9660 *, const unsigned char *);
+static int isVolumePartition(struct iso9660 *, const unsigned char *);
+static int isVDSetTerminator(struct iso9660 *, const unsigned char *);
+static int isJolietSVD(struct iso9660 *, const unsigned char *);
+static int isSVD(struct iso9660 *, const unsigned char *);
+static int isEVD(struct iso9660 *, const unsigned char *);
+static int isPVD(struct iso9660 *, const unsigned char *);
+static int next_cache_entry(struct archive_read *, struct iso9660 *,
+ struct file_info **);
+static int next_entry_seek(struct archive_read *a, struct iso9660 *iso9660,
+ struct file_info **pfile);
+static struct file_info *
+ parse_file_info(struct archive_read *a,
+ struct file_info *parent, const unsigned char *isodirrec);
+static int parse_rockridge(struct archive_read *a,
+ struct file_info *file, const unsigned char *start,
+ const unsigned char *end);
+static int register_CE(struct archive_read *a, int32_t location,
+ struct file_info *file);
+static int read_CE(struct archive_read *a, struct iso9660 *iso9660);
+static void parse_rockridge_NM1(struct file_info *,
+ const unsigned char *, int);
+static void parse_rockridge_SL1(struct file_info *,
+ const unsigned char *, int);
+static void parse_rockridge_TF1(struct file_info *,
+ const unsigned char *, int);
+static void parse_rockridge_ZF1(struct file_info *,
+ const unsigned char *, int);
+static void register_file(struct iso9660 *, struct file_info *);
+static void release_files(struct iso9660 *);
+static unsigned toi(const void *p, int n);
+static inline void re_add_entry(struct iso9660 *, struct file_info *);
+static inline struct file_info * re_get_entry(struct iso9660 *);
+static inline int rede_add_entry(struct file_info *);
+static inline struct file_info * rede_get_entry(struct file_info *);
+static inline void cache_add_entry(struct iso9660 *iso9660,
+ struct file_info *file);
+static inline struct file_info *cache_get_entry(struct iso9660 *iso9660);
+static void heap_add_entry(struct heap_queue *heap,
+ struct file_info *file, uint64_t key);
+static struct file_info *heap_get_entry(struct heap_queue *heap);
+
+#define add_entry(iso9660, file) \
+ heap_add_entry(&((iso9660)->pending_files), file, file->offset)
+#define next_entry(iso9660) \
+ heap_get_entry(&((iso9660)->pending_files))
+
+int
+archive_read_support_format_iso9660(struct archive *_a)
+{
+ struct archive_read *a = (struct archive_read *)_a;
+ struct iso9660 *iso9660;
+ int r;
+
+ iso9660 = (struct iso9660 *)malloc(sizeof(*iso9660));
+ if (iso9660 == NULL) {
+ archive_set_error(&a->archive, ENOMEM, "Can't allocate iso9660 data");
+ return (ARCHIVE_FATAL);
+ }
+ memset(iso9660, 0, sizeof(*iso9660));
+ iso9660->magic = ISO9660_MAGIC;
+ iso9660->cache_files.first = NULL;
+ iso9660->cache_files.last = &(iso9660->cache_files.first);
+ iso9660->re_files.first = NULL;
+ iso9660->re_files.last = &(iso9660->re_files.first);
+ /* Enable to support Joliet extensions by default. */
+ iso9660->opt_support_joliet = 1;
+ /* Enable to support Rock Ridge extensions by default. */
+ iso9660->opt_support_rockridge = 1;
+
+ r = __archive_read_register_format(a,
+ iso9660,
+ "iso9660",
+ archive_read_format_iso9660_bid,
+ archive_read_format_iso9660_options,
+ archive_read_format_iso9660_read_header,
+ archive_read_format_iso9660_read_data,
+ archive_read_format_iso9660_read_data_skip,
+ archive_read_format_iso9660_cleanup);
+
+ if (r != ARCHIVE_OK) {
+ free(iso9660);
+ return (r);
+ }
+ return (ARCHIVE_OK);
+}
+
+
+static int
+archive_read_format_iso9660_bid(struct archive_read *a)
+{
+ struct iso9660 *iso9660;
+ ssize_t bytes_read;
+ const void *h;
+ const unsigned char *p;
+ int seenTerminator;
+
+ iso9660 = (struct iso9660 *)(a->format->data);
+
+ /*
+ * Skip the first 32k (reserved area) and get the first
+ * 8 sectors of the volume descriptor table. Of course,
+ * if the I/O layer gives us more, we'll take it.
+ */
+#define RESERVED_AREA (SYSTEM_AREA_BLOCK * LOGICAL_BLOCK_SIZE)
+ h = __archive_read_ahead(a,
+ RESERVED_AREA + 8 * LOGICAL_BLOCK_SIZE,
+ &bytes_read);
+ if (h == NULL)
+ return (-1);
+ p = (const unsigned char *)h;
+
+ /* Skip the reserved area. */
+ bytes_read -= RESERVED_AREA;
+ p += RESERVED_AREA;
+
+ /* Check each volume descriptor. */
+ seenTerminator = 0;
+ for (; bytes_read > LOGICAL_BLOCK_SIZE;
+ bytes_read -= LOGICAL_BLOCK_SIZE, p += LOGICAL_BLOCK_SIZE) {
+ /* Do not handle undefined Volume Descriptor Type. */
+ if (p[0] >= 4 && p[0] <= 254)
+ return (0);
+ /* Standard Identifier must be "CD001" */
+ if (memcmp(p + 1, "CD001", 5) != 0)
+ return (0);
+ if (!iso9660->primary.location) {
+ if (isPVD(iso9660, p))
+ continue;
+ }
+ if (!iso9660->joliet.location) {
+ if (isJolietSVD(iso9660, p))
+ continue;
+ }
+ if (isBootRecord(iso9660, p))
+ continue;
+ if (isEVD(iso9660, p))
+ continue;
+ if (isSVD(iso9660, p))
+ continue;
+ if (isVolumePartition(iso9660, p))
+ continue;
+ if (isVDSetTerminator(iso9660, p)) {
+ seenTerminator = 1;
+ break;
+ }
+ return (0);
+ }
+ /*
+ * ISO 9660 format must have Primary Volume Descriptor and
+ * Volume Descriptor Set Terminator.
+ */
+ if (seenTerminator && iso9660->primary.location > 16)
+ return (48);
+
+ /* We didn't find a valid PVD; return a bid of zero. */
+ return (0);
+}
+
+static int
+archive_read_format_iso9660_options(struct archive_read *a,
+ const char *key, const char *val)
+{
+ struct iso9660 *iso9660;
+
+ iso9660 = (struct iso9660 *)(a->format->data);
+
+ if (strcmp(key, "joliet") == 0) {
+ if (val == NULL || strcmp(val, "off") == 0 ||
+ strcmp(val, "ignore") == 0 ||
+ strcmp(val, "disable") == 0 ||
+ strcmp(val, "0") == 0)
+ iso9660->opt_support_joliet = 0;
+ else
+ iso9660->opt_support_joliet = 1;
+ return (ARCHIVE_OK);
+ }
+ if (strcmp(key, "rockridge") == 0 ||
+ strcmp(key, "Rockridge") == 0) {
+ iso9660->opt_support_rockridge = val != NULL;
+ return (ARCHIVE_OK);
+ }
+
+ /* Note: The "warn" return is just to inform the options
+ * supervisor that we didn't handle it. It will generate
+ * a suitable error if noone used this option. */
+ return (ARCHIVE_WARN);
+}
+
+static int
+isBootRecord(struct iso9660 *iso9660, const unsigned char *h)
+{
+ (void)iso9660; /* UNUSED */
+
+ /* Type of the Volume Descriptor Boot Record must be 0. */
+ if (h[0] != 0)
+ return (0);
+
+ /* Volume Descriptor Version must be 1. */
+ if (h[6] != 1)
+ return (0);
+
+ return (1);
+}
+
+static int
+isVolumePartition(struct iso9660 *iso9660, const unsigned char *h)
+{
+ int32_t location;
+
+ /* Type of the Volume Partition Descriptor must be 3. */
+ if (h[0] != 3)
+ return (0);
+
+ /* Volume Descriptor Version must be 1. */
+ if (h[6] != 1)
+ return (0);
+ /* Unused Field */
+ if (h[7] != 0)
+ return (0);
+
+ location = archive_le32dec(h + 72);
+ if (location <= SYSTEM_AREA_BLOCK ||
+ location >= iso9660->volume_block)
+ return (0);
+ if ((uint32_t)location != archive_be32dec(h + 76))
+ return (0);
+
+ return (1);
+}
+
+static int
+isVDSetTerminator(struct iso9660 *iso9660, const unsigned char *h)
+{
+ int i;
+
+ (void)iso9660; /* UNUSED */
+
+ /* Type of the Volume Descriptor Set Terminator must be 255. */
+ if (h[0] != 255)
+ return (0);
+
+ /* Volume Descriptor Version must be 1. */
+ if (h[6] != 1)
+ return (0);
+
+ /* Reserved field must be 0. */
+ for (i = 7; i < 2048; ++i)
+ if (h[i] != 0)
+ return (0);
+
+ return (1);
+}
+
+static int
+isJolietSVD(struct iso9660 *iso9660, const unsigned char *h)
+{
+ const unsigned char *p;
+ ssize_t logical_block_size;
+ int32_t volume_block;
+
+ /* Check if current sector is a kind of Supplementary Volume
+ * Descriptor. */
+ if (!isSVD(iso9660, h))
+ return (0);
+
+ /* FIXME: do more validations according to joliet spec. */
+
+ /* check if this SVD contains joliet extension! */
+ p = h + SVD_escape_sequences_offset;
+ /* N.B. Joliet spec says p[1] == '\\', but.... */
+ if (p[0] == '%' && p[1] == '/') {
+ int level = 0;
+
+ if (p[2] == '@')
+ level = 1;
+ else if (p[2] == 'C')
+ level = 2;
+ else if (p[2] == 'E')
+ level = 3;
+ else /* not joliet */
+ return (0);
+
+ iso9660->seenJoliet = level;
+
+ } else /* not joliet */
+ return (0);
+
+ logical_block_size =
+ archive_le16dec(h + SVD_logical_block_size_offset);
+ volume_block = archive_le32dec(h + SVD_volume_space_size_offset);
+
+ iso9660->logical_block_size = logical_block_size;
+ iso9660->volume_block = volume_block;
+ iso9660->volume_size = logical_block_size * (uint64_t)volume_block;
+ /* Read Root Directory Record in Volume Descriptor. */
+ p = h + SVD_root_directory_record_offset;
+ iso9660->joliet.location = archive_le32dec(p + DR_extent_offset);
+ iso9660->joliet.size = archive_le32dec(p + DR_size_offset);
+
+ return (48);
+}
+
+static int
+isSVD(struct iso9660 *iso9660, const unsigned char *h)
+{
+ const unsigned char *p;
+ ssize_t logical_block_size;
+ int32_t volume_block;
+ int32_t location;
+ int i;
+
+ (void)iso9660; /* UNUSED */
+
+ /* Type 2 means it's a SVD. */
+ if (h[SVD_type_offset] != 2)
+ return (0);
+
+ /* Reserved field must be 0. */
+ for (i = 0; i < SVD_reserved1_size; ++i)
+ if (h[SVD_reserved1_offset + i] != 0)
+ return (0);
+ for (i = 0; i < SVD_reserved2_size; ++i)
+ if (h[SVD_reserved2_offset + i] != 0)
+ return (0);
+ for (i = 0; i < SVD_reserved3_size; ++i)
+ if (h[SVD_reserved3_offset + i] != 0)
+ return (0);
+
+ /* File structure version must be 1 for ISO9660/ECMA119. */
+ if (h[SVD_file_structure_version_offset] != 1)
+ return (0);
+
+ logical_block_size =
+ archive_le16dec(h + SVD_logical_block_size_offset);
+ if (logical_block_size <= 0)
+ return (0);
+
+ volume_block = archive_le32dec(h + SVD_volume_space_size_offset);
+ if (volume_block <= SYSTEM_AREA_BLOCK+4)
+ return (0);
+
+ /* Location of Occurrence of Type L Path Table must be
+ * available location,
+ * >= SYSTEM_AREA_BLOCK(16) + 2 and < Volume Space Size. */
+ location = archive_le32dec(h+SVD_type_L_path_table_offset);
+ if (location < SYSTEM_AREA_BLOCK+2 || location >= volume_block)
+ return (0);
+
+ /* The Type M Path Table must be at a valid location (WinISO
+ * and probably other programs omit this, so we allow zero)
+ *
+ * >= SYSTEM_AREA_BLOCK(16) + 2 and < Volume Space Size. */
+ location = archive_be32dec(h+SVD_type_M_path_table_offset);
+ if ((location > 0 && location < SYSTEM_AREA_BLOCK+2)
+ || location >= volume_block)
+ return (0);
+
+ /* Read Root Directory Record in Volume Descriptor. */
+ p = h + SVD_root_directory_record_offset;
+ if (p[DR_length_offset] != 34)
+ return (0);
+
+ return (48);
+}
+
+static int
+isEVD(struct iso9660 *iso9660, const unsigned char *h)
+{
+ const unsigned char *p;
+ ssize_t logical_block_size;
+ int32_t volume_block;
+ int32_t location;
+ int i;
+
+ (void)iso9660; /* UNUSED */
+
+ /* Type of the Enhanced Volume Descriptor must be 2. */
+ if (h[PVD_type_offset] != 2)
+ return (0);
+
+ /* EVD version must be 2. */
+ if (h[PVD_version_offset] != 2)
+ return (0);
+
+ /* Reserved field must be 0. */
+ if (h[PVD_reserved1_offset] != 0)
+ return (0);
+
+ /* Reserved field must be 0. */
+ for (i = 0; i < PVD_reserved2_size; ++i)
+ if (h[PVD_reserved2_offset + i] != 0)
+ return (0);
+
+ /* Reserved field must be 0. */
+ for (i = 0; i < PVD_reserved3_size; ++i)
+ if (h[PVD_reserved3_offset + i] != 0)
+ return (0);
+
+ /* Logical block size must be > 0. */
+ /* I've looked at Ecma 119 and can't find any stronger
+ * restriction on this field. */
+ logical_block_size =
+ archive_le16dec(h + PVD_logical_block_size_offset);
+ if (logical_block_size <= 0)
+ return (0);
+
+ volume_block =
+ archive_le32dec(h + PVD_volume_space_size_offset);
+ if (volume_block <= SYSTEM_AREA_BLOCK+4)
+ return (0);
+
+ /* File structure version must be 2 for ISO9660:1999. */
+ if (h[PVD_file_structure_version_offset] != 2)
+ return (0);
+
+ /* Location of Occurrence of Type L Path Table must be
+ * available location,
+ * >= SYSTEM_AREA_BLOCK(16) + 2 and < Volume Space Size. */
+ location = archive_le32dec(h+PVD_type_1_path_table_offset);
+ if (location < SYSTEM_AREA_BLOCK+2 || location >= volume_block)
+ return (0);
+
+ /* Location of Occurrence of Type M Path Table must be
+ * available location,
+ * >= SYSTEM_AREA_BLOCK(16) + 2 and < Volume Space Size. */
+ location = archive_be32dec(h+PVD_type_m_path_table_offset);
+ if ((location > 0 && location < SYSTEM_AREA_BLOCK+2)
+ || location >= volume_block)
+ return (0);
+
+ /* Reserved field must be 0. */
+ for (i = 0; i < PVD_reserved4_size; ++i)
+ if (h[PVD_reserved4_offset + i] != 0)
+ return (0);
+
+ /* Reserved field must be 0. */
+ for (i = 0; i < PVD_reserved5_size; ++i)
+ if (h[PVD_reserved5_offset + i] != 0)
+ return (0);
+
+ /* Read Root Directory Record in Volume Descriptor. */
+ p = h + PVD_root_directory_record_offset;
+ if (p[DR_length_offset] != 34)
+ return (0);
+
+ return (48);
+}
+
+static int
+isPVD(struct iso9660 *iso9660, const unsigned char *h)
+{
+ const unsigned char *p;
+ ssize_t logical_block_size;
+ int32_t volume_block;
+ int32_t location;
+ int i;
+
+ /* Type of the Primary Volume Descriptor must be 1. */
+ if (h[PVD_type_offset] != 1)
+ return (0);
+
+ /* PVD version must be 1. */
+ if (h[PVD_version_offset] != 1)
+ return (0);
+
+ /* Reserved field must be 0. */
+ if (h[PVD_reserved1_offset] != 0)
+ return (0);
+
+ /* Reserved field must be 0. */
+ for (i = 0; i < PVD_reserved2_size; ++i)
+ if (h[PVD_reserved2_offset + i] != 0)
+ return (0);
+
+ /* Reserved field must be 0. */
+ for (i = 0; i < PVD_reserved3_size; ++i)
+ if (h[PVD_reserved3_offset + i] != 0)
+ return (0);
+
+ /* Logical block size must be > 0. */
+ /* I've looked at Ecma 119 and can't find any stronger
+ * restriction on this field. */
+ logical_block_size =
+ archive_le16dec(h + PVD_logical_block_size_offset);
+ if (logical_block_size <= 0)
+ return (0);
+
+ volume_block = archive_le32dec(h + PVD_volume_space_size_offset);
+ if (volume_block <= SYSTEM_AREA_BLOCK+4)
+ return (0);
+
+ /* File structure version must be 1 for ISO9660/ECMA119. */
+ if (h[PVD_file_structure_version_offset] != 1)
+ return (0);
+
+ /* Location of Occurrence of Type L Path Table must be
+ * available location,
+ * > SYSTEM_AREA_BLOCK(16) + 2 and < Volume Space Size. */
+ location = archive_le32dec(h+PVD_type_1_path_table_offset);
+ if (location < SYSTEM_AREA_BLOCK+2 || location >= volume_block)
+ return (0);
+
+ /* The Type M Path Table must also be at a valid location
+ * (although ECMA 119 requires a Type M Path Table, WinISO and
+ * probably other programs omit it, so we permit a zero here)
+ *
+ * >= SYSTEM_AREA_BLOCK(16) + 2 and < Volume Space Size. */
+ location = archive_be32dec(h+PVD_type_m_path_table_offset);
+ if ((location > 0 && location < SYSTEM_AREA_BLOCK+2)
+ || location >= volume_block)
+ return (0);
+
+ /* Reserved field must be 0. */
+ /* FreeBSD: makefs erroneously created images with 0x20 */
+ for (i = 0; i < PVD_reserved4_size; ++i)
+ if (h[PVD_reserved4_offset + i] != 0 &&
+ h[PVD_reserved4_offset + i] != 32)
+ return (0);
+
+ /* Reserved field must be 0. */
+ for (i = 0; i < PVD_reserved5_size; ++i)
+ if (h[PVD_reserved5_offset + i] != 0)
+ return (0);
+
+ /* XXX TODO: Check other values for sanity; reject more
+ * malformed PVDs. XXX */
+
+ /* Read Root Directory Record in Volume Descriptor. */
+ p = h + PVD_root_directory_record_offset;
+ if (p[DR_length_offset] != 34)
+ return (0);
+
+ iso9660->logical_block_size = logical_block_size;
+ iso9660->volume_block = volume_block;
+ iso9660->volume_size = logical_block_size * (uint64_t)volume_block;
+ iso9660->primary.location = archive_le32dec(p + DR_extent_offset);
+ iso9660->primary.size = archive_le32dec(p + DR_size_offset);
+
+ return (48);
+}
+
+static int
+read_children(struct archive_read *a, struct file_info *parent)
+{
+ struct iso9660 *iso9660;
+ const unsigned char *b, *p;
+ struct file_info *multi;
+ size_t step;
+
+ iso9660 = (struct iso9660 *)(a->format->data);
+ if (iso9660->current_position > parent->offset) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "Ignoring out-of-order directory (%s) %jd > %jd",
+ parent->name.s,
+ (intmax_t)iso9660->current_position,
+ (intmax_t)parent->offset);
+ return (ARCHIVE_WARN);
+ }
+ if (parent->offset + parent->size > iso9660->volume_size) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "Directory is beyond end-of-media: %s",
+ parent->name.s);
+ return (ARCHIVE_WARN);
+ }
+ if (iso9660->current_position < parent->offset) {
+ int64_t skipsize;
+
+ skipsize = parent->offset - iso9660->current_position;
+ skipsize = __archive_read_skip(a, skipsize);
+ if (skipsize < 0)
+ return ((int)skipsize);
+ iso9660->current_position = parent->offset;
+ }
+
+ step = ((parent->size + iso9660->logical_block_size -1) /
+ iso9660->logical_block_size) * iso9660->logical_block_size;
+ b = __archive_read_ahead(a, step, NULL);
+ if (b == NULL) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "Failed to read full block when scanning "
+ "ISO9660 directory list");
+ return (ARCHIVE_FATAL);
+ }
+ __archive_read_consume(a, step);
+ iso9660->current_position += step;
+ multi = NULL;
+ while (step) {
+ p = b;
+ b += iso9660->logical_block_size;
+ step -= iso9660->logical_block_size;
+ for (; *p != 0 && p < b && p + *p <= b; p += *p) {
+ struct file_info *child;
+
+ /* N.B.: these special directory identifiers
+ * are 8 bit "values" even on a
+ * Joliet CD with UCS-2 (16bit) encoding.
+ */
+
+ /* Skip '.' entry. */
+ if (*(p + DR_name_len_offset) == 1
+ && *(p + DR_name_offset) == '\0')
+ continue;
+ /* Skip '..' entry. */
+ if (*(p + DR_name_len_offset) == 1
+ && *(p + DR_name_offset) == '\001')
+ continue;
+ child = parse_file_info(a, parent, p);
+ if (child == NULL)
+ return (ARCHIVE_FATAL);
+ if (child->cl_offset == 0 &&
+ (child->multi_extent || multi != NULL)) {
+ struct content *con;
+
+ if (multi == NULL) {
+ multi = child;
+ multi->contents.first = NULL;
+ multi->contents.last =
+ &(multi->contents.first);
+ }
+ con = malloc(sizeof(struct content));
+ if (con == NULL) {
+ archive_set_error(
+ &a->archive, ENOMEM,
+ "No memory for "
+ "multi extent");
+ return (ARCHIVE_FATAL);
+ }
+ con->offset = child->offset;
+ con->size = child->size;
+ con->next = NULL;
+ *multi->contents.last = con;
+ multi->contents.last = &(con->next);
+ if (multi == child)
+ add_entry(iso9660, child);
+ else {
+ multi->size += child->size;
+ if (!child->multi_extent)
+ multi = NULL;
+ }
+ } else
+ add_entry(iso9660, child);
+ }
+ }
+
+ /* Read data which recorded by RRIP "CE" extension. */
+ if (read_CE(a, iso9660) != ARCHIVE_OK)
+ return (ARCHIVE_FATAL);
+
+ return (ARCHIVE_OK);
+}
+
+static int
+archive_read_format_iso9660_read_header(struct archive_read *a,
+ struct archive_entry *entry)
+{
+ struct iso9660 *iso9660;
+ struct file_info *file;
+ int r, rd_r = ARCHIVE_OK;
+
+ iso9660 = (struct iso9660 *)(a->format->data);
+
+ if (!a->archive.archive_format) {
+ a->archive.archive_format = ARCHIVE_FORMAT_ISO9660;
+ a->archive.archive_format_name = "ISO9660";
+ }
+
+ if (iso9660->current_position == 0) {
+ int64_t skipsize;
+ struct vd *vd;
+ const void *block;
+ char seenJoliet;
+
+ vd = &(iso9660->primary);
+ if (!iso9660->opt_support_joliet)
+ iso9660->seenJoliet = 0;
+ if (iso9660->seenJoliet &&
+ vd->location > iso9660->joliet.location)
+ /* This condition is unlikely; by way of caution. */
+ vd = &(iso9660->joliet);
+
+ skipsize = LOGICAL_BLOCK_SIZE * vd->location;
+ skipsize = __archive_read_skip(a, skipsize);
+ if (skipsize < 0)
+ return ((int)skipsize);
+ iso9660->current_position = skipsize;
+
+ block = __archive_read_ahead(a, vd->size, NULL);
+ if (block == NULL) {
+ archive_set_error(&a->archive,
+ ARCHIVE_ERRNO_MISC,
+ "Failed to read full block when scanning "
+ "ISO9660 directory list");
+ return (ARCHIVE_FATAL);
+ }
+
+ /*
+ * While reading Root Directory, flag seenJoliet
+ * must be zero to avoid converting special name
+ * 0x00(Current Directory) and next byte to UCS2.
+ */
+ seenJoliet = iso9660->seenJoliet;/* Save flag. */
+ iso9660->seenJoliet = 0;
+ file = parse_file_info(a, NULL, block);
+ if (file == NULL)
+ return (ARCHIVE_FATAL);
+ iso9660->seenJoliet = seenJoliet;
+ if (vd == &(iso9660->primary) && iso9660->seenRockridge
+ && iso9660->seenJoliet)
+ /*
+ * If iso image has RockRidge and Joliet,
+ * we use RockRidge Extensions.
+ */
+ iso9660->seenJoliet = 0;
+ if (vd == &(iso9660->primary) && !iso9660->seenRockridge
+ && iso9660->seenJoliet) {
+ /* Switch reading data from primary to joliet. */
+ vd = &(iso9660->joliet);
+ skipsize = LOGICAL_BLOCK_SIZE * vd->location;
+ skipsize -= iso9660->current_position;
+ skipsize = __archive_read_skip(a, skipsize);
+ if (skipsize < 0)
+ return ((int)skipsize);
+ iso9660->current_position += skipsize;
+
+ block = __archive_read_ahead(a, vd->size, NULL);
+ if (block == NULL) {
+ archive_set_error(&a->archive,
+ ARCHIVE_ERRNO_MISC,
+ "Failed to read full block when scanning "
+ "ISO9660 directory list");
+ return (ARCHIVE_FATAL);
+ }
+ seenJoliet = iso9660->seenJoliet;/* Save flag. */
+ iso9660->seenJoliet = 0;
+ file = parse_file_info(a, NULL, block);
+ if (file == NULL)
+ return (ARCHIVE_FATAL);
+ iso9660->seenJoliet = seenJoliet;
+ }
+ /* Store the root directory in the pending list. */
+ add_entry(iso9660, file);
+ if (iso9660->seenRockridge) {
+ a->archive.archive_format =
+ ARCHIVE_FORMAT_ISO9660_ROCKRIDGE;
+ a->archive.archive_format_name =
+ "ISO9660 with Rockridge extensions";
+ }
+ }
+
+ /* Get the next entry that appears after the current offset. */
+ r = next_entry_seek(a, iso9660, &file);
+ if (r != ARCHIVE_OK)
+ return (r);
+
+ iso9660->entry_bytes_remaining = file->size;
+ iso9660->entry_sparse_offset = 0; /* Offset for sparse-file-aware clients. */
+
+ if (file->offset + file->size > iso9660->volume_size) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "File is beyond end-of-media: %s", file->name.s);
+ iso9660->entry_bytes_remaining = 0;
+ iso9660->entry_sparse_offset = 0;
+ return (ARCHIVE_WARN);
+ }
+
+ /* Set up the entry structure with information about this entry. */
+ archive_entry_set_mode(entry, file->mode);
+ archive_entry_set_uid(entry, file->uid);
+ archive_entry_set_gid(entry, file->gid);
+ archive_entry_set_nlink(entry, file->nlinks);
+ if (file->birthtime_is_set)
+ archive_entry_set_birthtime(entry, file->birthtime, 0);
+ else
+ archive_entry_unset_birthtime(entry);
+ archive_entry_set_mtime(entry, file->mtime, 0);
+ archive_entry_set_ctime(entry, file->ctime, 0);
+ archive_entry_set_atime(entry, file->atime, 0);
+ /* N.B.: Rock Ridge supports 64-bit device numbers. */
+ archive_entry_set_rdev(entry, (dev_t)file->rdev);
+ archive_entry_set_size(entry, iso9660->entry_bytes_remaining);
+ archive_string_empty(&iso9660->pathname);
+ archive_entry_set_pathname(entry,
+ build_pathname(&iso9660->pathname, file));
+ if (file->symlink.s != NULL)
+ archive_entry_copy_symlink(entry, file->symlink.s);
+
+ /* Note: If the input isn't seekable, we can't rewind to
+ * return the same body again, so if the next entry refers to
+ * the same data, we have to return it as a hardlink to the
+ * original entry. */
+ if (file->number != -1 &&
+ file->number == iso9660->previous_number) {
+ archive_entry_set_hardlink(entry,
+ iso9660->previous_pathname.s);
+ archive_entry_unset_size(entry);
+ iso9660->entry_bytes_remaining = 0;
+ iso9660->entry_sparse_offset = 0;
+ return (ARCHIVE_OK);
+ }
+
+ /* Except for the hardlink case above, if the offset of the
+ * next entry is before our current position, we can't seek
+ * backwards to extract it, so issue a warning. Note that
+ * this can only happen if this entry was added to the heap
+ * after we passed this offset, that is, only if the directory
+ * mentioning this entry is later than the body of the entry.
+ * Such layouts are very unusual; most ISO9660 writers lay out
+ * and record all directory information first, then store
+ * all file bodies. */
+ /* TODO: Someday, libarchive's I/O core will support optional
+ * seeking. When that day comes, this code should attempt to
+ * seek and only return the error if the seek fails. That
+ * will give us support for whacky ISO images that require
+ * seeking while retaining the ability to read almost all ISO
+ * images in a streaming fashion. */
+ if ((file->mode & AE_IFMT) != AE_IFDIR &&
+ file->offset < iso9660->current_position) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "Ignoring out-of-order file (%s) %jd < %jd",
+ iso9660->pathname.s,
+ (intmax_t)file->offset,
+ (intmax_t)iso9660->current_position);
+ iso9660->entry_bytes_remaining = 0;
+ iso9660->entry_sparse_offset = 0;
+ return (ARCHIVE_WARN);
+ }
+
+ /* Initialize zisofs variables. */
+ iso9660->entry_zisofs.pz = file->pz;
+ if (file->pz) {
+#ifdef HAVE_ZLIB_H
+ struct zisofs *zisofs;
+
+ zisofs = &iso9660->entry_zisofs;
+ zisofs->initialized = 0;
+ zisofs->pz_log2_bs = file->pz_log2_bs;
+ zisofs->pz_uncompressed_size = file->pz_uncompressed_size;
+ zisofs->pz_offset = 0;
+ zisofs->header_avail = 0;
+ zisofs->header_passed = 0;
+ zisofs->block_pointers_avail = 0;
+#endif
+ archive_entry_set_size(entry, file->pz_uncompressed_size);
+ }
+
+ iso9660->previous_number = file->number;
+ archive_strcpy(&iso9660->previous_pathname, iso9660->pathname.s);
+
+ /* Reset entry_bytes_remaining if the file is multi extent. */
+ iso9660->entry_content = file->contents.first;
+ if (iso9660->entry_content != NULL)
+ iso9660->entry_bytes_remaining = iso9660->entry_content->size;
+
+ if (archive_entry_filetype(entry) == AE_IFDIR) {
+ /* Overwrite nlinks by proper link number which is
+ * calculated from number of sub directories. */
+ archive_entry_set_nlink(entry, 2 + file->subdirs);
+ /* Directory data has been read completely. */
+ iso9660->entry_bytes_remaining = 0;
+ iso9660->entry_sparse_offset = 0;
+ }
+
+ if (rd_r != ARCHIVE_OK)
+ return (rd_r);
+ return (ARCHIVE_OK);
+}
+
+static int
+archive_read_format_iso9660_read_data_skip(struct archive_read *a)
+{
+ /* Because read_next_header always does an explicit skip
+ * to the next entry, we don't need to do anything here. */
+ (void)a; /* UNUSED */
+ return (ARCHIVE_OK);
+}
+
+#ifdef HAVE_ZLIB_H
+
+static int
+zisofs_read_data(struct archive_read *a,
+ const void **buff, size_t *size, off_t *offset)
+{
+ struct iso9660 *iso9660;
+ struct zisofs *zisofs;
+ const unsigned char *p;
+ size_t avail;
+ ssize_t bytes_read;
+ size_t uncompressed_size;
+ int r;
+
+ iso9660 = (struct iso9660 *)(a->format->data);
+ zisofs = &iso9660->entry_zisofs;
+
+ p = __archive_read_ahead(a, 1, &bytes_read);
+ if (bytes_read <= 0) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+ "Truncated zisofs file body");
+ return (ARCHIVE_FATAL);
+ }
+ if (bytes_read > iso9660->entry_bytes_remaining)
+ bytes_read = iso9660->entry_bytes_remaining;
+ avail = bytes_read;
+ uncompressed_size = 0;
+
+ if (!zisofs->initialized) {
+ size_t ceil, xsize;
+
+ /* Allocate block pointers buffer. */
+ ceil = (zisofs->pz_uncompressed_size +
+ (1LL << zisofs->pz_log2_bs) - 1)
+ >> zisofs->pz_log2_bs;
+ xsize = (ceil + 1) * 4;
+ if (zisofs->block_pointers_alloc < xsize) {
+ size_t alloc;
+
+ if (zisofs->block_pointers != NULL)
+ free(zisofs->block_pointers);
+ alloc = ((xsize >> 10) + 1) << 10;
+ zisofs->block_pointers = malloc(alloc);
+ if (zisofs->block_pointers == NULL) {
+ archive_set_error(&a->archive, ENOMEM,
+ "No memory for zisofs decompression");
+ return (ARCHIVE_FATAL);
+ }
+ zisofs->block_pointers_alloc = alloc;
+ }
+ zisofs->block_pointers_size = xsize;
+
+ /* Allocate uncompressed data buffer. */
+ xsize = 1UL << zisofs->pz_log2_bs;
+ if (zisofs->uncompressed_buffer_size < xsize) {
+ if (zisofs->uncompressed_buffer != NULL)
+ free(zisofs->uncompressed_buffer);
+ zisofs->uncompressed_buffer = malloc(xsize);
+ if (zisofs->uncompressed_buffer == NULL) {
+ archive_set_error(&a->archive, ENOMEM,
+ "No memory for zisofs decompression");
+ return (ARCHIVE_FATAL);
+ }
+ }
+ zisofs->uncompressed_buffer_size = xsize;
+
+ /*
+ * Read the file header, and check the magic code of zisofs.
+ */
+ if (zisofs->header_avail < sizeof(zisofs->header)) {
+ xsize = sizeof(zisofs->header) - zisofs->header_avail;
+ if (avail < xsize)
+ xsize = avail;
+ memcpy(zisofs->header + zisofs->header_avail, p, xsize);
+ zisofs->header_avail += xsize;
+ avail -= xsize;
+ p += xsize;
+ }
+ if (!zisofs->header_passed &&
+ zisofs->header_avail == sizeof(zisofs->header)) {
+ int err = 0;
+
+ if (memcmp(zisofs->header, zisofs_magic,
+ sizeof(zisofs_magic)) != 0)
+ err = 1;
+ if (archive_le32dec(zisofs->header + 8)
+ != zisofs->pz_uncompressed_size)
+ err = 1;
+ if (zisofs->header[12] != 4)
+ err = 1;
+ if (zisofs->header[13] != zisofs->pz_log2_bs)
+ err = 1;
+ if (err) {
+ archive_set_error(&a->archive,
+ ARCHIVE_ERRNO_FILE_FORMAT,
+ "Illegal zisofs file body");
+ return (ARCHIVE_FATAL);
+ }
+ zisofs->header_passed = 1;
+ }
+ /*
+ * Read block pointers.
+ */
+ if (zisofs->header_passed &&
+ zisofs->block_pointers_avail < zisofs->block_pointers_size) {
+ xsize = zisofs->block_pointers_size
+ - zisofs->block_pointers_avail;
+ if (avail < xsize)
+ xsize = avail;
+ memcpy(zisofs->block_pointers
+ + zisofs->block_pointers_avail, p, xsize);
+ zisofs->block_pointers_avail += xsize;
+ avail -= xsize;
+ p += xsize;
+ if (zisofs->block_pointers_avail
+ == zisofs->block_pointers_size) {
+ /* We've got all block pointers and initialize
+ * related variables. */
+ zisofs->block_off = 0;
+ zisofs->block_avail = 0;
+ /* Complete a initialization */
+ zisofs->initialized = 1;
+ }
+ }
+
+ if (!zisofs->initialized)
+ goto next_data; /* We need more datas. */
+ }
+
+ /*
+ * Get block offsets from block pointers.
+ */
+ if (zisofs->block_avail == 0) {
+ uint32_t bst, bed;
+
+ if (zisofs->block_off + 4 >= zisofs->block_pointers_size) {
+ /* There isn't a pair of offsets. */
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+ "Illegal zisofs block pointers");
+ return (ARCHIVE_FATAL);
+ }
+ bst = archive_le32dec(zisofs->block_pointers + zisofs->block_off);
+ if (bst != zisofs->pz_offset + (bytes_read - avail)) {
+ /* TODO: Should we seek offset of current file by bst ? */
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+ "Illegal zisofs block pointers(cannot seek)");
+ return (ARCHIVE_FATAL);
+ }
+ bed = archive_le32dec(
+ zisofs->block_pointers + zisofs->block_off + 4);
+ if (bed < bst) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+ "Illegal zisofs block pointers");
+ return (ARCHIVE_FATAL);
+ }
+ zisofs->block_avail = bed - bst;
+ zisofs->block_off += 4;
+
+ /* Initialize compression library for new block. */
+ if (zisofs->stream_valid)
+ r = inflateReset(&zisofs->stream);
+ else
+ r = inflateInit(&zisofs->stream);
+ if (r != Z_OK) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "Can't initialize zisofs decompression.");
+ return (ARCHIVE_FATAL);
+ }
+ zisofs->stream_valid = 1;
+ zisofs->stream.total_in = 0;
+ zisofs->stream.total_out = 0;
+ }
+
+ /*
+ * Make uncompressed datas.
+ */
+ if (zisofs->block_avail == 0) {
+ memset(zisofs->uncompressed_buffer, 0,
+ zisofs->uncompressed_buffer_size);
+ uncompressed_size = zisofs->uncompressed_buffer_size;
+ } else {
+ zisofs->stream.next_in = (Bytef *)(uintptr_t)(const void *)p;
+ if (avail > zisofs->block_avail)
+ zisofs->stream.avail_in = zisofs->block_avail;
+ else
+ zisofs->stream.avail_in = avail;
+ zisofs->stream.next_out = zisofs->uncompressed_buffer;
+ zisofs->stream.avail_out = zisofs->uncompressed_buffer_size;
+
+ r = inflate(&zisofs->stream, 0);
+ switch (r) {
+ case Z_OK: /* Decompressor made some progress.*/
+ case Z_STREAM_END: /* Found end of stream. */
+ break;
+ default:
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "zisofs decompression failed (%d)", r);
+ return (ARCHIVE_FATAL);
+ }
+ uncompressed_size =
+ zisofs->uncompressed_buffer_size - zisofs->stream.avail_out;
+ avail -= zisofs->stream.next_in - p;
+ zisofs->block_avail -= zisofs->stream.next_in - p;
+ }
+next_data:
+ bytes_read -= avail;
+ *buff = zisofs->uncompressed_buffer;
+ *size = uncompressed_size;
+ *offset = iso9660->entry_sparse_offset;
+ iso9660->entry_sparse_offset += uncompressed_size;
+ iso9660->entry_bytes_remaining -= bytes_read;
+ iso9660->current_position += bytes_read;
+ zisofs->pz_offset += bytes_read;
+ __archive_read_consume(a, bytes_read);
+
+ return (ARCHIVE_OK);
+}
+
+#else /* HAVE_ZLIB_H */
+
+static int
+zisofs_read_data(struct archive_read *a,
+ const void **buff, size_t *size, off_t *offset)
+{
+
+ (void)buff;/* UNUSED */
+ (void)size;/* UNUSED */
+ (void)offset;/* UNUSED */
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+ "zisofs is not supported on this platform.");
+ return (ARCHIVE_FAILED);
+}
+
+#endif /* HAVE_ZLIB_H */
+
+static int
+archive_read_format_iso9660_read_data(struct archive_read *a,
+ const void **buff, size_t *size, off_t *offset)
+{
+ ssize_t bytes_read;
+ struct iso9660 *iso9660;
+
+ iso9660 = (struct iso9660 *)(a->format->data);
+ if (iso9660->entry_bytes_remaining <= 0) {
+ if (iso9660->entry_content != NULL)
+ iso9660->entry_content = iso9660->entry_content->next;
+ if (iso9660->entry_content == NULL) {
+ *buff = NULL;
+ *size = 0;
+ *offset = iso9660->entry_sparse_offset;
+ return (ARCHIVE_EOF);
+ }
+ /* Seek forward to the start of the entry. */
+ if (iso9660->current_position < iso9660->entry_content->offset) {
+ int64_t step;
+
+ step = iso9660->entry_content->offset -
+ iso9660->current_position;
+ step = __archive_read_skip(a, step);
+ if (step < 0)
+ return ((int)step);
+ iso9660->current_position =
+ iso9660->entry_content->offset;
+ }
+ if (iso9660->entry_content->offset < iso9660->current_position) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "Ignoring out-of-order file (%s) %jd < %jd",
+ iso9660->pathname.s,
+ (intmax_t)iso9660->entry_content->offset,
+ (intmax_t)iso9660->current_position);
+ *buff = NULL;
+ *size = 0;
+ *offset = iso9660->entry_sparse_offset;
+ return (ARCHIVE_WARN);
+ }
+ iso9660->entry_bytes_remaining = iso9660->entry_content->size;
+ }
+ if (iso9660->entry_zisofs.pz)
+ return (zisofs_read_data(a, buff, size, offset));
+
+ *buff = __archive_read_ahead(a, 1, &bytes_read);
+ if (bytes_read == 0)
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "Truncated input file");
+ if (*buff == NULL)
+ return (ARCHIVE_FATAL);
+ if (bytes_read > iso9660->entry_bytes_remaining)
+ bytes_read = iso9660->entry_bytes_remaining;
+ *size = bytes_read;
+ *offset = iso9660->entry_sparse_offset;
+ iso9660->entry_sparse_offset += bytes_read;
+ iso9660->entry_bytes_remaining -= bytes_read;
+ iso9660->current_position += bytes_read;
+ __archive_read_consume(a, bytes_read);
+ return (ARCHIVE_OK);
+}
+
+static int
+archive_read_format_iso9660_cleanup(struct archive_read *a)
+{
+ struct iso9660 *iso9660;
+ int r = ARCHIVE_OK;
+
+ iso9660 = (struct iso9660 *)(a->format->data);
+ release_files(iso9660);
+ free(iso9660->read_ce_req.reqs);
+ archive_string_free(&iso9660->pathname);
+ archive_string_free(&iso9660->previous_pathname);
+ if (iso9660->pending_files.files)
+ free(iso9660->pending_files.files);
+#ifdef HAVE_ZLIB_H
+ free(iso9660->entry_zisofs.uncompressed_buffer);
+ free(iso9660->entry_zisofs.block_pointers);
+ if (iso9660->entry_zisofs.stream_valid) {
+ if (inflateEnd(&iso9660->entry_zisofs.stream) != Z_OK) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "Failed to clean up zlib decompressor");
+ r = ARCHIVE_FATAL;
+ }
+ }
+#endif
+ free(iso9660);
+ (a->format->data) = NULL;
+ return (r);
+}
+
+/*
+ * This routine parses a single ISO directory record, makes sense
+ * of any extensions, and stores the result in memory.
+ */
+static struct file_info *
+parse_file_info(struct archive_read *a, struct file_info *parent,
+ const unsigned char *isodirrec)
+{
+ struct iso9660 *iso9660;
+ struct file_info *file;
+ size_t name_len;
+ const unsigned char *rr_start, *rr_end;
+ const unsigned char *p;
+ size_t dr_len;
+ uint64_t fsize;
+ int32_t location;
+ int flags;
+
+ iso9660 = (struct iso9660 *)(a->format->data);
+
+ dr_len = (size_t)isodirrec[DR_length_offset];
+ name_len = (size_t)isodirrec[DR_name_len_offset];
+ location = archive_le32dec(isodirrec + DR_extent_offset);
+ fsize = toi(isodirrec + DR_size_offset, DR_size_size);
+ /* Sanity check that dr_len needs at least 34. */
+ if (dr_len < 34) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "Invalid length of directory record");
+ return (NULL);
+ }
+ /* Sanity check that name_len doesn't exceed dr_len. */
+ if (dr_len - 33 < name_len || name_len == 0) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "Invalid length of file identifier");
+ return (NULL);
+ }
+ /* Sanity check that location doesn't exceed volume block.
+ * Don't check lower limit of location; it's possibility
+ * the location has negative value when file type is symbolic
+ * link or file size is zero. As far as I know latest mkisofs
+ * do that.
+ */
+ if (location > 0 &&
+ (location + ((fsize + iso9660->logical_block_size -1)
+ / iso9660->logical_block_size))
+ > (uint32_t)iso9660->volume_block) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "Invalid location of extent of file");
+ return (NULL);
+ }
+
+ /* Create a new file entry and copy data from the ISO dir record. */
+ file = (struct file_info *)malloc(sizeof(*file));
+ if (file == NULL) {
+ archive_set_error(&a->archive, ENOMEM,
+ "No memory for file entry");
+ return (NULL);
+ }
+ memset(file, 0, sizeof(*file));
+ file->parent = parent;
+ file->offset = iso9660->logical_block_size * (uint64_t)location;
+ file->size = fsize;
+ file->mtime = isodate7(isodirrec + DR_date_offset);
+ file->ctime = file->atime = file->mtime;
+ file->rede_files.first = NULL;
+ file->rede_files.last = &(file->rede_files.first);
+
+ p = isodirrec + DR_name_offset;
+ /* Rockridge extensions (if any) follow name. Compute this
+ * before fidgeting the name_len below. */
+ rr_start = p + name_len + (name_len & 1 ? 0 : 1);
+ rr_end = isodirrec + dr_len;
+
+ if (iso9660->seenJoliet) {
+ /* Joliet names are max 64 chars (128 bytes) according to spec,
+ * but genisoimage/mkisofs allows recording longer Joliet
+ * names which are 103 UCS2 characters(206 bytes) by their
+ * option '-joliet-long'.
+ */
+ wchar_t wbuff[103+1], *wp;
+ const unsigned char *c;
+
+ if (name_len > 206)
+ name_len = 206;
+ /* convert BE UTF-16 to wchar_t */
+ for (c = p, wp = wbuff;
+ c < (p + name_len) &&
+ wp < (wbuff + sizeof(wbuff)/sizeof(*wbuff) - 1);
+ c += 2) {
+ *wp++ = (((255 & (int)c[0]) << 8) | (255 & (int)c[1]));
+ }
+ *wp = L'\0';
+
+#if 0 /* untested code, is it at all useful on Joliet? */
+ /* trim trailing first version and dot from filename.
+ *
+ * Remember we where in UTF-16BE land!
+ * SEPARATOR 1 (.) and SEPARATOR 2 (;) are both
+ * 16 bits big endian characters on Joliet.
+ *
+ * TODO: sanitize filename?
+ * Joliet allows any UCS-2 char except:
+ * *, /, :, ;, ? and \.
+ */
+ /* Chop off trailing ';1' from files. */
+ if (*(wp-2) == ';' && *(wp-1) == '1') {
+ wp-=2;
+ *wp = L'\0';
+ }
+
+ /* Chop off trailing '.' from filenames. */
+ if (*(wp-1) == '.')
+ *(--wp) = L'\0';
+#endif
+
+ /* store the result in the file name field. */
+ archive_strappend_w_utf8(&file->name, wbuff);
+ } else {
+ /* Chop off trailing ';1' from files. */
+ if (name_len > 2 && p[name_len - 2] == ';' &&
+ p[name_len - 1] == '1')
+ name_len -= 2;
+ /* Chop off trailing '.' from filenames. */
+ if (name_len > 1 && p[name_len - 1] == '.')
+ --name_len;
+
+ archive_strncpy(&file->name, (const char *)p, name_len);
+ }
+
+ flags = isodirrec[DR_flags_offset];
+ if (flags & 0x02)
+ file->mode = AE_IFDIR | 0700;
+ else
+ file->mode = AE_IFREG | 0400;
+ if (flags & 0x80)
+ file->multi_extent = 1;
+ else
+ file->multi_extent = 0;
+ /*
+ * Use location for file number.
+ * File number is treated as inode number to find out harlink
+ * target. If Rockridge extensions is being used, file number
+ * will be overwritten by FILE SERIAL NUMBER of RRIP "PX"
+ * extension.
+ * NOTE: Old mkisofs did not record that FILE SERIAL NUMBER
+ * in ISO images.
+ */
+ if (file->size == 0 && location >= 0)
+ /* If file->size is zero, its location points wrong place.
+ * Dot not use it for file number.
+ * When location has negative value, it can be used
+ * for file number.
+ */
+ file->number = -1;
+ else
+ file->number = (int64_t)(uint32_t)location;
+
+ /* Rockridge extensions overwrite information from above. */
+ if (iso9660->opt_support_rockridge) {
+ if (parent == NULL && rr_end - rr_start >= 7) {
+ p = rr_start;
+ if (p[0] == 'S' && p[1] == 'P'
+ && p[2] == 7 && p[3] == 1
+ && p[4] == 0xBE && p[5] == 0xEF) {
+ /*
+ * SP extension stores the suspOffset
+ * (Number of bytes to skip between
+ * filename and SUSP records.)
+ * It is mandatory by the SUSP standard
+ * (IEEE 1281).
+ *
+ * It allows SUSP to coexist with
+ * non-SUSP uses of the System
+ * Use Area by placing non-SUSP data
+ * before SUSP data.
+ *
+ * SP extension must be in the root
+ * directory entry, disable all SUSP
+ * processing if not found.
+ */
+ iso9660->suspOffset = p[6];
+ iso9660->seenSUSP = 1;
+ rr_start += 7;
+ }
+ }
+ if (iso9660->seenSUSP) {
+ int r;
+
+ file->name_continues = 0;
+ file->symlink_continues = 0;
+ rr_start += iso9660->suspOffset;
+ r = parse_rockridge(a, file, rr_start, rr_end);
+ if (r != ARCHIVE_OK) {
+ free(file);
+ return (NULL);
+ }
+ } else
+ /* If there isn't SUSP, disable parsing
+ * rock ridge extensions. */
+ iso9660->opt_support_rockridge = 0;
+ }
+
+ file->nlinks = 1;/* Reset nlink. we'll calculate it later. */
+ /* Tell file's parent how many children that parent has. */
+ if (parent != NULL && (flags & 0x02))
+ parent->subdirs++;
+
+ if (iso9660->seenRockridge) {
+ if (parent != NULL && parent->parent == NULL &&
+ (flags & 0x02) && iso9660->rr_moved == NULL &&
+ (strcmp(file->name.s, "rr_moved") == 0 ||
+ strcmp(file->name.s, ".rr_moved") == 0)) {
+ iso9660->rr_moved = file;
+ file->rr_moved = 1;
+ file->rr_moved_has_re_only = 1;
+ file->re = 0;
+ parent->subdirs--;
+ } else if (file->re) {
+ /*
+ * Sanity check: file's parent is rr_moved.
+ */
+ if (parent == NULL || parent->rr_moved == 0) {
+ archive_set_error(&a->archive,
+ ARCHIVE_ERRNO_MISC,
+ "Invalid Rockridge RE");
+ return (NULL);
+ }
+ /*
+ * Sanity check: file does not have "CL" extension.
+ */
+ if (file->cl_offset) {
+ archive_set_error(&a->archive,
+ ARCHIVE_ERRNO_MISC,
+ "Invalid Rockridge RE and CL");
+ return (NULL);
+ }
+ /*
+ * Sanity check: The file type must be a directory.
+ */
+ if ((flags & 0x02) == 0) {
+ archive_set_error(&a->archive,
+ ARCHIVE_ERRNO_MISC,
+ "Invalid Rockridge RE");
+ return (NULL);
+ }
+ } else if (parent != NULL && parent->rr_moved)
+ file->rr_moved_has_re_only = 0;
+ else if (parent != NULL && (flags & 0x02) &&
+ (parent->re || parent->re_descendant))
+ file->re_descendant = 1;
+ if (file->cl_offset) {
+ struct file_info *r;
+
+ if (parent == NULL || parent->parent == NULL) {
+ archive_set_error(&a->archive,
+ ARCHIVE_ERRNO_MISC,
+ "Invalid Rockridge CL");
+ return (NULL);
+ }
+ /*
+ * Sanity check: The file type must be a regular file.
+ */
+ if ((flags & 0x02) != 0) {
+ archive_set_error(&a->archive,
+ ARCHIVE_ERRNO_MISC,
+ "Invalid Rockridge CL");
+ return (NULL);
+ }
+ parent->subdirs++;
+ /* Overwrite an offset and a number of this "CL" entry
+ * to appear before other dirs. "+1" to those is to
+ * make sure to appear after "RE" entry which this
+ * "CL" entry should be connected with. */
+ file->offset = file->number = file->cl_offset + 1;
+
+ /*
+ * Sanity check: cl_offset does not point at its
+ * the parents or itself.
+ */
+ for (r = parent; r; r = r->parent) {
+ if (r->offset == file->cl_offset) {
+ archive_set_error(&a->archive,
+ ARCHIVE_ERRNO_MISC,
+ "Invalid Rockridge CL");
+ return (NULL);
+ }
+ }
+ if (file->cl_offset == file->offset ||
+ parent->rr_moved) {
+ archive_set_error(&a->archive,
+ ARCHIVE_ERRNO_MISC,
+ "Invalid Rockridge CL");
+ return (NULL);
+ }
+ }
+ }
+
+#if DEBUG
+ /* DEBUGGING: Warn about attributes I don't yet fully support. */
+ if ((flags & ~0x02) != 0) {
+ fprintf(stderr, "\n ** Unrecognized flag: ");
+ dump_isodirrec(stderr, isodirrec);
+ fprintf(stderr, "\n");
+ } else if (toi(isodirrec + DR_volume_sequence_number_offset, 2) != 1) {
+ fprintf(stderr, "\n ** Unrecognized sequence number: ");
+ dump_isodirrec(stderr, isodirrec);
+ fprintf(stderr, "\n");
+ } else if (*(isodirrec + DR_file_unit_size_offset) != 0) {
+ fprintf(stderr, "\n ** Unexpected file unit size: ");
+ dump_isodirrec(stderr, isodirrec);
+ fprintf(stderr, "\n");
+ } else if (*(isodirrec + DR_interleave_offset) != 0) {
+ fprintf(stderr, "\n ** Unexpected interleave: ");
+ dump_isodirrec(stderr, isodirrec);
+ fprintf(stderr, "\n");
+ } else if (*(isodirrec + DR_ext_attr_length_offset) != 0) {
+ fprintf(stderr, "\n ** Unexpected extended attribute length: ");
+ dump_isodirrec(stderr, isodirrec);
+ fprintf(stderr, "\n");
+ }
+#endif
+ register_file(iso9660, file);
+ return (file);
+}
+
+static int
+parse_rockridge(struct archive_read *a, struct file_info *file,
+ const unsigned char *p, const unsigned char *end)
+{
+ struct iso9660 *iso9660;
+
+ iso9660 = (struct iso9660 *)(a->format->data);
+
+ while (p + 4 <= end /* Enough space for another entry. */
+ && p[0] >= 'A' && p[0] <= 'Z' /* Sanity-check 1st char of name. */
+ && p[1] >= 'A' && p[1] <= 'Z' /* Sanity-check 2nd char of name. */
+ && p[2] >= 4 /* Sanity-check length. */
+ && p + p[2] <= end) { /* Sanity-check length. */
+ const unsigned char *data = p + 4;
+ int data_length = p[2] - 4;
+ int version = p[3];
+
+ /*
+ * Yes, each 'if' here does test p[0] again.
+ * Otherwise, the fall-through handling to catch
+ * unsupported extensions doesn't work.
+ */
+ switch(p[0]) {
+ case 'C':
+ if (p[0] == 'C' && p[1] == 'E') {
+ if (version == 1 && data_length == 24) {
+ /*
+ * CE extension comprises:
+ * 8 byte sector containing extension
+ * 8 byte offset w/in above sector
+ * 8 byte length of continuation
+ */
+ int32_t location =
+ archive_le32dec(data);
+ file->ce_offset =
+ archive_le32dec(data+8);
+ file->ce_size =
+ archive_le32dec(data+16);
+ if (register_CE(a, location, file)
+ != ARCHIVE_OK)
+ return (ARCHIVE_FATAL);
+ }
+ break;
+ }
+ if (p[0] == 'C' && p[1] == 'L') {
+ if (version == 1 && data_length == 8) {
+ file->cl_offset = (uint64_t)
+ iso9660->logical_block_size *
+ (uint64_t)archive_le32dec(data);
+ iso9660->seenRockridge = 1;
+ }
+ break;
+ }
+ /* FALLTHROUGH */
+ case 'N':
+ if (p[0] == 'N' && p[1] == 'M') {
+ if (version == 1) {
+ parse_rockridge_NM1(file,
+ data, data_length);
+ iso9660->seenRockridge = 1;
+ }
+ break;
+ }
+ /* FALLTHROUGH */
+ case 'P':
+ if (p[0] == 'P' && p[1] == 'D') {
+ /*
+ * PD extension is padding;
+ * contents are always ignored.
+ */
+ break;
+ }
+ if (p[0] == 'P' && p[1] == 'L') {
+ /*
+ * PL extension won't appear;
+ * contents are always ignored.
+ */
+ break;
+ }
+ if (p[0] == 'P' && p[1] == 'N') {
+ if (version == 1 && data_length == 16) {
+ file->rdev = toi(data,4);
+ file->rdev <<= 32;
+ file->rdev |= toi(data + 8, 4);
+ iso9660->seenRockridge = 1;
+ }
+ break;
+ }
+ if (p[0] == 'P' && p[1] == 'X') {
+ /*
+ * PX extension comprises:
+ * 8 bytes for mode,
+ * 8 bytes for nlinks,
+ * 8 bytes for uid,
+ * 8 bytes for gid,
+ * 8 bytes for inode.
+ */
+ if (version == 1) {
+ if (data_length >= 8)
+ file->mode
+ = toi(data, 4);
+ if (data_length >= 16)
+ file->nlinks
+ = toi(data + 8, 4);
+ if (data_length >= 24)
+ file->uid
+ = toi(data + 16, 4);
+ if (data_length >= 32)
+ file->gid
+ = toi(data + 24, 4);
+ if (data_length >= 40)
+ file->number
+ = toi(data + 32, 4);
+ iso9660->seenRockridge = 1;
+ }
+ break;
+ }
+ /* FALLTHROUGH */
+ case 'R':
+ if (p[0] == 'R' && p[1] == 'E' && version == 1) {
+ file->re = 1;
+ iso9660->seenRockridge = 1;
+ break;
+ }
+ if (p[0] == 'R' && p[1] == 'R' && version == 1) {
+ /*
+ * RR extension comprises:
+ * one byte flag value
+ * This extension is obsolete,
+ * so contents are always ignored.
+ */
+ break;
+ }
+ /* FALLTHROUGH */
+ case 'S':
+ if (p[0] == 'S' && p[1] == 'L') {
+ if (version == 1) {
+ parse_rockridge_SL1(file,
+ data, data_length);
+ iso9660->seenRockridge = 1;
+ }
+ break;
+ }
+ if (p[0] == 'S' && p[1] == 'T'
+ && data_length == 0 && version == 1) {
+ /*
+ * ST extension marks end of this
+ * block of SUSP entries.
+ *
+ * It allows SUSP to coexist with
+ * non-SUSP uses of the System
+ * Use Area by placing non-SUSP data
+ * after SUSP data.
+ */
+ iso9660->seenSUSP = 0;
+ iso9660->seenRockridge = 0;
+ return (ARCHIVE_OK);
+ }
+ case 'T':
+ if (p[0] == 'T' && p[1] == 'F') {
+ if (version == 1) {
+ parse_rockridge_TF1(file,
+ data, data_length);
+ iso9660->seenRockridge = 1;
+ }
+ break;
+ }
+ /* FALLTHROUGH */
+ case 'Z':
+ if (p[0] == 'Z' && p[1] == 'F') {
+ if (version == 1)
+ parse_rockridge_ZF1(file,
+ data, data_length);
+ break;
+ }
+ /* FALLTHROUGH */
+ default:
+ /* The FALLTHROUGHs above leave us here for
+ * any unsupported extension. */
+ break;
+ }
+
+
+
+ p += p[2];
+ }
+ return (ARCHIVE_OK);
+}
+
+static int
+register_CE(struct archive_read *a, int32_t location,
+ struct file_info *file)
+{
+ struct iso9660 *iso9660;
+ struct read_ce_queue *heap;
+ struct read_ce_req *p;
+ uint64_t offset, parent_offset;
+ int hole, parent;
+
+ iso9660 = (struct iso9660 *)(a->format->data);
+ offset = ((uint64_t)location) * (uint64_t)iso9660->logical_block_size;
+ if (((file->mode & AE_IFMT) == AE_IFREG &&
+ offset >= file->offset) ||
+ offset < iso9660->current_position) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "Invalid location in SUSP \"CE\" extension");
+ return (ARCHIVE_FATAL);
+ }
+
+ /* Expand our CE list as necessary. */
+ heap = &(iso9660->read_ce_req);
+ if (heap->cnt >= heap->allocated) {
+ int new_size;
+
+ if (heap->allocated < 16)
+ new_size = 16;
+ else
+ new_size = heap->allocated * 2;
+ /* Overflow might keep us from growing the list. */
+ if (new_size <= heap->allocated)
+ __archive_errx(1, "Out of memory");
+ p = malloc(new_size * sizeof(p[0]));
+ if (p == NULL)
+ __archive_errx(1, "Out of memory");
+ if (heap->reqs != NULL) {
+ memcpy(p, heap->reqs, heap->cnt * sizeof(*p));
+ free(heap->reqs);
+ }
+ heap->reqs = p;
+ heap->allocated = new_size;
+ }
+
+ /*
+ * Start with hole at end, walk it up tree to find insertion point.
+ */
+ hole = heap->cnt++;
+ while (hole > 0) {
+ parent = (hole - 1)/2;
+ parent_offset = heap->reqs[parent].offset;
+ if (offset >= parent_offset) {
+ heap->reqs[hole].offset = offset;
+ heap->reqs[hole].file = file;
+ return (ARCHIVE_OK);
+ }
+ // Move parent into hole <==> move hole up tree.
+ heap->reqs[hole] = heap->reqs[parent];
+ hole = parent;
+ }
+ heap->reqs[0].offset = offset;
+ heap->reqs[0].file = file;
+ return (ARCHIVE_OK);
+}
+
+static void
+next_CE(struct read_ce_queue *heap)
+{
+ uint64_t a_offset, b_offset, c_offset;
+ int a, b, c;
+ struct read_ce_req tmp;
+
+ if (heap->cnt < 1)
+ return;
+
+ /*
+ * Move the last item in the heap to the root of the tree
+ */
+ heap->reqs[0] = heap->reqs[--(heap->cnt)];
+
+ /*
+ * Rebalance the heap.
+ */
+ a = 0; // Starting element and its offset
+ a_offset = heap->reqs[a].offset;
+ for (;;) {
+ b = a + a + 1; // First child
+ if (b >= heap->cnt)
+ return;
+ b_offset = heap->reqs[b].offset;
+ c = b + 1; // Use second child if it is smaller.
+ if (c < heap->cnt) {
+ c_offset = heap->reqs[c].offset;
+ if (c_offset < b_offset) {
+ b = c;
+ b_offset = c_offset;
+ }
+ }
+ if (a_offset <= b_offset)
+ return;
+ tmp = heap->reqs[a];
+ heap->reqs[a] = heap->reqs[b];
+ heap->reqs[b] = tmp;
+ a = b;
+ }
+}
+
+
+static int
+read_CE(struct archive_read *a, struct iso9660 *iso9660)
+{
+ struct read_ce_queue *heap;
+ const unsigned char *b, *p, *end;
+ struct file_info *file;
+ size_t step;
+ int r;
+
+ /* Read data which RRIP "CE" extension points. */
+ heap = &(iso9660->read_ce_req);
+ step = iso9660->logical_block_size;
+ while (heap->cnt &&
+ heap->reqs[0].offset == iso9660->current_position) {
+ b = __archive_read_ahead(a, step, NULL);
+ if (b == NULL) {
+ archive_set_error(&a->archive,
+ ARCHIVE_ERRNO_MISC,
+ "Failed to read full block when scanning "
+ "ISO9660 directory list");
+ return (ARCHIVE_FATAL);
+ }
+ do {
+ file = heap->reqs[0].file;
+ p = b + file->ce_offset;
+ end = p + file->ce_size;
+ next_CE(heap);
+ r = parse_rockridge(a, file, p, end);
+ if (r != ARCHIVE_OK)
+ return (ARCHIVE_FATAL);
+ } while (heap->cnt &&
+ heap->reqs[0].offset == iso9660->current_position);
+ /* NOTE: Do not move this consume's code to fron of
+ * do-while loop. Registration of nested CE extension
+ * might cause error because of current position. */
+ __archive_read_consume(a, step);
+ iso9660->current_position += step;
+ }
+ return (ARCHIVE_OK);
+}
+
+static void
+parse_rockridge_NM1(struct file_info *file,
+ const unsigned char *data, int data_length)
+{
+ if (!file->name_continues)
+ archive_string_empty(&file->name);
+ file->name_continues = 0;
+ if (data_length < 1)
+ return;
+ /*
+ * NM version 1 extension comprises:
+ * 1 byte flag, value is one of:
+ * = 0: remainder is name
+ * = 1: remainder is name, next NM entry continues name
+ * = 2: "."
+ * = 4: ".."
+ * = 32: Implementation specific
+ * All other values are reserved.
+ */
+ switch(data[0]) {
+ case 0:
+ if (data_length < 2)
+ return;
+ archive_strncat(&file->name, (const char *)data + 1, data_length - 1);
+ break;
+ case 1:
+ if (data_length < 2)
+ return;
+ archive_strncat(&file->name, (const char *)data + 1, data_length - 1);
+ file->name_continues = 1;
+ break;
+ case 2:
+ archive_strcat(&file->name, ".");
+ break;
+ case 4:
+ archive_strcat(&file->name, "..");
+ break;
+ default:
+ return;
+ }
+
+}
+
+static void
+parse_rockridge_TF1(struct file_info *file, const unsigned char *data,
+ int data_length)
+{
+ char flag;
+ /*
+ * TF extension comprises:
+ * one byte flag
+ * create time (optional)
+ * modify time (optional)
+ * access time (optional)
+ * attribute time (optional)
+ * Time format and presence of fields
+ * is controlled by flag bits.
+ */
+ if (data_length < 1)
+ return;
+ flag = data[0];
+ ++data;
+ --data_length;
+ if (flag & 0x80) {
+ /* Use 17-byte time format. */
+ if ((flag & 1) && data_length >= 17) {
+ /* Create time. */
+ file->birthtime_is_set = 1;
+ file->birthtime = isodate17(data);
+ data += 17;
+ data_length -= 17;
+ }
+ if ((flag & 2) && data_length >= 17) {
+ /* Modify time. */
+ file->mtime = isodate17(data);
+ data += 17;
+ data_length -= 17;
+ }
+ if ((flag & 4) && data_length >= 17) {
+ /* Access time. */
+ file->atime = isodate17(data);
+ data += 17;
+ data_length -= 17;
+ }
+ if ((flag & 8) && data_length >= 17) {
+ /* Attribute change time. */
+ file->ctime = isodate17(data);
+ }
+ } else {
+ /* Use 7-byte time format. */
+ if ((flag & 1) && data_length >= 7) {
+ /* Create time. */
+ file->birthtime_is_set = 1;
+ file->birthtime = isodate7(data);
+ data += 7;
+ data_length -= 7;
+ }
+ if ((flag & 2) && data_length >= 7) {
+ /* Modify time. */
+ file->mtime = isodate7(data);
+ data += 7;
+ data_length -= 7;
+ }
+ if ((flag & 4) && data_length >= 7) {
+ /* Access time. */
+ file->atime = isodate7(data);
+ data += 7;
+ data_length -= 7;
+ }
+ if ((flag & 8) && data_length >= 7) {
+ /* Attribute change time. */
+ file->ctime = isodate7(data);
+ }
+ }
+}
+
+static void
+parse_rockridge_SL1(struct file_info *file, const unsigned char *data,
+ int data_length)
+{
+ const char *separator = "";
+
+ if (!file->symlink_continues || file->symlink.length < 1)
+ archive_string_empty(&file->symlink);
+ else if (!file->symlink_continues &&
+ file->symlink.s[file->symlink.length - 1] != '/')
+ separator = "/";
+ file->symlink_continues = 0;
+
+ /*
+ * Defined flag values:
+ * 0: This is the last SL record for this symbolic link
+ * 1: this symbolic link field continues in next SL entry
+ * All other values are reserved.
+ */
+ if (data_length < 1)
+ return;
+ switch(*data) {
+ case 0:
+ break;
+ case 1:
+ file->symlink_continues = 1;
+ break;
+ default:
+ return;
+ }
+ ++data; /* Skip flag byte. */
+ --data_length;
+
+ /*
+ * SL extension body stores "components".
+ * Basically, this is a complicated way of storing
+ * a POSIX path. It also interferes with using
+ * symlinks for storing non-path data. <sigh>
+ *
+ * Each component is 2 bytes (flag and length)
+ * possibly followed by name data.
+ */
+ while (data_length >= 2) {
+ unsigned char flag = *data++;
+ unsigned char nlen = *data++;
+ data_length -= 2;
+
+ archive_strcat(&file->symlink, separator);
+ separator = "/";
+
+ switch(flag) {
+ case 0: /* Usual case, this is text. */
+ if (data_length < nlen)
+ return;
+ archive_strncat(&file->symlink,
+ (const char *)data, nlen);
+ break;
+ case 0x01: /* Text continues in next component. */
+ if (data_length < nlen)
+ return;
+ archive_strncat(&file->symlink,
+ (const char *)data, nlen);
+ separator = "";
+ break;
+ case 0x02: /* Current dir. */
+ archive_strcat(&file->symlink, ".");
+ break;
+ case 0x04: /* Parent dir. */
+ archive_strcat(&file->symlink, "..");
+ break;
+ case 0x08: /* Root of filesystem. */
+ archive_strcat(&file->symlink, "/");
+ separator = "";
+ break;
+ case 0x10: /* Undefined (historically "volume root" */
+ archive_string_empty(&file->symlink);
+ archive_strcat(&file->symlink, "ROOT");
+ break;
+ case 0x20: /* Undefined (historically "hostname") */
+ archive_strcat(&file->symlink, "hostname");
+ break;
+ default:
+ /* TODO: issue a warning ? */
+ return;
+ }
+ data += nlen;
+ data_length -= nlen;
+ }
+}
+
+static void
+parse_rockridge_ZF1(struct file_info *file, const unsigned char *data,
+ int data_length)
+{
+
+ if (data[0] == 0x70 && data[1] == 0x7a && data_length == 12) {
+ /* paged zlib */
+ file->pz = 1;
+ file->pz_log2_bs = data[3];
+ file->pz_uncompressed_size = archive_le32dec(&data[4]);
+ }
+}
+
+static void
+register_file(struct iso9660 *iso9660, struct file_info *file)
+{
+
+ file->use_next = iso9660->use_files;
+ iso9660->use_files = file;
+}
+
+static void
+release_files(struct iso9660 *iso9660)
+{
+ struct content *con, *connext;
+ struct file_info *file;
+
+ file = iso9660->use_files;
+ while (file != NULL) {
+ struct file_info *next = file->use_next;
+
+ archive_string_free(&file->name);
+ archive_string_free(&file->symlink);
+ con = file->contents.first;
+ while (con != NULL) {
+ connext = con->next;
+ free(con);
+ con = connext;
+ }
+ free(file);
+ file = next;
+ }
+}
+
+static int
+next_entry_seek(struct archive_read *a, struct iso9660 *iso9660,
+ struct file_info **pfile)
+{
+ struct file_info *file;
+ int r;
+
+ r = next_cache_entry(a, iso9660, pfile);
+ if (r != ARCHIVE_OK)
+ return (r);
+ file = *pfile;
+
+ /* Don't waste time seeking for zero-length bodies. */
+ if (file->size == 0)
+ file->offset = iso9660->current_position;
+
+ /* Seek forward to the start of the entry. */
+ if (iso9660->current_position < file->offset) {
+ int64_t step;
+
+ step = file->offset - iso9660->current_position;
+ step = __archive_read_skip(a, step);
+ if (step < 0)
+ return ((int)step);
+ iso9660->current_position = file->offset;
+ }
+
+ /* We found body of file; handle it now. */
+ return (ARCHIVE_OK);
+}
+
+static int
+next_cache_entry(struct archive_read *a, struct iso9660 *iso9660,
+ struct file_info **pfile)
+{
+ struct file_info *file;
+ struct {
+ struct file_info *first;
+ struct file_info **last;
+ } empty_files;
+ int64_t number;
+ int count;
+
+ file = cache_get_entry(iso9660);
+ if (file != NULL) {
+ *pfile = file;
+ return (ARCHIVE_OK);
+ }
+
+ for (;;) {
+ struct file_info *re, *d;
+
+ *pfile = file = next_entry(iso9660);
+ if (file == NULL) {
+ /*
+ * If directory entries all which are descendant of
+ * rr_moved are stil remaning, expose their.
+ */
+ if (iso9660->re_files.first != NULL &&
+ iso9660->rr_moved != NULL &&
+ iso9660->rr_moved->rr_moved_has_re_only)
+ /* Expose "rr_moved" entry. */
+ cache_add_entry(iso9660, iso9660->rr_moved);
+ while ((re = re_get_entry(iso9660)) != NULL) {
+ /* Expose its descendant dirs. */
+ while ((d = rede_get_entry(re)) != NULL)
+ cache_add_entry(iso9660, d);
+ }
+ if (iso9660->cache_files.first != NULL)
+ return (next_cache_entry(a, iso9660, pfile));
+ return (ARCHIVE_EOF);
+ }
+
+ if (file->cl_offset) {
+ struct file_info *first_re = NULL;
+ int nexted_re = 0;
+
+ /*
+ * Find "RE" dir for the current file, which
+ * has "CL" flag.
+ */
+ while ((re = re_get_entry(iso9660))
+ != first_re) {
+ if (first_re == NULL)
+ first_re = re;
+ if (re->offset == file->cl_offset) {
+ re->parent->subdirs--;
+ re->parent = file->parent;
+ re->re = 0;
+ if (re->parent->re_descendant) {
+ nexted_re = 1;
+ re->re_descendant = 1;
+ if (rede_add_entry(re) < 0)
+ goto fatal_rr;
+ /* Move a list of descendants
+ * to a new ancestor. */
+ while ((d = rede_get_entry(
+ re)) != NULL)
+ if (rede_add_entry(d)
+ < 0)
+ goto fatal_rr;
+ break;
+ }
+ /* Replace the current file
+ * with "RE" dir */
+ *pfile = file = re;
+ /* Expose its descendant */
+ while ((d = rede_get_entry(
+ file)) != NULL)
+ cache_add_entry(
+ iso9660, d);
+ break;
+ } else
+ re_add_entry(iso9660, re);
+ }
+ if (nexted_re) {
+ /*
+ * Do not expose this at this time
+ * because we have not gotten its full-path
+ * name yet.
+ */
+ continue;
+ }
+ } else if ((file->mode & AE_IFMT) == AE_IFDIR) {
+ int r;
+
+ /* Read file entries in this dir. */
+ r = read_children(a, file);
+ if (r != ARCHIVE_OK)
+ return (r);
+
+ /*
+ * Handle a special dir of Rockridge extensions,
+ * "rr_moved".
+ */
+ if (file->rr_moved) {
+ /*
+ * If this has only the subdirectories which
+ * have "RE" flags, do not expose at this time.
+ */
+ if (file->rr_moved_has_re_only)
+ continue;
+ /* Otherwise expose "rr_moved" entry. */
+ } else if (file->re) {
+ /*
+ * Do not expose this at this time
+ * because we have not gotten its full-path
+ * name yet.
+ */
+ re_add_entry(iso9660, file);
+ continue;
+ } else if (file->re_descendant) {
+ /*
+ * If the top level "RE" entry of this entry
+ * is not exposed, we, accordingly, should not
+ * expose this entry at this time because
+ * we cannot make its proper full-path name.
+ */
+ if (rede_add_entry(file) == 0)
+ continue;
+ /* Otherwise we can expose this entry because
+ * it seems its top level "RE" has already been
+ * exposed. */
+ }
+ }
+ break;
+ }
+
+ if ((file->mode & AE_IFMT) != AE_IFREG || file->number == -1)
+ return (ARCHIVE_OK);
+
+ count = 0;
+ number = file->number;
+ iso9660->cache_files.first = NULL;
+ iso9660->cache_files.last = &(iso9660->cache_files.first);
+ empty_files.first = NULL;
+ empty_files.last = &empty_files.first;
+ /* Collect files which has the same file serial number.
+ * Peek pending_files so that file which number is different
+ * is not put bak. */
+ while (iso9660->pending_files.used > 0 &&
+ (iso9660->pending_files.files[0]->number == -1 ||
+ iso9660->pending_files.files[0]->number == number)) {
+ if (file->number == -1) {
+ /* This file has the same offset
+ * but it's wrong offset which empty files
+ * and symlink files have.
+ * NOTE: This wrong offse was recorded by
+ * old mkisofs utility. If ISO images is
+ * created by latest mkisofs, this does not
+ * happen.
+ */
+ file->next = NULL;
+ *empty_files.last = file;
+ empty_files.last = &(file->next);
+ } else {
+ count++;
+ cache_add_entry(iso9660, file);
+ }
+ file = next_entry(iso9660);
+ }
+
+ if (count == 0) {
+ *pfile = file;
+ return ((file == NULL)?ARCHIVE_EOF:ARCHIVE_OK);
+ }
+ if (file->number == -1) {
+ file->next = NULL;
+ *empty_files.last = file;
+ empty_files.last = &(file->next);
+ } else {
+ count++;
+ cache_add_entry(iso9660, file);
+ }
+
+ if (count > 1) {
+ /* The count is the same as number of hardlink,
+ * so much so that each nlinks of files in cache_file
+ * is overwritten by value of the count.
+ */
+ for (file = iso9660->cache_files.first;
+ file != NULL; file = file->next)
+ file->nlinks = count;
+ }
+ /* If there are empty files, that files are added
+ * to the tail of the cache_files. */
+ if (empty_files.first != NULL) {
+ *iso9660->cache_files.last = empty_files.first;
+ iso9660->cache_files.last = empty_files.last;
+ }
+ *pfile = cache_get_entry(iso9660);
+ return ((*pfile == NULL)?ARCHIVE_EOF:ARCHIVE_OK);
+
+fatal_rr:
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "Failed to connect 'CL' pointer to 'RE' rr_moved pointer of"
+ "Rockridge extensions");
+ return (ARCHIVE_FATAL);
+}
+
+static inline void
+re_add_entry(struct iso9660 *iso9660, struct file_info *file)
+{
+ file->re_next = NULL;
+ *iso9660->re_files.last = file;
+ iso9660->re_files.last = &(file->re_next);
+}
+
+static inline struct file_info *
+re_get_entry(struct iso9660 *iso9660)
+{
+ struct file_info *file;
+
+ if ((file = iso9660->re_files.first) != NULL) {
+ iso9660->re_files.first = file->re_next;
+ if (iso9660->re_files.first == NULL)
+ iso9660->re_files.last =
+ &(iso9660->re_files.first);
+ }
+ return (file);
+}
+
+static inline int
+rede_add_entry(struct file_info *file)
+{
+ struct file_info *re;
+
+ /*
+ * Find "RE" entry.
+ */
+ re = file->parent;
+ while (re != NULL && !re->re)
+ re = re->parent;
+ if (re == NULL)
+ return (-1);
+
+ file->re_next = NULL;
+ *re->rede_files.last = file;
+ re->rede_files.last = &(file->re_next);
+ return (0);
+}
+
+static inline struct file_info *
+rede_get_entry(struct file_info *re)
+{
+ struct file_info *file;
+
+ if ((file = re->rede_files.first) != NULL) {
+ re->rede_files.first = file->re_next;
+ if (re->rede_files.first == NULL)
+ re->rede_files.last =
+ &(re->rede_files.first);
+ }
+ return (file);
+}
+
+static inline void
+cache_add_entry(struct iso9660 *iso9660, struct file_info *file)
+{
+ file->next = NULL;
+ *iso9660->cache_files.last = file;
+ iso9660->cache_files.last = &(file->next);
+}
+
+static inline struct file_info *
+cache_get_entry(struct iso9660 *iso9660)
+{
+ struct file_info *file;
+
+ if ((file = iso9660->cache_files.first) != NULL) {
+ iso9660->cache_files.first = file->next;
+ if (iso9660->cache_files.first == NULL)
+ iso9660->cache_files.last = &(iso9660->cache_files.first);
+ }
+ return (file);
+}
+
+static void
+heap_add_entry(struct heap_queue *heap, struct file_info *file, uint64_t key)
+{
+ uint64_t file_key, parent_key;
+ int hole, parent;
+
+ /* Expand our pending files list as necessary. */
+ if (heap->used >= heap->allocated) {
+ struct file_info **new_pending_files;
+ int new_size = heap->allocated * 2;
+
+ if (heap->allocated < 1024)
+ new_size = 1024;
+ /* Overflow might keep us from growing the list. */
+ if (new_size <= heap->allocated)
+ __archive_errx(1, "Out of memory");
+ new_pending_files = (struct file_info **)
+ malloc(new_size * sizeof(new_pending_files[0]));
+ if (new_pending_files == NULL)
+ __archive_errx(1, "Out of memory");
+ memcpy(new_pending_files, heap->files,
+ heap->allocated * sizeof(new_pending_files[0]));
+ if (heap->files != NULL)
+ free(heap->files);
+ heap->files = new_pending_files;
+ heap->allocated = new_size;
+ }
+
+ file_key = file->key = key;
+
+ /*
+ * Start with hole at end, walk it up tree to find insertion point.
+ */
+ hole = heap->used++;
+ while (hole > 0) {
+ parent = (hole - 1)/2;
+ parent_key = heap->files[parent]->key;
+ if (file_key >= parent_key) {
+ heap->files[hole] = file;
+ return;
+ }
+ // Move parent into hole <==> move hole up tree.
+ heap->files[hole] = heap->files[parent];
+ hole = parent;
+ }
+ heap->files[0] = file;
+}
+
+static struct file_info *
+heap_get_entry(struct heap_queue *heap)
+{
+ uint64_t a_key, b_key, c_key;
+ int a, b, c;
+ struct file_info *r, *tmp;
+
+ if (heap->used < 1)
+ return (NULL);
+
+ /*
+ * The first file in the list is the earliest; we'll return this.
+ */
+ r = heap->files[0];
+
+ /*
+ * Move the last item in the heap to the root of the tree
+ */
+ heap->files[0] = heap->files[--(heap->used)];
+
+ /*
+ * Rebalance the heap.
+ */
+ a = 0; // Starting element and its heap key
+ a_key = heap->files[a]->key;
+ for (;;) {
+ b = a + a + 1; // First child
+ if (b >= heap->used)
+ return (r);
+ b_key = heap->files[b]->key;
+ c = b + 1; // Use second child if it is smaller.
+ if (c < heap->used) {
+ c_key = heap->files[c]->key;
+ if (c_key < b_key) {
+ b = c;
+ b_key = c_key;
+ }
+ }
+ if (a_key <= b_key)
+ return (r);
+ tmp = heap->files[a];
+ heap->files[a] = heap->files[b];
+ heap->files[b] = tmp;
+ a = b;
+ }
+}
+
+static unsigned int
+toi(const void *p, int n)
+{
+ const unsigned char *v = (const unsigned char *)p;
+ if (n > 1)
+ return v[0] + 256 * toi(v + 1, n - 1);
+ if (n == 1)
+ return v[0];
+ return (0);
+}
+
+static time_t
+isodate7(const unsigned char *v)
+{
+ struct tm tm;
+ int offset;
+ memset(&tm, 0, sizeof(tm));
+ tm.tm_year = v[0];
+ tm.tm_mon = v[1] - 1;
+ tm.tm_mday = v[2];
+ tm.tm_hour = v[3];
+ tm.tm_min = v[4];
+ tm.tm_sec = v[5];
+ /* v[6] is the signed timezone offset, in 1/4-hour increments. */
+ offset = ((const signed char *)v)[6];
+ if (offset > -48 && offset < 52) {
+ tm.tm_hour -= offset / 4;
+ tm.tm_min -= (offset % 4) * 15;
+ }
+ return (time_from_tm(&tm));
+}
+
+static time_t
+isodate17(const unsigned char *v)
+{
+ struct tm tm;
+ int offset;
+ memset(&tm, 0, sizeof(tm));
+ tm.tm_year = (v[0] - '0') * 1000 + (v[1] - '0') * 100
+ + (v[2] - '0') * 10 + (v[3] - '0')
+ - 1900;
+ tm.tm_mon = (v[4] - '0') * 10 + (v[5] - '0');
+ tm.tm_mday = (v[6] - '0') * 10 + (v[7] - '0');
+ tm.tm_hour = (v[8] - '0') * 10 + (v[9] - '0');
+ tm.tm_min = (v[10] - '0') * 10 + (v[11] - '0');
+ tm.tm_sec = (v[12] - '0') * 10 + (v[13] - '0');
+ /* v[16] is the signed timezone offset, in 1/4-hour increments. */
+ offset = ((const signed char *)v)[16];
+ if (offset > -48 && offset < 52) {
+ tm.tm_hour -= offset / 4;
+ tm.tm_min -= (offset % 4) * 15;
+ }
+ return (time_from_tm(&tm));
+}
+
+static time_t
+time_from_tm(struct tm *t)
+{
+#if HAVE_TIMEGM
+ /* Use platform timegm() if available. */
+ return (timegm(t));
+#else
+ /* Else use direct calculation using POSIX assumptions. */
+ /* First, fix up tm_yday based on the year/month/day. */
+ mktime(t);
+ /* Then we can compute timegm() from first principles. */
+ return (t->tm_sec + t->tm_min * 60 + t->tm_hour * 3600
+ + t->tm_yday * 86400 + (t->tm_year - 70) * 31536000
+ + ((t->tm_year - 69) / 4) * 86400 -
+ ((t->tm_year - 1) / 100) * 86400
+ + ((t->tm_year + 299) / 400) * 86400);
+#endif
+}
+
+static const char *
+build_pathname(struct archive_string *as, struct file_info *file)
+{
+ if (file->parent != NULL && archive_strlen(&file->parent->name) > 0) {
+ build_pathname(as, file->parent);
+ archive_strcat(as, "/");
+ }
+ if (archive_strlen(&file->name) == 0)
+ archive_strcat(as, ".");
+ else
+ archive_string_concat(as, &file->name);
+ return (as->s);
+}
+
+#if DEBUG
+static void
+dump_isodirrec(FILE *out, const unsigned char *isodirrec)
+{
+ fprintf(out, " l %d,",
+ toi(isodirrec + DR_length_offset, DR_length_size));
+ fprintf(out, " a %d,",
+ toi(isodirrec + DR_ext_attr_length_offset, DR_ext_attr_length_size));
+ fprintf(out, " ext 0x%x,",
+ toi(isodirrec + DR_extent_offset, DR_extent_size));
+ fprintf(out, " s %d,",
+ toi(isodirrec + DR_size_offset, DR_extent_size));
+ fprintf(out, " f 0x%02x,",
+ toi(isodirrec + DR_flags_offset, DR_flags_size));
+ fprintf(out, " u %d,",
+ toi(isodirrec + DR_file_unit_size_offset, DR_file_unit_size_size));
+ fprintf(out, " ilv %d,",
+ toi(isodirrec + DR_interleave_offset, DR_interleave_size));
+ fprintf(out, " seq %d,",
+ toi(isodirrec + DR_volume_sequence_number_offset, DR_volume_sequence_number_size));
+ fprintf(out, " nl %d:",
+ toi(isodirrec + DR_name_len_offset, DR_name_len_size));
+ fprintf(out, " `%.*s'",
+ toi(isodirrec + DR_name_len_offset, DR_name_len_size), isodirrec + DR_name_offset);
+}
+#endif
diff --git a/lib/libarchive/archive_read_support_format_mtree.c b/contrib/libarchive/libarchive/archive_read_support_format_mtree.c
index 7ae0b02..7ae0b02 100644
--- a/lib/libarchive/archive_read_support_format_mtree.c
+++ b/contrib/libarchive/libarchive/archive_read_support_format_mtree.c
diff --git a/lib/libarchive/archive_read_support_format_raw.c b/contrib/libarchive/libarchive/archive_read_support_format_raw.c
index c994a5d..c994a5d 100644
--- a/lib/libarchive/archive_read_support_format_raw.c
+++ b/contrib/libarchive/libarchive/archive_read_support_format_raw.c
diff --git a/contrib/libarchive/libarchive/archive_read_support_format_tar.c b/contrib/libarchive/libarchive/archive_read_support_format_tar.c
new file mode 100644
index 0000000..62be309
--- /dev/null
+++ b/contrib/libarchive/libarchive/archive_read_support_format_tar.c
@@ -0,0 +1,2418 @@
+/*-
+ * Copyright (c) 2003-2007 Tim Kientzle
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "archive_platform.h"
+__FBSDID("$FreeBSD$");
+
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <stddef.h>
+/* #include <stdint.h> */ /* See archive_platform.h */
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+/* Obtain suitable wide-character manipulation functions. */
+#ifdef HAVE_WCHAR_H
+#include <wchar.h>
+#else
+/* Good enough for equality testing, which is all we need. */
+static int wcscmp(const wchar_t *s1, const wchar_t *s2)
+{
+ int diff = *s1 - *s2;
+ while (*s1 && diff == 0)
+ diff = (int)*++s1 - (int)*++s2;
+ return diff;
+}
+/* Good enough for equality testing, which is all we need. */
+static int wcsncmp(const wchar_t *s1, const wchar_t *s2, size_t n)
+{
+ int diff = *s1 - *s2;
+ while (*s1 && diff == 0 && n-- > 0)
+ diff = (int)*++s1 - (int)*++s2;
+ return diff;
+}
+static size_t wcslen(const wchar_t *s)
+{
+ const wchar_t *p = s;
+ while (*p)
+ p++;
+ return p - s;
+}
+#endif
+
+#include "archive.h"
+#include "archive_entry.h"
+#include "archive_private.h"
+#include "archive_read_private.h"
+
+#define tar_min(a,b) ((a) < (b) ? (a) : (b))
+
+/*
+ * Layout of POSIX 'ustar' tar header.
+ */
+struct archive_entry_header_ustar {
+ char name[100];
+ char mode[8];
+ char uid[8];
+ char gid[8];
+ char size[12];
+ char mtime[12];
+ char checksum[8];
+ char typeflag[1];
+ char linkname[100]; /* "old format" header ends here */
+ char magic[6]; /* For POSIX: "ustar\0" */
+ char version[2]; /* For POSIX: "00" */
+ char uname[32];
+ char gname[32];
+ char rdevmajor[8];
+ char rdevminor[8];
+ char prefix[155];
+};
+
+/*
+ * Structure of GNU tar header
+ */
+struct gnu_sparse {
+ char offset[12];
+ char numbytes[12];
+};
+
+struct archive_entry_header_gnutar {
+ char name[100];
+ char mode[8];
+ char uid[8];
+ char gid[8];
+ char size[12];
+ char mtime[12];
+ char checksum[8];
+ char typeflag[1];
+ char linkname[100];
+ char magic[8]; /* "ustar \0" (note blank/blank/null at end) */
+ char uname[32];
+ char gname[32];
+ char rdevmajor[8];
+ char rdevminor[8];
+ char atime[12];
+ char ctime[12];
+ char offset[12];
+ char longnames[4];
+ char unused[1];
+ struct gnu_sparse sparse[4];
+ char isextended[1];
+ char realsize[12];
+ /*
+ * Old GNU format doesn't use POSIX 'prefix' field; they use
+ * the 'L' (longname) entry instead.
+ */
+};
+
+/*
+ * Data specific to this format.
+ */
+struct sparse_block {
+ struct sparse_block *next;
+ off_t offset;
+ off_t remaining;
+};
+
+struct tar {
+ struct archive_string acl_text;
+ struct archive_string entry_pathname;
+ /* For "GNU.sparse.name" and other similar path extensions. */
+ struct archive_string entry_pathname_override;
+ struct archive_string entry_linkpath;
+ struct archive_string entry_uname;
+ struct archive_string entry_gname;
+ struct archive_string longlink;
+ struct archive_string longname;
+ struct archive_string pax_header;
+ struct archive_string pax_global;
+ struct archive_string line;
+ int pax_hdrcharset_binary;
+ wchar_t *pax_entry;
+ size_t pax_entry_length;
+ int header_recursion_depth;
+ int64_t entry_bytes_remaining;
+ int64_t entry_offset;
+ int64_t entry_padding;
+ int64_t realsize;
+ struct sparse_block *sparse_list;
+ struct sparse_block *sparse_last;
+ int64_t sparse_offset;
+ int64_t sparse_numbytes;
+ int sparse_gnu_major;
+ int sparse_gnu_minor;
+ char sparse_gnu_pending;
+};
+
+static ssize_t UTF8_mbrtowc(wchar_t *pwc, const char *s, size_t n);
+static int archive_block_is_null(const unsigned char *p);
+static char *base64_decode(const char *, size_t, size_t *);
+static void gnu_add_sparse_entry(struct tar *,
+ off_t offset, off_t remaining);
+static void gnu_clear_sparse_list(struct tar *);
+static int gnu_sparse_old_read(struct archive_read *, struct tar *,
+ const struct archive_entry_header_gnutar *header);
+static void gnu_sparse_old_parse(struct tar *,
+ const struct gnu_sparse *sparse, int length);
+static int gnu_sparse_01_parse(struct tar *, const char *);
+static ssize_t gnu_sparse_10_read(struct archive_read *, struct tar *);
+static int header_Solaris_ACL(struct archive_read *, struct tar *,
+ struct archive_entry *, const void *);
+static int header_common(struct archive_read *, struct tar *,
+ struct archive_entry *, const void *);
+static int header_old_tar(struct archive_read *, struct tar *,
+ struct archive_entry *, const void *);
+static int header_pax_extensions(struct archive_read *, struct tar *,
+ struct archive_entry *, const void *);
+static int header_pax_global(struct archive_read *, struct tar *,
+ struct archive_entry *, const void *h);
+static int header_longlink(struct archive_read *, struct tar *,
+ struct archive_entry *, const void *h);
+static int header_longname(struct archive_read *, struct tar *,
+ struct archive_entry *, const void *h);
+static int header_volume(struct archive_read *, struct tar *,
+ struct archive_entry *, const void *h);
+static int header_ustar(struct archive_read *, struct tar *,
+ struct archive_entry *, const void *h);
+static int header_gnutar(struct archive_read *, struct tar *,
+ struct archive_entry *, const void *h);
+static int archive_read_format_tar_bid(struct archive_read *);
+static int archive_read_format_tar_cleanup(struct archive_read *);
+static int archive_read_format_tar_read_data(struct archive_read *a,
+ const void **buff, size_t *size, off_t *offset);
+static int archive_read_format_tar_skip(struct archive_read *a);
+static int archive_read_format_tar_read_header(struct archive_read *,
+ struct archive_entry *);
+static int checksum(struct archive_read *, const void *);
+static int pax_attribute(struct tar *, struct archive_entry *,
+ char *key, char *value);
+static int pax_header(struct archive_read *, struct tar *,
+ struct archive_entry *, char *attr);
+static void pax_time(const char *, int64_t *sec, long *nanos);
+static ssize_t readline(struct archive_read *, struct tar *, const char **,
+ ssize_t limit);
+static int read_body_to_string(struct archive_read *, struct tar *,
+ struct archive_string *, const void *h);
+static int64_t tar_atol(const char *, unsigned);
+static int64_t tar_atol10(const char *, unsigned);
+static int64_t tar_atol256(const char *, unsigned);
+static int64_t tar_atol8(const char *, unsigned);
+static int tar_read_header(struct archive_read *, struct tar *,
+ struct archive_entry *);
+static int tohex(int c);
+static char *url_decode(const char *);
+static wchar_t *utf8_decode(struct tar *, const char *, size_t length);
+
+int
+archive_read_support_format_gnutar(struct archive *a)
+{
+ return (archive_read_support_format_tar(a));
+}
+
+
+int
+archive_read_support_format_tar(struct archive *_a)
+{
+ struct archive_read *a = (struct archive_read *)_a;
+ struct tar *tar;
+ int r;
+
+ tar = (struct tar *)malloc(sizeof(*tar));
+ if (tar == NULL) {
+ archive_set_error(&a->archive, ENOMEM,
+ "Can't allocate tar data");
+ return (ARCHIVE_FATAL);
+ }
+ memset(tar, 0, sizeof(*tar));
+
+ r = __archive_read_register_format(a, tar, "tar",
+ archive_read_format_tar_bid,
+ NULL,
+ archive_read_format_tar_read_header,
+ archive_read_format_tar_read_data,
+ archive_read_format_tar_skip,
+ archive_read_format_tar_cleanup);
+
+ if (r != ARCHIVE_OK)
+ free(tar);
+ return (ARCHIVE_OK);
+}
+
+static int
+archive_read_format_tar_cleanup(struct archive_read *a)
+{
+ struct tar *tar;
+
+ tar = (struct tar *)(a->format->data);
+ gnu_clear_sparse_list(tar);
+ archive_string_free(&tar->acl_text);
+ archive_string_free(&tar->entry_pathname);
+ archive_string_free(&tar->entry_pathname_override);
+ archive_string_free(&tar->entry_linkpath);
+ archive_string_free(&tar->entry_uname);
+ archive_string_free(&tar->entry_gname);
+ archive_string_free(&tar->line);
+ archive_string_free(&tar->pax_global);
+ archive_string_free(&tar->pax_header);
+ archive_string_free(&tar->longname);
+ archive_string_free(&tar->longlink);
+ free(tar->pax_entry);
+ free(tar);
+ (a->format->data) = NULL;
+ return (ARCHIVE_OK);
+}
+
+
+static int
+archive_read_format_tar_bid(struct archive_read *a)
+{
+ int bid;
+ const void *h;
+ const struct archive_entry_header_ustar *header;
+
+ bid = 0;
+
+ /* Now let's look at the actual header and see if it matches. */
+ h = __archive_read_ahead(a, 512, NULL);
+ if (h == NULL)
+ return (-1);
+
+ /* If it's an end-of-archive mark, we can handle it. */
+ if ((*(const char *)h) == 0
+ && archive_block_is_null((const unsigned char *)h)) {
+ /*
+ * Usually, I bid the number of bits verified, but
+ * in this case, 4096 seems excessive so I picked 10 as
+ * an arbitrary but reasonable-seeming value.
+ */
+ return (10);
+ }
+
+ /* If it's not an end-of-archive mark, it must have a valid checksum.*/
+ if (!checksum(a, h))
+ return (0);
+ bid += 48; /* Checksum is usually 6 octal digits. */
+
+ header = (const struct archive_entry_header_ustar *)h;
+
+ /* Recognize POSIX formats. */
+ if ((memcmp(header->magic, "ustar\0", 6) == 0)
+ &&(memcmp(header->version, "00", 2)==0))
+ bid += 56;
+
+ /* Recognize GNU tar format. */
+ if ((memcmp(header->magic, "ustar ", 6) == 0)
+ &&(memcmp(header->version, " \0", 2)==0))
+ bid += 56;
+
+ /* Type flag must be null, digit or A-Z, a-z. */
+ if (header->typeflag[0] != 0 &&
+ !( header->typeflag[0] >= '0' && header->typeflag[0] <= '9') &&
+ !( header->typeflag[0] >= 'A' && header->typeflag[0] <= 'Z') &&
+ !( header->typeflag[0] >= 'a' && header->typeflag[0] <= 'z') )
+ return (0);
+ bid += 2; /* 6 bits of variation in an 8-bit field leaves 2 bits. */
+
+ /* Sanity check: Look at first byte of mode field. */
+ switch (255 & (unsigned)header->mode[0]) {
+ case 0: case 255:
+ /* Base-256 value: No further verification possible! */
+ break;
+ case ' ': /* Not recommended, but not illegal, either. */
+ break;
+ case '0': case '1': case '2': case '3':
+ case '4': case '5': case '6': case '7':
+ /* Octal Value. */
+ /* TODO: Check format of remainder of this field. */
+ break;
+ default:
+ /* Not a valid mode; bail out here. */
+ return (0);
+ }
+ /* TODO: Sanity test uid/gid/size/mtime/rdevmajor/rdevminor fields. */
+
+ return (bid);
+}
+
+/*
+ * The function invoked by archive_read_header(). This
+ * just sets up a few things and then calls the internal
+ * tar_read_header() function below.
+ */
+static int
+archive_read_format_tar_read_header(struct archive_read *a,
+ struct archive_entry *entry)
+{
+ /*
+ * When converting tar archives to cpio archives, it is
+ * essential that each distinct file have a distinct inode
+ * number. To simplify this, we keep a static count here to
+ * assign fake dev/inode numbers to each tar entry. Note that
+ * pax format archives may overwrite this with something more
+ * useful.
+ *
+ * Ideally, we would track every file read from the archive so
+ * that we could assign the same dev/ino pair to hardlinks,
+ * but the memory required to store a complete lookup table is
+ * probably not worthwhile just to support the relatively
+ * obscure tar->cpio conversion case.
+ */
+ static int default_inode;
+ static int default_dev;
+ struct tar *tar;
+ struct sparse_block *sp;
+ const char *p;
+ int r;
+ size_t l;
+
+ /* Assign default device/inode values. */
+ archive_entry_set_dev(entry, 1 + default_dev); /* Don't use zero. */
+ archive_entry_set_ino(entry, ++default_inode); /* Don't use zero. */
+ /* Limit generated st_ino number to 16 bits. */
+ if (default_inode >= 0xffff) {
+ ++default_dev;
+ default_inode = 0;
+ }
+
+ tar = (struct tar *)(a->format->data);
+ tar->entry_offset = 0;
+ while (tar->sparse_list != NULL) {
+ sp = tar->sparse_list;
+ tar->sparse_list = sp->next;
+ free(sp);
+ }
+ tar->sparse_last = NULL;
+ tar->realsize = -1; /* Mark this as "unset" */
+
+ r = tar_read_header(a, tar, entry);
+
+ /*
+ * "non-sparse" files are really just sparse files with
+ * a single block.
+ */
+ if (tar->sparse_list == NULL)
+ gnu_add_sparse_entry(tar, 0, tar->entry_bytes_remaining);
+
+ if (r == ARCHIVE_OK) {
+ /*
+ * "Regular" entry with trailing '/' is really
+ * directory: This is needed for certain old tar
+ * variants and even for some broken newer ones.
+ */
+ p = archive_entry_pathname(entry);
+ l = strlen(p);
+ if (archive_entry_filetype(entry) == AE_IFREG
+ && p[l-1] == '/')
+ archive_entry_set_filetype(entry, AE_IFDIR);
+ }
+ return (r);
+}
+
+static int
+archive_read_format_tar_read_data(struct archive_read *a,
+ const void **buff, size_t *size, off_t *offset)
+{
+ ssize_t bytes_read;
+ struct tar *tar;
+ struct sparse_block *p;
+
+ tar = (struct tar *)(a->format->data);
+
+ if (tar->sparse_gnu_pending) {
+ if (tar->sparse_gnu_major == 1 && tar->sparse_gnu_minor == 0) {
+ tar->sparse_gnu_pending = 0;
+ /* Read initial sparse map. */
+ bytes_read = gnu_sparse_10_read(a, tar);
+ tar->entry_bytes_remaining -= bytes_read;
+ if (bytes_read < 0)
+ return (bytes_read);
+ } else {
+ *size = 0;
+ *offset = 0;
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "Unrecognized GNU sparse file format");
+ return (ARCHIVE_WARN);
+ }
+ tar->sparse_gnu_pending = 0;
+ }
+
+ /* Remove exhausted entries from sparse list. */
+ while (tar->sparse_list != NULL &&
+ tar->sparse_list->remaining == 0) {
+ p = tar->sparse_list;
+ tar->sparse_list = p->next;
+ free(p);
+ }
+
+ /* If we're at end of file, return EOF. */
+ if (tar->sparse_list == NULL || tar->entry_bytes_remaining == 0) {
+ if (__archive_read_skip(a, tar->entry_padding) < 0)
+ return (ARCHIVE_FATAL);
+ tar->entry_padding = 0;
+ *buff = NULL;
+ *size = 0;
+ *offset = tar->realsize;
+ return (ARCHIVE_EOF);
+ }
+
+ *buff = __archive_read_ahead(a, 1, &bytes_read);
+ if (bytes_read < 0)
+ return (ARCHIVE_FATAL);
+ if (*buff == NULL) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "Truncated tar archive");
+ return (ARCHIVE_FATAL);
+ }
+ if (bytes_read > tar->entry_bytes_remaining)
+ bytes_read = tar->entry_bytes_remaining;
+ /* Don't read more than is available in the
+ * current sparse block. */
+ if (tar->sparse_list->remaining < bytes_read)
+ bytes_read = tar->sparse_list->remaining;
+ *size = bytes_read;
+ *offset = tar->sparse_list->offset;
+ tar->sparse_list->remaining -= bytes_read;
+ tar->sparse_list->offset += bytes_read;
+ tar->entry_bytes_remaining -= bytes_read;
+ __archive_read_consume(a, bytes_read);
+ return (ARCHIVE_OK);
+}
+
+static int
+archive_read_format_tar_skip(struct archive_read *a)
+{
+ int64_t bytes_skipped;
+ struct tar* tar;
+
+ tar = (struct tar *)(a->format->data);
+
+ /*
+ * Compression layer skip functions are required to either skip the
+ * length requested or fail, so we can rely upon the entire entry
+ * plus padding being skipped.
+ */
+ bytes_skipped = __archive_read_skip(a,
+ tar->entry_bytes_remaining + tar->entry_padding);
+ if (bytes_skipped < 0)
+ return (ARCHIVE_FATAL);
+
+ tar->entry_bytes_remaining = 0;
+ tar->entry_padding = 0;
+
+ /* Free the sparse list. */
+ gnu_clear_sparse_list(tar);
+
+ return (ARCHIVE_OK);
+}
+
+/*
+ * This function recursively interprets all of the headers associated
+ * with a single entry.
+ */
+static int
+tar_read_header(struct archive_read *a, struct tar *tar,
+ struct archive_entry *entry)
+{
+ ssize_t bytes;
+ int err;
+ const void *h;
+ const struct archive_entry_header_ustar *header;
+
+ /* Read 512-byte header record */
+ h = __archive_read_ahead(a, 512, &bytes);
+ if (bytes < 0)
+ return (bytes);
+ if (bytes < 512) { /* Short read or EOF. */
+ /* Try requesting just one byte and see what happens. */
+ (void)__archive_read_ahead(a, 1, &bytes);
+ if (bytes == 0) {
+ /*
+ * The archive ends at a 512-byte boundary but
+ * without a proper end-of-archive marker.
+ * Yes, there are tar writers that do this;
+ * hold our nose and accept it.
+ */
+ return (ARCHIVE_EOF);
+ }
+ /* Archive ends with a partial block; this is bad. */
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+ "Truncated tar archive");
+ return (ARCHIVE_FATAL);
+ }
+ __archive_read_consume(a, 512);
+
+
+ /* Check for end-of-archive mark. */
+ if (((*(const char *)h)==0) && archive_block_is_null((const unsigned char *)h)) {
+ /* Try to consume a second all-null record, as well. */
+ h = __archive_read_ahead(a, 512, NULL);
+ if (h != NULL)
+ __archive_read_consume(a, 512);
+ archive_clear_error(&a->archive);
+ if (a->archive.archive_format_name == NULL) {
+ a->archive.archive_format = ARCHIVE_FORMAT_TAR;
+ a->archive.archive_format_name = "tar";
+ }
+ return (ARCHIVE_EOF);
+ }
+
+ /*
+ * Note: If the checksum fails and we return ARCHIVE_RETRY,
+ * then the client is likely to just retry. This is a very
+ * crude way to search for the next valid header!
+ *
+ * TODO: Improve this by implementing a real header scan.
+ */
+ if (!checksum(a, h)) {
+ archive_set_error(&a->archive, EINVAL, "Damaged tar archive");
+ return (ARCHIVE_RETRY); /* Retryable: Invalid header */
+ }
+
+ if (++tar->header_recursion_depth > 32) {
+ archive_set_error(&a->archive, EINVAL, "Too many special headers");
+ return (ARCHIVE_WARN);
+ }
+
+ /* Determine the format variant. */
+ header = (const struct archive_entry_header_ustar *)h;
+ switch(header->typeflag[0]) {
+ case 'A': /* Solaris tar ACL */
+ a->archive.archive_format = ARCHIVE_FORMAT_TAR_PAX_INTERCHANGE;
+ a->archive.archive_format_name = "Solaris tar";
+ err = header_Solaris_ACL(a, tar, entry, h);
+ break;
+ case 'g': /* POSIX-standard 'g' header. */
+ a->archive.archive_format = ARCHIVE_FORMAT_TAR_PAX_INTERCHANGE;
+ a->archive.archive_format_name = "POSIX pax interchange format";
+ err = header_pax_global(a, tar, entry, h);
+ break;
+ case 'K': /* Long link name (GNU tar, others) */
+ err = header_longlink(a, tar, entry, h);
+ break;
+ case 'L': /* Long filename (GNU tar, others) */
+ err = header_longname(a, tar, entry, h);
+ break;
+ case 'V': /* GNU volume header */
+ err = header_volume(a, tar, entry, h);
+ break;
+ case 'X': /* Used by SUN tar; same as 'x'. */
+ a->archive.archive_format = ARCHIVE_FORMAT_TAR_PAX_INTERCHANGE;
+ a->archive.archive_format_name =
+ "POSIX pax interchange format (Sun variant)";
+ err = header_pax_extensions(a, tar, entry, h);
+ break;
+ case 'x': /* POSIX-standard 'x' header. */
+ a->archive.archive_format = ARCHIVE_FORMAT_TAR_PAX_INTERCHANGE;
+ a->archive.archive_format_name = "POSIX pax interchange format";
+ err = header_pax_extensions(a, tar, entry, h);
+ break;
+ default:
+ if (memcmp(header->magic, "ustar \0", 8) == 0) {
+ a->archive.archive_format = ARCHIVE_FORMAT_TAR_GNUTAR;
+ a->archive.archive_format_name = "GNU tar format";
+ err = header_gnutar(a, tar, entry, h);
+ } else if (memcmp(header->magic, "ustar", 5) == 0) {
+ if (a->archive.archive_format != ARCHIVE_FORMAT_TAR_PAX_INTERCHANGE) {
+ a->archive.archive_format = ARCHIVE_FORMAT_TAR_USTAR;
+ a->archive.archive_format_name = "POSIX ustar format";
+ }
+ err = header_ustar(a, tar, entry, h);
+ } else {
+ a->archive.archive_format = ARCHIVE_FORMAT_TAR;
+ a->archive.archive_format_name = "tar (non-POSIX)";
+ err = header_old_tar(a, tar, entry, h);
+ }
+ }
+ --tar->header_recursion_depth;
+ /* We return warnings or success as-is. Anything else is fatal. */
+ if (err == ARCHIVE_WARN || err == ARCHIVE_OK)
+ return (err);
+ if (err == ARCHIVE_EOF)
+ /* EOF when recursively reading a header is bad. */
+ archive_set_error(&a->archive, EINVAL, "Damaged tar archive");
+ return (ARCHIVE_FATAL);
+}
+
+/*
+ * Return true if block checksum is correct.
+ */
+static int
+checksum(struct archive_read *a, const void *h)
+{
+ const unsigned char *bytes;
+ const struct archive_entry_header_ustar *header;
+ int check, i, sum;
+
+ (void)a; /* UNUSED */
+ bytes = (const unsigned char *)h;
+ header = (const struct archive_entry_header_ustar *)h;
+
+ /*
+ * Test the checksum. Note that POSIX specifies _unsigned_
+ * bytes for this calculation.
+ */
+ sum = tar_atol(header->checksum, sizeof(header->checksum));
+ check = 0;
+ for (i = 0; i < 148; i++)
+ check += (unsigned char)bytes[i];
+ for (; i < 156; i++)
+ check += 32;
+ for (; i < 512; i++)
+ check += (unsigned char)bytes[i];
+ if (sum == check)
+ return (1);
+
+ /*
+ * Repeat test with _signed_ bytes, just in case this archive
+ * was created by an old BSD, Solaris, or HP-UX tar with a
+ * broken checksum calculation.
+ */
+ check = 0;
+ for (i = 0; i < 148; i++)
+ check += (signed char)bytes[i];
+ for (; i < 156; i++)
+ check += 32;
+ for (; i < 512; i++)
+ check += (signed char)bytes[i];
+ if (sum == check)
+ return (1);
+
+ return (0);
+}
+
+/*
+ * Return true if this block contains only nulls.
+ */
+static int
+archive_block_is_null(const unsigned char *p)
+{
+ unsigned i;
+
+ for (i = 0; i < 512; i++)
+ if (*p++)
+ return (0);
+ return (1);
+}
+
+/*
+ * Interpret 'A' Solaris ACL header
+ */
+static int
+header_Solaris_ACL(struct archive_read *a, struct tar *tar,
+ struct archive_entry *entry, const void *h)
+{
+ const struct archive_entry_header_ustar *header;
+ size_t size;
+ int err;
+ int64_t type;
+ char *acl, *p;
+ wchar_t *wp;
+
+ /*
+ * read_body_to_string adds a NUL terminator, but we need a little
+ * more to make sure that we don't overrun acl_text later.
+ */
+ header = (const struct archive_entry_header_ustar *)h;
+ size = tar_atol(header->size, sizeof(header->size));
+ err = read_body_to_string(a, tar, &(tar->acl_text), h);
+ if (err != ARCHIVE_OK)
+ return (err);
+ /* Recursively read next header */
+ err = tar_read_header(a, tar, entry);
+ if ((err != ARCHIVE_OK) && (err != ARCHIVE_WARN))
+ return (err);
+
+ /* TODO: Examine the first characters to see if this
+ * is an AIX ACL descriptor. We'll likely never support
+ * them, but it would be polite to recognize and warn when
+ * we do see them. */
+
+ /* Leading octal number indicates ACL type and number of entries. */
+ p = acl = tar->acl_text.s;
+ type = 0;
+ while (*p != '\0' && p < acl + size) {
+ if (*p < '0' || *p > '7') {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "Malformed Solaris ACL attribute (invalid digit)");
+ return(ARCHIVE_WARN);
+ }
+ type <<= 3;
+ type += *p - '0';
+ if (type > 077777777) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "Malformed Solaris ACL attribute (count too large)");
+ return (ARCHIVE_WARN);
+ }
+ p++;
+ }
+ switch ((int)type & ~0777777) {
+ case 01000000:
+ /* POSIX.1e ACL */
+ break;
+ case 03000000:
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "Solaris NFSv4 ACLs not supported");
+ return (ARCHIVE_WARN);
+ default:
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "Malformed Solaris ACL attribute (unsupported type %o)",
+ (int)type);
+ return (ARCHIVE_WARN);
+ }
+ p++;
+
+ if (p >= acl + size) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "Malformed Solaris ACL attribute (body overflow)");
+ return(ARCHIVE_WARN);
+ }
+
+ /* ACL text is null-terminated; find the end. */
+ size -= (p - acl);
+ acl = p;
+
+ while (*p != '\0' && p < acl + size)
+ p++;
+
+ wp = utf8_decode(tar, acl, p - acl);
+ err = __archive_entry_acl_parse_w(entry, wp,
+ ARCHIVE_ENTRY_ACL_TYPE_ACCESS);
+ if (err != ARCHIVE_OK)
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "Malformed Solaris ACL attribute (unparsable)");
+ return (err);
+}
+
+/*
+ * Interpret 'K' long linkname header.
+ */
+static int
+header_longlink(struct archive_read *a, struct tar *tar,
+ struct archive_entry *entry, const void *h)
+{
+ int err;
+
+ err = read_body_to_string(a, tar, &(tar->longlink), h);
+ if (err != ARCHIVE_OK)
+ return (err);
+ err = tar_read_header(a, tar, entry);
+ if ((err != ARCHIVE_OK) && (err != ARCHIVE_WARN))
+ return (err);
+ /* Set symlink if symlink already set, else hardlink. */
+ archive_entry_copy_link(entry, tar->longlink.s);
+ return (ARCHIVE_OK);
+}
+
+/*
+ * Interpret 'L' long filename header.
+ */
+static int
+header_longname(struct archive_read *a, struct tar *tar,
+ struct archive_entry *entry, const void *h)
+{
+ int err;
+
+ err = read_body_to_string(a, tar, &(tar->longname), h);
+ if (err != ARCHIVE_OK)
+ return (err);
+ /* Read and parse "real" header, then override name. */
+ err = tar_read_header(a, tar, entry);
+ if ((err != ARCHIVE_OK) && (err != ARCHIVE_WARN))
+ return (err);
+ archive_entry_copy_pathname(entry, tar->longname.s);
+ return (ARCHIVE_OK);
+}
+
+
+/*
+ * Interpret 'V' GNU tar volume header.
+ */
+static int
+header_volume(struct archive_read *a, struct tar *tar,
+ struct archive_entry *entry, const void *h)
+{
+ (void)h;
+
+ /* Just skip this and read the next header. */
+ return (tar_read_header(a, tar, entry));
+}
+
+/*
+ * Read body of an archive entry into an archive_string object.
+ */
+static int
+read_body_to_string(struct archive_read *a, struct tar *tar,
+ struct archive_string *as, const void *h)
+{
+ off_t size, padded_size;
+ const struct archive_entry_header_ustar *header;
+ const void *src;
+
+ (void)tar; /* UNUSED */
+ header = (const struct archive_entry_header_ustar *)h;
+ size = tar_atol(header->size, sizeof(header->size));
+ if ((size > 1048576) || (size < 0)) {
+ archive_set_error(&a->archive, EINVAL,
+ "Special header too large");
+ return (ARCHIVE_FATAL);
+ }
+
+ /* Fail if we can't make our buffer big enough. */
+ if (archive_string_ensure(as, size+1) == NULL) {
+ archive_set_error(&a->archive, ENOMEM,
+ "No memory");
+ return (ARCHIVE_FATAL);
+ }
+
+ /* Read the body into the string. */
+ padded_size = (size + 511) & ~ 511;
+ src = __archive_read_ahead(a, padded_size, NULL);
+ if (src == NULL)
+ return (ARCHIVE_FATAL);
+ memcpy(as->s, src, size);
+ __archive_read_consume(a, padded_size);
+ as->s[size] = '\0';
+ return (ARCHIVE_OK);
+}
+
+/*
+ * Parse out common header elements.
+ *
+ * This would be the same as header_old_tar, except that the
+ * filename is handled slightly differently for old and POSIX
+ * entries (POSIX entries support a 'prefix'). This factoring
+ * allows header_old_tar and header_ustar
+ * to handle filenames differently, while still putting most of the
+ * common parsing into one place.
+ */
+static int
+header_common(struct archive_read *a, struct tar *tar,
+ struct archive_entry *entry, const void *h)
+{
+ const struct archive_entry_header_ustar *header;
+ char tartype;
+
+ (void)a; /* UNUSED */
+
+ header = (const struct archive_entry_header_ustar *)h;
+ if (header->linkname[0])
+ archive_strncpy(&(tar->entry_linkpath), header->linkname,
+ sizeof(header->linkname));
+ else
+ archive_string_empty(&(tar->entry_linkpath));
+
+ /* Parse out the numeric fields (all are octal) */
+ archive_entry_set_mode(entry, tar_atol(header->mode, sizeof(header->mode)));
+ archive_entry_set_uid(entry, tar_atol(header->uid, sizeof(header->uid)));
+ archive_entry_set_gid(entry, tar_atol(header->gid, sizeof(header->gid)));
+ tar->entry_bytes_remaining = tar_atol(header->size, sizeof(header->size));
+ tar->realsize = tar->entry_bytes_remaining;
+ archive_entry_set_size(entry, tar->entry_bytes_remaining);
+ archive_entry_set_mtime(entry, tar_atol(header->mtime, sizeof(header->mtime)), 0);
+
+ /* Handle the tar type flag appropriately. */
+ tartype = header->typeflag[0];
+
+ switch (tartype) {
+ case '1': /* Hard link */
+ archive_entry_copy_hardlink(entry, tar->entry_linkpath.s);
+ /*
+ * The following may seem odd, but: Technically, tar
+ * does not store the file type for a "hard link"
+ * entry, only the fact that it is a hard link. So, I
+ * leave the type zero normally. But, pax interchange
+ * format allows hard links to have data, which
+ * implies that the underlying entry is a regular
+ * file.
+ */
+ if (archive_entry_size(entry) > 0)
+ archive_entry_set_filetype(entry, AE_IFREG);
+
+ /*
+ * A tricky point: Traditionally, tar readers have
+ * ignored the size field when reading hardlink
+ * entries, and some writers put non-zero sizes even
+ * though the body is empty. POSIX blessed this
+ * convention in the 1988 standard, but broke with
+ * this tradition in 2001 by permitting hardlink
+ * entries to store valid bodies in pax interchange
+ * format, but not in ustar format. Since there is no
+ * hard and fast way to distinguish pax interchange
+ * from earlier archives (the 'x' and 'g' entries are
+ * optional, after all), we need a heuristic.
+ */
+ if (archive_entry_size(entry) == 0) {
+ /* If the size is already zero, we're done. */
+ } else if (a->archive.archive_format
+ == ARCHIVE_FORMAT_TAR_PAX_INTERCHANGE) {
+ /* Definitely pax extended; must obey hardlink size. */
+ } else if (a->archive.archive_format == ARCHIVE_FORMAT_TAR
+ || a->archive.archive_format == ARCHIVE_FORMAT_TAR_GNUTAR)
+ {
+ /* Old-style or GNU tar: we must ignore the size. */
+ archive_entry_set_size(entry, 0);
+ tar->entry_bytes_remaining = 0;
+ } else if (archive_read_format_tar_bid(a) > 50) {
+ /*
+ * We don't know if it's pax: If the bid
+ * function sees a valid ustar header
+ * immediately following, then let's ignore
+ * the hardlink size.
+ */
+ archive_entry_set_size(entry, 0);
+ tar->entry_bytes_remaining = 0;
+ }
+ /*
+ * TODO: There are still two cases I'd like to handle:
+ * = a ustar non-pax archive with a hardlink entry at
+ * end-of-archive. (Look for block of nulls following?)
+ * = a pax archive that has not seen any pax headers
+ * and has an entry which is a hardlink entry storing
+ * a body containing an uncompressed tar archive.
+ * The first is worth addressing; I don't see any reliable
+ * way to deal with the second possibility.
+ */
+ break;
+ case '2': /* Symlink */
+ archive_entry_set_filetype(entry, AE_IFLNK);
+ archive_entry_set_size(entry, 0);
+ tar->entry_bytes_remaining = 0;
+ archive_entry_copy_symlink(entry, tar->entry_linkpath.s);
+ break;
+ case '3': /* Character device */
+ archive_entry_set_filetype(entry, AE_IFCHR);
+ archive_entry_set_size(entry, 0);
+ tar->entry_bytes_remaining = 0;
+ break;
+ case '4': /* Block device */
+ archive_entry_set_filetype(entry, AE_IFBLK);
+ archive_entry_set_size(entry, 0);
+ tar->entry_bytes_remaining = 0;
+ break;
+ case '5': /* Dir */
+ archive_entry_set_filetype(entry, AE_IFDIR);
+ archive_entry_set_size(entry, 0);
+ tar->entry_bytes_remaining = 0;
+ break;
+ case '6': /* FIFO device */
+ archive_entry_set_filetype(entry, AE_IFIFO);
+ archive_entry_set_size(entry, 0);
+ tar->entry_bytes_remaining = 0;
+ break;
+ case 'D': /* GNU incremental directory type */
+ /*
+ * No special handling is actually required here.
+ * It might be nice someday to preprocess the file list and
+ * provide it to the client, though.
+ */
+ archive_entry_set_filetype(entry, AE_IFDIR);
+ break;
+ case 'M': /* GNU "Multi-volume" (remainder of file from last archive)*/
+ /*
+ * As far as I can tell, this is just like a regular file
+ * entry, except that the contents should be _appended_ to
+ * the indicated file at the indicated offset. This may
+ * require some API work to fully support.
+ */
+ break;
+ case 'N': /* Old GNU "long filename" entry. */
+ /* The body of this entry is a script for renaming
+ * previously-extracted entries. Ugh. It will never
+ * be supported by libarchive. */
+ archive_entry_set_filetype(entry, AE_IFREG);
+ break;
+ case 'S': /* GNU sparse files */
+ /*
+ * Sparse files are really just regular files with
+ * sparse information in the extended area.
+ */
+ /* FALLTHROUGH */
+ default: /* Regular file and non-standard types */
+ /*
+ * Per POSIX: non-recognized types should always be
+ * treated as regular files.
+ */
+ archive_entry_set_filetype(entry, AE_IFREG);
+ break;
+ }
+ return (0);
+}
+
+/*
+ * Parse out header elements for "old-style" tar archives.
+ */
+static int
+header_old_tar(struct archive_read *a, struct tar *tar,
+ struct archive_entry *entry, const void *h)
+{
+ const struct archive_entry_header_ustar *header;
+
+ /* Copy filename over (to ensure null termination). */
+ header = (const struct archive_entry_header_ustar *)h;
+ archive_strncpy(&(tar->entry_pathname), header->name, sizeof(header->name));
+ archive_entry_copy_pathname(entry, tar->entry_pathname.s);
+
+ /* Grab rest of common fields */
+ header_common(a, tar, entry, h);
+
+ tar->entry_padding = 0x1ff & (-tar->entry_bytes_remaining);
+ return (0);
+}
+
+/*
+ * Parse a file header for a pax extended archive entry.
+ */
+static int
+header_pax_global(struct archive_read *a, struct tar *tar,
+ struct archive_entry *entry, const void *h)
+{
+ int err;
+
+ err = read_body_to_string(a, tar, &(tar->pax_global), h);
+ if (err != ARCHIVE_OK)
+ return (err);
+ err = tar_read_header(a, tar, entry);
+ return (err);
+}
+
+static int
+header_pax_extensions(struct archive_read *a, struct tar *tar,
+ struct archive_entry *entry, const void *h)
+{
+ int err, err2;
+
+ err = read_body_to_string(a, tar, &(tar->pax_header), h);
+ if (err != ARCHIVE_OK)
+ return (err);
+
+ /* Parse the next header. */
+ err = tar_read_header(a, tar, entry);
+ if ((err != ARCHIVE_OK) && (err != ARCHIVE_WARN))
+ return (err);
+
+ /*
+ * TODO: Parse global/default options into 'entry' struct here
+ * before handling file-specific options.
+ *
+ * This design (parse standard header, then overwrite with pax
+ * extended attribute data) usually works well, but isn't ideal;
+ * it would be better to parse the pax extended attributes first
+ * and then skip any fields in the standard header that were
+ * defined in the pax header.
+ */
+ err2 = pax_header(a, tar, entry, tar->pax_header.s);
+ err = err_combine(err, err2);
+ tar->entry_padding = 0x1ff & (-tar->entry_bytes_remaining);
+ return (err);
+}
+
+
+/*
+ * Parse a file header for a Posix "ustar" archive entry. This also
+ * handles "pax" or "extended ustar" entries.
+ */
+static int
+header_ustar(struct archive_read *a, struct tar *tar,
+ struct archive_entry *entry, const void *h)
+{
+ const struct archive_entry_header_ustar *header;
+ struct archive_string *as;
+
+ header = (const struct archive_entry_header_ustar *)h;
+
+ /* Copy name into an internal buffer to ensure null-termination. */
+ as = &(tar->entry_pathname);
+ if (header->prefix[0]) {
+ archive_strncpy(as, header->prefix, sizeof(header->prefix));
+ if (as->s[archive_strlen(as) - 1] != '/')
+ archive_strappend_char(as, '/');
+ archive_strncat(as, header->name, sizeof(header->name));
+ } else
+ archive_strncpy(as, header->name, sizeof(header->name));
+
+ archive_entry_copy_pathname(entry, as->s);
+
+ /* Handle rest of common fields. */
+ header_common(a, tar, entry, h);
+
+ /* Handle POSIX ustar fields. */
+ archive_strncpy(&(tar->entry_uname), header->uname,
+ sizeof(header->uname));
+ archive_entry_copy_uname(entry, tar->entry_uname.s);
+
+ archive_strncpy(&(tar->entry_gname), header->gname,
+ sizeof(header->gname));
+ archive_entry_copy_gname(entry, tar->entry_gname.s);
+
+ /* Parse out device numbers only for char and block specials. */
+ if (header->typeflag[0] == '3' || header->typeflag[0] == '4') {
+ archive_entry_set_rdevmajor(entry,
+ tar_atol(header->rdevmajor, sizeof(header->rdevmajor)));
+ archive_entry_set_rdevminor(entry,
+ tar_atol(header->rdevminor, sizeof(header->rdevminor)));
+ }
+
+ tar->entry_padding = 0x1ff & (-tar->entry_bytes_remaining);
+
+ return (0);
+}
+
+
+/*
+ * Parse the pax extended attributes record.
+ *
+ * Returns non-zero if there's an error in the data.
+ */
+static int
+pax_header(struct archive_read *a, struct tar *tar,
+ struct archive_entry *entry, char *attr)
+{
+ size_t attr_length, l, line_length;
+ char *p;
+ char *key, *value;
+ int err, err2;
+
+ attr_length = strlen(attr);
+ tar->pax_hdrcharset_binary = 0;
+ archive_string_empty(&(tar->entry_gname));
+ archive_string_empty(&(tar->entry_linkpath));
+ archive_string_empty(&(tar->entry_pathname));
+ archive_string_empty(&(tar->entry_pathname_override));
+ archive_string_empty(&(tar->entry_uname));
+ err = ARCHIVE_OK;
+ while (attr_length > 0) {
+ /* Parse decimal length field at start of line. */
+ line_length = 0;
+ l = attr_length;
+ p = attr; /* Record start of line. */
+ while (l>0) {
+ if (*p == ' ') {
+ p++;
+ l--;
+ break;
+ }
+ if (*p < '0' || *p > '9') {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "Ignoring malformed pax extended attributes");
+ return (ARCHIVE_WARN);
+ }
+ line_length *= 10;
+ line_length += *p - '0';
+ if (line_length > 999999) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "Rejecting pax extended attribute > 1MB");
+ return (ARCHIVE_WARN);
+ }
+ p++;
+ l--;
+ }
+
+ /*
+ * Parsed length must be no bigger than available data,
+ * at least 1, and the last character of the line must
+ * be '\n'.
+ */
+ if (line_length > attr_length
+ || line_length < 1
+ || attr[line_length - 1] != '\n')
+ {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "Ignoring malformed pax extended attribute");
+ return (ARCHIVE_WARN);
+ }
+
+ /* Null-terminate the line. */
+ attr[line_length - 1] = '\0';
+
+ /* Find end of key and null terminate it. */
+ key = p;
+ if (key[0] == '=')
+ return (-1);
+ while (*p && *p != '=')
+ ++p;
+ if (*p == '\0') {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "Invalid pax extended attributes");
+ return (ARCHIVE_WARN);
+ }
+ *p = '\0';
+
+ /* Identify null-terminated 'value' portion. */
+ value = p + 1;
+
+ /* Identify this attribute and set it in the entry. */
+ err2 = pax_attribute(tar, entry, key, value);
+ err = err_combine(err, err2);
+
+ /* Skip to next line */
+ attr += line_length;
+ attr_length -= line_length;
+ }
+ if (archive_strlen(&(tar->entry_gname)) > 0) {
+ value = tar->entry_gname.s;
+ if (tar->pax_hdrcharset_binary)
+ archive_entry_copy_gname(entry, value);
+ else {
+ if (!archive_entry_update_gname_utf8(entry, value)) {
+ err = ARCHIVE_WARN;
+ archive_set_error(&a->archive,
+ ARCHIVE_ERRNO_FILE_FORMAT,
+ "Gname in pax header can't "
+ "be converted to current locale.");
+ }
+ }
+ }
+ if (archive_strlen(&(tar->entry_linkpath)) > 0) {
+ value = tar->entry_linkpath.s;
+ if (tar->pax_hdrcharset_binary)
+ archive_entry_copy_link(entry, value);
+ else {
+ if (!archive_entry_update_link_utf8(entry, value)) {
+ err = ARCHIVE_WARN;
+ archive_set_error(&a->archive,
+ ARCHIVE_ERRNO_FILE_FORMAT,
+ "Linkname in pax header can't "
+ "be converted to current locale.");
+ }
+ }
+ }
+ /*
+ * Some extensions (such as the GNU sparse file extensions)
+ * deliberately store a synthetic name under the regular 'path'
+ * attribute and the real file name under a different attribute.
+ * Since we're supposed to not care about the order, we
+ * have no choice but to store all of the various filenames
+ * we find and figure it all out afterwards. This is the
+ * figuring out part.
+ */
+ value = NULL;
+ if (archive_strlen(&(tar->entry_pathname_override)) > 0)
+ value = tar->entry_pathname_override.s;
+ else if (archive_strlen(&(tar->entry_pathname)) > 0)
+ value = tar->entry_pathname.s;
+ if (value != NULL) {
+ if (tar->pax_hdrcharset_binary)
+ archive_entry_copy_pathname(entry, value);
+ else {
+ if (!archive_entry_update_pathname_utf8(entry, value)) {
+ err = ARCHIVE_WARN;
+ archive_set_error(&a->archive,
+ ARCHIVE_ERRNO_FILE_FORMAT,
+ "Pathname in pax header can't be "
+ "converted to current locale.");
+ }
+ }
+ }
+ if (archive_strlen(&(tar->entry_uname)) > 0) {
+ value = tar->entry_uname.s;
+ if (tar->pax_hdrcharset_binary)
+ archive_entry_copy_uname(entry, value);
+ else {
+ if (!archive_entry_update_uname_utf8(entry, value)) {
+ err = ARCHIVE_WARN;
+ archive_set_error(&a->archive,
+ ARCHIVE_ERRNO_FILE_FORMAT,
+ "Uname in pax header can't "
+ "be converted to current locale.");
+ }
+ }
+ }
+ return (err);
+}
+
+static int
+pax_attribute_xattr(struct archive_entry *entry,
+ char *name, char *value)
+{
+ char *name_decoded;
+ void *value_decoded;
+ size_t value_len;
+
+ if (strlen(name) < 18 || (strncmp(name, "LIBARCHIVE.xattr.", 17)) != 0)
+ return 3;
+
+ name += 17;
+
+ /* URL-decode name */
+ name_decoded = url_decode(name);
+ if (name_decoded == NULL)
+ return 2;
+
+ /* Base-64 decode value */
+ value_decoded = base64_decode(value, strlen(value), &value_len);
+ if (value_decoded == NULL) {
+ free(name_decoded);
+ return 1;
+ }
+
+ archive_entry_xattr_add_entry(entry, name_decoded,
+ value_decoded, value_len);
+
+ free(name_decoded);
+ free(value_decoded);
+ return 0;
+}
+
+/*
+ * Parse a single key=value attribute. key/value pointers are
+ * assumed to point into reasonably long-lived storage.
+ *
+ * Note that POSIX reserves all-lowercase keywords. Vendor-specific
+ * extensions should always have keywords of the form "VENDOR.attribute"
+ * In particular, it's quite feasible to support many different
+ * vendor extensions here. I'm using "LIBARCHIVE" for extensions
+ * unique to this library.
+ *
+ * Investigate other vendor-specific extensions and see if
+ * any of them look useful.
+ */
+static int
+pax_attribute(struct tar *tar, struct archive_entry *entry,
+ char *key, char *value)
+{
+ int64_t s;
+ long n;
+ wchar_t *wp;
+
+ switch (key[0]) {
+ case 'G':
+ /* GNU "0.0" sparse pax format. */
+ if (strcmp(key, "GNU.sparse.numblocks") == 0) {
+ tar->sparse_offset = -1;
+ tar->sparse_numbytes = -1;
+ tar->sparse_gnu_major = 0;
+ tar->sparse_gnu_minor = 0;
+ }
+ if (strcmp(key, "GNU.sparse.offset") == 0) {
+ tar->sparse_offset = tar_atol10(value, strlen(value));
+ if (tar->sparse_numbytes != -1) {
+ gnu_add_sparse_entry(tar,
+ tar->sparse_offset, tar->sparse_numbytes);
+ tar->sparse_offset = -1;
+ tar->sparse_numbytes = -1;
+ }
+ }
+ if (strcmp(key, "GNU.sparse.numbytes") == 0) {
+ tar->sparse_numbytes = tar_atol10(value, strlen(value));
+ if (tar->sparse_numbytes != -1) {
+ gnu_add_sparse_entry(tar,
+ tar->sparse_offset, tar->sparse_numbytes);
+ tar->sparse_offset = -1;
+ tar->sparse_numbytes = -1;
+ }
+ }
+ if (strcmp(key, "GNU.sparse.size") == 0) {
+ tar->realsize = tar_atol10(value, strlen(value));
+ archive_entry_set_size(entry, tar->realsize);
+ }
+
+ /* GNU "0.1" sparse pax format. */
+ if (strcmp(key, "GNU.sparse.map") == 0) {
+ tar->sparse_gnu_major = 0;
+ tar->sparse_gnu_minor = 1;
+ if (gnu_sparse_01_parse(tar, value) != ARCHIVE_OK)
+ return (ARCHIVE_WARN);
+ }
+
+ /* GNU "1.0" sparse pax format */
+ if (strcmp(key, "GNU.sparse.major") == 0) {
+ tar->sparse_gnu_major = tar_atol10(value, strlen(value));
+ tar->sparse_gnu_pending = 1;
+ }
+ if (strcmp(key, "GNU.sparse.minor") == 0) {
+ tar->sparse_gnu_minor = tar_atol10(value, strlen(value));
+ tar->sparse_gnu_pending = 1;
+ }
+ if (strcmp(key, "GNU.sparse.name") == 0) {
+ /*
+ * The real filename; when storing sparse
+ * files, GNU tar puts a synthesized name into
+ * the regular 'path' attribute in an attempt
+ * to limit confusion. ;-)
+ */
+ archive_strcpy(&(tar->entry_pathname_override), value);
+ }
+ if (strcmp(key, "GNU.sparse.realsize") == 0) {
+ tar->realsize = tar_atol10(value, strlen(value));
+ archive_entry_set_size(entry, tar->realsize);
+ }
+ break;
+ case 'L':
+ /* Our extensions */
+/* TODO: Handle arbitrary extended attributes... */
+/*
+ if (strcmp(key, "LIBARCHIVE.xxxxxxx")==0)
+ archive_entry_set_xxxxxx(entry, value);
+*/
+ if (strcmp(key, "LIBARCHIVE.creationtime")==0) {
+ pax_time(value, &s, &n);
+ archive_entry_set_birthtime(entry, s, n);
+ }
+ if (strncmp(key, "LIBARCHIVE.xattr.", 17)==0)
+ pax_attribute_xattr(entry, key, value);
+ break;
+ case 'S':
+ /* We support some keys used by the "star" archiver */
+ if (strcmp(key, "SCHILY.acl.access")==0) {
+ wp = utf8_decode(tar, value, strlen(value));
+ /* TODO: if (wp == NULL) */
+ __archive_entry_acl_parse_w(entry, wp,
+ ARCHIVE_ENTRY_ACL_TYPE_ACCESS);
+ } else if (strcmp(key, "SCHILY.acl.default")==0) {
+ wp = utf8_decode(tar, value, strlen(value));
+ /* TODO: if (wp == NULL) */
+ __archive_entry_acl_parse_w(entry, wp,
+ ARCHIVE_ENTRY_ACL_TYPE_DEFAULT);
+ } else if (strcmp(key, "SCHILY.devmajor")==0) {
+ archive_entry_set_rdevmajor(entry,
+ tar_atol10(value, strlen(value)));
+ } else if (strcmp(key, "SCHILY.devminor")==0) {
+ archive_entry_set_rdevminor(entry,
+ tar_atol10(value, strlen(value)));
+ } else if (strcmp(key, "SCHILY.fflags")==0) {
+ archive_entry_copy_fflags_text(entry, value);
+ } else if (strcmp(key, "SCHILY.dev")==0) {
+ archive_entry_set_dev(entry,
+ tar_atol10(value, strlen(value)));
+ } else if (strcmp(key, "SCHILY.ino")==0) {
+ archive_entry_set_ino(entry,
+ tar_atol10(value, strlen(value)));
+ } else if (strcmp(key, "SCHILY.nlink")==0) {
+ archive_entry_set_nlink(entry,
+ tar_atol10(value, strlen(value)));
+ } else if (strcmp(key, "SCHILY.realsize")==0) {
+ tar->realsize = tar_atol10(value, strlen(value));
+ archive_entry_set_size(entry, tar->realsize);
+ }
+ break;
+ case 'a':
+ if (strcmp(key, "atime")==0) {
+ pax_time(value, &s, &n);
+ archive_entry_set_atime(entry, s, n);
+ }
+ break;
+ case 'c':
+ if (strcmp(key, "ctime")==0) {
+ pax_time(value, &s, &n);
+ archive_entry_set_ctime(entry, s, n);
+ } else if (strcmp(key, "charset")==0) {
+ /* TODO: Publish charset information in entry. */
+ } else if (strcmp(key, "comment")==0) {
+ /* TODO: Publish comment in entry. */
+ }
+ break;
+ case 'g':
+ if (strcmp(key, "gid")==0) {
+ archive_entry_set_gid(entry,
+ tar_atol10(value, strlen(value)));
+ } else if (strcmp(key, "gname")==0) {
+ archive_strcpy(&(tar->entry_gname), value);
+ }
+ break;
+ case 'h':
+ if (strcmp(key, "hdrcharset") == 0) {
+ if (strcmp(value, "BINARY") == 0)
+ tar->pax_hdrcharset_binary = 1;
+ else if (strcmp(value, "ISO-IR 10646 2000 UTF-8") == 0)
+ tar->pax_hdrcharset_binary = 0;
+ else {
+ /* TODO: Warn about unsupported hdrcharset */
+ }
+ }
+ break;
+ case 'l':
+ /* pax interchange doesn't distinguish hardlink vs. symlink. */
+ if (strcmp(key, "linkpath")==0) {
+ archive_strcpy(&(tar->entry_linkpath), value);
+ }
+ break;
+ case 'm':
+ if (strcmp(key, "mtime")==0) {
+ pax_time(value, &s, &n);
+ archive_entry_set_mtime(entry, s, n);
+ }
+ break;
+ case 'p':
+ if (strcmp(key, "path")==0) {
+ archive_strcpy(&(tar->entry_pathname), value);
+ }
+ break;
+ case 'r':
+ /* POSIX has reserved 'realtime.*' */
+ break;
+ case 's':
+ /* POSIX has reserved 'security.*' */
+ /* Someday: if (strcmp(key, "security.acl")==0) { ... } */
+ if (strcmp(key, "size")==0) {
+ /* "size" is the size of the data in the entry. */
+ tar->entry_bytes_remaining
+ = tar_atol10(value, strlen(value));
+ /*
+ * But, "size" is not necessarily the size of
+ * the file on disk; if this is a sparse file,
+ * the disk size may have already been set from
+ * GNU.sparse.realsize or GNU.sparse.size or
+ * an old GNU header field or SCHILY.realsize
+ * or ....
+ */
+ if (tar->realsize < 0) {
+ archive_entry_set_size(entry,
+ tar->entry_bytes_remaining);
+ tar->realsize
+ = tar->entry_bytes_remaining;
+ }
+ }
+ break;
+ case 'u':
+ if (strcmp(key, "uid")==0) {
+ archive_entry_set_uid(entry,
+ tar_atol10(value, strlen(value)));
+ } else if (strcmp(key, "uname")==0) {
+ archive_strcpy(&(tar->entry_uname), value);
+ }
+ break;
+ }
+ return (0);
+}
+
+
+
+/*
+ * parse a decimal time value, which may include a fractional portion
+ */
+static void
+pax_time(const char *p, int64_t *ps, long *pn)
+{
+ char digit;
+ int64_t s;
+ unsigned long l;
+ int sign;
+ int64_t limit, last_digit_limit;
+
+ limit = INT64_MAX / 10;
+ last_digit_limit = INT64_MAX % 10;
+
+ s = 0;
+ sign = 1;
+ if (*p == '-') {
+ sign = -1;
+ p++;
+ }
+ while (*p >= '0' && *p <= '9') {
+ digit = *p - '0';
+ if (s > limit ||
+ (s == limit && digit > last_digit_limit)) {
+ s = INT64_MAX;
+ break;
+ }
+ s = (s * 10) + digit;
+ ++p;
+ }
+
+ *ps = s * sign;
+
+ /* Calculate nanoseconds. */
+ *pn = 0;
+
+ if (*p != '.')
+ return;
+
+ l = 100000000UL;
+ do {
+ ++p;
+ if (*p >= '0' && *p <= '9')
+ *pn += (*p - '0') * l;
+ else
+ break;
+ } while (l /= 10);
+}
+
+/*
+ * Parse GNU tar header
+ */
+static int
+header_gnutar(struct archive_read *a, struct tar *tar,
+ struct archive_entry *entry, const void *h)
+{
+ const struct archive_entry_header_gnutar *header;
+
+ (void)a;
+
+ /*
+ * GNU header is like POSIX ustar, except 'prefix' is
+ * replaced with some other fields. This also means the
+ * filename is stored as in old-style archives.
+ */
+
+ /* Grab fields common to all tar variants. */
+ header_common(a, tar, entry, h);
+
+ /* Copy filename over (to ensure null termination). */
+ header = (const struct archive_entry_header_gnutar *)h;
+ archive_strncpy(&(tar->entry_pathname), header->name,
+ sizeof(header->name));
+ archive_entry_copy_pathname(entry, tar->entry_pathname.s);
+
+ /* Fields common to ustar and GNU */
+ /* XXX Can the following be factored out since it's common
+ * to ustar and gnu tar? Is it okay to move it down into
+ * header_common, perhaps? */
+ archive_strncpy(&(tar->entry_uname),
+ header->uname, sizeof(header->uname));
+ archive_entry_copy_uname(entry, tar->entry_uname.s);
+
+ archive_strncpy(&(tar->entry_gname),
+ header->gname, sizeof(header->gname));
+ archive_entry_copy_gname(entry, tar->entry_gname.s);
+
+ /* Parse out device numbers only for char and block specials */
+ if (header->typeflag[0] == '3' || header->typeflag[0] == '4') {
+ archive_entry_set_rdevmajor(entry,
+ tar_atol(header->rdevmajor, sizeof(header->rdevmajor)));
+ archive_entry_set_rdevminor(entry,
+ tar_atol(header->rdevminor, sizeof(header->rdevminor)));
+ } else
+ archive_entry_set_rdev(entry, 0);
+
+ tar->entry_padding = 0x1ff & (-tar->entry_bytes_remaining);
+
+ /* Grab GNU-specific fields. */
+ archive_entry_set_atime(entry,
+ tar_atol(header->atime, sizeof(header->atime)), 0);
+ archive_entry_set_ctime(entry,
+ tar_atol(header->ctime, sizeof(header->ctime)), 0);
+ if (header->realsize[0] != 0) {
+ tar->realsize
+ = tar_atol(header->realsize, sizeof(header->realsize));
+ archive_entry_set_size(entry, tar->realsize);
+ }
+
+ if (header->sparse[0].offset[0] != 0) {
+ gnu_sparse_old_read(a, tar, header);
+ } else {
+ if (header->isextended[0] != 0) {
+ /* XXX WTF? XXX */
+ }
+ }
+
+ return (0);
+}
+
+static void
+gnu_add_sparse_entry(struct tar *tar, off_t offset, off_t remaining)
+{
+ struct sparse_block *p;
+
+ p = (struct sparse_block *)malloc(sizeof(*p));
+ if (p == NULL)
+ __archive_errx(1, "Out of memory");
+ memset(p, 0, sizeof(*p));
+ if (tar->sparse_last != NULL)
+ tar->sparse_last->next = p;
+ else
+ tar->sparse_list = p;
+ tar->sparse_last = p;
+ p->offset = offset;
+ p->remaining = remaining;
+}
+
+static void
+gnu_clear_sparse_list(struct tar *tar)
+{
+ struct sparse_block *p;
+
+ while (tar->sparse_list != NULL) {
+ p = tar->sparse_list;
+ tar->sparse_list = p->next;
+ free(p);
+ }
+ tar->sparse_last = NULL;
+}
+
+/*
+ * GNU tar old-format sparse data.
+ *
+ * GNU old-format sparse data is stored in a fixed-field
+ * format. Offset/size values are 11-byte octal fields (same
+ * format as 'size' field in ustart header). These are
+ * stored in the header, allocating subsequent header blocks
+ * as needed. Extending the header in this way is a pretty
+ * severe POSIX violation; this design has earned GNU tar a
+ * lot of criticism.
+ */
+
+static int
+gnu_sparse_old_read(struct archive_read *a, struct tar *tar,
+ const struct archive_entry_header_gnutar *header)
+{
+ ssize_t bytes_read;
+ const void *data;
+ struct extended {
+ struct gnu_sparse sparse[21];
+ char isextended[1];
+ char padding[7];
+ };
+ const struct extended *ext;
+
+ gnu_sparse_old_parse(tar, header->sparse, 4);
+ if (header->isextended[0] == 0)
+ return (ARCHIVE_OK);
+
+ do {
+ data = __archive_read_ahead(a, 512, &bytes_read);
+ if (bytes_read < 0)
+ return (ARCHIVE_FATAL);
+ if (bytes_read < 512) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+ "Truncated tar archive "
+ "detected while reading sparse file data");
+ return (ARCHIVE_FATAL);
+ }
+ __archive_read_consume(a, 512);
+ ext = (const struct extended *)data;
+ gnu_sparse_old_parse(tar, ext->sparse, 21);
+ } while (ext->isextended[0] != 0);
+ if (tar->sparse_list != NULL)
+ tar->entry_offset = tar->sparse_list->offset;
+ return (ARCHIVE_OK);
+}
+
+static void
+gnu_sparse_old_parse(struct tar *tar,
+ const struct gnu_sparse *sparse, int length)
+{
+ while (length > 0 && sparse->offset[0] != 0) {
+ gnu_add_sparse_entry(tar,
+ tar_atol(sparse->offset, sizeof(sparse->offset)),
+ tar_atol(sparse->numbytes, sizeof(sparse->numbytes)));
+ sparse++;
+ length--;
+ }
+}
+
+/*
+ * GNU tar sparse format 0.0
+ *
+ * Beginning with GNU tar 1.15, sparse files are stored using
+ * information in the pax extended header. The GNU tar maintainers
+ * have gone through a number of variations in the process of working
+ * out this scheme; furtunately, they're all numbered.
+ *
+ * Sparse format 0.0 uses attribute GNU.sparse.numblocks to store the
+ * number of blocks, and GNU.sparse.offset/GNU.sparse.numbytes to
+ * store offset/size for each block. The repeated instances of these
+ * latter fields violate the pax specification (which frowns on
+ * duplicate keys), so this format was quickly replaced.
+ */
+
+/*
+ * GNU tar sparse format 0.1
+ *
+ * This version replaced the offset/numbytes attributes with
+ * a single "map" attribute that stored a list of integers. This
+ * format had two problems: First, the "map" attribute could be very
+ * long, which caused problems for some implementations. More
+ * importantly, the sparse data was lost when extracted by archivers
+ * that didn't recognize this extension.
+ */
+
+static int
+gnu_sparse_01_parse(struct tar *tar, const char *p)
+{
+ const char *e;
+ off_t offset = -1, size = -1;
+
+ for (;;) {
+ e = p;
+ while (*e != '\0' && *e != ',') {
+ if (*e < '0' || *e > '9')
+ return (ARCHIVE_WARN);
+ e++;
+ }
+ if (offset < 0) {
+ offset = tar_atol10(p, e - p);
+ if (offset < 0)
+ return (ARCHIVE_WARN);
+ } else {
+ size = tar_atol10(p, e - p);
+ if (size < 0)
+ return (ARCHIVE_WARN);
+ gnu_add_sparse_entry(tar, offset, size);
+ offset = -1;
+ }
+ if (*e == '\0')
+ return (ARCHIVE_OK);
+ p = e + 1;
+ }
+}
+
+/*
+ * GNU tar sparse format 1.0
+ *
+ * The idea: The offset/size data is stored as a series of base-10
+ * ASCII numbers prepended to the file data, so that dearchivers that
+ * don't support this format will extract the block map along with the
+ * data and a separate post-process can restore the sparseness.
+ *
+ * Unfortunately, GNU tar 1.16 had a bug that added unnecessary
+ * padding to the body of the file when using this format. GNU tar
+ * 1.17 corrected this bug without bumping the version number, so
+ * it's not possible to support both variants. This code supports
+ * the later variant at the expense of not supporting the former.
+ *
+ * This variant also replaced GNU.sparse.size with GNU.sparse.realsize
+ * and introduced the GNU.sparse.major/GNU.sparse.minor attributes.
+ */
+
+/*
+ * Read the next line from the input, and parse it as a decimal
+ * integer followed by '\n'. Returns positive integer value or
+ * negative on error.
+ */
+static int64_t
+gnu_sparse_10_atol(struct archive_read *a, struct tar *tar,
+ ssize_t *remaining)
+{
+ int64_t l, limit, last_digit_limit;
+ const char *p;
+ ssize_t bytes_read;
+ int base, digit;
+
+ base = 10;
+ limit = INT64_MAX / base;
+ last_digit_limit = INT64_MAX % base;
+
+ /*
+ * Skip any lines starting with '#'; GNU tar specs
+ * don't require this, but they should.
+ */
+ do {
+ bytes_read = readline(a, tar, &p, tar_min(*remaining, 100));
+ if (bytes_read <= 0)
+ return (ARCHIVE_FATAL);
+ *remaining -= bytes_read;
+ } while (p[0] == '#');
+
+ l = 0;
+ while (bytes_read > 0) {
+ if (*p == '\n')
+ return (l);
+ if (*p < '0' || *p >= '0' + base)
+ return (ARCHIVE_WARN);
+ digit = *p - '0';
+ if (l > limit || (l == limit && digit > last_digit_limit))
+ l = INT64_MAX; /* Truncate on overflow. */
+ else
+ l = (l * base) + digit;
+ p++;
+ bytes_read--;
+ }
+ /* TODO: Error message. */
+ return (ARCHIVE_WARN);
+}
+
+/*
+ * Returns length (in bytes) of the sparse data description
+ * that was read.
+ */
+static ssize_t
+gnu_sparse_10_read(struct archive_read *a, struct tar *tar)
+{
+ ssize_t remaining, bytes_read;
+ int entries;
+ off_t offset, size, to_skip;
+
+ /* Clear out the existing sparse list. */
+ gnu_clear_sparse_list(tar);
+
+ remaining = tar->entry_bytes_remaining;
+
+ /* Parse entries. */
+ entries = gnu_sparse_10_atol(a, tar, &remaining);
+ if (entries < 0)
+ return (ARCHIVE_FATAL);
+ /* Parse the individual entries. */
+ while (entries-- > 0) {
+ /* Parse offset/size */
+ offset = gnu_sparse_10_atol(a, tar, &remaining);
+ if (offset < 0)
+ return (ARCHIVE_FATAL);
+ size = gnu_sparse_10_atol(a, tar, &remaining);
+ if (size < 0)
+ return (ARCHIVE_FATAL);
+ /* Add a new sparse entry. */
+ gnu_add_sparse_entry(tar, offset, size);
+ }
+ /* Skip rest of block... */
+ bytes_read = tar->entry_bytes_remaining - remaining;
+ to_skip = 0x1ff & -bytes_read;
+ if (to_skip != __archive_read_skip(a, to_skip))
+ return (ARCHIVE_FATAL);
+ return (bytes_read + to_skip);
+}
+
+/*-
+ * Convert text->integer.
+ *
+ * Traditional tar formats (including POSIX) specify base-8 for
+ * all of the standard numeric fields. This is a significant limitation
+ * in practice:
+ * = file size is limited to 8GB
+ * = rdevmajor and rdevminor are limited to 21 bits
+ * = uid/gid are limited to 21 bits
+ *
+ * There are two workarounds for this:
+ * = pax extended headers, which use variable-length string fields
+ * = GNU tar and STAR both allow either base-8 or base-256 in
+ * most fields. The high bit is set to indicate base-256.
+ *
+ * On read, this implementation supports both extensions.
+ */
+static int64_t
+tar_atol(const char *p, unsigned char_cnt)
+{
+ /*
+ * Technically, GNU tar considers a field to be in base-256
+ * only if the first byte is 0xff or 0x80.
+ */
+ if (*p & 0x80)
+ return (tar_atol256(p, char_cnt));
+ return (tar_atol8(p, char_cnt));
+}
+
+/*
+ * Note that this implementation does not (and should not!) obey
+ * locale settings; you cannot simply substitute strtol here, since
+ * it does obey locale.
+ */
+static int64_t
+tar_atol8(const char *p, unsigned char_cnt)
+{
+ int64_t l, limit, last_digit_limit;
+ int digit, sign, base;
+
+ base = 8;
+ limit = INT64_MAX / base;
+ last_digit_limit = INT64_MAX % base;
+
+ while (*p == ' ' || *p == '\t')
+ p++;
+ if (*p == '-') {
+ sign = -1;
+ p++;
+ } else
+ sign = 1;
+
+ l = 0;
+ digit = *p - '0';
+ while (digit >= 0 && digit < base && char_cnt-- > 0) {
+ if (l>limit || (l == limit && digit > last_digit_limit)) {
+ l = INT64_MAX; /* Truncate on overflow. */
+ break;
+ }
+ l = (l * base) + digit;
+ digit = *++p - '0';
+ }
+ return (sign < 0) ? -l : l;
+}
+
+/*
+ * Note that this implementation does not (and should not!) obey
+ * locale settings; you cannot simply substitute strtol here, since
+ * it does obey locale.
+ */
+static int64_t
+tar_atol10(const char *p, unsigned char_cnt)
+{
+ int64_t l, limit, last_digit_limit;
+ int base, digit, sign;
+
+ base = 10;
+ limit = INT64_MAX / base;
+ last_digit_limit = INT64_MAX % base;
+
+ while (*p == ' ' || *p == '\t')
+ p++;
+ if (*p == '-') {
+ sign = -1;
+ p++;
+ } else
+ sign = 1;
+
+ l = 0;
+ digit = *p - '0';
+ while (digit >= 0 && digit < base && char_cnt-- > 0) {
+ if (l > limit || (l == limit && digit > last_digit_limit)) {
+ l = INT64_MAX; /* Truncate on overflow. */
+ break;
+ }
+ l = (l * base) + digit;
+ digit = *++p - '0';
+ }
+ return (sign < 0) ? -l : l;
+}
+
+/*
+ * Parse a base-256 integer. This is just a straight signed binary
+ * value in big-endian order, except that the high-order bit is
+ * ignored.
+ */
+static int64_t
+tar_atol256(const char *_p, unsigned char_cnt)
+{
+ int64_t l, upper_limit, lower_limit;
+ const unsigned char *p = (const unsigned char *)_p;
+
+ upper_limit = INT64_MAX / 256;
+ lower_limit = INT64_MIN / 256;
+
+ /* Pad with 1 or 0 bits, depending on sign. */
+ if ((0x40 & *p) == 0x40)
+ l = (int64_t)-1;
+ else
+ l = 0;
+ l = (l << 6) | (0x3f & *p++);
+ while (--char_cnt > 0) {
+ if (l > upper_limit) {
+ l = INT64_MAX; /* Truncate on overflow */
+ break;
+ } else if (l < lower_limit) {
+ l = INT64_MIN;
+ break;
+ }
+ l = (l << 8) | (0xff & (int64_t)*p++);
+ }
+ return (l);
+}
+
+/*
+ * Returns length of line (including trailing newline)
+ * or negative on error. 'start' argument is updated to
+ * point to first character of line. This avoids copying
+ * when possible.
+ */
+static ssize_t
+readline(struct archive_read *a, struct tar *tar, const char **start,
+ ssize_t limit)
+{
+ ssize_t bytes_read;
+ ssize_t total_size = 0;
+ const void *t;
+ const char *s;
+ void *p;
+
+ t = __archive_read_ahead(a, 1, &bytes_read);
+ if (bytes_read <= 0)
+ return (ARCHIVE_FATAL);
+ s = t; /* Start of line? */
+ p = memchr(t, '\n', bytes_read);
+ /* If we found '\n' in the read buffer, return pointer to that. */
+ if (p != NULL) {
+ bytes_read = 1 + ((const char *)p) - s;
+ if (bytes_read > limit) {
+ archive_set_error(&a->archive,
+ ARCHIVE_ERRNO_FILE_FORMAT,
+ "Line too long");
+ return (ARCHIVE_FATAL);
+ }
+ __archive_read_consume(a, bytes_read);
+ *start = s;
+ return (bytes_read);
+ }
+ /* Otherwise, we need to accumulate in a line buffer. */
+ for (;;) {
+ if (total_size + bytes_read > limit) {
+ archive_set_error(&a->archive,
+ ARCHIVE_ERRNO_FILE_FORMAT,
+ "Line too long");
+ return (ARCHIVE_FATAL);
+ }
+ if (archive_string_ensure(&tar->line, total_size + bytes_read) == NULL) {
+ archive_set_error(&a->archive, ENOMEM,
+ "Can't allocate working buffer");
+ return (ARCHIVE_FATAL);
+ }
+ memcpy(tar->line.s + total_size, t, bytes_read);
+ __archive_read_consume(a, bytes_read);
+ total_size += bytes_read;
+ /* If we found '\n', clean up and return. */
+ if (p != NULL) {
+ *start = tar->line.s;
+ return (total_size);
+ }
+ /* Read some more. */
+ t = __archive_read_ahead(a, 1, &bytes_read);
+ if (bytes_read <= 0)
+ return (ARCHIVE_FATAL);
+ s = t; /* Start of line? */
+ p = memchr(t, '\n', bytes_read);
+ /* If we found '\n', trim the read. */
+ if (p != NULL) {
+ bytes_read = 1 + ((const char *)p) - s;
+ }
+ }
+}
+
+static wchar_t *
+utf8_decode(struct tar *tar, const char *src, size_t length)
+{
+ wchar_t *dest;
+ ssize_t n;
+
+ /* Ensure pax_entry buffer is big enough. */
+ if (tar->pax_entry_length <= length) {
+ wchar_t *old_entry;
+
+ if (tar->pax_entry_length <= 0)
+ tar->pax_entry_length = 1024;
+ while (tar->pax_entry_length <= length + 1)
+ tar->pax_entry_length *= 2;
+
+ old_entry = tar->pax_entry;
+ tar->pax_entry = (wchar_t *)realloc(tar->pax_entry,
+ tar->pax_entry_length * sizeof(wchar_t));
+ if (tar->pax_entry == NULL) {
+ free(old_entry);
+ /* TODO: Handle this error. */
+ return (NULL);
+ }
+ }
+
+ dest = tar->pax_entry;
+ while (length > 0) {
+ n = UTF8_mbrtowc(dest, src, length);
+ if (n < 0)
+ return (NULL);
+ if (n == 0)
+ break;
+ dest++;
+ src += n;
+ length -= n;
+ }
+ *dest = L'\0';
+ return (tar->pax_entry);
+}
+
+/*
+ * Copied and simplified from FreeBSD libc/locale.
+ */
+static ssize_t
+UTF8_mbrtowc(wchar_t *pwc, const char *s, size_t n)
+{
+ int ch, i, len, mask;
+ unsigned long wch;
+
+ if (s == NULL || n == 0 || pwc == NULL)
+ return (0);
+
+ /*
+ * Determine the number of octets that make up this character from
+ * the first octet, and a mask that extracts the interesting bits of
+ * the first octet.
+ */
+ ch = (unsigned char)*s;
+ if ((ch & 0x80) == 0) {
+ mask = 0x7f;
+ len = 1;
+ } else if ((ch & 0xe0) == 0xc0) {
+ mask = 0x1f;
+ len = 2;
+ } else if ((ch & 0xf0) == 0xe0) {
+ mask = 0x0f;
+ len = 3;
+ } else if ((ch & 0xf8) == 0xf0) {
+ mask = 0x07;
+ len = 4;
+ } else {
+ /* Invalid first byte. */
+ return (-1);
+ }
+
+ if (n < (size_t)len) {
+ /* Valid first byte but truncated. */
+ return (-2);
+ }
+
+ /*
+ * Decode the octet sequence representing the character in chunks
+ * of 6 bits, most significant first.
+ */
+ wch = (unsigned char)*s++ & mask;
+ i = len;
+ while (--i != 0) {
+ if ((*s & 0xc0) != 0x80) {
+ /* Invalid intermediate byte; consume one byte and
+ * emit '?' */
+ *pwc = '?';
+ return (1);
+ }
+ wch <<= 6;
+ wch |= *s++ & 0x3f;
+ }
+
+ /* Assign the value to the output; out-of-range values
+ * just get truncated. */
+ *pwc = (wchar_t)wch;
+#ifdef WCHAR_MAX
+ /*
+ * If platform has WCHAR_MAX, we can do something
+ * more sensible with out-of-range values.
+ */
+ if (wch >= WCHAR_MAX)
+ *pwc = '?';
+#endif
+ /* Return number of bytes input consumed: 0 for end-of-string. */
+ return (wch == L'\0' ? 0 : len);
+}
+
+
+/*
+ * base64_decode - Base64 decode
+ *
+ * This accepts most variations of base-64 encoding, including:
+ * * with or without line breaks
+ * * with or without the final group padded with '=' or '_' characters
+ * (The most economical Base-64 variant does not pad the last group and
+ * omits line breaks; RFC1341 used for MIME requires both.)
+ */
+static char *
+base64_decode(const char *s, size_t len, size_t *out_len)
+{
+ static const unsigned char digits[64] = {
+ 'A','B','C','D','E','F','G','H','I','J','K','L','M','N',
+ 'O','P','Q','R','S','T','U','V','W','X','Y','Z','a','b',
+ 'c','d','e','f','g','h','i','j','k','l','m','n','o','p',
+ 'q','r','s','t','u','v','w','x','y','z','0','1','2','3',
+ '4','5','6','7','8','9','+','/' };
+ static unsigned char decode_table[128];
+ char *out, *d;
+ const unsigned char *src = (const unsigned char *)s;
+
+ /* If the decode table is not yet initialized, prepare it. */
+ if (decode_table[digits[1]] != 1) {
+ unsigned i;
+ memset(decode_table, 0xff, sizeof(decode_table));
+ for (i = 0; i < sizeof(digits); i++)
+ decode_table[digits[i]] = i;
+ }
+
+ /* Allocate enough space to hold the entire output. */
+ /* Note that we may not use all of this... */
+ out = (char *)malloc(len - len / 4 + 1);
+ if (out == NULL) {
+ *out_len = 0;
+ return (NULL);
+ }
+ d = out;
+
+ while (len > 0) {
+ /* Collect the next group of (up to) four characters. */
+ int v = 0;
+ int group_size = 0;
+ while (group_size < 4 && len > 0) {
+ /* '=' or '_' padding indicates final group. */
+ if (*src == '=' || *src == '_') {
+ len = 0;
+ break;
+ }
+ /* Skip illegal characters (including line breaks) */
+ if (*src > 127 || *src < 32
+ || decode_table[*src] == 0xff) {
+ len--;
+ src++;
+ continue;
+ }
+ v <<= 6;
+ v |= decode_table[*src++];
+ len --;
+ group_size++;
+ }
+ /* Align a short group properly. */
+ v <<= 6 * (4 - group_size);
+ /* Unpack the group we just collected. */
+ switch (group_size) {
+ case 4: d[2] = v & 0xff;
+ /* FALLTHROUGH */
+ case 3: d[1] = (v >> 8) & 0xff;
+ /* FALLTHROUGH */
+ case 2: d[0] = (v >> 16) & 0xff;
+ break;
+ case 1: /* this is invalid! */
+ break;
+ }
+ d += group_size * 3 / 4;
+ }
+
+ *out_len = d - out;
+ return (out);
+}
+
+static char *
+url_decode(const char *in)
+{
+ char *out, *d;
+ const char *s;
+
+ out = (char *)malloc(strlen(in) + 1);
+ if (out == NULL)
+ return (NULL);
+ for (s = in, d = out; *s != '\0'; ) {
+ if (s[0] == '%' && s[1] != '\0' && s[2] != '\0') {
+ /* Try to convert % escape */
+ int digit1 = tohex(s[1]);
+ int digit2 = tohex(s[2]);
+ if (digit1 >= 0 && digit2 >= 0) {
+ /* Looks good, consume three chars */
+ s += 3;
+ /* Convert output */
+ *d++ = ((digit1 << 4) | digit2);
+ continue;
+ }
+ /* Else fall through and treat '%' as normal char */
+ }
+ *d++ = *s++;
+ }
+ *d = '\0';
+ return (out);
+}
+
+static int
+tohex(int c)
+{
+ if (c >= '0' && c <= '9')
+ return (c - '0');
+ else if (c >= 'A' && c <= 'F')
+ return (c - 'A' + 10);
+ else if (c >= 'a' && c <= 'f')
+ return (c - 'a' + 10);
+ else
+ return (-1);
+}
diff --git a/lib/libarchive/archive_read_support_format_xar.c b/contrib/libarchive/libarchive/archive_read_support_format_xar.c
index 7194fa5..7194fa5 100644
--- a/lib/libarchive/archive_read_support_format_xar.c
+++ b/contrib/libarchive/libarchive/archive_read_support_format_xar.c
diff --git a/contrib/libarchive/libarchive/archive_read_support_format_zip.c b/contrib/libarchive/libarchive/archive_read_support_format_zip.c
new file mode 100644
index 0000000..a02a2c2
--- /dev/null
+++ b/contrib/libarchive/libarchive/archive_read_support_format_zip.c
@@ -0,0 +1,950 @@
+/*-
+ * Copyright (c) 2004 Tim Kientzle
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "archive_platform.h"
+__FBSDID("$FreeBSD$");
+
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <stdio.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#include <time.h>
+#ifdef HAVE_ZLIB_H
+#include <zlib.h>
+#endif
+
+#include "archive.h"
+#include "archive_entry.h"
+#include "archive_private.h"
+#include "archive_read_private.h"
+#include "archive_endian.h"
+
+#ifndef HAVE_ZLIB_H
+#include "archive_crc32.h"
+#endif
+
+struct zip {
+ /* entry_bytes_remaining is the number of bytes we expect. */
+ int64_t entry_bytes_remaining;
+ int64_t entry_offset;
+
+ /* These count the number of bytes actually read for the entry. */
+ int64_t entry_compressed_bytes_read;
+ int64_t entry_uncompressed_bytes_read;
+
+ /* Running CRC32 of the decompressed data */
+ unsigned long entry_crc32;
+
+ unsigned version;
+ unsigned system;
+ unsigned flags;
+ unsigned compression;
+ const char * compression_name;
+ time_t mtime;
+ time_t ctime;
+ time_t atime;
+ mode_t mode;
+ uid_t uid;
+ gid_t gid;
+
+ /* Flags to mark progress of decompression. */
+ char decompress_init;
+ char end_of_entry;
+
+ unsigned long crc32;
+ ssize_t filename_length;
+ ssize_t extra_length;
+ int64_t uncompressed_size;
+ int64_t compressed_size;
+
+ unsigned char *uncompressed_buffer;
+ size_t uncompressed_buffer_size;
+#ifdef HAVE_ZLIB_H
+ z_stream stream;
+ char stream_valid;
+#endif
+
+ struct archive_string pathname;
+ struct archive_string extra;
+ char format_name[64];
+};
+
+#define ZIP_LENGTH_AT_END 8
+
+struct zip_file_header {
+ char signature[4];
+ char version[2];
+ char flags[2];
+ char compression[2];
+ char timedate[4];
+ char crc32[4];
+ char compressed_size[4];
+ char uncompressed_size[4];
+ char filename_length[2];
+ char extra_length[2];
+};
+
+static const char *compression_names[] = {
+ "uncompressed",
+ "shrinking",
+ "reduced-1",
+ "reduced-2",
+ "reduced-3",
+ "reduced-4",
+ "imploded",
+ "reserved",
+ "deflation"
+};
+
+static int archive_read_format_zip_bid(struct archive_read *);
+static int archive_read_format_zip_cleanup(struct archive_read *);
+static int archive_read_format_zip_read_data(struct archive_read *,
+ const void **, size_t *, off_t *);
+static int archive_read_format_zip_read_data_skip(struct archive_read *a);
+static int archive_read_format_zip_read_header(struct archive_read *,
+ struct archive_entry *);
+static int search_next_signature(struct archive_read *);
+static int zip_read_data_deflate(struct archive_read *a, const void **buff,
+ size_t *size, off_t *offset);
+static int zip_read_data_none(struct archive_read *a, const void **buff,
+ size_t *size, off_t *offset);
+static int zip_read_file_header(struct archive_read *a,
+ struct archive_entry *entry, struct zip *zip);
+static time_t zip_time(const char *);
+static void process_extra(const void* extra, struct zip* zip);
+
+int
+archive_read_support_format_zip(struct archive *_a)
+{
+ struct archive_read *a = (struct archive_read *)_a;
+ struct zip *zip;
+ int r;
+
+ zip = (struct zip *)malloc(sizeof(*zip));
+ if (zip == NULL) {
+ archive_set_error(&a->archive, ENOMEM, "Can't allocate zip data");
+ return (ARCHIVE_FATAL);
+ }
+ memset(zip, 0, sizeof(*zip));
+
+ r = __archive_read_register_format(a,
+ zip,
+ "zip",
+ archive_read_format_zip_bid,
+ NULL,
+ archive_read_format_zip_read_header,
+ archive_read_format_zip_read_data,
+ archive_read_format_zip_read_data_skip,
+ archive_read_format_zip_cleanup);
+
+ if (r != ARCHIVE_OK)
+ free(zip);
+ return (ARCHIVE_OK);
+}
+
+
+static int
+archive_read_format_zip_bid(struct archive_read *a)
+{
+ const char *p;
+ const void *buff;
+ ssize_t bytes_avail, offset;
+
+ if ((p = __archive_read_ahead(a, 4, NULL)) == NULL)
+ return (-1);
+
+ /*
+ * Bid of 30 here is: 16 bits for "PK",
+ * next 16-bit field has four options (-2 bits).
+ * 16 + 16-2 = 30.
+ */
+ if (p[0] == 'P' && p[1] == 'K') {
+ if ((p[2] == '\001' && p[3] == '\002')
+ || (p[2] == '\003' && p[3] == '\004')
+ || (p[2] == '\005' && p[3] == '\006')
+ || (p[2] == '\007' && p[3] == '\010')
+ || (p[2] == '0' && p[3] == '0'))
+ return (30);
+ }
+
+ /*
+ * Attempt to handle self-extracting archives
+ * by noting a PE header and searching forward
+ * up to 128k for a 'PK\003\004' marker.
+ */
+ if (p[0] == 'M' && p[1] == 'Z') {
+ /*
+ * TODO: Optimize by initializing 'offset' to an
+ * estimate of the likely start of the archive data
+ * based on values in the PE header. Note that we
+ * don't need to be exact, but we mustn't skip too
+ * far. The search below will compensate if we
+ * undershoot.
+ */
+ offset = 0;
+ while (offset < 124000) {
+ /* Get 4k of data beyond where we stopped. */
+ buff = __archive_read_ahead(a, offset + 4096,
+ &bytes_avail);
+ if (buff == NULL)
+ break;
+ p = (const char *)buff + offset;
+ while (p + 9 < (const char *)buff + bytes_avail) {
+ if (p[0] == 'P' && p[1] == 'K' /* signature */
+ && p[2] == 3 && p[3] == 4 /* File entry */
+ && p[8] == 8 /* compression == deflate */
+ && p[9] == 0 /* High byte of compression */
+ )
+ {
+ return (30);
+ }
+ ++p;
+ }
+ offset = p - (const char *)buff;
+ }
+ }
+
+ return (0);
+}
+
+/*
+ * Search forward for a "PK\003\004" file header. This handles the
+ * case of self-extracting archives, where there is an executable
+ * prepended to the ZIP archive.
+ */
+static int
+skip_sfx(struct archive_read *a)
+{
+ const void *h;
+ const char *p, *q;
+ size_t skip;
+ ssize_t bytes;
+
+ /*
+ * TODO: We should be able to skip forward by a bunch
+ * by lifting some values from the PE header. We don't
+ * need to be exact (we're still going to search forward
+ * to find the header), but it will speed things up and
+ * reduce the chance of a false positive.
+ */
+ for (;;) {
+ h = __archive_read_ahead(a, 4, &bytes);
+ if (bytes < 4)
+ return (ARCHIVE_FATAL);
+ p = h;
+ q = p + bytes;
+
+ /*
+ * Scan ahead until we find something that looks
+ * like the zip header.
+ */
+ while (p + 4 < q) {
+ switch (p[3]) {
+ case '\004':
+ /* TODO: Additional verification here. */
+ if (memcmp("PK\003\004", p, 4) == 0) {
+ skip = p - (const char *)h;
+ __archive_read_consume(a, skip);
+ return (ARCHIVE_OK);
+ }
+ p += 4;
+ break;
+ case '\003': p += 1; break;
+ case 'K': p += 2; break;
+ case 'P': p += 3; break;
+ default: p += 4; break;
+ }
+ }
+ skip = p - (const char *)h;
+ __archive_read_consume(a, skip);
+ }
+}
+
+static int
+archive_read_format_zip_read_header(struct archive_read *a,
+ struct archive_entry *entry)
+{
+ const void *h;
+ const char *signature;
+ struct zip *zip;
+ int r = ARCHIVE_OK, r1;
+
+ a->archive.archive_format = ARCHIVE_FORMAT_ZIP;
+ if (a->archive.archive_format_name == NULL)
+ a->archive.archive_format_name = "ZIP";
+
+ zip = (struct zip *)(a->format->data);
+ zip->decompress_init = 0;
+ zip->end_of_entry = 0;
+ zip->entry_uncompressed_bytes_read = 0;
+ zip->entry_compressed_bytes_read = 0;
+ zip->entry_crc32 = crc32(0, NULL, 0);
+ if ((h = __archive_read_ahead(a, 4, NULL)) == NULL)
+ return (ARCHIVE_FATAL);
+
+ signature = (const char *)h;
+ if (signature[0] == 'M' && signature[1] == 'Z') {
+ /* This is an executable? Must be self-extracting... */
+ r = skip_sfx(a);
+ if (r < ARCHIVE_WARN)
+ return (r);
+ if ((h = __archive_read_ahead(a, 4, NULL)) == NULL)
+ return (ARCHIVE_FATAL);
+ signature = (const char *)h;
+ }
+
+ /* If we don't see a PK signature here, scan forward. */
+ if (signature[0] != 'P' || signature[1] != 'K') {
+ r = search_next_signature(a);
+ if (r != ARCHIVE_OK) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+ "Bad ZIP file");
+ return (ARCHIVE_FATAL);
+ }
+ if ((h = __archive_read_ahead(a, 4, NULL)) == NULL)
+ return (ARCHIVE_FATAL);
+ signature = (const char *)h;
+ }
+
+ /*
+ * "PK00" signature is used for "split" archives that
+ * only have a single segment. This means we can just
+ * skip the PK00; the first real file header should follow.
+ */
+ if (signature[2] == '0' && signature[3] == '0') {
+ __archive_read_consume(a, 4);
+ if ((h = __archive_read_ahead(a, 4, NULL)) == NULL)
+ return (ARCHIVE_FATAL);
+ signature = (const char *)h;
+ if (signature[0] != 'P' || signature[1] != 'K') {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+ "Bad ZIP file");
+ return (ARCHIVE_FATAL);
+ }
+ }
+
+ if (signature[2] == '\001' && signature[3] == '\002') {
+ /* Beginning of central directory. */
+ return (ARCHIVE_EOF);
+ }
+
+ if (signature[2] == '\003' && signature[3] == '\004') {
+ /* Regular file entry. */
+ r1 = zip_read_file_header(a, entry, zip);
+ if (r1 != ARCHIVE_OK)
+ return (r1);
+ return (r);
+ }
+
+ if (signature[2] == '\005' && signature[3] == '\006') {
+ /* End-of-archive record. */
+ return (ARCHIVE_EOF);
+ }
+
+ if (signature[2] == '\007' && signature[3] == '\010') {
+ /*
+ * We should never encounter this record here;
+ * see ZIP_LENGTH_AT_END handling below for details.
+ */
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "Bad ZIP file: Unexpected end-of-entry record");
+ return (ARCHIVE_FATAL);
+ }
+
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+ "Damaged ZIP file or unsupported format variant (%d,%d)",
+ signature[2], signature[3]);
+ return (ARCHIVE_FATAL);
+}
+
+static int
+search_next_signature(struct archive_read *a)
+{
+ const void *h;
+ const char *p, *q;
+ size_t skip;
+ ssize_t bytes;
+ int64_t skipped = 0;
+
+ for (;;) {
+ h = __archive_read_ahead(a, 4, &bytes);
+ if (h == NULL)
+ return (ARCHIVE_FATAL);
+ p = h;
+ q = p + bytes;
+
+ while (p + 4 <= q) {
+ if (p[0] == 'P' && p[1] == 'K') {
+ if ((p[2] == '\001' && p[3] == '\002')
+ || (p[2] == '\003' && p[3] == '\004')
+ || (p[2] == '\005' && p[3] == '\006')
+ || (p[2] == '\007' && p[3] == '\010')
+ || (p[2] == '0' && p[3] == '0')) {
+ skip = p - (const char *)h;
+ __archive_read_consume(a, skip);
+ return (ARCHIVE_OK);
+ }
+ }
+ ++p;
+ }
+ skip = p - (const char *)h;
+ __archive_read_consume(a, skip);
+ skipped += skip;
+ }
+}
+
+static int
+zip_read_file_header(struct archive_read *a, struct archive_entry *entry,
+ struct zip *zip)
+{
+ const struct zip_file_header *p;
+ const void *h;
+
+ if ((p = __archive_read_ahead(a, sizeof *p, NULL)) == NULL) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+ "Truncated ZIP file header");
+ return (ARCHIVE_FATAL);
+ }
+
+ zip->version = p->version[0];
+ zip->system = p->version[1];
+ zip->flags = archive_le16dec(p->flags);
+ zip->compression = archive_le16dec(p->compression);
+ if (zip->compression <
+ sizeof(compression_names)/sizeof(compression_names[0]))
+ zip->compression_name = compression_names[zip->compression];
+ else
+ zip->compression_name = "??";
+ zip->mtime = zip_time(p->timedate);
+ zip->ctime = 0;
+ zip->atime = 0;
+ zip->mode = 0;
+ zip->uid = 0;
+ zip->gid = 0;
+ zip->crc32 = archive_le32dec(p->crc32);
+ zip->filename_length = archive_le16dec(p->filename_length);
+ zip->extra_length = archive_le16dec(p->extra_length);
+ zip->uncompressed_size = archive_le32dec(p->uncompressed_size);
+ zip->compressed_size = archive_le32dec(p->compressed_size);
+
+ __archive_read_consume(a, sizeof(struct zip_file_header));
+
+
+ /* Read the filename. */
+ if ((h = __archive_read_ahead(a, zip->filename_length, NULL)) == NULL) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+ "Truncated ZIP file header");
+ return (ARCHIVE_FATAL);
+ }
+ if (archive_string_ensure(&zip->pathname, zip->filename_length) == NULL)
+ __archive_errx(1, "Out of memory");
+ archive_strncpy(&zip->pathname, h, zip->filename_length);
+ __archive_read_consume(a, zip->filename_length);
+ archive_entry_set_pathname(entry, zip->pathname.s);
+
+ if (zip->pathname.s[archive_strlen(&zip->pathname) - 1] == '/')
+ zip->mode = AE_IFDIR | 0777;
+ else
+ zip->mode = AE_IFREG | 0777;
+
+ /* Read the extra data. */
+ if ((h = __archive_read_ahead(a, zip->extra_length, NULL)) == NULL) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+ "Truncated ZIP file header");
+ return (ARCHIVE_FATAL);
+ }
+ process_extra(h, zip);
+ __archive_read_consume(a, zip->extra_length);
+
+ /* Populate some additional entry fields: */
+ archive_entry_set_mode(entry, zip->mode);
+ archive_entry_set_uid(entry, zip->uid);
+ archive_entry_set_gid(entry, zip->gid);
+ archive_entry_set_mtime(entry, zip->mtime, 0);
+ archive_entry_set_ctime(entry, zip->ctime, 0);
+ archive_entry_set_atime(entry, zip->atime, 0);
+ /* Set the size only if it's meaningful. */
+ if (0 == (zip->flags & ZIP_LENGTH_AT_END))
+ archive_entry_set_size(entry, zip->uncompressed_size);
+
+ zip->entry_bytes_remaining = zip->compressed_size;
+ zip->entry_offset = 0;
+
+ /* If there's no body, force read_data() to return EOF immediately. */
+ if (0 == (zip->flags & ZIP_LENGTH_AT_END)
+ && zip->entry_bytes_remaining < 1)
+ zip->end_of_entry = 1;
+
+ /* Set up a more descriptive format name. */
+ sprintf(zip->format_name, "ZIP %d.%d (%s)",
+ zip->version / 10, zip->version % 10,
+ zip->compression_name);
+ a->archive.archive_format_name = zip->format_name;
+
+ return (ARCHIVE_OK);
+}
+
+/* Convert an MSDOS-style date/time into Unix-style time. */
+static time_t
+zip_time(const char *p)
+{
+ int msTime, msDate;
+ struct tm ts;
+
+ msTime = (0xff & (unsigned)p[0]) + 256 * (0xff & (unsigned)p[1]);
+ msDate = (0xff & (unsigned)p[2]) + 256 * (0xff & (unsigned)p[3]);
+
+ memset(&ts, 0, sizeof(ts));
+ ts.tm_year = ((msDate >> 9) & 0x7f) + 80; /* Years since 1900. */
+ ts.tm_mon = ((msDate >> 5) & 0x0f) - 1; /* Month number. */
+ ts.tm_mday = msDate & 0x1f; /* Day of month. */
+ ts.tm_hour = (msTime >> 11) & 0x1f;
+ ts.tm_min = (msTime >> 5) & 0x3f;
+ ts.tm_sec = (msTime << 1) & 0x3e;
+ ts.tm_isdst = -1;
+ return mktime(&ts);
+}
+
+static int
+archive_read_format_zip_read_data(struct archive_read *a,
+ const void **buff, size_t *size, off_t *offset)
+{
+ int r;
+ struct zip *zip;
+
+ zip = (struct zip *)(a->format->data);
+
+ /*
+ * If we hit end-of-entry last time, clean up and return
+ * ARCHIVE_EOF this time.
+ */
+ if (zip->end_of_entry) {
+ *offset = zip->entry_uncompressed_bytes_read;
+ *size = 0;
+ *buff = NULL;
+ return (ARCHIVE_EOF);
+ }
+
+ switch(zip->compression) {
+ case 0: /* No compression. */
+ r = zip_read_data_none(a, buff, size, offset);
+ break;
+ case 8: /* Deflate compression. */
+ r = zip_read_data_deflate(a, buff, size, offset);
+ break;
+ default: /* Unsupported compression. */
+ *buff = NULL;
+ *size = 0;
+ *offset = 0;
+ /* Return a warning. */
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+ "Unsupported ZIP compression method (%s)",
+ zip->compression_name);
+ if (zip->flags & ZIP_LENGTH_AT_END) {
+ /*
+ * ZIP_LENGTH_AT_END requires us to
+ * decompress the entry in order to
+ * skip it, but we don't know this
+ * compression method, so we give up.
+ */
+ r = ARCHIVE_FATAL;
+ } else {
+ /* We can't decompress this entry, but we will
+ * be able to skip() it and try the next entry. */
+ r = ARCHIVE_WARN;
+ }
+ break;
+ }
+ if (r != ARCHIVE_OK)
+ return (r);
+ /* Update checksum */
+ if (*size)
+ zip->entry_crc32 = crc32(zip->entry_crc32, *buff, *size);
+ /* If we hit the end, swallow any end-of-data marker. */
+ if (zip->end_of_entry) {
+ if (zip->flags & ZIP_LENGTH_AT_END) {
+ const char *p;
+
+ if ((p = __archive_read_ahead(a, 16, NULL)) == NULL) {
+ archive_set_error(&a->archive,
+ ARCHIVE_ERRNO_FILE_FORMAT,
+ "Truncated ZIP end-of-file record");
+ return (ARCHIVE_FATAL);
+ }
+ zip->crc32 = archive_le32dec(p + 4);
+ zip->compressed_size = archive_le32dec(p + 8);
+ zip->uncompressed_size = archive_le32dec(p + 12);
+ __archive_read_consume(a, 16);
+ }
+ /* Check file size, CRC against these values. */
+ if (zip->compressed_size != zip->entry_compressed_bytes_read) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "ZIP compressed data is wrong size");
+ return (ARCHIVE_WARN);
+ }
+ /* Size field only stores the lower 32 bits of the actual size. */
+ if ((zip->uncompressed_size & UINT32_MAX)
+ != (zip->entry_uncompressed_bytes_read & UINT32_MAX)) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "ZIP uncompressed data is wrong size");
+ return (ARCHIVE_WARN);
+ }
+ /* Check computed CRC against header */
+ if (zip->crc32 != zip->entry_crc32) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "ZIP bad CRC: 0x%lx should be 0x%lx",
+ zip->entry_crc32, zip->crc32);
+ return (ARCHIVE_WARN);
+ }
+ }
+
+ /* Return EOF immediately if this is a non-regular file. */
+ if (AE_IFREG != (zip->mode & AE_IFMT))
+ return (ARCHIVE_EOF);
+ return (ARCHIVE_OK);
+}
+
+/*
+ * Read "uncompressed" data. According to the current specification,
+ * if ZIP_LENGTH_AT_END is specified, then the size fields in the
+ * initial file header are supposed to be set to zero. This would, of
+ * course, make it impossible for us to read the archive, since we
+ * couldn't determine the end of the file data. Info-ZIP seems to
+ * include the real size fields both before and after the data in this
+ * case (the CRC only appears afterwards), so this works as you would
+ * expect.
+ *
+ * Returns ARCHIVE_OK if successful, ARCHIVE_FATAL otherwise, sets
+ * zip->end_of_entry if it consumes all of the data.
+ */
+static int
+zip_read_data_none(struct archive_read *a, const void **buff,
+ size_t *size, off_t *offset)
+{
+ struct zip *zip;
+ ssize_t bytes_avail;
+
+ zip = (struct zip *)(a->format->data);
+
+ if (zip->entry_bytes_remaining == 0) {
+ *buff = NULL;
+ *size = 0;
+ *offset = zip->entry_offset;
+ zip->end_of_entry = 1;
+ return (ARCHIVE_OK);
+ }
+ /*
+ * Note: '1' here is a performance optimization.
+ * Recall that the decompression layer returns a count of
+ * available bytes; asking for more than that forces the
+ * decompressor to combine reads by copying data.
+ */
+ *buff = __archive_read_ahead(a, 1, &bytes_avail);
+ if (bytes_avail <= 0) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+ "Truncated ZIP file data");
+ return (ARCHIVE_FATAL);
+ }
+ if (bytes_avail > zip->entry_bytes_remaining)
+ bytes_avail = zip->entry_bytes_remaining;
+ __archive_read_consume(a, bytes_avail);
+ *size = bytes_avail;
+ *offset = zip->entry_offset;
+ zip->entry_offset += *size;
+ zip->entry_bytes_remaining -= *size;
+ zip->entry_uncompressed_bytes_read += *size;
+ zip->entry_compressed_bytes_read += *size;
+ return (ARCHIVE_OK);
+}
+
+#ifdef HAVE_ZLIB_H
+static int
+zip_read_data_deflate(struct archive_read *a, const void **buff,
+ size_t *size, off_t *offset)
+{
+ struct zip *zip;
+ ssize_t bytes_avail;
+ const void *compressed_buff;
+ int r;
+
+ zip = (struct zip *)(a->format->data);
+
+ /* If the buffer hasn't been allocated, allocate it now. */
+ if (zip->uncompressed_buffer == NULL) {
+ zip->uncompressed_buffer_size = 32 * 1024;
+ zip->uncompressed_buffer
+ = (unsigned char *)malloc(zip->uncompressed_buffer_size);
+ if (zip->uncompressed_buffer == NULL) {
+ archive_set_error(&a->archive, ENOMEM,
+ "No memory for ZIP decompression");
+ return (ARCHIVE_FATAL);
+ }
+ }
+
+ /* If we haven't yet read any data, initialize the decompressor. */
+ if (!zip->decompress_init) {
+ if (zip->stream_valid)
+ r = inflateReset(&zip->stream);
+ else
+ r = inflateInit2(&zip->stream,
+ -15 /* Don't check for zlib header */);
+ if (r != Z_OK) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "Can't initialize ZIP decompression.");
+ return (ARCHIVE_FATAL);
+ }
+ /* Stream structure has been set up. */
+ zip->stream_valid = 1;
+ /* We've initialized decompression for this stream. */
+ zip->decompress_init = 1;
+ }
+
+ /*
+ * Note: '1' here is a performance optimization.
+ * Recall that the decompression layer returns a count of
+ * available bytes; asking for more than that forces the
+ * decompressor to combine reads by copying data.
+ */
+ compressed_buff = __archive_read_ahead(a, 1, &bytes_avail);
+ if (bytes_avail <= 0) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+ "Truncated ZIP file body");
+ return (ARCHIVE_FATAL);
+ }
+
+ /*
+ * A bug in zlib.h: stream.next_in should be marked 'const'
+ * but isn't (the library never alters data through the
+ * next_in pointer, only reads it). The result: this ugly
+ * cast to remove 'const'.
+ */
+ zip->stream.next_in = (Bytef *)(uintptr_t)(const void *)compressed_buff;
+ zip->stream.avail_in = bytes_avail;
+ zip->stream.total_in = 0;
+ zip->stream.next_out = zip->uncompressed_buffer;
+ zip->stream.avail_out = zip->uncompressed_buffer_size;
+ zip->stream.total_out = 0;
+
+ r = inflate(&zip->stream, 0);
+ switch (r) {
+ case Z_OK:
+ break;
+ case Z_STREAM_END:
+ zip->end_of_entry = 1;
+ break;
+ case Z_MEM_ERROR:
+ archive_set_error(&a->archive, ENOMEM,
+ "Out of memory for ZIP decompression");
+ return (ARCHIVE_FATAL);
+ default:
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "ZIP decompression failed (%d)", r);
+ return (ARCHIVE_FATAL);
+ }
+
+ /* Consume as much as the compressor actually used. */
+ bytes_avail = zip->stream.total_in;
+ __archive_read_consume(a, bytes_avail);
+ zip->entry_bytes_remaining -= bytes_avail;
+ zip->entry_compressed_bytes_read += bytes_avail;
+
+ *offset = zip->entry_offset;
+ *size = zip->stream.total_out;
+ zip->entry_uncompressed_bytes_read += *size;
+ *buff = zip->uncompressed_buffer;
+ zip->entry_offset += *size;
+ return (ARCHIVE_OK);
+}
+#else
+static int
+zip_read_data_deflate(struct archive_read *a, const void **buff,
+ size_t *size, off_t *offset)
+{
+ *buff = NULL;
+ *size = 0;
+ *offset = 0;
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "libarchive compiled without deflate support (no libz)");
+ return (ARCHIVE_FATAL);
+}
+#endif
+
+static int
+archive_read_format_zip_read_data_skip(struct archive_read *a)
+{
+ struct zip *zip;
+ const void *buff = NULL;
+ off_t bytes_skipped;
+
+ zip = (struct zip *)(a->format->data);
+
+ /* If we've already read to end of data, we're done. */
+ if (zip->end_of_entry)
+ return (ARCHIVE_OK);
+
+ /*
+ * If the length is at the end, we have no choice but
+ * to decompress all the data to find the end marker.
+ */
+ if (zip->flags & ZIP_LENGTH_AT_END) {
+ size_t size;
+ off_t offset;
+ int r;
+ do {
+ r = archive_read_format_zip_read_data(a, &buff,
+ &size, &offset);
+ } while (r == ARCHIVE_OK);
+ return (r);
+ }
+
+ /*
+ * If the length is at the beginning, we can skip the
+ * compressed data much more quickly.
+ */
+ bytes_skipped = __archive_read_skip(a, zip->entry_bytes_remaining);
+ if (bytes_skipped < 0)
+ return (ARCHIVE_FATAL);
+
+ /* This entry is finished and done. */
+ zip->end_of_entry = 1;
+ return (ARCHIVE_OK);
+}
+
+static int
+archive_read_format_zip_cleanup(struct archive_read *a)
+{
+ struct zip *zip;
+
+ zip = (struct zip *)(a->format->data);
+#ifdef HAVE_ZLIB_H
+ if (zip->stream_valid)
+ inflateEnd(&zip->stream);
+#endif
+ free(zip->uncompressed_buffer);
+ archive_string_free(&(zip->pathname));
+ archive_string_free(&(zip->extra));
+ free(zip);
+ (a->format->data) = NULL;
+ return (ARCHIVE_OK);
+}
+
+/*
+ * The extra data is stored as a list of
+ * id1+size1+data1 + id2+size2+data2 ...
+ * triplets. id and size are 2 bytes each.
+ */
+static void
+process_extra(const void* extra, struct zip* zip)
+{
+ int offset = 0;
+ const char *p = (const char *)extra;
+ while (offset < zip->extra_length - 4)
+ {
+ unsigned short headerid = archive_le16dec(p + offset);
+ unsigned short datasize = archive_le16dec(p + offset + 2);
+ offset += 4;
+ if (offset + datasize > zip->extra_length)
+ break;
+#ifdef DEBUG
+ fprintf(stderr, "Header id 0x%04x, length %d\n",
+ headerid, datasize);
+#endif
+ switch (headerid) {
+ case 0x0001:
+ /* Zip64 extended information extra field. */
+ if (datasize >= 8)
+ zip->uncompressed_size = archive_le64dec(p + offset);
+ if (datasize >= 16)
+ zip->compressed_size = archive_le64dec(p + offset + 8);
+ break;
+ case 0x5455:
+ {
+ /* Extended time field "UT". */
+ int flags = p[offset];
+ offset++;
+ datasize--;
+ /* Flag bits indicate which dates are present. */
+ if (flags & 0x01)
+ {
+#ifdef DEBUG
+ fprintf(stderr, "mtime: %lld -> %d\n",
+ (long long)zip->mtime,
+ archive_le32dec(p + offset));
+#endif
+ if (datasize < 4)
+ break;
+ zip->mtime = archive_le32dec(p + offset);
+ offset += 4;
+ datasize -= 4;
+ }
+ if (flags & 0x02)
+ {
+ if (datasize < 4)
+ break;
+ zip->atime = archive_le32dec(p + offset);
+ offset += 4;
+ datasize -= 4;
+ }
+ if (flags & 0x04)
+ {
+ if (datasize < 4)
+ break;
+ zip->ctime = archive_le32dec(p + offset);
+ offset += 4;
+ datasize -= 4;
+ }
+ break;
+ }
+ case 0x7855:
+ /* Info-ZIP Unix Extra Field (type 2) "Ux". */
+#ifdef DEBUG
+ fprintf(stderr, "uid %d gid %d\n",
+ archive_le16dec(p + offset),
+ archive_le16dec(p + offset + 2));
+#endif
+ if (datasize >= 2)
+ zip->uid = archive_le16dec(p + offset);
+ if (datasize >= 4)
+ zip->gid = archive_le16dec(p + offset + 2);
+ break;
+ case 0x7875:
+ /* Info-Zip Unix Extra Field (type 3) "ux". */
+ break;
+ default:
+ break;
+ }
+ offset += datasize;
+ }
+#ifdef DEBUG
+ if (offset != zip->extra_length)
+ {
+ fprintf(stderr,
+ "Extra data field contents do not match reported size!");
+ }
+#endif
+}
diff --git a/contrib/libarchive/libarchive/archive_string.c b/contrib/libarchive/libarchive/archive_string.c
new file mode 100644
index 0000000..c67182d
--- /dev/null
+++ b/contrib/libarchive/libarchive/archive_string.c
@@ -0,0 +1,453 @@
+/*-
+ * Copyright (c) 2003-2007 Tim Kientzle
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "archive_platform.h"
+__FBSDID("$FreeBSD$");
+
+/*
+ * Basic resizable string support, to simplify manipulating arbitrary-sized
+ * strings while minimizing heap activity.
+ */
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#ifdef HAVE_WCHAR_H
+#include <wchar.h>
+#endif
+#if defined(_WIN32) && !defined(__CYGWIN__)
+#include <windows.h>
+#endif
+
+#include "archive_private.h"
+#include "archive_string.h"
+
+struct archive_string *
+__archive_string_append(struct archive_string *as, const char *p, size_t s)
+{
+ if (__archive_string_ensure(as, as->length + s + 1) == NULL)
+ __archive_errx(1, "Out of memory");
+ memcpy(as->s + as->length, p, s);
+ as->s[as->length + s] = 0;
+ as->length += s;
+ return (as);
+}
+
+void
+__archive_string_copy(struct archive_string *dest, struct archive_string *src)
+{
+ if (src->length == 0)
+ dest->length = 0;
+ else {
+ if (__archive_string_ensure(dest, src->length + 1) == NULL)
+ __archive_errx(1, "Out of memory");
+ memcpy(dest->s, src->s, src->length);
+ dest->length = src->length;
+ dest->s[dest->length] = 0;
+ }
+}
+
+void
+__archive_string_concat(struct archive_string *dest, struct archive_string *src)
+{
+ if (src->length > 0) {
+ if (__archive_string_ensure(dest, dest->length + src->length + 1) == NULL)
+ __archive_errx(1, "Out of memory");
+ memcpy(dest->s + dest->length, src->s, src->length);
+ dest->length += src->length;
+ dest->s[dest->length] = 0;
+ }
+}
+
+void
+__archive_string_free(struct archive_string *as)
+{
+ as->length = 0;
+ as->buffer_length = 0;
+ if (as->s != NULL) {
+ free(as->s);
+ as->s = NULL;
+ }
+}
+
+/* Returns NULL on any allocation failure. */
+struct archive_string *
+__archive_string_ensure(struct archive_string *as, size_t s)
+{
+ /* If buffer is already big enough, don't reallocate. */
+ if (as->s && (s <= as->buffer_length))
+ return (as);
+
+ /*
+ * Growing the buffer at least exponentially ensures that
+ * append operations are always linear in the number of
+ * characters appended. Using a smaller growth rate for
+ * larger buffers reduces memory waste somewhat at the cost of
+ * a larger constant factor.
+ */
+ if (as->buffer_length < 32)
+ /* Start with a minimum 32-character buffer. */
+ as->buffer_length = 32;
+ else if (as->buffer_length < 8192)
+ /* Buffers under 8k are doubled for speed. */
+ as->buffer_length += as->buffer_length;
+ else {
+ /* Buffers 8k and over grow by at least 25% each time. */
+ size_t old_length = as->buffer_length;
+ as->buffer_length += as->buffer_length / 4;
+ /* Be safe: If size wraps, release buffer and return NULL. */
+ if (as->buffer_length < old_length) {
+ free(as->s);
+ as->s = NULL;
+ return (NULL);
+ }
+ }
+ /*
+ * The computation above is a lower limit to how much we'll
+ * grow the buffer. In any case, we have to grow it enough to
+ * hold the request.
+ */
+ if (as->buffer_length < s)
+ as->buffer_length = s;
+ /* Now we can reallocate the buffer. */
+ as->s = (char *)realloc(as->s, as->buffer_length);
+ if (as->s == NULL)
+ return (NULL);
+ return (as);
+}
+
+struct archive_string *
+__archive_strncat(struct archive_string *as, const void *_p, size_t n)
+{
+ size_t s;
+ const char *p, *pp;
+
+ p = (const char *)_p;
+
+ /* Like strlen(p), except won't examine positions beyond p[n]. */
+ s = 0;
+ pp = p;
+ while (s < n && *pp) {
+ pp++;
+ s++;
+ }
+ return (__archive_string_append(as, p, s));
+}
+
+struct archive_string *
+__archive_strappend_char(struct archive_string *as, char c)
+{
+ return (__archive_string_append(as, &c, 1));
+}
+
+/*
+ * Translates a wide character string into UTF-8 and appends
+ * to the archive_string. Note: returns NULL if conversion fails,
+ * but still leaves a best-effort conversion in the argument as.
+ */
+struct archive_string *
+__archive_strappend_w_utf8(struct archive_string *as, const wchar_t *w)
+{
+ char *p;
+ unsigned wc;
+ char buff[256];
+ struct archive_string *return_val = as;
+
+ /*
+ * Convert one wide char at a time into 'buff', whenever that
+ * fills, append it to the string.
+ */
+ p = buff;
+ while (*w != L'\0') {
+ /* Flush the buffer when we have <=16 bytes free. */
+ /* (No encoding has a single character >16 bytes.) */
+ if ((size_t)(p - buff) >= (size_t)(sizeof(buff) - 16)) {
+ *p = '\0';
+ archive_strcat(as, buff);
+ p = buff;
+ }
+ wc = *w++;
+ /* If this is a surrogate pair, assemble the full code point.*/
+ /* Note: wc must not be wchar_t here, because the full code
+ * point can be more than 16 bits! */
+ if (wc >= 0xD800 && wc <= 0xDBff
+ && *w >= 0xDC00 && *w <= 0xDFFF) {
+ wc -= 0xD800;
+ wc *= 0x400;
+ wc += (*w - 0xDC00);
+ wc += 0x10000;
+ ++w;
+ }
+ /* Translate code point to UTF8 */
+ if (wc <= 0x7f) {
+ *p++ = (char)wc;
+ } else if (wc <= 0x7ff) {
+ *p++ = 0xc0 | ((wc >> 6) & 0x1f);
+ *p++ = 0x80 | (wc & 0x3f);
+ } else if (wc <= 0xffff) {
+ *p++ = 0xe0 | ((wc >> 12) & 0x0f);
+ *p++ = 0x80 | ((wc >> 6) & 0x3f);
+ *p++ = 0x80 | (wc & 0x3f);
+ } else if (wc <= 0x1fffff) {
+ *p++ = 0xf0 | ((wc >> 18) & 0x07);
+ *p++ = 0x80 | ((wc >> 12) & 0x3f);
+ *p++ = 0x80 | ((wc >> 6) & 0x3f);
+ *p++ = 0x80 | (wc & 0x3f);
+ } else {
+ /* Unicode has no codes larger than 0x1fffff. */
+ /* TODO: use \uXXXX escape here instead of ? */
+ *p++ = '?';
+ return_val = NULL;
+ }
+ }
+ *p = '\0';
+ archive_strcat(as, buff);
+ return (return_val);
+}
+
+static int
+utf8_to_unicode(int *pwc, const char *s, size_t n)
+{
+ int ch;
+
+ /*
+ * Decode 1-4 bytes depending on the value of the first byte.
+ */
+ ch = (unsigned char)*s;
+ if (ch == 0) {
+ return (0); /* Standard: return 0 for end-of-string. */
+ }
+ if ((ch & 0x80) == 0) {
+ *pwc = ch & 0x7f;
+ return (1);
+ }
+ if ((ch & 0xe0) == 0xc0) {
+ if (n < 2)
+ return (-1);
+ if ((s[1] & 0xc0) != 0x80) return (-1);
+ *pwc = ((ch & 0x1f) << 6) | (s[1] & 0x3f);
+ return (2);
+ }
+ if ((ch & 0xf0) == 0xe0) {
+ if (n < 3)
+ return (-1);
+ if ((s[1] & 0xc0) != 0x80) return (-1);
+ if ((s[2] & 0xc0) != 0x80) return (-1);
+ *pwc = ((ch & 0x0f) << 12)
+ | ((s[1] & 0x3f) << 6)
+ | (s[2] & 0x3f);
+ return (3);
+ }
+ if ((ch & 0xf8) == 0xf0) {
+ if (n < 4)
+ return (-1);
+ if ((s[1] & 0xc0) != 0x80) return (-1);
+ if ((s[2] & 0xc0) != 0x80) return (-1);
+ if ((s[3] & 0xc0) != 0x80) return (-1);
+ *pwc = ((ch & 0x07) << 18)
+ | ((s[1] & 0x3f) << 12)
+ | ((s[2] & 0x3f) << 6)
+ | (s[3] & 0x3f);
+ return (4);
+ }
+ /* Invalid first byte. */
+ return (-1);
+}
+
+/*
+ * Return a wide-character Unicode string by converting this archive_string
+ * from UTF-8. We assume that systems with 16-bit wchar_t always use
+ * UTF16 and systems with 32-bit wchar_t can accept UCS4.
+ */
+wchar_t *
+__archive_string_utf8_w(struct archive_string *as)
+{
+ wchar_t *ws, *dest;
+ int wc, wc2;/* Must be large enough for a 21-bit Unicode code point. */
+ const char *src;
+ int n;
+
+ ws = (wchar_t *)malloc((as->length + 1) * sizeof(wchar_t));
+ if (ws == NULL)
+ __archive_errx(1, "Out of memory");
+ dest = ws;
+ src = as->s;
+ while (*src != '\0') {
+ n = utf8_to_unicode(&wc, src, 8);
+ if (n == 0)
+ break;
+ if (n < 0) {
+ free(ws);
+ return (NULL);
+ }
+ src += n;
+ if (wc >= 0xDC00 && wc <= 0xDBFF) {
+ /* This is a leading surrogate; some idiot
+ * has translated UTF16 to UTF8 without combining
+ * surrogates; rebuild the full code point before
+ * continuing. */
+ n = utf8_to_unicode(&wc2, src, 8);
+ if (n < 0) {
+ free(ws);
+ return (NULL);
+ }
+ if (n == 0) /* Ignore the leading surrogate */
+ break;
+ if (wc2 < 0xDC00 || wc2 > 0xDFFF) {
+ /* If the second character isn't a
+ * trailing surrogate, then someone
+ * has really screwed up and this is
+ * invalid. */
+ free(ws);
+ return (NULL);
+ } else {
+ src += n;
+ wc -= 0xD800;
+ wc *= 0x400;
+ wc += wc2 - 0xDC00;
+ wc += 0x10000;
+ }
+ }
+ if ((sizeof(wchar_t) < 4) && (wc > 0xffff)) {
+ /* We have a code point that won't fit into a
+ * wchar_t; convert it to a surrogate pair. */
+ wc -= 0x10000;
+ *dest++ = ((wc >> 10) & 0x3ff) + 0xD800;
+ *dest++ = (wc & 0x3ff) + 0xDC00;
+ } else
+ *dest++ = wc;
+ }
+ *dest = L'\0';
+ return (ws);
+}
+
+#if defined(_WIN32) && !defined(__CYGWIN__)
+
+/*
+ * Translates a wide character string into current locale character set
+ * and appends to the archive_string. Note: returns NULL if conversion
+ * fails.
+ *
+ * Win32 builds use WideCharToMultiByte from the Windows API.
+ * (Maybe Cygwin should too? WideCharToMultiByte will know a
+ * lot more about local character encodings than the wcrtomb()
+ * wrapper is going to know.)
+ */
+struct archive_string *
+__archive_strappend_w_mbs(struct archive_string *as, const wchar_t *w)
+{
+ char *p;
+ int l, wl;
+ BOOL useDefaultChar = FALSE;
+
+ wl = (int)wcslen(w);
+ l = wl * 4 + 4;
+ p = malloc(l);
+ if (p == NULL)
+ __archive_errx(1, "Out of memory");
+ /* To check a useDefaultChar is to simulate error handling of
+ * the my_wcstombs() which is running on non Windows system with
+ * wctomb().
+ * And to set NULL for last argument is necessary when a codepage
+ * is not CP_ACP(current locale).
+ */
+ l = WideCharToMultiByte(CP_ACP, 0, w, wl, p, l, NULL, &useDefaultChar);
+ if (l == 0) {
+ free(p);
+ return (NULL);
+ }
+ __archive_string_append(as, p, l);
+ free(p);
+ return (as);
+}
+
+#else
+
+/*
+ * Translates a wide character string into current locale character set
+ * and appends to the archive_string. Note: returns NULL if conversion
+ * fails.
+ *
+ * Non-Windows uses ISO C wcrtomb() or wctomb() to perform the conversion
+ * one character at a time. If a non-Windows platform doesn't have
+ * either of these, fall back to the built-in UTF8 conversion.
+ */
+struct archive_string *
+__archive_strappend_w_mbs(struct archive_string *as, const wchar_t *w)
+{
+#if !defined(HAVE_WCTOMB) && !defined(HAVE_WCRTOMB)
+ /* If there's no built-in locale support, fall back to UTF8 always. */
+ return __archive_strappend_w_utf8(as, w);
+#else
+ /* We cannot use the standard wcstombs() here because it
+ * cannot tell us how big the output buffer should be. So
+ * I've built a loop around wcrtomb() or wctomb() that
+ * converts a character at a time and resizes the string as
+ * needed. We prefer wcrtomb() when it's available because
+ * it's thread-safe. */
+ int n;
+ char *p;
+ char buff[256];
+#if HAVE_WCRTOMB
+ mbstate_t shift_state;
+
+ memset(&shift_state, 0, sizeof(shift_state));
+#else
+ /* Clear the shift state before starting. */
+ wctomb(NULL, L'\0');
+#endif
+
+ /*
+ * Convert one wide char at a time into 'buff', whenever that
+ * fills, append it to the string.
+ */
+ p = buff;
+ while (*w != L'\0') {
+ /* Flush the buffer when we have <=16 bytes free. */
+ /* (No encoding has a single character >16 bytes.) */
+ if ((size_t)(p - buff) >= (size_t)(sizeof(buff) - MB_CUR_MAX)) {
+ *p = '\0';
+ archive_strcat(as, buff);
+ p = buff;
+ }
+#if HAVE_WCRTOMB
+ n = wcrtomb(p, *w++, &shift_state);
+#else
+ n = wctomb(p, *w++);
+#endif
+ if (n == -1)
+ return (NULL);
+ p += n;
+ }
+ *p = '\0';
+ archive_strcat(as, buff);
+ return (as);
+#endif
+}
+
+#endif /* _WIN32 && ! __CYGWIN__ */
diff --git a/contrib/libarchive/libarchive/archive_string.h b/contrib/libarchive/libarchive/archive_string.h
new file mode 100644
index 0000000..f0655d1
--- /dev/null
+++ b/contrib/libarchive/libarchive/archive_string.h
@@ -0,0 +1,151 @@
+/*-
+ * Copyright (c) 2003-2007 Tim Kientzle
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ *
+ */
+
+#ifndef __LIBARCHIVE_BUILD
+#error This header is only to be used internally to libarchive.
+#endif
+
+#ifndef ARCHIVE_STRING_H_INCLUDED
+#define ARCHIVE_STRING_H_INCLUDED
+
+#include <stdarg.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h> /* required for wchar_t on some systems */
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#ifdef HAVE_WCHAR_H
+#include <wchar.h>
+#endif
+
+#include "archive.h"
+
+/*
+ * Basic resizable/reusable string support a la Java's "StringBuffer."
+ *
+ * Unlike sbuf(9), the buffers here are fully reusable and track the
+ * length throughout.
+ *
+ * Note that all visible symbols here begin with "__archive" as they
+ * are internal symbols not intended for anyone outside of this library
+ * to see or use.
+ */
+
+struct archive_string {
+ char *s; /* Pointer to the storage */
+ size_t length; /* Length of 's' */
+ size_t buffer_length; /* Length of malloc-ed storage */
+};
+
+/* Initialize an archive_string object on the stack or elsewhere. */
+#define archive_string_init(a) \
+ do { (a)->s = NULL; (a)->length = 0; (a)->buffer_length = 0; } while(0)
+
+/* Append a C char to an archive_string, resizing as necessary. */
+struct archive_string *
+__archive_strappend_char(struct archive_string *, char);
+#define archive_strappend_char __archive_strappend_char
+
+/* Convert a wide-char string to UTF-8 and append the result. */
+struct archive_string *
+__archive_strappend_w_utf8(struct archive_string *, const wchar_t *);
+#define archive_strappend_w_utf8 __archive_strappend_w_utf8
+
+/* Convert a wide-char string to current locale and append the result. */
+/* Returns NULL if conversion fails. */
+struct archive_string *
+__archive_strappend_w_mbs(struct archive_string *, const wchar_t *);
+#define archive_strappend_w_mbs __archive_strappend_w_mbs
+
+/* Basic append operation. */
+struct archive_string *
+__archive_string_append(struct archive_string *as, const char *p, size_t s);
+
+/* Copy one archive_string to another */
+void
+__archive_string_copy(struct archive_string *dest, struct archive_string *src);
+#define archive_string_copy(dest, src) \
+ __archive_string_copy(dest, src)
+
+/* Concatenate one archive_string to another */
+void
+__archive_string_concat(struct archive_string *dest, struct archive_string *src);
+#define archive_string_concat(dest, src) \
+ __archive_string_concat(dest, src)
+
+/* Ensure that the underlying buffer is at least as large as the request. */
+struct archive_string *
+__archive_string_ensure(struct archive_string *, size_t);
+#define archive_string_ensure __archive_string_ensure
+
+/* Append C string, which may lack trailing \0. */
+/* The source is declared void * here because this gets used with
+ * "signed char *", "unsigned char *" and "char *" arguments.
+ * Declaring it "char *" as with some of the other functions just
+ * leads to a lot of extra casts. */
+struct archive_string *
+__archive_strncat(struct archive_string *, const void *, size_t);
+#define archive_strncat __archive_strncat
+
+/* Append a C string to an archive_string, resizing as necessary. */
+#define archive_strcat(as,p) __archive_string_append((as),(p),strlen(p))
+
+/* Copy a C string to an archive_string, resizing as necessary. */
+#define archive_strcpy(as,p) \
+ ((as)->length = 0, __archive_string_append((as), (p), p == NULL ? 0 : strlen(p)))
+
+/* Copy a C string to an archive_string with limit, resizing as necessary. */
+#define archive_strncpy(as,p,l) \
+ ((as)->length=0, archive_strncat((as), (p), (l)))
+
+/* Return length of string. */
+#define archive_strlen(a) ((a)->length)
+
+/* Set string length to zero. */
+#define archive_string_empty(a) ((a)->length = 0)
+
+/* Release any allocated storage resources. */
+void __archive_string_free(struct archive_string *);
+#define archive_string_free __archive_string_free
+
+/* Like 'vsprintf', but resizes the underlying string as necessary. */
+void __archive_string_vsprintf(struct archive_string *, const char *,
+ va_list) __LA_PRINTF(2, 0);
+#define archive_string_vsprintf __archive_string_vsprintf
+
+void __archive_string_sprintf(struct archive_string *, const char *, ...)
+ __LA_PRINTF(2, 3);
+#define archive_string_sprintf __archive_string_sprintf
+
+/* Allocates a fresh buffer and converts as (assumed to be UTF-8) into it.
+ * Returns NULL if conversion failed in any way. */
+wchar_t *__archive_string_utf8_w(struct archive_string *as);
+
+
+#endif
diff --git a/lib/libarchive/archive_string_sprintf.c b/contrib/libarchive/libarchive/archive_string_sprintf.c
index 9199106..9199106 100644
--- a/lib/libarchive/archive_string_sprintf.c
+++ b/contrib/libarchive/libarchive/archive_string_sprintf.c
diff --git a/lib/libarchive/archive_util.3 b/contrib/libarchive/libarchive/archive_util.3
index 69e3d7a..69e3d7a 100644
--- a/lib/libarchive/archive_util.3
+++ b/contrib/libarchive/libarchive/archive_util.3
diff --git a/contrib/libarchive/libarchive/archive_util.c b/contrib/libarchive/libarchive/archive_util.c
new file mode 100644
index 0000000..8f2b4c6
--- /dev/null
+++ b/contrib/libarchive/libarchive/archive_util.c
@@ -0,0 +1,392 @@
+/*-
+ * Copyright (c) 2009 Michihiro NAKAJIMA
+ * Copyright (c) 2003-2007 Tim Kientzle
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "archive_platform.h"
+__FBSDID("$FreeBSD$");
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+#include "archive.h"
+#include "archive_private.h"
+#include "archive_string.h"
+
+#if ARCHIVE_VERSION_NUMBER < 3000000
+/* These disappear in libarchive 3.0 */
+/* Deprecated. */
+int
+archive_api_feature(void)
+{
+ return (ARCHIVE_API_FEATURE);
+}
+
+/* Deprecated. */
+int
+archive_api_version(void)
+{
+ return (ARCHIVE_API_VERSION);
+}
+
+/* Deprecated synonym for archive_version_number() */
+int
+archive_version_stamp(void)
+{
+ return (archive_version_number());
+}
+
+/* Deprecated synonym for archive_version_string() */
+const char *
+archive_version(void)
+{
+ return (archive_version_string());
+}
+#endif
+
+int
+archive_version_number(void)
+{
+ return (ARCHIVE_VERSION_NUMBER);
+}
+
+const char *
+archive_version_string(void)
+{
+ return (ARCHIVE_VERSION_STRING);
+}
+
+int
+archive_errno(struct archive *a)
+{
+ return (a->archive_error_number);
+}
+
+const char *
+archive_error_string(struct archive *a)
+{
+
+ if (a->error != NULL && *a->error != '\0')
+ return (a->error);
+ else
+ return ("(Empty error message)");
+}
+
+int
+archive_file_count(struct archive *a)
+{
+ return (a->file_count);
+}
+
+int
+archive_format(struct archive *a)
+{
+ return (a->archive_format);
+}
+
+const char *
+archive_format_name(struct archive *a)
+{
+ return (a->archive_format_name);
+}
+
+
+int
+archive_compression(struct archive *a)
+{
+ return (a->compression_code);
+}
+
+const char *
+archive_compression_name(struct archive *a)
+{
+ return (a->compression_name);
+}
+
+
+/*
+ * Return a count of the number of compressed bytes processed.
+ */
+int64_t
+archive_position_compressed(struct archive *a)
+{
+ return (a->raw_position);
+}
+
+/*
+ * Return a count of the number of uncompressed bytes processed.
+ */
+int64_t
+archive_position_uncompressed(struct archive *a)
+{
+ return (a->file_position);
+}
+
+void
+archive_clear_error(struct archive *a)
+{
+ archive_string_empty(&a->error_string);
+ a->error = NULL;
+ a->archive_error_number = 0;
+}
+
+void
+archive_set_error(struct archive *a, int error_number, const char *fmt, ...)
+{
+ va_list ap;
+
+ a->archive_error_number = error_number;
+ if (fmt == NULL) {
+ a->error = NULL;
+ return;
+ }
+
+ va_start(ap, fmt);
+ archive_string_vsprintf(&(a->error_string), fmt, ap);
+ va_end(ap);
+ a->error = a->error_string.s;
+}
+
+void
+archive_copy_error(struct archive *dest, struct archive *src)
+{
+ dest->archive_error_number = src->archive_error_number;
+
+ archive_string_copy(&dest->error_string, &src->error_string);
+ dest->error = dest->error_string.s;
+}
+
+void
+__archive_errx(int retvalue, const char *msg)
+{
+ static const char *msg1 = "Fatal Internal Error in libarchive: ";
+ size_t s;
+
+ s = write(2, msg1, strlen(msg1));
+ (void)s; /* UNUSED */
+ s = write(2, msg, strlen(msg));
+ (void)s; /* UNUSED */
+ s = write(2, "\n", 1);
+ (void)s; /* UNUSED */
+ exit(retvalue);
+}
+
+/*
+ * Parse option strings
+ * Detail of option format.
+ * - The option can accept:
+ * "opt-name", "!opt-name", "opt-name=value".
+ *
+ * - The option entries are separated by comma.
+ * e.g "compression=9,opt=XXX,opt-b=ZZZ"
+ *
+ * - The name of option string consist of '-' and alphabet
+ * but character '-' cannot be used for the first character.
+ * (Regular expression is [a-z][-a-z]+)
+ *
+ * - For a specfic format/filter, using the format name with ':'.
+ * e.g "zip:compression=9"
+ * (This "compression=9" option entry is for "zip" format only)
+ *
+ * If another entries follow it, those are not for
+ * the specfic format/filter.
+ * e.g handle "zip:compression=9,opt=XXX,opt-b=ZZZ"
+ * "zip" format/filter handler will get "compression=9"
+ * all format/filter handler will get "opt=XXX"
+ * all format/filter handler will get "opt-b=ZZZ"
+ *
+ * - Whitespace and tab are bypassed.
+ *
+ */
+int
+__archive_parse_options(const char *p, const char *fn, int keysize, char *key,
+ int valsize, char *val)
+{
+ const char *p_org;
+ int apply;
+ int kidx, vidx;
+ int negative;
+ enum {
+ /* Requested for initialization. */
+ INIT,
+ /* Finding format/filter-name and option-name. */
+ F_BOTH,
+ /* Finding option-name only.
+ * (already detected format/filter-name) */
+ F_NAME,
+ /* Getting option-value. */
+ G_VALUE,
+ } state;
+
+ p_org = p;
+ state = INIT;
+ kidx = vidx = negative = 0;
+ apply = 1;
+ while (*p) {
+ switch (state) {
+ case INIT:
+ kidx = vidx = 0;
+ negative = 0;
+ apply = 1;
+ state = F_BOTH;
+ break;
+ case F_BOTH:
+ case F_NAME:
+ if ((*p >= 'a' && *p <= 'z') ||
+ (*p >= '0' && *p <= '9') || *p == '-') {
+ if (kidx == 0 && !(*p >= 'a' && *p <= 'z'))
+ /* Illegal sequence. */
+ return (-1);
+ if (kidx >= keysize -1)
+ /* Too many characters. */
+ return (-1);
+ key[kidx++] = *p++;
+ } else if (*p == '!') {
+ if (kidx != 0)
+ /* Illegal sequence. */
+ return (-1);
+ negative = 1;
+ ++p;
+ } else if (*p == ',') {
+ if (kidx == 0)
+ /* Illegal sequence. */
+ return (-1);
+ if (!negative)
+ val[vidx++] = '1';
+ /* We have got boolean option data. */
+ ++p;
+ if (apply)
+ goto complete;
+ else
+ /* This option does not apply to the
+ * format which the fn variable
+ * indicate. */
+ state = INIT;
+ } else if (*p == ':') {
+ /* obuf data is format name */
+ if (state == F_NAME)
+ /* We already found it. */
+ return (-1);
+ if (kidx == 0)
+ /* Illegal sequence. */
+ return (-1);
+ if (negative)
+ /* We cannot accept "!format-name:". */
+ return (-1);
+ key[kidx] = '\0';
+ if (strcmp(fn, key) != 0)
+ /* This option does not apply to the
+ * format which the fn variable
+ * indicate. */
+ apply = 0;
+ kidx = 0;
+ ++p;
+ state = F_NAME;
+ } else if (*p == '=') {
+ if (kidx == 0)
+ /* Illegal sequence. */
+ return (-1);
+ if (negative)
+ /* We cannot accept "!opt-name=value". */
+ return (-1);
+ ++p;
+ state = G_VALUE;
+ } else if (*p == ' ') {
+ /* Pass the space character */
+ ++p;
+ } else {
+ /* Illegal character. */
+ return (-1);
+ }
+ break;
+ case G_VALUE:
+ if (*p == ',') {
+ if (vidx == 0)
+ /* Illegal sequence. */
+ return (-1);
+ /* We have got option data. */
+ ++p;
+ if (apply)
+ goto complete;
+ else
+ /* This option does not apply to the
+ * format which the fn variable
+ * indicate. */
+ state = INIT;
+ } else if (*p == ' ') {
+ /* Pass the space character */
+ ++p;
+ } else {
+ if (vidx >= valsize -1)
+ /* Too many characters. */
+ return (-1);
+ val[vidx++] = *p++;
+ }
+ break;
+ }
+ }
+
+ switch (state) {
+ case F_BOTH:
+ case F_NAME:
+ if (kidx != 0) {
+ if (!negative)
+ val[vidx++] = '1';
+ /* We have got boolean option. */
+ if (apply)
+ /* This option apply to the format which the
+ * fn variable indicate. */
+ goto complete;
+ }
+ break;
+ case G_VALUE:
+ if (vidx == 0)
+ /* Illegal sequence. */
+ return (-1);
+ /* We have got option value. */
+ if (apply)
+ /* This option apply to the format which the fn
+ * variable indicate. */
+ goto complete;
+ break;
+ case INIT:/* nothing */
+ break;
+ }
+
+ /* End of Option string. */
+ return (0);
+
+complete:
+ key[kidx] = '\0';
+ val[vidx] = '\0';
+ /* Return a size which we've consumed for detecting option */
+ return ((int)(p - p_org));
+}
diff --git a/lib/libarchive/archive_virtual.c b/contrib/libarchive/libarchive/archive_virtual.c
index 0214b00..0214b00 100644
--- a/lib/libarchive/archive_virtual.c
+++ b/contrib/libarchive/libarchive/archive_virtual.c
diff --git a/lib/libarchive/archive_write.3 b/contrib/libarchive/libarchive/archive_write.3
index 2de392a..2de392a 100644
--- a/lib/libarchive/archive_write.3
+++ b/contrib/libarchive/libarchive/archive_write.3
diff --git a/lib/libarchive/archive_write.c b/contrib/libarchive/libarchive/archive_write.c
index 70af46f..70af46f 100644
--- a/lib/libarchive/archive_write.c
+++ b/contrib/libarchive/libarchive/archive_write.c
diff --git a/contrib/libarchive/libarchive/archive_write_disk.3 b/contrib/libarchive/libarchive/archive_write_disk.3
new file mode 100644
index 0000000..bdb6ca0
--- /dev/null
+++ b/contrib/libarchive/libarchive/archive_write_disk.3
@@ -0,0 +1,375 @@
+.\" Copyright (c) 2003-2007 Tim Kientzle
+.\" 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.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 5, 2008
+.Dt ARCHIVE_WRITE_DISK 3
+.Os
+.Sh NAME
+.Nm archive_write_disk_new ,
+.Nm archive_write_disk_set_options ,
+.Nm archive_write_disk_set_skip_file ,
+.Nm archive_write_disk_set_group_lookup ,
+.Nm archive_write_disk_set_standard_lookup ,
+.Nm archive_write_disk_set_user_lookup ,
+.Nm archive_write_header ,
+.Nm archive_write_data ,
+.Nm archive_write_finish_entry ,
+.Nm archive_write_close ,
+.Nm archive_write_free
+.Nd functions for creating objects on disk
+.Sh SYNOPSIS
+.In archive.h
+.Ft struct archive *
+.Fn archive_write_disk_new "void"
+.Ft int
+.Fn archive_write_disk_set_options "struct archive *" "int flags"
+.Ft int
+.Fn archive_write_disk_set_skip_file "struct archive *" "dev_t" "ino_t"
+.Ft int
+.Fo archive_write_disk_set_group_lookup
+.Fa "struct archive *"
+.Fa "void *"
+.Fa "gid_t (*)(void *, const char *gname, gid_t gid)"
+.Fa "void (*cleanup)(void *)"
+.Fc
+.Ft int
+.Fn archive_write_disk_set_standard_lookup "struct archive *"
+.Ft int
+.Fo archive_write_disk_set_user_lookup
+.Fa "struct archive *"
+.Fa "void *"
+.Fa "uid_t (*)(void *, const char *uname, uid_t uid)"
+.Fa "void (*cleanup)(void *)"
+.Fc
+.Ft int
+.Fn archive_write_header "struct archive *" "struct archive_entry *"
+.Ft ssize_t
+.Fn archive_write_data "struct archive *" "const void *" "size_t"
+.Ft int
+.Fn archive_write_finish_entry "struct archive *"
+.Ft int
+.Fn archive_write_close "struct archive *"
+.Ft int
+.Fn archive_write_free "struct archive *"
+.Sh DESCRIPTION
+These functions provide a complete API for creating objects on
+disk from
+.Tn struct archive_entry
+descriptions.
+They are most naturally used when extracting objects from an archive
+using the
+.Fn archive_read
+interface.
+The general process is to read
+.Tn struct archive_entry
+objects from an archive, then write those objects to a
+.Tn struct archive
+object created using the
+.Fn archive_write_disk
+family functions.
+This interface is deliberately very similar to the
+.Fn archive_write
+interface used to write objects to a streaming archive.
+.Bl -tag -width indent
+.It Fn archive_write_disk_new
+Allocates and initializes a
+.Tn struct archive
+object suitable for writing objects to disk.
+.It Fn archive_write_disk_set_skip_file
+Records the device and inode numbers of a file that should not be
+overwritten.
+This is typically used to ensure that an extraction process does not
+overwrite the archive from which objects are being read.
+This capability is technically unnecessary but can be a significant
+performance optimization in practice.
+.It Fn archive_write_disk_set_options
+The options field consists of a bitwise OR of one or more of the
+following values:
+.Bl -tag -compact -width "indent"
+.It Cm ARCHIVE_EXTRACT_OWNER
+The user and group IDs should be set on the restored file.
+By default, the user and group IDs are not restored.
+.It Cm ARCHIVE_EXTRACT_PERM
+Full permissions (including SGID, SUID, and sticky bits) should
+be restored exactly as specified, without obeying the
+current umask.
+Note that SUID and SGID bits can only be restored if the
+user and group ID of the object on disk are correct.
+If
+.Cm ARCHIVE_EXTRACT_OWNER
+is not specified, then SUID and SGID bits will only be restored
+if the default user and group IDs of newly-created objects on disk
+happen to match those specified in the archive entry.
+By default, only basic permissions are restored, and umask is obeyed.
+.It Cm ARCHIVE_EXTRACT_TIME
+The timestamps (mtime, ctime, and atime) should be restored.
+By default, they are ignored.
+Note that restoring of atime is not currently supported.
+.It Cm ARCHIVE_EXTRACT_NO_OVERWRITE
+Existing files on disk will not be overwritten.
+By default, existing regular files are truncated and overwritten;
+existing directories will have their permissions updated;
+other pre-existing objects are unlinked and recreated from scratch.
+.It Cm ARCHIVE_EXTRACT_UNLINK
+Existing files on disk will be unlinked before any attempt to
+create them.
+In some cases, this can prove to be a significant performance improvement.
+By default, existing files are truncated and rewritten, but
+the file is not recreated.
+In particular, the default behavior does not break existing hard links.
+.It Cm ARCHIVE_EXTRACT_ACL
+Attempt to restore ACLs.
+By default, extended ACLs are ignored.
+.It Cm ARCHIVE_EXTRACT_FFLAGS
+Attempt to restore extended file flags.
+By default, file flags are ignored.
+.It Cm ARCHIVE_EXTRACT_XATTR
+Attempt to restore POSIX.1e extended attributes.
+By default, they are ignored.
+.It Cm ARCHIVE_EXTRACT_SECURE_SYMLINKS
+Refuse to extract any object whose final location would be altered
+by a symlink on disk.
+This is intended to help guard against a variety of mischief
+caused by archives that (deliberately or otherwise) extract
+files outside of the current directory.
+The default is not to perform this check.
+If
+.Cm ARCHIVE_EXTRACT_UNLINK
+is specified together with this option, the library will
+remove any intermediate symlinks it finds and return an
+error only if such symlink could not be removed.
+.It Cm ARCHIVE_EXTRACT_SECURE_NODOTDOT
+Refuse to extract a path that contains a
+.Pa ..
+element anywhere within it.
+The default is to not refuse such paths.
+Note that paths ending in
+.Pa ..
+always cause an error, regardless of this flag.
+.It Cm ARCHIVE_EXTRACT_SPARSE
+Scan data for blocks of NUL bytes and try to recreate them with holes.
+This results in sparse files, independent of whether the archive format
+supports or uses them.
+.El
+.It Xo
+.Fn archive_write_disk_set_group_lookup ,
+.Fn archive_write_disk_set_user_lookup
+.Xc
+The
+.Tn struct archive_entry
+objects contain both names and ids that can be used to identify users
+and groups.
+These names and ids describe the ownership of the file itself and
+also appear in ACL lists.
+By default, the library uses the ids and ignores the names, but
+this can be overridden by registering user and group lookup functions.
+To register, you must provide a lookup function which
+accepts both a name and id and returns a suitable id.
+You may also provide a
+.Tn void *
+pointer to a private data structure and a cleanup function for
+that data.
+The cleanup function will be invoked when the
+.Tn struct archive
+object is destroyed.
+.It Fn archive_write_disk_set_standard_lookup
+This convenience function installs a standard set of user
+and group lookup functions.
+These functions use
+.Xr getpwnam 3
+and
+.Xr getgrnam 3
+to convert names to ids, defaulting to the ids if the names cannot
+be looked up.
+These functions also implement a simple memory cache to reduce
+the number of calls to
+.Xr getpwnam 3
+and
+.Xr getgrnam 3 .
+.It Fn archive_write_header
+Build and write a header using the data in the provided
+.Tn struct archive_entry
+structure.
+See
+.Xr archive_entry 3
+for information on creating and populating
+.Tn struct archive_entry
+objects.
+.It Fn archive_write_data
+Write data corresponding to the header just written.
+Returns number of bytes written or -1 on error.
+.It Fn archive_write_finish_entry
+Close out the entry just written.
+Ordinarily, clients never need to call this, as it
+is called automatically by
+.Fn archive_write_next_header
+and
+.Fn archive_write_close
+as needed.
+.It Fn archive_write_close
+Set any attributes that could not be set during the initial restore.
+For example, directory timestamps are not restored initially because
+restoring a subsequent file would alter that timestamp.
+Similarly, non-writable directories are initially created with
+write permissions (so that their contents can be restored).
+The
+.Nm
+library maintains a list of all such deferred attributes and
+sets them when this function is invoked.
+.It Fn archive_write_free
+Invokes
+.Fn archive_write_close
+if it was not invoked manually, then releases all resources.
+.El
+More information about the
+.Va struct archive
+object and the overall design of the library can be found in the
+.Xr libarchive 3
+overview.
+Many of these functions are also documented under
+.Xr archive_write 3 .
+.Sh RETURN VALUES
+Most functions return
+.Cm ARCHIVE_OK
+(zero) on success, or one of several non-zero
+error codes for errors.
+Specific error codes include:
+.Cm ARCHIVE_RETRY
+for operations that might succeed if retried,
+.Cm ARCHIVE_WARN
+for unusual conditions that do not prevent further operations, and
+.Cm ARCHIVE_FATAL
+for serious errors that make remaining operations impossible.
+The
+.Fn archive_errno
+and
+.Fn archive_error_string
+functions can be used to retrieve an appropriate error code and a
+textual error message.
+.Pp
+.Fn archive_write_disk_new
+returns a pointer to a newly-allocated
+.Tn struct archive
+object.
+.Pp
+.Fn archive_write_data
+returns a count of the number of bytes actually written.
+On error, -1 is returned and the
+.Fn archive_errno
+and
+.Fn archive_error_string
+functions will return appropriate values.
+.Sh SEE ALSO
+.Xr archive_read 3 ,
+.Xr archive_write 3 ,
+.Xr tar 1 ,
+.Xr libarchive 3
+.Sh HISTORY
+The
+.Nm libarchive
+library first appeared in
+.Fx 5.3 .
+The
+.Nm archive_write_disk
+interface was added to
+.Nm libarchive 2.0
+and first appeared in
+.Fx 6.3 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm libarchive
+library was written by
+.An Tim Kientzle Aq kientzle@acm.org .
+.Sh BUGS
+Directories are actually extracted in two distinct phases.
+Directories are created during
+.Fn archive_write_header ,
+but final permissions are not set until
+.Fn archive_write_close .
+This separation is necessary to correctly handle borderline
+cases such as a non-writable directory containing
+files, but can cause unexpected results.
+In particular, directory permissions are not fully
+restored until the archive is closed.
+If you use
+.Xr chdir 2
+to change the current directory between calls to
+.Fn archive_read_extract
+or before calling
+.Fn archive_read_close ,
+you may confuse the permission-setting logic with
+the result that directory permissions are restored
+incorrectly.
+.Pp
+The library attempts to create objects with filenames longer than
+.Cm PATH_MAX
+by creating prefixes of the full path and changing the current directory.
+Currently, this logic is limited in scope; the fixup pass does
+not work correctly for such objects and the symlink security check
+option disables the support for very long pathnames.
+.Pp
+Restoring the path
+.Pa aa/../bb
+does create each intermediate directory.
+In particular, the directory
+.Pa aa
+is created as well as the final object
+.Pa bb .
+In theory, this can be exploited to create an entire directory hierarchy
+with a single request.
+Of course, this does not work if the
+.Cm ARCHIVE_EXTRACT_NODOTDOT
+option is specified.
+.Pp
+Implicit directories are always created obeying the current umask.
+Explicit objects are created obeying the current umask unless
+.Cm ARCHIVE_EXTRACT_PERM
+is specified, in which case they current umask is ignored.
+.Pp
+SGID and SUID bits are restored only if the correct user and
+group could be set.
+If
+.Cm ARCHIVE_EXTRACT_OWNER
+is not specified, then no attempt is made to set the ownership.
+In this case, SGID and SUID bits are restored only if the
+user and group of the final object happen to match those specified
+in the entry.
+.Pp
+The
+.Dq standard
+user-id and group-id lookup functions are not the defaults because
+.Xr getgrnam 3
+and
+.Xr getpwnam 3
+are sometimes too large for particular applications.
+The current design allows the application author to use a more
+compact implementation when appropriate.
+.Pp
+There should be a corresponding
+.Nm archive_read_disk
+interface that walks a directory hierarchy and returns archive
+entry objects. \ No newline at end of file
diff --git a/contrib/libarchive/libarchive/archive_write_disk.c b/contrib/libarchive/libarchive/archive_write_disk.c
new file mode 100644
index 0000000..49ced58
--- /dev/null
+++ b/contrib/libarchive/libarchive/archive_write_disk.c
@@ -0,0 +1,2712 @@
+/*-
+ * Copyright (c) 2003-2007 Tim Kientzle
+ * 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
+ * in this position and unchanged.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "archive_platform.h"
+__FBSDID("$FreeBSD$");
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_ACL_H
+#include <sys/acl.h>
+#endif
+#ifdef HAVE_SYS_EXTATTR_H
+#include <sys/extattr.h>
+#endif
+#ifdef HAVE_SYS_XATTR_H
+#include <sys/xattr.h>
+#endif
+#ifdef HAVE_ATTR_XATTR_H
+#include <attr/xattr.h>
+#endif
+#ifdef HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef HAVE_SYS_UTIME_H
+#include <sys/utime.h>
+#endif
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef HAVE_GRP_H
+#include <grp.h>
+#endif
+#ifdef HAVE_LINUX_FS_H
+#include <linux/fs.h> /* for Linux file flags */
+#endif
+/*
+ * Some Linux distributions have both linux/ext2_fs.h and ext2fs/ext2_fs.h.
+ * As the include guards don't agree, the order of include is important.
+ */
+#ifdef HAVE_LINUX_EXT2_FS_H
+#include <linux/ext2_fs.h> /* for Linux file flags */
+#endif
+#if defined(HAVE_EXT2FS_EXT2_FS_H) && !defined(__CYGWIN__)
+#include <ext2fs/ext2_fs.h> /* Linux file flags, broken on Cygwin */
+#endif
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+#ifdef HAVE_PWD_H
+#include <pwd.h>
+#endif
+#include <stdio.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_UTIME_H
+#include <utime.h>
+#endif
+
+#include "archive.h"
+#include "archive_string.h"
+#include "archive_entry.h"
+#include "archive_private.h"
+
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+
+struct fixup_entry {
+ struct fixup_entry *next;
+ mode_t mode;
+ int64_t atime;
+ int64_t birthtime;
+ int64_t mtime;
+ unsigned long atime_nanos;
+ unsigned long birthtime_nanos;
+ unsigned long mtime_nanos;
+ unsigned long fflags_set;
+ int fixup; /* bitmask of what needs fixing */
+ char *name;
+};
+
+/*
+ * We use a bitmask to track which operations remain to be done for
+ * this file. In particular, this helps us avoid unnecessary
+ * operations when it's possible to take care of one step as a
+ * side-effect of another. For example, mkdir() can specify the mode
+ * for the newly-created object but symlink() cannot. This means we
+ * can skip chmod() if mkdir() succeeded, but we must explicitly
+ * chmod() if we're trying to create a directory that already exists
+ * (mkdir() failed) or if we're restoring a symlink. Similarly, we
+ * need to verify UID/GID before trying to restore SUID/SGID bits;
+ * that verification can occur explicitly through a stat() call or
+ * implicitly because of a successful chown() call.
+ */
+#define TODO_MODE_FORCE 0x40000000
+#define TODO_MODE_BASE 0x20000000
+#define TODO_SUID 0x10000000
+#define TODO_SUID_CHECK 0x08000000
+#define TODO_SGID 0x04000000
+#define TODO_SGID_CHECK 0x02000000
+#define TODO_MODE (TODO_MODE_BASE|TODO_SUID|TODO_SGID)
+#define TODO_TIMES ARCHIVE_EXTRACT_TIME
+#define TODO_OWNER ARCHIVE_EXTRACT_OWNER
+#define TODO_FFLAGS ARCHIVE_EXTRACT_FFLAGS
+#define TODO_ACLS ARCHIVE_EXTRACT_ACL
+#define TODO_XATTR ARCHIVE_EXTRACT_XATTR
+
+struct archive_write_disk {
+ struct archive archive;
+
+ mode_t user_umask;
+ struct fixup_entry *fixup_list;
+ struct fixup_entry *current_fixup;
+ uid_t user_uid;
+ dev_t skip_file_dev;
+ ino_t skip_file_ino;
+ time_t start_time;
+
+ gid_t (*lookup_gid)(void *private, const char *gname, gid_t gid);
+ void (*cleanup_gid)(void *private);
+ void *lookup_gid_data;
+ uid_t (*lookup_uid)(void *private, const char *gname, gid_t gid);
+ void (*cleanup_uid)(void *private);
+ void *lookup_uid_data;
+
+ /*
+ * Full path of last file to satisfy symlink checks.
+ */
+ struct archive_string path_safe;
+
+ /*
+ * Cached stat data from disk for the current entry.
+ * If this is valid, pst points to st. Otherwise,
+ * pst is null.
+ */
+ struct stat st;
+ struct stat *pst;
+
+ /* Information about the object being restored right now. */
+ struct archive_entry *entry; /* Entry being extracted. */
+ char *name; /* Name of entry, possibly edited. */
+ struct archive_string _name_data; /* backing store for 'name' */
+ /* Tasks remaining for this object. */
+ int todo;
+ /* Tasks deferred until end-of-archive. */
+ int deferred;
+ /* Options requested by the client. */
+ int flags;
+ /* Handle for the file we're restoring. */
+ int fd;
+ /* Current offset for writing data to the file. */
+ off_t offset;
+ /* Last offset actually written to disk. */
+ off_t fd_offset;
+ /* Maximum size of file, -1 if unknown. */
+ off_t filesize;
+ /* Dir we were in before this restore; only for deep paths. */
+ int restore_pwd;
+ /* Mode we should use for this entry; affected by _PERM and umask. */
+ mode_t mode;
+ /* UID/GID to use in restoring this entry. */
+ uid_t uid;
+ gid_t gid;
+};
+
+/*
+ * Default mode for dirs created automatically (will be modified by umask).
+ * Note that POSIX specifies 0777 for implicity-created dirs, "modified
+ * by the process' file creation mask."
+ */
+#define DEFAULT_DIR_MODE 0777
+/*
+ * Dir modes are restored in two steps: During the extraction, the permissions
+ * in the archive are modified to match the following limits. During
+ * the post-extract fixup pass, the permissions from the archive are
+ * applied.
+ */
+#define MINIMUM_DIR_MODE 0700
+#define MAXIMUM_DIR_MODE 0775
+
+static int check_symlinks(struct archive_write_disk *);
+static int create_filesystem_object(struct archive_write_disk *);
+static struct fixup_entry *current_fixup(struct archive_write_disk *, const char *pathname);
+#ifdef HAVE_FCHDIR
+static void edit_deep_directories(struct archive_write_disk *ad);
+#endif
+static int cleanup_pathname(struct archive_write_disk *);
+static int create_dir(struct archive_write_disk *, char *);
+static int create_parent_dir(struct archive_write_disk *, char *);
+static int older(struct stat *, struct archive_entry *);
+static int restore_entry(struct archive_write_disk *);
+#ifdef HAVE_POSIX_ACL
+static int set_acl(struct archive_write_disk *, int fd, struct archive_entry *,
+ acl_type_t, int archive_entry_acl_type, const char *tn);
+#endif
+static int set_acls(struct archive_write_disk *);
+static int set_xattrs(struct archive_write_disk *);
+static int set_fflags(struct archive_write_disk *);
+static int set_fflags_platform(struct archive_write_disk *, int fd,
+ const char *name, mode_t mode,
+ unsigned long fflags_set, unsigned long fflags_clear);
+static int set_ownership(struct archive_write_disk *);
+static int set_mode(struct archive_write_disk *, int mode);
+static int set_time(int, int, const char *, time_t, long, time_t, long);
+static int set_times(struct archive_write_disk *);
+static struct fixup_entry *sort_dir_list(struct fixup_entry *p);
+static gid_t trivial_lookup_gid(void *, const char *, gid_t);
+static uid_t trivial_lookup_uid(void *, const char *, uid_t);
+static ssize_t write_data_block(struct archive_write_disk *,
+ const char *, size_t);
+
+static struct archive_vtable *archive_write_disk_vtable(void);
+
+static int _archive_write_close(struct archive *);
+static int _archive_write_free(struct archive *);
+static int _archive_write_header(struct archive *, struct archive_entry *);
+static int _archive_write_finish_entry(struct archive *);
+static ssize_t _archive_write_data(struct archive *, const void *, size_t);
+static ssize_t _archive_write_data_block(struct archive *, const void *, size_t, off_t);
+
+static int
+_archive_write_disk_lazy_stat(struct archive_write_disk *a)
+{
+ if (a->pst != NULL) {
+ /* Already have stat() data available. */
+ return (ARCHIVE_OK);
+ }
+#ifdef HAVE_FSTAT
+ if (a->fd >= 0 && fstat(a->fd, &a->st) == 0) {
+ a->pst = &a->st;
+ return (ARCHIVE_OK);
+ }
+#endif
+ /*
+ * XXX At this point, symlinks should not be hit, otherwise
+ * XXX a race occured. Do we want to check explicitly for that?
+ */
+ if (lstat(a->name, &a->st) == 0) {
+ a->pst = &a->st;
+ return (ARCHIVE_OK);
+ }
+ archive_set_error(&a->archive, errno, "Couldn't stat file");
+ return (ARCHIVE_WARN);
+}
+
+static struct archive_vtable *
+archive_write_disk_vtable(void)
+{
+ static struct archive_vtable av;
+ static int inited = 0;
+
+ if (!inited) {
+ av.archive_close = _archive_write_close;
+ av.archive_free = _archive_write_free;
+ av.archive_write_header = _archive_write_header;
+ av.archive_write_finish_entry = _archive_write_finish_entry;
+ av.archive_write_data = _archive_write_data;
+ av.archive_write_data_block = _archive_write_data_block;
+ }
+ return (&av);
+}
+
+
+int
+archive_write_disk_set_options(struct archive *_a, int flags)
+{
+ struct archive_write_disk *a = (struct archive_write_disk *)_a;
+
+ a->flags = flags;
+ return (ARCHIVE_OK);
+}
+
+
+/*
+ * Extract this entry to disk.
+ *
+ * TODO: Validate hardlinks. According to the standards, we're
+ * supposed to check each extracted hardlink and squawk if it refers
+ * to a file that we didn't restore. I'm not entirely convinced this
+ * is a good idea, but more importantly: Is there any way to validate
+ * hardlinks without keeping a complete list of filenames from the
+ * entire archive?? Ugh.
+ *
+ */
+static int
+_archive_write_header(struct archive *_a, struct archive_entry *entry)
+{
+ struct archive_write_disk *a = (struct archive_write_disk *)_a;
+ struct fixup_entry *fe;
+ int ret, r;
+
+ __archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC,
+ ARCHIVE_STATE_HEADER | ARCHIVE_STATE_DATA,
+ "archive_write_disk_header");
+ archive_clear_error(&a->archive);
+ if (a->archive.state & ARCHIVE_STATE_DATA) {
+ r = _archive_write_finish_entry(&a->archive);
+ if (r == ARCHIVE_FATAL)
+ return (r);
+ }
+
+ /* Set up for this particular entry. */
+ a->pst = NULL;
+ a->current_fixup = NULL;
+ a->deferred = 0;
+ if (a->entry) {
+ archive_entry_free(a->entry);
+ a->entry = NULL;
+ }
+ a->entry = archive_entry_clone(entry);
+ a->fd = -1;
+ a->fd_offset = 0;
+ a->offset = 0;
+ a->uid = a->user_uid;
+ a->mode = archive_entry_mode(a->entry);
+ if (archive_entry_size_is_set(a->entry))
+ a->filesize = archive_entry_size(a->entry);
+ else
+ a->filesize = -1;
+ archive_strcpy(&(a->_name_data), archive_entry_pathname(a->entry));
+ a->name = a->_name_data.s;
+ archive_clear_error(&a->archive);
+
+ /*
+ * Clean up the requested path. This is necessary for correct
+ * dir restores; the dir restore logic otherwise gets messed
+ * up by nonsense like "dir/.".
+ */
+ ret = cleanup_pathname(a);
+ if (ret != ARCHIVE_OK)
+ return (ret);
+
+ /*
+ * Set the umask to zero so we get predictable mode settings.
+ * This gets done on every call to _write_header in case the
+ * user edits their umask during the extraction for some
+ * reason. This will be reset before we return. Note that we
+ * don't need to do this in _finish_entry, as the chmod(), etc,
+ * system calls don't obey umask.
+ */
+ a->user_umask = umask(0);
+ /* From here on, early exit requires "goto done" to clean up. */
+
+ /* Figure out what we need to do for this entry. */
+ a->todo = TODO_MODE_BASE;
+ if (a->flags & ARCHIVE_EXTRACT_PERM) {
+ a->todo |= TODO_MODE_FORCE; /* Be pushy about permissions. */
+ /*
+ * SGID requires an extra "check" step because we
+ * cannot easily predict the GID that the system will
+ * assign. (Different systems assign GIDs to files
+ * based on a variety of criteria, including process
+ * credentials and the gid of the enclosing
+ * directory.) We can only restore the SGID bit if
+ * the file has the right GID, and we only know the
+ * GID if we either set it (see set_ownership) or if
+ * we've actually called stat() on the file after it
+ * was restored. Since there are several places at
+ * which we might verify the GID, we need a TODO bit
+ * to keep track.
+ */
+ if (a->mode & S_ISGID)
+ a->todo |= TODO_SGID | TODO_SGID_CHECK;
+ /*
+ * Verifying the SUID is simpler, but can still be
+ * done in multiple ways, hence the separate "check" bit.
+ */
+ if (a->mode & S_ISUID)
+ a->todo |= TODO_SUID | TODO_SUID_CHECK;
+ } else {
+ /*
+ * User didn't request full permissions, so don't
+ * restore SUID, SGID bits and obey umask.
+ */
+ a->mode &= ~S_ISUID;
+ a->mode &= ~S_ISGID;
+ a->mode &= ~S_ISVTX;
+ a->mode &= ~a->user_umask;
+ }
+#if !defined(_WIN32) || defined(__CYGWIN__)
+ if (a->flags & ARCHIVE_EXTRACT_OWNER)
+ a->todo |= TODO_OWNER;
+#endif
+ if (a->flags & ARCHIVE_EXTRACT_TIME)
+ a->todo |= TODO_TIMES;
+ if (a->flags & ARCHIVE_EXTRACT_ACL)
+ a->todo |= TODO_ACLS;
+ if (a->flags & ARCHIVE_EXTRACT_XATTR)
+ a->todo |= TODO_XATTR;
+ if (a->flags & ARCHIVE_EXTRACT_FFLAGS)
+ a->todo |= TODO_FFLAGS;
+ if (a->flags & ARCHIVE_EXTRACT_SECURE_SYMLINKS) {
+ ret = check_symlinks(a);
+ if (ret != ARCHIVE_OK)
+ goto done;
+ }
+#ifdef HAVE_FCHDIR
+ /* If path exceeds PATH_MAX, shorten the path. */
+ edit_deep_directories(a);
+#endif
+
+ ret = restore_entry(a);
+
+ /*
+ * TODO: There are rumours that some extended attributes must
+ * be restored before file data is written. If this is true,
+ * then we either need to write all extended attributes both
+ * before and after restoring the data, or find some rule for
+ * determining which must go first and which last. Due to the
+ * many ways people are using xattrs, this may prove to be an
+ * intractable problem.
+ */
+
+#ifdef HAVE_FCHDIR
+ /* If we changed directory above, restore it here. */
+ if (a->restore_pwd >= 0) {
+ r = fchdir(a->restore_pwd);
+ if (r != 0) {
+ archive_set_error(&a->archive, errno, "chdir() failure");
+ ret = ARCHIVE_FATAL;
+ }
+ close(a->restore_pwd);
+ a->restore_pwd = -1;
+ }
+#endif
+
+ /*
+ * Fixup uses the unedited pathname from archive_entry_pathname(),
+ * because it is relative to the base dir and the edited path
+ * might be relative to some intermediate dir as a result of the
+ * deep restore logic.
+ */
+ if (a->deferred & TODO_MODE) {
+ fe = current_fixup(a, archive_entry_pathname(entry));
+ fe->fixup |= TODO_MODE_BASE;
+ fe->mode = a->mode;
+ }
+
+ if ((a->deferred & TODO_TIMES)
+ && (archive_entry_mtime_is_set(entry)
+ || archive_entry_atime_is_set(entry))) {
+ fe = current_fixup(a, archive_entry_pathname(entry));
+ fe->fixup |= TODO_TIMES;
+ if (archive_entry_atime_is_set(entry)) {
+ fe->atime = archive_entry_atime(entry);
+ fe->atime_nanos = archive_entry_atime_nsec(entry);
+ } else {
+ /* If atime is unset, use start time. */
+ fe->atime = a->start_time;
+ fe->atime_nanos = 0;
+ }
+ if (archive_entry_mtime_is_set(entry)) {
+ fe->mtime = archive_entry_mtime(entry);
+ fe->mtime_nanos = archive_entry_mtime_nsec(entry);
+ } else {
+ /* If mtime is unset, use start time. */
+ fe->mtime = a->start_time;
+ fe->mtime_nanos = 0;
+ }
+ if (archive_entry_birthtime_is_set(entry)) {
+ fe->birthtime = archive_entry_birthtime(entry);
+ fe->birthtime_nanos = archive_entry_birthtime_nsec(entry);
+ } else {
+ /* If birthtime is unset, use mtime. */
+ fe->birthtime = fe->mtime;
+ fe->birthtime_nanos = fe->mtime_nanos;
+ }
+ }
+
+ if (a->deferred & TODO_FFLAGS) {
+ fe = current_fixup(a, archive_entry_pathname(entry));
+ fe->fixup |= TODO_FFLAGS;
+ /* TODO: Complete this.. defer fflags from below. */
+ }
+
+ /* We've created the object and are ready to pour data into it. */
+ if (ret >= ARCHIVE_WARN)
+ a->archive.state = ARCHIVE_STATE_DATA;
+ /*
+ * If it's not open, tell our client not to try writing.
+ * In particular, dirs, links, etc, don't get written to.
+ */
+ if (a->fd < 0) {
+ archive_entry_set_size(entry, 0);
+ a->filesize = 0;
+ }
+done:
+ /* Restore the user's umask before returning. */
+ umask(a->user_umask);
+
+ return (ret);
+}
+
+int
+archive_write_disk_set_skip_file(struct archive *_a, dev_t d, ino_t i)
+{
+ struct archive_write_disk *a = (struct archive_write_disk *)_a;
+ __archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC,
+ ARCHIVE_STATE_ANY, "archive_write_disk_set_skip_file");
+ a->skip_file_dev = d;
+ a->skip_file_ino = i;
+ return (ARCHIVE_OK);
+}
+
+static ssize_t
+write_data_block(struct archive_write_disk *a, const char *buff, size_t size)
+{
+ uint64_t start_size = size;
+ ssize_t bytes_written = 0;
+ ssize_t block_size = 0, bytes_to_write;
+
+ if (size == 0)
+ return (ARCHIVE_OK);
+
+ if (a->filesize == 0 || a->fd < 0) {
+ archive_set_error(&a->archive, 0,
+ "Attempt to write to an empty file");
+ return (ARCHIVE_WARN);
+ }
+
+ if (a->flags & ARCHIVE_EXTRACT_SPARSE) {
+#if HAVE_STRUCT_STAT_ST_BLKSIZE
+ int r;
+ if ((r = _archive_write_disk_lazy_stat(a)) != ARCHIVE_OK)
+ return (r);
+ block_size = a->pst->st_blksize;
+#else
+ /* XXX TODO XXX Is there a more appropriate choice here ? */
+ /* This needn't match the filesystem allocation size. */
+ block_size = 16*1024;
+#endif
+ }
+
+ /* If this write would run beyond the file size, truncate it. */
+ if (a->filesize >= 0 && (off_t)(a->offset + size) > a->filesize)
+ start_size = size = (size_t)(a->filesize - a->offset);
+
+ /* Write the data. */
+ while (size > 0) {
+ if (block_size == 0) {
+ bytes_to_write = size;
+ } else {
+ /* We're sparsifying the file. */
+ const char *p, *end;
+ off_t block_end;
+
+ /* Skip leading zero bytes. */
+ for (p = buff, end = buff + size; p < end; ++p) {
+ if (*p != '\0')
+ break;
+ }
+ a->offset += p - buff;
+ size -= p - buff;
+ buff = p;
+ if (size == 0)
+ break;
+
+ /* Calculate next block boundary after offset. */
+ block_end
+ = (a->offset / block_size + 1) * block_size;
+
+ /* If the adjusted write would cross block boundary,
+ * truncate it to the block boundary. */
+ bytes_to_write = size;
+ if (a->offset + bytes_to_write > block_end)
+ bytes_to_write = block_end - a->offset;
+ }
+ /* Seek if necessary to the specified offset. */
+ if (a->offset != a->fd_offset) {
+ if (lseek(a->fd, a->offset, SEEK_SET) < 0) {
+ archive_set_error(&a->archive, errno,
+ "Seek failed");
+ return (ARCHIVE_FATAL);
+ }
+ a->fd_offset = a->offset;
+ a->archive.file_position = a->offset;
+ a->archive.raw_position = a->offset;
+ }
+ bytes_written = write(a->fd, buff, bytes_to_write);
+ if (bytes_written < 0) {
+ archive_set_error(&a->archive, errno, "Write failed");
+ return (ARCHIVE_WARN);
+ }
+ buff += bytes_written;
+ size -= bytes_written;
+ a->offset += bytes_written;
+ a->archive.file_position += bytes_written;
+ a->archive.raw_position += bytes_written;
+ a->fd_offset = a->offset;
+ }
+ return (start_size - size);
+}
+
+static ssize_t
+_archive_write_data_block(struct archive *_a,
+ const void *buff, size_t size, off_t offset)
+{
+ struct archive_write_disk *a = (struct archive_write_disk *)_a;
+ ssize_t r;
+
+ __archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC,
+ ARCHIVE_STATE_DATA, "archive_write_disk_block");
+
+ a->offset = offset;
+ r = write_data_block(a, buff, size);
+ if (r < ARCHIVE_OK)
+ return (r);
+ if ((size_t)r < size) {
+ archive_set_error(&a->archive, 0,
+ "Write request too large");
+ return (ARCHIVE_WARN);
+ }
+ return (ARCHIVE_OK);
+}
+
+static ssize_t
+_archive_write_data(struct archive *_a, const void *buff, size_t size)
+{
+ struct archive_write_disk *a = (struct archive_write_disk *)_a;
+
+ __archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC,
+ ARCHIVE_STATE_DATA, "archive_write_data");
+
+ return (write_data_block(a, buff, size));
+}
+
+static int
+_archive_write_finish_entry(struct archive *_a)
+{
+ struct archive_write_disk *a = (struct archive_write_disk *)_a;
+ int ret = ARCHIVE_OK;
+
+ __archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC,
+ ARCHIVE_STATE_HEADER | ARCHIVE_STATE_DATA,
+ "archive_write_finish_entry");
+ if (a->archive.state & ARCHIVE_STATE_HEADER)
+ return (ARCHIVE_OK);
+ archive_clear_error(&a->archive);
+
+ /* Pad or truncate file to the right size. */
+ if (a->fd < 0) {
+ /* There's no file. */
+ } else if (a->filesize < 0) {
+ /* File size is unknown, so we can't set the size. */
+ } else if (a->fd_offset == a->filesize) {
+ /* Last write ended at exactly the filesize; we're done. */
+ /* Hopefully, this is the common case. */
+ } else {
+#if HAVE_FTRUNCATE
+ if (ftruncate(a->fd, a->filesize) == -1 &&
+ a->filesize == 0) {
+ archive_set_error(&a->archive, errno,
+ "File size could not be restored");
+ return (ARCHIVE_FAILED);
+ }
+#endif
+ /*
+ * Not all platforms implement the XSI option to
+ * extend files via ftruncate. Stat() the file again
+ * to see what happened.
+ */
+ a->pst = NULL;
+ if ((ret = _archive_write_disk_lazy_stat(a)) != ARCHIVE_OK)
+ return (ret);
+ /* We can use lseek()/write() to extend the file if
+ * ftruncate didn't work or isn't available. */
+ if (a->st.st_size < a->filesize) {
+ const char nul = '\0';
+ if (lseek(a->fd, a->filesize - 1, SEEK_SET) < 0) {
+ archive_set_error(&a->archive, errno,
+ "Seek failed");
+ return (ARCHIVE_FATAL);
+ }
+ if (write(a->fd, &nul, 1) < 0) {
+ archive_set_error(&a->archive, errno,
+ "Write to restore size failed");
+ return (ARCHIVE_FATAL);
+ }
+ a->pst = NULL;
+ }
+ }
+
+ /* Restore metadata. */
+
+ /*
+ * Look up the "real" UID only if we're going to need it.
+ * TODO: the TODO_SGID condition can be dropped here, can't it?
+ */
+ if (a->todo & (TODO_OWNER | TODO_SUID | TODO_SGID)) {
+ a->uid = a->lookup_uid(a->lookup_uid_data,
+ archive_entry_uname(a->entry),
+ archive_entry_uid(a->entry));
+ }
+ /* Look up the "real" GID only if we're going to need it. */
+ /* TODO: the TODO_SUID condition can be dropped here, can't it? */
+ if (a->todo & (TODO_OWNER | TODO_SGID | TODO_SUID)) {
+ a->gid = a->lookup_gid(a->lookup_gid_data,
+ archive_entry_gname(a->entry),
+ archive_entry_gid(a->entry));
+ }
+ /*
+ * If restoring ownership, do it before trying to restore suid/sgid
+ * bits. If we set the owner, we know what it is and can skip
+ * a stat() call to examine the ownership of the file on disk.
+ */
+ if (a->todo & TODO_OWNER)
+ ret = set_ownership(a);
+ if (a->todo & TODO_MODE) {
+ int r2 = set_mode(a, a->mode);
+ if (r2 < ret) ret = r2;
+ }
+ if (a->todo & TODO_ACLS) {
+ int r2 = set_acls(a);
+ if (r2 < ret) ret = r2;
+ }
+
+ /*
+ * Security-related extended attributes (such as
+ * security.capability on Linux) have to be restored last,
+ * since they're implicitly removed by other file changes.
+ */
+ if (a->todo & TODO_XATTR) {
+ int r2 = set_xattrs(a);
+ if (r2 < ret) ret = r2;
+ }
+
+ /*
+ * Some flags prevent file modification; they must be restored after
+ * file contents are written.
+ */
+ if (a->todo & TODO_FFLAGS) {
+ int r2 = set_fflags(a);
+ if (r2 < ret) ret = r2;
+ }
+ /*
+ * Time has to be restored after all other metadata;
+ * otherwise atime will get changed.
+ */
+ if (a->todo & TODO_TIMES) {
+ int r2 = set_times(a);
+ if (r2 < ret) ret = r2;
+ }
+
+ /* If there's an fd, we can close it now. */
+ if (a->fd >= 0) {
+ close(a->fd);
+ a->fd = -1;
+ }
+ /* If there's an entry, we can release it now. */
+ if (a->entry) {
+ archive_entry_free(a->entry);
+ a->entry = NULL;
+ }
+ a->archive.state = ARCHIVE_STATE_HEADER;
+ return (ret);
+}
+
+int
+archive_write_disk_set_group_lookup(struct archive *_a,
+ void *private_data,
+ gid_t (*lookup_gid)(void *private, const char *gname, gid_t gid),
+ void (*cleanup_gid)(void *private))
+{
+ struct archive_write_disk *a = (struct archive_write_disk *)_a;
+ __archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC,
+ ARCHIVE_STATE_ANY, "archive_write_disk_set_group_lookup");
+
+ a->lookup_gid = lookup_gid;
+ a->cleanup_gid = cleanup_gid;
+ a->lookup_gid_data = private_data;
+ return (ARCHIVE_OK);
+}
+
+int
+archive_write_disk_set_user_lookup(struct archive *_a,
+ void *private_data,
+ uid_t (*lookup_uid)(void *private, const char *uname, uid_t uid),
+ void (*cleanup_uid)(void *private))
+{
+ struct archive_write_disk *a = (struct archive_write_disk *)_a;
+ __archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC,
+ ARCHIVE_STATE_ANY, "archive_write_disk_set_user_lookup");
+
+ a->lookup_uid = lookup_uid;
+ a->cleanup_uid = cleanup_uid;
+ a->lookup_uid_data = private_data;
+ return (ARCHIVE_OK);
+}
+
+
+/*
+ * Create a new archive_write_disk object and initialize it with global state.
+ */
+struct archive *
+archive_write_disk_new(void)
+{
+ struct archive_write_disk *a;
+
+ a = (struct archive_write_disk *)malloc(sizeof(*a));
+ if (a == NULL)
+ return (NULL);
+ memset(a, 0, sizeof(*a));
+ a->archive.magic = ARCHIVE_WRITE_DISK_MAGIC;
+ /* We're ready to write a header immediately. */
+ a->archive.state = ARCHIVE_STATE_HEADER;
+ a->archive.vtable = archive_write_disk_vtable();
+ a->lookup_uid = trivial_lookup_uid;
+ a->lookup_gid = trivial_lookup_gid;
+ a->start_time = time(NULL);
+#ifdef HAVE_GETEUID
+ a->user_uid = geteuid();
+#endif /* HAVE_GETEUID */
+ if (archive_string_ensure(&a->path_safe, 512) == NULL) {
+ free(a);
+ return (NULL);
+ }
+ return (&a->archive);
+}
+
+
+/*
+ * If pathname is longer than PATH_MAX, chdir to a suitable
+ * intermediate dir and edit the path down to a shorter suffix. Note
+ * that this routine never returns an error; if the chdir() attempt
+ * fails for any reason, we just go ahead with the long pathname. The
+ * object creation is likely to fail, but any error will get handled
+ * at that time.
+ */
+#ifdef HAVE_FCHDIR
+static void
+edit_deep_directories(struct archive_write_disk *a)
+{
+ int ret;
+ char *tail = a->name;
+
+ a->restore_pwd = -1;
+
+ /* If path is short, avoid the open() below. */
+ if (strlen(tail) <= PATH_MAX)
+ return;
+
+ /* Try to record our starting dir. */
+ a->restore_pwd = open(".", O_RDONLY | O_BINARY);
+ if (a->restore_pwd < 0)
+ return;
+
+ /* As long as the path is too long... */
+ while (strlen(tail) > PATH_MAX) {
+ /* Locate a dir prefix shorter than PATH_MAX. */
+ tail += PATH_MAX - 8;
+ while (tail > a->name && *tail != '/')
+ tail--;
+ /* Exit if we find a too-long path component. */
+ if (tail <= a->name)
+ return;
+ /* Create the intermediate dir and chdir to it. */
+ *tail = '\0'; /* Terminate dir portion */
+ ret = create_dir(a, a->name);
+ if (ret == ARCHIVE_OK && chdir(a->name) != 0)
+ ret = ARCHIVE_FAILED;
+ *tail = '/'; /* Restore the / we removed. */
+ if (ret != ARCHIVE_OK)
+ return;
+ tail++;
+ /* The chdir() succeeded; we've now shortened the path. */
+ a->name = tail;
+ }
+ return;
+}
+#endif
+
+/*
+ * The main restore function.
+ */
+static int
+restore_entry(struct archive_write_disk *a)
+{
+ int ret = ARCHIVE_OK, en;
+
+ if (a->flags & ARCHIVE_EXTRACT_UNLINK && !S_ISDIR(a->mode)) {
+ /*
+ * TODO: Fix this. Apparently, there are platforms
+ * that still allow root to hose the entire filesystem
+ * by unlinking a dir. The S_ISDIR() test above
+ * prevents us from using unlink() here if the new
+ * object is a dir, but that doesn't mean the old
+ * object isn't a dir.
+ */
+ if (unlink(a->name) == 0) {
+ /* We removed it, reset cached stat. */
+ a->pst = NULL;
+ } else if (errno == ENOENT) {
+ /* File didn't exist, that's just as good. */
+ } else if (rmdir(a->name) == 0) {
+ /* It was a dir, but now it's gone. */
+ a->pst = NULL;
+ } else {
+ /* We tried, but couldn't get rid of it. */
+ archive_set_error(&a->archive, errno,
+ "Could not unlink");
+ return(ARCHIVE_FAILED);
+ }
+ }
+
+ /* Try creating it first; if this fails, we'll try to recover. */
+ en = create_filesystem_object(a);
+
+ if ((en == ENOTDIR || en == ENOENT)
+ && !(a->flags & ARCHIVE_EXTRACT_NO_AUTODIR)) {
+ /* If the parent dir doesn't exist, try creating it. */
+ create_parent_dir(a, a->name);
+ /* Now try to create the object again. */
+ en = create_filesystem_object(a);
+ }
+
+ if ((en == EISDIR || en == EEXIST)
+ && (a->flags & ARCHIVE_EXTRACT_NO_OVERWRITE)) {
+ /* If we're not overwriting, we're done. */
+ archive_set_error(&a->archive, en, "Already exists");
+ return (ARCHIVE_FAILED);
+ }
+
+ /*
+ * Some platforms return EISDIR if you call
+ * open(O_WRONLY | O_EXCL | O_CREAT) on a directory, some
+ * return EEXIST. POSIX is ambiguous, requiring EISDIR
+ * for open(O_WRONLY) on a dir and EEXIST for open(O_EXCL | O_CREAT)
+ * on an existing item.
+ */
+ if (en == EISDIR) {
+ /* A dir is in the way of a non-dir, rmdir it. */
+ if (rmdir(a->name) != 0) {
+ archive_set_error(&a->archive, errno,
+ "Can't remove already-existing dir");
+ return (ARCHIVE_FAILED);
+ }
+ a->pst = NULL;
+ /* Try again. */
+ en = create_filesystem_object(a);
+ } else if (en == EEXIST) {
+ /*
+ * We know something is in the way, but we don't know what;
+ * we need to find out before we go any further.
+ */
+ int r = 0;
+ /*
+ * The SECURE_SYMLINK logic has already removed a
+ * symlink to a dir if the client wants that. So
+ * follow the symlink if we're creating a dir.
+ */
+ if (S_ISDIR(a->mode))
+ r = stat(a->name, &a->st);
+ /*
+ * If it's not a dir (or it's a broken symlink),
+ * then don't follow it.
+ */
+ if (r != 0 || !S_ISDIR(a->mode))
+ r = lstat(a->name, &a->st);
+ if (r != 0) {
+ archive_set_error(&a->archive, errno,
+ "Can't stat existing object");
+ return (ARCHIVE_FAILED);
+ }
+
+ /*
+ * NO_OVERWRITE_NEWER doesn't apply to directories.
+ */
+ if ((a->flags & ARCHIVE_EXTRACT_NO_OVERWRITE_NEWER)
+ && !S_ISDIR(a->st.st_mode)) {
+ if (!older(&(a->st), a->entry)) {
+ archive_set_error(&a->archive, 0,
+ "File on disk is not older; skipping.");
+ return (ARCHIVE_FAILED);
+ }
+ }
+
+ /* If it's our archive, we're done. */
+ if (a->skip_file_dev > 0 &&
+ a->skip_file_ino > 0 &&
+ a->st.st_dev == a->skip_file_dev &&
+ a->st.st_ino == a->skip_file_ino) {
+ archive_set_error(&a->archive, 0, "Refusing to overwrite archive");
+ return (ARCHIVE_FAILED);
+ }
+
+ if (!S_ISDIR(a->st.st_mode)) {
+ /* A non-dir is in the way, unlink it. */
+ if (unlink(a->name) != 0) {
+ archive_set_error(&a->archive, errno,
+ "Can't unlink already-existing object");
+ return (ARCHIVE_FAILED);
+ }
+ a->pst = NULL;
+ /* Try again. */
+ en = create_filesystem_object(a);
+ } else if (!S_ISDIR(a->mode)) {
+ /* A dir is in the way of a non-dir, rmdir it. */
+ if (rmdir(a->name) != 0) {
+ archive_set_error(&a->archive, errno,
+ "Can't remove already-existing dir");
+ return (ARCHIVE_FAILED);
+ }
+ /* Try again. */
+ en = create_filesystem_object(a);
+ } else {
+ /*
+ * There's a dir in the way of a dir. Don't
+ * waste time with rmdir()/mkdir(), just fix
+ * up the permissions on the existing dir.
+ * Note that we don't change perms on existing
+ * dirs unless _EXTRACT_PERM is specified.
+ */
+ if ((a->mode != a->st.st_mode)
+ && (a->todo & TODO_MODE_FORCE))
+ a->deferred |= (a->todo & TODO_MODE);
+ /* Ownership doesn't need deferred fixup. */
+ en = 0; /* Forget the EEXIST. */
+ }
+ }
+
+ if (en) {
+ /* Everything failed; give up here. */
+ archive_set_error(&a->archive, en, "Can't create '%s'",
+ a->name);
+ return (ARCHIVE_FAILED);
+ }
+
+ a->pst = NULL; /* Cached stat data no longer valid. */
+ return (ret);
+}
+
+/*
+ * Returns 0 if creation succeeds, or else returns errno value from
+ * the failed system call. Note: This function should only ever perform
+ * a single system call.
+ */
+static int
+create_filesystem_object(struct archive_write_disk *a)
+{
+ /* Create the entry. */
+ const char *linkname;
+ mode_t final_mode, mode;
+ int r;
+
+ /* We identify hard/symlinks according to the link names. */
+ /* Since link(2) and symlink(2) don't handle modes, we're done here. */
+ linkname = archive_entry_hardlink(a->entry);
+ if (linkname != NULL) {
+#if !HAVE_LINK
+ return (EPERM);
+#else
+ r = link(linkname, a->name) ? errno : 0;
+ /*
+ * New cpio and pax formats allow hardlink entries
+ * to carry data, so we may have to open the file
+ * for hardlink entries.
+ *
+ * If the hardlink was successfully created and
+ * the archive doesn't have carry data for it,
+ * consider it to be non-authoritive for meta data.
+ * This is consistent with GNU tar and BSD pax.
+ * If the hardlink does carry data, let the last
+ * archive entry decide ownership.
+ */
+ if (r == 0 && a->filesize <= 0) {
+ a->todo = 0;
+ a->deferred = 0;
+ } if (r == 0 && a->filesize > 0) {
+ a->fd = open(a->name, O_WRONLY | O_TRUNC | O_BINARY);
+ if (a->fd < 0)
+ r = errno;
+ }
+ return (r);
+#endif
+ }
+ linkname = archive_entry_symlink(a->entry);
+ if (linkname != NULL) {
+#if HAVE_SYMLINK
+ return symlink(linkname, a->name) ? errno : 0;
+#else
+ return (EPERM);
+#endif
+ }
+
+ /*
+ * The remaining system calls all set permissions, so let's
+ * try to take advantage of that to avoid an extra chmod()
+ * call. (Recall that umask is set to zero right now!)
+ */
+
+ /* Mode we want for the final restored object (w/o file type bits). */
+ final_mode = a->mode & 07777;
+ /*
+ * The mode that will actually be restored in this step. Note
+ * that SUID, SGID, etc, require additional work to ensure
+ * security, so we never restore them at this point.
+ */
+ mode = final_mode & 0777;
+
+ switch (a->mode & AE_IFMT) {
+ default:
+ /* POSIX requires that we fall through here. */
+ /* FALLTHROUGH */
+ case AE_IFREG:
+ a->fd = open(a->name,
+ O_WRONLY | O_CREAT | O_EXCL | O_BINARY, mode);
+ r = (a->fd < 0);
+ break;
+ case AE_IFCHR:
+#ifdef HAVE_MKNOD
+ /* Note: we use AE_IFCHR for the case label, and
+ * S_IFCHR for the mknod() call. This is correct. */
+ r = mknod(a->name, mode | S_IFCHR,
+ archive_entry_rdev(a->entry));
+ break;
+#else
+ /* TODO: Find a better way to warn about our inability
+ * to restore a char device node. */
+ return (EINVAL);
+#endif /* HAVE_MKNOD */
+ case AE_IFBLK:
+#ifdef HAVE_MKNOD
+ r = mknod(a->name, mode | S_IFBLK,
+ archive_entry_rdev(a->entry));
+ break;
+#else
+ /* TODO: Find a better way to warn about our inability
+ * to restore a block device node. */
+ return (EINVAL);
+#endif /* HAVE_MKNOD */
+ case AE_IFDIR:
+ mode = (mode | MINIMUM_DIR_MODE) & MAXIMUM_DIR_MODE;
+ r = mkdir(a->name, mode);
+ if (r == 0) {
+ /* Defer setting dir times. */
+ a->deferred |= (a->todo & TODO_TIMES);
+ a->todo &= ~TODO_TIMES;
+ /* Never use an immediate chmod(). */
+ /* We can't avoid the chmod() entirely if EXTRACT_PERM
+ * because of SysV SGID inheritance. */
+ if ((mode != final_mode)
+ || (a->flags & ARCHIVE_EXTRACT_PERM))
+ a->deferred |= (a->todo & TODO_MODE);
+ a->todo &= ~TODO_MODE;
+ }
+ break;
+ case AE_IFIFO:
+#ifdef HAVE_MKFIFO
+ r = mkfifo(a->name, mode);
+ break;
+#else
+ /* TODO: Find a better way to warn about our inability
+ * to restore a fifo. */
+ return (EINVAL);
+#endif /* HAVE_MKFIFO */
+ }
+
+ /* All the system calls above set errno on failure. */
+ if (r)
+ return (errno);
+
+ /* If we managed to set the final mode, we've avoided a chmod(). */
+ if (mode == final_mode)
+ a->todo &= ~TODO_MODE;
+ return (0);
+}
+
+/*
+ * Cleanup function for archive_extract. Mostly, this involves processing
+ * the fixup list, which is used to address a number of problems:
+ * * Dir permissions might prevent us from restoring a file in that
+ * dir, so we restore the dir with minimum 0700 permissions first,
+ * then correct the mode at the end.
+ * * Similarly, the act of restoring a file touches the directory
+ * and changes the timestamp on the dir, so we have to touch-up dir
+ * timestamps at the end as well.
+ * * Some file flags can interfere with the restore by, for example,
+ * preventing the creation of hardlinks to those files.
+ *
+ * Note that tar/cpio do not require that archives be in a particular
+ * order; there is no way to know when the last file has been restored
+ * within a directory, so there's no way to optimize the memory usage
+ * here by fixing up the directory any earlier than the
+ * end-of-archive.
+ *
+ * XXX TODO: Directory ACLs should be restored here, for the same
+ * reason we set directory perms here. XXX
+ */
+static int
+_archive_write_close(struct archive *_a)
+{
+ struct archive_write_disk *a = (struct archive_write_disk *)_a;
+ struct fixup_entry *next, *p;
+ int ret;
+
+ __archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC,
+ ARCHIVE_STATE_HEADER | ARCHIVE_STATE_DATA,
+ "archive_write_disk_close");
+ ret = _archive_write_finish_entry(&a->archive);
+
+ /* Sort dir list so directories are fixed up in depth-first order. */
+ p = sort_dir_list(a->fixup_list);
+
+ while (p != NULL) {
+ a->pst = NULL; /* Mark stat cache as out-of-date. */
+ if (p->fixup & TODO_TIMES) {
+#ifdef HAVE_UTIMES
+ /* {f,l,}utimes() are preferred, when available. */
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ struct __timeval times[2];
+#else
+ struct timeval times[2];
+#endif
+ times[0].tv_sec = p->atime;
+ times[0].tv_usec = p->atime_nanos / 1000;
+#ifdef HAVE_STRUCT_STAT_ST_BIRTHTIME
+ /* if it's valid and not mtime, push the birthtime first */
+ if (((times[1].tv_sec = p->birthtime) < p->mtime) &&
+ (p->birthtime > 0))
+ {
+ times[1].tv_usec = p->birthtime_nanos / 1000;
+ utimes(p->name, times);
+ }
+#endif
+ times[1].tv_sec = p->mtime;
+ times[1].tv_usec = p->mtime_nanos / 1000;
+#ifdef HAVE_LUTIMES
+ lutimes(p->name, times);
+#else
+ utimes(p->name, times);
+#endif
+#else
+ /* utime() is more portable, but less precise. */
+ struct utimbuf times;
+ times.modtime = p->mtime;
+ times.actime = p->atime;
+
+ utime(p->name, &times);
+#endif
+ }
+ if (p->fixup & TODO_MODE_BASE)
+ chmod(p->name, p->mode);
+
+ if (p->fixup & TODO_FFLAGS)
+ set_fflags_platform(a, -1, p->name,
+ p->mode, p->fflags_set, 0);
+
+ next = p->next;
+ free(p->name);
+ free(p);
+ p = next;
+ }
+ a->fixup_list = NULL;
+ return (ret);
+}
+
+static int
+_archive_write_free(struct archive *_a)
+{
+ struct archive_write_disk *a = (struct archive_write_disk *)_a;
+ int ret;
+ ret = _archive_write_close(&a->archive);
+ if (a->cleanup_gid != NULL && a->lookup_gid_data != NULL)
+ (a->cleanup_gid)(a->lookup_gid_data);
+ if (a->cleanup_uid != NULL && a->lookup_uid_data != NULL)
+ (a->cleanup_uid)(a->lookup_uid_data);
+ if (a->entry)
+ archive_entry_free(a->entry);
+ archive_string_free(&a->_name_data);
+ archive_string_free(&a->archive.error_string);
+ archive_string_free(&a->path_safe);
+ free(a);
+ return (ret);
+}
+
+/*
+ * Simple O(n log n) merge sort to order the fixup list. In
+ * particular, we want to restore dir timestamps depth-first.
+ */
+static struct fixup_entry *
+sort_dir_list(struct fixup_entry *p)
+{
+ struct fixup_entry *a, *b, *t;
+
+ if (p == NULL)
+ return (NULL);
+ /* A one-item list is already sorted. */
+ if (p->next == NULL)
+ return (p);
+
+ /* Step 1: split the list. */
+ t = p;
+ a = p->next->next;
+ while (a != NULL) {
+ /* Step a twice, t once. */
+ a = a->next;
+ if (a != NULL)
+ a = a->next;
+ t = t->next;
+ }
+ /* Now, t is at the mid-point, so break the list here. */
+ b = t->next;
+ t->next = NULL;
+ a = p;
+
+ /* Step 2: Recursively sort the two sub-lists. */
+ a = sort_dir_list(a);
+ b = sort_dir_list(b);
+
+ /* Step 3: Merge the returned lists. */
+ /* Pick the first element for the merged list. */
+ if (strcmp(a->name, b->name) > 0) {
+ t = p = a;
+ a = a->next;
+ } else {
+ t = p = b;
+ b = b->next;
+ }
+
+ /* Always put the later element on the list first. */
+ while (a != NULL && b != NULL) {
+ if (strcmp(a->name, b->name) > 0) {
+ t->next = a;
+ a = a->next;
+ } else {
+ t->next = b;
+ b = b->next;
+ }
+ t = t->next;
+ }
+
+ /* Only one list is non-empty, so just splice it on. */
+ if (a != NULL)
+ t->next = a;
+ if (b != NULL)
+ t->next = b;
+
+ return (p);
+}
+
+/*
+ * Returns a new, initialized fixup entry.
+ *
+ * TODO: Reduce the memory requirements for this list by using a tree
+ * structure rather than a simple list of names.
+ */
+static struct fixup_entry *
+new_fixup(struct archive_write_disk *a, const char *pathname)
+{
+ struct fixup_entry *fe;
+
+ fe = (struct fixup_entry *)malloc(sizeof(struct fixup_entry));
+ if (fe == NULL)
+ return (NULL);
+ fe->next = a->fixup_list;
+ a->fixup_list = fe;
+ fe->fixup = 0;
+ fe->name = strdup(pathname);
+ return (fe);
+}
+
+/*
+ * Returns a fixup structure for the current entry.
+ */
+static struct fixup_entry *
+current_fixup(struct archive_write_disk *a, const char *pathname)
+{
+ if (a->current_fixup == NULL)
+ a->current_fixup = new_fixup(a, pathname);
+ return (a->current_fixup);
+}
+
+/* TODO: Make this work. */
+/*
+ * TODO: The deep-directory support bypasses this; disable deep directory
+ * support if we're doing symlink checks.
+ */
+/*
+ * TODO: Someday, integrate this with the deep dir support; they both
+ * scan the path and both can be optimized by comparing against other
+ * recent paths.
+ */
+/* TODO: Extend this to support symlinks on Windows Vista and later. */
+static int
+check_symlinks(struct archive_write_disk *a)
+{
+#if !defined(HAVE_LSTAT)
+ /* Platform doesn't have lstat, so we can't look for symlinks. */
+ (void)a; /* UNUSED */
+ return (ARCHIVE_OK);
+#else
+ char *pn, *p;
+ char c;
+ int r;
+ struct stat st;
+
+ /*
+ * Guard against symlink tricks. Reject any archive entry whose
+ * destination would be altered by a symlink.
+ */
+ /* Whatever we checked last time doesn't need to be re-checked. */
+ pn = a->name;
+ p = a->path_safe.s;
+ while ((*pn != '\0') && (*p == *pn))
+ ++p, ++pn;
+ c = pn[0];
+ /* Keep going until we've checked the entire name. */
+ while (pn[0] != '\0' && (pn[0] != '/' || pn[1] != '\0')) {
+ /* Skip the next path element. */
+ while (*pn != '\0' && *pn != '/')
+ ++pn;
+ c = pn[0];
+ pn[0] = '\0';
+ /* Check that we haven't hit a symlink. */
+ r = lstat(a->name, &st);
+ if (r != 0) {
+ /* We've hit a dir that doesn't exist; stop now. */
+ if (errno == ENOENT)
+ break;
+ } else if (S_ISLNK(st.st_mode)) {
+ if (c == '\0') {
+ /*
+ * Last element is symlink; remove it
+ * so we can overwrite it with the
+ * item being extracted.
+ */
+ if (unlink(a->name)) {
+ archive_set_error(&a->archive, errno,
+ "Could not remove symlink %s",
+ a->name);
+ pn[0] = c;
+ return (ARCHIVE_FAILED);
+ }
+ a->pst = NULL;
+ /*
+ * Even if we did remove it, a warning
+ * is in order. The warning is silly,
+ * though, if we're just replacing one
+ * symlink with another symlink.
+ */
+ if (!S_ISLNK(a->mode)) {
+ archive_set_error(&a->archive, 0,
+ "Removing symlink %s",
+ a->name);
+ }
+ /* Symlink gone. No more problem! */
+ pn[0] = c;
+ return (0);
+ } else if (a->flags & ARCHIVE_EXTRACT_UNLINK) {
+ /* User asked us to remove problems. */
+ if (unlink(a->name) != 0) {
+ archive_set_error(&a->archive, 0,
+ "Cannot remove intervening symlink %s",
+ a->name);
+ pn[0] = c;
+ return (ARCHIVE_FAILED);
+ }
+ a->pst = NULL;
+ } else {
+ archive_set_error(&a->archive, 0,
+ "Cannot extract through symlink %s",
+ a->name);
+ pn[0] = c;
+ return (ARCHIVE_FAILED);
+ }
+ }
+ }
+ pn[0] = c;
+ /* We've checked and/or cleaned the whole path, so remember it. */
+ archive_strcpy(&a->path_safe, a->name);
+ return (ARCHIVE_OK);
+#endif
+}
+
+#if defined(_WIN32) || defined(__CYGWIN__)
+static int
+guidword(const char *p, int n)
+{
+ int i;
+
+ for (i = 0; i < n; i++) {
+ if ((*p >= '0' && *p <= '9') ||
+ (*p >= 'a' && *p <= 'f') ||
+ (*p >= 'A' && *p <= 'F'))
+ p++;
+ else
+ return (-1);
+ }
+ return (0);
+}
+
+/*
+ * 1. Convert a path separator from '\' to '/' .
+ * We shouldn't check multi-byte character directly because some
+ * character-set have been using the '\' character for a part of
+ * its multibyte character code.
+ * 2. Replace unusable characters in Windows with underscore('_').
+ * See also : http://msdn.microsoft.com/en-us/library/aa365247.aspx
+ */
+static int
+cleanup_pathname_win(struct archive_write_disk *a)
+{
+ wchar_t wc;
+ char *p;
+ size_t alen, l;
+
+ p = a->name;
+ /* Skip leading "\\.\" or "\\?\" or "\\?\UNC\" or
+ * "\\?\Volume{GUID}\"
+ * (absolute path prefixes used by Windows API) */
+ if ((p[0] == '\\' || p[0] == '/') && (p[1] == '\\' || p[1] == '/' ) &&
+ (p[2] == '.' || p[2] == '?') && (p[3] == '\\' || p[3] == '/'))
+ {
+ /* A path begin with "\\?\UNC\" */
+ if (p[2] == '?' &&
+ (p[4] == 'U' || p[4] == 'u') &&
+ (p[5] == 'N' || p[5] == 'n') &&
+ (p[6] == 'C' || p[6] == 'c') &&
+ (p[7] == '\\' || p[7] == '/'))
+ p += 8;
+ /* A path begin with "\\?\Volume{GUID}\" */
+ else if (p[2] == '?' &&
+ (p[4] == 'V' || p[4] == 'v') &&
+ (p[5] == 'O' || p[5] == 'o') &&
+ (p[6] == 'L' || p[6] == 'l') &&
+ (p[7] == 'U' || p[7] == 'u') &&
+ (p[8] == 'M' || p[8] == 'm') &&
+ (p[9] == 'E' || p[9] == 'e') &&
+ p[10] == '{') {
+ if (guidword(p+11, 8) == 0 && p[19] == '-' &&
+ guidword(p+20, 4) == 0 && p[24] == '-' &&
+ guidword(p+25, 4) == 0 && p[29] == '-' &&
+ guidword(p+30, 4) == 0 && p[34] == '-' &&
+ guidword(p+35, 12) == 0 && p[47] == '}' &&
+ (p[48] == '\\' || p[48] == '/'))
+ p += 49;
+ else
+ p += 4;
+ /* A path begin with "\\.\PhysicalDriveX" */
+ } else if (p[2] == '.' &&
+ (p[4] == 'P' || p[4] == 'p') &&
+ (p[5] == 'H' || p[5] == 'h') &&
+ (p[6] == 'Y' || p[6] == 'y') &&
+ (p[7] == 'S' || p[7] == 's') &&
+ (p[8] == 'I' || p[8] == 'i') &&
+ (p[9] == 'C' || p[9] == 'c') &&
+ (p[9] == 'A' || p[9] == 'a') &&
+ (p[9] == 'L' || p[9] == 'l') &&
+ (p[9] == 'D' || p[9] == 'd') &&
+ (p[9] == 'R' || p[9] == 'r') &&
+ (p[9] == 'I' || p[9] == 'i') &&
+ (p[9] == 'V' || p[9] == 'v') &&
+ (p[9] == 'E' || p[9] == 'e') &&
+ (p[10] >= '0' && p[10] <= '9') &&
+ p[11] == '\0') {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "Path is a physical drive name");
+ return (ARCHIVE_FAILED);
+ } else
+ p += 4;
+ }
+
+ /* Skip leading drive letter from archives created
+ * on Windows. */
+ if (((p[0] >= 'a' && p[0] <= 'z') ||
+ (p[0] >= 'A' && p[0] <= 'Z')) &&
+ p[1] == ':') {
+ if (p[2] == '\0') {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "Path is a drive name");
+ return (ARCHIVE_FAILED);
+ }
+ if (p[2] == '\\' || p[2] == '/')
+ p += 3;
+ }
+
+ for (; *p != '\0'; p++) {
+ /* Rewrite the path name if its character is a unusable. */
+ if (*p == ':' || *p == '*' || *p == '?' || *p == '"' ||
+ *p == '<' || *p == '>' || *p == '|')
+ *p = '_';
+ }
+ alen = p - a->name;
+ if (alen == 0 || strchr(a->name, '\\') == NULL)
+ return (ARCHIVE_OK);
+ /*
+ * Convert path separator.
+ */
+ p = a->name;
+ while (*p != '\0' && alen) {
+ l = mbtowc(&wc, p, alen);
+ if (l == -1) {
+ while (*p != '\0') {
+ if (*p == '\\')
+ *p = '/';
+ ++p;
+ }
+ break;
+ }
+ if (l == 1 && wc == L'\\')
+ *p = '/';
+ p += l;
+ alen -= l;
+ }
+ return (ARCHIVE_OK);
+}
+#endif
+
+/*
+ * Canonicalize the pathname. In particular, this strips duplicate
+ * '/' characters, '.' elements, and trailing '/'. It also raises an
+ * error for an empty path, a trailing '..' or (if _SECURE_NODOTDOT is
+ * set) any '..' in the path.
+ */
+static int
+cleanup_pathname(struct archive_write_disk *a)
+{
+ char *dest, *src;
+ char separator = '\0';
+
+ dest = src = a->name;
+ if (*src == '\0') {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "Invalid empty pathname");
+ return (ARCHIVE_FAILED);
+ }
+
+#if defined(_WIN32) || defined(__CYGWIN__)
+ if (cleanup_pathname_win(a) != ARCHIVE_OK)
+ return (ARCHIVE_FAILED);
+#endif
+ /* Skip leading '/'. */
+ if (*src == '/')
+ separator = *src++;
+
+ /* Scan the pathname one element at a time. */
+ for (;;) {
+ /* src points to first char after '/' */
+ if (src[0] == '\0') {
+ break;
+ } else if (src[0] == '/') {
+ /* Found '//', ignore second one. */
+ src++;
+ continue;
+ } else if (src[0] == '.') {
+ if (src[1] == '\0') {
+ /* Ignore trailing '.' */
+ break;
+ } else if (src[1] == '/') {
+ /* Skip './'. */
+ src += 2;
+ continue;
+ } else if (src[1] == '.') {
+ if (src[2] == '/' || src[2] == '\0') {
+ /* Conditionally warn about '..' */
+ if (a->flags & ARCHIVE_EXTRACT_SECURE_NODOTDOT) {
+ archive_set_error(&a->archive,
+ ARCHIVE_ERRNO_MISC,
+ "Path contains '..'");
+ return (ARCHIVE_FAILED);
+ }
+ }
+ /*
+ * Note: Under no circumstances do we
+ * remove '..' elements. In
+ * particular, restoring
+ * '/foo/../bar/' should create the
+ * 'foo' dir as a side-effect.
+ */
+ }
+ }
+
+ /* Copy current element, including leading '/'. */
+ if (separator)
+ *dest++ = '/';
+ while (*src != '\0' && *src != '/') {
+ *dest++ = *src++;
+ }
+
+ if (*src == '\0')
+ break;
+
+ /* Skip '/' separator. */
+ separator = *src++;
+ }
+ /*
+ * We've just copied zero or more path elements, not including the
+ * final '/'.
+ */
+ if (dest == a->name) {
+ /*
+ * Nothing got copied. The path must have been something
+ * like '.' or '/' or './' or '/././././/./'.
+ */
+ if (separator)
+ *dest++ = '/';
+ else
+ *dest++ = '.';
+ }
+ /* Terminate the result. */
+ *dest = '\0';
+ return (ARCHIVE_OK);
+}
+
+/*
+ * Create the parent directory of the specified path, assuming path
+ * is already in mutable storage.
+ */
+static int
+create_parent_dir(struct archive_write_disk *a, char *path)
+{
+ char *slash;
+ int r;
+
+ /* Remove tail element to obtain parent name. */
+ slash = strrchr(path, '/');
+ if (slash == NULL)
+ return (ARCHIVE_OK);
+ *slash = '\0';
+ r = create_dir(a, path);
+ *slash = '/';
+ return (r);
+}
+
+/*
+ * Create the specified dir, recursing to create parents as necessary.
+ *
+ * Returns ARCHIVE_OK if the path exists when we're done here.
+ * Otherwise, returns ARCHIVE_FAILED.
+ * Assumes path is in mutable storage; path is unchanged on exit.
+ */
+static int
+create_dir(struct archive_write_disk *a, char *path)
+{
+ struct stat st;
+ struct fixup_entry *le;
+ char *slash, *base;
+ mode_t mode_final, mode;
+ int r;
+
+ /* Check for special names and just skip them. */
+ slash = strrchr(path, '/');
+ if (slash == NULL)
+ base = path;
+ else
+ base = slash + 1;
+
+ if (base[0] == '\0' ||
+ (base[0] == '.' && base[1] == '\0') ||
+ (base[0] == '.' && base[1] == '.' && base[2] == '\0')) {
+ /* Don't bother trying to create null path, '.', or '..'. */
+ if (slash != NULL) {
+ *slash = '\0';
+ r = create_dir(a, path);
+ *slash = '/';
+ return (r);
+ }
+ return (ARCHIVE_OK);
+ }
+
+ /*
+ * Yes, this should be stat() and not lstat(). Using lstat()
+ * here loses the ability to extract through symlinks. Also note
+ * that this should not use the a->st cache.
+ */
+ if (stat(path, &st) == 0) {
+ if (S_ISDIR(st.st_mode))
+ return (ARCHIVE_OK);
+ if ((a->flags & ARCHIVE_EXTRACT_NO_OVERWRITE)) {
+ archive_set_error(&a->archive, EEXIST,
+ "Can't create directory '%s'", path);
+ return (ARCHIVE_FAILED);
+ }
+ if (unlink(path) != 0) {
+ archive_set_error(&a->archive, errno,
+ "Can't create directory '%s': "
+ "Conflicting file cannot be removed", path);
+ return (ARCHIVE_FAILED);
+ }
+ } else if (errno != ENOENT && errno != ENOTDIR) {
+ /* Stat failed? */
+ archive_set_error(&a->archive, errno, "Can't test directory '%s'", path);
+ return (ARCHIVE_FAILED);
+ } else if (slash != NULL) {
+ *slash = '\0';
+ r = create_dir(a, path);
+ *slash = '/';
+ if (r != ARCHIVE_OK)
+ return (r);
+ }
+
+ /*
+ * Mode we want for the final restored directory. Per POSIX,
+ * implicitly-created dirs must be created obeying the umask.
+ * There's no mention whether this is different for privileged
+ * restores (which the rest of this code handles by pretending
+ * umask=0). I've chosen here to always obey the user's umask for
+ * implicit dirs, even if _EXTRACT_PERM was specified.
+ */
+ mode_final = DEFAULT_DIR_MODE & ~a->user_umask;
+ /* Mode we want on disk during the restore process. */
+ mode = mode_final;
+ mode |= MINIMUM_DIR_MODE;
+ mode &= MAXIMUM_DIR_MODE;
+ if (mkdir(path, mode) == 0) {
+ if (mode != mode_final) {
+ le = new_fixup(a, path);
+ le->fixup |=TODO_MODE_BASE;
+ le->mode = mode_final;
+ }
+ return (ARCHIVE_OK);
+ }
+
+ /*
+ * Without the following check, a/b/../b/c/d fails at the
+ * second visit to 'b', so 'd' can't be created. Note that we
+ * don't add it to the fixup list here, as it's already been
+ * added.
+ */
+ if (stat(path, &st) == 0 && S_ISDIR(st.st_mode))
+ return (ARCHIVE_OK);
+
+ archive_set_error(&a->archive, errno, "Failed to create dir '%s'",
+ path);
+ return (ARCHIVE_FAILED);
+}
+
+/*
+ * Note: Although we can skip setting the user id if the desired user
+ * id matches the current user, we cannot skip setting the group, as
+ * many systems set the gid based on the containing directory. So
+ * we have to perform a chown syscall if we want to set the SGID
+ * bit. (The alternative is to stat() and then possibly chown(); it's
+ * more efficient to skip the stat() and just always chown().) Note
+ * that a successful chown() here clears the TODO_SGID_CHECK bit, which
+ * allows set_mode to skip the stat() check for the GID.
+ */
+static int
+set_ownership(struct archive_write_disk *a)
+{
+#ifndef __CYGWIN__
+/* unfortunately, on win32 there is no 'root' user with uid 0,
+ so we just have to try the chown and see if it works */
+
+ /* If we know we can't change it, don't bother trying. */
+ if (a->user_uid != 0 && a->user_uid != a->uid) {
+ archive_set_error(&a->archive, errno,
+ "Can't set UID=%d", a->uid);
+ return (ARCHIVE_WARN);
+ }
+#endif
+
+#ifdef HAVE_FCHOWN
+ /* If we have an fd, we can avoid a race. */
+ if (a->fd >= 0 && fchown(a->fd, a->uid, a->gid) == 0) {
+ /* We've set owner and know uid/gid are correct. */
+ a->todo &= ~(TODO_OWNER | TODO_SGID_CHECK | TODO_SUID_CHECK);
+ return (ARCHIVE_OK);
+ }
+#endif
+
+ /* We prefer lchown() but will use chown() if that's all we have. */
+ /* Of course, if we have neither, this will always fail. */
+#ifdef HAVE_LCHOWN
+ if (lchown(a->name, a->uid, a->gid) == 0) {
+ /* We've set owner and know uid/gid are correct. */
+ a->todo &= ~(TODO_OWNER | TODO_SGID_CHECK | TODO_SUID_CHECK);
+ return (ARCHIVE_OK);
+ }
+#elif HAVE_CHOWN
+ if (!S_ISLNK(a->mode) && chown(a->name, a->uid, a->gid) == 0) {
+ /* We've set owner and know uid/gid are correct. */
+ a->todo &= ~(TODO_OWNER | TODO_SGID_CHECK | TODO_SUID_CHECK);
+ return (ARCHIVE_OK);
+ }
+#endif
+
+ archive_set_error(&a->archive, errno,
+ "Can't set user=%d/group=%d for %s", a->uid, a->gid,
+ a->name);
+ return (ARCHIVE_WARN);
+}
+
+
+#if defined(HAVE_UTIMENSAT) && defined(HAVE_FUTIMENS)
+/*
+ * utimensat() and futimens() are defined in POSIX.1-2008. They provide ns
+ * resolution and setting times on fd and on symlinks, too.
+ */
+static int
+set_time(int fd, int mode, const char *name,
+ time_t atime, long atime_nsec,
+ time_t mtime, long mtime_nsec)
+{
+ struct timespec ts[2];
+ ts[0].tv_sec = atime;
+ ts[0].tv_nsec = atime_nsec;
+ ts[1].tv_sec = mtime;
+ ts[1].tv_nsec = mtime_nsec;
+ if (fd >= 0)
+ return futimens(fd, ts);
+ return utimensat(AT_FDCWD, name, ts, AT_SYMLINK_NOFOLLOW);
+}
+#elif HAVE_UTIMES
+/*
+ * The utimes()-family functions provide µs-resolution and
+ * a way to set time on an fd or a symlink. We prefer them
+ * when they're available and utimensat/futimens aren't there.
+ */
+static int
+set_time(int fd, int mode, const char *name,
+ time_t atime, long atime_nsec,
+ time_t mtime, long mtime_nsec)
+{
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ struct __timeval times[2];
+#else
+ struct timeval times[2];
+#endif
+
+ times[0].tv_sec = atime;
+ times[0].tv_usec = atime_nsec / 1000;
+ times[1].tv_sec = mtime;
+ times[1].tv_usec = mtime_nsec / 1000;
+
+#ifdef HAVE_FUTIMES
+ if (fd >= 0)
+ return (futimes(fd, times));
+#else
+ (void)fd; /* UNUSED */
+#endif
+#ifdef HAVE_LUTIMES
+ (void)mode; /* UNUSED */
+ return (lutimes(name, times));
+#else
+ if (S_ISLNK(mode))
+ return (0);
+ return (utimes(name, times));
+#endif
+}
+#elif defined(HAVE_UTIME)
+/*
+ * utime() is an older, more standard interface that we'll use
+ * if utimes() isn't available.
+ */
+static int
+set_time(int fd, int mode, const char *name,
+ time_t atime, long atime_nsec,
+ time_t mtime, long mtime_nsec)
+{
+ struct utimbuf times;
+ (void)fd; /* UNUSED */
+ (void)name; /* UNUSED */
+ (void)atime_nsec; /* UNUSED */
+ (void)mtime_nsec; /* UNUSED */
+ times.actime = atime;
+ times.modtime = mtime;
+ if (S_ISLNK(mode))
+ return (ARCHIVE_OK);
+ return (utime(name, &times));
+}
+#else
+static int
+set_time(int fd, int mode, const char *name,
+ time_t atime, long atime_nsec,
+ time_t mtime, long mtime_nsec)
+{
+ return (ARCHIVE_WARN);
+}
+#endif
+
+static int
+set_times(struct archive_write_disk *a)
+{
+ time_t atime = a->start_time, mtime = a->start_time;
+ long atime_nsec = 0, mtime_nsec = 0;
+
+ /* If no time was provided, we're done. */
+ if (!archive_entry_atime_is_set(a->entry)
+#if HAVE_STRUCT_STAT_ST_BIRTHTIME
+ && !archive_entry_birthtime_is_set(a->entry)
+#endif
+ && !archive_entry_mtime_is_set(a->entry))
+ return (ARCHIVE_OK);
+
+ /* If no atime was specified, use start time instead. */
+ /* In theory, it would be marginally more correct to use
+ * time(NULL) here, but that would cost us an extra syscall
+ * for little gain. */
+ if (archive_entry_atime_is_set(a->entry)) {
+ atime = archive_entry_atime(a->entry);
+ atime_nsec = archive_entry_atime_nsec(a->entry);
+ }
+
+ /*
+ * If you have struct stat.st_birthtime, we assume BSD birthtime
+ * semantics, in which {f,l,}utimes() updates birthtime to earliest
+ * mtime. So we set the time twice, first using the birthtime,
+ * then using the mtime.
+ */
+#if HAVE_STRUCT_STAT_ST_BIRTHTIME
+ /* If birthtime is set, flush that through to disk first. */
+ if (archive_entry_birthtime_is_set(a->entry))
+ if (set_time(a->fd, a->mode, a->name, atime, atime_nsec,
+ archive_entry_birthtime(a->entry),
+ archive_entry_birthtime_nsec(a->entry))) {
+ archive_set_error(&a->archive, errno,
+ "Can't update time for %s",
+ a->name);
+ return (ARCHIVE_WARN);
+ }
+#endif
+
+ if (archive_entry_mtime_is_set(a->entry)) {
+ mtime = archive_entry_mtime(a->entry);
+ mtime_nsec = archive_entry_mtime_nsec(a->entry);
+ }
+ if (set_time(a->fd, a->mode, a->name,
+ atime, atime_nsec, mtime, mtime_nsec)) {
+ archive_set_error(&a->archive, errno,
+ "Can't update time for %s",
+ a->name);
+ return (ARCHIVE_WARN);
+ }
+
+ /*
+ * Note: POSIX does not provide a portable way to restore ctime.
+ * (Apart from resetting the system clock, which is distasteful.)
+ * So, any restoration of ctime will necessarily be OS-specific.
+ */
+
+ return (ARCHIVE_OK);
+}
+
+static int
+set_mode(struct archive_write_disk *a, int mode)
+{
+ int r = ARCHIVE_OK;
+ mode &= 07777; /* Strip off file type bits. */
+
+ if (a->todo & TODO_SGID_CHECK) {
+ /*
+ * If we don't know the GID is right, we must stat()
+ * to verify it. We can't just check the GID of this
+ * process, since systems sometimes set GID from
+ * the enclosing dir or based on ACLs.
+ */
+ if ((r = _archive_write_disk_lazy_stat(a)) != ARCHIVE_OK)
+ return (r);
+ if (a->pst->st_gid != a->gid) {
+ mode &= ~ S_ISGID;
+#if !defined(_WIN32) || defined(__CYGWIN__)
+ if (a->flags & ARCHIVE_EXTRACT_OWNER) {
+ /*
+ * This is only an error if you
+ * requested owner restore. If you
+ * didn't, we'll try to restore
+ * sgid/suid, but won't consider it a
+ * problem if we can't.
+ */
+ archive_set_error(&a->archive, -1,
+ "Can't restore SGID bit");
+ r = ARCHIVE_WARN;
+ }
+#endif
+ }
+ /* While we're here, double-check the UID. */
+ if (a->pst->st_uid != a->uid
+ && (a->todo & TODO_SUID)) {
+ mode &= ~ S_ISUID;
+#if !defined(_WIN32) || defined(__CYGWIN__)
+ if (a->flags & ARCHIVE_EXTRACT_OWNER) {
+ archive_set_error(&a->archive, -1,
+ "Can't restore SUID bit");
+ r = ARCHIVE_WARN;
+ }
+#endif
+ }
+ a->todo &= ~TODO_SGID_CHECK;
+ a->todo &= ~TODO_SUID_CHECK;
+ } else if (a->todo & TODO_SUID_CHECK) {
+ /*
+ * If we don't know the UID is right, we can just check
+ * the user, since all systems set the file UID from
+ * the process UID.
+ */
+ if (a->user_uid != a->uid) {
+ mode &= ~ S_ISUID;
+#if !defined(_WIN32) || defined(__CYGWIN__)
+ if (a->flags & ARCHIVE_EXTRACT_OWNER) {
+ archive_set_error(&a->archive, -1,
+ "Can't make file SUID");
+ r = ARCHIVE_WARN;
+ }
+#endif
+ }
+ a->todo &= ~TODO_SUID_CHECK;
+ }
+
+ if (S_ISLNK(a->mode)) {
+#ifdef HAVE_LCHMOD
+ /*
+ * If this is a symlink, use lchmod(). If the
+ * platform doesn't support lchmod(), just skip it. A
+ * platform that doesn't provide a way to set
+ * permissions on symlinks probably ignores
+ * permissions on symlinks, so a failure here has no
+ * impact.
+ */
+ if (lchmod(a->name, mode) != 0) {
+ archive_set_error(&a->archive, errno,
+ "Can't set permissions to 0%o", (int)mode);
+ r = ARCHIVE_WARN;
+ }
+#endif
+ } else if (!S_ISDIR(a->mode)) {
+ /*
+ * If it's not a symlink and not a dir, then use
+ * fchmod() or chmod(), depending on whether we have
+ * an fd. Dirs get their perms set during the
+ * post-extract fixup, which is handled elsewhere.
+ */
+#ifdef HAVE_FCHMOD
+ if (a->fd >= 0) {
+ if (fchmod(a->fd, mode) != 0) {
+ archive_set_error(&a->archive, errno,
+ "Can't set permissions to 0%o", (int)mode);
+ r = ARCHIVE_WARN;
+ }
+ } else
+#endif
+ /* If this platform lacks fchmod(), then
+ * we'll just use chmod(). */
+ if (chmod(a->name, mode) != 0) {
+ archive_set_error(&a->archive, errno,
+ "Can't set permissions to 0%o", (int)mode);
+ r = ARCHIVE_WARN;
+ }
+ }
+ return (r);
+}
+
+static int
+set_fflags(struct archive_write_disk *a)
+{
+ struct fixup_entry *le;
+ unsigned long set, clear;
+ int r;
+ int critical_flags;
+ mode_t mode = archive_entry_mode(a->entry);
+
+ /*
+ * Make 'critical_flags' hold all file flags that can't be
+ * immediately restored. For example, on BSD systems,
+ * SF_IMMUTABLE prevents hardlinks from being created, so
+ * should not be set until after any hardlinks are created. To
+ * preserve some semblance of portability, this uses #ifdef
+ * extensively. Ugly, but it works.
+ *
+ * Yes, Virginia, this does create a security race. It's mitigated
+ * somewhat by the practice of creating dirs 0700 until the extract
+ * is done, but it would be nice if we could do more than that.
+ * People restoring critical file systems should be wary of
+ * other programs that might try to muck with files as they're
+ * being restored.
+ */
+ /* Hopefully, the compiler will optimize this mess into a constant. */
+ critical_flags = 0;
+#ifdef SF_IMMUTABLE
+ critical_flags |= SF_IMMUTABLE;
+#endif
+#ifdef UF_IMMUTABLE
+ critical_flags |= UF_IMMUTABLE;
+#endif
+#ifdef SF_APPEND
+ critical_flags |= SF_APPEND;
+#endif
+#ifdef UF_APPEND
+ critical_flags |= UF_APPEND;
+#endif
+#ifdef EXT2_APPEND_FL
+ critical_flags |= EXT2_APPEND_FL;
+#endif
+#ifdef EXT2_IMMUTABLE_FL
+ critical_flags |= EXT2_IMMUTABLE_FL;
+#endif
+
+ if (a->todo & TODO_FFLAGS) {
+ archive_entry_fflags(a->entry, &set, &clear);
+
+ /*
+ * The first test encourages the compiler to eliminate
+ * all of this if it's not necessary.
+ */
+ if ((critical_flags != 0) && (set & critical_flags)) {
+ le = current_fixup(a, a->name);
+ le->fixup |= TODO_FFLAGS;
+ le->fflags_set = set;
+ /* Store the mode if it's not already there. */
+ if ((le->fixup & TODO_MODE) == 0)
+ le->mode = mode;
+ } else {
+ r = set_fflags_platform(a, a->fd,
+ a->name, mode, set, clear);
+ if (r != ARCHIVE_OK)
+ return (r);
+ }
+ }
+ return (ARCHIVE_OK);
+}
+
+
+#if ( defined(HAVE_LCHFLAGS) || defined(HAVE_CHFLAGS) || defined(HAVE_FCHFLAGS) ) && defined(HAVE_STRUCT_STAT_ST_FLAGS)
+/*
+ * BSD reads flags using stat() and sets them with one of {f,l,}chflags()
+ */
+static int
+set_fflags_platform(struct archive_write_disk *a, int fd, const char *name,
+ mode_t mode, unsigned long set, unsigned long clear)
+{
+ int r;
+
+ (void)mode; /* UNUSED */
+ if (set == 0 && clear == 0)
+ return (ARCHIVE_OK);
+
+ /*
+ * XXX Is the stat here really necessary? Or can I just use
+ * the 'set' flags directly? In particular, I'm not sure
+ * about the correct approach if we're overwriting an existing
+ * file that already has flags on it. XXX
+ */
+ if ((r = _archive_write_disk_lazy_stat(a)) != ARCHIVE_OK)
+ return (r);
+
+ a->st.st_flags &= ~clear;
+ a->st.st_flags |= set;
+#ifdef HAVE_FCHFLAGS
+ /* If platform has fchflags() and we were given an fd, use it. */
+ if (fd >= 0 && fchflags(fd, a->st.st_flags) == 0)
+ return (ARCHIVE_OK);
+#endif
+ /*
+ * If we can't use the fd to set the flags, we'll use the
+ * pathname to set flags. We prefer lchflags() but will use
+ * chflags() if we must.
+ */
+#ifdef HAVE_LCHFLAGS
+ if (lchflags(name, a->st.st_flags) == 0)
+ return (ARCHIVE_OK);
+#elif defined(HAVE_CHFLAGS)
+ if (S_ISLNK(a->st.st_mode)) {
+ archive_set_error(&a->archive, errno,
+ "Can't set file flags on symlink.");
+ return (ARCHIVE_WARN);
+ }
+ if (chflags(name, a->st.st_flags) == 0)
+ return (ARCHIVE_OK);
+#endif
+ archive_set_error(&a->archive, errno,
+ "Failed to set file flags");
+ return (ARCHIVE_WARN);
+}
+
+#elif defined(EXT2_IOC_GETFLAGS) && defined(EXT2_IOC_SETFLAGS)
+/*
+ * Linux uses ioctl() to read and write file flags.
+ */
+static int
+set_fflags_platform(struct archive_write_disk *a, int fd, const char *name,
+ mode_t mode, unsigned long set, unsigned long clear)
+{
+ int ret;
+ int myfd = fd;
+ unsigned long newflags, oldflags;
+ unsigned long sf_mask = 0;
+
+ if (set == 0 && clear == 0)
+ return (ARCHIVE_OK);
+ /* Only regular files and dirs can have flags. */
+ if (!S_ISREG(mode) && !S_ISDIR(mode))
+ return (ARCHIVE_OK);
+
+ /* If we weren't given an fd, open it ourselves. */
+ if (myfd < 0)
+ myfd = open(name, O_RDONLY | O_NONBLOCK | O_BINARY);
+ if (myfd < 0)
+ return (ARCHIVE_OK);
+
+ /*
+ * Linux has no define for the flags that are only settable by
+ * the root user. This code may seem a little complex, but
+ * there seem to be some Linux systems that lack these
+ * defines. (?) The code below degrades reasonably gracefully
+ * if sf_mask is incomplete.
+ */
+#ifdef EXT2_IMMUTABLE_FL
+ sf_mask |= EXT2_IMMUTABLE_FL;
+#endif
+#ifdef EXT2_APPEND_FL
+ sf_mask |= EXT2_APPEND_FL;
+#endif
+ /*
+ * XXX As above, this would be way simpler if we didn't have
+ * to read the current flags from disk. XXX
+ */
+ ret = ARCHIVE_OK;
+ /* Try setting the flags as given. */
+ if (ioctl(myfd, EXT2_IOC_GETFLAGS, &oldflags) >= 0) {
+ newflags = (oldflags & ~clear) | set;
+ if (ioctl(myfd, EXT2_IOC_SETFLAGS, &newflags) >= 0)
+ goto cleanup;
+ if (errno != EPERM)
+ goto fail;
+ }
+ /* If we couldn't set all the flags, try again with a subset. */
+ if (ioctl(myfd, EXT2_IOC_GETFLAGS, &oldflags) >= 0) {
+ newflags &= ~sf_mask;
+ oldflags &= sf_mask;
+ newflags |= oldflags;
+ if (ioctl(myfd, EXT2_IOC_SETFLAGS, &newflags) >= 0)
+ goto cleanup;
+ }
+ /* We couldn't set the flags, so report the failure. */
+fail:
+ archive_set_error(&a->archive, errno,
+ "Failed to set file flags");
+ ret = ARCHIVE_WARN;
+cleanup:
+ if (fd < 0)
+ close(myfd);
+ return (ret);
+}
+
+#else
+
+/*
+ * Of course, some systems have neither BSD chflags() nor Linux' flags
+ * support through ioctl().
+ */
+static int
+set_fflags_platform(struct archive_write_disk *a, int fd, const char *name,
+ mode_t mode, unsigned long set, unsigned long clear)
+{
+ (void)a; /* UNUSED */
+ (void)fd; /* UNUSED */
+ (void)name; /* UNUSED */
+ (void)mode; /* UNUSED */
+ (void)set; /* UNUSED */
+ (void)clear; /* UNUSED */
+ return (ARCHIVE_OK);
+}
+
+#endif /* __linux */
+
+#ifndef HAVE_POSIX_ACL
+/* Default empty function body to satisfy mainline code. */
+static int
+set_acls(struct archive_write_disk *a)
+{
+ (void)a; /* UNUSED */
+ return (ARCHIVE_OK);
+}
+
+#else
+
+/*
+ * XXX TODO: What about ACL types other than ACCESS and DEFAULT?
+ */
+static int
+set_acls(struct archive_write_disk *a)
+{
+ int ret;
+
+ ret = set_acl(a, a->fd, a->entry, ACL_TYPE_ACCESS,
+ ARCHIVE_ENTRY_ACL_TYPE_ACCESS, "access");
+ if (ret != ARCHIVE_OK)
+ return (ret);
+ ret = set_acl(a, a->fd, a->entry, ACL_TYPE_DEFAULT,
+ ARCHIVE_ENTRY_ACL_TYPE_DEFAULT, "default");
+ return (ret);
+}
+
+
+static int
+set_acl(struct archive_write_disk *a, int fd, struct archive_entry *entry,
+ acl_type_t acl_type, int ae_requested_type, const char *tname)
+{
+ acl_t acl;
+ acl_entry_t acl_entry;
+ acl_permset_t acl_permset;
+ int ret;
+ int ae_type, ae_permset, ae_tag, ae_id;
+ uid_t ae_uid;
+ gid_t ae_gid;
+ const char *ae_name;
+ int entries;
+ const char *name;
+
+ ret = ARCHIVE_OK;
+ entries = archive_entry_acl_reset(entry, ae_requested_type);
+ if (entries == 0)
+ return (ARCHIVE_OK);
+ acl = acl_init(entries);
+ while (archive_entry_acl_next(entry, ae_requested_type, &ae_type,
+ &ae_permset, &ae_tag, &ae_id, &ae_name) == ARCHIVE_OK) {
+ acl_create_entry(&acl, &acl_entry);
+
+ switch (ae_tag) {
+ case ARCHIVE_ENTRY_ACL_USER:
+ acl_set_tag_type(acl_entry, ACL_USER);
+ ae_uid = a->lookup_uid(a->lookup_uid_data,
+ ae_name, ae_id);
+ acl_set_qualifier(acl_entry, &ae_uid);
+ break;
+ case ARCHIVE_ENTRY_ACL_GROUP:
+ acl_set_tag_type(acl_entry, ACL_GROUP);
+ ae_gid = a->lookup_gid(a->lookup_gid_data,
+ ae_name, ae_id);
+ acl_set_qualifier(acl_entry, &ae_gid);
+ break;
+ case ARCHIVE_ENTRY_ACL_USER_OBJ:
+ acl_set_tag_type(acl_entry, ACL_USER_OBJ);
+ break;
+ case ARCHIVE_ENTRY_ACL_GROUP_OBJ:
+ acl_set_tag_type(acl_entry, ACL_GROUP_OBJ);
+ break;
+ case ARCHIVE_ENTRY_ACL_MASK:
+ acl_set_tag_type(acl_entry, ACL_MASK);
+ break;
+ case ARCHIVE_ENTRY_ACL_OTHER:
+ acl_set_tag_type(acl_entry, ACL_OTHER);
+ break;
+ default:
+ /* XXX */
+ break;
+ }
+
+ acl_get_permset(acl_entry, &acl_permset);
+ acl_clear_perms(acl_permset);
+ if (ae_permset & ARCHIVE_ENTRY_ACL_EXECUTE)
+ acl_add_perm(acl_permset, ACL_EXECUTE);
+ if (ae_permset & ARCHIVE_ENTRY_ACL_WRITE)
+ acl_add_perm(acl_permset, ACL_WRITE);
+ if (ae_permset & ARCHIVE_ENTRY_ACL_READ)
+ acl_add_perm(acl_permset, ACL_READ);
+ }
+
+ name = archive_entry_pathname(entry);
+
+ /* Try restoring the ACL through 'fd' if we can. */
+#if HAVE_ACL_SET_FD
+ if (fd >= 0 && acl_type == ACL_TYPE_ACCESS && acl_set_fd(fd, acl) == 0)
+ ret = ARCHIVE_OK;
+ else
+#else
+#if HAVE_ACL_SET_FD_NP
+ if (fd >= 0 && acl_set_fd_np(fd, acl, acl_type) == 0)
+ ret = ARCHIVE_OK;
+ else
+#endif
+#endif
+ if (acl_set_file(name, acl_type, acl) != 0) {
+ archive_set_error(&a->archive, errno, "Failed to set %s acl", tname);
+ ret = ARCHIVE_WARN;
+ }
+ acl_free(acl);
+ return (ret);
+}
+#endif
+
+#if HAVE_LSETXATTR
+/*
+ * Restore extended attributes - Linux implementation
+ */
+static int
+set_xattrs(struct archive_write_disk *a)
+{
+ struct archive_entry *entry = a->entry;
+ static int warning_done = 0;
+ int ret = ARCHIVE_OK;
+ int i = archive_entry_xattr_reset(entry);
+
+ while (i--) {
+ const char *name;
+ const void *value;
+ size_t size;
+ archive_entry_xattr_next(entry, &name, &value, &size);
+ if (name != NULL &&
+ strncmp(name, "xfsroot.", 8) != 0 &&
+ strncmp(name, "system.", 7) != 0) {
+ int e;
+#if HAVE_FSETXATTR
+ if (a->fd >= 0)
+ e = fsetxattr(a->fd, name, value, size, 0);
+ else
+#endif
+ {
+ e = lsetxattr(archive_entry_pathname(entry),
+ name, value, size, 0);
+ }
+ if (e == -1) {
+ if (errno == ENOTSUP) {
+ if (!warning_done) {
+ warning_done = 1;
+ archive_set_error(&a->archive, errno,
+ "Cannot restore extended "
+ "attributes on this file "
+ "system");
+ }
+ } else
+ archive_set_error(&a->archive, errno,
+ "Failed to set extended attribute");
+ ret = ARCHIVE_WARN;
+ }
+ } else {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+ "Invalid extended attribute encountered");
+ ret = ARCHIVE_WARN;
+ }
+ }
+ return (ret);
+}
+#elif HAVE_EXTATTR_SET_FILE && HAVE_DECL_EXTATTR_NAMESPACE_USER
+/*
+ * Restore extended attributes - FreeBSD implementation
+ */
+static int
+set_xattrs(struct archive_write_disk *a)
+{
+ struct archive_entry *entry = a->entry;
+ static int warning_done = 0;
+ int ret = ARCHIVE_OK;
+ int i = archive_entry_xattr_reset(entry);
+
+ while (i--) {
+ const char *name;
+ const void *value;
+ size_t size;
+ archive_entry_xattr_next(entry, &name, &value, &size);
+ if (name != NULL) {
+ int e;
+ int namespace;
+
+ if (strncmp(name, "user.", 5) == 0) {
+ /* "user." attributes go to user namespace */
+ name += 5;
+ namespace = EXTATTR_NAMESPACE_USER;
+ } else {
+ /* Warn about other extended attributes. */
+ archive_set_error(&a->archive,
+ ARCHIVE_ERRNO_FILE_FORMAT,
+ "Can't restore extended attribute ``%s''",
+ name);
+ ret = ARCHIVE_WARN;
+ continue;
+ }
+ errno = 0;
+#if HAVE_EXTATTR_SET_FD
+ if (a->fd >= 0)
+ e = extattr_set_fd(a->fd, namespace, name, value, size);
+ else
+#endif
+ /* TODO: should we use extattr_set_link() instead? */
+ {
+ e = extattr_set_file(archive_entry_pathname(entry),
+ namespace, name, value, size);
+ }
+ if (e != (int)size) {
+ if (errno == ENOTSUP) {
+ if (!warning_done) {
+ warning_done = 1;
+ archive_set_error(&a->archive, errno,
+ "Cannot restore extended "
+ "attributes on this file "
+ "system");
+ }
+ } else {
+ archive_set_error(&a->archive, errno,
+ "Failed to set extended attribute");
+ }
+
+ ret = ARCHIVE_WARN;
+ }
+ }
+ }
+ return (ret);
+}
+#else
+/*
+ * Restore extended attributes - stub implementation for unsupported systems
+ */
+static int
+set_xattrs(struct archive_write_disk *a)
+{
+ static int warning_done = 0;
+
+ /* If there aren't any extended attributes, then it's okay not
+ * to extract them, otherwise, issue a single warning. */
+ if (archive_entry_xattr_count(a->entry) != 0 && !warning_done) {
+ warning_done = 1;
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+ "Cannot restore extended attributes on this system");
+ return (ARCHIVE_WARN);
+ }
+ /* Warning was already emitted; suppress further warnings. */
+ return (ARCHIVE_OK);
+}
+#endif
+
+
+/*
+ * Trivial implementations of gid/uid lookup functions.
+ * These are normally overridden by the client, but these stub
+ * versions ensure that we always have something that works.
+ */
+static gid_t
+trivial_lookup_gid(void *private_data, const char *gname, gid_t gid)
+{
+ (void)private_data; /* UNUSED */
+ (void)gname; /* UNUSED */
+ return (gid);
+}
+
+static uid_t
+trivial_lookup_uid(void *private_data, const char *uname, uid_t uid)
+{
+ (void)private_data; /* UNUSED */
+ (void)uname; /* UNUSED */
+ return (uid);
+}
+
+/*
+ * Test if file on disk is older than entry.
+ */
+static int
+older(struct stat *st, struct archive_entry *entry)
+{
+ /* First, test the seconds and return if we have a definite answer. */
+ /* Definitely older. */
+ if (st->st_mtime < archive_entry_mtime(entry))
+ return (1);
+ /* Definitely younger. */
+ if (st->st_mtime > archive_entry_mtime(entry))
+ return (0);
+ /* If this platform supports fractional seconds, try those. */
+#if HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC
+ /* Definitely older. */
+ if (st->st_mtimespec.tv_nsec < archive_entry_mtime_nsec(entry))
+ return (1);
+#elif HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC
+ /* Definitely older. */
+ if (st->st_mtim.tv_nsec < archive_entry_mtime_nsec(entry))
+ return (1);
+#elif HAVE_STRUCT_STAT_ST_MTIME_N
+ /* older. */
+ if (st->st_mtime_n < archive_entry_mtime_nsec(entry))
+ return (1);
+#elif HAVE_STRUCT_STAT_ST_UMTIME
+ /* older. */
+ if (st->st_umtime * 1000 < archive_entry_mtime_nsec(entry))
+ return (1);
+#elif HAVE_STRUCT_STAT_ST_MTIME_USEC
+ /* older. */
+ if (st->st_mtime_usec * 1000 < archive_entry_mtime_nsec(entry))
+ return (1);
+#else
+ /* This system doesn't have high-res timestamps. */
+#endif
+ /* Same age or newer, so not older. */
+ return (0);
+}
diff --git a/lib/libarchive/archive_write_disk_private.h b/contrib/libarchive/libarchive/archive_write_disk_private.h
index 8ec6391..8ec6391 100644
--- a/lib/libarchive/archive_write_disk_private.h
+++ b/contrib/libarchive/libarchive/archive_write_disk_private.h
diff --git a/lib/libarchive/archive_write_disk_set_standard_lookup.c b/contrib/libarchive/libarchive/archive_write_disk_set_standard_lookup.c
index ae9c12a..ae9c12a 100644
--- a/lib/libarchive/archive_write_disk_set_standard_lookup.c
+++ b/contrib/libarchive/libarchive/archive_write_disk_set_standard_lookup.c
diff --git a/lib/libarchive/archive_write_open_fd.c b/contrib/libarchive/libarchive/archive_write_open_fd.c
index 1d27ce3..1d27ce3 100644
--- a/lib/libarchive/archive_write_open_fd.c
+++ b/contrib/libarchive/libarchive/archive_write_open_fd.c
diff --git a/lib/libarchive/archive_write_open_file.c b/contrib/libarchive/libarchive/archive_write_open_file.c
index 68bf236..68bf236 100644
--- a/lib/libarchive/archive_write_open_file.c
+++ b/contrib/libarchive/libarchive/archive_write_open_file.c
diff --git a/lib/libarchive/archive_write_open_filename.c b/contrib/libarchive/libarchive/archive_write_open_filename.c
index 0c1e189..0c1e189 100644
--- a/lib/libarchive/archive_write_open_filename.c
+++ b/contrib/libarchive/libarchive/archive_write_open_filename.c
diff --git a/lib/libarchive/archive_write_open_memory.c b/contrib/libarchive/libarchive/archive_write_open_memory.c
index 02c0022..02c0022 100644
--- a/lib/libarchive/archive_write_open_memory.c
+++ b/contrib/libarchive/libarchive/archive_write_open_memory.c
diff --git a/lib/libarchive/archive_write_private.h b/contrib/libarchive/libarchive/archive_write_private.h
index f902f08..f902f08 100644
--- a/lib/libarchive/archive_write_private.h
+++ b/contrib/libarchive/libarchive/archive_write_private.h
diff --git a/lib/libarchive/archive_write_set_compression_bzip2.c b/contrib/libarchive/libarchive/archive_write_set_compression_bzip2.c
index a3ed307..a3ed307 100644
--- a/lib/libarchive/archive_write_set_compression_bzip2.c
+++ b/contrib/libarchive/libarchive/archive_write_set_compression_bzip2.c
diff --git a/lib/libarchive/archive_write_set_compression_compress.c b/contrib/libarchive/libarchive/archive_write_set_compression_compress.c
index da44b04..da44b04 100644
--- a/lib/libarchive/archive_write_set_compression_compress.c
+++ b/contrib/libarchive/libarchive/archive_write_set_compression_compress.c
diff --git a/lib/libarchive/archive_write_set_compression_gzip.c b/contrib/libarchive/libarchive/archive_write_set_compression_gzip.c
index 6ecb4ea..6ecb4ea 100644
--- a/lib/libarchive/archive_write_set_compression_gzip.c
+++ b/contrib/libarchive/libarchive/archive_write_set_compression_gzip.c
diff --git a/lib/libarchive/archive_write_set_compression_none.c b/contrib/libarchive/libarchive/archive_write_set_compression_none.c
index 4527485..4527485 100644
--- a/lib/libarchive/archive_write_set_compression_none.c
+++ b/contrib/libarchive/libarchive/archive_write_set_compression_none.c
diff --git a/lib/libarchive/archive_write_set_compression_program.c b/contrib/libarchive/libarchive/archive_write_set_compression_program.c
index 68c86cc..68c86cc 100644
--- a/lib/libarchive/archive_write_set_compression_program.c
+++ b/contrib/libarchive/libarchive/archive_write_set_compression_program.c
diff --git a/contrib/libarchive/libarchive/archive_write_set_compression_xz.c b/contrib/libarchive/libarchive/archive_write_set_compression_xz.c
new file mode 100644
index 0000000..15b6cc2
--- /dev/null
+++ b/contrib/libarchive/libarchive/archive_write_set_compression_xz.c
@@ -0,0 +1,439 @@
+/*-
+ * Copyright (c) 2009 Michihiro NAKAJIMA
+ * Copyright (c) 2003-2007 Tim Kientzle
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "archive_platform.h"
+
+__FBSDID("$FreeBSD$");
+
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#include <time.h>
+#ifdef HAVE_LZMA_H
+#include <lzma.h>
+#endif
+
+#include "archive.h"
+#include "archive_private.h"
+#include "archive_write_private.h"
+
+#ifndef HAVE_LZMA_H
+int
+archive_write_set_compression_xz(struct archive *a)
+{
+ archive_set_error(a, ARCHIVE_ERRNO_MISC,
+ "xz compression not supported on this platform");
+ return (ARCHIVE_FATAL);
+}
+
+int
+archive_write_set_compression_lzma(struct archive *a)
+{
+ archive_set_error(a, ARCHIVE_ERRNO_MISC,
+ "lzma compression not supported on this platform");
+ return (ARCHIVE_FATAL);
+}
+#else
+/* Don't compile this if we don't have liblzma. */
+
+struct private_data {
+ lzma_stream stream;
+ lzma_filter lzmafilters[2];
+ lzma_options_lzma lzma_opt;
+ int64_t total_in;
+ unsigned char *compressed;
+ size_t compressed_buffer_size;
+};
+
+struct private_config {
+ int compression_level;
+};
+
+static int archive_compressor_xz_init(struct archive_write *);
+static int archive_compressor_xz_options(struct archive_write *,
+ const char *, const char *);
+static int archive_compressor_xz_finish(struct archive_write *);
+static int archive_compressor_xz_write(struct archive_write *,
+ const void *, size_t);
+static int drive_compressor(struct archive_write *, struct private_data *,
+ int finishing);
+
+
+/*
+ * Allocate, initialize and return a archive object.
+ */
+int
+archive_write_set_compression_xz(struct archive *_a)
+{
+ struct private_config *config;
+ struct archive_write *a = (struct archive_write *)_a;
+ __archive_check_magic(&a->archive, ARCHIVE_WRITE_MAGIC,
+ ARCHIVE_STATE_NEW, "archive_write_set_compression_xz");
+ config = calloc(1, sizeof(*config));
+ if (config == NULL) {
+ archive_set_error(&a->archive, ENOMEM, "Out of memory");
+ return (ARCHIVE_FATAL);
+ }
+ a->compressor.config = config;
+ a->compressor.finish = archive_compressor_xz_finish;
+ config->compression_level = LZMA_PRESET_DEFAULT;
+ a->compressor.init = &archive_compressor_xz_init;
+ a->compressor.options = &archive_compressor_xz_options;
+ a->archive.compression_code = ARCHIVE_COMPRESSION_XZ;
+ a->archive.compression_name = "xz";
+ return (ARCHIVE_OK);
+}
+
+/* LZMA is handled identically, we just need a different compression
+ * code set. (The liblzma setup looks at the code to determine
+ * the one place that XZ and LZMA require different handling.) */
+int
+archive_write_set_compression_lzma(struct archive *_a)
+{
+ struct archive_write *a = (struct archive_write *)_a;
+ int r = archive_write_set_compression_xz(_a);
+ if (r != ARCHIVE_OK)
+ return (r);
+ a->archive.compression_code = ARCHIVE_COMPRESSION_LZMA;
+ a->archive.compression_name = "lzma";
+ return (ARCHIVE_OK);
+}
+
+static int
+archive_compressor_xz_init_stream(struct archive_write *a,
+ struct private_data *state)
+{
+ static const lzma_stream lzma_stream_init_data = LZMA_STREAM_INIT;
+ int ret;
+
+ state->stream = lzma_stream_init_data;
+ state->stream.next_out = state->compressed;
+ state->stream.avail_out = state->compressed_buffer_size;
+ if (a->archive.compression_code == ARCHIVE_COMPRESSION_XZ)
+ ret = lzma_stream_encoder(&(state->stream),
+ state->lzmafilters, LZMA_CHECK_CRC64);
+ else
+ ret = lzma_alone_encoder(&(state->stream), &state->lzma_opt);
+ if (ret == LZMA_OK)
+ return (ARCHIVE_OK);
+
+ switch (ret) {
+ case LZMA_MEM_ERROR:
+ archive_set_error(&a->archive, ENOMEM,
+ "Internal error initializing compression library: "
+ "Cannot allocate memory");
+ break;
+ default:
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "Internal error initializing compression library: "
+ "It's a bug in liblzma");
+ break;
+ }
+ return (ARCHIVE_FATAL);
+}
+
+/*
+ * Setup callback.
+ */
+static int
+archive_compressor_xz_init(struct archive_write *a)
+{
+ int ret;
+ struct private_data *state;
+ struct private_config *config;
+
+ if (a->client_opener != NULL) {
+ ret = (a->client_opener)(&a->archive, a->client_data);
+ if (ret != ARCHIVE_OK)
+ return (ret);
+ }
+
+ state = (struct private_data *)malloc(sizeof(*state));
+ if (state == NULL) {
+ archive_set_error(&a->archive, ENOMEM,
+ "Can't allocate data for compression");
+ return (ARCHIVE_FATAL);
+ }
+ memset(state, 0, sizeof(*state));
+ config = a->compressor.config;
+
+ /*
+ * See comment above. We should set compressed_buffer_size to
+ * max(bytes_per_block, 65536), but the code can't handle that yet.
+ */
+ state->compressed_buffer_size = a->bytes_per_block;
+ state->compressed = (unsigned char *)malloc(state->compressed_buffer_size);
+ if (state->compressed == NULL) {
+ archive_set_error(&a->archive, ENOMEM,
+ "Can't allocate data for compression buffer");
+ free(state);
+ return (ARCHIVE_FATAL);
+ }
+ a->compressor.write = archive_compressor_xz_write;
+
+ /* Initialize compression library. */
+ if (lzma_lzma_preset(&state->lzma_opt, config->compression_level)) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "Internal error initializing compression library");
+ free(state->compressed);
+ free(state);
+ }
+ state->lzmafilters[0].id = LZMA_FILTER_LZMA2;
+ state->lzmafilters[0].options = &state->lzma_opt;
+ state->lzmafilters[1].id = LZMA_VLI_UNKNOWN;/* Terminate */
+ ret = archive_compressor_xz_init_stream(a, state);
+ if (ret == LZMA_OK) {
+ a->compressor.data = state;
+ return (0);
+ }
+ /* Library setup failed: clean up. */
+ free(state->compressed);
+ free(state);
+
+ return (ARCHIVE_FATAL);
+}
+
+/*
+ * Set write options.
+ */
+static int
+archive_compressor_xz_options(struct archive_write *a, const char *key,
+ const char *value)
+{
+ struct private_config *config;
+
+ config = (struct private_config *)a->compressor.config;
+ if (strcmp(key, "compression-level") == 0) {
+ if (value == NULL || !(value[0] >= '0' && value[0] <= '9') ||
+ value[1] != '\0')
+ return (ARCHIVE_WARN);
+ config->compression_level = value[0] - '0';
+ if (config->compression_level > 6)
+ config->compression_level = 6;
+ return (ARCHIVE_OK);
+ }
+
+ return (ARCHIVE_WARN);
+}
+
+/*
+ * Write data to the compressed stream.
+ */
+static int
+archive_compressor_xz_write(struct archive_write *a, const void *buff,
+ size_t length)
+{
+ struct private_data *state;
+ int ret;
+
+ state = (struct private_data *)a->compressor.data;
+ if (a->client_writer == NULL) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_PROGRAMMER,
+ "No write callback is registered? "
+ "This is probably an internal programming error.");
+ return (ARCHIVE_FATAL);
+ }
+
+ /* Update statistics */
+ state->total_in += length;
+
+ /* Compress input data to output buffer */
+ state->stream.next_in = buff;
+ state->stream.avail_in = length;
+ if ((ret = drive_compressor(a, state, 0)) != ARCHIVE_OK)
+ return (ret);
+
+ a->archive.file_position += length;
+ return (ARCHIVE_OK);
+}
+
+
+/*
+ * Finish the compression...
+ */
+static int
+archive_compressor_xz_finish(struct archive_write *a)
+{
+ ssize_t block_length, target_block_length, bytes_written;
+ int ret;
+ struct private_data *state;
+ unsigned tocopy;
+
+ ret = ARCHIVE_OK;
+ state = (struct private_data *)a->compressor.data;
+ if (state != NULL) {
+ if (a->client_writer == NULL) {
+ archive_set_error(&a->archive,
+ ARCHIVE_ERRNO_PROGRAMMER,
+ "No write callback is registered? "
+ "This is probably an internal programming error.");
+ ret = ARCHIVE_FATAL;
+ goto cleanup;
+ }
+
+ /* By default, always pad the uncompressed data. */
+ if (a->pad_uncompressed) {
+ tocopy = a->bytes_per_block -
+ (state->total_in % a->bytes_per_block);
+ while (tocopy > 0 && tocopy < (unsigned)a->bytes_per_block) {
+ state->stream.next_in = a->nulls;
+ state->stream.avail_in = tocopy < a->null_length ?
+ tocopy : a->null_length;
+ state->total_in += state->stream.avail_in;
+ tocopy -= state->stream.avail_in;
+ ret = drive_compressor(a, state, 0);
+ if (ret != ARCHIVE_OK)
+ goto cleanup;
+ }
+ }
+
+ /* Finish compression cycle */
+ if (((ret = drive_compressor(a, state, 1))) != ARCHIVE_OK)
+ goto cleanup;
+
+ /* Optionally, pad the final compressed block. */
+ block_length = state->stream.next_out - state->compressed;
+
+ /* Tricky calculation to determine size of last block. */
+ if (a->bytes_in_last_block <= 0)
+ /* Default or Zero: pad to full block */
+ target_block_length = a->bytes_per_block;
+ else
+ /* Round length to next multiple of bytes_in_last_block. */
+ target_block_length = a->bytes_in_last_block *
+ ( (block_length + a->bytes_in_last_block - 1) /
+ a->bytes_in_last_block);
+ if (target_block_length > a->bytes_per_block)
+ target_block_length = a->bytes_per_block;
+ if (block_length < target_block_length) {
+ memset(state->stream.next_out, 0,
+ target_block_length - block_length);
+ block_length = target_block_length;
+ }
+
+ /* Write the last block */
+ bytes_written = (a->client_writer)(&a->archive, a->client_data,
+ state->compressed, block_length);
+ if (bytes_written <= 0) {
+ ret = ARCHIVE_FATAL;
+ goto cleanup;
+ }
+ a->archive.raw_position += bytes_written;
+
+ /* Cleanup: shut down compressor, release memory, etc. */
+ cleanup:
+ lzma_end(&(state->stream));
+ free(state->compressed);
+ free(state);
+ }
+ free(a->compressor.config);
+ a->compressor.config = NULL;
+ return (ret);
+}
+
+/*
+ * Utility function to push input data through compressor,
+ * writing full output blocks as necessary.
+ *
+ * Note that this handles both the regular write case (finishing ==
+ * false) and the end-of-archive case (finishing == true).
+ */
+static int
+drive_compressor(struct archive_write *a, struct private_data *state, int finishing)
+{
+ ssize_t bytes_written;
+ int ret;
+
+ for (;;) {
+ if (state->stream.avail_out == 0) {
+ bytes_written = (a->client_writer)(&a->archive,
+ a->client_data, state->compressed,
+ state->compressed_buffer_size);
+ if (bytes_written <= 0) {
+ /* TODO: Handle this write failure */
+ return (ARCHIVE_FATAL);
+ } else if ((size_t)bytes_written < state->compressed_buffer_size) {
+ /* Short write: Move remaining to
+ * front of block and keep filling */
+ memmove(state->compressed,
+ state->compressed + bytes_written,
+ state->compressed_buffer_size - bytes_written);
+ }
+ a->archive.raw_position += bytes_written;
+ state->stream.next_out
+ = state->compressed +
+ state->compressed_buffer_size - bytes_written;
+ state->stream.avail_out = bytes_written;
+ }
+
+ /* If there's nothing to do, we're done. */
+ if (!finishing && state->stream.avail_in == 0)
+ return (ARCHIVE_OK);
+
+ ret = lzma_code(&(state->stream),
+ finishing ? LZMA_FINISH : LZMA_RUN );
+
+ switch (ret) {
+ case LZMA_OK:
+ /* In non-finishing case, check if compressor
+ * consumed everything */
+ if (!finishing && state->stream.avail_in == 0)
+ return (ARCHIVE_OK);
+ /* In finishing case, this return always means
+ * there's more work */
+ break;
+ case LZMA_STREAM_END:
+ /* This return can only occur in finishing case. */
+ if (finishing)
+ return (ARCHIVE_OK);
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "lzma compression data error");
+ return (ARCHIVE_FATAL);
+ case LZMA_MEMLIMIT_ERROR:
+ archive_set_error(&a->archive, ENOMEM,
+ "lzma compression error: "
+ "%ju MiB would have been needed",
+ (uintmax_t)((lzma_memusage(&(state->stream)) + 1024 * 1024 -1)
+ / (1024 * 1024)));
+ return (ARCHIVE_FATAL);
+ default:
+ /* Any other return value indicates an error. */
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "lzma compression failed:"
+ " lzma_code() call returned status %d",
+ ret);
+ return (ARCHIVE_FATAL);
+ }
+ }
+}
+
+#endif /* HAVE_LZMA_H */
diff --git a/lib/libarchive/archive_write_set_format.c b/contrib/libarchive/libarchive/archive_write_set_format.c
index dd91d44..dd91d44 100644
--- a/lib/libarchive/archive_write_set_format.c
+++ b/contrib/libarchive/libarchive/archive_write_set_format.c
diff --git a/contrib/libarchive/libarchive/archive_write_set_format_ar.c b/contrib/libarchive/libarchive/archive_write_set_format_ar.c
new file mode 100644
index 0000000..cb8ddaa
--- /dev/null
+++ b/contrib/libarchive/libarchive/archive_write_set_format_ar.c
@@ -0,0 +1,550 @@
+/*-
+ * Copyright (c) 2007 Kai Wang
+ * Copyright (c) 2007 Tim Kientzle
+ * 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
+ * in this position and unchanged.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "archive_platform.h"
+__FBSDID("$FreeBSD$");
+
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+#include "archive.h"
+#include "archive_entry.h"
+#include "archive_private.h"
+#include "archive_write_private.h"
+
+struct ar_w {
+ uint64_t entry_bytes_remaining;
+ uint64_t entry_padding;
+ int is_strtab;
+ int has_strtab;
+ char *strtab;
+};
+
+/*
+ * Define structure of the "ar" header.
+ */
+#define AR_name_offset 0
+#define AR_name_size 16
+#define AR_date_offset 16
+#define AR_date_size 12
+#define AR_uid_offset 28
+#define AR_uid_size 6
+#define AR_gid_offset 34
+#define AR_gid_size 6
+#define AR_mode_offset 40
+#define AR_mode_size 8
+#define AR_size_offset 48
+#define AR_size_size 10
+#define AR_fmag_offset 58
+#define AR_fmag_size 2
+
+static int archive_write_set_format_ar(struct archive_write *);
+static int archive_write_ar_header(struct archive_write *,
+ struct archive_entry *);
+static ssize_t archive_write_ar_data(struct archive_write *,
+ const void *buff, size_t s);
+static int archive_write_ar_destroy(struct archive_write *);
+static int archive_write_ar_finish(struct archive_write *);
+static int archive_write_ar_finish_entry(struct archive_write *);
+static const char *ar_basename(const char *path);
+static int format_octal(int64_t v, char *p, int s);
+static int format_decimal(int64_t v, char *p, int s);
+
+int
+archive_write_set_format_ar_bsd(struct archive *_a)
+{
+ struct archive_write *a = (struct archive_write *)_a;
+ int r = archive_write_set_format_ar(a);
+ if (r == ARCHIVE_OK) {
+ a->archive.archive_format = ARCHIVE_FORMAT_AR_BSD;
+ a->archive.archive_format_name = "ar (BSD)";
+ }
+ return (r);
+}
+
+int
+archive_write_set_format_ar_svr4(struct archive *_a)
+{
+ struct archive_write *a = (struct archive_write *)_a;
+ int r = archive_write_set_format_ar(a);
+ if (r == ARCHIVE_OK) {
+ a->archive.archive_format = ARCHIVE_FORMAT_AR_GNU;
+ a->archive.archive_format_name = "ar (GNU/SVR4)";
+ }
+ return (r);
+}
+
+/*
+ * Generic initialization.
+ */
+static int
+archive_write_set_format_ar(struct archive_write *a)
+{
+ struct ar_w *ar;
+
+ /* If someone else was already registered, unregister them. */
+ if (a->format_destroy != NULL)
+ (a->format_destroy)(a);
+
+ ar = (struct ar_w *)malloc(sizeof(*ar));
+ if (ar == NULL) {
+ archive_set_error(&a->archive, ENOMEM, "Can't allocate ar data");
+ return (ARCHIVE_FATAL);
+ }
+ memset(ar, 0, sizeof(*ar));
+ a->format_data = ar;
+
+ a->format_name = "ar";
+ a->format_write_header = archive_write_ar_header;
+ a->format_write_data = archive_write_ar_data;
+ a->format_finish = archive_write_ar_finish;
+ a->format_destroy = archive_write_ar_destroy;
+ a->format_finish_entry = archive_write_ar_finish_entry;
+ return (ARCHIVE_OK);
+}
+
+static int
+archive_write_ar_header(struct archive_write *a, struct archive_entry *entry)
+{
+ int ret, append_fn;
+ char buff[60];
+ char *ss, *se;
+ struct ar_w *ar;
+ const char *pathname;
+ const char *filename;
+ int64_t size;
+
+ append_fn = 0;
+ ar = (struct ar_w *)a->format_data;
+ ar->is_strtab = 0;
+ filename = NULL;
+ size = archive_entry_size(entry);
+
+
+ /*
+ * Reject files with empty name.
+ */
+ pathname = archive_entry_pathname(entry);
+ if (*pathname == '\0') {
+ archive_set_error(&a->archive, EINVAL,
+ "Invalid filename");
+ return (ARCHIVE_WARN);
+ }
+
+ /*
+ * If we are now at the beginning of the archive,
+ * we need first write the ar global header.
+ */
+ if (a->archive.file_position == 0)
+ (a->compressor.write)(a, "!<arch>\n", 8);
+
+ memset(buff, ' ', 60);
+ strncpy(&buff[AR_fmag_offset], "`\n", 2);
+
+ if (strcmp(pathname, "/") == 0 ) {
+ /* Entry is archive symbol table in GNU format */
+ buff[AR_name_offset] = '/';
+ goto stat;
+ }
+ if (strcmp(pathname, "__.SYMDEF") == 0) {
+ /* Entry is archive symbol table in BSD format */
+ strncpy(buff + AR_name_offset, "__.SYMDEF", 9);
+ goto stat;
+ }
+ if (strcmp(pathname, "//") == 0) {
+ /*
+ * Entry is archive filename table, inform that we should
+ * collect strtab in next _data call.
+ */
+ ar->is_strtab = 1;
+ buff[AR_name_offset] = buff[AR_name_offset + 1] = '/';
+ /*
+ * For archive string table, only ar_size filed should
+ * be set.
+ */
+ goto size;
+ }
+
+ /*
+ * Otherwise, entry is a normal archive member.
+ * Strip leading paths from filenames, if any.
+ */
+ if ((filename = ar_basename(pathname)) == NULL) {
+ /* Reject filenames with trailing "/" */
+ archive_set_error(&a->archive, EINVAL,
+ "Invalid filename");
+ return (ARCHIVE_WARN);
+ }
+
+ if (a->archive.archive_format == ARCHIVE_FORMAT_AR_GNU) {
+ /*
+ * SVR4/GNU variant use a "/" to mark then end of the filename,
+ * make it possible to have embedded spaces in the filename.
+ * So, the longest filename here (without extension) is
+ * actually 15 bytes.
+ */
+ if (strlen(filename) <= 15) {
+ strncpy(&buff[AR_name_offset],
+ filename, strlen(filename));
+ buff[AR_name_offset + strlen(filename)] = '/';
+ } else {
+ /*
+ * For filename longer than 15 bytes, GNU variant
+ * makes use of a string table and instead stores the
+ * offset of the real filename to in the ar_name field.
+ * The string table should have been written before.
+ */
+ if (ar->has_strtab <= 0) {
+ archive_set_error(&a->archive, EINVAL,
+ "Can't find string table");
+ return (ARCHIVE_WARN);
+ }
+
+ se = (char *)malloc(strlen(filename) + 3);
+ if (se == NULL) {
+ archive_set_error(&a->archive, ENOMEM,
+ "Can't allocate filename buffer");
+ return (ARCHIVE_FATAL);
+ }
+
+ strncpy(se, filename, strlen(filename));
+ strcpy(se + strlen(filename), "/\n");
+
+ ss = strstr(ar->strtab, se);
+ free(se);
+
+ if (ss == NULL) {
+ archive_set_error(&a->archive, EINVAL,
+ "Invalid string table");
+ return (ARCHIVE_WARN);
+ }
+
+ /*
+ * GNU variant puts "/" followed by digits into
+ * ar_name field. These digits indicates the real
+ * filename string's offset to the string table.
+ */
+ buff[AR_name_offset] = '/';
+ if (format_decimal(ss - ar->strtab,
+ buff + AR_name_offset + 1,
+ AR_name_size - 1)) {
+ archive_set_error(&a->archive, ERANGE,
+ "string table offset too large");
+ return (ARCHIVE_WARN);
+ }
+ }
+ } else if (a->archive.archive_format == ARCHIVE_FORMAT_AR_BSD) {
+ /*
+ * BSD variant: for any file name which is more than
+ * 16 chars or contains one or more embedded space(s), the
+ * string "#1/" followed by the ASCII length of the name is
+ * put into the ar_name field. The file size (stored in the
+ * ar_size field) is incremented by the length of the name.
+ * The name is then written immediately following the
+ * archive header.
+ */
+ if (strlen(filename) <= 16 && strchr(filename, ' ') == NULL) {
+ strncpy(&buff[AR_name_offset], filename, strlen(filename));
+ buff[AR_name_offset + strlen(filename)] = ' ';
+ }
+ else {
+ strncpy(buff + AR_name_offset, "#1/", 3);
+ if (format_decimal(strlen(filename),
+ buff + AR_name_offset + 3,
+ AR_name_size - 3)) {
+ archive_set_error(&a->archive, ERANGE,
+ "File name too long");
+ return (ARCHIVE_WARN);
+ }
+ append_fn = 1;
+ size += strlen(filename);
+ }
+ }
+
+stat:
+ if (format_decimal(archive_entry_mtime(entry), buff + AR_date_offset, AR_date_size)) {
+ archive_set_error(&a->archive, ERANGE,
+ "File modification time too large");
+ return (ARCHIVE_WARN);
+ }
+ if (format_decimal(archive_entry_uid(entry), buff + AR_uid_offset, AR_uid_size)) {
+ archive_set_error(&a->archive, ERANGE,
+ "Numeric user ID too large");
+ return (ARCHIVE_WARN);
+ }
+ if (format_decimal(archive_entry_gid(entry), buff + AR_gid_offset, AR_gid_size)) {
+ archive_set_error(&a->archive, ERANGE,
+ "Numeric group ID too large");
+ return (ARCHIVE_WARN);
+ }
+ if (format_octal(archive_entry_mode(entry), buff + AR_mode_offset, AR_mode_size)) {
+ archive_set_error(&a->archive, ERANGE,
+ "Numeric mode too large");
+ return (ARCHIVE_WARN);
+ }
+ /*
+ * Sanity Check: A non-pseudo archive member should always be
+ * a regular file.
+ */
+ if (filename != NULL && archive_entry_filetype(entry) != AE_IFREG) {
+ archive_set_error(&a->archive, EINVAL,
+ "Regular file required for non-pseudo member");
+ return (ARCHIVE_WARN);
+ }
+
+size:
+ if (format_decimal(size, buff + AR_size_offset, AR_size_size)) {
+ archive_set_error(&a->archive, ERANGE,
+ "File size out of range");
+ return (ARCHIVE_WARN);
+ }
+
+ ret = (a->compressor.write)(a, buff, 60);
+ if (ret != ARCHIVE_OK)
+ return (ret);
+
+ ar->entry_bytes_remaining = size;
+ ar->entry_padding = ar->entry_bytes_remaining % 2;
+
+ if (append_fn > 0) {
+ ret = (a->compressor.write)(a, filename, strlen(filename));
+ if (ret != ARCHIVE_OK)
+ return (ret);
+ ar->entry_bytes_remaining -= strlen(filename);
+ }
+
+ return (ARCHIVE_OK);
+}
+
+static ssize_t
+archive_write_ar_data(struct archive_write *a, const void *buff, size_t s)
+{
+ struct ar_w *ar;
+ int ret;
+
+ ar = (struct ar_w *)a->format_data;
+ if (s > ar->entry_bytes_remaining)
+ s = ar->entry_bytes_remaining;
+
+ if (ar->is_strtab > 0) {
+ if (ar->has_strtab > 0) {
+ archive_set_error(&a->archive, EINVAL,
+ "More than one string tables exist");
+ return (ARCHIVE_WARN);
+ }
+
+ ar->strtab = (char *)malloc(s);
+ if (ar->strtab == NULL) {
+ archive_set_error(&a->archive, ENOMEM,
+ "Can't allocate strtab buffer");
+ return (ARCHIVE_FATAL);
+ }
+ strncpy(ar->strtab, buff, s);
+ ar->has_strtab = 1;
+ }
+
+ ret = (a->compressor.write)(a, buff, s);
+ if (ret != ARCHIVE_OK)
+ return (ret);
+
+ ar->entry_bytes_remaining -= s;
+ return (s);
+}
+
+static int
+archive_write_ar_destroy(struct archive_write *a)
+{
+ struct ar_w *ar;
+
+ ar = (struct ar_w *)a->format_data;
+
+ if (ar == NULL)
+ return (ARCHIVE_OK);
+
+ if (ar->has_strtab > 0) {
+ free(ar->strtab);
+ ar->strtab = NULL;
+ }
+
+ free(ar);
+ a->format_data = NULL;
+ return (ARCHIVE_OK);
+}
+
+static int
+archive_write_ar_finish(struct archive_write *a)
+{
+ int ret;
+
+ /*
+ * If we haven't written anything yet, we need to write
+ * the ar global header now to make it a valid ar archive.
+ */
+ if (a->archive.file_position == 0) {
+ ret = (a->compressor.write)(a, "!<arch>\n", 8);
+ return (ret);
+ }
+
+ return (ARCHIVE_OK);
+}
+
+static int
+archive_write_ar_finish_entry(struct archive_write *a)
+{
+ struct ar_w *ar;
+ int ret;
+
+ ar = (struct ar_w *)a->format_data;
+
+ if (ar->entry_bytes_remaining != 0) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "Entry remaining bytes larger than 0");
+ return (ARCHIVE_WARN);
+ }
+
+ if (ar->entry_padding == 0) {
+ return (ARCHIVE_OK);
+ }
+
+ if (ar->entry_padding != 1) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "Padding wrong size: %d should be 1 or 0",
+ (int)ar->entry_padding);
+ return (ARCHIVE_WARN);
+ }
+
+ ret = (a->compressor.write)(a, "\n", 1);
+ return (ret);
+}
+
+/*
+ * Format a number into the specified field using base-8.
+ * NB: This version is slightly different from the one in
+ * _ustar.c
+ */
+static int
+format_octal(int64_t v, char *p, int s)
+{
+ int len;
+ char *h;
+
+ len = s;
+ h = p;
+
+ /* Octal values can't be negative, so use 0. */
+ if (v < 0) {
+ while (len-- > 0)
+ *p++ = '0';
+ return (-1);
+ }
+
+ p += s; /* Start at the end and work backwards. */
+ do {
+ *--p = (char)('0' + (v & 7));
+ v >>= 3;
+ } while (--s > 0 && v > 0);
+
+ if (v == 0) {
+ memmove(h, p, len - s);
+ p = h + len - s;
+ while (s-- > 0)
+ *p++ = ' ';
+ return (0);
+ }
+ /* If it overflowed, fill field with max value. */
+ while (len-- > 0)
+ *p++ = '7';
+
+ return (-1);
+}
+
+/*
+ * Format a number into the specified field using base-10.
+ */
+static int
+format_decimal(int64_t v, char *p, int s)
+{
+ int len;
+ char *h;
+
+ len = s;
+ h = p;
+
+ /* Negative values in ar header are meaningless , so use 0. */
+ if (v < 0) {
+ while (len-- > 0)
+ *p++ = '0';
+ return (-1);
+ }
+
+ p += s;
+ do {
+ *--p = (char)('0' + (v % 10));
+ v /= 10;
+ } while (--s > 0 && v > 0);
+
+ if (v == 0) {
+ memmove(h, p, len - s);
+ p = h + len - s;
+ while (s-- > 0)
+ *p++ = ' ';
+ return (0);
+ }
+ /* If it overflowed, fill field with max value. */
+ while (len-- > 0)
+ *p++ = '9';
+
+ return (-1);
+}
+
+static const char *
+ar_basename(const char *path)
+{
+ const char *endp, *startp;
+
+ endp = path + strlen(path) - 1;
+ /*
+ * For filename with trailing slash(es), we return
+ * NULL indicating an error.
+ */
+ if (*endp == '/')
+ return (NULL);
+
+ /* Find the start of the base */
+ startp = endp;
+ while (startp > path && *(startp - 1) != '/')
+ startp--;
+
+ return (startp);
+}
diff --git a/lib/libarchive/archive_write_set_format_by_name.c b/contrib/libarchive/libarchive/archive_write_set_format_by_name.c
index 593f544..593f544 100644
--- a/lib/libarchive/archive_write_set_format_by_name.c
+++ b/contrib/libarchive/libarchive/archive_write_set_format_by_name.c
diff --git a/contrib/libarchive/libarchive/archive_write_set_format_cpio.c b/contrib/libarchive/libarchive/archive_write_set_format_cpio.c
new file mode 100644
index 0000000..2df9f19
--- /dev/null
+++ b/contrib/libarchive/libarchive/archive_write_set_format_cpio.c
@@ -0,0 +1,354 @@
+/*-
+ * Copyright (c) 2003-2007 Tim Kientzle
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "archive_platform.h"
+__FBSDID("$FreeBSD$");
+
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <stdio.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+#include "archive.h"
+#include "archive_entry.h"
+#include "archive_private.h"
+#include "archive_write_private.h"
+
+static ssize_t archive_write_cpio_data(struct archive_write *,
+ const void *buff, size_t s);
+static int archive_write_cpio_finish(struct archive_write *);
+static int archive_write_cpio_destroy(struct archive_write *);
+static int archive_write_cpio_finish_entry(struct archive_write *);
+static int archive_write_cpio_header(struct archive_write *,
+ struct archive_entry *);
+static int format_octal(int64_t, void *, int);
+static int64_t format_octal_recursive(int64_t, char *, int);
+
+struct cpio {
+ uint64_t entry_bytes_remaining;
+
+ int64_t ino_next;
+
+ struct { int64_t old; int new;} *ino_list;
+ size_t ino_list_size;
+ size_t ino_list_next;
+};
+
+#ifdef _MSC_VER
+#define __packed
+#pragma pack(push, 1)
+#endif
+
+struct cpio_header {
+ char c_magic[6];
+ char c_dev[6];
+ char c_ino[6];
+ char c_mode[6];
+ char c_uid[6];
+ char c_gid[6];
+ char c_nlink[6];
+ char c_rdev[6];
+ char c_mtime[11];
+ char c_namesize[6];
+ char c_filesize[11];
+} __packed;
+
+#ifdef _MSC_VER
+#undef __packed
+#pragma pack(pop)
+#endif
+
+/*
+ * Set output format to 'cpio' format.
+ */
+int
+archive_write_set_format_cpio(struct archive *_a)
+{
+ struct archive_write *a = (struct archive_write *)_a;
+ struct cpio *cpio;
+
+ /* If someone else was already registered, unregister them. */
+ if (a->format_destroy != NULL)
+ (a->format_destroy)(a);
+
+ cpio = (struct cpio *)malloc(sizeof(*cpio));
+ if (cpio == NULL) {
+ archive_set_error(&a->archive, ENOMEM, "Can't allocate cpio data");
+ return (ARCHIVE_FATAL);
+ }
+ memset(cpio, 0, sizeof(*cpio));
+ a->format_data = cpio;
+
+ a->pad_uncompressed = 1;
+ a->format_name = "cpio";
+ a->format_write_header = archive_write_cpio_header;
+ a->format_write_data = archive_write_cpio_data;
+ a->format_finish_entry = archive_write_cpio_finish_entry;
+ a->format_finish = archive_write_cpio_finish;
+ a->format_destroy = archive_write_cpio_destroy;
+ a->archive.archive_format = ARCHIVE_FORMAT_CPIO_POSIX;
+ a->archive.archive_format_name = "POSIX cpio";
+ return (ARCHIVE_OK);
+}
+
+/*
+ * Ino values are as long as 64 bits on some systems; cpio format
+ * only allows 18 bits and relies on the ino values to identify hardlinked
+ * files. So, we can't merely "hash" the ino numbers since collisions
+ * would corrupt the archive. Instead, we generate synthetic ino values
+ * to store in the archive and maintain a map of original ino values to
+ * synthetic ones so we can preserve hardlink information.
+ *
+ * TODO: Make this more efficient. It's not as bad as it looks (most
+ * files don't have any hardlinks and we don't do any work here for those),
+ * but it wouldn't be hard to do better.
+ *
+ * TODO: Work with dev/ino pairs here instead of just ino values.
+ */
+static int
+synthesize_ino_value(struct cpio *cpio, struct archive_entry *entry)
+{
+ int64_t ino = archive_entry_ino64(entry);
+ int ino_new;
+ size_t i;
+
+ /*
+ * If no index number was given, don't assign one. In
+ * particular, this handles the end-of-archive marker
+ * correctly by giving it a zero index value. (This is also
+ * why we start our synthetic index numbers with one below.)
+ */
+ if (ino == 0)
+ return (0);
+
+ /* Don't store a mapping if we don't need to. */
+ if (archive_entry_nlink(entry) < 2) {
+ return ++cpio->ino_next;
+ }
+
+ /* Look up old ino; if we have it, this is a hardlink
+ * and we reuse the same value. */
+ for (i = 0; i < cpio->ino_list_next; ++i) {
+ if (cpio->ino_list[i].old == ino)
+ return (cpio->ino_list[i].new);
+ }
+
+ /* Assign a new index number. */
+ ino_new = ++cpio->ino_next;
+
+ /* Ensure space for the new mapping. */
+ if (cpio->ino_list_size <= cpio->ino_list_next) {
+ size_t newsize = cpio->ino_list_size < 512
+ ? 512 : cpio->ino_list_size * 2;
+ void *newlist = realloc(cpio->ino_list,
+ sizeof(cpio->ino_list[0]) * newsize);
+ if (newlist == NULL)
+ return (-1);
+
+ cpio->ino_list_size = newsize;
+ cpio->ino_list = newlist;
+ }
+
+ /* Record and return the new value. */
+ cpio->ino_list[cpio->ino_list_next].old = ino;
+ cpio->ino_list[cpio->ino_list_next].new = ino_new;
+ ++cpio->ino_list_next;
+ return (ino_new);
+}
+
+static int
+archive_write_cpio_header(struct archive_write *a, struct archive_entry *entry)
+{
+ struct cpio *cpio;
+ const char *p, *path;
+ int pathlength, ret, ret2;
+ int64_t ino;
+ struct cpio_header h;
+
+ cpio = (struct cpio *)a->format_data;
+ ret2 = ARCHIVE_OK;
+
+ path = archive_entry_pathname(entry);
+ pathlength = (int)strlen(path) + 1; /* Include trailing null. */
+
+ memset(&h, 0, sizeof(h));
+ format_octal(070707, &h.c_magic, sizeof(h.c_magic));
+ format_octal(archive_entry_dev(entry), &h.c_dev, sizeof(h.c_dev));
+
+ ino = synthesize_ino_value(cpio, entry);
+ if (ino < 0) {
+ archive_set_error(&a->archive, ENOMEM,
+ "No memory for ino translation table");
+ return (ARCHIVE_FATAL);
+ } else if (ino > 0777777) {
+ archive_set_error(&a->archive, ERANGE,
+ "Too many files for this cpio format");
+ return (ARCHIVE_FATAL);
+ }
+ format_octal(ino & 0777777, &h.c_ino, sizeof(h.c_ino));
+
+ format_octal(archive_entry_mode(entry), &h.c_mode, sizeof(h.c_mode));
+ format_octal(archive_entry_uid(entry), &h.c_uid, sizeof(h.c_uid));
+ format_octal(archive_entry_gid(entry), &h.c_gid, sizeof(h.c_gid));
+ format_octal(archive_entry_nlink(entry), &h.c_nlink, sizeof(h.c_nlink));
+ if (archive_entry_filetype(entry) == AE_IFBLK
+ || archive_entry_filetype(entry) == AE_IFCHR)
+ format_octal(archive_entry_dev(entry), &h.c_rdev, sizeof(h.c_rdev));
+ else
+ format_octal(0, &h.c_rdev, sizeof(h.c_rdev));
+ format_octal(archive_entry_mtime(entry), &h.c_mtime, sizeof(h.c_mtime));
+ format_octal(pathlength, &h.c_namesize, sizeof(h.c_namesize));
+
+ /* Non-regular files don't store bodies. */
+ if (archive_entry_filetype(entry) != AE_IFREG)
+ archive_entry_set_size(entry, 0);
+
+ /* Symlinks get the link written as the body of the entry. */
+ p = archive_entry_symlink(entry);
+ if (p != NULL && *p != '\0')
+ format_octal(strlen(p), &h.c_filesize, sizeof(h.c_filesize));
+ else
+ format_octal(archive_entry_size(entry),
+ &h.c_filesize, sizeof(h.c_filesize));
+
+ ret = (a->compressor.write)(a, &h, sizeof(h));
+ if (ret != ARCHIVE_OK)
+ return (ARCHIVE_FATAL);
+
+ ret = (a->compressor.write)(a, path, pathlength);
+ if (ret != ARCHIVE_OK)
+ return (ARCHIVE_FATAL);
+
+ cpio->entry_bytes_remaining = archive_entry_size(entry);
+
+ /* Write the symlink now. */
+ if (p != NULL && *p != '\0')
+ ret = (a->compressor.write)(a, p, strlen(p));
+
+ if (ret == ARCHIVE_OK)
+ ret = ret2;
+ return (ret);
+}
+
+static ssize_t
+archive_write_cpio_data(struct archive_write *a, const void *buff, size_t s)
+{
+ struct cpio *cpio;
+ int ret;
+
+ cpio = (struct cpio *)a->format_data;
+ if (s > cpio->entry_bytes_remaining)
+ s = cpio->entry_bytes_remaining;
+
+ ret = (a->compressor.write)(a, buff, s);
+ cpio->entry_bytes_remaining -= s;
+ if (ret >= 0)
+ return (s);
+ else
+ return (ret);
+}
+
+/*
+ * Format a number into the specified field.
+ */
+static int
+format_octal(int64_t v, void *p, int digits)
+{
+ int64_t max;
+ int ret;
+
+ max = (((int64_t)1) << (digits * 3)) - 1;
+ if (v >= 0 && v <= max) {
+ format_octal_recursive(v, (char *)p, digits);
+ ret = 0;
+ } else {
+ format_octal_recursive(max, (char *)p, digits);
+ ret = -1;
+ }
+ return (ret);
+}
+
+static int64_t
+format_octal_recursive(int64_t v, char *p, int s)
+{
+ if (s == 0)
+ return (v);
+ v = format_octal_recursive(v, p+1, s-1);
+ *p = '0' + (v & 7);
+ return (v >> 3);
+}
+
+static int
+archive_write_cpio_finish(struct archive_write *a)
+{
+ int er;
+ struct archive_entry *trailer;
+
+ trailer = archive_entry_new();
+ /* nlink = 1 here for GNU cpio compat. */
+ archive_entry_set_nlink(trailer, 1);
+ archive_entry_set_pathname(trailer, "TRAILER!!!");
+ er = archive_write_cpio_header(a, trailer);
+ archive_entry_free(trailer);
+ return (er);
+}
+
+static int
+archive_write_cpio_destroy(struct archive_write *a)
+{
+ struct cpio *cpio;
+
+ cpio = (struct cpio *)a->format_data;
+ free(cpio->ino_list);
+ free(cpio);
+ a->format_data = NULL;
+ return (ARCHIVE_OK);
+}
+
+static int
+archive_write_cpio_finish_entry(struct archive_write *a)
+{
+ struct cpio *cpio;
+ size_t to_write;
+ int ret;
+
+ cpio = (struct cpio *)a->format_data;
+ ret = ARCHIVE_OK;
+ while (cpio->entry_bytes_remaining > 0) {
+ to_write = cpio->entry_bytes_remaining < a->null_length ?
+ cpio->entry_bytes_remaining : a->null_length;
+ ret = (a->compressor.write)(a, a->nulls, to_write);
+ if (ret != ARCHIVE_OK)
+ return (ret);
+ cpio->entry_bytes_remaining -= to_write;
+ }
+ return (ret);
+}
diff --git a/lib/libarchive/archive_write_set_format_cpio_newc.c b/contrib/libarchive/libarchive/archive_write_set_format_cpio_newc.c
index 187e7d6..187e7d6 100644
--- a/lib/libarchive/archive_write_set_format_cpio_newc.c
+++ b/contrib/libarchive/libarchive/archive_write_set_format_cpio_newc.c
diff --git a/lib/libarchive/archive_write_set_format_mtree.c b/contrib/libarchive/libarchive/archive_write_set_format_mtree.c
index 1b46147..1b46147 100644
--- a/lib/libarchive/archive_write_set_format_mtree.c
+++ b/contrib/libarchive/libarchive/archive_write_set_format_mtree.c
diff --git a/lib/libarchive/archive_write_set_format_pax.c b/contrib/libarchive/libarchive/archive_write_set_format_pax.c
index 2929179..2929179 100644
--- a/lib/libarchive/archive_write_set_format_pax.c
+++ b/contrib/libarchive/libarchive/archive_write_set_format_pax.c
diff --git a/contrib/libarchive/libarchive/archive_write_set_format_shar.c b/contrib/libarchive/libarchive/archive_write_set_format_shar.c
new file mode 100644
index 0000000..bd62768
--- /dev/null
+++ b/contrib/libarchive/libarchive/archive_write_set_format_shar.c
@@ -0,0 +1,625 @@
+/*-
+ * Copyright (c) 2003-2007 Tim Kientzle
+ * Copyright (c) 2008 Joerg Sonnenberger
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "archive_platform.h"
+__FBSDID("$FreeBSD$");
+
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <stdio.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+#include "archive.h"
+#include "archive_entry.h"
+#include "archive_private.h"
+#include "archive_write_private.h"
+
+struct shar {
+ int dump;
+ int end_of_line;
+ struct archive_entry *entry;
+ int has_data;
+ char *last_dir;
+
+ /* Line buffer for uuencoded dump format */
+ char outbuff[45];
+ size_t outpos;
+
+ int wrote_header;
+ struct archive_string work;
+ struct archive_string quoted_name;
+};
+
+static int archive_write_shar_finish(struct archive_write *);
+static int archive_write_shar_destroy(struct archive_write *);
+static int archive_write_shar_header(struct archive_write *,
+ struct archive_entry *);
+static ssize_t archive_write_shar_data_sed(struct archive_write *,
+ const void * buff, size_t);
+static ssize_t archive_write_shar_data_uuencode(struct archive_write *,
+ const void * buff, size_t);
+static int archive_write_shar_finish_entry(struct archive_write *);
+
+/*
+ * Copy the given string to the buffer, quoting all shell meta characters
+ * found.
+ */
+static void
+shar_quote(struct archive_string *buf, const char *str, int in_shell)
+{
+ static const char meta[] = "\n \t'`\";&<>()|*?{}[]\\$!#^~";
+ size_t len;
+
+ while (*str != '\0') {
+ if ((len = strcspn(str, meta)) != 0) {
+ archive_strncat(buf, str, len);
+ str += len;
+ } else if (*str == '\n') {
+ if (in_shell)
+ archive_strcat(buf, "\"\n\"");
+ else
+ archive_strcat(buf, "\\n");
+ ++str;
+ } else {
+ archive_strappend_char(buf, '\\');
+ archive_strappend_char(buf, *str);
+ ++str;
+ }
+ }
+}
+
+/*
+ * Set output format to 'shar' format.
+ */
+int
+archive_write_set_format_shar(struct archive *_a)
+{
+ struct archive_write *a = (struct archive_write *)_a;
+ struct shar *shar;
+
+ /* If someone else was already registered, unregister them. */
+ if (a->format_destroy != NULL)
+ (a->format_destroy)(a);
+
+ shar = (struct shar *)malloc(sizeof(*shar));
+ if (shar == NULL) {
+ archive_set_error(&a->archive, ENOMEM, "Can't allocate shar data");
+ return (ARCHIVE_FATAL);
+ }
+ memset(shar, 0, sizeof(*shar));
+ archive_string_init(&shar->work);
+ archive_string_init(&shar->quoted_name);
+ a->format_data = shar;
+
+ a->pad_uncompressed = 0;
+ a->format_name = "shar";
+ a->format_write_header = archive_write_shar_header;
+ a->format_finish = archive_write_shar_finish;
+ a->format_destroy = archive_write_shar_destroy;
+ a->format_write_data = archive_write_shar_data_sed;
+ a->format_finish_entry = archive_write_shar_finish_entry;
+ a->archive.archive_format = ARCHIVE_FORMAT_SHAR_BASE;
+ a->archive.archive_format_name = "shar";
+ return (ARCHIVE_OK);
+}
+
+/*
+ * An alternate 'shar' that uses uudecode instead of 'sed' to encode
+ * file contents and can therefore be used to archive binary files.
+ * In addition, this variant also attempts to restore ownership, file modes,
+ * and other extended file information.
+ */
+int
+archive_write_set_format_shar_dump(struct archive *_a)
+{
+ struct archive_write *a = (struct archive_write *)_a;
+ struct shar *shar;
+
+ archive_write_set_format_shar(&a->archive);
+ shar = (struct shar *)a->format_data;
+ shar->dump = 1;
+ a->format_write_data = archive_write_shar_data_uuencode;
+ a->archive.archive_format = ARCHIVE_FORMAT_SHAR_DUMP;
+ a->archive.archive_format_name = "shar dump";
+ return (ARCHIVE_OK);
+}
+
+static int
+archive_write_shar_header(struct archive_write *a, struct archive_entry *entry)
+{
+ const char *linkname;
+ const char *name;
+ char *p, *pp;
+ struct shar *shar;
+
+ shar = (struct shar *)a->format_data;
+ if (!shar->wrote_header) {
+ archive_strcat(&shar->work, "#!/bin/sh\n");
+ archive_strcat(&shar->work, "# This is a shell archive\n");
+ shar->wrote_header = 1;
+ }
+
+ /* Save the entry for the closing. */
+ if (shar->entry)
+ archive_entry_free(shar->entry);
+ shar->entry = archive_entry_clone(entry);
+ name = archive_entry_pathname(entry);
+
+ /* Handle some preparatory issues. */
+ switch(archive_entry_filetype(entry)) {
+ case AE_IFREG:
+ /* Only regular files have non-zero size. */
+ break;
+ case AE_IFDIR:
+ archive_entry_set_size(entry, 0);
+ /* Don't bother trying to recreate '.' */
+ if (strcmp(name, ".") == 0 || strcmp(name, "./") == 0)
+ return (ARCHIVE_OK);
+ break;
+ case AE_IFIFO:
+ case AE_IFCHR:
+ case AE_IFBLK:
+ /* All other file types have zero size in the archive. */
+ archive_entry_set_size(entry, 0);
+ break;
+ default:
+ archive_entry_set_size(entry, 0);
+ if (archive_entry_hardlink(entry) == NULL &&
+ archive_entry_symlink(entry) == NULL) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "shar format cannot archive this");
+ return (ARCHIVE_WARN);
+ }
+ }
+
+ archive_string_empty(&shar->quoted_name);
+ shar_quote(&shar->quoted_name, name, 1);
+
+ /* Stock preparation for all file types. */
+ archive_string_sprintf(&shar->work, "echo x %s\n", shar->quoted_name.s);
+
+ if (archive_entry_filetype(entry) != AE_IFDIR) {
+ /* Try to create the dir. */
+ p = strdup(name);
+ pp = strrchr(p, '/');
+ /* If there is a / character, try to create the dir. */
+ if (pp != NULL) {
+ *pp = '\0';
+
+ /* Try to avoid a lot of redundant mkdir commands. */
+ if (strcmp(p, ".") == 0) {
+ /* Don't try to "mkdir ." */
+ free(p);
+ } else if (shar->last_dir == NULL) {
+ archive_strcat(&shar->work, "mkdir -p ");
+ shar_quote(&shar->work, p, 1);
+ archive_strcat(&shar->work,
+ " > /dev/null 2>&1\n");
+ shar->last_dir = p;
+ } else if (strcmp(p, shar->last_dir) == 0) {
+ /* We've already created this exact dir. */
+ free(p);
+ } else if (strlen(p) < strlen(shar->last_dir) &&
+ strncmp(p, shar->last_dir, strlen(p)) == 0) {
+ /* We've already created a subdir. */
+ free(p);
+ } else {
+ archive_strcat(&shar->work, "mkdir -p ");
+ shar_quote(&shar->work, p, 1);
+ archive_strcat(&shar->work,
+ " > /dev/null 2>&1\n");
+ shar->last_dir = p;
+ }
+ } else {
+ free(p);
+ }
+ }
+
+ /* Handle file-type specific issues. */
+ shar->has_data = 0;
+ if ((linkname = archive_entry_hardlink(entry)) != NULL) {
+ archive_strcat(&shar->work, "ln -f ");
+ shar_quote(&shar->work, linkname, 1);
+ archive_string_sprintf(&shar->work, " %s\n",
+ shar->quoted_name.s);
+ } else if ((linkname = archive_entry_symlink(entry)) != NULL) {
+ archive_strcat(&shar->work, "ln -fs ");
+ shar_quote(&shar->work, linkname, 1);
+ archive_string_sprintf(&shar->work, " %s\n",
+ shar->quoted_name.s);
+ } else {
+ switch(archive_entry_filetype(entry)) {
+ case AE_IFREG:
+ if (archive_entry_size(entry) == 0) {
+ /* More portable than "touch." */
+ archive_string_sprintf(&shar->work,
+ "test -e \"%s\" || :> \"%s\"\n",
+ shar->quoted_name.s, shar->quoted_name.s);
+ } else {
+ if (shar->dump) {
+ archive_string_sprintf(&shar->work,
+ "uudecode -p > %s << 'SHAR_END'\n",
+ shar->quoted_name.s);
+ archive_string_sprintf(&shar->work,
+ "begin %o ",
+ archive_entry_mode(entry) & 0777);
+ shar_quote(&shar->work, name, 0);
+ archive_strcat(&shar->work, "\n");
+ } else {
+ archive_string_sprintf(&shar->work,
+ "sed 's/^X//' > %s << 'SHAR_END'\n",
+ shar->quoted_name.s);
+ }
+ shar->has_data = 1;
+ shar->end_of_line = 1;
+ shar->outpos = 0;
+ }
+ break;
+ case AE_IFDIR:
+ archive_string_sprintf(&shar->work,
+ "mkdir -p %s > /dev/null 2>&1\n",
+ shar->quoted_name.s);
+ /* Record that we just created this directory. */
+ if (shar->last_dir != NULL)
+ free(shar->last_dir);
+
+ shar->last_dir = strdup(name);
+ /* Trim a trailing '/'. */
+ pp = strrchr(shar->last_dir, '/');
+ if (pp != NULL && pp[1] == '\0')
+ *pp = '\0';
+ /*
+ * TODO: Put dir name/mode on a list to be fixed
+ * up at end of archive.
+ */
+ break;
+ case AE_IFIFO:
+ archive_string_sprintf(&shar->work,
+ "mkfifo %s\n", shar->quoted_name.s);
+ break;
+ case AE_IFCHR:
+ archive_string_sprintf(&shar->work,
+ "mknod %s c %d %d\n", shar->quoted_name.s,
+ archive_entry_rdevmajor(entry),
+ archive_entry_rdevminor(entry));
+ break;
+ case AE_IFBLK:
+ archive_string_sprintf(&shar->work,
+ "mknod %s b %d %d\n", shar->quoted_name.s,
+ archive_entry_rdevmajor(entry),
+ archive_entry_rdevminor(entry));
+ break;
+ default:
+ return (ARCHIVE_WARN);
+ }
+ }
+
+ return (ARCHIVE_OK);
+}
+
+static ssize_t
+archive_write_shar_data_sed(struct archive_write *a, const void *buff, size_t n)
+{
+ static const size_t ensured = 65533;
+ struct shar *shar;
+ const char *src;
+ char *buf, *buf_end;
+ int ret;
+ size_t written = n;
+
+ shar = (struct shar *)a->format_data;
+ if (!shar->has_data || n == 0)
+ return (0);
+
+ src = (const char *)buff;
+
+ /*
+ * ensure is the number of bytes in buffer before expanding the
+ * current character. Each operation writes the current character
+ * and optionally the start-of-new-line marker. This can happen
+ * twice before entering the loop, so make sure three additional
+ * bytes can be written.
+ */
+ if (archive_string_ensure(&shar->work, ensured + 3) == NULL)
+ __archive_errx(1, "Out of memory");
+
+ if (shar->work.length > ensured) {
+ ret = (*a->compressor.write)(a, shar->work.s,
+ shar->work.length);
+ if (ret != ARCHIVE_OK)
+ return (ARCHIVE_FATAL);
+ archive_string_empty(&shar->work);
+ }
+ buf = shar->work.s + shar->work.length;
+ buf_end = shar->work.s + ensured;
+
+ if (shar->end_of_line) {
+ *buf++ = 'X';
+ shar->end_of_line = 0;
+ }
+
+ while (n-- != 0) {
+ if ((*buf++ = *src++) == '\n') {
+ if (n == 0)
+ shar->end_of_line = 1;
+ else
+ *buf++ = 'X';
+ }
+
+ if (buf >= buf_end) {
+ shar->work.length = buf - shar->work.s;
+ ret = (*a->compressor.write)(a, shar->work.s,
+ shar->work.length);
+ if (ret != ARCHIVE_OK)
+ return (ARCHIVE_FATAL);
+ archive_string_empty(&shar->work);
+ buf = shar->work.s;
+ }
+ }
+
+ shar->work.length = buf - shar->work.s;
+
+ return (written);
+}
+
+#define UUENC(c) (((c)!=0) ? ((c) & 077) + ' ': '`')
+
+static void
+uuencode_group(const char _in[3], char out[4])
+{
+ const unsigned char *in = (const unsigned char *)_in;
+ int t;
+
+ t = (in[0] << 16) | (in[1] << 8) | in[2];
+ out[0] = UUENC( 0x3f & (t >> 18) );
+ out[1] = UUENC( 0x3f & (t >> 12) );
+ out[2] = UUENC( 0x3f & (t >> 6) );
+ out[3] = UUENC( 0x3f & t );
+}
+
+static void
+uuencode_line(struct shar *shar, const char *inbuf, size_t len)
+{
+ char tmp_buf[3], *buf;
+ size_t alloc_len;
+
+ /* len <= 45 -> expanded to 60 + len byte + new line */
+ alloc_len = shar->work.length + 62;
+ if (archive_string_ensure(&shar->work, alloc_len) == NULL)
+ __archive_errx(1, "Out of memory");
+
+ buf = shar->work.s + shar->work.length;
+ *buf++ = UUENC(len);
+ while (len >= 3) {
+ uuencode_group(inbuf, buf);
+ len -= 3;
+ inbuf += 3;
+ buf += 4;
+ }
+ if (len != 0) {
+ tmp_buf[0] = inbuf[0];
+ if (len == 1)
+ tmp_buf[1] = '\0';
+ else
+ tmp_buf[1] = inbuf[1];
+ tmp_buf[2] = '\0';
+ uuencode_group(inbuf, buf);
+ buf += 4;
+ }
+ *buf++ = '\n';
+ if ((buf - shar->work.s) > (ptrdiff_t)(shar->work.length + 62))
+ __archive_errx(1, "Buffer overflow");
+ shar->work.length = buf - shar->work.s;
+}
+
+static ssize_t
+archive_write_shar_data_uuencode(struct archive_write *a, const void *buff,
+ size_t length)
+{
+ struct shar *shar;
+ const char *src;
+ size_t n;
+ int ret;
+
+ shar = (struct shar *)a->format_data;
+ if (!shar->has_data)
+ return (ARCHIVE_OK);
+ src = (const char *)buff;
+
+ if (shar->outpos != 0) {
+ n = 45 - shar->outpos;
+ if (n > length)
+ n = length;
+ memcpy(shar->outbuff + shar->outpos, src, n);
+ if (shar->outpos + n < 45) {
+ shar->outpos += n;
+ return length;
+ }
+ uuencode_line(shar, shar->outbuff, 45);
+ src += n;
+ n = length - n;
+ } else {
+ n = length;
+ }
+
+ while (n >= 45) {
+ uuencode_line(shar, src, 45);
+ src += 45;
+ n -= 45;
+
+ if (shar->work.length < 65536)
+ continue;
+ ret = (*a->compressor.write)(a, shar->work.s,
+ shar->work.length);
+ if (ret != ARCHIVE_OK)
+ return (ARCHIVE_FATAL);
+ archive_string_empty(&shar->work);
+ }
+ if (n != 0) {
+ memcpy(shar->outbuff, src, n);
+ shar->outpos = n;
+ }
+ return (length);
+}
+
+static int
+archive_write_shar_finish_entry(struct archive_write *a)
+{
+ const char *g, *p, *u;
+ struct shar *shar;
+ int ret;
+
+ shar = (struct shar *)a->format_data;
+ if (shar->entry == NULL)
+ return (0);
+
+ if (shar->dump) {
+ /* Finish uuencoded data. */
+ if (shar->has_data) {
+ if (shar->outpos > 0)
+ uuencode_line(shar, shar->outbuff,
+ shar->outpos);
+ archive_strcat(&shar->work, "`\nend\n");
+ archive_strcat(&shar->work, "SHAR_END\n");
+ }
+ /* Restore file mode, owner, flags. */
+ /*
+ * TODO: Don't immediately restore mode for
+ * directories; defer that to end of script.
+ */
+ archive_string_sprintf(&shar->work, "chmod %o ",
+ archive_entry_mode(shar->entry) & 07777);
+ shar_quote(&shar->work, archive_entry_pathname(shar->entry), 1);
+ archive_strcat(&shar->work, "\n");
+
+ u = archive_entry_uname(shar->entry);
+ g = archive_entry_gname(shar->entry);
+ if (u != NULL || g != NULL) {
+ archive_strcat(&shar->work, "chown ");
+ if (u != NULL)
+ shar_quote(&shar->work, u, 1);
+ if (g != NULL) {
+ archive_strcat(&shar->work, ":");
+ shar_quote(&shar->work, g, 1);
+ }
+ shar_quote(&shar->work,
+ archive_entry_pathname(shar->entry), 1);
+ archive_strcat(&shar->work, "\n");
+ }
+
+ if ((p = archive_entry_fflags_text(shar->entry)) != NULL) {
+ archive_string_sprintf(&shar->work, "chflags %s ", p);
+ shar_quote(&shar->work,
+ archive_entry_pathname(shar->entry), 1);
+ archive_strcat(&shar->work, "\n");
+ }
+
+ /* TODO: restore ACLs */
+
+ } else {
+ if (shar->has_data) {
+ /* Finish sed-encoded data: ensure last line ends. */
+ if (!shar->end_of_line)
+ archive_strappend_char(&shar->work, '\n');
+ archive_strcat(&shar->work, "SHAR_END\n");
+ }
+ }
+
+ archive_entry_free(shar->entry);
+ shar->entry = NULL;
+
+ if (shar->work.length < 65536)
+ return (ARCHIVE_OK);
+
+ ret = (*a->compressor.write)(a, shar->work.s, shar->work.length);
+ if (ret != ARCHIVE_OK)
+ return (ARCHIVE_FATAL);
+ archive_string_empty(&shar->work);
+
+ return (ARCHIVE_OK);
+}
+
+static int
+archive_write_shar_finish(struct archive_write *a)
+{
+ struct shar *shar;
+ int ret;
+
+ /*
+ * TODO: Accumulate list of directory names/modes and
+ * fix them all up at end-of-archive.
+ */
+
+ shar = (struct shar *)a->format_data;
+
+ /*
+ * Only write the end-of-archive markers if the archive was
+ * actually started. This avoids problems if someone sets
+ * shar format, then sets another format (which would invoke
+ * shar_finish to free the format-specific data).
+ */
+ if (shar->wrote_header == 0)
+ return (ARCHIVE_OK);
+
+ archive_strcat(&shar->work, "exit\n");
+
+ ret = (*a->compressor.write)(a, shar->work.s, shar->work.length);
+ if (ret != ARCHIVE_OK)
+ return (ARCHIVE_FATAL);
+
+ /* Shar output is never padded. */
+ archive_write_set_bytes_in_last_block(&a->archive, 1);
+ /*
+ * TODO: shar should also suppress padding of
+ * uncompressed data within gzip/bzip2 streams.
+ */
+
+ return (ARCHIVE_OK);
+}
+
+static int
+archive_write_shar_destroy(struct archive_write *a)
+{
+ struct shar *shar;
+
+ shar = (struct shar *)a->format_data;
+ if (shar == NULL)
+ return (ARCHIVE_OK);
+
+ archive_entry_free(shar->entry);
+ free(shar->last_dir);
+ archive_string_free(&(shar->work));
+ archive_string_free(&(shar->quoted_name));
+ free(shar);
+ a->format_data = NULL;
+ return (ARCHIVE_OK);
+}
diff --git a/contrib/libarchive/libarchive/archive_write_set_format_ustar.c b/contrib/libarchive/libarchive/archive_write_set_format_ustar.c
new file mode 100644
index 0000000..54893d4
--- /dev/null
+++ b/contrib/libarchive/libarchive/archive_write_set_format_ustar.c
@@ -0,0 +1,587 @@
+/*-
+ * Copyright (c) 2003-2007 Tim Kientzle
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "archive_platform.h"
+__FBSDID("$FreeBSD$");
+
+
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <stdio.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+#include "archive.h"
+#include "archive_entry.h"
+#include "archive_private.h"
+#include "archive_write_private.h"
+
+struct ustar {
+ uint64_t entry_bytes_remaining;
+ uint64_t entry_padding;
+};
+
+/*
+ * Define structure of POSIX 'ustar' tar header.
+ */
+#define USTAR_name_offset 0
+#define USTAR_name_size 100
+#define USTAR_mode_offset 100
+#define USTAR_mode_size 6
+#define USTAR_mode_max_size 8
+#define USTAR_uid_offset 108
+#define USTAR_uid_size 6
+#define USTAR_uid_max_size 8
+#define USTAR_gid_offset 116
+#define USTAR_gid_size 6
+#define USTAR_gid_max_size 8
+#define USTAR_size_offset 124
+#define USTAR_size_size 11
+#define USTAR_size_max_size 12
+#define USTAR_mtime_offset 136
+#define USTAR_mtime_size 11
+#define USTAR_mtime_max_size 11
+#define USTAR_checksum_offset 148
+#define USTAR_checksum_size 8
+#define USTAR_typeflag_offset 156
+#define USTAR_typeflag_size 1
+#define USTAR_linkname_offset 157
+#define USTAR_linkname_size 100
+#define USTAR_magic_offset 257
+#define USTAR_magic_size 6
+#define USTAR_version_offset 263
+#define USTAR_version_size 2
+#define USTAR_uname_offset 265
+#define USTAR_uname_size 32
+#define USTAR_gname_offset 297
+#define USTAR_gname_size 32
+#define USTAR_rdevmajor_offset 329
+#define USTAR_rdevmajor_size 6
+#define USTAR_rdevmajor_max_size 8
+#define USTAR_rdevminor_offset 337
+#define USTAR_rdevminor_size 6
+#define USTAR_rdevminor_max_size 8
+#define USTAR_prefix_offset 345
+#define USTAR_prefix_size 155
+#define USTAR_padding_offset 500
+#define USTAR_padding_size 12
+
+/*
+ * A filled-in copy of the header for initialization.
+ */
+static const char template_header[] = {
+ /* name: 100 bytes */
+ 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+ 0,0,0,0,
+ /* Mode, space-null termination: 8 bytes */
+ '0','0','0','0','0','0', ' ','\0',
+ /* uid, space-null termination: 8 bytes */
+ '0','0','0','0','0','0', ' ','\0',
+ /* gid, space-null termination: 8 bytes */
+ '0','0','0','0','0','0', ' ','\0',
+ /* size, space termation: 12 bytes */
+ '0','0','0','0','0','0','0','0','0','0','0', ' ',
+ /* mtime, space termation: 12 bytes */
+ '0','0','0','0','0','0','0','0','0','0','0', ' ',
+ /* Initial checksum value: 8 spaces */
+ ' ',' ',' ',' ',' ',' ',' ',' ',
+ /* Typeflag: 1 byte */
+ '0', /* '0' = regular file */
+ /* Linkname: 100 bytes */
+ 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+ 0,0,0,0,
+ /* Magic: 6 bytes, Version: 2 bytes */
+ 'u','s','t','a','r','\0', '0','0',
+ /* Uname: 32 bytes */
+ 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+ /* Gname: 32 bytes */
+ 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+ /* rdevmajor + space/null padding: 8 bytes */
+ '0','0','0','0','0','0', ' ','\0',
+ /* rdevminor + space/null padding: 8 bytes */
+ '0','0','0','0','0','0', ' ','\0',
+ /* Prefix: 155 bytes */
+ 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,
+ /* Padding: 12 bytes */
+ 0,0,0,0,0,0,0,0, 0,0,0,0
+};
+
+static ssize_t archive_write_ustar_data(struct archive_write *a, const void *buff,
+ size_t s);
+static int archive_write_ustar_destroy(struct archive_write *);
+static int archive_write_ustar_finish(struct archive_write *);
+static int archive_write_ustar_finish_entry(struct archive_write *);
+static int archive_write_ustar_header(struct archive_write *,
+ struct archive_entry *entry);
+static int format_256(int64_t, char *, int);
+static int format_number(int64_t, char *, int size, int max, int strict);
+static int format_octal(int64_t, char *, int);
+static int write_nulls(struct archive_write *a, size_t);
+
+/*
+ * Set output format to 'ustar' format.
+ */
+int
+archive_write_set_format_ustar(struct archive *_a)
+{
+ struct archive_write *a = (struct archive_write *)_a;
+ struct ustar *ustar;
+
+ /* If someone else was already registered, unregister them. */
+ if (a->format_destroy != NULL)
+ (a->format_destroy)(a);
+
+ /* Basic internal sanity test. */
+ if (sizeof(template_header) != 512) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, "Internal: template_header wrong size: %d should be 512", (int)sizeof(template_header));
+ return (ARCHIVE_FATAL);
+ }
+
+ ustar = (struct ustar *)malloc(sizeof(*ustar));
+ if (ustar == NULL) {
+ archive_set_error(&a->archive, ENOMEM, "Can't allocate ustar data");
+ return (ARCHIVE_FATAL);
+ }
+ memset(ustar, 0, sizeof(*ustar));
+ a->format_data = ustar;
+
+ a->pad_uncompressed = 1; /* Mimic gtar in this respect. */
+ a->format_name = "ustar";
+ a->format_write_header = archive_write_ustar_header;
+ a->format_write_data = archive_write_ustar_data;
+ a->format_finish = archive_write_ustar_finish;
+ a->format_destroy = archive_write_ustar_destroy;
+ a->format_finish_entry = archive_write_ustar_finish_entry;
+ a->archive.archive_format = ARCHIVE_FORMAT_TAR_USTAR;
+ a->archive.archive_format_name = "POSIX ustar";
+ return (ARCHIVE_OK);
+}
+
+static int
+archive_write_ustar_header(struct archive_write *a, struct archive_entry *entry)
+{
+ char buff[512];
+ int ret, ret2;
+ struct ustar *ustar;
+
+ ustar = (struct ustar *)a->format_data;
+
+ /* Only regular files (not hardlinks) have data. */
+ if (archive_entry_hardlink(entry) != NULL ||
+ archive_entry_symlink(entry) != NULL ||
+ !(archive_entry_filetype(entry) == AE_IFREG))
+ archive_entry_set_size(entry, 0);
+
+ if (AE_IFDIR == archive_entry_filetype(entry)) {
+ const char *p;
+ char *t;
+ /*
+ * Ensure a trailing '/'. Modify the entry so
+ * the client sees the change.
+ */
+ p = archive_entry_pathname(entry);
+ if (p[strlen(p) - 1] != '/') {
+ t = (char *)malloc(strlen(p) + 2);
+ if (t == NULL) {
+ archive_set_error(&a->archive, ENOMEM,
+ "Can't allocate ustar data");
+ return(ARCHIVE_FATAL);
+ }
+ strcpy(t, p);
+ strcat(t, "/");
+ archive_entry_copy_pathname(entry, t);
+ free(t);
+ }
+ }
+
+ ret = __archive_write_format_header_ustar(a, buff, entry, -1, 1);
+ if (ret < ARCHIVE_WARN)
+ return (ret);
+ ret2 = (a->compressor.write)(a, buff, 512);
+ if (ret2 < ARCHIVE_WARN)
+ return (ret2);
+ if (ret2 < ret)
+ ret = ret2;
+
+ ustar->entry_bytes_remaining = archive_entry_size(entry);
+ ustar->entry_padding = 0x1ff & (-(int64_t)ustar->entry_bytes_remaining);
+ return (ret);
+}
+
+/*
+ * Format a basic 512-byte "ustar" header.
+ *
+ * Returns -1 if format failed (due to field overflow).
+ * Note that this always formats as much of the header as possible.
+ * If "strict" is set to zero, it will extend numeric fields as
+ * necessary (overwriting terminators or using base-256 extensions).
+ *
+ * This is exported so that other 'tar' formats can use it.
+ */
+int
+__archive_write_format_header_ustar(struct archive_write *a, char h[512],
+ struct archive_entry *entry, int tartype, int strict)
+{
+ unsigned int checksum;
+ int i, ret;
+ size_t copy_length;
+ const char *p, *pp;
+ int mytartype;
+
+ ret = 0;
+ mytartype = -1;
+ /*
+ * The "template header" already includes the "ustar"
+ * signature, various end-of-field markers and other required
+ * elements.
+ */
+ memcpy(h, &template_header, 512);
+
+ /*
+ * Because the block is already null-filled, and strings
+ * are allowed to exactly fill their destination (without null),
+ * I use memcpy(dest, src, strlen()) here a lot to copy strings.
+ */
+
+ pp = archive_entry_pathname(entry);
+ if (strlen(pp) <= USTAR_name_size)
+ memcpy(h + USTAR_name_offset, pp, strlen(pp));
+ else {
+ /* Store in two pieces, splitting at a '/'. */
+ p = strchr(pp + strlen(pp) - USTAR_name_size - 1, '/');
+ /*
+ * Look for the next '/' if we chose the first character
+ * as the separator. (ustar format doesn't permit
+ * an empty prefix.)
+ */
+ if (p == pp)
+ p = strchr(p + 1, '/');
+ /* Fail if the name won't fit. */
+ if (!p) {
+ /* No separator. */
+ archive_set_error(&a->archive, ENAMETOOLONG,
+ "Pathname too long");
+ ret = ARCHIVE_FAILED;
+ } else if (p[1] == '\0') {
+ /*
+ * The only feasible separator is a final '/';
+ * this would result in a non-empty prefix and
+ * an empty name, which POSIX doesn't
+ * explicity forbid, but it just feels wrong.
+ */
+ archive_set_error(&a->archive, ENAMETOOLONG,
+ "Pathname too long");
+ ret = ARCHIVE_FAILED;
+ } else if (p > pp + USTAR_prefix_size) {
+ /* Prefix is too long. */
+ archive_set_error(&a->archive, ENAMETOOLONG,
+ "Pathname too long");
+ ret = ARCHIVE_FAILED;
+ } else {
+ /* Copy prefix and remainder to appropriate places */
+ memcpy(h + USTAR_prefix_offset, pp, p - pp);
+ memcpy(h + USTAR_name_offset, p + 1, pp + strlen(pp) - p - 1);
+ }
+ }
+
+ p = archive_entry_hardlink(entry);
+ if (p != NULL)
+ mytartype = '1';
+ else
+ p = archive_entry_symlink(entry);
+ if (p != NULL && p[0] != '\0') {
+ copy_length = strlen(p);
+ if (copy_length > USTAR_linkname_size) {
+ archive_set_error(&a->archive, ENAMETOOLONG,
+ "Link contents too long");
+ ret = ARCHIVE_FAILED;
+ copy_length = USTAR_linkname_size;
+ }
+ memcpy(h + USTAR_linkname_offset, p, copy_length);
+ }
+
+ p = archive_entry_uname(entry);
+ if (p != NULL && p[0] != '\0') {
+ copy_length = strlen(p);
+ if (copy_length > USTAR_uname_size) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "Username too long");
+ ret = ARCHIVE_FAILED;
+ copy_length = USTAR_uname_size;
+ }
+ memcpy(h + USTAR_uname_offset, p, copy_length);
+ }
+
+ p = archive_entry_gname(entry);
+ if (p != NULL && p[0] != '\0') {
+ copy_length = strlen(p);
+ if (strlen(p) > USTAR_gname_size) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "Group name too long");
+ ret = ARCHIVE_FAILED;
+ copy_length = USTAR_gname_size;
+ }
+ memcpy(h + USTAR_gname_offset, p, copy_length);
+ }
+
+ if (format_number(archive_entry_mode(entry) & 07777, h + USTAR_mode_offset, USTAR_mode_size, USTAR_mode_max_size, strict)) {
+ archive_set_error(&a->archive, ERANGE, "Numeric mode too large");
+ ret = ARCHIVE_FAILED;
+ }
+
+ if (format_number(archive_entry_uid(entry), h + USTAR_uid_offset, USTAR_uid_size, USTAR_uid_max_size, strict)) {
+ archive_set_error(&a->archive, ERANGE, "Numeric user ID too large");
+ ret = ARCHIVE_FAILED;
+ }
+
+ if (format_number(archive_entry_gid(entry), h + USTAR_gid_offset, USTAR_gid_size, USTAR_gid_max_size, strict)) {
+ archive_set_error(&a->archive, ERANGE, "Numeric group ID too large");
+ ret = ARCHIVE_FAILED;
+ }
+
+ if (format_number(archive_entry_size(entry), h + USTAR_size_offset, USTAR_size_size, USTAR_size_max_size, strict)) {
+ archive_set_error(&a->archive, ERANGE, "File size out of range");
+ ret = ARCHIVE_FAILED;
+ }
+
+ if (format_number(archive_entry_mtime(entry), h + USTAR_mtime_offset, USTAR_mtime_size, USTAR_mtime_max_size, strict)) {
+ archive_set_error(&a->archive, ERANGE,
+ "File modification time too large");
+ ret = ARCHIVE_FAILED;
+ }
+
+ if (archive_entry_filetype(entry) == AE_IFBLK
+ || archive_entry_filetype(entry) == AE_IFCHR) {
+ if (format_number(archive_entry_rdevmajor(entry), h + USTAR_rdevmajor_offset,
+ USTAR_rdevmajor_size, USTAR_rdevmajor_max_size, strict)) {
+ archive_set_error(&a->archive, ERANGE,
+ "Major device number too large");
+ ret = ARCHIVE_FAILED;
+ }
+
+ if (format_number(archive_entry_rdevminor(entry), h + USTAR_rdevminor_offset,
+ USTAR_rdevminor_size, USTAR_rdevminor_max_size, strict)) {
+ archive_set_error(&a->archive, ERANGE,
+ "Minor device number too large");
+ ret = ARCHIVE_FAILED;
+ }
+ }
+
+ if (tartype >= 0) {
+ h[USTAR_typeflag_offset] = tartype;
+ } else if (mytartype >= 0) {
+ h[USTAR_typeflag_offset] = mytartype;
+ } else {
+ switch (archive_entry_filetype(entry)) {
+ case AE_IFREG: h[USTAR_typeflag_offset] = '0' ; break;
+ case AE_IFLNK: h[USTAR_typeflag_offset] = '2' ; break;
+ case AE_IFCHR: h[USTAR_typeflag_offset] = '3' ; break;
+ case AE_IFBLK: h[USTAR_typeflag_offset] = '4' ; break;
+ case AE_IFDIR: h[USTAR_typeflag_offset] = '5' ; break;
+ case AE_IFIFO: h[USTAR_typeflag_offset] = '6' ; break;
+ case AE_IFSOCK:
+ archive_set_error(&a->archive,
+ ARCHIVE_ERRNO_FILE_FORMAT,
+ "tar format cannot archive socket");
+ return (ARCHIVE_FAILED);
+ default:
+ archive_set_error(&a->archive,
+ ARCHIVE_ERRNO_FILE_FORMAT,
+ "tar format cannot archive this (mode=0%lo)",
+ (unsigned long)archive_entry_mode(entry));
+ ret = ARCHIVE_FAILED;
+ }
+ }
+
+ checksum = 0;
+ for (i = 0; i < 512; i++)
+ checksum += 255 & (unsigned int)h[i];
+ h[USTAR_checksum_offset + 6] = '\0'; /* Can't be pre-set in the template. */
+ /* h[USTAR_checksum_offset + 7] = ' '; */ /* This is pre-set in the template. */
+ format_octal(checksum, h + USTAR_checksum_offset, 6);
+ return (ret);
+}
+
+/*
+ * Format a number into a field, with some intelligence.
+ */
+static int
+format_number(int64_t v, char *p, int s, int maxsize, int strict)
+{
+ int64_t limit;
+
+ limit = ((int64_t)1 << (s*3));
+
+ /* "Strict" only permits octal values with proper termination. */
+ if (strict)
+ return (format_octal(v, p, s));
+
+ /*
+ * In non-strict mode, we allow the number to overwrite one or
+ * more bytes of the field termination. Even old tar
+ * implementations should be able to handle this with no
+ * problem.
+ */
+ if (v >= 0) {
+ while (s <= maxsize) {
+ if (v < limit)
+ return (format_octal(v, p, s));
+ s++;
+ limit <<= 3;
+ }
+ }
+
+ /* Base-256 can handle any number, positive or negative. */
+ return (format_256(v, p, maxsize));
+}
+
+/*
+ * Format a number into the specified field using base-256.
+ */
+static int
+format_256(int64_t v, char *p, int s)
+{
+ p += s;
+ while (s-- > 0) {
+ *--p = (char)(v & 0xff);
+ v >>= 8;
+ }
+ *p |= 0x80; /* Set the base-256 marker bit. */
+ return (0);
+}
+
+/*
+ * Format a number into the specified field.
+ */
+static int
+format_octal(int64_t v, char *p, int s)
+{
+ int len;
+
+ len = s;
+
+ /* Octal values can't be negative, so use 0. */
+ if (v < 0) {
+ while (len-- > 0)
+ *p++ = '0';
+ return (-1);
+ }
+
+ p += s; /* Start at the end and work backwards. */
+ while (s-- > 0) {
+ *--p = (char)('0' + (v & 7));
+ v >>= 3;
+ }
+
+ if (v == 0)
+ return (0);
+
+ /* If it overflowed, fill field with max value. */
+ while (len-- > 0)
+ *p++ = '7';
+
+ return (-1);
+}
+
+static int
+archive_write_ustar_finish(struct archive_write *a)
+{
+ int r;
+
+ if (a->compressor.write == NULL)
+ return (ARCHIVE_OK);
+
+ r = write_nulls(a, 512*2);
+ return (r);
+}
+
+static int
+archive_write_ustar_destroy(struct archive_write *a)
+{
+ struct ustar *ustar;
+
+ ustar = (struct ustar *)a->format_data;
+ free(ustar);
+ a->format_data = NULL;
+ return (ARCHIVE_OK);
+}
+
+static int
+archive_write_ustar_finish_entry(struct archive_write *a)
+{
+ struct ustar *ustar;
+ int ret;
+
+ ustar = (struct ustar *)a->format_data;
+ ret = write_nulls(a,
+ ustar->entry_bytes_remaining + ustar->entry_padding);
+ ustar->entry_bytes_remaining = ustar->entry_padding = 0;
+ return (ret);
+}
+
+static int
+write_nulls(struct archive_write *a, size_t padding)
+{
+ int ret;
+ size_t to_write;
+
+ while (padding > 0) {
+ to_write = padding < a->null_length ? padding : a->null_length;
+ ret = (a->compressor.write)(a, a->nulls, to_write);
+ if (ret != ARCHIVE_OK)
+ return (ret);
+ padding -= to_write;
+ }
+ return (ARCHIVE_OK);
+}
+
+static ssize_t
+archive_write_ustar_data(struct archive_write *a, const void *buff, size_t s)
+{
+ struct ustar *ustar;
+ int ret;
+
+ ustar = (struct ustar *)a->format_data;
+ if (s > ustar->entry_bytes_remaining)
+ s = ustar->entry_bytes_remaining;
+ ret = (a->compressor.write)(a, buff, s);
+ ustar->entry_bytes_remaining -= s;
+ if (ret != ARCHIVE_OK)
+ return (ret);
+ return (s);
+}
diff --git a/lib/libarchive/archive_write_set_format_zip.c b/contrib/libarchive/libarchive/archive_write_set_format_zip.c
index 1bbbb6a..1bbbb6a 100644
--- a/lib/libarchive/archive_write_set_format_zip.c
+++ b/contrib/libarchive/libarchive/archive_write_set_format_zip.c
diff --git a/lib/libarchive/cpio.5 b/contrib/libarchive/libarchive/cpio.5
index 5bc60fe..5bc60fe 100644
--- a/lib/libarchive/cpio.5
+++ b/contrib/libarchive/libarchive/cpio.5
diff --git a/lib/libarchive/filter_fork.c b/contrib/libarchive/libarchive/filter_fork.c
index d2a1e88..d2a1e88 100644
--- a/lib/libarchive/filter_fork.c
+++ b/contrib/libarchive/libarchive/filter_fork.c
diff --git a/lib/libarchive/filter_fork.h b/contrib/libarchive/libarchive/filter_fork.h
index 77ff71b..77ff71b 100644
--- a/lib/libarchive/filter_fork.h
+++ b/contrib/libarchive/libarchive/filter_fork.h
diff --git a/contrib/libarchive/libarchive/libarchive-formats.5 b/contrib/libarchive/libarchive/libarchive-formats.5
new file mode 100644
index 0000000..e6849b9
--- /dev/null
+++ b/contrib/libarchive/libarchive/libarchive-formats.5
@@ -0,0 +1,355 @@
+.\" Copyright (c) 2003-2009 Tim Kientzle
+.\" 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.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 27, 2009
+.Dt LIBARCHIVE-FORMATS 5
+.Os
+.Sh NAME
+.Nm libarchive-formats
+.Nd archive formats supported by the libarchive library
+.Sh DESCRIPTION
+The
+.Xr libarchive 3
+library reads and writes a variety of streaming archive formats.
+Generally speaking, all of these archive formats consist of a series of
+.Dq entries .
+Each entry stores a single file system object, such as a file, directory,
+or symbolic link.
+.Pp
+The following provides a brief description of each format supported
+by libarchive, with some information about recognized extensions or
+limitations of the current library support.
+Note that just because a format is supported by libarchive does not
+imply that a program that uses libarchive will support that format.
+Applications that use libarchive specify which formats they wish
+to support, though many programs do use libarchive convenience
+functions to enable all supported formats.
+.Ss Tar Formats
+The
+.Xr libarchive 3
+library can read most tar archives.
+However, it only writes POSIX-standard
+.Dq ustar
+and
+.Dq pax interchange
+formats.
+.Pp
+All tar formats store each entry in one or more 512-byte records.
+The first record is used for file metadata, including filename,
+timestamp, and mode information, and the file data is stored in
+subsequent records.
+Later variants have extended this by either appropriating undefined
+areas of the header record, extending the header to multiple records,
+or by storing special entries that modify the interpretation of
+subsequent entries.
+.Pp
+.Bl -tag -width indent
+.It Cm gnutar
+The
+.Xr libarchive 3
+library can read GNU-format tar archives.
+It currently supports the most popular GNU extensions, including
+modern long filename and linkname support, as well as atime and ctime data.
+The libarchive library does not support multi-volume
+archives, nor the old GNU long filename format.
+It can read GNU sparse file entries, including the new POSIX-based
+formats, but cannot write GNU sparse file entries.
+.It Cm pax
+The
+.Xr libarchive 3
+library can read and write POSIX-compliant pax interchange format
+archives.
+Pax interchange format archives are an extension of the older ustar
+format that adds a separate entry with additional attributes stored
+as key/value pairs immediately before each regular entry.
+The presence of these additional entries is the only difference between
+pax interchange format and the older ustar format.
+The extended attributes are of unlimited length and are stored
+as UTF-8 Unicode strings.
+Keywords defined in the standard are in all lowercase; vendors are allowed
+to define custom keys by preceding them with the vendor name in all uppercase.
+When writing pax archives, libarchive uses many of the SCHILY keys
+defined by Joerg Schilling's
+.Dq star
+archiver and a few LIBARCHIVE keys.
+The libarchive library can read most of the SCHILY keys
+and most of the GNU keys introduced by GNU tar.
+It silently ignores any keywords that it does not understand.
+.It Cm restricted pax
+The libarchive library can also write pax archives in which it
+attempts to suppress the extended attributes entry whenever
+possible.
+The result will be identical to a ustar archive unless the
+extended attributes entry is required to store a long file
+name, long linkname, extended ACL, file flags, or if any of the standard
+ustar data (user name, group name, UID, GID, etc) cannot be fully
+represented in the ustar header.
+In all cases, the result can be dearchived by any program that
+can read POSIX-compliant pax interchange format archives.
+Programs that correctly read ustar format (see below) will also be
+able to read this format; any extended attributes will be extracted as
+separate files stored in
+.Pa PaxHeader
+directories.
+.It Cm ustar
+The libarchive library can both read and write this format.
+This format has the following limitations:
+.Bl -bullet -compact
+.It
+Device major and minor numbers are limited to 21 bits.
+Nodes with larger numbers will not be added to the archive.
+.It
+Path names in the archive are limited to 255 bytes.
+(Shorter if there is no / character in exactly the right place.)
+.It
+Symbolic links and hard links are stored in the archive with
+the name of the referenced file.
+This name is limited to 100 bytes.
+.It
+Extended attributes, file flags, and other extended
+security information cannot be stored.
+.It
+Archive entries are limited to 8 gigabytes in size.
+.El
+Note that the pax interchange format has none of these restrictions.
+.El
+.Pp
+The libarchive library also reads a variety of commonly-used extensions to
+the basic tar format.
+These extensions are recognized automatically whenever they appear.
+.Bl -tag -width indent
+.It Numeric extensions.
+The POSIX standards require fixed-length numeric fields to be written with
+some character position reserved for terminators.
+Libarchive allows these fields to be written without terminator characters.
+This extends the allowable range; in particular, ustar archives with this
+extension can support entries up to 64 gigabytes in size.
+Libarchive also recognizes base-256 values in most numeric fields.
+This essentially removes all limitations on file size, modification time,
+and device numbers.
+.It Solaris extensions
+Libarchive recognizes ACL and extended attribute records written
+by Solaris tar.
+Currently, libarchive only has support for old-style ACLs; the
+newer NFSv4 ACLs are recognized but discarded.
+.El
+.Pp
+The first tar program appeared in Seventh Edition Unix in 1979.
+The first official standard for the tar file format was the
+.Dq ustar
+(Unix Standard Tar) format defined by POSIX in 1988.
+POSIX.1-2001 extended the ustar format to create the
+.Dq pax interchange
+format.
+.Ss Cpio Formats
+The libarchive library can read a number of common cpio variants and can write
+.Dq odc
+and
+.Dq newc
+format archives.
+A cpio archive stores each entry as a fixed-size header followed
+by a variable-length filename and variable-length data.
+Unlike the tar format, the cpio format does only minimal padding
+of the header or file data.
+There are several cpio variants, which differ primarily in
+how they store the initial header: some store the values as
+octal or hexadecimal numbers in ASCII, others as binary values of
+varying byte order and length.
+.Bl -tag -width indent
+.It Cm binary
+The libarchive library transparently reads both big-endian and little-endian
+variants of the original binary cpio format.
+This format used 32-bit binary values for file size and mtime,
+and 16-bit binary values for the other fields.
+.It Cm odc
+The libarchive library can both read and write this
+POSIX-standard format, which is officially known as the
+.Dq cpio interchange format
+or the
+.Dq octet-oriented cpio archive format
+and sometimes unofficially referred to as the
+.Dq old character format .
+This format stores the header contents as octal values in ASCII.
+It is standard, portable, and immune from byte-order confusion.
+File sizes and mtime are limited to 33 bits (8GB file size),
+other fields are limited to 18 bits.
+.It Cm SVR4
+The libarchive library can read both CRC and non-CRC variants of
+this format.
+The SVR4 format uses eight-digit hexadecimal values for
+all header fields.
+This limits file size to 4GB, and also limits the mtime and
+other fields to 32 bits.
+The SVR4 format can optionally include a CRC of the file
+contents, although libarchive does not currently verify this CRC.
+.El
+.Pp
+Cpio first appeared in PWB/UNIX 1.0, which was released within
+AT&T in 1977.
+PWB/UNIX 1.0 formed the basis of System III Unix, released outside
+of AT&T in 1981.
+This makes cpio older than tar, although cpio was not included
+in Version 7 AT&T Unix.
+As a result, the tar command became much better known in universities
+and research groups that used Version 7.
+The combination of the
+.Nm find
+and
+.Nm cpio
+utilities provided very precise control over file selection.
+Unfortunately, the format has many limitations that make it unsuitable
+for widespread use.
+Only the POSIX format permits files over 4GB, and its 18-bit
+limit for most other fields makes it unsuitable for modern systems.
+In addition, cpio formats only store numeric UID/GID values (not
+usernames and group names), which can make it very difficult to correctly
+transfer archives across systems with dissimilar user numbering.
+.Ss Shar Formats
+A
+.Dq shell archive
+is a shell script that, when executed on a POSIX-compliant
+system, will recreate a collection of file system objects.
+The libarchive library can write two different kinds of shar archives:
+.Bl -tag -width indent
+.It Cm shar
+The traditional shar format uses a limited set of POSIX
+commands, including
+.Xr echo 1 ,
+.Xr mkdir 1 ,
+and
+.Xr sed 1 .
+It is suitable for portably archiving small collections of plain text files.
+However, it is not generally well-suited for large archives
+(many implementations of
+.Xr sh 1
+have limits on the size of a script) nor should it be used with non-text files.
+.It Cm shardump
+This format is similar to shar but encodes files using
+.Xr uuencode 1
+so that the result will be a plain text file regardless of the file contents.
+It also includes additional shell commands that attempt to reproduce as
+many file attributes as possible, including owner, mode, and flags.
+The additional commands used to restore file attributes make
+shardump archives less portable than plain shar archives.
+.El
+.Ss ISO9660 format
+Libarchive can read and extract from files containing ISO9660-compliant
+CDROM images.
+In many cases, this can remove the need to burn a physical CDROM
+just in order to read the files contained in an ISO9660 image.
+It also avoids security and complexity issues that come with
+virtual mounts and loopback devices.
+Libarchive supports the most common Rockridge extensions and has partial
+support for Joliet extensions.
+If both extensions are present, the Joliet extensions will be
+used and the Rockridge extensions will be ignored.
+In particular, this can create problems with hardlinks and symlinks,
+which are supported by Rockridge but not by Joliet.
+.Ss Zip format
+Libarchive can read and write zip format archives that have
+uncompressed entries and entries compressed with the
+.Dq deflate
+algorithm.
+Older zip compression algorithms are not supported.
+It can extract jar archives, archives that use Zip64 extensions and many
+self-extracting zip archives.
+Libarchive reads Zip archives as they are being streamed,
+which allows it to read archives of arbitrary size.
+It currently does not use the central directory; this
+limits libarchive's ability to support some self-extracting
+archives and ones that have been modified in certain ways.
+.Ss Archive (library) file format
+The Unix archive format (commonly created by the
+.Xr ar 1
+archiver) is a general-purpose format which is
+used almost exclusively for object files to be
+read by the link editor
+.Xr ld 1 .
+The ar format has never been standardised.
+There are two common variants:
+the GNU format derived from SVR4,
+and the BSD format, which first appeared in 4.4BSD.
+The two differ primarily in their handling of filenames
+longer than 15 characters:
+the GNU/SVR4 variant writes a filename table at the beginning of the archive;
+the BSD format stores each long filename in an extension
+area adjacent to the entry.
+Libarchive can read both extensions,
+including archives that may include both types of long filenames.
+Programs using libarchive can write GNU/SVR4 format
+if they provide a filename table to be written into
+the archive before any of the entries.
+Any entries whose names are not in the filename table
+will be written using BSD-style long filenames.
+This can cause problems for programs such as
+GNU ld that do not support the BSD-style long filenames.
+.Ss mtree
+Libarchive can read and write files in
+.Xr mtree 5
+format.
+This format is not a true archive format, but rather a textual description
+of a file hierarchy in which each line specifies the name of a file and
+provides specific metadata about that file.
+Libarchive can read all of the keywords supported by both
+the NetBSD and FreeBSD versions of
+.Xr mtree 1 ,
+although many of the keywords cannot currently be stored in an
+.Tn archive_entry
+object.
+When writing, libarchive supports use of the
+.Xr archive_write_set_options 3
+interface to specify which keywords should be included in the
+output.
+If libarchive was compiled with access to suitable
+cryptographic libraries (such as the OpenSSL libraries),
+it can compute hash entries such as
+.Cm sha512
+or
+.Cm md5
+from file data being written to the mtree writer.
+.Pp
+When reading an mtree file, libarchive will locate the corresponding
+files on disk using the
+.Cm contents
+keyword if present or the regular filename.
+If it can locate and open the file on disk, it will use that
+to fill in any metadata that is missing from the mtree file
+and will read the file contents and return those to the program
+using libarchive.
+If it cannot locate and open the file on disk, libarchive
+will return an error for any attempt to read the entry
+body.
+.Sh SEE ALSO
+.Xr ar 1 ,
+.Xr cpio 1 ,
+.Xr mkisofs 1 ,
+.Xr shar 1 ,
+.Xr tar 1 ,
+.Xr zip 1 ,
+.Xr zlib 3 ,
+.Xr cpio 5 ,
+.Xr mtree 5 ,
+.Xr tar 5
diff --git a/contrib/libarchive/libarchive/libarchive.3 b/contrib/libarchive/libarchive/libarchive.3
new file mode 100644
index 0000000..445d4aa
--- /dev/null
+++ b/contrib/libarchive/libarchive/libarchive.3
@@ -0,0 +1,369 @@
+.\" Copyright (c) 2003-2007 Tim Kientzle
+.\" 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.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 17, 2010
+.Dt LIBARCHIVE 3
+.Os
+.Sh NAME
+.Nm libarchive
+.Nd functions for reading and writing streaming archives
+.Sh LIBRARY
+.Lb libarchive
+.Sh OVERVIEW
+The
+.Nm
+library provides a flexible interface for reading and writing
+streaming archive files such as tar and cpio.
+The library is inherently stream-oriented; readers serially iterate through
+the archive, writers serially add things to the archive.
+In particular, note that there is no built-in support for
+random access nor for in-place modification.
+.Pp
+When reading an archive, the library automatically detects the
+format and the compression.
+The library currently has read support for:
+.Bl -bullet -compact
+.It
+old-style tar archives,
+.It
+most variants of the POSIX
+.Dq ustar
+format,
+.It
+the POSIX
+.Dq pax interchange
+format,
+.It
+GNU-format tar archives,
+.It
+most common cpio archive formats,
+.It
+ISO9660 CD images (including RockRidge and Joliet extensions),
+.It
+Zip archives.
+.El
+The library automatically detects archives compressed with
+.Xr gzip 1 ,
+.Xr bzip2 1 ,
+.Xr xz 1 ,
+or
+.Xr compress 1
+and decompresses them transparently.
+.Pp
+When writing an archive, you can specify the compression
+to be used and the format to use.
+The library can write
+.Bl -bullet -compact
+.It
+POSIX-standard
+.Dq ustar
+archives,
+.It
+POSIX
+.Dq pax interchange format
+archives,
+.It
+POSIX octet-oriented cpio archives,
+.It
+Zip archive,
+.It
+two different variants of shar archives.
+.El
+Pax interchange format is an extension of the tar archive format that
+eliminates essentially all of the limitations of historic tar formats
+in a standard fashion that is supported
+by POSIX-compliant
+.Xr pax 1
+implementations on many systems as well as several newer implementations of
+.Xr tar 1 .
+Note that the default write format will suppress the pax extended
+attributes for most entries; explicitly requesting pax format will
+enable those attributes for all entries.
+.Pp
+The read and write APIs are accessed through the
+.Fn archive_read_XXX
+functions and the
+.Fn archive_write_XXX
+functions, respectively, and either can be used independently
+of the other.
+.Pp
+The rest of this manual page provides an overview of the library
+operation.
+More detailed information can be found in the individual manual
+pages for each API or utility function.
+.Sh READING AN ARCHIVE
+To read an archive, you must first obtain an initialized
+.Tn struct archive
+object from
+.Fn archive_read_new .
+You can then modify this object for the desired operations with the
+various
+.Fn archive_read_set_XXX
+and
+.Fn archive_read_support_XXX
+functions.
+In particular, you will need to invoke appropriate
+.Fn archive_read_support_XXX
+functions to enable the corresponding compression and format
+support.
+Note that these latter functions perform two distinct operations:
+they cause the corresponding support code to be linked into your
+program, and they enable the corresponding auto-detect code.
+Unless you have specific constraints, you will generally want
+to invoke
+.Fn archive_read_support_compression_all
+and
+.Fn archive_read_support_format_all
+to enable auto-detect for all formats and compression types
+currently supported by the library.
+.Pp
+Once you have prepared the
+.Tn struct archive
+object, you call
+.Fn archive_read_open
+to actually open the archive and prepare it for reading.
+There are several variants of this function;
+the most basic expects you to provide pointers to several
+functions that can provide blocks of bytes from the archive.
+There are convenience forms that allow you to
+specify a filename, file descriptor,
+.Ft "FILE *"
+object, or a block of memory from which to read the archive data.
+Note that the core library makes no assumptions about the
+size of the blocks read;
+callback functions are free to read whatever block size is
+most appropriate for the medium.
+.Pp
+Each archive entry consists of a header followed by a certain
+amount of data.
+You can obtain the next header with
+.Fn archive_read_next_header ,
+which returns a pointer to an
+.Tn struct archive_entry
+structure with information about the current archive element.
+If the entry is a regular file, then the header will be followed
+by the file data.
+You can use
+.Fn archive_read_data
+(which works much like the
+.Xr read 2
+system call)
+to read this data from the archive, or
+.Fn archive_read_data_block
+which provides a slightly more efficient interface.
+You may prefer to use the higher-level
+.Fn archive_read_data_skip ,
+which reads and discards the data for this entry,
+.Fn archive_read_data_to_file ,
+which copies the data to the provided file descriptor, or
+.Fn archive_read_extract ,
+which recreates the specified entry on disk and copies data
+from the archive.
+In particular, note that
+.Fn archive_read_extract
+uses the
+.Tn struct archive_entry
+structure that you provide it, which may differ from the
+entry just read from the archive.
+In particular, many applications will want to override the
+pathname, file permissions, or ownership.
+.Pp
+Once you have finished reading data from the archive, you
+should call
+.Fn archive_read_close
+to close the archive, then call
+.Fn archive_read_free
+to release all resources, including all memory allocated by the library.
+.Pp
+The
+.Xr archive_read 3
+manual page provides more detailed calling information for this API.
+.Sh WRITING AN ARCHIVE
+You use a similar process to write an archive.
+The
+.Fn archive_write_new
+function creates an archive object useful for writing,
+the various
+.Fn archive_write_set_XXX
+functions are used to set parameters for writing the archive, and
+.Fn archive_write_open
+completes the setup and opens the archive for writing.
+.Pp
+Individual archive entries are written in a three-step
+process:
+You first initialize a
+.Tn struct archive_entry
+structure with information about the new entry.
+At a minimum, you should set the pathname of the
+entry and provide a
+.Va struct stat
+with a valid
+.Va st_mode
+field, which specifies the type of object and
+.Va st_size
+field, which specifies the size of the data portion of the object.
+The
+.Fn archive_write_header
+function actually writes the header data to the archive.
+You can then use
+.Fn archive_write_data
+to write the actual data.
+.Pp
+After all entries have been written, use the
+.Fn archive_write_free
+function to release all resources.
+.Pp
+The
+.Xr archive_write 3
+manual page provides more detailed calling information for this API.
+.Sh WRITING ENTRIES TO DISK
+The
+.Xr archive_write_disk 3
+API allows you to write
+.Xr archive_entry 3
+objects to disk using the same API used by
+.Xr archive_write 3 .
+The
+.Xr archive_write_disk 3
+API is used internally by
+.Fn archive_read_extract ;
+using it directly can provide greater control over how entries
+get written to disk.
+This API also makes it possible to share code between
+archive-to-archive copy and archive-to-disk extraction
+operations.
+.Sh READING ENTRIES FROM DISK
+The
+.Xr archive_read_disk 3
+provides some support for populating
+.Xr archive_entry 3
+objects from information in the filesystem.
+.Sh DESCRIPTION
+Detailed descriptions of each function are provided by the
+corresponding manual pages.
+.Pp
+All of the functions utilize an opaque
+.Tn struct archive
+datatype that provides access to the archive contents.
+.Pp
+The
+.Tn struct archive_entry
+structure contains a complete description of a single archive
+entry.
+It uses an opaque interface that is fully documented in
+.Xr archive_entry 3 .
+.Pp
+Users familiar with historic formats should be aware that the newer
+variants have eliminated most restrictions on the length of textual fields.
+Clients should not assume that filenames, link names, user names, or
+group names are limited in length.
+In particular, pax interchange format can easily accommodate pathnames
+in arbitrary character sets that exceed
+.Va PATH_MAX .
+.Sh RETURN VALUES
+Most functions return
+.Cm ARCHIVE_OK
+(zero) on success, non-zero on error.
+The return value indicates the general severity of the error, ranging
+from
+.Cm ARCHIVE_WARN ,
+which indicates a minor problem that should probably be reported
+to the user, to
+.Cm ARCHIVE_FATAL ,
+which indicates a serious problem that will prevent any further
+operations on this archive.
+On error, the
+.Fn archive_errno
+function can be used to retrieve a numeric error code (see
+.Xr errno 2 ) .
+The
+.Fn archive_error_string
+returns a textual error message suitable for display.
+.Pp
+.Fn archive_read_new
+and
+.Fn archive_write_new
+return pointers to an allocated and initialized
+.Tn struct archive
+object.
+.Pp
+.Fn archive_read_data
+and
+.Fn archive_write_data
+return a count of the number of bytes actually read or written.
+A value of zero indicates the end of the data for this entry.
+A negative value indicates an error, in which case the
+.Fn archive_errno
+and
+.Fn archive_error_string
+functions can be used to obtain more information.
+.Sh ENVIRONMENT
+There are character set conversions within the
+.Xr archive_entry 3
+functions that are impacted by the currently-selected locale.
+.Sh SEE ALSO
+.Xr tar 1 ,
+.Xr archive_entry 3 ,
+.Xr archive_read 3 ,
+.Xr archive_util 3 ,
+.Xr archive_write 3 ,
+.Xr tar 5
+.Sh HISTORY
+The
+.Nm libarchive
+library first appeared in
+.Fx 5.3 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm libarchive
+library was written by
+.An Tim Kientzle Aq kientzle@acm.org .
+.Sh BUGS
+Some archive formats support information that is not supported by
+.Tn struct archive_entry .
+Such information cannot be fully archived or restored using this library.
+This includes, for example, comments, character sets,
+or the arbitrary key/value pairs that can appear in
+pax interchange format archives.
+.Pp
+Conversely, of course, not all of the information that can be
+stored in an
+.Tn struct archive_entry
+is supported by all formats.
+For example, cpio formats do not support nanosecond timestamps;
+old tar formats do not support large device numbers.
+.Pp
+The
+.Xr archive_read_disk 3
+API should support iterating over filesystems;
+that would make it possible to share code among
+disk-to-archive, archive-to-archive, archive-to-disk,
+and disk-to-disk operations.
+Currently, it only supports reading the
+information for a single file.
+(Which is still quite useful, as it hides a lot
+of system-specific details.)
diff --git a/contrib/libarchive/libarchive/libarchive_internals.3 b/contrib/libarchive/libarchive/libarchive_internals.3
new file mode 100644
index 0000000..64a75e8
--- /dev/null
+++ b/contrib/libarchive/libarchive/libarchive_internals.3
@@ -0,0 +1,365 @@
+.\" Copyright (c) 2003-2007 Tim Kientzle
+.\" 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.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd April 16, 2007
+.Dt LIBARCHIVE 3
+.Os
+.Sh NAME
+.Nm libarchive_internals
+.Nd description of libarchive internal interfaces
+.Sh OVERVIEW
+The
+.Nm libarchive
+library provides a flexible interface for reading and writing
+streaming archive files such as tar and cpio.
+Internally, it follows a modular layered design that should
+make it easy to add new archive and compression formats.
+.Sh GENERAL ARCHITECTURE
+Externally, libarchive exposes most operations through an
+opaque, object-style interface.
+The
+.Xr archive_entry 1
+objects store information about a single filesystem object.
+The rest of the library provides facilities to write
+.Xr archive_entry 1
+objects to archive files,
+read them from archive files,
+and write them to disk.
+(There are plans to add a facility to read
+.Xr archive_entry 1
+objects from disk as well.)
+.Pp
+The read and write APIs each have four layers: a public API
+layer, a format layer that understands the archive file format,
+a compression layer, and an I/O layer.
+The I/O layer is completely exposed to clients who can replace
+it entirely with their own functions.
+.Pp
+In order to provide as much consistency as possible for clients,
+some public functions are virtualized.
+Eventually, it should be possible for clients to open
+an archive or disk writer, and then use a single set of
+code to select and write entries, regardless of the target.
+.Sh READ ARCHITECTURE
+From the outside, clients use the
+.Xr archive_read 3
+API to manipulate an
+.Nm archive
+object to read entries and bodies from an archive stream.
+Internally, the
+.Nm archive
+object is cast to an
+.Nm archive_read
+object, which holds all read-specific data.
+The API has four layers:
+The lowest layer is the I/O layer.
+This layer can be overridden by clients, but most clients use
+the packaged I/O callbacks provided, for example, by
+.Xr archive_read_open_memory 3 ,
+and
+.Xr archive_read_open_fd 3 .
+The compression layer calls the I/O layer to
+read bytes and decompresses them for the format layer.
+The format layer unpacks a stream of uncompressed bytes and
+creates
+.Nm archive_entry
+objects from the incoming data.
+The API layer tracks overall state
+(for example, it prevents clients from reading data before reading a header)
+and invokes the format and compression layer operations
+through registered function pointers.
+In particular, the API layer drives the format-detection process:
+When opening the archive, it reads an initial block of data
+and offers it to each registered compression handler.
+The one with the highest bid is initialized with the first block.
+Similarly, the format handlers are polled to see which handler
+is the best for each archive.
+(Prior to 2.4.0, the format bidders were invoked for each
+entry, but this design hindered error recovery.)
+.Ss I/O Layer and Client Callbacks
+The read API goes to some lengths to be nice to clients.
+As a result, there are few restrictions on the behavior of
+the client callbacks.
+.Pp
+The client read callback is expected to provide a block
+of data on each call.
+A zero-length return does indicate end of file, but otherwise
+blocks may be as small as one byte or as large as the entire file.
+In particular, blocks may be of different sizes.
+.Pp
+The client skip callback returns the number of bytes actually
+skipped, which may be much smaller than the skip requested.
+The only requirement is that the skip not be larger.
+In particular, clients are allowed to return zero for any
+skip that they don't want to handle.
+The skip callback must never be invoked with a negative value.
+.Pp
+Keep in mind that not all clients are reading from disk:
+clients reading from networks may provide different-sized
+blocks on every request and cannot skip at all;
+advanced clients may use
+.Xr mmap 2
+to read the entire file into memory at once and return the
+entire file to libarchive as a single block;
+other clients may begin asynchronous I/O operations for the
+next block on each request.
+.Ss Decompresssion Layer
+The decompression layer not only handles decompression,
+it also buffers data so that the format handlers see a
+much nicer I/O model.
+The decompression API is a two stage peek/consume model.
+A read_ahead request specifies a minimum read amount;
+the decompression layer must provide a pointer to at least
+that much data.
+If more data is immediately available, it should return more:
+the format layer handles bulk data reads by asking for a minimum
+of one byte and then copying as much data as is available.
+.Pp
+A subsequent call to the
+.Fn consume
+function advances the read pointer.
+Note that data returned from a
+.Fn read_ahead
+call is guaranteed to remain in place until
+the next call to
+.Fn read_ahead .
+Intervening calls to
+.Fn consume
+should not cause the data to move.
+.Pp
+Skip requests must always be handled exactly.
+Decompression handlers that cannot seek forward should
+not register a skip handler;
+the API layer fills in a generic skip handler that reads and discards data.
+.Pp
+A decompression handler has a specific lifecycle:
+.Bl -tag -compact -width indent
+.It Registration/Configuration
+When the client invokes the public support function,
+the decompression handler invokes the internal
+.Fn __archive_read_register_compression
+function to provide bid and initialization functions.
+This function returns
+.Cm NULL
+on error or else a pointer to a
+.Cm struct decompressor_t .
+This structure contains a
+.Va void * config
+slot that can be used for storing any customization information.
+.It Bid
+The bid function is invoked with a pointer and size of a block of data.
+The decompressor can access its config data
+through the
+.Va decompressor
+element of the
+.Cm archive_read
+object.
+The bid function is otherwise stateless.
+In particular, it must not perform any I/O operations.
+.Pp
+The value returned by the bid function indicates its suitability
+for handling this data stream.
+A bid of zero will ensure that this decompressor is never invoked.
+Return zero if magic number checks fail.
+Otherwise, your initial implementation should return the number of bits
+actually checked.
+For example, if you verify two full bytes and three bits of another
+byte, bid 19.
+Note that the initial block may be very short;
+be careful to only inspect the data you are given.
+(The current decompressors require two bytes for correct bidding.)
+.It Initialize
+The winning bidder will have its init function called.
+This function should initialize the remaining slots of the
+.Va struct decompressor_t
+object pointed to by the
+.Va decompressor
+element of the
+.Va archive_read
+object.
+In particular, it should allocate any working data it needs
+in the
+.Va data
+slot of that structure.
+The init function is called with the block of data that
+was used for tasting.
+At this point, the decompressor is responsible for all I/O
+requests to the client callbacks.
+The decompressor is free to read more data as and when
+necessary.
+.It Satisfy I/O requests
+The format handler will invoke the
+.Va read_ahead ,
+.Va consume ,
+and
+.Va skip
+functions as needed.
+.It Finish
+The finish method is called only once when the archive is closed.
+It should release anything stored in the
+.Va data
+and
+.Va config
+slots of the
+.Va decompressor
+object.
+It should not invoke the client close callback.
+.El
+.Ss Format Layer
+The read formats have a similar lifecycle to the decompression handlers:
+.Bl -tag -compact -width indent
+.It Registration
+Allocate your private data and initialize your pointers.
+.It Bid
+Formats bid by invoking the
+.Fn read_ahead
+decompression method but not calling the
+.Fn consume
+method.
+This allows each bidder to look ahead in the input stream.
+Bidders should not look further ahead than necessary, as long
+look aheads put pressure on the decompression layer to buffer
+lots of data.
+Most formats only require a few hundred bytes of look ahead;
+look aheads of a few kilobytes are reasonable.
+(The ISO9660 reader sometimes looks ahead by 48k, which
+should be considered an upper limit.)
+.It Read header
+The header read is usually the most complex part of any format.
+There are a few strategies worth mentioning:
+For formats such as tar or cpio, reading and parsing the header is
+straightforward since headers alternate with data.
+For formats that store all header data at the beginning of the file,
+the first header read request may have to read all headers into
+memory and store that data, sorted by the location of the file
+data.
+Subsequent header read requests will skip forward to the
+beginning of the file data and return the corresponding header.
+.It Read Data
+The read data interface supports sparse files; this requires that
+each call return a block of data specifying the file offset and
+size.
+This may require you to carefully track the location so that you
+can return accurate file offsets for each read.
+Remember that the decompressor will return as much data as it has.
+Generally, you will want to request one byte,
+examine the return value to see how much data is available, and
+possibly trim that to the amount you can use.
+You should invoke consume for each block just before you return it.
+.It Skip All Data
+The skip data call should skip over all file data and trailing padding.
+This is called automatically by the API layer just before each
+header read.
+It is also called in response to the client calling the public
+.Fn data_skip
+function.
+.It Cleanup
+On cleanup, the format should release all of its allocated memory.
+.El
+.Ss API Layer
+XXX to do XXX
+.Sh WRITE ARCHITECTURE
+The write API has a similar set of four layers:
+an API layer, a format layer, a compression layer, and an I/O layer.
+The registration here is much simpler because only
+one format and one compression can be registered at a time.
+.Ss I/O Layer and Client Callbacks
+XXX To be written XXX
+.Ss Compression Layer
+XXX To be written XXX
+.Ss Format Layer
+XXX To be written XXX
+.Ss API Layer
+XXX To be written XXX
+.Sh WRITE_DISK ARCHITECTURE
+The write_disk API is intended to look just like the write API
+to clients.
+Since it does not handle multiple formats or compression, it
+is not layered internally.
+.Sh GENERAL SERVICES
+The
+.Nm archive_read ,
+.Nm archive_write ,
+and
+.Nm archive_write_disk
+objects all contain an initial
+.Nm archive
+object which provides common support for a set of standard services.
+(Recall that ANSI/ISO C90 guarantees that you can cast freely between
+a pointer to a structure and a pointer to the first element of that
+structure.)
+The
+.Nm archive
+object has a magic value that indicates which API this object
+is associated with,
+slots for storing error information,
+and function pointers for virtualized API functions.
+.Sh MISCELLANEOUS NOTES
+Connecting existing archiving libraries into libarchive is generally
+quite difficult.
+In particular, many existing libraries strongly assume that you
+are reading from a file; they seek forwards and backwards as necessary
+to locate various pieces of information.
+In contrast, libarchive never seeks backwards in its input, which
+sometimes requires very different approaches.
+.Pp
+For example, libarchive's ISO9660 support operates very differently
+from most ISO9660 readers.
+The libarchive support utilizes a work-queue design that
+keeps a list of known entries sorted by their location in the input.
+Whenever libarchive's ISO9660 implementation is asked for the next
+header, checks this list to find the next item on the disk.
+Directories are parsed when they are encountered and new
+items are added to the list.
+This design relies heavily on the ISO9660 image being optimized so that
+directories always occur earlier on the disk than the files they
+describe.
+.Pp
+Depending on the specific format, such approaches may not be possible.
+The ZIP format specification, for example, allows archivers to store
+key information only at the end of the file.
+In theory, it is possible to create ZIP archives that cannot
+be read without seeking.
+Fortunately, such archives are very rare, and libarchive can read
+most ZIP archives, though it cannot always extract as much information
+as a dedicated ZIP program.
+.Sh SEE ALSO
+.Xr archive 3 ,
+.Xr archive_entry 3 ,
+.Xr archive_read 3 ,
+.Xr archive_write 3 ,
+.Xr archive_write_disk 3
+.Sh HISTORY
+The
+.Nm libarchive
+library first appeared in
+.Fx 5.3 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm libarchive
+library was written by
+.An Tim Kientzle Aq kientzle@acm.org .
diff --git a/lib/libarchive/tar.5 b/contrib/libarchive/libarchive/tar.5
index c2c594b..c2c594b 100644
--- a/lib/libarchive/tar.5
+++ b/contrib/libarchive/libarchive/tar.5
diff --git a/lib/libarchive/test/README b/contrib/libarchive/libarchive/test/README
index 0190b7c..0190b7c 100644
--- a/lib/libarchive/test/README
+++ b/contrib/libarchive/libarchive/test/README
diff --git a/lib/libarchive/test/main.c b/contrib/libarchive/libarchive/test/main.c
index 0cd16a0..0cd16a0 100644
--- a/lib/libarchive/test/main.c
+++ b/contrib/libarchive/libarchive/test/main.c
diff --git a/lib/libarchive/test/read_open_memory.c b/contrib/libarchive/libarchive/test/read_open_memory.c
index db0de85..db0de85 100644
--- a/lib/libarchive/test/read_open_memory.c
+++ b/contrib/libarchive/libarchive/test/read_open_memory.c
diff --git a/lib/libarchive/test/test.h b/contrib/libarchive/libarchive/test/test.h
index 725c899..725c899 100644
--- a/lib/libarchive/test/test.h
+++ b/contrib/libarchive/libarchive/test/test.h
diff --git a/lib/libarchive/test/test_acl_basic.c b/contrib/libarchive/libarchive/test/test_acl_basic.c
index 8fbd3a0..8fbd3a0 100644
--- a/lib/libarchive/test/test_acl_basic.c
+++ b/contrib/libarchive/libarchive/test/test_acl_basic.c
diff --git a/lib/libarchive/test/test_acl_freebsd.c b/contrib/libarchive/libarchive/test/test_acl_freebsd.c
index fbb744d..fbb744d 100644
--- a/lib/libarchive/test/test_acl_freebsd.c
+++ b/contrib/libarchive/libarchive/test/test_acl_freebsd.c
diff --git a/lib/libarchive/test/test_acl_pax.c b/contrib/libarchive/libarchive/test/test_acl_pax.c
index f6b065d..f6b065d 100644
--- a/lib/libarchive/test/test_acl_pax.c
+++ b/contrib/libarchive/libarchive/test/test_acl_pax.c
diff --git a/lib/libarchive/test/test_archive_api_feature.c b/contrib/libarchive/libarchive/test/test_archive_api_feature.c
index 3324aad..3324aad 100644
--- a/lib/libarchive/test/test_archive_api_feature.c
+++ b/contrib/libarchive/libarchive/test/test_archive_api_feature.c
diff --git a/lib/libarchive/test/test_bad_fd.c b/contrib/libarchive/libarchive/test/test_bad_fd.c
index a0f9ae1..a0f9ae1 100644
--- a/lib/libarchive/test/test_bad_fd.c
+++ b/contrib/libarchive/libarchive/test/test_bad_fd.c
diff --git a/lib/libarchive/test/test_compat_bzip2.c b/contrib/libarchive/libarchive/test/test_compat_bzip2.c
index 96eacad..96eacad 100644
--- a/lib/libarchive/test/test_compat_bzip2.c
+++ b/contrib/libarchive/libarchive/test/test_compat_bzip2.c
diff --git a/lib/libarchive/test/test_compat_bzip2_1.tbz.uu b/contrib/libarchive/libarchive/test/test_compat_bzip2_1.tbz.uu
index 8c94414..8c94414 100644
--- a/lib/libarchive/test/test_compat_bzip2_1.tbz.uu
+++ b/contrib/libarchive/libarchive/test/test_compat_bzip2_1.tbz.uu
diff --git a/lib/libarchive/test/test_compat_bzip2_2.tbz.uu b/contrib/libarchive/libarchive/test/test_compat_bzip2_2.tbz.uu
index 286b367..286b367 100644
--- a/lib/libarchive/test/test_compat_bzip2_2.tbz.uu
+++ b/contrib/libarchive/libarchive/test/test_compat_bzip2_2.tbz.uu
diff --git a/lib/libarchive/test/test_compat_cpio.c b/contrib/libarchive/libarchive/test/test_compat_cpio.c
index b0ead39..b0ead39 100644
--- a/lib/libarchive/test/test_compat_cpio.c
+++ b/contrib/libarchive/libarchive/test/test_compat_cpio.c
diff --git a/lib/libarchive/test/test_compat_cpio_1.cpio.uu b/contrib/libarchive/libarchive/test/test_compat_cpio_1.cpio.uu
index 3f0ee52..3f0ee52 100644
--- a/lib/libarchive/test/test_compat_cpio_1.cpio.uu
+++ b/contrib/libarchive/libarchive/test/test_compat_cpio_1.cpio.uu
diff --git a/lib/libarchive/test/test_compat_gtar.c b/contrib/libarchive/libarchive/test/test_compat_gtar.c
index 41fc2f2..41fc2f2 100644
--- a/lib/libarchive/test/test_compat_gtar.c
+++ b/contrib/libarchive/libarchive/test/test_compat_gtar.c
diff --git a/lib/libarchive/test/test_compat_gtar_1.tar.uu b/contrib/libarchive/libarchive/test/test_compat_gtar_1.tar.uu
index 1e8d25b..1e8d25b 100644
--- a/lib/libarchive/test/test_compat_gtar_1.tar.uu
+++ b/contrib/libarchive/libarchive/test/test_compat_gtar_1.tar.uu
diff --git a/lib/libarchive/test/test_compat_gzip.c b/contrib/libarchive/libarchive/test/test_compat_gzip.c
index eb9981d..eb9981d 100644
--- a/lib/libarchive/test/test_compat_gzip.c
+++ b/contrib/libarchive/libarchive/test/test_compat_gzip.c
diff --git a/lib/libarchive/test/test_compat_gzip_1.tgz.uu b/contrib/libarchive/libarchive/test/test_compat_gzip_1.tgz.uu
index 814ef67..814ef67 100644
--- a/lib/libarchive/test/test_compat_gzip_1.tgz.uu
+++ b/contrib/libarchive/libarchive/test/test_compat_gzip_1.tgz.uu
diff --git a/lib/libarchive/test/test_compat_gzip_2.tgz.uu b/contrib/libarchive/libarchive/test/test_compat_gzip_2.tgz.uu
index bbc62fe..bbc62fe 100644
--- a/lib/libarchive/test/test_compat_gzip_2.tgz.uu
+++ b/contrib/libarchive/libarchive/test/test_compat_gzip_2.tgz.uu
diff --git a/lib/libarchive/test/test_compat_lzma.c b/contrib/libarchive/libarchive/test/test_compat_lzma.c
index 7269a4c..7269a4c 100644
--- a/lib/libarchive/test/test_compat_lzma.c
+++ b/contrib/libarchive/libarchive/test/test_compat_lzma.c
diff --git a/lib/libarchive/test/test_compat_lzma_1.tlz.uu b/contrib/libarchive/libarchive/test/test_compat_lzma_1.tlz.uu
index 3b63211..3b63211 100644
--- a/lib/libarchive/test/test_compat_lzma_1.tlz.uu
+++ b/contrib/libarchive/libarchive/test/test_compat_lzma_1.tlz.uu
diff --git a/lib/libarchive/test/test_compat_lzma_2.tlz.uu b/contrib/libarchive/libarchive/test/test_compat_lzma_2.tlz.uu
index 3d73898..3d73898 100644
--- a/lib/libarchive/test/test_compat_lzma_2.tlz.uu
+++ b/contrib/libarchive/libarchive/test/test_compat_lzma_2.tlz.uu
diff --git a/lib/libarchive/test/test_compat_lzma_3.tlz.uu b/contrib/libarchive/libarchive/test/test_compat_lzma_3.tlz.uu
index b8d61b7..b8d61b7 100644
--- a/lib/libarchive/test/test_compat_lzma_3.tlz.uu
+++ b/contrib/libarchive/libarchive/test/test_compat_lzma_3.tlz.uu
diff --git a/lib/libarchive/test/test_compat_solaris_tar_acl.c b/contrib/libarchive/libarchive/test/test_compat_solaris_tar_acl.c
index af4f9d3..af4f9d3 100644
--- a/lib/libarchive/test/test_compat_solaris_tar_acl.c
+++ b/contrib/libarchive/libarchive/test/test_compat_solaris_tar_acl.c
diff --git a/lib/libarchive/test/test_compat_solaris_tar_acl.tar.uu b/contrib/libarchive/libarchive/test/test_compat_solaris_tar_acl.tar.uu
index 229b335..229b335 100644
--- a/lib/libarchive/test/test_compat_solaris_tar_acl.tar.uu
+++ b/contrib/libarchive/libarchive/test/test_compat_solaris_tar_acl.tar.uu
diff --git a/lib/libarchive/test/test_compat_tar_hardlink.c b/contrib/libarchive/libarchive/test/test_compat_tar_hardlink.c
index c1021ef..c1021ef 100644
--- a/lib/libarchive/test/test_compat_tar_hardlink.c
+++ b/contrib/libarchive/libarchive/test/test_compat_tar_hardlink.c
diff --git a/lib/libarchive/test/test_compat_tar_hardlink_1.tar.uu b/contrib/libarchive/libarchive/test/test_compat_tar_hardlink_1.tar.uu
index f1658a2..f1658a2 100644
--- a/lib/libarchive/test/test_compat_tar_hardlink_1.tar.uu
+++ b/contrib/libarchive/libarchive/test/test_compat_tar_hardlink_1.tar.uu
diff --git a/lib/libarchive/test/test_compat_xz.c b/contrib/libarchive/libarchive/test/test_compat_xz.c
index 9041427..9041427 100644
--- a/lib/libarchive/test/test_compat_xz.c
+++ b/contrib/libarchive/libarchive/test/test_compat_xz.c
diff --git a/lib/libarchive/test/test_compat_xz_1.txz.uu b/contrib/libarchive/libarchive/test/test_compat_xz_1.txz.uu
index 82794fd..82794fd 100644
--- a/lib/libarchive/test/test_compat_xz_1.txz.uu
+++ b/contrib/libarchive/libarchive/test/test_compat_xz_1.txz.uu
diff --git a/lib/libarchive/test/test_compat_zip.c b/contrib/libarchive/libarchive/test/test_compat_zip.c
index adb377c..adb377c 100644
--- a/lib/libarchive/test/test_compat_zip.c
+++ b/contrib/libarchive/libarchive/test/test_compat_zip.c
diff --git a/lib/libarchive/test/test_compat_zip_1.zip.uu b/contrib/libarchive/libarchive/test/test_compat_zip_1.zip.uu
index 1ed2d69..1ed2d69 100644
--- a/lib/libarchive/test/test_compat_zip_1.zip.uu
+++ b/contrib/libarchive/libarchive/test/test_compat_zip_1.zip.uu
diff --git a/lib/libarchive/test/test_compat_zip_2.zip.uu b/contrib/libarchive/libarchive/test/test_compat_zip_2.zip.uu
index c33e9d9..c33e9d9 100644
--- a/lib/libarchive/test/test_compat_zip_2.zip.uu
+++ b/contrib/libarchive/libarchive/test/test_compat_zip_2.zip.uu
diff --git a/lib/libarchive/test/test_empty_write.c b/contrib/libarchive/libarchive/test/test_empty_write.c
index 9980e3a..9980e3a 100644
--- a/lib/libarchive/test/test_empty_write.c
+++ b/contrib/libarchive/libarchive/test/test_empty_write.c
diff --git a/lib/libarchive/test/test_entry.c b/contrib/libarchive/libarchive/test/test_entry.c
index 35ca6e3..35ca6e3 100644
--- a/lib/libarchive/test/test_entry.c
+++ b/contrib/libarchive/libarchive/test/test_entry.c
diff --git a/lib/libarchive/test/test_entry_strmode.c b/contrib/libarchive/libarchive/test/test_entry_strmode.c
index 70c0e75..70c0e75 100644
--- a/lib/libarchive/test/test_entry_strmode.c
+++ b/contrib/libarchive/libarchive/test/test_entry_strmode.c
diff --git a/lib/libarchive/test/test_extattr_freebsd.c b/contrib/libarchive/libarchive/test/test_extattr_freebsd.c
index de3ae2a..de3ae2a 100644
--- a/lib/libarchive/test/test_extattr_freebsd.c
+++ b/contrib/libarchive/libarchive/test/test_extattr_freebsd.c
diff --git a/lib/libarchive/test/test_fuzz.c b/contrib/libarchive/libarchive/test/test_fuzz.c
index 8f91fca..8f91fca 100644
--- a/lib/libarchive/test/test_fuzz.c
+++ b/contrib/libarchive/libarchive/test/test_fuzz.c
diff --git a/lib/libarchive/test/test_fuzz_1.iso.Z.uu b/contrib/libarchive/libarchive/test/test_fuzz_1.iso.Z.uu
index 6044296..6044296 100644
--- a/lib/libarchive/test/test_fuzz_1.iso.Z.uu
+++ b/contrib/libarchive/libarchive/test/test_fuzz_1.iso.Z.uu
diff --git a/lib/libarchive/test/test_link_resolver.c b/contrib/libarchive/libarchive/test/test_link_resolver.c
index 032c059..032c059 100644
--- a/lib/libarchive/test/test_link_resolver.c
+++ b/contrib/libarchive/libarchive/test/test_link_resolver.c
diff --git a/lib/libarchive/test/test_open_failure.c b/contrib/libarchive/libarchive/test/test_open_failure.c
index 0a7632a..0a7632a 100644
--- a/lib/libarchive/test/test_open_failure.c
+++ b/contrib/libarchive/libarchive/test/test_open_failure.c
diff --git a/lib/libarchive/test/test_open_fd.c b/contrib/libarchive/libarchive/test/test_open_fd.c
index 7551dd0..7551dd0 100644
--- a/lib/libarchive/test/test_open_fd.c
+++ b/contrib/libarchive/libarchive/test/test_open_fd.c
diff --git a/lib/libarchive/test/test_open_file.c b/contrib/libarchive/libarchive/test/test_open_file.c
index 7e6c571..7e6c571 100644
--- a/lib/libarchive/test/test_open_file.c
+++ b/contrib/libarchive/libarchive/test/test_open_file.c
diff --git a/lib/libarchive/test/test_open_filename.c b/contrib/libarchive/libarchive/test/test_open_filename.c
index b096afc..b096afc 100644
--- a/lib/libarchive/test/test_open_filename.c
+++ b/contrib/libarchive/libarchive/test/test_open_filename.c
diff --git a/lib/libarchive/test/test_pax_filename_encoding.c b/contrib/libarchive/libarchive/test/test_pax_filename_encoding.c
index af0208c..af0208c 100644
--- a/lib/libarchive/test/test_pax_filename_encoding.c
+++ b/contrib/libarchive/libarchive/test/test_pax_filename_encoding.c
diff --git a/lib/libarchive/test/test_pax_filename_encoding.tar.uu b/contrib/libarchive/libarchive/test/test_pax_filename_encoding.tar.uu
index e7773fd..e7773fd 100644
--- a/lib/libarchive/test/test_pax_filename_encoding.tar.uu
+++ b/contrib/libarchive/libarchive/test/test_pax_filename_encoding.tar.uu
diff --git a/lib/libarchive/test/test_read_compress_program.c b/contrib/libarchive/libarchive/test/test_read_compress_program.c
index 12e6afc..12e6afc 100644
--- a/lib/libarchive/test/test_read_compress_program.c
+++ b/contrib/libarchive/libarchive/test/test_read_compress_program.c
diff --git a/lib/libarchive/test/test_read_data_large.c b/contrib/libarchive/libarchive/test/test_read_data_large.c
index 2dacb50..2dacb50 100644
--- a/lib/libarchive/test/test_read_data_large.c
+++ b/contrib/libarchive/libarchive/test/test_read_data_large.c
diff --git a/lib/libarchive/test/test_read_disk.c b/contrib/libarchive/libarchive/test/test_read_disk.c
index 5666656..5666656 100644
--- a/lib/libarchive/test/test_read_disk.c
+++ b/contrib/libarchive/libarchive/test/test_read_disk.c
diff --git a/lib/libarchive/test/test_read_disk_entry_from_file.c b/contrib/libarchive/libarchive/test/test_read_disk_entry_from_file.c
index 652b5e4..652b5e4 100644
--- a/lib/libarchive/test/test_read_disk_entry_from_file.c
+++ b/contrib/libarchive/libarchive/test/test_read_disk_entry_from_file.c
diff --git a/lib/libarchive/test/test_read_extract.c b/contrib/libarchive/libarchive/test/test_read_extract.c
index 10bd014..10bd014 100644
--- a/lib/libarchive/test/test_read_extract.c
+++ b/contrib/libarchive/libarchive/test/test_read_extract.c
diff --git a/lib/libarchive/test/test_read_file_nonexistent.c b/contrib/libarchive/libarchive/test/test_read_file_nonexistent.c
index d8e5293..d8e5293 100644
--- a/lib/libarchive/test/test_read_file_nonexistent.c
+++ b/contrib/libarchive/libarchive/test/test_read_file_nonexistent.c
diff --git a/lib/libarchive/test/test_read_format_ar.ar.uu b/contrib/libarchive/libarchive/test/test_read_format_ar.ar.uu
index 70507cc..70507cc 100644
--- a/lib/libarchive/test/test_read_format_ar.ar.uu
+++ b/contrib/libarchive/libarchive/test/test_read_format_ar.ar.uu
diff --git a/lib/libarchive/test/test_read_format_ar.c b/contrib/libarchive/libarchive/test/test_read_format_ar.c
index fc95978..fc95978 100644
--- a/lib/libarchive/test/test_read_format_ar.c
+++ b/contrib/libarchive/libarchive/test/test_read_format_ar.c
diff --git a/lib/libarchive/test/test_read_format_cpio_bin.c b/contrib/libarchive/libarchive/test/test_read_format_cpio_bin.c
index 4c81d90..4c81d90 100644
--- a/lib/libarchive/test/test_read_format_cpio_bin.c
+++ b/contrib/libarchive/libarchive/test/test_read_format_cpio_bin.c
diff --git a/lib/libarchive/test/test_read_format_cpio_bin_Z.c b/contrib/libarchive/libarchive/test/test_read_format_cpio_bin_Z.c
index 0972925..0972925 100644
--- a/lib/libarchive/test/test_read_format_cpio_bin_Z.c
+++ b/contrib/libarchive/libarchive/test/test_read_format_cpio_bin_Z.c
diff --git a/lib/libarchive/test/test_read_format_cpio_bin_be.c b/contrib/libarchive/libarchive/test/test_read_format_cpio_bin_be.c
index 72852fc..72852fc 100644
--- a/lib/libarchive/test/test_read_format_cpio_bin_be.c
+++ b/contrib/libarchive/libarchive/test/test_read_format_cpio_bin_be.c
diff --git a/lib/libarchive/test/test_read_format_cpio_bin_be.cpio.uu b/contrib/libarchive/libarchive/test/test_read_format_cpio_bin_be.cpio.uu
index 999f1e0..999f1e0 100644
--- a/lib/libarchive/test/test_read_format_cpio_bin_be.cpio.uu
+++ b/contrib/libarchive/libarchive/test/test_read_format_cpio_bin_be.cpio.uu
diff --git a/lib/libarchive/test/test_read_format_cpio_bin_bz2.c b/contrib/libarchive/libarchive/test/test_read_format_cpio_bin_bz2.c
index f7c4efb..f7c4efb 100644
--- a/lib/libarchive/test/test_read_format_cpio_bin_bz2.c
+++ b/contrib/libarchive/libarchive/test/test_read_format_cpio_bin_bz2.c
diff --git a/lib/libarchive/test/test_read_format_cpio_bin_gz.c b/contrib/libarchive/libarchive/test/test_read_format_cpio_bin_gz.c
index a57e2f1..a57e2f1 100644
--- a/lib/libarchive/test/test_read_format_cpio_bin_gz.c
+++ b/contrib/libarchive/libarchive/test/test_read_format_cpio_bin_gz.c
diff --git a/lib/libarchive/test/test_read_format_cpio_bin_lzma.c b/contrib/libarchive/libarchive/test/test_read_format_cpio_bin_lzma.c
index 26c0440..26c0440 100644
--- a/lib/libarchive/test/test_read_format_cpio_bin_lzma.c
+++ b/contrib/libarchive/libarchive/test/test_read_format_cpio_bin_lzma.c
diff --git a/lib/libarchive/test/test_read_format_cpio_bin_xz.c b/contrib/libarchive/libarchive/test/test_read_format_cpio_bin_xz.c
index e864e5a..e864e5a 100644
--- a/lib/libarchive/test/test_read_format_cpio_bin_xz.c
+++ b/contrib/libarchive/libarchive/test/test_read_format_cpio_bin_xz.c
diff --git a/lib/libarchive/test/test_read_format_cpio_odc.c b/contrib/libarchive/libarchive/test/test_read_format_cpio_odc.c
index cc0b79b..cc0b79b 100644
--- a/lib/libarchive/test/test_read_format_cpio_odc.c
+++ b/contrib/libarchive/libarchive/test/test_read_format_cpio_odc.c
diff --git a/contrib/libarchive/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.c b/contrib/libarchive/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.c
new file mode 100644
index 0000000..3b4170c
--- /dev/null
+++ b/contrib/libarchive/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.c
@@ -0,0 +1,127 @@
+/*-
+ * Copyright (c) 2003-2007 Tim Kientzle
+ * Copyright (c) 2009 Michihiro NAKAJIMA
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include "test.h"
+
+/*
+Execute the following command to rebuild the data for this program:
+ tail -n +32 test_read_format_cpio_svr4_bzip2_rpm.c | /bin/sh
+
+F=test_read_format_cpio_svr4_bzip2_rpm.rpm
+NAME=rpmsample
+TMPRPM=/tmp/rpm
+rm -rf ${TMPRPM}
+mkdir -p ${TMPRPM}/BUILD
+mkdir -p ${TMPRPM}/RPMS
+mkdir -p ${TMPRPM}/SOURCES
+mkdir -p ${TMPRPM}/SPECS
+mkdir -p ${TMPRPM}/SRPMS
+echo "hello" > ${TMPRPM}/BUILD/file1
+echo "hello" > ${TMPRPM}/BUILD/file2
+echo "hello" > ${TMPRPM}/BUILD/file3
+cat > ${TMPRPM}/SPECS/${NAME}.spec <<END
+##
+%define _topdir ${TMPRPM}
+%define _binary_payload w9.bzdio
+
+Summary: Sample data of RPM filter of libarchive
+Name: ${NAME}
+Version: 1.0.0
+Release: 1
+License: BSD
+URL: http://code.google.com/p/libarchive
+BuildArch: noarch
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+
+%install
+rm -rf \$RPM_BUILD_ROOT
+
+mkdir -p \$RPM_BUILD_ROOT%{_sysconfdir}
+install -m 644 file1 \$RPM_BUILD_ROOT%{_sysconfdir}/file1
+install -m 644 file2 \$RPM_BUILD_ROOT%{_sysconfdir}/file2
+install -m 644 file3 \$RPM_BUILD_ROOT%{_sysconfdir}/file3
+TZ=utc touch -afm -t 197001020000.01 \$RPM_BUILD_ROOT%{_sysconfdir}/file1
+TZ=utc touch -afm -t 197001020000.01 \$RPM_BUILD_ROOT%{_sysconfdir}/file2
+TZ=utc touch -afm -t 197001020000.01 \$RPM_BUILD_ROOT%{_sysconfdir}/file3
+
+%files
+%{_sysconfdir}/file1
+%{_sysconfdir}/file2
+%{_sysconfdir}/file3
+
+%description
+Sample data.
+END
+#
+rpmbuild -bb ${TMPRPM}/SPECS/${NAME}.spec
+uuencode ${F} < ${TMPRPM}/RPMS/noarch/${NAME}-1.0.0-1.noarch.rpm > ${F}.uu
+
+rm -rf ${TMPRPM}
+exit 1
+*/
+
+DEFINE_TEST(test_read_format_cpio_svr4_bzip2_rpm)
+{
+ struct archive_entry *ae;
+ struct archive *a;
+ const char *name = "test_read_format_cpio_svr4_bzip2_rpm.rpm";
+ int r;
+
+ assert((a = archive_read_new()) != NULL);
+ r = archive_read_support_compression_bzip2(a);
+ if (r == ARCHIVE_WARN) {
+ skipping("bzip2 reading not fully supported on this platform");
+ assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
+ return;
+ }
+ assertEqualIntA(a, ARCHIVE_OK, r);
+ assertEqualIntA(a, ARCHIVE_OK,
+ archive_read_support_compression_rpm(a));
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
+ extract_reference_file(name);
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_open_filename(a, name, 2));
+
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
+ assertEqualString("./etc/file1", archive_entry_pathname(ae));
+ assertEqualInt(86401, archive_entry_mtime(ae));
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
+ assertEqualString("./etc/file2", archive_entry_pathname(ae));
+ assertEqualInt(86401, archive_entry_mtime(ae));
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
+ assertEqualString("./etc/file3", archive_entry_pathname(ae));
+ assertEqualInt(86401, archive_entry_mtime(ae));
+
+ /* Verify the end-of-archive. */
+ assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae));
+
+ /* Verify that the format detection worked. */
+ assertEqualInt(archive_compression(a), ARCHIVE_COMPRESSION_BZIP2);
+ assertEqualString(archive_compression_name(a), "bzip2");
+ assertEqualInt(archive_format(a), ARCHIVE_FORMAT_CPIO_SVR4_NOCRC);
+
+ assertEqualInt(ARCHIVE_OK, archive_read_close(a));
+ assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
+}
+
diff --git a/contrib/libarchive/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.rpm.uu b/contrib/libarchive/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.rpm.uu
new file mode 100644
index 0000000..884ca94
--- /dev/null
+++ b/contrib/libarchive/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.rpm.uu
@@ -0,0 +1,47 @@
+begin 644 test_read_format_cpio_svr4_bzip2_rpm.rpm
+M[:ONVP,``````7)P;7-A;7!L92TQ+C`N,"TQ````````````````````````
+M```````````````````````````````````````````!``4`````````````
+M````````CJWH`0`````````%````5````#X````'````1````!````$-````
+M!@`````````!```#Z`````0````L`````0```^P````'````,````!````/O
+M````!````$`````!,F4X-3)F-39E,#,W83EE.61A9C<W8V(Q,&0P8S4T-65E
+M9&8S-6$U8@````````:<A,!!LG.$S/]SK-(FA0BH6@```@@````^````!___
+M_[`````0`````(ZMZ`$`````````,0```NP````_````!P```MP````0````
+M9`````@``````````0```^@````&`````@````$```/I````!@````P````!
+M```#Z@````8````2`````0```^P````)````%`````$```/M````"0```#P`
+M```!```#[@````0```!,`````0```^\````&````4`````$```/Q````!```
+M`%P````!```#]@````8```!@`````0```_@````)````9`````$```/\````
+M!@```'`````!```#_0````8```"4`````0```_X````&````F@````$```0$
+M````!````*0````#```$!@````,```"P`````P``!`D````#````M@````,`
+M``0*````!````+P````#```$"P````@```#(`````P``!`P````(```!*P``
+M``,```0-````!````3`````#```$#P````@```$\`````P``!!`````(```!
+M2P````,```04````!@```5H````!```$%0````0```%T`````P``!!<````(
+M```!@`````$```08````!````8P````#```$&0````@```&8`````P``!!H`
+M```(```!Z@````,```0H````!@```@`````!```$1P````0```((`````P``
+M!$@````$```"%`````,```1)````"````B`````#```$6`````0```(D````
+M`0``!%D````(```"*`````$```1<````!````C`````#```$70````@```(\
+M`````P``!%X````(```"3@````$```1B````!@```E0````!```$9`````8`
+M``)S`````0``!&4````&```">`````$```1F````!@```GX````!```$;```
+M``8```*``````0``!'0````$```"E`````,```1U````!````J`````#```$
+M=@````@```*L`````P``!'<````$```"Q`````,```1X````!````M`````#
+M0P!R<&US86UP;&4`,2XP+C``,0!386UP;&4@9&%T82!O9B!24$T@9FEL=&5R
+M(&]F(&QI8F%R8VAI=F4`4V%M<&QE(&1A=&$N`````$L)MWQC=64M9&5S:W1O
+M<``````20E-$`%5N<W!E8VEF:65D`&AT='`Z+R]C;V1E+F=O;V=L92YC;VTO
+M<"]L:6)A<F-H:79E`&QI;G5X`&YO87)C:``````````&````!@````:!I(&D
+M@:0``````````5&!``%1@0`!48%B,3DT-F%C.3(T.3)D,C,T-V,V,C,U8C1D
+M,C8Q,3$X-`!B,3DT-F%C.3(T.3)D,C,T-V,V,C,U8C1D,C8Q,3$X-`!B,3DT
+M-F%C.3(T.3)D,C,T-V,V,C,U8C1D,C8Q,3$X-```````````````````````
+M`')O;W0`<F]O=`!R;V]T`')O;W0`<F]O=`!R;V]T`')P;7-A;7!L92TQ+C`N
+M,"TQ+G-R8RYR<&T`________________<G!M<V%M<&QE`````0``2@$``$H!
+M``!*<G!M;&EB*$-O;7!R97-S961&:6QE3F%M97,I`')P;6QI8BA087EL;V%D
+M1FEL97-(879E4')E9FEX*0!R<&UL:6(H4&%Y;&]A9$ES0GII<#(I`#,N,"XT
+M+3$`-"XP+3$`,RXP+C4M,0`T+C<N,```````"`$```@!```(`0``*H<``"J(
+M```JB0`````````(,2XP+C`M,0````````````````!F:6QE,0!F:6QE,@!F
+M:6QE,P`O971C+P`M3S(@+6<@+6UA<F-H/6DS.#8@+6UT=6YE/6DV.#8`8W!I
+M;P!B>FEP,@`Y`&YO87)C:"UR<&TM;&EN=7@`````````````````````````
+M`0````$````!`$%30TE)('1E>'0`9&ER96-T;W)Y````````````````````
+M````````````````````/P````?___SP````$$)::#DQ05DF4UFX89DX``!=
+M?X!,$`@`*`'_X"(D%``[9(0`(`"2B/50T#0#0`](9!%(C1,0&GJ`R`M@PQRG
+M<PN0PPC]8&X[2P=KHS%0Q<^=89M6CI5L`O2\("`W!K-V.;*M63U;6ES%CQI6
+E4,1$DE)B@G&.7I5?NT46(XB0/D,B!$Z-!A_B[DBG"A(7##,G````
+`
+end
diff --git a/lib/libarchive/test/test_read_format_cpio_svr4_gzip.c b/contrib/libarchive/libarchive/test/test_read_format_cpio_svr4_gzip.c
index 63a51c4..63a51c4 100644
--- a/lib/libarchive/test/test_read_format_cpio_svr4_gzip.c
+++ b/contrib/libarchive/libarchive/test/test_read_format_cpio_svr4_gzip.c
diff --git a/contrib/libarchive/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.c b/contrib/libarchive/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.c
new file mode 100644
index 0000000..eb8a38d
--- /dev/null
+++ b/contrib/libarchive/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.c
@@ -0,0 +1,127 @@
+/*-
+ * Copyright (c) 2003-2007 Tim Kientzle
+ * Copyright (c) 2009 Michihiro NAKAJIMA
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include "test.h"
+
+/*
+Execute the following command to rebuild the data for this program:
+ tail -n +32 test_read_format_cpio_svr4_gzip_rpm.c | /bin/sh
+
+F=test_read_format_cpio_svr4_gzip_rpm.rpm
+NAME=rpmsample
+TMPRPM=/tmp/rpm
+rm -rf ${TMPRPM}
+mkdir -p ${TMPRPM}/BUILD
+mkdir -p ${TMPRPM}/RPMS
+mkdir -p ${TMPRPM}/SOURCES
+mkdir -p ${TMPRPM}/SPECS
+mkdir -p ${TMPRPM}/SRPMS
+echo "hello" > ${TMPRPM}/BUILD/file1
+echo "hello" > ${TMPRPM}/BUILD/file2
+echo "hello" > ${TMPRPM}/BUILD/file3
+cat > ${TMPRPM}/SPECS/${NAME}.spec <<END
+##
+%define _topdir ${TMPRPM}
+%define _binary_payload w9.gzdio
+
+Summary: Sample data of RPM filter of libarchive
+Name: ${NAME}
+Version: 1.0.0
+Release: 1
+License: BSD
+URL: http://code.google.com/p/libarchive
+BuildArch: noarch
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+
+%install
+rm -rf \$RPM_BUILD_ROOT
+
+mkdir -p \$RPM_BUILD_ROOT%{_sysconfdir}
+install -m 644 file1 \$RPM_BUILD_ROOT%{_sysconfdir}/file1
+install -m 644 file2 \$RPM_BUILD_ROOT%{_sysconfdir}/file2
+install -m 644 file3 \$RPM_BUILD_ROOT%{_sysconfdir}/file3
+TZ=utc touch -afm -t 197001020000.01 \$RPM_BUILD_ROOT%{_sysconfdir}/file1
+TZ=utc touch -afm -t 197001020000.01 \$RPM_BUILD_ROOT%{_sysconfdir}/file2
+TZ=utc touch -afm -t 197001020000.01 \$RPM_BUILD_ROOT%{_sysconfdir}/file3
+
+%files
+%{_sysconfdir}/file1
+%{_sysconfdir}/file2
+%{_sysconfdir}/file3
+
+%description
+Sample data.
+END
+#
+rpmbuild -bb ${TMPRPM}/SPECS/${NAME}.spec
+uuencode ${F} < ${TMPRPM}/RPMS/noarch/${NAME}-1.0.0-1.noarch.rpm > ${F}.uu
+
+rm -rf ${TMPRPM}
+exit 1
+*/
+
+DEFINE_TEST(test_read_format_cpio_svr4_gzip_rpm)
+{
+ struct archive_entry *ae;
+ struct archive *a;
+ const char *name = "test_read_format_cpio_svr4_gzip_rpm.rpm";
+ int r;
+
+ assert((a = archive_read_new()) != NULL);
+ r = archive_read_support_compression_gzip(a);
+ if (r == ARCHIVE_WARN) {
+ skipping("gzip reading not fully supported on this platform");
+ assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
+ return;
+ }
+ assertEqualIntA(a, ARCHIVE_OK, r);
+ assertEqualIntA(a, ARCHIVE_OK,
+ archive_read_support_compression_rpm(a));
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
+ extract_reference_file(name);
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_open_filename(a, name, 2));
+
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
+ assertEqualString("./etc/file1", archive_entry_pathname(ae));
+ assertEqualInt(86401, archive_entry_mtime(ae));
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
+ assertEqualString("./etc/file2", archive_entry_pathname(ae));
+ assertEqualInt(86401, archive_entry_mtime(ae));
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
+ assertEqualString("./etc/file3", archive_entry_pathname(ae));
+ assertEqualInt(86401, archive_entry_mtime(ae));
+
+ /* Verify the end-of-archive. */
+ assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae));
+
+ /* Verify that the format detection worked. */
+ assertEqualInt(archive_compression(a), ARCHIVE_COMPRESSION_GZIP);
+ assertEqualString(archive_compression_name(a), "gzip");
+ assertEqualInt(archive_format(a), ARCHIVE_FORMAT_CPIO_SVR4_NOCRC);
+
+ assertEqualInt(ARCHIVE_OK, archive_read_close(a));
+ assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
+}
+
diff --git a/contrib/libarchive/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.rpm.uu b/contrib/libarchive/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.rpm.uu
new file mode 100644
index 0000000..54d305b
--- /dev/null
+++ b/contrib/libarchive/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.rpm.uu
@@ -0,0 +1,46 @@
+begin 644 test_read_format_cpio_svr4_gzip_rpm.rpm
+M[:ONVP,``````7)P;7-A;7!L92TQ+C`N,"TQ````````````````````````
+M```````````````````````````````````````````!``4`````````````
+M````````CJWH`0`````````%````5````#X````'````1````!````$-````
+M!@`````````!```#Z`````0````L`````0```^P````'````,````!````/O
+M````!````$`````!9&9E8V,W,#4T,C@X,V1D-&8P-6%E.#4Y,S<S,&1F,V)D
+M,#$Q,S0V80````````9=A5.[L^@5U91731!5GLHZC0```@@````^````!___
+M_[`````0`````(ZMZ`$`````````,0```L0````_````!P```K0````0````
+M9`````@``````````0```^@````&`````@````$```/I````!@````P````!
+M```#Z@````8````2`````0```^P````)````%`````$```/M````"0```#P`
+M```!```#[@````0```!,`````0```^\````&````4`````$```/Q````!```
+M`%P````!```#]@````8```!@`````0```_@````)````9`````$```/\````
+M!@```'`````!```#_0````8```"4`````0```_X````&````F@````$```0$
+M````!````*0````#```$!@````,```"P`````P``!`D````#````M@````,`
+M``0*````!````+P````#```$"P````@```#(`````P``!`P````(```!*P``
+M``,```0-````!````3`````#```$#P````@```$\`````P``!!`````(```!
+M2P````,```04````!@```5H````!```$%0````0```%T`````P``!!<````(
+M```!@`````$```08````!````8P````"```$&0````@```&4`````@``!!H`
+M```(```!SP````(```0H````!@```=T````!```$1P````0```'D`````P``
+M!$@````$```!\`````,```1)````"````?P````#```$6`````0```(`````
+M`0``!%D````(```"!`````$```1<````!````@P````#```$70````@```(8
+M`````P``!%X````(```"*@````$```1B````!@```C`````!```$9`````8`
+M``)/`````0``!&4````&```"5`````$```1F````!@```ED````!```$;```
+M``8```);`````0``!'0````$```";`````,```1U````!````G@````#```$
+M=@````@```*$`````P``!'<````$```"G`````,```1X````!````J@````#
+M0P!R<&US86UP;&4`,2XP+C``,0!386UP;&4@9&%T82!O9B!24$T@9FEL=&5R
+M(&]F(&QI8F%R8VAI=F4`4V%M<&QE(&1A=&$N`````$L)MAUC=64M9&5S:W1O
+M<``````20E-$`%5N<W!E8VEF:65D`&AT='`Z+R]C;V1E+F=O;V=L92YC;VTO
+M<"]L:6)A<F-H:79E`&QI;G5X`&YO87)C:``````````&````!@````:!I(&D
+M@:0``````````5&!``%1@0`!48%B,3DT-F%C.3(T.3)D,C,T-V,V,C,U8C1D
+M,C8Q,3$X-`!B,3DT-F%C.3(T.3)D,C,T-V,V,C,U8C1D,C8Q,3$X-`!B,3DT
+M-F%C.3(T.3)D,C,T-V,V,C,U8C1D,C8Q,3$X-```````````````````````
+M`')O;W0`<F]O=`!R;V]T`')O;W0`<F]O=`!R;V]T`')P;7-A;7!L92TQ+C`N
+M,"TQ+G-R8RYR<&T`________________<G!M<V%M<&QE`````0``2@$``$IR
+M<&UL:6(H0V]M<')E<W-E9$9I;&5.86UE<RD`<G!M;&EB*%!A>6QO861&:6QE
+M<TAA=F50<F5F:7@I`#,N,"XT+3$`-"XP+3$`-"XW+C``````"`$```@!```(
+M`0``*H<``"J(```JB0`````````(,2XP+C`M,0````````````````!F:6QE
+M,0!F:6QE,@!F:6QE,P`O971C+P`M3S(@+6<@+6UA<F-H/6DS.#8@+6UT=6YE
+M/6DV.#8`8W!I;P!G>FEP`#D`;F]A<F-H+7)P;2UL:6YU>```````````````
+M```````!`````0````$`05-#24D@=&5X=`!D:7)E8W1O<GD`````````````
+M```````````````````````````_````!____/`````0'XL(```````"`S,P
+M-S`W,#0``J-$"W,0;6&8:&*`'8#4&9H:6AA"^690V@))'AM(AC'T]%-+DO73
+M,G-2#1D8&#)2<W+RN1@8#)#=8$$_-QCA<H,E_=Q@C-4-1`!BU:&#)!@C),C1
+3T\<U2%%1$>@$!@"1O'?9"`(`````
+`
+end
diff --git a/lib/libarchive/test/test_read_format_cpio_svr4c_Z.c b/contrib/libarchive/libarchive/test/test_read_format_cpio_svr4c_Z.c
index 11ac091..11ac091 100644
--- a/lib/libarchive/test/test_read_format_cpio_svr4c_Z.c
+++ b/contrib/libarchive/libarchive/test/test_read_format_cpio_svr4c_Z.c
diff --git a/lib/libarchive/test/test_read_format_empty.c b/contrib/libarchive/libarchive/test/test_read_format_empty.c
index e0fa9a5..e0fa9a5 100644
--- a/lib/libarchive/test/test_read_format_empty.c
+++ b/contrib/libarchive/libarchive/test/test_read_format_empty.c
diff --git a/lib/libarchive/test/test_read_format_gtar_gz.c b/contrib/libarchive/libarchive/test/test_read_format_gtar_gz.c
index 8f12a65..8f12a65 100644
--- a/lib/libarchive/test/test_read_format_gtar_gz.c
+++ b/contrib/libarchive/libarchive/test/test_read_format_gtar_gz.c
diff --git a/lib/libarchive/test/test_read_format_gtar_lzma.c b/contrib/libarchive/libarchive/test/test_read_format_gtar_lzma.c
index f19d0b8..f19d0b8 100644
--- a/lib/libarchive/test/test_read_format_gtar_lzma.c
+++ b/contrib/libarchive/libarchive/test/test_read_format_gtar_lzma.c
diff --git a/lib/libarchive/test/test_read_format_gtar_sparse.c b/contrib/libarchive/libarchive/test/test_read_format_gtar_sparse.c
index f6c9d42..f6c9d42 100644
--- a/lib/libarchive/test/test_read_format_gtar_sparse.c
+++ b/contrib/libarchive/libarchive/test/test_read_format_gtar_sparse.c
diff --git a/lib/libarchive/test/test_read_format_gtar_sparse_1_13.tar.uu b/contrib/libarchive/libarchive/test/test_read_format_gtar_sparse_1_13.tar.uu
index 7b19d67..7b19d67 100644
--- a/lib/libarchive/test/test_read_format_gtar_sparse_1_13.tar.uu
+++ b/contrib/libarchive/libarchive/test/test_read_format_gtar_sparse_1_13.tar.uu
diff --git a/lib/libarchive/test/test_read_format_gtar_sparse_1_17.tar.uu b/contrib/libarchive/libarchive/test/test_read_format_gtar_sparse_1_17.tar.uu
index f8985b0..f8985b0 100644
--- a/lib/libarchive/test/test_read_format_gtar_sparse_1_17.tar.uu
+++ b/contrib/libarchive/libarchive/test/test_read_format_gtar_sparse_1_17.tar.uu
diff --git a/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix00.tar.uu b/contrib/libarchive/libarchive/test/test_read_format_gtar_sparse_1_17_posix00.tar.uu
index d19dead..d19dead 100644
--- a/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix00.tar.uu
+++ b/contrib/libarchive/libarchive/test/test_read_format_gtar_sparse_1_17_posix00.tar.uu
diff --git a/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix01.tar.uu b/contrib/libarchive/libarchive/test/test_read_format_gtar_sparse_1_17_posix01.tar.uu
index 7fa0af9..7fa0af9 100644
--- a/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix01.tar.uu
+++ b/contrib/libarchive/libarchive/test/test_read_format_gtar_sparse_1_17_posix01.tar.uu
diff --git a/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix10.tar.uu b/contrib/libarchive/libarchive/test/test_read_format_gtar_sparse_1_17_posix10.tar.uu
index ca1f12b..ca1f12b 100644
--- a/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix10.tar.uu
+++ b/contrib/libarchive/libarchive/test/test_read_format_gtar_sparse_1_17_posix10.tar.uu
diff --git a/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix10_modified.tar.uu b/contrib/libarchive/libarchive/test/test_read_format_gtar_sparse_1_17_posix10_modified.tar.uu
index a0673de..a0673de 100644
--- a/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix10_modified.tar.uu
+++ b/contrib/libarchive/libarchive/test/test_read_format_gtar_sparse_1_17_posix10_modified.tar.uu
diff --git a/lib/libarchive/test/test_read_format_iso.iso.Z.uu b/contrib/libarchive/libarchive/test/test_read_format_iso.iso.Z.uu
index 2f5cbd7..2f5cbd7 100644
--- a/lib/libarchive/test/test_read_format_iso.iso.Z.uu
+++ b/contrib/libarchive/libarchive/test/test_read_format_iso.iso.Z.uu
diff --git a/contrib/libarchive/libarchive/test/test_read_format_iso_2.iso.Z.uu b/contrib/libarchive/libarchive/test/test_read_format_iso_2.iso.Z.uu
new file mode 100644
index 0000000..688ec36
--- /dev/null
+++ b/contrib/libarchive/libarchive/test/test_read_format_iso_2.iso.Z.uu
@@ -0,0 +1,35 @@
+begin 644 test_read_format_iso_2.iso.Z
+M'YV0``(*'$BPH,&#"!,J7,BPH<.'$"-*G$BQHL6+&#-JW,BQH\>/($.*'$FR
+MI,F3*%.J7,FRI<N7,&/*G$FSILV;.'/JW,FSI\^?0(,*'4JTJ-&C2),J7<JT
+MJ=.G4*-*G4JUJM6K6+-JW<JUJ]>O8,.*'4NVK-FS:-.J7<NVK=NW<./*G4NW
+MKMV[>//JW<NWK]^_@`,+'DRXL.'#B!,K7LRXL>/'D"-+GDRYLN7+F#-KWLRY
+ML^?/H$.+'DVZM.G3J%.K7LVZM>O7L&/+GDV[MNW;N'/KWLV[M^_?P(,+'TZ\
+MN/'CR),K7\Z\N?/GT*-+GTZ]NO7KV+-KW\Z]N_?OX,.+'T^^O/GSZ-.K7\^^
+MO?OW\./+GT^_OOW[^//KW\^_O_^_`0Q!!`PPQ!```$Z408<04Q`!PH,01BCA
+MA!16:.&%$!Z404$;>G0@``%\>"`""`#@04$>2)#0!`.)```%!<%8HD`EEF+C
+MC:4($)"(!V+HXX]`!BGDD$06:>212":IY)),-NGDDU!&*>645%9II8\R%!@#
+M##C$0(,,,6Q)PPP$DI-EF%QZ"::89,)`#H%PQBDGG&=NV>67:(Y9YH?_]>GG
+MGX7](R"!!@)JZ*&()JKHHL<="...`AU80:0`!`$B`!=0.@2CG';JZ:>@A@H8
+MGR]>:FI`DP9@*:F9!BCJJ[#&*NNLM#[EXJ,#R3A0C3C:J*.I(0)P:XP`S!@0
+MK[W^RF,`+DY*T*3&%@O`&P@X4($"!I"C[(ZJNI@I09E&6R*UUBJP@+:0@NAJ
+MK>RVZ^Z[\$;7;$'0[CIMM==FNZVZPI9*D*XT`M"KK^F&&(`)`%A0D`4&%&0`
+MN?F20RF(!`CAP@XQQ*OQQAQW['%S:)3!!AMO*/#QR2BGK/+*G7I;4+CV0FPN
+MNL`>..R_T@8\<(X%AX@P!@5AT#!!#^,[\\0!$$#$Q1FS[/334$<M-6$ACUSR
+MU%AGK?767'?M]==@ARWVV&27;?;9:*>M]MILM^WVVW#'+??<=-=M]]UXYZWW
+MWGSW[???@`<N^."$%V[XX8@GKOCBC#?N^..01R[YY)17;OGEF&>N^>:<=^[Y
+MYZ"'+OKHI)=N^NFHIZ[ZZJRW[OKKL,<N^^RTUV[[[;CGKOONO/?N^^_`!R_\
+M\,07;_SQR">O_/+,-^_\\]!'+_WTU%=O_?789Z_]]MQW[_WWX(<O_OCDEV_^
+M^>BGK_[Z[+?O_OOPQR___/37;__]^.>O__[\]^___P`,H``'2,`"&O"`"$R@
+M`A?(P`8Z\($0C*`$)TC!"EKP@AC,H`8WR,$.>O"#(`RA"$=(PA*:\(0H3*$*
+M5\C"%KKPA3",H0QG2,,:VO"&.,RA#G?(PQ[Z\(=`#*(0ATC$(AKQB$A,HA*7
+MR,0F.O&)4(RB%*=(Q2I:\8I8S*(6M\C%+GKQBV`,HQC'2,8RFO&,:$RC&M?(
+MQC:Z\8UPC*,<YTC'.MKQCGC,HQ[WR,<^^O&/@`RD(`=)R$(:\I"(3*0B%\G(
+M1CKRD9",I"0G2<E*6O*2F,RD)C?)R4YZ\I.@#*4H1TG*4IKRE*A,I2I7R<I6
+MNO*5L(RE+&=)RUK:\I:XS*4N=\G+7OKRE\`,IC"'2<QB&O.8R$RF,I?)S&8Z
+M\YG0C*8TITG-:EKSFMC,IC:WR<UN>O.;X`RG.,=)SG*:\YSH3*<ZU\G.=KKS
+MG?",ISSG2<]ZVO.>^,RG/O?)SW[Z\Y\`#:A`!TK0@AKTH`A-J$(7RM"&.O2A
+M$(VH1"=*T8I:]*(8S:A&-\K1CGKTHR`-J4A'2M*2FO2D*$VI2E?*TI:Z]*4P
+MC:E,9TK3FMKTICC-J4YWRM.>^O2G0`VJ4(=*U*(:]:A(3:I2E\K4ICKUJ5"-
+MJE2G2M6J6O6J6,VJ5K?*U:YZ]:M@#:M8QTK6LIKUK&A-JUK7RM:VNO6M<`TG
+`
+end
diff --git a/contrib/libarchive/libarchive/test/test_read_format_iso_Z.c b/contrib/libarchive/libarchive/test/test_read_format_iso_Z.c
new file mode 100644
index 0000000..e0cf7f7
--- /dev/null
+++ b/contrib/libarchive/libarchive/test/test_read_format_iso_Z.c
@@ -0,0 +1,99 @@
+/*-
+ * Copyright (c) 2003-2007 Tim Kientzle
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include "test.h"
+__FBSDID("$FreeBSD$");
+
+static void
+test1(void)
+{
+ struct archive_entry *ae;
+ struct archive *a;
+ const char *name = "test_read_format_iso.iso.Z";
+
+ extract_reference_file(name);
+
+ assert((a = archive_read_new()) != NULL);
+ assertEqualIntA(a, ARCHIVE_OK,
+ archive_read_support_compression_all(a));
+ assertEqualIntA(a, ARCHIVE_OK,
+ archive_read_support_format_all(a));
+ assertEqualIntA(a, ARCHIVE_OK,
+ archive_read_open_filename(a, name, 512));
+ assertEqualIntA(a, ARCHIVE_OK,
+ archive_read_next_header(a, &ae));
+ assertEqualInt(archive_compression(a),
+ ARCHIVE_COMPRESSION_COMPRESS);
+ assertEqualInt(archive_format(a), ARCHIVE_FORMAT_ISO9660);
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
+ assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
+}
+
+static
+void test2(void)
+{
+ struct archive_entry *ae;
+ struct archive *a;
+ const char *name = "test_read_format_iso_2.iso.Z";
+
+ extract_reference_file(name);
+
+ assert((a = archive_read_new()) != NULL);
+ assertEqualIntA(a, ARCHIVE_OK,
+ archive_read_support_compression_all(a));
+ assertEqualIntA(a, ARCHIVE_OK,
+ archive_read_support_format_all(a));
+ assertEqualIntA(a, ARCHIVE_OK,
+ archive_read_open_filename(a, name, 512));
+ assertEqualIntA(a, ARCHIVE_OK,
+ archive_read_next_header(a, &ae));
+ assertEqualString(".", archive_entry_pathname(ae));
+ assertEqualIntA(a, ARCHIVE_OK,
+ archive_read_next_header(a, &ae));
+ assertEqualString("A", archive_entry_pathname(ae));
+ assertEqualIntA(a, ARCHIVE_OK,
+ archive_read_next_header(a, &ae));
+ assertEqualString("A/B", archive_entry_pathname(ae));
+ assertEqualIntA(a, ARCHIVE_OK,
+ archive_read_next_header(a, &ae));
+ assertEqualString("C", archive_entry_pathname(ae));
+ assertEqualIntA(a, ARCHIVE_OK,
+ archive_read_next_header(a, &ae));
+ assertEqualString("C/D", archive_entry_pathname(ae));
+ assertEqualIntA(a, ARCHIVE_EOF,
+ archive_read_next_header(a, &ae));
+ assertEqualInt(archive_compression(a),
+ ARCHIVE_COMPRESSION_COMPRESS);
+ assertEqualInt(archive_format(a), ARCHIVE_FORMAT_ISO9660);
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
+ assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
+}
+
+DEFINE_TEST(test_read_format_iso_Z)
+{
+ test1();
+ test2();
+}
+
+
diff --git a/lib/libarchive/test/test_read_format_iso_joliet.iso.Z.uu b/contrib/libarchive/libarchive/test/test_read_format_iso_joliet.iso.Z.uu
index b6ac252..b6ac252 100644
--- a/lib/libarchive/test/test_read_format_iso_joliet.iso.Z.uu
+++ b/contrib/libarchive/libarchive/test/test_read_format_iso_joliet.iso.Z.uu
diff --git a/lib/libarchive/test/test_read_format_iso_joliet_long.iso.Z.uu b/contrib/libarchive/libarchive/test/test_read_format_iso_joliet_long.iso.Z.uu
index 9babf69..9babf69 100644
--- a/lib/libarchive/test/test_read_format_iso_joliet_long.iso.Z.uu
+++ b/contrib/libarchive/libarchive/test/test_read_format_iso_joliet_long.iso.Z.uu
diff --git a/lib/libarchive/test/test_read_format_iso_joliet_rockridge.iso.Z.uu b/contrib/libarchive/libarchive/test/test_read_format_iso_joliet_rockridge.iso.Z.uu
index fdccb0c..fdccb0c 100644
--- a/lib/libarchive/test/test_read_format_iso_joliet_rockridge.iso.Z.uu
+++ b/contrib/libarchive/libarchive/test/test_read_format_iso_joliet_rockridge.iso.Z.uu
diff --git a/lib/libarchive/test/test_read_format_iso_multi_extent.c b/contrib/libarchive/libarchive/test/test_read_format_iso_multi_extent.c
index 9697a4b..9697a4b 100644
--- a/lib/libarchive/test/test_read_format_iso_multi_extent.c
+++ b/contrib/libarchive/libarchive/test/test_read_format_iso_multi_extent.c
diff --git a/lib/libarchive/test/test_read_format_iso_multi_extent.iso.Z.uu b/contrib/libarchive/libarchive/test/test_read_format_iso_multi_extent.iso.Z.uu
index 3ce33dc..3ce33dc 100644
--- a/lib/libarchive/test/test_read_format_iso_multi_extent.iso.Z.uu
+++ b/contrib/libarchive/libarchive/test/test_read_format_iso_multi_extent.iso.Z.uu
diff --git a/lib/libarchive/test/test_read_format_iso_rockridge.iso.Z.uu b/contrib/libarchive/libarchive/test/test_read_format_iso_rockridge.iso.Z.uu
index 218631c..218631c 100644
--- a/lib/libarchive/test/test_read_format_iso_rockridge.iso.Z.uu
+++ b/contrib/libarchive/libarchive/test/test_read_format_iso_rockridge.iso.Z.uu
diff --git a/lib/libarchive/test/test_read_format_iso_rockridge_ce.iso.Z.uu b/contrib/libarchive/libarchive/test/test_read_format_iso_rockridge_ce.iso.Z.uu
index 818bb0e..818bb0e 100644
--- a/lib/libarchive/test/test_read_format_iso_rockridge_ce.iso.Z.uu
+++ b/contrib/libarchive/libarchive/test/test_read_format_iso_rockridge_ce.iso.Z.uu
diff --git a/lib/libarchive/test/test_read_format_iso_rockridge_new.iso.Z.uu b/contrib/libarchive/libarchive/test/test_read_format_iso_rockridge_new.iso.Z.uu
index dd013ff..dd013ff 100644
--- a/lib/libarchive/test/test_read_format_iso_rockridge_new.iso.Z.uu
+++ b/contrib/libarchive/libarchive/test/test_read_format_iso_rockridge_new.iso.Z.uu
diff --git a/lib/libarchive/test/test_read_format_iso_rockridge_rr_moved.iso.Z.uu b/contrib/libarchive/libarchive/test/test_read_format_iso_rockridge_rr_moved.iso.Z.uu
index 69de12b..69de12b 100644
--- a/lib/libarchive/test/test_read_format_iso_rockridge_rr_moved.iso.Z.uu
+++ b/contrib/libarchive/libarchive/test/test_read_format_iso_rockridge_rr_moved.iso.Z.uu
diff --git a/lib/libarchive/test/test_read_format_iso_zisofs.iso.Z.uu b/contrib/libarchive/libarchive/test/test_read_format_iso_zisofs.iso.Z.uu
index 00896e1..00896e1 100644
--- a/lib/libarchive/test/test_read_format_iso_zisofs.iso.Z.uu
+++ b/contrib/libarchive/libarchive/test/test_read_format_iso_zisofs.iso.Z.uu
diff --git a/lib/libarchive/test/test_read_format_isojoliet_bz2.c b/contrib/libarchive/libarchive/test/test_read_format_isojoliet_bz2.c
index ca2da83..ca2da83 100644
--- a/lib/libarchive/test/test_read_format_isojoliet_bz2.c
+++ b/contrib/libarchive/libarchive/test/test_read_format_isojoliet_bz2.c
diff --git a/lib/libarchive/test/test_read_format_isojoliet_long.c b/contrib/libarchive/libarchive/test/test_read_format_isojoliet_long.c
index d1d38d7..d1d38d7 100644
--- a/lib/libarchive/test/test_read_format_isojoliet_long.c
+++ b/contrib/libarchive/libarchive/test/test_read_format_isojoliet_long.c
diff --git a/lib/libarchive/test/test_read_format_isojoliet_rr.c b/contrib/libarchive/libarchive/test/test_read_format_isojoliet_rr.c
index b971272..b971272 100644
--- a/lib/libarchive/test/test_read_format_isojoliet_rr.c
+++ b/contrib/libarchive/libarchive/test/test_read_format_isojoliet_rr.c
diff --git a/lib/libarchive/test/test_read_format_isorr_bz2.c b/contrib/libarchive/libarchive/test/test_read_format_isorr_bz2.c
index b7cd704..b7cd704 100644
--- a/lib/libarchive/test/test_read_format_isorr_bz2.c
+++ b/contrib/libarchive/libarchive/test/test_read_format_isorr_bz2.c
diff --git a/lib/libarchive/test/test_read_format_isorr_ce.c b/contrib/libarchive/libarchive/test/test_read_format_isorr_ce.c
index c9cd059..c9cd059 100644
--- a/lib/libarchive/test/test_read_format_isorr_ce.c
+++ b/contrib/libarchive/libarchive/test/test_read_format_isorr_ce.c
diff --git a/lib/libarchive/test/test_read_format_isorr_new_bz2.c b/contrib/libarchive/libarchive/test/test_read_format_isorr_new_bz2.c
index c8554a0..c8554a0 100644
--- a/lib/libarchive/test/test_read_format_isorr_new_bz2.c
+++ b/contrib/libarchive/libarchive/test/test_read_format_isorr_new_bz2.c
diff --git a/lib/libarchive/test/test_read_format_isorr_rr_moved.c b/contrib/libarchive/libarchive/test/test_read_format_isorr_rr_moved.c
index 0aeb226..0aeb226 100644
--- a/lib/libarchive/test/test_read_format_isorr_rr_moved.c
+++ b/contrib/libarchive/libarchive/test/test_read_format_isorr_rr_moved.c
diff --git a/lib/libarchive/test/test_read_format_isozisofs_bz2.c b/contrib/libarchive/libarchive/test/test_read_format_isozisofs_bz2.c
index a4f392e..a4f392e 100644
--- a/lib/libarchive/test/test_read_format_isozisofs_bz2.c
+++ b/contrib/libarchive/libarchive/test/test_read_format_isozisofs_bz2.c
diff --git a/lib/libarchive/test/test_read_format_mtree.c b/contrib/libarchive/libarchive/test/test_read_format_mtree.c
index 93e658f..93e658f 100644
--- a/lib/libarchive/test/test_read_format_mtree.c
+++ b/contrib/libarchive/libarchive/test/test_read_format_mtree.c
diff --git a/lib/libarchive/test/test_read_format_mtree.mtree.uu b/contrib/libarchive/libarchive/test/test_read_format_mtree.mtree.uu
index 9fa0d9b..9fa0d9b 100644
--- a/lib/libarchive/test/test_read_format_mtree.mtree.uu
+++ b/contrib/libarchive/libarchive/test/test_read_format_mtree.mtree.uu
diff --git a/lib/libarchive/test/test_read_format_pax_bz2.c b/contrib/libarchive/libarchive/test/test_read_format_pax_bz2.c
index aa2a5cf..aa2a5cf 100644
--- a/lib/libarchive/test/test_read_format_pax_bz2.c
+++ b/contrib/libarchive/libarchive/test/test_read_format_pax_bz2.c
diff --git a/lib/libarchive/test/test_read_format_raw.c b/contrib/libarchive/libarchive/test/test_read_format_raw.c
index f036d0c..f036d0c 100644
--- a/lib/libarchive/test/test_read_format_raw.c
+++ b/contrib/libarchive/libarchive/test/test_read_format_raw.c
diff --git a/lib/libarchive/test/test_read_format_raw.data.Z.uu b/contrib/libarchive/libarchive/test/test_read_format_raw.data.Z.uu
index 82add2f..82add2f 100644
--- a/lib/libarchive/test/test_read_format_raw.data.Z.uu
+++ b/contrib/libarchive/libarchive/test/test_read_format_raw.data.Z.uu
diff --git a/lib/libarchive/test/test_read_format_raw.data.uu b/contrib/libarchive/libarchive/test/test_read_format_raw.data.uu
index 1a3002a..1a3002a 100644
--- a/lib/libarchive/test/test_read_format_raw.data.uu
+++ b/contrib/libarchive/libarchive/test/test_read_format_raw.data.uu
diff --git a/lib/libarchive/test/test_read_format_tar.c b/contrib/libarchive/libarchive/test/test_read_format_tar.c
index 980866d..980866d 100644
--- a/lib/libarchive/test/test_read_format_tar.c
+++ b/contrib/libarchive/libarchive/test/test_read_format_tar.c
diff --git a/lib/libarchive/test/test_read_format_tar_empty_filename.c b/contrib/libarchive/libarchive/test/test_read_format_tar_empty_filename.c
index 4eb249e..4eb249e 100644
--- a/lib/libarchive/test/test_read_format_tar_empty_filename.c
+++ b/contrib/libarchive/libarchive/test/test_read_format_tar_empty_filename.c
diff --git a/lib/libarchive/test/test_read_format_tar_empty_filename.tar.uu b/contrib/libarchive/libarchive/test/test_read_format_tar_empty_filename.tar.uu
index 08aaf28..08aaf28 100644
--- a/lib/libarchive/test/test_read_format_tar_empty_filename.tar.uu
+++ b/contrib/libarchive/libarchive/test/test_read_format_tar_empty_filename.tar.uu
diff --git a/lib/libarchive/test/test_read_format_tbz.c b/contrib/libarchive/libarchive/test/test_read_format_tbz.c
index be99b36..be99b36 100644
--- a/lib/libarchive/test/test_read_format_tbz.c
+++ b/contrib/libarchive/libarchive/test/test_read_format_tbz.c
diff --git a/lib/libarchive/test/test_read_format_tgz.c b/contrib/libarchive/libarchive/test/test_read_format_tgz.c
index 6b27d3c..6b27d3c 100644
--- a/lib/libarchive/test/test_read_format_tgz.c
+++ b/contrib/libarchive/libarchive/test/test_read_format_tgz.c
diff --git a/lib/libarchive/test/test_read_format_tlz.c b/contrib/libarchive/libarchive/test/test_read_format_tlz.c
index 652d1cd..652d1cd 100644
--- a/lib/libarchive/test/test_read_format_tlz.c
+++ b/contrib/libarchive/libarchive/test/test_read_format_tlz.c
diff --git a/lib/libarchive/test/test_read_format_txz.c b/contrib/libarchive/libarchive/test/test_read_format_txz.c
index 4d088b2..4d088b2 100644
--- a/lib/libarchive/test/test_read_format_txz.c
+++ b/contrib/libarchive/libarchive/test/test_read_format_txz.c
diff --git a/lib/libarchive/test/test_read_format_tz.c b/contrib/libarchive/libarchive/test/test_read_format_tz.c
index 3dd001f..3dd001f 100644
--- a/lib/libarchive/test/test_read_format_tz.c
+++ b/contrib/libarchive/libarchive/test/test_read_format_tz.c
diff --git a/lib/libarchive/test/test_read_format_xar.c b/contrib/libarchive/libarchive/test/test_read_format_xar.c
index a696677..a696677 100644
--- a/lib/libarchive/test/test_read_format_xar.c
+++ b/contrib/libarchive/libarchive/test/test_read_format_xar.c
diff --git a/lib/libarchive/test/test_read_format_zip.c b/contrib/libarchive/libarchive/test/test_read_format_zip.c
index 8c7059d..8c7059d 100644
--- a/lib/libarchive/test/test_read_format_zip.c
+++ b/contrib/libarchive/libarchive/test/test_read_format_zip.c
diff --git a/lib/libarchive/test/test_read_format_zip.zip.uu b/contrib/libarchive/libarchive/test/test_read_format_zip.zip.uu
index 1e0cb22..1e0cb22 100644
--- a/lib/libarchive/test/test_read_format_zip.zip.uu
+++ b/contrib/libarchive/libarchive/test/test_read_format_zip.zip.uu
diff --git a/lib/libarchive/test/test_read_large.c b/contrib/libarchive/libarchive/test/test_read_large.c
index 5ff01fd..5ff01fd 100644
--- a/lib/libarchive/test/test_read_large.c
+++ b/contrib/libarchive/libarchive/test/test_read_large.c
diff --git a/lib/libarchive/test/test_read_pax_truncated.c b/contrib/libarchive/libarchive/test/test_read_pax_truncated.c
index 393fd9f..393fd9f 100644
--- a/lib/libarchive/test/test_read_pax_truncated.c
+++ b/contrib/libarchive/libarchive/test/test_read_pax_truncated.c
diff --git a/lib/libarchive/test/test_read_position.c b/contrib/libarchive/libarchive/test/test_read_position.c
index bc7b53b..bc7b53b 100644
--- a/lib/libarchive/test/test_read_position.c
+++ b/contrib/libarchive/libarchive/test/test_read_position.c
diff --git a/lib/libarchive/test/test_read_truncated.c b/contrib/libarchive/libarchive/test/test_read_truncated.c
index 7012684..7012684 100644
--- a/lib/libarchive/test/test_read_truncated.c
+++ b/contrib/libarchive/libarchive/test/test_read_truncated.c
diff --git a/lib/libarchive/test/test_read_uu.c b/contrib/libarchive/libarchive/test/test_read_uu.c
index 6ad279f..6ad279f 100644
--- a/lib/libarchive/test/test_read_uu.c
+++ b/contrib/libarchive/libarchive/test/test_read_uu.c
diff --git a/lib/libarchive/test/test_tar_filenames.c b/contrib/libarchive/libarchive/test/test_tar_filenames.c
index ac6df3e..ac6df3e 100644
--- a/lib/libarchive/test/test_tar_filenames.c
+++ b/contrib/libarchive/libarchive/test/test_tar_filenames.c
diff --git a/lib/libarchive/test/test_tar_large.c b/contrib/libarchive/libarchive/test/test_tar_large.c
index 92ca839..92ca839 100644
--- a/lib/libarchive/test/test_tar_large.c
+++ b/contrib/libarchive/libarchive/test/test_tar_large.c
diff --git a/lib/libarchive/test/test_ustar_filenames.c b/contrib/libarchive/libarchive/test/test_ustar_filenames.c
index 130a31e..130a31e 100644
--- a/lib/libarchive/test/test_ustar_filenames.c
+++ b/contrib/libarchive/libarchive/test/test_ustar_filenames.c
diff --git a/lib/libarchive/test/test_write_compress.c b/contrib/libarchive/libarchive/test/test_write_compress.c
index e1b8f3c..e1b8f3c 100644
--- a/lib/libarchive/test/test_write_compress.c
+++ b/contrib/libarchive/libarchive/test/test_write_compress.c
diff --git a/lib/libarchive/test/test_write_compress_bzip2.c b/contrib/libarchive/libarchive/test/test_write_compress_bzip2.c
index 54c8a50..54c8a50 100644
--- a/lib/libarchive/test/test_write_compress_bzip2.c
+++ b/contrib/libarchive/libarchive/test/test_write_compress_bzip2.c
diff --git a/lib/libarchive/test/test_write_compress_gzip.c b/contrib/libarchive/libarchive/test/test_write_compress_gzip.c
index 9e42b13..9e42b13 100644
--- a/lib/libarchive/test/test_write_compress_gzip.c
+++ b/contrib/libarchive/libarchive/test/test_write_compress_gzip.c
diff --git a/lib/libarchive/test/test_write_compress_lzma.c b/contrib/libarchive/libarchive/test/test_write_compress_lzma.c
index 88b9d63..88b9d63 100644
--- a/lib/libarchive/test/test_write_compress_lzma.c
+++ b/contrib/libarchive/libarchive/test/test_write_compress_lzma.c
diff --git a/lib/libarchive/test/test_write_compress_program.c b/contrib/libarchive/libarchive/test/test_write_compress_program.c
index 34d0680..34d0680 100644
--- a/lib/libarchive/test/test_write_compress_program.c
+++ b/contrib/libarchive/libarchive/test/test_write_compress_program.c
diff --git a/lib/libarchive/test/test_write_compress_xz.c b/contrib/libarchive/libarchive/test/test_write_compress_xz.c
index 554d163..554d163 100644
--- a/lib/libarchive/test/test_write_compress_xz.c
+++ b/contrib/libarchive/libarchive/test/test_write_compress_xz.c
diff --git a/lib/libarchive/test/test_write_disk.c b/contrib/libarchive/libarchive/test/test_write_disk.c
index f3f4e56..f3f4e56 100644
--- a/lib/libarchive/test/test_write_disk.c
+++ b/contrib/libarchive/libarchive/test/test_write_disk.c
diff --git a/lib/libarchive/test/test_write_disk_failures.c b/contrib/libarchive/libarchive/test/test_write_disk_failures.c
index f74c947..f74c947 100644
--- a/lib/libarchive/test/test_write_disk_failures.c
+++ b/contrib/libarchive/libarchive/test/test_write_disk_failures.c
diff --git a/lib/libarchive/test/test_write_disk_hardlink.c b/contrib/libarchive/libarchive/test/test_write_disk_hardlink.c
index 5756602..5756602 100644
--- a/lib/libarchive/test/test_write_disk_hardlink.c
+++ b/contrib/libarchive/libarchive/test/test_write_disk_hardlink.c
diff --git a/lib/libarchive/test/test_write_disk_perms.c b/contrib/libarchive/libarchive/test/test_write_disk_perms.c
index f53ce19..f53ce19 100644
--- a/lib/libarchive/test/test_write_disk_perms.c
+++ b/contrib/libarchive/libarchive/test/test_write_disk_perms.c
diff --git a/lib/libarchive/test/test_write_disk_secure.c b/contrib/libarchive/libarchive/test/test_write_disk_secure.c
index 74506f1..74506f1 100644
--- a/lib/libarchive/test/test_write_disk_secure.c
+++ b/contrib/libarchive/libarchive/test/test_write_disk_secure.c
diff --git a/lib/libarchive/test/test_write_disk_sparse.c b/contrib/libarchive/libarchive/test/test_write_disk_sparse.c
index b613f56..b613f56 100644
--- a/lib/libarchive/test/test_write_disk_sparse.c
+++ b/contrib/libarchive/libarchive/test/test_write_disk_sparse.c
diff --git a/lib/libarchive/test/test_write_disk_symlink.c b/contrib/libarchive/libarchive/test/test_write_disk_symlink.c
index 861f3bf..861f3bf 100644
--- a/lib/libarchive/test/test_write_disk_symlink.c
+++ b/contrib/libarchive/libarchive/test/test_write_disk_symlink.c
diff --git a/lib/libarchive/test/test_write_disk_times.c b/contrib/libarchive/libarchive/test/test_write_disk_times.c
index 13841cf..13841cf 100644
--- a/lib/libarchive/test/test_write_disk_times.c
+++ b/contrib/libarchive/libarchive/test/test_write_disk_times.c
diff --git a/lib/libarchive/test/test_write_format_ar.c b/contrib/libarchive/libarchive/test/test_write_format_ar.c
index 81224b3..81224b3 100644
--- a/lib/libarchive/test/test_write_format_ar.c
+++ b/contrib/libarchive/libarchive/test/test_write_format_ar.c
diff --git a/lib/libarchive/test/test_write_format_cpio.c b/contrib/libarchive/libarchive/test/test_write_format_cpio.c
index 5c7141f..5c7141f 100644
--- a/lib/libarchive/test/test_write_format_cpio.c
+++ b/contrib/libarchive/libarchive/test/test_write_format_cpio.c
diff --git a/lib/libarchive/test/test_write_format_cpio_empty.c b/contrib/libarchive/libarchive/test/test_write_format_cpio_empty.c
index fed26ec0..fed26ec0 100644
--- a/lib/libarchive/test/test_write_format_cpio_empty.c
+++ b/contrib/libarchive/libarchive/test/test_write_format_cpio_empty.c
diff --git a/lib/libarchive/test/test_write_format_cpio_newc.c b/contrib/libarchive/libarchive/test/test_write_format_cpio_newc.c
index 447d111..447d111 100644
--- a/lib/libarchive/test/test_write_format_cpio_newc.c
+++ b/contrib/libarchive/libarchive/test/test_write_format_cpio_newc.c
diff --git a/lib/libarchive/test/test_write_format_cpio_odc.c b/contrib/libarchive/libarchive/test/test_write_format_cpio_odc.c
index 309e003..309e003 100644
--- a/lib/libarchive/test/test_write_format_cpio_odc.c
+++ b/contrib/libarchive/libarchive/test/test_write_format_cpio_odc.c
diff --git a/lib/libarchive/test/test_write_format_mtree.c b/contrib/libarchive/libarchive/test/test_write_format_mtree.c
index b9de422..b9de422 100644
--- a/lib/libarchive/test/test_write_format_mtree.c
+++ b/contrib/libarchive/libarchive/test/test_write_format_mtree.c
diff --git a/lib/libarchive/test/test_write_format_pax.c b/contrib/libarchive/libarchive/test/test_write_format_pax.c
index 06cfca6..06cfca6 100644
--- a/lib/libarchive/test/test_write_format_pax.c
+++ b/contrib/libarchive/libarchive/test/test_write_format_pax.c
diff --git a/lib/libarchive/test/test_write_format_shar_empty.c b/contrib/libarchive/libarchive/test/test_write_format_shar_empty.c
index 173791b..173791b 100644
--- a/lib/libarchive/test/test_write_format_shar_empty.c
+++ b/contrib/libarchive/libarchive/test/test_write_format_shar_empty.c
diff --git a/lib/libarchive/test/test_write_format_tar.c b/contrib/libarchive/libarchive/test/test_write_format_tar.c
index ef210e6..ef210e6 100644
--- a/lib/libarchive/test/test_write_format_tar.c
+++ b/contrib/libarchive/libarchive/test/test_write_format_tar.c
diff --git a/lib/libarchive/test/test_write_format_tar_empty.c b/contrib/libarchive/libarchive/test/test_write_format_tar_empty.c
index 5703253..5703253 100644
--- a/lib/libarchive/test/test_write_format_tar_empty.c
+++ b/contrib/libarchive/libarchive/test/test_write_format_tar_empty.c
diff --git a/lib/libarchive/test/test_write_format_tar_ustar.c b/contrib/libarchive/libarchive/test/test_write_format_tar_ustar.c
index f66fd7a..f66fd7a 100644
--- a/lib/libarchive/test/test_write_format_tar_ustar.c
+++ b/contrib/libarchive/libarchive/test/test_write_format_tar_ustar.c
diff --git a/lib/libarchive/test/test_write_format_zip.c b/contrib/libarchive/libarchive/test/test_write_format_zip.c
index f4c51f3..f4c51f3 100644
--- a/lib/libarchive/test/test_write_format_zip.c
+++ b/contrib/libarchive/libarchive/test/test_write_format_zip.c
diff --git a/lib/libarchive/test/test_write_format_zip_empty.c b/contrib/libarchive/libarchive/test/test_write_format_zip_empty.c
index ef90b8d..ef90b8d 100644
--- a/lib/libarchive/test/test_write_format_zip_empty.c
+++ b/contrib/libarchive/libarchive/test/test_write_format_zip_empty.c
diff --git a/lib/libarchive/test/test_write_format_zip_no_compression.c b/contrib/libarchive/libarchive/test/test_write_format_zip_no_compression.c
index 63e76b6..63e76b6 100644
--- a/lib/libarchive/test/test_write_format_zip_no_compression.c
+++ b/contrib/libarchive/libarchive/test/test_write_format_zip_no_compression.c
diff --git a/lib/libarchive/test/test_write_open_memory.c b/contrib/libarchive/libarchive/test/test_write_open_memory.c
index 14ce6e9..14ce6e9 100644
--- a/lib/libarchive/test/test_write_open_memory.c
+++ b/contrib/libarchive/libarchive/test/test_write_open_memory.c
diff --git a/lib/libarchive/libarchive_fe/err.c b/contrib/libarchive/libarchive_fe/err.c
index eb3f9f3..eb3f9f3 100644
--- a/lib/libarchive/libarchive_fe/err.c
+++ b/contrib/libarchive/libarchive_fe/err.c
diff --git a/lib/libarchive/libarchive_fe/err.h b/contrib/libarchive/libarchive_fe/err.h
index 4812b28..4812b28 100644
--- a/lib/libarchive/libarchive_fe/err.h
+++ b/contrib/libarchive/libarchive_fe/err.h
diff --git a/lib/libarchive/libarchive_fe/lafe_platform.h b/contrib/libarchive/libarchive_fe/lafe_platform.h
index 38e100d..38e100d 100644
--- a/lib/libarchive/libarchive_fe/lafe_platform.h
+++ b/contrib/libarchive/libarchive_fe/lafe_platform.h
diff --git a/lib/libarchive/libarchive_fe/line_reader.c b/contrib/libarchive/libarchive_fe/line_reader.c
index 4af60de..4af60de 100644
--- a/lib/libarchive/libarchive_fe/line_reader.c
+++ b/contrib/libarchive/libarchive_fe/line_reader.c
diff --git a/lib/libarchive/libarchive_fe/line_reader.h b/contrib/libarchive/libarchive_fe/line_reader.h
index e4c3729..e4c3729 100644
--- a/lib/libarchive/libarchive_fe/line_reader.h
+++ b/contrib/libarchive/libarchive_fe/line_reader.h
diff --git a/contrib/libarchive/libarchive_fe/matching.c b/contrib/libarchive/libarchive_fe/matching.c
new file mode 100644
index 0000000..20877ff
--- /dev/null
+++ b/contrib/libarchive/libarchive_fe/matching.c
@@ -0,0 +1,284 @@
+/*-
+ * Copyright (c) 2003-2007 Tim Kientzle
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "lafe_platform.h"
+__FBSDID("$FreeBSD$");
+
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+#include "err.h"
+#include "line_reader.h"
+#include "matching.h"
+#include "pathmatch.h"
+
+struct match {
+ struct match *next;
+ int matches;
+ char pattern[1];
+};
+
+struct lafe_matching {
+ struct match *exclusions;
+ int exclusions_count;
+ struct match *inclusions;
+ int inclusions_count;
+ int inclusions_unmatched_count;
+};
+
+static void add_pattern(struct match **list, const char *pattern);
+static void initialize_matching(struct lafe_matching **);
+static int match_exclusion(struct match *, const char *pathname);
+static int match_inclusion(struct match *, const char *pathname);
+
+/*
+ * The matching logic here needs to be re-thought. I started out to
+ * try to mimic gtar's matching logic, but it's not entirely
+ * consistent. In particular 'tar -t' and 'tar -x' interpret patterns
+ * on the command line as anchored, but --exclude doesn't.
+ */
+
+/*
+ * Utility functions to manage exclusion/inclusion patterns
+ */
+
+int
+lafe_exclude(struct lafe_matching **matching, const char *pattern)
+{
+
+ if (*matching == NULL)
+ initialize_matching(matching);
+ add_pattern(&((*matching)->exclusions), pattern);
+ (*matching)->exclusions_count++;
+ return (0);
+}
+
+int
+lafe_exclude_from_file(struct lafe_matching **matching, const char *pathname)
+{
+ struct lafe_line_reader *lr;
+ const char *p;
+ int ret = 0;
+
+ lr = lafe_line_reader(pathname, 0);
+ while ((p = lafe_line_reader_next(lr)) != NULL) {
+ if (lafe_exclude(matching, p) != 0)
+ ret = -1;
+ }
+ lafe_line_reader_free(lr);
+ return (ret);
+}
+
+int
+lafe_include(struct lafe_matching **matching, const char *pattern)
+{
+
+ if (*matching == NULL)
+ initialize_matching(matching);
+ add_pattern(&((*matching)->inclusions), pattern);
+ (*matching)->inclusions_count++;
+ (*matching)->inclusions_unmatched_count++;
+ return (0);
+}
+
+int
+lafe_include_from_file(struct lafe_matching **matching, const char *pathname,
+ int nullSeparator)
+{
+ struct lafe_line_reader *lr;
+ const char *p;
+ int ret = 0;
+
+ lr = lafe_line_reader(pathname, nullSeparator);
+ while ((p = lafe_line_reader_next(lr)) != NULL) {
+ if (lafe_include(matching, p) != 0)
+ ret = -1;
+ }
+ lafe_line_reader_free(lr);
+ return (ret);
+}
+
+static void
+add_pattern(struct match **list, const char *pattern)
+{
+ struct match *match;
+ size_t len;
+
+ len = strlen(pattern);
+ match = malloc(sizeof(*match) + len + 1);
+ if (match == NULL)
+ lafe_errc(1, errno, "Out of memory");
+ strcpy(match->pattern, pattern);
+ /* Both "foo/" and "foo" should match "foo/bar". */
+ if (len && match->pattern[len - 1] == '/')
+ match->pattern[strlen(match->pattern)-1] = '\0';
+ match->next = *list;
+ *list = match;
+ match->matches = 0;
+}
+
+
+int
+lafe_excluded(struct lafe_matching *matching, const char *pathname)
+{
+ struct match *match;
+ struct match *matched;
+
+ if (matching == NULL)
+ return (0);
+
+ /* Exclusions take priority */
+ for (match = matching->exclusions; match != NULL; match = match->next){
+ if (match_exclusion(match, pathname))
+ return (1);
+ }
+
+ /* Then check for inclusions */
+ matched = NULL;
+ for (match = matching->inclusions; match != NULL; match = match->next){
+ if (match_inclusion(match, pathname)) {
+ /*
+ * If this pattern has never been matched,
+ * then we're done.
+ */
+ if (match->matches == 0) {
+ match->matches++;
+ matching->inclusions_unmatched_count--;
+ return (0);
+ }
+ /*
+ * Otherwise, remember the match but keep checking
+ * in case we can tick off an unmatched pattern.
+ */
+ matched = match;
+ }
+ }
+ /*
+ * We didn't find a pattern that had never been matched, but
+ * we did find a match, so count it and exit.
+ */
+ if (matched != NULL) {
+ matched->matches++;
+ return (0);
+ }
+
+ /* If there were inclusions, default is to exclude. */
+ if (matching->inclusions != NULL)
+ return (1);
+
+ /* No explicit inclusions, default is to match. */
+ return (0);
+}
+
+/*
+ * This is a little odd, but it matches the default behavior of
+ * gtar. In particular, 'a*b' will match 'foo/a1111/222b/bar'
+ *
+ */
+static int
+match_exclusion(struct match *match, const char *pathname)
+{
+ return (lafe_pathmatch(match->pattern,
+ pathname,
+ PATHMATCH_NO_ANCHOR_START | PATHMATCH_NO_ANCHOR_END));
+}
+
+/*
+ * Again, mimic gtar: inclusions are always anchored (have to match
+ * the beginning of the path) even though exclusions are not anchored.
+ */
+static int
+match_inclusion(struct match *match, const char *pathname)
+{
+#if 0
+ return (lafe_pathmatch(match->pattern, pathname, 0));
+#else
+ return (lafe_pathmatch(match->pattern, pathname, PATHMATCH_NO_ANCHOR_END));
+#endif
+}
+
+void
+lafe_cleanup_exclusions(struct lafe_matching **matching)
+{
+ struct match *p, *q;
+
+ if (*matching == NULL)
+ return;
+
+ for (p = (*matching)->inclusions; p != NULL; ) {
+ q = p;
+ p = p->next;
+ free(q);
+ }
+
+ for (p = (*matching)->exclusions; p != NULL; ) {
+ q = p;
+ p = p->next;
+ free(q);
+ }
+
+ free(*matching);
+ *matching = NULL;
+}
+
+static void
+initialize_matching(struct lafe_matching **matching)
+{
+ *matching = calloc(sizeof(**matching), 1);
+ if (*matching == NULL)
+ lafe_errc(1, errno, "No memory");
+}
+
+int
+lafe_unmatched_inclusions(struct lafe_matching *matching)
+{
+
+ if (matching == NULL)
+ return (0);
+ return (matching->inclusions_unmatched_count);
+}
+
+int
+lafe_unmatched_inclusions_warn(struct lafe_matching *matching, const char *msg)
+{
+ struct match *p;
+
+ if (matching == NULL)
+ return (0);
+
+ for (p = matching->inclusions; p != NULL; p = p->next) {
+ if (p->matches == 0)
+ lafe_warnc(0, "%s: %s", p->pattern, msg);
+ }
+
+ return (matching->inclusions_unmatched_count);
+}
diff --git a/lib/libarchive/libarchive_fe/matching.h b/contrib/libarchive/libarchive_fe/matching.h
index f4edebd..f4edebd 100644
--- a/lib/libarchive/libarchive_fe/matching.h
+++ b/contrib/libarchive/libarchive_fe/matching.h
diff --git a/lib/libarchive/libarchive_fe/pathmatch.c b/contrib/libarchive/libarchive_fe/pathmatch.c
index e211362..e211362 100644
--- a/lib/libarchive/libarchive_fe/pathmatch.c
+++ b/contrib/libarchive/libarchive_fe/pathmatch.c
diff --git a/lib/libarchive/libarchive_fe/pathmatch.h b/contrib/libarchive/libarchive_fe/pathmatch.h
index a92f3ae..a92f3ae 100644
--- a/lib/libarchive/libarchive_fe/pathmatch.h
+++ b/contrib/libarchive/libarchive_fe/pathmatch.h
diff --git a/usr.bin/tar/bsdtar.1 b/contrib/libarchive/tar/bsdtar.1
index 14c77e9..14c77e9 100644
--- a/usr.bin/tar/bsdtar.1
+++ b/contrib/libarchive/tar/bsdtar.1
diff --git a/contrib/libarchive/tar/bsdtar.c b/contrib/libarchive/tar/bsdtar.c
new file mode 100644
index 0000000..0e7216f
--- /dev/null
+++ b/contrib/libarchive/tar/bsdtar.c
@@ -0,0 +1,757 @@
+/*-
+ * Copyright (c) 2003-2008 Tim Kientzle
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "bsdtar_platform.h"
+__FBSDID("$FreeBSD$");
+
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef HAVE_LANGINFO_H
+#include <langinfo.h>
+#endif
+#ifdef HAVE_LOCALE_H
+#include <locale.h>
+#endif
+#ifdef HAVE_PATHS_H
+#include <paths.h>
+#endif
+#ifdef HAVE_SIGNAL_H
+#include <signal.h>
+#endif
+#include <stdio.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#ifdef HAVE_TIME_H
+#include <time.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#if HAVE_ZLIB_H
+#include <zlib.h>
+#endif
+
+#include "bsdtar.h"
+#include "err.h"
+
+/*
+ * Per POSIX.1-1988, tar defaults to reading/writing archives to/from
+ * the default tape device for the system. Pick something reasonable here.
+ */
+#ifdef __linux
+#define _PATH_DEFTAPE "/dev/st0"
+#endif
+#if defined(_WIN32) && !defined(__CYGWIN__)
+#define _PATH_DEFTAPE "\\\\.\\tape0"
+#endif
+
+#ifndef _PATH_DEFTAPE
+#define _PATH_DEFTAPE "/dev/tape"
+#endif
+
+#ifdef __MINGW32__
+int _CRT_glob = 0; /* Disable broken CRT globbing. */
+#endif
+
+static struct bsdtar *_bsdtar;
+
+#if defined(HAVE_SIGACTION) && (defined(SIGINFO) || defined(SIGUSR1))
+static volatile int siginfo_occurred;
+
+static void
+siginfo_handler(int sig)
+{
+ (void)sig; /* UNUSED */
+ siginfo_occurred = 1;
+}
+
+int
+need_report(void)
+{
+ int r = siginfo_occurred;
+ siginfo_occurred = 0;
+ return (r);
+}
+#else
+int
+need_report(void)
+{
+ return (0);
+}
+#endif
+
+/* External function to parse a date/time string */
+time_t get_date(time_t, const char *);
+
+static void long_help(void);
+static void only_mode(struct bsdtar *, const char *opt,
+ const char *valid);
+static void set_mode(struct bsdtar *, char opt);
+static void version(void);
+
+/* A basic set of security flags to request from libarchive. */
+#define SECURITY \
+ (ARCHIVE_EXTRACT_SECURE_SYMLINKS \
+ | ARCHIVE_EXTRACT_SECURE_NODOTDOT)
+
+int
+main(int argc, char **argv)
+{
+ struct bsdtar *bsdtar, bsdtar_storage;
+ int opt, t;
+ char option_o;
+ char possible_help_request;
+ char buff[16];
+ time_t now;
+
+ /*
+ * Use a pointer for consistency, but stack-allocated storage
+ * for ease of cleanup.
+ */
+ _bsdtar = bsdtar = &bsdtar_storage;
+ memset(bsdtar, 0, sizeof(*bsdtar));
+ bsdtar->fd = -1; /* Mark as "unused" */
+ bsdtar->gid = -1;
+ bsdtar->uid = -1;
+ option_o = 0;
+
+#if defined(HAVE_SIGACTION) && (defined(SIGINFO) || defined(SIGUSR1))
+ { /* Catch SIGINFO and SIGUSR1, if they exist. */
+ struct sigaction sa;
+ sa.sa_handler = siginfo_handler;
+ sigemptyset(&sa.sa_mask);
+ sa.sa_flags = 0;
+#ifdef SIGINFO
+ if (sigaction(SIGINFO, &sa, NULL))
+ lafe_errc(1, errno, "sigaction(SIGINFO) failed");
+#endif
+#ifdef SIGUSR1
+ /* ... and treat SIGUSR1 the same way as SIGINFO. */
+ if (sigaction(SIGUSR1, &sa, NULL))
+ lafe_errc(1, errno, "sigaction(SIGUSR1) failed");
+#endif
+ }
+#endif
+
+
+ /* Need lafe_progname before calling lafe_warnc. */
+ if (*argv == NULL)
+ lafe_progname = "bsdtar";
+ else {
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ lafe_progname = strrchr(*argv, '\\');
+#else
+ lafe_progname = strrchr(*argv, '/');
+#endif
+ if (lafe_progname != NULL)
+ lafe_progname++;
+ else
+ lafe_progname = *argv;
+ }
+
+ time(&now);
+
+#if HAVE_SETLOCALE
+ if (setlocale(LC_ALL, "") == NULL)
+ lafe_warnc(0, "Failed to set default locale");
+#endif
+#if defined(HAVE_NL_LANGINFO) && defined(HAVE_D_MD_ORDER)
+ bsdtar->day_first = (*nl_langinfo(D_MD_ORDER) == 'd');
+#endif
+ possible_help_request = 0;
+
+ /* Look up uid of current user for future reference */
+ bsdtar->user_uid = geteuid();
+
+ /* Default: open tape drive. */
+ bsdtar->filename = getenv("TAPE");
+ if (bsdtar->filename == NULL)
+ bsdtar->filename = _PATH_DEFTAPE;
+
+ /* Default: preserve mod time on extract */
+ bsdtar->extract_flags = ARCHIVE_EXTRACT_TIME;
+
+ /* Default: Perform basic security checks. */
+ bsdtar->extract_flags |= SECURITY;
+
+#ifndef _WIN32
+ /* On POSIX systems, assume --same-owner and -p when run by
+ * the root user. This doesn't make any sense on Windows. */
+ if (bsdtar->user_uid == 0) {
+ /* --same-owner */
+ bsdtar->extract_flags |= ARCHIVE_EXTRACT_OWNER;
+ /* -p */
+ bsdtar->extract_flags |= ARCHIVE_EXTRACT_PERM;
+ bsdtar->extract_flags |= ARCHIVE_EXTRACT_ACL;
+ bsdtar->extract_flags |= ARCHIVE_EXTRACT_XATTR;
+ bsdtar->extract_flags |= ARCHIVE_EXTRACT_FFLAGS;
+ }
+#endif
+
+ bsdtar->argv = argv;
+ bsdtar->argc = argc;
+
+ /*
+ * Comments following each option indicate where that option
+ * originated: SUSv2, POSIX, GNU tar, star, etc. If there's
+ * no such comment, then I don't know of anyone else who
+ * implements that option.
+ */
+ while ((opt = bsdtar_getopt(bsdtar)) != -1) {
+ switch (opt) {
+ case 'B': /* GNU tar */
+ /* libarchive doesn't need this; just ignore it. */
+ break;
+ case 'b': /* SUSv2 */
+ t = atoi(bsdtar->optarg);
+ if (t <= 0 || t > 8192)
+ lafe_errc(1, 0,
+ "Argument to -b is out of range (1..8192)");
+ bsdtar->bytes_per_block = 512 * t;
+ break;
+ case 'C': /* GNU tar */
+ set_chdir(bsdtar, bsdtar->optarg);
+ break;
+ case 'c': /* SUSv2 */
+ set_mode(bsdtar, opt);
+ break;
+ case OPTION_CHECK_LINKS: /* GNU tar */
+ bsdtar->option_warn_links = 1;
+ break;
+ case OPTION_CHROOT: /* NetBSD */
+ bsdtar->option_chroot = 1;
+ break;
+ case OPTION_EXCLUDE: /* GNU tar */
+ if (lafe_exclude(&bsdtar->matching, bsdtar->optarg))
+ lafe_errc(1, 0,
+ "Couldn't exclude %s\n", bsdtar->optarg);
+ break;
+ case OPTION_FORMAT: /* GNU tar, others */
+ bsdtar->create_format = bsdtar->optarg;
+ break;
+ case 'f': /* SUSv2 */
+ bsdtar->filename = bsdtar->optarg;
+ if (strcmp(bsdtar->filename, "-") == 0)
+ bsdtar->filename = NULL;
+ break;
+ case OPTION_GID: /* cpio */
+ t = atoi(bsdtar->optarg);
+ if (t < 0)
+ lafe_errc(1, 0,
+ "Argument to --gid must be positive");
+ bsdtar->gid = t;
+ break;
+ case OPTION_GNAME: /* cpio */
+ bsdtar->gname = bsdtar->optarg;
+ break;
+ case 'H': /* BSD convention */
+ bsdtar->symlink_mode = 'H';
+ break;
+ case 'h': /* Linux Standards Base, gtar; synonym for -L */
+ bsdtar->symlink_mode = 'L';
+ /* Hack: -h by itself is the "help" command. */
+ possible_help_request = 1;
+ break;
+ case OPTION_HELP: /* GNU tar, others */
+ long_help();
+ exit(0);
+ break;
+ case 'I': /* GNU tar */
+ /*
+ * TODO: Allow 'names' to come from an archive,
+ * not just a text file. Design a good UI for
+ * allowing names and mode/owner to be read
+ * from an archive, with contents coming from
+ * disk. This can be used to "refresh" an
+ * archive or to design archives with special
+ * permissions without having to create those
+ * permissions on disk.
+ */
+ bsdtar->names_from_file = bsdtar->optarg;
+ break;
+ case OPTION_INCLUDE:
+ /*
+ * Noone else has the @archive extension, so
+ * noone else needs this to filter entries
+ * when transforming archives.
+ */
+ if (lafe_include(&bsdtar->matching, bsdtar->optarg))
+ lafe_errc(1, 0,
+ "Failed to add %s to inclusion list",
+ bsdtar->optarg);
+ break;
+ case 'j': /* GNU tar */
+ if (bsdtar->create_compression != '\0')
+ lafe_errc(1, 0,
+ "Can't specify both -%c and -%c", opt,
+ bsdtar->create_compression);
+ bsdtar->create_compression = opt;
+ break;
+ case 'J': /* GNU tar 1.21 and later */
+ if (bsdtar->create_compression != '\0')
+ lafe_errc(1, 0,
+ "Can't specify both -%c and -%c", opt,
+ bsdtar->create_compression);
+ bsdtar->create_compression = opt;
+ break;
+ case 'k': /* GNU tar */
+ bsdtar->extract_flags |= ARCHIVE_EXTRACT_NO_OVERWRITE;
+ break;
+ case OPTION_KEEP_NEWER_FILES: /* GNU tar */
+ bsdtar->extract_flags |= ARCHIVE_EXTRACT_NO_OVERWRITE_NEWER;
+ break;
+ case 'L': /* BSD convention */
+ bsdtar->symlink_mode = 'L';
+ break;
+ case 'l': /* SUSv2 and GNU tar beginning with 1.16 */
+ /* GNU tar 1.13 used -l for --one-file-system */
+ bsdtar->option_warn_links = 1;
+ break;
+ case OPTION_LZMA:
+ if (bsdtar->create_compression != '\0')
+ lafe_errc(1, 0,
+ "Can't specify both -%c and -%c", opt,
+ bsdtar->create_compression);
+ bsdtar->create_compression = opt;
+ break;
+ case 'm': /* SUSv2 */
+ bsdtar->extract_flags &= ~ARCHIVE_EXTRACT_TIME;
+ break;
+ case 'n': /* GNU tar */
+ bsdtar->option_no_subdirs = 1;
+ break;
+ /*
+ * Selecting files by time:
+ * --newer-?time='date' Only files newer than 'date'
+ * --newer-?time-than='file' Only files newer than time
+ * on specified file (useful for incremental backups)
+ * TODO: Add corresponding "older" options to reverse these.
+ */
+ case OPTION_NEWER_CTIME: /* GNU tar */
+ bsdtar->newer_ctime_sec = get_date(now, bsdtar->optarg);
+ break;
+ case OPTION_NEWER_CTIME_THAN:
+ {
+ struct stat st;
+ if (stat(bsdtar->optarg, &st) != 0)
+ lafe_errc(1, 0,
+ "Can't open file %s", bsdtar->optarg);
+ bsdtar->newer_ctime_sec = st.st_ctime;
+ bsdtar->newer_ctime_nsec =
+ ARCHIVE_STAT_CTIME_NANOS(&st);
+ }
+ break;
+ case OPTION_NEWER_MTIME: /* GNU tar */
+ bsdtar->newer_mtime_sec = get_date(now, bsdtar->optarg);
+ break;
+ case OPTION_NEWER_MTIME_THAN:
+ {
+ struct stat st;
+ if (stat(bsdtar->optarg, &st) != 0)
+ lafe_errc(1, 0,
+ "Can't open file %s", bsdtar->optarg);
+ bsdtar->newer_mtime_sec = st.st_mtime;
+ bsdtar->newer_mtime_nsec =
+ ARCHIVE_STAT_MTIME_NANOS(&st);
+ }
+ break;
+ case OPTION_NODUMP: /* star */
+ bsdtar->option_honor_nodump = 1;
+ break;
+ case OPTION_NO_SAME_OWNER: /* GNU tar */
+ bsdtar->extract_flags &= ~ARCHIVE_EXTRACT_OWNER;
+ break;
+ case OPTION_NO_SAME_PERMISSIONS: /* GNU tar */
+ bsdtar->extract_flags &= ~ARCHIVE_EXTRACT_PERM;
+ bsdtar->extract_flags &= ~ARCHIVE_EXTRACT_ACL;
+ bsdtar->extract_flags &= ~ARCHIVE_EXTRACT_XATTR;
+ bsdtar->extract_flags &= ~ARCHIVE_EXTRACT_FFLAGS;
+ break;
+ case OPTION_NULL: /* GNU tar */
+ bsdtar->option_null++;
+ break;
+ case OPTION_NUMERIC_OWNER: /* GNU tar */
+ bsdtar->uname = "";
+ bsdtar->gname = "";
+ break;
+ case 'O': /* GNU tar */
+ bsdtar->option_stdout = 1;
+ break;
+ case 'o': /* SUSv2 and GNU conflict here, but not fatally */
+ option_o = 1; /* Record it and resolve it later. */
+ break;
+ case OPTION_ONE_FILE_SYSTEM: /* GNU tar */
+ bsdtar->option_dont_traverse_mounts = 1;
+ break;
+ case OPTION_OPTIONS:
+ bsdtar->option_options = bsdtar->optarg;
+ break;
+#if 0
+ /*
+ * The common BSD -P option is not necessary, since
+ * our default is to archive symlinks, not follow
+ * them. This is convenient, as -P conflicts with GNU
+ * tar anyway.
+ */
+ case 'P': /* BSD convention */
+ /* Default behavior, no option necessary. */
+ break;
+#endif
+ case 'P': /* GNU tar */
+ bsdtar->extract_flags &= ~SECURITY;
+ bsdtar->option_absolute_paths = 1;
+ break;
+ case 'p': /* GNU tar, star */
+ bsdtar->extract_flags |= ARCHIVE_EXTRACT_PERM;
+ bsdtar->extract_flags |= ARCHIVE_EXTRACT_ACL;
+ bsdtar->extract_flags |= ARCHIVE_EXTRACT_XATTR;
+ bsdtar->extract_flags |= ARCHIVE_EXTRACT_FFLAGS;
+ break;
+ case OPTION_POSIX: /* GNU tar */
+ bsdtar->create_format = "pax";
+ break;
+ case 'q': /* FreeBSD GNU tar --fast-read, NetBSD -q */
+ bsdtar->option_fast_read = 1;
+ break;
+ case 'r': /* SUSv2 */
+ set_mode(bsdtar, opt);
+ break;
+ case 'S': /* NetBSD pax-as-tar */
+ bsdtar->extract_flags |= ARCHIVE_EXTRACT_SPARSE;
+ break;
+ case 's': /* NetBSD pax-as-tar */
+#if HAVE_REGEX_H
+ add_substitution(bsdtar, bsdtar->optarg);
+#else
+ lafe_warnc(0,
+ "-s is not supported by this version of bsdtar");
+ usage();
+#endif
+ break;
+ case OPTION_SAME_OWNER: /* GNU tar */
+ bsdtar->extract_flags |= ARCHIVE_EXTRACT_OWNER;
+ break;
+ case OPTION_STRIP_COMPONENTS: /* GNU tar 1.15 */
+ bsdtar->strip_components = atoi(bsdtar->optarg);
+ break;
+ case 'T': /* GNU tar */
+ bsdtar->names_from_file = bsdtar->optarg;
+ break;
+ case 't': /* SUSv2 */
+ set_mode(bsdtar, opt);
+ bsdtar->verbose++;
+ break;
+ case OPTION_TOTALS: /* GNU tar */
+ bsdtar->option_totals++;
+ break;
+ case 'U': /* GNU tar */
+ bsdtar->extract_flags |= ARCHIVE_EXTRACT_UNLINK;
+ bsdtar->option_unlink_first = 1;
+ break;
+ case 'u': /* SUSv2 */
+ set_mode(bsdtar, opt);
+ break;
+ case OPTION_UID: /* cpio */
+ t = atoi(bsdtar->optarg);
+ if (t < 0)
+ lafe_errc(1, 0,
+ "Argument to --uid must be positive");
+ bsdtar->uid = t;
+ break;
+ case OPTION_UNAME: /* cpio */
+ bsdtar->uname = bsdtar->optarg;
+ break;
+ case 'v': /* SUSv2 */
+ bsdtar->verbose++;
+ break;
+ case OPTION_VERSION: /* GNU convention */
+ version();
+ break;
+#if 0
+ /*
+ * The -W longopt feature is handled inside of
+ * bsdtar_getopt(), so -W is not available here.
+ */
+ case 'W': /* Obscure GNU convention. */
+ break;
+#endif
+ case 'w': /* SUSv2 */
+ bsdtar->option_interactive = 1;
+ break;
+ case 'X': /* GNU tar */
+ if (lafe_exclude_from_file(&bsdtar->matching, bsdtar->optarg))
+ lafe_errc(1, 0,
+ "failed to process exclusions from file %s",
+ bsdtar->optarg);
+ break;
+ case 'x': /* SUSv2 */
+ set_mode(bsdtar, opt);
+ break;
+ case 'y': /* FreeBSD version of GNU tar */
+ if (bsdtar->create_compression != '\0')
+ lafe_errc(1, 0,
+ "Can't specify both -%c and -%c", opt,
+ bsdtar->create_compression);
+ bsdtar->create_compression = opt;
+ break;
+ case 'Z': /* GNU tar */
+ if (bsdtar->create_compression != '\0')
+ lafe_errc(1, 0,
+ "Can't specify both -%c and -%c", opt,
+ bsdtar->create_compression);
+ bsdtar->create_compression = opt;
+ break;
+ case 'z': /* GNU tar, star, many others */
+ if (bsdtar->create_compression != '\0')
+ lafe_errc(1, 0,
+ "Can't specify both -%c and -%c", opt,
+ bsdtar->create_compression);
+ bsdtar->create_compression = opt;
+ break;
+ case OPTION_USE_COMPRESS_PROGRAM:
+ bsdtar->compress_program = bsdtar->optarg;
+ break;
+ default:
+ usage();
+ }
+ }
+
+ /*
+ * Sanity-check options.
+ */
+
+ /* If no "real" mode was specified, treat -h as --help. */
+ if ((bsdtar->mode == '\0') && possible_help_request) {
+ long_help();
+ exit(0);
+ }
+
+ /* Otherwise, a mode is required. */
+ if (bsdtar->mode == '\0')
+ lafe_errc(1, 0,
+ "Must specify one of -c, -r, -t, -u, -x");
+
+ /* Check boolean options only permitted in certain modes. */
+ if (bsdtar->option_dont_traverse_mounts)
+ only_mode(bsdtar, "--one-file-system", "cru");
+ if (bsdtar->option_fast_read)
+ only_mode(bsdtar, "--fast-read", "xt");
+ if (bsdtar->option_honor_nodump)
+ only_mode(bsdtar, "--nodump", "cru");
+ if (option_o > 0) {
+ switch (bsdtar->mode) {
+ case 'c':
+ /*
+ * In GNU tar, -o means "old format." The
+ * "ustar" format is the closest thing
+ * supported by libarchive.
+ */
+ bsdtar->create_format = "ustar";
+ /* TODO: bsdtar->create_format = "v7"; */
+ break;
+ case 'x':
+ /* POSIX-compatible behavior. */
+ bsdtar->option_no_owner = 1;
+ bsdtar->extract_flags &= ~ARCHIVE_EXTRACT_OWNER;
+ break;
+ default:
+ only_mode(bsdtar, "-o", "xc");
+ break;
+ }
+ }
+ if (bsdtar->option_no_subdirs)
+ only_mode(bsdtar, "-n", "cru");
+ if (bsdtar->option_stdout)
+ only_mode(bsdtar, "-O", "xt");
+ if (bsdtar->option_unlink_first)
+ only_mode(bsdtar, "-U", "x");
+ if (bsdtar->option_warn_links)
+ only_mode(bsdtar, "--check-links", "cr");
+
+ /* Check other parameters only permitted in certain modes. */
+ if (bsdtar->create_compression != '\0') {
+ strcpy(buff, "-?");
+ buff[1] = bsdtar->create_compression;
+ only_mode(bsdtar, buff, "cxt");
+ }
+ if (bsdtar->create_format != NULL)
+ only_mode(bsdtar, "--format", "cru");
+ if (bsdtar->symlink_mode != '\0') {
+ strcpy(buff, "-?");
+ buff[1] = bsdtar->symlink_mode;
+ only_mode(bsdtar, buff, "cru");
+ }
+ if (bsdtar->strip_components != 0)
+ only_mode(bsdtar, "--strip-components", "xt");
+
+ switch(bsdtar->mode) {
+ case 'c':
+ tar_mode_c(bsdtar);
+ break;
+ case 'r':
+ tar_mode_r(bsdtar);
+ break;
+ case 't':
+ tar_mode_t(bsdtar);
+ break;
+ case 'u':
+ tar_mode_u(bsdtar);
+ break;
+ case 'x':
+ tar_mode_x(bsdtar);
+ break;
+ }
+
+ lafe_cleanup_exclusions(&bsdtar->matching);
+#if HAVE_REGEX_H
+ cleanup_substitution(bsdtar);
+#endif
+
+ if (bsdtar->return_value != 0)
+ lafe_warnc(0,
+ "Error exit delayed from previous errors.");
+ return (bsdtar->return_value);
+}
+
+static void
+set_mode(struct bsdtar *bsdtar, char opt)
+{
+ if (bsdtar->mode != '\0' && bsdtar->mode != opt)
+ lafe_errc(1, 0,
+ "Can't specify both -%c and -%c", opt, bsdtar->mode);
+ bsdtar->mode = opt;
+}
+
+/*
+ * Verify that the mode is correct.
+ */
+static void
+only_mode(struct bsdtar *bsdtar, const char *opt, const char *valid_modes)
+{
+ if (strchr(valid_modes, bsdtar->mode) == NULL)
+ lafe_errc(1, 0,
+ "Option %s is not permitted in mode -%c",
+ opt, bsdtar->mode);
+}
+
+
+void
+usage(void)
+{
+ const char *p;
+
+ p = lafe_progname;
+
+ fprintf(stderr, "Usage:\n");
+ fprintf(stderr, " List: %s -tf <archive-filename>\n", p);
+ fprintf(stderr, " Extract: %s -xf <archive-filename>\n", p);
+ fprintf(stderr, " Create: %s -cf <archive-filename> [filenames...]\n", p);
+ fprintf(stderr, " Help: %s --help\n", p);
+ exit(1);
+}
+
+static void
+version(void)
+{
+ printf("bsdtar %s - %s\n",
+ BSDTAR_VERSION_STRING,
+ archive_version());
+ exit(0);
+}
+
+static const char *long_help_msg =
+ "First option must be a mode specifier:\n"
+ " -c Create -r Add/Replace -t List -u Update -x Extract\n"
+ "Common Options:\n"
+ " -b # Use # 512-byte records per I/O block\n"
+ " -f <filename> Location of archive (default " _PATH_DEFTAPE ")\n"
+ " -v Verbose\n"
+ " -w Interactive\n"
+ "Create: %p -c [options] [<file> | <dir> | @<archive> | -C <dir> ]\n"
+ " <file>, <dir> add these items to archive\n"
+ " -z, -j, -J, --lzma Compress archive with gzip/bzip2/xz/lzma\n"
+ " --format {ustar|pax|cpio|shar} Select archive format\n"
+ " --exclude <pattern> Skip files that match pattern\n"
+ " -C <dir> Change to <dir> before processing remaining files\n"
+ " @<archive> Add entries from <archive> to output\n"
+ "List: %p -t [options] [<patterns>]\n"
+ " <patterns> If specified, list only entries that match\n"
+ "Extract: %p -x [options] [<patterns>]\n"
+ " <patterns> If specified, extract only entries that match\n"
+ " -k Keep (don't overwrite) existing files\n"
+ " -m Don't restore modification times\n"
+ " -O Write entries to stdout, don't restore to disk\n"
+ " -p Restore permissions (including ACLs, owner, file flags)\n";
+
+
+/*
+ * Note that the word 'bsdtar' will always appear in the first line
+ * of output.
+ *
+ * In particular, /bin/sh scripts that need to test for the presence
+ * of bsdtar can use the following template:
+ *
+ * if (tar --help 2>&1 | grep bsdtar >/dev/null 2>&1 ) then \
+ * echo bsdtar; else echo not bsdtar; fi
+ */
+static void
+long_help(void)
+{
+ const char *prog;
+ const char *p;
+
+ prog = lafe_progname;
+
+ fflush(stderr);
+
+ p = (strcmp(prog,"bsdtar") != 0) ? "(bsdtar)" : "";
+ printf("%s%s: manipulate archive files\n", prog, p);
+
+ for (p = long_help_msg; *p != '\0'; p++) {
+ if (*p == '%') {
+ if (p[1] == 'p') {
+ fputs(prog, stdout);
+ p++;
+ } else
+ putchar('%');
+ } else
+ putchar(*p);
+ }
+ version();
+}
diff --git a/contrib/libarchive/tar/bsdtar.h b/contrib/libarchive/tar/bsdtar.h
new file mode 100644
index 0000000..df9e6a5
--- /dev/null
+++ b/contrib/libarchive/tar/bsdtar.h
@@ -0,0 +1,165 @@
+/*-
+ * Copyright (c) 2003-2007 Tim Kientzle
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#include "bsdtar_platform.h"
+#include <stdio.h>
+
+#include "matching.h"
+
+#define DEFAULT_BYTES_PER_BLOCK (20*512)
+
+/*
+ * The internal state for the "bsdtar" program.
+ *
+ * Keeping all of the state in a structure like this simplifies memory
+ * leak testing (at exit, anything left on the heap is suspect). A
+ * pointer to this structure is passed to most bsdtar internal
+ * functions.
+ */
+struct bsdtar {
+ /* Options */
+ const char *filename; /* -f filename */
+ const char *create_format; /* -F format */
+ char *pending_chdir; /* -C dir */
+ const char *names_from_file; /* -T file */
+ time_t newer_ctime_sec; /* --newer/--newer-than */
+ long newer_ctime_nsec; /* --newer/--newer-than */
+ time_t newer_mtime_sec; /* --newer-mtime */
+ long newer_mtime_nsec; /* --newer-mtime-than */
+ int bytes_per_block; /* -b block_size */
+ int verbose; /* -v */
+ int extract_flags; /* Flags for extract operation */
+ int strip_components; /* Remove this many leading dirs */
+ int gid; /* --gid */
+ const char *gname; /* --gname */
+ int uid; /* --uid */
+ const char *uname; /* --uname */
+ char mode; /* Program mode: 'c', 't', 'r', 'u', 'x' */
+ char symlink_mode; /* H or L, per BSD conventions */
+ char create_compression; /* j, y, or z */
+ const char *compress_program;
+ char option_absolute_paths; /* -P */
+ char option_chroot; /* --chroot */
+ char option_dont_traverse_mounts; /* --one-file-system */
+ char option_fast_read; /* --fast-read */
+ const char *option_options; /* --options */
+ char option_honor_nodump; /* --nodump */
+ char option_interactive; /* -w */
+ char option_no_owner; /* -o */
+ char option_no_subdirs; /* -n */
+ char option_null; /* --null */
+ char option_stdout; /* -O */
+ char option_totals; /* --totals */
+ char option_unlink_first; /* -U */
+ char option_warn_links; /* --check-links */
+ char day_first; /* show day before month in -tv output */
+
+ /* If >= 0, then close this when done. */
+ int fd;
+
+ /* Miscellaneous state information */
+ int argc;
+ char **argv;
+ const char *optarg;
+ size_t gs_width; /* For 'list_item' in read.c */
+ size_t u_width; /* for 'list_item' in read.c */
+ uid_t user_uid; /* UID running this program */
+ int return_value; /* Value returned by main() */
+ char warned_lead_slash; /* Already displayed warning */
+ char next_line_is_dir; /* Used for -C parsing in -cT */
+
+ /*
+ * Data for various subsystems. Full definitions are located in
+ * the file where they are used.
+ */
+ struct archive *diskreader; /* for write.c */
+ struct archive_entry_linkresolver *resolver; /* for write.c */
+ struct archive_dir *archive_dir; /* for write.c */
+ struct name_cache *gname_cache; /* for write.c */
+ char *buff; /* for write.c */
+ struct lafe_matching *matching; /* for matching.c */
+ struct security *security; /* for read.c */
+ struct name_cache *uname_cache; /* for write.c */
+ struct siginfo_data *siginfo; /* for siginfo.c */
+ struct substitution *substitution; /* for subst.c */
+};
+
+/* Fake short equivalents for long options that otherwise lack them. */
+enum {
+ OPTION_CHECK_LINKS = 1,
+ OPTION_CHROOT,
+ OPTION_EXCLUDE,
+ OPTION_FORMAT,
+ OPTION_GID,
+ OPTION_GNAME,
+ OPTION_HELP,
+ OPTION_INCLUDE,
+ OPTION_KEEP_NEWER_FILES,
+ OPTION_LZMA,
+ OPTION_NEWER_CTIME,
+ OPTION_NEWER_CTIME_THAN,
+ OPTION_NEWER_MTIME,
+ OPTION_NEWER_MTIME_THAN,
+ OPTION_NODUMP,
+ OPTION_NO_SAME_OWNER,
+ OPTION_NO_SAME_PERMISSIONS,
+ OPTION_NULL,
+ OPTION_NUMERIC_OWNER,
+ OPTION_ONE_FILE_SYSTEM,
+ OPTION_OPTIONS,
+ OPTION_POSIX,
+ OPTION_SAME_OWNER,
+ OPTION_STRIP_COMPONENTS,
+ OPTION_TOTALS,
+ OPTION_UID,
+ OPTION_UNAME,
+ OPTION_USE_COMPRESS_PROGRAM,
+ OPTION_VERSION
+};
+
+
+int bsdtar_getopt(struct bsdtar *);
+void do_chdir(struct bsdtar *);
+int edit_pathname(struct bsdtar *, struct archive_entry *);
+int need_report(void);
+int pathcmp(const char *a, const char *b);
+void safe_fprintf(FILE *, const char *fmt, ...);
+void set_chdir(struct bsdtar *, const char *newdir);
+const char *tar_i64toa(int64_t);
+void tar_mode_c(struct bsdtar *bsdtar);
+void tar_mode_r(struct bsdtar *bsdtar);
+void tar_mode_t(struct bsdtar *bsdtar);
+void tar_mode_u(struct bsdtar *bsdtar);
+void tar_mode_x(struct bsdtar *bsdtar);
+void usage(void);
+int yes(const char *fmt, ...);
+
+#if HAVE_REGEX_H
+void add_substitution(struct bsdtar *, const char *);
+int apply_substitution(struct bsdtar *, const char *, char **, int);
+void cleanup_substitution(struct bsdtar *);
+#endif
diff --git a/usr.bin/tar/bsdtar_platform.h b/contrib/libarchive/tar/bsdtar_platform.h
index c9b9dd6..c9b9dd6 100644
--- a/usr.bin/tar/bsdtar_platform.h
+++ b/contrib/libarchive/tar/bsdtar_platform.h
diff --git a/usr.bin/tar/cmdline.c b/contrib/libarchive/tar/cmdline.c
index f043155..f043155 100644
--- a/usr.bin/tar/cmdline.c
+++ b/contrib/libarchive/tar/cmdline.c
diff --git a/usr.bin/tar/getdate.c b/contrib/libarchive/tar/getdate.c
index ffaa679..ffaa679 100644
--- a/usr.bin/tar/getdate.c
+++ b/contrib/libarchive/tar/getdate.c
diff --git a/usr.bin/tar/read.c b/contrib/libarchive/tar/read.c
index 6b1e5ec..6b1e5ec 100644
--- a/usr.bin/tar/read.c
+++ b/contrib/libarchive/tar/read.c
diff --git a/usr.bin/tar/subst.c b/contrib/libarchive/tar/subst.c
index 765f74b..765f74b 100644
--- a/usr.bin/tar/subst.c
+++ b/contrib/libarchive/tar/subst.c
diff --git a/usr.bin/tar/test/main.c b/contrib/libarchive/tar/test/main.c
index bd1db1d..bd1db1d 100644
--- a/usr.bin/tar/test/main.c
+++ b/contrib/libarchive/tar/test/main.c
diff --git a/usr.bin/tar/test/test.h b/contrib/libarchive/tar/test/test.h
index a4a2461..a4a2461 100644
--- a/usr.bin/tar/test/test.h
+++ b/contrib/libarchive/tar/test/test.h
diff --git a/usr.bin/tar/test/test_0.c b/contrib/libarchive/tar/test/test_0.c
index b97bd37..b97bd37 100644
--- a/usr.bin/tar/test/test_0.c
+++ b/contrib/libarchive/tar/test/test_0.c
diff --git a/usr.bin/tar/test/test_basic.c b/contrib/libarchive/tar/test/test_basic.c
index 1fa3341..1fa3341 100644
--- a/usr.bin/tar/test/test_basic.c
+++ b/contrib/libarchive/tar/test/test_basic.c
diff --git a/usr.bin/tar/test/test_copy.c b/contrib/libarchive/tar/test/test_copy.c
index 5a1c4d0..5a1c4d0 100644
--- a/usr.bin/tar/test/test_copy.c
+++ b/contrib/libarchive/tar/test/test_copy.c
diff --git a/usr.bin/tar/test/test_empty_mtree.c b/contrib/libarchive/tar/test/test_empty_mtree.c
index 6f8a5e9..6f8a5e9 100644
--- a/usr.bin/tar/test/test_empty_mtree.c
+++ b/contrib/libarchive/tar/test/test_empty_mtree.c
diff --git a/usr.bin/tar/test/test_getdate.c b/contrib/libarchive/tar/test/test_getdate.c
index cd6d55a..cd6d55a 100644
--- a/usr.bin/tar/test/test_getdate.c
+++ b/contrib/libarchive/tar/test/test_getdate.c
diff --git a/usr.bin/tar/test/test_help.c b/contrib/libarchive/tar/test/test_help.c
index 0e7d1c9..0e7d1c9 100644
--- a/usr.bin/tar/test/test_help.c
+++ b/contrib/libarchive/tar/test/test_help.c
diff --git a/usr.bin/tar/test/test_option_T_upper.c b/contrib/libarchive/tar/test/test_option_T_upper.c
index 87127cc..87127cc 100644
--- a/usr.bin/tar/test/test_option_T_upper.c
+++ b/contrib/libarchive/tar/test/test_option_T_upper.c
diff --git a/usr.bin/tar/test/test_option_q.c b/contrib/libarchive/tar/test/test_option_q.c
index c8e9540..c8e9540 100644
--- a/usr.bin/tar/test/test_option_q.c
+++ b/contrib/libarchive/tar/test/test_option_q.c
diff --git a/usr.bin/tar/test/test_option_r.c b/contrib/libarchive/tar/test/test_option_r.c
index 516a830..516a830 100644
--- a/usr.bin/tar/test/test_option_r.c
+++ b/contrib/libarchive/tar/test/test_option_r.c
diff --git a/contrib/libarchive/tar/test/test_option_s.c b/contrib/libarchive/tar/test/test_option_s.c
new file mode 100644
index 0000000..a2525a0
--- /dev/null
+++ b/contrib/libarchive/tar/test/test_option_s.c
@@ -0,0 +1,107 @@
+/*-
+ * Copyright (c) 2003-2008 Tim Kientzle
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include "test.h"
+__FBSDID("$FreeBSD$");
+
+static int
+mkfile(const char *fn, const char *contents)
+{
+ FILE *f = fopen(fn, "w");
+ failure("Couldn't create file '%s', errno=%d (%s)\n",
+ fn, errno, strerror(errno));
+ if (!assert(f != NULL))
+ return (1); /* Failure. */
+ if (contents != NULL)
+ assertEqualInt(strlen(contents),
+ fwrite(contents, 1, strlen(contents), f));
+ assertEqualInt(0, fclose(f));
+ return (0); /* Success */
+}
+
+DEFINE_TEST(test_option_s)
+{
+ struct stat st;
+
+ /* Create a sample file hierarchy. */
+ assertMakeDir("in", 0755);
+ assertMakeDir("in/d1", 0755);
+ assertEqualInt(0, mkfile("in/d1/foo", "foo"));
+ assertEqualInt(0, mkfile("in/d1/bar", "bar"));
+
+ /* Does bsdtar support -s option ? */
+ systemf("%s -cf - -s /foo/bar/ in/d1/foo > NUL 2> check.err",
+ testprog);
+ assertEqualInt(0, stat("check.err", &st));
+ if (st.st_size != 0) {
+ skipping("%s does not support -s option on this platform",
+ testprog);
+ return;
+ }
+
+ /*
+ * Test 1: Filename substitution when creating archives.
+ */
+ assertMakeDir("test1", 0755);
+ systemf("%s -cf - -s /foo/bar/ in/d1/foo | %s -xf - -C test1",
+ testprog, testprog);
+ assertFileContents("foo", 3, "test1/in/d1/bar");
+ systemf("%s -cf - -s /d1/d2/ in/d1/foo | %s -xf - -C test1",
+ testprog, testprog);
+ assertFileContents("foo", 3, "test1/in/d2/foo");
+
+
+ /*
+ * Test 2: Basic substitution when extracting archive.
+ */
+ assertMakeDir("test2", 0755);
+ systemf("%s -cf - in/d1/foo | %s -xf - -s /foo/bar/ -C test2",
+ testprog, testprog);
+ assertFileContents("foo", 3, "test2/in/d1/bar");
+
+ /*
+ * Test 3: Files with empty names shouldn't be archived.
+ */
+ systemf("%s -cf - -s ,in/d1/foo,, in/d1/foo | %s -tvf - > in.lst",
+ testprog, testprog);
+ assertEmptyFile("in.lst");
+
+ /*
+ * Test 4: Multiple substitutions when extracting archive.
+ */
+ assertMakeDir("test4", 0755);
+ systemf("%s -cf - in/d1/foo in/d1/bar | %s -xf - -s /foo/bar/ -s }bar}baz} -C test4",
+ testprog, testprog);
+ assertFileContents("foo", 3, "test4/in/d1/bar");
+ assertFileContents("bar", 3, "test4/in/d1/baz");
+
+ /*
+ * Test 5: Name-switching substitutions when extracting archive.
+ */
+ assertMakeDir("test5", 0755);
+ systemf("%s -cf - in/d1/foo in/d1/bar | %s -xf - -s /foo/bar/ -s }bar}foo} -C test5",
+ testprog, testprog);
+ assertFileContents("foo", 3, "test5/in/d1/bar");
+ assertFileContents("bar", 3, "test5/in/d1/foo");
+}
diff --git a/usr.bin/tar/test/test_patterns.c b/contrib/libarchive/tar/test/test_patterns.c
index f909e27..f909e27 100644
--- a/usr.bin/tar/test/test_patterns.c
+++ b/contrib/libarchive/tar/test/test_patterns.c
diff --git a/contrib/libarchive/tar/test/test_patterns_2.tar.uu b/contrib/libarchive/tar/test/test_patterns_2.tar.uu
new file mode 100644
index 0000000..eba2dae
--- /dev/null
+++ b/contrib/libarchive/tar/test/test_patterns_2.tar.uu
@@ -0,0 +1,231 @@
+begin 644 test_patterns_2.tar
+M+W1M<"]F;V\O````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````#`P,#<U-2``,#`Q-S4P(``P,#`P,#`@`#`P,#`P,#`P,#`P
+M(#$Q,#4Q,C$R-C4V(#`Q,C0T,0`@-0``````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````````````````````````!U<W1A<@`P,'1I;0``
+M````````````````````````````````````=VAE96P`````````````````
+M```````````````````P,#`P,#`@`#`P,#`P,"``````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M```````````````````````O=&UP+V9O;R]B87(O````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````,#`P-S4U(``P,#$W-3`@`#`P
+M,#`P,"``,#`P,#`P,#`P,#`@,3$P-3$R,3(V-3,@,#$S,C`R`"`U````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````'5S=&%R`#`P=&EM``````````````````````````````````````!W
+M:&5E;````````````````````````````````````#`P,#`P,"``,#`P,#`P
+M(```````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````````````````````````````"]T;7`O9F]O+V)A
+M>@``````````````````````````````````````````````````````````
+M```````````````````````````````````````````````````````````P
+M,#`V-#0@`#`P,3<U,"``,#`P,#`P(``P,#`P,#`P,#`P,"`Q,3`U,3(Q,C8U
+M-B`P,3,Q,C8`(#``````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````=7-T87(`,#!T:6T`````````````````
+M`````````````````````'=H965L````````````````````````````````
+M````,#`P,#`P(``P,#`P,#`@````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````+W1M<"]F;V\O8F%R+V)A>@``````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````#`P,#8T-"``,#`Q-S4P(``P,#`P,#`@`#`P,#`P
+M,#`P,#`P(#$Q,#4Q,C$R-C4S(#`Q,S8V-P`@,```````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````````````````````````````````!U<W1A<@`P
+M,'1I;0``````````````````````````````````````=VAE96P`````````
+M```````````````````````````P,#`P,#`@`#`P,#`P,"``````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+9````````````````````````````````````
+`
+end
diff --git a/contrib/libarchive/tar/test/test_patterns_3.tar.uu b/contrib/libarchive/tar/test/test_patterns_3.tar.uu
new file mode 100644
index 0000000..de60b8d
--- /dev/null
+++ b/contrib/libarchive/tar/test/test_patterns_3.tar.uu
@@ -0,0 +1,231 @@
+begin 644 test_patterns_3.tar
+M+W1M<"]F;V\O8F%R+P``````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````#`P,#<U-2``,#`Q-S4P(``P,#`P,#`@`#`P,#`P,#`P,#`P
+M(#$Q,#4S,C`W-34R(#`Q,S(P-@`@-0``````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````````````````````````!U<W1A<@`P,'1I;0``
+M````````````````````````````````````=VAE96P`````````````````
+M```````````````````P,#`P,#`@`#`P,#`P,"``````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M```````````````````````O=&UP+V9O;R]B87(O8F%Z+P``````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````,#`P-S4U(``P,#$W-3`@`#`P
+M,#`P,"``,#`P,#`P,#`P,#`@,3$P-3,R,#<U-3(@,#$S-S8R`"`U````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````'5S=&%R`#`P=&EM``````````````````````````````````````!W
+M:&5E;````````````````````````````````````#`P,#`P,"``,#`P,#`P
+M(```````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````````````````````````````'1M<"]F;V\O8F%Z
+M+P``````````````````````````````````````````````````````````
+M```````````````````````````````````````````````````````````P
+M,#`W-34@`#`P,3<U,"``,#`P,#`P(``P,#`P,#`P,#`P,"`Q,3`U,S(P-S4V
+M,"`P,3,Q,S8`(#4`````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````=7-T87(`,#!T:6T`````````````````
+M`````````````````````'=H965L````````````````````````````````
+M````,#`P,#`P(``P,#`P,#`@````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````=&UP+V9O;R]B87HO8F%R+P``````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````#`P,#<U-2``,#`Q-S4P(``P,#`P,#`@`#`P,#`P
+M,#`P,#`P(#$Q,#4S,C`W-38P(#`Q,S<P,@`@-0``````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````````````````````````````````!U<W1A<@`P
+M,'1I;0``````````````````````````````````````=VAE96P`````````
+M```````````````````````````P,#`P,#`@`#`P,#`P,"``````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+9````````````````````````````````````
+`
+end
diff --git a/contrib/libarchive/tar/test/test_patterns_4.tar.uu b/contrib/libarchive/tar/test/test_patterns_4.tar.uu
new file mode 100644
index 0000000..240af20
--- /dev/null
+++ b/contrib/libarchive/tar/test/test_patterns_4.tar.uu
@@ -0,0 +1,641 @@
+begin 644 test_patterns_4.tar
+M+V9I;&4P,0``````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````#`P,#8T-"``,#`Q-S4Q(``P,#$W-3$@`#`P,#`P,#`P,#`P
+M(#$Q,34P-C<T-C0R(#`Q,#,S-@`@,```````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````````````````````````!U<W1A<@`P,```````
+M````````````````````````````````````````````````````````````
+M```````````````````P,#`P,#`@`#`P,#`P,"``````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M```````````````````````O+BXO9FEL93`R````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````,#`P-C0T(``P,#$W-3$@`#`P
+M,3<U,2``,#`P,#`P,#`P,#`@,3$Q-3`V-S0V-#(@,#$P-34R`"`P````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````'5S=&%R`#`P````````````````````````````````````````````
+M`````````````````````````````````````````#`P,#`P,"``,#`P,#`P
+M(```````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````````````````````````````"\N+B\N+B]F:6QE
+M,#,`````````````````````````````````````````````````````````
+M```````````````````````````````````````````````````````````P
+M,#`V-#0@`#`P,3<U,2``,#`Q-S4Q(``P,#`P,#`P,#`P,"`Q,3$U,#8W-#8T
+M,B`P,3`W-C8`(#``````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````=7-T87(`,#``````````````````````
+M````````````````````````````````````````````````````````````
+M````,#`P,#`P(``P,#`P,#`@````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````8SHO9FEL93`T````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````#`P,#8T-"``,#`Q-S4Q(``P,#$W-3$@`#`P,#`P
+M,#`P,#`P(#$Q,34P-C<T-C0R(#`Q,#4W-@`@,```````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````````````````````````````````!U<W1A<@`P
+M,```````````````````````````````````````````````````````````
+M```````````````````````````P,#`P,#`@`#`P,#`P,"``````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````````````!$.BXN+V9I;&4P-0``````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````,#`P-C0T(``P,#$W
+M-3$@`#`P,3<U,2``,#`P,#`P,#`P,#`@,3$Q-3`V-S0V-#(@,#$P-C<T`"`P
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````'5S=&%R`#`P````````````````````````````````````
+M`````````````````````````````````````````````````#`P,#`P,"``
+M,#`P,#`P(```````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````````````````````````````````````&,Z+BXO
+M+BXO9FEL93`V````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M```````P,#`V-#0@`#`P,3<U,2``,#`Q-S4Q(``P,#`P,#`P,#`P,"`Q,3$U
+M,#8W-#8T,B`P,3$Q-#<`(#``````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````=7-T87(`,#``````````````
+M````````````````````````````````````````````````````````````
+M````````````,#`P,#`P(``P,#`P,#`@````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````0SHO+BXO9FEL93`W````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````````````#`P,#8T-"``,#`Q-S4Q(``P,#$W-3$@
+M`#`P,#`P,#`P,#`P(#$Q,34P-C<T-C0R(#`Q,#<U-``@,```````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````````````````````````````````````````!U
+M<W1A<@`P,```````````````````````````````````````````````````
+M```````````````````````````````````P,#`P,#`@`#`P,#`P,"``````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````````````````````!A.B\N+B\N+B]F:6QE,#@`
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````,#`P-C0T
+M(``P,#$W-3$@`#`P,3<U,2``,#`P,#`P,#`P,#`@,3$Q-3`V-S0V-#(@,#$Q
+M,C(V`"`P````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````'5S=&%R`#`P````````````````````````````
+M`````````````````````````````````````````````````````````#`P
+M,#`P,"``,#`P,#`P(```````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`"\O+B]C.B]F:6QE,#D`````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M```````````````P,#`V-#0@`#`P,3<U,2``,#`Q-S4Q(``P,#`P,#`P,#`P
+M,"`Q,3$U,#8W-#8T,B`P,3$P-S8`(#``````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````=7-T87(`,#``````
+M````````````````````````````````````````````````````````````
+M````````````````````,#`P,#`P(``P,#`P,#`@````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````+R\N+T,Z+RXN+V9I;&4Q,```````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````````````````````#`P,#8T-"``,#`Q-S4Q(``P
+M,#$W-3$@`#`P,#`P,#`P,#`P(#$Q,34P-C<T-C0R(#`Q,3(T,0`@,```````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````!U<W1A<@`P,```````````````````````````````````````````
+M```````````````````````````````````````````P,#`P,#`@`#`P,#`P
+M,"``````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M```````````````````````````````````````````````O+S\O8SHO9FEL
+M93$Q````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M,#`P-C0T(``P,#$W-3$@`#`P,3<U,2``,#`P,#`P,#`P,#`@,3$Q-3`V-S0V
+M-#(@,#$Q,3$P`"`P````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````````````'5S=&%R`#`P````````````````````
+M````````````````````````````````````````````````````````````
+M`````#`P,#`P,"``,#`P,#`P(```````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````"\O/R]#.B\N+B]F:6QE,3(`````````````````````````````
+M````````````````````````````````````````````````````````````
+M```````````````````````P,#`V-#0@`#`P,3<U,2``,#`Q-S4Q(``P,#`P
+M,#`P,#`P,"`Q,3$U,#8W-#8T,B`P,3$R-C0`(#``````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````=7-T87(`
+M,#``````````````````````````````````````````````````````````
+M````````````````````````````,#`P,#`P(``P,#`P,#`@````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````+R\O+V,Z+V9I;&4Q,P``````````
+M````````````````````````````````````````````````````````````
+M`````````````````````````````````````````````#`P,#8T-"``,#`Q
+M-S4Q(``P,#$W-3$@`#`P,#`P,#`P,#`P(#$Q,34P-C<T-C0R(#`Q,3`W,@`@
+M,```````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````!U<W1A<@`P,```````````````````````````````````
+M```````````````````````````````````````````````````P,#`P,#`@
+M`#`P,#`P,"``````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M```````````````````````````````````````````````````````O+R\O
+M0SHO+R\O+V9I;&4Q-```````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````,#`P-C0T(``P,#$W-3$@`#`P,3<U,2``,#`P,#`P,#`P,#`@,3$Q
+M-3`V-S0V-#(@,#$Q,S(W`"`P````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````````````````````'5S=&%R`#`P````````````
+M````````````````````````````````````````````````````````````
+M`````````````#`P,#`P,"``,#`P,#`P(```````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````"\O/R]53D,O<V5R=F5R+W-H87)E+V9I;&4Q-0``````
+M````````````````````````````````````````````````````````````
+M```````````````````````````````P,#`V-#0@`#`P,3<U,2``,#`Q-S4Q
+M(``P,#`P,#`P,#`P,"`Q,3$U,#8W-#8T,B`P,3,V,S4`(#``````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M=7-T87(`,#``````````````````````````````````````````````````
+M````````````````````````````````````,#`P,#`P(``P,#`P,#`@````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````+R\_+U5.0R]F:6QE,38`
+M````````````````````````````````````````````````````````````
+M`````````````````````````````````````````````````````#`P,#8T
+M-"``,#`Q-S4Q(``P,#$W-3$@`#`P,#`P,#`P,#`P(#$Q,34P-C<T-C0R(#`Q
+M,3(R-@`@,```````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````!U<W1A<@`P,```````````````````````````
+M```````````````````````````````````````````````````````````P
+M,#`P,#`@`#`P,#`P,"``````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M```O+S\O54Y#+RXN+V9I;&4Q-P``````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````,#`P-C0T(``P,#$W-3$@`#`P,3<U,2``,#`P,#`P,#`P
+M,#`@,3$Q-3`V-S0V-#(@,#$Q-#0R`"`P````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````````````````````````````'5S=&%R`#`P````
+M````````````````````````````````````````````````````````````
+M`````````````````````#`P,#`P,"``,#`P,#`P(```````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````````"\O/R]U;F,O<V5R=F5R+W-H87)E+V9I;&4Q
+M.```````````````````````````````````````````````````````````
+M```````````````````````````````````````P,#`V-#0@`#`P,3<U,2``
+M,#`Q-S4Q(``P,#`P,#`P,#`P,"`Q,3$U,#8W-#8T,B`P,30P,#``(#``````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````=7-T87(`,#``````````````````````````````````````````
+M````````````````````````````````````````````,#`P,#`P(``P,#`P
+M,#`@````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````+R\_+W5N8R]F
+M:6QE,3D`````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`#`P,#8T-"``,#`Q-S4Q(``P,#$W-3$@`#`P,#`P,#`P,#`P(#$Q,34P-C<T
+M-C0R(#`Q,3,W,0`@,```````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````````````!U<W1A<@`P,```````````````````
+M````````````````````````````````````````````````````````````
+M```````P,#`P,#`@`#`P,#`P,"``````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M```````````O+S\O=6YC+RXN+V9I;&4R,```````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````,#`P-C0T(``P,#$W-3$@`#`P,3<U,2``,#`P
+M,#`P,#`P,#`@,3$Q-3`V-S0V-#(@,#$Q-3<T`"`P````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````````````````````````````````````'5S=&%R
+M`#`P````````````````````````````````````````````````````````
+M`````````````````````````````#`P,#`P,"``,#`P,#`P(```````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````````````````%QF:6QE,C$`````````````````
+M````````````````````````````````````````````````````````````
+M```````````````````````````````````````````````P,#`V-#0@`#`P
+M,3<U,2``,#`Q-S4Q(``P,#`P,#`P,#`P,"`Q,3$U,#8W-#8T,B`P,3`T,34`
+M(#``````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````=7-T87(`,#``````````````````````````````````
+M````````````````````````````````````````````````````,#`P,#`P
+M(``P,#`P,#`@````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````7"XN
+M7&9I;&4R,@``````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````#`P,#8T-"``,#`Q-S4Q(``P,#$W-3$@`#`P,#`P,#`P,#`P(#$Q
+M,34P-C<T-C0R(#`Q,#<P-@`@,```````````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````````````````````!U<W1A<@`P,```````````
+M````````````````````````````````````````````````````````````
+M```````````````P,#`P,#`@`#`P,#`P,"``````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````!<+BY<+BY<9FEL93(S````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````,#`P-C0T(``P,#$W-3$@`#`P,3<U
+M,2``,#`P,#`P,#`P,#`@,3$Q-3`V-S0V-#(@,#$Q,3<W`"`P````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`'5S=&%R`#`P````````````````````````````````````````````````
+M`````````````````````````````````````#`P,#`P,"``,#`P,#`P(```
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````````````````````````$,Z7&9I;&4R-```````
+M````````````````````````````````````````````````````````````
+M```````````````````````````````````````````````````````P,#`V
+M-#0@`#`P,3<U,2``,#`Q-S4Q(``P,#`P,#`P,#`P,"`Q,3$U,#8W-#8T,B`P
+M,3`V,34`(#``````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````=7-T87(`,#``````````````````````````
+M````````````````````````````````````````````````````````````
+M,#`P,#`P(``P,#`P,#`@````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````>CHN+EQF:6QE,C4`````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````#`P,#8T-"``,#`Q-S4Q(``P,#$W-3$@`#`P,#`P,#`P
+M,#`P(#$Q,34P-C<T-C0R(#`Q,3`T,0`@,```````````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````````````````````````````!U<W1A<@`P,```
+M````````````````````````````````````````````````````````````
+M```````````````````````P,#`P,#`@`#`P,#`P,"``````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````````!C.BXN7"XN7&9I;&4R-@``````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````,#`P-C0T(``P,#$W-3$@
+M`#`P,3<U,2``,#`P,#`P,#`P,#`@,3$Q-3`V-S0V-#(@,#$Q,S`S`"`P````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````'5S=&%R`#`P````````````````````````````````````````
+M`````````````````````````````````````````````#`P,#`P,"``,#`P
+M,#`P(```````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````````````````````````````````%HZ7"XN7&9I
+M;&4R-P``````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M```P,#`V-#0@`#`P,3<U,2``,#`Q-S4Q(``P,#`P,#`P,#`P,"`Q,3$U,#8W
+M-#8T,B`P,3$Q,S<`(#``````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````=7-T87(`,#``````````````````
+M````````````````````````````````````````````````````````````
+M````````,#`P,#`P(``P,#`P,#`@````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````0SI<+BY<+BY<9FEL93(X````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````````#`P,#8T-"``,#`Q-S4Q(``P,#$W-3$@`#`P
+M,#`P,#`P,#`P(#$Q,34P-C<T-C0R(#`Q,30P,0`@,```````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````````````````````````````````````!U<W1A
+M<@`P,```````````````````````````````````````````````````````
+M```````````````````````````````P,#`P,#`@`#`P,#`P,"``````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````````````````!<7"Y<8SI<9FEL93(Y````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````,#`P-C0T(``P
+M,#$W-3$@`#`P,3<U,2``,#`P,#`P,#`P,#`@,3$Q-3`V-S0V-#(@,#$Q,S8T
+M`"`P````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````'5S=&%R`#`P````````````````````````````````
+M`````````````````````````````````````````````````````#`P,#`P
+M,"``,#`P,#`P(```````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````````````````````````````````````````%Q<
+M+EQ#.EPN+EQF:6QE,S``````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M```````````P,#`V-#0@`#`P,3<U,2``,#`Q-S4Q(``P,#`P,#`P,#`P,"`Q
+M,3$U,#8W-#8T,B`P,3$V,#0`(#``````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````=7-T87(`,#``````````
+M````````````````````````````````````````````````````````````
+M````````````````,#`P,#`P(``P,#`P,#`@````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````7%P_7&,Z7&9I;&4S,0``````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````````````````#`P,#8T-"``,#`Q-S4Q(``P,#$W
+M-3$@`#`P,#`P,#`P,#`P(#$Q,34P-C<T-C0R(#`Q,3,W-@`@,```````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M``!U<W1A<@`P,```````````````````````````````````````````````
+M```````````````````````````````````````P,#`P,#`@`#`P,#`P,"``
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````````````````````````!<7#]<1#I<+BY<9FEL
+M93,R````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````,#`P
+M-C0T(``P,#$W-3$@`#`P,3<U,2``,#`P,#`P,#`P,#`@,3$Q-3`V-S0V-#(@
+M,#$Q-C,P`"`P````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````````'5S=&%R`#`P````````````````````````
+M````````````````````````````````````````````````````````````
+M`#`P,#`P,"``,#`P,#`P(```````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````%Q<7%QC.EQF:6QE,S,`````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M```````````````````P,#`V-#0@`#`P,3<U,2``,#`Q-S4Q(``P,#`P,#`P
+M,#`P,"`Q,3$U,#8W-#8T,B`P,3$T,S4`(#``````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````=7-T87(`,#``
+M````````````````````````````````````````````````````````````
+M````````````````````````,#`P,#`P(``P,#`P,#`@````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````7%Q<7$,Z7%Q<7%QF:6QE,S0`````````
+M````````````````````````````````````````````````````````````
+M`````````````````````````````````````````#`P,#8T-"``,#`Q-S4Q
+M(``P,#$W-3$@`#`P,#`P,#`P,#`P(#$Q,34P-C<T-C0R(#`Q,C$U-@`@,```
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````````!U<W1A<@`P,```````````````````````````````````````
+M```````````````````````````````````````````````P,#`P,#`@`#`P
+M,#`P,"``````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````````````````````````````````!<7#]<54Y#
+M7'-E<G9E<EQS:&%R95QF:6QE,S4`````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````,#`P-C0T(``P,#$W-3$@`#`P,3<U,2``,#`P,#`P,#`P,#`@,3$Q-3`V
+M-S0V-#(@,#$T,C4U`"`P````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````````````````'5S=&%R`#`P````````````````
+M````````````````````````````````````````````````````````````
+M`````````#`P,#`P,"``,#`P,#`P(```````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````%Q</UQ53D-<9FEL93,V````````````````````````````
+M````````````````````````````````````````````````````````````
+M```````````````````````````P,#`V-#0@`#`P,3<U,2``,#`Q-S4Q(``P
+M,#`P,#`P,#`P,"`Q,3$U,#8W-#8T,B`P,3$U,30`(#``````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````=7-T
+M87(`,#``````````````````````````````````````````````````````
+M````````````````````````````````,#`P,#`P(``P,#`P,#`@````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````7%P_7%5.0UPN+EQF:6QE,S<`
+M````````````````````````````````````````````````````````````
+M`````````````````````````````````````````````````#`P,#8T-"``
+M,#`Q-S4Q(``P,#$W-3$@`#`P,#`P,#`P,#`P(#$Q,34P-C<T-C0R(#`Q,C`P
+M-0`@,```````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````!U<W1A<@`P,```````````````````````````````
+M```````````````````````````````````````````````````````P,#`P
+M,#`@`#`P,#`P,"``````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````````````````````````````````````````!<
+M7#]<=6YC7'-E<G9E<EQS:&%R95QF:6QE,S@`````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````,#`P-C0T(``P,#$W-3$@`#`P,3<U,2``,#`P,#`P,#`P,#`@
+M,3$Q-3`V-S0V-#(@,#$T-#(P`"`P````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````````````````````````'5S=&%R`#`P````````
+M````````````````````````````````````````````````````````````
+M`````````````````#`P,#`P,"``,#`P,#`P(```````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````%Q</UQU;F-<9FEL93,Y````````````````````
+M````````````````````````````````````````````````````````````
+M```````````````````````````````````P,#`V-#0@`#`P,3<U,2``,#`Q
+M-S4Q(``P,#`P,#`P,#`P,"`Q,3$U,#8W-#8T,B`P,3$V-3<`(#``````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````=7-T87(`,#``````````````````````````````````````````````
+M````````````````````````````````````````,#`P,#`P(``P,#`P,#`@
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````7%P_7'5N8UPN+EQF
+M:6QE-#``````````````````````````````````````````````````````
+M`````````````````````````````````````````````````````````#`P
+M,#8T-"``,#`Q-S4Q(``P,#$W-3$@`#`P,#`P,#`P,#`P(#$Q,34P-C<T-C0R
+M(#`Q,C$S-P`@,```````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````````!U<W1A<@`P,```````````````````````
+M````````````````````````````````````````````````````````````
+M```P,#`P,#`@`#`P,#`P,"``````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````!<+BXO9FEL930Q````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````,#`P-C0T(``P,#$W-3$@`#`P,3<U,2``,#`P,#`P
+M,#`P,#`@,3$Q-3`V-S0V-#(@,#$P-C,R`"`P````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````````````````````````````````'5S=&%R`#`P
+M````````````````````````````````````````````````````````````
+M`````````````````````````#`P,#`P,"``,#`P,#`P(```````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````````````%PN+B\N+EQF:6QE-#(`````````````
+M````````````````````````````````````````````````````````````
+M```````````````````````````````````````````P,#`V-#0@`#`P,3<U
+M,2``,#`Q-S4Q(``P,#`P,#`P,#`P,"`Q,3$U,#8W-#8T,B`P,3$Q,C,`(#``
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````=7-T87(`,#``````````````````````````````````````
+M````````````````````````````````````````````````,#`P,#`P(``P
+M,#`P,#`@````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````8SHN+B\N
+M+EQF:6QE-#,`````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````#`P,#8T-"``,#`Q-S4Q(``P,#$W-3$@`#`P,#`P,#`P,#`P(#$Q,34P
+M-C<T-C0R(#`Q,3(R-0`@,```````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````````````````!U<W1A<@`P,```````````````
+M````````````````````````````````````````````````````````````
+M```````````P,#`P,#`@`#`P,#`P,"``````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````!#.B\N+EQF:6QE-#0`````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````,#`P-C0T(``P,#$W-3$@`#`P,3<U,2``
+M,#`P,#`P,#`P,#`@,3$Q-3`V-S0V-#(@,#$Q,#,R`"`P````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````````````````````````````````````````'5S
+M=&%R`#`P````````````````````````````````````````````````````
+M`````````````````````````````````#`P,#`P,"``,#`P,#`P(```````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````````````````````$0Z7"XN+RXN7&9I;&4T-0``
+M````````````````````````````````````````````````````````````
+M```````````````````````````````````````````````````P,#`V-#0@
+M`#`P,3<U,2``,#`Q-S4Q(``P,#`P,#`P,#`P,"`Q,3$U,#8W-#8T,B`P,3$S
+M,C0`(#``````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````=7-T87(`,#``````````````````````````````
+M````````````````````````````````````````````````````````,#`P
+M,#`P(``P,#`P,#`@````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M7"\N+V,Z7&9I;&4T-@``````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````#`P,#8T-"``,#`Q-S4Q(``P,#$W-3$@`#`P,#`P,#`P,#`P
+M(#$Q,34P-C<T-C0R(#`Q,3(S,0`@,```````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````````````````````````!U<W1A<@`P,```````
+M````````````````````````````````````````````````````````````
+M```````````````````P,#`P,#`@`#`P,#`P,"``````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````!<7"XO0SI<+BY<9FEL930W````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````,#`P-C0T(``P,#$W-3$@`#`P
+M,3<U,2``,#`P,#`P,#`P,#`@,3$Q-3`V-S0V-#(@,#$Q-3,W`"`P````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````'5S=&%R`#`P````````````````````````````````````````````
+M`````````````````````````````````````````#`P,#`P,"``,#`P,#`P
+M(```````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````````````````````````````%PO/UQC.B]F:6QE
+M-#@`````````````````````````````````````````````````````````
+M```````````````````````````````````````````````````````````P
+M,#`V-#0@`#`P,3<U,2``,#`Q-S4Q(``P,#`P,#`P,#`P,"`Q,3$U,#8W-#8T
+M,B`P,3$R-30`(#``````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````=7-T87(`,#``````````````````````
+M````````````````````````````````````````````````````````````
+M````,#`P,#`P(``P,#`P,#`@````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````7%P_+T0Z+RXN7&9I;&4T.0``````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````#`P,#8T-"``,#`Q-S4Q(``P,#$W-3$@`#`P,#`P
+M,#`P,#`P(#$Q,34P-C<T-C0R(#`Q,34P-@`@,```````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````````````````````````````````!U<W1A<@`P
+M,```````````````````````````````````````````````````````````
+M```````````````````````````P,#`P,#`@`#`P,#`P,"``````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````````````!<+R]<1#I<9FEL934P````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````,#`P-C0T(``P,#$W
+M-3$@`#`P,3<U,2``,#`P,#`P,#`P,#`@,3$Q-3`V-S0V-#(@,#$Q,C0S`"`P
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````'5S=&%R`#`P````````````````````````````````````
+M`````````````````````````````````````````````````#`P,#`P,"``
+M,#`P,#`P(```````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````````````````````````````````````%Q<+R]C
+M.EPO+UQ<9FEL934Q````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M```````P,#`V-#0@`#`P,3<U,2``,#`Q-S4Q(``P,#`P,#`P,#`P,"`Q,3$U
+M,#8W-#8T,B`P,3$W,S$`(#``````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````=7-T87(`,#``````````````
+M````````````````````````````````````````````````````````````
+M````````````,#`P,#`P(``P,#`P,#`@````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````7"\_+W5.8R]S97)V97)<<VAA<F5<9FEL934R````````
+M````````````````````````````````````````````````````````````
+M`````````````````````````````#`P,#8T-"``,#`Q-S4Q(``P,#$W-3$@
+M`#`P,#`P,#`P,#`P(#$Q,34P-C<T-C0R(#`Q-#$T-0`@,```````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````````````````````````````````````````!U
+M<W1A<@`P,```````````````````````````````````````````````````
+M```````````````````````````````````P,#`P,#`@`#`P,#`P,"``````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````````````````````!<7#\O54YC7&9I;&4U,P``
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````,#`P-C0T
+M(``P,#$W-3$@`#`P,3<U,2``,#`P,#`P,#`P,#`@,3$Q-3`V-S0V-#(@,#$Q
+M-#<V`"`P````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````'5S=&%R`#`P````````````````````````````
+M`````````````````````````````````````````````````````````#`P
+M,#`P,"``,#`P,#`P(```````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`%PO/UQ5;D-<+BXO9FEL934T````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M```````````````P,#`V-#0@`#`P,3<U,2``,#`Q-S4Q(``P,#`P,#`P,#`P
+M,"`Q,3$U,#8W-#8T,B`P,3$W,3(`(#``````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````=7-T87(`,#``````
+M````````````````````````````````````````````````````````````
+M````````````````````,#`P,#`P(``P,#`P,#`@````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+'````````````
+`
+end
diff --git a/usr.bin/tar/test/test_stdio.c b/contrib/libarchive/tar/test/test_stdio.c
index 1780d96..1780d96 100644
--- a/usr.bin/tar/test/test_stdio.c
+++ b/contrib/libarchive/tar/test/test_stdio.c
diff --git a/usr.bin/tar/test/test_strip_components.c b/contrib/libarchive/tar/test/test_strip_components.c
index 271f209..271f209 100644
--- a/usr.bin/tar/test/test_strip_components.c
+++ b/contrib/libarchive/tar/test/test_strip_components.c
diff --git a/usr.bin/tar/test/test_symlink_dir.c b/contrib/libarchive/tar/test/test_symlink_dir.c
index f0cfebb..f0cfebb 100644
--- a/usr.bin/tar/test/test_symlink_dir.c
+++ b/contrib/libarchive/tar/test/test_symlink_dir.c
diff --git a/usr.bin/tar/test/test_version.c b/contrib/libarchive/tar/test/test_version.c
index e4aacc8..e4aacc8 100644
--- a/usr.bin/tar/test/test_version.c
+++ b/contrib/libarchive/tar/test/test_version.c
diff --git a/contrib/libarchive/tar/tree.c b/contrib/libarchive/tar/tree.c
new file mode 100644
index 0000000..ff8e60f
--- /dev/null
+++ b/contrib/libarchive/tar/tree.c
@@ -0,0 +1,821 @@
+/*-
+ * Copyright (c) 2003-2007 Tim Kientzle
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*-
+ * This is a new directory-walking system that addresses a number
+ * of problems I've had with fts(3). In particular, it has no
+ * pathname-length limits (other than the size of 'int'), handles
+ * deep logical traversals, uses considerably less memory, and has
+ * an opaque interface (easier to modify in the future).
+ *
+ * Internally, it keeps a single list of "tree_entry" items that
+ * represent filesystem objects that require further attention.
+ * Non-directories are not kept in memory: they are pulled from
+ * readdir(), returned to the client, then freed as soon as possible.
+ * Any directory entry to be traversed gets pushed onto the stack.
+ *
+ * There is surprisingly little information that needs to be kept for
+ * each item on the stack. Just the name, depth (represented here as the
+ * string length of the parent directory's pathname), and some markers
+ * indicating how to get back to the parent (via chdir("..") for a
+ * regular dir or via fchdir(2) for a symlink).
+ */
+#include "bsdtar_platform.h"
+__FBSDID("$FreeBSD$");
+
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_DIRECT_H
+#include <direct.h>
+#endif
+#ifdef HAVE_DIRENT_H
+#include <dirent.h>
+#endif
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#if defined(HAVE_WINDOWS_H) && !defined(__CYGWIN__)
+#include <windows.h>
+#endif
+
+#include "tree.h"
+
+/*
+ * TODO:
+ * 1) Loop checking.
+ * 3) Arbitrary logical traversals by closing/reopening intermediate fds.
+ */
+
+struct tree_entry {
+ int depth;
+ struct tree_entry *next;
+ struct tree_entry *parent;
+ char *name;
+ size_t dirname_length;
+ dev_t dev;
+ ino_t ino;
+ int flags;
+ /* How to return back to the parent of a symlink. */
+#ifdef HAVE_FCHDIR
+ int symlink_parent_fd;
+#elif defined(_WIN32) && !defined(__CYGWIN__)
+ char *symlink_parent_path;
+#else
+#error fchdir function required.
+#endif
+};
+
+/* Definitions for tree_entry.flags bitmap. */
+#define isDir 1 /* This entry is a regular directory. */
+#define isDirLink 2 /* This entry is a symbolic link to a directory. */
+#define needsFirstVisit 4 /* This is an initial entry. */
+#define needsDescent 8 /* This entry needs to be previsited. */
+#define needsOpen 16 /* This is a directory that needs to be opened. */
+#define needsAscent 32 /* This entry needs to be postvisited. */
+
+/*
+ * On Windows, "first visit" is handled as a pattern to be handed to
+ * _findfirst(). This is consistent with Windows conventions that
+ * file patterns are handled within the application. On Posix,
+ * "first visit" is just returned to the client.
+ */
+
+/*
+ * Local data for this package.
+ */
+struct tree {
+ struct tree_entry *stack;
+ struct tree_entry *current;
+#if defined(HAVE_WINDOWS_H) && !defined(__CYGWIN__)
+ HANDLE d;
+ BY_HANDLE_FILE_INFORMATION fileInfo;
+#define INVALID_DIR_HANDLE INVALID_HANDLE_VALUE
+ WIN32_FIND_DATA _findData;
+ WIN32_FIND_DATA *findData;
+#else
+ DIR *d;
+#define INVALID_DIR_HANDLE NULL
+ struct dirent *de;
+#endif
+ int flags;
+ int visit_type;
+ int tree_errno; /* Error code from last failed operation. */
+
+ /* Dynamically-sized buffer for holding path */
+ char *buff;
+ size_t buff_length;
+
+ const char *basename; /* Last path element */
+ size_t dirname_length; /* Leading dir length */
+ size_t path_length; /* Total path length */
+
+ int depth;
+ int openCount;
+ int maxOpenCount;
+
+ struct stat lst;
+ struct stat st;
+};
+
+/* Definitions for tree.flags bitmap. */
+#define hasStat 16 /* The st entry is valid. */
+#define hasLstat 32 /* The lst entry is valid. */
+#define hasFileInfo 64 /* The Windows fileInfo entry is valid. */
+
+#if defined(_WIN32) && !defined(__CYGWIN__)
+static int
+tree_dir_next_windows(struct tree *t, const char *pattern);
+#else
+static int
+tree_dir_next_posix(struct tree *t);
+#endif
+
+#ifdef HAVE_DIRENT_D_NAMLEN
+/* BSD extension; avoids need for a strlen() call. */
+#define D_NAMELEN(dp) (dp)->d_namlen
+#else
+#define D_NAMELEN(dp) (strlen((dp)->d_name))
+#endif
+
+#include <stdio.h>
+void
+tree_dump(struct tree *t, FILE *out)
+{
+ char buff[300];
+ struct tree_entry *te;
+
+ fprintf(out, "\tdepth: %d\n", t->depth);
+ fprintf(out, "\tbuff: %s\n", t->buff);
+ fprintf(out, "\tpwd: %s\n", getcwd(buff, sizeof(buff)));
+ fprintf(out, "\tbasename: %s\n", t->basename);
+ fprintf(out, "\tstack:\n");
+ for (te = t->stack; te != NULL; te = te->next) {
+ fprintf(out, "\t\t%s%d:\"%s\" %s%s%s%s%s%s\n",
+ t->current == te ? "*" : " ",
+ te->depth,
+ te->name,
+ te->flags & needsFirstVisit ? "V" : "",
+ te->flags & needsDescent ? "D" : "",
+ te->flags & needsOpen ? "O" : "",
+ te->flags & needsAscent ? "A" : "",
+ te->flags & isDirLink ? "L" : "",
+ (t->current == te && t->d) ? "+" : ""
+ );
+ }
+}
+
+/*
+ * Add a directory path to the current stack.
+ */
+static void
+tree_push(struct tree *t, const char *path)
+{
+ struct tree_entry *te;
+
+ te = malloc(sizeof(*te));
+ memset(te, 0, sizeof(*te));
+ te->next = t->stack;
+ te->parent = t->current;
+ if (te->parent)
+ te->depth = te->parent->depth + 1;
+ t->stack = te;
+#ifdef HAVE_FCHDIR
+ te->symlink_parent_fd = -1;
+ te->name = strdup(path);
+#elif defined(_WIN32) && !defined(__CYGWIN__)
+ te->symlink_parent_path = NULL;
+ te->name = strdup(path);
+#endif
+ te->flags = needsDescent | needsOpen | needsAscent;
+ te->dirname_length = t->dirname_length;
+}
+
+/*
+ * Append a name to the current dir path.
+ */
+static void
+tree_append(struct tree *t, const char *name, size_t name_length)
+{
+ char *p;
+ size_t size_needed;
+
+ if (t->buff != NULL)
+ t->buff[t->dirname_length] = '\0';
+ /* Strip trailing '/' from name, unless entire name is "/". */
+ while (name_length > 1 && name[name_length - 1] == '/')
+ name_length--;
+
+ /* Resize pathname buffer as needed. */
+ size_needed = name_length + 1 + t->dirname_length;
+ if (t->buff_length < size_needed) {
+ if (t->buff_length < 1024)
+ t->buff_length = 1024;
+ while (t->buff_length < size_needed)
+ t->buff_length *= 2;
+ t->buff = realloc(t->buff, t->buff_length);
+ }
+ if (t->buff == NULL)
+ abort();
+ p = t->buff + t->dirname_length;
+ t->path_length = t->dirname_length + name_length;
+ /* Add a separating '/' if it's needed. */
+ if (t->dirname_length > 0 && p[-1] != '/') {
+ *p++ = '/';
+ t->path_length ++;
+ }
+#if HAVE_STRNCPY_S
+ strncpy_s(p, t->buff_length - (p - t->buff), name, name_length);
+#else
+ strncpy(p, name, name_length);
+#endif
+ p[name_length] = '\0';
+ t->basename = p;
+}
+
+/*
+ * Open a directory tree for traversal.
+ */
+struct tree *
+tree_open(const char *path)
+{
+#ifdef HAVE_FCHDIR
+ struct tree *t;
+
+ t = malloc(sizeof(*t));
+ memset(t, 0, sizeof(*t));
+ /* First item is set up a lot like a symlink traversal. */
+ tree_push(t, path);
+ t->stack->flags = needsFirstVisit | isDirLink | needsAscent;
+ t->stack->symlink_parent_fd = open(".", O_RDONLY);
+ t->openCount++;
+ t->d = INVALID_DIR_HANDLE;
+ return (t);
+#elif defined(_WIN32) && !defined(__CYGWIN__)
+ struct tree *t;
+ char *cwd = _getcwd(NULL, 0);
+ char *pathname = strdup(path), *p, *base;
+
+ if (pathname == NULL)
+ abort();
+ for (p = pathname; *p != '\0'; ++p) {
+ if (*p == '\\')
+ *p = '/';
+ }
+ base = pathname;
+
+ t = malloc(sizeof(*t));
+ memset(t, 0, sizeof(*t));
+ /* First item is set up a lot like a symlink traversal. */
+ /* printf("Looking for wildcard in %s\n", path); */
+ /* TODO: wildcard detection here screws up on \\?\c:\ UNC names */
+ if (strchr(base, '*') || strchr(base, '?')) {
+ // It has a wildcard in it...
+ // Separate the last element.
+ p = strrchr(base, '/');
+ if (p != NULL) {
+ *p = '\0';
+ chdir(base);
+ tree_append(t, base, p - base);
+ t->dirname_length = t->path_length;
+ base = p + 1;
+ }
+ }
+ tree_push(t, base);
+ free(pathname);
+ t->stack->flags = needsFirstVisit | isDirLink | needsAscent;
+ t->stack->symlink_parent_path = cwd;
+ t->d = INVALID_DIR_HANDLE;
+ return (t);
+#endif
+}
+
+/*
+ * We've finished a directory; ascend back to the parent.
+ */
+static int
+tree_ascend(struct tree *t)
+{
+ struct tree_entry *te;
+ int r = 0;
+
+ te = t->stack;
+ t->depth--;
+ if (te->flags & isDirLink) {
+#ifdef HAVE_FCHDIR
+ if (fchdir(te->symlink_parent_fd) != 0) {
+ t->tree_errno = errno;
+ r = TREE_ERROR_FATAL;
+ }
+ close(te->symlink_parent_fd);
+#elif defined(_WIN32) && !defined(__CYGWIN__)
+ if (SetCurrentDirectory(te->symlink_parent_path) == 0) {
+ t->tree_errno = errno;
+ r = TREE_ERROR_FATAL;
+ }
+ free(te->symlink_parent_path);
+ te->symlink_parent_path = NULL;
+#endif
+ t->openCount--;
+ } else {
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ if (SetCurrentDirectory("..") == 0) {
+#else
+ if (chdir("..") != 0) {
+#endif
+ t->tree_errno = errno;
+ r = TREE_ERROR_FATAL;
+ }
+ }
+ return (r);
+}
+
+/*
+ * Pop the working stack.
+ */
+static void
+tree_pop(struct tree *t)
+{
+ struct tree_entry *te;
+
+ if (t->buff)
+ t->buff[t->dirname_length] = '\0';
+ if (t->stack == t->current && t->current != NULL)
+ t->current = t->current->parent;
+ te = t->stack;
+ t->stack = te->next;
+ t->dirname_length = te->dirname_length;
+ if (t->buff) {
+ t->basename = t->buff + t->dirname_length;
+ while (t->basename[0] == '/')
+ t->basename++;
+ }
+ free(te->name);
+ free(te);
+}
+
+/*
+ * Get the next item in the tree traversal.
+ */
+int
+tree_next(struct tree *t)
+{
+ int r;
+
+ /* If we're called again after a fatal error, that's an API
+ * violation. Just crash now. */
+ if (t->visit_type == TREE_ERROR_FATAL) {
+ fprintf(stderr, "Unable to continue traversing"
+ " directory hierarchy after a fatal error.");
+ abort();
+ }
+
+ while (t->stack != NULL) {
+ /* If there's an open dir, get the next entry from there. */
+ if (t->d != INVALID_DIR_HANDLE) {
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ r = tree_dir_next_windows(t, NULL);
+#else
+ r = tree_dir_next_posix(t);
+#endif
+ if (r == 0)
+ continue;
+ return (r);
+ }
+
+ if (t->stack->flags & needsFirstVisit) {
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ char *d = t->stack->name;
+ t->stack->flags &= ~needsFirstVisit;
+ if (strchr(d, '*') || strchr(d, '?')) {
+ r = tree_dir_next_windows(t, d);
+ if (r == 0)
+ continue;
+ return (r);
+ }
+ // Not a pattern, handle it as-is...
+#endif
+ /* Top stack item needs a regular visit. */
+ t->current = t->stack;
+ tree_append(t, t->stack->name, strlen(t->stack->name));
+ //t->dirname_length = t->path_length;
+ //tree_pop(t);
+ t->stack->flags &= ~needsFirstVisit;
+ return (t->visit_type = TREE_REGULAR);
+ } else if (t->stack->flags & needsDescent) {
+ /* Top stack item is dir to descend into. */
+ t->current = t->stack;
+ tree_append(t, t->stack->name, strlen(t->stack->name));
+ t->stack->flags &= ~needsDescent;
+ /* If it is a link, set up fd for the ascent. */
+ if (t->stack->flags & isDirLink) {
+#ifdef HAVE_FCHDIR
+ t->stack->symlink_parent_fd = open(".", O_RDONLY);
+ t->openCount++;
+ if (t->openCount > t->maxOpenCount)
+ t->maxOpenCount = t->openCount;
+#elif defined(_WIN32) && !defined(__CYGWIN__)
+ t->stack->symlink_parent_path = _getcwd(NULL, 0);
+#endif
+ }
+ t->dirname_length = t->path_length;
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ if (t->path_length == 259 || !SetCurrentDirectory(t->stack->name) != 0)
+#else
+ if (chdir(t->stack->name) != 0)
+#endif
+ {
+ /* chdir() failed; return error */
+ tree_pop(t);
+ t->tree_errno = errno;
+ return (t->visit_type = TREE_ERROR_DIR);
+ }
+ t->depth++;
+ return (t->visit_type = TREE_POSTDESCENT);
+ } else if (t->stack->flags & needsOpen) {
+ t->stack->flags &= ~needsOpen;
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ r = tree_dir_next_windows(t, "*");
+#else
+ r = tree_dir_next_posix(t);
+#endif
+ if (r == 0)
+ continue;
+ return (r);
+ } else if (t->stack->flags & needsAscent) {
+ /* Top stack item is dir and we're done with it. */
+ r = tree_ascend(t);
+ tree_pop(t);
+ t->visit_type = r != 0 ? r : TREE_POSTASCENT;
+ return (t->visit_type);
+ } else {
+ /* Top item on stack is dead. */
+ tree_pop(t);
+ t->flags &= ~hasLstat;
+ t->flags &= ~hasStat;
+ }
+ }
+ return (t->visit_type = 0);
+}
+
+#if defined(_WIN32) && !defined(__CYGWIN__)
+static int
+tree_dir_next_windows(struct tree *t, const char *pattern)
+{
+ const char *name;
+ size_t namelen;
+ int r;
+
+ for (;;) {
+ if (pattern != NULL) {
+ t->d = FindFirstFile(pattern, &t->_findData);
+ if (t->d == INVALID_DIR_HANDLE) {
+ r = tree_ascend(t); /* Undo "chdir" */
+ tree_pop(t);
+ t->tree_errno = errno;
+ t->visit_type = r != 0 ? r : TREE_ERROR_DIR;
+ return (t->visit_type);
+ }
+ t->findData = &t->_findData;
+ pattern = NULL;
+ } else if (!FindNextFile(t->d, &t->_findData)) {
+ FindClose(t->d);
+ t->d = INVALID_DIR_HANDLE;
+ t->findData = NULL;
+ return (0);
+ }
+ name = t->findData->cFileName;
+ namelen = strlen(name);
+ t->flags &= ~hasLstat;
+ t->flags &= ~hasStat;
+ if (name[0] == '.' && name[1] == '\0')
+ continue;
+ if (name[0] == '.' && name[1] == '.' && name[2] == '\0')
+ continue;
+ tree_append(t, name, namelen);
+ return (t->visit_type = TREE_REGULAR);
+ }
+}
+#else
+static int
+tree_dir_next_posix(struct tree *t)
+{
+ int r;
+ const char *name;
+ size_t namelen;
+
+ if (t->d == NULL) {
+ if ((t->d = opendir(".")) == NULL) {
+ r = tree_ascend(t); /* Undo "chdir" */
+ tree_pop(t);
+ t->tree_errno = errno;
+ t->visit_type = r != 0 ? r : TREE_ERROR_DIR;
+ return (t->visit_type);
+ }
+ }
+ for (;;) {
+ t->de = readdir(t->d);
+ if (t->de == NULL) {
+ closedir(t->d);
+ t->d = INVALID_DIR_HANDLE;
+ return (0);
+ }
+ name = t->de->d_name;
+ namelen = D_NAMELEN(t->de);
+ t->flags &= ~hasLstat;
+ t->flags &= ~hasStat;
+ if (name[0] == '.' && name[1] == '\0')
+ continue;
+ if (name[0] == '.' && name[1] == '.' && name[2] == '\0')
+ continue;
+ tree_append(t, name, namelen);
+ return (t->visit_type = TREE_REGULAR);
+ }
+}
+#endif
+
+/*
+ * Return error code.
+ */
+int
+tree_errno(struct tree *t)
+{
+ return (t->tree_errno);
+}
+
+/*
+ * Called by the client to mark the directory just returned from
+ * tree_next() as needing to be visited.
+ */
+void
+tree_descend(struct tree *t)
+{
+ if (t->visit_type != TREE_REGULAR)
+ return;
+
+ if (tree_current_is_physical_dir(t)) {
+ tree_push(t, t->basename);
+ t->stack->flags |= isDir;
+ } else if (tree_current_is_dir(t)) {
+ tree_push(t, t->basename);
+ t->stack->flags |= isDirLink;
+ }
+}
+
+/*
+ * Get the stat() data for the entry just returned from tree_next().
+ */
+const struct stat *
+tree_current_stat(struct tree *t)
+{
+ if (!(t->flags & hasStat)) {
+ if (stat(tree_current_access_path(t), &t->st) != 0)
+ return NULL;
+ t->flags |= hasStat;
+ }
+ return (&t->st);
+}
+
+#if defined(HAVE_WINDOWS_H) && !defined(__CYGWIN__)
+const BY_HANDLE_FILE_INFORMATION *
+tree_current_file_information(struct tree *t)
+{
+ if (!(t->flags & hasFileInfo)) {
+ HANDLE h = CreateFile(tree_current_access_path(t),
+ 0, 0, NULL,
+ OPEN_EXISTING,
+ FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT,
+ NULL);
+ if (h == INVALID_HANDLE_VALUE)
+ return NULL;
+ if (!GetFileInformationByHandle(h, &t->fileInfo)) {
+ CloseHandle(h);
+ return NULL;
+ }
+ CloseHandle(h);
+ t->flags |= hasFileInfo;
+ }
+ return (&t->fileInfo);
+}
+#endif
+/*
+ * Get the lstat() data for the entry just returned from tree_next().
+ */
+const struct stat *
+tree_current_lstat(struct tree *t)
+{
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ return (tree_current_stat(t));
+#else
+ if (!(t->flags & hasLstat)) {
+ if (lstat(tree_current_access_path(t), &t->lst) != 0)
+ return NULL;
+ t->flags |= hasLstat;
+ }
+ return (&t->lst);
+#endif
+}
+
+/*
+ * Test whether current entry is a dir or link to a dir.
+ */
+int
+tree_current_is_dir(struct tree *t)
+{
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ if (t->findData)
+ return (t->findData->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY);
+ if (tree_current_file_information(t))
+ return (t->fileInfo.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY);
+ return (0);
+#else
+ const struct stat *st;
+ /*
+ * If we already have lstat() info, then try some
+ * cheap tests to determine if this is a dir.
+ */
+ if (t->flags & hasLstat) {
+ /* If lstat() says it's a dir, it must be a dir. */
+ if (S_ISDIR(tree_current_lstat(t)->st_mode))
+ return 1;
+ /* Not a dir; might be a link to a dir. */
+ /* If it's not a link, then it's not a link to a dir. */
+ if (!S_ISLNK(tree_current_lstat(t)->st_mode))
+ return 0;
+ /*
+ * It's a link, but we don't know what it's a link to,
+ * so we'll have to use stat().
+ */
+ }
+
+ st = tree_current_stat(t);
+ /* If we can't stat it, it's not a dir. */
+ if (st == NULL)
+ return 0;
+ /* Use the definitive test. Hopefully this is cached. */
+ return (S_ISDIR(st->st_mode));
+#endif
+}
+
+/*
+ * Test whether current entry is a physical directory. Usually, we
+ * already have at least one of stat() or lstat() in memory, so we
+ * use tricks to try to avoid an extra trip to the disk.
+ */
+int
+tree_current_is_physical_dir(struct tree *t)
+{
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ if (tree_current_is_physical_link(t))
+ return (0);
+ return (tree_current_is_dir(t));
+#else
+ const struct stat *st;
+
+ /*
+ * If stat() says it isn't a dir, then it's not a dir.
+ * If stat() data is cached, this check is free, so do it first.
+ */
+ if ((t->flags & hasStat)
+ && (!S_ISDIR(tree_current_stat(t)->st_mode)))
+ return 0;
+
+ /*
+ * Either stat() said it was a dir (in which case, we have
+ * to determine whether it's really a link to a dir) or
+ * stat() info wasn't available. So we use lstat(), which
+ * hopefully is already cached.
+ */
+
+ st = tree_current_lstat(t);
+ /* If we can't stat it, it's not a dir. */
+ if (st == NULL)
+ return 0;
+ /* Use the definitive test. Hopefully this is cached. */
+ return (S_ISDIR(st->st_mode));
+#endif
+}
+
+/*
+ * Test whether current entry is a symbolic link.
+ */
+int
+tree_current_is_physical_link(struct tree *t)
+{
+#if defined(_WIN32) && !defined(__CYGWIN__)
+#ifndef IO_REPARSE_TAG_SYMLINK
+/* Old SDKs do not provide IO_REPARSE_TAG_SYMLINK */
+#define IO_REPARSE_TAG_SYMLINK 0xA000000CL
+#endif
+ if (t->findData)
+ return ((t->findData->dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)
+ && (t->findData->dwReserved0 == IO_REPARSE_TAG_SYMLINK));
+ return (0);
+#else
+ const struct stat *st = tree_current_lstat(t);
+ if (st == NULL)
+ return 0;
+ return (S_ISLNK(st->st_mode));
+#endif
+}
+
+/*
+ * Return the access path for the entry just returned from tree_next().
+ */
+const char *
+tree_current_access_path(struct tree *t)
+{
+ return (t->basename);
+}
+
+/*
+ * Return the full path for the entry just returned from tree_next().
+ */
+const char *
+tree_current_path(struct tree *t)
+{
+ return (t->buff);
+}
+
+/*
+ * Return the length of the path for the entry just returned from tree_next().
+ */
+size_t
+tree_current_pathlen(struct tree *t)
+{
+ return (t->path_length);
+}
+
+/*
+ * Return the nesting depth of the entry just returned from tree_next().
+ */
+int
+tree_current_depth(struct tree *t)
+{
+ return (t->depth);
+}
+
+/*
+ * Terminate the traversal and release any resources.
+ */
+void
+tree_close(struct tree *t)
+{
+ /* Release anything remaining in the stack. */
+ while (t->stack != NULL)
+ tree_pop(t);
+ free(t->buff);
+ /* TODO: Ensure that premature close() resets cwd */
+#if 0
+#ifdef HAVE_FCHDIR
+ if (t->initialDirFd >= 0) {
+ int s = fchdir(t->initialDirFd);
+ (void)s; /* UNUSED */
+ close(t->initialDirFd);
+ t->initialDirFd = -1;
+ }
+#elif defined(_WIN32) && !defined(__CYGWIN__)
+ if (t->initialDir != NULL) {
+ SetCurrentDir(t->initialDir);
+ free(t->initialDir);
+ t->initialDir = NULL;
+ }
+#endif
+#endif
+ free(t);
+}
diff --git a/usr.bin/tar/tree.h b/contrib/libarchive/tar/tree.h
index 3ae74fd..3ae74fd 100644
--- a/usr.bin/tar/tree.h
+++ b/contrib/libarchive/tar/tree.h
diff --git a/usr.bin/tar/util.c b/contrib/libarchive/tar/util.c
index 8e8b4a5..8e8b4a5 100644
--- a/usr.bin/tar/util.c
+++ b/contrib/libarchive/tar/util.c
diff --git a/contrib/libarchive/tar/write.c b/contrib/libarchive/tar/write.c
new file mode 100644
index 0000000..1105159
--- /dev/null
+++ b/contrib/libarchive/tar/write.c
@@ -0,0 +1,1176 @@
+/*-
+ * Copyright (c) 2003-2007 Tim Kientzle
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "bsdtar_platform.h"
+__FBSDID("$FreeBSD$");
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_ATTR_XATTR_H
+#include <attr/xattr.h>
+#endif
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef HAVE_GRP_H
+#include <grp.h>
+#endif
+#ifdef HAVE_IO_H
+#include <io.h>
+#endif
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+#ifdef HAVE_LINUX_FS_H
+#include <linux/fs.h> /* for Linux file flags */
+#endif
+/*
+ * Some Linux distributions have both linux/ext2_fs.h and ext2fs/ext2_fs.h.
+ * As the include guards don't agree, the order of include is important.
+ */
+#ifdef HAVE_LINUX_EXT2_FS_H
+#include <linux/ext2_fs.h> /* for Linux file flags */
+#endif
+#if defined(HAVE_EXT2FS_EXT2_FS_H) && !defined(__CYGWIN__)
+/* This header exists but is broken on Cygwin. */
+#include <ext2fs/ext2_fs.h>
+#endif
+#ifdef HAVE_PWD_H
+#include <pwd.h>
+#endif
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#include <stdio.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include "bsdtar.h"
+#include "err.h"
+#include "line_reader.h"
+#include "tree.h"
+
+/* Size of buffer for holding file data prior to writing. */
+#define FILEDATABUFLEN 65536
+
+/* Fixed size of uname/gname caches. */
+#define name_cache_size 101
+
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+
+static const char * const NO_NAME = "(noname)";
+
+struct archive_dir_entry {
+ struct archive_dir_entry *next;
+ time_t mtime_sec;
+ int mtime_nsec;
+ char *name;
+};
+
+struct archive_dir {
+ struct archive_dir_entry *head, *tail;
+};
+
+struct name_cache {
+ int probes;
+ int hits;
+ size_t size;
+ struct {
+ id_t id;
+ const char *name;
+ } cache[name_cache_size];
+};
+
+static void add_dir_list(struct bsdtar *bsdtar, const char *path,
+ time_t mtime_sec, int mtime_nsec);
+static int append_archive(struct bsdtar *, struct archive *,
+ struct archive *ina);
+static int append_archive_filename(struct bsdtar *,
+ struct archive *, const char *fname);
+static void archive_names_from_file(struct bsdtar *bsdtar,
+ struct archive *a);
+static int copy_file_data(struct bsdtar *, struct archive *a,
+ struct archive *ina, struct archive_entry *);
+static int new_enough(struct bsdtar *, const char *path,
+ const struct stat *);
+static void report_write(struct bsdtar *, struct archive *,
+ struct archive_entry *, int64_t progress);
+static void test_for_append(struct bsdtar *);
+static void write_archive(struct archive *, struct bsdtar *);
+static void write_entry_backend(struct bsdtar *, struct archive *,
+ struct archive_entry *);
+static int write_file_data(struct bsdtar *, struct archive *,
+ struct archive_entry *, int fd);
+static void write_hierarchy(struct bsdtar *, struct archive *,
+ const char *);
+
+#if defined(_WIN32) && !defined(__CYGWIN__)
+/* Not a full lseek() emulation, but enough for our needs here. */
+static int
+seek_file(int fd, int64_t offset, int whence)
+{
+ LARGE_INTEGER distance;
+ (void)whence; /* UNUSED */
+ distance.QuadPart = offset;
+ return (SetFilePointerEx((HANDLE)_get_osfhandle(fd),
+ distance, NULL, FILE_BEGIN) ? 1 : -1);
+}
+#define open _open
+#define close _close
+#define read _read
+#define lseek seek_file
+#endif
+
+void
+tar_mode_c(struct bsdtar *bsdtar)
+{
+ struct archive *a;
+ int r;
+
+ if (*bsdtar->argv == NULL && bsdtar->names_from_file == NULL)
+ lafe_errc(1, 0, "no files or directories specified");
+
+ a = archive_write_new();
+
+ /* Support any format that the library supports. */
+ if (bsdtar->create_format == NULL) {
+ r = archive_write_set_format_pax_restricted(a);
+ bsdtar->create_format = "pax restricted";
+ } else {
+ r = archive_write_set_format_by_name(a, bsdtar->create_format);
+ }
+ if (r != ARCHIVE_OK) {
+ fprintf(stderr, "Can't use format %s: %s\n",
+ bsdtar->create_format,
+ archive_error_string(a));
+ usage();
+ }
+
+ /*
+ * If user explicitly set the block size, then assume they
+ * want the last block padded as well. Otherwise, use the
+ * default block size and accept archive_write_open_file()'s
+ * default padding decisions.
+ */
+ if (bsdtar->bytes_per_block != 0) {
+ archive_write_set_bytes_per_block(a, bsdtar->bytes_per_block);
+ archive_write_set_bytes_in_last_block(a,
+ bsdtar->bytes_per_block);
+ } else
+ archive_write_set_bytes_per_block(a, DEFAULT_BYTES_PER_BLOCK);
+
+ if (bsdtar->compress_program) {
+ archive_write_set_compression_program(a, bsdtar->compress_program);
+ } else {
+ switch (bsdtar->create_compression) {
+ case 0:
+ r = archive_write_set_compression_none(a);
+ break;
+ case 'j': case 'y':
+ r = archive_write_set_compression_bzip2(a);
+ break;
+ case 'J':
+ r = archive_write_set_compression_xz(a);
+ break;
+ case OPTION_LZMA:
+ r = archive_write_set_compression_lzma(a);
+ break;
+ case 'z':
+ r = archive_write_set_compression_gzip(a);
+ break;
+ case 'Z':
+ r = archive_write_set_compression_compress(a);
+ break;
+ default:
+ lafe_errc(1, 0,
+ "Unrecognized compression option -%c",
+ bsdtar->create_compression);
+ }
+ if (r != ARCHIVE_OK) {
+ lafe_errc(1, 0,
+ "Unsupported compression option -%c",
+ bsdtar->create_compression);
+ }
+ }
+
+ if (ARCHIVE_OK != archive_write_set_options(a, bsdtar->option_options))
+ lafe_errc(1, 0, "%s", archive_error_string(a));
+ if (ARCHIVE_OK != archive_write_open_file(a, bsdtar->filename))
+ lafe_errc(1, 0, "%s", archive_error_string(a));
+ write_archive(a, bsdtar);
+}
+
+/*
+ * Same as 'c', except we only support tar or empty formats in
+ * uncompressed files on disk.
+ */
+void
+tar_mode_r(struct bsdtar *bsdtar)
+{
+ int64_t end_offset;
+ int format;
+ struct archive *a;
+ struct archive_entry *entry;
+ int r;
+
+ /* Sanity-test some arguments and the file. */
+ test_for_append(bsdtar);
+
+ format = ARCHIVE_FORMAT_TAR_PAX_RESTRICTED;
+
+#if defined(__BORLANDC__)
+ bsdtar->fd = open(bsdtar->filename, O_RDWR | O_CREAT | O_BINARY);
+#else
+ bsdtar->fd = open(bsdtar->filename, O_RDWR | O_CREAT | O_BINARY, 0666);
+#endif
+ if (bsdtar->fd < 0)
+ lafe_errc(1, errno,
+ "Cannot open %s", bsdtar->filename);
+
+ a = archive_read_new();
+ archive_read_support_compression_all(a);
+ archive_read_support_format_tar(a);
+ archive_read_support_format_gnutar(a);
+ r = archive_read_open_fd(a, bsdtar->fd, 10240);
+ if (r != ARCHIVE_OK)
+ lafe_errc(1, archive_errno(a),
+ "Can't read archive %s: %s", bsdtar->filename,
+ archive_error_string(a));
+ while (0 == archive_read_next_header(a, &entry)) {
+ if (archive_compression(a) != ARCHIVE_COMPRESSION_NONE) {
+ archive_read_finish(a);
+ close(bsdtar->fd);
+ lafe_errc(1, 0,
+ "Cannot append to compressed archive.");
+ }
+ /* Keep going until we hit end-of-archive */
+ format = archive_format(a);
+ }
+
+ end_offset = archive_read_header_position(a);
+ archive_read_finish(a);
+
+ /* Re-open archive for writing */
+ a = archive_write_new();
+ archive_write_set_compression_none(a);
+ /*
+ * Set the format to be used for writing. To allow people to
+ * extend empty files, we need to allow them to specify the format,
+ * which opens the possibility that they will specify a format that
+ * doesn't match the existing format. Hence, the following bit
+ * of arcane ugliness.
+ */
+
+ if (bsdtar->create_format != NULL) {
+ /* If the user requested a format, use that, but ... */
+ archive_write_set_format_by_name(a,
+ bsdtar->create_format);
+ /* ... complain if it's not compatible. */
+ format &= ARCHIVE_FORMAT_BASE_MASK;
+ if (format != (int)(archive_format(a) & ARCHIVE_FORMAT_BASE_MASK)
+ && format != ARCHIVE_FORMAT_EMPTY) {
+ lafe_errc(1, 0,
+ "Format %s is incompatible with the archive %s.",
+ bsdtar->create_format, bsdtar->filename);
+ }
+ } else {
+ /*
+ * Just preserve the current format, with a little care
+ * for formats that libarchive can't write.
+ */
+ if (format == ARCHIVE_FORMAT_TAR_GNUTAR)
+ /* TODO: When gtar supports pax, use pax restricted. */
+ format = ARCHIVE_FORMAT_TAR_USTAR;
+ if (format == ARCHIVE_FORMAT_EMPTY)
+ format = ARCHIVE_FORMAT_TAR_PAX_RESTRICTED;
+ archive_write_set_format(a, format);
+ }
+ if (lseek(bsdtar->fd, end_offset, SEEK_SET) < 0)
+ lafe_errc(1, errno, "Could not seek to archive end");
+ if (ARCHIVE_OK != archive_write_set_options(a, bsdtar->option_options))
+ lafe_errc(1, 0, "%s", archive_error_string(a));
+ if (ARCHIVE_OK != archive_write_open_fd(a, bsdtar->fd))
+ lafe_errc(1, 0, "%s", archive_error_string(a));
+
+ write_archive(a, bsdtar); /* XXX check return val XXX */
+
+ close(bsdtar->fd);
+ bsdtar->fd = -1;
+}
+
+void
+tar_mode_u(struct bsdtar *bsdtar)
+{
+ int64_t end_offset;
+ struct archive *a;
+ struct archive_entry *entry;
+ int format;
+ struct archive_dir_entry *p;
+ struct archive_dir archive_dir;
+
+ bsdtar->archive_dir = &archive_dir;
+ memset(&archive_dir, 0, sizeof(archive_dir));
+
+ format = ARCHIVE_FORMAT_TAR_PAX_RESTRICTED;
+
+ /* Sanity-test some arguments and the file. */
+ test_for_append(bsdtar);
+
+ bsdtar->fd = open(bsdtar->filename, O_RDWR | O_BINARY);
+ if (bsdtar->fd < 0)
+ lafe_errc(1, errno,
+ "Cannot open %s", bsdtar->filename);
+
+ a = archive_read_new();
+ archive_read_support_compression_all(a);
+ archive_read_support_format_tar(a);
+ archive_read_support_format_gnutar(a);
+ if (archive_read_open_fd(a, bsdtar->fd,
+ bsdtar->bytes_per_block != 0 ? bsdtar->bytes_per_block :
+ DEFAULT_BYTES_PER_BLOCK) != ARCHIVE_OK) {
+ lafe_errc(1, 0,
+ "Can't open %s: %s", bsdtar->filename,
+ archive_error_string(a));
+ }
+
+ /* Build a list of all entries and their recorded mod times. */
+ while (0 == archive_read_next_header(a, &entry)) {
+ if (archive_compression(a) != ARCHIVE_COMPRESSION_NONE) {
+ archive_read_finish(a);
+ close(bsdtar->fd);
+ lafe_errc(1, 0,
+ "Cannot append to compressed archive.");
+ }
+ add_dir_list(bsdtar, archive_entry_pathname(entry),
+ archive_entry_mtime(entry),
+ archive_entry_mtime_nsec(entry));
+ /* Record the last format determination we see */
+ format = archive_format(a);
+ /* Keep going until we hit end-of-archive */
+ }
+
+ end_offset = archive_read_header_position(a);
+ archive_read_finish(a);
+
+ /* Re-open archive for writing. */
+ a = archive_write_new();
+ archive_write_set_compression_none(a);
+ /*
+ * Set format to same one auto-detected above, except that
+ * we don't write GNU tar format, so use ustar instead.
+ */
+ if (format == ARCHIVE_FORMAT_TAR_GNUTAR)
+ format = ARCHIVE_FORMAT_TAR_USTAR;
+ archive_write_set_format(a, format);
+ if (bsdtar->bytes_per_block != 0) {
+ archive_write_set_bytes_per_block(a, bsdtar->bytes_per_block);
+ archive_write_set_bytes_in_last_block(a,
+ bsdtar->bytes_per_block);
+ } else
+ archive_write_set_bytes_per_block(a, DEFAULT_BYTES_PER_BLOCK);
+ if (lseek(bsdtar->fd, end_offset, SEEK_SET) < 0)
+ lafe_errc(1, errno, "Could not seek to archive end");
+ if (ARCHIVE_OK != archive_write_set_options(a, bsdtar->option_options))
+ lafe_errc(1, 0, "%s", archive_error_string(a));
+ if (ARCHIVE_OK != archive_write_open_fd(a, bsdtar->fd))
+ lafe_errc(1, 0, "%s", archive_error_string(a));
+
+ write_archive(a, bsdtar);
+
+ close(bsdtar->fd);
+ bsdtar->fd = -1;
+
+ while (bsdtar->archive_dir->head != NULL) {
+ p = bsdtar->archive_dir->head->next;
+ free(bsdtar->archive_dir->head->name);
+ free(bsdtar->archive_dir->head);
+ bsdtar->archive_dir->head = p;
+ }
+ bsdtar->archive_dir->tail = NULL;
+}
+
+
+/*
+ * Write user-specified files/dirs to opened archive.
+ */
+static void
+write_archive(struct archive *a, struct bsdtar *bsdtar)
+{
+ const char *arg;
+ struct archive_entry *entry, *sparse_entry;
+
+ /* Allocate a buffer for file data. */
+ if ((bsdtar->buff = malloc(FILEDATABUFLEN)) == NULL)
+ lafe_errc(1, 0, "cannot allocate memory");
+
+ if ((bsdtar->resolver = archive_entry_linkresolver_new()) == NULL)
+ lafe_errc(1, 0, "cannot create link resolver");
+ archive_entry_linkresolver_set_strategy(bsdtar->resolver,
+ archive_format(a));
+ if ((bsdtar->diskreader = archive_read_disk_new()) == NULL)
+ lafe_errc(1, 0, "Cannot create read_disk object");
+ archive_read_disk_set_standard_lookup(bsdtar->diskreader);
+
+ if (bsdtar->names_from_file != NULL)
+ archive_names_from_file(bsdtar, a);
+
+ while (*bsdtar->argv) {
+ arg = *bsdtar->argv;
+ if (arg[0] == '-' && arg[1] == 'C') {
+ arg += 2;
+ if (*arg == '\0') {
+ bsdtar->argv++;
+ arg = *bsdtar->argv;
+ if (arg == NULL) {
+ lafe_warnc(0, "%s",
+ "Missing argument for -C");
+ bsdtar->return_value = 1;
+ goto cleanup;
+ }
+ }
+ set_chdir(bsdtar, arg);
+ } else {
+ if (*arg != '/' && (arg[0] != '@' || arg[1] != '/'))
+ do_chdir(bsdtar); /* Handle a deferred -C */
+ if (*arg == '@') {
+ if (append_archive_filename(bsdtar, a,
+ arg + 1) != 0)
+ break;
+ } else
+ write_hierarchy(bsdtar, a, arg);
+ }
+ bsdtar->argv++;
+ }
+
+ entry = NULL;
+ archive_entry_linkify(bsdtar->resolver, &entry, &sparse_entry);
+ while (entry != NULL) {
+ write_entry_backend(bsdtar, a, entry);
+ archive_entry_free(entry);
+ entry = NULL;
+ archive_entry_linkify(bsdtar->resolver, &entry, &sparse_entry);
+ }
+
+ if (archive_write_close(a)) {
+ lafe_warnc(0, "%s", archive_error_string(a));
+ bsdtar->return_value = 1;
+ }
+
+cleanup:
+ /* Free file data buffer. */
+ free(bsdtar->buff);
+ archive_entry_linkresolver_free(bsdtar->resolver);
+ bsdtar->resolver = NULL;
+ archive_read_finish(bsdtar->diskreader);
+ bsdtar->diskreader = NULL;
+
+ if (bsdtar->option_totals) {
+ fprintf(stderr, "Total bytes written: %s\n",
+ tar_i64toa(archive_position_compressed(a)));
+ }
+
+ archive_write_finish(a);
+}
+
+/*
+ * Archive names specified in file.
+ *
+ * Unless --null was specified, a line containing exactly "-C" will
+ * cause the next line to be a directory to pass to chdir(). If
+ * --null is specified, then a line "-C" is just another filename.
+ */
+static void
+archive_names_from_file(struct bsdtar *bsdtar, struct archive *a)
+{
+ struct lafe_line_reader *lr;
+ const char *line;
+
+ bsdtar->next_line_is_dir = 0;
+
+ lr = lafe_line_reader(bsdtar->names_from_file, bsdtar->option_null);
+ while ((line = lafe_line_reader_next(lr)) != NULL) {
+ if (bsdtar->next_line_is_dir) {
+ set_chdir(bsdtar, line);
+ bsdtar->next_line_is_dir = 0;
+ } else if (!bsdtar->option_null && strcmp(line, "-C") == 0)
+ bsdtar->next_line_is_dir = 1;
+ else {
+ if (*line != '/')
+ do_chdir(bsdtar); /* Handle a deferred -C */
+ write_hierarchy(bsdtar, a, line);
+ }
+ }
+ lafe_line_reader_free(lr);
+ if (bsdtar->next_line_is_dir)
+ lafe_errc(1, errno,
+ "Unexpected end of filename list; "
+ "directory expected after -C");
+}
+
+/*
+ * Copy from specified archive to current archive. Returns non-zero
+ * for write errors (which force us to terminate the entire archiving
+ * operation). If there are errors reading the input archive, we set
+ * bsdtar->return_value but return zero, so the overall archiving
+ * operation will complete and return non-zero.
+ */
+static int
+append_archive_filename(struct bsdtar *bsdtar, struct archive *a,
+ const char *filename)
+{
+ struct archive *ina;
+ int rc;
+
+ if (strcmp(filename, "-") == 0)
+ filename = NULL; /* Library uses NULL for stdio. */
+
+ ina = archive_read_new();
+ archive_read_support_format_all(ina);
+ archive_read_support_compression_all(ina);
+ if (archive_read_open_file(ina, filename, 10240)) {
+ lafe_warnc(0, "%s", archive_error_string(ina));
+ bsdtar->return_value = 1;
+ return (0);
+ }
+
+ rc = append_archive(bsdtar, a, ina);
+
+ if (rc != ARCHIVE_OK) {
+ lafe_warnc(0, "Error reading archive %s: %s",
+ filename, archive_error_string(ina));
+ bsdtar->return_value = 1;
+ }
+ archive_read_finish(ina);
+
+ return (rc);
+}
+
+static int
+append_archive(struct bsdtar *bsdtar, struct archive *a, struct archive *ina)
+{
+ struct archive_entry *in_entry;
+ int e;
+
+ while (ARCHIVE_OK == (e = archive_read_next_header(ina, &in_entry))) {
+ if (!new_enough(bsdtar, archive_entry_pathname(in_entry),
+ archive_entry_stat(in_entry)))
+ continue;
+ if (lafe_excluded(bsdtar->matching, archive_entry_pathname(in_entry)))
+ continue;
+ if (bsdtar->option_interactive &&
+ !yes("copy '%s'", archive_entry_pathname(in_entry)))
+ continue;
+ if (bsdtar->verbose)
+ safe_fprintf(stderr, "a %s",
+ archive_entry_pathname(in_entry));
+ if (need_report())
+ report_write(bsdtar, a, in_entry, 0);
+
+ e = archive_write_header(a, in_entry);
+ if (e != ARCHIVE_OK) {
+ if (!bsdtar->verbose)
+ lafe_warnc(0, "%s: %s",
+ archive_entry_pathname(in_entry),
+ archive_error_string(a));
+ else
+ fprintf(stderr, ": %s", archive_error_string(a));
+ }
+ if (e == ARCHIVE_FATAL)
+ exit(1);
+
+ if (e >= ARCHIVE_WARN) {
+ if (archive_entry_size(in_entry) == 0)
+ archive_read_data_skip(ina);
+ else if (copy_file_data(bsdtar, a, ina, in_entry))
+ exit(1);
+ }
+
+ if (bsdtar->verbose)
+ fprintf(stderr, "\n");
+ }
+
+ return (e == ARCHIVE_EOF ? ARCHIVE_OK : e);
+}
+
+/* Helper function to copy data between archives. */
+static int
+copy_file_data(struct bsdtar *bsdtar, struct archive *a,
+ struct archive *ina, struct archive_entry *entry)
+{
+ ssize_t bytes_read;
+ ssize_t bytes_written;
+ int64_t progress = 0;
+
+ bytes_read = archive_read_data(ina, bsdtar->buff, FILEDATABUFLEN);
+ while (bytes_read > 0) {
+ if (need_report())
+ report_write(bsdtar, a, entry, progress);
+
+ bytes_written = archive_write_data(a, bsdtar->buff,
+ bytes_read);
+ if (bytes_written < bytes_read) {
+ lafe_warnc(0, "%s", archive_error_string(a));
+ return (-1);
+ }
+ progress += bytes_written;
+ bytes_read = archive_read_data(ina, bsdtar->buff,
+ FILEDATABUFLEN);
+ }
+
+ return (0);
+}
+
+/*
+ * Add the file or dir hierarchy named by 'path' to the archive
+ */
+static void
+write_hierarchy(struct bsdtar *bsdtar, struct archive *a, const char *path)
+{
+ struct archive_entry *entry = NULL, *spare_entry = NULL;
+ struct tree *tree;
+ char symlink_mode = bsdtar->symlink_mode;
+ dev_t first_dev = 0;
+ int dev_recorded = 0;
+ int tree_ret;
+
+ tree = tree_open(path);
+
+ if (!tree) {
+ lafe_warnc(errno, "%s: Cannot open", path);
+ bsdtar->return_value = 1;
+ return;
+ }
+
+ while ((tree_ret = tree_next(tree)) != 0) {
+ int r;
+ const char *name = tree_current_path(tree);
+ const struct stat *st = NULL; /* info to use for this entry */
+ const struct stat *lst = NULL; /* lstat() information */
+ int descend;
+
+ if (tree_ret == TREE_ERROR_FATAL)
+ lafe_errc(1, tree_errno(tree),
+ "%s: Unable to continue traversing directory tree",
+ name);
+ if (tree_ret == TREE_ERROR_DIR) {
+ lafe_warnc(errno,
+ "%s: Couldn't visit directory", name);
+ bsdtar->return_value = 1;
+ }
+ if (tree_ret != TREE_REGULAR)
+ continue;
+
+ /*
+ * If this file/dir is excluded by a filename
+ * pattern, skip it.
+ */
+ if (lafe_excluded(bsdtar->matching, name))
+ continue;
+
+ /*
+ * Get lstat() info from the tree library.
+ */
+ lst = tree_current_lstat(tree);
+ if (lst == NULL) {
+ /* Couldn't lstat(); must not exist. */
+ lafe_warnc(errno, "%s: Cannot stat", name);
+ /* Return error if files disappear during traverse. */
+ bsdtar->return_value = 1;
+ continue;
+ }
+
+ /*
+ * Distinguish 'L'/'P'/'H' symlink following.
+ */
+ switch(symlink_mode) {
+ case 'H':
+ /* 'H': After the first item, rest like 'P'. */
+ symlink_mode = 'P';
+ /* 'H': First item (from command line) like 'L'. */
+ /* FALLTHROUGH */
+ case 'L':
+ /* 'L': Do descend through a symlink to dir. */
+ descend = tree_current_is_dir(tree);
+ /* 'L': Follow symlinks to files. */
+ archive_read_disk_set_symlink_logical(bsdtar->diskreader);
+ /* 'L': Archive symlinks as targets, if we can. */
+ st = tree_current_stat(tree);
+ if (st != NULL)
+ break;
+ /* If stat fails, we have a broken symlink;
+ * in that case, don't follow the link. */
+ /* FALLTHROUGH */
+ default:
+ /* 'P': Don't descend through a symlink to dir. */
+ descend = tree_current_is_physical_dir(tree);
+ /* 'P': Don't follow symlinks to files. */
+ archive_read_disk_set_symlink_physical(bsdtar->diskreader);
+ /* 'P': Archive symlinks as symlinks. */
+ st = lst;
+ break;
+ }
+
+ if (bsdtar->option_no_subdirs)
+ descend = 0;
+
+ /*
+ * Are we about to cross to a new filesystem?
+ */
+ if (!dev_recorded) {
+ /* This is the initial file system. */
+ first_dev = lst->st_dev;
+ dev_recorded = 1;
+ } else if (lst->st_dev == first_dev) {
+ /* The starting file system is always acceptable. */
+ } else if (descend == 0) {
+ /* We're not descending, so no need to check. */
+ } else if (bsdtar->option_dont_traverse_mounts) {
+ descend = 0;
+ } else {
+ /* We're prepared to cross a mount point. */
+
+ /* XXX TODO: check whether this filesystem is
+ * synthetic and/or local. Add a new
+ * --local-only option to skip non-local
+ * filesystems. Skip synthetic filesystems
+ * regardless.
+ *
+ * The results should be cached, since
+ * tree.c doesn't usually visit a directory
+ * and the directory contents together. A simple
+ * move-to-front list should perform quite well.
+ *
+ * This is going to be heavily OS dependent:
+ * FreeBSD's statfs() in conjunction with getvfsbyname()
+ * provides all of this; NetBSD's statvfs() does
+ * most of it; other systems will vary.
+ */
+ }
+
+ /*
+ * In -u mode, check that the file is newer than what's
+ * already in the archive; in all modes, obey --newerXXX flags.
+ */
+ if (!new_enough(bsdtar, name, st)) {
+ if (!descend)
+ continue;
+ if (bsdtar->option_interactive &&
+ !yes("add '%s'", name))
+ continue;
+ tree_descend(tree);
+ continue;
+ }
+
+ archive_entry_free(entry);
+ entry = archive_entry_new();
+
+ archive_entry_set_pathname(entry, name);
+ archive_entry_copy_sourcepath(entry,
+ tree_current_access_path(tree));
+
+ /* Populate the archive_entry with metadata from the disk. */
+ /* XXX TODO: Arrange to open a regular file before
+ * calling this so we can pass in an fd and shorten
+ * the race to query metadata. The linkify dance
+ * makes this more complex than it might sound. */
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ /* TODO: tree.c uses stat(), which is badly broken
+ * on Windows. To fix this, we should
+ * deprecate tree_current_stat() and provide a new
+ * call tree_populate_entry(t, entry). This call
+ * would use stat() internally on POSIX and
+ * GetInfoByFileHandle() internally on Windows.
+ * This would be another step towards a tree-walker
+ * that can be integrated deep into libarchive.
+ * For now, just set st to NULL on Windows;
+ * archive_read_disk_entry_from_file() should
+ * be smart enough to use platform-appropriate
+ * ways to probe file information.
+ */
+ st = NULL;
+#endif
+ r = archive_read_disk_entry_from_file(bsdtar->diskreader,
+ entry, -1, st);
+ if (bsdtar->uid >= 0) {
+ archive_entry_set_uid(entry, bsdtar->uid);
+ if (!bsdtar->uname)
+ archive_entry_set_uname(entry,
+ archive_read_disk_uname(bsdtar->diskreader,
+ bsdtar->uid));
+ }
+ if (bsdtar->gid >= 0) {
+ archive_entry_set_gid(entry, bsdtar->gid);
+ if (!bsdtar->gname)
+ archive_entry_set_gname(entry,
+ archive_read_disk_gname(bsdtar->diskreader,
+ bsdtar->gid));
+ }
+ if (bsdtar->uname)
+ archive_entry_set_uname(entry, bsdtar->uname);
+ if (bsdtar->gname)
+ archive_entry_set_gname(entry, bsdtar->gname);
+ if (r != ARCHIVE_OK)
+ lafe_warnc(archive_errno(bsdtar->diskreader),
+ "%s", archive_error_string(bsdtar->diskreader));
+ if (r < ARCHIVE_WARN)
+ continue;
+
+ /* XXX TODO: Just use flag data from entry; avoid the
+ * duplicate check here. */
+
+ /*
+ * If this file/dir is flagged "nodump" and we're
+ * honoring such flags, skip this file/dir.
+ */
+#if defined(HAVE_STRUCT_STAT_ST_FLAGS) && defined(UF_NODUMP)
+ /* BSD systems store flags in struct stat */
+ if (bsdtar->option_honor_nodump &&
+ (lst->st_flags & UF_NODUMP))
+ continue;
+#endif
+
+#if defined(EXT2_IOC_GETFLAGS) && defined(EXT2_NODUMP_FL)
+ /* Linux uses ioctl to read flags. */
+ if (bsdtar->option_honor_nodump) {
+ int fd = open(name, O_RDONLY | O_NONBLOCK | O_BINARY);
+ if (fd >= 0) {
+ unsigned long fflags;
+ int r = ioctl(fd, EXT2_IOC_GETFLAGS, &fflags);
+ close(fd);
+ if (r >= 0 && (fflags & EXT2_NODUMP_FL))
+ continue;
+ }
+ }
+#endif
+
+ /*
+ * If the user vetoes this file/directory, skip it.
+ * We want this to be fairly late; if some other
+ * check would veto this file, we shouldn't bother
+ * the user with it.
+ */
+ if (bsdtar->option_interactive &&
+ !yes("add '%s'", name))
+ continue;
+
+ if (descend)
+ tree_descend(tree);
+
+ /*
+ * Rewrite the pathname to be archived. If rewrite
+ * fails, skip the entry.
+ */
+ if (edit_pathname(bsdtar, entry))
+ continue;
+
+ /* Display entry as we process it.
+ * This format is required by SUSv2. */
+ if (bsdtar->verbose)
+ safe_fprintf(stderr, "a %s",
+ archive_entry_pathname(entry));
+
+ /* Non-regular files get archived with zero size. */
+ if (archive_entry_filetype(entry) != AE_IFREG)
+ archive_entry_set_size(entry, 0);
+
+ archive_entry_linkify(bsdtar->resolver, &entry, &spare_entry);
+
+ while (entry != NULL) {
+ write_entry_backend(bsdtar, a, entry);
+ archive_entry_free(entry);
+ entry = spare_entry;
+ spare_entry = NULL;
+ }
+
+ if (bsdtar->verbose)
+ fprintf(stderr, "\n");
+ }
+ archive_entry_free(entry);
+ tree_close(tree);
+}
+
+/*
+ * Backend for write_entry.
+ */
+static void
+write_entry_backend(struct bsdtar *bsdtar, struct archive *a,
+ struct archive_entry *entry)
+{
+ int fd = -1;
+ int e;
+
+ if (archive_entry_size(entry) > 0) {
+ const char *pathname = archive_entry_sourcepath(entry);
+ fd = open(pathname, O_RDONLY | O_BINARY);
+ if (fd == -1) {
+ bsdtar->return_value = 1;
+ if (!bsdtar->verbose)
+ lafe_warnc(errno,
+ "%s: could not open file", pathname);
+ else
+ fprintf(stderr, ": %s", strerror(errno));
+ return;
+ }
+ }
+
+ e = archive_write_header(a, entry);
+ if (e != ARCHIVE_OK) {
+ if (!bsdtar->verbose)
+ lafe_warnc(0, "%s: %s",
+ archive_entry_pathname(entry),
+ archive_error_string(a));
+ else
+ fprintf(stderr, ": %s", archive_error_string(a));
+ }
+
+ if (e == ARCHIVE_FATAL)
+ exit(1);
+
+ /*
+ * If we opened a file earlier, write it out now. Note that
+ * the format handler might have reset the size field to zero
+ * to inform us that the archive body won't get stored. In
+ * that case, just skip the write.
+ */
+ if (e >= ARCHIVE_WARN && fd >= 0 && archive_entry_size(entry) > 0) {
+ if (write_file_data(bsdtar, a, entry, fd))
+ exit(1);
+ }
+
+ /*
+ * If we opened a file, close it now even if there was an error
+ * which made us decide not to write the archive body.
+ */
+ if (fd >= 0)
+ close(fd);
+}
+
+static void
+report_write(struct bsdtar *bsdtar, struct archive *a,
+ struct archive_entry *entry, int64_t progress)
+{
+ uint64_t comp, uncomp;
+ int compression;
+
+ if (bsdtar->verbose)
+ fprintf(stderr, "\n");
+ comp = archive_position_compressed(a);
+ uncomp = archive_position_uncompressed(a);
+ fprintf(stderr, "In: %d files, %s bytes;",
+ archive_file_count(a), tar_i64toa(uncomp));
+ if (comp > uncomp)
+ compression = 0;
+ else
+ compression = (int)((uncomp - comp) * 100 / uncomp);
+ fprintf(stderr,
+ " Out: %s bytes, compression %d%%\n",
+ tar_i64toa(comp), compression);
+ /* Can't have two calls to tar_i64toa() pending, so split the output. */
+ safe_fprintf(stderr, "Current: %s (%s",
+ archive_entry_pathname(entry),
+ tar_i64toa(progress));
+ fprintf(stderr, "/%s bytes)\n",
+ tar_i64toa(archive_entry_size(entry)));
+}
+
+
+/* Helper function to copy file to archive. */
+static int
+write_file_data(struct bsdtar *bsdtar, struct archive *a,
+ struct archive_entry *entry, int fd)
+{
+ ssize_t bytes_read;
+ ssize_t bytes_written;
+ int64_t progress = 0;
+
+ bytes_read = read(fd, bsdtar->buff, FILEDATABUFLEN);
+ while (bytes_read > 0) {
+ if (need_report())
+ report_write(bsdtar, a, entry, progress);
+
+ bytes_written = archive_write_data(a, bsdtar->buff,
+ bytes_read);
+ if (bytes_written < 0) {
+ /* Write failed; this is bad */
+ lafe_warnc(0, "%s", archive_error_string(a));
+ return (-1);
+ }
+ if (bytes_written < bytes_read) {
+ /* Write was truncated; warn but continue. */
+ lafe_warnc(0,
+ "%s: Truncated write; file may have grown while being archived.",
+ archive_entry_pathname(entry));
+ return (0);
+ }
+ progress += bytes_written;
+ bytes_read = read(fd, bsdtar->buff, FILEDATABUFLEN);
+ }
+ if (bytes_read < 0) {
+ lafe_warnc(errno,
+ "%s: Read error",
+ archive_entry_pathname(entry));
+ bsdtar->return_value = 1;
+ }
+ return 0;
+}
+
+/*
+ * Test if the specified file is new enough to include in the archive.
+ */
+static int
+new_enough(struct bsdtar *bsdtar, const char *path, const struct stat *st)
+{
+ struct archive_dir_entry *p;
+
+ /*
+ * If this file/dir is excluded by a time comparison, skip it.
+ */
+ if (bsdtar->newer_ctime_sec > 0) {
+ if (st->st_ctime < bsdtar->newer_ctime_sec)
+ return (0); /* Too old, skip it. */
+ if (st->st_ctime == bsdtar->newer_ctime_sec
+ && ARCHIVE_STAT_CTIME_NANOS(st)
+ <= bsdtar->newer_ctime_nsec)
+ return (0); /* Too old, skip it. */
+ }
+ if (bsdtar->newer_mtime_sec > 0) {
+ if (st->st_mtime < bsdtar->newer_mtime_sec)
+ return (0); /* Too old, skip it. */
+ if (st->st_mtime == bsdtar->newer_mtime_sec
+ && ARCHIVE_STAT_MTIME_NANOS(st)
+ <= bsdtar->newer_mtime_nsec)
+ return (0); /* Too old, skip it. */
+ }
+
+ /*
+ * In -u mode, we only write an entry if it's newer than
+ * what was already in the archive.
+ */
+ if (bsdtar->archive_dir != NULL &&
+ bsdtar->archive_dir->head != NULL) {
+ for (p = bsdtar->archive_dir->head; p != NULL; p = p->next) {
+ if (pathcmp(path, p->name)==0)
+ return (p->mtime_sec < st->st_mtime ||
+ (p->mtime_sec == st->st_mtime &&
+ p->mtime_nsec
+ < ARCHIVE_STAT_MTIME_NANOS(st)));
+ }
+ }
+
+ /* If the file wasn't rejected, include it. */
+ return (1);
+}
+
+/*
+ * Add an entry to the dir list for 'u' mode.
+ *
+ * XXX TODO: Make this fast.
+ */
+static void
+add_dir_list(struct bsdtar *bsdtar, const char *path,
+ time_t mtime_sec, int mtime_nsec)
+{
+ struct archive_dir_entry *p;
+
+ /*
+ * Search entire list to see if this file has appeared before.
+ * If it has, override the timestamp data.
+ */
+ p = bsdtar->archive_dir->head;
+ while (p != NULL) {
+ if (strcmp(path, p->name)==0) {
+ p->mtime_sec = mtime_sec;
+ p->mtime_nsec = mtime_nsec;
+ return;
+ }
+ p = p->next;
+ }
+
+ p = malloc(sizeof(*p));
+ if (p == NULL)
+ lafe_errc(1, ENOMEM, "Can't read archive directory");
+
+ p->name = strdup(path);
+ if (p->name == NULL)
+ lafe_errc(1, ENOMEM, "Can't read archive directory");
+ p->mtime_sec = mtime_sec;
+ p->mtime_nsec = mtime_nsec;
+ p->next = NULL;
+ if (bsdtar->archive_dir->tail == NULL) {
+ bsdtar->archive_dir->head = bsdtar->archive_dir->tail = p;
+ } else {
+ bsdtar->archive_dir->tail->next = p;
+ bsdtar->archive_dir->tail = p;
+ }
+}
+
+static void
+test_for_append(struct bsdtar *bsdtar)
+{
+ struct stat s;
+
+ if (*bsdtar->argv == NULL && bsdtar->names_from_file == NULL)
+ lafe_errc(1, 0, "no files or directories specified");
+ if (bsdtar->filename == NULL)
+ lafe_errc(1, 0, "Cannot append to stdout.");
+
+ if (bsdtar->create_compression != 0)
+ lafe_errc(1, 0,
+ "Cannot append to %s with compression", bsdtar->filename);
+
+ if (stat(bsdtar->filename, &s) != 0)
+ return;
+
+ if (!S_ISREG(s.st_mode) && !S_ISBLK(s.st_mode))
+ lafe_errc(1, 0,
+ "Cannot append to %s: not a regular file.",
+ bsdtar->filename);
+
+/* Is this an appropriate check here on Windows? */
+/*
+ if (GetFileType(handle) != FILE_TYPE_DISK)
+ lafe_errc(1, 0, "Cannot append");
+*/
+
+}
diff --git a/contrib/libstdc++/ChangeLog b/contrib/libstdc++/ChangeLog
index d915bcf..2236fe9 100644
--- a/contrib/libstdc++/ChangeLog
+++ b/contrib/libstdc++/ChangeLog
@@ -1,3 +1,133 @@
+2008-05-19 Release Manager
+
+ * GCC 4.2.4 released.
+
+2008-03-13 David Edelsohn <edelsohn@gnu.org>
+
+ Backport from mainline:
+ 2008-01-26 David Edelsohn <edelsohn@gnu.org>
+
+ PR target/34794
+ * config/os/aix/os_defines.h: Define __COMPATMATH__.
+
+2008-02-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * testsuite/27_io/fpos/14320-1.cc: Check for "long long" and
+ remove XFAIL.
+
+2008-02-01 Release Manager
+
+ * GCC 4.2.3 released.
+
+2008-01-06 Ted Phelps <phelps@gnusto.com>
+
+ PR c++/34152
+ * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Check
+ _GLIBCXX_HAVE_GETIPINFO instead of HAVE_GETIPINFO.
+
+2008-01-05 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/34680
+
+ Revert:
+ 2007-12-17 Jonathan Wakely <jwakely.gcc@gmail.com>
+ * include/bits/locale_facets.tcc (has_facet, use_facet): Simplify
+ RTTI checks.
+
+ 2007-12-14 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/30127
+ PR libstdc++/34449
+ * include/bits/locale_facets.tcc (use_facet): Check facet hierarchy.
+ (has_facet): Same.
+ * testsuite/22_locale/global_templates/user_facet_hierarchies.cc: New.
+ * testsuite/22_locale/global_templates/
+ standard_facet_hierarchies.cc: New.
+
+2007-12-17 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * include/bits/locale_facets.tcc (has_facet, use_facet): Simplify
+ RTTI checks.
+
+2007-12-17 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/22_locale/global_templates/
+ standard_facet_hierarchies.cc: Fix for generic locale model.
+
+2007-12-14 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/30127
+ PR libstdc++/34449
+ * include/bits/locale_facets.tcc (use_facet): Check facet hierarchy.
+ (has_facet): Same.
+ * testsuite/22_locale/global_templates/user_facet_hierarchies.cc: New.
+ * testsuite/22_locale/global_templates/
+ standard_facet_hierarchies.cc: New.
+
+2007-11-26 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (num_put<>::_M_insert_int): When
+ ios_base::showpos and the type is signed and the value is zero,
+ prepend +.
+ * testsuite/22_locale/num_put/put/char/12.cc: New.
+ * testsuite/22_locale/num_put/put/wchar_t/12.cc: Likewise.
+
+2007-10-20 Paolo Carlini <pcarlini@suse.de>
+
+ * include/tr1/random
+ (uniform_int<>::_M_call(_UniformRandomNumberGenerator&, result_type,
+ result_type, true_type)): Fix small thinko.
+
+2007-10-19 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/33815
+ * include/tr1/random
+ (uniform_int<>::_M_call(_UniformRandomNumberGenerator&, result_type,
+ result_type, true_type)): Avoid the modulo (which uses the low-order
+ bits).
+
+2007-10-18 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/33807
+ * include/bits/allocator.h (operator==(const allocator<_Tp>&,
+ const allocator<_Tp>&), operator!=(const allocator<_Tp>&,
+ const allocator<_Tp>&)): Add.
+ * testsuite/20_util/memory/allocator/33807.cc: New.
+
+2007-10-14 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * docs/html/Makefile: Follow up to libstdc++/14991, remove target.
+
+2007-10-14 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * src/valarray-inst.cc, include/ext/atomicity.h,
+ include/ext/concurrence.h, include/bits/basic_string.h,
+ include/bits/fstream.tcc, include/ext/vstring.h: Fix comment typos.
+
+2007-10-14 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * include/tr1_impl/boost_shared_ptr.h: (__weak_ptr::lock()): Add
+ missing template argument.
+ * testsuite/tr1/2_general_utilities/memory/shared_ptr/
+ explicit_instantiation/2.cc: New.
+ * testsuite/tr1/2_general_utilities/memory/weak_ptr/
+ explicit_instantiation/2.cc: New.
+
+2007-10-11 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/33734
+ * include/ext/codecvt_specializations.h (encoding_state::good,
+ init, destroy): Use cast notation instead of reinterpret_cast.
+
+2007-10-07 Release Manager
+
+ * GCC 4.2.2 released.
+
+2007-10-06 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/33678
+ * libsupc++/typeinfo (typeinfo): Revert ordering of virtual components.
+
2007-08-28 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/33128
diff --git a/contrib/libstdc++/config/os/aix/os_defines.h b/contrib/libstdc++/config/os/aix/os_defines.h
index 8f1f813..2aa9f7f 100644
--- a/contrib/libstdc++/config/os/aix/os_defines.h
+++ b/contrib/libstdc++/config/os/aix/os_defines.h
@@ -1,6 +1,6 @@
// Specific definitions for AIX -*- C++ -*-
-// Copyright (C) 2000, 2002, 2005 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2002, 2005, 2008 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -48,4 +48,9 @@
#define _ALL_SOURCE
#endif
+// C99 math
+#ifndef __COMPATMATH__
+#define __COMPATMATH__
+#endif
+
#endif
diff --git a/contrib/libstdc++/include/bits/allocator.h b/contrib/libstdc++/include/bits/allocator.h
index 43939c1..4d62c0a 100644
--- a/contrib/libstdc++/include/bits/allocator.h
+++ b/contrib/libstdc++/include/bits/allocator.h
@@ -115,11 +115,21 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
operator==(const allocator<_T1>&, const allocator<_T2>&)
{ return true; }
+ template<typename _Tp>
+ inline bool
+ operator==(const allocator<_Tp>&, const allocator<_Tp>&)
+ { return true; }
+
template<typename _T1, typename _T2>
inline bool
operator!=(const allocator<_T1>&, const allocator<_T2>&)
{ return false; }
+ template<typename _Tp>
+ inline bool
+ operator!=(const allocator<_Tp>&, const allocator<_Tp>&)
+ { return false; }
+
// Inhibit implicit instantiations for required instantiations,
// which are defined via explicit instantiations elsewhere.
// NB: This syntax is a GNU extension.
diff --git a/contrib/libstdc++/include/bits/basic_string.h b/contrib/libstdc++/include/bits/basic_string.h
index e4b7a5b..dba1f56 100644
--- a/contrib/libstdc++/include/bits/basic_string.h
+++ b/contrib/libstdc++/include/bits/basic_string.h
@@ -1672,7 +1672,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @brief Find position of a character of C substring.
* @param s String containing characters to locate.
- * @param pos Index of character to search from (default 0).
+ * @param pos Index of character to search from.
* @param n Number of characters from s to search for.
* @return Index of first occurrence.
*
@@ -1733,7 +1733,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @brief Find last position of a character of C substring.
* @param s C string containing characters to locate.
- * @param pos Index of character to search back from (default end).
+ * @param pos Index of character to search back from.
* @param n Number of characters from s to search for.
* @return Index of last occurrence.
*
@@ -1764,7 +1764,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @brief Find last position of a character.
* @param c Character to locate.
- * @param pos Index of character to search back from (default 0).
+ * @param pos Index of character to search back from (default end).
* @return Index of last occurrence.
*
* Starting from @a pos, searches backward for @a c within this string.
@@ -1794,7 +1794,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @brief Find position of a character not in C substring.
* @param s C string containing characters to avoid.
- * @param pos Index of character to search from (default 0).
+ * @param pos Index of character to search from.
* @param n Number of characters from s to consider.
* @return Index of first occurrence.
*
@@ -1839,8 +1839,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @brief Find last position of a character not in string.
* @param str String containing characters to avoid.
- * @param pos Index of character to search from (default 0).
- * @return Index of first occurrence.
+ * @param pos Index of character to search back from (default end).
+ * @return Index of last occurrence.
*
* Starting from @a pos, searches backward for a character not
* contained in @a str within this string. If found, returns the index
@@ -1853,9 +1853,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @brief Find last position of a character not in C substring.
* @param s C string containing characters to avoid.
- * @param pos Index of character to search from (default 0).
+ * @param pos Index of character to search back from.
* @param n Number of characters from s to consider.
- * @return Index of first occurrence.
+ * @return Index of last occurrence.
*
* Starting from @a pos, searches backward for a character not
* contained in the first @a n characters of @a s within this string.
@@ -1866,10 +1866,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
find_last_not_of(const _CharT* __s, size_type __pos,
size_type __n) const;
/**
- * @brief Find position of a character not in C string.
+ * @brief Find last position of a character not in C string.
* @param s C string containing characters to avoid.
- * @param pos Index of character to search from (default 0).
- * @return Index of first occurrence.
+ * @param pos Index of character to search back from (default end).
+ * @return Index of last occurrence.
*
* Starting from @a pos, searches backward for a character not
* contained in @a s within this string. If found, returns the index
@@ -1885,8 +1885,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @brief Find last position of a different character.
* @param c Character to avoid.
- * @param pos Index of character to search from (default 0).
- * @return Index of first occurrence.
+ * @param pos Index of character to search back from (default end).
+ * @return Index of last occurrence.
*
* Starting from @a pos, searches backward for a character other than
* @a c within this string. If found, returns the index where it was
diff --git a/contrib/libstdc++/include/bits/fstream.tcc b/contrib/libstdc++/include/bits/fstream.tcc
index 5520f9b..ea097c6 100644
--- a/contrib/libstdc++/include/bits/fstream.tcc
+++ b/contrib/libstdc++/include/bits/fstream.tcc
@@ -194,7 +194,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
const bool __testin = _M_mode & ios_base::in;
if (__testin && !_M_writing)
{
- // Check for pback madness, and if so swich back to the
+ // Check for pback madness, and if so switch back to the
// normal buffers and jet outta here before expensive
// fileops happen...
_M_destroy_pback();
diff --git a/contrib/libstdc++/include/bits/locale_facets.tcc b/contrib/libstdc++/include/bits/locale_facets.tcc
index d3c47ff..8f62e19 100644
--- a/contrib/libstdc++/include/bits/locale_facets.tcc
+++ b/contrib/libstdc++/include/bits/locale_facets.tcc
@@ -1,6 +1,7 @@
// Locale support -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -117,6 +118,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
return static_cast<const _Facet&>(*__facets[__i]);
}
+
// Routine to access a cache for the facet. If the cache didn't
// exist before, it gets constructed on the fly.
template<typename _Facet>
@@ -1015,13 +1017,13 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE
if (__builtin_expect(__dec, true))
{
// Decimal.
- if (__v > 0)
+ if (__v >= 0)
{
if (__flags & ios_base::showpos
&& numeric_limits<_ValueT>::is_signed)
*--__cs = __lit[__num_base::_S_oplus], ++__len;
}
- else if (__v)
+ else
*--__cs = __lit[__num_base::_S_ominus], ++__len;
}
else if (__flags & ios_base::showbase && __v)
diff --git a/contrib/libstdc++/include/ext/atomicity.h b/contrib/libstdc++/include/ext/atomicity.h
index 975121e..05bac1f 100644
--- a/contrib/libstdc++/include/ext/atomicity.h
+++ b/contrib/libstdc++/include/ext/atomicity.h
@@ -42,7 +42,7 @@
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
// Functions for portable atomic access.
- // To abstract locking primatives across all thread policies, use:
+ // To abstract locking primitives across all thread policies, use:
// __exchange_and_add_dispatch
// __atomic_add_dispatch
#ifdef _GLIBCXX_ATOMIC_BUILTINS
diff --git a/contrib/libstdc++/include/ext/codecvt_specializations.h b/contrib/libstdc++/include/ext/codecvt_specializations.h
index f0a6bbe..3973d32 100644
--- a/contrib/libstdc++/include/ext/codecvt_specializations.h
+++ b/contrib/libstdc++/include/ext/codecvt_specializations.h
@@ -128,7 +128,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
bool
good() const throw()
{
- const descriptor_type __err = reinterpret_cast<iconv_t>(-1);
+ const descriptor_type __err = (iconv_t)(-1);
bool __test = _M_in_desc && _M_in_desc != __err;
__test &= _M_out_desc && _M_out_desc != __err;
return __test;
@@ -166,7 +166,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
void
init()
{
- const descriptor_type __err = reinterpret_cast<iconv_t>(-1);
+ const descriptor_type __err = (iconv_t)(-1);
const bool __have_encodings = _M_int_enc.size() && _M_ext_enc.size();
if (!_M_in_desc && __have_encodings)
{
@@ -199,7 +199,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
void
destroy() throw()
{
- const descriptor_type __err = reinterpret_cast<iconv_t>(-1);
+ const descriptor_type __err = (iconv_t)(-1);
if (_M_in_desc && _M_in_desc != __err)
{
iconv_close(_M_in_desc);
diff --git a/contrib/libstdc++/include/ext/concurrence.h b/contrib/libstdc++/include/ext/concurrence.h
index 56e07de..31c3ce6 100644
--- a/contrib/libstdc++/include/ext/concurrence.h
+++ b/contrib/libstdc++/include/ext/concurrence.h
@@ -46,7 +46,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
// Available locking policies:
// _S_single single-threaded code that doesn't need to be locked.
// _S_mutex multi-threaded code that requires additional support
- // from gthr.h or abstraction layers in concurrance.h.
+ // from gthr.h or abstraction layers in concurrence.h.
// _S_atomic multi-threaded code using atomic operations.
enum _Lock_policy { _S_single, _S_mutex, _S_atomic };
diff --git a/contrib/libstdc++/include/ext/vstring.h b/contrib/libstdc++/include/ext/vstring.h
index 79265b9..38a2c9f 100644
--- a/contrib/libstdc++/include/ext/vstring.h
+++ b/contrib/libstdc++/include/ext/vstring.h
@@ -1407,7 +1407,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
/**
* @brief Find position of a character of C substring.
* @param s String containing characters to locate.
- * @param pos Index of character to search from (default 0).
+ * @param pos Index of character to search from.
* @param n Number of characters from s to search for.
* @return Index of first occurrence.
*
@@ -1468,7 +1468,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
/**
* @brief Find last position of a character of C substring.
* @param s C string containing characters to locate.
- * @param pos Index of character to search back from (default end).
+ * @param pos Index of character to search back from.
* @param n Number of characters from s to search for.
* @return Index of last occurrence.
*
@@ -1499,7 +1499,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
/**
* @brief Find last position of a character.
* @param c Character to locate.
- * @param pos Index of character to search back from (default 0).
+ * @param pos Index of character to search back from (default end).
* @return Index of last occurrence.
*
* Starting from @a pos, searches backward for @a c within this string.
@@ -1529,7 +1529,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
/**
* @brief Find position of a character not in C substring.
* @param s C string containing characters to avoid.
- * @param pos Index of character to search from (default 0).
+ * @param pos Index of character to search from.
* @param n Number of characters from s to consider.
* @return Index of first occurrence.
*
@@ -1574,8 +1574,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
/**
* @brief Find last position of a character not in string.
* @param str String containing characters to avoid.
- * @param pos Index of character to search from (default 0).
- * @return Index of first occurrence.
+ * @param pos Index of character to search back from (default end).
+ * @return Index of last occurrence.
*
* Starting from @a pos, searches backward for a character not
* contained in @a str within this string. If found, returns the index
@@ -1589,9 +1589,9 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
/**
* @brief Find last position of a character not in C substring.
* @param s C string containing characters to avoid.
- * @param pos Index of character to search from (default 0).
+ * @param pos Index of character to search back from.
* @param n Number of characters from s to consider.
- * @return Index of first occurrence.
+ * @return Index of last occurrence.
*
* Starting from @a pos, searches backward for a character not
* contained in the first @a n characters of @a s within this string.
@@ -1602,10 +1602,10 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
find_last_not_of(const _CharT* __s, size_type __pos,
size_type __n) const;
/**
- * @brief Find position of a character not in C string.
+ * @brief Find last position of a character not in C string.
* @param s C string containing characters to avoid.
- * @param pos Index of character to search from (default 0).
- * @return Index of first occurrence.
+ * @param pos Index of character to search back from (default end).
+ * @return Index of last occurrence.
*
* Starting from @a pos, searches backward for a character not
* contained in @a s within this string. If found, returns the index
@@ -1621,8 +1621,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
/**
* @brief Find last position of a different character.
* @param c Character to avoid.
- * @param pos Index of character to search from (default 0).
- * @return Index of first occurrence.
+ * @param pos Index of character to search back from (default end).
+ * @return Index of last occurrence.
*
* Starting from @a pos, searches backward for a character other than
* @a c within this string. If found, returns the index where it was
diff --git a/contrib/libstdc++/include/tr1/boost_shared_ptr.h b/contrib/libstdc++/include/tr1/boost_shared_ptr.h
index fc79cfc..d83bde6 100644
--- a/contrib/libstdc++/include/tr1/boost_shared_ptr.h
+++ b/contrib/libstdc++/include/tr1/boost_shared_ptr.h
@@ -857,7 +857,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
// Q: How can we get here?
// A: Another thread may have invalidated r after the
// use_count test above.
- return __shared_ptr<element_type>();
+ return __shared_ptr<element_type, _Lp>();
}
#else
diff --git a/contrib/libstdc++/include/tr1/random b/contrib/libstdc++/include/tr1/random
index c97f16d..492adfd 100644
--- a/contrib/libstdc++/include/tr1/random
+++ b/contrib/libstdc++/include/tr1/random
@@ -1618,10 +1618,15 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
result_type
_M_call(_UniformRandomNumberGenerator& __urng,
result_type __min, result_type __max, true_type)
- {
+ {
+ // XXX Must be fixed to also work when __urng.max() - __urng.min()
+ // is smaller than __max - __min.
typedef typename __gnu_cxx::__add_unsigned<typename
_UniformRandomNumberGenerator::result_type>::__type __utype;
- return result_type(__utype(__urng()) % (__max - __min + 1)) + __min;
+ return result_type((__max - __min + 1.0L)
+ * (__utype(__urng()) - __utype(__urng.min()))
+ / (__utype(__urng.max())
+ - __utype(__urng.min()) + 1.0L)) + __min;
}
template<typename _UniformRandomNumberGenerator>
diff --git a/contrib/libstdc++/libsupc++/eh_personality.cc b/contrib/libstdc++/libsupc++/eh_personality.cc
index 5fd25f2..12bba96 100644
--- a/contrib/libstdc++/libsupc++/eh_personality.cc
+++ b/contrib/libstdc++/libsupc++/eh_personality.cc
@@ -1,5 +1,5 @@
// -*- C++ -*- The GNU C++ exception personality routine.
-// Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2006, 2008 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -434,7 +434,7 @@ PERSONALITY_FUNCTION (int version,
// Parse the LSDA header.
p = parse_lsda_header (context, language_specific_data, &info);
info.ttype_base = base_of_encoded_value (info.ttype_encoding, context);
-#ifdef HAVE_GETIPINFO
+#ifdef _GLIBCXX_HAVE_GETIPINFO
ip = _Unwind_GetIPInfo (context, &ip_before_insn);
#else
ip = _Unwind_GetIP (context);
diff --git a/contrib/libstdc++/libsupc++/typeinfo b/contrib/libstdc++/libsupc++/typeinfo
index 90ac18a..cddb65e 100644
--- a/contrib/libstdc++/libsupc++/typeinfo
+++ b/contrib/libstdc++/libsupc++/typeinfo
@@ -99,7 +99,13 @@ namespace std
#endif
bool operator!=(const type_info& __arg) const
{ return !operator==(__arg); }
-
+
+ // Return true if this is a pointer type of some kind
+ virtual bool __is_pointer_p() const;
+
+ // Return true if this is a function type
+ virtual bool __is_function_p() const;
+
// Try and catch a thrown type. Store an adjusted pointer to the
// caught type in THR_OBJ. If THR_TYPE is not a pointer type, then
// THR_OBJ points to the thrown object. If THR_TYPE is a pointer
@@ -113,12 +119,6 @@ namespace std
virtual bool __do_upcast(const __cxxabiv1::__class_type_info *__target,
void **__obj_ptr) const;
- // Return true if this is a pointer type of some kind
- virtual bool __is_pointer_p() const;
-
- // Return true if this is a function type
- virtual bool __is_function_p() const;
-
protected:
const char *__name;
diff --git a/contrib/libstdc++/src/valarray-inst.cc b/contrib/libstdc++/src/valarray-inst.cc
index c13e1a2..e63c52f 100644
--- a/contrib/libstdc++/src/valarray-inst.cc
+++ b/contrib/libstdc++/src/valarray-inst.cc
@@ -68,7 +68,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__gslice_to_index(size_t __o, const valarray<size_t>& __l,
const valarray<size_t>& __s, valarray<size_t>& __i)
{
- // There are as much as dimensions as there are strides.
+ // There are as many dimensions as there are strides.
size_t __n = __l.size();
// Get a buffer to hold current multi-index as we go through
diff --git a/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
index 88b7524..6fe476d 100644
--- a/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ b/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
@@ -527,18 +527,20 @@ bool CompileUnit::addConstantValue(DIE *Die, const ConstantInt *CI,
// Get the raw data form of the large APInt.
const APInt Val = CI->getValue();
- const char *Ptr = (const char*)Val.getRawData();
+ const uint64_t *Ptr64 = Val.getRawData();
int NumBytes = Val.getBitWidth() / 8; // 8 bits per byte.
bool LittleEndian = Asm->getTargetData().isLittleEndian();
- int Incr = (LittleEndian ? 1 : -1);
- int Start = (LittleEndian ? 0 : NumBytes - 1);
- int Stop = (LittleEndian ? NumBytes : -1);
// Output the constant to DWARF one byte at a time.
- for (; Start != Stop; Start += Incr)
- addUInt(Block, 0, dwarf::DW_FORM_data1,
- (unsigned char)0xFF & Ptr[Start]);
+ for (int i = 0; i < NumBytes; i++) {
+ uint8_t c;
+ if (LittleEndian)
+ c = Ptr64[i / 8] >> (8 * (i & 7));
+ else
+ c = Ptr64[(NumBytes - 1 - i) / 8] >> (8 * ((NumBytes - 1 - i) & 7));
+ addUInt(Block, 0, dwarf::DW_FORM_data1, c);
+ }
addBlock(Die, dwarf::DW_AT_const_value, 0, Block);
return true;
diff --git a/contrib/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/contrib/llvm/lib/CodeGen/LLVMTargetMachine.cpp
index 80ecc22..187147a 100644
--- a/contrib/llvm/lib/CodeGen/LLVMTargetMachine.cpp
+++ b/contrib/llvm/lib/CodeGen/LLVMTargetMachine.cpp
@@ -119,7 +119,8 @@ LLVMTargetMachine::LLVMTargetMachine(const Target &T, StringRef Triple,
// we'll crash later.
// Provide the user with a useful error message about what's wrong.
assert(AsmInfo && "MCAsmInfo not initialized."
- "Make sure you include the correct TargetSelect.h!");
+ "Make sure you include the correct TargetSelect.h"
+ "and that InitializeAllTargetMCs() is being invoked!");
}
bool LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM,
diff --git a/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index 7ed46a6..095b400 100644
--- a/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -2034,14 +2034,17 @@ bool SelectionDAGBuilder::handleJTSwitchCase(CaseRec &CR,
return false;
APInt Range = ComputeRange(First, Last);
- double Density = TSize.roundToDouble() / Range.roundToDouble();
- if (Density < 0.4)
+ // The density is TSize / Range. Require at least 40%.
+ // It should not be possible for IntTSize to saturate for sane code, but make
+ // sure we handle Range saturation correctly.
+ uint64_t IntRange = Range.getLimitedValue(UINT64_MAX/10);
+ uint64_t IntTSize = TSize.getLimitedValue(UINT64_MAX/10);
+ if (IntTSize * 10 < IntRange * 4)
return false;
DEBUG(dbgs() << "Lowering jump table\n"
<< "First entry: " << First << ". Last entry: " << Last << '\n'
- << "Range: " << Range
- << ". Size: " << TSize << ". Density: " << Density << "\n\n");
+ << "Range: " << Range << ". Size: " << TSize << ".\n\n");
// Get the MachineFunction which holds the current MBB. This is used when
// inserting any additional MBBs necessary to represent the switch.
diff --git a/contrib/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/contrib/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
index fb87154..3848f4d 100644
--- a/contrib/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ b/contrib/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
@@ -506,7 +506,9 @@ getExprForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang,
// Add information about the stub reference to MachOMMI so that the stub
// gets emitted by the asmprinter.
MCSymbol *SSym = getContext().GetOrCreateSymbol(Name.str());
- MachineModuleInfoImpl::StubValueTy &StubSym = MachOMMI.getGVStubEntry(SSym);
+ MachineModuleInfoImpl::StubValueTy &StubSym =
+ GV->hasHiddenVisibility() ? MachOMMI.getHiddenGVStubEntry(SSym) :
+ MachOMMI.getGVStubEntry(SSym);
if (StubSym.getPointer() == 0) {
MCSymbol *Sym = Mang->getSymbol(GV);
StubSym = MachineModuleInfoImpl::StubValueTy(Sym, !GV->hasLocalLinkage());
@@ -534,7 +536,9 @@ getCFIPersonalitySymbol(const GlobalValue *GV, Mangler *Mang,
// Add information about the stub reference to MachOMMI so that the stub
// gets emitted by the asmprinter.
MCSymbol *SSym = getContext().GetOrCreateSymbol(Name.str());
- MachineModuleInfoImpl::StubValueTy &StubSym = MachOMMI.getGVStubEntry(SSym);
+ MachineModuleInfoImpl::StubValueTy &StubSym =
+ GV->hasHiddenVisibility() ? MachOMMI.getHiddenGVStubEntry(SSym) :
+ MachOMMI.getGVStubEntry(SSym);
if (StubSym.getPointer() == 0) {
MCSymbol *Sym = Mang->getSymbol(GV);
StubSym = MachineModuleInfoImpl::StubValueTy(Sym, !GV->hasLocalLinkage());
diff --git a/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp b/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp
index 7c42342..154f1f8 100644
--- a/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp
+++ b/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp
@@ -63,6 +63,13 @@ ARMBaseRegisterInfo::ARMBaseRegisterInfo(const ARMBaseInstrInfo &tii,
const unsigned*
ARMBaseRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const {
+ bool ghcCall = false;
+
+ if (MF) {
+ const Function *F = MF->getFunction();
+ ghcCall = (F ? F->getCallingConv() == CallingConv::GHC : false);
+ }
+
static const unsigned CalleeSavedRegs[] = {
ARM::LR, ARM::R11, ARM::R10, ARM::R9, ARM::R8,
ARM::R7, ARM::R6, ARM::R5, ARM::R4,
@@ -82,7 +89,13 @@ ARMBaseRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const {
ARM::D11, ARM::D10, ARM::D9, ARM::D8,
0
};
- return STI.isTargetDarwin() ? DarwinCalleeSavedRegs : CalleeSavedRegs;
+
+ static const unsigned GhcCalleeSavedRegs[] = {
+ 0
+ };
+
+ return ghcCall ? GhcCalleeSavedRegs :
+ STI.isTargetDarwin() ? DarwinCalleeSavedRegs : CalleeSavedRegs;
}
BitVector ARMBaseRegisterInfo::
diff --git a/contrib/llvm/lib/Target/ARM/ARMCallingConv.td b/contrib/llvm/lib/Target/ARM/ARMCallingConv.td
index d2981c0..47b2e98 100644
--- a/contrib/llvm/lib/Target/ARM/ARMCallingConv.td
+++ b/contrib/llvm/lib/Target/ARM/ARMCallingConv.td
@@ -82,6 +82,25 @@ def RetFastCC_ARM_APCS : CallingConv<[
CCDelegateTo<RetCC_ARM_APCS>
]>;
+//===----------------------------------------------------------------------===//
+// ARM APCS Calling Convention for GHC
+//===----------------------------------------------------------------------===//
+
+def CC_ARM_APCS_GHC : CallingConv<[
+ // Handle all vector types as either f64 or v2f64.
+ CCIfType<[v1i64, v2i32, v4i16, v8i8, v2f32], CCBitConvertToType<f64>>,
+ CCIfType<[v2i64, v4i32, v8i16, v16i8, v4f32], CCBitConvertToType<v2f64>>,
+
+ CCIfType<[v2f64], CCAssignToReg<[Q4, Q5]>>,
+ CCIfType<[f64], CCAssignToReg<[D8, D9, D10, D11]>>,
+ CCIfType<[f32], CCAssignToReg<[S16, S17, S18, S19, S20, S21, S22, S23]>>,
+
+ // Promote i8/i16 arguments to i32.
+ CCIfType<[i8, i16], CCPromoteToType<i32>>,
+
+ // Pass in STG registers: Base, Sp, Hp, R1, R2, R3, R4, SpLim
+ CCIfType<[i32], CCAssignToReg<[R4, R5, R6, R7, R8, R9, R10, R11]>>
+]>;
//===----------------------------------------------------------------------===//
// ARM AAPCS (EABI) Calling Convention, common parts
diff --git a/contrib/llvm/lib/Target/ARM/ARMFastISel.cpp b/contrib/llvm/lib/Target/ARM/ARMFastISel.cpp
index 9bc7ef2..dc8e54d 100644
--- a/contrib/llvm/lib/Target/ARM/ARMFastISel.cpp
+++ b/contrib/llvm/lib/Target/ARM/ARMFastISel.cpp
@@ -1548,6 +1548,11 @@ CCAssignFn *ARMFastISel::CCAssignFnForCall(CallingConv::ID CC, bool Return) {
return (Return ? RetCC_ARM_AAPCS: CC_ARM_AAPCS);
case CallingConv::ARM_APCS:
return (Return ? RetCC_ARM_APCS: CC_ARM_APCS);
+ case CallingConv::GHC:
+ if (Return)
+ llvm_unreachable("Can't return in GHC call convention");
+ else
+ return CC_ARM_APCS_GHC;
}
}
diff --git a/contrib/llvm/lib/Target/ARM/ARMFrameLowering.cpp b/contrib/llvm/lib/Target/ARM/ARMFrameLowering.cpp
index 2d1de6f..412751b 100644
--- a/contrib/llvm/lib/Target/ARM/ARMFrameLowering.cpp
+++ b/contrib/llvm/lib/Target/ARM/ARMFrameLowering.cpp
@@ -15,6 +15,8 @@
#include "ARMBaseInstrInfo.h"
#include "ARMBaseRegisterInfo.h"
#include "ARMMachineFunctionInfo.h"
+#include "llvm/CallingConv.h"
+#include "llvm/Function.h"
#include "MCTargetDesc/ARMAddressingModes.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
@@ -139,6 +141,10 @@ void ARMFrameLowering::emitPrologue(MachineFunction &MF) const {
unsigned GPRCS1Size = 0, GPRCS2Size = 0, DPRCSSize = 0;
int FramePtrSpillFI = 0;
+ // All calls are tail calls in GHC calling conv, and functions have no prologue/epilogue.
+ if (MF.getFunction()->getCallingConv() == CallingConv::GHC)
+ return;
+
// Allocate the vararg register save area. This is not counted in NumBytes.
if (VARegSaveSize)
emitSPUpdate(isARM, MBB, MBBI, dl, TII, -VARegSaveSize,
@@ -326,6 +332,10 @@ void ARMFrameLowering::emitEpilogue(MachineFunction &MF,
int NumBytes = (int)MFI->getStackSize();
unsigned FramePtr = RegInfo->getFrameRegister(MF);
+ // All calls are tail calls in GHC calling conv, and functions have no prologue/epilogue.
+ if (MF.getFunction()->getCallingConv() == CallingConv::GHC)
+ return;
+
if (!AFI->hasStackFrame()) {
if (NumBytes != 0)
emitSPUpdate(isARM, MBB, MBBI, dl, TII, NumBytes);
diff --git a/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp b/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp
index e44e356..f60d177 100644
--- a/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ b/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp
@@ -1091,6 +1091,8 @@ CCAssignFn *ARMTargetLowering::CCAssignFnForNode(CallingConv::ID CC,
return (Return ? RetCC_ARM_AAPCS : CC_ARM_AAPCS);
case CallingConv::ARM_APCS:
return (Return ? RetCC_ARM_APCS : CC_ARM_APCS);
+ case CallingConv::GHC:
+ return (Return ? RetCC_ARM_APCS : CC_ARM_APCS_GHC);
}
}
diff --git a/contrib/llvm/lib/Target/ARM/ARMInstrThumb2.td b/contrib/llvm/lib/Target/ARM/ARMInstrThumb2.td
index 471ec29..05dcc89 100644
--- a/contrib/llvm/lib/Target/ARM/ARMInstrThumb2.td
+++ b/contrib/llvm/lib/Target/ARM/ARMInstrThumb2.td
@@ -1538,8 +1538,7 @@ multiclass thumb2_ld_mult<string asm, InstrItinClass itin,
let Inst{21} = 0; // No writeback
let Inst{20} = L_bit;
let Inst{19-16} = Rn;
- let Inst{15} = 0;
- let Inst{14-0} = regs{14-0};
+ let Inst{15-0} = regs;
}
def IA_UPD :
T2XIt<(outs GPR:$wb), (ins GPR:$Rn, pred:$p, reglist:$regs, variable_ops),
@@ -1554,8 +1553,7 @@ multiclass thumb2_ld_mult<string asm, InstrItinClass itin,
let Inst{21} = 1; // Writeback
let Inst{20} = L_bit;
let Inst{19-16} = Rn;
- let Inst{15} = 0;
- let Inst{14-0} = regs{14-0};
+ let Inst{15-0} = regs;
}
def DB :
T2XI<(outs), (ins GPR:$Rn, pred:$p, reglist:$regs, variable_ops),
@@ -1570,8 +1568,7 @@ multiclass thumb2_ld_mult<string asm, InstrItinClass itin,
let Inst{21} = 0; // No writeback
let Inst{20} = L_bit;
let Inst{19-16} = Rn;
- let Inst{15} = 0;
- let Inst{14-0} = regs{14-0};
+ let Inst{15-0} = regs;
}
def DB_UPD :
T2XIt<(outs GPR:$wb), (ins GPR:$Rn, pred:$p, reglist:$regs, variable_ops),
@@ -1586,8 +1583,7 @@ multiclass thumb2_ld_mult<string asm, InstrItinClass itin,
let Inst{21} = 1; // Writeback
let Inst{20} = L_bit;
let Inst{19-16} = Rn;
- let Inst{15} = 0;
- let Inst{14-0} = regs{14-0};
+ let Inst{15-0} = regs;
}
}
diff --git a/contrib/llvm/lib/Target/CppBackend/CPPBackend.cpp b/contrib/llvm/lib/Target/CppBackend/CPPBackend.cpp
index ae0e3c4..394ea2b 100644
--- a/contrib/llvm/lib/Target/CppBackend/CPPBackend.cpp
+++ b/contrib/llvm/lib/Target/CppBackend/CPPBackend.cpp
@@ -1016,6 +1016,27 @@ std::string CppWriter::getOpName(const Value* V) {
return result;
}
+static StringRef ConvertAtomicOrdering(AtomicOrdering Ordering) {
+ switch (Ordering) {
+ case NotAtomic: return "NotAtomic";
+ case Unordered: return "Unordered";
+ case Monotonic: return "Monotonic";
+ case Acquire: return "Acquire";
+ case Release: return "Release";
+ case AcquireRelease: return "AcquireRelease";
+ case SequentiallyConsistent: return "SequentiallyConsistent";
+ }
+ llvm_unreachable("Unknown ordering");
+}
+
+static StringRef ConvertAtomicSynchScope(SynchronizationScope SynchScope) {
+ switch (SynchScope) {
+ case SingleThread: return "SingleThread";
+ case CrossThread: return "CrossThread";
+ }
+ llvm_unreachable("Unknown synch scope");
+}
+
// printInstruction - This member is called for each Instruction in a function.
void CppWriter::printInstruction(const Instruction *I,
const std::string& bbname) {
@@ -1237,15 +1258,33 @@ void CppWriter::printInstruction(const Instruction *I,
printEscapedString(load->getName());
Out << "\", " << (load->isVolatile() ? "true" : "false" )
<< ", " << bbname << ");";
+ if (load->getAlignment())
+ nl(Out) << iName << "->setAlignment("
+ << load->getAlignment() << ");";
+ if (load->isAtomic()) {
+ StringRef Ordering = ConvertAtomicOrdering(load->getOrdering());
+ StringRef CrossThread = ConvertAtomicSynchScope(load->getSynchScope());
+ nl(Out) << iName << "->setAtomic("
+ << Ordering << ", " << CrossThread << ");";
+ }
break;
}
case Instruction::Store: {
const StoreInst* store = cast<StoreInst>(I);
- Out << " new StoreInst("
+ Out << "StoreInst* " << iName << " = new StoreInst("
<< opNames[0] << ", "
<< opNames[1] << ", "
<< (store->isVolatile() ? "true" : "false")
<< ", " << bbname << ");";
+ if (store->getAlignment())
+ nl(Out) << iName << "->setAlignment("
+ << store->getAlignment() << ");";
+ if (store->isAtomic()) {
+ StringRef Ordering = ConvertAtomicOrdering(store->getOrdering());
+ StringRef CrossThread = ConvertAtomicSynchScope(store->getSynchScope());
+ nl(Out) << iName << "->setAtomic("
+ << Ordering << ", " << CrossThread << ");";
+ }
break;
}
case Instruction::GetElementPtr: {
@@ -1447,6 +1486,60 @@ void CppWriter::printInstruction(const Instruction *I,
Out << "\", " << bbname << ");";
break;
}
+ case Instruction::Fence: {
+ const FenceInst *fi = cast<FenceInst>(I);
+ StringRef Ordering = ConvertAtomicOrdering(fi->getOrdering());
+ StringRef CrossThread = ConvertAtomicSynchScope(fi->getSynchScope());
+ Out << "FenceInst* " << iName
+ << " = new FenceInst(mod->getContext(), "
+ << Ordering << ", " << CrossThread << ", " << bbname
+ << ");";
+ break;
+ }
+ case Instruction::AtomicCmpXchg: {
+ const AtomicCmpXchgInst *cxi = cast<AtomicCmpXchgInst>(I);
+ StringRef Ordering = ConvertAtomicOrdering(cxi->getOrdering());
+ StringRef CrossThread = ConvertAtomicSynchScope(cxi->getSynchScope());
+ Out << "AtomicCmpXchgInst* " << iName
+ << " = new AtomicCmpXchgInst("
+ << opNames[0] << ", " << opNames[1] << ", " << opNames[2] << ", "
+ << Ordering << ", " << CrossThread << ", " << bbname
+ << ");";
+ nl(Out) << iName << "->setName(\"";
+ printEscapedString(cxi->getName());
+ Out << "\");";
+ break;
+ }
+ case Instruction::AtomicRMW: {
+ const AtomicRMWInst *rmwi = cast<AtomicRMWInst>(I);
+ StringRef Ordering = ConvertAtomicOrdering(rmwi->getOrdering());
+ StringRef CrossThread = ConvertAtomicSynchScope(rmwi->getSynchScope());
+ StringRef Operation;
+ switch (rmwi->getOperation()) {
+ case AtomicRMWInst::Xchg: Operation = "AtomicRMWInst::Xchg"; break;
+ case AtomicRMWInst::Add: Operation = "AtomicRMWInst::Add"; break;
+ case AtomicRMWInst::Sub: Operation = "AtomicRMWInst::Sub"; break;
+ case AtomicRMWInst::And: Operation = "AtomicRMWInst::And"; break;
+ case AtomicRMWInst::Nand: Operation = "AtomicRMWInst::Nand"; break;
+ case AtomicRMWInst::Or: Operation = "AtomicRMWInst::Or"; break;
+ case AtomicRMWInst::Xor: Operation = "AtomicRMWInst::Xor"; break;
+ case AtomicRMWInst::Max: Operation = "AtomicRMWInst::Max"; break;
+ case AtomicRMWInst::Min: Operation = "AtomicRMWInst::Min"; break;
+ case AtomicRMWInst::UMax: Operation = "AtomicRMWInst::UMax"; break;
+ case AtomicRMWInst::UMin: Operation = "AtomicRMWInst::UMin"; break;
+ case AtomicRMWInst::BAD_BINOP: llvm_unreachable("Bad atomic operation");
+ }
+ Out << "AtomicRMWInst* " << iName
+ << " = new AtomicRMWInst("
+ << Operation << ", "
+ << opNames[0] << ", " << opNames[1] << ", "
+ << Ordering << ", " << CrossThread << ", " << bbname
+ << ");";
+ nl(Out) << iName << "->setName(\"";
+ printEscapedString(rmwi->getName());
+ Out << "\");";
+ break;
+ }
}
DefinedValues.insert(I);
nl(Out);
@@ -1623,7 +1716,9 @@ void CppWriter::printFunctionBody(const Function *F) {
Out << "Value* " << getCppName(AI) << " = args++;";
nl(Out);
if (AI->hasName()) {
- Out << getCppName(AI) << "->setName(\"" << AI->getName() << "\");";
+ Out << getCppName(AI) << "->setName(\"";
+ printEscapedString(AI->getName());
+ Out << "\");";
nl(Out);
}
}
diff --git a/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td b/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td
index 49b0223..9758f4b 100644
--- a/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td
+++ b/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td
@@ -39,51 +39,51 @@ def imm32_63 : ImmLeaf<i64,
// Shifts
class LogicR_shift_rotate_imm64<bits<6> func, bits<5> _rs, string instr_asm,
SDNode OpNode, PatFrag PF>:
- FR<0x00, func, (outs CPU64Regs:$dst), (ins CPU64Regs:$b, shamt_64:$c),
- !strconcat(instr_asm, "\t$dst, $b, $c"),
- [(set CPU64Regs:$dst, (OpNode CPU64Regs:$b, (i64 PF:$c)))],
+ FR<0x00, func, (outs CPU64Regs:$rd), (ins CPU64Regs:$rt, shamt_64:$shamt),
+ !strconcat(instr_asm, "\t$rd, $rt, $shamt"),
+ [(set CPU64Regs:$rd, (OpNode CPU64Regs:$rt, (i64 PF:$shamt)))],
IIAlu> {
let rs = _rs;
}
class LogicR_shift_rotate_reg64<bits<6> func, bits<5> _shamt, string instr_asm,
SDNode OpNode>:
- FR<0x00, func, (outs CPU64Regs:$dst), (ins CPU64Regs:$c, CPU64Regs:$b),
- !strconcat(instr_asm, "\t$dst, $b, $c"),
- [(set CPU64Regs:$dst, (OpNode CPU64Regs:$b, CPU64Regs:$c))], IIAlu> {
+ FR<0x00, func, (outs CPU64Regs:$rd), (ins CPU64Regs:$rs, CPU64Regs:$rt),
+ !strconcat(instr_asm, "\t$rd, $rt, $rs"),
+ [(set CPU64Regs:$rd, (OpNode CPU64Regs:$rt, CPU64Regs:$rs))], IIAlu> {
let shamt = _shamt;
}
// Mul, Div
-let Defs = [HI64, LO64] in {
+let rd = 0, shamt = 0, Defs = [HI64, LO64] in {
let isCommutable = 1 in
class Mul64<bits<6> func, string instr_asm, InstrItinClass itin>:
- FR<0x00, func, (outs), (ins CPU64Regs:$a, CPU64Regs:$b),
- !strconcat(instr_asm, "\t$a, $b"), [], itin>;
+ FR<0x00, func, (outs), (ins CPU64Regs:$rs, CPU64Regs:$rt),
+ !strconcat(instr_asm, "\t$rs, $rt"), [], itin>;
class Div64<SDNode op, bits<6> func, string instr_asm, InstrItinClass itin>:
- FR<0x00, func, (outs), (ins CPU64Regs:$a, CPU64Regs:$b),
- !strconcat(instr_asm, "\t$$zero, $a, $b"),
- [(op CPU64Regs:$a, CPU64Regs:$b)], itin>;
+ FR<0x00, func, (outs), (ins CPU64Regs:$rs, CPU64Regs:$rt),
+ !strconcat(instr_asm, "\t$$zero, $rs, $rt"),
+ [(op CPU64Regs:$rs, CPU64Regs:$rt)], itin>;
}
// Move from Hi/Lo
let shamt = 0 in {
let rs = 0, rt = 0 in
class MoveFromLOHI64<bits<6> func, string instr_asm>:
- FR<0x00, func, (outs CPU64Regs:$dst), (ins),
- !strconcat(instr_asm, "\t$dst"), [], IIHiLo>;
+ FR<0x00, func, (outs CPU64Regs:$rd), (ins),
+ !strconcat(instr_asm, "\t$rd"), [], IIHiLo>;
let rt = 0, rd = 0 in
class MoveToLOHI64<bits<6> func, string instr_asm>:
- FR<0x00, func, (outs), (ins CPU64Regs:$src),
- !strconcat(instr_asm, "\t$src"), [], IIHiLo>;
+ FR<0x00, func, (outs), (ins CPU64Regs:$rs),
+ !strconcat(instr_asm, "\t$rs"), [], IIHiLo>;
}
// Count Leading Ones/Zeros in Word
class CountLeading64<bits<6> func, string instr_asm, list<dag> pattern>:
- FR<0x1c, func, (outs CPU64Regs:$dst), (ins CPU64Regs:$src),
- !strconcat(instr_asm, "\t$dst, $src"), pattern, IIAlu>,
+ FR<0x1c, func, (outs CPU64Regs:$rd), (ins CPU64Regs:$rs),
+ !strconcat(instr_asm, "\t$rd, $rs"), pattern, IIAlu>,
Requires<[HasBitCount]> {
let shamt = 0;
let rt = rd;
@@ -180,9 +180,9 @@ let Uses = [LO64] in
/// Count Leading
def DCLZ : CountLeading64<0x24, "dclz",
- [(set CPU64Regs:$dst, (ctlz CPU64Regs:$src))]>;
+ [(set CPU64Regs:$rd, (ctlz CPU64Regs:$rs))]>;
def DCLO : CountLeading64<0x25, "dclo",
- [(set CPU64Regs:$dst, (ctlz (not CPU64Regs:$src)))]>;
+ [(set CPU64Regs:$rd, (ctlz (not CPU64Regs:$rs)))]>;
//===----------------------------------------------------------------------===//
// Arbitrary patterns that map to one or more instructions
diff --git a/contrib/llvm/lib/Target/Mips/MipsCodeEmitter.cpp b/contrib/llvm/lib/Target/Mips/MipsCodeEmitter.cpp
index 9220d9c..23fabe3 100644
--- a/contrib/llvm/lib/Target/Mips/MipsCodeEmitter.cpp
+++ b/contrib/llvm/lib/Target/Mips/MipsCodeEmitter.cpp
@@ -105,6 +105,9 @@ class MipsCodeEmitter : public MachineFunctionPass {
unsigned getRelocation(const MachineInstr &MI,
const MachineOperand &MO) const;
+ unsigned getMemEncoding(const MachineInstr &MI, unsigned OpNo) const;
+ unsigned getSizeExtEncoding(const MachineInstr &MI, unsigned OpNo) const;
+ unsigned getSizeInsEncoding(const MachineInstr &MI, unsigned OpNo) const;
};
}
@@ -153,6 +156,28 @@ unsigned MipsCodeEmitter::getRelocation(const MachineInstr &MI,
return Mips::reloc_mips_lo;
}
+unsigned MipsCodeEmitter::getMemEncoding(const MachineInstr &MI,
+ unsigned OpNo) const {
+ // Base register is encoded in bits 20-16, offset is encoded in bits 15-0.
+ assert(MI.getOperand(OpNo).isReg());
+ unsigned RegBits = getMachineOpValue(MI, MI.getOperand(OpNo)) << 16;
+ return
+ (getMachineOpValue(MI, MI.getOperand(OpNo+1)) & 0xFFFF) | RegBits;
+}
+
+unsigned MipsCodeEmitter::getSizeExtEncoding(const MachineInstr &MI,
+ unsigned OpNo) const {
+ // size is encoded as size-1.
+ return getMachineOpValue(MI, MI.getOperand(OpNo)) - 1;
+}
+
+unsigned MipsCodeEmitter::getSizeInsEncoding(const MachineInstr &MI,
+ unsigned OpNo) const {
+ // size is encoded as pos+size-1.
+ return getMachineOpValue(MI, MI.getOperand(OpNo-1)) +
+ getMachineOpValue(MI, MI.getOperand(OpNo)) - 1;
+}
+
/// getMachineOpValue - Return binary encoding of operand. If the machine
/// operand requires relocation, record the relocation and return zero.
unsigned MipsCodeEmitter::getMachineOpValue(const MachineInstr &MI,
@@ -238,8 +263,4 @@ FunctionPass *llvm::createMipsJITCodeEmitterPass(MipsTargetMachine &TM,
return new MipsCodeEmitter(TM, JCE);
}
-unsigned MipsCodeEmitter::getBinaryCodeForInstr(const MachineInstr &MI) const {
- // this function will be automatically generated by the CodeEmitterGenerator
- // using TableGen
- return 0;
-}
+#include "MipsGenCodeEmitter.inc"
diff --git a/contrib/llvm/lib/Target/Mips/MipsInstrFPU.td b/contrib/llvm/lib/Target/Mips/MipsInstrFPU.td
index 2fb9d18..1fb779d 100644
--- a/contrib/llvm/lib/Target/Mips/MipsInstrFPU.td
+++ b/contrib/llvm/lib/Target/Mips/MipsInstrFPU.td
@@ -76,14 +76,16 @@ def IsNotSingleFloat : Predicate<"!Subtarget.isSingleFloat()">;
// FP load.
class FPLoad<bits<6> op, string opstr, PatFrag FOp, RegisterClass RC,
Operand MemOpnd>:
- FFI<op, (outs RC:$ft), (ins MemOpnd:$base),
- !strconcat(opstr, "\t$ft, $base"), [(set RC:$ft, (FOp addr:$base))]>;
+ FMem<op, (outs RC:$ft), (ins MemOpnd:$addr),
+ !strconcat(opstr, "\t$ft, $addr"), [(set RC:$ft, (FOp addr:$addr))],
+ IILoad>;
// FP store.
class FPStore<bits<6> op, string opstr, PatFrag FOp, RegisterClass RC,
Operand MemOpnd>:
- FFI<op, (outs), (ins RC:$ft, MemOpnd:$base),
- !strconcat(opstr, "\t$ft, $base"), [(store RC:$ft, addr:$base)]>;
+ FMem<op, (outs), (ins RC:$ft, MemOpnd:$addr),
+ !strconcat(opstr, "\t$ft, $addr"), [(store RC:$ft, addr:$addr)],
+ IIStore>;
// Instructions that convert an FP value to 32-bit fixed point.
multiclass FFR1_W_M<bits<6> funct, string opstr> {
@@ -158,22 +160,28 @@ defm FSQRT : FFR1P_M<0x4, "sqrt", fsqrt>;
// stores, and moves between floating-point and integer registers.
// When defining instructions, we reference all 32-bit registers,
// regardless of register aliasing.
-let fd = 0 in {
- /// Move Control Registers From/To CPU Registers
- def CFC1 : FFR<0x11, 0x0, 0x2, (outs CPURegs:$rt), (ins CCR:$fs),
+
+class FFRGPR<bits<5> _fmt, dag outs, dag ins, string asmstr, list<dag> pattern>:
+ FFR<0x11, 0x0, _fmt, outs, ins, asmstr, pattern> {
+ bits<5> rt;
+ let ft = rt;
+ let fd = 0;
+}
+
+/// Move Control Registers From/To CPU Registers
+def CFC1 : FFRGPR<0x2, (outs CPURegs:$rt), (ins CCR:$fs),
"cfc1\t$rt, $fs", []>;
- def CTC1 : FFR<0x11, 0x0, 0x6, (outs CCR:$rt), (ins CPURegs:$fs),
- "ctc1\t$fs, $rt", []>;
+def CTC1 : FFRGPR<0x6, (outs CCR:$fs), (ins CPURegs:$rt),
+ "ctc1\t$rt, $fs", []>;
- def MFC1 : FFR<0x11, 0x00, 0x00, (outs CPURegs:$rt), (ins FGR32:$fs),
+def MFC1 : FFRGPR<0x00, (outs CPURegs:$rt), (ins FGR32:$fs),
"mfc1\t$rt, $fs",
[(set CPURegs:$rt, (bitconvert FGR32:$fs))]>;
- def MTC1 : FFR<0x11, 0x00, 0x04, (outs FGR32:$fs), (ins CPURegs:$rt),
+def MTC1 : FFRGPR<0x04, (outs FGR32:$fs), (ins CPURegs:$rt),
"mtc1\t$rt, $fs",
[(set FGR32:$fs, (bitconvert CPURegs:$rt))]>;
-}
def FMOV_S : FFR1<0x6, 16, "mov", "s", FGR32, FGR32>;
def FMOV_D32 : FFR1<0x6, 17, "mov", "d", AFGR64, AFGR64>,
@@ -203,7 +211,7 @@ let Predicates = [NotN64] in {
}
/// Floating-point Aritmetic
-defm FADD : FFR2P_M<0x10, "add", fadd, 1>;
+defm FADD : FFR2P_M<0x00, "add", fadd, 1>;
defm FDIV : FFR2P_M<0x03, "div", fdiv>;
defm FMUL : FFR2P_M<0x02, "mul", fmul, 1>;
defm FSUB : FFR2P_M<0x01, "sub", fsub>;
@@ -218,12 +226,16 @@ def MIPS_BRANCH_T : PatLeaf<(i32 1)>;
/// Floating Point Branch of False/True (Likely)
let isBranch=1, isTerminator=1, hasDelaySlot=1, base=0x8, Uses=[FCR31] in
- class FBRANCH<PatLeaf op, string asmstr> : FFI<0x11, (outs),
- (ins brtarget:$dst), !strconcat(asmstr, "\t$dst"),
- [(MipsFPBrcond op, bb:$dst)]>;
+ class FBRANCH<bits<1> nd, bits<1> tf, PatLeaf op, string asmstr> :
+ FFI<0x11, (outs), (ins brtarget:$dst), !strconcat(asmstr, "\t$dst"),
+ [(MipsFPBrcond op, bb:$dst)]> {
+ let Inst{20-18} = 0;
+ let Inst{17} = nd;
+ let Inst{16} = tf;
+}
-def BC1F : FBRANCH<MIPS_BRANCH_F, "bc1f">;
-def BC1T : FBRANCH<MIPS_BRANCH_T, "bc1t">;
+def BC1F : FBRANCH<0, 0, MIPS_BRANCH_F, "bc1f">;
+def BC1T : FBRANCH<0, 1, MIPS_BRANCH_T, "bc1t">;
//===----------------------------------------------------------------------===//
// Floating Point Flag Conditions
@@ -249,11 +261,11 @@ def MIPS_FCOND_NGT : PatLeaf<(i32 15)>;
/// Floating Point Compare
let Defs=[FCR31] in {
- def FCMP_S32 : FCC<0x0, (outs), (ins FGR32:$fs, FGR32:$ft, condcode:$cc),
+ def FCMP_S32 : FCC<0x10, (outs), (ins FGR32:$fs, FGR32:$ft, condcode:$cc),
"c.$cc.s\t$fs, $ft",
[(MipsFPCmp FGR32:$fs, FGR32:$ft, imm:$cc)]>;
- def FCMP_D32 : FCC<0x1, (outs), (ins AFGR64:$fs, AFGR64:$ft, condcode:$cc),
+ def FCMP_D32 : FCC<0x11, (outs), (ins AFGR64:$fs, AFGR64:$ft, condcode:$cc),
"c.$cc.d\t$fs, $ft",
[(MipsFPCmp AFGR64:$fs, AFGR64:$ft, imm:$cc)]>,
Requires<[NotFP64bit]>;
@@ -287,7 +299,8 @@ let Predicates = [NotFP64bit] in {
defm : MovnPats<AFGR64, MOVN_D>;
}
-let usesCustomInserter = 1, Uses = [FCR31], Constraints = "$F = $dst" in {
+let cc = 0, usesCustomInserter = 1, Uses = [FCR31],
+ Constraints = "$F = $dst" in {
// flag:float, data:int
class CondMovFPInt<SDNode cmov, bits<1> tf, string instr_asm> :
FCMOV<tf, (outs CPURegs:$dst), (ins CPURegs:$T, CPURegs:$F),
@@ -295,6 +308,7 @@ class CondMovFPInt<SDNode cmov, bits<1> tf, string instr_asm> :
[(set CPURegs:$dst, (cmov CPURegs:$T, CPURegs:$F))]>;
// flag:float, data:float
+let cc = 0 in
class CondMovFPFP<RegisterClass RC, SDNode cmov, bits<5> fmt, bits<1> tf,
string instr_asm> :
FFCMOV<fmt, tf, (outs RC:$dst), (ins RC:$T, RC:$F),
diff --git a/contrib/llvm/lib/Target/Mips/MipsInstrFormats.td b/contrib/llvm/lib/Target/Mips/MipsInstrFormats.td
index d246a26..e1725fa 100644
--- a/contrib/llvm/lib/Target/Mips/MipsInstrFormats.td
+++ b/contrib/llvm/lib/Target/Mips/MipsInstrFormats.td
@@ -21,30 +21,55 @@
//
//===----------------------------------------------------------------------===//
+// Format specifies the encoding used by the instruction. This is part of the
+// ad-hoc solution used to emit machine instruction encodings by our machine
+// code emitter.
+class Format<bits<4> val> {
+ bits<4> Value = val;
+}
+
+def Pseudo : Format<0>;
+def FrmR : Format<1>;
+def FrmI : Format<2>;
+def FrmJ : Format<3>;
+def FrmFR : Format<4>;
+def FrmFI : Format<5>;
+def FrmOther : Format<6>; // Instruction w/ a custom format
+
// Generic Mips Format
class MipsInst<dag outs, dag ins, string asmstr, list<dag> pattern,
- InstrItinClass itin>: Instruction
+ InstrItinClass itin, Format f>: Instruction
{
field bits<32> Inst;
+ Format Form = f;
let Namespace = "Mips";
- bits<6> opcode;
+ bits<6> Opcode = 0;
- // Top 5 bits are the 'opcode' field
- let Inst{31-26} = opcode;
+ // Top 6 bits are the 'opcode' field
+ let Inst{31-26} = Opcode;
- dag OutOperandList = outs;
- dag InOperandList = ins;
+ let OutOperandList = outs;
+ let InOperandList = ins;
let AsmString = asmstr;
let Pattern = pattern;
let Itinerary = itin;
+
+ //
+ // Attributes specific to Mips instructions...
+ //
+ bits<4> FormBits = Form.Value;
+
+ // TSFlags layout should be kept in sync with MipsInstrInfo.h.
+ let TSFlags{3-0} = FormBits;
}
// Mips Pseudo Instructions Format
class MipsPseudo<dag outs, dag ins, string asmstr, list<dag> pattern>:
- MipsInst<outs, ins, asmstr, pattern, IIPseudo> {
+ MipsInst<outs, ins, asmstr, pattern, IIPseudo, Pseudo> {
+ let isCodeGenOnly = 1;
let isPseudo = 1;
}
@@ -54,7 +79,7 @@ class MipsPseudo<dag outs, dag ins, string asmstr, list<dag> pattern>:
class FR<bits<6> op, bits<6> _funct, dag outs, dag ins, string asmstr,
list<dag> pattern, InstrItinClass itin>:
- MipsInst<outs, ins, asmstr, pattern, itin>
+ MipsInst<outs, ins, asmstr, pattern, itin, FrmR>
{
bits<5> rd;
bits<5> rs;
@@ -62,7 +87,7 @@ class FR<bits<6> op, bits<6> _funct, dag outs, dag ins, string asmstr,
bits<5> shamt;
bits<6> funct;
- let opcode = op;
+ let Opcode = op;
let funct = _funct;
let Inst{25-21} = rs;
@@ -77,13 +102,13 @@ class FR<bits<6> op, bits<6> _funct, dag outs, dag ins, string asmstr,
//===----------------------------------------------------------------------===//
class FI<bits<6> op, dag outs, dag ins, string asmstr, list<dag> pattern,
- InstrItinClass itin>: MipsInst<outs, ins, asmstr, pattern, itin>
+ InstrItinClass itin>: MipsInst<outs, ins, asmstr, pattern, itin, FrmI>
{
bits<5> rt;
bits<5> rs;
bits<16> imm16;
- let opcode = op;
+ let Opcode = op;
let Inst{25-21} = rs;
let Inst{20-16} = rt;
@@ -92,13 +117,13 @@ class FI<bits<6> op, dag outs, dag ins, string asmstr, list<dag> pattern,
class CBranchBase<bits<6> op, dag outs, dag ins, string asmstr,
list<dag> pattern, InstrItinClass itin>:
- MipsInst<outs, ins, asmstr, pattern, itin>
+ MipsInst<outs, ins, asmstr, pattern, itin, FrmI>
{
bits<5> rs;
bits<5> rt;
bits<16> imm16;
- let opcode = op;
+ let Opcode = op;
let Inst{25-21} = rs;
let Inst{20-16} = rt;
@@ -110,11 +135,11 @@ class CBranchBase<bits<6> op, dag outs, dag ins, string asmstr,
//===----------------------------------------------------------------------===//
class FJ<bits<6> op, dag outs, dag ins, string asmstr, list<dag> pattern,
- InstrItinClass itin>: MipsInst<outs, ins, asmstr, pattern, itin>
+ InstrItinClass itin>: MipsInst<outs, ins, asmstr, pattern, itin, FrmJ>
{
bits<26> addr;
- let opcode = op;
+ let Opcode = op;
let Inst{25-0} = addr;
}
@@ -138,7 +163,7 @@ class FJ<bits<6> op, dag outs, dag ins, string asmstr, list<dag> pattern,
class FFR<bits<6> op, bits<6> _funct, bits<5> _fmt, dag outs, dag ins,
string asmstr, list<dag> pattern> :
- MipsInst<outs, ins, asmstr, pattern, NoItinerary>
+ MipsInst<outs, ins, asmstr, pattern, NoItinerary, FrmFR>
{
bits<5> fd;
bits<5> fs;
@@ -146,7 +171,7 @@ class FFR<bits<6> op, bits<6> _funct, bits<5> _fmt, dag outs, dag ins,
bits<5> fmt;
bits<6> funct;
- let opcode = op;
+ let Opcode = op;
let funct = _funct;
let fmt = _fmt;
@@ -162,13 +187,13 @@ class FFR<bits<6> op, bits<6> _funct, bits<5> _fmt, dag outs, dag ins,
//===----------------------------------------------------------------------===//
class FFI<bits<6> op, dag outs, dag ins, string asmstr, list<dag> pattern>:
- MipsInst<outs, ins, asmstr, pattern, NoItinerary>
+ MipsInst<outs, ins, asmstr, pattern, NoItinerary, FrmFI>
{
bits<5> ft;
bits<5> base;
bits<16> imm16;
- let opcode = op;
+ let Opcode = op;
let Inst{25-21} = base;
let Inst{20-16} = ft;
@@ -180,14 +205,14 @@ class FFI<bits<6> op, dag outs, dag ins, string asmstr, list<dag> pattern>:
//===----------------------------------------------------------------------===//
class FCC<bits<5> _fmt, dag outs, dag ins, string asmstr, list<dag> pattern> :
- MipsInst<outs, ins, asmstr, pattern, NoItinerary>
+ MipsInst<outs, ins, asmstr, pattern, NoItinerary, FrmOther>
{
bits<5> fs;
bits<5> ft;
bits<4> cc;
bits<5> fmt;
- let opcode = 0x11;
+ let Opcode = 0x11;
let fmt = _fmt;
let Inst{25-21} = fmt;
@@ -201,18 +226,18 @@ class FCC<bits<5> _fmt, dag outs, dag ins, string asmstr, list<dag> pattern> :
class FCMOV<bits<1> _tf, dag outs, dag ins, string asmstr,
list<dag> pattern> :
- MipsInst<outs, ins, asmstr, pattern, NoItinerary>
+ MipsInst<outs, ins, asmstr, pattern, NoItinerary, FrmOther>
{
bits<5> rd;
bits<5> rs;
- bits<3> N;
+ bits<3> cc;
bits<1> tf;
- let opcode = 0;
+ let Opcode = 0;
let tf = _tf;
let Inst{25-21} = rs;
- let Inst{20-18} = N;
+ let Inst{20-18} = cc;
let Inst{17} = 0;
let Inst{16} = tf;
let Inst{15-11} = rd;
@@ -222,20 +247,20 @@ class FCMOV<bits<1> _tf, dag outs, dag ins, string asmstr,
class FFCMOV<bits<5> _fmt, bits<1> _tf, dag outs, dag ins, string asmstr,
list<dag> pattern> :
- MipsInst<outs, ins, asmstr, pattern, NoItinerary>
+ MipsInst<outs, ins, asmstr, pattern, NoItinerary, FrmOther>
{
bits<5> fd;
bits<5> fs;
- bits<3> N;
+ bits<3> cc;
bits<5> fmt;
bits<1> tf;
- let opcode = 17;
+ let Opcode = 17;
let fmt = _fmt;
let tf = _tf;
let Inst{25-21} = fmt;
- let Inst{20-18} = N;
+ let Inst{20-18} = cc;
let Inst{17} = 0;
let Inst{16} = tf;
let Inst{15-11} = fs;
diff --git a/contrib/llvm/lib/Target/Mips/MipsInstrInfo.td b/contrib/llvm/lib/Target/Mips/MipsInstrInfo.td
index 06b7de7..3fbd41e 100644
--- a/contrib/llvm/lib/Target/Mips/MipsInstrInfo.td
+++ b/contrib/llvm/lib/Target/Mips/MipsInstrInfo.td
@@ -153,6 +153,7 @@ def uimm16 : Operand<i32> {
def mem : Operand<i32> {
let PrintMethod = "printMemOperand";
let MIOperandInfo = (ops CPURegs, simm16);
+ let EncoderMethod = "getMemEncoding";
}
def mem64 : Operand<i64> {
@@ -163,6 +164,17 @@ def mem64 : Operand<i64> {
def mem_ea : Operand<i32> {
let PrintMethod = "printMemOperandEA";
let MIOperandInfo = (ops CPURegs, simm16);
+ let EncoderMethod = "getMemEncoding";
+}
+
+// size operand of ext instruction
+def size_ext : Operand<i32> {
+ let EncoderMethod = "getSizeExtEncoding";
+}
+
+// size operand of ins instruction
+def size_ins : Operand<i32> {
+ let EncoderMethod = "getSizeInsEncoding";
}
// Transformation Function - get the lower 16 bits.
@@ -271,14 +283,14 @@ class ArithOverflowR<bits<6> op, bits<6> func, string instr_asm,
// Arithmetic and logical instructions with 2 register operands.
class ArithLogicI<bits<6> op, string instr_asm, SDNode OpNode,
Operand Od, PatLeaf imm_type, RegisterClass RC> :
- FI<op, (outs RC:$rt), (ins RC:$rs, Od:$i),
- !strconcat(instr_asm, "\t$rt, $rs, $i"),
- [(set RC:$rt, (OpNode RC:$rs, imm_type:$i))], IIAlu>;
+ FI<op, (outs RC:$rt), (ins RC:$rs, Od:$imm16),
+ !strconcat(instr_asm, "\t$rt, $rs, $imm16"),
+ [(set RC:$rt, (OpNode RC:$rs, imm_type:$imm16))], IIAlu>;
class ArithOverflowI<bits<6> op, string instr_asm, SDNode OpNode,
Operand Od, PatLeaf imm_type, RegisterClass RC> :
- FI<op, (outs RC:$rt), (ins RC:$rs, Od:$i),
- !strconcat(instr_asm, "\t$rt, $rs, $i"), [], IIAlu>;
+ FI<op, (outs RC:$rt), (ins RC:$rs, Od:$imm16),
+ !strconcat(instr_asm, "\t$rt, $rs, $imm16"), [], IIAlu>;
// Arithmetic Multiply ADD/SUB
let rd = 0, shamt = 0, Defs = [HI, LO], Uses = [HI, LO] in
@@ -319,16 +331,23 @@ class LogicR_shift_rotate_reg<bits<6> func, bits<5> isRotate, string instr_asm,
// Load Upper Imediate
class LoadUpper<bits<6> op, string instr_asm>:
- FI<op, (outs CPURegs:$rt), (ins uimm16:$imm),
- !strconcat(instr_asm, "\t$rt, $imm"), [], IIAlu> {
+ FI<op, (outs CPURegs:$rt), (ins uimm16:$imm16),
+ !strconcat(instr_asm, "\t$rt, $imm16"), [], IIAlu> {
let rs = 0;
}
+class FMem<bits<6> op, dag outs, dag ins, string asmstr, list<dag> pattern,
+ InstrItinClass itin>: FFI<op, outs, ins, asmstr, pattern> {
+ bits<21> addr;
+ let Inst{25-21} = addr{20-16};
+ let Inst{15-0} = addr{15-0};
+}
+
// Memory Load/Store
let canFoldAsLoad = 1 in
class LoadM<bits<6> op, string instr_asm, PatFrag OpNode, RegisterClass RC,
Operand MemOpnd, bit Pseudo>:
- FI<op, (outs RC:$rt), (ins MemOpnd:$addr),
+ FMem<op, (outs RC:$rt), (ins MemOpnd:$addr),
!strconcat(instr_asm, "\t$rt, $addr"),
[(set RC:$rt, (OpNode addr:$addr))], IILoad> {
let isPseudo = Pseudo;
@@ -336,7 +355,7 @@ class LoadM<bits<6> op, string instr_asm, PatFrag OpNode, RegisterClass RC,
class StoreM<bits<6> op, string instr_asm, PatFrag OpNode, RegisterClass RC,
Operand MemOpnd, bit Pseudo>:
- FI<op, (outs), (ins RC:$rt, MemOpnd:$addr),
+ FMem<op, (outs), (ins RC:$rt, MemOpnd:$addr),
!strconcat(instr_asm, "\t$rt, $addr"),
[(OpNode RC:$rt, addr:$addr)], IIStore> {
let isPseudo = Pseudo;
@@ -380,9 +399,9 @@ multiclass StoreM64<bits<6> op, string instr_asm, PatFrag OpNode,
// Conditional Branch
class CBranch<bits<6> op, string instr_asm, PatFrag cond_op, RegisterClass RC>:
- CBranchBase<op, (outs), (ins RC:$rs, RC:$rt, brtarget:$offset),
- !strconcat(instr_asm, "\t$rs, $rt, $offset"),
- [(brcond (i32 (cond_op RC:$rs, RC:$rt)), bb:$offset)], IIBranch> {
+ CBranchBase<op, (outs), (ins RC:$rs, RC:$rt, brtarget:$imm16),
+ !strconcat(instr_asm, "\t$rs, $rt, $imm16"),
+ [(brcond (i32 (cond_op RC:$rs, RC:$rt)), bb:$imm16)], IIBranch> {
let isBranch = 1;
let isTerminator = 1;
let hasDelaySlot = 1;
@@ -390,9 +409,9 @@ class CBranch<bits<6> op, string instr_asm, PatFrag cond_op, RegisterClass RC>:
class CBranchZero<bits<6> op, bits<5> _rt, string instr_asm, PatFrag cond_op,
RegisterClass RC>:
- CBranchBase<op, (outs), (ins RC:$rs, brtarget:$offset),
- !strconcat(instr_asm, "\t$rs, $offset"),
- [(brcond (i32 (cond_op RC:$rs, 0)), bb:$offset)], IIBranch> {
+ CBranchBase<op, (outs), (ins RC:$rs, brtarget:$imm16),
+ !strconcat(instr_asm, "\t$rs, $imm16"),
+ [(brcond (i32 (cond_op RC:$rs, 0)), bb:$imm16)], IIBranch> {
let rt = _rt;
let isBranch = 1;
let isTerminator = 1;
@@ -411,9 +430,9 @@ class SetCC_R<bits<6> op, bits<6> func, string instr_asm, PatFrag cond_op,
class SetCC_I<bits<6> op, string instr_asm, PatFrag cond_op, Operand Od,
PatLeaf imm_type, RegisterClass RC>:
- FI<op, (outs CPURegs:$rd), (ins RC:$rs, Od:$i),
- !strconcat(instr_asm, "\t$rd, $rs, $i"),
- [(set CPURegs:$rd, (cond_op RC:$rs, imm_type:$i))],
+ FI<op, (outs CPURegs:$rt), (ins RC:$rs, Od:$imm16),
+ !strconcat(instr_asm, "\t$rt, $rs, $imm16"),
+ [(set CPURegs:$rt, (cond_op RC:$rs, imm_type:$imm16))],
IIAlu>;
// Unconditional branch
@@ -450,10 +469,8 @@ let isCall=1, hasDelaySlot=1,
}
class BranchLink<string instr_asm>:
- FI<0x1, (outs), (ins CPURegs:$rs, brtarget:$target, variable_ops),
- !strconcat(instr_asm, "\t$rs, $target"), [], IIBranch> {
- let rt = 0;
- }
+ FI<0x1, (outs), (ins CPURegs:$rs, brtarget:$imm16, variable_ops),
+ !strconcat(instr_asm, "\t$rs, $imm16"), [], IIBranch>;
}
// Mul, Div
@@ -493,7 +510,7 @@ class MoveToLOHI<bits<6> func, string instr_asm>:
}
class EffectiveAddress<string instr_asm> :
- FI<0x09, (outs CPURegs:$rt), (ins mem_ea:$addr),
+ FMem<0x09, (outs CPURegs:$rt), (ins mem_ea:$addr),
instr_asm, [(set CPURegs:$rt, addr:$addr)], IIAlu>;
// Count Leading Ones/Zeros in Word
@@ -507,7 +524,7 @@ class CountLeading<bits<6> func, string instr_asm, list<dag> pattern>:
// Sign Extend in Register.
class SignExtInReg<bits<5> sa, string instr_asm, ValueType vt>:
- FR<0x3f, 0x20, (outs CPURegs:$rd), (ins CPURegs:$rt),
+ FR<0x1f, 0x20, (outs CPURegs:$rd), (ins CPURegs:$rt),
!strconcat(instr_asm, "\t$rd, $rt"),
[(set CPURegs:$rd, (sext_inreg CPURegs:$rt, vt))], NoItinerary> {
let rs = 0;
@@ -685,20 +702,22 @@ defm USW : StoreM32<0x2b, "usw", store_u, 1>;
let hasSideEffects = 1 in
def SYNC : MipsInst<(outs), (ins i32imm:$stype), "sync $stype",
- [(MipsSync imm:$stype)], NoItinerary>
+ [(MipsSync imm:$stype)], NoItinerary, FrmOther>
{
- let opcode = 0;
+ bits<5> stype;
+ let Opcode = 0;
let Inst{25-11} = 0;
+ let Inst{10-6} = stype;
let Inst{5-0} = 15;
}
/// Load-linked, Store-conditional
let mayLoad = 1 in
- def LL : FI<0x30, (outs CPURegs:$dst), (ins mem:$addr),
- "ll\t$dst, $addr", [], IILoad>;
-let mayStore = 1, Constraints = "$src = $dst" in
- def SC : FI<0x38, (outs CPURegs:$dst), (ins CPURegs:$src, mem:$addr),
- "sc\t$src, $addr", [], IIStore>;
+ def LL : FMem<0x30, (outs CPURegs:$rt), (ins mem:$addr),
+ "ll\t$rt, $addr", [], IILoad>;
+let mayStore = 1, Constraints = "$rt = $dst" in
+ def SC : FMem<0x38, (outs CPURegs:$dst), (ins CPURegs:$rt, mem:$addr),
+ "sc\t$rt, $addr", [], IIStore>;
/// Jump and Branch Instructions
def J : JumpFJ<0x02, "j">;
@@ -710,15 +729,17 @@ def BEQ : CBranch<0x04, "beq", seteq, CPURegs>;
def BNE : CBranch<0x05, "bne", setne, CPURegs>;
def BGEZ : CBranchZero<0x01, 1, "bgez", setge, CPURegs>;
def BGTZ : CBranchZero<0x07, 0, "bgtz", setgt, CPURegs>;
-def BLEZ : CBranchZero<0x07, 0, "blez", setle, CPURegs>;
+def BLEZ : CBranchZero<0x06, 0, "blez", setle, CPURegs>;
def BLTZ : CBranchZero<0x01, 0, "bltz", setlt, CPURegs>;
-def BGEZAL : BranchLink<"bgezal">;
-def BLTZAL : BranchLink<"bltzal">;
+let rt=0x11 in
+ def BGEZAL : BranchLink<"bgezal">;
+let rt=0x10 in
+ def BLTZAL : BranchLink<"bltzal">;
let isReturn=1, isTerminator=1, hasDelaySlot=1,
- isBarrier=1, hasCtrlDep=1, rs=0, rt=0, shamt=0 in
- def RET : FR <0x00, 0x02, (outs), (ins CPURegs:$target),
+ isBarrier=1, hasCtrlDep=1, rd=0, rt=0, shamt=0 in
+ def RET : FR <0x00, 0x08, (outs), (ins CPURegs:$target),
"jr\t$target", [(MipsRet CPURegs:$target)], IIBranch>;
/// Multiply and Divide Instructions.
@@ -797,14 +818,14 @@ def MUL : ArithLogicR<0x1c, 0x02, "mul", mul, IIImul, CPURegs, 1>,
def RDHWR : ReadHardware;
def EXT : ExtIns<0, "ext", (outs CPURegs:$rt),
- (ins CPURegs:$rs, uimm16:$pos, uimm16:$sz),
+ (ins CPURegs:$rs, uimm16:$pos, size_ext:$sz),
[(set CPURegs:$rt,
(MipsExt CPURegs:$rs, immZExt5:$pos, immZExt5:$sz))],
NoItinerary>;
let Constraints = "$src = $rt" in
def INS : ExtIns<4, "ins", (outs CPURegs:$rt),
- (ins CPURegs:$rs, uimm16:$pos, uimm16:$sz, CPURegs:$src),
+ (ins CPURegs:$rs, uimm16:$pos, size_ins:$sz, CPURegs:$src),
[(set CPURegs:$rt,
(MipsIns CPURegs:$rs, immZExt5:$pos, immZExt5:$sz,
CPURegs:$src))],
diff --git a/contrib/llvm/lib/Target/Mips/MipsJITInfo.cpp b/contrib/llvm/lib/Target/Mips/MipsJITInfo.cpp
index 28c2b48..e3f6a75 100644
--- a/contrib/llvm/lib/Target/Mips/MipsJITInfo.cpp
+++ b/contrib/llvm/lib/Target/Mips/MipsJITInfo.cpp
@@ -57,11 +57,11 @@ void MipsCompilationCallback();
".globl " ASMPREFIX "MipsCompilationCallback\n"
ASMPREFIX "MipsCompilationCallback:\n"
".ent " ASMPREFIX "MipsCompilationCallback\n"
- ".frame $29, 32, $31\n"
+ ".frame $sp, 32, $ra\n"
".set noreorder\n"
".cpload $t9\n"
- "addiu $sp, $sp, -60\n"
+ "addiu $sp, $sp, -64\n"
".cprestore 16\n"
// Save argument registers a0, a1, a2, a3, f12, f14 since they may contain
@@ -76,8 +76,8 @@ void MipsCompilationCallback();
"sw $a3, 32($sp)\n"
"sw $ra, 36($sp)\n"
"sw $t8, 40($sp)\n"
- "sdc1 $f12, 44($sp)\n"
- "sdc1 $f14, 52($sp)\n"
+ "sdc1 $f12, 48($sp)\n"
+ "sdc1 $f14, 56($sp)\n"
// t8 points at the end of function stub. Pass the beginning of the stub
// to the MipsCompilationCallbackC.
@@ -92,9 +92,9 @@ void MipsCompilationCallback();
"lw $a3, 32($sp)\n"
"lw $ra, 36($sp)\n"
"lw $t8, 40($sp)\n"
- "ldc1 $f12, 44($sp)\n"
- "ldc1 $f14, 52($sp)\n"
- "addiu $sp, $sp, 60\n"
+ "ldc1 $f12, 48($sp)\n"
+ "ldc1 $f14, 56($sp)\n"
+ "addiu $sp, $sp, 64\n"
// Jump to the (newly modified) stub to invoke the real function.
"addiu $t8, $t8, -16\n"
diff --git a/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp b/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp
index 7dead10..0b85fea 100644
--- a/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp
+++ b/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp
@@ -490,10 +490,8 @@ void PPCFrameLowering::emitPrologue(MachineFunction &MF) const {
// This is a bit of a hack: CR2LT, CR2GT, CR2EQ and CR2UN are just
// subregisters of CR2. We just need to emit a move of CR2.
- if (Reg == PPC::CR2LT || Reg == PPC::CR2GT || Reg == PPC::CR2EQ)
+ if (PPC::CRBITRCRegisterClass->contains(Reg))
continue;
- if (Reg == PPC::CR2UN)
- Reg = PPC::CR2;
MachineLocation CSDst(MachineLocation::VirtualFP, Offset);
MachineLocation CSSrc(Reg);
diff --git a/contrib/llvm/lib/Target/X86/X86CodeEmitter.cpp b/contrib/llvm/lib/Target/X86/X86CodeEmitter.cpp
index aeff03a..f939510 100644
--- a/contrib/llvm/lib/Target/X86/X86CodeEmitter.cpp
+++ b/contrib/llvm/lib/Target/X86/X86CodeEmitter.cpp
@@ -589,6 +589,13 @@ void Emitter<CodeEmitter>::emitMemModRMByte(const MachineInstr &MI,
}
}
+static const MCInstrDesc *UpdateOp(MachineInstr &MI, const X86InstrInfo *II,
+ unsigned Opcode) {
+ const MCInstrDesc *Desc = &II->get(Opcode);
+ MI.setDesc(*Desc);
+ return Desc;
+}
+
template<class CodeEmitter>
void Emitter<CodeEmitter>::emitInstruction(MachineInstr &MI,
const MCInstrDesc *Desc) {
@@ -596,15 +603,23 @@ void Emitter<CodeEmitter>::emitInstruction(MachineInstr &MI,
// If this is a pseudo instruction, lower it.
switch (Desc->getOpcode()) {
- case X86::ADD16rr_DB: Desc = &II->get(X86::OR16rr); MI.setDesc(*Desc);break;
- case X86::ADD32rr_DB: Desc = &II->get(X86::OR32rr); MI.setDesc(*Desc);break;
- case X86::ADD64rr_DB: Desc = &II->get(X86::OR64rr); MI.setDesc(*Desc);break;
- case X86::ADD16ri_DB: Desc = &II->get(X86::OR16ri); MI.setDesc(*Desc);break;
- case X86::ADD32ri_DB: Desc = &II->get(X86::OR32ri); MI.setDesc(*Desc);break;
- case X86::ADD64ri32_DB:Desc = &II->get(X86::OR64ri32);MI.setDesc(*Desc);break;
- case X86::ADD16ri8_DB: Desc = &II->get(X86::OR16ri8);MI.setDesc(*Desc);break;
- case X86::ADD32ri8_DB: Desc = &II->get(X86::OR32ri8);MI.setDesc(*Desc);break;
- case X86::ADD64ri8_DB: Desc = &II->get(X86::OR64ri8);MI.setDesc(*Desc);break;
+ case X86::ADD16rr_DB: Desc = UpdateOp(MI, II, X86::OR16rr); break;
+ case X86::ADD32rr_DB: Desc = UpdateOp(MI, II, X86::OR32rr); break;
+ case X86::ADD64rr_DB: Desc = UpdateOp(MI, II, X86::OR64rr); break;
+ case X86::ADD16ri_DB: Desc = UpdateOp(MI, II, X86::OR16ri); break;
+ case X86::ADD32ri_DB: Desc = UpdateOp(MI, II, X86::OR32ri); break;
+ case X86::ADD64ri32_DB: Desc = UpdateOp(MI, II, X86::OR64ri32); break;
+ case X86::ADD16ri8_DB: Desc = UpdateOp(MI, II, X86::OR16ri8); break;
+ case X86::ADD32ri8_DB: Desc = UpdateOp(MI, II, X86::OR32ri8); break;
+ case X86::ADD64ri8_DB: Desc = UpdateOp(MI, II, X86::OR64ri8); break;
+ case X86::ACQUIRE_MOV8rm: Desc = UpdateOp(MI, II, X86::MOV8rm); break;
+ case X86::ACQUIRE_MOV16rm: Desc = UpdateOp(MI, II, X86::MOV16rm); break;
+ case X86::ACQUIRE_MOV32rm: Desc = UpdateOp(MI, II, X86::MOV32rm); break;
+ case X86::ACQUIRE_MOV64rm: Desc = UpdateOp(MI, II, X86::MOV64rm); break;
+ case X86::RELEASE_MOV8mr: Desc = UpdateOp(MI, II, X86::MOV8mr); break;
+ case X86::RELEASE_MOV16mr: Desc = UpdateOp(MI, II, X86::MOV16mr); break;
+ case X86::RELEASE_MOV32mr: Desc = UpdateOp(MI, II, X86::MOV32mr); break;
+ case X86::RELEASE_MOV64mr: Desc = UpdateOp(MI, II, X86::MOV64mr); break;
}
diff --git a/contrib/llvm/lib/Target/X86/X86InstrCompiler.td b/contrib/llvm/lib/Target/X86/X86InstrCompiler.td
index da28690..612b2fa 100644
--- a/contrib/llvm/lib/Target/X86/X86InstrCompiler.td
+++ b/contrib/llvm/lib/Target/X86/X86InstrCompiler.td
@@ -533,7 +533,7 @@ def ATOMSWAP6432 : I<0, Pseudo, (outs GR32:$dst1, GR32:$dst2),
// Memory barriers
// TODO: Get this to fold the constant into the instruction.
-let isCodeGenOnly = 1 in
+let isCodeGenOnly = 1, Defs = [EFLAGS] in
def OR32mrLocked : I<0x09, MRMDestMem, (outs), (ins i32mem:$dst, GR32:$zero),
"lock\n\t"
"or{l}\t{$zero, $dst|$dst, $zero}",
diff --git a/contrib/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/contrib/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
index 92874b9..c15b805 100644
--- a/contrib/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/contrib/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -2025,9 +2025,10 @@ bool InstCombiner::DoOneIteration(Function &F, unsigned Iteration) {
BasicBlock *InstParent = I->getParent();
BasicBlock::iterator InsertPos = I;
- if (!isa<PHINode>(Result)) // If combining a PHI, don't insert
- while (isa<PHINode>(InsertPos)) // middle of a block of PHIs.
- ++InsertPos;
+ // If we replace a PHI with something that isn't a PHI, fix up the
+ // insertion point.
+ if (!isa<PHINode>(Result) && isa<PHINode>(InsertPos))
+ InsertPos = InstParent->getFirstInsertionPt();
InstParent->getInstList().insert(InsertPos, Result);
diff --git a/contrib/llvm/tools/clang/include/clang/Driver/CC1Options.td b/contrib/llvm/tools/clang/include/clang/Driver/CC1Options.td
index 70ce0403..1a12e98 100644
--- a/contrib/llvm/tools/clang/include/clang/Driver/CC1Options.td
+++ b/contrib/llvm/tools/clang/include/clang/Driver/CC1Options.td
@@ -644,6 +644,17 @@ def isystem : JoinedOrSeparate<"-isystem">, MetaVarName<"<directory>">,
def iwithsysroot : JoinedOrSeparate<"-iwithsysroot">,MetaVarName<"<directory>">,
HelpText<"Add directory to SYSTEM include search path, "
"absolute paths are relative to -isysroot">;
+def internal_isystem : JoinedOrSeparate<"-internal-isystem">,
+ MetaVarName<"<directory>">,
+ HelpText<"Add directory to the internal system include search path; these "
+ "are assumed to not be user-provided and are used to model system "
+ "and standard headers' paths.">;
+def internal_externc_isystem : JoinedOrSeparate<"-internal-externc-isystem">,
+ MetaVarName<"<directory>">,
+ HelpText<"Add directory to the internal system include search path with "
+ "implicit extern \"C\" semantics; these are assumed to not be "
+ "user-provided and are used to model system and standard headers' "
+ "paths.">;
def iprefix : JoinedOrSeparate<"-iprefix">, MetaVarName<"<prefix>">,
HelpText<"Set the -iwithprefix/-iwithprefixbefore prefix">;
def iwithprefix : JoinedOrSeparate<"-iwithprefix">, MetaVarName<"<dir>">,
diff --git a/contrib/llvm/tools/clang/include/clang/Driver/ToolChain.h b/contrib/llvm/tools/clang/include/clang/Driver/ToolChain.h
index a5d51ca..2e6218a 100644
--- a/contrib/llvm/tools/clang/include/clang/Driver/ToolChain.h
+++ b/contrib/llvm/tools/clang/include/clang/Driver/ToolChain.h
@@ -195,15 +195,21 @@ public:
/// FIXME: this really belongs on some sort of DeploymentTarget abstraction
virtual bool hasBlocksRuntime() const { return true; }
+ /// \brief Add the clang cc1 arguments for system include paths.
+ ///
+ /// This routine is responsible for adding the necessary cc1 arguments to
+ /// include headers from standard system header directories.
+ virtual void AddClangSystemIncludeArgs(const ArgList &DriverArgs,
+ ArgStringList &CC1Args) const;
+
// GetCXXStdlibType - Determine the C++ standard library type to use with the
// given compilation arguments.
virtual CXXStdlibType GetCXXStdlibType(const ArgList &Args) const;
/// AddClangCXXStdlibIncludeArgs - Add the clang -cc1 level arguments to set
/// the include paths to use for the given C++ standard library type.
- virtual void AddClangCXXStdlibIncludeArgs(const ArgList &Args,
- ArgStringList &CmdArgs,
- bool ObjCXXAutoRefCount) const;
+ virtual void AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs,
+ ArgStringList &CC1Args) const;
/// AddCXXStdlibLibArgs - Add the system specific linker arguments to use
/// for the given C++ standard library type.
diff --git a/contrib/llvm/tools/clang/include/clang/Frontend/HeaderSearchOptions.h b/contrib/llvm/tools/clang/include/clang/Frontend/HeaderSearchOptions.h
index 92790e9..687f439 100644
--- a/contrib/llvm/tools/clang/include/clang/Frontend/HeaderSearchOptions.h
+++ b/contrib/llvm/tools/clang/include/clang/Frontend/HeaderSearchOptions.h
@@ -49,10 +49,24 @@ public:
/// path.
unsigned IgnoreSysRoot : 1;
+ /// \brief True if this entry is an internal search path.
+ ///
+ /// This typically indicates that users didn't directly provide it, but
+ /// instead it was provided by a compatibility layer for a particular
+ /// system. This isn't redundant with IsUserSupplied (even though perhaps
+ /// it should be) because that is false for user provided '-iwithprefix'
+ /// header search entries.
+ unsigned IsInternal : 1;
+
+ /// \brief True if this entry's headers should be wrapped in extern "C".
+ unsigned ImplicitExternC : 1;
+
Entry(StringRef path, frontend::IncludeDirGroup group,
- bool isUserSupplied, bool isFramework, bool ignoreSysRoot)
+ bool isUserSupplied, bool isFramework, bool ignoreSysRoot,
+ bool isInternal, bool implicitExternC)
: Path(path), Group(group), IsUserSupplied(isUserSupplied),
- IsFramework(isFramework), IgnoreSysRoot(ignoreSysRoot) {}
+ IsFramework(isFramework), IgnoreSysRoot(ignoreSysRoot),
+ IsInternal(isInternal), ImplicitExternC(implicitExternC) {}
};
/// If non-empty, the directory to use as a "virtual system root" for include
@@ -98,9 +112,10 @@ public:
/// AddPath - Add the \arg Path path to the specified \arg Group list.
void AddPath(StringRef Path, frontend::IncludeDirGroup Group,
- bool IsUserSupplied, bool IsFramework, bool IgnoreSysRoot) {
+ bool IsUserSupplied, bool IsFramework, bool IgnoreSysRoot,
+ bool IsInternal = false, bool ImplicitExternC = false) {
UserEntries.push_back(Entry(Path, Group, IsUserSupplied, IsFramework,
- IgnoreSysRoot));
+ IgnoreSysRoot, IsInternal, ImplicitExternC));
}
};
diff --git a/contrib/llvm/tools/clang/lib/Basic/Version.cpp b/contrib/llvm/tools/clang/lib/Basic/Version.cpp
index 390a685..526b2b4 100644
--- a/contrib/llvm/tools/clang/lib/Basic/Version.cpp
+++ b/contrib/llvm/tools/clang/lib/Basic/Version.cpp
@@ -32,7 +32,7 @@ std::string getClangRepositoryPath() {
// If the SVN_REPOSITORY is empty, try to use the SVN keyword. This helps us
// pick up a tag in an SVN export, for example.
- static StringRef SVNRepository("$URL: http://llvm.org/svn/llvm-project/cfe/branches/release_30/lib/Basic/Version.cpp $");
+ static StringRef SVNRepository("$URL: http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_30/final/lib/Basic/Version.cpp $");
if (URL.empty()) {
URL = SVNRepository.slice(SVNRepository.find(':'),
SVNRepository.find("/lib/Basic"));
diff --git a/contrib/llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp b/contrib/llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp
index d3da649..688e992 100644
--- a/contrib/llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp
+++ b/contrib/llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp
@@ -538,11 +538,12 @@ protected:
llvm::Value *cmd,
llvm::MDNode *node) {
CGBuilderTy &Builder = CGF.Builder;
- llvm::Value *imp = Builder.CreateCall2(MsgLookupFn,
- EnforceType(Builder, Receiver, IdTy),
- EnforceType(Builder, cmd, SelectorTy));
- cast<llvm::CallInst>(imp)->setMetadata(msgSendMDKind, node);
- return imp;
+ llvm::Value *args[] = {
+ EnforceType(Builder, Receiver, IdTy),
+ EnforceType(Builder, cmd, SelectorTy) };
+ llvm::CallSite imp = CGF.EmitCallOrInvoke(MsgLookupFn, args);
+ imp->setMetadata(msgSendMDKind, node);
+ return imp.getInstruction();
}
virtual llvm::Value *LookupIMPSuper(CodeGenFunction &CGF,
llvm::Value *ObjCSuper,
@@ -597,16 +598,17 @@ class CGObjCGNUstep : public CGObjCGNU {
// The lookup function is guaranteed not to capture the receiver pointer.
LookupFn->setDoesNotCapture(1);
- llvm::CallInst *slot =
- Builder.CreateCall3(LookupFn,
- EnforceType(Builder, ReceiverPtr, PtrToIdTy),
- EnforceType(Builder, cmd, SelectorTy),
- EnforceType(Builder, self, IdTy));
- slot->setOnlyReadsMemory();
+ llvm::Value *args[] = {
+ EnforceType(Builder, ReceiverPtr, PtrToIdTy),
+ EnforceType(Builder, cmd, SelectorTy),
+ EnforceType(Builder, self, IdTy) };
+ llvm::CallSite slot = CGF.EmitCallOrInvoke(LookupFn, args);
+ slot.setOnlyReadsMemory();
slot->setMetadata(msgSendMDKind, node);
// Load the imp from the slot
- llvm::Value *imp = Builder.CreateLoad(Builder.CreateStructGEP(slot, 4));
+ llvm::Value *imp =
+ Builder.CreateLoad(Builder.CreateStructGEP(slot.getInstruction(), 4));
// The lookup function may have changed the receiver, so make sure we use
// the new one.
@@ -1361,8 +1363,8 @@ llvm::Constant *CGObjCGNU::GenerateClassStructure(
LongTy, // abi_version
IvarOffsets->getType(), // ivar_offsets
Properties->getType(), // properties
- Int64Ty, // strong_pointers
- Int64Ty, // weak_pointers
+ IntPtrTy, // strong_pointers
+ IntPtrTy, // weak_pointers
NULL);
llvm::Constant *Zero = llvm::ConstantInt::get(LongTy, 0);
// Fill in the structure
@@ -1723,12 +1725,14 @@ void CGObjCGNU::GenerateProtocolHolderCategory(void) {
/// bitfield / with the 63rd bit set will be 1<<64.
llvm::Constant *CGObjCGNU::MakeBitField(llvm::SmallVectorImpl<bool> &bits) {
int bitCount = bits.size();
- if (bitCount < 64) {
+ int ptrBits =
+ (TheModule.getPointerSize() == llvm::Module::Pointer32) ? 32 : 64;
+ if (bitCount < ptrBits) {
uint64_t val = 1;
for (int i=0 ; i<bitCount ; ++i) {
if (bits[i]) val |= 1ULL<<(i+1);
}
- return llvm::ConstantInt::get(Int64Ty, val);
+ return llvm::ConstantInt::get(IntPtrTy, val);
}
llvm::SmallVector<llvm::Constant*, 8> values;
int v=0;
@@ -1748,8 +1752,6 @@ llvm::Constant *CGObjCGNU::MakeBitField(llvm::SmallVectorImpl<bool> &bits) {
llvm::Constant *GS = MakeGlobal(llvm::StructType::get(Int32Ty, arrayTy,
NULL), fields);
llvm::Constant *ptr = llvm::ConstantExpr::getPtrToInt(GS, IntPtrTy);
- if (IntPtrTy != Int64Ty)
- ptr = llvm::ConstantExpr::getZExt(ptr, Int64Ty);
return ptr;
}
@@ -2073,12 +2075,12 @@ void CGObjCGNU::GenerateClass(const ObjCImplementationDecl *OID) {
}
++ivarIndex;
}
- llvm::Constant *Zero64 = llvm::ConstantInt::get(Int64Ty, 0);
+ llvm::Constant *ZeroPtr = llvm::ConstantInt::get(IntPtrTy, 0);
//Generate metaclass for class methods
llvm::Constant *MetaClassStruct = GenerateClassStructure(NULLPtr,
NULLPtr, 0x12L, ClassName.c_str(), 0, Zeros[0], GenerateIvarList(
empty, empty, empty), ClassMethodList, NULLPtr,
- NULLPtr, NULLPtr, Zero64, Zero64, true);
+ NULLPtr, NULLPtr, ZeroPtr, ZeroPtr, true);
// Generate the class structure
llvm::Constant *ClassStruct =
diff --git a/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp b/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp
index 924ec84..275045c 100644
--- a/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp
@@ -29,6 +29,7 @@
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/Mangle.h"
#include "clang/AST/RecordLayout.h"
+#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/TargetInfo.h"
@@ -858,6 +859,59 @@ void CodeGenModule::EmitGlobal(GlobalDecl GD) {
}
}
+namespace {
+ struct FunctionIsDirectlyRecursive :
+ public RecursiveASTVisitor<FunctionIsDirectlyRecursive> {
+ const StringRef Name;
+ bool Result;
+ FunctionIsDirectlyRecursive(const FunctionDecl *F) :
+ Name(F->getName()), Result(false) {
+ }
+ typedef RecursiveASTVisitor<FunctionIsDirectlyRecursive> Base;
+
+ bool TraverseCallExpr(CallExpr *E) {
+ const Decl *D = E->getCalleeDecl();
+ if (!D)
+ return true;
+ AsmLabelAttr *Attr = D->getAttr<AsmLabelAttr>();
+ if (!Attr)
+ return true;
+ if (Name == Attr->getLabel()) {
+ Result = true;
+ return false;
+ }
+ return true;
+ }
+ };
+}
+
+// isTriviallyRecursiveViaAsm - Check if this function calls another
+// decl that, because of the asm attribute, ends up pointing to itself.
+bool
+CodeGenModule::isTriviallyRecursiveViaAsm(const FunctionDecl *F) {
+ if (getCXXABI().getMangleContext().shouldMangleDeclName(F))
+ return false;
+
+ FunctionIsDirectlyRecursive Walker(F);
+ Walker.TraverseFunctionDecl(const_cast<FunctionDecl*>(F));
+ return Walker.Result;
+}
+
+bool
+CodeGenModule::shouldEmitFunction(const FunctionDecl *F) {
+ if (getFunctionLinkage(F) != llvm::Function::AvailableExternallyLinkage)
+ return true;
+ if (CodeGenOpts.OptimizationLevel == 0 &&
+ !F->hasAttr<AlwaysInlineAttr>())
+ return false;
+ // PR9614. Avoid cases where the source code is lying to us. An available
+ // externally function should have an equivalent function somewhere else,
+ // but a function that calls itself is clearly not equivalent to the real
+ // implementation.
+ // This happens in glibc's btowc and in some configure checks.
+ return !isTriviallyRecursiveViaAsm(F);
+}
+
void CodeGenModule::EmitGlobalDefinition(GlobalDecl GD) {
const ValueDecl *D = cast<ValueDecl>(GD.getDecl());
@@ -868,10 +922,7 @@ void CodeGenModule::EmitGlobalDefinition(GlobalDecl GD) {
if (const FunctionDecl *Function = dyn_cast<FunctionDecl>(D)) {
// At -O0, don't generate IR for functions with available_externally
// linkage.
- if (CodeGenOpts.OptimizationLevel == 0 &&
- !Function->hasAttr<AlwaysInlineAttr>() &&
- getFunctionLinkage(Function)
- == llvm::Function::AvailableExternallyLinkage)
+ if (!shouldEmitFunction(Function))
return;
if (const CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(D)) {
diff --git a/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.h b/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.h
index 8e38a89..dbc6a87 100644
--- a/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.h
+++ b/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.h
@@ -324,6 +324,8 @@ class CodeGenModule : public CodeGenTypeCache {
void createOpenCLRuntime();
void createCUDARuntime();
+ bool isTriviallyRecursiveViaAsm(const FunctionDecl *F);
+ bool shouldEmitFunction(const FunctionDecl *F);
llvm::LLVMContext &VMContext;
/// @name Cache for Blocks Runtime Globals
diff --git a/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp b/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp
index d09ab16..9453848 100644
--- a/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp
+++ b/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp
@@ -211,6 +211,11 @@ std::string ToolChain::ComputeEffectiveClangTriple(const ArgList &Args,
return ComputeLLVMTriple(Args, InputType);
}
+void ToolChain::AddClangSystemIncludeArgs(const ArgList &DriverArgs,
+ ArgStringList &CC1Args) const {
+ // Each toolchain should provide the appropriate include flags.
+}
+
ToolChain::CXXStdlibType ToolChain::GetCXXStdlibType(const ArgList &Args) const{
if (Arg *A = Args.getLastArg(options::OPT_stdlib_EQ)) {
StringRef Value = A->getValue(Args);
@@ -225,24 +230,18 @@ ToolChain::CXXStdlibType ToolChain::GetCXXStdlibType(const ArgList &Args) const{
return ToolChain::CST_Libstdcxx;
}
-void ToolChain::AddClangCXXStdlibIncludeArgs(const ArgList &Args,
- ArgStringList &CmdArgs,
- bool ObjCXXAutoRefCount) const {
- CXXStdlibType Type = GetCXXStdlibType(Args);
-
- // Header search paths are handled by the mass of goop in InitHeaderSearch.
-
- switch (Type) {
- case ToolChain::CST_Libcxx:
- if (ObjCXXAutoRefCount)
- CmdArgs.push_back("-fobjc-arc-cxxlib=libc++");
- break;
-
- case ToolChain::CST_Libstdcxx:
- if (ObjCXXAutoRefCount)
- CmdArgs.push_back("-fobjc-arc-cxxlib=libstdc++");
- break;
- }
+void ToolChain::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs,
+ ArgStringList &CC1Args) const {
+ // Header search paths should be handled by each of the subclasses.
+ // Historically, they have not been, and instead have been handled inside of
+ // the CC1-layer frontend. As the logic is hoisted out, this generic function
+ // will slowly stop being called.
+ //
+ // While it is being called, replicate a bit of a hack to propagate the
+ // '-stdlib=' flag down to CC1 so that it can in turn customize the C++
+ // header search paths with it. Once all systems are overriding this
+ // function, the CC1 flag and this line can be removed.
+ DriverArgs.AddAllArgs(CC1Args, options::OPT_stdlib_EQ);
}
void ToolChain::AddCXXStdlibLibArgs(const ArgList &Args,
diff --git a/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp b/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp
index 4c62543..80394ac 100644
--- a/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp
+++ b/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp
@@ -40,6 +40,15 @@
#include "llvm/Config/config.h" // for CXX_INCLUDE_ROOT
+// Include the necessary headers to interface with the Windows registry and
+// environment.
+#ifdef _MSC_VER
+ #define WIN32_LEAN_AND_MEAN 1
+ #include <Windows.h>
+ #undef min
+ #undef max
+#endif
+
#ifndef CLANG_PREFIX
#define CLANG_PREFIX
#endif
@@ -48,6 +57,38 @@ using namespace clang::driver;
using namespace clang::driver::toolchains;
using namespace clang;
+/// \brief Utility function to add a system include directory to CC1 arguments.
+static void addSystemInclude(const ArgList &DriverArgs, ArgStringList &CC1Args,
+ const Twine &Path) {
+ CC1Args.push_back("-internal-isystem");
+ CC1Args.push_back(DriverArgs.MakeArgString(Path));
+}
+
+/// \brief Utility function to add a system include directory with extern "C"
+/// semantics to CC1 arguments.
+///
+/// Note that this should be used rarely, and only for directories that
+/// historically and for legacy reasons are treated as having implicit extern
+/// "C" semantics. These semantics are *ignored* by and large today, but its
+/// important to preserve the preprocessor changes resulting from the
+/// classification.
+static void addExternCSystemInclude(const ArgList &DriverArgs,
+ ArgStringList &CC1Args, const Twine &Path) {
+ CC1Args.push_back("-internal-externc-isystem");
+ CC1Args.push_back(DriverArgs.MakeArgString(Path));
+}
+
+/// \brief Utility function to add a list of system include directories to CC1.
+static void addSystemIncludes(const ArgList &DriverArgs,
+ ArgStringList &CC1Args,
+ ArrayRef<StringRef> Paths) {
+ for (ArrayRef<StringRef>::iterator I = Paths.begin(), E = Paths.end();
+ I != E; ++I) {
+ CC1Args.push_back("-internal-isystem");
+ CC1Args.push_back(DriverArgs.MakeArgString(*I));
+ }
+}
+
/// Darwin - Darwin tool chain for i386 and x86_64.
Darwin::Darwin(const HostInfo &Host, const llvm::Triple& Triple)
@@ -1389,19 +1430,6 @@ static bool IsUbuntu(enum LinuxDistro Distro) {
Distro == UbuntuNatty || Distro == UbuntuOneiric;
}
-// FIXME: This should be deleted. We should assume a multilib environment, and
-// fallback gracefully if any parts of it are absent.
-static bool HasMultilib(llvm::Triple::ArchType Arch, enum LinuxDistro Distro) {
- if (Arch == llvm::Triple::x86_64) {
- bool Exists;
- if (Distro == Exherbo &&
- (llvm::sys::fs::exists("/usr/lib32/libc.so", Exists) || !Exists))
- return false;
- }
-
- return true;
-}
-
static LinuxDistro DetectLinuxDistro(llvm::Triple::ArchType Arch) {
llvm::OwningPtr<llvm::MemoryBuffer> File;
if (!llvm::MemoryBuffer::getFile("/etc/lsb-release", File)) {
@@ -1486,280 +1514,293 @@ static LinuxDistro DetectLinuxDistro(llvm::Triple::ArchType Arch) {
return UnknownDistro;
}
-/// \brief Trivial helper function to simplify code checking path existence.
-static bool PathExists(StringRef Path) {
- bool Exists;
- if (!llvm::sys::fs::exists(Path, Exists))
- return Exists;
- return false;
-}
-
-namespace {
-/// \brief This is a class to find a viable GCC installation for Clang to use.
+/// \brief Parse a GCCVersion object out of a string of text.
///
-/// This class tries to find a GCC installation on the system, and report
-/// information about it. It starts from the host information provided to the
-/// Driver, and has logic for fuzzing that where appropriate.
-class GCCInstallationDetector {
- /// \brief Struct to store and manipulate GCC versions.
- ///
- /// We rely on assumptions about the form and structure of GCC version
- /// numbers: they consist of at most three '.'-separated components, and each
- /// component is a non-negative integer.
- struct GCCVersion {
- unsigned Major, Minor, Patch;
-
- static GCCVersion Parse(StringRef VersionText) {
- const GCCVersion BadVersion = {0, 0, 0};
- std::pair<StringRef, StringRef> First = VersionText.split('.');
- std::pair<StringRef, StringRef> Second = First.second.split('.');
-
- GCCVersion GoodVersion = {0, 0, 0};
- if (First.first.getAsInteger(10, GoodVersion.Major))
- return BadVersion;
- if (Second.first.getAsInteger(10, GoodVersion.Minor))
+/// This is the primary means of forming GCCVersion objects.
+/*static*/ Linux::GCCVersion Linux::GCCVersion::Parse(StringRef VersionText) {
+ const GCCVersion BadVersion = { VersionText.str(), -1, -1, -1, "" };
+ std::pair<StringRef, StringRef> First = VersionText.split('.');
+ std::pair<StringRef, StringRef> Second = First.second.split('.');
+
+ GCCVersion GoodVersion = { VersionText.str(), -1, -1, -1, "" };
+ if (First.first.getAsInteger(10, GoodVersion.Major) ||
+ GoodVersion.Major < 0)
+ return BadVersion;
+ if (Second.first.getAsInteger(10, GoodVersion.Minor) ||
+ GoodVersion.Minor < 0)
+ return BadVersion;
+
+ // First look for a number prefix and parse that if present. Otherwise just
+ // stash the entire patch string in the suffix, and leave the number
+ // unspecified. This covers versions strings such as:
+ // 4.4
+ // 4.4.0
+ // 4.4.x
+ // 4.4.2-rc4
+ // 4.4.x-patched
+ // And retains any patch number it finds.
+ StringRef PatchText = GoodVersion.PatchSuffix = Second.second.str();
+ if (!PatchText.empty()) {
+ if (unsigned EndNumber = PatchText.find_first_not_of("0123456789")) {
+ // Try to parse the number and any suffix.
+ if (PatchText.slice(0, EndNumber).getAsInteger(10, GoodVersion.Patch) ||
+ GoodVersion.Patch < 0)
return BadVersion;
- // We accept a number, or a string for the patch version, in case there
- // is a strang suffix, or other mangling: '4.1.x', '4.1.2-rc3'. When it
- // isn't a number, we just use '0' as the number but accept it.
- if (Second.first.getAsInteger(10, GoodVersion.Patch))
- GoodVersion.Patch = 0;
- return GoodVersion;
+ GoodVersion.PatchSuffix = PatchText.substr(EndNumber).str();
}
+ }
- bool operator<(const GCCVersion &RHS) const {
- if (Major < RHS.Major) return true;
- if (Major > RHS.Major) return false;
- if (Minor < RHS.Minor) return true;
- if (Minor > RHS.Minor) return false;
- return Patch < RHS.Patch;
- }
- bool operator>(const GCCVersion &RHS) const { return RHS < *this; }
- bool operator<=(const GCCVersion &RHS) const { return !(*this > RHS); }
- bool operator>=(const GCCVersion &RHS) const { return !(*this < RHS); }
- };
+ return GoodVersion;
+}
- bool IsValid;
- std::string GccTriple;
-
- // FIXME: These might be better as path objects.
- std::string GccInstallPath;
- std::string GccParentLibPath;
-
- llvm::SmallString<128> CxxIncludeRoot;
-
-public:
- /// \brief Construct a GCCInstallationDetector from the driver.
- ///
- /// This performs all of the autodetection and sets up the various paths.
- /// Once constructed, a GCCInstallation is esentially immutable.
- GCCInstallationDetector(const Driver &D)
- : IsValid(false),
- GccTriple(D.DefaultHostTriple),
- CxxIncludeRoot(CXX_INCLUDE_ROOT) {
- // FIXME: Using CXX_INCLUDE_ROOT is here is a bit of a hack, but
- // avoids adding yet another option to configure/cmake.
- // It would probably be cleaner to break it in two variables
- // CXX_GCC_ROOT with just /foo/bar
- // CXX_GCC_VER with 4.5.2
- // Then we would have
- // CXX_INCLUDE_ROOT = CXX_GCC_ROOT/include/c++/CXX_GCC_VER
- // and this function would return
- // CXX_GCC_ROOT/lib/gcc/CXX_INCLUDE_ARCH/CXX_GCC_VER
- if (CxxIncludeRoot != "") {
- // This is of the form /foo/bar/include/c++/4.5.2/
- if (CxxIncludeRoot.back() == '/')
- llvm::sys::path::remove_filename(CxxIncludeRoot); // remove the /
- StringRef Version = llvm::sys::path::filename(CxxIncludeRoot);
- llvm::sys::path::remove_filename(CxxIncludeRoot); // remove the version
- llvm::sys::path::remove_filename(CxxIncludeRoot); // remove the c++
- llvm::sys::path::remove_filename(CxxIncludeRoot); // remove the include
- GccInstallPath = CxxIncludeRoot.str();
- GccInstallPath.append("/lib/gcc/");
- GccInstallPath.append(CXX_INCLUDE_ARCH);
- GccInstallPath.append("/");
- GccInstallPath.append(Version);
- GccParentLibPath = GccInstallPath + "/../../..";
- IsValid = true;
- return;
- }
+/// \brief Less-than for GCCVersion, implementing a Strict Weak Ordering.
+bool Linux::GCCVersion::operator<(const GCCVersion &RHS) const {
+ if (Major < RHS.Major) return true; if (Major > RHS.Major) return false;
+ if (Minor < RHS.Minor) return true; if (Minor > RHS.Minor) return false;
- llvm::Triple::ArchType HostArch = llvm::Triple(GccTriple).getArch();
- // The library directories which may contain GCC installations.
- SmallVector<StringRef, 4> CandidateLibDirs;
- // The compatible GCC triples for this particular architecture.
- SmallVector<StringRef, 10> CandidateTriples;
- CollectLibDirsAndTriples(HostArch, CandidateLibDirs, CandidateTriples);
-
- // Always include the default host triple as the final fallback if no
- // specific triple is detected.
- CandidateTriples.push_back(D.DefaultHostTriple);
-
- // Compute the set of prefixes for our search.
- SmallVector<std::string, 8> Prefixes(D.PrefixDirs.begin(),
- D.PrefixDirs.end());
- Prefixes.push_back(D.SysRoot);
- Prefixes.push_back(D.SysRoot + "/usr");
- Prefixes.push_back(D.InstalledDir + "/..");
-
- // Loop over the various components which exist and select the best GCC
- // installation available. GCC installs are ranked by version number.
- GCCVersion BestVersion = {0, 0, 0};
- for (unsigned i = 0, ie = Prefixes.size(); i < ie; ++i) {
- if (!PathExists(Prefixes[i]))
- continue;
- for (unsigned j = 0, je = CandidateLibDirs.size(); j < je; ++j) {
- const std::string LibDir = Prefixes[i] + CandidateLibDirs[j].str();
- if (!PathExists(LibDir))
- continue;
- for (unsigned k = 0, ke = CandidateTriples.size(); k < ke; ++k)
- ScanLibDirForGCCTriple(LibDir, CandidateTriples[k], BestVersion);
- }
- }
+ // Note that we rank versions with *no* patch specified is better than ones
+ // hard-coding a patch version. Thus if the RHS has no patch, it always
+ // wins, and the LHS only wins if it has no patch and the RHS does have
+ // a patch.
+ if (RHS.Patch == -1) return true; if (Patch == -1) return false;
+ if (Patch < RHS.Patch) return true; if (Patch > RHS.Patch) return false;
+
+ // Finally, between completely tied version numbers, the version with the
+ // suffix loses as we prefer full releases.
+ if (RHS.PatchSuffix.empty()) return true;
+ return false;
+}
+
+/// \brief Construct a GCCInstallationDetector from the driver.
+///
+/// This performs all of the autodetection and sets up the various paths.
+/// Once constructed, a GCCInstallation is esentially immutable.
+Linux::GCCInstallationDetector::GCCInstallationDetector(const Driver &D)
+ : IsValid(false),
+ GccTriple(D.DefaultHostTriple) {
+ // FIXME: Using CXX_INCLUDE_ROOT is here is a bit of a hack, but
+ // avoids adding yet another option to configure/cmake.
+ // It would probably be cleaner to break it in two variables
+ // CXX_GCC_ROOT with just /foo/bar
+ // CXX_GCC_VER with 4.5.2
+ // Then we would have
+ // CXX_INCLUDE_ROOT = CXX_GCC_ROOT/include/c++/CXX_GCC_VER
+ // and this function would return
+ // CXX_GCC_ROOT/lib/gcc/CXX_INCLUDE_ARCH/CXX_GCC_VER
+ llvm::SmallString<128> CxxIncludeRoot(CXX_INCLUDE_ROOT);
+ if (CxxIncludeRoot != "") {
+ // This is of the form /foo/bar/include/c++/4.5.2/
+ if (CxxIncludeRoot.back() == '/')
+ llvm::sys::path::remove_filename(CxxIncludeRoot); // remove the /
+ StringRef Version = llvm::sys::path::filename(CxxIncludeRoot);
+ llvm::sys::path::remove_filename(CxxIncludeRoot); // remove the version
+ llvm::sys::path::remove_filename(CxxIncludeRoot); // remove the c++
+ llvm::sys::path::remove_filename(CxxIncludeRoot); // remove the include
+ GccInstallPath = CxxIncludeRoot.str();
+ GccInstallPath.append("/lib/gcc/");
+ GccInstallPath.append(CXX_INCLUDE_ARCH);
+ GccInstallPath.append("/");
+ GccInstallPath.append(Version);
+ GccParentLibPath = GccInstallPath + "/../../..";
+ IsValid = true;
+ return;
}
- /// \brief Check whether we detected a valid GCC install.
- bool isValid() const { return IsValid; }
-
- /// \brief Get the GCC triple for the detected install.
- const std::string &getTriple() const { return GccTriple; }
-
- /// \brief Get the detected GCC installation path.
- const std::string &getInstallPath() const { return GccInstallPath; }
-
- /// \brief Get the detected GCC parent lib path.
- const std::string &getParentLibPath() const { return GccParentLibPath; }
-
-private:
- static void CollectLibDirsAndTriples(llvm::Triple::ArchType HostArch,
- SmallVectorImpl<StringRef> &LibDirs,
- SmallVectorImpl<StringRef> &Triples) {
- if (HostArch == llvm::Triple::arm || HostArch == llvm::Triple::thumb) {
- static const char *const ARMLibDirs[] = { "/lib" };
- static const char *const ARMTriples[] = { "arm-linux-gnueabi" };
- LibDirs.append(ARMLibDirs, ARMLibDirs + llvm::array_lengthof(ARMLibDirs));
- Triples.append(ARMTriples, ARMTriples + llvm::array_lengthof(ARMTriples));
- } else if (HostArch == llvm::Triple::x86_64) {
- static const char *const X86_64LibDirs[] = { "/lib64", "/lib" };
- static const char *const X86_64Triples[] = {
- "x86_64-linux-gnu",
- "x86_64-unknown-linux-gnu",
- "x86_64-pc-linux-gnu",
- "x86_64-redhat-linux6E",
- "x86_64-redhat-linux",
- "x86_64-suse-linux",
- "x86_64-manbo-linux-gnu",
- "x86_64-linux-gnu",
- "x86_64-slackware-linux"
- };
- LibDirs.append(X86_64LibDirs,
- X86_64LibDirs + llvm::array_lengthof(X86_64LibDirs));
- Triples.append(X86_64Triples,
- X86_64Triples + llvm::array_lengthof(X86_64Triples));
- } else if (HostArch == llvm::Triple::x86) {
- static const char *const X86LibDirs[] = { "/lib32", "/lib" };
- static const char *const X86Triples[] = {
- "i686-linux-gnu",
- "i386-linux-gnu",
- "i686-pc-linux-gnu",
- "i486-linux-gnu",
- "i686-redhat-linux",
- "i386-redhat-linux",
- "i586-suse-linux",
- "i486-slackware-linux"
- };
- LibDirs.append(X86LibDirs, X86LibDirs + llvm::array_lengthof(X86LibDirs));
- Triples.append(X86Triples, X86Triples + llvm::array_lengthof(X86Triples));
- } else if (HostArch == llvm::Triple::ppc) {
- static const char *const PPCLibDirs[] = { "/lib32", "/lib" };
- static const char *const PPCTriples[] = {
- "powerpc-linux-gnu",
- "powerpc-unknown-linux-gnu"
- };
- LibDirs.append(PPCLibDirs, PPCLibDirs + llvm::array_lengthof(PPCLibDirs));
- Triples.append(PPCTriples, PPCTriples + llvm::array_lengthof(PPCTriples));
- } else if (HostArch == llvm::Triple::ppc64) {
- static const char *const PPC64LibDirs[] = { "/lib64", "/lib" };
- static const char *const PPC64Triples[] = {
- "powerpc64-unknown-linux-gnu"
- };
- LibDirs.append(PPC64LibDirs,
- PPC64LibDirs + llvm::array_lengthof(PPC64LibDirs));
- Triples.append(PPC64Triples,
- PPC64Triples + llvm::array_lengthof(PPC64Triples));
+ llvm::Triple::ArchType HostArch = llvm::Triple(GccTriple).getArch();
+ // The library directories which may contain GCC installations.
+ SmallVector<StringRef, 4> CandidateLibDirs;
+ // The compatible GCC triples for this particular architecture.
+ SmallVector<StringRef, 10> CandidateTriples;
+ CollectLibDirsAndTriples(HostArch, CandidateLibDirs, CandidateTriples);
+
+ // Always include the default host triple as the final fallback if no
+ // specific triple is detected.
+ CandidateTriples.push_back(D.DefaultHostTriple);
+
+ // Compute the set of prefixes for our search.
+ SmallVector<std::string, 8> Prefixes(D.PrefixDirs.begin(),
+ D.PrefixDirs.end());
+ Prefixes.push_back(D.SysRoot);
+ Prefixes.push_back(D.SysRoot + "/usr");
+ Prefixes.push_back(D.InstalledDir + "/..");
+
+ // Loop over the various components which exist and select the best GCC
+ // installation available. GCC installs are ranked by version number.
+ Version = GCCVersion::Parse("0.0.0");
+ for (unsigned i = 0, ie = Prefixes.size(); i < ie; ++i) {
+ if (!llvm::sys::fs::exists(Prefixes[i]))
+ continue;
+ for (unsigned j = 0, je = CandidateLibDirs.size(); j < je; ++j) {
+ const std::string LibDir = Prefixes[i] + CandidateLibDirs[j].str();
+ if (!llvm::sys::fs::exists(LibDir))
+ continue;
+ for (unsigned k = 0, ke = CandidateTriples.size(); k < ke; ++k)
+ ScanLibDirForGCCTriple(HostArch, LibDir, CandidateTriples[k]);
}
}
+}
- void ScanLibDirForGCCTriple(const std::string &LibDir,
- StringRef CandidateTriple,
- GCCVersion &BestVersion) {
- // There are various different suffixes involving the triple we
- // check for. We also record what is necessary to walk from each back
- // up to the lib directory.
- const std::string Suffixes[] = {
- "/gcc/" + CandidateTriple.str(),
- "/" + CandidateTriple.str() + "/gcc/" + CandidateTriple.str(),
-
- // Ubuntu has a strange mis-matched pair of triples that this happens to
- // match.
- // FIXME: It may be worthwhile to generalize this and look for a second
- // triple.
- "/" + CandidateTriple.str() + "/gcc/i686-linux-gnu"
+/*static*/ void Linux::GCCInstallationDetector::CollectLibDirsAndTriples(
+ llvm::Triple::ArchType HostArch, SmallVectorImpl<StringRef> &LibDirs,
+ SmallVectorImpl<StringRef> &Triples) {
+ if (HostArch == llvm::Triple::arm || HostArch == llvm::Triple::thumb) {
+ static const char *const ARMLibDirs[] = { "/lib" };
+ static const char *const ARMTriples[] = { "arm-linux-gnueabi" };
+ LibDirs.append(ARMLibDirs, ARMLibDirs + llvm::array_lengthof(ARMLibDirs));
+ Triples.append(ARMTriples, ARMTriples + llvm::array_lengthof(ARMTriples));
+ } else if (HostArch == llvm::Triple::x86_64) {
+ static const char *const X86_64LibDirs[] = { "/lib64", "/lib" };
+ static const char *const X86_64Triples[] = {
+ "x86_64-linux-gnu",
+ "x86_64-unknown-linux-gnu",
+ "x86_64-pc-linux-gnu",
+ "x86_64-redhat-linux6E",
+ "x86_64-redhat-linux",
+ "x86_64-suse-linux",
+ "x86_64-manbo-linux-gnu",
+ "x86_64-linux-gnu",
+ "x86_64-slackware-linux"
};
- const std::string InstallSuffixes[] = {
- "/../../..",
- "/../../../..",
- "/../../../.."
+ LibDirs.append(X86_64LibDirs,
+ X86_64LibDirs + llvm::array_lengthof(X86_64LibDirs));
+ Triples.append(X86_64Triples,
+ X86_64Triples + llvm::array_lengthof(X86_64Triples));
+ } else if (HostArch == llvm::Triple::x86) {
+ static const char *const X86LibDirs[] = { "/lib32", "/lib" };
+ static const char *const X86Triples[] = {
+ "i686-linux-gnu",
+ "i686-pc-linux-gnu",
+ "i486-linux-gnu",
+ "i386-linux-gnu",
+ "i686-redhat-linux",
+ "i586-redhat-linux",
+ "i386-redhat-linux",
+ "i586-suse-linux",
+ "i486-slackware-linux"
};
- // Only look at the final, weird Ubuntu suffix for i386-linux-gnu.
- const unsigned NumSuffixes = (llvm::array_lengthof(Suffixes) -
- (CandidateTriple != "i386-linux-gnu"));
- for (unsigned i = 0; i < NumSuffixes; ++i) {
- StringRef Suffix = Suffixes[i];
- llvm::error_code EC;
- for (llvm::sys::fs::directory_iterator LI(LibDir + Suffix, EC), LE;
- !EC && LI != LE; LI = LI.increment(EC)) {
- StringRef VersionText = llvm::sys::path::filename(LI->path());
- GCCVersion CandidateVersion = GCCVersion::Parse(VersionText);
- static const GCCVersion MinVersion = { 4, 1, 1 };
- if (CandidateVersion < MinVersion)
- continue;
- if (CandidateVersion <= BestVersion)
- continue;
- if (!PathExists(LI->path() + "/crtbegin.o"))
- continue;
+ LibDirs.append(X86LibDirs, X86LibDirs + llvm::array_lengthof(X86LibDirs));
+ Triples.append(X86Triples, X86Triples + llvm::array_lengthof(X86Triples));
+ } else if (HostArch == llvm::Triple::ppc) {
+ static const char *const PPCLibDirs[] = { "/lib32", "/lib" };
+ static const char *const PPCTriples[] = {
+ "powerpc-linux-gnu",
+ "powerpc-unknown-linux-gnu"
+ };
+ LibDirs.append(PPCLibDirs, PPCLibDirs + llvm::array_lengthof(PPCLibDirs));
+ Triples.append(PPCTriples, PPCTriples + llvm::array_lengthof(PPCTriples));
+ } else if (HostArch == llvm::Triple::ppc64) {
+ static const char *const PPC64LibDirs[] = { "/lib64", "/lib" };
+ static const char *const PPC64Triples[] = {
+ "powerpc64-unknown-linux-gnu"
+ };
+ LibDirs.append(PPC64LibDirs,
+ PPC64LibDirs + llvm::array_lengthof(PPC64LibDirs));
+ Triples.append(PPC64Triples,
+ PPC64Triples + llvm::array_lengthof(PPC64Triples));
+ }
+}
- BestVersion = CandidateVersion;
- GccTriple = CandidateTriple.str();
- // FIXME: We hack together the directory name here instead of
- // using LI to ensure stable path separators across Windows and
- // Linux.
- GccInstallPath = LibDir + Suffixes[i] + "/" + VersionText.str();
- GccParentLibPath = GccInstallPath + InstallSuffixes[i];
- IsValid = true;
- }
+void Linux::GCCInstallationDetector::ScanLibDirForGCCTriple(
+ llvm::Triple::ArchType HostArch, const std::string &LibDir,
+ StringRef CandidateTriple) {
+ // There are various different suffixes involving the triple we
+ // check for. We also record what is necessary to walk from each back
+ // up to the lib directory.
+ const std::string Suffixes[] = {
+ "/gcc/" + CandidateTriple.str(),
+ "/" + CandidateTriple.str() + "/gcc/" + CandidateTriple.str(),
+
+ // Ubuntu has a strange mis-matched pair of triples that this happens to
+ // match.
+ // FIXME: It may be worthwhile to generalize this and look for a second
+ // triple.
+ "/i386-linux-gnu/gcc/" + CandidateTriple.str()
+ };
+ const std::string InstallSuffixes[] = {
+ "/../../..",
+ "/../../../..",
+ "/../../../.."
+ };
+ // Only look at the final, weird Ubuntu suffix for i386-linux-gnu.
+ const unsigned NumSuffixes = (llvm::array_lengthof(Suffixes) -
+ (HostArch != llvm::Triple::x86));
+ for (unsigned i = 0; i < NumSuffixes; ++i) {
+ StringRef Suffix = Suffixes[i];
+ llvm::error_code EC;
+ for (llvm::sys::fs::directory_iterator LI(LibDir + Suffix, EC), LE;
+ !EC && LI != LE; LI = LI.increment(EC)) {
+ StringRef VersionText = llvm::sys::path::filename(LI->path());
+ GCCVersion CandidateVersion = GCCVersion::Parse(VersionText);
+ static const GCCVersion MinVersion = { "4.1.1", 4, 1, 1, "" };
+ if (CandidateVersion < MinVersion)
+ continue;
+ if (CandidateVersion <= Version)
+ continue;
+ if (!llvm::sys::fs::exists(LI->path() + "/crtbegin.o"))
+ continue;
+
+ Version = CandidateVersion;
+ GccTriple = CandidateTriple.str();
+ // FIXME: We hack together the directory name here instead of
+ // using LI to ensure stable path separators across Windows and
+ // Linux.
+ GccInstallPath = LibDir + Suffixes[i] + "/" + VersionText.str();
+ GccParentLibPath = GccInstallPath + InstallSuffixes[i];
+ IsValid = true;
}
}
-};
}
-static void addPathIfExists(const std::string &Path,
- ToolChain::path_list &Paths) {
- if (PathExists(Path)) Paths.push_back(Path);
+static void addPathIfExists(Twine Path, ToolChain::path_list &Paths) {
+ if (llvm::sys::fs::exists(Path)) Paths.push_back(Path.str());
+}
+
+/// \brief Get our best guess at the multiarch triple for a target.
+///
+/// Debian-based systems are starting to use a multiarch setup where they use
+/// a target-triple directory in the library and header search paths.
+/// Unfortunately, this triple does not align with the vanilla target triple,
+/// so we provide a rough mapping here.
+static std::string getMultiarchTriple(const llvm::Triple TargetTriple,
+ StringRef SysRoot) {
+ // For most architectures, just use whatever we have rather than trying to be
+ // clever.
+ switch (TargetTriple.getArch()) {
+ default:
+ return TargetTriple.str();
+
+ // We use the existence of '/lib/<triple>' as a directory to detect some
+ // common linux triples that don't quite match the Clang triple for both
+ // 32-bit and 64-bit targets. This works around annoying discrepancies on
+ // Debian-based systems.
+ case llvm::Triple::x86:
+ if (llvm::sys::fs::exists(SysRoot + "/lib/i686-linux-gnu"))
+ return "i686-linux-gnu";
+ if (llvm::sys::fs::exists(SysRoot + "/lib/i386-linux-gnu"))
+ return "i386-linux-gnu";
+ return TargetTriple.str();
+ case llvm::Triple::x86_64:
+ if (llvm::sys::fs::exists(SysRoot + "/lib/x86_64-linux-gnu"))
+ return "x86_64-linux-gnu";
+ if (llvm::sys::fs::exists(SysRoot + "/lib/x86_64-pc-linux-gnu"))
+ return "x86_64-pc-linux-gnu";
+ if (llvm::sys::fs::exists(SysRoot + "/lib/x86_64-unknown-linux-gnu"))
+ return "x86_64-unknown-linux-gnu";
+ return TargetTriple.str();
+ }
}
Linux::Linux(const HostInfo &Host, const llvm::Triple &Triple)
- : Generic_ELF(Host, Triple) {
+ : Generic_ELF(Host, Triple), GCCInstallation(getDriver()) {
llvm::Triple::ArchType Arch =
llvm::Triple(getDriver().DefaultHostTriple).getArch();
const std::string &SysRoot = getDriver().SysRoot;
- GCCInstallationDetector GCCInstallation(getDriver());
// OpenSuse stores the linker with the compiler, add that to the search
// path.
ToolChain::path_list &PPaths = getProgramPaths();
- PPaths.push_back(GCCInstallation.getParentLibPath() + "/../" +
- GCCInstallation.getTriple() + "/bin");
+ PPaths.push_back(Twine(GCCInstallation.getParentLibPath() + "/../" +
+ GCCInstallation.getTriple() + "/bin").str());
Linker = GetProgramPath("ld");
@@ -1808,50 +1849,43 @@ Linux::Linux(const HostInfo &Host, const llvm::Triple &Triple)
const std::string Suffix64 = Arch == llvm::Triple::x86_64 ? "" : "/64";
const std::string Suffix = Is32Bits ? Suffix32 : Suffix64;
const std::string Multilib = Is32Bits ? "lib32" : "lib64";
+ const std::string MultiarchTriple = getMultiarchTriple(Triple, SysRoot);
- // FIXME: Because we add paths only when they exist on the system, I think we
- // should remove the concept of 'HasMultilib'. It's more likely to break the
- // behavior than to preserve any useful invariant on the system.
- if (HasMultilib(Arch, Distro)) {
- // Add the multilib suffixed paths.
- if (GCCInstallation.isValid()) {
- const std::string &LibPath = GCCInstallation.getParentLibPath();
- const std::string &GccTriple = GCCInstallation.getTriple();
- // FIXME: This OpenSuse-specific path shouldn't be needed any more, but
- // I don't want to remove it without finding someone to test.
- if (IsOpenSuse(Distro) && Is32Bits)
- Paths.push_back(LibPath + "/../" + GccTriple + "/lib/../lib");
-
- addPathIfExists(GCCInstallation.getInstallPath() + Suffix, Paths);
- addPathIfExists(LibPath + "/../" + GccTriple + "/lib/../" + Multilib,
- Paths);
- addPathIfExists(LibPath + "/../" + Multilib, Paths);
- }
- addPathIfExists(SysRoot + "/lib/../" + Multilib, Paths);
- addPathIfExists(SysRoot + "/usr/lib/../" + Multilib, Paths);
-
- // Try walking via the GCC triple path in case of multiarch GCC
- // installations with strange symlinks.
- if (GCCInstallation.isValid())
- addPathIfExists(SysRoot + "/usr/lib/" + GCCInstallation.getTriple() +
- "/../../" + Multilib, Paths);
+ // Add the multilib suffixed paths where they are available.
+ if (GCCInstallation.isValid()) {
+ const std::string &LibPath = GCCInstallation.getParentLibPath();
+ const std::string &GccTriple = GCCInstallation.getTriple();
+ addPathIfExists(GCCInstallation.getInstallPath() + Suffix, Paths);
+ addPathIfExists(LibPath + "/../" + GccTriple + "/lib/../" + Multilib,
+ Paths);
+ addPathIfExists(LibPath + "/" + MultiarchTriple, Paths);
+ addPathIfExists(LibPath + "/../" + Multilib, Paths);
}
+ addPathIfExists(SysRoot + "/lib/" + MultiarchTriple, Paths);
+ addPathIfExists(SysRoot + "/lib/../" + Multilib, Paths);
+ addPathIfExists(SysRoot + "/usr/lib/" + MultiarchTriple, Paths);
+ addPathIfExists(SysRoot + "/usr/lib/../" + Multilib, Paths);
+
+ // Try walking via the GCC triple path in case of multiarch GCC
+ // installations with strange symlinks.
+ if (GCCInstallation.isValid())
+ addPathIfExists(SysRoot + "/usr/lib/" + GCCInstallation.getTriple() +
+ "/../../" + Multilib, Paths);
// Add the non-multilib suffixed paths (if potentially different).
if (GCCInstallation.isValid()) {
const std::string &LibPath = GCCInstallation.getParentLibPath();
const std::string &GccTriple = GCCInstallation.getTriple();
- if (!Suffix.empty() || !HasMultilib(Arch, Distro))
+ if (!Suffix.empty())
addPathIfExists(GCCInstallation.getInstallPath(), Paths);
addPathIfExists(LibPath + "/../" + GccTriple + "/lib", Paths);
+ addPathIfExists(LibPath + "/" + MultiarchTriple, Paths);
addPathIfExists(LibPath, Paths);
}
+ addPathIfExists(SysRoot + "/lib/" + MultiarchTriple, Paths);
addPathIfExists(SysRoot + "/lib", Paths);
+ addPathIfExists(SysRoot + "/usr/lib/" + MultiarchTriple, Paths);
addPathIfExists(SysRoot + "/usr/lib", Paths);
-
- // Add a multiarch lib directory whenever it exists and is plausible.
- if (GCCInstallation.isValid() && Arch == getArch())
- addPathIfExists(SysRoot + "/usr/lib/" + GCCInstallation.getTriple(), Paths);
}
bool Linux::HasNativeLLVMSupport() const {
@@ -1889,6 +1923,161 @@ Tool &Linux::SelectTool(const Compilation &C, const JobAction &JA,
return *T;
}
+void Linux::AddClangSystemIncludeArgs(const ArgList &DriverArgs,
+ ArgStringList &CC1Args) const {
+ const Driver &D = getDriver();
+
+ if (DriverArgs.hasArg(options::OPT_nostdinc))
+ return;
+
+ if (!DriverArgs.hasArg(options::OPT_nostdlibinc))
+ addSystemInclude(DriverArgs, CC1Args, D.SysRoot + "/usr/local/include");
+
+ if (!DriverArgs.hasArg(options::OPT_nobuiltininc)) {
+ llvm::sys::Path P(D.ResourceDir);
+ P.appendComponent("include");
+ addSystemInclude(DriverArgs, CC1Args, P.str());
+ }
+
+ if (DriverArgs.hasArg(options::OPT_nostdlibinc))
+ return;
+
+ // Check for configure-time C include directories.
+ StringRef CIncludeDirs(C_INCLUDE_DIRS);
+ if (CIncludeDirs != "") {
+ SmallVector<StringRef, 5> dirs;
+ CIncludeDirs.split(dirs, ":");
+ for (SmallVectorImpl<StringRef>::iterator I = dirs.begin(), E = dirs.end();
+ I != E; ++I) {
+ StringRef Prefix = llvm::sys::path::is_absolute(*I) ? D.SysRoot : "";
+ addExternCSystemInclude(DriverArgs, CC1Args, Prefix + *I);
+ }
+ return;
+ }
+
+ // Lacking those, try to detect the correct set of system includes for the
+ // target triple.
+
+ // Implement generic Debian multiarch support.
+ const StringRef X86_64MultiarchIncludeDirs[] = {
+ "/usr/include/x86_64-linux-gnu",
+
+ // FIXME: These are older forms of multiarch. It's not clear that they're
+ // in use in any released version of Debian, so we should consider
+ // removing them.
+ "/usr/include/i686-linux-gnu/64",
+ "/usr/include/i486-linux-gnu/64"
+ };
+ const StringRef X86MultiarchIncludeDirs[] = {
+ "/usr/include/i386-linux-gnu",
+
+ // FIXME: These are older forms of multiarch. It's not clear that they're
+ // in use in any released version of Debian, so we should consider
+ // removing them.
+ "/usr/include/x86_64-linux-gnu/32",
+ "/usr/include/i686-linux-gnu",
+ "/usr/include/i486-linux-gnu"
+ };
+ const StringRef ARMMultiarchIncludeDirs[] = {
+ "/usr/include/arm-linux-gnueabi"
+ };
+ ArrayRef<StringRef> MultiarchIncludeDirs;
+ if (getTriple().getArch() == llvm::Triple::x86_64) {
+ MultiarchIncludeDirs = X86_64MultiarchIncludeDirs;
+ } else if (getTriple().getArch() == llvm::Triple::x86) {
+ MultiarchIncludeDirs = X86MultiarchIncludeDirs;
+ } else if (getTriple().getArch() == llvm::Triple::arm) {
+ MultiarchIncludeDirs = ARMMultiarchIncludeDirs;
+ }
+ for (ArrayRef<StringRef>::iterator I = MultiarchIncludeDirs.begin(),
+ E = MultiarchIncludeDirs.end();
+ I != E; ++I) {
+ if (llvm::sys::fs::exists(*I)) {
+ addExternCSystemInclude(DriverArgs, CC1Args, D.SysRoot + *I);
+ break;
+ }
+ }
+
+ if (getTriple().getOS() == llvm::Triple::RTEMS)
+ return;
+
+ addExternCSystemInclude(DriverArgs, CC1Args, D.SysRoot + "/usr/include");
+}
+
+static bool addLibStdCXXIncludePaths(Twine Base, Twine TargetArchDir,
+ const ArgList &DriverArgs,
+ ArgStringList &CC1Args) {
+ if (!llvm::sys::fs::exists(Base))
+ return false;
+ addSystemInclude(DriverArgs, CC1Args, Base);
+ addSystemInclude(DriverArgs, CC1Args, Base + "/" + TargetArchDir);
+ addSystemInclude(DriverArgs, CC1Args, Base + "/backward");
+ return true;
+}
+
+void Linux::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs,
+ ArgStringList &CC1Args) const {
+ if (DriverArgs.hasArg(options::OPT_nostdlibinc) ||
+ DriverArgs.hasArg(options::OPT_nostdincxx))
+ return;
+
+ // Check if libc++ has been enabled and provide its include paths if so.
+ if (GetCXXStdlibType(DriverArgs) == ToolChain::CST_Libcxx) {
+ // libc++ is always installed at a fixed path on Linux currently.
+ addSystemInclude(DriverArgs, CC1Args,
+ getDriver().SysRoot + "/usr/include/c++/v1");
+ return;
+ }
+
+ const llvm::Triple &TargetTriple = getTriple();
+ const llvm::Triple::ArchType TargetArch = TargetTriple.getArch();
+ bool IsTarget64Bit = (TargetArch == llvm::Triple::x86_64 ||
+ TargetArch == llvm::Triple::ppc64);
+
+ StringRef CxxIncludeRoot(CXX_INCLUDE_ROOT);
+ if (!CxxIncludeRoot.empty()) {
+ StringRef CxxIncludeArch(CXX_INCLUDE_ARCH);
+ if (CxxIncludeArch.empty())
+ CxxIncludeArch = TargetTriple.str();
+
+ addLibStdCXXIncludePaths(
+ CxxIncludeRoot,
+ CxxIncludeArch + (IsTarget64Bit ? CXX_INCLUDE_64BIT_DIR
+ : CXX_INCLUDE_32BIT_DIR),
+ DriverArgs, CC1Args);
+ return;
+ }
+
+ // Check if the target architecture specific dirs need a suffix. Note that we
+ // only support the suffix-based bi-arch-like header scheme for host/target
+ // mismatches of just bit width.
+ llvm::Triple::ArchType HostArch =
+ llvm::Triple(getDriver().DefaultHostTriple).getArch();
+ StringRef Suffix;
+ if ((HostArch == llvm::Triple::x86 && TargetArch == llvm::Triple::x86_64) ||
+ (HostArch == llvm::Triple::ppc && TargetArch == llvm::Triple::ppc64))
+ Suffix = "/64";
+ if ((HostArch == llvm::Triple::x86_64 && TargetArch == llvm::Triple::x86) ||
+ (HostArch == llvm::Triple::ppc64 && TargetArch == llvm::Triple::ppc))
+ Suffix = "/32";
+
+ // By default, look for the C++ headers in an include directory adjacent to
+ // the lib directory of the GCC installation. Note that this is expect to be
+ // equivalent to '/usr/include/c++/X.Y' in almost all cases.
+ StringRef LibDir = GCCInstallation.getParentLibPath();
+ StringRef InstallDir = GCCInstallation.getInstallPath();
+ StringRef Version = GCCInstallation.getVersion();
+ if (!addLibStdCXXIncludePaths(LibDir + "/../include/c++/" + Version,
+ GCCInstallation.getTriple() + Suffix,
+ DriverArgs, CC1Args)) {
+ // Gentoo is weird and places its headers inside the GCC install, so if the
+ // first attempt to find the headers fails, try this pattern.
+ addLibStdCXXIncludePaths(InstallDir + "/include/g++-v4",
+ GCCInstallation.getTriple() + Suffix,
+ DriverArgs, CC1Args);
+ }
+}
+
/// DragonFly - DragonFly tool chain which can call as(1) and ld(1) directly.
DragonFly::DragonFly(const HostInfo &Host, const llvm::Triple& Triple)
@@ -1990,3 +2179,258 @@ const char *Windows::GetForcedPicModel() const {
return "pic";
return 0;
}
+
+// FIXME: This probably should goto to some platform utils place.
+#ifdef _MSC_VER
+
+/// \brief Read registry string.
+/// This also supports a means to look for high-versioned keys by use
+/// of a $VERSION placeholder in the key path.
+/// $VERSION in the key path is a placeholder for the version number,
+/// causing the highest value path to be searched for and used.
+/// I.e. "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\$VERSION".
+/// There can be additional characters in the component. Only the numberic
+/// characters are compared.
+static bool getSystemRegistryString(const char *keyPath, const char *valueName,
+ char *value, size_t maxLength) {
+ HKEY hRootKey = NULL;
+ HKEY hKey = NULL;
+ const char* subKey = NULL;
+ DWORD valueType;
+ DWORD valueSize = maxLength - 1;
+ long lResult;
+ bool returnValue = false;
+
+ if (strncmp(keyPath, "HKEY_CLASSES_ROOT\\", 18) == 0) {
+ hRootKey = HKEY_CLASSES_ROOT;
+ subKey = keyPath + 18;
+ } else if (strncmp(keyPath, "HKEY_USERS\\", 11) == 0) {
+ hRootKey = HKEY_USERS;
+ subKey = keyPath + 11;
+ } else if (strncmp(keyPath, "HKEY_LOCAL_MACHINE\\", 19) == 0) {
+ hRootKey = HKEY_LOCAL_MACHINE;
+ subKey = keyPath + 19;
+ } else if (strncmp(keyPath, "HKEY_CURRENT_USER\\", 18) == 0) {
+ hRootKey = HKEY_CURRENT_USER;
+ subKey = keyPath + 18;
+ } else {
+ return false;
+ }
+
+ const char *placeHolder = strstr(subKey, "$VERSION");
+ char bestName[256];
+ bestName[0] = '\0';
+ // If we have a $VERSION placeholder, do the highest-version search.
+ if (placeHolder) {
+ const char *keyEnd = placeHolder - 1;
+ const char *nextKey = placeHolder;
+ // Find end of previous key.
+ while ((keyEnd > subKey) && (*keyEnd != '\\'))
+ keyEnd--;
+ // Find end of key containing $VERSION.
+ while (*nextKey && (*nextKey != '\\'))
+ nextKey++;
+ size_t partialKeyLength = keyEnd - subKey;
+ char partialKey[256];
+ if (partialKeyLength > sizeof(partialKey))
+ partialKeyLength = sizeof(partialKey);
+ strncpy(partialKey, subKey, partialKeyLength);
+ partialKey[partialKeyLength] = '\0';
+ HKEY hTopKey = NULL;
+ lResult = RegOpenKeyEx(hRootKey, partialKey, 0, KEY_READ, &hTopKey);
+ if (lResult == ERROR_SUCCESS) {
+ char keyName[256];
+ int bestIndex = -1;
+ double bestValue = 0.0;
+ DWORD index, size = sizeof(keyName) - 1;
+ for (index = 0; RegEnumKeyEx(hTopKey, index, keyName, &size, NULL,
+ NULL, NULL, NULL) == ERROR_SUCCESS; index++) {
+ const char *sp = keyName;
+ while (*sp && !isdigit(*sp))
+ sp++;
+ if (!*sp)
+ continue;
+ const char *ep = sp + 1;
+ while (*ep && (isdigit(*ep) || (*ep == '.')))
+ ep++;
+ char numBuf[32];
+ strncpy(numBuf, sp, sizeof(numBuf) - 1);
+ numBuf[sizeof(numBuf) - 1] = '\0';
+ double value = strtod(numBuf, NULL);
+ if (value > bestValue) {
+ bestIndex = (int)index;
+ bestValue = value;
+ strcpy(bestName, keyName);
+ }
+ size = sizeof(keyName) - 1;
+ }
+ // If we found the highest versioned key, open the key and get the value.
+ if (bestIndex != -1) {
+ // Append rest of key.
+ strncat(bestName, nextKey, sizeof(bestName) - 1);
+ bestName[sizeof(bestName) - 1] = '\0';
+ // Open the chosen key path remainder.
+ lResult = RegOpenKeyEx(hTopKey, bestName, 0, KEY_READ, &hKey);
+ if (lResult == ERROR_SUCCESS) {
+ lResult = RegQueryValueEx(hKey, valueName, NULL, &valueType,
+ (LPBYTE)value, &valueSize);
+ if (lResult == ERROR_SUCCESS)
+ returnValue = true;
+ RegCloseKey(hKey);
+ }
+ }
+ RegCloseKey(hTopKey);
+ }
+ } else {
+ lResult = RegOpenKeyEx(hRootKey, subKey, 0, KEY_READ, &hKey);
+ if (lResult == ERROR_SUCCESS) {
+ lResult = RegQueryValueEx(hKey, valueName, NULL, &valueType,
+ (LPBYTE)value, &valueSize);
+ if (lResult == ERROR_SUCCESS)
+ returnValue = true;
+ RegCloseKey(hKey);
+ }
+ }
+ return returnValue;
+}
+
+/// \brief Get Windows SDK installation directory.
+static bool getWindowsSDKDir(std::string &path) {
+ char windowsSDKInstallDir[256];
+ // Try the Windows registry.
+ bool hasSDKDir = getSystemRegistryString(
+ "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\$VERSION",
+ "InstallationFolder",
+ windowsSDKInstallDir,
+ sizeof(windowsSDKInstallDir) - 1);
+ // If we have both vc80 and vc90, pick version we were compiled with.
+ if (hasSDKDir && windowsSDKInstallDir[0]) {
+ path = windowsSDKInstallDir;
+ return true;
+ }
+ return false;
+}
+
+ // Get Visual Studio installation directory.
+static bool getVisualStudioDir(std::string &path) {
+ // First check the environment variables that vsvars32.bat sets.
+ const char* vcinstalldir = getenv("VCINSTALLDIR");
+ if (vcinstalldir) {
+ char *p = const_cast<char *>(strstr(vcinstalldir, "\\VC"));
+ if (p)
+ *p = '\0';
+ path = vcinstalldir;
+ return true;
+ }
+
+ char vsIDEInstallDir[256];
+ char vsExpressIDEInstallDir[256];
+ // Then try the windows registry.
+ bool hasVCDir = getSystemRegistryString(
+ "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\$VERSION",
+ "InstallDir", vsIDEInstallDir, sizeof(vsIDEInstallDir) - 1);
+ bool hasVCExpressDir = getSystemRegistryString(
+ "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\$VERSION",
+ "InstallDir", vsExpressIDEInstallDir, sizeof(vsExpressIDEInstallDir) - 1);
+ // If we have both vc80 and vc90, pick version we were compiled with.
+ if (hasVCDir && vsIDEInstallDir[0]) {
+ char *p = (char*)strstr(vsIDEInstallDir, "\\Common7\\IDE");
+ if (p)
+ *p = '\0';
+ path = vsIDEInstallDir;
+ return true;
+ }
+
+ if (hasVCExpressDir && vsExpressIDEInstallDir[0]) {
+ char *p = (char*)strstr(vsExpressIDEInstallDir, "\\Common7\\IDE");
+ if (p)
+ *p = '\0';
+ path = vsExpressIDEInstallDir;
+ return true;
+ }
+
+ // Try the environment.
+ const char *vs100comntools = getenv("VS100COMNTOOLS");
+ const char *vs90comntools = getenv("VS90COMNTOOLS");
+ const char *vs80comntools = getenv("VS80COMNTOOLS");
+ const char *vscomntools = NULL;
+
+ // Try to find the version that we were compiled with
+ if(false) {}
+ #if (_MSC_VER >= 1600) // VC100
+ else if(vs100comntools) {
+ vscomntools = vs100comntools;
+ }
+ #elif (_MSC_VER == 1500) // VC80
+ else if(vs90comntools) {
+ vscomntools = vs90comntools;
+ }
+ #elif (_MSC_VER == 1400) // VC80
+ else if(vs80comntools) {
+ vscomntools = vs80comntools;
+ }
+ #endif
+ // Otherwise find any version we can
+ else if (vs100comntools)
+ vscomntools = vs100comntools;
+ else if (vs90comntools)
+ vscomntools = vs90comntools;
+ else if (vs80comntools)
+ vscomntools = vs80comntools;
+
+ if (vscomntools && *vscomntools) {
+ const char *p = strstr(vscomntools, "\\Common7\\Tools");
+ path = p ? std::string(vscomntools, p) : vscomntools;
+ return true;
+ }
+ return false;
+}
+
+#endif // _MSC_VER
+
+void Windows::AddClangSystemIncludeArgs(const ArgList &DriverArgs,
+ ArgStringList &CC1Args) const {
+ if (DriverArgs.hasArg(options::OPT_nostdinc))
+ return;
+
+ if (!DriverArgs.hasArg(options::OPT_nobuiltininc)) {
+ llvm::sys::Path P(getDriver().ResourceDir);
+ P.appendComponent("include");
+ addSystemInclude(DriverArgs, CC1Args, P.str());
+ }
+
+ if (DriverArgs.hasArg(options::OPT_nostdlibinc))
+ return;
+
+ std::string VSDir;
+ std::string WindowsSDKDir;
+
+#ifdef _MSC_VER
+ // When built with access to the proper Windows APIs, try to actually find
+ // the correct include paths first.
+ if (getVisualStudioDir(VSDir)) {
+ addSystemInclude(DriverArgs, CC1Args, VSDir + "\\VC\\include");
+ if (getWindowsSDKDir(WindowsSDKDir))
+ addSystemInclude(DriverArgs, CC1Args, WindowsSDKDir + "\\include");
+ else
+ addSystemInclude(DriverArgs, CC1Args,
+ VSDir + "\\VC\\PlatformSDK\\Include");
+ return;
+ }
+#endif // _MSC_VER
+
+ // As a fallback, select default install paths.
+ const StringRef Paths[] = {
+ "C:/Program Files/Microsoft Visual Studio 10.0/VC/include",
+ "C:/Program Files/Microsoft Visual Studio 9.0/VC/include",
+ "C:/Program Files/Microsoft Visual Studio 9.0/VC/PlatformSDK/Include",
+ "C:/Program Files/Microsoft Visual Studio 8/VC/include",
+ "C:/Program Files/Microsoft Visual Studio 8/VC/PlatformSDK/Include"
+ };
+ addSystemIncludes(DriverArgs, CC1Args, Paths);
+}
+
+void Windows::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs,
+ ArgStringList &CC1Args) const {
+ // FIXME: There should probably be logic here to find libc++ on Windows.
+}
diff --git a/contrib/llvm/tools/clang/lib/Driver/ToolChains.h b/contrib/llvm/tools/clang/lib/Driver/ToolChains.h
index dfcb253..0e4d67c 100644
--- a/contrib/llvm/tools/clang/lib/Driver/ToolChains.h
+++ b/contrib/llvm/tools/clang/lib/Driver/ToolChains.h
@@ -372,6 +372,86 @@ public:
};
class LLVM_LIBRARY_VISIBILITY Linux : public Generic_ELF {
+ /// \brief Struct to store and manipulate GCC versions.
+ ///
+ /// We rely on assumptions about the form and structure of GCC version
+ /// numbers: they consist of at most three '.'-separated components, and each
+ /// component is a non-negative integer except for the last component. For
+ /// the last component we are very flexible in order to tolerate release
+ /// candidates or 'x' wildcards.
+ ///
+ /// Note that the ordering established among GCCVersions is based on the
+ /// preferred version string to use. For example we prefer versions without
+ /// a hard-coded patch number to those with a hard coded patch number.
+ ///
+ /// Currently this doesn't provide any logic for textual suffixes to patches
+ /// in the way that (for example) Debian's version format does. If that ever
+ /// becomes necessary, it can be added.
+ struct GCCVersion {
+ /// \brief The unparsed text of the version.
+ std::string Text;
+
+ /// \brief The parsed major, minor, and patch numbers.
+ int Major, Minor, Patch;
+
+ /// \brief Any textual suffix on the patch number.
+ std::string PatchSuffix;
+
+ static GCCVersion Parse(StringRef VersionText);
+ bool operator<(const GCCVersion &RHS) const;
+ bool operator>(const GCCVersion &RHS) const { return RHS < *this; }
+ bool operator<=(const GCCVersion &RHS) const { return !(*this > RHS); }
+ bool operator>=(const GCCVersion &RHS) const { return !(*this < RHS); }
+ };
+
+
+ /// \brief This is a class to find a viable GCC installation for Clang to
+ /// use.
+ ///
+ /// This class tries to find a GCC installation on the system, and report
+ /// information about it. It starts from the host information provided to the
+ /// Driver, and has logic for fuzzing that where appropriate.
+ class GCCInstallationDetector {
+
+ bool IsValid;
+ std::string GccTriple;
+
+ // FIXME: These might be better as path objects.
+ std::string GccInstallPath;
+ std::string GccParentLibPath;
+
+ GCCVersion Version;
+
+ public:
+ GCCInstallationDetector(const Driver &D);
+
+ /// \brief Check whether we detected a valid GCC install.
+ bool isValid() const { return IsValid; }
+
+ /// \brief Get the GCC triple for the detected install.
+ StringRef getTriple() const { return GccTriple; }
+
+ /// \brief Get the detected GCC installation path.
+ StringRef getInstallPath() const { return GccInstallPath; }
+
+ /// \brief Get the detected GCC parent lib path.
+ StringRef getParentLibPath() const { return GccParentLibPath; }
+
+ /// \brief Get the detected GCC version string.
+ StringRef getVersion() const { return Version.Text; }
+
+ private:
+ static void CollectLibDirsAndTriples(llvm::Triple::ArchType HostArch,
+ SmallVectorImpl<StringRef> &LibDirs,
+ SmallVectorImpl<StringRef> &Triples);
+
+ void ScanLibDirForGCCTriple(llvm::Triple::ArchType HostArch,
+ const std::string &LibDir,
+ StringRef CandidateTriple);
+ };
+
+ GCCInstallationDetector GCCInstallation;
+
public:
Linux(const HostInfo &Host, const llvm::Triple& Triple);
@@ -380,6 +460,11 @@ public:
virtual Tool &SelectTool(const Compilation &C, const JobAction &JA,
const ActionList &Inputs) const;
+ virtual void AddClangSystemIncludeArgs(const ArgList &DriverArgs,
+ ArgStringList &CC1Args) const;
+ virtual void AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs,
+ ArgStringList &CC1Args) const;
+
std::string Linker;
std::vector<std::string> ExtraOpts;
};
@@ -417,6 +502,12 @@ public:
virtual bool IsUnwindTablesDefault() const;
virtual const char *GetDefaultRelocationModel() const;
virtual const char *GetForcedPicModel() const;
+
+ virtual void AddClangSystemIncludeArgs(const ArgList &DriverArgs,
+ ArgStringList &CC1Args) const;
+ virtual void AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs,
+ ArgStringList &CC1Args) const;
+
};
} // end namespace toolchains
diff --git a/contrib/llvm/tools/clang/lib/Driver/Tools.cpp b/contrib/llvm/tools/clang/lib/Driver/Tools.cpp
index 75cadc6..d9423d2 100644
--- a/contrib/llvm/tools/clang/lib/Driver/Tools.cpp
+++ b/contrib/llvm/tools/clang/lib/Driver/Tools.cpp
@@ -364,16 +364,6 @@ void Clang::AddPreprocessingOptions(const Driver &D,
Args.AddAllArgs(CmdArgs, options::OPT_I_Group, options::OPT_F,
options::OPT_index_header_map);
- // Add C++ include arguments, if needed.
- types::ID InputType = Inputs[0].getType();
- if (types::isCXX(InputType)) {
- bool ObjCXXAutoRefCount
- = types::isObjC(InputType) && isObjCAutoRefCount(Args);
- getToolChain().AddClangCXXStdlibIncludeArgs(Args, CmdArgs,
- ObjCXXAutoRefCount);
- Args.AddAllArgs(CmdArgs, options::OPT_stdlib_EQ);
- }
-
// Add -Wp, and -Xassembler if using the preprocessor.
// FIXME: There is a very unfortunate problem here, some troubled
@@ -428,6 +418,13 @@ void Clang::AddPreprocessingOptions(const Driver &D,
// OBJCPLUS_INCLUDE_PATH - system includes enabled when compiling ObjC++.
AddIncludeDirectoryList(Args, CmdArgs, "-objcxx-isystem",
::getenv("OBJCPLUS_INCLUDE_PATH"));
+
+ // Add C++ include arguments, if needed.
+ if (types::isCXX(Inputs[0].getType()))
+ getToolChain().AddClangCXXStdlibIncludeArgs(Args, CmdArgs);
+
+ // Add system include arguments.
+ getToolChain().AddClangSystemIncludeArgs(Args, CmdArgs);
}
/// getARMTargetCPU - Get the (LLVM) name of the ARM cpu we are targeting.
@@ -1966,6 +1963,16 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
if (ARC) {
CmdArgs.push_back("-fobjc-arc");
+ // FIXME: It seems like this entire block, and several around it should be
+ // wrapped in isObjC, but for now we just use it here as this is where it
+ // was being used previously.
+ if (types::isCXX(InputType) && types::isObjC(InputType)) {
+ if (getToolChain().GetCXXStdlibType(Args) == ToolChain::CST_Libcxx)
+ CmdArgs.push_back("-fobjc-arc-cxxlib=libc++");
+ else
+ CmdArgs.push_back("-fobjc-arc-cxxlib=libstdc++");
+ }
+
// Allow the user to enable full exceptions code emission.
// We define off for Objective-CC, on for Objective-C++.
if (Args.hasFlag(options::OPT_fobjc_arc_exceptions,
diff --git a/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp b/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp
index 432407a..e926b89 100644
--- a/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp
@@ -569,10 +569,18 @@ static void HeaderSearchOptsToArgs(const HeaderSearchOptions &Opts,
break;
}
} else {
- if (E.Group != frontend::Angled && E.Group != frontend::System)
- llvm::report_fatal_error("Invalid option set!");
- Res.push_back(E.Group == frontend::Angled ? "-iwithprefixbefore" :
- "-iwithprefix");
+ if (E.IsInternal) {
+ assert(E.Group == frontend::System && "Unexpected header search group");
+ if (E.ImplicitExternC)
+ Res.push_back("-internal-externc-isystem");
+ else
+ Res.push_back("-internal-isystem");
+ } else {
+ if (E.Group != frontend::Angled && E.Group != frontend::System)
+ llvm::report_fatal_error("Invalid option set!");
+ Res.push_back(E.Group == frontend::Angled ? "-iwithprefixbefore" :
+ "-iwithprefix");
+ }
}
Res.push_back(E.Path);
}
@@ -1464,6 +1472,15 @@ static void ParseHeaderSearchArgs(HeaderSearchOptions &Opts, ArgList &Args) {
ie = Args.filtered_end(); it != ie; ++it)
Opts.AddPath((*it)->getValue(Args), frontend::ObjCXXSystem, true, false,
true);
+
+ // Add the internal paths from a driver that detects standard include paths.
+ for (arg_iterator I = Args.filtered_begin(OPT_internal_isystem,
+ OPT_internal_externc_isystem),
+ E = Args.filtered_end();
+ I != E; ++I)
+ Opts.AddPath((*I)->getValue(Args), frontend::System,
+ false, false, /*IgnoreSysRoot=*/true, /*IsInternal=*/true,
+ (*I)->getOption().matches(OPT_internal_externc_isystem));
}
void CompilerInvocation::setLangDefaults(LangOptions &Opts, InputKind IK,
diff --git a/contrib/llvm/tools/clang/lib/Frontend/InitHeaderSearch.cpp b/contrib/llvm/tools/clang/lib/Frontend/InitHeaderSearch.cpp
index 43b6d4c..1b1c551 100644
--- a/contrib/llvm/tools/clang/lib/Frontend/InitHeaderSearch.cpp
+++ b/contrib/llvm/tools/clang/lib/Frontend/InitHeaderSearch.cpp
@@ -28,12 +28,9 @@
#include "llvm/ADT/Triple.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Support/raw_ostream.h"
+#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Path.h"
#include "llvm/Config/config.h"
-#ifdef _MSC_VER
- #define WIN32_LEAN_AND_MEAN 1
- #include <windows.h>
-#endif
#ifndef CLANG_PREFIX
#define CLANG_PREFIX
#endif
@@ -211,219 +208,6 @@ void InitHeaderSearch::AddMinGW64CXXPaths(StringRef Base,
CXXSystem, true, false, false);
}
- // FIXME: This probably should goto to some platform utils place.
-#ifdef _MSC_VER
-
- // Read registry string.
- // This also supports a means to look for high-versioned keys by use
- // of a $VERSION placeholder in the key path.
- // $VERSION in the key path is a placeholder for the version number,
- // causing the highest value path to be searched for and used.
- // I.e. "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\$VERSION".
- // There can be additional characters in the component. Only the numberic
- // characters are compared.
-static bool getSystemRegistryString(const char *keyPath, const char *valueName,
- char *value, size_t maxLength) {
- HKEY hRootKey = NULL;
- HKEY hKey = NULL;
- const char* subKey = NULL;
- DWORD valueType;
- DWORD valueSize = maxLength - 1;
- long lResult;
- bool returnValue = false;
-
- if (strncmp(keyPath, "HKEY_CLASSES_ROOT\\", 18) == 0) {
- hRootKey = HKEY_CLASSES_ROOT;
- subKey = keyPath + 18;
- } else if (strncmp(keyPath, "HKEY_USERS\\", 11) == 0) {
- hRootKey = HKEY_USERS;
- subKey = keyPath + 11;
- } else if (strncmp(keyPath, "HKEY_LOCAL_MACHINE\\", 19) == 0) {
- hRootKey = HKEY_LOCAL_MACHINE;
- subKey = keyPath + 19;
- } else if (strncmp(keyPath, "HKEY_CURRENT_USER\\", 18) == 0) {
- hRootKey = HKEY_CURRENT_USER;
- subKey = keyPath + 18;
- }
- else
- return false;
-
- const char *placeHolder = strstr(subKey, "$VERSION");
- char bestName[256];
- bestName[0] = '\0';
- // If we have a $VERSION placeholder, do the highest-version search.
- if (placeHolder) {
- const char *keyEnd = placeHolder - 1;
- const char *nextKey = placeHolder;
- // Find end of previous key.
- while ((keyEnd > subKey) && (*keyEnd != '\\'))
- keyEnd--;
- // Find end of key containing $VERSION.
- while (*nextKey && (*nextKey != '\\'))
- nextKey++;
- size_t partialKeyLength = keyEnd - subKey;
- char partialKey[256];
- if (partialKeyLength > sizeof(partialKey))
- partialKeyLength = sizeof(partialKey);
- strncpy(partialKey, subKey, partialKeyLength);
- partialKey[partialKeyLength] = '\0';
- HKEY hTopKey = NULL;
- lResult = RegOpenKeyEx(hRootKey, partialKey, 0, KEY_READ, &hTopKey);
- if (lResult == ERROR_SUCCESS) {
- char keyName[256];
- int bestIndex = -1;
- double bestValue = 0.0;
- DWORD index, size = sizeof(keyName) - 1;
- for (index = 0; RegEnumKeyEx(hTopKey, index, keyName, &size, NULL,
- NULL, NULL, NULL) == ERROR_SUCCESS; index++) {
- const char *sp = keyName;
- while (*sp && !isdigit(*sp))
- sp++;
- if (!*sp)
- continue;
- const char *ep = sp + 1;
- while (*ep && (isdigit(*ep) || (*ep == '.')))
- ep++;
- char numBuf[32];
- strncpy(numBuf, sp, sizeof(numBuf) - 1);
- numBuf[sizeof(numBuf) - 1] = '\0';
- double value = strtod(numBuf, NULL);
- if (value > bestValue) {
- bestIndex = (int)index;
- bestValue = value;
- strcpy(bestName, keyName);
- }
- size = sizeof(keyName) - 1;
- }
- // If we found the highest versioned key, open the key and get the value.
- if (bestIndex != -1) {
- // Append rest of key.
- strncat(bestName, nextKey, sizeof(bestName) - 1);
- bestName[sizeof(bestName) - 1] = '\0';
- // Open the chosen key path remainder.
- lResult = RegOpenKeyEx(hTopKey, bestName, 0, KEY_READ, &hKey);
- if (lResult == ERROR_SUCCESS) {
- lResult = RegQueryValueEx(hKey, valueName, NULL, &valueType,
- (LPBYTE)value, &valueSize);
- if (lResult == ERROR_SUCCESS)
- returnValue = true;
- RegCloseKey(hKey);
- }
- }
- RegCloseKey(hTopKey);
- }
- }
- else {
- lResult = RegOpenKeyEx(hRootKey, subKey, 0, KEY_READ, &hKey);
- if (lResult == ERROR_SUCCESS) {
- lResult = RegQueryValueEx(hKey, valueName, NULL, &valueType,
- (LPBYTE)value, &valueSize);
- if (lResult == ERROR_SUCCESS)
- returnValue = true;
- RegCloseKey(hKey);
- }
- }
- return returnValue;
-}
-#else // _MSC_VER
- // Read registry string.
-static bool getSystemRegistryString(const char*, const char*, char*, size_t) {
- return(false);
-}
-#endif // _MSC_VER
-
- // Get Visual Studio installation directory.
-static bool getVisualStudioDir(std::string &path) {
- // First check the environment variables that vsvars32.bat sets.
- const char* vcinstalldir = getenv("VCINSTALLDIR");
- if (vcinstalldir) {
- char *p = const_cast<char *>(strstr(vcinstalldir, "\\VC"));
- if (p)
- *p = '\0';
- path = vcinstalldir;
- return true;
- }
-
- char vsIDEInstallDir[256];
- char vsExpressIDEInstallDir[256];
- // Then try the windows registry.
- bool hasVCDir = getSystemRegistryString(
- "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\$VERSION",
- "InstallDir", vsIDEInstallDir, sizeof(vsIDEInstallDir) - 1);
- bool hasVCExpressDir = getSystemRegistryString(
- "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\$VERSION",
- "InstallDir", vsExpressIDEInstallDir, sizeof(vsExpressIDEInstallDir) - 1);
- // If we have both vc80 and vc90, pick version we were compiled with.
- if (hasVCDir && vsIDEInstallDir[0]) {
- char *p = (char*)strstr(vsIDEInstallDir, "\\Common7\\IDE");
- if (p)
- *p = '\0';
- path = vsIDEInstallDir;
- return true;
- }
-
- if (hasVCExpressDir && vsExpressIDEInstallDir[0]) {
- char *p = (char*)strstr(vsExpressIDEInstallDir, "\\Common7\\IDE");
- if (p)
- *p = '\0';
- path = vsExpressIDEInstallDir;
- return true;
- }
-
- // Try the environment.
- const char *vs100comntools = getenv("VS100COMNTOOLS");
- const char *vs90comntools = getenv("VS90COMNTOOLS");
- const char *vs80comntools = getenv("VS80COMNTOOLS");
- const char *vscomntools = NULL;
-
- // Try to find the version that we were compiled with
- if(false) {}
- #if (_MSC_VER >= 1600) // VC100
- else if(vs100comntools) {
- vscomntools = vs100comntools;
- }
- #elif (_MSC_VER == 1500) // VC80
- else if(vs90comntools) {
- vscomntools = vs90comntools;
- }
- #elif (_MSC_VER == 1400) // VC80
- else if(vs80comntools) {
- vscomntools = vs80comntools;
- }
- #endif
- // Otherwise find any version we can
- else if (vs100comntools)
- vscomntools = vs100comntools;
- else if (vs90comntools)
- vscomntools = vs90comntools;
- else if (vs80comntools)
- vscomntools = vs80comntools;
-
- if (vscomntools && *vscomntools) {
- const char *p = strstr(vscomntools, "\\Common7\\Tools");
- path = p ? std::string(vscomntools, p) : vscomntools;
- return true;
- }
- return false;
-}
-
- // Get Windows SDK installation directory.
-static bool getWindowsSDKDir(std::string &path) {
- char windowsSDKInstallDir[256];
- // Try the Windows registry.
- bool hasSDKDir = getSystemRegistryString(
- "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\$VERSION",
- "InstallationFolder",
- windowsSDKInstallDir,
- sizeof(windowsSDKInstallDir) - 1);
- // If we have both vc80 and vc90, pick version we were compiled with.
- if (hasSDKDir && windowsSDKInstallDir[0]) {
- path = windowsSDKInstallDir;
- return(true);
- }
- return(false);
-}
-
void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple,
const HeaderSearchOptions &HSOpts) {
llvm::Triple::OSType os = triple.getOS();
@@ -468,33 +252,10 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple,
}
switch (os) {
- case llvm::Triple::Win32: {
- std::string VSDir;
- std::string WindowsSDKDir;
- if (getVisualStudioDir(VSDir)) {
- AddPath(VSDir + "\\VC\\include", System, false, false, false);
- if (getWindowsSDKDir(WindowsSDKDir))
- AddPath(WindowsSDKDir + "\\include", System, false, false, false);
- else
- AddPath(VSDir + "\\VC\\PlatformSDK\\Include",
- System, false, false, false);
- } else {
- // Default install paths.
- AddPath("C:/Program Files/Microsoft Visual Studio 10.0/VC/include",
- System, false, false, false);
- AddPath("C:/Program Files/Microsoft Visual Studio 9.0/VC/include",
- System, false, false, false);
- AddPath(
- "C:/Program Files/Microsoft Visual Studio 9.0/VC/PlatformSDK/Include",
- System, false, false, false);
- AddPath("C:/Program Files/Microsoft Visual Studio 8/VC/include",
- System, false, false, false);
- AddPath(
- "C:/Program Files/Microsoft Visual Studio 8/VC/PlatformSDK/Include",
- System, false, false, false);
- }
- break;
- }
+ case llvm::Triple::Linux:
+ case llvm::Triple::Win32:
+ llvm_unreachable("Include management is handled in the driver.");
+
case llvm::Triple::Haiku:
AddPath("/boot/common/include", System, true, false, false);
AddPath("/boot/develop/headers/os", System, true, false, false);
@@ -564,19 +325,6 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple,
System, false, false, false);
break;
- case llvm::Triple::Linux:
- // Generic Debian multiarch support:
- if (triple.getArch() == llvm::Triple::x86_64) {
- AddPath("/usr/include/x86_64-linux-gnu", System, false, false, false);
- AddPath("/usr/include/i686-linux-gnu/64", System, false, false, false);
- AddPath("/usr/include/i486-linux-gnu/64", System, false, false, false);
- } else if (triple.getArch() == llvm::Triple::x86) {
- AddPath("/usr/include/x86_64-linux-gnu/32", System, false, false, false);
- AddPath("/usr/include/i686-linux-gnu", System, false, false, false);
- AddPath("/usr/include/i486-linux-gnu", System, false, false, false);
- } else if (triple.getArch() == llvm::Triple::arm) {
- AddPath("/usr/include/arm-linux-gnueabi", System, false, false, false);
- }
default:
break;
}
@@ -637,6 +385,10 @@ AddDefaultCPlusPlusIncludePaths(const llvm::Triple &triple, const HeaderSearchOp
}
switch (os) {
+ case llvm::Triple::Linux:
+ case llvm::Triple::Win32:
+ llvm_unreachable("Include management is handled in the driver.");
+
case llvm::Triple::Cygwin:
// Cygwin-1.7
AddMinGWCPlusPlusIncludePaths("/usr/lib/gcc", "i686-pc-cygwin", "4.3.4");
@@ -664,257 +416,6 @@ AddDefaultCPlusPlusIncludePaths(const llvm::Triple &triple, const HeaderSearchOp
case llvm::Triple::DragonFly:
AddPath("/usr/include/c++/4.1", CXXSystem, true, false, false);
break;
- case llvm::Triple::Linux:
- //===------------------------------------------------------------------===//
- // Debian based distros.
- // Note: these distros symlink /usr/include/c++/X.Y.Z -> X.Y
- //===------------------------------------------------------------------===//
-
- // Ubuntu 11.11 "Oneiric Ocelot" -- gcc-4.6.0
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.6",
- "x86_64-linux-gnu", "32", "", triple);
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.6",
- "i686-linux-gnu", "", "64", triple);
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.6",
- "i486-linux-gnu", "", "64", triple);
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.6",
- "arm-linux-gnueabi", "", "", triple);
-
- // Ubuntu 11.04 "Natty Narwhal" -- gcc-4.5.2
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.5",
- "x86_64-linux-gnu", "32", "", triple);
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.5",
- "i686-linux-gnu", "", "64", triple);
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.5",
- "i486-linux-gnu", "", "64", triple);
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.5",
- "arm-linux-gnueabi", "", "", triple);
-
- // Ubuntu 10.10 "Maverick Meerkat" -- gcc-4.4.5
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4",
- "i686-linux-gnu", "", "64", triple);
- // The rest of 10.10 is the same as previous versions.
-
- // Ubuntu 10.04 LTS "Lucid Lynx" -- gcc-4.4.3
- // Ubuntu 9.10 "Karmic Koala" -- gcc-4.4.1
- // Debian 6.0 "squeeze" -- gcc-4.4.2
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4",
- "x86_64-linux-gnu", "32", "", triple);
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4",
- "i486-linux-gnu", "", "64", triple);
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4",
- "arm-linux-gnueabi", "", "", triple);
- // Ubuntu 9.04 "Jaunty Jackalope" -- gcc-4.3.3
- // Ubuntu 8.10 "Intrepid Ibex" -- gcc-4.3.2
- // Debian 5.0 "lenny" -- gcc-4.3.2
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.3",
- "x86_64-linux-gnu", "32", "", triple);
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.3",
- "i486-linux-gnu", "", "64", triple);
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.3",
- "arm-linux-gnueabi", "", "", triple);
- // Ubuntu 8.04.4 LTS "Hardy Heron" -- gcc-4.2.4
- // Ubuntu 8.04.[0-3] LTS "Hardy Heron" -- gcc-4.2.3
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.2",
- "x86_64-linux-gnu", "32", "", triple);
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.2",
- "i486-linux-gnu", "", "64", triple);
- // Ubuntu 7.10 "Gutsy Gibbon" -- gcc-4.1.3
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.1",
- "x86_64-linux-gnu", "32", "", triple);
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.1",
- "i486-linux-gnu", "", "64", triple);
-
- //===------------------------------------------------------------------===//
- // Redhat based distros.
- //===------------------------------------------------------------------===//
- // Fedora 15 (GCC 4.6.1)
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.6.1",
- "x86_64-redhat-linux", "32", "", triple);
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.6.1",
- "i686-redhat-linux", "", "", triple);
- // Fedora 15 (GCC 4.6.0)
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.6.0",
- "x86_64-redhat-linux", "32", "", triple);
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.6.0",
- "i686-redhat-linux", "", "", triple);
- // Fedora 14
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.5.1",
- "x86_64-redhat-linux", "32", "", triple);
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.5.1",
- "i686-redhat-linux", "", "", triple);
- // RHEL5(gcc44)
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4.4",
- "x86_64-redhat-linux6E", "32", "", triple);
- // Fedora 13
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4.4",
- "x86_64-redhat-linux", "32", "", triple);
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4.4",
- "i686-redhat-linux","", "", triple);
- // Fedora 12
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4.3",
- "x86_64-redhat-linux", "32", "", triple);
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4.3",
- "i686-redhat-linux","", "", triple);
- // Fedora 12 (pre-FEB-2010)
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4.2",
- "x86_64-redhat-linux", "32", "", triple);
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4.2",
- "i686-redhat-linux","", "", triple);
- // Fedora 11
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4.1",
- "x86_64-redhat-linux", "32", "", triple);
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4.1",
- "i586-redhat-linux","", "", triple);
- // Fedora 10
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.3.2",
- "x86_64-redhat-linux", "32", "", triple);
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.3.2",
- "i386-redhat-linux","", "", triple);
- // Fedora 9
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.3.0",
- "x86_64-redhat-linux", "32", "", triple);
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.3.0",
- "i386-redhat-linux", "", "", triple);
- // Fedora 8
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.1.2",
- "x86_64-redhat-linux", "", "", triple);
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.1.2",
- "i386-redhat-linux", "", "", triple);
-
- // RHEL 5
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.1.1",
- "x86_64-redhat-linux", "32", "", triple);
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.1.1",
- "i386-redhat-linux", "", "", triple);
-
-
- //===------------------------------------------------------------------===//
-
- // Exherbo (2010-01-25)
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4.3",
- "x86_64-pc-linux-gnu", "32", "", triple);
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4.3",
- "i686-pc-linux-gnu", "", "", triple);
-
- // openSUSE 11.1 32 bit
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.3",
- "i586-suse-linux", "", "", triple);
- // openSUSE 11.1 64 bit
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.3",
- "x86_64-suse-linux", "32", "", triple);
- // openSUSE 11.2
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4",
- "i586-suse-linux", "", "", triple);
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4",
- "x86_64-suse-linux", "", "", triple);
-
- // openSUSE 11.4
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.5",
- "i586-suse-linux", "", "", triple);
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.5",
- "x86_64-suse-linux", "", "", triple);
-
- // openSUSE 12.1
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.6",
- "i586-suse-linux", "", "", triple);
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.6",
- "x86_64-suse-linux", "", "", triple);
- // Arch Linux 2008-06-24
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.3.1",
- "i686-pc-linux-gnu", "", "", triple);
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.3.1",
- "x86_64-unknown-linux-gnu", "", "", triple);
-
- // Arch Linux gcc 4.6
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.6.1",
- "i686-pc-linux-gnu", "", "", triple);
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.6.1",
- "x86_64-unknown-linux-gnu", "", "", triple);
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.6.0",
- "i686-pc-linux-gnu", "", "", triple);
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.6.0",
- "x86_64-unknown-linux-gnu", "", "", triple);
-
- // Slackware gcc 4.5.2 (13.37)
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.5.2",
- "i486-slackware-linux", "", "", triple);
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.5.2",
- "x86_64-slackware-linux", "", "", triple);
- // Slackware gcc 4.5.3 (-current)
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.5.3",
- "i486-slackware-linux", "", "", triple);
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.5.3",
- "x86_64-slackware-linux", "", "", triple);
-
- // Gentoo x86 gcc 4.5.2
- AddGnuCPlusPlusIncludePaths(
- "/usr/lib/gcc/i686-pc-linux-gnu/4.5.2/include/g++-v4",
- "i686-pc-linux-gnu", "", "", triple);
- // Gentoo x86 gcc 4.4.5
- AddGnuCPlusPlusIncludePaths(
- "/usr/lib/gcc/i686-pc-linux-gnu/4.4.5/include/g++-v4",
- "i686-pc-linux-gnu", "", "", triple);
- // Gentoo x86 gcc 4.4.4
- AddGnuCPlusPlusIncludePaths(
- "/usr/lib/gcc/i686-pc-linux-gnu/4.4.4/include/g++-v4",
- "i686-pc-linux-gnu", "", "", triple);
- // Gentoo x86 2010.0 stable
- AddGnuCPlusPlusIncludePaths(
- "/usr/lib/gcc/i686-pc-linux-gnu/4.4.3/include/g++-v4",
- "i686-pc-linux-gnu", "", "", triple);
- // Gentoo x86 2009.1 stable
- AddGnuCPlusPlusIncludePaths(
- "/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4",
- "i686-pc-linux-gnu", "", "", triple);
- // Gentoo x86 2009.0 stable
- AddGnuCPlusPlusIncludePaths(
- "/usr/lib/gcc/i686-pc-linux-gnu/4.3.2/include/g++-v4",
- "i686-pc-linux-gnu", "", "", triple);
- // Gentoo x86 2008.0 stable
- AddGnuCPlusPlusIncludePaths(
- "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4",
- "i686-pc-linux-gnu", "", "", triple);
- // Gentoo x86 llvm-gcc trunk
- AddGnuCPlusPlusIncludePaths(
- "/usr/lib/llvm-gcc-4.2-9999/include/c++/4.2.1",
- "i686-pc-linux-gnu", "", "", triple);
-
- // Gentoo amd64 gcc 4.5.2
- AddGnuCPlusPlusIncludePaths(
- "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.2/include/g++-v4",
- "x86_64-pc-linux-gnu", "32", "", triple);
- // Gentoo amd64 gcc 4.4.5
- AddGnuCPlusPlusIncludePaths(
- "/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/include/g++-v4",
- "x86_64-pc-linux-gnu", "32", "", triple);
- // Gentoo amd64 gcc 4.4.4
- AddGnuCPlusPlusIncludePaths(
- "/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/include/g++-v4",
- "x86_64-pc-linux-gnu", "32", "", triple);
- // Gentoo amd64 gcc 4.4.3
- AddGnuCPlusPlusIncludePaths(
- "/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.3/include/g++-v4",
- "x86_64-pc-linux-gnu", "32", "", triple);
- // Gentoo amd64 gcc 4.3.4
- AddGnuCPlusPlusIncludePaths(
- "/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.4/include/g++-v4",
- "x86_64-pc-linux-gnu", "", "", triple);
- // Gentoo amd64 gcc 4.3.2
- AddGnuCPlusPlusIncludePaths(
- "/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/include/g++-v4",
- "x86_64-pc-linux-gnu", "", "", triple);
- // Gentoo amd64 stable
- AddGnuCPlusPlusIncludePaths(
- "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4",
- "x86_64-pc-linux-gnu", "", "", triple);
-
- // Gentoo amd64 llvm-gcc trunk
- AddGnuCPlusPlusIncludePaths(
- "/usr/lib/llvm-gcc-4.2-9999/include/c++/4.2.1",
- "x86_64-pc-linux-gnu", "", "", triple);
-
- break;
case llvm::Triple::FreeBSD:
// FreeBSD 8.0
// FreeBSD 7.3
@@ -953,6 +454,19 @@ AddDefaultCPlusPlusIncludePaths(const llvm::Triple &triple, const HeaderSearchOp
void InitHeaderSearch::AddDefaultIncludePaths(const LangOptions &Lang,
const llvm::Triple &triple,
const HeaderSearchOptions &HSOpts) {
+ // NB: This code path is going away. All of the logic is moving into the
+ // driver which has the information necessary to do target-specific
+ // selections of default include paths. Each target which moves there will be
+ // exempted from this logic here until we can delete the entire pile of code.
+ switch (triple.getOS()) {
+ default:
+ break; // Everything else continues to use this routine's logic.
+
+ case llvm::Triple::Linux:
+ case llvm::Triple::Win32:
+ return;
+ }
+
if (Lang.CPlusPlus && HSOpts.UseStandardCXXIncludes &&
HSOpts.UseStandardSystemIncludes) {
if (HSOpts.UseLibcxx) {
@@ -1155,8 +669,8 @@ void clang::ApplyHeaderSearchOptions(HeaderSearch &HS,
// Add the user defined entries.
for (unsigned i = 0, e = HSOpts.UserEntries.size(); i != e; ++i) {
const HeaderSearchOptions::Entry &E = HSOpts.UserEntries[i];
- Init.AddPath(E.Path, E.Group, false, E.IsUserSupplied, E.IsFramework,
- E.IgnoreSysRoot);
+ Init.AddPath(E.Path, E.Group, !E.ImplicitExternC, E.IsUserSupplied,
+ E.IsFramework, E.IgnoreSysRoot);
}
Init.AddDefaultIncludePaths(Lang, Triple, HSOpts);
diff --git a/contrib/netcat/netcat.c b/contrib/netcat/netcat.c
index a874adb..9b9017d 100644
--- a/contrib/netcat/netcat.c
+++ b/contrib/netcat/netcat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: netcat.c,v 1.100 2011/01/09 22:16:46 jeremy Exp $ */
+/* $OpenBSD: netcat.c,v 1.101 2011/06/21 17:31:07 mikeb Exp $ */
/*
* Copyright (c) 2001 Eric Jackson <ericj@monkey.org>
*
diff --git a/contrib/openpam/CREDITS b/contrib/openpam/CREDITS
index c8da3ff..a003ac0 100644
--- a/contrib/openpam/CREDITS
+++ b/contrib/openpam/CREDITS
@@ -6,10 +6,11 @@ Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035
Principal design and development by:
- Dag-Erling Smørgrav <des@freebsd.org>
+ Dag-Erling Smørgrav <des@des.no>
-The following persons (in no particular order) have contributed, directly
-or indirectly, with patches, criticism, suggestions, or ideas:
+The following persons (in alphabetical order) have contributed,
+directly or indirectly, with patches, criticism, suggestions, or
+ideas:
Andrew Morgan <morgan@transmeta.com>
Brian Fundakowski Feldman <green@freebsd.org>
@@ -20,18 +21,21 @@ or indirectly, with patches, criticism, suggestions, or ideas:
Emmanuel Dreyfus <manu@netbsd.org>
Eric Melville <eric@freebsd.org>
Gary Winiger <Gary.Winiger@sun.com>
+ Hubert Feyrer <hubert@feyrer.de>
Joe Marcus Clarke <marcus@freebsd.org>
Juli Mallett <jmallett@freebsd.org>
- Hubert Feyrer <hubert@feyrer.de>
+ Jörg Sonnenberger <joerg@britannica.bec.de>
Mark Murray <markm@freebsd.org>
Mike Petullo <mike@flyn.org>
Mikhail Teterin <mi@aldan.algebra.com>
- Mikko Työläjärvi <mbsd@pacbell.net>
+ Mikko Työläjärvi <mbsd@pacbell.net>
+ Nick Hibma <nick@van-laarhoven.org>
Robert Watson <rwatson@freebsd.org>
Ruslan Ermilov <ru@freebsd.org>
+ Sebastian Krahmer <sebastian.krahmer@gmail.com>
Solar Designer <solar@openwall.com>
Takanori Saneto <sanewo@ba2.so-net.ne.jp>
Wojciech A. Koszek <wkoszek@freebsd.org>
Yar Tikhiy <yar@freebsd.org>
-$Id: CREDITS 400 2007-10-24 15:04:23Z des $
+$Id: CREDITS 498 2011-11-21 16:27:04Z des $
diff --git a/contrib/openpam/HISTORY b/contrib/openpam/HISTORY
index 9c1c26e..81af9ea 100644
--- a/contrib/openpam/HISTORY
+++ b/contrib/openpam/HISTORY
@@ -1,3 +1,29 @@
+OpenPAM Lycopsida 2011-12-18
+
+ - ENHANCE: removed static build autodetection, which didn't work
+ anyway. Use an explicit, user-specified preprocessor variable
+ instead.
+
+ - ENHANCE: cleaned up the documentation a bit.
+
+ - ENHANCE: added openpam_subst(3), allowing certain PAM items to be
+ embedded in strings such as prompts. Apply it to the prompts used
+ by pam_get_user(3) and pam_get_authtok(3).
+
+ - ENHANCE: added support for the user_prompt, authtok_prompt and
+ oldauthtok_prompt module options, which override the prompts passed
+ by the module to pam_set_user(3) and pam_get_authtok(3).
+
+ - ENHANCE: rewrote the policy parser to support quoted option values.
+
+ - ENHANCE: added pamtest(1), a tool for testing modules and policies.
+
+ - ENHANCE: added code to check the ownership and permissions of a
+ module before loading it.
+
+ - ENHANCE: added / improved input validation in many cases, including
+ the policy file and some function arguments.
+============================================================================
OpenPAM Hydrangea 2007-12-21
- ENHANCE: when compiling with GCC, mark up API functions with GCC
@@ -21,7 +47,7 @@ OpenPAM Hydrangea 2007-12-21
contexts), since the module cache was the only part of OpenPAM that
was not thread-safe.
============================================================================
-OpenPAM Figwort 2005-06-16
+OpenPAM Figwort 2005-06-16
- BUGFIX: Correct several small signedness and initialization bugs
discovered during review by the NetBSD team.
@@ -327,4 +353,4 @@ OpenPAM Calamite 2002-02-09
First (beta) release.
============================================================================
-$Id: HISTORY 409 2007-12-21 11:38:50Z des $
+$Id: HISTORY 504 2011-12-18 14:11:12Z des $
diff --git a/contrib/openpam/LICENSE b/contrib/openpam/LICENSE
index 0260cca..e6d4325 100644
--- a/contrib/openpam/LICENSE
+++ b/contrib/openpam/LICENSE
@@ -1,6 +1,6 @@
Copyright (c) 2002-2003 Networks Associates Technology, Inc.
-Copyright (c) 2004-2007 Dag-Erling Smørgrav
+Copyright (c) 2004-2011 Dag-Erling Smørgrav
All rights reserved.
This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,4 +32,4 @@ 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.
-$Id: LICENSE 408 2007-12-21 11:36:24Z des $
+$Id: LICENSE 437 2011-09-13 12:00:13Z des $
diff --git a/contrib/openpam/Makefile.am b/contrib/openpam/Makefile.am
index 1c2bf90..96ed4ea 100644
--- a/contrib/openpam/Makefile.am
+++ b/contrib/openpam/Makefile.am
@@ -1,4 +1,6 @@
-# $Id: Makefile.am 395 2007-06-03 20:26:18Z des $
+# $Id: Makefile.am 428 2010-03-09 17:32:17Z des $
+
+ACLOCAL_AMFLAGS = -I m4
SUBDIRS = lib bin modules include
diff --git a/contrib/openpam/Makefile.in b/contrib/openpam/Makefile.in
index 299c6c9..44624b8 100644
--- a/contrib/openpam/Makefile.in
+++ b/contrib/openpam/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -14,16 +15,13 @@
@SET_MAKE@
-# $Id: Makefile.am 395 2007-06-03 20:26:18Z des $
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
+# $Id: Makefile.am 428 2010-03-09 17:32:17Z des $
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = .
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -37,30 +35,36 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-target_triplet = @target@
@WITH_DOC_TRUE@am__append_1 = doc
+subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
- $(top_srcdir)/configure INSTALL compile config.guess \
- config.sub depcomp install-sh ltmain.sh missing
-subdir = .
+ $(top_srcdir)/configure INSTALL config.guess config.sub \
+ depcomp install-sh ltmain.sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno configure.status.lineno
+ configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
- install-exec-recursive install-info-recursive \
- install-recursive installcheck-recursive installdirs-recursive \
- pdf-recursive ps-recursive uninstall-info-recursive \
- uninstall-recursive
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir dist dist-all distcheck
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = lib bin modules include doc
@@ -68,16 +72,39 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
- { test ! -d $(distdir) \
- || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
- && rm -fr $(distdir); }; }
+ { test ! -d "$(distdir)" \
+ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -fr "$(distdir)"; }; }
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -90,42 +117,50 @@ CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CRYPT_LIBS = @CRYPT_LIBS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
DL_LIBS = @DL_LIBS@
-ECHO = @ECHO@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
GREP = @GREP@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIB_MAJ = @LIB_MAJ@
+LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPENPAM_MODULES_DIR = @OPENPAM_MODULES_DIR@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
@@ -134,19 +169,13 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
-WITH_DOC_FALSE = @WITH_DOC_FALSE@
-WITH_DOC_TRUE = @WITH_DOC_TRUE@
-WITH_PAM_UNIX_FALSE = @WITH_PAM_UNIX_FALSE@
-WITH_PAM_UNIX_TRUE = @WITH_PAM_UNIX_TRUE@
-WITH_SU_FALSE = @WITH_SU_FALSE@
-WITH_SU_TRUE = @WITH_SU_TRUE@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -158,6 +187,7 @@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
@@ -185,12 +215,13 @@ program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
-target = @target@
target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+ACLOCAL_AMFLAGS = -I m4
SUBDIRS = lib bin modules include $(am__append_1)
EXTRA_DIST = \
CREDITS \
@@ -212,15 +243,15 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
- cd $(srcdir) && $(AUTOMAKE) --foreign \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
&& exit 0; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign Makefile
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -236,21 +267,22 @@ $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENC
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: $(am__configure_deps)
- cd $(srcdir) && $(AUTOCONF)
+ $(am__cd) $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+ $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
config.h: stamp-h1
@if test ! -f $@; then \
rm -f stamp-h1; \
- $(MAKE) stamp-h1; \
+ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
else :; fi
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status config.h
$(srcdir)/config.h.in: $(am__configure_deps)
- cd $(top_srcdir) && $(AUTOHEADER)
+ ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
rm -f stamp-h1
touch $@
@@ -264,8 +296,7 @@ clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
+ -rm -f libtool config.lt
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
@@ -274,7 +305,7 @@ uninstall-info-am:
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
- @failcom='exit 1'; \
+ @fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
@@ -291,16 +322,15 @@ $(RECURSIVE_TARGETS):
else \
local_target="$$target"; \
fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
- @failcom='exit 1'; \
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
@@ -326,16 +356,16 @@ maintainer-clean-recursive:
else \
local_target="$$target"; \
fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@@ -343,14 +373,14 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
+ set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
@@ -362,93 +392,114 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
- tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
+ $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(am__remove_distdir)
- mkdir $(distdir)
- $(mkdir_p) $(distdir)/misc
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ test -d "$(distdir)" || mkdir "$(distdir)"
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
- list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
- || $(mkdir_p) "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
- distdir=`$(am__cd) $(distdir) && pwd`; \
- top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
- (cd $$subdir && \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$$top_distdir" \
- distdir="$$distdir/$$subdir" \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
done
- -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+ -test -n "$(am__skip_mode_fix)" \
+ || find "$(distdir)" -type d ! -perm -755 \
+ -exec chmod u+rwx,go+rx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
- ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
- || chmod -R a+r $(distdir)
+ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r "$(distdir)"
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
@@ -457,6 +508,14 @@ dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
+dist-lzma: distdir
+ tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+ $(am__remove_distdir)
+
+dist-xz: distdir
+ tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+ $(am__remove_distdir)
+
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
@@ -480,13 +539,17 @@ dist dist-all: distdir
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
- GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
- bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.lzma*) \
+ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+ *.tar.xz*) \
+ xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
- GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
@@ -494,9 +557,11 @@ distcheck: dist
mkdir $(distdir)/_build
mkdir $(distdir)/_inst
chmod a-w $(distdir)
+ test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
- && cd $(distdir)/_build \
+ && am__cwd=`pwd` \
+ && $(am__cd) $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
@@ -518,13 +583,15 @@ distcheck: dist
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist \
&& rm -rf $(DIST_ARCHIVES) \
- && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+ && cd "$$am__cwd" \
+ || exit 1
$(am__remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
- sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
+ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck:
- @cd $(distuninstallcheck_dir) \
+ @$(am__cd) '$(distuninstallcheck_dir)' \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
@@ -566,6 +633,7 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -586,18 +654,38 @@ dvi-am:
html: html-recursive
+html-am:
+
info: info-recursive
info-am:
install-data-am:
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
install-exec-am:
+install-html: install-html-recursive
+
+install-html-am:
+
install-info: install-info-recursive
+install-info-am:
+
install-man:
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
installcheck-am:
maintainer-clean: maintainer-clean-recursive
@@ -618,24 +706,27 @@ ps: ps-recursive
ps-am:
-uninstall-am: uninstall-info-am
+uninstall-am:
-uninstall-info: uninstall-info-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
+ ctags-recursive install-am install-strip tags-recursive
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
- check-am clean clean-generic clean-libtool clean-recursive \
- ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
- dist-shar dist-tarZ dist-zip distcheck distclean \
- distclean-generic distclean-hdr distclean-libtool \
- distclean-recursive distclean-tags distcleancheck distdir \
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am am--refresh check check-am clean clean-generic \
+ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
+ dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
+ distcheck distclean distclean-generic distclean-hdr \
+ distclean-libtool distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-exec \
- install-exec-am install-info install-info-am install-man \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
installdirs-am maintainer-clean maintainer-clean-generic \
- maintainer-clean-recursive mostlyclean mostlyclean-generic \
- mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
- tags tags-recursive uninstall uninstall-am uninstall-info-am
+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am tags tags-recursive uninstall uninstall-am
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/contrib/openpam/README b/contrib/openpam/README
index 475dd74..02851d1 100644
--- a/contrib/openpam/README
+++ b/contrib/openpam/README
@@ -22,6 +22,6 @@ These are some of OpenPAM's features:
/usr/local/etc/pam.d/ and /usr/local/etc/pam.conf, in that order;
this will be made configurable in a future release.
-Please direct bug reports and inquiries to des@freebsd.org.
+Please direct bug reports and inquiries to <des@des.no>.
-$Id: README 320 2006-02-16 20:33:19Z des $
+$Id: README 424 2009-10-29 17:10:22Z des $
diff --git a/contrib/openpam/RELNOTES b/contrib/openpam/RELNOTES
index d66c8f0..71f7eb9 100644
--- a/contrib/openpam/RELNOTES
+++ b/contrib/openpam/RELNOTES
@@ -1,13 +1,11 @@
- Release notes for OpenPAM Hydrangea
+ Release notes for OpenPAM Lycopsida
===================================
-This release corresponds to the code used in FreeBSD-CURRENT as of the
-release date. It has also been tested on several other platforms, and
-is expected to work on almost any POSIX-like platform that has GNU
-autotools, GNU make and the GNU compiler suite installed. One notable
-exception is MacOS X, which ships with a very weird, heavily modified
-version of GCC.
+This release corresponds to the code used in FreeBSD HEAD as of the
+release date, and is also expected to work on almost any POSIX-like
+platform that has GNU autotools, GNU make and the GNU compiler suite
+installed.
The library itself is complete. Documentation exists in the form of
man pages for the library functions. These man pages are generated by
@@ -18,12 +16,9 @@ of date.
The distribution also includes three sample modules (pam_deny,
pam_permit and pam_unix) and a sample application (su). These are not
intended for actual use, but rather to serve as examples for module or
-application developers.
+application developers. It also includes a command-line application
+(pamtest) which can be used to test policies and modules.
-NOTE: to the person who sent me MacOS patches in July 2002: I have
-lost your name and email address. Please contact me so I can give you
-proper credit for your contribution.
+Please direct bug reports and inquiries to <des@des.no>.
-Please direct bug reports and inquiries to <des@freebsd.org>.
-
-$Id: RELNOTES 404 2007-11-28 12:31:04Z des $
+$Id: RELNOTES 506 2011-12-18 14:25:12Z des $
diff --git a/contrib/openpam/aclocal.m4 b/contrib/openpam/aclocal.m4
index a9c0faf..c3aa435 100644
--- a/contrib/openpam/aclocal.m4
+++ b/contrib/openpam/aclocal.m4
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
+# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005 Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -11,103 +11,206 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
+You have another version of autoconf. It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
+
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
+# Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+m4_define([_LT_COPYING], [dnl
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
+# Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is part of GNU Libtool.
+#
+# GNU Libtool 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.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+])
-# serial 51 AC_PROG_LIBTOOL
+# serial 57 LT_INIT
-# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
-# -----------------------------------------------------------
-# If this macro is not defined by Autoconf, define it here.
-m4_ifdef([AC_PROVIDE_IFELSE],
- [],
- [m4_define([AC_PROVIDE_IFELSE],
- [m4_ifdef([AC_PROVIDE_$1],
- [$2], [$3])])])
+# LT_PREREQ(VERSION)
+# ------------------
+# Complain and exit if this libtool version is less that VERSION.
+m4_defun([LT_PREREQ],
+[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
+ [m4_default([$3],
+ [m4_fatal([Libtool version $1 or higher is required],
+ 63)])],
+ [$2])])
-# AC_PROG_LIBTOOL
-# ---------------
-AC_DEFUN([AC_PROG_LIBTOOL],
-[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
-dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
-dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
- AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [AC_LIBTOOL_CXX],
- [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
- ])])
-dnl And a similar setup for Fortran 77 support
- AC_PROVIDE_IFELSE([AC_PROG_F77],
- [AC_LIBTOOL_F77],
- [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
-])])
-
-dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
-dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
-dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
- AC_PROVIDE_IFELSE([AC_PROG_GCJ],
- [AC_LIBTOOL_GCJ],
- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
- [AC_LIBTOOL_GCJ],
- [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
- [AC_LIBTOOL_GCJ],
- [ifdef([AC_PROG_GCJ],
- [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
- ifdef([A][M_PROG_GCJ],
- [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
- ifdef([LT_AC_PROG_GCJ],
- [define([LT_AC_PROG_GCJ],
- defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
-])])# AC_PROG_LIBTOOL
-
-
-# _AC_PROG_LIBTOOL
-# ----------------
-AC_DEFUN([_AC_PROG_LIBTOOL],
-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
+# _LT_CHECK_BUILDDIR
+# ------------------
+# Complain if the absolute build directory name contains unusual characters
+m4_defun([_LT_CHECK_BUILDDIR],
+[case `pwd` in
+ *\ * | *\ *)
+ AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
+esac
+])
+
+
+# LT_INIT([OPTIONS])
+# ------------------
+AC_DEFUN([LT_INIT],
+[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
+AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+AC_BEFORE([$0], [LT_LANG])dnl
+AC_BEFORE([$0], [LT_OUTPUT])dnl
+AC_BEFORE([$0], [LTDL_INIT])dnl
+m4_require([_LT_CHECK_BUILDDIR])dnl
+
+dnl Autoconf doesn't catch unexpanded LT_ macros by default:
+m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
+m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
+dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
+dnl unless we require an AC_DEFUNed macro:
+AC_REQUIRE([LTOPTIONS_VERSION])dnl
+AC_REQUIRE([LTSUGAR_VERSION])dnl
+AC_REQUIRE([LTVERSION_VERSION])dnl
+AC_REQUIRE([LTOBSOLETE_VERSION])dnl
+m4_require([_LT_PROG_LTMAIN])dnl
+
+_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
+
+dnl Parse OPTIONS
+_LT_SET_OPTIONS([$0], [$1])
# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+LIBTOOL_DEPS="$ltmain"
# Always use our own libtool.
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
AC_SUBST(LIBTOOL)dnl
-# Prevent multiple expansion
-define([AC_PROG_LIBTOOL], [])
-])# _AC_PROG_LIBTOOL
+_LT_SETUP
+# Only expand once:
+m4_define([LT_INIT])
+])# LT_INIT
-# AC_LIBTOOL_SETUP
-# ----------------
-AC_DEFUN([AC_LIBTOOL_SETUP],
-[AC_PREREQ(2.50)dnl
-AC_REQUIRE([AC_ENABLE_SHARED])dnl
-AC_REQUIRE([AC_ENABLE_STATIC])dnl
-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# Old names:
+AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
+AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
+dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
+
+
+# _LT_CC_BASENAME(CC)
+# -------------------
+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+m4_defun([_LT_CC_BASENAME],
+[for cc_temp in $1""; do
+ case $cc_temp in
+ compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+ distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+])
+
+
+# _LT_FILEUTILS_DEFAULTS
+# ----------------------
+# It is okay to use these file commands and assume they have been set
+# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
+m4_defun([_LT_FILEUTILS_DEFAULTS],
+[: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+])# _LT_FILEUTILS_DEFAULTS
+
+
+# _LT_SETUP
+# ---------
+m4_defun([_LT_SETUP],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_LD])dnl
-AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
-AC_REQUIRE([AC_PROG_NM])dnl
+AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
+_LT_DECL([], [host_alias], [0], [The host system])dnl
+_LT_DECL([], [host], [0])dnl
+_LT_DECL([], [host_os], [0])dnl
+dnl
+_LT_DECL([], [build_alias], [0], [The build system])dnl
+_LT_DECL([], [build], [0])dnl
+_LT_DECL([], [build_os], [0])dnl
+dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+dnl
AC_REQUIRE([AC_PROG_LN_S])dnl
-AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-AC_REQUIRE([AC_OBJEXT])dnl
-AC_REQUIRE([AC_EXEEXT])dnl
+test -z "$LN_S" && LN_S="ln -s"
+_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
dnl
+AC_REQUIRE([LT_CMD_MAX_LEN])dnl
+_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
+_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
+dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
+m4_require([_LT_CMD_RELOAD])dnl
+m4_require([_LT_CHECK_MAGIC_METHOD])dnl
+m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
+m4_require([_LT_CMD_OLD_ARCHIVE])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_WITH_SYSROOT])dnl
+
+_LT_CONFIG_LIBTOOL_INIT([
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+])
+if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
-AC_LIBTOOL_SYS_MAX_CMD_LEN
-AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-AC_LIBTOOL_OBJDIR
+_LT_CHECK_OBJDIR
-AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
-_LT_AC_PROG_ECHO_BACKSLASH
+m4_require([_LT_TAG_COMPILER])dnl
case $host_os in
aix3*)
@@ -121,116 +224,678 @@ aix3*)
;;
esac
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e 1s/^X//'
-[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
-
-# Same as above, but do not quote variable references.
-[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-
-# Constants:
-rm="rm -f"
-
# Global variables:
-default_ofile=libtool
+ofile=libtool
can_build_shared=yes
# All known linkers require a `.a' archive for static linking (except MSVC,
# which needs '.lib').
libext=a
-ltmain="$ac_aux_dir/ltmain.sh"
-ofile="$default_ofile"
-with_gnu_ld="$lt_cv_prog_gnu_ld"
-AC_CHECK_TOOL(AR, ar, false)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-AC_CHECK_TOOL(STRIP, strip, :)
+with_gnu_ld="$lt_cv_prog_gnu_ld"
old_CC="$CC"
old_CFLAGS="$CFLAGS"
# Set sane defaults for various variables
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-test -z "$AS" && AS=as
test -z "$CC" && CC=cc
test -z "$LTCC" && LTCC=$CC
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
-test -z "$DLLTOOL" && DLLTOOL=dlltool
test -z "$LD" && LD=ld
-test -z "$LN_S" && LN_S="ln -s"
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-test -z "$NM" && NM=nm
-test -z "$SED" && SED=sed
-test -z "$OBJDUMP" && OBJDUMP=objdump
-test -z "$RANLIB" && RANLIB=:
-test -z "$STRIP" && STRIP=:
test -z "$ac_objext" && ac_objext=o
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
- case $host_os in
- openbsd*)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
- ;;
- *)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
- ;;
- esac
- old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-fi
-
_LT_CC_BASENAME([$compiler])
# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- AC_PATH_MAGIC
+ _LT_PATH_MAGIC
fi
;;
esac
-AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
-AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
-enable_win32_dll=yes, enable_win32_dll=no)
+# Use C for the default configuration in the libtool script
+LT_SUPPORTED_TAG([CC])
+_LT_LANG_C_CONFIG
+_LT_LANG_DEFAULT_CONFIG
+_LT_CONFIG_COMMANDS
+])# _LT_SETUP
-AC_ARG_ENABLE([libtool-lock],
- [AC_HELP_STRING([--disable-libtool-lock],
- [avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-AC_ARG_WITH([pic],
- [AC_HELP_STRING([--with-pic],
- [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
- [pic_mode="$withval"],
- [pic_mode=default])
-test -z "$pic_mode" && pic_mode=default
+# _LT_PREPARE_SED_QUOTE_VARS
+# --------------------------
+# Define a few sed substitution that help us do robust quoting.
+m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
+[# Backslashify metacharacters that are still active within
+# double-quoted strings.
+sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
-# Use C for the default configuration in the libtool script
-tagname=
-AC_LIBTOOL_LANG_C_CONFIG
-_LT_AC_TAGCONFIG
-])# AC_LIBTOOL_SETUP
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\([["`\\]]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+])
+
+# _LT_PROG_LTMAIN
+# ---------------
+# Note that this code is called both from `configure', and `config.status'
+# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
+# `config.status' has no value for ac_aux_dir unless we are using Automake,
+# so we pass a copy along to make sure it has a sensible value anyway.
+m4_defun([_LT_PROG_LTMAIN],
+[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
+_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
+ltmain="$ac_aux_dir/ltmain.sh"
+])# _LT_PROG_LTMAIN
+
+
+
+# So that we can recreate a full libtool script including additional
+# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
+# in macros and then make a single call at the end using the `libtool'
+# label.
+
+
+# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
+# ----------------------------------------
+# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL_INIT],
+[m4_ifval([$1],
+ [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
+ [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_INIT])
+
+
+# _LT_CONFIG_LIBTOOL([COMMANDS])
+# ------------------------------
+# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL],
+[m4_ifval([$1],
+ [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
+ [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
+
+
+# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
+# -----------------------------------------------------
+m4_defun([_LT_CONFIG_SAVE_COMMANDS],
+[_LT_CONFIG_LIBTOOL([$1])
+_LT_CONFIG_LIBTOOL_INIT([$2])
+])
+
+
+# _LT_FORMAT_COMMENT([COMMENT])
+# -----------------------------
+# Add leading comment marks to the start of each line, and a trailing
+# full-stop to the whole comment if one is not present already.
+m4_define([_LT_FORMAT_COMMENT],
+[m4_ifval([$1], [
+m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
+ [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
+)])
+
+
+
+
+
+# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
+# -------------------------------------------------------------------
+# CONFIGNAME is the name given to the value in the libtool script.
+# VARNAME is the (base) name used in the configure script.
+# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
+# VARNAME. Any other value will be used directly.
+m4_define([_LT_DECL],
+[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
+ [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
+ [m4_ifval([$1], [$1], [$2])])
+ lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
+ m4_ifval([$4],
+ [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
+ lt_dict_add_subkey([lt_decl_dict], [$2],
+ [tagged?], [m4_ifval([$5], [yes], [no])])])
+])
+
+
+# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
+# --------------------------------------------------------
+m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
+
+
+# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_tag_varnames],
+[_lt_decl_filter([tagged?], [yes], $@)])
+
+
+# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
+# ---------------------------------------------------------
+m4_define([_lt_decl_filter],
+[m4_case([$#],
+ [0], [m4_fatal([$0: too few arguments: $#])],
+ [1], [m4_fatal([$0: too few arguments: $#: $1])],
+ [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
+ [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
+ [lt_dict_filter([lt_decl_dict], $@)])[]dnl
+])
+
+
+# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
+# --------------------------------------------------
+m4_define([lt_decl_quote_varnames],
+[_lt_decl_filter([value], [1], $@)])
-# _LT_AC_SYS_COMPILER
+# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_dquote_varnames],
+[_lt_decl_filter([value], [2], $@)])
+
+
+# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_varnames_tagged],
+[m4_assert([$# <= 2])dnl
+_$0(m4_quote(m4_default([$1], [[, ]])),
+ m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
+ m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
+m4_define([_lt_decl_varnames_tagged],
+[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
+
+
+# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_all_varnames],
+[_$0(m4_quote(m4_default([$1], [[, ]])),
+ m4_if([$2], [],
+ m4_quote(lt_decl_varnames),
+ m4_quote(m4_shift($@))))[]dnl
+])
+m4_define([_lt_decl_all_varnames],
+[lt_join($@, lt_decl_varnames_tagged([$1],
+ lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
+])
+
+
+# _LT_CONFIG_STATUS_DECLARE([VARNAME])
+# ------------------------------------
+# Quote a variable value, and forward it to `config.status' so that its
+# declaration there will have the same value as in `configure'. VARNAME
+# must have a single quote delimited value for this to work.
+m4_define([_LT_CONFIG_STATUS_DECLARE],
+[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
+
+
+# _LT_CONFIG_STATUS_DECLARATIONS
+# ------------------------------
+# We delimit libtool config variables with single quotes, so when
+# we write them to config.status, we have to be sure to quote all
+# embedded single quotes properly. In configure, this macro expands
+# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
+#
+# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
+m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
+ [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAGS
+# ----------------
+# Output comment and list of tags supported by the script
+m4_defun([_LT_LIBTOOL_TAGS],
+[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
+available_tags="_LT_TAGS"dnl
+])
+
+
+# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
+# -----------------------------------
+# Extract the dictionary values for VARNAME (optionally with TAG) and
+# expand to a commented shell variable setting:
+#
+# # Some comment about what VAR is for.
+# visible_name=$lt_internal_name
+m4_define([_LT_LIBTOOL_DECLARE],
+[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
+ [description])))[]dnl
+m4_pushdef([_libtool_name],
+ m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
+m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
+ [0], [_libtool_name=[$]$1],
+ [1], [_libtool_name=$lt_[]$1],
+ [2], [_libtool_name=$lt_[]$1],
+ [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
+m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
+])
+
+
+# _LT_LIBTOOL_CONFIG_VARS
+# -----------------------
+# Produce commented declarations of non-tagged libtool config variables
+# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
+# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
+# section) are produced by _LT_LIBTOOL_TAG_VARS.
+m4_defun([_LT_LIBTOOL_CONFIG_VARS],
+[m4_foreach([_lt_var],
+ m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
+ [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAG_VARS(TAG)
+# -------------------------
+m4_define([_LT_LIBTOOL_TAG_VARS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
+ [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
+
+
+# _LT_TAGVAR(VARNAME, [TAGNAME])
+# ------------------------------
+m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
+
+
+# _LT_CONFIG_COMMANDS
# -------------------
-AC_DEFUN([_LT_AC_SYS_COMPILER],
+# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
+# variables for single and double quote escaping we saved from calls
+# to _LT_DECL, we can put quote escaped variables declarations
+# into `config.status', and then the shell code to quote escape them in
+# for loops in `config.status'. Finally, any additional code accumulated
+# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
+m4_defun([_LT_CONFIG_COMMANDS],
+[AC_PROVIDE_IFELSE([LT_OUTPUT],
+ dnl If the libtool generation code has been placed in $CONFIG_LT,
+ dnl instead of duplicating it all over again into config.status,
+ dnl then we will have config.status run $CONFIG_LT later, so it
+ dnl needs to know what name is stored there:
+ [AC_CONFIG_COMMANDS([libtool],
+ [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
+ dnl If the libtool generation code is destined for config.status,
+ dnl expand the accumulated commands and init code now:
+ [AC_CONFIG_COMMANDS([libtool],
+ [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
+])#_LT_CONFIG_COMMANDS
+
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
+[
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+_LT_CONFIG_STATUS_DECLARATIONS
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+\$[]1
+_LTECHO_EOF'
+}
+
+# Quote evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_quote_varnames); do
+ case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+ *[[\\\\\\\`\\"\\\$]]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Double-quote double-evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_dquote_varnames); do
+ case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+ *[[\\\\\\\`\\"\\\$]]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+_LT_OUTPUT_LIBTOOL_INIT
+])
+
+# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
+# ------------------------------------
+# Generate a child script FILE with all initialization necessary to
+# reuse the environment learned by the parent script, and make the
+# file executable. If COMMENT is supplied, it is inserted after the
+# `#!' sequence but before initialization text begins. After this
+# macro, additional text can be appended to FILE to form the body of
+# the child script. The macro ends with non-zero status if the
+# file could not be fully written (such as if the disk is full).
+m4_ifdef([AS_INIT_GENERATED],
+[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
+[m4_defun([_LT_GENERATED_FILE_INIT],
+[m4_require([AS_PREPARE])]dnl
+[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
+[lt_write_fail=0
+cat >$1 <<_ASEOF || lt_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+$2
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$1 <<\_ASEOF || lt_write_fail=1
+AS_SHELL_SANITIZE
+_AS_PREPARE
+exec AS_MESSAGE_FD>&1
+_ASEOF
+test $lt_write_fail = 0 && chmod +x $1[]dnl
+m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
+
+# LT_OUTPUT
+# ---------
+# This macro allows early generation of the libtool script (before
+# AC_OUTPUT is called), incase it is used in configure for compilation
+# tests.
+AC_DEFUN([LT_OUTPUT],
+[: ${CONFIG_LT=./config.lt}
+AC_MSG_NOTICE([creating $CONFIG_LT])
+_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
+[# Run this file to recreate a libtool stub with the current configuration.])
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+lt_cl_silent=false
+exec AS_MESSAGE_LOG_FD>>config.log
+{
+ echo
+ AS_BOX([Running $as_me.])
+} >&AS_MESSAGE_LOG_FD
+
+lt_cl_help="\
+\`$as_me' creates a local libtool stub from the current configuration,
+for use in further configure time tests before the real libtool is
+generated.
+
+Usage: $[0] [[OPTIONS]]
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+
+Report bugs to <bug-libtool@gnu.org>."
+
+lt_cl_version="\
+m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
+m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
+configured by $[0], generated by m4_PACKAGE_STRING.
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This config.lt script is free software; the Free Software Foundation
+gives unlimited permision to copy, distribute and modify it."
+
+while test $[#] != 0
+do
+ case $[1] in
+ --version | --v* | -V )
+ echo "$lt_cl_version"; exit 0 ;;
+ --help | --h* | -h )
+ echo "$lt_cl_help"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --quiet | --q* | --silent | --s* | -q )
+ lt_cl_silent=: ;;
+
+ -*) AC_MSG_ERROR([unrecognized option: $[1]
+Try \`$[0] --help' for more information.]) ;;
+
+ *) AC_MSG_ERROR([unrecognized argument: $[1]
+Try \`$[0] --help' for more information.]) ;;
+ esac
+ shift
+done
+
+if $lt_cl_silent; then
+ exec AS_MESSAGE_FD>/dev/null
+fi
+_LTEOF
+
+cat >>"$CONFIG_LT" <<_LTEOF
+_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AC_MSG_NOTICE([creating $ofile])
+_LT_OUTPUT_LIBTOOL_COMMANDS
+AS_EXIT(0)
+_LTEOF
+chmod +x "$CONFIG_LT"
+
+# configure is writing to config.log, but config.lt does its own redirection,
+# appending to config.log, which fails on DOS, as config.log is still kept
+# open by configure. Here we exec the FD to /dev/null, effectively closing
+# config.log, so it can be properly (re)opened and appended to by config.lt.
+lt_cl_success=:
+test "$silent" = yes &&
+ lt_config_lt_args="$lt_config_lt_args --quiet"
+exec AS_MESSAGE_LOG_FD>/dev/null
+$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
+exec AS_MESSAGE_LOG_FD>>config.log
+$lt_cl_success || AS_EXIT(1)
+])# LT_OUTPUT
+
+
+# _LT_CONFIG(TAG)
+# ---------------
+# If TAG is the built-in tag, create an initial libtool script with a
+# default configuration from the untagged config vars. Otherwise add code
+# to config.status for appending the configuration named by TAG from the
+# matching tagged config vars.
+m4_defun([_LT_CONFIG],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_CONFIG_SAVE_COMMANDS([
+ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
+ m4_if(_LT_TAG, [C], [
+ # See if we are running on zsh, and set the options which allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile="${ofile}T"
+ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+ $RM "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+_LT_COPYING
+_LT_LIBTOOL_TAGS
+
+# ### BEGIN LIBTOOL CONFIG
+_LT_LIBTOOL_CONFIG_VARS
+_LT_LIBTOOL_TAG_VARS
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+ _LT_PROG_LTMAIN
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '$q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ _LT_PROG_REPLACE_SHELLFNS
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+],
+[cat <<_LT_EOF >> "$ofile"
+
+dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
+dnl in a comment (ie after a #).
+# ### BEGIN LIBTOOL TAG CONFIG: $1
+_LT_LIBTOOL_TAG_VARS(_LT_TAG)
+# ### END LIBTOOL TAG CONFIG: $1
+_LT_EOF
+])dnl /m4_if
+],
+[m4_if([$1], [], [
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ TIMESTAMP='$TIMESTAMP'
+ RM='$RM'
+ ofile='$ofile'], [])
+])dnl /_LT_CONFIG_SAVE_COMMANDS
+])# _LT_CONFIG
+
+
+# LT_SUPPORTED_TAG(TAG)
+# ---------------------
+# Trace this macro to discover what tags are supported by the libtool
+# --tag option, using:
+# autoconf --trace 'LT_SUPPORTED_TAG:$1'
+AC_DEFUN([LT_SUPPORTED_TAG], [])
+
+
+# C support is built-in for now
+m4_define([_LT_LANG_C_enabled], [])
+m4_define([_LT_TAGS], [])
+
+
+# LT_LANG(LANG)
+# -------------
+# Enable libtool support for the given language if not already enabled.
+AC_DEFUN([LT_LANG],
+[AC_BEFORE([$0], [LT_OUTPUT])dnl
+m4_case([$1],
+ [C], [_LT_LANG(C)],
+ [C++], [_LT_LANG(CXX)],
+ [Java], [_LT_LANG(GCJ)],
+ [Fortran 77], [_LT_LANG(F77)],
+ [Fortran], [_LT_LANG(FC)],
+ [Windows Resource], [_LT_LANG(RC)],
+ [m4_ifdef([_LT_LANG_]$1[_CONFIG],
+ [_LT_LANG($1)],
+ [m4_fatal([$0: unsupported language: "$1"])])])dnl
+])# LT_LANG
+
+
+# _LT_LANG(LANGNAME)
+# ------------------
+m4_defun([_LT_LANG],
+[m4_ifdef([_LT_LANG_]$1[_enabled], [],
+ [LT_SUPPORTED_TAG([$1])dnl
+ m4_append([_LT_TAGS], [$1 ])dnl
+ m4_define([_LT_LANG_]$1[_enabled], [])dnl
+ _LT_LANG_$1_CONFIG($1)])dnl
+])# _LT_LANG
+
+
+# _LT_LANG_DEFAULT_CONFIG
+# -----------------------
+m4_defun([_LT_LANG_DEFAULT_CONFIG],
+[AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [LT_LANG(CXX)],
+ [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_F77],
+ [LT_LANG(F77)],
+ [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_FC],
+ [LT_LANG(FC)],
+ [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
+
+dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
+dnl pulling things in needlessly.
+AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [m4_ifdef([AC_PROG_GCJ],
+ [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
+ m4_ifdef([A][M_PROG_GCJ],
+ [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
+ m4_ifdef([LT_PROG_GCJ],
+ [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
+
+AC_PROVIDE_IFELSE([LT_PROG_RC],
+ [LT_LANG(RC)],
+ [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
+])# _LT_LANG_DEFAULT_CONFIG
+
+# Obsolete macros:
+AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
+AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
+AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
+AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
+AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
+dnl AC_DEFUN([AC_LIBTOOL_F77], [])
+dnl AC_DEFUN([AC_LIBTOOL_FC], [])
+dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
+dnl AC_DEFUN([AC_LIBTOOL_RC], [])
+
+
+# _LT_TAG_COMPILER
+# ----------------
+m4_defun([_LT_TAG_COMPILER],
[AC_REQUIRE([AC_PROG_CC])dnl
+_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
+_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
+_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
+_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
+
# If no C compiler was specified, use CC.
LTCC=${LTCC-"$CC"}
@@ -239,36 +904,20 @@ LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
# Allow CC to be a program name with arguments.
compiler=$CC
-])# _LT_AC_SYS_COMPILER
-
-
-# _LT_CC_BASENAME(CC)
-# -------------------
-# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
-AC_DEFUN([_LT_CC_BASENAME],
-[for cc_temp in $1""; do
- case $cc_temp in
- compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
- distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
- \-*) ;;
- *) break;;
- esac
-done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-])
+])# _LT_TAG_COMPILER
# _LT_COMPILER_BOILERPLATE
# ------------------------
# Check for compiler boilerplate output or warnings with
# the simple compiler test code.
-AC_DEFUN([_LT_COMPILER_BOILERPLATE],
-[AC_REQUIRE([LT_AC_PROG_SED])dnl
+m4_defun([_LT_COMPILER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" >conftest.$ac_ext
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_compiler_boilerplate=`cat conftest.err`
-$rm conftest*
+$RM conftest*
])# _LT_COMPILER_BOILERPLATE
@@ -276,216 +925,311 @@ $rm conftest*
# ----------------------
# Check for linker boilerplate output or warnings with
# the simple link test code.
-AC_DEFUN([_LT_LINKER_BOILERPLATE],
-[AC_REQUIRE([LT_AC_PROG_SED])dnl
+m4_defun([_LT_LINKER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
ac_outfile=conftest.$ac_objext
echo "$lt_simple_link_test_code" >conftest.$ac_ext
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_linker_boilerplate=`cat conftest.err`
-$rm conftest*
+$RM -r conftest*
])# _LT_LINKER_BOILERPLATE
+# _LT_REQUIRED_DARWIN_CHECKS
+# -------------------------
+m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
+ case $host_os in
+ rhapsody* | darwin*)
+ AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
+ AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
+ AC_CHECK_TOOL([LIPO], [lipo], [:])
+ AC_CHECK_TOOL([OTOOL], [otool], [:])
+ AC_CHECK_TOOL([OTOOL64], [otool64], [:])
+ _LT_DECL([], [DSYMUTIL], [1],
+ [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
+ _LT_DECL([], [NMEDIT], [1],
+ [Tool to change global to local symbols on Mac OS X])
+ _LT_DECL([], [LIPO], [1],
+ [Tool to manipulate fat objects and archives on Mac OS X])
+ _LT_DECL([], [OTOOL], [1],
+ [ldd/readelf like tool for Mach-O binaries on Mac OS X])
+ _LT_DECL([], [OTOOL64], [1],
+ [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
+
+ AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
+ [lt_cv_apple_cc_single_mod=no
+ if test -z "${LT_MULTI_MODULE}"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi_module to the
+ # link flags.
+ rm -rf libconftest.dylib*
+ echo "int foo(void){return 1;}" > conftest.c
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+ _lt_result=$?
+ if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+ lt_cv_apple_cc_single_mod=yes
+ else
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ fi
+ rm -rf libconftest.dylib*
+ rm -f conftest.*
+ fi])
+ AC_CACHE_CHECK([for -exported_symbols_list linker flag],
+ [lt_cv_ld_exported_symbols_list],
+ [lt_cv_ld_exported_symbols_list=no
+ save_LDFLAGS=$LDFLAGS
+ echo "_main" > conftest.sym
+ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+ [lt_cv_ld_exported_symbols_list=yes],
+ [lt_cv_ld_exported_symbols_list=no])
+ LDFLAGS="$save_LDFLAGS"
+ ])
+ AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
+ [lt_cv_ld_force_load=no
+ cat > conftest.c << _LT_EOF
+int forced_loaded() { return 2;}
+_LT_EOF
+ echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
+ $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
+ echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
+ $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
+ echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
+ $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
+ cat > conftest.c << _LT_EOF
+int main() { return 0;}
+_LT_EOF
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
+ $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
+ _lt_result=$?
+ if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
+ lt_cv_ld_force_load=yes
+ else
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ fi
+ rm -f conftest.err libconftest.a conftest conftest.c
+ rm -rf conftest.dSYM
+ ])
+ case $host_os in
+ rhapsody* | darwin1.[[012]])
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+ darwin1.*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ darwin*) # darwin 5.x on
+ # if running on 10.5 or later, the deployment target defaults
+ # to the OS version, if on x86, and 10.4, the deployment
+ # target defaults to 10.4. Don't you love it?
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ 10.[[012]]*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 10.*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ esac
+ ;;
+ esac
+ if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+ _lt_dar_single_mod='$single_module'
+ fi
+ if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+ _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+ else
+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
+ _lt_dsymutil='~$DSYMUTIL $lib || :'
+ else
+ _lt_dsymutil=
+ fi
+ ;;
+ esac
+])
-# _LT_AC_SYS_LIBPATH_AIX
-# ----------------------
+
+# _LT_DARWIN_LINKER_FEATURES
+# --------------------------
+# Checks for linker and compiler features on darwin
+m4_defun([_LT_DARWIN_LINKER_FEATURES],
+[
+ m4_require([_LT_REQUIRED_DARWIN_CHECKS])
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_automatic, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ if test "$lt_cv_ld_force_load" = "yes"; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+ fi
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
+ case $cc_basename in
+ ifort*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test "$_lt_dar_can_shared" = "yes"; then
+ output_verbose_link_cmd=func_echo_all
+ _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+ m4_if([$1], [CXX],
+[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+ _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+ fi
+],[])
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+])
+
+# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
+# ----------------------------------
# Links a minimal program and checks the executable
# for the system default hardcoded library path. In most cases,
# this is /usr/lib:/lib, but when the MPI compilers are used
# the location of the communication and MPI libs are included too.
# If we don't find anything, use the default library path according
# to the aix ld manual.
-AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
-[AC_REQUIRE([LT_AC_PROG_SED])dnl
-AC_LINK_IFELSE(AC_LANG_PROGRAM,[
-lt_aix_libpath_sed='
- /Import File Strings/,/^$/ {
- /^0/ {
- s/^0 *\(.*\)$/\1/
- p
- }
- }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi],[])
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-])# _LT_AC_SYS_LIBPATH_AIX
-
-
-# _LT_AC_SHELL_INIT(ARG)
-# ----------------------
-AC_DEFUN([_LT_AC_SHELL_INIT],
-[ifdef([AC_DIVERSION_NOTICE],
- [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
- [AC_DIVERT_PUSH(NOTICE)])
-$1
-AC_DIVERT_POP
-])# _LT_AC_SHELL_INIT
-
-
-# _LT_AC_PROG_ECHO_BACKSLASH
-# --------------------------
-# Add some code to the start of the generated configure script which
-# will find an echo command which doesn't interpret backslashes.
-AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
-[_LT_AC_SHELL_INIT([
-# Check that we are running under the correct shell.
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-case X$ECHO in
-X*--fallback-echo)
- # Remove one level of quotation (which was required for Make).
- ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
- ;;
-esac
-
-echo=${ECHO-echo}
-if test "X[$]1" = X--no-reexec; then
- # Discard the --no-reexec flag, and continue.
- shift
-elif test "X[$]1" = X--fallback-echo; then
- # Avoid inline document here, it may be left over
- :
-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
- # Yippee, $echo works!
- :
+# Store the results from the different compilers for each TAGNAME.
+# Allow to override them for all tags through lt_cv_aix_libpath.
+m4_defun([_LT_SYS_MODULE_PATH_AIX],
+[m4_require([_LT_DECL_SED])dnl
+if test "${lt_cv_aix_libpath+set}" = set; then
+ aix_libpath=$lt_cv_aix_libpath
else
- # Restart under the correct shell.
- exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
+ AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
+ lt_aix_libpath_sed='[
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\([^ ]*\) *$/\1/
+ p
+ }
+ }]'
+ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
+ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ fi],[])
+ if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
+ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
+ fi
+ ])
+ aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
fi
+])# _LT_SYS_MODULE_PATH_AIX
-if test "X[$]1" = X--fallback-echo; then
- # used as fallback echo
- shift
- cat <<EOF
-[$]*
-EOF
- exit 0
-fi
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+# _LT_SHELL_INIT(ARG)
+# -------------------
+m4_define([_LT_SHELL_INIT],
+[m4_divert_text([M4SH-INIT], [$1
+])])# _LT_SHELL_INIT
-if test -z "$ECHO"; then
-if test "X${echo_test_string+set}" != Xset; then
-# find a string as large as possible, as long as the shell can cope with it
- for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
- # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
- if (echo_test_string=`eval $cmd`) 2>/dev/null &&
- echo_test_string=`eval $cmd` &&
- (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
- then
- break
- fi
- done
-fi
-if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- :
+
+# _LT_PROG_ECHO_BACKSLASH
+# -----------------------
+# Find how we can fake an echo command that does not interpret backslash.
+# In particular, with Autoconf 2.60 or later we add some code to the start
+# of the generated configure script which will find a shell with a builtin
+# printf (which we can use as an echo command).
+m4_defun([_LT_PROG_ECHO_BACKSLASH],
+[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+
+AC_MSG_CHECKING([how to print strings])
+# Test print first, because it will be a builtin if present.
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='print -r --'
+elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='printf %s\n'
else
- # The Solaris, AIX, and Digital Unix default echo programs unquote
- # backslashes. This makes it impossible to quote backslashes using
- # echo "$something" | sed 's/\\/\\\\/g'
- #
- # So, first we look for a working echo in the user's PATH.
+ # Use this function as a fallback that always works.
+ func_fallback_echo ()
+ {
+ eval 'cat <<_LTECHO_EOF
+$[]1
+_LTECHO_EOF'
+ }
+ ECHO='func_fallback_echo'
+fi
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for dir in $PATH /usr/ucb; do
- IFS="$lt_save_ifs"
- if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
- test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- echo="$dir/echo"
- break
- fi
- done
- IFS="$lt_save_ifs"
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+ $ECHO "$*"
+}
- if test "X$echo" = Xecho; then
- # We didn't find a better echo, so look for alternatives.
- if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- # This shell has a builtin print -r that does the trick.
- echo='print -r'
- elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
- test "X$CONFIG_SHELL" != X/bin/ksh; then
- # If we have ksh, try running configure again with it.
- ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
- export ORIGINAL_CONFIG_SHELL
- CONFIG_SHELL=/bin/ksh
- export CONFIG_SHELL
- exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
- else
- # Try using printf.
- echo='printf %s\n'
- if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- # Cool, printf works
- :
- elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
- test "X$echo_testing_string" = 'X\t' &&
- echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
- export CONFIG_SHELL
- SHELL="$CONFIG_SHELL"
- export SHELL
- echo="$CONFIG_SHELL [$]0 --fallback-echo"
- elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
- test "X$echo_testing_string" = 'X\t' &&
- echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- echo="$CONFIG_SHELL [$]0 --fallback-echo"
- else
- # maybe with a smaller string...
- prev=:
+case "$ECHO" in
+ printf*) AC_MSG_RESULT([printf]) ;;
+ print*) AC_MSG_RESULT([print -r]) ;;
+ *) AC_MSG_RESULT([cat]) ;;
+esac
- for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
- if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
- then
- break
- fi
- prev="$cmd"
- done
+m4_ifdef([_AS_DETECT_SUGGESTED],
+[_AS_DETECT_SUGGESTED([
+ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
+ ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+ PATH=/empty FPATH=/empty; export PATH FPATH
+ test "X`printf %s $ECHO`" = "X$ECHO" \
+ || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
- if test "$prev" != 'sed 50q "[$]0"'; then
- echo_test_string=`eval $prev`
- export echo_test_string
- exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
- else
- # Oops. We lost completely, so just stick with echo.
- echo=echo
- fi
- fi
- fi
- fi
-fi
-fi
+_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
+_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
+])# _LT_PROG_ECHO_BACKSLASH
-# Copy echo and quote the copy suitably for passing to libtool from
-# the Makefile, instead of quoting the original, which is used later.
-ECHO=$echo
-if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
- ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
-fi
-AC_SUBST(ECHO)
-])])# _LT_AC_PROG_ECHO_BACKSLASH
+# _LT_WITH_SYSROOT
+# ----------------
+AC_DEFUN([_LT_WITH_SYSROOT],
+[AC_MSG_CHECKING([for sysroot])
+AC_ARG_WITH([sysroot],
+[ --with-sysroot[=DIR] Search for dependent libraries within DIR
+ (or the compiler's sysroot if not specified).],
+[], [with_sysroot=no])
+
+dnl lt_sysroot will always be passed unquoted. We quote it here
+dnl in case the user passed a directory name.
+lt_sysroot=
+case ${with_sysroot} in #(
+ yes)
+ if test "$GCC" = yes; then
+ lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+ fi
+ ;; #(
+ /*)
+ lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+ ;; #(
+ no|'')
+ ;; #(
+ *)
+ AC_MSG_RESULT([${with_sysroot}])
+ AC_MSG_ERROR([The sysroot must be an absolute path.])
+ ;;
+esac
+ AC_MSG_RESULT([${lt_sysroot:-no}])
+_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
+[dependent libraries, and in which our libraries should be installed.])])
-# _LT_AC_LOCK
-# -----------
-AC_DEFUN([_LT_AC_LOCK],
+# _LT_ENABLE_LOCK
+# ---------------
+m4_defun([_LT_ENABLE_LOCK],
[AC_ARG_ENABLE([libtool-lock],
- [AC_HELP_STRING([--disable-libtool-lock],
- [avoid locking (might break parallel builds)])])
+ [AS_HELP_STRING([--disable-libtool-lock],
+ [avoid locking (might break parallel builds)])])
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
# Some flags need to be propagated to the compiler or linker for good
@@ -496,93 +1240,93 @@ ia64-*-hpux*)
echo 'int i;' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
case `/usr/bin/file conftest.$ac_objext` in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
+ *ELF-32*)
+ HPUX_IA64_MODE="32"
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE="64"
+ ;;
esac
fi
rm -rf conftest*
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+ echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
- if test "$lt_cv_prog_gnu_ld" = yes; then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -melf32bsmip"
- ;;
- *N32*)
- LD="${LD-ld} -melf32bmipn32"
- ;;
- *64-bit*)
- LD="${LD-ld} -melf64bmip"
- ;;
- esac
- else
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
fi
rm -rf conftest*
;;
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
-s390*-*linux*|sparc*-*linux*)
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
case `/usr/bin/file conftest.o` in
- *32-bit*)
- case $host in
- x86_64-*kfreebsd*-gnu)
- LD="${LD-ld} -m elf_i386_fbsd"
- ;;
- x86_64-*linux*)
- LD="${LD-ld} -m elf_i386"
- ;;
- ppc64-*linux*|powerpc64-*linux*)
- LD="${LD-ld} -m elf32ppclinux"
- ;;
- s390x-*linux*)
- LD="${LD-ld} -m elf_s390"
- ;;
- sparc64-*linux*)
- LD="${LD-ld} -m elf32_sparc"
- ;;
- esac
- ;;
- *64-bit*)
- case $host in
- x86_64-*kfreebsd*-gnu)
- LD="${LD-ld} -m elf_x86_64_fbsd"
- ;;
- x86_64-*linux*)
- LD="${LD-ld} -m elf_x86_64"
- ;;
- ppc*-*linux*|powerpc*-*linux*)
- LD="${LD-ld} -m elf64ppc"
- ;;
- s390*-*linux*)
- LD="${LD-ld} -m elf64_s390"
- ;;
- sparc*-*linux*)
- LD="${LD-ld} -m elf64_sparc"
- ;;
- esac
- ;;
+ *32-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ ppc64-*linux*|powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ ppc*-*linux*|powerpc*-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
esac
fi
rm -rf conftest*
@@ -594,7 +1338,7 @@ s390*-*linux*|sparc*-*linux*)
CFLAGS="$CFLAGS -belf"
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
[AC_LANG_PUSH(C)
- AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
AC_LANG_POP])
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
@@ -609,37 +1353,116 @@ sparc*-*solaris*)
*64-bit*)
case $lt_cv_prog_gnu_ld in
yes*) LD="${LD-ld} -m elf64_sparc" ;;
- *) LD="${LD-ld} -64" ;;
+ *)
+ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+ LD="${LD-ld} -64"
+ fi
+ ;;
esac
;;
esac
fi
rm -rf conftest*
;;
-
-AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
-[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
- AC_CHECK_TOOL(DLLTOOL, dlltool, false)
- AC_CHECK_TOOL(AS, as, false)
- AC_CHECK_TOOL(OBJDUMP, objdump, false)
- ;;
- ])
esac
need_locks="$enable_libtool_lock"
+])# _LT_ENABLE_LOCK
+
+
+# _LT_PROG_AR
+# -----------
+m4_defun([_LT_PROG_AR],
+[AC_CHECK_TOOLS(AR, [ar], false)
+: ${AR=ar}
+: ${AR_FLAGS=cru}
+_LT_DECL([], [AR], [1], [The archiver])
+_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
+
+AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
+ [lt_cv_ar_at_file=no
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
+ [echo conftest.$ac_objext > conftest.lst
+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
+ AC_TRY_EVAL([lt_ar_try])
+ if test "$ac_status" -eq 0; then
+ # Ensure the archiver fails upon bogus file names.
+ rm -f conftest.$ac_objext libconftest.a
+ AC_TRY_EVAL([lt_ar_try])
+ if test "$ac_status" -ne 0; then
+ lt_cv_ar_at_file=@
+ fi
+ fi
+ rm -f conftest.* libconftest.a
+ ])
+ ])
+
+if test "x$lt_cv_ar_at_file" = xno; then
+ archiver_list_spec=
+else
+ archiver_list_spec=$lt_cv_ar_at_file
+fi
+_LT_DECL([], [archiver_list_spec], [1],
+ [How to feed a file listing to the archiver])
+])# _LT_PROG_AR
+
+
+# _LT_CMD_OLD_ARCHIVE
+# -------------------
+m4_defun([_LT_CMD_OLD_ARCHIVE],
+[_LT_PROG_AR
+
+AC_CHECK_TOOL(STRIP, strip, :)
+test -z "$STRIP" && STRIP=:
+_LT_DECL([], [STRIP], [1], [A symbol stripping program])
+
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+test -z "$RANLIB" && RANLIB=:
+_LT_DECL([], [RANLIB], [1],
+ [Commands used to install an old-style archive])
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
-])# _LT_AC_LOCK
+case $host_os in
+ darwin*)
+ lock_old_archive_extraction=yes ;;
+ *)
+ lock_old_archive_extraction=no ;;
+esac
+_LT_DECL([], [old_postinstall_cmds], [2])
+_LT_DECL([], [old_postuninstall_cmds], [2])
+_LT_TAGDECL([], [old_archive_cmds], [2],
+ [Commands used to build an old-style archive])
+_LT_DECL([], [lock_old_archive_extraction], [0],
+ [Whether to use a lock for old archive extraction])
+])# _LT_CMD_OLD_ARCHIVE
-# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
# ----------------------------------------------------------------
# Check whether the given compiler option works
-AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
-[AC_REQUIRE([LT_AC_PROG_SED])
+AC_DEFUN([_LT_COMPILER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
AC_CACHE_CHECK([$1], [$2],
[$2=no
- ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+ m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="$3"
# Insert the option either (1) after the last *FLAGS variable, or
@@ -651,37 +1474,43 @@ AC_CACHE_CHECK([$1], [$2],
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&AS_MESSAGE_LOG_FD
- echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
- $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
$2=yes
fi
fi
- $rm conftest*
+ $RM conftest*
])
if test x"[$]$2" = xyes; then
- ifelse([$5], , :, [$5])
+ m4_if([$5], , :, [$5])
else
- ifelse([$6], , :, [$6])
+ m4_if([$6], , :, [$6])
fi
-])# AC_LIBTOOL_COMPILER_OPTION
+])# _LT_COMPILER_OPTION
+# Old name:
+AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
-# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-# [ACTION-SUCCESS], [ACTION-FAILURE])
-# ------------------------------------------------------------
-# Check whether the given compiler option works
-AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
-[AC_REQUIRE([LT_AC_PROG_SED])dnl
+
+# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------
+# Check whether the given linker option works
+AC_DEFUN([_LT_LINKER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
AC_CACHE_CHECK([$1], [$2],
[$2=no
save_LDFLAGS="$LDFLAGS"
@@ -693,7 +1522,7 @@ AC_CACHE_CHECK([$1], [$2],
if test -s conftest.err; then
# Append any errors to the config.log.
cat conftest.err 1>&AS_MESSAGE_LOG_FD
- $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+ $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
if diff conftest.exp conftest.er2 >/dev/null; then
$2=yes
@@ -702,22 +1531,28 @@ AC_CACHE_CHECK([$1], [$2],
$2=yes
fi
fi
- $rm conftest*
+ $RM -r conftest*
LDFLAGS="$save_LDFLAGS"
])
if test x"[$]$2" = xyes; then
- ifelse([$4], , :, [$4])
+ m4_if([$4], , :, [$4])
else
- ifelse([$5], , :, [$5])
+ m4_if([$5], , :, [$5])
fi
-])# AC_LIBTOOL_LINKER_OPTION
+])# _LT_LINKER_OPTION
+# Old name:
+AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
-# AC_LIBTOOL_SYS_MAX_CMD_LEN
-# --------------------------
-AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
-[# find the maximum length of command line arguments
+
+# LT_CMD_MAX_LEN
+#---------------
+AC_DEFUN([LT_CMD_MAX_LEN],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# find the maximum length of command line arguments
AC_MSG_CHECKING([the maximum length of command line arguments])
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
i=0
@@ -739,7 +1574,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
lt_cv_sys_max_cmd_len=-1;
;;
- cygwin* | mingw*)
+ cygwin* | mingw* | cegcc*)
# On Win9x/ME, this test blows up -- it succeeds, but takes
# about 5 minutes as the teststring grows exponentially.
# Worse, since 9x/ME are not pre-emptively multitasking,
@@ -750,6 +1585,11 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
lt_cv_sys_max_cmd_len=8192;
;;
+ mint*)
+ # On MiNT this can take a long time and run out of memory.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
amigaos*)
# On AmigaOS with pdksh, this test takes hours, literally.
# So we just punt and use a minimum line length of 8192.
@@ -794,7 +1634,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
sysv5* | sco5v6* | sysv4.2uw2*)
kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
if test -n "$kargmax"; then
- lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
else
lt_cv_sys_max_cmd_len=32768
fi
@@ -805,20 +1645,28 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8 ; do
+ teststring=$teststring$teststring
+ done
SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
- while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
- = "XX$teststring") >/dev/null 2>&1 &&
- new_result=`expr "X$teststring" : ".*" 2>&1` &&
- lt_cv_sys_max_cmd_len=$new_result &&
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
+ = "X$teststring$teststring"; } >/dev/null 2>&1 &&
test $i != 17 # 1/2 MB should be enough
do
i=`expr $i + 1`
teststring=$teststring$teststring
done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
teststring=
- # Add a significant safety factor because C++ compilers can tack on massive
- # amounts of additional arguments before passing them to the linker.
- # It appears as though 1/2 is a usable value.
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
fi
;;
@@ -829,28 +1677,36 @@ if test -n $lt_cv_sys_max_cmd_len ; then
else
AC_MSG_RESULT(none)
fi
-])# AC_LIBTOOL_SYS_MAX_CMD_LEN
+max_cmd_len=$lt_cv_sys_max_cmd_len
+_LT_DECL([], [max_cmd_len], [0],
+ [What is the maximum length of a command?])
+])# LT_CMD_MAX_LEN
+# Old name:
+AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
-# _LT_AC_CHECK_DLFCN
-# ------------------
-AC_DEFUN([_LT_AC_CHECK_DLFCN],
-[AC_CHECK_HEADERS(dlfcn.h)dnl
-])# _LT_AC_CHECK_DLFCN
+# _LT_HEADER_DLFCN
+# ----------------
+m4_defun([_LT_HEADER_DLFCN],
+[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
+])# _LT_HEADER_DLFCN
-# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
-# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
-# ---------------------------------------------------------------------
-AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
-[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+
+# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ----------------------------------------------------------------
+m4_defun([_LT_TRY_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
if test "$cross_compiling" = yes; then :
[$4]
else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<EOF
-[#line __oline__ "configure"
+ cat > conftest.$ac_ext <<_LT_EOF
+[#line $LINENO "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -891,11 +1747,13 @@ else
# endif
#endif
-#ifdef __cplusplus
-extern "C" void exit (int);
+/* When -fvisbility=hidden is used, assume the code has been annotated
+ correspondingly for the symbols needed. */
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
#endif
-void fnord() { int i=42;}
+int fnord () { return 42; }
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
@@ -904,15 +1762,19 @@ int main ()
if (self)
{
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
- else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ else
+ {
+ if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ else puts (dlerror ());
+ }
/* dlclose (self); */
}
else
puts (dlerror ());
- exit (status);
+ return status;
}]
-EOF
+_LT_EOF
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
(./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
lt_status=$?
@@ -927,13 +1789,13 @@ EOF
fi
fi
rm -fr conftest*
-])# _LT_AC_TRY_DLOPEN_SELF
+])# _LT_TRY_DLOPEN_SELF
-# AC_LIBTOOL_DLOPEN_SELF
-# ----------------------
-AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
-[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+# LT_SYS_DLOPEN_SELF
+# ------------------
+AC_DEFUN([LT_SYS_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
if test "x$enable_dlopen" != xyes; then
enable_dlopen=unknown
enable_dlopen_self=unknown
@@ -949,15 +1811,15 @@ else
lt_cv_dlopen_self=yes
;;
- mingw* | pw32*)
+ mingw* | pw32* | cegcc*)
lt_cv_dlopen="LoadLibrary"
lt_cv_dlopen_libs=
- ;;
+ ;;
cygwin*)
lt_cv_dlopen="dlopen"
lt_cv_dlopen_libs=
- ;;
+ ;;
darwin*)
# if libdl is installed we need to link against it
@@ -967,13 +1829,13 @@ else
lt_cv_dlopen_libs=
lt_cv_dlopen_self=yes
])
- ;;
+ ;;
*)
AC_CHECK_FUNC([shl_load],
[lt_cv_dlopen="shl_load"],
[AC_CHECK_LIB([dld], [shl_load],
- [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
+ [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
[AC_CHECK_FUNC([dlopen],
[lt_cv_dlopen="dlopen"],
[AC_CHECK_LIB([dl], [dlopen],
@@ -981,7 +1843,7 @@ else
[AC_CHECK_LIB([svld], [dlopen],
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
[AC_CHECK_LIB([dld], [dld_link],
- [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
+ [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
])
])
])
@@ -1009,7 +1871,7 @@ else
AC_CACHE_CHECK([whether a program can dlopen itself],
lt_cv_dlopen_self, [dnl
- _LT_AC_TRY_DLOPEN_SELF(
+ _LT_TRY_DLOPEN_SELF(
lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
])
@@ -1017,8 +1879,8 @@ else
if test "x$lt_cv_dlopen_self" = xyes; then
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
- lt_cv_dlopen_self_static, [dnl
- _LT_AC_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self_static, [dnl
+ _LT_TRY_DLOPEN_SELF(
lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
])
@@ -1040,19 +1902,32 @@ else
*) enable_dlopen_self_static=unknown ;;
esac
fi
-])# AC_LIBTOOL_DLOPEN_SELF
+_LT_DECL([dlopen_support], [enable_dlopen], [0],
+ [Whether dlopen is supported])
+_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
+ [Whether dlopen of programs is supported])
+_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
+ [Whether dlopen of statically linked programs is supported])
+])# LT_SYS_DLOPEN_SELF
+# Old name:
+AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
-# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
-# ---------------------------------
-# Check to see if options -c and -o are simultaneously supported by compiler
-AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
-[AC_REQUIRE([LT_AC_PROG_SED])dnl
-AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+
+# _LT_COMPILER_C_O([TAGNAME])
+# ---------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler.
+# This macro does not hard code the compiler like AC_PROG_CC_C_O.
+m4_defun([_LT_COMPILER_C_O],
+[m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
- [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
- [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
- $rm -r conftest 2>/dev/null
+ [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+ [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+ $RM -r conftest 2>/dev/null
mkdir conftest
cd conftest
mkdir out
@@ -1067,46 +1942,50 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&AS_MESSAGE_LOG_FD
- echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
- $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
$SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
- _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+ _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
fi
fi
chmod u+w . 2>&AS_MESSAGE_LOG_FD
- $rm conftest*
+ $RM conftest*
# SGI C++ compiler will create directory out/ii_files/ for
# template instantiation
- test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
- $rm out/* && rmdir out
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
cd ..
- rmdir conftest
- $rm conftest*
+ $RM -r conftest
+ $RM conftest*
])
-])# AC_LIBTOOL_PROG_CC_C_O
+_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
+ [Does compiler simultaneously support -c and -o options?])
+])# _LT_COMPILER_C_O
-# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
-# -----------------------------------------
+# _LT_COMPILER_FILE_LOCKS([TAGNAME])
+# ----------------------------------
# Check to see if we can do hard links to lock some files if needed
-AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
-[AC_REQUIRE([_LT_AC_LOCK])dnl
+m4_defun([_LT_COMPILER_FILE_LOCKS],
+[m4_require([_LT_ENABLE_LOCK])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_COMPILER_C_O([$1])
hard_links="nottested"
-if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
# do not overwrite the value of need_locks provided by the user
AC_MSG_CHECKING([if we can lock with hard links])
hard_links=yes
- $rm conftest*
+ $RM conftest*
ln conftest.a conftest.b 2>/dev/null && hard_links=no
touch conftest.a
ln conftest.a conftest.b 2>&5 || hard_links=no
@@ -1119,12 +1998,13 @@ if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks"
else
need_locks=no
fi
-])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
+_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
+])# _LT_COMPILER_FILE_LOCKS
-# AC_LIBTOOL_OBJDIR
-# -----------------
-AC_DEFUN([AC_LIBTOOL_OBJDIR],
+# _LT_CHECK_OBJDIR
+# ----------------
+m4_defun([_LT_CHECK_OBJDIR],
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
[rm -f .libs 2>/dev/null
mkdir .libs 2>/dev/null
@@ -1136,40 +2016,46 @@ else
fi
rmdir .libs 2>/dev/null])
objdir=$lt_cv_objdir
-])# AC_LIBTOOL_OBJDIR
+_LT_DECL([], [objdir], [0],
+ [The name of the directory that contains temporary libtool files])dnl
+m4_pattern_allow([LT_OBJDIR])dnl
+AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
+ [Define to the sub-directory in which libtool stores uninstalled libraries.])
+])# _LT_CHECK_OBJDIR
-# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
-# ----------------------------------------------
+# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
+# --------------------------------------
# Check hardcoding attributes.
-AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
+m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
[AC_MSG_CHECKING([how to hardcode library paths into programs])
-_LT_AC_TAGVAR(hardcode_action, $1)=
-if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
- test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
- test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
+_LT_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
+ test -n "$_LT_TAGVAR(runpath_var, $1)" ||
+ test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
- # We can hardcode non-existant directories.
- if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
+ # We can hardcode non-existent directories.
+ if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
# If the only mechanism to avoid hardcoding is shlibpath_var, we
# have to relink, otherwise we might link with an installed library
# when we should be linking with a yet-to-be-installed one
- ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
- test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+ test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
# Linking always hardcodes the temporary library directory.
- _LT_AC_TAGVAR(hardcode_action, $1)=relink
+ _LT_TAGVAR(hardcode_action, $1)=relink
else
# We can link without hardcoding, and we can hardcode nonexisting dirs.
- _LT_AC_TAGVAR(hardcode_action, $1)=immediate
+ _LT_TAGVAR(hardcode_action, $1)=immediate
fi
else
# We cannot hardcode anything, or else we can only hardcode existing
# directories.
- _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
+ _LT_TAGVAR(hardcode_action, $1)=unsupported
fi
-AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
+AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
-if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
+if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
+ test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
# Fast installation is not supported
enable_fast_install=no
elif test "$shlibpath_overrides_runpath" = yes ||
@@ -1177,74 +2063,79 @@ elif test "$shlibpath_overrides_runpath" = yes ||
# Fast installation is not necessary
enable_fast_install=needless
fi
-])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
+_LT_TAGDECL([], [hardcode_action], [0],
+ [How to hardcode a shared library path into an executable])
+])# _LT_LINKER_HARDCODE_LIBPATH
-# AC_LIBTOOL_SYS_LIB_STRIP
-# ------------------------
-AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
-[striplib=
+# _LT_CMD_STRIPLIB
+# ----------------
+m4_defun([_LT_CMD_STRIPLIB],
+[m4_require([_LT_DECL_EGREP])
+striplib=
old_striplib=
AC_MSG_CHECKING([whether stripping libraries is possible])
-if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
AC_MSG_RESULT([yes])
else
# FIXME - insert some real tests, host_os isn't really good enough
case $host_os in
- darwin*)
- if test -n "$STRIP" ; then
- striplib="$STRIP -x"
- old_striplib="$STRIP -S"
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
-fi
- ;;
- *)
- AC_MSG_RESULT([no])
+ darwin*)
+ if test -n "$STRIP" ; then
+ striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ ;;
+ *)
+ AC_MSG_RESULT([no])
;;
esac
fi
-])# AC_LIBTOOL_SYS_LIB_STRIP
+_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
+_LT_DECL([], [striplib], [1])
+])# _LT_CMD_STRIPLIB
-# AC_LIBTOOL_SYS_DYNAMIC_LINKER
+# _LT_SYS_DYNAMIC_LINKER([TAG])
# -----------------------------
# PORTME Fill in your ld.so characteristics
-AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
-[AC_REQUIRE([LT_AC_PROG_SED])dnl
+m4_defun([_LT_SYS_DYNAMIC_LINKER],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_OBJDUMP])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
AC_MSG_CHECKING([dynamic linker characteristics])
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-m4_if($1,[],[
+m4_if([$1],
+ [], [
if test "$GCC" = yes; then
case $host_os in
darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
*) lt_awk_arg="/^libraries:/" ;;
esac
- lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
+ case $host_os in
+ mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
+ *) lt_sed_strip_eq="s,=/,/,g" ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
+ case $lt_search_path_spec in
+ *\;*)
# if the path contains ";" then we assume it to be the separator
# otherwise default to the standard path separator (i.e. ":") - it is
# assumed that no part of a normal pathname contains ";" but that should
# okay in the real world where ";" in dirpaths is itself problematic.
- lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
- else
- lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
+ ;;
+ *)
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ esac
# Ok, now we have the path, separated by spaces, we can step through it
# and add multilib dir if necessary.
lt_tmp_lt_search_path_spec=
@@ -1257,7 +2148,7 @@ if test "$GCC" = yes; then
lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
fi
done
- lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
+ lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
BEGIN {RS=" "; FS="/|\n";} {
lt_foo="";
lt_count=0;
@@ -1277,10 +2168,29 @@ BEGIN {RS=" "; FS="/|\n";} {
if (lt_foo != "") { lt_freq[[lt_foo]]++; }
if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
}'`
- sys_lib_search_path_spec=`echo $lt_search_path_spec`
+ # AWK program above erroneously prepends '/' to C:/dos/paths
+ # for these hosts.
+ case $host_os in
+ mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
+ $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
+ esac
+ sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
else
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
fi])
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
need_lib_prefix=unknown
hardcode_into_libs=no
@@ -1298,7 +2208,7 @@ aix3*)
soname_spec='${libname}${release}${shared_ext}$major'
;;
-aix4* | aix5*)
+aix[[4-9]]*)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -1317,7 +2227,7 @@ aix4* | aix5*)
aix4 | aix4.[[01]] | aix4.[[01]].*)
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
echo ' yes '
- echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+ echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
:
else
can_build_shared=no
@@ -1343,9 +2253,18 @@ aix4* | aix5*)
;;
amigaos*)
- library_names_spec='$libname.ixlibrary $libname.a'
- # Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ ;;
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ esac
;;
beos*)
@@ -1368,61 +2287,112 @@ bsdi[[45]]*)
# libtool to hard-code these into programs
;;
-cygwin* | mingw* | pw32*)
+cygwin* | mingw* | pw32* | cegcc*)
version_type=windows
shrext_cmds=".dll"
need_version=no
need_lib_prefix=no
- case $GCC,$host_os in
- yes,cygwin* | yes,mingw* | yes,pw32*)
+ case $GCC,$cc_basename in
+ yes,*)
+ # gcc
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
dldir=$destdir/`dirname \$dlpath`~
test -d \$dldir || mkdir -p \$dldir~
$install_prog $dir/$dlname \$dldir/$dlname~
- chmod a+x \$dldir/$dlname'
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
dlpath=$dir/\$dldll~
- $rm \$dlpath'
+ $RM \$dlpath'
shlibpath_overrides_runpath=yes
case $host_os in
cygwin*)
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+m4_if([$1], [],[
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
;;
- mingw*)
+ mingw* | cegcc*)
# MinGW DLLs use traditional 'lib' prefix
soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
- # It is most probably a Windows format PATH printed by
- # mingw gcc, but we are running on Cygwin. Gcc prints its search
- # path with ; separators, and with drive letters. We can handle the
- # drive letters (cygwin fileutils understands them), so leave them,
- # especially as we might pass files found there to a mingw objdump,
- # which wouldn't understand a cygwinified path. Ahh.
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
;;
pw32*)
# pw32 DLLs use 'pw' prefix rather than 'lib'
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
;;
esac
+ dynamic_linker='Win32 ld.exe'
+ ;;
+
+ *,cl*)
+ # Native MSVC
+ libname_spec='$name'
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ library_names_spec='${libname}.dll.lib'
+
+ case $build_os in
+ mingw*)
+ sys_lib_search_path_spec=
+ lt_save_ifs=$IFS
+ IFS=';'
+ for lt_path in $LIB
+ do
+ IFS=$lt_save_ifs
+ # Let DOS variable expansion print the short 8.3 style file name.
+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+ done
+ IFS=$lt_save_ifs
+ # Convert to MSYS style.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
+ ;;
+ cygwin*)
+ # Convert to unix form, then to dos form, then back to unix form
+ # but this time dos style (no spaces!) so that the unix form looks
+ # like /cygdrive/c/PROGRA~1:/cygdr...
+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ *)
+ sys_lib_search_path_spec="$LIB"
+ if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
+ # It is most probably a Windows format PATH.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # FIXME: find the short name or the path components, as spaces are
+ # common. (e.g. "Program Files" -> "PROGRA~1")
+ ;;
+ esac
+
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+ dynamic_linker='Win32 link.exe'
;;
*)
+ # Assume MSVC wrapper
library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ dynamic_linker='Win32 ld.exe'
;;
esac
- dynamic_linker='Win32 ld.exe'
# FIXME: first we should search . and the directory the executable is in
shlibpath_var=PATH
;;
@@ -1432,13 +2402,13 @@ darwin* | rhapsody*)
version_type=darwin
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
soname_spec='${libname}${release}${major}$shared_ext'
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
- m4_if([$1], [],[
- sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
+m4_if([$1], [],[
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
;;
@@ -1451,10 +2421,6 @@ dgux*)
shlibpath_var=LD_LIBRARY_PATH
;;
-freebsd1*)
- dynamic_linker=no
- ;;
-
freebsd* | dragonfly*)
# DragonFly does not have aout. When/if they implement a new
# versioning mechanism, adjust this.
@@ -1462,7 +2428,7 @@ freebsd* | dragonfly*)
objformat=`/usr/bin/objformat`
else
case $host_os in
- freebsd[[123]]*) objformat=aout ;;
+ freebsd[[23]].*) objformat=aout ;;
*) objformat=elf ;;
esac
fi
@@ -1480,7 +2446,7 @@ freebsd* | dragonfly*)
esac
shlibpath_var=LD_LIBRARY_PATH
case $host_os in
- freebsd2*)
+ freebsd2.*)
shlibpath_overrides_runpath=yes
;;
freebsd3.[[01]]* | freebsdelf3.[[01]]*)
@@ -1509,6 +2475,19 @@ gnu*)
hardcode_into_libs=yes
;;
+haiku*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ dynamic_linker="$host_os runtime_loader"
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+ hardcode_into_libs=yes
+ ;;
+
hpux9* | hpux10* | hpux11*)
# Give a soname corresponding to the major version so that dld.sl refuses to
# link against other versions.
@@ -1531,18 +2510,18 @@ hpux9* | hpux10* | hpux11*)
fi
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
;;
- hppa*64*)
- shrext_cmds='.sl'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- *)
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
shrext_cmds='.sl'
dynamic_linker="$host_os dld.sl"
shlibpath_var=SHLIB_PATH
@@ -1551,8 +2530,10 @@ hpux9* | hpux10* | hpux11*)
soname_spec='${libname}${release}${shared_ext}$major'
;;
esac
- # HP-UX runs *really* slowly unless shared libraries are mode 555.
+ # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
postinstall_cmds='chmod 555 $lib'
+ # or fails outright, so override atomically:
+ install_override_mode=555
;;
interix[[3-9]]*)
@@ -1610,7 +2591,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -1619,6 +2600,22 @@ linux* | k*bsd*-gnu)
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
+
+ # Some binutils ld are patched to set DT_RUNPATH
+ AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
+ [lt_cv_shlibpath_overrides_runpath=no
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
+ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+ [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
+ [lt_cv_shlibpath_overrides_runpath=yes])])
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+ ])
+ shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
+
# This implies no fast_install, which is unacceptable.
# Some rework will be needed to allow for fast_install
# before this can be enabled.
@@ -1626,7 +2623,7 @@ linux* | k*bsd*-gnu)
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
fi
@@ -1643,7 +2640,7 @@ netbsd*)
version_type=sunos
need_lib_prefix=no
need_version=no
- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
dynamic_linker='NetBSD (a.out) ld.so'
@@ -1664,14 +2661,16 @@ newsos6)
shlibpath_overrides_runpath=yes
;;
-nto-qnx*)
- version_type=linux
+*nto* | *qnx*)
+ version_type=qnx
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
;;
openbsd*)
@@ -1680,13 +2679,13 @@ openbsd*)
need_lib_prefix=no
# Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
case $host_os in
- openbsd3.3 | openbsd3.3.*) need_version=yes ;;
- *) need_version=no ;;
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
esac
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
shlibpath_var=LD_LIBRARY_PATH
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
case $host_os in
openbsd2.[[89]] | openbsd2.[[89]].*)
shlibpath_overrides_runpath=no
@@ -1758,7 +2757,6 @@ sysv4 | sysv4.3*)
sni)
shlibpath_overrides_runpath=no
need_lib_prefix=no
- export_dynamic_flag_spec='${wl}-Blargedynsym'
runpath_var=LD_RUN_PATH
;;
siemens)
@@ -1789,13 +2787,12 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
if test "$with_gnu_ld" = yes; then
sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
- shlibpath_overrides_runpath=no
else
sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
- shlibpath_overrides_runpath=yes
case $host_os in
sco3.2v5*)
sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
@@ -1805,6 +2802,17 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
sys_lib_dlsearch_path_spec='/usr/lib'
;;
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
uts4*)
version_type=linux
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -1823,277 +2831,56 @@ variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
if test "$GCC" = yes; then
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
fi
-])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
-
-
-# _LT_AC_TAGCONFIG
-# ----------------
-AC_DEFUN([_LT_AC_TAGCONFIG],
-[AC_REQUIRE([LT_AC_PROG_SED])dnl
-AC_ARG_WITH([tags],
- [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
- [include additional configurations @<:@automatic@:>@])],
- [tagnames="$withval"])
-
-if test -f "$ltmain" && test -n "$tagnames"; then
- if test ! -f "${ofile}"; then
- AC_MSG_WARN([output file `$ofile' does not exist])
- fi
-
- if test -z "$LTCC"; then
- eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
- if test -z "$LTCC"; then
- AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
- else
- AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
- fi
- fi
- if test -z "$LTCFLAGS"; then
- eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
- fi
- # Extract list of available tagged configurations in $ofile.
- # Note that this assumes the entire list is on one line.
- available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
-
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for tagname in $tagnames; do
- IFS="$lt_save_ifs"
- # Check whether tagname contains only valid characters
- case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
- "") ;;
- *) AC_MSG_ERROR([invalid tag name: $tagname])
- ;;
- esac
-
- if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
- then
- AC_MSG_ERROR([tag name \"$tagname\" already exists])
- fi
-
- # Update the list of available tags.
- if test -n "$tagname"; then
- echo appending configuration tag \"$tagname\" to $ofile
-
- case $tagname in
- CXX)
- if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
- ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
- (test "X$CXX" != "Xg++"))) ; then
- AC_LIBTOOL_LANG_CXX_CONFIG
- else
- tagname=""
- fi
- ;;
-
- F77)
- if test -n "$F77" && test "X$F77" != "Xno"; then
- AC_LIBTOOL_LANG_F77_CONFIG
- else
- tagname=""
- fi
- ;;
-
- GCJ)
- if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
- AC_LIBTOOL_LANG_GCJ_CONFIG
- else
- tagname=""
- fi
- ;;
-
- RC)
- AC_LIBTOOL_LANG_RC_CONFIG
- ;;
-
- *)
- AC_MSG_ERROR([Unsupported tag name: $tagname])
- ;;
- esac
-
- # Append the new tag name to the list of available tags.
- if test -n "$tagname" ; then
- available_tags="$available_tags $tagname"
- fi
- fi
- done
- IFS="$lt_save_ifs"
-
- # Now substitute the updated list of available tags.
- if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
- mv "${ofile}T" "$ofile"
- chmod +x "$ofile"
- else
- rm -f "${ofile}T"
- AC_MSG_ERROR([unable to update list of available tagged configurations.])
- fi
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
fi
-])# _LT_AC_TAGCONFIG
-
-
-# AC_LIBTOOL_DLOPEN
-# -----------------
-# enable checks for dlopen support
-AC_DEFUN([AC_LIBTOOL_DLOPEN],
- [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
-])# AC_LIBTOOL_DLOPEN
-
-
-# AC_LIBTOOL_WIN32_DLL
-# --------------------
-# declare package support for building win32 DLLs
-AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
-[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
-])# AC_LIBTOOL_WIN32_DLL
-
-
-# AC_ENABLE_SHARED([DEFAULT])
-# ---------------------------
-# implement the --enable-shared flag
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
-AC_DEFUN([AC_ENABLE_SHARED],
-[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE([shared],
- [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
- [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
- [p=${PACKAGE-default}
- case $enableval in
- yes) enable_shared=yes ;;
- no) enable_shared=no ;;
- *)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac],
- [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
-])# AC_ENABLE_SHARED
-
-
-# AC_DISABLE_SHARED
-# -----------------
-# set the default shared flag to --disable-shared
-AC_DEFUN([AC_DISABLE_SHARED],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_SHARED(no)
-])# AC_DISABLE_SHARED
-
-
-# AC_ENABLE_STATIC([DEFAULT])
-# ---------------------------
-# implement the --enable-static flag
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
-AC_DEFUN([AC_ENABLE_STATIC],
-[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE([static],
- [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
- [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
- [p=${PACKAGE-default}
- case $enableval in
- yes) enable_static=yes ;;
- no) enable_static=no ;;
- *)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac],
- [enable_static=]AC_ENABLE_STATIC_DEFAULT)
-])# AC_ENABLE_STATIC
-
-
-# AC_DISABLE_STATIC
-# -----------------
-# set the default static flag to --disable-static
-AC_DEFUN([AC_DISABLE_STATIC],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_STATIC(no)
-])# AC_DISABLE_STATIC
-
-
-# AC_ENABLE_FAST_INSTALL([DEFAULT])
-# ---------------------------------
-# implement the --enable-fast-install flag
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
-AC_DEFUN([AC_ENABLE_FAST_INSTALL],
-[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE([fast-install],
- [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
- [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
- [p=${PACKAGE-default}
- case $enableval in
- yes) enable_fast_install=yes ;;
- no) enable_fast_install=no ;;
- *)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac],
- [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
-])# AC_ENABLE_FAST_INSTALL
-
-
-# AC_DISABLE_FAST_INSTALL
-# -----------------------
-# set the default to --disable-fast-install
-AC_DEFUN([AC_DISABLE_FAST_INSTALL],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_FAST_INSTALL(no)
-])# AC_DISABLE_FAST_INSTALL
-
-# AC_LIBTOOL_PICMODE([MODE])
+_LT_DECL([], [variables_saved_for_relink], [1],
+ [Variables whose values should be saved in libtool wrapper scripts and
+ restored at link time])
+_LT_DECL([], [need_lib_prefix], [0],
+ [Do we need the "lib" prefix for modules?])
+_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
+_LT_DECL([], [version_type], [0], [Library versioning type])
+_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
+_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
+_LT_DECL([], [shlibpath_overrides_runpath], [0],
+ [Is shlibpath searched before the hard-coded library search path?])
+_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
+_LT_DECL([], [library_names_spec], [1],
+ [[List of archive names. First name is the real one, the rest are links.
+ The last name is the one that the linker finds with -lNAME]])
+_LT_DECL([], [soname_spec], [1],
+ [[The coded name of the library, if different from the real name]])
+_LT_DECL([], [install_override_mode], [1],
+ [Permission mode override for installation of shared libraries])
+_LT_DECL([], [postinstall_cmds], [2],
+ [Command to use after installation of a shared archive])
+_LT_DECL([], [postuninstall_cmds], [2],
+ [Command to use after uninstallation of a shared archive])
+_LT_DECL([], [finish_cmds], [2],
+ [Commands used to finish a libtool library installation in a directory])
+_LT_DECL([], [finish_eval], [1],
+ [[As "finish_cmds", except a single script fragment to be evaled but
+ not shown]])
+_LT_DECL([], [hardcode_into_libs], [0],
+ [Whether we should hardcode library paths into libraries])
+_LT_DECL([], [sys_lib_search_path_spec], [2],
+ [Compile-time system search path for libraries])
+_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
+ [Run-time system search path for libraries])
+])# _LT_SYS_DYNAMIC_LINKER
+
+
+# _LT_PATH_TOOL_PREFIX(TOOL)
# --------------------------
-# implement the --with-pic flag
-# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
-AC_DEFUN([AC_LIBTOOL_PICMODE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-pic_mode=ifelse($#,1,$1,default)
-])# AC_LIBTOOL_PICMODE
-
-
-# AC_PROG_EGREP
-# -------------
-# This is predefined starting with Autoconf 2.54, so this conditional
-# definition can be removed once we require Autoconf 2.54 or later.
-m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
-[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
- [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
- then ac_cv_prog_egrep='grep -E'
- else ac_cv_prog_egrep='egrep'
- fi])
- EGREP=$ac_cv_prog_egrep
- AC_SUBST([EGREP])
-])])
-
-
-# AC_PATH_TOOL_PREFIX
-# -------------------
# find a file program which can recognize shared library
-AC_DEFUN([AC_PATH_TOOL_PREFIX],
-[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_DEFUN([_LT_PATH_TOOL_PREFIX],
+[m4_require([_LT_DECL_EGREP])dnl
AC_MSG_CHECKING([for $1])
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
[case $MAGIC_CMD in
@@ -2106,7 +2893,7 @@ AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
dnl $ac_dummy forces splitting on constant user-supplied paths.
dnl POSIX.2 word splitting is done only on the output of word expansions,
dnl not every word. This closes a longstanding sh security hole.
- ac_dummy="ifelse([$2], , $PATH, [$2])"
+ ac_dummy="m4_if([$2], , $PATH, [$2])"
for ac_dir in $ac_dummy; do
IFS="$lt_save_ifs"
test -z "$ac_dir" && ac_dir=.
@@ -2121,7 +2908,7 @@ dnl not every word. This closes a longstanding sh security hole.
$EGREP "$file_magic_regex" > /dev/null; then
:
else
- cat <<EOF 1>&2
+ cat <<_LT_EOF 1>&2
*** Warning: the command libtool uses to detect shared libraries,
*** $file_magic_cmd, produces output that libtool cannot recognize.
@@ -2132,7 +2919,7 @@ dnl not every word. This closes a longstanding sh security hole.
*** may want to report the problem to your system manager and/or to
*** bug-libtool@gnu.org
-EOF
+_LT_EOF
fi ;;
esac
fi
@@ -2149,37 +2936,48 @@ if test -n "$MAGIC_CMD"; then
else
AC_MSG_RESULT(no)
fi
-])# AC_PATH_TOOL_PREFIX
+_LT_DECL([], [MAGIC_CMD], [0],
+ [Used to examine libraries when file_magic_cmd begins with "file"])dnl
+])# _LT_PATH_TOOL_PREFIX
+# Old name:
+AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
-# AC_PATH_MAGIC
-# -------------
+
+# _LT_PATH_MAGIC
+# --------------
# find a file program which can recognize a shared library
-AC_DEFUN([AC_PATH_MAGIC],
-[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+m4_defun([_LT_PATH_MAGIC],
+[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
- AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+ _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
else
MAGIC_CMD=:
fi
fi
-])# AC_PATH_MAGIC
+])# _LT_PATH_MAGIC
-# AC_PROG_LD
+# LT_PATH_LD
# ----------
# find the pathname to the GNU or non-GNU linker
-AC_DEFUN([AC_PROG_LD],
-[AC_ARG_WITH([gnu-ld],
- [AC_HELP_STRING([--with-gnu-ld],
- [assume the C compiler uses GNU ld @<:@default=no@:>@])],
- [test "$withval" = no || with_gnu_ld=yes],
- [with_gnu_ld=no])
-AC_REQUIRE([LT_AC_PROG_SED])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
+AC_DEFUN([LT_PATH_LD],
+[AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
+
+AC_ARG_WITH([gnu-ld],
+ [AS_HELP_STRING([--with-gnu-ld],
+ [assume the C compiler uses GNU ld @<:@default=no@:>@])],
+ [test "$withval" = no || with_gnu_ld=yes],
+ [with_gnu_ld=no])dnl
+
ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
@@ -2196,9 +2994,9 @@ if test "$GCC" = yes; then
[[\\/]]* | ?:[[\\/]]*)
re_direlt='/[[^/]][[^/]]*/\.\./'
# Canonicalize the pathname of ld
- ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
done
test -z "$LD" && LD="$ac_prog"
;;
@@ -2248,15 +3046,24 @@ else
AC_MSG_RESULT(no)
fi
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_PROG_LD_GNU
-])# AC_PROG_LD
+_LT_PATH_LD_GNU
+AC_SUBST([LD])
+_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
+])# LT_PATH_LD
-# AC_PROG_LD_GNU
-# --------------
-AC_DEFUN([AC_PROG_LD_GNU],
-[AC_REQUIRE([AC_PROG_EGREP])dnl
-AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+# Old names:
+AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
+AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_LD], [])
+dnl AC_DEFUN([AC_PROG_LD], [])
+
+
+# _LT_PATH_LD_GNU
+#- --------------
+m4_defun([_LT_PATH_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
case `$LD -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
@@ -2267,14 +3074,14 @@ case `$LD -v 2>&1 </dev/null` in
;;
esac])
with_gnu_ld=$lt_cv_prog_gnu_ld
-])# AC_PROG_LD_GNU
+])# _LT_PATH_LD_GNU
-# AC_PROG_LD_RELOAD_FLAG
-# ----------------------
+# _LT_CMD_RELOAD
+# --------------
# find reload flag for linker
# -- PORTME Some linkers may need a different reload flag.
-AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
+m4_defun([_LT_CMD_RELOAD],
[AC_CACHE_CHECK([for $LD option to reload object files],
lt_cv_ld_reload_flag,
[lt_cv_ld_reload_flag='-r'])
@@ -2285,6 +3092,11 @@ case $reload_flag in
esac
reload_cmds='$LD$reload_flag -o $output$reload_objs'
case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ if test "$GCC" != yes; then
+ reload_cmds=false
+ fi
+ ;;
darwin*)
if test "$GCC" = yes; then
reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
@@ -2293,15 +3105,19 @@ case $host_os in
fi
;;
esac
-])# AC_PROG_LD_RELOAD_FLAG
+_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_TAGDECL([], [reload_cmds], [2])dnl
+])# _LT_CMD_RELOAD
-# AC_DEPLIBS_CHECK_METHOD
-# -----------------------
+# _LT_CHECK_MAGIC_METHOD
+# ----------------------
# how to check for library dependencies
# -- PORTME fill in with the dynamic library characteristics
-AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
-[AC_CACHE_CHECK([how to recognize dependent libraries],
+m4_defun([_LT_CHECK_MAGIC_METHOD],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+AC_CACHE_CHECK([how to recognize dependent libraries],
lt_cv_deplibs_check_method,
[lt_cv_file_magic_cmd='$MAGIC_CMD'
lt_cv_file_magic_test_file=
@@ -2318,7 +3134,7 @@ lt_cv_deplibs_check_method='unknown'
# whether `pass_all' will *always* work, you probably want this one.
case $host_os in
-aix4* | aix5*)
+aix[[4-9]]*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -2342,21 +3158,29 @@ mingw* | pw32*)
# Base MSYS/MinGW do not provide the 'file' command needed by
# func_win32_libid shell function, so use a weaker test based on 'objdump',
# unless we find 'file', for example because we are cross-compiling.
- if ( file / ) >/dev/null 2>&1; then
+ # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
+ if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='func_win32_libid'
else
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ # Keep this pattern in sync with the one in func_win32_libid.
+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
lt_cv_file_magic_cmd='$OBJDUMP -f'
fi
;;
+cegcc*)
+ # use the weaker test based on 'objdump'. See mingw*.
+ lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
darwin* | rhapsody*)
lt_cv_deplibs_check_method=pass_all
;;
freebsd* | dragonfly*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
case $host_cpu in
i*86 )
# Not sure whether the presence of OpenBSD here was a mistake.
@@ -2375,6 +3199,10 @@ gnu*)
lt_cv_deplibs_check_method=pass_all
;;
+haiku*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
hpux10.20* | hpux11*)
lt_cv_file_magic_cmd=/usr/bin/file
case $host_cpu in
@@ -2383,11 +3211,11 @@ hpux10.20* | hpux11*)
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
;;
hppa*64*)
- [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
+ [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
;;
*)
- lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
lt_cv_file_magic_test_file=/usr/lib/libc.sl
;;
esac
@@ -2409,12 +3237,12 @@ irix5* | irix6* | nonstopux*)
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
lt_cv_deplibs_check_method=pass_all
;;
netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
else
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
@@ -2427,12 +3255,12 @@ newos6*)
lt_cv_file_magic_test_file=/usr/lib/libnls.so
;;
-nto-qnx*)
- lt_cv_deplibs_check_method=unknown
+*nto* | *qnx*)
+ lt_cv_deplibs_check_method=pass_all
;;
openbsd*)
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
else
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
@@ -2451,6 +3279,10 @@ solaris*)
lt_cv_deplibs_check_method=pass_all
;;
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
sysv4 | sysv4.3*)
case $host_vendor in
motorola)
@@ -2478,22 +3310,47 @@ sysv4 | sysv4.3*)
esac
;;
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+tpf*)
lt_cv_deplibs_check_method=pass_all
;;
esac
])
+
+file_magic_glob=
+want_nocaseglob=no
+if test "$build" = "$host"; then
+ case $host_os in
+ mingw* | pw32*)
+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
+ want_nocaseglob=yes
+ else
+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
+ fi
+ ;;
+ esac
+fi
+
file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
test -z "$deplibs_check_method" && deplibs_check_method=unknown
-])# AC_DEPLIBS_CHECK_METHOD
+
+_LT_DECL([], [deplibs_check_method], [1],
+ [Method to check whether dependent libraries are shared objects])
+_LT_DECL([], [file_magic_cmd], [1],
+ [Command to use when deplibs_check_method = "file_magic"])
+_LT_DECL([], [file_magic_glob], [1],
+ [How to find potential files when deplibs_check_method = "file_magic"])
+_LT_DECL([], [want_nocaseglob], [1],
+ [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
+])# _LT_CHECK_MAGIC_METHOD
-# AC_PROG_NM
+# LT_PATH_NM
# ----------
-# find the pathname to a BSD-compatible name lister
-AC_DEFUN([AC_PROG_NM],
-[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
+# find the pathname to a BSD- or MS-compatible name lister
+AC_DEFUN([LT_PATH_NM],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
[if test -n "$NM"; then
# Let the user override the test.
lt_cv_path_NM="$NM"
@@ -2535,2196 +3392,184 @@ else
done
IFS="$lt_save_ifs"
done
- test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+ : ${lt_cv_path_NM=no}
fi])
-NM="$lt_cv_path_NM"
-])# AC_PROG_NM
-
-
-# AC_CHECK_LIBM
-# -------------
-# check for math library
-AC_DEFUN([AC_CHECK_LIBM],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
- # These system don't have libm, or don't need it
- ;;
-*-ncr-sysv4.3*)
- AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
- AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
- ;;
-*)
- AC_CHECK_LIB(m, cos, LIBM="-lm")
- ;;
-esac
-])# AC_CHECK_LIBM
-
-
-# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
-# -----------------------------------
-# sets LIBLTDL to the link flags for the libltdl convenience library and
-# LTDLINCL to the include flags for the libltdl header and adds
-# --enable-ltdl-convenience to the configure arguments. Note that
-# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
-# it is assumed to be `libltdl'. LIBLTDL will be prefixed with
-# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
-# (note the single quotes!). If your package is not flat and you're not
-# using automake, define top_builddir and top_srcdir appropriately in
-# the Makefiles.
-AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- case $enable_ltdl_convenience in
- no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
- "") enable_ltdl_convenience=yes
- ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
- esac
- LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
- LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
- # For backwards non-gettext consistent compatibility...
- INCLTDL="$LTDLINCL"
-])# AC_LIBLTDL_CONVENIENCE
-
-
-# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
-# -----------------------------------
-# sets LIBLTDL to the link flags for the libltdl installable library and
-# LTDLINCL to the include flags for the libltdl header and adds
-# --enable-ltdl-install to the configure arguments. Note that
-# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
-# and an installed libltdl is not found, it is assumed to be `libltdl'.
-# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
-# '${top_srcdir}/' (note the single quotes!). If your package is not
-# flat and you're not using automake, define top_builddir and top_srcdir
-# appropriately in the Makefiles.
-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
-AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- AC_CHECK_LIB(ltdl, lt_dlinit,
- [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
- [if test x"$enable_ltdl_install" = xno; then
- AC_MSG_WARN([libltdl not installed, but installation disabled])
- else
- enable_ltdl_install=yes
- fi
- ])
- if test x"$enable_ltdl_install" = x"yes"; then
- ac_configure_args="$ac_configure_args --enable-ltdl-install"
- LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
- LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
- else
- ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
- LIBLTDL="-lltdl"
- LTDLINCL=
- fi
- # For backwards non-gettext consistent compatibility...
- INCLTDL="$LTDLINCL"
-])# AC_LIBLTDL_INSTALLABLE
-
-
-# AC_LIBTOOL_CXX
-# --------------
-# enable support for C++ libraries
-AC_DEFUN([AC_LIBTOOL_CXX],
-[AC_REQUIRE([_LT_AC_LANG_CXX])
-])# AC_LIBTOOL_CXX
-
-
-# _LT_AC_LANG_CXX
-# ---------------
-AC_DEFUN([_LT_AC_LANG_CXX],
-[AC_REQUIRE([AC_PROG_CXX])
-AC_REQUIRE([_LT_AC_PROG_CXXCPP])
-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
-])# _LT_AC_LANG_CXX
-
-# _LT_AC_PROG_CXXCPP
-# ------------------
-AC_DEFUN([_LT_AC_PROG_CXXCPP],
-[
-AC_REQUIRE([AC_PROG_CXX])
-if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
- ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
- (test "X$CXX" != "Xg++"))) ; then
- AC_PROG_CXXCPP
-fi
-])# _LT_AC_PROG_CXXCPP
-
-# AC_LIBTOOL_F77
-# --------------
-# enable support for Fortran 77 libraries
-AC_DEFUN([AC_LIBTOOL_F77],
-[AC_REQUIRE([_LT_AC_LANG_F77])
-])# AC_LIBTOOL_F77
-
-
-# _LT_AC_LANG_F77
-# ---------------
-AC_DEFUN([_LT_AC_LANG_F77],
-[AC_REQUIRE([AC_PROG_F77])
-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
-])# _LT_AC_LANG_F77
-
-
-# AC_LIBTOOL_GCJ
-# --------------
-# enable support for GCJ libraries
-AC_DEFUN([AC_LIBTOOL_GCJ],
-[AC_REQUIRE([_LT_AC_LANG_GCJ])
-])# AC_LIBTOOL_GCJ
-
-
-# _LT_AC_LANG_GCJ
-# ---------------
-AC_DEFUN([_LT_AC_LANG_GCJ],
-[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
- [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
- [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
- [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
- [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
-])# _LT_AC_LANG_GCJ
-
-
-# AC_LIBTOOL_RC
-# -------------
-# enable support for Windows resource files
-AC_DEFUN([AC_LIBTOOL_RC],
-[AC_REQUIRE([LT_AC_PROG_RC])
-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
-])# AC_LIBTOOL_RC
-
-
-# AC_LIBTOOL_LANG_C_CONFIG
-# ------------------------
-# Ensure that the configuration vars for the C compiler are
-# suitably defined. Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
-AC_DEFUN([_LT_AC_LANG_C_CONFIG],
-[lt_save_CC="$CC"
-AC_LANG_PUSH(C)
-
-# Source file extension for C test sources.
-ac_ext=c
-
-# Object file extension for compiled C test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}'
-
-_LT_AC_SYS_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
-AC_LIBTOOL_PROG_COMPILER_PIC($1)
-AC_LIBTOOL_PROG_CC_C_O($1)
-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
-AC_LIBTOOL_PROG_LD_SHLIBS($1)
-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-AC_LIBTOOL_SYS_LIB_STRIP
-AC_LIBTOOL_DLOPEN_SELF
-
-# Report which library types will actually be built
-AC_MSG_CHECKING([if libtool supports shared libraries])
-AC_MSG_RESULT([$can_build_shared])
-
-AC_MSG_CHECKING([whether to build shared libraries])
-test "$can_build_shared" = "no" && enable_shared=no
-
-# On AIX, shared libraries and static libraries use the same namespace, and
-# are all built from PIC.
-case $host_os in
-aix3*)
- test "$enable_shared" = yes && enable_static=no
- if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds~\$RANLIB \$lib"
- postinstall_cmds='$RANLIB $lib'
- fi
- ;;
-
-aix4* | aix5*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
- fi
- ;;
-esac
-AC_MSG_RESULT([$enable_shared])
-
-AC_MSG_CHECKING([whether to build static libraries])
-# Make sure either enable_shared or enable_static is yes.
-test "$enable_shared" = yes || enable_static=yes
-AC_MSG_RESULT([$enable_static])
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_POP
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_C_CONFIG
-
-
-# AC_LIBTOOL_LANG_CXX_CONFIG
-# --------------------------
-# Ensure that the configuration vars for the C compiler are
-# suitably defined. Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
-AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
-[AC_LANG_PUSH(C++)
-AC_REQUIRE([AC_PROG_CXX])
-AC_REQUIRE([_LT_AC_PROG_CXXCPP])
-
-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_AC_TAGVAR(allow_undefined_flag, $1)=
-_LT_AC_TAGVAR(always_export_symbols, $1)=no
-_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
-_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_AC_TAGVAR(hardcode_direct, $1)=no
-_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
-_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-_LT_AC_TAGVAR(hardcode_automatic, $1)=no
-_LT_AC_TAGVAR(module_cmds, $1)=
-_LT_AC_TAGVAR(module_expsym_cmds, $1)=
-_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_AC_TAGVAR(no_undefined_flag, $1)=
-_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Dependencies to place before and after the object being linked:
-_LT_AC_TAGVAR(predep_objects, $1)=
-_LT_AC_TAGVAR(postdep_objects, $1)=
-_LT_AC_TAGVAR(predeps, $1)=
-_LT_AC_TAGVAR(postdeps, $1)=
-_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
-
-# Source file extension for C++ test sources.
-ac_ext=cpp
-
-# Object file extension for compiled C++ test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC=$CC
-lt_save_LD=$LD
-lt_save_GCC=$GCC
-GCC=$GXX
-lt_save_with_gnu_ld=$with_gnu_ld
-lt_save_path_LD=$lt_cv_path_LD
-if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
- lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+if test "$lt_cv_path_NM" != "no"; then
+ NM="$lt_cv_path_NM"
else
- $as_unset lt_cv_prog_gnu_ld
-fi
-if test -n "${lt_cv_path_LDCXX+set}"; then
- lt_cv_path_LD=$lt_cv_path_LDCXX
-else
- $as_unset lt_cv_path_LD
-fi
-test -z "${LDCXX+set}" || LD=$LDCXX
-CC=${CXX-"c++"}
-compiler=$CC
-_LT_AC_TAGVAR(compiler, $1)=$CC
-_LT_CC_BASENAME([$compiler])
-
-# We don't want -fno-exception wen compiling C++ code, so set the
-# no_builtin_flag separately
-if test "$GXX" = yes; then
- _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
-else
- _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
-fi
-
-if test "$GXX" = yes; then
- # Set up default GNU C++ configuration
-
- AC_PROG_LD
-
- # Check if GNU C++ uses GNU ld as the underlying linker, since the
- # archiving commands below assume that GNU ld is being used.
- if test "$with_gnu_ld" = yes; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
- # If archive_cmds runs LD, not CC, wlarc should be empty
- # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
- # investigate it a little bit more. (MM)
- wlarc='${wl}'
-
- # ancient GNU ld didn't support --whole-archive et. al.
- if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
- grep 'no-whole-archive' > /dev/null; then
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
- fi
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ if test -n "$DUMPBIN"; then :
+ # Let the user override the test.
else
- with_gnu_ld=no
- wlarc=
-
- # A generic and very simple default shared library creation
- # command for GNU C++ for the case where it uses the native
- # linker, instead of GNU ld. If possible, this setting should
- # overridden to take advantage of the native linker features on
- # the platform it is being used on.
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- fi
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
-
-else
- GXX=no
- with_gnu_ld=no
- wlarc=
-fi
-
-# PORTME: fill in a description of your system's C++ link characteristics
-AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-_LT_AC_TAGVAR(ld_shlibs, $1)=yes
-case $host_os in
- aix3*)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- aix4* | aix5*)
- if test "$host_cpu" = ia64; then
- # On IA64, the linker does run time linking by default, so we don't
- # have to do anything special.
- aix_use_runtimelinking=no
- exp_sym_flag='-Bexport'
- no_entry_flag=""
- else
- aix_use_runtimelinking=no
-
- # Test if we are trying to use run time linking or normal
- # AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # need to do runtime linking.
- case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
- for ld_flag in $LDFLAGS; do
- case $ld_flag in
- *-brtl*)
- aix_use_runtimelinking=yes
- break
- ;;
- esac
- done
- ;;
- esac
-
- exp_sym_flag='-bexport'
- no_entry_flag='-bnoentry'
- fi
-
- # When large executables or shared objects are built, AIX ld can
- # have problems creating the table of contents. If linking a library
- # or program results in "error TOC overflow" add -mminimal-toc to
- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
- _LT_AC_TAGVAR(archive_cmds, $1)=''
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-
- if test "$GXX" = yes; then
- case $host_os in aix4.[[012]]|aix4.[[012]].*)
- # We only want to do this on AIX 4.2 and lower, the check
- # below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" && \
- strings "$collect2name" | grep resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- :
- else
- # We have old collect2
- _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
- # It fails to find uninstalled libraries when the uninstalled
- # path is not listed in the libpath. Setting hardcode_minus_L
- # to unsupported forces relinking
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
- fi
- ;;
- esac
- shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
- fi
- else
- # not using gcc
- if test "$host_cpu" = ia64; then
- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
- # chokes on -Wl,-G. The following line is correct:
- shared_flag='-G'
- else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
- else
- shared_flag='${wl}-bM:SRE'
- fi
- fi
- fi
-
- # It seems that -bexpall does not export symbols beginning with
- # underscore (_), so it is better to generate a list of symbols to export.
- _LT_AC_TAGVAR(always_export_symbols, $1)=yes
- if test "$aix_use_runtimelinking" = yes; then
- # Warning - without using the other runtime loading flags (-brtl),
- # -berok will link without error, but may produce a broken library.
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
- # Determine the default libpath from the value encoded in an empty executable.
- _LT_AC_SYS_LIBPATH_AIX
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
- else
- if test "$host_cpu" = ia64; then
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
- _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
- else
- # Determine the default libpath from the value encoded in an empty executable.
- _LT_AC_SYS_LIBPATH_AIX
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
- # Warning - without using the other run time loading flags,
- # -berok will link without error, but may produce a broken library.
- _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
- # Exported symbols can be pulled into shared objects from archives
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
- # This is similar to how AIX traditionally builds its shared libraries.
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
- fi
- fi
- ;;
-
- beos*)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
- # support --undefined. This deserves some investigation. FIXME
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- else
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- chorus*)
- case $cc_basename in
- *)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
- cygwin* | mingw* | pw32*)
- # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
- # as there is no search path for DLLs.
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_AC_TAGVAR(always_export_symbols, $1)=no
- _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-
- if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- else
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- darwin* | rhapsody*)
- case $host_os in
- rhapsody* | darwin1.[[012]])
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
- ;;
- *) # Darwin 1.3 on
- if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
- else
- case ${MACOSX_DEPLOYMENT_TARGET} in
- 10.[[012]])
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
- ;;
- 10.*)
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
- ;;
- esac
- fi
- ;;
- esac
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_AC_TAGVAR(hardcode_direct, $1)=no
- _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-
- if test "$GXX" = yes ; then
- lt_int_apple_cc_single_mod=no
- output_verbose_link_cmd='echo'
- if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
- lt_int_apple_cc_single_mod=yes
- fi
- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- else
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- fi
- _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- else
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- fi
- _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- else
- case $cc_basename in
- xlc*)
- output_verbose_link_cmd='echo'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
- _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- ;;
- *)
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- fi
- ;;
-
- dgux*)
- case $cc_basename in
- ec++*)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- ghcx*)
- # Green Hills C++ Compiler
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
- freebsd[[12]]*)
- # C++ shared libraries reported to be fairly broken before switch to ELF
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- freebsd-elf*)
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
- ;;
- freebsd* | dragonfly*)
- # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
- # conventions
- _LT_AC_TAGVAR(ld_shlibs, $1)=yes
- ;;
- gnu*)
- ;;
- hpux9*)
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
- # but as the default
- # location of the library.
-
- case $cc_basename in
- CC*)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- aCC*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
- ;;
- *)
- if test "$GXX" = yes; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- else
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
- hpux10*|hpux11*)
- if test $with_gnu_ld = no; then
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
- case $host_cpu in
- hppa*64*|ia64*) ;;
- *)
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- ;;
- esac
- fi
- case $host_cpu in
- hppa*64*|ia64*)
- _LT_AC_TAGVAR(hardcode_direct, $1)=no
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
+ case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
+ *COFF*)
+ DUMPBIN="$DUMPBIN -symbols"
;;
*)
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
- # but as the default
- # location of the library.
+ DUMPBIN=:
;;
esac
+ fi
+ AC_SUBST([DUMPBIN])
+ if test "$DUMPBIN" != ":"; then
+ NM="$DUMPBIN"
+ fi
+fi
+test -z "$NM" && NM=nm
+AC_SUBST([NM])
+_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
+
+AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
+ [lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
+ cat conftest.out >&AS_MESSAGE_LOG_FD
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*])
+])# LT_PATH_NM
+
+# Old names:
+AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
+AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_NM], [])
+dnl AC_DEFUN([AC_PROG_NM], [])
+
+# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
+# --------------------------------
+# how to determine the name of the shared library
+# associated with a specific link library.
+# -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+m4_require([_LT_DECL_DLLTOOL])
+AC_CACHE_CHECK([how to associate runtime and link libraries],
+lt_cv_sharedlib_from_linklib_cmd,
+[lt_cv_sharedlib_from_linklib_cmd='unknown'
- case $cc_basename in
- CC*)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- aCC*)
- case $host_cpu in
- hppa*64*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- ia64*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- *)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- esac
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
- ;;
- *)
- if test "$GXX" = yes; then
- if test $with_gnu_ld = no; then
- case $host_cpu in
- hppa*64*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- ia64*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- *)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- esac
- fi
- else
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
- interix[[3-9]]*)
- _LT_AC_TAGVAR(hardcode_direct, $1)=no
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
- # Instead, shared libraries are loaded at an image base (0x10000000 by
- # default) and relocated if they conflict, which is a slow very memory
- # consuming and fragmenting process. To avoid this, we pick a random,
- # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
- # time. Moving up from 0x10000000 also allows more sbrk(2) space.
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- ;;
- irix5* | irix6*)
- case $cc_basename in
- CC*)
- # SGI C++
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-
- # Archives containing C++ object files must be created using
- # "CC -ar", where "CC" is the IRIX C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
- ;;
- *)
- if test "$GXX" = yes; then
- if test "$with_gnu_ld" = no; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
- fi
- fi
- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
- ;;
- esac
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
- ;;
- linux* | k*bsd*-gnu)
- case $cc_basename in
- KCC*)
- # Kuck and Associates, Inc. (KAI) C++ Compiler
-
- # KCC will only create a shared library if the output file
- # ends with ".so" (or ".sl" for HP-UX), so rename the library
- # to its proper name (with version) after linking.
- _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
- # Archives containing C++ object files must be created using
- # "CC -Bstatic", where "CC" is the KAI C++ compiler.
- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
- ;;
- icpc*)
- # Intel C++
- with_gnu_ld=yes
- # version 8.0 and above of icpc choke on multiply defined symbols
- # if we add $predep_objects and $postdep_objects, however 7.1 and
- # earlier do not add the objects themselves.
- case `$CC -V 2>&1` in
- *"Version 7."*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- ;;
- *) # Version 8.0 or newer
- tmp_idyn=
- case $host_cpu in
- ia64*) tmp_idyn=' -i_dynamic';;
- esac
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- ;;
- esac
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
- ;;
- pgCC*)
- # Portland Group C++ compiler
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
-
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
- ;;
- cxx*)
- # Compaq C++
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
-
- runpath_var=LD_RUN_PATH
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
- ;;
- *)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C++ 5.9
- _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-
- # Not sure whether something based on
- # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
- # would be better.
- output_verbose_link_cmd='echo'
-
- # Archives containing C++ object files must be created using
- # "CC -xar", where "CC" is the Sun C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
- ;;
- esac
- ;;
- esac
- ;;
- lynxos*)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- m88k*)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- mvs*)
- case $cc_basename in
- cxx*)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
- netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
- wlarc=
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- fi
- # Workaround some broken pre-1.5 toolchains
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
- ;;
- openbsd2*)
- # C++ shared libraries are fairly broken
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- openbsd*)
- if test -f /usr/libexec/ld.so; then
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- fi
- output_verbose_link_cmd='echo'
- else
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- osf3*)
- case $cc_basename in
- KCC*)
- # Kuck and Associates, Inc. (KAI) C++ Compiler
-
- # KCC will only create a shared library if the output file
- # ends with ".so" (or ".sl" for HP-UX), so rename the library
- # to its proper name (with version) after linking.
- _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Archives containing C++ object files must be created using
- # "CC -Bstatic", where "CC" is the KAI C++ compiler.
- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
-
- ;;
- RCC*)
- # Rational C++ 2.4.1
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- cxx*)
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
- ;;
- *)
- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
-
- else
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
- osf4* | osf5*)
- case $cc_basename in
- KCC*)
- # Kuck and Associates, Inc. (KAI) C++ Compiler
-
- # KCC will only create a shared library if the output file
- # ends with ".so" (or ".sl" for HP-UX), so rename the library
- # to its proper name (with version) after linking.
- _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Archives containing C++ object files must be created using
- # the KAI C++ compiler.
- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
- ;;
- RCC*)
- # Rational C++ 2.4.1
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- cxx*)
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
- echo "-hidden">> $lib.exp~
- $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
- $rm $lib.exp'
-
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
- ;;
- *)
- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
-
- else
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
- psos*)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- sunos4*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.x
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- lcc*)
- # Lucid
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
- solaris*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.2, 5.x and Centerline C++
- _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
- _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
- $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
-
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- case $host_os in
- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
- *)
- # The compiler driver will combine and reorder linker options,
- # but understands `-z linker_flag'.
- # Supported since Solaris 2.6 (maybe 2.5.1?)
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
- ;;
- esac
- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-
- output_verbose_link_cmd='echo'
-
- # Archives containing C++ object files must be created using
- # "CC -xar", where "CC" is the Sun C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
- ;;
- gcx*)
- # Green Hills C++ Compiler
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-
- # The C++ compiler must be used to create the archive.
- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
- ;;
- *)
- # GNU C++ compiler with Solaris linker
- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
- _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
- if $CC --version | grep -v '^2\.7' > /dev/null; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
- $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
- else
- # g++ 2.7 appears to require `-G' NOT `-shared' on this
- # platform.
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
- $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
- fi
-
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
- case $host_os in
- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
- *)
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
- ;;
- esac
- fi
- ;;
- esac
- ;;
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
- _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- runpath_var='LD_RUN_PATH'
-
- case $cc_basename in
- CC*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- ;;
- sysv5* | sco3.2v5* | sco5v6*)
- # Note: We can NOT use -z defs as we might desire, because we do not
- # link with -lc, and that would cause any symbols used from libc to
- # always be unresolved, which means just about no library would
- # ever link correctly. If we're not using GNU ld we use -z text
- # though, which does catch some bad symbols but isn't as heavy-handed
- # as -z defs.
- # For security reasons, it is highly recommended that you always
- # use absolute paths for naming shared libraries, and exclude the
- # DT_RUNPATH tag from executables and libraries. But doing so
- # requires that you compile everything twice, which is a pain.
- # So that behaviour is only enabled if SCOABSPATH is set to a
- # non-empty value in the environment. Most likely only useful for
- # creating official distributions of packages.
- # This is a hack until libtool officially supports absolute path
- # names for shared libraries.
- _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
- runpath_var='LD_RUN_PATH'
-
- case $cc_basename in
- CC*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- ;;
- tandem*)
- case $cc_basename in
- NCC*)
- # NonStop-UX NCC 3.20
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
- vxworks*)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+case $host_os in
+cygwin* | mingw* | pw32* | cegcc*)
+ # two different shell functions defined in ltmain.sh
+ # decide which to use based on capabilities of $DLLTOOL
+ case `$DLLTOOL --help 2>&1` in
+ *--identify-strict*)
+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
;;
*)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
-esac
-AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
-_LT_AC_TAGVAR(GCC, $1)="$GXX"
-_LT_AC_TAGVAR(LD, $1)="$LD"
-
-AC_LIBTOOL_POSTDEP_PREDEP($1)
-AC_LIBTOOL_PROG_COMPILER_PIC($1)
-AC_LIBTOOL_PROG_CC_C_O($1)
-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
-AC_LIBTOOL_PROG_LD_SHLIBS($1)
-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_POP
-CC=$lt_save_CC
-LDCXX=$LD
-LD=$lt_save_LD
-GCC=$lt_save_GCC
-with_gnu_ldcxx=$with_gnu_ld
-with_gnu_ld=$lt_save_with_gnu_ld
-lt_cv_path_LDCXX=$lt_cv_path_LD
-lt_cv_path_LD=$lt_save_path_LD
-lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
-lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
-])# AC_LIBTOOL_LANG_CXX_CONFIG
-
-# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
-# ------------------------------------
-# Figure out "hidden" library dependencies from verbose
-# compiler output when linking a shared library.
-# Parse the compiler output and extract the necessary
-# objects, libraries and library flags.
-AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
-dnl we can't use the lt_simple_compile_test_code here,
-dnl because it contains code intended for an executable,
-dnl not a library. It's possible we should let each
-dnl tag define a new lt_????_link_test_code variable,
-dnl but it's only used here...
-ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
-int a;
-void foo (void) { a = 0; }
-EOF
-],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
-class Foo
-{
-public:
- Foo (void) { a = 0; }
-private:
- int a;
-};
-EOF
-],[$1],[F77],[cat > conftest.$ac_ext <<EOF
- subroutine foo
- implicit none
- integer*4 a
- a=0
- return
- end
-EOF
-],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
-public class foo {
- private int a;
- public void bar (void) {
- a = 0;
- }
-};
-EOF
-])
-dnl Parse the compiler output and extract the necessary
-dnl objects, libraries and library flags.
-if AC_TRY_EVAL(ac_compile); then
- # Parse the compiler output and extract the necessary
- # objects, libraries and library flags.
-
- # Sentinel used to keep track of whether or not we are before
- # the conftest object file.
- pre_test_object_deps_done=no
-
- # The `*' in the case matches for architectures that use `case' in
- # $output_verbose_cmd can trigger glob expansion during the loop
- # eval without this substitution.
- output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
-
- for p in `eval $output_verbose_link_cmd`; do
- case $p in
-
- -L* | -R* | -l*)
- # Some compilers place space between "-{L,R}" and the path.
- # Remove the space.
- if test $p = "-L" \
- || test $p = "-R"; then
- prev=$p
- continue
- else
- prev=
- fi
-
- if test "$pre_test_object_deps_done" = no; then
- case $p in
- -L* | -R*)
- # Internal compiler library paths should come after those
- # provided the user. The postdeps already come after the
- # user supplied libs so there is no need to process them.
- if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
- _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
- else
- _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
- fi
- ;;
- # The "-l" case would never come before the object being
- # linked, so don't bother handling this case.
- esac
- else
- if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
- _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
- else
- _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
- fi
- fi
- ;;
-
- *.$objext)
- # This assumes that the test object file only shows up
- # once in the compiler output.
- if test "$p" = "conftest.$objext"; then
- pre_test_object_deps_done=yes
- continue
- fi
-
- if test "$pre_test_object_deps_done" = no; then
- if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
- _LT_AC_TAGVAR(predep_objects, $1)="$p"
- else
- _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
- fi
- else
- if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
- _LT_AC_TAGVAR(postdep_objects, $1)="$p"
- else
- _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
- fi
- fi
- ;;
-
- *) ;; # Ignore the rest.
-
- esac
- done
-
- # Clean up.
- rm -f a.out a.exe
-else
- echo "libtool.m4: error: problem compiling $1 test program"
-fi
-
-$rm -f confest.$objext
-
-# PORTME: override above test on systems where it is broken
-ifelse([$1],[CXX],
-[case $host_os in
-interix[[3-9]]*)
- # Interix 3.5 installs completely hosed .la files for C++, so rather than
- # hack all around it, let's just trust "g++" to DTRT.
- _LT_AC_TAGVAR(predep_objects,$1)=
- _LT_AC_TAGVAR(postdep_objects,$1)=
- _LT_AC_TAGVAR(postdeps,$1)=
- ;;
-
-linux*)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C++ 5.9
- #
- # The more standards-conforming stlport4 library is
- # incompatible with the Cstd library. Avoid specifying
- # it if it's in CXXFLAGS. Ignore libCrun as
- # -library=stlport4 depends on it.
- case " $CXX $CXXFLAGS " in
- *" -library=stlport4 "*)
- solaris_use_stlport4=yes
- ;;
- esac
- if test "$solaris_use_stlport4" != yes; then
- _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
- fi
+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
;;
esac
;;
-
-solaris*)
- case $cc_basename in
- CC*)
- # The more standards-conforming stlport4 library is
- # incompatible with the Cstd library. Avoid specifying
- # it if it's in CXXFLAGS. Ignore libCrun as
- # -library=stlport4 depends on it.
- case " $CXX $CXXFLAGS " in
- *" -library=stlport4 "*)
- solaris_use_stlport4=yes
- ;;
- esac
-
- # Adding this requires a known-good setup of shared libraries for
- # Sun compiler versions before 5.6, else PIC objects from an old
- # archive will be linked into the output, leading to subtle bugs.
- if test "$solaris_use_stlport4" != yes; then
- _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
- fi
- ;;
- esac
+*)
+ # fallback: assume linklib IS sharedlib
+ lt_cv_sharedlib_from_linklib_cmd="$ECHO"
;;
esac
])
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
-case " $_LT_AC_TAGVAR(postdeps, $1) " in
-*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
-esac
-])# AC_LIBTOOL_POSTDEP_PREDEP
-
-# AC_LIBTOOL_LANG_F77_CONFIG
-# --------------------------
-# Ensure that the configuration vars for the C compiler are
-# suitably defined. Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
-AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
-[AC_REQUIRE([AC_PROG_F77])
-AC_LANG_PUSH(Fortran 77)
-
-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_AC_TAGVAR(allow_undefined_flag, $1)=
-_LT_AC_TAGVAR(always_export_symbols, $1)=no
-_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
-_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_AC_TAGVAR(hardcode_direct, $1)=no
-_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
-_LT_AC_TAGVAR(hardcode_automatic, $1)=no
-_LT_AC_TAGVAR(module_cmds, $1)=
-_LT_AC_TAGVAR(module_expsym_cmds, $1)=
-_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_AC_TAGVAR(no_undefined_flag, $1)=
-_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for f77 test sources.
-ac_ext=f
-
-# Object file extension for compiled f77 test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
+_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
+ [Command to associate shared and link libraries])
+])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="\
- subroutine t
- return
- end
-"
-# Code to be used in simple link tests
-lt_simple_link_test_code="\
- program t
- end
-"
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${F77-"f77"}
-compiler=$CC
-_LT_AC_TAGVAR(compiler, $1)=$CC
-_LT_CC_BASENAME([$compiler])
-
-AC_MSG_CHECKING([if libtool supports shared libraries])
-AC_MSG_RESULT([$can_build_shared])
+# _LT_PATH_MANIFEST_TOOL
+# ----------------------
+# locate the manifest tool
+m4_defun([_LT_PATH_MANIFEST_TOOL],
+[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
+ [lt_cv_path_mainfest_tool=no
+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then
+ lt_cv_path_mainfest_tool=yes
+ fi
+ rm -f conftest*])
+if test "x$lt_cv_path_mainfest_tool" != xyes; then
+ MANIFEST_TOOL=:
+fi
+_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
+])# _LT_PATH_MANIFEST_TOOL
-AC_MSG_CHECKING([whether to build shared libraries])
-test "$can_build_shared" = "no" && enable_shared=no
-# On AIX, shared libraries and static libraries use the same namespace, and
-# are all built from PIC.
-case $host_os in
-aix3*)
- test "$enable_shared" = yes && enable_static=no
- if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds~\$RANLIB \$lib"
- postinstall_cmds='$RANLIB $lib'
- fi
+# LT_LIB_M
+# --------
+# check for math library
+AC_DEFUN([LT_LIB_M],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
+ # These system don't have libm, or don't need it
;;
-aix4* | aix5*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
- fi
+*-ncr-sysv4.3*)
+ AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+ AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+ ;;
+*)
+ AC_CHECK_LIB(m, cos, LIBM="-lm")
;;
esac
-AC_MSG_RESULT([$enable_shared])
-
-AC_MSG_CHECKING([whether to build static libraries])
-# Make sure either enable_shared or enable_static is yes.
-test "$enable_shared" = yes || enable_static=yes
-AC_MSG_RESULT([$enable_static])
-
-_LT_AC_TAGVAR(GCC, $1)="$G77"
-_LT_AC_TAGVAR(LD, $1)="$LD"
+AC_SUBST([LIBM])
+])# LT_LIB_M
-AC_LIBTOOL_PROG_COMPILER_PIC($1)
-AC_LIBTOOL_PROG_CC_C_O($1)
-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
-AC_LIBTOOL_PROG_LD_SHLIBS($1)
-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+# Old name:
+AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_CHECK_LIBM], [])
-AC_LIBTOOL_CONFIG($1)
-AC_LANG_POP
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_F77_CONFIG
-
-
-# AC_LIBTOOL_LANG_GCJ_CONFIG
-# --------------------------
-# Ensure that the configuration vars for the C compiler are
-# suitably defined. Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
-AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
-[AC_LANG_SAVE
-
-# Source file extension for Java test sources.
-ac_ext=java
-
-# Object file extension for compiled Java test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${GCJ-"gcj"}
-compiler=$CC
-_LT_AC_TAGVAR(compiler, $1)=$CC
-_LT_CC_BASENAME([$compiler])
-
-# GCJ did not exist at the time GCC didn't implicitly link libc in.
-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-
-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-
-AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
-AC_LIBTOOL_PROG_COMPILER_PIC($1)
-AC_LIBTOOL_PROG_CC_C_O($1)
-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
-AC_LIBTOOL_PROG_LD_SHLIBS($1)
-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_RESTORE
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_GCJ_CONFIG
-
-
-# AC_LIBTOOL_LANG_RC_CONFIG
-# -------------------------
-# Ensure that the configuration vars for the Windows resource compiler are
-# suitably defined. Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
-AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
-[AC_LANG_SAVE
-
-# Source file extension for RC test sources.
-ac_ext=rc
-
-# Object file extension for compiled RC test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
-
-# Code to be used in simple link tests
-lt_simple_link_test_code="$lt_simple_compile_test_code"
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${RC-"windres"}
-compiler=$CC
-_LT_AC_TAGVAR(compiler, $1)=$CC
-_LT_CC_BASENAME([$compiler])
-_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_RESTORE
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_RC_CONFIG
-
-
-# AC_LIBTOOL_CONFIG([TAGNAME])
-# ----------------------------
-# If TAGNAME is not passed, then create an initial libtool script
-# with a default configuration from the untagged config vars. Otherwise
-# add code to config.status for appending the configuration named by
-# TAGNAME from the matching tagged config vars.
-AC_DEFUN([AC_LIBTOOL_CONFIG],
-[# The else clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
- # See if we are running on zsh, and set the options which allow our commands through
- # without removal of \ escapes.
- if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
- fi
- # Now quote all the things that may contain metacharacters while being
- # careful not to overquote the AC_SUBSTed values. We take copies of the
- # variables and quote the copies for generation of the libtool script.
- for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
- SED SHELL STRIP \
- libname_spec library_names_spec soname_spec extract_expsyms_cmds \
- old_striplib striplib file_magic_cmd finish_cmds finish_eval \
- deplibs_check_method reload_flag reload_cmds need_locks \
- lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
- lt_cv_sys_global_symbol_to_c_name_address \
- sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
- old_postinstall_cmds old_postuninstall_cmds \
- _LT_AC_TAGVAR(compiler, $1) \
- _LT_AC_TAGVAR(CC, $1) \
- _LT_AC_TAGVAR(LD, $1) \
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
- _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
- _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
- _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
- _LT_AC_TAGVAR(old_archive_cmds, $1) \
- _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
- _LT_AC_TAGVAR(predep_objects, $1) \
- _LT_AC_TAGVAR(postdep_objects, $1) \
- _LT_AC_TAGVAR(predeps, $1) \
- _LT_AC_TAGVAR(postdeps, $1) \
- _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
- _LT_AC_TAGVAR(archive_cmds, $1) \
- _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
- _LT_AC_TAGVAR(postinstall_cmds, $1) \
- _LT_AC_TAGVAR(postuninstall_cmds, $1) \
- _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
- _LT_AC_TAGVAR(allow_undefined_flag, $1) \
- _LT_AC_TAGVAR(no_undefined_flag, $1) \
- _LT_AC_TAGVAR(export_symbols_cmds, $1) \
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
- _LT_AC_TAGVAR(hardcode_automatic, $1) \
- _LT_AC_TAGVAR(module_cmds, $1) \
- _LT_AC_TAGVAR(module_expsym_cmds, $1) \
- _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
- _LT_AC_TAGVAR(fix_srcfile_path, $1) \
- _LT_AC_TAGVAR(exclude_expsyms, $1) \
- _LT_AC_TAGVAR(include_expsyms, $1); do
-
- case $var in
- _LT_AC_TAGVAR(old_archive_cmds, $1) | \
- _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
- _LT_AC_TAGVAR(archive_cmds, $1) | \
- _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
- _LT_AC_TAGVAR(module_cmds, $1) | \
- _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
- _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
- _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
- extract_expsyms_cmds | reload_cmds | finish_cmds | \
- postinstall_cmds | postuninstall_cmds | \
- old_postinstall_cmds | old_postuninstall_cmds | \
- sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
- # Double-quote double-evaled strings.
- eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
- ;;
- *)
- eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
- ;;
- esac
- done
-
- case $lt_echo in
- *'\[$]0 --fallback-echo"')
- lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
- ;;
- esac
-
-ifelse([$1], [],
- [cfgfile="${ofile}T"
- trap "$rm \"$cfgfile\"; exit 1" 1 2 15
- $rm -f "$cfgfile"
- AC_MSG_NOTICE([creating $ofile])],
- [cfgfile="$ofile"])
-
- cat <<__EOF__ >> "$cfgfile"
-ifelse([$1], [],
-[#! $SHELL
-
-# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
-# Free Software Foundation, Inc.
-#
-# This file is part of GNU Libtool:
-# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-#
-# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# A sed program that does not truncate output.
-SED=$lt_SED
-
-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="$SED -e 1s/^X//"
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-# The names of the tagged configurations supported by this script.
-available_tags=
-
-# ### BEGIN LIBTOOL CONFIG],
-[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
-
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
-
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
-
-# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
-
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
-
-# The host system.
-host_alias=$host_alias
-host=$host
-host_os=$host_os
-
-# The build system.
-build_alias=$build_alias
-build=$build
-build_os=$build_os
-
-# An echo program that does not interpret backslashes.
-echo=$lt_echo
-
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
-
-# A C compiler.
-LTCC=$lt_LTCC
-
-# LTCC compiler flags.
-LTCFLAGS=$lt_LTCFLAGS
-
-# A language-specific compiler.
-CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
-
-# Is the compiler the GNU C compiler?
-with_gcc=$_LT_AC_TAGVAR(GCC, $1)
-
-# An ERE matcher.
-EGREP=$lt_EGREP
-
-# The linker used to build libraries.
-LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
-
-# Whether we need hard or soft links.
-LN_S=$lt_LN_S
-
-# A BSD-compatible nm program.
-NM=$lt_NM
-
-# A symbol stripping program
-STRIP=$lt_STRIP
-
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=$MAGIC_CMD
-
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
-
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
-
-# Used on cygwin: assembler.
-AS="$AS"
-
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
-
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
-
-# How to pass a linker flag through the compiler.
-wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
-
-# Object file suffix (normally "o").
-objext="$ac_objext"
-
-# Old archive suffix (normally "a").
-libext="$libext"
-
-# Shared library suffix (normally ".so").
-shrext_cmds='$shrext_cmds'
-
-# Executable file suffix (normally "").
-exeext="$exeext"
-
-# Additional compiler flags for building library objects.
-pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
-pic_mode=$pic_mode
-
-# What is the maximum length of a command?
-max_cmd_len=$lt_cv_sys_max_cmd_len
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
-
-# Must we lock files when doing compilation?
-need_locks=$lt_need_locks
-
-# Do we need the lib prefix for modules?
-need_lib_prefix=$need_lib_prefix
-
-# Do we need a version for libraries?
-need_version=$need_version
-
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
-
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
-
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
-
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
-
-# Library versioning type.
-version_type=$version_type
-
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
-
-# List of archive names. First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=$lt_library_names_spec
-
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
-
-# Commands used to build and install an old-style archive.
-RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
-
-# Commands used to build and install a shared archive.
-archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
-archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
-postinstall_cmds=$lt_postinstall_cmds
-postuninstall_cmds=$lt_postuninstall_cmds
-
-# Commands used to build a loadable module (assumed same as above if empty)
-module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
-module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
-
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
-
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
-
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
-
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd=$lt_file_magic_cmd
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
-
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
-
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$lt_finish_eval
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
-
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
-
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
-
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
-
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
-
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
-
-# If ld is used when linking, flag to hardcode \$libdir into
-# a binary during linking. This must work even if \$libdir does
-# not exist.
-hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
-
-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
-
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
-
-# Set to yes if building a shared library automatically hardcodes DIR into the library
-# and all subsequent libraries and executables linked against it.
-hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
-
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
-
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
-
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
-
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path=$lt_fix_srcfile_path
-
-# Set to yes if exported symbols are required.
-always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
-
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
-
-# Symbols that must always be exported.
-include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
-
-ifelse([$1],[],
-[# ### END LIBTOOL CONFIG],
-[# ### END LIBTOOL TAG CONFIG: $tagname])
-
-__EOF__
-
-ifelse([$1],[], [
- case $host_os in
- aix3*)
- cat <<\EOF >> "$cfgfile"
-
-# AIX sometimes has problems with the GCC collect2 program. For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
-fi
-EOF
- ;;
- esac
-
- # We use sed instead of cat because bash on DJGPP gets confused if
- # if finds mixed CR/LF and LF-only lines. Since sed operates in
- # text mode, it properly converts lines to CR/LF. This bash problem
- # is reportedly fixed, but why not run on old versions too?
- sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
-
- mv -f "$cfgfile" "$ofile" || \
- (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
- chmod +x "$ofile"
-])
-else
- # If there is no Makefile yet, we rely on a make rule to execute
- # `config.status --recheck' to rerun these tests and create the
- # libtool script then.
- ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
- if test -f "$ltmain_in"; then
- test -f Makefile && make "$ltmain"
- fi
-fi
-])# AC_LIBTOOL_CONFIG
-
-
-# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
-# -------------------------------------------
-AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
-[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+# _LT_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------
+m4_defun([_LT_COMPILER_NO_RTTI],
+[m4_require([_LT_TAG_COMPILER])dnl
-_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
if test "$GCC" = yes; then
- _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+ case $cc_basename in
+ nvcc*)
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
+ esac
- AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+ _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
lt_cv_prog_compiler_rtti_exceptions,
[-fno-rtti -fno-exceptions], [],
- [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+ [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
fi
-])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
+_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
+ [Compiler flag to turn off builtin functions])
+])# _LT_COMPILER_NO_RTTI
-# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-# ---------------------------------
-AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
-[AC_REQUIRE([AC_CANONICAL_HOST])
-AC_REQUIRE([LT_AC_PROG_SED])
-AC_REQUIRE([AC_PROG_NM])
-AC_REQUIRE([AC_OBJEXT])
+# _LT_CMD_GLOBAL_SYMBOLS
+# ----------------------
+m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+
# Check for command to grab the raw symbol name followed by C symbol from nm.
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
@@ -4738,33 +3583,18 @@ symcode='[[BCDEGRST]]'
# Regexp to match symbols that can be accessed directly from C.
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
-# Transform an extracted symbol line into a proper C declaration
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
-
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
-
# Define system-specific variables.
case $host_os in
aix*)
symcode='[[BCDT]]'
;;
-cygwin* | mingw* | pw32*)
+cygwin* | mingw* | pw32* | cegcc*)
symcode='[[ABCDGISTW]]'
;;
-hpux*) # Its linker distinguishes data from code symbols
+hpux*)
if test "$host_cpu" = ia64; then
symcode='[[ABCDEGRST]]'
fi
- lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
- lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
- ;;
-linux* | k*bsd*-gnu)
- if test "$host_cpu" = ia64; then
- symcode='[[ABCDGIRSTW]]'
- lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
- lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
- fi
;;
irix* | nonstopux*)
symcode='[[BCDEGRST]]'
@@ -4789,49 +3619,78 @@ sysv4)
;;
esac
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[[ABCDGIRSTW]]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
+
# Handle CRLF in mingw tool chain
opt_cr=
case $build_os in
mingw*)
- opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
;;
esac
-# If we're using GNU nm, then use its standard symbol codes.
-case `$NM -V 2>&1` in
-*GNU* | *'with BFD'*)
- symcode='[[ABCDGIRSTW]]' ;;
-esac
-
-# Try without a prefix undercore, then with it.
+# Try without a prefix underscore, then with it.
for ac_symprfx in "" "_"; do
# Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
symxfrm="\\1 $ac_symprfx\\2 \\2"
# Write the raw and C identifiers.
- lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Fake it for dumpbin and say T for any non-static function
+ # and D for any global variable.
+ # Also find C++ and __fastcall symbols from MSVC++,
+ # which start with @ or ?.
+ lt_cv_sys_global_symbol_pipe="$AWK ['"\
+" {last_section=section; section=\$ 3};"\
+" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+" s[1]~/^[@?]/{print s[1], s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+" ' prfx=^$ac_symprfx]"
+ else
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ fi
+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
# Check to see that the pipe works correctly.
pipe_works=no
rm -f conftest*
- cat > conftest.$ac_ext <<EOF
+ cat > conftest.$ac_ext <<_LT_EOF
#ifdef __cplusplus
extern "C" {
#endif
char nm_test_var;
-void nm_test_func(){}
+void nm_test_func(void);
+void nm_test_func(void){}
#ifdef __cplusplus
}
#endif
int main(){nm_test_var='a';nm_test_func();return(0);}
-EOF
+_LT_EOF
if AC_TRY_EVAL(ac_compile); then
# Now try to grab the symbols.
nlist=conftest.nm
- if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
+ if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
# Try sorting and uniquifying the output.
if sort "$nlist" | uniq > "$nlist"T; then
mv -f "$nlist"T "$nlist"
@@ -4840,53 +3699,67 @@ EOF
fi
# Make sure that we snagged all the symbols we need.
- if grep ' nm_test_var$' "$nlist" >/dev/null; then
- if grep ' nm_test_func$' "$nlist" >/dev/null; then
- cat <<EOF > conftest.$ac_ext
+ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<_LT_EOF > conftest.$ac_ext
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
+ relocations are performed -- see ld's documentation on pseudo-relocs. */
+# define LT@&t@_DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data. */
+# define LT@&t@_DLSYM_CONST
+#else
+# define LT@&t@_DLSYM_CONST const
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
-EOF
+_LT_EOF
# Now generate the symbol file.
- eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
- cat <<EOF >> conftest.$ac_ext
-#if defined (__STDC__) && __STDC__
-# define lt_ptr_t void *
-#else
-# define lt_ptr_t char *
-# define const
-#endif
+ cat <<_LT_EOF >> conftest.$ac_ext
-/* The mapping between symbol names and symbols. */
-const struct {
+/* The mapping between symbol names and symbols. */
+LT@&t@_DLSYM_CONST struct {
const char *name;
- lt_ptr_t address;
+ void *address;
}
-lt_preloaded_symbols[[]] =
+lt__PROGRAM__LTX_preloaded_symbols[[]] =
{
-EOF
- $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
- cat <<\EOF >> conftest.$ac_ext
- {0, (lt_ptr_t) 0}
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ cat <<\_LT_EOF >> conftest.$ac_ext
+ {0, (void *) 0}
};
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
#ifdef __cplusplus
}
#endif
-EOF
+_LT_EOF
# Now try linking the two files.
mv conftest.$ac_objext conftstm.$ac_objext
- lt_save_LIBS="$LIBS"
- lt_save_CFLAGS="$CFLAGS"
+ lt_globsym_save_LIBS=$LIBS
+ lt_globsym_save_CFLAGS=$CFLAGS
LIBS="conftstm.$ac_objext"
- CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+ CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
pipe_works=yes
fi
- LIBS="$lt_save_LIBS"
- CFLAGS="$lt_save_CFLAGS"
+ LIBS=$lt_globsym_save_LIBS
+ CFLAGS=$lt_globsym_save_CFLAGS
else
echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
fi
@@ -4900,7 +3773,7 @@ EOF
echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
cat conftest.$ac_ext >&5
fi
- rm -f conftest* conftst*
+ rm -rf conftest* conftst*
# Do not use the global_symbol_pipe unless it works.
if test "$pipe_works" = yes; then
@@ -4918,55 +3791,91 @@ if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; the
else
AC_MSG_RESULT(ok)
fi
-]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+# Response file support.
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ nm_file_list_spec='@'
+elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
+ nm_file_list_spec='@'
+fi
-# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
-# ---------------------------------------
-AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
-[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
-_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
+_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
+ [Take the output of nm and produce a listing of raw symbols and C names])
+_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
+ [Transform the output of nm in a proper C declaration])
+_LT_DECL([global_symbol_to_c_name_address],
+ [lt_cv_sys_global_symbol_to_c_name_address], [1],
+ [Transform the output of nm in a C name address pair])
+_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
+ [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
+ [Transform the output of nm in a C name address pair when lib prefix is needed])
+_LT_DECL([], [nm_file_list_spec], [1],
+ [Specify filename containing input files for $NM])
+]) # _LT_CMD_GLOBAL_SYMBOLS
+
+
+# _LT_COMPILER_PIC([TAGNAME])
+# ---------------------------
+m4_defun([_LT_COMPILER_PIC],
+[m4_require([_LT_TAG_COMPILER])dnl
+_LT_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_TAGVAR(lt_prog_compiler_static, $1)=
-AC_MSG_CHECKING([for $compiler option to produce PIC])
- ifelse([$1],[CXX],[
+m4_if([$1], [CXX], [
# C++ specific cases for pic, static, wl, etc.
if test "$GXX" = yes; then
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
case $host_os in
aix*)
# All AIX code is PIC.
if test "$host_cpu" = ia64; then
# AIX 5 now supports IA64 processor
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
fi
;;
+
amigaos*)
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
;;
+
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
- mingw* | cygwin* | os2* | pw32*)
+ mingw* | cygwin* | os2* | pw32* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
# Although the cygwin gcc ignores -fPIC, still need this for old-style
# (--disable-auto-import) libraries
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
;;
darwin* | rhapsody*)
# PIC is the default on this platform
# Common symbols not allowed in MH_DYLIB files
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
;;
*djgpp*)
# DJGPP does not support shared libraries at all
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ haiku*)
+ # PIC is the default for Haiku.
+ # The "-static" flag exists, but is broken.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)=
;;
interix[[3-9]]*)
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
@@ -4974,61 +3883,63 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
;;
sysv4*MP*)
if test -d /usr/nec; then
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
fi
;;
hpux*)
- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
- # not for PA HP-UX.
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
case $host_cpu in
- hppa*64*|ia64*)
+ hppa*64*)
;;
*)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
;;
esac
;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
*)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
;;
esac
else
case $host_os in
- aix4* | aix5*)
+ aix[[4-9]]*)
# All AIX code is PIC.
if test "$host_cpu" = ia64; then
# AIX 5 now supports IA64 processor
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
else
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
fi
;;
chorus*)
case $cc_basename in
cxch68*)
# Green Hills C++ Compiler
- # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+ # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
;;
esac
;;
- darwin*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- case $cc_basename in
- xlc*)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- ;;
- esac
- ;;
+ mingw* | cygwin* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
dgux*)
case $cc_basename in
ec++*)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
;;
ghcx*)
# Green Hills C++ Compiler
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
;;
*)
;;
@@ -5040,21 +3951,21 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
hpux9* | hpux10* | hpux11*)
case $cc_basename in
CC*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
if test "$host_cpu" != ia64; then
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
fi
;;
aCC*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
case $host_cpu in
hppa*64*|ia64*)
# +Z the default
;;
*)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
;;
esac
;;
@@ -5069,47 +3980,60 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
irix5* | irix6* | nonstopux*)
case $cc_basename in
CC*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
# CC pic flag -KPIC is the default.
;;
*)
;;
esac
;;
- linux* | k*bsd*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
case $cc_basename in
KCC*)
# KAI C++ Compiler
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
;;
- icpc* | ecpc*)
- # Intel C++
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ecpc* )
+ # old Intel C++ for x86_64 which still supported -KPIC.
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
;;
- pgCC*)
- # Portland Group C++ compiler.
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ icpc* )
+ # Intel C++, used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
;;
cxx*)
# Compaq C++
# Make sure the PIC flag is empty. It appears that all Alpha
# Linux and Compaq Tru64 Unix objects are PIC.
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
+ # IBM XL 8.0, 9.0 on PPC and BlueGene
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
;;
*)
case `$CC -V 2>&1 | sed 5q` in
*Sun\ C*)
# Sun C++ 5.9
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
;;
esac
;;
@@ -5122,7 +4046,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
mvs*)
case $cc_basename in
cxx*)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
;;
*)
;;
@@ -5130,22 +4054,27 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
;;
netbsd*)
;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
osf3* | osf4* | osf5*)
case $cc_basename in
KCC*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
;;
RCC*)
# Rational C++ 2.4.1
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
;;
cxx*)
# Digital/Compaq C++
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
# Make sure the PIC flag is empty. It appears that all Alpha
# Linux and Compaq Tru64 Unix objects are PIC.
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
;;
*)
;;
@@ -5155,15 +4084,15 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
;;
solaris*)
case $cc_basename in
- CC*)
+ CC* | sunCC*)
# Sun C++ 4.2, 5.x and Centerline C++
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
;;
gcx*)
# Green Hills C++ Compiler
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
;;
*)
;;
@@ -5173,81 +4102,110 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
case $cc_basename in
CC*)
# Sun C++ 4.x
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
;;
lcc*)
# Lucid
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
;;
*)
;;
esac
;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ esac
+ ;;
tandem*)
case $cc_basename in
NCC*)
# NonStop-UX NCC 3.20
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
;;
*)
;;
esac
;;
- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
- case $cc_basename in
- CC*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
- esac
- ;;
vxworks*)
;;
*)
- _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
;;
esac
fi
],
[
if test "$GCC" = yes; then
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
case $host_os in
aix*)
# All AIX code is PIC.
if test "$host_cpu" = ia64; then
# AIX 5 now supports IA64 processor
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
fi
;;
amigaos*)
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
;;
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
- mingw* | cygwin* | pw32* | os2*)
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
# Although the cygwin gcc ignores -fPIC, still need this for old-style
# (--disable-auto-import) libraries
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
;;
darwin* | rhapsody*)
# PIC is the default on this platform
# Common symbols not allowed in MH_DYLIB files
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+
+ haiku*)
+ # PIC is the default for Haiku.
+ # The "-static" flag exists, but is broken.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)=
+ ;;
+
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
;;
interix[[3-9]]*)
@@ -5258,64 +4216,55 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
msdosdjgpp*)
# Just because we use GCC doesn't mean we suddenly get shared libraries
# on systems that don't support them.
- _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
enable_shared=no
;;
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+
sysv4*MP*)
if test -d /usr/nec; then
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
fi
;;
- hpux*)
- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
- # not for PA HP-UX.
- case $host_cpu in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- esac
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
;;
+ esac
- *)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ case $cc_basename in
+ nvcc*) # Cuda Compiler Driver 2.2
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
;;
esac
else
# PORTME Check for flag to pass linker flags through the system compiler.
case $host_os in
aix*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
if test "$host_cpu" = ia64; then
# AIX 5 now supports IA64 processor
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
else
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
fi
;;
- darwin*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- case $cc_basename in
- xlc*)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- ;;
- esac
- ;;
- mingw* | cygwin* | pw32* | os2*)
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
;;
hpux9* | hpux10* | hpux11*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
# not for PA HP-UX.
case $host_cpu in
@@ -5323,231 +4272,293 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
# +Z the default
;;
*)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
;;
esac
# Is there a better lt_prog_compiler_static that works with the bundled CC?
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
;;
irix5* | irix6* | nonstopux*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
# PIC (with -KPIC) is the default.
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
-
- newsos6)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
;;
- linux* | k*bsd*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
case $cc_basename in
- icc* | ecc*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ # old Intel for x86_64 which still supported -KPIC.
+ ecc*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ # icc used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ icc* | ifort*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
;;
- pgcc* | pgf77* | pgf90* | pgf95*)
+ # Lahey Fortran 8.1.
+ lf95*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
+ ;;
+ nagfor*)
+ # NAG Fortran compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
# Portland Group compilers (*not* the Pentium gcc compiler,
# which looks to be a dead project)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
;;
ccc*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
# All Alpha code is PIC.
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
;;
+ xl* | bgxl* | bgf* | mpixl*)
+ # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+ ;;
*)
- case `$CC -V 2>&1 | sed 5q` in
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ F* | *Sun*Fortran*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
+ ;;
*Sun\ C*)
# Sun C 5.9
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- ;;
- *Sun\ F*)
- # Sun Fortran 8.3 passes all unrecognized flags to the linker
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
;;
esac
;;
esac
;;
+ newsos6)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+
osf3* | osf4* | osf5*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
# All OSF/1 code is PIC.
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
;;
rdos*)
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
;;
solaris*)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
case $cc_basename in
- f77* | f90* | f95*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
esac
;;
sunos4*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
;;
sysv4 | sysv4.2uw2* | sysv4.3*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
;;
sysv4*MP*)
if test -d /usr/nec ;then
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
fi
;;
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
;;
unicos*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
;;
uts4*)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
;;
*)
- _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
;;
esac
fi
])
-AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
- AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
- _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
- [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
- [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
- "" | " "*) ;;
- *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
- esac],
- [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
- _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
-fi
case $host_os in
# For platforms which do not support PIC, -DPIC is meaningless:
*djgpp*)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
;;
*)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
;;
esac
+AC_CACHE_CHECK([for $compiler option to produce PIC],
+ [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
+ [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+ _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
+ [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
+ [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
+ [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
+ "" | " "*) ;;
+ *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+ esac],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+fi
+_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
+ [Additional compiler flags for building library objects])
+
+_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
+ [How to pass a linker flag through the compiler])
#
# Check to make sure the static flag actually works.
#
-wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
-AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
- _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
+wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
+_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
+ _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
$lt_tmp_static_flag,
[],
- [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
-])
+ [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
+_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
+ [Compiler flag to prevent dynamic linking])
+])# _LT_COMPILER_PIC
-# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
-# ------------------------------------
+# _LT_LINKER_SHLIBS([TAGNAME])
+# ----------------------------
# See if the linker supports building shared libraries.
-AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
-[AC_REQUIRE([LT_AC_PROG_SED])dnl
+m4_defun([_LT_LINKER_SHLIBS],
+[AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+m4_require([_LT_PATH_MANIFEST_TOOL])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-ifelse([$1],[CXX],[
- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+m4_if([$1], [CXX], [
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
case $host_os in
- aix4* | aix5*)
+ aix[[4-9]]*)
# If we're using GNU nm, then we don't want the "-C" option.
# -C means demangle to AIX nm, but means don't demangle with GNU nm
- if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+ # Also, AIX nm treats weak defined symbols like other global defined
+ # symbols, whereas GNU nm marks them as "W".
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
else
- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
fi
;;
pw32*)
- _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
- ;;
- cygwin* | mingw*)
- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
- ;;
+ _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+ ;;
+ cygwin* | mingw* | cegcc*)
+ case $cc_basename in
+ cl*) ;;
+ *)
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
+ ;;
+ esac
+ ;;
*)
- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- ;;
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
esac
-],[
+], [
runpath_var=
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=
- _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
- _LT_AC_TAGVAR(archive_cmds, $1)=
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
- _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
- _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
- _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
- _LT_AC_TAGVAR(hardcode_direct, $1)=no
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
- _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
- _LT_AC_TAGVAR(hardcode_automatic, $1)=no
- _LT_AC_TAGVAR(module_cmds, $1)=
- _LT_AC_TAGVAR(module_expsym_cmds, $1)=
- _LT_AC_TAGVAR(always_export_symbols, $1)=no
- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(allow_undefined_flag, $1)=
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(archive_cmds, $1)=
+ _LT_TAGVAR(archive_expsym_cmds, $1)=
+ _LT_TAGVAR(compiler_needs_object, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(hardcode_automatic, $1)=no
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ _LT_TAGVAR(hardcode_minus_L, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_TAGVAR(inherit_rpath, $1)=no
+ _LT_TAGVAR(link_all_deplibs, $1)=unknown
+ _LT_TAGVAR(module_cmds, $1)=
+ _LT_TAGVAR(module_expsym_cmds, $1)=
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)=
+ _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+ _LT_TAGVAR(thread_safe_flag_spec, $1)=
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
# include_expsyms should be a list of space-separated symbols to be *always*
# included in the symbol list
- _LT_AC_TAGVAR(include_expsyms, $1)=
+ _LT_TAGVAR(include_expsyms, $1)=
# exclude_expsyms can be an extended regexp of symbols to exclude
# it will be wrapped by ` (' and `)$', so one must not match beginning or
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
# as well as any symbol that contains `d'.
- _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
+ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
# platforms (ab)use it in PIC code, but their linkers get confused if
# the symbol is explicitly referenced. Since portable code cannot
# rely on this symbol name, it's probably fine to never include it in
# preloaded symbol tables.
+ # Exclude shared library initialization/finalization symbols.
+dnl Note also adjust exclude_expsyms for C++ above.
extract_expsyms_cmds=
- # Just being paranoid about ensuring that cc_basename is set.
- _LT_CC_BASENAME([$compiler])
+
case $host_os in
- cygwin* | mingw* | pw32*)
+ cygwin* | mingw* | pw32* | cegcc*)
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
@@ -5564,8 +4575,34 @@ ifelse([$1],[CXX],[
;;
esac
- _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+
+ # On some targets, GNU ld is compatible enough with the native linker
+ # that we're better off using the native interface for both.
+ lt_use_gnu_ld_interface=no
if test "$with_gnu_ld" = yes; then
+ case $host_os in
+ aix*)
+ # The AIX port of GNU ld has always aspired to compatibility
+ # with the native linker. However, as the warning in the GNU ld
+ # block says, versions before 2.19.5* couldn't really create working
+ # shared libraries, regardless of the interface used.
+ case `$LD -v 2>&1` in
+ *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
+ *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
+ *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
+ *)
+ lt_use_gnu_ld_interface=yes
+ ;;
+ esac
+ ;;
+ *)
+ lt_use_gnu_ld_interface=yes
+ ;;
+ esac
+ fi
+
+ if test "$lt_use_gnu_ld_interface" = yes; then
# If archive_cmds runs LD, not CC, wlarc should be empty
wlarc='${wl}'
@@ -5573,16 +4610,17 @@ ifelse([$1],[CXX],[
# are reset later if shared libraries are not supported. Putting them
# here allows them to be overridden if necessary.
runpath_var=LD_RUN_PATH
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
# ancient GNU ld didn't support --whole-archive et. al.
- if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
fi
supports_anon_versioning=no
- case `$LD -v 2>/dev/null` in
+ case `$LD -v 2>&1` in
+ *GNU\ gold*) supports_anon_versioning=yes ;;
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
*\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
@@ -5592,61 +4630,65 @@ ifelse([$1],[CXX],[
# See if GNU ld supports shared libraries.
case $host_os in
- aix3* | aix4* | aix5*)
+ aix[[3-9]]*)
# On AIX/PPC, the GNU linker is very broken
if test "$host_cpu" != ia64; then
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- cat <<EOF 1>&2
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** Warning: the GNU linker, at least up to release 2.19, is reported
*** to be unable to reliably create shared libraries on AIX.
*** Therefore, libtool is disabling shared libraries support. If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
+*** really care for shared libraries, you may want to install binutils
+*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
+*** You will then need to restart the configuration process.
-EOF
+_LT_EOF
fi
;;
amigaos*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-
- # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
- # that the semantics of dynamic libraries on AmigaOS, at least up
- # to version 4, is to share data among multiple programs linked
- # with the same dynamic library. Since this doesn't match the
- # behavior of shared libraries on other platforms, we can't use
- # them.
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)=''
+ ;;
+ m68k)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
;;
beos*)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
# support --undefined. This deserves some investigation. FIXME
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
else
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ _LT_TAGVAR(ld_shlibs, $1)=no
fi
;;
- cygwin* | mingw* | pw32*)
- # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ cygwin* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
# as there is no search path for DLLs.
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_AC_TAGVAR(always_export_symbols, $1)=no
- _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
-
- if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
# If the export-symbols file already is a .def file (1st line
# is EXPORTS), use it as is; otherwise, prepend...
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
cp $export_symbols $output_objdir/$soname.def;
else
echo EXPORTS > $output_objdir/$soname.def;
@@ -5654,79 +4696,119 @@ EOF
fi~
$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
else
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ _LT_TAGVAR(ld_shlibs, $1)=no
fi
;;
+ haiku*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
interix[[3-9]]*)
- _LT_AC_TAGVAR(hardcode_direct, $1)=no
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
# Instead, shared libraries are loaded at an image base (0x10000000 by
# default) and relocated if they conflict, which is a slow very memory
# consuming and fragmenting process. To avoid this, we pick a random,
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
- gnu* | linux* | k*bsd*-gnu)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- tmp_addflag=
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+ tmp_diet=no
+ if test "$host_os" = linux-dietlibc; then
+ case $cc_basename in
+ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
+ esac
+ fi
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ && test "$tmp_diet" = no
+ then
+ tmp_addflag=' $pic_flag'
+ tmp_sharedflag='-shared'
case $cc_basename,$host_cpu in
- pgcc*) # Portland Group C compiler
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+ pgcc*) # Portland Group C compiler
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
tmp_addflag=' $pic_flag'
;;
- pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+ pgf77* | pgf90* | pgf95* | pgfortran*)
+ # Portland Group f77 and f90 compilers
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
tmp_addflag=' $pic_flag -Mnomain' ;;
- ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
tmp_addflag=' -i_dynamic' ;;
efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
tmp_addflag=' -i_dynamic -nofor_main' ;;
ifc* | ifort*) # Intel Fortran compiler
tmp_addflag=' -nofor_main' ;;
+ lf95*) # Lahey Fortran 8.1
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ tmp_sharedflag='--shared' ;;
+ xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
+ nvcc*) # Cuda Compiler Driver 2.2
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ _LT_TAGVAR(compiler_needs_object, $1)=yes
+ ;;
esac
case `$CC -V 2>&1 | sed 5q` in
*Sun\ C*) # Sun C 5.9
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ _LT_TAGVAR(compiler_needs_object, $1)=yes
tmp_sharedflag='-G' ;;
*Sun\ F*) # Sun Fortran 8.3
tmp_sharedflag='-G' ;;
- *)
- tmp_sharedflag='-shared' ;;
esac
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- if test $supports_anon_versioning = yes; then
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- $echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
- fi
+ if test "x$supports_anon_versioning" = xyes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+
+ case $cc_basename in
+ xlf* | bgf* | bgxlf* | mpixlf*)
+ # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+ _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ esac
else
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ _LT_TAGVAR(ld_shlibs, $1)=no
fi
;;
netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
else
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
fi
;;
solaris*)
- if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- cat <<EOF 1>&2
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
*** create shared libraries on Solaris systems. Therefore, libtool
@@ -5735,19 +4817,19 @@ EOF
*** your PATH or compiler configuration so that the native linker is
*** used, and then restart.
-EOF
- elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
else
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ _LT_TAGVAR(ld_shlibs, $1)=no
fi
;;
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
case `$LD -v 2>&1` in
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ _LT_TAGVAR(ld_shlibs, $1)=no
cat <<_LT_EOF 1>&2
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
@@ -5760,58 +4842,62 @@ EOF
_LT_EOF
;;
*)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
else
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ _LT_TAGVAR(ld_shlibs, $1)=no
fi
;;
esac
;;
sunos4*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
wlarc=
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
;;
*)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
else
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ _LT_TAGVAR(ld_shlibs, $1)=no
fi
;;
esac
- if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
+ if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
runpath_var=
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
fi
else
# PORTME fill in a description of your system's linker (not GNU ld)
case $host_os in
aix3*)
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_AC_TAGVAR(always_export_symbols, $1)=yes
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
# Note: this linker hardcodes the directories in LIBPATH if there
# are no directories specified by -L.
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
# Neither direct hardcoding nor static linking is supported with a
# broken collect2.
- _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
fi
;;
- aix4* | aix5*)
+ aix[[4-9]]*)
if test "$host_cpu" = ia64; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
@@ -5821,22 +4907,24 @@ _LT_EOF
else
# If we're using GNU nm, then we don't want the "-C" option.
# -C means demangle to AIX nm, but means don't demangle with GNU nm
- if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+ # Also, AIX nm treats weak defined symbols like other global
+ # defined symbols, whereas GNU nm marks them as "W".
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
else
- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
fi
aix_use_runtimelinking=no
# Test if we are trying to use run time linking or normal
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
# need to do runtime linking.
- case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
for ld_flag in $LDFLAGS; do
- if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
- aix_use_runtimelinking=yes
- break
- fi
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
done
;;
esac
@@ -5851,30 +4939,32 @@ _LT_EOF
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
- _LT_AC_TAGVAR(archive_cmds, $1)=''
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(archive_cmds, $1)=''
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
if test "$GCC" = yes; then
case $host_os in aix4.[[012]]|aix4.[[012]].*)
# We only want to do this on AIX 4.2 and lower, the check
# below for broken collect2 doesn't work under 4.3+
collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" && \
- strings "$collect2name" | grep resolve_lib_name >/dev/null
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
then
- # We have reworked collect2
- :
+ # We have reworked collect2
+ :
else
- # We have old collect2
- _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
- # It fails to find uninstalled libraries when the uninstalled
- # path is not listed in the libpath. Setting hardcode_minus_L
- # to unsupported forces relinking
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+ # We have old collect2
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
fi
;;
esac
@@ -5885,8 +4975,8 @@ _LT_EOF
else
# not using gcc
if test "$host_cpu" = ia64; then
- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
- # chokes on -Wl,-G. The following line is correct:
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
shared_flag='-G'
else
if test "$aix_use_runtimelinking" = yes; then
@@ -5897,130 +4987,138 @@ _LT_EOF
fi
fi
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
# It seems that -bexpall does not export symbols beginning with
# underscore (_), so it is better to generate a list of symbols to export.
- _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+ _LT_TAGVAR(always_export_symbols, $1)=yes
if test "$aix_use_runtimelinking" = yes; then
# Warning - without using the other runtime loading flags (-brtl),
# -berok will link without error, but may produce a broken library.
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
- # Determine the default libpath from the value encoded in an empty executable.
- _LT_AC_SYS_LIBPATH_AIX
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
- else
+ _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX([$1])
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
if test "$host_cpu" = ia64; then
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
- _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+ _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
else
- # Determine the default libpath from the value encoded in an empty executable.
- _LT_AC_SYS_LIBPATH_AIX
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX([$1])
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
# Warning - without using the other run time loading flags,
# -berok will link without error, but may produce a broken library.
- _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
- # Exported symbols can be pulled into shared objects from archives
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ if test "$with_gnu_ld" = yes; then
+ # We only use this code for GNU lds that support --whole-archive.
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ else
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
# This is similar to how AIX traditionally builds its shared libraries.
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
fi
fi
;;
amigaos*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
- # see comment about different semantics on the GNU ld section
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)=''
+ ;;
+ m68k)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
;;
bsdi[[45]]*)
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
;;
- cygwin* | mingw* | pw32*)
+ cygwin* | mingw* | pw32* | cegcc*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
- # Tell ltmain to make .lib files, not .a files.
- libext=lib
- # Tell ltmain to make .dll files, not .so files.
- shrext_cmds=".dll"
- # FIXME: Setting linknames here is a bad hack.
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
- # The linker will automatically build a .lib file if we build a DLL.
- _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
- # FIXME: Should let the user specify the lib program.
- _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
- _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
- _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
- ;;
-
- darwin* | rhapsody*)
- case $host_os in
- rhapsody* | darwin1.[[012]])
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
- ;;
- *) # Darwin 1.3 on
- if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
- else
- case ${MACOSX_DEPLOYMENT_TARGET} in
- 10.[[012]])
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
- ;;
- 10.*)
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
- ;;
- esac
- fi
- ;;
- esac
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_AC_TAGVAR(hardcode_direct, $1)=no
- _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
- if test "$GCC" = yes ; then
- output_verbose_link_cmd='echo'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- else
case $cc_basename in
- xlc*)
- output_verbose_link_cmd='echo'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
- _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- ;;
- *)
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
+ cl*)
+ # Native MSVC
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='@'
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+ else
+ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
+ # The linker will not automatically build a static lib if we build a DLL.
+ # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+ # Don't use ranlib
+ _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
+ _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile="$lt_outputfile.exe"
+ lt_tool_outputfile="$lt_tool_outputfile.exe"
+ ;;
+ esac~
+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
+ ;;
+ *)
+ # Assume MSVC wrapper
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+ # FIXME: Should let the user specify the lib program.
+ _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ ;;
esac
- fi
;;
- dgux*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ darwin* | rhapsody*)
+ _LT_DARWIN_LINKER_FEATURES($1)
;;
- freebsd1*)
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ dgux*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
;;
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
@@ -6028,106 +5126,113 @@ _LT_EOF
# does not break anything, and helps significantly (at the cost of a little
# extra space).
freebsd2.2*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
;;
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
- freebsd2*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ freebsd2.*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
;;
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
freebsd* | dragonfly*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
;;
hpux9*)
if test "$GCC" = yes; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
else
- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
fi
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_direct, $1)=yes
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
;;
hpux10*)
- if test "$GCC" = yes -a "$with_gnu_ld" = no; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
else
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
fi
if test "$with_gnu_ld" = no; then
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
fi
;;
hpux11*)
- if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ if test "$GCC" = yes && test "$with_gnu_ld" = no; then
case $host_cpu in
hppa*64*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
ia64*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
;;
*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
;;
esac
else
case $host_cpu in
hppa*64*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
ia64*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
;;
*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ m4_if($1, [], [
+ # Older versions of the 11.00 compiler do not understand -b yet
+ # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
+ _LT_LINKER_OPTION([if $CC understands -b],
+ _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
+ [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
+ [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
+ [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
;;
esac
fi
if test "$with_gnu_ld" = no; then
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
case $host_cpu in
hppa*64*|ia64*)
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
- _LT_AC_TAGVAR(hardcode_direct, $1)=no
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
;;
*)
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
;;
esac
fi
@@ -6135,194 +5240,236 @@ _LT_EOF
irix5* | irix6* | nonstopux*)
if test "$GCC" = yes; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ # Try to use the -exported_symbol ld option, if it does not
+ # work, assume that -exports_file does not work either and
+ # implicitly export all symbols.
+ # This should be the same for all languages, so no per-tag cache variable.
+ AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
+ [lt_cv_irix_exported_symbol],
+ [save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+ AC_LINK_IFELSE(
+ [AC_LANG_SOURCE(
+ [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
+ [C++], [[int foo (void) { return 0; }]],
+ [Fortran 77], [[
+ subroutine foo
+ end]],
+ [Fortran], [[
+ subroutine foo
+ end]])])],
+ [lt_cv_irix_exported_symbol=yes],
+ [lt_cv_irix_exported_symbol=no])
+ LDFLAGS="$save_LDFLAGS"])
+ if test "$lt_cv_irix_exported_symbol" = yes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+ fi
else
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
fi
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(inherit_rpath, $1)=yes
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
;;
netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
else
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
fi
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
;;
newsos6)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *nto* | *qnx*)
;;
openbsd*)
if test -f /usr/libexec/ld.so; then
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
else
case $host_os in
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
;;
*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
;;
esac
- fi
+ fi
else
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ _LT_TAGVAR(ld_shlibs, $1)=no
fi
;;
os2*)
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
- _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
;;
osf3*)
if test "$GCC" = yes; then
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
else
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
fi
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
;;
osf4* | osf5*) # as osf3* with the addition of -msym flag
if test "$GCC" = yes; then
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
else
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
- $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
# Both c and cxx compiler support -rpath directly
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
fi
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
;;
solaris*)
- _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
+ _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
if test "$GCC" = yes; then
wlarc='${wl}'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
- $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
else
- wlarc=''
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ ;;
+ *)
+ wlarc='${wl}'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
fi
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
case $host_os in
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
*)
# The compiler driver will combine and reorder linker options,
# but understands `-z linker_flag'. GCC discards it without `$wl',
# but is careful enough not to reorder.
- # Supported since Solaris 2.6 (maybe 2.5.1?)
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
if test "$GCC" = yes; then
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
else
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
fi
;;
esac
- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
;;
sunos4*)
if test "x$host_vendor" = xsequent; then
# Use $CC to link under sequent, because it throws in some extra .o
# files that make .init and .fini sections work.
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
else
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
fi
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
;;
sysv4)
case $host_vendor in
sni)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
;;
siemens)
## LD is ld it makes a PLAMLIB
## CC just makes a GrossModule.
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
- _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+ _LT_TAGVAR(hardcode_direct, $1)=no
;;
motorola)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
;;
esac
runpath_var='LD_RUN_PATH'
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
;;
sysv4.3*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
;;
sysv4*MP*)
if test -d /usr/nec; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
runpath_var=LD_RUN_PATH
hardcode_runpath_var=yes
- _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+ _LT_TAGVAR(ld_shlibs, $1)=yes
fi
;;
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
- _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
runpath_var='LD_RUN_PATH'
if test "$GCC" = yes; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
else
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
fi
;;
@@ -6333,50 +5480,65 @@ _LT_EOF
# ever link correctly. If we're not using GNU ld we use -z text
# though, which does catch some bad symbols but isn't as heavy-handed
# as -z defs.
- _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
runpath_var='LD_RUN_PATH'
if test "$GCC" = yes; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
else
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
fi
;;
uts4*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
;;
*)
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ _LT_TAGVAR(ld_shlibs, $1)=no
;;
esac
+
+ if test x$host_vendor = xsni; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
+ ;;
+ esac
+ fi
fi
])
-AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
+
+_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
+_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
+_LT_DECL([], [extract_expsyms_cmds], [2],
+ [The commands to extract the exported symbol list from a shared archive])
#
# Do we need to explicitly link libc?
#
-case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
+case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
x|xyes)
# Assume -lc should be added
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
if test "$enable_shared" = yes && test "$GCC" = yes; then
- case $_LT_AC_TAGVAR(archive_cmds, $1) in
+ case $_LT_TAGVAR(archive_cmds, $1) in
*'~'*)
# FIXME: we may have to deal with multi-command sequences.
;;
@@ -6384,144 +5546,2017 @@ x|xyes)
# Test whether the compiler implicitly links with -lc since on some
# systems, -lgcc has to come before -lc. If gcc already passes -lc
# to ld, don't add -lc before -lgcc.
- AC_MSG_CHECKING([whether -lc should be explicitly linked in])
- $rm conftest*
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
- soname=conftest
- lib=conftest
- libobjs=conftest.$ac_objext
- deplibs=
- wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
- pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
- compiler_flags=-v
- linker_flags=-v
- verstring=
- output_objdir=.
- libname=conftest
- lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=
- if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
- then
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ AC_CACHE_CHECK([whether -lc should be explicitly linked in],
+ [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
+ [$RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
+ pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
+ _LT_TAGVAR(allow_undefined_flag, $1)=
+ if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
+ then
+ lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ else
+ lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ fi
+ _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+ ])
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
+ [Whether or not to add -lc for building shared libraries])
+_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
+ [enable_shared_with_static_runtimes], [0],
+ [Whether or not to disallow shared libs when runtime libs are static])
+_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
+ [Compiler flag to allow reflexive dlopens])
+_LT_TAGDECL([], [whole_archive_flag_spec], [1],
+ [Compiler flag to generate shared objects directly from archives])
+_LT_TAGDECL([], [compiler_needs_object], [1],
+ [Whether the compiler copes with passing no objects directly])
+_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
+ [Create an old-style archive from a shared archive])
+_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
+ [Create a temporary old-style archive to link instead of a shared archive])
+_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
+_LT_TAGDECL([], [archive_expsym_cmds], [2])
+_LT_TAGDECL([], [module_cmds], [2],
+ [Commands used to build a loadable module if different from building
+ a shared archive.])
+_LT_TAGDECL([], [module_expsym_cmds], [2])
+_LT_TAGDECL([], [with_gnu_ld], [1],
+ [Whether we are building with GNU ld or not])
+_LT_TAGDECL([], [allow_undefined_flag], [1],
+ [Flag that allows shared libraries with undefined symbols to be built])
+_LT_TAGDECL([], [no_undefined_flag], [1],
+ [Flag that enforces no undefined symbols])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
+ [Flag to hardcode $libdir into a binary during linking.
+ This must work even if $libdir does not exist])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
+ [[If ld is used when linking, flag to hardcode $libdir into a binary
+ during linking. This must work even if $libdir does not exist]])
+_LT_TAGDECL([], [hardcode_libdir_separator], [1],
+ [Whether we need a single "-rpath" flag with a separated argument])
+_LT_TAGDECL([], [hardcode_direct], [0],
+ [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+ DIR into the resulting binary])
+_LT_TAGDECL([], [hardcode_direct_absolute], [0],
+ [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+ DIR into the resulting binary and the resulting library dependency is
+ "absolute", i.e impossible to change by setting ${shlibpath_var} if the
+ library is relocated])
+_LT_TAGDECL([], [hardcode_minus_L], [0],
+ [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+ into the resulting binary])
+_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
+ [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+ into the resulting binary])
+_LT_TAGDECL([], [hardcode_automatic], [0],
+ [Set to "yes" if building a shared library automatically hardcodes DIR
+ into the library and all subsequent libraries and executables linked
+ against it])
+_LT_TAGDECL([], [inherit_rpath], [0],
+ [Set to yes if linker adds runtime paths of dependent libraries
+ to runtime path list])
+_LT_TAGDECL([], [link_all_deplibs], [0],
+ [Whether libtool must link a program against all its dependency libraries])
+_LT_TAGDECL([], [always_export_symbols], [0],
+ [Set to "yes" if exported symbols are required])
+_LT_TAGDECL([], [export_symbols_cmds], [2],
+ [The commands to list exported symbols])
+_LT_TAGDECL([], [exclude_expsyms], [1],
+ [Symbols that should not be listed in the preloaded symbols])
+_LT_TAGDECL([], [include_expsyms], [1],
+ [Symbols that must always be exported])
+_LT_TAGDECL([], [prelink_cmds], [2],
+ [Commands necessary for linking programs (against libraries) with templates])
+_LT_TAGDECL([], [postlink_cmds], [2],
+ [Commands necessary for finishing linking programs])
+_LT_TAGDECL([], [file_list_spec], [1],
+ [Specify filename containing input files])
+dnl FIXME: Not yet implemented
+dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
+dnl [Compiler flag to generate thread safe objects])
+])# _LT_LINKER_SHLIBS
+
+
+# _LT_LANG_C_CONFIG([TAG])
+# ------------------------
+# Ensure that the configuration variables for a C compiler are suitably
+# defined. These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_C_CONFIG],
+[m4_require([_LT_DECL_EGREP])dnl
+lt_save_CC="$CC"
+AC_LANG_PUSH(C)
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+_LT_TAG_COMPILER
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+ LT_SYS_DLOPEN_SELF
+ _LT_CMD_STRIPLIB
+
+ # Report which library types will actually be built
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_CONFIG($1)
+fi
+AC_LANG_POP
+CC="$lt_save_CC"
+])# _LT_LANG_C_CONFIG
+
+
+# _LT_LANG_CXX_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a C++ compiler are suitably
+# defined. These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_CXX_CONFIG],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_PATH_MANIFEST_TOOL])dnl
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+ ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+ (test "X$CXX" != "Xg++"))) ; then
+ AC_PROG_CXXCPP
+else
+ _lt_caught_CXX_error=yes
+fi
+
+AC_LANG_PUSH(C++)
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(compiler_needs_object, $1)=no
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the CXX compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_caught_CXX_error" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="int some_variable = 0;"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC=$CC
+ lt_save_CFLAGS=$CFLAGS
+ lt_save_LD=$LD
+ lt_save_GCC=$GCC
+ GCC=$GXX
+ lt_save_with_gnu_ld=$with_gnu_ld
+ lt_save_path_LD=$lt_cv_path_LD
+ if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+ lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+ else
+ $as_unset lt_cv_prog_gnu_ld
+ fi
+ if test -n "${lt_cv_path_LDCXX+set}"; then
+ lt_cv_path_LD=$lt_cv_path_LDCXX
+ else
+ $as_unset lt_cv_path_LD
+ fi
+ test -z "${LDCXX+set}" || LD=$LDCXX
+ CC=${CXX-"c++"}
+ CFLAGS=$CXXFLAGS
+ compiler=$CC
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+
+ if test -n "$compiler"; then
+ # We don't want -fno-exception when compiling C++ code, so set the
+ # no_builtin_flag separately
+ if test "$GXX" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+ else
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+ fi
+
+ if test "$GXX" = yes; then
+ # Set up default GNU C++ configuration
+
+ LT_PATH_LD
+
+ # Check if GNU C++ uses GNU ld as the underlying linker, since the
+ # archiving commands below assume that GNU ld is being used.
+ if test "$with_gnu_ld" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+ # investigate it a little bit more. (MM)
+ wlarc='${wl}'
+
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+ $GREP 'no-whole-archive' > /dev/null; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
else
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
fi
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
else
- cat conftest.err 1>&5
+ with_gnu_ld=no
+ wlarc=
+
+ # A generic and very simple default shared library creation
+ # command for GNU C++ for the case where it uses the native
+ # linker, instead of GNU ld. If possible, this setting should
+ # overridden to take advantage of the native linker features on
+ # the platform it is being used on.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
fi
- $rm conftest*
- AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+
+ else
+ GXX=no
+ with_gnu_ld=no
+ wlarc=
+ fi
+
+ # PORTME: fill in a description of your system's C++ link characteristics
+ AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ case $host_os in
+ aix3*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aix[[4-9]]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+ for ld_flag in $LDFLAGS; do
+ case $ld_flag in
+ *-brtl*)
+ aix_use_runtimelinking=yes
+ break
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ _LT_TAGVAR(archive_cmds, $1)=''
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+ if test "$GXX" = yes; then
+ case $host_os in aix4.[[012]]|aix4.[[012]].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to
+ # export.
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+ # Determine the default libpath from the value encoded in an empty
+ # executable.
+ _LT_SYS_MODULE_PATH_AIX([$1])
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+ _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX([$1])
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ if test "$with_gnu_ld" = yes; then
+ # We only use this code for GNU lds that support --whole-archive.
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ else
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ # This is similar to how AIX traditionally builds its shared
+ # libraries.
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ chorus*)
+ case $cc_basename in
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ case $GXX,$cc_basename in
+ ,cl* | no,cl*)
+ # Native MSVC
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='@'
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+ else
+ $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
+ # The linker will not automatically build a static lib if we build a DLL.
+ # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ # Don't use ranlib
+ _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
+ _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile="$lt_outputfile.exe"
+ lt_tool_outputfile="$lt_tool_outputfile.exe"
+ ;;
+ esac~
+ func_to_tool_file "$lt_outputfile"~
+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
+ ;;
+ *)
+ # g++
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ # as there is no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+ darwin* | rhapsody*)
+ _LT_DARWIN_LINKER_FEATURES($1)
+ ;;
+
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ freebsd2.*)
+ # C++ shared libraries reported to be fairly broken before
+ # switch to ELF
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ freebsd-elf*)
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ ;;
+
+ freebsd* | dragonfly*)
+ # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+ # conventions
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+
+ gnu*)
+ ;;
+
+ haiku*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ hpux9*)
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC*)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ hpux10*|hpux11*)
+ if test $with_gnu_ld = no; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ ;;
+ *)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ ;;
+ esac
+ fi
+ case $host_cpu in
+ hppa*64*|ia64*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+ *)
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+ ;;
+ esac
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC*)
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test $with_gnu_ld = no; then
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ fi
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ interix[[3-9]]*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+ irix5* | irix6*)
+ case $cc_basename in
+ CC*)
+ # SGI C++
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+
+ # Archives containing C++ object files must be created using
+ # "CC -ar", where "CC" is the IRIX C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
+ fi
+ fi
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+ esac
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(inherit_rpath, $1)=yes
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+ # Archives containing C++ object files must be created using
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+ ;;
+ icpc* | ecpc* )
+ # Intel C++
+ with_gnu_ld=yes
+ # version 8.0 and above of icpc choke on multiply defined symbols
+ # if we add $predep_objects and $postdep_objects, however 7.1 and
+ # earlier do not add the objects themselves.
+ case `$CC -V 2>&1` in
+ *"Version 7."*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ *) # Version 8.0 or newer
+ tmp_idyn=
+ case $host_cpu in
+ ia64*) tmp_idyn=' -i_dynamic';;
+ esac
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ esac
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ case `$CC -V` in
+ *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
+ _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
+ _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
+ $RANLIB $oldlib'
+ _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ *) # Version 6 and above use weak symbols
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ ;;
+ cxx*)
+ # Compaq C++
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+ runpath_var=LD_RUN_PATH
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
+ ;;
+ xl* | mpixl* | bgxl*)
+ # IBM XL 8.0 on PPC, with GNU ld
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ _LT_TAGVAR(compiler_needs_object, $1)=yes
+
+ # Not sure whether something based on
+ # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+ # would be better.
+ output_verbose_link_cmd='func_echo_all'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ lynxos*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ m88k*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+ wlarc=
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ fi
+ # Workaround some broken pre-1.5 toolchains
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+ ;;
+
+ *nto* | *qnx*)
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+
+ openbsd2*)
+ # C++ shared libraries are fairly broken
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ fi
+ output_verbose_link_cmd=func_echo_all
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Archives containing C++ object files must be created using
+ # the KAI C++ compiler.
+ case $host in
+ osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
+ *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
+ esac
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ cxx*)
+ case $host in
+ osf3*)
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ ;;
+ *)
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+ echo "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
+ $RM $lib.exp'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ ;;
+ *)
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ case $host in
+ osf3*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ psos*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ lcc*)
+ # Lucid
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ solaris*)
+ case $cc_basename in
+ CC* | sunCC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
+ _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ ;;
+ esac
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+
+ output_verbose_link_cmd='func_echo_all'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+ # The C++ compiler must be used to create the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+ ;;
+ *)
+ # GNU C++ compiler with Solaris linker
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+ if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ else
+ # g++ 2.7 appears to require `-G' NOT `-shared' on this
+ # platform.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ fi
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
+ '"$_LT_TAGVAR(old_archive_cmds, $1)"
+ _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
+ '"$_LT_TAGVAR(reload_cmds, $1)"
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
;;
+
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ vxworks*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
esac
- fi
+
+ AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+ test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+ _LT_TAGVAR(GCC, $1)="$GXX"
+ _LT_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_SYS_HIDDEN_LIBDEPS($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ CC=$lt_save_CC
+ CFLAGS=$lt_save_CFLAGS
+ LDCXX=$LD
+ LD=$lt_save_LD
+ GCC=$lt_save_GCC
+ with_gnu_ld=$lt_save_with_gnu_ld
+ lt_cv_path_LDCXX=$lt_cv_path_LD
+ lt_cv_path_LD=$lt_save_path_LD
+ lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+fi # test "$_lt_caught_CXX_error" != yes
+
+AC_LANG_POP
+])# _LT_LANG_CXX_CONFIG
+
+
+# _LT_FUNC_STRIPNAME_CNF
+# ----------------------
+# func_stripname_cnf prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+#
+# This function is identical to the (non-XSI) version of func_stripname,
+# except this one can be used by m4 code that may be executed by configure,
+# rather than the libtool script.
+m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
+AC_REQUIRE([_LT_DECL_SED])
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
+func_stripname_cnf ()
+{
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+ esac
+} # func_stripname_cnf
+])# _LT_FUNC_STRIPNAME_CNF
+
+# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
+# ---------------------------------
+# Figure out "hidden" library dependencies from verbose
+# compiler output when linking a shared library.
+# Parse the compiler output and extract the necessary
+# objects, libraries and library flags.
+m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
+# Dependencies to place before and after the object being linked:
+_LT_TAGVAR(predep_objects, $1)=
+_LT_TAGVAR(postdep_objects, $1)=
+_LT_TAGVAR(predeps, $1)=
+_LT_TAGVAR(postdeps, $1)=
+_LT_TAGVAR(compiler_lib_search_path, $1)=
+
+dnl we can't use the lt_simple_compile_test_code here,
+dnl because it contains code intended for an executable,
+dnl not a library. It's possible we should let each
+dnl tag define a new lt_????_link_test_code variable,
+dnl but it's only used here...
+m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
+int a;
+void foo (void) { a = 0; }
+_LT_EOF
+], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+ Foo (void) { a = 0; }
+private:
+ int a;
+};
+_LT_EOF
+], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
+ subroutine foo
+ implicit none
+ integer*4 a
+ a=0
+ return
+ end
+_LT_EOF
+], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
+ subroutine foo
+ implicit none
+ integer a
+ a=0
+ return
+ end
+_LT_EOF
+], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
+public class foo {
+ private int a;
+ public void bar (void) {
+ a = 0;
+ }
+};
+_LT_EOF
+])
+
+_lt_libdeps_save_CFLAGS=$CFLAGS
+case "$CC $CFLAGS " in #(
+*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
+*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+esac
+
+dnl Parse the compiler output and extract the necessary
+dnl objects, libraries and library flags.
+if AC_TRY_EVAL(ac_compile); then
+ # Parse the compiler output and extract the necessary
+ # objects, libraries and library flags.
+
+ # Sentinel used to keep track of whether or not we are before
+ # the conftest object file.
+ pre_test_object_deps_done=no
+
+ for p in `eval "$output_verbose_link_cmd"`; do
+ case ${prev}${p} in
+
+ -L* | -R* | -l*)
+ # Some compilers place space between "-{L,R}" and the path.
+ # Remove the space.
+ if test $p = "-L" ||
+ test $p = "-R"; then
+ prev=$p
+ continue
+ fi
+
+ # Expand the sysroot to ease extracting the directories later.
+ if test -z "$prev"; then
+ case $p in
+ -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
+ -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
+ -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
+ esac
+ fi
+ case $p in
+ =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
+ esac
+ if test "$pre_test_object_deps_done" = no; then
+ case ${prev} in
+ -L | -R)
+ # Internal compiler library paths should come after those
+ # provided the user. The postdeps already come after the
+ # user supplied libs so there is no need to process them.
+ if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
+ _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+ else
+ _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+ fi
+ ;;
+ # The "-l" case would never come before the object being
+ # linked, so don't bother handling this case.
+ esac
+ else
+ if test -z "$_LT_TAGVAR(postdeps, $1)"; then
+ _LT_TAGVAR(postdeps, $1)="${prev}${p}"
+ else
+ _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
+ fi
+ fi
+ prev=
+ ;;
+
+ *.lto.$objext) ;; # Ignore GCC LTO objects
+ *.$objext)
+ # This assumes that the test object file only shows up
+ # once in the compiler output.
+ if test "$p" = "conftest.$objext"; then
+ pre_test_object_deps_done=yes
+ continue
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
+ _LT_TAGVAR(predep_objects, $1)="$p"
+ else
+ _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
+ fi
+ else
+ if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
+ _LT_TAGVAR(postdep_objects, $1)="$p"
+ else
+ _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
+ fi
+ fi
+ ;;
+
+ *) ;; # Ignore the rest.
+
+ esac
+ done
+
+ # Clean up.
+ rm -f a.out a.exe
+else
+ echo "libtool.m4: error: problem compiling $1 test program"
+fi
+
+$RM -f confest.$objext
+CFLAGS=$_lt_libdeps_save_CFLAGS
+
+# PORTME: override above test on systems where it is broken
+m4_if([$1], [CXX],
+[case $host_os in
+interix[[3-9]]*)
+ # Interix 3.5 installs completely hosed .la files for C++, so rather than
+ # hack all around it, let's just trust "g++" to DTRT.
+ _LT_TAGVAR(predep_objects,$1)=
+ _LT_TAGVAR(postdep_objects,$1)=
+ _LT_TAGVAR(postdeps,$1)=
+ ;;
+
+linux*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ if test "$solaris_use_stlport4" != yes; then
+ _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+
+solaris*)
+ case $cc_basename in
+ CC* | sunCC*)
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ # Adding this requires a known-good setup of shared libraries for
+ # Sun compiler versions before 5.6, else PIC objects from an old
+ # archive will be linked into the output, leading to subtle bugs.
+ if test "$solaris_use_stlport4" != yes; then
+ _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
;;
esac
-])# AC_LIBTOOL_PROG_LD_SHLIBS
+])
+case " $_LT_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=
+if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
+ [The directories searched by this compiler when creating a shared library])
+_LT_TAGDECL([], [predep_objects], [1],
+ [Dependencies to place before and after the objects being linked to
+ create a shared library])
+_LT_TAGDECL([], [postdep_objects], [1])
+_LT_TAGDECL([], [predeps], [1])
+_LT_TAGDECL([], [postdeps], [1])
+_LT_TAGDECL([], [compiler_lib_search_path], [1],
+ [The library search path used internally by the compiler when linking
+ a shared library])
+])# _LT_SYS_HIDDEN_LIBDEPS
+
+
+# _LT_LANG_F77_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a Fortran 77 compiler are
+# suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_F77_CONFIG],
+[AC_LANG_PUSH(Fortran 77)
+if test -z "$F77" || test "X$F77" = "Xno"; then
+ _lt_disable_F77=yes
+fi
-# _LT_AC_FILE_LTDLL_C
-# -------------------
-# Be careful that the start marker always follows a newline.
-AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
-# /* ltdll.c starts here */
-# #define WIN32_LEAN_AND_MEAN
-# #include <windows.h>
-# #undef WIN32_LEAN_AND_MEAN
-# #include <stdio.h>
-#
-# #ifndef __CYGWIN__
-# # ifdef __CYGWIN32__
-# # define __CYGWIN__ __CYGWIN32__
-# # endif
-# #endif
-#
-# #ifdef __cplusplus
-# extern "C" {
-# #endif
-# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
-# #ifdef __cplusplus
-# }
-# #endif
-#
-# #ifdef __CYGWIN__
-# #include <cygwin/cygwin_dll.h>
-# DECLARE_CYGWIN_DLL( DllMain );
-# #endif
-# HINSTANCE __hDllInstance_base;
-#
-# BOOL APIENTRY
-# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
-# {
-# __hDllInstance_base = hInst;
-# return TRUE;
-# }
-# /* ltdll.c ends here */
-])# _LT_AC_FILE_LTDLL_C
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+# Source file extension for f77 test sources.
+ac_ext=f
-# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
-# ---------------------------------
-AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
+# Object file extension for compiled f77 test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the F77 compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_F77" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code="\
+ program t
+ end
+"
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC="$CC"
+ lt_save_GCC=$GCC
+ lt_save_CFLAGS=$CFLAGS
+ CC=${F77-"f77"}
+ CFLAGS=$FFLAGS
+ compiler=$CC
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+ GCC=$G77
+ if test -n "$compiler"; then
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test "$can_build_shared" = "no" && enable_shared=no
-# old names
-AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
-AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
-AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
-AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
-AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
-AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
-AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+ aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_TAGVAR(GCC, $1)="$G77"
+ _LT_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ GCC=$lt_save_GCC
+ CC="$lt_save_CC"
+ CFLAGS="$lt_save_CFLAGS"
+fi # test "$_lt_disable_F77" != yes
+
+AC_LANG_POP
+])# _LT_LANG_F77_CONFIG
-# This is just to silence aclocal about the macro not being used
-ifelse([AC_DISABLE_FAST_INSTALL])
-AC_DEFUN([LT_AC_PROG_GCJ],
-[AC_CHECK_TOOL(GCJ, gcj, no)
- test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
- AC_SUBST(GCJFLAGS)
+# _LT_LANG_FC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for a Fortran compiler are
+# suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_FC_CONFIG],
+[AC_LANG_PUSH(Fortran)
+
+if test -z "$FC" || test "X$FC" = "Xno"; then
+ _lt_disable_FC=yes
+fi
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for fc test sources.
+ac_ext=${ac_fc_srcext-f}
+
+# Object file extension for compiled fc test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the FC compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_FC" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code="\
+ program t
+ end
+"
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC="$CC"
+ lt_save_GCC=$GCC
+ lt_save_CFLAGS=$CFLAGS
+ CC=${FC-"f95"}
+ CFLAGS=$FCFLAGS
+ compiler=$CC
+ GCC=$ac_cv_fc_compiler_gnu
+
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+
+ if test -n "$compiler"; then
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+ aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
+ _LT_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_SYS_HIDDEN_LIBDEPS($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ GCC=$lt_save_GCC
+ CC=$lt_save_CC
+ CFLAGS=$lt_save_CFLAGS
+fi # test "$_lt_disable_FC" != yes
+
+AC_LANG_POP
+])# _LT_LANG_FC_CONFIG
+
+
+# _LT_LANG_GCJ_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Java Compiler compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_GCJ_CONFIG],
+[AC_REQUIRE([LT_PROG_GCJ])dnl
+AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GCJ-"gcj"}
+CFLAGS=$GCJFLAGS
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)="$LD"
+_LT_CC_BASENAME([$compiler])
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+
+GCC=$lt_save_GCC
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_GCJ_CONFIG
+
+
+# _LT_LANG_RC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for the Windows resource compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_RC_CONFIG],
+[AC_REQUIRE([LT_PROG_RC])dnl
+AC_LANG_SAVE
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+lt_save_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=
+CC=${RC-"windres"}
+CFLAGS=
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+
+if test -n "$compiler"; then
+ :
+ _LT_CONFIG($1)
+fi
+
+GCC=$lt_save_GCC
+AC_LANG_RESTORE
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_RC_CONFIG
+
+
+# LT_PROG_GCJ
+# -----------
+AC_DEFUN([LT_PROG_GCJ],
+[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
+ [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
+ [AC_CHECK_TOOL(GCJ, gcj,)
+ test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+ AC_SUBST(GCJFLAGS)])])[]dnl
])
-AC_DEFUN([LT_AC_PROG_RC],
-[AC_CHECK_TOOL(RC, windres, no)
+# Old name:
+AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
+
+
+# LT_PROG_RC
+# ----------
+AC_DEFUN([LT_PROG_RC],
+[AC_CHECK_TOOL(RC, windres,)
])
+# Old name:
+AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_RC], [])
-# Cheap backport of AS_EXECUTABLE_P and required macros
-# from Autoconf 2.59; we should not use $as_executable_p directly.
-# _AS_TEST_PREPARE
+# _LT_DECL_EGREP
+# --------------
+# If we don't have a new enough Autoconf to choose the best grep
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_EGREP],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_REQUIRE([AC_PROG_FGREP])dnl
+test -z "$GREP" && GREP=grep
+_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
+_LT_DECL([], [EGREP], [1], [An ERE matcher])
+_LT_DECL([], [FGREP], [1], [A literal string matcher])
+dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
+AC_SUBST([GREP])
+])
+
+
+# _LT_DECL_OBJDUMP
+# --------------
+# If we don't have a new enough Autoconf to choose the best objdump
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_OBJDUMP],
+[AC_CHECK_TOOL(OBJDUMP, objdump, false)
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
+AC_SUBST([OBJDUMP])
+])
+
+# _LT_DECL_DLLTOOL
# ----------------
-m4_ifndef([_AS_TEST_PREPARE],
-[m4_defun([_AS_TEST_PREPARE],
-[if test -x / >/dev/null 2>&1; then
- as_executable_p='test -x'
-else
- as_executable_p='test -f'
-fi
-])])# _AS_TEST_PREPARE
+# Ensure DLLTOOL variable is set.
+m4_defun([_LT_DECL_DLLTOOL],
+[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
+AC_SUBST([DLLTOOL])
+])
-# AS_EXECUTABLE_P
-# ---------------
-# Check whether a file is executable.
-m4_ifndef([AS_EXECUTABLE_P],
-[m4_defun([AS_EXECUTABLE_P],
-[AS_REQUIRE([_AS_TEST_PREPARE])dnl
-$as_executable_p $1[]dnl
-])])# AS_EXECUTABLE_P
+# _LT_DECL_SED
+# ------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible. Prefer GNU sed if found.
+m4_defun([_LT_DECL_SED],
+[AC_PROG_SED
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
+_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
+ [Sed that helps us avoid accidentally triggering echo(1) options like -n])
+])# _LT_DECL_SED
+m4_ifndef([AC_PROG_SED], [
# NOTE: This macro has been submitted for inclusion into #
# GNU Autoconf as AC_PROG_SED. When it is available in #
# a released version of Autoconf we should remove this #
# macro and use it instead. #
-# LT_AC_PROG_SED
-# --------------
-# Check for a fully-functional sed program, that truncates
-# as few characters as possible. Prefer GNU sed if found.
-AC_DEFUN([LT_AC_PROG_SED],
+
+m4_defun([AC_PROG_SED],
[AC_MSG_CHECKING([for a sed that does not truncate output])
AC_CACHE_VAL(lt_cv_path_SED,
[# Loop through the user's path and test for sed and gsed.
@@ -6533,7 +7568,7 @@ do
test -z "$as_dir" && as_dir=.
for lt_ac_prog in sed gsed; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then
+ if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
fi
done
@@ -6574,9 +7609,836 @@ done
SED=$lt_cv_path_SED
AC_SUBST([SED])
AC_MSG_RESULT([$SED])
+])#AC_PROG_SED
+])#m4_ifndef
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_SED], [])
+
+
+# _LT_CHECK_SHELL_FEATURES
+# ------------------------
+# Find out whether the shell is Bourne or XSI compatible,
+# or has some other useful features.
+m4_defun([_LT_CHECK_SHELL_FEATURES],
+[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
+ = c,a/b,b/c, \
+ && eval 'test $(( 1 + 1 )) -eq 2 \
+ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+ && xsi_shell=yes
+AC_MSG_RESULT([$xsi_shell])
+_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
+
+AC_MSG_CHECKING([whether the shell understands "+="])
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
+ >/dev/null 2>&1 \
+ && lt_shell_append=yes
+AC_MSG_RESULT([$lt_shell_append])
+_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ lt_unset=unset
+else
+ lt_unset=false
+fi
+_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ lt_SP2NL='tr \040 \012'
+ lt_NL2SP='tr \015\012 \040\040'
+ ;;
+ *) # EBCDIC based system
+ lt_SP2NL='tr \100 \n'
+ lt_NL2SP='tr \r\n \100\100'
+ ;;
+esac
+_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
+_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
+])# _LT_CHECK_SHELL_FEATURES
+
+
+# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
+# ------------------------------------------------------
+# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
+# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
+m4_defun([_LT_PROG_FUNCTION_REPLACE],
+[dnl {
+sed -e '/^$1 ()$/,/^} # $1 /c\
+$1 ()\
+{\
+m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
+} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+])
+
+
+# _LT_PROG_REPLACE_SHELLFNS
+# -------------------------
+# Replace existing portable implementations of several shell functions with
+# equivalent extended shell implementations where those features are available..
+m4_defun([_LT_PROG_REPLACE_SHELLFNS],
+[if test x"$xsi_shell" = xyes; then
+ _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac])
+
+ _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
+ func_basename_result="${1##*/}"])
+
+ _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+ func_basename_result="${1##*/}"])
+
+ _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary parameter first.
+ func_stripname_result=${3}
+ func_stripname_result=${func_stripname_result#"${1}"}
+ func_stripname_result=${func_stripname_result%"${2}"}])
+
+ _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
+ func_split_long_opt_name=${1%%=*}
+ func_split_long_opt_arg=${1#*=}])
+
+ _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
+ func_split_short_opt_arg=${1#??}
+ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
+
+ _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
+ case ${1} in
+ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+ *) func_lo2o_result=${1} ;;
+ esac])
+
+ _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
+
+ _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
+
+ _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
+fi
+
+if test x"$lt_shell_append" = xyes; then
+ _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
+
+ _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
+ func_quote_for_eval "${2}"
+dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
+ eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
+
+ # Save a `func_append' function call where possible by direct use of '+='
+ sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+ test 0 -eq $? || _lt_function_replace_fail=:
+else
+ # Save a `func_append' function call even when '+=' is not available
+ sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+ test 0 -eq $? || _lt_function_replace_fail=:
+fi
+
+if test x"$_lt_function_replace_fail" = x":"; then
+ AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
+fi
+])
+
+# _LT_PATH_CONVERSION_FUNCTIONS
+# -----------------------------
+# Determine which file name conversion functions should be used by
+# func_to_host_file (and, implicitly, by func_to_host_path). These are needed
+# for certain cross-compile configurations and native mingw.
+m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_MSG_CHECKING([how to convert $build file names to $host format])
+AC_CACHE_VAL(lt_cv_to_host_file_cmd,
+[case $host in
+ *-*-mingw* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+ ;;
+ *-*-cygwin* )
+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+ ;;
+ * ) # otherwise, assume *nix
+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
+ ;;
+ esac
+ ;;
+ *-*-cygwin* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+ ;;
+ *-*-cygwin* )
+ lt_cv_to_host_file_cmd=func_convert_file_noop
+ ;;
+ * ) # otherwise, assume *nix
+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
+ ;;
+ esac
+ ;;
+ * ) # unhandled hosts (and "normal" native builds)
+ lt_cv_to_host_file_cmd=func_convert_file_noop
+ ;;
+esac
+])
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
+_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
+ [0], [convert $build file names to $host format])dnl
+
+AC_MSG_CHECKING([how to convert $build file names to toolchain format])
+AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
+[#assume ordinary cross tools, or native build.
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+case $host in
+ *-*-mingw* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+ ;;
+ esac
+ ;;
+esac
+])
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
+_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
+ [0], [convert $build files to toolchain format])dnl
+])# _LT_PATH_CONVERSION_FUNCTIONS
+
+# Helper functions for option handling. -*- Autoconf -*-
+#
+# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 7 ltoptions.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
+
+
+# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
+# ------------------------------------------
+m4_define([_LT_MANGLE_OPTION],
+[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
+
+
+# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
+# ---------------------------------------
+# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
+# matching handler defined, dispatch to it. Other OPTION-NAMEs are
+# saved as a flag.
+m4_define([_LT_SET_OPTION],
+[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
+m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
+ _LT_MANGLE_DEFUN([$1], [$2]),
+ [m4_warning([Unknown $1 option `$2'])])[]dnl
+])
+
+
+# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
+# ------------------------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+m4_define([_LT_IF_OPTION],
+[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
+
+
+# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
+# -------------------------------------------------------
+# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
+# are set.
+m4_define([_LT_UNLESS_OPTIONS],
+[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+ [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
+ [m4_define([$0_found])])])[]dnl
+m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
+])[]dnl
+])
+
+
+# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
+# ----------------------------------------
+# OPTION-LIST is a space-separated list of Libtool options associated
+# with MACRO-NAME. If any OPTION has a matching handler declared with
+# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
+# the unknown option and exit.
+m4_defun([_LT_SET_OPTIONS],
+[# Set options
+m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+ [_LT_SET_OPTION([$1], _LT_Option)])
+
+m4_if([$1],[LT_INIT],[
+ dnl
+ dnl Simply set some default values (i.e off) if boolean options were not
+ dnl specified:
+ _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
+ ])
+ _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
+ ])
+ dnl
+ dnl If no reference was made to various pairs of opposing options, then
+ dnl we run the default mode handler for the pair. For example, if neither
+ dnl `shared' nor `disable-shared' was passed, we enable building of shared
+ dnl archives by default:
+ _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
+ _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
+ _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
+ _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
+ [_LT_ENABLE_FAST_INSTALL])
+ ])
+])# _LT_SET_OPTIONS
+
+
+
+# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
+# -----------------------------------------
+m4_define([_LT_MANGLE_DEFUN],
+[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
+
+
+# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
+# -----------------------------------------------
+m4_define([LT_OPTION_DEFINE],
+[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
+])# LT_OPTION_DEFINE
+
+
+# dlopen
+# ------
+LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
+])
+
+AU_DEFUN([AC_LIBTOOL_DLOPEN],
+[_LT_SET_OPTION([LT_INIT], [dlopen])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `dlopen' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
+
+
+# win32-dll
+# ---------
+# Declare package support for building win32 dll's.
+LT_OPTION_DEFINE([LT_INIT], [win32-dll],
+[enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
+ AC_CHECK_TOOL(AS, as, false)
+ AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+ AC_CHECK_TOOL(OBJDUMP, objdump, false)
+ ;;
+esac
+
+test -z "$AS" && AS=as
+_LT_DECL([], [AS], [1], [Assembler program])dnl
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
+])# win32-dll
+
+AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+_LT_SET_OPTION([LT_INIT], [win32-dll])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `win32-dll' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
+
+
+# _LT_ENABLE_SHARED([DEFAULT])
+# ----------------------------
+# implement the --enable-shared flag, and supports the `shared' and
+# `disable-shared' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_SHARED],
+[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([shared],
+ [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+ [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
+
+ _LT_DECL([build_libtool_libs], [enable_shared], [0],
+ [Whether or not to build shared libraries])
+])# _LT_ENABLE_SHARED
+
+LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
+])
+
+AC_DEFUN([AC_DISABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], [disable-shared])
+])
+
+AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
+AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_SHARED], [])
+dnl AC_DEFUN([AM_DISABLE_SHARED], [])
+
+
+
+# _LT_ENABLE_STATIC([DEFAULT])
+# ----------------------------
+# implement the --enable-static flag, and support the `static' and
+# `disable-static' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_STATIC],
+[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([static],
+ [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+ [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
+
+ _LT_DECL([build_old_libs], [enable_static], [0],
+ [Whether or not to build static libraries])
+])# _LT_ENABLE_STATIC
+
+LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
+])
+
+AC_DEFUN([AC_DISABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], [disable-static])
+])
+
+AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
+AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_STATIC], [])
+dnl AC_DEFUN([AM_DISABLE_STATIC], [])
+
+
+
+# _LT_ENABLE_FAST_INSTALL([DEFAULT])
+# ----------------------------------
+# implement the --enable-fast-install flag, and support the `fast-install'
+# and `disable-fast-install' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_FAST_INSTALL],
+[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([fast-install],
+ [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+ [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
+
+_LT_DECL([fast_install], [enable_fast_install], [0],
+ [Whether or not to optimize for fast installation])dnl
+])# _LT_ENABLE_FAST_INSTALL
+
+LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
+
+# Old names:
+AU_DEFUN([AC_ENABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `fast-install' option into LT_INIT's first parameter.])
+])
+
+AU_DEFUN([AC_DISABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-fast-install' option into LT_INIT's first parameter.])
])
-# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
+dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
+
+
+# _LT_WITH_PIC([MODE])
+# --------------------
+# implement the --with-pic flag, and support the `pic-only' and `no-pic'
+# LT_INIT options.
+# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
+m4_define([_LT_WITH_PIC],
+[AC_ARG_WITH([pic],
+ [AS_HELP_STRING([--with-pic],
+ [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+ [pic_mode="$withval"],
+ [pic_mode=default])
+
+test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
+
+_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
+])# _LT_WITH_PIC
+
+LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
+
+# Old name:
+AU_DEFUN([AC_LIBTOOL_PICMODE],
+[_LT_SET_OPTION([LT_INIT], [pic-only])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `pic-only' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
+
+
+m4_define([_LTDL_MODE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
+ [m4_define([_LTDL_MODE], [nonrecursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [recursive],
+ [m4_define([_LTDL_MODE], [recursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [subproject],
+ [m4_define([_LTDL_MODE], [subproject])])
+
+m4_define([_LTDL_TYPE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [installable],
+ [m4_define([_LTDL_TYPE], [installable])])
+LT_OPTION_DEFINE([LTDL_INIT], [convenience],
+ [m4_define([_LTDL_TYPE], [convenience])])
+
+# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 6 ltsugar.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
+
+
+# lt_join(SEP, ARG1, [ARG2...])
+# -----------------------------
+# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
+# associated separator.
+# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
+# versions in m4sugar had bugs.
+m4_define([lt_join],
+[m4_if([$#], [1], [],
+ [$#], [2], [[$2]],
+ [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
+m4_define([_lt_join],
+[m4_if([$#$2], [2], [],
+ [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
+
+
+# lt_car(LIST)
+# lt_cdr(LIST)
+# ------------
+# Manipulate m4 lists.
+# These macros are necessary as long as will still need to support
+# Autoconf-2.59 which quotes differently.
+m4_define([lt_car], [[$1]])
+m4_define([lt_cdr],
+[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
+ [$#], 1, [],
+ [m4_dquote(m4_shift($@))])])
+m4_define([lt_unquote], $1)
+
+
+# lt_append(MACRO-NAME, STRING, [SEPARATOR])
+# ------------------------------------------
+# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
+# Note that neither SEPARATOR nor STRING are expanded; they are appended
+# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
+# No SEPARATOR is output if MACRO-NAME was previously undefined (different
+# than defined and empty).
+#
+# This macro is needed until we can rely on Autoconf 2.62, since earlier
+# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
+m4_define([lt_append],
+[m4_define([$1],
+ m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
+
+
+
+# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
+# ----------------------------------------------------------
+# Produce a SEP delimited list of all paired combinations of elements of
+# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
+# has the form PREFIXmINFIXSUFFIXn.
+# Needed until we can rely on m4_combine added in Autoconf 2.62.
+m4_define([lt_combine],
+[m4_if(m4_eval([$# > 3]), [1],
+ [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
+[[m4_foreach([_Lt_prefix], [$2],
+ [m4_foreach([_Lt_suffix],
+ ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
+ [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
+
+
+# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
+# -----------------------------------------------------------------------
+# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
+# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
+m4_define([lt_if_append_uniq],
+[m4_ifdef([$1],
+ [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
+ [lt_append([$1], [$2], [$3])$4],
+ [$5])],
+ [lt_append([$1], [$2], [$3])$4])])
+
+
+# lt_dict_add(DICT, KEY, VALUE)
+# -----------------------------
+m4_define([lt_dict_add],
+[m4_define([$1($2)], [$3])])
+
+
+# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
+# --------------------------------------------
+m4_define([lt_dict_add_subkey],
+[m4_define([$1($2:$3)], [$4])])
+
+
+# lt_dict_fetch(DICT, KEY, [SUBKEY])
+# ----------------------------------
+m4_define([lt_dict_fetch],
+[m4_ifval([$3],
+ m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
+ m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
+
+
+# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
+# -----------------------------------------------------------------
+m4_define([lt_if_dict_fetch],
+[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
+ [$5],
+ [$6])])
+
+
+# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
+# --------------------------------------------------------------
+m4_define([lt_dict_filter],
+[m4_if([$5], [], [],
+ [lt_join(m4_quote(m4_default([$4], [[, ]])),
+ lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
+ [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
+])
+
+# ltversion.m4 -- version numbers -*- Autoconf -*-
+#
+# Copyright (C) 2004 Free Software Foundation, Inc.
+# Written by Scott James Remnant, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# @configure_input@
+
+# serial 3293 ltversion.m4
+# This file is part of GNU Libtool
+
+m4_define([LT_PACKAGE_VERSION], [2.4])
+m4_define([LT_PACKAGE_REVISION], [1.3293])
+
+AC_DEFUN([LTVERSION_VERSION],
+[macro_version='2.4'
+macro_revision='1.3293'
+_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
+_LT_DECL(, macro_revision, 0)
+])
+
+# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
+# Written by Scott James Remnant, 2004.
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 5 lt~obsolete.m4
+
+# These exist entirely to fool aclocal when bootstrapping libtool.
+#
+# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
+# which have later been changed to m4_define as they aren't part of the
+# exported API, or moved to Autoconf or Automake where they belong.
+#
+# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
+# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
+# using a macro with the same name in our local m4/libtool.m4 it'll
+# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
+# and doesn't know about Autoconf macros at all.)
+#
+# So we provide this file, which has a silly filename so it's always
+# included after everything else. This provides aclocal with the
+# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
+# because those macros already exist, or will be overwritten later.
+# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
+#
+# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
+# Yes, that means every name once taken will need to remain here until
+# we give up compatibility with versions before 1.7, at which point
+# we need to keep only those names which we still refer to.
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
+
+m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
+m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
+m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
+m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
+m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
+m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
+m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
+m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
+m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
+m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
+m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
+m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
+m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
+m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
+m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
+m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
+m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
+m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
+m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
+m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
+m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
+m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
+m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
+m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
+m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
+m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
+m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
+m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
+m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
+m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
+m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
+m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
+m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
+m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
+m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
+m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
+m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
+m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
+m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
+m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
+m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
+m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
+m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
+m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
+m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
+m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
+m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
+m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
+m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
+m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
+m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -6586,14 +8448,31 @@ AC_MSG_RESULT([$SED])
# ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been
# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.11'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.11.1], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too. Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
# AM_SET_CURRENT_AUTOMAKE_VERSION
# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.9.6])])
+[AM_AUTOMAKE_VERSION([1.11.1])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
@@ -6650,14 +8529,14 @@ am_aux_dir=`cd $ac_aux_dir && pwd`
# AM_CONDITIONAL -*- Autoconf -*-
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 7
+# serial 9
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
@@ -6666,8 +8545,11 @@ AC_DEFUN([AM_CONDITIONAL],
[AC_PREREQ(2.52)dnl
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])
-AC_SUBST([$1_FALSE])
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
if $2; then
$1_TRUE=
$1_FALSE='#'
@@ -6681,15 +8563,14 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 8
+# serial 10
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
@@ -6717,6 +8598,7 @@ AC_REQUIRE([AM_DEP_TRACK])dnl
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
[$1], CXX, [depcc="$CXX" am_compiler_list=],
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], UPC, [depcc="$UPC" am_compiler_list=],
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
[depcc="$$1" am_compiler_list=])
@@ -6745,6 +8627,16 @@ AC_CACHE_CHECK([dependency style of $depcc],
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
fi
+ am__universal=false
+ m4_case([$1], [CC],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac],
+ [CXX],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac])
+
for depmode in $am_compiler_list; do
# Setup a source with many dependencies, because some compilers
# like to wrap large dependency lists on column 80 (with \), and
@@ -6762,7 +8654,17 @@ AC_CACHE_CHECK([dependency style of $depcc],
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
nosideeffect)
# after this tag, mechanisms are not by side-effect, so they'll
# only be used when explicitly requested
@@ -6772,18 +8674,23 @@ AC_CACHE_CHECK([dependency style of $depcc],
break
fi
;;
+ msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
none) break ;;
esac
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
- # mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this.
if depmode=$depmode \
- source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ source=sub/conftest.c object=$am__obj \
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
- $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
>/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
- grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
@@ -6834,61 +8741,74 @@ if test "x$enable_dependency_tracking" != xno; then
AMDEPBACKSLASH='\'
fi
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
])
# Generate code to set up dependency tracking. -*- Autoconf -*-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-#serial 3
+#serial 5
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[for mf in $CONFIG_FILES; do
- # Strip MF so we end up with the name of the file.
- mf=`echo "$mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named `Makefile.in', but
- # some people rename them; so instead we look at the file content.
- # Grep'ing the first line is not enough: some people post-process
- # each Makefile.in and add a new line on top of each file to say so.
- # So let's grep whole file.
- if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
- dirpart=`AS_DIRNAME("$mf")`
- else
- continue
- fi
- # Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running `make'.
- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
- test -z "$DEPDIR" && continue
- am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "am__include" && continue
- am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # When using ansi2knr, U may be empty or an underscore; expand it
- U=`sed -n 's/^U = //p' < "$mf"`
- # Find all dependency output files, they are included files with
- # $(DEPDIR) in their names. We invoke sed twice because it is the
- # simplest approach to changing $(DEPDIR) to its actual value in the
- # expansion.
- for file in `sed -n "
- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
- # Make sure the directory exists.
- test -f "$dirpart/$file" && continue
- fdir=`AS_DIRNAME(["$file"])`
- AS_MKDIR_P([$dirpart/$fdir])
- # echo "creating $dirpart/$file"
- echo '# dummy' > "$dirpart/$file"
+[{
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
done
-done
+}
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
@@ -6919,14 +8839,14 @@ AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
# Do all the work for Automake. -*- Autoconf -*-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 12
+# serial 16
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal.
@@ -6943,16 +8863,20 @@ AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
# arguments mandatory, and then we can depend on a new Autoconf
# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.58])dnl
+[AC_PREREQ([2.62])dnl
dnl Autoconf wants to disallow AM_ names. We explicitly allow
dnl the ones we care about.
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
AC_REQUIRE([AC_PROG_INSTALL])dnl
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
- test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
fi
# test whether we have cygpath
@@ -6972,6 +8896,9 @@ m4_ifval([$2],
AC_SUBST([PACKAGE], [$1])dnl
AC_SUBST([VERSION], [$2])],
[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
@@ -6987,8 +8914,8 @@ AM_MISSING_PROG(AUTOCONF, autoconf)
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
AM_MISSING_PROG(AUTOHEADER, autoheader)
AM_MISSING_PROG(MAKEINFO, makeinfo)
-AM_PROG_INSTALL_SH
-AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
@@ -6996,20 +8923,37 @@ AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
- [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
- [_AM_PROG_TAR([v7])])])
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
_AM_IF_OPTION([no-dependencies],,
[AC_PROVIDE_IFELSE([AC_PROG_CC],
- [_AM_DEPENDENCIES(CC)],
- [define([AC_PROG_CC],
- defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [_AM_DEPENDENCIES(CXX)],
- [define([AC_PROG_CXX],
- defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES(OBJC)],
+ [define([AC_PROG_OBJC],
+ defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
])
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
# When config.status generates a header, we must update the stamp-h file.
# This file resides in the same directory as the config header
@@ -7020,18 +8964,19 @@ AC_PROVIDE_IFELSE([AC_PROG_CXX],
# our stamp files there.
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
[# Compute $1's index in $config_headers.
+_am_arg=$1
_am_stamp_count=1
for _am_header in $config_headers :; do
case $_am_header in
- $1 | $1:* )
+ $_am_arg | $_am_arg:* )
break ;;
* )
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
esac
done
-echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -7042,7 +8987,14 @@ echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
# Define $install_sh.
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
AC_SUBST(install_sh)])
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
@@ -7068,13 +9020,13 @@ AC_SUBST([am__leading_dot])])
# Check to see how 'make' treats includes. -*- Autoconf -*-
-# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 3
+# serial 4
# AM_MAKE_INCLUDE()
# -----------------
@@ -7083,7 +9035,7 @@ AC_DEFUN([AM_MAKE_INCLUDE],
[am_make=${MAKE-make}
cat > confinc << 'END'
am__doit:
- @echo done
+ @echo this is the am__doit target
.PHONY: am__doit
END
# If we don't find an include directive, just comment out the code.
@@ -7093,24 +9045,24 @@ am__quote=
_am_result=none
# First try GNU make style include.
echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
- am__include=include
- am__quote=
- _am_result=GNU
-fi
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
# Now try BSD make style include.
if test "$am__include" = "#"; then
echo '.include "confinc"' > confmf
- if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
- am__include=.include
- am__quote="\""
- _am_result=BSD
- fi
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
fi
AC_SUBST([am__include])
AC_SUBST([am__quote])
@@ -7120,14 +9072,14 @@ rm -f confinc confmf
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 4
+# serial 6
# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
@@ -7143,7 +9095,15 @@ AC_SUBST($1)])
# If it does, set am_missing_run to use it, otherwise, to nothing.
AC_DEFUN([AM_MISSING_HAS_RUN],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
# Use eval to expand $SHELL
if eval "$MISSING --run true"; then
am_missing_run="$MISSING --run "
@@ -7153,7 +9113,7 @@ else
fi
])
-# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -7161,70 +9121,33 @@ fi
# AM_PROG_MKDIR_P
# ---------------
-# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
-#
-# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
-# created by `make install' are always world readable, even if the
-# installer happens to have an overly restrictive umask (e.g. 077).
-# This was a mistake. There are at least two reasons why we must not
-# use `-m 0755':
-# - it causes special bits like SGID to be ignored,
-# - it may be too restrictive (some setups expect 775 directories).
-#
-# Do not use -m 0755 and let people choose whatever they expect by
-# setting umask.
-#
-# We cannot accept any implementation of `mkdir' that recognizes `-p'.
-# Some implementations (such as Solaris 8's) are not thread-safe: if a
-# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
-# concurrently, both version can detect that a/ is missing, but only
-# one can create it and the other will error out. Consequently we
-# restrict ourselves to GNU make (using the --version option ensures
-# this.)
+# Check for `mkdir -p'.
AC_DEFUN([AM_PROG_MKDIR_P],
-[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
- # We used to keeping the `.' as first argument, in order to
- # allow $(mkdir_p) to be used without argument. As in
- # $(mkdir_p) $(somedir)
- # where $(somedir) is conditionally defined. However this is wrong
- # for two reasons:
- # 1. if the package is installed by a user who cannot write `.'
- # make install will fail,
- # 2. the above comment should most certainly read
- # $(mkdir_p) $(DESTDIR)$(somedir)
- # so it does not work when $(somedir) is undefined and
- # $(DESTDIR) is not.
- # To support the latter case, we have to write
- # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
- # so the `.' trick is pointless.
- mkdir_p='mkdir -p --'
-else
- # On NextStep and OpenStep, the `mkdir' command does not
- # recognize any option. It will interpret all options as
- # directories to create, and then abort because `.' already
- # exists.
- for d in ./-p ./--version;
- do
- test -d $d && rmdir $d
- done
- # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
- if test -f "$ac_aux_dir/mkinstalldirs"; then
- mkdir_p='$(mkinstalldirs)'
- else
- mkdir_p='$(install_sh) -d'
- fi
-fi
-AC_SUBST([mkdir_p])])
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+ [[\\/$]]* | ?:[[\\/]]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 3
+# serial 4
# _AM_MANGLE_OPTION(NAME)
# -----------------------
@@ -7241,7 +9164,7 @@ AC_DEFUN([_AM_SET_OPTION],
# ----------------------------------
# OPTIONS is a space-separated list of Automake options.
AC_DEFUN([_AM_SET_OPTIONS],
-[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
# -------------------------------------------
@@ -7251,14 +9174,14 @@ AC_DEFUN([_AM_IF_OPTION],
# Check to make sure that the build environment is sane. -*- Autoconf -*-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 4
+# serial 5
# AM_SANITY_CHECK
# ---------------
@@ -7267,16 +9190,29 @@ AC_DEFUN([AM_SANITY_CHECK],
# Just in case
sleep 1
echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[[\\\"\#\$\&\'\`$am_lf]]*)
+ AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
+ AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
# Do `set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
- set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
if test "$[*]" = "X"; then
# -L didn't work.
- set X `ls -t $srcdir/configure conftest.file`
+ set X `ls -t "$srcdir/configure" conftest.file`
fi
rm -f conftest.file
if test "$[*]" != "X $srcdir/configure conftest.file" \
@@ -7326,9 +9262,28 @@ dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
if test "$cross_compiling" != no; then
AC_CHECK_TOOL([STRIP], [strip], :)
fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
+# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
# Check how to create a tarball. -*- Autoconf -*-
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
diff --git a/contrib/openpam/bin/Makefile.am b/contrib/openpam/bin/Makefile.am
index 2b879cc..78ebeaa 100644
--- a/contrib/openpam/bin/Makefile.am
+++ b/contrib/openpam/bin/Makefile.am
@@ -1,7 +1,11 @@
-# $Id: Makefile.am 386 2006-04-12 10:26:27Z des $
+# $Id: Makefile.am 467 2011-11-02 23:42:21Z des $
SUBDIRS =
+if WITH_PAMTEST
+SUBDIRS += pamtest
+endif
+
if WITH_SU
SUBDIRS += su
endif
diff --git a/contrib/openpam/bin/Makefile.in b/contrib/openpam/bin/Makefile.in
index e9f49fe..4f6089d 100644
--- a/contrib/openpam/bin/Makefile.in
+++ b/contrib/openpam/bin/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -14,16 +15,13 @@
@SET_MAKE@
-# $Id: Makefile.am 386 2006-04-12 10:26:27Z des $
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
+# $Id: Makefile.am 467 2011-11-02 23:42:21Z des $
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -37,8 +35,8 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-target_triplet = @target@
-@WITH_SU_TRUE@am__append_1 = su
+@WITH_PAMTEST_TRUE@am__append_1 = pamtest
+@WITH_SU_TRUE@am__append_2 = su
subdir = bin
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -48,21 +46,51 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
- install-exec-recursive install-info-recursive \
- install-recursive installcheck-recursive installdirs-recursive \
- pdf-recursive ps-recursive uninstall-info-recursive \
- uninstall-recursive
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir
ETAGS = etags
CTAGS = ctags
-DIST_SUBDIRS = su
+DIST_SUBDIRS = pamtest su
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -75,42 +103,50 @@ CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CRYPT_LIBS = @CRYPT_LIBS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
DL_LIBS = @DL_LIBS@
-ECHO = @ECHO@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
GREP = @GREP@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIB_MAJ = @LIB_MAJ@
+LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPENPAM_MODULES_DIR = @OPENPAM_MODULES_DIR@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
@@ -119,19 +155,13 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
-WITH_DOC_FALSE = @WITH_DOC_FALSE@
-WITH_DOC_TRUE = @WITH_DOC_TRUE@
-WITH_PAM_UNIX_FALSE = @WITH_PAM_UNIX_FALSE@
-WITH_PAM_UNIX_TRUE = @WITH_PAM_UNIX_TRUE@
-WITH_SU_FALSE = @WITH_SU_FALSE@
-WITH_SU_TRUE = @WITH_SU_TRUE@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -143,6 +173,7 @@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
@@ -170,13 +201,13 @@ program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
-target = @target@
target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-SUBDIRS = $(am__append_1)
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = $(am__append_1) $(am__append_2)
all: all-recursive
.SUFFIXES:
@@ -184,14 +215,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign bin/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign bin/Makefile
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign bin/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign bin/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -209,6 +240,7 @@ $(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
mostlyclean-libtool:
-rm -f *.lo
@@ -216,10 +248,6 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
@@ -227,7 +255,7 @@ uninstall-info-am:
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
- @failcom='exit 1'; \
+ @fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
@@ -244,16 +272,15 @@ $(RECURSIVE_TARGETS):
else \
local_target="$$target"; \
fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
- @failcom='exit 1'; \
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
@@ -279,16 +306,16 @@ maintainer-clean-recursive:
else \
local_target="$$target"; \
fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@@ -296,14 +323,14 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
+ set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
@@ -315,81 +342,101 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
- tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
+ $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
- list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
- || $(mkdir_p) "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
- distdir=`$(am__cd) $(distdir) && pwd`; \
- top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
- (cd $$subdir && \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$$top_distdir" \
- distdir="$$distdir/$$subdir" \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
@@ -419,6 +466,7 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -429,8 +477,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-recursive
-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
- distclean-tags
+distclean-am: clean-am distclean-generic distclean-tags
dvi: dvi-recursive
@@ -438,18 +485,38 @@ dvi-am:
html: html-recursive
+html-am:
+
info: info-recursive
info-am:
install-data-am:
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
install-exec-am:
+install-html: install-html-recursive
+
+install-html-am:
+
install-info: install-info-recursive
+install-info-am:
+
install-man:
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
installcheck-am:
maintainer-clean: maintainer-clean-recursive
@@ -468,22 +535,25 @@ ps: ps-recursive
ps-am:
-uninstall-am: uninstall-info-am
+uninstall-am:
-uninstall-info: uninstall-info-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+ install-am install-strip tags-recursive
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
- clean clean-generic clean-libtool clean-recursive ctags \
- ctags-recursive distclean distclean-generic distclean-libtool \
- distclean-recursive distclean-tags distdir dvi dvi-am html \
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am check check-am clean clean-generic clean-libtool \
+ ctags ctags-recursive distclean distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
- install-data-am install-exec install-exec-am install-info \
- install-info-am install-man install-strip installcheck \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic maintainer-clean-recursive \
- mostlyclean mostlyclean-generic mostlyclean-libtool \
- mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
- uninstall uninstall-am uninstall-info-am
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/contrib/openpam/bin/pamtest/Makefile.am b/contrib/openpam/bin/pamtest/Makefile.am
new file mode 100644
index 0000000..80694de
--- /dev/null
+++ b/contrib/openpam/bin/pamtest/Makefile.am
@@ -0,0 +1,9 @@
+# $Id: Makefile.am 471 2011-11-03 09:44:40Z des $
+
+INCLUDES = -I$(top_srcdir)/include
+
+bin_PROGRAMS = pamtest
+pamtest_SOURCES = pamtest.c
+pamtest_LDADD = $(top_builddir)/lib/libpam.la
+
+dist_man1_MANS = pamtest.1
diff --git a/contrib/openpam/bin/pamtest/Makefile.in b/contrib/openpam/bin/pamtest/Makefile.in
new file mode 100644
index 0000000..e5ba2f1
--- /dev/null
+++ b/contrib/openpam/bin/pamtest/Makefile.in
@@ -0,0 +1,588 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# $Id: Makefile.am 471 2011-11-03 09:44:40Z des $
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+bin_PROGRAMS = pamtest$(EXEEXT)
+subdir = bin/pamtest
+DIST_COMMON = $(dist_man1_MANS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_pamtest_OBJECTS = pamtest.$(OBJEXT)
+pamtest_OBJECTS = $(am_pamtest_OBJECTS)
+pamtest_DEPENDENCIES = $(top_builddir)/lib/libpam.la
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(pamtest_SOURCES)
+DIST_SOURCES = $(pamtest_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+man1dir = $(mandir)/man1
+NROFF = nroff
+MANS = $(dist_man1_MANS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CRYPT_LIBS = @CRYPT_LIBS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DL_LIBS = @DL_LIBS@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIB_MAJ = @LIB_MAJ@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPENPAM_MODULES_DIR = @OPENPAM_MODULES_DIR@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+INCLUDES = -I$(top_srcdir)/include
+pamtest_SOURCES = pamtest.c
+pamtest_LDADD = $(top_builddir)/lib/libpam.la
+dist_man1_MANS = pamtest.1
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign bin/pamtest/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign bin/pamtest/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p || test -f $$p1; \
+ then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+ @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+pamtest$(EXEEXT): $(pamtest_OBJECTS) $(pamtest_DEPENDENCIES)
+ @rm -f pamtest$(EXEEXT)
+ $(LINK) $(pamtest_OBJECTS) $(pamtest_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pamtest.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-man1: $(dist_man1_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
+ @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man1:
+ @$(NORMAL_UNINSTALL)
+ @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @list='$(MANS)'; if test -n "$$list"; then \
+ list=`for p in $$list; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+ if test -n "$$list" && \
+ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
+ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+ echo " typically \`make maintainer-clean' will remove them" >&2; \
+ exit 1; \
+ else :; fi; \
+ else :; fi
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(MANS)
+installdirs:
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-man
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man: install-man1
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-man
+
+uninstall-man: uninstall-man1
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+ clean-generic clean-libtool ctags distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-binPROGRAMS install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-man1 install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am uninstall-binPROGRAMS uninstall-man \
+ uninstall-man1
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/contrib/openpam/bin/pamtest/pamtest.1 b/contrib/openpam/bin/pamtest/pamtest.1
new file mode 100644
index 0000000..78e8353
--- /dev/null
+++ b/contrib/openpam/bin/pamtest/pamtest.1
@@ -0,0 +1,177 @@
+.\"-
+.\" Copyright (c) 2011 Dag-Erling Smørgrav
+.\" 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.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+.\"
+.\" $Id: pamtest.1 471 2011-11-03 09:44:40Z des $
+.\"
+.Dd November 2, 2011
+.Dt PAMTEST 1
+.Os
+.Sh NAME
+.Nm pamtest
+.Nd PAM policy tester
+.Sh SYNOPSYS
+.Nm
+.Op Fl dksv
+.Op Fl H Ar rhost
+.Op Fl h Ar host
+.Op Fl t Ar tty
+.Op Fl U Ar ruser
+.Op Fl u Ar user
+.Ar service
+.Op Ar command ...
+.Sh DESCRIPTION
+The
+.Nm
+utility offers an easy way to test PAM modules and policies from the
+command line.
+.Pp
+The
+.Nm
+utility loads the PAM policy specified by the
+.Ar service
+argument, starts a PAM transaction by calling
+.Xr pam_start 3 ,
+then executes the primitives specified by the remaining command-line
+arguments.
+Finally, it ends the transaction by calling
+.Xr pam_end 3 .
+.Pp
+The commands are:
+.Bl -tag -width 6n
+.It Cm authenticate , Cm auth
+Call
+.Xr pam_authenticate 3 .
+.It Cm acct_mgmt , Cm account
+Call
+.Xr pam_acct_mgmt 3 .
+.It Cm chauthtok , Cm change
+Call
+.Xr pam_chauthtok 3
+with the
+.Dv PAM_CHANGE_EXPIRED_AUTHTOK
+flag set.
+.It Cm forcechauthtok , Cm forcechange
+Call
+.Xr pam_chauthtok 3
+with no flags set.
+.It Cm setcred , Cm establish_cred
+Call
+.Xr pam_setcred 3
+with the
+.Dv PAM_ESTABLISH_CRED
+flag set.
+.It Cm open_session , Cm open
+Call
+.Xr pam_open_session 3 .
+.It Cm close_session , Cm close
+Call
+.Xr pam_close_session 3 .
+.It Cm unsetcred , Cm delete_cred
+Call
+.Xr pam_setcred 3
+with the
+.Dv PAM_DELETE_CRED
+flag set.
+.It Cm listenv , Cm env
+Call
+.Xr pam_getenvlist 3
+and print the contents of the list it returns.
+.El
+.Pp
+The following options are available:
+.Bl -tag -width Fl
+.It Fl d
+Enables debug messages within the OpenPAM library.
+See
+.Xr openpam_log 3
+for details.
+.It Fl H Ar rhost
+Specify the name of the fictitious remote host.
+The default is to use the name of the local host.
+.It Fl h Ar host
+Specify the name of the local host.
+The default is to use the result of calling
+.Xr gethostname 3 .
+.It Fl k
+Keep going even if one of the commands fails.
+.It Fl s
+Set the
+.Dv PAM_SILENT
+flag when calling the
+.Xr pam_authenticate 3 ,
+.Xr pam_acct_mgmt 3 ,
+.Xr pam_chauthok 3 ,
+.Xr pam_setcred 3 ,
+.Xr pam_open_session 3
+and
+.Xr pam_close_session 3
+primitives.
+.It Fl t Ar tty
+Specify the name of the tty.
+The default is to use the result of calling
+.Xr ttyname 3 .
+.It Fl U Ar ruser
+Specify the name of the supplicant (remote user).
+.It Fl u Ar user
+Specify the name of the principal (local user).
+.It Fl v
+Enables debug messages from
+.Nm
+itself.
+.El
+.Sh EXAMPLES
+Simulate a typical PAM transaction using the
+.Dq system
+policy:
+.Bd -literal -offset indent
+pamtest -v system auth account change setcred open close unsetcred
+.Ed
+.Sh SEE ALSO
+.Xr openpam 3
+.Xr pam 3
+.Xr pam.conf 5
+.Sh AUTHORS
+The
+.Nm
+utility and this manual page were written by
+.An Dag-Erling Sm\(/orgrav Aq des@FreeBSD.org .
+.Sh BUGS
+The
+.Nm
+utility does not (yet) support setting and getting individual PAM
+items or environment variables.
+.Pp
+The
+.Nm
+utility does not afford the user complete control over the flags
+passed to the
+.Xr pam_authenticate 3 ,
+.Xr pam_acct_mgmt 3 ,
+.Xr pam_chauthok 3 ,
+.Xr pam_setcred 3 ,
+.Xr pam_open_session 3
+and
+.Xr pam_close_session 3
+primitives.
diff --git a/contrib/openpam/bin/pamtest/pamtest.c b/contrib/openpam/bin/pamtest/pamtest.c
new file mode 100644
index 0000000..0addfad
--- /dev/null
+++ b/contrib/openpam/bin/pamtest/pamtest.c
@@ -0,0 +1,420 @@
+/*-
+ * Copyright (c) 2011 Dag-Erling Smørgrav
+ * 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
+ * in this position and unchanged.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $Id: pamtest.c 472 2011-11-03 09:46:52Z des $
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <err.h>
+#include <pwd.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include <security/pam_appl.h>
+#include <security/openpam.h> /* for openpam_ttyconv() */
+
+/* OpenPAM internals */
+extern const char *pam_item_name[PAM_NUM_ITEMS];
+extern int openpam_debug;
+
+static pam_handle_t *pamh;
+static struct pam_conv pamc;
+
+static int silent;
+static int verbose;
+
+static void pt_verbose(const char *, ...)
+ OPENPAM_FORMAT ((__printf__, 1, 2));
+static void pt_error(int, const char *, ...)
+ OPENPAM_FORMAT ((__printf__, 2, 3));
+
+/*
+ * Print an information message if -v was specified at least once
+ */
+static void
+pt_verbose(const char *fmt, ...)
+{
+ va_list ap;
+
+ if (verbose) {
+ va_start(ap, fmt);
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+ fprintf(stderr, "\n");
+ }
+}
+
+/*
+ * Print an error message
+ */
+static void
+pt_error(int e, const char *fmt, ...)
+{
+ va_list ap;
+
+ if (e == PAM_SUCCESS && !verbose)
+ return;
+ va_start(ap, fmt);
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+ fprintf(stderr, ": %s\n", pam_strerror(NULL, e));
+}
+
+/*
+ * Wrapper for pam_start(3)
+ */
+static int
+pt_start(const char *service, const char *user)
+{
+ int pame;
+
+ pamc.conv = &openpam_ttyconv;
+ pt_verbose("pam_start(%s, %s)", service, user);
+ if ((pame = pam_start(service, user, &pamc, &pamh)) != PAM_SUCCESS)
+ pt_error(pame, "pam_start(%s)", service);
+ return (pame);
+}
+
+/*
+ * Wrapper for pam_authenticate(3)
+ */
+static int
+pt_authenticate(int flags)
+{
+ int pame;
+
+ flags |= silent;
+ if ((pame = pam_authenticate(pamh, flags)) != PAM_SUCCESS)
+ pt_error(pame, "pam_authenticate()");
+ return (pame);
+}
+
+/*
+ * Wrapper for pam_acct_mgmt(3)
+ */
+static int
+pt_acct_mgmt(int flags)
+{
+ int pame;
+
+ flags |= silent;
+ if ((pame = pam_acct_mgmt(pamh, flags)) != PAM_SUCCESS)
+ pt_error(pame, "pam_acct_mgmt()");
+ return (pame);
+}
+
+/*
+ * Wrapper for pam_chauthtok(3)
+ */
+static int
+pt_chauthtok(int flags)
+{
+ int pame;
+
+ flags |= silent;
+ if ((pame = pam_chauthtok(pamh, flags)) != PAM_SUCCESS)
+ pt_error(pame, "pam_chauthtok()");
+ return (pame);
+}
+
+/*
+ * Wrapper for pam_setcred(3)
+ */
+static int
+pt_setcred(int flags)
+{
+ int pame;
+
+ flags |= silent;
+ if ((pame = pam_setcred(pamh, flags)) != PAM_SUCCESS)
+ pt_error(pame, "pam_setcred()");
+ return (pame);
+}
+
+/*
+ * Wrapper for pam_open_session(3)
+ */
+static int
+pt_open_session(int flags)
+{
+ int pame;
+
+ flags |= silent;
+ if ((pame = pam_open_session(pamh, flags)) != PAM_SUCCESS)
+ pt_error(pame, "pam_open_session()");
+ return (pame);
+}
+
+/*
+ * Wrapper for pam_close_session(3)
+ */
+static int
+pt_close_session(int flags)
+{
+ int pame;
+
+ flags |= silent;
+ if ((pame = pam_close_session(pamh, flags)) != PAM_SUCCESS)
+ pt_error(pame, "pam_close_session()");
+ return (pame);
+}
+
+/*
+ * Wrapper for pam_set_item(3)
+ */
+static int
+pt_set_item(int item, const char *p)
+{
+ int pame;
+
+ switch (item) {
+ case PAM_SERVICE:
+ case PAM_USER:
+ case PAM_AUTHTOK:
+ case PAM_OLDAUTHTOK:
+ case PAM_TTY:
+ case PAM_RHOST:
+ case PAM_RUSER:
+ case PAM_USER_PROMPT:
+ case PAM_AUTHTOK_PROMPT:
+ case PAM_OLDAUTHTOK_PROMPT:
+ case PAM_HOST:
+ pt_verbose("setting %s to %s", pam_item_name[item], p);
+ break;
+ default:
+ pt_verbose("setting %s", pam_item_name[item]);
+ break;
+ }
+ if ((pame = pam_set_item(pamh, item, p)) != PAM_SUCCESS)
+ pt_error(pame, "pam_set_item(%s)", pam_item_name[item]);
+ return (pame);
+}
+
+/*
+ * Wrapper for pam_end(3)
+ */
+static int
+pt_end(int pame)
+{
+
+ if (pamh != NULL && (pame = pam_end(pamh, pame)) != PAM_SUCCESS)
+ /* can't happen */
+ pt_error(pame, "pam_end()");
+ return (pame);
+}
+
+/*
+ * Retrieve and list the PAM environment variables
+ */
+static int
+pt_listenv(void)
+{
+ char **pam_envlist, **pam_env;
+
+ if ((pam_envlist = pam_getenvlist(pamh)) == NULL ||
+ *pam_envlist == NULL) {
+ pt_verbose("no environment variables.");
+ } else {
+ pt_verbose("environment variables:");
+ for (pam_env = pam_envlist; *pam_env != NULL; ++pam_env) {
+ printf(" %s\n", *pam_env);
+ free(*pam_env);
+ }
+ }
+ free(pam_envlist);
+ return (PAM_SUCCESS);
+}
+
+/*
+ * Print usage string and exit
+ */
+static void
+usage(void)
+{
+
+ fprintf(stderr, "usage: pamtest [-dksv] %s\n",
+ "[-H rhost] [-h host] [-t tty] [-U ruser] [-u user] service");
+ exit(1);
+}
+
+/*
+ * Handle an option that takes a string argument and can be used only once
+ */
+static void
+opt_str_once(int opt, const char **p, const char *arg)
+{
+
+ if (*p != NULL) {
+ fprintf(stderr, "The -%c option can only be used once\n", opt);
+ usage();
+ }
+ *p = arg;
+}
+
+/*
+ * Entry point
+ */
+int
+main(int argc, char *argv[])
+{
+ char hostname[1024];
+ const char *rhost = NULL;
+ const char *host = NULL;
+ const char *ruser = NULL;
+ const char *user = NULL;
+ const char *service = NULL;
+ const char *tty = NULL;
+ int keepatit = 0;
+ int pame;
+ int opt;
+
+ while ((opt = getopt(argc, argv, "dH:h:kst:U:u:v")) != -1)
+ switch (opt) {
+ case 'd':
+ openpam_debug++;
+ break;
+ case 'H':
+ opt_str_once(opt, &rhost, optarg);
+ break;
+ case 'h':
+ opt_str_once(opt, &host, optarg);
+ break;
+ case 'k':
+ keepatit = 1;
+ break;
+ case 's':
+ silent = PAM_SILENT;
+ break;
+ case 't':
+ opt_str_once(opt, &tty, optarg);
+ break;
+ case 'U':
+ opt_str_once(opt, &ruser, optarg);
+ break;
+ case 'u':
+ opt_str_once(opt, &user, optarg);
+ break;
+ case 'v':
+ verbose++;
+ break;
+ default:
+ usage();
+ }
+
+ argc -= optind;
+ argv += optind;
+
+ if (argc < 1)
+ usage();
+
+ service = *argv;
+ --argc;
+ ++argv;
+
+ /* defaults */
+ if (rhost == NULL) {
+ if (gethostname(hostname, sizeof(hostname)) == -1)
+ err(1, "gethostname()");
+ rhost = hostname;
+ }
+ if (tty == NULL)
+ tty = ttyname(STDERR_FILENO);
+ if (user == NULL)
+ user = getlogin();
+ if (ruser == NULL)
+ ruser = user;
+
+ /* initialize PAM */
+ if ((pame = pt_start(service, user)) != PAM_SUCCESS)
+ goto end;
+
+ /*
+ * pam_start(3) sets this to the machine's hostname, but we allow
+ * the user to override it.
+ */
+ if (host != NULL)
+ if ((pame = pt_set_item(PAM_HOST, host)) != PAM_SUCCESS)
+ goto end;
+
+ /*
+ * The remote host / user / tty are usually set by the
+ * application.
+ */
+ if ((pame = pt_set_item(PAM_RHOST, rhost)) != PAM_SUCCESS ||
+ (pame = pt_set_item(PAM_RUSER, ruser)) != PAM_SUCCESS ||
+ (pame = pt_set_item(PAM_TTY, tty)) != PAM_SUCCESS)
+ goto end;
+
+ while (argc > 0) {
+ if (strcmp(*argv, "listenv") == 0 ||
+ strcmp(*argv, "env") == 0) {
+ pame = pt_listenv();
+ } else if (strcmp(*argv, "authenticate") == 0 ||
+ strcmp(*argv, "auth") == 0) {
+ pame = pt_authenticate(0);
+ } else if (strcmp(*argv, "acct_mgmt") == 0 ||
+ strcmp(*argv, "account") == 0) {
+ pame = pt_acct_mgmt(0);
+ } else if (strcmp(*argv, "chauthtok") == 0 ||
+ strcmp(*argv, "change") == 0) {
+ pame = pt_chauthtok(PAM_CHANGE_EXPIRED_AUTHTOK);
+ } else if (strcmp(*argv, "forcechauthtok") == 0 ||
+ strcmp(*argv, "forcechange") == 0) {
+ pame = pt_chauthtok(0);
+ } else if (strcmp(*argv, "setcred") == 0 ||
+ strcmp(*argv, "establish_cred") == 0) {
+ pame = pt_setcred(PAM_ESTABLISH_CRED);
+ } else if (strcmp(*argv, "open_session") == 0 ||
+ strcmp(*argv, "open") == 0) {
+ pame = pt_open_session(0);
+ } else if (strcmp(*argv, "close_session") == 0 ||
+ strcmp(*argv, "close") == 0) {
+ pame = pt_close_session(0);
+ } else if (strcmp(*argv, "unsetcred") == 0 ||
+ strcmp(*argv, "delete_cred") == 0) {
+ pame = pt_setcred(PAM_DELETE_CRED);
+ } else {
+ warnx("unknown primitive: %s", *argv);
+ pame = PAM_SYSTEM_ERR;
+ }
+ if (pame != PAM_SUCCESS && !keepatit) {
+ warnx("test aborted");
+ break;
+ }
+ --argc;
+ ++argv;
+ }
+
+end:
+ (void)pt_end(pame);
+ exit(pame == PAM_SUCCESS ? 0 : 1);
+}
diff --git a/contrib/openpam/bin/su/Makefile.am b/contrib/openpam/bin/su/Makefile.am
index 30902a2..50f0cb9 100644
--- a/contrib/openpam/bin/su/Makefile.am
+++ b/contrib/openpam/bin/su/Makefile.am
@@ -1,7 +1,9 @@
-# $Id: Makefile.am 386 2006-04-12 10:26:27Z des $
+# $Id: Makefile.am 458 2011-11-02 13:10:25Z des $
INCLUDES = -I$(top_srcdir)/include
bin_PROGRAMS = su
su_SOURCES = su.c
su_LDADD = $(top_builddir)/lib/libpam.la
+
+dist_man1_MANS = su.1
diff --git a/contrib/openpam/bin/su/Makefile.in b/contrib/openpam/bin/su/Makefile.in
index 1d46a19..700d6ca 100644
--- a/contrib/openpam/bin/su/Makefile.in
+++ b/contrib/openpam/bin/su/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -14,17 +15,14 @@
@SET_MAKE@
-# $Id: Makefile.am 386 2006-04-12 10:26:27Z des $
+# $Id: Makefile.am 458 2011-11-02 13:10:25Z des $
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -38,10 +36,10 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-target_triplet = @target@
bin_PROGRAMS = su$(EXEEXT)
subdir = bin/su
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = $(dist_man1_MANS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -49,31 +47,55 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)"
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
PROGRAMS = $(bin_PROGRAMS)
am_su_OBJECTS = su.$(OBJEXT)
su_OBJECTS = $(am_su_OBJECTS)
su_DEPENDENCIES = $(top_builddir)/lib/libpam.la
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
+am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
SOURCES = $(su_SOURCES)
DIST_SOURCES = $(su_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+man1dir = $(mandir)/man1
+NROFF = nroff
+MANS = $(dist_man1_MANS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -86,42 +108,50 @@ CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CRYPT_LIBS = @CRYPT_LIBS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
DL_LIBS = @DL_LIBS@
-ECHO = @ECHO@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
GREP = @GREP@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIB_MAJ = @LIB_MAJ@
+LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPENPAM_MODULES_DIR = @OPENPAM_MODULES_DIR@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
@@ -130,19 +160,13 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
-WITH_DOC_FALSE = @WITH_DOC_FALSE@
-WITH_DOC_TRUE = @WITH_DOC_TRUE@
-WITH_PAM_UNIX_FALSE = @WITH_PAM_UNIX_FALSE@
-WITH_PAM_UNIX_TRUE = @WITH_PAM_UNIX_TRUE@
-WITH_SU_FALSE = @WITH_SU_FALSE@
-WITH_SU_TRUE = @WITH_SU_TRUE@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -154,6 +178,7 @@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
@@ -181,15 +206,16 @@ program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
-target = @target@
target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
INCLUDES = -I$(top_srcdir)/include
su_SOURCES = su.c
su_LDADD = $(top_builddir)/lib/libpam.la
+dist_man1_MANS = su.1
all: all-am
.SUFFIXES:
@@ -198,14 +224,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign bin/su/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign bin/su/Makefile
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign bin/su/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign bin/su/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -223,37 +249,53 @@ $(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
- test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
- @list='$(bin_PROGRAMS)'; for p in $$list; do \
- p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
- if test -f $$p \
- || test -f $$p1 \
- ; then \
- f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
- echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
- $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
- else :; fi; \
- done
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p || test -f $$p1; \
+ then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
- @list='$(bin_PROGRAMS)'; for p in $$list; do \
- f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
- echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
- rm -f "$(DESTDIR)$(bindir)/$$f"; \
- done
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
clean-binPROGRAMS:
- @list='$(bin_PROGRAMS)'; for p in $$list; do \
- f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f $$p $$f"; \
- rm -f $$p $$f ; \
- done
+ @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
su$(EXEEXT): $(su_OBJECTS) $(su_DEPENDENCIES)
@rm -f su$(EXEEXT)
- $(LINK) $(su_LDFLAGS) $(su_OBJECTS) $(su_LDADD) $(LIBS)
+ $(LINK) $(su_OBJECTS) $(su_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -264,22 +306,22 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su.Po@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@ -289,92 +331,142 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
+install-man1: $(dist_man1_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
+ @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man1:
+ @$(NORMAL_UNINSTALL)
+ @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
+ set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
+ $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @list='$(MANS)'; if test -n "$$list"; then \
+ list=`for p in $$list; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+ if test -n "$$list" && \
+ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
+ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+ echo " typically \`make maintainer-clean' will remove them" >&2; \
+ exit 1; \
+ else :; fi; \
+ else :; fi
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
-all-am: Makefile $(PROGRAMS)
+all-am: Makefile $(PROGRAMS) $(MANS)
installdirs:
- for dir in "$(DESTDIR)$(bindir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
@@ -396,6 +488,7 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -408,7 +501,7 @@ distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
- distclean-libtool distclean-tags
+ distclean-tags
dvi: dvi-am
@@ -416,17 +509,37 @@ dvi-am:
html: html-am
+html-am:
+
info: info-am
info-am:
-install-data-am:
+install-data-am: install-man
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
install-exec-am: install-binPROGRAMS
+install-html: install-html-am
+
+install-html-am:
+
install-info: install-info-am
-install-man:
+install-info-am:
+
+install-man: install-man1
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
installcheck-am:
@@ -448,19 +561,27 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-binPROGRAMS uninstall-info-am
+uninstall-am: uninstall-binPROGRAMS uninstall-man
+
+uninstall-man: uninstall-man1
+
+.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
clean-generic clean-libtool ctags distclean distclean-compile \
distclean-generic distclean-libtool distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
- install-binPROGRAMS install-data install-data-am install-exec \
- install-exec-am install-info install-info-am install-man \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am tags uninstall uninstall-am \
- uninstall-binPROGRAMS uninstall-info-am
+ install-binPROGRAMS install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-man1 install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am uninstall-binPROGRAMS uninstall-man \
+ uninstall-man1
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/contrib/openpam/bin/su/su.1 b/contrib/openpam/bin/su/su.1
new file mode 100644
index 0000000..9a67ea3
--- /dev/null
+++ b/contrib/openpam/bin/su/su.1
@@ -0,0 +1,62 @@
+.\"-
+.\" Copyright (c) 2011 Dag-Erling Smørgrav
+.\" 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.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+.\"
+.\" $Id: su.1 458 2011-11-02 13:10:25Z des $
+.\"
+.Dd November 2, 2011
+.Dt SU 1
+.Os
+.Sh NAME
+.Nm su
+.Nd switch user identity
+.Sh SYNOPSYS
+.Nm
+.Op Ar login Op Ar ...
+.Sh DESCRIPTION
+The
+.Nm
+utility starts a shell under the identity of the user specified by the
+first argument on the command line.
+If no user is specified, the default is
+.Dq root .
+.Pp
+Any additional command-line arguments are passed as-is to the shell.
+.Pp
+The requesting user is authenticated using the
+.Dq su
+PAM policy.
+.Sh IMPLEMENTATION NOTES
+The
+.Nm
+utility is provided with the OpenPAM library as a sample application
+and should not be used in production systems.
+.Sh SEE ALSO
+.Xr openpam 3
+.Xr pam 3
+.Sh AUTHORS
+The
+.Nm
+utility and this manual page were written by
+.An Dag-Erling Sm\(/orgrav Aq des@FreeBSD.org .
diff --git a/contrib/openpam/bin/su/su.c b/contrib/openpam/bin/su/su.c
index 4c7d0eb..d87309e 100644
--- a/contrib/openpam/bin/su/su.c
+++ b/contrib/openpam/bin/su/su.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: su.c 408 2007-12-21 11:36:24Z des $
+ * $Id: su.c 458 2011-11-02 13:10:25Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <sys/param.h>
#include <sys/wait.h>
@@ -59,7 +63,7 @@ static void
usage(void)
{
- fprintf(stderr, "Usage: su [login [args]]\n");
+ fprintf(stderr, "usage: su [login [args]]\n");
exit(1);
}
@@ -74,9 +78,8 @@ main(int argc, char *argv[])
int o, pam_err, status;
pid_t pid;
- while ((o = getopt(argc, argv, "h")) != -1)
+ while ((o = getopt(argc, argv, "")) != -1)
switch (o) {
- case 'h':
default:
usage();
}
diff --git a/contrib/openpam/config.h.in b/contrib/openpam/config.h.in
index 046e10f..3d16ce8 100644
--- a/contrib/openpam/config.h.in
+++ b/contrib/openpam/config.h.in
@@ -15,6 +15,12 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the `crypt' library (-lcrypt). */
+#undef HAVE_LIBCRYPT
+
+/* Define to 1 if you have the `dl' library (-ldl). */
+#undef HAVE_LIBDL
+
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
@@ -30,6 +36,12 @@
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
+/* Define to 1 if you have the `strlcmp' function. */
+#undef HAVE_STRLCMP
+
+/* Define to 1 if you have the `strlcpy' function. */
+#undef HAVE_STRLCPY
+
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
@@ -42,6 +54,10 @@
/* OpenPAM library major number */
#undef LIB_MAJ
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#undef LT_OBJDIR
+
/* Turn debugging on by default */
#undef OPENPAM_DEBUG
@@ -63,15 +79,67 @@
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
+/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+
+
/* Version number of package */
#undef VERSION
+/* Define to 1 if on MINIX. */
+#undef _MINIX
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+ this defined. */
+#undef _POSIX_1_SOURCE
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+#undef _POSIX_SOURCE
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define to the equivalent of the C99 'restrict' keyword, or to
+ nothing if this is not supported. Do not define if restrict is
+ supported directly. */
+#undef restrict
+/* Work around a bug in Sun C++: it does not support _Restrict or
+ __restrict__, even though the corresponding Sun C compiler ends up with
+ "#define restrict _Restrict" or "#define restrict __restrict__" in the
+ previous line. Perhaps some future version of Sun C++ will work with
+ restrict; if so, hopefully it defines __RESTRICT like Sun C does. */
+#if defined __SUNPRO_CC && !defined __RESTRICT
+# define _Restrict
+# define __restrict__
+#endif
+
/* Define to empty if the keyword `volatile' does not work. Warning: valid
code using `volatile' can become incorrect without. Disable with care. */
#undef volatile
diff --git a/contrib/openpam/configure b/contrib/openpam/configure
index 85132d3..fe13a93 100755
--- a/contrib/openpam/configure
+++ b/contrib/openpam/configure
@@ -1,63 +1,86 @@
#! /bin/sh
-# From configure.ac Id: configure.ac 411 2007-12-21 11:44:14Z des .
+# From configure.ac Id: configure.ac 507 2011-12-18 14:43:40Z des .
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for OpenPAM 20071221.
+# Generated by GNU Autoconf 2.68 for OpenPAM 20111218.
#
# Report bugs to <des@des.no>.
#
+#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
+#
+#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
esac
-
fi
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
fi
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
fi
@@ -66,20 +89,19 @@ fi
# there to prevent editors from complaining about space-tab.
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
# splitting by setting IFS to empty value.)
-as_nl='
-'
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
-case $0 in
+as_myself=
+case $0 in #((
*[\\/]* ) as_myself=$0 ;;
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
IFS=$as_save_IFS
;;
@@ -90,354 +112,336 @@ if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
- echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- { (exit 1); exit 1; }
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
fi
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
done
PS1='$ '
PS2='> '
PS4='+ '
# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
# CDPATH.
-$as_unset CDPATH
-
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
if test "x$CONFIG_SHELL" = x; then
- if (eval ":") 2>/dev/null; then
- as_have_required=yes
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
else
- as_have_required=no
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
fi
-
- if test $as_have_required = yes && (eval ":
-(as_func_return () {
- (exit \$1)
-}
-as_func_success () {
- as_func_return 0
-}
-as_func_failure () {
- as_func_return 1
-}
-as_func_ret_success () {
- return 0
-}
-as_func_ret_failure () {
- return 1
-}
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
exitcode=0
-if as_func_success; then
- :
-else
- exitcode=1
- echo as_func_success failed.
-fi
-
-if as_func_failure; then
- exitcode=1
- echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
- :
-else
- exitcode=1
- echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
- exitcode=1
- echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
- :
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1
+
+ test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
+ ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
+ ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
+ PATH=/empty FPATH=/empty; export PATH FPATH
+ test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
+ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
else
- exitcode=1
- echo positional parameters were not saved.
+ as_have_required=no
fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
-test \$exitcode = 0) || { (exit 1); exit 1; }
-
-(
- as_lineno_1=\$LINENO
- as_lineno_2=\$LINENO
- test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
- test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
-") 2> /dev/null; then
- :
else
- as_candidate_shells=
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- case $as_dir in
+ as_found=:
+ case $as_dir in #(
/*)
for as_base in sh bash ksh sh5; do
- as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
done;;
esac
+ as_found=false
done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
IFS=$as_save_IFS
- for as_shell in $as_candidate_shells $SHELL; do
- # Try only shells that exist, to save several forks.
- if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
- { ("$as_shell") 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
+ if test "x$CONFIG_SHELL" != x; then :
+ # We cannot yet assume a decent shell, so we have to provide a
+ # neutralization value for shells without unset; and this also
+ # works around shells that cannot unset nonexistent variables.
+ # Preserve -v and -x to the replacement shell.
+ BASH_ENV=/dev/null
+ ENV=/dev/null
+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+ export CONFIG_SHELL
+ case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+ esac
+ exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
fi
-
-:
-_ASEOF
-}; then
- CONFIG_SHELL=$as_shell
- as_have_required=yes
- if { "$as_shell" 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf@gnu.org and des@des.no about
+$0: your system, including any error possibly output before
+$0: this message. Then install a modern shell, or manually
+$0: run the script under such a shell if you do have one."
+ fi
+ exit 1
fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
-
-:
-(as_func_return () {
- (exit $1)
-}
-as_func_success () {
- as_func_return 0
-}
-as_func_failure () {
- as_func_return 1
-}
-as_func_ret_success () {
- return 0
-}
-as_func_ret_failure () {
- return 1
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
}
+as_unset=as_fn_unset
-exitcode=0
-if as_func_success; then
- :
-else
- exitcode=1
- echo as_func_success failed.
-fi
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
-if as_func_failure; then
- exitcode=1
- echo as_func_failure succeeded.
-fi
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
-if as_func_ret_success; then
- :
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
else
- exitcode=1
- echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
- exitcode=1
- echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = "$1" ); then
- :
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
else
- exitcode=1
- echo positional parameters were not saved.
-fi
-
-test $exitcode = 0) || { (exit 1); exit 1; }
-
-(
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
-
-_ASEOF
-}; then
- break
-fi
-
-fi
-
- done
-
- if test "x$CONFIG_SHELL" != x; then
- for as_var in BASH_ENV ENV
- do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
- done
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
-fi
-
-
- if test $as_have_required = no; then
- echo This script requires a shell more modern than all the
- echo shells that I found on your system. Please install a
- echo modern shell, or manually run the script under such a
- echo shell if you do have one.
- { (exit 1); exit 1; }
-fi
-
-
-fi
-
-fi
-
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
-(eval "as_func_return () {
- (exit \$1)
-}
-as_func_success () {
- as_func_return 0
-}
-as_func_failure () {
- as_func_return 1
-}
-as_func_ret_success () {
- return 0
-}
-as_func_ret_failure () {
- return 1
-}
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
-exitcode=0
-if as_func_success; then
- :
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
else
- exitcode=1
- echo as_func_success failed.
-fi
-
-if as_func_failure; then
- exitcode=1
- echo as_func_failure succeeded.
+ as_expr=false
fi
-if as_func_ret_success; then
- :
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
else
- exitcode=1
- echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
- exitcode=1
- echo as_func_ret_failure succeeded.
+ as_basename=false
fi
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
- :
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
else
- exitcode=1
- echo positional parameters were not saved.
+ as_dirname=false
fi
-test \$exitcode = 0") || {
- echo No shell found that supports shell functions.
- echo Please tell autoconf@gnu.org about your system,
- echo including any error possibly output before this
- echo message
-}
-
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line after each line using $LINENO; the second 'sed'
- # does the real work. The second script uses 'N' to pair each
- # line-number line with the line containing $LINENO, and appends
- # trailing '-' during substitution so that $LINENO is not a special
- # case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # scripts with optimization help from Paolo Bonzini. Blame Lee
- # E. McMahon (1931-1989) for sed's syntax. :-)
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
sed -n '
p
/[$]LINENO/=
@@ -454,8 +458,7 @@ test \$exitcode = 0") || {
s/-\n.*//
' >$as_me.lineno &&
chmod +x "$as_me.lineno" ||
- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); exit 1; }; }
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
@@ -465,49 +468,40 @@ test \$exitcode = 0") || {
exit
}
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-
ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
+case `echo -n x` in #(((((
-n*)
- case `echo 'x\c'` in
+ case `echo 'xy\c'` in
*c*) ECHO_T=' ';; # ECHO_T is single tab character.
- *) ECHO_C='\c';;
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
esac;;
*)
ECHO_N='-n';;
esac
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
else
rm -f conf$$.dir
- mkdir conf$$.dir
-fi
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
+ fi
else
as_ln_s='cp -p'
fi
@@ -515,7 +509,7 @@ rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
+ as_mkdir_p='mkdir -p "$as_dir"'
else
test -d ./-p && rmdir ./-p
as_mkdir_p=false
@@ -532,12 +526,12 @@ else
as_test_x='
eval sh -c '\''
if test -d "$1"; then
- test -d "$1/.";
+ test -d "$1/.";
else
- case $1 in
- -*)set "./$1";;
+ case $1 in #(
+ -*)set "./$1";;
esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
???[sx]*):;;*)false;;esac;fi
'\'' sh
'
@@ -550,166 +544,14 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
# Sed expression to map a string onto a valid variable name.
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-
-# Check that we are running under the correct shell.
SHELL=${CONFIG_SHELL-/bin/sh}
-case X$ECHO in
-X*--fallback-echo)
- # Remove one level of quotation (which was required for Make).
- ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
- ;;
-esac
-
-echo=${ECHO-echo}
-if test "X$1" = X--no-reexec; then
- # Discard the --no-reexec flag, and continue.
- shift
-elif test "X$1" = X--fallback-echo; then
- # Avoid inline document here, it may be left over
- :
-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
- # Yippee, $echo works!
- :
-else
- # Restart under the correct shell.
- exec $SHELL "$0" --no-reexec ${1+"$@"}
-fi
-
-if test "X$1" = X--fallback-echo; then
- # used as fallback echo
- shift
- cat <<EOF
-$*
-EOF
- exit 0
-fi
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test -z "$ECHO"; then
-if test "X${echo_test_string+set}" != Xset; then
-# find a string as large as possible, as long as the shell can cope with it
- for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
- # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
- if (echo_test_string=`eval $cmd`) 2>/dev/null &&
- echo_test_string=`eval $cmd` &&
- (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
- then
- break
- fi
- done
-fi
-
-if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- :
-else
- # The Solaris, AIX, and Digital Unix default echo programs unquote
- # backslashes. This makes it impossible to quote backslashes using
- # echo "$something" | sed 's/\\/\\\\/g'
- #
- # So, first we look for a working echo in the user's PATH.
-
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for dir in $PATH /usr/ucb; do
- IFS="$lt_save_ifs"
- if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
- test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- echo="$dir/echo"
- break
- fi
- done
- IFS="$lt_save_ifs"
-
- if test "X$echo" = Xecho; then
- # We didn't find a better echo, so look for alternatives.
- if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- # This shell has a builtin print -r that does the trick.
- echo='print -r'
- elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
- test "X$CONFIG_SHELL" != X/bin/ksh; then
- # If we have ksh, try running configure again with it.
- ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
- export ORIGINAL_CONFIG_SHELL
- CONFIG_SHELL=/bin/ksh
- export CONFIG_SHELL
- exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
- else
- # Try using printf.
- echo='printf %s\n'
- if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- # Cool, printf works
- :
- elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
- test "X$echo_testing_string" = 'X\t' &&
- echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
- export CONFIG_SHELL
- SHELL="$CONFIG_SHELL"
- export SHELL
- echo="$CONFIG_SHELL $0 --fallback-echo"
- elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
- test "X$echo_testing_string" = 'X\t' &&
- echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- echo="$CONFIG_SHELL $0 --fallback-echo"
- else
- # maybe with a smaller string...
- prev=:
-
- for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
- if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
- then
- break
- fi
- prev="$cmd"
- done
-
- if test "$prev" != 'sed 50q "$0"'; then
- echo_test_string=`eval $prev`
- export echo_test_string
- exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
- else
- # Oops. We lost completely, so just stick with echo.
- echo=echo
- fi
- fi
- fi
- fi
-fi
-fi
-
-# Copy echo and quote the copy suitably for passing to libtool from
-# the Makefile, instead of quoting the original, which is used later.
-ECHO=$echo
-if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
- ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
-fi
-
-
-
-tagnames=${tagnames+${tagnames},}CXX
-
-tagnames=${tagnames+${tagnames},}F77
-
-exec 7<&0 </dev/null 6>&1
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
@@ -724,14 +566,14 @@ cross_compiling=no
subdirs=
MFLAGS=
MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='OpenPAM'
PACKAGE_TARNAME='openpam'
-PACKAGE_VERSION='20071221'
-PACKAGE_STRING='OpenPAM 20071221'
+PACKAGE_VERSION='20111218'
+PACKAGE_STRING='OpenPAM 20111218'
PACKAGE_BUGREPORT='des@des.no'
+PACKAGE_URL=''
ac_unique_file="lib/pam_start.c"
# Factoring default headers for most tests.
@@ -770,124 +612,151 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL
-PATH_SEPARATOR
-PACKAGE_NAME
-PACKAGE_TARNAME
-PACKAGE_VERSION
-PACKAGE_STRING
-PACKAGE_BUGREPORT
-exec_prefix
-prefix
-program_transform_name
-bindir
-sbindir
-libexecdir
-datarootdir
-datadir
-sysconfdir
-sharedstatedir
-localstatedir
-includedir
-oldincludedir
-docdir
-infodir
-htmldir
-dvidir
-pdfdir
-psdir
-libdir
-localedir
-mandir
-DEFS
-ECHO_C
-ECHO_N
-ECHO_T
-LIBS
-build_alias
-host_alias
-target_alias
-build
-build_cpu
-build_vendor
-build_os
-host
-host_cpu
-host_vendor
-host_os
-target
-target_cpu
-target_vendor
-target_os
-CC
-CFLAGS
-LDFLAGS
-CPPFLAGS
-ac_ct_CC
-EXEEXT
-OBJEXT
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+LIBOBJS
+CRYPT_LIBS
+DL_LIBS
+WITH_SU_FALSE
+WITH_SU_TRUE
+WITH_PAMTEST_FALSE
+WITH_PAMTEST_TRUE
+WITH_PAM_UNIX_FALSE
+WITH_PAM_UNIX_TRUE
+WITH_DOC_FALSE
+WITH_DOC_TRUE
+OPENPAM_MODULES_DIR
+LIB_MAJ
+OTOOL64
+OTOOL
+LIPO
+NMEDIT
+DSYMUTIL
+MANIFEST_TOOL
+RANLIB
+ac_ct_AR
+AR
+DLLTOOL
+OBJDUMP
+LN_S
+NM
+ac_ct_DUMPBIN
+DUMPBIN
+LD
+FGREP
SED
-GREP
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+LIBTOOL
EGREP
-LN_S
-ECHO
-AR
-RANLIB
-STRIP
+GREP
CPP
-CXX
-CXXFLAGS
-ac_ct_CXX
-CXXCPP
-F77
-FFLAGS
-ac_ct_F77
-LIBTOOL
-INSTALL_PROGRAM
-INSTALL_SCRIPT
-INSTALL_DATA
-CYGPATH_W
-PACKAGE
-VERSION
-ACLOCAL
-AUTOCONF
-AUTOMAKE
-AUTOHEADER
-MAKEINFO
-install_sh
-INSTALL_STRIP_PROGRAM
-mkdir_p
-AWK
-SET_MAKE
-am__leading_dot
-AMTAR
-am__tar
-am__untar
-DEPDIR
-am__include
-am__quote
-AMDEP_TRUE
-AMDEP_FALSE
-AMDEPBACKSLASH
-CCDEPMODE
-am__fastdepCC_TRUE
am__fastdepCC_FALSE
-CXXDEPMODE
-am__fastdepCXX_TRUE
-am__fastdepCXX_FALSE
-LIB_MAJ
-OPENPAM_MODULES_DIR
-WITH_DOC_TRUE
-WITH_DOC_FALSE
-WITH_PAM_UNIX_TRUE
-WITH_PAM_UNIX_FALSE
-WITH_SU_TRUE
-WITH_SU_FALSE
-DL_LIBS
-CRYPT_LIBS
-LIBOBJS
-LTLIBOBJS'
+am__fastdepCC_TRUE
+CCDEPMODE
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_dependency_tracking
+enable_static
+enable_shared
+with_pic
+enable_fast_install
+with_gnu_ld
+with_sysroot
+enable_libtool_lock
+enable_debug
+enable_unversioned_modules
+with_modules_dir
+with_doc
+with_pam_unix
+with_pamtest
+with_su
+enable_developer_warnings
+enable_debugging_symbols
+enable_werror
+'
ac_precious_vars='build_alias
host_alias
target_alias
@@ -896,18 +765,14 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP
-CXX
-CXXFLAGS
-CCC
-CXXCPP
-F77
-FFLAGS'
+CPP'
# Initialize some variables set by options.
ac_init_help=
ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
# The variables have the same names as the options, with
# dashes changed to underlines.
cache_file=/dev/null
@@ -963,8 +828,9 @@ do
fi
case $ac_option in
- *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
- *) ac_optarg=yes ;;
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
esac
# Accept the important Cygnus configure options, so we can diagnose typos.
@@ -1006,13 +872,20 @@ do
datarootdir=$ac_optarg ;;
-disable-* | --disable-*)
- ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
- eval enable_$ac_feature=no ;;
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
-docdir | --docdir | --docdi | --doc | --do)
ac_prev=docdir ;;
@@ -1025,13 +898,20 @@ do
dvidir=$ac_optarg ;;
-enable-* | --enable-*)
- ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
- eval enable_$ac_feature=\$ac_optarg ;;
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -1222,22 +1102,36 @@ do
ac_init_version=: ;;
-with-* | --with-*)
- ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
- eval with_$ac_package=\$ac_optarg ;;
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
-without-* | --without-*)
- ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
- eval with_$ac_package=no ;;
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
--x)
# Obsolete; use --with-x.
@@ -1257,26 +1151,26 @@ do
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries=$ac_optarg ;;
- -*) { echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; }
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
;;
*=*)
ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
# Reject names that are not valid shell variable names.
- expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
- { (exit 1); exit 1; }; }
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
eval $ac_envvar=\$ac_optarg
export $ac_envvar ;;
*)
# FIXME: should be removed in autoconf 3.0.
- echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
;;
esac
@@ -1284,23 +1178,36 @@ done
if test -n "$ac_prev"; then
ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- { echo "$as_me: error: missing argument to $ac_option" >&2
- { (exit 1); exit 1; }; }
+ as_fn_error $? "missing argument to $ac_option"
fi
-# Be sure to have absolute directory names.
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
libdir localedir mandir
do
eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
case $ac_val in
[\\/$]* | ?:[\\/]* ) continue;;
NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
esac
- { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; }
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
done
# There might be people who depend on the old broken behavior: `$host'
@@ -1314,8 +1221,8 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used." >&2
+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1330,23 +1237,21 @@ test "$silent" = yes && exec 6>/dev/null
ac_pwd=`pwd` && test -n "$ac_pwd" &&
ac_ls_di=`ls -di .` &&
ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
- { echo "$as_me: error: Working directory cannot be determined" >&2
- { (exit 1); exit 1; }; }
+ as_fn_error $? "working directory cannot be determined"
test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
- { echo "$as_me: error: pwd does not report name of working directory" >&2
- { (exit 1); exit 1; }; }
+ as_fn_error $? "pwd does not report name of working directory"
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
# Try the directory containing this script, then the parent directory.
- ac_confdir=`$as_dirname -- "$0" ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$0" : 'X\(//\)[^/]' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$0" |
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -1373,13 +1278,11 @@ else
fi
if test ! -r "$srcdir/$ac_unique_file"; then
test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
- { (exit 1); exit 1; }; }
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
fi
ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
ac_abs_confdir=`(
- cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
- { (exit 1); exit 1; }; }
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
pwd)`
# When building in place, set srcdir=.
if test "$ac_abs_confdir" = "$ac_pwd"; then
@@ -1405,7 +1308,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures OpenPAM 20071221 to adapt to many kinds of systems.
+\`configure' configures OpenPAM 20111218 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1419,7 +1322,7 @@ Configuration:
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking...' messages
+ -q, --quiet, --silent do not print \`checking ...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for \`--cache-file=config.cache'
-n, --no-create do not create output files
@@ -1427,9 +1330,9 @@ Configuration:
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
+ [$ac_default_prefix]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
+ [PREFIX]
By default, \`make install' will install all the files in
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
@@ -1439,25 +1342,25 @@ for instance \`--prefix=\$HOME'.
For better control, use the options below.
Fine tuning of the installation directories:
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
- --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
- --infodir=DIR info documentation [DATAROOTDIR/info]
- --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
- --mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root [DATAROOTDIR/doc/openpam]
- --htmldir=DIR html documentation [DOCDIR]
- --dvidir=DIR dvi documentation [DOCDIR]
- --pdfdir=DIR pdf documentation [DOCDIR]
- --psdir=DIR ps documentation [DOCDIR]
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/openpam]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
_ACEOF
cat <<\_ACEOF
@@ -1470,26 +1373,26 @@ Program names:
System types:
--build=BUILD configure for building on BUILD [guessed]
--host=HOST cross-compile to build programs to run on HOST [BUILD]
- --target=TARGET configure for building compilers for TARGET [HOST]
_ACEOF
fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of OpenPAM 20071221:";;
+ short | recursive ) echo "Configuration of OpenPAM 20111218:";;
esac
cat <<\_ACEOF
Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
--enable-static[=PKGS] build static libraries [default=no]
--enable-shared[=PKGS] build shared libraries [default=yes]
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
- --disable-dependency-tracking speeds up one-time build
- --enable-dependency-tracking do not reject slow dependency extractors
--enable-debug turn debugging on by default
--disable-unversioned-modules
support loading of unversioned modules
@@ -1502,14 +1405,16 @@ Optional Features:
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-pic try to use only PIC/non-PIC objects [default=use
both]
- --with-tags[=TAGS] include additional configurations [automatic]
+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]
+ --with-sysroot=DIR Search for dependent libraries within DIR
+ (or the compiler's sysroot if not specified).
--with-modules-dir=DIR OpenPAM modules directory
- --with-doc build documentation
- --with-pam-unix compile example version of pam_unix.so
- --with-su compile example version of su(1)
+ --without-doc do not build documentation
+ --with-pam-unix compile sample pam_unix(8) implementation
+ --with-pamtest compile test application
+ --with-su compile sample su(1) implementation
Some influential environment variables:
CC C compiler command
@@ -1517,14 +1422,9 @@ Some influential environment variables:
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
LIBS libraries to pass to the linker, e.g. -l<library>
- CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CPP C preprocessor
- CXX C++ compiler command
- CXXFLAGS C++ compiler flags
- CXXCPP C++ preprocessor
- F77 Fortran 77 compiler command
- FFLAGS Fortran 77 compiler flags
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
@@ -1537,15 +1437,17 @@ fi
if test "$ac_init_help" = "recursive"; then
# If there are subdirs, report their specific --help.
for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d "$ac_dir" || continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
ac_builddir=.
case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
# A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
case $ac_top_builddir_sub in
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -1581,7 +1483,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
echo &&
$SHELL "$ac_srcdir/configure" --help=recursive
else
- echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
fi || ac_status=$?
cd "$ac_pwd" || { ac_status=$?; break; }
done
@@ -1590,22 +1492,377 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-OpenPAM configure 20071221
-generated by GNU Autoconf 2.61
+OpenPAM configure 20111218
+generated by GNU Autoconf 2.68
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
exit
fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if eval \${$3+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_header_compiler=yes
+else
+ ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ ac_header_preproc=yes
+else
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+ yes:no: )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+( $as_echo "## ------------------------- ##
+## Report this to des@des.no ##
+## ------------------------- ##"
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_mongrel
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=$ac_status
+fi
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $2 (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_func
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by OpenPAM $as_me 20071221, which was
-generated by GNU Autoconf 2.61. Invocation command line was
+It was created by OpenPAM $as_me 20111218, which was
+generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -1641,8 +1898,8 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- echo "PATH: $as_dir"
-done
+ $as_echo "PATH: $as_dir"
+ done
IFS=$as_save_IFS
} >&5
@@ -1676,12 +1933,12 @@ do
| -silent | --silent | --silen | --sile | --sil)
continue ;;
*\'*)
- ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
case $ac_pass in
- 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2)
- ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ as_fn_append ac_configure_args1 " '$ac_arg'"
if test $ac_must_keep_next = true; then
ac_must_keep_next=false # Got value, back to normal.
else
@@ -1697,13 +1954,13 @@ do
-* ) ac_must_keep_next=true ;;
esac
fi
- ac_configure_args="$ac_configure_args '$ac_arg'"
+ as_fn_append ac_configure_args " '$ac_arg'"
;;
esac
done
done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
# When interrupted or exit'd, cleanup temporary files, and complete
# config.log. We remove comments because anyway the quotes in there
@@ -1715,11 +1972,9 @@ trap 'exit_status=$?
{
echo
- cat <<\_ASBOX
-## ---------------- ##
+ $as_echo "## ---------------- ##
## Cache variables. ##
-## ---------------- ##
-_ASBOX
+## ---------------- ##"
echo
# The following way of writing the cache mishandles newlines in values,
(
@@ -1728,12 +1983,13 @@ _ASBOX
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
- *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
-echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
- *) $as_unset $ac_var ;;
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
esac ;;
esac
done
@@ -1752,128 +2008,136 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
)
echo
- cat <<\_ASBOX
-## ----------------- ##
+ $as_echo "## ----------------- ##
## Output variables. ##
-## ----------------- ##
-_ASBOX
+## ----------------- ##"
echo
for ac_var in $ac_subst_vars
do
eval ac_val=\$$ac_var
case $ac_val in
- *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
esac
- echo "$ac_var='\''$ac_val'\''"
+ $as_echo "$ac_var='\''$ac_val'\''"
done | sort
echo
if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------------- ##
+ $as_echo "## ------------------- ##
## File substitutions. ##
-## ------------------- ##
-_ASBOX
+## ------------------- ##"
echo
for ac_var in $ac_subst_files
do
eval ac_val=\$$ac_var
case $ac_val in
- *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
esac
- echo "$ac_var='\''$ac_val'\''"
+ $as_echo "$ac_var='\''$ac_val'\''"
done | sort
echo
fi
if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
+ $as_echo "## ----------- ##
## confdefs.h. ##
-## ----------- ##
-_ASBOX
+## ----------- ##"
echo
cat confdefs.h
echo
fi
test "$ac_signal" != 0 &&
- echo "$as_me: caught signal $ac_signal"
- echo "$as_me: exit $exit_status"
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
} >&5
rm -f core *.core core.conftest.* &&
rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
exit $exit_status
' 0
for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
done
ac_signal=0
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -f -r conftest* confdefs.h
+$as_echo "/* confdefs.h */" > confdefs.h
+
# Predefined preprocessor variables.
cat >>confdefs.h <<_ACEOF
#define PACKAGE_NAME "$PACKAGE_NAME"
_ACEOF
-
cat >>confdefs.h <<_ACEOF
#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
_ACEOF
-
cat >>confdefs.h <<_ACEOF
#define PACKAGE_VERSION "$PACKAGE_VERSION"
_ACEOF
-
cat >>confdefs.h <<_ACEOF
#define PACKAGE_STRING "$PACKAGE_STRING"
_ACEOF
-
cat >>confdefs.h <<_ACEOF
#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
_ACEOF
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
if test -n "$CONFIG_SITE"; then
- set x "$CONFIG_SITE"
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
elif test "x$prefix" != xNONE; then
- set x "$prefix/share/config.site" "$prefix/etc/config.site"
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
else
- set x "$ac_default_prefix/share/config.site" \
- "$ac_default_prefix/etc/config.site"
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
fi
-shift
-for ac_site_file
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
do
- if test -r "$ac_site_file"; then
- { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
fi
done
if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special
- # files actually), so we avoid doing that.
- if test -f "$cache_file"; then
- { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
[\\/]* | ?:[\\/]* ) . "$cache_file";;
*) . "./$cache_file";;
esac
fi
else
- { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
@@ -1887,68 +2151,56 @@ for ac_var in $ac_precious_vars; do
eval ac_new_val=\$ac_env_${ac_var}_value
case $ac_old_set,$ac_new_set in
set,)
- { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
ac_cache_corrupted=: ;;
,set)
- { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_cache_corrupted=: ;;
,);;
*)
if test "x$ac_old_val" != "x$ac_new_val"; then
- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
-echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
-echo "$as_me: current value: $ac_new_val" >&2;}
- ac_cache_corrupted=:
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
fi;;
esac
# Pass precious variables to config.status.
if test "$ac_new_set" = set; then
case $ac_new_val in
- *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
*) ac_arg=$ac_var=$ac_new_val ;;
esac
case " $ac_configure_args " in
*" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
- *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
esac
fi
done
if $ac_cache_corrupted; then
- { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
- { (exit 1); exit 1; }; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -1958,8 +2210,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-ac_config_headers="$ac_config_headers config.h"
+am__api_version='1.11'
ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
@@ -1978,9 +2230,7 @@ for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
fi
done
if test -z "$ac_aux_dir"; then
- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
-echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
fi
# These three variables are undocumented and unsupported,
@@ -1992,132 +2242,486 @@ ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
- { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
-echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
- { (exit 1); exit 1; }; }
-
-{ echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
-if test "${ac_cv_build+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if ${ac_cv_path_install+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
- ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
- { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
- { (exit 1); exit 1; }; }
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
- { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
- { (exit 1); exit 1; }; }
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+ ./ | .// | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
-echo "$as_me: error: invalid value of canonical build" >&2;}
- { (exit 1); exit 1; }; };;
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[\\\"\#\$\&\'\`$am_lf]*)
+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+case $srcdir in
+ *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
+alias in your environment" "$LINENO" 5
+ fi
-{ echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
-if test "${ac_cv_host+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
else
- if test "x$host_alias" = x; then
- ac_cv_host=$ac_cv_build
+ as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
else
- ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
- { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
- { (exit 1); exit 1; }; }
+ am_missing_run=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
fi
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
-echo "$as_me: error: invalid value of canonical host" >&2;}
- { (exit 1); exit 1; }; };;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-{ echo "$as_me:$LINENO: checking target system type" >&5
-echo $ECHO_N "checking target system type... $ECHO_C" >&6; }
-if test "${ac_cv_target+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- if test "x$target_alias" = x; then
- ac_cv_target=$ac_cv_host
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
else
- ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
- { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;}
- { (exit 1); exit 1; }; }
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
fi
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5
-echo "${ECHO_T}$ac_cv_target" >&6; }
-case $ac_cv_target in
-*-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5
-echo "$as_me: error: invalid value of canonical target" >&2;}
- { (exit 1); exit 1; }; };;
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+ if ${ac_cv_path_mkdir+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+ done
+IFS=$as_save_IFS
+
+fi
+
+ test -d ./--version && rmdir ./--version
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+ [\\/$]* | ?:[\\/]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
esac
-target=$ac_cv_target
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_target
-shift
-target_cpu=$1
-target_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-target_os=$*
-IFS=$ac_save_IFS
-case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AWK="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-test -n "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='openpam'
+ VERSION='20111218'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
+ac_config_headers="$ac_config_headers config.h"
+
+
+# C compiler and features
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2132,10 +2736,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2145,25 +2749,25 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
IFS=$as_save_IFS
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -2172,10 +2776,10 @@ if test -z "$ac_cv_prog_CC"; then
ac_ct_CC=$CC
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -2185,25 +2789,25 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CC="gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
IFS=$as_save_IFS
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
if test "x$ac_ct_CC" = x; then
@@ -2211,12 +2815,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
CC=$ac_ct_CC
@@ -2229,10 +2829,10 @@ if test -z "$CC"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2242,25 +2842,25 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
IFS=$as_save_IFS
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -2269,10 +2869,10 @@ fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2283,18 +2883,18 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
fi
ac_cv_prog_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
IFS=$as_save_IFS
if test $ac_prog_rejected = yes; then
@@ -2313,11 +2913,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -2328,10 +2928,10 @@ if test -z "$CC"; then
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2341,25 +2941,25 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
IFS=$as_save_IFS
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -2372,10 +2972,10 @@ if test -z "$CC"; then
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -2385,25 +2985,25 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CC="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
IFS=$as_save_IFS
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -2415,12 +3015,8 @@ done
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
CC=$ac_ct_CC
@@ -2430,51 +3026,37 @@ fi
fi
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
# Provide some information about the compiler.
-echo "$as_me:$LINENO: checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (ac_try="$ac_compiler --version >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compiler --version >&5") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (ac_try="$ac_compiler -v >&5"
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compiler -v >&5") 2>&5
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (ac_try="$ac_compiler -V >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compiler -V >&5") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -2486,42 +3068,38 @@ main ()
}
_ACEOF
ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.exe b.out"
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
-{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-#
-# List of possible output files, starting from the most likely.
-# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
-# only as a last resort. b.out is created by i960 compilers.
-ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
-#
-# The IRIX 6 linker writes into existing files which may not be
-# executable, retaining their permissions. Remove them first so a
-# subsequent execution test works.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
ac_rmfiles=
for ac_file in $ac_files
do
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
* ) ac_rmfiles="$ac_rmfiles $ac_file";;
esac
done
rm -f $ac_rmfiles
-if { (ac_try="$ac_link_default"
+if { { ac_try="$ac_link_default"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
(eval "$ac_link_default") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
# Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
# in a Makefile. We should not override ac_cv_exeext if it was cached,
@@ -2531,14 +3109,14 @@ for ac_file in $ac_files ''
do
test -f "$ac_file" || continue
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
;;
[ab].out )
# We found the default executable, but exeext='' is most
# certainly right.
break;;
*.* )
- if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
then :; else
ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
fi
@@ -2557,78 +3135,41 @@ test "$ac_cv_exeext" = no && ac_cv_exeext=
else
ac_file=''
fi
-
-{ echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6; }
-if test -z "$ac_file"; then
- echo "$as_me: failed program was:" >&5
+if test -z "$ac_file"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
fi
-
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
ac_exeext=$ac_cv_exeext
-# Check that the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
- if { ac_try='./$ac_file'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
- fi
- fi
-fi
-{ echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-
-rm -f a.out a.exe conftest$ac_cv_exeext b.out
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
-# Check that the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
-{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6; }
-
-{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
-if { (ac_try="$ac_link"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
(eval "$ac_link") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
# If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
# work properly (i.e., refer to `conftest.exe'), while it won't with
@@ -2636,37 +3177,90 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
for ac_file in conftest.exe conftest conftest.*; do
test -f "$ac_file" || continue
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
*.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
break;;
* ) break;;
esac
done
else
- { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
fi
-
-rm -f conftest$ac_cv_exeext
-{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6; }
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
-{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
-if test "${ac_cv_objext+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if ${ac_cv_objext+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -2678,51 +3272,46 @@ main ()
}
_ACEOF
rm -f conftest.o conftest.obj
-if { (ac_try="$ac_compile"
+if { { ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
(eval "$ac_compile") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
for ac_file in conftest.o conftest.obj conftest.*; do
test -f "$ac_file" || continue;
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
*) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
break;;
esac
done
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
fi
-
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
-{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -2736,54 +3325,34 @@ main ()
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
+if ac_fn_c_try_compile "$LINENO"; then :
ac_compiler_gnu=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_compiler_gnu=no
+ ac_compiler_gnu=no
fi
-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
-GCC=`test $ac_compiler_gnu = yes && echo yes`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
-{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+ $as_echo_n "(cached) " >&6
else
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
ac_cv_prog_cc_g=no
CFLAGS="-g"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -2794,34 +3363,11 @@ main ()
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
+if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_prog_cc_g=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- CFLAGS=""
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -2832,35 +3378,12 @@ main ()
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_compile "$LINENO"; then :
- ac_c_werror_flag=$ac_save_c_werror_flag
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
CFLAGS="-g"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -2871,42 +3394,18 @@ main ()
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
+if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_prog_cc_g=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
fi
-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
if test "$ac_test_CFLAGS" = set; then
CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
@@ -2922,18 +3421,14 @@ else
CFLAGS=
fi
fi
-{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
-echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+ $as_echo_n "(cached) " >&6
else
ac_cv_prog_cc_c89=no
ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
@@ -2990,31 +3485,9 @@ for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
CC="$ac_save_CC $ac_arg"
- rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
+ if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_prog_cc_c89=$ac_arg
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
fi
-
rm -f core conftest.err conftest.$ac_objext
test "x$ac_cv_prog_cc_c89" != "xno" && break
done
@@ -3025,256 +3498,681 @@ fi
# AC_CACHE_VAL
case "x$ac_cv_prog_cc_c89" in
x)
- { echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6; } ;;
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
xno)
- { echo "$as_me:$LINENO: result: unsupported" >&5
-echo "${ECHO_T}unsupported" >&6; } ;;
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
*)
CC="$CC $ac_cv_prog_cc_c89"
- { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+ enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
-{ echo "$as_me:$LINENO: checking for working volatile" >&5
-echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
-if test "${ac_cv_c_volatile+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+ case $ac_cv_prog_cc_stdc in #(
+ no) :
+ ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
+ *) :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
+$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
+if ${ac_cv_prog_cc_c99+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include <stdio.h>
+
+// Check varargs macros. These examples are taken from C99 6.10.3.5.
+#define debug(...) fprintf (stderr, __VA_ARGS__)
+#define showlist(...) puts (#__VA_ARGS__)
+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+static void
+test_varargs_macros (void)
+{
+ int x = 1234;
+ int y = 5678;
+ debug ("Flag");
+ debug ("X = %d\n", x);
+ showlist (The first, second, and third items.);
+ report (x>y, "x is %d but y is %d", x, y);
+}
+
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+ your preprocessor is broken;
+#endif
+#if BIG_OK
+#else
+ your preprocessor is broken;
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
+
+struct incomplete_array
+{
+ int datasize;
+ double data[];
+};
+
+struct named_init {
+ int number;
+ const wchar_t *name;
+ double average;
+};
+
+typedef const char *ccp;
+
+static inline int
+test_restrict (ccp restrict text)
+{
+ // See if C++-style comments work.
+ // Iterate through items via the restricted pointer.
+ // Also check for declarations in for loops.
+ for (unsigned int i = 0; *(text+i) != '\0'; ++i)
+ continue;
+ return 0;
+}
+
+// Check varargs and va_copy.
+static void
+test_varargs (const char *format, ...)
+{
+ va_list args;
+ va_start (args, format);
+ va_list args_copy;
+ va_copy (args_copy, args);
+
+ const char *str;
+ int number;
+ float fnumber;
+
+ while (*format)
+ {
+ switch (*format++)
+ {
+ case 's': // string
+ str = va_arg (args_copy, const char *);
+ break;
+ case 'd': // int
+ number = va_arg (args_copy, int);
+ break;
+ case 'f': // float
+ fnumber = va_arg (args_copy, double);
+ break;
+ default:
+ break;
+ }
+ }
+ va_end (args_copy);
+ va_end (args);
+}
int
main ()
{
-volatile int x;
-int * volatile y = (int *) 0;
-return !x && !y;
+ // Check bool.
+ _Bool success = false;
+
+ // Check restrict.
+ if (test_restrict ("String literal") == 0)
+ success = true;
+ char *restrict newvar = "Another string";
+
+ // Check varargs.
+ test_varargs ("s, d' f .", "string", 65, 34.234);
+ test_varargs_macros ();
+
+ // Check flexible array members.
+ struct incomplete_array *ia =
+ malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
+ ia->datasize = 10;
+ for (int i = 0; i < ia->datasize; ++i)
+ ia->data[i] = i * 1.234;
+
+ // Check named initializers.
+ struct named_init ni = {
+ .number = 34,
+ .name = L"Test wide string",
+ .average = 543.34343,
+ };
+
+ ni.number = 58;
+
+ int dynamic_array[ni.number];
+ dynamic_array[ni.number - 1] = 543;
+
+ // work around unused variable warnings
+ return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
+ || dynamic_array[ni.number - 1] != 543);
+
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c99=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c99" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c99"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_c_volatile=yes
+if test "x$ac_cv_prog_cc_c99" != xno; then :
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
- ac_cv_c_volatile=no
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c89=$ac_arg
fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
-echo "${ECHO_T}$ac_cv_c_volatile" >&6; }
-if test $ac_cv_c_volatile = no; then
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
+else
+ ac_cv_prog_cc_stdc=no
+fi
-cat >>confdefs.h <<\_ACEOF
-#define volatile
+fi
+ ;;
+esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
+$as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
+ if ${ac_cv_prog_cc_stdc+:} false; then :
+ $as_echo_n "(cached) " >&6
+fi
+
+ case $ac_cv_prog_cc_stdc in #(
+ no) :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;; #(
+ '') :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;; #(
+ *) :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
+$as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
+esac
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if ${ac_cv_prog_CPP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+else
+ # Broken: fails on valid input.
+continue
fi
+rm -f conftest.err conftest.i conftest.$ac_ext
-# Check whether --enable-static was given.
-if test "${enable_static+set}" = set; then
- enableval=$enable_static; p=${PACKAGE-default}
- case $enableval in
- yes) enable_static=yes ;;
- no) enable_static=no ;;
- *)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
else
- enable_static=no
+ # Passes both tests.
+ac_preproc_ok=:
+break
fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+ break
+fi
+ done
+ ac_cv_prog_CPP=$CPP
-# Check whether --enable-shared was given.
-if test "${enable_shared+set}" = set; then
- enableval=$enable_shared; p=${PACKAGE-default}
- case $enableval in
- yes) enable_shared=yes ;;
- no) enable_shared=no ;;
- *)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac
+fi
+ CPP=$ac_cv_prog_CPP
else
- enable_shared=yes
+ ac_cv_prog_CPP=$CPP
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
-
-# Check whether --enable-fast-install was given.
-if test "${enable_fast_install+set}" = set; then
- enableval=$enable_fast_install; p=${PACKAGE-default}
- case $enableval in
- yes) enable_fast_install=yes ;;
- no) enable_fast_install=no ;;
- *)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac
else
- enable_fast_install=yes
+ # Broken: fails on valid input.
+continue
fi
+rm -f conftest.err conftest.i conftest.$ac_ext
-
-{ echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
-echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; }
-if test "${lt_cv_path_SED+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
else
- # Loop through the user's path and test for sed and gsed.
-# Then use that list of sed's as ones to test for truncation.
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for lt_ac_prog in sed gsed; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$lt_ac_prog$ac_exec_ext"; }; then
- lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
- fi
- done
- done
-done
-IFS=$as_save_IFS
-lt_ac_max=0
-lt_ac_count=0
-# Add /usr/xpg4/bin/sed as it is typically found on Solaris
-# along with /bin/sed that truncates output.
-for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
- test ! -f $lt_ac_sed && continue
- cat /dev/null > conftest.in
- lt_ac_count=0
- echo $ECHO_N "0123456789$ECHO_C" >conftest.in
- # Check for GNU sed and select it if it is found.
- if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
- lt_cv_path_SED=$lt_ac_sed
- break
- fi
- while true; do
- cat conftest.in conftest.in >conftest.tmp
- mv conftest.tmp conftest.in
- cp conftest.in conftest.nl
- echo >>conftest.nl
- $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
- cmp -s conftest.out conftest.nl || break
- # 10000 chars as input seems more than enough
- test $lt_ac_count -gt 10 && break
- lt_ac_count=`expr $lt_ac_count + 1`
- if test $lt_ac_count -gt $lt_ac_max; then
- lt_ac_max=$lt_ac_count
- lt_cv_path_SED=$lt_ac_sed
- fi
- done
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
fi
-SED=$lt_cv_path_SED
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ echo "$as_me:$LINENO: result: $SED" >&5
-echo "${ECHO_T}$SED" >&6; }
-{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
-echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # Extract the first word of "grep ggrep" to use in msg output
-if test -z "$GREP"; then
-set dummy grep ggrep; ac_prog_name=$2
-if test "${ac_cv_path_GREP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if ${ac_cv_path_GREP+:} false; then :
+ $as_echo_n "(cached) " >&6
else
+ if test -z "$GREP"; then
ac_path_GREP_found=false
-# Loop through the user's path and test for each of PROGNAME-LIST
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_prog in grep ggrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
- # Check for GNU ac_path_GREP and select it if it is found.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
*GNU*)
ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
*)
ac_count=0
- echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+ $as_echo_n 0123456789 >"conftest.in"
while :
do
cat "conftest.in" "conftest.in" >"conftest.tmp"
mv "conftest.tmp" "conftest.in"
cp "conftest.in" "conftest.nl"
- echo 'GREP' >> "conftest.nl"
+ $as_echo 'GREP' >> "conftest.nl"
"$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- ac_count=`expr $ac_count + 1`
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
if test $ac_count -gt ${ac_path_GREP_max-0}; then
# Best one so far, save it but keep looking for a better one
ac_cv_path_GREP="$ac_path_GREP"
@@ -3286,77 +4184,61 @@ case `"$ac_path_GREP" --version 2>&1` in
rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac
-
- $ac_path_GREP_found && break 3
+ $ac_path_GREP_found && break 3
+ done
+ done
done
-done
-
-done
IFS=$as_save_IFS
-
-
-fi
-
-GREP="$ac_cv_path_GREP"
-if test -z "$GREP"; then
- { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
else
ac_cv_path_GREP=$GREP
fi
-
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
-echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
GREP="$ac_cv_path_GREP"
-{ echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if ${ac_cv_path_EGREP+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
then ac_cv_path_EGREP="$GREP -E"
else
- # Extract the first word of "egrep" to use in msg output
-if test -z "$EGREP"; then
-set dummy egrep; ac_prog_name=$2
-if test "${ac_cv_path_EGREP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+ if test -z "$EGREP"; then
ac_path_EGREP_found=false
-# Loop through the user's path and test for each of PROGNAME-LIST
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_prog in egrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
- # Check for GNU ac_path_EGREP and select it if it is found.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
*GNU*)
ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
*)
ac_count=0
- echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+ $as_echo_n 0123456789 >"conftest.in"
while :
do
cat "conftest.in" "conftest.in" >"conftest.tmp"
mv "conftest.tmp" "conftest.in"
cp "conftest.in" "conftest.nl"
- echo 'EGREP' >> "conftest.nl"
+ $as_echo 'EGREP' >> "conftest.nl"
"$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- ac_count=`expr $ac_count + 1`
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
if test $ac_count -gt ${ac_path_EGREP_max-0}; then
# Best one so far, save it but keep looking for a better one
ac_cv_path_EGREP="$ac_path_EGREP"
@@ -3368,39 +4250,715 @@ case `"$ac_path_EGREP" --version 2>&1` in
rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac
-
- $ac_path_EGREP_found && break 3
+ $ac_path_EGREP_found && break 3
+ done
done
-done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_stdc=yes
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
done
-IFS=$as_save_IFS
+
+ ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
+if test "x$ac_cv_header_minix_config_h" = xyes; then :
+ MINIX=yes
+else
+ MINIX=
fi
-EGREP="$ac_cv_path_EGREP"
-if test -z "$EGREP"; then
- { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
- { (exit 1); exit 1; }; }
+
+ if test "$MINIX" = yes; then
+
+$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
+
+
+$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
+
+
+$as_echo "#define _MINIX 1" >>confdefs.h
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
+$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
+if ${ac_cv_safe_to_define___extensions__+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# define __EXTENSIONS__ 1
+ $ac_includes_default
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_safe_to_define___extensions__=yes
+else
+ ac_cv_safe_to_define___extensions__=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
+$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
+ test $ac_cv_safe_to_define___extensions__ = yes &&
+ $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
+
+ $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
+
+ $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
+ $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+
+ $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
+$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
+if ${ac_cv_c_const+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- ac_cv_path_EGREP=$EGREP
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+/* FIXME: Include the comments suggested by Paul. */
+#ifndef __cplusplus
+ /* Ultrix mips cc rejects this. */
+ typedef int charset[2];
+ const charset cs;
+ /* SunOS 4.1.1 cc rejects this. */
+ char const *const *pcpcc;
+ char **ppc;
+ /* NEC SVR4.0.2 mips cc rejects this. */
+ struct point {int x, y;};
+ static struct point const zero = {0,0};
+ /* AIX XL C 1.02.0.0 rejects this.
+ It does not let you subtract one const X* pointer from another in
+ an arm of an if-expression whose if-part is not a constant
+ expression */
+ const char *g = "string";
+ pcpcc = &g + (g ? g-g : 0);
+ /* HPUX 7.0 cc rejects these. */
+ ++pcpcc;
+ ppc = (char**) pcpcc;
+ pcpcc = (char const *const *) ppc;
+ { /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+ if (s) return 0;
+ }
+ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+ const int *foo = &x[0];
+ ++foo;
+ }
+ { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+ typedef const int *iptr;
+ iptr p = 0;
+ ++p;
+ }
+ { /* AIX XL C 1.02.0.0 rejects this saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+ struct s { int j; const int *ap[3]; };
+ struct s *b; b->j = 5;
+ }
+ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+ if (!foo) return 0;
+ }
+ return !cs[0] && !zero.x;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_const=yes
+else
+ ac_cv_c_const=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
+$as_echo "$ac_cv_c_const" >&6; }
+if test $ac_cv_c_const = no; then
+
+$as_echo "#define const /**/" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
+$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
+if ${ac_cv_c_restrict+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_c_restrict=no
+ # The order here caters to the fact that C++ does not require restrict.
+ for ac_kw in __restrict __restrict__ _Restrict restrict; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+typedef int * int_ptr;
+ int foo (int_ptr $ac_kw ip) {
+ return ip[0];
+ }
+int
+main ()
+{
+int s[1];
+ int * $ac_kw t = s;
+ t[0] = 0;
+ return foo(t)
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_restrict=$ac_kw
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ test "$ac_cv_c_restrict" != no && break
+ done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
+$as_echo "$ac_cv_c_restrict" >&6; }
+
+ case $ac_cv_c_restrict in
+ restrict) ;;
+ no) $as_echo "#define restrict /**/" >>confdefs.h
+ ;;
+ *) cat >>confdefs.h <<_ACEOF
+#define restrict $ac_cv_c_restrict
+_ACEOF
+ ;;
+ esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
+$as_echo_n "checking for working volatile... " >&6; }
+if ${ac_cv_c_volatile+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+volatile int x;
+int * volatile y = (int *) 0;
+return !x && !y;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_volatile=yes
+else
+ ac_cv_c_volatile=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
+$as_echo "$ac_cv_c_volatile" >&6; }
+if test $ac_cv_c_volatile = no; then
+
+$as_echo "#define volatile /**/" >>confdefs.h
+
+fi
+
+
+# libtool
+
+case `pwd` in
+ *\ * | *\ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
+esac
+
+
+
+macro_version='2.4'
+macro_revision='1.3293'
+
+
+
+
+
+
+
+
+
+
+
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+# Backslashify metacharacters that are still active within
+# double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
+$as_echo_n "checking how to print strings... " >&6; }
+# Test print first, because it will be a builtin if present.
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='print -r --'
+elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='printf %s\n'
+else
+ # Use this function as a fallback that always works.
+ func_fallback_echo ()
+ {
+ eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+ }
+ ECHO='func_fallback_echo'
+fi
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+ $ECHO ""
+}
+
+case "$ECHO" in
+ printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
+$as_echo "printf" >&6; } ;;
+ print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
+$as_echo "print -r" >&6; } ;;
+ *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
+$as_echo "cat" >&6; } ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if ${ac_cv_path_SED+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for ac_i in 1 2 3 4 5 6 7; do
+ ac_script="$ac_script$as_nl$ac_script"
+ done
+ echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+ { ac_script=; unset ac_script;}
+ if test -z "$SED"; then
+ ac_path_SED_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+# Check for GNU ac_path_SED and select it if it is found.
+ # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo '' >> "conftest.nl"
+ "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_SED_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_SED="$ac_path_SED"
+ ac_path_SED_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_SED_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_SED"; then
+ as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+ fi
+else
+ ac_cv_path_SED=$SED
fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+ rm -f conftest.sed
+
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
+$as_echo_n "checking for fgrep... " >&6; }
+if ${ac_cv_path_FGREP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
+ then ac_cv_path_FGREP="$GREP -F"
+ else
+ if test -z "$FGREP"; then
+ ac_path_FGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in fgrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
+# Check for GNU ac_path_FGREP and select it if it is found.
+ # Check for GNU $ac_path_FGREP
+case `"$ac_path_FGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'FGREP' >> "conftest.nl"
+ "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_FGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_FGREP="$ac_path_FGREP"
+ ac_path_FGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_FGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_FGREP"; then
+ as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_FGREP=$FGREP
+fi
fi
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
-echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
+$as_echo "$ac_cv_path_FGREP" >&6; }
+ FGREP="$ac_cv_path_FGREP"
+
+
+test -z "$GREP" && GREP=grep
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# Check whether --with-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then
+if test "${with_gnu_ld+set}" = set; then :
withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
else
with_gnu_ld=no
@@ -3409,8 +4967,8 @@ fi
ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
- { echo "$as_me:$LINENO: checking for ld used by $CC" >&5
-echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
@@ -3423,9 +4981,9 @@ echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; }
[\\/]* | ?:[\\/]*)
re_direlt='/[^/][^/]*/\.\./'
# Canonicalize the pathname of ld
- ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
done
test -z "$LD" && LD="$ac_prog"
;;
@@ -3439,14 +4997,14 @@ echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; }
;;
esac
elif test "$with_gnu_ld" = yes; then
- { echo "$as_me:$LINENO: checking for GNU ld" >&5
-echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
else
- { echo "$as_me:$LINENO: checking for non-GNU ld" >&5
-echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
fi
-if test "${lt_cv_path_LD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+if ${lt_cv_path_LD+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test -z "$LD"; then
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
@@ -3476,19 +5034,17 @@ fi
LD="$lt_cv_path_LD"
if test -n "$LD"; then
- { echo "$as_me:$LINENO: result: $LD" >&5
-echo "${ECHO_T}$LD" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
-test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
-echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
- { (exit 1); exit 1; }; }
-{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
-echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; }
-if test "${lt_cv_prog_gnu_ld+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if ${lt_cv_prog_gnu_ld+:} false; then :
+ $as_echo_n "(cached) " >&6
else
# I'd rather use --version here, but apparently some GNU lds only accept -v.
case `$LD -v 2>&1 </dev/null` in
@@ -3500,40 +5056,22 @@ case `$LD -v 2>&1 </dev/null` in
;;
esac
fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
-echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
with_gnu_ld=$lt_cv_prog_gnu_ld
-{ echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
-echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; }
-if test "${lt_cv_ld_reload_flag+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_cv_ld_reload_flag='-r'
-fi
-{ echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
-echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; }
-reload_flag=$lt_cv_ld_reload_flag
-case $reload_flag in
-"" | " "*) ;;
-*) reload_flag=" $reload_flag" ;;
-esac
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-case $host_os in
- darwin*)
- if test "$GCC" = yes; then
- reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
- else
- reload_cmds='$LD$reload_flag -o $output$reload_objs'
- fi
- ;;
-esac
-{ echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
-echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; }
-if test "${lt_cv_path_NM+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
+$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
+if ${lt_cv_path_NM+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$NM"; then
# Let the user override the test.
@@ -3576,28 +5114,589 @@ else
done
IFS="$lt_save_ifs"
done
- test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+ : ${lt_cv_path_NM=no}
fi
fi
-{ echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
-echo "${ECHO_T}$lt_cv_path_NM" >&6; }
-NM="$lt_cv_path_NM"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
+$as_echo "$lt_cv_path_NM" >&6; }
+if test "$lt_cv_path_NM" != "no"; then
+ NM="$lt_cv_path_NM"
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ if test -n "$DUMPBIN"; then :
+ # Let the user override the test.
+ else
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in dumpbin "link -dump"
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DUMPBIN+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DUMPBIN"; then
+ ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DUMPBIN=$ac_cv_prog_DUMPBIN
+if test -n "$DUMPBIN"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
+$as_echo "$DUMPBIN" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$DUMPBIN" && break
+ done
+fi
+if test -z "$DUMPBIN"; then
+ ac_ct_DUMPBIN=$DUMPBIN
+ for ac_prog in dumpbin "link -dump"
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DUMPBIN"; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
+if test -n "$ac_ct_DUMPBIN"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
+$as_echo "$ac_ct_DUMPBIN" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
-{ echo "$as_me:$LINENO: checking whether ln -s works" >&5
-echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
+ test -n "$ac_ct_DUMPBIN" && break
+done
+
+ if test "x$ac_ct_DUMPBIN" = x; then
+ DUMPBIN=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DUMPBIN=$ac_ct_DUMPBIN
+ fi
+fi
+
+ case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
+ *COFF*)
+ DUMPBIN="$DUMPBIN -symbols"
+ ;;
+ *)
+ DUMPBIN=:
+ ;;
+ esac
+ fi
+
+ if test "$DUMPBIN" != ":"; then
+ NM="$DUMPBIN"
+ fi
+fi
+test -z "$NM" && NM=nm
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
+$as_echo_n "checking the name lister ($NM) interface... " >&6; }
+if ${lt_cv_nm_interface+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:$LINENO: output\"" >&5)
+ cat conftest.out >&5
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
+$as_echo "$lt_cv_nm_interface" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
LN_S=$as_ln_s
if test "$LN_S" = "ln -s"; then
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
+fi
+
+# find the maximum length of command line arguments
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
+$as_echo_n "checking the maximum length of command line arguments... " >&6; }
+if ${lt_cv_sys_max_cmd_len+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ i=0
+ teststring="ABCD"
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw* | cegcc*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ mint*)
+ # On MiNT this can take a long time and run out of memory.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+ if test -n "$lt_cv_sys_max_cmd_len"; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8 ; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
+ = "X$teststring$teststring"; } >/dev/null 2>&1 &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
+ esac
+
+fi
+
+if test -n $lt_cv_sys_max_cmd_len ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
+$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
+$as_echo "none" >&6; }
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+
+
+
+
+
+: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
+$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
+ = c,a/b,b/c, \
+ && eval 'test $(( 1 + 1 )) -eq 2 \
+ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+ && xsi_shell=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
+$as_echo "$xsi_shell" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
+$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
+ >/dev/null 2>&1 \
+ && lt_shell_append=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
+$as_echo "$lt_shell_append" >&6; }
+
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ lt_unset=unset
+else
+ lt_unset=false
+fi
+
+
+
+
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ lt_SP2NL='tr \040 \012'
+ lt_NL2SP='tr \015\012 \040\040'
+ ;;
+ *) # EBCDIC based system
+ lt_SP2NL='tr \100 \n'
+ lt_NL2SP='tr \r\n \100\100'
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
+$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
+if ${lt_cv_to_host_file_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $host in
+ *-*-mingw* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+ ;;
+ *-*-cygwin* )
+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+ ;;
+ * ) # otherwise, assume *nix
+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
+ ;;
+ esac
+ ;;
+ *-*-cygwin* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+ ;;
+ *-*-cygwin* )
+ lt_cv_to_host_file_cmd=func_convert_file_noop
+ ;;
+ * ) # otherwise, assume *nix
+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
+ ;;
+ esac
+ ;;
+ * ) # unhandled hosts (and "normal" native builds)
+ lt_cv_to_host_file_cmd=func_convert_file_noop
+ ;;
+esac
+
+fi
+
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
+$as_echo "$lt_cv_to_host_file_cmd" >&6; }
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
+if ${lt_cv_to_tool_file_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ #assume ordinary cross tools, or native build.
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+case $host in
+ *-*-mingw* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+ ;;
+ esac
+ ;;
+esac
+
+fi
+
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
+$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
+$as_echo_n "checking for $LD option to reload object files... " >&6; }
+if ${lt_cv_ld_reload_flag+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
-echo "${ECHO_T}no, using $LN_S" >&6; }
+ lt_cv_ld_reload_flag='-r'
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
+$as_echo "$lt_cv_ld_reload_flag" >&6; }
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ if test "$GCC" != yes; then
+ reload_cmds=false
+ fi
+ ;;
+ darwin*)
+ if test "$GCC" = yes; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+
-{ echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5
-echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; }
-if test "${lt_cv_deplibs_check_method+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OBJDUMP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OBJDUMP"; then
+ ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+$as_echo "$OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OBJDUMP"; then
+ ac_ct_OBJDUMP=$OBJDUMP
+ # Extract the first word of "objdump", so it can be a program name with args.
+set dummy objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OBJDUMP"; then
+ ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OBJDUMP="objdump"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+$as_echo "$ac_ct_OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OBJDUMP" = x; then
+ OBJDUMP="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OBJDUMP=$ac_ct_OBJDUMP
+ fi
+else
+ OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
+$as_echo_n "checking how to recognize dependent libraries... " >&6; }
+if ${lt_cv_deplibs_check_method+:} false; then :
+ $as_echo_n "(cached) " >&6
else
lt_cv_file_magic_cmd='$MAGIC_CMD'
lt_cv_file_magic_test_file=
@@ -3614,7 +5713,7 @@ lt_cv_deplibs_check_method='unknown'
# whether `pass_all' will *always* work, you probably want this one.
case $host_os in
-aix4* | aix5*)
+aix[4-9]*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -3638,21 +5737,29 @@ mingw* | pw32*)
# Base MSYS/MinGW do not provide the 'file' command needed by
# func_win32_libid shell function, so use a weaker test based on 'objdump',
# unless we find 'file', for example because we are cross-compiling.
- if ( file / ) >/dev/null 2>&1; then
+ # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
+ if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='func_win32_libid'
else
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ # Keep this pattern in sync with the one in func_win32_libid.
+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
lt_cv_file_magic_cmd='$OBJDUMP -f'
fi
;;
+cegcc*)
+ # use the weaker test based on 'objdump'. See mingw*.
+ lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
darwin* | rhapsody*)
lt_cv_deplibs_check_method=pass_all
;;
freebsd* | dragonfly*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
case $host_cpu in
i*86 )
# Not sure whether the presence of OpenBSD here was a mistake.
@@ -3671,6 +5778,10 @@ gnu*)
lt_cv_deplibs_check_method=pass_all
;;
+haiku*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
hpux10.20* | hpux11*)
lt_cv_file_magic_cmd=/usr/bin/file
case $host_cpu in
@@ -3679,11 +5790,11 @@ hpux10.20* | hpux11*)
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
;;
hppa*64*)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'
lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
;;
*)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
lt_cv_file_magic_test_file=/usr/lib/libc.sl
;;
esac
@@ -3705,12 +5816,12 @@ irix5* | irix6* | nonstopux*)
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
lt_cv_deplibs_check_method=pass_all
;;
netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
else
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
@@ -3723,12 +5834,12 @@ newos6*)
lt_cv_file_magic_test_file=/usr/lib/libnls.so
;;
-nto-qnx*)
- lt_cv_deplibs_check_method=unknown
+*nto* | *qnx*)
+ lt_cv_deplibs_check_method=pass_all
;;
openbsd*)
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
else
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
@@ -3747,6 +5858,10 @@ solaris*)
lt_cv_deplibs_check_method=pass_all
;;
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
sysv4 | sysv4.3*)
case $host_vendor in
motorola)
@@ -3774,14 +5889,29 @@ sysv4 | sysv4.3*)
esac
;;
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+tpf*)
lt_cv_deplibs_check_method=pass_all
;;
esac
fi
-{ echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
-echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
+$as_echo "$lt_cv_deplibs_check_method" >&6; }
+
+file_magic_glob=
+want_nocaseglob=no
+if test "$build" = "$host"; then
+ case $host_os in
+ mingw* | pw32*)
+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
+ want_nocaseglob=yes
+ else
+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
+ fi
+ ;;
+ esac
+fi
+
file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
test -z "$deplibs_check_method" && deplibs_check_method=unknown
@@ -3789,638 +5919,117 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-# Allow CC to be a program name with arguments.
-compiler=$CC
-# Check whether --enable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then
- enableval=$enable_libtool_lock;
-fi
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- case `/usr/bin/file conftest.$ac_objext` in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '#line 3832 "configure"' > conftest.$ac_ext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- if test "$lt_cv_prog_gnu_ld" = yes; then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -melf32bsmip"
- ;;
- *N32*)
- LD="${LD-ld} -melf32bmipn32"
- ;;
- *64-bit*)
- LD="${LD-ld} -melf64bmip"
- ;;
- esac
- else
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- fi
- rm -rf conftest*
- ;;
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
-s390*-*linux*|sparc*-*linux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- case `/usr/bin/file conftest.o` in
- *32-bit*)
- case $host in
- x86_64-*kfreebsd*-gnu)
- LD="${LD-ld} -m elf_i386_fbsd"
- ;;
- x86_64-*linux*)
- LD="${LD-ld} -m elf_i386"
- ;;
- ppc64-*linux*|powerpc64-*linux*)
- LD="${LD-ld} -m elf32ppclinux"
- ;;
- s390x-*linux*)
- LD="${LD-ld} -m elf_s390"
- ;;
- sparc64-*linux*)
- LD="${LD-ld} -m elf32_sparc"
- ;;
- esac
- ;;
- *64-bit*)
- case $host in
- x86_64-*kfreebsd*-gnu)
- LD="${LD-ld} -m elf_x86_64_fbsd"
- ;;
- x86_64-*linux*)
- LD="${LD-ld} -m elf_x86_64"
- ;;
- ppc*-*linux*|powerpc*-*linux*)
- LD="${LD-ld} -m elf64ppc"
- ;;
- s390*-*linux*)
- LD="${LD-ld} -m elf64_s390"
- ;;
- sparc*-*linux*)
- LD="${LD-ld} -m elf64_sparc"
- ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
-echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; }
-if test "${lt_cv_cc_needs_belf+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-int
-main ()
-{
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
- lt_cv_cc_needs_belf=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- lt_cv_cc_needs_belf=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-fi
-{ echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
-echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; }
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-sparc*-*solaris*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- case `/usr/bin/file conftest.o` in
- *64-bit*)
- case $lt_cv_prog_gnu_ld in
- yes*) LD="${LD-ld} -m elf64_sparc" ;;
- *) LD="${LD-ld} -64" ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-esac
-need_locks="$enable_libtool_lock"
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
- if test "${ac_cv_prog_CPP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # Double quotes because CPP needs to be expanded
- for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
- do
- ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }; then
- :
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DLLTOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Broken: fails on valid input.
-continue
-fi
-
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }; then
- # Broken: success on invalid input.
-continue
+ if test -n "$DLLTOOL"; then
+ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-
-rm -f conftest.err conftest.$ac_ext
-
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
- break
-fi
-
- done
- ac_cv_prog_CPP=$CPP
+ done
+IFS=$as_save_IFS
fi
- CPP=$ac_cv_prog_CPP
-else
- ac_cv_prog_CPP=$CPP
fi
-{ echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }; then
- :
+DLLTOOL=$ac_cv_prog_DLLTOOL
+if test -n "$DLLTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
+$as_echo "$DLLTOOL" >&6; }
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Broken: fails on valid input.
-continue
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }; then
- # Broken: success on invalid input.
-continue
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- # Passes both tests.
-ac_preproc_ok=:
-break
fi
-
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
- :
+if test -z "$ac_cv_prog_DLLTOOL"; then
+ ac_ct_DLLTOOL=$DLLTOOL
+ # Extract the first word of "dlltool", so it can be a program name with args.
+set dummy dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ if test -n "$ac_ct_DLLTOOL"; then
+ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_header_stdc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_header_stdc=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <string.h>
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_DLLTOOL="dlltool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then
- :
-else
- ac_cv_header_stdc=no
fi
-rm -f conftest*
-
fi
-
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then
- :
+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
+if test -n "$ac_ct_DLLTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
+$as_echo "$ac_ct_DLLTOOL" >&6; }
else
- ac_cv_header_stdc=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then
- :
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
- (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- return 2;
- return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
+ if test "x$ac_ct_DLLTOOL" = x; then
+ DLLTOOL="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
+ DLLTOOL=$ac_ct_DLLTOOL
+ fi
else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ DLLTOOL="$ac_cv_prog_DLLTOOL"
fi
-
-fi
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+test -z "$DLLTOOL" && DLLTOOL=dlltool
@@ -4430,507 +6039,165 @@ fi
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- eval "$as_ac_Header=yes"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
+$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
+if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- eval "$as_ac_Header=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
+ lt_cv_sharedlib_from_linklib_cmd='unknown'
-
-
-for ac_header in dlfcn.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-else
- # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
+case $host_os in
+cygwin* | mingw* | pw32* | cegcc*)
+ # two different shell functions defined in ltmain.sh
+ # decide which to use based on capabilities of $DLLTOOL
+ case `$DLLTOOL --help 2>&1` in
+ *--identify-strict*)
+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
+ ;;
+ *)
+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
+ ;;
+ esac
+ ;;
+*)
+ # fallback: assume linklib IS sharedlib
+ lt_cv_sharedlib_from_linklib_cmd="$ECHO"
+ ;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- ac_header_compiler=no
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
+$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
-# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- ( cat <<\_ASBOX
-## ------------------------- ##
-## Report this to des@des.no ##
-## ------------------------- ##
-_ASBOX
- ) | sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-if test -z "$CXX"; then
- if test -n "$CCC"; then
- CXX=$CCC
- else
- if test -n "$ac_tool_prefix"; then
- for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+if test -n "$ac_tool_prefix"; then
+ for ac_prog in ar
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- if test -n "$CXX"; then
- ac_cv_prog_CXX="$CXX" # Let the user override the test.
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
IFS=$as_save_IFS
fi
fi
-CXX=$ac_cv_prog_CXX
-if test -n "$CXX"; then
- { echo "$as_me:$LINENO: result: $CXX" >&5
-echo "${ECHO_T}$CXX" >&6; }
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
- test -n "$CXX" && break
+ test -n "$AR" && break
done
fi
-if test -z "$CXX"; then
- ac_ct_CXX=$CXX
- for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+if test -z "$AR"; then
+ ac_ct_AR=$AR
+ for ac_prog in ar
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- if test -n "$ac_ct_CXX"; then
- ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CXX="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ ac_cv_prog_ac_ct_AR="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
IFS=$as_save_IFS
fi
fi
-ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
-if test -n "$ac_ct_CXX"; then
- { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
-echo "${ECHO_T}$ac_ct_CXX" >&6; }
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
- test -n "$ac_ct_CXX" && break
+ test -n "$ac_ct_AR" && break
done
- if test "x$ac_ct_CXX" = x; then
- CXX="g++"
+ if test "x$ac_ct_AR" = x; then
+ AR="false"
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
- CXX=$ac_ct_CXX
+ AR=$ac_ct_AR
fi
fi
- fi
-fi
-# Provide some information about the compiler.
-echo "$as_me:$LINENO: checking for C++ compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (ac_try="$ac_compiler --version >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compiler --version >&5") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (ac_try="$ac_compiler -v >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compiler -v >&5") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (ac_try="$ac_compiler -V >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compiler -V >&5") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
+: ${AR=ar}
+: ${AR_FLAGS=cru}
-{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; }
-if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_compiler_gnu=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- ac_compiler_gnu=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; }
-GXX=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CXXFLAGS=${CXXFLAGS+set}
-ac_save_CXXFLAGS=$CXXFLAGS
-{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
-echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; }
-if test "${ac_cv_prog_cxx_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_save_cxx_werror_flag=$ac_cxx_werror_flag
- ac_cxx_werror_flag=yes
- ac_cv_prog_cxx_g=no
- CXXFLAGS="-g"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-int
-main ()
-{
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_prog_cxx_g=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- CXXFLAGS=""
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-int
-main ()
-{
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- ac_cxx_werror_flag=$ac_save_cxx_werror_flag
- CXXFLAGS="-g"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
+$as_echo_n "checking for archiver @FILE support... " >&6; }
+if ${lt_cv_ar_at_file+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ar_at_file=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -4941,690 +6208,322 @@ main ()
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
+if ac_fn_c_try_compile "$LINENO"; then :
+ echo conftest.$ac_objext > conftest.lst
+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+ (eval $lt_ar_try) 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_prog_cxx_g=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if test "$ac_status" -eq 0; then
+ # Ensure the archiver fails upon bogus file names.
+ rm -f conftest.$ac_objext libconftest.a
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+ (eval $lt_ar_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if test "$ac_status" -ne 0; then
+ lt_cv_ar_at_file=@
+ fi
+ fi
+ rm -f conftest.* libconftest.a
fi
-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
+$as_echo "$lt_cv_ar_at_file" >&6; }
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_cxx_werror_flag=$ac_save_cxx_werror_flag
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; }
-if test "$ac_test_CXXFLAGS" = set; then
- CXXFLAGS=$ac_save_CXXFLAGS
-elif test $ac_cv_prog_cxx_g = yes; then
- if test "$GXX" = yes; then
- CXXFLAGS="-g -O2"
- else
- CXXFLAGS="-g"
- fi
+if test "x$lt_cv_ar_at_file" = xno; then
+ archiver_list_spec=
else
- if test "$GXX" = yes; then
- CXXFLAGS="-O2"
- else
- CXXFLAGS=
- fi
+ archiver_list_spec=$lt_cv_ar_at_file
fi
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-
-if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
- ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
- (test "X$CXX" != "Xg++"))) ; then
- ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
-echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; }
-if test -z "$CXXCPP"; then
- if test "${ac_cv_prog_CXXCPP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # Double quotes because CXXCPP needs to be expanded
- for CXXCPP in "$CXX -E" "/lib/cpp"
- do
- ac_preproc_ok=false
-for ac_cxx_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- }; then
- # Broken: success on invalid input.
-continue
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
- break
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
- done
- ac_cv_prog_CXXCPP=$CXXCPP
fi
- CXXCPP=$ac_cv_prog_CXXCPP
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- ac_cv_prog_CXXCPP=$CXXCPP
-fi
-{ echo "$as_me:$LINENO: result: $CXXCPP" >&5
-echo "${ECHO_T}$CXXCPP" >&6; }
-ac_preproc_ok=false
-for ac_cxx_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- }; then
- :
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
- # Broken: fails on valid input.
-continue
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- }; then
- # Broken: success on invalid input.
-continue
+ STRIP=$ac_ct_STRIP
+ fi
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Passes both tests.
-ac_preproc_ok=:
-break
+ STRIP="$ac_cv_prog_STRIP"
fi
-rm -f conftest.err conftest.$ac_ext
+test -z "$STRIP" && STRIP=:
+
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
- :
-else
- { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
-See \`config.log' for more details." >&5
-echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-fi
-ac_ext=f
-ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
-ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_f77_compiler_gnu
if test -n "$ac_tool_prefix"; then
- for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_F77+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- if test -n "$F77"; then
- ac_cv_prog_F77="$F77" # Let the user override the test.
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
IFS=$as_save_IFS
fi
fi
-F77=$ac_cv_prog_F77
-if test -n "$F77"; then
- { echo "$as_me:$LINENO: result: $F77" >&5
-echo "${ECHO_T}$F77" >&6; }
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
- test -n "$F77" && break
- done
fi
-if test -z "$F77"; then
- ac_ct_F77=$F77
- for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_F77+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- if test -n "$ac_ct_F77"; then
- ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test.
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_F77="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
IFS=$as_save_IFS
fi
fi
-ac_ct_F77=$ac_cv_prog_ac_ct_F77
-if test -n "$ac_ct_F77"; then
- { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5
-echo "${ECHO_T}$ac_ct_F77" >&6; }
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
-
- test -n "$ac_ct_F77" && break
-done
-
- if test "x$ac_ct_F77" = x; then
- F77=""
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
- F77=$ac_ct_F77
+ RANLIB=$ac_ct_RANLIB
fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
fi
+test -z "$RANLIB" && RANLIB=:
-# Provide some information about the compiler.
-echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (ac_try="$ac_compiler --version >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compiler --version >&5") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (ac_try="$ac_compiler -v >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compiler -v >&5") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (ac_try="$ac_compiler -V >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compiler -V >&5") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-rm -f a.out
-
-# If we don't use `.F' as extension, the preprocessor is not run on the
-# input file. (Note that this only needs to work for GNU compilers.)
-ac_save_ext=$ac_ext
-ac_ext=F
-{ echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; }
-if test "${ac_cv_f77_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
- program main
-#ifndef __GNUC__
- choke me
-#endif
- end
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_f77_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_compiler_gnu=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- ac_compiler_gnu=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_f77_compiler_gnu=$ac_compiler_gnu
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; }
-ac_ext=$ac_save_ext
-ac_test_FFLAGS=${FFLAGS+set}
-ac_save_FFLAGS=$FFLAGS
-FFLAGS=
-{ echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5
-echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; }
-if test "${ac_cv_prog_f77_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- FFLAGS=-g
-cat >conftest.$ac_ext <<_ACEOF
- program main
- end
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
+case $host_os in
+ darwin*)
+ lock_old_archive_extraction=yes ;;
+ *)
+ lock_old_archive_extraction=no ;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_f77_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_prog_f77_g=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_prog_f77_g=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5
-echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; }
-if test "$ac_test_FFLAGS" = set; then
- FFLAGS=$ac_save_FFLAGS
-elif test $ac_cv_prog_f77_g = yes; then
- if test "x$ac_cv_f77_compiler_gnu" = xyes; then
- FFLAGS="-g -O2"
- else
- FFLAGS="-g"
- fi
-else
- if test "x$ac_cv_f77_compiler_gnu" = xyes; then
- FFLAGS="-O2"
- else
- FFLAGS=
- fi
-fi
-G77=`test $ac_compiler_gnu = yes && echo yes`
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-# find the maximum length of command line arguments
-{ echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
-echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; }
-if test "${lt_cv_sys_max_cmd_len+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- i=0
- teststring="ABCD"
- case $build_os in
- msdosdjgpp*)
- # On DJGPP, this test can blow up pretty badly due to problems in libc
- # (any single argument exceeding 2000 bytes causes a buffer overrun
- # during glob expansion). Even if it were fixed, the result of this
- # check would be larger than it should be.
- lt_cv_sys_max_cmd_len=12288; # 12K is about right
- ;;
- gnu*)
- # Under GNU Hurd, this test is not required because there is
- # no limit to the length of command line arguments.
- # Libtool will interpret -1 as no limit whatsoever
- lt_cv_sys_max_cmd_len=-1;
- ;;
- cygwin* | mingw*)
- # On Win9x/ME, this test blows up -- it succeeds, but takes
- # about 5 minutes as the teststring grows exponentially.
- # Worse, since 9x/ME are not pre-emptively multitasking,
- # you end up with a "frozen" computer, even though with patience
- # the test eventually succeeds (with a max line length of 256k).
- # Instead, let's just punt: use the minimum linelength reported by
- # all of the supported platforms: 8192 (on NT/2K/XP).
- lt_cv_sys_max_cmd_len=8192;
- ;;
- amigaos*)
- # On AmigaOS with pdksh, this test takes hours, literally.
- # So we just punt and use a minimum line length of 8192.
- lt_cv_sys_max_cmd_len=8192;
- ;;
- netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- elif test -x /usr/sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
- else
- lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
- fi
- # And add a safety zone
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- ;;
- interix*)
- # We know the value 262144 and hardcode it with a safety zone (like BSD)
- lt_cv_sys_max_cmd_len=196608
- ;;
- osf*)
- # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
- # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
- # nice to cause kernel panics so lets avoid the loop below.
- # First set a reasonable default.
- lt_cv_sys_max_cmd_len=16384
- #
- if test -x /sbin/sysconfig; then
- case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
- *1*) lt_cv_sys_max_cmd_len=-1 ;;
- esac
- fi
- ;;
- sco3.2v5*)
- lt_cv_sys_max_cmd_len=102400
- ;;
- sysv5* | sco5v6* | sysv4.2uw2*)
- kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
- if test -n "$kargmax"; then
- lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
- else
- lt_cv_sys_max_cmd_len=32768
- fi
- ;;
- *)
- lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
- if test -n "$lt_cv_sys_max_cmd_len"; then
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- else
- SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
- while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
- = "XX$teststring") >/dev/null 2>&1 &&
- new_result=`expr "X$teststring" : ".*" 2>&1` &&
- lt_cv_sys_max_cmd_len=$new_result &&
- test $i != 17 # 1/2 MB should be enough
- do
- i=`expr $i + 1`
- teststring=$teststring$teststring
- done
- teststring=
- # Add a significant safety factor because C++ compilers can tack on massive
- # amounts of additional arguments before passing them to the linker.
- # It appears as though 1/2 is a usable value.
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
- fi
- ;;
- esac
-fi
-if test -n $lt_cv_sys_max_cmd_len ; then
- { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
-echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; }
-else
- { echo "$as_me:$LINENO: result: none" >&5
-echo "${ECHO_T}none" >&6; }
-fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
# Check for command to grab the raw symbol name followed by C symbol from nm.
-{ echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
-echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; }
-if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
+$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
+if ${lt_cv_sys_global_symbol_pipe+:} false; then :
+ $as_echo_n "(cached) " >&6
else
# These are sane defaults that work on at least a few old systems.
@@ -5636,33 +6535,18 @@ symcode='[BCDEGRST]'
# Regexp to match symbols that can be accessed directly from C.
sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
-# Transform an extracted symbol line into a proper C declaration
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
-
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
-
# Define system-specific variables.
case $host_os in
aix*)
symcode='[BCDT]'
;;
-cygwin* | mingw* | pw32*)
+cygwin* | mingw* | pw32* | cegcc*)
symcode='[ABCDGISTW]'
;;
-hpux*) # Its linker distinguishes data from code symbols
+hpux*)
if test "$host_cpu" = ia64; then
symcode='[ABCDEGRST]'
fi
- lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
- lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
- ;;
-linux* | k*bsd*-gnu)
- if test "$host_cpu" = ia64; then
- symcode='[ABCDGIRSTW]'
- lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
- lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
- fi
;;
irix* | nonstopux*)
symcode='[BCDEGRST]'
@@ -5687,57 +6571,86 @@ sysv4)
;;
esac
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[ABCDGIRSTW]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
+
# Handle CRLF in mingw tool chain
opt_cr=
case $build_os in
mingw*)
- opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
;;
esac
-# If we're using GNU nm, then use its standard symbol codes.
-case `$NM -V 2>&1` in
-*GNU* | *'with BFD'*)
- symcode='[ABCDGIRSTW]' ;;
-esac
-
-# Try without a prefix undercore, then with it.
+# Try without a prefix underscore, then with it.
for ac_symprfx in "" "_"; do
# Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
symxfrm="\\1 $ac_symprfx\\2 \\2"
# Write the raw and C identifiers.
- lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Fake it for dumpbin and say T for any non-static function
+ # and D for any global variable.
+ # Also find C++ and __fastcall symbols from MSVC++,
+ # which start with @ or ?.
+ lt_cv_sys_global_symbol_pipe="$AWK '"\
+" {last_section=section; section=\$ 3};"\
+" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+" s[1]~/^[@?]/{print s[1], s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+" ' prfx=^$ac_symprfx"
+ else
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ fi
+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
# Check to see that the pipe works correctly.
pipe_works=no
rm -f conftest*
- cat > conftest.$ac_ext <<EOF
+ cat > conftest.$ac_ext <<_LT_EOF
#ifdef __cplusplus
extern "C" {
#endif
char nm_test_var;
-void nm_test_func(){}
+void nm_test_func(void);
+void nm_test_func(void){}
#ifdef __cplusplus
}
#endif
int main(){nm_test_var='a';nm_test_func();return(0);}
-EOF
+_LT_EOF
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
# Now try to grab the symbols.
nlist=conftest.nm
- if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
- (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
+ (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && test -s "$nlist"; then
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s "$nlist"; then
# Try sorting and uniquifying the output.
if sort "$nlist" | uniq > "$nlist"T; then
mv -f "$nlist"T "$nlist"
@@ -5746,57 +6659,71 @@ EOF
fi
# Make sure that we snagged all the symbols we need.
- if grep ' nm_test_var$' "$nlist" >/dev/null; then
- if grep ' nm_test_func$' "$nlist" >/dev/null; then
- cat <<EOF > conftest.$ac_ext
+ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<_LT_EOF > conftest.$ac_ext
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
+ relocations are performed -- see ld's documentation on pseudo-relocs. */
+# define LT_DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data. */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
-EOF
+_LT_EOF
# Now generate the symbol file.
- eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
- cat <<EOF >> conftest.$ac_ext
-#if defined (__STDC__) && __STDC__
-# define lt_ptr_t void *
-#else
-# define lt_ptr_t char *
-# define const
-#endif
+ cat <<_LT_EOF >> conftest.$ac_ext
-/* The mapping between symbol names and symbols. */
-const struct {
+/* The mapping between symbol names and symbols. */
+LT_DLSYM_CONST struct {
const char *name;
- lt_ptr_t address;
+ void *address;
}
-lt_preloaded_symbols[] =
+lt__PROGRAM__LTX_preloaded_symbols[] =
{
-EOF
- $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
- cat <<\EOF >> conftest.$ac_ext
- {0, (lt_ptr_t) 0}
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ cat <<\_LT_EOF >> conftest.$ac_ext
+ {0, (void *) 0}
};
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
#ifdef __cplusplus
}
#endif
-EOF
+_LT_EOF
# Now try linking the two files.
mv conftest.$ac_objext conftstm.$ac_objext
- lt_save_LIBS="$LIBS"
- lt_save_CFLAGS="$CFLAGS"
+ lt_globsym_save_LIBS=$LIBS
+ lt_globsym_save_CFLAGS=$CFLAGS
LIBS="conftstm.$ac_objext"
CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && test -s conftest${ac_exeext}; then
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest${ac_exeext}; then
pipe_works=yes
fi
- LIBS="$lt_save_LIBS"
- CFLAGS="$lt_save_CFLAGS"
+ LIBS=$lt_globsym_save_LIBS
+ CFLAGS=$lt_globsym_save_CFLAGS
else
echo "cannot find nm_test_func in $nlist" >&5
fi
@@ -5810,7 +6737,7 @@ EOF
echo "$progname: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
- rm -f conftest* conftst*
+ rm -rf conftest* conftst*
# Do not use the global_symbol_pipe unless it works.
if test "$pipe_works" = yes; then
@@ -5826,404 +6753,1259 @@ if test -z "$lt_cv_sys_global_symbol_pipe"; then
lt_cv_sys_global_symbol_to_cdecl=
fi
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
- { echo "$as_me:$LINENO: result: failed" >&5
-echo "${ECHO_T}failed" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+$as_echo "failed" >&6; }
else
- { echo "$as_me:$LINENO: result: ok" >&5
-echo "${ECHO_T}ok" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
fi
-{ echo "$as_me:$LINENO: checking for objdir" >&5
-echo $ECHO_N "checking for objdir... $ECHO_C" >&6; }
-if test "${lt_cv_objdir+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
- lt_cv_objdir=.libs
-else
- # MS-DOS does not allow filenames that begin with a dot.
- lt_cv_objdir=_libs
+# Response file support.
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ nm_file_list_spec='@'
+elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
+ nm_file_list_spec='@'
fi
-rmdir .libs 2>/dev/null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
+$as_echo_n "checking for sysroot... " >&6; }
+
+# Check whether --with-sysroot was given.
+if test "${with_sysroot+set}" = set; then :
+ withval=$with_sysroot;
+else
+ with_sysroot=no
fi
-{ echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
-echo "${ECHO_T}$lt_cv_objdir" >&6; }
-objdir=$lt_cv_objdir
+lt_sysroot=
+case ${with_sysroot} in #(
+ yes)
+ if test "$GCC" = yes; then
+ lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+ fi
+ ;; #(
+ /*)
+ lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+ ;; #(
+ no|'')
+ ;; #(
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
+$as_echo "${with_sysroot}" >&6; }
+ as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
+ ;;
+esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
+$as_echo "${lt_sysroot:-no}" >&6; }
-case $host_os in
-aix3*)
- # AIX sometimes has problems with the GCC collect2 program. For some
- # reason, if we set the COLLECT_NAMES environment variable, the problems
- # vanish in a puff of smoke.
- if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
+
+
+
+# Check whether --enable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then :
+ enableval=$enable_libtool_lock;
+fi
+
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *ELF-32*)
+ HPUX_IA64_MODE="32"
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE="64"
+ ;;
+ esac
fi
+ rm -rf conftest*
+ ;;
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '#line '$LINENO' "configure"' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ fi
+ rm -rf conftest*
;;
-esac
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e 1s/^X//'
-sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.o` in
+ *32-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ ppc64-*linux*|powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ ppc*-*linux*|powerpc*-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -belf"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
+$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
+if ${lt_cv_cc_needs_belf+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
+int
+main ()
+{
-# Constants:
-rm="rm -f"
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ lt_cv_cc_needs_belf=yes
+else
+ lt_cv_cc_needs_belf=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
-# Global variables:
-default_ofile=libtool
-can_build_shared=yes
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
+$as_echo "$lt_cv_cc_needs_belf" >&6; }
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
+ ;;
+sparc*-*solaris*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*) LD="${LD-ld} -m elf64_sparc" ;;
+ *)
+ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+ LD="${LD-ld} -64"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+esac
-# All known linkers require a `.a' archive for static linking (except MSVC,
-# which needs '.lib').
-libext=a
-ltmain="$ac_aux_dir/ltmain.sh"
-ofile="$default_ofile"
-with_gnu_ld="$lt_cv_prog_gnu_ld"
+need_locks="$enable_libtool_lock"
if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_AR+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
+set dummy ${ac_tool_prefix}mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
+ if test -n "$MANIFEST_TOOL"; then
+ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
+if test -n "$MANIFEST_TOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
+$as_echo "$MANIFEST_TOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
+ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
+ # Extract the first word of "mt", so it can be a program name with args.
+set dummy mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_MANIFEST_TOOL"; then
+ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
done
+ done
IFS=$as_save_IFS
fi
fi
-AR=$ac_cv_prog_AR
-if test -n "$AR"; then
- { echo "$as_me:$LINENO: result: $AR" >&5
-echo "${ECHO_T}$AR" >&6; }
+ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
+if test -n "$ac_ct_MANIFEST_TOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
+$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
+ if test "x$ac_ct_MANIFEST_TOOL" = x; then
+ MANIFEST_TOOL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
+ fi
+else
+ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
+fi
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
+if ${lt_cv_path_mainfest_tool+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_path_mainfest_tool=no
+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
+ cat conftest.err >&5
+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then
+ lt_cv_path_mainfest_tool=yes
+ fi
+ rm -f conftest*
fi
-if test -z "$ac_cv_prog_AR"; then
- ac_ct_AR=$AR
- # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
+$as_echo "$lt_cv_path_mainfest_tool" >&6; }
+if test "x$lt_cv_path_mainfest_tool" != xyes; then
+ MANIFEST_TOOL=:
+fi
+
+
+
+
+
+
+ case $host_os in
+ rhapsody* | darwin*)
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DSYMUTIL+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- if test -n "$ac_ct_AR"; then
- ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+ if test -n "$DSYMUTIL"; then
+ ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_AR="ar"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DSYMUTIL=$ac_cv_prog_DSYMUTIL
+if test -n "$DSYMUTIL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
+$as_echo "$DSYMUTIL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DSYMUTIL"; then
+ ac_ct_DSYMUTIL=$DSYMUTIL
+ # Extract the first word of "dsymutil", so it can be a program name with args.
+set dummy dsymutil; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DSYMUTIL"; then
+ ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
done
+ done
IFS=$as_save_IFS
fi
fi
-ac_ct_AR=$ac_cv_prog_ac_ct_AR
-if test -n "$ac_ct_AR"; then
- { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
-echo "${ECHO_T}$ac_ct_AR" >&6; }
+ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
+if test -n "$ac_ct_DSYMUTIL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
+$as_echo "$ac_ct_DSYMUTIL" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
- if test "x$ac_ct_AR" = x; then
- AR="false"
+ if test "x$ac_ct_DSYMUTIL" = x; then
+ DSYMUTIL=":"
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
- AR=$ac_ct_AR
+ DSYMUTIL=$ac_ct_DSYMUTIL
fi
else
- AR="$ac_cv_prog_AR"
+ DSYMUTIL="$ac_cv_prog_DSYMUTIL"
fi
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
+set dummy ${ac_tool_prefix}nmedit; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_NMEDIT+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+ if test -n "$NMEDIT"; then
+ ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
IFS=$as_save_IFS
fi
fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
- { echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6; }
+NMEDIT=$ac_cv_prog_NMEDIT
+if test -n "$NMEDIT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
+$as_echo "$NMEDIT" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
fi
-if test -z "$ac_cv_prog_RANLIB"; then
- ac_ct_RANLIB=$RANLIB
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+if test -z "$ac_cv_prog_NMEDIT"; then
+ ac_ct_NMEDIT=$NMEDIT
+ # Extract the first word of "nmedit", so it can be a program name with args.
+set dummy nmedit; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- if test -n "$ac_ct_RANLIB"; then
- ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+ if test -n "$ac_ct_NMEDIT"; then
+ ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_RANLIB="ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ ac_cv_prog_ac_ct_NMEDIT="nmedit"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
IFS=$as_save_IFS
fi
fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
- { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
+ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
+if test -n "$ac_ct_NMEDIT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
+$as_echo "$ac_ct_NMEDIT" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
- if test "x$ac_ct_RANLIB" = x; then
- RANLIB=":"
+ if test "x$ac_ct_NMEDIT" = x; then
+ NMEDIT=":"
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
- RANLIB=$ac_ct_RANLIB
+ NMEDIT=$ac_ct_NMEDIT
fi
else
- RANLIB="$ac_cv_prog_RANLIB"
+ NMEDIT="$ac_cv_prog_NMEDIT"
fi
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
+set dummy ${ac_tool_prefix}lipo; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_LIPO+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+ if test -n "$LIPO"; then
+ ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+LIPO=$ac_cv_prog_LIPO
+if test -n "$LIPO"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
+$as_echo "$LIPO" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_LIPO"; then
+ ac_ct_LIPO=$LIPO
+ # Extract the first word of "lipo", so it can be a program name with args.
+set dummy lipo; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_LIPO"; then
+ ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_LIPO="lipo"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
+if test -n "$ac_ct_LIPO"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
+$as_echo "$ac_ct_LIPO" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_LIPO" = x; then
+ LIPO=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ LIPO=$ac_ct_LIPO
+ fi
+else
+ LIPO="$ac_cv_prog_LIPO"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OTOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OTOOL"; then
+ ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
done
+ done
IFS=$as_save_IFS
fi
fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
- { echo "$as_me:$LINENO: result: $STRIP" >&5
-echo "${ECHO_T}$STRIP" >&6; }
+OTOOL=$ac_cv_prog_OTOOL
+if test -n "$OTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
+$as_echo "$OTOOL" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
fi
-if test -z "$ac_cv_prog_STRIP"; then
- ac_ct_STRIP=$STRIP
- # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+if test -z "$ac_cv_prog_OTOOL"; then
+ ac_ct_OTOOL=$OTOOL
+ # Extract the first word of "otool", so it can be a program name with args.
+set dummy otool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- if test -n "$ac_ct_STRIP"; then
- ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+ if test -n "$ac_ct_OTOOL"; then
+ ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_STRIP="strip"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ ac_cv_prog_ac_ct_OTOOL="otool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
+if test -n "$ac_ct_OTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
+$as_echo "$ac_ct_OTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OTOOL" = x; then
+ OTOOL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OTOOL=$ac_ct_OTOOL
+ fi
+else
+ OTOOL="$ac_cv_prog_OTOOL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool64; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OTOOL64+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OTOOL64"; then
+ ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
done
+ done
IFS=$as_save_IFS
fi
fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
- { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-echo "${ECHO_T}$ac_ct_STRIP" >&6; }
+OTOOL64=$ac_cv_prog_OTOOL64
+if test -n "$OTOOL64"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
+$as_echo "$OTOOL64" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
- if test "x$ac_ct_STRIP" = x; then
- STRIP=":"
+
+fi
+if test -z "$ac_cv_prog_OTOOL64"; then
+ ac_ct_OTOOL64=$OTOOL64
+ # Extract the first word of "otool64", so it can be a program name with args.
+set dummy otool64; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OTOOL64"; then
+ ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OTOOL64="otool64"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
+if test -n "$ac_ct_OTOOL64"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
+$as_echo "$ac_ct_OTOOL64" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OTOOL64" = x; then
+ OTOOL64=":"
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
- STRIP=$ac_ct_STRIP
+ OTOOL64=$ac_ct_OTOOL64
fi
else
- STRIP="$ac_cv_prog_STRIP"
+ OTOOL64="$ac_cv_prog_OTOOL64"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
+$as_echo_n "checking for -single_module linker flag... " >&6; }
+if ${lt_cv_apple_cc_single_mod+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_apple_cc_single_mod=no
+ if test -z "${LT_MULTI_MODULE}"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi_module to the
+ # link flags.
+ rm -rf libconftest.dylib*
+ echo "int foo(void){return 1;}" > conftest.c
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&5
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+ _lt_result=$?
+ if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+ lt_cv_apple_cc_single_mod=yes
+ else
+ cat conftest.err >&5
+ fi
+ rm -rf libconftest.dylib*
+ rm -f conftest.*
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
+$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
+$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
+if ${lt_cv_ld_exported_symbols_list+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ld_exported_symbols_list=no
+ save_LDFLAGS=$LDFLAGS
+ echo "_main" > conftest.sym
+ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ lt_cv_ld_exported_symbols_list=yes
+else
+ lt_cv_ld_exported_symbols_list=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
+$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
+$as_echo_n "checking for -force_load linker flag... " >&6; }
+if ${lt_cv_ld_force_load+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ld_force_load=no
+ cat > conftest.c << _LT_EOF
+int forced_loaded() { return 2;}
+_LT_EOF
+ echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
+ $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
+ echo "$AR cru libconftest.a conftest.o" >&5
+ $AR cru libconftest.a conftest.o 2>&5
+ echo "$RANLIB libconftest.a" >&5
+ $RANLIB libconftest.a 2>&5
+ cat > conftest.c << _LT_EOF
+int main() { return 0;}
+_LT_EOF
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
+ $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
+ _lt_result=$?
+ if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
+ lt_cv_ld_force_load=yes
+ else
+ cat conftest.err >&5
+ fi
+ rm -f conftest.err libconftest.a conftest conftest.c
+ rm -rf conftest.dSYM
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
+$as_echo "$lt_cv_ld_force_load" >&6; }
+ case $host_os in
+ rhapsody* | darwin1.[012])
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+ darwin1.*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ darwin*) # darwin 5.x on
+ # if running on 10.5 or later, the deployment target defaults
+ # to the OS version, if on x86, and 10.4, the deployment
+ # target defaults to 10.4. Don't you love it?
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ 10.[012]*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 10.*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ esac
+ ;;
+ esac
+ if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+ _lt_dar_single_mod='$single_module'
+ fi
+ if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+ _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+ else
+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
+ _lt_dsymutil='~$DSYMUTIL $lib || :'
+ else
+ _lt_dsymutil=
+ fi
+ ;;
+ esac
+
+for ac_header in dlfcn.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_dlfcn_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DLFCN_H 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+# Set options
+# Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then :
+ enableval=$enable_static; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_static=no
+fi
+
+
+
+
+
+
+
+enable_dlopen=yes
+
+
+
+
+ enable_win32_dll=no
+
+
+ # Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+ enableval=$enable_shared; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_shared=yes
+fi
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-pic was given.
+if test "${with_pic+set}" = set; then :
+ withval=$with_pic; pic_mode="$withval"
+else
+ pic_mode=default
+fi
+
+
+test -z "$pic_mode" && pic_mode=default
+
+
+
+
+
+
+
+ # Check whether --enable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then :
+ enableval=$enable_fast_install; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_fast_install=yes
+fi
+
+
+
+
+
+
+
+
+
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+test -z "$LN_S" && LN_S="ln -s"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
+$as_echo_n "checking for objdir... " >&6; }
+if ${lt_cv_objdir+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
+$as_echo "$lt_cv_objdir" >&6; }
+objdir=$lt_cv_objdir
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define LT_OBJDIR "$lt_cv_objdir/"
+_ACEOF
+
+
+
+
+case $host_os in
+aix3*)
+ # AIX sometimes has problems with the GCC collect2 program. For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+with_gnu_ld="$lt_cv_prog_gnu_ld"
old_CC="$CC"
old_CFLAGS="$CFLAGS"
# Set sane defaults for various variables
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-test -z "$AS" && AS=as
test -z "$CC" && CC=cc
test -z "$LTCC" && LTCC=$CC
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
-test -z "$DLLTOOL" && DLLTOOL=dlltool
test -z "$LD" && LD=ld
-test -z "$LN_S" && LN_S="ln -s"
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-test -z "$NM" && NM=nm
-test -z "$SED" && SED=sed
-test -z "$OBJDUMP" && OBJDUMP=objdump
-test -z "$RANLIB" && RANLIB=:
-test -z "$STRIP" && STRIP=:
test -z "$ac_objext" && ac_objext=o
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
- case $host_os in
- openbsd*)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
- ;;
- *)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
- ;;
- esac
- old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-fi
-
for cc_temp in $compiler""; do
case $cc_temp in
compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
@@ -6232,17 +8014,18 @@ for cc_temp in $compiler""; do
*) break;;
esac
done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
-echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; }
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
+$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
+if ${lt_cv_path_MAGIC_CMD+:} false; then :
+ $as_echo_n "(cached) " >&6
else
case $MAGIC_CMD in
[\\/*] | ?:[\\/]*)
@@ -6266,7 +8049,7 @@ else
$EGREP "$file_magic_regex" > /dev/null; then
:
else
- cat <<EOF 1>&2
+ cat <<_LT_EOF 1>&2
*** Warning: the command libtool uses to detect shared libraries,
*** $file_magic_cmd, produces output that libtool cannot recognize.
@@ -6277,7 +8060,7 @@ else
*** may want to report the problem to your system manager and/or to
*** bug-libtool@gnu.org
-EOF
+_LT_EOF
fi ;;
esac
fi
@@ -6292,19 +8075,23 @@ fi
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if test -n "$MAGIC_CMD"; then
- { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-echo "${ECHO_T}$MAGIC_CMD" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
+
+
+
+
if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
- { echo "$as_me:$LINENO: checking for file" >&5
-echo $ECHO_N "checking for file... $ECHO_C" >&6; }
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
+$as_echo_n "checking for file... " >&6; }
+if ${lt_cv_path_MAGIC_CMD+:} false; then :
+ $as_echo_n "(cached) " >&6
else
case $MAGIC_CMD in
[\\/*] | ?:[\\/]*)
@@ -6328,7 +8115,7 @@ else
$EGREP "$file_magic_regex" > /dev/null; then
:
else
- cat <<EOF 1>&2
+ cat <<_LT_EOF 1>&2
*** Warning: the command libtool uses to detect shared libraries,
*** $file_magic_cmd, produces output that libtool cannot recognize.
@@ -6339,7 +8126,7 @@ else
*** may want to report the problem to your system manager and/or to
*** bug-libtool@gnu.org
-EOF
+_LT_EOF
fi ;;
esac
fi
@@ -6354,13 +8141,14 @@ fi
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if test -n "$MAGIC_CMD"; then
- { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-echo "${ECHO_T}$MAGIC_CMD" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
+
else
MAGIC_CMD=:
fi
@@ -6370,28 +8158,8 @@ fi
;;
esac
-enable_dlopen=no
-enable_win32_dll=no
-
-# Check whether --enable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then
- enableval=$enable_libtool_lock;
-fi
-
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-
-# Check whether --with-pic was given.
-if test "${with_pic+set}" = set; then
- withval=$with_pic; pic_mode="$withval"
-else
- pic_mode=default
-fi
-
-test -z "$pic_mode" && pic_mode=default
-
# Use C for the default configuration in the libtool script
-tagname=
+
lt_save_CC="$CC"
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -6414,6 +8182,11 @@ lt_simple_compile_test_code="int some_variable = 0;"
lt_simple_link_test_code='int main(){return(0);}'
+
+
+
+
+
# If no C compiler was specified, use CC.
LTCC=${LTCC-"$CC"}
@@ -6423,35 +8196,43 @@ LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
# Allow CC to be a program name with arguments.
compiler=$CC
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
# save warnings/boilerplate of simple test code
ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" >conftest.$ac_ext
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_compiler_boilerplate=`cat conftest.err`
-$rm conftest*
+$RM conftest*
ac_outfile=conftest.$ac_objext
echo "$lt_simple_link_test_code" >conftest.$ac_ext
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_linker_boilerplate=`cat conftest.err`
-$rm conftest*
+$RM -r conftest*
+if test -n "$compiler"; then
lt_prog_compiler_no_builtin_flag=
if test "$GCC" = yes; then
- lt_prog_compiler_no_builtin_flag=' -fno-builtin'
-
+ case $cc_basename in
+ nvcc*)
+ lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
+ *)
+ lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
+ esac
-{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
-echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; }
-if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
+if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
+ $as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_rtti_exceptions=no
- ac_outfile=conftest.$ac_objext
+ ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="-fno-rtti -fno-exceptions"
# Insert the option either (1) after the last *FLAGS variable, or
@@ -6463,25 +8244,25 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6466: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6470: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
- $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
lt_cv_prog_compiler_rtti_exceptions=yes
fi
fi
- $rm conftest*
+ $RM conftest*
fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
@@ -6491,12 +8272,15 @@ fi
fi
-lt_prog_compiler_wl=
+
+
+
+
+
+ lt_prog_compiler_wl=
lt_prog_compiler_pic=
lt_prog_compiler_static=
-{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
if test "$GCC" = yes; then
lt_prog_compiler_wl='-Wl,'
@@ -6512,17 +8296,25 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
;;
amigaos*)
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
;;
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
- mingw* | cygwin* | pw32* | os2*)
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
# Although the cygwin gcc ignores -fPIC, still need this for old-style
@@ -6536,6 +8328,26 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
lt_prog_compiler_pic='-fno-common'
;;
+ haiku*)
+ # PIC is the default for Haiku.
+ # The "-static" flag exists, but is broken.
+ lt_prog_compiler_static=
+ ;;
+
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+ ;;
+
interix[3-9]*)
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
# Instead, we relocate shared libraries at runtime.
@@ -6548,29 +8360,29 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
enable_shared=no
;;
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
sysv4*MP*)
if test -d /usr/nec; then
lt_prog_compiler_pic=-Kconform_pic
fi
;;
- hpux*)
- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
- # not for PA HP-UX.
- case $host_cpu in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- lt_prog_compiler_pic='-fPIC'
- ;;
- esac
- ;;
-
*)
lt_prog_compiler_pic='-fPIC'
;;
esac
+
+ case $cc_basename in
+ nvcc*) # Cuda Compiler Driver 2.2
+ lt_prog_compiler_wl='-Xlinker '
+ lt_prog_compiler_pic='-Xcompiler -fPIC'
+ ;;
+ esac
else
# PORTME Check for flag to pass linker flags through the system compiler.
case $host_os in
@@ -6583,18 +8395,8 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
fi
;;
- darwin*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- case $cc_basename in
- xlc*)
- lt_prog_compiler_pic='-qnocommon'
- lt_prog_compiler_wl='-Wl,'
- ;;
- esac
- ;;
- mingw* | cygwin* | pw32* | os2*)
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
lt_prog_compiler_pic='-DDLL_EXPORT'
@@ -6622,19 +8424,34 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
lt_prog_compiler_static='-non_shared'
;;
- newsos6)
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- ;;
-
- linux* | k*bsd*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
case $cc_basename in
- icc* | ecc*)
+ # old Intel for x86_64 which still supported -KPIC.
+ ecc*)
lt_prog_compiler_wl='-Wl,'
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-static'
;;
- pgcc* | pgf77* | pgf90* | pgf95*)
+ # icc used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ icc* | ifort*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ # Lahey Fortran 8.1.
+ lf95*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='--shared'
+ lt_prog_compiler_static='--static'
+ ;;
+ nagfor*)
+ # NAG Fortran compiler
+ lt_prog_compiler_wl='-Wl,-Wl,,'
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
# Portland Group compilers (*not* the Pentium gcc compiler,
# which looks to be a dead project)
lt_prog_compiler_wl='-Wl,'
@@ -6646,25 +8463,42 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
# All Alpha code is PIC.
lt_prog_compiler_static='-non_shared'
;;
+ xl* | bgxl* | bgf* | mpixl*)
+ # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-qpic'
+ lt_prog_compiler_static='-qstaticlink'
+ ;;
*)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C 5.9
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ F* | *Sun*Fortran*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-Bstatic'
- lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_wl=''
;;
- *Sun\ F*)
- # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ *Sun\ C*)
+ # Sun C 5.9
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-Bstatic'
- lt_prog_compiler_wl=''
+ lt_prog_compiler_wl='-Wl,'
;;
esac
;;
esac
;;
+ newsos6)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
osf3* | osf4* | osf5*)
lt_prog_compiler_wl='-Wl,'
# All OSF/1 code is PIC.
@@ -6679,7 +8513,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-Bstatic'
case $cc_basename in
- f77* | f90* | f95*)
+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
lt_prog_compiler_wl='-Qoption ld ';;
*)
lt_prog_compiler_wl='-Wl,';;
@@ -6727,21 +8561,38 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
esac
fi
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic" >&6; }
+case $host_os in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ lt_prog_compiler_pic=
+ ;;
+ *)
+ lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+ ;;
+esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+if ${lt_cv_prog_compiler_pic+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
+$as_echo "$lt_cv_prog_compiler_pic" >&6; }
+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
#
# Check to make sure the PIC flag actually works.
#
if test -n "$lt_prog_compiler_pic"; then
-
-{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; }
-if test "${lt_prog_compiler_pic_works+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
+if ${lt_cv_prog_compiler_pic_works+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- lt_prog_compiler_pic_works=no
- ac_outfile=conftest.$ac_objext
+ lt_cv_prog_compiler_pic_works=no
+ ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
# Insert the option either (1) after the last *FLAGS variable, or
@@ -6753,27 +8604,27 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6756: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6760: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
- $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
- lt_prog_compiler_pic_works=yes
+ lt_cv_prog_compiler_pic_works=yes
fi
fi
- $rm conftest*
+ $RM conftest*
fi
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
-if test x"$lt_prog_compiler_pic_works" = xyes; then
+if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
case $lt_prog_compiler_pic in
"" | " "*) ;;
*) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
@@ -6784,26 +8635,27 @@ else
fi
fi
-case $host_os in
- # For platforms which do not support PIC, -DPIC is meaningless:
- *djgpp*)
- lt_prog_compiler_pic=
- ;;
- *)
- lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
- ;;
-esac
+
+
+
+
+
+
+
+
+
+
#
# Check to make sure the static flag actually works.
#
wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
-{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
-if test "${lt_prog_compiler_static_works+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if ${lt_cv_prog_compiler_static_works+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- lt_prog_compiler_static_works=no
+ lt_cv_prog_compiler_static_works=no
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
echo "$lt_simple_link_test_code" > conftest.$ac_ext
@@ -6813,36 +8665,41 @@ else
if test -s conftest.err; then
# Append any errors to the config.log.
cat conftest.err 1>&5
- $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+ $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
if diff conftest.exp conftest.er2 >/dev/null; then
- lt_prog_compiler_static_works=yes
+ lt_cv_prog_compiler_static_works=yes
fi
else
- lt_prog_compiler_static_works=yes
+ lt_cv_prog_compiler_static_works=yes
fi
fi
- $rm conftest*
+ $RM -r conftest*
LDFLAGS="$save_LDFLAGS"
fi
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
-echo "${ECHO_T}$lt_prog_compiler_static_works" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
+$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
-if test x"$lt_prog_compiler_static_works" = xyes; then
+if test x"$lt_cv_prog_compiler_static_works" = xyes; then
:
else
lt_prog_compiler_static=
fi
-{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
-if test "${lt_cv_prog_compiler_c_o+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if ${lt_cv_prog_compiler_c_o+:} false; then :
+ $as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_c_o=no
- $rm -r conftest 2>/dev/null
+ $RM -r conftest 2>/dev/null
mkdir conftest
cd conftest
mkdir out
@@ -6857,83 +8714,148 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6860: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:6864: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
- $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
$SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
lt_cv_prog_compiler_c_o=yes
fi
fi
chmod u+w . 2>&5
- $rm conftest*
+ $RM conftest*
# SGI C++ compiler will create directory out/ii_files/ for
# template instantiation
- test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
- $rm out/* && rmdir out
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
cd ..
- rmdir conftest
- $rm conftest*
+ $RM -r conftest
+ $RM conftest*
fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if ${lt_cv_prog_compiler_c_o+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+
hard_links="nottested"
if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
# do not overwrite the value of need_locks provided by the user
- { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
hard_links=yes
- $rm conftest*
+ $RM conftest*
ln conftest.a conftest.b 2>/dev/null && hard_links=no
touch conftest.a
ln conftest.a conftest.b 2>&5 || hard_links=no
ln conftest.a conftest.b 2>/dev/null && hard_links=no
- { echo "$as_me:$LINENO: result: $hard_links" >&5
-echo "${ECHO_T}$hard_links" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
if test "$hard_links" = no; then
- { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
need_locks=warn
fi
else
need_locks=no
fi
-{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
runpath_var=
allow_undefined_flag=
- enable_shared_with_static_runtimes=no
+ always_export_symbols=no
archive_cmds=
archive_expsym_cmds=
- old_archive_From_new_cmds=
- old_archive_from_expsyms_cmds=
+ compiler_needs_object=no
+ enable_shared_with_static_runtimes=no
export_dynamic_flag_spec=
- whole_archive_flag_spec=
- thread_safe_flag_spec=
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ hardcode_automatic=no
+ hardcode_direct=no
+ hardcode_direct_absolute=no
hardcode_libdir_flag_spec=
hardcode_libdir_flag_spec_ld=
hardcode_libdir_separator=
- hardcode_direct=no
hardcode_minus_L=no
hardcode_shlibpath_var=unsupported
+ inherit_rpath=no
link_all_deplibs=unknown
- hardcode_automatic=no
module_cmds=
module_expsym_cmds=
- always_export_symbols=no
- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ old_archive_from_new_cmds=
+ old_archive_from_expsyms_cmds=
+ thread_safe_flag_spec=
+ whole_archive_flag_spec=
# include_expsyms should be a list of space-separated symbols to be *always*
# included in the symbol list
include_expsyms=
@@ -6941,26 +8863,17 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar
# it will be wrapped by ` (' and `)$', so one must not match beginning or
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
# as well as any symbol that contains `d'.
- exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
+ exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
# platforms (ab)use it in PIC code, but their linkers get confused if
# the symbol is explicitly referenced. Since portable code cannot
# rely on this symbol name, it's probably fine to never include it in
# preloaded symbol tables.
+ # Exclude shared library initialization/finalization symbols.
extract_expsyms_cmds=
- # Just being paranoid about ensuring that cc_basename is set.
- for cc_temp in $compiler""; do
- case $cc_temp in
- compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
- distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
- \-*) ;;
- *) break;;
- esac
-done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
case $host_os in
- cygwin* | mingw* | pw32*)
+ cygwin* | mingw* | pw32* | cegcc*)
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
@@ -6978,7 +8891,33 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
esac
ld_shlibs=yes
+
+ # On some targets, GNU ld is compatible enough with the native linker
+ # that we're better off using the native interface for both.
+ lt_use_gnu_ld_interface=no
if test "$with_gnu_ld" = yes; then
+ case $host_os in
+ aix*)
+ # The AIX port of GNU ld has always aspired to compatibility
+ # with the native linker. However, as the warning in the GNU ld
+ # block says, versions before 2.19.5* couldn't really create working
+ # shared libraries, regardless of the interface used.
+ case `$LD -v 2>&1` in
+ *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
+ *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
+ *\ \(GNU\ Binutils\)\ [3-9]*) ;;
+ *)
+ lt_use_gnu_ld_interface=yes
+ ;;
+ esac
+ ;;
+ *)
+ lt_use_gnu_ld_interface=yes
+ ;;
+ esac
+ fi
+
+ if test "$lt_use_gnu_ld_interface" = yes; then
# If archive_cmds runs LD, not CC, wlarc should be empty
wlarc='${wl}'
@@ -6986,16 +8925,17 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
# are reset later if shared libraries are not supported. Putting them
# here allows them to be overridden if necessary.
runpath_var=LD_RUN_PATH
- hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
export_dynamic_flag_spec='${wl}--export-dynamic'
# ancient GNU ld didn't support --whole-archive et. al.
- if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
- whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- whole_archive_flag_spec=
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ whole_archive_flag_spec=
fi
supports_anon_versioning=no
- case `$LD -v 2>/dev/null` in
+ case `$LD -v 2>&1` in
+ *GNU\ gold*) supports_anon_versioning=yes ;;
*\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
*\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
@@ -7005,38 +8945,40 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
# See if GNU ld supports shared libraries.
case $host_os in
- aix3* | aix4* | aix5*)
+ aix[3-9]*)
# On AIX/PPC, the GNU linker is very broken
if test "$host_cpu" != ia64; then
ld_shlibs=no
- cat <<EOF 1>&2
+ cat <<_LT_EOF 1>&2
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** Warning: the GNU linker, at least up to release 2.19, is reported
*** to be unable to reliably create shared libraries on AIX.
*** Therefore, libtool is disabling shared libraries support. If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
+*** really care for shared libraries, you may want to install binutils
+*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
+*** You will then need to restart the configuration process.
-EOF
+_LT_EOF
fi
;;
amigaos*)
- archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
-
- # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
- # that the semantics of dynamic libraries on AmigaOS, at least up
- # to version 4, is to share data among multiple programs linked
- # with the same dynamic library. Since this doesn't match the
- # behavior of shared libraries on other platforms, we can't use
- # them.
- ld_shlibs=no
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds=''
+ ;;
+ m68k)
+ archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
;;
beos*)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
allow_undefined_flag=unsupported
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
# support --undefined. This deserves some investigation. FIXME
@@ -7046,16 +8988,18 @@ EOF
fi
;;
- cygwin* | mingw* | pw32*)
- # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+ cygwin* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
# as there is no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
+ export_dynamic_flag_spec='${wl}--export-all-symbols'
allow_undefined_flag=unsupported
always_export_symbols=no
enable_shared_with_static_runtimes=yes
- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
- if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
# If the export-symbols file already is a .def file (1st line
# is EXPORTS), use it as is; otherwise, prepend...
@@ -7071,6 +9015,11 @@ EOF
fi
;;
+ haiku*)
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ link_all_deplibs=yes
+ ;;
+
interix[3-9]*)
hardcode_direct=no
hardcode_shlibpath_var=no
@@ -7086,60 +9035,95 @@ EOF
archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
- gnu* | linux* | k*bsd*-gnu)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- tmp_addflag=
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+ tmp_diet=no
+ if test "$host_os" = linux-dietlibc; then
+ case $cc_basename in
+ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
+ esac
+ fi
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ && test "$tmp_diet" = no
+ then
+ tmp_addflag=' $pic_flag'
+ tmp_sharedflag='-shared'
case $cc_basename,$host_cpu in
- pgcc*) # Portland Group C compiler
- whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+ pgcc*) # Portland Group C compiler
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
tmp_addflag=' $pic_flag'
;;
- pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
- whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+ pgf77* | pgf90* | pgf95* | pgfortran*)
+ # Portland Group f77 and f90 compilers
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
tmp_addflag=' $pic_flag -Mnomain' ;;
- ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
tmp_addflag=' -i_dynamic' ;;
efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
tmp_addflag=' -i_dynamic -nofor_main' ;;
ifc* | ifort*) # Intel Fortran compiler
tmp_addflag=' -nofor_main' ;;
+ lf95*) # Lahey Fortran 8.1
+ whole_archive_flag_spec=
+ tmp_sharedflag='--shared' ;;
+ xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
+ nvcc*) # Cuda Compiler Driver 2.2
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ compiler_needs_object=yes
+ ;;
esac
case `$CC -V 2>&1 | sed 5q` in
*Sun\ C*) # Sun C 5.9
- whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+ whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ compiler_needs_object=yes
tmp_sharedflag='-G' ;;
*Sun\ F*) # Sun Fortran 8.3
tmp_sharedflag='-G' ;;
- *)
- tmp_sharedflag='-shared' ;;
esac
archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- if test $supports_anon_versioning = yes; then
- archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- $echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
- fi
+ if test "x$supports_anon_versioning" = xyes; then
+ archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+
+ case $cc_basename in
+ xlf* | bgf* | bgxlf* | mpixlf*)
+ # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+ whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
+ hardcode_libdir_flag_spec=
+ hardcode_libdir_flag_spec_ld='-rpath $libdir'
+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ esac
else
- ld_shlibs=no
+ ld_shlibs=no
fi
;;
netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
else
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
fi
;;
solaris*)
- if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
ld_shlibs=no
- cat <<EOF 1>&2
+ cat <<_LT_EOF 1>&2
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
*** create shared libraries on Solaris systems. Therefore, libtool
@@ -7148,10 +9132,10 @@ EOF
*** your PATH or compiler configuration so that the native linker is
*** used, and then restart.
-EOF
- elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
else
ld_shlibs=no
fi
@@ -7173,10 +9157,14 @@ EOF
_LT_EOF
;;
*)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
else
ld_shlibs=no
fi
@@ -7192,9 +9180,9 @@ _LT_EOF
;;
*)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
else
ld_shlibs=no
fi
@@ -7224,7 +9212,7 @@ _LT_EOF
fi
;;
- aix4* | aix5*)
+ aix[4-9]*)
if test "$host_cpu" = ia64; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
@@ -7234,22 +9222,24 @@ _LT_EOF
else
# If we're using GNU nm, then we don't want the "-C" option.
# -C means demangle to AIX nm, but means don't demangle with GNU nm
- if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
- export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+ # Also, AIX nm treats weak defined symbols like other global
+ # defined symbols, whereas GNU nm marks them as "W".
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
else
- export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
fi
aix_use_runtimelinking=no
# Test if we are trying to use run time linking or normal
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
# need to do runtime linking.
- case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
for ld_flag in $LDFLAGS; do
- if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
- aix_use_runtimelinking=yes
- break
- fi
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
done
;;
esac
@@ -7266,28 +9256,30 @@ _LT_EOF
archive_cmds=''
hardcode_direct=yes
+ hardcode_direct_absolute=yes
hardcode_libdir_separator=':'
link_all_deplibs=yes
+ file_list_spec='${wl}-f,'
if test "$GCC" = yes; then
case $host_os in aix4.[012]|aix4.[012].*)
# We only want to do this on AIX 4.2 and lower, the check
# below for broken collect2 doesn't work under 4.3+
collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" && \
- strings "$collect2name" | grep resolve_lib_name >/dev/null
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
then
- # We have reworked collect2
- :
+ # We have reworked collect2
+ :
else
- # We have old collect2
- hardcode_direct=unsupported
- # It fails to find uninstalled libraries when the uninstalled
- # path is not listed in the libpath. Setting hardcode_minus_L
- # to unsupported forces relinking
- hardcode_minus_L=yes
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_libdir_separator=
+ # We have old collect2
+ hardcode_direct=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ hardcode_minus_L=yes
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_libdir_separator=
fi
;;
esac
@@ -7298,8 +9290,8 @@ _LT_EOF
else
# not using gcc
if test "$host_cpu" = ia64; then
- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
- # chokes on -Wl,-G. The following line is correct:
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
shared_flag='-G'
else
if test "$aix_use_runtimelinking" = yes; then
@@ -7310,6 +9302,7 @@ _LT_EOF
fi
fi
+ export_dynamic_flag_spec='${wl}-bexpall'
# It seems that -bexpall does not export symbols beginning with
# underscore (_), so it is better to generate a list of symbols to export.
always_export_symbols=yes
@@ -7317,12 +9310,15 @@ _LT_EOF
# Warning - without using the other runtime loading flags (-brtl),
# -berok will link without error, but may produce a broken library.
allow_undefined_flag='-berok'
- # Determine the default libpath from the value encoded in an empty executable.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ if test "${lt_cv_aix_libpath+set}" = set; then
+ aix_libpath=$lt_cv_aix_libpath
+else
+ if ${lt_cv_aix_libpath_+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -7333,62 +9329,49 @@ main ()
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
-
-lt_aix_libpath_sed='
- /Import File Strings/,/^$/ {
- /^0/ {
- s/^0 *\(.*\)$/\1/
- p
- }
- }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_link "$LINENO"; then :
+ lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\([^ ]*\) *$/\1/
+ p
+ }
+ }'
+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$lt_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test -z "$lt_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_="/usr/lib:/lib"
+ fi
fi
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+ aix_libpath=$lt_cv_aix_libpath_
+fi
- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
- archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
- else
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
if test "$host_cpu" = ia64; then
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
allow_undefined_flag="-z nodefs"
archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
else
- # Determine the default libpath from the value encoded in an empty executable.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ if test "${lt_cv_aix_libpath+set}" = set; then
+ aix_libpath=$lt_cv_aix_libpath
+else
+ if ${lt_cv_aix_libpath_+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -7399,55 +9382,44 @@ main ()
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
-
-lt_aix_libpath_sed='
- /Import File Strings/,/^$/ {
- /^0/ {
- s/^0 *\(.*\)$/\1/
- p
- }
- }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_link "$LINENO"; then :
+ lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\([^ ]*\) *$/\1/
+ p
+ }
+ }'
+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$lt_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test -z "$lt_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_="/usr/lib:/lib"
+ fi
fi
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+ aix_libpath=$lt_cv_aix_libpath_
+fi
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
# Warning - without using the other run time loading flags,
# -berok will link without error, but may produce a broken library.
no_undefined_flag=' ${wl}-bernotok'
allow_undefined_flag=' ${wl}-berok'
- # Exported symbols can be pulled into shared objects from archives
- whole_archive_flag_spec='$convenience'
+ if test "$with_gnu_ld" = yes; then
+ # We only use this code for GNU lds that support --whole-archive.
+ whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ else
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec='$convenience'
+ fi
archive_cmds_need_lc=yes
# This is similar to how AIX traditionally builds its shared libraries.
archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
@@ -7456,86 +9428,117 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
amigaos*)
- archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- # see comment about different semantics on the GNU ld section
- ld_shlibs=no
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds=''
+ ;;
+ m68k)
+ archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
;;
bsdi[45]*)
export_dynamic_flag_spec=-rdynamic
;;
- cygwin* | mingw* | pw32*)
+ cygwin* | mingw* | pw32* | cegcc*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
- hardcode_libdir_flag_spec=' '
- allow_undefined_flag=unsupported
- # Tell ltmain to make .lib files, not .a files.
- libext=lib
- # Tell ltmain to make .dll files, not .so files.
- shrext_cmds=".dll"
- # FIXME: Setting linknames here is a bad hack.
- archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
- # The linker will automatically build a .lib file if we build a DLL.
- old_archive_From_new_cmds='true'
- # FIXME: Should let the user specify the lib program.
- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
- fix_srcfile_path='`cygpath -w "$srcfile"`'
- enable_shared_with_static_runtimes=yes
+ case $cc_basename in
+ cl*)
+ # Native MSVC
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=unsupported
+ always_export_symbols=yes
+ file_list_spec='@'
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+ else
+ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
+ # The linker will not automatically build a static lib if we build a DLL.
+ # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
+ enable_shared_with_static_runtimes=yes
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+ # Don't use ranlib
+ old_postinstall_cmds='chmod 644 $oldlib'
+ postlink_cmds='lt_outputfile="@OUTPUT@"~
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile="$lt_outputfile.exe"
+ lt_tool_outputfile="$lt_tool_outputfile.exe"
+ ;;
+ esac~
+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
+ ;;
+ *)
+ # Assume MSVC wrapper
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ old_archive_from_new_cmds='true'
+ # FIXME: Should let the user specify the lib program.
+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ enable_shared_with_static_runtimes=yes
+ ;;
+ esac
;;
darwin* | rhapsody*)
- case $host_os in
- rhapsody* | darwin1.[012])
- allow_undefined_flag='${wl}-undefined ${wl}suppress'
- ;;
- *) # Darwin 1.3 on
- if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
- allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
- else
- case ${MACOSX_DEPLOYMENT_TARGET} in
- 10.[012])
- allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
- ;;
- 10.*)
- allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
- ;;
- esac
- fi
- ;;
- esac
- archive_cmds_need_lc=no
- hardcode_direct=no
- hardcode_automatic=yes
- hardcode_shlibpath_var=unsupported
- whole_archive_flag_spec=''
- link_all_deplibs=yes
- if test "$GCC" = yes ; then
- output_verbose_link_cmd='echo'
- archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- else
- case $cc_basename in
- xlc*)
- output_verbose_link_cmd='echo'
- archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
- module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- ;;
- *)
- ld_shlibs=no
- ;;
- esac
- fi
+
+
+ archive_cmds_need_lc=no
+ hardcode_direct=no
+ hardcode_automatic=yes
+ hardcode_shlibpath_var=unsupported
+ if test "$lt_cv_ld_force_load" = "yes"; then
+ whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+ else
+ whole_archive_flag_spec=''
+ fi
+ link_all_deplibs=yes
+ allow_undefined_flag="$_lt_dar_allow_undefined"
+ case $cc_basename in
+ ifort*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test "$_lt_dar_can_shared" = "yes"; then
+ output_verbose_link_cmd=func_echo_all
+ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+
+ else
+ ld_shlibs=no
+ fi
+
;;
dgux*)
@@ -7544,10 +9547,6 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hardcode_shlibpath_var=no
;;
- freebsd1*)
- ld_shlibs=no
- ;;
-
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
# support. Future versions do this automatically, but an explicit c++rt0.o
# does not break anything, and helps significantly (at the cost of a little
@@ -7560,7 +9559,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
- freebsd2*)
+ freebsd2.*)
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
hardcode_direct=yes
hardcode_minus_L=yes
@@ -7569,7 +9568,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
freebsd* | dragonfly*)
- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
@@ -7577,9 +9576,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hpux9*)
if test "$GCC" = yes; then
- archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
else
- archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
fi
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
@@ -7592,18 +9591,18 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
hpux10*)
- if test "$GCC" = yes -a "$with_gnu_ld" = no; then
- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
else
archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
fi
if test "$with_gnu_ld" = no; then
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_flag_spec_ld='+b $libdir'
hardcode_libdir_separator=:
-
hardcode_direct=yes
+ hardcode_direct_absolute=yes
export_dynamic_flag_spec='${wl}-E'
-
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
@@ -7611,16 +9610,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
hpux11*)
- if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ if test "$GCC" = yes && test "$with_gnu_ld" = no; then
case $host_cpu in
hppa*64*)
archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
ia64*)
- archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
;;
*)
- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
;;
esac
else
@@ -7632,7 +9631,46 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
;;
*)
- archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+
+ # Older versions of the 11.00 compiler do not understand -b yet
+ # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
+$as_echo_n "checking if $CC understands -b... " >&6; }
+if ${lt_cv_prog_compiler__b+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler__b=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -b"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler__b=yes
+ fi
+ else
+ lt_cv_prog_compiler__b=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
+$as_echo "$lt_cv_prog_compiler__b" >&6; }
+
+if test x"$lt_cv_prog_compiler__b" = xyes; then
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+else
+ archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+fi
+
;;
esac
fi
@@ -7642,12 +9680,12 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
case $host_cpu in
hppa*64*|ia64*)
- hardcode_libdir_flag_spec_ld='+b $libdir'
hardcode_direct=no
hardcode_shlibpath_var=no
;;
*)
hardcode_direct=yes
+ hardcode_direct_absolute=yes
export_dynamic_flag_spec='${wl}-E'
# hardcode_minus_L: Not really in the search PATH,
@@ -7660,18 +9698,49 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
irix5* | irix6* | nonstopux*)
if test "$GCC" = yes; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ # Try to use the -exported_symbol ld option, if it does not
+ # work, assume that -exports_file does not work either and
+ # implicitly export all symbols.
+ # This should be the same for all languages, so no per-tag cache variable.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
+if ${lt_cv_irix_exported_symbol+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo (void) { return 0; }
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ lt_cv_irix_exported_symbol=yes
+else
+ lt_cv_irix_exported_symbol=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$save_LDFLAGS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
+$as_echo "$lt_cv_irix_exported_symbol" >&6; }
+ if test "$lt_cv_irix_exported_symbol" = yes; then
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+ fi
else
- archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
- hardcode_libdir_flag_spec_ld='-rpath $libdir'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
fi
+ archive_cmds_need_lc='no'
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
+ inherit_rpath=yes
link_all_deplibs=yes
;;
netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
else
archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
@@ -7689,11 +9758,15 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hardcode_shlibpath_var=no
;;
+ *nto* | *qnx*)
+ ;;
+
openbsd*)
if test -f /usr/libexec/ld.so; then
hardcode_direct=yes
hardcode_shlibpath_var=no
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ hardcode_direct_absolute=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
@@ -7709,7 +9782,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
;;
esac
- fi
+ fi
else
ld_shlibs=no
fi
@@ -7719,18 +9792,19 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
allow_undefined_flag=unsupported
- archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
- old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
;;
osf3*)
if test "$GCC" = yes; then
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
else
allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
fi
+ archive_cmds_need_lc='no'
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
@@ -7738,32 +9812,43 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
osf4* | osf5*) # as osf3* with the addition of -msym flag
if test "$GCC" = yes; then
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
else
allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
- archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
- $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
# Both c and cxx compiler support -rpath directly
hardcode_libdir_flag_spec='-rpath $libdir'
fi
+ archive_cmds_need_lc='no'
hardcode_libdir_separator=:
;;
solaris*)
- no_undefined_flag=' -z text'
+ no_undefined_flag=' -z defs'
if test "$GCC" = yes; then
wlarc='${wl}'
- archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
- $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
else
- wlarc=''
- archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
- archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ ;;
+ *)
+ wlarc='${wl}'
+ archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
fi
hardcode_libdir_flag_spec='-R$libdir'
hardcode_shlibpath_var=no
@@ -7773,7 +9858,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# The compiler driver will combine and reorder linker options,
# but understands `-z linker_flag'. GCC discards it without `$wl',
# but is careful enough not to reorder.
- # Supported since Solaris 2.6 (maybe 2.5.1?)
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
if test "$GCC" = yes; then
whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
else
@@ -7862,18 +9947,18 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
allow_undefined_flag='${wl}-z,nodefs'
archive_cmds_need_lc=no
hardcode_shlibpath_var=no
- hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+ hardcode_libdir_flag_spec='${wl}-R,$libdir'
hardcode_libdir_separator=':'
link_all_deplibs=yes
export_dynamic_flag_spec='${wl}-Bexport'
runpath_var='LD_RUN_PATH'
if test "$GCC" = yes; then
- archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
else
- archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
fi
;;
@@ -7887,12 +9972,36 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
ld_shlibs=no
;;
esac
+
+ if test x$host_vendor = xsni; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ export_dynamic_flag_spec='${wl}-Blargedynsym'
+ ;;
+ esac
+ fi
fi
-{ echo "$as_me:$LINENO: result: $ld_shlibs" >&5
-echo "${ECHO_T}$ld_shlibs" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
+$as_echo "$ld_shlibs" >&6; }
test "$ld_shlibs" = no && can_build_shared=no
+with_gnu_ld=$with_gnu_ld
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#
# Do we need to explicitly link libc?
#
@@ -7910,83 +10019,239 @@ x|xyes)
# Test whether the compiler implicitly links with -lc since on some
# systems, -lgcc has to come before -lc. If gcc already passes -lc
# to ld, don't add -lc before -lgcc.
- { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
- $rm conftest*
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
+if ${lt_cv_archive_cmds_need_lc+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ $RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } 2>conftest.err; then
- soname=conftest
- lib=conftest
- libobjs=conftest.$ac_objext
- deplibs=
- wl=$lt_prog_compiler_wl
- pic_flag=$lt_prog_compiler_pic
- compiler_flags=-v
- linker_flags=-v
- verstring=
- output_objdir=.
- libname=conftest
- lt_save_allow_undefined_flag=$allow_undefined_flag
- allow_undefined_flag=
- if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
- (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$lt_prog_compiler_wl
+ pic_flag=$lt_prog_compiler_pic
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$allow_undefined_flag
+ allow_undefined_flag=
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+ (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
- then
- archive_cmds_need_lc=no
- else
- archive_cmds_need_lc=yes
- fi
- allow_undefined_flag=$lt_save_allow_undefined_flag
- else
- cat conftest.err 1>&5
- fi
- $rm conftest*
- { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
-echo "${ECHO_T}$archive_cmds_need_lc" >&6; }
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ then
+ lt_cv_archive_cmds_need_lc=no
+ else
+ lt_cv_archive_cmds_need_lc=yes
+ fi
+ allow_undefined_flag=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
+$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
+ archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
;;
esac
fi
;;
esac
-{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
if test "$GCC" = yes; then
case $host_os in
darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
*) lt_awk_arg="/^libraries:/" ;;
esac
- lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
+ case $host_os in
+ mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
+ *) lt_sed_strip_eq="s,=/,/,g" ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
+ case $lt_search_path_spec in
+ *\;*)
# if the path contains ";" then we assume it to be the separator
# otherwise default to the standard path separator (i.e. ":") - it is
# assumed that no part of a normal pathname contains ";" but that should
# okay in the real world where ";" in dirpaths is itself problematic.
- lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
- else
- lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
+ ;;
+ *)
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ esac
# Ok, now we have the path, separated by spaces, we can step through it
# and add multilib dir if necessary.
lt_tmp_lt_search_path_spec=
@@ -7999,7 +10264,7 @@ if test "$GCC" = yes; then
lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
fi
done
- lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
+ lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
BEGIN {RS=" "; FS="/|\n";} {
lt_foo="";
lt_count=0;
@@ -8019,10 +10284,29 @@ BEGIN {RS=" "; FS="/|\n";} {
if (lt_foo != "") { lt_freq[lt_foo]++; }
if (lt_freq[lt_foo] == 1) { print lt_foo; }
}'`
- sys_lib_search_path_spec=`echo $lt_search_path_spec`
+ # AWK program above erroneously prepends '/' to C:/dos/paths
+ # for these hosts.
+ case $host_os in
+ mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
+ $SED 's,/\([A-Za-z]:\),\1,g'` ;;
+ esac
+ sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
else
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
fi
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
need_lib_prefix=unknown
hardcode_into_libs=no
@@ -8040,7 +10324,7 @@ aix3*)
soname_spec='${libname}${release}${shared_ext}$major'
;;
-aix4* | aix5*)
+aix[4-9]*)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -8059,7 +10343,7 @@ aix4* | aix5*)
aix4 | aix4.[01] | aix4.[01].*)
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
echo ' yes '
- echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+ echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
:
else
can_build_shared=no
@@ -8085,9 +10369,18 @@ aix4* | aix5*)
;;
amigaos*)
- library_names_spec='$libname.ixlibrary $libname.a'
- # Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ ;;
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ esac
;;
beos*)
@@ -8110,61 +10403,112 @@ bsdi[45]*)
# libtool to hard-code these into programs
;;
-cygwin* | mingw* | pw32*)
+cygwin* | mingw* | pw32* | cegcc*)
version_type=windows
shrext_cmds=".dll"
need_version=no
need_lib_prefix=no
- case $GCC,$host_os in
- yes,cygwin* | yes,mingw* | yes,pw32*)
+ case $GCC,$cc_basename in
+ yes,*)
+ # gcc
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
dldir=$destdir/`dirname \$dlpath`~
test -d \$dldir || mkdir -p \$dldir~
$install_prog $dir/$dlname \$dldir/$dlname~
- chmod a+x \$dldir/$dlname'
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
dlpath=$dir/\$dldll~
- $rm \$dlpath'
+ $RM \$dlpath'
shlibpath_overrides_runpath=yes
case $host_os in
cygwin*)
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
;;
- mingw*)
+ mingw* | cegcc*)
# MinGW DLLs use traditional 'lib' prefix
soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
- # It is most probably a Windows format PATH printed by
- # mingw gcc, but we are running on Cygwin. Gcc prints its search
- # path with ; separators, and with drive letters. We can handle the
- # drive letters (cygwin fileutils understands them), so leave them,
- # especially as we might pass files found there to a mingw objdump,
- # which wouldn't understand a cygwinified path. Ahh.
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
;;
pw32*)
# pw32 DLLs use 'pw' prefix rather than 'lib'
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
;;
esac
+ dynamic_linker='Win32 ld.exe'
+ ;;
+
+ *,cl*)
+ # Native MSVC
+ libname_spec='$name'
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ library_names_spec='${libname}.dll.lib'
+
+ case $build_os in
+ mingw*)
+ sys_lib_search_path_spec=
+ lt_save_ifs=$IFS
+ IFS=';'
+ for lt_path in $LIB
+ do
+ IFS=$lt_save_ifs
+ # Let DOS variable expansion print the short 8.3 style file name.
+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+ done
+ IFS=$lt_save_ifs
+ # Convert to MSYS style.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+ ;;
+ cygwin*)
+ # Convert to unix form, then to dos form, then back to unix form
+ # but this time dos style (no spaces!) so that the unix form looks
+ # like /cygdrive/c/PROGRA~1:/cygdr...
+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ *)
+ sys_lib_search_path_spec="$LIB"
+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+ # It is most probably a Windows format PATH.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # FIXME: find the short name or the path components, as spaces are
+ # common. (e.g. "Program Files" -> "PROGRA~1")
+ ;;
+ esac
+
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+ dynamic_linker='Win32 link.exe'
;;
*)
+ # Assume MSVC wrapper
library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ dynamic_linker='Win32 ld.exe'
;;
esac
- dynamic_linker='Win32 ld.exe'
# FIXME: first we should search . and the directory the executable is in
shlibpath_var=PATH
;;
@@ -8174,7 +10518,7 @@ darwin* | rhapsody*)
version_type=darwin
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
soname_spec='${libname}${release}${major}$shared_ext'
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
@@ -8193,10 +10537,6 @@ dgux*)
shlibpath_var=LD_LIBRARY_PATH
;;
-freebsd1*)
- dynamic_linker=no
- ;;
-
freebsd* | dragonfly*)
# DragonFly does not have aout. When/if they implement a new
# versioning mechanism, adjust this.
@@ -8204,7 +10544,7 @@ freebsd* | dragonfly*)
objformat=`/usr/bin/objformat`
else
case $host_os in
- freebsd[123]*) objformat=aout ;;
+ freebsd[23].*) objformat=aout ;;
*) objformat=elf ;;
esac
fi
@@ -8222,7 +10562,7 @@ freebsd* | dragonfly*)
esac
shlibpath_var=LD_LIBRARY_PATH
case $host_os in
- freebsd2*)
+ freebsd2.*)
shlibpath_overrides_runpath=yes
;;
freebsd3.[01]* | freebsdelf3.[01]*)
@@ -8251,6 +10591,19 @@ gnu*)
hardcode_into_libs=yes
;;
+haiku*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ dynamic_linker="$host_os runtime_loader"
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+ hardcode_into_libs=yes
+ ;;
+
hpux9* | hpux10* | hpux11*)
# Give a soname corresponding to the major version so that dld.sl refuses to
# link against other versions.
@@ -8273,18 +10626,18 @@ hpux9* | hpux10* | hpux11*)
fi
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
;;
- hppa*64*)
- shrext_cmds='.sl'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- *)
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
shrext_cmds='.sl'
dynamic_linker="$host_os dld.sl"
shlibpath_var=SHLIB_PATH
@@ -8293,8 +10646,10 @@ hpux9* | hpux10* | hpux11*)
soname_spec='${libname}${release}${shared_ext}$major'
;;
esac
- # HP-UX runs *really* slowly unless shared libraries are mode 555.
+ # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
postinstall_cmds='chmod 555 $lib'
+ # or fails outright, so override atomically:
+ install_override_mode=555
;;
interix[3-9]*)
@@ -8352,7 +10707,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -8361,6 +10716,41 @@ linux* | k*bsd*-gnu)
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
+
+ # Some binutils ld are patched to set DT_RUNPATH
+ if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_shlibpath_overrides_runpath=no
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
+ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
+ lt_cv_shlibpath_overrides_runpath=yes
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+fi
+
+ shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
+
# This implies no fast_install, which is unacceptable.
# Some rework will be needed to allow for fast_install
# before this can be enabled.
@@ -8368,7 +10758,7 @@ linux* | k*bsd*-gnu)
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
fi
@@ -8385,7 +10775,7 @@ netbsd*)
version_type=sunos
need_lib_prefix=no
need_version=no
- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
dynamic_linker='NetBSD (a.out) ld.so'
@@ -8406,14 +10796,16 @@ newsos6)
shlibpath_overrides_runpath=yes
;;
-nto-qnx*)
- version_type=linux
+*nto* | *qnx*)
+ version_type=qnx
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
;;
openbsd*)
@@ -8422,13 +10814,13 @@ openbsd*)
need_lib_prefix=no
# Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
case $host_os in
- openbsd3.3 | openbsd3.3.*) need_version=yes ;;
- *) need_version=no ;;
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
esac
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
shlibpath_var=LD_LIBRARY_PATH
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
case $host_os in
openbsd2.[89] | openbsd2.[89].*)
shlibpath_overrides_runpath=no
@@ -8500,7 +10892,6 @@ sysv4 | sysv4.3*)
sni)
shlibpath_overrides_runpath=no
need_lib_prefix=no
- export_dynamic_flag_spec='${wl}-Blargedynsym'
runpath_var=LD_RUN_PATH
;;
siemens)
@@ -8531,13 +10922,12 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
if test "$with_gnu_ld" = yes; then
sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
- shlibpath_overrides_runpath=no
else
sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
- shlibpath_overrides_runpath=yes
case $host_os in
sco3.2v5*)
sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
@@ -8547,6 +10937,17 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
sys_lib_dlsearch_path_spec='/usr/lib'
;;
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
uts4*)
version_type=linux
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -8558,8 +10959,8 @@ uts4*)
dynamic_linker=no
;;
esac
-{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
-echo "${ECHO_T}$dynamic_linker" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
test "$dynamic_linker" = no && can_build_shared=no
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
@@ -8567,19 +10968,117 @@ if test "$GCC" = yes; then
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
fi
-{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
hardcode_action=
-if test -n "$hardcode_libdir_flag_spec" || \
- test -n "$runpath_var" || \
+if test -n "$hardcode_libdir_flag_spec" ||
+ test -n "$runpath_var" ||
test "X$hardcode_automatic" = "Xyes" ; then
- # We can hardcode non-existant directories.
+ # We can hardcode non-existent directories.
if test "$hardcode_direct" != no &&
# If the only mechanism to avoid hardcoding is shlibpath_var, we
# have to relink, otherwise we might link with an installed library
# when we should be linking with a yet-to-be-installed one
- ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
test "$hardcode_minus_L" != no; then
# Linking always hardcodes the temporary library directory.
hardcode_action=relink
@@ -8592,10 +11091,11 @@ else
# directories.
hardcode_action=unsupported
fi
-{ echo "$as_me:$LINENO: result: $hardcode_action" >&5
-echo "${ECHO_T}$hardcode_action" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
+$as_echo "$hardcode_action" >&6; }
-if test "$hardcode_action" = relink; then
+if test "$hardcode_action" = relink ||
+ test "$inherit_rpath" = yes; then
# Fast installation is not supported
enable_fast_install=no
elif test "$shlibpath_overrides_runpath" = yes ||
@@ -8604,37 +11104,12 @@ elif test "$shlibpath_overrides_runpath" = yes ||
enable_fast_install=needless
fi
-striplib=
-old_striplib=
-{ echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
-echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; }
-if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
- test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
- test -z "$striplib" && striplib="$STRIP --strip-unneeded"
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-else
-# FIXME - insert some real tests, host_os isn't really good enough
- case $host_os in
- darwin*)
- if test -n "$STRIP" ; then
- striplib="$STRIP -x"
- old_striplib="$STRIP -S"
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
- else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
- ;;
- *)
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
- ;;
- esac
-fi
-if test "x$enable_dlopen" != xyes; then
+
+
+
+
+ if test "x$enable_dlopen" != xyes; then
enable_dlopen=unknown
enable_dlopen_self=unknown
enable_dlopen_self_static=unknown
@@ -8649,30 +11124,26 @@ else
lt_cv_dlopen_self=yes
;;
- mingw* | pw32*)
+ mingw* | pw32* | cegcc*)
lt_cv_dlopen="LoadLibrary"
lt_cv_dlopen_libs=
- ;;
+ ;;
cygwin*)
lt_cv_dlopen="dlopen"
lt_cv_dlopen_libs=
- ;;
+ ;;
darwin*)
# if libdl is installed we need to link against it
- { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if ${ac_cv_lib_dl_dlopen+:} false; then :
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
@@ -8690,39 +11161,18 @@ return dlopen ();
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_dl_dlopen=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_lib_dl_dlopen=no
+ ac_cv_lib_dl_dlopen=no
fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
-if test $ac_cv_lib_dl_dlopen = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
else
@@ -8732,105 +11182,21 @@ else
fi
- ;;
+ ;;
*)
- { echo "$as_me:$LINENO: checking for shl_load" >&5
-echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; }
-if test "${ac_cv_func_shl_load+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define shl_load innocuous_shl_load
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char shl_load (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef shl_load
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char shl_load ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined __stub_shl_load || defined __stub___shl_load
-choke me
-#endif
-
-int
-main ()
-{
-return shl_load ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
- ac_cv_func_shl_load=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_func_shl_load=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
-echo "${ECHO_T}$ac_cv_func_shl_load" >&6; }
-if test $ac_cv_func_shl_load = yes; then
+ ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
+if test "x$ac_cv_func_shl_load" = xyes; then :
lt_cv_dlopen="shl_load"
else
- { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
-echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
-if test "${ac_cv_lib_dld_shl_load+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+$as_echo_n "checking for shl_load in -ldld... " >&6; }
+if ${ac_cv_lib_dld_shl_load+:} false; then :
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldld $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
@@ -8848,137 +11214,32 @@ return shl_load ();
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_dld_shl_load=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_lib_dld_shl_load=no
+ ac_cv_lib_dld_shl_load=no
fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
-echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
-if test $ac_cv_lib_dld_shl_load = yes; then
- lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
+ lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
else
- { echo "$as_me:$LINENO: checking for dlopen" >&5
-echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; }
-if test "${ac_cv_func_dlopen+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define dlopen innocuous_dlopen
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char dlopen (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef dlopen
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined __stub_dlopen || defined __stub___dlopen
-choke me
-#endif
-
-int
-main ()
-{
-return dlopen ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
- ac_cv_func_dlopen=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_func_dlopen=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
-echo "${ECHO_T}$ac_cv_func_dlopen" >&6; }
-if test $ac_cv_func_dlopen = yes; then
+ ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
+if test "x$ac_cv_func_dlopen" = xyes; then :
lt_cv_dlopen="dlopen"
else
- { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if ${ac_cv_lib_dl_dlopen+:} false; then :
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
@@ -8996,53 +11257,28 @@ return dlopen ();
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_dl_dlopen=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_lib_dl_dlopen=no
+ ac_cv_lib_dl_dlopen=no
fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
-if test $ac_cv_lib_dl_dlopen = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
else
- { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
-echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; }
-if test "${ac_cv_lib_svld_dlopen+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
+$as_echo_n "checking for dlopen in -lsvld... " >&6; }
+if ${ac_cv_lib_svld_dlopen+:} false; then :
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsvld $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
@@ -9060,53 +11296,28 @@ return dlopen ();
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_svld_dlopen=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_lib_svld_dlopen=no
+ ac_cv_lib_svld_dlopen=no
fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; }
-if test $ac_cv_lib_svld_dlopen = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
+$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
+if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
else
- { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
-echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; }
-if test "${ac_cv_lib_dld_dld_link+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
+$as_echo_n "checking for dld_link in -ldld... " >&6; }
+if ${ac_cv_lib_dld_dld_link+:} false; then :
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldld $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
@@ -9124,40 +11335,19 @@ return dld_link ();
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_dld_dld_link=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_lib_dld_dld_link=no
+ ac_cv_lib_dld_dld_link=no
fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
-echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; }
-if test $ac_cv_lib_dld_dld_link = yes; then
- lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
+$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
+if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
+ lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
fi
@@ -9195,18 +11385,18 @@ fi
save_LIBS="$LIBS"
LIBS="$lt_cv_dlopen_libs $LIBS"
- { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
-echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; }
-if test "${lt_cv_dlopen_self+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
+$as_echo_n "checking whether a program can dlopen itself... " >&6; }
+if ${lt_cv_dlopen_self+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
lt_cv_dlopen_self=cross
else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<EOF
-#line 9209 "configure"
+ cat > conftest.$ac_ext <<_LT_EOF
+#line $LINENO "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -9247,11 +11437,13 @@ else
# endif
#endif
-#ifdef __cplusplus
-extern "C" void exit (int);
+/* When -fvisbility=hidden is used, assume the code has been annotated
+ correspondingly for the symbols needed. */
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
#endif
-void fnord() { int i=42;}
+int fnord () { return 42; }
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
@@ -9260,20 +11452,24 @@ int main ()
if (self)
{
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
- else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ else
+ {
+ if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ else puts (dlerror ());
+ }
/* dlclose (self); */
}
else
puts (dlerror ());
- exit (status);
+ return status;
}
-EOF
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+_LT_EOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
(./conftest; exit; ) >&5 2>/dev/null
lt_status=$?
case x$lt_status in
@@ -9290,23 +11486,23 @@ rm -fr conftest*
fi
-{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
-echo "${ECHO_T}$lt_cv_dlopen_self" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
+$as_echo "$lt_cv_dlopen_self" >&6; }
if test "x$lt_cv_dlopen_self" = xyes; then
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
- { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
-echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; }
-if test "${lt_cv_dlopen_self_static+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
+$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
+if ${lt_cv_dlopen_self_static+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
lt_cv_dlopen_self_static=cross
else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<EOF
-#line 9309 "configure"
+ cat > conftest.$ac_ext <<_LT_EOF
+#line $LINENO "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -9347,11 +11543,13 @@ else
# endif
#endif
-#ifdef __cplusplus
-extern "C" void exit (int);
+/* When -fvisbility=hidden is used, assume the code has been annotated
+ correspondingly for the symbols needed. */
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
#endif
-void fnord() { int i=42;}
+int fnord () { return 42; }
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
@@ -9360,20 +11558,24 @@ int main ()
if (self)
{
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
- else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ else
+ {
+ if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ else puts (dlerror ());
+ }
/* dlclose (self); */
}
else
puts (dlerror ());
- exit (status);
+ return status;
}
-EOF
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+_LT_EOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
(./conftest; exit; ) >&5 2>/dev/null
lt_status=$?
case x$lt_status in
@@ -9390,8 +11592,8 @@ rm -fr conftest*
fi
-{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
-echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
+$as_echo "$lt_cv_dlopen_self_static" >&6; }
fi
CPPFLAGS="$save_CPPFLAGS"
@@ -9412,9257 +11614,103 @@ echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; }
fi
-# Report which library types will actually be built
-{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
-echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; }
-{ echo "$as_me:$LINENO: result: $can_build_shared" >&5
-echo "${ECHO_T}$can_build_shared" >&6; }
-
-{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
-echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; }
-test "$can_build_shared" = "no" && enable_shared=no
-
-# On AIX, shared libraries and static libraries use the same namespace, and
-# are all built from PIC.
-case $host_os in
-aix3*)
- test "$enable_shared" = yes && enable_static=no
- if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds~\$RANLIB \$lib"
- postinstall_cmds='$RANLIB $lib'
- fi
- ;;
-
-aix4* | aix5*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
- fi
- ;;
-esac
-{ echo "$as_me:$LINENO: result: $enable_shared" >&5
-echo "${ECHO_T}$enable_shared" >&6; }
-
-{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5
-echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; }
-# Make sure either enable_shared or enable_static is yes.
-test "$enable_shared" = yes || enable_static=yes
-{ echo "$as_me:$LINENO: result: $enable_static" >&5
-echo "${ECHO_T}$enable_static" >&6; }
-
-# The else clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
- # See if we are running on zsh, and set the options which allow our commands through
- # without removal of \ escapes.
- if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
- fi
- # Now quote all the things that may contain metacharacters while being
- # careful not to overquote the AC_SUBSTed values. We take copies of the
- # variables and quote the copies for generation of the libtool script.
- for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
- SED SHELL STRIP \
- libname_spec library_names_spec soname_spec extract_expsyms_cmds \
- old_striplib striplib file_magic_cmd finish_cmds finish_eval \
- deplibs_check_method reload_flag reload_cmds need_locks \
- lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
- lt_cv_sys_global_symbol_to_c_name_address \
- sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
- old_postinstall_cmds old_postuninstall_cmds \
- compiler \
- CC \
- LD \
- lt_prog_compiler_wl \
- lt_prog_compiler_pic \
- lt_prog_compiler_static \
- lt_prog_compiler_no_builtin_flag \
- export_dynamic_flag_spec \
- thread_safe_flag_spec \
- whole_archive_flag_spec \
- enable_shared_with_static_runtimes \
- old_archive_cmds \
- old_archive_from_new_cmds \
- predep_objects \
- postdep_objects \
- predeps \
- postdeps \
- compiler_lib_search_path \
- archive_cmds \
- archive_expsym_cmds \
- postinstall_cmds \
- postuninstall_cmds \
- old_archive_from_expsyms_cmds \
- allow_undefined_flag \
- no_undefined_flag \
- export_symbols_cmds \
- hardcode_libdir_flag_spec \
- hardcode_libdir_flag_spec_ld \
- hardcode_libdir_separator \
- hardcode_automatic \
- module_cmds \
- module_expsym_cmds \
- lt_cv_prog_compiler_c_o \
- fix_srcfile_path \
- exclude_expsyms \
- include_expsyms; do
-
- case $var in
- old_archive_cmds | \
- old_archive_from_new_cmds | \
- archive_cmds | \
- archive_expsym_cmds | \
- module_cmds | \
- module_expsym_cmds | \
- old_archive_from_expsyms_cmds | \
- export_symbols_cmds | \
- extract_expsyms_cmds | reload_cmds | finish_cmds | \
- postinstall_cmds | postuninstall_cmds | \
- old_postinstall_cmds | old_postuninstall_cmds | \
- sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
- # Double-quote double-evaled strings.
- eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
- ;;
- *)
- eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
- ;;
- esac
- done
-
- case $lt_echo in
- *'\$0 --fallback-echo"')
- lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
- ;;
- esac
-
-cfgfile="${ofile}T"
- trap "$rm \"$cfgfile\"; exit 1" 1 2 15
- $rm -f "$cfgfile"
- { echo "$as_me:$LINENO: creating $ofile" >&5
-echo "$as_me: creating $ofile" >&6;}
-
- cat <<__EOF__ >> "$cfgfile"
-#! $SHELL
-
-# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
-# Free Software Foundation, Inc.
-#
-# This file is part of GNU Libtool:
-# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-#
-# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# A sed program that does not truncate output.
-SED=$lt_SED
-
-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="$SED -e 1s/^X//"
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-# The names of the tagged configurations supported by this script.
-available_tags=
-
-# ### BEGIN LIBTOOL CONFIG
-
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
-
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$archive_cmds_need_lc
-
-# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
-
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
-
-# The host system.
-host_alias=$host_alias
-host=$host
-host_os=$host_os
-
-# The build system.
-build_alias=$build_alias
-build=$build
-build_os=$build_os
-
-# An echo program that does not interpret backslashes.
-echo=$lt_echo
-
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
-
-# A C compiler.
-LTCC=$lt_LTCC
-
-# LTCC compiler flags.
-LTCFLAGS=$lt_LTCFLAGS
-
-# A language-specific compiler.
-CC=$lt_compiler
-
-# Is the compiler the GNU C compiler?
-with_gcc=$GCC
-
-# An ERE matcher.
-EGREP=$lt_EGREP
-
-# The linker used to build libraries.
-LD=$lt_LD
-
-# Whether we need hard or soft links.
-LN_S=$lt_LN_S
-
-# A BSD-compatible nm program.
-NM=$lt_NM
-
-# A symbol stripping program
-STRIP=$lt_STRIP
-
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=$MAGIC_CMD
-
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
-
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
-
-# Used on cygwin: assembler.
-AS="$AS"
-
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
-
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
-
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl
-
-# Object file suffix (normally "o").
-objext="$ac_objext"
-
-# Old archive suffix (normally "a").
-libext="$libext"
-
-# Shared library suffix (normally ".so").
-shrext_cmds='$shrext_cmds'
-
-# Executable file suffix (normally "").
-exeext="$exeext"
-
-# Additional compiler flags for building library objects.
-pic_flag=$lt_lt_prog_compiler_pic
-pic_mode=$pic_mode
-
-# What is the maximum length of a command?
-max_cmd_len=$lt_cv_sys_max_cmd_len
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_lt_cv_prog_compiler_c_o
-
-# Must we lock files when doing compilation?
-need_locks=$lt_need_locks
-
-# Do we need the lib prefix for modules?
-need_lib_prefix=$need_lib_prefix
-
-# Do we need a version for libraries?
-need_version=$need_version
-
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
-
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
-
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_lt_prog_compiler_static
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec
-
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_thread_safe_flag_spec
-
-# Library versioning type.
-version_type=$version_type
-
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
-
-# List of archive names. First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=$lt_library_names_spec
-
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
-
-# Commands used to build and install an old-style archive.
-RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_old_archive_cmds
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
-
-# Commands used to build and install a shared archive.
-archive_cmds=$lt_archive_cmds
-archive_expsym_cmds=$lt_archive_expsym_cmds
-postinstall_cmds=$lt_postinstall_cmds
-postuninstall_cmds=$lt_postuninstall_cmds
-
-# Commands used to build a loadable module (assumed same as above if empty)
-module_cmds=$lt_module_cmds
-module_expsym_cmds=$lt_module_expsym_cmds
-
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predep_objects=$lt_predep_objects
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=$lt_postdep_objects
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=$lt_predeps
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=$lt_postdeps
-
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path
-
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
-
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd=$lt_file_magic_cmd
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag
-
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
-
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$lt_finish_eval
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
-
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
-
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
-
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
-
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action
-
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
-
-# If ld is used when linking, flag to hardcode \$libdir into
-# a binary during linking. This must work even if \$libdir does
-# not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator
-
-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$hardcode_direct
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$hardcode_minus_L
-
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var
-
-# Set to yes if building a shared library automatically hardcodes DIR into the library
-# and all subsequent libraries and executables linked against it.
-hardcode_automatic=$hardcode_automatic
-
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs
-
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
-
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
-
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path=$lt_fix_srcfile_path
-
-# Set to yes if exported symbols are required.
-always_export_symbols=$always_export_symbols
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds
-
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms
-
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms
-
-# ### END LIBTOOL CONFIG
-
-__EOF__
-
-
- case $host_os in
- aix3*)
- cat <<\EOF >> "$cfgfile"
-
-# AIX sometimes has problems with the GCC collect2 program. For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
-fi
-EOF
- ;;
- esac
-
- # We use sed instead of cat because bash on DJGPP gets confused if
- # if finds mixed CR/LF and LF-only lines. Since sed operates in
- # text mode, it properly converts lines to CR/LF. This bash problem
- # is reportedly fixed, but why not run on old versions too?
- sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
-
- mv -f "$cfgfile" "$ofile" || \
- (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
- chmod +x "$ofile"
-
-else
- # If there is no Makefile yet, we rely on a make rule to execute
- # `config.status --recheck' to rerun these tests and create the
- # libtool script then.
- ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
- if test -f "$ltmain_in"; then
- test -f Makefile && make "$ltmain"
- fi
-fi
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-CC="$lt_save_CC"
-
-
-# Check whether --with-tags was given.
-if test "${with_tags+set}" = set; then
- withval=$with_tags; tagnames="$withval"
-fi
-
-
-if test -f "$ltmain" && test -n "$tagnames"; then
- if test ! -f "${ofile}"; then
- { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5
-echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
- fi
-
- if test -z "$LTCC"; then
- eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
- if test -z "$LTCC"; then
- { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5
-echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
- else
- { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
-echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
- fi
- fi
- if test -z "$LTCFLAGS"; then
- eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
- fi
-
- # Extract list of available tagged configurations in $ofile.
- # Note that this assumes the entire list is on one line.
- available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
-
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for tagname in $tagnames; do
- IFS="$lt_save_ifs"
- # Check whether tagname contains only valid characters
- case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
- "") ;;
- *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5
-echo "$as_me: error: invalid tag name: $tagname" >&2;}
- { (exit 1); exit 1; }; }
- ;;
- esac
-
- if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
- then
- { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5
-echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
- { (exit 1); exit 1; }; }
- fi
-
- # Update the list of available tags.
- if test -n "$tagname"; then
- echo appending configuration tag \"$tagname\" to $ofile
-
- case $tagname in
- CXX)
- if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
- ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
- (test "X$CXX" != "Xg++"))) ; then
- ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-
-
-archive_cmds_need_lc_CXX=no
-allow_undefined_flag_CXX=
-always_export_symbols_CXX=no
-archive_expsym_cmds_CXX=
-export_dynamic_flag_spec_CXX=
-hardcode_direct_CXX=no
-hardcode_libdir_flag_spec_CXX=
-hardcode_libdir_flag_spec_ld_CXX=
-hardcode_libdir_separator_CXX=
-hardcode_minus_L_CXX=no
-hardcode_shlibpath_var_CXX=unsupported
-hardcode_automatic_CXX=no
-module_cmds_CXX=
-module_expsym_cmds_CXX=
-link_all_deplibs_CXX=unknown
-old_archive_cmds_CXX=$old_archive_cmds
-no_undefined_flag_CXX=
-whole_archive_flag_spec_CXX=
-enable_shared_with_static_runtimes_CXX=no
-
-# Dependencies to place before and after the object being linked:
-predep_objects_CXX=
-postdep_objects_CXX=
-predeps_CXX=
-postdeps_CXX=
-compiler_lib_search_path_CXX=
-
-# Source file extension for C++ test sources.
-ac_ext=cpp
-
-# Object file extension for compiled C++ test sources.
-objext=o
-objext_CXX=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-
-
-# save warnings/boilerplate of simple test code
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$rm conftest*
-
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$rm conftest*
-
-
-# Allow CC to be a program name with arguments.
-lt_save_CC=$CC
-lt_save_LD=$LD
-lt_save_GCC=$GCC
-GCC=$GXX
-lt_save_with_gnu_ld=$with_gnu_ld
-lt_save_path_LD=$lt_cv_path_LD
-if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
- lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
-else
- $as_unset lt_cv_prog_gnu_ld
-fi
-if test -n "${lt_cv_path_LDCXX+set}"; then
- lt_cv_path_LD=$lt_cv_path_LDCXX
-else
- $as_unset lt_cv_path_LD
-fi
-test -z "${LDCXX+set}" || LD=$LDCXX
-CC=${CXX-"c++"}
-compiler=$CC
-compiler_CXX=$CC
-for cc_temp in $compiler""; do
- case $cc_temp in
- compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
- distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
- \-*) ;;
- *) break;;
- esac
-done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-
-
-# We don't want -fno-exception wen compiling C++ code, so set the
-# no_builtin_flag separately
-if test "$GXX" = yes; then
- lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
-else
- lt_prog_compiler_no_builtin_flag_CXX=
-fi
-
-if test "$GXX" = yes; then
- # Set up default GNU C++ configuration
-
-
-# Check whether --with-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then
- withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
-else
- with_gnu_ld=no
-fi
-
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- { echo "$as_me:$LINENO: checking for ld used by $CC" >&5
-echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; }
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [\\/]* | ?:[\\/]*)
- re_direlt='/[^/][^/]*/\.\./'
- # Canonicalize the pathname of ld
- ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- { echo "$as_me:$LINENO: checking for GNU ld" >&5
-echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
-else
- { echo "$as_me:$LINENO: checking for non-GNU ld" >&5
-echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; }
-fi
-if test "${lt_cv_path_LD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -z "$LD"; then
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some variants of GNU ld only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
- *GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break
- ;;
- *)
- test "$with_gnu_ld" != yes && break
- ;;
- esac
- fi
- done
- IFS="$lt_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi
-fi
-
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- { echo "$as_me:$LINENO: result: $LD" >&5
-echo "${ECHO_T}$LD" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
-echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
- { (exit 1); exit 1; }; }
-{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
-echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; }
-if test "${lt_cv_prog_gnu_ld+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
- lt_cv_prog_gnu_ld=yes
- ;;
-*)
- lt_cv_prog_gnu_ld=no
- ;;
-esac
-fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
-echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; }
-with_gnu_ld=$lt_cv_prog_gnu_ld
-
-
-
- # Check if GNU C++ uses GNU ld as the underlying linker, since the
- # archiving commands below assume that GNU ld is being used.
- if test "$with_gnu_ld" = yes; then
- archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-
- hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
- export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
-
- # If archive_cmds runs LD, not CC, wlarc should be empty
- # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
- # investigate it a little bit more. (MM)
- wlarc='${wl}'
-
- # ancient GNU ld didn't support --whole-archive et. al.
- if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
- grep 'no-whole-archive' > /dev/null; then
- whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- whole_archive_flag_spec_CXX=
- fi
- else
- with_gnu_ld=no
- wlarc=
-
- # A generic and very simple default shared library creation
- # command for GNU C++ for the case where it uses the native
- # linker, instead of GNU ld. If possible, this setting should
- # overridden to take advantage of the native linker features on
- # the platform it is being used on.
- archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- fi
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
-
-else
- GXX=no
- with_gnu_ld=no
- wlarc=
-fi
-
-# PORTME: fill in a description of your system's C++ link characteristics
-{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
-ld_shlibs_CXX=yes
-case $host_os in
- aix3*)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- aix4* | aix5*)
- if test "$host_cpu" = ia64; then
- # On IA64, the linker does run time linking by default, so we don't
- # have to do anything special.
- aix_use_runtimelinking=no
- exp_sym_flag='-Bexport'
- no_entry_flag=""
- else
- aix_use_runtimelinking=no
-
- # Test if we are trying to use run time linking or normal
- # AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # need to do runtime linking.
- case $host_os in aix4.[23]|aix4.[23].*|aix5*)
- for ld_flag in $LDFLAGS; do
- case $ld_flag in
- *-brtl*)
- aix_use_runtimelinking=yes
- break
- ;;
- esac
- done
- ;;
- esac
-
- exp_sym_flag='-bexport'
- no_entry_flag='-bnoentry'
- fi
-
- # When large executables or shared objects are built, AIX ld can
- # have problems creating the table of contents. If linking a library
- # or program results in "error TOC overflow" add -mminimal-toc to
- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
- archive_cmds_CXX=''
- hardcode_direct_CXX=yes
- hardcode_libdir_separator_CXX=':'
- link_all_deplibs_CXX=yes
-
- if test "$GXX" = yes; then
- case $host_os in aix4.[012]|aix4.[012].*)
- # We only want to do this on AIX 4.2 and lower, the check
- # below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" && \
- strings "$collect2name" | grep resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- :
- else
- # We have old collect2
- hardcode_direct_CXX=unsupported
- # It fails to find uninstalled libraries when the uninstalled
- # path is not listed in the libpath. Setting hardcode_minus_L
- # to unsupported forces relinking
- hardcode_minus_L_CXX=yes
- hardcode_libdir_flag_spec_CXX='-L$libdir'
- hardcode_libdir_separator_CXX=
- fi
- ;;
- esac
- shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
- fi
- else
- # not using gcc
- if test "$host_cpu" = ia64; then
- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
- # chokes on -Wl,-G. The following line is correct:
- shared_flag='-G'
- else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
- else
- shared_flag='${wl}-bM:SRE'
- fi
- fi
- fi
-
- # It seems that -bexpall does not export symbols beginning with
- # underscore (_), so it is better to generate a list of symbols to export.
- always_export_symbols_CXX=yes
- if test "$aix_use_runtimelinking" = yes; then
- # Warning - without using the other runtime loading flags (-brtl),
- # -berok will link without error, but may produce a broken library.
- allow_undefined_flag_CXX='-berok'
- # Determine the default libpath from the value encoded in an empty executable.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
-
-lt_aix_libpath_sed='
- /Import File Strings/,/^$/ {
- /^0/ {
- s/^0 *\(.*\)$/\1/
- p
- }
- }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-fi
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
- hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
- archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
- else
- if test "$host_cpu" = ia64; then
- hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
- allow_undefined_flag_CXX="-z nodefs"
- archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
- else
- # Determine the default libpath from the value encoded in an empty executable.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-int
-main ()
-{
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
-
-lt_aix_libpath_sed='
- /Import File Strings/,/^$/ {
- /^0/ {
- s/^0 *\(.*\)$/\1/
- p
- }
- }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-fi
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
- hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
- # Warning - without using the other run time loading flags,
- # -berok will link without error, but may produce a broken library.
- no_undefined_flag_CXX=' ${wl}-bernotok'
- allow_undefined_flag_CXX=' ${wl}-berok'
- # Exported symbols can be pulled into shared objects from archives
- whole_archive_flag_spec_CXX='$convenience'
- archive_cmds_need_lc_CXX=yes
- # This is similar to how AIX traditionally builds its shared libraries.
- archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
- fi
- fi
- ;;
- beos*)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- allow_undefined_flag_CXX=unsupported
- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
- # support --undefined. This deserves some investigation. FIXME
- archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- else
- ld_shlibs_CXX=no
- fi
- ;;
- chorus*)
- case $cc_basename in
- *)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- esac
- ;;
- cygwin* | mingw* | pw32*)
- # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
- # as there is no search path for DLLs.
- hardcode_libdir_flag_spec_CXX='-L$libdir'
- allow_undefined_flag_CXX=unsupported
- always_export_symbols_CXX=no
- enable_shared_with_static_runtimes_CXX=yes
-
- if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
- archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- else
- ld_shlibs_CXX=no
- fi
- ;;
- darwin* | rhapsody*)
- case $host_os in
- rhapsody* | darwin1.[012])
- allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress'
- ;;
- *) # Darwin 1.3 on
- if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
- allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
- else
- case ${MACOSX_DEPLOYMENT_TARGET} in
- 10.[012])
- allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
- ;;
- 10.*)
- allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup'
- ;;
- esac
- fi
- ;;
- esac
- archive_cmds_need_lc_CXX=no
- hardcode_direct_CXX=no
- hardcode_automatic_CXX=yes
- hardcode_shlibpath_var_CXX=unsupported
- whole_archive_flag_spec_CXX=''
- link_all_deplibs_CXX=yes
-
- if test "$GXX" = yes ; then
- lt_int_apple_cc_single_mod=no
- output_verbose_link_cmd='echo'
- if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
- lt_int_apple_cc_single_mod=yes
- fi
- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
- archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- else
- archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- fi
- module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
- archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- else
- archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- fi
- module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- else
- case $cc_basename in
- xlc*)
- output_verbose_link_cmd='echo'
- archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
- module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- ;;
- *)
- ld_shlibs_CXX=no
- ;;
- esac
- fi
- ;;
-
- dgux*)
- case $cc_basename in
- ec++*)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- ghcx*)
- # Green Hills C++ Compiler
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- esac
- ;;
- freebsd[12]*)
- # C++ shared libraries reported to be fairly broken before switch to ELF
- ld_shlibs_CXX=no
- ;;
- freebsd-elf*)
- archive_cmds_need_lc_CXX=no
- ;;
- freebsd* | dragonfly*)
- # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
- # conventions
- ld_shlibs_CXX=yes
- ;;
- gnu*)
- ;;
- hpux9*)
- hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator_CXX=:
- export_dynamic_flag_spec_CXX='${wl}-E'
- hardcode_direct_CXX=yes
- hardcode_minus_L_CXX=yes # Not in the search PATH,
- # but as the default
- # location of the library.
-
- case $cc_basename in
- CC*)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- aCC*)
- archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
- ;;
- *)
- if test "$GXX" = yes; then
- archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- else
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- fi
- ;;
- esac
- ;;
- hpux10*|hpux11*)
- if test $with_gnu_ld = no; then
- hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator_CXX=:
-
- case $host_cpu in
- hppa*64*|ia64*) ;;
- *)
- export_dynamic_flag_spec_CXX='${wl}-E'
- ;;
- esac
- fi
- case $host_cpu in
- hppa*64*|ia64*)
- hardcode_direct_CXX=no
- hardcode_shlibpath_var_CXX=no
- ;;
- *)
- hardcode_direct_CXX=yes
- hardcode_minus_L_CXX=yes # Not in the search PATH,
- # but as the default
- # location of the library.
- ;;
- esac
-
- case $cc_basename in
- CC*)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- aCC*)
- case $host_cpu in
- hppa*64*)
- archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- ia64*)
- archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- *)
- archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- esac
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
- ;;
- *)
- if test "$GXX" = yes; then
- if test $with_gnu_ld = no; then
- case $host_cpu in
- hppa*64*)
- archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- ia64*)
- archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- *)
- archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- esac
- fi
- else
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- fi
- ;;
- esac
- ;;
- interix[3-9]*)
- hardcode_direct_CXX=no
- hardcode_shlibpath_var_CXX=no
- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- export_dynamic_flag_spec_CXX='${wl}-E'
- # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
- # Instead, shared libraries are loaded at an image base (0x10000000 by
- # default) and relocated if they conflict, which is a slow very memory
- # consuming and fragmenting process. To avoid this, we pick a random,
- # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
- # time. Moving up from 0x10000000 also allows more sbrk(2) space.
- archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- ;;
- irix5* | irix6*)
- case $cc_basename in
- CC*)
- # SGI C++
- archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-
- # Archives containing C++ object files must be created using
- # "CC -ar", where "CC" is the IRIX C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
- ;;
- *)
- if test "$GXX" = yes; then
- if test "$with_gnu_ld" = no; then
- archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
- fi
- fi
- link_all_deplibs_CXX=yes
- ;;
- esac
- hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator_CXX=:
- ;;
- linux* | k*bsd*-gnu)
- case $cc_basename in
- KCC*)
- # Kuck and Associates, Inc. (KAI) C++ Compiler
-
- # KCC will only create a shared library if the output file
- # ends with ".so" (or ".sl" for HP-UX), so rename the library
- # to its proper name (with version) after linking.
- archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
- archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-
- hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir'
- export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
-
- # Archives containing C++ object files must be created using
- # "CC -Bstatic", where "CC" is the KAI C++ compiler.
- old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
- ;;
- icpc*)
- # Intel C++
- with_gnu_ld=yes
- # version 8.0 and above of icpc choke on multiply defined symbols
- # if we add $predep_objects and $postdep_objects, however 7.1 and
- # earlier do not add the objects themselves.
- case `$CC -V 2>&1` in
- *"Version 7."*)
- archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- ;;
- *) # Version 8.0 or newer
- tmp_idyn=
- case $host_cpu in
- ia64*) tmp_idyn=' -i_dynamic';;
- esac
- archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- ;;
- esac
- archive_cmds_need_lc_CXX=no
- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
- whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
- ;;
- pgCC*)
- # Portland Group C++ compiler
- archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
- archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
-
- hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
- export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
- whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
- ;;
- cxx*)
- # Compaq C++
- archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
-
- runpath_var=LD_RUN_PATH
- hardcode_libdir_flag_spec_CXX='-rpath $libdir'
- hardcode_libdir_separator_CXX=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
- ;;
- *)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C++ 5.9
- no_undefined_flag_CXX=' -zdefs'
- archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
- hardcode_libdir_flag_spec_CXX='-R$libdir'
- whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-
- # Not sure whether something based on
- # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
- # would be better.
- output_verbose_link_cmd='echo'
-
- # Archives containing C++ object files must be created using
- # "CC -xar", where "CC" is the Sun C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
- ;;
- esac
- ;;
- esac
- ;;
- lynxos*)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- m88k*)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- mvs*)
- case $cc_basename in
- cxx*)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- esac
- ;;
- netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
- archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
- wlarc=
- hardcode_libdir_flag_spec_CXX='-R$libdir'
- hardcode_direct_CXX=yes
- hardcode_shlibpath_var_CXX=no
- fi
- # Workaround some broken pre-1.5 toolchains
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
- ;;
- openbsd2*)
- # C++ shared libraries are fairly broken
- ld_shlibs_CXX=no
- ;;
- openbsd*)
- if test -f /usr/libexec/ld.so; then
- hardcode_direct_CXX=yes
- hardcode_shlibpath_var_CXX=no
- archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
- export_dynamic_flag_spec_CXX='${wl}-E'
- whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- fi
- output_verbose_link_cmd='echo'
- else
- ld_shlibs_CXX=no
- fi
- ;;
- osf3*)
- case $cc_basename in
- KCC*)
- # Kuck and Associates, Inc. (KAI) C++ Compiler
-
- # KCC will only create a shared library if the output file
- # ends with ".so" (or ".sl" for HP-UX), so rename the library
- # to its proper name (with version) after linking.
- archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-
- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- hardcode_libdir_separator_CXX=:
-
- # Archives containing C++ object files must be created using
- # "CC -Bstatic", where "CC" is the KAI C++ compiler.
- old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
-
- ;;
- RCC*)
- # Rational C++ 2.4.1
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- cxx*)
- allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-
- hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator_CXX=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
- ;;
- *)
- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
- allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-
- hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator_CXX=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
-
- else
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- fi
- ;;
- esac
- ;;
- osf4* | osf5*)
- case $cc_basename in
- KCC*)
- # Kuck and Associates, Inc. (KAI) C++ Compiler
-
- # KCC will only create a shared library if the output file
- # ends with ".so" (or ".sl" for HP-UX), so rename the library
- # to its proper name (with version) after linking.
- archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-
- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- hardcode_libdir_separator_CXX=:
-
- # Archives containing C++ object files must be created using
- # the KAI C++ compiler.
- old_archive_cmds_CXX='$CC -o $oldlib $oldobjs'
- ;;
- RCC*)
- # Rational C++ 2.4.1
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- cxx*)
- allow_undefined_flag_CXX=' -expect_unresolved \*'
- archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
- archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
- echo "-hidden">> $lib.exp~
- $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
- $rm $lib.exp'
-
- hardcode_libdir_flag_spec_CXX='-rpath $libdir'
- hardcode_libdir_separator_CXX=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
- ;;
- *)
- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
- allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-
- hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator_CXX=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
-
- else
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- fi
- ;;
- esac
- ;;
- psos*)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- sunos4*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.x
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- lcc*)
- # Lucid
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- esac
- ;;
- solaris*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.2, 5.x and Centerline C++
- archive_cmds_need_lc_CXX=yes
- no_undefined_flag_CXX=' -zdefs'
- archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
- $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
-
- hardcode_libdir_flag_spec_CXX='-R$libdir'
- hardcode_shlibpath_var_CXX=no
- case $host_os in
- solaris2.[0-5] | solaris2.[0-5].*) ;;
- *)
- # The compiler driver will combine and reorder linker options,
- # but understands `-z linker_flag'.
- # Supported since Solaris 2.6 (maybe 2.5.1?)
- whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
- ;;
- esac
- link_all_deplibs_CXX=yes
-
- output_verbose_link_cmd='echo'
-
- # Archives containing C++ object files must be created using
- # "CC -xar", where "CC" is the Sun C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
- ;;
- gcx*)
- # Green Hills C++ Compiler
- archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-
- # The C++ compiler must be used to create the archive.
- old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
- ;;
- *)
- # GNU C++ compiler with Solaris linker
- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
- no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
- if $CC --version | grep -v '^2\.7' > /dev/null; then
- archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
- archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
- $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
- else
- # g++ 2.7 appears to require `-G' NOT `-shared' on this
- # platform.
- archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
- archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
- $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
- fi
-
- hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
- case $host_os in
- solaris2.[0-5] | solaris2.[0-5].*) ;;
- *)
- whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
- ;;
- esac
- fi
- ;;
- esac
- ;;
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
- no_undefined_flag_CXX='${wl}-z,text'
- archive_cmds_need_lc_CXX=no
- hardcode_shlibpath_var_CXX=no
- runpath_var='LD_RUN_PATH'
-
- case $cc_basename in
- CC*)
- archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- ;;
- sysv5* | sco3.2v5* | sco5v6*)
- # Note: We can NOT use -z defs as we might desire, because we do not
- # link with -lc, and that would cause any symbols used from libc to
- # always be unresolved, which means just about no library would
- # ever link correctly. If we're not using GNU ld we use -z text
- # though, which does catch some bad symbols but isn't as heavy-handed
- # as -z defs.
- # For security reasons, it is highly recommended that you always
- # use absolute paths for naming shared libraries, and exclude the
- # DT_RUNPATH tag from executables and libraries. But doing so
- # requires that you compile everything twice, which is a pain.
- # So that behaviour is only enabled if SCOABSPATH is set to a
- # non-empty value in the environment. Most likely only useful for
- # creating official distributions of packages.
- # This is a hack until libtool officially supports absolute path
- # names for shared libraries.
- no_undefined_flag_CXX='${wl}-z,text'
- allow_undefined_flag_CXX='${wl}-z,nodefs'
- archive_cmds_need_lc_CXX=no
- hardcode_shlibpath_var_CXX=no
- hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
- hardcode_libdir_separator_CXX=':'
- link_all_deplibs_CXX=yes
- export_dynamic_flag_spec_CXX='${wl}-Bexport'
- runpath_var='LD_RUN_PATH'
-
- case $cc_basename in
- CC*)
- archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- ;;
- tandem*)
- case $cc_basename in
- NCC*)
- # NonStop-UX NCC 3.20
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- esac
- ;;
- vxworks*)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
-esac
-{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
-echo "${ECHO_T}$ld_shlibs_CXX" >&6; }
-test "$ld_shlibs_CXX" = no && can_build_shared=no
-
-GCC_CXX="$GXX"
-LD_CXX="$LD"
-
-
-cat > conftest.$ac_ext <<EOF
-class Foo
-{
-public:
- Foo (void) { a = 0; }
-private:
- int a;
-};
-EOF
-
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # Parse the compiler output and extract the necessary
- # objects, libraries and library flags.
-
- # Sentinel used to keep track of whether or not we are before
- # the conftest object file.
- pre_test_object_deps_done=no
-
- # The `*' in the case matches for architectures that use `case' in
- # $output_verbose_cmd can trigger glob expansion during the loop
- # eval without this substitution.
- output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
-
- for p in `eval $output_verbose_link_cmd`; do
- case $p in
-
- -L* | -R* | -l*)
- # Some compilers place space between "-{L,R}" and the path.
- # Remove the space.
- if test $p = "-L" \
- || test $p = "-R"; then
- prev=$p
- continue
- else
- prev=
- fi
-
- if test "$pre_test_object_deps_done" = no; then
- case $p in
- -L* | -R*)
- # Internal compiler library paths should come after those
- # provided the user. The postdeps already come after the
- # user supplied libs so there is no need to process them.
- if test -z "$compiler_lib_search_path_CXX"; then
- compiler_lib_search_path_CXX="${prev}${p}"
- else
- compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
- fi
- ;;
- # The "-l" case would never come before the object being
- # linked, so don't bother handling this case.
- esac
- else
- if test -z "$postdeps_CXX"; then
- postdeps_CXX="${prev}${p}"
- else
- postdeps_CXX="${postdeps_CXX} ${prev}${p}"
- fi
- fi
- ;;
-
- *.$objext)
- # This assumes that the test object file only shows up
- # once in the compiler output.
- if test "$p" = "conftest.$objext"; then
- pre_test_object_deps_done=yes
- continue
- fi
-
- if test "$pre_test_object_deps_done" = no; then
- if test -z "$predep_objects_CXX"; then
- predep_objects_CXX="$p"
- else
- predep_objects_CXX="$predep_objects_CXX $p"
- fi
- else
- if test -z "$postdep_objects_CXX"; then
- postdep_objects_CXX="$p"
- else
- postdep_objects_CXX="$postdep_objects_CXX $p"
- fi
- fi
- ;;
-
- *) ;; # Ignore the rest.
-
- esac
- done
-
- # Clean up.
- rm -f a.out a.exe
-else
- echo "libtool.m4: error: problem compiling CXX test program"
-fi
-
-$rm -f confest.$objext
-
-# PORTME: override above test on systems where it is broken
-case $host_os in
-interix[3-9]*)
- # Interix 3.5 installs completely hosed .la files for C++, so rather than
- # hack all around it, let's just trust "g++" to DTRT.
- predep_objects_CXX=
- postdep_objects_CXX=
- postdeps_CXX=
- ;;
-
-linux*)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C++ 5.9
- #
- # The more standards-conforming stlport4 library is
- # incompatible with the Cstd library. Avoid specifying
- # it if it's in CXXFLAGS. Ignore libCrun as
- # -library=stlport4 depends on it.
- case " $CXX $CXXFLAGS " in
- *" -library=stlport4 "*)
- solaris_use_stlport4=yes
- ;;
- esac
- if test "$solaris_use_stlport4" != yes; then
- postdeps_CXX='-library=Cstd -library=Crun'
- fi
- ;;
- esac
- ;;
-
-solaris*)
- case $cc_basename in
- CC*)
- # The more standards-conforming stlport4 library is
- # incompatible with the Cstd library. Avoid specifying
- # it if it's in CXXFLAGS. Ignore libCrun as
- # -library=stlport4 depends on it.
- case " $CXX $CXXFLAGS " in
- *" -library=stlport4 "*)
- solaris_use_stlport4=yes
- ;;
- esac
-
- # Adding this requires a known-good setup of shared libraries for
- # Sun compiler versions before 5.6, else PIC objects from an old
- # archive will be linked into the output, leading to subtle bugs.
- if test "$solaris_use_stlport4" != yes; then
- postdeps_CXX='-library=Cstd -library=Crun'
- fi
- ;;
- esac
- ;;
-esac
-
-
-case " $postdeps_CXX " in
-*" -lc "*) archive_cmds_need_lc_CXX=no ;;
-esac
-
-lt_prog_compiler_wl_CXX=
-lt_prog_compiler_pic_CXX=
-lt_prog_compiler_static_CXX=
-
-{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
-
- # C++ specific cases for pic, static, wl, etc.
- if test "$GXX" = yes; then
- lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_static_CXX='-static'
-
- case $host_os in
- aix*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- lt_prog_compiler_static_CXX='-Bstatic'
- fi
- ;;
- amigaos*)
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
- ;;
- beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
- # PIC is the default for these OSes.
- ;;
- mingw* | cygwin* | os2* | pw32*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- # Although the cygwin gcc ignores -fPIC, still need this for old-style
- # (--disable-auto-import) libraries
- lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
- ;;
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- lt_prog_compiler_pic_CXX='-fno-common'
- ;;
- *djgpp*)
- # DJGPP does not support shared libraries at all
- lt_prog_compiler_pic_CXX=
- ;;
- interix[3-9]*)
- # Interix 3.x gcc -fpic/-fPIC options generate broken code.
- # Instead, we relocate shared libraries at runtime.
- ;;
- sysv4*MP*)
- if test -d /usr/nec; then
- lt_prog_compiler_pic_CXX=-Kconform_pic
- fi
- ;;
- hpux*)
- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
- # not for PA HP-UX.
- case $host_cpu in
- hppa*64*|ia64*)
- ;;
- *)
- lt_prog_compiler_pic_CXX='-fPIC'
- ;;
- esac
- ;;
- *)
- lt_prog_compiler_pic_CXX='-fPIC'
- ;;
- esac
- else
- case $host_os in
- aix4* | aix5*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- lt_prog_compiler_static_CXX='-Bstatic'
- else
- lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
- fi
- ;;
- chorus*)
- case $cc_basename in
- cxch68*)
- # Green Hills C++ Compiler
- # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
- ;;
- esac
- ;;
- darwin*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- case $cc_basename in
- xlc*)
- lt_prog_compiler_pic_CXX='-qnocommon'
- lt_prog_compiler_wl_CXX='-Wl,'
- ;;
- esac
- ;;
- dgux*)
- case $cc_basename in
- ec++*)
- lt_prog_compiler_pic_CXX='-KPIC'
- ;;
- ghcx*)
- # Green Hills C++ Compiler
- lt_prog_compiler_pic_CXX='-pic'
- ;;
- *)
- ;;
- esac
- ;;
- freebsd* | dragonfly*)
- # FreeBSD uses GNU C++
- ;;
- hpux9* | hpux10* | hpux11*)
- case $cc_basename in
- CC*)
- lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
- if test "$host_cpu" != ia64; then
- lt_prog_compiler_pic_CXX='+Z'
- fi
- ;;
- aCC*)
- lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
- case $host_cpu in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- lt_prog_compiler_pic_CXX='+Z'
- ;;
- esac
- ;;
- *)
- ;;
- esac
- ;;
- interix*)
- # This is c89, which is MS Visual C++ (no shared libs)
- # Anyone wants to do a port?
- ;;
- irix5* | irix6* | nonstopux*)
- case $cc_basename in
- CC*)
- lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_static_CXX='-non_shared'
- # CC pic flag -KPIC is the default.
- ;;
- *)
- ;;
- esac
- ;;
- linux* | k*bsd*-gnu)
- case $cc_basename in
- KCC*)
- # KAI C++ Compiler
- lt_prog_compiler_wl_CXX='--backend -Wl,'
- lt_prog_compiler_pic_CXX='-fPIC'
- ;;
- icpc* | ecpc*)
- # Intel C++
- lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_pic_CXX='-KPIC'
- lt_prog_compiler_static_CXX='-static'
- ;;
- pgCC*)
- # Portland Group C++ compiler.
- lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_pic_CXX='-fpic'
- lt_prog_compiler_static_CXX='-Bstatic'
- ;;
- cxx*)
- # Compaq C++
- # Make sure the PIC flag is empty. It appears that all Alpha
- # Linux and Compaq Tru64 Unix objects are PIC.
- lt_prog_compiler_pic_CXX=
- lt_prog_compiler_static_CXX='-non_shared'
- ;;
- *)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C++ 5.9
- lt_prog_compiler_pic_CXX='-KPIC'
- lt_prog_compiler_static_CXX='-Bstatic'
- lt_prog_compiler_wl_CXX='-Qoption ld '
- ;;
- esac
- ;;
- esac
- ;;
- lynxos*)
- ;;
- m88k*)
- ;;
- mvs*)
- case $cc_basename in
- cxx*)
- lt_prog_compiler_pic_CXX='-W c,exportall'
- ;;
- *)
- ;;
- esac
- ;;
- netbsd*)
- ;;
- osf3* | osf4* | osf5*)
- case $cc_basename in
- KCC*)
- lt_prog_compiler_wl_CXX='--backend -Wl,'
- ;;
- RCC*)
- # Rational C++ 2.4.1
- lt_prog_compiler_pic_CXX='-pic'
- ;;
- cxx*)
- # Digital/Compaq C++
- lt_prog_compiler_wl_CXX='-Wl,'
- # Make sure the PIC flag is empty. It appears that all Alpha
- # Linux and Compaq Tru64 Unix objects are PIC.
- lt_prog_compiler_pic_CXX=
- lt_prog_compiler_static_CXX='-non_shared'
- ;;
- *)
- ;;
- esac
- ;;
- psos*)
- ;;
- solaris*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.2, 5.x and Centerline C++
- lt_prog_compiler_pic_CXX='-KPIC'
- lt_prog_compiler_static_CXX='-Bstatic'
- lt_prog_compiler_wl_CXX='-Qoption ld '
- ;;
- gcx*)
- # Green Hills C++ Compiler
- lt_prog_compiler_pic_CXX='-PIC'
- ;;
- *)
- ;;
- esac
- ;;
- sunos4*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.x
- lt_prog_compiler_pic_CXX='-pic'
- lt_prog_compiler_static_CXX='-Bstatic'
- ;;
- lcc*)
- # Lucid
- lt_prog_compiler_pic_CXX='-pic'
- ;;
- *)
- ;;
- esac
- ;;
- tandem*)
- case $cc_basename in
- NCC*)
- # NonStop-UX NCC 3.20
- lt_prog_compiler_pic_CXX='-KPIC'
- ;;
- *)
- ;;
- esac
- ;;
- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
- case $cc_basename in
- CC*)
- lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_pic_CXX='-KPIC'
- lt_prog_compiler_static_CXX='-Bstatic'
- ;;
- esac
- ;;
- vxworks*)
- ;;
- *)
- lt_prog_compiler_can_build_shared_CXX=no
- ;;
- esac
- fi
-
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; }
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$lt_prog_compiler_pic_CXX"; then
-
-{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; }
-if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_prog_compiler_pic_works_CXX=no
- ac_outfile=conftest.$ac_objext
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- # The option is referenced via a variable to avoid confusing sed.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11729: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>conftest.err)
- ac_status=$?
- cat conftest.err >&5
- echo "$as_me:11733: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s "$ac_outfile"; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings other than the usual output.
- $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
- lt_prog_compiler_pic_works_CXX=yes
- fi
- fi
- $rm conftest*
-
-fi
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6; }
-
-if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then
- case $lt_prog_compiler_pic_CXX in
- "" | " "*) ;;
- *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
- esac
-else
- lt_prog_compiler_pic_CXX=
- lt_prog_compiler_can_build_shared_CXX=no
-fi
-
-fi
-case $host_os in
- # For platforms which do not support PIC, -DPIC is meaningless:
- *djgpp*)
- lt_prog_compiler_pic_CXX=
- ;;
- *)
- lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
- ;;
-esac
-
-#
-# Check to make sure the static flag actually works.
-#
-wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
-{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
-if test "${lt_prog_compiler_static_works_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_prog_compiler_static_works_CXX=no
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
- echo "$lt_simple_link_test_code" > conftest.$ac_ext
- if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
- # The linker can only warn and ignore the option if not recognized
- # So say no if there are warnings
- if test -s conftest.err; then
- # Append any errors to the config.log.
- cat conftest.err 1>&5
- $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if diff conftest.exp conftest.er2 >/dev/null; then
- lt_prog_compiler_static_works_CXX=yes
- fi
- else
- lt_prog_compiler_static_works_CXX=yes
- fi
- fi
- $rm conftest*
- LDFLAGS="$save_LDFLAGS"
-
-fi
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5
-echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6; }
-
-if test x"$lt_prog_compiler_static_works_CXX" = xyes; then
- :
-else
- lt_prog_compiler_static_CXX=
-fi
-
-
-{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
-if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_cv_prog_compiler_c_o_CXX=no
- $rm -r conftest 2>/dev/null
- mkdir conftest
- cd conftest
- mkdir out
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- lt_compiler_flag="-o out/conftest2.$ac_objext"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11833: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>out/conftest.err)
- ac_status=$?
- cat out/conftest.err >&5
- echo "$as_me:11837: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s out/conftest2.$ac_objext
- then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
- $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
- if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_c_o_CXX=yes
- fi
- fi
- chmod u+w . 2>&5
- $rm conftest*
- # SGI C++ compiler will create directory out/ii_files/ for
- # template instantiation
- test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
- $rm out/* && rmdir out
- cd ..
- rmdir conftest
- $rm conftest*
-
-fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; }
-
-
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
- # do not overwrite the value of need_locks provided by the user
- { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
- hard_links=yes
- $rm conftest*
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- touch conftest.a
- ln conftest.a conftest.b 2>&5 || hard_links=no
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- { echo "$as_me:$LINENO: result: $hard_links" >&5
-echo "${ECHO_T}$hard_links" >&6; }
- if test "$hard_links" = no; then
- { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
- need_locks=warn
- fi
-else
- need_locks=no
-fi
-
-{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
-
- export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- case $host_os in
- aix4* | aix5*)
- # If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to AIX nm, but means don't demangle with GNU nm
- if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
- export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
- else
- export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
- fi
- ;;
- pw32*)
- export_symbols_cmds_CXX="$ltdll_cmds"
- ;;
- cygwin* | mingw*)
- export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
- ;;
- *)
- export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- ;;
- esac
-
-{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
-echo "${ECHO_T}$ld_shlibs_CXX" >&6; }
-test "$ld_shlibs_CXX" = no && can_build_shared=no
-
-#
-# Do we need to explicitly link libc?
-#
-case "x$archive_cmds_need_lc_CXX" in
-x|xyes)
- # Assume -lc should be added
- archive_cmds_need_lc_CXX=yes
-
- if test "$enable_shared" = yes && test "$GCC" = yes; then
- case $archive_cmds_CXX in
- *'~'*)
- # FIXME: we may have to deal with multi-command sequences.
- ;;
- '$CC '*)
- # Test whether the compiler implicitly links with -lc since on some
- # systems, -lgcc has to come before -lc. If gcc already passes -lc
- # to ld, don't add -lc before -lgcc.
- { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
- $rm conftest*
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } 2>conftest.err; then
- soname=conftest
- lib=conftest
- libobjs=conftest.$ac_objext
- deplibs=
- wl=$lt_prog_compiler_wl_CXX
- pic_flag=$lt_prog_compiler_pic_CXX
- compiler_flags=-v
- linker_flags=-v
- verstring=
- output_objdir=.
- libname=conftest
- lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
- allow_undefined_flag_CXX=
- if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
- (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
- then
- archive_cmds_need_lc_CXX=no
- else
- archive_cmds_need_lc_CXX=yes
- fi
- allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
- else
- cat conftest.err 1>&5
- fi
- $rm conftest*
- { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5
-echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; }
- ;;
- esac
- fi
- ;;
-esac
-
-{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
- shlibpath_var=LIBPATH
-
- # AIX 3 has no versioning support, so we append a major version to the name.
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
-
-aix4* | aix5*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- hardcode_into_libs=yes
- if test "$host_cpu" = ia64; then
- # AIX 5 supports IA64
- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- else
- # With GCC up to 2.95.x, collect2 would create an import file
- # for dependence libraries. The import file would start with
- # the line `#! .'. This would cause the generated library to
- # depend on `.', always an invalid library. This was fixed in
- # development snapshots of GCC prior to 3.0.
- case $host_os in
- aix4 | aix4.[01] | aix4.[01].*)
- if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
- echo ' yes '
- echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
- :
- else
- can_build_shared=no
- fi
- ;;
- esac
- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
- # soname into executable. Probably we can add versioning support to
- # collect2, so additional links can be useful in future.
- if test "$aix_use_runtimelinking" = yes; then
- # If using run time linking (on AIX 4.2 or later) use lib<name>.so
- # instead of lib<name>.a to let people know that these are not
- # typical AIX shared libraries.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- else
- # We preserve .a as extension for shared libraries through AIX4.2
- # and later when we are not doing run time linking.
- library_names_spec='${libname}${release}.a $libname.a'
- soname_spec='${libname}${release}${shared_ext}$major'
- fi
- shlibpath_var=LIBPATH
- fi
- ;;
-
-amigaos*)
- library_names_spec='$libname.ixlibrary $libname.a'
- # Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
- ;;
-
-beos*)
- library_names_spec='${libname}${shared_ext}'
- dynamic_linker="$host_os ld.so"
- shlibpath_var=LIBRARY_PATH
- ;;
-
-bsdi[45]*)
- version_type=linux
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
- sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
- # the default ld.so.conf also contains /usr/contrib/lib and
- # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
- # libtool to hard-code these into programs
- ;;
-
-cygwin* | mingw* | pw32*)
- version_type=windows
- shrext_cmds=".dll"
- need_version=no
- need_lib_prefix=no
-
- case $GCC,$host_os in
- yes,cygwin* | yes,mingw* | yes,pw32*)
- library_names_spec='$libname.dll.a'
- # DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname~
- chmod a+x \$dldir/$dlname'
- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
- dlpath=$dir/\$dldll~
- $rm \$dlpath'
- shlibpath_overrides_runpath=yes
-
- case $host_os in
- cygwin*)
- # Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
- ;;
- mingw*)
- # MinGW DLLs use traditional 'lib' prefix
- soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
- # It is most probably a Windows format PATH printed by
- # mingw gcc, but we are running on Cygwin. Gcc prints its search
- # path with ; separators, and with drive letters. We can handle the
- # drive letters (cygwin fileutils understands them), so leave them,
- # especially as we might pass files found there to a mingw objdump,
- # which wouldn't understand a cygwinified path. Ahh.
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
- ;;
- pw32*)
- # pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- ;;
- esac
- ;;
-
- *)
- library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
- ;;
- esac
- dynamic_linker='Win32 ld.exe'
- # FIXME: first we should search . and the directory the executable is in
- shlibpath_var=PATH
- ;;
-
-darwin* | rhapsody*)
- dynamic_linker="$host_os dyld"
- version_type=darwin
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
- soname_spec='${libname}${release}${major}$shared_ext'
- shlibpath_overrides_runpath=yes
- shlibpath_var=DYLD_LIBRARY_PATH
- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-
- sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
- ;;
-
-dgux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-freebsd1*)
- dynamic_linker=no
- ;;
-
-freebsd* | dragonfly*)
- # DragonFly does not have aout. When/if they implement a new
- # versioning mechanism, adjust this.
- if test -x /usr/bin/objformat; then
- objformat=`/usr/bin/objformat`
- else
- case $host_os in
- freebsd[123]*) objformat=aout ;;
- *) objformat=elf ;;
- esac
- fi
- version_type=freebsd-$objformat
- case $version_type in
- freebsd-elf*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- need_version=no
- need_lib_prefix=no
- ;;
- freebsd-*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
- need_version=yes
- ;;
- esac
- shlibpath_var=LD_LIBRARY_PATH
- case $host_os in
- freebsd2*)
- shlibpath_overrides_runpath=yes
- ;;
- freebsd3.[01]* | freebsdelf3.[01]*)
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
- freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
- *) # from 4.6 on, and DragonFly
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- esac
- ;;
-
-gnu*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- hardcode_into_libs=yes
- ;;
-
-hpux9* | hpux10* | hpux11*)
- # Give a soname corresponding to the major version so that dld.sl refuses to
- # link against other versions.
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- case $host_cpu in
- ia64*)
- shrext_cmds='.so'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.so"
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- if test "X$HPUX_IA64_MODE" = X32; then
- sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
- else
- sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
- fi
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- hppa*64*)
- shrext_cmds='.sl'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- *)
- shrext_cmds='.sl'
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=SHLIB_PATH
- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
- esac
- # HP-UX runs *really* slowly unless shared libraries are mode 555.
- postinstall_cmds='chmod 555 $lib'
- ;;
-
-interix[3-9]*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $host_os in
- nonstopux*) version_type=nonstopux ;;
- *)
- if test "$lt_cv_prog_gnu_ld" = yes; then
- version_type=linux
- else
- version_type=irix
- fi ;;
- esac
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
- case $host_os in
- irix5* | nonstopux*)
- libsuff= shlibsuff=
- ;;
- *)
- case $LD in # libtool.m4 will add one of these switches to LD
- *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
- libsuff= shlibsuff= libmagic=32-bit;;
- *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
- libsuff=32 shlibsuff=N32 libmagic=N32;;
- *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
- libsuff=64 shlibsuff=64 libmagic=64-bit;;
- *) libsuff= shlibsuff= libmagic=never-match;;
- esac
- ;;
- esac
- shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
- hardcode_into_libs=yes
- ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
- dynamic_linker=no
- ;;
-
-# This must be Linux ELF.
-linux* | k*bsd*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- # This implies no fast_install, which is unacceptable.
- # Some rework will be needed to allow for fast_install
- # before this can be enabled.
- hardcode_into_libs=yes
-
- # Append ld.so.conf contents to the search path
- if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
- fi
-
- # We used to test for /lib/ld.so.1 and disable shared libraries on
- # powerpc, because MkLinux only supported shared libraries with the
- # GNU dynamic linker. Since this was broken with cross compilers,
- # most powerpc-linux boxes support dynamic linking these days and
- # people can always --disable-shared, the test was removed, and we
- # assume the GNU/Linux dynamic linker is in use.
- dynamic_linker='GNU/Linux ld.so'
- ;;
-
-netbsd*)
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- dynamic_linker='NetBSD (a.out) ld.so'
- else
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='NetBSD ld.elf_so'
- fi
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
-
-newsos6)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- ;;
-
-nto-qnx*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- ;;
-
-openbsd*)
- version_type=sunos
- sys_lib_dlsearch_path_spec="/usr/lib"
- need_lib_prefix=no
- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
- case $host_os in
- openbsd3.3 | openbsd3.3.*) need_version=yes ;;
- *) need_version=no ;;
- esac
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- case $host_os in
- openbsd2.[89] | openbsd2.[89].*)
- shlibpath_overrides_runpath=no
- ;;
- *)
- shlibpath_overrides_runpath=yes
- ;;
- esac
- else
- shlibpath_overrides_runpath=yes
- fi
- ;;
-
-os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- need_lib_prefix=no
- library_names_spec='$libname${shared_ext} $libname.a'
- dynamic_linker='OS/2 ld.exe'
- shlibpath_var=LIBPATH
- ;;
-
-osf3* | osf4* | osf5*)
- version_type=osf
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
- ;;
-
-rdos*)
- dynamic_linker=no
- ;;
-
-solaris*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- # ldd complains unless libraries are executable
- postinstall_cmds='chmod +x $lib'
- ;;
-
-sunos4*)
- version_type=sunos
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- if test "$with_gnu_ld" = yes; then
- need_lib_prefix=no
- fi
- need_version=yes
- ;;
-
-sysv4 | sysv4.3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- case $host_vendor in
- sni)
- shlibpath_overrides_runpath=no
- need_lib_prefix=no
- export_dynamic_flag_spec='${wl}-Blargedynsym'
- runpath_var=LD_RUN_PATH
- ;;
- siemens)
- need_lib_prefix=no
- ;;
- motorola)
- need_lib_prefix=no
- need_version=no
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
- ;;
- esac
- ;;
-
-sysv4*MP*)
- if test -d /usr/nec ;then
- version_type=linux
- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
- soname_spec='$libname${shared_ext}.$major'
- shlibpath_var=LD_LIBRARY_PATH
- fi
- ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- version_type=freebsd-elf
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- hardcode_into_libs=yes
- if test "$with_gnu_ld" = yes; then
- sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
- shlibpath_overrides_runpath=no
- else
- sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
- shlibpath_overrides_runpath=yes
- case $host_os in
- sco3.2v5*)
- sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
- ;;
- esac
- fi
- sys_lib_dlsearch_path_spec='/usr/lib'
- ;;
-
-uts4*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-*)
- dynamic_linker=no
- ;;
-esac
-{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
-echo "${ECHO_T}$dynamic_linker" >&6; }
-test "$dynamic_linker" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
- variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
-hardcode_action_CXX=
-if test -n "$hardcode_libdir_flag_spec_CXX" || \
- test -n "$runpath_var_CXX" || \
- test "X$hardcode_automatic_CXX" = "Xyes" ; then
-
- # We can hardcode non-existant directories.
- if test "$hardcode_direct_CXX" != no &&
- # If the only mechanism to avoid hardcoding is shlibpath_var, we
- # have to relink, otherwise we might link with an installed library
- # when we should be linking with a yet-to-be-installed one
- ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
- test "$hardcode_minus_L_CXX" != no; then
- # Linking always hardcodes the temporary library directory.
- hardcode_action_CXX=relink
- else
- # We can link without hardcoding, and we can hardcode nonexisting dirs.
- hardcode_action_CXX=immediate
- fi
-else
- # We cannot hardcode anything, or else we can only hardcode existing
- # directories.
- hardcode_action_CXX=unsupported
-fi
-{ echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5
-echo "${ECHO_T}$hardcode_action_CXX" >&6; }
-
-if test "$hardcode_action_CXX" = relink; then
- # Fast installation is not supported
- enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
- test "$enable_shared" = no; then
- # Fast installation is not necessary
- enable_fast_install=needless
-fi
-
-
-# The else clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
- # See if we are running on zsh, and set the options which allow our commands through
- # without removal of \ escapes.
- if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
- fi
- # Now quote all the things that may contain metacharacters while being
- # careful not to overquote the AC_SUBSTed values. We take copies of the
- # variables and quote the copies for generation of the libtool script.
- for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
- SED SHELL STRIP \
- libname_spec library_names_spec soname_spec extract_expsyms_cmds \
- old_striplib striplib file_magic_cmd finish_cmds finish_eval \
- deplibs_check_method reload_flag reload_cmds need_locks \
- lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
- lt_cv_sys_global_symbol_to_c_name_address \
- sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
- old_postinstall_cmds old_postuninstall_cmds \
- compiler_CXX \
- CC_CXX \
- LD_CXX \
- lt_prog_compiler_wl_CXX \
- lt_prog_compiler_pic_CXX \
- lt_prog_compiler_static_CXX \
- lt_prog_compiler_no_builtin_flag_CXX \
- export_dynamic_flag_spec_CXX \
- thread_safe_flag_spec_CXX \
- whole_archive_flag_spec_CXX \
- enable_shared_with_static_runtimes_CXX \
- old_archive_cmds_CXX \
- old_archive_from_new_cmds_CXX \
- predep_objects_CXX \
- postdep_objects_CXX \
- predeps_CXX \
- postdeps_CXX \
- compiler_lib_search_path_CXX \
- archive_cmds_CXX \
- archive_expsym_cmds_CXX \
- postinstall_cmds_CXX \
- postuninstall_cmds_CXX \
- old_archive_from_expsyms_cmds_CXX \
- allow_undefined_flag_CXX \
- no_undefined_flag_CXX \
- export_symbols_cmds_CXX \
- hardcode_libdir_flag_spec_CXX \
- hardcode_libdir_flag_spec_ld_CXX \
- hardcode_libdir_separator_CXX \
- hardcode_automatic_CXX \
- module_cmds_CXX \
- module_expsym_cmds_CXX \
- lt_cv_prog_compiler_c_o_CXX \
- fix_srcfile_path_CXX \
- exclude_expsyms_CXX \
- include_expsyms_CXX; do
-
- case $var in
- old_archive_cmds_CXX | \
- old_archive_from_new_cmds_CXX | \
- archive_cmds_CXX | \
- archive_expsym_cmds_CXX | \
- module_cmds_CXX | \
- module_expsym_cmds_CXX | \
- old_archive_from_expsyms_cmds_CXX | \
- export_symbols_cmds_CXX | \
- extract_expsyms_cmds | reload_cmds | finish_cmds | \
- postinstall_cmds | postuninstall_cmds | \
- old_postinstall_cmds | old_postuninstall_cmds | \
- sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
- # Double-quote double-evaled strings.
- eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
- ;;
- *)
- eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
- ;;
- esac
- done
-
- case $lt_echo in
- *'\$0 --fallback-echo"')
- lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
- ;;
- esac
-
-cfgfile="$ofile"
-
- cat <<__EOF__ >> "$cfgfile"
-# ### BEGIN LIBTOOL TAG CONFIG: $tagname
-
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
-
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$archive_cmds_need_lc_CXX
-
-# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
-
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
-
-# The host system.
-host_alias=$host_alias
-host=$host
-host_os=$host_os
-
-# The build system.
-build_alias=$build_alias
-build=$build
-build_os=$build_os
-
-# An echo program that does not interpret backslashes.
-echo=$lt_echo
-
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
-
-# A C compiler.
-LTCC=$lt_LTCC
-
-# LTCC compiler flags.
-LTCFLAGS=$lt_LTCFLAGS
-
-# A language-specific compiler.
-CC=$lt_compiler_CXX
-
-# Is the compiler the GNU C compiler?
-with_gcc=$GCC_CXX
-
-# An ERE matcher.
-EGREP=$lt_EGREP
-
-# The linker used to build libraries.
-LD=$lt_LD_CXX
-
-# Whether we need hard or soft links.
-LN_S=$lt_LN_S
-
-# A BSD-compatible nm program.
-NM=$lt_NM
-
-# A symbol stripping program
-STRIP=$lt_STRIP
-
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=$MAGIC_CMD
-
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
-
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
-
-# Used on cygwin: assembler.
-AS="$AS"
-
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
-
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
-
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl_CXX
-
-# Object file suffix (normally "o").
-objext="$ac_objext"
-
-# Old archive suffix (normally "a").
-libext="$libext"
-
-# Shared library suffix (normally ".so").
-shrext_cmds='$shrext_cmds'
-
-# Executable file suffix (normally "").
-exeext="$exeext"
-
-# Additional compiler flags for building library objects.
-pic_flag=$lt_lt_prog_compiler_pic_CXX
-pic_mode=$pic_mode
-
-# What is the maximum length of a command?
-max_cmd_len=$lt_cv_sys_max_cmd_len
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
-
-# Must we lock files when doing compilation?
-need_locks=$lt_need_locks
-
-# Do we need the lib prefix for modules?
-need_lib_prefix=$need_lib_prefix
-
-# Do we need a version for libraries?
-need_version=$need_version
-
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
-
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
-
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_lt_prog_compiler_static_CXX
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
-
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX
-
-# Library versioning type.
-version_type=$version_type
-
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
-
-# List of archive names. First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=$lt_library_names_spec
-
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
-
-# Commands used to build and install an old-style archive.
-RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_old_archive_cmds_CXX
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
-
-# Commands used to build and install a shared archive.
-archive_cmds=$lt_archive_cmds_CXX
-archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
-postinstall_cmds=$lt_postinstall_cmds
-postuninstall_cmds=$lt_postuninstall_cmds
-
-# Commands used to build a loadable module (assumed same as above if empty)
-module_cmds=$lt_module_cmds_CXX
-module_expsym_cmds=$lt_module_expsym_cmds_CXX
-
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predep_objects=$lt_predep_objects_CXX
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=$lt_postdep_objects_CXX
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=$lt_predeps_CXX
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=$lt_postdeps_CXX
-
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
-
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
-
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd=$lt_file_magic_cmd
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag_CXX
-
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag_CXX
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
-
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$lt_finish_eval
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
-
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
-
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
-
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
-
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action_CXX
-
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
-
-# If ld is used when linking, flag to hardcode \$libdir into
-# a binary during linking. This must work even if \$libdir does
-# not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
-
-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$hardcode_direct_CXX
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$hardcode_minus_L_CXX
-
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
-
-# Set to yes if building a shared library automatically hardcodes DIR into the library
-# and all subsequent libraries and executables linked against it.
-hardcode_automatic=$hardcode_automatic_CXX
-
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs_CXX
-
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
-
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
-
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path=$lt_fix_srcfile_path
-
-# Set to yes if exported symbols are required.
-always_export_symbols=$always_export_symbols_CXX
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds_CXX
-
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms_CXX
-
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms_CXX
-
-# ### END LIBTOOL TAG CONFIG: $tagname
-
-__EOF__
-
-
-else
- # If there is no Makefile yet, we rely on a make rule to execute
- # `config.status --recheck' to rerun these tests and create the
- # libtool script then.
- ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
- if test -f "$ltmain_in"; then
- test -f Makefile && make "$ltmain"
- fi
-fi
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-CC=$lt_save_CC
-LDCXX=$LD
-LD=$lt_save_LD
-GCC=$lt_save_GCC
-with_gnu_ldcxx=$with_gnu_ld
-with_gnu_ld=$lt_save_with_gnu_ld
-lt_cv_path_LDCXX=$lt_cv_path_LD
-lt_cv_path_LD=$lt_save_path_LD
-lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
-lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
-
- else
- tagname=""
- fi
- ;;
-
- F77)
- if test -n "$F77" && test "X$F77" != "Xno"; then
-
-ac_ext=f
-ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
-ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_f77_compiler_gnu
-
-
-archive_cmds_need_lc_F77=no
-allow_undefined_flag_F77=
-always_export_symbols_F77=no
-archive_expsym_cmds_F77=
-export_dynamic_flag_spec_F77=
-hardcode_direct_F77=no
-hardcode_libdir_flag_spec_F77=
-hardcode_libdir_flag_spec_ld_F77=
-hardcode_libdir_separator_F77=
-hardcode_minus_L_F77=no
-hardcode_automatic_F77=no
-module_cmds_F77=
-module_expsym_cmds_F77=
-link_all_deplibs_F77=unknown
-old_archive_cmds_F77=$old_archive_cmds
-no_undefined_flag_F77=
-whole_archive_flag_spec_F77=
-enable_shared_with_static_runtimes_F77=no
-
-# Source file extension for f77 test sources.
-ac_ext=f
-
-# Object file extension for compiled f77 test sources.
-objext=o
-objext_F77=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="\
- subroutine t
- return
- end
-"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code="\
- program t
- end
-"
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-
-
-# save warnings/boilerplate of simple test code
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$rm conftest*
-
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$rm conftest*
-
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${F77-"f77"}
-compiler=$CC
-compiler_F77=$CC
-for cc_temp in $compiler""; do
- case $cc_temp in
- compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
- distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
- \-*) ;;
- *) break;;
- esac
-done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-
-
-{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
-echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; }
-{ echo "$as_me:$LINENO: result: $can_build_shared" >&5
-echo "${ECHO_T}$can_build_shared" >&6; }
-
-{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
-echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; }
-test "$can_build_shared" = "no" && enable_shared=no
-
-# On AIX, shared libraries and static libraries use the same namespace, and
-# are all built from PIC.
-case $host_os in
-aix3*)
- test "$enable_shared" = yes && enable_static=no
- if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds~\$RANLIB \$lib"
- postinstall_cmds='$RANLIB $lib'
- fi
- ;;
-aix4* | aix5*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
- fi
- ;;
-esac
-{ echo "$as_me:$LINENO: result: $enable_shared" >&5
-echo "${ECHO_T}$enable_shared" >&6; }
-
-{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5
-echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; }
-# Make sure either enable_shared or enable_static is yes.
-test "$enable_shared" = yes || enable_static=yes
-{ echo "$as_me:$LINENO: result: $enable_static" >&5
-echo "${ECHO_T}$enable_static" >&6; }
-
-GCC_F77="$G77"
-LD_F77="$LD"
-
-lt_prog_compiler_wl_F77=
-lt_prog_compiler_pic_F77=
-lt_prog_compiler_static_F77=
-
-{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
-
- if test "$GCC" = yes; then
- lt_prog_compiler_wl_F77='-Wl,'
- lt_prog_compiler_static_F77='-static'
-
- case $host_os in
- aix*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- lt_prog_compiler_static_F77='-Bstatic'
- fi
- ;;
-
- amigaos*)
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4'
- ;;
-
- beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
- # PIC is the default for these OSes.
- ;;
-
- mingw* | cygwin* | pw32* | os2*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- # Although the cygwin gcc ignores -fPIC, still need this for old-style
- # (--disable-auto-import) libraries
- lt_prog_compiler_pic_F77='-DDLL_EXPORT'
- ;;
-
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- lt_prog_compiler_pic_F77='-fno-common'
- ;;
-
- interix[3-9]*)
- # Interix 3.x gcc -fpic/-fPIC options generate broken code.
- # Instead, we relocate shared libraries at runtime.
- ;;
-
- msdosdjgpp*)
- # Just because we use GCC doesn't mean we suddenly get shared libraries
- # on systems that don't support them.
- lt_prog_compiler_can_build_shared_F77=no
- enable_shared=no
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- lt_prog_compiler_pic_F77=-Kconform_pic
- fi
- ;;
-
- hpux*)
- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
- # not for PA HP-UX.
- case $host_cpu in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- lt_prog_compiler_pic_F77='-fPIC'
- ;;
- esac
- ;;
-
- *)
- lt_prog_compiler_pic_F77='-fPIC'
- ;;
- esac
- else
- # PORTME Check for flag to pass linker flags through the system compiler.
- case $host_os in
- aix*)
- lt_prog_compiler_wl_F77='-Wl,'
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- lt_prog_compiler_static_F77='-Bstatic'
- else
- lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp'
- fi
- ;;
- darwin*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- case $cc_basename in
- xlc*)
- lt_prog_compiler_pic_F77='-qnocommon'
- lt_prog_compiler_wl_F77='-Wl,'
- ;;
- esac
- ;;
-
- mingw* | cygwin* | pw32* | os2*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- lt_prog_compiler_pic_F77='-DDLL_EXPORT'
- ;;
-
- hpux9* | hpux10* | hpux11*)
- lt_prog_compiler_wl_F77='-Wl,'
- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
- # not for PA HP-UX.
- case $host_cpu in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- lt_prog_compiler_pic_F77='+Z'
- ;;
- esac
- # Is there a better lt_prog_compiler_static that works with the bundled CC?
- lt_prog_compiler_static_F77='${wl}-a ${wl}archive'
- ;;
-
- irix5* | irix6* | nonstopux*)
- lt_prog_compiler_wl_F77='-Wl,'
- # PIC (with -KPIC) is the default.
- lt_prog_compiler_static_F77='-non_shared'
- ;;
-
- newsos6)
- lt_prog_compiler_pic_F77='-KPIC'
- lt_prog_compiler_static_F77='-Bstatic'
- ;;
-
- linux* | k*bsd*-gnu)
- case $cc_basename in
- icc* | ecc*)
- lt_prog_compiler_wl_F77='-Wl,'
- lt_prog_compiler_pic_F77='-KPIC'
- lt_prog_compiler_static_F77='-static'
- ;;
- pgcc* | pgf77* | pgf90* | pgf95*)
- # Portland Group compilers (*not* the Pentium gcc compiler,
- # which looks to be a dead project)
- lt_prog_compiler_wl_F77='-Wl,'
- lt_prog_compiler_pic_F77='-fpic'
- lt_prog_compiler_static_F77='-Bstatic'
- ;;
- ccc*)
- lt_prog_compiler_wl_F77='-Wl,'
- # All Alpha code is PIC.
- lt_prog_compiler_static_F77='-non_shared'
- ;;
- *)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C 5.9
- lt_prog_compiler_pic_F77='-KPIC'
- lt_prog_compiler_static_F77='-Bstatic'
- lt_prog_compiler_wl_F77='-Wl,'
- ;;
- *Sun\ F*)
- # Sun Fortran 8.3 passes all unrecognized flags to the linker
- lt_prog_compiler_pic_F77='-KPIC'
- lt_prog_compiler_static_F77='-Bstatic'
- lt_prog_compiler_wl_F77=''
- ;;
- esac
- ;;
- esac
- ;;
-
- osf3* | osf4* | osf5*)
- lt_prog_compiler_wl_F77='-Wl,'
- # All OSF/1 code is PIC.
- lt_prog_compiler_static_F77='-non_shared'
- ;;
-
- rdos*)
- lt_prog_compiler_static_F77='-non_shared'
- ;;
-
- solaris*)
- lt_prog_compiler_pic_F77='-KPIC'
- lt_prog_compiler_static_F77='-Bstatic'
- case $cc_basename in
- f77* | f90* | f95*)
- lt_prog_compiler_wl_F77='-Qoption ld ';;
- *)
- lt_prog_compiler_wl_F77='-Wl,';;
- esac
- ;;
-
- sunos4*)
- lt_prog_compiler_wl_F77='-Qoption ld '
- lt_prog_compiler_pic_F77='-PIC'
- lt_prog_compiler_static_F77='-Bstatic'
- ;;
-
- sysv4 | sysv4.2uw2* | sysv4.3*)
- lt_prog_compiler_wl_F77='-Wl,'
- lt_prog_compiler_pic_F77='-KPIC'
- lt_prog_compiler_static_F77='-Bstatic'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec ;then
- lt_prog_compiler_pic_F77='-Kconform_pic'
- lt_prog_compiler_static_F77='-Bstatic'
- fi
- ;;
-
- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
- lt_prog_compiler_wl_F77='-Wl,'
- lt_prog_compiler_pic_F77='-KPIC'
- lt_prog_compiler_static_F77='-Bstatic'
- ;;
-
- unicos*)
- lt_prog_compiler_wl_F77='-Wl,'
- lt_prog_compiler_can_build_shared_F77=no
- ;;
-
- uts4*)
- lt_prog_compiler_pic_F77='-pic'
- lt_prog_compiler_static_F77='-Bstatic'
- ;;
-
- *)
- lt_prog_compiler_can_build_shared_F77=no
- ;;
- esac
- fi
-
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; }
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$lt_prog_compiler_pic_F77"; then
-
-{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5
-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; }
-if test "${lt_prog_compiler_pic_works_F77+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_prog_compiler_pic_works_F77=no
- ac_outfile=conftest.$ac_objext
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="$lt_prog_compiler_pic_F77"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- # The option is referenced via a variable to avoid confusing sed.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13395: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>conftest.err)
- ac_status=$?
- cat conftest.err >&5
- echo "$as_me:13399: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s "$ac_outfile"; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings other than the usual output.
- $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
- lt_prog_compiler_pic_works_F77=yes
- fi
- fi
- $rm conftest*
-
-fi
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6; }
-
-if test x"$lt_prog_compiler_pic_works_F77" = xyes; then
- case $lt_prog_compiler_pic_F77 in
- "" | " "*) ;;
- *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;;
- esac
-else
- lt_prog_compiler_pic_F77=
- lt_prog_compiler_can_build_shared_F77=no
-fi
-
-fi
-case $host_os in
- # For platforms which do not support PIC, -DPIC is meaningless:
- *djgpp*)
- lt_prog_compiler_pic_F77=
- ;;
- *)
- lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77"
- ;;
-esac
-
-#
-# Check to make sure the static flag actually works.
-#
-wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\"
-{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
-if test "${lt_prog_compiler_static_works_F77+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_prog_compiler_static_works_F77=no
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
- echo "$lt_simple_link_test_code" > conftest.$ac_ext
- if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
- # The linker can only warn and ignore the option if not recognized
- # So say no if there are warnings
- if test -s conftest.err; then
- # Append any errors to the config.log.
- cat conftest.err 1>&5
- $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if diff conftest.exp conftest.er2 >/dev/null; then
- lt_prog_compiler_static_works_F77=yes
- fi
- else
- lt_prog_compiler_static_works_F77=yes
- fi
- fi
- $rm conftest*
- LDFLAGS="$save_LDFLAGS"
-
-fi
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5
-echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6; }
-
-if test x"$lt_prog_compiler_static_works_F77" = xyes; then
- :
-else
- lt_prog_compiler_static_F77=
-fi
-
-
-{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
-if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_cv_prog_compiler_c_o_F77=no
- $rm -r conftest 2>/dev/null
- mkdir conftest
- cd conftest
- mkdir out
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- lt_compiler_flag="-o out/conftest2.$ac_objext"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13499: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>out/conftest.err)
- ac_status=$?
- cat out/conftest.err >&5
- echo "$as_me:13503: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s out/conftest2.$ac_objext
- then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
- $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
- if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_c_o_F77=yes
- fi
- fi
- chmod u+w . 2>&5
- $rm conftest*
- # SGI C++ compiler will create directory out/ii_files/ for
- # template instantiation
- test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
- $rm out/* && rmdir out
- cd ..
- rmdir conftest
- $rm conftest*
-
-fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; }
-
-
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then
- # do not overwrite the value of need_locks provided by the user
- { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
- hard_links=yes
- $rm conftest*
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- touch conftest.a
- ln conftest.a conftest.b 2>&5 || hard_links=no
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- { echo "$as_me:$LINENO: result: $hard_links" >&5
-echo "${ECHO_T}$hard_links" >&6; }
- if test "$hard_links" = no; then
- { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
- need_locks=warn
- fi
-else
- need_locks=no
-fi
-
-{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
-
- runpath_var=
- allow_undefined_flag_F77=
- enable_shared_with_static_runtimes_F77=no
- archive_cmds_F77=
- archive_expsym_cmds_F77=
- old_archive_From_new_cmds_F77=
- old_archive_from_expsyms_cmds_F77=
- export_dynamic_flag_spec_F77=
- whole_archive_flag_spec_F77=
- thread_safe_flag_spec_F77=
- hardcode_libdir_flag_spec_F77=
- hardcode_libdir_flag_spec_ld_F77=
- hardcode_libdir_separator_F77=
- hardcode_direct_F77=no
- hardcode_minus_L_F77=no
- hardcode_shlibpath_var_F77=unsupported
- link_all_deplibs_F77=unknown
- hardcode_automatic_F77=no
- module_cmds_F77=
- module_expsym_cmds_F77=
- always_export_symbols_F77=no
- export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- # include_expsyms should be a list of space-separated symbols to be *always*
- # included in the symbol list
- include_expsyms_F77=
- # exclude_expsyms can be an extended regexp of symbols to exclude
- # it will be wrapped by ` (' and `)$', so one must not match beginning or
- # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
- # as well as any symbol that contains `d'.
- exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_"
- # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
- # platforms (ab)use it in PIC code, but their linkers get confused if
- # the symbol is explicitly referenced. Since portable code cannot
- # rely on this symbol name, it's probably fine to never include it in
- # preloaded symbol tables.
- extract_expsyms_cmds=
- # Just being paranoid about ensuring that cc_basename is set.
- for cc_temp in $compiler""; do
- case $cc_temp in
- compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
- distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
- \-*) ;;
- *) break;;
- esac
-done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-
- case $host_os in
- cygwin* | mingw* | pw32*)
- # FIXME: the MSVC++ port hasn't been tested in a loooong time
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- if test "$GCC" != yes; then
- with_gnu_ld=no
- fi
- ;;
- interix*)
- # we just hope/assume this is gcc and not c89 (= MSVC++)
- with_gnu_ld=yes
- ;;
- openbsd*)
- with_gnu_ld=no
- ;;
- esac
-
- ld_shlibs_F77=yes
- if test "$with_gnu_ld" = yes; then
- # If archive_cmds runs LD, not CC, wlarc should be empty
- wlarc='${wl}'
-
- # Set some defaults for GNU ld with shared library support. These
- # are reset later if shared libraries are not supported. Putting them
- # here allows them to be overridden if necessary.
- runpath_var=LD_RUN_PATH
- hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir'
- export_dynamic_flag_spec_F77='${wl}--export-dynamic'
- # ancient GNU ld didn't support --whole-archive et. al.
- if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
- whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- whole_archive_flag_spec_F77=
- fi
- supports_anon_versioning=no
- case `$LD -v 2>/dev/null` in
- *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
- *\ 2.11.*) ;; # other 2.11 versions
- *) supports_anon_versioning=yes ;;
- esac
-
- # See if GNU ld supports shared libraries.
- case $host_os in
- aix3* | aix4* | aix5*)
- # On AIX/PPC, the GNU linker is very broken
- if test "$host_cpu" != ia64; then
- ld_shlibs_F77=no
- cat <<EOF 1>&2
-
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support. If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
-
-EOF
- fi
- ;;
-
- amigaos*)
- archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- hardcode_libdir_flag_spec_F77='-L$libdir'
- hardcode_minus_L_F77=yes
-
- # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
- # that the semantics of dynamic libraries on AmigaOS, at least up
- # to version 4, is to share data among multiple programs linked
- # with the same dynamic library. Since this doesn't match the
- # behavior of shared libraries on other platforms, we can't use
- # them.
- ld_shlibs_F77=no
- ;;
-
- beos*)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- allow_undefined_flag_F77=unsupported
- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
- # support --undefined. This deserves some investigation. FIXME
- archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- else
- ld_shlibs_F77=no
- fi
- ;;
-
- cygwin* | mingw* | pw32*)
- # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless,
- # as there is no search path for DLLs.
- hardcode_libdir_flag_spec_F77='-L$libdir'
- allow_undefined_flag_F77=unsupported
- always_export_symbols_F77=no
- enable_shared_with_static_runtimes_F77=yes
- export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
-
- if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
- archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- else
- ld_shlibs_F77=no
- fi
- ;;
-
- interix[3-9]*)
- hardcode_direct_F77=no
- hardcode_shlibpath_var_F77=no
- hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
- export_dynamic_flag_spec_F77='${wl}-E'
- # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
- # Instead, shared libraries are loaded at an image base (0x10000000 by
- # default) and relocated if they conflict, which is a slow very memory
- # consuming and fragmenting process. To avoid this, we pick a random,
- # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
- # time. Moving up from 0x10000000 also allows more sbrk(2) space.
- archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- ;;
-
- gnu* | linux* | k*bsd*-gnu)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- tmp_addflag=
- case $cc_basename,$host_cpu in
- pgcc*) # Portland Group C compiler
- whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
- tmp_addflag=' $pic_flag'
- ;;
- pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
- whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
- tmp_addflag=' $pic_flag -Mnomain' ;;
- ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
- tmp_addflag=' -i_dynamic' ;;
- efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
- tmp_addflag=' -i_dynamic -nofor_main' ;;
- ifc* | ifort*) # Intel Fortran compiler
- tmp_addflag=' -nofor_main' ;;
- esac
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*) # Sun C 5.9
- whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
- tmp_sharedflag='-G' ;;
- *Sun\ F*) # Sun Fortran 8.3
- tmp_sharedflag='-G' ;;
- *)
- tmp_sharedflag='-shared' ;;
- esac
- archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-
- if test $supports_anon_versioning = yes; then
- archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- $echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
- fi
- else
- ld_shlibs_F77=no
- fi
- ;;
-
- netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
- archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
- wlarc=
- else
- archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- fi
- ;;
-
- solaris*)
- if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
- ld_shlibs_F77=no
- cat <<EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-EOF
- elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- ld_shlibs_F77=no
- fi
- ;;
-
- sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
- case `$LD -v 2>&1` in
- *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
- ld_shlibs_F77=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
-*** reliably create shared libraries on SCO systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
- ;;
- *)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
- archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
- archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
- else
- ld_shlibs_F77=no
- fi
- ;;
- esac
- ;;
-
- sunos4*)
- archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- wlarc=
- hardcode_direct_F77=yes
- hardcode_shlibpath_var_F77=no
- ;;
-
- *)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- ld_shlibs_F77=no
- fi
- ;;
- esac
-
- if test "$ld_shlibs_F77" = no; then
- runpath_var=
- hardcode_libdir_flag_spec_F77=
- export_dynamic_flag_spec_F77=
- whole_archive_flag_spec_F77=
- fi
- else
- # PORTME fill in a description of your system's linker (not GNU ld)
- case $host_os in
- aix3*)
- allow_undefined_flag_F77=unsupported
- always_export_symbols_F77=yes
- archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
- # Note: this linker hardcodes the directories in LIBPATH if there
- # are no directories specified by -L.
- hardcode_minus_L_F77=yes
- if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
- # Neither direct hardcoding nor static linking is supported with a
- # broken collect2.
- hardcode_direct_F77=unsupported
- fi
- ;;
-
- aix4* | aix5*)
- if test "$host_cpu" = ia64; then
- # On IA64, the linker does run time linking by default, so we don't
- # have to do anything special.
- aix_use_runtimelinking=no
- exp_sym_flag='-Bexport'
- no_entry_flag=""
- else
- # If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to AIX nm, but means don't demangle with GNU nm
- if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
- export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
- else
- export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
- fi
- aix_use_runtimelinking=no
-
- # Test if we are trying to use run time linking or normal
- # AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # need to do runtime linking.
- case $host_os in aix4.[23]|aix4.[23].*|aix5*)
- for ld_flag in $LDFLAGS; do
- if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
- aix_use_runtimelinking=yes
- break
- fi
- done
- ;;
- esac
-
- exp_sym_flag='-bexport'
- no_entry_flag='-bnoentry'
- fi
-
- # When large executables or shared objects are built, AIX ld can
- # have problems creating the table of contents. If linking a library
- # or program results in "error TOC overflow" add -mminimal-toc to
- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
- archive_cmds_F77=''
- hardcode_direct_F77=yes
- hardcode_libdir_separator_F77=':'
- link_all_deplibs_F77=yes
-
- if test "$GCC" = yes; then
- case $host_os in aix4.[012]|aix4.[012].*)
- # We only want to do this on AIX 4.2 and lower, the check
- # below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" && \
- strings "$collect2name" | grep resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- :
- else
- # We have old collect2
- hardcode_direct_F77=unsupported
- # It fails to find uninstalled libraries when the uninstalled
- # path is not listed in the libpath. Setting hardcode_minus_L
- # to unsupported forces relinking
- hardcode_minus_L_F77=yes
- hardcode_libdir_flag_spec_F77='-L$libdir'
- hardcode_libdir_separator_F77=
- fi
- ;;
- esac
- shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
- fi
- else
- # not using gcc
- if test "$host_cpu" = ia64; then
- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
- # chokes on -Wl,-G. The following line is correct:
- shared_flag='-G'
- else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
- else
- shared_flag='${wl}-bM:SRE'
- fi
- fi
- fi
-
- # It seems that -bexpall does not export symbols beginning with
- # underscore (_), so it is better to generate a list of symbols to export.
- always_export_symbols_F77=yes
- if test "$aix_use_runtimelinking" = yes; then
- # Warning - without using the other runtime loading flags (-brtl),
- # -berok will link without error, but may produce a broken library.
- allow_undefined_flag_F77='-berok'
- # Determine the default libpath from the value encoded in an empty executable.
- cat >conftest.$ac_ext <<_ACEOF
- program main
-
- end
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_f77_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
-
-lt_aix_libpath_sed='
- /Import File Strings/,/^$/ {
- /^0/ {
- s/^0 *\(.*\)$/\1/
- p
- }
- }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
- hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
- archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
- else
- if test "$host_cpu" = ia64; then
- hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib'
- allow_undefined_flag_F77="-z nodefs"
- archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
- else
- # Determine the default libpath from the value encoded in an empty executable.
- cat >conftest.$ac_ext <<_ACEOF
- program main
-
- end
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_f77_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
-
-lt_aix_libpath_sed='
- /Import File Strings/,/^$/ {
- /^0/ {
- s/^0 *\(.*\)$/\1/
- p
- }
- }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
+striplib=
+old_striplib=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
+$as_echo_n "checking whether stripping libraries is possible... " >&6; }
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
- hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
- # Warning - without using the other run time loading flags,
- # -berok will link without error, but may produce a broken library.
- no_undefined_flag_F77=' ${wl}-bernotok'
- allow_undefined_flag_F77=' ${wl}-berok'
- # Exported symbols can be pulled into shared objects from archives
- whole_archive_flag_spec_F77='$convenience'
- archive_cmds_need_lc_F77=yes
- # This is similar to how AIX traditionally builds its shared libraries.
- archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
- fi
- fi
- ;;
-
- amigaos*)
- archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- hardcode_libdir_flag_spec_F77='-L$libdir'
- hardcode_minus_L_F77=yes
- # see comment about different semantics on the GNU ld section
- ld_shlibs_F77=no
- ;;
-
- bsdi[45]*)
- export_dynamic_flag_spec_F77=-rdynamic
- ;;
-
- cygwin* | mingw* | pw32*)
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- # hardcode_libdir_flag_spec is actually meaningless, as there is
- # no search path for DLLs.
- hardcode_libdir_flag_spec_F77=' '
- allow_undefined_flag_F77=unsupported
- # Tell ltmain to make .lib files, not .a files.
- libext=lib
- # Tell ltmain to make .dll files, not .so files.
- shrext_cmds=".dll"
- # FIXME: Setting linknames here is a bad hack.
- archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
- # The linker will automatically build a .lib file if we build a DLL.
- old_archive_From_new_cmds_F77='true'
- # FIXME: Should let the user specify the lib program.
- old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs'
- fix_srcfile_path_F77='`cygpath -w "$srcfile"`'
- enable_shared_with_static_runtimes_F77=yes
- ;;
-
- darwin* | rhapsody*)
- case $host_os in
- rhapsody* | darwin1.[012])
- allow_undefined_flag_F77='${wl}-undefined ${wl}suppress'
- ;;
- *) # Darwin 1.3 on
- if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
- allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
- else
- case ${MACOSX_DEPLOYMENT_TARGET} in
- 10.[012])
- allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
- ;;
- 10.*)
- allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup'
- ;;
- esac
- fi
- ;;
- esac
- archive_cmds_need_lc_F77=no
- hardcode_direct_F77=no
- hardcode_automatic_F77=yes
- hardcode_shlibpath_var_F77=unsupported
- whole_archive_flag_spec_F77=''
- link_all_deplibs_F77=yes
- if test "$GCC" = yes ; then
- output_verbose_link_cmd='echo'
- archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- else
- case $cc_basename in
- xlc*)
- output_verbose_link_cmd='echo'
- archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
- module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- ;;
- *)
- ld_shlibs_F77=no
- ;;
- esac
- fi
- ;;
-
- dgux*)
- archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec_F77='-L$libdir'
- hardcode_shlibpath_var_F77=no
- ;;
-
- freebsd1*)
- ld_shlibs_F77=no
- ;;
-
- # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
- # support. Future versions do this automatically, but an explicit c++rt0.o
- # does not break anything, and helps significantly (at the cost of a little
- # extra space).
- freebsd2.2*)
- archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
- hardcode_libdir_flag_spec_F77='-R$libdir'
- hardcode_direct_F77=yes
- hardcode_shlibpath_var_F77=no
- ;;
-
- # Unfortunately, older versions of FreeBSD 2 do not have this feature.
- freebsd2*)
- archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct_F77=yes
- hardcode_minus_L_F77=yes
- hardcode_shlibpath_var_F77=no
- ;;
-
- # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | dragonfly*)
- archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec_F77='-R$libdir'
- hardcode_direct_F77=yes
- hardcode_shlibpath_var_F77=no
- ;;
-
- hpux9*)
- if test "$GCC" = yes; then
- archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- else
- archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- fi
- hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator_F77=:
- hardcode_direct_F77=yes
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- hardcode_minus_L_F77=yes
- export_dynamic_flag_spec_F77='${wl}-E'
- ;;
-
- hpux10*)
- if test "$GCC" = yes -a "$with_gnu_ld" = no; then
- archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
- fi
- if test "$with_gnu_ld" = no; then
- hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator_F77=:
-
- hardcode_direct_F77=yes
- export_dynamic_flag_spec_F77='${wl}-E'
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- hardcode_minus_L_F77=yes
- fi
- ;;
-
- hpux11*)
- if test "$GCC" = yes -a "$with_gnu_ld" = no; then
- case $host_cpu in
- hppa*64*)
- archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- ia64*)
- archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- else
- case $host_cpu in
- hppa*64*)
- archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- ia64*)
- archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- fi
- if test "$with_gnu_ld" = no; then
- hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator_F77=:
-
- case $host_cpu in
- hppa*64*|ia64*)
- hardcode_libdir_flag_spec_ld_F77='+b $libdir'
- hardcode_direct_F77=no
- hardcode_shlibpath_var_F77=no
- ;;
- *)
- hardcode_direct_F77=yes
- export_dynamic_flag_spec_F77='${wl}-E'
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- hardcode_minus_L_F77=yes
- ;;
- esac
- fi
- ;;
-
- irix5* | irix6* | nonstopux*)
- if test "$GCC" = yes; then
- archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
- hardcode_libdir_flag_spec_ld_F77='-rpath $libdir'
- fi
- hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator_F77=:
- link_all_deplibs_F77=yes
- ;;
-
- netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
- archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
- else
- archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
- fi
- hardcode_libdir_flag_spec_F77='-R$libdir'
- hardcode_direct_F77=yes
- hardcode_shlibpath_var_F77=no
- ;;
-
- newsos6)
- archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct_F77=yes
- hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator_F77=:
- hardcode_shlibpath_var_F77=no
- ;;
-
- openbsd*)
- if test -f /usr/libexec/ld.so; then
- hardcode_direct_F77=yes
- hardcode_shlibpath_var_F77=no
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
- hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
- export_dynamic_flag_spec_F77='${wl}-E'
- else
- case $host_os in
- openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
- archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec_F77='-R$libdir'
- ;;
- *)
- archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
- ;;
- esac
- fi
- else
- ld_shlibs_F77=no
- fi
- ;;
-
- os2*)
- hardcode_libdir_flag_spec_F77='-L$libdir'
- hardcode_minus_L_F77=yes
- allow_undefined_flag_F77=unsupported
- archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
- old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
- ;;
-
- osf3*)
- if test "$GCC" = yes; then
- allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- allow_undefined_flag_F77=' -expect_unresolved \*'
- archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
- fi
- hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator_F77=:
- ;;
-
- osf4* | osf5*) # as osf3* with the addition of -msym flag
- if test "$GCC" = yes; then
- allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
- else
- allow_undefined_flag_F77=' -expect_unresolved \*'
- archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
- archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
- $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
-
- # Both c and cxx compiler support -rpath directly
- hardcode_libdir_flag_spec_F77='-rpath $libdir'
- fi
- hardcode_libdir_separator_F77=:
- ;;
-
- solaris*)
- no_undefined_flag_F77=' -z text'
- if test "$GCC" = yes; then
- wlarc='${wl}'
- archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
- $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
- else
- wlarc=''
- archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
- archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
- fi
- hardcode_libdir_flag_spec_F77='-R$libdir'
- hardcode_shlibpath_var_F77=no
- case $host_os in
- solaris2.[0-5] | solaris2.[0-5].*) ;;
- *)
- # The compiler driver will combine and reorder linker options,
- # but understands `-z linker_flag'. GCC discards it without `$wl',
- # but is careful enough not to reorder.
- # Supported since Solaris 2.6 (maybe 2.5.1?)
- if test "$GCC" = yes; then
- whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
- else
- whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract'
- fi
- ;;
- esac
- link_all_deplibs_F77=yes
- ;;
-
- sunos4*)
- if test "x$host_vendor" = xsequent; then
- # Use $CC to link under sequent, because it throws in some extra .o
- # files that make .init and .fini sections work.
- archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
- fi
- hardcode_libdir_flag_spec_F77='-L$libdir'
- hardcode_direct_F77=yes
- hardcode_minus_L_F77=yes
- hardcode_shlibpath_var_F77=no
- ;;
-
- sysv4)
- case $host_vendor in
- sni)
- archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct_F77=yes # is this really true???
- ;;
- siemens)
- ## LD is ld it makes a PLAMLIB
- ## CC just makes a GrossModule.
- archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags'
- reload_cmds_F77='$CC -r -o $output$reload_objs'
- hardcode_direct_F77=no
- ;;
- motorola)
- archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie
- ;;
- esac
- runpath_var='LD_RUN_PATH'
- hardcode_shlibpath_var_F77=no
- ;;
-
- sysv4.3*)
- archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_shlibpath_var_F77=no
- export_dynamic_flag_spec_F77='-Bexport'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_shlibpath_var_F77=no
- runpath_var=LD_RUN_PATH
- hardcode_runpath_var=yes
- ld_shlibs_F77=yes
- fi
- ;;
-
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
- no_undefined_flag_F77='${wl}-z,text'
- archive_cmds_need_lc_F77=no
- hardcode_shlibpath_var_F77=no
- runpath_var='LD_RUN_PATH'
-
- if test "$GCC" = yes; then
- archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- ;;
-
- sysv5* | sco3.2v5* | sco5v6*)
- # Note: We can NOT use -z defs as we might desire, because we do not
- # link with -lc, and that would cause any symbols used from libc to
- # always be unresolved, which means just about no library would
- # ever link correctly. If we're not using GNU ld we use -z text
- # though, which does catch some bad symbols but isn't as heavy-handed
- # as -z defs.
- no_undefined_flag_F77='${wl}-z,text'
- allow_undefined_flag_F77='${wl}-z,nodefs'
- archive_cmds_need_lc_F77=no
- hardcode_shlibpath_var_F77=no
- hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
- hardcode_libdir_separator_F77=':'
- link_all_deplibs_F77=yes
- export_dynamic_flag_spec_F77='${wl}-Bexport'
- runpath_var='LD_RUN_PATH'
-
- if test "$GCC" = yes; then
- archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- ;;
-
- uts4*)
- archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec_F77='-L$libdir'
- hardcode_shlibpath_var_F77=no
- ;;
-
- *)
- ld_shlibs_F77=no
- ;;
- esac
- fi
-
-{ echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5
-echo "${ECHO_T}$ld_shlibs_F77" >&6; }
-test "$ld_shlibs_F77" = no && can_build_shared=no
-
-#
-# Do we need to explicitly link libc?
-#
-case "x$archive_cmds_need_lc_F77" in
-x|xyes)
- # Assume -lc should be added
- archive_cmds_need_lc_F77=yes
-
- if test "$enable_shared" = yes && test "$GCC" = yes; then
- case $archive_cmds_F77 in
- *'~'*)
- # FIXME: we may have to deal with multi-command sequences.
- ;;
- '$CC '*)
- # Test whether the compiler implicitly links with -lc since on some
- # systems, -lgcc has to come before -lc. If gcc already passes -lc
- # to ld, don't add -lc before -lgcc.
- { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
- $rm conftest*
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } 2>conftest.err; then
- soname=conftest
- lib=conftest
- libobjs=conftest.$ac_objext
- deplibs=
- wl=$lt_prog_compiler_wl_F77
- pic_flag=$lt_prog_compiler_pic_F77
- compiler_flags=-v
- linker_flags=-v
- verstring=
- output_objdir=.
- libname=conftest
- lt_save_allow_undefined_flag=$allow_undefined_flag_F77
- allow_undefined_flag_F77=
- if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
- (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
- then
- archive_cmds_need_lc_F77=no
- else
- archive_cmds_need_lc_F77=yes
- fi
- allow_undefined_flag_F77=$lt_save_allow_undefined_flag
- else
- cat conftest.err 1>&5
- fi
- $rm conftest*
- { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5
-echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; }
- ;;
- esac
- fi
- ;;
-esac
-
-{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
- shlibpath_var=LIBPATH
-
- # AIX 3 has no versioning support, so we append a major version to the name.
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
-
-aix4* | aix5*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- hardcode_into_libs=yes
- if test "$host_cpu" = ia64; then
- # AIX 5 supports IA64
- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- else
- # With GCC up to 2.95.x, collect2 would create an import file
- # for dependence libraries. The import file would start with
- # the line `#! .'. This would cause the generated library to
- # depend on `.', always an invalid library. This was fixed in
- # development snapshots of GCC prior to 3.0.
- case $host_os in
- aix4 | aix4.[01] | aix4.[01].*)
- if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
- echo ' yes '
- echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
- :
- else
- can_build_shared=no
- fi
- ;;
- esac
- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
- # soname into executable. Probably we can add versioning support to
- # collect2, so additional links can be useful in future.
- if test "$aix_use_runtimelinking" = yes; then
- # If using run time linking (on AIX 4.2 or later) use lib<name>.so
- # instead of lib<name>.a to let people know that these are not
- # typical AIX shared libraries.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- else
- # We preserve .a as extension for shared libraries through AIX4.2
- # and later when we are not doing run time linking.
- library_names_spec='${libname}${release}.a $libname.a'
- soname_spec='${libname}${release}${shared_ext}$major'
- fi
- shlibpath_var=LIBPATH
- fi
- ;;
-
-amigaos*)
- library_names_spec='$libname.ixlibrary $libname.a'
- # Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
- ;;
-
-beos*)
- library_names_spec='${libname}${shared_ext}'
- dynamic_linker="$host_os ld.so"
- shlibpath_var=LIBRARY_PATH
- ;;
-
-bsdi[45]*)
- version_type=linux
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
- sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
- # the default ld.so.conf also contains /usr/contrib/lib and
- # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
- # libtool to hard-code these into programs
- ;;
-
-cygwin* | mingw* | pw32*)
- version_type=windows
- shrext_cmds=".dll"
- need_version=no
- need_lib_prefix=no
-
- case $GCC,$host_os in
- yes,cygwin* | yes,mingw* | yes,pw32*)
- library_names_spec='$libname.dll.a'
- # DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname~
- chmod a+x \$dldir/$dlname'
- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
- dlpath=$dir/\$dldll~
- $rm \$dlpath'
- shlibpath_overrides_runpath=yes
-
- case $host_os in
- cygwin*)
- # Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
- ;;
- mingw*)
- # MinGW DLLs use traditional 'lib' prefix
- soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
- # It is most probably a Windows format PATH printed by
- # mingw gcc, but we are running on Cygwin. Gcc prints its search
- # path with ; separators, and with drive letters. We can handle the
- # drive letters (cygwin fileutils understands them), so leave them,
- # especially as we might pass files found there to a mingw objdump,
- # which wouldn't understand a cygwinified path. Ahh.
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
- ;;
- pw32*)
- # pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- ;;
- esac
- ;;
-
- *)
- library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
- ;;
- esac
- dynamic_linker='Win32 ld.exe'
- # FIXME: first we should search . and the directory the executable is in
- shlibpath_var=PATH
- ;;
-
-darwin* | rhapsody*)
- dynamic_linker="$host_os dyld"
- version_type=darwin
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
- soname_spec='${libname}${release}${major}$shared_ext'
- shlibpath_overrides_runpath=yes
- shlibpath_var=DYLD_LIBRARY_PATH
- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-
- sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
- ;;
-
-dgux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-freebsd1*)
- dynamic_linker=no
- ;;
-
-freebsd* | dragonfly*)
- # DragonFly does not have aout. When/if they implement a new
- # versioning mechanism, adjust this.
- if test -x /usr/bin/objformat; then
- objformat=`/usr/bin/objformat`
- else
- case $host_os in
- freebsd[123]*) objformat=aout ;;
- *) objformat=elf ;;
- esac
- fi
- version_type=freebsd-$objformat
- case $version_type in
- freebsd-elf*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- need_version=no
- need_lib_prefix=no
- ;;
- freebsd-*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
- need_version=yes
- ;;
- esac
- shlibpath_var=LD_LIBRARY_PATH
+# FIXME - insert some real tests, host_os isn't really good enough
case $host_os in
- freebsd2*)
- shlibpath_overrides_runpath=yes
- ;;
- freebsd3.[01]* | freebsdelf3.[01]*)
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
- freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
- *) # from 4.6 on, and DragonFly
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- esac
- ;;
-
-gnu*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- hardcode_into_libs=yes
- ;;
-
-hpux9* | hpux10* | hpux11*)
- # Give a soname corresponding to the major version so that dld.sl refuses to
- # link against other versions.
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- case $host_cpu in
- ia64*)
- shrext_cmds='.so'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.so"
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- if test "X$HPUX_IA64_MODE" = X32; then
- sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ darwin*)
+ if test -n "$STRIP" ; then
+ striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
else
- sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- hppa*64*)
- shrext_cmds='.sl'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- *)
- shrext_cmds='.sl'
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=SHLIB_PATH
- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
- esac
- # HP-UX runs *really* slowly unless shared libraries are mode 555.
- postinstall_cmds='chmod 555 $lib'
- ;;
-
-interix[3-9]*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $host_os in
- nonstopux*) version_type=nonstopux ;;
- *)
- if test "$lt_cv_prog_gnu_ld" = yes; then
- version_type=linux
- else
- version_type=irix
- fi ;;
- esac
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
- case $host_os in
- irix5* | nonstopux*)
- libsuff= shlibsuff=
;;
*)
- case $LD in # libtool.m4 will add one of these switches to LD
- *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
- libsuff= shlibsuff= libmagic=32-bit;;
- *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
- libsuff=32 shlibsuff=N32 libmagic=N32;;
- *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
- libsuff=64 shlibsuff=64 libmagic=64-bit;;
- *) libsuff= shlibsuff= libmagic=never-match;;
- esac
- ;;
- esac
- shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
- hardcode_into_libs=yes
- ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
- dynamic_linker=no
- ;;
-
-# This must be Linux ELF.
-linux* | k*bsd*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- # This implies no fast_install, which is unacceptable.
- # Some rework will be needed to allow for fast_install
- # before this can be enabled.
- hardcode_into_libs=yes
-
- # Append ld.so.conf contents to the search path
- if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
- fi
-
- # We used to test for /lib/ld.so.1 and disable shared libraries on
- # powerpc, because MkLinux only supported shared libraries with the
- # GNU dynamic linker. Since this was broken with cross compilers,
- # most powerpc-linux boxes support dynamic linking these days and
- # people can always --disable-shared, the test was removed, and we
- # assume the GNU/Linux dynamic linker is in use.
- dynamic_linker='GNU/Linux ld.so'
- ;;
-
-netbsd*)
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- dynamic_linker='NetBSD (a.out) ld.so'
- else
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='NetBSD ld.elf_so'
- fi
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
-
-newsos6)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- ;;
-
-nto-qnx*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- ;;
-
-openbsd*)
- version_type=sunos
- sys_lib_dlsearch_path_spec="/usr/lib"
- need_lib_prefix=no
- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
- case $host_os in
- openbsd3.3 | openbsd3.3.*) need_version=yes ;;
- *) need_version=no ;;
- esac
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- case $host_os in
- openbsd2.[89] | openbsd2.[89].*)
- shlibpath_overrides_runpath=no
- ;;
- *)
- shlibpath_overrides_runpath=yes
- ;;
- esac
- else
- shlibpath_overrides_runpath=yes
- fi
- ;;
-
-os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- need_lib_prefix=no
- library_names_spec='$libname${shared_ext} $libname.a'
- dynamic_linker='OS/2 ld.exe'
- shlibpath_var=LIBPATH
- ;;
-
-osf3* | osf4* | osf5*)
- version_type=osf
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
- ;;
-
-rdos*)
- dynamic_linker=no
- ;;
-
-solaris*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- # ldd complains unless libraries are executable
- postinstall_cmds='chmod +x $lib'
- ;;
-
-sunos4*)
- version_type=sunos
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- if test "$with_gnu_ld" = yes; then
- need_lib_prefix=no
- fi
- need_version=yes
- ;;
-
-sysv4 | sysv4.3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- case $host_vendor in
- sni)
- shlibpath_overrides_runpath=no
- need_lib_prefix=no
- export_dynamic_flag_spec='${wl}-Blargedynsym'
- runpath_var=LD_RUN_PATH
- ;;
- siemens)
- need_lib_prefix=no
- ;;
- motorola)
- need_lib_prefix=no
- need_version=no
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
- ;;
- esac
- ;;
-
-sysv4*MP*)
- if test -d /usr/nec ;then
- version_type=linux
- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
- soname_spec='$libname${shared_ext}.$major'
- shlibpath_var=LD_LIBRARY_PATH
- fi
- ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- version_type=freebsd-elf
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- hardcode_into_libs=yes
- if test "$with_gnu_ld" = yes; then
- sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
- shlibpath_overrides_runpath=no
- else
- sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
- shlibpath_overrides_runpath=yes
- case $host_os in
- sco3.2v5*)
- sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
- ;;
- esac
- fi
- sys_lib_dlsearch_path_spec='/usr/lib'
- ;;
-
-uts4*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-*)
- dynamic_linker=no
- ;;
-esac
-{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
-echo "${ECHO_T}$dynamic_linker" >&6; }
-test "$dynamic_linker" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
- variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
-hardcode_action_F77=
-if test -n "$hardcode_libdir_flag_spec_F77" || \
- test -n "$runpath_var_F77" || \
- test "X$hardcode_automatic_F77" = "Xyes" ; then
-
- # We can hardcode non-existant directories.
- if test "$hardcode_direct_F77" != no &&
- # If the only mechanism to avoid hardcoding is shlibpath_var, we
- # have to relink, otherwise we might link with an installed library
- # when we should be linking with a yet-to-be-installed one
- ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no &&
- test "$hardcode_minus_L_F77" != no; then
- # Linking always hardcodes the temporary library directory.
- hardcode_action_F77=relink
- else
- # We can link without hardcoding, and we can hardcode nonexisting dirs.
- hardcode_action_F77=immediate
- fi
-else
- # We cannot hardcode anything, or else we can only hardcode existing
- # directories.
- hardcode_action_F77=unsupported
-fi
-{ echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5
-echo "${ECHO_T}$hardcode_action_F77" >&6; }
-
-if test "$hardcode_action_F77" = relink; then
- # Fast installation is not supported
- enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
- test "$enable_shared" = no; then
- # Fast installation is not necessary
- enable_fast_install=needless
-fi
-
-
-# The else clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
- # See if we are running on zsh, and set the options which allow our commands through
- # without removal of \ escapes.
- if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
- fi
- # Now quote all the things that may contain metacharacters while being
- # careful not to overquote the AC_SUBSTed values. We take copies of the
- # variables and quote the copies for generation of the libtool script.
- for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
- SED SHELL STRIP \
- libname_spec library_names_spec soname_spec extract_expsyms_cmds \
- old_striplib striplib file_magic_cmd finish_cmds finish_eval \
- deplibs_check_method reload_flag reload_cmds need_locks \
- lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
- lt_cv_sys_global_symbol_to_c_name_address \
- sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
- old_postinstall_cmds old_postuninstall_cmds \
- compiler_F77 \
- CC_F77 \
- LD_F77 \
- lt_prog_compiler_wl_F77 \
- lt_prog_compiler_pic_F77 \
- lt_prog_compiler_static_F77 \
- lt_prog_compiler_no_builtin_flag_F77 \
- export_dynamic_flag_spec_F77 \
- thread_safe_flag_spec_F77 \
- whole_archive_flag_spec_F77 \
- enable_shared_with_static_runtimes_F77 \
- old_archive_cmds_F77 \
- old_archive_from_new_cmds_F77 \
- predep_objects_F77 \
- postdep_objects_F77 \
- predeps_F77 \
- postdeps_F77 \
- compiler_lib_search_path_F77 \
- archive_cmds_F77 \
- archive_expsym_cmds_F77 \
- postinstall_cmds_F77 \
- postuninstall_cmds_F77 \
- old_archive_from_expsyms_cmds_F77 \
- allow_undefined_flag_F77 \
- no_undefined_flag_F77 \
- export_symbols_cmds_F77 \
- hardcode_libdir_flag_spec_F77 \
- hardcode_libdir_flag_spec_ld_F77 \
- hardcode_libdir_separator_F77 \
- hardcode_automatic_F77 \
- module_cmds_F77 \
- module_expsym_cmds_F77 \
- lt_cv_prog_compiler_c_o_F77 \
- fix_srcfile_path_F77 \
- exclude_expsyms_F77 \
- include_expsyms_F77; do
-
- case $var in
- old_archive_cmds_F77 | \
- old_archive_from_new_cmds_F77 | \
- archive_cmds_F77 | \
- archive_expsym_cmds_F77 | \
- module_cmds_F77 | \
- module_expsym_cmds_F77 | \
- old_archive_from_expsyms_cmds_F77 | \
- export_symbols_cmds_F77 | \
- extract_expsyms_cmds | reload_cmds | finish_cmds | \
- postinstall_cmds | postuninstall_cmds | \
- old_postinstall_cmds | old_postuninstall_cmds | \
- sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
- # Double-quote double-evaled strings.
- eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
- ;;
- *)
- eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
- ;;
- esac
- done
-
- case $lt_echo in
- *'\$0 --fallback-echo"')
- lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
;;
esac
-
-cfgfile="$ofile"
-
- cat <<__EOF__ >> "$cfgfile"
-# ### BEGIN LIBTOOL TAG CONFIG: $tagname
-
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
-
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$archive_cmds_need_lc_F77
-
-# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77
-
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
-
-# The host system.
-host_alias=$host_alias
-host=$host
-host_os=$host_os
-
-# The build system.
-build_alias=$build_alias
-build=$build
-build_os=$build_os
-
-# An echo program that does not interpret backslashes.
-echo=$lt_echo
-
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
-
-# A C compiler.
-LTCC=$lt_LTCC
-
-# LTCC compiler flags.
-LTCFLAGS=$lt_LTCFLAGS
-
-# A language-specific compiler.
-CC=$lt_compiler_F77
-
-# Is the compiler the GNU C compiler?
-with_gcc=$GCC_F77
-
-# An ERE matcher.
-EGREP=$lt_EGREP
-
-# The linker used to build libraries.
-LD=$lt_LD_F77
-
-# Whether we need hard or soft links.
-LN_S=$lt_LN_S
-
-# A BSD-compatible nm program.
-NM=$lt_NM
-
-# A symbol stripping program
-STRIP=$lt_STRIP
-
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=$MAGIC_CMD
-
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
-
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
-
-# Used on cygwin: assembler.
-AS="$AS"
-
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
-
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
-
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl_F77
-
-# Object file suffix (normally "o").
-objext="$ac_objext"
-
-# Old archive suffix (normally "a").
-libext="$libext"
-
-# Shared library suffix (normally ".so").
-shrext_cmds='$shrext_cmds'
-
-# Executable file suffix (normally "").
-exeext="$exeext"
-
-# Additional compiler flags for building library objects.
-pic_flag=$lt_lt_prog_compiler_pic_F77
-pic_mode=$pic_mode
-
-# What is the maximum length of a command?
-max_cmd_len=$lt_cv_sys_max_cmd_len
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77
-
-# Must we lock files when doing compilation?
-need_locks=$lt_need_locks
-
-# Do we need the lib prefix for modules?
-need_lib_prefix=$need_lib_prefix
-
-# Do we need a version for libraries?
-need_version=$need_version
-
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
-
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
-
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_lt_prog_compiler_static_F77
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77
-
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77
-
-# Library versioning type.
-version_type=$version_type
-
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
-
-# List of archive names. First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=$lt_library_names_spec
-
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
-
-# Commands used to build and install an old-style archive.
-RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_old_archive_cmds_F77
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77
-
-# Commands used to build and install a shared archive.
-archive_cmds=$lt_archive_cmds_F77
-archive_expsym_cmds=$lt_archive_expsym_cmds_F77
-postinstall_cmds=$lt_postinstall_cmds
-postuninstall_cmds=$lt_postuninstall_cmds
-
-# Commands used to build a loadable module (assumed same as above if empty)
-module_cmds=$lt_module_cmds_F77
-module_expsym_cmds=$lt_module_expsym_cmds_F77
-
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predep_objects=$lt_predep_objects_F77
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=$lt_postdep_objects_F77
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=$lt_predeps_F77
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=$lt_postdeps_F77
-
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path_F77
-
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
-
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd=$lt_file_magic_cmd
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag_F77
-
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag_F77
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
-
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$lt_finish_eval
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
-
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
-
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
-
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
-
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action_F77
-
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77
-
-# If ld is used when linking, flag to hardcode \$libdir into
-# a binary during linking. This must work even if \$libdir does
-# not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77
-
-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$hardcode_direct_F77
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$hardcode_minus_L_F77
-
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var_F77
-
-# Set to yes if building a shared library automatically hardcodes DIR into the library
-# and all subsequent libraries and executables linked against it.
-hardcode_automatic=$hardcode_automatic_F77
-
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs_F77
-
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
-
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
-
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path=$lt_fix_srcfile_path
-
-# Set to yes if exported symbols are required.
-always_export_symbols=$always_export_symbols_F77
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds_F77
-
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms_F77
-
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms_F77
-
-# ### END LIBTOOL TAG CONFIG: $tagname
-
-__EOF__
-
-
-else
- # If there is no Makefile yet, we rely on a make rule to execute
- # `config.status --recheck' to rerun these tests and create the
- # libtool script then.
- ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
- if test -f "$ltmain_in"; then
- test -f Makefile && make "$ltmain"
- fi
-fi
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-CC="$lt_save_CC"
-
- else
- tagname=""
- fi
- ;;
-
- GCJ)
- if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
-
-
-# Source file extension for Java test sources.
-ac_ext=java
-
-# Object file extension for compiled Java test sources.
-objext=o
-objext_GCJ=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-
-
-# save warnings/boilerplate of simple test code
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$rm conftest*
-
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$rm conftest*
-
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${GCJ-"gcj"}
-compiler=$CC
-compiler_GCJ=$CC
-for cc_temp in $compiler""; do
- case $cc_temp in
- compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
- distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
- \-*) ;;
- *) break;;
- esac
-done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-
-
-# GCJ did not exist at the time GCC didn't implicitly link libc in.
-archive_cmds_need_lc_GCJ=no
-
-old_archive_cmds_GCJ=$old_archive_cmds
-
-
-lt_prog_compiler_no_builtin_flag_GCJ=
-
-if test "$GCC" = yes; then
- lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin'
-
-
-{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
-echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; }
-if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_cv_prog_compiler_rtti_exceptions=no
- ac_outfile=conftest.$ac_objext
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="-fno-rtti -fno-exceptions"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- # The option is referenced via a variable to avoid confusing sed.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15686: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>conftest.err)
- ac_status=$?
- cat conftest.err >&5
- echo "$as_me:15690: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s "$ac_outfile"; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings other than the usual output.
- $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_rtti_exceptions=yes
- fi
- fi
- $rm conftest*
-
-fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; }
-
-if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
- lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions"
-else
- :
-fi
-
fi
-lt_prog_compiler_wl_GCJ=
-lt_prog_compiler_pic_GCJ=
-lt_prog_compiler_static_GCJ=
-{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
- if test "$GCC" = yes; then
- lt_prog_compiler_wl_GCJ='-Wl,'
- lt_prog_compiler_static_GCJ='-static'
-
- case $host_os in
- aix*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- lt_prog_compiler_static_GCJ='-Bstatic'
- fi
- ;;
-
- amigaos*)
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4'
- ;;
- beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
- # PIC is the default for these OSes.
- ;;
-
- mingw* | cygwin* | pw32* | os2*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- # Although the cygwin gcc ignores -fPIC, still need this for old-style
- # (--disable-auto-import) libraries
- lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
- ;;
-
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- lt_prog_compiler_pic_GCJ='-fno-common'
- ;;
- interix[3-9]*)
- # Interix 3.x gcc -fpic/-fPIC options generate broken code.
- # Instead, we relocate shared libraries at runtime.
- ;;
- msdosdjgpp*)
- # Just because we use GCC doesn't mean we suddenly get shared libraries
- # on systems that don't support them.
- lt_prog_compiler_can_build_shared_GCJ=no
- enable_shared=no
- ;;
- sysv4*MP*)
- if test -d /usr/nec; then
- lt_prog_compiler_pic_GCJ=-Kconform_pic
- fi
- ;;
- hpux*)
- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
- # not for PA HP-UX.
- case $host_cpu in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- lt_prog_compiler_pic_GCJ='-fPIC'
- ;;
- esac
- ;;
-
- *)
- lt_prog_compiler_pic_GCJ='-fPIC'
- ;;
- esac
- else
- # PORTME Check for flag to pass linker flags through the system compiler.
- case $host_os in
- aix*)
- lt_prog_compiler_wl_GCJ='-Wl,'
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- lt_prog_compiler_static_GCJ='-Bstatic'
- else
- lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp'
- fi
- ;;
- darwin*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- case $cc_basename in
- xlc*)
- lt_prog_compiler_pic_GCJ='-qnocommon'
- lt_prog_compiler_wl_GCJ='-Wl,'
- ;;
- esac
- ;;
-
- mingw* | cygwin* | pw32* | os2*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
- ;;
-
- hpux9* | hpux10* | hpux11*)
- lt_prog_compiler_wl_GCJ='-Wl,'
- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
- # not for PA HP-UX.
- case $host_cpu in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- lt_prog_compiler_pic_GCJ='+Z'
- ;;
- esac
- # Is there a better lt_prog_compiler_static that works with the bundled CC?
- lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive'
- ;;
-
- irix5* | irix6* | nonstopux*)
- lt_prog_compiler_wl_GCJ='-Wl,'
- # PIC (with -KPIC) is the default.
- lt_prog_compiler_static_GCJ='-non_shared'
- ;;
-
- newsos6)
- lt_prog_compiler_pic_GCJ='-KPIC'
- lt_prog_compiler_static_GCJ='-Bstatic'
- ;;
-
- linux* | k*bsd*-gnu)
- case $cc_basename in
- icc* | ecc*)
- lt_prog_compiler_wl_GCJ='-Wl,'
- lt_prog_compiler_pic_GCJ='-KPIC'
- lt_prog_compiler_static_GCJ='-static'
- ;;
- pgcc* | pgf77* | pgf90* | pgf95*)
- # Portland Group compilers (*not* the Pentium gcc compiler,
- # which looks to be a dead project)
- lt_prog_compiler_wl_GCJ='-Wl,'
- lt_prog_compiler_pic_GCJ='-fpic'
- lt_prog_compiler_static_GCJ='-Bstatic'
- ;;
- ccc*)
- lt_prog_compiler_wl_GCJ='-Wl,'
- # All Alpha code is PIC.
- lt_prog_compiler_static_GCJ='-non_shared'
- ;;
- *)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C 5.9
- lt_prog_compiler_pic_GCJ='-KPIC'
- lt_prog_compiler_static_GCJ='-Bstatic'
- lt_prog_compiler_wl_GCJ='-Wl,'
- ;;
- *Sun\ F*)
- # Sun Fortran 8.3 passes all unrecognized flags to the linker
- lt_prog_compiler_pic_GCJ='-KPIC'
- lt_prog_compiler_static_GCJ='-Bstatic'
- lt_prog_compiler_wl_GCJ=''
- ;;
- esac
- ;;
- esac
- ;;
-
- osf3* | osf4* | osf5*)
- lt_prog_compiler_wl_GCJ='-Wl,'
- # All OSF/1 code is PIC.
- lt_prog_compiler_static_GCJ='-non_shared'
- ;;
-
- rdos*)
- lt_prog_compiler_static_GCJ='-non_shared'
- ;;
-
- solaris*)
- lt_prog_compiler_pic_GCJ='-KPIC'
- lt_prog_compiler_static_GCJ='-Bstatic'
- case $cc_basename in
- f77* | f90* | f95*)
- lt_prog_compiler_wl_GCJ='-Qoption ld ';;
- *)
- lt_prog_compiler_wl_GCJ='-Wl,';;
- esac
- ;;
-
- sunos4*)
- lt_prog_compiler_wl_GCJ='-Qoption ld '
- lt_prog_compiler_pic_GCJ='-PIC'
- lt_prog_compiler_static_GCJ='-Bstatic'
- ;;
-
- sysv4 | sysv4.2uw2* | sysv4.3*)
- lt_prog_compiler_wl_GCJ='-Wl,'
- lt_prog_compiler_pic_GCJ='-KPIC'
- lt_prog_compiler_static_GCJ='-Bstatic'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec ;then
- lt_prog_compiler_pic_GCJ='-Kconform_pic'
- lt_prog_compiler_static_GCJ='-Bstatic'
- fi
- ;;
-
- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
- lt_prog_compiler_wl_GCJ='-Wl,'
- lt_prog_compiler_pic_GCJ='-KPIC'
- lt_prog_compiler_static_GCJ='-Bstatic'
- ;;
-
- unicos*)
- lt_prog_compiler_wl_GCJ='-Wl,'
- lt_prog_compiler_can_build_shared_GCJ=no
- ;;
-
- uts4*)
- lt_prog_compiler_pic_GCJ='-pic'
- lt_prog_compiler_static_GCJ='-Bstatic'
- ;;
-
- *)
- lt_prog_compiler_can_build_shared_GCJ=no
- ;;
- esac
- fi
-
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; }
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$lt_prog_compiler_pic_GCJ"; then
-
-{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5
-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; }
-if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_prog_compiler_pic_works_GCJ=no
- ac_outfile=conftest.$ac_objext
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="$lt_prog_compiler_pic_GCJ"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- # The option is referenced via a variable to avoid confusing sed.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15976: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>conftest.err)
- ac_status=$?
- cat conftest.err >&5
- echo "$as_me:15980: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s "$ac_outfile"; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings other than the usual output.
- $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
- lt_prog_compiler_pic_works_GCJ=yes
- fi
- fi
- $rm conftest*
-
-fi
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6; }
-
-if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then
- case $lt_prog_compiler_pic_GCJ in
- "" | " "*) ;;
- *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;;
- esac
-else
- lt_prog_compiler_pic_GCJ=
- lt_prog_compiler_can_build_shared_GCJ=no
-fi
-
-fi
-case $host_os in
- # For platforms which do not support PIC, -DPIC is meaningless:
- *djgpp*)
- lt_prog_compiler_pic_GCJ=
- ;;
- *)
- lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ"
- ;;
-esac
-
-#
-# Check to make sure the static flag actually works.
-#
-wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\"
-{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
-if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_prog_compiler_static_works_GCJ=no
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
- echo "$lt_simple_link_test_code" > conftest.$ac_ext
- if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
- # The linker can only warn and ignore the option if not recognized
- # So say no if there are warnings
- if test -s conftest.err; then
- # Append any errors to the config.log.
- cat conftest.err 1>&5
- $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if diff conftest.exp conftest.er2 >/dev/null; then
- lt_prog_compiler_static_works_GCJ=yes
- fi
- else
- lt_prog_compiler_static_works_GCJ=yes
- fi
- fi
- $rm conftest*
- LDFLAGS="$save_LDFLAGS"
-
-fi
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5
-echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6; }
-
-if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then
- :
-else
- lt_prog_compiler_static_GCJ=
-fi
-
-
-{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
-if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_cv_prog_compiler_c_o_GCJ=no
- $rm -r conftest 2>/dev/null
- mkdir conftest
- cd conftest
- mkdir out
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- lt_compiler_flag="-o out/conftest2.$ac_objext"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16080: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>out/conftest.err)
- ac_status=$?
- cat out/conftest.err >&5
- echo "$as_me:16084: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s out/conftest2.$ac_objext
- then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
- $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
- if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_c_o_GCJ=yes
- fi
- fi
- chmod u+w . 2>&5
- $rm conftest*
- # SGI C++ compiler will create directory out/ii_files/ for
- # template instantiation
- test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
- $rm out/* && rmdir out
- cd ..
- rmdir conftest
- $rm conftest*
-fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; }
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then
- # do not overwrite the value of need_locks provided by the user
- { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
- hard_links=yes
- $rm conftest*
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- touch conftest.a
- ln conftest.a conftest.b 2>&5 || hard_links=no
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- { echo "$as_me:$LINENO: result: $hard_links" >&5
-echo "${ECHO_T}$hard_links" >&6; }
- if test "$hard_links" = no; then
- { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
- need_locks=warn
- fi
-else
- need_locks=no
-fi
-{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
+ # Report which library types will actually be built
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
+$as_echo_n "checking if libtool supports shared libraries... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
+$as_echo "$can_build_shared" >&6; }
- runpath_var=
- allow_undefined_flag_GCJ=
- enable_shared_with_static_runtimes_GCJ=no
- archive_cmds_GCJ=
- archive_expsym_cmds_GCJ=
- old_archive_From_new_cmds_GCJ=
- old_archive_from_expsyms_cmds_GCJ=
- export_dynamic_flag_spec_GCJ=
- whole_archive_flag_spec_GCJ=
- thread_safe_flag_spec_GCJ=
- hardcode_libdir_flag_spec_GCJ=
- hardcode_libdir_flag_spec_ld_GCJ=
- hardcode_libdir_separator_GCJ=
- hardcode_direct_GCJ=no
- hardcode_minus_L_GCJ=no
- hardcode_shlibpath_var_GCJ=unsupported
- link_all_deplibs_GCJ=unknown
- hardcode_automatic_GCJ=no
- module_cmds_GCJ=
- module_expsym_cmds_GCJ=
- always_export_symbols_GCJ=no
- export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- # include_expsyms should be a list of space-separated symbols to be *always*
- # included in the symbol list
- include_expsyms_GCJ=
- # exclude_expsyms can be an extended regexp of symbols to exclude
- # it will be wrapped by ` (' and `)$', so one must not match beginning or
- # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
- # as well as any symbol that contains `d'.
- exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_"
- # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
- # platforms (ab)use it in PIC code, but their linkers get confused if
- # the symbol is explicitly referenced. Since portable code cannot
- # rely on this symbol name, it's probably fine to never include it in
- # preloaded symbol tables.
- extract_expsyms_cmds=
- # Just being paranoid about ensuring that cc_basename is set.
- for cc_temp in $compiler""; do
- case $cc_temp in
- compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
- distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
- \-*) ;;
- *) break;;
- esac
-done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
+$as_echo_n "checking whether to build shared libraries... " >&6; }
+ test "$can_build_shared" = "no" && enable_shared=no
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
case $host_os in
- cygwin* | mingw* | pw32*)
- # FIXME: the MSVC++ port hasn't been tested in a loooong time
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- if test "$GCC" != yes; then
- with_gnu_ld=no
- fi
- ;;
- interix*)
- # we just hope/assume this is gcc and not c89 (= MSVC++)
- with_gnu_ld=yes
- ;;
- openbsd*)
- with_gnu_ld=no
- ;;
- esac
-
- ld_shlibs_GCJ=yes
- if test "$with_gnu_ld" = yes; then
- # If archive_cmds runs LD, not CC, wlarc should be empty
- wlarc='${wl}'
-
- # Set some defaults for GNU ld with shared library support. These
- # are reset later if shared libraries are not supported. Putting them
- # here allows them to be overridden if necessary.
- runpath_var=LD_RUN_PATH
- hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir'
- export_dynamic_flag_spec_GCJ='${wl}--export-dynamic'
- # ancient GNU ld didn't support --whole-archive et. al.
- if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
- whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- whole_archive_flag_spec_GCJ=
- fi
- supports_anon_versioning=no
- case `$LD -v 2>/dev/null` in
- *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
- *\ 2.11.*) ;; # other 2.11 versions
- *) supports_anon_versioning=yes ;;
- esac
-
- # See if GNU ld supports shared libraries.
- case $host_os in
- aix3* | aix4* | aix5*)
- # On AIX/PPC, the GNU linker is very broken
- if test "$host_cpu" != ia64; then
- ld_shlibs_GCJ=no
- cat <<EOF 1>&2
-
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support. If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
-
-EOF
- fi
- ;;
-
- amigaos*)
- archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- hardcode_libdir_flag_spec_GCJ='-L$libdir'
- hardcode_minus_L_GCJ=yes
-
- # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
- # that the semantics of dynamic libraries on AmigaOS, at least up
- # to version 4, is to share data among multiple programs linked
- # with the same dynamic library. Since this doesn't match the
- # behavior of shared libraries on other platforms, we can't use
- # them.
- ld_shlibs_GCJ=no
- ;;
-
- beos*)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- allow_undefined_flag_GCJ=unsupported
- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
- # support --undefined. This deserves some investigation. FIXME
- archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- else
- ld_shlibs_GCJ=no
- fi
- ;;
-
- cygwin* | mingw* | pw32*)
- # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless,
- # as there is no search path for DLLs.
- hardcode_libdir_flag_spec_GCJ='-L$libdir'
- allow_undefined_flag_GCJ=unsupported
- always_export_symbols_GCJ=no
- enable_shared_with_static_runtimes_GCJ=yes
- export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
-
- if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
- archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- else
- ld_shlibs_GCJ=no
- fi
- ;;
-
- interix[3-9]*)
- hardcode_direct_GCJ=no
- hardcode_shlibpath_var_GCJ=no
- hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
- export_dynamic_flag_spec_GCJ='${wl}-E'
- # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
- # Instead, shared libraries are loaded at an image base (0x10000000 by
- # default) and relocated if they conflict, which is a slow very memory
- # consuming and fragmenting process. To avoid this, we pick a random,
- # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
- # time. Moving up from 0x10000000 also allows more sbrk(2) space.
- archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- ;;
-
- gnu* | linux* | k*bsd*-gnu)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- tmp_addflag=
- case $cc_basename,$host_cpu in
- pgcc*) # Portland Group C compiler
- whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
- tmp_addflag=' $pic_flag'
- ;;
- pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
- whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
- tmp_addflag=' $pic_flag -Mnomain' ;;
- ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
- tmp_addflag=' -i_dynamic' ;;
- efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
- tmp_addflag=' -i_dynamic -nofor_main' ;;
- ifc* | ifort*) # Intel Fortran compiler
- tmp_addflag=' -nofor_main' ;;
- esac
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*) # Sun C 5.9
- whole_archive_flag_spec_GCJ='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
- tmp_sharedflag='-G' ;;
- *Sun\ F*) # Sun Fortran 8.3
- tmp_sharedflag='-G' ;;
- *)
- tmp_sharedflag='-shared' ;;
- esac
- archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-
- if test $supports_anon_versioning = yes; then
- archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- $echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
- fi
- else
- ld_shlibs_GCJ=no
- fi
- ;;
-
- netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
- archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
- wlarc=
- else
- archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- fi
- ;;
-
- solaris*)
- if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
- ld_shlibs_GCJ=no
- cat <<EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-EOF
- elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- ld_shlibs_GCJ=no
- fi
- ;;
-
- sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
- case `$LD -v 2>&1` in
- *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
- ld_shlibs_GCJ=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
-*** reliably create shared libraries on SCO systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
- ;;
- *)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
- archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
- archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
- else
- ld_shlibs_GCJ=no
- fi
- ;;
- esac
- ;;
-
- sunos4*)
- archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- wlarc=
- hardcode_direct_GCJ=yes
- hardcode_shlibpath_var_GCJ=no
- ;;
-
- *)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- ld_shlibs_GCJ=no
- fi
- ;;
- esac
-
- if test "$ld_shlibs_GCJ" = no; then
- runpath_var=
- hardcode_libdir_flag_spec_GCJ=
- export_dynamic_flag_spec_GCJ=
- whole_archive_flag_spec_GCJ=
- fi
- else
- # PORTME fill in a description of your system's linker (not GNU ld)
- case $host_os in
- aix3*)
- allow_undefined_flag_GCJ=unsupported
- always_export_symbols_GCJ=yes
- archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
- # Note: this linker hardcodes the directories in LIBPATH if there
- # are no directories specified by -L.
- hardcode_minus_L_GCJ=yes
- if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
- # Neither direct hardcoding nor static linking is supported with a
- # broken collect2.
- hardcode_direct_GCJ=unsupported
- fi
- ;;
-
- aix4* | aix5*)
- if test "$host_cpu" = ia64; then
- # On IA64, the linker does run time linking by default, so we don't
- # have to do anything special.
- aix_use_runtimelinking=no
- exp_sym_flag='-Bexport'
- no_entry_flag=""
- else
- # If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to AIX nm, but means don't demangle with GNU nm
- if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
- export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
- else
- export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
- fi
- aix_use_runtimelinking=no
-
- # Test if we are trying to use run time linking or normal
- # AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # need to do runtime linking.
- case $host_os in aix4.[23]|aix4.[23].*|aix5*)
- for ld_flag in $LDFLAGS; do
- if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
- aix_use_runtimelinking=yes
- break
- fi
- done
- ;;
- esac
-
- exp_sym_flag='-bexport'
- no_entry_flag='-bnoentry'
- fi
-
- # When large executables or shared objects are built, AIX ld can
- # have problems creating the table of contents. If linking a library
- # or program results in "error TOC overflow" add -mminimal-toc to
- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
- archive_cmds_GCJ=''
- hardcode_direct_GCJ=yes
- hardcode_libdir_separator_GCJ=':'
- link_all_deplibs_GCJ=yes
-
- if test "$GCC" = yes; then
- case $host_os in aix4.[012]|aix4.[012].*)
- # We only want to do this on AIX 4.2 and lower, the check
- # below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" && \
- strings "$collect2name" | grep resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- :
- else
- # We have old collect2
- hardcode_direct_GCJ=unsupported
- # It fails to find uninstalled libraries when the uninstalled
- # path is not listed in the libpath. Setting hardcode_minus_L
- # to unsupported forces relinking
- hardcode_minus_L_GCJ=yes
- hardcode_libdir_flag_spec_GCJ='-L$libdir'
- hardcode_libdir_separator_GCJ=
- fi
- ;;
- esac
- shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
- fi
- else
- # not using gcc
- if test "$host_cpu" = ia64; then
- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
- # chokes on -Wl,-G. The following line is correct:
- shared_flag='-G'
- else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
- else
- shared_flag='${wl}-bM:SRE'
- fi
- fi
- fi
-
- # It seems that -bexpall does not export symbols beginning with
- # underscore (_), so it is better to generate a list of symbols to export.
- always_export_symbols_GCJ=yes
- if test "$aix_use_runtimelinking" = yes; then
- # Warning - without using the other runtime loading flags (-brtl),
- # -berok will link without error, but may produce a broken library.
- allow_undefined_flag_GCJ='-berok'
- # Determine the default libpath from the value encoded in an empty executable.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
-
-lt_aix_libpath_sed='
- /Import File Strings/,/^$/ {
- /^0/ {
- s/^0 *\(.*\)$/\1/
- p
- }
- }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
- hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
- archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
- else
- if test "$host_cpu" = ia64; then
- hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib'
- allow_undefined_flag_GCJ="-z nodefs"
- archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
- else
- # Determine the default libpath from the value encoded in an empty executable.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
-
-lt_aix_libpath_sed='
- /Import File Strings/,/^$/ {
- /^0/ {
- s/^0 *\(.*\)$/\1/
- p
- }
- }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
- hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
- # Warning - without using the other run time loading flags,
- # -berok will link without error, but may produce a broken library.
- no_undefined_flag_GCJ=' ${wl}-bernotok'
- allow_undefined_flag_GCJ=' ${wl}-berok'
- # Exported symbols can be pulled into shared objects from archives
- whole_archive_flag_spec_GCJ='$convenience'
- archive_cmds_need_lc_GCJ=yes
- # This is similar to how AIX traditionally builds its shared libraries.
- archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
- fi
- fi
- ;;
-
- amigaos*)
- archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- hardcode_libdir_flag_spec_GCJ='-L$libdir'
- hardcode_minus_L_GCJ=yes
- # see comment about different semantics on the GNU ld section
- ld_shlibs_GCJ=no
- ;;
-
- bsdi[45]*)
- export_dynamic_flag_spec_GCJ=-rdynamic
- ;;
-
- cygwin* | mingw* | pw32*)
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- # hardcode_libdir_flag_spec is actually meaningless, as there is
- # no search path for DLLs.
- hardcode_libdir_flag_spec_GCJ=' '
- allow_undefined_flag_GCJ=unsupported
- # Tell ltmain to make .lib files, not .a files.
- libext=lib
- # Tell ltmain to make .dll files, not .so files.
- shrext_cmds=".dll"
- # FIXME: Setting linknames here is a bad hack.
- archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
- # The linker will automatically build a .lib file if we build a DLL.
- old_archive_From_new_cmds_GCJ='true'
- # FIXME: Should let the user specify the lib program.
- old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs'
- fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`'
- enable_shared_with_static_runtimes_GCJ=yes
- ;;
-
- darwin* | rhapsody*)
- case $host_os in
- rhapsody* | darwin1.[012])
- allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress'
- ;;
- *) # Darwin 1.3 on
- if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
- allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
- else
- case ${MACOSX_DEPLOYMENT_TARGET} in
- 10.[012])
- allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
- ;;
- 10.*)
- allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup'
- ;;
- esac
- fi
- ;;
- esac
- archive_cmds_need_lc_GCJ=no
- hardcode_direct_GCJ=no
- hardcode_automatic_GCJ=yes
- hardcode_shlibpath_var_GCJ=unsupported
- whole_archive_flag_spec_GCJ=''
- link_all_deplibs_GCJ=yes
- if test "$GCC" = yes ; then
- output_verbose_link_cmd='echo'
- archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- else
- case $cc_basename in
- xlc*)
- output_verbose_link_cmd='echo'
- archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
- module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- ;;
- *)
- ld_shlibs_GCJ=no
- ;;
- esac
- fi
- ;;
-
- dgux*)
- archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec_GCJ='-L$libdir'
- hardcode_shlibpath_var_GCJ=no
- ;;
-
- freebsd1*)
- ld_shlibs_GCJ=no
- ;;
-
- # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
- # support. Future versions do this automatically, but an explicit c++rt0.o
- # does not break anything, and helps significantly (at the cost of a little
- # extra space).
- freebsd2.2*)
- archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
- hardcode_libdir_flag_spec_GCJ='-R$libdir'
- hardcode_direct_GCJ=yes
- hardcode_shlibpath_var_GCJ=no
- ;;
-
- # Unfortunately, older versions of FreeBSD 2 do not have this feature.
- freebsd2*)
- archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct_GCJ=yes
- hardcode_minus_L_GCJ=yes
- hardcode_shlibpath_var_GCJ=no
- ;;
-
- # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | dragonfly*)
- archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec_GCJ='-R$libdir'
- hardcode_direct_GCJ=yes
- hardcode_shlibpath_var_GCJ=no
- ;;
-
- hpux9*)
- if test "$GCC" = yes; then
- archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- else
- archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- fi
- hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator_GCJ=:
- hardcode_direct_GCJ=yes
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- hardcode_minus_L_GCJ=yes
- export_dynamic_flag_spec_GCJ='${wl}-E'
- ;;
-
- hpux10*)
- if test "$GCC" = yes -a "$with_gnu_ld" = no; then
- archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
- fi
- if test "$with_gnu_ld" = no; then
- hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator_GCJ=:
-
- hardcode_direct_GCJ=yes
- export_dynamic_flag_spec_GCJ='${wl}-E'
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- hardcode_minus_L_GCJ=yes
- fi
- ;;
-
- hpux11*)
- if test "$GCC" = yes -a "$with_gnu_ld" = no; then
- case $host_cpu in
- hppa*64*)
- archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- ia64*)
- archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- else
- case $host_cpu in
- hppa*64*)
- archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- ia64*)
- archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- fi
- if test "$with_gnu_ld" = no; then
- hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator_GCJ=:
-
- case $host_cpu in
- hppa*64*|ia64*)
- hardcode_libdir_flag_spec_ld_GCJ='+b $libdir'
- hardcode_direct_GCJ=no
- hardcode_shlibpath_var_GCJ=no
- ;;
- *)
- hardcode_direct_GCJ=yes
- export_dynamic_flag_spec_GCJ='${wl}-E'
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- hardcode_minus_L_GCJ=yes
- ;;
- esac
- fi
- ;;
-
- irix5* | irix6* | nonstopux*)
- if test "$GCC" = yes; then
- archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
- hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir'
- fi
- hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator_GCJ=:
- link_all_deplibs_GCJ=yes
- ;;
-
- netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
- archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
- else
- archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
- fi
- hardcode_libdir_flag_spec_GCJ='-R$libdir'
- hardcode_direct_GCJ=yes
- hardcode_shlibpath_var_GCJ=no
- ;;
-
- newsos6)
- archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct_GCJ=yes
- hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator_GCJ=:
- hardcode_shlibpath_var_GCJ=no
- ;;
-
- openbsd*)
- if test -f /usr/libexec/ld.so; then
- hardcode_direct_GCJ=yes
- hardcode_shlibpath_var_GCJ=no
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
- hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
- export_dynamic_flag_spec_GCJ='${wl}-E'
- else
- case $host_os in
- openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
- archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec_GCJ='-R$libdir'
- ;;
- *)
- archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
- ;;
- esac
- fi
- else
- ld_shlibs_GCJ=no
- fi
- ;;
-
- os2*)
- hardcode_libdir_flag_spec_GCJ='-L$libdir'
- hardcode_minus_L_GCJ=yes
- allow_undefined_flag_GCJ=unsupported
- archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
- old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
- ;;
-
- osf3*)
- if test "$GCC" = yes; then
- allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- allow_undefined_flag_GCJ=' -expect_unresolved \*'
- archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
- fi
- hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator_GCJ=:
- ;;
-
- osf4* | osf5*) # as osf3* with the addition of -msym flag
- if test "$GCC" = yes; then
- allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
- else
- allow_undefined_flag_GCJ=' -expect_unresolved \*'
- archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
- archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
- $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
-
- # Both c and cxx compiler support -rpath directly
- hardcode_libdir_flag_spec_GCJ='-rpath $libdir'
- fi
- hardcode_libdir_separator_GCJ=:
- ;;
-
- solaris*)
- no_undefined_flag_GCJ=' -z text'
- if test "$GCC" = yes; then
- wlarc='${wl}'
- archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
- $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
- else
- wlarc=''
- archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
- archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
- fi
- hardcode_libdir_flag_spec_GCJ='-R$libdir'
- hardcode_shlibpath_var_GCJ=no
- case $host_os in
- solaris2.[0-5] | solaris2.[0-5].*) ;;
- *)
- # The compiler driver will combine and reorder linker options,
- # but understands `-z linker_flag'. GCC discards it without `$wl',
- # but is careful enough not to reorder.
- # Supported since Solaris 2.6 (maybe 2.5.1?)
- if test "$GCC" = yes; then
- whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
- else
- whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract'
- fi
- ;;
- esac
- link_all_deplibs_GCJ=yes
- ;;
-
- sunos4*)
- if test "x$host_vendor" = xsequent; then
- # Use $CC to link under sequent, because it throws in some extra .o
- # files that make .init and .fini sections work.
- archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
- fi
- hardcode_libdir_flag_spec_GCJ='-L$libdir'
- hardcode_direct_GCJ=yes
- hardcode_minus_L_GCJ=yes
- hardcode_shlibpath_var_GCJ=no
- ;;
-
- sysv4)
- case $host_vendor in
- sni)
- archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct_GCJ=yes # is this really true???
- ;;
- siemens)
- ## LD is ld it makes a PLAMLIB
- ## CC just makes a GrossModule.
- archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags'
- reload_cmds_GCJ='$CC -r -o $output$reload_objs'
- hardcode_direct_GCJ=no
- ;;
- motorola)
- archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie
- ;;
- esac
- runpath_var='LD_RUN_PATH'
- hardcode_shlibpath_var_GCJ=no
- ;;
-
- sysv4.3*)
- archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_shlibpath_var_GCJ=no
- export_dynamic_flag_spec_GCJ='-Bexport'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_shlibpath_var_GCJ=no
- runpath_var=LD_RUN_PATH
- hardcode_runpath_var=yes
- ld_shlibs_GCJ=yes
- fi
- ;;
-
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
- no_undefined_flag_GCJ='${wl}-z,text'
- archive_cmds_need_lc_GCJ=no
- hardcode_shlibpath_var_GCJ=no
- runpath_var='LD_RUN_PATH'
-
- if test "$GCC" = yes; then
- archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- ;;
-
- sysv5* | sco3.2v5* | sco5v6*)
- # Note: We can NOT use -z defs as we might desire, because we do not
- # link with -lc, and that would cause any symbols used from libc to
- # always be unresolved, which means just about no library would
- # ever link correctly. If we're not using GNU ld we use -z text
- # though, which does catch some bad symbols but isn't as heavy-handed
- # as -z defs.
- no_undefined_flag_GCJ='${wl}-z,text'
- allow_undefined_flag_GCJ='${wl}-z,nodefs'
- archive_cmds_need_lc_GCJ=no
- hardcode_shlibpath_var_GCJ=no
- hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
- hardcode_libdir_separator_GCJ=':'
- link_all_deplibs_GCJ=yes
- export_dynamic_flag_spec_GCJ='${wl}-Bexport'
- runpath_var='LD_RUN_PATH'
-
- if test "$GCC" = yes; then
- archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- ;;
-
- uts4*)
- archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec_GCJ='-L$libdir'
- hardcode_shlibpath_var_GCJ=no
- ;;
-
- *)
- ld_shlibs_GCJ=no
- ;;
- esac
- fi
-
-{ echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5
-echo "${ECHO_T}$ld_shlibs_GCJ" >&6; }
-test "$ld_shlibs_GCJ" = no && can_build_shared=no
-
-#
-# Do we need to explicitly link libc?
-#
-case "x$archive_cmds_need_lc_GCJ" in
-x|xyes)
- # Assume -lc should be added
- archive_cmds_need_lc_GCJ=yes
-
- if test "$enable_shared" = yes && test "$GCC" = yes; then
- case $archive_cmds_GCJ in
- *'~'*)
- # FIXME: we may have to deal with multi-command sequences.
- ;;
- '$CC '*)
- # Test whether the compiler implicitly links with -lc since on some
- # systems, -lgcc has to come before -lc. If gcc already passes -lc
- # to ld, don't add -lc before -lgcc.
- { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
- $rm conftest*
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } 2>conftest.err; then
- soname=conftest
- lib=conftest
- libobjs=conftest.$ac_objext
- deplibs=
- wl=$lt_prog_compiler_wl_GCJ
- pic_flag=$lt_prog_compiler_pic_GCJ
- compiler_flags=-v
- linker_flags=-v
- verstring=
- output_objdir=.
- libname=conftest
- lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ
- allow_undefined_flag_GCJ=
- if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
- (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
- then
- archive_cmds_need_lc_GCJ=no
- else
- archive_cmds_need_lc_GCJ=yes
- fi
- allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag
- else
- cat conftest.err 1>&5
- fi
- $rm conftest*
- { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5
-echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; }
- ;;
- esac
- fi
- ;;
-esac
-
-{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
- shlibpath_var=LIBPATH
-
- # AIX 3 has no versioning support, so we append a major version to the name.
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
-
-aix4* | aix5*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- hardcode_into_libs=yes
- if test "$host_cpu" = ia64; then
- # AIX 5 supports IA64
- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- else
- # With GCC up to 2.95.x, collect2 would create an import file
- # for dependence libraries. The import file would start with
- # the line `#! .'. This would cause the generated library to
- # depend on `.', always an invalid library. This was fixed in
- # development snapshots of GCC prior to 3.0.
- case $host_os in
- aix4 | aix4.[01] | aix4.[01].*)
- if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
- echo ' yes '
- echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
- :
- else
- can_build_shared=no
- fi
- ;;
- esac
- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
- # soname into executable. Probably we can add versioning support to
- # collect2, so additional links can be useful in future.
- if test "$aix_use_runtimelinking" = yes; then
- # If using run time linking (on AIX 4.2 or later) use lib<name>.so
- # instead of lib<name>.a to let people know that these are not
- # typical AIX shared libraries.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- else
- # We preserve .a as extension for shared libraries through AIX4.2
- # and later when we are not doing run time linking.
- library_names_spec='${libname}${release}.a $libname.a'
- soname_spec='${libname}${release}${shared_ext}$major'
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
fi
- shlibpath_var=LIBPATH
- fi
- ;;
-
-amigaos*)
- library_names_spec='$libname.ixlibrary $libname.a'
- # Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
- ;;
-
-beos*)
- library_names_spec='${libname}${shared_ext}'
- dynamic_linker="$host_os ld.so"
- shlibpath_var=LIBRARY_PATH
- ;;
-
-bsdi[45]*)
- version_type=linux
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
- sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
- # the default ld.so.conf also contains /usr/contrib/lib and
- # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
- # libtool to hard-code these into programs
- ;;
-
-cygwin* | mingw* | pw32*)
- version_type=windows
- shrext_cmds=".dll"
- need_version=no
- need_lib_prefix=no
-
- case $GCC,$host_os in
- yes,cygwin* | yes,mingw* | yes,pw32*)
- library_names_spec='$libname.dll.a'
- # DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname~
- chmod a+x \$dldir/$dlname'
- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
- dlpath=$dir/\$dldll~
- $rm \$dlpath'
- shlibpath_overrides_runpath=yes
-
- case $host_os in
- cygwin*)
- # Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
- ;;
- mingw*)
- # MinGW DLLs use traditional 'lib' prefix
- soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
- # It is most probably a Windows format PATH printed by
- # mingw gcc, but we are running on Cygwin. Gcc prints its search
- # path with ; separators, and with drive letters. We can handle the
- # drive letters (cygwin fileutils understands them), so leave them,
- # especially as we might pass files found there to a mingw objdump,
- # which wouldn't understand a cygwinified path. Ahh.
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
- ;;
- pw32*)
- # pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- ;;
- esac
- ;;
-
- *)
- library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
- ;;
- esac
- dynamic_linker='Win32 ld.exe'
- # FIXME: first we should search . and the directory the executable is in
- shlibpath_var=PATH
- ;;
-
-darwin* | rhapsody*)
- dynamic_linker="$host_os dyld"
- version_type=darwin
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
- soname_spec='${libname}${release}${major}$shared_ext'
- shlibpath_overrides_runpath=yes
- shlibpath_var=DYLD_LIBRARY_PATH
- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-
- sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
- ;;
-
-dgux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-freebsd1*)
- dynamic_linker=no
- ;;
-
-freebsd* | dragonfly*)
- # DragonFly does not have aout. When/if they implement a new
- # versioning mechanism, adjust this.
- if test -x /usr/bin/objformat; then
- objformat=`/usr/bin/objformat`
- else
- case $host_os in
- freebsd[123]*) objformat=aout ;;
- *) objformat=elf ;;
- esac
- fi
- version_type=freebsd-$objformat
- case $version_type in
- freebsd-elf*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- need_version=no
- need_lib_prefix=no
- ;;
- freebsd-*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
- need_version=yes
- ;;
- esac
- shlibpath_var=LD_LIBRARY_PATH
- case $host_os in
- freebsd2*)
- shlibpath_overrides_runpath=yes
- ;;
- freebsd3.[01]* | freebsdelf3.[01]*)
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
- freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
- *) # from 4.6 on, and DragonFly
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
;;
- esac
- ;;
-
-gnu*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- hardcode_into_libs=yes
- ;;
-hpux9* | hpux10* | hpux11*)
- # Give a soname corresponding to the major version so that dld.sl refuses to
- # link against other versions.
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- case $host_cpu in
- ia64*)
- shrext_cmds='.so'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.so"
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- if test "X$HPUX_IA64_MODE" = X32; then
- sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
- else
- sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ aix[4-9]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
fi
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- hppa*64*)
- shrext_cmds='.sl'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- *)
- shrext_cmds='.sl'
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=SHLIB_PATH
- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
- esac
- # HP-UX runs *really* slowly unless shared libraries are mode 555.
- postinstall_cmds='chmod 555 $lib'
- ;;
-
-interix[3-9]*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $host_os in
- nonstopux*) version_type=nonstopux ;;
- *)
- if test "$lt_cv_prog_gnu_ld" = yes; then
- version_type=linux
- else
- version_type=irix
- fi ;;
- esac
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
- case $host_os in
- irix5* | nonstopux*)
- libsuff= shlibsuff=
- ;;
- *)
- case $LD in # libtool.m4 will add one of these switches to LD
- *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
- libsuff= shlibsuff= libmagic=32-bit;;
- *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
- libsuff=32 shlibsuff=N32 libmagic=N32;;
- *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
- libsuff=64 shlibsuff=64 libmagic=64-bit;;
- *) libsuff= shlibsuff= libmagic=never-match;;
- esac
- ;;
- esac
- shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
- hardcode_into_libs=yes
- ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
- dynamic_linker=no
- ;;
-
-# This must be Linux ELF.
-linux* | k*bsd*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- # This implies no fast_install, which is unacceptable.
- # Some rework will be needed to allow for fast_install
- # before this can be enabled.
- hardcode_into_libs=yes
-
- # Append ld.so.conf contents to the search path
- if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
- fi
-
- # We used to test for /lib/ld.so.1 and disable shared libraries on
- # powerpc, because MkLinux only supported shared libraries with the
- # GNU dynamic linker. Since this was broken with cross compilers,
- # most powerpc-linux boxes support dynamic linking these days and
- # people can always --disable-shared, the test was removed, and we
- # assume the GNU/Linux dynamic linker is in use.
- dynamic_linker='GNU/Linux ld.so'
- ;;
-
-netbsd*)
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- dynamic_linker='NetBSD (a.out) ld.so'
- else
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='NetBSD ld.elf_so'
- fi
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
-
-newsos6)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- ;;
-
-nto-qnx*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- ;;
-
-openbsd*)
- version_type=sunos
- sys_lib_dlsearch_path_spec="/usr/lib"
- need_lib_prefix=no
- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
- case $host_os in
- openbsd3.3 | openbsd3.3.*) need_version=yes ;;
- *) need_version=no ;;
- esac
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- case $host_os in
- openbsd2.[89] | openbsd2.[89].*)
- shlibpath_overrides_runpath=no
- ;;
- *)
- shlibpath_overrides_runpath=yes
- ;;
- esac
- else
- shlibpath_overrides_runpath=yes
- fi
- ;;
-
-os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- need_lib_prefix=no
- library_names_spec='$libname${shared_ext} $libname.a'
- dynamic_linker='OS/2 ld.exe'
- shlibpath_var=LIBPATH
- ;;
-
-osf3* | osf4* | osf5*)
- version_type=osf
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
- ;;
-
-rdos*)
- dynamic_linker=no
- ;;
-
-solaris*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- # ldd complains unless libraries are executable
- postinstall_cmds='chmod +x $lib'
- ;;
-
-sunos4*)
- version_type=sunos
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- if test "$with_gnu_ld" = yes; then
- need_lib_prefix=no
- fi
- need_version=yes
- ;;
-
-sysv4 | sysv4.3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- case $host_vendor in
- sni)
- shlibpath_overrides_runpath=no
- need_lib_prefix=no
- export_dynamic_flag_spec='${wl}-Blargedynsym'
- runpath_var=LD_RUN_PATH
- ;;
- siemens)
- need_lib_prefix=no
- ;;
- motorola)
- need_lib_prefix=no
- need_version=no
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
- ;;
- esac
- ;;
-
-sysv4*MP*)
- if test -d /usr/nec ;then
- version_type=linux
- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
- soname_spec='$libname${shared_ext}.$major'
- shlibpath_var=LD_LIBRARY_PATH
- fi
- ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- version_type=freebsd-elf
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- hardcode_into_libs=yes
- if test "$with_gnu_ld" = yes; then
- sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
- shlibpath_overrides_runpath=no
- else
- sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
- shlibpath_overrides_runpath=yes
- case $host_os in
- sco3.2v5*)
- sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
- ;;
- esac
- fi
- sys_lib_dlsearch_path_spec='/usr/lib'
- ;;
-
-uts4*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-*)
- dynamic_linker=no
- ;;
-esac
-{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
-echo "${ECHO_T}$dynamic_linker" >&6; }
-test "$dynamic_linker" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
- variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
-hardcode_action_GCJ=
-if test -n "$hardcode_libdir_flag_spec_GCJ" || \
- test -n "$runpath_var_GCJ" || \
- test "X$hardcode_automatic_GCJ" = "Xyes" ; then
-
- # We can hardcode non-existant directories.
- if test "$hardcode_direct_GCJ" != no &&
- # If the only mechanism to avoid hardcoding is shlibpath_var, we
- # have to relink, otherwise we might link with an installed library
- # when we should be linking with a yet-to-be-installed one
- ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no &&
- test "$hardcode_minus_L_GCJ" != no; then
- # Linking always hardcodes the temporary library directory.
- hardcode_action_GCJ=relink
- else
- # We can link without hardcoding, and we can hardcode nonexisting dirs.
- hardcode_action_GCJ=immediate
- fi
-else
- # We cannot hardcode anything, or else we can only hardcode existing
- # directories.
- hardcode_action_GCJ=unsupported
-fi
-{ echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5
-echo "${ECHO_T}$hardcode_action_GCJ" >&6; }
-
-if test "$hardcode_action_GCJ" = relink; then
- # Fast installation is not supported
- enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
- test "$enable_shared" = no; then
- # Fast installation is not necessary
- enable_fast_install=needless
-fi
-
-
-# The else clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
- # See if we are running on zsh, and set the options which allow our commands through
- # without removal of \ escapes.
- if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
- fi
- # Now quote all the things that may contain metacharacters while being
- # careful not to overquote the AC_SUBSTed values. We take copies of the
- # variables and quote the copies for generation of the libtool script.
- for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
- SED SHELL STRIP \
- libname_spec library_names_spec soname_spec extract_expsyms_cmds \
- old_striplib striplib file_magic_cmd finish_cmds finish_eval \
- deplibs_check_method reload_flag reload_cmds need_locks \
- lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
- lt_cv_sys_global_symbol_to_c_name_address \
- sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
- old_postinstall_cmds old_postuninstall_cmds \
- compiler_GCJ \
- CC_GCJ \
- LD_GCJ \
- lt_prog_compiler_wl_GCJ \
- lt_prog_compiler_pic_GCJ \
- lt_prog_compiler_static_GCJ \
- lt_prog_compiler_no_builtin_flag_GCJ \
- export_dynamic_flag_spec_GCJ \
- thread_safe_flag_spec_GCJ \
- whole_archive_flag_spec_GCJ \
- enable_shared_with_static_runtimes_GCJ \
- old_archive_cmds_GCJ \
- old_archive_from_new_cmds_GCJ \
- predep_objects_GCJ \
- postdep_objects_GCJ \
- predeps_GCJ \
- postdeps_GCJ \
- compiler_lib_search_path_GCJ \
- archive_cmds_GCJ \
- archive_expsym_cmds_GCJ \
- postinstall_cmds_GCJ \
- postuninstall_cmds_GCJ \
- old_archive_from_expsyms_cmds_GCJ \
- allow_undefined_flag_GCJ \
- no_undefined_flag_GCJ \
- export_symbols_cmds_GCJ \
- hardcode_libdir_flag_spec_GCJ \
- hardcode_libdir_flag_spec_ld_GCJ \
- hardcode_libdir_separator_GCJ \
- hardcode_automatic_GCJ \
- module_cmds_GCJ \
- module_expsym_cmds_GCJ \
- lt_cv_prog_compiler_c_o_GCJ \
- fix_srcfile_path_GCJ \
- exclude_expsyms_GCJ \
- include_expsyms_GCJ; do
-
- case $var in
- old_archive_cmds_GCJ | \
- old_archive_from_new_cmds_GCJ | \
- archive_cmds_GCJ | \
- archive_expsym_cmds_GCJ | \
- module_cmds_GCJ | \
- module_expsym_cmds_GCJ | \
- old_archive_from_expsyms_cmds_GCJ | \
- export_symbols_cmds_GCJ | \
- extract_expsyms_cmds | reload_cmds | finish_cmds | \
- postinstall_cmds | postuninstall_cmds | \
- old_postinstall_cmds | old_postuninstall_cmds | \
- sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
- # Double-quote double-evaled strings.
- eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
- ;;
- *)
- eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
- ;;
- esac
- done
-
- case $lt_echo in
- *'\$0 --fallback-echo"')
- lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
- ;;
- esac
-
-cfgfile="$ofile"
-
- cat <<__EOF__ >> "$cfgfile"
-# ### BEGIN LIBTOOL TAG CONFIG: $tagname
-
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
-
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$archive_cmds_need_lc_GCJ
-
-# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ
-
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
-
-# The host system.
-host_alias=$host_alias
-host=$host
-host_os=$host_os
-
-# The build system.
-build_alias=$build_alias
-build=$build
-build_os=$build_os
-
-# An echo program that does not interpret backslashes.
-echo=$lt_echo
-
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
-
-# A C compiler.
-LTCC=$lt_LTCC
-
-# LTCC compiler flags.
-LTCFLAGS=$lt_LTCFLAGS
-
-# A language-specific compiler.
-CC=$lt_compiler_GCJ
-
-# Is the compiler the GNU C compiler?
-with_gcc=$GCC_GCJ
-
-# An ERE matcher.
-EGREP=$lt_EGREP
-
-# The linker used to build libraries.
-LD=$lt_LD_GCJ
-
-# Whether we need hard or soft links.
-LN_S=$lt_LN_S
-
-# A BSD-compatible nm program.
-NM=$lt_NM
-
-# A symbol stripping program
-STRIP=$lt_STRIP
-
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=$MAGIC_CMD
-
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
-
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
-
-# Used on cygwin: assembler.
-AS="$AS"
-
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
-
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
-
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl_GCJ
-
-# Object file suffix (normally "o").
-objext="$ac_objext"
-
-# Old archive suffix (normally "a").
-libext="$libext"
-
-# Shared library suffix (normally ".so").
-shrext_cmds='$shrext_cmds'
-
-# Executable file suffix (normally "").
-exeext="$exeext"
-
-# Additional compiler flags for building library objects.
-pic_flag=$lt_lt_prog_compiler_pic_GCJ
-pic_mode=$pic_mode
-
-# What is the maximum length of a command?
-max_cmd_len=$lt_cv_sys_max_cmd_len
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ
-
-# Must we lock files when doing compilation?
-need_locks=$lt_need_locks
-
-# Do we need the lib prefix for modules?
-need_lib_prefix=$need_lib_prefix
-
-# Do we need a version for libraries?
-need_version=$need_version
-
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
-
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
-
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_lt_prog_compiler_static_GCJ
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ
-
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ
-
-# Library versioning type.
-version_type=$version_type
-
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
-
-# List of archive names. First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=$lt_library_names_spec
-
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
-
-# Commands used to build and install an old-style archive.
-RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_old_archive_cmds_GCJ
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ
-
-# Commands used to build and install a shared archive.
-archive_cmds=$lt_archive_cmds_GCJ
-archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ
-postinstall_cmds=$lt_postinstall_cmds
-postuninstall_cmds=$lt_postuninstall_cmds
-
-# Commands used to build a loadable module (assumed same as above if empty)
-module_cmds=$lt_module_cmds_GCJ
-module_expsym_cmds=$lt_module_expsym_cmds_GCJ
-
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predep_objects=$lt_predep_objects_GCJ
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=$lt_postdep_objects_GCJ
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=$lt_predeps_GCJ
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=$lt_postdeps_GCJ
-
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ
-
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
-
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd=$lt_file_magic_cmd
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag_GCJ
-
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag_GCJ
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
-
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$lt_finish_eval
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
-
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
-
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
-
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
-
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action_GCJ
-
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ
-
-# If ld is used when linking, flag to hardcode \$libdir into
-# a binary during linking. This must work even if \$libdir does
-# not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ
-
-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$hardcode_direct_GCJ
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$hardcode_minus_L_GCJ
-
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ
-
-# Set to yes if building a shared library automatically hardcodes DIR into the library
-# and all subsequent libraries and executables linked against it.
-hardcode_automatic=$hardcode_automatic_GCJ
-
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs_GCJ
-
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
-
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
-
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path=$lt_fix_srcfile_path
-
-# Set to yes if exported symbols are required.
-always_export_symbols=$always_export_symbols_GCJ
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds_GCJ
-
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms_GCJ
-
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms_GCJ
-
-# ### END LIBTOOL TAG CONFIG: $tagname
-
-__EOF__
-
-
-else
- # If there is no Makefile yet, we rely on a make rule to execute
- # `config.status --recheck' to rerun these tests and create the
- # libtool script then.
- ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
- if test -f "$ltmain_in"; then
- test -f Makefile && make "$ltmain"
- fi
-fi
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-CC="$lt_save_CC"
-
- else
- tagname=""
- fi
- ;;
-
- RC)
-
-
-# Source file extension for RC test sources.
-ac_ext=rc
-
-# Object file extension for compiled RC test sources.
-objext=o
-objext_RC=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
-
-# Code to be used in simple link tests
-lt_simple_link_test_code="$lt_simple_compile_test_code"
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-
-
-# save warnings/boilerplate of simple test code
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$rm conftest*
-
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$rm conftest*
-
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${RC-"windres"}
-compiler=$CC
-compiler_RC=$CC
-for cc_temp in $compiler""; do
- case $cc_temp in
- compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
- distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
- \-*) ;;
- *) break;;
- esac
-done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-
-lt_cv_prog_compiler_c_o_RC=yes
-
-# The else clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
- # See if we are running on zsh, and set the options which allow our commands through
- # without removal of \ escapes.
- if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
- fi
- # Now quote all the things that may contain metacharacters while being
- # careful not to overquote the AC_SUBSTed values. We take copies of the
- # variables and quote the copies for generation of the libtool script.
- for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
- SED SHELL STRIP \
- libname_spec library_names_spec soname_spec extract_expsyms_cmds \
- old_striplib striplib file_magic_cmd finish_cmds finish_eval \
- deplibs_check_method reload_flag reload_cmds need_locks \
- lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
- lt_cv_sys_global_symbol_to_c_name_address \
- sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
- old_postinstall_cmds old_postuninstall_cmds \
- compiler_RC \
- CC_RC \
- LD_RC \
- lt_prog_compiler_wl_RC \
- lt_prog_compiler_pic_RC \
- lt_prog_compiler_static_RC \
- lt_prog_compiler_no_builtin_flag_RC \
- export_dynamic_flag_spec_RC \
- thread_safe_flag_spec_RC \
- whole_archive_flag_spec_RC \
- enable_shared_with_static_runtimes_RC \
- old_archive_cmds_RC \
- old_archive_from_new_cmds_RC \
- predep_objects_RC \
- postdep_objects_RC \
- predeps_RC \
- postdeps_RC \
- compiler_lib_search_path_RC \
- archive_cmds_RC \
- archive_expsym_cmds_RC \
- postinstall_cmds_RC \
- postuninstall_cmds_RC \
- old_archive_from_expsyms_cmds_RC \
- allow_undefined_flag_RC \
- no_undefined_flag_RC \
- export_symbols_cmds_RC \
- hardcode_libdir_flag_spec_RC \
- hardcode_libdir_flag_spec_ld_RC \
- hardcode_libdir_separator_RC \
- hardcode_automatic_RC \
- module_cmds_RC \
- module_expsym_cmds_RC \
- lt_cv_prog_compiler_c_o_RC \
- fix_srcfile_path_RC \
- exclude_expsyms_RC \
- include_expsyms_RC; do
-
- case $var in
- old_archive_cmds_RC | \
- old_archive_from_new_cmds_RC | \
- archive_cmds_RC | \
- archive_expsym_cmds_RC | \
- module_cmds_RC | \
- module_expsym_cmds_RC | \
- old_archive_from_expsyms_cmds_RC | \
- export_symbols_cmds_RC | \
- extract_expsyms_cmds | reload_cmds | finish_cmds | \
- postinstall_cmds | postuninstall_cmds | \
- old_postinstall_cmds | old_postuninstall_cmds | \
- sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
- # Double-quote double-evaled strings.
- eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
- ;;
- *)
- eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
- ;;
- esac
- done
-
- case $lt_echo in
- *'\$0 --fallback-echo"')
- lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
;;
esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
+$as_echo "$enable_shared" >&6; }
-cfgfile="$ofile"
-
- cat <<__EOF__ >> "$cfgfile"
-# ### BEGIN LIBTOOL TAG CONFIG: $tagname
-
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
-
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$archive_cmds_need_lc_RC
-
-# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
-
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
-
-# The host system.
-host_alias=$host_alias
-host=$host
-host_os=$host_os
-
-# The build system.
-build_alias=$build_alias
-build=$build
-build_os=$build_os
-
-# An echo program that does not interpret backslashes.
-echo=$lt_echo
-
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
-
-# A C compiler.
-LTCC=$lt_LTCC
-
-# LTCC compiler flags.
-LTCFLAGS=$lt_LTCFLAGS
-
-# A language-specific compiler.
-CC=$lt_compiler_RC
-
-# Is the compiler the GNU C compiler?
-with_gcc=$GCC_RC
-
-# An ERE matcher.
-EGREP=$lt_EGREP
-
-# The linker used to build libraries.
-LD=$lt_LD_RC
-
-# Whether we need hard or soft links.
-LN_S=$lt_LN_S
-
-# A BSD-compatible nm program.
-NM=$lt_NM
-
-# A symbol stripping program
-STRIP=$lt_STRIP
-
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=$MAGIC_CMD
-
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
-
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
-
-# Used on cygwin: assembler.
-AS="$AS"
-
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
-
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
-
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl_RC
-
-# Object file suffix (normally "o").
-objext="$ac_objext"
-
-# Old archive suffix (normally "a").
-libext="$libext"
-
-# Shared library suffix (normally ".so").
-shrext_cmds='$shrext_cmds'
-
-# Executable file suffix (normally "").
-exeext="$exeext"
-
-# Additional compiler flags for building library objects.
-pic_flag=$lt_lt_prog_compiler_pic_RC
-pic_mode=$pic_mode
-
-# What is the maximum length of a command?
-max_cmd_len=$lt_cv_sys_max_cmd_len
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
-
-# Must we lock files when doing compilation?
-need_locks=$lt_need_locks
-
-# Do we need the lib prefix for modules?
-need_lib_prefix=$need_lib_prefix
-
-# Do we need a version for libraries?
-need_version=$need_version
-
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
-
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
-
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_lt_prog_compiler_static_RC
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
-
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
-
-# Library versioning type.
-version_type=$version_type
-
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
-
-# List of archive names. First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=$lt_library_names_spec
-
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
-
-# Commands used to build and install an old-style archive.
-RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_old_archive_cmds_RC
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
-
-# Commands used to build and install a shared archive.
-archive_cmds=$lt_archive_cmds_RC
-archive_expsym_cmds=$lt_archive_expsym_cmds_RC
-postinstall_cmds=$lt_postinstall_cmds
-postuninstall_cmds=$lt_postuninstall_cmds
-
-# Commands used to build a loadable module (assumed same as above if empty)
-module_cmds=$lt_module_cmds_RC
-module_expsym_cmds=$lt_module_expsym_cmds_RC
-
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predep_objects=$lt_predep_objects_RC
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=$lt_postdep_objects_RC
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=$lt_predeps_RC
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=$lt_postdeps_RC
-
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path_RC
-
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
-
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd=$lt_file_magic_cmd
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag_RC
-
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag_RC
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
-
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$lt_finish_eval
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
-
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
-
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
-
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
-
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action_RC
-
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
-
-# If ld is used when linking, flag to hardcode \$libdir into
-# a binary during linking. This must work even if \$libdir does
-# not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
-
-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$hardcode_direct_RC
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$hardcode_minus_L_RC
-
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
-
-# Set to yes if building a shared library automatically hardcodes DIR into the library
-# and all subsequent libraries and executables linked against it.
-hardcode_automatic=$hardcode_automatic_RC
-
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs_RC
-
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
-
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
-
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path=$lt_fix_srcfile_path
-
-# Set to yes if exported symbols are required.
-always_export_symbols=$always_export_symbols_RC
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds_RC
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
+$as_echo_n "checking whether to build static libraries... " >&6; }
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
+$as_echo "$enable_static" >&6; }
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms_RC
-
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms_RC
-# ### END LIBTOOL TAG CONFIG: $tagname
-__EOF__
-
-else
- # If there is no Makefile yet, we rely on a make rule to execute
- # `config.status --recheck' to rerun these tests and create the
- # libtool script then.
- ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
- if test -f "$ltmain_in"; then
- test -f Makefile && make "$ltmain"
- fi
fi
-
-
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -18671,47 +11719,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
CC="$lt_save_CC"
- ;;
-
- *)
- { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5
-echo "$as_me: error: Unsupported tag name: $tagname" >&2;}
- { (exit 1); exit 1; }; }
- ;;
- esac
-
- # Append the new tag name to the list of available tags.
- if test -n "$tagname" ; then
- available_tags="$available_tags $tagname"
- fi
- fi
- done
- IFS="$lt_save_ifs"
-
- # Now substitute the updated list of available tags.
- if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
- mv "${ofile}T" "$ofile"
- chmod +x "$ofile"
- else
- rm -f "${ofile}T"
- { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5
-echo "$as_me: error: unable to update list of available tagged configurations." >&2;}
- { (exit 1); exit 1; }; }
- fi
-fi
-
-
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-
-# Prevent multiple expansion
-
-
-
@@ -18724,833 +11731,78 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+ ac_config_commands="$ac_config_commands libtool"
+# Only expand once:
-am__api_version="1.9"
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
- ./ | .// | /cC/* | \
- /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
- ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
- /usr/ucb/* ) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
- if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # program-specific install script used by HP pwplus--don't use.
- :
- else
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
- fi
- fi
- done
- done
- ;;
-esac
-done
-IFS=$as_save_IFS
-
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL=$ac_cv_path_install
- else
- # As a last resort, use the slow shell script. Don't cache a
- # value for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the value is a relative name.
- INSTALL=$ac_install_sh
- fi
-fi
-{ echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6; }
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5
-echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; }
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftest.file`
- fi
- rm -f conftest.file
- if test "$*" != "X $srcdir/configure conftest.file" \
- && test "$*" != "X conftest.file $srcdir/configure"; then
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" >&5
-echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" >&2;}
- { (exit 1); exit 1; }; }
- fi
- test "$2" = conftest.file
- )
-then
- # Ok.
- :
-else
- { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
-Check your system clock" >&5
-echo "$as_me: error: newly created file is older than distributed files!
-Check your system clock" >&2;}
- { (exit 1); exit 1; }; }
-fi
-{ echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-test "$program_prefix" != NONE &&
- program_transform_name="s&^&$program_prefix&;$program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s&\$&$program_suffix&;$program_transform_name"
-# Double any \ or $. echo might interpret backslashes.
-# By default was `s,x,x', remove it if useless.
-cat <<\_ACEOF >conftest.sed
-s/[\\$]/&&/g;s/;s,x,x,$//
-_ACEOF
-program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
-rm -f conftest.sed
+# other programs
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
- am_missing_run="$MISSING --run "
-else
- am_missing_run=
- { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
-echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
-fi
-
-if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
- # We used to keeping the `.' as first argument, in order to
- # allow $(mkdir_p) to be used without argument. As in
- # $(mkdir_p) $(somedir)
- # where $(somedir) is conditionally defined. However this is wrong
- # for two reasons:
- # 1. if the package is installed by a user who cannot write `.'
- # make install will fail,
- # 2. the above comment should most certainly read
- # $(mkdir_p) $(DESTDIR)$(somedir)
- # so it does not work when $(somedir) is undefined and
- # $(DESTDIR) is not.
- # To support the latter case, we have to write
- # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
- # so the `.' trick is pointless.
- mkdir_p='mkdir -p --'
-else
- # On NextStep and OpenStep, the `mkdir' command does not
- # recognize any option. It will interpret all options as
- # directories to create, and then abort because `.' already
- # exists.
- for d in ./-p ./--version;
- do
- test -d $d && rmdir $d
- done
- # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
- if test -f "$ac_aux_dir/mkinstalldirs"; then
- mkdir_p='$(mkinstalldirs)'
- else
- mkdir_p='$(install_sh) -d'
- fi
-fi
-
-for ac_prog in gawk mawk nawk awk
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$AWK"; then
- ac_cv_prog_AWK="$AWK" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_AWK="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
- { echo "$as_me:$LINENO: result: $AWK" >&5
-echo "${ECHO_T}$AWK" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
- test -n "$AWK" && break
-done
-
-{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
-set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.make <<\_ACEOF
-SHELL = /bin/sh
-all:
- @echo '@@@%%%=$(MAKE)=@@@%%%'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-case `${MAKE-make} -f conftest.make 2>/dev/null` in
- *@@@%%%=?*=@@@%%%*)
- eval ac_cv_prog_make_${ac_make}_set=yes;;
- *)
- eval ac_cv_prog_make_${ac_make}_set=no;;
-esac
-rm -f conftest.make
-fi
-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
- SET_MAKE=
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
- am__leading_dot=.
-else
- am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-
-DEPDIR="${am__leading_dot}deps"
-
-ac_config_commands="$ac_config_commands depfiles"
-
-
-am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
- @echo done
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
-echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; }
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
- am__include=include
- am__quote=
- _am_result=GNU
-fi
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
- echo '.include "confinc"' > confmf
- if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
- am__include=.include
- am__quote="\""
- _am_result=BSD
- fi
-fi
-
-
-{ echo "$as_me:$LINENO: result: $_am_result" >&5
-echo "${ECHO_T}$_am_result" >&6; }
-rm -f confinc confmf
-
-# Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then
- enableval=$enable_dependency_tracking;
-fi
-
-if test "x$enable_dependency_tracking" != xno; then
- am_depcomp="$ac_aux_dir/depcomp"
- AMDEPBACKSLASH='\'
-fi
-
-
-if test "x$enable_dependency_tracking" != xno; then
- AMDEP_TRUE=
- AMDEP_FALSE='#'
-else
- AMDEP_TRUE='#'
- AMDEP_FALSE=
-fi
-
-
-
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
- test -f $srcdir/config.status; then
- { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
-echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
- if (cygpath --version) >/dev/null 2>/dev/null; then
- CYGPATH_W='cygpath -w'
- else
- CYGPATH_W=echo
- fi
-fi
-
-
-# Define the identity of the package.
- PACKAGE='openpam'
- VERSION='20071221'
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE "$PACKAGE"
-_ACEOF
+LIB_MAJ=2
cat >>confdefs.h <<_ACEOF
-#define VERSION "$VERSION"
+#define LIB_MAJ $LIB_MAJ
_ACEOF
-# Some tools Automake needs.
-
-ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
-
-
-AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
-
-
-AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
-
-
-AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
-
-
-MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
-
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
-
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'. However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-if test "$cross_compiling" != no; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
- { echo "$as_me:$LINENO: result: $STRIP" >&5
-echo "${ECHO_T}$STRIP" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
- ac_ct_STRIP=$STRIP
- # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_STRIP"; then
- ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_STRIP="strip"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
- { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-echo "${ECHO_T}$ac_ct_STRIP" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
- if test "x$ac_ct_STRIP" = x; then
- STRIP=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
- STRIP=$ac_ct_STRIP
- fi
-else
- STRIP="$ac_cv_prog_STRIP"
-fi
+# Check whether --enable-debug was given.
+if test "${enable_debug+set}" = set; then :
+ enableval=$enable_debug;
+$as_echo "#define OPENPAM_DEBUG 1" >>confdefs.h
fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
-
-# We need awk for the "check" target. The system "awk" is bad on
-# some platforms.
-# Always define AMTAR for backward compatibility.
-
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
-
-
-
-depcc="$CC" am_compiler_list=
-{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
- # We make a subdir and do the tests there. Otherwise we can end up
- # making bogus files that we don't know about and never remove. For
- # instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named `D' -- because `-MD' means `put the output
- # in D'.
- mkdir conftest.dir
- # Copy depcomp to subdir because otherwise we won't find it if we're
- # using a relative directory.
- cp "$am_depcomp" conftest.dir
- cd conftest.dir
- # We will build objects and dependencies in a subdirectory because
- # it helps to detect inapplicable dependency modes. For instance
- # both Tru64's cc and ICC support -MD to output dependencies as a
- # side effect of compilation, but ICC will put the dependencies in
- # the current directory while Tru64 will put them in the object
- # directory.
- mkdir sub
+# Check whether --enable-unversioned-modules was given.
+if test "${enable_unversioned_modules+set}" = set; then :
+ enableval=$enable_unversioned_modules; if test x"$enableval" = x"no"; then :
- am_cv_CC_dependencies_compiler_type=none
- if test "$am_compiler_list" = ""; then
- am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
- fi
- for depmode in $am_compiler_list; do
- # Setup a source with many dependencies, because some compilers
- # like to wrap large dependency lists on column 80 (with \), and
- # we should not choose a depcomp mode which is confused by this.
- #
- # We need to recreate these files for each test, as the compiler may
- # overwrite some of them when testing with obscure command lines.
- # This happens at least with the AIX C compiler.
- : > sub/conftest.c
- for i in 1 2 3 4 5 6; do
- echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
- # Solaris 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
- done
- echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
- case $depmode in
- nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
- if test "x$enable_dependency_tracking" = xyes; then
- continue
- else
- break
- fi
- ;;
- none) break ;;
- esac
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
- # mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this.
- if depmode=$depmode \
- source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
- depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
- $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
- >/dev/null 2>conftest.err &&
- grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
- grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
- ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- # icc doesn't choke on unknown options, it will just issue warnings
- # or remarks (even with -Werror). So we grep stderr for any message
- # that says an option was ignored or not supported.
- # When given -MP, icc 7.0 and 7.1 complain thusly:
- # icc: Command line warning: ignoring option '-M'; no argument required
- # The diagnosis changed in icc 8.0:
- # icc: Command line remark: option '-MP' not supported
- if (grep 'ignoring option' conftest.err ||
- grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
- am_cv_CC_dependencies_compiler_type=$depmode
- break
- fi
- fi
- done
+$as_echo "#define DISABLE_UNVERSIONED_MODULES 1" >>confdefs.h
- cd ..
- rm -rf conftest.dir
-else
- am_cv_CC_dependencies_compiler_type=none
-fi
fi
-{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
-echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
-CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
-
-
-
-if
- test "x$enable_dependency_tracking" != xno \
- && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
- am__fastdepCC_TRUE=
- am__fastdepCC_FALSE='#'
-else
- am__fastdepCC_TRUE='#'
- am__fastdepCC_FALSE=
fi
-depcc="$CXX" am_compiler_list=
-
-{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
-if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
- # We make a subdir and do the tests there. Otherwise we can end up
- # making bogus files that we don't know about and never remove. For
- # instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named `D' -- because `-MD' means `put the output
- # in D'.
- mkdir conftest.dir
- # Copy depcomp to subdir because otherwise we won't find it if we're
- # using a relative directory.
- cp "$am_depcomp" conftest.dir
- cd conftest.dir
- # We will build objects and dependencies in a subdirectory because
- # it helps to detect inapplicable dependency modes. For instance
- # both Tru64's cc and ICC support -MD to output dependencies as a
- # side effect of compilation, but ICC will put the dependencies in
- # the current directory while Tru64 will put them in the object
- # directory.
- mkdir sub
-
- am_cv_CXX_dependencies_compiler_type=none
- if test "$am_compiler_list" = ""; then
- am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
- fi
- for depmode in $am_compiler_list; do
- # Setup a source with many dependencies, because some compilers
- # like to wrap large dependency lists on column 80 (with \), and
- # we should not choose a depcomp mode which is confused by this.
- #
- # We need to recreate these files for each test, as the compiler may
- # overwrite some of them when testing with obscure command lines.
- # This happens at least with the AIX C compiler.
- : > sub/conftest.c
- for i in 1 2 3 4 5 6; do
- echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
- # Solaris 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
- done
- echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
- case $depmode in
- nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
- if test "x$enable_dependency_tracking" = xyes; then
- continue
- else
- break
- fi
- ;;
- none) break ;;
- esac
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
- # mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this.
- if depmode=$depmode \
- source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
- depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
- $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
- >/dev/null 2>conftest.err &&
- grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
- grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
- ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- # icc doesn't choke on unknown options, it will just issue warnings
- # or remarks (even with -Werror). So we grep stderr for any message
- # that says an option was ignored or not supported.
- # When given -MP, icc 7.0 and 7.1 complain thusly:
- # icc: Command line warning: ignoring option '-M'; no argument required
- # The diagnosis changed in icc 8.0:
- # icc: Command line remark: option '-MP' not supported
- if (grep 'ignoring option' conftest.err ||
- grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
- am_cv_CXX_dependencies_compiler_type=$depmode
- break
- fi
- fi
- done
-
- cd ..
- rm -rf conftest.dir
-else
- am_cv_CXX_dependencies_compiler_type=none
-fi
-
-fi
-{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
-echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; }
-CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+# Check whether --with-modules-dir was given.
+if test "${with_modules_dir+set}" = set; then :
+ withval=$with_modules_dir; if test x"$withval" != x"no"; then :
+ OPENPAM_MODULES_DIR="$withval"
-if
- test "x$enable_dependency_tracking" != xno \
- && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
- am__fastdepCXX_TRUE=
- am__fastdepCXX_FALSE='#'
else
- am__fastdepCXX_TRUE='#'
- am__fastdepCXX_FALSE=
-fi
-
-
-
-
-LIB_MAJ=2
-
-
-cat >>confdefs.h <<_ACEOF
-#define LIB_MAJ $LIB_MAJ
-_ACEOF
-
-# Check whether --enable-debug was given.
-if test "${enable_debug+set}" = set; then
- enableval=$enable_debug;
-cat >>confdefs.h <<\_ACEOF
-#define OPENPAM_DEBUG 1
-_ACEOF
+ OPENPAM_MODULES_DIR="$libdir"
fi
-
-
-{ echo "$as_me:$LINENO: checking whether loading unversioned modules support is enabled" >&5
-echo $ECHO_N "checking whether loading unversioned modules support is enabled... $ECHO_C" >&6; }
-# Check whether --enable-unversioned-modules was given.
-if test "${enable_unversioned_modules+set}" = set; then
- enableval=$enable_unversioned_modules; if test "$enableval" = "no"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define DISABLE_UNVERSIONED_MODULES 1
-_ACEOF
-
- fi
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
else
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ OPENPAM_MODULES_DIR="$libdir"
fi
-{ echo "$as_me:$LINENO: checking for modules directory support" >&5
-echo $ECHO_N "checking for modules directory support... $ECHO_C" >&6; }
-
-# Check whether --with-modules-dir was given.
-if test "${with_modules_dir+set}" = set; then
- withval=$with_modules_dir; if test "$withval" != "no"; then
- OPENPAM_MODULES_DIR="$withval"
-
cat >>confdefs.h <<_ACEOF
-#define OPENPAM_MODULES_DIR "$OPENPAM_MODULES_DIR"
+#define OPENPAM_MODULES_DIR "${OPENPAM_MODULES_DIR%/}/"
_ACEOF
- { echo "$as_me:$LINENO: result: $OPENPAM_MODULES_DIR" >&5
-echo "${ECHO_T}$OPENPAM_MODULES_DIR" >&6; }
- else
- OPENPAM_MODULES_DIR="$libdir"
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
- fi
-else
- OPENPAM_MODULES_DIR="$libdir"
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-{ echo "$as_me:$LINENO: checking whether to build the documentation" >&5
-echo $ECHO_N "checking whether to build the documentation... $ECHO_C" >&6; }
# Check whether --with-doc was given.
-if test "${with_doc+set}" = set; then
+if test "${with_doc+set}" = set; then :
withval=$with_doc;
else
with_doc=yes
fi
-{ echo "$as_me:$LINENO: result: $with_doc" >&5
-echo "${ECHO_T}$with_doc" >&6; }
-
-{ echo "$as_me:$LINENO: checking whether to build example version of pam_unix.so" >&5
-echo $ECHO_N "checking whether to build example version of pam_unix.so... $ECHO_C" >&6; }
-
-# Check whether --with-pam-unix was given.
-if test "${with_pam_unix+set}" = set; then
- withval=$with_pam_unix;
-else
- with_pam_unix=no
-fi
-
-{ echo "$as_me:$LINENO: result: $with_pam_unix" >&5
-echo "${ECHO_T}$with_pam_unix" >&6; }
-
-{ echo "$as_me:$LINENO: checking whether to build example version of su(1)" >&5
-echo $ECHO_N "checking whether to build example version of su(1)... $ECHO_C" >&6; }
-
-# Check whether --with-su was given.
-if test "${with_su+set}" = set; then
- withval=$with_su;
-else
- with_su=no
-fi
-
-{ echo "$as_me:$LINENO: result: $with_su" >&5
-echo "${ECHO_T}$with_su" >&6; }
-
-
-
-if test "x$with_doc" = "xyes"; then
+ if test x"$with_doc" = x"yes"; then
WITH_DOC_TRUE=
WITH_DOC_FALSE='#'
else
@@ -19560,7 +11812,14 @@ fi
-if test "x$with_pam_unix" = "xyes"; then
+# Check whether --with-pam-unix was given.
+if test "${with_pam_unix+set}" = set; then :
+ withval=$with_pam_unix;
+else
+ with_pam_unix=no
+fi
+
+ if test x"$with_pam_unix" = x"yes"; then
WITH_PAM_UNIX_TRUE=
WITH_PAM_UNIX_FALSE='#'
else
@@ -19570,235 +11829,45 @@ fi
-if test "x$with_su" = "xyes"; then
- WITH_SU_TRUE=
- WITH_SU_FALSE='#'
+# Check whether --with-pamtest was given.
+if test "${with_pamtest+set}" = set; then :
+ withval=$with_pamtest;
else
- WITH_SU_TRUE='#'
- WITH_SU_FALSE=
+ with_pamtest=no
fi
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ if test x"$with_pamtest" = x"yes"; then
+ WITH_PAMTEST_TRUE=
+ WITH_PAMTEST_FALSE='#'
else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
- ./ | .// | /cC/* | \
- /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
- ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
- /usr/ucb/* ) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
- if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # program-specific install script used by HP pwplus--don't use.
- :
- else
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
- fi
- fi
- done
- done
- ;;
-esac
-done
-IFS=$as_save_IFS
-
-
+ WITH_PAMTEST_TRUE='#'
+ WITH_PAMTEST_FALSE=
fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL=$ac_cv_path_install
- else
- # As a last resort, use the slow shell script. Don't cache a
- # value for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the value is a relative name.
- INSTALL=$ac_install_sh
- fi
-fi
-{ echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6; }
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-for ac_header in crypt.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-else
- # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_header_compiler=yes
+# Check whether --with-su was given.
+if test "${with_su+set}" = set; then :
+ withval=$with_su;
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_compiler=no
+ with_su=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }; then
- ac_header_preproc=yes
+ if test x"$with_su" = x"yes"; then
+ WITH_SU_TRUE=
+ WITH_SU_FALSE='#'
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
+ WITH_SU_TRUE='#'
+ WITH_SU_FALSE=
fi
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- ( cat <<\_ASBOX
-## ------------------------- ##
-## Report this to des@des.no ##
-## ------------------------- ##
-_ASBOX
- ) | sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+for ac_header in crypt.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "crypt.h" "ac_cv_header_crypt_h" "$ac_includes_default"
+if test "x$ac_cv_header_crypt_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_CRYPT_H 1
_ACEOF
fi
@@ -19806,114 +11875,29 @@ fi
done
-
-for ac_func in fpurge
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
-int
-main ()
-{
-return $ac_func ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- eval "$as_ac_var=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_var'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
+for ac_func in fpurge strlcmp strlcpy
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
done
-DL_LIBS=
-{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+saved_LIBS="${LIBS}"
+LIBS=""
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if ${ac_cv_lib_dl_dlopen+:} false; then :
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
@@ -19931,57 +11915,40 @@ return dlopen ();
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_dl_dlopen=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_lib_dl_dlopen=no
+ ac_cv_lib_dl_dlopen=no
fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
-if test $ac_cv_lib_dl_dlopen = yes; then
- DL_LIBS=-ldl
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBDL 1
+_ACEOF
+
+ LIBS="-ldl $LIBS"
+
fi
+DL_LIBS="${LIBS}"
+LIBS="${saved_LIBS}"
-CRYPT_LIBS=
-{ echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
-echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; }
-if test "${ac_cv_lib_crypt_crypt+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+saved_LIBS="${LIBS}"
+LIBS=""
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
+$as_echo_n "checking for crypt in -lcrypt... " >&6; }
+if ${ac_cv_lib_crypt_crypt+:} false; then :
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lcrypt $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
@@ -19999,66 +11966,47 @@ return crypt ();
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_crypt_crypt=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_lib_crypt_crypt=no
+ ac_cv_lib_crypt_crypt=no
fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
-echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; }
-if test $ac_cv_lib_crypt_crypt = yes; then
- CRYPT_LIBS=-lcrypt
-fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
+$as_echo "$ac_cv_lib_crypt_crypt" >&6; }
+if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBCRYPT 1
+_ACEOF
+ LIBS="-lcrypt $LIBS"
+fi
-CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
+CRYPT_LIBS="${LIBS}"
+LIBS="${saved_LIBS}"
-# This corresponds to FreeBSD's WARNS level 6
-DEVELOPER_CFLAGS="-Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wformat"
# Check whether --enable-developer-warnings was given.
-if test "${enable_developer_warnings+set}" = set; then
- enableval=$enable_developer_warnings; CFLAGS="${CFLAGS} ${DEVELOPER_CFLAGS}"
+if test "${enable_developer_warnings+set}" = set; then :
+ enableval=$enable_developer_warnings; CFLAGS="${CFLAGS} -Wall -Wextra"
fi
# Check whether --enable-debugging-symbols was given.
-if test "${enable_debugging_symbols+set}" = set; then
+if test "${enable_debugging_symbols+set}" = set; then :
enableval=$enable_debugging_symbols; CFLAGS="${CFLAGS} -O0 -g -fno-inline"
fi
# Check whether --enable-werror was given.
-if test "${enable_werror+set}" = set; then
+if test "${enable_werror+set}" = set; then :
enableval=$enable_werror; CFLAGS="${CFLAGS} -Werror"
fi
-ac_config_files="$ac_config_files bin/Makefile bin/su/Makefile include/Makefile include/security/Makefile lib/Makefile modules/Makefile modules/pam_unix/Makefile modules/pam_deny/Makefile modules/pam_permit/Makefile doc/Makefile doc/man/Makefile Makefile"
+ac_config_files="$ac_config_files bin/Makefile bin/pamtest/Makefile bin/su/Makefile include/Makefile include/security/Makefile lib/Makefile modules/Makefile modules/pam_unix/Makefile modules/pam_deny/Makefile modules/pam_permit/Makefile doc/Makefile doc/man/Makefile Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -20087,12 +12035,13 @@ _ACEOF
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
- *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
-echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
- *) $as_unset $ac_var ;;
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
esac ;;
esac
done
@@ -20100,8 +12049,8 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
(set) 2>&1 |
case $as_nl`(ac_space=' '; set) 2>&1` in #(
*${as_nl}ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \).
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
sed -n \
"s/'/'\\\\''/g;
s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
@@ -20123,13 +12072,24 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
:end' >>confcache
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
if test -w "$cache_file"; then
- test "x$cache_file" != "x/dev/null" &&
- { echo "$as_me:$LINENO: updating cache $cache_file" >&5
-echo "$as_me: updating cache $cache_file" >&6;}
- cat confcache >$cache_file
+ if test "x$cache_file" != "x/dev/null"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
else
- { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
-echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
fi
fi
rm -f confcache
@@ -20142,69 +12102,62 @@ DEFS=-DHAVE_CONFIG_H
ac_libobjs=
ac_ltlibobjs=
+U=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
- ac_i=`echo "$ac_i" | sed "$ac_script"`
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
# 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
# will be set to the directory where LIBOBJS objects are built.
- ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
- ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
done
LIBOBJS=$ac_libobjs
LTLIBOBJS=$ac_ltlibobjs
+ if test -n "$EXEEXT"; then
+ am__EXEEXT_TRUE=
+ am__EXEEXT_FALSE='#'
+else
+ am__EXEEXT_TRUE='#'
+ am__EXEEXT_FALSE=
+fi
+
if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
- { (exit 1); exit 1; }; }
-fi
-if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${WITH_DOC_TRUE}" && test -z "${WITH_DOC_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"WITH_DOC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"WITH_DOC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "conditional \"WITH_DOC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${WITH_PAM_UNIX_TRUE}" && test -z "${WITH_PAM_UNIX_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"WITH_PAM_UNIX\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"WITH_PAM_UNIX\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "conditional \"WITH_PAM_UNIX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${WITH_PAMTEST_TRUE}" && test -z "${WITH_PAMTEST_FALSE}"; then
+ as_fn_error $? "conditional \"WITH_PAMTEST\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${WITH_SU_TRUE}" && test -z "${WITH_SU_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"WITH_SU\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"WITH_SU\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "conditional \"WITH_SU\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-: ${CONFIG_STATUS=./config.status}
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
#! $SHELL
# Generated by $as_me.
# Run this file to recreate the current configuration.
@@ -20214,59 +12167,79 @@ cat >$CONFIG_STATUS <<_ACEOF
debug=false
ac_cs_recheck=false
ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
esac
-
fi
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
fi
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
fi
@@ -20275,20 +12248,19 @@ fi
# there to prevent editors from complaining about space-tab.
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
# splitting by setting IFS to empty value.)
-as_nl='
-'
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
-case $0 in
+as_myself=
+case $0 in #((
*[\\/]* ) as_myself=$0 ;;
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
IFS=$as_save_IFS
;;
@@ -20299,32 +12271,111 @@ if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
- echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- { (exit 1); exit 1; }
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
fi
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
done
PS1='$ '
PS2='> '
PS4='+ '
# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
-done
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
-# Required to use basename.
if expr a : '\(a\)' >/dev/null 2>&1 &&
test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr
@@ -20338,13 +12389,17 @@ else
as_basename=false
fi
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
-# Name of the executable.
as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X/"$0" |
+$as_echo X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
@@ -20359,104 +12414,103 @@ echo X/"$0" |
}
s/.*/./; q'`
-# CDPATH.
-$as_unset CDPATH
-
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line after each line using $LINENO; the second 'sed'
- # does the real work. The second script uses 'N' to pair each
- # line-number line with the line containing $LINENO, and appends
- # trailing '-' during substitution so that $LINENO is not a special
- # case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # scripts with optimization help from Paolo Bonzini. Blame Lee
- # E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
+case `echo -n x` in #(((((
-n*)
- case `echo 'x\c'` in
+ case `echo 'xy\c'` in
*c*) ECHO_T=' ';; # ECHO_T is single tab character.
- *) ECHO_C='\c';;
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
esac;;
*)
ECHO_N='-n';;
esac
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
else
rm -f conf$$.dir
- mkdir conf$$.dir
-fi
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
+ fi
else
as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
+ as_mkdir_p='mkdir -p "$as_dir"'
else
test -d ./-p && rmdir ./-p
as_mkdir_p=false
@@ -20473,12 +12527,12 @@ else
as_test_x='
eval sh -c '\''
if test -d "$1"; then
- test -d "$1/.";
+ test -d "$1/.";
else
- case $1 in
- -*)set "./$1";;
+ case $1 in #(
+ -*)set "./$1";;
esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
???[sx]*):;;*)false;;esac;fi
'\'' sh
'
@@ -20493,13 +12547,19 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
-# Save the log message, to keep $[0] and so on meaningful, and to
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by OpenPAM $as_me 20071221, which was
-generated by GNU Autoconf 2.61. Invocation command line was
+This file was extended by OpenPAM $as_me 20111218, which was
+generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -20512,7 +12572,16 @@ on `(hostname || uname -n) 2>/dev/null | sed 1q`
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
config_files="$ac_config_files"
config_headers="$ac_config_headers"
@@ -20520,22 +12589,25 @@ config_commands="$ac_config_commands"
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
-Usage: $0 [OPTIONS] [FILE]...
+Usage: $0 [OPTION]... [TAG]...
-h, --help print this help, then exit
-V, --version print version number and configuration settings, then exit
- -q, --quiet do not print progress messages
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
-d, --debug don't remove temporary files
--recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
- --header=FILE[:TEMPLATE]
- instantiate the configuration header FILE
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
Configuration files:
$config_files
@@ -20546,36 +12618,44 @@ $config_headers
Configuration commands:
$config_commands
-Report bugs to <bug-autoconf@gnu.org>."
+Report bugs to <des@des.no>."
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-OpenPAM config.status 20071221
-configured by $0, generated by GNU Autoconf 2.61,
- with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+OpenPAM config.status 20111218
+configured by $0, generated by GNU Autoconf 2.68,
+ with options \\"\$ac_cs_config\\"
-Copyright (C) 2006 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
ac_pwd='$ac_pwd'
srcdir='$srcdir'
INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If no file are specified by the user, then we need to provide default
-# value. By we need to know if files were specified by the user.
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
ac_need_defaults=:
while test $# != 0
do
case $1 in
- --*=*)
+ --*=?*)
ac_option=`expr "X$1" : 'X\([^=]*\)='`
ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
ac_shift=:
;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
*)
ac_option=$1
ac_optarg=$2
@@ -20588,34 +12668,41 @@ do
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
ac_cs_recheck=: ;;
--version | --versio | --versi | --vers | --ver | --ve | --v | -V )
- echo "$ac_cs_version"; exit ;;
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
--debug | --debu | --deb | --de | --d | -d )
debug=: ;;
--file | --fil | --fi | --f )
$ac_shift
- CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
ac_need_defaults=false;;
--header | --heade | --head | --hea )
$ac_shift
- CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append CONFIG_HEADERS " '$ac_optarg'"
ac_need_defaults=false;;
--he | --h)
# Conflict between --help and --header
- { echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; };;
+ as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
--help | --hel | -h )
- echo "$ac_cs_usage"; exit ;;
+ $as_echo "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s)
ac_cs_silent=: ;;
# This is an error.
- -*) { echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; } ;;
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
- *) ac_config_targets="$ac_config_targets $1"
+ *) as_fn_append ac_config_targets " $1"
ac_need_defaults=false ;;
esac
@@ -20630,35 +12717,314 @@ if $ac_cs_silent; then
fi
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
- echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
- CONFIG_SHELL=$SHELL
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
export CONFIG_SHELL
- exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ exec "\$@"
fi
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
exec 5>>config.log
{
echo
sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## Running $as_me. ##
_ASBOX
- echo "$ac_log"
+ $as_echo "$ac_log"
} >&5
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
#
# INIT-COMMANDS
#
AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
+macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
+enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
+enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
+pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
+enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
+SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
+ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
+host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
+host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
+host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
+build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
+build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
+build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
+SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
+Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
+GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
+EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
+FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
+LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
+NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
+LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
+max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
+ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
+exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
+lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
+lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
+lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
+lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
+reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
+reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
+OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
+deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
+AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
+STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
+old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
+lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
+CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
+CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
+compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
+GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
+objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
+need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
+MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
+DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
+NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
+LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
+OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
+OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
+libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
+shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
+extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
+archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
+export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
+whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
+compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
+old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
+archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
+archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
+module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
+module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
+with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
+allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
+no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
+hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
+hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
+hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
+hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
+inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
+link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
+always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
+export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
+exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
+include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
+prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
+postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
+file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
+variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
+need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
+need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
+version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
+runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
+shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
+shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
+libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
+library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
+soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
+install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
+postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
+finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
+finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
+hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
+sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
+sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
+striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
+
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+
+# Quote evaled strings.
+for var in SHELL \
+ECHO \
+SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+OBJDUMP \
+deplibs_check_method \
+file_magic_cmd \
+file_magic_glob \
+want_nocaseglob \
+DLLTOOL \
+sharedlib_from_linklib_cmd \
+AR \
+AR_FLAGS \
+archiver_list_spec \
+STRIP \
+RANLIB \
+CC \
+CFLAGS \
+compiler \
+lt_cv_sys_global_symbol_pipe \
+lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_c_name_address \
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
+nm_file_list_spec \
+lt_prog_compiler_no_builtin_flag \
+lt_prog_compiler_pic \
+lt_prog_compiler_wl \
+lt_prog_compiler_static \
+lt_cv_prog_compiler_c_o \
+need_locks \
+MANIFEST_TOOL \
+DSYMUTIL \
+NMEDIT \
+LIPO \
+OTOOL \
+OTOOL64 \
+shrext_cmds \
+export_dynamic_flag_spec \
+whole_archive_flag_spec \
+compiler_needs_object \
+with_gnu_ld \
+allow_undefined_flag \
+no_undefined_flag \
+hardcode_libdir_flag_spec \
+hardcode_libdir_flag_spec_ld \
+hardcode_libdir_separator \
+exclude_expsyms \
+include_expsyms \
+file_list_spec \
+variables_saved_for_relink \
+libname_spec \
+library_names_spec \
+soname_spec \
+install_override_mode \
+finish_eval \
+old_striplib \
+striplib; do
+ case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Double-quote double-evaled strings.
+for var in reload_cmds \
+old_postinstall_cmds \
+old_postuninstall_cmds \
+old_archive_cmds \
+extract_expsyms_cmds \
+old_archive_from_new_cmds \
+old_archive_from_expsyms_cmds \
+archive_cmds \
+archive_expsym_cmds \
+module_cmds \
+module_expsym_cmds \
+export_symbols_cmds \
+prelink_cmds \
+postlink_cmds \
+postinstall_cmds \
+postuninstall_cmds \
+finish_cmds \
+sys_lib_search_path_spec \
+sys_lib_dlsearch_path_spec; do
+ case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+ac_aux_dir='$ac_aux_dir'
+xsi_shell='$xsi_shell'
+lt_shell_append='$lt_shell_append'
+
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ TIMESTAMP='$TIMESTAMP'
+ RM='$RM'
+ ofile='$ofile'
+
+
+
+
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# Handling of arguments.
for ac_config_target in $ac_config_targets
@@ -20666,7 +13032,9 @@ do
case $ac_config_target in
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
"bin/Makefile") CONFIG_FILES="$CONFIG_FILES bin/Makefile" ;;
+ "bin/pamtest/Makefile") CONFIG_FILES="$CONFIG_FILES bin/pamtest/Makefile" ;;
"bin/su/Makefile") CONFIG_FILES="$CONFIG_FILES bin/su/Makefile" ;;
"include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
"include/security/Makefile") CONFIG_FILES="$CONFIG_FILES include/security/Makefile" ;;
@@ -20679,9 +13047,7 @@ do
"doc/man/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/Makefile" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
- { (exit 1); exit 1; }; };;
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
done
@@ -20704,269 +13070,302 @@ fi
# after its creation but before its name has been assigned to `$tmp'.
$debug ||
{
- tmp=
+ tmp= ac_tmp=
trap 'exit_status=$?
- { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
' 0
- trap '{ (exit 1); exit 1; }' 1 2 13 15
+ trap 'as_fn_exit 1' 1 2 13 15
}
# Create a (secure) tmp directory for tmp files.
{
tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
+ test -d "$tmp"
} ||
{
tmp=./conf$$-$RANDOM
(umask 077 && mkdir "$tmp")
-} ||
-{
- echo "$me: cannot create a temporary directory in ." >&2
- { (exit 1); exit 1; }
-}
-
-#
-# Set up the sed scripts for CONFIG_FILES section.
-#
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
if test -n "$CONFIG_FILES"; then
-_ACEOF
-
-
-
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
- cat >conf$$subs.sed <<_ACEOF
-SHELL!$SHELL$ac_delim
-PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
-PACKAGE_NAME!$PACKAGE_NAME$ac_delim
-PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
-PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
-PACKAGE_STRING!$PACKAGE_STRING$ac_delim
-PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
-exec_prefix!$exec_prefix$ac_delim
-prefix!$prefix$ac_delim
-program_transform_name!$program_transform_name$ac_delim
-bindir!$bindir$ac_delim
-sbindir!$sbindir$ac_delim
-libexecdir!$libexecdir$ac_delim
-datarootdir!$datarootdir$ac_delim
-datadir!$datadir$ac_delim
-sysconfdir!$sysconfdir$ac_delim
-sharedstatedir!$sharedstatedir$ac_delim
-localstatedir!$localstatedir$ac_delim
-includedir!$includedir$ac_delim
-oldincludedir!$oldincludedir$ac_delim
-docdir!$docdir$ac_delim
-infodir!$infodir$ac_delim
-htmldir!$htmldir$ac_delim
-dvidir!$dvidir$ac_delim
-pdfdir!$pdfdir$ac_delim
-psdir!$psdir$ac_delim
-libdir!$libdir$ac_delim
-localedir!$localedir$ac_delim
-mandir!$mandir$ac_delim
-DEFS!$DEFS$ac_delim
-ECHO_C!$ECHO_C$ac_delim
-ECHO_N!$ECHO_N$ac_delim
-ECHO_T!$ECHO_T$ac_delim
-LIBS!$LIBS$ac_delim
-build_alias!$build_alias$ac_delim
-host_alias!$host_alias$ac_delim
-target_alias!$target_alias$ac_delim
-build!$build$ac_delim
-build_cpu!$build_cpu$ac_delim
-build_vendor!$build_vendor$ac_delim
-build_os!$build_os$ac_delim
-host!$host$ac_delim
-host_cpu!$host_cpu$ac_delim
-host_vendor!$host_vendor$ac_delim
-host_os!$host_os$ac_delim
-target!$target$ac_delim
-target_cpu!$target_cpu$ac_delim
-target_vendor!$target_vendor$ac_delim
-target_os!$target_os$ac_delim
-CC!$CC$ac_delim
-CFLAGS!$CFLAGS$ac_delim
-LDFLAGS!$LDFLAGS$ac_delim
-CPPFLAGS!$CPPFLAGS$ac_delim
-ac_ct_CC!$ac_ct_CC$ac_delim
-EXEEXT!$EXEEXT$ac_delim
-OBJEXT!$OBJEXT$ac_delim
-SED!$SED$ac_delim
-GREP!$GREP$ac_delim
-EGREP!$EGREP$ac_delim
-LN_S!$LN_S$ac_delim
-ECHO!$ECHO$ac_delim
-AR!$AR$ac_delim
-RANLIB!$RANLIB$ac_delim
-STRIP!$STRIP$ac_delim
-CPP!$CPP$ac_delim
-CXX!$CXX$ac_delim
-CXXFLAGS!$CXXFLAGS$ac_delim
-ac_ct_CXX!$ac_ct_CXX$ac_delim
-CXXCPP!$CXXCPP$ac_delim
-F77!$F77$ac_delim
-FFLAGS!$FFLAGS$ac_delim
-ac_ct_F77!$ac_ct_F77$ac_delim
-LIBTOOL!$LIBTOOL$ac_delim
-INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
-INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
-INSTALL_DATA!$INSTALL_DATA$ac_delim
-CYGPATH_W!$CYGPATH_W$ac_delim
-PACKAGE!$PACKAGE$ac_delim
-VERSION!$VERSION$ac_delim
-ACLOCAL!$ACLOCAL$ac_delim
-AUTOCONF!$AUTOCONF$ac_delim
-AUTOMAKE!$AUTOMAKE$ac_delim
-AUTOHEADER!$AUTOHEADER$ac_delim
-MAKEINFO!$MAKEINFO$ac_delim
-install_sh!$install_sh$ac_delim
-INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim
-mkdir_p!$mkdir_p$ac_delim
-AWK!$AWK$ac_delim
-SET_MAKE!$SET_MAKE$ac_delim
-am__leading_dot!$am__leading_dot$ac_delim
-AMTAR!$AMTAR$ac_delim
-am__tar!$am__tar$ac_delim
-am__untar!$am__untar$ac_delim
-DEPDIR!$DEPDIR$ac_delim
-am__include!$am__include$ac_delim
-am__quote!$am__quote$ac_delim
-AMDEP_TRUE!$AMDEP_TRUE$ac_delim
-_ACEOF
-
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
- break
- elif $ac_last_try; then
- { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
- { (exit 1); exit 1; }; }
- else
- ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
- fi
-done
-ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
-if test -n "$ac_eof"; then
- ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
- ac_eof=`expr $ac_eof + 1`
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
fi
-cat >>$CONFIG_STATUS <<_ACEOF
-cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-_ACEOF
-sed '
-s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
-s/^/s,@/; s/!/@,|#_!!_#|/
-:n
-t n
-s/'"$ac_delim"'$/,g/; t
-s/$/\\/; p
-N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
-' >>$CONFIG_STATUS <conf$$subs.sed
-rm -f conf$$subs.sed
-cat >>$CONFIG_STATUS <<_ACEOF
-CEOF$ac_eof
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
_ACEOF
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
- cat >conf$$subs.sed <<_ACEOF
-AMDEP_FALSE!$AMDEP_FALSE$ac_delim
-AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim
-CCDEPMODE!$CCDEPMODE$ac_delim
-am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
-am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
-CXXDEPMODE!$CXXDEPMODE$ac_delim
-am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim
-am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim
-LIB_MAJ!$LIB_MAJ$ac_delim
-OPENPAM_MODULES_DIR!$OPENPAM_MODULES_DIR$ac_delim
-WITH_DOC_TRUE!$WITH_DOC_TRUE$ac_delim
-WITH_DOC_FALSE!$WITH_DOC_FALSE$ac_delim
-WITH_PAM_UNIX_TRUE!$WITH_PAM_UNIX_TRUE$ac_delim
-WITH_PAM_UNIX_FALSE!$WITH_PAM_UNIX_FALSE$ac_delim
-WITH_SU_TRUE!$WITH_SU_TRUE$ac_delim
-WITH_SU_FALSE!$WITH_SU_FALSE$ac_delim
-DL_LIBS!$DL_LIBS$ac_delim
-CRYPT_LIBS!$CRYPT_LIBS$ac_delim
-LIBOBJS!$LIBOBJS$ac_delim
-LTLIBOBJS!$LTLIBOBJS$ac_delim
-_ACEOF
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 20; then
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
break
elif $ac_last_try; then
- { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
else
ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi
done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
-ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
-if test -n "$ac_eof"; then
- ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
- ac_eof=`expr $ac_eof + 1`
-fi
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
-cat >>$CONFIG_STATUS <<_ACEOF
-cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
+_ACAWK
_ACEOF
-sed '
-s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
-s/^/s,@/; s/!/@,|#_!!_#|/
-:n
-t n
-s/'"$ac_delim"'$/,g/; t
-s/$/\\/; p
-N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
-' >>$CONFIG_STATUS <conf$$subs.sed
-rm -f conf$$subs.sed
-cat >>$CONFIG_STATUS <<_ACEOF
-:end
-s/|#_!!_#|//g
-CEOF$ac_eof
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
_ACEOF
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
# trailing colons and then remove the whole line if VPATH becomes empty
# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[ ]*\):*/\1/
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
s/^[^=]*=[ ]*$//
}'
fi
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
fi # test -n "$CONFIG_FILES"
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+ ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+ if test -z "$ac_tt"; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any. Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[ ]*#[ ]*define[ ][ ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ for (key in D) D_is_set[key] = 1
+ FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+ line = \$ 0
+ split(line, arg, " ")
+ if (arg[1] == "#") {
+ defundef = arg[2]
+ mac1 = arg[3]
+ } else {
+ defundef = substr(arg[1], 2)
+ mac1 = arg[2]
+ }
+ split(mac1, mac2, "(") #)
+ macro = mac2[1]
+ prefix = substr(line, 1, index(line, defundef) - 1)
+ if (D_is_set[macro]) {
+ # Preserve the white space surrounding the "#".
+ print prefix "define", macro P[macro] D[macro]
+ next
+ } else {
+ # Replace #undef with comments. This is necessary, for example,
+ # in the case of _POSIX_SOURCE, which is predefined and required
+ # on some systems where configure will not decide to define it.
+ if (defundef == "undef") {
+ print "/*", prefix defundef, macro, "*/"
+ next
+ }
+ }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
-for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
+eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
+shift
+for ac_tag
do
case $ac_tag in
:[FHLC]) ac_mode=$ac_tag; continue;;
esac
case $ac_mode$ac_tag in
:[FHL]*:*);;
- :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
-echo "$as_me: error: Invalid tag $ac_tag." >&2;}
- { (exit 1); exit 1; }; };;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
:[FH]-) ac_tag=-:-;;
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
esac
@@ -20985,7 +13384,7 @@ echo "$as_me: error: Invalid tag $ac_tag." >&2;}
for ac_f
do
case $ac_f in
- -) ac_f="$tmp/stdin";;
+ -) ac_f="$ac_tmp/stdin";;
*) # Look for the file first in the build tree, then in the source tree
# (if the path is not absolute). The absolute path cannot be DOS-style,
# because $ac_f cannot contain `:'.
@@ -20994,26 +13393,34 @@ echo "$as_me: error: Invalid tag $ac_tag." >&2;}
[\\/$]*) false;;
*) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
esac ||
- { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
-echo "$as_me: error: cannot find input file: $ac_f" >&2;}
- { (exit 1); exit 1; }; };;
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
esac
- ac_file_inputs="$ac_file_inputs $ac_f"
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
done
# Let's still pretend it is `configure' which instantiates (i.e., don't
# use $as_me), people would be surprised to read:
# /* config.h. Generated by config.status. */
- configure_input="Generated from "`IFS=:
- echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
if test x"$ac_file" != x-; then
configure_input="$ac_file. $configure_input"
- { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
case $ac_tag in
- *:-:* | *:-) cat >"$tmp/stdin";;
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
esac
;;
esac
@@ -21023,42 +13430,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- { as_dir="$ac_dir"
- case $as_dir in #(
- -*) as_dir=./$as_dir;;
- esac
- test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
- as_dirs=
- while :; do
- case $as_dir in #(
- *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
- *) as_qdir=$as_dir;;
- esac
- as_dirs="'$as_qdir' $as_dirs"
- as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$as_dir" |
+$as_echo X"$ac_file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -21076,20 +13448,15 @@ echo X"$as_dir" |
q
}
s/.*/./; q'`
- test -d "$as_dir" && break
- done
- test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-echo "$as_me: error: cannot create directory $as_dir" >&2;}
- { (exit 1); exit 1; }; }; }
+ as_dir="$ac_dir"; as_fn_mkdir_p
ac_builddir=.
case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
# A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
case $ac_top_builddir_sub in
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -21127,14 +13494,19 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
[\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
*) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# If the template does not know about datarootdir, expand it.
# FIXME: This hack should be removed a few years after 2.60.
ac_datarootdir_hack=; ac_datarootdir_seen=
-
-case `sed -n '/datarootdir/ {
+ac_sed_dataroot='
+/datarootdir/ {
p
q
}
@@ -21142,36 +13514,37 @@ case `sed -n '/datarootdir/ {
/@docdir@/p
/@infodir@/p
/@localedir@/p
-/@mandir@/p
-' $ac_file_inputs` in
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
*datarootdir*) ac_datarootdir_seen=yes;;
*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
- { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_datarootdir_hack='
s&@datadir@&$datadir&g
s&@docdir@&$docdir&g
s&@infodir@&$infodir&g
s&@localedir@&$localedir&g
s&@mandir@&$mandir&g
- s&\\\${datarootdir}&$datarootdir&g' ;;
+ s&\\\${datarootdir}&$datarootdir&g' ;;
esac
_ACEOF
# Neutralize VPATH when `$srcdir' = `.'.
# Shell code in configure.ac might set extrasub.
# FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF
- sed "$ac_vpsub
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
$extrasub
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s&@configure_input@&$configure_input&;t t
+s|@configure_input@|$ac_sed_conf_input|;t t
s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
s&@srcdir@&$ac_srcdir&;t t
s&@abs_srcdir@&$ac_abs_srcdir&;t t
s&@top_srcdir@&$ac_top_srcdir&;t t
@@ -21180,136 +13553,68 @@ s&@builddir@&$ac_builddir&;t t
s&@abs_builddir@&$ac_abs_builddir&;t t
s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
$ac_datarootdir_hack
-" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
- { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
- { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
- { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&5
-echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&2;}
-
- rm -f "$tmp/stdin"
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$ac_tmp/stdin"
case $ac_file in
- -) cat "$tmp/out"; rm -f "$tmp/out";;
- *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
- esac
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
;;
:H)
#
# CONFIG_HEADER
#
-_ACEOF
-
-# Transform confdefs.h into a sed script `conftest.defines', that
-# substitutes the proper values into config.h.in to produce config.h.
-rm -f conftest.defines conftest.tail
-# First, append a space to every undef/define line, to ease matching.
-echo 's/$/ /' >conftest.defines
-# Then, protect against being on the right side of a sed subst, or in
-# an unquoted here document, in config.status. If some macros were
-# called several times there might be several #defines for the same
-# symbol, which is useless. But do not sort them, since the last
-# AC_DEFINE must be honored.
-ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
-# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
-# NAME is the cpp macro being defined, VALUE is the value it is being given.
-# PARAMS is the parameter list in the macro definition--in most cases, it's
-# just an empty string.
-ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
-ac_dB='\\)[ (].*,\\1define\\2'
-ac_dC=' '
-ac_dD=' ,'
-
-uniq confdefs.h |
- sed -n '
- t rset
- :rset
- s/^[ ]*#[ ]*define[ ][ ]*//
- t ok
- d
- :ok
- s/[\\&,]/\\&/g
- s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
- s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
- ' >>conftest.defines
-
-# Remove the space that was appended to ease matching.
-# Then replace #undef with comments. This is necessary, for
-# example, in the case of _POSIX_SOURCE, which is predefined and required
-# on some systems where configure will not decide to define it.
-# (The regexp can be short, since the line contains either #define or #undef.)
-echo 's/ $//
-s,^[ #]*u.*,/* & */,' >>conftest.defines
-
-# Break up conftest.defines:
-ac_max_sed_lines=50
-
-# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
-# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
-# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
-# et cetera.
-ac_in='$ac_file_inputs'
-ac_out='"$tmp/out1"'
-ac_nxt='"$tmp/out2"'
-
-while :
-do
- # Write a here document:
- cat >>$CONFIG_STATUS <<_ACEOF
- # First, check the format of the line:
- cat >"\$tmp/defines.sed" <<\\CEOF
-/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
-/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
-b
-:def
-_ACEOF
- sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
- echo 'CEOF
- sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
- ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
- sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
- grep . conftest.tail >/dev/null || break
- rm -f conftest.defines
- mv conftest.tail conftest.defines
-done
-rm -f conftest.defines conftest.tail
-
-echo "ac_result=$ac_in" >>$CONFIG_STATUS
-cat >>$CONFIG_STATUS <<\_ACEOF
if test x"$ac_file" != x-; then
- echo "/* $configure_input */" >"$tmp/config.h"
- cat "$ac_result" >>"$tmp/config.h"
- if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
- { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
-echo "$as_me: $ac_file is unchanged" >&6;}
+ {
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+ } >"$ac_tmp/config.h" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
else
- rm -f $ac_file
- mv "$tmp/config.h" $ac_file
+ rm -f "$ac_file"
+ mv "$ac_tmp/config.h" "$ac_file" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
fi
else
- echo "/* $configure_input */"
- cat "$ac_result"
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+ || as_fn_error $? "could not create -" "$LINENO" 5
fi
- rm -f "$tmp/out12"
-# Compute $ac_file's index in $config_headers.
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
_am_stamp_count=1
for _am_header in $config_headers :; do
case $_am_header in
- $ac_file | $ac_file:* )
+ $_am_arg | $_am_arg:* )
break ;;
* )
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
esac
done
-echo "timestamp for $ac_file" >`$as_dirname -- $ac_file ||
-$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X$ac_file : 'X\(//\)[^/]' \| \
- X$ac_file : 'X\(//\)$' \| \
- X$ac_file : 'X\(/\)' \| . 2>/dev/null ||
-echo X$ac_file |
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$_am_arg" : 'X\(//\)[^/]' \| \
+ X"$_am_arg" : 'X\(//\)$' \| \
+ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -21329,29 +13634,40 @@ echo X$ac_file |
s/.*/./; q'`/stamp-h$_am_stamp_count
;;
- :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
-echo "$as_me: executing $ac_file commands" >&6;}
+ :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
;;
esac
case $ac_file$ac_mode in
- "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
- # Strip MF so we end up with the name of the file.
- mf=`echo "$mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named `Makefile.in', but
- # some people rename them; so instead we look at the file content.
- # Grep'ing the first line is not enough: some people post-process
- # each Makefile.in and add a new line on top of each file to say so.
- # So let's grep whole file.
- if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
- dirpart=`$as_dirname -- "$mf" ||
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$mf" : 'X\(//\)[^/]' \| \
X"$mf" : 'X\(//\)$' \| \
X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$mf" |
+$as_echo X"$mf" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -21369,68 +13685,33 @@ echo X"$mf" |
q
}
s/.*/./; q'`
- else
- continue
- fi
- # Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running `make'.
- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
- test -z "$DEPDIR" && continue
- am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "am__include" && continue
- am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # When using ansi2knr, U may be empty or an underscore; expand it
- U=`sed -n 's/^U = //p' < "$mf"`
- # Find all dependency output files, they are included files with
- # $(DEPDIR) in their names. We invoke sed twice because it is the
- # simplest approach to changing $(DEPDIR) to its actual value in the
- # expansion.
- for file in `sed -n "
- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
- # Make sure the directory exists.
- test -f "$dirpart/$file" && continue
- fdir=`$as_dirname -- "$file" ||
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`$as_dirname -- "$file" ||
$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$file" : 'X\(//\)[^/]' \| \
X"$file" : 'X\(//\)$' \| \
X"$file" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- { as_dir=$dirpart/$fdir
- case $as_dir in #(
- -*) as_dir=./$as_dir;;
- esac
- test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
- as_dirs=
- while :; do
- case $as_dir in #(
- *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
- *) as_qdir=$as_dir;;
- esac
- as_dirs="'$as_qdir' $as_dirs"
- as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$as_dir" |
+$as_echo X"$file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -21448,27 +13729,656 @@ echo X"$as_dir" |
q
}
s/.*/./; q'`
- test -d "$as_dir" && break
+ as_dir=$dirpart/$fdir; as_fn_mkdir_p
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
done
- test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-echo "$as_me: error: cannot create directory $as_dir" >&2;}
- { (exit 1); exit 1; }; }; }
- # echo "creating $dirpart/$file"
- echo '# dummy' > "$dirpart/$file"
done
-done
+}
+ ;;
+ "libtool":C)
+
+ # See if we are running on zsh, and set the options which allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile="${ofile}T"
+ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+ $RM "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
+# Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is part of GNU Libtool.
+#
+# GNU Libtool 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.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags=""
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# What type of objects to build.
+pic_mode=$pic_mode
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# An echo program that protects backslashes.
+ECHO=$lt_ECHO
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="\$SED -e 1s/^X//"
+
+# A grep program that handles long lines.
+GREP=$lt_GREP
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# A literal string matcher.
+FGREP=$lt_FGREP
+
+# A BSD- or MS-compatible name lister.
+NM=$lt_NM
+
+# Whether we need soft or hard links.
+LN_S=$lt_LN_S
+
+# What is the maximum length of a command?
+max_cmd_len=$max_cmd_len
+
+# Object file suffix (normally "o").
+objext=$ac_objext
+
+# Executable file suffix (normally "").
+exeext=$exeext
+
+# whether the shell understands "unset".
+lt_unset=$lt_unset
+
+# turn spaces into newlines.
+SP2NL=$lt_lt_SP2NL
+
+# turn newlines into spaces.
+NL2SP=$lt_lt_NL2SP
+
+# convert \$build file names to \$host format.
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+
+# convert \$build files to toolchain format.
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+
+# An object symbol dumper.
+OBJDUMP=$lt_OBJDUMP
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method = "file_magic".
+file_magic_cmd=$lt_file_magic_cmd
+
+# How to find potential files when deplibs_check_method = "file_magic".
+file_magic_glob=$lt_file_magic_glob
+
+# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
+want_nocaseglob=$lt_want_nocaseglob
+
+# DLL creation program.
+DLLTOOL=$lt_DLLTOOL
+
+# Command to associate shared and link libraries.
+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
+
+# The archiver.
+AR=$lt_AR
+
+# Flags to create an archive.
+AR_FLAGS=$lt_AR_FLAGS
+
+# How to feed a file listing to the archiver.
+archiver_list_spec=$lt_archiver_list_spec
+
+# A symbol stripping program.
+STRIP=$lt_STRIP
+
+# Commands used to install an old-style archive.
+RANLIB=$lt_RANLIB
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Whether to use a lock for old archive extraction.
+lock_old_archive_extraction=$lock_old_archive_extraction
+
+# A C compiler.
+LTCC=$lt_CC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_CFLAGS
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration.
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair.
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# Transform the output of nm in a C name address pair when lib prefix is needed.
+global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
+
+# Specify filename containing input files for \$NM.
+nm_file_list_spec=$lt_nm_file_list_spec
+
+# The root where to search for dependent libraries,and in which our libraries should be installed.
+lt_sysroot=$lt_sysroot
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=$MAGIC_CMD
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Manifest tool.
+MANIFEST_TOOL=$lt_MANIFEST_TOOL
+
+# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
+DSYMUTIL=$lt_DSYMUTIL
+
+# Tool to change global to local symbols on Mac OS X.
+NMEDIT=$lt_NMEDIT
+
+# Tool to manipulate fat objects and archives on Mac OS X.
+LIPO=$lt_LIPO
+
+# ldd/readelf like tool for Mach-O binaries on Mac OS X.
+OTOOL=$lt_OTOOL
+
+# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
+OTOOL64=$lt_OTOOL64
+
+# Old archive suffix (normally "a").
+libext=$libext
+
+# Shared library suffix (normally ".so").
+shrext_cmds=$lt_shrext_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink=$lt_variables_saved_for_relink
+
+# Do we need the "lib" prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Library versioning type.
+version_type=$version_type
+
+# Shared library runtime path variable.
+runpath_var=$runpath_var
+
+# Shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names. First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Permission mode override for installation of shared libraries.
+install_override_mode=$lt_install_override_mode
+
+# Command to use after installation of a shared archive.
+postinstall_cmds=$lt_postinstall_cmds
+
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=$lt_finish_eval
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Compile-time system search path for libraries.
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds
+
+# A language specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# If ld is used when linking, flag to hardcode \$libdir into a binary
+# during linking. This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds
+
+# Commands necessary for finishing linking programs.
+postlink_cmds=$lt_postlink_cmds
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '$q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ if test x"$xsi_shell" = xyes; then
+ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
+func_dirname ()\
+{\
+\ case ${1} in\
+\ */*) func_dirname_result="${1%/*}${2}" ;;\
+\ * ) func_dirname_result="${3}" ;;\
+\ esac\
+} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_basename ()$/,/^} # func_basename /c\
+func_basename ()\
+{\
+\ func_basename_result="${1##*/}"\
+} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
+func_dirname_and_basename ()\
+{\
+\ case ${1} in\
+\ */*) func_dirname_result="${1%/*}${2}" ;;\
+\ * ) func_dirname_result="${3}" ;;\
+\ esac\
+\ func_basename_result="${1##*/}"\
+} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
+func_stripname ()\
+{\
+\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
+\ # positional parameters, so assign one to ordinary parameter first.\
+\ func_stripname_result=${3}\
+\ func_stripname_result=${func_stripname_result#"${1}"}\
+\ func_stripname_result=${func_stripname_result%"${2}"}\
+} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
+func_split_long_opt ()\
+{\
+\ func_split_long_opt_name=${1%%=*}\
+\ func_split_long_opt_arg=${1#*=}\
+} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
+func_split_short_opt ()\
+{\
+\ func_split_short_opt_arg=${1#??}\
+\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
+} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
+func_lo2o ()\
+{\
+\ case ${1} in\
+\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
+\ *) func_lo2o_result=${1} ;;\
+\ esac\
+} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_xform ()$/,/^} # func_xform /c\
+func_xform ()\
+{\
+ func_xform_result=${1%.*}.lo\
+} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_arith ()$/,/^} # func_arith /c\
+func_arith ()\
+{\
+ func_arith_result=$(( $* ))\
+} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_len ()$/,/^} # func_len /c\
+func_len ()\
+{\
+ func_len_result=${#1}\
+} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+fi
+
+if test x"$lt_shell_append" = xyes; then
+ sed -e '/^func_append ()$/,/^} # func_append /c\
+func_append ()\
+{\
+ eval "${1}+=\\${2}"\
+} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
+func_append_quoted ()\
+{\
+\ func_quote_for_eval "${2}"\
+\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
+} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ # Save a `func_append' function call where possible by direct use of '+='
+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+ test 0 -eq $? || _lt_function_replace_fail=:
+else
+ # Save a `func_append' function call even when '+=' is not available
+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+ test 0 -eq $? || _lt_function_replace_fail=:
+fi
+
+if test x"$_lt_function_replace_fail" = x":"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
+fi
+
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+
;;
esac
done # for ac_tag
-{ (exit 0); exit 0; }
+as_fn_exit 0
_ACEOF
-chmod +x $CONFIG_STATUS
ac_clean_files=$ac_clean_files_save
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
# configure is writing to config.log, and then calls config.status.
# config.status does its own redirection, appending to config.log.
@@ -21488,6 +14398,10 @@ if test "$no_create" != yes; then
exec 5>>config.log
# Use ||, not &&, to avoid exiting from the if with $? = 1, which
# would make configure fail if this is the last instruction.
- $ac_cs_success || { (exit 1); exit 1; }
+ $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
diff --git a/contrib/openpam/configure.ac b/contrib/openpam/configure.ac
index ae87066..a7453b9 100644
--- a/contrib/openpam/configure.ac
+++ b/contrib/openpam/configure.ac
@@ -1,126 +1,127 @@
-dnl $Id: configure.ac 411 2007-12-21 11:44:14Z des $
+dnl $Id: configure.ac 507 2011-12-18 14:43:40Z des $
-AC_PREREQ(2.59)
-AC_REVISION([$Id: configure.ac 411 2007-12-21 11:44:14Z des $])
-AC_INIT([OpenPAM],[20071221],[des@des.no])
-AC_CONFIG_SRCDIR(lib/pam_start.c)
-AM_CONFIG_HEADER(config.h)
+AC_PREREQ([2.62])
+AC_REVISION([$Id: configure.ac 507 2011-12-18 14:43:40Z des $])
+AC_INIT([OpenPAM], [20111218], [des@des.no])
+AC_CONFIG_SRCDIR([lib/pam_start.c])
+AC_CONFIG_MACRO_DIR([m4])
+AM_INIT_AUTOMAKE([foreign])
+AM_CONFIG_HEADER([config.h])
-AC_CANONICAL_SYSTEM
+# C compiler and features
AC_LANG(C)
+AC_PROG_CC
+AC_PROG_CC_STDC
+AC_PROG_CPP
+AC_GNU_SOURCE
+AC_C_CONST
+AC_C_RESTRICT
AC_C_VOLATILE
-AC_DISABLE_STATIC
-AC_PROG_LIBTOOL
-AM_INIT_AUTOMAKE
+
+# libtool
+LT_PREREQ([2.2.6])
+LT_INIT([disable-static dlopen])
+
+# other programs
+AC_PROG_INSTALL
LIB_MAJ=2
AC_SUBST(LIB_MAJ)
AC_DEFINE_UNQUOTED(LIB_MAJ, $LIB_MAJ, [OpenPAM library major number])
-AC_ARG_ENABLE(debug,
- AC_HELP_STRING([--enable-debug],
- [turn debugging on by default]),
- AC_DEFINE(OPENPAM_DEBUG, 1, [Turn debugging on by default]))
-
-AC_MSG_CHECKING([whether loading unversioned modules support is enabled])
-AC_ARG_ENABLE(unversioned-modules,
- AC_HELP_STRING([--disable-unversioned-modules],
- [support loading of unversioned modules]),
- [if test "$enableval" = "no"; then
- AC_DEFINE(DISABLE_UNVERSIONED_MODULES,
- 1,
- [Whether loading unversioned modules support is disabled])
- fi
- AC_MSG_RESULT(no)],
- AC_MSG_RESULT(yes))
-
-AC_MSG_CHECKING([for modules directory support])
-AC_ARG_WITH(modules-dir,
- AC_HELP_STRING([--with-modules-dir=DIR],
- [OpenPAM modules directory]),
- [if test "$withval" != "no"; then
- OPENPAM_MODULES_DIR="$withval"
- AC_DEFINE_UNQUOTED(OPENPAM_MODULES_DIR,
- "$OPENPAM_MODULES_DIR",
- [OpenPAM modules directory])
- AC_MSG_RESULT($OPENPAM_MODULES_DIR)
- else
- OPENPAM_MODULES_DIR="$libdir"
- AC_MSG_RESULT(no)
- fi],
- [OPENPAM_MODULES_DIR="$libdir"
- AC_MSG_RESULT(no)])
+AC_ARG_ENABLE([debug],
+ AC_HELP_STRING([--enable-debug],
+ [turn debugging on by default]),
+ AC_DEFINE(OPENPAM_DEBUG, 1, [Turn debugging on by default]))
+
+AC_ARG_ENABLE([unversioned-modules],
+ AC_HELP_STRING([--disable-unversioned-modules],
+ [support loading of unversioned modules]),
+ [AS_IF([test x"$enableval" = x"no"], [
+ AC_DEFINE(DISABLE_UNVERSIONED_MODULES,
+ 1,
+ [Whether loading unversioned modules support is disabled])
+ ])])
+
+AC_ARG_WITH([modules-dir],
+ AC_HELP_STRING([--with-modules-dir=DIR],
+ [OpenPAM modules directory]),
+ [AS_IF([test x"$withval" != x"no"], [
+ OPENPAM_MODULES_DIR="$withval"
+ ], [
+ OPENPAM_MODULES_DIR="$libdir"
+ ])],
+ [OPENPAM_MODULES_DIR="$libdir"])
+AC_DEFINE_UNQUOTED(OPENPAM_MODULES_DIR,
+ "${OPENPAM_MODULES_DIR%/}/",
+ [OpenPAM modules directory])
AC_SUBST(OPENPAM_MODULES_DIR)
-AC_MSG_CHECKING([whether to build the documentation])
-AC_ARG_WITH(doc,
- AC_HELP_STRING([--with-doc],
- [build documentation]),
- ,
- [with_doc=yes])
-AC_MSG_RESULT($with_doc)
-
-AC_MSG_CHECKING([whether to build example version of pam_unix.so])
-AC_ARG_WITH(pam-unix,
- AC_HELP_STRING([--with-pam-unix],
- [compile example version of pam_unix.so]),
- ,
- [with_pam_unix=no])
-AC_MSG_RESULT($with_pam_unix)
-
-AC_MSG_CHECKING([whether to build example version of su(1)])
-AC_ARG_WITH(su,
- AC_HELP_STRING([--with-su],
- [compile example version of su(1)]),
- ,
- [with_su=no])
-AC_MSG_RESULT($with_su)
+AC_ARG_WITH([doc],
+ AC_HELP_STRING([--without-doc], [do not build documentation]),
+ [],
+ [with_doc=yes])
+AM_CONDITIONAL([WITH_DOC], [test x"$with_doc" = x"yes"])
-AM_CONDITIONAL(WITH_DOC, test "x$with_doc" = "xyes")
-AM_CONDITIONAL(WITH_PAM_UNIX, test "x$with_pam_unix" = "xyes")
-AM_CONDITIONAL(WITH_SU, test "x$with_su" = "xyes")
+AC_ARG_WITH([pam-unix],
+ AC_HELP_STRING([--with-pam-unix], [compile sample pam_unix(8) implementation]),
+ [],
+ [with_pam_unix=no])
+AM_CONDITIONAL([WITH_PAM_UNIX], [test x"$with_pam_unix" = x"yes"])
-AC_PROG_INSTALL
+AC_ARG_WITH(pamtest,
+ AC_HELP_STRING([--with-pamtest], [compile test application]),
+ [],
+ [with_pamtest=no])
+AM_CONDITIONAL([WITH_PAMTEST], [test x"$with_pamtest" = x"yes"])
-AC_CHECK_HEADERS(crypt.h)
+AC_ARG_WITH(su,
+ AC_HELP_STRING([--with-su], [compile sample su(1) implementation]),
+ [],
+ [with_su=no])
+AM_CONDITIONAL([WITH_SU], [test x"$with_su" = x"yes"])
+
+AC_CHECK_HEADERS([crypt.h])
-AC_CHECK_FUNCS(fpurge)
+AC_CHECK_FUNCS([fpurge strlcmp strlcpy])
-DL_LIBS=
-AC_CHECK_LIB(dl, dlopen, DL_LIBS=-ldl)
+saved_LIBS="${LIBS}"
+LIBS=""
+AC_CHECK_LIB([dl], [dlopen])
+DL_LIBS="${LIBS}"
+LIBS="${saved_LIBS}"
AC_SUBST(DL_LIBS)
-CRYPT_LIBS=
-AC_CHECK_LIB(crypt, crypt, CRYPT_LIBS=-lcrypt)
+saved_LIBS="${LIBS}"
+LIBS=""
+AC_CHECK_LIB([crypt], [crypt])
+CRYPT_LIBS="${LIBS}"
+LIBS="${saved_LIBS}"
AC_SUBST(CRYPT_LIBS)
-CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
-
-# This corresponds to FreeBSD's WARNS level 6
-DEVELOPER_CFLAGS="-Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wformat"
-
-AC_ARG_ENABLE(developer-warnings,
- AS_HELP_STRING([--enable-developer-warnings],[enable strict warnings (default is NO)]),
- CFLAGS="${CFLAGS} ${DEVELOPER_CFLAGS}")
-AC_ARG_ENABLE(debugging-symbols,
- AS_HELP_STRING([--enable-debugging-symbols],[enable debugging symbols (default is NO)]),
- CFLAGS="${CFLAGS} -O0 -g -fno-inline")
-AC_ARG_ENABLE(werror,
- AS_HELP_STRING([--enable-werror],[use -Werror (default is NO)]),
- CFLAGS="${CFLAGS} -Werror")
+AC_ARG_ENABLE([developer-warnings],
+ AS_HELP_STRING([--enable-developer-warnings], [enable strict warnings (default is NO)]),
+ [CFLAGS="${CFLAGS} -Wall -Wextra"])
+AC_ARG_ENABLE([debugging-symbols],
+ AS_HELP_STRING([--enable-debugging-symbols], [enable debugging symbols (default is NO)]),
+ [CFLAGS="${CFLAGS} -O0 -g -fno-inline"])
+AC_ARG_ENABLE([werror],
+ AS_HELP_STRING([--enable-werror], [use -Werror (default is NO)]),
+ [CFLAGS="${CFLAGS} -Werror"])
AC_CONFIG_FILES([
- bin/Makefile
- bin/su/Makefile
- include/Makefile
- include/security/Makefile
- lib/Makefile
- modules/Makefile
- modules/pam_unix/Makefile
- modules/pam_deny/Makefile
- modules/pam_permit/Makefile
- doc/Makefile
- doc/man/Makefile
- Makefile
+ bin/Makefile
+ bin/pamtest/Makefile
+ bin/su/Makefile
+ include/Makefile
+ include/security/Makefile
+ lib/Makefile
+ modules/Makefile
+ modules/pam_unix/Makefile
+ modules/pam_deny/Makefile
+ modules/pam_permit/Makefile
+ doc/Makefile
+ doc/man/Makefile
+ Makefile
])
AC_OUTPUT
diff --git a/contrib/openpam/depcomp b/contrib/openpam/depcomp
index 04701da..df8eea7 100755
--- a/contrib/openpam/depcomp
+++ b/contrib/openpam/depcomp
@@ -1,9 +1,10 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
-scriptversion=2005-07-09.11
+scriptversion=2009-04-28.21; # UTC
-# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
+# Software Foundation, Inc.
# 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
@@ -16,9 +17,7 @@ scriptversion=2005-07-09.11
# 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., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -86,12 +85,34 @@ if test "$depmode" = dashXmstdout; then
depmode=dashmstdout
fi
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+ # This is just like msvisualcpp but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u="sed s,\\\\\\\\,/,g"
+ depmode=msvisualcpp
+fi
+
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
- "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am. Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+ for arg
+ do
+ case $arg in
+ -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+ *) set fnord "$@" "$arg" ;;
+ esac
+ shift # fnord
+ shift # $arg
+ done
+ "$@"
stat=$?
if test $stat -eq 0; then :
else
@@ -178,14 +199,14 @@ sgi)
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
-' ' ' >> $depfile
- echo >> $depfile
+' ' ' >> "$depfile"
+ echo >> "$depfile"
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
- >> $depfile
+ >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
@@ -201,34 +222,39 @@ aix)
# current directory. Also, the AIX compiler puts `$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
- stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
- tmpdepfile="$stripped.u"
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$base.u
+ tmpdepfile3=$dir.libs/$base.u
"$@" -Wc,-M
else
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$dir$base.u
+ tmpdepfile3=$dir$base.u
"$@" -M
fi
stat=$?
- if test -f "$tmpdepfile"; then :
- else
- stripped=`echo "$stripped" | sed 's,^.*/,,'`
- tmpdepfile="$stripped.u"
- fi
-
if test $stat -eq 0; then :
else
- rm -f "$tmpdepfile"
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ do
+ test -f "$tmpdepfile" && break
+ done
if test -f "$tmpdepfile"; then
- outname="$stripped.o"
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
- sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
- sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+ sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+ # That's a tab and a space in the [].
+ sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
@@ -276,6 +302,51 @@ icc)
rm -f "$tmpdepfile"
;;
+hp2)
+ # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+ # compilers, which have integrated preprocessors. The correct option
+ # to use with these is +Maked; it writes dependencies to a file named
+ # 'foo.d', which lands next to the object file, wherever that
+ # happens to be.
+ # Much of this is similar to the tru64 case; see comments there.
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+ if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir.libs/$base.d
+ "$@" -Wc,+Maked
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ "$@" +Maked
+ fi
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+ # Add `dependent.h:' lines.
+ sed -ne '2,${
+ s/^ *//
+ s/ \\*$//
+ s/$/:/
+ p
+ }' "$tmpdepfile" >> "$depfile"
+ else
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile" "$tmpdepfile2"
+ ;;
+
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
@@ -288,13 +359,13 @@ tru64)
if test "$libtool" = yes; then
# With Tru64 cc, shared objects can also be used to make a
- # static library. This mecanism is used in libtool 1.4 series to
+ # static library. This mechanism is used in libtool 1.4 series to
# handle both shared and static libraries in a single compilation.
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
#
# With libtool 1.5 this exception was removed, and libtool now
# generates 2 separate objects for the 2 libraries. These two
- # compilations output dependencies in in $dir.libs/$base.o.d and
+ # compilations output dependencies in $dir.libs/$base.o.d and
# in $dir$base.o.d. We have to check for both files, because
# one of the two compilations can be disabled. We should prefer
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
@@ -345,7 +416,7 @@ dashmstdout)
# Remove the call to Libtool.
if test "$libtool" = yes; then
- while test $1 != '--mode=compile'; do
+ while test "X$1" != 'X--mode=compile'; do
shift
done
shift
@@ -396,32 +467,39 @@ makedepend)
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
- while test $1 != '--mode=compile'; do
+ while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
- cleared=no
- for arg in "$@"; do
+ cleared=no eat=no
+ for arg
+ do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
+ if test $eat = yes; then
+ eat=no
+ continue
+ fi
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
+ -arch)
+ eat=yes ;;
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
- obj_suffix="`echo $object | sed 's/^.*\././'`"
+ obj_suffix=`echo "$object" | sed 's/^.*\././'`
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
@@ -441,7 +519,7 @@ cpp)
# Remove the call to Libtool.
if test "$libtool" = yes; then
- while test $1 != '--mode=compile'; do
+ while test "X$1" != 'X--mode=compile'; do
shift
done
shift
@@ -479,13 +557,27 @@ cpp)
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
- # always write the preprocessed file to stdout, regardless of -o,
- # because we must use -o when running libtool.
+ # always write the preprocessed file to stdout.
"$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
IFS=" "
for arg
do
case "$arg" in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
@@ -498,16 +590,23 @@ msvisualcpp)
;;
esac
done
- "$@" -E |
- sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+ "$@" -E 2>/dev/null |
+ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
- . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
- . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
+msvcmsys)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
none)
exec "$@"
;;
@@ -526,5 +625,6 @@ exit 0
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
# End:
diff --git a/contrib/openpam/doc/Makefile.in b/contrib/openpam/doc/Makefile.in
index c89496a..9962a72 100644
--- a/contrib/openpam/doc/Makefile.in
+++ b/contrib/openpam/doc/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -15,15 +16,12 @@
@SET_MAKE@
# $Id: Makefile.am 320 2006-02-16 20:33:19Z des $
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -37,7 +35,6 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-target_triplet = @target@
subdir = doc
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -47,21 +44,51 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
- install-exec-recursive install-info-recursive \
- install-recursive installcheck-recursive installdirs-recursive \
- pdf-recursive ps-recursive uninstall-info-recursive \
- uninstall-recursive
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -74,42 +101,50 @@ CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CRYPT_LIBS = @CRYPT_LIBS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
DL_LIBS = @DL_LIBS@
-ECHO = @ECHO@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
GREP = @GREP@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIB_MAJ = @LIB_MAJ@
+LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPENPAM_MODULES_DIR = @OPENPAM_MODULES_DIR@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
@@ -118,19 +153,13 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
-WITH_DOC_FALSE = @WITH_DOC_FALSE@
-WITH_DOC_TRUE = @WITH_DOC_TRUE@
-WITH_PAM_UNIX_FALSE = @WITH_PAM_UNIX_FALSE@
-WITH_PAM_UNIX_TRUE = @WITH_PAM_UNIX_TRUE@
-WITH_SU_FALSE = @WITH_SU_FALSE@
-WITH_SU_TRUE = @WITH_SU_TRUE@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -142,6 +171,7 @@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
@@ -169,12 +199,12 @@ program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
-target = @target@
target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
SUBDIRS = man
all: all-recursive
@@ -183,14 +213,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign doc/Makefile
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign doc/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -208,6 +238,7 @@ $(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
mostlyclean-libtool:
-rm -f *.lo
@@ -215,10 +246,6 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
@@ -226,7 +253,7 @@ uninstall-info-am:
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
- @failcom='exit 1'; \
+ @fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
@@ -243,16 +270,15 @@ $(RECURSIVE_TARGETS):
else \
local_target="$$target"; \
fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
- @failcom='exit 1'; \
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
@@ -278,16 +304,16 @@ maintainer-clean-recursive:
else \
local_target="$$target"; \
fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@@ -295,14 +321,14 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
+ set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
@@ -314,81 +340,101 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
- tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
+ $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
- list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
- || $(mkdir_p) "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
- distdir=`$(am__cd) $(distdir) && pwd`; \
- top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
- (cd $$subdir && \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$$top_distdir" \
- distdir="$$distdir/$$subdir" \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
@@ -418,6 +464,7 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -428,8 +475,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-recursive
-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
- distclean-tags
+distclean-am: clean-am distclean-generic distclean-tags
dvi: dvi-recursive
@@ -437,18 +483,38 @@ dvi-am:
html: html-recursive
+html-am:
+
info: info-recursive
info-am:
install-data-am:
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
install-exec-am:
+install-html: install-html-recursive
+
+install-html-am:
+
install-info: install-info-recursive
+install-info-am:
+
install-man:
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
installcheck-am:
maintainer-clean: maintainer-clean-recursive
@@ -467,22 +533,25 @@ ps: ps-recursive
ps-am:
-uninstall-am: uninstall-info-am
+uninstall-am:
-uninstall-info: uninstall-info-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+ install-am install-strip tags-recursive
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
- clean clean-generic clean-libtool clean-recursive ctags \
- ctags-recursive distclean distclean-generic distclean-libtool \
- distclean-recursive distclean-tags distdir dvi dvi-am html \
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am check check-am clean clean-generic clean-libtool \
+ ctags ctags-recursive distclean distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
- install-data-am install-exec install-exec-am install-info \
- install-info-am install-man install-strip installcheck \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic maintainer-clean-recursive \
- mostlyclean mostlyclean-generic mostlyclean-libtool \
- mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
- uninstall uninstall-am uninstall-info-am
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/contrib/openpam/doc/man/Makefile.am b/contrib/openpam/doc/man/Makefile.am
index 0a69e7a..3d1b94b 100644
--- a/contrib/openpam/doc/man/Makefile.am
+++ b/contrib/openpam/doc/man/Makefile.am
@@ -1,4 +1,4 @@
-# $Id: Makefile.am 397 2007-10-24 10:01:13Z des $
+# $Id: Makefile.am 455 2011-10-29 18:31:11Z des $
NULL =
@@ -44,6 +44,7 @@ OMAN = \
openpam_readline.3 \
openpam_restore_cred.3 \
openpam_set_option.3 \
+ openpam_subst.3 \
openpam_ttyconv.3 \
pam_error.3 \
pam_get_authtok.3 \
@@ -59,31 +60,25 @@ EXTRA_DIST = openpam.man pam.man
ALLCMAN = $(PMAN) $(MMAN) $(OMAN)
-LINKS = $(ALLCMAN:.3=.c) openpam_configure.c openpam_dispatch.c
-
dist_man3_MANS = $(ALLCMAN) openpam.3 pam.3 pam_conv.3
dist_man5_MANS = pam.conf.5
-CLEANFILES = $(ALLCMAN) $(LINKS) openpam.3 pam.3 symlink-stamp
+CLEANFILES = $(ALLCMAN) openpam.3 pam.3
GENDOC = $(top_srcdir)/misc/gendoc.pl
-SUFFIXES = .3
+SRCDIR = $(top_srcdir)/lib
-$(LINKS): symlink-stamp
+VPATH = $(SRCDIR)
-symlink-stamp: Makefile
- for lnk in $(LINKS); do \
- ln -sf $(top_srcdir)/lib/$$lnk . || exit; \
- done
- touch symlink-stamp
+SUFFIXES = .3
-.c.3: symlink-stamp
+.c.3: $(GENDOC)
perl -w $(GENDOC) $<
openpam.3: $(OMAN) $(GENDOC) openpam.man
- perl -w $(GENDOC) -o $(OMAN) <$(srcdir)/openpam.man
+ perl -w $(GENDOC) -o $(abs_srcdir)/$(OMAN) <$(srcdir)/openpam.man
pam.3: $(PMAN) $(GENDOC) pam.man
- perl -w $(GENDOC) -p $(PMAN) <$(srcdir)/pam.man
+ perl -w $(GENDOC) -p $(abs_srcdir)/$(PMAN) <$(srcdir)/pam.man
diff --git a/contrib/openpam/doc/man/Makefile.in b/contrib/openpam/doc/man/Makefile.in
index ae51f41..91c9feb 100644
--- a/contrib/openpam/doc/man/Makefile.in
+++ b/contrib/openpam/doc/man/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -14,16 +15,12 @@
@SET_MAKE@
-# $Id: Makefile.am 397 2007-10-24 10:01:13Z des $
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
+# $Id: Makefile.am 455 2011-10-29 18:31:11Z des $
pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -37,7 +34,6 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-target_triplet = @target@
subdir = doc/man
DIST_COMMON = $(dist_man3_MANS) $(dist_man5_MANS) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in
@@ -48,17 +44,38 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
man3dir = $(mandir)/man3
am__installdirs = "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man5dir)"
man5dir = $(mandir)/man5
NROFF = nroff
MANS = $(dist_man3_MANS) $(dist_man5_MANS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+VPATH = $(SRCDIR)
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -71,42 +88,50 @@ CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CRYPT_LIBS = @CRYPT_LIBS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
DL_LIBS = @DL_LIBS@
-ECHO = @ECHO@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
GREP = @GREP@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIB_MAJ = @LIB_MAJ@
+LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPENPAM_MODULES_DIR = @OPENPAM_MODULES_DIR@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
@@ -115,19 +140,13 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
-WITH_DOC_FALSE = @WITH_DOC_FALSE@
-WITH_DOC_TRUE = @WITH_DOC_TRUE@
-WITH_PAM_UNIX_FALSE = @WITH_PAM_UNIX_FALSE@
-WITH_PAM_UNIX_TRUE = @WITH_PAM_UNIX_TRUE@
-WITH_SU_FALSE = @WITH_SU_FALSE@
-WITH_SU_TRUE = @WITH_SU_TRUE@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -139,6 +158,7 @@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
@@ -166,12 +186,12 @@ program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
-target = @target@
target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
NULL =
# Standard PAM API
@@ -218,6 +238,7 @@ OMAN = \
openpam_readline.3 \
openpam_restore_cred.3 \
openpam_set_option.3 \
+ openpam_subst.3 \
openpam_ttyconv.3 \
pam_error.3 \
pam_get_authtok.3 \
@@ -231,11 +252,11 @@ OMAN = \
EXTRA_DIST = openpam.man pam.man
ALLCMAN = $(PMAN) $(MMAN) $(OMAN)
-LINKS = $(ALLCMAN:.3=.c) openpam_configure.c openpam_dispatch.c
dist_man3_MANS = $(ALLCMAN) openpam.3 pam.3 pam_conv.3
dist_man5_MANS = pam.conf.5
-CLEANFILES = $(ALLCMAN) $(LINKS) openpam.3 pam.3 symlink-stamp
+CLEANFILES = $(ALLCMAN) openpam.3 pam.3
GENDOC = $(top_srcdir)/misc/gendoc.pl
+SRCDIR = $(top_srcdir)/lib
SUFFIXES = .3
all: all-am
@@ -245,14 +266,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/man/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign doc/man/Makefile
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/man/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign doc/man/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -270,106 +291,81 @@ $(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-install-man3: $(man3_MANS) $(man_MANS)
+install-man3: $(dist_man3_MANS)
@$(NORMAL_INSTALL)
- test -z "$(man3dir)" || $(mkdir_p) "$(DESTDIR)$(man3dir)"
- @list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \
- l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
- for i in $$l2; do \
- case "$$i" in \
- *.3*) list="$$list $$i" ;; \
- esac; \
+ test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)"
+ @list='$(dist_man3_MANS)'; test -n "$(man3dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \
+ fi; \
done; \
- for i in $$list; do \
- if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
- else file=$$i; fi; \
- ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- case "$$ext" in \
- 3*) ;; \
- *) ext='3' ;; \
- esac; \
- inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
- inst=`echo $$inst | sed -e 's/^.*\///'`; \
- inst=`echo $$inst | sed '$(transform)'`.$$ext; \
- echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \
- $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst"; \
- done
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \
+ done; }
+
uninstall-man3:
@$(NORMAL_UNINSTALL)
- @list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \
- l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
- for i in $$l2; do \
- case "$$i" in \
- *.3*) list="$$list $$i" ;; \
- esac; \
- done; \
- for i in $$list; do \
- ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- case "$$ext" in \
- 3*) ;; \
- *) ext='3' ;; \
- esac; \
- inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
- inst=`echo $$inst | sed -e 's/^.*\///'`; \
- inst=`echo $$inst | sed '$(transform)'`.$$ext; \
- echo " rm -f '$(DESTDIR)$(man3dir)/$$inst'"; \
- rm -f "$(DESTDIR)$(man3dir)/$$inst"; \
- done
-install-man5: $(man5_MANS) $(man_MANS)
+ @list='$(dist_man3_MANS)'; test -n "$(man3dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man3dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man3dir)" && rm -f $$files; }
+install-man5: $(dist_man5_MANS)
@$(NORMAL_INSTALL)
- test -z "$(man5dir)" || $(mkdir_p) "$(DESTDIR)$(man5dir)"
- @list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \
- l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
- for i in $$l2; do \
- case "$$i" in \
- *.5*) list="$$list $$i" ;; \
- esac; \
+ test -z "$(man5dir)" || $(MKDIR_P) "$(DESTDIR)$(man5dir)"
+ @list='$(dist_man5_MANS)'; test -n "$(man5dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst" || exit $$?; \
+ fi; \
done; \
- for i in $$list; do \
- if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
- else file=$$i; fi; \
- ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- case "$$ext" in \
- 5*) ;; \
- *) ext='5' ;; \
- esac; \
- inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
- inst=`echo $$inst | sed -e 's/^.*\///'`; \
- inst=`echo $$inst | sed '$(transform)'`.$$ext; \
- echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \
- $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst"; \
- done
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man5dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man5dir)" || exit $$?; }; \
+ done; }
+
uninstall-man5:
@$(NORMAL_UNINSTALL)
- @list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \
- l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
- for i in $$l2; do \
- case "$$i" in \
- *.5*) list="$$list $$i" ;; \
- esac; \
- done; \
- for i in $$list; do \
- ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- case "$$ext" in \
- 5*) ;; \
- *) ext='5' ;; \
- esac; \
- inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
- inst=`echo $$inst | sed -e 's/^.*\///'`; \
- inst=`echo $$inst | sed '$(transform)'`.$$ext; \
- echo " rm -f '$(DESTDIR)$(man5dir)/$$inst'"; \
- rm -f "$(DESTDIR)$(man5dir)/$$inst"; \
- done
+ @list='$(dist_man5_MANS)'; test -n "$(man5dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man5dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man5dir)" && rm -f $$files; }
tags: TAGS
TAGS:
@@ -378,29 +374,45 @@ CTAGS:
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @list='$(MANS)'; if test -n "$$list"; then \
+ list=`for p in $$list; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+ if test -n "$$list" && \
+ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
+ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+ echo " typically \`make maintainer-clean' will remove them" >&2; \
+ exit 1; \
+ else :; fi; \
+ else :; fi
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@@ -409,7 +421,7 @@ check: check-am
all-am: Makefile $(MANS)
installdirs:
for dir in "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man5dir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
@@ -432,6 +444,7 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -442,7 +455,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool
+distclean-am: clean-am distclean-generic
dvi: dvi-am
@@ -450,18 +463,38 @@ dvi-am:
html: html-am
+html-am:
+
info: info-am
info-am:
install-data-am: install-man
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
install-exec-am:
+install-html: install-html-am
+
+install-html-am:
+
install-info: install-info-am
+install-info-am:
+
install-man: install-man3 install-man5
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -480,38 +513,35 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-info-am uninstall-man
+uninstall-am: uninstall-man
uninstall-man: uninstall-man3 uninstall-man5
+.MAKE: install-am install-strip
+
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-exec install-exec-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man install-man3 \
- install-man5 install-strip installcheck installcheck-am \
+ install-man5 install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
- ps ps-am uninstall uninstall-am uninstall-info-am \
- uninstall-man uninstall-man3 uninstall-man5
-
+ ps ps-am uninstall uninstall-am uninstall-man uninstall-man3 \
+ uninstall-man5
-$(LINKS): symlink-stamp
-symlink-stamp: Makefile
- for lnk in $(LINKS); do \
- ln -sf $(top_srcdir)/lib/$$lnk . || exit; \
- done
- touch symlink-stamp
-
-.c.3: symlink-stamp
+.c.3: $(GENDOC)
perl -w $(GENDOC) $<
openpam.3: $(OMAN) $(GENDOC) openpam.man
- perl -w $(GENDOC) -o $(OMAN) <$(srcdir)/openpam.man
+ perl -w $(GENDOC) -o $(abs_srcdir)/$(OMAN) <$(srcdir)/openpam.man
pam.3: $(PMAN) $(GENDOC) pam.man
- perl -w $(GENDOC) -p $(PMAN) <$(srcdir)/pam.man
+ perl -w $(GENDOC) -p $(abs_srcdir)/$(PMAN) <$(srcdir)/pam.man
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/contrib/openpam/doc/man/openpam.3 b/contrib/openpam/doc/man/openpam.3
index eb23a76..c04a2aa 100644
--- a/contrib/openpam/doc/man/openpam.3
+++ b/contrib/openpam/doc/man/openpam.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt OPENPAM 3
.Os
.Sh NAME
@@ -47,6 +47,7 @@
.Nm openpam_readline ,
.Nm openpam_restore_cred ,
.Nm openpam_set_option ,
+.Nm openpam_subst ,
.Nm openpam_ttyconv ,
.Nm pam_error ,
.Nm pam_get_authtok ,
@@ -80,6 +81,8 @@
.Ft "int"
.Fn openpam_set_option "pam_handle_t *pamh" "const char *option" "const char *value"
.Ft "int"
+.Fn openpam_subst "const pam_handle_t *pamh" "char *buf" "size_t *bufsize" "const char *template"
+.Ft "int"
.Fn openpam_ttyconv "int n" "const struct pam_message **msg" "struct pam_response **resp" "void *data"
.Ft "int"
.Fn pam_error "const pam_handle_t *pamh" "const char *fmt" "..."
@@ -120,6 +123,7 @@ standardization.
.Xr openpam_readline 3 ,
.Xr openpam_restore_cred 3 ,
.Xr openpam_set_option 3 ,
+.Xr openpam_subst 3 ,
.Xr openpam_ttyconv 3 ,
.Xr pam_error 3 ,
.Xr pam_get_authtok 3 ,
diff --git a/contrib/openpam/doc/man/openpam_borrow_cred.3 b/contrib/openpam/doc/man/openpam_borrow_cred.3
index 4ae7123..25780db 100644
--- a/contrib/openpam/doc/man/openpam_borrow_cred.3
+++ b/contrib/openpam/doc/man/openpam_borrow_cred.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt OPENPAM_BORROW_CRED 3
.Os
.Sh NAME
@@ -88,7 +88,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/openpam_free_data.3 b/contrib/openpam/doc/man/openpam_free_data.3
index 542a5d2..b32a345 100644
--- a/contrib/openpam/doc/man/openpam_free_data.3
+++ b/contrib/openpam/doc/man/openpam_free_data.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt OPENPAM_FREE_DATA 3
.Os
.Sh NAME
@@ -71,7 +71,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/openpam_free_envlist.3 b/contrib/openpam/doc/man/openpam_free_envlist.3
index 8f02464..0c1976a 100644
--- a/contrib/openpam/doc/man/openpam_free_envlist.3
+++ b/contrib/openpam/doc/man/openpam_free_envlist.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt OPENPAM_FREE_ENVLIST 3
.Os
.Sh NAME
@@ -56,6 +56,7 @@ frees all the environment variables in an environment list, and the
list itself.
It is suitable for freeing the return value from
.Xr pam_getenvlist 3 .
+.Pp
.Sh SEE ALSO
.Xr pam 3 ,
.Xr pam_getenvlist 3
@@ -68,8 +69,5 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
-Security Research Division of Network Associates, Inc.\& under
-DARPA/SPAWAR contract N66001-01-C-8035
-.Pq Dq CBOSS ,
-as part of the DARPA CHATS research program.
+Project by
+.An Dag-Erling Sm\(/orgrav Aq des@FreeBSD.org .
diff --git a/contrib/openpam/doc/man/openpam_get_option.3 b/contrib/openpam/doc/man/openpam_get_option.3
index cb5d5e3..d656612 100644
--- a/contrib/openpam/doc/man/openpam_get_option.3
+++ b/contrib/openpam/doc/man/openpam_get_option.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt OPENPAM_GET_OPTION 3
.Os
.Sh NAME
@@ -74,7 +74,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/openpam_log.3 b/contrib/openpam/doc/man/openpam_log.3
index 208bdf4..adfc006 100644
--- a/contrib/openpam/doc/man/openpam_log.3
+++ b/contrib/openpam/doc/man/openpam_log.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt OPENPAM_LOG 3
.Os
.Sh NAME
@@ -64,7 +64,7 @@ The following levels are defined:
Debugging messages.
These messages are normally not logged unless the global
integer variable
-.Va _openpam_debug
+.Va openpam_debug
is set to a non-zero
value, in which case they are logged with a
.Xr syslog 3
@@ -108,7 +108,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/openpam_nullconv.3 b/contrib/openpam/doc/man/openpam_nullconv.3
index 6e9bb8e..1873cba 100644
--- a/contrib/openpam/doc/man/openpam_nullconv.3
+++ b/contrib/openpam/doc/man/openpam_nullconv.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt OPENPAM_NULLCONV 3
.Os
.Sh NAME
@@ -95,7 +95,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/openpam_readline.3 b/contrib/openpam/doc/man/openpam_readline.3
index 8478920..cf7ab47 100644
--- a/contrib/openpam/doc/man/openpam_readline.3
+++ b/contrib/openpam/doc/man/openpam_readline.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt OPENPAM_READLINE 3
.Os
.Sh NAME
@@ -58,13 +58,19 @@ in a NUL-terminated buffer allocated with
The
.Nm
function performs a certain amount of processing
-on the data it reads.
+on the data it reads:
+.Bl -bullet
+.It
Comments (introduced by a hash sign) are stripped, as is leading and
trailing whitespace.
+.It
Any amount of linear whitespace is collapsed to a single space.
+.It
Blank lines are ignored.
-If a line ends in a backslash, the backslash is stripped and the next
-line is appended.
+.It
+If a line ends in a backslash, the backslash is stripped and the
+next line is appended.
+.El
.Pp
If
.Fa lineno
@@ -102,7 +108,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/openpam_restore_cred.3 b/contrib/openpam/doc/man/openpam_restore_cred.3
index f1da98a..12ff8b8 100644
--- a/contrib/openpam/doc/man/openpam_restore_cred.3
+++ b/contrib/openpam/doc/man/openpam_restore_cred.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt OPENPAM_RESTORE_CRED 3
.Os
.Sh NAME
@@ -80,7 +80,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/openpam_set_option.3 b/contrib/openpam/doc/man/openpam_set_option.3
index e262584..f186c00 100644
--- a/contrib/openpam/doc/man/openpam_set_option.3
+++ b/contrib/openpam/doc/man/openpam_set_option.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt OPENPAM_SET_OPTION 3
.Os
.Sh NAME
@@ -77,7 +77,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/openpam_subst.3 b/contrib/openpam/doc/man/openpam_subst.3
new file mode 100644
index 0000000..565b3e0
--- /dev/null
+++ b/contrib/openpam/doc/man/openpam_subst.3
@@ -0,0 +1,142 @@
+.\"-
+.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
+.\" All rights reserved.
+.\"
+.\" This software was developed for the FreeBSD Project by ThinkSec AS and
+.\" Network Associates Laboratories, the Security Research Division of
+.\" Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035
+.\" ("CBOSS"), as part of the DARPA CHATS research program.
+.\"
+.\" 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. The name of the author may not be used to endorse or promote
+.\" products derived from this software without specific prior written
+.\" permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+.\"
+.\" $Id$
+.\"
+.Dd December 18, 2011
+.Dt OPENPAM_SUBST 3
+.Os
+.Sh NAME
+.Nm openpam_subst
+.Nd substitute PAM item values in a string
+.Sh LIBRARY
+.Lb libpam
+.Sh SYNOPSIS
+.In sys/types.h
+.In security/pam_appl.h
+.In security/openpam.h
+.Ft "int"
+.Fn openpam_subst "const pam_handle_t *pamh" "char *buf" "size_t *bufsize" "const char *template"
+.Sh DESCRIPTION
+The
+.Nm
+function expands a string, substituting PAM item
+values for all occurrences of specific substitution codes.
+The
+.Fa template
+argument points to the initial string.
+The result is stored in the buffer pointed to by the
+.Fa buf
+argument; the
+.Fa bufsize
+argument specifies the size of that buffer.
+The actual size of the resulting string, including the terminating NUL
+character, is stored in the location pointed to by the
+.Fa bufsize
+argument.
+.Pp
+If
+.Fa buf
+is NULL, or if the buffer is too small to hold the expanded
+string,
+.Fa bufsize
+is updated to reflect the amount of space required to
+hold the entire string, and
+.Nm
+returns
+.Dv PAM_TRY_AGAIN .
+.Pp
+If
+.Nm
+fails for any other reason, the
+.Fa bufsize
+argument is
+untouched, but part of the buffer may still have been overwritten.
+.Pp
+Substitution codes are introduced by a percent character and correspond
+to PAM items:
+.Bl -tag -width 18n
+.It \&%H
+Replaced by the current value of the
+.Dv PAM_RHOST
+item.
+.It \&%h
+Replaced by the current value of the
+.Dv PAM_HOST
+item.
+.It \&%s
+Replaced by the current value of the
+.Dv PAM_SERVICE
+item.
+.It \&%t
+Replaced by the current value of the
+.Dv PAM_TTY
+item.
+.It \&%U
+Replaced by the current value of the
+.Dv PAM_RUSER
+item.
+.It \&%u
+Replaced by the current value of the
+.Dv PAM_USER
+item.
+.El
+.Pp
+.Sh RETURN VALUES
+The
+.Nm
+function returns one of the following values:
+.Bl -tag -width 18n
+.It Bq Er PAM_SYSTEM_ERR
+System error.
+.It Bq Er PAM_TRY_AGAIN
+Try again.
+.El
+.Sh SEE ALSO
+.Xr pam 3 ,
+.Xr pam_get_authtok 3 ,
+.Xr pam_get_item 3 ,
+.Xr pam_get_user 3 ,
+.Xr pam_strerror 3
+.Sh STANDARDS
+The
+.Nm
+function is an OpenPAM extension.
+.Sh AUTHORS
+The
+.Nm
+function and this manual page were developed for the
+.Fx
+Project by
+.An Dag-Erling Sm\(/orgrav Aq des@FreeBSD.org .
diff --git a/contrib/openpam/doc/man/openpam_ttyconv.3 b/contrib/openpam/doc/man/openpam_ttyconv.3
index 7374a94..b2cd9d9 100644
--- a/contrib/openpam/doc/man/openpam_ttyconv.3
+++ b/contrib/openpam/doc/man/openpam_ttyconv.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt OPENPAM_TTYCONV 3
.Os
.Sh NAME
@@ -90,7 +90,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/pam.3 b/contrib/openpam/doc/man/pam.3
index 5740a4d..11befcd 100644
--- a/contrib/openpam/doc/man/pam.3
+++ b/contrib/openpam/doc/man/pam.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt PAM 3
.Os
.Sh NAME
diff --git a/contrib/openpam/doc/man/pam.conf.5 b/contrib/openpam/doc/man/pam.conf.5
index d94163d..3669f92 100644
--- a/contrib/openpam/doc/man/pam.conf.5
+++ b/contrib/openpam/doc/man/pam.conf.5
@@ -1,5 +1,5 @@
.\"-
-.\" Copyright (c) 2005 Dag-Erling Coïdan Smørgrav
+.\" Copyright (c) 2005-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -26,9 +26,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $Id: pam.conf.5 320 2006-02-16 20:33:19Z des $
+.\" $Id: pam.conf.5 485 2011-11-03 16:57:37Z des $
.\"
-.Dd June 16, 2005
+.Dd November 3, 2011
.Dt PAM.CONF 5
.Os
.Sh NAME
@@ -56,8 +56,8 @@ policy is used instead, if it exists.
Entries in per-service policy files must be of one of the two forms
below:
.Bd -unfilled -offset indent
-.Ar function-class control-flag module-path Op Ar arguments ...
-.Ar function-class Cm include Ar other-service-name
+.Ar facility control-flag module-path Op Ar arguments ...
+.Ar facility Cm include Ar other-service-name
.Ed
.Pp
Entries in
@@ -71,9 +71,8 @@ to the right of a
sign.
.Pp
The
-.Ar function-class
-field specifies the class of functions the entry applies to, and is
-one of:
+.Ar facility
+field specifies the facility the entry applies to, and is one of:
.Bl -tag -width ".Cm password"
.It Cm auth
Authentication functions
@@ -147,6 +146,11 @@ to call.
.Pp
The remaining fields are passed as arguments to the module if and when
it is invoked.
+As a special case, if an argument is of the form ``name=value'' and
+the right-hand side is surrounded by single or double quotes, any
+whitespace between the quote characters will be considered part of the
+same argument rather than a separator between this argument and the
+next.
.Pp
The
.Cm include
@@ -167,10 +171,9 @@ modify each and every service-specific policy.
.Sh AUTHORS
The OpenPAM library was developed for the
.Fx
-Project by ThinkSec
-AS and Network Associates Laboratories, the Security Research Division
-of Network Associates, Inc.\& under DARPA/SPAWAR contract
-N66001-01-C-8035
+Project by ThinkSec AS and Network Associates Laboratories, the
+Security Research Division of Network Associates, Inc.\& under
+DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
as part of the DARPA CHATS research program.
.Pp
diff --git a/contrib/openpam/doc/man/pam_acct_mgmt.3 b/contrib/openpam/doc/man/pam_acct_mgmt.3
index 9fee0d3..9410048 100644
--- a/contrib/openpam/doc/man/pam_acct_mgmt.3
+++ b/contrib/openpam/doc/man/pam_acct_mgmt.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt PAM_ACCT_MGMT 3
.Os
.Sh NAME
@@ -107,7 +107,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/pam_authenticate.3 b/contrib/openpam/doc/man/pam_authenticate.3
index 4cb1ec3..8263280 100644
--- a/contrib/openpam/doc/man/pam_authenticate.3
+++ b/contrib/openpam/doc/man/pam_authenticate.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt PAM_AUTHENTICATE 3
.Os
.Sh NAME
@@ -121,7 +121,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/pam_chauthtok.3 b/contrib/openpam/doc/man/pam_chauthtok.3
index 570dbc2..5823866 100644
--- a/contrib/openpam/doc/man/pam_chauthtok.3
+++ b/contrib/openpam/doc/man/pam_chauthtok.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt PAM_CHAUTHTOK 3
.Os
.Sh NAME
@@ -113,7 +113,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/pam_close_session.3 b/contrib/openpam/doc/man/pam_close_session.3
index d6e3bc3..43e4b03 100644
--- a/contrib/openpam/doc/man/pam_close_session.3
+++ b/contrib/openpam/doc/man/pam_close_session.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt PAM_CLOSE_SESSION 3
.Os
.Sh NAME
@@ -103,7 +103,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/pam_conv.3 b/contrib/openpam/doc/man/pam_conv.3
index b74e8f4..6b6e697 100644
--- a/contrib/openpam/doc/man/pam_conv.3
+++ b/contrib/openpam/doc/man/pam_conv.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2002-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,7 +32,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $Id: pam_conv.3 408 2007-12-21 11:36:24Z des $
+.\" $Id: pam_conv.3 437 2011-09-13 12:00:13Z des $
.\"
.Dd June 16, 2005
.Dt PAM_CONV 3
diff --git a/contrib/openpam/doc/man/pam_end.3 b/contrib/openpam/doc/man/pam_end.3
index bb130930..66e2871 100644
--- a/contrib/openpam/doc/man/pam_end.3
+++ b/contrib/openpam/doc/man/pam_end.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt PAM_END 3
.Os
.Sh NAME
@@ -80,7 +80,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/pam_error.3 b/contrib/openpam/doc/man/pam_error.3
index 2863a1e..c957409 100644
--- a/contrib/openpam/doc/man/pam_error.3
+++ b/contrib/openpam/doc/man/pam_error.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt PAM_ERROR 3
.Os
.Sh NAME
@@ -80,7 +80,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/pam_get_authtok.3 b/contrib/openpam/doc/man/pam_get_authtok.3
index d2cda79..7f0c804 100644
--- a/contrib/openpam/doc/man/pam_get_authtok.3
+++ b/contrib/openpam/doc/man/pam_get_authtok.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt PAM_GET_AUTHTOK 3
.Os
.Sh NAME
@@ -83,6 +83,25 @@ as appropriate, will be used.
If that item is also
.Dv NULL ,
a hardcoded default prompt will be used.
+Either way, the prompt is expanded using
+.Xr openpam_subst 3
+before it is
+passed to the conversation function.
+.Pp
+If
+.Nm
+is called from a module and the
+.Dv authtok_prompt
+/
+.Dv oldauthtok_prompt
+option is set in the policy file, the value of that
+option takes precedence over both the
+.Fa prompt
+argument and the
+.Dv PAM_AUTHTOK_PROMPT
+/
+.Dv PAM_OLDAUTHTOK_PROMPT
+item.
.Pp
If
.Fa item
@@ -114,6 +133,7 @@ System error.
Try again.
.El
.Sh SEE ALSO
+.Xr openpam_subst 3 ,
.Xr pam 3 ,
.Xr pam_get_item 3 ,
.Xr pam_get_user 3 ,
@@ -127,7 +147,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/pam_get_data.3 b/contrib/openpam/doc/man/pam_get_data.3
index 6ae03cf..49fae05 100644
--- a/contrib/openpam/doc/man/pam_get_data.3
+++ b/contrib/openpam/doc/man/pam_get_data.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt PAM_GET_DATA 3
.Os
.Sh NAME
@@ -60,6 +60,11 @@ argument.
A pointer to the object is stored in the location pointed to by the
.Fa data
argument.
+If
+.Nm
+fails, the
+.Fa data
+argument is untouched.
.Pp
This function and its counterpart
.Xr pam_set_data 3
@@ -89,7 +94,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/pam_get_item.3 b/contrib/openpam/doc/man/pam_get_item.3
index 01c4243..1244a77 100644
--- a/contrib/openpam/doc/man/pam_get_item.3
+++ b/contrib/openpam/doc/man/pam_get_item.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt PAM_GET_ITEM 3
.Os
.Sh NAME
@@ -53,12 +53,18 @@ The
function stores a pointer to the item specified by
the
.Fa item_type
-argument in the location specified by the
+argument in the location pointed to by the
.Fa item
argument.
The item is retrieved from the PAM context specified by the
.Fa pamh
argument.
+If
+.Nm
+fails, the
+.Fa item
+argument is untouched.
+.Pp
The following item types are recognized:
.Bl -tag -width 18n
.It Dv PAM_SERVICE
@@ -90,6 +96,8 @@ authentication token.
.It Dv PAM_OLDAUTHTOK_PROMPT
The prompt to use when asking the applicant for an
expired authentication token prior to changing it.
+.It Dv PAM_HOST
+The name of the host the application runs on.
.El
.Pp
See
@@ -122,7 +130,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/pam_get_user.3 b/contrib/openpam/doc/man/pam_get_user.3
index 74b7130..8f3b426 100644
--- a/contrib/openpam/doc/man/pam_get_user.3
+++ b/contrib/openpam/doc/man/pam_get_user.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt PAM_GET_USER 3
.Os
.Sh NAME
@@ -70,10 +70,26 @@ If it is
.Dv NULL ,
the
.Dv PAM_USER_PROMPT
-will be used.
+item will be used.
If that item is also
.Dv NULL ,
a hardcoded default prompt will be used.
+Either way, the prompt is expanded using
+.Xr openpam_subst 3
+before it is
+passed to the conversation function.
+.Pp
+If
+.Nm
+is called from a module and the
+.Dv user_prompt
+option is
+set in the policy file, the value of that option takes precedence over
+both the
+.Fa prompt
+argument and the
+.Dv PAM_USER_PROMPT
+item.
.Pp
.Sh RETURN VALUES
The
@@ -88,6 +104,7 @@ Conversation failure.
System error.
.El
.Sh SEE ALSO
+.Xr openpam_subst 3 ,
.Xr pam 3 ,
.Xr pam_get_authtok 3 ,
.Xr pam_get_item 3 ,
@@ -104,7 +121,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/pam_getenv.3 b/contrib/openpam/doc/man/pam_getenv.3
index bacaf13..ebd2992 100644
--- a/contrib/openpam/doc/man/pam_getenv.3
+++ b/contrib/openpam/doc/man/pam_getenv.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt PAM_GETENV 3
.Os
.Sh NAME
@@ -78,7 +78,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/pam_getenvlist.3 b/contrib/openpam/doc/man/pam_getenvlist.3
index bafd482..a034c8e 100644
--- a/contrib/openpam/doc/man/pam_getenvlist.3
+++ b/contrib/openpam/doc/man/pam_getenvlist.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt PAM_GETENVLIST 3
.Os
.Sh NAME
@@ -99,7 +99,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/pam_info.3 b/contrib/openpam/doc/man/pam_info.3
index dc1fcc9..08bf200 100644
--- a/contrib/openpam/doc/man/pam_info.3
+++ b/contrib/openpam/doc/man/pam_info.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt PAM_INFO 3
.Os
.Sh NAME
@@ -80,7 +80,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/pam_open_session.3 b/contrib/openpam/doc/man/pam_open_session.3
index 1bc4de4..13811c7 100644
--- a/contrib/openpam/doc/man/pam_open_session.3
+++ b/contrib/openpam/doc/man/pam_open_session.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt PAM_OPEN_SESSION 3
.Os
.Sh NAME
@@ -104,7 +104,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/pam_prompt.3 b/contrib/openpam/doc/man/pam_prompt.3
index 8712647..20574f2 100644
--- a/contrib/openpam/doc/man/pam_prompt.3
+++ b/contrib/openpam/doc/man/pam_prompt.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt PAM_PROMPT 3
.Os
.Sh NAME
@@ -92,7 +92,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/pam_putenv.3 b/contrib/openpam/doc/man/pam_putenv.3
index 0db2828..e69816a 100644
--- a/contrib/openpam/doc/man/pam_putenv.3
+++ b/contrib/openpam/doc/man/pam_putenv.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt PAM_PUTENV 3
.Os
.Sh NAME
@@ -83,7 +83,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/pam_set_data.3 b/contrib/openpam/doc/man/pam_set_data.3
index d8c2c61..ce4d63d0 100644
--- a/contrib/openpam/doc/man/pam_set_data.3
+++ b/contrib/openpam/doc/man/pam_set_data.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt PAM_SET_DATA 3
.Os
.Sh NAME
@@ -93,7 +93,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/pam_set_item.3 b/contrib/openpam/doc/man/pam_set_item.3
index f4662d0..9f4e78d 100644
--- a/contrib/openpam/doc/man/pam_set_item.3
+++ b/contrib/openpam/doc/man/pam_set_item.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt PAM_SET_ITEM 3
.Os
.Sh NAME
@@ -87,7 +87,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/pam_setcred.3 b/contrib/openpam/doc/man/pam_setcred.3
index 4df9b30..1e0a246 100644
--- a/contrib/openpam/doc/man/pam_setcred.3
+++ b/contrib/openpam/doc/man/pam_setcred.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt PAM_SETCRED 3
.Os
.Sh NAME
@@ -116,7 +116,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/pam_setenv.3 b/contrib/openpam/doc/man/pam_setenv.3
index 681ea03..43906ef 100644
--- a/contrib/openpam/doc/man/pam_setenv.3
+++ b/contrib/openpam/doc/man/pam_setenv.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt PAM_SETENV 3
.Os
.Sh NAME
@@ -82,7 +82,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/pam_sm_acct_mgmt.3 b/contrib/openpam/doc/man/pam_sm_acct_mgmt.3
index b4aa0d9..22e1980 100644
--- a/contrib/openpam/doc/man/pam_sm_acct_mgmt.3
+++ b/contrib/openpam/doc/man/pam_sm_acct_mgmt.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt PAM_SM_ACCT_MGMT 3
.Os
.Sh NAME
@@ -97,7 +97,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/pam_sm_authenticate.3 b/contrib/openpam/doc/man/pam_sm_authenticate.3
index 0dbb646..e41a70a 100644
--- a/contrib/openpam/doc/man/pam_sm_authenticate.3
+++ b/contrib/openpam/doc/man/pam_sm_authenticate.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt PAM_SM_AUTHENTICATE 3
.Os
.Sh NAME
@@ -99,7 +99,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/pam_sm_chauthtok.3 b/contrib/openpam/doc/man/pam_sm_chauthtok.3
index b348cf2..bc3f461 100644
--- a/contrib/openpam/doc/man/pam_sm_chauthtok.3
+++ b/contrib/openpam/doc/man/pam_sm_chauthtok.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt PAM_SM_CHAUTHTOK 3
.Os
.Sh NAME
@@ -55,6 +55,16 @@ function is the service module's implementation
of the
.Xr pam_chauthtok 3
API function.
+.Pp
+When the application calls
+.Xr pam_chauthtok 3 ,
+the service function is
+called twice, first with the
+.Dv PAM_PRELIM_CHECK
+flag set and then again
+with the
+.Dv PAM_UPDATE_AUTHTOK
+flag set.
.Sh RETURN VALUES
The
.Nm
@@ -99,7 +109,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/pam_sm_close_session.3 b/contrib/openpam/doc/man/pam_sm_close_session.3
index 927d48a..3b1f57e 100644
--- a/contrib/openpam/doc/man/pam_sm_close_session.3
+++ b/contrib/openpam/doc/man/pam_sm_close_session.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt PAM_SM_CLOSE_SESSION 3
.Os
.Sh NAME
@@ -91,7 +91,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/pam_sm_open_session.3 b/contrib/openpam/doc/man/pam_sm_open_session.3
index bc47b30..cdfe4d4 100644
--- a/contrib/openpam/doc/man/pam_sm_open_session.3
+++ b/contrib/openpam/doc/man/pam_sm_open_session.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt PAM_SM_OPEN_SESSION 3
.Os
.Sh NAME
@@ -91,7 +91,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/pam_sm_setcred.3 b/contrib/openpam/doc/man/pam_sm_setcred.3
index 6f37589..6d5c52f 100644
--- a/contrib/openpam/doc/man/pam_sm_setcred.3
+++ b/contrib/openpam/doc/man/pam_sm_setcred.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt PAM_SM_SETCRED 3
.Os
.Sh NAME
@@ -97,7 +97,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/pam_start.3 b/contrib/openpam/doc/man/pam_start.3
index b020456..eaa9f05 100644
--- a/contrib/openpam/doc/man/pam_start.3
+++ b/contrib/openpam/doc/man/pam_start.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt PAM_START 3
.Os
.Sh NAME
@@ -102,7 +102,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/pam_strerror.3 b/contrib/openpam/doc/man/pam_strerror.3
index b626eac..9003102 100644
--- a/contrib/openpam/doc/man/pam_strerror.3
+++ b/contrib/openpam/doc/man/pam_strerror.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt PAM_STRERROR 3
.Os
.Sh NAME
@@ -53,9 +53,15 @@ The
function returns a pointer to a string containing a
textual description of the error indicated by the
.Fa error_number
-argument, in the context of the PAM transaction described by the
-.Fa pamh
argument.
+The
+.Fa pamh
+argument is ignored.
+For compatibility with other implementations, it should be either a
+valid PAM handle returned by a previous call to
+.Xr pam_start 3 ,
+or
+.Dv NULL .
.Sh RETURN VALUES
The
.Nm
@@ -63,7 +69,8 @@ function returns
.Dv NULL
on failure.
.Sh SEE ALSO
-.Xr pam 3
+.Xr pam 3 ,
+.Xr pam_start 3
.Sh STANDARDS
.Rs
.%T "X/Open Single Sign-On Service (XSSO) - Pluggable Authentication Modules"
@@ -74,7 +81,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/pam_verror.3 b/contrib/openpam/doc/man/pam_verror.3
index 1a03438..4987da3 100644
--- a/contrib/openpam/doc/man/pam_verror.3
+++ b/contrib/openpam/doc/man/pam_verror.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt PAM_VERROR 3
.Os
.Sh NAME
@@ -84,7 +84,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/pam_vinfo.3 b/contrib/openpam/doc/man/pam_vinfo.3
index a28965d..c2ac5b0 100644
--- a/contrib/openpam/doc/man/pam_vinfo.3
+++ b/contrib/openpam/doc/man/pam_vinfo.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt PAM_VINFO 3
.Os
.Sh NAME
@@ -84,7 +84,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/doc/man/pam_vprompt.3 b/contrib/openpam/doc/man/pam_vprompt.3
index 72bca70..381008d 100644
--- a/contrib/openpam/doc/man/pam_vprompt.3
+++ b/contrib/openpam/doc/man/pam_vprompt.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $P4$
+.\" $Id$
.\"
-.Dd December 21, 2007
+.Dd December 18, 2011
.Dt PAM_VPROMPT 3
.Os
.Sh NAME
@@ -121,7 +121,8 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
+Project by
+ThinkSec AS and Network Associates Laboratories, the
Security Research Division of Network Associates, Inc.\& under
DARPA/SPAWAR contract N66001-01-C-8035
.Pq Dq CBOSS ,
diff --git a/contrib/openpam/include/Makefile.in b/contrib/openpam/include/Makefile.in
index f2b093a..3a348e2 100644
--- a/contrib/openpam/include/Makefile.in
+++ b/contrib/openpam/include/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -15,15 +16,12 @@
@SET_MAKE@
# $Id: Makefile.am 320 2006-02-16 20:33:19Z des $
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -37,7 +35,6 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-target_triplet = @target@
subdir = include
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -47,21 +44,51 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
- install-exec-recursive install-info-recursive \
- install-recursive installcheck-recursive installdirs-recursive \
- pdf-recursive ps-recursive uninstall-info-recursive \
- uninstall-recursive
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -74,42 +101,50 @@ CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CRYPT_LIBS = @CRYPT_LIBS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
DL_LIBS = @DL_LIBS@
-ECHO = @ECHO@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
GREP = @GREP@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIB_MAJ = @LIB_MAJ@
+LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPENPAM_MODULES_DIR = @OPENPAM_MODULES_DIR@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
@@ -118,19 +153,13 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
-WITH_DOC_FALSE = @WITH_DOC_FALSE@
-WITH_DOC_TRUE = @WITH_DOC_TRUE@
-WITH_PAM_UNIX_FALSE = @WITH_PAM_UNIX_FALSE@
-WITH_PAM_UNIX_TRUE = @WITH_PAM_UNIX_TRUE@
-WITH_SU_FALSE = @WITH_SU_FALSE@
-WITH_SU_TRUE = @WITH_SU_TRUE@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -142,6 +171,7 @@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
@@ -169,12 +199,12 @@ program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
-target = @target@
target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
SUBDIRS = security
all: all-recursive
@@ -183,14 +213,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign include/Makefile
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign include/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -208,6 +238,7 @@ $(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
mostlyclean-libtool:
-rm -f *.lo
@@ -215,10 +246,6 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
@@ -226,7 +253,7 @@ uninstall-info-am:
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
- @failcom='exit 1'; \
+ @fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
@@ -243,16 +270,15 @@ $(RECURSIVE_TARGETS):
else \
local_target="$$target"; \
fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
- @failcom='exit 1'; \
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
@@ -278,16 +304,16 @@ maintainer-clean-recursive:
else \
local_target="$$target"; \
fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@@ -295,14 +321,14 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
+ set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
@@ -314,81 +340,101 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
- tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
+ $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
- list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
- || $(mkdir_p) "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
- distdir=`$(am__cd) $(distdir) && pwd`; \
- top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
- (cd $$subdir && \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$$top_distdir" \
- distdir="$$distdir/$$subdir" \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
@@ -418,6 +464,7 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -428,8 +475,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-recursive
-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
- distclean-tags
+distclean-am: clean-am distclean-generic distclean-tags
dvi: dvi-recursive
@@ -437,18 +483,38 @@ dvi-am:
html: html-recursive
+html-am:
+
info: info-recursive
info-am:
install-data-am:
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
install-exec-am:
+install-html: install-html-recursive
+
+install-html-am:
+
install-info: install-info-recursive
+install-info-am:
+
install-man:
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
installcheck-am:
maintainer-clean: maintainer-clean-recursive
@@ -467,22 +533,25 @@ ps: ps-recursive
ps-am:
-uninstall-am: uninstall-info-am
+uninstall-am:
-uninstall-info: uninstall-info-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+ install-am install-strip tags-recursive
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
- clean clean-generic clean-libtool clean-recursive ctags \
- ctags-recursive distclean distclean-generic distclean-libtool \
- distclean-recursive distclean-tags distdir dvi dvi-am html \
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am check check-am clean clean-generic clean-libtool \
+ ctags ctags-recursive distclean distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
- install-data-am install-exec install-exec-am install-info \
- install-info-am install-man install-strip installcheck \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic maintainer-clean-recursive \
- mostlyclean mostlyclean-generic mostlyclean-libtool \
- mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
- uninstall uninstall-am uninstall-info-am
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/contrib/openpam/include/security/Makefile.in b/contrib/openpam/include/security/Makefile.in
index e6af56a..928fb64 100644
--- a/contrib/openpam/include/security/Makefile.in
+++ b/contrib/openpam/include/security/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -16,15 +17,12 @@
# $Id: Makefile.am 405 2007-12-19 11:38:27Z des $
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -38,7 +36,6 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-target_triplet = @target@
subdir = include/security
DIST_COMMON = $(openpam_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
@@ -49,6 +46,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -56,16 +54,28 @@ am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__installdirs = "$(DESTDIR)$(openpamdir)"
-openpamHEADERS_INSTALL = $(INSTALL_HEADER)
HEADERS = $(openpam_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -78,42 +88,50 @@ CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CRYPT_LIBS = @CRYPT_LIBS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
DL_LIBS = @DL_LIBS@
-ECHO = @ECHO@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
GREP = @GREP@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIB_MAJ = @LIB_MAJ@
+LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPENPAM_MODULES_DIR = @OPENPAM_MODULES_DIR@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
@@ -122,19 +140,13 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
-WITH_DOC_FALSE = @WITH_DOC_FALSE@
-WITH_DOC_TRUE = @WITH_DOC_TRUE@
-WITH_PAM_UNIX_FALSE = @WITH_PAM_UNIX_FALSE@
-WITH_PAM_UNIX_TRUE = @WITH_PAM_UNIX_TRUE@
-WITH_SU_FALSE = @WITH_SU_FALSE@
-WITH_SU_TRUE = @WITH_SU_TRUE@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -146,6 +158,7 @@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
@@ -173,12 +186,12 @@ program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
-target = @target@
target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
openpamdir = $(includedir)/security
openpam_HEADERS = \
openpam.h \
@@ -196,14 +209,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/security/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign include/security/Makefile
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/security/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign include/security/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -221,106 +234,113 @@ $(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
install-openpamHEADERS: $(openpam_HEADERS)
@$(NORMAL_INSTALL)
- test -z "$(openpamdir)" || $(mkdir_p) "$(DESTDIR)$(openpamdir)"
- @list='$(openpam_HEADERS)'; for p in $$list; do \
+ test -z "$(openpamdir)" || $(MKDIR_P) "$(DESTDIR)$(openpamdir)"
+ @list='$(openpam_HEADERS)'; test -n "$(openpamdir)" || list=; \
+ for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- f=$(am__strip_dir) \
- echo " $(openpamHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(openpamdir)/$$f'"; \
- $(openpamHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(openpamdir)/$$f"; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(openpamdir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(openpamdir)" || exit $$?; \
done
uninstall-openpamHEADERS:
@$(NORMAL_UNINSTALL)
- @list='$(openpam_HEADERS)'; for p in $$list; do \
- f=$(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(openpamdir)/$$f'"; \
- rm -f "$(DESTDIR)$(openpamdir)/$$f"; \
- done
+ @list='$(openpam_HEADERS)'; test -n "$(openpamdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(openpamdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(openpamdir)" && rm -f $$files
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
+ set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
+ $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@@ -329,7 +349,7 @@ check: check-am
all-am: Makefile $(HEADERS)
installdirs:
for dir in "$(DESTDIR)$(openpamdir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
@@ -351,6 +371,7 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -361,8 +382,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
- distclean-tags
+distclean-am: clean-am distclean-generic distclean-tags
dvi: dvi-am
@@ -370,18 +390,38 @@ dvi-am:
html: html-am
+html-am:
+
info: info-am
info-am:
install-data-am: install-openpamHEADERS
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
install-exec-am:
+install-html: install-html-am
+
+install-html-am:
+
install-info: install-info-am
+install-info-am:
+
install-man:
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -400,19 +440,23 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-info-am uninstall-openpamHEADERS
+uninstall-am: uninstall-openpamHEADERS
+
+.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool ctags distclean distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
- install-data-am install-exec install-exec-am install-info \
- install-info-am install-man install-openpamHEADERS \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags uninstall uninstall-am uninstall-info-am \
- uninstall-openpamHEADERS
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-openpamHEADERS install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am uninstall-openpamHEADERS
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/contrib/openpam/include/security/openpam.h b/contrib/openpam/include/security/openpam.h
index a149feb..0c896a4 100644
--- a/contrib/openpam/include/security/openpam.h
+++ b/contrib/openpam/include/security/openpam.h
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2008 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam.h 418 2008-12-13 22:39:24Z des $
+ * $Id: openpam.h 455 2011-10-29 18:31:11Z des $
*/
#ifndef SECURITY_OPENPAM_H_INCLUDED
@@ -59,6 +59,12 @@ openpam_borrow_cred(pam_handle_t *_pamh,
const struct passwd *_pwd)
OPENPAM_NONNULL((1,2));
+int
+openpam_subst(const pam_handle_t *_pamh,
+ char *_buf,
+ size_t *_bufsize,
+ const char *_template);
+
void
openpam_free_data(pam_handle_t *_pamh,
void *_data,
diff --git a/contrib/openpam/include/security/openpam_version.h b/contrib/openpam/include/security/openpam_version.h
index 5f9d0f2..ed1c1de 100644
--- a/contrib/openpam/include/security/openpam_version.h
+++ b/contrib/openpam/include/security/openpam_version.h
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,17 +32,14 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_version.h 412 2008-01-29 19:31:46Z des $
+ * $Id: openpam_version.h 505 2011-12-18 14:13:08Z des $
*/
#ifndef SECURITY_OPENPAM_VERSION_H_INCLUDED
#define SECURITY_OPENPAM_VERSION_H_INCLUDED
#define OPENPAM
-#define OPENPAM_VERSION 20071221
-#define OPENPAM_RELEASE "Hydrangea"
-
-/* violates reserved namespace, but can't be removed for legacy reasons */
-#define _OPENPAM
+#define OPENPAM_VERSION 20111218
+#define OPENPAM_RELEASE "Lycopsida"
#endif /* !SECURITY_OPENPAM_VERSION_H_INCLUDED */
diff --git a/contrib/openpam/include/security/pam_appl.h b/contrib/openpam/include/security/pam_appl.h
index 131c2f9..b8f0536 100644
--- a/contrib/openpam/include/security/pam_appl.h
+++ b/contrib/openpam/include/security/pam_appl.h
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_appl.h 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_appl.h 437 2011-09-13 12:00:13Z des $
*/
#ifndef SECURITY_PAM_APPL_H_INCLUDED
diff --git a/contrib/openpam/include/security/pam_constants.h b/contrib/openpam/include/security/pam_constants.h
index b005c7f..69add34 100644
--- a/contrib/openpam/include/security/pam_constants.h
+++ b/contrib/openpam/include/security/pam_constants.h
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_constants.h 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_constants.h 443 2011-10-22 01:01:39Z des $
*/
#ifndef SECURITY_PAM_CONSTANTS_H_INCLUDED
@@ -126,6 +126,7 @@ enum {
PAM_REPOSITORY = 10,
PAM_AUTHTOK_PROMPT = 11, /* OpenPAM extension */
PAM_OLDAUTHTOK_PROMPT = 12, /* OpenPAM extension */
+ PAM_HOST = 13, /* OpenPAM extension */
PAM_NUM_ITEMS /* OpenPAM extension */
};
diff --git a/contrib/openpam/include/security/pam_modules.h b/contrib/openpam/include/security/pam_modules.h
index 539f662..6242b38 100644
--- a/contrib/openpam/include/security/pam_modules.h
+++ b/contrib/openpam/include/security/pam_modules.h
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_modules.h 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_modules.h 437 2011-09-13 12:00:13Z des $
*/
#ifndef SECURITY_PAM_MODULES_H_INCLUDED
diff --git a/contrib/openpam/include/security/pam_types.h b/contrib/openpam/include/security/pam_types.h
index 0209bc8..d0d5b00 100644
--- a/contrib/openpam/include/security/pam_types.h
+++ b/contrib/openpam/include/security/pam_types.h
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_types.h 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_types.h 437 2011-09-13 12:00:13Z des $
*/
#ifndef SECURITY_PAM_TYPES_H_INCLUDED
diff --git a/contrib/openpam/install-sh b/contrib/openpam/install-sh
index 4d4a951..6781b98 100755
--- a/contrib/openpam/install-sh
+++ b/contrib/openpam/install-sh
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2005-05-14.22
+scriptversion=2009-04-28.21; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -39,38 +39,68 @@ scriptversion=2005-05-14.22
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
-# from scratch. It can only install one file at a time, a restriction
-# shared with many OS's install programs.
+# from scratch.
+
+nl='
+'
+IFS=" "" $nl"
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
+doit=${DOITPROG-}
+if test -z "$doit"; then
+ doit_exec=exec
+else
+ doit_exec=$doit
+fi
-# put in absolute paths if you don't have them in your path; or use env. vars.
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+ test "$posix_glob" != "?" || {
+ if (set -f) 2>/dev/null; then
+ posix_glob=
+ else
+ posix_glob=:
+ fi
+ }
+'
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
-chmodcmd="$chmodprog 0755"
-chowncmd=
chgrpcmd=
-stripcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
rmcmd="$rmprog -f"
-mvcmd="$mvprog"
+stripcmd=
+
src=
dst=
dir_arg=
-dstarg=
+dst_arg=
+
+copy_on_change=false
no_target_directory=
-usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
@@ -80,81 +110,86 @@ In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
--c (ignored)
--d create directories instead of installing files.
--g GROUP $chgrpprog installed files to GROUP.
--m MODE $chmodprog installed files to MODE.
--o USER $chownprog installed files to USER.
--s $stripprog installed files.
--t DIRECTORY install into DIRECTORY.
--T report an error if DSTFILE is a directory.
---help display this help and exit.
---version display version info and exit.
+ --help display this help and exit.
+ --version display version info and exit.
+
+ -c (ignored)
+ -C install only if different (preserve the last data modification time)
+ -d create directories instead of installing files.
+ -g GROUP $chgrpprog installed files to GROUP.
+ -m MODE $chmodprog installed files to MODE.
+ -o USER $chownprog installed files to USER.
+ -s $stripprog installed files.
+ -t DIRECTORY install into DIRECTORY.
+ -T report an error if DSTFILE is a directory.
Environment variables override the default commands:
- CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+ CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+ RMPROG STRIPPROG
"
-while test -n "$1"; do
+while test $# -ne 0; do
case $1 in
- -c) shift
- continue;;
+ -c) ;;
+
+ -C) copy_on_change=true;;
- -d) dir_arg=true
- shift
- continue;;
+ -d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
- shift
- shift
- continue;;
+ shift;;
--help) echo "$usage"; exit $?;;
- -m) chmodcmd="$chmodprog $2"
- shift
- shift
- continue;;
+ -m) mode=$2
+ case $mode in
+ *' '* | *' '* | *'
+'* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
-o) chowncmd="$chownprog $2"
- shift
- shift
- continue;;
+ shift;;
- -s) stripcmd=$stripprog
- shift
- continue;;
+ -s) stripcmd=$stripprog;;
- -t) dstarg=$2
- shift
- shift
- continue;;
+ -t) dst_arg=$2
+ shift;;
- -T) no_target_directory=true
- shift
- continue;;
+ -T) no_target_directory=true;;
--version) echo "$0 $scriptversion"; exit $?;;
- *) # When -d is used, all remaining arguments are directories to create.
- # When -t is used, the destination is already specified.
- test -n "$dir_arg$dstarg" && break
- # Otherwise, the last argument is the destination. Remove it from $@.
- for arg
- do
- if test -n "$dstarg"; then
- # $@ is not empty: it contains at least $arg.
- set fnord "$@" "$dstarg"
- shift # fnord
- fi
- shift # arg
- dstarg=$arg
- done
+ --) shift
break;;
+
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
+
+ *) break;;
esac
+ shift
done
-if test -z "$1"; then
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+ # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dst_arg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dst_arg"
+ shift # fnord
+ fi
+ shift # arg
+ dst_arg=$arg
+ done
+fi
+
+if test $# -eq 0; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
@@ -164,24 +199,47 @@ if test -z "$1"; then
exit 0
fi
+if test -z "$dir_arg"; then
+ trap '(exit $?); exit' 1 2 13 15
+
+ # Set umask so as not to create temps with too-generous modes.
+ # However, 'strip' requires both read and write access to temps.
+ case $mode in
+ # Optimize common cases.
+ *644) cp_umask=133;;
+ *755) cp_umask=22;;
+
+ *[0-7])
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw='% 200'
+ fi
+ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+ *)
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw=,u+rw
+ fi
+ cp_umask=$mode$u_plus_rw;;
+ esac
+fi
+
for src
do
# Protect names starting with `-'.
case $src in
- -*) src=./$src ;;
+ -*) src=./$src;;
esac
if test -n "$dir_arg"; then
dst=$src
- src=
-
- if test -d "$dst"; then
- mkdircmd=:
- chmodcmd=
- else
- mkdircmd=$mkdirprog
- fi
+ dstdir=$dst
+ test -d "$dstdir"
+ dstdir_status=$?
else
+
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
@@ -190,71 +248,199 @@ do
exit 1
fi
- if test -z "$dstarg"; then
+ if test -z "$dst_arg"; then
echo "$0: no destination specified." >&2
exit 1
fi
- dst=$dstarg
+ dst=$dst_arg
# Protect names starting with `-'.
case $dst in
- -*) dst=./$dst ;;
+ -*) dst=./$dst;;
esac
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
- echo "$0: $dstarg: Is a directory" >&2
+ echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
- dst=$dst/`basename "$src"`
+ dstdir=$dst
+ dst=$dstdir/`basename "$src"`
+ dstdir_status=0
+ else
+ # Prefer dirname, but fall back on a substitute if dirname fails.
+ dstdir=`
+ (dirname "$dst") 2>/dev/null ||
+ expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$dst" : 'X\(//\)[^/]' \| \
+ X"$dst" : 'X\(//\)$' \| \
+ X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X"$dst" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'
+ `
+
+ test -d "$dstdir"
+ dstdir_status=$?
fi
fi
- # This sed command emulates the dirname command.
- dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
+ obsolete_mkdir_used=false
+
+ if test $dstdir_status != 0; then
+ case $posix_mkdir in
+ '')
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
+
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ if (umask $mkdir_umask &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writeable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/d" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
+ esac
- # Make sure that the destination directory exists.
+ if
+ $posix_mkdir && (
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ )
+ then :
+ else
- # Skip lots of stat calls in the usual case.
- if test ! -d "$dstdir"; then
- defaultIFS='
- '
- IFS="${IFS-$defaultIFS}"
+ # The umask is ridiculous, or mkdir does not conform to POSIX,
+ # or it failed possibly due to a race condition. Create the
+ # directory the slow way, step by step, checking for races as we go.
- oIFS=$IFS
- # Some sh's can't handle IFS=/ for some reason.
- IFS='%'
- set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
- shift
- IFS=$oIFS
+ case $dstdir in
+ /*) prefix='/';;
+ -*) prefix='./';;
+ *) prefix='';;
+ esac
- pathcomp=
+ eval "$initialize_posix_glob"
- while test $# -ne 0 ; do
- pathcomp=$pathcomp$1
+ oIFS=$IFS
+ IFS=/
+ $posix_glob set -f
+ set fnord $dstdir
shift
- if test ! -d "$pathcomp"; then
- $mkdirprog "$pathcomp"
- # mkdir can fail with a `File exist' error in case several
- # install-sh are creating the directory concurrently. This
- # is OK.
- test -d "$pathcomp" || exit
+ $posix_glob set +f
+ IFS=$oIFS
+
+ prefixes=
+
+ for d
+ do
+ test -z "$d" && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
+ done
+
+ if test -n "$prefixes"; then
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
fi
- pathcomp=$pathcomp/
- done
+ fi
fi
if test -n "$dir_arg"; then
- $doit $mkdircmd "$dst" \
- && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
- && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
- && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
- && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
-
+ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
else
- dstfile=`basename "$dst"`
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
@@ -262,10 +448,9 @@ do
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
- trap '(exit $?); exit' 1 2 13 15
# Copy the file name to the temp name.
- $doit $cpprog "$src" "$dsttmp" &&
+ (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
@@ -273,51 +458,63 @@ do
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
- { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
- && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
- && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
- && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
-
- # Now rename the file to the real destination.
- { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
- || {
- # The rename failed, perhaps because mv can't rename something else
- # to itself, or perhaps because mv is so ancient that it does not
- # support -f.
-
- # Now remove or move aside any old file at destination location.
- # We try this two ways since rm can't unlink itself on some
- # systems and the destination file might be busy for other
- # reasons. In this case, the final cleanup might fail but the new
- # file should still install successfully.
- {
- if test -f "$dstdir/$dstfile"; then
- $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
- || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
- || {
- echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
- (exit 1); exit 1
- }
- else
- :
- fi
- } &&
-
- # Now rename the file to the real destination.
- $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
- }
- }
- fi || { (exit 1); exit 1; }
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+ { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+ { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+ # If -C, don't bother to copy if it wouldn't change the file.
+ if $copy_on_change &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+
+ eval "$initialize_posix_glob" &&
+ $posix_glob set -f &&
+ set X $old && old=:$2:$4:$5:$6 &&
+ set X $new && new=:$2:$4:$5:$6 &&
+ $posix_glob set +f &&
+
+ test "$old" = "$new" &&
+ $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+ then
+ rm -f "$dsttmp"
+ else
+ # Rename the file to the real destination.
+ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+ # The rename failed, perhaps because mv can't rename something else
+ # to itself, or perhaps because mv is so ancient that it does not
+ # support -f.
+ {
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd -f "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
+ }
+ fi || exit 1
+
+ trap '' 0
+ fi
done
-# The final little trick to "correctly" pass the exit status to the exit trap.
-{
- (exit 0); exit 0
-}
-
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
# End:
diff --git a/contrib/openpam/lib/Makefile.am b/contrib/openpam/lib/Makefile.am
index c748079..3a2e60e 100644
--- a/contrib/openpam/lib/Makefile.am
+++ b/contrib/openpam/lib/Makefile.am
@@ -1,4 +1,4 @@
-# $Id: Makefile.am 395 2007-06-03 20:26:18Z des $
+# $Id: Makefile.am 499 2011-11-22 11:51:50Z des $
NULL =
@@ -6,11 +6,18 @@ INCLUDES = -I$(top_srcdir)/include
lib_LTLIBRARIES = libpam.la
-noinst_HEADERS = openpam_impl.h
+noinst_HEADERS = \
+ openpam_constants.h \
+ openpam_debug.h \
+ openpam_impl.h \
+ openpam_strlcmp.h \
+ openpam_strlcpy.h
libpam_la_SOURCES = \
openpam_borrow_cred.c \
+ openpam_check_owner_perms.c \
openpam_configure.c \
+ openpam_constants.c \
openpam_dispatch.c \
openpam_dynamic.c \
openpam_findenv.c \
@@ -24,6 +31,7 @@ libpam_la_SOURCES = \
openpam_restore_cred.c \
openpam_set_option.c \
openpam_static.c \
+ openpam_subst.c \
openpam_ttyconv.c \
pam_acct_mgmt.c \
pam_authenticate.c \
@@ -52,9 +60,8 @@ libpam_la_SOURCES = \
pam_vprompt.c \
$(NULL)
-libpam_la_CFLAGS = -DOPENPAM_MODULES_DIR='"@OPENPAM_MODULES_DIR@/"'
-
-libpam_la_LDFLAGS = -no-undefined -version-info @LIB_MAJ@ @DL_LIBS@
+libpam_la_LDFLAGS = -no-undefined -version-info @LIB_MAJ@
+libpam_la_LIBADD = @DL_LIBS@
EXTRA_DIST = \
pam_authenticate_secondary.c \
diff --git a/contrib/openpam/lib/Makefile.in b/contrib/openpam/lib/Makefile.in
index f1ab0ad..0052ce2 100644
--- a/contrib/openpam/lib/Makefile.in
+++ b/contrib/openpam/lib/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -14,18 +15,15 @@
@SET_MAKE@
-# $Id: Makefile.am 395 2007-06-03 20:26:18Z des $
+# $Id: Makefile.am 499 2011-11-22 11:51:50Z des $
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -39,7 +37,6 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-target_triplet = @target@
subdir = lib
DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
@@ -50,53 +47,65 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__installdirs = "$(DESTDIR)$(libdir)"
-libLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(lib_LTLIBRARIES)
-libpam_la_LIBADD =
+libpam_la_DEPENDENCIES =
am__objects_1 =
-am_libpam_la_OBJECTS = libpam_la-openpam_borrow_cred.lo \
- libpam_la-openpam_configure.lo libpam_la-openpam_dispatch.lo \
- libpam_la-openpam_dynamic.lo libpam_la-openpam_findenv.lo \
- libpam_la-openpam_free_data.lo \
- libpam_la-openpam_free_envlist.lo \
- libpam_la-openpam_get_option.lo libpam_la-openpam_load.lo \
- libpam_la-openpam_log.lo libpam_la-openpam_nullconv.lo \
- libpam_la-openpam_readline.lo \
- libpam_la-openpam_restore_cred.lo \
- libpam_la-openpam_set_option.lo libpam_la-openpam_static.lo \
- libpam_la-openpam_ttyconv.lo libpam_la-pam_acct_mgmt.lo \
- libpam_la-pam_authenticate.lo libpam_la-pam_chauthtok.lo \
- libpam_la-pam_close_session.lo libpam_la-pam_end.lo \
- libpam_la-pam_error.lo libpam_la-pam_get_authtok.lo \
- libpam_la-pam_get_data.lo libpam_la-pam_get_item.lo \
- libpam_la-pam_get_user.lo libpam_la-pam_getenv.lo \
- libpam_la-pam_getenvlist.lo libpam_la-pam_info.lo \
- libpam_la-pam_open_session.lo libpam_la-pam_prompt.lo \
- libpam_la-pam_putenv.lo libpam_la-pam_set_data.lo \
- libpam_la-pam_set_item.lo libpam_la-pam_setcred.lo \
- libpam_la-pam_setenv.lo libpam_la-pam_start.lo \
- libpam_la-pam_strerror.lo libpam_la-pam_verror.lo \
- libpam_la-pam_vinfo.lo libpam_la-pam_vprompt.lo \
- $(am__objects_1)
+am_libpam_la_OBJECTS = openpam_borrow_cred.lo \
+ openpam_check_owner_perms.lo openpam_configure.lo \
+ openpam_constants.lo openpam_dispatch.lo openpam_dynamic.lo \
+ openpam_findenv.lo openpam_free_data.lo \
+ openpam_free_envlist.lo openpam_get_option.lo openpam_load.lo \
+ openpam_log.lo openpam_nullconv.lo openpam_readline.lo \
+ openpam_restore_cred.lo openpam_set_option.lo \
+ openpam_static.lo openpam_subst.lo openpam_ttyconv.lo \
+ pam_acct_mgmt.lo pam_authenticate.lo pam_chauthtok.lo \
+ pam_close_session.lo pam_end.lo pam_error.lo \
+ pam_get_authtok.lo pam_get_data.lo pam_get_item.lo \
+ pam_get_user.lo pam_getenv.lo pam_getenvlist.lo pam_info.lo \
+ pam_open_session.lo pam_prompt.lo pam_putenv.lo \
+ pam_set_data.lo pam_set_item.lo pam_setcred.lo pam_setenv.lo \
+ pam_start.lo pam_strerror.lo pam_verror.lo pam_vinfo.lo \
+ pam_vprompt.lo $(am__objects_1)
libpam_la_OBJECTS = $(am_libpam_la_OBJECTS)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+libpam_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(libpam_la_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
+am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
SOURCES = $(libpam_la_SOURCES)
DIST_SOURCES = $(libpam_la_SOURCES)
HEADERS = $(noinst_HEADERS)
@@ -104,8 +113,6 @@ ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -118,42 +125,50 @@ CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CRYPT_LIBS = @CRYPT_LIBS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
DL_LIBS = @DL_LIBS@
-ECHO = @ECHO@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
GREP = @GREP@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIB_MAJ = @LIB_MAJ@
+LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPENPAM_MODULES_DIR = @OPENPAM_MODULES_DIR@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
@@ -162,19 +177,13 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
-WITH_DOC_FALSE = @WITH_DOC_FALSE@
-WITH_DOC_TRUE = @WITH_DOC_TRUE@
-WITH_PAM_UNIX_FALSE = @WITH_PAM_UNIX_FALSE@
-WITH_PAM_UNIX_TRUE = @WITH_PAM_UNIX_TRUE@
-WITH_SU_FALSE = @WITH_SU_FALSE@
-WITH_SU_TRUE = @WITH_SU_TRUE@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -186,6 +195,7 @@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
@@ -213,19 +223,27 @@ program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
-target = @target@
target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
NULL =
INCLUDES = -I$(top_srcdir)/include
lib_LTLIBRARIES = libpam.la
-noinst_HEADERS = openpam_impl.h
+noinst_HEADERS = \
+ openpam_constants.h \
+ openpam_debug.h \
+ openpam_impl.h \
+ openpam_strlcmp.h \
+ openpam_strlcpy.h
+
libpam_la_SOURCES = \
openpam_borrow_cred.c \
+ openpam_check_owner_perms.c \
openpam_configure.c \
+ openpam_constants.c \
openpam_dispatch.c \
openpam_dynamic.c \
openpam_findenv.c \
@@ -239,6 +257,7 @@ libpam_la_SOURCES = \
openpam_restore_cred.c \
openpam_set_option.c \
openpam_static.c \
+ openpam_subst.c \
openpam_ttyconv.c \
pam_acct_mgmt.c \
pam_authenticate.c \
@@ -267,8 +286,8 @@ libpam_la_SOURCES = \
pam_vprompt.c \
$(NULL)
-libpam_la_CFLAGS = -DOPENPAM_MODULES_DIR='"@OPENPAM_MODULES_DIR@/"'
-libpam_la_LDFLAGS = -no-undefined -version-info @LIB_MAJ@ @DL_LIBS@
+libpam_la_LDFLAGS = -no-undefined -version-info @LIB_MAJ@
+libpam_la_LIBADD = @DL_LIBS@
EXTRA_DIST = \
pam_authenticate_secondary.c \
pam_get_mapped_authtok.c \
@@ -296,14 +315,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign lib/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign lib/Makefile
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign lib/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign lib/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -321,23 +340,28 @@ $(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
- @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ list2=; for p in $$list; do \
if test -f $$p; then \
- f=$(am__strip_dir) \
- echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
- $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+ list2="$$list2 $$p"; \
else :; fi; \
- done
+ done; \
+ test -z "$$list2" || { \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+ }
uninstall-libLTLIBRARIES:
@$(NORMAL_UNINSTALL)
- @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
- p=$(am__strip_dir) \
- echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
- $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
done
clean-libLTLIBRARIES:
@@ -349,7 +373,7 @@ clean-libLTLIBRARIES:
rm -f "$${dir}/so_locations"; \
done
libpam.la: $(libpam_la_OBJECTS) $(libpam_la_DEPENDENCIES)
- $(LINK) -rpath $(libdir) $(libpam_la_LDFLAGS) $(libpam_la_OBJECTS) $(libpam_la_LIBADD) $(LIBS)
+ $(libpam_la_LINK) -rpath $(libdir) $(libpam_la_OBJECTS) $(libpam_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -357,438 +381,157 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-openpam_borrow_cred.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-openpam_configure.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-openpam_dispatch.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-openpam_dynamic.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-openpam_findenv.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-openpam_free_data.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-openpam_free_envlist.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-openpam_get_option.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-openpam_load.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-openpam_log.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-openpam_nullconv.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-openpam_readline.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-openpam_restore_cred.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-openpam_set_option.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-openpam_static.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-openpam_ttyconv.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-pam_acct_mgmt.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-pam_authenticate.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-pam_chauthtok.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-pam_close_session.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-pam_end.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-pam_error.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-pam_get_authtok.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-pam_get_data.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-pam_get_item.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-pam_get_user.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-pam_getenv.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-pam_getenvlist.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-pam_info.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-pam_open_session.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-pam_prompt.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-pam_putenv.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-pam_set_data.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-pam_set_item.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-pam_setcred.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-pam_setenv.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-pam_start.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-pam_strerror.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-pam_verror.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-pam_vinfo.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpam_la-pam_vprompt.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openpam_borrow_cred.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openpam_check_owner_perms.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openpam_configure.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openpam_constants.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openpam_dispatch.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openpam_dynamic.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openpam_findenv.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openpam_free_data.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openpam_free_envlist.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openpam_get_option.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openpam_load.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openpam_log.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openpam_nullconv.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openpam_readline.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openpam_restore_cred.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openpam_set_option.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openpam_static.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openpam_subst.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openpam_ttyconv.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pam_acct_mgmt.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pam_authenticate.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pam_chauthtok.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pam_close_session.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pam_end.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pam_error.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pam_get_authtok.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pam_get_data.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pam_get_item.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pam_get_user.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pam_getenv.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pam_getenvlist.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pam_info.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pam_open_session.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pam_prompt.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pam_putenv.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pam_set_data.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pam_set_item.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pam_setcred.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pam_setenv.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pam_start.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pam_strerror.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pam_verror.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pam_vinfo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pam_vprompt.Plo@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
-libpam_la-openpam_borrow_cred.lo: openpam_borrow_cred.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-openpam_borrow_cred.lo -MD -MP -MF "$(DEPDIR)/libpam_la-openpam_borrow_cred.Tpo" -c -o libpam_la-openpam_borrow_cred.lo `test -f 'openpam_borrow_cred.c' || echo '$(srcdir)/'`openpam_borrow_cred.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-openpam_borrow_cred.Tpo" "$(DEPDIR)/libpam_la-openpam_borrow_cred.Plo"; else rm -f "$(DEPDIR)/libpam_la-openpam_borrow_cred.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='openpam_borrow_cred.c' object='libpam_la-openpam_borrow_cred.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-openpam_borrow_cred.lo `test -f 'openpam_borrow_cred.c' || echo '$(srcdir)/'`openpam_borrow_cred.c
-
-libpam_la-openpam_configure.lo: openpam_configure.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-openpam_configure.lo -MD -MP -MF "$(DEPDIR)/libpam_la-openpam_configure.Tpo" -c -o libpam_la-openpam_configure.lo `test -f 'openpam_configure.c' || echo '$(srcdir)/'`openpam_configure.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-openpam_configure.Tpo" "$(DEPDIR)/libpam_la-openpam_configure.Plo"; else rm -f "$(DEPDIR)/libpam_la-openpam_configure.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='openpam_configure.c' object='libpam_la-openpam_configure.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-openpam_configure.lo `test -f 'openpam_configure.c' || echo '$(srcdir)/'`openpam_configure.c
-
-libpam_la-openpam_dispatch.lo: openpam_dispatch.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-openpam_dispatch.lo -MD -MP -MF "$(DEPDIR)/libpam_la-openpam_dispatch.Tpo" -c -o libpam_la-openpam_dispatch.lo `test -f 'openpam_dispatch.c' || echo '$(srcdir)/'`openpam_dispatch.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-openpam_dispatch.Tpo" "$(DEPDIR)/libpam_la-openpam_dispatch.Plo"; else rm -f "$(DEPDIR)/libpam_la-openpam_dispatch.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='openpam_dispatch.c' object='libpam_la-openpam_dispatch.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-openpam_dispatch.lo `test -f 'openpam_dispatch.c' || echo '$(srcdir)/'`openpam_dispatch.c
-
-libpam_la-openpam_dynamic.lo: openpam_dynamic.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-openpam_dynamic.lo -MD -MP -MF "$(DEPDIR)/libpam_la-openpam_dynamic.Tpo" -c -o libpam_la-openpam_dynamic.lo `test -f 'openpam_dynamic.c' || echo '$(srcdir)/'`openpam_dynamic.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-openpam_dynamic.Tpo" "$(DEPDIR)/libpam_la-openpam_dynamic.Plo"; else rm -f "$(DEPDIR)/libpam_la-openpam_dynamic.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='openpam_dynamic.c' object='libpam_la-openpam_dynamic.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-openpam_dynamic.lo `test -f 'openpam_dynamic.c' || echo '$(srcdir)/'`openpam_dynamic.c
-
-libpam_la-openpam_findenv.lo: openpam_findenv.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-openpam_findenv.lo -MD -MP -MF "$(DEPDIR)/libpam_la-openpam_findenv.Tpo" -c -o libpam_la-openpam_findenv.lo `test -f 'openpam_findenv.c' || echo '$(srcdir)/'`openpam_findenv.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-openpam_findenv.Tpo" "$(DEPDIR)/libpam_la-openpam_findenv.Plo"; else rm -f "$(DEPDIR)/libpam_la-openpam_findenv.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='openpam_findenv.c' object='libpam_la-openpam_findenv.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-openpam_findenv.lo `test -f 'openpam_findenv.c' || echo '$(srcdir)/'`openpam_findenv.c
-
-libpam_la-openpam_free_data.lo: openpam_free_data.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-openpam_free_data.lo -MD -MP -MF "$(DEPDIR)/libpam_la-openpam_free_data.Tpo" -c -o libpam_la-openpam_free_data.lo `test -f 'openpam_free_data.c' || echo '$(srcdir)/'`openpam_free_data.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-openpam_free_data.Tpo" "$(DEPDIR)/libpam_la-openpam_free_data.Plo"; else rm -f "$(DEPDIR)/libpam_la-openpam_free_data.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='openpam_free_data.c' object='libpam_la-openpam_free_data.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-openpam_free_data.lo `test -f 'openpam_free_data.c' || echo '$(srcdir)/'`openpam_free_data.c
-
-libpam_la-openpam_free_envlist.lo: openpam_free_envlist.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-openpam_free_envlist.lo -MD -MP -MF "$(DEPDIR)/libpam_la-openpam_free_envlist.Tpo" -c -o libpam_la-openpam_free_envlist.lo `test -f 'openpam_free_envlist.c' || echo '$(srcdir)/'`openpam_free_envlist.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-openpam_free_envlist.Tpo" "$(DEPDIR)/libpam_la-openpam_free_envlist.Plo"; else rm -f "$(DEPDIR)/libpam_la-openpam_free_envlist.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='openpam_free_envlist.c' object='libpam_la-openpam_free_envlist.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-openpam_free_envlist.lo `test -f 'openpam_free_envlist.c' || echo '$(srcdir)/'`openpam_free_envlist.c
-
-libpam_la-openpam_get_option.lo: openpam_get_option.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-openpam_get_option.lo -MD -MP -MF "$(DEPDIR)/libpam_la-openpam_get_option.Tpo" -c -o libpam_la-openpam_get_option.lo `test -f 'openpam_get_option.c' || echo '$(srcdir)/'`openpam_get_option.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-openpam_get_option.Tpo" "$(DEPDIR)/libpam_la-openpam_get_option.Plo"; else rm -f "$(DEPDIR)/libpam_la-openpam_get_option.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='openpam_get_option.c' object='libpam_la-openpam_get_option.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-openpam_get_option.lo `test -f 'openpam_get_option.c' || echo '$(srcdir)/'`openpam_get_option.c
-
-libpam_la-openpam_load.lo: openpam_load.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-openpam_load.lo -MD -MP -MF "$(DEPDIR)/libpam_la-openpam_load.Tpo" -c -o libpam_la-openpam_load.lo `test -f 'openpam_load.c' || echo '$(srcdir)/'`openpam_load.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-openpam_load.Tpo" "$(DEPDIR)/libpam_la-openpam_load.Plo"; else rm -f "$(DEPDIR)/libpam_la-openpam_load.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='openpam_load.c' object='libpam_la-openpam_load.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-openpam_load.lo `test -f 'openpam_load.c' || echo '$(srcdir)/'`openpam_load.c
-
-libpam_la-openpam_log.lo: openpam_log.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-openpam_log.lo -MD -MP -MF "$(DEPDIR)/libpam_la-openpam_log.Tpo" -c -o libpam_la-openpam_log.lo `test -f 'openpam_log.c' || echo '$(srcdir)/'`openpam_log.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-openpam_log.Tpo" "$(DEPDIR)/libpam_la-openpam_log.Plo"; else rm -f "$(DEPDIR)/libpam_la-openpam_log.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='openpam_log.c' object='libpam_la-openpam_log.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-openpam_log.lo `test -f 'openpam_log.c' || echo '$(srcdir)/'`openpam_log.c
-
-libpam_la-openpam_nullconv.lo: openpam_nullconv.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-openpam_nullconv.lo -MD -MP -MF "$(DEPDIR)/libpam_la-openpam_nullconv.Tpo" -c -o libpam_la-openpam_nullconv.lo `test -f 'openpam_nullconv.c' || echo '$(srcdir)/'`openpam_nullconv.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-openpam_nullconv.Tpo" "$(DEPDIR)/libpam_la-openpam_nullconv.Plo"; else rm -f "$(DEPDIR)/libpam_la-openpam_nullconv.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='openpam_nullconv.c' object='libpam_la-openpam_nullconv.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-openpam_nullconv.lo `test -f 'openpam_nullconv.c' || echo '$(srcdir)/'`openpam_nullconv.c
-
-libpam_la-openpam_readline.lo: openpam_readline.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-openpam_readline.lo -MD -MP -MF "$(DEPDIR)/libpam_la-openpam_readline.Tpo" -c -o libpam_la-openpam_readline.lo `test -f 'openpam_readline.c' || echo '$(srcdir)/'`openpam_readline.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-openpam_readline.Tpo" "$(DEPDIR)/libpam_la-openpam_readline.Plo"; else rm -f "$(DEPDIR)/libpam_la-openpam_readline.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='openpam_readline.c' object='libpam_la-openpam_readline.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-openpam_readline.lo `test -f 'openpam_readline.c' || echo '$(srcdir)/'`openpam_readline.c
-
-libpam_la-openpam_restore_cred.lo: openpam_restore_cred.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-openpam_restore_cred.lo -MD -MP -MF "$(DEPDIR)/libpam_la-openpam_restore_cred.Tpo" -c -o libpam_la-openpam_restore_cred.lo `test -f 'openpam_restore_cred.c' || echo '$(srcdir)/'`openpam_restore_cred.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-openpam_restore_cred.Tpo" "$(DEPDIR)/libpam_la-openpam_restore_cred.Plo"; else rm -f "$(DEPDIR)/libpam_la-openpam_restore_cred.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='openpam_restore_cred.c' object='libpam_la-openpam_restore_cred.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-openpam_restore_cred.lo `test -f 'openpam_restore_cred.c' || echo '$(srcdir)/'`openpam_restore_cred.c
-
-libpam_la-openpam_set_option.lo: openpam_set_option.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-openpam_set_option.lo -MD -MP -MF "$(DEPDIR)/libpam_la-openpam_set_option.Tpo" -c -o libpam_la-openpam_set_option.lo `test -f 'openpam_set_option.c' || echo '$(srcdir)/'`openpam_set_option.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-openpam_set_option.Tpo" "$(DEPDIR)/libpam_la-openpam_set_option.Plo"; else rm -f "$(DEPDIR)/libpam_la-openpam_set_option.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='openpam_set_option.c' object='libpam_la-openpam_set_option.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-openpam_set_option.lo `test -f 'openpam_set_option.c' || echo '$(srcdir)/'`openpam_set_option.c
-
-libpam_la-openpam_static.lo: openpam_static.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-openpam_static.lo -MD -MP -MF "$(DEPDIR)/libpam_la-openpam_static.Tpo" -c -o libpam_la-openpam_static.lo `test -f 'openpam_static.c' || echo '$(srcdir)/'`openpam_static.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-openpam_static.Tpo" "$(DEPDIR)/libpam_la-openpam_static.Plo"; else rm -f "$(DEPDIR)/libpam_la-openpam_static.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='openpam_static.c' object='libpam_la-openpam_static.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-openpam_static.lo `test -f 'openpam_static.c' || echo '$(srcdir)/'`openpam_static.c
-
-libpam_la-openpam_ttyconv.lo: openpam_ttyconv.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-openpam_ttyconv.lo -MD -MP -MF "$(DEPDIR)/libpam_la-openpam_ttyconv.Tpo" -c -o libpam_la-openpam_ttyconv.lo `test -f 'openpam_ttyconv.c' || echo '$(srcdir)/'`openpam_ttyconv.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-openpam_ttyconv.Tpo" "$(DEPDIR)/libpam_la-openpam_ttyconv.Plo"; else rm -f "$(DEPDIR)/libpam_la-openpam_ttyconv.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='openpam_ttyconv.c' object='libpam_la-openpam_ttyconv.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-openpam_ttyconv.lo `test -f 'openpam_ttyconv.c' || echo '$(srcdir)/'`openpam_ttyconv.c
-
-libpam_la-pam_acct_mgmt.lo: pam_acct_mgmt.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-pam_acct_mgmt.lo -MD -MP -MF "$(DEPDIR)/libpam_la-pam_acct_mgmt.Tpo" -c -o libpam_la-pam_acct_mgmt.lo `test -f 'pam_acct_mgmt.c' || echo '$(srcdir)/'`pam_acct_mgmt.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-pam_acct_mgmt.Tpo" "$(DEPDIR)/libpam_la-pam_acct_mgmt.Plo"; else rm -f "$(DEPDIR)/libpam_la-pam_acct_mgmt.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pam_acct_mgmt.c' object='libpam_la-pam_acct_mgmt.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-pam_acct_mgmt.lo `test -f 'pam_acct_mgmt.c' || echo '$(srcdir)/'`pam_acct_mgmt.c
-
-libpam_la-pam_authenticate.lo: pam_authenticate.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-pam_authenticate.lo -MD -MP -MF "$(DEPDIR)/libpam_la-pam_authenticate.Tpo" -c -o libpam_la-pam_authenticate.lo `test -f 'pam_authenticate.c' || echo '$(srcdir)/'`pam_authenticate.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-pam_authenticate.Tpo" "$(DEPDIR)/libpam_la-pam_authenticate.Plo"; else rm -f "$(DEPDIR)/libpam_la-pam_authenticate.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pam_authenticate.c' object='libpam_la-pam_authenticate.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-pam_authenticate.lo `test -f 'pam_authenticate.c' || echo '$(srcdir)/'`pam_authenticate.c
-
-libpam_la-pam_chauthtok.lo: pam_chauthtok.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-pam_chauthtok.lo -MD -MP -MF "$(DEPDIR)/libpam_la-pam_chauthtok.Tpo" -c -o libpam_la-pam_chauthtok.lo `test -f 'pam_chauthtok.c' || echo '$(srcdir)/'`pam_chauthtok.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-pam_chauthtok.Tpo" "$(DEPDIR)/libpam_la-pam_chauthtok.Plo"; else rm -f "$(DEPDIR)/libpam_la-pam_chauthtok.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pam_chauthtok.c' object='libpam_la-pam_chauthtok.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-pam_chauthtok.lo `test -f 'pam_chauthtok.c' || echo '$(srcdir)/'`pam_chauthtok.c
-
-libpam_la-pam_close_session.lo: pam_close_session.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-pam_close_session.lo -MD -MP -MF "$(DEPDIR)/libpam_la-pam_close_session.Tpo" -c -o libpam_la-pam_close_session.lo `test -f 'pam_close_session.c' || echo '$(srcdir)/'`pam_close_session.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-pam_close_session.Tpo" "$(DEPDIR)/libpam_la-pam_close_session.Plo"; else rm -f "$(DEPDIR)/libpam_la-pam_close_session.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pam_close_session.c' object='libpam_la-pam_close_session.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-pam_close_session.lo `test -f 'pam_close_session.c' || echo '$(srcdir)/'`pam_close_session.c
-
-libpam_la-pam_end.lo: pam_end.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-pam_end.lo -MD -MP -MF "$(DEPDIR)/libpam_la-pam_end.Tpo" -c -o libpam_la-pam_end.lo `test -f 'pam_end.c' || echo '$(srcdir)/'`pam_end.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-pam_end.Tpo" "$(DEPDIR)/libpam_la-pam_end.Plo"; else rm -f "$(DEPDIR)/libpam_la-pam_end.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pam_end.c' object='libpam_la-pam_end.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-pam_end.lo `test -f 'pam_end.c' || echo '$(srcdir)/'`pam_end.c
-
-libpam_la-pam_error.lo: pam_error.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-pam_error.lo -MD -MP -MF "$(DEPDIR)/libpam_la-pam_error.Tpo" -c -o libpam_la-pam_error.lo `test -f 'pam_error.c' || echo '$(srcdir)/'`pam_error.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-pam_error.Tpo" "$(DEPDIR)/libpam_la-pam_error.Plo"; else rm -f "$(DEPDIR)/libpam_la-pam_error.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pam_error.c' object='libpam_la-pam_error.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-pam_error.lo `test -f 'pam_error.c' || echo '$(srcdir)/'`pam_error.c
-
-libpam_la-pam_get_authtok.lo: pam_get_authtok.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-pam_get_authtok.lo -MD -MP -MF "$(DEPDIR)/libpam_la-pam_get_authtok.Tpo" -c -o libpam_la-pam_get_authtok.lo `test -f 'pam_get_authtok.c' || echo '$(srcdir)/'`pam_get_authtok.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-pam_get_authtok.Tpo" "$(DEPDIR)/libpam_la-pam_get_authtok.Plo"; else rm -f "$(DEPDIR)/libpam_la-pam_get_authtok.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pam_get_authtok.c' object='libpam_la-pam_get_authtok.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-pam_get_authtok.lo `test -f 'pam_get_authtok.c' || echo '$(srcdir)/'`pam_get_authtok.c
-
-libpam_la-pam_get_data.lo: pam_get_data.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-pam_get_data.lo -MD -MP -MF "$(DEPDIR)/libpam_la-pam_get_data.Tpo" -c -o libpam_la-pam_get_data.lo `test -f 'pam_get_data.c' || echo '$(srcdir)/'`pam_get_data.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-pam_get_data.Tpo" "$(DEPDIR)/libpam_la-pam_get_data.Plo"; else rm -f "$(DEPDIR)/libpam_la-pam_get_data.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pam_get_data.c' object='libpam_la-pam_get_data.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-pam_get_data.lo `test -f 'pam_get_data.c' || echo '$(srcdir)/'`pam_get_data.c
-
-libpam_la-pam_get_item.lo: pam_get_item.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-pam_get_item.lo -MD -MP -MF "$(DEPDIR)/libpam_la-pam_get_item.Tpo" -c -o libpam_la-pam_get_item.lo `test -f 'pam_get_item.c' || echo '$(srcdir)/'`pam_get_item.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-pam_get_item.Tpo" "$(DEPDIR)/libpam_la-pam_get_item.Plo"; else rm -f "$(DEPDIR)/libpam_la-pam_get_item.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pam_get_item.c' object='libpam_la-pam_get_item.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-pam_get_item.lo `test -f 'pam_get_item.c' || echo '$(srcdir)/'`pam_get_item.c
-
-libpam_la-pam_get_user.lo: pam_get_user.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-pam_get_user.lo -MD -MP -MF "$(DEPDIR)/libpam_la-pam_get_user.Tpo" -c -o libpam_la-pam_get_user.lo `test -f 'pam_get_user.c' || echo '$(srcdir)/'`pam_get_user.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-pam_get_user.Tpo" "$(DEPDIR)/libpam_la-pam_get_user.Plo"; else rm -f "$(DEPDIR)/libpam_la-pam_get_user.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pam_get_user.c' object='libpam_la-pam_get_user.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-pam_get_user.lo `test -f 'pam_get_user.c' || echo '$(srcdir)/'`pam_get_user.c
-
-libpam_la-pam_getenv.lo: pam_getenv.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-pam_getenv.lo -MD -MP -MF "$(DEPDIR)/libpam_la-pam_getenv.Tpo" -c -o libpam_la-pam_getenv.lo `test -f 'pam_getenv.c' || echo '$(srcdir)/'`pam_getenv.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-pam_getenv.Tpo" "$(DEPDIR)/libpam_la-pam_getenv.Plo"; else rm -f "$(DEPDIR)/libpam_la-pam_getenv.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pam_getenv.c' object='libpam_la-pam_getenv.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-pam_getenv.lo `test -f 'pam_getenv.c' || echo '$(srcdir)/'`pam_getenv.c
-
-libpam_la-pam_getenvlist.lo: pam_getenvlist.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-pam_getenvlist.lo -MD -MP -MF "$(DEPDIR)/libpam_la-pam_getenvlist.Tpo" -c -o libpam_la-pam_getenvlist.lo `test -f 'pam_getenvlist.c' || echo '$(srcdir)/'`pam_getenvlist.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-pam_getenvlist.Tpo" "$(DEPDIR)/libpam_la-pam_getenvlist.Plo"; else rm -f "$(DEPDIR)/libpam_la-pam_getenvlist.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pam_getenvlist.c' object='libpam_la-pam_getenvlist.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-pam_getenvlist.lo `test -f 'pam_getenvlist.c' || echo '$(srcdir)/'`pam_getenvlist.c
-
-libpam_la-pam_info.lo: pam_info.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-pam_info.lo -MD -MP -MF "$(DEPDIR)/libpam_la-pam_info.Tpo" -c -o libpam_la-pam_info.lo `test -f 'pam_info.c' || echo '$(srcdir)/'`pam_info.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-pam_info.Tpo" "$(DEPDIR)/libpam_la-pam_info.Plo"; else rm -f "$(DEPDIR)/libpam_la-pam_info.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pam_info.c' object='libpam_la-pam_info.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-pam_info.lo `test -f 'pam_info.c' || echo '$(srcdir)/'`pam_info.c
-
-libpam_la-pam_open_session.lo: pam_open_session.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-pam_open_session.lo -MD -MP -MF "$(DEPDIR)/libpam_la-pam_open_session.Tpo" -c -o libpam_la-pam_open_session.lo `test -f 'pam_open_session.c' || echo '$(srcdir)/'`pam_open_session.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-pam_open_session.Tpo" "$(DEPDIR)/libpam_la-pam_open_session.Plo"; else rm -f "$(DEPDIR)/libpam_la-pam_open_session.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pam_open_session.c' object='libpam_la-pam_open_session.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-pam_open_session.lo `test -f 'pam_open_session.c' || echo '$(srcdir)/'`pam_open_session.c
-
-libpam_la-pam_prompt.lo: pam_prompt.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-pam_prompt.lo -MD -MP -MF "$(DEPDIR)/libpam_la-pam_prompt.Tpo" -c -o libpam_la-pam_prompt.lo `test -f 'pam_prompt.c' || echo '$(srcdir)/'`pam_prompt.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-pam_prompt.Tpo" "$(DEPDIR)/libpam_la-pam_prompt.Plo"; else rm -f "$(DEPDIR)/libpam_la-pam_prompt.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pam_prompt.c' object='libpam_la-pam_prompt.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-pam_prompt.lo `test -f 'pam_prompt.c' || echo '$(srcdir)/'`pam_prompt.c
-
-libpam_la-pam_putenv.lo: pam_putenv.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-pam_putenv.lo -MD -MP -MF "$(DEPDIR)/libpam_la-pam_putenv.Tpo" -c -o libpam_la-pam_putenv.lo `test -f 'pam_putenv.c' || echo '$(srcdir)/'`pam_putenv.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-pam_putenv.Tpo" "$(DEPDIR)/libpam_la-pam_putenv.Plo"; else rm -f "$(DEPDIR)/libpam_la-pam_putenv.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pam_putenv.c' object='libpam_la-pam_putenv.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-pam_putenv.lo `test -f 'pam_putenv.c' || echo '$(srcdir)/'`pam_putenv.c
-
-libpam_la-pam_set_data.lo: pam_set_data.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-pam_set_data.lo -MD -MP -MF "$(DEPDIR)/libpam_la-pam_set_data.Tpo" -c -o libpam_la-pam_set_data.lo `test -f 'pam_set_data.c' || echo '$(srcdir)/'`pam_set_data.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-pam_set_data.Tpo" "$(DEPDIR)/libpam_la-pam_set_data.Plo"; else rm -f "$(DEPDIR)/libpam_la-pam_set_data.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pam_set_data.c' object='libpam_la-pam_set_data.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-pam_set_data.lo `test -f 'pam_set_data.c' || echo '$(srcdir)/'`pam_set_data.c
-
-libpam_la-pam_set_item.lo: pam_set_item.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-pam_set_item.lo -MD -MP -MF "$(DEPDIR)/libpam_la-pam_set_item.Tpo" -c -o libpam_la-pam_set_item.lo `test -f 'pam_set_item.c' || echo '$(srcdir)/'`pam_set_item.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-pam_set_item.Tpo" "$(DEPDIR)/libpam_la-pam_set_item.Plo"; else rm -f "$(DEPDIR)/libpam_la-pam_set_item.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pam_set_item.c' object='libpam_la-pam_set_item.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-pam_set_item.lo `test -f 'pam_set_item.c' || echo '$(srcdir)/'`pam_set_item.c
-
-libpam_la-pam_setcred.lo: pam_setcred.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-pam_setcred.lo -MD -MP -MF "$(DEPDIR)/libpam_la-pam_setcred.Tpo" -c -o libpam_la-pam_setcred.lo `test -f 'pam_setcred.c' || echo '$(srcdir)/'`pam_setcred.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-pam_setcred.Tpo" "$(DEPDIR)/libpam_la-pam_setcred.Plo"; else rm -f "$(DEPDIR)/libpam_la-pam_setcred.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pam_setcred.c' object='libpam_la-pam_setcred.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-pam_setcred.lo `test -f 'pam_setcred.c' || echo '$(srcdir)/'`pam_setcred.c
-
-libpam_la-pam_setenv.lo: pam_setenv.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-pam_setenv.lo -MD -MP -MF "$(DEPDIR)/libpam_la-pam_setenv.Tpo" -c -o libpam_la-pam_setenv.lo `test -f 'pam_setenv.c' || echo '$(srcdir)/'`pam_setenv.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-pam_setenv.Tpo" "$(DEPDIR)/libpam_la-pam_setenv.Plo"; else rm -f "$(DEPDIR)/libpam_la-pam_setenv.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pam_setenv.c' object='libpam_la-pam_setenv.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-pam_setenv.lo `test -f 'pam_setenv.c' || echo '$(srcdir)/'`pam_setenv.c
-
-libpam_la-pam_start.lo: pam_start.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-pam_start.lo -MD -MP -MF "$(DEPDIR)/libpam_la-pam_start.Tpo" -c -o libpam_la-pam_start.lo `test -f 'pam_start.c' || echo '$(srcdir)/'`pam_start.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-pam_start.Tpo" "$(DEPDIR)/libpam_la-pam_start.Plo"; else rm -f "$(DEPDIR)/libpam_la-pam_start.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pam_start.c' object='libpam_la-pam_start.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-pam_start.lo `test -f 'pam_start.c' || echo '$(srcdir)/'`pam_start.c
-
-libpam_la-pam_strerror.lo: pam_strerror.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-pam_strerror.lo -MD -MP -MF "$(DEPDIR)/libpam_la-pam_strerror.Tpo" -c -o libpam_la-pam_strerror.lo `test -f 'pam_strerror.c' || echo '$(srcdir)/'`pam_strerror.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-pam_strerror.Tpo" "$(DEPDIR)/libpam_la-pam_strerror.Plo"; else rm -f "$(DEPDIR)/libpam_la-pam_strerror.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pam_strerror.c' object='libpam_la-pam_strerror.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-pam_strerror.lo `test -f 'pam_strerror.c' || echo '$(srcdir)/'`pam_strerror.c
-
-libpam_la-pam_verror.lo: pam_verror.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-pam_verror.lo -MD -MP -MF "$(DEPDIR)/libpam_la-pam_verror.Tpo" -c -o libpam_la-pam_verror.lo `test -f 'pam_verror.c' || echo '$(srcdir)/'`pam_verror.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-pam_verror.Tpo" "$(DEPDIR)/libpam_la-pam_verror.Plo"; else rm -f "$(DEPDIR)/libpam_la-pam_verror.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pam_verror.c' object='libpam_la-pam_verror.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-pam_verror.lo `test -f 'pam_verror.c' || echo '$(srcdir)/'`pam_verror.c
-
-libpam_la-pam_vinfo.lo: pam_vinfo.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-pam_vinfo.lo -MD -MP -MF "$(DEPDIR)/libpam_la-pam_vinfo.Tpo" -c -o libpam_la-pam_vinfo.lo `test -f 'pam_vinfo.c' || echo '$(srcdir)/'`pam_vinfo.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-pam_vinfo.Tpo" "$(DEPDIR)/libpam_la-pam_vinfo.Plo"; else rm -f "$(DEPDIR)/libpam_la-pam_vinfo.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pam_vinfo.c' object='libpam_la-pam_vinfo.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-pam_vinfo.lo `test -f 'pam_vinfo.c' || echo '$(srcdir)/'`pam_vinfo.c
-
-libpam_la-pam_vprompt.lo: pam_vprompt.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -MT libpam_la-pam_vprompt.lo -MD -MP -MF "$(DEPDIR)/libpam_la-pam_vprompt.Tpo" -c -o libpam_la-pam_vprompt.lo `test -f 'pam_vprompt.c' || echo '$(srcdir)/'`pam_vprompt.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpam_la-pam_vprompt.Tpo" "$(DEPDIR)/libpam_la-pam_vprompt.Plo"; else rm -f "$(DEPDIR)/libpam_la-pam_vprompt.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pam_vprompt.c' object='libpam_la-pam_vprompt.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpam_la_CFLAGS) $(CFLAGS) -c -o libpam_la-pam_vprompt.lo `test -f 'pam_vprompt.c' || echo '$(srcdir)/'`pam_vprompt.c
-
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
+ set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
+ $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@@ -797,7 +540,7 @@ check: check-am
all-am: Makefile $(LTLIBRARIES) $(HEADERS)
installdirs:
for dir in "$(DESTDIR)$(libdir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
@@ -819,6 +562,7 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -832,7 +576,7 @@ distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
- distclean-libtool distclean-tags
+ distclean-tags
dvi: dvi-am
@@ -840,18 +584,38 @@ dvi-am:
html: html-am
+html-am:
+
info: info-am
info-am:
install-data-am:
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
install-exec-am: install-libLTLIBRARIES
+install-html: install-html-am
+
+install-html-am:
+
install-info: install-info-am
+install-info-am:
+
install-man:
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -872,20 +636,24 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES
+uninstall-am: uninstall-libLTLIBRARIES
+
+.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libLTLIBRARIES clean-libtool ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-exec \
- install-exec-am install-info install-info-am \
- install-libLTLIBRARIES install-man install-strip installcheck \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am \
+ install-libLTLIBRARIES install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags uninstall uninstall-am uninstall-info-am \
- uninstall-libLTLIBRARIES
+ tags uninstall uninstall-am uninstall-libLTLIBRARIES
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/contrib/openpam/lib/openpam_borrow_cred.c b/contrib/openpam/lib/openpam_borrow_cred.c
index 79a349f..e0dfc55 100644
--- a/contrib/openpam/lib/openpam_borrow_cred.c
+++ b/contrib/openpam/lib/openpam_borrow_cred.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_borrow_cred.c 408 2007-12-21 11:36:24Z des $
+ * $Id: openpam_borrow_cred.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <sys/param.h>
#include <grp.h>
diff --git a/contrib/openpam/lib/openpam_check_owner_perms.c b/contrib/openpam/lib/openpam_check_owner_perms.c
new file mode 100644
index 0000000..9d64ed6
--- /dev/null
+++ b/contrib/openpam/lib/openpam_check_owner_perms.c
@@ -0,0 +1,129 @@
+/*-
+ * Copyright (c) 2011 Dag-Erling Smørgrav
+ * 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
+ * in this position and unchanged.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $Id: openpam_check_owner_perms.c 499 2011-11-22 11:51:50Z des $
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include <errno.h>
+#include <limits.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include <security/pam_appl.h>
+
+#include "openpam_impl.h"
+
+/*
+ * OpenPAM internal
+ *
+ * Verify that the file or directory referenced by the given descriptor is
+ * owned by either root or the arbitrator and that it is not writable by
+ * group or other.
+ */
+
+int
+openpam_check_desc_owner_perms(const char *name, int fd)
+{
+ uid_t root, arbitrator;
+ struct stat sb;
+ int serrno;
+
+ root = 0;
+ arbitrator = geteuid();
+ if (fstat(fd, &sb) != 0) {
+ serrno = errno;
+ openpam_log(PAM_LOG_ERROR, "%s: %m", name);
+ errno = serrno;
+ return (-1);
+ }
+ if ((sb.st_uid != root && sb.st_uid != arbitrator) ||
+ (sb.st_mode & (S_IWGRP|S_IWOTH)) != 0) {
+ openpam_log(PAM_LOG_ERROR,
+ "%s: insecure ownership or permissions", name);
+ errno = EPERM;
+ return (-1);
+ }
+ return (0);
+}
+
+/*
+ * OpenPAM internal
+ *
+ * Verify that a file or directory and all components of the path leading
+ * up to it are owned by either root or the arbitrator and that they are
+ * not writable by group or other.
+ *
+ * Note that openpam_check_file_owner_perms() should be used instead if
+ * possible to avoid a race between the ownership / permission check and
+ * the actual open().
+ */
+
+int
+openpam_check_path_owner_perms(const char *path)
+{
+ uid_t root, arbitrator;
+ char pathbuf[PATH_MAX];
+ struct stat sb;
+ int len, serrno;
+
+ root = 0;
+ arbitrator = geteuid();
+ if (realpath(path, pathbuf) == NULL)
+ return (-1);
+ len = strlen(pathbuf);
+ while (len > 0) {
+ if (stat(pathbuf, &sb) != 0) {
+ if (errno != ENOENT) {
+ serrno = errno;
+ openpam_log(PAM_LOG_ERROR, "%s: %m", pathbuf);
+ errno = serrno;
+ }
+ return (-1);
+ }
+ if ((sb.st_uid != root && sb.st_uid != arbitrator) ||
+ (sb.st_mode & (S_IWGRP|S_IWOTH)) != 0) {
+ openpam_log(PAM_LOG_ERROR,
+ "%s: insecure ownership or permissions", pathbuf);
+ errno = EPERM;
+ return (-1);
+ }
+ while (--len > 0 && pathbuf[len] != '/')
+ pathbuf[len] = '\0';
+ }
+ return (0);
+}
+
+/*
+ * NOPARSE
+ */
diff --git a/contrib/openpam/lib/openpam_configure.c b/contrib/openpam/lib/openpam_configure.c
index f9197ad..edf06c5 100644
--- a/contrib/openpam/lib/openpam_configure.c
+++ b/contrib/openpam/lib/openpam_configure.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2001-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_configure.c 408 2007-12-21 11:36:24Z des $
+ * $Id: openpam_configure.c 500 2011-11-22 12:07:03Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <ctype.h>
#include <errno.h>
#include <stdio.h>
@@ -44,80 +48,301 @@
#include <security/pam_appl.h>
#include "openpam_impl.h"
+#include "openpam_strlcmp.h"
-const char *_pam_facility_name[PAM_NUM_FACILITIES] = {
- [PAM_ACCOUNT] = "account",
- [PAM_AUTH] = "auth",
- [PAM_PASSWORD] = "password",
- [PAM_SESSION] = "session",
-};
+static int openpam_load_chain(pam_handle_t *, const char *, pam_facility_t);
-const char *_pam_control_flag_name[PAM_NUM_CONTROL_FLAGS] = {
- [PAM_BINDING] = "binding",
- [PAM_OPTIONAL] = "optional",
- [PAM_REQUIRED] = "required",
- [PAM_REQUISITE] = "requisite",
- [PAM_SUFFICIENT] = "sufficient",
-};
+/*
+ * Evaluates to non-zero if the argument is a linear whitespace character.
+ */
+#define is_lws(ch) \
+ (ch == ' ' || ch == '\t')
-static int openpam_load_chain(pam_handle_t *, const char *, pam_facility_t);
+/*
+ * Evaluates to non-zero if the argument is a printable ASCII character.
+ * Assumes that the execution character set is a superset of ASCII.
+ */
+#define is_p(ch) \
+ (ch >= '!' && ch <= '~')
+
+/*
+ * Returns non-zero if the argument belongs to the POSIX Portable Filename
+ * Character Set. Assumes that the execution character set is a superset
+ * of ASCII.
+ */
+#define is_pfcs(ch) \
+ ((ch >= '0' && ch <= '9') || \
+ (ch >= 'A' && ch <= 'Z') || \
+ (ch >= 'a' && ch <= 'z') || \
+ ch == '.' || ch == '_' || ch == '-')
+
+/*
+ * Parse the service name.
+ *
+ * Returns the length of the service name, or 0 if the end of the string
+ * was reached or a disallowed non-whitespace character was encountered.
+ *
+ * If parse_service_name() is successful, it updates *service to point to
+ * the first character of the service name and *line to point one
+ * character past the end. If it reaches the end of the string, it
+ * updates *line to point to the terminating NUL character and leaves
+ * *service unmodified. In all other cases, it leaves both *line and
+ * *service unmodified.
+ *
+ * Allowed characters are all characters in the POSIX portable filename
+ * character set.
+ */
+static int
+parse_service_name(char **line, char **service)
+{
+ char *b, *e;
+
+ for (b = *line; *b && is_lws(*b); ++b)
+ /* nothing */ ;
+ if (!*b) {
+ *line = b;
+ return (0);
+ }
+ for (e = b; *e && !is_lws(*e); ++e)
+ if (!is_pfcs(*e))
+ return (0);
+ if (e == b)
+ return (0);
+ *line = e;
+ *service = b;
+ return (e - b);
+}
+
+/*
+ * Parse the facility name.
+ *
+ * Returns the corresponding pam_facility_t value, or -1 if the end of the
+ * string was reached, a disallowed non-whitespace character was
+ * encountered, or the first word was not a recognized facility name.
+ *
+ * If parse_facility_name() is successful, it updates *line to point one
+ * character past the end of the facility name. If it reaches the end of
+ * the string, it updates *line to point to the terminating NUL character.
+ * In all other cases, it leaves *line unmodified.
+ */
+static pam_facility_t
+parse_facility_name(char **line)
+{
+ char *b, *e;
+ int i;
+
+ for (b = *line; *b && is_lws(*b); ++b)
+ /* nothing */ ;
+ if (!*b) {
+ *line = b;
+ return ((pam_facility_t)-1);
+ }
+ for (e = b; *e && !is_lws(*e); ++e)
+ /* nothing */ ;
+ if (e == b)
+ return ((pam_facility_t)-1);
+ for (i = 0; i < PAM_NUM_FACILITIES; ++i)
+ if (strlcmp(pam_facility_name[i], b, e - b) == 0)
+ break;
+ if (i == PAM_NUM_FACILITIES)
+ return ((pam_facility_t)-1);
+ *line = e;
+ return (i);
+}
/*
- * Matches a word against the first one in a string.
- * Returns non-zero if they match.
+ * Parse the word "include".
+ *
+ * If the next word on the line is "include", parse_include() updates
+ * *line to point one character past "include" and returns 1. Otherwise,
+ * it leaves *line unmodified and returns 0.
*/
static int
-match_word(const char *str, const char *word)
+parse_include(char **line)
{
+ char *b, *e;
- while (*str && tolower(*str) == tolower(*word))
- ++str, ++word;
- return (*str == ' ' && *word == '\0');
+ for (b = *line; *b && is_lws(*b); ++b)
+ /* nothing */ ;
+ if (!*b) {
+ *line = b;
+ return (-1);
+ }
+ for (e = b; *e && !is_lws(*e); ++e)
+ /* nothing */ ;
+ if (e == b)
+ return (0);
+ if (strlcmp("include", b, e - b) != 0)
+ return (0);
+ *line = e;
+ return (1);
}
/*
- * Return a pointer to the next word (or the final NUL) in a string.
+ * Parse the control flag.
+ *
+ * Returns the corresponding pam_control_t value, or -1 if the end of the
+ * string was reached, a disallowed non-whitespace character was
+ * encountered, or the first word was not a recognized control flag.
+ *
+ * If parse_control_flag() is successful, it updates *line to point one
+ * character past the end of the control flag. If it reaches the end of
+ * the string, it updates *line to point to the terminating NUL character.
+ * In all other cases, it leaves *line unmodified.
*/
-static const char *
-next_word(const char *str)
+static pam_control_t
+parse_control_flag(char **line)
{
+ char *b, *e;
+ int i;
- /* skip current word */
- while (*str && *str != ' ')
- ++str;
- /* skip whitespace */
- while (*str == ' ')
- ++str;
- return (str);
+ for (b = *line; *b && is_lws(*b); ++b)
+ /* nothing */ ;
+ if (!*b) {
+ *line = b;
+ return ((pam_control_t)-1);
+ }
+ for (e = b; *e && !is_lws(*e); ++e)
+ /* nothing */ ;
+ if (e == b)
+ return ((pam_control_t)-1);
+ for (i = 0; i < PAM_NUM_CONTROL_FLAGS; ++i)
+ if (strlcmp(pam_control_flag_name[i], b, e - b) == 0)
+ break;
+ if (i == PAM_NUM_CONTROL_FLAGS)
+ return ((pam_control_t)-1);
+ *line = e;
+ return (i);
}
/*
- * Return a malloc()ed copy of the first word in a string.
+ * Parse a file name.
+ *
+ * Returns the length of the file name, or 0 if the end of the string was
+ * reached or a disallowed non-whitespace character was encountered.
+ *
+ * If parse_filename() is successful, it updates *filename to point to the
+ * first character of the filename and *line to point one character past
+ * the end. If it reaches the end of the string, it updates *line to
+ * point to the terminating NUL character and leaves *filename unmodified.
+ * In all other cases, it leaves both *line and *filename unmodified.
+ *
+ * Allowed characters are all characters in the POSIX portable filename
+ * character set, plus the path separator (forward slash).
+ */
+static int
+parse_filename(char **line, char **filename)
+{
+ char *b, *e;
+
+ for (b = *line; *b && is_lws(*b); ++b)
+ /* nothing */ ;
+ if (!*b) {
+ *line = b;
+ return (0);
+ }
+ for (e = b; *e && !is_lws(*e); ++e)
+ if (!is_pfcs(*e) && *e != '/')
+ return (0);
+ if (e == b)
+ return (0);
+ *line = e;
+ *filename = b;
+ return (e - b);
+}
+
+/*
+ * Parse an option.
+ *
+ * Returns a dynamically allocated string containing the next module
+ * option, or NULL if the end of the string was reached or a disallowed
+ * non-whitespace character was encountered.
+ *
+ * If parse_option() is successful, it updates *line to point one
+ * character past the end of the option. If it reaches the end of the
+ * string, it updates *line to point to the terminating NUL character. In
+ * all other cases, it leaves *line unmodified.
+ *
+ * If parse_option() fails to allocate memory, it will return NULL and set
+ * errno to a non-zero value.
+ *
+ * Allowed characters for option names are all characters in the POSIX
+ * portable filename character set. Allowed characters for option values
+ * are any printable non-whitespace characters. The option value may be
+ * quoted in either single or double quotes, in which case space
+ * characters and whichever quote character was not used are allowed.
+ * Note that the entire value must be quoted, not just part of it.
*/
static char *
-dup_word(const char *str)
+parse_option(char **line)
{
- const char *end;
- char *word;
+ char *nb, *ne, *vb, *ve;
+ unsigned char q = 0;
+ char *option;
+ size_t size;
- for (end = str; *end && *end != ' '; ++end)
+ errno = 0;
+ for (nb = *line; *nb && is_lws(*nb); ++nb)
/* nothing */ ;
- if (asprintf(&word, "%.*s", (int)(end - str), str) < 0)
+ if (!*nb) {
+ *line = nb;
+ return (NULL);
+ }
+ for (ne = nb; *ne && !is_lws(*ne) && *ne != '='; ++ne)
+ if (!is_pfcs(*ne))
+ return (NULL);
+ if (ne == nb)
return (NULL);
- return (word);
+ if (*ne == '=') {
+ vb = ne + 1;
+ if (*vb == '"' || *vb == '\'')
+ q = *vb++;
+ for (ve = vb;
+ *ve && *ve != q && (is_p(*ve) || (q && is_lws(*ve)));
+ ++ve)
+ /* nothing */ ;
+ if (q && *ve != q)
+ /* non-printable character or missing endquote */
+ return (NULL);
+ if (q && *(ve + 1) && !is_lws(*(ve + 1)))
+ /* garbage after value */
+ return (NULL);
+ } else {
+ vb = ve = ne;
+ }
+ size = (ne - nb) + 1;
+ if (ve > vb)
+ size += (ve - vb) + 1;
+ if ((option = malloc(size)) == NULL)
+ return (NULL);
+ strncpy(option, nb, ne - nb);
+ if (ve > vb) {
+ option[ne - nb] = '=';
+ strncpy(option + (ne - nb) + 1, vb, ve - vb);
+ }
+ option[size - 1] = '\0';
+ *line = q ? ve + 1 : ve;
+ return (option);
}
/*
- * Return the length of the first word in a string.
+ * Consume trailing whitespace.
+ *
+ * If there are no non-whitespace characters left on the line, parse_eol()
+ * updates *line to point at the terminating NUL character and returns 0.
+ * Otherwise, it leaves *line unmodified and returns a non-zero value.
*/
static int
-wordlen(const char *str)
+parse_eol(char **line)
{
- int i;
+ char *p;
- for (i = 0; str[i] && str[i] != ' '; ++i)
+ for (p = *line; *p && is_lws(*p); ++p)
/* nothing */ ;
- return (i);
+ if (*p)
+ return ((unsigned char)*p);
+ *line = p;
+ return (0);
}
typedef enum { pam_conf_style, pam_d_style } openpam_style_t;
@@ -126,126 +351,139 @@ typedef enum { pam_conf_style, pam_d_style } openpam_style_t;
* Extracts given chains from a policy file.
*/
static int
-openpam_read_chain(pam_handle_t *pamh,
+openpam_parse_chain(pam_handle_t *pamh,
const char *service,
pam_facility_t facility,
const char *filename,
openpam_style_t style)
{
pam_chain_t *this, **next;
- const char *p, *q;
- int count, i, lineno, ret;
pam_facility_t fclt;
pam_control_t ctlf;
- char *line, *name;
+ char *line, *str, *name;
+ char *option, **optv;
+ int len, lineno, ret;
FILE *f;
if ((f = fopen(filename, "r")) == NULL) {
openpam_log(errno == ENOENT ? PAM_LOG_DEBUG : PAM_LOG_NOTICE,
"%s: %m", filename);
- return (0);
+ return (PAM_SUCCESS);
+ }
+ if (openpam_check_desc_owner_perms(filename, fileno(f)) != 0) {
+ fclose(f);
+ return (PAM_SYSTEM_ERR);
}
this = NULL;
- count = lineno = 0;
+ name = NULL;
+ lineno = 0;
while ((line = openpam_readline(f, &lineno, NULL)) != NULL) {
- p = line;
-
- /* match service name */
+ /* get service name if necessary */
if (style == pam_conf_style) {
- if (!match_word(p, service)) {
+ if ((len = parse_service_name(&line, &str)) == 0) {
+ openpam_log(PAM_LOG_NOTICE,
+ "%s(%d): invalid service name (ignored)",
+ filename, lineno);
+ FREE(line);
+ continue;
+ }
+ if (strlcmp(service, str, len) != 0) {
FREE(line);
continue;
}
- p = next_word(p);
}
- /* match facility name */
- for (fclt = 0; fclt < PAM_NUM_FACILITIES; ++fclt)
- if (match_word(p, _pam_facility_name[fclt]))
- break;
- if (fclt == PAM_NUM_FACILITIES) {
- openpam_log(PAM_LOG_NOTICE,
- "%s(%d): invalid facility '%.*s' (ignored)",
- filename, lineno, wordlen(p), p);
+ /* get facility name */
+ if ((fclt = parse_facility_name(&line)) == (pam_facility_t)-1) {
+ openpam_log(PAM_LOG_ERROR,
+ "%s(%d): missing or invalid facility",
+ filename, lineno);
goto fail;
}
if (facility != fclt && facility != PAM_FACILITY_ANY) {
FREE(line);
continue;
}
- p = next_word(p);
- /* include other chain */
- if (match_word(p, "include")) {
- p = next_word(p);
- if (*next_word(p) != '\0')
- openpam_log(PAM_LOG_NOTICE,
- "%s(%d): garbage at end of 'include' line",
+ /* check for "include" */
+ if (parse_include(&line)) {
+ if ((len = parse_service_name(&line, &str)) == 0) {
+ openpam_log(PAM_LOG_ERROR,
+ "%s(%d): missing or invalid filename",
filename, lineno);
- if ((name = dup_word(p)) == NULL)
+ goto fail;
+ }
+ if ((name = strndup(str, len)) == NULL)
goto syserr;
+ if (parse_eol(&line) != 0) {
+ openpam_log(PAM_LOG_ERROR,
+ "%s(%d): garbage at end of line",
+ filename, lineno);
+ goto fail;
+ }
ret = openpam_load_chain(pamh, name, fclt);
FREE(name);
- if (ret < 0)
+ if (ret != PAM_SUCCESS)
goto fail;
- count += ret;
FREE(line);
continue;
}
- /* allocate new entry */
- if ((this = calloc(1, sizeof *this)) == NULL)
- goto syserr;
+ /* get control flag */
+ if ((ctlf = parse_control_flag(&line)) == (pam_control_t)-1) {
+ openpam_log(PAM_LOG_ERROR,
+ "%s(%d): missing or invalid control flag",
+ filename, lineno);
+ goto fail;
+ }
- /* control flag */
- for (ctlf = 0; ctlf < PAM_NUM_CONTROL_FLAGS; ++ctlf)
- if (match_word(p, _pam_control_flag_name[ctlf]))
- break;
- if (ctlf == PAM_NUM_CONTROL_FLAGS) {
+ /* get module name */
+ if ((len = parse_filename(&line, &str)) == 0) {
openpam_log(PAM_LOG_ERROR,
- "%s(%d): invalid control flag '%.*s'",
- filename, lineno, wordlen(p), p);
+ "%s(%d): missing or invalid module name",
+ filename, lineno);
goto fail;
}
+ if ((name = strndup(str, len)) == NULL)
+ goto syserr;
+
+ /* allocate new entry */
+ if ((this = calloc(1, sizeof *this)) == NULL)
+ goto syserr;
this->flag = ctlf;
- /* module name */
- p = next_word(p);
- if (*p == '\0') {
+ /* get module options */
+ if ((this->optv = malloc(sizeof *optv)) == NULL)
+ goto syserr;
+ this->optc = 0;
+ while ((option = parse_option(&line)) != NULL) {
+ optv = realloc(this->optv,
+ (this->optc + 2) * sizeof *optv);
+ if (optv == NULL)
+ goto syserr;
+ this->optv = optv;
+ this->optv[this->optc++] = option;
+ }
+ this->optv[this->optc] = NULL;
+ if (*line != '\0') {
openpam_log(PAM_LOG_ERROR,
- "%s(%d): missing module name",
+ "%s(%d): syntax error in module options",
filename, lineno);
goto fail;
}
- if ((name = dup_word(p)) == NULL)
- goto syserr;
+
+ /* load module */
this->module = openpam_load_module(name);
FREE(name);
if (this->module == NULL)
goto fail;
- /* module options */
- p = q = next_word(p);
- while (*q != '\0') {
- ++this->optc;
- q = next_word(q);
- }
- this->optv = calloc(this->optc + 1, sizeof(char *));
- if (this->optv == NULL)
- goto syserr;
- for (i = 0; i < this->optc; ++i) {
- if ((this->optv[i] = dup_word(p)) == NULL)
- goto syserr;
- p = next_word(p);
- }
-
/* hook it up */
for (next = &pamh->chains[fclt]; *next != NULL;
next = &(*next)->next)
/* nothing */ ;
*next = this;
this = NULL;
- ++count;
/* next please... */
FREE(line);
@@ -253,14 +491,20 @@ openpam_read_chain(pam_handle_t *pamh,
if (!feof(f))
goto syserr;
fclose(f);
- return (count);
- syserr:
+ return (PAM_SUCCESS);
+syserr:
openpam_log(PAM_LOG_ERROR, "%s: %m", filename);
- fail:
+fail:
+ if (this && this->optc) {
+ while (this->optc--)
+ FREE(this->optv[this->optc]);
+ FREE(this->optv);
+ }
FREE(this);
FREE(line);
+ FREE(name);
fclose(f);
- return (-1);
+ return (PAM_SYSTEM_ERR);
}
static const char *openpam_policy_path[] = {
@@ -283,26 +527,33 @@ openpam_load_chain(pam_handle_t *pamh,
const char **path;
char *filename;
size_t len;
- int r;
+ int ret;
+
+ /* don't allow to escape from policy_path */
+ if (strchr(service, '/')) {
+ openpam_log(PAM_LOG_ERROR, "invalid service name: %s",
+ service);
+ return (-PAM_SYSTEM_ERR);
+ }
for (path = openpam_policy_path; *path != NULL; ++path) {
len = strlen(*path);
if ((*path)[len - 1] == '/') {
if (asprintf(&filename, "%s%s", *path, service) < 0) {
openpam_log(PAM_LOG_ERROR, "asprintf(): %m");
- return (-PAM_BUF_ERR);
+ return (PAM_BUF_ERR);
}
- r = openpam_read_chain(pamh, service, facility,
+ ret = openpam_parse_chain(pamh, service, facility,
filename, pam_d_style);
FREE(filename);
} else {
- r = openpam_read_chain(pamh, service, facility,
+ ret = openpam_parse_chain(pamh, service, facility,
*path, pam_conf_style);
}
- if (r != 0)
- return (r);
+ if (ret != PAM_SUCCESS)
+ return (ret);
}
- return (0);
+ return (PAM_SUCCESS);
}
/*
@@ -316,18 +567,23 @@ openpam_configure(pam_handle_t *pamh,
const char *service)
{
pam_facility_t fclt;
+ const char *p;
+
+ for (p = service; *p; ++p)
+ if (!is_pfcs(*p))
+ return (PAM_SYSTEM_ERR);
- if (openpam_load_chain(pamh, service, PAM_FACILITY_ANY) < 0)
+ if (openpam_load_chain(pamh, service, PAM_FACILITY_ANY) != PAM_SUCCESS)
goto load_err;
for (fclt = 0; fclt < PAM_NUM_FACILITIES; ++fclt) {
if (pamh->chains[fclt] != NULL)
continue;
- if (openpam_load_chain(pamh, PAM_OTHER, fclt) < 0)
+ if (openpam_load_chain(pamh, PAM_OTHER, fclt) != PAM_SUCCESS)
goto load_err;
}
return (PAM_SUCCESS);
- load_err:
+load_err:
openpam_clear_chains(pamh->chains);
return (PAM_SYSTEM_ERR);
}
diff --git a/contrib/openpam/lib/openpam_constants.c b/contrib/openpam/lib/openpam_constants.c
new file mode 100644
index 0000000..833e81f
--- /dev/null
+++ b/contrib/openpam/lib/openpam_constants.c
@@ -0,0 +1,127 @@
+/*-
+ * Copyright (c) 2001-2003 Networks Associates Technology, Inc.
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
+ * All rights reserved.
+ *
+ * This software was developed for the FreeBSD Project by ThinkSec AS and
+ * Network Associates Laboratories, the Security Research Division of
+ * Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035
+ * ("CBOSS"), as part of the DARPA CHATS research program.
+ *
+ * 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. The name of the author may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $Id: openpam_constants.c 491 2011-11-12 00:12:32Z des $
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <security/pam_appl.h>
+
+#include "openpam_impl.h"
+
+const char *pam_err_name[PAM_NUM_ERRORS] = {
+ "PAM_SUCCESS",
+ "PAM_OPEN_ERR",
+ "PAM_SYMBOL_ERR",
+ "PAM_SERVICE_ERR",
+ "PAM_SYSTEM_ERR",
+ "PAM_BUF_ERR",
+ "PAM_CONV_ERR",
+ "PAM_PERM_DENIED",
+ "PAM_MAXTRIES",
+ "PAM_AUTH_ERR",
+ "PAM_NEW_AUTHTOK_REQD",
+ "PAM_CRED_INSUFFICIENT",
+ "PAM_AUTHINFO_UNAVAIL",
+ "PAM_USER_UNKNOWN",
+ "PAM_CRED_UNAVAIL",
+ "PAM_CRED_EXPIRED",
+ "PAM_CRED_ERR",
+ "PAM_ACCT_EXPIRED",
+ "PAM_AUTHTOK_EXPIRED",
+ "PAM_SESSION_ERR",
+ "PAM_AUTHTOK_ERR",
+ "PAM_AUTHTOK_RECOVERY_ERR",
+ "PAM_AUTHTOK_LOCK_BUSY",
+ "PAM_AUTHTOK_DISABLE_AGING",
+ "PAM_NO_MODULE_DATA",
+ "PAM_IGNORE",
+ "PAM_ABORT",
+ "PAM_TRY_AGAIN",
+ "PAM_MODULE_UNKNOWN",
+ "PAM_DOMAIN_UNKNOWN"
+};
+
+const char *pam_item_name[PAM_NUM_ITEMS] = {
+ "(NO ITEM)",
+ "PAM_SERVICE",
+ "PAM_USER",
+ "PAM_TTY",
+ "PAM_RHOST",
+ "PAM_CONV",
+ "PAM_AUTHTOK",
+ "PAM_OLDAUTHTOK",
+ "PAM_RUSER",
+ "PAM_USER_PROMPT",
+ "PAM_REPOSITORY",
+ "PAM_AUTHTOK_PROMPT",
+ "PAM_OLDAUTHTOK_PROMPT",
+ "PAM_HOST",
+};
+
+const char *pam_facility_name[PAM_NUM_FACILITIES] = {
+ [PAM_ACCOUNT] = "account",
+ [PAM_AUTH] = "auth",
+ [PAM_PASSWORD] = "password",
+ [PAM_SESSION] = "session",
+};
+
+const char *pam_control_flag_name[PAM_NUM_CONTROL_FLAGS] = {
+ [PAM_BINDING] = "binding",
+ [PAM_OPTIONAL] = "optional",
+ [PAM_REQUIRED] = "required",
+ [PAM_REQUISITE] = "requisite",
+ [PAM_SUFFICIENT] = "sufficient",
+};
+
+const char *pam_func_name[PAM_NUM_PRIMITIVES] = {
+ "pam_authenticate",
+ "pam_setcred",
+ "pam_acct_mgmt",
+ "pam_open_session",
+ "pam_close_session",
+ "pam_chauthtok"
+};
+
+const char *pam_sm_func_name[PAM_NUM_PRIMITIVES] = {
+ "pam_sm_authenticate",
+ "pam_sm_setcred",
+ "pam_sm_acct_mgmt",
+ "pam_sm_open_session",
+ "pam_sm_close_session",
+ "pam_sm_chauthtok"
+};
diff --git a/contrib/openpam/lib/openpam_constants.h b/contrib/openpam/lib/openpam_constants.h
new file mode 100644
index 0000000..b923179
--- /dev/null
+++ b/contrib/openpam/lib/openpam_constants.h
@@ -0,0 +1,40 @@
+/*-
+ * Copyright (c) 2011 Dag-Erling Smørgrav
+ * 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
+ * in this position and unchanged.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $Id: openpam_constants.h 491 2011-11-12 00:12:32Z des $
+ */
+
+#ifndef OPENPAM_CONSTANTS_INCLUDED
+#define OPENPAM_CONSTANTS_INCLUDED
+
+extern const char *pam_err_name[PAM_NUM_ERRORS];
+extern const char *pam_item_name[PAM_NUM_ITEMS];
+extern const char *pam_facility_name[PAM_NUM_FACILITIES];
+extern const char *pam_control_flag_name[PAM_NUM_CONTROL_FLAGS];
+extern const char *pam_func_name[PAM_NUM_PRIMITIVES];
+extern const char *pam_sm_func_name[PAM_NUM_PRIMITIVES];
+
+#endif
diff --git a/contrib/openpam/lib/openpam_debug.h b/contrib/openpam/lib/openpam_debug.h
new file mode 100644
index 0000000..ef2884d
--- /dev/null
+++ b/contrib/openpam/lib/openpam_debug.h
@@ -0,0 +1,103 @@
+/*-
+ * Copyright (c) 2001-2003 Networks Associates Technology, Inc.
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
+ * All rights reserved.
+ *
+ * This software was developed for the FreeBSD Project by ThinkSec AS and
+ * Network Associates Laboratories, the Security Research Division of
+ * Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035
+ * ("CBOSS"), as part of the DARPA CHATS research program.
+ *
+ * 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. The name of the author may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $Id: openpam_debug.h 491 2011-11-12 00:12:32Z des $
+ */
+
+#ifndef OPENPAM_DEBUG_INCLUDED
+#define OPENPAM_DEBUG_INCLUDED
+
+#ifdef OPENPAM_DEBUG
+#define ENTER() openpam_log(PAM_LOG_DEBUG, "entering")
+#define ENTERI(i) do { \
+ int i_ = (i); \
+ if (i_ > 0 && i_ < PAM_NUM_ITEMS) \
+ openpam_log(PAM_LOG_DEBUG, "entering: %s", pam_item_name[i_]); \
+ else \
+ openpam_log(PAM_LOG_DEBUG, "entering: %d", i_); \
+} while (0)
+#define ENTERN(n) do { \
+ int n_ = (n); \
+ openpam_log(PAM_LOG_DEBUG, "entering: %d", n_); \
+} while (0)
+#define ENTERS(s) do { \
+ const char *s_ = (s); \
+ if (s_ == NULL) \
+ openpam_log(PAM_LOG_DEBUG, "entering: NULL"); \
+ else \
+ openpam_log(PAM_LOG_DEBUG, "entering: '%s'", s_); \
+} while (0)
+#define RETURNV() openpam_log(PAM_LOG_DEBUG, "returning")
+#define RETURNC(c) do { \
+ int c_ = (c); \
+ if (c_ >= 0 && c_ < PAM_NUM_ERRORS) \
+ openpam_log(PAM_LOG_DEBUG, "returning %s", pam_err_name[c_]); \
+ else \
+ openpam_log(PAM_LOG_DEBUG, "returning %d!", c_); \
+ return (c_); \
+} while (0)
+#define RETURNN(n) do { \
+ int n_ = (n); \
+ openpam_log(PAM_LOG_DEBUG, "returning %d", n_); \
+ return (n_); \
+} while (0)
+#define RETURNP(p) do { \
+ const void *p_ = (p); \
+ if (p_ == NULL) \
+ openpam_log(PAM_LOG_DEBUG, "returning NULL"); \
+ else \
+ openpam_log(PAM_LOG_DEBUG, "returning %p", p_); \
+ return (p_); \
+} while (0)
+#define RETURNS(s) do { \
+ const char *s_ = (s); \
+ if (s_ == NULL) \
+ openpam_log(PAM_LOG_DEBUG, "returning NULL"); \
+ else \
+ openpam_log(PAM_LOG_DEBUG, "returning '%s'", s_); \
+ return (s_); \
+} while (0)
+#else
+#define ENTER()
+#define ENTERI(i)
+#define ENTERN(n)
+#define ENTERS(s)
+#define RETURNV() return
+#define RETURNC(c) return (c)
+#define RETURNN(n) return (n)
+#define RETURNP(p) return (p)
+#define RETURNS(s) return (s)
+#endif
+
+#endif
diff --git a/contrib/openpam/lib/openpam_dispatch.c b/contrib/openpam/lib/openpam_dispatch.c
index 69fe472..54dfd3b 100644
--- a/contrib/openpam/lib/openpam_dispatch.c
+++ b/contrib/openpam/lib/openpam_dispatch.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_dispatch.c 408 2007-12-21 11:36:24Z des $
+ * $Id: openpam_dispatch.c 501 2011-12-07 01:28:05Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <sys/param.h>
#include <security/pam_appl.h>
@@ -42,9 +46,9 @@
#include "openpam_impl.h"
#if !defined(OPENPAM_RELAX_CHECKS)
-static void _openpam_check_error_code(int, int);
+static void openpam_check_error_code(int, int);
#else
-#define _openpam_check_error_code(a, b)
+#define openpam_check_error_code(a, b)
#endif /* !defined(OPENPAM_RELAX_CHECKS) */
/*
@@ -60,9 +64,7 @@ openpam_dispatch(pam_handle_t *pamh,
{
pam_chain_t *chain;
int err, fail, r;
-#ifdef DEBUG
int debug;
-#endif
ENTER();
if (pamh == NULL)
@@ -72,9 +74,9 @@ openpam_dispatch(pam_handle_t *pamh,
if (pamh->current != NULL) {
openpam_log(PAM_LOG_ERROR,
"%s() called while %s::%s() is in progress",
- _pam_func_name[primitive],
+ pam_func_name[primitive],
pamh->current->module->path,
- _pam_sm_func_name[pamh->primitive]);
+ pam_sm_func_name[pamh->primitive]);
RETURNC(PAM_ABORT);
}
@@ -102,28 +104,24 @@ openpam_dispatch(pam_handle_t *pamh,
for (err = fail = 0; chain != NULL; chain = chain->next) {
if (chain->module->func[primitive] == NULL) {
openpam_log(PAM_LOG_ERROR, "%s: no %s()",
- chain->module->path, _pam_sm_func_name[primitive]);
- continue;
+ chain->module->path, pam_sm_func_name[primitive]);
+ r = PAM_SYSTEM_ERR;
} else {
pamh->primitive = primitive;
pamh->current = chain;
-#ifdef DEBUG
debug = (openpam_get_option(pamh, "debug") != NULL);
if (debug)
- ++_openpam_debug;
+ ++openpam_debug;
openpam_log(PAM_LOG_DEBUG, "calling %s() in %s",
- _pam_sm_func_name[primitive], chain->module->path);
-#endif
+ pam_sm_func_name[primitive], chain->module->path);
r = (chain->module->func[primitive])(pamh, flags,
chain->optc, (const char **)chain->optv);
pamh->current = NULL;
-#ifdef DEBUG
openpam_log(PAM_LOG_DEBUG, "%s: %s(): %s",
- chain->module->path, _pam_sm_func_name[primitive],
+ chain->module->path, pam_sm_func_name[primitive],
pam_strerror(pamh, r));
if (debug)
- --_openpam_debug;
-#endif
+ --openpam_debug;
}
if (r == PAM_IGNORE)
@@ -143,7 +141,7 @@ openpam_dispatch(pam_handle_t *pamh,
continue;
}
- _openpam_check_error_code(primitive, r);
+ openpam_check_error_code(primitive, r);
/*
* Record the return code from the first module to
@@ -177,7 +175,7 @@ openpam_dispatch(pam_handle_t *pamh,
#if !defined(OPENPAM_RELAX_CHECKS)
static void
-_openpam_check_error_code(int primitive, int r)
+openpam_check_error_code(int primitive, int r)
{
/* common error codes */
if (r == PAM_SUCCESS ||
@@ -229,7 +227,7 @@ _openpam_check_error_code(int primitive, int r)
}
openpam_log(PAM_LOG_ERROR, "%s(): unexpected return value %d",
- _pam_sm_func_name[primitive], r);
+ pam_sm_func_name[primitive], r);
}
#endif /* !defined(OPENPAM_RELAX_CHECKS) */
diff --git a/contrib/openpam/lib/openpam_dynamic.c b/contrib/openpam/lib/openpam_dynamic.c
index e2abcf7..d44174f 100644
--- a/contrib/openpam/lib/openpam_dynamic.c
+++ b/contrib/openpam/lib/openpam_dynamic.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2008 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_dynamic.c 417 2008-02-14 18:36:22Z des $
+ * $Id: openpam_dynamic.c 502 2011-12-18 13:59:22Z des $
*/
#ifdef HAVE_CONFIG_H
@@ -40,9 +40,11 @@
#endif
#include <dlfcn.h>
+#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include <security/pam_appl.h>
@@ -55,6 +57,21 @@
/*
* OpenPAM internal
*
+ * Perform sanity checks and attempt to load a module
+ */
+
+static void *
+try_dlopen(const char *modfn)
+{
+
+ if (openpam_check_path_owner_perms(modfn) != 0)
+ return (NULL);
+ return (dlopen(modfn, RTLD_NOW));
+}
+
+/*
+ * OpenPAM internal
+ *
* Locate a dynamically linked module
*/
@@ -66,7 +83,7 @@ openpam_dynamic(const char *path)
const char *prefix;
char *vpath;
void *dlh;
- int i;
+ int i, serrno;
dlh = NULL;
@@ -79,16 +96,15 @@ openpam_dynamic(const char *path)
/* try versioned module first, then unversioned module */
if (asprintf(&vpath, "%s%s.%d", prefix, path, LIB_MAJ) < 0)
goto err;
- if ((dlh = dlopen(vpath, RTLD_NOW)) == NULL) {
- openpam_log(PAM_LOG_DEBUG, "%s: %s", vpath, dlerror());
+ if ((dlh = try_dlopen(vpath)) == NULL && errno == ENOENT) {
*strrchr(vpath, '.') = '\0';
- if ((dlh = dlopen(vpath, RTLD_NOW)) == NULL) {
- openpam_log(PAM_LOG_DEBUG, "%s: %s", vpath, dlerror());
- FREE(vpath);
- return (NULL);
- }
+ dlh = try_dlopen(vpath);
}
+ serrno = errno;
FREE(vpath);
+ errno = serrno;
+ if (dlh == NULL)
+ goto err;
if ((module = calloc(1, sizeof *module)) == NULL)
goto buf_err;
if ((module->path = strdup(path)) == NULL)
@@ -97,10 +113,10 @@ openpam_dynamic(const char *path)
dlmodule = dlsym(dlh, "_pam_module");
for (i = 0; i < PAM_NUM_PRIMITIVES; ++i) {
module->func[i] = dlmodule ? dlmodule->func[i] :
- (pam_func_t)dlsym(dlh, _pam_sm_func_name[i]);
+ (pam_func_t)dlsym(dlh, pam_sm_func_name[i]);
if (module->func[i] == NULL)
openpam_log(PAM_LOG_DEBUG, "%s: %s(): %s",
- path, _pam_sm_func_name[i], dlerror());
+ path, pam_sm_func_name[i], dlerror());
}
return (module);
buf_err:
diff --git a/contrib/openpam/lib/openpam_findenv.c b/contrib/openpam/lib/openpam_findenv.c
index d78e147..b833ec9 100644
--- a/contrib/openpam/lib/openpam_findenv.c
+++ b/contrib/openpam/lib/openpam_findenv.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_findenv.c 408 2007-12-21 11:36:24Z des $
+ * $Id: openpam_findenv.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <string.h>
#include <security/pam_appl.h>
diff --git a/contrib/openpam/lib/openpam_free_data.c b/contrib/openpam/lib/openpam_free_data.c
index e071c0a..561687c 100644
--- a/contrib/openpam/lib/openpam_free_data.c
+++ b/contrib/openpam/lib/openpam_free_data.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_free_data.c 408 2007-12-21 11:36:24Z des $
+ * $Id: openpam_free_data.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <stdlib.h>
#include <string.h>
diff --git a/contrib/openpam/lib/openpam_free_envlist.c b/contrib/openpam/lib/openpam_free_envlist.c
index 346c2dd..14754dc 100644
--- a/contrib/openpam/lib/openpam_free_envlist.c
+++ b/contrib/openpam/lib/openpam_free_envlist.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2005 Dag-Erling Coïdan Smørgrav
+ * Copyright (c) 2005-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -25,9 +25,13 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: openpam_free_envlist.c 320 2006-02-16 20:33:19Z des $
+ * $Id: openpam_free_envlist.c 447 2011-10-22 02:47:36Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <stdlib.h>
#include <security/pam_appl.h>
@@ -63,4 +67,6 @@ openpam_free_envlist(char **envlist)
* frees all the environment variables in an environment list, and the
* list itself.
* It is suitable for freeing the return value from =pam_getenvlist.
+ *
+ * AUTHOR DES
*/
diff --git a/contrib/openpam/lib/openpam_get_option.c b/contrib/openpam/lib/openpam_get_option.c
index 73bc070..b5faa87 100644
--- a/contrib/openpam/lib/openpam_get_option.c
+++ b/contrib/openpam/lib/openpam_get_option.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_get_option.c 408 2007-12-21 11:36:24Z des $
+ * $Id: openpam_get_option.c 482 2011-11-03 16:33:02Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <sys/param.h>
#include <string.h>
diff --git a/contrib/openpam/lib/openpam_impl.h b/contrib/openpam/lib/openpam_impl.h
index 7704d4e..ba4d455 100644
--- a/contrib/openpam/lib/openpam_impl.h
+++ b/contrib/openpam/lib/openpam_impl.h
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2001-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,24 +32,15 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_impl.h 408 2007-12-21 11:36:24Z des $
+ * $Id: openpam_impl.h 499 2011-11-22 11:51:50Z des $
*/
-#ifndef _OPENPAM_IMPL_H_INCLUDED
-#define _OPENPAM_IMPL_H_INCLUDED
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#ifndef OPENPAM_IMPL_H_INCLUDED
+#define OPENPAM_IMPL_H_INCLUDED
#include <security/openpam.h>
-extern const char *_pam_func_name[PAM_NUM_PRIMITIVES];
-extern const char *_pam_sm_func_name[PAM_NUM_PRIMITIVES];
-extern const char *_pam_err_name[PAM_NUM_ERRORS];
-extern const char *_pam_item_name[PAM_NUM_ITEMS];
-
-extern int _openpam_debug;
+extern int openpam_debug;
/*
* Control flags
@@ -75,6 +66,9 @@ typedef enum {
PAM_NUM_FACILITIES
} pam_facility_t;
+/*
+ * Module chains
+ */
typedef struct pam_chain pam_chain_t;
struct pam_chain {
pam_module_t *module;
@@ -84,6 +78,21 @@ struct pam_chain {
pam_chain_t *next;
};
+/*
+ * Service policies
+ */
+#if defined(OPENPAM_EMBEDDED)
+typedef struct pam_policy pam_policy_t;
+struct pam_policy {
+ const char *service;
+ pam_chain_t *chains[PAM_NUM_FACILITIES];
+};
+extern pam_policy_t *pam_embedded_policies[];
+#endif
+
+/*
+ * Module-specific data
+ */
typedef struct pam_data pam_data_t;
struct pam_data {
char *name;
@@ -92,6 +101,9 @@ struct pam_data {
pam_data_t *next;
};
+/*
+ * PAM context
+ */
struct pam_handle {
char *service;
@@ -111,6 +123,9 @@ struct pam_handle {
};
#ifdef NGROUPS_MAX
+/*
+ * Saved credentials
+ */
#define PAM_SAVED_CRED "pam_saved_cred"
struct pam_saved_cred {
uid_t euid;
@@ -120,14 +135,23 @@ struct pam_saved_cred {
};
#endif
+/*
+ * Default policy
+ */
#define PAM_OTHER "other"
+/*
+ * Internal functions
+ */
int openpam_configure(pam_handle_t *, const char *);
int openpam_dispatch(pam_handle_t *, int, int);
int openpam_findenv(pam_handle_t *, const char *, size_t);
pam_module_t *openpam_load_module(const char *);
void openpam_clear_chains(pam_chain_t **);
+int openpam_check_desc_owner_perms(const char *, int);
+int openpam_check_path_owner_perms(const char *);
+
#ifdef OPENPAM_STATIC_MODULES
pam_module_t *openpam_static(const char *);
#endif
@@ -135,66 +159,7 @@ pam_module_t *openpam_dynamic(const char *);
#define FREE(p) do { free((p)); (p) = NULL; } while (0)
-#ifdef DEBUG
-#define ENTER() openpam_log(PAM_LOG_DEBUG, "entering")
-#define ENTERI(i) do { \
- int _i = (i); \
- if (_i > 0 && _i < PAM_NUM_ITEMS) \
- openpam_log(PAM_LOG_DEBUG, "entering: %s", _pam_item_name[_i]); \
- else \
- openpam_log(PAM_LOG_DEBUG, "entering: %d", _i); \
-} while (0)
-#define ENTERN(n) do { \
- int _n = (n); \
- openpam_log(PAM_LOG_DEBUG, "entering: %d", _n); \
-} while (0)
-#define ENTERS(s) do { \
- const char *_s = (s); \
- if (_s == NULL) \
- openpam_log(PAM_LOG_DEBUG, "entering: NULL"); \
- else \
- openpam_log(PAM_LOG_DEBUG, "entering: '%s'", _s); \
-} while (0)
-#define RETURNV() openpam_log(PAM_LOG_DEBUG, "returning")
-#define RETURNC(c) do { \
- int _c = (c); \
- if (_c >= 0 && _c < PAM_NUM_ERRORS) \
- openpam_log(PAM_LOG_DEBUG, "returning %s", _pam_err_name[_c]); \
- else \
- openpam_log(PAM_LOG_DEBUG, "returning %d!", _c); \
- return (_c); \
-} while (0)
-#define RETURNN(n) do { \
- int _n = (n); \
- openpam_log(PAM_LOG_DEBUG, "returning %d", _n); \
- return (_n); \
-} while (0)
-#define RETURNP(p) do { \
- const void *_p = (p); \
- if (_p == NULL) \
- openpam_log(PAM_LOG_DEBUG, "returning NULL"); \
- else \
- openpam_log(PAM_LOG_DEBUG, "returning %p", _p); \
- return (p); \
-} while (0)
-#define RETURNS(s) do { \
- const char *_s = (s); \
- if (_s == NULL) \
- openpam_log(PAM_LOG_DEBUG, "returning NULL"); \
- else \
- openpam_log(PAM_LOG_DEBUG, "returning '%s'", _s); \
- return (_s); \
-} while (0)
-#else
-#define ENTER()
-#define ENTERI(i)
-#define ENTERN(n)
-#define ENTERS(s)
-#define RETURNV() return
-#define RETURNC(c) return (c)
-#define RETURNN(n) return (n)
-#define RETURNP(p) return (p)
-#define RETURNS(s) return (s)
-#endif
+#include "openpam_constants.h"
+#include "openpam_debug.h"
#endif
diff --git a/contrib/openpam/lib/openpam_load.c b/contrib/openpam/lib/openpam_load.c
index 303f3f5..0eb8ea7 100644
--- a/contrib/openpam/lib/openpam_load.c
+++ b/contrib/openpam/lib/openpam_load.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_load.c 408 2007-12-21 11:36:24Z des $
+ * $Id: openpam_load.c 491 2011-11-12 00:12:32Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <dlfcn.h>
#include <stdlib.h>
#include <string.h>
@@ -43,24 +47,6 @@
#include "openpam_impl.h"
-const char *_pam_func_name[PAM_NUM_PRIMITIVES] = {
- "pam_authenticate",
- "pam_setcred",
- "pam_acct_mgmt",
- "pam_open_session",
- "pam_close_session",
- "pam_chauthtok"
-};
-
-const char *_pam_sm_func_name[PAM_NUM_PRIMITIVES] = {
- "pam_sm_authenticate",
- "pam_sm_setcred",
- "pam_sm_acct_mgmt",
- "pam_sm_open_session",
- "pam_sm_close_session",
- "pam_sm_chauthtok"
-};
-
/*
* Locate a matching dynamic or static module.
*/
@@ -122,10 +108,8 @@ openpam_destroy_chain(pam_chain_t *chain)
return;
openpam_destroy_chain(chain->next);
chain->next = NULL;
- while (chain->optc) {
- --chain->optc;
+ while (chain->optc--)
FREE(chain->optv[chain->optc]);
- }
FREE(chain->optv);
openpam_release_module(chain->module);
chain->module = NULL;
diff --git a/contrib/openpam/lib/openpam_log.c b/contrib/openpam/lib/openpam_log.c
index e492294..9e3d28b 100644
--- a/contrib/openpam/lib/openpam_log.c
+++ b/contrib/openpam/lib/openpam_log.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_log.c 408 2007-12-21 11:36:24Z des $
+ * $Id: openpam_log.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <ctype.h>
#include <stdarg.h>
#include <stdio.h>
@@ -47,9 +51,9 @@
#include "openpam_impl.h"
#ifdef OPENPAM_DEBUG
-int _openpam_debug = 1;
+int openpam_debug = 1;
#else
-int _openpam_debug = 0;
+int openpam_debug = 0;
#endif
#if !defined(openpam_log)
@@ -68,7 +72,7 @@ openpam_log(int level, const char *fmt, ...)
switch (level) {
case PAM_LOG_DEBUG:
- if (!_openpam_debug)
+ if (!openpam_debug)
return;
priority = LOG_DEBUG;
break;
@@ -99,7 +103,7 @@ _openpam_log(int level, const char *func, const char *fmt, ...)
switch (level) {
case PAM_LOG_DEBUG:
- if (!_openpam_debug)
+ if (!openpam_debug)
return;
priority = LOG_DEBUG;
break;
@@ -136,7 +140,7 @@ _openpam_log(int level, const char *func, const char *fmt, ...)
* =PAM_LOG_DEBUG:
* Debugging messages.
* These messages are normally not logged unless the global
- * integer variable :_openpam_debug is set to a non-zero
+ * integer variable :openpam_debug is set to a non-zero
* value, in which case they are logged with a =syslog
* priority of =LOG_DEBUG.
* =PAM_LOG_VERBOSE:
diff --git a/contrib/openpam/lib/openpam_nullconv.c b/contrib/openpam/lib/openpam_nullconv.c
index 3294dcf..a95b1e0 100644
--- a/contrib/openpam/lib/openpam_nullconv.c
+++ b/contrib/openpam/lib/openpam_nullconv.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_nullconv.c 408 2007-12-21 11:36:24Z des $
+ * $Id: openpam_nullconv.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <sys/types.h>
#include <security/pam_appl.h>
diff --git a/contrib/openpam/lib/openpam_readline.c b/contrib/openpam/lib/openpam_readline.c
index 17f03f3..9cc8cc1 100644
--- a/contrib/openpam/lib/openpam_readline.c
+++ b/contrib/openpam/lib/openpam_readline.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_readline.c 408 2007-12-21 11:36:24Z des $
+ * $Id: openpam_readline.c 473 2011-11-03 10:48:25Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
@@ -83,33 +87,23 @@ openpam_readline(FILE *f, int *lineno, size_t *lenp)
}
/* eof */
if (ch == EOF) {
- /* remove trailing whitespace */
- while (len > 0 && isspace((int)line[len - 1]))
- --len;
- line[len] = '\0';
- if (len == 0)
- goto fail;
+ /* done */
break;
}
/* eol */
if (ch == '\n') {
if (lineno != NULL)
++*lineno;
-
- /* remove trailing whitespace */
- while (len > 0 && isspace((int)line[len - 1]))
- --len;
- line[len] = '\0';
/* skip blank lines */
if (len == 0)
continue;
/* continuation */
if (line[len - 1] == '\\') {
line[--len] = '\0';
- /* fall through to whitespace case */
- } else {
- break;
+ continue;
}
+ /* done */
+ break;
}
/* whitespace */
if (isspace(ch)) {
@@ -123,10 +117,16 @@ openpam_readline(FILE *f, int *lineno, size_t *lenp)
line_putch(ch);
}
+ /* remove trailing whitespace */
+ while (len > 0 && isspace((unsigned char)line[len - 1]))
+ --len;
+ line[len] = '\0';
+ if (len == 0)
+ goto fail;
if (lenp != NULL)
*lenp = len;
return (line);
- fail:
+fail:
FREE(line);
return (NULL);
}
@@ -136,13 +136,14 @@ openpam_readline(FILE *f, int *lineno, size_t *lenp)
* in a NUL-terminated buffer allocated with =malloc.
*
* The =openpam_readline function performs a certain amount of processing
- * on the data it reads.
- * Comments (introduced by a hash sign) are stripped, as is leading and
- * trailing whitespace.
- * Any amount of linear whitespace is collapsed to a single space.
- * Blank lines are ignored.
- * If a line ends in a backslash, the backslash is stripped and the next
- * line is appended.
+ * on the data it reads:
+ *
+ * - Comments (introduced by a hash sign) are stripped, as is leading and
+ * trailing whitespace.
+ * - Any amount of linear whitespace is collapsed to a single space.
+ * - Blank lines are ignored.
+ * - If a line ends in a backslash, the backslash is stripped and the
+ * next line is appended.
*
* If =lineno is not =NULL, the integer variable it points to is
* incremented every time a newline character is read.
diff --git a/contrib/openpam/lib/openpam_restore_cred.c b/contrib/openpam/lib/openpam_restore_cred.c
index 20e80d4..41d44d0 100644
--- a/contrib/openpam/lib/openpam_restore_cred.c
+++ b/contrib/openpam/lib/openpam_restore_cred.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_restore_cred.c 408 2007-12-21 11:36:24Z des $
+ * $Id: openpam_restore_cred.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <sys/param.h>
#include <grp.h>
diff --git a/contrib/openpam/lib/openpam_set_option.c b/contrib/openpam/lib/openpam_set_option.c
index 57161d3..c7cb1c7 100644
--- a/contrib/openpam/lib/openpam_set_option.c
+++ b/contrib/openpam/lib/openpam_set_option.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_set_option.c 408 2007-12-21 11:36:24Z des $
+ * $Id: openpam_set_option.c 482 2011-11-03 16:33:02Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <sys/param.h>
#include <stdio.h>
diff --git a/contrib/openpam/lib/openpam_static.c b/contrib/openpam/lib/openpam_static.c
index c06ceed..40b807c 100644
--- a/contrib/openpam/lib/openpam_static.c
+++ b/contrib/openpam/lib/openpam_static.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_static.c 408 2007-12-21 11:36:24Z des $
+ * $Id: openpam_static.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <string.h>
#include <security/pam_appl.h>
@@ -43,7 +47,7 @@
#ifdef OPENPAM_STATIC_MODULES
-SET_DECLARE(_openpam_static_modules, pam_module_t);
+SET_DECLARE(openpam_static_modules, pam_module_t);
/*
* OpenPAM internal
@@ -56,7 +60,7 @@ openpam_static(const char *path)
{
pam_module_t **module;
- SET_FOREACH(module, _openpam_static_modules) {
+ SET_FOREACH(module, openpam_static_modules) {
if (strcmp((*module)->path, path) == 0)
return (*module);
}
diff --git a/contrib/openpam/lib/openpam_strlcmp.h b/contrib/openpam/lib/openpam_strlcmp.h
new file mode 100644
index 0000000..c692225
--- /dev/null
+++ b/contrib/openpam/lib/openpam_strlcmp.h
@@ -0,0 +1,46 @@
+/*-
+ * Copyright (c) 2011 Dag-Erling Smørgrav
+ * 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
+ * in this position and unchanged.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $Id: openpam_strlcmp.h 475 2011-11-03 15:29:24Z des $
+ */
+
+#ifndef OPENPAM_STRLCMP_H_INCLUDED
+#define OPENPAM_STRLCMP_H_INCLUDED
+
+#ifndef HAVE_STRLCMP
+/* like strcmp(3), but verifies that the entirety of s1 was matched */
+static int
+strlcmp(const char *s1, const char *s2, size_t len)
+{
+
+ for (; len && *s1 && *s2; --len, ++s1, ++s2)
+ if (*s1 != *s2)
+ return ((unsigned char)*s1 - (unsigned char)*s2);
+ return ((unsigned char)*s1);
+}
+#endif
+
+#endif
diff --git a/contrib/openpam/lib/openpam_strlcpy.h b/contrib/openpam/lib/openpam_strlcpy.h
new file mode 100644
index 0000000..921653b
--- /dev/null
+++ b/contrib/openpam/lib/openpam_strlcpy.h
@@ -0,0 +1,49 @@
+/*-
+ * Copyright (c) 2011 Dag-Erling Smørgrav
+ * 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
+ * in this position and unchanged.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $Id: openpam_strlcpy.h 492 2011-11-20 02:04:17Z des $
+ */
+
+#ifndef OPENPAM_STRLCPY_H_INCLUDED
+#define OPENPAM_STRLCPY_H_INCLUDED
+
+#ifndef HAVE_STRLCPY
+/* like strcpy(3), but always NUL-terminates; returns strlen(src) */
+size_t
+strlcpy(char *dst, const char *src, size_t size)
+{
+ size_t len;
+
+ for (len = 0; *src && size > 1; ++len, --size)
+ *dst++ = *src++;
+ *dst = '\0';
+ while (*src)
+ ++len, ++src;
+ return (len);
+}
+#endif
+
+#endif
diff --git a/contrib/openpam/lib/openpam_subst.c b/contrib/openpam/lib/openpam_subst.c
new file mode 100644
index 0000000..d54b827
--- /dev/null
+++ b/contrib/openpam/lib/openpam_subst.c
@@ -0,0 +1,168 @@
+/*-
+ * Copyright (c) 2011 Dag-Erling Smørgrav
+ * 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
+ * in this position and unchanged.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $Id: openpam_subst.c 461 2011-11-02 14:00:38Z des $
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <security/pam_appl.h>
+
+#include "openpam_impl.h"
+
+#define subst_char(ch) do { \
+ int ch_ = (ch); \
+ if (buf && len < *bufsize) \
+ *buf++ = ch_; \
+ ++len; \
+} while (0)
+
+#define subst_string(s) do { \
+ const char *s_ = (s); \
+ while (*s_) \
+ subst_char(*s_++); \
+} while (0)
+
+#define subst_item(i) do { \
+ int i_ = (i); \
+ const void *p_; \
+ ret = pam_get_item(pamh, i_, &p_); \
+ if (ret == PAM_SUCCESS && p_ != NULL) \
+ subst_string(p_); \
+} while (0)
+
+/*
+ * OpenPAM internal
+ *
+ * Substitute PAM item values in a string
+ */
+
+int
+openpam_subst(const pam_handle_t *pamh,
+ char *buf, size_t *bufsize, const char *template)
+{
+ size_t len;
+ int ret;
+
+ ENTERS(template);
+ if (template == NULL)
+ template = "(null)";
+
+ len = 1; /* initialize to 1 for terminating NUL */
+ ret = PAM_SUCCESS;
+ while (*template && ret == PAM_SUCCESS) {
+ if (template[0] == '%') {
+ ++template;
+ switch (*template) {
+ case 's':
+ subst_item(PAM_SERVICE);
+ break;
+ case 't':
+ subst_item(PAM_TTY);
+ break;
+ case 'h':
+ subst_item(PAM_HOST);
+ break;
+ case 'u':
+ subst_item(PAM_USER);
+ break;
+ case 'H':
+ subst_item(PAM_RHOST);
+ break;
+ case 'U':
+ subst_item(PAM_RUSER);
+ break;
+ case '\0':
+ subst_char('%');
+ break;
+ default:
+ subst_char('%');
+ subst_char(*template);
+ }
+ ++template;
+ } else {
+ subst_char(*template++);
+ }
+ }
+ if (buf)
+ *buf = '\0';
+ if (ret == PAM_SUCCESS) {
+ if (len > *bufsize)
+ ret = PAM_TRY_AGAIN;
+ *bufsize = len;
+ }
+ RETURNC(ret);
+}
+
+/*
+ * Error codes:
+ *
+ * =pam_get_item
+ * !PAM_SYMBOL_ERR
+ * PAM_TRY_AGAIN
+ */
+
+/**
+ * The =openpam_subst function expands a string, substituting PAM item
+ * values for all occurrences of specific substitution codes.
+ * The =template argument points to the initial string.
+ * The result is stored in the buffer pointed to by the =buf argument; the
+ * =bufsize argument specifies the size of that buffer.
+ * The actual size of the resulting string, including the terminating NUL
+ * character, is stored in the location pointed to by the =bufsize
+ * argument.
+ *
+ * If =buf is NULL, or if the buffer is too small to hold the expanded
+ * string, =bufsize is updated to reflect the amount of space required to
+ * hold the entire string, and =openpam_subst returns =PAM_TRY_AGAIN.
+ *
+ * If =openpam_subst fails for any other reason, the =bufsize argument is
+ * untouched, but part of the buffer may still have been overwritten.
+ *
+ * Substitution codes are introduced by a percent character and correspond
+ * to PAM items:
+ *
+ * %H:
+ * Replaced by the current value of the =PAM_RHOST item.
+ * %h:
+ * Replaced by the current value of the =PAM_HOST item.
+ * %s:
+ * Replaced by the current value of the =PAM_SERVICE item.
+ * %t:
+ * Replaced by the current value of the =PAM_TTY item.
+ * %U:
+ * Replaced by the current value of the =PAM_RUSER item.
+ * %u:
+ * Replaced by the current value of the =PAM_USER item.
+ *
+ * >pam_get_authtok
+ * >pam_get_item
+ * >pam_get_user
+ *
+ * AUTHOR DES
+ */
diff --git a/contrib/openpam/lib/openpam_ttyconv.c b/contrib/openpam/lib/openpam_ttyconv.c
index a6820b9..ec078f4 100644
--- a/contrib/openpam/lib/openpam_ttyconv.c
+++ b/contrib/openpam/lib/openpam_ttyconv.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_ttyconv.c 408 2007-12-21 11:36:24Z des $
+ * $Id: openpam_ttyconv.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <sys/types.h>
#include <ctype.h>
@@ -211,7 +215,7 @@ openpam_ttyconv(int n,
}
*resp = aresp;
RETURNC(PAM_SUCCESS);
- fail:
+fail:
for (i = 0; i < n; ++i) {
if (aresp[i].resp != NULL) {
memset(aresp[i].resp, 0, strlen(aresp[i].resp));
diff --git a/contrib/openpam/lib/pam_acct_mgmt.c b/contrib/openpam/lib/pam_acct_mgmt.c
index 0088ecf..49c34ab 100644
--- a/contrib/openpam/lib/pam_acct_mgmt.c
+++ b/contrib/openpam/lib/pam_acct_mgmt.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_acct_mgmt.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_acct_mgmt.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <sys/param.h>
#include <security/pam_appl.h>
diff --git a/contrib/openpam/lib/pam_authenticate.c b/contrib/openpam/lib/pam_authenticate.c
index 3b5a78d..fc6c20f 100644
--- a/contrib/openpam/lib/pam_authenticate.c
+++ b/contrib/openpam/lib/pam_authenticate.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_authenticate.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_authenticate.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <sys/param.h>
#include <security/pam_appl.h>
diff --git a/contrib/openpam/lib/pam_authenticate_secondary.c b/contrib/openpam/lib/pam_authenticate_secondary.c
index 27e3ce7..1a57313 100644
--- a/contrib/openpam/lib/pam_authenticate_secondary.c
+++ b/contrib/openpam/lib/pam_authenticate_secondary.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_authenticate_secondary.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_authenticate_secondary.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <security/pam_appl.h>
/*
diff --git a/contrib/openpam/lib/pam_chauthtok.c b/contrib/openpam/lib/pam_chauthtok.c
index ecf1063..1750b0f 100644
--- a/contrib/openpam/lib/pam_chauthtok.c
+++ b/contrib/openpam/lib/pam_chauthtok.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_chauthtok.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_chauthtok.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <sys/param.h>
#include <security/pam_appl.h>
diff --git a/contrib/openpam/lib/pam_close_session.c b/contrib/openpam/lib/pam_close_session.c
index ab50e35..9e63a1d 100644
--- a/contrib/openpam/lib/pam_close_session.c
+++ b/contrib/openpam/lib/pam_close_session.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_close_session.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_close_session.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <sys/param.h>
#include <security/pam_appl.h>
diff --git a/contrib/openpam/lib/pam_end.c b/contrib/openpam/lib/pam_end.c
index 80baf8a..09cde35 100644
--- a/contrib/openpam/lib/pam_end.c
+++ b/contrib/openpam/lib/pam_end.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_end.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_end.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <stdlib.h>
#include <security/pam_appl.h>
diff --git a/contrib/openpam/lib/pam_error.c b/contrib/openpam/lib/pam_error.c
index f42a6b5..1e0de5b 100644
--- a/contrib/openpam/lib/pam_error.c
+++ b/contrib/openpam/lib/pam_error.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_error.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_error.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/contrib/openpam/lib/pam_get_authtok.c b/contrib/openpam/lib/pam_get_authtok.c
index 2a974c9..a0613ef 100644
--- a/contrib/openpam/lib/pam_get_authtok.c
+++ b/contrib/openpam/lib/pam_get_authtok.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_get_authtok.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_get_authtok.c 455 2011-10-29 18:31:11Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <sys/param.h>
#include <stdlib.h>
@@ -61,8 +65,10 @@ pam_get_authtok(pam_handle_t *pamh,
const char **authtok,
const char *prompt)
{
+ char prompt_buf[1024];
+ size_t prompt_size;
const void *oldauthtok, *prevauthtok, *promptp;
- const char *default_prompt;
+ const char *prompt_option, *default_prompt;
char *resp, *resp2;
int pitem, r, style, twice;
@@ -74,6 +80,7 @@ pam_get_authtok(pam_handle_t *pamh,
switch (item) {
case PAM_AUTHTOK:
pitem = PAM_AUTHTOK_PROMPT;
+ prompt_option = "authtok_prompt";
default_prompt = authtok_prompt;
r = pam_get_item(pamh, PAM_OLDAUTHTOK, &oldauthtok);
if (r == PAM_SUCCESS && oldauthtok != NULL) {
@@ -83,6 +90,7 @@ pam_get_authtok(pam_handle_t *pamh,
break;
case PAM_OLDAUTHTOK:
pitem = PAM_OLDAUTHTOK_PROMPT;
+ prompt_option = "oldauthtok_prompt";
default_prompt = oldauthtok_prompt;
twice = 0;
break;
@@ -99,13 +107,21 @@ pam_get_authtok(pam_handle_t *pamh,
else if (openpam_get_option(pamh, "use_first_pass"))
RETURNC(r == PAM_SUCCESS ? PAM_AUTH_ERR : r);
}
- if (prompt == NULL) {
- r = pam_get_item(pamh, pitem, &promptp);
- if (r != PAM_SUCCESS || promptp == NULL)
- prompt = default_prompt;
- else
+ /* pam policy overrides the module's choice */
+ if ((promptp = openpam_get_option(pamh, prompt_option)) != NULL)
+ prompt = promptp;
+ /* no prompt provided, see if there is one tucked away somewhere */
+ if (prompt == NULL)
+ if (pam_get_item(pamh, pitem, &promptp) && promptp != NULL)
prompt = promptp;
- }
+ /* fall back to hardcoded default */
+ if (prompt == NULL)
+ prompt = default_prompt;
+ /* expand */
+ prompt_size = sizeof prompt_buf;
+ r = openpam_subst(pamh, prompt_buf, &prompt_size, prompt);
+ if (r == PAM_SUCCESS && prompt_size <= sizeof prompt_buf)
+ prompt = prompt_buf;
style = openpam_get_option(pamh, "echo_pass") ?
PAM_PROMPT_ECHO_ON : PAM_PROMPT_ECHO_OFF;
r = pam_prompt(pamh, style, &resp, "%s", prompt);
@@ -160,6 +176,13 @@ pam_get_authtok(pam_handle_t *pamh,
* If it is =NULL, the =PAM_AUTHTOK_PROMPT or =PAM_OLDAUTHTOK_PROMPT item,
* as appropriate, will be used.
* If that item is also =NULL, a hardcoded default prompt will be used.
+ * Either way, the prompt is expanded using =openpam_subst before it is
+ * passed to the conversation function.
+ *
+ * If =pam_get_authtok is called from a module and the ;authtok_prompt /
+ * ;oldauthtok_prompt option is set in the policy file, the value of that
+ * option takes precedence over both the =prompt argument and the
+ * =PAM_AUTHTOK_PROMPT / =PAM_OLDAUTHTOK_PROMPT item.
*
* If =item is set to =PAM_AUTHTOK and there is a non-null =PAM_OLDAUTHTOK
* item, =pam_get_authtok will ask the user to confirm the new token by
@@ -168,4 +191,5 @@ pam_get_authtok(pam_handle_t *pamh,
*
* >pam_get_item
* >pam_get_user
+ * >openpam_subst
*/
diff --git a/contrib/openpam/lib/pam_get_data.c b/contrib/openpam/lib/pam_get_data.c
index 0cceef0..1a8ba1d 100644
--- a/contrib/openpam/lib/pam_get_data.c
+++ b/contrib/openpam/lib/pam_get_data.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_get_data.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_get_data.c 444 2011-10-22 01:03:23Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <string.h>
#include <security/pam_appl.h>
@@ -80,6 +84,7 @@ pam_get_data(const pam_handle_t *pamh,
* context specified by the =pamh argument.
* A pointer to the object is stored in the location pointed to by the
* =data argument.
+ * If =pam_get_data fails, the =data argument is untouched.
*
* This function and its counterpart =pam_set_data are useful for managing
* data that are meaningful only to a particular service module.
diff --git a/contrib/openpam/lib/pam_get_item.c b/contrib/openpam/lib/pam_get_item.c
index 9f127be..95b9df6 100644
--- a/contrib/openpam/lib/pam_get_item.c
+++ b/contrib/openpam/lib/pam_get_item.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,31 +32,19 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_get_item.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_get_item.c 491 2011-11-12 00:12:32Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <sys/param.h>
#include <security/pam_appl.h>
#include "openpam_impl.h"
-const char *_pam_item_name[PAM_NUM_ITEMS] = {
- "(NO ITEM)",
- "PAM_SERVICE",
- "PAM_USER",
- "PAM_TTY",
- "PAM_RHOST",
- "PAM_CONV",
- "PAM_AUTHTOK",
- "PAM_OLDAUTHTOK",
- "PAM_RUSER",
- "PAM_USER_PROMPT",
- "PAM_REPOSITORY",
- "PAM_AUTHTOK_PROMPT",
- "PAM_OLDAUTHTOK_PROMPT"
-};
-
/*
* XSSO 4.2.1
* XSSO 6 page 46
@@ -83,9 +71,10 @@ pam_get_item(const pam_handle_t *pamh,
case PAM_RUSER:
case PAM_CONV:
case PAM_USER_PROMPT:
+ case PAM_REPOSITORY:
case PAM_AUTHTOK_PROMPT:
case PAM_OLDAUTHTOK_PROMPT:
- case PAM_REPOSITORY:
+ case PAM_HOST:
*item = pamh->item[item_type];
RETURNC(PAM_SUCCESS);
default:
@@ -102,10 +91,12 @@ pam_get_item(const pam_handle_t *pamh,
/**
* The =pam_get_item function stores a pointer to the item specified by
- * the =item_type argument in the location specified by the =item
+ * the =item_type argument in the location pointed to by the =item
* argument.
* The item is retrieved from the PAM context specified by the =pamh
* argument.
+ * If =pam_get_item fails, the =item argument is untouched.
+ *
* The following item types are recognized:
*
* =PAM_SERVICE:
@@ -135,6 +126,8 @@ pam_get_item(const pam_handle_t *pamh,
* =PAM_OLDAUTHTOK_PROMPT:
* The prompt to use when asking the applicant for an
* expired authentication token prior to changing it.
+ * =PAM_HOST:
+ * The name of the host the application runs on.
*
* See =pam_start for a description of =struct pam_conv.
*
diff --git a/contrib/openpam/lib/pam_get_mapped_authtok.c b/contrib/openpam/lib/pam_get_mapped_authtok.c
index c49a918..54ff6c3 100644
--- a/contrib/openpam/lib/pam_get_mapped_authtok.c
+++ b/contrib/openpam/lib/pam_get_mapped_authtok.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_get_mapped_authtok.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_get_mapped_authtok.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <security/pam_appl.h>
/*
diff --git a/contrib/openpam/lib/pam_get_mapped_username.c b/contrib/openpam/lib/pam_get_mapped_username.c
index 359baee..4f8ac17 100644
--- a/contrib/openpam/lib/pam_get_mapped_username.c
+++ b/contrib/openpam/lib/pam_get_mapped_username.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_get_mapped_username.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_get_mapped_username.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <security/pam_appl.h>
/*
diff --git a/contrib/openpam/lib/pam_get_user.c b/contrib/openpam/lib/pam_get_user.c
index 115a3ea..53245b9 100644
--- a/contrib/openpam/lib/pam_get_user.c
+++ b/contrib/openpam/lib/pam_get_user.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_get_user.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_get_user.c 455 2011-10-29 18:31:11Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <sys/param.h>
#include <stdlib.h>
@@ -58,6 +62,8 @@ pam_get_user(pam_handle_t *pamh,
const char **user,
const char *prompt)
{
+ char prompt_buf[1024];
+ size_t prompt_size;
const void *promptp;
char *resp;
int r;
@@ -68,13 +74,22 @@ pam_get_user(pam_handle_t *pamh,
r = pam_get_item(pamh, PAM_USER, (const void **)user);
if (r == PAM_SUCCESS && *user != NULL)
RETURNC(PAM_SUCCESS);
- if (prompt == NULL) {
- r = pam_get_item(pamh, PAM_USER_PROMPT, &promptp);
- if (r != PAM_SUCCESS || promptp == NULL)
- prompt = user_prompt;
- else
+ /* pam policy overrides the module's choice */
+ if ((promptp = openpam_get_option(pamh, "user_prompt")) != NULL)
+ prompt = promptp;
+ /* no prompt provided, see if there is one tucked away somewhere */
+ if (prompt == NULL)
+ if (pam_get_item(pamh, PAM_USER_PROMPT, &promptp) &&
+ promptp != NULL)
prompt = promptp;
- }
+ /* fall back to hardcoded default */
+ if (prompt == NULL)
+ prompt = user_prompt;
+ /* expand */
+ prompt_size = sizeof prompt_buf;
+ r = openpam_subst(pamh, prompt_buf, &prompt_size, prompt);
+ if (r == PAM_SUCCESS && prompt_size <= sizeof prompt_buf)
+ prompt = prompt_buf;
r = pam_prompt(pamh, PAM_PROMPT_ECHO_ON, &resp, "%s", prompt);
if (r != PAM_SUCCESS)
RETURNC(r);
@@ -105,9 +120,16 @@ pam_get_user(pam_handle_t *pamh,
*
* The =prompt argument specifies a prompt to use if no user name is
* cached.
- * If it is =NULL, the =PAM_USER_PROMPT will be used.
+ * If it is =NULL, the =PAM_USER_PROMPT item will be used.
* If that item is also =NULL, a hardcoded default prompt will be used.
+ * Either way, the prompt is expanded using =openpam_subst before it is
+ * passed to the conversation function.
+ *
+ * If =pam_get_user is called from a module and the ;user_prompt option is
+ * set in the policy file, the value of that option takes precedence over
+ * both the =prompt argument and the =PAM_USER_PROMPT item.
*
* >pam_get_item
* >pam_get_authtok
+ * >openpam_subst
*/
diff --git a/contrib/openpam/lib/pam_getenv.c b/contrib/openpam/lib/pam_getenv.c
index f2d7910..e2ebf57 100644
--- a/contrib/openpam/lib/pam_getenv.c
+++ b/contrib/openpam/lib/pam_getenv.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_getenv.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_getenv.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <stdlib.h>
#include <string.h>
diff --git a/contrib/openpam/lib/pam_getenvlist.c b/contrib/openpam/lib/pam_getenvlist.c
index c0e128a..06c003f 100644
--- a/contrib/openpam/lib/pam_getenvlist.c
+++ b/contrib/openpam/lib/pam_getenvlist.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_getenvlist.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_getenvlist.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <stdlib.h>
#include <string.h>
diff --git a/contrib/openpam/lib/pam_info.c b/contrib/openpam/lib/pam_info.c
index 2e4dbc7..7e51dbf 100644
--- a/contrib/openpam/lib/pam_info.c
+++ b/contrib/openpam/lib/pam_info.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_info.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_info.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/contrib/openpam/lib/pam_open_session.c b/contrib/openpam/lib/pam_open_session.c
index f8d6eca..36c59b0 100644
--- a/contrib/openpam/lib/pam_open_session.c
+++ b/contrib/openpam/lib/pam_open_session.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_open_session.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_open_session.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <sys/param.h>
#include <security/pam_appl.h>
diff --git a/contrib/openpam/lib/pam_prompt.c b/contrib/openpam/lib/pam_prompt.c
index 76da55f..194e765 100644
--- a/contrib/openpam/lib/pam_prompt.c
+++ b/contrib/openpam/lib/pam_prompt.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_prompt.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_prompt.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <sys/types.h>
#include <stdarg.h>
diff --git a/contrib/openpam/lib/pam_putenv.c b/contrib/openpam/lib/pam_putenv.c
index 79d6228..369066d 100644
--- a/contrib/openpam/lib/pam_putenv.c
+++ b/contrib/openpam/lib/pam_putenv.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_putenv.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_putenv.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <stdlib.h>
#include <string.h>
diff --git a/contrib/openpam/lib/pam_set_data.c b/contrib/openpam/lib/pam_set_data.c
index 963de92..a8de632 100644
--- a/contrib/openpam/lib/pam_set_data.c
+++ b/contrib/openpam/lib/pam_set_data.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_set_data.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_set_data.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <stdlib.h>
#include <string.h>
diff --git a/contrib/openpam/lib/pam_set_item.c b/contrib/openpam/lib/pam_set_item.c
index 9b60618..05d538f 100644
--- a/contrib/openpam/lib/pam_set_item.c
+++ b/contrib/openpam/lib/pam_set_item.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_set_item.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_set_item.c 496 2011-11-21 16:20:45Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <sys/param.h>
#include <stdlib.h>
@@ -66,6 +70,10 @@ pam_set_item(pam_handle_t *pamh,
osize = nsize = 0;
switch (item_type) {
case PAM_SERVICE:
+ /* set once only, by pam_start() */
+ if (*slot != NULL)
+ RETURNC(PAM_SYSTEM_ERR);
+ /* fall through */
case PAM_USER:
case PAM_AUTHTOK:
case PAM_OLDAUTHTOK:
@@ -75,6 +83,7 @@ pam_set_item(pam_handle_t *pamh,
case PAM_USER_PROMPT:
case PAM_AUTHTOK_PROMPT:
case PAM_OLDAUTHTOK_PROMPT:
+ case PAM_HOST:
if (*slot != NULL)
osize = strlen(*slot) + 1;
if (item != NULL)
diff --git a/contrib/openpam/lib/pam_set_mapped_authtok.c b/contrib/openpam/lib/pam_set_mapped_authtok.c
index 01ad255..d8db84f 100644
--- a/contrib/openpam/lib/pam_set_mapped_authtok.c
+++ b/contrib/openpam/lib/pam_set_mapped_authtok.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_set_mapped_authtok.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_set_mapped_authtok.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <security/pam_appl.h>
/*
diff --git a/contrib/openpam/lib/pam_set_mapped_username.c b/contrib/openpam/lib/pam_set_mapped_username.c
index ae3619b..4b8f815 100644
--- a/contrib/openpam/lib/pam_set_mapped_username.c
+++ b/contrib/openpam/lib/pam_set_mapped_username.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_set_mapped_username.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_set_mapped_username.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <security/pam_appl.h>
/*
diff --git a/contrib/openpam/lib/pam_setcred.c b/contrib/openpam/lib/pam_setcred.c
index 80eb468..51fb081 100644
--- a/contrib/openpam/lib/pam_setcred.c
+++ b/contrib/openpam/lib/pam_setcred.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_setcred.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_setcred.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <sys/param.h>
#include <security/pam_appl.h>
diff --git a/contrib/openpam/lib/pam_setenv.c b/contrib/openpam/lib/pam_setenv.c
index e73f6b5..fbe6a8f 100644
--- a/contrib/openpam/lib/pam_setenv.c
+++ b/contrib/openpam/lib/pam_setenv.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_setenv.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_setenv.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/contrib/openpam/lib/pam_sm_acct_mgmt.c b/contrib/openpam/lib/pam_sm_acct_mgmt.c
index a57e86a..f5c14cf 100644
--- a/contrib/openpam/lib/pam_sm_acct_mgmt.c
+++ b/contrib/openpam/lib/pam_sm_acct_mgmt.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_sm_acct_mgmt.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_sm_acct_mgmt.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <sys/param.h>
#include <security/pam_appl.h>
diff --git a/contrib/openpam/lib/pam_sm_authenticate.c b/contrib/openpam/lib/pam_sm_authenticate.c
index 7f4bb1c..97851af 100644
--- a/contrib/openpam/lib/pam_sm_authenticate.c
+++ b/contrib/openpam/lib/pam_sm_authenticate.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_sm_authenticate.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_sm_authenticate.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <sys/param.h>
#include <security/pam_appl.h>
diff --git a/contrib/openpam/lib/pam_sm_authenticate_secondary.c b/contrib/openpam/lib/pam_sm_authenticate_secondary.c
index bde0366..3f3f6bd 100644
--- a/contrib/openpam/lib/pam_sm_authenticate_secondary.c
+++ b/contrib/openpam/lib/pam_sm_authenticate_secondary.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_sm_authenticate_secondary.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_sm_authenticate_secondary.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <sys/param.h>
#include <security/pam_appl.h>
diff --git a/contrib/openpam/lib/pam_sm_chauthtok.c b/contrib/openpam/lib/pam_sm_chauthtok.c
index 2c41d6d..593344c 100644
--- a/contrib/openpam/lib/pam_sm_chauthtok.c
+++ b/contrib/openpam/lib/pam_sm_chauthtok.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_sm_chauthtok.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_sm_chauthtok.c 466 2011-11-02 23:33:43Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <sys/param.h>
#include <security/pam_appl.h>
@@ -80,4 +84,8 @@ pam_sm_chauthtok(pam_handle_t *pamh,
/**
* The =pam_sm_chauthtok function is the service module's implementation
* of the =pam_chauthtok API function.
+ *
+ * When the application calls =pam_chauthtok, the service function is
+ * called twice, first with the =PAM_PRELIM_CHECK flag set and then again
+ * with the =PAM_UPDATE_AUTHTOK flag set.
*/
diff --git a/contrib/openpam/lib/pam_sm_close_session.c b/contrib/openpam/lib/pam_sm_close_session.c
index 25cee92..290f497 100644
--- a/contrib/openpam/lib/pam_sm_close_session.c
+++ b/contrib/openpam/lib/pam_sm_close_session.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_sm_close_session.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_sm_close_session.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <sys/param.h>
#include <security/pam_appl.h>
diff --git a/contrib/openpam/lib/pam_sm_get_mapped_authtok.c b/contrib/openpam/lib/pam_sm_get_mapped_authtok.c
index 9d85d5f..e86e6e5 100644
--- a/contrib/openpam/lib/pam_sm_get_mapped_authtok.c
+++ b/contrib/openpam/lib/pam_sm_get_mapped_authtok.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_sm_get_mapped_authtok.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_sm_get_mapped_authtok.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <sys/param.h>
#include <security/pam_appl.h>
diff --git a/contrib/openpam/lib/pam_sm_get_mapped_username.c b/contrib/openpam/lib/pam_sm_get_mapped_username.c
index ee4d250..596ca6c 100644
--- a/contrib/openpam/lib/pam_sm_get_mapped_username.c
+++ b/contrib/openpam/lib/pam_sm_get_mapped_username.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_sm_get_mapped_username.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_sm_get_mapped_username.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <sys/param.h>
#include <security/pam_appl.h>
diff --git a/contrib/openpam/lib/pam_sm_open_session.c b/contrib/openpam/lib/pam_sm_open_session.c
index bfe0794..acb401a 100644
--- a/contrib/openpam/lib/pam_sm_open_session.c
+++ b/contrib/openpam/lib/pam_sm_open_session.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_sm_open_session.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_sm_open_session.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <sys/param.h>
#include <security/pam_appl.h>
diff --git a/contrib/openpam/lib/pam_sm_set_mapped_authtok.c b/contrib/openpam/lib/pam_sm_set_mapped_authtok.c
index 54fd370..dab40fd 100644
--- a/contrib/openpam/lib/pam_sm_set_mapped_authtok.c
+++ b/contrib/openpam/lib/pam_sm_set_mapped_authtok.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_sm_set_mapped_authtok.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_sm_set_mapped_authtok.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <sys/param.h>
#include <security/pam_appl.h>
diff --git a/contrib/openpam/lib/pam_sm_set_mapped_username.c b/contrib/openpam/lib/pam_sm_set_mapped_username.c
index 0239dbb..3011016 100644
--- a/contrib/openpam/lib/pam_sm_set_mapped_username.c
+++ b/contrib/openpam/lib/pam_sm_set_mapped_username.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_sm_set_mapped_username.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_sm_set_mapped_username.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <sys/param.h>
#include <security/pam_appl.h>
diff --git a/contrib/openpam/lib/pam_sm_setcred.c b/contrib/openpam/lib/pam_sm_setcred.c
index 4d472b3..0d30683 100644
--- a/contrib/openpam/lib/pam_sm_setcred.c
+++ b/contrib/openpam/lib/pam_sm_setcred.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_sm_setcred.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_sm_setcred.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <sys/param.h>
#include <security/pam_appl.h>
diff --git a/contrib/openpam/lib/pam_start.c b/contrib/openpam/lib/pam_start.c
index ee6468b..84e0085 100644
--- a/contrib/openpam/lib/pam_start.c
+++ b/contrib/openpam/lib/pam_start.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,14 +32,27 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_start.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_start.c 503 2011-12-18 14:00:33Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
#include <security/pam_appl.h>
#include "openpam_impl.h"
+#include "openpam_strlcpy.h"
+
+#ifdef _SC_HOST_NAME_MAX
+#define HOST_NAME_MAX sysconf(_SC_HOST_NAME_MAX)
+#else
+#define HOST_NAME_MAX 1024
+#endif
/*
* XSSO 4.2.1
@@ -54,6 +67,7 @@ pam_start(const char *service,
const struct pam_conv *pam_conv,
pam_handle_t **pamh)
{
+ char hostname[HOST_NAME_MAX + 1];
struct pam_handle *ph;
int r;
@@ -62,20 +76,20 @@ pam_start(const char *service,
RETURNC(PAM_BUF_ERR);
if ((r = pam_set_item(ph, PAM_SERVICE, service)) != PAM_SUCCESS)
goto fail;
+ if (gethostname(hostname, sizeof hostname) != 0)
+ strlcpy(hostname, "localhost", sizeof hostname);
+ if ((r = pam_set_item(ph, PAM_HOST, hostname)) != PAM_SUCCESS)
+ goto fail;
if ((r = pam_set_item(ph, PAM_USER, user)) != PAM_SUCCESS)
goto fail;
if ((r = pam_set_item(ph, PAM_CONV, pam_conv)) != PAM_SUCCESS)
goto fail;
-
- r = openpam_configure(ph, service);
- if (r != PAM_SUCCESS)
+ if ((r = openpam_configure(ph, service)) != PAM_SUCCESS)
goto fail;
-
*pamh = ph;
openpam_log(PAM_LOG_DEBUG, "pam_start(\"%s\") succeeded", service);
RETURNC(PAM_SUCCESS);
-
- fail:
+fail:
pam_end(ph, r);
RETURNC(r);
}
diff --git a/contrib/openpam/lib/pam_strerror.c b/contrib/openpam/lib/pam_strerror.c
index 24498c4..e29219d 100644
--- a/contrib/openpam/lib/pam_strerror.c
+++ b/contrib/openpam/lib/pam_strerror.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,48 +32,19 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_strerror.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_strerror.c 491 2011-11-12 00:12:32Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <stdio.h>
#include <security/pam_appl.h>
#include "openpam_impl.h"
-const char *_pam_err_name[PAM_NUM_ERRORS] = {
- "PAM_SUCCESS",
- "PAM_OPEN_ERR",
- "PAM_SYMBOL_ERR",
- "PAM_SERVICE_ERR",
- "PAM_SYSTEM_ERR",
- "PAM_BUF_ERR",
- "PAM_CONV_ERR",
- "PAM_PERM_DENIED",
- "PAM_MAXTRIES",
- "PAM_AUTH_ERR",
- "PAM_NEW_AUTHTOK_REQD",
- "PAM_CRED_INSUFFICIENT",
- "PAM_AUTHINFO_UNAVAIL",
- "PAM_USER_UNKNOWN",
- "PAM_CRED_UNAVAIL",
- "PAM_CRED_EXPIRED",
- "PAM_CRED_ERR",
- "PAM_ACCT_EXPIRED",
- "PAM_AUTHTOK_EXPIRED",
- "PAM_SESSION_ERR",
- "PAM_AUTHTOK_ERR",
- "PAM_AUTHTOK_RECOVERY_ERR",
- "PAM_AUTHTOK_LOCK_BUSY",
- "PAM_AUTHTOK_DISABLE_AGING",
- "PAM_NO_MODULE_DATA",
- "PAM_IGNORE",
- "PAM_ABORT",
- "PAM_TRY_AGAIN",
- "PAM_MODULE_UNKNOWN",
- "PAM_DOMAIN_UNKNOWN"
-};
-
/*
* XSSO 4.2.1
* XSSO 6 page 92
@@ -159,6 +130,8 @@ pam_strerror(const pam_handle_t *pamh,
/**
* The =pam_strerror function returns a pointer to a string containing a
* textual description of the error indicated by the =error_number
- * argument, in the context of the PAM transaction described by the =pamh
* argument.
+ * The =pamh argument is ignored.
+ * For compatibility with other implementations, it should be either a
+ * valid PAM handle returned by a previous call to =pam_start, or =NULL.
*/
diff --git a/contrib/openpam/lib/pam_verror.c b/contrib/openpam/lib/pam_verror.c
index 0b128d1..9ed85b6 100644
--- a/contrib/openpam/lib/pam_verror.c
+++ b/contrib/openpam/lib/pam_verror.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_verror.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_verror.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <stdarg.h>
#include <stdlib.h>
diff --git a/contrib/openpam/lib/pam_vinfo.c b/contrib/openpam/lib/pam_vinfo.c
index 5282714..95f45f4 100644
--- a/contrib/openpam/lib/pam_vinfo.c
+++ b/contrib/openpam/lib/pam_vinfo.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_vinfo.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_vinfo.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <stdarg.h>
#include <stdlib.h>
diff --git a/contrib/openpam/lib/pam_vprompt.c b/contrib/openpam/lib/pam_vprompt.c
index e1215c3..1e390e0 100644
--- a/contrib/openpam/lib/pam_vprompt.c
+++ b/contrib/openpam/lib/pam_vprompt.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_vprompt.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_vprompt.c 437 2011-09-13 12:00:13Z des $
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/contrib/openpam/ltmain.sh b/contrib/openpam/ltmain.sh
index c9698e7..6dfcfd5 100755
--- a/contrib/openpam/ltmain.sh
+++ b/contrib/openpam/ltmain.sh
@@ -1,52 +1,89 @@
-# ltmain.sh - Provide generalized library-building support services.
-# NOTE: Changing this file will not affect anything until you rerun configure.
-#
+
+# libtool (GNU libtool) 2.4
+# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
-# 2007 Free Software Foundation, Inc.
-# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-#
-# This program is free software; you can redistribute it and/or modify
+# 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool 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
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-basename="s,^.*/,,g"
-
-# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
-# is ksh but when the shell is invoked as "sh" and the current value of
-# the _XPG environment variable is not equal to 1 (one), the special
-# positional parameter $0, within a function call, is the name of the
-# function.
-progpath="$0"
+# along with GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html,
+# or obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-# The name of this program:
-progname=`echo "$progpath" | $SED $basename`
-modename="$progname"
-
-# Global variables:
-EXIT_SUCCESS=0
-EXIT_FAILURE=1
+# Usage: $progname [OPTION]... [MODE-ARG]...
+#
+# Provide generalized library-building support services.
+#
+# --config show all configuration variables
+# --debug enable verbose shell tracing
+# -n, --dry-run display commands without modifying any files
+# --features display basic configuration information and exit
+# --mode=MODE use operation mode MODE
+# --preserve-dup-deps don't remove duplicate dependency libraries
+# --quiet, --silent don't print informational messages
+# --no-quiet, --no-silent
+# print informational messages (default)
+# --tag=TAG use configuration variables from tag TAG
+# -v, --verbose print more informational messages than default
+# --no-verbose don't print the extra informational messages
+# --version print version information
+# -h, --help, --help-all print short, long, or detailed help message
+#
+# MODE must be one of the following:
+#
+# clean remove files from the build directory
+# compile compile a source file into a libtool object
+# execute automatically set library path, then run a program
+# finish complete the installation of libtool libraries
+# install install libraries or executables
+# link create a library or an executable
+# uninstall remove libraries from an installed directory
+#
+# MODE-ARGS vary depending on the MODE. When passed as first option,
+# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
+# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
+#
+# When reporting a bug, please describe a test case to reproduce it and
+# include the following information:
+#
+# host-triplet: $host
+# shell: $SHELL
+# compiler: $LTCC
+# compiler flags: $LTCFLAGS
+# linker: $LD (gnu? $with_gnu_ld)
+# $progname: (GNU libtool) 2.4
+# automake: $automake_version
+# autoconf: $autoconf_version
+#
+# Report bugs to <bug-libtool@gnu.org>.
+# GNU libtool home page: <http://www.gnu.org/software/libtool/>.
+# General help using GNU software: <http://www.gnu.org/gethelp/>.
-PROGRAM=ltmain.sh
+PROGRAM=libtool
PACKAGE=libtool
-VERSION=1.5.24
-TIMESTAMP=" (1.1220.2.455 2007/06/24 02:13:29)"
+VERSION=2.4
+TIMESTAMP=""
+package_revision=1.3293
-# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
+# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
@@ -60,98 +97,462 @@ fi
BIN_SH=xpg4; export BIN_SH # for Tru64
DUALCASE=1; export DUALCASE # for MKS sh
-# Check that we have a working $echo.
-if test "X$1" = X--no-reexec; then
- # Discard the --no-reexec flag, and continue.
- shift
-elif test "X$1" = X--fallback-echo; then
- # Avoid inline document here, it may be left over
- :
-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
- # Yippee, $echo works!
- :
-else
- # Restart under the correct shell, and then maybe $echo will work.
- exec $SHELL "$progpath" --no-reexec ${1+"$@"}
-fi
-
-if test "X$1" = X--fallback-echo; then
- # used as fallback echo
- shift
- cat <<EOF
-$*
-EOF
- exit $EXIT_SUCCESS
-fi
-
-default_mode=
-help="Try \`$progname --help' for more information."
-magic="%%%MAGIC variable%%%"
-mkdir="mkdir"
-mv="mv -f"
-rm="rm -f"
-
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed="${SED}"' -e 1s/^X//'
-sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
-# test EBCDIC or ASCII
-case `echo X|tr X '\101'` in
- A) # ASCII based system
- # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
- SP2NL='tr \040 \012'
- NL2SP='tr \015\012 \040\040'
- ;;
- *) # EBCDIC based system
- SP2NL='tr \100 \n'
- NL2SP='tr \r\n \100\100'
- ;;
-esac
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+}
-# NLS nuisances.
-# Only set LANG and LC_ALL to C if already set.
-# These must not be set unconditionally because not all systems understand
-# e.g. LANG=C (notably SCO).
-# We save the old values to restore during execute mode.
-for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+# NLS nuisances: We save the old values to restore during execute mode.
+lt_user_locale=
+lt_safe_locale=
+for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
do
eval "if test \"\${$lt_var+set}\" = set; then
- save_$lt_var=\$$lt_var
- $lt_var=C
+ save_$lt_var=\$$lt_var
+ $lt_var=C
export $lt_var
+ lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
+ lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
fi"
done
+LC_ALL=C
+LANGUAGE=C
+export LANGUAGE LC_ALL
+
+$lt_unset CDPATH
+
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
+
+
+
+: ${CP="cp -f"}
+test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
+: ${EGREP="grep -E"}
+: ${FGREP="grep -F"}
+: ${GREP="grep"}
+: ${LN_S="ln -s"}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${SED="sed"}
+: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
+: ${Xsed="$SED -e 1s/^X//"}
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
+EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
+
+exit_status=$EXIT_SUCCESS
# Make sure IFS has a sensible default
lt_nl='
'
IFS=" $lt_nl"
-if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
- $echo "$modename: not configured to build any kind of library" 1>&2
- $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
- exit $EXIT_FAILURE
-fi
+dirname="s,/[^/]*$,,"
+basename="s,^.*/,,"
-# Global variables.
-mode=$default_mode
-nonopt=
-prev=
-prevopt=
-run=
-show="$echo"
-show_help=
-execute_dlfiles=
-duplicate_deps=no
-preserve_args=
-lo2o="s/\\.lo\$/.${objext}/"
-o2lo="s/\\.${objext}\$/.lo/"
-extracted_archives=
-extracted_serial=0
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+} # func_dirname may be replaced by extended shell implementation
+
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result=`$ECHO "${1}" | $SED "$basename"`
+} # func_basename may be replaced by extended shell implementation
+
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+# dirname: Compute the dirname of FILE. If nonempty,
+# add APPEND to the result, otherwise set result
+# to NONDIR_REPLACEMENT.
+# value returned in "$func_dirname_result"
+# basename: Compute filename of FILE.
+# value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+ func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
+} # func_dirname_and_basename may be replaced by extended shell implementation
+
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+ esac
+} # func_stripname may be replaced by extended shell implementation
+
+
+# These SED scripts presuppose an absolute path with a trailing slash.
+pathcar='s,^/\([^/]*\).*$,\1,'
+pathcdr='s,^/[^/]*,,'
+removedotparts=':dotsl
+ s@/\./@/@g
+ t dotsl
+ s,/\.$,/,'
+collapseslashes='s@/\{1,\}@/@g'
+finalslash='s,/*$,/,'
+
+# func_normal_abspath PATH
+# Remove doubled-up and trailing slashes, "." path components,
+# and cancel out any ".." path components in PATH after making
+# it an absolute path.
+# value returned in "$func_normal_abspath_result"
+func_normal_abspath ()
+{
+ # Start from root dir and reassemble the path.
+ func_normal_abspath_result=
+ func_normal_abspath_tpath=$1
+ func_normal_abspath_altnamespace=
+ case $func_normal_abspath_tpath in
+ "")
+ # Empty path, that just means $cwd.
+ func_stripname '' '/' "`pwd`"
+ func_normal_abspath_result=$func_stripname_result
+ return
+ ;;
+ # The next three entries are used to spot a run of precisely
+ # two leading slashes without using negated character classes;
+ # we take advantage of case's first-match behaviour.
+ ///*)
+ # Unusual form of absolute path, do nothing.
+ ;;
+ //*)
+ # Not necessarily an ordinary path; POSIX reserves leading '//'
+ # and for example Cygwin uses it to access remote file shares
+ # over CIFS/SMB, so we conserve a leading double slash if found.
+ func_normal_abspath_altnamespace=/
+ ;;
+ /*)
+ # Absolute path, do nothing.
+ ;;
+ *)
+ # Relative path, prepend $cwd.
+ func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
+ ;;
+ esac
+ # Cancel out all the simple stuff to save iterations. We also want
+ # the path to end with a slash for ease of parsing, so make sure
+ # there is one (and only one) here.
+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
+ while :; do
+ # Processed it all yet?
+ if test "$func_normal_abspath_tpath" = / ; then
+ # If we ascended to the root using ".." the result may be empty now.
+ if test -z "$func_normal_abspath_result" ; then
+ func_normal_abspath_result=/
+ fi
+ break
+ fi
+ func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$pathcar"`
+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$pathcdr"`
+ # Figure out what to do with it
+ case $func_normal_abspath_tcomponent in
+ "")
+ # Trailing empty path component, ignore it.
+ ;;
+ ..)
+ # Parent dir; strip last assembled component from result.
+ func_dirname "$func_normal_abspath_result"
+ func_normal_abspath_result=$func_dirname_result
+ ;;
+ *)
+ # Actual path component, append it.
+ func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
+ ;;
+ esac
+ done
+ # Restore leading double-slash if one was found on entry.
+ func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
+}
+
+# func_relative_path SRCDIR DSTDIR
+# generates a relative path from SRCDIR to DSTDIR, with a trailing
+# slash if non-empty, suitable for immediately appending a filename
+# without needing to append a separator.
+# value returned in "$func_relative_path_result"
+func_relative_path ()
+{
+ func_relative_path_result=
+ func_normal_abspath "$1"
+ func_relative_path_tlibdir=$func_normal_abspath_result
+ func_normal_abspath "$2"
+ func_relative_path_tbindir=$func_normal_abspath_result
+
+ # Ascend the tree starting from libdir
+ while :; do
+ # check if we have found a prefix of bindir
+ case $func_relative_path_tbindir in
+ $func_relative_path_tlibdir)
+ # found an exact match
+ func_relative_path_tcancelled=
+ break
+ ;;
+ $func_relative_path_tlibdir*)
+ # found a matching prefix
+ func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
+ func_relative_path_tcancelled=$func_stripname_result
+ if test -z "$func_relative_path_result"; then
+ func_relative_path_result=.
+ fi
+ break
+ ;;
+ *)
+ func_dirname $func_relative_path_tlibdir
+ func_relative_path_tlibdir=${func_dirname_result}
+ if test "x$func_relative_path_tlibdir" = x ; then
+ # Have to descend all the way to the root!
+ func_relative_path_result=../$func_relative_path_result
+ func_relative_path_tcancelled=$func_relative_path_tbindir
+ break
+ fi
+ func_relative_path_result=../$func_relative_path_result
+ ;;
+ esac
+ done
+
+ # Now calculate path; take care to avoid doubling-up slashes.
+ func_stripname '' '/' "$func_relative_path_result"
+ func_relative_path_result=$func_stripname_result
+ func_stripname '/' '/' "$func_relative_path_tcancelled"
+ if test "x$func_stripname_result" != x ; then
+ func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
+ fi
+
+ # Normalisation. If bindir is libdir, return empty string,
+ # else relative path ending with a slash; either way, target
+ # file name can be directly appended.
+ if test ! -z "$func_relative_path_result"; then
+ func_stripname './' '' "$func_relative_path_result/"
+ func_relative_path_result=$func_stripname_result
+ fi
+}
+
+# The name of this program:
+func_dirname_and_basename "$progpath"
+progname=$func_basename_result
+
+# Make sure we have an absolute path for reexecution:
+case $progpath in
+ [\\/]*|[A-Za-z]:\\*) ;;
+ *[\\/]*)
+ progdir=$func_dirname_result
+ progdir=`cd "$progdir" && pwd`
+ progpath="$progdir/$progname"
+ ;;
+ *)
+ save_IFS="$IFS"
+ IFS=:
+ for progdir in $PATH; do
+ IFS="$save_IFS"
+ test -x "$progdir/$progname" && break
+ done
+ IFS="$save_IFS"
+ test -n "$progdir" || progdir=`pwd`
+ progpath="$progdir/$progname"
+ ;;
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed="${SED}"' -e 1s/^X//'
+sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution that turns a string into a regex matching for the
+# string literally.
+sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'
+
+# Sed substitution that converts a w32 file name or path
+# which contains forward slashes, into one that contains
+# (escaped) backslashes. A very naive implementation.
+lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+
+# Re-`\' parameter expansions in output of double_quote_subst that were
+# `\'-ed in input to the same. If an odd number of `\' preceded a '$'
+# in input to double_quote_subst, that '$' was protected from expansion.
+# Since each input `\' is now two `\'s, look for any number of runs of
+# four `\'s followed by two `\'s and then a '$'. `\' that '$'.
+bs='\\'
+bs2='\\\\'
+bs4='\\\\\\\\'
+dollar='\$'
+sed_double_backslash="\
+ s/$bs4/&\\
+/g
+ s/^$bs2$dollar/$bs&/
+ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
+ s/\n//g"
+
+# Standard options:
+opt_dry_run=false
+opt_help=false
+opt_quiet=false
+opt_verbose=false
+opt_warning=:
+
+# func_echo arg...
+# Echo program name prefixed message, along with the current mode
+# name if it has been set yet.
+func_echo ()
+{
+ $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
+}
+
+# func_verbose arg...
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+ $opt_verbose && func_echo ${1+"$@"}
+
+ # A bug in bash halts the script if the last line of a function
+ # fails when set -e is in force, so we need another command to
+ # work around that:
+ :
+}
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+ $ECHO "$*"
+}
+
+# func_error arg...
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+ $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
+}
+
+# func_warning arg...
+# Echo program name prefixed warning message to standard error.
+func_warning ()
+{
+ $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
+
+ # bash bug again:
+ :
+}
+
+# func_fatal_error arg...
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+ func_error ${1+"$@"}
+ exit $EXIT_FAILURE
+}
+
+# func_fatal_help arg...
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+ func_error ${1+"$@"}
+ func_fatal_error "$help"
+}
+help="Try \`$progname --help' for more information." ## default
+
+
+# func_grep expression filename
+# Check whether EXPRESSION matches any line of FILENAME, without output.
+func_grep ()
+{
+ $GREP "$1" "$2" >/dev/null 2>&1
+}
+
+
+# func_mkdir_p directory-path
+# Make sure the entire path to DIRECTORY-PATH is available.
+func_mkdir_p ()
+{
+ my_directory_path="$1"
+ my_dir_list=
+
+ if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
+
+ # Protect directory names starting with `-'
+ case $my_directory_path in
+ -*) my_directory_path="./$my_directory_path" ;;
+ esac
+
+ # While some portion of DIR does not yet exist...
+ while test ! -d "$my_directory_path"; do
+ # ...make a list in topmost first order. Use a colon delimited
+ # list incase some portion of path contains whitespace.
+ my_dir_list="$my_directory_path:$my_dir_list"
+
+ # If the last portion added has no slash in it, the list is done
+ case $my_directory_path in */*) ;; *) break ;; esac
+
+ # ...otherwise throw away the child directory and loop
+ my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
+ done
+ my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
+
+ save_mkdir_p_IFS="$IFS"; IFS=':'
+ for my_dir in $my_dir_list; do
+ IFS="$save_mkdir_p_IFS"
+ # mkdir can fail with a `File exist' error if two processes
+ # try to create one of the directories concurrently. Don't
+ # stop in that case!
+ $MKDIR "$my_dir" 2>/dev/null || :
+ done
+ IFS="$save_mkdir_p_IFS"
+
+ # Bail out if we (or some other process) failed to create a directory.
+ test -d "$my_directory_path" || \
+ func_fatal_error "Failed to create \`$1'"
+ fi
+}
-#####################################
-# Shell function definitions:
-# This seems to be the best place for them
# func_mktempdir [string]
# Make a temporary directory that won't clash with other running
@@ -161,7 +562,7 @@ func_mktempdir ()
{
my_template="${TMPDIR-/tmp}/${1-$progname}"
- if test "$run" = ":"; then
+ if test "$opt_dry_run" = ":"; then
# Return a directory name, but don't create it in dry-run mode
my_tmpdir="${my_template}-$$"
else
@@ -170,71 +571,799 @@ func_mktempdir ()
my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
if test ! -d "$my_tmpdir"; then
- # Failing that, at least try and use $RANDOM to avoid a race
- my_tmpdir="${my_template}-${RANDOM-0}$$"
+ # Failing that, at least try and use $RANDOM to avoid a race
+ my_tmpdir="${my_template}-${RANDOM-0}$$"
- save_mktempdir_umask=`umask`
- umask 0077
- $mkdir "$my_tmpdir"
- umask $save_mktempdir_umask
+ save_mktempdir_umask=`umask`
+ umask 0077
+ $MKDIR "$my_tmpdir"
+ umask $save_mktempdir_umask
fi
# If we're not in dry-run mode, bomb out on failure
- test -d "$my_tmpdir" || {
- $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
- exit $EXIT_FAILURE
- }
+ test -d "$my_tmpdir" || \
+ func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
fi
- $echo "X$my_tmpdir" | $Xsed
+ $ECHO "$my_tmpdir"
}
-# func_win32_libid arg
-# return the library type of file 'arg'
-#
-# Need a lot of goo to handle *both* DLLs and import libs
-# Has to be a shell function in order to 'eat' the argument
-# that is supplied when $file_magic_command is called.
-func_win32_libid ()
+# func_quote_for_eval arg
+# Aesthetically quote ARG to be evaled later.
+# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
+# is double-quoted, suitable for a subsequent eval, whereas
+# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
+# which are still active within double quotes backslashified.
+func_quote_for_eval ()
{
- win32_libid_type="unknown"
- win32_fileres=`file -L $1 2>/dev/null`
- case $win32_fileres in
- *ar\ archive\ import\ library*) # definitely import
- win32_libid_type="x86 archive import"
- ;;
- *ar\ archive*) # could be an import, or static
- if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
- $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
- win32_nmres=`eval $NM -f posix -A $1 | \
- $SED -n -e '1,100{
- / I /{
- s,.*,import,
- p
- q
- }
- }'`
- case $win32_nmres in
- import*) win32_libid_type="x86 archive import";;
- *) win32_libid_type="x86 archive static";;
- esac
+ case $1 in
+ *[\\\`\"\$]*)
+ func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
+ *)
+ func_quote_for_eval_unquoted_result="$1" ;;
+ esac
+
+ case $func_quote_for_eval_unquoted_result in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting, command substitution and and variable
+ # expansion for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
+ ;;
+ *)
+ func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
+ esac
+}
+
+
+# func_quote_for_expand arg
+# Aesthetically quote ARG to be evaled later; same as above,
+# but do not quote variable references.
+func_quote_for_expand ()
+{
+ case $1 in
+ *[\\\`\"]*)
+ my_arg=`$ECHO "$1" | $SED \
+ -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
+ *)
+ my_arg="$1" ;;
+ esac
+
+ case $my_arg in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting and command substitution for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ my_arg="\"$my_arg\""
+ ;;
+ esac
+
+ func_quote_for_expand_result="$my_arg"
+}
+
+
+# func_show_eval cmd [fail_exp]
+# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.
+func_show_eval ()
+{
+ my_cmd="$1"
+ my_fail_exp="${2-:}"
+
+ ${opt_silent-false} || {
+ func_quote_for_expand "$my_cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+
+ if ${opt_dry_run-false}; then :; else
+ eval "$my_cmd"
+ my_status=$?
+ if test "$my_status" -eq 0; then :; else
+ eval "(exit $my_status); $my_fail_exp"
+ fi
fi
+}
+
+
+# func_show_eval_locale cmd [fail_exp]
+# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it. Use the saved locale for evaluation.
+func_show_eval_locale ()
+{
+ my_cmd="$1"
+ my_fail_exp="${2-:}"
+
+ ${opt_silent-false} || {
+ func_quote_for_expand "$my_cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+
+ if ${opt_dry_run-false}; then :; else
+ eval "$lt_user_locale
+ $my_cmd"
+ my_status=$?
+ eval "$lt_safe_locale"
+ if test "$my_status" -eq 0; then :; else
+ eval "(exit $my_status); $my_fail_exp"
+ fi
+ fi
+}
+
+# func_tr_sh
+# Turn $1 into a string suitable for a shell variable name.
+# Result is stored in $func_tr_sh_result. All characters
+# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
+# if $1 begins with a digit, a '_' is prepended as well.
+func_tr_sh ()
+{
+ case $1 in
+ [0-9]* | *[!a-zA-Z0-9_]*)
+ func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
;;
- *DLL*)
- win32_libid_type="x86 DLL"
+ * )
+ func_tr_sh_result=$1
;;
- *executable*) # but shell scripts are "executable" too...
- case $win32_fileres in
- *MS\ Windows\ PE\ Intel*)
- win32_libid_type="x86 DLL"
+ esac
+}
+
+
+# func_version
+# Echo version message to standard output and exit.
+func_version ()
+{
+ $opt_debug
+
+ $SED -n '/(C)/!b go
+ :more
+ /\./!{
+ N
+ s/\n# / /
+ b more
+ }
+ :go
+ /^# '$PROGRAM' (GNU /,/# warranty; / {
+ s/^# //
+ s/^# *$//
+ s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
+ p
+ }' < "$progpath"
+ exit $?
+}
+
+# func_usage
+# Echo short help message to standard output and exit.
+func_usage ()
+{
+ $opt_debug
+
+ $SED -n '/^# Usage:/,/^# *.*--help/ {
+ s/^# //
+ s/^# *$//
+ s/\$progname/'$progname'/
+ p
+ }' < "$progpath"
+ echo
+ $ECHO "run \`$progname --help | more' for full usage"
+ exit $?
+}
+
+# func_help [NOEXIT]
+# Echo long help message to standard output and exit,
+# unless 'noexit' is passed as argument.
+func_help ()
+{
+ $opt_debug
+
+ $SED -n '/^# Usage:/,/# Report bugs to/ {
+ :print
+ s/^# //
+ s/^# *$//
+ s*\$progname*'$progname'*
+ s*\$host*'"$host"'*
+ s*\$SHELL*'"$SHELL"'*
+ s*\$LTCC*'"$LTCC"'*
+ s*\$LTCFLAGS*'"$LTCFLAGS"'*
+ s*\$LD*'"$LD"'*
+ s/\$with_gnu_ld/'"$with_gnu_ld"'/
+ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
+ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
+ p
+ d
+ }
+ /^# .* home page:/b print
+ /^# General help using/b print
+ ' < "$progpath"
+ ret=$?
+ if test -z "$1"; then
+ exit $ret
+ fi
+}
+
+# func_missing_arg argname
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+ $opt_debug
+
+ func_error "missing argument for $1."
+ exit_cmd=exit
+}
+
+
+# func_split_short_opt shortopt
+# Set func_split_short_opt_name and func_split_short_opt_arg shell
+# variables after splitting SHORTOPT after the 2nd character.
+func_split_short_opt ()
+{
+ my_sed_short_opt='1s/^\(..\).*$/\1/;q'
+ my_sed_short_rest='1s/^..\(.*\)$/\1/;q'
+
+ func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`
+ func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`
+} # func_split_short_opt may be replaced by extended shell implementation
+
+
+# func_split_long_opt longopt
+# Set func_split_long_opt_name and func_split_long_opt_arg shell
+# variables after splitting LONGOPT at the `=' sign.
+func_split_long_opt ()
+{
+ my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
+ my_sed_long_arg='1s/^--[^=]*=//'
+
+ func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`
+ func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`
+} # func_split_long_opt may be replaced by extended shell implementation
+
+exit_cmd=:
+
+
+
+
+
+magic="%%%MAGIC variable%%%"
+magic_exe="%%%MAGIC EXE variable%%%"
+
+# Global variables.
+nonopt=
+preserve_args=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end. This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "${1}=\$${1}\${2}"
+} # func_append may be replaced by extended shell implementation
+
+# func_append_quoted var value
+# Quote VALUE and append to the end of shell variable VAR, separated
+# by a space.
+func_append_quoted ()
+{
+ func_quote_for_eval "${2}"
+ eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
+} # func_append_quoted may be replaced by extended shell implementation
+
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=`expr "${@}"`
+} # func_arith may be replaced by extended shell implementation
+
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
+} # func_len may be replaced by extended shell implementation
+
+
+# func_lo2o object
+func_lo2o ()
+{
+ func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
+} # func_lo2o may be replaced by extended shell implementation
+
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
+} # func_xform may be replaced by extended shell implementation
+
+
+# func_fatal_configuration arg...
+# Echo program name prefixed message to standard error, followed by
+# a configuration failure hint, and exit.
+func_fatal_configuration ()
+{
+ func_error ${1+"$@"}
+ func_error "See the $PACKAGE documentation for more information."
+ func_fatal_error "Fatal configuration error."
+}
+
+
+# func_config
+# Display the configuration for all the tags in this script.
+func_config ()
+{
+ re_begincf='^# ### BEGIN LIBTOOL'
+ re_endcf='^# ### END LIBTOOL'
+
+ # Default configuration.
+ $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
+
+ # Now print the configurations for the tags.
+ for tagname in $taglist; do
+ $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
+ done
+
+ exit $?
+}
+
+# func_features
+# Display the features supported by this script.
+func_features ()
+{
+ echo "host: $host"
+ if test "$build_libtool_libs" = yes; then
+ echo "enable shared libraries"
+ else
+ echo "disable shared libraries"
+ fi
+ if test "$build_old_libs" = yes; then
+ echo "enable static libraries"
+ else
+ echo "disable static libraries"
+ fi
+
+ exit $?
+}
+
+# func_enable_tag tagname
+# Verify that TAGNAME is valid, and either flag an error and exit, or
+# enable the TAGNAME tag. We also add TAGNAME to the global $taglist
+# variable here.
+func_enable_tag ()
+{
+ # Global variable:
+ tagname="$1"
+
+ re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
+ re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
+ sed_extractcf="/$re_begincf/,/$re_endcf/p"
+
+ # Validate tagname.
+ case $tagname in
+ *[!-_A-Za-z0-9,/]*)
+ func_fatal_error "invalid tag name: $tagname"
+ ;;
+ esac
+
+ # Don't test for the "default" C tag, as we know it's
+ # there but not specially marked.
+ case $tagname in
+ CC) ;;
+ *)
+ if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
+ taglist="$taglist $tagname"
+
+ # Evaluate the configuration. Be careful to quote the path
+ # and the sed script, to avoid splitting on whitespace, but
+ # also don't use non-portable quotes within backquotes within
+ # quotes we have to do it in 2 steps:
+ extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
+ eval "$extractedcf"
+ else
+ func_error "ignoring unknown tag $tagname"
+ fi
+ ;;
+ esac
+}
+
+# func_check_version_match
+# Ensure that we are using m4 macros, and libtool script from the same
+# release of libtool.
+func_check_version_match ()
+{
+ if test "$package_revision" != "$macro_revision"; then
+ if test "$VERSION" != "$macro_version"; then
+ if test -z "$macro_version"; then
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from an older release.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ fi
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
+$progname: You should recreate aclocal.m4 with macros from revision $package_revision
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
+ fi
+
+ exit $EXIT_MISMATCH
+ fi
+}
+
+
+# Shorthand for --mode=foo, only valid as the first argument
+case $1 in
+clean|clea|cle|cl)
+ shift; set dummy --mode clean ${1+"$@"}; shift
+ ;;
+compile|compil|compi|comp|com|co|c)
+ shift; set dummy --mode compile ${1+"$@"}; shift
+ ;;
+execute|execut|execu|exec|exe|ex|e)
+ shift; set dummy --mode execute ${1+"$@"}; shift
+ ;;
+finish|finis|fini|fin|fi|f)
+ shift; set dummy --mode finish ${1+"$@"}; shift
+ ;;
+install|instal|insta|inst|ins|in|i)
+ shift; set dummy --mode install ${1+"$@"}; shift
+ ;;
+link|lin|li|l)
+ shift; set dummy --mode link ${1+"$@"}; shift
+ ;;
+uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+ shift; set dummy --mode uninstall ${1+"$@"}; shift
+ ;;
+esac
+
+
+
+# Option defaults:
+opt_debug=:
+opt_dry_run=false
+opt_config=false
+opt_preserve_dup_deps=false
+opt_features=false
+opt_finish=false
+opt_help=false
+opt_help_all=false
+opt_silent=:
+opt_verbose=:
+opt_silent=false
+opt_verbose=false
+
+
+# Parse options once, thoroughly. This comes as soon as possible in the
+# script to make things like `--version' happen as quickly as we can.
+{
+ # this just eases exit handling
+ while test $# -gt 0; do
+ opt="$1"
+ shift
+ case $opt in
+ --debug|-x) opt_debug='set -x'
+ func_echo "enabling shell trace mode"
+ $opt_debug
+ ;;
+ --dry-run|--dryrun|-n)
+ opt_dry_run=:
+ ;;
+ --config)
+ opt_config=:
+func_config
+ ;;
+ --dlopen|-dlopen)
+ optarg="$1"
+ opt_dlopen="${opt_dlopen+$opt_dlopen
+}$optarg"
+ shift
+ ;;
+ --preserve-dup-deps)
+ opt_preserve_dup_deps=:
+ ;;
+ --features)
+ opt_features=:
+func_features
+ ;;
+ --finish)
+ opt_finish=:
+set dummy --mode finish ${1+"$@"}; shift
+ ;;
+ --help)
+ opt_help=:
+ ;;
+ --help-all)
+ opt_help_all=:
+opt_help=': help-all'
+ ;;
+ --mode)
+ test $# = 0 && func_missing_arg $opt && break
+ optarg="$1"
+ opt_mode="$optarg"
+case $optarg in
+ # Valid mode arguments:
+ clean|compile|execute|finish|install|link|relink|uninstall) ;;
+
+ # Catch anything else as an error
+ *) func_error "invalid argument for $opt"
+ exit_cmd=exit
+ break
+ ;;
+esac
+ shift
+ ;;
+ --no-silent|--no-quiet)
+ opt_silent=false
+func_append preserve_args " $opt"
+ ;;
+ --no-verbose)
+ opt_verbose=false
+func_append preserve_args " $opt"
+ ;;
+ --silent|--quiet)
+ opt_silent=:
+func_append preserve_args " $opt"
+ opt_verbose=false
+ ;;
+ --verbose|-v)
+ opt_verbose=:
+func_append preserve_args " $opt"
+opt_silent=false
+ ;;
+ --tag)
+ test $# = 0 && func_missing_arg $opt && break
+ optarg="$1"
+ opt_tag="$optarg"
+func_append preserve_args " $opt $optarg"
+func_enable_tag "$optarg"
+ shift
+ ;;
+
+ -\?|-h) func_usage ;;
+ --help) func_help ;;
+ --version) func_version ;;
+
+ # Separate optargs to long options:
+ --*=*)
+ func_split_long_opt "$opt"
+ set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
+ shift
+ ;;
+
+ # Separate non-argument short options:
+ -\?*|-h*|-n*|-v*)
+ func_split_short_opt "$opt"
+ set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
+ shift
+ ;;
+
+ --) break ;;
+ -*) func_fatal_help "unrecognized option \`$opt'" ;;
+ *) set dummy "$opt" ${1+"$@"}; shift; break ;;
+ esac
+ done
+
+ # Validate options:
+
+ # save first non-option argument
+ if test "$#" -gt 0; then
+ nonopt="$opt"
+ shift
+ fi
+
+ # preserve --debug
+ test "$opt_debug" = : || func_append preserve_args " --debug"
+
+ case $host in
+ *cygwin* | *mingw* | *pw32* | *cegcc*)
+ # don't eliminate duplications in $postdeps and $predeps
+ opt_duplicate_compiler_generated_deps=:
;;
+ *)
+ opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
+ ;;
+ esac
+
+ $opt_help || {
+ # Sanity checks first:
+ func_check_version_match
+
+ if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+ func_fatal_configuration "not configured to build any kind of library"
+ fi
+
+ # Darwin sucks
+ eval std_shrext=\"$shrext_cmds\"
+
+ # Only execute mode is allowed to have -dlopen flags.
+ if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
+ func_error "unrecognized option \`-dlopen'"
+ $ECHO "$help" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ # Change the help message to a mode-specific one.
+ generic_help="$help"
+ help="Try \`$progname --help --mode=$opt_mode' for more information."
+ }
+
+
+ # Bail if the options were screwed
+ $exit_cmd $EXIT_FAILURE
+}
+
+
+
+
+## ----------- ##
+## Main. ##
+## ----------- ##
+
+# func_lalib_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_lalib_p ()
+{
+ test -f "$1" &&
+ $SED -e 4q "$1" 2>/dev/null \
+ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
+
+# func_lalib_unsafe_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function implements the same check as func_lalib_p without
+# resorting to external programs. To this end, it redirects stdin and
+# closes it afterwards, without saving the original file descriptor.
+# As a safety measure, use it only where a negative result would be
+# fatal anyway. Works if `file' does not exist.
+func_lalib_unsafe_p ()
+{
+ lalib_p=no
+ if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
+ for lalib_p_l in 1 2 3 4
+ do
+ read lalib_p_line
+ case "$lalib_p_line" in
+ \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
+ esac
+ done
+ exec 0<&5 5<&-
+ fi
+ test "$lalib_p" = yes
+}
+
+# func_ltwrapper_script_p file
+# True iff FILE is a libtool wrapper script
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_script_p ()
+{
+ func_lalib_p "$1"
+}
+
+# func_ltwrapper_executable_p file
+# True iff FILE is a libtool wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_executable_p ()
+{
+ func_ltwrapper_exec_suffix=
+ case $1 in
+ *.exe) ;;
+ *) func_ltwrapper_exec_suffix=.exe ;;
+ esac
+ $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
+}
+
+# func_ltwrapper_scriptname file
+# Assumes file is an ltwrapper_executable
+# uses $file to determine the appropriate filename for a
+# temporary ltwrapper_script.
+func_ltwrapper_scriptname ()
+{
+ func_dirname_and_basename "$1" "" "."
+ func_stripname '' '.exe' "$func_basename_result"
+ func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
+}
+
+# func_ltwrapper_p file
+# True iff FILE is a libtool wrapper script or wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_p ()
+{
+ func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
+}
+
+
+# func_execute_cmds commands fail_cmd
+# Execute tilde-delimited COMMANDS.
+# If FAIL_CMD is given, eval that upon failure.
+# FAIL_CMD may read-access the current command in variable CMD!
+func_execute_cmds ()
+{
+ $opt_debug
+ save_ifs=$IFS; IFS='~'
+ for cmd in $1; do
+ IFS=$save_ifs
+ eval cmd=\"$cmd\"
+ func_show_eval "$cmd" "${2-:}"
+ done
+ IFS=$save_ifs
+}
+
+
+# func_source file
+# Source FILE, adding directory component if necessary.
+# Note that it is not necessary on cygwin/mingw to append a dot to
+# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
+# behavior happens only for exec(3), not for open(2)! Also, sourcing
+# `FILE.' does not work on cygwin managed mounts.
+func_source ()
+{
+ $opt_debug
+ case $1 in
+ */* | *\\*) . "$1" ;;
+ *) . "./$1" ;;
esac
+}
+
+
+# func_resolve_sysroot PATH
+# Replace a leading = in PATH with a sysroot. Store the result into
+# func_resolve_sysroot_result
+func_resolve_sysroot ()
+{
+ func_resolve_sysroot_result=$1
+ case $func_resolve_sysroot_result in
+ =*)
+ func_stripname '=' '' "$func_resolve_sysroot_result"
+ func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
;;
esac
- $echo $win32_libid_type
}
+# func_replace_sysroot PATH
+# If PATH begins with the sysroot, replace it with = and
+# store the result into func_replace_sysroot_result.
+func_replace_sysroot ()
+{
+ case "$lt_sysroot:$1" in
+ ?*:"$lt_sysroot"*)
+ func_stripname "$lt_sysroot" '' "$1"
+ func_replace_sysroot_result="=$func_stripname_result"
+ ;;
+ *)
+ # Including no sysroot.
+ func_replace_sysroot_result=$1
+ ;;
+ esac
+}
# func_infer_tag arg
# Infer tagged configuration to use if any are available and
@@ -244,9 +1373,11 @@ func_win32_libid ()
# arg is usually of the form 'gcc ...'
func_infer_tag ()
{
+ $opt_debug
+
# FreeBSD-specific: where we install compilers with non-standard names
- tag_compilers_CC="*cc cc* *gcc gcc*"
- tag_compilers_CXX="*c++ c++* *g++ g++*"
+ tag_compilers_CC="*cc cc* *gcc gcc* clang"
+ tag_compilers_CXX="*c++ c++* *g++ g++* clang++"
base_compiler=`set -- "$@"; echo $1`
# If $tagname isn't set, then try to infer if the default "CC" tag applies
@@ -261,36 +1392,32 @@ func_infer_tag ()
if test -n "$available_tags" && test -z "$tagname"; then
CC_quoted=
for arg in $CC; do
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
- CC_quoted="$CC_quoted $arg"
+ func_append_quoted CC_quoted "$arg"
done
+ CC_expanded=`func_echo_all $CC`
+ CC_quoted_expanded=`func_echo_all $CC_quoted`
case $@ in
# Blanks in the command may have been stripped by the calling shell,
# but not from the CC environment variable when configure was run.
- " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
+ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
# Blanks at the start of $base_compile will cause this to fail
# if we don't check for them as well.
*)
for z in $available_tags; do
- if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+ if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
# Evaluate the configuration.
eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
CC_quoted=
for arg in $CC; do
- # Double-quote args containing other shell metacharacters.
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
- CC_quoted="$CC_quoted $arg"
- done
+ # Double-quote args containing other shell metacharacters.
+ func_append_quoted CC_quoted "$arg"
+ done
+ CC_expanded=`func_echo_all $CC`
+ CC_quoted_expanded=`func_echo_all $CC_quoted`
case "$@ " in
- " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
+ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
# The compiler in the base compile command matches
# the one in the tagged configuration.
# Assume this is the tagged configuration we want.
@@ -319,11 +1446,10 @@ func_infer_tag ()
# was found and let the user know that the "--tag" command
# line option must be used.
if test -z "$tagname"; then
- $echo "$modename: unable to infer tagged configuration"
- $echo "$modename: specify a tag with \`--tag'" 1>&2
- exit $EXIT_FAILURE
-# else
-# $echo "$modename: using $tagname tagged configuration"
+ func_echo "unable to infer tagged configuration"
+ func_fatal_error "specify a tag with \`--tag'"
+# else
+# func_verbose "using $tagname tagged configuration"
fi
;;
esac
@@ -331,354 +1457,528 @@ func_infer_tag ()
}
-# func_extract_an_archive dir oldlib
-func_extract_an_archive ()
+
+# func_write_libtool_object output_name pic_name nonpic_name
+# Create a libtool object file (analogous to a ".la" file),
+# but don't create it if we're doing a dry run.
+func_write_libtool_object ()
{
- f_ex_an_ar_dir="$1"; shift
- f_ex_an_ar_oldlib="$1"
+ write_libobj=${1}
+ if test "$build_libtool_libs" = yes; then
+ write_lobj=\'${2}\'
+ else
+ write_lobj=none
+ fi
- $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
- $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
- if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
- :
+ if test "$build_old_libs" = yes; then
+ write_oldobj=\'${3}\'
else
- $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
- exit $EXIT_FAILURE
+ write_oldobj=none
fi
+
+ $opt_dry_run || {
+ cat >${write_libobj}T <<EOF
+# $write_libobj - a libtool object file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=$write_lobj
+
+# Name of the non-PIC object
+non_pic_object=$write_oldobj
+
+EOF
+ $MV "${write_libobj}T" "${write_libobj}"
+ }
}
-# func_extract_archives gentop oldlib ...
-func_extract_archives ()
+
+##################################################
+# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
+##################################################
+
+# func_convert_core_file_wine_to_w32 ARG
+# Helper function used by file name conversion functions when $build is *nix,
+# and $host is mingw, cygwin, or some other w32 environment. Relies on a
+# correctly configured wine environment available, with the winepath program
+# in $build's $PATH.
+#
+# ARG is the $build file name to be converted to w32 format.
+# Result is available in $func_convert_core_file_wine_to_w32_result, and will
+# be empty on error (or when ARG is empty)
+func_convert_core_file_wine_to_w32 ()
{
- my_gentop="$1"; shift
- my_oldlibs=${1+"$@"}
- my_oldobjs=""
- my_xlib=""
- my_xabs=""
- my_xdir=""
- my_status=""
-
- $show "${rm}r $my_gentop"
- $run ${rm}r "$my_gentop"
- $show "$mkdir $my_gentop"
- $run $mkdir "$my_gentop"
- my_status=$?
- if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
- exit $my_status
+ $opt_debug
+ func_convert_core_file_wine_to_w32_result="$1"
+ if test -n "$1"; then
+ # Unfortunately, winepath does not exit with a non-zero error code, so we
+ # are forced to check the contents of stdout. On the other hand, if the
+ # command is not found, the shell will set an exit code of 127 and print
+ # *an error message* to stdout. So we must check for both error code of
+ # zero AND non-empty stdout, which explains the odd construction:
+ func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
+ if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
+ func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
+ $SED -e "$lt_sed_naive_backslashify"`
+ else
+ func_convert_core_file_wine_to_w32_result=
fi
+ fi
+}
+# end: func_convert_core_file_wine_to_w32
- for my_xlib in $my_oldlibs; do
- # Extract the objects.
- case $my_xlib in
- [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
- *) my_xabs=`pwd`"/$my_xlib" ;;
- esac
- my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
- my_xlib_u=$my_xlib
- while :; do
- case " $extracted_archives " in
- *" $my_xlib_u "*)
- extracted_serial=`expr $extracted_serial + 1`
- my_xlib_u=lt$extracted_serial-$my_xlib ;;
- *) break ;;
- esac
- done
- extracted_archives="$extracted_archives $my_xlib_u"
- my_xdir="$my_gentop/$my_xlib_u"
- $show "${rm}r $my_xdir"
- $run ${rm}r "$my_xdir"
- $show "$mkdir $my_xdir"
- $run $mkdir "$my_xdir"
- exit_status=$?
- if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
- exit $exit_status
+# func_convert_core_path_wine_to_w32 ARG
+# Helper function used by path conversion functions when $build is *nix, and
+# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
+# configured wine environment available, with the winepath program in $build's
+# $PATH. Assumes ARG has no leading or trailing path separator characters.
+#
+# ARG is path to be converted from $build format to win32.
+# Result is available in $func_convert_core_path_wine_to_w32_result.
+# Unconvertible file (directory) names in ARG are skipped; if no directory names
+# are convertible, then the result may be empty.
+func_convert_core_path_wine_to_w32 ()
+{
+ $opt_debug
+ # unfortunately, winepath doesn't convert paths, only file names
+ func_convert_core_path_wine_to_w32_result=""
+ if test -n "$1"; then
+ oldIFS=$IFS
+ IFS=:
+ for func_convert_core_path_wine_to_w32_f in $1; do
+ IFS=$oldIFS
+ func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
+ if test -n "$func_convert_core_file_wine_to_w32_result" ; then
+ if test -z "$func_convert_core_path_wine_to_w32_result"; then
+ func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
+ else
+ func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
+ fi
fi
- case $host in
- *-darwin*)
- $show "Extracting $my_xabs"
- # Do not bother doing anything if just a dry run
- if test -z "$run"; then
- darwin_orig_dir=`pwd`
- cd $my_xdir || exit $?
- darwin_archive=$my_xabs
- darwin_curdir=`pwd`
- darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
- darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
- if test -n "$darwin_arches"; then
- darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
- darwin_arch=
- $show "$darwin_base_archive has multiple architectures $darwin_arches"
- for darwin_arch in $darwin_arches ; do
- mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
- lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
- cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
- func_extract_an_archive "`pwd`" "${darwin_base_archive}"
- cd "$darwin_curdir"
- $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
- done # $darwin_arches
- ## Okay now we have a bunch of thin objects, gotta fatten them up :)
- darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
- darwin_file=
- darwin_files=
- for darwin_file in $darwin_filelist; do
- darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
- lipo -create -output "$darwin_file" $darwin_files
- done # $darwin_filelist
- ${rm}r unfat-$$
- cd "$darwin_orig_dir"
- else
- cd "$darwin_orig_dir"
- func_extract_an_archive "$my_xdir" "$my_xabs"
- fi # $darwin_arches
- fi # $run
- ;;
- *)
- func_extract_an_archive "$my_xdir" "$my_xabs"
- ;;
- esac
- my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
done
- func_extract_archives_result="$my_oldobjs"
+ IFS=$oldIFS
+ fi
+}
+# end: func_convert_core_path_wine_to_w32
+
+
+# func_cygpath ARGS...
+# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
+# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
+# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
+# (2), returns the Cygwin file name or path in func_cygpath_result (input
+# file name or path is assumed to be in w32 format, as previously converted
+# from $build's *nix or MSYS format). In case (3), returns the w32 file name
+# or path in func_cygpath_result (input file name or path is assumed to be in
+# Cygwin format). Returns an empty string on error.
+#
+# ARGS are passed to cygpath, with the last one being the file name or path to
+# be converted.
+#
+# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
+# environment variable; do not put it in $PATH.
+func_cygpath ()
+{
+ $opt_debug
+ if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
+ func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
+ if test "$?" -ne 0; then
+ # on failure, ensure result is empty
+ func_cygpath_result=
+ fi
+ else
+ func_cygpath_result=
+ func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
+ fi
}
-# End of Shell function definitions
-#####################################
+#end: func_cygpath
-# Darwin sucks
-eval std_shrext=\"$shrext_cmds\"
-disable_libs=no
+# func_convert_core_msys_to_w32 ARG
+# Convert file name or path ARG from MSYS format to w32 format. Return
+# result in func_convert_core_msys_to_w32_result.
+func_convert_core_msys_to_w32 ()
+{
+ $opt_debug
+ # awkward: cmd appends spaces to result
+ func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
+ $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
+}
+#end: func_convert_core_msys_to_w32
-# Parse our command line options once, thoroughly.
-while test "$#" -gt 0
-do
- arg="$1"
- shift
- case $arg in
- -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
- *) optarg= ;;
+# func_convert_file_check ARG1 ARG2
+# Verify that ARG1 (a file name in $build format) was converted to $host
+# format in ARG2. Otherwise, emit an error message, but continue (resetting
+# func_to_host_file_result to ARG1).
+func_convert_file_check ()
+{
+ $opt_debug
+ if test -z "$2" && test -n "$1" ; then
+ func_error "Could not determine host file name corresponding to"
+ func_error " \`$1'"
+ func_error "Continuing, but uninstalled executables may not work."
+ # Fallback:
+ func_to_host_file_result="$1"
+ fi
+}
+# end func_convert_file_check
+
+
+# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
+# Verify that FROM_PATH (a path in $build format) was converted to $host
+# format in TO_PATH. Otherwise, emit an error message, but continue, resetting
+# func_to_host_file_result to a simplistic fallback value (see below).
+func_convert_path_check ()
+{
+ $opt_debug
+ if test -z "$4" && test -n "$3"; then
+ func_error "Could not determine the host path corresponding to"
+ func_error " \`$3'"
+ func_error "Continuing, but uninstalled executables may not work."
+ # Fallback. This is a deliberately simplistic "conversion" and
+ # should not be "improved". See libtool.info.
+ if test "x$1" != "x$2"; then
+ lt_replace_pathsep_chars="s|$1|$2|g"
+ func_to_host_path_result=`echo "$3" |
+ $SED -e "$lt_replace_pathsep_chars"`
+ else
+ func_to_host_path_result="$3"
+ fi
+ fi
+}
+# end func_convert_path_check
+
+
+# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
+# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
+# and appending REPL if ORIG matches BACKPAT.
+func_convert_path_front_back_pathsep ()
+{
+ $opt_debug
+ case $4 in
+ $1 ) func_to_host_path_result="$3$func_to_host_path_result"
+ ;;
esac
+ case $4 in
+ $2 ) func_append func_to_host_path_result "$3"
+ ;;
+ esac
+}
+# end func_convert_path_front_back_pathsep
- # If the previous option needs an argument, assign it.
- if test -n "$prev"; then
- case $prev in
- execute_dlfiles)
- execute_dlfiles="$execute_dlfiles $arg"
- ;;
- tag)
- tagname="$arg"
- preserve_args="${preserve_args}=$arg"
-
- # Check whether tagname contains only valid characters
- case $tagname in
- *[!-_A-Za-z0-9,/]*)
- $echo "$progname: invalid tag name: $tagname" 1>&2
- exit $EXIT_FAILURE
- ;;
- esac
- case $tagname in
- CC)
- # Don't test for the "default" C tag, as we know, it's there, but
- # not specially marked.
- ;;
- *)
- if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
- taglist="$taglist $tagname"
- # Evaluate the configuration.
- eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
- else
- $echo "$progname: ignoring unknown tag $tagname" 1>&2
- fi
- ;;
- esac
+##################################################
+# $build to $host FILE NAME CONVERSION FUNCTIONS #
+##################################################
+# invoked via `$to_host_file_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# Result will be available in $func_to_host_file_result.
+
+
+# func_to_host_file ARG
+# Converts the file name ARG from $build format to $host format. Return result
+# in func_to_host_file_result.
+func_to_host_file ()
+{
+ $opt_debug
+ $to_host_file_cmd "$1"
+}
+# end func_to_host_file
+
+
+# func_to_tool_file ARG LAZY
+# converts the file name ARG from $build format to toolchain format. Return
+# result in func_to_tool_file_result. If the conversion in use is listed
+# in (the comma separated) LAZY, no conversion takes place.
+func_to_tool_file ()
+{
+ $opt_debug
+ case ,$2, in
+ *,"$to_tool_file_cmd",*)
+ func_to_tool_file_result=$1
;;
*)
- eval "$prev=\$arg"
+ $to_tool_file_cmd "$1"
+ func_to_tool_file_result=$func_to_host_file_result
;;
- esac
+ esac
+}
+# end func_to_tool_file
- prev=
- prevopt=
- continue
+
+# func_convert_file_noop ARG
+# Copy ARG to func_to_host_file_result.
+func_convert_file_noop ()
+{
+ func_to_host_file_result="$1"
+}
+# end func_convert_file_noop
+
+
+# func_convert_file_msys_to_w32 ARG
+# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper. Returns result in
+# func_to_host_file_result.
+func_convert_file_msys_to_w32 ()
+{
+ $opt_debug
+ func_to_host_file_result="$1"
+ if test -n "$1"; then
+ func_convert_core_msys_to_w32 "$1"
+ func_to_host_file_result="$func_convert_core_msys_to_w32_result"
fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_w32
- # Have we seen a non-optional argument yet?
- case $arg in
- --help)
- show_help=yes
- ;;
- --version)
- echo "\
-$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
+# func_convert_file_cygwin_to_w32 ARG
+# Convert file name ARG from Cygwin to w32 format. Returns result in
+# func_to_host_file_result.
+func_convert_file_cygwin_to_w32 ()
+{
+ $opt_debug
+ func_to_host_file_result="$1"
+ if test -n "$1"; then
+ # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
+ # LT_CYGPATH in this case.
+ func_to_host_file_result=`cygpath -m "$1"`
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_cygwin_to_w32
-Copyright (C) 2007 Free Software Foundation, Inc.
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
- exit $?
- ;;
- --config)
- ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
- # Now print the configurations for the tags.
- for tagname in $taglist; do
- ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
- done
- exit $?
- ;;
+# func_convert_file_nix_to_w32 ARG
+# Convert file name ARG from *nix to w32 format. Requires a wine environment
+# and a working winepath. Returns result in func_to_host_file_result.
+func_convert_file_nix_to_w32 ()
+{
+ $opt_debug
+ func_to_host_file_result="$1"
+ if test -n "$1"; then
+ func_convert_core_file_wine_to_w32 "$1"
+ func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_w32
- --debug)
- $echo "$progname: enabling shell trace mode"
- set -x
- preserve_args="$preserve_args $arg"
- ;;
- --dry-run | -n)
- run=:
- ;;
+# func_convert_file_msys_to_cygwin ARG
+# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_file_msys_to_cygwin ()
+{
+ $opt_debug
+ func_to_host_file_result="$1"
+ if test -n "$1"; then
+ func_convert_core_msys_to_w32 "$1"
+ func_cygpath -u "$func_convert_core_msys_to_w32_result"
+ func_to_host_file_result="$func_cygpath_result"
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_cygwin
- --features)
- $echo "host: $host"
- if test "$build_libtool_libs" = yes; then
- $echo "enable shared libraries"
- else
- $echo "disable shared libraries"
- fi
- if test "$build_old_libs" = yes; then
- $echo "enable static libraries"
- else
- $echo "disable static libraries"
- fi
- exit $?
- ;;
- --finish) mode="finish" ;;
+# func_convert_file_nix_to_cygwin ARG
+# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed
+# in a wine environment, working winepath, and LT_CYGPATH set. Returns result
+# in func_to_host_file_result.
+func_convert_file_nix_to_cygwin ()
+{
+ $opt_debug
+ func_to_host_file_result="$1"
+ if test -n "$1"; then
+ # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
+ func_convert_core_file_wine_to_w32 "$1"
+ func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
+ func_to_host_file_result="$func_cygpath_result"
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_cygwin
- --mode) prevopt="--mode" prev=mode ;;
- --mode=*) mode="$optarg" ;;
- --preserve-dup-deps) duplicate_deps="yes" ;;
+#############################################
+# $build to $host PATH CONVERSION FUNCTIONS #
+#############################################
+# invoked via `$to_host_path_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# The result will be available in $func_to_host_path_result.
+#
+# Path separators are also converted from $build format to $host format. If
+# ARG begins or ends with a path separator character, it is preserved (but
+# converted to $host format) on output.
+#
+# All path conversion functions are named using the following convention:
+# file name conversion function : func_convert_file_X_to_Y ()
+# path conversion function : func_convert_path_X_to_Y ()
+# where, for any given $build/$host combination the 'X_to_Y' value is the
+# same. If conversion functions are added for new $build/$host combinations,
+# the two new functions must follow this pattern, or func_init_to_host_path_cmd
+# will break.
+
+
+# func_init_to_host_path_cmd
+# Ensures that function "pointer" variable $to_host_path_cmd is set to the
+# appropriate value, based on the value of $to_host_file_cmd.
+to_host_path_cmd=
+func_init_to_host_path_cmd ()
+{
+ $opt_debug
+ if test -z "$to_host_path_cmd"; then
+ func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
+ to_host_path_cmd="func_convert_path_${func_stripname_result}"
+ fi
+}
- --quiet | --silent)
- show=:
- preserve_args="$preserve_args $arg"
- ;;
- --tag)
- prevopt="--tag"
- prev=tag
- preserve_args="$preserve_args --tag"
- ;;
- --tag=*)
- set tag "$optarg" ${1+"$@"}
- shift
- prev=tag
- preserve_args="$preserve_args --tag"
- ;;
+# func_to_host_path ARG
+# Converts the path ARG from $build format to $host format. Return result
+# in func_to_host_path_result.
+func_to_host_path ()
+{
+ $opt_debug
+ func_init_to_host_path_cmd
+ $to_host_path_cmd "$1"
+}
+# end func_to_host_path
- -dlopen)
- prevopt="-dlopen"
- prev=execute_dlfiles
- ;;
- -*)
- $echo "$modename: unrecognized option \`$arg'" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- ;;
+# func_convert_path_noop ARG
+# Copy ARG to func_to_host_path_result.
+func_convert_path_noop ()
+{
+ func_to_host_path_result="$1"
+}
+# end func_convert_path_noop
- *)
- nonopt="$arg"
- break
- ;;
- esac
-done
-if test -n "$prevopt"; then
- $echo "$modename: option \`$prevopt' requires an argument" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
-fi
+# func_convert_path_msys_to_w32 ARG
+# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper. Returns result in
+# func_to_host_path_result.
+func_convert_path_msys_to_w32 ()
+{
+ $opt_debug
+ func_to_host_path_result="$1"
+ if test -n "$1"; then
+ # Remove leading and trailing path separator characters from ARG. MSYS
+ # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
+ # and winepath ignores them completely.
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+ func_to_host_path_result="$func_convert_core_msys_to_w32_result"
+ func_convert_path_check : ";" \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+ fi
+}
+# end func_convert_path_msys_to_w32
-case $disable_libs in
-no)
- ;;
-shared)
- build_libtool_libs=no
- build_old_libs=yes
- ;;
-static)
- build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
- ;;
-esac
-# If this variable is set in any of the actions, the command in it
-# will be execed at the end. This prevents here-documents from being
-# left over by shells.
-exec_cmd=
+# func_convert_path_cygwin_to_w32 ARG
+# Convert path ARG from Cygwin to w32 format. Returns result in
+# func_to_host_file_result.
+func_convert_path_cygwin_to_w32 ()
+{
+ $opt_debug
+ func_to_host_path_result="$1"
+ if test -n "$1"; then
+ # See func_convert_path_msys_to_w32:
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
+ func_convert_path_check : ";" \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+ fi
+}
+# end func_convert_path_cygwin_to_w32
-if test -z "$show_help"; then
- # Infer the operation mode.
- if test -z "$mode"; then
- $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
- $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
- case $nonopt in
- *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
- mode=link
- for arg
- do
- case $arg in
- -c)
- mode=compile
- break
- ;;
- esac
- done
- ;;
- *db | *dbx | *strace | *truss)
- mode=execute
- ;;
- *install*|cp|mv)
- mode=install
- ;;
- *rm)
- mode=uninstall
- ;;
- *)
- # If we have no mode, but dlfiles were specified, then do execute mode.
- test -n "$execute_dlfiles" && mode=execute
+# func_convert_path_nix_to_w32 ARG
+# Convert path ARG from *nix to w32 format. Requires a wine environment and
+# a working winepath. Returns result in func_to_host_file_result.
+func_convert_path_nix_to_w32 ()
+{
+ $opt_debug
+ func_to_host_path_result="$1"
+ if test -n "$1"; then
+ # See func_convert_path_msys_to_w32:
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+ func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
+ func_convert_path_check : ";" \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+ fi
+}
+# end func_convert_path_nix_to_w32
- # Just use the default operation mode.
- if test -z "$mode"; then
- if test -n "$nonopt"; then
- $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
- else
- $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
- fi
- fi
- ;;
- esac
+
+# func_convert_path_msys_to_cygwin ARG
+# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_path_msys_to_cygwin ()
+{
+ $opt_debug
+ func_to_host_path_result="$1"
+ if test -n "$1"; then
+ # See func_convert_path_msys_to_w32:
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+ func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
+ func_to_host_path_result="$func_cygpath_result"
+ func_convert_path_check : : \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" : "$1"
fi
+}
+# end func_convert_path_msys_to_cygwin
- # Only execute mode is allowed to have -dlopen flags.
- if test -n "$execute_dlfiles" && test "$mode" != execute; then
- $echo "$modename: unrecognized option \`-dlopen'" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
+
+# func_convert_path_nix_to_cygwin ARG
+# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a
+# a wine environment, working winepath, and LT_CYGPATH set. Returns result in
+# func_to_host_file_result.
+func_convert_path_nix_to_cygwin ()
+{
+ $opt_debug
+ func_to_host_path_result="$1"
+ if test -n "$1"; then
+ # Remove leading and trailing path separator characters from
+ # ARG. msys behavior is inconsistent here, cygpath turns them
+ # into '.;' and ';.', and winepath ignores them completely.
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+ func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
+ func_to_host_path_result="$func_cygpath_result"
+ func_convert_path_check : : \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" : "$1"
fi
+}
+# end func_convert_path_nix_to_cygwin
- # Change the help message to a mode-specific one.
- generic_help="$help"
- help="Try \`$modename --help --mode=$mode' for more information."
- # These modes are in order of execution frequency so that they run quickly.
- case $mode in
- # libtool compile mode
- compile)
- modename="$modename: compile"
+# func_mode_compile arg...
+func_mode_compile ()
+{
+ $opt_debug
# Get the compilation command and the source file.
base_compile=
srcfile="$nonopt" # always keep a non-empty value in "srcfile"
@@ -687,6 +1987,7 @@ if test -z "$show_help"; then
arg_mode=normal
libobj=
later=
+ pie_flag=
for arg
do
@@ -707,16 +2008,19 @@ if test -z "$show_help"; then
# Accept any command-line options.
case $arg in
-o)
- if test -n "$libobj" ; then
- $echo "$modename: you cannot specify \`-o' more than once" 1>&2
- exit $EXIT_FAILURE
- fi
+ test -n "$libobj" && \
+ func_fatal_error "you cannot specify \`-o' more than once"
arg_mode=target
continue
;;
- -static | -prefer-pic | -prefer-non-pic)
- later="$later $arg"
+ -pie | -fpie | -fPIE)
+ func_append pie_flag " $arg"
+ continue
+ ;;
+
+ -shared | -static | -prefer-pic | -prefer-non-pic)
+ func_append later " $arg"
continue
;;
@@ -731,31 +2035,24 @@ if test -z "$show_help"; then
;; # replaced later. I would guess that would be a bug.
-Wc,*)
- args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
lastarg=
save_ifs="$IFS"; IFS=','
- for arg in $args; do
+ for arg in $args; do
IFS="$save_ifs"
-
- # Double-quote args containing other shell metacharacters.
- # Many Bourne shells cannot handle close brackets correctly
- # in scan sets, so we specify it separately.
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
- lastarg="$lastarg $arg"
+ func_append_quoted lastarg "$arg"
done
IFS="$save_ifs"
- lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
+ func_stripname ' ' '' "$lastarg"
+ lastarg=$func_stripname_result
# Add the arguments to base_compile.
- base_compile="$base_compile $lastarg"
+ func_append base_compile " $lastarg"
continue
;;
- * )
+ *)
# Accept the current argument as the source file.
# The previous "srcfile" becomes the current argument.
#
@@ -767,65 +2064,41 @@ if test -z "$show_help"; then
esac # case $arg_mode
# Aesthetically quote the previous argument.
- lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
-
- case $lastarg in
- # Double-quote args containing other shell metacharacters.
- # Many Bourne shells cannot handle close brackets correctly
- # in scan sets, and some SunOS ksh mistreat backslash-escaping
- # in scan sets (worked around with variable expansion),
- # and furthermore cannot handle '|' '&' '(' ')' in scan sets
- # at all, so we specify them separately.
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- lastarg="\"$lastarg\""
- ;;
- esac
-
- base_compile="$base_compile $lastarg"
+ func_append_quoted base_compile "$lastarg"
done # for arg
case $arg_mode in
arg)
- $echo "$modename: you must specify an argument for -Xcompile"
- exit $EXIT_FAILURE
+ func_fatal_error "you must specify an argument for -Xcompile"
;;
target)
- $echo "$modename: you must specify a target with \`-o'" 1>&2
- exit $EXIT_FAILURE
+ func_fatal_error "you must specify a target with \`-o'"
;;
*)
# Get the name of the library object.
- [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
+ test -z "$libobj" && {
+ func_basename "$srcfile"
+ libobj="$func_basename_result"
+ }
;;
esac
# Recognize several different file suffixes.
# If the user specifies -o file.o, it is replaced with file.lo
- xform='[cCFSifmso]'
case $libobj in
- *.ada) xform=ada ;;
- *.adb) xform=adb ;;
- *.ads) xform=ads ;;
- *.asm) xform=asm ;;
- *.c++) xform=c++ ;;
- *.cc) xform=cc ;;
- *.ii) xform=ii ;;
- *.class) xform=class ;;
- *.cpp) xform=cpp ;;
- *.cxx) xform=cxx ;;
- *.[fF][09]?) xform=[fF][09]. ;;
- *.for) xform=for ;;
- *.java) xform=java ;;
- *.obj) xform=obj ;;
+ *.[cCFSifmso] | \
+ *.ada | *.adb | *.ads | *.asm | \
+ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
+ *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup)
+ func_xform "$libobj"
+ libobj=$func_xform_result
+ ;;
esac
- libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
-
case $libobj in
- *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
+ *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
*)
- $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
- exit $EXIT_FAILURE
+ func_fatal_error "cannot determine name of library object from \`$libobj'"
;;
esac
@@ -833,7 +2106,15 @@ if test -z "$show_help"; then
for arg in $later; do
case $arg in
+ -shared)
+ test "$build_libtool_libs" != yes && \
+ func_fatal_configuration "can not build a shared library"
+ build_old_libs=no
+ continue
+ ;;
+
-static)
+ build_libtool_libs=no
build_old_libs=yes
continue
;;
@@ -850,28 +2131,17 @@ if test -z "$show_help"; then
esac
done
- qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
- case $qlibobj in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- qlibobj="\"$qlibobj\"" ;;
- esac
- test "X$libobj" != "X$qlibobj" \
- && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \
- && $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
- objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
- xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$xdir" = "X$obj"; then
- xdir=
- else
- xdir=$xdir/
- fi
+ func_quote_for_eval "$libobj"
+ test "X$libobj" != "X$func_quote_for_eval_result" \
+ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
+ && func_warning "libobj name \`$libobj' may not contain shell special characters."
+ func_dirname_and_basename "$obj" "/" ""
+ objname="$func_basename_result"
+ xdir="$func_dirname_result"
lobj=${xdir}$objdir/$objname
- if test -z "$base_compile"; then
- $echo "$modename: you must specify a compilation command" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
+ test -z "$base_compile" && \
+ func_fatal_help "you must specify a compilation command"
# Delete any leftover library objects.
if test "$build_old_libs" = yes; then
@@ -880,12 +2150,9 @@ if test -z "$show_help"; then
removelist="$lobj $libobj ${libobj}T"
fi
- $run $rm $removelist
- trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
-
# On Cygwin there's no "real" PIC flag so we must build both object types
case $host_os in
- cygwin* | mingw* | pw32* | os2*)
+ cygwin* | mingw* | pw32* | os2* | cegcc*)
pic_mode=default
;;
esac
@@ -897,10 +2164,8 @@ if test -z "$show_help"; then
# Calculate the filename of the output object if compiler does
# not support -o with -c
if test "$compiler_c_o" = no; then
- output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
+ output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext}
lockfile="$output_obj.lock"
- removelist="$removelist $output_obj $lockfile"
- trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
else
output_obj=
need_locks=no
@@ -910,13 +2175,13 @@ if test -z "$show_help"; then
# Lock this critical section if it is needed
# We use this script file to make the link, it avoids creating a new file
if test "$need_locks" = yes; then
- until $run ln "$progpath" "$lockfile" 2>/dev/null; do
- $show "Waiting for $lockfile to be removed"
+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+ func_echo "Waiting for $lockfile to be removed"
sleep 2
done
elif test "$need_locks" = warn; then
if test -f "$lockfile"; then
- $echo "\
+ $ECHO "\
*** ERROR, $lockfile exists and contains:
`cat $lockfile 2>/dev/null`
@@ -927,34 +2192,21 @@ repeat this compilation, it may succeed, by chance, but you had better
avoid parallel builds (make -j) in this platform, or get a better
compiler."
- $run $rm $removelist
+ $opt_dry_run || $RM $removelist
exit $EXIT_FAILURE
fi
- $echo "$srcfile" > "$lockfile"
+ func_append removelist " $output_obj"
+ $ECHO "$srcfile" > "$lockfile"
fi
- if test -n "$fix_srcfile_path"; then
- eval srcfile=\"$fix_srcfile_path\"
- fi
- qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
- case $qsrcfile in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- qsrcfile="\"$qsrcfile\"" ;;
- esac
+ $opt_dry_run || $RM $removelist
+ func_append removelist " $lockfile"
+ trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
- $run $rm "$libobj" "${libobj}T"
-
- # Create a libtool object file (analogous to a ".la" file),
- # but don't create it if we're doing a dry run.
- test -z "$run" && cat > ${libobj}T <<EOF
-# $libobj - a libtool object file
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# Name of the PIC object.
-EOF
+ func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
+ srcfile=$func_to_tool_file_result
+ func_quote_for_eval "$srcfile"
+ qsrcfile=$func_quote_for_eval_result
# Only build a PIC object if we are building libtool libraries.
if test "$build_libtool_libs" = yes; then
@@ -968,32 +2220,19 @@ EOF
command="$base_compile $qsrcfile"
fi
- if test ! -d "${xdir}$objdir"; then
- $show "$mkdir ${xdir}$objdir"
- $run $mkdir ${xdir}$objdir
- exit_status=$?
- if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
- exit $exit_status
- fi
- fi
+ func_mkdir_p "$xdir$objdir"
if test -z "$output_obj"; then
# Place PIC objects in $objdir
- command="$command -o $lobj"
+ func_append command " -o $lobj"
fi
- $run $rm "$lobj" "$output_obj"
-
- $show "$command"
- if $run eval "$command"; then :
- else
- test -n "$output_obj" && $run $rm $removelist
- exit $EXIT_FAILURE
- fi
+ func_show_eval_locale "$command" \
+ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
if test "$need_locks" = warn &&
test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
- $echo "\
+ $ECHO "\
*** ERROR, $lockfile contains:
`cat $lockfile 2>/dev/null`
@@ -1007,65 +2246,42 @@ repeat this compilation, it may succeed, by chance, but you had better
avoid parallel builds (make -j) in this platform, or get a better
compiler."
- $run $rm $removelist
+ $opt_dry_run || $RM $removelist
exit $EXIT_FAILURE
fi
# Just move the object if needed, then go on to compile the next one
if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
- $show "$mv $output_obj $lobj"
- if $run $mv $output_obj $lobj; then :
- else
- error=$?
- $run $rm $removelist
- exit $error
- fi
+ func_show_eval '$MV "$output_obj" "$lobj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
fi
- # Append the name of the PIC object to the libtool object file.
- test -z "$run" && cat >> ${libobj}T <<EOF
-pic_object='$objdir/$objname'
-
-EOF
-
# Allow error messages only from the first compilation.
if test "$suppress_opt" = yes; then
- suppress_output=' >/dev/null 2>&1'
+ suppress_output=' >/dev/null 2>&1'
fi
- else
- # No PIC object so indicate it doesn't exist in the libtool
- # object file.
- test -z "$run" && cat >> ${libobj}T <<EOF
-pic_object=none
-
-EOF
fi
# Only build a position-dependent object if we build old libraries.
if test "$build_old_libs" = yes; then
if test "$pic_mode" != yes; then
# Don't build PIC code
- command="$base_compile $qsrcfile"
+ command="$base_compile $qsrcfile$pie_flag"
else
command="$base_compile $qsrcfile $pic_flag"
fi
if test "$compiler_c_o" = yes; then
- command="$command -o $obj"
+ func_append command " -o $obj"
fi
# Suppress compiler output if we already did a PIC compilation.
- command="$command$suppress_output"
- $run $rm "$obj" "$output_obj"
- $show "$command"
- if $run eval "$command"; then :
- else
- $run $rm $removelist
- exit $EXIT_FAILURE
- fi
+ func_append command "$suppress_output"
+ func_show_eval_locale "$command" \
+ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
if test "$need_locks" = warn &&
test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
- $echo "\
+ $ECHO "\
*** ERROR, $lockfile contains:
`cat $lockfile 2>/dev/null`
@@ -1079,53 +2295,2827 @@ repeat this compilation, it may succeed, by chance, but you had better
avoid parallel builds (make -j) in this platform, or get a better
compiler."
- $run $rm $removelist
+ $opt_dry_run || $RM $removelist
exit $EXIT_FAILURE
fi
# Just move the object if needed
if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
- $show "$mv $output_obj $obj"
- if $run $mv $output_obj $obj; then :
+ func_show_eval '$MV "$output_obj" "$obj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+ fi
+
+ $opt_dry_run || {
+ func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
+
+ # Unlock the critical section if it was locked
+ if test "$need_locks" != no; then
+ removelist=$lockfile
+ $RM "$lockfile"
+ fi
+ }
+
+ exit $EXIT_SUCCESS
+}
+
+$opt_help || {
+ test "$opt_mode" = compile && func_mode_compile ${1+"$@"}
+}
+
+func_mode_help ()
+{
+ # We need to display help for each of the modes.
+ case $opt_mode in
+ "")
+ # Generic help is extracted from the usage comments
+ # at the start of this file.
+ func_help
+ ;;
+
+ clean)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ compile)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+ -o OUTPUT-FILE set the output file name to OUTPUT-FILE
+ -no-suppress do not suppress compiler output for multiple passes
+ -prefer-pic try to build PIC objects only
+ -prefer-non-pic try to build non-PIC objects only
+ -shared do not build a \`.o' file suitable for static linking
+ -static only build a \`.o' file suitable for static linking
+ -Wc,FLAG pass FLAG directly to the compiler
+
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+ ;;
+
+ execute)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+ -dlopen FILE add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+ ;;
+
+ finish)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges. Use
+the \`--dry-run' option if you just want to see what would be executed."
+ ;;
+
+ install)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command. The first component should be
+either the \`install' or \`cp' program.
+
+The following components of INSTALL-COMMAND are treated specially:
+
+ -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+ ;;
+
+ link)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+ -all-static do not do any dynamic linking at all
+ -avoid-version do not add a version suffix if possible
+ -bindir BINDIR specify path to binaries directory (for systems where
+ libraries must be found in the PATH setting at runtime)
+ -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
+ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
+ -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+ -export-symbols SYMFILE
+ try to export only the symbols listed in SYMFILE
+ -export-symbols-regex REGEX
+ try to export only the symbols matching REGEX
+ -LLIBDIR search LIBDIR for required installed libraries
+ -lNAME OUTPUT-FILE requires the installed library libNAME
+ -module build a library that can dlopened
+ -no-fast-install disable the fast-install mode
+ -no-install link a not-installable executable
+ -no-undefined declare that a library does not refer to external symbols
+ -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
+ -objectlist FILE Use a list of object files found in FILE to specify objects
+ -precious-files-regex REGEX
+ don't remove output files matching REGEX
+ -release RELEASE specify package release information
+ -rpath LIBDIR the created library will eventually be installed in LIBDIR
+ -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
+ -shared only do dynamic linking of libtool libraries
+ -shrext SUFFIX override the standard shared library file extension
+ -static do not do any dynamic linking of uninstalled libtool libraries
+ -static-libtool-libs
+ do not do any dynamic linking of libtool libraries
+ -version-info CURRENT[:REVISION[:AGE]]
+ specify library version info [each variable defaults to 0]
+ -weak LIBNAME declare that the target provides the LIBNAME interface
+ -Wc,FLAG
+ -Xcompiler FLAG pass linker-specific FLAG directly to the compiler
+ -Wl,FLAG
+ -Xlinker FLAG pass linker-specific FLAG directly to the linker
+ -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC)
+
+All other options (arguments beginning with \`-') are ignored.
+
+Every other argument is treated as a filename. Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+ ;;
+
+ uninstall)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ *)
+ func_fatal_help "invalid operation mode \`$opt_mode'"
+ ;;
+ esac
+
+ echo
+ $ECHO "Try \`$progname --help' for more information about other modes."
+}
+
+# Now that we've collected a possible --mode arg, show help if necessary
+if $opt_help; then
+ if test "$opt_help" = :; then
+ func_mode_help
+ else
+ {
+ func_help noexit
+ for opt_mode in compile link execute install finish uninstall clean; do
+ func_mode_help
+ done
+ } | sed -n '1p; 2,$s/^Usage:/ or: /p'
+ {
+ func_help noexit
+ for opt_mode in compile link execute install finish uninstall clean; do
+ echo
+ func_mode_help
+ done
+ } |
+ sed '1d
+ /^When reporting/,/^Report/{
+ H
+ d
+ }
+ $x
+ /information about other modes/d
+ /more detailed .*MODE/d
+ s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
+ fi
+ exit $?
+fi
+
+
+# func_mode_execute arg...
+func_mode_execute ()
+{
+ $opt_debug
+ # The first argument is the command name.
+ cmd="$nonopt"
+ test -z "$cmd" && \
+ func_fatal_help "you must specify a COMMAND"
+
+ # Handle -dlopen flags immediately.
+ for file in $opt_dlopen; do
+ test -f "$file" \
+ || func_fatal_help "\`$file' is not a file"
+
+ dir=
+ case $file in
+ *.la)
+ func_resolve_sysroot "$file"
+ file=$func_resolve_sysroot_result
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "\`$lib' is not a valid libtool archive"
+
+ # Read the libtool library.
+ dlname=
+ library_names=
+ func_source "$file"
+
+ # Skip this library if it cannot be dlopened.
+ if test -z "$dlname"; then
+ # Warn if it was a shared library.
+ test -n "$library_names" && \
+ func_warning "\`$file' was not linked with \`-export-dynamic'"
+ continue
+ fi
+
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+
+ if test -f "$dir/$objdir/$dlname"; then
+ func_append dir "/$objdir"
else
- error=$?
- $run $rm $removelist
- exit $error
+ if test ! -f "$dir/$dlname"; then
+ func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
+ fi
fi
+ ;;
+
+ *.lo)
+ # Just add the directory containing the .lo file.
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+ ;;
+
+ *)
+ func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
+ continue
+ ;;
+ esac
+
+ # Get the absolute pathname.
+ absdir=`cd "$dir" && pwd`
+ test -n "$absdir" && dir="$absdir"
+
+ # Now add the directory to shlibpath_var.
+ if eval "test -z \"\$$shlibpath_var\""; then
+ eval "$shlibpath_var=\"\$dir\""
+ else
+ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
fi
+ done
- # Append the name of the non-PIC object the libtool object file.
- # Only append if the libtool object file exists.
- test -z "$run" && cat >> ${libobj}T <<EOF
-# Name of the non-PIC object.
-non_pic_object='$objname'
+ # This variable tells wrapper scripts just to set shlibpath_var
+ # rather than running their programs.
+ libtool_execute_magic="$magic"
-EOF
- else
- # Append the name of the non-PIC object the libtool object file.
- # Only append if the libtool object file exists.
- test -z "$run" && cat >> ${libobj}T <<EOF
-# Name of the non-PIC object.
-non_pic_object=none
+ # Check if any of the arguments is a wrapper script.
+ args=
+ for file
+ do
+ case $file in
+ -* | *.la | *.lo ) ;;
+ *)
+ # Do a test to see if this is really a libtool program.
+ if func_ltwrapper_script_p "$file"; then
+ func_source "$file"
+ # Transform arg to wrapped name.
+ file="$progdir/$program"
+ elif func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ func_source "$func_ltwrapper_scriptname_result"
+ # Transform arg to wrapped name.
+ file="$progdir/$program"
+ fi
+ ;;
+ esac
+ # Quote arguments (to preserve shell metacharacters).
+ func_append_quoted args "$file"
+ done
-EOF
+ if test "X$opt_dry_run" = Xfalse; then
+ if test -n "$shlibpath_var"; then
+ # Export the shlibpath_var.
+ eval "export $shlibpath_var"
+ fi
+
+ # Restore saved environment variables
+ for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+ do
+ eval "if test \"\${save_$lt_var+set}\" = set; then
+ $lt_var=\$save_$lt_var; export $lt_var
+ else
+ $lt_unset $lt_var
+ fi"
+ done
+
+ # Now prepare to actually exec the command.
+ exec_cmd="\$cmd$args"
+ else
+ # Display what would be done.
+ if test -n "$shlibpath_var"; then
+ eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
+ echo "export $shlibpath_var"
+ fi
+ $ECHO "$cmd$args"
+ exit $EXIT_SUCCESS
fi
+}
+
+test "$opt_mode" = execute && func_mode_execute ${1+"$@"}
- $run $mv "${libobj}T" "${libobj}"
- # Unlock the critical section if it was locked
- if test "$need_locks" != no; then
- $run $rm "$lockfile"
+# func_mode_finish arg...
+func_mode_finish ()
+{
+ $opt_debug
+ libs=
+ libdirs=
+ admincmds=
+
+ for opt in "$nonopt" ${1+"$@"}
+ do
+ if test -d "$opt"; then
+ func_append libdirs " $opt"
+
+ elif test -f "$opt"; then
+ if func_lalib_unsafe_p "$opt"; then
+ func_append libs " $opt"
+ else
+ func_warning "\`$opt' is not a valid libtool archive"
+ fi
+
+ else
+ func_fatal_error "invalid argument \`$opt'"
+ fi
+ done
+
+ if test -n "$libs"; then
+ if test -n "$lt_sysroot"; then
+ sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
+ sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
+ else
+ sysroot_cmd=
+ fi
+
+ # Remove sysroot references
+ if $opt_dry_run; then
+ for lib in $libs; do
+ echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
+ done
+ else
+ tmpdir=`func_mktempdir`
+ for lib in $libs; do
+ sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
+ > $tmpdir/tmp-la
+ mv -f $tmpdir/tmp-la $lib
+ done
+ ${RM}r "$tmpdir"
+ fi
fi
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ for libdir in $libdirs; do
+ if test -n "$finish_cmds"; then
+ # Do each command in the finish commands.
+ func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
+'"$cmd"'"'
+ fi
+ if test -n "$finish_eval"; then
+ # Do the single finish_eval.
+ eval cmds=\"$finish_eval\"
+ $opt_dry_run || eval "$cmds" || func_append admincmds "
+ $cmds"
+ fi
+ done
+ fi
+
+ # Exit here if they wanted silent mode.
+ $opt_silent && exit $EXIT_SUCCESS
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ echo "----------------------------------------------------------------------"
+ echo "Libraries have been installed in:"
+ for libdir in $libdirs; do
+ $ECHO " $libdir"
+ done
+ echo
+ echo "If you ever happen to want to link against installed libraries"
+ echo "in a given directory, LIBDIR, you must either use libtool, and"
+ echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
+ echo "flag during linking and do at least one of the following:"
+ if test -n "$shlibpath_var"; then
+ echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
+ echo " during execution"
+ fi
+ if test -n "$runpath_var"; then
+ echo " - add LIBDIR to the \`$runpath_var' environment variable"
+ echo " during linking"
+ fi
+ if test -n "$hardcode_libdir_flag_spec"; then
+ libdir=LIBDIR
+ eval flag=\"$hardcode_libdir_flag_spec\"
+
+ $ECHO " - use the \`$flag' linker flag"
+ fi
+ if test -n "$admincmds"; then
+ $ECHO " - have your system administrator run these commands:$admincmds"
+ fi
+ if test -f /etc/ld.so.conf; then
+ echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+ fi
+ echo
+
+ echo "See any operating system documentation about shared libraries for"
+ case $host in
+ solaris2.[6789]|solaris2.1[0-9])
+ echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
+ echo "pages."
+ ;;
+ *)
+ echo "more information, such as the ld(1) and ld.so(8) manual pages."
+ ;;
+ esac
+ echo "----------------------------------------------------------------------"
+ fi
exit $EXIT_SUCCESS
+}
+
+test "$opt_mode" = finish && func_mode_finish ${1+"$@"}
+
+
+# func_mode_install arg...
+func_mode_install ()
+{
+ $opt_debug
+ # There may be an optional sh(1) argument at the beginning of
+ # install_prog (especially on Windows NT).
+ if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+ # Allow the use of GNU shtool's install command.
+ case $nonopt in *shtool*) :;; *) false;; esac; then
+ # Aesthetically quote it.
+ func_quote_for_eval "$nonopt"
+ install_prog="$func_quote_for_eval_result "
+ arg=$1
+ shift
+ else
+ install_prog=
+ arg=$nonopt
+ fi
+
+ # The real first argument should be the name of the installation program.
+ # Aesthetically quote it.
+ func_quote_for_eval "$arg"
+ func_append install_prog "$func_quote_for_eval_result"
+ install_shared_prog=$install_prog
+ case " $install_prog " in
+ *[\\\ /]cp\ *) install_cp=: ;;
+ *) install_cp=false ;;
+ esac
+
+ # We need to accept at least all the BSD install flags.
+ dest=
+ files=
+ opts=
+ prev=
+ install_type=
+ isdir=no
+ stripme=
+ no_mode=:
+ for arg
+ do
+ arg2=
+ if test -n "$dest"; then
+ func_append files " $dest"
+ dest=$arg
+ continue
+ fi
+
+ case $arg in
+ -d) isdir=yes ;;
+ -f)
+ if $install_cp; then :; else
+ prev=$arg
+ fi
+ ;;
+ -g | -m | -o)
+ prev=$arg
+ ;;
+ -s)
+ stripme=" -s"
+ continue
+ ;;
+ -*)
+ ;;
+ *)
+ # If the previous option needed an argument, then skip it.
+ if test -n "$prev"; then
+ if test "x$prev" = x-m && test -n "$install_override_mode"; then
+ arg2=$install_override_mode
+ no_mode=false
+ fi
+ prev=
+ else
+ dest=$arg
+ continue
+ fi
+ ;;
+ esac
+
+ # Aesthetically quote the argument.
+ func_quote_for_eval "$arg"
+ func_append install_prog " $func_quote_for_eval_result"
+ if test -n "$arg2"; then
+ func_quote_for_eval "$arg2"
+ fi
+ func_append install_shared_prog " $func_quote_for_eval_result"
+ done
+
+ test -z "$install_prog" && \
+ func_fatal_help "you must specify an install program"
+
+ test -n "$prev" && \
+ func_fatal_help "the \`$prev' option requires an argument"
+
+ if test -n "$install_override_mode" && $no_mode; then
+ if $install_cp; then :; else
+ func_quote_for_eval "$install_override_mode"
+ func_append install_shared_prog " -m $func_quote_for_eval_result"
+ fi
+ fi
+
+ if test -z "$files"; then
+ if test -z "$dest"; then
+ func_fatal_help "no file or destination specified"
+ else
+ func_fatal_help "you must specify a destination"
+ fi
+ fi
+
+ # Strip any trailing slash from the destination.
+ func_stripname '' '/' "$dest"
+ dest=$func_stripname_result
+
+ # Check to see that the destination is a directory.
+ test -d "$dest" && isdir=yes
+ if test "$isdir" = yes; then
+ destdir="$dest"
+ destname=
+ else
+ func_dirname_and_basename "$dest" "" "."
+ destdir="$func_dirname_result"
+ destname="$func_basename_result"
+
+ # Not a directory, so check to see that there is only one file specified.
+ set dummy $files; shift
+ test "$#" -gt 1 && \
+ func_fatal_help "\`$dest' is not a directory"
+ fi
+ case $destdir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ for file in $files; do
+ case $file in
+ *.lo) ;;
+ *)
+ func_fatal_help "\`$destdir' must be an absolute directory name"
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+
+ staticlibs=
+ future_libdirs=
+ current_libdirs=
+ for file in $files; do
+
+ # Do each installation.
+ case $file in
+ *.$libext)
+ # Do the static libraries later.
+ func_append staticlibs " $file"
+ ;;
+
+ *.la)
+ func_resolve_sysroot "$file"
+ file=$func_resolve_sysroot_result
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "\`$file' is not a valid libtool archive"
+
+ library_names=
+ old_library=
+ relink_command=
+ func_source "$file"
+
+ # Add the libdir to current_libdirs if it is the destination.
+ if test "X$destdir" = "X$libdir"; then
+ case "$current_libdirs " in
+ *" $libdir "*) ;;
+ *) func_append current_libdirs " $libdir" ;;
+ esac
+ else
+ # Note the libdir as a future libdir.
+ case "$future_libdirs " in
+ *" $libdir "*) ;;
+ *) func_append future_libdirs " $libdir" ;;
+ esac
+ fi
+
+ func_dirname "$file" "/" ""
+ dir="$func_dirname_result"
+ func_append dir "$objdir"
+
+ if test -n "$relink_command"; then
+ # Determine the prefix the user has applied to our future dir.
+ inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
+
+ # Don't allow the user to place us outside of our expected
+ # location b/c this prevents finding dependent libraries that
+ # are installed to the same prefix.
+ # At present, this check doesn't affect windows .dll's that
+ # are installed into $libdir/../bin (currently, that works fine)
+ # but it's something to keep an eye on.
+ test "$inst_prefix_dir" = "$destdir" && \
+ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
+
+ if test -n "$inst_prefix_dir"; then
+ # Stick the inst_prefix_dir data into the link command.
+ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+ else
+ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+ fi
+
+ func_warning "relinking \`$file'"
+ func_show_eval "$relink_command" \
+ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
+ fi
+
+ # See the names of the shared library.
+ set dummy $library_names; shift
+ if test -n "$1"; then
+ realname="$1"
+ shift
+
+ srcname="$realname"
+ test -n "$relink_command" && srcname="$realname"T
+
+ # Install the shared library and build the symlinks.
+ func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
+ 'exit $?'
+ tstripme="$stripme"
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ case $realname in
+ *.dll.a)
+ tstripme=""
+ ;;
+ esac
+ ;;
+ esac
+ if test -n "$tstripme" && test -n "$striplib"; then
+ func_show_eval "$striplib $destdir/$realname" 'exit $?'
+ fi
+
+ if test "$#" -gt 0; then
+ # Delete the old symlinks, and create new ones.
+ # Try `ln -sf' first, because the `ln' binary might depend on
+ # the symlink we replace! Solaris /bin/ln does not understand -f,
+ # so we also need to try rm && ln -s.
+ for linkname
+ do
+ test "$linkname" != "$realname" \
+ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
+ done
+ fi
+
+ # Do each command in the postinstall commands.
+ lib="$destdir/$realname"
+ func_execute_cmds "$postinstall_cmds" 'exit $?'
+ fi
+
+ # Install the pseudo-library for information purposes.
+ func_basename "$file"
+ name="$func_basename_result"
+ instname="$dir/$name"i
+ func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
+
+ # Maybe install the static library, too.
+ test -n "$old_library" && func_append staticlibs " $dir/$old_library"
+ ;;
+
+ *.lo)
+ # Install (i.e. copy) a libtool object.
+
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ func_basename "$file"
+ destfile="$func_basename_result"
+ destfile="$destdir/$destfile"
+ fi
+
+ # Deduce the name of the destination old-style object file.
+ case $destfile in
+ *.lo)
+ func_lo2o "$destfile"
+ staticdest=$func_lo2o_result
+ ;;
+ *.$objext)
+ staticdest="$destfile"
+ destfile=
+ ;;
+ *)
+ func_fatal_help "cannot copy a libtool object to \`$destfile'"
+ ;;
+ esac
+
+ # Install the libtool object if requested.
+ test -n "$destfile" && \
+ func_show_eval "$install_prog $file $destfile" 'exit $?'
+
+ # Install the old object if enabled.
+ if test "$build_old_libs" = yes; then
+ # Deduce the name of the old-style object file.
+ func_lo2o "$file"
+ staticobj=$func_lo2o_result
+ func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
+ fi
+ exit $EXIT_SUCCESS
+ ;;
+
+ *)
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ func_basename "$file"
+ destfile="$func_basename_result"
+ destfile="$destdir/$destfile"
+ fi
+
+ # If the file is missing, and there is a .exe on the end, strip it
+ # because it is most likely a libtool script we actually want to
+ # install
+ stripped_ext=""
+ case $file in
+ *.exe)
+ if test ! -f "$file"; then
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ stripped_ext=".exe"
+ fi
+ ;;
+ esac
+
+ # Do a test to see if this is really a libtool program.
+ case $host in
+ *cygwin* | *mingw*)
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ wrapper=$func_ltwrapper_scriptname_result
+ else
+ func_stripname '' '.exe' "$file"
+ wrapper=$func_stripname_result
+ fi
+ ;;
+ *)
+ wrapper=$file
+ ;;
+ esac
+ if func_ltwrapper_script_p "$wrapper"; then
+ notinst_deplibs=
+ relink_command=
+
+ func_source "$wrapper"
+
+ # Check the variables that should have been set.
+ test -z "$generated_by_libtool_version" && \
+ func_fatal_error "invalid libtool wrapper script \`$wrapper'"
+
+ finalize=yes
+ for lib in $notinst_deplibs; do
+ # Check to see that each library is installed.
+ libdir=
+ if test -f "$lib"; then
+ func_source "$lib"
+ fi
+ libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test
+ if test -n "$libdir" && test ! -f "$libfile"; then
+ func_warning "\`$lib' has not been installed in \`$libdir'"
+ finalize=no
+ fi
+ done
+
+ relink_command=
+ func_source "$wrapper"
+
+ outputname=
+ if test "$fast_install" = no && test -n "$relink_command"; then
+ $opt_dry_run || {
+ if test "$finalize" = yes; then
+ tmpdir=`func_mktempdir`
+ func_basename "$file$stripped_ext"
+ file="$func_basename_result"
+ outputname="$tmpdir/$file"
+ # Replace the output file specification.
+ relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
+
+ $opt_silent || {
+ func_quote_for_expand "$relink_command"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ if eval "$relink_command"; then :
+ else
+ func_error "error: relink \`$file' with the above command before installing it"
+ $opt_dry_run || ${RM}r "$tmpdir"
+ continue
+ fi
+ file="$outputname"
+ else
+ func_warning "cannot relink \`$file'"
+ fi
+ }
+ else
+ # Install the binary that we compiled earlier.
+ file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
+ fi
+ fi
+
+ # remove .exe since cygwin /usr/bin/install will append another
+ # one anyway
+ case $install_prog,$host in
+ */usr/bin/install*,*cygwin*)
+ case $file:$destfile in
+ *.exe:*.exe)
+ # this is ok
+ ;;
+ *.exe:*)
+ destfile=$destfile.exe
+ ;;
+ *:*.exe)
+ func_stripname '' '.exe' "$destfile"
+ destfile=$func_stripname_result
+ ;;
+ esac
+ ;;
+ esac
+ func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
+ $opt_dry_run || if test -n "$outputname"; then
+ ${RM}r "$tmpdir"
+ fi
+ ;;
+ esac
+ done
+
+ for file in $staticlibs; do
+ func_basename "$file"
+ name="$func_basename_result"
+
+ # Set up the ranlib parameters.
+ oldlib="$destdir/$name"
+
+ func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
+
+ if test -n "$stripme" && test -n "$old_striplib"; then
+ func_show_eval "$old_striplib $oldlib" 'exit $?'
+ fi
+
+ # Do each command in the postinstall commands.
+ func_execute_cmds "$old_postinstall_cmds" 'exit $?'
+ done
+
+ test -n "$future_libdirs" && \
+ func_warning "remember to run \`$progname --finish$future_libdirs'"
+
+ if test -n "$current_libdirs"; then
+ # Maybe just do a dry run.
+ $opt_dry_run && current_libdirs=" -n$current_libdirs"
+ exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+ else
+ exit $EXIT_SUCCESS
+ fi
+}
+
+test "$opt_mode" = install && func_mode_install ${1+"$@"}
+
+
+# func_generate_dlsyms outputname originator pic_p
+# Extract symbols from dlprefiles and create ${outputname}S.o with
+# a dlpreopen symbol table.
+func_generate_dlsyms ()
+{
+ $opt_debug
+ my_outputname="$1"
+ my_originator="$2"
+ my_pic_p="${3-no}"
+ my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
+ my_dlsyms=
+
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ if test -n "$NM" && test -n "$global_symbol_pipe"; then
+ my_dlsyms="${my_outputname}S.c"
+ else
+ func_error "not configured to extract global symbols from dlpreopened files"
+ fi
+ fi
+
+ if test -n "$my_dlsyms"; then
+ case $my_dlsyms in
+ "") ;;
+ *.c)
+ # Discover the nlist of each of the dlfiles.
+ nlist="$output_objdir/${my_outputname}.nm"
+
+ func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
+
+ # Parse the name list into a source file.
+ func_verbose "creating $output_objdir/$my_dlsyms"
+
+ $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
+/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
+/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
+#endif
+
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
+ relocations are performed -- see ld's documentation on pseudo-relocs. */
+# define LT_DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data. */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
+/* External symbol declarations for the compiler. */\
+"
+
+ if test "$dlself" = yes; then
+ func_verbose "generating symbol list for \`$output'"
+
+ $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
+
+ # Add our own program objects to the symbol list.
+ progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ for progfile in $progfiles; do
+ func_to_tool_file "$progfile" func_convert_file_msys_to_w32
+ func_verbose "extracting global C symbols from \`$func_to_tool_file_result'"
+ $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
+ done
+
+ if test -n "$exclude_expsyms"; then
+ $opt_dry_run || {
+ eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ if test -n "$export_symbols_regex"; then
+ $opt_dry_run || {
+ eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ export_symbols="$output_objdir/$outputname.exp"
+ $opt_dry_run || {
+ $RM $export_symbols
+ eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ else
+ $opt_dry_run || {
+ eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+ eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ fi
+ fi
+
+ for dlprefile in $dlprefiles; do
+ func_verbose "extracting global C symbols from \`$dlprefile'"
+ func_basename "$dlprefile"
+ name="$func_basename_result"
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ # if an import library, we need to obtain dlname
+ if func_win32_import_lib_p "$dlprefile"; then
+ func_tr_sh "$dlprefile"
+ eval "curr_lafile=\$libfile_$func_tr_sh_result"
+ dlprefile_dlbasename=""
+ if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
+ # Use subshell, to avoid clobbering current variable values
+ dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
+ if test -n "$dlprefile_dlname" ; then
+ func_basename "$dlprefile_dlname"
+ dlprefile_dlbasename="$func_basename_result"
+ else
+ # no lafile. user explicitly requested -dlpreopen <import library>.
+ $sharedlib_from_linklib_cmd "$dlprefile"
+ dlprefile_dlbasename=$sharedlib_from_linklib_result
+ fi
+ fi
+ $opt_dry_run || {
+ if test -n "$dlprefile_dlbasename" ; then
+ eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
+ else
+ func_warning "Could not compute DLL name from $name"
+ eval '$ECHO ": $name " >> "$nlist"'
+ fi
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
+ $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
+ }
+ else # not an import lib
+ $opt_dry_run || {
+ eval '$ECHO ": $name " >> "$nlist"'
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+ }
+ fi
+ ;;
+ *)
+ $opt_dry_run || {
+ eval '$ECHO ": $name " >> "$nlist"'
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+ }
+ ;;
+ esac
+ done
+
+ $opt_dry_run || {
+ # Make sure we have at least an empty file.
+ test -f "$nlist" || : > "$nlist"
+
+ if test -n "$exclude_expsyms"; then
+ $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+ $MV "$nlist"T "$nlist"
+ fi
+
+ # Try sorting and uniquifying the output.
+ if $GREP -v "^: " < "$nlist" |
+ if sort -k 3 </dev/null >/dev/null 2>&1; then
+ sort -k 3
+ else
+ sort +2
+ fi |
+ uniq > "$nlist"S; then
+ :
+ else
+ $GREP -v "^: " < "$nlist" > "$nlist"S
+ fi
+
+ if test -f "$nlist"S; then
+ eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
+ else
+ echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
+ fi
+
+ echo >> "$output_objdir/$my_dlsyms" "\
+
+/* The mapping between symbol names and symbols. */
+typedef struct {
+ const char *name;
+ void *address;
+} lt_dlsymlist;
+extern LT_DLSYM_CONST lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[];
+LT_DLSYM_CONST lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[] =
+{\
+ { \"$my_originator\", (void *) 0 },"
+
+ case $need_lib_prefix in
+ no)
+ eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ *)
+ eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ esac
+ echo >> "$output_objdir/$my_dlsyms" "\
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt_${my_prefix}_LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+ } # !$opt_dry_run
+
+ pic_flag_for_symtable=
+ case "$compile_command " in
+ *" -static "*) ;;
+ *)
+ case $host in
+ # compiling the symbol table file with pic_flag works around
+ # a FreeBSD bug that causes programs to crash when -lm is
+ # linked before any other PIC object. But we must not use
+ # pic_flag when linking with -static. The problem exists in
+ # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+ *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+ pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
+ *-*-hpux*)
+ pic_flag_for_symtable=" $pic_flag" ;;
+ *)
+ if test "X$my_pic_p" != Xno; then
+ pic_flag_for_symtable=" $pic_flag"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ symtab_cflags=
+ for arg in $LTCFLAGS; do
+ case $arg in
+ -pie | -fpie | -fPIE) ;;
+ *) func_append symtab_cflags " $arg" ;;
+ esac
+ done
+
+ # Now compile the dynamic symbol file.
+ func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
+
+ # Clean up the generated files.
+ func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
+
+ # Transform the symbol file into the correct name.
+ symfileobj="$output_objdir/${my_outputname}S.$objext"
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ if test -f "$output_objdir/$my_outputname.def"; then
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ else
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ fi
+ ;;
+ *)
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ ;;
+ esac
+ ;;
+ *-*-freebsd*)
+ # FreeBSD doesn't need this...
+ ;;
+ *)
+ func_fatal_error "unknown suffix for \`$my_dlsyms'"
+ ;;
+ esac
+ else
+ # We keep going just in case the user didn't refer to
+ # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
+ # really was required.
+
+ # Nullify the symbol file.
+ compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
+ fi
+}
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+# Despite the name, also deal with 64 bit binaries.
+func_win32_libid ()
+{
+ $opt_debug
+ win32_libid_type="unknown"
+ win32_fileres=`file -L $1 2>/dev/null`
+ case $win32_fileres in
+ *ar\ archive\ import\ library*) # definitely import
+ win32_libid_type="x86 archive import"
+ ;;
+ *ar\ archive*) # could be an import, or static
+ # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
+ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
+ $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
+ $SED -n -e '
+ 1,100{
+ / I /{
+ s,.*,import,
+ p
+ q
+ }
+ }'`
+ case $win32_nmres in
+ import*) win32_libid_type="x86 archive import";;
+ *) win32_libid_type="x86 archive static";;
+ esac
+ fi
+ ;;
+ *DLL*)
+ win32_libid_type="x86 DLL"
+ ;;
+ *executable*) # but shell scripts are "executable" too...
+ case $win32_fileres in
+ *MS\ Windows\ PE\ Intel*)
+ win32_libid_type="x86 DLL"
+ ;;
+ esac
+ ;;
+ esac
+ $ECHO "$win32_libid_type"
+}
+
+# func_cygming_dll_for_implib ARG
+#
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+# Invoked by eval'ing the libtool variable
+# $sharedlib_from_linklib_cmd
+# Result is available in the variable
+# $sharedlib_from_linklib_result
+func_cygming_dll_for_implib ()
+{
+ $opt_debug
+ sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
+}
+
+# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
+#
+# The is the core of a fallback implementation of a
+# platform-specific function to extract the name of the
+# DLL associated with the specified import library LIBNAME.
+#
+# SECTION_NAME is either .idata$6 or .idata$7, depending
+# on the platform and compiler that created the implib.
+#
+# Echos the name of the DLL associated with the
+# specified import library.
+func_cygming_dll_for_implib_fallback_core ()
+{
+ $opt_debug
+ match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
+ $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
+ $SED '/^Contents of section '"$match_literal"':/{
+ # Place marker at beginning of archive member dllname section
+ s/.*/====MARK====/
+ p
+ d
+ }
+ # These lines can sometimes be longer than 43 characters, but
+ # are always uninteresting
+ /:[ ]*file format pe[i]\{,1\}-/d
+ /^In archive [^:]*:/d
+ # Ensure marker is printed
+ /^====MARK====/p
+ # Remove all lines with less than 43 characters
+ /^.\{43\}/!d
+ # From remaining lines, remove first 43 characters
+ s/^.\{43\}//' |
+ $SED -n '
+ # Join marker and all lines until next marker into a single line
+ /^====MARK====/ b para
+ H
+ $ b para
+ b
+ :para
+ x
+ s/\n//g
+ # Remove the marker
+ s/^====MARK====//
+ # Remove trailing dots and whitespace
+ s/[\. \t]*$//
+ # Print
+ /./p' |
+ # we now have a list, one entry per line, of the stringified
+ # contents of the appropriate section of all members of the
+ # archive which possess that section. Heuristic: eliminate
+ # all those which have a first or second character that is
+ # a '.' (that is, objdump's representation of an unprintable
+ # character.) This should work for all archives with less than
+ # 0x302f exports -- but will fail for DLLs whose name actually
+ # begins with a literal '.' or a single character followed by
+ # a '.'.
+ #
+ # Of those that remain, print the first one.
+ $SED -e '/^\./d;/^.\./d;q'
+}
+
+# func_cygming_gnu_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is a GNU/binutils-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_gnu_implib_p ()
+{
+ $opt_debug
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
+ test -n "$func_cygming_gnu_implib_tmp"
+}
+
+# func_cygming_ms_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is an MS-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_ms_implib_p ()
+{
+ $opt_debug
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
+ test -n "$func_cygming_ms_implib_tmp"
+}
+
+# func_cygming_dll_for_implib_fallback ARG
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+#
+# This fallback implementation is for use when $DLLTOOL
+# does not support the --identify-strict option.
+# Invoked by eval'ing the libtool variable
+# $sharedlib_from_linklib_cmd
+# Result is available in the variable
+# $sharedlib_from_linklib_result
+func_cygming_dll_for_implib_fallback ()
+{
+ $opt_debug
+ if func_cygming_gnu_implib_p "$1" ; then
+ # binutils import library
+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
+ elif func_cygming_ms_implib_p "$1" ; then
+ # ms-generated import library
+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
+ else
+ # unknown
+ sharedlib_from_linklib_result=""
+ fi
+}
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+ $opt_debug
+ f_ex_an_ar_dir="$1"; shift
+ f_ex_an_ar_oldlib="$1"
+ if test "$lock_old_archive_extraction" = yes; then
+ lockfile=$f_ex_an_ar_oldlib.lock
+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+ func_echo "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ fi
+ func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
+ 'stat=$?; rm -f "$lockfile"; exit $stat'
+ if test "$lock_old_archive_extraction" = yes; then
+ $opt_dry_run || rm -f "$lockfile"
+ fi
+ if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
+ fi
+}
+
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+ $opt_debug
+ my_gentop="$1"; shift
+ my_oldlibs=${1+"$@"}
+ my_oldobjs=""
+ my_xlib=""
+ my_xabs=""
+ my_xdir=""
+
+ for my_xlib in $my_oldlibs; do
+ # Extract the objects.
+ case $my_xlib in
+ [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+ *) my_xabs=`pwd`"/$my_xlib" ;;
+ esac
+ func_basename "$my_xlib"
+ my_xlib="$func_basename_result"
+ my_xlib_u=$my_xlib
+ while :; do
+ case " $extracted_archives " in
+ *" $my_xlib_u "*)
+ func_arith $extracted_serial + 1
+ extracted_serial=$func_arith_result
+ my_xlib_u=lt$extracted_serial-$my_xlib ;;
+ *) break ;;
+ esac
+ done
+ extracted_archives="$extracted_archives $my_xlib_u"
+ my_xdir="$my_gentop/$my_xlib_u"
+
+ func_mkdir_p "$my_xdir"
+
+ case $host in
+ *-darwin*)
+ func_verbose "Extracting $my_xabs"
+ # Do not bother doing anything if just a dry run
+ $opt_dry_run || {
+ darwin_orig_dir=`pwd`
+ cd $my_xdir || exit $?
+ darwin_archive=$my_xabs
+ darwin_curdir=`pwd`
+ darwin_base_archive=`basename "$darwin_archive"`
+ darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
+ if test -n "$darwin_arches"; then
+ darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
+ darwin_arch=
+ func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
+ for darwin_arch in $darwin_arches ; do
+ func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+ $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
+ cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+ func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+ cd "$darwin_curdir"
+ $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+ done # $darwin_arches
+ ## Okay now we've a bunch of thin objects, gotta fatten them up :)
+ darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
+ darwin_file=
+ darwin_files=
+ for darwin_file in $darwin_filelist; do
+ darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
+ $LIPO -create -output "$darwin_file" $darwin_files
+ done # $darwin_filelist
+ $RM -rf unfat-$$
+ cd "$darwin_orig_dir"
+ else
+ cd $darwin_orig_dir
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ fi # $darwin_arches
+ } # !$opt_dry_run
+ ;;
+ *)
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ ;;
+ esac
+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
+ done
+
+ func_extract_archives_result="$my_oldobjs"
+}
+
+
+# func_emit_wrapper [arg=no]
+#
+# Emit a libtool wrapper script on stdout.
+# Don't directly open a file because we may want to
+# incorporate the script contents within a cygwin/mingw
+# wrapper executable. Must ONLY be called from within
+# func_mode_link because it depends on a number of variables
+# set therein.
+#
+# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
+# variable will take. If 'yes', then the emitted script
+# will assume that the directory in which it is stored is
+# the $objdir directory. This is a cygwin/mingw-specific
+# behavior.
+func_emit_wrapper ()
+{
+ func_emit_wrapper_arg1=${1-no}
+
+ $ECHO "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='$sed_quote_subst'
+
+# Be Bourne compatible
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+ # install mode needs the following variables:
+ generated_by_libtool_version='$macro_version'
+ notinst_deplibs='$notinst_deplibs'
+else
+ # When we are sourced in execute mode, \$file and \$ECHO are already set.
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ file=\"\$0\""
+
+ qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
+ $ECHO "\
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+ ECHO=\"$qECHO\"
+ fi
+
+# Very basic option parsing. These options are (a) specific to
+# the libtool wrapper, (b) are identical between the wrapper
+# /script/ and the wrapper /executable/ which is used only on
+# windows platforms, and (c) all begin with the string "--lt-"
+# (application programs are unlikely to have options which match
+# this pattern).
+#
+# There are only two supported options: --lt-debug and
+# --lt-dump-script. There is, deliberately, no --lt-help.
+#
+# The first argument to this parsing function should be the
+# script's $0 value, followed by "$@".
+lt_option_debug=
+func_parse_lt_options ()
+{
+ lt_script_arg0=\$0
+ shift
+ for lt_opt
+ do
+ case \"\$lt_opt\" in
+ --lt-debug) lt_option_debug=1 ;;
+ --lt-dump-script)
+ lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
+ test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
+ lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
+ cat \"\$lt_dump_D/\$lt_dump_F\"
+ exit 0
+ ;;
+ --lt-*)
+ \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
+ exit 1
+ ;;
+ esac
+ done
+
+ # Print the debug banner immediately:
+ if test -n \"\$lt_option_debug\"; then
+ echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2
+ fi
+}
+
+# Used when --lt-debug. Prints its arguments to stdout
+# (redirection is the responsibility of the caller)
+func_lt_dump_args ()
+{
+ lt_dump_args_N=1;
+ for lt_arg
+ do
+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\"
+ lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
+ done
+}
+
+# Core function for launching the target application
+func_exec_program_core ()
+{
+"
+ case $host in
+ # Backslashes separate directories on plain windows
+ *-*-mingw | *-*-os2* | *-cegcc*)
+ $ECHO "\
+ if test -n \"\$lt_option_debug\"; then
+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2
+ func_lt_dump_args \${1+\"\$@\"} 1>&2
+ fi
+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
;;
- # libtool link mode
- link | relink)
- modename="$modename: link"
+ *)
+ $ECHO "\
+ if test -n \"\$lt_option_debug\"; then
+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2
+ func_lt_dump_args \${1+\"\$@\"} 1>&2
+ fi
+ exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+ ;;
+ esac
+ $ECHO "\
+ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
+ exit 1
+}
+
+# A function to encapsulate launching the target application
+# Strips options in the --lt-* namespace from \$@ and
+# launches target application with the remaining arguments.
+func_exec_program ()
+{
+ for lt_wr_arg
+ do
+ case \$lt_wr_arg in
+ --lt-*) ;;
+ *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
+ esac
+ shift
+ done
+ func_exec_program_core \${1+\"\$@\"}
+}
+
+ # Parse options
+ func_parse_lt_options \"\$0\" \${1+\"\$@\"}
+
+ # Find the directory that this script lives in.
+ thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
+ test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+ # Follow symbolic links until we get to the real thisdir.
+ file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
+ while test -n \"\$file\"; do
+ destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
+
+ # If there was a directory component, then change thisdir.
+ if test \"x\$destdir\" != \"x\$file\"; then
+ case \"\$destdir\" in
+ [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+ *) thisdir=\"\$thisdir/\$destdir\" ;;
+ esac
+ fi
+
+ file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
+ file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
+ done
+
+ # Usually 'no', except on cygwin/mingw when embedded into
+ # the cwrapper.
+ WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
+ if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
+ # special case for '.'
+ if test \"\$thisdir\" = \".\"; then
+ thisdir=\`pwd\`
+ fi
+ # remove .libs from thisdir
+ case \"\$thisdir\" in
+ *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
+ $objdir ) thisdir=. ;;
+ esac
+ fi
+
+ # Try to get the absolute directory name.
+ absdir=\`cd \"\$thisdir\" && pwd\`
+ test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+ if test "$fast_install" = yes; then
+ $ECHO "\
+ program=lt-'$outputname'$exeext
+ progdir=\"\$thisdir/$objdir\"
+
+ if test ! -f \"\$progdir/\$program\" ||
+ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
+ test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+ file=\"\$\$-\$program\"
+
+ if test ! -d \"\$progdir\"; then
+ $MKDIR \"\$progdir\"
+ else
+ $RM \"\$progdir/\$file\"
+ fi"
+
+ $ECHO "\
+
+ # relink executable if necessary
+ if test -n \"\$relink_command\"; then
+ if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+ else
+ $ECHO \"\$relink_command_output\" >&2
+ $RM \"\$progdir/\$file\"
+ exit 1
+ fi
+ fi
+
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+ { $RM \"\$progdir/\$program\";
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+ $RM \"\$progdir/\$file\"
+ fi"
+ else
+ $ECHO "\
+ program='$outputname'
+ progdir=\"\$thisdir/$objdir\"
+"
+ fi
+
+ $ECHO "\
+
+ if test -f \"\$progdir/\$program\"; then"
+
+ # fixup the dll searchpath if we need to.
+ #
+ # Fix the DLL searchpath if we need to. Do this before prepending
+ # to shlibpath, because on Windows, both are PATH and uninstalled
+ # libraries must come first.
+ if test -n "$dllsearchpath"; then
+ $ECHO "\
+ # Add the dll search path components to the executable PATH
+ PATH=$dllsearchpath:\$PATH
+"
+ fi
+
+ # Export our shlibpath_var if we have one.
+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ $ECHO "\
+ # Add our own library path to $shlibpath_var
+ $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+ # Some systems cannot cope with colon-terminated $shlibpath_var
+ # The second colon is a workaround for a bug in BeOS R4 sed
+ $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
+
+ export $shlibpath_var
+"
+ fi
+
+ $ECHO "\
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ # Run the actual program with our arguments.
+ func_exec_program \${1+\"\$@\"}
+ fi
+ else
+ # The program doesn't exist.
+ \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
+ \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
+ \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
+ exit 1
+ fi
+fi\
+"
+}
+
+
+# func_emit_cwrapperexe_src
+# emit the source code for a wrapper executable on stdout
+# Must ONLY be called from within func_mode_link because
+# it depends on a number of variable set therein.
+func_emit_cwrapperexe_src ()
+{
+ cat <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+ Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+
+ The $output program cannot be directly executed until all the libtool
+ libraries that it depends on are installed.
+
+ This wrapper executable should never be moved out of the build directory.
+ If it is, it will not operate correctly.
+*/
+EOF
+ cat <<"EOF"
+#ifdef _MSC_VER
+# define _CRT_SECURE_NO_DEPRECATE 1
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef _MSC_VER
+# include <direct.h>
+# include <process.h>
+# include <io.h>
+#else
+# include <unistd.h>
+# include <stdint.h>
+# ifdef __CYGWIN__
+# include <io.h>
+# endif
+#endif
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+/* declarations of non-ANSI functions */
+#if defined(__MINGW32__)
+# ifdef __STRICT_ANSI__
+int _putenv (const char *);
+# endif
+#elif defined(__CYGWIN__)
+# ifdef __STRICT_ANSI__
+char *realpath (const char *, char *);
+int putenv (char *);
+int setenv (const char *, const char *, int);
+# endif
+/* #elif defined (other platforms) ... */
+#endif
+
+/* portability defines, excluding path handling macros */
+#if defined(_MSC_VER)
+# define setmode _setmode
+# define stat _stat
+# define chmod _chmod
+# define getcwd _getcwd
+# define putenv _putenv
+# define S_IXUSR _S_IEXEC
+# ifndef _INTPTR_T_DEFINED
+# define _INTPTR_T_DEFINED
+# define intptr_t int
+# endif
+#elif defined(__MINGW32__)
+# define setmode _setmode
+# define stat _stat
+# define chmod _chmod
+# define getcwd _getcwd
+# define putenv _putenv
+#elif defined(__CYGWIN__)
+# define HAVE_SETENV
+# define FOPEN_WB "wb"
+/* #elif defined (other platforms) ... */
+#endif
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef S_IXOTH
+# define S_IXOTH 0
+#endif
+#ifndef S_IXGRP
+# define S_IXGRP 0
+#endif
+
+/* path handling portability macros */
+#ifndef DIR_SEPARATOR
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+ defined (__OS2__)
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# define FOPEN_WB "wb"
+# ifndef DIR_SEPARATOR_2
+# define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+# define PATH_SEPARATOR_2 ';'
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
+#ifndef FOPEN_WB
+# define FOPEN_WB "w"
+#endif
+#ifndef _O_BINARY
+# define _O_BINARY 0
+#endif
+
+#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+ if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+#if defined(LT_DEBUGWRAPPER)
+static int lt_debug = 1;
+#else
+static int lt_debug = 0;
+#endif
+
+const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
+
+void *xmalloc (size_t num);
+char *xstrdup (const char *string);
+const char *base_name (const char *name);
+char *find_executable (const char *wrapper);
+char *chase_symlinks (const char *pathspec);
+int make_executable (const char *path);
+int check_executable (const char *path);
+char *strendzap (char *str, const char *pat);
+void lt_debugprintf (const char *file, int line, const char *fmt, ...);
+void lt_fatal (const char *file, int line, const char *message, ...);
+static const char *nonnull (const char *s);
+static const char *nonempty (const char *s);
+void lt_setenv (const char *name, const char *value);
+char *lt_extend_str (const char *orig_value, const char *add, int to_end);
+void lt_update_exe_path (const char *name, const char *value);
+void lt_update_lib_path (const char *name, const char *value);
+char **prepare_spawn (char **argv);
+void lt_dump_script (FILE *f);
+EOF
+
+ cat <<EOF
+volatile const char * MAGIC_EXE = "$magic_exe";
+const char * LIB_PATH_VARNAME = "$shlibpath_var";
+EOF
+
+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ func_to_host_path "$temp_rpath"
+ cat <<EOF
+const char * LIB_PATH_VALUE = "$func_to_host_path_result";
+EOF
+ else
+ cat <<"EOF"
+const char * LIB_PATH_VALUE = "";
+EOF
+ fi
+
+ if test -n "$dllsearchpath"; then
+ func_to_host_path "$dllsearchpath:"
+ cat <<EOF
+const char * EXE_PATH_VARNAME = "PATH";
+const char * EXE_PATH_VALUE = "$func_to_host_path_result";
+EOF
+ else
+ cat <<"EOF"
+const char * EXE_PATH_VARNAME = "";
+const char * EXE_PATH_VALUE = "";
+EOF
+ fi
+
+ if test "$fast_install" = yes; then
+ cat <<EOF
+const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
+EOF
+ else
+ cat <<EOF
+const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
+EOF
+ fi
+
+
+ cat <<"EOF"
+
+#define LTWRAPPER_OPTION_PREFIX "--lt-"
+
+static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
+static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
+static const char *debug_opt = LTWRAPPER_OPTION_PREFIX "debug";
+
+int
+main (int argc, char *argv[])
+{
+ char **newargz;
+ int newargc;
+ char *tmp_pathspec;
+ char *actual_cwrapper_path;
+ char *actual_cwrapper_name;
+ char *target_name;
+ char *lt_argv_zero;
+ intptr_t rval = 127;
+
+ int i;
+
+ program_name = (char *) xstrdup (base_name (argv[0]));
+ newargz = XMALLOC (char *, argc + 1);
+
+ /* very simple arg parsing; don't want to rely on getopt
+ * also, copy all non cwrapper options to newargz, except
+ * argz[0], which is handled differently
+ */
+ newargc=0;
+ for (i = 1; i < argc; i++)
+ {
+ if (strcmp (argv[i], dumpscript_opt) == 0)
+ {
+EOF
+ case "$host" in
+ *mingw* | *cygwin* )
+ # make stdout use "unix" line endings
+ echo " setmode(1,_O_BINARY);"
+ ;;
+ esac
+
+ cat <<"EOF"
+ lt_dump_script (stdout);
+ return 0;
+ }
+ if (strcmp (argv[i], debug_opt) == 0)
+ {
+ lt_debug = 1;
+ continue;
+ }
+ if (strcmp (argv[i], ltwrapper_option_prefix) == 0)
+ {
+ /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
+ namespace, but it is not one of the ones we know about and
+ have already dealt with, above (inluding dump-script), then
+ report an error. Otherwise, targets might begin to believe
+ they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
+ namespace. The first time any user complains about this, we'll
+ need to make LTWRAPPER_OPTION_PREFIX a configure-time option
+ or a configure.ac-settable value.
+ */
+ lt_fatal (__FILE__, __LINE__,
+ "unrecognized %s option: '%s'",
+ ltwrapper_option_prefix, argv[i]);
+ }
+ /* otherwise ... */
+ newargz[++newargc] = xstrdup (argv[i]);
+ }
+ newargz[++newargc] = NULL;
+
+EOF
+ cat <<EOF
+ /* The GNU banner must be the first non-error debug message */
+ lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n");
+EOF
+ cat <<"EOF"
+ lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
+ lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
+
+ tmp_pathspec = find_executable (argv[0]);
+ if (tmp_pathspec == NULL)
+ lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) found exe (before symlink chase) at: %s\n",
+ tmp_pathspec);
+
+ actual_cwrapper_path = chase_symlinks (tmp_pathspec);
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) found exe (after symlink chase) at: %s\n",
+ actual_cwrapper_path);
+ XFREE (tmp_pathspec);
+
+ actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
+ strendzap (actual_cwrapper_path, actual_cwrapper_name);
+
+ /* wrapper name transforms */
+ strendzap (actual_cwrapper_name, ".exe");
+ tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
+ XFREE (actual_cwrapper_name);
+ actual_cwrapper_name = tmp_pathspec;
+ tmp_pathspec = 0;
+
+ /* target_name transforms -- use actual target program name; might have lt- prefix */
+ target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
+ strendzap (target_name, ".exe");
+ tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
+ XFREE (target_name);
+ target_name = tmp_pathspec;
+ tmp_pathspec = 0;
+
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) libtool target name: %s\n",
+ target_name);
+EOF
+
+ cat <<EOF
+ newargz[0] =
+ XMALLOC (char, (strlen (actual_cwrapper_path) +
+ strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
+ strcpy (newargz[0], actual_cwrapper_path);
+ strcat (newargz[0], "$objdir");
+ strcat (newargz[0], "/");
+EOF
+
+ cat <<"EOF"
+ /* stop here, and copy so we don't have to do this twice */
+ tmp_pathspec = xstrdup (newargz[0]);
+
+ /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
+ strcat (newargz[0], actual_cwrapper_name);
+
+ /* DO want the lt- prefix here if it exists, so use target_name */
+ lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
+ XFREE (tmp_pathspec);
+ tmp_pathspec = NULL;
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ {
+ char* p;
+ while ((p = strchr (newargz[0], '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ while ((p = strchr (lt_argv_zero, '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ }
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+ XFREE (target_name);
+ XFREE (actual_cwrapper_path);
+ XFREE (actual_cwrapper_name);
+
+ lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
+ lt_setenv ("DUALCASE", "1"); /* for MSK sh */
+ /* Update the DLL searchpath. EXE_PATH_VALUE ($dllsearchpath) must
+ be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
+ because on Windows, both *_VARNAMEs are PATH but uninstalled
+ libraries must come first. */
+ lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
+ lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
+
+ lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
+ nonnull (lt_argv_zero));
+ for (i = 0; i < newargc; i++)
+ {
+ lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
+ i, nonnull (newargz[i]));
+ }
+
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ /* execv doesn't actually work on mingw as expected on unix */
+ newargz = prepare_spawn (newargz);
+ rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
+ if (rval == -1)
+ {
+ /* failed to start process */
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) failed to launch target \"%s\": %s\n",
+ lt_argv_zero, nonnull (strerror (errno)));
+ return 127;
+ }
+ return rval;
+EOF
+ ;;
+ *)
+ cat <<"EOF"
+ execv (lt_argv_zero, newargz);
+ return rval; /* =127, but avoids unused variable warning */
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+ void *p = (void *) malloc (num);
+ if (!p)
+ lt_fatal (__FILE__, __LINE__, "memory exhausted");
+
+ return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+ return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
+ string) : NULL;
+}
+
+const char *
+base_name (const char *name)
+{
+ const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ /* Skip over the disk name in MSDOS pathnames. */
+ if (isalpha ((unsigned char) name[0]) && name[1] == ':')
+ name += 2;
+#endif
+
+ for (base = name; *name; name++)
+ if (IS_DIR_SEPARATOR (*name))
+ base = name + 1;
+ return base;
+}
+
+int
+check_executable (const char *path)
+{
+ struct stat st;
+
+ lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
+ nonempty (path));
+ if ((!path) || (!*path))
+ return 0;
+
+ if ((stat (path, &st) >= 0)
+ && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
+ return 1;
+ else
+ return 0;
+}
+
+int
+make_executable (const char *path)
+{
+ int rval = 0;
+ struct stat st;
+
+ lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
+ nonempty (path));
+ if ((!path) || (!*path))
+ return 0;
+
+ if (stat (path, &st) >= 0)
+ {
+ rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
+ }
+ return rval;
+}
+
+/* Searches for the full path of the wrapper. Returns
+ newly allocated full path name if found, NULL otherwise
+ Does not chase symlinks, even on platforms that support them.
+*/
+char *
+find_executable (const char *wrapper)
+{
+ int has_slash = 0;
+ const char *p;
+ const char *p_next;
+ /* static buffer for getcwd */
+ char tmp[LT_PATHMAX + 1];
+ int tmp_len;
+ char *concat_name;
+
+ lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
+ nonempty (wrapper));
+
+ if ((wrapper == NULL) || (*wrapper == '\0'))
+ return NULL;
+
+ /* Absolute path? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ else
+ {
+#endif
+ if (IS_DIR_SEPARATOR (wrapper[0]))
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ }
+#endif
+
+ for (p = wrapper; *p; p++)
+ if (*p == '/')
+ {
+ has_slash = 1;
+ break;
+ }
+ if (!has_slash)
+ {
+ /* no slashes; search PATH */
+ const char *path = getenv ("PATH");
+ if (path != NULL)
+ {
+ for (p = path; *p; p = p_next)
+ {
+ const char *q;
+ size_t p_len;
+ for (q = p; *q; q++)
+ if (IS_PATH_SEPARATOR (*q))
+ break;
+ p_len = q - p;
+ p_next = (*q == '\0' ? q : q + 1);
+ if (p_len == 0)
+ {
+ /* empty path: current directory */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+ nonnull (strerror (errno)));
+ tmp_len = strlen (tmp);
+ concat_name =
+ XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+ }
+ else
+ {
+ concat_name =
+ XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, p, p_len);
+ concat_name[p_len] = '/';
+ strcpy (concat_name + p_len + 1, wrapper);
+ }
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ }
+ /* not found in PATH; assume curdir */
+ }
+ /* Relative path | not found in path: prepend cwd */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+ nonnull (strerror (errno)));
+ tmp_len = strlen (tmp);
+ concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ return NULL;
+}
+
+char *
+chase_symlinks (const char *pathspec)
+{
+#ifndef S_ISLNK
+ return xstrdup (pathspec);
+#else
+ char buf[LT_PATHMAX];
+ struct stat s;
+ char *tmp_pathspec = xstrdup (pathspec);
+ char *p;
+ int has_symlinks = 0;
+ while (strlen (tmp_pathspec) && !has_symlinks)
+ {
+ lt_debugprintf (__FILE__, __LINE__,
+ "checking path component for symlinks: %s\n",
+ tmp_pathspec);
+ if (lstat (tmp_pathspec, &s) == 0)
+ {
+ if (S_ISLNK (s.st_mode) != 0)
+ {
+ has_symlinks = 1;
+ break;
+ }
+
+ /* search backwards for last DIR_SEPARATOR */
+ p = tmp_pathspec + strlen (tmp_pathspec) - 1;
+ while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ p--;
+ if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ {
+ /* no more DIR_SEPARATORS left */
+ break;
+ }
+ *p = '\0';
+ }
+ else
+ {
+ lt_fatal (__FILE__, __LINE__,
+ "error accessing file \"%s\": %s",
+ tmp_pathspec, nonnull (strerror (errno)));
+ }
+ }
+ XFREE (tmp_pathspec);
+
+ if (!has_symlinks)
+ {
+ return xstrdup (pathspec);
+ }
+
+ tmp_pathspec = realpath (pathspec, buf);
+ if (tmp_pathspec == 0)
+ {
+ lt_fatal (__FILE__, __LINE__,
+ "could not follow symlinks for %s", pathspec);
+ }
+ return xstrdup (tmp_pathspec);
+#endif
+}
+
+char *
+strendzap (char *str, const char *pat)
+{
+ size_t len, patlen;
+
+ assert (str != NULL);
+ assert (pat != NULL);
+
+ len = strlen (str);
+ patlen = strlen (pat);
+
+ if (patlen <= len)
+ {
+ str += len - patlen;
+ if (strcmp (str, pat) == 0)
+ *str = '\0';
+ }
+ return str;
+}
+
+void
+lt_debugprintf (const char *file, int line, const char *fmt, ...)
+{
+ va_list args;
+ if (lt_debug)
+ {
+ (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
+ va_start (args, fmt);
+ (void) vfprintf (stderr, fmt, args);
+ va_end (args);
+ }
+}
+
+static void
+lt_error_core (int exit_status, const char *file,
+ int line, const char *mode,
+ const char *message, va_list ap)
+{
+ fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
+ vfprintf (stderr, message, ap);
+ fprintf (stderr, ".\n");
+
+ if (exit_status >= 0)
+ exit (exit_status);
+}
+
+void
+lt_fatal (const char *file, int line, const char *message, ...)
+{
+ va_list ap;
+ va_start (ap, message);
+ lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
+ va_end (ap);
+}
+
+static const char *
+nonnull (const char *s)
+{
+ return s ? s : "(null)";
+}
+
+static const char *
+nonempty (const char *s)
+{
+ return (s && !*s) ? "(empty)" : nonnull (s);
+}
+
+void
+lt_setenv (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_setenv) setting '%s' to '%s'\n",
+ nonnull (name), nonnull (value));
+ {
+#ifdef HAVE_SETENV
+ /* always make a copy, for consistency with !HAVE_SETENV */
+ char *str = xstrdup (value);
+ setenv (name, str, 1);
+#else
+ int len = strlen (name) + 1 + strlen (value) + 1;
+ char *str = XMALLOC (char, len);
+ sprintf (str, "%s=%s", name, value);
+ if (putenv (str) != EXIT_SUCCESS)
+ {
+ XFREE (str);
+ }
+#endif
+ }
+}
+
+char *
+lt_extend_str (const char *orig_value, const char *add, int to_end)
+{
+ char *new_value;
+ if (orig_value && *orig_value)
+ {
+ int orig_value_len = strlen (orig_value);
+ int add_len = strlen (add);
+ new_value = XMALLOC (char, add_len + orig_value_len + 1);
+ if (to_end)
+ {
+ strcpy (new_value, orig_value);
+ strcpy (new_value + orig_value_len, add);
+ }
+ else
+ {
+ strcpy (new_value, add);
+ strcpy (new_value + add_len, orig_value);
+ }
+ }
+ else
+ {
+ new_value = xstrdup (add);
+ }
+ return new_value;
+}
+
+void
+lt_update_exe_path (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
+ nonnull (name), nonnull (value));
+
+ if (name && *name && value && *value)
+ {
+ char *new_value = lt_extend_str (getenv (name), value, 0);
+ /* some systems can't cope with a ':'-terminated path #' */
+ int len = strlen (new_value);
+ while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
+ {
+ new_value[len-1] = '\0';
+ }
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ }
+}
+
+void
+lt_update_lib_path (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
+ nonnull (name), nonnull (value));
+
+ if (name && *name && value && *value)
+ {
+ char *new_value = lt_extend_str (getenv (name), value, 0);
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ }
+}
+
+EOF
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+
+/* Prepares an argument vector before calling spawn().
+ Note that spawn() does not by itself call the command interpreter
+ (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
+ ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+ GetVersionEx(&v);
+ v.dwPlatformId == VER_PLATFORM_WIN32_NT;
+ }) ? "cmd.exe" : "command.com").
+ Instead it simply concatenates the arguments, separated by ' ', and calls
+ CreateProcess(). We must quote the arguments since Win32 CreateProcess()
+ interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
+ special way:
+ - Space and tab are interpreted as delimiters. They are not treated as
+ delimiters if they are surrounded by double quotes: "...".
+ - Unescaped double quotes are removed from the input. Their only effect is
+ that within double quotes, space and tab are treated like normal
+ characters.
+ - Backslashes not followed by double quotes are not special.
+ - But 2*n+1 backslashes followed by a double quote become
+ n backslashes followed by a double quote (n >= 0):
+ \" -> "
+ \\\" -> \"
+ \\\\\" -> \\"
+ */
+#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+char **
+prepare_spawn (char **argv)
+{
+ size_t argc;
+ char **new_argv;
+ size_t i;
+
+ /* Count number of arguments. */
+ for (argc = 0; argv[argc] != NULL; argc++)
+ ;
+
+ /* Allocate new argument vector. */
+ new_argv = XMALLOC (char *, argc + 1);
+
+ /* Put quoted arguments into the new argument vector. */
+ for (i = 0; i < argc; i++)
+ {
+ const char *string = argv[i];
+
+ if (string[0] == '\0')
+ new_argv[i] = xstrdup ("\"\"");
+ else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
+ {
+ int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
+ size_t length;
+ unsigned int backslashes;
+ const char *s;
+ char *quoted_string;
+ char *p;
+
+ length = 0;
+ backslashes = 0;
+ if (quote_around)
+ length++;
+ for (s = string; *s != '\0'; s++)
+ {
+ char c = *s;
+ if (c == '"')
+ length += backslashes + 1;
+ length++;
+ if (c == '\\')
+ backslashes++;
+ else
+ backslashes = 0;
+ }
+ if (quote_around)
+ length += backslashes + 1;
+
+ quoted_string = XMALLOC (char, length + 1);
+
+ p = quoted_string;
+ backslashes = 0;
+ if (quote_around)
+ *p++ = '"';
+ for (s = string; *s != '\0'; s++)
+ {
+ char c = *s;
+ if (c == '"')
+ {
+ unsigned int j;
+ for (j = backslashes + 1; j > 0; j--)
+ *p++ = '\\';
+ }
+ *p++ = c;
+ if (c == '\\')
+ backslashes++;
+ else
+ backslashes = 0;
+ }
+ if (quote_around)
+ {
+ unsigned int j;
+ for (j = backslashes; j > 0; j--)
+ *p++ = '\\';
+ *p++ = '"';
+ }
+ *p = '\0';
+
+ new_argv[i] = quoted_string;
+ }
+ else
+ new_argv[i] = (char *) string;
+ }
+ new_argv[argc] = NULL;
+
+ return new_argv;
+}
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+void lt_dump_script (FILE* f)
+{
+EOF
+ func_emit_wrapper yes |
+ $SED -e 's/\([\\"]\)/\\\1/g' \
+ -e 's/^/ fputs ("/' -e 's/$/\\n", f);/'
+
+ cat <<"EOF"
+}
+EOF
+}
+# end: func_emit_cwrapperexe_src
+
+# func_win32_import_lib_p ARG
+# True if ARG is an import lib, as indicated by $file_magic_cmd
+func_win32_import_lib_p ()
+{
+ $opt_debug
+ case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
+ *import*) : ;;
+ *) false ;;
+ esac
+}
+
+# func_mode_link arg...
+func_mode_link ()
+{
+ $opt_debug
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
# It is impossible to link a dll without this setting, and
# we shouldn't force the makefile maintainer to figure out
# which system we are compiling for in order to pass an extra
@@ -1143,10 +5133,10 @@ EOF
allow_undefined=yes
;;
esac
- libtool_args="$nonopt"
+ libtool_args=$nonopt
base_compile="$nonopt $@"
- compile_command="$nonopt"
- finalize_command="$nonopt"
+ compile_command=$nonopt
+ finalize_command=$nonopt
compile_rpath=
finalize_rpath=
@@ -1161,8 +5151,10 @@ EOF
dllsearchpath=
lib_search_path=`pwd`
inst_prefix_dir=
+ new_inherited_linker_flags=
avoid_version=no
+ bindir=
dlfiles=
dlprefiles=
dlself=no
@@ -1176,7 +5168,6 @@ EOF
no_install=no
objs=
non_pic_objects=
- notinst_path= # paths that contain not-installed libtool libraries
precious_files_regex=
prefer_static_libs=no
preload=no
@@ -1190,18 +5181,25 @@ EOF
thread_safe=no
vinfo=
vinfo_number=no
-
+ weak_libs=
+ single_module="${wl}-single_module"
func_infer_tag $base_compile
# We need to know -static, to get the right output filenames.
for arg
do
case $arg in
+ -shared)
+ test "$build_libtool_libs" != yes && \
+ func_fatal_configuration "can not build a shared library"
+ build_old_libs=no
+ break
+ ;;
-all-static | -static | -static-libtool-libs)
case $arg in
-all-static)
if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
- $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
+ func_warning "complete static linking is impossible in this configuration"
fi
if test -n "$link_static_flag"; then
dlopen_self=$dlopen_self_static
@@ -1235,29 +5233,30 @@ EOF
while test "$#" -gt 0; do
arg="$1"
shift
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
- ;;
- *) qarg=$arg ;;
- esac
- libtool_args="$libtool_args $qarg"
+ func_quote_for_eval "$arg"
+ qarg=$func_quote_for_eval_unquoted_result
+ func_append libtool_args " $func_quote_for_eval_result"
# If the previous option needs an argument, assign it.
if test -n "$prev"; then
case $prev in
output)
- compile_command="$compile_command @OUTPUT@"
- finalize_command="$finalize_command @OUTPUT@"
+ func_append compile_command " @OUTPUT@"
+ func_append finalize_command " @OUTPUT@"
;;
esac
case $prev in
+ bindir)
+ bindir="$arg"
+ prev=
+ continue
+ ;;
dlfiles|dlprefiles)
if test "$preload" = no; then
# Add the symbol object into the linking commands.
- compile_command="$compile_command @SYMFILE@"
- finalize_command="$finalize_command @SYMFILE@"
+ func_append compile_command " @SYMFILE@"
+ func_append finalize_command " @SYMFILE@"
preload=yes
fi
case $arg in
@@ -1284,9 +5283,9 @@ EOF
;;
*)
if test "$prev" = dlfiles; then
- dlfiles="$dlfiles $arg"
+ func_append dlfiles " $arg"
else
- dlprefiles="$dlprefiles $arg"
+ func_append dlprefiles " $arg"
fi
prev=
continue
@@ -1295,10 +5294,8 @@ EOF
;;
expsyms)
export_symbols="$arg"
- if test ! -f "$arg"; then
- $echo "$modename: symbol file \`$arg' does not exist"
- exit $EXIT_FAILURE
- fi
+ test -f "$arg" \
+ || func_fatal_error "symbol file \`$arg' does not exist"
prev=
continue
;;
@@ -1307,18 +5304,21 @@ EOF
prev=
continue
;;
- inst_prefix)
- inst_prefix_dir="$arg"
- prev=
- continue
- ;;
- precious_regex)
- precious_files_regex="$arg"
+ framework)
+ case $host in
+ *-*-darwin*)
+ case "$deplibs " in
+ *" $qarg.ltframework "*) ;;
+ *) func_append deplibs " $qarg.ltframework" # this is fixed later
+ ;;
+ esac
+ ;;
+ esac
prev=
continue
;;
- release)
- release="-$arg"
+ inst_prefix)
+ inst_prefix_dir="$arg"
prev=
continue
;;
@@ -1326,39 +5326,30 @@ EOF
if test -f "$arg"; then
save_arg=$arg
moreargs=
- for fil in `cat $save_arg`
+ for fil in `cat "$save_arg"`
do
-# moreargs="$moreargs $fil"
+# func_append moreargs " $fil"
arg=$fil
# A libtool-controlled object.
# Check to see that this really is a libtool object.
- if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ if func_lalib_unsafe_p "$arg"; then
pic_object=
non_pic_object=
# Read the .lo file
- # If there is no directory component, then add one.
- case $arg in
- */* | *\\*) . $arg ;;
- *) . ./$arg ;;
- esac
+ func_source "$arg"
- if test -z "$pic_object" || \
+ if test -z "$pic_object" ||
test -z "$non_pic_object" ||
- test "$pic_object" = none && \
+ test "$pic_object" = none &&
test "$non_pic_object" = none; then
- $echo "$modename: cannot find name of object for \`$arg'" 1>&2
- exit $EXIT_FAILURE
+ func_fatal_error "cannot find name of object for \`$arg'"
fi
# Extract subdirectory from the argument.
- xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$xdir" = "X$arg"; then
- xdir=
- else
- xdir="$xdir/"
- fi
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
if test "$pic_object" != none; then
# Prepend the subdirectory the object is found in.
@@ -1366,7 +5357,7 @@ EOF
if test "$prev" = dlfiles; then
if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
- dlfiles="$dlfiles $pic_object"
+ func_append dlfiles " $pic_object"
prev=
continue
else
@@ -1378,12 +5369,12 @@ EOF
# CHECK ME: I think I busted this. -Ossama
if test "$prev" = dlprefiles; then
# Preload the old-style object.
- dlprefiles="$dlprefiles $pic_object"
+ func_append dlprefiles " $pic_object"
prev=
fi
# A PIC object.
- libobjs="$libobjs $pic_object"
+ func_append libobjs " $pic_object"
arg="$pic_object"
fi
@@ -1393,7 +5384,7 @@ EOF
non_pic_object="$xdir$non_pic_object"
# A standard non-PIC object
- non_pic_objects="$non_pic_objects $non_pic_object"
+ func_append non_pic_objects " $non_pic_object"
if test -z "$pic_object" || test "$pic_object" = none ; then
arg="$non_pic_object"
fi
@@ -1401,95 +5392,95 @@ EOF
# If the PIC object exists, use it instead.
# $xdir was prepended to $pic_object above.
non_pic_object="$pic_object"
- non_pic_objects="$non_pic_objects $non_pic_object"
+ func_append non_pic_objects " $non_pic_object"
fi
else
# Only an error if not doing a dry-run.
- if test -z "$run"; then
- $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
- exit $EXIT_FAILURE
- else
- # Dry-run case.
-
+ if $opt_dry_run; then
# Extract subdirectory from the argument.
- xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$xdir" = "X$arg"; then
- xdir=
- else
- xdir="$xdir/"
- fi
-
- pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
- non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
- libobjs="$libobjs $pic_object"
- non_pic_objects="$non_pic_objects $non_pic_object"
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "\`$arg' is not a valid libtool object"
fi
fi
done
else
- $echo "$modename: link input file \`$save_arg' does not exist"
- exit $EXIT_FAILURE
+ func_fatal_error "link input file \`$arg' does not exist"
fi
arg=$save_arg
prev=
continue
;;
+ precious_regex)
+ precious_files_regex="$arg"
+ prev=
+ continue
+ ;;
+ release)
+ release="-$arg"
+ prev=
+ continue
+ ;;
rpath | xrpath)
# We need an absolute path.
case $arg in
[\\/]* | [A-Za-z]:[\\/]*) ;;
*)
- $echo "$modename: only absolute run-paths are allowed" 1>&2
- exit $EXIT_FAILURE
+ func_fatal_error "only absolute run-paths are allowed"
;;
esac
if test "$prev" = rpath; then
case "$rpath " in
*" $arg "*) ;;
- *) rpath="$rpath $arg" ;;
+ *) func_append rpath " $arg" ;;
esac
else
case "$xrpath " in
*" $arg "*) ;;
- *) xrpath="$xrpath $arg" ;;
+ *) func_append xrpath " $arg" ;;
esac
fi
prev=
continue
;;
- xcompiler)
- compiler_flags="$compiler_flags $qarg"
+ shrext)
+ shrext_cmds="$arg"
prev=
- compile_command="$compile_command $qarg"
- finalize_command="$finalize_command $qarg"
continue
;;
- xlinker)
- linker_flags="$linker_flags $qarg"
- compiler_flags="$compiler_flags $wl$qarg"
+ weak)
+ func_append weak_libs " $arg"
prev=
- compile_command="$compile_command $wl$qarg"
- finalize_command="$finalize_command $wl$qarg"
continue
;;
xcclinker)
- linker_flags="$linker_flags $qarg"
- compiler_flags="$compiler_flags $qarg"
+ func_append linker_flags " $qarg"
+ func_append compiler_flags " $qarg"
prev=
- compile_command="$compile_command $qarg"
- finalize_command="$finalize_command $qarg"
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
continue
;;
- shrext)
- shrext_cmds="$arg"
+ xcompiler)
+ func_append compiler_flags " $qarg"
prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
continue
;;
- darwin_framework|darwin_framework_skip)
- test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
- compile_command="$compile_command $arg"
- finalize_command="$finalize_command $arg"
+ xlinker)
+ func_append linker_flags " $qarg"
+ func_append compiler_flags " $wl$qarg"
prev=
+ func_append compile_command " $wl$qarg"
+ func_append finalize_command " $wl$qarg"
continue
;;
*)
@@ -1505,16 +5496,16 @@ EOF
case $arg in
-all-static)
if test -n "$link_static_flag"; then
- compile_command="$compile_command $link_static_flag"
- finalize_command="$finalize_command $link_static_flag"
+ # See comment for -static flag below, for more details.
+ func_append compile_command " $link_static_flag"
+ func_append finalize_command " $link_static_flag"
fi
continue
;;
-allow-undefined)
# FIXME: remove this flag sometime in the future.
- $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
- continue
+ func_fatal_error "\`-allow-undefined' must not be used because it is the default"
;;
-avoid-version)
@@ -1522,6 +5513,11 @@ EOF
continue
;;
+ -bindir)
+ prev=bindir
+ continue
+ ;;
+
-dlopen)
prev=dlfiles
continue
@@ -1539,8 +5535,7 @@ EOF
-export-symbols | -export-symbols-regex)
if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
- $echo "$modename: more than one -exported-symbols argument is not allowed"
- exit $EXIT_FAILURE
+ func_fatal_error "more than one -exported-symbols argument is not allowed"
fi
if test "X$arg" = "X-export-symbols"; then
prev=expsyms
@@ -1550,15 +5545,8 @@ EOF
continue
;;
- -framework|-arch|-isysroot)
- case " $CC " in
- *" ${arg} ${1} "* | *" ${arg} ${1} "*)
- prev=darwin_framework_skip ;;
- *) compiler_flags="$compiler_flags $arg"
- prev=darwin_framework ;;
- esac
- compile_command="$compile_command $arg"
- finalize_command="$finalize_command $arg"
+ -framework)
+ prev=framework
continue
;;
@@ -1572,55 +5560,70 @@ EOF
-L[A-Z][A-Z]*:*)
case $with_gcc/$host in
no/*-*-irix* | /*-*-irix*)
- compile_command="$compile_command $arg"
- finalize_command="$finalize_command $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
;;
esac
continue
;;
-L*)
- dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
+ func_stripname "-L" '' "$arg"
+ if test -z "$func_stripname_result"; then
+ if test "$#" -gt 0; then
+ func_fatal_error "require no space between \`-L' and \`$1'"
+ else
+ func_fatal_error "need path for \`-L' option"
+ fi
+ fi
+ func_resolve_sysroot "$func_stripname_result"
+ dir=$func_resolve_sysroot_result
# We need an absolute path.
case $dir in
[\\/]* | [A-Za-z]:[\\/]*) ;;
*)
absdir=`cd "$dir" && pwd`
- if test -z "$absdir"; then
- $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
- absdir="$dir"
- notinst_path="$notinst_path $dir"
- fi
+ test -z "$absdir" && \
+ func_fatal_error "cannot determine absolute directory name of \`$dir'"
dir="$absdir"
;;
esac
case "$deplibs " in
- *" -L$dir "*) ;;
+ *" -L$dir "* | *" $arg "*)
+ # Will only happen for absolute or sysroot arguments
+ ;;
*)
- deplibs="$deplibs -L$dir"
- lib_search_path="$lib_search_path $dir"
+ # Preserve sysroot, but never include relative directories
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;;
+ *) func_append deplibs " -L$dir" ;;
+ esac
+ func_append lib_search_path " $dir"
;;
esac
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
- testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
case :$dllsearchpath: in
*":$dir:"*) ;;
- *) dllsearchpath="$dllsearchpath:$dir";;
+ ::) dllsearchpath=$dir;;
+ *) func_append dllsearchpath ":$dir";;
esac
case :$dllsearchpath: in
*":$testbindir:"*) ;;
- *) dllsearchpath="$dllsearchpath:$testbindir";;
+ ::) dllsearchpath=$testbindir;;
+ *) func_append dllsearchpath ":$testbindir";;
esac
;;
esac
+ deplibs="$deplibs $arg"
continue
;;
-l*)
if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
# These systems don't actually have a C or math library (as such)
continue
;;
@@ -1634,7 +5637,7 @@ EOF
;;
*-*-rhapsody* | *-*-darwin1.[012])
# Rhapsody C and math libraries are in the System framework
- deplibs="$deplibs -framework System"
+ func_append deplibs " System.ltframework"
continue
;;
*-*-sco3.2v5* | *-*-sco5v6*)
@@ -1654,63 +5657,39 @@ EOF
;;
esac
fi
- deplibs="$deplibs $arg"
+ func_append deplibs " $arg"
continue
;;
- # Tru64 UNIX uses -model [arg] to determine the layout of C++
- # classes, name mangling, and exception handling.
- -model)
- compile_command="$compile_command $arg"
- compiler_flags="$compiler_flags $arg"
- finalize_command="$finalize_command $arg"
- prev=xcompiler
+ -module)
+ module=yes
continue
;;
- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
- compiler_flags="$compiler_flags $arg"
- compile_command="$compile_command $arg"
- finalize_command="$finalize_command $arg"
- deplibs="$deplibs $arg"
+ # Tru64 UNIX uses -model [arg] to determine the layout of C++
+ # classes, name mangling, and exception handling.
+ # Darwin uses the -arch flag to determine output architecture.
+ -model|-arch|-isysroot|--sysroot)
+ func_append compiler_flags " $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ prev=xcompiler
continue
;;
- -module)
- module=yes
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+ func_append compiler_flags " $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ case "$new_inherited_linker_flags " in
+ *" $arg "*) ;;
+ * ) func_append new_inherited_linker_flags " $arg" ;;
+ esac
continue
;;
- # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
- # -r[0-9][0-9]* specifies the processor on the SGI compiler
- # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
- # +DA*, +DD* enable 64-bit mode on the HP compiler
- # -q* pass through compiler args for the IBM compiler
- # -m* pass through architecture-specific compiler args for GCC
- # -m*, -t[45]*, -txscale* pass through architecture-specific
- # compiler args for GCC
- # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
- # -F/path gives path to uninstalled frameworks, gcc on darwin
- # @file GCC response files
- -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
-
- # Unknown arguments in both finalize_command and compile_command need
- # to be aesthetically quoted because they are evaled later.
- arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
- compile_command="$compile_command $arg"
- finalize_command="$finalize_command $arg"
- compiler_flags="$compiler_flags $arg"
- continue
- ;;
-
- -shrext)
- prev=shrext
+ -multi_module)
+ single_module="${wl}-multi_module"
continue
;;
@@ -1721,11 +5700,11 @@ EOF
-no-install)
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
# The PATH hackery in wrapper scripts is required on Windows
# and Darwin in order for the loader to find any dlls it needs.
- $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
- $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
+ func_warning "\`-no-install' is ignored for $host"
+ func_warning "assuming \`-no-fast-install' instead"
fast_install=no
;;
*) no_install=yes ;;
@@ -1766,22 +5745,36 @@ EOF
;;
-R*)
- dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
+ func_stripname '-R' '' "$arg"
+ dir=$func_stripname_result
# We need an absolute path.
case $dir in
[\\/]* | [A-Za-z]:[\\/]*) ;;
+ =*)
+ func_stripname '=' '' "$dir"
+ dir=$lt_sysroot$func_stripname_result
+ ;;
*)
- $echo "$modename: only absolute run-paths are allowed" 1>&2
- exit $EXIT_FAILURE
+ func_fatal_error "only absolute run-paths are allowed"
;;
esac
case "$xrpath " in
*" $dir "*) ;;
- *) xrpath="$xrpath $dir" ;;
+ *) func_append xrpath " $dir" ;;
esac
continue
;;
+ -shared)
+ # The effects of -shared are defined in a previous loop.
+ continue
+ ;;
+
+ -shrext)
+ prev=shrext
+ continue
+ ;;
+
-static | -static-libtool-libs)
# The effects of -static are defined in a previous loop.
# We used to do the same as -all-static on platforms that
@@ -1800,47 +5793,49 @@ EOF
prev=vinfo
continue
;;
+
-version-number)
prev=vinfo
vinfo_number=yes
continue
;;
+ -weak)
+ prev=weak
+ continue
+ ;;
+
-Wc,*)
- args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
arg=
save_ifs="$IFS"; IFS=','
for flag in $args; do
IFS="$save_ifs"
- case $flag in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- flag="\"$flag\""
- ;;
- esac
- arg="$arg $wl$flag"
- compiler_flags="$compiler_flags $flag"
+ func_quote_for_eval "$flag"
+ func_append arg " $func_quote_for_eval_result"
+ func_append compiler_flags " $func_quote_for_eval_result"
done
IFS="$save_ifs"
- arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
;;
-Wl,*)
- args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
+ func_stripname '-Wl,' '' "$arg"
+ args=$func_stripname_result
arg=
save_ifs="$IFS"; IFS=','
for flag in $args; do
IFS="$save_ifs"
- case $flag in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- flag="\"$flag\""
- ;;
- esac
- arg="$arg $wl$flag"
- compiler_flags="$compiler_flags $wl$flag"
- linker_flags="$linker_flags $flag"
+ func_quote_for_eval "$flag"
+ func_append arg " $wl$func_quote_for_eval_result"
+ func_append compiler_flags " $wl$func_quote_for_eval_result"
+ func_append linker_flags " $func_quote_for_eval_result"
done
IFS="$save_ifs"
- arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
;;
-Xcompiler)
@@ -1858,53 +5853,68 @@ EOF
continue
;;
+ # -msg_* for osf cc
+ -msg_*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+
+ # Flags to be passed through unchanged, with rationale:
+ # -64, -mips[0-9] enable 64-bit mode for the SGI compiler
+ # -r[0-9][0-9]* specify processor for the SGI compiler
+ # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
+ # +DA*, +DD* enable 64-bit mode for the HP compiler
+ # -q* compiler args for the IBM compiler
+ # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
+ # -F/path path to uninstalled frameworks, gcc on darwin
+ # -p, -pg, --coverage, -fprofile-* profiling flags for GCC
+ # @file GCC response files
+ # -tp=* Portland pgcc target processor selection
+ # --sysroot=* for sysroot support
+ # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+ -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ func_append compiler_flags " $arg"
+ continue
+ ;;
+
# Some other compiler flag.
-* | +*)
- # Unknown arguments in both finalize_command and compile_command need
- # to be aesthetically quoted because they are evaled later.
- arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
;;
*.$objext)
# A standard object.
- objs="$objs $arg"
+ func_append objs " $arg"
;;
*.lo)
# A libtool-controlled object.
# Check to see that this really is a libtool object.
- if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ if func_lalib_unsafe_p "$arg"; then
pic_object=
non_pic_object=
# Read the .lo file
- # If there is no directory component, then add one.
- case $arg in
- */* | *\\*) . $arg ;;
- *) . ./$arg ;;
- esac
+ func_source "$arg"
- if test -z "$pic_object" || \
+ if test -z "$pic_object" ||
test -z "$non_pic_object" ||
- test "$pic_object" = none && \
+ test "$pic_object" = none &&
test "$non_pic_object" = none; then
- $echo "$modename: cannot find name of object for \`$arg'" 1>&2
- exit $EXIT_FAILURE
+ func_fatal_error "cannot find name of object for \`$arg'"
fi
# Extract subdirectory from the argument.
- xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$xdir" = "X$arg"; then
- xdir=
- else
- xdir="$xdir/"
- fi
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
if test "$pic_object" != none; then
# Prepend the subdirectory the object is found in.
@@ -1912,7 +5922,7 @@ EOF
if test "$prev" = dlfiles; then
if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
- dlfiles="$dlfiles $pic_object"
+ func_append dlfiles " $pic_object"
prev=
continue
else
@@ -1924,12 +5934,12 @@ EOF
# CHECK ME: I think I busted this. -Ossama
if test "$prev" = dlprefiles; then
# Preload the old-style object.
- dlprefiles="$dlprefiles $pic_object"
+ func_append dlprefiles " $pic_object"
prev=
fi
# A PIC object.
- libobjs="$libobjs $pic_object"
+ func_append libobjs " $pic_object"
arg="$pic_object"
fi
@@ -1939,7 +5949,7 @@ EOF
non_pic_object="$xdir$non_pic_object"
# A standard non-PIC object
- non_pic_objects="$non_pic_objects $non_pic_object"
+ func_append non_pic_objects " $non_pic_object"
if test -z "$pic_object" || test "$pic_object" = none ; then
arg="$non_pic_object"
fi
@@ -1947,52 +5957,47 @@ EOF
# If the PIC object exists, use it instead.
# $xdir was prepended to $pic_object above.
non_pic_object="$pic_object"
- non_pic_objects="$non_pic_objects $non_pic_object"
+ func_append non_pic_objects " $non_pic_object"
fi
else
# Only an error if not doing a dry-run.
- if test -z "$run"; then
- $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
- exit $EXIT_FAILURE
- else
- # Dry-run case.
-
+ if $opt_dry_run; then
# Extract subdirectory from the argument.
- xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$xdir" = "X$arg"; then
- xdir=
- else
- xdir="$xdir/"
- fi
-
- pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
- non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
- libobjs="$libobjs $pic_object"
- non_pic_objects="$non_pic_objects $non_pic_object"
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "\`$arg' is not a valid libtool object"
fi
fi
;;
*.$libext)
# An archive.
- deplibs="$deplibs $arg"
- old_deplibs="$old_deplibs $arg"
+ func_append deplibs " $arg"
+ func_append old_deplibs " $arg"
continue
;;
*.la)
# A libtool-controlled library.
+ func_resolve_sysroot "$arg"
if test "$prev" = dlfiles; then
# This library was specified with -dlopen.
- dlfiles="$dlfiles $arg"
+ func_append dlfiles " $func_resolve_sysroot_result"
prev=
elif test "$prev" = dlprefiles; then
# The library was specified with -dlpreopen.
- dlprefiles="$dlprefiles $arg"
+ func_append dlprefiles " $func_resolve_sysroot_result"
prev=
else
- deplibs="$deplibs $arg"
+ func_append deplibs " $func_resolve_sysroot_result"
fi
continue
;;
@@ -2001,70 +6006,53 @@ EOF
*)
# Unknown arguments in both finalize_command and compile_command need
# to be aesthetically quoted because they are evaled later.
- arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
;;
esac # arg
# Now actually substitute the argument into the commands.
if test -n "$arg"; then
- compile_command="$compile_command $arg"
- finalize_command="$finalize_command $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
fi
done # argument parsing loop
- if test -n "$prev"; then
- $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
+ test -n "$prev" && \
+ func_fatal_help "the \`$prevarg' option requires an argument"
if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
eval arg=\"$export_dynamic_flag_spec\"
- compile_command="$compile_command $arg"
- finalize_command="$finalize_command $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
fi
oldlibs=
# calculate the name of the file, without its directory
- outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
+ func_basename "$output"
+ outputname="$func_basename_result"
libobjs_save="$libobjs"
if test -n "$shlibpath_var"; then
# get the directories listed in $shlibpath_var
- eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+ eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\`
else
shlib_search_path=
fi
eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
- output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$output_objdir" = "X$output"; then
- output_objdir="$objdir"
- else
- output_objdir="$output_objdir/$objdir"
- fi
+ func_dirname "$output" "/" ""
+ output_objdir="$func_dirname_result$objdir"
+ func_to_tool_file "$output_objdir/"
+ tool_output_objdir=$func_to_tool_file_result
# Create the object directory.
- if test ! -d "$output_objdir"; then
- $show "$mkdir $output_objdir"
- $run $mkdir $output_objdir
- exit_status=$?
- if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
- exit $exit_status
- fi
- fi
+ func_mkdir_p "$output_objdir"
# Determine the type of output
case $output in
"")
- $echo "$modename: you must specify an output file" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
+ func_fatal_help "you must specify an output file"
;;
*.$libext) linkmode=oldlib ;;
*.lo | *.$objext) linkmode=obj ;;
@@ -2072,27 +6060,18 @@ EOF
*) linkmode=prog ;; # Anything else should be a program.
esac
- case $host in
- *cygwin* | *mingw* | *pw32*)
- # don't eliminate duplications in $postdeps and $predeps
- duplicate_compiler_generated_deps=yes
- ;;
- *)
- duplicate_compiler_generated_deps=$duplicate_deps
- ;;
- esac
specialdeplibs=
libs=
# Find all interdependent deplibs by searching for libraries
# that are linked more than once (e.g. -la -lb -la)
for deplib in $deplibs; do
- if test "X$duplicate_deps" = "Xyes" ; then
+ if $opt_preserve_dup_deps ; then
case "$libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
esac
fi
- libs="$libs $deplib"
+ func_append libs " $deplib"
done
if test "$linkmode" = lib; then
@@ -2102,12 +6081,12 @@ EOF
# $postdeps and mark them as special (i.e., whose duplicates are
# not to be eliminated).
pre_post_deps=
- if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
+ if $opt_duplicate_compiler_generated_deps; then
for pre_post_dep in $predeps $postdeps; do
case "$pre_post_deps " in
- *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
+ *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;;
esac
- pre_post_deps="$pre_post_deps $pre_post_dep"
+ func_append pre_post_deps " $pre_post_dep"
done
fi
pre_post_deps=
@@ -2118,15 +6097,16 @@ EOF
newlib_search_path=
need_relink=no # whether we're linking any uninstalled libtool libraries
notinst_deplibs= # not-installed libtool libraries
+ notinst_path= # paths that contain not-installed libtool libraries
+
case $linkmode in
lib)
- passes="conv link"
+ passes="conv dlpreopen link"
for file in $dlfiles $dlprefiles; do
case $file in
*.la) ;;
*)
- $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
- exit $EXIT_FAILURE
+ func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
;;
esac
done
@@ -2142,7 +6122,20 @@ EOF
*) passes="conv"
;;
esac
+
for pass in $passes; do
+ # The preopen pass in lib mode reverses $deplibs; put it back here
+ # so that -L comes before libs that need it for instance...
+ if test "$linkmode,$pass" = "lib,link"; then
+ ## FIXME: Find the place where the list is rebuilt in the wrong
+ ## order, and fix it there properly
+ tmp_deplibs=
+ for deplib in $deplibs; do
+ tmp_deplibs="$deplib $tmp_deplibs"
+ done
+ deplibs="$tmp_deplibs"
+ fi
+
if test "$linkmode,$pass" = "lib,link" ||
test "$linkmode,$pass" = "prog,scan"; then
libs="$deplibs"
@@ -2155,11 +6148,35 @@ EOF
link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
esac
fi
+ if test "$linkmode,$pass" = "lib,dlpreopen"; then
+ # Collect and forward deplibs of preopened libtool libs
+ for lib in $dlprefiles; do
+ # Ignore non-libtool-libs
+ dependency_libs=
+ func_resolve_sysroot "$lib"
+ case $lib in
+ *.la) func_source "$func_resolve_sysroot_result" ;;
+ esac
+
+ # Collect preopened libtool deplibs, except any this library
+ # has declared as weak libs
+ for deplib in $dependency_libs; do
+ func_basename "$deplib"
+ deplib_base=$func_basename_result
+ case " $weak_libs " in
+ *" $deplib_base "*) ;;
+ *) func_append deplibs " $deplib" ;;
+ esac
+ done
+ done
+ libs="$dlprefiles"
+ fi
if test "$pass" = dlopen; then
# Collect dlpreopened libraries
save_deplibs="$deplibs"
deplibs=
fi
+
for deplib in $libs; do
lib=
found=no
@@ -2169,7 +6186,7 @@ EOF
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
else
- compiler_flags="$compiler_flags $deplib"
+ func_append compiler_flags " $deplib"
fi
case $linkmode in
@@ -2198,11 +6215,17 @@ EOF
;;
-l*)
if test "$linkmode" != lib && test "$linkmode" != prog; then
- $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
+ func_warning "\`-l' is ignored for archives/objects"
continue
fi
- name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
- for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ func_stripname '-l' '' "$deplib"
+ name=$func_stripname_result
+ if test "$linkmode" = lib; then
+ searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
+ else
+ searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
+ fi
+ for searchdir in $searchdirs; do
for search_ext in .la $std_shrext .so .a; do
# Search the libtool library
lib="$searchdir/lib${name}${search_ext}"
@@ -2232,21 +6255,17 @@ EOF
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
case " $predeps $postdeps " in
*" $deplib "*)
- if (${SED} -e '2q' $lib |
- grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ if func_lalib_p "$lib"; then
library_names=
old_library=
- case $lib in
- */* | *\\*) . $lib ;;
- *) . ./$lib ;;
- esac
+ func_source "$lib"
for l in $old_library $library_names; do
ll="$l"
done
if test "X$ll" = "X$old_library" ; then # only static version available
found=no
- ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
- test "X$ladir" = "X$lib" && ladir="."
+ func_dirname "$lib" "" "."
+ ladir="$func_dirname_result"
lib=$ladir/$old_library
if test "$linkmode,$pass" = "prog,link"; then
compile_deplibs="$deplib $compile_deplibs"
@@ -2258,19 +6277,36 @@ EOF
continue
fi
fi
- ;;
+ ;;
*) ;;
esac
fi
fi
;; # -l
+ *.ltframework)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ if test "$linkmode" = lib ; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) func_append new_inherited_linker_flags " $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
-L*)
case $linkmode in
lib)
deplibs="$deplib $deplibs"
test "$pass" = conv && continue
newdependency_libs="$deplib $newdependency_libs"
- newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+ func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ func_append newlib_search_path " $func_resolve_sysroot_result"
;;
prog)
if test "$pass" = conv; then
@@ -2283,27 +6319,34 @@ EOF
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
fi
- newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+ func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ func_append newlib_search_path " $func_resolve_sysroot_result"
;;
*)
- $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
+ func_warning "\`-L' is ignored for archives/objects"
;;
esac # linkmode
continue
;; # -L
-R*)
if test "$pass" = link; then
- dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
+ func_stripname '-R' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ dir=$func_resolve_sysroot_result
# Make sure the xrpath contains only unique directories.
case "$xrpath " in
*" $dir "*) ;;
- *) xrpath="$xrpath $dir" ;;
+ *) func_append xrpath " $dir" ;;
esac
fi
deplibs="$deplib $deplibs"
continue
;;
- *.la) lib="$deplib" ;;
+ *.la)
+ func_resolve_sysroot "$deplib"
+ lib=$func_resolve_sysroot_result
+ ;;
*.$libext)
if test "$pass" = conv; then
deplibs="$deplib $deplibs"
@@ -2311,35 +6354,41 @@ EOF
fi
case $linkmode in
lib)
- valid_a_lib=no
- case $deplibs_check_method in
- match_pattern*)
- set dummy $deplibs_check_method
- match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
- if eval $echo \"$deplib\" 2>/dev/null \
- | $SED 10q \
+ # Linking convenience modules into shared libraries is allowed,
+ # but linking other static libraries is non-portable.
+ case " $dlpreconveniencelibs " in
+ *" $deplib "*) ;;
+ *)
+ valid_a_lib=no
+ case $deplibs_check_method in
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
| $EGREP "$match_pattern_regex" > /dev/null; then
- valid_a_lib=yes
- fi
+ valid_a_lib=yes
+ fi
;;
- pass_all)
- valid_a_lib=yes
+ pass_all)
+ valid_a_lib=yes
;;
- esac
- if test "$valid_a_lib" != yes; then
- $echo
- $echo "*** Warning: Trying to link with static lib archive $deplib."
- $echo "*** I have the capability to make that library automatically link in when"
- $echo "*** you link to this library. But I can only do this if you have a"
- $echo "*** shared version of the library, which you do not appear to have"
- $echo "*** because the file extensions .$libext of this argument makes me believe"
- $echo "*** that it is just a static archive that I should not used here."
- else
- $echo
- $echo "*** Warning: Linking the shared library $output against the"
- $echo "*** static library $deplib is not portable!"
- deplibs="$deplib $deplibs"
- fi
+ esac
+ if test "$valid_a_lib" != yes; then
+ echo
+ $ECHO "*** Warning: Trying to link with static lib archive $deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because the file extensions .$libext of this argument makes me believe"
+ echo "*** that it is just a static archive that I should not use here."
+ else
+ echo
+ $ECHO "*** Warning: Linking the shared library $output against the"
+ $ECHO "*** static library $deplib is not portable!"
+ deplibs="$deplib $deplibs"
+ fi
+ ;;
+ esac
continue
;;
prog)
@@ -2360,11 +6409,11 @@ EOF
if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
# If there is no dlopen support or we're linking statically,
# we need to preload.
- newdlprefiles="$newdlprefiles $deplib"
+ func_append newdlprefiles " $deplib"
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
else
- newdlfiles="$newdlfiles $deplib"
+ func_append newdlfiles " $deplib"
fi
fi
continue
@@ -2374,21 +6423,18 @@ EOF
continue
;;
esac # case $deplib
+
if test "$found" = yes || test -f "$lib"; then :
else
- $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
- exit $EXIT_FAILURE
+ func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
fi
# Check to see that this really is a libtool archive.
- if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
- else
- $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
- exit $EXIT_FAILURE
- fi
+ func_lalib_unsafe_p "$lib" \
+ || func_fatal_error "\`$lib' is not a valid libtool archive"
- ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
- test "X$ladir" = "X$lib" && ladir="."
+ func_dirname "$lib" "" "."
+ ladir="$func_dirname_result"
dlname=
dlopen=
@@ -2396,6 +6442,7 @@ EOF
libdir=
library_names=
old_library=
+ inherited_linker_flags=
# If the library was installed with an old release of libtool,
# it will not redefine variables installed, or shouldnotlink
installed=yes
@@ -2404,16 +6451,24 @@ EOF
# Read the .la file
- case $lib in
- */* | *\\*) . $lib ;;
- *) . ./$lib ;;
- esac
-
+ func_source "$lib"
+
+ # Convert "-framework foo" to "foo.ltframework"
+ if test -n "$inherited_linker_flags"; then
+ tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
+ for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
+ case " $new_inherited_linker_flags " in
+ *" $tmp_inherited_linker_flag "*) ;;
+ *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";;
+ esac
+ done
+ fi
+ dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
if test "$linkmode,$pass" = "lib,link" ||
test "$linkmode,$pass" = "prog,scan" ||
{ test "$linkmode" != prog && test "$linkmode" != lib; }; then
- test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
- test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
+ test -n "$dlopen" && func_append dlfiles " $dlopen"
+ test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
fi
if test "$pass" = conv; then
@@ -2421,45 +6476,47 @@ EOF
deplibs="$lib $deplibs"
if test -z "$libdir"; then
if test -z "$old_library"; then
- $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
- exit $EXIT_FAILURE
+ func_fatal_error "cannot find name of link library for \`$lib'"
fi
# It is a libtool convenience library, so add in its objects.
- convenience="$convenience $ladir/$objdir/$old_library"
- old_convenience="$old_convenience $ladir/$objdir/$old_library"
- tmp_libs=
- for deplib in $dependency_libs; do
- deplibs="$deplib $deplibs"
- if test "X$duplicate_deps" = "Xyes" ; then
- case "$tmp_libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
- fi
- tmp_libs="$tmp_libs $deplib"
- done
+ func_append convenience " $ladir/$objdir/$old_library"
+ func_append old_convenience " $ladir/$objdir/$old_library"
elif test "$linkmode" != prog && test "$linkmode" != lib; then
- $echo "$modename: \`$lib' is not a convenience library" 1>&2
- exit $EXIT_FAILURE
+ func_fatal_error "\`$lib' is not a convenience library"
fi
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ deplibs="$deplib $deplibs"
+ if $opt_preserve_dup_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append tmp_libs " $deplib"
+ done
continue
fi # $pass = conv
# Get the name of the library we link against.
linklib=
- for l in $old_library $library_names; do
- linklib="$l"
- done
+ if test -n "$old_library" &&
+ { test "$prefer_static_libs" = yes ||
+ test "$prefer_static_libs,$installed" = "built,no"; }; then
+ linklib=$old_library
+ else
+ for l in $old_library $library_names; do
+ linklib="$l"
+ done
+ fi
if test -z "$linklib"; then
- $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
- exit $EXIT_FAILURE
+ func_fatal_error "cannot find name of link library for \`$lib'"
fi
# This library was specified with -dlopen.
if test "$pass" = dlopen; then
if test -z "$libdir"; then
- $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
- exit $EXIT_FAILURE
+ func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
fi
if test -z "$dlname" ||
test "$dlopen_support" != yes ||
@@ -2468,9 +6525,9 @@ EOF
# statically, we need to preload. We also need to preload any
# dependent libraries so libltdl's deplib preloader doesn't
# bomb out in the load deplibs phase.
- dlprefiles="$dlprefiles $lib $dependency_libs"
+ func_append dlprefiles " $lib $dependency_libs"
else
- newdlfiles="$newdlfiles $lib"
+ func_append newdlfiles " $lib"
fi
continue
fi # $pass = dlopen
@@ -2481,24 +6538,25 @@ EOF
*)
abs_ladir=`cd "$ladir" && pwd`
if test -z "$abs_ladir"; then
- $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
- $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
+ func_warning "cannot determine absolute directory name of \`$ladir'"
+ func_warning "passing it literally to the linker, although it might fail"
abs_ladir="$ladir"
fi
;;
esac
- laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+ func_basename "$lib"
+ laname="$func_basename_result"
# Find the relevant object directory and library name.
if test "X$installed" = Xyes; then
- if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
- $echo "$modename: warning: library \`$lib' was moved." 1>&2
+ if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ func_warning "library \`$lib' was moved."
dir="$ladir"
absdir="$abs_ladir"
libdir="$abs_ladir"
else
- dir="$libdir"
- absdir="$libdir"
+ dir="$lt_sysroot$libdir"
+ absdir="$lt_sysroot$libdir"
fi
test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
else
@@ -2506,32 +6564,62 @@ EOF
dir="$ladir"
absdir="$abs_ladir"
# Remove this search path later
- notinst_path="$notinst_path $abs_ladir"
+ func_append notinst_path " $abs_ladir"
else
dir="$ladir/$objdir"
absdir="$abs_ladir/$objdir"
# Remove this search path later
- notinst_path="$notinst_path $abs_ladir"
+ func_append notinst_path " $abs_ladir"
fi
fi # $installed = yes
- name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+ func_stripname 'lib' '.la' "$laname"
+ name=$func_stripname_result
# This library was specified with -dlpreopen.
if test "$pass" = dlpreopen; then
- if test -z "$libdir"; then
- $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
- exit $EXIT_FAILURE
- fi
- # Prefer using a static library (so that no silly _DYNAMIC symbols
- # are required to link).
- if test -n "$old_library"; then
- newdlprefiles="$newdlprefiles $dir/$old_library"
- # Otherwise, use the dlname, so that lt_dlopen finds it.
- elif test -n "$dlname"; then
- newdlprefiles="$newdlprefiles $dir/$dlname"
- else
- newdlprefiles="$newdlprefiles $dir/$linklib"
+ if test -z "$libdir" && test "$linkmode" = prog; then
+ func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
fi
+ case "$host" in
+ # special handling for platforms with PE-DLLs.
+ *cygwin* | *mingw* | *cegcc* )
+ # Linker will automatically link against shared library if both
+ # static and shared are present. Therefore, ensure we extract
+ # symbols from the import library if a shared library is present
+ # (otherwise, the dlopen module name will be incorrect). We do
+ # this by putting the import library name into $newdlprefiles.
+ # We recover the dlopen module name by 'saving' the la file
+ # name in a special purpose variable, and (later) extracting the
+ # dlname from the la file.
+ if test -n "$dlname"; then
+ func_tr_sh "$dir/$linklib"
+ eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname"
+ func_append newdlprefiles " $dir/$linklib"
+ else
+ func_append newdlprefiles " $dir/$old_library"
+ # Keep a list of preopened convenience libraries to check
+ # that they are being used correctly in the link pass.
+ test -z "$libdir" && \
+ func_append dlpreconveniencelibs " $dir/$old_library"
+ fi
+ ;;
+ * )
+ # Prefer using a static library (so that no silly _DYNAMIC symbols
+ # are required to link).
+ if test -n "$old_library"; then
+ func_append newdlprefiles " $dir/$old_library"
+ # Keep a list of preopened convenience libraries to check
+ # that they are being used correctly in the link pass.
+ test -z "$libdir" && \
+ func_append dlpreconveniencelibs " $dir/$old_library"
+ # Otherwise, use the dlname, so that lt_dlopen finds it.
+ elif test -n "$dlname"; then
+ func_append newdlprefiles " $dir/$dlname"
+ else
+ func_append newdlprefiles " $dir/$linklib"
+ fi
+ ;;
+ esac
fi # $pass = dlpreopen
if test -z "$libdir"; then
@@ -2549,7 +6637,7 @@ EOF
if test "$linkmode" = prog && test "$pass" != link; then
- newlib_search_path="$newlib_search_path $ladir"
+ func_append newlib_search_path " $ladir"
deplibs="$lib $deplibs"
linkalldeplibs=no
@@ -2561,7 +6649,10 @@ EOF
tmp_libs=
for deplib in $dependency_libs; do
case $deplib in
- -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
+ -L*) func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ func_append newlib_search_path " $func_resolve_sysroot_result"
+ ;;
esac
# Need to link against all dependency_libs?
if test "$linkalldeplibs" = yes; then
@@ -2571,12 +6662,12 @@ EOF
# or/and link against static libraries
newdependency_libs="$deplib $newdependency_libs"
fi
- if test "X$duplicate_deps" = "Xyes" ; then
+ if $opt_preserve_dup_deps ; then
case "$tmp_libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
esac
fi
- tmp_libs="$tmp_libs $deplib"
+ func_append tmp_libs " $deplib"
done # for deplib
continue
fi # $linkmode = prog...
@@ -2584,15 +6675,14 @@ EOF
if test "$linkmode,$pass" = "prog,link"; then
if test -n "$library_names" &&
{ { test "$prefer_static_libs" = no ||
- test "$prefer_static_libs,$installed" = "built,yes"; } ||
+ test "$prefer_static_libs,$installed" = "built,yes"; } ||
test -z "$old_library"; }; then
# We need to hardcode the library path
if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
# Make sure the rpath contains only unique directories.
- case "$temp_rpath " in
- *" $dir "*) ;;
- *" $absdir "*) ;;
- *) temp_rpath="$temp_rpath $absdir" ;;
+ case "$temp_rpath:" in
+ *"$absdir:"*) ;;
+ *) func_append temp_rpath "$absdir:" ;;
esac
fi
@@ -2604,7 +6694,7 @@ EOF
*)
case "$compile_rpath " in
*" $absdir "*) ;;
- *) compile_rpath="$compile_rpath $absdir"
+ *) func_append compile_rpath " $absdir" ;;
esac
;;
esac
@@ -2613,7 +6703,7 @@ EOF
*)
case "$finalize_rpath " in
*" $libdir "*) ;;
- *) finalize_rpath="$finalize_rpath $libdir"
+ *) func_append finalize_rpath " $libdir" ;;
esac
;;
esac
@@ -2630,27 +6720,43 @@ EOF
link_static=no # Whether the deplib will be linked statically
use_static_libs=$prefer_static_libs
- if test "$use_static_libs" = built && test "$installed" = yes ; then
+ if test "$use_static_libs" = built && test "$installed" = yes; then
use_static_libs=no
fi
if test -n "$library_names" &&
{ test "$use_static_libs" = no || test -z "$old_library"; }; then
- if test "$installed" = no; then
- notinst_deplibs="$notinst_deplibs $lib"
- need_relink=yes
- fi
+ case $host in
+ *cygwin* | *mingw* | *cegcc*)
+ # No point in relinking DLLs because paths are not encoded
+ func_append notinst_deplibs " $lib"
+ need_relink=no
+ ;;
+ *)
+ if test "$installed" = no; then
+ func_append notinst_deplibs " $lib"
+ need_relink=yes
+ fi
+ ;;
+ esac
# This is a shared library
- # Warn about portability, can't link against -module's on
- # some systems (darwin)
- if test "$shouldnotlink" = yes && test "$pass" = link ; then
- $echo
+ # Warn about portability, can't link against -module's on some
+ # systems (darwin). Don't bleat about dlopened modules though!
+ dlopenmodule=""
+ for dlpremoduletest in $dlprefiles; do
+ if test "X$dlpremoduletest" = "X$lib"; then
+ dlopenmodule="$dlpremoduletest"
+ break
+ fi
+ done
+ if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
+ echo
if test "$linkmode" = prog; then
- $echo "*** Warning: Linking the executable $output against the loadable module"
+ $ECHO "*** Warning: Linking the executable $output against the loadable module"
else
- $echo "*** Warning: Linking the shared library $output against the loadable module"
+ $ECHO "*** Warning: Linking the shared library $output against the loadable module"
fi
- $echo "*** $linklib is not portable!"
+ $ECHO "*** $linklib is not portable!"
fi
if test "$linkmode" = lib &&
test "$hardcode_into_libs" = yes; then
@@ -2662,7 +6768,7 @@ EOF
*)
case "$compile_rpath " in
*" $absdir "*) ;;
- *) compile_rpath="$compile_rpath $absdir"
+ *) func_append compile_rpath " $absdir" ;;
esac
;;
esac
@@ -2671,7 +6777,7 @@ EOF
*)
case "$finalize_rpath " in
*" $libdir "*) ;;
- *) finalize_rpath="$finalize_rpath $libdir"
+ *) func_append finalize_rpath " $libdir" ;;
esac
;;
esac
@@ -2680,17 +6786,19 @@ EOF
if test -n "$old_archive_from_expsyms_cmds"; then
# figure out the soname
set dummy $library_names
- realname="$2"
- shift; shift
- libname=`eval \\$echo \"$libname_spec\"`
+ shift
+ realname="$1"
+ shift
+ libname=`eval "\\$ECHO \"$libname_spec\""`
# use dlname if we got it. it's perfectly good, no?
if test -n "$dlname"; then
soname="$dlname"
elif test -n "$soname_spec"; then
# bleh windows
case $host in
- *cygwin* | mingw*)
- major=`expr $current - $age`
+ *cygwin* | mingw* | *cegcc*)
+ func_arith $current - $age
+ major=$func_arith_result
versuffix="-$major"
;;
esac
@@ -2701,43 +6809,29 @@ EOF
# Make a new name for the extract_expsyms_cmds to use
soroot="$soname"
- soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
- newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
+ func_basename "$soroot"
+ soname="$func_basename_result"
+ func_stripname 'lib' '.dll' "$soname"
+ newlib=libimp-$func_stripname_result.a
# If the library has no export list, then create one now
if test -f "$output_objdir/$soname-def"; then :
else
- $show "extracting exported symbol list from \`$soname'"
- save_ifs="$IFS"; IFS='~'
- cmds=$extract_expsyms_cmds
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
+ func_verbose "extracting exported symbol list from \`$soname'"
+ func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
fi
# Create $newlib
if test -f "$output_objdir/$newlib"; then :; else
- $show "generating import library for \`$soname'"
- save_ifs="$IFS"; IFS='~'
- cmds=$old_archive_from_expsyms_cmds
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
+ func_verbose "generating import library for \`$soname'"
+ func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
fi
# make sure the library variables are pointing to the new library
dir=$output_objdir
linklib=$newlib
fi # test -n "$old_archive_from_expsyms_cmds"
- if test "$linkmode" = prog || test "$mode" != relink; then
+ if test "$linkmode" = prog || test "$opt_mode" != relink; then
add_shlibpath=
add_dir=
add=
@@ -2752,17 +6846,21 @@ EOF
*-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
*-*-unixware7*) add_dir="-L$dir" ;;
*-*-darwin* )
- # if the lib is a module then we can not link against
- # it, someone is ignoring the new warnings I added
+ # if the lib is a (non-dlopened) module then we can not
+ # link against it, someone is ignoring the earlier warnings
if /usr/bin/file -L $add 2> /dev/null |
- $EGREP ": [^:]* bundle" >/dev/null ; then
- $echo "** Warning, lib $linklib is a module, not a shared library"
- if test -z "$old_library" ; then
- $echo
- $echo "** And there doesn't seem to be a static archive available"
- $echo "** The link will probably fail, sorry"
- else
- add="$dir/$old_library"
+ $GREP ": [^:]* bundle" >/dev/null ; then
+ if test "X$dlopenmodule" != "X$lib"; then
+ $ECHO "*** Warning: lib $linklib is a module, not a shared library"
+ if test -z "$old_library" ; then
+ echo
+ echo "*** And there doesn't seem to be a static archive available"
+ echo "*** The link will probably fail, sorry"
+ else
+ add="$dir/$old_library"
+ fi
+ elif test -n "$old_library"; then
+ add="$dir/$old_library"
fi
fi
esac
@@ -2780,7 +6878,8 @@ EOF
fi
;;
relink)
- if test "$hardcode_direct" = yes; then
+ if test "$hardcode_direct" = yes &&
+ test "$hardcode_direct_absolute" = no; then
add="$dir/$linklib"
elif test "$hardcode_minus_L" = yes; then
add_dir="-L$dir"
@@ -2788,7 +6887,7 @@ EOF
if test -n "$inst_prefix_dir"; then
case $libdir in
[\\/]*)
- add_dir="$add_dir -L$inst_prefix_dir$libdir"
+ func_append add_dir " -L$inst_prefix_dir$libdir"
;;
esac
fi
@@ -2804,14 +6903,13 @@ EOF
esac
if test "$lib_linked" != yes; then
- $echo "$modename: configuration error: unsupported hardcode properties"
- exit $EXIT_FAILURE
+ func_fatal_configuration "unsupported hardcode properties"
fi
if test -n "$add_shlibpath"; then
case :$compile_shlibpath: in
*":$add_shlibpath:"*) ;;
- *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+ *) func_append compile_shlibpath "$add_shlibpath:" ;;
esac
fi
if test "$linkmode" = prog; then
@@ -2820,23 +6918,24 @@ EOF
else
test -n "$add_dir" && deplibs="$add_dir $deplibs"
test -n "$add" && deplibs="$add $deplibs"
- if test "$hardcode_direct" != yes && \
- test "$hardcode_minus_L" != yes && \
+ if test "$hardcode_direct" != yes &&
+ test "$hardcode_minus_L" != yes &&
test "$hardcode_shlibpath_var" = yes; then
case :$finalize_shlibpath: in
*":$libdir:"*) ;;
- *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+ *) func_append finalize_shlibpath "$libdir:" ;;
esac
fi
fi
fi
- if test "$linkmode" = prog || test "$mode" = relink; then
+ if test "$linkmode" = prog || test "$opt_mode" = relink; then
add_shlibpath=
add_dir=
add=
# Finalize command for both is simple: just hardcode it.
- if test "$hardcode_direct" = yes; then
+ if test "$hardcode_direct" = yes &&
+ test "$hardcode_direct_absolute" = no; then
add="$libdir/$linklib"
elif test "$hardcode_minus_L" = yes; then
add_dir="-L$libdir"
@@ -2844,15 +6943,15 @@ EOF
elif test "$hardcode_shlibpath_var" = yes; then
case :$finalize_shlibpath: in
*":$libdir:"*) ;;
- *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+ *) func_append finalize_shlibpath "$libdir:" ;;
esac
add="-l$name"
elif test "$hardcode_automatic" = yes; then
if test -n "$inst_prefix_dir" &&
test -f "$inst_prefix_dir$libdir/$linklib" ; then
- add="$inst_prefix_dir$libdir/$linklib"
+ add="$inst_prefix_dir$libdir/$linklib"
else
- add="$libdir/$linklib"
+ add="$libdir/$linklib"
fi
else
# We cannot seem to hardcode it, guess we'll fake it.
@@ -2861,7 +6960,7 @@ EOF
if test -n "$inst_prefix_dir"; then
case $libdir in
[\\/]*)
- add_dir="$add_dir -L$inst_prefix_dir$libdir"
+ func_append add_dir " -L$inst_prefix_dir$libdir"
;;
esac
fi
@@ -2896,21 +6995,21 @@ EOF
# Just print a warning and add the library to dependency_libs so
# that the program can be linked against the static library.
- $echo
- $echo "*** Warning: This system can not link to static lib archive $lib."
- $echo "*** I have the capability to make that library automatically link in when"
- $echo "*** you link to this library. But I can only do this if you have a"
- $echo "*** shared version of the library, which you do not appear to have."
+ echo
+ $ECHO "*** Warning: This system can not link to static lib archive $lib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
if test "$module" = yes; then
- $echo "*** But as you try to build a module library, libtool will still create "
- $echo "*** a static module, that should work as long as the dlopening application"
- $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
+ echo "*** But as you try to build a module library, libtool will still create "
+ echo "*** a static module, that should work as long as the dlopening application"
+ echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
if test -z "$global_symbol_pipe"; then
- $echo
- $echo "*** However, this would only work if libtool was able to extract symbol"
- $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
- $echo "*** not find such a program. So, this module is probably useless."
- $echo "*** \`nm' from GNU binutils and a full rebuild may help."
+ echo
+ echo "*** However, this would only work if libtool was able to extract symbol"
+ echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ echo "*** not find such a program. So, this module is probably useless."
+ echo "*** \`nm' from GNU binutils and a full rebuild may help."
fi
if test "$build_old_libs" = no; then
build_libtool_libs=module
@@ -2934,120 +7033,113 @@ EOF
temp_deplibs=
for libdir in $dependency_libs; do
case $libdir in
- -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
+ -R*) func_stripname '-R' '' "$libdir"
+ temp_xrpath=$func_stripname_result
case " $xrpath " in
*" $temp_xrpath "*) ;;
- *) xrpath="$xrpath $temp_xrpath";;
+ *) func_append xrpath " $temp_xrpath";;
esac;;
- *) temp_deplibs="$temp_deplibs $libdir";;
+ *) func_append temp_deplibs " $libdir";;
esac
done
dependency_libs="$temp_deplibs"
fi
- newlib_search_path="$newlib_search_path $absdir"
+ func_append newlib_search_path " $absdir"
# Link against this library
test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
# ... and its dependency_libs
tmp_libs=
for deplib in $dependency_libs; do
newdependency_libs="$deplib $newdependency_libs"
- if test "X$duplicate_deps" = "Xyes" ; then
+ case $deplib in
+ -L*) func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result";;
+ *) func_resolve_sysroot "$deplib" ;;
+ esac
+ if $opt_preserve_dup_deps ; then
case "$tmp_libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ *" $func_resolve_sysroot_result "*)
+ func_append specialdeplibs " $func_resolve_sysroot_result" ;;
esac
fi
- tmp_libs="$tmp_libs $deplib"
+ func_append tmp_libs " $func_resolve_sysroot_result"
done
if test "$link_all_deplibs" != no; then
# Add the search paths of all dependency libraries
for deplib in $dependency_libs; do
+ path=
case $deplib in
-L*) path="$deplib" ;;
*.la)
- dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
- test "X$dir" = "X$deplib" && dir="."
+ func_resolve_sysroot "$deplib"
+ deplib=$func_resolve_sysroot_result
+ func_dirname "$deplib" "" "."
+ dir=$func_dirname_result
# We need an absolute path.
case $dir in
[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
*)
absdir=`cd "$dir" && pwd`
if test -z "$absdir"; then
- $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
+ func_warning "cannot determine absolute directory name of \`$dir'"
absdir="$dir"
fi
;;
esac
- if grep "^installed=no" $deplib > /dev/null; then
- path="$absdir/$objdir"
- else
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
- if test -z "$libdir"; then
- $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
- exit $EXIT_FAILURE
- fi
- if test "$absdir" != "$libdir"; then
- $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
- fi
- path="$absdir"
- fi
- depdepl=
+ if $GREP "^installed=no" $deplib > /dev/null; then
case $host in
*-*-darwin*)
- # we do not want to link against static libs,
- # but need to link against shared
+ depdepl=
eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
if test -n "$deplibrary_names" ; then
for tmp in $deplibrary_names ; do
depdepl=$tmp
done
- if test -f "$path/$depdepl" ; then
- depdepl="$path/$depdepl"
+ if test -f "$absdir/$objdir/$depdepl" ; then
+ depdepl="$absdir/$objdir/$depdepl"
+ darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ if test -z "$darwin_install_name"; then
+ darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ fi
+ func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
+ func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}"
+ path=
fi
- # do not add paths which are already there
- case " $newlib_search_path " in
- *" $path "*) ;;
- *) newlib_search_path="$newlib_search_path $path";;
- esac
fi
- path=""
;;
*)
- path="-L$path"
- ;;
- esac
- ;;
- -l*)
- case $host in
- *-*-darwin*)
- # Again, we only want to link against shared libraries
- eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
- for tmp in $newlib_search_path ; do
- if test -f "$tmp/lib$tmp_libs.dylib" ; then
- eval depdepl="$tmp/lib$tmp_libs.dylib"
- break
- fi
- done
- path=""
+ path="-L$absdir/$objdir"
;;
- *) continue ;;
esac
+ else
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$deplib' is not a valid libtool archive"
+ test "$absdir" != "$libdir" && \
+ func_warning "\`$deplib' seems to be moved"
+
+ path="-L$absdir"
+ fi
;;
- *) continue ;;
esac
case " $deplibs " in
*" $path "*) ;;
*) deplibs="$path $deplibs" ;;
esac
- case " $deplibs " in
- *" $depdepl "*) ;;
- *) deplibs="$depdepl $deplibs" ;;
- esac
done
fi # link_all_deplibs != no
fi # linkmode = lib
done # for deplib in $libs
+ if test "$pass" = link; then
+ if test "$linkmode" = "prog"; then
+ compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
+ finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
+ else
+ compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ fi
+ fi
dependency_libs="$newdependency_libs"
if test "$pass" = dlpreopen; then
# Link the dlpreopened libraries before other libraries
@@ -3062,7 +7154,7 @@ EOF
for dir in $newlib_search_path; do
case "$lib_search_path " in
*" $dir "*) ;;
- *) lib_search_path="$lib_search_path $dir" ;;
+ *) func_append lib_search_path " $dir" ;;
esac
done
newlib_search_path=
@@ -3120,10 +7212,10 @@ EOF
-L*)
case " $tmp_libs " in
*" $deplib "*) ;;
- *) tmp_libs="$tmp_libs $deplib" ;;
+ *) func_append tmp_libs " $deplib" ;;
esac
;;
- *) tmp_libs="$tmp_libs $deplib" ;;
+ *) func_append tmp_libs " $deplib" ;;
esac
done
eval $var=\"$tmp_libs\"
@@ -3139,98 +7231,96 @@ EOF
;;
esac
if test -n "$i" ; then
- tmp_libs="$tmp_libs $i"
+ func_append tmp_libs " $i"
fi
done
dependency_libs=$tmp_libs
done # for pass
if test "$linkmode" = prog; then
dlfiles="$newdlfiles"
+ fi
+ if test "$linkmode" = prog || test "$linkmode" = lib; then
dlprefiles="$newdlprefiles"
fi
case $linkmode in
oldlib)
- if test -n "$deplibs"; then
- $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
- fi
-
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
- $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
+ func_warning "\`-dlopen' is ignored for archives"
fi
- if test -n "$rpath"; then
- $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
- fi
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "\`-l' and \`-L' are ignored for archives" ;;
+ esac
- if test -n "$xrpath"; then
- $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
- fi
+ test -n "$rpath" && \
+ func_warning "\`-rpath' is ignored for archives"
- if test -n "$vinfo"; then
- $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
- fi
+ test -n "$xrpath" && \
+ func_warning "\`-R' is ignored for archives"
- if test -n "$release"; then
- $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
- fi
+ test -n "$vinfo" && \
+ func_warning "\`-version-info/-version-number' is ignored for archives"
- if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
- $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
- fi
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for archives"
+
+ test -n "$export_symbols$export_symbols_regex" && \
+ func_warning "\`-export-symbols' is ignored for archives"
# Now set the variables for building old libraries.
build_libtool_libs=no
oldlibs="$output"
- objs="$objs$old_deplibs"
+ func_append objs "$old_deplibs"
;;
lib)
# Make sure we only generate libraries of the form `libNAME.la'.
case $outputname in
lib*)
- name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+ func_stripname 'lib' '.la' "$outputname"
+ name=$func_stripname_result
eval shared_ext=\"$shrext_cmds\"
eval libname=\"$libname_spec\"
;;
*)
- if test "$module" = no; then
- $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
+ test "$module" = no && \
+ func_fatal_help "libtool library \`$output' must begin with \`lib'"
+
if test "$need_lib_prefix" != no; then
# Add the "lib" prefix for modules if required
- name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+ func_stripname '' '.la' "$outputname"
+ name=$func_stripname_result
eval shared_ext=\"$shrext_cmds\"
eval libname=\"$libname_spec\"
else
- libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+ func_stripname '' '.la' "$outputname"
+ libname=$func_stripname_result
fi
;;
esac
if test -n "$objs"; then
if test "$deplibs_check_method" != pass_all; then
- $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
- exit $EXIT_FAILURE
+ func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
else
- $echo
- $echo "*** Warning: Linking the shared library $output against the non-libtool"
- $echo "*** objects $objs is not portable!"
- libobjs="$libobjs $objs"
+ echo
+ $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
+ $ECHO "*** objects $objs is not portable!"
+ func_append libobjs " $objs"
fi
fi
- if test "$dlself" != no; then
- $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
- fi
+ test "$dlself" != no && \
+ func_warning "\`-dlopen self' is ignored for libtool libraries"
set dummy $rpath
- if test "$#" -gt 2; then
- $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
- fi
- install_libdir="$2"
+ shift
+ test "$#" -gt 1 && \
+ func_warning "ignoring multiple \`-rpath's for a libtool library"
+
+ install_libdir="$1"
oldlibs=
if test -z "$rpath"; then
@@ -3244,25 +7334,21 @@ EOF
build_old_libs=yes
fi
- if test -n "$vinfo"; then
- $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
- fi
+ test -n "$vinfo" && \
+ func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
- if test -n "$release"; then
- $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
- fi
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for convenience libraries"
else
# Parse the version information argument.
save_ifs="$IFS"; IFS=':'
set dummy $vinfo 0 0 0
+ shift
IFS="$save_ifs"
- if test -n "$8"; then
- $echo "$modename: too many parameters to \`-version-info'" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
+ test -n "$7" && \
+ func_fatal_help "too many parameters to \`-version-info'"
# convert absolute version numbers to libtool ages
# this retains compatibility with .la files and attempts
@@ -3270,9 +7356,9 @@ EOF
case $vinfo_number in
yes)
- number_major="$2"
- number_minor="$3"
- number_revision="$4"
+ number_major="$1"
+ number_minor="$2"
+ number_revision="$3"
#
# There are really only two kinds -- those that
# use the current revision as the major version
@@ -3282,17 +7368,19 @@ EOF
#
case $version_type in
darwin|linux|osf|windows|none)
- current=`expr $number_major + $number_minor`
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
age="$number_minor"
revision="$number_revision"
;;
- freebsd-aout|freebsd-elf|sunos)
+ freebsd-aout|freebsd-elf|qnx|sunos)
current="$number_major"
revision="$number_minor"
age="0"
;;
irix|nonstopux)
- current=`expr $number_major + $number_minor`
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
age="$number_minor"
revision="$number_minor"
lt_irix_increment=no
@@ -3300,9 +7388,9 @@ EOF
esac
;;
no)
- current="$2"
- revision="$3"
- age="$4"
+ current="$1"
+ revision="$2"
+ age="$3"
;;
esac
@@ -3310,34 +7398,30 @@ EOF
case $current in
0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
*)
- $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
- $echo "$modename: \`$vinfo' is not valid version information" 1>&2
- exit $EXIT_FAILURE
+ func_error "CURRENT \`$current' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
;;
esac
case $revision in
0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
*)
- $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
- $echo "$modename: \`$vinfo' is not valid version information" 1>&2
- exit $EXIT_FAILURE
+ func_error "REVISION \`$revision' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
;;
esac
case $age in
0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
*)
- $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
- $echo "$modename: \`$vinfo' is not valid version information" 1>&2
- exit $EXIT_FAILURE
+ func_error "AGE \`$age' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
;;
esac
if test "$age" -gt "$current"; then
- $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
- $echo "$modename: \`$vinfo' is not valid version information" 1>&2
- exit $EXIT_FAILURE
+ func_error "AGE \`$age' is greater than the current interface number \`$current'"
+ func_fatal_error "\`$vinfo' is not valid version information"
fi
# Calculate the version variables.
@@ -3350,10 +7434,12 @@ EOF
darwin)
# Like Linux, but with the current version available in
# verstring for coding it into the library header
- major=.`expr $current - $age`
+ func_arith $current - $age
+ major=.$func_arith_result
versuffix="$major.$age.$revision"
# Darwin ld doesn't like 0 for these options...
- minor_current=`expr $current + 1`
+ func_arith $current + 1
+ minor_current=$func_arith_result
xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
;;
@@ -3365,15 +7451,17 @@ EOF
freebsd-elf)
major=".$current"
- versuffix=".$current";
+ versuffix=".$current"
;;
irix | nonstopux)
if test "X$lt_irix_increment" = "Xno"; then
- major=`expr $current - $age`
+ func_arith $current - $age
else
- major=`expr $current - $age + 1`
+ func_arith $current - $age + 1
fi
+ major=$func_arith_result
+
case $version_type in
nonstopux) verstring_prefix=nonstopux ;;
*) verstring_prefix=sgi ;;
@@ -3383,8 +7471,10 @@ EOF
# Add in all the interfaces that we are compatible with.
loop=$revision
while test "$loop" -ne 0; do
- iface=`expr $revision - $loop`
- loop=`expr $loop - 1`
+ func_arith $revision - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
verstring="$verstring_prefix$major.$iface:$verstring"
done
@@ -3394,25 +7484,34 @@ EOF
;;
linux)
- major=.`expr $current - $age`
+ func_arith $current - $age
+ major=.$func_arith_result
versuffix="$major.$age.$revision"
;;
osf)
- major=.`expr $current - $age`
+ func_arith $current - $age
+ major=.$func_arith_result
versuffix=".$current.$age.$revision"
verstring="$current.$age.$revision"
# Add in all the interfaces that we are compatible with.
loop=$age
while test "$loop" -ne 0; do
- iface=`expr $current - $loop`
- loop=`expr $loop - 1`
+ func_arith $current - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
verstring="$verstring:${iface}.0"
done
# Make executables depend on our current version.
- verstring="$verstring:${current}.0"
+ func_append verstring ":${current}.0"
+ ;;
+
+ qnx)
+ major=".$current"
+ versuffix=".$current"
;;
sunos)
@@ -3423,14 +7522,13 @@ EOF
windows)
# Use '-' rather than '.', since we only want one
# extension on DOS 8.3 filesystems.
- major=`expr $current - $age`
+ func_arith $current - $age
+ major=$func_arith_result
versuffix="-$major"
;;
*)
- $echo "$modename: unknown library version type \`$version_type'" 1>&2
- $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
- exit $EXIT_FAILURE
+ func_fatal_configuration "unknown library version type \`$version_type'"
;;
esac
@@ -3464,7 +7562,7 @@ EOF
# Check to see if the archive will have undefined symbols.
if test "$allow_undefined" = yes; then
if test "$allow_undefined_flag" = unsupported; then
- $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
+ func_warning "undefined symbols not allowed in $host shared libraries"
build_libtool_libs=no
build_old_libs=yes
fi
@@ -3472,58 +7570,62 @@ EOF
# Don't allow undefined symbols.
allow_undefined_flag="$no_undefined_flag"
fi
+
fi
- if test "$mode" != relink; then
+ func_generate_dlsyms "$libname" "$libname" "yes"
+ func_append libobjs " $symfileobj"
+ test "X$libobjs" = "X " && libobjs=
+
+ if test "$opt_mode" != relink; then
# Remove our outputs, but don't remove object files since they
# may have been created when compiling PIC objects.
removelist=
- tempremovelist=`$echo "$output_objdir/*"`
+ tempremovelist=`$ECHO "$output_objdir/*"`
for p in $tempremovelist; do
case $p in
- *.$objext)
+ *.$objext | *.gcno)
;;
$output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
if test "X$precious_files_regex" != "X"; then
- if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
- then
+ if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+ then
continue
fi
fi
- removelist="$removelist $p"
+ func_append removelist " $p"
;;
*) ;;
esac
done
- if test -n "$removelist"; then
- $show "${rm}r $removelist"
- $run ${rm}r $removelist
- fi
+ test -n "$removelist" && \
+ func_show_eval "${RM}r \$removelist"
fi
# Now set the variables for building old libraries.
if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
- oldlibs="$oldlibs $output_objdir/$libname.$libext"
+ func_append oldlibs " $output_objdir/$libname.$libext"
# Transform .lo files to .o files.
- oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+ oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP`
fi
# Eliminate all temporary directories.
#for path in $notinst_path; do
- # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
- # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
- # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
+ # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"`
+ # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"`
+ # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"`
#done
if test -n "$xrpath"; then
# If the user specified any rpath flags, then add them.
temp_xrpath=
for libdir in $xrpath; do
- temp_xrpath="$temp_xrpath -R$libdir"
+ func_replace_sysroot "$libdir"
+ func_append temp_xrpath " -R$func_replace_sysroot_result"
case "$finalize_rpath " in
*" $libdir "*) ;;
- *) finalize_rpath="$finalize_rpath $libdir" ;;
+ *) func_append finalize_rpath " $libdir" ;;
esac
done
if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
@@ -3537,7 +7639,7 @@ EOF
for lib in $old_dlfiles; do
case " $dlprefiles $dlfiles " in
*" $lib "*) ;;
- *) dlfiles="$dlfiles $lib" ;;
+ *) func_append dlfiles " $lib" ;;
esac
done
@@ -3547,19 +7649,19 @@ EOF
for lib in $old_dlprefiles; do
case "$dlprefiles " in
*" $lib "*) ;;
- *) dlprefiles="$dlprefiles $lib" ;;
+ *) func_append dlprefiles " $lib" ;;
esac
done
if test "$build_libtool_libs" = yes; then
if test -n "$rpath"; then
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
# these systems don't actually have a c library (as such)!
;;
*-*-rhapsody* | *-*-darwin1.[012])
# Rhapsody C library is in the System framework
- deplibs="$deplibs -framework System"
+ func_append deplibs " System.ltframework"
;;
*-*-netbsd*)
# Don't link with libc until the a.out ld.so is fixed.
@@ -3573,10 +7675,10 @@ EOF
*-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
# Compiler inserts libc in the correct place for threads to work
;;
- *)
+ *)
# Add libc to deplibs on all other systems if necessary.
if test "$build_libtool_need_lc" = "yes"; then
- deplibs="$deplibs -lc"
+ func_append deplibs " -lc"
fi
;;
esac
@@ -3610,120 +7712,139 @@ EOF
# limits. Maybe even breaks it. We compile a program, linking it
# against the deplibs as a proxy for the library. Then we can check
# whether they linked in statically or dynamically with ldd.
- $rm conftest.c
+ $opt_dry_run || $RM conftest.c
cat > conftest.c <<EOF
int main() { return 0; }
EOF
- $rm conftest
+ $opt_dry_run || $RM conftest
if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
ldd_output=`ldd conftest`
for i in $deplibs; do
- name=`expr $i : '-l\(.*\)'`
- # If $name is empty we are operating on a -L argument.
- if test "$name" != "" && test "$name" != "0"; then
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
case " $predeps $postdeps " in
*" $i "*)
- newdeplibs="$newdeplibs $i"
+ func_append newdeplibs " $i"
i=""
;;
esac
- fi
+ fi
if test -n "$i" ; then
- libname=`eval \\$echo \"$libname_spec\"`
- deplib_matches=`eval \\$echo \"$library_names_spec\"`
- set dummy $deplib_matches
- deplib_match=$2
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
- newdeplibs="$newdeplibs $i"
+ func_append newdeplibs " $i"
else
droppeddeps=yes
- $echo
- $echo "*** Warning: dynamic linker does not accept needed library $i."
- $echo "*** I have the capability to make that library automatically link in when"
- $echo "*** you link to this library. But I can only do this if you have a"
- $echo "*** shared version of the library, which I believe you do not have"
- $echo "*** because a test_compile did reveal that the linker did not use it for"
- $echo "*** its dynamic dependency list that programs get resolved with at runtime."
+ echo
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which I believe you do not have"
+ echo "*** because a test_compile did reveal that the linker did not use it for"
+ echo "*** its dynamic dependency list that programs get resolved with at runtime."
fi
fi
- else
- newdeplibs="$newdeplibs $i"
- fi
+ ;;
+ *)
+ func_append newdeplibs " $i"
+ ;;
+ esac
done
else
# Error occurred in the first compile. Let's try to salvage
# the situation: Compile a separate program for each library.
for i in $deplibs; do
- name=`expr $i : '-l\(.*\)'`
- # If $name is empty we are operating on a -L argument.
- if test "$name" != "" && test "$name" != "0"; then
- $rm conftest
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ $opt_dry_run || $RM conftest
if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
ldd_output=`ldd conftest`
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
case " $predeps $postdeps " in
*" $i "*)
- newdeplibs="$newdeplibs $i"
+ func_append newdeplibs " $i"
i=""
;;
esac
fi
if test -n "$i" ; then
- libname=`eval \\$echo \"$libname_spec\"`
- deplib_matches=`eval \\$echo \"$library_names_spec\"`
- set dummy $deplib_matches
- deplib_match=$2
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
- newdeplibs="$newdeplibs $i"
+ func_append newdeplibs " $i"
else
droppeddeps=yes
- $echo
- $echo "*** Warning: dynamic linker does not accept needed library $i."
- $echo "*** I have the capability to make that library automatically link in when"
- $echo "*** you link to this library. But I can only do this if you have a"
- $echo "*** shared version of the library, which you do not appear to have"
- $echo "*** because a test_compile did reveal that the linker did not use this one"
- $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
+ echo
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because a test_compile did reveal that the linker did not use this one"
+ echo "*** as a dynamic dependency that programs can get resolved with at runtime."
fi
fi
else
droppeddeps=yes
- $echo
- $echo "*** Warning! Library $i is needed by this library but I was not able to"
- $echo "*** make it link in! You will probably need to install it or some"
- $echo "*** library that it depends on before this library will be fully"
- $echo "*** functional. Installing it before continuing would be even better."
+ echo
+ $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
+ echo "*** make it link in! You will probably need to install it or some"
+ echo "*** library that it depends on before this library will be fully"
+ echo "*** functional. Installing it before continuing would be even better."
fi
- else
- newdeplibs="$newdeplibs $i"
- fi
+ ;;
+ *)
+ func_append newdeplibs " $i"
+ ;;
+ esac
done
fi
;;
file_magic*)
- set dummy $deplibs_check_method
- file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+ set dummy $deplibs_check_method; shift
+ file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
for a_deplib in $deplibs; do
- name=`expr $a_deplib : '-l\(.*\)'`
- # If $name is empty we are operating on a -L argument.
- if test "$name" != "" && test "$name" != "0"; then
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
case " $predeps $postdeps " in
*" $a_deplib "*)
- newdeplibs="$newdeplibs $a_deplib"
+ func_append newdeplibs " $a_deplib"
a_deplib=""
;;
esac
fi
if test -n "$a_deplib" ; then
- libname=`eval \\$echo \"$libname_spec\"`
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ if test -n "$file_magic_glob"; then
+ libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
+ else
+ libnameglob=$libname
+ fi
+ test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob`
for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
- potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ if test "$want_nocaseglob" = yes; then
+ shopt -s nocaseglob
+ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+ $nocaseglob
+ else
+ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+ fi
for potent_lib in $potential_libs; do
# Follow soft links.
- if ls -lLd "$potent_lib" 2>/dev/null \
- | grep " -> " >/dev/null; then
+ if ls -lLd "$potent_lib" 2>/dev/null |
+ $GREP " -> " >/dev/null; then
continue
fi
# The statement above tries to avoid entering an
@@ -3736,13 +7857,13 @@ EOF
potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
case $potliblink in
[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
- *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+ *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";;
esac
done
- if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
- | ${SED} 10q \
- | $EGREP "$file_magic_regex" > /dev/null; then
- newdeplibs="$newdeplibs $a_deplib"
+ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
+ $SED -e 10q |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ func_append newdeplibs " $a_deplib"
a_deplib=""
break 2
fi
@@ -3751,50 +7872,52 @@ EOF
fi
if test -n "$a_deplib" ; then
droppeddeps=yes
- $echo
- $echo "*** Warning: linker path does not have real file for library $a_deplib."
- $echo "*** I have the capability to make that library automatically link in when"
- $echo "*** you link to this library. But I can only do this if you have a"
- $echo "*** shared version of the library, which you do not appear to have"
- $echo "*** because I did check the linker path looking for a file starting"
+ echo
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because I did check the linker path looking for a file starting"
if test -z "$potlib" ; then
- $echo "*** with $libname but no candidates were found. (...for file magic test)"
+ $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
else
- $echo "*** with $libname and none of the candidates passed a file format test"
- $echo "*** using a file magic. Last file checked: $potlib"
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a file magic. Last file checked: $potlib"
fi
fi
- else
+ ;;
+ *)
# Add a -L argument.
- newdeplibs="$newdeplibs $a_deplib"
- fi
+ func_append newdeplibs " $a_deplib"
+ ;;
+ esac
done # Gone through all deplibs.
;;
match_pattern*)
- set dummy $deplibs_check_method
- match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
for a_deplib in $deplibs; do
- name=`expr $a_deplib : '-l\(.*\)'`
- # If $name is empty we are operating on a -L argument.
- if test -n "$name" && test "$name" != "0"; then
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
case " $predeps $postdeps " in
*" $a_deplib "*)
- newdeplibs="$newdeplibs $a_deplib"
+ func_append newdeplibs " $a_deplib"
a_deplib=""
;;
esac
fi
if test -n "$a_deplib" ; then
- libname=`eval \\$echo \"$libname_spec\"`
+ libname=`eval "\\$ECHO \"$libname_spec\""`
for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
for potent_lib in $potential_libs; do
potlib="$potent_lib" # see symlink-check above in file_magic test
- if eval $echo \"$potent_lib\" 2>/dev/null \
- | ${SED} 10q \
- | $EGREP "$match_pattern_regex" > /dev/null; then
- newdeplibs="$newdeplibs $a_deplib"
+ if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
+ $EGREP "$match_pattern_regex" > /dev/null; then
+ func_append newdeplibs " $a_deplib"
a_deplib=""
break 2
fi
@@ -3803,46 +7926,48 @@ EOF
fi
if test -n "$a_deplib" ; then
droppeddeps=yes
- $echo
- $echo "*** Warning: linker path does not have real file for library $a_deplib."
- $echo "*** I have the capability to make that library automatically link in when"
- $echo "*** you link to this library. But I can only do this if you have a"
- $echo "*** shared version of the library, which you do not appear to have"
- $echo "*** because I did check the linker path looking for a file starting"
+ echo
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because I did check the linker path looking for a file starting"
if test -z "$potlib" ; then
- $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
+ $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
else
- $echo "*** with $libname and none of the candidates passed a file format test"
- $echo "*** using a regex pattern. Last file checked: $potlib"
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a regex pattern. Last file checked: $potlib"
fi
fi
- else
+ ;;
+ *)
# Add a -L argument.
- newdeplibs="$newdeplibs $a_deplib"
- fi
+ func_append newdeplibs " $a_deplib"
+ ;;
+ esac
done # Gone through all deplibs.
;;
none | unknown | *)
newdeplibs=""
- tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
- -e 's/ -[LR][^ ]*//g'`
+ tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
for i in $predeps $postdeps ; do
# can't use Xsed below, because $i might contain '/'
- tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
+ tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"`
done
fi
- if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \
- | grep . >/dev/null; then
- $echo
+ case $tmp_deplibs in
+ *[!\ \ ]*)
+ echo
if test "X$deplibs_check_method" = "Xnone"; then
- $echo "*** Warning: inter-library dependencies are not supported in this platform."
+ echo "*** Warning: inter-library dependencies are not supported in this platform."
else
- $echo "*** Warning: inter-library dependencies are not known to be supported."
+ echo "*** Warning: inter-library dependencies are not known to be supported."
fi
- $echo "*** All declared inter-library dependencies are being dropped."
+ echo "*** All declared inter-library dependencies are being dropped."
droppeddeps=yes
- fi
+ ;;
+ esac
;;
esac
versuffix=$versuffix_save
@@ -3853,24 +7978,24 @@ EOF
case $host in
*-*-rhapsody* | *-*-darwin1.[012])
- # On Rhapsody replace the C library is the System framework
- newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
+ # On Rhapsody replace the C library with the System framework
+ newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'`
;;
esac
if test "$droppeddeps" = yes; then
if test "$module" = yes; then
- $echo
- $echo "*** Warning: libtool could not satisfy all declared inter-library"
- $echo "*** dependencies of module $libname. Therefore, libtool will create"
- $echo "*** a static module, that should work as long as the dlopening"
- $echo "*** application is linked with the -dlopen flag."
+ echo
+ echo "*** Warning: libtool could not satisfy all declared inter-library"
+ $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
+ echo "*** a static module, that should work as long as the dlopening"
+ echo "*** application is linked with the -dlopen flag."
if test -z "$global_symbol_pipe"; then
- $echo
- $echo "*** However, this would only work if libtool was able to extract symbol"
- $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
- $echo "*** not find such a program. So, this module is probably useless."
- $echo "*** \`nm' from GNU binutils and a full rebuild may help."
+ echo
+ echo "*** However, this would only work if libtool was able to extract symbol"
+ echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ echo "*** not find such a program. So, this module is probably useless."
+ echo "*** \`nm' from GNU binutils and a full rebuild may help."
fi
if test "$build_old_libs" = no; then
oldlibs="$output_objdir/$libname.$libext"
@@ -3880,16 +8005,16 @@ EOF
build_libtool_libs=no
fi
else
- $echo "*** The inter-library dependencies that have been dropped here will be"
- $echo "*** automatically added whenever a program is linked with this library"
- $echo "*** or is declared to -dlopen it."
+ echo "*** The inter-library dependencies that have been dropped here will be"
+ echo "*** automatically added whenever a program is linked with this library"
+ echo "*** or is declared to -dlopen it."
if test "$allow_undefined" = no; then
- $echo
- $echo "*** Since this library must not contain undefined symbols,"
- $echo "*** because either the platform does not support them or"
- $echo "*** it was explicitly requested with -no-undefined,"
- $echo "*** libtool will only create a static version of it."
+ echo
+ echo "*** Since this library must not contain undefined symbols,"
+ echo "*** because either the platform does not support them or"
+ echo "*** it was explicitly requested with -no-undefined,"
+ echo "*** libtool will only create a static version of it."
if test "$build_old_libs" = no; then
oldlibs="$output_objdir/$libname.$libext"
build_libtool_libs=module
@@ -3903,7 +8028,14 @@ EOF
# Done checking deplibs!
deplibs=$newdeplibs
fi
-
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ case $host in
+ *-*-darwin*)
+ newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
# move library search paths that coincide with paths to not yet
# installed libraries to the beginning of the library search list
@@ -3914,7 +8046,7 @@ EOF
*)
case " $deplibs " in
*" -L$path/$objdir "*)
- new_libs="$new_libs -L$path/$objdir" ;;
+ func_append new_libs " -L$path/$objdir" ;;
esac
;;
esac
@@ -3924,15 +8056,14 @@ EOF
-L*)
case " $new_libs " in
*" $deplib "*) ;;
- *) new_libs="$new_libs $deplib" ;;
+ *) func_append new_libs " $deplib" ;;
esac
;;
- *) new_libs="$new_libs $deplib" ;;
+ *) func_append new_libs " $deplib" ;;
esac
done
deplibs="$new_libs"
-
# All the library-specific variables (install_libdir is set above).
library_names=
old_library=
@@ -3945,10 +8076,12 @@ EOF
hardcode_libdirs=
dep_rpath=
rpath="$finalize_rpath"
- test "$mode" != relink && rpath="$compile_rpath$rpath"
+ test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
for libdir in $rpath; do
if test -n "$hardcode_libdir_flag_spec"; then
if test -n "$hardcode_libdir_separator"; then
+ func_replace_sysroot "$libdir"
+ libdir=$func_replace_sysroot_result
if test -z "$hardcode_libdirs"; then
hardcode_libdirs="$libdir"
else
@@ -3957,18 +8090,18 @@ EOF
*"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
;;
*)
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
;;
esac
fi
else
eval flag=\"$hardcode_libdir_flag_spec\"
- dep_rpath="$dep_rpath $flag"
+ func_append dep_rpath " $flag"
fi
elif test -n "$runpath_var"; then
case "$perm_rpath " in
*" $libdir "*) ;;
- *) perm_rpath="$perm_rpath $libdir" ;;
+ *) func_apped perm_rpath " $libdir" ;;
esac
fi
done
@@ -3977,10 +8110,7 @@ EOF
test -n "$hardcode_libdirs"; then
libdir="$hardcode_libdirs"
if test -n "$hardcode_libdir_flag_spec_ld"; then
- case $archive_cmds in
- *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;;
- *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;;
- esac
+ eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
else
eval dep_rpath=\"$hardcode_libdir_flag_spec\"
fi
@@ -3989,7 +8119,7 @@ EOF
# We should set the runpath_var.
rpath=
for dir in $perm_rpath; do
- rpath="$rpath$dir:"
+ func_append rpath "$dir:"
done
eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
fi
@@ -3997,7 +8127,7 @@ EOF
fi
shlibpath="$finalize_shlibpath"
- test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+ test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
if test -n "$shlibpath"; then
eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
fi
@@ -4006,8 +8136,9 @@ EOF
eval shared_ext=\"$shrext_cmds\"
eval library_names=\"$library_names_spec\"
set dummy $library_names
- realname="$2"
- shift; shift
+ shift
+ realname="$1"
+ shift
if test -n "$soname_spec"; then
eval soname=\"$soname_spec\"
@@ -4022,83 +8153,166 @@ EOF
linknames=
for link
do
- linknames="$linknames $link"
+ func_append linknames " $link"
done
# Use standard objects if they are pic
- test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ test "X$libobjs" = "X " && libobjs=
+
+ delfiles=
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
+ export_symbols="$output_objdir/$libname.uexp"
+ func_append delfiles " $export_symbols"
+ fi
+
+ orig_export_symbols=
+ case $host_os in
+ cygwin* | mingw* | cegcc*)
+ if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
+ # exporting using user supplied symfile
+ if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
+ # and it's NOT already a .def file. Must figure out
+ # which of the given symbols are data symbols and tag
+ # them as such. So, trigger use of export_symbols_cmds.
+ # export_symbols gets reassigned inside the "prepare
+ # the list of exported symbols" if statement, so the
+ # include_expsyms logic still works.
+ orig_export_symbols="$export_symbols"
+ export_symbols=
+ always_export_symbols=yes
+ fi
+ fi
+ ;;
+ esac
# Prepare the list of exported symbols
if test -z "$export_symbols"; then
if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
- $show "generating symbol list for \`$libname.la'"
+ func_verbose "generating symbol list for \`$libname.la'"
export_symbols="$output_objdir/$libname.exp"
- $run $rm $export_symbols
+ $opt_dry_run || $RM $export_symbols
cmds=$export_symbols_cmds
save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
+ for cmd1 in $cmds; do
IFS="$save_ifs"
- eval cmd=\"$cmd\"
- if len=`expr "X$cmd" : ".*"` &&
- test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
- $show "$cmd"
- $run eval "$cmd" || exit $?
- skipped_export=false
+ # Take the normal branch if the nm_file_list_spec branch
+ # doesn't work or if tool conversion is not needed.
+ case $nm_file_list_spec~$to_tool_file_cmd in
+ *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)
+ try_normal_branch=yes
+ eval cmd=\"$cmd1\"
+ func_len " $cmd"
+ len=$func_len_result
+ ;;
+ *)
+ try_normal_branch=no
+ ;;
+ esac
+ if test "$try_normal_branch" = yes \
+ && { test "$len" -lt "$max_cmd_len" \
+ || test "$max_cmd_len" -le -1; }
+ then
+ func_show_eval "$cmd" 'exit $?'
+ skipped_export=false
+ elif test -n "$nm_file_list_spec"; then
+ func_basename "$output"
+ output_la=$func_basename_result
+ save_libobjs=$libobjs
+ save_output=$output
+ output=${output_objdir}/${output_la}.nm
+ func_to_tool_file "$output"
+ libobjs=$nm_file_list_spec$func_to_tool_file_result
+ func_append delfiles " $output"
+ func_verbose "creating $NM input file list: $output"
+ for obj in $save_libobjs; do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result"
+ done > "$output"
+ eval cmd=\"$cmd1\"
+ func_show_eval "$cmd" 'exit $?'
+ output=$save_output
+ libobjs=$save_libobjs
+ skipped_export=false
else
- # The command line is too long to execute in one step.
- $show "using reloadable object file for export list..."
- skipped_export=:
+ # The command line is too long to execute in one step.
+ func_verbose "using reloadable object file for export list..."
+ skipped_export=:
# Break out early, otherwise skipped_export may be
# set to false by a later but shorter cmd.
break
fi
done
IFS="$save_ifs"
- if test -n "$export_symbols_regex"; then
- $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
- $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
- $show "$mv \"${export_symbols}T\" \"$export_symbols\""
- $run eval '$mv "${export_symbols}T" "$export_symbols"'
+ if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
fi
fi
fi
if test -n "$export_symbols" && test -n "$include_expsyms"; then
- $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
+ tmp_export_symbols="$export_symbols"
+ test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ func_append delfiles " $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
fi
tmp_deplibs=
for test_deplib in $deplibs; do
- case " $convenience " in
- *" $test_deplib "*) ;;
- *)
- tmp_deplibs="$tmp_deplibs $test_deplib"
- ;;
- esac
+ case " $convenience " in
+ *" $test_deplib "*) ;;
+ *)
+ func_append tmp_deplibs " $test_deplib"
+ ;;
+ esac
done
deplibs="$tmp_deplibs"
if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec" &&
+ test "$compiler_needs_object" = yes &&
+ test -z "$libobjs"; then
+ # extract the archives, so we have objects to list.
+ # TODO: could optimize this to just extract one archive.
+ whole_archive_flag_spec=
+ fi
if test -n "$whole_archive_flag_spec"; then
save_libobjs=$libobjs
eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
else
gentop="$output_objdir/${outputname}x"
- generated="$generated $gentop"
+ func_append generated " $gentop"
func_extract_archives $gentop $convenience
- libobjs="$libobjs $func_extract_archives_result"
+ func_append libobjs " $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
fi
fi
-
+
if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
eval flag=\"$thread_safe_flag_spec\"
- linker_flags="$linker_flags $flag"
+ func_append linker_flags " $flag"
fi
# Make a backup of the uninstalled library when relinking
- if test "$mode" = relink; then
- $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
+ if test "$opt_mode" = relink; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
fi
# Do each of the archive commands.
@@ -4111,22 +8325,24 @@ EOF
cmds=$module_cmds
fi
else
- if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
- eval test_cmds=\"$archive_expsym_cmds\"
- cmds=$archive_expsym_cmds
- else
- eval test_cmds=\"$archive_cmds\"
- cmds=$archive_cmds
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ eval test_cmds=\"$archive_expsym_cmds\"
+ cmds=$archive_expsym_cmds
+ else
+ eval test_cmds=\"$archive_cmds\"
+ cmds=$archive_cmds
fi
fi
if test "X$skipped_export" != "X:" &&
- len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
- test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ func_len " $test_cmds" &&
+ len=$func_len_result &&
+ test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
:
else
- # The command line is too long to link in one step, link piecewise.
- $echo "creating reloadable object files..."
+ # The command line is too long to link in one step, link piecewise
+ # or, if using GNU ld and skipped_export is not :, use a linker
+ # script.
# Save the value of $output and $libobjs because we want to
# use them later. If we have whole_archive_flag_spec, we
@@ -4140,77 +8356,171 @@ EOF
save_libobjs=$libobjs
fi
save_output=$output
- output_la=`$echo "X$output" | $Xsed -e "$basename"`
+ func_basename "$output"
+ output_la=$func_basename_result
# Clear the reloadable object creation command queue and
# initialize k to one.
test_cmds=
concat_cmds=
objlist=
- delfiles=
last_robj=
k=1
- output=$output_objdir/$output_la-${k}.$objext
- # Loop over the list of objects to be linked.
- for obj in $save_libobjs
- do
- eval test_cmds=\"$reload_cmds $objlist $last_robj\"
- if test "X$objlist" = X ||
- { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
- test "$len" -le "$max_cmd_len"; }; then
- objlist="$objlist $obj"
+
+ if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
+ output=${output_objdir}/${output_la}.lnkscript
+ func_verbose "creating GNU ld script: $output"
+ echo 'INPUT (' > $output
+ for obj in $save_libobjs
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result" >> $output
+ done
+ echo ')' >> $output
+ func_append delfiles " $output"
+ func_to_tool_file "$output"
+ output=$func_to_tool_file_result
+ elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
+ output=${output_objdir}/${output_la}.lnk
+ func_verbose "creating linker input file list: $output"
+ : > $output
+ set x $save_libobjs
+ shift
+ firstobj=
+ if test "$compiler_needs_object" = yes; then
+ firstobj="$1 "
+ shift
+ fi
+ for obj
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result" >> $output
+ done
+ func_append delfiles " $output"
+ func_to_tool_file "$output"
+ output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
+ else
+ if test -n "$save_libobjs"; then
+ func_verbose "creating reloadable object files..."
+ output=$output_objdir/$output_la-${k}.$objext
+ eval test_cmds=\"$reload_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+
+ # Loop over the list of objects to be linked.
+ for obj in $save_libobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ if test "X$objlist" = X ||
+ test "$len" -lt "$max_cmd_len"; then
+ func_append objlist " $obj"
+ else
+ # The command $test_cmds is almost too long, add a
+ # command to the queue.
+ if test "$k" -eq 1 ; then
+ # The first file doesn't have a previous command to add.
+ reload_objs=$objlist
+ eval concat_cmds=\"$reload_cmds\"
+ else
+ # All subsequent reloadable object files will link in
+ # the last one created.
+ reload_objs="$objlist $last_robj"
+ eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
+ fi
+ last_robj=$output_objdir/$output_la-${k}.$objext
+ func_arith $k + 1
+ k=$func_arith_result
+ output=$output_objdir/$output_la-${k}.$objext
+ objlist=" $obj"
+ func_len " $last_robj"
+ func_arith $len0 + $func_len_result
+ len=$func_arith_result
+ fi
+ done
+ # Handle the remaining objects by creating one last
+ # reloadable object file. All subsequent reloadable object
+ # files will link in the last one created.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ reload_objs="$objlist $last_robj"
+ eval concat_cmds=\"\${concat_cmds}$reload_cmds\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
+ fi
+ func_append delfiles " $output"
+
else
- # The command $test_cmds is almost too long, add a
- # command to the queue.
- if test "$k" -eq 1 ; then
- # The first file doesn't have a previous command to add.
- eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
- else
- # All subsequent reloadable object files will link in
- # the last one created.
- eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
+ output=
+ fi
+
+ if ${skipped_export-false}; then
+ func_verbose "generating symbol list for \`$libname.la'"
+ export_symbols="$output_objdir/$libname.exp"
+ $opt_dry_run || $RM $export_symbols
+ libobjs=$output
+ # Append the command to create the export file.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
fi
- last_robj=$output_objdir/$output_la-${k}.$objext
- k=`expr $k + 1`
- output=$output_objdir/$output_la-${k}.$objext
- objlist=$obj
- len=1
fi
- done
- # Handle the remaining objects by creating one last
- # reloadable object file. All subsequent reloadable object
- # files will link in the last one created.
- test -z "$concat_cmds" || concat_cmds=$concat_cmds~
- eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
-
- if ${skipped_export-false}; then
- $show "generating symbol list for \`$libname.la'"
- export_symbols="$output_objdir/$libname.exp"
- $run $rm $export_symbols
- libobjs=$output
- # Append the command to create the export file.
- eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
- fi
- # Set up a command to remove the reloadable object files
- # after they are used.
- i=0
- while test "$i" -lt "$k"
- do
- i=`expr $i + 1`
- delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
- done
+ test -n "$save_libobjs" &&
+ func_verbose "creating a temporary reloadable object file: $output"
- $echo "creating a temporary reloadable object file: $output"
+ # Loop through the commands generated above and execute them.
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $concat_cmds; do
+ IFS="$save_ifs"
+ $opt_silent || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test "$opt_mode" = relink; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
- # Loop through the commands generated above and execute them.
- save_ifs="$IFS"; IFS='~'
- for cmd in $concat_cmds; do
+ exit $lt_exit
+ }
+ done
IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
+
+ if test -n "$export_symbols_regex" && ${skipped_export-false}; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+
+ if ${skipped_export-false}; then
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols="$export_symbols"
+ test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ func_append delfiles " $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+ fi
libobjs=$output
# Restore the value of output.
@@ -4218,6 +8528,7 @@ EOF
if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
fi
# Expand the library linking commands again to reset the
# value of $libobjs for piecewise linking.
@@ -4230,28 +8541,45 @@ EOF
cmds=$module_cmds
fi
else
- if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
- cmds=$archive_expsym_cmds
- else
- cmds=$archive_cmds
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ cmds=$archive_expsym_cmds
+ else
+ cmds=$archive_cmds
fi
fi
+ fi
+
+ if test -n "$delfiles"; then
+ # Append the command to remove temporary files to $cmds.
+ eval cmds=\"\$cmds~\$RM $delfiles\"
+ fi
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop="$output_objdir/${outputname}x"
+ func_append generated " $gentop"
- # Append the command to remove the reloadable object files
- # to the just-reset $cmds.
- eval cmds=\"\$cmds~\$rm $delfiles\"
+ func_extract_archives $gentop $dlprefiles
+ func_append libobjs " $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
fi
+
save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
eval cmd=\"$cmd\"
- $show "$cmd"
- $run eval "$cmd" || {
+ $opt_silent || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
lt_exit=$?
# Restore the uninstalled library and exit
- if test "$mode" = relink; then
- $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
+ if test "$opt_mode" = relink; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
fi
exit $lt_exit
@@ -4260,13 +8588,12 @@ EOF
IFS="$save_ifs"
# Restore the uninstalled library and exit
- if test "$mode" = relink; then
- $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
+ if test "$opt_mode" = relink; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
if test -n "$convenience"; then
if test -z "$whole_archive_flag_spec"; then
- $show "${rm}r $gentop"
- $run ${rm}r "$gentop"
+ func_show_eval '${RM}r "$gentop"'
fi
fi
@@ -4276,8 +8603,7 @@ EOF
# Create links to the real library.
for linkname in $linknames; do
if test "$realname" != "$linkname"; then
- $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
- $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
+ func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
fi
done
@@ -4290,38 +8616,35 @@ EOF
;;
obj)
- if test -n "$deplibs"; then
- $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
- fi
-
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
- $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
+ func_warning "\`-dlopen' is ignored for objects"
fi
- if test -n "$rpath"; then
- $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
- fi
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "\`-l' and \`-L' are ignored for objects" ;;
+ esac
- if test -n "$xrpath"; then
- $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
- fi
+ test -n "$rpath" && \
+ func_warning "\`-rpath' is ignored for objects"
- if test -n "$vinfo"; then
- $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
- fi
+ test -n "$xrpath" && \
+ func_warning "\`-R' is ignored for objects"
- if test -n "$release"; then
- $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
- fi
+ test -n "$vinfo" && \
+ func_warning "\`-version-info' is ignored for objects"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for objects"
case $output in
*.lo)
- if test -n "$objs$old_deplibs"; then
- $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
- exit $EXIT_FAILURE
- fi
- libobj="$output"
- obj=`$echo "X$output" | $Xsed -e "$lo2o"`
+ test -n "$objs$old_deplibs" && \
+ func_fatal_error "cannot build library object \`$output' from non-libtool objects"
+
+ libobj=$output
+ func_lo2o "$libobj"
+ obj=$func_lo2o_result
;;
*)
libobj=
@@ -4330,7 +8653,7 @@ EOF
esac
# Delete the old objects.
- $run $rm $obj $libobj
+ $opt_dry_run || $RM $obj $libobj
# Objects from convenience libraries. This assumes
# single-version convenience libraries. Whenever we create
@@ -4346,35 +8669,29 @@ EOF
if test -n "$convenience"; then
if test -n "$whole_archive_flag_spec"; then
eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
- reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
+ reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
else
gentop="$output_objdir/${obj}x"
- generated="$generated $gentop"
+ func_append generated " $gentop"
func_extract_archives $gentop $convenience
reload_conv_objs="$reload_objs $func_extract_archives_result"
fi
fi
+ # If we're not building shared, we need to use non_pic_objs
+ test "$build_libtool_libs" != yes && libobjs="$non_pic_objects"
+
# Create the old-style object.
- reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+ reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
output="$obj"
- cmds=$reload_cmds
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
+ func_execute_cmds "$reload_cmds" 'exit $?'
# Exit if we aren't doing a library object file.
if test -z "$libobj"; then
if test -n "$gentop"; then
- $show "${rm}r $gentop"
- $run ${rm}r $gentop
+ func_show_eval '${RM}r "$gentop"'
fi
exit $EXIT_SUCCESS
@@ -4382,14 +8699,13 @@ EOF
if test "$build_libtool_libs" != yes; then
if test -n "$gentop"; then
- $show "${rm}r $gentop"
- $run ${rm}r $gentop
+ func_show_eval '${RM}r "$gentop"'
fi
# Create an invalid libtool object if no PIC, so that we don't
# accidentally link it into a program.
# $show "echo timestamp > $libobj"
- # $run eval "echo timestamp > $libobj" || exit $?
+ # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
exit $EXIT_SUCCESS
fi
@@ -4397,20 +8713,11 @@ EOF
# Only do commands if we really have different PIC objects.
reload_objs="$libobjs $reload_conv_objs"
output="$libobj"
- cmds=$reload_cmds
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
+ func_execute_cmds "$reload_cmds" 'exit $?'
fi
if test -n "$gentop"; then
- $show "${rm}r $gentop"
- $run ${rm}r $gentop
+ func_show_eval '${RM}r "$gentop"'
fi
exit $EXIT_SUCCESS
@@ -4418,39 +8725,45 @@ EOF
prog)
case $host in
- *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
+ *cygwin*) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result.exe;;
esac
- if test -n "$vinfo"; then
- $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
- fi
+ test -n "$vinfo" && \
+ func_warning "\`-version-info' is ignored for programs"
- if test -n "$release"; then
- $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
- fi
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for programs"
- if test "$preload" = yes; then
- if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
- test "$dlopen_self_static" = unknown; then
- $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
- fi
- fi
+ test "$preload" = yes \
+ && test "$dlopen_support" = unknown \
+ && test "$dlopen_self" = unknown \
+ && test "$dlopen_self_static" = unknown && \
+ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
case $host in
*-*-rhapsody* | *-*-darwin1.[012])
# On Rhapsody replace the C library is the System framework
- compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
- finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
+ compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'`
+ finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'`
;;
esac
case $host in
- *darwin*)
- # Don't allow lazy linking, it breaks C++ global constructors
- if test "$tagname" = CXX ; then
- compile_command="$compile_command ${wl}-bind_at_load"
- finalize_command="$finalize_command ${wl}-bind_at_load"
- fi
- ;;
+ *-*-darwin*)
+ # Don't allow lazy linking, it breaks C++ global constructors
+ # But is supposedly fixed on 10.4 or later (yay!).
+ if test "$tagname" = CXX ; then
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+ 10.[0123])
+ func_append compile_command " ${wl}-bind_at_load"
+ func_append finalize_command " ${wl}-bind_at_load"
+ ;;
+ esac
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
esac
@@ -4463,7 +8776,7 @@ EOF
*)
case " $compile_deplibs " in
*" -L$path/$objdir "*)
- new_libs="$new_libs -L$path/$objdir" ;;
+ func_append new_libs " -L$path/$objdir" ;;
esac
;;
esac
@@ -4473,17 +8786,17 @@ EOF
-L*)
case " $new_libs " in
*" $deplib "*) ;;
- *) new_libs="$new_libs $deplib" ;;
+ *) func_append new_libs " $deplib" ;;
esac
;;
- *) new_libs="$new_libs $deplib" ;;
+ *) func_append new_libs " $deplib" ;;
esac
done
compile_deplibs="$new_libs"
- compile_command="$compile_command $compile_deplibs"
- finalize_command="$finalize_command $finalize_deplibs"
+ func_append compile_command " $compile_deplibs"
+ func_append finalize_command " $finalize_deplibs"
if test -n "$rpath$xrpath"; then
# If the user specified any rpath flags, then add them.
@@ -4491,7 +8804,7 @@ EOF
# This is the magic to use -rpath.
case "$finalize_rpath " in
*" $libdir "*) ;;
- *) finalize_rpath="$finalize_rpath $libdir" ;;
+ *) func_append finalize_rpath " $libdir" ;;
esac
done
fi
@@ -4510,30 +8823,32 @@ EOF
*"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
;;
*)
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
;;
esac
fi
else
eval flag=\"$hardcode_libdir_flag_spec\"
- rpath="$rpath $flag"
+ func_append rpath " $flag"
fi
elif test -n "$runpath_var"; then
case "$perm_rpath " in
*" $libdir "*) ;;
- *) perm_rpath="$perm_rpath $libdir" ;;
+ *) func_append perm_rpath " $libdir" ;;
esac
fi
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
- testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
case :$dllsearchpath: in
*":$libdir:"*) ;;
- *) dllsearchpath="$dllsearchpath:$libdir";;
+ ::) dllsearchpath=$libdir;;
+ *) func_append dllsearchpath ":$libdir";;
esac
case :$dllsearchpath: in
*":$testbindir:"*) ;;
- *) dllsearchpath="$dllsearchpath:$testbindir";;
+ ::) dllsearchpath=$testbindir;;
+ *) func_append dllsearchpath ":$testbindir";;
esac
;;
esac
@@ -4559,18 +8874,18 @@ EOF
*"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
;;
*)
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
;;
esac
fi
else
eval flag=\"$hardcode_libdir_flag_spec\"
- rpath="$rpath $flag"
+ func_append rpath " $flag"
fi
elif test -n "$runpath_var"; then
case "$finalize_perm_rpath " in
*" $libdir "*) ;;
- *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+ *) func_append finalize_perm_rpath " $libdir" ;;
esac
fi
done
@@ -4584,284 +8899,57 @@ EOF
if test -n "$libobjs" && test "$build_old_libs" = yes; then
# Transform all the library objects into standard objects.
- compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
- finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
fi
- dlsyms=
- if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
- if test -n "$NM" && test -n "$global_symbol_pipe"; then
- dlsyms="${outputname}S.c"
- else
- $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
- fi
- fi
-
- if test -n "$dlsyms"; then
- case $dlsyms in
- "") ;;
- *.c)
- # Discover the nlist of each of the dlfiles.
- nlist="$output_objdir/${outputname}.nm"
-
- $show "$rm $nlist ${nlist}S ${nlist}T"
- $run $rm "$nlist" "${nlist}S" "${nlist}T"
-
- # Parse the name list into a source file.
- $show "creating $output_objdir/$dlsyms"
-
- test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
-/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
-/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
-
-#ifdef __cplusplus
-extern \"C\" {
-#endif
-
-/* Prevent the only kind of declaration conflicts we can make. */
-#define lt_preloaded_symbols some_other_symbol
-
-/* External symbol declarations for the compiler. */\
-"
-
- if test "$dlself" = yes; then
- $show "generating symbol list for \`$output'"
-
- test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
-
- # Add our own program objects to the symbol list.
- progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
- for arg in $progfiles; do
- $show "extracting global C symbols from \`$arg'"
- $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
- done
-
- if test -n "$exclude_expsyms"; then
- $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
- $run eval '$mv "$nlist"T "$nlist"'
- fi
-
- if test -n "$export_symbols_regex"; then
- $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
- $run eval '$mv "$nlist"T "$nlist"'
- fi
-
- # Prepare the list of exported symbols
- if test -z "$export_symbols"; then
- export_symbols="$output_objdir/$outputname.exp"
- $run $rm $export_symbols
- $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
- case $host in
- *cygwin* | *mingw* )
- $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
- $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
- ;;
- esac
- else
- $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
- $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
- $run eval 'mv "$nlist"T "$nlist"'
- case $host in
- *cygwin* | *mingw* )
- $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
- $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
- ;;
- esac
- fi
- fi
-
- for arg in $dlprefiles; do
- $show "extracting global C symbols from \`$arg'"
- name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
- $run eval '$echo ": $name " >> "$nlist"'
- $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
- done
-
- if test -z "$run"; then
- # Make sure we have at least an empty file.
- test -f "$nlist" || : > "$nlist"
-
- if test -n "$exclude_expsyms"; then
- $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
- $mv "$nlist"T "$nlist"
- fi
-
- # Try sorting and uniquifying the output.
- if grep -v "^: " < "$nlist" |
- if sort -k 3 </dev/null >/dev/null 2>&1; then
- sort -k 3
- else
- sort +2
- fi |
- uniq > "$nlist"S; then
- :
- else
- grep -v "^: " < "$nlist" > "$nlist"S
- fi
-
- if test -f "$nlist"S; then
- eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
- else
- $echo '/* NONE */' >> "$output_objdir/$dlsyms"
- fi
-
- $echo >> "$output_objdir/$dlsyms" "\
-
-#undef lt_preloaded_symbols
-
-#if defined (__STDC__) && __STDC__
-# define lt_ptr void *
-#else
-# define lt_ptr char *
-# define const
-#endif
-
-/* The mapping between symbol names and symbols. */
-"
-
- case $host in
- *cygwin* | *mingw* )
- $echo >> "$output_objdir/$dlsyms" "\
-/* DATA imports from DLLs on WIN32 can't be const, because
- runtime relocations are performed -- see ld's documentation
- on pseudo-relocs */
-struct {
-"
- ;;
- * )
- $echo >> "$output_objdir/$dlsyms" "\
-const struct {
-"
- ;;
- esac
-
-
- $echo >> "$output_objdir/$dlsyms" "\
- const char *name;
- lt_ptr address;
-}
-lt_preloaded_symbols[] =
-{\
-"
-
- eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
-
- $echo >> "$output_objdir/$dlsyms" "\
- {0, (lt_ptr) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
- return lt_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif\
-"
- fi
-
- pic_flag_for_symtable=
- case $host in
- # compiling the symbol table file with pic_flag works around
- # a FreeBSD bug that causes programs to crash when -lm is
- # linked before any other PIC object. But we must not use
- # pic_flag when linking with -static. The problem exists in
- # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
- *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
- case "$compile_command " in
- *" -static "*) ;;
- *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
- esac;;
- *-*-hpux*)
- case "$compile_command " in
- *" -static "*) ;;
- *) pic_flag_for_symtable=" $pic_flag";;
- esac
- esac
-
- # Now compile the dynamic symbol file.
- $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
- $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
-
- # Clean up the generated files.
- $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
- $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
+ func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
- # Transform the symbol file into the correct name.
- case $host in
- *cygwin* | *mingw* )
- if test -f "$output_objdir/${outputname}.def" ; then
- compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
- finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
- else
- compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
- finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
- fi
- ;;
- * )
- compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
- finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
- ;;
- esac
- ;;
- *-*-freebsd*)
- # FreeBSD doesn't need this...
- ;;
- *)
- $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
- exit $EXIT_FAILURE
- ;;
- esac
- else
- # We keep going just in case the user didn't refer to
- # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
- # really was required.
-
- # Nullify the symbol file.
- compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
- finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
+ # template prelinking step
+ if test -n "$prelink_cmds"; then
+ func_execute_cmds "$prelink_cmds" 'exit $?'
fi
- if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+ wrappers_required=yes
+ case $host in
+ *cegcc* | *mingw32ce*)
+ # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
+ wrappers_required=no
+ ;;
+ *cygwin* | *mingw* )
+ if test "$build_libtool_libs" != yes; then
+ wrappers_required=no
+ fi
+ ;;
+ *)
+ if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+ wrappers_required=no
+ fi
+ ;;
+ esac
+ if test "$wrappers_required" = no; then
# Replace the output file specification.
- compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
+ compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
link_command="$compile_command$compile_rpath"
# We have no uninstalled library dependencies, so finalize right now.
- $show "$link_command"
- $run eval "$link_command"
- exit_status=$?
+ exit_status=0
+ func_show_eval "$link_command" 'exit_status=$?'
+
+ if test -n "$postlink_cmds"; then
+ func_to_tool_file "$output"
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
# Delete the generated files.
- if test -n "$dlsyms"; then
- $show "$rm $output_objdir/${outputname}S.${objext}"
- $run $rm "$output_objdir/${outputname}S.${objext}"
+ if test -f "$output_objdir/${outputname}S.${objext}"; then
+ func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
fi
exit $exit_status
fi
- if test -n "$shlibpath_var"; then
- # We should set the shlibpath_var
- rpath=
- for dir in $temp_rpath; do
- case $dir in
- [\\/]* | [A-Za-z]:[\\/]*)
- # Absolute path.
- rpath="$rpath$dir:"
- ;;
- *)
- # Relative path: add a thisdir entry.
- rpath="$rpath\$thisdir/$dir:"
- ;;
- esac
- done
- temp_rpath="$rpath"
- fi
-
if test -n "$compile_shlibpath$finalize_shlibpath"; then
compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
fi
@@ -4876,7 +8964,7 @@ static const void *lt_preloaded_setup() {
# We should set the runpath_var.
rpath=
for dir in $perm_rpath; do
- rpath="$rpath$dir:"
+ func_append rpath "$dir:"
done
compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
fi
@@ -4884,7 +8972,7 @@ static const void *lt_preloaded_setup() {
# We should set the runpath_var.
rpath=
for dir in $finalize_perm_rpath; do
- rpath="$rpath$dir:"
+ func_append rpath "$dir:"
done
finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
fi
@@ -4894,12 +8982,18 @@ static const void *lt_preloaded_setup() {
# We don't need to create a wrapper script.
link_command="$compile_var$compile_command$compile_rpath"
# Replace the output file specification.
- link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
# Delete the old output file.
- $run $rm $output
+ $opt_dry_run || $RM $output
# Link the executable and exit
- $show "$link_command"
- $run eval "$link_command" || exit $?
+ func_show_eval "$link_command" 'exit $?'
+
+ if test -n "$postlink_cmds"; then
+ func_to_tool_file "$output"
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
+
exit $EXIT_SUCCESS
fi
@@ -4908,13 +9002,13 @@ static const void *lt_preloaded_setup() {
link_command="$compile_var$compile_command$compile_rpath"
relink_command="$finalize_var$finalize_command$finalize_rpath"
- $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
- $echo "$modename: \`$output' will be relinked during installation" 1>&2
+ func_warning "this platform does not like uninstalled shared libraries"
+ func_warning "\`$output' will be relinked during installation"
else
if test "$fast_install" != no; then
link_command="$finalize_var$compile_command$finalize_rpath"
if test "$fast_install" = yes; then
- relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
+ relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
else
# fast_install is set to needless
relink_command=
@@ -4926,608 +9020,98 @@ static const void *lt_preloaded_setup() {
fi
# Replace the output file specification.
- link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+ link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
# Delete the old output files.
- $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
+ $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+ func_show_eval "$link_command" 'exit $?'
- $show "$link_command"
- $run eval "$link_command" || exit $?
+ if test -n "$postlink_cmds"; then
+ func_to_tool_file "$output_objdir/$outputname"
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
# Now create the wrapper script.
- $show "creating $output"
+ func_verbose "creating $output"
# Quote the relink command for shipping.
if test -n "$relink_command"; then
# Preserve any variables that may affect compiler behavior
for var in $variables_saved_for_relink; do
if eval test -z \"\${$var+set}\"; then
- relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
elif eval var_value=\$$var; test -z "$var_value"; then
relink_command="$var=; export $var; $relink_command"
else
- var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
- relink_command="$var=\"$var_value\"; export $var; $relink_command"
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
fi
done
relink_command="(cd `pwd`; $relink_command)"
- relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
- fi
-
- # Quote $echo for shipping.
- if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
- case $progpath in
- [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
- *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
- esac
- qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
- else
- qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
+ relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
fi
- # Only actually do things if our run command is non-null.
- if test -z "$run"; then
+ # Only actually do things if not in dry run mode.
+ $opt_dry_run || {
# win32 will think the script is a binary if it has
# a .exe suffix, so we strip it off here.
case $output in
- *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
+ *.exe) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result ;;
esac
# test for cygwin because mv fails w/o .exe extensions
case $host in
*cygwin*)
exeext=.exe
- outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
+ func_stripname '' '.exe' "$outputname"
+ outputname=$func_stripname_result ;;
*) exeext= ;;
esac
case $host in
*cygwin* | *mingw* )
- output_name=`basename $output`
- output_path=`dirname $output`
- cwrappersource="$output_path/$objdir/lt-$output_name.c"
- cwrapper="$output_path/$output_name.exe"
- $rm $cwrappersource $cwrapper
- trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
-
- cat > $cwrappersource <<EOF
-
-/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
- Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-
- The $output program cannot be directly executed until all the libtool
- libraries that it depends on are installed.
-
- This wrapper executable should never be moved out of the build directory.
- If it is, it will not operate correctly.
-
- Currently, it simply execs the wrapper *script* "/bin/sh $output",
- but could eventually absorb all of the scripts functionality and
- exec $objdir/$outputname directly.
-*/
-EOF
- cat >> $cwrappersource<<"EOF"
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <malloc.h>
-#include <stdarg.h>
-#include <assert.h>
-#include <string.h>
-#include <ctype.h>
-#include <sys/stat.h>
-
-#if defined(PATH_MAX)
-# define LT_PATHMAX PATH_MAX
-#elif defined(MAXPATHLEN)
-# define LT_PATHMAX MAXPATHLEN
-#else
-# define LT_PATHMAX 1024
-#endif
-
-#ifndef DIR_SEPARATOR
-# define DIR_SEPARATOR '/'
-# define PATH_SEPARATOR ':'
-#endif
-
-#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
- defined (__OS2__)
-# define HAVE_DOS_BASED_FILE_SYSTEM
-# ifndef DIR_SEPARATOR_2
-# define DIR_SEPARATOR_2 '\\'
-# endif
-# ifndef PATH_SEPARATOR_2
-# define PATH_SEPARATOR_2 ';'
-# endif
-#endif
-
-#ifndef DIR_SEPARATOR_2
-# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
-#else /* DIR_SEPARATOR_2 */
-# define IS_DIR_SEPARATOR(ch) \
- (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
-#endif /* DIR_SEPARATOR_2 */
-
-#ifndef PATH_SEPARATOR_2
-# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
-#else /* PATH_SEPARATOR_2 */
-# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
-#endif /* PATH_SEPARATOR_2 */
-
-#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
-#define XFREE(stale) do { \
- if (stale) { free ((void *) stale); stale = 0; } \
-} while (0)
-
-/* -DDEBUG is fairly common in CFLAGS. */
-#undef DEBUG
-#if defined DEBUGWRAPPER
-# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
-#else
-# define DEBUG(format, ...)
-#endif
-
-const char *program_name = NULL;
-
-void * xmalloc (size_t num);
-char * xstrdup (const char *string);
-const char * base_name (const char *name);
-char * find_executable(const char *wrapper);
-int check_executable(const char *path);
-char * strendzap(char *str, const char *pat);
-void lt_fatal (const char *message, ...);
-
-int
-main (int argc, char *argv[])
-{
- char **newargz;
- int i;
-
- program_name = (char *) xstrdup (base_name (argv[0]));
- DEBUG("(main) argv[0] : %s\n",argv[0]);
- DEBUG("(main) program_name : %s\n",program_name);
- newargz = XMALLOC(char *, argc+2);
-EOF
-
- cat >> $cwrappersource <<EOF
- newargz[0] = (char *) xstrdup("$SHELL");
-EOF
-
- cat >> $cwrappersource <<"EOF"
- newargz[1] = find_executable(argv[0]);
- if (newargz[1] == NULL)
- lt_fatal("Couldn't find %s", argv[0]);
- DEBUG("(main) found exe at : %s\n",newargz[1]);
- /* we know the script has the same name, without the .exe */
- /* so make sure newargz[1] doesn't end in .exe */
- strendzap(newargz[1],".exe");
- for (i = 1; i < argc; i++)
- newargz[i+1] = xstrdup(argv[i]);
- newargz[argc+1] = NULL;
-
- for (i=0; i<argc+1; i++)
- {
- DEBUG("(main) newargz[%d] : %s\n",i,newargz[i]);
- ;
- }
-
-EOF
-
- case $host_os in
- mingw*)
- cat >> $cwrappersource <<EOF
- execv("$SHELL",(char const **)newargz);
-EOF
- ;;
- *)
- cat >> $cwrappersource <<EOF
- execv("$SHELL",newargz);
-EOF
- ;;
- esac
-
- cat >> $cwrappersource <<"EOF"
- return 127;
-}
-
-void *
-xmalloc (size_t num)
-{
- void * p = (void *) malloc (num);
- if (!p)
- lt_fatal ("Memory exhausted");
-
- return p;
-}
-
-char *
-xstrdup (const char *string)
-{
- return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
-;
-}
-
-const char *
-base_name (const char *name)
-{
- const char *base;
-
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
- /* Skip over the disk name in MSDOS pathnames. */
- if (isalpha ((unsigned char)name[0]) && name[1] == ':')
- name += 2;
-#endif
-
- for (base = name; *name; name++)
- if (IS_DIR_SEPARATOR (*name))
- base = name + 1;
- return base;
-}
-
-int
-check_executable(const char * path)
-{
- struct stat st;
-
- DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
- if ((!path) || (!*path))
- return 0;
-
- if ((stat (path, &st) >= 0) &&
- (
- /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
-#if defined (S_IXOTH)
- ((st.st_mode & S_IXOTH) == S_IXOTH) ||
-#endif
-#if defined (S_IXGRP)
- ((st.st_mode & S_IXGRP) == S_IXGRP) ||
-#endif
- ((st.st_mode & S_IXUSR) == S_IXUSR))
- )
- return 1;
- else
- return 0;
-}
-
-/* Searches for the full path of the wrapper. Returns
- newly allocated full path name if found, NULL otherwise */
-char *
-find_executable (const char* wrapper)
-{
- int has_slash = 0;
- const char* p;
- const char* p_next;
- /* static buffer for getcwd */
- char tmp[LT_PATHMAX + 1];
- int tmp_len;
- char* concat_name;
-
- DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
-
- if ((wrapper == NULL) || (*wrapper == '\0'))
- return NULL;
-
- /* Absolute path? */
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
- if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
- {
- concat_name = xstrdup (wrapper);
- if (check_executable(concat_name))
- return concat_name;
- XFREE(concat_name);
- }
- else
- {
-#endif
- if (IS_DIR_SEPARATOR (wrapper[0]))
- {
- concat_name = xstrdup (wrapper);
- if (check_executable(concat_name))
- return concat_name;
- XFREE(concat_name);
- }
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
- }
-#endif
-
- for (p = wrapper; *p; p++)
- if (*p == '/')
- {
- has_slash = 1;
- break;
- }
- if (!has_slash)
- {
- /* no slashes; search PATH */
- const char* path = getenv ("PATH");
- if (path != NULL)
- {
- for (p = path; *p; p = p_next)
- {
- const char* q;
- size_t p_len;
- for (q = p; *q; q++)
- if (IS_PATH_SEPARATOR(*q))
- break;
- p_len = q - p;
- p_next = (*q == '\0' ? q : q + 1);
- if (p_len == 0)
- {
- /* empty path: current directory */
- if (getcwd (tmp, LT_PATHMAX) == NULL)
- lt_fatal ("getcwd failed");
- tmp_len = strlen(tmp);
- concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
- memcpy (concat_name, tmp, tmp_len);
- concat_name[tmp_len] = '/';
- strcpy (concat_name + tmp_len + 1, wrapper);
- }
- else
- {
- concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
- memcpy (concat_name, p, p_len);
- concat_name[p_len] = '/';
- strcpy (concat_name + p_len + 1, wrapper);
- }
- if (check_executable(concat_name))
- return concat_name;
- XFREE(concat_name);
- }
- }
- /* not found in PATH; assume curdir */
- }
- /* Relative path | not found in path: prepend cwd */
- if (getcwd (tmp, LT_PATHMAX) == NULL)
- lt_fatal ("getcwd failed");
- tmp_len = strlen(tmp);
- concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
- memcpy (concat_name, tmp, tmp_len);
- concat_name[tmp_len] = '/';
- strcpy (concat_name + tmp_len + 1, wrapper);
-
- if (check_executable(concat_name))
- return concat_name;
- XFREE(concat_name);
- return NULL;
-}
-
-char *
-strendzap(char *str, const char *pat)
-{
- size_t len, patlen;
-
- assert(str != NULL);
- assert(pat != NULL);
-
- len = strlen(str);
- patlen = strlen(pat);
-
- if (patlen <= len)
- {
- str += len - patlen;
- if (strcmp(str, pat) == 0)
- *str = '\0';
- }
- return str;
-}
-
-static void
-lt_error_core (int exit_status, const char * mode,
- const char * message, va_list ap)
-{
- fprintf (stderr, "%s: %s: ", program_name, mode);
- vfprintf (stderr, message, ap);
- fprintf (stderr, ".\n");
-
- if (exit_status >= 0)
- exit (exit_status);
-}
-
-void
-lt_fatal (const char *message, ...)
-{
- va_list ap;
- va_start (ap, message);
- lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
- va_end (ap);
-}
-EOF
- # we should really use a build-platform specific compiler
- # here, but OTOH, the wrappers (shell script and this C one)
- # are only useful if you want to execute the "real" binary.
- # Since the "real" binary is built for $host, then this
- # wrapper might as well be built for $host, too.
- $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
- ;;
- esac
- $rm $output
- trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
-
- $echo > $output "\
-#! $SHELL
-
-# $output - temporary wrapper script for $objdir/$outputname
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-#
-# The $output program cannot be directly executed until all the libtool
-# libraries that it depends on are installed.
-#
-# This wrapper script should never be moved out of the build directory.
-# If it is, it will not operate correctly.
-
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='${SED} -e 1s/^X//'
-sed_quote_subst='$sed_quote_subst'
-
-# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
-if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '\${1+\"\$@\"}'='\"\$@\"'
- setopt NO_GLOB_SUBST
-else
- case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
-fi
-BIN_SH=xpg4; export BIN_SH # for Tru64
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-relink_command=\"$relink_command\"
-
-# This environment variable determines our operation mode.
-if test \"\$libtool_install_magic\" = \"$magic\"; then
- # install mode needs the following variable:
- notinst_deplibs='$notinst_deplibs'
-else
- # When we are sourced in execute mode, \$file and \$echo are already set.
- if test \"\$libtool_execute_magic\" != \"$magic\"; then
- echo=\"$qecho\"
- file=\"\$0\"
- # Make sure echo works.
- if test \"X\$1\" = X--no-reexec; then
- # Discard the --no-reexec flag, and continue.
- shift
- elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
- # Yippee, \$echo works!
- :
- else
- # Restart under the correct shell, and then maybe \$echo will work.
- exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
- fi
- fi\
-"
- $echo >> $output "\
-
- # Find the directory that this script lives in.
- thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
- test \"x\$thisdir\" = \"x\$file\" && thisdir=.
-
- # Follow symbolic links until we get to the real thisdir.
- file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
- while test -n \"\$file\"; do
- destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
-
- # If there was a directory component, then change thisdir.
- if test \"x\$destdir\" != \"x\$file\"; then
- case \"\$destdir\" in
- [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
- *) thisdir=\"\$thisdir/\$destdir\" ;;
- esac
- fi
-
- file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
- file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
- done
-
- # Try to get the absolute directory name.
- absdir=\`cd \"\$thisdir\" && pwd\`
- test -n \"\$absdir\" && thisdir=\"\$absdir\"
-"
-
- if test "$fast_install" = yes; then
- $echo >> $output "\
- program=lt-'$outputname'$exeext
- progdir=\"\$thisdir/$objdir\"
-
- if test ! -f \"\$progdir/\$program\" || \\
- { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
- test \"X\$file\" != \"X\$progdir/\$program\"; }; then
-
- file=\"\$\$-\$program\"
-
- if test ! -d \"\$progdir\"; then
- $mkdir \"\$progdir\"
- else
- $rm \"\$progdir/\$file\"
- fi"
-
- $echo >> $output "\
-
- # relink executable if necessary
- if test -n \"\$relink_command\"; then
- if relink_command_output=\`eval \$relink_command 2>&1\`; then :
- else
- $echo \"\$relink_command_output\" >&2
- $rm \"\$progdir/\$file\"
- exit $EXIT_FAILURE
- fi
- fi
-
- $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
- { $rm \"\$progdir/\$program\";
- $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
- $rm \"\$progdir/\$file\"
- fi"
- else
- $echo >> $output "\
- program='$outputname'
- progdir=\"\$thisdir/$objdir\"
-"
- fi
-
- $echo >> $output "\
-
- if test -f \"\$progdir/\$program\"; then"
-
- # Export our shlibpath_var if we have one.
- if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
- $echo >> $output "\
- # Add our own library path to $shlibpath_var
- $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
-
- # Some systems cannot cope with colon-terminated $shlibpath_var
- # The second colon is a workaround for a bug in BeOS R4 sed
- $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
-
- export $shlibpath_var
-"
- fi
-
- # fixup the dll searchpath if we need to.
- if test -n "$dllsearchpath"; then
- $echo >> $output "\
- # Add the dll search path components to the executable PATH
- PATH=$dllsearchpath:\$PATH
-"
- fi
+ func_dirname_and_basename "$output" "" "."
+ output_name=$func_basename_result
+ output_path=$func_dirname_result
+ cwrappersource="$output_path/$objdir/lt-$output_name.c"
+ cwrapper="$output_path/$output_name.exe"
+ $RM $cwrappersource $cwrapper
+ trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_cwrapperexe_src > $cwrappersource
+
+ # The wrapper executable is built using the $host compiler,
+ # because it contains $host paths and files. If cross-
+ # compiling, it, like the target executable, must be
+ # executed on the $host or under an emulation environment.
+ $opt_dry_run || {
+ $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
+ $STRIP $cwrapper
+ }
- $echo >> $output "\
- if test \"\$libtool_execute_magic\" != \"$magic\"; then
- # Run the actual program with our arguments.
-"
- case $host in
- # Backslashes separate directories on plain windows
- *-*-mingw | *-*-os2*)
- $echo >> $output "\
- exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
-"
+ # Now, create the wrapper script for func_source use:
+ func_ltwrapper_scriptname $cwrapper
+ $RM $func_ltwrapper_scriptname_result
+ trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
+ $opt_dry_run || {
+ # note: this script will not be executed, so do not chmod.
+ if test "x$build" = "x$host" ; then
+ $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
+ else
+ func_emit_wrapper no > $func_ltwrapper_scriptname_result
+ fi
+ }
;;
+ * )
+ $RM $output
+ trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
- *)
- $echo >> $output "\
- exec \"\$progdir/\$program\" \${1+\"\$@\"}
-"
+ func_emit_wrapper no > $output
+ chmod +x $output
;;
esac
- $echo >> $output "\
- \$echo \"\$0: cannot exec \$program \$*\"
- exit $EXIT_FAILURE
- fi
- else
- # The program doesn't exist.
- \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
- \$echo \"This script is just a wrapper for \$program.\" 1>&2
- $echo \"See the $PACKAGE documentation for more information.\" 1>&2
- exit $EXIT_FAILURE
- fi
-fi\
-"
- chmod +x $output
- fi
+ }
exit $EXIT_SUCCESS
;;
esac
@@ -5536,7 +9120,7 @@ fi\
for oldlib in $oldlibs; do
if test "$build_libtool_libs" = convenience; then
- oldobjs="$libobjs_save"
+ oldobjs="$libobjs_save $symfileobj"
addlibs="$convenience"
build_libtool_libs=no
else
@@ -5545,22 +9129,35 @@ fi\
build_libtool_libs=no
else
oldobjs="$old_deplibs $non_pic_objects"
+ if test "$preload" = yes && test -f "$symfileobj"; then
+ func_append oldobjs " $symfileobj"
+ fi
fi
addlibs="$old_convenience"
fi
if test -n "$addlibs"; then
gentop="$output_objdir/${outputname}x"
- generated="$generated $gentop"
+ func_append generated " $gentop"
func_extract_archives $gentop $addlibs
- oldobjs="$oldobjs $func_extract_archives_result"
+ func_append oldobjs " $func_extract_archives_result"
fi
# Do each command in the archive commands.
if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
- cmds=$old_archive_from_new_cmds
+ cmds=$old_archive_from_new_cmds
else
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop="$output_objdir/${outputname}x"
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ func_append oldobjs " $func_extract_archives_result"
+ fi
+
# POSIX demands no paths to be encoded in archives. We have
# to avoid creating archives with duplicate basenames if we
# might have to extract them afterwards, e.g., when creating a
@@ -5569,32 +9166,22 @@ fi\
# not supported by libtool).
if (for obj in $oldobjs
do
- $echo "X$obj" | $Xsed -e 's%^.*/%%'
+ func_basename "$obj"
+ $ECHO "$func_basename_result"
done | sort | sort -uc >/dev/null 2>&1); then
:
else
- $echo "copying selected object files to avoid basename conflicts..."
-
- if test -z "$gentop"; then
- gentop="$output_objdir/${outputname}x"
- generated="$generated $gentop"
-
- $show "${rm}r $gentop"
- $run ${rm}r "$gentop"
- $show "$mkdir $gentop"
- $run $mkdir "$gentop"
- exit_status=$?
- if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
- exit $exit_status
- fi
- fi
-
+ echo "copying selected object files to avoid basename conflicts..."
+ gentop="$output_objdir/${outputname}x"
+ func_append generated " $gentop"
+ func_mkdir_p "$gentop"
save_oldobjs=$oldobjs
oldobjs=
counter=1
for obj in $save_oldobjs
do
- objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+ func_basename "$obj"
+ objbase="$func_basename_result"
case " $oldobjs " in
" ") oldobjs=$obj ;;
*[\ /]"$objbase "*)
@@ -5602,58 +9189,72 @@ fi\
# Make sure we don't pick an alternate name that also
# overlaps.
newobj=lt$counter-$objbase
- counter=`expr $counter + 1`
+ func_arith $counter + 1
+ counter=$func_arith_result
case " $oldobjs " in
*[\ /]"$newobj "*) ;;
*) if test ! -f "$gentop/$newobj"; then break; fi ;;
esac
done
- $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
- $run ln "$obj" "$gentop/$newobj" ||
- $run cp "$obj" "$gentop/$newobj"
- oldobjs="$oldobjs $gentop/$newobj"
+ func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+ func_append oldobjs " $gentop/$newobj"
;;
- *) oldobjs="$oldobjs $obj" ;;
+ *) func_append oldobjs " $obj" ;;
esac
done
fi
-
eval cmds=\"$old_archive_cmds\"
- if len=`expr "X$cmds" : ".*"` &&
- test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ func_len " $cmds"
+ len=$func_len_result
+ if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ cmds=$old_archive_cmds
+ elif test -n "$archiver_list_spec"; then
+ func_verbose "using command file archive linking..."
+ for obj in $oldobjs
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result"
+ done > $output_objdir/$libname.libcmd
+ func_to_tool_file "$output_objdir/$libname.libcmd"
+ oldobjs=" $archiver_list_spec$func_to_tool_file_result"
cmds=$old_archive_cmds
else
# the command line is too long to link in one step, link in parts
- $echo "using piecewise archive linking..."
+ func_verbose "using piecewise archive linking..."
save_RANLIB=$RANLIB
RANLIB=:
objlist=
concat_cmds=
save_oldobjs=$oldobjs
-
+ oldobjs=
# Is there a better way of finding the last object in the list?
for obj in $save_oldobjs
do
last_oldobj=$obj
done
+ eval test_cmds=\"$old_archive_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
for obj in $save_oldobjs
do
- oldobjs="$objlist $obj"
- objlist="$objlist $obj"
- eval test_cmds=\"$old_archive_cmds\"
- if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
- test "$len" -le "$max_cmd_len"; then
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ func_append objlist " $obj"
+ if test "$len" -lt "$max_cmd_len"; then
:
else
# the above command should be used before it gets too long
oldobjs=$objlist
if test "$obj" = "$last_oldobj" ; then
- RANLIB=$save_RANLIB
+ RANLIB=$save_RANLIB
fi
test -z "$concat_cmds" || concat_cmds=$concat_cmds~
eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
objlist=
+ len=$len0
fi
done
RANLIB=$save_RANLIB
@@ -5665,49 +9266,39 @@ fi\
fi
fi
fi
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- eval cmd=\"$cmd\"
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
+ func_execute_cmds "$cmds" 'exit $?'
done
- if test -n "$generated"; then
- $show "${rm}r$generated"
- $run ${rm}r$generated
- fi
+ test -n "$generated" && \
+ func_show_eval "${RM}r$generated"
# Now create the libtool archive.
case $output in
*.la)
old_library=
test "$build_old_libs" = yes && old_library="$libname.$libext"
- $show "creating $output"
+ func_verbose "creating $output"
# Preserve any variables that may affect compiler behavior
for var in $variables_saved_for_relink; do
if eval test -z \"\${$var+set}\"; then
- relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
elif eval var_value=\$$var; test -z "$var_value"; then
relink_command="$var=; export $var; $relink_command"
else
- var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
- relink_command="$var=\"$var_value\"; export $var; $relink_command"
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
fi
done
# Quote the link command for shipping.
relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
- relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
+ relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
if test "$hardcode_automatic" = yes ; then
relink_command=
fi
-
# Only create the output if not a dry run.
- if test -z "$run"; then
+ $opt_dry_run || {
for installed in no yes; do
if test "$installed" = yes; then
if test -z "$install_libdir"; then
@@ -5719,38 +9310,59 @@ fi\
for deplib in $dependency_libs; do
case $deplib in
*.la)
- name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
+ func_basename "$deplib"
+ name="$func_basename_result"
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
- if test -z "$libdir"; then
- $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
- exit $EXIT_FAILURE
- fi
- newdependency_libs="$newdependency_libs $libdir/$name"
+ test -z "$libdir" && \
+ func_fatal_error "\`$deplib' is not a valid libtool archive"
+ func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
+ ;;
+ -L*)
+ func_stripname -L '' "$deplib"
+ func_replace_sysroot "$func_stripname_result"
+ func_append newdependency_libs " -L$func_replace_sysroot_result"
;;
- *) newdependency_libs="$newdependency_libs $deplib" ;;
+ -R*)
+ func_stripname -R '' "$deplib"
+ func_replace_sysroot "$func_stripname_result"
+ func_append newdependency_libs " -R$func_replace_sysroot_result"
+ ;;
+ *) func_append newdependency_libs " $deplib" ;;
esac
done
dependency_libs="$newdependency_libs"
newdlfiles=
+
for lib in $dlfiles; do
- name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
- if test -z "$libdir"; then
- $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
- exit $EXIT_FAILURE
- fi
- newdlfiles="$newdlfiles $libdir/$name"
+ case $lib in
+ *.la)
+ func_basename "$lib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$lib' is not a valid libtool archive"
+ func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
+ ;;
+ *) func_append newdlfiles " $lib" ;;
+ esac
done
dlfiles="$newdlfiles"
newdlprefiles=
for lib in $dlprefiles; do
- name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
- if test -z "$libdir"; then
- $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
- exit $EXIT_FAILURE
- fi
- newdlprefiles="$newdlprefiles $libdir/$name"
+ case $lib in
+ *.la)
+ # Only pass preopened files to the pseudo-archive (for
+ # eventual linking with the app. that links it) if we
+ # didn't already link the preopened objects directly into
+ # the library:
+ func_basename "$lib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$lib' is not a valid libtool archive"
+ func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
+ ;;
+ esac
done
dlprefiles="$newdlprefiles"
else
@@ -5760,7 +9372,7 @@ fi\
[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
*) abs=`pwd`"/$lib" ;;
esac
- newdlfiles="$newdlfiles $abs"
+ func_append newdlfiles " $abs"
done
dlfiles="$newdlfiles"
newdlprefiles=
@@ -5769,19 +9381,37 @@ fi\
[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
*) abs=`pwd`"/$lib" ;;
esac
- newdlprefiles="$newdlprefiles $abs"
+ func_append newdlprefiles " $abs"
done
dlprefiles="$newdlprefiles"
fi
- $rm $output
+ $RM $output
# place dlname in correct position for cygwin
+ # In fact, it would be nice if we could use this code for all target
+ # systems that can't hard-code library paths into their executables
+ # and that have no shared library path variable independent of PATH,
+ # but it turns out we can't easily determine that from inspecting
+ # libtool variables, so we have to hard-code the OSs to which it
+ # applies here; at the moment, that means platforms that use the PE
+ # object format with DLL files. See the long comment at the top of
+ # tests/bindir.at for full details.
tdlname=$dlname
case $host,$output,$installed,$module,$dlname in
- *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
+ # If a -bindir argument was supplied, place the dll there.
+ if test "x$bindir" != x ;
+ then
+ func_relative_path "$install_libdir" "$bindir"
+ tdlname=$func_relative_path_result$dlname
+ else
+ # Otherwise fall back on heuristic.
+ tdlname=../bin/$dlname
+ fi
+ ;;
esac
- $echo > $output "\
+ $ECHO > $output "\
# $outputname - a libtool library file
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
@@ -5795,9 +9425,15 @@ library_names='$library_names'
# The name of the static archive.
old_library='$old_library'
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags='$new_inherited_linker_flags'
+
# Libraries that this one depends upon.
dependency_libs='$dependency_libs'
+# Names of additional weak libraries provided by this library
+weak_library_names='$weak_libs'
+
# Version information for $libname.
current=$current
age=$age
@@ -5816,748 +9452,29 @@ dlpreopen='$dlprefiles'
# Directory that this library needs to be installed in:
libdir='$install_libdir'"
if test "$installed" = no && test "$need_relink" = yes; then
- $echo >> $output "\
+ $ECHO >> $output "\
relink_command=\"$relink_command\""
fi
done
- fi
+ }
# Do a symbolic link so that the libtool archive can be found in
# LD_LIBRARY_PATH before the program is installed.
- $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
- $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
- ;;
- esac
- exit $EXIT_SUCCESS
- ;;
-
- # libtool install mode
- install)
- modename="$modename: install"
-
- # There may be an optional sh(1) argument at the beginning of
- # install_prog (especially on Windows NT).
- if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
- # Allow the use of GNU shtool's install command.
- $echo "X$nonopt" | grep shtool > /dev/null; then
- # Aesthetically quote it.
- arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
- install_prog="$arg "
- arg="$1"
- shift
- else
- install_prog=
- arg=$nonopt
- fi
-
- # The real first argument should be the name of the installation program.
- # Aesthetically quote it.
- arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
- install_prog="$install_prog$arg"
-
- # We need to accept at least all the BSD install flags.
- dest=
- files=
- opts=
- prev=
- install_type=
- isdir=no
- stripme=
- for arg
- do
- if test -n "$dest"; then
- files="$files $dest"
- dest=$arg
- continue
- fi
-
- case $arg in
- -d) isdir=yes ;;
- -f)
- case " $install_prog " in
- *[\\\ /]cp\ *) ;;
- *) prev=$arg ;;
- esac
- ;;
- -g | -m | -o) prev=$arg ;;
- -s)
- stripme=" -s"
- continue
- ;;
- -*)
- ;;
- *)
- # If the previous option needed an argument, then skip it.
- if test -n "$prev"; then
- prev=
- else
- dest=$arg
- continue
- fi
- ;;
- esac
-
- # Aesthetically quote the argument.
- arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
- install_prog="$install_prog $arg"
- done
-
- if test -z "$install_prog"; then
- $echo "$modename: you must specify an install program" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
-
- if test -n "$prev"; then
- $echo "$modename: the \`$prev' option requires an argument" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
-
- if test -z "$files"; then
- if test -z "$dest"; then
- $echo "$modename: no file or destination specified" 1>&2
- else
- $echo "$modename: you must specify a destination" 1>&2
- fi
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
-
- # Strip any trailing slash from the destination.
- dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
-
- # Check to see that the destination is a directory.
- test -d "$dest" && isdir=yes
- if test "$isdir" = yes; then
- destdir="$dest"
- destname=
- else
- destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
- test "X$destdir" = "X$dest" && destdir=.
- destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
-
- # Not a directory, so check to see that there is only one file specified.
- set dummy $files
- if test "$#" -gt 2; then
- $echo "$modename: \`$dest' is not a directory" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
- fi
- case $destdir in
- [\\/]* | [A-Za-z]:[\\/]*) ;;
- *)
- for file in $files; do
- case $file in
- *.lo) ;;
- *)
- $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- ;;
- esac
- done
+ func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
;;
esac
-
- # This variable tells wrapper scripts just to set variables rather
- # than running their programs.
- libtool_install_magic="$magic"
-
- staticlibs=
- future_libdirs=
- current_libdirs=
- for file in $files; do
-
- # Do each installation.
- case $file in
- *.$libext)
- # Do the static libraries later.
- staticlibs="$staticlibs $file"
- ;;
-
- *.la)
- # Check to see that this really is a libtool archive.
- if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
- else
- $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
-
- library_names=
- old_library=
- relink_command=
- # If there is no directory component, then add one.
- case $file in
- */* | *\\*) . $file ;;
- *) . ./$file ;;
- esac
-
- # Add the libdir to current_libdirs if it is the destination.
- if test "X$destdir" = "X$libdir"; then
- case "$current_libdirs " in
- *" $libdir "*) ;;
- *) current_libdirs="$current_libdirs $libdir" ;;
- esac
- else
- # Note the libdir as a future libdir.
- case "$future_libdirs " in
- *" $libdir "*) ;;
- *) future_libdirs="$future_libdirs $libdir" ;;
- esac
- fi
-
- dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
- test "X$dir" = "X$file/" && dir=
- dir="$dir$objdir"
-
- if test -n "$relink_command"; then
- # Determine the prefix the user has applied to our future dir.
- inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
-
- # Don't allow the user to place us outside of our expected
- # location b/c this prevents finding dependent libraries that
- # are installed to the same prefix.
- # At present, this check doesn't affect windows .dll's that
- # are installed into $libdir/../bin (currently, that works fine)
- # but it's something to keep an eye on.
- if test "$inst_prefix_dir" = "$destdir"; then
- $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
- exit $EXIT_FAILURE
- fi
-
- if test -n "$inst_prefix_dir"; then
- # Stick the inst_prefix_dir data into the link command.
- relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
- else
- relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
- fi
-
- $echo "$modename: warning: relinking \`$file'" 1>&2
- $show "$relink_command"
- if $run eval "$relink_command"; then :
- else
- $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
- exit $EXIT_FAILURE
- fi
- fi
-
- # See the names of the shared library.
- set dummy $library_names
- if test -n "$2"; then
- realname="$2"
- shift
- shift
-
- srcname="$realname"
- test -n "$relink_command" && srcname="$realname"T
-
- # Install the shared library and build the symlinks.
- $show "$install_prog $dir/$srcname $destdir/$realname"
- $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
- if test -n "$stripme" && test -n "$striplib"; then
- $show "$striplib $destdir/$realname"
- $run eval "$striplib $destdir/$realname" || exit $?
- fi
-
- if test "$#" -gt 0; then
- # Delete the old symlinks, and create new ones.
- # Try `ln -sf' first, because the `ln' binary might depend on
- # the symlink we replace! Solaris /bin/ln does not understand -f,
- # so we also need to try rm && ln -s.
- for linkname
- do
- if test "$linkname" != "$realname"; then
- $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
- $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
- fi
- done
- fi
-
- # Do each command in the postinstall commands.
- lib="$destdir/$realname"
- cmds=$postinstall_cmds
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- $show "$cmd"
- $run eval "$cmd" || {
- lt_exit=$?
-
- # Restore the uninstalled library and exit
- if test "$mode" = relink; then
- $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
- fi
-
- exit $lt_exit
- }
- done
- IFS="$save_ifs"
- fi
-
- # Install the pseudo-library for information purposes.
- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
- instname="$dir/$name"i
- $show "$install_prog $instname $destdir/$name"
- $run eval "$install_prog $instname $destdir/$name" || exit $?
-
- # Maybe install the static library, too.
- test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
- ;;
-
- *.lo)
- # Install (i.e. copy) a libtool object.
-
- # Figure out destination file name, if it wasn't already specified.
- if test -n "$destname"; then
- destfile="$destdir/$destname"
- else
- destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
- destfile="$destdir/$destfile"
- fi
-
- # Deduce the name of the destination old-style object file.
- case $destfile in
- *.lo)
- staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
- ;;
- *.$objext)
- staticdest="$destfile"
- destfile=
- ;;
- *)
- $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- ;;
- esac
-
- # Install the libtool object if requested.
- if test -n "$destfile"; then
- $show "$install_prog $file $destfile"
- $run eval "$install_prog $file $destfile" || exit $?
- fi
-
- # Install the old object if enabled.
- if test "$build_old_libs" = yes; then
- # Deduce the name of the old-style object file.
- staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
-
- $show "$install_prog $staticobj $staticdest"
- $run eval "$install_prog \$staticobj \$staticdest" || exit $?
- fi
- exit $EXIT_SUCCESS
- ;;
-
- *)
- # Figure out destination file name, if it wasn't already specified.
- if test -n "$destname"; then
- destfile="$destdir/$destname"
- else
- destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
- destfile="$destdir/$destfile"
- fi
-
- # If the file is missing, and there is a .exe on the end, strip it
- # because it is most likely a libtool script we actually want to
- # install
- stripped_ext=""
- case $file in
- *.exe)
- if test ! -f "$file"; then
- file=`$echo $file|${SED} 's,.exe$,,'`
- stripped_ext=".exe"
- fi
- ;;
- esac
-
- # Do a test to see if this is really a libtool program.
- case $host in
- *cygwin*|*mingw*)
- wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
- ;;
- *)
- wrapper=$file
- ;;
- esac
- if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
- notinst_deplibs=
- relink_command=
-
- # Note that it is not necessary on cygwin/mingw to append a dot to
- # foo even if both foo and FILE.exe exist: automatic-append-.exe
- # behavior happens only for exec(3), not for open(2)! Also, sourcing
- # `FILE.' does not work on cygwin managed mounts.
- #
- # If there is no directory component, then add one.
- case $wrapper in
- */* | *\\*) . ${wrapper} ;;
- *) . ./${wrapper} ;;
- esac
-
- # Check the variables that should have been set.
- if test -z "$notinst_deplibs"; then
- $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
- exit $EXIT_FAILURE
- fi
-
- finalize=yes
- for lib in $notinst_deplibs; do
- # Check to see that each library is installed.
- libdir=
- if test -f "$lib"; then
- # If there is no directory component, then add one.
- case $lib in
- */* | *\\*) . $lib ;;
- *) . ./$lib ;;
- esac
- fi
- libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
- if test -n "$libdir" && test ! -f "$libfile"; then
- $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
- finalize=no
- fi
- done
-
- relink_command=
- # Note that it is not necessary on cygwin/mingw to append a dot to
- # foo even if both foo and FILE.exe exist: automatic-append-.exe
- # behavior happens only for exec(3), not for open(2)! Also, sourcing
- # `FILE.' does not work on cygwin managed mounts.
- #
- # If there is no directory component, then add one.
- case $wrapper in
- */* | *\\*) . ${wrapper} ;;
- *) . ./${wrapper} ;;
- esac
-
- outputname=
- if test "$fast_install" = no && test -n "$relink_command"; then
- if test "$finalize" = yes && test -z "$run"; then
- tmpdir=`func_mktempdir`
- file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
- outputname="$tmpdir/$file"
- # Replace the output file specification.
- relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
-
- $show "$relink_command"
- if $run eval "$relink_command"; then :
- else
- $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
- ${rm}r "$tmpdir"
- continue
- fi
- file="$outputname"
- else
- $echo "$modename: warning: cannot relink \`$file'" 1>&2
- fi
- else
- # Install the binary that we compiled earlier.
- file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
- fi
- fi
-
- # remove .exe since cygwin /usr/bin/install will append another
- # one anyway
- case $install_prog,$host in
- */usr/bin/install*,*cygwin*)
- case $file:$destfile in
- *.exe:*.exe)
- # this is ok
- ;;
- *.exe:*)
- destfile=$destfile.exe
- ;;
- *:*.exe)
- destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
- ;;
- esac
- ;;
- esac
- $show "$install_prog$stripme $file $destfile"
- $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
- test -n "$outputname" && ${rm}r "$tmpdir"
- ;;
- esac
- done
-
- for file in $staticlibs; do
- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-
- # Set up the ranlib parameters.
- oldlib="$destdir/$name"
-
- $show "$install_prog $file $oldlib"
- $run eval "$install_prog \$file \$oldlib" || exit $?
-
- if test -n "$stripme" && test -n "$old_striplib"; then
- $show "$old_striplib $oldlib"
- $run eval "$old_striplib $oldlib" || exit $?
- fi
-
- # Do each command in the postinstall commands.
- cmds=$old_postinstall_cmds
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
- done
-
- if test -n "$future_libdirs"; then
- $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
- fi
-
- if test -n "$current_libdirs"; then
- # Maybe just do a dry run.
- test -n "$run" && current_libdirs=" -n$current_libdirs"
- exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
- else
- exit $EXIT_SUCCESS
- fi
- ;;
-
- # libtool finish mode
- finish)
- modename="$modename: finish"
- libdirs="$nonopt"
- admincmds=
-
- if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
- for dir
- do
- libdirs="$libdirs $dir"
- done
-
- for libdir in $libdirs; do
- if test -n "$finish_cmds"; then
- # Do each command in the finish commands.
- cmds=$finish_cmds
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- $show "$cmd"
- $run eval "$cmd" || admincmds="$admincmds
- $cmd"
- done
- IFS="$save_ifs"
- fi
- if test -n "$finish_eval"; then
- # Do the single finish_eval.
- eval cmds=\"$finish_eval\"
- $run eval "$cmds" || admincmds="$admincmds
- $cmds"
- fi
- done
- fi
-
- # Exit here if they wanted silent mode.
- test "$show" = : && exit $EXIT_SUCCESS
-
- $echo "X----------------------------------------------------------------------" | $Xsed
- $echo "Libraries have been installed in:"
- for libdir in $libdirs; do
- $echo " $libdir"
- done
- $echo
- $echo "If you ever happen to want to link against installed libraries"
- $echo "in a given directory, LIBDIR, you must either use libtool, and"
- $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
- $echo "flag during linking and do at least one of the following:"
- if test -n "$shlibpath_var"; then
- $echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
- $echo " during execution"
- fi
- if test -n "$runpath_var"; then
- $echo " - add LIBDIR to the \`$runpath_var' environment variable"
- $echo " during linking"
- fi
- if test -n "$hardcode_libdir_flag_spec"; then
- libdir=LIBDIR
- eval flag=\"$hardcode_libdir_flag_spec\"
-
- $echo " - use the \`$flag' linker flag"
- fi
- if test -n "$admincmds"; then
- $echo " - have your system administrator run these commands:$admincmds"
- fi
- if test -f /etc/ld.so.conf; then
- $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
- fi
- $echo
- $echo "See any operating system documentation about shared libraries for"
- $echo "more information, such as the ld(1) and ld.so(8) manual pages."
- $echo "X----------------------------------------------------------------------" | $Xsed
exit $EXIT_SUCCESS
- ;;
-
- # libtool execute mode
- execute)
- modename="$modename: execute"
-
- # The first argument is the command name.
- cmd="$nonopt"
- if test -z "$cmd"; then
- $echo "$modename: you must specify a COMMAND" 1>&2
- $echo "$help"
- exit $EXIT_FAILURE
- fi
-
- # Handle -dlopen flags immediately.
- for file in $execute_dlfiles; do
- if test ! -f "$file"; then
- $echo "$modename: \`$file' is not a file" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
-
- dir=
- case $file in
- *.la)
- # Check to see that this really is a libtool archive.
- if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
- else
- $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
-
- # Read the libtool library.
- dlname=
- library_names=
-
- # If there is no directory component, then add one.
- case $file in
- */* | *\\*) . $file ;;
- *) . ./$file ;;
- esac
-
- # Skip this library if it cannot be dlopened.
- if test -z "$dlname"; then
- # Warn if it was a shared library.
- test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
- continue
- fi
-
- dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
- test "X$dir" = "X$file" && dir=.
-
- if test -f "$dir/$objdir/$dlname"; then
- dir="$dir/$objdir"
- else
- if test ! -f "$dir/$dlname"; then
- $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
- exit $EXIT_FAILURE
- fi
- fi
- ;;
-
- *.lo)
- # Just add the directory containing the .lo file.
- dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
- test "X$dir" = "X$file" && dir=.
- ;;
-
- *)
- $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
- continue
- ;;
- esac
-
- # Get the absolute pathname.
- absdir=`cd "$dir" && pwd`
- test -n "$absdir" && dir="$absdir"
-
- # Now add the directory to shlibpath_var.
- if eval "test -z \"\$$shlibpath_var\""; then
- eval "$shlibpath_var=\"\$dir\""
- else
- eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
- fi
- done
-
- # This variable tells wrapper scripts just to set shlibpath_var
- # rather than running their programs.
- libtool_execute_magic="$magic"
-
- # Check if any of the arguments is a wrapper script.
- args=
- for file
- do
- case $file in
- -*) ;;
- *)
- # Do a test to see if this is really a libtool program.
- if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
- # If there is no directory component, then add one.
- case $file in
- */* | *\\*) . $file ;;
- *) . ./$file ;;
- esac
-
- # Transform arg to wrapped name.
- file="$progdir/$program"
- fi
- ;;
- esac
- # Quote arguments (to preserve shell metacharacters).
- file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
- args="$args \"$file\""
- done
+}
- if test -z "$run"; then
- if test -n "$shlibpath_var"; then
- # Export the shlibpath_var.
- eval "export $shlibpath_var"
- fi
+{ test "$opt_mode" = link || test "$opt_mode" = relink; } &&
+ func_mode_link ${1+"$@"}
- # Restore saved environment variables
- for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
- do
- eval "if test \"\${save_$lt_var+set}\" = set; then
- $lt_var=\$save_$lt_var; export $lt_var
- fi"
- done
-
- # Now prepare to actually exec the command.
- exec_cmd="\$cmd$args"
- else
- # Display what would be done.
- if test -n "$shlibpath_var"; then
- eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
- $echo "export $shlibpath_var"
- fi
- $echo "$cmd$args"
- exit $EXIT_SUCCESS
- fi
- ;;
- # libtool clean and uninstall mode
- clean | uninstall)
- modename="$modename: $mode"
- rm="$nonopt"
+# func_mode_uninstall arg...
+func_mode_uninstall ()
+{
+ $opt_debug
+ RM="$nonopt"
files=
rmforce=
exit_status=0
@@ -6569,44 +9486,41 @@ relink_command=\"$relink_command\""
for arg
do
case $arg in
- -f) rm="$rm $arg"; rmforce=yes ;;
- -*) rm="$rm $arg" ;;
- *) files="$files $arg" ;;
+ -f) func_append RM " $arg"; rmforce=yes ;;
+ -*) func_append RM " $arg" ;;
+ *) func_append files " $arg" ;;
esac
done
- if test -z "$rm"; then
- $echo "$modename: you must specify an RM program" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
+ test -z "$RM" && \
+ func_fatal_help "you must specify an RM program"
rmdirs=
- origobjdir="$objdir"
for file in $files; do
- dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$dir" = "X$file"; then
- dir=.
- objdir="$origobjdir"
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+ if test "X$dir" = X.; then
+ odir="$objdir"
else
- objdir="$dir/$origobjdir"
+ odir="$dir/$objdir"
fi
- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
- test "$mode" = uninstall && objdir="$dir"
+ func_basename "$file"
+ name="$func_basename_result"
+ test "$opt_mode" = uninstall && odir="$dir"
- # Remember objdir for removal later, being careful to avoid duplicates
- if test "$mode" = clean; then
+ # Remember odir for removal later, being careful to avoid duplicates
+ if test "$opt_mode" = clean; then
case " $rmdirs " in
- *" $objdir "*) ;;
- *) rmdirs="$rmdirs $objdir" ;;
+ *" $odir "*) ;;
+ *) func_append rmdirs " $odir" ;;
esac
fi
# Don't error if the file doesn't exist and rm -f was used.
- if (test -L "$file") >/dev/null 2>&1 \
- || (test -h "$file") >/dev/null 2>&1 \
- || test -f "$file"; then
+ if { test -L "$file"; } >/dev/null 2>&1 ||
+ { test -h "$file"; } >/dev/null 2>&1 ||
+ test -f "$file"; then
:
elif test -d "$file"; then
exit_status=1
@@ -6620,55 +9534,32 @@ relink_command=\"$relink_command\""
case $name in
*.la)
# Possibly a libtool archive, so verify it.
- if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
- . $dir/$name
+ if func_lalib_p "$file"; then
+ func_source $dir/$name
# Delete the libtool libraries and symlinks.
for n in $library_names; do
- rmfiles="$rmfiles $objdir/$n"
+ func_append rmfiles " $odir/$n"
done
- test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
+ test -n "$old_library" && func_append rmfiles " $odir/$old_library"
- case "$mode" in
+ case "$opt_mode" in
clean)
- case " $library_names " in
- # " " in the beginning catches empty $dlname
+ case " $library_names " in
*" $dlname "*) ;;
- *) rmfiles="$rmfiles $objdir/$dlname" ;;
+ *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;;
esac
- test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+ test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i"
;;
uninstall)
if test -n "$library_names"; then
# Do each command in the postuninstall commands.
- cmds=$postuninstall_cmds
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- $show "$cmd"
- $run eval "$cmd"
- if test "$?" -ne 0 && test "$rmforce" != yes; then
- exit_status=1
- fi
- done
- IFS="$save_ifs"
+ func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
fi
if test -n "$old_library"; then
# Do each command in the old_postuninstall commands.
- cmds=$old_postuninstall_cmds
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- $show "$cmd"
- $run eval "$cmd"
- if test "$?" -ne 0 && test "$rmforce" != yes; then
- exit_status=1
- fi
- done
- IFS="$save_ifs"
+ func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
fi
# FIXME: should reinstall the best remaining shared library.
;;
@@ -6678,288 +9569,95 @@ relink_command=\"$relink_command\""
*.lo)
# Possibly a libtool object, so verify it.
- if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ if func_lalib_p "$file"; then
# Read the .lo file
- . $dir/$name
+ func_source $dir/$name
# Add PIC object to the list of files to remove.
- if test -n "$pic_object" \
- && test "$pic_object" != none; then
- rmfiles="$rmfiles $dir/$pic_object"
+ if test -n "$pic_object" &&
+ test "$pic_object" != none; then
+ func_append rmfiles " $dir/$pic_object"
fi
# Add non-PIC object to the list of files to remove.
- if test -n "$non_pic_object" \
- && test "$non_pic_object" != none; then
- rmfiles="$rmfiles $dir/$non_pic_object"
+ if test -n "$non_pic_object" &&
+ test "$non_pic_object" != none; then
+ func_append rmfiles " $dir/$non_pic_object"
fi
fi
;;
*)
- if test "$mode" = clean ; then
+ if test "$opt_mode" = clean ; then
noexename=$name
case $file in
*.exe)
- file=`$echo $file|${SED} 's,.exe$,,'`
- noexename=`$echo $name|${SED} 's,.exe$,,'`
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ func_stripname '' '.exe' "$name"
+ noexename=$func_stripname_result
# $file with .exe has already been added to rmfiles,
# add $file without .exe
- rmfiles="$rmfiles $file"
+ func_append rmfiles " $file"
;;
esac
# Do a test to see if this is a libtool program.
- if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
- relink_command=
- . $dir/$noexename
+ if func_ltwrapper_p "$file"; then
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ relink_command=
+ func_source $func_ltwrapper_scriptname_result
+ func_append rmfiles " $func_ltwrapper_scriptname_result"
+ else
+ relink_command=
+ func_source $dir/$noexename
+ fi
# note $name still contains .exe if it was in $file originally
# as does the version of $file that was added into $rmfiles
- rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
+ func_append rmfiles " $odir/$name $odir/${name}S.${objext}"
if test "$fast_install" = yes && test -n "$relink_command"; then
- rmfiles="$rmfiles $objdir/lt-$name"
+ func_append rmfiles " $odir/lt-$name"
fi
if test "X$noexename" != "X$name" ; then
- rmfiles="$rmfiles $objdir/lt-${noexename}.c"
+ func_append rmfiles " $odir/lt-${noexename}.c"
fi
fi
fi
;;
esac
- $show "$rm $rmfiles"
- $run $rm $rmfiles || exit_status=1
+ func_show_eval "$RM $rmfiles" 'exit_status=1'
done
- objdir="$origobjdir"
# Try to remove the ${objdir}s in the directories where we deleted files
for dir in $rmdirs; do
if test -d "$dir"; then
- $show "rmdir $dir"
- $run rmdir $dir >/dev/null 2>&1
+ func_show_eval "rmdir $dir >/dev/null 2>&1"
fi
done
exit $exit_status
- ;;
+}
- "")
- $echo "$modename: you must specify a MODE" 1>&2
- $echo "$generic_help" 1>&2
- exit $EXIT_FAILURE
- ;;
- esac
+{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } &&
+ func_mode_uninstall ${1+"$@"}
- if test -z "$exec_cmd"; then
- $echo "$modename: invalid operation mode \`$mode'" 1>&2
- $echo "$generic_help" 1>&2
- exit $EXIT_FAILURE
- fi
-fi # test -z "$show_help"
+test -z "$opt_mode" && {
+ help="$generic_help"
+ func_fatal_help "you must specify a MODE"
+}
+
+test -z "$exec_cmd" && \
+ func_fatal_help "invalid operation mode \`$opt_mode'"
if test -n "$exec_cmd"; then
- eval exec $exec_cmd
+ eval exec "$exec_cmd"
exit $EXIT_FAILURE
fi
-# We need to display help for each of the modes.
-case $mode in
-"") $echo \
-"Usage: $modename [OPTION]... [MODE-ARG]...
-
-Provide generalized library-building support services.
-
- --config show all configuration variables
- --debug enable verbose shell tracing
--n, --dry-run display commands without modifying any files
- --features display basic configuration information and exit
- --finish same as \`--mode=finish'
- --help display this help message and exit
- --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
- --quiet same as \`--silent'
- --silent don't print informational messages
- --tag=TAG use configuration variables from tag TAG
- --version print version information
-
-MODE must be one of the following:
-
- clean remove files from the build directory
- compile compile a source file into a libtool object
- execute automatically set library path, then run a program
- finish complete the installation of libtool libraries
- install install libraries or executables
- link create a library or an executable
- uninstall remove libraries from an installed directory
-
-MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
-a more detailed description of MODE.
-
-Report bugs to <bug-libtool@gnu.org>."
- exit $EXIT_SUCCESS
- ;;
-
-clean)
- $echo \
-"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
-
-Remove files from the build directory.
-
-RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
-to RM.
-
-If FILE is a libtool library, object or program, all the files associated
-with it are deleted. Otherwise, only FILE itself is deleted using RM."
- ;;
-
-compile)
- $echo \
-"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
-
-Compile a source file into a libtool library object.
-
-This mode accepts the following additional options:
-
- -o OUTPUT-FILE set the output file name to OUTPUT-FILE
- -prefer-pic try to building PIC objects only
- -prefer-non-pic try to building non-PIC objects only
- -static always build a \`.o' file suitable for static linking
-
-COMPILE-COMMAND is a command to be used in creating a \`standard' object file
-from the given SOURCEFILE.
-
-The output file name is determined by removing the directory component from
-SOURCEFILE, then substituting the C source code suffix \`.c' with the
-library object suffix, \`.lo'."
- ;;
-
-execute)
- $echo \
-"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
-
-Automatically set library path, then run a program.
-
-This mode accepts the following additional options:
-
- -dlopen FILE add the directory containing FILE to the library path
-
-This mode sets the library path environment variable according to \`-dlopen'
-flags.
-
-If any of the ARGS are libtool executable wrappers, then they are translated
-into their corresponding uninstalled binary, and any of their required library
-directories are added to the library path.
-
-Then, COMMAND is executed, with ARGS as arguments."
- ;;
-
-finish)
- $echo \
-"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
-
-Complete the installation of libtool libraries.
-
-Each LIBDIR is a directory that contains libtool libraries.
-
-The commands that this mode executes may require superuser privileges. Use
-the \`--dry-run' option if you just want to see what would be executed."
- ;;
-
-install)
- $echo \
-"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
-
-Install executables or libraries.
-
-INSTALL-COMMAND is the installation command. The first component should be
-either the \`install' or \`cp' program.
-
-The rest of the components are interpreted as arguments to that command (only
-BSD-compatible install options are recognized)."
- ;;
-
-link)
- $echo \
-"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
-
-Link object files or libraries together to form another library, or to
-create an executable program.
-
-LINK-COMMAND is a command using the C compiler that you would use to create
-a program from several object files.
-
-The following components of LINK-COMMAND are treated specially:
-
- -all-static do not do any dynamic linking at all
- -avoid-version do not add a version suffix if possible
- -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
- -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
- -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
- -export-symbols SYMFILE
- try to export only the symbols listed in SYMFILE
- -export-symbols-regex REGEX
- try to export only the symbols matching REGEX
- -LLIBDIR search LIBDIR for required installed libraries
- -lNAME OUTPUT-FILE requires the installed library libNAME
- -module build a library that can dlopened
- -no-fast-install disable the fast-install mode
- -no-install link a not-installable executable
- -no-undefined declare that a library does not refer to external symbols
- -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
- -objectlist FILE Use a list of object files found in FILE to specify objects
- -precious-files-regex REGEX
- don't remove output files matching REGEX
- -release RELEASE specify package release information
- -rpath LIBDIR the created library will eventually be installed in LIBDIR
- -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
- -static do not do any dynamic linking of uninstalled libtool libraries
- -static-libtool-libs
- do not do any dynamic linking of libtool libraries
- -version-info CURRENT[:REVISION[:AGE]]
- specify library version info [each variable defaults to 0]
-
-All other options (arguments beginning with \`-') are ignored.
+exit $exit_status
-Every other argument is treated as a filename. Files ending in \`.la' are
-treated as uninstalled libtool libraries, other files are standard or library
-object files.
-
-If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
-only library objects (\`.lo' files) may be specified, and \`-rpath' is
-required, except when creating a convenience library.
-
-If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
-using \`ar' and \`ranlib', or on Windows using \`lib'.
-
-If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
-is created, otherwise an executable program is created."
- ;;
-
-uninstall)
- $echo \
-"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
-
-Remove libraries from an installation directory.
-
-RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
-to RM.
-
-If FILE is a libtool library, all the files associated with it are deleted.
-Otherwise, only FILE itself is deleted using RM."
- ;;
-
-*)
- $echo "$modename: invalid operation mode \`$mode'" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- ;;
-esac
-
-$echo
-$echo "Try \`$modename --help' for more information about other modes."
-
-exit $?
# The TAGs below are defined such that we never get into a situation
# in which we disable both kinds of libraries. Given conflicting
@@ -6973,14 +9671,17 @@ exit $?
# configuration. But we'll never go from static-only to shared-only.
# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
-disable_libs=shared
+build_libtool_libs=no
+build_old_libs=yes
# ### END LIBTOOL TAG CONFIG: disable-shared
# ### BEGIN LIBTOOL TAG CONFIG: disable-static
-disable_libs=static
+build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
# ### END LIBTOOL TAG CONFIG: disable-static
# Local Variables:
# mode:shell-script
# sh-indentation:2
# End:
+# vi:sw=2
+
diff --git a/contrib/openpam/misc/gendoc.pl b/contrib/openpam/misc/gendoc.pl
index 5c201cf..7b76672 100644
--- a/contrib/openpam/misc/gendoc.pl
+++ b/contrib/openpam/misc/gendoc.pl
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
#-
# Copyright (c) 2002-2003 Networks Associates Technology, Inc.
-# Copyright (c) 2004-2007 Dag-Erling Smørgrav
+# Copyright (c) 2004-2011 Dag-Erling Smørgrav
# All rights reserved.
#
# This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -33,7 +33,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
-# $Id: gendoc.pl 408 2007-12-21 11:36:24Z des $
+# $Id: gendoc.pl 465 2011-11-02 20:34:26Z des $
#
use strict;
@@ -41,11 +41,11 @@ use locale;
use Fcntl;
use Getopt::Std;
use POSIX qw(locale_h strftime);
-use vars qw($COPYRIGHT $TODAY %FUNCTIONS %PAMERR);
+use vars qw($COPYRIGHT %AUTHORS $TODAY %FUNCTIONS %PAMERR);
$COPYRIGHT = ".\\\"-
.\\\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
-.\\\" Copyright (c) 2004-2007 Dag-Erling Smørgrav
+.\\\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
.\\\" All rights reserved.
.\\\"
.\\\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -77,9 +77,18 @@ $COPYRIGHT = ".\\\"-
.\\\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\\\" SUCH DAMAGE.
.\\\"
-.\\\" \$" . "P4" . "\$
+.\\\" \$" . "Id" . "\$
.\\\"";
+%AUTHORS = (
+ THINKSEC => "ThinkSec AS and Network Associates Laboratories, the
+Security Research Division of Network Associates, Inc.\\& under
+DARPA/SPAWAR contract N66001-01-C-8035
+.Pq Dq CBOSS ,
+as part of the DARPA CHATS research program.",
+ DES => ".An Dag-Erling Sm\\(/orgrav Aq des\@FreeBSD.org .",
+);
+
%PAMERR = (
PAM_SUCCESS => "Success",
PAM_OPEN_ERR => "Failed to load module",
@@ -125,16 +134,18 @@ sub parse_source($) {
my $argnames;
my $man;
my $inlist;
+ my $intaglist;
my $inliteral;
my %xref;
my @errors;
+ my $author;
if ($fn !~ m,\.c$,) {
warn("$fn: not C source, ignoring\n");
return undef;
}
- sysopen(FILE, $fn, O_RDONLY)
+ open(FILE, "<", "$fn")
or die("$fn: open(): $!\n");
$source = join('', <FILE>);
close(FILE);
@@ -142,6 +153,11 @@ sub parse_source($) {
return undef
if ($source =~ m/^ \* NOPARSE\s*$/m);
+ $author = 'THINKSEC';
+ if ($source =~ s/^ \* AUTHOR\s+(.*?)\s*$//m) {
+ $author = $1;
+ }
+
$func = $fn;
$func =~ s,^(?:.*/)?([^/]+)\.c$,$1,;
if ($source !~ m,\n \* ([\S ]+)\n \*/\n\n([\S ]+)\n$func\((.*?)\)\n\{,s) {
@@ -181,7 +197,7 @@ sub parse_source($) {
# and surround with ()
$argnames =~ s/^\"(.*)\"$/($1)/;
# $argnames is now a regexp that matches argument names
- $inliteral = $inlist = 0;
+ $inliteral = $inlist = $intaglist = 0;
foreach (split("\n", $source)) {
s/\s*$//;
if (!defined($man)) {
@@ -194,12 +210,13 @@ sub parse_source($) {
s/^ \* ?//;
s/\\(.)/$1/gs;
if (m/^$/) {
+ # paragraph separator
if ($man ne "" && $man !~ m/\.Pp\n$/s) {
if ($inliteral) {
$man .= "\0\n";
- } elsif ($inlist) {
+ } elsif ($inlist || $intaglist) {
$man .= ".El\n.Pp\n";
- $inlist = 0;
+ $inlist = $intaglist = 0;
} else {
$man .= ".Pp\n";
}
@@ -207,35 +224,63 @@ sub parse_source($) {
next;
}
if (m/^>(\w+)(\s+\d)?$/) {
+ # "see also" cross-reference
my ($page, $sect) = ($1, $2 ? int($2) : 3);
++$xref{$sect}->{$page};
next;
}
- if (s/^\s+(=?\w+):\s*/.It $1/) {
+ if (s/^\s+-\s+//) {
+ # item in bullet list
if ($inliteral) {
$man .= ".Ed\n";
$inliteral = 0;
}
+ if ($intaglist) {
+ $man .= ".El\n.Pp\n";
+ $intaglist = 0;
+ }
if (!$inlist) {
$man =~ s/\.Pp\n$//s;
- $man .= ".Bl -tag -width 18n\n";
+ $man .= ".Bl -bullet\n";
$inlist = 1;
}
+ $man .= ".It\n";
+ # fall through
+ } elsif (s/^\s+(\S+):\s*/.It $1/) {
+ # item in tag list
+ if ($inliteral) {
+ $man .= ".Ed\n";
+ $inliteral = 0;
+ }
+ if ($inlist) {
+ $man .= ".El\n.Pp\n";
+ $inlist = 0;
+ }
+ if (!$intaglist) {
+ $man =~ s/\.Pp\n$//s;
+ $man .= ".Bl -tag -width 18n\n";
+ $intaglist = 1;
+ }
s/^\.It =([A-Z][A-Z_]+)$/.It Dv $1/gs;
$man .= "$_\n";
next;
- } elsif ($inlist && m/^\S/) {
+ } elsif (($inlist || $intaglist) && m/^\S/) {
+ # regular text after list
$man .= ".El\n.Pp\n";
- $inlist = 0;
+ $inlist = $intaglist = 0;
} elsif ($inliteral && m/^\S/) {
+ # regular text after literal section
$man .= ".Ed\n";
$inliteral = 0;
} elsif ($inliteral) {
+ # additional text within literal section
$man .= "$_\n";
next;
- } elsif ($inlist) {
+ } elsif ($inlist || $intaglist) {
+ # additional text within list
s/^\s+//;
} elsif (m/^\s+/) {
+ # new literal section
$man .= ".Bd -literal\n";
$inliteral = 1;
$man .= "$_\n";
@@ -257,12 +302,15 @@ sub parse_source($) {
$man .= "$_\n";
}
if (defined($man)) {
- if ($inlist) {
+ if ($inlist || $intaglist) {
$man .= ".El\n";
+ $inlist = $intaglist = 0;
}
if ($inliteral) {
$man .= ".Ed\n";
+ $inliteral = 0;
}
+ $man =~ s/\%/\\&\%/gs;
$man =~ s/(\n\.[A-Z][a-z] [\w ]+)\n([\.,:;-]\S*)\s*/$1 $2\n/gs;
$man =~ s/\s*$/\n/gm;
$man =~ s/\n+/\n/gs;
@@ -282,6 +330,7 @@ sub parse_source($) {
'man' => $man,
'xref' => \%xref,
'errors' => \@errors,
+ 'author' => $author,
};
if ($source =~ m/^ \* NODOC\s*$/m) {
$FUNCTIONS{$func}->{'nodoc'} = 1;
@@ -445,15 +494,9 @@ The
.Nm
function and this manual page were developed for the
.Fx
-Project by ThinkSec AS and Network Associates Laboratories, the
-Security Research Division of Network Associates, Inc.\\& under
-DARPA/SPAWAR contract N66001-01-C-8035
-.Pq Dq CBOSS ,
-as part of the DARPA CHATS research program.
-";
-
+Project by\n" . $AUTHORS{$func->{'author'} // 'THINKSEC_DARPA'} . "\n";
$fn = "$func->{'name'}.3";
- if (sysopen(FILE, $fn, O_RDWR|O_CREAT|O_TRUNC)) {
+ if (open(FILE, ">", $fn)) {
print(FILE $mdoc);
close(FILE);
} else {
@@ -467,7 +510,7 @@ sub readproto($) {
local *FILE;
my %func;
- sysopen(FILE, $fn, O_RDONLY)
+ open(FILE, "<", "$fn")
or die("$fn: open(): $!\n");
while (<FILE>) {
if (m/^\.Nm ((?:open)?pam_.*?)\s*$/) {
@@ -494,10 +537,11 @@ sub gensummary($) {
my $func;
my %xref;
- sysopen(FILE, "$page.3", O_RDWR|O_CREAT|O_TRUNC)
+ open(FILE, ">", "$page.3")
or die("$page.3: $!\n");
- $upage = uc($page);
+ $page =~ m/(\w+)$/;
+ $upage = uc($1);
print FILE "$COPYRIGHT
.Dd $TODAY
.Dt $upage 3
@@ -570,7 +614,7 @@ as part of the DARPA CHATS research program.
sub usage() {
- print(STDERR "usage: gendoc [-s] source [...]\n");
+ print(STDERR "usage: gendoc [-op] source [...]\n");
exit(1);
}
@@ -579,7 +623,7 @@ MAIN:{
usage()
unless (@ARGV && getopts("op", \%opts));
- setlocale(LC_ALL, "en_US.ISO8859-1");
+ setlocale(LC_ALL, "en_US.UTF-8");
$TODAY = strftime("%B %e, %Y", localtime(time()));
$TODAY =~ s,\s+, ,g;
if ($opts{'o'} || $opts{'p'}) {
diff --git a/contrib/openpam/missing b/contrib/openpam/missing
index 894e786..28055d2 100644
--- a/contrib/openpam/missing
+++ b/contrib/openpam/missing
@@ -1,10 +1,10 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
-scriptversion=2005-06-08.21
+scriptversion=2009-04-28.21; # UTC
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
+# 2008, 2009 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
@@ -18,9 +18,7 @@ scriptversion=2005-06-08.21
# 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., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -33,6 +31,8 @@ if test $# -eq 0; then
fi
run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
# In the cases where this matters, `missing' is being run in the
# srcdir already.
@@ -44,7 +44,7 @@ fi
msg="missing on your system"
-case "$1" in
+case $1 in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
@@ -77,6 +77,7 @@ Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
+ autom4te touch the output file, or create a stub one
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
@@ -86,6 +87,9 @@ Supported PROGRAM values:
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
+Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
+\`g' are ignored when checking the name.
+
Send bug reports to <bug-automake@gnu.org>."
exit $?
;;
@@ -103,15 +107,22 @@ Send bug reports to <bug-automake@gnu.org>."
esac
+# normalize program name to check for.
+program=`echo "$1" | sed '
+ s/^gnu-//; t
+ s/^gnu//; t
+ s/^g//; t'`
+
# Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect
-# the program).
-case "$1" in
- lex|yacc)
+# the program). This is about non-GNU programs, so use $1 not
+# $program.
+case $1 in
+ lex*|yacc*)
# Not GNU programs, they don't have --version.
;;
- tar)
+ tar*)
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
@@ -135,7 +146,7 @@ esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
-case "$1" in
+case $program in
aclocal*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
@@ -145,7 +156,7 @@ WARNING: \`$1' is $msg. You should only need it if
touch aclocal.m4
;;
- autoconf)
+ autoconf*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`${configure_ac}'. You might want to install the
@@ -154,7 +165,7 @@ WARNING: \`$1' is $msg. You should only need it if
touch configure
;;
- autoheader)
+ autoheader*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
@@ -164,7 +175,7 @@ WARNING: \`$1' is $msg. You should only need it if
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
- case "$f" in
+ case $f in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
@@ -184,7 +195,7 @@ WARNING: \`$1' is $msg. You should only need it if
while read f; do touch "$f"; done
;;
- autom4te)
+ autom4te*)
echo 1>&2 "\
WARNING: \`$1' is needed, but is $msg.
You might have modified some files without having the
@@ -192,8 +203,8 @@ WARNING: \`$1' is needed, but is $msg.
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
- file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
- test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -f "$file"; then
touch $file
else
@@ -207,80 +218,78 @@ WARNING: \`$1' is needed, but is $msg.
fi
;;
- bison|yacc)
+ bison*|yacc*)
echo 1>&2 "\
WARNING: \`$1' $msg. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
- if [ $# -ne 1 ]; then
+ if test $# -ne 1; then
eval LASTARG="\${$#}"
- case "$LASTARG" in
+ case $LASTARG in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
- if [ -f "$SRCFILE" ]; then
+ if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
- if [ -f "$SRCFILE" ]; then
+ if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
- if [ ! -f y.tab.h ]; then
+ if test ! -f y.tab.h; then
echo >y.tab.h
fi
- if [ ! -f y.tab.c ]; then
+ if test ! -f y.tab.c; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
- lex|flex)
+ lex*|flex*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
- if [ $# -ne 1 ]; then
+ if test $# -ne 1; then
eval LASTARG="\${$#}"
- case "$LASTARG" in
+ case $LASTARG in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
- if [ -f "$SRCFILE" ]; then
+ if test -f "$SRCFILE"; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
- if [ ! -f lex.yy.c ]; then
+ if test ! -f lex.yy.c; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
- help2man)
+ help2man*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
- file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
- if test -z "$file"; then
- file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
- fi
- if [ -f "$file" ]; then
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
- exit 1
+ exit $?
fi
;;
- makeinfo)
+ makeinfo*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
@@ -289,11 +298,17 @@ WARNING: \`$1' is $msg. You should only need it if
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
# The file to touch is that specified with -o ...
- file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -z "$file"; then
# ... or it is the one specified with @setfilename ...
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
- file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
+ file=`sed -n '
+ /^@setfilename/{
+ s/.* \([^ ]*\) *$/\1/
+ p
+ q
+ }' $infile`
# ... or it is derived from the source name (dir/f.texi becomes f.info)
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
fi
@@ -303,7 +318,7 @@ WARNING: \`$1' is $msg. You should only need it if
touch $file
;;
- tar)
+ tar*)
shift
# We have already tried tar in the generic part.
@@ -317,13 +332,13 @@ WARNING: \`$1' is $msg. You should only need it if
fi
firstarg="$1"
if shift; then
- case "$firstarg" in
+ case $firstarg in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
- case "$firstarg" in
+ case $firstarg in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
@@ -356,5 +371,6 @@ exit 0
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
# End:
diff --git a/contrib/openpam/modules/Makefile.in b/contrib/openpam/modules/Makefile.in
index d2bb127..ca117d0 100644
--- a/contrib/openpam/modules/Makefile.in
+++ b/contrib/openpam/modules/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -15,15 +16,12 @@
@SET_MAKE@
# $Id: Makefile.am 320 2006-02-16 20:33:19Z des $
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -37,7 +35,6 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-target_triplet = @target@
subdir = modules
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -47,21 +44,51 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
- install-exec-recursive install-info-recursive \
- install-recursive installcheck-recursive installdirs-recursive \
- pdf-recursive ps-recursive uninstall-info-recursive \
- uninstall-recursive
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -74,42 +101,50 @@ CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CRYPT_LIBS = @CRYPT_LIBS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
DL_LIBS = @DL_LIBS@
-ECHO = @ECHO@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
GREP = @GREP@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIB_MAJ = @LIB_MAJ@
+LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPENPAM_MODULES_DIR = @OPENPAM_MODULES_DIR@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
@@ -118,19 +153,13 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
-WITH_DOC_FALSE = @WITH_DOC_FALSE@
-WITH_DOC_TRUE = @WITH_DOC_TRUE@
-WITH_PAM_UNIX_FALSE = @WITH_PAM_UNIX_FALSE@
-WITH_PAM_UNIX_TRUE = @WITH_PAM_UNIX_TRUE@
-WITH_SU_FALSE = @WITH_SU_FALSE@
-WITH_SU_TRUE = @WITH_SU_TRUE@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -142,6 +171,7 @@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
@@ -169,12 +199,12 @@ program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
-target = @target@
target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
SUBDIRS = pam_unix pam_deny pam_permit
all: all-recursive
@@ -183,14 +213,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign modules/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign modules/Makefile
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign modules/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign modules/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -208,6 +238,7 @@ $(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
mostlyclean-libtool:
-rm -f *.lo
@@ -215,10 +246,6 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
@@ -226,7 +253,7 @@ uninstall-info-am:
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
- @failcom='exit 1'; \
+ @fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
@@ -243,16 +270,15 @@ $(RECURSIVE_TARGETS):
else \
local_target="$$target"; \
fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
- @failcom='exit 1'; \
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
@@ -278,16 +304,16 @@ maintainer-clean-recursive:
else \
local_target="$$target"; \
fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@@ -295,14 +321,14 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
+ set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
@@ -314,81 +340,101 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
- tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
+ $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
- list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
- || $(mkdir_p) "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
- distdir=`$(am__cd) $(distdir) && pwd`; \
- top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
- (cd $$subdir && \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$$top_distdir" \
- distdir="$$distdir/$$subdir" \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
@@ -418,6 +464,7 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -428,8 +475,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-recursive
-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
- distclean-tags
+distclean-am: clean-am distclean-generic distclean-tags
dvi: dvi-recursive
@@ -437,18 +483,38 @@ dvi-am:
html: html-recursive
+html-am:
+
info: info-recursive
info-am:
install-data-am:
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
install-exec-am:
+install-html: install-html-recursive
+
+install-html-am:
+
install-info: install-info-recursive
+install-info-am:
+
install-man:
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
installcheck-am:
maintainer-clean: maintainer-clean-recursive
@@ -467,22 +533,25 @@ ps: ps-recursive
ps-am:
-uninstall-am: uninstall-info-am
+uninstall-am:
-uninstall-info: uninstall-info-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+ install-am install-strip tags-recursive
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
- clean clean-generic clean-libtool clean-recursive ctags \
- ctags-recursive distclean distclean-generic distclean-libtool \
- distclean-recursive distclean-tags distdir dvi dvi-am html \
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am check check-am clean clean-generic clean-libtool \
+ ctags ctags-recursive distclean distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
- install-data-am install-exec install-exec-am install-info \
- install-info-am install-man install-strip installcheck \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic maintainer-clean-recursive \
- mostlyclean mostlyclean-generic mostlyclean-libtool \
- mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
- uninstall uninstall-am uninstall-info-am
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/contrib/openpam/modules/pam_deny/Makefile.in b/contrib/openpam/modules/pam_deny/Makefile.in
index d6649a9..7c5855c 100644
--- a/contrib/openpam/modules/pam_deny/Makefile.in
+++ b/contrib/openpam/modules/pam_deny/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -16,14 +17,11 @@
# $Id: Makefile.am 320 2006-02-16 20:33:19Z des $
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -37,7 +35,6 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-target_triplet = @target@
subdir = modules/pam_deny
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -47,29 +44,49 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__installdirs = "$(DESTDIR)$(pkglibdir)"
-pkglibLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(pkglib_LTLIBRARIES)
pam_deny_la_DEPENDENCIES = $(top_builddir)/lib/libpam.la
am_pam_deny_la_OBJECTS = pam_deny.lo
pam_deny_la_OBJECTS = $(am_pam_deny_la_OBJECTS)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+pam_deny_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(pam_deny_la_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
+am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
SOURCES = $(pam_deny_la_SOURCES)
DIST_SOURCES = $(pam_deny_la_SOURCES)
ETAGS = etags
@@ -77,8 +94,6 @@ CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
pkglibdir = @OPENPAM_MODULES_DIR@
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -91,42 +106,50 @@ CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CRYPT_LIBS = @CRYPT_LIBS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
DL_LIBS = @DL_LIBS@
-ECHO = @ECHO@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
GREP = @GREP@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIB_MAJ = @LIB_MAJ@
+LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPENPAM_MODULES_DIR = @OPENPAM_MODULES_DIR@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
@@ -135,19 +158,13 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
-WITH_DOC_FALSE = @WITH_DOC_FALSE@
-WITH_DOC_TRUE = @WITH_DOC_TRUE@
-WITH_PAM_UNIX_FALSE = @WITH_PAM_UNIX_FALSE@
-WITH_PAM_UNIX_TRUE = @WITH_PAM_UNIX_TRUE@
-WITH_SU_FALSE = @WITH_SU_FALSE@
-WITH_SU_TRUE = @WITH_SU_TRUE@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -159,6 +176,7 @@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
@@ -186,12 +204,12 @@ program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
-target = @target@
target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
INCLUDES = -I$(top_srcdir)/include
pkglib_LTLIBRARIES = pam_deny.la
pam_deny_la_SOURCES = pam_deny.c
@@ -205,14 +223,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign modules/pam_deny/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign modules/pam_deny/Makefile
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign modules/pam_deny/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign modules/pam_deny/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -230,23 +248,28 @@ $(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(pkglibdir)" || $(mkdir_p) "$(DESTDIR)$(pkglibdir)"
- @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \
+ test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)"
+ @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
+ list2=; for p in $$list; do \
if test -f $$p; then \
- f=$(am__strip_dir) \
- echo " $(LIBTOOL) --mode=install $(pkglibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pkglibdir)/$$f'"; \
- $(LIBTOOL) --mode=install $(pkglibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pkglibdir)/$$f"; \
+ list2="$$list2 $$p"; \
else :; fi; \
- done
+ done; \
+ test -z "$$list2" || { \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \
+ }
uninstall-pkglibLTLIBRARIES:
@$(NORMAL_UNINSTALL)
- @set -x; list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \
- p=$(am__strip_dir) \
- echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$p'"; \
- $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$p"; \
+ @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \
done
clean-pkglibLTLIBRARIES:
@@ -258,7 +281,7 @@ clean-pkglibLTLIBRARIES:
rm -f "$${dir}/so_locations"; \
done
pam_deny.la: $(pam_deny_la_OBJECTS) $(pam_deny_la_DEPENDENCIES)
- $(LINK) -rpath $(pkglibdir) $(pam_deny_la_LDFLAGS) $(pam_deny_la_OBJECTS) $(pam_deny_la_LIBADD) $(LIBS)
+ $(pam_deny_la_LINK) -rpath $(pkglibdir) $(pam_deny_la_OBJECTS) $(pam_deny_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -269,22 +292,22 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pam_deny.Plo@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@ -295,82 +318,85 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
+ set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
+ $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@@ -379,7 +405,7 @@ check: check-am
all-am: Makefile $(LTLIBRARIES)
installdirs:
for dir in "$(DESTDIR)$(pkglibdir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
@@ -401,6 +427,7 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -414,7 +441,7 @@ distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
- distclean-libtool distclean-tags
+ distclean-tags
dvi: dvi-am
@@ -422,18 +449,38 @@ dvi-am:
html: html-am
+html-am:
+
info: info-am
info-am:
install-data-am:
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
install-exec-am: install-pkglibLTLIBRARIES
+install-html: install-html-am
+
+install-html-am:
+
install-info: install-info-am
+install-info-am:
+
install-man:
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -454,20 +501,24 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-info-am uninstall-pkglibLTLIBRARIES
+uninstall-am: uninstall-pkglibLTLIBRARIES
+
+.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool clean-pkglibLTLIBRARIES ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-exec \
- install-exec-am install-info install-info-am install-man \
- install-pkglibLTLIBRARIES install-strip installcheck \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-pkglibLTLIBRARIES \
+ install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags uninstall uninstall-am uninstall-info-am \
- uninstall-pkglibLTLIBRARIES
+ tags uninstall uninstall-am uninstall-pkglibLTLIBRARIES
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/contrib/openpam/modules/pam_deny/pam_deny.c b/contrib/openpam/modules/pam_deny/pam_deny.c
index f892b65..cbd3c4f 100644
--- a/contrib/openpam/modules/pam_deny/pam_deny.c
+++ b/contrib/openpam/modules/pam_deny/pam_deny.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,11 +32,11 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_deny.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_deny.c 437 2011-09-13 12:00:13Z des $
*/
#ifdef HAVE_CONFIG_H
-# include <config.h>
+# include "config.h"
#endif
#include <sys/param.h>
diff --git a/contrib/openpam/modules/pam_permit/Makefile.in b/contrib/openpam/modules/pam_permit/Makefile.in
index be85dd6..b0eb273 100644
--- a/contrib/openpam/modules/pam_permit/Makefile.in
+++ b/contrib/openpam/modules/pam_permit/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -16,14 +17,11 @@
# $Id: Makefile.am 320 2006-02-16 20:33:19Z des $
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -37,7 +35,6 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-target_triplet = @target@
subdir = modules/pam_permit
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -47,29 +44,49 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__installdirs = "$(DESTDIR)$(pkglibdir)"
-pkglibLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(pkglib_LTLIBRARIES)
pam_permit_la_DEPENDENCIES = $(top_builddir)/lib/libpam.la
am_pam_permit_la_OBJECTS = pam_permit.lo
pam_permit_la_OBJECTS = $(am_pam_permit_la_OBJECTS)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+pam_permit_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(pam_permit_la_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
+am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
SOURCES = $(pam_permit_la_SOURCES)
DIST_SOURCES = $(pam_permit_la_SOURCES)
ETAGS = etags
@@ -77,8 +94,6 @@ CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
pkglibdir = @OPENPAM_MODULES_DIR@
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -91,42 +106,50 @@ CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CRYPT_LIBS = @CRYPT_LIBS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
DL_LIBS = @DL_LIBS@
-ECHO = @ECHO@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
GREP = @GREP@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIB_MAJ = @LIB_MAJ@
+LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPENPAM_MODULES_DIR = @OPENPAM_MODULES_DIR@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
@@ -135,19 +158,13 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
-WITH_DOC_FALSE = @WITH_DOC_FALSE@
-WITH_DOC_TRUE = @WITH_DOC_TRUE@
-WITH_PAM_UNIX_FALSE = @WITH_PAM_UNIX_FALSE@
-WITH_PAM_UNIX_TRUE = @WITH_PAM_UNIX_TRUE@
-WITH_SU_FALSE = @WITH_SU_FALSE@
-WITH_SU_TRUE = @WITH_SU_TRUE@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -159,6 +176,7 @@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
@@ -186,12 +204,12 @@ program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
-target = @target@
target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
INCLUDES = -I$(top_srcdir)/include
pkglib_LTLIBRARIES = pam_permit.la
pam_permit_la_SOURCES = pam_permit.c
@@ -205,14 +223,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign modules/pam_permit/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign modules/pam_permit/Makefile
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign modules/pam_permit/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign modules/pam_permit/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -230,23 +248,28 @@ $(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(pkglibdir)" || $(mkdir_p) "$(DESTDIR)$(pkglibdir)"
- @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \
+ test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)"
+ @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
+ list2=; for p in $$list; do \
if test -f $$p; then \
- f=$(am__strip_dir) \
- echo " $(LIBTOOL) --mode=install $(pkglibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pkglibdir)/$$f'"; \
- $(LIBTOOL) --mode=install $(pkglibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pkglibdir)/$$f"; \
+ list2="$$list2 $$p"; \
else :; fi; \
- done
+ done; \
+ test -z "$$list2" || { \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \
+ }
uninstall-pkglibLTLIBRARIES:
@$(NORMAL_UNINSTALL)
- @set -x; list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \
- p=$(am__strip_dir) \
- echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$p'"; \
- $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$p"; \
+ @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \
done
clean-pkglibLTLIBRARIES:
@@ -258,7 +281,7 @@ clean-pkglibLTLIBRARIES:
rm -f "$${dir}/so_locations"; \
done
pam_permit.la: $(pam_permit_la_OBJECTS) $(pam_permit_la_DEPENDENCIES)
- $(LINK) -rpath $(pkglibdir) $(pam_permit_la_LDFLAGS) $(pam_permit_la_OBJECTS) $(pam_permit_la_LIBADD) $(LIBS)
+ $(pam_permit_la_LINK) -rpath $(pkglibdir) $(pam_permit_la_OBJECTS) $(pam_permit_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -269,22 +292,22 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pam_permit.Plo@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@ -295,82 +318,85 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
+ set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
+ $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@@ -379,7 +405,7 @@ check: check-am
all-am: Makefile $(LTLIBRARIES)
installdirs:
for dir in "$(DESTDIR)$(pkglibdir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
@@ -401,6 +427,7 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -414,7 +441,7 @@ distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
- distclean-libtool distclean-tags
+ distclean-tags
dvi: dvi-am
@@ -422,18 +449,38 @@ dvi-am:
html: html-am
+html-am:
+
info: info-am
info-am:
install-data-am:
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
install-exec-am: install-pkglibLTLIBRARIES
+install-html: install-html-am
+
+install-html-am:
+
install-info: install-info-am
+install-info-am:
+
install-man:
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -454,20 +501,24 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-info-am uninstall-pkglibLTLIBRARIES
+uninstall-am: uninstall-pkglibLTLIBRARIES
+
+.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool clean-pkglibLTLIBRARIES ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-exec \
- install-exec-am install-info install-info-am install-man \
- install-pkglibLTLIBRARIES install-strip installcheck \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-pkglibLTLIBRARIES \
+ install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags uninstall uninstall-am uninstall-info-am \
- uninstall-pkglibLTLIBRARIES
+ tags uninstall uninstall-am uninstall-pkglibLTLIBRARIES
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/contrib/openpam/modules/pam_permit/pam_permit.c b/contrib/openpam/modules/pam_permit/pam_permit.c
index a90b170..b06176d 100644
--- a/contrib/openpam/modules/pam_permit/pam_permit.c
+++ b/contrib/openpam/modules/pam_permit/pam_permit.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,11 +32,11 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_permit.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_permit.c 437 2011-09-13 12:00:13Z des $
*/
#ifdef HAVE_CONFIG_H
-# include <config.h>
+# include "config.h"
#endif
#include <sys/param.h>
diff --git a/contrib/openpam/modules/pam_unix/Makefile.am b/contrib/openpam/modules/pam_unix/Makefile.am
index 76d8d93..ad1ec67 100644
--- a/contrib/openpam/modules/pam_unix/Makefile.am
+++ b/contrib/openpam/modules/pam_unix/Makefile.am
@@ -1,4 +1,4 @@
-# $Id: Makefile.am 320 2006-02-16 20:33:19Z des $
+# $Id: Makefile.am 429 2010-03-09 17:51:29Z des $
pkglibdir = @OPENPAM_MODULES_DIR@
INCLUDES = -I$(top_srcdir)/include
@@ -7,6 +7,6 @@ if WITH_PAM_UNIX
pkglib_LTLIBRARIES = pam_unix.la
pam_unix_la_SOURCES = pam_unix.c
-pam_unix_la_LDFLAGS = -no-undefined -module -version-info @LIB_MAJ@ @CRYPT_LIBS@
-pam_unix_la_LIBADD = $(top_builddir)/lib/libpam.la
+pam_unix_la_LDFLAGS = -no-undefined -module -version-info @LIB_MAJ@
+pam_unix_la_LIBADD = $(top_builddir)/lib/libpam.la @CRYPT_LIBS@
endif
diff --git a/contrib/openpam/modules/pam_unix/Makefile.in b/contrib/openpam/modules/pam_unix/Makefile.in
index 8bec11d..4119fe0 100644
--- a/contrib/openpam/modules/pam_unix/Makefile.in
+++ b/contrib/openpam/modules/pam_unix/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -14,16 +15,13 @@
@SET_MAKE@
-# $Id: Makefile.am 320 2006-02-16 20:33:19Z des $
+# $Id: Makefile.am 429 2010-03-09 17:51:29Z des $
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -37,7 +35,6 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-target_triplet = @target@
subdir = modules/pam_unix
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -47,32 +44,52 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__installdirs = "$(DESTDIR)$(pkglibdir)"
-pkglibLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(pkglib_LTLIBRARIES)
@WITH_PAM_UNIX_TRUE@pam_unix_la_DEPENDENCIES = \
@WITH_PAM_UNIX_TRUE@ $(top_builddir)/lib/libpam.la
am__pam_unix_la_SOURCES_DIST = pam_unix.c
@WITH_PAM_UNIX_TRUE@am_pam_unix_la_OBJECTS = pam_unix.lo
pam_unix_la_OBJECTS = $(am_pam_unix_la_OBJECTS)
+pam_unix_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(pam_unix_la_LDFLAGS) $(LDFLAGS) -o $@
@WITH_PAM_UNIX_TRUE@am_pam_unix_la_rpath = -rpath $(pkglibdir)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
+am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
SOURCES = $(pam_unix_la_SOURCES)
DIST_SOURCES = $(am__pam_unix_la_SOURCES_DIST)
ETAGS = etags
@@ -80,8 +97,6 @@ CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
pkglibdir = @OPENPAM_MODULES_DIR@
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -94,42 +109,50 @@ CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CRYPT_LIBS = @CRYPT_LIBS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
DL_LIBS = @DL_LIBS@
-ECHO = @ECHO@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
GREP = @GREP@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIB_MAJ = @LIB_MAJ@
+LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPENPAM_MODULES_DIR = @OPENPAM_MODULES_DIR@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
@@ -138,19 +161,13 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
-WITH_DOC_FALSE = @WITH_DOC_FALSE@
-WITH_DOC_TRUE = @WITH_DOC_TRUE@
-WITH_PAM_UNIX_FALSE = @WITH_PAM_UNIX_FALSE@
-WITH_PAM_UNIX_TRUE = @WITH_PAM_UNIX_TRUE@
-WITH_SU_FALSE = @WITH_SU_FALSE@
-WITH_SU_TRUE = @WITH_SU_TRUE@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -162,6 +179,7 @@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
@@ -189,17 +207,17 @@ program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
-target = @target@
target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
INCLUDES = -I$(top_srcdir)/include
@WITH_PAM_UNIX_TRUE@pkglib_LTLIBRARIES = pam_unix.la
@WITH_PAM_UNIX_TRUE@pam_unix_la_SOURCES = pam_unix.c
-@WITH_PAM_UNIX_TRUE@pam_unix_la_LDFLAGS = -no-undefined -module -version-info @LIB_MAJ@ @CRYPT_LIBS@
-@WITH_PAM_UNIX_TRUE@pam_unix_la_LIBADD = $(top_builddir)/lib/libpam.la
+@WITH_PAM_UNIX_TRUE@pam_unix_la_LDFLAGS = -no-undefined -module -version-info @LIB_MAJ@
+@WITH_PAM_UNIX_TRUE@pam_unix_la_LIBADD = $(top_builddir)/lib/libpam.la @CRYPT_LIBS@
all: all-am
.SUFFIXES:
@@ -208,14 +226,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign modules/pam_unix/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign modules/pam_unix/Makefile
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign modules/pam_unix/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign modules/pam_unix/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -233,23 +251,28 @@ $(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(pkglibdir)" || $(mkdir_p) "$(DESTDIR)$(pkglibdir)"
- @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \
+ test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)"
+ @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
+ list2=; for p in $$list; do \
if test -f $$p; then \
- f=$(am__strip_dir) \
- echo " $(LIBTOOL) --mode=install $(pkglibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pkglibdir)/$$f'"; \
- $(LIBTOOL) --mode=install $(pkglibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pkglibdir)/$$f"; \
+ list2="$$list2 $$p"; \
else :; fi; \
- done
+ done; \
+ test -z "$$list2" || { \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \
+ }
uninstall-pkglibLTLIBRARIES:
@$(NORMAL_UNINSTALL)
- @set -x; list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \
- p=$(am__strip_dir) \
- echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$p'"; \
- $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$p"; \
+ @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \
done
clean-pkglibLTLIBRARIES:
@@ -261,7 +284,7 @@ clean-pkglibLTLIBRARIES:
rm -f "$${dir}/so_locations"; \
done
pam_unix.la: $(pam_unix_la_OBJECTS) $(pam_unix_la_DEPENDENCIES)
- $(LINK) $(am_pam_unix_la_rpath) $(pam_unix_la_LDFLAGS) $(pam_unix_la_OBJECTS) $(pam_unix_la_LIBADD) $(LIBS)
+ $(pam_unix_la_LINK) $(am_pam_unix_la_rpath) $(pam_unix_la_OBJECTS) $(pam_unix_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -272,22 +295,22 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pam_unix.Plo@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@ -298,82 +321,85 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
+ set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
+ $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@@ -382,7 +408,7 @@ check: check-am
all-am: Makefile $(LTLIBRARIES)
installdirs:
for dir in "$(DESTDIR)$(pkglibdir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
@@ -404,6 +430,7 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -417,7 +444,7 @@ distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
- distclean-libtool distclean-tags
+ distclean-tags
dvi: dvi-am
@@ -425,18 +452,38 @@ dvi-am:
html: html-am
+html-am:
+
info: info-am
info-am:
install-data-am:
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
install-exec-am: install-pkglibLTLIBRARIES
+install-html: install-html-am
+
+install-html-am:
+
install-info: install-info-am
+install-info-am:
+
install-man:
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -457,20 +504,24 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-info-am uninstall-pkglibLTLIBRARIES
+uninstall-am: uninstall-pkglibLTLIBRARIES
+
+.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool clean-pkglibLTLIBRARIES ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-exec \
- install-exec-am install-info install-info-am install-man \
- install-pkglibLTLIBRARIES install-strip installcheck \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-pkglibLTLIBRARIES \
+ install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags uninstall uninstall-am uninstall-info-am \
- uninstall-pkglibLTLIBRARIES
+ tags uninstall uninstall-am uninstall-pkglibLTLIBRARIES
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/contrib/openpam/modules/pam_unix/pam_unix.c b/contrib/openpam/modules/pam_unix/pam_unix.c
index c2ad03e..6bd35cf 100644
--- a/contrib/openpam/modules/pam_unix/pam_unix.c
+++ b/contrib/openpam/modules/pam_unix/pam_unix.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2007 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2011 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,11 +32,11 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_unix.c 408 2007-12-21 11:36:24Z des $
+ * $Id: pam_unix.c 437 2011-09-13 12:00:13Z des $
*/
#ifdef HAVE_CONFIG_H
-# include <config.h>
+# include "config.h"
#endif
#include <sys/param.h>
diff --git a/contrib/pf/man/pfsync.4 b/contrib/pf/man/pfsync.4
index 92534f7..b00bf9d 100644
--- a/contrib/pf/man/pfsync.4
+++ b/contrib/pf/man/pfsync.4
@@ -26,7 +26,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd February 17 2009
+.Dd December 20 2011
.Dt PFSYNC 4
.Os
.Sh NAME
@@ -114,6 +114,23 @@ Either run the pfsync protocol on a trusted network \- ideally a network
dedicated to pfsync messages such as a crossover cable between two firewalls,
or specify a peer address and protect the traffic with
.Xr ipsec 4 .
+.Pp
+.Nm
+has the following
+.Xr sysctl 8
+tunables:
+.Bl -tag -width ".Va net.pfsync"
+.It Va net.pfsync.carp_demotion_factor
+Value added to
+.Va net.inet.carp.demotion
+while
+.Nm
+tries to perform its bulk update.
+See
+.Xr carp 4
+for more information.
+Default value is 240.
+.El
.Sh EXAMPLES
.Nm
and
@@ -141,12 +158,11 @@ Interfaces configuration in
.Pa /etc/rc.conf :
.Bd -literal -offset indent
network_interfaces="lo0 sis0 sis1 sis2"
-cloned_interfaces="carp0 carp1"
ifconfig_sis0="10.0.0.254/24"
+ifconfig_sis0_alias0="inet 10.0.0.1/24 vhid 1 pass foo"
ifconfig_sis1="192.168.0.254/24"
+ifconfig_sis1_alias0="inet 192.168.0.1/24 vhid 2 pass bar"
ifconfig_sis2="192.168.254.254/24"
-ifconfig_carp0="vhid 1 pass foo 10.0.0.1/24"
-ifconfig_carp1="vhid 2 pass bar 192.168.0.1/24"
pfsync_enable="YES"
pfsync_syncdev="sis2"
.Ed
@@ -169,13 +185,13 @@ therefore the
.Ar advskew
on the backup firewall's
.Xr carp 4
-interfaces should be set to something higher than
+vhids should be set to something higher than
the primary's.
For example, if firewall B is the backup, its
carp1 configuration would look like this:
would look like this:
.Bd -literal -offset indent
-ifconfig_carp1="vhid 2 pass bar advskew 100 192.168.0.1/24"
+ifconfig_sis1_alias0="inet 192.168.0.1/24 vhid 2 pass bar advskew 100"
.Ed
.Pp
The following must also be added to
@@ -196,18 +212,18 @@ net.inet.carp.preempt=1
.Xr protocols 5 ,
.Xr rc.conf 5 ,
.Xr ifconfig 8 ,
-.Xr ifstated 8 ,
.Xr tcpdump 1
.Sh HISTORY
The
.Nm
device first appeared in
.Ox 3.3 .
+It was first imported to
+.Fx 5.3 .
.Pp
The
.Nm
-protocol and kernel implementation were significantly modified between
-.Ox 4.4
-and
-.Ox 4.5 .
-The two protocols are incompatible and will not interoperate.
+protocol and kernel implementation were significantly modified in
+.Fx 9.0 .
+The newer protocol is not compatible with older one and will not interoperate
+with it.
diff --git a/contrib/pf/pfctl/pfctl.8 b/contrib/pf/pfctl/pfctl.8
index 0730443..b178a07 100644
--- a/contrib/pf/pfctl/pfctl.8
+++ b/contrib/pf/pfctl/pfctl.8
@@ -88,7 +88,7 @@ When the variable
is set to
.Dv YES
in
-.Xr rc.conf.local 8 ,
+.Xr rc.conf 5 ,
the rule file specified with the variable
.Va pf_rules
is loaded automatically by the
diff --git a/contrib/pnpinfo/pnpinfo.c b/contrib/pnpinfo/pnpinfo.c
index 790cfd8..90c273d 100644
--- a/contrib/pnpinfo/pnpinfo.c
+++ b/contrib/pnpinfo/pnpinfo.c
@@ -599,7 +599,7 @@ main(int argc, char **argv)
/* Try various READ_DATA ports from 0x203-0x3ff */
for (rd_port = 0x80; (rd_port < 0xff); rd_port += 0x10) {
DEB(printf("Trying Read_Port at %x...\n", (rd_port << 2) | 0x3) );
- num_pnp_devs = isolation_protocol(rd_port);
+ num_pnp_devs = isolation_protocol();
if (num_pnp_devs)
break;
}
diff --git a/contrib/tcpdump/print-eigrp.c b/contrib/tcpdump/print-eigrp.c
index 2787baf..4f941d9 100644
--- a/contrib/tcpdump/print-eigrp.c
+++ b/contrib/tcpdump/print-eigrp.c
@@ -280,7 +280,7 @@ eigrp_print(register const u_char *pptr, register u_int len) {
if (eigrp_tlv_len < sizeof(struct eigrp_tlv_header) ||
eigrp_tlv_len > tlen) {
- print_unknown_data(tptr+sizeof(sizeof(struct eigrp_tlv_header)),"\n\t ",tlen);
+ print_unknown_data(tptr+sizeof(struct eigrp_tlv_header),"\n\t ",tlen);
return;
}
@@ -468,7 +468,7 @@ eigrp_print(register const u_char *pptr, register u_int len) {
}
/* do we want to see an additionally hexdump ? */
if (vflag > 1)
- print_unknown_data(tptr+sizeof(sizeof(struct eigrp_tlv_header)),"\n\t ",
+ print_unknown_data(tptr+sizeof(struct eigrp_tlv_header),"\n\t ",
eigrp_tlv_len-sizeof(struct eigrp_tlv_header));
tptr+=eigrp_tlv_len;
diff --git a/contrib/tcpdump/print-icmp6.c b/contrib/tcpdump/print-icmp6.c
index cc48615..2476538 100644
--- a/contrib/tcpdump/print-icmp6.c
+++ b/contrib/tcpdump/print-icmp6.c
@@ -350,14 +350,13 @@ icmp6_print(netdissect_options *ndo,
printf("ICMP6, %s", tok2str(icmp6_type_values,"unknown icmp6 type (%u)",dp->icmp6_type));
/* display cosmetics: print the packet length for printer that use the vflag now */
- if (vflag && (dp->icmp6_type ==
- ND_ROUTER_SOLICIT ||
- ND_ROUTER_ADVERT ||
- ND_NEIGHBOR_ADVERT ||
- ND_NEIGHBOR_SOLICIT ||
- ND_REDIRECT ||
- ICMP6_HADISCOV_REPLY ||
- ICMP6_MOBILEPREFIX_ADVERT ))
+ if (vflag && (dp->icmp6_type == ND_ROUTER_SOLICIT ||
+ dp->icmp6_type == ND_ROUTER_ADVERT ||
+ dp->icmp6_type == ND_NEIGHBOR_ADVERT ||
+ dp->icmp6_type == ND_NEIGHBOR_SOLICIT ||
+ dp->icmp6_type == ND_REDIRECT ||
+ dp->icmp6_type == ICMP6_HADISCOV_REPLY ||
+ dp->icmp6_type == ICMP6_MOBILEPREFIX_ADVERT ))
printf(", length %u", length);
switch (dp->icmp6_type) {
diff --git a/contrib/tcpdump/print-ldp.c b/contrib/tcpdump/print-ldp.c
index de3b34e..1243104 100644
--- a/contrib/tcpdump/print-ldp.c
+++ b/contrib/tcpdump/print-ldp.c
@@ -609,7 +609,7 @@ ldp_msg_print(register const u_char *pptr) {
}
/* do we want to see an additionally hexdump ? */
if (vflag > 1 || hexdump==TRUE)
- print_unknown_data(tptr+sizeof(sizeof(struct ldp_msg_header)),"\n\t ",
+ print_unknown_data(tptr+sizeof(struct ldp_msg_header),"\n\t ",
msg_len);
tptr += msg_len+4;
diff --git a/contrib/tcpdump/print-lmp.c b/contrib/tcpdump/print-lmp.c
index 556db17..e09b89f 100644
--- a/contrib/tcpdump/print-lmp.c
+++ b/contrib/tcpdump/print-lmp.c
@@ -871,7 +871,7 @@ lmp_print(register const u_char *pptr, register u_int len) {
}
/* do we want to see an additionally hexdump ? */
if (vflag > 1 || hexdump==TRUE)
- print_unknown_data(tptr+sizeof(sizeof(struct lmp_object_header)),"\n\t ",
+ print_unknown_data(tptr+sizeof(struct lmp_object_header),"\n\t ",
lmp_obj_len-sizeof(struct lmp_object_header));
tptr+=lmp_obj_len;
diff --git a/contrib/tcpdump/print-lspping.c b/contrib/tcpdump/print-lspping.c
index 6958bda..2ca57fb 100644
--- a/contrib/tcpdump/print-lspping.c
+++ b/contrib/tcpdump/print-lspping.c
@@ -878,7 +878,7 @@ lspping_print(register const u_char *pptr, register u_int len) {
}
/* do we want to see an additionally tlv hexdump ? */
if (vflag > 1 || tlv_hexdump==TRUE)
- print_unknown_data(tptr+sizeof(sizeof(struct lspping_tlv_header)),"\n\t ",
+ print_unknown_data(tptr+sizeof(struct lspping_tlv_header),"\n\t ",
lspping_tlv_len);
diff --git a/contrib/tcpdump/print-rsvp.c b/contrib/tcpdump/print-rsvp.c
index 6aa2f6d..1c76dcb 100644
--- a/contrib/tcpdump/print-rsvp.c
+++ b/contrib/tcpdump/print-rsvp.c
@@ -1790,7 +1790,7 @@ _U_
}
/* do we also want to see a hex dump ? */
if (vflag > 1 || hexdump==TRUE)
- print_unknown_data(tptr+sizeof(sizeof(struct rsvp_object_header)),"\n\t ", /* FIXME indentation */
+ print_unknown_data(tptr+sizeof(struct rsvp_object_header),"\n\t ", /* FIXME indentation */
rsvp_obj_len-sizeof(struct rsvp_object_header));
tptr+=rsvp_obj_len;
diff --git a/contrib/tcpdump/print-slow.c b/contrib/tcpdump/print-slow.c
index eaf94ed..fdfefcc 100644
--- a/contrib/tcpdump/print-slow.c
+++ b/contrib/tcpdump/print-slow.c
@@ -368,7 +368,7 @@ void slow_marker_lacp_print(register const u_char *tptr, register u_int tlen) {
tlv_header->type != LACP_TLV_TERMINATOR &&
tlv_header->type != MARKER_TLV_TERMINATOR) {
printf("\n\t-----trailing data-----");
- print_unknown_data(tptr+sizeof(sizeof(struct tlv_header_t)),"\n\t ",tlen);
+ print_unknown_data(tptr+sizeof(struct tlv_header_t),"\n\t ",tlen);
return;
}
@@ -441,7 +441,7 @@ void slow_marker_lacp_print(register const u_char *tptr, register u_int tlen) {
}
/* do we want to see an additional hexdump ? */
if (vflag > 1) {
- print_unknown_data(tptr+sizeof(sizeof(struct tlv_header_t)),"\n\t ",
+ print_unknown_data(tptr+sizeof(struct tlv_header_t),"\n\t ",
tlv_len-sizeof(struct tlv_header_t));
}
diff --git a/contrib/telnet/libtelnet/encrypt.c b/contrib/telnet/libtelnet/encrypt.c
index 8bdf672..f8e9194 100644
--- a/contrib/telnet/libtelnet/encrypt.c
+++ b/contrib/telnet/libtelnet/encrypt.c
@@ -721,6 +721,9 @@ encrypt_keyid(struct key_info *kp, unsigned char *keyid, int len)
int dir = kp->dir;
int ret = 0;
+ if (len > MAXKEYLEN)
+ len = MAXKEYLEN;
+
if (!(ep = (*kp->getcrypt)(*kp->modep))) {
if (len == 0)
return;
diff --git a/contrib/telnet/libtelnet/sra.c b/contrib/telnet/libtelnet/sra.c
index 1940485..4a75968 100644
--- a/contrib/telnet/libtelnet/sra.c
+++ b/contrib/telnet/libtelnet/sra.c
@@ -303,7 +303,7 @@ sra_reply(Authenticator *ap, unsigned char *data, int cnt)
goto enc_user;
}
/* encode password */
- memset(pass,0,sizeof(pass));
+ memset(pass,0,256);
telnet_gets("Password: ",pass,255,0);
pk_encode(pass,xpass,&ck);
/* send it off */
diff --git a/contrib/telnet/telnet/utilities.c b/contrib/telnet/telnet/utilities.c
index b0cfe37..8d1ea2a 100644
--- a/contrib/telnet/telnet/utilities.c
+++ b/contrib/telnet/telnet/utilities.c
@@ -782,7 +782,7 @@ printsub(char direction, unsigned char *pointer, int length)
fprintf(NetTrace, "\" VAR " + noquote);
} else
#endif /* OLD_ENVIRON */
- fprintf(NetTrace, "\" VALUE " + noquote);
+ fprintf(NetTrace, "%s", "\" VALUE " + noquote);
noquote = 2;
break;
@@ -798,17 +798,17 @@ printsub(char direction, unsigned char *pointer, int length)
fprintf(NetTrace, "\" VALUE " + noquote);
} else
#endif /* OLD_ENVIRON */
- fprintf(NetTrace, "\" VAR " + noquote);
+ fprintf(NetTrace, "%s", "\" VAR " + noquote);
noquote = 2;
break;
case ENV_ESC:
- fprintf(NetTrace, "\" ESC " + noquote);
+ fprintf(NetTrace, "%s", "\" ESC " + noquote);
noquote = 2;
break;
case ENV_USERVAR:
- fprintf(NetTrace, "\" USERVAR " + noquote);
+ fprintf(NetTrace, "%s", "\" USERVAR " + noquote);
noquote = 2;
break;
diff --git a/contrib/telnet/telnetd/utility.c b/contrib/telnet/telnetd/utility.c
index 54e2327..905fd3b 100644
--- a/contrib/telnet/telnetd/utility.c
+++ b/contrib/telnet/telnetd/utility.c
@@ -847,22 +847,22 @@ printsub(char direction, unsigned char *pointer, int length)
for (i = 2; i < length; i++ ) {
switch (pointer[i]) {
case NEW_ENV_VAR:
- output_data("\" VAR " + noquote);
+ output_data("%s", "\" VAR " + noquote);
noquote = 2;
break;
case NEW_ENV_VALUE:
- output_data("\" VALUE " + noquote);
+ output_data("%s", "\" VALUE " + noquote);
noquote = 2;
break;
case ENV_ESC:
- output_data("\" ESC " + noquote);
+ output_data("%s", "\" ESC " + noquote);
noquote = 2;
break;
case ENV_USERVAR:
- output_data("\" USERVAR " + noquote);
+ output_data("%s", "\" USERVAR " + noquote);
noquote = 2;
break;
diff --git a/crypto/heimdal/appl/telnet/libtelnet/encrypt.c b/crypto/heimdal/appl/telnet/libtelnet/encrypt.c
index 04dbe83..a4669d2 100644
--- a/crypto/heimdal/appl/telnet/libtelnet/encrypt.c
+++ b/crypto/heimdal/appl/telnet/libtelnet/encrypt.c
@@ -736,6 +736,9 @@ encrypt_keyid(struct key_info *kp, unsigned char *keyid, int len)
int dir = kp->dir;
int ret = 0;
+ if (len > MAXKEYLEN)
+ len = MAXKEYLEN;
+
if (!(ep = (*kp->getcrypt)(*kp->modep))) {
if (len == 0)
return;
diff --git a/etc/mac.conf b/etc/mac.conf
index 2e1b9a2..36f3a6a 100644
--- a/etc/mac.conf
+++ b/etc/mac.conf
@@ -3,7 +3,7 @@
#
# TrustedBSD MAC userland policy configuration file. Kernel modules
# export label information, and mac.conf indicates to userland
-# applications what defaults they should use in the absense of any
+# applications what defaults they should use in the absence of any
# other user-provided information.
#
diff --git a/etc/namedb/named.conf b/etc/namedb/named.conf
index f1669ab..0b6d1ac 100644
--- a/etc/namedb/named.conf
+++ b/etc/namedb/named.conf
@@ -94,7 +94,7 @@ zone "." { type hint; file "/etc/namedb/named.root"; };
As documented at http://dns.icann.org/services/axfr/ these zones:
"." (the root), ARPA, IN-ADDR.ARPA, IP6.ARPA, and ROOT-SERVERS.NET
- are availble for AXFR from these servers on IPv4 and IPv6:
+ are available for AXFR from these servers on IPv4 and IPv6:
xfr.lax.dns.icann.org, xfr.cjr.dns.icann.org
*/
/*
diff --git a/etc/netstart b/etc/netstart
index b66505a..885932d 100755
--- a/etc/netstart
+++ b/etc/netstart
@@ -52,7 +52,6 @@ _start=quietstart
# . /etc/rc.d/atm3.sh ${_start}
/etc/rc.d/netif ${_start}
/etc/rc.d/ipsec ${_start}
-/etc/rc.d/dhclient ${_start}
/etc/rc.d/ppp ${_start}
/etc/rc.d/ipfw ${_start}
/etc/rc.d/routing ${_start}
diff --git a/etc/network.subr b/etc/network.subr
index c1faf59..6d0de93 100644
--- a/etc/network.subr
+++ b/etc/network.subr
@@ -109,8 +109,10 @@ ifconfig_up()
# backward compatibility: $ipv6_enable
case $ipv6_enable in
[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
- _ipv6_opts="${_ipv6_opts} accept_rtadv"
- ;;
+ if ! checkyesno ipv6_gateway_enable; then
+ _ipv6_opts="${_ipv6_opts} accept_rtadv"
+ fi
+ ;;
esac
case $ipv6_cpe_wanif in
@@ -139,7 +141,15 @@ ifconfig_up()
_cfg=0
fi
- # backward compatiblity: $ipv6_ifconfig_IF
+ # $ipv6_prefix_IF will be handled in
+ # ipv6_prefix_hostid_addr_common().
+ ifconfig_args=`get_if_var $1 ipv6_prefix_IF`
+ if [ -n "${ifconfig_args}" ]; then
+ ifconfig $1 inet6 -ifdisabled
+ _cfg=0
+ fi
+
+ # backward compatibility: $ipv6_ifconfig_IF
ifconfig_args=`get_if_var $1 ipv6_ifconfig_IF`
if [ -n "${ifconfig_args}" ]; then
warn "\$ipv6_ifconfig_$1 is obsolete." \
@@ -444,6 +454,12 @@ ipv6if()
return 0
fi
+ # True if $ipv6_prefix_IF is defined.
+ _tmpargs=`get_if_var $_if ipv6_prefix_IF`
+ if [ -n "${_tmpargs}" ]; then
+ return 0
+ fi
+
# backward compatibility: True if $ipv6_ifconfig_IF is defined.
_tmpargs=`get_if_var $_if ipv6_ifconfig_IF`
if [ -n "${_tmpargs}" ]; then
@@ -559,10 +575,6 @@ ipv6_up()
ipv6_prefix_hostid_addr_common ${_if} alias && _ret=0
ipv6_accept_rtadv_up ${_if} && _ret=0
- # wait for DAD
- sleep `${SYSCTL_N} net.inet6.ip6.dad_count`
- sleep 1
-
return $_ret
}
@@ -716,9 +728,16 @@ ifalias_ipv4_up()
inet\ *)
ifconfig $1 ${ifconfig_args} alias && _ret=0
;;
+ inet6\ *)
+ ;;
"")
break
;;
+ *)
+ warn "\$ifconfig_$1_alias${alias} needs " \
+ "\"inet\" keyword for an IPv4 address."
+ ifconfig $1 ${ifconfig_args} alias && _ret=0
+ ;;
esac
alias=$((${alias} + 1))
done
diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile
index 0a0ff0a..a665ba9 100644
--- a/etc/rc.d/Makefile
+++ b/etc/rc.d/Makefile
@@ -2,64 +2,179 @@
.include <bsd.own.mk>
-FILES= DAEMON FILESYSTEMS LOGIN NETWORKING SERVERS \
- abi accounting addswap adjkerntz amd \
- apm apmd archdep atm1 atm2 atm3 auditd \
- bgfsck bluetooth bootparams bridge bsnmpd bthidd \
- ccd cleanvar cleartmp cron \
- ddb defaultroute devd devfs dhclient \
- dmesg dumpon \
+FILES= DAEMON \
+ FILESYSTEMS \
+ LOGIN \
+ NETWORKING \
+ SERVERS \
+ abi \
+ accounting \
+ addswap \
+ adjkerntz \
+ amd \
+ apm \
+ apmd \
+ archdep \
+ atm1 \
+ atm2 \
+ atm3 \
+ auditd \
+ bgfsck \
+ bluetooth \
+ bootparams \
+ bridge \
+ bsnmpd \
+ bthidd \
+ ccd \
+ cleanvar \
+ cleartmp \
+ cron \
+ ddb \
+ defaultroute \
+ devd \
+ devfs \
+ dhclient \
+ dmesg \
+ dumpon \
encswap \
- faith fsck ftp-proxy ftpd \
- gbde geli geli2 gptboot gssd \
- hastd hcsecd \
- hostapd hostid hostid_save hostname \
- inetd initrandom \
- ip6addrctl ipfilter ipfs ipfw ipmon \
- ipnat ipsec \
+ faith \
+ fsck \
+ ftp-proxy \
+ ftpd \
+ gbde \
+ geli \
+ geli2 \
+ gptboot \
+ gssd \
+ hastd \
+ hcsecd \
+ hostapd \
+ hostid \
+ hostid_save \
+ hostname \
+ inetd \
+ initrandom \
+ ip6addrctl \
+ ipfilter \
+ ipfs \
+ ipfw \
+ ipmon \
+ ipnat \
+ ipsec \
+ ${_ipxrouted} \
jail \
- kadmind kerberos keyserv kld kldxref kpasswdd \
- ldconfig local localpkg lockd lpd \
- mixer motd mountcritlocal mountcritremote mountlate \
- mdconfig mdconfig2 mountd moused mroute6d mrouted msgs \
- named natd netif netoptions netwait \
- newsyslog nfsclient nfscbd nfsd \
- nfsuserd nisdomain nsswitch ntpd ntpdate \
+ kadmind \
+ kerberos \
+ keyserv \
+ kld \
+ kldxref \
+ kpasswdd \
+ ldconfig \
+ local \
+ localpkg \
+ lockd \
+ lpd \
+ mixer \
+ motd \
+ mountcritlocal \
+ mountcritremote \
+ mountlate \
+ mdconfig \
+ mdconfig2 \
+ mountd \
+ moused \
+ mroute6d \
+ mrouted \
+ msgs \
+ named \
+ natd \
+ netif \
+ netoptions \
+ netwait \
+ newsyslog \
+ nfsclient \
+ nfscbd \
+ nfsd \
+ nfsuserd \
+ nisdomain \
+ ${_nscd} \
+ nsswitch \
+ ntpd \
+ ntpdate \
+ ${_opensm} \
othermta \
- pf pflog pfsync \
- powerd power_profile ppp pppoed pwcheck \
+ pf \
+ pflog \
+ pfsync \
+ powerd \
+ power_profile \
+ ppp \
+ pppoed \
+ pwcheck \
quota \
- random rarpd rctl resolv rfcomm_pppd_server root \
- route6d routed routing rpcbind rtadvd rtsold rwho \
- savecore sdpd securelevel sendmail \
- serial sppp statd static_arp static_ndp stf swap1 \
- syscons sysctl syslogd \
- timed tmp \
+ random \
+ rarpd \
+ rctl \
+ resolv \
+ rfcomm_pppd_server \
+ root \
+ route6d \
+ routed \
+ routing \
+ rpcbind \
+ rtadvd \
+ rtsold \
+ rwho \
+ savecore \
+ sdpd \
+ securelevel \
+ sendmail \
+ serial \
+ sppp \
+ ${_sshd} \
+ statd \
+ static_arp \
+ static_ndp \
+ stf \
+ swap1 \
+ syscons \
+ sysctl \
+ syslogd \
+ timed \
+ tmp \
+ ${_ubthidhci} \
ugidfw \
- var virecover \
- watchdogd wpa_supplicant \
- ypbind yppasswdd ypserv \
- ypset ypupdated ypxfrd \
- zfs zvol
+ var \
+ virecover \
+ watchdogd \
+ wpa_supplicant \
+ ypbind \
+ yppasswdd \
+ ypserv \
+ ypset \
+ ypupdated \
+ ypxfrd \
+ zfs \
+ zvol
.if ${MK_IPX} != "no"
-FILES+= ipxrouted
+_ipxrouted= ipxrouted
.endif
.if ${MK_OFED} != "no"
-FILES+= opensm
+_opensm= opensm
.endif
.if ${MK_OPENSSH} != "no"
-FILES+= sshd
+_sshd= sshd
.endif
.if ${MK_NS_CACHING} != "no"
-FILES+= nscd
+_nscd= nscd
.endif
.if ${MK_BLUETOOTH} != "no"
-FILES+= ubthidhci
+_ubthidhci= ubthidhci
.endif
FILESDIR= /etc/rc.d
diff --git a/etc/rc.d/accounting b/etc/rc.d/accounting
index 502ffe6..85483fe 100755
--- a/etc/rc.d/accounting
+++ b/etc/rc.d/accounting
@@ -11,7 +11,7 @@
. /etc/rc.subr
name="accounting"
-rcvar=`set_rcvar`
+rcvar="accounting_enable"
accounting_command="/usr/sbin/accton"
accounting_file="/var/account/acct"
diff --git a/etc/rc.d/amd b/etc/rc.d/amd
index 8105aeb..e313f0c 100755
--- a/etc/rc.d/amd
+++ b/etc/rc.d/amd
@@ -11,7 +11,7 @@
. /etc/rc.subr
name="amd"
-rcvar=`set_rcvar`
+rcvar="amd_enable"
command="/usr/sbin/${name}"
start_precmd="amd_precmd"
command_args="&"
diff --git a/etc/rc.d/apm b/etc/rc.d/apm
index 3d15701..5633377 100755
--- a/etc/rc.d/apm
+++ b/etc/rc.d/apm
@@ -11,7 +11,7 @@
. /etc/rc.subr
name="apm"
-rcvar=`set_rcvar`
+rcvar="apm_enable"
start_precmd="apm_precmd"
command="/usr/sbin/${name}"
start_cmd="${command} -e enable"
diff --git a/etc/rc.d/apmd b/etc/rc.d/apmd
index c2d6967..2a326c1 100755
--- a/etc/rc.d/apmd
+++ b/etc/rc.d/apmd
@@ -11,7 +11,7 @@
. /etc/rc.subr
name="apmd"
-rcvar=`set_rcvar`
+rcvar="apmd_enable"
command="/usr/sbin/${name}"
start_precmd="apmd_prestart"
diff --git a/etc/rc.d/auditd b/etc/rc.d/auditd
index 4d0760c..25aab29 100755
--- a/etc/rc.d/auditd
+++ b/etc/rc.d/auditd
@@ -8,7 +8,7 @@
# PROVIDE: auditd
# REQUIRE: syslogd
# BEFORE: DAEMON
-# KEYWORD: shutdown
+# KEYWORD: nojail shutdown
. /etc/rc.subr
diff --git a/etc/rc.d/bgfsck b/etc/rc.d/bgfsck
index 3715354..77b8bed 100755
--- a/etc/rc.d/bgfsck
+++ b/etc/rc.d/bgfsck
@@ -22,7 +22,7 @@ bgfsck_start ()
background_fsck_delay=0
fi
if [ ${background_fsck_delay} -lt 0 ]; then
- echo "Background file system checks delayed indefinitly"
+ echo "Background file system checks delayed indefinitely"
return 0
fi
diff --git a/etc/rc.d/bootparams b/etc/rc.d/bootparams
index 1081bbf..de77442 100755
--- a/etc/rc.d/bootparams
+++ b/etc/rc.d/bootparams
@@ -11,7 +11,7 @@
. /etc/rc.subr
name="bootparamd"
-rcvar=`set_rcvar`
+rcvar="bootparamd_enable"
required_files="/etc/bootparams"
command="/usr/sbin/${name}"
diff --git a/etc/rc.d/bsnmpd b/etc/rc.d/bsnmpd
index c24a08f..2aad72e 100755
--- a/etc/rc.d/bsnmpd
+++ b/etc/rc.d/bsnmpd
@@ -10,7 +10,7 @@
. /etc/rc.subr
name="bsnmpd"
-rcvar=`set_rcvar`
+rcvar="bsnmpd_enable"
command="/usr/sbin/${name}"
pidfile="/var/run/snmpd.pid"
diff --git a/etc/rc.d/bthidd b/etc/rc.d/bthidd
index 907305e..7c5ccf3 100755
--- a/etc/rc.d/bthidd
+++ b/etc/rc.d/bthidd
@@ -11,9 +11,9 @@
. /etc/rc.subr
name="bthidd"
+rcvar="bthidd_enable"
command="/usr/sbin/${name}"
pidfile="/var/run/${name}.pid"
-rcvar=`set_rcvar`
start_precmd="bthidd_prestart"
bthidd_prestart()
diff --git a/etc/rc.d/cleanvar b/etc/rc.d/cleanvar
index 490b5c5..62c8f42 100755
--- a/etc/rc.d/cleanvar
+++ b/etc/rc.d/cleanvar
@@ -9,7 +9,7 @@
. /etc/rc.subr
name="cleanvar"
-rcvar=`set_rcvar`
+rcvar="cleanvar_enable"
start_precmd="${name}_prestart"
start_cmd="${name}_start"
diff --git a/etc/rc.d/cleartmp b/etc/rc.d/cleartmp
index 0d84987..94c421a 100755
--- a/etc/rc.d/cleartmp
+++ b/etc/rc.d/cleartmp
@@ -11,7 +11,7 @@
name="cleartmp"
# Disguise rcvar for the start method to run irrespective of its setting.
-rcvar1=`set_rcvar clear_tmp`
+rcvar1="clear_tmp_enable"
start_cmd="${name}_start"
stop_cmd=":"
diff --git a/etc/rc.d/cron b/etc/rc.d/cron
index cc87d42..afc8df4 100755
--- a/etc/rc.d/cron
+++ b/etc/rc.d/cron
@@ -11,7 +11,7 @@
. /etc/rc.subr
name="cron"
-rcvar="`set_rcvar`"
+rcvar="cron_enable"
command="/usr/sbin/${name}"
pidfile="/var/run/${name}.pid"
diff --git a/etc/rc.d/ddb b/etc/rc.d/ddb
index 51e24ea..86c5c99 100755
--- a/etc/rc.d/ddb
+++ b/etc/rc.d/ddb
@@ -11,7 +11,7 @@
. /etc/rc.subr
name="ddb"
-rcvar=`set_rcvar`
+rcvar="ddb_enable"
command="/sbin/${name}"
start_precmd="ddb_prestart"
stop_cmd=":"
diff --git a/etc/rc.d/devd b/etc/rc.d/devd
index e257da6..7a95684 100755
--- a/etc/rc.d/devd
+++ b/etc/rc.d/devd
@@ -11,7 +11,7 @@
. /etc/rc.subr
name="devd"
-rcvar=`set_rcvar`
+rcvar="devd_enable"
command="/sbin/${name}"
start_precmd=${name}_prestart
diff --git a/etc/rc.d/dhclient b/etc/rc.d/dhclient
index adba369..8fe0931 100755
--- a/etc/rc.d/dhclient
+++ b/etc/rc.d/dhclient
@@ -22,7 +22,14 @@ stop_precmd="dhclient_pre_check"
dhclient_pre_check()
{
if [ -z "${rc_force}" ] && ! dhcpif $ifn; then
- err 1 "'$ifn' is not a DHCP-enabled interface"
+ local msg
+ msg="'$ifn' is not a DHCP-enabled interface"
+ if [ -z "${rc_quiet}" ]; then
+ echo "$msg"
+ else
+ debug "$msg"
+ fi
+ exit 1
fi
}
diff --git a/etc/rc.d/dmesg b/etc/rc.d/dmesg
index c6cdca3..697cae9 100755
--- a/etc/rc.d/dmesg
+++ b/etc/rc.d/dmesg
@@ -11,7 +11,7 @@
. /etc/rc.subr
name="dmesg"
-rcvar=`set_rcvar`
+rcvar="dmesg_enable"
dmesg_file="/var/run/dmesg.boot"
start_cmd="do_dmesg"
stop_cmd=":"
diff --git a/etc/rc.d/ftp-proxy b/etc/rc.d/ftp-proxy
index 6712e68..1bb89dd 100755
--- a/etc/rc.d/ftp-proxy
+++ b/etc/rc.d/ftp-proxy
@@ -10,7 +10,7 @@
. /etc/rc.subr
name="ftpproxy"
-rcvar=`set_rcvar`
+rcvar="ftpproxy_enable"
command="/usr/sbin/ftp-proxy"
load_rc_config $name
diff --git a/etc/rc.d/ftpd b/etc/rc.d/ftpd
index 338d735..c862586 100755
--- a/etc/rc.d/ftpd
+++ b/etc/rc.d/ftpd
@@ -10,7 +10,7 @@
. /etc/rc.subr
name="ftpd"
-rcvar=`set_rcvar`
+rcvar="ftpd_enable"
command="/usr/libexec/${name}"
pidfile="/var/run/${name}.pid"
start_precmd=ftpd_prestart
diff --git a/etc/rc.d/gptboot b/etc/rc.d/gptboot
index abfcaa1..a6cee68 100755
--- a/etc/rc.d/gptboot
+++ b/etc/rc.d/gptboot
@@ -34,7 +34,7 @@
. /etc/rc.subr
name="gptboot"
-rcvar=`set_rcvar`
+rcvar="gptboot_enable"
start_cmd="gptboot_report"
gptboot_report()
diff --git a/etc/rc.d/hastd b/etc/rc.d/hastd
index b9d9516..534dc66 100755
--- a/etc/rc.d/hastd
+++ b/etc/rc.d/hastd
@@ -11,7 +11,7 @@
. /etc/rc.subr
name="hastd"
-rcvar=`set_rcvar`
+rcvar="hastd_enable"
pidfile="/var/run/${name}.pid"
command="/sbin/${name}"
hastctl="/sbin/hastctl"
diff --git a/etc/rc.d/hcsecd b/etc/rc.d/hcsecd
index fd6a925..691b14b 100755
--- a/etc/rc.d/hcsecd
+++ b/etc/rc.d/hcsecd
@@ -11,9 +11,9 @@
. /etc/rc.subr
name="hcsecd"
+rcvar="hcsecd_enable"
command="/usr/sbin/${name}"
pidfile="/var/run/${name}.pid"
-rcvar=`set_rcvar`
required_modules="ng_btsocket"
load_rc_config $name
diff --git a/etc/rc.d/hostapd b/etc/rc.d/hostapd
index 5f8203e..f65fcde 100755
--- a/etc/rc.d/hostapd
+++ b/etc/rc.d/hostapd
@@ -10,8 +10,8 @@
. /etc/rc.subr
name="hostapd"
+rcvar="hostapd_enable"
command="/usr/sbin/${name}"
-rcvar=`set_rcvar`
conf_file="/etc/${name}.conf"
pidfile="/var/run/${name}.pid"
diff --git a/etc/rc.d/hostname b/etc/rc.d/hostname
index 142dc47..13af220 100755
--- a/etc/rc.d/hostname
+++ b/etc/rc.d/hostname
@@ -65,7 +65,7 @@ hostname_start()
# Null hostname is probably OK if DHCP is in use.
#
if [ -z "`list_net_interfaces dhcp`" ]; then
- warn "\$hostname is not set -- see ${rcvar_manpage}."
+ warn "\$hostname is not set -- see rc.conf(5)."
fi
return
fi
diff --git a/etc/rc.d/inetd b/etc/rc.d/inetd
index fc00f38..d4e97ed 100755
--- a/etc/rc.d/inetd
+++ b/etc/rc.d/inetd
@@ -10,7 +10,7 @@
. /etc/rc.subr
name="inetd"
-rcvar=`set_rcvar`
+rcvar="inetd_enable"
command="/usr/sbin/${name}"
pidfile="/var/run/${name}.pid"
required_files="/etc/${name}.conf"
diff --git a/etc/rc.d/ip6addrctl b/etc/rc.d/ip6addrctl
index d38018c..c66a5ea 100755
--- a/etc/rc.d/ip6addrctl
+++ b/etc/rc.d/ip6addrctl
@@ -12,7 +12,7 @@
. /etc/network.subr
name="ip6addrctl"
-rcvar=`set_rcvar`
+rcvar="ip6addrctl_enable"
start_cmd="ip6addrctl_start"
stop_cmd="ip6addrctl_stop"
extra_commands="status prefer_ipv6 prefer_ipv4"
diff --git a/etc/rc.d/ipfilter b/etc/rc.d/ipfilter
index b6bdb4b..ec8e2f1 100755
--- a/etc/rc.d/ipfilter
+++ b/etc/rc.d/ipfilter
@@ -10,7 +10,7 @@
. /etc/rc.subr
name="ipfilter"
-rcvar=`set_rcvar`
+rcvar="ipfilter_enable"
load_rc_config $name
stop_precmd="test -f ${ipfilter_rules} -o -f ${ipv6_ipfilter_rules}"
diff --git a/etc/rc.d/ipfs b/etc/rc.d/ipfs
index 9b5ccac..ff4c74d 100755
--- a/etc/rc.d/ipfs
+++ b/etc/rc.d/ipfs
@@ -10,7 +10,7 @@
. /etc/rc.subr
name="ipfs"
-rcvar=`set_rcvar`
+rcvar="ipfs_enable"
start_cmd="ipfs_start"
stop_cmd="ipfs_stop"
start_precmd="ipfs_prestart"
diff --git a/etc/rc.d/ipmon b/etc/rc.d/ipmon
index cbed453..45e91fb 100755
--- a/etc/rc.d/ipmon
+++ b/etc/rc.d/ipmon
@@ -11,7 +11,7 @@
. /etc/rc.subr
name="ipmon"
-rcvar=`set_rcvar`
+rcvar="ipmon_enable"
command="/sbin/${name}"
start_precmd="ipmon_precmd"
diff --git a/etc/rc.d/ipnat b/etc/rc.d/ipnat
index 6bf2e08..a265916 100755
--- a/etc/rc.d/ipnat
+++ b/etc/rc.d/ipnat
@@ -10,7 +10,7 @@
. /etc/rc.subr
name="ipnat"
-rcvar=`set_rcvar`
+rcvar="ipnat_enable"
load_rc_config $name
start_cmd="ipnat_start"
stop_cmd="${ipnat_program} -F -C"
diff --git a/etc/rc.d/ipsec b/etc/rc.d/ipsec
index 0ad5490..c2e0b5f 100755
--- a/etc/rc.d/ipsec
+++ b/etc/rc.d/ipsec
@@ -11,7 +11,7 @@
. /etc/rc.subr
name="ipsec"
-rcvar=`set_rcvar`
+rcvar="ipsec_enable"
start_precmd="ipsec_prestart"
start_cmd="ipsec_start"
stop_precmd="test -f $ipsec_file"
diff --git a/etc/rc.d/ipxrouted b/etc/rc.d/ipxrouted
index 04d3586..dcca91d 100755
--- a/etc/rc.d/ipxrouted
+++ b/etc/rc.d/ipxrouted
@@ -11,7 +11,7 @@
. /etc/rc.subr
name="ipxrouted"
-rcvar=`set_rcvar`
+rcvar="ipxrouted_enable"
command="/usr/sbin/IPXrouted"
command_args="> /dev/null 2>&1"
diff --git a/etc/rc.d/jail b/etc/rc.d/jail
index 09170bd..72ab62e 100755
--- a/etc/rc.d/jail
+++ b/etc/rc.d/jail
@@ -17,7 +17,7 @@
. /etc/rc.subr
name="jail"
-rcvar=`set_rcvar`
+rcvar="jail_enable"
start_precmd="jail_prestart"
start_cmd="jail_start"
@@ -601,10 +601,7 @@ jail_start()
devfs_mount_jail "${_devdir}" ${_ruleset}
# Transitional symlink for old binaries
if [ ! -L "${_devdir}/log" ]; then
- __pwd="`pwd`"
- cd "${_devdir}"
- ln -sf ../var/run/log log
- cd "$__pwd"
+ ln -sf ../var/run/log "${_devdir}/log"
fi
fi
diff --git a/etc/rc.d/keyserv b/etc/rc.d/keyserv
index d1eaaee..84b169a 100755
--- a/etc/rc.d/keyserv
+++ b/etc/rc.d/keyserv
@@ -13,7 +13,7 @@
. /etc/rc.subr
name="keyserv"
-rcvar=`set_rcvar`
+rcvar="keyserv_enable"
command="/usr/sbin/${name}"
start_precmd="keyserv_prestart"
diff --git a/etc/rc.d/lpd b/etc/rc.d/lpd
index 552e068..6a74267 100755
--- a/etc/rc.d/lpd
+++ b/etc/rc.d/lpd
@@ -11,7 +11,7 @@
. /etc/rc.subr
name="lpd"
-rcvar=`set_rcvar`
+rcvar="lpd_enable"
command="/usr/sbin/${name}"
required_files="/etc/printcap"
start_precmd="chkprintcap"
diff --git a/etc/rc.d/mountd b/etc/rc.d/mountd
index 017418d..826a158 100755
--- a/etc/rc.d/mountd
+++ b/etc/rc.d/mountd
@@ -10,7 +10,7 @@
. /etc/rc.subr
name="mountd"
-rcvar=`set_rcvar`
+rcvar="mountd_enable"
command="/usr/sbin/${name}"
pidfile="/var/run/${name}.pid"
required_files="/etc/exports"
diff --git a/etc/rc.d/moused b/etc/rc.d/moused
index fd2c447..6e71f44 100755
--- a/etc/rc.d/moused
+++ b/etc/rc.d/moused
@@ -10,7 +10,7 @@
. /etc/rc.subr
name="moused"
-rcvar=`set_rcvar`
+rcvar="moused_enable"
command="/usr/sbin/${name}"
start_cmd="moused_start"
pidprefix="/var/run/moused"
@@ -23,7 +23,7 @@ load_rc_config $name
#
if [ -n "$2" ]; then
eval moused_$2_enable=\${moused_$2_enable-${moused_nondefault_enable}}
- rcvar=`set_rcvar moused_$2`
+ rcvar="moused_${2}_enable"
pidfile="${pidprefix}.$2.pid"
pidarg="-I $pidfile"
fi
diff --git a/etc/rc.d/mroute6d b/etc/rc.d/mroute6d
index 047f241..1eb6eb4 100755
--- a/etc/rc.d/mroute6d
+++ b/etc/rc.d/mroute6d
@@ -11,7 +11,7 @@
. /etc/rc.subr
name="mroute6d"
-rcvar=`set_rcvar`
+rcvar="mroute6d_enable"
command="/usr/local/sbin/pim6dd"
load_rc_config $name
diff --git a/etc/rc.d/mrouted b/etc/rc.d/mrouted
index 2eb9144..b3c0918 100755
--- a/etc/rc.d/mrouted
+++ b/etc/rc.d/mrouted
@@ -10,7 +10,7 @@
. /etc/rc.subr
name="mrouted"
-rcvar=`set_rcvar`
+rcvar="mrouted_enable"
command="/usr/local/sbin/${name}"
pidfile="/var/run/${name}.pid"
required_files="/etc/${name}.conf"
diff --git a/etc/rc.d/natd b/etc/rc.d/natd
index e22353a..35f17bb 100755
--- a/etc/rc.d/natd
+++ b/etc/rc.d/natd
@@ -10,7 +10,7 @@
. /etc/network.subr
name="natd"
-rcvar=`set_rcvar`
+rcvar="natd_enable"
command="/sbin/${name}"
pidfile="/var/run/${name}.pid"
start_precmd="natd_precmd"
diff --git a/etc/rc.d/netif b/etc/rc.d/netif
index 01da302..b584f15 100755
--- a/etc/rc.d/netif
+++ b/etc/rc.d/netif
@@ -123,16 +123,26 @@ network_common()
_cooked_list="`list_net_interfaces`"
fi
+ _dadwait=
_fail=
_ok=
for ifn in ${_cooked_list}; do
if ${_func} ${ifn} $2; then
_ok="${_ok} ${ifn}"
+ if ipv6if ${ifn}; then
+ _dadwait=1
+ fi
else
_fail="${_fail} ${ifn}"
fi
done
+ # inet6 address configuration needs sleep for DAD.
+ if [ -n "${_dadwait}" ]; then
+ sleep `${SYSCTL_N} net.inet6.ip6.dad_count`
+ sleep 1
+ fi
+
_str=
if [ -n "${_ok}" ]; then
case ${_func} in
diff --git a/etc/rc.d/netwait b/etc/rc.d/netwait
index 1d3556a..7ea7a4c 100755
--- a/etc/rc.d/netwait
+++ b/etc/rc.d/netwait
@@ -14,7 +14,7 @@
. /etc/rc.subr
name="netwait"
-rcvar=`set_rcvar`
+rcvar="netwait_enable"
start_cmd="${name}_start"
stop_cmd=":"
diff --git a/etc/rc.d/newsyslog b/etc/rc.d/newsyslog
index ab8f2d3..5dc4066 100755
--- a/etc/rc.d/newsyslog
+++ b/etc/rc.d/newsyslog
@@ -9,7 +9,7 @@
. /etc/rc.subr
name="newsyslog"
-rcvar=`set_rcvar`
+rcvar="newsyslog_enable"
required_files="/etc/newsyslog.conf"
command="/usr/sbin/${name}"
start_cmd="newsyslog_start"
diff --git a/etc/rc.d/nfscbd b/etc/rc.d/nfscbd
index 8fecfe9..bfc4966 100755
--- a/etc/rc.d/nfscbd
+++ b/etc/rc.d/nfscbd
@@ -10,7 +10,7 @@
. /etc/rc.subr
name="nfscbd"
-rcvar=`set_rcvar`
+rcvar="nfscbd_enable"
command="/usr/sbin/${name}"
sig_stop="USR1"
diff --git a/etc/rc.d/nfsd b/etc/rc.d/nfsd
index e1fd968..235a866 100755
--- a/etc/rc.d/nfsd
+++ b/etc/rc.d/nfsd
@@ -10,7 +10,7 @@
. /etc/rc.subr
name="nfsd"
-rcvar=`set_rcvar nfs_server`
+rcvar="nfs_server_enable"
command="/usr/sbin/${name}"
load_rc_config $name
diff --git a/etc/rc.d/nfsuserd b/etc/rc.d/nfsuserd
index 278c666..52246bb 100755
--- a/etc/rc.d/nfsuserd
+++ b/etc/rc.d/nfsuserd
@@ -10,7 +10,7 @@
. /etc/rc.subr
name="nfsuserd"
-rcvar=`set_rcvar`
+rcvar="nfsuserd_enable"
command="/usr/sbin/${name}"
sig_stop="USR1"
diff --git a/etc/rc.d/nscd b/etc/rc.d/nscd
index 42041a7..22c8459 100755
--- a/etc/rc.d/nscd
+++ b/etc/rc.d/nscd
@@ -19,7 +19,7 @@
. /etc/rc.subr
name="nscd"
-rcvar=`set_rcvar`
+rcvar="nscd_enable"
command=/usr/sbin/nscd
extra_commands="flush"
diff --git a/etc/rc.d/ntpd b/etc/rc.d/ntpd
index b7b009c..ef2f6d4 100755
--- a/etc/rc.d/ntpd
+++ b/etc/rc.d/ntpd
@@ -11,7 +11,7 @@
. /etc/rc.subr
name="ntpd"
-rcvar=`set_rcvar`
+rcvar="ntpd_enable"
command="/usr/sbin/${name}"
pidfile="/var/run/${name}.pid"
start_precmd="ntpd_precmd"
diff --git a/etc/rc.d/ntpdate b/etc/rc.d/ntpdate
index 3f93e27..4a8b845 100755
--- a/etc/rc.d/ntpdate
+++ b/etc/rc.d/ntpdate
@@ -10,7 +10,7 @@
. /etc/rc.subr
name="ntpdate"
-rcvar=`set_rcvar`
+rcvar="ntpdate_enable"
stop_cmd=":"
start_cmd="ntpdate_start"
diff --git a/etc/rc.d/pf b/etc/rc.d/pf
index 3180a2c..8dcc40d 100755
--- a/etc/rc.d/pf
+++ b/etc/rc.d/pf
@@ -11,7 +11,7 @@
. /etc/rc.subr
name="pf"
-rcvar=`set_rcvar`
+rcvar="pf_enable"
load_rc_config $name
start_cmd="pf_start"
stop_cmd="pf_stop"
diff --git a/etc/rc.d/pflog b/etc/rc.d/pflog
index 001ad38..e5511fc 100755
--- a/etc/rc.d/pflog
+++ b/etc/rc.d/pflog
@@ -10,7 +10,7 @@
. /etc/rc.subr
name="pflog"
-rcvar=`set_rcvar`
+rcvar="pflog_enable"
command="/sbin/pflogd"
pidfile="/var/run/pflogd.pid"
start_precmd="pflog_prestart"
diff --git a/etc/rc.d/pfsync b/etc/rc.d/pfsync
index 8be8928..fa89b30 100755
--- a/etc/rc.d/pfsync
+++ b/etc/rc.d/pfsync
@@ -10,7 +10,7 @@
. /etc/rc.subr
name="pfsync"
-rcvar=`set_rcvar`
+rcvar="pfsync_enable"
start_precmd="pfsync_prestart"
start_cmd="pfsync_start"
stop_cmd="pfsync_stop"
@@ -18,13 +18,6 @@ required_modules="pf"
pfsync_prestart()
{
- # XXX Currently pfsync cannot be a module as it must register
- # a network protocol in a static kernel table.
- if ! kldstat -q -m pfsync; then
- warn "pfsync(4) must be statically compiled in the kernel."
- return 1
- fi
-
case "$pfsync_syncdev" in
'')
warn "pfsync_syncdev is not set."
diff --git a/etc/rc.d/powerd b/etc/rc.d/powerd
index e59d979..84a260f 100755
--- a/etc/rc.d/powerd
+++ b/etc/rc.d/powerd
@@ -11,7 +11,7 @@
. /etc/rc.subr
name="powerd"
-rcvar=`set_rcvar`
+rcvar="powerd_enable"
command="/usr/sbin/${name}"
stop_postcmd=powerd_poststop
diff --git a/etc/rc.d/ppp b/etc/rc.d/ppp
index 84d6bc4..4c3b377 100755
--- a/etc/rc.d/ppp
+++ b/etc/rc.d/ppp
@@ -10,7 +10,7 @@
. /etc/rc.subr
name="ppp"
-rcvar=`set_rcvar`
+rcvar="ppp_enable"
command="/usr/sbin/${name}"
start_cmd="ppp_start"
stop_cmd="ppp_stop"
diff --git a/etc/rc.d/pppoed b/etc/rc.d/pppoed
index c939112..b60fdaa 100755
--- a/etc/rc.d/pppoed
+++ b/etc/rc.d/pppoed
@@ -11,7 +11,7 @@
. /etc/rc.subr
name="pppoed"
-rcvar="`set_rcvar`"
+rcvar="pppoed_enable"
start_cmd="pppoed_start"
# XXX stop_cmd will not be straightforward
stop_cmd=":"
diff --git a/etc/rc.d/quota b/etc/rc.d/quota
index edc90ef..eceb283 100755
--- a/etc/rc.d/quota
+++ b/etc/rc.d/quota
@@ -13,7 +13,7 @@
. /etc/rc.subr
name="quota"
-rcvar=`set_rcvar`
+rcvar="quota_enable"
load_rc_config $name
start_cmd="quota_start"
stop_cmd="/usr/sbin/quotaoff ${quotaoff_flags}"
diff --git a/etc/rc.d/rarpd b/etc/rc.d/rarpd
index 3602c87..db5f0c4 100755
--- a/etc/rc.d/rarpd
+++ b/etc/rc.d/rarpd
@@ -11,7 +11,7 @@
. /etc/rc.subr
name="rarpd"
-rcvar=`set_rcvar`
+rcvar="rarpd_enable"
command="/usr/sbin/${name}"
pidfile="/var/run/${name}.pid"
required_files="/etc/ethers"
diff --git a/etc/rc.d/rfcomm_pppd_server b/etc/rc.d/rfcomm_pppd_server
index f666684..72d2b87 100755
--- a/etc/rc.d/rfcomm_pppd_server
+++ b/etc/rc.d/rfcomm_pppd_server
@@ -11,7 +11,7 @@
. /etc/rc.subr
name="rfcomm_pppd_server"
-rcvar=`set_rcvar`
+rcvar="rfcomm_pppd_server_enable"
command="/usr/sbin/rfcomm_pppd"
start_cmd="rfcomm_pppd_server_start"
stop_cmd="rfcomm_pppd_server_stop"
diff --git a/etc/rc.d/route6d b/etc/rc.d/route6d
index a94c3e4..eec74cf 100755
--- a/etc/rc.d/route6d
+++ b/etc/rc.d/route6d
@@ -10,7 +10,7 @@
. /etc/rc.subr
name="route6d"
-rcvar=`set_rcvar`
+rcvar="route6d_enable"
set_rcvar_obsolete ipv6_router_enable route6d_enable
set_rcvar_obsolete ipv6_router route6d_program
diff --git a/etc/rc.d/routed b/etc/rc.d/routed
index c0bd5f7..55bab01 100755
--- a/etc/rc.d/routed
+++ b/etc/rc.d/routed
@@ -10,8 +10,8 @@
. /etc/rc.subr
name="routed"
+rcvar="routed_enable"
desc="network RIP and router discovery routing daemon"
-rcvar=`set_rcvar`
set_rcvar_obsolete router_enable routed_enable
set_rcvar_obsolete router routed_program
diff --git a/etc/rc.d/rpcbind b/etc/rc.d/rpcbind
index 94f4580..37a428a 100755
--- a/etc/rc.d/rpcbind
+++ b/etc/rc.d/rpcbind
@@ -10,7 +10,7 @@
. /etc/rc.subr
name="rpcbind"
-rcvar=`set_rcvar`
+rcvar="rpcbind_enable"
command="/usr/sbin/${name}"
stop_postcmd='/bin/rm -f /var/run/rpcbind.*'
diff --git a/etc/rc.d/rtadvd b/etc/rc.d/rtadvd
index 2ead892..48a3a64 100755
--- a/etc/rc.d/rtadvd
+++ b/etc/rc.d/rtadvd
@@ -12,7 +12,7 @@
. /etc/network.subr
name="rtadvd"
-rcvar=`set_rcvar`
+rcvar="rtadvd_enable"
command="/usr/sbin/${name}"
start_precmd="rtadvd_precmd"
diff --git a/etc/rc.d/rtsold b/etc/rc.d/rtsold
index 64a83e3..9ce19f3 100755
--- a/etc/rc.d/rtsold
+++ b/etc/rc.d/rtsold
@@ -11,7 +11,7 @@
. /etc/rc.subr
name="rtsold"
-rcvar=`set_rcvar`
+rcvar="rtsold_enable"
command="/usr/sbin/${name}"
pidfile="/var/run/${name}.pid"
start_postcmd="rtsold_poststart"
diff --git a/etc/rc.d/rwho b/etc/rc.d/rwho
index e088d99..f4137f7 100755
--- a/etc/rc.d/rwho
+++ b/etc/rc.d/rwho
@@ -11,7 +11,7 @@
. /etc/rc.subr
name="rwhod"
-rcvar="`set_rcvar`"
+rcvar="rwhod_enable"
command="/usr/sbin/${name}"
load_rc_config $name
diff --git a/etc/rc.d/sdpd b/etc/rc.d/sdpd
index acaf380..9f09a30 100755
--- a/etc/rc.d/sdpd
+++ b/etc/rc.d/sdpd
@@ -12,7 +12,7 @@
name="sdpd"
command="/usr/sbin/${name}"
-rcvar=`set_rcvar`
+rcvar="sdpd_enable"
required_modules="ng_btsocket"
load_rc_config $name
diff --git a/etc/rc.d/sendmail b/etc/rc.d/sendmail
index dfaa8e0..680020f 100755
--- a/etc/rc.d/sendmail
+++ b/etc/rc.d/sendmail
@@ -15,7 +15,7 @@
. /etc/rc.subr
name="sendmail"
-rcvar=`set_rcvar`
+rcvar="sendmail_enable"
required_files="/etc/mail/${name}.cf"
start_precmd="sendmail_precmd"
@@ -79,14 +79,14 @@ required_files=
if checkyesno sendmail_submit_enable; then
name="sendmail_submit"
- rcvar=`set_rcvar`
+ rcvar="sendmail_submit_enable"
start_cmd="${command} ${sendmail_submit_flags}"
run_rc_command "$1"
fi
if checkyesno sendmail_outbound_enable; then
name="sendmail_outbound"
- rcvar=`set_rcvar`
+ rcvar="sendmail_outbound_enable"
start_cmd="${command} ${sendmail_outbound_flags}"
run_rc_command "$1"
fi
diff --git a/etc/rc.d/sshd b/etc/rc.d/sshd
index 9f00199..a99083c 100755
--- a/etc/rc.d/sshd
+++ b/etc/rc.d/sshd
@@ -10,7 +10,7 @@
. /etc/rc.subr
name="sshd"
-rcvar=`set_rcvar`
+rcvar="sshd_enable"
command="/usr/sbin/${name}"
keygen_cmd="sshd_keygen"
start_precmd="sshd_precmd"
diff --git a/etc/rc.d/syslogd b/etc/rc.d/syslogd
index 5dcd3e9..118995e 100755
--- a/etc/rc.d/syslogd
+++ b/etc/rc.d/syslogd
@@ -10,7 +10,7 @@
. /etc/rc.subr
name="syslogd"
-rcvar=`set_rcvar`
+rcvar="syslogd_enable"
pidfile="/var/run/syslog.pid"
command="/usr/sbin/${name}"
required_files="/etc/syslog.conf"
@@ -41,7 +41,7 @@ syslogd_precmd()
#
for _l in $altlog_proglist; do
eval _ldir=\$${_l}_chrootdir
- if checkyesno `set_rcvar $_l` && [ -n "$_ldir" ]; then
+ if checkyesno ${_l}_enable && [ -n "$_ldir" ]; then
echo "${_ldir}/var/run/log" >> $sockfile
fi
done
diff --git a/etc/rc.d/timed b/etc/rc.d/timed
index d1cf1a2..b8d7084 100755
--- a/etc/rc.d/timed
+++ b/etc/rc.d/timed
@@ -11,7 +11,7 @@
. /etc/rc.subr
name="timed"
-rcvar=`set_rcvar`
+rcvar="timed_enable"
command="/usr/sbin/${name}"
load_rc_config $name
diff --git a/etc/rc.d/ubthidhci b/etc/rc.d/ubthidhci
index 529f8d6..03751d3 100755
--- a/etc/rc.d/ubthidhci
+++ b/etc/rc.d/ubthidhci
@@ -11,8 +11,8 @@
. /etc/rc.subr
name="ubthidhci"
+rcvar="ubthidhci_enable"
command="/usr/sbin/usbconfig"
-rcvar=`set_rcvar`
start_precmd="ubthidhci_prestart"
ubthidhci_prestart()
diff --git a/etc/rc.d/virecover b/etc/rc.d/virecover
index 77cd9a0..f3bcc85 100755
--- a/etc/rc.d/virecover
+++ b/etc/rc.d/virecover
@@ -12,7 +12,7 @@
. /etc/rc.subr
name="virecover"
-rcvar="`set_rcvar`"
+rcvar="virecover_enable"
stop_cmd=":"
start_cmd="virecover_start"
diff --git a/etc/rc.d/watchdogd b/etc/rc.d/watchdogd
index e852126..043e5bc 100755
--- a/etc/rc.d/watchdogd
+++ b/etc/rc.d/watchdogd
@@ -34,7 +34,7 @@
. /etc/rc.subr
name="watchdogd"
-rcvar="`set_rcvar`"
+rcvar="watchdogd_enable"
command="/usr/sbin/${name}"
pidfile="/var/run/${name}.pid"
diff --git a/etc/rc.firewall b/etc/rc.firewall
index 3db984e..d5f2dbe 100644
--- a/etc/rc.firewall
+++ b/etc/rc.firewall
@@ -46,7 +46,7 @@ fi
# client - will try to protect just this machine
# simple - will try to protect a whole network
# closed - totally disables IP services except via lo0 interface
-# workstation - will try to protect just this machine using statefull
+# workstation - will try to protect just this machine using stateful
# firewalling. See below for rc.conf variables used
# UNKNOWN - disables the loading of firewall rules.
# filename - will load the rules in the given filename (full path required)
@@ -105,7 +105,7 @@ setup_ipv6_mandatory () {
${fwcmd} add pass ipv6-icmp from fe80::/10 to fe80::/10
${fwcmd} add pass ipv6-icmp from fe80::/10 to ff02::/16
- # Allow ICMPv6 destination unreach
+ # Allow ICMPv6 destination unreachable
${fwcmd} add pass ipv6-icmp from any to any icmp6types 1
# Allow NS/NA/toobig (don't filter it out)
@@ -437,7 +437,7 @@ case ${firewall_type} in
# default denied packets should be
# logged (in /var/log/security).
# firewall_nologports: List of TCP/UDP ports for which
- # denied incomming packets are not
+ # denied incoming packets are not
# logged.
# Allow packets for which a state has been built.
@@ -505,7 +505,7 @@ case ${firewall_type} in
${fwcmd} add deny { tcp or udp } from any to any $i in
done
- # Broadcasts and muticasts
+ # Broadcasts and multicasts
${fwcmd} add deny ip from any to 255.255.255.255
${fwcmd} add deny ip from any to 224.0.0.0/24 in # XXX
@@ -513,7 +513,7 @@ case ${firewall_type} in
${fwcmd} add deny udp from any to any 520 in
# Noise from webbrowsing.
- # The statefull filter is a bit agressive, and will cause some
+ # The stateful filter is a bit aggressive, and will cause some
# connection teardowns to be logged.
${fwcmd} add deny tcp from any 80,443 to any 1024-65535 in
diff --git a/etc/rc.initdiskless b/etc/rc.initdiskless
index e731abb..cfb9214 100644
--- a/etc/rc.initdiskless
+++ b/etc/rc.initdiskless
@@ -46,16 +46,16 @@
# bcast/${ipba} same as above
# ${class} where ${class} is a list of directories supplied by
# bootp/dhcp through the T134 option.
-# ${ipba} and ${class} are typicall used to configure features
+# ${ipba} and ${class} are typically used to configure features
# for group of diskless clients, or even individual features;
# ${ip} where ${ip} is the machine's assigned IP address, typically
# used to set host-specific features;
# ip/${ip} same as above
#
# Template directories are scanned in the order they are listed above,
-# with each sucessive directory overriding (merged into) the previous one;
+# with each successive directory overriding (merged into) the previous one;
# non-existing directories are ignored. The subdirectory forms exist to
-# help keep the top level /conf managable in large installations.
+# help keep the top level /conf manageable in large installations.
#
# The existence of a directory /conf/T/M causes this script to create a
# memory filesystem mounted as /M on the client.
diff --git a/etc/rc.subr b/etc/rc.subr
index 29ed3dd..0da7c07 100644
--- a/etc/rc.subr
+++ b/etc/rc.subr
@@ -32,7 +32,6 @@
# functions used by various rc scripts
#
-: ${rcvar_manpage:='rc.conf(5)'}
: ${RC_PID:=$$}; export RC_PID
#
@@ -55,47 +54,6 @@ JID=`$PS -p $$ -o jid=`
# functions
# ---------
-# set_rcvar [var] [defval] [desc]
-#
-# Echo or define a rc.conf(5) variable name. Global variable
-# $rcvars is used.
-#
-# If no argument is specified, echo "${name}_enable".
-#
-# If only a var is specified, echo "${var}_enable".
-#
-# If var and defval are specified, the ${var} is defined as
-# rc.conf(5) variable and the default value is ${defvar}. An
-# optional argument $desc can also be specified to add a
-# description for that.
-#
-set_rcvar()
-{
- case $# in
- 0)
- echo ${name}_enable
- ;;
- 1)
- echo ${1}_enable
- ;;
- *)
- debug "rcvar_define: \$$1=$2 is added" \
- " as a rc.conf(5) variable."
-
- local _var
- _var=$1
- rcvars="${rcvars# } $_var"
- eval ${_var}_defval=\"$2\"
- shift 2
- # encode multiple lines of _desc
- for l in "$@"; do
- eval ${_var}_desc=\"\${${_var}_desc#^^}^^$l\"
- done
- eval ${_var}_desc=\"\${${_var}_desc#^^}\"
- ;;
- esac
-}
-
# set_rcvar_obsolete oldvar [newvar] [msg]
# Define obsolete variable.
# Global variable $rcvars_obsolete is used.
@@ -152,7 +110,7 @@ checkyesno()
return 1
;;
*)
- warn "\$${1} is not set properly - see ${rcvar_manpage}."
+ warn "\$${1} is not set properly - see rc.conf(5)."
return 1
;;
esac
@@ -683,7 +641,7 @@ run_rc_command()
fi
fi
- eval $_pidcmd # determine the pid if necessary
+ [ -z "$autoboot" ] && eval $_pidcmd # determine the pid if necessary
for _elem in $_keywords; do
if [ "$_elem" != "$rc_arg" ]; then
@@ -857,8 +815,8 @@ $command $rc_flags $command_args"
echo ""
fi
echo "#"
- # Get unique vars in $rcvar $rcvars
- for _v in $rcvar $rcvars; do
+ # Get unique vars in $rcvar
+ for _v in $rcvar; do
case $v in
$_v\ *|\ *$_v|*\ $_v\ *) ;;
*) v="${v# } $_v" ;;
@@ -1004,7 +962,7 @@ run_rc_script()
unset name command command_args command_interpreter \
extra_commands pidfile procname \
- rcvar rcvars rcvars_obsolete required_dirs required_files \
+ rcvar rcvars_obsolete required_dirs required_files \
required_vars
eval unset ${_arg}_cmd ${_arg}_precmd ${_arg}_postcmd
@@ -1036,7 +994,7 @@ run_rc_script()
#
load_rc_config()
{
- local _name _var _defval _v _msg _new
+ local _name _rcvar_val _var _defval _v _msg _new
_name=$1
if [ -z "$_name" ]; then
err 3 'USAGE: load_rc_config name'
@@ -1061,7 +1019,7 @@ load_rc_config()
fi
# Set defaults if defined.
- for _var in $rcvar $rcvars; do
+ for _var in $rcvar; do
eval _defval=\$${_var}_defval
if [ -n "$_defval" ]; then
eval : \${$_var:=\$${_var}_defval}
@@ -1117,7 +1075,7 @@ load_rc_config_var()
#
rc_usage()
{
- echo -n 1>&2 "Usage: $0 [fast|force|one]("
+ echo -n 1>&2 "Usage: $0 [fast|force|one|quiet]("
_sep=
for _elem; do
@@ -1280,7 +1238,7 @@ backup_file()
# Make a symbolic link 'link' to src from basedir. If the
# directory in which link is to be created does not exist
# a warning will be displayed and an error will be returned.
-# Returns 0 on sucess, 1 otherwise.
+# Returns 0 on success, 1 otherwise.
#
make_symlink()
{
diff --git a/etc/services b/etc/services
index 146fefc..642fe08 100644
--- a/etc/services
+++ b/etc/services
@@ -795,7 +795,7 @@ alpes 463/udp
kpasswd5 464/tcp # Kerberos (v5)
kpasswd5 464/udp # Kerberos (v5)
#PROBLEMS!==============================================================
-# IANA has offically assigned these two ports as ``kpasswd''
+# IANA has officially assigned these two ports as ``kpasswd''
#kpasswd 464/tcp # Kerberos (v5)
#kpasswd 464/udp # Kerberos (v5)
#PROBLEMS!==============================================================
@@ -1275,8 +1275,8 @@ hcp-wismar 686/tcp #Hardware Control Protocol Wismar
hcp-wismar 686/udp #Hardware Control Protocol Wismar
asipregistry 687/tcp
asipregistry 687/udp
-realm-rusd 688/tcp #ApplianceWare managment protocol
-realm-rusd 688/udp #ApplianceWare managment protocol
+realm-rusd 688/tcp #ApplianceWare management protocol
+realm-rusd 688/udp #ApplianceWare management protocol
nmap 689/tcp
nmap 689/udp
vatp 690/tcp #Velazquez Application Transfer Protocol
@@ -2392,7 +2392,7 @@ xdsxdm 6558/tcp
xdsxdm 6558/udp
sane-port 6566/tcp #Scanner Access Now Easy (SANE) Control Port
sane-port 6566/udp #Scanner Access Now Easy (SANE) Control Port
-ircd 6667/tcp #Internet Relay Chat (unoffical)
+ircd 6667/tcp #Internet Relay Chat (unofficial)
frc-hp 6704/sctp #ForCES HP (High Priority) channel
frc-mp 6705/sctp #ForCES MP (Medium Priority) channel
frc-lp 6706/sctp #ForCES LP (Low priority) channel
diff --git a/games/factor/factor.c b/games/factor/factor.c
index d1c69a7..8b76c17 100644
--- a/games/factor/factor.c
+++ b/games/factor/factor.c
@@ -322,7 +322,7 @@ BN_print_dec_fp(FILE *fp, const BIGNUM *num)
buf = BN_bn2dec(num);
if (buf == NULL)
return; /* XXX do anything here? */
- fprintf(fp, buf);
+ fprintf(fp, "%s", buf);
free(buf);
}
diff --git a/games/fortune/datfiles/fortunes b/games/fortune/datfiles/fortunes
index 1d0ccf4..5fc8374 100644
--- a/games/fortune/datfiles/fortunes
+++ b/games/fortune/datfiles/fortunes
@@ -773,40 +773,6 @@ the female, autopsied her, and sure enough, found the German and the Pole.
"What do you think?" said the first ranger.
"The Czech is in the male," replied the second.
%
- A group of soldiers being prepared for a practice landing on a tropical
-island were warned of the one danger the island held, a poisonous snake that
-could be readily identified by its alternating orange and black bands. They
-were instructed, should they find one of these snakes, to grab the tail end of
-the snake with one hand and slide the other hand up the body of the snake to
-the snake's head. Then, forcefully, bend the thumb above the snake's head
-downward to break the snake's spine. All went well for the landing, the
-charge up the beach, and the move into the jungle. At one foxhole site, two
-men were starting to dig and wondering what had happened to their partner.
-Suddenly he staggered out of the underbrush, uniform in shreds, covered with
-blood. He collapsed to the ground. His buddies were so shocked they could
-only blurt out, "What happened?"
- "I ran from the beachhead to the edge of the jungle, and, as I hit the
-ground, I saw an orange and black striped snake right in front of me. I
-grabbed its tail end with my left hand. I placed my right hand above my left
-hand. I held firmly with my left hand and slid my right hand up the body of
-the snake. When I reached the head of the snake I flicked my right thumb down
-to break the snake's spine... did you ever goose a tiger?"
-%
- A guy returns from a long trip to Europe, having left his beloved
-dog in his brother's care. The minute he's cleared customs, he calls up his
-brother and inquires after his pet.
- "Your dog's dead," replies his brother bluntly.
- The guy is devastated. "You know how much that dog meant to me,"
-he moaned into the phone. "Couldn't you at least have thought of a nicer way
-of breaking the news? Couldn't you have said, `Well, you know, the dog got
-outside one day, and was crossing the street, and a car was speeding around a
-corner...' or something...? Why are you always so thoughtless?"
- "Look, I'm sorry," said his brother, "I guess I just didn't think."
- "Okay, okay, let's just put it behind us. How are you anyway?
-How's Mom?"
- His brother is silent a moment. "Uh," he stammers, "uh... Mom got
-outside one day..."
-%
A hard-luck actor who appeared in one colossal disaster after another
finally got a break, a broken leg to be exact. Someone pointed out that it's
the first time the poor fellow's been in the same cast for more than a week.
@@ -1137,12 +1103,6 @@ went out to be killed?
The Pole pulls a bottle of vodka from the other side of his jacket.
He smiles and replies, "Five men on one bottle -- too many."
%
- A priest was walking along the cliffs at Dover when he came upon
-two locals pulling another man ashore on the end of a rope. "That's what
-I like to see", said the priest, "A man helping his fellow man".
- As he was walking away, one local remarked to the other, "Well,
-he sure doesn't know the first thing about shark fishing."
-%
A program should be light and agile, its subroutines connected like a
strings of pearls. The spirit and intent of the program should be retained
throughout. There should be neither too little nor too much, neither needless
@@ -1361,16 +1321,6 @@ realize the full significance of Pharoah's oxhide!"
-- Grendel Briarton "Through Time & Space With Ferdinand
Feghoot!"
%
- After watching an extremely attractive maternity-ward patient
-earnestly thumbing her way through a telephone directory for several
-minutes, a hospital orderly finally asked if he could be of some help.
- "No, thanks," smiled the young mother, "I'm just looking for a
-name for my baby."
- "But the hospital supplies a special booklet that lists hundreds
-of first names and their meanings," said the orderly.
- "That won't help," said the woman, "my baby already has a first
-name."
-%
All I really need to know about how to live and what to do and
how to be I learned in kindergarten. Wisdom was not at the top of the
graduate-school mountain, but there in the sandpile at Sunday School.
@@ -1470,26 +1420,6 @@ the ideas and frills that were cautiously sidetracked on the first one.
The result, as Ovid says, is a "big pile".
-- Frederick Brooks, Jr., "The Mythical Man-Month"
%
- An eighty-year-old woman is rocking away the afternoon on her
-porch when she sees an old, tarnished lamp sitting near the steps. She
-picks it up, rubs it gently, and lo and behold a genie appears! The genie
-tells the woman the he will grant her any three wishes her heart desires.
- After a bit of thought, she says, "I wish I were young and
-beautiful!" And POOF! In a cloud of smoke she becomes a young, beautiful,
-voluptuous woman.
- After a little more thought, she says, "I would like to be rich
-for the rest of my life." And POOF! When the smoke clears, there are
-stacks and stacks of money lying on the porch.
- The genie then says, "Now, madam, what is your final wish?"
- "Well," says the woman, "I would like for you to transform my
-faithful old cat, whom I have loved dearly for fifteen years, into a young
-handsome prince!"
- And with another billow of smoke the cat is changed into a tall,
-handsome, young man, with dark hair, dressed in a dashing uniform.
- As they gaze at each other in adoration, the prince leans over to
-the woman and whispers into her ear, "Now, aren't you sorry you had me
-fixed?"
-%
An elderly man stands in line for hours at a Warsaw meat store (meat
is severely rationed). When the butcher comes out at the end of the day and
announces that there is no meat left, the man flies into a rage.
@@ -1552,14 +1482,6 @@ young welp with a masochistic streak who would like to run the most
up-and-down bureaucracy in the history of mankind."
-- R. L. Forward, "Flight of the Dragonfly"
%
- "Anything else, sir?" asked the attentive bellhop, trying his best
-to make the lady and gentleman comfortable in their penthouse suite in the
-posh hotel.
- "No. No, thank you," replied the gentleman.
- "Anything for your wife, sir?" the bellhop asked.
- "Why, yes, young man," said the gentleman. "Would you bring me
-a postcard?"
-%
"Anything else you wish to draw to my attention, Mr. Holmes ?"
"The curious incident of the stable dog in the nighttime."
"But the dog did nothing in the nighttime."
@@ -1932,52 +1854,16 @@ said the Duck: "it's generally a frog or a worm.
The question is, what did the archbishop find?"
%
- Four Oxford dons were taking their evening walk together and as
-usual, were engaged in casual but learned conversation. On this particular
-evening, their conversation was about the names given to groups of animals,
-such as a "pride of lions" or a "gaggle of geese."
- One of the professors noticed a group of prostitutes down the block,
-and posed the question, "What name would be given to that group?" The four
-fell into silence for a moment, as they pondered the possibilities...
- At last, one spoke: "How about `a Jam of Tarts'?" The others nodded
-in acknowledgment as they continued to consider the problem. A second
-professor spoke: "I'd suggest `an Essay of Trollops.'" Again, the others
-nodded. A third spoke: "I propose `a Flourish of Strumpets.'"
- They continued their walk in silence, until the first professor
-remarked to the remaining professor, who was the most senior and learned of
-the four, "You haven't suggested a name for our ladies. What are your
-thoughts?"
- Replied the fourth professor, "`An Anthology of Prose.'"
-%
Fred noticed his roommate had a black eye upon returning from a dance.
"What happened?"
"I was struck by the beauty of the place."
%
- Friends were surprised, indeed, when Frank and Jennifer broke their
-engagement, but Frank had a ready explanation: "Would you marry someone who
-was habitually unfaithful, who lied at every turn, who was selfish and lazy
-and sarcastic?"
- "Of course not," said a sympathetic friend.
- "Well," retorted Frank, "neither would Jennifer."
-%
"Gee, Mudhead, everyone at Morse Science High has an
extracurricular activity except you."
"Well, gee, doesn't Louise count?"
"Only to ten, Mudhead."
-- The Firesign Theatre
%
- "Gentlemen of the jury," said the defense attorney, now beginning
-to warm to his summation, "the real question here before you is, shall this
-beautiful young woman be forced to languish away her loveliest years in a
-dark prison cell? Or shall she be set free to return to her cozy little
-apartment at 4134 Mountain Ave. -- there to spend her lonely, loveless hours
-in her boudoir, lying beside her little Princess phone, 962-7873?"
-%
- God decided to take the devil to court and settle their
-differences once and for all.
- When Satan heard of this, he grinned and said, "And just
-where do you think you're going to find a lawyer?"
-%
Graduating seniors, parents and friends...
Let me begin by reassuring you that my remarks today will stand up
to the most stringent requirements of the new appropriateness.
@@ -2050,33 +1936,6 @@ for it is complete within itself. It exists beyond space and time."
Software and Hardware, ashamed, returned to their homes.
-- Geoffrey James, "The Tao of Programming"
%
- Harry, a golfing enthusiast if there ever was one, arrived home
-from the club to an irate, ranting wife.
- "I'm leaving you, Harry," his wife announced bitterly. "You
-promised me faithfully that you'd be back before six and here it is almost
-nine. It just can't take that long to play 18 holes of golf."
- "Honey, wait," said Harry. "Let me explain. I know what I promised
-you, but I have a very good reason for being late. Fred and I tee'd off
-right on time and everything was fine for the first three holes. Then, on
-the fourth tee Fred had a stroke. I ran back to the clubhouse but couldn't
-find a doctor. And, by the time I got back to Fred, he was dead. So, for
-the next 15 holes, it was hit the ball, drag Fred, hit the ball, drag Fred...
-%
- Harry constantly irritated his friends with his eternal optimism.
-No matter how bad the situation, he would always say, "Well, it could have
-been worse."
- To cure him of his annoying habit, his friends decided to invent a
-situation so completely black, so dreadful, that even Harry could find no
-hope in it. Approaching him at the club bar one day, one of them said,
-"Harry! Did you hear what happened to George? He came home last night,
-found his wife in bed with another man, shot them both, and then turned
-the gun on himself!"
- "Terrible," said Harry. "But it could have been worse."
- "How in hell," demanded his dumbfounded friend, "could it possibly
-have been worse?"
- "Well," said Harry, "if it had happened the night before, I'd be
-dead right now."
-%
"Has anyone had problems with the computer accounts?"
"Yes; I don't have one."
"Okay, you can send mail to one of the tutors..."
@@ -2112,13 +1971,6 @@ lessening mine; as he who lights his taper at mine receives light
without darkening me.
-- Thomas Jefferson on patents on ideas
%
- "Heard you were moving your piano, so I came over to help."
- "Thanks. Got it upstairs already."
- "Do it alone?"
- "Nope. Hitched the cat to it."
- "How would that help?"
- "Used a whip."
-%
"Hey, Sam, how about a loan?"
"Whattaya need?"
"Oh, about $500."
@@ -2182,11 +2034,6 @@ could forget that, to within half a percent, pi seconds is a nanocentury.
social climber said to her roommate. "I mean, I've never seen a Porsche
full of money before."
%
- "How'd you get that flat?"
- "Ran over a bottle."
- "Didn't you see it?"
- "Damn kid had it under his coat."
-%
Human thinking can skip over a great deal, leap over small
misunderstandings, can contain ifs and buts in untroubled corners of
the mind. But the machine has no corners. Despite all the attempts to
@@ -2199,11 +2046,6 @@ line by code line, the programmer confronts an awful, inevitable truth:
The ways of human and machine understanding are disjunct.
-- Ellen Ullman, "Close to the Machine"
%
- "I believe you have the wrong number," said the old gentleman into
-the phone. "You'll have to call the weather bureau for that information."
- "Who was that?" his young wife asked.
- "Some guy wanting to know if the coast was clear."
-%
"I cannot read the fiery letters," said Frito Bugger in a
quavering voice.
"No," said GoodGulf, "but I can. The letters are Elvish, of
@@ -2496,11 +2338,6 @@ it gets so bad you can't handle it alone. We're isolates, Arnold. Meetings
would destroy the whole point of it."
-- Thomas Pynchon, "The Crying of Lot 49"
%
- "I'm looking for adventure, excitement, beautiful women," cried the
-young man to his father as he prepared to leave home. "Don't try to stop me.
-I'm on my way."
- "Who's trying to stop you?" shouted the father. "Take me along!"
-%
I'm sure that VMS is completely documented, I just haven't found the
right manual yet. I've been working my way through the manuals in the document
library and I'm half way through the second cabinet, (3 shelves to go), so I
@@ -2558,20 +2395,6 @@ pie-bakers and pie-dividers is way out of whack." Could Dick Butcher have
been an efficiency expert?
-- Motor Trend, May 1983
%
- In the beginning, God created the Earth and he said, "Let there be
-mud."
- And there was mud.
- And God said, "Let Us make living creatures out of mud, so the mud
-can see what we have done."
- And God created every living creature that now moveth, and one was
-man. Mud-as-man alone could speak.
- "What is the purpose of all this?" man asked politely.
- "Everything must have a purpose?" asked God.
- "Certainly," said man.
- "Then I leave it to you to think of one for all of this," said God.
- And He went away.
- -- Kurt Vonnegut, Jr., "Between Time and Timbuktu"
-%
In the beginning there was data. The data was without form and
null, and darkness was upon the face of the console; and the Spirit of
IBM was moving over the face of the market. And DEC said, "Let there
@@ -2926,11 +2749,6 @@ Church soon made its peace with Galileo's cosmology. They had no choice; the
earth really does revolve about the sun.
-- S. J. Gould, "The Mismeasure of Man"
%
- "My mother," said the sweet young steno, "says there are some things
-a girl should not do before twenty."
- "Your mother is right," said the executive, "I don't like a large
-audience, either."
-%
NEW YORK -- Kraft Foods, Inc. announced today that its board of
directors unanimously rejected the $11 billion takeover bid by Philip
Morris and Co. A Kraft spokesman stated in a press conference that the
@@ -3727,14 +3545,6 @@ was solidly entrenched in the market, and the management saw no need to
improve ...
-- Dave Barry, "In Search of Excellence"
%
- "That wife of mine is a liar," said the angry husband to a
-sympathetic pal seated next to him in a bar.
- "How do you know?" the friend asked.
- "She didn't come home last night, and when I asked her where
-she'd been she said she'd spent the night with her sister Shirley."
- "So?"
- "So, she's a liar. I spent the night with her sister Shirley."
-%
"That's right; the upper-case shift works fine on the screen, but
they're not coming out on the damn printer... Hold? Sure, I'll hold."
-- e. e. cummings last service call
@@ -3768,13 +3578,6 @@ laughed uproariously. "What's the matter?" grumbled the boss. "Haven't you
got a sense of humor?"
"I don't have to laugh," she said. "I'm leaving Friday anyway.
%
- The doctor had just finished giving the young man a thorough
-physical examination. "The best thing for you to do," the M.D. said,
-"is give up drinking, give up smoking, get to bed early and stay away
-from women."
- "Doc, I don't deserve the best," pleaded his patient. "What's
-second best?"
-%
The FIELD GUIDE to NORTH AMERICAN MALES
SPECIES: Cranial Males
@@ -3889,22 +3692,6 @@ win through and still know where his towel is, is clearly a man to be
reckoned with.
-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
%
- The honeymooning couple agreed it was a fine day for horseback riding.
-After a mile or so, the bride's mount cantered under a low tree and a
-branch scraped her forehead lightly. The groom dismounted, glared at his
-wife's horse, and said, "That's number one."
- The ride then proceeded. After another mile or so, the bride's
-horse stumbled over a pebble and the lady suffered a slight jostling.
-Again, her man leapt from his saddle and strode over to the nervous animal.
-"That's two," he said.
- Five miles later, the bride's horse became frightened when a rabbit
-crossed its path, reared up and threw the girl. Immediately, the groom was
-off his horse. "That's three!", he shouted, and, pulling out a pistol, he
-shot the horse between the eyes.
- "You brute!" shrieked his bride. "Now I see the kind of man I
-married! You're a sadist, that's what!"
- The groom turned to her coolly. "That's one," he said.
-%
"The jig's up, Elman."
"Which jig?"
-- Jeff Elman
@@ -4349,29 +4136,6 @@ of his mortal enemy -- to those both come alike the taste of that rare food
spread only for demons or for gods."
-- Gordon R. Dickson, "Soldier Ask Not"
%
- "They spend years searching for their natural parents, convinced their
-parents will be happy to see them. I mean, really, can you imagine someone
-being happy to see an orphan? Nobody wants them... that's why they're orphans!"
- The speaker is Anne Baker, founder and guiding force behind
-Orphan-Off, an organization dedicated to keeping orphans confused about the
-whereabouts of their natural parents. She is a woman with a mission:
- "Basically, what we do is band together to exchange information
-about which orphans are looking for which parents in what part of the
-country. We're completely computerized.
- "The idea is to throw the orphans as many red herrings and false
-leads as possible. We'll tell some twenty-three-year-old loser that his
-real parents can be found at a certain address on the other side of the
-country. Well, by the time the kid shows up, the family is prepared. They
-look over the kid's photos and information and they say, 'Oh, the Emersons...
-yeah, they used to live here... I think they moved out about five years ago.
-I think they went to Iowa, or maybe Idaho.'
- "Bam, the door shuts in the kid's face and he's back to zero again.
-He's got nothing to go on but the orphan's pathetic determination to continue.
- "It's really amazing how much these kids will put up with. Last year
-we even sent one kid all the way to Australia. I mean, really. Besides, if
-your natural parents were Australian, would you want to meet them?"
- -- "National Lampoon", September, 1984
-%
This is where the bloodthirsty license agreement is supposed to go,
explaining that Interactive EasyFlow is a copyrighted package licensed for
use by a single person, and sternly warning you not to pirate copies of it
@@ -4683,13 +4447,6 @@ men with whom I felt an immediate sympat - to use a coining of Max Beerbohm's
more satisfactory to me than the opaque vogue word "empathy".
-- Alistair Cooke, "Six Men"
%
- "What the hell are you getting so upset about? I thought you
-didn't believe in God".
- "I don't," she sobbed, bursting violently into tears, "but the
-God I don't believe in is a good God, a just God, a merciful God. He's
-not the mean and stupid God you make Him out to be".
- -- Joseph Heller
-%
"What was the worst thing you've ever done?"
"I won't tell you that, but I'll tell you the worst thing that
ever happened to me... the most dreadful thing."
@@ -4806,20 +4563,6 @@ unanswered. Eventually the form for the next year's return arrived. In
the section marked "DEDUCTIONS," Rogers listed: "Bad debt, US Government
-- $40,000."
%
- With deep concern, if not alarm, Dick noted that his friend
-Conrad was drunker than he'd ever seen him before. "What's the trouble,
-buddy?", he asked, sliding onto the stool next to his friend.
- "It's a woman, Dick," Conrad replied.
- "I guessed that much. Tell me about it."
- "I can't," Conrad said. But after a few more drinks his tongue
-and resolution both seemed to weaken and, turning to his buddy, he said,
-"Okay. It's your wife."
- "My wife!!"
- "Yeah."
- "What about her?"
- Conrad pondered the question heavily, and draped his arm around
-his pal. "Well, buddy-boy," he said, "I'm afraid she's cheating on us."
-%
Work Hard.
Rock Hard.
Eat Hard.
@@ -4956,7 +4699,7 @@ the soul. Worry, doubt, self-distrust, fear and despair--these are the
long, long years that bow the head and turn the growing spirit back to
dust.
- Whether seventy or sixteen, there is in every being’s heart a
+ Whether seventy or sixteen, there is in every being's heart a
love of wonder; the sweet amazement at the stars and starlike things and
thoughts; the undaunted challenge of events, the unfailing childlike
appetite for what comes next, and the joy in the game of life.
@@ -6593,9 +6336,6 @@ a fund for his funeral. The Lord Chief Justice of Orbury was asked to donate
a shilling. "Only a shilling?" exclaimed the man. "Only a shilling to bury
an attorney? Here's a guinea; go and bury twenty of them."
%
-A fail-safe circuit will destroy others.
- -- Klipstein
-%
A failure will not appear until a unit has passed final inspection.
%
A fair exterior is a silent recommendation.
@@ -6662,17 +6402,6 @@ go!'"
%
A few hours grace before the madness begins again.
%
-A figure with curves always offers a lot of interesting angles.
-%
-A fisherman from Maine went to Alabama on his vacation. He rented a boat,
-rowed out to the middle of the lake, and cast his line, but when he looked
-down into the water he was horrified to see a man wrapped in chains lying
-on the bottom of the lake. He quickly rowed to shore and ran to the police
-station. "Sheriff, sheriff," he gasped, there's a guy wrapped in chains,
-drowned in the lake!"
- "Now ain't that jest like a Yankee," drawled the sheriff, "to steal
-more chain than he can swim with?"
-%
A fitter fits; Though sinners sin
A cutter cuts; And thinners thin
And an aircraft spotter spots; And paper-blotters blot
@@ -6697,11 +6426,6 @@ A fool and his honey are soon parted.
%
A fool and his money are soon popular.
%
-A fool and your money are soon partners.
-%
-A fool is a man who worries about whether or not his lover has integrity.
-A wise man, on the other hand, busies himself with deeper attributes.
-%
A fool must now and then be right by chance.
%
A foolish consistency is the hobgoblin of little minds.
@@ -6744,8 +6468,6 @@ You'll just be walking down the street and... Ooohh, that's much better.
A friend of mine won't get a divorce, because he hates
lawyers more than he hates his wife.
%
-A friend with weed is a friend indeed.
-%
A full belly makes a dull brain.
-- Benjamin Franklin
@@ -6809,9 +6531,6 @@ A girl with a future avoids the man with a past.
A girl's best friend is her mutter.
-- Dorothy Parker
%
-A girl's conscience doesn't really keep her from doing anything wrong--
-it merely keeps her from enjoying it.
-%
A gleekzorp without a tornpee is like
a quop without a fertsneet (sort of).
%
@@ -7102,27 +6821,6 @@ A language that doesn't have everything is
actually easier to program in than some that do.
-- Dennis M. Ritchie
%
-A lanky Texan was mad because Texas had just become the second largest state in
-the Union, so he made up his mind to move to Alaska. He drove for three days
-and three nights to get there and finally he came to what looked like the state
-line. He halted his car and walked up to the border guard. "Hi, there! How
-do I become a resident of this here biggest state?" demanded the Texan.
- The guard looked him up and down and grinned. "Waal," he answered,
-there are three things you gotta do to get in. First, drink down a quart of
-110 proof corn liquor without blinkin'. Second, kill a grizzly bear, and
-third, make love to an Eskimo woman."
- "Sounds easy enough," said the Texan. "Where can I get a quart of
-this here corn liquor?"
- "Got one right here," replied the guard.
- The Texan gulped down the whiskey without batting an eyelash.
-"Now, do you happen to know where I can find me a grizzly?"
- "Yep," answered the guard, "there's a big b'ar over that way, 'bout
-a mile... lives in a cave on that cliff."
- The Texan lurched merrily off. About an hour later he returned
-with his clothes almost torn off and his face scratched and bloody. He was
-smiling happily. "Now," he roared, "where's that damn Eskimo woman you
-want killed?"
-%
A large number of installed systems work by fiat.
That is, they work by being declared to work.
-- Anatol Holt
@@ -7230,33 +6928,16 @@ A lot of people I know believe in positive thinking,
and so do I. I believe everything positively stinks.
-- Lew Col
%
-A lover without indiscretion is no lover at all.
- -- Thomas Hardy
-%
A major, with wonderful force,
Called out in Hyde Park for a horse.
All the flowers looked round,
But no horse could be found;
So he just rhododendron, of course.
%
-A male gynecologist is like an auto mechanic who has never owned a car.
- -- Carrie Snow
-%
-A man always needs to remember one thing about
-a beautiful woman. Somewhere, somebody's tired of her.
-%
A man always remembers his first love with special
tenderness, but after that begins to bunch them.
-- H. L. Mencken
%
-A man arrived home early to find his wife in the arms of his best friend,
-who swore how much they were in love. To quiet the enraged husband, the
-lover suggested, "Friends shouldn't fight, let's play gin rummy. If I win,
-you get a divorce so I can marry her. If you win, I promise never to see
-her again. Okay?"
- "Alright," agreed the husband. "But how about a quarter a point
-on the side to make it interesting?"
-%
A man can have two, maybe three love affairs while he's married. After
that it's cheating.
-- Yves Montand
@@ -7393,9 +7074,6 @@ in no other way.
A man who fishes for marlin in ponds
will put his money in Etruscan bonds.
%
-A man who likes to lie in bed can usually
-find a girl willing to listen to him.
-%
A man who turns green has eschewed protein.
%
A man with 3 wings and a dictionary is cousin to the turkey.
@@ -7403,12 +7081,8 @@ A man with 3 wings and a dictionary is cousin to the turkey.
A man with one watch knows what time it is.
A man with two watches is never quite sure.
%
-A man without a God is like a fish without a bicycle.
-%
A man without a woman is like a fish without gills.
%
-A man without a woman is like a statue without pigeons.
-%
A man would still do something out of sheer perversity - he would create
destruction and chaos - just to gain his point... and if all this could in
turn be analyzed and prevented by predicting that it would occur, then man
@@ -7593,33 +7267,6 @@ will go far towards curing the rascal of a very bad ailment.
A New York City ordinance prohibits the shooting of rabbits from the
rear of a Third Avenue street car -- if the car is in motion.
%
-A New Yorker is riding down the road in his new Mercedes. So intent is he
-on the cocaine in his hand he completely misses a turn and his car plunges
-over the five-hundred-foot cliff to be smashed into pieces at the bottom.
-As the on-lookers rush to the edge of the cliff they see him fifty feet
-from the top of the cliff clinging to a stunted bush with all his strength.
-"Dear Lord," he prays, "I never asked you for nothin' before, but I'm askin'
-you now: Save me, Lord, save me."
- Booms the Lord: "LET GO OF THE BRANCH."
- "But Lord, if I do that, I'll fall!"
- "TRUST ME, LET GO OF THE BRANCH."
- "But Lord, I'm gonna fall and die..."
- "TRUST ME TO SAVE YOU. LET GO OF THE BRANCH."
- Okay, Lord, I'll trust you, here I... here I go!" And he falls
-to his death.
- "DUMB YANKEE."
-%
-A New Yorker was driving through Berkeley when he saw a big crowd gathered
-by the side of the street. Curiosity got the better of him and he leaned
-out of his window to ask an onlooker what was going on. The fellow explained
-that a protestor against the U.S. position in South America had doused
-himself with gasoline and set himself on fire. "That's terrible," gasped
-the man. "But why is everyone still standing around?"
- "Well, they're taking up a collection for his wife and kids," the
-onlooker explained. "Would you be willing to help?"
- "Well, sure," replied the New Yorker. "I suppose I could spare a
-gallon or two."
-%
A newspaper is a circulating library with high blood pressure.
-- Arthure "Bugs" Baer
%
@@ -7684,12 +7331,6 @@ itself, and that is an excellent thing for the syndicates of financiers and
manufacturers for whom patriotic terrors are an abundant source of gain.
-- Anatole France
%
-A perfectly honest woman, a woman who never flatters, who never manages,
-who never cajoles, who never conceals, who never uses her eyes, who never
-speculates on the effect which she produces, who never is conscious of
-unspoken admiration, what a monster, I say, would such a female be!
- -- Thackeray
-%
A person forgives only when they are in the wrong.
%
A person is just about as big as the things that make him angry.
@@ -7794,8 +7435,6 @@ last pair of shoes, already worn out in dancing... so I can have something
of yours to press against my heart.
-- Johann Wolfgang von Goethe
%
-A pretty woman can do anything; an ugly woman must do everything.
-%
A priest advised Voltaire on his death bed to renounce the devil.
Replied Voltaire, "This is no time to make new enemies."
%
@@ -7881,23 +7520,6 @@ the ball is more than three inches from the hole, because no one wants
to make a travesty of the game.
-- Donald A. Metz
%
-A rabbi and a priest are sitting together on a train, and the rabbi leans
-over and asks, "So, how high can you advance in your organization?"
- The priest replies, "Well, if I am lucky, I guess I could become a
-Bishop."
- "Well, could you get any higher than that?"
- "I suppose that if my works are seen in a very good light that I
-might be made an Archbishop."
- "Is there any way that you might go higher than that?"
- "If all the Saints should smile, I guess I could be made a Cardinal."
- "Could you be anything higher than a Cardinal?"
- Hesitating a little bit, the priest said, "I suppose that I could
-be elected Pope, but only if it's God's will."
- "And could you be anything higher than that, is there any way to go
-up from being the Pope?"
- "What?! I should be the Messiah himself?!"
- The rabbi leaned back and smiled. "One of our boys made it."
-%
A raccoon tangled with a 23,000 volt line today. The results
blacked out 1400 homes and, of course, one raccoon.
-- Steel City News
@@ -7912,17 +7534,6 @@ A real diplomat is one who can cut his neighbor's throat without having
his neighbor notice it.
-- Trygve Lie
%
-A real estate agent, looking over a farmer's house for possible sale,
-commented to the farmer how sturdy the house looked.
- The farmer replied, "Yep, built it with my bare hands... did it
-the hard way. The steps to the front door, here, carved 'em out of
-field stones... did it the hard way. That hardwood floor in the living
-room, dovetailed the pieces myself... did it the hard way. The ceiling
-beams, made 'em out of my own oak trees... did it the hard way."
- Just then, the farmer's gorgeous daughter walked in. The farmer
-looks over at the real estate agent who is trying not to stare too
-obviously and smiles. "Yep... standing up in a canoe."
-%
A real friend isn't someone you use once and then throw away.
A real friend is someone you can use over and over again.
%
@@ -8180,8 +7791,6 @@ the student with a stick.
%
A student who changes the course of history is probably taking an exam.
%
-A stunning blonde, but probably all bean dip above the eyebrows.
-%
A successful [software] tool is one that was used to do something
undreamed of by its author.
-- S. C. Johnson
@@ -8318,12 +7927,6 @@ than some of the stuff that nature replaces it with.
A verbal contract isn't worth the paper it's written on.
-- Samuel Goldwyn
%
-A very intelligent turtle
-Found programming UNIX a hurdle
- The system, you see,
- Ran as slow as did he,
-And that's not saying much for the turtle.
-%
A violent man will die a violent death.
-- Lao Tsu
%
@@ -8351,9 +7954,6 @@ Software rots if not used.
These are great mysteries.
-- Geoffrey James, "The Tao of Programming"
%
-A widow is more sought after than an old maid of the same age.
- -- Addison
-%
A wise man can see more from a mountain top
than a fool can from the bottom of a well.
%
@@ -8382,27 +7982,14 @@ A woman can look both moral and exciting -- if she also looks as if it
were quite a struggle.
-- Edna Ferber
%
-A woman can never be too rich or too thin.
-%
A woman did what a woman had to, the best way she knew how.
To do more was impossible, to do less, unthinkable.
-- Dirisha, "The Man Who Never Missed"
%
-A woman employs sincerity only when every other form of deception has failed.
- -- Scott
-%
A woman, especially if she have the misfortune
of knowing anything, should conceal it as well as she can.
-- Jane Austen
%
-A woman forgives the audacity of which
-her beauty has prompted us to be guilty.
- -- LeSage
-%
-A woman has got to love a bad man once or twice in her life to be
-thankful for a good one.
- -- Marjorie Kinnan Rawlings
-%
A woman is like your shadow; follow her, she flies; fly from her,
she follows.
-- Chamfort
@@ -8580,7 +8167,7 @@ Abscond, v.:
%
Absence diminishes mediocre passions and increases
great ones, as the wind blows out candles and fans fires.
- -- La Rochefoucauld
+ -- Francois de La Rochefoucauld
%
Absence in love is like water upon fire;
a little quickens, but much extinguishes it.
@@ -8654,11 +8241,6 @@ Accept people for what they are -- completely unacceptable.
ACCEPTANCE TESTING:
An unsuccessful attempt to find bugs.
%
-Acceptance without proof is the fundamental characteristic of Western
-religion; rejection without proof is the fundamental characteristic of
-Western science.
- -- Gary Zukav, "The Dancing Wu Li Masters"
-%
Accident, n.:
A condition in which presence of mind is good,
but absence of body is better.
@@ -8993,8 +8575,6 @@ the unimpeded right to get rich, to use his ability, no matter what the
cost to others, to win advancement.
-- Norman Thomas
%
-After I run your program, let's make love like crazed weasels, OK?
-%
After living in New York, you trust nobody,
but you believe everything. Just in case.
%
@@ -9535,7 +9115,7 @@ All the men on my staff can type.
%
All the passions make us commit faults; love makes us commit the most
ridiculous ones.
- -- La Rochefoucauld
+ -- Francois de La Rochefoucauld
%
All the really good ideas I ever had came to me while I was milking a cow.
-- Grant Wood
@@ -10571,8 +10151,6 @@ Any girl can be glamorous; all you have to do is stand still and look
stupid.
-- Hedy Lamarr
%
-Any given program, when running, is obsolete.
-%
Any given program will expand to fill available memory.
%
Any great truth can -- and eventually will -- be expressed as a cliche --
@@ -11466,9 +11044,6 @@ Asking a working writer what he thinks about critics is like asking a
lamp-post how it feels about dogs.
-- Christopher Hampton
%
-Ass, n.:
- The masculine of "lass".
-%
Assembly language experience is [important] for the maturity
and understanding of how computers work that it provides.
-- D. Gries
@@ -12051,11 +11626,6 @@ the wise man saith, "Put all your eggs in the one basket and -- watch that
basket!"
-- Mark Twain
%
-Behold the unborn foetus and
- Weep salt tears crocodilian;
-All life is sacred (save, of course,
- An enemy civilian).
-%
Behold the warranty -- the bold print
giveth and the fine print taketh away.
%
@@ -12477,8 +12047,6 @@ Blessed are the forgetful: for they
get the better even of their blunders.
-- Friedrich Nietzsche
%
-Blessed are the meek for they shall inhibit the earth.
-%
Blessed are the young, for they shall inherit the national debt.
-- Herbert Hoover
%
@@ -13660,9 +13228,6 @@ Drinking beer and playing cards neighbors,
plays with elves!
-- Elmo and Patsy, "Grandma Got Run Over by a Reindeer"
%
-Christ:
- A man who was born at least 5,000 years ahead of his time.
-%
Christ died for our sins, so let's not disappoint Him.
%
Christianity might be a good thing if anyone ever tried it.
@@ -13748,8 +13313,6 @@ the walk before it stops snowing.
Cleanliness becomes more important when godliness is unlikely.
-- P. J. O'Rourke
%
-Cleanliness is next to impossible.
-%
CLEVELAND:
Where their last tornado did six
million dollars worth of improvements.
@@ -13890,9 +13453,6 @@ Coincidences are spiritual puns.
-- G. K. Chesterton
%
Cold, adj.:
- When the local flashers are handing out written descriptions.
-%
-Cold, adj.:
When the politicians walk around with their hands in their own
pockets.
%
@@ -14184,7 +13744,7 @@ Computers will not be perfected until they can compute how much more
than the estimate the job will cost.
%
Conceit causes more conversation than wit.
- -- La Rochefoucauld
+ -- Francois de La Rochefoucauld
%
Concept, n.:
Any "idea" for which an outside consultant billed you more than
@@ -14644,8 +14204,6 @@ DALLAS:
The city that chose Astroturf to
keep the cheerleaders from grazing.
%
-Dallas still lives. God MUST be dead.
-%
Dammit Jim, I'm an actor not a doctor.
%
Dammit, man, that's unprofessional! A good bartender laughs anyway!
@@ -14908,14 +14466,6 @@ of education may be of even greater importance to you now than learning
correct current table manners, vital as Miss Manners believes that is.
%
Dear Miss Manners:
- Please list some tactful ways of removing a man's saliva from
-your face.
-
-Gentle Reader:
- Please list some decent ways of acquiring a man's saliva on
-your face ...
-%
-Dear Miss Manners:
I carry a big black umbrella, even if there's just a thirty percent chance of
rain. May I ask a young lady who is a stranger to me to share its protection?
This morning, I was waiting for a bus in comparative comfort, my umbrella
@@ -15537,16 +15087,12 @@ Do clones have navels?
Do I like getting drunk? Depends on who's doing the drinking.
-- Amy Gorin
%
-Do infants have as much fun in infancy as adults do in adultery?
-%
Do Miami a favor. When you leave, take someone with you.
%
Do molecular biologists wear designer genes?
%
Do more than anyone expects, and pretty soon everyone will expect more.
%
-Do not believe in miracles -- rely on them.
-%
Do not clog intellect's sluices with bits of knowledge of questionable uses.
%
Do not count your chickens before they are hatched.
@@ -16031,10 +15577,6 @@ want to help you could agree with each other?
%
Don't you wish you had more energy... or less ambition?
%
-Dope will get you through times of no money better that money will get
-you through times of no dope.
- -- Gilbert Shelton
-%
Dorothy: How can you talk if you haven't got a brain?
Scarecrow: I don't know. But some people without brains do an
awful lot of talking, don't they?
@@ -19581,12 +19123,6 @@ GEMINI (May 21 - June 20)
the mail carefully, although there won't be anything good
in it today, either.
%
-GEMINI (May 21 - June 20)
- You are a quick and intelligent thinker. People like you
-because you are bisexual. However, you are inclined to expect too much
-for too little. This means you are cheap. Geminis are known for
-committing incest.
-%
GEMINI (May 21 to Jun. 20)
Good news and bad news highlighted. Enjoy the good news while you
can; the bad news will make you forget it. You will enjoy praise
@@ -20001,8 +19537,6 @@ can't find it anywhere. I'm sure he's telling the truth though; why
would he lie about a thing like that?
-- Arthur Naiman, "Every Goy's Guide to Yiddish"
%
-God gives us relatives; thank goodness we can chose our friends.
-%
God grant us the serenity to accept the things we cannot change, courage to
change the things we can, and wisdom to know the difference.
%
@@ -20033,8 +19567,6 @@ but by pains and contradictions.
%
God is a comic playing to an audience that's afraid to laugh.
%
-God is a polytheist.
-%
God is Dead.
-- Nietzsche
Nietzsche is Dead.
@@ -20071,8 +19603,6 @@ God made machine language; all the rest is the work of man.
God made the integers; all else is the work of Man.
-- Kronecker
%
-God made the world in six days, and was arrested on the seventh.
-%
God may be subtle, but He isn't plain mean.
-- Albert Einstein
%
@@ -20174,10 +19704,6 @@ Diary of a Young Girl LITE(tm)
%
Good advice is one of those insults that ought to be forgiven.
%
-Good advice is something a man gives
-when he is too old to set a bad example.
- -- La Rochefoucauld
-%
Good day for a change of scene. Repaper the bedroom wall.
%
Good day for business affairs.
@@ -20373,8 +19899,6 @@ GRAVITY:
%
Gravity brings me down.
%
-Gravity is a myth, the Earth sucks.
-%
Gray's Law of Programming:
'n+1' trivial tasks are expected to be
accomplished in the same time as 'n' tasks.
@@ -20457,13 +19981,6 @@ Groundhog Day has been observed only once in Los Angeles because when the
groundhog came out of its hole, it was killed by a mudslide.
-- Johnny Carson
%
-Grover Cleveland, though constantly at loggerheads with the Senate, got on
-better with the House of Representatives. A popular story circulating
-during his presidency concerned the night he was roused by his wife crying,
-"Wake up! I think there are burglars in the house."
- "No, no, my dear," said the president sleepily, "in the Senate
-maybe, but not in the House."
-%
Growing old isn't bad when you consider the alternatives.
-- Maurice Chevalier
%
@@ -21832,8 +21349,6 @@ Him: "Really? That's incredible...
Hindsight is always 20:20.
-- Billy Wilder
%
-Hindsight is an exact science.
-%
Hippogriff, n.:
An animal (now extinct) which was half horse and half griffin.
The griffin was itself a compound creature, half lion and half
@@ -22032,8 +21547,6 @@ Home is the place where, when you have to go there,
they have to take you in.
-- Robert Frost, "The Death of the Hired Man"
%
-Home is where the hurt is.
-%
Home life as we understand it is no more natural to us than a
cage is to a cockatoo.
-- George Bernard Shaw
@@ -25271,9 +24784,6 @@ is a camel's behind.
%
If a can of Alpo costs 38 cents, would it cost $2.50 in Dog Dollars?
%
-If a child annoys you, quiet him by brushing their hair. If this doesn't
-work, use the other side of the brush on the other end of the child.
-%
If A equals success, then the formula is _A = _X + _Y + _Z. _X is work. _Y
is play. _Z is keep your mouth shut.
-- Albert Einstein
@@ -25454,8 +24964,6 @@ We're offering a substantial reward. He's a sable collie, with three legs,
blind in his left eye, is missing part of his right ear and the tip of his
tail. He's been recently fixed. Answers to "Lucky".
%
-If anything can go wrong, it will.
-%
If at first you do succeed, try to hide your astonishment.
%
If at first you don't succeed, destroy all evidence that you tried.
@@ -25866,8 +25374,6 @@ of a student-poet to hang on to his every word I never saw.
%
If it weren't for the last minute, nothing would ever get done.
%
-If it's not in the computer, it doesn't exist.
-%
If it's Tuesday, this must be someone else's fortune.
%
If it's worth doing, do it for money.
@@ -26304,9 +25810,6 @@ itself to going to bed each night by the light of a Communist moon.
If two people love each other, there can be no happy end to it.
-- Ernest Hemingway
%
-If two wrongs don't make a right, try three.
- -- Dr. Laurence J. Peter
-%
If value corrupts then absolute value corrupts absolutely.
%
If voting could change the system, it would be illegal.
@@ -26438,9 +25941,6 @@ If you aren't rich you should always look useful.
If you can count your money, you don't have a billion dollars.
-- J. Paul Getty
%
-If you can keep your head when all about you are losing
-theirs, then you clearly don't understand the situation.
-%
If you can lead it to water and force it to drink, it isn't a horse.
%
If you can not say it, you can not whistle it, either.
@@ -26734,9 +26234,6 @@ If you marry a man who cheats on his wife, you'll
be married to a man who cheats on his wife.
-- Ann Landers
%
-If you meet somebody who tells you that he loves you more than anybody
-in the whole wide world, don't trust him. It means he experiments.
-%
If you mess with a thing long enough, it'll break.
-- Schmidt
%
@@ -28085,7 +27582,7 @@ live?"
%
In the misfortune of our friends we find something that is not
displeasing to us.
- -- La Rochefoucauld, "Maxims"
+ -- Francois de La Rochefoucauld, "Maxims"
%
In the next world, you're on your own.
%
@@ -28893,8 +28390,6 @@ It is easier to change the specification to fit the program than vice versa.
It is easier to fight for one's principles than to live up to them.
-- Alfred Adler
%
-It is easier to get forgiveness than permission.
-%
It is easier to make a saint out of a libertine than out of a prig.
-- George Santayana
%
@@ -29043,7 +28538,7 @@ The main thing is to use it well.
%
It is not enough to have great qualities,
we should also have the management of them.
- -- La Rochefoucauld
+ -- Francois de La Rochefoucauld
%
It is not every question that deserves an answer.
-- Publilius Syrus
@@ -29555,9 +29050,6 @@ It's always a long day; 86400 doesn't fit into a short.
%
It's always darkest just before it gets pitch black.
%
-It's always darkest just before the lights go out.
- -- Alex Clark
-%
It's amazing how many people you could be friends
with if only they'd make the first approach.
%
@@ -30053,10 +29545,6 @@ Jealousy is all the fun you think they have.
Jenkinson's Law:
It won't work.
%
-Jesus Saves,
-Moses Invests,
-But only Buddha pays Dividends.
-%
Jim, it's Grace at the bank. I checked your Christmas Club account.
You don't have five-hundred dollars. You have fifty. Sorry, computer foul-up!
%
@@ -30480,10 +29968,6 @@ KERNEL:
A part of an operating system that preserves the medieval
traditions of sorcery and black art.
%
-Kerr's Three Rules for a Successful College:
- Have plenty of football for the alumni, sex for the students,
-and parking for the faculty.
-%
Kettering's Observation:
Logic is an organized way of going wrong with confidence.
%
@@ -31284,13 +30768,6 @@ LIBRA (Sep. 23 to Oct. 22)
for filthy lucre and a decent meal. Be gracious and polite. Someone
is watching you, so stop staring like that.
%
-LIBRA (Sept 23 - Oct 22)
- You are the artistic type and have a difficult time with
- reality. If you are a man, you are more than likely gay.
- Chances for employment and monetary gains are excellent. Most
- Libra women are prostitutes. All Libra people die of venereal
- disease.
-%
LIBRA (Sept 23 - Oct 23)
Major achievements, new friends, and a previously unexplored way
to make a lot of money will come to a lot of people today, but
@@ -32234,9 +31711,6 @@ Machines have less problems. I'd like to be a machine.
Machines that have broken down will work perfectly when the
repairman arrives.
%
-Macho, adj.:
- Jogging home from your vasectomy.
-%
Macho does not prove mucho.
-- Zsa Zsa Gabor
%
@@ -32885,8 +32359,6 @@ play.
Mathematicians practice absolute freedom.
-- Henry Adams
%
-Mathematicians take it to the limit.
-%
Mathematics deals exclusively with the relations of concepts
to each other without consideration of their relation to experience.
-- Albert Einstein
@@ -32997,10 +32469,6 @@ McEwan's Rule of Relative Importance:
When traveling with a herd of elephants,
don't be the first to lie down and rest.
%
-McGowan's Madison Avenue Axiom:
- If an item is advertised as "under $50", you can bet it's not
-$19.95.
-%
Meader's Law:
Whatever happens to you, it will previously
have happened to everyone you know, only more so.
@@ -33895,12 +33363,6 @@ talk about after dinner.
%
Murphy was an optimist.
%
-Murphy's Discovery:
- Do you know Presidents talk to the country the way men talk to
-women? They say, "Trust me, go all the way with me, and everything
-will be all right." And what happens? Nine months later, you're in
-trouble!
-%
Murphy's Law is recursive. Washing your car to make it rain doesn't work.
%
Murphy's Law of Research:
@@ -34365,8 +33827,6 @@ creamed?
Nature abhors a virgin -- a frozen asset.
-- Clare Booth Luce
%
-Nature always sides with the hidden flaw.
-%
Nature and nature's laws lay hid in night,
God said, "Let Newton be," and all was light.
@@ -34559,9 +34019,6 @@ Never get into fights with ugly people because they have nothing to lose.
%
Never give an inch!
%
-Never go to a doctor whose office plants have died.
- -- Erma Bombeck
-%
Never go to bed mad. Stay up and fight.
-- Phyllis Diller, "Phyllis Diller's Housekeeping Hints"
%
@@ -34738,8 +34195,6 @@ New release:
time to get one is lengthening rapidly. Experts predict that at this
rate there will soon be an up to a one year wait.
%
-New systems generate new problems.
-%
New Year's Eve is the time of year when a man most feels his
age, and his wife most often reminds him to act it.
-- Webster's Unafraid Dictionary
@@ -34919,9 +34374,6 @@ No friendship is so cordial or so delicious as that of girl for girl;
no hatred so intense or immovable as that of woman for woman.
-- Landor
%
-No good deed goes unpunished.
- -- Clare Boothe Luce
-%
No group of professionals meets except to
conspire against the public at large.
-- Mark Twain
@@ -35217,10 +34669,6 @@ you're only here for a limited time.
No violence, gentlemen -- no violence, I beg of you! Consider the furniture!
-- Sherlock Holmes
%
-No woman can call herself free until she can choose consciously whether
-she will or will not be a mother.
- -- Margaret H. Sanger
-%
No woman can endure a gambling husband, unless he is a steady winner.
-- Lord Thomas Robert Dewar
%
@@ -36330,9 +35778,9 @@ Old MacDonald had an agricultural real estate tax abatement.
%
Old mail has arrived.
%
-Old men are fond of giving good advice to console
-themselves for their inability to set a bad example.
- -- La Rochefoucauld, "Maxims"
+Old men are fond of giving good advice to console themselves for being
+no longer in a position to give bad examples.
+ -- Francois de La Rochefoucauld, "Maxims"
%
Old Mother Hubbard went to the cupboard
To fetch her poor daughter a dress.
@@ -36591,25 +36039,6 @@ possession. And the moral of the story is:
The mourning after a terrible knight, nothing beats the dog of the bear that
hit you.
%
-Once upon a time, when I was training to be a mathematician, a group of
-us bright young students taking number theory discovered the names of
-the smaller prime numbers.
-
-2: The Odd Prime --
- It's the only even prime, therefore it's odd. QED.
-3: The True Prime --
- Lewis Carroll: "If I tell you three times, it's true."
-31: The Arbitrary Prime --
- Determined by unanimous unvote. We needed an arbitrary prime
- in case the prof asked for one, and so had an election. 91
- received the most votes (well, it *looks* prime) and 3+4i the
- next most. However, 31 was the only candidate to receive none
- at all.
-
-Since the composite numbers are formed from primes, their qualities are
-derived from those primes. So, for instance, the number 6 is "odd but
-true", while the powers of 2 are all extremely odd numbers.
-%
Once upon this midnight incoherent,
While you pondered sentient and crystalline,
Over many a broken and subordinate
@@ -37756,8 +37185,6 @@ People are like onions -- you cut them up, and they make you cry.
%
People are unconditionally guaranteed to be full of defects.
%
-People don't change; they only become more so.
-%
People don't usually make the same mistake twice -- they make it three
times, four time, five times...
%
@@ -38643,8 +38070,6 @@ Program, n.:
into error messages. tr.v. To engage in a pastime similar to banging
one's head against a wall, but with fewer opportunities for reward.
%
-Programmers do it bit by bit.
-%
Programmers used to batch environments may find it hard to live
without giant listings; we would find it hard to use them.
-- Dennis M. Ritchie
@@ -41607,9 +41032,6 @@ Sex is good, but not as good as fresh sweet corn.
Sex is like pizza -- when it's good, it's great; and when it's bad,
it's still darn tasty!
%
-Sex is not the answer. Sex is the question. "Yes" is the answer.
- -- Swami X
-%
Sex is one of the nine reasons for reincarnation... The other eight are
unimportant.
-- Henry Miller
@@ -44433,8 +43855,6 @@ hungry all the time?
%
The bigger the theory the better.
%
-The bigger they are, the harder they hit.
-%
The biggest difference between time and space is that you can't reuse time.
-- Merrick Furst
%
@@ -44585,9 +44005,6 @@ sometimes three.
The chicken that clucks the loudest is the one most likely to show up
at the steam fitters' picnic.
%
-The chief cause of problems is solutions.
- -- Eric Sevareid
-%
The chief danger in life is that you may take too many precautions.
-- Alfred Adler
%
@@ -45022,8 +44439,6 @@ The early bird who catches the worm works for someone who comes in late
and owns the worm farm.
-- Travis McGee
%
-The early worm gets the bird.
-%
The early worm gets the late bird.
%
The earth is like a tiny grain of sand, only much, much heavier.
@@ -47593,8 +47008,6 @@ blound by the sun and he dropped it.
The plot was designed in a light vein that somehow became varicose.
-- David Lardner
%
-The plural of spouse is spice.
-%
The Poems, all three hundred of them,
may be summed up in one of their phrases:
"Let our thoughts be correct".
@@ -48958,9 +48371,6 @@ The whole world is a scab. The point is to pick it constructively.
The whole world is a tuxedo and you are a pair of brown shoes.
-- George Gobel
%
-The whole world is about three drinks behind.
- -- Humphrey Bogart
-%
The wind doth taste so bitter sweet,
Like Jaspar wine and sugar,
It must have blown through someone's feet,
@@ -50400,8 +49810,8 @@ armadillos.
There's nothing like a girl with a plunging
neckline to keep a man on his toes.
%
-There's nothing like a good does of another woman to make a man appreciate
-his wife.
+There's nothing like a good dose of another woman to make a man
+appreciate his wife.
-- Clare Booth Luce
%
There's nothing like good food, good wine, and a bad girl.
@@ -50647,8 +50057,6 @@ Things Charles Darwin did not say:
Nah, it's only a theory - I don't think it should be taught in schools.
%
-Things equal to nothing else are equal to each other.
-%
Things fall apart; the centre cannot hold.
%
Things past redress and now with me past care.
@@ -52722,13 +52130,6 @@ Understanding is always the understanding of a smaller problem
in relation to a bigger problem.
-- P. D. Ouspensky
%
-Unfair animal names:
-
--- tsetse fly -- bullhead
--- booby -- duck-billed platypus
--- sapsucker -- Clarence
- -- Gary Larson
-%
UNFAIR COMPETITION:
Selling cheaper than we do.
%
@@ -53077,7 +52478,7 @@ He who practices it will have neighbors.
-- Confucius
%
Virtue would go far if vanity did not keep it company.
- -- La Rochefoucauld
+ -- Francois de La Rochefoucauld
%
Visit beautiful Vergas Minnesota.
%
@@ -53451,9 +52852,6 @@ We are unavoidably drawn towards conservatism and death.
The order is not insignificant.
-- Poul Henningsen (1894-1967)
%
-We are upping our standards ... so up yours.
- -- Pat Paulsen for President, 1988
-%
We are what we are.
%
We are what we pretend to be.
@@ -53551,7 +52949,7 @@ We gave you an atomic bomb, what do you want, mermaids?
-- I. I. Rabi to the Atomic Energy Commission
%
We give advice, but we cannot give the wisdom to profit by it.
- -- La Rochefoucauld
+ -- Francois de La Rochefoucauld
%
We gotta get out of this place,
If it's the last thing we ever do.
@@ -53776,7 +53174,7 @@ children smart.
%
We only acknowledge small faults in order
to make it appear that we are free from great ones.
- -- La Rochefoucauld
+ -- Francois de La Rochefoucauld
%
We ought to be very grateful that we have tools. Millions of years ago
people did not have them, and home projects were extremely difficult.
@@ -54862,8 +54260,6 @@ What the deuce is it to me? You say that we go around the sun. If we went
around the moon it would not make a pennyworth of difference to me or my work.
-- Sherlock Holmes, "A Study in Scarlet"
%
-What the hell, go ahead and put all your eggs in one basket.
-%
What the hell is it good for?
-- Robert Lloyd (engineer of the Advanced Computing Systems
Division of IBM), to colleagues who insisted that the
@@ -55715,9 +55111,6 @@ When the blind lead the blind they will both fall over the cliff.
When the bosses talk about improving productivity, they are never talking
about themselves.
%
-When the candles are out all women are fair.
- -- Plutarch
-%
When the cup is full, carry it level.
%
When the doubt vanishes and the issue becomes evident, stupidity reigns.
@@ -55729,9 +55122,6 @@ When the English language gets in my way, I walk over it.
When the fog came in on little cat feet last night, it left these little
muddy paw prints on the hood of my car.
%
-When the going gets tough, everyone leaves.
- -- Lynch
-%
When the going gets tough, the tough get empirical.
-- Jon Carroll
%
@@ -56342,10 +55732,6 @@ Whistler's mother is off her rocker.
%
White dwarf seeks red giant for binary relationship.
%
-White House carpenters have reworked the master bedroom, remodeling it
-so that Ronnie can sleep with his head in the hall. That way, by the
-time he wakes up, somebody will have already shined his hair.
-%
Whitehead's Law:
The obvious answer is always overlooked.
%
@@ -58152,9 +57538,6 @@ the continuing viability of FORTRAN.
You can move the world with an idea,
but you have to think of it first.
%
-You can never do just one thing.
- -- Hardin
-%
You can never trust a woman; she may be true to you.
%
You can no more win a war than you can win an earthquake.
diff --git a/games/fortune/datfiles/fortunes-o.real b/games/fortune/datfiles/fortunes-o.real
index 3733ef9..93fe0ef 100644
--- a/games/fortune/datfiles/fortunes-o.real
+++ b/games/fortune/datfiles/fortunes-o.real
@@ -4364,7 +4364,7 @@ woman, director Roman Polanski told reporters, "The way I look at it,
she's the equivalent of three fourteen-year-olds."
-- David Letterman
%
-ASS:
+Ass, n.:
The masculine of "lass".
%
Ass, grass or gas... nobody rides for free!
@@ -4823,7 +4823,7 @@ Oh, blimey...
[chorus]
%
-CHRIST:
+Christ, n.:
A man who was born at least 5,000 years ahead of his time.
%
Christ died for our sins. Dare we make his martyrdom meaningless by not
@@ -4946,7 +4946,7 @@ Is the ultimate way you can have 'er.
Means a man needn't wait,
And eliminates all the palaver.
%
-COLD:
+Cold, adj.:
When the local flashers are handing out written descriptions.
%
Cold, adj.:
@@ -8749,8 +8749,8 @@ Kasha, n.:
-- Arthur Naiman, "Every Goy's Guide to Yiddish"
%
Kerr's Three Rules for a Successful College:
- Have plenty of football for the alumni, sex
- for the students, and parking for the faculty.
+ Have plenty of football for the alumni, sex for the students,
+ and parking for the faculty.
%
Kill a commie for Christ!
%
@@ -8913,9 +8913,10 @@ replied. "Now, I might have had a cockatoo..."
%
LIBRA (Sept 23 - Oct 22)
You are the artistic type and have a difficult time with
-reality. If you are a man, you are more than likely gay. Chances for
-employment and monetary gains are excellent. Most Libra women are
-prostitutes. All Libra people die of Venereal disease.
+ reality. If you are a man, you are more than likely gay.
+ Chances for employment and monetary gains are excellent. Most
+ Libra women are prostitutes. All Libra people die of venereal
+ disease.
%
Lick-a-dee-clit!
%
@@ -10065,14 +10066,15 @@ smaller prime numbers.
3: The True Prime --
Lewis Carroll: "If I tell you 3 times, it's true."
31: The Arbitrary Prime --
- Determined by unanimous unvote. We needed an arbitrary prime in
- case the prof asked for one, and so had an election. 91 received
- the most votes (well, it *looks* prime) and 3+4i the next most.
- However, 31 was the only candidate to receive none at all.
+ Determined by unanimous unvote. We needed an arbitrary prime
+ in case the prof asked for one, and so had an election. 91
+ received the most votes (well, it *looks* prime) and 3+4i the
+ next most. However, 31 was the only candidate to receive none
+ at all.
41: The Female Prime --
The polynomial X**2 - X + 41 is
prime for integer values from 1 to 40.
-43: The Male Prime - they form a prime pair.
+43: The Male Prime -- they form a prime pair.
Since the composite numbers are formed from primes, their qualities
are derived from those primes. So, for instance, the number 6 is "odd
@@ -10822,7 +10824,7 @@ A: Run like hell, he's got a grenade in his mouth!!
Q: What do you do with an elephant with three balls?
A: Walk him and pitch to the rhino.
%
-Q: What do you get when cross a lawyer with a sorority girl??
+Q: What do you get when you cross a lawyer with a sorority girl??
A: A woman that, when she goes down on you, gets blood.
%
Q: What do you get when you cross a computer and a JAP?
@@ -11367,12 +11369,9 @@ girls, but feel they're entitled to a little fun first.
Democrats make up plans and then do something else.
Republicans follow the plans their grandfathers made.
-Republicans consume three-fourths of the rutabaga produced in the USA.
-The remainder is thrown out.
-
Republicans sleep in twin beds -- some even in separate rooms.
That is why there are more Democrats.
- -- The Official Rules, as compiled by Paul Dickson
+ -- Paul Dickson, "The Official Rules"
%
Republicans tend to keep their shades drawn, although there is seldom
any reason why they should. Democrats ought to, but don't.
@@ -11985,6 +11984,7 @@ Sex is low in calories, and *oooh* that aftertaste!
Sex is nobody's business but the three people involved.
%
Sex is not the answer. Sex is the question. "Yes" is the answer.
+ -- Swami X
%
Sex is one of the nine reasons for reincarnation ... the other eight
are unimportant.
@@ -12282,9 +12282,6 @@ Father, why do these words sound so nasty?
%
Sodomy is a pain in the ass.
%
-SOFTWARE:
- Formal evening attire for female computer analysts.
-%
Some companies idea of playing ball is, you play ball with us,
and we'll stick the fucking bat up your ass.
%
@@ -13337,13 +13334,6 @@ Called a girl a most elegant creature.
And, exposing her crack,
Said, "Fuck that, you old Sunday School Teacher!"
%
-The Reverend Henry Ward Beecher
-Called a hen a most elegant creature.
- The hen, pleased with that,
- Laid an egg in his hat --
-And thus did the hen reward Beecher.
- -- Oliver Wendell Holmes
-%
The REVERSE function works on the opposite SEXPR.
%
The rich man uses Vaseline,
diff --git a/games/fortune/datfiles/murphy b/games/fortune/datfiles/murphy
index d044409..949d944 100644
--- a/games/fortune/datfiles/murphy
+++ b/games/fortune/datfiles/murphy
@@ -121,6 +121,7 @@ A drug is that substance which, when injected into a
rat, will produce a scientific report.
%
A fail-safe circuit will destroy others.
+ -- Klipstein
%
A fool and his money are invited places.
%
@@ -155,9 +156,6 @@ her opposition.
A meeting is an event at which the minutes are kept
and the hours are lost.
%
-A memorandum is written not to inform the reader
-but to protect the writer.
-%
A pat on the back is only a few inches from a kick
in the pants.
%
@@ -315,9 +313,6 @@ never be followed by a crowd.
Anything good in life either causes cancer in
laboratory mice or is taxed beyond reality.
%
-Anything good in life is either illegal, immoral or
-fattening.
-%
Anything hit with a big enough hammer will fall apart.
%
Anything is possible, but nothing is easy.
@@ -353,8 +348,6 @@ if it succeeds.
Automotive engine repairing law:
If you drop something, it will never reach the ground.
%
-Avoid reality at all costs.
-%
Bad law is more likely to be supplemented than repealed.
%
Bad news drives good news out of the media.
@@ -566,8 +559,6 @@ embarrassment of estimating the corresponding costs.
%
Go where the money is.
%
-Half of being smart is knowing what you're dumb at.
-%
He who dies with the most toys wins.
%
He who hesitates is not only lost, but several miles from
@@ -768,6 +759,7 @@ occasionally be permitted to fly over pigeons.
If things were left to chance, they'd be better.
%
If two wrongs don't make a right, try three.
+ -- Dr. Laurence J. Peter
%
If we learn by our mistakes,
I'm getting one hell of an education!!
@@ -1030,6 +1022,7 @@ It works better if you plug it in.
It's always darkest before ... daylight saving time.
%
It's always darkest just before the lights go out.
+ -- Alex Clark
%
It's always easier to go down hill, but the view is
from the top.
@@ -1059,8 +1052,6 @@ cater to your favorite neurosis.
%
King Arthur ran the first knight club.
%
-Last guys don't finish nice.
-%
Laugh and the world laughs with you. cry and ...
you have to blow your nose.
%
@@ -1103,8 +1094,6 @@ Mass man must be serviced by mass means.
Misery no longer loves company
nowadays it insists on it.
%
-Most people deserve each other.
-%
Most people want to be delivered from temptation but
would like it to keep in touch.
%
@@ -1144,6 +1133,7 @@ Never get excited about a blind date because of how
it sounds over the phone.
%
Never go to a doctor whose office plants have died.
+ -- Erma Bombeck
%
Never insult an alligator
until after you have crossed the river.
@@ -1180,6 +1170,7 @@ No experiment is ever a complete failure.
It can always be used as a bad example.
%
No good deed goes unpunished.
+ -- Clare Boothe Luce
%
No major project is ever installed on time, within budgets,
with the same staff that started it. Yours will not be the
@@ -1505,9 +1496,6 @@ is in print.
%
Some of it plus the rest of it is all of it.
%
-Some people manage by the book, even though they
-don't know who wrote the book or even what book.
-%
Souffles rise and cream whips only for the family and
for guests you didn't really want to invite anyway.
%
@@ -1564,6 +1552,7 @@ proportional to the number of other people who are in
a position to do it instead.
%
The chief cause of problems is solutions.
+ -- Eric Sevareid
%
The client who pays the least complains the most
%
@@ -1650,8 +1639,6 @@ The higher the level of prestige accorded the people
behind the plan, the least less chance there is of
abandoning it.
%
-The idea is to die young as late as possible.
-%
The inside contact that you have developed at great
expense is the first person to be let go in any
reorganization.
@@ -1994,8 +1981,6 @@ not symbolically.
Usefulness is inversely proportional to its reputation
for being useful.
%
-Virtue is its own punishment.
-%
Vital papers will demonstrate their vitality by
spontaneously moving from where you left them to where
you can't find them.
@@ -2041,8 +2026,6 @@ When all else fails, read the instructions.
When an exaggerated emphasis is placed upon delegation,
responsibility, like sediment, sinks to the bottom.
%
-When eating an elephant take one bite at a time.
-%
When in doubt, don't mumble, overexpose ... then mumble.
%
When in doubt, mumble. When in trouble, delegate.
@@ -2081,6 +2064,7 @@ When somebody drops something, everybody will kick it
around instead of picking it up.
%
When the going gets tough, everyone leaves.
+ -- Lynch
%
When the government bureau's remedies do not match your
problem, you modify the problem, not the remedy.
@@ -2181,8 +2165,7 @@ You can lead a horse to water, but if you can get him to
float on his back, you've really got something.
%
You can never do just one thing.
-%
-You can observe a lot just by watching.
+ -- Hardin
%
You can pray hard enough to make water run uphill
how hard?
diff --git a/games/fortune/fortune/fortune.c b/games/fortune/fortune/fortune.c
index e93b0e7..de85d09 100644
--- a/games/fortune/fortune/fortune.c
+++ b/games/fortune/fortune/fortune.c
@@ -683,7 +683,7 @@ all_forts(FILEDESC *fp, char *offensive)
obscene->fd = fd;
obscene->inf = NULL;
obscene->path = offensive;
- if ((sp = rindex(offensive, '/')) == NULL)
+ if ((sp = strrchr(offensive, '/')) == NULL)
obscene->name = offensive;
else
obscene->name = ++sp;
@@ -785,7 +785,7 @@ is_fortfile(const char *file, char **datp, char **posp, int check_for_offend)
}
}
- if ((sp = rindex(file, '/')) == NULL)
+ if ((sp = strrchr(file, '/')) == NULL)
sp = file;
else
sp++;
@@ -797,7 +797,7 @@ is_fortfile(const char *file, char **datp, char **posp, int check_for_offend)
DPRINTF(2, (stderr, "FALSE (check fortunes only)\n"));
return (FALSE);
}
- if ((sp = rindex(sp, '.')) != NULL) {
+ if ((sp = strrchr(sp, '.')) != NULL) {
sp++;
for (i = 0; suflist[i] != NULL; i++)
if (strcmp(sp, suflist[i]) == 0) {
diff --git a/games/morse/morse.c b/games/morse/morse.c
index f6c95ee..03a09a6 100644
--- a/games/morse/morse.c
+++ b/games/morse/morse.c
@@ -143,26 +143,31 @@ static const struct morsetab mtab[] = {
{'\0', ""}
};
-
+/*
+ * Code-points for some Latin1 chars in ISO-8859-1 encoding.
+ * UTF-8 encoded chars in the comments.
+ */
static const struct morsetab iso8859_1tab[] = {
- {'á', ".--.-"},
- {'à', ".--.-"},
- {'â', ".--.-"},
- {'ä', ".-.-"},
- {'ç', "-.-.."},
- {'é', "..-.."},
- {'è', "..-.."},
- {'ê', "-..-."},
- {'ö', "---."},
- {'ü', "..--"},
+ {'\340', ".--.-"}, /* à */
+ {'\341', ".--.-"}, /* á */
+ {'\342', ".--.-"}, /* â */
+ {'\344', ".-.-"}, /* ä */
+ {'\347', "-.-.."}, /* ç */
+ {'\350', "..-.."}, /* è */
+ {'\351', "..-.."}, /* é */
+ {'\352', "-..-."}, /* ê */
+ {'\366', "---."}, /* ö */
+ {'\374', "..--"}, /* ü */
{'\0', ""}
};
+/*
+ * Code-points for some Greek chars in ISO-8859-7 encoding.
+ * UTF-8 encoded chars in the comments.
+ */
static const struct morsetab iso8859_7tab[] = {
/*
- * The Greek alphabet; you'll need an ISO8859-7 font in order
- * to see the actual characters.
* This table does not implement:
* - the special sequences for the seven diphthongs,
* - the punctuation differences.
@@ -180,83 +185,83 @@ static const struct morsetab iso8859_7tab[] = {
* ; ..-.-
* ! --..--
*/
- {'á', ".-"}, /* alpha */
- {'Ü', ".-"}, /* alpha with acute */
- {'â', "-..."}, /* beta */
- {'ã', "--."}, /* gamma */
- {'ä', "-.."}, /* delta */
- {'å', "."}, /* epsilon */
- {'Ý', "."}, /* epsilon with acute */
- {'æ', "--.."}, /* zeta */
- {'ç', "...."}, /* eta */
- {'Þ', "...."}, /* eta with acute */
- {'è', "-.-."}, /* theta */
- {'é', ".."}, /* iota */
- {'ß', ".."}, /* iota with acute */
- {'ú', ".."}, /* iota with diaeresis */
- {'À', ".."}, /* iota with acute and diaeresis */
- {'ê', "-.-"}, /* kappa */
- {'ë', ".-.."}, /* lambda */
- {'ì', "--"}, /* mu */
- {'í', "-."}, /* nu */
- {'î', "-..-"}, /* xi */
- {'ï', "---"}, /* omicron */
- {'ü', "---"}, /* omicron with acute */
- {'ð', ".--."}, /* pi */
- {'ñ', ".-."}, /* rho */
- {'ó', "..."}, /* sigma */
- {'ò', "..."}, /* final sigma */
- {'ô', "-"}, /* tau */
- {'õ', "-.--"}, /* upsilon */
- {'ý', "-.--"}, /* upsilon with acute */
- {'û', "-.--"}, /* upsilon and diaeresis */
- {'à', "-.--"}, /* upsilon with acute and diaeresis */
- {'ö', "..-."}, /* phi */
- {'÷', "----"}, /* chi */
- {'ø', "--.-"}, /* psi */
- {'ù', ".--"}, /* omega */
- {'þ', ".--"}, /* omega with acute */
+ {'\341', ".-"}, /* α, alpha */
+ {'\334', ".-"}, /* ά, alpha with acute */
+ {'\342', "-..."}, /* β, beta */
+ {'\343', "--."}, /* γ, gamma */
+ {'\344', "-.."}, /* δ, delta */
+ {'\345', "."}, /* ε, epsilon */
+ {'\335', "."}, /* έ, epsilon with acute */
+ {'\346', "--.."}, /* ζ, zeta */
+ {'\347', "...."}, /* η, eta */
+ {'\336', "...."}, /* ή, eta with acute */
+ {'\350', "-.-."}, /* θ, theta */
+ {'\351', ".."}, /* ι, iota */
+ {'\337', ".."}, /* ί, iota with acute */
+ {'\372', ".."}, /* ÏŠ, iota with diaeresis */
+ {'\300', ".."}, /* Î, iota with acute and diaeresis */
+ {'\352', "-.-"}, /* κ, kappa */
+ {'\353', ".-.."}, /* λ, lambda */
+ {'\354', "--"}, /* μ, mu */
+ {'\355', "-."}, /* ν, nu */
+ {'\356', "-..-"}, /* ξ, xi */
+ {'\357', "---"}, /* ο, omicron */
+ {'\374', "---"}, /* ό, omicron with acute */
+ {'\360', ".--."}, /* π, pi */
+ {'\361', ".-."}, /* Ï, rho */
+ {'\363', "..."}, /* σ, sigma */
+ {'\362', "..."}, /* Ï‚, final sigma */
+ {'\364', "-"}, /* Ï„, tau */
+ {'\365', "-.--"}, /* Ï…, upsilon */
+ {'\375', "-.--"}, /* Ï, upsilon with acute */
+ {'\373', "-.--"}, /* Ï‹, upsilon and diaeresis */
+ {'\340', "-.--"}, /* ΰ, upsilon with acute and diaeresis */
+ {'\366', "..-."}, /* φ, phi */
+ {'\367', "----"}, /* χ, chi */
+ {'\370', "--.-"}, /* ψ, psi */
+ {'\371', ".--"}, /* ω, omega */
+ {'\376', ".--"}, /* ÏŽ, omega with acute */
{'\0', ""}
};
+/*
+ * Code-points for the Cyrillic alphabet in KOI8-R encoding.
+ * UTF-8 encoded chars in the comments.
+ */
static const struct morsetab koi8rtab[] = {
- /*
- * The Cyrillic alphabet; you'll need a KOI8-R font in order
- * to see the actual characters
- */
- {'Á', ".-"}, /* a */
- {'Â', "-..."}, /* be */
- {'×', ".--"}, /* ve */
- {'Ç', "--."}, /* ge */
- {'Ä', "-.."}, /* de */
- {'Å', "."}, /* ye */
- {'£', "."}, /* yo, the same as ye */
- {'Ö', "...-"}, /* she */
- {'Ú', "--.."}, /* ze */
- {'É', ".."}, /* i */
- {'Ê', ".---"}, /* i kratkoye */
- {'Ë', "-.-"}, /* ka */
- {'Ì', ".-.."}, /* el */
- {'Í', "--"}, /* em */
- {'Î', "-."}, /* en */
- {'Ï', "---"}, /* o */
- {'Ð', ".--."}, /* pe */
- {'Ò', ".-."}, /* er */
- {'Ó', "..."}, /* es */
- {'Ô', "-"}, /* te */
- {'Õ', "..-"}, /* u */
- {'Æ', "..-."}, /* ef */
- {'È', "...."}, /* kha */
- {'Ã', "-.-."}, /* ce */
- {'Þ', "---."}, /* che */
- {'Û', "----"}, /* sha */
- {'Ý', "--.-"}, /* shcha */
- {'Ù', "-.--"}, /* yi */
- {'Ø', "-..-"}, /* myakhkij znak */
- {'Ü', "..-.."}, /* ae */
- {'À', "..--"}, /* yu */
- {'Ñ', ".-.-"}, /* ya */
+ {'\301', ".-"}, /* а, a */
+ {'\302', "-..."}, /* б, be */
+ {'\327', ".--"}, /* в, ve */
+ {'\307', "--."}, /* г, ge */
+ {'\304', "-.."}, /* д, de */
+ {'\305', "."}, /* е, ye */
+ {'\243', "."}, /* Ñ‘, yo, the same as ye */
+ {'\326', "...-"}, /* ж, she */
+ {'\332', "--.."}, /* з, ze */
+ {'\311', ".."}, /* и, i */
+ {'\312', ".---"}, /* й, i kratkoye */
+ {'\313', "-.-"}, /* к, ka */
+ {'\314', ".-.."}, /* л, el */
+ {'\315', "--"}, /* м, em */
+ {'\316', "-."}, /* н, en */
+ {'\317', "---"}, /* о, o */
+ {'\320', ".--."}, /* п, pe */
+ {'\322', ".-."}, /* р, er */
+ {'\323', "..."}, /* Ñ, es */
+ {'\324', "-"}, /* Ñ‚, te */
+ {'\325', "..-"}, /* у, u */
+ {'\306', "..-."}, /* Ñ„, ef */
+ {'\310', "...."}, /* Ñ…, kha */
+ {'\303', "-.-."}, /* ц, ce */
+ {'\336', "---."}, /* ч, che */
+ {'\333', "----"}, /* ш, sha */
+ {'\335', "--.-"}, /* щ, shcha */
+ {'\331', "-.--"}, /* Ñ‹, yi */
+ {'\330', "-..-"}, /* ь, myakhkij znak */
+ {'\334', "..-.."}, /* Ñ, ae */
+ {'\300', "..--"}, /* ÑŽ, yu */
+ {'\321', ".-.-"}, /* Ñ, ya */
{'\0', ""}
};
diff --git a/gnu/usr.bin/binutils/libbinutils/Makefile b/gnu/usr.bin/binutils/libbinutils/Makefile
index d89f8b0..d6518a5 100644
--- a/gnu/usr.bin/binutils/libbinutils/Makefile
+++ b/gnu/usr.bin/binutils/libbinutils/Makefile
@@ -25,6 +25,7 @@ SRCS+= arlex.l \
CFLAGS+= -DTARGET=\"${TARGET_TUPLE}\"
CFLAGS+= -DBFD_VERSION_STRING=\"${VERSION}\"
CFLAGS+= -D_GNU_SOURCE
+CFLAGS+= -DYY_NO_INPUT
CFLAGS+= -I${SRCDIR}/binutils
CFLAGS+= -I${SRCDIR}/bfd
INTERNALLIB=
diff --git a/gnu/usr.bin/cvs/lib/config.h.proto b/gnu/usr.bin/cvs/lib/config.h.proto
index b88faa7..30a4f00 100644
--- a/gnu/usr.bin/cvs/lib/config.h.proto
+++ b/gnu/usr.bin/cvs/lib/config.h.proto
@@ -324,7 +324,7 @@
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/timeb.h> header file. */
-#define HAVE_SYS_TIMEB_H 1
+/* #undef HAVE_SYS_TIMEB_H */
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
diff --git a/gnu/usr.bin/gdb/kgdb/main.c b/gnu/usr.bin/gdb/kgdb/main.c
index 418449b..9293f36 100644
--- a/gnu/usr.bin/gdb/kgdb/main.c
+++ b/gnu/usr.bin/gdb/kgdb/main.c
@@ -83,7 +83,7 @@ usage(void)
{
fprintf(stderr,
- "usage: %s [-afqv] [-d crashdir] [-c core | -n dumpnr | -r device]\n"
+ "usage: %s [-afqvw] [-d crashdir] [-c core | -n dumpnr | -r device]\n"
"\t[kernel [core]]\n", getprogname());
exit(1);
}
diff --git a/gnu/usr.bin/gdb/kgdb/trgt_amd64.c b/gnu/usr.bin/gdb/kgdb/trgt_amd64.c
index dab41f9..cdab775 100644
--- a/gnu/usr.bin/gdb/kgdb/trgt_amd64.c
+++ b/gnu/usr.bin/gdb/kgdb/trgt_amd64.c
@@ -66,7 +66,7 @@ kgdb_trgt_fetch_registers(int regno __unused)
supply_register(AMD64_R8_REGNUM + 6, (char *)&pcb.pcb_r14);
supply_register(AMD64_R15_REGNUM, (char *)&pcb.pcb_r15);
supply_register(AMD64_RIP_REGNUM, (char *)&pcb.pcb_rip);
- amd64_supply_fxsave(current_regcache, -1, &pcb.pcb_user_save);
+ amd64_supply_fxsave(current_regcache, -1, (struct fpusave *)(&pcb + 1));
}
void
diff --git a/include/Makefile b/include/Makefile
index c6fb526..5fc3923 100644
--- a/include/Makefile
+++ b/include/Makefile
@@ -19,8 +19,8 @@ INCS= a.out.h ar.h assert.h bitstring.h complex.h cpio.h _ctype.h ctype.h \
printf.h proc_service.h pthread.h \
pthread_np.h pwd.h ranlib.h readpassphrase.h regex.h \
res_update.h resolv.h runetype.h search.h semaphore.h setjmp.h \
- signal.h spawn.h stab.h \
- stdbool.h stddef.h stdio.h stdlib.h string.h stringlist.h \
+ signal.h spawn.h stab.h stdalign.h stdatomic.h stdbool.h stddef.h \
+ stdnoreturn.h stdio.h stdlib.h string.h stringlist.h \
strings.h sysexits.h tar.h termios.h tgmath.h \
time.h timeconv.h timers.h ttyent.h \
ulimit.h unistd.h utime.h utmpx.h uuid.h varargs.h vis.h \
diff --git a/include/arpa/nameser_compat.h b/include/arpa/nameser_compat.h
index 161fed3..91ff176 100644
--- a/include/arpa/nameser_compat.h
+++ b/include/arpa/nameser_compat.h
@@ -63,7 +63,7 @@ typedef struct {
/* fields in third byte */
unsigned qr: 1; /*%< response flag */
unsigned opcode: 4; /*%< purpose of message */
- unsigned aa: 1; /*%< authoritive answer */
+ unsigned aa: 1; /*%< authoritative answer */
unsigned tc: 1; /*%< truncated message */
unsigned rd: 1; /*%< recursion desired */
/* fields in fourth byte */
@@ -77,7 +77,7 @@ typedef struct {
/* fields in third byte */
unsigned rd :1; /*%< recursion desired */
unsigned tc :1; /*%< truncated message */
- unsigned aa :1; /*%< authoritive answer */
+ unsigned aa :1; /*%< authoritative answer */
unsigned opcode :4; /*%< purpose of message */
unsigned qr :1; /*%< response flag */
/* fields in fourth byte */
diff --git a/include/assert.h b/include/assert.h
index 5621f8c..c880a78 100644
--- a/include/assert.h
+++ b/include/assert.h
@@ -57,7 +57,22 @@
#ifndef _ASSERT_H_
#define _ASSERT_H_
+
+/*
+ * Static assertions. In principle we could define static_assert for
+ * C++ older than C++11, but this breaks if _Static_assert is
+ * implemented as a macro.
+ *
+ * C++ template parameters may contain commas, even if not enclosed in
+ * parentheses, causing the _Static_assert macro to be invoked with more
+ * than two parameters.
+ */
+#if __ISO_C_VISIBLE >= 2011 && !defined(__cplusplus)
+#define static_assert _Static_assert
+#endif
+
__BEGIN_DECLS
void __assert(const char *, const char *, int, const char *) __dead2;
__END_DECLS
+
#endif /* !_ASSERT_H_ */
diff --git a/include/complex.h b/include/complex.h
index 4142304..0702541 100644
--- a/include/complex.h
+++ b/include/complex.h
@@ -29,18 +29,23 @@
#ifndef _COMPLEX_H
#define _COMPLEX_H
+#include <sys/cdefs.h>
+
#ifdef __GNUC__
#if __STDC_VERSION__ < 199901
#define _Complex __complex__
#endif
-#define _Complex_I 1.0fi
+#define _Complex_I ((float _Complex)1.0i)
+#endif
+
+#ifdef __generic
+_Static_assert(__generic(_Complex_I, float _Complex, 1, 0),
+ "_Complex_I must be of type float _Complex");
#endif
#define complex _Complex
#define I _Complex_I
-#include <sys/cdefs.h>
-
__BEGIN_DECLS
double cabs(double complex);
diff --git a/include/dlfcn.h b/include/dlfcn.h
index 794fde1..c508843 100644
--- a/include/dlfcn.h
+++ b/include/dlfcn.h
@@ -118,6 +118,7 @@ void *dlopen(const char *, int);
void *dlsym(void * __restrict, const char * __restrict);
#if __BSD_VISIBLE
+void *fdlopen(int, int);
int dladdr(const void * __restrict, Dl_info * __restrict);
dlfunc_t dlfunc(void * __restrict, const char * __restrict);
int dlinfo(void * __restrict, int, void * __restrict);
diff --git a/include/glob.h b/include/glob.h
index 351b6c4..073805b 100644
--- a/include/glob.h
+++ b/include/glob.h
@@ -98,7 +98,8 @@ typedef struct {
#endif /* __BSD_VISIBLE */
__BEGIN_DECLS
-int glob(const char *, int, int (*)(const char *, int), glob_t *);
+int glob(const char * __restrict, int,
+ int (*)(const char *, int), glob_t * __restrict);
void globfree(glob_t *);
__END_DECLS
diff --git a/include/gssapi/gssapi.h b/include/gssapi/gssapi.h
index 16a588e..d5294de 100644
--- a/include/gssapi/gssapi.h
+++ b/include/gssapi/gssapi.h
@@ -756,11 +756,11 @@ OM_uint32 gss_release_oid
OM_uint32 gss_decapsulate_token
(const gss_buffer_t, /* mechanism independent token */
gss_OID, /* desired mechanism */
- gss_buffer_t /* decapsulated mechanism dependant token */
+ gss_buffer_t /* decapsulated mechanism dependent token */
);
OM_uint32 gss_encapsulate_token
- (const gss_buffer_t, /* mechanism dependant token */
+ (const gss_buffer_t, /* mechanism dependent token */
gss_OID, /* desired mechanism */
gss_buffer_t /* encapsulated mechanism independent token */
);
diff --git a/include/netdb.h b/include/netdb.h
index 2c2e4b3..9ed6e61 100644
--- a/include/netdb.h
+++ b/include/netdb.h
@@ -276,7 +276,7 @@ int getservbyport_r(int, const char *, struct servent *, char *,
int getservent_r(struct servent *, char *, size_t,
struct servent **);
void herror(const char *);
-__const char *hstrerror(int);
+const char *hstrerror(int);
int innetgr(const char *, const char *, const char *, const char *);
void setnetgrent(const char *);
#endif
diff --git a/include/regex.h b/include/regex.h
index fb9b99c..e8b185c 100644
--- a/include/regex.h
+++ b/include/regex.h
@@ -51,7 +51,7 @@ typedef __size_t size_t;
typedef struct {
int re_magic;
size_t re_nsub; /* number of parenthesized subexpressions */
- __const char *re_endp; /* end pointer for REG_PEND */
+ const char *re_endp; /* end pointer for REG_PEND */
struct re_guts *re_g; /* none of your business :-) */
} regex_t;
diff --git a/include/resolv.h b/include/resolv.h
index f59f445..458835b 100644
--- a/include/resolv.h
+++ b/include/resolv.h
@@ -184,7 +184,7 @@ struct __res_state {
u_int16_t nscount;
u_int16_t nstimes[MAXNS]; /*%< ms. */
int nssocks[MAXNS];
- struct __res_state_ext *ext; /*%< extention for IPv6 */
+ struct __res_state_ext *ext; /*%< extension for IPv6 */
} _ext;
} _u;
};
diff --git a/include/rpc/svc.h b/include/rpc/svc.h
index 8466ef8..d73625e 100644
--- a/include/rpc/svc.h
+++ b/include/rpc/svc.h
@@ -314,7 +314,7 @@ __END_DECLS
* Somebody has to wait for incoming requests and then call the correct
* service routine. The routine svc_run does infinite waiting; i.e.,
* svc_run never returns.
- * Since another (co-existant) package may wish to selectively wait for
+ * Since another (co-existent) package may wish to selectively wait for
* incoming calls or other events outside of the rpc architecture, the
* routine svc_getreq is provided. It must be passed readfds, the
* "in-place" results of a select system call (see select, section 2).
diff --git a/include/rpcsvc/mount.x b/include/rpcsvc/mount.x
index 9596661..b3b21f7 100644
--- a/include/rpcsvc/mount.x
+++ b/include/rpcsvc/mount.x
@@ -150,7 +150,7 @@ program MOUNTPROG {
version MOUNTVERS {
/*
* Does no work. It is made available in all RPC services
- * to allow server reponse testing and timing
+ * to allow server response testing and timing
*/
void
MOUNTPROC_NULL(void) = 0;
@@ -205,7 +205,7 @@ program MOUNTPROG {
version MOUNTVERS3 {
/*
* Does no work. It is made available in all RPC services
- * to allow server reponse testing and timing
+ * to allow server response testing and timing
*/
void
MOUNTPROC_NULL(void) = 0;
diff --git a/include/rpcsvc/nfs_prot.x b/include/rpcsvc/nfs_prot.x
index 8a09ac3..70b24fe 100644
--- a/include/rpcsvc/nfs_prot.x
+++ b/include/rpcsvc/nfs_prot.x
@@ -121,7 +121,7 @@ struct fattr {
unsigned uid; /* owner user id */
unsigned gid; /* owner group id */
unsigned size; /* file size in bytes */
- unsigned blocksize; /* prefered block size */
+ unsigned blocksize; /* preferred block size */
unsigned rdev; /* special device # */
unsigned blocks; /* Kb of disk used by file */
unsigned fsid; /* device # */
@@ -402,7 +402,7 @@ struct fattr3 {
uid3 uid; /* owner user id */
gid3 gid; /* owner group id */
size3 size; /* file size in bytes */
- size3 used; /* prefered block size */
+ size3 used; /* preferred block size */
specdata3 rdev; /* special device # */
uint64 fsid; /* device # */
fileid3 fileid; /* inode # */
diff --git a/include/rpcsvc/nis.x b/include/rpcsvc/nis.x
index 7ebb19d..758fcb7 100644
--- a/include/rpcsvc/nis.x
+++ b/include/rpcsvc/nis.x
@@ -192,8 +192,8 @@ struct ping_args {
* note that modifications will appear as two entries, for names, they have
* an "OLD" entry followed by a "NEW" entry. For entries in tables, there
* is a remove followed by an add. It is done this way so that we can read
- * the log backwards to back out transactions and forwards to propogate
- * updated.
+ * the log backwards to back out transactions and forwards to propagate
+ * updates.
*/
enum log_entry_t {
LOG_NOP = 0,
diff --git a/include/signal.h b/include/signal.h
index 32b9e6b..e7447df 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -42,9 +42,9 @@
* XXX should enlarge these, if only to give empty names instead of bounds
* errors for large signal numbers.
*/
-extern __const char *__const sys_signame[NSIG];
-extern __const char *__const sys_siglist[NSIG];
-extern __const int sys_nsig;
+extern const char * const sys_signame[NSIG];
+extern const char * const sys_siglist[NSIG];
+extern const int sys_nsig;
#endif
#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
diff --git a/include/stdalign.h b/include/stdalign.h
new file mode 100644
index 0000000..2fb13aa
--- /dev/null
+++ b/include/stdalign.h
@@ -0,0 +1,47 @@
+/*-
+ * Copyright (c) 2012 Ed Schouten <ed@FreeBSD.org>
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef __alignas_is_defined
+#define __alignas_is_defined 1
+
+#if !defined(__cplusplus) || __cplusplus < 201103L
+#include <sys/cdefs.h>
+#define alignas _Alignas
+#endif
+
+#endif /* !__alignas_is_defined */
+
+#ifndef __alignof_is_defined
+#define __alignof_is_defined 1
+
+#if !defined(__cplusplus) || __cplusplus < 201103L
+#include <sys/cdefs.h>
+#define alignof _Alignof
+#endif
+
+#endif /* !__alignof_is_defined */
diff --git a/include/stdatomic.h b/include/stdatomic.h
new file mode 100644
index 0000000..18769bb
--- /dev/null
+++ b/include/stdatomic.h
@@ -0,0 +1,329 @@
+/*-
+ * Copyright (c) 2011 Ed Schouten <ed@FreeBSD.org>
+ * David Chisnall <theraven@FreeBSD.org>
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _STDATOMIC_H_
+#define _STDATOMIC_H_
+
+#include <sys/cdefs.h>
+#include <sys/_types.h>
+
+#if __has_feature(cxx_atomic)
+#define __CLANG_ATOMICS
+#elif __GNUC_PREREQ__(4, 7)
+#define __GNUC_ATOMICS
+#elif !defined(__GNUC__)
+#error "stdatomic.h does not support your compiler"
+#endif
+
+#if !defined(__CLANG_ATOMICS)
+#define _Atomic(T) struct { volatile T __val; }
+#endif
+
+/*
+ * 7.17.2 Initialization.
+ */
+
+#if defined(__CLANG_ATOMICS)
+#define ATOMIC_VAR_INIT(value) (value)
+#define atomic_init(obj, value) __atomic_init(obj, value)
+#else
+#define ATOMIC_VAR_INIT(value) { .__val = (value) }
+#define atomic_init(obj, value) do { \
+ (obj)->__val = (value); \
+} while (0)
+#endif
+
+/*
+ * Clang and recent GCC both provide predefined macros for the memory
+ * orderings. If we are using a compiler that doesn't define them, use the
+ * clang values - these will be ignored in the fallback path.
+ */
+
+#ifndef __ATOMIC_RELAXED
+#define __ATOMIC_RELAXED 0
+#endif
+#ifndef __ATOMIC_CONSUME
+#define __ATOMIC_CONSUME 1
+#endif
+#ifndef __ATOMIC_ACQUIRE
+#define __ATOMIC_ACQUIRE 2
+#endif
+#ifndef __ATOMIC_RELEASE
+#define __ATOMIC_RELEASE 3
+#endif
+#ifndef __ATOMIC_ACQ_REL
+#define __ATOMIC_ACQ_REL 4
+#endif
+#ifndef __ATOMIC_SEQ_CST
+#define __ATOMIC_SEQ_CST 5
+#endif
+
+/*
+ * 7.17.3 Order and consistency.
+ *
+ * The memory_order_* constants that denote the barrier behaviour of the
+ * atomic operations.
+ */
+
+enum memory_order {
+ memory_order_relaxed = __ATOMIC_RELAXED,
+ memory_order_consume = __ATOMIC_CONSUME,
+ memory_order_acquire = __ATOMIC_ACQUIRE,
+ memory_order_release = __ATOMIC_RELEASE,
+ memory_order_acq_rel = __ATOMIC_ACQ_REL,
+ memory_order_seq_cst = __ATOMIC_SEQ_CST
+};
+
+/*
+ * 7.17.4 Fences.
+ */
+
+#if defined(__CLANG_ATOMICS) || defined(__GNUC_ATOMICS)
+#define atomic_thread_fence(order) __atomic_thread_fence(order)
+#define atomic_signal_fence(order) __atomic_signal_fence(order)
+#else
+#define atomic_thread_fence(order) __sync_synchronize()
+#define atomic_signal_fence(order) __asm volatile ("" : : : "memory")
+#endif
+
+/*
+ * 7.17.5 Lock-free property.
+ */
+
+#if defined(__CLANG_ATOMICS)
+#define atomic_is_lock_free(obj) \
+ __atomic_is_lock_free(sizeof(obj))
+#elif defined(__GNUC_ATOMICS)
+#define atomic_is_lock_free(obj) \
+ __atomic_is_lock_free(sizeof((obj)->__val))
+#else
+#define atomic_is_lock_free(obj) \
+ (sizeof((obj)->__val) <= sizeof(void *))
+#endif
+
+/*
+ * 7.17.6 Atomic integer types.
+ */
+
+typedef _Atomic(_Bool) atomic_bool;
+typedef _Atomic(char) atomic_char;
+typedef _Atomic(signed char) atomic_schar;
+typedef _Atomic(unsigned char) atomic_uchar;
+typedef _Atomic(short) atomic_short;
+typedef _Atomic(unsigned short) atomic_ushort;
+typedef _Atomic(int) atomic_int;
+typedef _Atomic(unsigned int) atomic_uint;
+typedef _Atomic(long) atomic_long;
+typedef _Atomic(unsigned long) atomic_ulong;
+typedef _Atomic(long long) atomic_llong;
+typedef _Atomic(unsigned long long) atomic_ullong;
+#if 0
+typedef _Atomic(__char16_t) atomic_char16_t;
+typedef _Atomic(__char32_t) atomic_char32_t;
+#endif
+typedef _Atomic(__wchar_t) atomic_wchar_t;
+typedef _Atomic(__int_least8_t) atomic_int_least8_t;
+typedef _Atomic(__uint_least8_t) atomic_uint_least8_t;
+typedef _Atomic(__int_least16_t) atomic_int_least16_t;
+typedef _Atomic(__uint_least16_t) atomic_uint_least16_t;
+typedef _Atomic(__int_least32_t) atomic_int_least32_t;
+typedef _Atomic(__uint_least32_t) atomic_uint_least32_t;
+typedef _Atomic(__int_least64_t) atomic_int_least64_t;
+typedef _Atomic(__uint_least64_t) atomic_uint_least64_t;
+typedef _Atomic(__int_fast8_t) atomic_int_fast8_t;
+typedef _Atomic(__uint_fast8_t) atomic_uint_fast8_t;
+typedef _Atomic(__int_fast16_t) atomic_int_fast16_t;
+typedef _Atomic(__uint_fast16_t) atomic_uint_fast16_t;
+typedef _Atomic(__int_fast32_t) atomic_int_fast32_t;
+typedef _Atomic(__uint_fast32_t) atomic_uint_fast32_t;
+typedef _Atomic(__int_fast64_t) atomic_int_fast64_t;
+typedef _Atomic(__uint_fast64_t) atomic_uint_fast64_t;
+typedef _Atomic(__intptr_t) atomic_intptr_t;
+typedef _Atomic(__uintptr_t) atomic_uintptr_t;
+typedef _Atomic(__size_t) atomic_size_t;
+typedef _Atomic(__ptrdiff_t) atomic_ptrdiff_t;
+typedef _Atomic(__intmax_t) atomic_intmax_t;
+typedef _Atomic(__uintmax_t) atomic_uintmax_t;
+
+/*
+ * 7.17.7 Operations on atomic types.
+ */
+
+/*
+ * Compiler-specific operations.
+ */
+
+#if defined(__CLANG_ATOMICS)
+#define atomic_compare_exchange_strong_explicit(object, expected, \
+ desired, success, failure) \
+ __atomic_compare_exchange_strong(object, expected, desired, \
+ success, failure)
+#define atomic_compare_exchange_weak_explicit(object, expected, \
+ desired, success, failure) \
+ __atomic_compare_exchange_weak(object, expected, desired, \
+ success, failure)
+#define atomic_exchange_explicit(object, desired, order) \
+ __atomic_exchange(object, desired, order)
+#define atomic_fetch_add_explicit(object, operand, order) \
+ __atomic_fetch_add(object, operand, order)
+#define atomic_fetch_and_explicit(object, operand, order) \
+ __atomic_fetch_and(object, operand, order)
+#define atomic_fetch_or_explicit(object, operand, order) \
+ __atomic_fetch_or(object, operand, order)
+#define atomic_fetch_sub_explicit(object, operand, order) \
+ __atomic_fetch_sub(object, operand, order)
+#define atomic_fetch_xor_explicit(object, operand, order) \
+ __atomic_fetch_xor(object, operand, order)
+#define atomic_load_explicit(object, order) \
+ __atomic_load(object, order)
+#define atomic_store_explicit(object, desired, order) \
+ __atomic_store(object, desired, order)
+#elif defined(__GNUC_ATOMICS)
+#define atomic_compare_exchange_strong_explicit(object, expected, \
+ desired, success, failure) \
+ __atomic_compare_exchange_n(&(object)->__val, expected, \
+ desired, 0, success, failure)
+#define atomic_compare_exchange_weak_explicit(object, expected, \
+ desired, success, failure) \
+ __atomic_compare_exchange_n(&(object)->__val, expected, \
+ desired, 1, success, failure)
+#define atomic_exchange_explicit(object, desired, order) \
+ __atomic_exchange_n(&(object)->__val, desired, order)
+#define atomic_fetch_add_explicit(object, operand, order) \
+ __atomic_fetch_add(&(object)->__val, operand, order)
+#define atomic_fetch_and_explicit(object, operand, order) \
+ __atomic_fetch_and(&(object)->__val, operand, order)
+#define atomic_fetch_or_explicit(object, operand, order) \
+ __atomic_fetch_or(&(object)->__val, operand, order)
+#define atomic_fetch_sub_explicit(object, operand, order) \
+ __atomic_fetch_sub(&(object)->__val, operand, order)
+#define atomic_fetch_xor_explicit(object, operand, order) \
+ __atomic_fetch_xor(&(object)->__val, operand, order)
+#define atomic_load_explicit(object, order) \
+ __atomic_load_n(&(object)->__val, order)
+#define atomic_store_explicit(object, desired, order) \
+ __atomic_store_n(&(object)->__val, desired, order)
+#else
+#define atomic_compare_exchange_strong_explicit(object, expected, \
+ desired, success, failure) ({ \
+ __typeof__((object)->__val) __v; \
+ _Bool __r; \
+ __v = __sync_val_compare_and_swap(&(object)->__val, \
+ *(expected), desired); \
+ __r = *(expected) == __v; \
+ *(expected) = __v; \
+ __r; \
+})
+
+#define atomic_compare_exchange_weak_explicit(object, expected, \
+ desired, success, failure) \
+ atomic_compare_exchange_strong_explicit(object, expected, \
+ desired, success, failure)
+#if __has_builtin(__sync_swap)
+/* Clang provides a full-barrier atomic exchange - use it if available. */
+#define atomic_exchange_explicit(object, desired, order) \
+ __sync_swap(&(object)->__val, desired)
+#else
+/*
+ * __sync_lock_test_and_set() is only an acquire barrier in theory (although in
+ * practice it is usually a full barrier) so we need an explicit barrier after
+ * it.
+ */
+#define atomic_exchange_explicit(object, desired, order) ({ \
+ __typeof__((object)->__val) __v; \
+ __v = __sync_lock_test_and_set(&(object)->__val, desired); \
+ __sync_synchronize(); \
+ __v; \
+})
+#endif
+#define atomic_fetch_add_explicit(object, operand, order) \
+ __sync_fetch_and_add(&(object)->__val, operand)
+#define atomic_fetch_and_explicit(object, operand, order) \
+ __sync_fetch_and_and(&(object)->__val, operand)
+#define atomic_fetch_or_explicit(object, operand, order) \
+ __sync_fetch_and_or(&(object)->__val, operand)
+#define atomic_fetch_sub_explicit(object, operand, order) \
+ __sync_fetch_and_sub(&(object)->__val, operand)
+#define atomic_fetch_xor_explicit(object, operand, order) \
+ __sync_fetch_and_xor(&(object)->__val, operand)
+#define atomic_load_explicit(object, order) \
+ __sync_fetch_and_add(&(object)->__val, 0)
+#define atomic_store_explicit(object, desired, order) do { \
+ __sync_synchronize(); \
+ (object)->__val = (desired); \
+ __sync_synchronize(); \
+} while (0)
+#endif
+
+/*
+ * Convenience functions.
+ */
+
+#define atomic_compare_exchange_strong(object, expected, desired) \
+ atomic_compare_exchange_strong_explicit(object, expected, \
+ desired, memory_order_seq_cst, memory_order_seq_cst)
+#define atomic_compare_exchange_weak(object, expected, desired) \
+ atomic_compare_exchange_weak_explicit(object, expected, \
+ desired, memory_order_seq_cst, memory_order_seq_cst)
+#define atomic_exchange(object, desired) \
+ atomic_exchange_explicit(object, desired, memory_order_seq_cst)
+#define atomic_fetch_add(object, operand) \
+ atomic_fetch_add_explicit(object, operand, memory_order_seq_cst)
+#define atomic_fetch_and(object, operand) \
+ atomic_fetch_and_explicit(object, operand, memory_order_seq_cst)
+#define atomic_fetch_or(object, operand) \
+ atomic_fetch_or_explicit(object, operand, memory_order_seq_cst)
+#define atomic_fetch_sub(object, operand) \
+ atomic_fetch_sub_explicit(object, operand, memory_order_seq_cst)
+#define atomic_fetch_xor(object, operand) \
+ atomic_fetch_xor_explicit(object, operand, memory_order_seq_cst)
+#define atomic_load(object) \
+ atomic_load_explicit(object, memory_order_seq_cst)
+#define atomic_store(object, desired) \
+ atomic_store_explicit(object, desired, memory_order_seq_cst)
+
+/*
+ * 7.17.8 Atomic flag type and operations.
+ */
+
+typedef atomic_bool atomic_flag;
+
+#define ATOMIC_FLAG_INIT ATOMIC_VAR_INIT(0)
+
+#define atomic_flag_clear_explicit(object, order) \
+ atomic_store_explicit(object, 0, order)
+#define atomic_flag_test_and_set_explicit(object, order) \
+ atomic_compare_exchange_strong_explicit(object, 0, 1, order, order)
+
+#define atomic_flag_clear(object) \
+ atomic_flag_clear_explicit(object, memory_order_seq_cst)
+#define atomic_flag_test_and_set(object) \
+ atomic_flag_test_and_set_explicit(object, memory_order_seq_cst)
+
+#endif /* !_STDATOMIC_H_ */
diff --git a/include/stdbool.h b/include/stdbool.h
index c0d6459..48070c1 100644
--- a/include/stdbool.h
+++ b/include/stdbool.h
@@ -26,9 +26,7 @@
* $FreeBSD$
*/
-#ifndef _STDBOOL_H_
-#define _STDBOOL_H_
-
+#ifndef __bool_true_false_are_defined
#define __bool_true_false_are_defined 1
#ifndef __cplusplus
@@ -42,5 +40,4 @@ typedef int _Bool;
#endif
#endif /* !__cplusplus */
-
-#endif /* !_STDBOOL_H_ */
+#endif /* __bool_true_false_are_defined */
diff --git a/include/stdio.h b/include/stdio.h
index bbeb0de..02032d9 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -205,7 +205,7 @@ __END_DECLS
/* System V/ANSI C; this is the wrong way to do this, do *not* use these. */
#if __XSI_VISIBLE
-#define P_tmpdir "/var/tmp/"
+#define P_tmpdir "/tmp/"
#endif
#define L_tmpnam 1024 /* XXX must be == PATH_MAX */
#define TMP_MAX 308915776
@@ -404,8 +404,8 @@ int vasprintf(char **, const char *, __va_list)
* positive errno values. Use strerror() or strerror_r() from <string.h>
* instead.
*/
-extern __const int sys_nerr;
-extern __const char *__const sys_errlist[];
+extern const int sys_nerr;
+extern const char * const sys_errlist[];
/*
* Stdio function-access interface.
@@ -470,6 +470,9 @@ static __inline int __sputc(int _c, FILE *_p) {
__swbuf((int)(c), p) : \
(*(p)->_p = (c), (int)*(p)->_p++))
#endif
+
+extern int __isthreaded;
+
#ifndef __cplusplus
#define __sfeof(p) (((p)->_flags & __SEOF) != 0)
@@ -477,7 +480,6 @@ static __inline int __sputc(int _c, FILE *_p) {
#define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF)))
#define __sfileno(p) ((p)->_file)
-extern int __isthreaded;
#define feof(p) (!__isthreaded ? __sfeof(p) : (feof)(p))
#define ferror(p) (!__isthreaded ? __sferror(p) : (ferror)(p))
diff --git a/include/stdlib.h b/include/stdlib.h
index c19eef0..2c62f09 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -149,13 +149,14 @@ _Noreturn void _Exit(int);
#endif /* __ISO_C_VISIBLE >= 1999 */
/*
- * If we're in a mode greater than C99, expose C1x functions.
+ * If we're in a mode greater than C99, expose C11 functions.
*/
-#if __ISO_C_VISIBLE > 1999
-_Noreturn void quick_exit(int)
-int
-at_quick_exit(void (*func)(void));
-#endif /* __ISO_C_VISIBLE > 1999 */
+#if __ISO_C_VISIBLE >= 2011
+void * aligned_alloc(size_t, size_t);
+int at_quick_exit(void (*)(void));
+_Noreturn void
+ quick_exit(int);
+#endif /* __ISO_C_VISIBLE >= 2011 */
/*
* Extensions made by POSIX relative to C. We don't know yet which edition
* of POSIX made these extensions, so assume they've always been there until
@@ -271,7 +272,7 @@ char *devname_r(__dev_t, __mode_t, char *, int);
char *fdevname(int);
char *fdevname_r(int, char *, int);
int getloadavg(double [], int);
-__const char *
+const char *
getprogname(void);
int heapsort(void *, size_t, size_t, int (*)(const void *, const void *));
diff --git a/include/stdnoreturn.h b/include/stdnoreturn.h
new file mode 100644
index 0000000..218a3a0
--- /dev/null
+++ b/include/stdnoreturn.h
@@ -0,0 +1,38 @@
+/*-
+ * Copyright (c) 2012 Ed Schouten <ed@FreeBSD.org>
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ */
+
+#ifdef __cplusplus
+#error "<stdnoreturn.h> cannot be used in combination with C++11."
+#endif
+
+#ifndef noreturn
+
+#include <sys/cdefs.h>
+#define noreturn _Noreturn
+
+#endif /* !noreturn */
diff --git a/include/tgmath.h b/include/tgmath.h
index 7ff8dd4..9302302 100644
--- a/include/tgmath.h
+++ b/include/tgmath.h
@@ -2,6 +2,9 @@
* Copyright (c) 2004 Stefan Farfeleder.
* All rights reserved.
*
+ * Copyright (c) 2012 Ed Schouten <ed@FreeBSD.org>
+ * All rights reserved.
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -33,64 +36,104 @@
#include <math.h>
/*
- * This implementation of <tgmath.h> requires two implementation-dependent
- * macros to be defined:
- * __tg_impl_simple(x, y, z, fn, fnf, fnl, ...)
+ * This implementation of <tgmath.h> uses the two following macros,
+ * which are based on the macros described in C11 proposal N1404:
+ * __tg_impl_simple(x, y, z, fnl, fn, fnf, ...)
* Invokes fnl() if the corresponding real type of x, y or z is long
* double, fn() if it is double or any has an integer type, and fnf()
* otherwise.
- * __tg_impl_full(x, y, z, fn, fnf, fnl, cfn, cfnf, cfnl, ...)
- * Invokes [c]fnl() if the corresponding real type of x, y or z is long
+ * __tg_impl_full(x, y, cfnl, cfn, cfnf, fnl, fn, fnf, ...)
+ * Invokes [c]fnl() if the corresponding real type of x or y is long
* double, [c]fn() if it is double or any has an integer type, and
* [c]fnf() otherwise. The function with the 'c' prefix is called if
- * any of x, y or z is a complex number.
+ * any of x or y is a complex number.
* Both macros call the chosen function with all additional arguments passed
* to them, as given by __VA_ARGS__.
*
* Note that these macros cannot be implemented with C's ?: operator,
* because the return type of the whole expression would incorrectly be long
* double complex regardless of the argument types.
+ *
+ * The structure of the C11 implementation of these macros can in
+ * principle be reused for non-C11 compilers, but due to an integer
+ * promotion bug for complex types in GCC 4.2, simply let non-C11
+ * compilers use an inefficient yet reliable version.
*/
-#if __GNUC_PREREQ__(3, 1)
-#define __tg_type(e, t) __builtin_types_compatible_p(__typeof__(e), t)
-#define __tg_type3(e1, e2, e3, t) \
- (__tg_type(e1, t) || __tg_type(e2, t) || __tg_type(e3, t))
-#define __tg_type_corr(e1, e2, e3, t) \
- (__tg_type3(e1, e2, e3, t) || __tg_type3(e1, e2, e3, t _Complex))
-#define __tg_integer(e1, e2, e3) \
- (((__typeof__(e1))1.5 == 1) || ((__typeof__(e2))1.5 == 1) || \
- ((__typeof__(e3))1.5 == 1))
-#define __tg_is_complex(e1, e2, e3) \
- (__tg_type3(e1, e2, e3, float _Complex) || \
- __tg_type3(e1, e2, e3, double _Complex) || \
- __tg_type3(e1, e2, e3, long double _Complex) || \
- __tg_type3(e1, e2, e3, __typeof__(_Complex_I)))
-
-#define __tg_impl_simple(x, y, z, fn, fnf, fnl, ...) \
- __builtin_choose_expr(__tg_type_corr(x, y, z, long double), \
- fnl(__VA_ARGS__), __builtin_choose_expr( \
- __tg_type_corr(x, y, z, double) || __tg_integer(x, y, z),\
- fn(__VA_ARGS__), fnf(__VA_ARGS__)))
-
-#define __tg_impl_full(x, y, z, fn, fnf, fnl, cfn, cfnf, cfnl, ...) \
- __builtin_choose_expr(__tg_is_complex(x, y, z), \
- __tg_impl_simple(x, y, z, cfn, cfnf, cfnl, __VA_ARGS__), \
- __tg_impl_simple(x, y, z, fn, fnf, fnl, __VA_ARGS__))
-
-#else /* __GNUC__ */
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
+#define __tg_generic(x, cfnl, cfn, cfnf, fnl, fn, fnf) \
+ _Generic(x, \
+ long double _Complex: cfnl, \
+ double _Complex: cfn, \
+ float _Complex: cfnf, \
+ long double: fnl, \
+ default: fn, \
+ float: fnf \
+ )
+#define __tg_type(x) \
+ __tg_generic(x, (long double _Complex)0, (double _Complex)0, \
+ (float _Complex)0, (long double)0, (double)0, (float)0)
+#define __tg_impl_simple(x, y, z, fnl, fn, fnf, ...) \
+ __tg_generic( \
+ __tg_type(x) + __tg_type(y) + __tg_type(z), \
+ fnl, fn, fnf, fnl, fn, fnf)(__VA_ARGS__)
+#define __tg_impl_full(x, y, cfnl, cfn, cfnf, fnl, fn, fnf, ...) \
+ __tg_generic( \
+ __tg_type(x) + __tg_type(y), \
+ cfnl, cfn, cfnf, fnl, fn, fnf)(__VA_ARGS__)
+#elif defined(__generic)
+#define __tg_generic_simple(x, fnl, fn, fnf) \
+ __generic(x, long double _Complex, fnl, \
+ __generic(x, double _Complex, fn, \
+ __generic(x, float _Complex, fnf, \
+ __generic(x, long double, fnl, \
+ __generic(x, float, fnf, fn)))))
+#define __tg_impl_simple(x, y, z, fnl, fn, fnf, ...) \
+ __tg_generic_simple(x, \
+ __tg_generic_simple(y, \
+ __tg_generic_simple(z, fnl, fnl, fnl), \
+ __tg_generic_simple(z, fnl, fnl, fnl), \
+ __tg_generic_simple(z, fnl, fnl, fnl)), \
+ __tg_generic_simple(y, \
+ __tg_generic_simple(z, fnl, fnl, fnl), \
+ __tg_generic_simple(z, fnl, fn , fn ), \
+ __tg_generic_simple(z, fnl, fn , fn )), \
+ __tg_generic_simple(y, \
+ __tg_generic_simple(z, fnl, fnl, fnl), \
+ __tg_generic_simple(z, fnl, fn , fn ), \
+ __tg_generic_simple(z, fnl, fn , fnf)))(__VA_ARGS__)
+#define __tg_generic_full(x, cfnl, cfn, cfnf, fnl, fn, fnf) \
+ __generic(x, long double _Complex, cfnl, \
+ __generic(x, double _Complex, cfn, \
+ __generic(x, float _Complex, cfnf, \
+ __generic(x, long double, fnl, \
+ __generic(x, float, fnf, fn)))))
+#define __tg_impl_full(x, y, cfnl, cfn, cfnf, fnl, fn, fnf, ...) \
+ __tg_generic_full(x, \
+ __tg_generic_full(y, cfnl, cfnl, cfnl, cfnl, cfnl, cfnl), \
+ __tg_generic_full(y, cfnl, cfn , cfn , cfnl, cfn , cfn ), \
+ __tg_generic_full(y, cfnl, cfn , cfnf, cfnl, cfn , cfnf), \
+ __tg_generic_full(y, cfnl, cfnl, cfnl, fnl , fnl , fnl ), \
+ __tg_generic_full(y, cfnl, cfn , cfn , fnl , fn , fn ), \
+ __tg_generic_full(y, cfnl, cfn , cfnf, fnl , fn , fnf )) \
+ (__VA_ARGS__)
+#else
#error "<tgmath.h> not implemented for this compiler"
-#endif /* !__GNUC__ */
+#endif
/* Macros to save lots of repetition below */
#define __tg_simple(x, fn) \
- __tg_impl_simple(x, x, x, fn, fn##f, fn##l, x)
+ __tg_impl_simple(x, x, x, fn##l, fn, fn##f, x)
#define __tg_simple2(x, y, fn) \
- __tg_impl_simple(x, x, y, fn, fn##f, fn##l, x, y)
+ __tg_impl_simple(x, x, y, fn##l, fn, fn##f, x, y)
+#define __tg_simple3(x, y, z, fn) \
+ __tg_impl_simple(x, y, z, fn##l, fn, fn##f, x, y, z)
#define __tg_simplev(x, fn, ...) \
- __tg_impl_simple(x, x, x, fn, fn##f, fn##l, __VA_ARGS__)
+ __tg_impl_simple(x, x, x, fn##l, fn, fn##f, __VA_ARGS__)
#define __tg_full(x, fn) \
- __tg_impl_full(x, x, x, fn, fn##f, fn##l, c##fn, c##fn##f, c##fn##l, x)
+ __tg_impl_full(x, x, c##fn##l, c##fn, c##fn##f, fn##l, fn, fn##f, x)
+#define __tg_full2(x, y, fn) \
+ __tg_impl_full(x, y, c##fn##l, c##fn, c##fn##f, fn##l, fn, fn##f, x, y)
/* 7.22#4 -- These macros expand to real or complex functions, depending on
* the type of their arguments. */
@@ -108,13 +151,12 @@
#define tanh(x) __tg_full(x, tanh)
#define exp(x) __tg_full(x, exp)
#define log(x) __tg_full(x, log)
-#define pow(x, y) __tg_impl_full(x, x, y, pow, powf, powl, \
- cpow, cpowf, cpowl, x, y)
+#define pow(x, y) __tg_full2(x, y, pow)
#define sqrt(x) __tg_full(x, sqrt)
/* "The corresponding type-generic macro for fabs and cabs is fabs." */
-#define fabs(x) __tg_impl_full(x, x, x, fabs, fabsf, fabsl, \
- cabs, cabsf, cabsl, x)
+#define fabs(x) __tg_impl_full(x, x, cabsl, cabs, cabsf, \
+ fabsl, fabs, fabsf, x)
/* 7.22#5 -- These macros are only defined for arguments with real type. */
#define atan2(x, y) __tg_simple2(x, y, atan2)
@@ -127,7 +169,7 @@
#define expm1(x) __tg_simple(x, expm1)
#define fdim(x, y) __tg_simple2(x, y, fdim)
#define floor(x) __tg_simple(x, floor)
-#define fma(x, y, z) __tg_impl_simple(x, y, z, fma, fmaf, fmal, x, y, z)
+#define fma(x, y, z) __tg_simple3(x, y, z, fma)
#define fmax(x, y) __tg_simple2(x, y, fmax)
#define fmin(x, y) __tg_simple2(x, y, fmin)
#define fmod(x, y) __tg_simple2(x, y, fmod)
@@ -148,8 +190,8 @@
#define nextafter(x, y) __tg_simple2(x, y, nextafter)
#define nexttoward(x, y) __tg_simplev(x, nexttoward, x, y)
#define remainder(x, y) __tg_simple2(x, y, remainder)
-#define remquo(x, y, z) __tg_impl_simple(x, x, y, remquo, remquof, \
- remquol, x, y, z)
+#define remquo(x, y, z) __tg_impl_simple(x, x, y, remquol, remquo, \
+ remquof, x, y, z)
#define rint(x) __tg_simple(x, rint)
#define round(x) __tg_simple(x, round)
#define scalbn(x, y) __tg_simplev(x, scalbn, x, y)
diff --git a/include/unistd.h b/include/unistd.h
index f073f8d..90694ed 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -511,6 +511,7 @@ int initgroups(const char *, gid_t);
int iruserok(unsigned long, int, const char *, const char *);
int iruserok_sa(const void *, int, int, const char *, const char *);
int issetugid(void);
+void __FreeBSD_libc_enter_restricted_mode(void);
long lpathconf(const char *, int);
#ifndef _MKDTEMP_DECLARED
char *mkdtemp(char *);
diff --git a/include/xlocale.h b/include/xlocale.h
index 30fe87e..1f27894 100644
--- a/include/xlocale.h
+++ b/include/xlocale.h
@@ -157,9 +157,9 @@ int vfscanf_l(FILE * __restrict, locale_t, const char * __restrict, __va_list)
__scanflike(3, 0);
int vscanf_l(locale_t, const char * __restrict, __va_list) __scanflike(2, 0);
int vsnprintf_l(char * __restrict, size_t, locale_t, const char * __restrict,
- va_list) __printflike(4, 0);
+ __va_list) __printflike(4, 0);
int vsscanf_l(const char * __restrict, locale_t, const char * __restrict,
- va_list) __scanflike(3, 0);
+ __va_list) __scanflike(3, 0);
int dprintf_l(int, locale_t, const char * __restrict, ...) __printflike(3, 4);
int vdprintf_l(int, locale_t, const char * __restrict, __va_list)
__printflike(3, 0);
diff --git a/lib/Makefile b/lib/Makefile
index ad647ec..ba2f905 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -8,7 +8,7 @@
#
# csu must be built before all shared libaries for ELF.
# libc must be built before all other shared libraries.
-# libbsm must be built before ibauditd.
+# libbsm must be built before libauditd.
# libcom_err must be built before libpam.
# libcrypt must be built before libpam.
# libkvm must be built before libdevstat.
@@ -101,6 +101,7 @@ SUBDIR= ${SUBDIR_ORDERED} \
${_libsmdb} \
${_libsmutil} \
libstand \
+ libstdthreads \
${_libtelnet} \
${_libthr} \
libthread_db \
diff --git a/lib/clang/clang.build.mk b/lib/clang/clang.build.mk
index 47b6795..2c059f5 100644
--- a/lib/clang/clang.build.mk
+++ b/lib/clang/clang.build.mk
@@ -8,10 +8,8 @@ CFLAGS+=-I${LLVM_SRCS}/include -I${CLANG_SRCS}/include \
-DLLVM_ON_UNIX -DLLVM_ON_FREEBSD \
-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS #-DNDEBUG
-# Correct for gcc miscompilation when compiling on PPC with -O2
-.if ${MACHINE_CPUARCH} == "powerpc"
-CFLAGS+= -O1
-.endif
+# LLVM is not strict aliasing safe as of 12/31/2011
+CFLAGS+= -fno-strict-aliasing
TARGET_ARCH?= ${MACHINE_ARCH}
CFLAGS+=-DLLVM_HOSTTRIPLE=\"${TARGET_ARCH:C/amd64/x86_64/}-unknown-freebsd10.0\"
diff --git a/lib/clang/include/MipsGenCodeEmitter.inc b/lib/clang/include/MipsGenCodeEmitter.inc
new file mode 100644
index 0000000..1e2223d
--- /dev/null
+++ b/lib/clang/include/MipsGenCodeEmitter.inc
@@ -0,0 +1,2 @@
+/* $FreeBSD$ */
+#include "MipsGenCodeEmitter.inc.h"
diff --git a/lib/clang/include/clang/Basic/Version.inc b/lib/clang/include/clang/Basic/Version.inc
index 1ab3e3e..9842584 100644
--- a/lib/clang/include/clang/Basic/Version.inc
+++ b/lib/clang/include/clang/Basic/Version.inc
@@ -5,6 +5,6 @@
#define CLANG_VERSION_MINOR 0
#define CLANG_VENDOR "FreeBSD "
-#define CLANG_VENDOR_SUFFIX " 20111021"
+#define CLANG_VENDOR_SUFFIX " 20111210"
-#define SVN_REVISION "142614"
+#define SVN_REVISION "145349"
diff --git a/lib/clang/libllvmarminfo/Makefile b/lib/clang/libllvmarminfo/Makefile
index 43b9f83..ec88367 100644
--- a/lib/clang/libllvmarminfo/Makefile
+++ b/lib/clang/libllvmarminfo/Makefile
@@ -2,7 +2,7 @@
LIB= llvmarminfo
-SRCDIR= lib/Target/ARM/TargetInfo/
+SRCDIR= lib/Target/ARM/TargetInfo
INCDIR= lib/Target/ARM
SRCS= ARMTargetInfo.cpp
diff --git a/lib/clang/libllvmmipscodegen/Makefile b/lib/clang/libllvmmipscodegen/Makefile
index a70c072..f0b0180 100644
--- a/lib/clang/libllvmmipscodegen/Makefile
+++ b/lib/clang/libllvmmipscodegen/Makefile
@@ -24,6 +24,7 @@ SRCS= MipsAsmPrinter.cpp \
TGHDRS= Intrinsics \
MipsGenAsmWriter \
MipsGenCallingConv \
+ MipsGenCodeEmitter \
MipsGenDAGISel \
MipsGenInstrInfo \
MipsGenRegisterInfo \
diff --git a/lib/clang/libllvmmipsinfo/Makefile b/lib/clang/libllvmmipsinfo/Makefile
index abf6d8e..c5b96cd 100644
--- a/lib/clang/libllvmmipsinfo/Makefile
+++ b/lib/clang/libllvmmipsinfo/Makefile
@@ -2,7 +2,7 @@
LIB= llvmmipsinfo
-SRCDIR= lib/Target/Mips/TargetInfo/
+SRCDIR= lib/Target/Mips/TargetInfo
INCDIR= lib/Target/Mips
SRCS= MipsTargetInfo.cpp
diff --git a/lib/clang/libllvmpowerpcinfo/Makefile b/lib/clang/libllvmpowerpcinfo/Makefile
index 8cdaa5a5..8310378 100644
--- a/lib/clang/libllvmpowerpcinfo/Makefile
+++ b/lib/clang/libllvmpowerpcinfo/Makefile
@@ -2,7 +2,7 @@
LIB= llvmpowerpcinfo
-SRCDIR= lib/Target/PowerPC/TargetInfo/
+SRCDIR= lib/Target/PowerPC/TargetInfo
INCDIR= lib/Target/PowerPC
SRCS= PowerPCTargetInfo.cpp
diff --git a/lib/clang/libllvmx86info/Makefile b/lib/clang/libllvmx86info/Makefile
index 62b506e..85155a8 100644
--- a/lib/clang/libllvmx86info/Makefile
+++ b/lib/clang/libllvmx86info/Makefile
@@ -2,7 +2,7 @@
LIB= llvmx86info
-SRCDIR= lib/Target/X86/TargetInfo/
+SRCDIR= lib/Target/X86/TargetInfo
INCDIR= lib/Target/X86
SRCS= X86TargetInfo.cpp
diff --git a/lib/libarchive/COPYING b/lib/libarchive/COPYING
deleted file mode 100644
index 5fea0f6..0000000
--- a/lib/libarchive/COPYING
+++ /dev/null
@@ -1,36 +0,0 @@
-All of the C source code, header files, and documentation in this
-package are covered by the following:
-
-Copyright (c) 2003-2007 Tim Kientzle
-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.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-===========================================================================
-
-Shell scripts, makefiles, and certain other files may be covered by
-other licenses. In particular, some distributions of this library
-contain Makefiles and/or shell scripts that are generated
-automatically by GNU autoconf and GNU automake. Those generated files
-are controlled by the relevant licenses.
-
-$FreeBSD$
-
diff --git a/lib/libarchive/Makefile b/lib/libarchive/Makefile
index 8d889c8..92ca954 100644
--- a/lib/libarchive/Makefile
+++ b/lib/libarchive/Makefile
@@ -1,6 +1,8 @@
# $FreeBSD$
.include <bsd.own.mk>
+LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive
+
LIB= archive
DPADD= ${LIBZ}
LDADD= -lz
@@ -20,7 +22,7 @@ LDADD+= -lbsdxml
# It has no real relation to the libarchive version number.
SHLIB_MAJOR= 5
-CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\"
+CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/config_freebsd.h\"
CFLAGS+= -I${.OBJDIR}
.if ${MK_OPENSSL} != "no"
@@ -32,6 +34,8 @@ DPADD+= ${LIBMD}
LDADD+= -lmd
.endif
+.PATH: ${LIBARCHIVEDIR}/libarchive
+
# Headers to be installed in /usr/include
INCS= archive.h archive_entry.h
@@ -273,8 +277,11 @@ MLINKS+= archive_write_disk.3 archive_write_disk_set_standard_lookup.3
MLINKS+= archive_write_disk.3 archive_write_disk_set_user_lookup.3
MLINKS+= libarchive.3 archive.3
-.PHONY: check test
+.PHONY: check test clean-test
check test:
- cd ${.CURDIR}/test && make test
+ cd ${.CURDIR}/test && make obj && make test
+
+clean-test:
+ cd ${.CURDIR}/test && make clean
.include <bsd.lib.mk>
diff --git a/lib/libarchive/README b/lib/libarchive/README
deleted file mode 100644
index 0c4758a..0000000
--- a/lib/libarchive/README
+++ /dev/null
@@ -1,102 +0,0 @@
-$FreeBSD$
-
-libarchive: a library for reading and writing streaming archives
-
-This is all under a BSD license. Use, enjoy, but don't blame me if it breaks!
-
-Documentation:
- * libarchive.3 gives an overview of the library as a whole
- * archive_read.3, archive_write.3, and archive_write_disk.3 provide
- detailed calling sequences for the read and write APIs
- * archive_entry.3 details the "struct archive_entry" utility class
- * libarchive-formats.5 documents the file formats supported by the library
- * tar.5 provides some detailed information about a variety of different
- "tar" formats.
-
-You should also read the copious comments in "archive.h" and the source
-code for the sample "bsdtar" and "minitar" programs for more details.
-Please let me know about any errors or omissions you find.
-
-Currently, the library automatically detects and reads the following:
- * gzip compression
- * bzip2 compression
- * compress/LZW compression
- * lzma and xz compression
- * GNU tar format (including GNU long filenames, long link names, and
- sparse files)
- * Solaris 9 extended tar format (including ACLs)
- * Old V7 tar archives
- * POSIX ustar
- * POSIX pax interchange format
- * POSIX octet-oriented cpio
- * SVR4 ASCII cpio
- * Binary cpio (big-endian or little-endian)
- * ISO9660 CD-ROM images (with optional Rockridge or Joliet extensions)
- * ZIP archives (with uncompressed or "deflate" compressed entries)
- * GNU and BSD 'ar' archives
- * 'mtree' format
-
-The library can write:
- * gzip compression
- * bzip2 compression
- * compress/LZW compression
- * lzma and xz compression
- * POSIX ustar
- * POSIX pax interchange format
- * "restricted" pax format, which will create ustar archives except for
- entries that require pax extensions (for long filenames, ACLs, etc).
- * POSIX octet-oriented cpio
- * SVR4 "newc" cpio
- * shar archives
- * ZIP archives (with uncompressed or "deflate" compressed entries)
- * GNU and BSD 'ar' archives
- * 'mtree' format
-
-Notes:
- * This is a heavily stream-oriented system. There is no direct
- support for in-place modification or random access and no intention
- of ever adding such support. Adding such support would require
- sacrificing a lot of other features, so don't bother asking.
-
- * The library is designed to be extended with new compression and
- archive formats. The only requirement is that the format be
- readable or writable as a stream and that each archive entry be
- independent.
-
- * On read, compression and format are always detected automatically.
-
- * I've attempted to minimize static link pollution. If you don't
- explicitly invoke a particular feature (such as support for a
- particular compression or format), it won't get pulled in.
- In particular, if you don't explicitly enable a particular
- compression or decompression support, you won't need to link
- against the corresponding compression or decompression libraries.
- This also reduces the size of statically-linked binaries in
- environments where that matters.
-
- * On read, the library accepts whatever blocks you hand it.
- Your read callback is free to pass the library a byte at a time
- or mmap the entire archive and give it to the library at once.
- On write, the library always produces correctly-blocked
- output.
-
- * The object-style approach allows you to have multiple archive streams
- open at once. bsdtar uses this in its "@archive" extension.
-
- * The archive itself is read/written using callback functions.
- You can read an archive directly from an in-memory buffer or
- write it to a socket, if you wish. There are some utility
- functions to provide easy-to-use "open file," etc, capabilities.
-
- * The read/write APIs are designed to allow individual entries
- to be read or written to any data source: You can create
- a block of data in memory and add it to a tar archive without
- first writing a temporary file. You can also read an entry from
- an archive and write the data directly to a socket. If you want
- to read/write entries to disk, the archive_write_disk interface
- treats a directory as if it were an archive so you can copy
- from archive->disk using the same code you use for archive->archive
- transfers.
-
- * Note: "pax interchange format" is really an extended tar format,
- despite what the name says.
diff --git a/lib/libarchive/archive.h b/lib/libarchive/archive.h
deleted file mode 100644
index 7075e26..0000000
--- a/lib/libarchive/archive.h
+++ /dev/null
@@ -1,739 +0,0 @@
-/*-
- * Copyright (c) 2003-2007 Tim Kientzle
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifndef ARCHIVE_H_INCLUDED
-#define ARCHIVE_H_INCLUDED
-
-/*
- * Note: archive.h is for use outside of libarchive; the configuration
- * headers (config.h, archive_platform.h, etc.) are purely internal.
- * Do NOT use HAVE_XXX configuration macros to control the behavior of
- * this header! If you must conditionalize, use predefined compiler and/or
- * platform macros.
- */
-#if defined(__BORLANDC__) && __BORLANDC__ >= 0x560
-# define __LA_STDINT_H <stdint.h>
-#elif !defined(__WATCOMC__) && !defined(_MSC_VER) && !defined(__INTERIX) && !defined(__BORLANDC__)
-# define __LA_STDINT_H <inttypes.h>
-#endif
-
-#include <sys/stat.h>
-#include <sys/types.h> /* Linux requires this for off_t */
-#ifdef __LA_STDINT_H
-# include __LA_STDINT_H /* int64_t, etc. */
-#endif
-#include <stdio.h> /* For FILE * */
-
-/* Get appropriate definitions of standard POSIX-style types. */
-/* These should match the types used in 'struct stat' */
-#if defined(_WIN32) && !defined(__CYGWIN__)
-#define __LA_INT64_T __int64
-# if defined(_SSIZE_T_DEFINED)
-# define __LA_SSIZE_T ssize_t
-# elif defined(_WIN64)
-# define __LA_SSIZE_T __int64
-# else
-# define __LA_SSIZE_T long
-# endif
-# if defined(__BORLANDC__)
-# define __LA_UID_T uid_t
-# define __LA_GID_T gid_t
-# else
-# define __LA_UID_T short
-# define __LA_GID_T short
-# endif
-#else
-#include <unistd.h> /* ssize_t, uid_t, and gid_t */
-#define __LA_INT64_T int64_t
-#define __LA_SSIZE_T ssize_t
-#define __LA_UID_T uid_t
-#define __LA_GID_T gid_t
-#endif
-
-/*
- * On Windows, define LIBARCHIVE_STATIC if you're building or using a
- * .lib. The default here assumes you're building a DLL. Only
- * libarchive source should ever define __LIBARCHIVE_BUILD.
- */
-#if ((defined __WIN32__) || (defined _WIN32) || defined(__CYGWIN__)) && (!defined LIBARCHIVE_STATIC)
-# ifdef __LIBARCHIVE_BUILD
-# ifdef __GNUC__
-# define __LA_DECL __attribute__((dllexport)) extern
-# else
-# define __LA_DECL __declspec(dllexport)
-# endif
-# else
-# ifdef __GNUC__
-# define __LA_DECL __attribute__((dllimport)) extern
-# else
-# define __LA_DECL __declspec(dllimport)
-# endif
-# endif
-#else
-/* Static libraries or non-Windows needs no special declaration. */
-# define __LA_DECL
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * The version number is provided as both a macro and a function.
- * The macro identifies the installed header; the function identifies
- * the library version (which may not be the same if you're using a
- * dynamically-linked version of the library). Of course, if the
- * header and library are very different, you should expect some
- * strangeness. Don't do that.
- */
-
-/*
- * The version number is expressed as a single integer that makes it
- * easy to compare versions at build time: for version a.b.c, the
- * version number is printf("%d%03d%03d",a,b,c). For example, if you
- * know your application requires version 2.12.108 or later, you can
- * assert that ARCHIVE_VERSION >= 2012108.
- *
- * This single-number format was introduced with libarchive 1.9.0 in
- * the libarchive 1.x family and libarchive 2.2.4 in the libarchive
- * 2.x family. The following may be useful if you really want to do
- * feature detection for earlier libarchive versions (which defined
- * ARCHIVE_API_VERSION and ARCHIVE_API_FEATURE instead):
- *
- * #ifndef ARCHIVE_VERSION_NUMBER
- * #define ARCHIVE_VERSION_NUMBER \
- * (ARCHIVE_API_VERSION * 1000000 + ARCHIVE_API_FEATURE * 1000)
- * #endif
- */
-#define ARCHIVE_VERSION_NUMBER 2008004
-__LA_DECL int archive_version_number(void);
-
-/*
- * Textual name/version of the library, useful for version displays.
- */
-#define ARCHIVE_VERSION_STRING "libarchive 2.8.4"
-__LA_DECL const char * archive_version_string(void);
-
-#if ARCHIVE_VERSION_NUMBER < 3000000
-/*
- * Deprecated; these are older names that will be removed in favor of
- * the simpler definitions above.
- */
-#define ARCHIVE_VERSION_STAMP ARCHIVE_VERSION_NUMBER
-__LA_DECL int archive_version_stamp(void);
-#define ARCHIVE_LIBRARY_VERSION ARCHIVE_VERSION_STRING
-__LA_DECL const char * archive_version(void);
-#define ARCHIVE_API_VERSION (ARCHIVE_VERSION_NUMBER / 1000000)
-__LA_DECL int archive_api_version(void);
-#define ARCHIVE_API_FEATURE ((ARCHIVE_VERSION_NUMBER / 1000) % 1000)
-__LA_DECL int archive_api_feature(void);
-#endif
-
-#if ARCHIVE_VERSION_NUMBER < 3000000
-/* This should never have been here in the first place. */
-/* Legacy of old tar assumptions, will be removed in libarchive 3.0. */
-#define ARCHIVE_BYTES_PER_RECORD 512
-#define ARCHIVE_DEFAULT_BYTES_PER_BLOCK 10240
-#endif
-
-/* Declare our basic types. */
-struct archive;
-struct archive_entry;
-
-/*
- * Error codes: Use archive_errno() and archive_error_string()
- * to retrieve details. Unless specified otherwise, all functions
- * that return 'int' use these codes.
- */
-#define ARCHIVE_EOF 1 /* Found end of archive. */
-#define ARCHIVE_OK 0 /* Operation was successful. */
-#define ARCHIVE_RETRY (-10) /* Retry might succeed. */
-#define ARCHIVE_WARN (-20) /* Partial success. */
-/* For example, if write_header "fails", then you can't push data. */
-#define ARCHIVE_FAILED (-25) /* Current operation cannot complete. */
-/* But if write_header is "fatal," then this archive is dead and useless. */
-#define ARCHIVE_FATAL (-30) /* No more operations are possible. */
-
-/*
- * As far as possible, archive_errno returns standard platform errno codes.
- * Of course, the details vary by platform, so the actual definitions
- * here are stored in "archive_platform.h". The symbols are listed here
- * for reference; as a rule, clients should not need to know the exact
- * platform-dependent error code.
- */
-/* Unrecognized or invalid file format. */
-/* #define ARCHIVE_ERRNO_FILE_FORMAT */
-/* Illegal usage of the library. */
-/* #define ARCHIVE_ERRNO_PROGRAMMER_ERROR */
-/* Unknown or unclassified error. */
-/* #define ARCHIVE_ERRNO_MISC */
-
-/*
- * Callbacks are invoked to automatically read/skip/write/open/close the
- * archive. You can provide your own for complex tasks (like breaking
- * archives across multiple tapes) or use standard ones built into the
- * library.
- */
-
-/* Returns pointer and size of next block of data from archive. */
-typedef __LA_SSIZE_T archive_read_callback(struct archive *,
- void *_client_data, const void **_buffer);
-
-/* Skips at most request bytes from archive and returns the skipped amount */
-#if ARCHIVE_VERSION_NUMBER < 2000000
-/* Libarchive 1.0 used ssize_t for the return, which is only 32 bits
- * on most 32-bit platforms; not large enough. */
-typedef __LA_SSIZE_T archive_skip_callback(struct archive *,
- void *_client_data, size_t request);
-#elif ARCHIVE_VERSION_NUMBER < 3000000
-/* Libarchive 2.0 used off_t here, but that is a bad idea on Linux and a
- * few other platforms where off_t varies with build settings. */
-typedef off_t archive_skip_callback(struct archive *,
- void *_client_data, off_t request);
-#else
-/* Libarchive 3.0 uses int64_t here, which is actually guaranteed to be
- * 64 bits on every platform. */
-typedef __LA_INT64_T archive_skip_callback(struct archive *,
- void *_client_data, __LA_INT64_T request);
-#endif
-
-/* Returns size actually written, zero on EOF, -1 on error. */
-typedef __LA_SSIZE_T archive_write_callback(struct archive *,
- void *_client_data,
- const void *_buffer, size_t _length);
-
-#if ARCHIVE_VERSION_NUMBER < 3000000
-/* Open callback is actually never needed; remove it in libarchive 3.0. */
-typedef int archive_open_callback(struct archive *, void *_client_data);
-#endif
-
-typedef int archive_close_callback(struct archive *, void *_client_data);
-
-/*
- * Codes for archive_compression.
- */
-#define ARCHIVE_COMPRESSION_NONE 0
-#define ARCHIVE_COMPRESSION_GZIP 1
-#define ARCHIVE_COMPRESSION_BZIP2 2
-#define ARCHIVE_COMPRESSION_COMPRESS 3
-#define ARCHIVE_COMPRESSION_PROGRAM 4
-#define ARCHIVE_COMPRESSION_LZMA 5
-#define ARCHIVE_COMPRESSION_XZ 6
-#define ARCHIVE_COMPRESSION_UU 7
-#define ARCHIVE_COMPRESSION_RPM 8
-
-/*
- * Codes returned by archive_format.
- *
- * Top 16 bits identifies the format family (e.g., "tar"); lower
- * 16 bits indicate the variant. This is updated by read_next_header.
- * Note that the lower 16 bits will often vary from entry to entry.
- * In some cases, this variation occurs as libarchive learns more about
- * the archive (for example, later entries might utilize extensions that
- * weren't necessary earlier in the archive; in this case, libarchive
- * will change the format code to indicate the extended format that
- * was used). In other cases, it's because different tools have
- * modified the archive and so different parts of the archive
- * actually have slightly different formts. (Both tar and cpio store
- * format codes in each entry, so it is quite possible for each
- * entry to be in a different format.)
- */
-#define ARCHIVE_FORMAT_BASE_MASK 0xff0000
-#define ARCHIVE_FORMAT_CPIO 0x10000
-#define ARCHIVE_FORMAT_CPIO_POSIX (ARCHIVE_FORMAT_CPIO | 1)
-#define ARCHIVE_FORMAT_CPIO_BIN_LE (ARCHIVE_FORMAT_CPIO | 2)
-#define ARCHIVE_FORMAT_CPIO_BIN_BE (ARCHIVE_FORMAT_CPIO | 3)
-#define ARCHIVE_FORMAT_CPIO_SVR4_NOCRC (ARCHIVE_FORMAT_CPIO | 4)
-#define ARCHIVE_FORMAT_CPIO_SVR4_CRC (ARCHIVE_FORMAT_CPIO | 5)
-#define ARCHIVE_FORMAT_SHAR 0x20000
-#define ARCHIVE_FORMAT_SHAR_BASE (ARCHIVE_FORMAT_SHAR | 1)
-#define ARCHIVE_FORMAT_SHAR_DUMP (ARCHIVE_FORMAT_SHAR | 2)
-#define ARCHIVE_FORMAT_TAR 0x30000
-#define ARCHIVE_FORMAT_TAR_USTAR (ARCHIVE_FORMAT_TAR | 1)
-#define ARCHIVE_FORMAT_TAR_PAX_INTERCHANGE (ARCHIVE_FORMAT_TAR | 2)
-#define ARCHIVE_FORMAT_TAR_PAX_RESTRICTED (ARCHIVE_FORMAT_TAR | 3)
-#define ARCHIVE_FORMAT_TAR_GNUTAR (ARCHIVE_FORMAT_TAR | 4)
-#define ARCHIVE_FORMAT_ISO9660 0x40000
-#define ARCHIVE_FORMAT_ISO9660_ROCKRIDGE (ARCHIVE_FORMAT_ISO9660 | 1)
-#define ARCHIVE_FORMAT_ZIP 0x50000
-#define ARCHIVE_FORMAT_EMPTY 0x60000
-#define ARCHIVE_FORMAT_AR 0x70000
-#define ARCHIVE_FORMAT_AR_GNU (ARCHIVE_FORMAT_AR | 1)
-#define ARCHIVE_FORMAT_AR_BSD (ARCHIVE_FORMAT_AR | 2)
-#define ARCHIVE_FORMAT_MTREE 0x80000
-#define ARCHIVE_FORMAT_RAW 0x90000
-#define ARCHIVE_FORMAT_XAR 0xA0000
-
-/*-
- * Basic outline for reading an archive:
- * 1) Ask archive_read_new for an archive reader object.
- * 2) Update any global properties as appropriate.
- * In particular, you'll certainly want to call appropriate
- * archive_read_support_XXX functions.
- * 3) Call archive_read_open_XXX to open the archive
- * 4) Repeatedly call archive_read_next_header to get information about
- * successive archive entries. Call archive_read_data to extract
- * data for entries of interest.
- * 5) Call archive_read_finish to end processing.
- */
-__LA_DECL struct archive *archive_read_new(void);
-
-/*
- * The archive_read_support_XXX calls enable auto-detect for this
- * archive handle. They also link in the necessary support code.
- * For example, if you don't want bzlib linked in, don't invoke
- * support_compression_bzip2(). The "all" functions provide the
- * obvious shorthand.
- */
-__LA_DECL int archive_read_support_compression_all(struct archive *);
-__LA_DECL int archive_read_support_compression_bzip2(struct archive *);
-__LA_DECL int archive_read_support_compression_compress(struct archive *);
-__LA_DECL int archive_read_support_compression_gzip(struct archive *);
-__LA_DECL int archive_read_support_compression_lzma(struct archive *);
-__LA_DECL int archive_read_support_compression_none(struct archive *);
-__LA_DECL int archive_read_support_compression_program(struct archive *,
- const char *command);
-__LA_DECL int archive_read_support_compression_program_signature
- (struct archive *, const char *,
- const void * /* match */, size_t);
-
-__LA_DECL int archive_read_support_compression_rpm(struct archive *);
-__LA_DECL int archive_read_support_compression_uu(struct archive *);
-__LA_DECL int archive_read_support_compression_xz(struct archive *);
-
-__LA_DECL int archive_read_support_format_all(struct archive *);
-__LA_DECL int archive_read_support_format_ar(struct archive *);
-__LA_DECL int archive_read_support_format_cpio(struct archive *);
-__LA_DECL int archive_read_support_format_empty(struct archive *);
-__LA_DECL int archive_read_support_format_gnutar(struct archive *);
-__LA_DECL int archive_read_support_format_iso9660(struct archive *);
-__LA_DECL int archive_read_support_format_mtree(struct archive *);
-__LA_DECL int archive_read_support_format_raw(struct archive *);
-__LA_DECL int archive_read_support_format_tar(struct archive *);
-__LA_DECL int archive_read_support_format_xar(struct archive *);
-__LA_DECL int archive_read_support_format_zip(struct archive *);
-
-
-/* Open the archive using callbacks for archive I/O. */
-__LA_DECL int archive_read_open(struct archive *, void *_client_data,
- archive_open_callback *, archive_read_callback *,
- archive_close_callback *);
-__LA_DECL int archive_read_open2(struct archive *, void *_client_data,
- archive_open_callback *, archive_read_callback *,
- archive_skip_callback *, archive_close_callback *);
-
-/*
- * A variety of shortcuts that invoke archive_read_open() with
- * canned callbacks suitable for common situations. The ones that
- * accept a block size handle tape blocking correctly.
- */
-/* Use this if you know the filename. Note: NULL indicates stdin. */
-__LA_DECL int archive_read_open_filename(struct archive *,
- const char *_filename, size_t _block_size);
-/* archive_read_open_file() is a deprecated synonym for ..._open_filename(). */
-__LA_DECL int archive_read_open_file(struct archive *,
- const char *_filename, size_t _block_size);
-/* Read an archive that's stored in memory. */
-__LA_DECL int archive_read_open_memory(struct archive *,
- void * buff, size_t size);
-/* A more involved version that is only used for internal testing. */
-__LA_DECL int archive_read_open_memory2(struct archive *a, void *buff,
- size_t size, size_t read_size);
-/* Read an archive that's already open, using the file descriptor. */
-__LA_DECL int archive_read_open_fd(struct archive *, int _fd,
- size_t _block_size);
-/* Read an archive that's already open, using a FILE *. */
-/* Note: DO NOT use this with tape drives. */
-__LA_DECL int archive_read_open_FILE(struct archive *, FILE *_file);
-
-/* Parses and returns next entry header. */
-__LA_DECL int archive_read_next_header(struct archive *,
- struct archive_entry **);
-
-/* Parses and returns next entry header using the archive_entry passed in */
-__LA_DECL int archive_read_next_header2(struct archive *,
- struct archive_entry *);
-
-/*
- * Retrieve the byte offset in UNCOMPRESSED data where last-read
- * header started.
- */
-__LA_DECL __LA_INT64_T archive_read_header_position(struct archive *);
-
-/* Read data from the body of an entry. Similar to read(2). */
-__LA_DECL __LA_SSIZE_T archive_read_data(struct archive *,
- void *, size_t);
-
-/*
- * A zero-copy version of archive_read_data that also exposes the file offset
- * of each returned block. Note that the client has no way to specify
- * the desired size of the block. The API does guarantee that offsets will
- * be strictly increasing and that returned blocks will not overlap.
- */
-#if ARCHIVE_VERSION_NUMBER < 3000000
-__LA_DECL int archive_read_data_block(struct archive *a,
- const void **buff, size_t *size, off_t *offset);
-#else
-__LA_DECL int archive_read_data_block(struct archive *a,
- const void **buff, size_t *size,
- __LA_INT64_T *offset);
-#endif
-
-/*-
- * Some convenience functions that are built on archive_read_data:
- * 'skip': skips entire entry
- * 'into_buffer': writes data into memory buffer that you provide
- * 'into_fd': writes data to specified filedes
- */
-__LA_DECL int archive_read_data_skip(struct archive *);
-__LA_DECL int archive_read_data_into_buffer(struct archive *,
- void *buffer, __LA_SSIZE_T len);
-__LA_DECL int archive_read_data_into_fd(struct archive *, int fd);
-
-/*
- * Set read options.
- */
-/* Apply option string to the format only. */
-__LA_DECL int archive_read_set_format_options(struct archive *_a,
- const char *s);
-/* Apply option string to the filter only. */
-__LA_DECL int archive_read_set_filter_options(struct archive *_a,
- const char *s);
-/* Apply option string to both the format and the filter. */
-__LA_DECL int archive_read_set_options(struct archive *_a,
- const char *s);
-
-/*-
- * Convenience function to recreate the current entry (whose header
- * has just been read) on disk.
- *
- * This does quite a bit more than just copy data to disk. It also:
- * - Creates intermediate directories as required.
- * - Manages directory permissions: non-writable directories will
- * be initially created with write permission enabled; when the
- * archive is closed, dir permissions are edited to the values specified
- * in the archive.
- * - Checks hardlinks: hardlinks will not be extracted unless the
- * linked-to file was also extracted within the same session. (TODO)
- */
-
-/* The "flags" argument selects optional behavior, 'OR' the flags you want. */
-
-/* Default: Do not try to set owner/group. */
-#define ARCHIVE_EXTRACT_OWNER (0x0001)
-/* Default: Do obey umask, do not restore SUID/SGID/SVTX bits. */
-#define ARCHIVE_EXTRACT_PERM (0x0002)
-/* Default: Do not restore mtime/atime. */
-#define ARCHIVE_EXTRACT_TIME (0x0004)
-/* Default: Replace existing files. */
-#define ARCHIVE_EXTRACT_NO_OVERWRITE (0x0008)
-/* Default: Try create first, unlink only if create fails with EEXIST. */
-#define ARCHIVE_EXTRACT_UNLINK (0x0010)
-/* Default: Do not restore ACLs. */
-#define ARCHIVE_EXTRACT_ACL (0x0020)
-/* Default: Do not restore fflags. */
-#define ARCHIVE_EXTRACT_FFLAGS (0x0040)
-/* Default: Do not restore xattrs. */
-#define ARCHIVE_EXTRACT_XATTR (0x0080)
-/* Default: Do not try to guard against extracts redirected by symlinks. */
-/* Note: With ARCHIVE_EXTRACT_UNLINK, will remove any intermediate symlink. */
-#define ARCHIVE_EXTRACT_SECURE_SYMLINKS (0x0100)
-/* Default: Do not reject entries with '..' as path elements. */
-#define ARCHIVE_EXTRACT_SECURE_NODOTDOT (0x0200)
-/* Default: Create parent directories as needed. */
-#define ARCHIVE_EXTRACT_NO_AUTODIR (0x0400)
-/* Default: Overwrite files, even if one on disk is newer. */
-#define ARCHIVE_EXTRACT_NO_OVERWRITE_NEWER (0x0800)
-/* Detect blocks of 0 and write holes instead. */
-#define ARCHIVE_EXTRACT_SPARSE (0x1000)
-
-__LA_DECL int archive_read_extract(struct archive *, struct archive_entry *,
- int flags);
-__LA_DECL int archive_read_extract2(struct archive *, struct archive_entry *,
- struct archive * /* dest */);
-__LA_DECL void archive_read_extract_set_progress_callback(struct archive *,
- void (*_progress_func)(void *), void *_user_data);
-
-/* Record the dev/ino of a file that will not be written. This is
- * generally set to the dev/ino of the archive being read. */
-__LA_DECL void archive_read_extract_set_skip_file(struct archive *,
- dev_t, ino_t);
-
-/* Close the file and release most resources. */
-__LA_DECL int archive_read_close(struct archive *);
-/* Release all resources and destroy the object. */
-/* Note that archive_read_free will call archive_read_close for you. */
-__LA_DECL int archive_read_free(struct archive *);
-#if ARCHIVE_VERSION_NUMBER < 4000000
-/* Synonym for archive_read_free() for backwards compatibility. */
-__LA_DECL int archive_read_finish(struct archive *);
-#endif
-
-/*-
- * To create an archive:
- * 1) Ask archive_write_new for a archive writer object.
- * 2) Set any global properties. In particular, you should set
- * the compression and format to use.
- * 3) Call archive_write_open to open the file (most people
- * will use archive_write_open_file or archive_write_open_fd,
- * which provide convenient canned I/O callbacks for you).
- * 4) For each entry:
- * - construct an appropriate struct archive_entry structure
- * - archive_write_header to write the header
- * - archive_write_data to write the entry data
- * 5) archive_write_close to close the output
- * 6) archive_write_free to cleanup the writer and release resources
- */
-__LA_DECL struct archive *archive_write_new(void);
-__LA_DECL int archive_write_set_bytes_per_block(struct archive *,
- int bytes_per_block);
-__LA_DECL int archive_write_get_bytes_per_block(struct archive *);
-/* XXX This is badly misnamed; suggestions appreciated. XXX */
-__LA_DECL int archive_write_set_bytes_in_last_block(struct archive *,
- int bytes_in_last_block);
-__LA_DECL int archive_write_get_bytes_in_last_block(struct archive *);
-
-/* The dev/ino of a file that won't be archived. This is used
- * to avoid recursively adding an archive to itself. */
-__LA_DECL int archive_write_set_skip_file(struct archive *, dev_t, ino_t);
-
-__LA_DECL int archive_write_set_compression_bzip2(struct archive *);
-__LA_DECL int archive_write_set_compression_compress(struct archive *);
-__LA_DECL int archive_write_set_compression_gzip(struct archive *);
-__LA_DECL int archive_write_set_compression_lzma(struct archive *);
-__LA_DECL int archive_write_set_compression_none(struct archive *);
-__LA_DECL int archive_write_set_compression_program(struct archive *,
- const char *cmd);
-__LA_DECL int archive_write_set_compression_xz(struct archive *);
-/* A convenience function to set the format based on the code or name. */
-__LA_DECL int archive_write_set_format(struct archive *, int format_code);
-__LA_DECL int archive_write_set_format_by_name(struct archive *,
- const char *name);
-/* To minimize link pollution, use one or more of the following. */
-__LA_DECL int archive_write_set_format_ar_bsd(struct archive *);
-__LA_DECL int archive_write_set_format_ar_svr4(struct archive *);
-__LA_DECL int archive_write_set_format_cpio(struct archive *);
-__LA_DECL int archive_write_set_format_cpio_newc(struct archive *);
-__LA_DECL int archive_write_set_format_mtree(struct archive *);
-/* TODO: int archive_write_set_format_old_tar(struct archive *); */
-__LA_DECL int archive_write_set_format_pax(struct archive *);
-__LA_DECL int archive_write_set_format_pax_restricted(struct archive *);
-__LA_DECL int archive_write_set_format_shar(struct archive *);
-__LA_DECL int archive_write_set_format_shar_dump(struct archive *);
-__LA_DECL int archive_write_set_format_ustar(struct archive *);
-__LA_DECL int archive_write_set_format_zip(struct archive *);
-__LA_DECL int archive_write_open(struct archive *, void *,
- archive_open_callback *, archive_write_callback *,
- archive_close_callback *);
-__LA_DECL int archive_write_open_fd(struct archive *, int _fd);
-__LA_DECL int archive_write_open_filename(struct archive *, const char *_file);
-/* A deprecated synonym for archive_write_open_filename() */
-__LA_DECL int archive_write_open_file(struct archive *, const char *_file);
-__LA_DECL int archive_write_open_FILE(struct archive *, FILE *);
-/* _buffSize is the size of the buffer, _used refers to a variable that
- * will be updated after each write into the buffer. */
-__LA_DECL int archive_write_open_memory(struct archive *,
- void *_buffer, size_t _buffSize, size_t *_used);
-
-/*
- * Note that the library will truncate writes beyond the size provided
- * to archive_write_header or pad if the provided data is short.
- */
-__LA_DECL int archive_write_header(struct archive *,
- struct archive_entry *);
-#if ARCHIVE_VERSION_NUMBER < 2000000
-/* This was erroneously declared to return "int" in libarchive 1.x. */
-__LA_DECL int archive_write_data(struct archive *,
- const void *, size_t);
-#else
-/* Libarchive 2.0 and later return ssize_t here. */
-__LA_DECL __LA_SSIZE_T archive_write_data(struct archive *,
- const void *, size_t);
-#endif
-
-#if ARCHIVE_VERSION_NUMBER < 3000000
-/* Libarchive 1.x and 2.x use off_t for the argument, but that's not
- * stable on Linux. */
-__LA_DECL __LA_SSIZE_T archive_write_data_block(struct archive *,
- const void *, size_t, off_t);
-#else
-/* Libarchive 3.0 uses explicit int64_t to ensure consistent 64-bit support. */
-__LA_DECL __LA_SSIZE_T archive_write_data_block(struct archive *,
- const void *, size_t, __LA_INT64_T);
-#endif
-__LA_DECL int archive_write_finish_entry(struct archive *);
-__LA_DECL int archive_write_close(struct archive *);
-
-/* This can fail if the archive wasn't already closed, in which case
- * archive_write_free() will implicitly call archive_write_close(). */
-__LA_DECL int archive_write_free(struct archive *);
-#if ARCHIVE_VERSION_NUMBER < 4000000
-/* Synonym for archive_write_free() for backwards compatibility. */
-__LA_DECL int archive_write_finish(struct archive *);
-#endif
-
-/*
- * Set write options.
- */
-/* Apply option string to the format only. */
-__LA_DECL int archive_write_set_format_options(struct archive *_a,
- const char *s);
-/* Apply option string to the compressor only. */
-__LA_DECL int archive_write_set_compressor_options(struct archive *_a,
- const char *s);
-/* Apply option string to both the format and the compressor. */
-__LA_DECL int archive_write_set_options(struct archive *_a,
- const char *s);
-
-
-/*-
- * ARCHIVE_WRITE_DISK API
- *
- * To create objects on disk:
- * 1) Ask archive_write_disk_new for a new archive_write_disk object.
- * 2) Set any global properties. In particular, you probably
- * want to set the options.
- * 3) For each entry:
- * - construct an appropriate struct archive_entry structure
- * - archive_write_header to create the file/dir/etc on disk
- * - archive_write_data to write the entry data
- * 4) archive_write_free to cleanup the writer and release resources
- *
- * In particular, you can use this in conjunction with archive_read()
- * to pull entries out of an archive and create them on disk.
- */
-__LA_DECL struct archive *archive_write_disk_new(void);
-/* This file will not be overwritten. */
-__LA_DECL int archive_write_disk_set_skip_file(struct archive *,
- dev_t, ino_t);
-/* Set flags to control how the next item gets created.
- * This accepts a bitmask of ARCHIVE_EXTRACT_XXX flags defined above. */
-__LA_DECL int archive_write_disk_set_options(struct archive *,
- int flags);
-/*
- * The lookup functions are given uname/uid (or gname/gid) pairs and
- * return a uid (gid) suitable for this system. These are used for
- * restoring ownership and for setting ACLs. The default functions
- * are naive, they just return the uid/gid. These are small, so reasonable
- * for applications that don't need to preserve ownership; they
- * are probably also appropriate for applications that are doing
- * same-system backup and restore.
- */
-/*
- * The "standard" lookup functions use common system calls to lookup
- * the uname/gname, falling back to the uid/gid if the names can't be
- * found. They cache lookups and are reasonably fast, but can be very
- * large, so they are not used unless you ask for them. In
- * particular, these match the specifications of POSIX "pax" and old
- * POSIX "tar".
- */
-__LA_DECL int archive_write_disk_set_standard_lookup(struct archive *);
-/*
- * If neither the default (naive) nor the standard (big) functions suit
- * your needs, you can write your own and register them. Be sure to
- * include a cleanup function if you have allocated private data.
- */
-__LA_DECL int archive_write_disk_set_group_lookup(struct archive *,
- void * /* private_data */,
- __LA_GID_T (*)(void *, const char *, __LA_GID_T),
- void (* /* cleanup */)(void *));
-__LA_DECL int archive_write_disk_set_user_lookup(struct archive *,
- void * /* private_data */,
- __LA_UID_T (*)(void *, const char *, __LA_UID_T),
- void (* /* cleanup */)(void *));
-
-/*
- * ARCHIVE_READ_DISK API
- *
- * This is still evolving and somewhat experimental.
- */
-__LA_DECL struct archive *archive_read_disk_new(void);
-/* The names for symlink modes here correspond to an old BSD
- * command-line argument convention: -L, -P, -H */
-/* Follow all symlinks. */
-__LA_DECL int archive_read_disk_set_symlink_logical(struct archive *);
-/* Follow no symlinks. */
-__LA_DECL int archive_read_disk_set_symlink_physical(struct archive *);
-/* Follow symlink initially, then not. */
-__LA_DECL int archive_read_disk_set_symlink_hybrid(struct archive *);
-/* TODO: Handle Linux stat32/stat64 ugliness. <sigh> */
-__LA_DECL int archive_read_disk_entry_from_file(struct archive *,
- struct archive_entry *, int /* fd */, const struct stat *);
-/* Look up gname for gid or uname for uid. */
-/* Default implementations are very, very stupid. */
-__LA_DECL const char *archive_read_disk_gname(struct archive *, __LA_GID_T);
-__LA_DECL const char *archive_read_disk_uname(struct archive *, __LA_UID_T);
-/* "Standard" implementation uses getpwuid_r, getgrgid_r and caches the
- * results for performance. */
-__LA_DECL int archive_read_disk_set_standard_lookup(struct archive *);
-/* You can install your own lookups if you like. */
-__LA_DECL int archive_read_disk_set_gname_lookup(struct archive *,
- void * /* private_data */,
- const char *(* /* lookup_fn */)(void *, __LA_GID_T),
- void (* /* cleanup_fn */)(void *));
-__LA_DECL int archive_read_disk_set_uname_lookup(struct archive *,
- void * /* private_data */,
- const char *(* /* lookup_fn */)(void *, __LA_UID_T),
- void (* /* cleanup_fn */)(void *));
-
-/*
- * Accessor functions to read/set various information in
- * the struct archive object:
- */
-/* Bytes written after compression or read before decompression. */
-__LA_DECL __LA_INT64_T archive_position_compressed(struct archive *);
-/* Bytes written to compressor or read from decompressor. */
-__LA_DECL __LA_INT64_T archive_position_uncompressed(struct archive *);
-
-__LA_DECL const char *archive_compression_name(struct archive *);
-__LA_DECL int archive_compression(struct archive *);
-__LA_DECL int archive_errno(struct archive *);
-__LA_DECL const char *archive_error_string(struct archive *);
-__LA_DECL const char *archive_format_name(struct archive *);
-__LA_DECL int archive_format(struct archive *);
-__LA_DECL void archive_clear_error(struct archive *);
-__LA_DECL void archive_set_error(struct archive *, int _err,
- const char *fmt, ...);
-__LA_DECL void archive_copy_error(struct archive *dest,
- struct archive *src);
-__LA_DECL int archive_file_count(struct archive *);
-
-#ifdef __cplusplus
-}
-#endif
-
-/* These are meaningless outside of this header. */
-#undef __LA_DECL
-#undef __LA_GID_T
-#undef __LA_UID_T
-
-/* These need to remain defined because they're used in the
- * callback type definitions. XXX Fix this. This is ugly. XXX */
-/* #undef __LA_INT64_T */
-/* #undef __LA_SSIZE_T */
-
-#endif /* !ARCHIVE_H_INCLUDED */
diff --git a/lib/libarchive/archive_read_disk_entry_from_file.c b/lib/libarchive/archive_read_disk_entry_from_file.c
deleted file mode 100644
index 957e4ee..0000000
--- a/lib/libarchive/archive_read_disk_entry_from_file.c
+++ /dev/null
@@ -1,570 +0,0 @@
-/*-
- * Copyright (c) 2003-2009 Tim Kientzle
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "archive_platform.h"
-__FBSDID("$FreeBSD$");
-
-#ifdef HAVE_SYS_TYPES_H
-/* Mac OSX requires sys/types.h before sys/acl.h. */
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_ACL_H
-#include <sys/acl.h>
-#endif
-#ifdef HAVE_SYS_EXTATTR_H
-#include <sys/extattr.h>
-#endif
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-#ifdef HAVE_SYS_XATTR_H
-#include <sys/xattr.h>
-#endif
-#ifdef HAVE_ACL_LIBACL_H
-#include <acl/libacl.h>
-#endif
-#ifdef HAVE_ATTR_XATTR_H
-#include <attr/xattr.h>
-#endif
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#ifdef HAVE_LIMITS_H
-#include <limits.h>
-#endif
-#ifdef HAVE_WINDOWS_H
-#include <windows.h>
-#endif
-
-#include "archive.h"
-#include "archive_entry.h"
-#include "archive_private.h"
-#include "archive_read_disk_private.h"
-
-/*
- * Linux and FreeBSD plug this obvious hole in POSIX.1e in
- * different ways.
- */
-#if HAVE_ACL_GET_PERM
-#define ACL_GET_PERM acl_get_perm
-#elif HAVE_ACL_GET_PERM_NP
-#define ACL_GET_PERM acl_get_perm_np
-#endif
-
-static int setup_acls_posix1e(struct archive_read_disk *,
- struct archive_entry *, int fd);
-static int setup_xattrs(struct archive_read_disk *,
- struct archive_entry *, int fd);
-
-int
-archive_read_disk_entry_from_file(struct archive *_a,
- struct archive_entry *entry,
- int fd, const struct stat *st)
-{
- struct archive_read_disk *a = (struct archive_read_disk *)_a;
- const char *path, *name;
- struct stat s;
- int initial_fd = fd;
- int r, r1;
-
- archive_clear_error(_a);
- path = archive_entry_sourcepath(entry);
- if (path == NULL)
- path = archive_entry_pathname(entry);
-
-#ifdef EXT2_IOC_GETFLAGS
- /* Linux requires an extra ioctl to pull the flags. Although
- * this is an extra step, it has a nice side-effect: We get an
- * open file descriptor which we can use in the subsequent lookups. */
- if ((S_ISREG(st->st_mode) || S_ISDIR(st->st_mode))) {
- if (fd < 0)
- fd = open(pathname, O_RDONLY | O_NONBLOCK | O_BINARY);
- if (fd >= 0) {
- unsigned long stflags;
- int r = ioctl(fd, EXT2_IOC_GETFLAGS, &stflags);
- if (r == 0 && stflags != 0)
- archive_entry_set_fflags(entry, stflags, 0);
- }
- }
-#endif
-
- if (st == NULL) {
- /* TODO: On Windows, use GetFileInfoByHandle() here.
- * Using Windows stat() call is badly broken, but
- * even the stat() wrapper has problems because
- * 'struct stat' is broken on Windows.
- */
-#if HAVE_FSTAT
- if (fd >= 0) {
- if (fstat(fd, &s) != 0) {
- archive_set_error(&a->archive, errno,
- "Can't fstat");
- return (ARCHIVE_FAILED);
- }
- } else
-#endif
-#if HAVE_LSTAT
- if (!a->follow_symlinks) {
- if (lstat(path, &s) != 0) {
- archive_set_error(&a->archive, errno,
- "Can't lstat %s", path);
- return (ARCHIVE_FAILED);
- }
- } else
-#endif
- if (stat(path, &s) != 0) {
- archive_set_error(&a->archive, errno,
- "Can't stat %s", path);
- return (ARCHIVE_FAILED);
- }
- st = &s;
- }
- archive_entry_copy_stat(entry, st);
-
- /* Lookup uname/gname */
- name = archive_read_disk_uname(_a, archive_entry_uid(entry));
- if (name != NULL)
- archive_entry_copy_uname(entry, name);
- name = archive_read_disk_gname(_a, archive_entry_gid(entry));
- if (name != NULL)
- archive_entry_copy_gname(entry, name);
-
-#ifdef HAVE_STRUCT_STAT_ST_FLAGS
- /* On FreeBSD, we get flags for free with the stat. */
- /* TODO: Does this belong in copy_stat()? */
- if (st->st_flags != 0)
- archive_entry_set_fflags(entry, st->st_flags, 0);
-#endif
-
-#ifdef HAVE_READLINK
- if (S_ISLNK(st->st_mode)) {
- char linkbuffer[PATH_MAX + 1];
- int lnklen = readlink(path, linkbuffer, PATH_MAX);
- if (lnklen < 0) {
- archive_set_error(&a->archive, errno,
- "Couldn't read link data");
- return (ARCHIVE_FAILED);
- }
- linkbuffer[lnklen] = 0;
- archive_entry_set_symlink(entry, linkbuffer);
- }
-#endif
-
- r = setup_acls_posix1e(a, entry, fd);
- r1 = setup_xattrs(a, entry, fd);
- if (r1 < r)
- r = r1;
- /* If we opened the file earlier in this function, close it. */
- if (initial_fd != fd)
- close(fd);
- return (r);
-}
-
-#ifdef HAVE_POSIX_ACL
-static void setup_acl_posix1e(struct archive_read_disk *a,
- struct archive_entry *entry, acl_t acl, int archive_entry_acl_type);
-
-static int
-setup_acls_posix1e(struct archive_read_disk *a,
- struct archive_entry *entry, int fd)
-{
- const char *accpath;
- acl_t acl;
-
- accpath = archive_entry_sourcepath(entry);
- if (accpath == NULL)
- accpath = archive_entry_pathname(entry);
-
- archive_entry_acl_clear(entry);
-
- /* Retrieve access ACL from file. */
- if (fd >= 0)
- acl = acl_get_fd(fd);
-#if HAVE_ACL_GET_LINK_NP
- else if (!a->follow_symlinks)
- acl = acl_get_link_np(accpath, ACL_TYPE_ACCESS);
-#else
- else if ((!a->follow_symlinks)
- && (archive_entry_filetype(entry) == AE_IFLNK))
- /* We can't get the ACL of a symlink, so we assume it can't
- have one. */
- acl = NULL;
-#endif
- else
- acl = acl_get_file(accpath, ACL_TYPE_ACCESS);
- if (acl != NULL) {
- setup_acl_posix1e(a, entry, acl,
- ARCHIVE_ENTRY_ACL_TYPE_ACCESS);
- acl_free(acl);
- }
-
- /* Only directories can have default ACLs. */
- if (S_ISDIR(archive_entry_mode(entry))) {
- acl = acl_get_file(accpath, ACL_TYPE_DEFAULT);
- if (acl != NULL) {
- setup_acl_posix1e(a, entry, acl,
- ARCHIVE_ENTRY_ACL_TYPE_DEFAULT);
- acl_free(acl);
- }
- }
- return (ARCHIVE_OK);
-}
-
-/*
- * Translate POSIX.1e ACL into libarchive internal structure.
- */
-static void
-setup_acl_posix1e(struct archive_read_disk *a,
- struct archive_entry *entry, acl_t acl, int archive_entry_acl_type)
-{
- acl_tag_t acl_tag;
- acl_entry_t acl_entry;
- acl_permset_t acl_permset;
- int s, ae_id, ae_tag, ae_perm;
- const char *ae_name;
-
- s = acl_get_entry(acl, ACL_FIRST_ENTRY, &acl_entry);
- while (s == 1) {
- ae_id = -1;
- ae_name = NULL;
-
- acl_get_tag_type(acl_entry, &acl_tag);
- if (acl_tag == ACL_USER) {
- ae_id = (int)*(uid_t *)acl_get_qualifier(acl_entry);
- ae_name = archive_read_disk_uname(&a->archive, ae_id);
- ae_tag = ARCHIVE_ENTRY_ACL_USER;
- } else if (acl_tag == ACL_GROUP) {
- ae_id = (int)*(gid_t *)acl_get_qualifier(acl_entry);
- ae_name = archive_read_disk_gname(&a->archive, ae_id);
- ae_tag = ARCHIVE_ENTRY_ACL_GROUP;
- } else if (acl_tag == ACL_MASK) {
- ae_tag = ARCHIVE_ENTRY_ACL_MASK;
- } else if (acl_tag == ACL_USER_OBJ) {
- ae_tag = ARCHIVE_ENTRY_ACL_USER_OBJ;
- } else if (acl_tag == ACL_GROUP_OBJ) {
- ae_tag = ARCHIVE_ENTRY_ACL_GROUP_OBJ;
- } else if (acl_tag == ACL_OTHER) {
- ae_tag = ARCHIVE_ENTRY_ACL_OTHER;
- } else {
- /* Skip types that libarchive can't support. */
- continue;
- }
-
- acl_get_permset(acl_entry, &acl_permset);
- ae_perm = 0;
- /*
- * acl_get_perm() is spelled differently on different
- * platforms; see above.
- */
- if (ACL_GET_PERM(acl_permset, ACL_EXECUTE))
- ae_perm |= ARCHIVE_ENTRY_ACL_EXECUTE;
- if (ACL_GET_PERM(acl_permset, ACL_READ))
- ae_perm |= ARCHIVE_ENTRY_ACL_READ;
- if (ACL_GET_PERM(acl_permset, ACL_WRITE))
- ae_perm |= ARCHIVE_ENTRY_ACL_WRITE;
-
- archive_entry_acl_add_entry(entry,
- archive_entry_acl_type, ae_perm, ae_tag,
- ae_id, ae_name);
-
- s = acl_get_entry(acl, ACL_NEXT_ENTRY, &acl_entry);
- }
-}
-#else
-static int
-setup_acls_posix1e(struct archive_read_disk *a,
- struct archive_entry *entry, int fd)
-{
- (void)a; /* UNUSED */
- (void)entry; /* UNUSED */
- (void)fd; /* UNUSED */
- return (ARCHIVE_OK);
-}
-#endif
-
-#if HAVE_LISTXATTR && HAVE_LLISTXATTR && HAVE_GETXATTR && HAVE_LGETXATTR
-
-/*
- * Linux extended attribute support.
- *
- * TODO: By using a stack-allocated buffer for the first
- * call to getxattr(), we might be able to avoid the second
- * call entirely. We only need the second call if the
- * stack-allocated buffer is too small. But a modest buffer
- * of 1024 bytes or so will often be big enough. Same applies
- * to listxattr().
- */
-
-
-static int
-setup_xattr(struct archive_read_disk *a,
- struct archive_entry *entry, const char *name, int fd)
-{
- ssize_t size;
- void *value = NULL;
- const char *accpath;
-
- (void)fd; /* UNUSED */
-
- accpath = archive_entry_sourcepath(entry);
- if (accpath == NULL)
- accpath = archive_entry_pathname(entry);
-
- if (!a->follow_symlinks)
- size = lgetxattr(accpath, name, NULL, 0);
- else
- size = getxattr(accpath, name, NULL, 0);
-
- if (size == -1) {
- archive_set_error(&a->archive, errno,
- "Couldn't query extended attribute");
- return (ARCHIVE_WARN);
- }
-
- if (size > 0 && (value = malloc(size)) == NULL) {
- archive_set_error(&a->archive, errno, "Out of memory");
- return (ARCHIVE_FATAL);
- }
-
- if (!a->follow_symlinks)
- size = lgetxattr(accpath, name, value, size);
- else
- size = getxattr(accpath, name, value, size);
-
- if (size == -1) {
- archive_set_error(&a->archive, errno,
- "Couldn't read extended attribute");
- return (ARCHIVE_WARN);
- }
-
- archive_entry_xattr_add_entry(entry, name, value, size);
-
- free(value);
- return (ARCHIVE_OK);
-}
-
-static int
-setup_xattrs(struct archive_read_disk *a,
- struct archive_entry *entry, int fd)
-{
- char *list, *p;
- const char *path;
- ssize_t list_size;
-
-
- path = archive_entry_sourcepath(entry);
- if (path == NULL)
- path = archive_entry_pathname(entry);
-
- if (!a->follow_symlinks)
- list_size = llistxattr(path, NULL, 0);
- else
- list_size = listxattr(path, NULL, 0);
-
- if (list_size == -1) {
- if (errno == ENOTSUP)
- return (ARCHIVE_OK);
- archive_set_error(&a->archive, errno,
- "Couldn't list extended attributes");
- return (ARCHIVE_WARN);
- }
-
- if (list_size == 0)
- return (ARCHIVE_OK);
-
- if ((list = malloc(list_size)) == NULL) {
- archive_set_error(&a->archive, errno, "Out of memory");
- return (ARCHIVE_FATAL);
- }
-
- if (!a->follow_symlinks)
- list_size = llistxattr(path, list, list_size);
- else
- list_size = listxattr(path, list, list_size);
-
- if (list_size == -1) {
- archive_set_error(&a->archive, errno,
- "Couldn't retrieve extended attributes");
- free(list);
- return (ARCHIVE_WARN);
- }
-
- for (p = list; (p - list) < list_size; p += strlen(p) + 1) {
- if (strncmp(p, "system.", 7) == 0 ||
- strncmp(p, "xfsroot.", 8) == 0)
- continue;
- setup_xattr(a, entry, p, fd);
- }
-
- free(list);
- return (ARCHIVE_OK);
-}
-
-#elif HAVE_EXTATTR_GET_FILE && HAVE_EXTATTR_LIST_FILE && \
- HAVE_DECL_EXTATTR_NAMESPACE_USER
-
-/*
- * FreeBSD extattr interface.
- */
-
-/* TODO: Implement this. Follow the Linux model above, but
- * with FreeBSD-specific system calls, of course. Be careful
- * to not include the system extattrs that hold ACLs; we handle
- * those separately.
- */
-static int
-setup_xattr(struct archive_read_disk *a, struct archive_entry *entry,
- int namespace, const char *name, const char *fullname, int fd);
-
-static int
-setup_xattr(struct archive_read_disk *a, struct archive_entry *entry,
- int namespace, const char *name, const char *fullname, int fd)
-{
- ssize_t size;
- void *value = NULL;
- const char *accpath;
-
- (void)fd; /* UNUSED */
-
- accpath = archive_entry_sourcepath(entry);
- if (accpath == NULL)
- accpath = archive_entry_pathname(entry);
-
- if (!a->follow_symlinks)
- size = extattr_get_link(accpath, namespace, name, NULL, 0);
- else
- size = extattr_get_file(accpath, namespace, name, NULL, 0);
-
- if (size == -1) {
- archive_set_error(&a->archive, errno,
- "Couldn't query extended attribute");
- return (ARCHIVE_WARN);
- }
-
- if (size > 0 && (value = malloc(size)) == NULL) {
- archive_set_error(&a->archive, errno, "Out of memory");
- return (ARCHIVE_FATAL);
- }
-
- if (!a->follow_symlinks)
- size = extattr_get_link(accpath, namespace, name, value, size);
- else
- size = extattr_get_file(accpath, namespace, name, value, size);
-
- if (size == -1) {
- archive_set_error(&a->archive, errno,
- "Couldn't read extended attribute");
- return (ARCHIVE_WARN);
- }
-
- archive_entry_xattr_add_entry(entry, fullname, value, size);
-
- free(value);
- return (ARCHIVE_OK);
-}
-
-static int
-setup_xattrs(struct archive_read_disk *a,
- struct archive_entry *entry, int fd)
-{
- char buff[512];
- char *list, *p;
- ssize_t list_size;
- const char *path;
- int namespace = EXTATTR_NAMESPACE_USER;
-
- path = archive_entry_sourcepath(entry);
- if (path == NULL)
- path = archive_entry_pathname(entry);
-
- if (!a->follow_symlinks)
- list_size = extattr_list_link(path, namespace, NULL, 0);
- else
- list_size = extattr_list_file(path, namespace, NULL, 0);
-
- if (list_size == -1 && errno == EOPNOTSUPP)
- return (ARCHIVE_OK);
- if (list_size == -1) {
- archive_set_error(&a->archive, errno,
- "Couldn't list extended attributes");
- return (ARCHIVE_WARN);
- }
-
- if (list_size == 0)
- return (ARCHIVE_OK);
-
- if ((list = malloc(list_size)) == NULL) {
- archive_set_error(&a->archive, errno, "Out of memory");
- return (ARCHIVE_FATAL);
- }
-
- if (!a->follow_symlinks)
- list_size = extattr_list_link(path, namespace, list, list_size);
- else
- list_size = extattr_list_file(path, namespace, list, list_size);
-
- if (list_size == -1) {
- archive_set_error(&a->archive, errno,
- "Couldn't retrieve extended attributes");
- free(list);
- return (ARCHIVE_WARN);
- }
-
- p = list;
- while ((p - list) < list_size) {
- size_t len = 255 & (int)*p;
- char *name;
-
- strcpy(buff, "user.");
- name = buff + strlen(buff);
- memcpy(name, p + 1, len);
- name[len] = '\0';
- setup_xattr(a, entry, namespace, name, buff, fd);
- p += 1 + len;
- }
-
- free(list);
- return (ARCHIVE_OK);
-}
-
-#else
-
-/*
- * Generic (stub) extended attribute support.
- */
-static int
-setup_xattrs(struct archive_read_disk *a,
- struct archive_entry *entry, int fd)
-{
- (void)a; /* UNUSED */
- (void)entry; /* UNUSED */
- (void)fd; /* UNUSED */
- return (ARCHIVE_OK);
-}
-
-#endif
diff --git a/lib/libarchive/archive_read_extract.c b/lib/libarchive/archive_read_extract.c
deleted file mode 100644
index 8ae5dec..0000000
--- a/lib/libarchive/archive_read_extract.c
+++ /dev/null
@@ -1,180 +0,0 @@
-/*-
- * Copyright (c) 2003-2007 Tim Kientzle
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "archive_platform.h"
-__FBSDID("$FreeBSD$");
-
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-
-#include "archive.h"
-#include "archive_entry.h"
-#include "archive_private.h"
-#include "archive_read_private.h"
-#include "archive_write_disk_private.h"
-
-struct extract {
- struct archive *ad; /* archive_write_disk object */
-
- /* Progress function invoked during extract. */
- void (*extract_progress)(void *);
- void *extract_progress_user_data;
-};
-
-static int archive_read_extract_cleanup(struct archive_read *);
-static int copy_data(struct archive *ar, struct archive *aw);
-static struct extract *get_extract(struct archive_read *);
-
-static struct extract *
-get_extract(struct archive_read *a)
-{
- /* If we haven't initialized, do it now. */
- /* This also sets up a lot of global state. */
- if (a->extract == NULL) {
- a->extract = (struct extract *)malloc(sizeof(*a->extract));
- if (a->extract == NULL) {
- archive_set_error(&a->archive, ENOMEM, "Can't extract");
- return (NULL);
- }
- memset(a->extract, 0, sizeof(*a->extract));
- a->extract->ad = archive_write_disk_new();
- if (a->extract->ad == NULL) {
- archive_set_error(&a->archive, ENOMEM, "Can't extract");
- return (NULL);
- }
- archive_write_disk_set_standard_lookup(a->extract->ad);
- a->cleanup_archive_extract = archive_read_extract_cleanup;
- }
- return (a->extract);
-}
-
-int
-archive_read_extract(struct archive *_a, struct archive_entry *entry, int flags)
-{
- struct extract *extract;
-
- extract = get_extract((struct archive_read *)_a);
- if (extract == NULL)
- return (ARCHIVE_FATAL);
- archive_write_disk_set_options(extract->ad, flags);
- return (archive_read_extract2(_a, entry, extract->ad));
-}
-
-int
-archive_read_extract2(struct archive *_a, struct archive_entry *entry,
- struct archive *ad)
-{
- struct archive_read *a = (struct archive_read *)_a;
- int r, r2;
-
- /* Set up for this particular entry. */
- archive_write_disk_set_skip_file(ad,
- a->skip_file_dev, a->skip_file_ino);
- r = archive_write_header(ad, entry);
- if (r < ARCHIVE_WARN)
- r = ARCHIVE_WARN;
- if (r != ARCHIVE_OK)
- /* If _write_header failed, copy the error. */
- archive_copy_error(&a->archive, ad);
- else if (archive_entry_size(entry) > 0)
- /* Otherwise, pour data into the entry. */
- r = copy_data(_a, ad);
- r2 = archive_write_finish_entry(ad);
- if (r2 < ARCHIVE_WARN)
- r2 = ARCHIVE_WARN;
- /* Use the first message. */
- if (r2 != ARCHIVE_OK && r == ARCHIVE_OK)
- archive_copy_error(&a->archive, ad);
- /* Use the worst error return. */
- if (r2 < r)
- r = r2;
- return (r);
-}
-
-void
-archive_read_extract_set_progress_callback(struct archive *_a,
- void (*progress_func)(void *), void *user_data)
-{
- struct archive_read *a = (struct archive_read *)_a;
- struct extract *extract = get_extract(a);
- if (extract != NULL) {
- extract->extract_progress = progress_func;
- extract->extract_progress_user_data = user_data;
- }
-}
-
-static int
-copy_data(struct archive *ar, struct archive *aw)
-{
- off_t offset;
- const void *buff;
- struct extract *extract;
- size_t size;
- int r;
-
- extract = get_extract((struct archive_read *)ar);
- for (;;) {
- r = archive_read_data_block(ar, &buff, &size, &offset);
- if (r == ARCHIVE_EOF)
- return (ARCHIVE_OK);
- if (r != ARCHIVE_OK)
- return (r);
- r = archive_write_data_block(aw, buff, size, offset);
- if (r < ARCHIVE_WARN)
- r = ARCHIVE_WARN;
- if (r != ARCHIVE_OK) {
- archive_set_error(ar, archive_errno(aw),
- "%s", archive_error_string(aw));
- return (r);
- }
- if (extract->extract_progress)
- (extract->extract_progress)
- (extract->extract_progress_user_data);
- }
-}
-
-/*
- * Cleanup function for archive_extract.
- */
-static int
-archive_read_extract_cleanup(struct archive_read *a)
-{
- int ret = ARCHIVE_OK;
-
- ret = archive_write_free(a->extract->ad);
- free(a->extract);
- a->extract = NULL;
- return (ret);
-}
diff --git a/lib/libarchive/archive_read_support_compression_bzip2.c b/lib/libarchive/archive_read_support_compression_bzip2.c
deleted file mode 100644
index fc419d4..0000000
--- a/lib/libarchive/archive_read_support_compression_bzip2.c
+++ /dev/null
@@ -1,353 +0,0 @@
-/*-
- * Copyright (c) 2003-2007 Tim Kientzle
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "archive_platform.h"
-
-__FBSDID("$FreeBSD$");
-
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#include <stdio.h>
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_BZLIB_H
-#include <bzlib.h>
-#endif
-
-#include "archive.h"
-#include "archive_private.h"
-#include "archive_read_private.h"
-
-#if defined(HAVE_BZLIB_H) && defined(BZ_CONFIG_ERROR)
-struct private_data {
- bz_stream stream;
- char *out_block;
- size_t out_block_size;
- char valid; /* True = decompressor is initialized */
- char eof; /* True = found end of compressed data. */
-};
-
-/* Bzip2 filter */
-static ssize_t bzip2_filter_read(struct archive_read_filter *, const void **);
-static int bzip2_filter_close(struct archive_read_filter *);
-#endif
-
-/*
- * Note that we can detect bzip2 archives even if we can't decompress
- * them. (In fact, we like detecting them because we can give better
- * error messages.) So the bid framework here gets compiled even
- * if bzlib is unavailable.
- */
-static int bzip2_reader_bid(struct archive_read_filter_bidder *, struct archive_read_filter *);
-static int bzip2_reader_init(struct archive_read_filter *);
-static int bzip2_reader_free(struct archive_read_filter_bidder *);
-
-int
-archive_read_support_compression_bzip2(struct archive *_a)
-{
- struct archive_read *a = (struct archive_read *)_a;
- struct archive_read_filter_bidder *reader = __archive_read_get_bidder(a);
-
- if (reader == NULL)
- return (ARCHIVE_FATAL);
-
- reader->data = NULL;
- reader->bid = bzip2_reader_bid;
- reader->init = bzip2_reader_init;
- reader->options = NULL;
- reader->free = bzip2_reader_free;
-#if defined(HAVE_BZLIB_H) && defined(BZ_CONFIG_ERROR)
- return (ARCHIVE_OK);
-#else
- archive_set_error(_a, ARCHIVE_ERRNO_MISC,
- "Using external bunzip2 program");
- return (ARCHIVE_WARN);
-#endif
-}
-
-static int
-bzip2_reader_free(struct archive_read_filter_bidder *self){
- (void)self; /* UNUSED */
- return (ARCHIVE_OK);
-}
-
-/*
- * Test whether we can handle this data.
- *
- * This logic returns zero if any part of the signature fails. It
- * also tries to Do The Right Thing if a very short buffer prevents us
- * from verifying as much as we would like.
- */
-static int
-bzip2_reader_bid(struct archive_read_filter_bidder *self, struct archive_read_filter *filter)
-{
- const unsigned char *buffer;
- ssize_t avail;
- int bits_checked;
-
- (void)self; /* UNUSED */
-
- /* Minimal bzip2 archive is 14 bytes. */
- buffer = __archive_read_filter_ahead(filter, 14, &avail);
- if (buffer == NULL)
- return (0);
-
- /* First three bytes must be "BZh" */
- bits_checked = 0;
- if (buffer[0] != 'B' || buffer[1] != 'Z' || buffer[2] != 'h')
- return (0);
- bits_checked += 24;
-
- /* Next follows a compression flag which must be an ASCII digit. */
- if (buffer[3] < '1' || buffer[3] > '9')
- return (0);
- bits_checked += 5;
-
- /* After BZh[1-9], there must be either a data block
- * which begins with 0x314159265359 or an end-of-data
- * marker of 0x177245385090. */
- if (memcmp(buffer + 4, "\x31\x41\x59\x26\x53\x59", 6) == 0)
- bits_checked += 48;
- else if (memcmp(buffer + 4, "\x17\x72\x45\x38\x50\x90", 6) == 0)
- bits_checked += 48;
- else
- return (0);
-
- return (bits_checked);
-}
-
-#if !defined(HAVE_BZLIB_H) || !defined(BZ_CONFIG_ERROR)
-
-/*
- * If we don't have the library on this system, we can't actually do the
- * decompression. We can, however, still detect compressed archives
- * and emit a useful message.
- */
-static int
-bzip2_reader_init(struct archive_read_filter *self)
-{
- int r;
-
- r = __archive_read_program(self, "bunzip2");
- /* Note: We set the format here even if __archive_read_program()
- * above fails. We do, after all, know what the format is
- * even if we weren't able to read it. */
- self->code = ARCHIVE_COMPRESSION_BZIP2;
- self->name = "bzip2";
- return (r);
-}
-
-
-#else
-
-/*
- * Setup the callbacks.
- */
-static int
-bzip2_reader_init(struct archive_read_filter *self)
-{
- static const size_t out_block_size = 64 * 1024;
- void *out_block;
- struct private_data *state;
-
- self->code = ARCHIVE_COMPRESSION_BZIP2;
- self->name = "bzip2";
-
- state = (struct private_data *)calloc(sizeof(*state), 1);
- out_block = (unsigned char *)malloc(out_block_size);
- if (self == NULL || state == NULL || out_block == NULL) {
- archive_set_error(&self->archive->archive, ENOMEM,
- "Can't allocate data for bzip2 decompression");
- free(out_block);
- free(state);
- return (ARCHIVE_FATAL);
- }
-
- self->data = state;
- state->out_block_size = out_block_size;
- state->out_block = out_block;
- self->read = bzip2_filter_read;
- self->skip = NULL; /* not supported */
- self->close = bzip2_filter_close;
-
- return (ARCHIVE_OK);
-}
-
-/*
- * Return the next block of decompressed data.
- */
-static ssize_t
-bzip2_filter_read(struct archive_read_filter *self, const void **p)
-{
- struct private_data *state;
- size_t decompressed;
- const char *read_buf;
- ssize_t ret;
-
- state = (struct private_data *)self->data;
-
- if (state->eof) {
- *p = NULL;
- return (0);
- }
-
- /* Empty our output buffer. */
- state->stream.next_out = state->out_block;
- state->stream.avail_out = state->out_block_size;
-
- /* Try to fill the output buffer. */
- for (;;) {
- if (!state->valid) {
- if (bzip2_reader_bid(self->bidder, self->upstream) == 0) {
- state->eof = 1;
- *p = state->out_block;
- decompressed = state->stream.next_out
- - state->out_block;
- return (decompressed);
- }
- /* Initialize compression library. */
- ret = BZ2_bzDecompressInit(&(state->stream),
- 0 /* library verbosity */,
- 0 /* don't use low-mem algorithm */);
-
- /* If init fails, try low-memory algorithm instead. */
- if (ret == BZ_MEM_ERROR)
- ret = BZ2_bzDecompressInit(&(state->stream),
- 0 /* library verbosity */,
- 1 /* do use low-mem algo */);
-
- if (ret != BZ_OK) {
- const char *detail = NULL;
- int err = ARCHIVE_ERRNO_MISC;
- switch (ret) {
- case BZ_PARAM_ERROR:
- detail = "invalid setup parameter";
- break;
- case BZ_MEM_ERROR:
- err = ENOMEM;
- detail = "out of memory";
- break;
- case BZ_CONFIG_ERROR:
- detail = "mis-compiled library";
- break;
- }
- archive_set_error(&self->archive->archive, err,
- "Internal error initializing decompressor%s%s",
- detail == NULL ? "" : ": ",
- detail);
- return (ARCHIVE_FATAL);
- }
- state->valid = 1;
- }
-
- /* stream.next_in is really const, but bzlib
- * doesn't declare it so. <sigh> */
- read_buf =
- __archive_read_filter_ahead(self->upstream, 1, &ret);
- if (read_buf == NULL)
- return (ARCHIVE_FATAL);
- state->stream.next_in = (char *)(uintptr_t)read_buf;
- state->stream.avail_in = ret;
- /* There is no more data, return whatever we have. */
- if (ret == 0) {
- state->eof = 1;
- *p = state->out_block;
- decompressed = state->stream.next_out
- - state->out_block;
- return (decompressed);
- }
-
- /* Decompress as much as we can in one pass. */
- ret = BZ2_bzDecompress(&(state->stream));
- __archive_read_filter_consume(self->upstream,
- state->stream.next_in - read_buf);
-
- switch (ret) {
- case BZ_STREAM_END: /* Found end of stream. */
- switch (BZ2_bzDecompressEnd(&(state->stream))) {
- case BZ_OK:
- break;
- default:
- archive_set_error(&(self->archive->archive),
- ARCHIVE_ERRNO_MISC,
- "Failed to clean up decompressor");
- return (ARCHIVE_FATAL);
- }
- state->valid = 0;
- /* FALLTHROUGH */
- case BZ_OK: /* Decompressor made some progress. */
- /* If we filled our buffer, update stats and return. */
- if (state->stream.avail_out == 0) {
- *p = state->out_block;
- decompressed = state->stream.next_out
- - state->out_block;
- return (decompressed);
- }
- break;
- default: /* Return an error. */
- archive_set_error(&self->archive->archive,
- ARCHIVE_ERRNO_MISC, "bzip decompression failed");
- return (ARCHIVE_FATAL);
- }
- }
-}
-
-/*
- * Clean up the decompressor.
- */
-static int
-bzip2_filter_close(struct archive_read_filter *self)
-{
- struct private_data *state;
- int ret = ARCHIVE_OK;
-
- state = (struct private_data *)self->data;
-
- if (state->valid) {
- switch (BZ2_bzDecompressEnd(&state->stream)) {
- case BZ_OK:
- break;
- default:
- archive_set_error(&self->archive->archive,
- ARCHIVE_ERRNO_MISC,
- "Failed to clean up decompressor");
- ret = ARCHIVE_FATAL;
- }
- }
-
- free(state->out_block);
- free(state);
- return (ret);
-}
-
-#endif /* HAVE_BZLIB_H */
diff --git a/lib/libarchive/archive_read_support_compression_rpm.c b/lib/libarchive/archive_read_support_compression_rpm.c
deleted file mode 100644
index f8bd878..0000000
--- a/lib/libarchive/archive_read_support_compression_rpm.c
+++ /dev/null
@@ -1,288 +0,0 @@
-/*-
- * Copyright (c) 2009 Michihiro NAKAJIMA
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "archive_platform.h"
-__FBSDID("$FreeBSD$");
-
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-
-#include "archive.h"
-#include "archive_endian.h"
-#include "archive_private.h"
-#include "archive_read_private.h"
-
-struct rpm {
- int64_t total_in;
- size_t hpos;
- size_t hlen;
- unsigned char header[16];
- enum {
- ST_LEAD, /* Skipping 'Lead' section. */
- ST_HEADER, /* Reading 'Header' section;
- * first 16 bytes. */
- ST_HEADER_DATA, /* Skipping 'Header' section. */
- ST_PADDING, /* Skipping padding data after the
- * 'Header' section. */
- ST_ARCHIVE /* Reading 'Archive' section. */
- } state;
- int first_header;
-};
-#define RPM_LEAD_SIZE 96 /* Size of 'Lead' section. */
-
-static int rpm_bidder_bid(struct archive_read_filter_bidder *,
- struct archive_read_filter *);
-static int rpm_bidder_init(struct archive_read_filter *);
-
-static ssize_t rpm_filter_read(struct archive_read_filter *,
- const void **);
-static int rpm_filter_close(struct archive_read_filter *);
-
-int
-archive_read_support_compression_rpm(struct archive *_a)
-{
- struct archive_read *a = (struct archive_read *)_a;
- struct archive_read_filter_bidder *bidder;
-
- bidder = __archive_read_get_bidder(a);
- archive_clear_error(_a);
- if (bidder == NULL)
- return (ARCHIVE_FATAL);
-
- bidder->data = NULL;
- bidder->bid = rpm_bidder_bid;
- bidder->init = rpm_bidder_init;
- bidder->options = NULL;
- bidder->free = NULL;
- return (ARCHIVE_OK);
-}
-
-static int
-rpm_bidder_bid(struct archive_read_filter_bidder *self,
- struct archive_read_filter *filter)
-{
- const unsigned char *b;
- ssize_t avail;
- int bits_checked;
-
- (void)self; /* UNUSED */
-
- b = __archive_read_filter_ahead(filter, 8, &avail);
- if (b == NULL)
- return (0);
-
- bits_checked = 0;
- /*
- * Verify Header Magic Bytes : 0xed 0xab 0xee 0xdb
- */
- if (b[0] != 0xed)
- return (0);
- bits_checked += 8;
- if (b[1] != 0xab)
- return (0);
- bits_checked += 8;
- if (b[2] != 0xee)
- return (0);
- bits_checked += 8;
- if (b[3] != 0xdb)
- return (0);
- bits_checked += 8;
- /*
- * Check major version.
- */
- if (b[4] != 3 && b[4] != 4)
- return (0);
- bits_checked += 8;
- /*
- * Check package type; binary or source.
- */
- if (b[6] != 0)
- return (0);
- bits_checked += 8;
- if (b[7] != 0 && b[7] != 1)
- return (0);
- bits_checked += 8;
-
- return (bits_checked);
-}
-
-static int
-rpm_bidder_init(struct archive_read_filter *self)
-{
- struct rpm *rpm;
-
- self->code = ARCHIVE_COMPRESSION_RPM;
- self->name = "rpm";
- self->read = rpm_filter_read;
- self->skip = NULL; /* not supported */
- self->close = rpm_filter_close;
-
- rpm = (struct rpm *)calloc(sizeof(*rpm), 1);
- if (rpm == NULL) {
- archive_set_error(&self->archive->archive, ENOMEM,
- "Can't allocate data for rpm");
- return (ARCHIVE_FATAL);
- }
-
- self->data = rpm;
- rpm->state = ST_LEAD;
-
- return (ARCHIVE_OK);
-}
-
-static ssize_t
-rpm_filter_read(struct archive_read_filter *self, const void **buff)
-{
- struct rpm *rpm;
- const unsigned char *b;
- ssize_t avail_in, total;
- size_t used, n;
- uint32_t section;
- uint32_t bytes;
-
- rpm = (struct rpm *)self->data;
- *buff = NULL;
- total = avail_in = 0;
- b = NULL;
- used = 0;
- do {
- if (b == NULL) {
- b = __archive_read_filter_ahead(self->upstream, 1,
- &avail_in);
- if (b == NULL) {
- if (avail_in < 0)
- return (ARCHIVE_FATAL);
- else
- break;
- }
- }
-
- switch (rpm->state) {
- case ST_LEAD:
- if (rpm->total_in + avail_in < RPM_LEAD_SIZE)
- used += avail_in;
- else {
- n = RPM_LEAD_SIZE - rpm->total_in;
- used += n;
- b += n;
- rpm->state = ST_HEADER;
- rpm->hpos = 0;
- rpm->hlen = 0;
- rpm->first_header = 1;
- }
- break;
- case ST_HEADER:
- n = 16 - rpm->hpos;
- if (n > avail_in - used)
- n = avail_in - used;
- memcpy(rpm->header+rpm->hpos, b, n);
- b += n;
- used += n;
- rpm->hpos += n;
-
- if (rpm->hpos == 16) {
- if (rpm->header[0] != 0x8e ||
- rpm->header[1] != 0xad ||
- rpm->header[2] != 0xe8 ||
- rpm->header[3] != 0x01) {
- if (rpm->first_header) {
- archive_set_error(
- &self->archive->archive,
- ARCHIVE_ERRNO_FILE_FORMAT,
- "Unrecoginized rpm header");
- return (ARCHIVE_FATAL);
- }
- rpm->state = ST_ARCHIVE;
- *buff = rpm->header;
- total = rpm->hpos;
- break;
- }
- /* Calculate 'Header' length. */
- section = archive_be32dec(rpm->header+8);
- bytes = archive_be32dec(rpm->header+12);
- rpm->hlen = 16 + section * 16 + bytes;
- rpm->state = ST_HEADER_DATA;
- rpm->first_header = 0;
- }
- break;
- case ST_HEADER_DATA:
- n = rpm->hlen - rpm->hpos;
- if (n > avail_in - used)
- n = avail_in - used;
- b += n;
- used += n;
- rpm->hpos += n;
- if (rpm->hpos == rpm->hlen)
- rpm->state = ST_PADDING;
- break;
- case ST_PADDING:
- while (used < (size_t)avail_in) {
- if (*b != 0) {
- /* Read next header. */
- rpm->state = ST_HEADER;
- rpm->hpos = 0;
- rpm->hlen = 0;
- break;
- }
- b++;
- used++;
- }
- break;
- case ST_ARCHIVE:
- *buff = b;
- total = avail_in;
- used = avail_in;
- break;
- }
- if (used == (size_t)avail_in) {
- rpm->total_in += used;
- __archive_read_filter_consume(self->upstream, used);
- b = NULL;
- used = 0;
- }
- } while (total == 0 && avail_in > 0);
-
- if (used > 0 && b != NULL) {
- rpm->total_in += used;
- __archive_read_filter_consume(self->upstream, used);
- }
- return (total);
-}
-
-static int
-rpm_filter_close(struct archive_read_filter *self)
-{
- struct rpm *rpm;
-
- rpm = (struct rpm *)self->data;
- free(rpm);
-
- return (ARCHIVE_OK);
-}
-
diff --git a/lib/libarchive/archive_read_support_compression_uu.c b/lib/libarchive/archive_read_support_compression_uu.c
deleted file mode 100644
index cb1dae5..0000000
--- a/lib/libarchive/archive_read_support_compression_uu.c
+++ /dev/null
@@ -1,637 +0,0 @@
-/*-
- * Copyright (c) 2009 Michihiro NAKAJIMA
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "archive_platform.h"
-__FBSDID("$FreeBSD$");
-
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-
-#include "archive.h"
-#include "archive_private.h"
-#include "archive_read_private.h"
-
-struct uudecode {
- int64_t total;
- unsigned char *in_buff;
-#define IN_BUFF_SIZE (1024)
- int in_cnt;
- size_t in_allocated;
- unsigned char *out_buff;
-#define OUT_BUFF_SIZE (64 * 1024)
- int state;
-#define ST_FIND_HEAD 0
-#define ST_READ_UU 1
-#define ST_UUEND 2
-#define ST_READ_BASE64 3
-};
-
-static int uudecode_bidder_bid(struct archive_read_filter_bidder *,
- struct archive_read_filter *filter);
-static int uudecode_bidder_init(struct archive_read_filter *);
-
-static ssize_t uudecode_filter_read(struct archive_read_filter *,
- const void **);
-static int uudecode_filter_close(struct archive_read_filter *);
-
-int
-archive_read_support_compression_uu(struct archive *_a)
-{
- struct archive_read *a = (struct archive_read *)_a;
- struct archive_read_filter_bidder *bidder;
-
- bidder = __archive_read_get_bidder(a);
- archive_clear_error(_a);
- if (bidder == NULL)
- return (ARCHIVE_FATAL);
-
- bidder->data = NULL;
- bidder->bid = uudecode_bidder_bid;
- bidder->init = uudecode_bidder_init;
- bidder->options = NULL;
- bidder->free = NULL;
- return (ARCHIVE_OK);
-}
-
-static const unsigned char ascii[256] = {
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '\n', 0, 0, '\r', 0, 0, /* 00 - 0F */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 10 - 1F */
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 20 - 2F */
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 30 - 3F */
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 40 - 4F */
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 50 - 5F */
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 60 - 6F */
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, /* 70 - 7F */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 80 - 8F */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 90 - 9F */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* A0 - AF */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* B0 - BF */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* C0 - CF */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* D0 - DF */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* E0 - EF */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* F0 - FF */
-};
-
-static const unsigned char uuchar[256] = {
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 00 - 0F */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 10 - 1F */
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 20 - 2F */
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 30 - 3F */
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 40 - 4F */
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 50 - 5F */
- 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 60 - 6F */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 70 - 7F */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 80 - 8F */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 90 - 9F */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* A0 - AF */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* B0 - BF */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* C0 - CF */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* D0 - DF */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* E0 - EF */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* F0 - FF */
-};
-
-static const unsigned char base64[256] = {
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 00 - 0F */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 10 - 1F */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, /* 20 - 2F */
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, /* 30 - 3F */
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 40 - 4F */
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, /* 50 - 5F */
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 60 - 6F */
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, /* 70 - 7F */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 80 - 8F */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 90 - 9F */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* A0 - AF */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* B0 - BF */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* C0 - CF */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* D0 - DF */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* E0 - EF */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* F0 - FF */
-};
-
-static const int base64num[128] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, /* 00 - 0F */
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, /* 10 - 1F */
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 62, 0, 0, 0, 63, /* 20 - 2F */
- 52, 53, 54, 55, 56, 57, 58, 59,
- 60, 61, 0, 0, 0, 0, 0, 0, /* 30 - 3F */
- 0, 0, 1, 2, 3, 4, 5, 6,
- 7, 8, 9, 10, 11, 12, 13, 14, /* 40 - 4F */
- 15, 16, 17, 18, 19, 20, 21, 22,
- 23, 24, 25, 0, 0, 0, 0, 0, /* 50 - 5F */
- 0, 26, 27, 28, 29, 30, 31, 32,
- 33, 34, 35, 36, 37, 38, 39, 40, /* 60 - 6F */
- 41, 42, 43, 44, 45, 46, 47, 48,
- 49, 50, 51, 0, 0, 0, 0, 0, /* 70 - 7F */
-};
-
-static ssize_t
-get_line(const unsigned char *b, ssize_t avail, ssize_t *nlsize)
-{
- ssize_t len;
-
- len = 0;
- while (len < avail) {
- switch (ascii[*b]) {
- case 0: /* Non-ascii character or control character. */
- if (nlsize != NULL)
- *nlsize = 0;
- return (-1);
- case '\r':
- if (avail-len > 1 && b[1] == '\n') {
- if (nlsize != NULL)
- *nlsize = 2;
- return (len+2);
- }
- /* FALL THROUGH */
- case '\n':
- if (nlsize != NULL)
- *nlsize = 1;
- return (len+1);
- case 1:
- b++;
- len++;
- break;
- }
- }
- if (nlsize != NULL)
- *nlsize = 0;
- return (avail);
-}
-
-static ssize_t
-bid_get_line(struct archive_read_filter *filter,
- const unsigned char **b, ssize_t *avail, ssize_t *ravail, ssize_t *nl)
-{
- ssize_t len;
- int quit;
-
- quit = 0;
- if (*avail == 0) {
- *nl = 0;
- len = 0;
- } else
- len = get_line(*b, *avail, nl);
- /*
- * Read bytes more while it does not reach the end of line.
- */
- while (*nl == 0 && len == *avail && !quit) {
- ssize_t diff = *ravail - *avail;
-
- *b = __archive_read_filter_ahead(filter, 160 + *ravail, avail);
- if (*b == NULL) {
- if (*ravail >= *avail)
- return (0);
- /* Reading bytes reaches the end of file. */
- *b = __archive_read_filter_ahead(filter, *avail, avail);
- quit = 1;
- }
- *ravail = *avail;
- *b += diff;
- *avail -= diff;
- len = get_line(*b, *avail, nl);
- }
- return (len);
-}
-
-#define UUDECODE(c) (((c) - 0x20) & 0x3f)
-
-static int
-uudecode_bidder_bid(struct archive_read_filter_bidder *self,
- struct archive_read_filter *filter)
-{
- const unsigned char *b;
- ssize_t avail, ravail;
- ssize_t len, nl;
- int l;
- int firstline;
-
- (void)self; /* UNUSED */
-
- b = __archive_read_filter_ahead(filter, 1, &avail);
- if (b == NULL)
- return (0);
-
- firstline = 20;
- ravail = avail;
- for (;;) {
- len = bid_get_line(filter, &b, &avail, &ravail, &nl);
- if (len < 0 || nl == 0)
- return (0);/* Binary data. */
- if (memcmp(b, "begin ", 6) == 0 && len - nl >= 11)
- l = 6;
- else if (memcmp(b, "begin-base64 ", 13) == 0 && len - nl >= 18)
- l = 13;
- else
- l = 0;
-
- if (l > 0 && (b[l] < '0' || b[l] > '7' ||
- b[l+1] < '0' || b[l+1] > '7' ||
- b[l+2] < '0' || b[l+2] > '7' || b[l+3] != ' '))
- l = 0;
-
- b += len;
- avail -= len;
- if (l)
- break;
- firstline = 0;
- }
- if (!avail)
- return (0);
- len = bid_get_line(filter, &b, &avail, &ravail, &nl);
- if (len < 0 || nl == 0)
- return (0);/* There are non-ascii characters. */
- avail -= len;
-
- if (l == 6) {
- if (!uuchar[*b])
- return (0);
- /* Get a length of decoded bytes. */
- l = UUDECODE(*b++); len--;
- if (l > 45)
- /* Normally, maximum length is 45(character 'M'). */
- return (0);
- while (l && len-nl > 0) {
- if (l > 0) {
- if (!uuchar[*b++])
- return (0);
- if (!uuchar[*b++])
- return (0);
- len -= 2;
- --l;
- }
- if (l > 0) {
- if (!uuchar[*b++])
- return (0);
- --len;
- --l;
- }
- if (l > 0) {
- if (!uuchar[*b++])
- return (0);
- --len;
- --l;
- }
- }
- if (len-nl < 0)
- return (0);
- if (len-nl == 1 &&
- (uuchar[*b] || /* Check sum. */
- (*b >= 'a' && *b <= 'z'))) {/* Padding data(MINIX). */
- ++b;
- --len;
- }
- b += nl;
- if (avail && uuchar[*b])
- return (firstline+30);
- }
- if (l == 13) {
- while (len-nl > 0) {
- if (!base64[*b++])
- return (0);
- --len;
- }
- b += nl;
-
- if (avail >= 5 && memcmp(b, "====\n", 5) == 0)
- return (firstline+40);
- if (avail >= 6 && memcmp(b, "====\r\n", 6) == 0)
- return (firstline+40);
- if (avail > 0 && base64[*b])
- return (firstline+30);
- }
-
- return (0);
-}
-
-static int
-uudecode_bidder_init(struct archive_read_filter *self)
-{
- struct uudecode *uudecode;
- void *out_buff;
- void *in_buff;
-
- self->code = ARCHIVE_COMPRESSION_UU;
- self->name = "uu";
- self->read = uudecode_filter_read;
- self->skip = NULL; /* not supported */
- self->close = uudecode_filter_close;
-
- uudecode = (struct uudecode *)calloc(sizeof(*uudecode), 1);
- out_buff = malloc(OUT_BUFF_SIZE);
- in_buff = malloc(IN_BUFF_SIZE);
- if (uudecode == NULL || out_buff == NULL || in_buff == NULL) {
- archive_set_error(&self->archive->archive, ENOMEM,
- "Can't allocate data for uudecode");
- free(uudecode);
- free(out_buff);
- free(in_buff);
- return (ARCHIVE_FATAL);
- }
-
- self->data = uudecode;
- uudecode->in_buff = in_buff;
- uudecode->in_cnt = 0;
- uudecode->in_allocated = IN_BUFF_SIZE;
- uudecode->out_buff = out_buff;
- uudecode->state = ST_FIND_HEAD;
-
- return (ARCHIVE_OK);
-}
-
-static int
-ensure_in_buff_size(struct archive_read_filter *self,
- struct uudecode *uudecode, size_t size)
-{
-
- if (size > uudecode->in_allocated) {
- unsigned char *ptr;
- size_t newsize;
-
- /*
- * Calculate a new buffer size for in_buff.
- * Increase its value until it has enough size we need.
- */
- newsize = uudecode->in_allocated;
- do {
- if (newsize < IN_BUFF_SIZE*32)
- newsize <<= 1;
- else
- newsize += IN_BUFF_SIZE;
- } while (size > newsize);
- ptr = malloc(newsize);
- if (ptr == NULL ||
- newsize < uudecode->in_allocated) {
- free(ptr);
- archive_set_error(&self->archive->archive,
- ENOMEM,
- "Can't allocate data for uudecode");
- return (ARCHIVE_FATAL);
- }
- if (uudecode->in_cnt)
- memmove(ptr, uudecode->in_buff,
- uudecode->in_cnt);
- free(uudecode->in_buff);
- uudecode->in_buff = ptr;
- uudecode->in_allocated = newsize;
- }
- return (ARCHIVE_OK);
-}
-
-static ssize_t
-uudecode_filter_read(struct archive_read_filter *self, const void **buff)
-{
- struct uudecode *uudecode;
- const unsigned char *b, *d;
- unsigned char *out;
- ssize_t avail_in, ravail;
- ssize_t used;
- ssize_t total;
- ssize_t len, llen, nl;
-
- uudecode = (struct uudecode *)self->data;
-
-read_more:
- d = __archive_read_filter_ahead(self->upstream, 1, &avail_in);
- if (d == NULL && avail_in < 0)
- return (ARCHIVE_FATAL);
- /* Quiet a code analyzer; make sure avail_in must be zero
- * when d is NULL. */
- if (d == NULL)
- avail_in = 0;
- used = 0;
- total = 0;
- out = uudecode->out_buff;
- ravail = avail_in;
- if (uudecode->in_cnt) {
- /*
- * If there is remaining data which is saved by
- * previous calling, use it first.
- */
- if (ensure_in_buff_size(self, uudecode,
- avail_in + uudecode->in_cnt) != ARCHIVE_OK)
- return (ARCHIVE_FATAL);
- memcpy(uudecode->in_buff + uudecode->in_cnt,
- d, avail_in);
- d = uudecode->in_buff;
- avail_in += uudecode->in_cnt;
- uudecode->in_cnt = 0;
- }
- for (;used < avail_in; d += llen, used += llen) {
- int l, body;
-
- b = d;
- len = get_line(b, avail_in - used, &nl);
- if (len < 0) {
- /* Non-ascii character is found. */
- archive_set_error(&self->archive->archive,
- ARCHIVE_ERRNO_MISC,
- "Insufficient compressed data");
- return (ARCHIVE_FATAL);
- }
- llen = len;
- if (nl == 0) {
- /*
- * Save remaining data which does not contain
- * NL('\n','\r').
- */
- if (ensure_in_buff_size(self, uudecode, len)
- != ARCHIVE_OK)
- return (ARCHIVE_FATAL);
- if (uudecode->in_buff != b)
- memmove(uudecode->in_buff, b, len);
- uudecode->in_cnt = len;
- if (total == 0) {
- /* Do not return 0; it means end-of-file.
- * We should try to read bytes more. */
- __archive_read_filter_consume(
- self->upstream, ravail);
- goto read_more;
- }
- break;
- }
- if (total + len * 2 > OUT_BUFF_SIZE)
- break;
- switch (uudecode->state) {
- default:
- case ST_FIND_HEAD:
- if (len - nl > 13 && memcmp(b, "begin ", 6) == 0)
- l = 6;
- else if (len - nl > 18 &&
- memcmp(b, "begin-base64 ", 13) == 0)
- l = 13;
- else
- l = 0;
- if (l != 0 && b[l] >= '0' && b[l] <= '7' &&
- b[l+1] >= '0' && b[l+1] <= '7' &&
- b[l+2] >= '0' && b[l+2] <= '7' && b[l+3] == ' ') {
- if (l == 6)
- uudecode->state = ST_READ_UU;
- else
- uudecode->state = ST_READ_BASE64;
- }
- break;
- case ST_READ_UU:
- body = len - nl;
- if (!uuchar[*b] || body <= 0) {
- archive_set_error(&self->archive->archive,
- ARCHIVE_ERRNO_MISC,
- "Insufficient compressed data");
- return (ARCHIVE_FATAL);
- }
- /* Get length of undecoded bytes of curent line. */
- l = UUDECODE(*b++);
- body--;
- if (l > body) {
- archive_set_error(&self->archive->archive,
- ARCHIVE_ERRNO_MISC,
- "Insufficient compressed data");
- return (ARCHIVE_FATAL);
- }
- if (l == 0) {
- uudecode->state = ST_UUEND;
- break;
- }
- while (l > 0) {
- int n = 0;
-
- if (l > 0) {
- if (!uuchar[b[0]] || !uuchar[b[1]])
- break;
- n = UUDECODE(*b++) << 18;
- n |= UUDECODE(*b++) << 12;
- *out++ = n >> 16; total++;
- --l;
- }
- if (l > 0) {
- if (!uuchar[b[0]])
- break;
- n |= UUDECODE(*b++) << 6;
- *out++ = (n >> 8) & 0xFF; total++;
- --l;
- }
- if (l > 0) {
- if (!uuchar[b[0]])
- break;
- n |= UUDECODE(*b++);
- *out++ = n & 0xFF; total++;
- --l;
- }
- }
- if (l) {
- archive_set_error(&self->archive->archive,
- ARCHIVE_ERRNO_MISC,
- "Insufficient compressed data");
- return (ARCHIVE_FATAL);
- }
- break;
- case ST_UUEND:
- if (len - nl == 3 && memcmp(b, "end ", 3) == 0)
- uudecode->state = ST_FIND_HEAD;
- else {
- archive_set_error(&self->archive->archive,
- ARCHIVE_ERRNO_MISC,
- "Insufficient compressed data");
- return (ARCHIVE_FATAL);
- }
- break;
- case ST_READ_BASE64:
- l = len - nl;
- if (l >= 3 && b[0] == '=' && b[1] == '=' &&
- b[2] == '=') {
- uudecode->state = ST_FIND_HEAD;
- break;
- }
- while (l > 0) {
- int n = 0;
-
- if (l > 0) {
- if (!base64[b[0]] || !base64[b[1]])
- break;
- n = base64num[*b++] << 18;
- n |= base64num[*b++] << 12;
- *out++ = n >> 16; total++;
- l -= 2;
- }
- if (l > 0) {
- if (*b == '=')
- break;
- if (!base64[*b])
- break;
- n |= base64num[*b++] << 6;
- *out++ = (n >> 8) & 0xFF; total++;
- --l;
- }
- if (l > 0) {
- if (*b == '=')
- break;
- if (!base64[*b])
- break;
- n |= base64num[*b++];
- *out++ = n & 0xFF; total++;
- --l;
- }
- }
- if (l && *b != '=') {
- archive_set_error(&self->archive->archive,
- ARCHIVE_ERRNO_MISC,
- "Insufficient compressed data");
- return (ARCHIVE_FATAL);
- }
- break;
- }
- }
-
- __archive_read_filter_consume(self->upstream, ravail);
-
- *buff = uudecode->out_buff;
- uudecode->total += total;
- return (total);
-}
-
-static int
-uudecode_filter_close(struct archive_read_filter *self)
-{
- struct uudecode *uudecode;
-
- uudecode = (struct uudecode *)self->data;
- free(uudecode->in_buff);
- free(uudecode->out_buff);
- free(uudecode);
-
- return (ARCHIVE_OK);
-}
-
diff --git a/lib/libarchive/archive_read_support_format_all.c b/lib/libarchive/archive_read_support_format_all.c
deleted file mode 100644
index 69d16fc..0000000
--- a/lib/libarchive/archive_read_support_format_all.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/*-
- * Copyright (c) 2003-2007 Tim Kientzle
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "archive_platform.h"
-__FBSDID("$FreeBSD$");
-
-#include "archive.h"
-
-int
-archive_read_support_format_all(struct archive *a)
-{
- archive_read_support_format_ar(a);
- archive_read_support_format_cpio(a);
- archive_read_support_format_empty(a);
- archive_read_support_format_iso9660(a);
- archive_read_support_format_mtree(a);
- archive_read_support_format_tar(a);
- archive_read_support_format_xar(a);
- archive_read_support_format_zip(a);
- return (ARCHIVE_OK);
-}
diff --git a/lib/libarchive/archive_read_support_format_cpio.c b/lib/libarchive/archive_read_support_format_cpio.c
deleted file mode 100644
index 24f3d35..0000000
--- a/lib/libarchive/archive_read_support_format_cpio.c
+++ /dev/null
@@ -1,777 +0,0 @@
-/*-
- * Copyright (c) 2003-2007 Tim Kientzle
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "archive_platform.h"
-__FBSDID("$FreeBSD$");
-
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-/* #include <stdint.h> */ /* See archive_platform.h */
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-
-#include "archive.h"
-#include "archive_entry.h"
-#include "archive_private.h"
-#include "archive_read_private.h"
-
-struct cpio_bin_header {
- unsigned char c_magic[2];
- unsigned char c_dev[2];
- unsigned char c_ino[2];
- unsigned char c_mode[2];
- unsigned char c_uid[2];
- unsigned char c_gid[2];
- unsigned char c_nlink[2];
- unsigned char c_rdev[2];
- unsigned char c_mtime[4];
- unsigned char c_namesize[2];
- unsigned char c_filesize[4];
-} __packed;
-
-struct cpio_odc_header {
- char c_magic[6];
- char c_dev[6];
- char c_ino[6];
- char c_mode[6];
- char c_uid[6];
- char c_gid[6];
- char c_nlink[6];
- char c_rdev[6];
- char c_mtime[11];
- char c_namesize[6];
- char c_filesize[11];
-} __packed;
-
-struct cpio_newc_header {
- char c_magic[6];
- char c_ino[8];
- char c_mode[8];
- char c_uid[8];
- char c_gid[8];
- char c_nlink[8];
- char c_mtime[8];
- char c_filesize[8];
- char c_devmajor[8];
- char c_devminor[8];
- char c_rdevmajor[8];
- char c_rdevminor[8];
- char c_namesize[8];
- char c_crc[8];
-} __packed;
-
-struct links_entry {
- struct links_entry *next;
- struct links_entry *previous;
- int links;
- dev_t dev;
- int64_t ino;
- char *name;
-};
-
-#define CPIO_MAGIC 0x13141516
-struct cpio {
- int magic;
- int (*read_header)(struct archive_read *, struct cpio *,
- struct archive_entry *, size_t *, size_t *);
- struct links_entry *links_head;
- struct archive_string entry_name;
- struct archive_string entry_linkname;
- off_t entry_bytes_remaining;
- off_t entry_offset;
- off_t entry_padding;
-};
-
-static int64_t atol16(const char *, unsigned);
-static int64_t atol8(const char *, unsigned);
-static int archive_read_format_cpio_bid(struct archive_read *);
-static int archive_read_format_cpio_cleanup(struct archive_read *);
-static int archive_read_format_cpio_read_data(struct archive_read *,
- const void **, size_t *, off_t *);
-static int archive_read_format_cpio_read_header(struct archive_read *,
- struct archive_entry *);
-static int be4(const unsigned char *);
-static int find_odc_header(struct archive_read *);
-static int find_newc_header(struct archive_read *);
-static int header_bin_be(struct archive_read *, struct cpio *,
- struct archive_entry *, size_t *, size_t *);
-static int header_bin_le(struct archive_read *, struct cpio *,
- struct archive_entry *, size_t *, size_t *);
-static int header_newc(struct archive_read *, struct cpio *,
- struct archive_entry *, size_t *, size_t *);
-static int header_odc(struct archive_read *, struct cpio *,
- struct archive_entry *, size_t *, size_t *);
-static int is_octal(const char *, size_t);
-static int is_hex(const char *, size_t);
-static int le4(const unsigned char *);
-static void record_hardlink(struct cpio *cpio, struct archive_entry *entry);
-
-int
-archive_read_support_format_cpio(struct archive *_a)
-{
- struct archive_read *a = (struct archive_read *)_a;
- struct cpio *cpio;
- int r;
-
- cpio = (struct cpio *)malloc(sizeof(*cpio));
- if (cpio == NULL) {
- archive_set_error(&a->archive, ENOMEM, "Can't allocate cpio data");
- return (ARCHIVE_FATAL);
- }
- memset(cpio, 0, sizeof(*cpio));
- cpio->magic = CPIO_MAGIC;
-
- r = __archive_read_register_format(a,
- cpio,
- "cpio",
- archive_read_format_cpio_bid,
- NULL,
- archive_read_format_cpio_read_header,
- archive_read_format_cpio_read_data,
- NULL,
- archive_read_format_cpio_cleanup);
-
- if (r != ARCHIVE_OK)
- free(cpio);
- return (ARCHIVE_OK);
-}
-
-
-static int
-archive_read_format_cpio_bid(struct archive_read *a)
-{
- const void *h;
- const unsigned char *p;
- struct cpio *cpio;
- int bid;
-
- cpio = (struct cpio *)(a->format->data);
-
- if ((h = __archive_read_ahead(a, 6, NULL)) == NULL)
- return (-1);
-
- p = (const unsigned char *)h;
- bid = 0;
- if (memcmp(p, "070707", 6) == 0) {
- /* ASCII cpio archive (odc, POSIX.1) */
- cpio->read_header = header_odc;
- bid += 48;
- /*
- * XXX TODO: More verification; Could check that only octal
- * digits appear in appropriate header locations. XXX
- */
- } else if (memcmp(p, "070701", 6) == 0) {
- /* ASCII cpio archive (SVR4 without CRC) */
- cpio->read_header = header_newc;
- bid += 48;
- /*
- * XXX TODO: More verification; Could check that only hex
- * digits appear in appropriate header locations. XXX
- */
- } else if (memcmp(p, "070702", 6) == 0) {
- /* ASCII cpio archive (SVR4 with CRC) */
- /* XXX TODO: Flag that we should check the CRC. XXX */
- cpio->read_header = header_newc;
- bid += 48;
- /*
- * XXX TODO: More verification; Could check that only hex
- * digits appear in appropriate header locations. XXX
- */
- } else if (p[0] * 256 + p[1] == 070707) {
- /* big-endian binary cpio archives */
- cpio->read_header = header_bin_be;
- bid += 16;
- /* Is more verification possible here? */
- } else if (p[0] + p[1] * 256 == 070707) {
- /* little-endian binary cpio archives */
- cpio->read_header = header_bin_le;
- bid += 16;
- /* Is more verification possible here? */
- } else
- return (ARCHIVE_WARN);
-
- return (bid);
-}
-
-static int
-archive_read_format_cpio_read_header(struct archive_read *a,
- struct archive_entry *entry)
-{
- struct cpio *cpio;
- const void *h;
- size_t namelength;
- size_t name_pad;
- int r;
-
- cpio = (struct cpio *)(a->format->data);
- r = (cpio->read_header(a, cpio, entry, &namelength, &name_pad));
-
- if (r < ARCHIVE_WARN)
- return (r);
-
- /* Read name from buffer. */
- h = __archive_read_ahead(a, namelength + name_pad, NULL);
- if (h == NULL)
- return (ARCHIVE_FATAL);
- __archive_read_consume(a, namelength + name_pad);
- archive_strncpy(&cpio->entry_name, (const char *)h, namelength);
- archive_entry_set_pathname(entry, cpio->entry_name.s);
- cpio->entry_offset = 0;
-
- /* If this is a symlink, read the link contents. */
- if (archive_entry_filetype(entry) == AE_IFLNK) {
- h = __archive_read_ahead(a, cpio->entry_bytes_remaining, NULL);
- if (h == NULL)
- return (ARCHIVE_FATAL);
- __archive_read_consume(a, cpio->entry_bytes_remaining);
- archive_strncpy(&cpio->entry_linkname, (const char *)h,
- cpio->entry_bytes_remaining);
- archive_entry_set_symlink(entry, cpio->entry_linkname.s);
- cpio->entry_bytes_remaining = 0;
- }
-
- /* XXX TODO: If the full mode is 0160200, then this is a Solaris
- * ACL description for the following entry. Read this body
- * and parse it as a Solaris-style ACL, then read the next
- * header. XXX */
-
- /* Compare name to "TRAILER!!!" to test for end-of-archive. */
- if (namelength == 11 && strcmp((const char *)h, "TRAILER!!!") == 0) {
- /* TODO: Store file location of start of block. */
- archive_set_error(&a->archive, 0, NULL);
- return (ARCHIVE_EOF);
- }
-
- /* Detect and record hardlinks to previously-extracted entries. */
- record_hardlink(cpio, entry);
-
- return (r);
-}
-
-static int
-archive_read_format_cpio_read_data(struct archive_read *a,
- const void **buff, size_t *size, off_t *offset)
-{
- ssize_t bytes_read;
- struct cpio *cpio;
-
- cpio = (struct cpio *)(a->format->data);
- if (cpio->entry_bytes_remaining > 0) {
- *buff = __archive_read_ahead(a, 1, &bytes_read);
- if (bytes_read <= 0)
- return (ARCHIVE_FATAL);
- if (bytes_read > cpio->entry_bytes_remaining)
- bytes_read = cpio->entry_bytes_remaining;
- *size = bytes_read;
- *offset = cpio->entry_offset;
- cpio->entry_offset += bytes_read;
- cpio->entry_bytes_remaining -= bytes_read;
- __archive_read_consume(a, bytes_read);
- return (ARCHIVE_OK);
- } else {
- while (cpio->entry_padding > 0) {
- *buff = __archive_read_ahead(a, 1, &bytes_read);
- if (bytes_read <= 0)
- return (ARCHIVE_FATAL);
- if (bytes_read > cpio->entry_padding)
- bytes_read = cpio->entry_padding;
- __archive_read_consume(a, bytes_read);
- cpio->entry_padding -= bytes_read;
- }
- *buff = NULL;
- *size = 0;
- *offset = cpio->entry_offset;
- return (ARCHIVE_EOF);
- }
-}
-
-/*
- * Skip forward to the next cpio newc header by searching for the
- * 07070[12] string. This should be generalized and merged with
- * find_odc_header below.
- */
-static int
-is_hex(const char *p, size_t len)
-{
- while (len-- > 0) {
- if ((*p >= '0' && *p <= '9')
- || (*p >= 'a' && *p <= 'f')
- || (*p >= 'A' && *p <= 'F'))
- ++p;
- else
- return (0);
- }
- return (1);
-}
-
-static int
-find_newc_header(struct archive_read *a)
-{
- const void *h;
- const char *p, *q;
- size_t skip, skipped = 0;
- ssize_t bytes;
-
- for (;;) {
- h = __archive_read_ahead(a, sizeof(struct cpio_newc_header), &bytes);
- if (h == NULL)
- return (ARCHIVE_FATAL);
- p = h;
- q = p + bytes;
-
- /* Try the typical case first, then go into the slow search.*/
- if (memcmp("07070", p, 5) == 0
- && (p[5] == '1' || p[5] == '2')
- && is_hex(p, sizeof(struct cpio_newc_header)))
- return (ARCHIVE_OK);
-
- /*
- * Scan ahead until we find something that looks
- * like an odc header.
- */
- while (p + sizeof(struct cpio_newc_header) <= q) {
- switch (p[5]) {
- case '1':
- case '2':
- if (memcmp("07070", p, 5) == 0
- && is_hex(p, sizeof(struct cpio_newc_header))) {
- skip = p - (const char *)h;
- __archive_read_consume(a, skip);
- skipped += skip;
- if (skipped > 0) {
- archive_set_error(&a->archive,
- 0,
- "Skipped %d bytes before "
- "finding valid header",
- (int)skipped);
- return (ARCHIVE_WARN);
- }
- return (ARCHIVE_OK);
- }
- p += 2;
- break;
- case '0':
- p++;
- break;
- default:
- p += 6;
- break;
- }
- }
- skip = p - (const char *)h;
- __archive_read_consume(a, skip);
- skipped += skip;
- }
-}
-
-static int
-header_newc(struct archive_read *a, struct cpio *cpio,
- struct archive_entry *entry, size_t *namelength, size_t *name_pad)
-{
- const void *h;
- const struct cpio_newc_header *header;
- int r;
-
- r = find_newc_header(a);
- if (r < ARCHIVE_WARN)
- return (r);
-
- /* Read fixed-size portion of header. */
- h = __archive_read_ahead(a, sizeof(struct cpio_newc_header), NULL);
- if (h == NULL)
- return (ARCHIVE_FATAL);
- __archive_read_consume(a, sizeof(struct cpio_newc_header));
-
- /* Parse out hex fields. */
- header = (const struct cpio_newc_header *)h;
-
- if (memcmp(header->c_magic, "070701", 6) == 0) {
- a->archive.archive_format = ARCHIVE_FORMAT_CPIO_SVR4_NOCRC;
- a->archive.archive_format_name = "ASCII cpio (SVR4 with no CRC)";
- } else if (memcmp(header->c_magic, "070702", 6) == 0) {
- a->archive.archive_format = ARCHIVE_FORMAT_CPIO_SVR4_CRC;
- a->archive.archive_format_name = "ASCII cpio (SVR4 with CRC)";
- } else {
- /* TODO: Abort here? */
- }
-
- archive_entry_set_devmajor(entry, atol16(header->c_devmajor, sizeof(header->c_devmajor)));
- archive_entry_set_devminor(entry, atol16(header->c_devminor, sizeof(header->c_devminor)));
- archive_entry_set_ino(entry, atol16(header->c_ino, sizeof(header->c_ino)));
- archive_entry_set_mode(entry, atol16(header->c_mode, sizeof(header->c_mode)));
- archive_entry_set_uid(entry, atol16(header->c_uid, sizeof(header->c_uid)));
- archive_entry_set_gid(entry, atol16(header->c_gid, sizeof(header->c_gid)));
- archive_entry_set_nlink(entry, atol16(header->c_nlink, sizeof(header->c_nlink)));
- archive_entry_set_rdevmajor(entry, atol16(header->c_rdevmajor, sizeof(header->c_rdevmajor)));
- archive_entry_set_rdevminor(entry, atol16(header->c_rdevminor, sizeof(header->c_rdevminor)));
- archive_entry_set_mtime(entry, atol16(header->c_mtime, sizeof(header->c_mtime)), 0);
- *namelength = atol16(header->c_namesize, sizeof(header->c_namesize));
- /* Pad name to 2 more than a multiple of 4. */
- *name_pad = (2 - *namelength) & 3;
-
- /*
- * Note: entry_bytes_remaining is at least 64 bits and
- * therefore guaranteed to be big enough for a 33-bit file
- * size.
- */
- cpio->entry_bytes_remaining =
- atol16(header->c_filesize, sizeof(header->c_filesize));
- archive_entry_set_size(entry, cpio->entry_bytes_remaining);
- /* Pad file contents to a multiple of 4. */
- cpio->entry_padding = 3 & -cpio->entry_bytes_remaining;
- return (r);
-}
-
-/*
- * Skip forward to the next cpio odc header by searching for the
- * 070707 string. This is a hand-optimized search that could
- * probably be easily generalized to handle all character-based
- * cpio variants.
- */
-static int
-is_octal(const char *p, size_t len)
-{
- while (len-- > 0) {
- if (*p < '0' || *p > '7')
- return (0);
- ++p;
- }
- return (1);
-}
-
-static int
-find_odc_header(struct archive_read *a)
-{
- const void *h;
- const char *p, *q;
- size_t skip, skipped = 0;
- ssize_t bytes;
-
- for (;;) {
- h = __archive_read_ahead(a, sizeof(struct cpio_odc_header), &bytes);
- if (h == NULL)
- return (ARCHIVE_FATAL);
- p = h;
- q = p + bytes;
-
- /* Try the typical case first, then go into the slow search.*/
- if (memcmp("070707", p, 6) == 0
- && is_octal(p, sizeof(struct cpio_odc_header)))
- return (ARCHIVE_OK);
-
- /*
- * Scan ahead until we find something that looks
- * like an odc header.
- */
- while (p + sizeof(struct cpio_odc_header) <= q) {
- switch (p[5]) {
- case '7':
- if (memcmp("070707", p, 6) == 0
- && is_octal(p, sizeof(struct cpio_odc_header))) {
- skip = p - (const char *)h;
- __archive_read_consume(a, skip);
- skipped += skip;
- if (skipped > 0) {
- archive_set_error(&a->archive,
- 0,
- "Skipped %d bytes before "
- "finding valid header",
- (int)skipped);
- return (ARCHIVE_WARN);
- }
- return (ARCHIVE_OK);
- }
- p += 2;
- break;
- case '0':
- p++;
- break;
- default:
- p += 6;
- break;
- }
- }
- skip = p - (const char *)h;
- __archive_read_consume(a, skip);
- skipped += skip;
- }
-}
-
-static int
-header_odc(struct archive_read *a, struct cpio *cpio,
- struct archive_entry *entry, size_t *namelength, size_t *name_pad)
-{
- const void *h;
- int r;
- const struct cpio_odc_header *header;
-
- a->archive.archive_format = ARCHIVE_FORMAT_CPIO_POSIX;
- a->archive.archive_format_name = "POSIX octet-oriented cpio";
-
- /* Find the start of the next header. */
- r = find_odc_header(a);
- if (r < ARCHIVE_WARN)
- return (r);
-
- /* Read fixed-size portion of header. */
- h = __archive_read_ahead(a, sizeof(struct cpio_odc_header), NULL);
- if (h == NULL)
- return (ARCHIVE_FATAL);
- __archive_read_consume(a, sizeof(struct cpio_odc_header));
-
- /* Parse out octal fields. */
- header = (const struct cpio_odc_header *)h;
-
- archive_entry_set_dev(entry, atol8(header->c_dev, sizeof(header->c_dev)));
- archive_entry_set_ino(entry, atol8(header->c_ino, sizeof(header->c_ino)));
- archive_entry_set_mode(entry, atol8(header->c_mode, sizeof(header->c_mode)));
- archive_entry_set_uid(entry, atol8(header->c_uid, sizeof(header->c_uid)));
- archive_entry_set_gid(entry, atol8(header->c_gid, sizeof(header->c_gid)));
- archive_entry_set_nlink(entry, atol8(header->c_nlink, sizeof(header->c_nlink)));
- archive_entry_set_rdev(entry, atol8(header->c_rdev, sizeof(header->c_rdev)));
- archive_entry_set_mtime(entry, atol8(header->c_mtime, sizeof(header->c_mtime)), 0);
- *namelength = atol8(header->c_namesize, sizeof(header->c_namesize));
- *name_pad = 0; /* No padding of filename. */
-
- /*
- * Note: entry_bytes_remaining is at least 64 bits and
- * therefore guaranteed to be big enough for a 33-bit file
- * size.
- */
- cpio->entry_bytes_remaining =
- atol8(header->c_filesize, sizeof(header->c_filesize));
- archive_entry_set_size(entry, cpio->entry_bytes_remaining);
- cpio->entry_padding = 0;
- return (r);
-}
-
-static int
-header_bin_le(struct archive_read *a, struct cpio *cpio,
- struct archive_entry *entry, size_t *namelength, size_t *name_pad)
-{
- const void *h;
- const struct cpio_bin_header *header;
-
- a->archive.archive_format = ARCHIVE_FORMAT_CPIO_BIN_LE;
- a->archive.archive_format_name = "cpio (little-endian binary)";
-
- /* Read fixed-size portion of header. */
- h = __archive_read_ahead(a, sizeof(struct cpio_bin_header), NULL);
- if (h == NULL)
- return (ARCHIVE_FATAL);
- __archive_read_consume(a, sizeof(struct cpio_bin_header));
-
- /* Parse out binary fields. */
- header = (const struct cpio_bin_header *)h;
-
- archive_entry_set_dev(entry, header->c_dev[0] + header->c_dev[1] * 256);
- archive_entry_set_ino(entry, header->c_ino[0] + header->c_ino[1] * 256);
- archive_entry_set_mode(entry, header->c_mode[0] + header->c_mode[1] * 256);
- archive_entry_set_uid(entry, header->c_uid[0] + header->c_uid[1] * 256);
- archive_entry_set_gid(entry, header->c_gid[0] + header->c_gid[1] * 256);
- archive_entry_set_nlink(entry, header->c_nlink[0] + header->c_nlink[1] * 256);
- archive_entry_set_rdev(entry, header->c_rdev[0] + header->c_rdev[1] * 256);
- archive_entry_set_mtime(entry, le4(header->c_mtime), 0);
- *namelength = header->c_namesize[0] + header->c_namesize[1] * 256;
- *name_pad = *namelength & 1; /* Pad to even. */
-
- cpio->entry_bytes_remaining = le4(header->c_filesize);
- archive_entry_set_size(entry, cpio->entry_bytes_remaining);
- cpio->entry_padding = cpio->entry_bytes_remaining & 1; /* Pad to even. */
- return (ARCHIVE_OK);
-}
-
-static int
-header_bin_be(struct archive_read *a, struct cpio *cpio,
- struct archive_entry *entry, size_t *namelength, size_t *name_pad)
-{
- const void *h;
- const struct cpio_bin_header *header;
-
- a->archive.archive_format = ARCHIVE_FORMAT_CPIO_BIN_BE;
- a->archive.archive_format_name = "cpio (big-endian binary)";
-
- /* Read fixed-size portion of header. */
- h = __archive_read_ahead(a, sizeof(struct cpio_bin_header), NULL);
- if (h == NULL)
- return (ARCHIVE_FATAL);
- __archive_read_consume(a, sizeof(struct cpio_bin_header));
-
- /* Parse out binary fields. */
- header = (const struct cpio_bin_header *)h;
- archive_entry_set_dev(entry, header->c_dev[0] * 256 + header->c_dev[1]);
- archive_entry_set_ino(entry, header->c_ino[0] * 256 + header->c_ino[1]);
- archive_entry_set_mode(entry, header->c_mode[0] * 256 + header->c_mode[1]);
- archive_entry_set_uid(entry, header->c_uid[0] * 256 + header->c_uid[1]);
- archive_entry_set_gid(entry, header->c_gid[0] * 256 + header->c_gid[1]);
- archive_entry_set_nlink(entry, header->c_nlink[0] * 256 + header->c_nlink[1]);
- archive_entry_set_rdev(entry, header->c_rdev[0] * 256 + header->c_rdev[1]);
- archive_entry_set_mtime(entry, be4(header->c_mtime), 0);
- *namelength = header->c_namesize[0] * 256 + header->c_namesize[1];
- *name_pad = *namelength & 1; /* Pad to even. */
-
- cpio->entry_bytes_remaining = be4(header->c_filesize);
- archive_entry_set_size(entry, cpio->entry_bytes_remaining);
- cpio->entry_padding = cpio->entry_bytes_remaining & 1; /* Pad to even. */
- return (ARCHIVE_OK);
-}
-
-static int
-archive_read_format_cpio_cleanup(struct archive_read *a)
-{
- struct cpio *cpio;
-
- cpio = (struct cpio *)(a->format->data);
- /* Free inode->name map */
- while (cpio->links_head != NULL) {
- struct links_entry *lp = cpio->links_head->next;
-
- if (cpio->links_head->name)
- free(cpio->links_head->name);
- free(cpio->links_head);
- cpio->links_head = lp;
- }
- archive_string_free(&cpio->entry_name);
- free(cpio);
- (a->format->data) = NULL;
- return (ARCHIVE_OK);
-}
-
-static int
-le4(const unsigned char *p)
-{
- return ((p[0]<<16) + (p[1]<<24) + (p[2]<<0) + (p[3]<<8));
-}
-
-
-static int
-be4(const unsigned char *p)
-{
- return ((p[0]<<24) + (p[1]<<16) + (p[2]<<8) + (p[3]));
-}
-
-/*
- * Note that this implementation does not (and should not!) obey
- * locale settings; you cannot simply substitute strtol here, since
- * it does obey locale.
- */
-static int64_t
-atol8(const char *p, unsigned char_cnt)
-{
- int64_t l;
- int digit;
-
- l = 0;
- while (char_cnt-- > 0) {
- if (*p >= '0' && *p <= '7')
- digit = *p - '0';
- else
- return (l);
- p++;
- l <<= 3;
- l |= digit;
- }
- return (l);
-}
-
-static int64_t
-atol16(const char *p, unsigned char_cnt)
-{
- int64_t l;
- int digit;
-
- l = 0;
- while (char_cnt-- > 0) {
- if (*p >= 'a' && *p <= 'f')
- digit = *p - 'a' + 10;
- else if (*p >= 'A' && *p <= 'F')
- digit = *p - 'A' + 10;
- else if (*p >= '0' && *p <= '9')
- digit = *p - '0';
- else
- return (l);
- p++;
- l <<= 4;
- l |= digit;
- }
- return (l);
-}
-
-static void
-record_hardlink(struct cpio *cpio, struct archive_entry *entry)
-{
- struct links_entry *le;
- dev_t dev;
- int64_t ino;
-
- if (archive_entry_nlink(entry) <= 1)
- return;
-
- dev = archive_entry_dev(entry);
- ino = archive_entry_ino64(entry);
-
- /*
- * First look in the list of multiply-linked files. If we've
- * already dumped it, convert this entry to a hard link entry.
- */
- for (le = cpio->links_head; le; le = le->next) {
- if (le->dev == dev && le->ino == ino) {
- archive_entry_copy_hardlink(entry, le->name);
-
- if (--le->links <= 0) {
- if (le->previous != NULL)
- le->previous->next = le->next;
- if (le->next != NULL)
- le->next->previous = le->previous;
- if (cpio->links_head == le)
- cpio->links_head = le->next;
- free(le->name);
- free(le);
- }
-
- return;
- }
- }
-
- le = (struct links_entry *)malloc(sizeof(struct links_entry));
- if (le == NULL)
- __archive_errx(1, "Out of memory adding file to list");
- if (cpio->links_head != NULL)
- cpio->links_head->previous = le;
- le->next = cpio->links_head;
- le->previous = NULL;
- cpio->links_head = le;
- le->dev = dev;
- le->ino = ino;
- le->links = archive_entry_nlink(entry) - 1;
- le->name = strdup(archive_entry_pathname(entry));
- if (le->name == NULL)
- __archive_errx(1, "Out of memory adding file to list");
-}
diff --git a/lib/libarchive/archive_read_support_format_iso9660.c b/lib/libarchive/archive_read_support_format_iso9660.c
deleted file mode 100644
index 0216461..0000000
--- a/lib/libarchive/archive_read_support_format_iso9660.c
+++ /dev/null
@@ -1,2956 +0,0 @@
-/*-
- * Copyright (c) 2003-2007 Tim Kientzle
- * Copyright (c) 2009 Andreas Henriksson <andreas@fatal.se>
- * Copyright (c) 2009-2011 Michihiro NAKAJIMA
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "archive_platform.h"
-__FBSDID("$FreeBSD$");
-
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-/* #include <stdint.h> */ /* See archive_platform.h */
-#include <stdio.h>
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-#include <time.h>
-#ifdef HAVE_ZLIB_H
-#include <zlib.h>
-#endif
-
-#include "archive.h"
-#include "archive_endian.h"
-#include "archive_entry.h"
-#include "archive_private.h"
-#include "archive_read_private.h"
-#include "archive_string.h"
-
-/*
- * An overview of ISO 9660 format:
- *
- * Each disk is laid out as follows:
- * * 32k reserved for private use
- * * Volume descriptor table. Each volume descriptor
- * is 2k and specifies basic format information.
- * The "Primary Volume Descriptor" (PVD) is defined by the
- * standard and should always be present; other volume
- * descriptors include various vendor-specific extensions.
- * * Files and directories. Each file/dir is specified by
- * an "extent" (starting sector and length in bytes).
- * Dirs are just files with directory records packed one
- * after another. The PVD contains a single dir entry
- * specifying the location of the root directory. Everything
- * else follows from there.
- *
- * This module works by first reading the volume descriptors, then
- * building a list of directory entries, sorted by starting
- * sector. At each step, I look for the earliest dir entry that
- * hasn't yet been read, seek forward to that location and read
- * that entry. If it's a dir, I slurp in the new dir entries and
- * add them to the heap; if it's a regular file, I return the
- * corresponding archive_entry and wait for the client to request
- * the file body. This strategy allows us to read most compliant
- * CDs with a single pass through the data, as required by libarchive.
- */
-#define LOGICAL_BLOCK_SIZE 2048
-#define SYSTEM_AREA_BLOCK 16
-
-/* Structure of on-disk primary volume descriptor. */
-#define PVD_type_offset 0
-#define PVD_type_size 1
-#define PVD_id_offset (PVD_type_offset + PVD_type_size)
-#define PVD_id_size 5
-#define PVD_version_offset (PVD_id_offset + PVD_id_size)
-#define PVD_version_size 1
-#define PVD_reserved1_offset (PVD_version_offset + PVD_version_size)
-#define PVD_reserved1_size 1
-#define PVD_system_id_offset (PVD_reserved1_offset + PVD_reserved1_size)
-#define PVD_system_id_size 32
-#define PVD_volume_id_offset (PVD_system_id_offset + PVD_system_id_size)
-#define PVD_volume_id_size 32
-#define PVD_reserved2_offset (PVD_volume_id_offset + PVD_volume_id_size)
-#define PVD_reserved2_size 8
-#define PVD_volume_space_size_offset (PVD_reserved2_offset + PVD_reserved2_size)
-#define PVD_volume_space_size_size 8
-#define PVD_reserved3_offset (PVD_volume_space_size_offset + PVD_volume_space_size_size)
-#define PVD_reserved3_size 32
-#define PVD_volume_set_size_offset (PVD_reserved3_offset + PVD_reserved3_size)
-#define PVD_volume_set_size_size 4
-#define PVD_volume_sequence_number_offset (PVD_volume_set_size_offset + PVD_volume_set_size_size)
-#define PVD_volume_sequence_number_size 4
-#define PVD_logical_block_size_offset (PVD_volume_sequence_number_offset + PVD_volume_sequence_number_size)
-#define PVD_logical_block_size_size 4
-#define PVD_path_table_size_offset (PVD_logical_block_size_offset + PVD_logical_block_size_size)
-#define PVD_path_table_size_size 8
-#define PVD_type_1_path_table_offset (PVD_path_table_size_offset + PVD_path_table_size_size)
-#define PVD_type_1_path_table_size 4
-#define PVD_opt_type_1_path_table_offset (PVD_type_1_path_table_offset + PVD_type_1_path_table_size)
-#define PVD_opt_type_1_path_table_size 4
-#define PVD_type_m_path_table_offset (PVD_opt_type_1_path_table_offset + PVD_opt_type_1_path_table_size)
-#define PVD_type_m_path_table_size 4
-#define PVD_opt_type_m_path_table_offset (PVD_type_m_path_table_offset + PVD_type_m_path_table_size)
-#define PVD_opt_type_m_path_table_size 4
-#define PVD_root_directory_record_offset (PVD_opt_type_m_path_table_offset + PVD_opt_type_m_path_table_size)
-#define PVD_root_directory_record_size 34
-#define PVD_volume_set_id_offset (PVD_root_directory_record_offset + PVD_root_directory_record_size)
-#define PVD_volume_set_id_size 128
-#define PVD_publisher_id_offset (PVD_volume_set_id_offset + PVD_volume_set_id_size)
-#define PVD_publisher_id_size 128
-#define PVD_preparer_id_offset (PVD_publisher_id_offset + PVD_publisher_id_size)
-#define PVD_preparer_id_size 128
-#define PVD_application_id_offset (PVD_preparer_id_offset + PVD_preparer_id_size)
-#define PVD_application_id_size 128
-#define PVD_copyright_file_id_offset (PVD_application_id_offset + PVD_application_id_size)
-#define PVD_copyright_file_id_size 37
-#define PVD_abstract_file_id_offset (PVD_copyright_file_id_offset + PVD_copyright_file_id_size)
-#define PVD_abstract_file_id_size 37
-#define PVD_bibliographic_file_id_offset (PVD_abstract_file_id_offset + PVD_abstract_file_id_size)
-#define PVD_bibliographic_file_id_size 37
-#define PVD_creation_date_offset (PVD_bibliographic_file_id_offset + PVD_bibliographic_file_id_size)
-#define PVD_creation_date_size 17
-#define PVD_modification_date_offset (PVD_creation_date_offset + PVD_creation_date_size)
-#define PVD_modification_date_size 17
-#define PVD_expiration_date_offset (PVD_modification_date_offset + PVD_modification_date_size)
-#define PVD_expiration_date_size 17
-#define PVD_effective_date_offset (PVD_expiration_date_offset + PVD_expiration_date_size)
-#define PVD_effective_date_size 17
-#define PVD_file_structure_version_offset (PVD_effective_date_offset + PVD_effective_date_size)
-#define PVD_file_structure_version_size 1
-#define PVD_reserved4_offset (PVD_file_structure_version_offset + PVD_file_structure_version_size)
-#define PVD_reserved4_size 1
-#define PVD_application_data_offset (PVD_reserved4_offset + PVD_reserved4_size)
-#define PVD_application_data_size 512
-#define PVD_reserved5_offset (PVD_application_data_offset + PVD_application_data_size)
-#define PVD_reserved5_size (2048 - PVD_reserved5_offset)
-
-/* TODO: It would make future maintenance easier to just hardcode the
- * above values. In particular, ECMA119 states the offsets as part of
- * the standard. That would eliminate the need for the following check.*/
-#if PVD_reserved5_offset != 1395
-#error PVD offset and size definitions are wrong.
-#endif
-
-
-/* Structure of optional on-disk supplementary volume descriptor. */
-#define SVD_type_offset 0
-#define SVD_type_size 1
-#define SVD_id_offset (SVD_type_offset + SVD_type_size)
-#define SVD_id_size 5
-#define SVD_version_offset (SVD_id_offset + SVD_id_size)
-#define SVD_version_size 1
-/* ... */
-#define SVD_reserved1_offset 72
-#define SVD_reserved1_size 8
-#define SVD_volume_space_size_offset 80
-#define SVD_volume_space_size_size 8
-#define SVD_escape_sequences_offset (SVD_volume_space_size_offset + SVD_volume_space_size_size)
-#define SVD_escape_sequences_size 32
-/* ... */
-#define SVD_logical_block_size_offset 128
-#define SVD_logical_block_size_size 4
-#define SVD_type_L_path_table_offset 140
-#define SVD_type_M_path_table_offset 148
-/* ... */
-#define SVD_root_directory_record_offset 156
-#define SVD_root_directory_record_size 34
-#define SVD_file_structure_version_offset 881
-#define SVD_reserved2_offset 882
-#define SVD_reserved2_size 1
-#define SVD_reserved3_offset 1395
-#define SVD_reserved3_size 653
-/* ... */
-/* FIXME: validate correctness of last SVD entry offset. */
-
-/* Structure of an on-disk directory record. */
-/* Note: ISO9660 stores each multi-byte integer twice, once in
- * each byte order. The sizes here are the size of just one
- * of the two integers. (This is why the offset of a field isn't
- * the same as the offset+size of the previous field.) */
-#define DR_length_offset 0
-#define DR_length_size 1
-#define DR_ext_attr_length_offset 1
-#define DR_ext_attr_length_size 1
-#define DR_extent_offset 2
-#define DR_extent_size 4
-#define DR_size_offset 10
-#define DR_size_size 4
-#define DR_date_offset 18
-#define DR_date_size 7
-#define DR_flags_offset 25
-#define DR_flags_size 1
-#define DR_file_unit_size_offset 26
-#define DR_file_unit_size_size 1
-#define DR_interleave_offset 27
-#define DR_interleave_size 1
-#define DR_volume_sequence_number_offset 28
-#define DR_volume_sequence_number_size 2
-#define DR_name_len_offset 32
-#define DR_name_len_size 1
-#define DR_name_offset 33
-
-#ifdef HAVE_ZLIB_H
-static const unsigned char zisofs_magic[8] = {
- 0x37, 0xE4, 0x53, 0x96, 0xC9, 0xDB, 0xD6, 0x07
-};
-
-struct zisofs {
- /* Set 1 if this file compressed by paged zlib */
- int pz;
- int pz_log2_bs; /* Log2 of block size */
- uint64_t pz_uncompressed_size;
-
- int initialized;
- unsigned char *uncompressed_buffer;
- size_t uncompressed_buffer_size;
-
- uint32_t pz_offset;
- unsigned char header[16];
- size_t header_avail;
- int header_passed;
- unsigned char *block_pointers;
- size_t block_pointers_alloc;
- size_t block_pointers_size;
- size_t block_pointers_avail;
- size_t block_off;
- uint32_t block_avail;
-
- z_stream stream;
- int stream_valid;
-};
-#else
-struct zisofs {
- /* Set 1 if this file compressed by paged zlib */
- int pz;
-};
-#endif
-
-struct content {
- uint64_t offset;/* Offset on disk. */
- uint64_t size; /* File size in bytes. */
- struct content *next;
-};
-
-/* In-memory storage for a directory record. */
-struct file_info {
- struct file_info *use_next;
- struct file_info *parent;
- struct file_info *next;
- struct file_info *re_next;
- int subdirs;
- uint64_t key; /* Heap Key. */
- uint64_t offset; /* Offset on disk. */
- uint64_t size; /* File size in bytes. */
- uint32_t ce_offset; /* Offset of CE. */
- uint32_t ce_size; /* Size of CE. */
- char rr_moved; /* Flag to rr_moved. */
- char rr_moved_has_re_only;
- char re; /* Having RRIP "RE" extension. */
- char re_descendant;
- uint64_t cl_offset; /* Having RRIP "CL" extension. */
- int birthtime_is_set;
- time_t birthtime; /* File created time. */
- time_t mtime; /* File last modified time. */
- time_t atime; /* File last accessed time. */
- time_t ctime; /* File attribute change time. */
- uint64_t rdev; /* Device number. */
- mode_t mode;
- uid_t uid;
- gid_t gid;
- int64_t number;
- int nlinks;
- struct archive_string name; /* Pathname */
- char name_continues; /* Non-zero if name continues */
- struct archive_string symlink;
- char symlink_continues; /* Non-zero if link continues */
- /* Set 1 if this file compressed by paged zlib(zisofs) */
- int pz;
- int pz_log2_bs; /* Log2 of block size */
- uint64_t pz_uncompressed_size;
- /* Set 1 if this file is multi extent. */
- int multi_extent;
- struct {
- struct content *first;
- struct content **last;
- } contents;
- struct {
- struct file_info *first;
- struct file_info **last;
- } rede_files;
-};
-
-struct heap_queue {
- struct file_info **files;
- int allocated;
- int used;
-};
-
-struct iso9660 {
- int magic;
-#define ISO9660_MAGIC 0x96609660
-
- int opt_support_joliet;
- int opt_support_rockridge;
-
- struct archive_string pathname;
- char seenRockridge; /* Set true if RR extensions are used. */
- char seenSUSP; /* Set true if SUSP is beging used. */
- char seenJoliet;
-
- unsigned char suspOffset;
- struct file_info *rr_moved;
- struct read_ce_queue {
- struct read_ce_req {
- uint64_t offset;/* Offset of CE on disk. */
- struct file_info *file;
- } *reqs;
- int cnt;
- int allocated;
- } read_ce_req;
-
- int64_t previous_number;
- struct archive_string previous_pathname;
-
- struct file_info *use_files;
- struct heap_queue pending_files;
- struct {
- struct file_info *first;
- struct file_info **last;
- } cache_files;
- struct {
- struct file_info *first;
- struct file_info **last;
- } re_files;
-
- uint64_t current_position;
- ssize_t logical_block_size;
- uint64_t volume_size; /* Total size of volume in bytes. */
- int32_t volume_block;/* Total size of volume in logical blocks. */
-
- struct vd {
- int location; /* Location of Extent. */
- uint32_t size;
- } primary, joliet;
-
- off_t entry_sparse_offset;
- int64_t entry_bytes_remaining;
- struct zisofs entry_zisofs;
- struct content *entry_content;
-};
-
-static int archive_read_format_iso9660_bid(struct archive_read *);
-static int archive_read_format_iso9660_options(struct archive_read *,
- const char *, const char *);
-static int archive_read_format_iso9660_cleanup(struct archive_read *);
-static int archive_read_format_iso9660_read_data(struct archive_read *,
- const void **, size_t *, off_t *);
-static int archive_read_format_iso9660_read_data_skip(struct archive_read *);
-static int archive_read_format_iso9660_read_header(struct archive_read *,
- struct archive_entry *);
-static const char *build_pathname(struct archive_string *, struct file_info *);
-#if DEBUG
-static void dump_isodirrec(FILE *, const unsigned char *isodirrec);
-#endif
-static time_t time_from_tm(struct tm *);
-static time_t isodate17(const unsigned char *);
-static time_t isodate7(const unsigned char *);
-static int isBootRecord(struct iso9660 *, const unsigned char *);
-static int isVolumePartition(struct iso9660 *, const unsigned char *);
-static int isVDSetTerminator(struct iso9660 *, const unsigned char *);
-static int isJolietSVD(struct iso9660 *, const unsigned char *);
-static int isSVD(struct iso9660 *, const unsigned char *);
-static int isEVD(struct iso9660 *, const unsigned char *);
-static int isPVD(struct iso9660 *, const unsigned char *);
-static int next_cache_entry(struct archive_read *, struct iso9660 *,
- struct file_info **);
-static int next_entry_seek(struct archive_read *a, struct iso9660 *iso9660,
- struct file_info **pfile);
-static struct file_info *
- parse_file_info(struct archive_read *a,
- struct file_info *parent, const unsigned char *isodirrec);
-static int parse_rockridge(struct archive_read *a,
- struct file_info *file, const unsigned char *start,
- const unsigned char *end);
-static int register_CE(struct archive_read *a, int32_t location,
- struct file_info *file);
-static int read_CE(struct archive_read *a, struct iso9660 *iso9660);
-static void parse_rockridge_NM1(struct file_info *,
- const unsigned char *, int);
-static void parse_rockridge_SL1(struct file_info *,
- const unsigned char *, int);
-static void parse_rockridge_TF1(struct file_info *,
- const unsigned char *, int);
-static void parse_rockridge_ZF1(struct file_info *,
- const unsigned char *, int);
-static void register_file(struct iso9660 *, struct file_info *);
-static void release_files(struct iso9660 *);
-static unsigned toi(const void *p, int n);
-static inline void re_add_entry(struct iso9660 *, struct file_info *);
-static inline struct file_info * re_get_entry(struct iso9660 *);
-static inline int rede_add_entry(struct file_info *);
-static inline struct file_info * rede_get_entry(struct file_info *);
-static inline void cache_add_entry(struct iso9660 *iso9660,
- struct file_info *file);
-static inline struct file_info *cache_get_entry(struct iso9660 *iso9660);
-static void heap_add_entry(struct heap_queue *heap,
- struct file_info *file, uint64_t key);
-static struct file_info *heap_get_entry(struct heap_queue *heap);
-
-#define add_entry(iso9660, file) \
- heap_add_entry(&((iso9660)->pending_files), file, file->offset)
-#define next_entry(iso9660) \
- heap_get_entry(&((iso9660)->pending_files))
-
-int
-archive_read_support_format_iso9660(struct archive *_a)
-{
- struct archive_read *a = (struct archive_read *)_a;
- struct iso9660 *iso9660;
- int r;
-
- iso9660 = (struct iso9660 *)malloc(sizeof(*iso9660));
- if (iso9660 == NULL) {
- archive_set_error(&a->archive, ENOMEM, "Can't allocate iso9660 data");
- return (ARCHIVE_FATAL);
- }
- memset(iso9660, 0, sizeof(*iso9660));
- iso9660->magic = ISO9660_MAGIC;
- iso9660->cache_files.first = NULL;
- iso9660->cache_files.last = &(iso9660->cache_files.first);
- iso9660->re_files.first = NULL;
- iso9660->re_files.last = &(iso9660->re_files.first);
- /* Enable to support Joliet extensions by default. */
- iso9660->opt_support_joliet = 1;
- /* Enable to support Rock Ridge extensions by default. */
- iso9660->opt_support_rockridge = 1;
-
- r = __archive_read_register_format(a,
- iso9660,
- "iso9660",
- archive_read_format_iso9660_bid,
- archive_read_format_iso9660_options,
- archive_read_format_iso9660_read_header,
- archive_read_format_iso9660_read_data,
- archive_read_format_iso9660_read_data_skip,
- archive_read_format_iso9660_cleanup);
-
- if (r != ARCHIVE_OK) {
- free(iso9660);
- return (r);
- }
- return (ARCHIVE_OK);
-}
-
-
-static int
-archive_read_format_iso9660_bid(struct archive_read *a)
-{
- struct iso9660 *iso9660;
- ssize_t bytes_read;
- const void *h;
- const unsigned char *p;
- int seenTerminator;
-
- iso9660 = (struct iso9660 *)(a->format->data);
-
- /*
- * Skip the first 32k (reserved area) and get the first
- * 8 sectors of the volume descriptor table. Of course,
- * if the I/O layer gives us more, we'll take it.
- */
-#define RESERVED_AREA (SYSTEM_AREA_BLOCK * LOGICAL_BLOCK_SIZE)
- h = __archive_read_ahead(a,
- RESERVED_AREA + 8 * LOGICAL_BLOCK_SIZE,
- &bytes_read);
- if (h == NULL)
- return (-1);
- p = (const unsigned char *)h;
-
- /* Skip the reserved area. */
- bytes_read -= RESERVED_AREA;
- p += RESERVED_AREA;
-
- /* Check each volume descriptor. */
- seenTerminator = 0;
- for (; bytes_read > LOGICAL_BLOCK_SIZE;
- bytes_read -= LOGICAL_BLOCK_SIZE, p += LOGICAL_BLOCK_SIZE) {
- /* Do not handle undefined Volume Descriptor Type. */
- if (p[0] >= 4 && p[0] <= 254)
- return (0);
- /* Standard Identifier must be "CD001" */
- if (memcmp(p + 1, "CD001", 5) != 0)
- return (0);
- if (!iso9660->primary.location) {
- if (isPVD(iso9660, p))
- continue;
- }
- if (!iso9660->joliet.location) {
- if (isJolietSVD(iso9660, p))
- continue;
- }
- if (isBootRecord(iso9660, p))
- continue;
- if (isEVD(iso9660, p))
- continue;
- if (isSVD(iso9660, p))
- continue;
- if (isVolumePartition(iso9660, p))
- continue;
- if (isVDSetTerminator(iso9660, p)) {
- seenTerminator = 1;
- break;
- }
- return (0);
- }
- /*
- * ISO 9660 format must have Primary Volume Descriptor and
- * Volume Descriptor Set Terminator.
- */
- if (seenTerminator && iso9660->primary.location > 16)
- return (48);
-
- /* We didn't find a valid PVD; return a bid of zero. */
- return (0);
-}
-
-static int
-archive_read_format_iso9660_options(struct archive_read *a,
- const char *key, const char *val)
-{
- struct iso9660 *iso9660;
-
- iso9660 = (struct iso9660 *)(a->format->data);
-
- if (strcmp(key, "joliet") == 0) {
- if (val == NULL || strcmp(val, "off") == 0 ||
- strcmp(val, "ignore") == 0 ||
- strcmp(val, "disable") == 0 ||
- strcmp(val, "0") == 0)
- iso9660->opt_support_joliet = 0;
- else
- iso9660->opt_support_joliet = 1;
- return (ARCHIVE_OK);
- }
- if (strcmp(key, "rockridge") == 0 ||
- strcmp(key, "Rockridge") == 0) {
- iso9660->opt_support_rockridge = val != NULL;
- return (ARCHIVE_OK);
- }
-
- /* Note: The "warn" return is just to inform the options
- * supervisor that we didn't handle it. It will generate
- * a suitable error if noone used this option. */
- return (ARCHIVE_WARN);
-}
-
-static int
-isBootRecord(struct iso9660 *iso9660, const unsigned char *h)
-{
- (void)iso9660; /* UNUSED */
-
- /* Type of the Volume Descriptor Boot Record must be 0. */
- if (h[0] != 0)
- return (0);
-
- /* Volume Descriptor Version must be 1. */
- if (h[6] != 1)
- return (0);
-
- return (1);
-}
-
-static int
-isVolumePartition(struct iso9660 *iso9660, const unsigned char *h)
-{
- int32_t location;
-
- /* Type of the Volume Partition Descriptor must be 3. */
- if (h[0] != 3)
- return (0);
-
- /* Volume Descriptor Version must be 1. */
- if (h[6] != 1)
- return (0);
- /* Unused Field */
- if (h[7] != 0)
- return (0);
-
- location = archive_le32dec(h + 72);
- if (location <= SYSTEM_AREA_BLOCK ||
- location >= iso9660->volume_block)
- return (0);
- if ((uint32_t)location != archive_be32dec(h + 76))
- return (0);
-
- return (1);
-}
-
-static int
-isVDSetTerminator(struct iso9660 *iso9660, const unsigned char *h)
-{
- int i;
-
- (void)iso9660; /* UNUSED */
-
- /* Type of the Volume Descriptor Set Terminator must be 255. */
- if (h[0] != 255)
- return (0);
-
- /* Volume Descriptor Version must be 1. */
- if (h[6] != 1)
- return (0);
-
- /* Reserved field must be 0. */
- for (i = 7; i < 2048; ++i)
- if (h[i] != 0)
- return (0);
-
- return (1);
-}
-
-static int
-isJolietSVD(struct iso9660 *iso9660, const unsigned char *h)
-{
- const unsigned char *p;
- ssize_t logical_block_size;
- int32_t volume_block;
-
- /* Check if current sector is a kind of Supplementary Volume
- * Descriptor. */
- if (!isSVD(iso9660, h))
- return (0);
-
- /* FIXME: do more validations according to joliet spec. */
-
- /* check if this SVD contains joliet extension! */
- p = h + SVD_escape_sequences_offset;
- /* N.B. Joliet spec says p[1] == '\\', but.... */
- if (p[0] == '%' && p[1] == '/') {
- int level = 0;
-
- if (p[2] == '@')
- level = 1;
- else if (p[2] == 'C')
- level = 2;
- else if (p[2] == 'E')
- level = 3;
- else /* not joliet */
- return (0);
-
- iso9660->seenJoliet = level;
-
- } else /* not joliet */
- return (0);
-
- logical_block_size =
- archive_le16dec(h + SVD_logical_block_size_offset);
- volume_block = archive_le32dec(h + SVD_volume_space_size_offset);
-
- iso9660->logical_block_size = logical_block_size;
- iso9660->volume_block = volume_block;
- iso9660->volume_size = logical_block_size * (uint64_t)volume_block;
- /* Read Root Directory Record in Volume Descriptor. */
- p = h + SVD_root_directory_record_offset;
- iso9660->joliet.location = archive_le32dec(p + DR_extent_offset);
- iso9660->joliet.size = archive_le32dec(p + DR_size_offset);
-
- return (48);
-}
-
-static int
-isSVD(struct iso9660 *iso9660, const unsigned char *h)
-{
- const unsigned char *p;
- ssize_t logical_block_size;
- int32_t volume_block;
- int32_t location;
- int i;
-
- (void)iso9660; /* UNUSED */
-
- /* Type 2 means it's a SVD. */
- if (h[SVD_type_offset] != 2)
- return (0);
-
- /* Reserved field must be 0. */
- for (i = 0; i < SVD_reserved1_size; ++i)
- if (h[SVD_reserved1_offset + i] != 0)
- return (0);
- for (i = 0; i < SVD_reserved2_size; ++i)
- if (h[SVD_reserved2_offset + i] != 0)
- return (0);
- for (i = 0; i < SVD_reserved3_size; ++i)
- if (h[SVD_reserved3_offset + i] != 0)
- return (0);
-
- /* File structure version must be 1 for ISO9660/ECMA119. */
- if (h[SVD_file_structure_version_offset] != 1)
- return (0);
-
- logical_block_size =
- archive_le16dec(h + SVD_logical_block_size_offset);
- if (logical_block_size <= 0)
- return (0);
-
- volume_block = archive_le32dec(h + SVD_volume_space_size_offset);
- if (volume_block <= SYSTEM_AREA_BLOCK+4)
- return (0);
-
- /* Location of Occurrence of Type L Path Table must be
- * available location,
- * >= SYSTEM_AREA_BLOCK(16) + 2 and < Volume Space Size. */
- location = archive_le32dec(h+SVD_type_L_path_table_offset);
- if (location < SYSTEM_AREA_BLOCK+2 || location >= volume_block)
- return (0);
-
- /* The Type M Path Table must be at a valid location (WinISO
- * and probably other programs omit this, so we allow zero)
- *
- * >= SYSTEM_AREA_BLOCK(16) + 2 and < Volume Space Size. */
- location = archive_be32dec(h+SVD_type_M_path_table_offset);
- if ((location > 0 && location < SYSTEM_AREA_BLOCK+2)
- || location >= volume_block)
- return (0);
-
- /* Read Root Directory Record in Volume Descriptor. */
- p = h + SVD_root_directory_record_offset;
- if (p[DR_length_offset] != 34)
- return (0);
-
- return (48);
-}
-
-static int
-isEVD(struct iso9660 *iso9660, const unsigned char *h)
-{
- const unsigned char *p;
- ssize_t logical_block_size;
- int32_t volume_block;
- int32_t location;
- int i;
-
- (void)iso9660; /* UNUSED */
-
- /* Type of the Enhanced Volume Descriptor must be 2. */
- if (h[PVD_type_offset] != 2)
- return (0);
-
- /* EVD version must be 2. */
- if (h[PVD_version_offset] != 2)
- return (0);
-
- /* Reserved field must be 0. */
- if (h[PVD_reserved1_offset] != 0)
- return (0);
-
- /* Reserved field must be 0. */
- for (i = 0; i < PVD_reserved2_size; ++i)
- if (h[PVD_reserved2_offset + i] != 0)
- return (0);
-
- /* Reserved field must be 0. */
- for (i = 0; i < PVD_reserved3_size; ++i)
- if (h[PVD_reserved3_offset + i] != 0)
- return (0);
-
- /* Logical block size must be > 0. */
- /* I've looked at Ecma 119 and can't find any stronger
- * restriction on this field. */
- logical_block_size =
- archive_le16dec(h + PVD_logical_block_size_offset);
- if (logical_block_size <= 0)
- return (0);
-
- volume_block =
- archive_le32dec(h + PVD_volume_space_size_offset);
- if (volume_block <= SYSTEM_AREA_BLOCK+4)
- return (0);
-
- /* File structure version must be 2 for ISO9660:1999. */
- if (h[PVD_file_structure_version_offset] != 2)
- return (0);
-
- /* Location of Occurrence of Type L Path Table must be
- * available location,
- * >= SYSTEM_AREA_BLOCK(16) + 2 and < Volume Space Size. */
- location = archive_le32dec(h+PVD_type_1_path_table_offset);
- if (location < SYSTEM_AREA_BLOCK+2 || location >= volume_block)
- return (0);
-
- /* Location of Occurrence of Type M Path Table must be
- * available location,
- * >= SYSTEM_AREA_BLOCK(16) + 2 and < Volume Space Size. */
- location = archive_be32dec(h+PVD_type_m_path_table_offset);
- if ((location > 0 && location < SYSTEM_AREA_BLOCK+2)
- || location >= volume_block)
- return (0);
-
- /* Reserved field must be 0. */
- for (i = 0; i < PVD_reserved4_size; ++i)
- if (h[PVD_reserved4_offset + i] != 0)
- return (0);
-
- /* Reserved field must be 0. */
- for (i = 0; i < PVD_reserved5_size; ++i)
- if (h[PVD_reserved5_offset + i] != 0)
- return (0);
-
- /* Read Root Directory Record in Volume Descriptor. */
- p = h + PVD_root_directory_record_offset;
- if (p[DR_length_offset] != 34)
- return (0);
-
- return (48);
-}
-
-static int
-isPVD(struct iso9660 *iso9660, const unsigned char *h)
-{
- const unsigned char *p;
- ssize_t logical_block_size;
- int32_t volume_block;
- int32_t location;
- int i;
-
- /* Type of the Primary Volume Descriptor must be 1. */
- if (h[PVD_type_offset] != 1)
- return (0);
-
- /* PVD version must be 1. */
- if (h[PVD_version_offset] != 1)
- return (0);
-
- /* Reserved field must be 0. */
- if (h[PVD_reserved1_offset] != 0)
- return (0);
-
- /* Reserved field must be 0. */
- for (i = 0; i < PVD_reserved2_size; ++i)
- if (h[PVD_reserved2_offset + i] != 0)
- return (0);
-
- /* Reserved field must be 0. */
- for (i = 0; i < PVD_reserved3_size; ++i)
- if (h[PVD_reserved3_offset + i] != 0)
- return (0);
-
- /* Logical block size must be > 0. */
- /* I've looked at Ecma 119 and can't find any stronger
- * restriction on this field. */
- logical_block_size =
- archive_le16dec(h + PVD_logical_block_size_offset);
- if (logical_block_size <= 0)
- return (0);
-
- volume_block = archive_le32dec(h + PVD_volume_space_size_offset);
- if (volume_block <= SYSTEM_AREA_BLOCK+4)
- return (0);
-
- /* File structure version must be 1 for ISO9660/ECMA119. */
- if (h[PVD_file_structure_version_offset] != 1)
- return (0);
-
- /* Location of Occurrence of Type L Path Table must be
- * available location,
- * > SYSTEM_AREA_BLOCK(16) + 2 and < Volume Space Size. */
- location = archive_le32dec(h+PVD_type_1_path_table_offset);
- if (location < SYSTEM_AREA_BLOCK+2 || location >= volume_block)
- return (0);
-
- /* The Type M Path Table must also be at a valid location
- * (although ECMA 119 requires a Type M Path Table, WinISO and
- * probably other programs omit it, so we permit a zero here)
- *
- * >= SYSTEM_AREA_BLOCK(16) + 2 and < Volume Space Size. */
- location = archive_be32dec(h+PVD_type_m_path_table_offset);
- if ((location > 0 && location < SYSTEM_AREA_BLOCK+2)
- || location >= volume_block)
- return (0);
-
- /* Reserved field must be 0. */
- /* FreeBSD: makefs erroneously created images with 0x20 */
- for (i = 0; i < PVD_reserved4_size; ++i)
- if (h[PVD_reserved4_offset + i] != 0 &&
- h[PVD_reserved4_offset + i] != 32)
- return (0);
-
- /* Reserved field must be 0. */
- for (i = 0; i < PVD_reserved5_size; ++i)
- if (h[PVD_reserved5_offset + i] != 0)
- return (0);
-
- /* XXX TODO: Check other values for sanity; reject more
- * malformed PVDs. XXX */
-
- /* Read Root Directory Record in Volume Descriptor. */
- p = h + PVD_root_directory_record_offset;
- if (p[DR_length_offset] != 34)
- return (0);
-
- iso9660->logical_block_size = logical_block_size;
- iso9660->volume_block = volume_block;
- iso9660->volume_size = logical_block_size * (uint64_t)volume_block;
- iso9660->primary.location = archive_le32dec(p + DR_extent_offset);
- iso9660->primary.size = archive_le32dec(p + DR_size_offset);
-
- return (48);
-}
-
-static int
-read_children(struct archive_read *a, struct file_info *parent)
-{
- struct iso9660 *iso9660;
- const unsigned char *b, *p;
- struct file_info *multi;
- size_t step;
-
- iso9660 = (struct iso9660 *)(a->format->data);
- if (iso9660->current_position > parent->offset) {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "Ignoring out-of-order directory (%s) %jd > %jd",
- parent->name.s,
- iso9660->current_position,
- parent->offset);
- return (ARCHIVE_WARN);
- }
- if (parent->offset + parent->size > iso9660->volume_size) {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "Directory is beyond end-of-media: %s",
- parent->name);
- return (ARCHIVE_WARN);
- }
- if (iso9660->current_position < parent->offset) {
- int64_t skipsize;
-
- skipsize = parent->offset - iso9660->current_position;
- skipsize = __archive_read_skip(a, skipsize);
- if (skipsize < 0)
- return ((int)skipsize);
- iso9660->current_position = parent->offset;
- }
-
- step = ((parent->size + iso9660->logical_block_size -1) /
- iso9660->logical_block_size) * iso9660->logical_block_size;
- b = __archive_read_ahead(a, step, NULL);
- if (b == NULL) {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "Failed to read full block when scanning "
- "ISO9660 directory list");
- return (ARCHIVE_FATAL);
- }
- __archive_read_consume(a, step);
- iso9660->current_position += step;
- multi = NULL;
- while (step) {
- p = b;
- b += iso9660->logical_block_size;
- step -= iso9660->logical_block_size;
- for (; *p != 0 && p < b && p + *p <= b; p += *p) {
- struct file_info *child;
-
- /* N.B.: these special directory identifiers
- * are 8 bit "values" even on a
- * Joliet CD with UCS-2 (16bit) encoding.
- */
-
- /* Skip '.' entry. */
- if (*(p + DR_name_len_offset) == 1
- && *(p + DR_name_offset) == '\0')
- continue;
- /* Skip '..' entry. */
- if (*(p + DR_name_len_offset) == 1
- && *(p + DR_name_offset) == '\001')
- continue;
- child = parse_file_info(a, parent, p);
- if (child == NULL)
- return (ARCHIVE_FATAL);
- if (child->cl_offset == 0 &&
- (child->multi_extent || multi != NULL)) {
- struct content *con;
-
- if (multi == NULL) {
- multi = child;
- multi->contents.first = NULL;
- multi->contents.last =
- &(multi->contents.first);
- }
- con = malloc(sizeof(struct content));
- if (con == NULL) {
- archive_set_error(
- &a->archive, ENOMEM,
- "No memory for "
- "multi extent");
- return (ARCHIVE_FATAL);
- }
- con->offset = child->offset;
- con->size = child->size;
- con->next = NULL;
- *multi->contents.last = con;
- multi->contents.last = &(con->next);
- if (multi == child)
- add_entry(iso9660, child);
- else {
- multi->size += child->size;
- if (!child->multi_extent)
- multi = NULL;
- }
- } else
- add_entry(iso9660, child);
- }
- }
-
- /* Read data which recorded by RRIP "CE" extension. */
- if (read_CE(a, iso9660) != ARCHIVE_OK)
- return (ARCHIVE_FATAL);
-
- return (ARCHIVE_OK);
-}
-
-static int
-archive_read_format_iso9660_read_header(struct archive_read *a,
- struct archive_entry *entry)
-{
- struct iso9660 *iso9660;
- struct file_info *file;
- int r, rd_r = ARCHIVE_OK;
-
- iso9660 = (struct iso9660 *)(a->format->data);
-
- if (!a->archive.archive_format) {
- a->archive.archive_format = ARCHIVE_FORMAT_ISO9660;
- a->archive.archive_format_name = "ISO9660";
- }
-
- if (iso9660->current_position == 0) {
- int64_t skipsize;
- struct vd *vd;
- const void *block;
- char seenJoliet;
-
- vd = &(iso9660->primary);
- if (!iso9660->opt_support_joliet)
- iso9660->seenJoliet = 0;
- if (iso9660->seenJoliet &&
- vd->location > iso9660->joliet.location)
- /* This condition is unlikely; by way of caution. */
- vd = &(iso9660->joliet);
-
- skipsize = LOGICAL_BLOCK_SIZE * vd->location;
- skipsize = __archive_read_skip(a, skipsize);
- if (skipsize < 0)
- return ((int)skipsize);
- iso9660->current_position = skipsize;
-
- block = __archive_read_ahead(a, vd->size, NULL);
- if (block == NULL) {
- archive_set_error(&a->archive,
- ARCHIVE_ERRNO_MISC,
- "Failed to read full block when scanning "
- "ISO9660 directory list");
- return (ARCHIVE_FATAL);
- }
-
- /*
- * While reading Root Directory, flag seenJoliet
- * must be zero to avoid converting special name
- * 0x00(Current Directory) and next byte to UCS2.
- */
- seenJoliet = iso9660->seenJoliet;/* Save flag. */
- iso9660->seenJoliet = 0;
- file = parse_file_info(a, NULL, block);
- if (file == NULL)
- return (ARCHIVE_FATAL);
- iso9660->seenJoliet = seenJoliet;
- if (vd == &(iso9660->primary) && iso9660->seenRockridge
- && iso9660->seenJoliet)
- /*
- * If iso image has RockRidge and Joliet,
- * we use RockRidge Extensions.
- */
- iso9660->seenJoliet = 0;
- if (vd == &(iso9660->primary) && !iso9660->seenRockridge
- && iso9660->seenJoliet) {
- /* Switch reading data from primary to joliet. */
- vd = &(iso9660->joliet);
- skipsize = LOGICAL_BLOCK_SIZE * vd->location;
- skipsize -= iso9660->current_position;
- skipsize = __archive_read_skip(a, skipsize);
- if (skipsize < 0)
- return ((int)skipsize);
- iso9660->current_position += skipsize;
-
- block = __archive_read_ahead(a, vd->size, NULL);
- if (block == NULL) {
- archive_set_error(&a->archive,
- ARCHIVE_ERRNO_MISC,
- "Failed to read full block when scanning "
- "ISO9660 directory list");
- return (ARCHIVE_FATAL);
- }
- seenJoliet = iso9660->seenJoliet;/* Save flag. */
- iso9660->seenJoliet = 0;
- file = parse_file_info(a, NULL, block);
- if (file == NULL)
- return (ARCHIVE_FATAL);
- iso9660->seenJoliet = seenJoliet;
- }
- /* Store the root directory in the pending list. */
- add_entry(iso9660, file);
- if (iso9660->seenRockridge) {
- a->archive.archive_format =
- ARCHIVE_FORMAT_ISO9660_ROCKRIDGE;
- a->archive.archive_format_name =
- "ISO9660 with Rockridge extensions";
- }
- }
-
- /* Get the next entry that appears after the current offset. */
- r = next_entry_seek(a, iso9660, &file);
- if (r != ARCHIVE_OK)
- return (r);
-
- iso9660->entry_bytes_remaining = file->size;
- iso9660->entry_sparse_offset = 0; /* Offset for sparse-file-aware clients. */
-
- if (file->offset + file->size > iso9660->volume_size) {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "File is beyond end-of-media: %s", file->name);
- iso9660->entry_bytes_remaining = 0;
- iso9660->entry_sparse_offset = 0;
- return (ARCHIVE_WARN);
- }
-
- /* Set up the entry structure with information about this entry. */
- archive_entry_set_mode(entry, file->mode);
- archive_entry_set_uid(entry, file->uid);
- archive_entry_set_gid(entry, file->gid);
- archive_entry_set_nlink(entry, file->nlinks);
- if (file->birthtime_is_set)
- archive_entry_set_birthtime(entry, file->birthtime, 0);
- else
- archive_entry_unset_birthtime(entry);
- archive_entry_set_mtime(entry, file->mtime, 0);
- archive_entry_set_ctime(entry, file->ctime, 0);
- archive_entry_set_atime(entry, file->atime, 0);
- /* N.B.: Rock Ridge supports 64-bit device numbers. */
- archive_entry_set_rdev(entry, (dev_t)file->rdev);
- archive_entry_set_size(entry, iso9660->entry_bytes_remaining);
- archive_string_empty(&iso9660->pathname);
- archive_entry_set_pathname(entry,
- build_pathname(&iso9660->pathname, file));
- if (file->symlink.s != NULL)
- archive_entry_copy_symlink(entry, file->symlink.s);
-
- /* Note: If the input isn't seekable, we can't rewind to
- * return the same body again, so if the next entry refers to
- * the same data, we have to return it as a hardlink to the
- * original entry. */
- if (file->number != -1 &&
- file->number == iso9660->previous_number) {
- archive_entry_set_hardlink(entry,
- iso9660->previous_pathname.s);
- archive_entry_unset_size(entry);
- iso9660->entry_bytes_remaining = 0;
- iso9660->entry_sparse_offset = 0;
- return (ARCHIVE_OK);
- }
-
- /* Except for the hardlink case above, if the offset of the
- * next entry is before our current position, we can't seek
- * backwards to extract it, so issue a warning. Note that
- * this can only happen if this entry was added to the heap
- * after we passed this offset, that is, only if the directory
- * mentioning this entry is later than the body of the entry.
- * Such layouts are very unusual; most ISO9660 writers lay out
- * and record all directory information first, then store
- * all file bodies. */
- /* TODO: Someday, libarchive's I/O core will support optional
- * seeking. When that day comes, this code should attempt to
- * seek and only return the error if the seek fails. That
- * will give us support for whacky ISO images that require
- * seeking while retaining the ability to read almost all ISO
- * images in a streaming fashion. */
- if ((file->mode & AE_IFMT) != AE_IFDIR &&
- file->offset < iso9660->current_position) {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "Ignoring out-of-order file @%x (%s) %jd < %jd",
- file,
- iso9660->pathname.s,
- file->offset, iso9660->current_position);
- iso9660->entry_bytes_remaining = 0;
- iso9660->entry_sparse_offset = 0;
- return (ARCHIVE_WARN);
- }
-
- /* Initialize zisofs variables. */
- iso9660->entry_zisofs.pz = file->pz;
- if (file->pz) {
-#ifdef HAVE_ZLIB_H
- struct zisofs *zisofs;
-
- zisofs = &iso9660->entry_zisofs;
- zisofs->initialized = 0;
- zisofs->pz_log2_bs = file->pz_log2_bs;
- zisofs->pz_uncompressed_size = file->pz_uncompressed_size;
- zisofs->pz_offset = 0;
- zisofs->header_avail = 0;
- zisofs->header_passed = 0;
- zisofs->block_pointers_avail = 0;
-#endif
- archive_entry_set_size(entry, file->pz_uncompressed_size);
- }
-
- iso9660->previous_number = file->number;
- archive_strcpy(&iso9660->previous_pathname, iso9660->pathname.s);
-
- /* Reset entry_bytes_remaining if the file is multi extent. */
- iso9660->entry_content = file->contents.first;
- if (iso9660->entry_content != NULL)
- iso9660->entry_bytes_remaining = iso9660->entry_content->size;
-
- if (archive_entry_filetype(entry) == AE_IFDIR) {
- /* Overwrite nlinks by proper link number which is
- * calculated from number of sub directories. */
- archive_entry_set_nlink(entry, 2 + file->subdirs);
- /* Directory data has been read completely. */
- iso9660->entry_bytes_remaining = 0;
- iso9660->entry_sparse_offset = 0;
- }
-
- if (rd_r != ARCHIVE_OK)
- return (rd_r);
- return (ARCHIVE_OK);
-}
-
-static int
-archive_read_format_iso9660_read_data_skip(struct archive_read *a)
-{
- /* Because read_next_header always does an explicit skip
- * to the next entry, we don't need to do anything here. */
- (void)a; /* UNUSED */
- return (ARCHIVE_OK);
-}
-
-#ifdef HAVE_ZLIB_H
-
-static int
-zisofs_read_data(struct archive_read *a,
- const void **buff, size_t *size, off_t *offset)
-{
- struct iso9660 *iso9660;
- struct zisofs *zisofs;
- const unsigned char *p;
- size_t avail;
- ssize_t bytes_read;
- size_t uncompressed_size;
- int r;
-
- iso9660 = (struct iso9660 *)(a->format->data);
- zisofs = &iso9660->entry_zisofs;
-
- p = __archive_read_ahead(a, 1, &bytes_read);
- if (bytes_read <= 0) {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
- "Truncated zisofs file body");
- return (ARCHIVE_FATAL);
- }
- if (bytes_read > iso9660->entry_bytes_remaining)
- bytes_read = iso9660->entry_bytes_remaining;
- avail = bytes_read;
- uncompressed_size = 0;
-
- if (!zisofs->initialized) {
- size_t ceil, xsize;
-
- /* Allocate block pointers buffer. */
- ceil = (zisofs->pz_uncompressed_size +
- (1LL << zisofs->pz_log2_bs) - 1)
- >> zisofs->pz_log2_bs;
- xsize = (ceil + 1) * 4;
- if (zisofs->block_pointers_alloc < xsize) {
- size_t alloc;
-
- if (zisofs->block_pointers != NULL)
- free(zisofs->block_pointers);
- alloc = ((xsize >> 10) + 1) << 10;
- zisofs->block_pointers = malloc(alloc);
- if (zisofs->block_pointers == NULL) {
- archive_set_error(&a->archive, ENOMEM,
- "No memory for zisofs decompression");
- return (ARCHIVE_FATAL);
- }
- zisofs->block_pointers_alloc = alloc;
- }
- zisofs->block_pointers_size = xsize;
-
- /* Allocate uncompressed data buffer. */
- xsize = 1UL << zisofs->pz_log2_bs;
- if (zisofs->uncompressed_buffer_size < xsize) {
- if (zisofs->uncompressed_buffer != NULL)
- free(zisofs->uncompressed_buffer);
- zisofs->uncompressed_buffer = malloc(xsize);
- if (zisofs->uncompressed_buffer == NULL) {
- archive_set_error(&a->archive, ENOMEM,
- "No memory for zisofs decompression");
- return (ARCHIVE_FATAL);
- }
- }
- zisofs->uncompressed_buffer_size = xsize;
-
- /*
- * Read the file header, and check the magic code of zisofs.
- */
- if (zisofs->header_avail < sizeof(zisofs->header)) {
- xsize = sizeof(zisofs->header) - zisofs->header_avail;
- if (avail < xsize)
- xsize = avail;
- memcpy(zisofs->header + zisofs->header_avail, p, xsize);
- zisofs->header_avail += xsize;
- avail -= xsize;
- p += xsize;
- }
- if (!zisofs->header_passed &&
- zisofs->header_avail == sizeof(zisofs->header)) {
- int err = 0;
-
- if (memcmp(zisofs->header, zisofs_magic,
- sizeof(zisofs_magic)) != 0)
- err = 1;
- if (archive_le32dec(zisofs->header + 8)
- != zisofs->pz_uncompressed_size)
- err = 1;
- if (zisofs->header[12] != 4)
- err = 1;
- if (zisofs->header[13] != zisofs->pz_log2_bs)
- err = 1;
- if (err) {
- archive_set_error(&a->archive,
- ARCHIVE_ERRNO_FILE_FORMAT,
- "Illegal zisofs file body");
- return (ARCHIVE_FATAL);
- }
- zisofs->header_passed = 1;
- }
- /*
- * Read block pointers.
- */
- if (zisofs->header_passed &&
- zisofs->block_pointers_avail < zisofs->block_pointers_size) {
- xsize = zisofs->block_pointers_size
- - zisofs->block_pointers_avail;
- if (avail < xsize)
- xsize = avail;
- memcpy(zisofs->block_pointers
- + zisofs->block_pointers_avail, p, xsize);
- zisofs->block_pointers_avail += xsize;
- avail -= xsize;
- p += xsize;
- if (zisofs->block_pointers_avail
- == zisofs->block_pointers_size) {
- /* We've got all block pointers and initialize
- * related variables. */
- zisofs->block_off = 0;
- zisofs->block_avail = 0;
- /* Complete a initialization */
- zisofs->initialized = 1;
- }
- }
-
- if (!zisofs->initialized)
- goto next_data; /* We need more datas. */
- }
-
- /*
- * Get block offsets from block pointers.
- */
- if (zisofs->block_avail == 0) {
- uint32_t bst, bed;
-
- if (zisofs->block_off + 4 >= zisofs->block_pointers_size) {
- /* There isn't a pair of offsets. */
- archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
- "Illegal zisofs block pointers");
- return (ARCHIVE_FATAL);
- }
- bst = archive_le32dec(zisofs->block_pointers + zisofs->block_off);
- if (bst != zisofs->pz_offset + (bytes_read - avail)) {
- /* TODO: Should we seek offset of current file by bst ? */
- archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
- "Illegal zisofs block pointers(cannot seek)");
- return (ARCHIVE_FATAL);
- }
- bed = archive_le32dec(
- zisofs->block_pointers + zisofs->block_off + 4);
- if (bed < bst) {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
- "Illegal zisofs block pointers");
- return (ARCHIVE_FATAL);
- }
- zisofs->block_avail = bed - bst;
- zisofs->block_off += 4;
-
- /* Initialize compression library for new block. */
- if (zisofs->stream_valid)
- r = inflateReset(&zisofs->stream);
- else
- r = inflateInit(&zisofs->stream);
- if (r != Z_OK) {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "Can't initialize zisofs decompression.");
- return (ARCHIVE_FATAL);
- }
- zisofs->stream_valid = 1;
- zisofs->stream.total_in = 0;
- zisofs->stream.total_out = 0;
- }
-
- /*
- * Make uncompressed datas.
- */
- if (zisofs->block_avail == 0) {
- memset(zisofs->uncompressed_buffer, 0,
- zisofs->uncompressed_buffer_size);
- uncompressed_size = zisofs->uncompressed_buffer_size;
- } else {
- zisofs->stream.next_in = (Bytef *)(uintptr_t)(const void *)p;
- if (avail > zisofs->block_avail)
- zisofs->stream.avail_in = zisofs->block_avail;
- else
- zisofs->stream.avail_in = avail;
- zisofs->stream.next_out = zisofs->uncompressed_buffer;
- zisofs->stream.avail_out = zisofs->uncompressed_buffer_size;
-
- r = inflate(&zisofs->stream, 0);
- switch (r) {
- case Z_OK: /* Decompressor made some progress.*/
- case Z_STREAM_END: /* Found end of stream. */
- break;
- default:
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "zisofs decompression failed (%d)", r);
- return (ARCHIVE_FATAL);
- }
- uncompressed_size =
- zisofs->uncompressed_buffer_size - zisofs->stream.avail_out;
- avail -= zisofs->stream.next_in - p;
- zisofs->block_avail -= zisofs->stream.next_in - p;
- }
-next_data:
- bytes_read -= avail;
- *buff = zisofs->uncompressed_buffer;
- *size = uncompressed_size;
- *offset = iso9660->entry_sparse_offset;
- iso9660->entry_sparse_offset += uncompressed_size;
- iso9660->entry_bytes_remaining -= bytes_read;
- iso9660->current_position += bytes_read;
- zisofs->pz_offset += bytes_read;
- __archive_read_consume(a, bytes_read);
-
- return (ARCHIVE_OK);
-}
-
-#else /* HAVE_ZLIB_H */
-
-static int
-zisofs_read_data(struct archive_read *a,
- const void **buff, size_t *size, off_t *offset)
-{
-
- (void)buff;/* UNUSED */
- (void)size;/* UNUSED */
- (void)offset;/* UNUSED */
- archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
- "zisofs is not supported on this platform.");
- return (ARCHIVE_FAILED);
-}
-
-#endif /* HAVE_ZLIB_H */
-
-static int
-archive_read_format_iso9660_read_data(struct archive_read *a,
- const void **buff, size_t *size, off_t *offset)
-{
- ssize_t bytes_read;
- struct iso9660 *iso9660;
-
- iso9660 = (struct iso9660 *)(a->format->data);
- if (iso9660->entry_bytes_remaining <= 0) {
- if (iso9660->entry_content != NULL)
- iso9660->entry_content = iso9660->entry_content->next;
- if (iso9660->entry_content == NULL) {
- *buff = NULL;
- *size = 0;
- *offset = iso9660->entry_sparse_offset;
- return (ARCHIVE_EOF);
- }
- /* Seek forward to the start of the entry. */
- if (iso9660->current_position < iso9660->entry_content->offset) {
- int64_t step;
-
- step = iso9660->entry_content->offset -
- iso9660->current_position;
- step = __archive_read_skip(a, step);
- if (step < 0)
- return ((int)step);
- iso9660->current_position =
- iso9660->entry_content->offset;
- }
- if (iso9660->entry_content->offset < iso9660->current_position) {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "Ignoring out-of-order file (%s) %jd < %jd",
- iso9660->pathname.s,
- iso9660->entry_content->offset,
- iso9660->current_position);
- *buff = NULL;
- *size = 0;
- *offset = iso9660->entry_sparse_offset;
- return (ARCHIVE_WARN);
- }
- iso9660->entry_bytes_remaining = iso9660->entry_content->size;
- }
- if (iso9660->entry_zisofs.pz)
- return (zisofs_read_data(a, buff, size, offset));
-
- *buff = __archive_read_ahead(a, 1, &bytes_read);
- if (bytes_read == 0)
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "Truncated input file");
- if (*buff == NULL)
- return (ARCHIVE_FATAL);
- if (bytes_read > iso9660->entry_bytes_remaining)
- bytes_read = iso9660->entry_bytes_remaining;
- *size = bytes_read;
- *offset = iso9660->entry_sparse_offset;
- iso9660->entry_sparse_offset += bytes_read;
- iso9660->entry_bytes_remaining -= bytes_read;
- iso9660->current_position += bytes_read;
- __archive_read_consume(a, bytes_read);
- return (ARCHIVE_OK);
-}
-
-static int
-archive_read_format_iso9660_cleanup(struct archive_read *a)
-{
- struct iso9660 *iso9660;
- int r = ARCHIVE_OK;
-
- iso9660 = (struct iso9660 *)(a->format->data);
- release_files(iso9660);
- free(iso9660->read_ce_req.reqs);
- archive_string_free(&iso9660->pathname);
- archive_string_free(&iso9660->previous_pathname);
- if (iso9660->pending_files.files)
- free(iso9660->pending_files.files);
-#ifdef HAVE_ZLIB_H
- free(iso9660->entry_zisofs.uncompressed_buffer);
- free(iso9660->entry_zisofs.block_pointers);
- if (iso9660->entry_zisofs.stream_valid) {
- if (inflateEnd(&iso9660->entry_zisofs.stream) != Z_OK) {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "Failed to clean up zlib decompressor");
- r = ARCHIVE_FATAL;
- }
- }
-#endif
- free(iso9660);
- (a->format->data) = NULL;
- return (r);
-}
-
-/*
- * This routine parses a single ISO directory record, makes sense
- * of any extensions, and stores the result in memory.
- */
-static struct file_info *
-parse_file_info(struct archive_read *a, struct file_info *parent,
- const unsigned char *isodirrec)
-{
- struct iso9660 *iso9660;
- struct file_info *file;
- size_t name_len;
- const unsigned char *rr_start, *rr_end;
- const unsigned char *p;
- size_t dr_len;
- uint64_t fsize;
- int32_t location;
- int flags;
-
- iso9660 = (struct iso9660 *)(a->format->data);
-
- dr_len = (size_t)isodirrec[DR_length_offset];
- name_len = (size_t)isodirrec[DR_name_len_offset];
- location = archive_le32dec(isodirrec + DR_extent_offset);
- fsize = toi(isodirrec + DR_size_offset, DR_size_size);
- /* Sanity check that dr_len needs at least 34. */
- if (dr_len < 34) {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "Invalid length of directory record");
- return (NULL);
- }
- /* Sanity check that name_len doesn't exceed dr_len. */
- if (dr_len - 33 < name_len || name_len == 0) {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "Invalid length of file identifier");
- return (NULL);
- }
- /* Sanity check that location doesn't exceed volume block.
- * Don't check lower limit of location; it's possibility
- * the location has negative value when file type is symbolic
- * link or file size is zero. As far as I know latest mkisofs
- * do that.
- */
- if (location > 0 &&
- (location + ((fsize + iso9660->logical_block_size -1)
- / iso9660->logical_block_size)) >
- (unsigned int)iso9660->volume_block) {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "Invalid location of extent of file");
- return (NULL);
- }
-
- /* Create a new file entry and copy data from the ISO dir record. */
- file = (struct file_info *)malloc(sizeof(*file));
- if (file == NULL) {
- archive_set_error(&a->archive, ENOMEM,
- "No memory for file entry");
- return (NULL);
- }
- memset(file, 0, sizeof(*file));
- file->parent = parent;
- file->offset = iso9660->logical_block_size * (uint64_t)location;
- file->size = fsize;
- file->mtime = isodate7(isodirrec + DR_date_offset);
- file->ctime = file->atime = file->mtime;
- file->rede_files.first = NULL;
- file->rede_files.last = &(file->rede_files.first);
-
- p = isodirrec + DR_name_offset;
- /* Rockridge extensions (if any) follow name. Compute this
- * before fidgeting the name_len below. */
- rr_start = p + name_len + (name_len & 1 ? 0 : 1);
- rr_end = isodirrec + dr_len;
-
- if (iso9660->seenJoliet) {
- /* Joliet names are max 64 chars (128 bytes) according to spec,
- * but genisoimage/mkisofs allows recording longer Joliet
- * names which are 103 UCS2 characters(206 bytes) by their
- * option '-joliet-long'.
- */
- wchar_t wbuff[103+1], *wp;
- const unsigned char *c;
-
- if (name_len > 206)
- name_len = 206;
- /* convert BE UTF-16 to wchar_t */
- for (c = p, wp = wbuff;
- c < (p + name_len) &&
- wp < (wbuff + sizeof(wbuff)/sizeof(*wbuff) - 1);
- c += 2) {
- *wp++ = (((255 & (int)c[0]) << 8) | (255 & (int)c[1]));
- }
- *wp = L'\0';
-
-#if 0 /* untested code, is it at all useful on Joliet? */
- /* trim trailing first version and dot from filename.
- *
- * Remember we where in UTF-16BE land!
- * SEPARATOR 1 (.) and SEPARATOR 2 (;) are both
- * 16 bits big endian characters on Joliet.
- *
- * TODO: sanitize filename?
- * Joliet allows any UCS-2 char except:
- * *, /, :, ;, ? and \.
- */
- /* Chop off trailing ';1' from files. */
- if (*(wp-2) == ';' && *(wp-1) == '1') {
- wp-=2;
- *wp = L'\0';
- }
-
- /* Chop off trailing '.' from filenames. */
- if (*(wp-1) == '.')
- *(--wp) = L'\0';
-#endif
-
- /* store the result in the file name field. */
- archive_strappend_w_utf8(&file->name, wbuff);
- } else {
- /* Chop off trailing ';1' from files. */
- if (name_len > 2 && p[name_len - 2] == ';' &&
- p[name_len - 1] == '1')
- name_len -= 2;
- /* Chop off trailing '.' from filenames. */
- if (name_len > 1 && p[name_len - 1] == '.')
- --name_len;
-
- archive_strncpy(&file->name, (const char *)p, name_len);
- }
-
- flags = isodirrec[DR_flags_offset];
- if (flags & 0x02)
- file->mode = AE_IFDIR | 0700;
- else
- file->mode = AE_IFREG | 0400;
- if (flags & 0x80)
- file->multi_extent = 1;
- else
- file->multi_extent = 0;
- /*
- * Use location for file number.
- * File number is treated as inode number to find out harlink
- * target. If Rockridge extensions is being used, file number
- * will be overwritten by FILE SERIAL NUMBER of RRIP "PX"
- * extension.
- * NOTE: Old mkisofs did not record that FILE SERIAL NUMBER
- * in ISO images.
- */
- if (file->size == 0 && location >= 0)
- /* If file->size is zero, its location points wrong place.
- * Dot not use it for file number.
- * When location has negative value, it can be used
- * for file number.
- */
- file->number = -1;
- else
- file->number = (int64_t)(uint32_t)location;
-
- /* Rockridge extensions overwrite information from above. */
- if (iso9660->opt_support_rockridge) {
- if (parent == NULL && rr_end - rr_start >= 7) {
- p = rr_start;
- if (p[0] == 'S' && p[1] == 'P'
- && p[2] == 7 && p[3] == 1
- && p[4] == 0xBE && p[5] == 0xEF) {
- /*
- * SP extension stores the suspOffset
- * (Number of bytes to skip between
- * filename and SUSP records.)
- * It is mandatory by the SUSP standard
- * (IEEE 1281).
- *
- * It allows SUSP to coexist with
- * non-SUSP uses of the System
- * Use Area by placing non-SUSP data
- * before SUSP data.
- *
- * SP extension must be in the root
- * directory entry, disable all SUSP
- * processing if not found.
- */
- iso9660->suspOffset = p[6];
- iso9660->seenSUSP = 1;
- rr_start += 7;
- }
- }
- if (iso9660->seenSUSP) {
- int r;
-
- file->name_continues = 0;
- file->symlink_continues = 0;
- rr_start += iso9660->suspOffset;
- r = parse_rockridge(a, file, rr_start, rr_end);
- if (r != ARCHIVE_OK) {
- free(file);
- return (NULL);
- }
- } else
- /* If there isn't SUSP, disable parsing
- * rock ridge extensions. */
- iso9660->opt_support_rockridge = 0;
- }
-
- file->nlinks = 1;/* Reset nlink. we'll calculate it later. */
- /* Tell file's parent how many children that parent has. */
- if (parent != NULL && (flags & 0x02))
- parent->subdirs++;
-
- if (iso9660->seenRockridge) {
- if (parent != NULL && parent->parent == NULL &&
- (flags & 0x02) && iso9660->rr_moved == NULL &&
- (strcmp(file->name.s, "rr_moved") == 0 ||
- strcmp(file->name.s, ".rr_moved") == 0)) {
- iso9660->rr_moved = file;
- file->rr_moved = 1;
- file->rr_moved_has_re_only = 1;
- file->re = 0;
- parent->subdirs--;
- } else if (file->re) {
- /* This file's parent is not rr_moved, clear invalid
- * "RE" mark. */
- if (parent == NULL || parent->rr_moved == 0)
- file->re = 0;
- else if ((flags & 0x02) == 0) {
- file->rr_moved_has_re_only = 0;
- file->re = 0;
- }
- } else if (parent != NULL && parent->rr_moved)
- file->rr_moved_has_re_only = 0;
- else if (parent != NULL && (flags & 0x02) &&
- (parent->re || parent->re_descendant))
- file->re_descendant = 1;
- if (file->cl_offset != 0) {
- parent->subdirs++;
- /* Overwrite an offset and a number of this "CL" entry
- * to appear before other dirs. "+1" to those is to
- * make sure to appear after "RE" entry which this
- * "CL" entry should be connected with. */
- file->offset = file->number = file->cl_offset + 1;
- }
- }
-
-#if DEBUG
- /* DEBUGGING: Warn about attributes I don't yet fully support. */
- if ((flags & ~0x02) != 0) {
- fprintf(stderr, "\n ** Unrecognized flag: ");
- dump_isodirrec(stderr, isodirrec);
- fprintf(stderr, "\n");
- } else if (toi(isodirrec + DR_volume_sequence_number_offset, 2) != 1) {
- fprintf(stderr, "\n ** Unrecognized sequence number: ");
- dump_isodirrec(stderr, isodirrec);
- fprintf(stderr, "\n");
- } else if (*(isodirrec + DR_file_unit_size_offset) != 0) {
- fprintf(stderr, "\n ** Unexpected file unit size: ");
- dump_isodirrec(stderr, isodirrec);
- fprintf(stderr, "\n");
- } else if (*(isodirrec + DR_interleave_offset) != 0) {
- fprintf(stderr, "\n ** Unexpected interleave: ");
- dump_isodirrec(stderr, isodirrec);
- fprintf(stderr, "\n");
- } else if (*(isodirrec + DR_ext_attr_length_offset) != 0) {
- fprintf(stderr, "\n ** Unexpected extended attribute length: ");
- dump_isodirrec(stderr, isodirrec);
- fprintf(stderr, "\n");
- }
-#endif
- register_file(iso9660, file);
- return (file);
-}
-
-static int
-parse_rockridge(struct archive_read *a, struct file_info *file,
- const unsigned char *p, const unsigned char *end)
-{
- struct iso9660 *iso9660;
-
- iso9660 = (struct iso9660 *)(a->format->data);
-
- while (p + 4 <= end /* Enough space for another entry. */
- && p[0] >= 'A' && p[0] <= 'Z' /* Sanity-check 1st char of name. */
- && p[1] >= 'A' && p[1] <= 'Z' /* Sanity-check 2nd char of name. */
- && p[2] >= 4 /* Sanity-check length. */
- && p + p[2] <= end) { /* Sanity-check length. */
- const unsigned char *data = p + 4;
- int data_length = p[2] - 4;
- int version = p[3];
-
- /*
- * Yes, each 'if' here does test p[0] again.
- * Otherwise, the fall-through handling to catch
- * unsupported extensions doesn't work.
- */
- switch(p[0]) {
- case 'C':
- if (p[0] == 'C' && p[1] == 'E') {
- if (version == 1 && data_length == 24) {
- /*
- * CE extension comprises:
- * 8 byte sector containing extension
- * 8 byte offset w/in above sector
- * 8 byte length of continuation
- */
- int32_t location =
- archive_le32dec(data);
- file->ce_offset =
- archive_le32dec(data+8);
- file->ce_size =
- archive_le32dec(data+16);
- if (register_CE(a, location, file)
- != ARCHIVE_OK)
- return (ARCHIVE_FATAL);
- }
- break;
- }
- if (p[0] == 'C' && p[1] == 'L') {
- if (version == 1 && data_length == 8) {
- file->cl_offset = (uint64_t)
- iso9660->logical_block_size *
- (uint64_t)archive_le32dec(data);
- iso9660->seenRockridge = 1;
- }
- break;
- }
- /* FALLTHROUGH */
- case 'N':
- if (p[0] == 'N' && p[1] == 'M') {
- if (version == 1) {
- parse_rockridge_NM1(file,
- data, data_length);
- iso9660->seenRockridge = 1;
- }
- break;
- }
- /* FALLTHROUGH */
- case 'P':
- if (p[0] == 'P' && p[1] == 'D') {
- /*
- * PD extension is padding;
- * contents are always ignored.
- */
- break;
- }
- if (p[0] == 'P' && p[1] == 'N') {
- if (version == 1 && data_length == 16) {
- file->rdev = toi(data,4);
- file->rdev <<= 32;
- file->rdev |= toi(data + 8, 4);
- iso9660->seenRockridge = 1;
- }
- break;
- }
- if (p[0] == 'P' && p[1] == 'X') {
- /*
- * PX extension comprises:
- * 8 bytes for mode,
- * 8 bytes for nlinks,
- * 8 bytes for uid,
- * 8 bytes for gid,
- * 8 bytes for inode.
- */
- if (version == 1) {
- if (data_length >= 8)
- file->mode
- = toi(data, 4);
- if (data_length >= 16)
- file->nlinks
- = toi(data + 8, 4);
- if (data_length >= 24)
- file->uid
- = toi(data + 16, 4);
- if (data_length >= 32)
- file->gid
- = toi(data + 24, 4);
- if (data_length >= 40)
- file->number
- = toi(data + 32, 4);
- iso9660->seenRockridge = 1;
- }
- break;
- }
- /* FALLTHROUGH */
- case 'R':
- if (p[0] == 'R' && p[1] == 'E' && version == 1) {
- file->re = 1;
- iso9660->seenRockridge = 1;
- break;
- }
- if (p[0] == 'R' && p[1] == 'R' && version == 1) {
- /*
- * RR extension comprises:
- * one byte flag value
- * This extension is obsolete,
- * so contents are always ignored.
- */
- break;
- }
- /* FALLTHROUGH */
- case 'S':
- if (p[0] == 'S' && p[1] == 'L') {
- if (version == 1) {
- parse_rockridge_SL1(file,
- data, data_length);
- iso9660->seenRockridge = 1;
- }
- break;
- }
- if (p[0] == 'S' && p[1] == 'T'
- && data_length == 0 && version == 1) {
- /*
- * ST extension marks end of this
- * block of SUSP entries.
- *
- * It allows SUSP to coexist with
- * non-SUSP uses of the System
- * Use Area by placing non-SUSP data
- * after SUSP data.
- */
- iso9660->seenSUSP = 0;
- iso9660->seenRockridge = 0;
- return (ARCHIVE_OK);
- }
- case 'T':
- if (p[0] == 'T' && p[1] == 'F') {
- if (version == 1) {
- parse_rockridge_TF1(file,
- data, data_length);
- iso9660->seenRockridge = 1;
- }
- break;
- }
- /* FALLTHROUGH */
- case 'Z':
- if (p[0] == 'Z' && p[1] == 'F') {
- if (version == 1)
- parse_rockridge_ZF1(file,
- data, data_length);
- break;
- }
- /* FALLTHROUGH */
- default:
- /* The FALLTHROUGHs above leave us here for
- * any unsupported extension. */
- break;
- }
-
-
-
- p += p[2];
- }
- return (ARCHIVE_OK);
-}
-
-static int
-register_CE(struct archive_read *a, int32_t location,
- struct file_info *file)
-{
- struct iso9660 *iso9660;
- struct read_ce_queue *heap;
- struct read_ce_req *p;
- uint64_t offset, parent_offset;
- int hole, parent;
-
- iso9660 = (struct iso9660 *)(a->format->data);
- offset = ((uint64_t)location) * (uint64_t)iso9660->logical_block_size;
- if (((file->mode & AE_IFMT) == AE_IFREG &&
- offset >= file->offset) ||
- offset < iso9660->current_position) {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "Invalid location in SUSP \"CE\" extension");
- return (ARCHIVE_FATAL);
- }
-
- /* Expand our CE list as necessary. */
- heap = &(iso9660->read_ce_req);
- if (heap->cnt >= heap->allocated) {
- int new_size;
-
- if (heap->allocated < 16)
- new_size = 16;
- else
- new_size = heap->allocated * 2;
- /* Overflow might keep us from growing the list. */
- if (new_size <= heap->allocated)
- __archive_errx(1, "Out of memory");
- p = malloc(new_size * sizeof(p[0]));
- if (p == NULL)
- __archive_errx(1, "Out of memory");
- if (heap->reqs != NULL) {
- memcpy(p, heap->reqs, heap->cnt * sizeof(*p));
- free(heap->reqs);
- }
- heap->reqs = p;
- heap->allocated = new_size;
- }
-
- /*
- * Start with hole at end, walk it up tree to find insertion point.
- */
- hole = heap->cnt++;
- while (hole > 0) {
- parent = (hole - 1)/2;
- parent_offset = heap->reqs[parent].offset;
- if (offset >= parent_offset) {
- heap->reqs[hole].offset = offset;
- heap->reqs[hole].file = file;
- return (ARCHIVE_OK);
- }
- // Move parent into hole <==> move hole up tree.
- heap->reqs[hole] = heap->reqs[parent];
- hole = parent;
- }
- heap->reqs[0].offset = offset;
- heap->reqs[0].file = file;
- return (ARCHIVE_OK);
-}
-
-static void
-next_CE(struct read_ce_queue *heap)
-{
- uint64_t a_offset, b_offset, c_offset;
- int a, b, c;
- struct read_ce_req tmp;
-
- if (heap->cnt < 1)
- return;
-
- /*
- * Move the last item in the heap to the root of the tree
- */
- heap->reqs[0] = heap->reqs[--(heap->cnt)];
-
- /*
- * Rebalance the heap.
- */
- a = 0; // Starting element and its offset
- a_offset = heap->reqs[a].offset;
- for (;;) {
- b = a + a + 1; // First child
- if (b >= heap->cnt)
- return;
- b_offset = heap->reqs[b].offset;
- c = b + 1; // Use second child if it is smaller.
- if (c < heap->cnt) {
- c_offset = heap->reqs[c].offset;
- if (c_offset < b_offset) {
- b = c;
- b_offset = c_offset;
- }
- }
- if (a_offset <= b_offset)
- return;
- tmp = heap->reqs[a];
- heap->reqs[a] = heap->reqs[b];
- heap->reqs[b] = tmp;
- a = b;
- }
-}
-
-
-static int
-read_CE(struct archive_read *a, struct iso9660 *iso9660)
-{
- struct read_ce_queue *heap;
- const unsigned char *b, *p, *end;
- struct file_info *file;
- size_t step;
- int r;
-
- /* Read data which RRIP "CE" extension points. */
- heap = &(iso9660->read_ce_req);
- step = iso9660->logical_block_size;
- while (heap->cnt &&
- heap->reqs[0].offset == iso9660->current_position) {
- b = __archive_read_ahead(a, step, NULL);
- if (b == NULL) {
- archive_set_error(&a->archive,
- ARCHIVE_ERRNO_MISC,
- "Failed to read full block when scanning "
- "ISO9660 directory list");
- return (ARCHIVE_FATAL);
- }
- do {
- file = heap->reqs[0].file;
- p = b + file->ce_offset;
- end = p + file->ce_size;
- next_CE(heap);
- r = parse_rockridge(a, file, p, end);
- if (r != ARCHIVE_OK)
- return (ARCHIVE_FATAL);
- } while (heap->cnt &&
- heap->reqs[0].offset == iso9660->current_position);
- /* NOTE: Do not move this consume's code to fron of
- * do-while loop. Registration of nested CE extension
- * might cause error because of current position. */
- __archive_read_consume(a, step);
- iso9660->current_position += step;
- }
- return (ARCHIVE_OK);
-}
-
-static void
-parse_rockridge_NM1(struct file_info *file,
- const unsigned char *data, int data_length)
-{
- if (!file->name_continues)
- archive_string_empty(&file->name);
- file->name_continues = 0;
- if (data_length < 1)
- return;
- /*
- * NM version 1 extension comprises:
- * 1 byte flag, value is one of:
- * = 0: remainder is name
- * = 1: remainder is name, next NM entry continues name
- * = 2: "."
- * = 4: ".."
- * = 32: Implementation specific
- * All other values are reserved.
- */
- switch(data[0]) {
- case 0:
- if (data_length < 2)
- return;
- archive_strncat(&file->name, (const char *)data + 1, data_length - 1);
- break;
- case 1:
- if (data_length < 2)
- return;
- archive_strncat(&file->name, (const char *)data + 1, data_length - 1);
- file->name_continues = 1;
- break;
- case 2:
- archive_strcat(&file->name, ".");
- break;
- case 4:
- archive_strcat(&file->name, "..");
- break;
- default:
- return;
- }
-
-}
-
-static void
-parse_rockridge_TF1(struct file_info *file, const unsigned char *data,
- int data_length)
-{
- char flag;
- /*
- * TF extension comprises:
- * one byte flag
- * create time (optional)
- * modify time (optional)
- * access time (optional)
- * attribute time (optional)
- * Time format and presence of fields
- * is controlled by flag bits.
- */
- if (data_length < 1)
- return;
- flag = data[0];
- ++data;
- --data_length;
- if (flag & 0x80) {
- /* Use 17-byte time format. */
- if ((flag & 1) && data_length >= 17) {
- /* Create time. */
- file->birthtime_is_set = 1;
- file->birthtime = isodate17(data);
- data += 17;
- data_length -= 17;
- }
- if ((flag & 2) && data_length >= 17) {
- /* Modify time. */
- file->mtime = isodate17(data);
- data += 17;
- data_length -= 17;
- }
- if ((flag & 4) && data_length >= 17) {
- /* Access time. */
- file->atime = isodate17(data);
- data += 17;
- data_length -= 17;
- }
- if ((flag & 8) && data_length >= 17) {
- /* Attribute change time. */
- file->ctime = isodate17(data);
- }
- } else {
- /* Use 7-byte time format. */
- if ((flag & 1) && data_length >= 7) {
- /* Create time. */
- file->birthtime_is_set = 1;
- file->birthtime = isodate7(data);
- data += 7;
- data_length -= 7;
- }
- if ((flag & 2) && data_length >= 7) {
- /* Modify time. */
- file->mtime = isodate7(data);
- data += 7;
- data_length -= 7;
- }
- if ((flag & 4) && data_length >= 7) {
- /* Access time. */
- file->atime = isodate7(data);
- data += 7;
- data_length -= 7;
- }
- if ((flag & 8) && data_length >= 7) {
- /* Attribute change time. */
- file->ctime = isodate7(data);
- }
- }
-}
-
-static void
-parse_rockridge_SL1(struct file_info *file, const unsigned char *data,
- int data_length)
-{
- const char *separator = "";
-
- if (!file->symlink_continues || file->symlink.length < 1)
- archive_string_empty(&file->symlink);
- else if (!file->symlink_continues &&
- file->symlink.s[file->symlink.length - 1] != '/')
- separator = "/";
- file->symlink_continues = 0;
-
- /*
- * Defined flag values:
- * 0: This is the last SL record for this symbolic link
- * 1: this symbolic link field continues in next SL entry
- * All other values are reserved.
- */
- if (data_length < 1)
- return;
- switch(*data) {
- case 0:
- break;
- case 1:
- file->symlink_continues = 1;
- break;
- default:
- return;
- }
- ++data; /* Skip flag byte. */
- --data_length;
-
- /*
- * SL extension body stores "components".
- * Basically, this is a complicated way of storing
- * a POSIX path. It also interferes with using
- * symlinks for storing non-path data. <sigh>
- *
- * Each component is 2 bytes (flag and length)
- * possibly followed by name data.
- */
- while (data_length >= 2) {
- unsigned char flag = *data++;
- unsigned char nlen = *data++;
- data_length -= 2;
-
- archive_strcat(&file->symlink, separator);
- separator = "/";
-
- switch(flag) {
- case 0: /* Usual case, this is text. */
- if (data_length < nlen)
- return;
- archive_strncat(&file->symlink,
- (const char *)data, nlen);
- break;
- case 0x01: /* Text continues in next component. */
- if (data_length < nlen)
- return;
- archive_strncat(&file->symlink,
- (const char *)data, nlen);
- separator = "";
- break;
- case 0x02: /* Current dir. */
- archive_strcat(&file->symlink, ".");
- break;
- case 0x04: /* Parent dir. */
- archive_strcat(&file->symlink, "..");
- break;
- case 0x08: /* Root of filesystem. */
- archive_strcat(&file->symlink, "/");
- separator = "";
- break;
- case 0x10: /* Undefined (historically "volume root" */
- archive_string_empty(&file->symlink);
- archive_strcat(&file->symlink, "ROOT");
- break;
- case 0x20: /* Undefined (historically "hostname") */
- archive_strcat(&file->symlink, "hostname");
- break;
- default:
- /* TODO: issue a warning ? */
- return;
- }
- data += nlen;
- data_length -= nlen;
- }
-}
-
-static void
-parse_rockridge_ZF1(struct file_info *file, const unsigned char *data,
- int data_length)
-{
-
- if (data[0] == 0x70 && data[1] == 0x7a && data_length == 12) {
- /* paged zlib */
- file->pz = 1;
- file->pz_log2_bs = data[3];
- file->pz_uncompressed_size = archive_le32dec(&data[4]);
- }
-}
-
-static void
-register_file(struct iso9660 *iso9660, struct file_info *file)
-{
-
- file->use_next = iso9660->use_files;
- iso9660->use_files = file;
-}
-
-static void
-release_files(struct iso9660 *iso9660)
-{
- struct content *con, *connext;
- struct file_info *file;
-
- file = iso9660->use_files;
- while (file != NULL) {
- struct file_info *next = file->use_next;
-
- archive_string_free(&file->name);
- archive_string_free(&file->symlink);
- con = file->contents.first;
- while (con != NULL) {
- connext = con->next;
- free(con);
- con = connext;
- }
- free(file);
- file = next;
- }
-}
-
-static int
-next_entry_seek(struct archive_read *a, struct iso9660 *iso9660,
- struct file_info **pfile)
-{
- struct file_info *file;
- int r;
-
- r = next_cache_entry(a, iso9660, pfile);
- if (r != ARCHIVE_OK)
- return (r);
- file = *pfile;
-
- /* Don't waste time seeking for zero-length bodies. */
- if (file->size == 0)
- file->offset = iso9660->current_position;
-
- /* Seek forward to the start of the entry. */
- if (iso9660->current_position < file->offset) {
- int64_t step;
-
- step = file->offset - iso9660->current_position;
- step = __archive_read_skip(a, step);
- if (step < 0)
- return ((int)step);
- iso9660->current_position = file->offset;
- }
-
- /* We found body of file; handle it now. */
- return (ARCHIVE_OK);
-}
-
-static int
-next_cache_entry(struct archive_read *a, struct iso9660 *iso9660,
- struct file_info **pfile)
-{
- struct file_info *file;
- struct {
- struct file_info *first;
- struct file_info **last;
- } empty_files;
- int64_t number;
- int count;
-
- file = cache_get_entry(iso9660);
- if (file != NULL) {
- *pfile = file;
- return (ARCHIVE_OK);
- }
-
- for (;;) {
- struct file_info *re, *d;
-
- *pfile = file = next_entry(iso9660);
- if (file == NULL) {
- /*
- * If directory entries all which are descendant of
- * rr_moved are stil remaning, expose their.
- */
- if (iso9660->re_files.first != NULL &&
- iso9660->rr_moved != NULL &&
- iso9660->rr_moved->rr_moved_has_re_only)
- /* Expose "rr_moved" entry. */
- cache_add_entry(iso9660, iso9660->rr_moved);
- while ((re = re_get_entry(iso9660)) != NULL) {
- /* Expose its descendant dirs. */
- while ((d = rede_get_entry(re)) != NULL)
- cache_add_entry(iso9660, d);
- }
- if (iso9660->cache_files.first != NULL)
- return (next_cache_entry(a, iso9660, pfile));
- return (ARCHIVE_EOF);
- }
-
- if (file->cl_offset) {
- struct file_info *first_re = NULL;
- int nexted_re = 0;
-
- /*
- * Find "RE" dir for the current file, which
- * has "CL" flag.
- */
- while ((re = re_get_entry(iso9660))
- != first_re) {
- if (first_re == NULL)
- first_re = re;
- if (re->offset == file->cl_offset) {
- re->parent->subdirs--;
- re->parent = file->parent;
- re->re = 0;
- if (re->parent->re_descendant) {
- nexted_re = 1;
- re->re_descendant = 1;
- if (rede_add_entry(re) < 0)
- goto fatal_rr;
- /* Move a list of descendants
- * to a new ancestor. */
- while ((d = rede_get_entry(
- re)) != NULL)
- if (rede_add_entry(d)
- < 0)
- goto fatal_rr;
- break;
- }
- /* Replace the current file
- * with "RE" dir */
- *pfile = file = re;
- /* Expose its descendant */
- while ((d = rede_get_entry(
- file)) != NULL)
- cache_add_entry(
- iso9660, d);
- break;
- } else
- re_add_entry(iso9660, re);
- }
- if (nexted_re) {
- /*
- * Do not expose this at this time
- * because we have not gotten its full-path
- * name yet.
- */
- continue;
- }
- } else if ((file->mode & AE_IFMT) == AE_IFDIR) {
- int r;
-
- /* Read file entries in this dir. */
- r = read_children(a, file);
- if (r != ARCHIVE_OK)
- return (r);
-
- /*
- * Handle a special dir of Rockridge extensions,
- * "rr_moved".
- */
- if (file->rr_moved) {
- /*
- * If this has only the subdirectories which
- * have "RE" flags, do not expose at this time.
- */
- if (file->rr_moved_has_re_only)
- continue;
- /* Otherwise expose "rr_moved" entry. */
- } else if (file->re) {
- /*
- * Do not expose this at this time
- * because we have not gotten its full-path
- * name yet.
- */
- re_add_entry(iso9660, file);
- continue;
- } else if (file->re_descendant) {
- /*
- * If the top level "RE" entry of this entry
- * is not exposed, we, accordingly, should not
- * expose this entry at this time because
- * we cannot make its proper full-path name.
- */
- if (rede_add_entry(file) == 0)
- continue;
- /* Otherwise we can expose this entry because
- * it seems its top level "RE" has already been
- * exposed. */
- }
- }
- break;
- }
-
- if ((file->mode & AE_IFMT) != AE_IFREG || file->number == -1)
- return (ARCHIVE_OK);
-
- count = 0;
- number = file->number;
- iso9660->cache_files.first = NULL;
- iso9660->cache_files.last = &(iso9660->cache_files.first);
- empty_files.first = NULL;
- empty_files.last = &empty_files.first;
- /* Collect files which has the same file serial number.
- * Peek pending_files so that file which number is different
- * is not put bak. */
- while (iso9660->pending_files.used > 0 &&
- (iso9660->pending_files.files[0]->number == -1 ||
- iso9660->pending_files.files[0]->number == number)) {
- if (file->number == -1) {
- /* This file has the same offset
- * but it's wrong offset which empty files
- * and symlink files have.
- * NOTE: This wrong offse was recorded by
- * old mkisofs utility. If ISO images is
- * created by latest mkisofs, this does not
- * happen.
- */
- file->next = NULL;
- *empty_files.last = file;
- empty_files.last = &(file->next);
- } else {
- count++;
- cache_add_entry(iso9660, file);
- }
- file = next_entry(iso9660);
- }
-
- if (count == 0) {
- *pfile = file;
- return ((file == NULL)?ARCHIVE_EOF:ARCHIVE_OK);
- }
- if (file->number == -1) {
- file->next = NULL;
- *empty_files.last = file;
- empty_files.last = &(file->next);
- } else {
- count++;
- cache_add_entry(iso9660, file);
- }
-
- if (count > 1) {
- /* The count is the same as number of hardlink,
- * so much so that each nlinks of files in cache_file
- * is overwritten by value of the count.
- */
- for (file = iso9660->cache_files.first;
- file != NULL; file = file->next)
- file->nlinks = count;
- }
- /* If there are empty files, that files are added
- * to the tail of the cache_files. */
- if (empty_files.first != NULL) {
- *iso9660->cache_files.last = empty_files.first;
- iso9660->cache_files.last = empty_files.last;
- }
- *pfile = cache_get_entry(iso9660);
- return ((*pfile == NULL)?ARCHIVE_EOF:ARCHIVE_OK);
-
-fatal_rr:
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "Failed to connect 'CL' pointer to 'RE' rr_moved pointer of"
- "Rockridge extensions");
- return (ARCHIVE_FATAL);
-}
-
-static inline void
-re_add_entry(struct iso9660 *iso9660, struct file_info *file)
-{
- file->re_next = NULL;
- *iso9660->re_files.last = file;
- iso9660->re_files.last = &(file->re_next);
-}
-
-static inline struct file_info *
-re_get_entry(struct iso9660 *iso9660)
-{
- struct file_info *file;
-
- if ((file = iso9660->re_files.first) != NULL) {
- iso9660->re_files.first = file->re_next;
- if (iso9660->re_files.first == NULL)
- iso9660->re_files.last =
- &(iso9660->re_files.first);
- }
- return (file);
-}
-
-static inline int
-rede_add_entry(struct file_info *file)
-{
- struct file_info *re;
-
- re = file->parent;
- while (re != NULL && !re->re)
- re = re->parent;
- if (re == NULL)
- return (-1);
-
- file->re_next = NULL;
- *re->rede_files.last = file;
- re->rede_files.last = &(file->re_next);
- return (0);
-}
-
-static inline struct file_info *
-rede_get_entry(struct file_info *re)
-{
- struct file_info *file;
-
- if ((file = re->rede_files.first) != NULL) {
- re->rede_files.first = file->re_next;
- if (re->rede_files.first == NULL)
- re->rede_files.last =
- &(re->rede_files.first);
- }
- return (file);
-}
-
-static inline void
-cache_add_entry(struct iso9660 *iso9660, struct file_info *file)
-{
- file->next = NULL;
- *iso9660->cache_files.last = file;
- iso9660->cache_files.last = &(file->next);
-}
-
-static inline struct file_info *
-cache_get_entry(struct iso9660 *iso9660)
-{
- struct file_info *file;
-
- if ((file = iso9660->cache_files.first) != NULL) {
- iso9660->cache_files.first = file->next;
- if (iso9660->cache_files.first == NULL)
- iso9660->cache_files.last = &(iso9660->cache_files.first);
- }
- return (file);
-}
-
-static void
-heap_add_entry(struct heap_queue *heap, struct file_info *file, uint64_t key)
-{
- uint64_t file_key, parent_key;
- int hole, parent;
-
- /* Expand our pending files list as necessary. */
- if (heap->used >= heap->allocated) {
- struct file_info **new_pending_files;
- int new_size = heap->allocated * 2;
-
- if (heap->allocated < 1024)
- new_size = 1024;
- /* Overflow might keep us from growing the list. */
- if (new_size <= heap->allocated)
- __archive_errx(1, "Out of memory");
- new_pending_files = (struct file_info **)
- malloc(new_size * sizeof(new_pending_files[0]));
- if (new_pending_files == NULL)
- __archive_errx(1, "Out of memory");
- memcpy(new_pending_files, heap->files,
- heap->allocated * sizeof(new_pending_files[0]));
- if (heap->files != NULL)
- free(heap->files);
- heap->files = new_pending_files;
- heap->allocated = new_size;
- }
-
- file_key = file->key = key;
-
- /*
- * Start with hole at end, walk it up tree to find insertion point.
- */
- hole = heap->used++;
- while (hole > 0) {
- parent = (hole - 1)/2;
- parent_key = heap->files[parent]->key;
- if (file_key >= parent_key) {
- heap->files[hole] = file;
- return;
- }
- // Move parent into hole <==> move hole up tree.
- heap->files[hole] = heap->files[parent];
- hole = parent;
- }
- heap->files[0] = file;
-}
-
-static struct file_info *
-heap_get_entry(struct heap_queue *heap)
-{
- uint64_t a_key, b_key, c_key;
- int a, b, c;
- struct file_info *r, *tmp;
-
- if (heap->used < 1)
- return (NULL);
-
- /*
- * The first file in the list is the earliest; we'll return this.
- */
- r = heap->files[0];
-
- /*
- * Move the last item in the heap to the root of the tree
- */
- heap->files[0] = heap->files[--(heap->used)];
-
- /*
- * Rebalance the heap.
- */
- a = 0; // Starting element and its heap key
- a_key = heap->files[a]->key;
- for (;;) {
- b = a + a + 1; // First child
- if (b >= heap->used)
- return (r);
- b_key = heap->files[b]->key;
- c = b + 1; // Use second child if it is smaller.
- if (c < heap->used) {
- c_key = heap->files[c]->key;
- if (c_key < b_key) {
- b = c;
- b_key = c_key;
- }
- }
- if (a_key <= b_key)
- return (r);
- tmp = heap->files[a];
- heap->files[a] = heap->files[b];
- heap->files[b] = tmp;
- a = b;
- }
-}
-
-static unsigned int
-toi(const void *p, int n)
-{
- const unsigned char *v = (const unsigned char *)p;
- if (n > 1)
- return v[0] + 256 * toi(v + 1, n - 1);
- if (n == 1)
- return v[0];
- return (0);
-}
-
-static time_t
-isodate7(const unsigned char *v)
-{
- struct tm tm;
- int offset;
- memset(&tm, 0, sizeof(tm));
- tm.tm_year = v[0];
- tm.tm_mon = v[1] - 1;
- tm.tm_mday = v[2];
- tm.tm_hour = v[3];
- tm.tm_min = v[4];
- tm.tm_sec = v[5];
- /* v[6] is the signed timezone offset, in 1/4-hour increments. */
- offset = ((const signed char *)v)[6];
- if (offset > -48 && offset < 52) {
- tm.tm_hour -= offset / 4;
- tm.tm_min -= (offset % 4) * 15;
- }
- return (time_from_tm(&tm));
-}
-
-static time_t
-isodate17(const unsigned char *v)
-{
- struct tm tm;
- int offset;
- memset(&tm, 0, sizeof(tm));
- tm.tm_year = (v[0] - '0') * 1000 + (v[1] - '0') * 100
- + (v[2] - '0') * 10 + (v[3] - '0')
- - 1900;
- tm.tm_mon = (v[4] - '0') * 10 + (v[5] - '0');
- tm.tm_mday = (v[6] - '0') * 10 + (v[7] - '0');
- tm.tm_hour = (v[8] - '0') * 10 + (v[9] - '0');
- tm.tm_min = (v[10] - '0') * 10 + (v[11] - '0');
- tm.tm_sec = (v[12] - '0') * 10 + (v[13] - '0');
- /* v[16] is the signed timezone offset, in 1/4-hour increments. */
- offset = ((const signed char *)v)[16];
- if (offset > -48 && offset < 52) {
- tm.tm_hour -= offset / 4;
- tm.tm_min -= (offset % 4) * 15;
- }
- return (time_from_tm(&tm));
-}
-
-static time_t
-time_from_tm(struct tm *t)
-{
-#if HAVE_TIMEGM
- /* Use platform timegm() if available. */
- return (timegm(t));
-#else
- /* Else use direct calculation using POSIX assumptions. */
- /* First, fix up tm_yday based on the year/month/day. */
- mktime(t);
- /* Then we can compute timegm() from first principles. */
- return (t->tm_sec + t->tm_min * 60 + t->tm_hour * 3600
- + t->tm_yday * 86400 + (t->tm_year - 70) * 31536000
- + ((t->tm_year - 69) / 4) * 86400 -
- ((t->tm_year - 1) / 100) * 86400
- + ((t->tm_year + 299) / 400) * 86400);
-#endif
-}
-
-static const char *
-build_pathname(struct archive_string *as, struct file_info *file)
-{
- if (file->parent != NULL && archive_strlen(&file->parent->name) > 0) {
- build_pathname(as, file->parent);
- archive_strcat(as, "/");
- }
- if (archive_strlen(&file->name) == 0)
- archive_strcat(as, ".");
- else
- archive_string_concat(as, &file->name);
- return (as->s);
-}
-
-#if DEBUG
-static void
-dump_isodirrec(FILE *out, const unsigned char *isodirrec)
-{
- fprintf(out, " l %d,",
- toi(isodirrec + DR_length_offset, DR_length_size));
- fprintf(out, " a %d,",
- toi(isodirrec + DR_ext_attr_length_offset, DR_ext_attr_length_size));
- fprintf(out, " ext 0x%x,",
- toi(isodirrec + DR_extent_offset, DR_extent_size));
- fprintf(out, " s %d,",
- toi(isodirrec + DR_size_offset, DR_extent_size));
- fprintf(out, " f 0x%02x,",
- toi(isodirrec + DR_flags_offset, DR_flags_size));
- fprintf(out, " u %d,",
- toi(isodirrec + DR_file_unit_size_offset, DR_file_unit_size_size));
- fprintf(out, " ilv %d,",
- toi(isodirrec + DR_interleave_offset, DR_interleave_size));
- fprintf(out, " seq %d,",
- toi(isodirrec + DR_volume_sequence_number_offset, DR_volume_sequence_number_size));
- fprintf(out, " nl %d:",
- toi(isodirrec + DR_name_len_offset, DR_name_len_size));
- fprintf(out, " `%.*s'",
- toi(isodirrec + DR_name_len_offset, DR_name_len_size), isodirrec + DR_name_offset);
-}
-#endif
diff --git a/lib/libarchive/archive_read_support_format_tar.c b/lib/libarchive/archive_read_support_format_tar.c
deleted file mode 100644
index 20e1293..0000000
--- a/lib/libarchive/archive_read_support_format_tar.c
+++ /dev/null
@@ -1,2418 +0,0 @@
-/*-
- * Copyright (c) 2003-2007 Tim Kientzle
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "archive_platform.h"
-__FBSDID("$FreeBSD$");
-
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#include <stddef.h>
-/* #include <stdint.h> */ /* See archive_platform.h */
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-
-/* Obtain suitable wide-character manipulation functions. */
-#ifdef HAVE_WCHAR_H
-#include <wchar.h>
-#else
-/* Good enough for equality testing, which is all we need. */
-static int wcscmp(const wchar_t *s1, const wchar_t *s2)
-{
- int diff = *s1 - *s2;
- while (*s1 && diff == 0)
- diff = (int)*++s1 - (int)*++s2;
- return diff;
-}
-/* Good enough for equality testing, which is all we need. */
-static int wcsncmp(const wchar_t *s1, const wchar_t *s2, size_t n)
-{
- int diff = *s1 - *s2;
- while (*s1 && diff == 0 && n-- > 0)
- diff = (int)*++s1 - (int)*++s2;
- return diff;
-}
-static size_t wcslen(const wchar_t *s)
-{
- const wchar_t *p = s;
- while (*p)
- p++;
- return p - s;
-}
-#endif
-
-#include "archive.h"
-#include "archive_entry.h"
-#include "archive_private.h"
-#include "archive_read_private.h"
-
-#define tar_min(a,b) ((a) < (b) ? (a) : (b))
-
-/*
- * Layout of POSIX 'ustar' tar header.
- */
-struct archive_entry_header_ustar {
- char name[100];
- char mode[8];
- char uid[8];
- char gid[8];
- char size[12];
- char mtime[12];
- char checksum[8];
- char typeflag[1];
- char linkname[100]; /* "old format" header ends here */
- char magic[6]; /* For POSIX: "ustar\0" */
- char version[2]; /* For POSIX: "00" */
- char uname[32];
- char gname[32];
- char rdevmajor[8];
- char rdevminor[8];
- char prefix[155];
-};
-
-/*
- * Structure of GNU tar header
- */
-struct gnu_sparse {
- char offset[12];
- char numbytes[12];
-};
-
-struct archive_entry_header_gnutar {
- char name[100];
- char mode[8];
- char uid[8];
- char gid[8];
- char size[12];
- char mtime[12];
- char checksum[8];
- char typeflag[1];
- char linkname[100];
- char magic[8]; /* "ustar \0" (note blank/blank/null at end) */
- char uname[32];
- char gname[32];
- char rdevmajor[8];
- char rdevminor[8];
- char atime[12];
- char ctime[12];
- char offset[12];
- char longnames[4];
- char unused[1];
- struct gnu_sparse sparse[4];
- char isextended[1];
- char realsize[12];
- /*
- * Old GNU format doesn't use POSIX 'prefix' field; they use
- * the 'L' (longname) entry instead.
- */
-};
-
-/*
- * Data specific to this format.
- */
-struct sparse_block {
- struct sparse_block *next;
- off_t offset;
- off_t remaining;
-};
-
-struct tar {
- struct archive_string acl_text;
- struct archive_string entry_pathname;
- /* For "GNU.sparse.name" and other similar path extensions. */
- struct archive_string entry_pathname_override;
- struct archive_string entry_linkpath;
- struct archive_string entry_uname;
- struct archive_string entry_gname;
- struct archive_string longlink;
- struct archive_string longname;
- struct archive_string pax_header;
- struct archive_string pax_global;
- struct archive_string line;
- int pax_hdrcharset_binary;
- wchar_t *pax_entry;
- size_t pax_entry_length;
- int header_recursion_depth;
- int64_t entry_bytes_remaining;
- int64_t entry_offset;
- int64_t entry_padding;
- int64_t realsize;
- struct sparse_block *sparse_list;
- struct sparse_block *sparse_last;
- int64_t sparse_offset;
- int64_t sparse_numbytes;
- int sparse_gnu_major;
- int sparse_gnu_minor;
- char sparse_gnu_pending;
-};
-
-static ssize_t UTF8_mbrtowc(wchar_t *pwc, const char *s, size_t n);
-static int archive_block_is_null(const unsigned char *p);
-static char *base64_decode(const char *, size_t, size_t *);
-static void gnu_add_sparse_entry(struct tar *,
- off_t offset, off_t remaining);
-static void gnu_clear_sparse_list(struct tar *);
-static int gnu_sparse_old_read(struct archive_read *, struct tar *,
- const struct archive_entry_header_gnutar *header);
-static void gnu_sparse_old_parse(struct tar *,
- const struct gnu_sparse *sparse, int length);
-static int gnu_sparse_01_parse(struct tar *, const char *);
-static ssize_t gnu_sparse_10_read(struct archive_read *, struct tar *);
-static int header_Solaris_ACL(struct archive_read *, struct tar *,
- struct archive_entry *, const void *);
-static int header_common(struct archive_read *, struct tar *,
- struct archive_entry *, const void *);
-static int header_old_tar(struct archive_read *, struct tar *,
- struct archive_entry *, const void *);
-static int header_pax_extensions(struct archive_read *, struct tar *,
- struct archive_entry *, const void *);
-static int header_pax_global(struct archive_read *, struct tar *,
- struct archive_entry *, const void *h);
-static int header_longlink(struct archive_read *, struct tar *,
- struct archive_entry *, const void *h);
-static int header_longname(struct archive_read *, struct tar *,
- struct archive_entry *, const void *h);
-static int header_volume(struct archive_read *, struct tar *,
- struct archive_entry *, const void *h);
-static int header_ustar(struct archive_read *, struct tar *,
- struct archive_entry *, const void *h);
-static int header_gnutar(struct archive_read *, struct tar *,
- struct archive_entry *, const void *h);
-static int archive_read_format_tar_bid(struct archive_read *);
-static int archive_read_format_tar_cleanup(struct archive_read *);
-static int archive_read_format_tar_read_data(struct archive_read *a,
- const void **buff, size_t *size, off_t *offset);
-static int archive_read_format_tar_skip(struct archive_read *a);
-static int archive_read_format_tar_read_header(struct archive_read *,
- struct archive_entry *);
-static int checksum(struct archive_read *, const void *);
-static int pax_attribute(struct tar *, struct archive_entry *,
- char *key, char *value);
-static int pax_header(struct archive_read *, struct tar *,
- struct archive_entry *, char *attr);
-static void pax_time(const char *, int64_t *sec, long *nanos);
-static ssize_t readline(struct archive_read *, struct tar *, const char **,
- ssize_t limit);
-static int read_body_to_string(struct archive_read *, struct tar *,
- struct archive_string *, const void *h);
-static int64_t tar_atol(const char *, unsigned);
-static int64_t tar_atol10(const char *, unsigned);
-static int64_t tar_atol256(const char *, unsigned);
-static int64_t tar_atol8(const char *, unsigned);
-static int tar_read_header(struct archive_read *, struct tar *,
- struct archive_entry *);
-static int tohex(int c);
-static char *url_decode(const char *);
-static wchar_t *utf8_decode(struct tar *, const char *, size_t length);
-
-int
-archive_read_support_format_gnutar(struct archive *a)
-{
- return (archive_read_support_format_tar(a));
-}
-
-
-int
-archive_read_support_format_tar(struct archive *_a)
-{
- struct archive_read *a = (struct archive_read *)_a;
- struct tar *tar;
- int r;
-
- tar = (struct tar *)malloc(sizeof(*tar));
- if (tar == NULL) {
- archive_set_error(&a->archive, ENOMEM,
- "Can't allocate tar data");
- return (ARCHIVE_FATAL);
- }
- memset(tar, 0, sizeof(*tar));
-
- r = __archive_read_register_format(a, tar, "tar",
- archive_read_format_tar_bid,
- NULL,
- archive_read_format_tar_read_header,
- archive_read_format_tar_read_data,
- archive_read_format_tar_skip,
- archive_read_format_tar_cleanup);
-
- if (r != ARCHIVE_OK)
- free(tar);
- return (ARCHIVE_OK);
-}
-
-static int
-archive_read_format_tar_cleanup(struct archive_read *a)
-{
- struct tar *tar;
-
- tar = (struct tar *)(a->format->data);
- gnu_clear_sparse_list(tar);
- archive_string_free(&tar->acl_text);
- archive_string_free(&tar->entry_pathname);
- archive_string_free(&tar->entry_pathname_override);
- archive_string_free(&tar->entry_linkpath);
- archive_string_free(&tar->entry_uname);
- archive_string_free(&tar->entry_gname);
- archive_string_free(&tar->line);
- archive_string_free(&tar->pax_global);
- archive_string_free(&tar->pax_header);
- archive_string_free(&tar->longname);
- archive_string_free(&tar->longlink);
- free(tar->pax_entry);
- free(tar);
- (a->format->data) = NULL;
- return (ARCHIVE_OK);
-}
-
-
-static int
-archive_read_format_tar_bid(struct archive_read *a)
-{
- int bid;
- const void *h;
- const struct archive_entry_header_ustar *header;
-
- bid = 0;
-
- /* Now let's look at the actual header and see if it matches. */
- h = __archive_read_ahead(a, 512, NULL);
- if (h == NULL)
- return (-1);
-
- /* If it's an end-of-archive mark, we can handle it. */
- if ((*(const char *)h) == 0
- && archive_block_is_null((const unsigned char *)h)) {
- /*
- * Usually, I bid the number of bits verified, but
- * in this case, 4096 seems excessive so I picked 10 as
- * an arbitrary but reasonable-seeming value.
- */
- return (10);
- }
-
- /* If it's not an end-of-archive mark, it must have a valid checksum.*/
- if (!checksum(a, h))
- return (0);
- bid += 48; /* Checksum is usually 6 octal digits. */
-
- header = (const struct archive_entry_header_ustar *)h;
-
- /* Recognize POSIX formats. */
- if ((memcmp(header->magic, "ustar\0", 6) == 0)
- &&(memcmp(header->version, "00", 2)==0))
- bid += 56;
-
- /* Recognize GNU tar format. */
- if ((memcmp(header->magic, "ustar ", 6) == 0)
- &&(memcmp(header->version, " \0", 2)==0))
- bid += 56;
-
- /* Type flag must be null, digit or A-Z, a-z. */
- if (header->typeflag[0] != 0 &&
- !( header->typeflag[0] >= '0' && header->typeflag[0] <= '9') &&
- !( header->typeflag[0] >= 'A' && header->typeflag[0] <= 'Z') &&
- !( header->typeflag[0] >= 'a' && header->typeflag[0] <= 'z') )
- return (0);
- bid += 2; /* 6 bits of variation in an 8-bit field leaves 2 bits. */
-
- /* Sanity check: Look at first byte of mode field. */
- switch (255 & (unsigned)header->mode[0]) {
- case 0: case 255:
- /* Base-256 value: No further verification possible! */
- break;
- case ' ': /* Not recommended, but not illegal, either. */
- break;
- case '0': case '1': case '2': case '3':
- case '4': case '5': case '6': case '7':
- /* Octal Value. */
- /* TODO: Check format of remainder of this field. */
- break;
- default:
- /* Not a valid mode; bail out here. */
- return (0);
- }
- /* TODO: Sanity test uid/gid/size/mtime/rdevmajor/rdevminor fields. */
-
- return (bid);
-}
-
-/*
- * The function invoked by archive_read_header(). This
- * just sets up a few things and then calls the internal
- * tar_read_header() function below.
- */
-static int
-archive_read_format_tar_read_header(struct archive_read *a,
- struct archive_entry *entry)
-{
- /*
- * When converting tar archives to cpio archives, it is
- * essential that each distinct file have a distinct inode
- * number. To simplify this, we keep a static count here to
- * assign fake dev/inode numbers to each tar entry. Note that
- * pax format archives may overwrite this with something more
- * useful.
- *
- * Ideally, we would track every file read from the archive so
- * that we could assign the same dev/ino pair to hardlinks,
- * but the memory required to store a complete lookup table is
- * probably not worthwhile just to support the relatively
- * obscure tar->cpio conversion case.
- */
- static int default_inode;
- static int default_dev;
- struct tar *tar;
- struct sparse_block *sp;
- const char *p;
- int r;
- size_t l;
-
- /* Assign default device/inode values. */
- archive_entry_set_dev(entry, 1 + default_dev); /* Don't use zero. */
- archive_entry_set_ino(entry, ++default_inode); /* Don't use zero. */
- /* Limit generated st_ino number to 16 bits. */
- if (default_inode >= 0xffff) {
- ++default_dev;
- default_inode = 0;
- }
-
- tar = (struct tar *)(a->format->data);
- tar->entry_offset = 0;
- while (tar->sparse_list != NULL) {
- sp = tar->sparse_list;
- tar->sparse_list = sp->next;
- free(sp);
- }
- tar->sparse_last = NULL;
- tar->realsize = -1; /* Mark this as "unset" */
-
- r = tar_read_header(a, tar, entry);
-
- /*
- * "non-sparse" files are really just sparse files with
- * a single block.
- */
- if (tar->sparse_list == NULL)
- gnu_add_sparse_entry(tar, 0, tar->entry_bytes_remaining);
-
- if (r == ARCHIVE_OK) {
- /*
- * "Regular" entry with trailing '/' is really
- * directory: This is needed for certain old tar
- * variants and even for some broken newer ones.
- */
- p = archive_entry_pathname(entry);
- l = strlen(p);
- if (archive_entry_filetype(entry) == AE_IFREG
- && p[l-1] == '/')
- archive_entry_set_filetype(entry, AE_IFDIR);
- }
- return (r);
-}
-
-static int
-archive_read_format_tar_read_data(struct archive_read *a,
- const void **buff, size_t *size, off_t *offset)
-{
- ssize_t bytes_read;
- struct tar *tar;
- struct sparse_block *p;
-
- tar = (struct tar *)(a->format->data);
-
- if (tar->sparse_gnu_pending) {
- if (tar->sparse_gnu_major == 1 && tar->sparse_gnu_minor == 0) {
- tar->sparse_gnu_pending = 0;
- /* Read initial sparse map. */
- bytes_read = gnu_sparse_10_read(a, tar);
- tar->entry_bytes_remaining -= bytes_read;
- if (bytes_read < 0)
- return (bytes_read);
- } else {
- *size = 0;
- *offset = 0;
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "Unrecognized GNU sparse file format");
- return (ARCHIVE_WARN);
- }
- tar->sparse_gnu_pending = 0;
- }
-
- /* Remove exhausted entries from sparse list. */
- while (tar->sparse_list != NULL &&
- tar->sparse_list->remaining == 0) {
- p = tar->sparse_list;
- tar->sparse_list = p->next;
- free(p);
- }
-
- /* If we're at end of file, return EOF. */
- if (tar->sparse_list == NULL || tar->entry_bytes_remaining == 0) {
- if (__archive_read_skip(a, tar->entry_padding) < 0)
- return (ARCHIVE_FATAL);
- tar->entry_padding = 0;
- *buff = NULL;
- *size = 0;
- *offset = tar->realsize;
- return (ARCHIVE_EOF);
- }
-
- *buff = __archive_read_ahead(a, 1, &bytes_read);
- if (bytes_read < 0)
- return (ARCHIVE_FATAL);
- if (*buff == NULL) {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "Truncated tar archive");
- return (ARCHIVE_FATAL);
- }
- if (bytes_read > tar->entry_bytes_remaining)
- bytes_read = tar->entry_bytes_remaining;
- /* Don't read more than is available in the
- * current sparse block. */
- if (tar->sparse_list->remaining < bytes_read)
- bytes_read = tar->sparse_list->remaining;
- *size = bytes_read;
- *offset = tar->sparse_list->offset;
- tar->sparse_list->remaining -= bytes_read;
- tar->sparse_list->offset += bytes_read;
- tar->entry_bytes_remaining -= bytes_read;
- __archive_read_consume(a, bytes_read);
- return (ARCHIVE_OK);
-}
-
-static int
-archive_read_format_tar_skip(struct archive_read *a)
-{
- int64_t bytes_skipped;
- struct tar* tar;
-
- tar = (struct tar *)(a->format->data);
-
- /*
- * Compression layer skip functions are required to either skip the
- * length requested or fail, so we can rely upon the entire entry
- * plus padding being skipped.
- */
- bytes_skipped = __archive_read_skip(a,
- tar->entry_bytes_remaining + tar->entry_padding);
- if (bytes_skipped < 0)
- return (ARCHIVE_FATAL);
-
- tar->entry_bytes_remaining = 0;
- tar->entry_padding = 0;
-
- /* Free the sparse list. */
- gnu_clear_sparse_list(tar);
-
- return (ARCHIVE_OK);
-}
-
-/*
- * This function recursively interprets all of the headers associated
- * with a single entry.
- */
-static int
-tar_read_header(struct archive_read *a, struct tar *tar,
- struct archive_entry *entry)
-{
- ssize_t bytes;
- int err;
- const void *h;
- const struct archive_entry_header_ustar *header;
-
- /* Read 512-byte header record */
- h = __archive_read_ahead(a, 512, &bytes);
- if (bytes < 0)
- return (bytes);
- if (bytes < 512) { /* Short read or EOF. */
- /* Try requesting just one byte and see what happens. */
- (void)__archive_read_ahead(a, 1, &bytes);
- if (bytes == 0) {
- /*
- * The archive ends at a 512-byte boundary but
- * without a proper end-of-archive marker.
- * Yes, there are tar writers that do this;
- * hold our nose and accept it.
- */
- return (ARCHIVE_EOF);
- }
- /* Archive ends with a partial block; this is bad. */
- archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
- "Truncated tar archive");
- return (ARCHIVE_FATAL);
- }
- __archive_read_consume(a, 512);
-
-
- /* Check for end-of-archive mark. */
- if (((*(const char *)h)==0) && archive_block_is_null((const unsigned char *)h)) {
- /* Try to consume a second all-null record, as well. */
- h = __archive_read_ahead(a, 512, NULL);
- if (h != NULL)
- __archive_read_consume(a, 512);
- archive_set_error(&a->archive, 0, NULL);
- if (a->archive.archive_format_name == NULL) {
- a->archive.archive_format = ARCHIVE_FORMAT_TAR;
- a->archive.archive_format_name = "tar";
- }
- return (ARCHIVE_EOF);
- }
-
- /*
- * Note: If the checksum fails and we return ARCHIVE_RETRY,
- * then the client is likely to just retry. This is a very
- * crude way to search for the next valid header!
- *
- * TODO: Improve this by implementing a real header scan.
- */
- if (!checksum(a, h)) {
- archive_set_error(&a->archive, EINVAL, "Damaged tar archive");
- return (ARCHIVE_RETRY); /* Retryable: Invalid header */
- }
-
- if (++tar->header_recursion_depth > 32) {
- archive_set_error(&a->archive, EINVAL, "Too many special headers");
- return (ARCHIVE_WARN);
- }
-
- /* Determine the format variant. */
- header = (const struct archive_entry_header_ustar *)h;
- switch(header->typeflag[0]) {
- case 'A': /* Solaris tar ACL */
- a->archive.archive_format = ARCHIVE_FORMAT_TAR_PAX_INTERCHANGE;
- a->archive.archive_format_name = "Solaris tar";
- err = header_Solaris_ACL(a, tar, entry, h);
- break;
- case 'g': /* POSIX-standard 'g' header. */
- a->archive.archive_format = ARCHIVE_FORMAT_TAR_PAX_INTERCHANGE;
- a->archive.archive_format_name = "POSIX pax interchange format";
- err = header_pax_global(a, tar, entry, h);
- break;
- case 'K': /* Long link name (GNU tar, others) */
- err = header_longlink(a, tar, entry, h);
- break;
- case 'L': /* Long filename (GNU tar, others) */
- err = header_longname(a, tar, entry, h);
- break;
- case 'V': /* GNU volume header */
- err = header_volume(a, tar, entry, h);
- break;
- case 'X': /* Used by SUN tar; same as 'x'. */
- a->archive.archive_format = ARCHIVE_FORMAT_TAR_PAX_INTERCHANGE;
- a->archive.archive_format_name =
- "POSIX pax interchange format (Sun variant)";
- err = header_pax_extensions(a, tar, entry, h);
- break;
- case 'x': /* POSIX-standard 'x' header. */
- a->archive.archive_format = ARCHIVE_FORMAT_TAR_PAX_INTERCHANGE;
- a->archive.archive_format_name = "POSIX pax interchange format";
- err = header_pax_extensions(a, tar, entry, h);
- break;
- default:
- if (memcmp(header->magic, "ustar \0", 8) == 0) {
- a->archive.archive_format = ARCHIVE_FORMAT_TAR_GNUTAR;
- a->archive.archive_format_name = "GNU tar format";
- err = header_gnutar(a, tar, entry, h);
- } else if (memcmp(header->magic, "ustar", 5) == 0) {
- if (a->archive.archive_format != ARCHIVE_FORMAT_TAR_PAX_INTERCHANGE) {
- a->archive.archive_format = ARCHIVE_FORMAT_TAR_USTAR;
- a->archive.archive_format_name = "POSIX ustar format";
- }
- err = header_ustar(a, tar, entry, h);
- } else {
- a->archive.archive_format = ARCHIVE_FORMAT_TAR;
- a->archive.archive_format_name = "tar (non-POSIX)";
- err = header_old_tar(a, tar, entry, h);
- }
- }
- --tar->header_recursion_depth;
- /* We return warnings or success as-is. Anything else is fatal. */
- if (err == ARCHIVE_WARN || err == ARCHIVE_OK)
- return (err);
- if (err == ARCHIVE_EOF)
- /* EOF when recursively reading a header is bad. */
- archive_set_error(&a->archive, EINVAL, "Damaged tar archive");
- return (ARCHIVE_FATAL);
-}
-
-/*
- * Return true if block checksum is correct.
- */
-static int
-checksum(struct archive_read *a, const void *h)
-{
- const unsigned char *bytes;
- const struct archive_entry_header_ustar *header;
- int check, i, sum;
-
- (void)a; /* UNUSED */
- bytes = (const unsigned char *)h;
- header = (const struct archive_entry_header_ustar *)h;
-
- /*
- * Test the checksum. Note that POSIX specifies _unsigned_
- * bytes for this calculation.
- */
- sum = tar_atol(header->checksum, sizeof(header->checksum));
- check = 0;
- for (i = 0; i < 148; i++)
- check += (unsigned char)bytes[i];
- for (; i < 156; i++)
- check += 32;
- for (; i < 512; i++)
- check += (unsigned char)bytes[i];
- if (sum == check)
- return (1);
-
- /*
- * Repeat test with _signed_ bytes, just in case this archive
- * was created by an old BSD, Solaris, or HP-UX tar with a
- * broken checksum calculation.
- */
- check = 0;
- for (i = 0; i < 148; i++)
- check += (signed char)bytes[i];
- for (; i < 156; i++)
- check += 32;
- for (; i < 512; i++)
- check += (signed char)bytes[i];
- if (sum == check)
- return (1);
-
- return (0);
-}
-
-/*
- * Return true if this block contains only nulls.
- */
-static int
-archive_block_is_null(const unsigned char *p)
-{
- unsigned i;
-
- for (i = 0; i < 512; i++)
- if (*p++)
- return (0);
- return (1);
-}
-
-/*
- * Interpret 'A' Solaris ACL header
- */
-static int
-header_Solaris_ACL(struct archive_read *a, struct tar *tar,
- struct archive_entry *entry, const void *h)
-{
- const struct archive_entry_header_ustar *header;
- size_t size;
- int err;
- int64_t type;
- char *acl, *p;
- wchar_t *wp;
-
- /*
- * read_body_to_string adds a NUL terminator, but we need a little
- * more to make sure that we don't overrun acl_text later.
- */
- header = (const struct archive_entry_header_ustar *)h;
- size = tar_atol(header->size, sizeof(header->size));
- err = read_body_to_string(a, tar, &(tar->acl_text), h);
- if (err != ARCHIVE_OK)
- return (err);
- /* Recursively read next header */
- err = tar_read_header(a, tar, entry);
- if ((err != ARCHIVE_OK) && (err != ARCHIVE_WARN))
- return (err);
-
- /* TODO: Examine the first characters to see if this
- * is an AIX ACL descriptor. We'll likely never support
- * them, but it would be polite to recognize and warn when
- * we do see them. */
-
- /* Leading octal number indicates ACL type and number of entries. */
- p = acl = tar->acl_text.s;
- type = 0;
- while (*p != '\0' && p < acl + size) {
- if (*p < '0' || *p > '7') {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "Malformed Solaris ACL attribute (invalid digit)");
- return(ARCHIVE_WARN);
- }
- type <<= 3;
- type += *p - '0';
- if (type > 077777777) {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "Malformed Solaris ACL attribute (count too large)");
- return (ARCHIVE_WARN);
- }
- p++;
- }
- switch ((int)type & ~0777777) {
- case 01000000:
- /* POSIX.1e ACL */
- break;
- case 03000000:
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "Solaris NFSv4 ACLs not supported");
- return (ARCHIVE_WARN);
- default:
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "Malformed Solaris ACL attribute (unsupported type %o)",
- (int)type);
- return (ARCHIVE_WARN);
- }
- p++;
-
- if (p >= acl + size) {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "Malformed Solaris ACL attribute (body overflow)");
- return(ARCHIVE_WARN);
- }
-
- /* ACL text is null-terminated; find the end. */
- size -= (p - acl);
- acl = p;
-
- while (*p != '\0' && p < acl + size)
- p++;
-
- wp = utf8_decode(tar, acl, p - acl);
- err = __archive_entry_acl_parse_w(entry, wp,
- ARCHIVE_ENTRY_ACL_TYPE_ACCESS);
- if (err != ARCHIVE_OK)
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "Malformed Solaris ACL attribute (unparsable)");
- return (err);
-}
-
-/*
- * Interpret 'K' long linkname header.
- */
-static int
-header_longlink(struct archive_read *a, struct tar *tar,
- struct archive_entry *entry, const void *h)
-{
- int err;
-
- err = read_body_to_string(a, tar, &(tar->longlink), h);
- if (err != ARCHIVE_OK)
- return (err);
- err = tar_read_header(a, tar, entry);
- if ((err != ARCHIVE_OK) && (err != ARCHIVE_WARN))
- return (err);
- /* Set symlink if symlink already set, else hardlink. */
- archive_entry_copy_link(entry, tar->longlink.s);
- return (ARCHIVE_OK);
-}
-
-/*
- * Interpret 'L' long filename header.
- */
-static int
-header_longname(struct archive_read *a, struct tar *tar,
- struct archive_entry *entry, const void *h)
-{
- int err;
-
- err = read_body_to_string(a, tar, &(tar->longname), h);
- if (err != ARCHIVE_OK)
- return (err);
- /* Read and parse "real" header, then override name. */
- err = tar_read_header(a, tar, entry);
- if ((err != ARCHIVE_OK) && (err != ARCHIVE_WARN))
- return (err);
- archive_entry_copy_pathname(entry, tar->longname.s);
- return (ARCHIVE_OK);
-}
-
-
-/*
- * Interpret 'V' GNU tar volume header.
- */
-static int
-header_volume(struct archive_read *a, struct tar *tar,
- struct archive_entry *entry, const void *h)
-{
- (void)h;
-
- /* Just skip this and read the next header. */
- return (tar_read_header(a, tar, entry));
-}
-
-/*
- * Read body of an archive entry into an archive_string object.
- */
-static int
-read_body_to_string(struct archive_read *a, struct tar *tar,
- struct archive_string *as, const void *h)
-{
- off_t size, padded_size;
- const struct archive_entry_header_ustar *header;
- const void *src;
-
- (void)tar; /* UNUSED */
- header = (const struct archive_entry_header_ustar *)h;
- size = tar_atol(header->size, sizeof(header->size));
- if ((size > 1048576) || (size < 0)) {
- archive_set_error(&a->archive, EINVAL,
- "Special header too large");
- return (ARCHIVE_FATAL);
- }
-
- /* Fail if we can't make our buffer big enough. */
- if (archive_string_ensure(as, size+1) == NULL) {
- archive_set_error(&a->archive, ENOMEM,
- "No memory");
- return (ARCHIVE_FATAL);
- }
-
- /* Read the body into the string. */
- padded_size = (size + 511) & ~ 511;
- src = __archive_read_ahead(a, padded_size, NULL);
- if (src == NULL)
- return (ARCHIVE_FATAL);
- memcpy(as->s, src, size);
- __archive_read_consume(a, padded_size);
- as->s[size] = '\0';
- return (ARCHIVE_OK);
-}
-
-/*
- * Parse out common header elements.
- *
- * This would be the same as header_old_tar, except that the
- * filename is handled slightly differently for old and POSIX
- * entries (POSIX entries support a 'prefix'). This factoring
- * allows header_old_tar and header_ustar
- * to handle filenames differently, while still putting most of the
- * common parsing into one place.
- */
-static int
-header_common(struct archive_read *a, struct tar *tar,
- struct archive_entry *entry, const void *h)
-{
- const struct archive_entry_header_ustar *header;
- char tartype;
-
- (void)a; /* UNUSED */
-
- header = (const struct archive_entry_header_ustar *)h;
- if (header->linkname[0])
- archive_strncpy(&(tar->entry_linkpath), header->linkname,
- sizeof(header->linkname));
- else
- archive_string_empty(&(tar->entry_linkpath));
-
- /* Parse out the numeric fields (all are octal) */
- archive_entry_set_mode(entry, tar_atol(header->mode, sizeof(header->mode)));
- archive_entry_set_uid(entry, tar_atol(header->uid, sizeof(header->uid)));
- archive_entry_set_gid(entry, tar_atol(header->gid, sizeof(header->gid)));
- tar->entry_bytes_remaining = tar_atol(header->size, sizeof(header->size));
- tar->realsize = tar->entry_bytes_remaining;
- archive_entry_set_size(entry, tar->entry_bytes_remaining);
- archive_entry_set_mtime(entry, tar_atol(header->mtime, sizeof(header->mtime)), 0);
-
- /* Handle the tar type flag appropriately. */
- tartype = header->typeflag[0];
-
- switch (tartype) {
- case '1': /* Hard link */
- archive_entry_copy_hardlink(entry, tar->entry_linkpath.s);
- /*
- * The following may seem odd, but: Technically, tar
- * does not store the file type for a "hard link"
- * entry, only the fact that it is a hard link. So, I
- * leave the type zero normally. But, pax interchange
- * format allows hard links to have data, which
- * implies that the underlying entry is a regular
- * file.
- */
- if (archive_entry_size(entry) > 0)
- archive_entry_set_filetype(entry, AE_IFREG);
-
- /*
- * A tricky point: Traditionally, tar readers have
- * ignored the size field when reading hardlink
- * entries, and some writers put non-zero sizes even
- * though the body is empty. POSIX blessed this
- * convention in the 1988 standard, but broke with
- * this tradition in 2001 by permitting hardlink
- * entries to store valid bodies in pax interchange
- * format, but not in ustar format. Since there is no
- * hard and fast way to distinguish pax interchange
- * from earlier archives (the 'x' and 'g' entries are
- * optional, after all), we need a heuristic.
- */
- if (archive_entry_size(entry) == 0) {
- /* If the size is already zero, we're done. */
- } else if (a->archive.archive_format
- == ARCHIVE_FORMAT_TAR_PAX_INTERCHANGE) {
- /* Definitely pax extended; must obey hardlink size. */
- } else if (a->archive.archive_format == ARCHIVE_FORMAT_TAR
- || a->archive.archive_format == ARCHIVE_FORMAT_TAR_GNUTAR)
- {
- /* Old-style or GNU tar: we must ignore the size. */
- archive_entry_set_size(entry, 0);
- tar->entry_bytes_remaining = 0;
- } else if (archive_read_format_tar_bid(a) > 50) {
- /*
- * We don't know if it's pax: If the bid
- * function sees a valid ustar header
- * immediately following, then let's ignore
- * the hardlink size.
- */
- archive_entry_set_size(entry, 0);
- tar->entry_bytes_remaining = 0;
- }
- /*
- * TODO: There are still two cases I'd like to handle:
- * = a ustar non-pax archive with a hardlink entry at
- * end-of-archive. (Look for block of nulls following?)
- * = a pax archive that has not seen any pax headers
- * and has an entry which is a hardlink entry storing
- * a body containing an uncompressed tar archive.
- * The first is worth addressing; I don't see any reliable
- * way to deal with the second possibility.
- */
- break;
- case '2': /* Symlink */
- archive_entry_set_filetype(entry, AE_IFLNK);
- archive_entry_set_size(entry, 0);
- tar->entry_bytes_remaining = 0;
- archive_entry_copy_symlink(entry, tar->entry_linkpath.s);
- break;
- case '3': /* Character device */
- archive_entry_set_filetype(entry, AE_IFCHR);
- archive_entry_set_size(entry, 0);
- tar->entry_bytes_remaining = 0;
- break;
- case '4': /* Block device */
- archive_entry_set_filetype(entry, AE_IFBLK);
- archive_entry_set_size(entry, 0);
- tar->entry_bytes_remaining = 0;
- break;
- case '5': /* Dir */
- archive_entry_set_filetype(entry, AE_IFDIR);
- archive_entry_set_size(entry, 0);
- tar->entry_bytes_remaining = 0;
- break;
- case '6': /* FIFO device */
- archive_entry_set_filetype(entry, AE_IFIFO);
- archive_entry_set_size(entry, 0);
- tar->entry_bytes_remaining = 0;
- break;
- case 'D': /* GNU incremental directory type */
- /*
- * No special handling is actually required here.
- * It might be nice someday to preprocess the file list and
- * provide it to the client, though.
- */
- archive_entry_set_filetype(entry, AE_IFDIR);
- break;
- case 'M': /* GNU "Multi-volume" (remainder of file from last archive)*/
- /*
- * As far as I can tell, this is just like a regular file
- * entry, except that the contents should be _appended_ to
- * the indicated file at the indicated offset. This may
- * require some API work to fully support.
- */
- break;
- case 'N': /* Old GNU "long filename" entry. */
- /* The body of this entry is a script for renaming
- * previously-extracted entries. Ugh. It will never
- * be supported by libarchive. */
- archive_entry_set_filetype(entry, AE_IFREG);
- break;
- case 'S': /* GNU sparse files */
- /*
- * Sparse files are really just regular files with
- * sparse information in the extended area.
- */
- /* FALLTHROUGH */
- default: /* Regular file and non-standard types */
- /*
- * Per POSIX: non-recognized types should always be
- * treated as regular files.
- */
- archive_entry_set_filetype(entry, AE_IFREG);
- break;
- }
- return (0);
-}
-
-/*
- * Parse out header elements for "old-style" tar archives.
- */
-static int
-header_old_tar(struct archive_read *a, struct tar *tar,
- struct archive_entry *entry, const void *h)
-{
- const struct archive_entry_header_ustar *header;
-
- /* Copy filename over (to ensure null termination). */
- header = (const struct archive_entry_header_ustar *)h;
- archive_strncpy(&(tar->entry_pathname), header->name, sizeof(header->name));
- archive_entry_copy_pathname(entry, tar->entry_pathname.s);
-
- /* Grab rest of common fields */
- header_common(a, tar, entry, h);
-
- tar->entry_padding = 0x1ff & (-tar->entry_bytes_remaining);
- return (0);
-}
-
-/*
- * Parse a file header for a pax extended archive entry.
- */
-static int
-header_pax_global(struct archive_read *a, struct tar *tar,
- struct archive_entry *entry, const void *h)
-{
- int err;
-
- err = read_body_to_string(a, tar, &(tar->pax_global), h);
- if (err != ARCHIVE_OK)
- return (err);
- err = tar_read_header(a, tar, entry);
- return (err);
-}
-
-static int
-header_pax_extensions(struct archive_read *a, struct tar *tar,
- struct archive_entry *entry, const void *h)
-{
- int err, err2;
-
- err = read_body_to_string(a, tar, &(tar->pax_header), h);
- if (err != ARCHIVE_OK)
- return (err);
-
- /* Parse the next header. */
- err = tar_read_header(a, tar, entry);
- if ((err != ARCHIVE_OK) && (err != ARCHIVE_WARN))
- return (err);
-
- /*
- * TODO: Parse global/default options into 'entry' struct here
- * before handling file-specific options.
- *
- * This design (parse standard header, then overwrite with pax
- * extended attribute data) usually works well, but isn't ideal;
- * it would be better to parse the pax extended attributes first
- * and then skip any fields in the standard header that were
- * defined in the pax header.
- */
- err2 = pax_header(a, tar, entry, tar->pax_header.s);
- err = err_combine(err, err2);
- tar->entry_padding = 0x1ff & (-tar->entry_bytes_remaining);
- return (err);
-}
-
-
-/*
- * Parse a file header for a Posix "ustar" archive entry. This also
- * handles "pax" or "extended ustar" entries.
- */
-static int
-header_ustar(struct archive_read *a, struct tar *tar,
- struct archive_entry *entry, const void *h)
-{
- const struct archive_entry_header_ustar *header;
- struct archive_string *as;
-
- header = (const struct archive_entry_header_ustar *)h;
-
- /* Copy name into an internal buffer to ensure null-termination. */
- as = &(tar->entry_pathname);
- if (header->prefix[0]) {
- archive_strncpy(as, header->prefix, sizeof(header->prefix));
- if (as->s[archive_strlen(as) - 1] != '/')
- archive_strappend_char(as, '/');
- archive_strncat(as, header->name, sizeof(header->name));
- } else
- archive_strncpy(as, header->name, sizeof(header->name));
-
- archive_entry_copy_pathname(entry, as->s);
-
- /* Handle rest of common fields. */
- header_common(a, tar, entry, h);
-
- /* Handle POSIX ustar fields. */
- archive_strncpy(&(tar->entry_uname), header->uname,
- sizeof(header->uname));
- archive_entry_copy_uname(entry, tar->entry_uname.s);
-
- archive_strncpy(&(tar->entry_gname), header->gname,
- sizeof(header->gname));
- archive_entry_copy_gname(entry, tar->entry_gname.s);
-
- /* Parse out device numbers only for char and block specials. */
- if (header->typeflag[0] == '3' || header->typeflag[0] == '4') {
- archive_entry_set_rdevmajor(entry,
- tar_atol(header->rdevmajor, sizeof(header->rdevmajor)));
- archive_entry_set_rdevminor(entry,
- tar_atol(header->rdevminor, sizeof(header->rdevminor)));
- }
-
- tar->entry_padding = 0x1ff & (-tar->entry_bytes_remaining);
-
- return (0);
-}
-
-
-/*
- * Parse the pax extended attributes record.
- *
- * Returns non-zero if there's an error in the data.
- */
-static int
-pax_header(struct archive_read *a, struct tar *tar,
- struct archive_entry *entry, char *attr)
-{
- size_t attr_length, l, line_length;
- char *p;
- char *key, *value;
- int err, err2;
-
- attr_length = strlen(attr);
- tar->pax_hdrcharset_binary = 0;
- archive_string_empty(&(tar->entry_gname));
- archive_string_empty(&(tar->entry_linkpath));
- archive_string_empty(&(tar->entry_pathname));
- archive_string_empty(&(tar->entry_pathname_override));
- archive_string_empty(&(tar->entry_uname));
- err = ARCHIVE_OK;
- while (attr_length > 0) {
- /* Parse decimal length field at start of line. */
- line_length = 0;
- l = attr_length;
- p = attr; /* Record start of line. */
- while (l>0) {
- if (*p == ' ') {
- p++;
- l--;
- break;
- }
- if (*p < '0' || *p > '9') {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "Ignoring malformed pax extended attributes");
- return (ARCHIVE_WARN);
- }
- line_length *= 10;
- line_length += *p - '0';
- if (line_length > 999999) {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "Rejecting pax extended attribute > 1MB");
- return (ARCHIVE_WARN);
- }
- p++;
- l--;
- }
-
- /*
- * Parsed length must be no bigger than available data,
- * at least 1, and the last character of the line must
- * be '\n'.
- */
- if (line_length > attr_length
- || line_length < 1
- || attr[line_length - 1] != '\n')
- {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "Ignoring malformed pax extended attribute");
- return (ARCHIVE_WARN);
- }
-
- /* Null-terminate the line. */
- attr[line_length - 1] = '\0';
-
- /* Find end of key and null terminate it. */
- key = p;
- if (key[0] == '=')
- return (-1);
- while (*p && *p != '=')
- ++p;
- if (*p == '\0') {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "Invalid pax extended attributes");
- return (ARCHIVE_WARN);
- }
- *p = '\0';
-
- /* Identify null-terminated 'value' portion. */
- value = p + 1;
-
- /* Identify this attribute and set it in the entry. */
- err2 = pax_attribute(tar, entry, key, value);
- err = err_combine(err, err2);
-
- /* Skip to next line */
- attr += line_length;
- attr_length -= line_length;
- }
- if (archive_strlen(&(tar->entry_gname)) > 0) {
- value = tar->entry_gname.s;
- if (tar->pax_hdrcharset_binary)
- archive_entry_copy_gname(entry, value);
- else {
- if (!archive_entry_update_gname_utf8(entry, value)) {
- err = ARCHIVE_WARN;
- archive_set_error(&a->archive,
- ARCHIVE_ERRNO_FILE_FORMAT,
- "Gname in pax header can't "
- "be converted to current locale.");
- }
- }
- }
- if (archive_strlen(&(tar->entry_linkpath)) > 0) {
- value = tar->entry_linkpath.s;
- if (tar->pax_hdrcharset_binary)
- archive_entry_copy_link(entry, value);
- else {
- if (!archive_entry_update_link_utf8(entry, value)) {
- err = ARCHIVE_WARN;
- archive_set_error(&a->archive,
- ARCHIVE_ERRNO_FILE_FORMAT,
- "Linkname in pax header can't "
- "be converted to current locale.");
- }
- }
- }
- /*
- * Some extensions (such as the GNU sparse file extensions)
- * deliberately store a synthetic name under the regular 'path'
- * attribute and the real file name under a different attribute.
- * Since we're supposed to not care about the order, we
- * have no choice but to store all of the various filenames
- * we find and figure it all out afterwards. This is the
- * figuring out part.
- */
- value = NULL;
- if (archive_strlen(&(tar->entry_pathname_override)) > 0)
- value = tar->entry_pathname_override.s;
- else if (archive_strlen(&(tar->entry_pathname)) > 0)
- value = tar->entry_pathname.s;
- if (value != NULL) {
- if (tar->pax_hdrcharset_binary)
- archive_entry_copy_pathname(entry, value);
- else {
- if (!archive_entry_update_pathname_utf8(entry, value)) {
- err = ARCHIVE_WARN;
- archive_set_error(&a->archive,
- ARCHIVE_ERRNO_FILE_FORMAT,
- "Pathname in pax header can't be "
- "converted to current locale.");
- }
- }
- }
- if (archive_strlen(&(tar->entry_uname)) > 0) {
- value = tar->entry_uname.s;
- if (tar->pax_hdrcharset_binary)
- archive_entry_copy_uname(entry, value);
- else {
- if (!archive_entry_update_uname_utf8(entry, value)) {
- err = ARCHIVE_WARN;
- archive_set_error(&a->archive,
- ARCHIVE_ERRNO_FILE_FORMAT,
- "Uname in pax header can't "
- "be converted to current locale.");
- }
- }
- }
- return (err);
-}
-
-static int
-pax_attribute_xattr(struct archive_entry *entry,
- char *name, char *value)
-{
- char *name_decoded;
- void *value_decoded;
- size_t value_len;
-
- if (strlen(name) < 18 || (strncmp(name, "LIBARCHIVE.xattr.", 17)) != 0)
- return 3;
-
- name += 17;
-
- /* URL-decode name */
- name_decoded = url_decode(name);
- if (name_decoded == NULL)
- return 2;
-
- /* Base-64 decode value */
- value_decoded = base64_decode(value, strlen(value), &value_len);
- if (value_decoded == NULL) {
- free(name_decoded);
- return 1;
- }
-
- archive_entry_xattr_add_entry(entry, name_decoded,
- value_decoded, value_len);
-
- free(name_decoded);
- free(value_decoded);
- return 0;
-}
-
-/*
- * Parse a single key=value attribute. key/value pointers are
- * assumed to point into reasonably long-lived storage.
- *
- * Note that POSIX reserves all-lowercase keywords. Vendor-specific
- * extensions should always have keywords of the form "VENDOR.attribute"
- * In particular, it's quite feasible to support many different
- * vendor extensions here. I'm using "LIBARCHIVE" for extensions
- * unique to this library.
- *
- * Investigate other vendor-specific extensions and see if
- * any of them look useful.
- */
-static int
-pax_attribute(struct tar *tar, struct archive_entry *entry,
- char *key, char *value)
-{
- int64_t s;
- long n;
- wchar_t *wp;
-
- switch (key[0]) {
- case 'G':
- /* GNU "0.0" sparse pax format. */
- if (strcmp(key, "GNU.sparse.numblocks") == 0) {
- tar->sparse_offset = -1;
- tar->sparse_numbytes = -1;
- tar->sparse_gnu_major = 0;
- tar->sparse_gnu_minor = 0;
- }
- if (strcmp(key, "GNU.sparse.offset") == 0) {
- tar->sparse_offset = tar_atol10(value, strlen(value));
- if (tar->sparse_numbytes != -1) {
- gnu_add_sparse_entry(tar,
- tar->sparse_offset, tar->sparse_numbytes);
- tar->sparse_offset = -1;
- tar->sparse_numbytes = -1;
- }
- }
- if (strcmp(key, "GNU.sparse.numbytes") == 0) {
- tar->sparse_numbytes = tar_atol10(value, strlen(value));
- if (tar->sparse_numbytes != -1) {
- gnu_add_sparse_entry(tar,
- tar->sparse_offset, tar->sparse_numbytes);
- tar->sparse_offset = -1;
- tar->sparse_numbytes = -1;
- }
- }
- if (strcmp(key, "GNU.sparse.size") == 0) {
- tar->realsize = tar_atol10(value, strlen(value));
- archive_entry_set_size(entry, tar->realsize);
- }
-
- /* GNU "0.1" sparse pax format. */
- if (strcmp(key, "GNU.sparse.map") == 0) {
- tar->sparse_gnu_major = 0;
- tar->sparse_gnu_minor = 1;
- if (gnu_sparse_01_parse(tar, value) != ARCHIVE_OK)
- return (ARCHIVE_WARN);
- }
-
- /* GNU "1.0" sparse pax format */
- if (strcmp(key, "GNU.sparse.major") == 0) {
- tar->sparse_gnu_major = tar_atol10(value, strlen(value));
- tar->sparse_gnu_pending = 1;
- }
- if (strcmp(key, "GNU.sparse.minor") == 0) {
- tar->sparse_gnu_minor = tar_atol10(value, strlen(value));
- tar->sparse_gnu_pending = 1;
- }
- if (strcmp(key, "GNU.sparse.name") == 0) {
- /*
- * The real filename; when storing sparse
- * files, GNU tar puts a synthesized name into
- * the regular 'path' attribute in an attempt
- * to limit confusion. ;-)
- */
- archive_strcpy(&(tar->entry_pathname_override), value);
- }
- if (strcmp(key, "GNU.sparse.realsize") == 0) {
- tar->realsize = tar_atol10(value, strlen(value));
- archive_entry_set_size(entry, tar->realsize);
- }
- break;
- case 'L':
- /* Our extensions */
-/* TODO: Handle arbitrary extended attributes... */
-/*
- if (strcmp(key, "LIBARCHIVE.xxxxxxx")==0)
- archive_entry_set_xxxxxx(entry, value);
-*/
- if (strcmp(key, "LIBARCHIVE.creationtime")==0) {
- pax_time(value, &s, &n);
- archive_entry_set_birthtime(entry, s, n);
- }
- if (strncmp(key, "LIBARCHIVE.xattr.", 17)==0)
- pax_attribute_xattr(entry, key, value);
- break;
- case 'S':
- /* We support some keys used by the "star" archiver */
- if (strcmp(key, "SCHILY.acl.access")==0) {
- wp = utf8_decode(tar, value, strlen(value));
- /* TODO: if (wp == NULL) */
- __archive_entry_acl_parse_w(entry, wp,
- ARCHIVE_ENTRY_ACL_TYPE_ACCESS);
- } else if (strcmp(key, "SCHILY.acl.default")==0) {
- wp = utf8_decode(tar, value, strlen(value));
- /* TODO: if (wp == NULL) */
- __archive_entry_acl_parse_w(entry, wp,
- ARCHIVE_ENTRY_ACL_TYPE_DEFAULT);
- } else if (strcmp(key, "SCHILY.devmajor")==0) {
- archive_entry_set_rdevmajor(entry,
- tar_atol10(value, strlen(value)));
- } else if (strcmp(key, "SCHILY.devminor")==0) {
- archive_entry_set_rdevminor(entry,
- tar_atol10(value, strlen(value)));
- } else if (strcmp(key, "SCHILY.fflags")==0) {
- archive_entry_copy_fflags_text(entry, value);
- } else if (strcmp(key, "SCHILY.dev")==0) {
- archive_entry_set_dev(entry,
- tar_atol10(value, strlen(value)));
- } else if (strcmp(key, "SCHILY.ino")==0) {
- archive_entry_set_ino(entry,
- tar_atol10(value, strlen(value)));
- } else if (strcmp(key, "SCHILY.nlink")==0) {
- archive_entry_set_nlink(entry,
- tar_atol10(value, strlen(value)));
- } else if (strcmp(key, "SCHILY.realsize")==0) {
- tar->realsize = tar_atol10(value, strlen(value));
- archive_entry_set_size(entry, tar->realsize);
- }
- break;
- case 'a':
- if (strcmp(key, "atime")==0) {
- pax_time(value, &s, &n);
- archive_entry_set_atime(entry, s, n);
- }
- break;
- case 'c':
- if (strcmp(key, "ctime")==0) {
- pax_time(value, &s, &n);
- archive_entry_set_ctime(entry, s, n);
- } else if (strcmp(key, "charset")==0) {
- /* TODO: Publish charset information in entry. */
- } else if (strcmp(key, "comment")==0) {
- /* TODO: Publish comment in entry. */
- }
- break;
- case 'g':
- if (strcmp(key, "gid")==0) {
- archive_entry_set_gid(entry,
- tar_atol10(value, strlen(value)));
- } else if (strcmp(key, "gname")==0) {
- archive_strcpy(&(tar->entry_gname), value);
- }
- break;
- case 'h':
- if (strcmp(key, "hdrcharset") == 0) {
- if (strcmp(value, "BINARY") == 0)
- tar->pax_hdrcharset_binary = 1;
- else if (strcmp(value, "ISO-IR 10646 2000 UTF-8") == 0)
- tar->pax_hdrcharset_binary = 0;
- else {
- /* TODO: Warn about unsupported hdrcharset */
- }
- }
- break;
- case 'l':
- /* pax interchange doesn't distinguish hardlink vs. symlink. */
- if (strcmp(key, "linkpath")==0) {
- archive_strcpy(&(tar->entry_linkpath), value);
- }
- break;
- case 'm':
- if (strcmp(key, "mtime")==0) {
- pax_time(value, &s, &n);
- archive_entry_set_mtime(entry, s, n);
- }
- break;
- case 'p':
- if (strcmp(key, "path")==0) {
- archive_strcpy(&(tar->entry_pathname), value);
- }
- break;
- case 'r':
- /* POSIX has reserved 'realtime.*' */
- break;
- case 's':
- /* POSIX has reserved 'security.*' */
- /* Someday: if (strcmp(key, "security.acl")==0) { ... } */
- if (strcmp(key, "size")==0) {
- /* "size" is the size of the data in the entry. */
- tar->entry_bytes_remaining
- = tar_atol10(value, strlen(value));
- /*
- * But, "size" is not necessarily the size of
- * the file on disk; if this is a sparse file,
- * the disk size may have already been set from
- * GNU.sparse.realsize or GNU.sparse.size or
- * an old GNU header field or SCHILY.realsize
- * or ....
- */
- if (tar->realsize < 0) {
- archive_entry_set_size(entry,
- tar->entry_bytes_remaining);
- tar->realsize
- = tar->entry_bytes_remaining;
- }
- }
- break;
- case 'u':
- if (strcmp(key, "uid")==0) {
- archive_entry_set_uid(entry,
- tar_atol10(value, strlen(value)));
- } else if (strcmp(key, "uname")==0) {
- archive_strcpy(&(tar->entry_uname), value);
- }
- break;
- }
- return (0);
-}
-
-
-
-/*
- * parse a decimal time value, which may include a fractional portion
- */
-static void
-pax_time(const char *p, int64_t *ps, long *pn)
-{
- char digit;
- int64_t s;
- unsigned long l;
- int sign;
- int64_t limit, last_digit_limit;
-
- limit = INT64_MAX / 10;
- last_digit_limit = INT64_MAX % 10;
-
- s = 0;
- sign = 1;
- if (*p == '-') {
- sign = -1;
- p++;
- }
- while (*p >= '0' && *p <= '9') {
- digit = *p - '0';
- if (s > limit ||
- (s == limit && digit > last_digit_limit)) {
- s = INT64_MAX;
- break;
- }
- s = (s * 10) + digit;
- ++p;
- }
-
- *ps = s * sign;
-
- /* Calculate nanoseconds. */
- *pn = 0;
-
- if (*p != '.')
- return;
-
- l = 100000000UL;
- do {
- ++p;
- if (*p >= '0' && *p <= '9')
- *pn += (*p - '0') * l;
- else
- break;
- } while (l /= 10);
-}
-
-/*
- * Parse GNU tar header
- */
-static int
-header_gnutar(struct archive_read *a, struct tar *tar,
- struct archive_entry *entry, const void *h)
-{
- const struct archive_entry_header_gnutar *header;
-
- (void)a;
-
- /*
- * GNU header is like POSIX ustar, except 'prefix' is
- * replaced with some other fields. This also means the
- * filename is stored as in old-style archives.
- */
-
- /* Grab fields common to all tar variants. */
- header_common(a, tar, entry, h);
-
- /* Copy filename over (to ensure null termination). */
- header = (const struct archive_entry_header_gnutar *)h;
- archive_strncpy(&(tar->entry_pathname), header->name,
- sizeof(header->name));
- archive_entry_copy_pathname(entry, tar->entry_pathname.s);
-
- /* Fields common to ustar and GNU */
- /* XXX Can the following be factored out since it's common
- * to ustar and gnu tar? Is it okay to move it down into
- * header_common, perhaps? */
- archive_strncpy(&(tar->entry_uname),
- header->uname, sizeof(header->uname));
- archive_entry_copy_uname(entry, tar->entry_uname.s);
-
- archive_strncpy(&(tar->entry_gname),
- header->gname, sizeof(header->gname));
- archive_entry_copy_gname(entry, tar->entry_gname.s);
-
- /* Parse out device numbers only for char and block specials */
- if (header->typeflag[0] == '3' || header->typeflag[0] == '4') {
- archive_entry_set_rdevmajor(entry,
- tar_atol(header->rdevmajor, sizeof(header->rdevmajor)));
- archive_entry_set_rdevminor(entry,
- tar_atol(header->rdevminor, sizeof(header->rdevminor)));
- } else
- archive_entry_set_rdev(entry, 0);
-
- tar->entry_padding = 0x1ff & (-tar->entry_bytes_remaining);
-
- /* Grab GNU-specific fields. */
- archive_entry_set_atime(entry,
- tar_atol(header->atime, sizeof(header->atime)), 0);
- archive_entry_set_ctime(entry,
- tar_atol(header->ctime, sizeof(header->ctime)), 0);
- if (header->realsize[0] != 0) {
- tar->realsize
- = tar_atol(header->realsize, sizeof(header->realsize));
- archive_entry_set_size(entry, tar->realsize);
- }
-
- if (header->sparse[0].offset[0] != 0) {
- gnu_sparse_old_read(a, tar, header);
- } else {
- if (header->isextended[0] != 0) {
- /* XXX WTF? XXX */
- }
- }
-
- return (0);
-}
-
-static void
-gnu_add_sparse_entry(struct tar *tar, off_t offset, off_t remaining)
-{
- struct sparse_block *p;
-
- p = (struct sparse_block *)malloc(sizeof(*p));
- if (p == NULL)
- __archive_errx(1, "Out of memory");
- memset(p, 0, sizeof(*p));
- if (tar->sparse_last != NULL)
- tar->sparse_last->next = p;
- else
- tar->sparse_list = p;
- tar->sparse_last = p;
- p->offset = offset;
- p->remaining = remaining;
-}
-
-static void
-gnu_clear_sparse_list(struct tar *tar)
-{
- struct sparse_block *p;
-
- while (tar->sparse_list != NULL) {
- p = tar->sparse_list;
- tar->sparse_list = p->next;
- free(p);
- }
- tar->sparse_last = NULL;
-}
-
-/*
- * GNU tar old-format sparse data.
- *
- * GNU old-format sparse data is stored in a fixed-field
- * format. Offset/size values are 11-byte octal fields (same
- * format as 'size' field in ustart header). These are
- * stored in the header, allocating subsequent header blocks
- * as needed. Extending the header in this way is a pretty
- * severe POSIX violation; this design has earned GNU tar a
- * lot of criticism.
- */
-
-static int
-gnu_sparse_old_read(struct archive_read *a, struct tar *tar,
- const struct archive_entry_header_gnutar *header)
-{
- ssize_t bytes_read;
- const void *data;
- struct extended {
- struct gnu_sparse sparse[21];
- char isextended[1];
- char padding[7];
- };
- const struct extended *ext;
-
- gnu_sparse_old_parse(tar, header->sparse, 4);
- if (header->isextended[0] == 0)
- return (ARCHIVE_OK);
-
- do {
- data = __archive_read_ahead(a, 512, &bytes_read);
- if (bytes_read < 0)
- return (ARCHIVE_FATAL);
- if (bytes_read < 512) {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
- "Truncated tar archive "
- "detected while reading sparse file data");
- return (ARCHIVE_FATAL);
- }
- __archive_read_consume(a, 512);
- ext = (const struct extended *)data;
- gnu_sparse_old_parse(tar, ext->sparse, 21);
- } while (ext->isextended[0] != 0);
- if (tar->sparse_list != NULL)
- tar->entry_offset = tar->sparse_list->offset;
- return (ARCHIVE_OK);
-}
-
-static void
-gnu_sparse_old_parse(struct tar *tar,
- const struct gnu_sparse *sparse, int length)
-{
- while (length > 0 && sparse->offset[0] != 0) {
- gnu_add_sparse_entry(tar,
- tar_atol(sparse->offset, sizeof(sparse->offset)),
- tar_atol(sparse->numbytes, sizeof(sparse->numbytes)));
- sparse++;
- length--;
- }
-}
-
-/*
- * GNU tar sparse format 0.0
- *
- * Beginning with GNU tar 1.15, sparse files are stored using
- * information in the pax extended header. The GNU tar maintainers
- * have gone through a number of variations in the process of working
- * out this scheme; furtunately, they're all numbered.
- *
- * Sparse format 0.0 uses attribute GNU.sparse.numblocks to store the
- * number of blocks, and GNU.sparse.offset/GNU.sparse.numbytes to
- * store offset/size for each block. The repeated instances of these
- * latter fields violate the pax specification (which frowns on
- * duplicate keys), so this format was quickly replaced.
- */
-
-/*
- * GNU tar sparse format 0.1
- *
- * This version replaced the offset/numbytes attributes with
- * a single "map" attribute that stored a list of integers. This
- * format had two problems: First, the "map" attribute could be very
- * long, which caused problems for some implementations. More
- * importantly, the sparse data was lost when extracted by archivers
- * that didn't recognize this extension.
- */
-
-static int
-gnu_sparse_01_parse(struct tar *tar, const char *p)
-{
- const char *e;
- off_t offset = -1, size = -1;
-
- for (;;) {
- e = p;
- while (*e != '\0' && *e != ',') {
- if (*e < '0' || *e > '9')
- return (ARCHIVE_WARN);
- e++;
- }
- if (offset < 0) {
- offset = tar_atol10(p, e - p);
- if (offset < 0)
- return (ARCHIVE_WARN);
- } else {
- size = tar_atol10(p, e - p);
- if (size < 0)
- return (ARCHIVE_WARN);
- gnu_add_sparse_entry(tar, offset, size);
- offset = -1;
- }
- if (*e == '\0')
- return (ARCHIVE_OK);
- p = e + 1;
- }
-}
-
-/*
- * GNU tar sparse format 1.0
- *
- * The idea: The offset/size data is stored as a series of base-10
- * ASCII numbers prepended to the file data, so that dearchivers that
- * don't support this format will extract the block map along with the
- * data and a separate post-process can restore the sparseness.
- *
- * Unfortunately, GNU tar 1.16 had a bug that added unnecessary
- * padding to the body of the file when using this format. GNU tar
- * 1.17 corrected this bug without bumping the version number, so
- * it's not possible to support both variants. This code supports
- * the later variant at the expense of not supporting the former.
- *
- * This variant also replaced GNU.sparse.size with GNU.sparse.realsize
- * and introduced the GNU.sparse.major/GNU.sparse.minor attributes.
- */
-
-/*
- * Read the next line from the input, and parse it as a decimal
- * integer followed by '\n'. Returns positive integer value or
- * negative on error.
- */
-static int64_t
-gnu_sparse_10_atol(struct archive_read *a, struct tar *tar,
- ssize_t *remaining)
-{
- int64_t l, limit, last_digit_limit;
- const char *p;
- ssize_t bytes_read;
- int base, digit;
-
- base = 10;
- limit = INT64_MAX / base;
- last_digit_limit = INT64_MAX % base;
-
- /*
- * Skip any lines starting with '#'; GNU tar specs
- * don't require this, but they should.
- */
- do {
- bytes_read = readline(a, tar, &p, tar_min(*remaining, 100));
- if (bytes_read <= 0)
- return (ARCHIVE_FATAL);
- *remaining -= bytes_read;
- } while (p[0] == '#');
-
- l = 0;
- while (bytes_read > 0) {
- if (*p == '\n')
- return (l);
- if (*p < '0' || *p >= '0' + base)
- return (ARCHIVE_WARN);
- digit = *p - '0';
- if (l > limit || (l == limit && digit > last_digit_limit))
- l = INT64_MAX; /* Truncate on overflow. */
- else
- l = (l * base) + digit;
- p++;
- bytes_read--;
- }
- /* TODO: Error message. */
- return (ARCHIVE_WARN);
-}
-
-/*
- * Returns length (in bytes) of the sparse data description
- * that was read.
- */
-static ssize_t
-gnu_sparse_10_read(struct archive_read *a, struct tar *tar)
-{
- ssize_t remaining, bytes_read;
- int entries;
- off_t offset, size, to_skip;
-
- /* Clear out the existing sparse list. */
- gnu_clear_sparse_list(tar);
-
- remaining = tar->entry_bytes_remaining;
-
- /* Parse entries. */
- entries = gnu_sparse_10_atol(a, tar, &remaining);
- if (entries < 0)
- return (ARCHIVE_FATAL);
- /* Parse the individual entries. */
- while (entries-- > 0) {
- /* Parse offset/size */
- offset = gnu_sparse_10_atol(a, tar, &remaining);
- if (offset < 0)
- return (ARCHIVE_FATAL);
- size = gnu_sparse_10_atol(a, tar, &remaining);
- if (size < 0)
- return (ARCHIVE_FATAL);
- /* Add a new sparse entry. */
- gnu_add_sparse_entry(tar, offset, size);
- }
- /* Skip rest of block... */
- bytes_read = tar->entry_bytes_remaining - remaining;
- to_skip = 0x1ff & -bytes_read;
- if (to_skip != __archive_read_skip(a, to_skip))
- return (ARCHIVE_FATAL);
- return (bytes_read + to_skip);
-}
-
-/*-
- * Convert text->integer.
- *
- * Traditional tar formats (including POSIX) specify base-8 for
- * all of the standard numeric fields. This is a significant limitation
- * in practice:
- * = file size is limited to 8GB
- * = rdevmajor and rdevminor are limited to 21 bits
- * = uid/gid are limited to 21 bits
- *
- * There are two workarounds for this:
- * = pax extended headers, which use variable-length string fields
- * = GNU tar and STAR both allow either base-8 or base-256 in
- * most fields. The high bit is set to indicate base-256.
- *
- * On read, this implementation supports both extensions.
- */
-static int64_t
-tar_atol(const char *p, unsigned char_cnt)
-{
- /*
- * Technically, GNU tar considers a field to be in base-256
- * only if the first byte is 0xff or 0x80.
- */
- if (*p & 0x80)
- return (tar_atol256(p, char_cnt));
- return (tar_atol8(p, char_cnt));
-}
-
-/*
- * Note that this implementation does not (and should not!) obey
- * locale settings; you cannot simply substitute strtol here, since
- * it does obey locale.
- */
-static int64_t
-tar_atol8(const char *p, unsigned char_cnt)
-{
- int64_t l, limit, last_digit_limit;
- int digit, sign, base;
-
- base = 8;
- limit = INT64_MAX / base;
- last_digit_limit = INT64_MAX % base;
-
- while (*p == ' ' || *p == '\t')
- p++;
- if (*p == '-') {
- sign = -1;
- p++;
- } else
- sign = 1;
-
- l = 0;
- digit = *p - '0';
- while (digit >= 0 && digit < base && char_cnt-- > 0) {
- if (l>limit || (l == limit && digit > last_digit_limit)) {
- l = INT64_MAX; /* Truncate on overflow. */
- break;
- }
- l = (l * base) + digit;
- digit = *++p - '0';
- }
- return (sign < 0) ? -l : l;
-}
-
-/*
- * Note that this implementation does not (and should not!) obey
- * locale settings; you cannot simply substitute strtol here, since
- * it does obey locale.
- */
-static int64_t
-tar_atol10(const char *p, unsigned char_cnt)
-{
- int64_t l, limit, last_digit_limit;
- int base, digit, sign;
-
- base = 10;
- limit = INT64_MAX / base;
- last_digit_limit = INT64_MAX % base;
-
- while (*p == ' ' || *p == '\t')
- p++;
- if (*p == '-') {
- sign = -1;
- p++;
- } else
- sign = 1;
-
- l = 0;
- digit = *p - '0';
- while (digit >= 0 && digit < base && char_cnt-- > 0) {
- if (l > limit || (l == limit && digit > last_digit_limit)) {
- l = INT64_MAX; /* Truncate on overflow. */
- break;
- }
- l = (l * base) + digit;
- digit = *++p - '0';
- }
- return (sign < 0) ? -l : l;
-}
-
-/*
- * Parse a base-256 integer. This is just a straight signed binary
- * value in big-endian order, except that the high-order bit is
- * ignored.
- */
-static int64_t
-tar_atol256(const char *_p, unsigned char_cnt)
-{
- int64_t l, upper_limit, lower_limit;
- const unsigned char *p = (const unsigned char *)_p;
-
- upper_limit = INT64_MAX / 256;
- lower_limit = INT64_MIN / 256;
-
- /* Pad with 1 or 0 bits, depending on sign. */
- if ((0x40 & *p) == 0x40)
- l = (int64_t)-1;
- else
- l = 0;
- l = (l << 6) | (0x3f & *p++);
- while (--char_cnt > 0) {
- if (l > upper_limit) {
- l = INT64_MAX; /* Truncate on overflow */
- break;
- } else if (l < lower_limit) {
- l = INT64_MIN;
- break;
- }
- l = (l << 8) | (0xff & (int64_t)*p++);
- }
- return (l);
-}
-
-/*
- * Returns length of line (including trailing newline)
- * or negative on error. 'start' argument is updated to
- * point to first character of line. This avoids copying
- * when possible.
- */
-static ssize_t
-readline(struct archive_read *a, struct tar *tar, const char **start,
- ssize_t limit)
-{
- ssize_t bytes_read;
- ssize_t total_size = 0;
- const void *t;
- const char *s;
- void *p;
-
- t = __archive_read_ahead(a, 1, &bytes_read);
- if (bytes_read <= 0)
- return (ARCHIVE_FATAL);
- s = t; /* Start of line? */
- p = memchr(t, '\n', bytes_read);
- /* If we found '\n' in the read buffer, return pointer to that. */
- if (p != NULL) {
- bytes_read = 1 + ((const char *)p) - s;
- if (bytes_read > limit) {
- archive_set_error(&a->archive,
- ARCHIVE_ERRNO_FILE_FORMAT,
- "Line too long");
- return (ARCHIVE_FATAL);
- }
- __archive_read_consume(a, bytes_read);
- *start = s;
- return (bytes_read);
- }
- /* Otherwise, we need to accumulate in a line buffer. */
- for (;;) {
- if (total_size + bytes_read > limit) {
- archive_set_error(&a->archive,
- ARCHIVE_ERRNO_FILE_FORMAT,
- "Line too long");
- return (ARCHIVE_FATAL);
- }
- if (archive_string_ensure(&tar->line, total_size + bytes_read) == NULL) {
- archive_set_error(&a->archive, ENOMEM,
- "Can't allocate working buffer");
- return (ARCHIVE_FATAL);
- }
- memcpy(tar->line.s + total_size, t, bytes_read);
- __archive_read_consume(a, bytes_read);
- total_size += bytes_read;
- /* If we found '\n', clean up and return. */
- if (p != NULL) {
- *start = tar->line.s;
- return (total_size);
- }
- /* Read some more. */
- t = __archive_read_ahead(a, 1, &bytes_read);
- if (bytes_read <= 0)
- return (ARCHIVE_FATAL);
- s = t; /* Start of line? */
- p = memchr(t, '\n', bytes_read);
- /* If we found '\n', trim the read. */
- if (p != NULL) {
- bytes_read = 1 + ((const char *)p) - s;
- }
- }
-}
-
-static wchar_t *
-utf8_decode(struct tar *tar, const char *src, size_t length)
-{
- wchar_t *dest;
- ssize_t n;
-
- /* Ensure pax_entry buffer is big enough. */
- if (tar->pax_entry_length <= length) {
- wchar_t *old_entry;
-
- if (tar->pax_entry_length <= 0)
- tar->pax_entry_length = 1024;
- while (tar->pax_entry_length <= length + 1)
- tar->pax_entry_length *= 2;
-
- old_entry = tar->pax_entry;
- tar->pax_entry = (wchar_t *)realloc(tar->pax_entry,
- tar->pax_entry_length * sizeof(wchar_t));
- if (tar->pax_entry == NULL) {
- free(old_entry);
- /* TODO: Handle this error. */
- return (NULL);
- }
- }
-
- dest = tar->pax_entry;
- while (length > 0) {
- n = UTF8_mbrtowc(dest, src, length);
- if (n < 0)
- return (NULL);
- if (n == 0)
- break;
- dest++;
- src += n;
- length -= n;
- }
- *dest = L'\0';
- return (tar->pax_entry);
-}
-
-/*
- * Copied and simplified from FreeBSD libc/locale.
- */
-static ssize_t
-UTF8_mbrtowc(wchar_t *pwc, const char *s, size_t n)
-{
- int ch, i, len, mask;
- unsigned long wch;
-
- if (s == NULL || n == 0 || pwc == NULL)
- return (0);
-
- /*
- * Determine the number of octets that make up this character from
- * the first octet, and a mask that extracts the interesting bits of
- * the first octet.
- */
- ch = (unsigned char)*s;
- if ((ch & 0x80) == 0) {
- mask = 0x7f;
- len = 1;
- } else if ((ch & 0xe0) == 0xc0) {
- mask = 0x1f;
- len = 2;
- } else if ((ch & 0xf0) == 0xe0) {
- mask = 0x0f;
- len = 3;
- } else if ((ch & 0xf8) == 0xf0) {
- mask = 0x07;
- len = 4;
- } else {
- /* Invalid first byte. */
- return (-1);
- }
-
- if (n < (size_t)len) {
- /* Valid first byte but truncated. */
- return (-2);
- }
-
- /*
- * Decode the octet sequence representing the character in chunks
- * of 6 bits, most significant first.
- */
- wch = (unsigned char)*s++ & mask;
- i = len;
- while (--i != 0) {
- if ((*s & 0xc0) != 0x80) {
- /* Invalid intermediate byte; consume one byte and
- * emit '?' */
- *pwc = '?';
- return (1);
- }
- wch <<= 6;
- wch |= *s++ & 0x3f;
- }
-
- /* Assign the value to the output; out-of-range values
- * just get truncated. */
- *pwc = (wchar_t)wch;
-#ifdef WCHAR_MAX
- /*
- * If platform has WCHAR_MAX, we can do something
- * more sensible with out-of-range values.
- */
- if (wch >= WCHAR_MAX)
- *pwc = '?';
-#endif
- /* Return number of bytes input consumed: 0 for end-of-string. */
- return (wch == L'\0' ? 0 : len);
-}
-
-
-/*
- * base64_decode - Base64 decode
- *
- * This accepts most variations of base-64 encoding, including:
- * * with or without line breaks
- * * with or without the final group padded with '=' or '_' characters
- * (The most economical Base-64 variant does not pad the last group and
- * omits line breaks; RFC1341 used for MIME requires both.)
- */
-static char *
-base64_decode(const char *s, size_t len, size_t *out_len)
-{
- static const unsigned char digits[64] = {
- 'A','B','C','D','E','F','G','H','I','J','K','L','M','N',
- 'O','P','Q','R','S','T','U','V','W','X','Y','Z','a','b',
- 'c','d','e','f','g','h','i','j','k','l','m','n','o','p',
- 'q','r','s','t','u','v','w','x','y','z','0','1','2','3',
- '4','5','6','7','8','9','+','/' };
- static unsigned char decode_table[128];
- char *out, *d;
- const unsigned char *src = (const unsigned char *)s;
-
- /* If the decode table is not yet initialized, prepare it. */
- if (decode_table[digits[1]] != 1) {
- unsigned i;
- memset(decode_table, 0xff, sizeof(decode_table));
- for (i = 0; i < sizeof(digits); i++)
- decode_table[digits[i]] = i;
- }
-
- /* Allocate enough space to hold the entire output. */
- /* Note that we may not use all of this... */
- out = (char *)malloc(len - len / 4 + 1);
- if (out == NULL) {
- *out_len = 0;
- return (NULL);
- }
- d = out;
-
- while (len > 0) {
- /* Collect the next group of (up to) four characters. */
- int v = 0;
- int group_size = 0;
- while (group_size < 4 && len > 0) {
- /* '=' or '_' padding indicates final group. */
- if (*src == '=' || *src == '_') {
- len = 0;
- break;
- }
- /* Skip illegal characters (including line breaks) */
- if (*src > 127 || *src < 32
- || decode_table[*src] == 0xff) {
- len--;
- src++;
- continue;
- }
- v <<= 6;
- v |= decode_table[*src++];
- len --;
- group_size++;
- }
- /* Align a short group properly. */
- v <<= 6 * (4 - group_size);
- /* Unpack the group we just collected. */
- switch (group_size) {
- case 4: d[2] = v & 0xff;
- /* FALLTHROUGH */
- case 3: d[1] = (v >> 8) & 0xff;
- /* FALLTHROUGH */
- case 2: d[0] = (v >> 16) & 0xff;
- break;
- case 1: /* this is invalid! */
- break;
- }
- d += group_size * 3 / 4;
- }
-
- *out_len = d - out;
- return (out);
-}
-
-static char *
-url_decode(const char *in)
-{
- char *out, *d;
- const char *s;
-
- out = (char *)malloc(strlen(in) + 1);
- if (out == NULL)
- return (NULL);
- for (s = in, d = out; *s != '\0'; ) {
- if (s[0] == '%' && s[1] != '\0' && s[2] != '\0') {
- /* Try to convert % escape */
- int digit1 = tohex(s[1]);
- int digit2 = tohex(s[2]);
- if (digit1 >= 0 && digit2 >= 0) {
- /* Looks good, consume three chars */
- s += 3;
- /* Convert output */
- *d++ = ((digit1 << 4) | digit2);
- continue;
- }
- /* Else fall through and treat '%' as normal char */
- }
- *d++ = *s++;
- }
- *d = '\0';
- return (out);
-}
-
-static int
-tohex(int c)
-{
- if (c >= '0' && c <= '9')
- return (c - '0');
- else if (c >= 'A' && c <= 'F')
- return (c - 'A' + 10);
- else if (c >= 'a' && c <= 'f')
- return (c - 'a' + 10);
- else
- return (-1);
-}
diff --git a/lib/libarchive/archive_read_support_format_zip.c b/lib/libarchive/archive_read_support_format_zip.c
deleted file mode 100644
index 0fa1fa3..0000000
--- a/lib/libarchive/archive_read_support_format_zip.c
+++ /dev/null
@@ -1,950 +0,0 @@
-/*-
- * Copyright (c) 2004 Tim Kientzle
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "archive_platform.h"
-__FBSDID("$FreeBSD$");
-
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#include <stdio.h>
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#include <time.h>
-#ifdef HAVE_ZLIB_H
-#include <zlib.h>
-#endif
-
-#include "archive.h"
-#include "archive_entry.h"
-#include "archive_private.h"
-#include "archive_read_private.h"
-#include "archive_endian.h"
-
-#ifndef HAVE_ZLIB_H
-#include "archive_crc32.h"
-#endif
-
-struct zip {
- /* entry_bytes_remaining is the number of bytes we expect. */
- int64_t entry_bytes_remaining;
- int64_t entry_offset;
-
- /* These count the number of bytes actually read for the entry. */
- int64_t entry_compressed_bytes_read;
- int64_t entry_uncompressed_bytes_read;
-
- /* Running CRC32 of the decompressed data */
- unsigned long entry_crc32;
-
- unsigned version;
- unsigned system;
- unsigned flags;
- unsigned compression;
- const char * compression_name;
- time_t mtime;
- time_t ctime;
- time_t atime;
- mode_t mode;
- uid_t uid;
- gid_t gid;
-
- /* Flags to mark progress of decompression. */
- char decompress_init;
- char end_of_entry;
-
- unsigned long crc32;
- ssize_t filename_length;
- ssize_t extra_length;
- int64_t uncompressed_size;
- int64_t compressed_size;
-
- unsigned char *uncompressed_buffer;
- size_t uncompressed_buffer_size;
-#ifdef HAVE_ZLIB_H
- z_stream stream;
- char stream_valid;
-#endif
-
- struct archive_string pathname;
- struct archive_string extra;
- char format_name[64];
-};
-
-#define ZIP_LENGTH_AT_END 8
-
-struct zip_file_header {
- char signature[4];
- char version[2];
- char flags[2];
- char compression[2];
- char timedate[4];
- char crc32[4];
- char compressed_size[4];
- char uncompressed_size[4];
- char filename_length[2];
- char extra_length[2];
-};
-
-static const char *compression_names[] = {
- "uncompressed",
- "shrinking",
- "reduced-1",
- "reduced-2",
- "reduced-3",
- "reduced-4",
- "imploded",
- "reserved",
- "deflation"
-};
-
-static int archive_read_format_zip_bid(struct archive_read *);
-static int archive_read_format_zip_cleanup(struct archive_read *);
-static int archive_read_format_zip_read_data(struct archive_read *,
- const void **, size_t *, off_t *);
-static int archive_read_format_zip_read_data_skip(struct archive_read *a);
-static int archive_read_format_zip_read_header(struct archive_read *,
- struct archive_entry *);
-static int search_next_signature(struct archive_read *);
-static int zip_read_data_deflate(struct archive_read *a, const void **buff,
- size_t *size, off_t *offset);
-static int zip_read_data_none(struct archive_read *a, const void **buff,
- size_t *size, off_t *offset);
-static int zip_read_file_header(struct archive_read *a,
- struct archive_entry *entry, struct zip *zip);
-static time_t zip_time(const char *);
-static void process_extra(const void* extra, struct zip* zip);
-
-int
-archive_read_support_format_zip(struct archive *_a)
-{
- struct archive_read *a = (struct archive_read *)_a;
- struct zip *zip;
- int r;
-
- zip = (struct zip *)malloc(sizeof(*zip));
- if (zip == NULL) {
- archive_set_error(&a->archive, ENOMEM, "Can't allocate zip data");
- return (ARCHIVE_FATAL);
- }
- memset(zip, 0, sizeof(*zip));
-
- r = __archive_read_register_format(a,
- zip,
- "zip",
- archive_read_format_zip_bid,
- NULL,
- archive_read_format_zip_read_header,
- archive_read_format_zip_read_data,
- archive_read_format_zip_read_data_skip,
- archive_read_format_zip_cleanup);
-
- if (r != ARCHIVE_OK)
- free(zip);
- return (ARCHIVE_OK);
-}
-
-
-static int
-archive_read_format_zip_bid(struct archive_read *a)
-{
- const char *p;
- const void *buff;
- ssize_t bytes_avail, offset;
-
- if ((p = __archive_read_ahead(a, 4, NULL)) == NULL)
- return (-1);
-
- /*
- * Bid of 30 here is: 16 bits for "PK",
- * next 16-bit field has four options (-2 bits).
- * 16 + 16-2 = 30.
- */
- if (p[0] == 'P' && p[1] == 'K') {
- if ((p[2] == '\001' && p[3] == '\002')
- || (p[2] == '\003' && p[3] == '\004')
- || (p[2] == '\005' && p[3] == '\006')
- || (p[2] == '\007' && p[3] == '\010')
- || (p[2] == '0' && p[3] == '0'))
- return (30);
- }
-
- /*
- * Attempt to handle self-extracting archives
- * by noting a PE header and searching forward
- * up to 128k for a 'PK\003\004' marker.
- */
- if (p[0] == 'M' && p[1] == 'Z') {
- /*
- * TODO: Optimize by initializing 'offset' to an
- * estimate of the likely start of the archive data
- * based on values in the PE header. Note that we
- * don't need to be exact, but we mustn't skip too
- * far. The search below will compensate if we
- * undershoot.
- */
- offset = 0;
- while (offset < 124000) {
- /* Get 4k of data beyond where we stopped. */
- buff = __archive_read_ahead(a, offset + 4096,
- &bytes_avail);
- if (bytes_avail < offset + 1)
- break;
- p = (const char *)buff + offset;
- while (p + 9 < (const char *)buff + bytes_avail) {
- if (p[0] == 'P' && p[1] == 'K' /* signature */
- && p[2] == 3 && p[3] == 4 /* File entry */
- && p[8] == 8 /* compression == deflate */
- && p[9] == 0 /* High byte of compression */
- )
- {
- return (30);
- }
- ++p;
- }
- offset = p - (const char *)buff;
- }
- }
-
- return (0);
-}
-
-/*
- * Search forward for a "PK\003\004" file header. This handles the
- * case of self-extracting archives, where there is an executable
- * prepended to the ZIP archive.
- */
-static int
-skip_sfx(struct archive_read *a)
-{
- const void *h;
- const char *p, *q;
- size_t skip;
- ssize_t bytes;
-
- /*
- * TODO: We should be able to skip forward by a bunch
- * by lifting some values from the PE header. We don't
- * need to be exact (we're still going to search forward
- * to find the header), but it will speed things up and
- * reduce the chance of a false positive.
- */
- for (;;) {
- h = __archive_read_ahead(a, 4, &bytes);
- if (bytes < 4)
- return (ARCHIVE_FATAL);
- p = h;
- q = p + bytes;
-
- /*
- * Scan ahead until we find something that looks
- * like the zip header.
- */
- while (p + 4 < q) {
- switch (p[3]) {
- case '\004':
- /* TODO: Additional verification here. */
- if (memcmp("PK\003\004", p, 4) == 0) {
- skip = p - (const char *)h;
- __archive_read_consume(a, skip);
- return (ARCHIVE_OK);
- }
- p += 4;
- break;
- case '\003': p += 1; break;
- case 'K': p += 2; break;
- case 'P': p += 3; break;
- default: p += 4; break;
- }
- }
- skip = p - (const char *)h;
- __archive_read_consume(a, skip);
- }
-}
-
-static int
-archive_read_format_zip_read_header(struct archive_read *a,
- struct archive_entry *entry)
-{
- const void *h;
- const char *signature;
- struct zip *zip;
- int r = ARCHIVE_OK, r1;
-
- a->archive.archive_format = ARCHIVE_FORMAT_ZIP;
- if (a->archive.archive_format_name == NULL)
- a->archive.archive_format_name = "ZIP";
-
- zip = (struct zip *)(a->format->data);
- zip->decompress_init = 0;
- zip->end_of_entry = 0;
- zip->entry_uncompressed_bytes_read = 0;
- zip->entry_compressed_bytes_read = 0;
- zip->entry_crc32 = crc32(0, NULL, 0);
- if ((h = __archive_read_ahead(a, 4, NULL)) == NULL)
- return (ARCHIVE_FATAL);
-
- signature = (const char *)h;
- if (signature[0] == 'M' && signature[1] == 'Z') {
- /* This is an executable? Must be self-extracting... */
- r = skip_sfx(a);
- if (r < ARCHIVE_WARN)
- return (r);
- if ((h = __archive_read_ahead(a, 4, NULL)) == NULL)
- return (ARCHIVE_FATAL);
- signature = (const char *)h;
- }
-
- /* If we don't see a PK signature here, scan forward. */
- if (signature[0] != 'P' || signature[1] != 'K') {
- r = search_next_signature(a);
- if (r != ARCHIVE_OK) {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
- "Bad ZIP file");
- return (ARCHIVE_FATAL);
- }
- if ((h = __archive_read_ahead(a, 4, NULL)) == NULL)
- return (ARCHIVE_FATAL);
- signature = (const char *)h;
- }
-
- /*
- * "PK00" signature is used for "split" archives that
- * only have a single segment. This means we can just
- * skip the PK00; the first real file header should follow.
- */
- if (signature[2] == '0' && signature[3] == '0') {
- __archive_read_consume(a, 4);
- if ((h = __archive_read_ahead(a, 4, NULL)) == NULL)
- return (ARCHIVE_FATAL);
- signature = (const char *)h;
- if (signature[0] != 'P' || signature[1] != 'K') {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
- "Bad ZIP file");
- return (ARCHIVE_FATAL);
- }
- }
-
- if (signature[2] == '\001' && signature[3] == '\002') {
- /* Beginning of central directory. */
- return (ARCHIVE_EOF);
- }
-
- if (signature[2] == '\003' && signature[3] == '\004') {
- /* Regular file entry. */
- r1 = zip_read_file_header(a, entry, zip);
- if (r1 != ARCHIVE_OK)
- return (r1);
- return (r);
- }
-
- if (signature[2] == '\005' && signature[3] == '\006') {
- /* End-of-archive record. */
- return (ARCHIVE_EOF);
- }
-
- if (signature[2] == '\007' && signature[3] == '\010') {
- /*
- * We should never encounter this record here;
- * see ZIP_LENGTH_AT_END handling below for details.
- */
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "Bad ZIP file: Unexpected end-of-entry record");
- return (ARCHIVE_FATAL);
- }
-
- archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
- "Damaged ZIP file or unsupported format variant (%d,%d)",
- signature[2], signature[3]);
- return (ARCHIVE_FATAL);
-}
-
-static int
-search_next_signature(struct archive_read *a)
-{
- const void *h;
- const char *p, *q;
- size_t skip;
- ssize_t bytes;
- int64_t skipped = 0;
-
- for (;;) {
- h = __archive_read_ahead(a, 4, &bytes);
- if (h == NULL)
- return (ARCHIVE_FATAL);
- p = h;
- q = p + bytes;
-
- while (p + 4 <= q) {
- if (p[0] == 'P' && p[1] == 'K') {
- if ((p[2] == '\001' && p[3] == '\002')
- || (p[2] == '\003' && p[3] == '\004')
- || (p[2] == '\005' && p[3] == '\006')
- || (p[2] == '\007' && p[3] == '\010')
- || (p[2] == '0' && p[3] == '0')) {
- skip = p - (const char *)h;
- __archive_read_consume(a, skip);
- return (ARCHIVE_OK);
- }
- }
- ++p;
- }
- skip = p - (const char *)h;
- __archive_read_consume(a, skip);
- skipped += skip;
- }
-}
-
-static int
-zip_read_file_header(struct archive_read *a, struct archive_entry *entry,
- struct zip *zip)
-{
- const struct zip_file_header *p;
- const void *h;
-
- if ((p = __archive_read_ahead(a, sizeof *p, NULL)) == NULL) {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
- "Truncated ZIP file header");
- return (ARCHIVE_FATAL);
- }
-
- zip->version = p->version[0];
- zip->system = p->version[1];
- zip->flags = archive_le16dec(p->flags);
- zip->compression = archive_le16dec(p->compression);
- if (zip->compression <
- sizeof(compression_names)/sizeof(compression_names[0]))
- zip->compression_name = compression_names[zip->compression];
- else
- zip->compression_name = "??";
- zip->mtime = zip_time(p->timedate);
- zip->ctime = 0;
- zip->atime = 0;
- zip->mode = 0;
- zip->uid = 0;
- zip->gid = 0;
- zip->crc32 = archive_le32dec(p->crc32);
- zip->filename_length = archive_le16dec(p->filename_length);
- zip->extra_length = archive_le16dec(p->extra_length);
- zip->uncompressed_size = archive_le32dec(p->uncompressed_size);
- zip->compressed_size = archive_le32dec(p->compressed_size);
-
- __archive_read_consume(a, sizeof(struct zip_file_header));
-
-
- /* Read the filename. */
- if ((h = __archive_read_ahead(a, zip->filename_length, NULL)) == NULL) {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
- "Truncated ZIP file header");
- return (ARCHIVE_FATAL);
- }
- if (archive_string_ensure(&zip->pathname, zip->filename_length) == NULL)
- __archive_errx(1, "Out of memory");
- archive_strncpy(&zip->pathname, h, zip->filename_length);
- __archive_read_consume(a, zip->filename_length);
- archive_entry_set_pathname(entry, zip->pathname.s);
-
- if (zip->pathname.s[archive_strlen(&zip->pathname) - 1] == '/')
- zip->mode = AE_IFDIR | 0777;
- else
- zip->mode = AE_IFREG | 0777;
-
- /* Read the extra data. */
- if ((h = __archive_read_ahead(a, zip->extra_length, NULL)) == NULL) {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
- "Truncated ZIP file header");
- return (ARCHIVE_FATAL);
- }
- process_extra(h, zip);
- __archive_read_consume(a, zip->extra_length);
-
- /* Populate some additional entry fields: */
- archive_entry_set_mode(entry, zip->mode);
- archive_entry_set_uid(entry, zip->uid);
- archive_entry_set_gid(entry, zip->gid);
- archive_entry_set_mtime(entry, zip->mtime, 0);
- archive_entry_set_ctime(entry, zip->ctime, 0);
- archive_entry_set_atime(entry, zip->atime, 0);
- /* Set the size only if it's meaningful. */
- if (0 == (zip->flags & ZIP_LENGTH_AT_END))
- archive_entry_set_size(entry, zip->uncompressed_size);
-
- zip->entry_bytes_remaining = zip->compressed_size;
- zip->entry_offset = 0;
-
- /* If there's no body, force read_data() to return EOF immediately. */
- if (0 == (zip->flags & ZIP_LENGTH_AT_END)
- && zip->entry_bytes_remaining < 1)
- zip->end_of_entry = 1;
-
- /* Set up a more descriptive format name. */
- sprintf(zip->format_name, "ZIP %d.%d (%s)",
- zip->version / 10, zip->version % 10,
- zip->compression_name);
- a->archive.archive_format_name = zip->format_name;
-
- return (ARCHIVE_OK);
-}
-
-/* Convert an MSDOS-style date/time into Unix-style time. */
-static time_t
-zip_time(const char *p)
-{
- int msTime, msDate;
- struct tm ts;
-
- msTime = (0xff & (unsigned)p[0]) + 256 * (0xff & (unsigned)p[1]);
- msDate = (0xff & (unsigned)p[2]) + 256 * (0xff & (unsigned)p[3]);
-
- memset(&ts, 0, sizeof(ts));
- ts.tm_year = ((msDate >> 9) & 0x7f) + 80; /* Years since 1900. */
- ts.tm_mon = ((msDate >> 5) & 0x0f) - 1; /* Month number. */
- ts.tm_mday = msDate & 0x1f; /* Day of month. */
- ts.tm_hour = (msTime >> 11) & 0x1f;
- ts.tm_min = (msTime >> 5) & 0x3f;
- ts.tm_sec = (msTime << 1) & 0x3e;
- ts.tm_isdst = -1;
- return mktime(&ts);
-}
-
-static int
-archive_read_format_zip_read_data(struct archive_read *a,
- const void **buff, size_t *size, off_t *offset)
-{
- int r;
- struct zip *zip;
-
- zip = (struct zip *)(a->format->data);
-
- /*
- * If we hit end-of-entry last time, clean up and return
- * ARCHIVE_EOF this time.
- */
- if (zip->end_of_entry) {
- *offset = zip->entry_uncompressed_bytes_read;
- *size = 0;
- *buff = NULL;
- return (ARCHIVE_EOF);
- }
-
- switch(zip->compression) {
- case 0: /* No compression. */
- r = zip_read_data_none(a, buff, size, offset);
- break;
- case 8: /* Deflate compression. */
- r = zip_read_data_deflate(a, buff, size, offset);
- break;
- default: /* Unsupported compression. */
- *buff = NULL;
- *size = 0;
- *offset = 0;
- /* Return a warning. */
- archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
- "Unsupported ZIP compression method (%s)",
- zip->compression_name);
- if (zip->flags & ZIP_LENGTH_AT_END) {
- /*
- * ZIP_LENGTH_AT_END requires us to
- * decompress the entry in order to
- * skip it, but we don't know this
- * compression method, so we give up.
- */
- r = ARCHIVE_FATAL;
- } else {
- /* We can't decompress this entry, but we will
- * be able to skip() it and try the next entry. */
- r = ARCHIVE_WARN;
- }
- break;
- }
- if (r != ARCHIVE_OK)
- return (r);
- /* Update checksum */
- if (*size)
- zip->entry_crc32 = crc32(zip->entry_crc32, *buff, *size);
- /* If we hit the end, swallow any end-of-data marker. */
- if (zip->end_of_entry) {
- if (zip->flags & ZIP_LENGTH_AT_END) {
- const char *p;
-
- if ((p = __archive_read_ahead(a, 16, NULL)) == NULL) {
- archive_set_error(&a->archive,
- ARCHIVE_ERRNO_FILE_FORMAT,
- "Truncated ZIP end-of-file record");
- return (ARCHIVE_FATAL);
- }
- zip->crc32 = archive_le32dec(p + 4);
- zip->compressed_size = archive_le32dec(p + 8);
- zip->uncompressed_size = archive_le32dec(p + 12);
- __archive_read_consume(a, 16);
- }
- /* Check file size, CRC against these values. */
- if (zip->compressed_size != zip->entry_compressed_bytes_read) {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "ZIP compressed data is wrong size");
- return (ARCHIVE_WARN);
- }
- /* Size field only stores the lower 32 bits of the actual size. */
- if ((zip->uncompressed_size & UINT32_MAX)
- != (zip->entry_uncompressed_bytes_read & UINT32_MAX)) {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "ZIP uncompressed data is wrong size");
- return (ARCHIVE_WARN);
- }
- /* Check computed CRC against header */
- if (zip->crc32 != zip->entry_crc32) {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "ZIP bad CRC: 0x%lx should be 0x%lx",
- zip->entry_crc32, zip->crc32);
- return (ARCHIVE_WARN);
- }
- }
-
- /* Return EOF immediately if this is a non-regular file. */
- if (AE_IFREG != (zip->mode & AE_IFMT))
- return (ARCHIVE_EOF);
- return (ARCHIVE_OK);
-}
-
-/*
- * Read "uncompressed" data. According to the current specification,
- * if ZIP_LENGTH_AT_END is specified, then the size fields in the
- * initial file header are supposed to be set to zero. This would, of
- * course, make it impossible for us to read the archive, since we
- * couldn't determine the end of the file data. Info-ZIP seems to
- * include the real size fields both before and after the data in this
- * case (the CRC only appears afterwards), so this works as you would
- * expect.
- *
- * Returns ARCHIVE_OK if successful, ARCHIVE_FATAL otherwise, sets
- * zip->end_of_entry if it consumes all of the data.
- */
-static int
-zip_read_data_none(struct archive_read *a, const void **buff,
- size_t *size, off_t *offset)
-{
- struct zip *zip;
- ssize_t bytes_avail;
-
- zip = (struct zip *)(a->format->data);
-
- if (zip->entry_bytes_remaining == 0) {
- *buff = NULL;
- *size = 0;
- *offset = zip->entry_offset;
- zip->end_of_entry = 1;
- return (ARCHIVE_OK);
- }
- /*
- * Note: '1' here is a performance optimization.
- * Recall that the decompression layer returns a count of
- * available bytes; asking for more than that forces the
- * decompressor to combine reads by copying data.
- */
- *buff = __archive_read_ahead(a, 1, &bytes_avail);
- if (bytes_avail <= 0) {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
- "Truncated ZIP file data");
- return (ARCHIVE_FATAL);
- }
- if (bytes_avail > zip->entry_bytes_remaining)
- bytes_avail = zip->entry_bytes_remaining;
- __archive_read_consume(a, bytes_avail);
- *size = bytes_avail;
- *offset = zip->entry_offset;
- zip->entry_offset += *size;
- zip->entry_bytes_remaining -= *size;
- zip->entry_uncompressed_bytes_read += *size;
- zip->entry_compressed_bytes_read += *size;
- return (ARCHIVE_OK);
-}
-
-#ifdef HAVE_ZLIB_H
-static int
-zip_read_data_deflate(struct archive_read *a, const void **buff,
- size_t *size, off_t *offset)
-{
- struct zip *zip;
- ssize_t bytes_avail;
- const void *compressed_buff;
- int r;
-
- zip = (struct zip *)(a->format->data);
-
- /* If the buffer hasn't been allocated, allocate it now. */
- if (zip->uncompressed_buffer == NULL) {
- zip->uncompressed_buffer_size = 32 * 1024;
- zip->uncompressed_buffer
- = (unsigned char *)malloc(zip->uncompressed_buffer_size);
- if (zip->uncompressed_buffer == NULL) {
- archive_set_error(&a->archive, ENOMEM,
- "No memory for ZIP decompression");
- return (ARCHIVE_FATAL);
- }
- }
-
- /* If we haven't yet read any data, initialize the decompressor. */
- if (!zip->decompress_init) {
- if (zip->stream_valid)
- r = inflateReset(&zip->stream);
- else
- r = inflateInit2(&zip->stream,
- -15 /* Don't check for zlib header */);
- if (r != Z_OK) {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "Can't initialize ZIP decompression.");
- return (ARCHIVE_FATAL);
- }
- /* Stream structure has been set up. */
- zip->stream_valid = 1;
- /* We've initialized decompression for this stream. */
- zip->decompress_init = 1;
- }
-
- /*
- * Note: '1' here is a performance optimization.
- * Recall that the decompression layer returns a count of
- * available bytes; asking for more than that forces the
- * decompressor to combine reads by copying data.
- */
- compressed_buff = __archive_read_ahead(a, 1, &bytes_avail);
- if (bytes_avail <= 0) {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
- "Truncated ZIP file body");
- return (ARCHIVE_FATAL);
- }
-
- /*
- * A bug in zlib.h: stream.next_in should be marked 'const'
- * but isn't (the library never alters data through the
- * next_in pointer, only reads it). The result: this ugly
- * cast to remove 'const'.
- */
- zip->stream.next_in = (Bytef *)(uintptr_t)(const void *)compressed_buff;
- zip->stream.avail_in = bytes_avail;
- zip->stream.total_in = 0;
- zip->stream.next_out = zip->uncompressed_buffer;
- zip->stream.avail_out = zip->uncompressed_buffer_size;
- zip->stream.total_out = 0;
-
- r = inflate(&zip->stream, 0);
- switch (r) {
- case Z_OK:
- break;
- case Z_STREAM_END:
- zip->end_of_entry = 1;
- break;
- case Z_MEM_ERROR:
- archive_set_error(&a->archive, ENOMEM,
- "Out of memory for ZIP decompression");
- return (ARCHIVE_FATAL);
- default:
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "ZIP decompression failed (%d)", r);
- return (ARCHIVE_FATAL);
- }
-
- /* Consume as much as the compressor actually used. */
- bytes_avail = zip->stream.total_in;
- __archive_read_consume(a, bytes_avail);
- zip->entry_bytes_remaining -= bytes_avail;
- zip->entry_compressed_bytes_read += bytes_avail;
-
- *offset = zip->entry_offset;
- *size = zip->stream.total_out;
- zip->entry_uncompressed_bytes_read += *size;
- *buff = zip->uncompressed_buffer;
- zip->entry_offset += *size;
- return (ARCHIVE_OK);
-}
-#else
-static int
-zip_read_data_deflate(struct archive_read *a, const void **buff,
- size_t *size, off_t *offset)
-{
- *buff = NULL;
- *size = 0;
- *offset = 0;
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "libarchive compiled without deflate support (no libz)");
- return (ARCHIVE_FATAL);
-}
-#endif
-
-static int
-archive_read_format_zip_read_data_skip(struct archive_read *a)
-{
- struct zip *zip;
- const void *buff = NULL;
- off_t bytes_skipped;
-
- zip = (struct zip *)(a->format->data);
-
- /* If we've already read to end of data, we're done. */
- if (zip->end_of_entry)
- return (ARCHIVE_OK);
-
- /*
- * If the length is at the end, we have no choice but
- * to decompress all the data to find the end marker.
- */
- if (zip->flags & ZIP_LENGTH_AT_END) {
- size_t size;
- off_t offset;
- int r;
- do {
- r = archive_read_format_zip_read_data(a, &buff,
- &size, &offset);
- } while (r == ARCHIVE_OK);
- return (r);
- }
-
- /*
- * If the length is at the beginning, we can skip the
- * compressed data much more quickly.
- */
- bytes_skipped = __archive_read_skip(a, zip->entry_bytes_remaining);
- if (bytes_skipped < 0)
- return (ARCHIVE_FATAL);
-
- /* This entry is finished and done. */
- zip->end_of_entry = 1;
- return (ARCHIVE_OK);
-}
-
-static int
-archive_read_format_zip_cleanup(struct archive_read *a)
-{
- struct zip *zip;
-
- zip = (struct zip *)(a->format->data);
-#ifdef HAVE_ZLIB_H
- if (zip->stream_valid)
- inflateEnd(&zip->stream);
-#endif
- free(zip->uncompressed_buffer);
- archive_string_free(&(zip->pathname));
- archive_string_free(&(zip->extra));
- free(zip);
- (a->format->data) = NULL;
- return (ARCHIVE_OK);
-}
-
-/*
- * The extra data is stored as a list of
- * id1+size1+data1 + id2+size2+data2 ...
- * triplets. id and size are 2 bytes each.
- */
-static void
-process_extra(const void* extra, struct zip* zip)
-{
- int offset = 0;
- const char *p = (const char *)extra;
- while (offset < zip->extra_length - 4)
- {
- unsigned short headerid = archive_le16dec(p + offset);
- unsigned short datasize = archive_le16dec(p + offset + 2);
- offset += 4;
- if (offset + datasize > zip->extra_length)
- break;
-#ifdef DEBUG
- fprintf(stderr, "Header id 0x%04x, length %d\n",
- headerid, datasize);
-#endif
- switch (headerid) {
- case 0x0001:
- /* Zip64 extended information extra field. */
- if (datasize >= 8)
- zip->uncompressed_size = archive_le64dec(p + offset);
- if (datasize >= 16)
- zip->compressed_size = archive_le64dec(p + offset + 8);
- break;
- case 0x5455:
- {
- /* Extended time field "UT". */
- int flags = p[offset];
- offset++;
- datasize--;
- /* Flag bits indicate which dates are present. */
- if (flags & 0x01)
- {
-#ifdef DEBUG
- fprintf(stderr, "mtime: %lld -> %d\n",
- (long long)zip->mtime,
- archive_le32dec(p + offset));
-#endif
- if (datasize < 4)
- break;
- zip->mtime = archive_le32dec(p + offset);
- offset += 4;
- datasize -= 4;
- }
- if (flags & 0x02)
- {
- if (datasize < 4)
- break;
- zip->atime = archive_le32dec(p + offset);
- offset += 4;
- datasize -= 4;
- }
- if (flags & 0x04)
- {
- if (datasize < 4)
- break;
- zip->ctime = archive_le32dec(p + offset);
- offset += 4;
- datasize -= 4;
- }
- break;
- }
- case 0x7855:
- /* Info-ZIP Unix Extra Field (type 2) "Ux". */
-#ifdef DEBUG
- fprintf(stderr, "uid %d gid %d\n",
- archive_le16dec(p + offset),
- archive_le16dec(p + offset + 2));
-#endif
- if (datasize >= 2)
- zip->uid = archive_le16dec(p + offset);
- if (datasize >= 4)
- zip->gid = archive_le16dec(p + offset + 2);
- break;
- case 0x7875:
- /* Info-Zip Unix Extra Field (type 3) "ux". */
- break;
- default:
- break;
- }
- offset += datasize;
- }
-#ifdef DEBUG
- if (offset != zip->extra_length)
- {
- fprintf(stderr,
- "Extra data field contents do not match reported size!");
- }
-#endif
-}
diff --git a/lib/libarchive/archive_string.c b/lib/libarchive/archive_string.c
deleted file mode 100644
index d68ad58..0000000
--- a/lib/libarchive/archive_string.c
+++ /dev/null
@@ -1,453 +0,0 @@
-/*-
- * Copyright (c) 2003-2007 Tim Kientzle
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "archive_platform.h"
-__FBSDID("$FreeBSD$");
-
-/*
- * Basic resizable string support, to simplify manipulating arbitrary-sized
- * strings while minimizing heap activity.
- */
-
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-#ifdef HAVE_WCHAR_H
-#include <wchar.h>
-#endif
-#if defined(_WIN32) && !defined(__CYGWIN__)
-#include <windows.h>
-#endif
-
-#include "archive_private.h"
-#include "archive_string.h"
-
-struct archive_string *
-__archive_string_append(struct archive_string *as, const char *p, size_t s)
-{
- if (__archive_string_ensure(as, as->length + s + 1) == NULL)
- __archive_errx(1, "Out of memory");
- memcpy(as->s + as->length, p, s);
- as->s[as->length + s] = 0;
- as->length += s;
- return (as);
-}
-
-void
-__archive_string_copy(struct archive_string *dest, struct archive_string *src)
-{
- if (src->length == 0)
- dest->length = 0;
- else {
- if (__archive_string_ensure(dest, src->length + 1) == NULL)
- __archive_errx(1, "Out of memory");
- memcpy(dest->s, src->s, src->length);
- dest->length = src->length;
- dest->s[dest->length] = 0;
- }
-}
-
-void
-__archive_string_concat(struct archive_string *dest, struct archive_string *src)
-{
- if (src->length > 0) {
- if (__archive_string_ensure(dest, dest->length + src->length + 1) == NULL)
- __archive_errx(1, "Out of memory");
- memcpy(dest->s + dest->length, src->s, src->length);
- dest->length += src->length;
- dest->s[dest->length] = 0;
- }
-}
-
-void
-__archive_string_free(struct archive_string *as)
-{
- as->length = 0;
- as->buffer_length = 0;
- if (as->s != NULL) {
- free(as->s);
- as->s = NULL;
- }
-}
-
-/* Returns NULL on any allocation failure. */
-struct archive_string *
-__archive_string_ensure(struct archive_string *as, size_t s)
-{
- /* If buffer is already big enough, don't reallocate. */
- if (as->s && (s <= as->buffer_length))
- return (as);
-
- /*
- * Growing the buffer at least exponentially ensures that
- * append operations are always linear in the number of
- * characters appended. Using a smaller growth rate for
- * larger buffers reduces memory waste somewhat at the cost of
- * a larger constant factor.
- */
- if (as->buffer_length < 32)
- /* Start with a minimum 32-character buffer. */
- as->buffer_length = 32;
- else if (as->buffer_length < 8192)
- /* Buffers under 8k are doubled for speed. */
- as->buffer_length += as->buffer_length;
- else {
- /* Buffers 8k and over grow by at least 25% each time. */
- size_t old_length = as->buffer_length;
- as->buffer_length += as->buffer_length / 4;
- /* Be safe: If size wraps, release buffer and return NULL. */
- if (as->buffer_length < old_length) {
- free(as->s);
- as->s = NULL;
- return (NULL);
- }
- }
- /*
- * The computation above is a lower limit to how much we'll
- * grow the buffer. In any case, we have to grow it enough to
- * hold the request.
- */
- if (as->buffer_length < s)
- as->buffer_length = s;
- /* Now we can reallocate the buffer. */
- as->s = (char *)realloc(as->s, as->buffer_length);
- if (as->s == NULL)
- return (NULL);
- return (as);
-}
-
-struct archive_string *
-__archive_strncat(struct archive_string *as, const void *_p, size_t n)
-{
- size_t s;
- const char *p, *pp;
-
- p = (const char *)_p;
-
- /* Like strlen(p), except won't examine positions beyond p[n]. */
- s = 0;
- pp = p;
- while (*pp && s < n) {
- pp++;
- s++;
- }
- return (__archive_string_append(as, p, s));
-}
-
-struct archive_string *
-__archive_strappend_char(struct archive_string *as, char c)
-{
- return (__archive_string_append(as, &c, 1));
-}
-
-/*
- * Translates a wide character string into UTF-8 and appends
- * to the archive_string. Note: returns NULL if conversion fails,
- * but still leaves a best-effort conversion in the argument as.
- */
-struct archive_string *
-__archive_strappend_w_utf8(struct archive_string *as, const wchar_t *w)
-{
- char *p;
- unsigned wc;
- char buff[256];
- struct archive_string *return_val = as;
-
- /*
- * Convert one wide char at a time into 'buff', whenever that
- * fills, append it to the string.
- */
- p = buff;
- while (*w != L'\0') {
- /* Flush the buffer when we have <=16 bytes free. */
- /* (No encoding has a single character >16 bytes.) */
- if ((size_t)(p - buff) >= (size_t)(sizeof(buff) - 16)) {
- *p = '\0';
- archive_strcat(as, buff);
- p = buff;
- }
- wc = *w++;
- /* If this is a surrogate pair, assemble the full code point.*/
- /* Note: wc must not be wchar_t here, because the full code
- * point can be more than 16 bits! */
- if (wc >= 0xD800 && wc <= 0xDBff
- && *w >= 0xDC00 && *w <= 0xDFFF) {
- wc -= 0xD800;
- wc *= 0x400;
- wc += (*w - 0xDC00);
- wc += 0x10000;
- ++w;
- }
- /* Translate code point to UTF8 */
- if (wc <= 0x7f) {
- *p++ = (char)wc;
- } else if (wc <= 0x7ff) {
- *p++ = 0xc0 | ((wc >> 6) & 0x1f);
- *p++ = 0x80 | (wc & 0x3f);
- } else if (wc <= 0xffff) {
- *p++ = 0xe0 | ((wc >> 12) & 0x0f);
- *p++ = 0x80 | ((wc >> 6) & 0x3f);
- *p++ = 0x80 | (wc & 0x3f);
- } else if (wc <= 0x1fffff) {
- *p++ = 0xf0 | ((wc >> 18) & 0x07);
- *p++ = 0x80 | ((wc >> 12) & 0x3f);
- *p++ = 0x80 | ((wc >> 6) & 0x3f);
- *p++ = 0x80 | (wc & 0x3f);
- } else {
- /* Unicode has no codes larger than 0x1fffff. */
- /* TODO: use \uXXXX escape here instead of ? */
- *p++ = '?';
- return_val = NULL;
- }
- }
- *p = '\0';
- archive_strcat(as, buff);
- return (return_val);
-}
-
-static int
-utf8_to_unicode(int *pwc, const char *s, size_t n)
-{
- int ch;
-
- /*
- * Decode 1-4 bytes depending on the value of the first byte.
- */
- ch = (unsigned char)*s;
- if (ch == 0) {
- return (0); /* Standard: return 0 for end-of-string. */
- }
- if ((ch & 0x80) == 0) {
- *pwc = ch & 0x7f;
- return (1);
- }
- if ((ch & 0xe0) == 0xc0) {
- if (n < 2)
- return (-1);
- if ((s[1] & 0xc0) != 0x80) return (-1);
- *pwc = ((ch & 0x1f) << 6) | (s[1] & 0x3f);
- return (2);
- }
- if ((ch & 0xf0) == 0xe0) {
- if (n < 3)
- return (-1);
- if ((s[1] & 0xc0) != 0x80) return (-1);
- if ((s[2] & 0xc0) != 0x80) return (-1);
- *pwc = ((ch & 0x0f) << 12)
- | ((s[1] & 0x3f) << 6)
- | (s[2] & 0x3f);
- return (3);
- }
- if ((ch & 0xf8) == 0xf0) {
- if (n < 4)
- return (-1);
- if ((s[1] & 0xc0) != 0x80) return (-1);
- if ((s[2] & 0xc0) != 0x80) return (-1);
- if ((s[3] & 0xc0) != 0x80) return (-1);
- *pwc = ((ch & 0x07) << 18)
- | ((s[1] & 0x3f) << 12)
- | ((s[2] & 0x3f) << 6)
- | (s[3] & 0x3f);
- return (4);
- }
- /* Invalid first byte. */
- return (-1);
-}
-
-/*
- * Return a wide-character Unicode string by converting this archive_string
- * from UTF-8. We assume that systems with 16-bit wchar_t always use
- * UTF16 and systems with 32-bit wchar_t can accept UCS4.
- */
-wchar_t *
-__archive_string_utf8_w(struct archive_string *as)
-{
- wchar_t *ws, *dest;
- int wc, wc2;/* Must be large enough for a 21-bit Unicode code point. */
- const char *src;
- int n;
-
- ws = (wchar_t *)malloc((as->length + 1) * sizeof(wchar_t));
- if (ws == NULL)
- __archive_errx(1, "Out of memory");
- dest = ws;
- src = as->s;
- while (*src != '\0') {
- n = utf8_to_unicode(&wc, src, 8);
- if (n == 0)
- break;
- if (n < 0) {
- free(ws);
- return (NULL);
- }
- src += n;
- if (wc >= 0xDC00 && wc <= 0xDBFF) {
- /* This is a leading surrogate; some idiot
- * has translated UTF16 to UTF8 without combining
- * surrogates; rebuild the full code point before
- * continuing. */
- n = utf8_to_unicode(&wc2, src, 8);
- if (n < 0) {
- free(ws);
- return (NULL);
- }
- if (n == 0) /* Ignore the leading surrogate */
- break;
- if (wc2 < 0xDC00 || wc2 > 0xDFFF) {
- /* If the second character isn't a
- * trailing surrogate, then someone
- * has really screwed up and this is
- * invalid. */
- free(ws);
- return (NULL);
- } else {
- src += n;
- wc -= 0xD800;
- wc *= 0x400;
- wc += wc2 - 0xDC00;
- wc += 0x10000;
- }
- }
- if ((sizeof(wchar_t) < 4) && (wc > 0xffff)) {
- /* We have a code point that won't fit into a
- * wchar_t; convert it to a surrogate pair. */
- wc -= 0x10000;
- *dest++ = ((wc >> 10) & 0x3ff) + 0xD800;
- *dest++ = (wc & 0x3ff) + 0xDC00;
- } else
- *dest++ = wc;
- }
- *dest = L'\0';
- return (ws);
-}
-
-#if defined(_WIN32) && !defined(__CYGWIN__)
-
-/*
- * Translates a wide character string into current locale character set
- * and appends to the archive_string. Note: returns NULL if conversion
- * fails.
- *
- * Win32 builds use WideCharToMultiByte from the Windows API.
- * (Maybe Cygwin should too? WideCharToMultiByte will know a
- * lot more about local character encodings than the wcrtomb()
- * wrapper is going to know.)
- */
-struct archive_string *
-__archive_strappend_w_mbs(struct archive_string *as, const wchar_t *w)
-{
- char *p;
- int l, wl;
- BOOL useDefaultChar = FALSE;
-
- wl = (int)wcslen(w);
- l = wl * 4 + 4;
- p = malloc(l);
- if (p == NULL)
- __archive_errx(1, "Out of memory");
- /* To check a useDefaultChar is to simulate error handling of
- * the my_wcstombs() which is running on non Windows system with
- * wctomb().
- * And to set NULL for last argument is necessary when a codepage
- * is not CP_ACP(current locale).
- */
- l = WideCharToMultiByte(CP_ACP, 0, w, wl, p, l, NULL, &useDefaultChar);
- if (l == 0) {
- free(p);
- return (NULL);
- }
- __archive_string_append(as, p, l);
- free(p);
- return (as);
-}
-
-#else
-
-/*
- * Translates a wide character string into current locale character set
- * and appends to the archive_string. Note: returns NULL if conversion
- * fails.
- *
- * Non-Windows uses ISO C wcrtomb() or wctomb() to perform the conversion
- * one character at a time. If a non-Windows platform doesn't have
- * either of these, fall back to the built-in UTF8 conversion.
- */
-struct archive_string *
-__archive_strappend_w_mbs(struct archive_string *as, const wchar_t *w)
-{
-#if !defined(HAVE_WCTOMB) && !defined(HAVE_WCRTOMB)
- /* If there's no built-in locale support, fall back to UTF8 always. */
- return __archive_strappend_w_utf8(as, w);
-#else
- /* We cannot use the standard wcstombs() here because it
- * cannot tell us how big the output buffer should be. So
- * I've built a loop around wcrtomb() or wctomb() that
- * converts a character at a time and resizes the string as
- * needed. We prefer wcrtomb() when it's available because
- * it's thread-safe. */
- int n;
- char *p;
- char buff[256];
-#if HAVE_WCRTOMB
- mbstate_t shift_state;
-
- memset(&shift_state, 0, sizeof(shift_state));
-#else
- /* Clear the shift state before starting. */
- wctomb(NULL, L'\0');
-#endif
-
- /*
- * Convert one wide char at a time into 'buff', whenever that
- * fills, append it to the string.
- */
- p = buff;
- while (*w != L'\0') {
- /* Flush the buffer when we have <=16 bytes free. */
- /* (No encoding has a single character >16 bytes.) */
- if ((size_t)(p - buff) >= (size_t)(sizeof(buff) - MB_CUR_MAX)) {
- *p = '\0';
- archive_strcat(as, buff);
- p = buff;
- }
-#if HAVE_WCRTOMB
- n = wcrtomb(p, *w++, &shift_state);
-#else
- n = wctomb(p, *w++);
-#endif
- if (n == -1)
- return (NULL);
- p += n;
- }
- *p = '\0';
- archive_strcat(as, buff);
- return (as);
-#endif
-}
-
-#endif /* _WIN32 && ! __CYGWIN__ */
diff --git a/lib/libarchive/archive_string.h b/lib/libarchive/archive_string.h
deleted file mode 100644
index 68fbf16..0000000
--- a/lib/libarchive/archive_string.h
+++ /dev/null
@@ -1,148 +0,0 @@
-/*-
- * Copyright (c) 2003-2007 Tim Kientzle
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $FreeBSD$
- *
- */
-
-#ifndef __LIBARCHIVE_BUILD
-#error This header is only to be used internally to libarchive.
-#endif
-
-#ifndef ARCHIVE_STRING_H_INCLUDED
-#define ARCHIVE_STRING_H_INCLUDED
-
-#include <stdarg.h>
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h> /* required for wchar_t on some systems */
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-#ifdef HAVE_WCHAR_H
-#include <wchar.h>
-#endif
-
-/*
- * Basic resizable/reusable string support a la Java's "StringBuffer."
- *
- * Unlike sbuf(9), the buffers here are fully reusable and track the
- * length throughout.
- *
- * Note that all visible symbols here begin with "__archive" as they
- * are internal symbols not intended for anyone outside of this library
- * to see or use.
- */
-
-struct archive_string {
- char *s; /* Pointer to the storage */
- size_t length; /* Length of 's' */
- size_t buffer_length; /* Length of malloc-ed storage */
-};
-
-/* Initialize an archive_string object on the stack or elsewhere. */
-#define archive_string_init(a) \
- do { (a)->s = NULL; (a)->length = 0; (a)->buffer_length = 0; } while(0)
-
-/* Append a C char to an archive_string, resizing as necessary. */
-struct archive_string *
-__archive_strappend_char(struct archive_string *, char);
-#define archive_strappend_char __archive_strappend_char
-
-/* Convert a wide-char string to UTF-8 and append the result. */
-struct archive_string *
-__archive_strappend_w_utf8(struct archive_string *, const wchar_t *);
-#define archive_strappend_w_utf8 __archive_strappend_w_utf8
-
-/* Convert a wide-char string to current locale and append the result. */
-/* Returns NULL if conversion fails. */
-struct archive_string *
-__archive_strappend_w_mbs(struct archive_string *, const wchar_t *);
-#define archive_strappend_w_mbs __archive_strappend_w_mbs
-
-/* Basic append operation. */
-struct archive_string *
-__archive_string_append(struct archive_string *as, const char *p, size_t s);
-
-/* Copy one archive_string to another */
-void
-__archive_string_copy(struct archive_string *dest, struct archive_string *src);
-#define archive_string_copy(dest, src) \
- __archive_string_copy(dest, src)
-
-/* Concatenate one archive_string to another */
-void
-__archive_string_concat(struct archive_string *dest, struct archive_string *src);
-#define archive_string_concat(dest, src) \
- __archive_string_concat(dest, src)
-
-/* Ensure that the underlying buffer is at least as large as the request. */
-struct archive_string *
-__archive_string_ensure(struct archive_string *, size_t);
-#define archive_string_ensure __archive_string_ensure
-
-/* Append C string, which may lack trailing \0. */
-/* The source is declared void * here because this gets used with
- * "signed char *", "unsigned char *" and "char *" arguments.
- * Declaring it "char *" as with some of the other functions just
- * leads to a lot of extra casts. */
-struct archive_string *
-__archive_strncat(struct archive_string *, const void *, size_t);
-#define archive_strncat __archive_strncat
-
-/* Append a C string to an archive_string, resizing as necessary. */
-#define archive_strcat(as,p) __archive_string_append((as),(p),strlen(p))
-
-/* Copy a C string to an archive_string, resizing as necessary. */
-#define archive_strcpy(as,p) \
- ((as)->length = 0, __archive_string_append((as), (p), p == NULL ? 0 : strlen(p)))
-
-/* Copy a C string to an archive_string with limit, resizing as necessary. */
-#define archive_strncpy(as,p,l) \
- ((as)->length=0, archive_strncat((as), (p), (l)))
-
-/* Return length of string. */
-#define archive_strlen(a) ((a)->length)
-
-/* Set string length to zero. */
-#define archive_string_empty(a) ((a)->length = 0)
-
-/* Release any allocated storage resources. */
-void __archive_string_free(struct archive_string *);
-#define archive_string_free __archive_string_free
-
-/* Like 'vsprintf', but resizes the underlying string as necessary. */
-void __archive_string_vsprintf(struct archive_string *, const char *,
- va_list);
-#define archive_string_vsprintf __archive_string_vsprintf
-
-void __archive_string_sprintf(struct archive_string *, const char *, ...);
-#define archive_string_sprintf __archive_string_sprintf
-
-/* Allocates a fresh buffer and converts as (assumed to be UTF-8) into it.
- * Returns NULL if conversion failed in any way. */
-wchar_t *__archive_string_utf8_w(struct archive_string *as);
-
-
-#endif
diff --git a/lib/libarchive/archive_util.c b/lib/libarchive/archive_util.c
deleted file mode 100644
index 4c0de02..0000000
--- a/lib/libarchive/archive_util.c
+++ /dev/null
@@ -1,391 +0,0 @@
-/*-
- * Copyright (c) 2009 Michihiro NAKAJIMA
- * Copyright (c) 2003-2007 Tim Kientzle
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "archive_platform.h"
-__FBSDID("$FreeBSD$");
-
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-
-#include "archive.h"
-#include "archive_private.h"
-#include "archive_string.h"
-
-#if ARCHIVE_VERSION_NUMBER < 3000000
-/* These disappear in libarchive 3.0 */
-/* Deprecated. */
-int
-archive_api_feature(void)
-{
- return (ARCHIVE_API_FEATURE);
-}
-
-/* Deprecated. */
-int
-archive_api_version(void)
-{
- return (ARCHIVE_API_VERSION);
-}
-
-/* Deprecated synonym for archive_version_number() */
-int
-archive_version_stamp(void)
-{
- return (archive_version_number());
-}
-
-/* Deprecated synonym for archive_version_string() */
-const char *
-archive_version(void)
-{
- return (archive_version_string());
-}
-#endif
-
-int
-archive_version_number(void)
-{
- return (ARCHIVE_VERSION_NUMBER);
-}
-
-const char *
-archive_version_string(void)
-{
- return (ARCHIVE_VERSION_STRING);
-}
-
-int
-archive_errno(struct archive *a)
-{
- return (a->archive_error_number);
-}
-
-const char *
-archive_error_string(struct archive *a)
-{
-
- if (a->error != NULL && *a->error != '\0')
- return (a->error);
- else
- return ("(Empty error message)");
-}
-
-int
-archive_file_count(struct archive *a)
-{
- return (a->file_count);
-}
-
-int
-archive_format(struct archive *a)
-{
- return (a->archive_format);
-}
-
-const char *
-archive_format_name(struct archive *a)
-{
- return (a->archive_format_name);
-}
-
-
-int
-archive_compression(struct archive *a)
-{
- return (a->compression_code);
-}
-
-const char *
-archive_compression_name(struct archive *a)
-{
- return (a->compression_name);
-}
-
-
-/*
- * Return a count of the number of compressed bytes processed.
- */
-int64_t
-archive_position_compressed(struct archive *a)
-{
- return (a->raw_position);
-}
-
-/*
- * Return a count of the number of uncompressed bytes processed.
- */
-int64_t
-archive_position_uncompressed(struct archive *a)
-{
- return (a->file_position);
-}
-
-void
-archive_clear_error(struct archive *a)
-{
- archive_string_empty(&a->error_string);
- a->error = NULL;
-}
-
-void
-archive_set_error(struct archive *a, int error_number, const char *fmt, ...)
-{
- va_list ap;
-
- a->archive_error_number = error_number;
- if (fmt == NULL) {
- a->error = NULL;
- return;
- }
-
- va_start(ap, fmt);
- archive_string_vsprintf(&(a->error_string), fmt, ap);
- va_end(ap);
- a->error = a->error_string.s;
-}
-
-void
-archive_copy_error(struct archive *dest, struct archive *src)
-{
- dest->archive_error_number = src->archive_error_number;
-
- archive_string_copy(&dest->error_string, &src->error_string);
- dest->error = dest->error_string.s;
-}
-
-void
-__archive_errx(int retvalue, const char *msg)
-{
- static const char *msg1 = "Fatal Internal Error in libarchive: ";
- size_t s;
-
- s = write(2, msg1, strlen(msg1));
- (void)s; /* UNUSED */
- s = write(2, msg, strlen(msg));
- (void)s; /* UNUSED */
- s = write(2, "\n", 1);
- (void)s; /* UNUSED */
- exit(retvalue);
-}
-
-/*
- * Parse option strings
- * Detail of option format.
- * - The option can accept:
- * "opt-name", "!opt-name", "opt-name=value".
- *
- * - The option entries are separated by comma.
- * e.g "compression=9,opt=XXX,opt-b=ZZZ"
- *
- * - The name of option string consist of '-' and alphabet
- * but character '-' cannot be used for the first character.
- * (Regular expression is [a-z][-a-z]+)
- *
- * - For a specfic format/filter, using the format name with ':'.
- * e.g "zip:compression=9"
- * (This "compression=9" option entry is for "zip" format only)
- *
- * If another entries follow it, those are not for
- * the specfic format/filter.
- * e.g handle "zip:compression=9,opt=XXX,opt-b=ZZZ"
- * "zip" format/filter handler will get "compression=9"
- * all format/filter handler will get "opt=XXX"
- * all format/filter handler will get "opt-b=ZZZ"
- *
- * - Whitespace and tab are bypassed.
- *
- */
-int
-__archive_parse_options(const char *p, const char *fn, int keysize, char *key,
- int valsize, char *val)
-{
- const char *p_org;
- int apply;
- int kidx, vidx;
- int negative;
- enum {
- /* Requested for initialization. */
- INIT,
- /* Finding format/filter-name and option-name. */
- F_BOTH,
- /* Finding option-name only.
- * (already detected format/filter-name) */
- F_NAME,
- /* Getting option-value. */
- G_VALUE,
- } state;
-
- p_org = p;
- state = INIT;
- kidx = vidx = negative = 0;
- apply = 1;
- while (*p) {
- switch (state) {
- case INIT:
- kidx = vidx = 0;
- negative = 0;
- apply = 1;
- state = F_BOTH;
- break;
- case F_BOTH:
- case F_NAME:
- if ((*p >= 'a' && *p <= 'z') ||
- (*p >= '0' && *p <= '9') || *p == '-') {
- if (kidx == 0 && !(*p >= 'a' && *p <= 'z'))
- /* Illegal sequence. */
- return (-1);
- if (kidx >= keysize -1)
- /* Too many characters. */
- return (-1);
- key[kidx++] = *p++;
- } else if (*p == '!') {
- if (kidx != 0)
- /* Illegal sequence. */
- return (-1);
- negative = 1;
- ++p;
- } else if (*p == ',') {
- if (kidx == 0)
- /* Illegal sequence. */
- return (-1);
- if (!negative)
- val[vidx++] = '1';
- /* We have got boolean option data. */
- ++p;
- if (apply)
- goto complete;
- else
- /* This option does not apply to the
- * format which the fn variable
- * indicate. */
- state = INIT;
- } else if (*p == ':') {
- /* obuf data is format name */
- if (state == F_NAME)
- /* We already found it. */
- return (-1);
- if (kidx == 0)
- /* Illegal sequence. */
- return (-1);
- if (negative)
- /* We cannot accept "!format-name:". */
- return (-1);
- key[kidx] = '\0';
- if (strcmp(fn, key) != 0)
- /* This option does not apply to the
- * format which the fn variable
- * indicate. */
- apply = 0;
- kidx = 0;
- ++p;
- state = F_NAME;
- } else if (*p == '=') {
- if (kidx == 0)
- /* Illegal sequence. */
- return (-1);
- if (negative)
- /* We cannot accept "!opt-name=value". */
- return (-1);
- ++p;
- state = G_VALUE;
- } else if (*p == ' ') {
- /* Pass the space character */
- ++p;
- } else {
- /* Illegal character. */
- return (-1);
- }
- break;
- case G_VALUE:
- if (*p == ',') {
- if (vidx == 0)
- /* Illegal sequence. */
- return (-1);
- /* We have got option data. */
- ++p;
- if (apply)
- goto complete;
- else
- /* This option does not apply to the
- * format which the fn variable
- * indicate. */
- state = INIT;
- } else if (*p == ' ') {
- /* Pass the space character */
- ++p;
- } else {
- if (vidx >= valsize -1)
- /* Too many characters. */
- return (-1);
- val[vidx++] = *p++;
- }
- break;
- }
- }
-
- switch (state) {
- case F_BOTH:
- case F_NAME:
- if (kidx != 0) {
- if (!negative)
- val[vidx++] = '1';
- /* We have got boolean option. */
- if (apply)
- /* This option apply to the format which the
- * fn variable indicate. */
- goto complete;
- }
- break;
- case G_VALUE:
- if (vidx == 0)
- /* Illegal sequence. */
- return (-1);
- /* We have got option value. */
- if (apply)
- /* This option apply to the format which the fn
- * variable indicate. */
- goto complete;
- break;
- case INIT:/* nothing */
- break;
- }
-
- /* End of Option string. */
- return (0);
-
-complete:
- key[kidx] = '\0';
- val[vidx] = '\0';
- /* Return a size which we've consumed for detecting option */
- return ((int)(p - p_org));
-}
diff --git a/lib/libarchive/archive_write_disk.3 b/lib/libarchive/archive_write_disk.3
deleted file mode 100644
index 61138b8..0000000
--- a/lib/libarchive/archive_write_disk.3
+++ /dev/null
@@ -1,375 +0,0 @@
-.\" Copyright (c) 2003-2007 Tim Kientzle
-.\" 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.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
-.\"
-.\" $FreeBSD$
-.\"
-.Dd August 5, 2008
-.Dt ARCHIVE_WRITE_DISK 3
-.Os
-.Sh NAME
-.Nm archive_write_disk_new ,
-.Nm archive_write_disk_set_options ,
-.Nm archive_write_disk_set_skip_file ,
-.Nm archive_write_disk_set_group_lookup ,
-.Nm archive_write_disk_set_standard_lookup ,
-.Nm archive_write_disk_set_user_lookup ,
-.Nm archive_write_header ,
-.Nm archive_write_data ,
-.Nm archive_write_finish_entry ,
-.Nm archive_write_close ,
-.Nm archive_write_free
-.Nd functions for creating objects on disk
-.Sh SYNOPSIS
-.In archive.h
-.Ft struct archive *
-.Fn archive_write_disk_new "void"
-.Ft int
-.Fn archive_write_disk_set_options "struct archive *" "int flags"
-.Ft int
-.Fn archive_write_disk_set_skip_file "struct archive *" "dev_t" "ino_t"
-.Ft int
-.Fo archive_write_disk_set_group_lookup
-.Fa "struct archive *"
-.Fa "void *"
-.Fa "gid_t (*)(void *, const char *gname, gid_t gid)"
-.Fa "void (*cleanup)(void *)"
-.Fc
-.Ft int
-.Fn archive_write_disk_set_standard_lookup "struct archive *"
-.Ft int
-.Fo archive_write_disk_set_user_lookup
-.Fa "struct archive *"
-.Fa "void *"
-.Fa "uid_t (*)(void *, const char *uname, uid_t uid)"
-.Fa "void (*cleanup)(void *)"
-.Fc
-.Ft int
-.Fn archive_write_header "struct archive *" "struct archive_entry *"
-.Ft ssize_t
-.Fn archive_write_data "struct archive *" "const void *" "size_t"
-.Ft int
-.Fn archive_write_finish_entry "struct archive *"
-.Ft int
-.Fn archive_write_close "struct archive *"
-.Ft int
-.Fn archive_write_free "struct archive *"
-.Sh DESCRIPTION
-These functions provide a complete API for creating objects on
-disk from
-.Tn struct archive_entry
-descriptions.
-They are most naturally used when extracting objects from an archive
-using the
-.Fn archive_read
-interface.
-The general process is to read
-.Tn struct archive_entry
-objects from an archive, then write those objects to a
-.Tn struct archive
-object created using the
-.Fn archive_write_disk
-family functions.
-This interface is deliberately very similar to the
-.Fn archive_write
-interface used to write objects to a streaming archive.
-.Bl -tag -width indent
-.It Fn archive_write_disk_new
-Allocates and initializes a
-.Tn struct archive
-object suitable for writing objects to disk.
-.It Fn archive_write_disk_set_skip_file
-Records the device and inode numbers of a file that should not be
-overwritten.
-This is typically used to ensure that an extraction process does not
-overwrite the archive from which objects are being read.
-This capability is technically unnecessary but can be a significant
-performance optimization in practice.
-.It Fn archive_write_disk_set_options
-The options field consists of a bitwise OR of one or more of the
-following values:
-.Bl -tag -compact -width "indent"
-.It Cm ARCHIVE_EXTRACT_OWNER
-The user and group IDs should be set on the restored file.
-By default, the user and group IDs are not restored.
-.It Cm ARCHIVE_EXTRACT_PERM
-Full permissions (including SGID, SUID, and sticky bits) should
-be restored exactly as specified, without obeying the
-current umask.
-Note that SUID and SGID bits can only be restored if the
-user and group ID of the object on disk are correct.
-If
-.Cm ARCHIVE_EXTRACT_OWNER
-is not specified, then SUID and SGID bits will only be restored
-if the default user and group IDs of newly-created objects on disk
-happen to match those specified in the archive entry.
-By default, only basic permissions are restored, and umask is obeyed.
-.It Cm ARCHIVE_EXTRACT_TIME
-The timestamps (mtime, ctime, and atime) should be restored.
-By default, they are ignored.
-Note that restoring of atime is not currently supported.
-.It Cm ARCHIVE_EXTRACT_NO_OVERWRITE
-Existing files on disk will not be overwritten.
-By default, existing regular files are truncated and overwritten;
-existing directories will have their permissions updated;
-other pre-existing objects are unlinked and recreated from scratch.
-.It Cm ARCHIVE_EXTRACT_UNLINK
-Existing files on disk will be unlinked before any attempt to
-create them.
-In some cases, this can prove to be a significant performance improvement.
-By default, existing files are truncated and rewritten, but
-the file is not recreated.
-In particular, the default behavior does not break existing hard links.
-.It Cm ARCHIVE_EXTRACT_ACL
-Attempt to restore ACLs.
-By default, extended ACLs are ignored.
-.It Cm ARCHIVE_EXTRACT_FFLAGS
-Attempt to restore extended file flags.
-By default, file flags are ignored.
-.It Cm ARCHIVE_EXTRACT_XATTR
-Attempt to restore POSIX.1e extended attributes.
-By default, they are ignored.
-.It Cm ARCHIVE_EXTRACT_SECURE_SYMLINKS
-Refuse to extract any object whose final location would be altered
-by a symlink on disk.
-This is intended to help guard against a variety of mischief
-caused by archives that (deliberately or otherwise) extract
-files outside of the current directory.
-The default is not to perform this check.
-If
-.Cm ARCHIVE_EXTRACT_UNLINK
-is specified together with this option, the library will
-remove any intermediate symlinks it finds and return an
-error only if such symlink could not be removed.
-.It Cm ARCHIVE_EXTRACT_SECURE_NODOTDOT
-Refuse to extract a path that contains a
-.Pa ..
-element anywhere within it.
-The default is to not refuse such paths.
-Note that paths ending in
-.Pa ..
-always cause an error, regardless of this flag.
-.It Cm ARCHIVE_EXTRACT_SPARSE
-Scan data for blocks of NUL bytes and try to recreate them with holes.
-This results in sparse files, independent of whether the archive format
-supports or uses them.
-.El
-.It Xo
-.Fn archive_write_disk_set_group_lookup ,
-.Fn archive_write_disk_set_user_lookup
-.Xc
-The
-.Tn struct archive_entry
-objects contain both names and ids that can be used to identify users
-and groups.
-These names and ids describe the ownership of the file itself and
-also appear in ACL lists.
-By default, the library uses the ids and ignores the names, but
-this can be overridden by registering user and group lookup functions.
-To register, you must provide a lookup function which
-accepts both a name and id and returns a suitable id.
-You may also provide a
-.Tn void *
-pointer to a private data structure and a cleanup function for
-that data.
-The cleanup function will be invoked when the
-.Tn struct archive
-object is destroyed.
-.It Fn archive_write_disk_set_standard_lookup
-This convenience function installs a standard set of user
-and group lookup functions.
-These functions use
-.Xr getpwnam 3
-and
-.Xr getgrnam 3
-to convert names to ids, defaulting to the ids if the names cannot
-be looked up.
-These functions also implement a simple memory cache to reduce
-the number of calls to
-.Xr getpwnam 3
-and
-.Xr getgrnam 3 .
-.It Fn archive_write_header
-Build and write a header using the data in the provided
-.Tn struct archive_entry
-structure.
-See
-.Xr archive_entry 3
-for information on creating and populating
-.Tn struct archive_entry
-objects.
-.It Fn archive_write_data
-Write data corresponding to the header just written.
-Returns number of bytes written or -1 on error.
-.It Fn archive_write_finish_entry
-Close out the entry just written.
-Ordinarily, clients never need to call this, as it
-is called automatically by
-.Fn archive_write_next_header
-and
-.Fn archive_write_close
-as needed.
-.It Fn archive_write_close
-Set any attributes that could not be set during the initial restore.
-For example, directory timestamps are not restored initially because
-restoring a subsequent file would alter that timestamp.
-Similarly, non-writable directories are initially created with
-write permissions (so that their contents can be restored).
-The
-.Nm
-library maintains a list of all such deferred attributes and
-sets them when this function is invoked.
-.It Fn archive_write_free
-Invokes
-.Fn archive_write_close
-if it was not invoked manually, then releases all resources.
-.El
-More information about the
-.Va struct archive
-object and the overall design of the library can be found in the
-.Xr libarchive 3
-overview.
-Many of these functions are also documented under
-.Xr archive_write 3 .
-.Sh RETURN VALUES
-Most functions return
-.Cm ARCHIVE_OK
-(zero) on success, or one of several non-zero
-error codes for errors.
-Specific error codes include:
-.Cm ARCHIVE_RETRY
-for operations that might succeed if retried,
-.Cm ARCHIVE_WARN
-for unusual conditions that do not prevent further operations, and
-.Cm ARCHIVE_FATAL
-for serious errors that make remaining operations impossible.
-The
-.Fn archive_errno
-and
-.Fn archive_error_string
-functions can be used to retrieve an appropriate error code and a
-textual error message.
-.Pp
-.Fn archive_write_disk_new
-returns a pointer to a newly-allocated
-.Tn struct archive
-object.
-.Pp
-.Fn archive_write_data
-returns a count of the number of bytes actually written.
-On error, -1 is returned and the
-.Fn archive_errno
-and
-.Fn archive_error_string
-functions will return appropriate values.
-.Sh SEE ALSO
-.Xr archive_read 3 ,
-.Xr archive_write 3 ,
-.Xr tar 1 ,
-.Xr libarchive 3
-.Sh HISTORY
-The
-.Nm libarchive
-library first appeared in
-.Fx 5.3 .
-The
-.Nm archive_write_disk
-interface was added to
-.Nm libarchive 2.0
-and first appeared in
-.Fx 6.3 .
-.Sh AUTHORS
-.An -nosplit
-The
-.Nm libarchive
-library was written by
-.An Tim Kientzle Aq kientzle@acm.org .
-.Sh BUGS
-Directories are actually extracted in two distinct phases.
-Directories are created during
-.Fn archive_write_header ,
-but final permissions are not set until
-.Fn archive_write_close .
-This separation is necessary to correctly handle borderline
-cases such as a non-writable directory containing
-files, but can cause unexpected results.
-In particular, directory permissions are not fully
-restored until the archive is closed.
-If you use
-.Xr chdir 2
-to change the current directory between calls to
-.Fn archive_read_extract
-or before calling
-.Fn archive_read_close ,
-you may confuse the permission-setting logic with
-the result that directory permissions are restored
-incorrectly.
-.Pp
-The library attempts to create objects with filenames longer than
-.Cm PATH_MAX
-by creating prefixes of the full path and changing the current directory.
-Currently, this logic is limited in scope; the fixup pass does
-not work correctly for such objects and the symlink security check
-option disables the support for very long pathnames.
-.Pp
-Restoring the path
-.Pa aa/../bb
-does create each intermediate directory.
-In particular, the directory
-.Pa aa
-is created as well as the final object
-.Pa bb .
-In theory, this can be exploited to create an entire directory hierarchy
-with a single request.
-Of course, this does not work if the
-.Cm ARCHIVE_EXTRACT_NODOTDOT
-option is specified.
-.Pp
-Implicit directories are always created obeying the current umask.
-Explicit objects are created obeying the current umask unless
-.Cm ARCHIVE_EXTRACT_PERM
-is specified, in which case they current umask is ignored.
-.Pp
-SGID and SUID bits are restored only if the correct user and
-group could be set.
-If
-.Cm ARCHIVE_EXTRACT_OWNER
-is not specified, then no attempt is made to set the ownership.
-In this case, SGID and SUID bits are restored only if the
-user and group of the final object happen to match those specified
-in the entry.
-.Pp
-The
-.Dq standard
-user-id and group-id lookup functions are not the defaults because
-.Xr getgrnam 3
-and
-.Xr getpwnam 3
-are sometimes too large for particular applications.
-The current design allows the application author to use a more
-compact implementation when appropriate.
-.Pp
-There should be a corresponding
-.Nm archive_read_disk
-interface that walks a directory hierarchy and returns archive
-entry objects.
diff --git a/lib/libarchive/archive_write_disk.c b/lib/libarchive/archive_write_disk.c
deleted file mode 100644
index 8a4fd04..0000000
--- a/lib/libarchive/archive_write_disk.c
+++ /dev/null
@@ -1,2628 +0,0 @@
-/*-
- * Copyright (c) 2003-2007 Tim Kientzle
- * 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
- * in this position and unchanged.
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "archive_platform.h"
-__FBSDID("$FreeBSD$");
-
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_ACL_H
-#include <sys/acl.h>
-#endif
-#ifdef HAVE_SYS_EXTATTR_H
-#include <sys/extattr.h>
-#endif
-#ifdef HAVE_SYS_XATTR_H
-#include <sys/xattr.h>
-#endif
-#ifdef HAVE_ATTR_XATTR_H
-#include <attr/xattr.h>
-#endif
-#ifdef HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_SYS_UTIME_H
-#include <sys/utime.h>
-#endif
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#ifdef HAVE_GRP_H
-#include <grp.h>
-#endif
-#ifdef HAVE_LINUX_FS_H
-#include <linux/fs.h> /* for Linux file flags */
-#endif
-/*
- * Some Linux distributions have both linux/ext2_fs.h and ext2fs/ext2_fs.h.
- * As the include guards don't agree, the order of include is important.
- */
-#ifdef HAVE_LINUX_EXT2_FS_H
-#include <linux/ext2_fs.h> /* for Linux file flags */
-#endif
-#if defined(HAVE_EXT2FS_EXT2_FS_H) && !defined(__CYGWIN__)
-#include <ext2fs/ext2_fs.h> /* Linux file flags, broken on Cygwin */
-#endif
-#ifdef HAVE_LIMITS_H
-#include <limits.h>
-#endif
-#ifdef HAVE_PWD_H
-#include <pwd.h>
-#endif
-#include <stdio.h>
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_UTIME_H
-#include <utime.h>
-#endif
-
-#include "archive.h"
-#include "archive_string.h"
-#include "archive_entry.h"
-#include "archive_private.h"
-
-#ifndef O_BINARY
-#define O_BINARY 0
-#endif
-
-struct fixup_entry {
- struct fixup_entry *next;
- mode_t mode;
- int64_t atime;
- int64_t birthtime;
- int64_t mtime;
- unsigned long atime_nanos;
- unsigned long birthtime_nanos;
- unsigned long mtime_nanos;
- unsigned long fflags_set;
- int fixup; /* bitmask of what needs fixing */
- char *name;
-};
-
-/*
- * We use a bitmask to track which operations remain to be done for
- * this file. In particular, this helps us avoid unnecessary
- * operations when it's possible to take care of one step as a
- * side-effect of another. For example, mkdir() can specify the mode
- * for the newly-created object but symlink() cannot. This means we
- * can skip chmod() if mkdir() succeeded, but we must explicitly
- * chmod() if we're trying to create a directory that already exists
- * (mkdir() failed) or if we're restoring a symlink. Similarly, we
- * need to verify UID/GID before trying to restore SUID/SGID bits;
- * that verification can occur explicitly through a stat() call or
- * implicitly because of a successful chown() call.
- */
-#define TODO_MODE_FORCE 0x40000000
-#define TODO_MODE_BASE 0x20000000
-#define TODO_SUID 0x10000000
-#define TODO_SUID_CHECK 0x08000000
-#define TODO_SGID 0x04000000
-#define TODO_SGID_CHECK 0x02000000
-#define TODO_MODE (TODO_MODE_BASE|TODO_SUID|TODO_SGID)
-#define TODO_TIMES ARCHIVE_EXTRACT_TIME
-#define TODO_OWNER ARCHIVE_EXTRACT_OWNER
-#define TODO_FFLAGS ARCHIVE_EXTRACT_FFLAGS
-#define TODO_ACLS ARCHIVE_EXTRACT_ACL
-#define TODO_XATTR ARCHIVE_EXTRACT_XATTR
-
-struct archive_write_disk {
- struct archive archive;
-
- mode_t user_umask;
- struct fixup_entry *fixup_list;
- struct fixup_entry *current_fixup;
- uid_t user_uid;
- dev_t skip_file_dev;
- ino_t skip_file_ino;
- time_t start_time;
-
- gid_t (*lookup_gid)(void *private, const char *gname, gid_t gid);
- void (*cleanup_gid)(void *private);
- void *lookup_gid_data;
- uid_t (*lookup_uid)(void *private, const char *gname, gid_t gid);
- void (*cleanup_uid)(void *private);
- void *lookup_uid_data;
-
- /*
- * Full path of last file to satisfy symlink checks.
- */
- struct archive_string path_safe;
-
- /*
- * Cached stat data from disk for the current entry.
- * If this is valid, pst points to st. Otherwise,
- * pst is null.
- */
- struct stat st;
- struct stat *pst;
-
- /* Information about the object being restored right now. */
- struct archive_entry *entry; /* Entry being extracted. */
- char *name; /* Name of entry, possibly edited. */
- struct archive_string _name_data; /* backing store for 'name' */
- /* Tasks remaining for this object. */
- int todo;
- /* Tasks deferred until end-of-archive. */
- int deferred;
- /* Options requested by the client. */
- int flags;
- /* Handle for the file we're restoring. */
- int fd;
- /* Current offset for writing data to the file. */
- off_t offset;
- /* Last offset actually written to disk. */
- off_t fd_offset;
- /* Maximum size of file, -1 if unknown. */
- off_t filesize;
- /* Dir we were in before this restore; only for deep paths. */
- int restore_pwd;
- /* Mode we should use for this entry; affected by _PERM and umask. */
- mode_t mode;
- /* UID/GID to use in restoring this entry. */
- uid_t uid;
- gid_t gid;
-};
-
-/*
- * Default mode for dirs created automatically (will be modified by umask).
- * Note that POSIX specifies 0777 for implicity-created dirs, "modified
- * by the process' file creation mask."
- */
-#define DEFAULT_DIR_MODE 0777
-/*
- * Dir modes are restored in two steps: During the extraction, the permissions
- * in the archive are modified to match the following limits. During
- * the post-extract fixup pass, the permissions from the archive are
- * applied.
- */
-#define MINIMUM_DIR_MODE 0700
-#define MAXIMUM_DIR_MODE 0775
-
-static int check_symlinks(struct archive_write_disk *);
-static int create_filesystem_object(struct archive_write_disk *);
-static struct fixup_entry *current_fixup(struct archive_write_disk *, const char *pathname);
-#ifdef HAVE_FCHDIR
-static void edit_deep_directories(struct archive_write_disk *ad);
-#endif
-static int cleanup_pathname(struct archive_write_disk *);
-static int create_dir(struct archive_write_disk *, char *);
-static int create_parent_dir(struct archive_write_disk *, char *);
-static int older(struct stat *, struct archive_entry *);
-static int restore_entry(struct archive_write_disk *);
-#ifdef HAVE_POSIX_ACL
-static int set_acl(struct archive_write_disk *, int fd, struct archive_entry *,
- acl_type_t, int archive_entry_acl_type, const char *tn);
-#endif
-static int set_acls(struct archive_write_disk *);
-static int set_xattrs(struct archive_write_disk *);
-static int set_fflags(struct archive_write_disk *);
-static int set_fflags_platform(struct archive_write_disk *, int fd,
- const char *name, mode_t mode,
- unsigned long fflags_set, unsigned long fflags_clear);
-static int set_ownership(struct archive_write_disk *);
-static int set_mode(struct archive_write_disk *, int mode);
-static int set_time(int, int, const char *, time_t, long, time_t, long);
-static int set_times(struct archive_write_disk *);
-static struct fixup_entry *sort_dir_list(struct fixup_entry *p);
-static gid_t trivial_lookup_gid(void *, const char *, gid_t);
-static uid_t trivial_lookup_uid(void *, const char *, uid_t);
-static ssize_t write_data_block(struct archive_write_disk *,
- const char *, size_t);
-
-static struct archive_vtable *archive_write_disk_vtable(void);
-
-static int _archive_write_close(struct archive *);
-static int _archive_write_free(struct archive *);
-static int _archive_write_header(struct archive *, struct archive_entry *);
-static int _archive_write_finish_entry(struct archive *);
-static ssize_t _archive_write_data(struct archive *, const void *, size_t);
-static ssize_t _archive_write_data_block(struct archive *, const void *, size_t, off_t);
-
-static int
-_archive_write_disk_lazy_stat(struct archive_write_disk *a)
-{
- if (a->pst != NULL) {
- /* Already have stat() data available. */
- return (ARCHIVE_OK);
- }
-#ifdef HAVE_FSTAT
- if (a->fd >= 0 && fstat(a->fd, &a->st) == 0) {
- a->pst = &a->st;
- return (ARCHIVE_OK);
- }
-#endif
- /*
- * XXX At this point, symlinks should not be hit, otherwise
- * XXX a race occured. Do we want to check explicitly for that?
- */
- if (lstat(a->name, &a->st) == 0) {
- a->pst = &a->st;
- return (ARCHIVE_OK);
- }
- archive_set_error(&a->archive, errno, "Couldn't stat file");
- return (ARCHIVE_WARN);
-}
-
-static struct archive_vtable *
-archive_write_disk_vtable(void)
-{
- static struct archive_vtable av;
- static int inited = 0;
-
- if (!inited) {
- av.archive_close = _archive_write_close;
- av.archive_free = _archive_write_free;
- av.archive_write_header = _archive_write_header;
- av.archive_write_finish_entry = _archive_write_finish_entry;
- av.archive_write_data = _archive_write_data;
- av.archive_write_data_block = _archive_write_data_block;
- }
- return (&av);
-}
-
-
-int
-archive_write_disk_set_options(struct archive *_a, int flags)
-{
- struct archive_write_disk *a = (struct archive_write_disk *)_a;
-
- a->flags = flags;
- return (ARCHIVE_OK);
-}
-
-
-/*
- * Extract this entry to disk.
- *
- * TODO: Validate hardlinks. According to the standards, we're
- * supposed to check each extracted hardlink and squawk if it refers
- * to a file that we didn't restore. I'm not entirely convinced this
- * is a good idea, but more importantly: Is there any way to validate
- * hardlinks without keeping a complete list of filenames from the
- * entire archive?? Ugh.
- *
- */
-static int
-_archive_write_header(struct archive *_a, struct archive_entry *entry)
-{
- struct archive_write_disk *a = (struct archive_write_disk *)_a;
- struct fixup_entry *fe;
- int ret, r;
-
- __archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC,
- ARCHIVE_STATE_HEADER | ARCHIVE_STATE_DATA,
- "archive_write_disk_header");
- archive_clear_error(&a->archive);
- if (a->archive.state & ARCHIVE_STATE_DATA) {
- r = _archive_write_finish_entry(&a->archive);
- if (r == ARCHIVE_FATAL)
- return (r);
- }
-
- /* Set up for this particular entry. */
- a->pst = NULL;
- a->current_fixup = NULL;
- a->deferred = 0;
- if (a->entry) {
- archive_entry_free(a->entry);
- a->entry = NULL;
- }
- a->entry = archive_entry_clone(entry);
- a->fd = -1;
- a->fd_offset = 0;
- a->offset = 0;
- a->uid = a->user_uid;
- a->mode = archive_entry_mode(a->entry);
- if (archive_entry_size_is_set(a->entry))
- a->filesize = archive_entry_size(a->entry);
- else
- a->filesize = -1;
- archive_strcpy(&(a->_name_data), archive_entry_pathname(a->entry));
- a->name = a->_name_data.s;
- archive_clear_error(&a->archive);
-
- /*
- * Clean up the requested path. This is necessary for correct
- * dir restores; the dir restore logic otherwise gets messed
- * up by nonsense like "dir/.".
- */
- ret = cleanup_pathname(a);
- if (ret != ARCHIVE_OK)
- return (ret);
-
- /*
- * Set the umask to zero so we get predictable mode settings.
- * This gets done on every call to _write_header in case the
- * user edits their umask during the extraction for some
- * reason. This will be reset before we return. Note that we
- * don't need to do this in _finish_entry, as the chmod(), etc,
- * system calls don't obey umask.
- */
- a->user_umask = umask(0);
- /* From here on, early exit requires "goto done" to clean up. */
-
- /* Figure out what we need to do for this entry. */
- a->todo = TODO_MODE_BASE;
- if (a->flags & ARCHIVE_EXTRACT_PERM) {
- a->todo |= TODO_MODE_FORCE; /* Be pushy about permissions. */
- /*
- * SGID requires an extra "check" step because we
- * cannot easily predict the GID that the system will
- * assign. (Different systems assign GIDs to files
- * based on a variety of criteria, including process
- * credentials and the gid of the enclosing
- * directory.) We can only restore the SGID bit if
- * the file has the right GID, and we only know the
- * GID if we either set it (see set_ownership) or if
- * we've actually called stat() on the file after it
- * was restored. Since there are several places at
- * which we might verify the GID, we need a TODO bit
- * to keep track.
- */
- if (a->mode & S_ISGID)
- a->todo |= TODO_SGID | TODO_SGID_CHECK;
- /*
- * Verifying the SUID is simpler, but can still be
- * done in multiple ways, hence the separate "check" bit.
- */
- if (a->mode & S_ISUID)
- a->todo |= TODO_SUID | TODO_SUID_CHECK;
- } else {
- /*
- * User didn't request full permissions, so don't
- * restore SUID, SGID bits and obey umask.
- */
- a->mode &= ~S_ISUID;
- a->mode &= ~S_ISGID;
- a->mode &= ~S_ISVTX;
- a->mode &= ~a->user_umask;
- }
-#if !defined(_WIN32) || defined(__CYGWIN__)
- if (a->flags & ARCHIVE_EXTRACT_OWNER)
- a->todo |= TODO_OWNER;
-#endif
- if (a->flags & ARCHIVE_EXTRACT_TIME)
- a->todo |= TODO_TIMES;
- if (a->flags & ARCHIVE_EXTRACT_ACL)
- a->todo |= TODO_ACLS;
- if (a->flags & ARCHIVE_EXTRACT_XATTR)
- a->todo |= TODO_XATTR;
- if (a->flags & ARCHIVE_EXTRACT_FFLAGS)
- a->todo |= TODO_FFLAGS;
- if (a->flags & ARCHIVE_EXTRACT_SECURE_SYMLINKS) {
- ret = check_symlinks(a);
- if (ret != ARCHIVE_OK)
- goto done;
- }
-#ifdef HAVE_FCHDIR
- /* If path exceeds PATH_MAX, shorten the path. */
- edit_deep_directories(a);
-#endif
-
- ret = restore_entry(a);
-
- /*
- * TODO: There are rumours that some extended attributes must
- * be restored before file data is written. If this is true,
- * then we either need to write all extended attributes both
- * before and after restoring the data, or find some rule for
- * determining which must go first and which last. Due to the
- * many ways people are using xattrs, this may prove to be an
- * intractable problem.
- */
-
-#ifdef HAVE_FCHDIR
- /* If we changed directory above, restore it here. */
- if (a->restore_pwd >= 0) {
- r = fchdir(a->restore_pwd);
- if (r != 0) {
- archive_set_error(&a->archive, errno, "chdir() failure");
- ret = ARCHIVE_FATAL;
- }
- close(a->restore_pwd);
- a->restore_pwd = -1;
- }
-#endif
-
- /*
- * Fixup uses the unedited pathname from archive_entry_pathname(),
- * because it is relative to the base dir and the edited path
- * might be relative to some intermediate dir as a result of the
- * deep restore logic.
- */
- if (a->deferred & TODO_MODE) {
- fe = current_fixup(a, archive_entry_pathname(entry));
- fe->fixup |= TODO_MODE_BASE;
- fe->mode = a->mode;
- }
-
- if ((a->deferred & TODO_TIMES)
- && (archive_entry_mtime_is_set(entry)
- || archive_entry_atime_is_set(entry))) {
- fe = current_fixup(a, archive_entry_pathname(entry));
- fe->fixup |= TODO_TIMES;
- if (archive_entry_atime_is_set(entry)) {
- fe->atime = archive_entry_atime(entry);
- fe->atime_nanos = archive_entry_atime_nsec(entry);
- } else {
- /* If atime is unset, use start time. */
- fe->atime = a->start_time;
- fe->atime_nanos = 0;
- }
- if (archive_entry_mtime_is_set(entry)) {
- fe->mtime = archive_entry_mtime(entry);
- fe->mtime_nanos = archive_entry_mtime_nsec(entry);
- } else {
- /* If mtime is unset, use start time. */
- fe->mtime = a->start_time;
- fe->mtime_nanos = 0;
- }
- if (archive_entry_birthtime_is_set(entry)) {
- fe->birthtime = archive_entry_birthtime(entry);
- fe->birthtime_nanos = archive_entry_birthtime_nsec(entry);
- } else {
- /* If birthtime is unset, use mtime. */
- fe->birthtime = fe->mtime;
- fe->birthtime_nanos = fe->mtime_nanos;
- }
- }
-
- if (a->deferred & TODO_FFLAGS) {
- fe = current_fixup(a, archive_entry_pathname(entry));
- fe->fixup |= TODO_FFLAGS;
- /* TODO: Complete this.. defer fflags from below. */
- }
-
- /* We've created the object and are ready to pour data into it. */
- if (ret >= ARCHIVE_WARN)
- a->archive.state = ARCHIVE_STATE_DATA;
- /*
- * If it's not open, tell our client not to try writing.
- * In particular, dirs, links, etc, don't get written to.
- */
- if (a->fd < 0) {
- archive_entry_set_size(entry, 0);
- a->filesize = 0;
- }
-done:
- /* Restore the user's umask before returning. */
- umask(a->user_umask);
-
- return (ret);
-}
-
-int
-archive_write_disk_set_skip_file(struct archive *_a, dev_t d, ino_t i)
-{
- struct archive_write_disk *a = (struct archive_write_disk *)_a;
- __archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC,
- ARCHIVE_STATE_ANY, "archive_write_disk_set_skip_file");
- a->skip_file_dev = d;
- a->skip_file_ino = i;
- return (ARCHIVE_OK);
-}
-
-static ssize_t
-write_data_block(struct archive_write_disk *a, const char *buff, size_t size)
-{
- uint64_t start_size = size;
- ssize_t bytes_written = 0;
- ssize_t block_size = 0, bytes_to_write;
-
- if (size == 0)
- return (ARCHIVE_OK);
-
- if (a->filesize == 0 || a->fd < 0) {
- archive_set_error(&a->archive, 0,
- "Attempt to write to an empty file");
- return (ARCHIVE_WARN);
- }
-
- if (a->flags & ARCHIVE_EXTRACT_SPARSE) {
-#if HAVE_STRUCT_STAT_ST_BLKSIZE
- int r;
- if ((r = _archive_write_disk_lazy_stat(a)) != ARCHIVE_OK)
- return (r);
- block_size = a->pst->st_blksize;
-#else
- /* XXX TODO XXX Is there a more appropriate choice here ? */
- /* This needn't match the filesystem allocation size. */
- block_size = 16*1024;
-#endif
- }
-
- /* If this write would run beyond the file size, truncate it. */
- if (a->filesize >= 0 && (off_t)(a->offset + size) > a->filesize)
- start_size = size = (size_t)(a->filesize - a->offset);
-
- /* Write the data. */
- while (size > 0) {
- if (block_size == 0) {
- bytes_to_write = size;
- } else {
- /* We're sparsifying the file. */
- const char *p, *end;
- off_t block_end;
-
- /* Skip leading zero bytes. */
- for (p = buff, end = buff + size; p < end; ++p) {
- if (*p != '\0')
- break;
- }
- a->offset += p - buff;
- size -= p - buff;
- buff = p;
- if (size == 0)
- break;
-
- /* Calculate next block boundary after offset. */
- block_end
- = (a->offset / block_size + 1) * block_size;
-
- /* If the adjusted write would cross block boundary,
- * truncate it to the block boundary. */
- bytes_to_write = size;
- if (a->offset + bytes_to_write > block_end)
- bytes_to_write = block_end - a->offset;
- }
- /* Seek if necessary to the specified offset. */
- if (a->offset != a->fd_offset) {
- if (lseek(a->fd, a->offset, SEEK_SET) < 0) {
- archive_set_error(&a->archive, errno,
- "Seek failed");
- return (ARCHIVE_FATAL);
- }
- a->fd_offset = a->offset;
- a->archive.file_position = a->offset;
- a->archive.raw_position = a->offset;
- }
- bytes_written = write(a->fd, buff, bytes_to_write);
- if (bytes_written < 0) {
- archive_set_error(&a->archive, errno, "Write failed");
- return (ARCHIVE_WARN);
- }
- buff += bytes_written;
- size -= bytes_written;
- a->offset += bytes_written;
- a->archive.file_position += bytes_written;
- a->archive.raw_position += bytes_written;
- a->fd_offset = a->offset;
- }
- return (start_size - size);
-}
-
-static ssize_t
-_archive_write_data_block(struct archive *_a,
- const void *buff, size_t size, off_t offset)
-{
- struct archive_write_disk *a = (struct archive_write_disk *)_a;
- ssize_t r;
-
- __archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC,
- ARCHIVE_STATE_DATA, "archive_write_disk_block");
-
- a->offset = offset;
- r = write_data_block(a, buff, size);
- if (r < ARCHIVE_OK)
- return (r);
- if ((size_t)r < size) {
- archive_set_error(&a->archive, 0,
- "Write request too large");
- return (ARCHIVE_WARN);
- }
- return (ARCHIVE_OK);
-}
-
-static ssize_t
-_archive_write_data(struct archive *_a, const void *buff, size_t size)
-{
- struct archive_write_disk *a = (struct archive_write_disk *)_a;
-
- __archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC,
- ARCHIVE_STATE_DATA, "archive_write_data");
-
- return (write_data_block(a, buff, size));
-}
-
-static int
-_archive_write_finish_entry(struct archive *_a)
-{
- struct archive_write_disk *a = (struct archive_write_disk *)_a;
- int ret = ARCHIVE_OK;
-
- __archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC,
- ARCHIVE_STATE_HEADER | ARCHIVE_STATE_DATA,
- "archive_write_finish_entry");
- if (a->archive.state & ARCHIVE_STATE_HEADER)
- return (ARCHIVE_OK);
- archive_clear_error(&a->archive);
-
- /* Pad or truncate file to the right size. */
- if (a->fd < 0) {
- /* There's no file. */
- } else if (a->filesize < 0) {
- /* File size is unknown, so we can't set the size. */
- } else if (a->fd_offset == a->filesize) {
- /* Last write ended at exactly the filesize; we're done. */
- /* Hopefully, this is the common case. */
- } else {
-#if HAVE_FTRUNCATE
- if (ftruncate(a->fd, a->filesize) == -1 &&
- a->filesize == 0) {
- archive_set_error(&a->archive, errno,
- "File size could not be restored");
- return (ARCHIVE_FAILED);
- }
-#endif
- /*
- * Not all platforms implement the XSI option to
- * extend files via ftruncate. Stat() the file again
- * to see what happened.
- */
- a->pst = NULL;
- if ((ret = _archive_write_disk_lazy_stat(a)) != ARCHIVE_OK)
- return (ret);
- /* We can use lseek()/write() to extend the file if
- * ftruncate didn't work or isn't available. */
- if (a->st.st_size < a->filesize) {
- const char nul = '\0';
- if (lseek(a->fd, a->filesize - 1, SEEK_SET) < 0) {
- archive_set_error(&a->archive, errno,
- "Seek failed");
- return (ARCHIVE_FATAL);
- }
- if (write(a->fd, &nul, 1) < 0) {
- archive_set_error(&a->archive, errno,
- "Write to restore size failed");
- return (ARCHIVE_FATAL);
- }
- a->pst = NULL;
- }
- }
-
- /* Restore metadata. */
-
- /*
- * Look up the "real" UID only if we're going to need it.
- * TODO: the TODO_SGID condition can be dropped here, can't it?
- */
- if (a->todo & (TODO_OWNER | TODO_SUID | TODO_SGID)) {
- a->uid = a->lookup_uid(a->lookup_uid_data,
- archive_entry_uname(a->entry),
- archive_entry_uid(a->entry));
- }
- /* Look up the "real" GID only if we're going to need it. */
- /* TODO: the TODO_SUID condition can be dropped here, can't it? */
- if (a->todo & (TODO_OWNER | TODO_SGID | TODO_SUID)) {
- a->gid = a->lookup_gid(a->lookup_gid_data,
- archive_entry_gname(a->entry),
- archive_entry_gid(a->entry));
- }
- /*
- * If restoring ownership, do it before trying to restore suid/sgid
- * bits. If we set the owner, we know what it is and can skip
- * a stat() call to examine the ownership of the file on disk.
- */
- if (a->todo & TODO_OWNER)
- ret = set_ownership(a);
- if (a->todo & TODO_MODE) {
- int r2 = set_mode(a, a->mode);
- if (r2 < ret) ret = r2;
- }
- if (a->todo & TODO_ACLS) {
- int r2 = set_acls(a);
- if (r2 < ret) ret = r2;
- }
-
- /*
- * Security-related extended attributes (such as
- * security.capability on Linux) have to be restored last,
- * since they're implicitly removed by other file changes.
- */
- if (a->todo & TODO_XATTR) {
- int r2 = set_xattrs(a);
- if (r2 < ret) ret = r2;
- }
-
- /*
- * Some flags prevent file modification; they must be restored after
- * file contents are written.
- */
- if (a->todo & TODO_FFLAGS) {
- int r2 = set_fflags(a);
- if (r2 < ret) ret = r2;
- }
- /*
- * Time has to be restored after all other metadata;
- * otherwise atime will get changed.
- */
- if (a->todo & TODO_TIMES) {
- int r2 = set_times(a);
- if (r2 < ret) ret = r2;
- }
-
- /* If there's an fd, we can close it now. */
- if (a->fd >= 0) {
- close(a->fd);
- a->fd = -1;
- }
- /* If there's an entry, we can release it now. */
- if (a->entry) {
- archive_entry_free(a->entry);
- a->entry = NULL;
- }
- a->archive.state = ARCHIVE_STATE_HEADER;
- return (ret);
-}
-
-int
-archive_write_disk_set_group_lookup(struct archive *_a,
- void *private_data,
- gid_t (*lookup_gid)(void *private, const char *gname, gid_t gid),
- void (*cleanup_gid)(void *private))
-{
- struct archive_write_disk *a = (struct archive_write_disk *)_a;
- __archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC,
- ARCHIVE_STATE_ANY, "archive_write_disk_set_group_lookup");
-
- a->lookup_gid = lookup_gid;
- a->cleanup_gid = cleanup_gid;
- a->lookup_gid_data = private_data;
- return (ARCHIVE_OK);
-}
-
-int
-archive_write_disk_set_user_lookup(struct archive *_a,
- void *private_data,
- uid_t (*lookup_uid)(void *private, const char *uname, uid_t uid),
- void (*cleanup_uid)(void *private))
-{
- struct archive_write_disk *a = (struct archive_write_disk *)_a;
- __archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC,
- ARCHIVE_STATE_ANY, "archive_write_disk_set_user_lookup");
-
- a->lookup_uid = lookup_uid;
- a->cleanup_uid = cleanup_uid;
- a->lookup_uid_data = private_data;
- return (ARCHIVE_OK);
-}
-
-
-/*
- * Create a new archive_write_disk object and initialize it with global state.
- */
-struct archive *
-archive_write_disk_new(void)
-{
- struct archive_write_disk *a;
-
- a = (struct archive_write_disk *)malloc(sizeof(*a));
- if (a == NULL)
- return (NULL);
- memset(a, 0, sizeof(*a));
- a->archive.magic = ARCHIVE_WRITE_DISK_MAGIC;
- /* We're ready to write a header immediately. */
- a->archive.state = ARCHIVE_STATE_HEADER;
- a->archive.vtable = archive_write_disk_vtable();
- a->lookup_uid = trivial_lookup_uid;
- a->lookup_gid = trivial_lookup_gid;
- a->start_time = time(NULL);
-#ifdef HAVE_GETEUID
- a->user_uid = geteuid();
-#endif /* HAVE_GETEUID */
- if (archive_string_ensure(&a->path_safe, 512) == NULL) {
- free(a);
- return (NULL);
- }
- return (&a->archive);
-}
-
-
-/*
- * If pathname is longer than PATH_MAX, chdir to a suitable
- * intermediate dir and edit the path down to a shorter suffix. Note
- * that this routine never returns an error; if the chdir() attempt
- * fails for any reason, we just go ahead with the long pathname. The
- * object creation is likely to fail, but any error will get handled
- * at that time.
- */
-#ifdef HAVE_FCHDIR
-static void
-edit_deep_directories(struct archive_write_disk *a)
-{
- int ret;
- char *tail = a->name;
-
- a->restore_pwd = -1;
-
- /* If path is short, avoid the open() below. */
- if (strlen(tail) <= PATH_MAX)
- return;
-
- /* Try to record our starting dir. */
- a->restore_pwd = open(".", O_RDONLY | O_BINARY);
- if (a->restore_pwd < 0)
- return;
-
- /* As long as the path is too long... */
- while (strlen(tail) > PATH_MAX) {
- /* Locate a dir prefix shorter than PATH_MAX. */
- tail += PATH_MAX - 8;
- while (tail > a->name && *tail != '/')
- tail--;
- /* Exit if we find a too-long path component. */
- if (tail <= a->name)
- return;
- /* Create the intermediate dir and chdir to it. */
- *tail = '\0'; /* Terminate dir portion */
- ret = create_dir(a, a->name);
- if (ret == ARCHIVE_OK && chdir(a->name) != 0)
- ret = ARCHIVE_FAILED;
- *tail = '/'; /* Restore the / we removed. */
- if (ret != ARCHIVE_OK)
- return;
- tail++;
- /* The chdir() succeeded; we've now shortened the path. */
- a->name = tail;
- }
- return;
-}
-#endif
-
-/*
- * The main restore function.
- */
-static int
-restore_entry(struct archive_write_disk *a)
-{
- int ret = ARCHIVE_OK, en;
-
- if (a->flags & ARCHIVE_EXTRACT_UNLINK && !S_ISDIR(a->mode)) {
- /*
- * TODO: Fix this. Apparently, there are platforms
- * that still allow root to hose the entire filesystem
- * by unlinking a dir. The S_ISDIR() test above
- * prevents us from using unlink() here if the new
- * object is a dir, but that doesn't mean the old
- * object isn't a dir.
- */
- if (unlink(a->name) == 0) {
- /* We removed it, reset cached stat. */
- a->pst = NULL;
- } else if (errno == ENOENT) {
- /* File didn't exist, that's just as good. */
- } else if (rmdir(a->name) == 0) {
- /* It was a dir, but now it's gone. */
- a->pst = NULL;
- } else {
- /* We tried, but couldn't get rid of it. */
- archive_set_error(&a->archive, errno,
- "Could not unlink");
- return(ARCHIVE_FAILED);
- }
- }
-
- /* Try creating it first; if this fails, we'll try to recover. */
- en = create_filesystem_object(a);
-
- if ((en == ENOTDIR || en == ENOENT)
- && !(a->flags & ARCHIVE_EXTRACT_NO_AUTODIR)) {
- /* If the parent dir doesn't exist, try creating it. */
- create_parent_dir(a, a->name);
- /* Now try to create the object again. */
- en = create_filesystem_object(a);
- }
-
- if ((en == EISDIR || en == EEXIST)
- && (a->flags & ARCHIVE_EXTRACT_NO_OVERWRITE)) {
- /* If we're not overwriting, we're done. */
- archive_set_error(&a->archive, en, "Already exists");
- return (ARCHIVE_FAILED);
- }
-
- /*
- * Some platforms return EISDIR if you call
- * open(O_WRONLY | O_EXCL | O_CREAT) on a directory, some
- * return EEXIST. POSIX is ambiguous, requiring EISDIR
- * for open(O_WRONLY) on a dir and EEXIST for open(O_EXCL | O_CREAT)
- * on an existing item.
- */
- if (en == EISDIR) {
- /* A dir is in the way of a non-dir, rmdir it. */
- if (rmdir(a->name) != 0) {
- archive_set_error(&a->archive, errno,
- "Can't remove already-existing dir");
- return (ARCHIVE_FAILED);
- }
- a->pst = NULL;
- /* Try again. */
- en = create_filesystem_object(a);
- } else if (en == EEXIST) {
- /*
- * We know something is in the way, but we don't know what;
- * we need to find out before we go any further.
- */
- int r = 0;
- /*
- * The SECURE_SYMLINK logic has already removed a
- * symlink to a dir if the client wants that. So
- * follow the symlink if we're creating a dir.
- */
- if (S_ISDIR(a->mode))
- r = stat(a->name, &a->st);
- /*
- * If it's not a dir (or it's a broken symlink),
- * then don't follow it.
- */
- if (r != 0 || !S_ISDIR(a->mode))
- r = lstat(a->name, &a->st);
- if (r != 0) {
- archive_set_error(&a->archive, errno,
- "Can't stat existing object");
- return (ARCHIVE_FAILED);
- }
-
- /*
- * NO_OVERWRITE_NEWER doesn't apply to directories.
- */
- if ((a->flags & ARCHIVE_EXTRACT_NO_OVERWRITE_NEWER)
- && !S_ISDIR(a->st.st_mode)) {
- if (!older(&(a->st), a->entry)) {
- archive_set_error(&a->archive, 0,
- "File on disk is not older; skipping.");
- return (ARCHIVE_FAILED);
- }
- }
-
- /* If it's our archive, we're done. */
- if (a->skip_file_dev > 0 &&
- a->skip_file_ino > 0 &&
- a->st.st_dev == a->skip_file_dev &&
- a->st.st_ino == a->skip_file_ino) {
- archive_set_error(&a->archive, 0, "Refusing to overwrite archive");
- return (ARCHIVE_FAILED);
- }
-
- if (!S_ISDIR(a->st.st_mode)) {
- /* A non-dir is in the way, unlink it. */
- if (unlink(a->name) != 0) {
- archive_set_error(&a->archive, errno,
- "Can't unlink already-existing object");
- return (ARCHIVE_FAILED);
- }
- a->pst = NULL;
- /* Try again. */
- en = create_filesystem_object(a);
- } else if (!S_ISDIR(a->mode)) {
- /* A dir is in the way of a non-dir, rmdir it. */
- if (rmdir(a->name) != 0) {
- archive_set_error(&a->archive, errno,
- "Can't remove already-existing dir");
- return (ARCHIVE_FAILED);
- }
- /* Try again. */
- en = create_filesystem_object(a);
- } else {
- /*
- * There's a dir in the way of a dir. Don't
- * waste time with rmdir()/mkdir(), just fix
- * up the permissions on the existing dir.
- * Note that we don't change perms on existing
- * dirs unless _EXTRACT_PERM is specified.
- */
- if ((a->mode != a->st.st_mode)
- && (a->todo & TODO_MODE_FORCE))
- a->deferred |= (a->todo & TODO_MODE);
- /* Ownership doesn't need deferred fixup. */
- en = 0; /* Forget the EEXIST. */
- }
- }
-
- if (en) {
- /* Everything failed; give up here. */
- archive_set_error(&a->archive, en, "Can't create '%s'",
- a->name);
- return (ARCHIVE_FAILED);
- }
-
- a->pst = NULL; /* Cached stat data no longer valid. */
- return (ret);
-}
-
-/*
- * Returns 0 if creation succeeds, or else returns errno value from
- * the failed system call. Note: This function should only ever perform
- * a single system call.
- */
-static int
-create_filesystem_object(struct archive_write_disk *a)
-{
- /* Create the entry. */
- const char *linkname;
- mode_t final_mode, mode;
- int r;
-
- /* We identify hard/symlinks according to the link names. */
- /* Since link(2) and symlink(2) don't handle modes, we're done here. */
- linkname = archive_entry_hardlink(a->entry);
- if (linkname != NULL) {
-#if !HAVE_LINK
- return (EPERM);
-#else
- r = link(linkname, a->name) ? errno : 0;
- /*
- * New cpio and pax formats allow hardlink entries
- * to carry data, so we may have to open the file
- * for hardlink entries.
- *
- * If the hardlink was successfully created and
- * the archive doesn't have carry data for it,
- * consider it to be non-authoritive for meta data.
- * This is consistent with GNU tar and BSD pax.
- * If the hardlink does carry data, let the last
- * archive entry decide ownership.
- */
- if (r == 0 && a->filesize <= 0) {
- a->todo = 0;
- a->deferred = 0;
- } if (r == 0 && a->filesize > 0) {
- a->fd = open(a->name, O_WRONLY | O_TRUNC | O_BINARY);
- if (a->fd < 0)
- r = errno;
- }
- return (r);
-#endif
- }
- linkname = archive_entry_symlink(a->entry);
- if (linkname != NULL) {
-#if HAVE_SYMLINK
- return symlink(linkname, a->name) ? errno : 0;
-#else
- return (EPERM);
-#endif
- }
-
- /*
- * The remaining system calls all set permissions, so let's
- * try to take advantage of that to avoid an extra chmod()
- * call. (Recall that umask is set to zero right now!)
- */
-
- /* Mode we want for the final restored object (w/o file type bits). */
- final_mode = a->mode & 07777;
- /*
- * The mode that will actually be restored in this step. Note
- * that SUID, SGID, etc, require additional work to ensure
- * security, so we never restore them at this point.
- */
- mode = final_mode & 0777;
-
- switch (a->mode & AE_IFMT) {
- default:
- /* POSIX requires that we fall through here. */
- /* FALLTHROUGH */
- case AE_IFREG:
- a->fd = open(a->name,
- O_WRONLY | O_CREAT | O_EXCL | O_BINARY, mode);
- r = (a->fd < 0);
- break;
- case AE_IFCHR:
-#ifdef HAVE_MKNOD
- /* Note: we use AE_IFCHR for the case label, and
- * S_IFCHR for the mknod() call. This is correct. */
- r = mknod(a->name, mode | S_IFCHR,
- archive_entry_rdev(a->entry));
- break;
-#else
- /* TODO: Find a better way to warn about our inability
- * to restore a char device node. */
- return (EINVAL);
-#endif /* HAVE_MKNOD */
- case AE_IFBLK:
-#ifdef HAVE_MKNOD
- r = mknod(a->name, mode | S_IFBLK,
- archive_entry_rdev(a->entry));
- break;
-#else
- /* TODO: Find a better way to warn about our inability
- * to restore a block device node. */
- return (EINVAL);
-#endif /* HAVE_MKNOD */
- case AE_IFDIR:
- mode = (mode | MINIMUM_DIR_MODE) & MAXIMUM_DIR_MODE;
- r = mkdir(a->name, mode);
- if (r == 0) {
- /* Defer setting dir times. */
- a->deferred |= (a->todo & TODO_TIMES);
- a->todo &= ~TODO_TIMES;
- /* Never use an immediate chmod(). */
- /* We can't avoid the chmod() entirely if EXTRACT_PERM
- * because of SysV SGID inheritance. */
- if ((mode != final_mode)
- || (a->flags & ARCHIVE_EXTRACT_PERM))
- a->deferred |= (a->todo & TODO_MODE);
- a->todo &= ~TODO_MODE;
- }
- break;
- case AE_IFIFO:
-#ifdef HAVE_MKFIFO
- r = mkfifo(a->name, mode);
- break;
-#else
- /* TODO: Find a better way to warn about our inability
- * to restore a fifo. */
- return (EINVAL);
-#endif /* HAVE_MKFIFO */
- }
-
- /* All the system calls above set errno on failure. */
- if (r)
- return (errno);
-
- /* If we managed to set the final mode, we've avoided a chmod(). */
- if (mode == final_mode)
- a->todo &= ~TODO_MODE;
- return (0);
-}
-
-/*
- * Cleanup function for archive_extract. Mostly, this involves processing
- * the fixup list, which is used to address a number of problems:
- * * Dir permissions might prevent us from restoring a file in that
- * dir, so we restore the dir with minimum 0700 permissions first,
- * then correct the mode at the end.
- * * Similarly, the act of restoring a file touches the directory
- * and changes the timestamp on the dir, so we have to touch-up dir
- * timestamps at the end as well.
- * * Some file flags can interfere with the restore by, for example,
- * preventing the creation of hardlinks to those files.
- *
- * Note that tar/cpio do not require that archives be in a particular
- * order; there is no way to know when the last file has been restored
- * within a directory, so there's no way to optimize the memory usage
- * here by fixing up the directory any earlier than the
- * end-of-archive.
- *
- * XXX TODO: Directory ACLs should be restored here, for the same
- * reason we set directory perms here. XXX
- */
-static int
-_archive_write_close(struct archive *_a)
-{
- struct archive_write_disk *a = (struct archive_write_disk *)_a;
- struct fixup_entry *next, *p;
- int ret;
-
- __archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC,
- ARCHIVE_STATE_HEADER | ARCHIVE_STATE_DATA,
- "archive_write_disk_close");
- ret = _archive_write_finish_entry(&a->archive);
-
- /* Sort dir list so directories are fixed up in depth-first order. */
- p = sort_dir_list(a->fixup_list);
-
- while (p != NULL) {
- a->pst = NULL; /* Mark stat cache as out-of-date. */
- if (p->fixup & TODO_TIMES) {
-#ifdef HAVE_UTIMES
- /* {f,l,}utimes() are preferred, when available. */
-#if defined(_WIN32) && !defined(__CYGWIN__)
- struct __timeval times[2];
-#else
- struct timeval times[2];
-#endif
- times[0].tv_sec = p->atime;
- times[0].tv_usec = p->atime_nanos / 1000;
-#ifdef HAVE_STRUCT_STAT_ST_BIRTHTIME
- /* if it's valid and not mtime, push the birthtime first */
- if (((times[1].tv_sec = p->birthtime) < p->mtime) &&
- (p->birthtime > 0))
- {
- times[1].tv_usec = p->birthtime_nanos / 1000;
- utimes(p->name, times);
- }
-#endif
- times[1].tv_sec = p->mtime;
- times[1].tv_usec = p->mtime_nanos / 1000;
-#ifdef HAVE_LUTIMES
- lutimes(p->name, times);
-#else
- utimes(p->name, times);
-#endif
-#else
- /* utime() is more portable, but less precise. */
- struct utimbuf times;
- times.modtime = p->mtime;
- times.actime = p->atime;
-
- utime(p->name, &times);
-#endif
- }
- if (p->fixup & TODO_MODE_BASE)
- chmod(p->name, p->mode);
-
- if (p->fixup & TODO_FFLAGS)
- set_fflags_platform(a, -1, p->name,
- p->mode, p->fflags_set, 0);
-
- next = p->next;
- free(p->name);
- free(p);
- p = next;
- }
- a->fixup_list = NULL;
- return (ret);
-}
-
-static int
-_archive_write_free(struct archive *_a)
-{
- struct archive_write_disk *a = (struct archive_write_disk *)_a;
- int ret;
- ret = _archive_write_close(&a->archive);
- if (a->cleanup_gid != NULL && a->lookup_gid_data != NULL)
- (a->cleanup_gid)(a->lookup_gid_data);
- if (a->cleanup_uid != NULL && a->lookup_uid_data != NULL)
- (a->cleanup_uid)(a->lookup_uid_data);
- if (a->entry)
- archive_entry_free(a->entry);
- archive_string_free(&a->_name_data);
- archive_string_free(&a->archive.error_string);
- archive_string_free(&a->path_safe);
- free(a);
- return (ret);
-}
-
-/*
- * Simple O(n log n) merge sort to order the fixup list. In
- * particular, we want to restore dir timestamps depth-first.
- */
-static struct fixup_entry *
-sort_dir_list(struct fixup_entry *p)
-{
- struct fixup_entry *a, *b, *t;
-
- if (p == NULL)
- return (NULL);
- /* A one-item list is already sorted. */
- if (p->next == NULL)
- return (p);
-
- /* Step 1: split the list. */
- t = p;
- a = p->next->next;
- while (a != NULL) {
- /* Step a twice, t once. */
- a = a->next;
- if (a != NULL)
- a = a->next;
- t = t->next;
- }
- /* Now, t is at the mid-point, so break the list here. */
- b = t->next;
- t->next = NULL;
- a = p;
-
- /* Step 2: Recursively sort the two sub-lists. */
- a = sort_dir_list(a);
- b = sort_dir_list(b);
-
- /* Step 3: Merge the returned lists. */
- /* Pick the first element for the merged list. */
- if (strcmp(a->name, b->name) > 0) {
- t = p = a;
- a = a->next;
- } else {
- t = p = b;
- b = b->next;
- }
-
- /* Always put the later element on the list first. */
- while (a != NULL && b != NULL) {
- if (strcmp(a->name, b->name) > 0) {
- t->next = a;
- a = a->next;
- } else {
- t->next = b;
- b = b->next;
- }
- t = t->next;
- }
-
- /* Only one list is non-empty, so just splice it on. */
- if (a != NULL)
- t->next = a;
- if (b != NULL)
- t->next = b;
-
- return (p);
-}
-
-/*
- * Returns a new, initialized fixup entry.
- *
- * TODO: Reduce the memory requirements for this list by using a tree
- * structure rather than a simple list of names.
- */
-static struct fixup_entry *
-new_fixup(struct archive_write_disk *a, const char *pathname)
-{
- struct fixup_entry *fe;
-
- fe = (struct fixup_entry *)malloc(sizeof(struct fixup_entry));
- if (fe == NULL)
- return (NULL);
- fe->next = a->fixup_list;
- a->fixup_list = fe;
- fe->fixup = 0;
- fe->name = strdup(pathname);
- return (fe);
-}
-
-/*
- * Returns a fixup structure for the current entry.
- */
-static struct fixup_entry *
-current_fixup(struct archive_write_disk *a, const char *pathname)
-{
- if (a->current_fixup == NULL)
- a->current_fixup = new_fixup(a, pathname);
- return (a->current_fixup);
-}
-
-/* TODO: Make this work. */
-/*
- * TODO: The deep-directory support bypasses this; disable deep directory
- * support if we're doing symlink checks.
- */
-/*
- * TODO: Someday, integrate this with the deep dir support; they both
- * scan the path and both can be optimized by comparing against other
- * recent paths.
- */
-/* TODO: Extend this to support symlinks on Windows Vista and later. */
-static int
-check_symlinks(struct archive_write_disk *a)
-{
-#if !defined(HAVE_LSTAT)
- /* Platform doesn't have lstat, so we can't look for symlinks. */
- (void)a; /* UNUSED */
- return (ARCHIVE_OK);
-#else
- char *pn, *p;
- char c;
- int r;
- struct stat st;
-
- /*
- * Guard against symlink tricks. Reject any archive entry whose
- * destination would be altered by a symlink.
- */
- /* Whatever we checked last time doesn't need to be re-checked. */
- pn = a->name;
- p = a->path_safe.s;
- while ((*pn != '\0') && (*p == *pn))
- ++p, ++pn;
- c = pn[0];
- /* Keep going until we've checked the entire name. */
- while (pn[0] != '\0' && (pn[0] != '/' || pn[1] != '\0')) {
- /* Skip the next path element. */
- while (*pn != '\0' && *pn != '/')
- ++pn;
- c = pn[0];
- pn[0] = '\0';
- /* Check that we haven't hit a symlink. */
- r = lstat(a->name, &st);
- if (r != 0) {
- /* We've hit a dir that doesn't exist; stop now. */
- if (errno == ENOENT)
- break;
- } else if (S_ISLNK(st.st_mode)) {
- if (c == '\0') {
- /*
- * Last element is symlink; remove it
- * so we can overwrite it with the
- * item being extracted.
- */
- if (unlink(a->name)) {
- archive_set_error(&a->archive, errno,
- "Could not remove symlink %s",
- a->name);
- pn[0] = c;
- return (ARCHIVE_FAILED);
- }
- a->pst = NULL;
- /*
- * Even if we did remove it, a warning
- * is in order. The warning is silly,
- * though, if we're just replacing one
- * symlink with another symlink.
- */
- if (!S_ISLNK(a->mode)) {
- archive_set_error(&a->archive, 0,
- "Removing symlink %s",
- a->name);
- }
- /* Symlink gone. No more problem! */
- pn[0] = c;
- return (0);
- } else if (a->flags & ARCHIVE_EXTRACT_UNLINK) {
- /* User asked us to remove problems. */
- if (unlink(a->name) != 0) {
- archive_set_error(&a->archive, 0,
- "Cannot remove intervening symlink %s",
- a->name);
- pn[0] = c;
- return (ARCHIVE_FAILED);
- }
- a->pst = NULL;
- } else {
- archive_set_error(&a->archive, 0,
- "Cannot extract through symlink %s",
- a->name);
- pn[0] = c;
- return (ARCHIVE_FAILED);
- }
- }
- }
- pn[0] = c;
- /* We've checked and/or cleaned the whole path, so remember it. */
- archive_strcpy(&a->path_safe, a->name);
- return (ARCHIVE_OK);
-#endif
-}
-
-#if defined(_WIN32) || defined(__CYGWIN__)
-/*
- * 1. Convert a path separator from '\' to '/' .
- * We shouldn't check multi-byte character directly because some
- * character-set have been using the '\' character for a part of
- * its multibyte character code.
- * 2. Replace unusable characters in Windows with underscore('_').
- * See also : http://msdn.microsoft.com/en-us/library/aa365247.aspx
- */
-static void
-cleanup_pathname_win(struct archive_write_disk *a)
-{
- wchar_t wc;
- char *p;
- size_t alen, l;
-
- alen = 0;
- l = 0;
- for (p = a->name; *p != '\0'; p++) {
- ++alen;
- if (*p == '\\')
- l = 1;
- /* Rewrite the path name if its character is a unusable. */
- if (*p == ':' || *p == '*' || *p == '?' || *p == '"' ||
- *p == '<' || *p == '>' || *p == '|')
- *p = '_';
- }
- if (alen == 0 || l == 0)
- return;
- /*
- * Convert path separator.
- */
- p = a->name;
- while (*p != '\0' && alen) {
- l = mbtowc(&wc, p, alen);
- if (l == -1) {
- while (*p != '\0') {
- if (*p == '\\')
- *p = '/';
- ++p;
- }
- break;
- }
- if (l == 1 && wc == L'\\')
- *p = '/';
- p += l;
- alen -= l;
- }
-}
-#endif
-
-/*
- * Canonicalize the pathname. In particular, this strips duplicate
- * '/' characters, '.' elements, and trailing '/'. It also raises an
- * error for an empty path, a trailing '..' or (if _SECURE_NODOTDOT is
- * set) any '..' in the path.
- */
-static int
-cleanup_pathname(struct archive_write_disk *a)
-{
- char *dest, *src;
- char separator = '\0';
-
- dest = src = a->name;
- if (*src == '\0') {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "Invalid empty pathname");
- return (ARCHIVE_FAILED);
- }
-
-#if defined(_WIN32) || defined(__CYGWIN__)
- cleanup_pathname_win(a);
-#endif
- /* Skip leading '/'. */
- if (*src == '/')
- separator = *src++;
-
- /* Scan the pathname one element at a time. */
- for (;;) {
- /* src points to first char after '/' */
- if (src[0] == '\0') {
- break;
- } else if (src[0] == '/') {
- /* Found '//', ignore second one. */
- src++;
- continue;
- } else if (src[0] == '.') {
- if (src[1] == '\0') {
- /* Ignore trailing '.' */
- break;
- } else if (src[1] == '/') {
- /* Skip './'. */
- src += 2;
- continue;
- } else if (src[1] == '.') {
- if (src[2] == '/' || src[2] == '\0') {
- /* Conditionally warn about '..' */
- if (a->flags & ARCHIVE_EXTRACT_SECURE_NODOTDOT) {
- archive_set_error(&a->archive,
- ARCHIVE_ERRNO_MISC,
- "Path contains '..'");
- return (ARCHIVE_FAILED);
- }
- }
- /*
- * Note: Under no circumstances do we
- * remove '..' elements. In
- * particular, restoring
- * '/foo/../bar/' should create the
- * 'foo' dir as a side-effect.
- */
- }
- }
-
- /* Copy current element, including leading '/'. */
- if (separator)
- *dest++ = '/';
- while (*src != '\0' && *src != '/') {
- *dest++ = *src++;
- }
-
- if (*src == '\0')
- break;
-
- /* Skip '/' separator. */
- separator = *src++;
- }
- /*
- * We've just copied zero or more path elements, not including the
- * final '/'.
- */
- if (dest == a->name) {
- /*
- * Nothing got copied. The path must have been something
- * like '.' or '/' or './' or '/././././/./'.
- */
- if (separator)
- *dest++ = '/';
- else
- *dest++ = '.';
- }
- /* Terminate the result. */
- *dest = '\0';
- return (ARCHIVE_OK);
-}
-
-/*
- * Create the parent directory of the specified path, assuming path
- * is already in mutable storage.
- */
-static int
-create_parent_dir(struct archive_write_disk *a, char *path)
-{
- char *slash;
- int r;
-
- /* Remove tail element to obtain parent name. */
- slash = strrchr(path, '/');
- if (slash == NULL)
- return (ARCHIVE_OK);
- *slash = '\0';
- r = create_dir(a, path);
- *slash = '/';
- return (r);
-}
-
-/*
- * Create the specified dir, recursing to create parents as necessary.
- *
- * Returns ARCHIVE_OK if the path exists when we're done here.
- * Otherwise, returns ARCHIVE_FAILED.
- * Assumes path is in mutable storage; path is unchanged on exit.
- */
-static int
-create_dir(struct archive_write_disk *a, char *path)
-{
- struct stat st;
- struct fixup_entry *le;
- char *slash, *base;
- mode_t mode_final, mode;
- int r;
-
- /* Check for special names and just skip them. */
- slash = strrchr(path, '/');
- if (slash == NULL)
- base = path;
- else
- base = slash + 1;
-
- if (base[0] == '\0' ||
- (base[0] == '.' && base[1] == '\0') ||
- (base[0] == '.' && base[1] == '.' && base[2] == '\0')) {
- /* Don't bother trying to create null path, '.', or '..'. */
- if (slash != NULL) {
- *slash = '\0';
- r = create_dir(a, path);
- *slash = '/';
- return (r);
- }
- return (ARCHIVE_OK);
- }
-
- /*
- * Yes, this should be stat() and not lstat(). Using lstat()
- * here loses the ability to extract through symlinks. Also note
- * that this should not use the a->st cache.
- */
- if (stat(path, &st) == 0) {
- if (S_ISDIR(st.st_mode))
- return (ARCHIVE_OK);
- if ((a->flags & ARCHIVE_EXTRACT_NO_OVERWRITE)) {
- archive_set_error(&a->archive, EEXIST,
- "Can't create directory '%s'", path);
- return (ARCHIVE_FAILED);
- }
- if (unlink(path) != 0) {
- archive_set_error(&a->archive, errno,
- "Can't create directory '%s': "
- "Conflicting file cannot be removed");
- return (ARCHIVE_FAILED);
- }
- } else if (errno != ENOENT && errno != ENOTDIR) {
- /* Stat failed? */
- archive_set_error(&a->archive, errno, "Can't test directory '%s'", path);
- return (ARCHIVE_FAILED);
- } else if (slash != NULL) {
- *slash = '\0';
- r = create_dir(a, path);
- *slash = '/';
- if (r != ARCHIVE_OK)
- return (r);
- }
-
- /*
- * Mode we want for the final restored directory. Per POSIX,
- * implicitly-created dirs must be created obeying the umask.
- * There's no mention whether this is different for privileged
- * restores (which the rest of this code handles by pretending
- * umask=0). I've chosen here to always obey the user's umask for
- * implicit dirs, even if _EXTRACT_PERM was specified.
- */
- mode_final = DEFAULT_DIR_MODE & ~a->user_umask;
- /* Mode we want on disk during the restore process. */
- mode = mode_final;
- mode |= MINIMUM_DIR_MODE;
- mode &= MAXIMUM_DIR_MODE;
- if (mkdir(path, mode) == 0) {
- if (mode != mode_final) {
- le = new_fixup(a, path);
- le->fixup |=TODO_MODE_BASE;
- le->mode = mode_final;
- }
- return (ARCHIVE_OK);
- }
-
- /*
- * Without the following check, a/b/../b/c/d fails at the
- * second visit to 'b', so 'd' can't be created. Note that we
- * don't add it to the fixup list here, as it's already been
- * added.
- */
- if (stat(path, &st) == 0 && S_ISDIR(st.st_mode))
- return (ARCHIVE_OK);
-
- archive_set_error(&a->archive, errno, "Failed to create dir '%s'",
- path);
- return (ARCHIVE_FAILED);
-}
-
-/*
- * Note: Although we can skip setting the user id if the desired user
- * id matches the current user, we cannot skip setting the group, as
- * many systems set the gid based on the containing directory. So
- * we have to perform a chown syscall if we want to set the SGID
- * bit. (The alternative is to stat() and then possibly chown(); it's
- * more efficient to skip the stat() and just always chown().) Note
- * that a successful chown() here clears the TODO_SGID_CHECK bit, which
- * allows set_mode to skip the stat() check for the GID.
- */
-static int
-set_ownership(struct archive_write_disk *a)
-{
-#ifndef __CYGWIN__
-/* unfortunately, on win32 there is no 'root' user with uid 0,
- so we just have to try the chown and see if it works */
-
- /* If we know we can't change it, don't bother trying. */
- if (a->user_uid != 0 && a->user_uid != a->uid) {
- archive_set_error(&a->archive, errno,
- "Can't set UID=%d", a->uid);
- return (ARCHIVE_WARN);
- }
-#endif
-
-#ifdef HAVE_FCHOWN
- /* If we have an fd, we can avoid a race. */
- if (a->fd >= 0 && fchown(a->fd, a->uid, a->gid) == 0) {
- /* We've set owner and know uid/gid are correct. */
- a->todo &= ~(TODO_OWNER | TODO_SGID_CHECK | TODO_SUID_CHECK);
- return (ARCHIVE_OK);
- }
-#endif
-
- /* We prefer lchown() but will use chown() if that's all we have. */
- /* Of course, if we have neither, this will always fail. */
-#ifdef HAVE_LCHOWN
- if (lchown(a->name, a->uid, a->gid) == 0) {
- /* We've set owner and know uid/gid are correct. */
- a->todo &= ~(TODO_OWNER | TODO_SGID_CHECK | TODO_SUID_CHECK);
- return (ARCHIVE_OK);
- }
-#elif HAVE_CHOWN
- if (!S_ISLNK(a->mode) && chown(a->name, a->uid, a->gid) == 0) {
- /* We've set owner and know uid/gid are correct. */
- a->todo &= ~(TODO_OWNER | TODO_SGID_CHECK | TODO_SUID_CHECK);
- return (ARCHIVE_OK);
- }
-#endif
-
- archive_set_error(&a->archive, errno,
- "Can't set user=%d/group=%d for %s", a->uid, a->gid,
- a->name);
- return (ARCHIVE_WARN);
-}
-
-
-#if defined(HAVE_UTIMENSAT) && defined(HAVE_FUTIMENS)
-/*
- * utimensat() and futimens() are defined in POSIX.1-2008. They provide ns
- * resolution and setting times on fd and on symlinks, too.
- */
-static int
-set_time(int fd, int mode, const char *name,
- time_t atime, long atime_nsec,
- time_t mtime, long mtime_nsec)
-{
- struct timespec ts[2];
- ts[0].tv_sec = atime;
- ts[0].tv_nsec = atime_nsec;
- ts[1].tv_sec = mtime;
- ts[1].tv_nsec = mtime_nsec;
- if (fd >= 0)
- return futimens(fd, ts);
- return utimensat(AT_FDCWD, name, ts, AT_SYMLINK_NOFOLLOW);
-}
-#elif HAVE_UTIMES
-/*
- * The utimes()-family functions provide µs-resolution and
- * a way to set time on an fd or a symlink. We prefer them
- * when they're available and utimensat/futimens aren't there.
- */
-static int
-set_time(int fd, int mode, const char *name,
- time_t atime, long atime_nsec,
- time_t mtime, long mtime_nsec)
-{
-#if defined(_WIN32) && !defined(__CYGWIN__)
- struct __timeval times[2];
-#else
- struct timeval times[2];
-#endif
-
- times[0].tv_sec = atime;
- times[0].tv_usec = atime_nsec / 1000;
- times[1].tv_sec = mtime;
- times[1].tv_usec = mtime_nsec / 1000;
-
-#ifdef HAVE_FUTIMES
- if (fd >= 0)
- return (futimes(fd, times));
-#else
- (void)fd; /* UNUSED */
-#endif
-#ifdef HAVE_LUTIMES
- (void)mode; /* UNUSED */
- return (lutimes(name, times));
-#else
- if (S_ISLNK(mode))
- return (0);
- return (utimes(name, times));
-#endif
-}
-#elif defined(HAVE_UTIME)
-/*
- * utime() is an older, more standard interface that we'll use
- * if utimes() isn't available.
- */
-static int
-set_time(int fd, int mode, const char *name,
- time_t atime, long atime_nsec,
- time_t mtime, long mtime_nsec)
-{
- struct utimbuf times;
- (void)fd; /* UNUSED */
- (void)name; /* UNUSED */
- (void)atime_nsec; /* UNUSED */
- (void)mtime_nsec; /* UNUSED */
- times.actime = atime;
- times.modtime = mtime;
- if (S_ISLNK(mode))
- return (ARCHIVE_OK);
- return (utime(name, &times));
-}
-#else
-static int
-set_time(int fd, int mode, const char *name,
- time_t atime, long atime_nsec,
- time_t mtime, long mtime_nsec)
-{
- return (ARCHIVE_WARN);
-}
-#endif
-
-static int
-set_times(struct archive_write_disk *a)
-{
- time_t atime = a->start_time, mtime = a->start_time;
- long atime_nsec = 0, mtime_nsec = 0;
-
- /* If no time was provided, we're done. */
- if (!archive_entry_atime_is_set(a->entry)
-#if HAVE_STRUCT_STAT_ST_BIRTHTIME
- && !archive_entry_birthtime_is_set(a->entry)
-#endif
- && !archive_entry_mtime_is_set(a->entry))
- return (ARCHIVE_OK);
-
- /* If no atime was specified, use start time instead. */
- /* In theory, it would be marginally more correct to use
- * time(NULL) here, but that would cost us an extra syscall
- * for little gain. */
- if (archive_entry_atime_is_set(a->entry)) {
- atime = archive_entry_atime(a->entry);
- atime_nsec = archive_entry_atime_nsec(a->entry);
- }
-
- /*
- * If you have struct stat.st_birthtime, we assume BSD birthtime
- * semantics, in which {f,l,}utimes() updates birthtime to earliest
- * mtime. So we set the time twice, first using the birthtime,
- * then using the mtime.
- */
-#if HAVE_STRUCT_STAT_ST_BIRTHTIME
- /* If birthtime is set, flush that through to disk first. */
- if (archive_entry_birthtime_is_set(a->entry))
- if (set_time(a->fd, a->mode, a->name, atime, atime_nsec,
- archive_entry_birthtime(a->entry),
- archive_entry_birthtime_nsec(a->entry))) {
- archive_set_error(&a->archive, errno,
- "Can't update time for %s",
- a->name);
- return (ARCHIVE_WARN);
- }
-#endif
-
- if (archive_entry_mtime_is_set(a->entry)) {
- mtime = archive_entry_mtime(a->entry);
- mtime_nsec = archive_entry_mtime_nsec(a->entry);
- }
- if (set_time(a->fd, a->mode, a->name,
- atime, atime_nsec, mtime, mtime_nsec)) {
- archive_set_error(&a->archive, errno,
- "Can't update time for %s",
- a->name);
- return (ARCHIVE_WARN);
- }
-
- /*
- * Note: POSIX does not provide a portable way to restore ctime.
- * (Apart from resetting the system clock, which is distasteful.)
- * So, any restoration of ctime will necessarily be OS-specific.
- */
-
- return (ARCHIVE_OK);
-}
-
-static int
-set_mode(struct archive_write_disk *a, int mode)
-{
- int r = ARCHIVE_OK;
- mode &= 07777; /* Strip off file type bits. */
-
- if (a->todo & TODO_SGID_CHECK) {
- /*
- * If we don't know the GID is right, we must stat()
- * to verify it. We can't just check the GID of this
- * process, since systems sometimes set GID from
- * the enclosing dir or based on ACLs.
- */
- if ((r = _archive_write_disk_lazy_stat(a)) != ARCHIVE_OK)
- return (r);
- if (a->pst->st_gid != a->gid) {
- mode &= ~ S_ISGID;
-#if !defined(_WIN32) || defined(__CYGWIN__)
- if (a->flags & ARCHIVE_EXTRACT_OWNER) {
- /*
- * This is only an error if you
- * requested owner restore. If you
- * didn't, we'll try to restore
- * sgid/suid, but won't consider it a
- * problem if we can't.
- */
- archive_set_error(&a->archive, -1,
- "Can't restore SGID bit");
- r = ARCHIVE_WARN;
- }
-#endif
- }
- /* While we're here, double-check the UID. */
- if (a->pst->st_uid != a->uid
- && (a->todo & TODO_SUID)) {
- mode &= ~ S_ISUID;
-#if !defined(_WIN32) || defined(__CYGWIN__)
- if (a->flags & ARCHIVE_EXTRACT_OWNER) {
- archive_set_error(&a->archive, -1,
- "Can't restore SUID bit");
- r = ARCHIVE_WARN;
- }
-#endif
- }
- a->todo &= ~TODO_SGID_CHECK;
- a->todo &= ~TODO_SUID_CHECK;
- } else if (a->todo & TODO_SUID_CHECK) {
- /*
- * If we don't know the UID is right, we can just check
- * the user, since all systems set the file UID from
- * the process UID.
- */
- if (a->user_uid != a->uid) {
- mode &= ~ S_ISUID;
-#if !defined(_WIN32) || defined(__CYGWIN__)
- if (a->flags & ARCHIVE_EXTRACT_OWNER) {
- archive_set_error(&a->archive, -1,
- "Can't make file SUID");
- r = ARCHIVE_WARN;
- }
-#endif
- }
- a->todo &= ~TODO_SUID_CHECK;
- }
-
- if (S_ISLNK(a->mode)) {
-#ifdef HAVE_LCHMOD
- /*
- * If this is a symlink, use lchmod(). If the
- * platform doesn't support lchmod(), just skip it. A
- * platform that doesn't provide a way to set
- * permissions on symlinks probably ignores
- * permissions on symlinks, so a failure here has no
- * impact.
- */
- if (lchmod(a->name, mode) != 0) {
- archive_set_error(&a->archive, errno,
- "Can't set permissions to 0%o", (int)mode);
- r = ARCHIVE_WARN;
- }
-#endif
- } else if (!S_ISDIR(a->mode)) {
- /*
- * If it's not a symlink and not a dir, then use
- * fchmod() or chmod(), depending on whether we have
- * an fd. Dirs get their perms set during the
- * post-extract fixup, which is handled elsewhere.
- */
-#ifdef HAVE_FCHMOD
- if (a->fd >= 0) {
- if (fchmod(a->fd, mode) != 0) {
- archive_set_error(&a->archive, errno,
- "Can't set permissions to 0%o", (int)mode);
- r = ARCHIVE_WARN;
- }
- } else
-#endif
- /* If this platform lacks fchmod(), then
- * we'll just use chmod(). */
- if (chmod(a->name, mode) != 0) {
- archive_set_error(&a->archive, errno,
- "Can't set permissions to 0%o", (int)mode);
- r = ARCHIVE_WARN;
- }
- }
- return (r);
-}
-
-static int
-set_fflags(struct archive_write_disk *a)
-{
- struct fixup_entry *le;
- unsigned long set, clear;
- int r;
- int critical_flags;
- mode_t mode = archive_entry_mode(a->entry);
-
- /*
- * Make 'critical_flags' hold all file flags that can't be
- * immediately restored. For example, on BSD systems,
- * SF_IMMUTABLE prevents hardlinks from being created, so
- * should not be set until after any hardlinks are created. To
- * preserve some semblance of portability, this uses #ifdef
- * extensively. Ugly, but it works.
- *
- * Yes, Virginia, this does create a security race. It's mitigated
- * somewhat by the practice of creating dirs 0700 until the extract
- * is done, but it would be nice if we could do more than that.
- * People restoring critical file systems should be wary of
- * other programs that might try to muck with files as they're
- * being restored.
- */
- /* Hopefully, the compiler will optimize this mess into a constant. */
- critical_flags = 0;
-#ifdef SF_IMMUTABLE
- critical_flags |= SF_IMMUTABLE;
-#endif
-#ifdef UF_IMMUTABLE
- critical_flags |= UF_IMMUTABLE;
-#endif
-#ifdef SF_APPEND
- critical_flags |= SF_APPEND;
-#endif
-#ifdef UF_APPEND
- critical_flags |= UF_APPEND;
-#endif
-#ifdef EXT2_APPEND_FL
- critical_flags |= EXT2_APPEND_FL;
-#endif
-#ifdef EXT2_IMMUTABLE_FL
- critical_flags |= EXT2_IMMUTABLE_FL;
-#endif
-
- if (a->todo & TODO_FFLAGS) {
- archive_entry_fflags(a->entry, &set, &clear);
-
- /*
- * The first test encourages the compiler to eliminate
- * all of this if it's not necessary.
- */
- if ((critical_flags != 0) && (set & critical_flags)) {
- le = current_fixup(a, a->name);
- le->fixup |= TODO_FFLAGS;
- le->fflags_set = set;
- /* Store the mode if it's not already there. */
- if ((le->fixup & TODO_MODE) == 0)
- le->mode = mode;
- } else {
- r = set_fflags_platform(a, a->fd,
- a->name, mode, set, clear);
- if (r != ARCHIVE_OK)
- return (r);
- }
- }
- return (ARCHIVE_OK);
-}
-
-
-#if ( defined(HAVE_LCHFLAGS) || defined(HAVE_CHFLAGS) || defined(HAVE_FCHFLAGS) ) && defined(HAVE_STRUCT_STAT_ST_FLAGS)
-/*
- * BSD reads flags using stat() and sets them with one of {f,l,}chflags()
- */
-static int
-set_fflags_platform(struct archive_write_disk *a, int fd, const char *name,
- mode_t mode, unsigned long set, unsigned long clear)
-{
- int r;
-
- (void)mode; /* UNUSED */
- if (set == 0 && clear == 0)
- return (ARCHIVE_OK);
-
- /*
- * XXX Is the stat here really necessary? Or can I just use
- * the 'set' flags directly? In particular, I'm not sure
- * about the correct approach if we're overwriting an existing
- * file that already has flags on it. XXX
- */
- if ((r = _archive_write_disk_lazy_stat(a)) != ARCHIVE_OK)
- return (r);
-
- a->st.st_flags &= ~clear;
- a->st.st_flags |= set;
-#ifdef HAVE_FCHFLAGS
- /* If platform has fchflags() and we were given an fd, use it. */
- if (fd >= 0 && fchflags(fd, a->st.st_flags) == 0)
- return (ARCHIVE_OK);
-#endif
- /*
- * If we can't use the fd to set the flags, we'll use the
- * pathname to set flags. We prefer lchflags() but will use
- * chflags() if we must.
- */
-#ifdef HAVE_LCHFLAGS
- if (lchflags(name, a->st.st_flags) == 0)
- return (ARCHIVE_OK);
-#elif defined(HAVE_CHFLAGS)
- if (S_ISLNK(a->st.st_mode)) {
- archive_set_error(&a->archive, errno,
- "Can't set file flags on symlink.");
- return (ARCHIVE_WARN);
- }
- if (chflags(name, a->st.st_flags) == 0)
- return (ARCHIVE_OK);
-#endif
- archive_set_error(&a->archive, errno,
- "Failed to set file flags");
- return (ARCHIVE_WARN);
-}
-
-#elif defined(EXT2_IOC_GETFLAGS) && defined(EXT2_IOC_SETFLAGS)
-/*
- * Linux uses ioctl() to read and write file flags.
- */
-static int
-set_fflags_platform(struct archive_write_disk *a, int fd, const char *name,
- mode_t mode, unsigned long set, unsigned long clear)
-{
- int ret;
- int myfd = fd;
- unsigned long newflags, oldflags;
- unsigned long sf_mask = 0;
-
- if (set == 0 && clear == 0)
- return (ARCHIVE_OK);
- /* Only regular files and dirs can have flags. */
- if (!S_ISREG(mode) && !S_ISDIR(mode))
- return (ARCHIVE_OK);
-
- /* If we weren't given an fd, open it ourselves. */
- if (myfd < 0)
- myfd = open(name, O_RDONLY | O_NONBLOCK | O_BINARY);
- if (myfd < 0)
- return (ARCHIVE_OK);
-
- /*
- * Linux has no define for the flags that are only settable by
- * the root user. This code may seem a little complex, but
- * there seem to be some Linux systems that lack these
- * defines. (?) The code below degrades reasonably gracefully
- * if sf_mask is incomplete.
- */
-#ifdef EXT2_IMMUTABLE_FL
- sf_mask |= EXT2_IMMUTABLE_FL;
-#endif
-#ifdef EXT2_APPEND_FL
- sf_mask |= EXT2_APPEND_FL;
-#endif
- /*
- * XXX As above, this would be way simpler if we didn't have
- * to read the current flags from disk. XXX
- */
- ret = ARCHIVE_OK;
- /* Try setting the flags as given. */
- if (ioctl(myfd, EXT2_IOC_GETFLAGS, &oldflags) >= 0) {
- newflags = (oldflags & ~clear) | set;
- if (ioctl(myfd, EXT2_IOC_SETFLAGS, &newflags) >= 0)
- goto cleanup;
- if (errno != EPERM)
- goto fail;
- }
- /* If we couldn't set all the flags, try again with a subset. */
- if (ioctl(myfd, EXT2_IOC_GETFLAGS, &oldflags) >= 0) {
- newflags &= ~sf_mask;
- oldflags &= sf_mask;
- newflags |= oldflags;
- if (ioctl(myfd, EXT2_IOC_SETFLAGS, &newflags) >= 0)
- goto cleanup;
- }
- /* We couldn't set the flags, so report the failure. */
-fail:
- archive_set_error(&a->archive, errno,
- "Failed to set file flags");
- ret = ARCHIVE_WARN;
-cleanup:
- if (fd < 0)
- close(myfd);
- return (ret);
-}
-
-#else
-
-/*
- * Of course, some systems have neither BSD chflags() nor Linux' flags
- * support through ioctl().
- */
-static int
-set_fflags_platform(struct archive_write_disk *a, int fd, const char *name,
- mode_t mode, unsigned long set, unsigned long clear)
-{
- (void)a; /* UNUSED */
- (void)fd; /* UNUSED */
- (void)name; /* UNUSED */
- (void)mode; /* UNUSED */
- (void)set; /* UNUSED */
- (void)clear; /* UNUSED */
- return (ARCHIVE_OK);
-}
-
-#endif /* __linux */
-
-#ifndef HAVE_POSIX_ACL
-/* Default empty function body to satisfy mainline code. */
-static int
-set_acls(struct archive_write_disk *a)
-{
- (void)a; /* UNUSED */
- return (ARCHIVE_OK);
-}
-
-#else
-
-/*
- * XXX TODO: What about ACL types other than ACCESS and DEFAULT?
- */
-static int
-set_acls(struct archive_write_disk *a)
-{
- int ret;
-
- ret = set_acl(a, a->fd, a->entry, ACL_TYPE_ACCESS,
- ARCHIVE_ENTRY_ACL_TYPE_ACCESS, "access");
- if (ret != ARCHIVE_OK)
- return (ret);
- ret = set_acl(a, a->fd, a->entry, ACL_TYPE_DEFAULT,
- ARCHIVE_ENTRY_ACL_TYPE_DEFAULT, "default");
- return (ret);
-}
-
-
-static int
-set_acl(struct archive_write_disk *a, int fd, struct archive_entry *entry,
- acl_type_t acl_type, int ae_requested_type, const char *tname)
-{
- acl_t acl;
- acl_entry_t acl_entry;
- acl_permset_t acl_permset;
- int ret;
- int ae_type, ae_permset, ae_tag, ae_id;
- uid_t ae_uid;
- gid_t ae_gid;
- const char *ae_name;
- int entries;
- const char *name;
-
- ret = ARCHIVE_OK;
- entries = archive_entry_acl_reset(entry, ae_requested_type);
- if (entries == 0)
- return (ARCHIVE_OK);
- acl = acl_init(entries);
- while (archive_entry_acl_next(entry, ae_requested_type, &ae_type,
- &ae_permset, &ae_tag, &ae_id, &ae_name) == ARCHIVE_OK) {
- acl_create_entry(&acl, &acl_entry);
-
- switch (ae_tag) {
- case ARCHIVE_ENTRY_ACL_USER:
- acl_set_tag_type(acl_entry, ACL_USER);
- ae_uid = a->lookup_uid(a->lookup_uid_data,
- ae_name, ae_id);
- acl_set_qualifier(acl_entry, &ae_uid);
- break;
- case ARCHIVE_ENTRY_ACL_GROUP:
- acl_set_tag_type(acl_entry, ACL_GROUP);
- ae_gid = a->lookup_gid(a->lookup_gid_data,
- ae_name, ae_id);
- acl_set_qualifier(acl_entry, &ae_gid);
- break;
- case ARCHIVE_ENTRY_ACL_USER_OBJ:
- acl_set_tag_type(acl_entry, ACL_USER_OBJ);
- break;
- case ARCHIVE_ENTRY_ACL_GROUP_OBJ:
- acl_set_tag_type(acl_entry, ACL_GROUP_OBJ);
- break;
- case ARCHIVE_ENTRY_ACL_MASK:
- acl_set_tag_type(acl_entry, ACL_MASK);
- break;
- case ARCHIVE_ENTRY_ACL_OTHER:
- acl_set_tag_type(acl_entry, ACL_OTHER);
- break;
- default:
- /* XXX */
- break;
- }
-
- acl_get_permset(acl_entry, &acl_permset);
- acl_clear_perms(acl_permset);
- if (ae_permset & ARCHIVE_ENTRY_ACL_EXECUTE)
- acl_add_perm(acl_permset, ACL_EXECUTE);
- if (ae_permset & ARCHIVE_ENTRY_ACL_WRITE)
- acl_add_perm(acl_permset, ACL_WRITE);
- if (ae_permset & ARCHIVE_ENTRY_ACL_READ)
- acl_add_perm(acl_permset, ACL_READ);
- }
-
- name = archive_entry_pathname(entry);
-
- /* Try restoring the ACL through 'fd' if we can. */
-#if HAVE_ACL_SET_FD
- if (fd >= 0 && acl_type == ACL_TYPE_ACCESS && acl_set_fd(fd, acl) == 0)
- ret = ARCHIVE_OK;
- else
-#else
-#if HAVE_ACL_SET_FD_NP
- if (fd >= 0 && acl_set_fd_np(fd, acl, acl_type) == 0)
- ret = ARCHIVE_OK;
- else
-#endif
-#endif
- if (acl_set_file(name, acl_type, acl) != 0) {
- archive_set_error(&a->archive, errno, "Failed to set %s acl", tname);
- ret = ARCHIVE_WARN;
- }
- acl_free(acl);
- return (ret);
-}
-#endif
-
-#if HAVE_LSETXATTR
-/*
- * Restore extended attributes - Linux implementation
- */
-static int
-set_xattrs(struct archive_write_disk *a)
-{
- struct archive_entry *entry = a->entry;
- static int warning_done = 0;
- int ret = ARCHIVE_OK;
- int i = archive_entry_xattr_reset(entry);
-
- while (i--) {
- const char *name;
- const void *value;
- size_t size;
- archive_entry_xattr_next(entry, &name, &value, &size);
- if (name != NULL &&
- strncmp(name, "xfsroot.", 8) != 0 &&
- strncmp(name, "system.", 7) != 0) {
- int e;
-#if HAVE_FSETXATTR
- if (a->fd >= 0)
- e = fsetxattr(a->fd, name, value, size, 0);
- else
-#endif
- {
- e = lsetxattr(archive_entry_pathname(entry),
- name, value, size, 0);
- }
- if (e == -1) {
- if (errno == ENOTSUP) {
- if (!warning_done) {
- warning_done = 1;
- archive_set_error(&a->archive, errno,
- "Cannot restore extended "
- "attributes on this file "
- "system");
- }
- } else
- archive_set_error(&a->archive, errno,
- "Failed to set extended attribute");
- ret = ARCHIVE_WARN;
- }
- } else {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
- "Invalid extended attribute encountered");
- ret = ARCHIVE_WARN;
- }
- }
- return (ret);
-}
-#elif HAVE_EXTATTR_SET_FILE && HAVE_DECL_EXTATTR_NAMESPACE_USER
-/*
- * Restore extended attributes - FreeBSD implementation
- */
-static int
-set_xattrs(struct archive_write_disk *a)
-{
- struct archive_entry *entry = a->entry;
- static int warning_done = 0;
- int ret = ARCHIVE_OK;
- int i = archive_entry_xattr_reset(entry);
-
- while (i--) {
- const char *name;
- const void *value;
- size_t size;
- archive_entry_xattr_next(entry, &name, &value, &size);
- if (name != NULL) {
- int e;
- int namespace;
-
- if (strncmp(name, "user.", 5) == 0) {
- /* "user." attributes go to user namespace */
- name += 5;
- namespace = EXTATTR_NAMESPACE_USER;
- } else {
- /* Warn about other extended attributes. */
- archive_set_error(&a->archive,
- ARCHIVE_ERRNO_FILE_FORMAT,
- "Can't restore extended attribute ``%s''",
- name);
- ret = ARCHIVE_WARN;
- continue;
- }
- errno = 0;
-#if HAVE_EXTATTR_SET_FD
- if (a->fd >= 0)
- e = extattr_set_fd(a->fd, namespace, name, value, size);
- else
-#endif
- /* TODO: should we use extattr_set_link() instead? */
- {
- e = extattr_set_file(archive_entry_pathname(entry),
- namespace, name, value, size);
- }
- if (e != (int)size) {
- if (errno == ENOTSUP) {
- if (!warning_done) {
- warning_done = 1;
- archive_set_error(&a->archive, errno,
- "Cannot restore extended "
- "attributes on this file "
- "system");
- }
- } else {
- archive_set_error(&a->archive, errno,
- "Failed to set extended attribute");
- }
-
- ret = ARCHIVE_WARN;
- }
- }
- }
- return (ret);
-}
-#else
-/*
- * Restore extended attributes - stub implementation for unsupported systems
- */
-static int
-set_xattrs(struct archive_write_disk *a)
-{
- static int warning_done = 0;
-
- /* If there aren't any extended attributes, then it's okay not
- * to extract them, otherwise, issue a single warning. */
- if (archive_entry_xattr_count(a->entry) != 0 && !warning_done) {
- warning_done = 1;
- archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
- "Cannot restore extended attributes on this system");
- return (ARCHIVE_WARN);
- }
- /* Warning was already emitted; suppress further warnings. */
- return (ARCHIVE_OK);
-}
-#endif
-
-
-/*
- * Trivial implementations of gid/uid lookup functions.
- * These are normally overridden by the client, but these stub
- * versions ensure that we always have something that works.
- */
-static gid_t
-trivial_lookup_gid(void *private_data, const char *gname, gid_t gid)
-{
- (void)private_data; /* UNUSED */
- (void)gname; /* UNUSED */
- return (gid);
-}
-
-static uid_t
-trivial_lookup_uid(void *private_data, const char *uname, uid_t uid)
-{
- (void)private_data; /* UNUSED */
- (void)uname; /* UNUSED */
- return (uid);
-}
-
-/*
- * Test if file on disk is older than entry.
- */
-static int
-older(struct stat *st, struct archive_entry *entry)
-{
- /* First, test the seconds and return if we have a definite answer. */
- /* Definitely older. */
- if (st->st_mtime < archive_entry_mtime(entry))
- return (1);
- /* Definitely younger. */
- if (st->st_mtime > archive_entry_mtime(entry))
- return (0);
- /* If this platform supports fractional seconds, try those. */
-#if HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC
- /* Definitely older. */
- if (st->st_mtimespec.tv_nsec < archive_entry_mtime_nsec(entry))
- return (1);
-#elif HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC
- /* Definitely older. */
- if (st->st_mtim.tv_nsec < archive_entry_mtime_nsec(entry))
- return (1);
-#elif HAVE_STRUCT_STAT_ST_MTIME_N
- /* older. */
- if (st->st_mtime_n < archive_entry_mtime_nsec(entry))
- return (1);
-#elif HAVE_STRUCT_STAT_ST_UMTIME
- /* older. */
- if (st->st_umtime * 1000 < archive_entry_mtime_nsec(entry))
- return (1);
-#elif HAVE_STRUCT_STAT_ST_MTIME_USEC
- /* older. */
- if (st->st_mtime_usec * 1000 < archive_entry_mtime_nsec(entry))
- return (1);
-#else
- /* This system doesn't have high-res timestamps. */
-#endif
- /* Same age or newer, so not older. */
- return (0);
-}
diff --git a/lib/libarchive/archive_write_set_compression_xz.c b/lib/libarchive/archive_write_set_compression_xz.c
deleted file mode 100644
index d97bca7..0000000
--- a/lib/libarchive/archive_write_set_compression_xz.c
+++ /dev/null
@@ -1,438 +0,0 @@
-/*-
- * Copyright (c) 2009 Michihiro NAKAJIMA
- * Copyright (c) 2003-2007 Tim Kientzle
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "archive_platform.h"
-
-__FBSDID("$FreeBSD$");
-
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-#include <time.h>
-#ifdef HAVE_LZMA_H
-#include <lzma.h>
-#endif
-
-#include "archive.h"
-#include "archive_private.h"
-#include "archive_write_private.h"
-
-#ifndef HAVE_LZMA_H
-int
-archive_write_set_compression_xz(struct archive *a)
-{
- archive_set_error(a, ARCHIVE_ERRNO_MISC,
- "xz compression not supported on this platform");
- return (ARCHIVE_FATAL);
-}
-
-int
-archive_write_set_compression_lzma(struct archive *a)
-{
- archive_set_error(a, ARCHIVE_ERRNO_MISC,
- "lzma compression not supported on this platform");
- return (ARCHIVE_FATAL);
-}
-#else
-/* Don't compile this if we don't have liblzma. */
-
-struct private_data {
- lzma_stream stream;
- lzma_filter lzmafilters[2];
- lzma_options_lzma lzma_opt;
- int64_t total_in;
- unsigned char *compressed;
- size_t compressed_buffer_size;
-};
-
-struct private_config {
- int compression_level;
-};
-
-static int archive_compressor_xz_init(struct archive_write *);
-static int archive_compressor_xz_options(struct archive_write *,
- const char *, const char *);
-static int archive_compressor_xz_finish(struct archive_write *);
-static int archive_compressor_xz_write(struct archive_write *,
- const void *, size_t);
-static int drive_compressor(struct archive_write *, struct private_data *,
- int finishing);
-
-
-/*
- * Allocate, initialize and return a archive object.
- */
-int
-archive_write_set_compression_xz(struct archive *_a)
-{
- struct private_config *config;
- struct archive_write *a = (struct archive_write *)_a;
- __archive_check_magic(&a->archive, ARCHIVE_WRITE_MAGIC,
- ARCHIVE_STATE_NEW, "archive_write_set_compression_xz");
- config = calloc(1, sizeof(*config));
- if (config == NULL) {
- archive_set_error(&a->archive, ENOMEM, "Out of memory");
- return (ARCHIVE_FATAL);
- }
- a->compressor.config = config;
- a->compressor.finish = archive_compressor_xz_finish;
- config->compression_level = LZMA_PRESET_DEFAULT;
- a->compressor.init = &archive_compressor_xz_init;
- a->compressor.options = &archive_compressor_xz_options;
- a->archive.compression_code = ARCHIVE_COMPRESSION_XZ;
- a->archive.compression_name = "xz";
- return (ARCHIVE_OK);
-}
-
-/* LZMA is handled identically, we just need a different compression
- * code set. (The liblzma setup looks at the code to determine
- * the one place that XZ and LZMA require different handling.) */
-int
-archive_write_set_compression_lzma(struct archive *_a)
-{
- struct archive_write *a = (struct archive_write *)_a;
- int r = archive_write_set_compression_xz(_a);
- if (r != ARCHIVE_OK)
- return (r);
- a->archive.compression_code = ARCHIVE_COMPRESSION_LZMA;
- a->archive.compression_name = "lzma";
- return (ARCHIVE_OK);
-}
-
-static int
-archive_compressor_xz_init_stream(struct archive_write *a,
- struct private_data *state)
-{
- int ret;
-
- state->stream = (lzma_stream)LZMA_STREAM_INIT;
- state->stream.next_out = state->compressed;
- state->stream.avail_out = state->compressed_buffer_size;
- if (a->archive.compression_code == ARCHIVE_COMPRESSION_XZ)
- ret = lzma_stream_encoder(&(state->stream),
- state->lzmafilters, LZMA_CHECK_CRC64);
- else
- ret = lzma_alone_encoder(&(state->stream), &state->lzma_opt);
- if (ret == LZMA_OK)
- return (ARCHIVE_OK);
-
- switch (ret) {
- case LZMA_MEM_ERROR:
- archive_set_error(&a->archive, ENOMEM,
- "Internal error initializing compression library: "
- "Cannot allocate memory");
- break;
- default:
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "Internal error initializing compression library: "
- "It's a bug in liblzma");
- break;
- }
- return (ARCHIVE_FATAL);
-}
-
-/*
- * Setup callback.
- */
-static int
-archive_compressor_xz_init(struct archive_write *a)
-{
- int ret;
- struct private_data *state;
- struct private_config *config;
-
- if (a->client_opener != NULL) {
- ret = (a->client_opener)(&a->archive, a->client_data);
- if (ret != ARCHIVE_OK)
- return (ret);
- }
-
- state = (struct private_data *)malloc(sizeof(*state));
- if (state == NULL) {
- archive_set_error(&a->archive, ENOMEM,
- "Can't allocate data for compression");
- return (ARCHIVE_FATAL);
- }
- memset(state, 0, sizeof(*state));
- config = a->compressor.config;
-
- /*
- * See comment above. We should set compressed_buffer_size to
- * max(bytes_per_block, 65536), but the code can't handle that yet.
- */
- state->compressed_buffer_size = a->bytes_per_block;
- state->compressed = (unsigned char *)malloc(state->compressed_buffer_size);
- if (state->compressed == NULL) {
- archive_set_error(&a->archive, ENOMEM,
- "Can't allocate data for compression buffer");
- free(state);
- return (ARCHIVE_FATAL);
- }
- a->compressor.write = archive_compressor_xz_write;
-
- /* Initialize compression library. */
- if (lzma_lzma_preset(&state->lzma_opt, config->compression_level)) {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "Internal error initializing compression library");
- free(state->compressed);
- free(state);
- }
- state->lzmafilters[0].id = LZMA_FILTER_LZMA2;
- state->lzmafilters[0].options = &state->lzma_opt;
- state->lzmafilters[1].id = LZMA_VLI_UNKNOWN;/* Terminate */
- ret = archive_compressor_xz_init_stream(a, state);
- if (ret == LZMA_OK) {
- a->compressor.data = state;
- return (0);
- }
- /* Library setup failed: clean up. */
- free(state->compressed);
- free(state);
-
- return (ARCHIVE_FATAL);
-}
-
-/*
- * Set write options.
- */
-static int
-archive_compressor_xz_options(struct archive_write *a, const char *key,
- const char *value)
-{
- struct private_config *config;
-
- config = (struct private_config *)a->compressor.config;
- if (strcmp(key, "compression-level") == 0) {
- if (value == NULL || !(value[0] >= '0' && value[0] <= '9') ||
- value[1] != '\0')
- return (ARCHIVE_WARN);
- config->compression_level = value[0] - '0';
- if (config->compression_level > 6)
- config->compression_level = 6;
- return (ARCHIVE_OK);
- }
-
- return (ARCHIVE_WARN);
-}
-
-/*
- * Write data to the compressed stream.
- */
-static int
-archive_compressor_xz_write(struct archive_write *a, const void *buff,
- size_t length)
-{
- struct private_data *state;
- int ret;
-
- state = (struct private_data *)a->compressor.data;
- if (a->client_writer == NULL) {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_PROGRAMMER,
- "No write callback is registered? "
- "This is probably an internal programming error.");
- return (ARCHIVE_FATAL);
- }
-
- /* Update statistics */
- state->total_in += length;
-
- /* Compress input data to output buffer */
- state->stream.next_in = buff;
- state->stream.avail_in = length;
- if ((ret = drive_compressor(a, state, 0)) != ARCHIVE_OK)
- return (ret);
-
- a->archive.file_position += length;
- return (ARCHIVE_OK);
-}
-
-
-/*
- * Finish the compression...
- */
-static int
-archive_compressor_xz_finish(struct archive_write *a)
-{
- ssize_t block_length, target_block_length, bytes_written;
- int ret;
- struct private_data *state;
- unsigned tocopy;
-
- ret = ARCHIVE_OK;
- state = (struct private_data *)a->compressor.data;
- if (state != NULL) {
- if (a->client_writer == NULL) {
- archive_set_error(&a->archive,
- ARCHIVE_ERRNO_PROGRAMMER,
- "No write callback is registered? "
- "This is probably an internal programming error.");
- ret = ARCHIVE_FATAL;
- goto cleanup;
- }
-
- /* By default, always pad the uncompressed data. */
- if (a->pad_uncompressed) {
- tocopy = a->bytes_per_block -
- (state->total_in % a->bytes_per_block);
- while (tocopy > 0 && tocopy < (unsigned)a->bytes_per_block) {
- state->stream.next_in = a->nulls;
- state->stream.avail_in = tocopy < a->null_length ?
- tocopy : a->null_length;
- state->total_in += state->stream.avail_in;
- tocopy -= state->stream.avail_in;
- ret = drive_compressor(a, state, 0);
- if (ret != ARCHIVE_OK)
- goto cleanup;
- }
- }
-
- /* Finish compression cycle */
- if (((ret = drive_compressor(a, state, 1))) != ARCHIVE_OK)
- goto cleanup;
-
- /* Optionally, pad the final compressed block. */
- block_length = state->stream.next_out - state->compressed;
-
- /* Tricky calculation to determine size of last block. */
- if (a->bytes_in_last_block <= 0)
- /* Default or Zero: pad to full block */
- target_block_length = a->bytes_per_block;
- else
- /* Round length to next multiple of bytes_in_last_block. */
- target_block_length = a->bytes_in_last_block *
- ( (block_length + a->bytes_in_last_block - 1) /
- a->bytes_in_last_block);
- if (target_block_length > a->bytes_per_block)
- target_block_length = a->bytes_per_block;
- if (block_length < target_block_length) {
- memset(state->stream.next_out, 0,
- target_block_length - block_length);
- block_length = target_block_length;
- }
-
- /* Write the last block */
- bytes_written = (a->client_writer)(&a->archive, a->client_data,
- state->compressed, block_length);
- if (bytes_written <= 0) {
- ret = ARCHIVE_FATAL;
- goto cleanup;
- }
- a->archive.raw_position += bytes_written;
-
- /* Cleanup: shut down compressor, release memory, etc. */
- cleanup:
- lzma_end(&(state->stream));
- free(state->compressed);
- free(state);
- }
- free(a->compressor.config);
- a->compressor.config = NULL;
- return (ret);
-}
-
-/*
- * Utility function to push input data through compressor,
- * writing full output blocks as necessary.
- *
- * Note that this handles both the regular write case (finishing ==
- * false) and the end-of-archive case (finishing == true).
- */
-static int
-drive_compressor(struct archive_write *a, struct private_data *state, int finishing)
-{
- ssize_t bytes_written;
- int ret;
-
- for (;;) {
- if (state->stream.avail_out == 0) {
- bytes_written = (a->client_writer)(&a->archive,
- a->client_data, state->compressed,
- state->compressed_buffer_size);
- if (bytes_written <= 0) {
- /* TODO: Handle this write failure */
- return (ARCHIVE_FATAL);
- } else if ((size_t)bytes_written < state->compressed_buffer_size) {
- /* Short write: Move remaining to
- * front of block and keep filling */
- memmove(state->compressed,
- state->compressed + bytes_written,
- state->compressed_buffer_size - bytes_written);
- }
- a->archive.raw_position += bytes_written;
- state->stream.next_out
- = state->compressed +
- state->compressed_buffer_size - bytes_written;
- state->stream.avail_out = bytes_written;
- }
-
- /* If there's nothing to do, we're done. */
- if (!finishing && state->stream.avail_in == 0)
- return (ARCHIVE_OK);
-
- ret = lzma_code(&(state->stream),
- finishing ? LZMA_FINISH : LZMA_RUN );
-
- switch (ret) {
- case LZMA_OK:
- /* In non-finishing case, check if compressor
- * consumed everything */
- if (!finishing && state->stream.avail_in == 0)
- return (ARCHIVE_OK);
- /* In finishing case, this return always means
- * there's more work */
- break;
- case LZMA_STREAM_END:
- /* This return can only occur in finishing case. */
- if (finishing)
- return (ARCHIVE_OK);
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "lzma compression data error");
- return (ARCHIVE_FATAL);
- case LZMA_MEMLIMIT_ERROR:
- archive_set_error(&a->archive, ENOMEM,
- "lzma compression error: "
- "%ju MiB would have been needed",
- (uintmax_t)((lzma_memusage(&(state->stream)) + 1024 * 1024 -1)
- / (1024 * 1024)));
- return (ARCHIVE_FATAL);
- default:
- /* Any other return value indicates an error. */
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "lzma compression failed:"
- " lzma_code() call returned status %d",
- ret);
- return (ARCHIVE_FATAL);
- }
- }
-}
-
-#endif /* HAVE_LZMA_H */
diff --git a/lib/libarchive/archive_write_set_format_ar.c b/lib/libarchive/archive_write_set_format_ar.c
deleted file mode 100644
index bffe07c..0000000
--- a/lib/libarchive/archive_write_set_format_ar.c
+++ /dev/null
@@ -1,550 +0,0 @@
-/*-
- * Copyright (c) 2007 Kai Wang
- * Copyright (c) 2007 Tim Kientzle
- * 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
- * in this position and unchanged.
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "archive_platform.h"
-__FBSDID("$FreeBSD$");
-
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-
-#include "archive.h"
-#include "archive_entry.h"
-#include "archive_private.h"
-#include "archive_write_private.h"
-
-struct ar_w {
- uint64_t entry_bytes_remaining;
- uint64_t entry_padding;
- int is_strtab;
- int has_strtab;
- char *strtab;
-};
-
-/*
- * Define structure of the "ar" header.
- */
-#define AR_name_offset 0
-#define AR_name_size 16
-#define AR_date_offset 16
-#define AR_date_size 12
-#define AR_uid_offset 28
-#define AR_uid_size 6
-#define AR_gid_offset 34
-#define AR_gid_size 6
-#define AR_mode_offset 40
-#define AR_mode_size 8
-#define AR_size_offset 48
-#define AR_size_size 10
-#define AR_fmag_offset 58
-#define AR_fmag_size 2
-
-static int archive_write_set_format_ar(struct archive_write *);
-static int archive_write_ar_header(struct archive_write *,
- struct archive_entry *);
-static ssize_t archive_write_ar_data(struct archive_write *,
- const void *buff, size_t s);
-static int archive_write_ar_destroy(struct archive_write *);
-static int archive_write_ar_finish(struct archive_write *);
-static int archive_write_ar_finish_entry(struct archive_write *);
-static const char *ar_basename(const char *path);
-static int format_octal(int64_t v, char *p, int s);
-static int format_decimal(int64_t v, char *p, int s);
-
-int
-archive_write_set_format_ar_bsd(struct archive *_a)
-{
- struct archive_write *a = (struct archive_write *)_a;
- int r = archive_write_set_format_ar(a);
- if (r == ARCHIVE_OK) {
- a->archive.archive_format = ARCHIVE_FORMAT_AR_BSD;
- a->archive.archive_format_name = "ar (BSD)";
- }
- return (r);
-}
-
-int
-archive_write_set_format_ar_svr4(struct archive *_a)
-{
- struct archive_write *a = (struct archive_write *)_a;
- int r = archive_write_set_format_ar(a);
- if (r == ARCHIVE_OK) {
- a->archive.archive_format = ARCHIVE_FORMAT_AR_GNU;
- a->archive.archive_format_name = "ar (GNU/SVR4)";
- }
- return (r);
-}
-
-/*
- * Generic initialization.
- */
-static int
-archive_write_set_format_ar(struct archive_write *a)
-{
- struct ar_w *ar;
-
- /* If someone else was already registered, unregister them. */
- if (a->format_destroy != NULL)
- (a->format_destroy)(a);
-
- ar = (struct ar_w *)malloc(sizeof(*ar));
- if (ar == NULL) {
- archive_set_error(&a->archive, ENOMEM, "Can't allocate ar data");
- return (ARCHIVE_FATAL);
- }
- memset(ar, 0, sizeof(*ar));
- a->format_data = ar;
-
- a->format_name = "ar";
- a->format_write_header = archive_write_ar_header;
- a->format_write_data = archive_write_ar_data;
- a->format_finish = archive_write_ar_finish;
- a->format_destroy = archive_write_ar_destroy;
- a->format_finish_entry = archive_write_ar_finish_entry;
- return (ARCHIVE_OK);
-}
-
-static int
-archive_write_ar_header(struct archive_write *a, struct archive_entry *entry)
-{
- int ret, append_fn;
- char buff[60];
- char *ss, *se;
- struct ar_w *ar;
- const char *pathname;
- const char *filename;
- int64_t size;
-
- append_fn = 0;
- ar = (struct ar_w *)a->format_data;
- ar->is_strtab = 0;
- filename = NULL;
- size = archive_entry_size(entry);
-
-
- /*
- * Reject files with empty name.
- */
- pathname = archive_entry_pathname(entry);
- if (*pathname == '\0') {
- archive_set_error(&a->archive, EINVAL,
- "Invalid filename");
- return (ARCHIVE_WARN);
- }
-
- /*
- * If we are now at the beginning of the archive,
- * we need first write the ar global header.
- */
- if (a->archive.file_position == 0)
- (a->compressor.write)(a, "!<arch>\n", 8);
-
- memset(buff, ' ', 60);
- strncpy(&buff[AR_fmag_offset], "`\n", 2);
-
- if (strcmp(pathname, "/") == 0 ) {
- /* Entry is archive symbol table in GNU format */
- buff[AR_name_offset] = '/';
- goto stat;
- }
- if (strcmp(pathname, "__.SYMDEF") == 0) {
- /* Entry is archive symbol table in BSD format */
- strncpy(buff + AR_name_offset, "__.SYMDEF", 9);
- goto stat;
- }
- if (strcmp(pathname, "//") == 0) {
- /*
- * Entry is archive filename table, inform that we should
- * collect strtab in next _data call.
- */
- ar->is_strtab = 1;
- buff[AR_name_offset] = buff[AR_name_offset + 1] = '/';
- /*
- * For archive string table, only ar_size filed should
- * be set.
- */
- goto size;
- }
-
- /*
- * Otherwise, entry is a normal archive member.
- * Strip leading paths from filenames, if any.
- */
- if ((filename = ar_basename(pathname)) == NULL) {
- /* Reject filenames with trailing "/" */
- archive_set_error(&a->archive, EINVAL,
- "Invalid filename");
- return (ARCHIVE_WARN);
- }
-
- if (a->archive.archive_format == ARCHIVE_FORMAT_AR_GNU) {
- /*
- * SVR4/GNU variant use a "/" to mark then end of the filename,
- * make it possible to have embedded spaces in the filename.
- * So, the longest filename here (without extension) is
- * actually 15 bytes.
- */
- if (strlen(filename) <= 15) {
- strncpy(&buff[AR_name_offset],
- filename, strlen(filename));
- buff[AR_name_offset + strlen(filename)] = '/';
- } else {
- /*
- * For filename longer than 15 bytes, GNU variant
- * makes use of a string table and instead stores the
- * offset of the real filename to in the ar_name field.
- * The string table should have been written before.
- */
- if (ar->has_strtab <= 0) {
- archive_set_error(&a->archive, EINVAL,
- "Can't find string table");
- return (ARCHIVE_WARN);
- }
-
- se = (char *)malloc(strlen(filename) + 3);
- if (se == NULL) {
- archive_set_error(&a->archive, ENOMEM,
- "Can't allocate filename buffer");
- return (ARCHIVE_FATAL);
- }
-
- strncpy(se, filename, strlen(filename));
- strcpy(se + strlen(filename), "/\n");
-
- ss = strstr(ar->strtab, se);
- free(se);
-
- if (ss == NULL) {
- archive_set_error(&a->archive, EINVAL,
- "Invalid string table");
- return (ARCHIVE_WARN);
- }
-
- /*
- * GNU variant puts "/" followed by digits into
- * ar_name field. These digits indicates the real
- * filename string's offset to the string table.
- */
- buff[AR_name_offset] = '/';
- if (format_decimal(ss - ar->strtab,
- buff + AR_name_offset + 1,
- AR_name_size - 1)) {
- archive_set_error(&a->archive, ERANGE,
- "string table offset too large");
- return (ARCHIVE_WARN);
- }
- }
- } else if (a->archive.archive_format == ARCHIVE_FORMAT_AR_BSD) {
- /*
- * BSD variant: for any file name which is more than
- * 16 chars or contains one or more embedded space(s), the
- * string "#1/" followed by the ASCII length of the name is
- * put into the ar_name field. The file size (stored in the
- * ar_size field) is incremented by the length of the name.
- * The name is then written immediately following the
- * archive header.
- */
- if (strlen(filename) <= 16 && strchr(filename, ' ') == NULL) {
- strncpy(&buff[AR_name_offset], filename, strlen(filename));
- buff[AR_name_offset + strlen(filename)] = ' ';
- }
- else {
- strncpy(buff + AR_name_offset, "#1/", 3);
- if (format_decimal(strlen(filename),
- buff + AR_name_offset + 3,
- AR_name_size - 3)) {
- archive_set_error(&a->archive, ERANGE,
- "File name too long");
- return (ARCHIVE_WARN);
- }
- append_fn = 1;
- size += strlen(filename);
- }
- }
-
-stat:
- if (format_decimal(archive_entry_mtime(entry), buff + AR_date_offset, AR_date_size)) {
- archive_set_error(&a->archive, ERANGE,
- "File modification time too large");
- return (ARCHIVE_WARN);
- }
- if (format_decimal(archive_entry_uid(entry), buff + AR_uid_offset, AR_uid_size)) {
- archive_set_error(&a->archive, ERANGE,
- "Numeric user ID too large");
- return (ARCHIVE_WARN);
- }
- if (format_decimal(archive_entry_gid(entry), buff + AR_gid_offset, AR_gid_size)) {
- archive_set_error(&a->archive, ERANGE,
- "Numeric group ID too large");
- return (ARCHIVE_WARN);
- }
- if (format_octal(archive_entry_mode(entry), buff + AR_mode_offset, AR_mode_size)) {
- archive_set_error(&a->archive, ERANGE,
- "Numeric mode too large");
- return (ARCHIVE_WARN);
- }
- /*
- * Sanity Check: A non-pseudo archive member should always be
- * a regular file.
- */
- if (filename != NULL && archive_entry_filetype(entry) != AE_IFREG) {
- archive_set_error(&a->archive, EINVAL,
- "Regular file required for non-pseudo member");
- return (ARCHIVE_WARN);
- }
-
-size:
- if (format_decimal(size, buff + AR_size_offset, AR_size_size)) {
- archive_set_error(&a->archive, ERANGE,
- "File size out of range");
- return (ARCHIVE_WARN);
- }
-
- ret = (a->compressor.write)(a, buff, 60);
- if (ret != ARCHIVE_OK)
- return (ret);
-
- ar->entry_bytes_remaining = size;
- ar->entry_padding = ar->entry_bytes_remaining % 2;
-
- if (append_fn > 0) {
- ret = (a->compressor.write)(a, filename, strlen(filename));
- if (ret != ARCHIVE_OK)
- return (ret);
- ar->entry_bytes_remaining -= strlen(filename);
- }
-
- return (ARCHIVE_OK);
-}
-
-static ssize_t
-archive_write_ar_data(struct archive_write *a, const void *buff, size_t s)
-{
- struct ar_w *ar;
- int ret;
-
- ar = (struct ar_w *)a->format_data;
- if (s > ar->entry_bytes_remaining)
- s = ar->entry_bytes_remaining;
-
- if (ar->is_strtab > 0) {
- if (ar->has_strtab > 0) {
- archive_set_error(&a->archive, EINVAL,
- "More than one string tables exist");
- return (ARCHIVE_WARN);
- }
-
- ar->strtab = (char *)malloc(s);
- if (ar->strtab == NULL) {
- archive_set_error(&a->archive, ENOMEM,
- "Can't allocate strtab buffer");
- return (ARCHIVE_FATAL);
- }
- strncpy(ar->strtab, buff, s);
- ar->has_strtab = 1;
- }
-
- ret = (a->compressor.write)(a, buff, s);
- if (ret != ARCHIVE_OK)
- return (ret);
-
- ar->entry_bytes_remaining -= s;
- return (s);
-}
-
-static int
-archive_write_ar_destroy(struct archive_write *a)
-{
- struct ar_w *ar;
-
- ar = (struct ar_w *)a->format_data;
-
- if (ar == NULL)
- return (ARCHIVE_OK);
-
- if (ar->has_strtab > 0) {
- free(ar->strtab);
- ar->strtab = NULL;
- }
-
- free(ar);
- a->format_data = NULL;
- return (ARCHIVE_OK);
-}
-
-static int
-archive_write_ar_finish(struct archive_write *a)
-{
- int ret;
-
- /*
- * If we haven't written anything yet, we need to write
- * the ar global header now to make it a valid ar archive.
- */
- if (a->archive.file_position == 0) {
- ret = (a->compressor.write)(a, "!<arch>\n", 8);
- return (ret);
- }
-
- return (ARCHIVE_OK);
-}
-
-static int
-archive_write_ar_finish_entry(struct archive_write *a)
-{
- struct ar_w *ar;
- int ret;
-
- ar = (struct ar_w *)a->format_data;
-
- if (ar->entry_bytes_remaining != 0) {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "Entry remaining bytes larger than 0");
- return (ARCHIVE_WARN);
- }
-
- if (ar->entry_padding == 0) {
- return (ARCHIVE_OK);
- }
-
- if (ar->entry_padding != 1) {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "Padding wrong size: %d should be 1 or 0",
- ar->entry_padding);
- return (ARCHIVE_WARN);
- }
-
- ret = (a->compressor.write)(a, "\n", 1);
- return (ret);
-}
-
-/*
- * Format a number into the specified field using base-8.
- * NB: This version is slightly different from the one in
- * _ustar.c
- */
-static int
-format_octal(int64_t v, char *p, int s)
-{
- int len;
- char *h;
-
- len = s;
- h = p;
-
- /* Octal values can't be negative, so use 0. */
- if (v < 0) {
- while (len-- > 0)
- *p++ = '0';
- return (-1);
- }
-
- p += s; /* Start at the end and work backwards. */
- do {
- *--p = (char)('0' + (v & 7));
- v >>= 3;
- } while (--s > 0 && v > 0);
-
- if (v == 0) {
- memmove(h, p, len - s);
- p = h + len - s;
- while (s-- > 0)
- *p++ = ' ';
- return (0);
- }
- /* If it overflowed, fill field with max value. */
- while (len-- > 0)
- *p++ = '7';
-
- return (-1);
-}
-
-/*
- * Format a number into the specified field using base-10.
- */
-static int
-format_decimal(int64_t v, char *p, int s)
-{
- int len;
- char *h;
-
- len = s;
- h = p;
-
- /* Negative values in ar header are meaningless , so use 0. */
- if (v < 0) {
- while (len-- > 0)
- *p++ = '0';
- return (-1);
- }
-
- p += s;
- do {
- *--p = (char)('0' + (v % 10));
- v /= 10;
- } while (--s > 0 && v > 0);
-
- if (v == 0) {
- memmove(h, p, len - s);
- p = h + len - s;
- while (s-- > 0)
- *p++ = ' ';
- return (0);
- }
- /* If it overflowed, fill field with max value. */
- while (len-- > 0)
- *p++ = '9';
-
- return (-1);
-}
-
-static const char *
-ar_basename(const char *path)
-{
- const char *endp, *startp;
-
- endp = path + strlen(path) - 1;
- /*
- * For filename with trailing slash(es), we return
- * NULL indicating an error.
- */
- if (*endp == '/')
- return (NULL);
-
- /* Find the start of the base */
- startp = endp;
- while (startp > path && *(startp - 1) != '/')
- startp--;
-
- return (startp);
-}
diff --git a/lib/libarchive/archive_write_set_format_cpio.c b/lib/libarchive/archive_write_set_format_cpio.c
deleted file mode 100644
index 798646a..0000000
--- a/lib/libarchive/archive_write_set_format_cpio.c
+++ /dev/null
@@ -1,344 +0,0 @@
-/*-
- * Copyright (c) 2003-2007 Tim Kientzle
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "archive_platform.h"
-__FBSDID("$FreeBSD$");
-
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#include <stdio.h>
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-
-#include "archive.h"
-#include "archive_entry.h"
-#include "archive_private.h"
-#include "archive_write_private.h"
-
-static ssize_t archive_write_cpio_data(struct archive_write *,
- const void *buff, size_t s);
-static int archive_write_cpio_finish(struct archive_write *);
-static int archive_write_cpio_destroy(struct archive_write *);
-static int archive_write_cpio_finish_entry(struct archive_write *);
-static int archive_write_cpio_header(struct archive_write *,
- struct archive_entry *);
-static int format_octal(int64_t, void *, int);
-static int64_t format_octal_recursive(int64_t, char *, int);
-
-struct cpio {
- uint64_t entry_bytes_remaining;
-
- int64_t ino_next;
-
- struct { int64_t old; int new;} *ino_list;
- size_t ino_list_size;
- size_t ino_list_next;
-};
-
-struct cpio_header {
- char c_magic[6];
- char c_dev[6];
- char c_ino[6];
- char c_mode[6];
- char c_uid[6];
- char c_gid[6];
- char c_nlink[6];
- char c_rdev[6];
- char c_mtime[11];
- char c_namesize[6];
- char c_filesize[11];
-} __packed;
-
-/*
- * Set output format to 'cpio' format.
- */
-int
-archive_write_set_format_cpio(struct archive *_a)
-{
- struct archive_write *a = (struct archive_write *)_a;
- struct cpio *cpio;
-
- /* If someone else was already registered, unregister them. */
- if (a->format_destroy != NULL)
- (a->format_destroy)(a);
-
- cpio = (struct cpio *)malloc(sizeof(*cpio));
- if (cpio == NULL) {
- archive_set_error(&a->archive, ENOMEM, "Can't allocate cpio data");
- return (ARCHIVE_FATAL);
- }
- memset(cpio, 0, sizeof(*cpio));
- a->format_data = cpio;
-
- a->pad_uncompressed = 1;
- a->format_name = "cpio";
- a->format_write_header = archive_write_cpio_header;
- a->format_write_data = archive_write_cpio_data;
- a->format_finish_entry = archive_write_cpio_finish_entry;
- a->format_finish = archive_write_cpio_finish;
- a->format_destroy = archive_write_cpio_destroy;
- a->archive.archive_format = ARCHIVE_FORMAT_CPIO_POSIX;
- a->archive.archive_format_name = "POSIX cpio";
- return (ARCHIVE_OK);
-}
-
-/*
- * Ino values are as long as 64 bits on some systems; cpio format
- * only allows 18 bits and relies on the ino values to identify hardlinked
- * files. So, we can't merely "hash" the ino numbers since collisions
- * would corrupt the archive. Instead, we generate synthetic ino values
- * to store in the archive and maintain a map of original ino values to
- * synthetic ones so we can preserve hardlink information.
- *
- * TODO: Make this more efficient. It's not as bad as it looks (most
- * files don't have any hardlinks and we don't do any work here for those),
- * but it wouldn't be hard to do better.
- *
- * TODO: Work with dev/ino pairs here instead of just ino values.
- */
-static int
-synthesize_ino_value(struct cpio *cpio, struct archive_entry *entry)
-{
- int64_t ino = archive_entry_ino64(entry);
- int ino_new;
- size_t i;
-
- /*
- * If no index number was given, don't assign one. In
- * particular, this handles the end-of-archive marker
- * correctly by giving it a zero index value. (This is also
- * why we start our synthetic index numbers with one below.)
- */
- if (ino == 0)
- return (0);
-
- /* Don't store a mapping if we don't need to. */
- if (archive_entry_nlink(entry) < 2) {
- return ++cpio->ino_next;
- }
-
- /* Look up old ino; if we have it, this is a hardlink
- * and we reuse the same value. */
- for (i = 0; i < cpio->ino_list_next; ++i) {
- if (cpio->ino_list[i].old == ino)
- return (cpio->ino_list[i].new);
- }
-
- /* Assign a new index number. */
- ino_new = ++cpio->ino_next;
-
- /* Ensure space for the new mapping. */
- if (cpio->ino_list_size <= cpio->ino_list_next) {
- size_t newsize = cpio->ino_list_size < 512
- ? 512 : cpio->ino_list_size * 2;
- void *newlist = realloc(cpio->ino_list,
- sizeof(cpio->ino_list[0]) * newsize);
- if (newlist == NULL)
- return (-1);
-
- cpio->ino_list_size = newsize;
- cpio->ino_list = newlist;
- }
-
- /* Record and return the new value. */
- cpio->ino_list[cpio->ino_list_next].old = ino;
- cpio->ino_list[cpio->ino_list_next].new = ino_new;
- ++cpio->ino_list_next;
- return (ino_new);
-}
-
-static int
-archive_write_cpio_header(struct archive_write *a, struct archive_entry *entry)
-{
- struct cpio *cpio;
- const char *p, *path;
- int pathlength, ret, ret2;
- int64_t ino;
- struct cpio_header h;
-
- cpio = (struct cpio *)a->format_data;
- ret2 = ARCHIVE_OK;
-
- path = archive_entry_pathname(entry);
- pathlength = (int)strlen(path) + 1; /* Include trailing null. */
-
- memset(&h, 0, sizeof(h));
- format_octal(070707, &h.c_magic, sizeof(h.c_magic));
- format_octal(archive_entry_dev(entry), &h.c_dev, sizeof(h.c_dev));
-
- ino = synthesize_ino_value(cpio, entry);
- if (ino < 0) {
- archive_set_error(&a->archive, ENOMEM,
- "No memory for ino translation table");
- return (ARCHIVE_FATAL);
- } else if (ino > 0777777) {
- archive_set_error(&a->archive, ERANGE,
- "Too many files for this cpio format");
- return (ARCHIVE_FATAL);
- }
- format_octal(ino & 0777777, &h.c_ino, sizeof(h.c_ino));
-
- format_octal(archive_entry_mode(entry), &h.c_mode, sizeof(h.c_mode));
- format_octal(archive_entry_uid(entry), &h.c_uid, sizeof(h.c_uid));
- format_octal(archive_entry_gid(entry), &h.c_gid, sizeof(h.c_gid));
- format_octal(archive_entry_nlink(entry), &h.c_nlink, sizeof(h.c_nlink));
- if (archive_entry_filetype(entry) == AE_IFBLK
- || archive_entry_filetype(entry) == AE_IFCHR)
- format_octal(archive_entry_dev(entry), &h.c_rdev, sizeof(h.c_rdev));
- else
- format_octal(0, &h.c_rdev, sizeof(h.c_rdev));
- format_octal(archive_entry_mtime(entry), &h.c_mtime, sizeof(h.c_mtime));
- format_octal(pathlength, &h.c_namesize, sizeof(h.c_namesize));
-
- /* Non-regular files don't store bodies. */
- if (archive_entry_filetype(entry) != AE_IFREG)
- archive_entry_set_size(entry, 0);
-
- /* Symlinks get the link written as the body of the entry. */
- p = archive_entry_symlink(entry);
- if (p != NULL && *p != '\0')
- format_octal(strlen(p), &h.c_filesize, sizeof(h.c_filesize));
- else
- format_octal(archive_entry_size(entry),
- &h.c_filesize, sizeof(h.c_filesize));
-
- ret = (a->compressor.write)(a, &h, sizeof(h));
- if (ret != ARCHIVE_OK)
- return (ARCHIVE_FATAL);
-
- ret = (a->compressor.write)(a, path, pathlength);
- if (ret != ARCHIVE_OK)
- return (ARCHIVE_FATAL);
-
- cpio->entry_bytes_remaining = archive_entry_size(entry);
-
- /* Write the symlink now. */
- if (p != NULL && *p != '\0')
- ret = (a->compressor.write)(a, p, strlen(p));
-
- if (ret == ARCHIVE_OK)
- ret = ret2;
- return (ret);
-}
-
-static ssize_t
-archive_write_cpio_data(struct archive_write *a, const void *buff, size_t s)
-{
- struct cpio *cpio;
- int ret;
-
- cpio = (struct cpio *)a->format_data;
- if (s > cpio->entry_bytes_remaining)
- s = cpio->entry_bytes_remaining;
-
- ret = (a->compressor.write)(a, buff, s);
- cpio->entry_bytes_remaining -= s;
- if (ret >= 0)
- return (s);
- else
- return (ret);
-}
-
-/*
- * Format a number into the specified field.
- */
-static int
-format_octal(int64_t v, void *p, int digits)
-{
- int64_t max;
- int ret;
-
- max = (((int64_t)1) << (digits * 3)) - 1;
- if (v >= 0 && v <= max) {
- format_octal_recursive(v, (char *)p, digits);
- ret = 0;
- } else {
- format_octal_recursive(max, (char *)p, digits);
- ret = -1;
- }
- return (ret);
-}
-
-static int64_t
-format_octal_recursive(int64_t v, char *p, int s)
-{
- if (s == 0)
- return (v);
- v = format_octal_recursive(v, p+1, s-1);
- *p = '0' + (v & 7);
- return (v >> 3);
-}
-
-static int
-archive_write_cpio_finish(struct archive_write *a)
-{
- int er;
- struct archive_entry *trailer;
-
- trailer = archive_entry_new();
- /* nlink = 1 here for GNU cpio compat. */
- archive_entry_set_nlink(trailer, 1);
- archive_entry_set_pathname(trailer, "TRAILER!!!");
- er = archive_write_cpio_header(a, trailer);
- archive_entry_free(trailer);
- return (er);
-}
-
-static int
-archive_write_cpio_destroy(struct archive_write *a)
-{
- struct cpio *cpio;
-
- cpio = (struct cpio *)a->format_data;
- free(cpio->ino_list);
- free(cpio);
- a->format_data = NULL;
- return (ARCHIVE_OK);
-}
-
-static int
-archive_write_cpio_finish_entry(struct archive_write *a)
-{
- struct cpio *cpio;
- size_t to_write;
- int ret;
-
- cpio = (struct cpio *)a->format_data;
- ret = ARCHIVE_OK;
- while (cpio->entry_bytes_remaining > 0) {
- to_write = cpio->entry_bytes_remaining < a->null_length ?
- cpio->entry_bytes_remaining : a->null_length;
- ret = (a->compressor.write)(a, a->nulls, to_write);
- if (ret != ARCHIVE_OK)
- return (ret);
- cpio->entry_bytes_remaining -= to_write;
- }
- return (ret);
-}
diff --git a/lib/libarchive/archive_write_set_format_shar.c b/lib/libarchive/archive_write_set_format_shar.c
deleted file mode 100644
index 6cb58e8..0000000
--- a/lib/libarchive/archive_write_set_format_shar.c
+++ /dev/null
@@ -1,626 +0,0 @@
-/*-
- * Copyright (c) 2003-2007 Tim Kientzle
- * Copyright (c) 2008 Joerg Sonnenberger
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "archive_platform.h"
-__FBSDID("$FreeBSD$");
-
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#include <stdio.h>
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-
-#include "archive.h"
-#include "archive_entry.h"
-#include "archive_private.h"
-#include "archive_write_private.h"
-
-struct shar {
- int dump;
- int end_of_line;
- struct archive_entry *entry;
- int has_data;
- char *last_dir;
-
- /* Line buffer for uuencoded dump format */
- char outbuff[45];
- size_t outpos;
-
- int wrote_header;
- struct archive_string work;
- struct archive_string quoted_name;
-};
-
-static int archive_write_shar_finish(struct archive_write *);
-static int archive_write_shar_destroy(struct archive_write *);
-static int archive_write_shar_header(struct archive_write *,
- struct archive_entry *);
-static ssize_t archive_write_shar_data_sed(struct archive_write *,
- const void * buff, size_t);
-static ssize_t archive_write_shar_data_uuencode(struct archive_write *,
- const void * buff, size_t);
-static int archive_write_shar_finish_entry(struct archive_write *);
-
-/*
- * Copy the given string to the buffer, quoting all shell meta characters
- * found.
- */
-static void
-shar_quote(struct archive_string *buf, const char *str, int in_shell)
-{
- static const char meta[] = "\n \t'`\";&<>()|*?{}[]\\$!#^~";
- size_t len;
-
- while (*str != '\0') {
- if ((len = strcspn(str, meta)) != 0) {
- archive_strncat(buf, str, len);
- str += len;
- } else if (*str == '\n') {
- if (in_shell)
- archive_strcat(buf, "\"\n\"");
- else
- archive_strcat(buf, "\\n");
- ++str;
- } else {
- archive_strappend_char(buf, '\\');
- archive_strappend_char(buf, *str);
- ++str;
- }
- }
-}
-
-/*
- * Set output format to 'shar' format.
- */
-int
-archive_write_set_format_shar(struct archive *_a)
-{
- struct archive_write *a = (struct archive_write *)_a;
- struct shar *shar;
-
- /* If someone else was already registered, unregister them. */
- if (a->format_destroy != NULL)
- (a->format_destroy)(a);
-
- shar = (struct shar *)malloc(sizeof(*shar));
- if (shar == NULL) {
- archive_set_error(&a->archive, ENOMEM, "Can't allocate shar data");
- return (ARCHIVE_FATAL);
- }
- memset(shar, 0, sizeof(*shar));
- archive_string_init(&shar->work);
- archive_string_init(&shar->quoted_name);
- a->format_data = shar;
-
- a->pad_uncompressed = 0;
- a->format_name = "shar";
- a->format_write_header = archive_write_shar_header;
- a->format_finish = archive_write_shar_finish;
- a->format_destroy = archive_write_shar_destroy;
- a->format_write_data = archive_write_shar_data_sed;
- a->format_finish_entry = archive_write_shar_finish_entry;
- a->archive.archive_format = ARCHIVE_FORMAT_SHAR_BASE;
- a->archive.archive_format_name = "shar";
- return (ARCHIVE_OK);
-}
-
-/*
- * An alternate 'shar' that uses uudecode instead of 'sed' to encode
- * file contents and can therefore be used to archive binary files.
- * In addition, this variant also attempts to restore ownership, file modes,
- * and other extended file information.
- */
-int
-archive_write_set_format_shar_dump(struct archive *_a)
-{
- struct archive_write *a = (struct archive_write *)_a;
- struct shar *shar;
-
- archive_write_set_format_shar(&a->archive);
- shar = (struct shar *)a->format_data;
- shar->dump = 1;
- a->format_write_data = archive_write_shar_data_uuencode;
- a->archive.archive_format = ARCHIVE_FORMAT_SHAR_DUMP;
- a->archive.archive_format_name = "shar dump";
- return (ARCHIVE_OK);
-}
-
-static int
-archive_write_shar_header(struct archive_write *a, struct archive_entry *entry)
-{
- const char *linkname;
- const char *name;
- char *p, *pp;
- struct shar *shar;
-
- shar = (struct shar *)a->format_data;
- if (!shar->wrote_header) {
- archive_strcat(&shar->work, "#!/bin/sh\n");
- archive_strcat(&shar->work, "# This is a shell archive\n");
- shar->wrote_header = 1;
- }
-
- /* Save the entry for the closing. */
- if (shar->entry)
- archive_entry_free(shar->entry);
- shar->entry = archive_entry_clone(entry);
- name = archive_entry_pathname(entry);
-
- /* Handle some preparatory issues. */
- switch(archive_entry_filetype(entry)) {
- case AE_IFREG:
- /* Only regular files have non-zero size. */
- break;
- case AE_IFDIR:
- archive_entry_set_size(entry, 0);
- /* Don't bother trying to recreate '.' */
- if (strcmp(name, ".") == 0 || strcmp(name, "./") == 0)
- return (ARCHIVE_OK);
- break;
- case AE_IFIFO:
- case AE_IFCHR:
- case AE_IFBLK:
- /* All other file types have zero size in the archive. */
- archive_entry_set_size(entry, 0);
- break;
- default:
- archive_entry_set_size(entry, 0);
- if (archive_entry_hardlink(entry) == NULL &&
- archive_entry_symlink(entry) == NULL) {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "shar format cannot archive this");
- return (ARCHIVE_WARN);
- }
- }
-
- archive_string_empty(&shar->quoted_name);
- shar_quote(&shar->quoted_name, name, 1);
-
- /* Stock preparation for all file types. */
- archive_string_sprintf(&shar->work, "echo x %s\n", shar->quoted_name.s);
-
- if (archive_entry_filetype(entry) != AE_IFDIR) {
- /* Try to create the dir. */
- p = strdup(name);
- pp = strrchr(p, '/');
- /* If there is a / character, try to create the dir. */
- if (pp != NULL) {
- *pp = '\0';
-
- /* Try to avoid a lot of redundant mkdir commands. */
- if (strcmp(p, ".") == 0) {
- /* Don't try to "mkdir ." */
- free(p);
- } else if (shar->last_dir == NULL) {
- archive_strcat(&shar->work, "mkdir -p ");
- shar_quote(&shar->work, p, 1);
- archive_strcat(&shar->work,
- " > /dev/null 2>&1\n");
- shar->last_dir = p;
- } else if (strcmp(p, shar->last_dir) == 0) {
- /* We've already created this exact dir. */
- free(p);
- } else if (strlen(p) < strlen(shar->last_dir) &&
- strncmp(p, shar->last_dir, strlen(p)) == 0) {
- /* We've already created a subdir. */
- free(p);
- } else {
- archive_strcat(&shar->work, "mkdir -p ");
- shar_quote(&shar->work, p, 1);
- archive_strcat(&shar->work,
- " > /dev/null 2>&1\n");
- shar->last_dir = p;
- }
- } else {
- free(p);
- }
- }
-
- /* Handle file-type specific issues. */
- shar->has_data = 0;
- if ((linkname = archive_entry_hardlink(entry)) != NULL) {
- archive_strcat(&shar->work, "ln -f ");
- shar_quote(&shar->work, linkname, 1);
- archive_string_sprintf(&shar->work, " %s\n",
- shar->quoted_name.s);
- } else if ((linkname = archive_entry_symlink(entry)) != NULL) {
- archive_strcat(&shar->work, "ln -fs ");
- shar_quote(&shar->work, linkname, 1);
- archive_string_sprintf(&shar->work, " %s\n",
- shar->quoted_name.s);
- } else {
- switch(archive_entry_filetype(entry)) {
- case AE_IFREG:
- if (archive_entry_size(entry) == 0) {
- /* More portable than "touch." */
- archive_string_sprintf(&shar->work,
- "test -e \"%s\" || :> \"%s\"\n",
- shar->quoted_name.s, shar->quoted_name.s);
- } else {
- if (shar->dump) {
- archive_string_sprintf(&shar->work,
- "uudecode -p > %s << 'SHAR_END'\n",
- shar->quoted_name.s);
- archive_string_sprintf(&shar->work,
- "begin %o ",
- archive_entry_mode(entry) & 0777);
- shar_quote(&shar->work, name, 0);
- archive_strcat(&shar->work, "\n");
- } else {
- archive_string_sprintf(&shar->work,
- "sed 's/^X//' > %s << 'SHAR_END'\n",
- shar->quoted_name.s);
- }
- shar->has_data = 1;
- shar->end_of_line = 1;
- shar->outpos = 0;
- }
- break;
- case AE_IFDIR:
- archive_string_sprintf(&shar->work,
- "mkdir -p %s > /dev/null 2>&1\n",
- shar->quoted_name.s);
- /* Record that we just created this directory. */
- if (shar->last_dir != NULL)
- free(shar->last_dir);
-
- shar->last_dir = strdup(name);
- /* Trim a trailing '/'. */
- pp = strrchr(shar->last_dir, '/');
- if (pp != NULL && pp[1] == '\0')
- *pp = '\0';
- /*
- * TODO: Put dir name/mode on a list to be fixed
- * up at end of archive.
- */
- break;
- case AE_IFIFO:
- archive_string_sprintf(&shar->work,
- "mkfifo %s\n", shar->quoted_name.s);
- break;
- case AE_IFCHR:
- archive_string_sprintf(&shar->work,
- "mknod %s c %d %d\n", shar->quoted_name.s,
- archive_entry_rdevmajor(entry),
- archive_entry_rdevminor(entry));
- break;
- case AE_IFBLK:
- archive_string_sprintf(&shar->work,
- "mknod %s b %d %d\n", shar->quoted_name.s,
- archive_entry_rdevmajor(entry),
- archive_entry_rdevminor(entry));
- break;
- default:
- return (ARCHIVE_WARN);
- }
- }
-
- return (ARCHIVE_OK);
-}
-
-static ssize_t
-archive_write_shar_data_sed(struct archive_write *a, const void *buff, size_t n)
-{
- static const size_t ensured = 65533;
- struct shar *shar;
- const char *src;
- char *buf, *buf_end;
- int ret;
- size_t written = n;
-
- shar = (struct shar *)a->format_data;
- if (!shar->has_data || n == 0)
- return (0);
-
- src = (const char *)buff;
-
- /*
- * ensure is the number of bytes in buffer before expanding the
- * current character. Each operation writes the current character
- * and optionally the start-of-new-line marker. This can happen
- * twice before entering the loop, so make sure three additional
- * bytes can be written.
- */
- if (archive_string_ensure(&shar->work, ensured + 3) == NULL)
- __archive_errx(1, "Out of memory");
-
- if (shar->work.length > ensured) {
- ret = (*a->compressor.write)(a, shar->work.s,
- shar->work.length);
- if (ret != ARCHIVE_OK)
- return (ARCHIVE_FATAL);
- archive_string_empty(&shar->work);
- }
- buf = shar->work.s + shar->work.length;
- buf_end = shar->work.s + ensured;
-
- if (shar->end_of_line) {
- *buf++ = 'X';
- shar->end_of_line = 0;
- }
-
- while (n-- != 0) {
- if ((*buf++ = *src++) == '\n') {
- if (n == 0)
- shar->end_of_line = 1;
- else
- *buf++ = 'X';
- }
-
- if (buf >= buf_end) {
- shar->work.length = buf - shar->work.s;
- ret = (*a->compressor.write)(a, shar->work.s,
- shar->work.length);
- if (ret != ARCHIVE_OK)
- return (ARCHIVE_FATAL);
- archive_string_empty(&shar->work);
- buf = shar->work.s;
- }
- }
-
- shar->work.length = buf - shar->work.s;
-
- return (written);
-}
-
-#define UUENC(c) (((c)!=0) ? ((c) & 077) + ' ': '`')
-
-static void
-uuencode_group(const char _in[3], char out[4])
-{
- const unsigned char *in = (const unsigned char *)_in;
- int t;
-
- t = (in[0] << 16) | (in[1] << 8) | in[2];
- out[0] = UUENC( 0x3f & (t >> 18) );
- out[1] = UUENC( 0x3f & (t >> 12) );
- out[2] = UUENC( 0x3f & (t >> 6) );
- out[3] = UUENC( 0x3f & t );
-}
-
-static void
-uuencode_line(struct shar *shar, const char *inbuf, size_t len)
-{
- char tmp_buf[3], *buf;
- size_t alloc_len;
-
- /* len <= 45 -> expanded to 60 + len byte + new line */
- alloc_len = shar->work.length + 62;
- if (archive_string_ensure(&shar->work, alloc_len) == NULL)
- __archive_errx(1, "Out of memory");
-
- buf = shar->work.s + shar->work.length;
- *buf++ = UUENC(len);
- while (len >= 3) {
- uuencode_group(inbuf, buf);
- len -= 3;
- inbuf += 3;
- buf += 4;
- }
- if (len != 0) {
- tmp_buf[0] = inbuf[0];
- if (len == 1)
- tmp_buf[1] = '\0';
- else
- tmp_buf[1] = inbuf[1];
- tmp_buf[2] = '\0';
- uuencode_group(inbuf, buf);
- buf += 4;
- }
- *buf++ = '\n';
- if ((buf - shar->work.s) > (ptrdiff_t)(shar->work.length + 62))
- __archive_errx(1, "Buffer overflow");
- shar->work.length = buf - shar->work.s;
-}
-
-static ssize_t
-archive_write_shar_data_uuencode(struct archive_write *a, const void *buff,
- size_t length)
-{
- struct shar *shar;
- const char *src;
- size_t n;
- int ret;
-
- shar = (struct shar *)a->format_data;
- if (!shar->has_data)
- return (ARCHIVE_OK);
- src = (const char *)buff;
-
- if (shar->outpos != 0) {
- n = 45 - shar->outpos;
- if (n > length)
- n = length;
- memcpy(shar->outbuff + shar->outpos, src, n);
- if (shar->outpos + n < 45) {
- shar->outpos += n;
- return length;
- }
- uuencode_line(shar, shar->outbuff, 45);
- src += n;
- n = length - n;
- } else {
- n = length;
- }
-
- while (n >= 45) {
- uuencode_line(shar, src, 45);
- src += 45;
- n -= 45;
-
- if (shar->work.length < 65536)
- continue;
- ret = (*a->compressor.write)(a, shar->work.s,
- shar->work.length);
- if (ret != ARCHIVE_OK)
- return (ARCHIVE_FATAL);
- archive_string_empty(&shar->work);
- }
- if (n != 0) {
- memcpy(shar->outbuff, src, n);
- shar->outpos = n;
- }
- return (length);
-}
-
-static int
-archive_write_shar_finish_entry(struct archive_write *a)
-{
- const char *g, *p, *u;
- struct shar *shar;
- int ret;
-
- shar = (struct shar *)a->format_data;
- if (shar->entry == NULL)
- return (0);
-
- if (shar->dump) {
- /* Finish uuencoded data. */
- if (shar->has_data) {
- if (shar->outpos > 0)
- uuencode_line(shar, shar->outbuff,
- shar->outpos);
- archive_strcat(&shar->work, "`\nend\n");
- archive_strcat(&shar->work, "SHAR_END\n");
- }
- /* Restore file mode, owner, flags. */
- /*
- * TODO: Don't immediately restore mode for
- * directories; defer that to end of script.
- */
- archive_string_sprintf(&shar->work, "chmod %o ",
- archive_entry_mode(shar->entry) & 07777);
- shar_quote(&shar->work, archive_entry_pathname(shar->entry), 1);
- archive_strcat(&shar->work, "\n");
-
- u = archive_entry_uname(shar->entry);
- g = archive_entry_gname(shar->entry);
- if (u != NULL || g != NULL) {
- archive_strcat(&shar->work, "chown ");
- if (u != NULL)
- shar_quote(&shar->work, u, 1);
- if (g != NULL) {
- archive_strcat(&shar->work, ":");
- shar_quote(&shar->work, g, 1);
- }
- shar_quote(&shar->work,
- archive_entry_pathname(shar->entry), 1);
- archive_strcat(&shar->work, "\n");
- }
-
- if ((p = archive_entry_fflags_text(shar->entry)) != NULL) {
- archive_string_sprintf(&shar->work, "chflags %s ",
- p, archive_entry_pathname(shar->entry));
- shar_quote(&shar->work,
- archive_entry_pathname(shar->entry), 1);
- archive_strcat(&shar->work, "\n");
- }
-
- /* TODO: restore ACLs */
-
- } else {
- if (shar->has_data) {
- /* Finish sed-encoded data: ensure last line ends. */
- if (!shar->end_of_line)
- archive_strappend_char(&shar->work, '\n');
- archive_strcat(&shar->work, "SHAR_END\n");
- }
- }
-
- archive_entry_free(shar->entry);
- shar->entry = NULL;
-
- if (shar->work.length < 65536)
- return (ARCHIVE_OK);
-
- ret = (*a->compressor.write)(a, shar->work.s, shar->work.length);
- if (ret != ARCHIVE_OK)
- return (ARCHIVE_FATAL);
- archive_string_empty(&shar->work);
-
- return (ARCHIVE_OK);
-}
-
-static int
-archive_write_shar_finish(struct archive_write *a)
-{
- struct shar *shar;
- int ret;
-
- /*
- * TODO: Accumulate list of directory names/modes and
- * fix them all up at end-of-archive.
- */
-
- shar = (struct shar *)a->format_data;
-
- /*
- * Only write the end-of-archive markers if the archive was
- * actually started. This avoids problems if someone sets
- * shar format, then sets another format (which would invoke
- * shar_finish to free the format-specific data).
- */
- if (shar->wrote_header == 0)
- return (ARCHIVE_OK);
-
- archive_strcat(&shar->work, "exit\n");
-
- ret = (*a->compressor.write)(a, shar->work.s, shar->work.length);
- if (ret != ARCHIVE_OK)
- return (ARCHIVE_FATAL);
-
- /* Shar output is never padded. */
- archive_write_set_bytes_in_last_block(&a->archive, 1);
- /*
- * TODO: shar should also suppress padding of
- * uncompressed data within gzip/bzip2 streams.
- */
-
- return (ARCHIVE_OK);
-}
-
-static int
-archive_write_shar_destroy(struct archive_write *a)
-{
- struct shar *shar;
-
- shar = (struct shar *)a->format_data;
- if (shar == NULL)
- return (ARCHIVE_OK);
-
- archive_entry_free(shar->entry);
- free(shar->last_dir);
- archive_string_free(&(shar->work));
- archive_string_free(&(shar->quoted_name));
- free(shar);
- a->format_data = NULL;
- return (ARCHIVE_OK);
-}
diff --git a/lib/libarchive/archive_write_set_format_ustar.c b/lib/libarchive/archive_write_set_format_ustar.c
deleted file mode 100644
index 2de0cf1..0000000
--- a/lib/libarchive/archive_write_set_format_ustar.c
+++ /dev/null
@@ -1,587 +0,0 @@
-/*-
- * Copyright (c) 2003-2007 Tim Kientzle
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "archive_platform.h"
-__FBSDID("$FreeBSD$");
-
-
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#include <stdio.h>
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-
-#include "archive.h"
-#include "archive_entry.h"
-#include "archive_private.h"
-#include "archive_write_private.h"
-
-struct ustar {
- uint64_t entry_bytes_remaining;
- uint64_t entry_padding;
-};
-
-/*
- * Define structure of POSIX 'ustar' tar header.
- */
-#define USTAR_name_offset 0
-#define USTAR_name_size 100
-#define USTAR_mode_offset 100
-#define USTAR_mode_size 6
-#define USTAR_mode_max_size 8
-#define USTAR_uid_offset 108
-#define USTAR_uid_size 6
-#define USTAR_uid_max_size 8
-#define USTAR_gid_offset 116
-#define USTAR_gid_size 6
-#define USTAR_gid_max_size 8
-#define USTAR_size_offset 124
-#define USTAR_size_size 11
-#define USTAR_size_max_size 12
-#define USTAR_mtime_offset 136
-#define USTAR_mtime_size 11
-#define USTAR_mtime_max_size 11
-#define USTAR_checksum_offset 148
-#define USTAR_checksum_size 8
-#define USTAR_typeflag_offset 156
-#define USTAR_typeflag_size 1
-#define USTAR_linkname_offset 157
-#define USTAR_linkname_size 100
-#define USTAR_magic_offset 257
-#define USTAR_magic_size 6
-#define USTAR_version_offset 263
-#define USTAR_version_size 2
-#define USTAR_uname_offset 265
-#define USTAR_uname_size 32
-#define USTAR_gname_offset 297
-#define USTAR_gname_size 32
-#define USTAR_rdevmajor_offset 329
-#define USTAR_rdevmajor_size 6
-#define USTAR_rdevmajor_max_size 8
-#define USTAR_rdevminor_offset 337
-#define USTAR_rdevminor_size 6
-#define USTAR_rdevminor_max_size 8
-#define USTAR_prefix_offset 345
-#define USTAR_prefix_size 155
-#define USTAR_padding_offset 500
-#define USTAR_padding_size 12
-
-/*
- * A filled-in copy of the header for initialization.
- */
-static const char template_header[] = {
- /* name: 100 bytes */
- 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
- 0,0,0,0,
- /* Mode, space-null termination: 8 bytes */
- '0','0','0','0','0','0', ' ','\0',
- /* uid, space-null termination: 8 bytes */
- '0','0','0','0','0','0', ' ','\0',
- /* gid, space-null termination: 8 bytes */
- '0','0','0','0','0','0', ' ','\0',
- /* size, space termation: 12 bytes */
- '0','0','0','0','0','0','0','0','0','0','0', ' ',
- /* mtime, space termation: 12 bytes */
- '0','0','0','0','0','0','0','0','0','0','0', ' ',
- /* Initial checksum value: 8 spaces */
- ' ',' ',' ',' ',' ',' ',' ',' ',
- /* Typeflag: 1 byte */
- '0', /* '0' = regular file */
- /* Linkname: 100 bytes */
- 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
- 0,0,0,0,
- /* Magic: 6 bytes, Version: 2 bytes */
- 'u','s','t','a','r','\0', '0','0',
- /* Uname: 32 bytes */
- 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
- /* Gname: 32 bytes */
- 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
- /* rdevmajor + space/null padding: 8 bytes */
- '0','0','0','0','0','0', ' ','\0',
- /* rdevminor + space/null padding: 8 bytes */
- '0','0','0','0','0','0', ' ','\0',
- /* Prefix: 155 bytes */
- 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,
- /* Padding: 12 bytes */
- 0,0,0,0,0,0,0,0, 0,0,0,0
-};
-
-static ssize_t archive_write_ustar_data(struct archive_write *a, const void *buff,
- size_t s);
-static int archive_write_ustar_destroy(struct archive_write *);
-static int archive_write_ustar_finish(struct archive_write *);
-static int archive_write_ustar_finish_entry(struct archive_write *);
-static int archive_write_ustar_header(struct archive_write *,
- struct archive_entry *entry);
-static int format_256(int64_t, char *, int);
-static int format_number(int64_t, char *, int size, int max, int strict);
-static int format_octal(int64_t, char *, int);
-static int write_nulls(struct archive_write *a, size_t);
-
-/*
- * Set output format to 'ustar' format.
- */
-int
-archive_write_set_format_ustar(struct archive *_a)
-{
- struct archive_write *a = (struct archive_write *)_a;
- struct ustar *ustar;
-
- /* If someone else was already registered, unregister them. */
- if (a->format_destroy != NULL)
- (a->format_destroy)(a);
-
- /* Basic internal sanity test. */
- if (sizeof(template_header) != 512) {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, "Internal: template_header wrong size: %d should be 512", sizeof(template_header));
- return (ARCHIVE_FATAL);
- }
-
- ustar = (struct ustar *)malloc(sizeof(*ustar));
- if (ustar == NULL) {
- archive_set_error(&a->archive, ENOMEM, "Can't allocate ustar data");
- return (ARCHIVE_FATAL);
- }
- memset(ustar, 0, sizeof(*ustar));
- a->format_data = ustar;
-
- a->pad_uncompressed = 1; /* Mimic gtar in this respect. */
- a->format_name = "ustar";
- a->format_write_header = archive_write_ustar_header;
- a->format_write_data = archive_write_ustar_data;
- a->format_finish = archive_write_ustar_finish;
- a->format_destroy = archive_write_ustar_destroy;
- a->format_finish_entry = archive_write_ustar_finish_entry;
- a->archive.archive_format = ARCHIVE_FORMAT_TAR_USTAR;
- a->archive.archive_format_name = "POSIX ustar";
- return (ARCHIVE_OK);
-}
-
-static int
-archive_write_ustar_header(struct archive_write *a, struct archive_entry *entry)
-{
- char buff[512];
- int ret, ret2;
- struct ustar *ustar;
-
- ustar = (struct ustar *)a->format_data;
-
- /* Only regular files (not hardlinks) have data. */
- if (archive_entry_hardlink(entry) != NULL ||
- archive_entry_symlink(entry) != NULL ||
- !(archive_entry_filetype(entry) == AE_IFREG))
- archive_entry_set_size(entry, 0);
-
- if (AE_IFDIR == archive_entry_filetype(entry)) {
- const char *p;
- char *t;
- /*
- * Ensure a trailing '/'. Modify the entry so
- * the client sees the change.
- */
- p = archive_entry_pathname(entry);
- if (p[strlen(p) - 1] != '/') {
- t = (char *)malloc(strlen(p) + 2);
- if (t == NULL) {
- archive_set_error(&a->archive, ENOMEM,
- "Can't allocate ustar data");
- return(ARCHIVE_FATAL);
- }
- strcpy(t, p);
- strcat(t, "/");
- archive_entry_copy_pathname(entry, t);
- free(t);
- }
- }
-
- ret = __archive_write_format_header_ustar(a, buff, entry, -1, 1);
- if (ret < ARCHIVE_WARN)
- return (ret);
- ret2 = (a->compressor.write)(a, buff, 512);
- if (ret2 < ARCHIVE_WARN)
- return (ret2);
- if (ret2 < ret)
- ret = ret2;
-
- ustar->entry_bytes_remaining = archive_entry_size(entry);
- ustar->entry_padding = 0x1ff & (-(int64_t)ustar->entry_bytes_remaining);
- return (ret);
-}
-
-/*
- * Format a basic 512-byte "ustar" header.
- *
- * Returns -1 if format failed (due to field overflow).
- * Note that this always formats as much of the header as possible.
- * If "strict" is set to zero, it will extend numeric fields as
- * necessary (overwriting terminators or using base-256 extensions).
- *
- * This is exported so that other 'tar' formats can use it.
- */
-int
-__archive_write_format_header_ustar(struct archive_write *a, char h[512],
- struct archive_entry *entry, int tartype, int strict)
-{
- unsigned int checksum;
- int i, ret;
- size_t copy_length;
- const char *p, *pp;
- int mytartype;
-
- ret = 0;
- mytartype = -1;
- /*
- * The "template header" already includes the "ustar"
- * signature, various end-of-field markers and other required
- * elements.
- */
- memcpy(h, &template_header, 512);
-
- /*
- * Because the block is already null-filled, and strings
- * are allowed to exactly fill their destination (without null),
- * I use memcpy(dest, src, strlen()) here a lot to copy strings.
- */
-
- pp = archive_entry_pathname(entry);
- if (strlen(pp) <= USTAR_name_size)
- memcpy(h + USTAR_name_offset, pp, strlen(pp));
- else {
- /* Store in two pieces, splitting at a '/'. */
- p = strchr(pp + strlen(pp) - USTAR_name_size - 1, '/');
- /*
- * Look for the next '/' if we chose the first character
- * as the separator. (ustar format doesn't permit
- * an empty prefix.)
- */
- if (p == pp)
- p = strchr(p + 1, '/');
- /* Fail if the name won't fit. */
- if (!p) {
- /* No separator. */
- archive_set_error(&a->archive, ENAMETOOLONG,
- "Pathname too long");
- ret = ARCHIVE_FAILED;
- } else if (p[1] == '\0') {
- /*
- * The only feasible separator is a final '/';
- * this would result in a non-empty prefix and
- * an empty name, which POSIX doesn't
- * explicity forbid, but it just feels wrong.
- */
- archive_set_error(&a->archive, ENAMETOOLONG,
- "Pathname too long");
- ret = ARCHIVE_FAILED;
- } else if (p > pp + USTAR_prefix_size) {
- /* Prefix is too long. */
- archive_set_error(&a->archive, ENAMETOOLONG,
- "Pathname too long");
- ret = ARCHIVE_FAILED;
- } else {
- /* Copy prefix and remainder to appropriate places */
- memcpy(h + USTAR_prefix_offset, pp, p - pp);
- memcpy(h + USTAR_name_offset, p + 1, pp + strlen(pp) - p - 1);
- }
- }
-
- p = archive_entry_hardlink(entry);
- if (p != NULL)
- mytartype = '1';
- else
- p = archive_entry_symlink(entry);
- if (p != NULL && p[0] != '\0') {
- copy_length = strlen(p);
- if (copy_length > USTAR_linkname_size) {
- archive_set_error(&a->archive, ENAMETOOLONG,
- "Link contents too long");
- ret = ARCHIVE_FAILED;
- copy_length = USTAR_linkname_size;
- }
- memcpy(h + USTAR_linkname_offset, p, copy_length);
- }
-
- p = archive_entry_uname(entry);
- if (p != NULL && p[0] != '\0') {
- copy_length = strlen(p);
- if (copy_length > USTAR_uname_size) {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "Username too long");
- ret = ARCHIVE_FAILED;
- copy_length = USTAR_uname_size;
- }
- memcpy(h + USTAR_uname_offset, p, copy_length);
- }
-
- p = archive_entry_gname(entry);
- if (p != NULL && p[0] != '\0') {
- copy_length = strlen(p);
- if (strlen(p) > USTAR_gname_size) {
- archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "Group name too long");
- ret = ARCHIVE_FAILED;
- copy_length = USTAR_gname_size;
- }
- memcpy(h + USTAR_gname_offset, p, copy_length);
- }
-
- if (format_number(archive_entry_mode(entry) & 07777, h + USTAR_mode_offset, USTAR_mode_size, USTAR_mode_max_size, strict)) {
- archive_set_error(&a->archive, ERANGE, "Numeric mode too large");
- ret = ARCHIVE_FAILED;
- }
-
- if (format_number(archive_entry_uid(entry), h + USTAR_uid_offset, USTAR_uid_size, USTAR_uid_max_size, strict)) {
- archive_set_error(&a->archive, ERANGE, "Numeric user ID too large");
- ret = ARCHIVE_FAILED;
- }
-
- if (format_number(archive_entry_gid(entry), h + USTAR_gid_offset, USTAR_gid_size, USTAR_gid_max_size, strict)) {
- archive_set_error(&a->archive, ERANGE, "Numeric group ID too large");
- ret = ARCHIVE_FAILED;
- }
-
- if (format_number(archive_entry_size(entry), h + USTAR_size_offset, USTAR_size_size, USTAR_size_max_size, strict)) {
- archive_set_error(&a->archive, ERANGE, "File size out of range");
- ret = ARCHIVE_FAILED;
- }
-
- if (format_number(archive_entry_mtime(entry), h + USTAR_mtime_offset, USTAR_mtime_size, USTAR_mtime_max_size, strict)) {
- archive_set_error(&a->archive, ERANGE,
- "File modification time too large");
- ret = ARCHIVE_FAILED;
- }
-
- if (archive_entry_filetype(entry) == AE_IFBLK
- || archive_entry_filetype(entry) == AE_IFCHR) {
- if (format_number(archive_entry_rdevmajor(entry), h + USTAR_rdevmajor_offset,
- USTAR_rdevmajor_size, USTAR_rdevmajor_max_size, strict)) {
- archive_set_error(&a->archive, ERANGE,
- "Major device number too large");
- ret = ARCHIVE_FAILED;
- }
-
- if (format_number(archive_entry_rdevminor(entry), h + USTAR_rdevminor_offset,
- USTAR_rdevminor_size, USTAR_rdevminor_max_size, strict)) {
- archive_set_error(&a->archive, ERANGE,
- "Minor device number too large");
- ret = ARCHIVE_FAILED;
- }
- }
-
- if (tartype >= 0) {
- h[USTAR_typeflag_offset] = tartype;
- } else if (mytartype >= 0) {
- h[USTAR_typeflag_offset] = mytartype;
- } else {
- switch (archive_entry_filetype(entry)) {
- case AE_IFREG: h[USTAR_typeflag_offset] = '0' ; break;
- case AE_IFLNK: h[USTAR_typeflag_offset] = '2' ; break;
- case AE_IFCHR: h[USTAR_typeflag_offset] = '3' ; break;
- case AE_IFBLK: h[USTAR_typeflag_offset] = '4' ; break;
- case AE_IFDIR: h[USTAR_typeflag_offset] = '5' ; break;
- case AE_IFIFO: h[USTAR_typeflag_offset] = '6' ; break;
- case AE_IFSOCK:
- archive_set_error(&a->archive,
- ARCHIVE_ERRNO_FILE_FORMAT,
- "tar format cannot archive socket");
- return (ARCHIVE_FAILED);
- default:
- archive_set_error(&a->archive,
- ARCHIVE_ERRNO_FILE_FORMAT,
- "tar format cannot archive this (mode=0%lo)",
- (unsigned long)archive_entry_mode(entry));
- ret = ARCHIVE_FAILED;
- }
- }
-
- checksum = 0;
- for (i = 0; i < 512; i++)
- checksum += 255 & (unsigned int)h[i];
- h[USTAR_checksum_offset + 6] = '\0'; /* Can't be pre-set in the template. */
- /* h[USTAR_checksum_offset + 7] = ' '; */ /* This is pre-set in the template. */
- format_octal(checksum, h + USTAR_checksum_offset, 6);
- return (ret);
-}
-
-/*
- * Format a number into a field, with some intelligence.
- */
-static int
-format_number(int64_t v, char *p, int s, int maxsize, int strict)
-{
- int64_t limit;
-
- limit = ((int64_t)1 << (s*3));
-
- /* "Strict" only permits octal values with proper termination. */
- if (strict)
- return (format_octal(v, p, s));
-
- /*
- * In non-strict mode, we allow the number to overwrite one or
- * more bytes of the field termination. Even old tar
- * implementations should be able to handle this with no
- * problem.
- */
- if (v >= 0) {
- while (s <= maxsize) {
- if (v < limit)
- return (format_octal(v, p, s));
- s++;
- limit <<= 3;
- }
- }
-
- /* Base-256 can handle any number, positive or negative. */
- return (format_256(v, p, maxsize));
-}
-
-/*
- * Format a number into the specified field using base-256.
- */
-static int
-format_256(int64_t v, char *p, int s)
-{
- p += s;
- while (s-- > 0) {
- *--p = (char)(v & 0xff);
- v >>= 8;
- }
- *p |= 0x80; /* Set the base-256 marker bit. */
- return (0);
-}
-
-/*
- * Format a number into the specified field.
- */
-static int
-format_octal(int64_t v, char *p, int s)
-{
- int len;
-
- len = s;
-
- /* Octal values can't be negative, so use 0. */
- if (v < 0) {
- while (len-- > 0)
- *p++ = '0';
- return (-1);
- }
-
- p += s; /* Start at the end and work backwards. */
- while (s-- > 0) {
- *--p = (char)('0' + (v & 7));
- v >>= 3;
- }
-
- if (v == 0)
- return (0);
-
- /* If it overflowed, fill field with max value. */
- while (len-- > 0)
- *p++ = '7';
-
- return (-1);
-}
-
-static int
-archive_write_ustar_finish(struct archive_write *a)
-{
- int r;
-
- if (a->compressor.write == NULL)
- return (ARCHIVE_OK);
-
- r = write_nulls(a, 512*2);
- return (r);
-}
-
-static int
-archive_write_ustar_destroy(struct archive_write *a)
-{
- struct ustar *ustar;
-
- ustar = (struct ustar *)a->format_data;
- free(ustar);
- a->format_data = NULL;
- return (ARCHIVE_OK);
-}
-
-static int
-archive_write_ustar_finish_entry(struct archive_write *a)
-{
- struct ustar *ustar;
- int ret;
-
- ustar = (struct ustar *)a->format_data;
- ret = write_nulls(a,
- ustar->entry_bytes_remaining + ustar->entry_padding);
- ustar->entry_bytes_remaining = ustar->entry_padding = 0;
- return (ret);
-}
-
-static int
-write_nulls(struct archive_write *a, size_t padding)
-{
- int ret;
- size_t to_write;
-
- while (padding > 0) {
- to_write = padding < a->null_length ? padding : a->null_length;
- ret = (a->compressor.write)(a, a->nulls, to_write);
- if (ret != ARCHIVE_OK)
- return (ret);
- padding -= to_write;
- }
- return (ARCHIVE_OK);
-}
-
-static ssize_t
-archive_write_ustar_data(struct archive_write *a, const void *buff, size_t s)
-{
- struct ustar *ustar;
- int ret;
-
- ustar = (struct ustar *)a->format_data;
- if (s > ustar->entry_bytes_remaining)
- s = ustar->entry_bytes_remaining;
- ret = (a->compressor.write)(a, buff, s);
- ustar->entry_bytes_remaining -= s;
- if (ret != ARCHIVE_OK)
- return (ret);
- return (s);
-}
diff --git a/lib/libarchive/config_freebsd.h b/lib/libarchive/config_freebsd.h
index a39a1fb..b4694ea1 100644
--- a/lib/libarchive/config_freebsd.h
+++ b/lib/libarchive/config_freebsd.h
@@ -68,6 +68,7 @@
#endif
#define HAVE_BSDXML_H 1
+#define HAVE_BZLIB_H 1
#define HAVE_CHFLAGS 1
#define HAVE_CHOWN 1
#define HAVE_DECL_EXTATTR_NAMESPACE_USER 1
diff --git a/lib/libarchive/libarchive-formats.5 b/lib/libarchive/libarchive-formats.5
deleted file mode 100644
index ef4b6ca..0000000
--- a/lib/libarchive/libarchive-formats.5
+++ /dev/null
@@ -1,354 +0,0 @@
-.\" Copyright (c) 2003-2009 Tim Kientzle
-.\" 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.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
-.\"
-.\" $FreeBSD$
-.\"
-.Dd December 27, 2009
-.Dt LIBARCHIVE-FORMATS 5
-.Os
-.Sh NAME
-.Nm libarchive-formats
-.Nd archive formats supported by the libarchive library
-.Sh DESCRIPTION
-The
-.Xr libarchive 3
-library reads and writes a variety of streaming archive formats.
-Generally speaking, all of these archive formats consist of a series of
-.Dq entries .
-Each entry stores a single file system object, such as a file, directory,
-or symbolic link.
-.Pp
-The following provides a brief description of each format supported
-by libarchive, with some information about recognized extensions or
-limitations of the current library support.
-Note that just because a format is supported by libarchive does not
-imply that a program that uses libarchive will support that format.
-Applications that use libarchive specify which formats they wish
-to support, though many programs do use libarchive convenience
-functions to enable all supported formats.
-.Ss Tar Formats
-The
-.Xr libarchive 3
-library can read most tar archives.
-However, it only writes POSIX-standard
-.Dq ustar
-and
-.Dq pax interchange
-formats.
-.Pp
-All tar formats store each entry in one or more 512-byte records.
-The first record is used for file metadata, including filename,
-timestamp, and mode information, and the file data is stored in
-subsequent records.
-Later variants have extended this by either appropriating undefined
-areas of the header record, extending the header to multiple records,
-or by storing special entries that modify the interpretation of
-subsequent entries.
-.Bl -tag -width indent
-.It Cm gnutar
-The
-.Xr libarchive 3
-library can read GNU-format tar archives.
-It currently supports the most popular GNU extensions, including
-modern long filename and linkname support, as well as atime and ctime data.
-The libarchive library does not support multi-volume
-archives, nor the old GNU long filename format.
-It can read GNU sparse file entries, including the new POSIX-based
-formats, but cannot write GNU sparse file entries.
-.It Cm pax
-The
-.Xr libarchive 3
-library can read and write POSIX-compliant pax interchange format
-archives.
-Pax interchange format archives are an extension of the older ustar
-format that adds a separate entry with additional attributes stored
-as key/value pairs immediately before each regular entry.
-The presence of these additional entries is the only difference between
-pax interchange format and the older ustar format.
-The extended attributes are of unlimited length and are stored
-as UTF-8 Unicode strings.
-Keywords defined in the standard are in all lowercase; vendors are allowed
-to define custom keys by preceding them with the vendor name in all uppercase.
-When writing pax archives, libarchive uses many of the SCHILY keys
-defined by Joerg Schilling's
-.Dq star
-archiver and a few LIBARCHIVE keys.
-The libarchive library can read most of the SCHILY keys
-and most of the GNU keys introduced by GNU tar.
-It silently ignores any keywords that it does not understand.
-.It Cm restricted pax
-The libarchive library can also write pax archives in which it
-attempts to suppress the extended attributes entry whenever
-possible.
-The result will be identical to a ustar archive unless the
-extended attributes entry is required to store a long file
-name, long linkname, extended ACL, file flags, or if any of the standard
-ustar data (user name, group name, UID, GID, etc) cannot be fully
-represented in the ustar header.
-In all cases, the result can be dearchived by any program that
-can read POSIX-compliant pax interchange format archives.
-Programs that correctly read ustar format (see below) will also be
-able to read this format; any extended attributes will be extracted as
-separate files stored in
-.Pa PaxHeader
-directories.
-.It Cm ustar
-The libarchive library can both read and write this format.
-This format has the following limitations:
-.Bl -bullet -compact
-.It
-Device major and minor numbers are limited to 21 bits.
-Nodes with larger numbers will not be added to the archive.
-.It
-Path names in the archive are limited to 255 bytes.
-(Shorter if there is no / character in exactly the right place.)
-.It
-Symbolic links and hard links are stored in the archive with
-the name of the referenced file.
-This name is limited to 100 bytes.
-.It
-Extended attributes, file flags, and other extended
-security information cannot be stored.
-.It
-Archive entries are limited to 8 gigabytes in size.
-.El
-Note that the pax interchange format has none of these restrictions.
-.El
-.Pp
-The libarchive library also reads a variety of commonly-used extensions to
-the basic tar format.
-These extensions are recognized automatically whenever they appear.
-.Bl -tag -width indent
-.It Numeric extensions.
-The POSIX standards require fixed-length numeric fields to be written with
-some character position reserved for terminators.
-Libarchive allows these fields to be written without terminator characters.
-This extends the allowable range; in particular, ustar archives with this
-extension can support entries up to 64 gigabytes in size.
-Libarchive also recognizes base-256 values in most numeric fields.
-This essentially removes all limitations on file size, modification time,
-and device numbers.
-.It Solaris extensions
-Libarchive recognizes ACL and extended attribute records written
-by Solaris tar.
-Currently, libarchive only has support for old-style ACLs; the
-newer NFSv4 ACLs are recognized but discarded.
-.El
-.Pp
-The first tar program appeared in Seventh Edition Unix in 1979.
-The first official standard for the tar file format was the
-.Dq ustar
-(Unix Standard Tar) format defined by POSIX in 1988.
-POSIX.1-2001 extended the ustar format to create the
-.Dq pax interchange
-format.
-.Ss Cpio Formats
-The libarchive library can read a number of common cpio variants and can write
-.Dq odc
-and
-.Dq newc
-format archives.
-A cpio archive stores each entry as a fixed-size header followed
-by a variable-length filename and variable-length data.
-Unlike the tar format, the cpio format does only minimal padding
-of the header or file data.
-There are several cpio variants, which differ primarily in
-how they store the initial header: some store the values as
-octal or hexadecimal numbers in ASCII, others as binary values of
-varying byte order and length.
-.Bl -tag -width indent
-.It Cm binary
-The libarchive library transparently reads both big-endian and little-endian
-variants of the original binary cpio format.
-This format used 32-bit binary values for file size and mtime,
-and 16-bit binary values for the other fields.
-.It Cm odc
-The libarchive library can both read and write this
-POSIX-standard format, which is officially known as the
-.Dq cpio interchange format
-or the
-.Dq octet-oriented cpio archive format
-and sometimes unofficially referred to as the
-.Dq old character format .
-This format stores the header contents as octal values in ASCII.
-It is standard, portable, and immune from byte-order confusion.
-File sizes and mtime are limited to 33 bits (8GB file size),
-other fields are limited to 18 bits.
-.It Cm SVR4
-The libarchive library can read both CRC and non-CRC variants of
-this format.
-The SVR4 format uses eight-digit hexadecimal values for
-all header fields.
-This limits file size to 4GB, and also limits the mtime and
-other fields to 32 bits.
-The SVR4 format can optionally include a CRC of the file
-contents, although libarchive does not currently verify this CRC.
-.El
-.Pp
-Cpio first appeared in PWB/UNIX 1.0, which was released within
-AT&T in 1977.
-PWB/UNIX 1.0 formed the basis of System III Unix, released outside
-of AT&T in 1981.
-This makes cpio older than tar, although cpio was not included
-in Version 7 AT&T Unix.
-As a result, the tar command became much better known in universities
-and research groups that used Version 7.
-The combination of the
-.Nm find
-and
-.Nm cpio
-utilities provided very precise control over file selection.
-Unfortunately, the format has many limitations that make it unsuitable
-for widespread use.
-Only the POSIX format permits files over 4GB, and its 18-bit
-limit for most other fields makes it unsuitable for modern systems.
-In addition, cpio formats only store numeric UID/GID values (not
-usernames and group names), which can make it very difficult to correctly
-transfer archives across systems with dissimilar user numbering.
-.Ss Shar Formats
-A
-.Dq shell archive
-is a shell script that, when executed on a POSIX-compliant
-system, will recreate a collection of file system objects.
-The libarchive library can write two different kinds of shar archives:
-.Bl -tag -width indent
-.It Cm shar
-The traditional shar format uses a limited set of POSIX
-commands, including
-.Xr echo 1 ,
-.Xr mkdir 1 ,
-and
-.Xr sed 1 .
-It is suitable for portably archiving small collections of plain text files.
-However, it is not generally well-suited for large archives
-(many implementations of
-.Xr sh 1
-have limits on the size of a script) nor should it be used with non-text files.
-.It Cm shardump
-This format is similar to shar but encodes files using
-.Xr uuencode 1
-so that the result will be a plain text file regardless of the file contents.
-It also includes additional shell commands that attempt to reproduce as
-many file attributes as possible, including owner, mode, and flags.
-The additional commands used to restore file attributes make
-shardump archives less portable than plain shar archives.
-.El
-.Ss ISO9660 format
-Libarchive can read and extract from files containing ISO9660-compliant
-CDROM images.
-In many cases, this can remove the need to burn a physical CDROM
-just in order to read the files contained in an ISO9660 image.
-It also avoids security and complexity issues that come with
-virtual mounts and loopback devices.
-Libarchive supports the most common Rockridge extensions and has partial
-support for Joliet extensions.
-If both extensions are present, the Joliet extensions will be
-used and the Rockridge extensions will be ignored.
-In particular, this can create problems with hardlinks and symlinks,
-which are supported by Rockridge but not by Joliet.
-.Ss Zip format
-Libarchive can read and write zip format archives that have
-uncompressed entries and entries compressed with the
-.Dq deflate
-algorithm.
-Older zip compression algorithms are not supported.
-It can extract jar archives, archives that use Zip64 extensions and many
-self-extracting zip archives.
-Libarchive reads Zip archives as they are being streamed,
-which allows it to read archives of arbitrary size.
-It currently does not use the central directory; this
-limits libarchive's ability to support some self-extracting
-archives and ones that have been modified in certain ways.
-.Ss Archive (library) file format
-The Unix archive format (commonly created by the
-.Xr ar 1
-archiver) is a general-purpose format which is
-used almost exclusively for object files to be
-read by the link editor
-.Xr ld 1 .
-The ar format has never been standardised.
-There are two common variants:
-the GNU format derived from SVR4,
-and the BSD format, which first appeared in 4.4BSD.
-The two differ primarily in their handling of filenames
-longer than 15 characters:
-the GNU/SVR4 variant writes a filename table at the beginning of the archive;
-the BSD format stores each long filename in an extension
-area adjacent to the entry.
-Libarchive can read both extensions,
-including archives that may include both types of long filenames.
-Programs using libarchive can write GNU/SVR4 format
-if they provide a filename table to be written into
-the archive before any of the entries.
-Any entries whose names are not in the filename table
-will be written using BSD-style long filenames.
-This can cause problems for programs such as
-GNU ld that do not support the BSD-style long filenames.
-.Ss mtree
-Libarchive can read and write files in
-.Xr mtree 5
-format.
-This format is not a true archive format, but rather a textual description
-of a file hierarchy in which each line specifies the name of a file and
-provides specific metadata about that file.
-Libarchive can read all of the keywords supported by both
-the NetBSD and FreeBSD versions of
-.Xr mtree 1 ,
-although many of the keywords cannot currently be stored in an
-.Tn archive_entry
-object.
-When writing, libarchive supports use of the
-.Xr archive_write_set_options 3
-interface to specify which keywords should be included in the
-output.
-If libarchive was compiled with access to suitable
-cryptographic libraries (such as the OpenSSL libraries),
-it can compute hash entries such as
-.Cm sha512
-or
-.Cm md5
-from file data being written to the mtree writer.
-.Pp
-When reading an mtree file, libarchive will locate the corresponding
-files on disk using the
-.Cm contents
-keyword if present or the regular filename.
-If it can locate and open the file on disk, it will use that
-to fill in any metadata that is missing from the mtree file
-and will read the file contents and return those to the program
-using libarchive.
-If it cannot locate and open the file on disk, libarchive
-will return an error for any attempt to read the entry
-body.
-.Sh SEE ALSO
-.Xr ar 1 ,
-.Xr cpio 1 ,
-.Xr mkisofs 1 ,
-.Xr shar 1 ,
-.Xr tar 1 ,
-.Xr zip 1 ,
-.Xr zlib 3 ,
-.Xr cpio 5 ,
-.Xr mtree 5 ,
-.Xr tar 5
diff --git a/lib/libarchive/libarchive.3 b/lib/libarchive/libarchive.3
deleted file mode 100644
index 115a79c..0000000
--- a/lib/libarchive/libarchive.3
+++ /dev/null
@@ -1,369 +0,0 @@
-.\" Copyright (c) 2003-2007 Tim Kientzle
-.\" 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.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
-.\"
-.\" $FreeBSD$
-.\"
-.Dd February 6, 2010
-.Dt LIBARCHIVE 3
-.Os
-.Sh NAME
-.Nm libarchive
-.Nd functions for reading and writing streaming archives
-.Sh LIBRARY
-.Lb libarchive
-.Sh OVERVIEW
-The
-.Nm
-library provides a flexible interface for reading and writing
-streaming archive files such as tar and cpio.
-The library is inherently stream-oriented; readers serially iterate through
-the archive, writers serially add things to the archive.
-In particular, note that there is no built-in support for
-random access nor for in-place modification.
-.Pp
-When reading an archive, the library automatically detects the
-format and the compression.
-The library currently has read support for:
-.Bl -bullet -compact
-.It
-old-style tar archives,
-.It
-most variants of the POSIX
-.Dq ustar
-format,
-.It
-the POSIX
-.Dq pax interchange
-format,
-.It
-GNU-format tar archives,
-.It
-most common cpio archive formats,
-.It
-ISO9660 CD images (including RockRidge and Joliet extensions),
-.It
-Zip archives.
-.El
-The library automatically detects archives compressed with
-.Xr gzip 1 ,
-.Xr bzip2 1 ,
-.Xr xz 1 ,
-or
-.Xr compress 1
-and decompresses them transparently.
-.Pp
-When writing an archive, you can specify the compression
-to be used and the format to use.
-The library can write
-.Bl -bullet -compact
-.It
-POSIX-standard
-.Dq ustar
-archives,
-.It
-POSIX
-.Dq pax interchange format
-archives,
-.It
-POSIX octet-oriented cpio archives,
-.It
-Zip archive,
-.It
-two different variants of shar archives.
-.El
-Pax interchange format is an extension of the tar archive format that
-eliminates essentially all of the limitations of historic tar formats
-in a standard fashion that is supported
-by POSIX-compliant
-.Xr pax 1
-implementations on many systems as well as several newer implementations of
-.Xr tar 1 .
-Note that the default write format will suppress the pax extended
-attributes for most entries; explicitly requesting pax format will
-enable those attributes for all entries.
-.Pp
-The read and write APIs are accessed through the
-.Fn archive_read_XXX
-functions and the
-.Fn archive_write_XXX
-functions, respectively, and either can be used independently
-of the other.
-.Pp
-The rest of this manual page provides an overview of the library
-operation.
-More detailed information can be found in the individual manual
-pages for each API or utility function.
-.Sh READING AN ARCHIVE
-To read an archive, you must first obtain an initialized
-.Tn struct archive
-object from
-.Fn archive_read_new .
-You can then modify this object for the desired operations with the
-various
-.Fn archive_read_set_XXX
-and
-.Fn archive_read_support_XXX
-functions.
-In particular, you will need to invoke appropriate
-.Fn archive_read_support_XXX
-functions to enable the corresponding compression and format
-support.
-Note that these latter functions perform two distinct operations:
-they cause the corresponding support code to be linked into your
-program, and they enable the corresponding auto-detect code.
-Unless you have specific constraints, you will generally want
-to invoke
-.Fn archive_read_support_compression_all
-and
-.Fn archive_read_support_format_all
-to enable auto-detect for all formats and compression types
-currently supported by the library.
-.Pp
-Once you have prepared the
-.Tn struct archive
-object, you call
-.Fn archive_read_open
-to actually open the archive and prepare it for reading.
-There are several variants of this function;
-the most basic expects you to provide pointers to several
-functions that can provide blocks of bytes from the archive.
-There are convenience forms that allow you to
-specify a filename, file descriptor,
-.Ft "FILE *"
-object, or a block of memory from which to read the archive data.
-Note that the core library makes no assumptions about the
-size of the blocks read;
-callback functions are free to read whatever block size is
-most appropriate for the medium.
-.Pp
-Each archive entry consists of a header followed by a certain
-amount of data.
-You can obtain the next header with
-.Fn archive_read_next_header ,
-which returns a pointer to a
-.Tn struct archive_entry
-structure with information about the current archive element.
-If the entry is a regular file, then the header will be followed
-by the file data.
-You can use
-.Fn archive_read_data
-(which works much like the
-.Xr read 2
-system call)
-to read this data from the archive, or
-.Fn archive_read_data_block
-which provides a slightly more efficient interface.
-You may prefer to use the higher-level
-.Fn archive_read_data_skip ,
-which reads and discards the data for this entry,
-.Fn archive_read_data_to_file ,
-which copies the data to the provided file descriptor, or
-.Fn archive_read_extract ,
-which recreates the specified entry on disk and copies data
-from the archive.
-In particular, note that
-.Fn archive_read_extract
-uses the
-.Tn struct archive_entry
-structure that you provide it, which may differ from the
-entry just read from the archive.
-In particular, many applications will want to override the
-pathname, file permissions, or ownership.
-.Pp
-Once you have finished reading data from the archive, you
-should call
-.Fn archive_read_close
-to close the archive, then call
-.Fn archive_read_free
-to release all resources, including all memory allocated by the library.
-.Pp
-The
-.Xr archive_read 3
-manual page provides more detailed calling information for this API.
-.Sh WRITING AN ARCHIVE
-You use a similar process to write an archive.
-The
-.Fn archive_write_new
-function creates an archive object useful for writing,
-the various
-.Fn archive_write_set_XXX
-functions are used to set parameters for writing the archive, and
-.Fn archive_write_open
-completes the setup and opens the archive for writing.
-.Pp
-Individual archive entries are written in a three-step
-process:
-You first initialize a
-.Tn struct archive_entry
-structure with information about the new entry.
-At a minimum, you should set the pathname of the
-entry and provide a
-.Va struct stat
-with a valid
-.Va st_mode
-field, which specifies the type of object and
-.Va st_size
-field, which specifies the size of the data portion of the object.
-The
-.Fn archive_write_header
-function actually writes the header data to the archive.
-You can then use
-.Fn archive_write_data
-to write the actual data.
-.Pp
-After all entries have been written, use the
-.Fn archive_write_free
-function to release all resources.
-.Pp
-The
-.Xr archive_write 3
-manual page provides more detailed calling information for this API.
-.Sh WRITING ENTRIES TO DISK
-The
-.Xr archive_write_disk 3
-API allows you to write
-.Xr archive_entry 3
-objects to disk using the same API used by
-.Xr archive_write 3 .
-The
-.Xr archive_write_disk 3
-API is used internally by
-.Fn archive_read_extract ;
-using it directly can provide greater control over how entries
-get written to disk.
-This API also makes it possible to share code between
-archive-to-archive copy and archive-to-disk extraction
-operations.
-.Sh READING ENTRIES FROM DISK
-The
-.Xr archive_read_disk 3
-provides some support for populating
-.Xr archive_entry 3
-objects from information in the filesystem.
-.Sh DESCRIPTION
-Detailed descriptions of each function are provided by the
-corresponding manual pages.
-.Pp
-All of the functions utilize an opaque
-.Tn struct archive
-datatype that provides access to the archive contents.
-.Pp
-The
-.Tn struct archive_entry
-structure contains a complete description of a single archive
-entry.
-It uses an opaque interface that is fully documented in
-.Xr archive_entry 3 .
-.Pp
-Users familiar with historic formats should be aware that the newer
-variants have eliminated most restrictions on the length of textual fields.
-Clients should not assume that filenames, link names, user names, or
-group names are limited in length.
-In particular, pax interchange format can easily accommodate pathnames
-in arbitrary character sets that exceed
-.Va PATH_MAX .
-.Sh RETURN VALUES
-Most functions return
-.Cm ARCHIVE_OK
-(zero) on success, non-zero on error.
-The return value indicates the general severity of the error, ranging
-from
-.Cm ARCHIVE_WARN ,
-which indicates a minor problem that should probably be reported
-to the user, to
-.Cm ARCHIVE_FATAL ,
-which indicates a serious problem that will prevent any further
-operations on this archive.
-On error, the
-.Fn archive_errno
-function can be used to retrieve a numeric error code (see
-.Xr errno 2 ) .
-The
-.Fn archive_error_string
-returns a textual error message suitable for display.
-.Pp
-.Fn archive_read_new
-and
-.Fn archive_write_new
-return pointers to an allocated and initialized
-.Tn struct archive
-object.
-.Pp
-.Fn archive_read_data
-and
-.Fn archive_write_data
-return a count of the number of bytes actually read or written.
-A value of zero indicates the end of the data for this entry.
-A negative value indicates an error, in which case the
-.Fn archive_errno
-and
-.Fn archive_error_string
-functions can be used to obtain more information.
-.Sh ENVIRONMENT
-There are character set conversions within the
-.Xr archive_entry 3
-functions that are impacted by the currently-selected locale.
-.Sh SEE ALSO
-.Xr tar 1 ,
-.Xr archive_entry 3 ,
-.Xr archive_read 3 ,
-.Xr archive_util 3 ,
-.Xr archive_write 3 ,
-.Xr tar 5
-.Sh HISTORY
-The
-.Nm libarchive
-library first appeared in
-.Fx 5.3 .
-.Sh AUTHORS
-.An -nosplit
-The
-.Nm libarchive
-library was written by
-.An Tim Kientzle Aq kientzle@acm.org .
-.Sh BUGS
-Some archive formats support information that is not supported by
-.Tn struct archive_entry .
-Such information cannot be fully archived or restored using this library.
-This includes, for example, comments, character sets,
-or the arbitrary key/value pairs that can appear in
-pax interchange format archives.
-.Pp
-Conversely, of course, not all of the information that can be
-stored in a
-.Tn struct archive_entry
-is supported by all formats.
-For example, cpio formats do not support nanosecond timestamps;
-old tar formats do not support large device numbers.
-.Pp
-The
-.Xr archive_read_disk 3
-API should support iterating over filesystems;
-that would make it possible to share code among
-disk-to-archive, archive-to-archive, archive-to-disk,
-and disk-to-disk operations.
-Currently, it only supports reading the
-information for a single file.
-(Which is still quite useful, as it hides a lot
-of system-specific details.)
diff --git a/lib/libarchive/libarchive_fe/matching.c b/lib/libarchive/libarchive_fe/matching.c
deleted file mode 100644
index 01e9c39..0000000
--- a/lib/libarchive/libarchive_fe/matching.c
+++ /dev/null
@@ -1,281 +0,0 @@
-/*-
- * Copyright (c) 2003-2007 Tim Kientzle
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "lafe_platform.h"
-__FBSDID("$FreeBSD$");
-
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-
-#include "err.h"
-#include "line_reader.h"
-#include "matching.h"
-#include "pathmatch.h"
-
-struct match {
- struct match *next;
- int matches;
- char pattern[1];
-};
-
-struct lafe_matching {
- struct match *exclusions;
- int exclusions_count;
- struct match *inclusions;
- int inclusions_count;
- int inclusions_unmatched_count;
-};
-
-static void add_pattern(struct match **list, const char *pattern);
-static void initialize_matching(struct lafe_matching **);
-static int match_exclusion(struct match *, const char *pathname);
-static int match_inclusion(struct match *, const char *pathname);
-
-/*
- * The matching logic here needs to be re-thought. I started out to
- * try to mimic gtar's matching logic, but it's not entirely
- * consistent. In particular 'tar -t' and 'tar -x' interpret patterns
- * on the command line as anchored, but --exclude doesn't.
- */
-
-/*
- * Utility functions to manage exclusion/inclusion patterns
- */
-
-int
-lafe_exclude(struct lafe_matching **matching, const char *pattern)
-{
-
- if (*matching == NULL)
- initialize_matching(matching);
- add_pattern(&((*matching)->exclusions), pattern);
- (*matching)->exclusions_count++;
- return (0);
-}
-
-int
-lafe_exclude_from_file(struct lafe_matching **matching, const char *pathname)
-{
- struct lafe_line_reader *lr;
- const char *p;
- int ret = 0;
-
- lr = lafe_line_reader(pathname, 0);
- while ((p = lafe_line_reader_next(lr)) != NULL) {
- if (lafe_exclude(matching, p) != 0)
- ret = -1;
- }
- lafe_line_reader_free(lr);
- return (ret);
-}
-
-int
-lafe_include(struct lafe_matching **matching, const char *pattern)
-{
-
- if (*matching == NULL)
- initialize_matching(matching);
- add_pattern(&((*matching)->inclusions), pattern);
- (*matching)->inclusions_count++;
- (*matching)->inclusions_unmatched_count++;
- return (0);
-}
-
-int
-lafe_include_from_file(struct lafe_matching **matching, const char *pathname,
- int nullSeparator)
-{
- struct lafe_line_reader *lr;
- const char *p;
- int ret = 0;
-
- lr = lafe_line_reader(pathname, nullSeparator);
- while ((p = lafe_line_reader_next(lr)) != NULL) {
- if (lafe_include(matching, p) != 0)
- ret = -1;
- }
- lafe_line_reader_free(lr);
- return (ret);
-}
-
-static void
-add_pattern(struct match **list, const char *pattern)
-{
- struct match *match;
- size_t len;
-
- len = strlen(pattern);
- match = malloc(sizeof(*match) + len + 1);
- if (match == NULL)
- lafe_errc(1, errno, "Out of memory");
- strcpy(match->pattern, pattern);
- /* Both "foo/" and "foo" should match "foo/bar". */
- if (len && match->pattern[len - 1] == '/')
- match->pattern[strlen(match->pattern)-1] = '\0';
- match->next = *list;
- *list = match;
- match->matches = 0;
-}
-
-
-int
-lafe_excluded(struct lafe_matching *matching, const char *pathname)
-{
- struct match *match;
- struct match *matched;
-
- if (matching == NULL)
- return (0);
-
- /* Mark off any unmatched inclusions. */
- /* In particular, if a filename does appear in the archive and
- * is explicitly included and excluded, then we don't report
- * it as missing even though we don't extract it.
- */
- matched = NULL;
- for (match = matching->inclusions; match != NULL; match = match->next){
- if (match->matches == 0
- && match_inclusion(match, pathname)) {
- matching->inclusions_unmatched_count--;
- match->matches++;
- matched = match;
- }
- }
-
- /* Exclusions take priority */
- for (match = matching->exclusions; match != NULL; match = match->next){
- if (match_exclusion(match, pathname))
- return (1);
- }
-
- /* It's not excluded and we found an inclusion above, so it's included. */
- if (matched != NULL)
- return (0);
-
-
- /* We didn't find an unmatched inclusion, check the remaining ones. */
- for (match = matching->inclusions; match != NULL; match = match->next){
- /* We looked at previously-unmatched inclusions already. */
- if (match->matches > 0
- && match_inclusion(match, pathname)) {
- match->matches++;
- return (0);
- }
- }
-
- /* If there were inclusions, default is to exclude. */
- if (matching->inclusions != NULL)
- return (1);
-
- /* No explicit inclusions, default is to match. */
- return (0);
-}
-
-/*
- * This is a little odd, but it matches the default behavior of
- * gtar. In particular, 'a*b' will match 'foo/a1111/222b/bar'
- *
- */
-static int
-match_exclusion(struct match *match, const char *pathname)
-{
- return (lafe_pathmatch(match->pattern,
- pathname,
- PATHMATCH_NO_ANCHOR_START | PATHMATCH_NO_ANCHOR_END));
-}
-
-/*
- * Again, mimic gtar: inclusions are always anchored (have to match
- * the beginning of the path) even though exclusions are not anchored.
- */
-static int
-match_inclusion(struct match *match, const char *pathname)
-{
- return (lafe_pathmatch(match->pattern, pathname, PATHMATCH_NO_ANCHOR_END));
-}
-
-void
-lafe_cleanup_exclusions(struct lafe_matching **matching)
-{
- struct match *p, *q;
-
- if (*matching == NULL)
- return;
-
- for (p = (*matching)->inclusions; p != NULL; ) {
- q = p;
- p = p->next;
- free(q);
- }
-
- for (p = (*matching)->exclusions; p != NULL; ) {
- q = p;
- p = p->next;
- free(q);
- }
-
- free(*matching);
- *matching = NULL;
-}
-
-static void
-initialize_matching(struct lafe_matching **matching)
-{
- *matching = calloc(sizeof(**matching), 1);
- if (*matching == NULL)
- lafe_errc(1, errno, "No memory");
-}
-
-int
-lafe_unmatched_inclusions(struct lafe_matching *matching)
-{
-
- if (matching == NULL)
- return (0);
- return (matching->inclusions_unmatched_count);
-}
-
-int
-lafe_unmatched_inclusions_warn(struct lafe_matching *matching, const char *msg)
-{
- struct match *p;
-
- if (matching == NULL)
- return (0);
-
- for (p = matching->inclusions; p != NULL; p = p->next) {
- if (p->matches == 0)
- lafe_warnc(0, "%s: %s", p->pattern, msg);
- }
-
- return (matching->inclusions_unmatched_count);
-}
diff --git a/lib/libarchive/libarchive_internals.3 b/lib/libarchive/libarchive_internals.3
deleted file mode 100644
index 61a17c4..0000000
--- a/lib/libarchive/libarchive_internals.3
+++ /dev/null
@@ -1,365 +0,0 @@
-.\" Copyright (c) 2003-2007 Tim Kientzle
-.\" 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.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
-.\"
-.\" $FreeBSD$
-.\"
-.Dd April 16, 2007
-.Dt LIBARCHIVE 3
-.Os
-.Sh NAME
-.Nm libarchive_internals
-.Nd description of libarchive internal interfaces
-.Sh OVERVIEW
-The
-.Nm libarchive
-library provides a flexible interface for reading and writing
-streaming archive files such as tar and cpio.
-Internally, it follows a modular layered design that should
-make it easy to add new archive and compression formats.
-.Sh GENERAL ARCHITECTURE
-Externally, libarchive exposes most operations through an
-opaque, object-style interface.
-The
-.Xr archive_entry 1
-objects store information about a single filesystem object.
-The rest of the library provides facilities to write
-.Xr archive_entry 1
-objects to archive files,
-read them from archive files,
-and write them to disk.
-(There are plans to add a facility to read
-.Xr archive_entry 1
-objects from disk as well.)
-.Pp
-The read and write APIs each have four layers: a public API
-layer, a format layer that understands the archive file format,
-a compression layer, and an I/O layer.
-The I/O layer is completely exposed to clients who can replace
-it entirely with their own functions.
-.Pp
-In order to provide as much consistency as possible for clients,
-some public functions are virtualized.
-Eventually, it should be possible for clients to open
-an archive or disk writer, and then use a single set of
-code to select and write entries, regardless of the target.
-.Sh READ ARCHITECTURE
-From the outside, clients use the
-.Xr archive_read 3
-API to manipulate an
-.Nm archive
-object to read entries and bodies from an archive stream.
-Internally, the
-.Nm archive
-object is cast to an
-.Nm archive_read
-object, which holds all read-specific data.
-The API has four layers:
-The lowest layer is the I/O layer.
-This layer can be overridden by clients, but most clients use
-the packaged I/O callbacks provided, for example, by
-.Xr archive_read_open_memory 3 ,
-and
-.Xr archive_read_open_fd 3 .
-The compression layer calls the I/O layer to
-read bytes and decompresses them for the format layer.
-The format layer unpacks a stream of uncompressed bytes and
-creates
-.Nm archive_entry
-objects from the incoming data.
-The API layer tracks overall state
-(for example, it prevents clients from reading data before reading a header)
-and invokes the format and compression layer operations
-through registered function pointers.
-In particular, the API layer drives the format-detection process:
-When opening the archive, it reads an initial block of data
-and offers it to each registered compression handler.
-The one with the highest bid is initialized with the first block.
-Similarly, the format handlers are polled to see which handler
-is the best for each archive.
-(Prior to 2.4.0, the format bidders were invoked for each
-entry, but this design hindered error recovery.)
-.Ss I/O Layer and Client Callbacks
-The read API goes to some lengths to be nice to clients.
-As a result, there are few restrictions on the behavior of
-the client callbacks.
-.Pp
-The client read callback is expected to provide a block
-of data on each call.
-A zero-length return does indicate end of file, but otherwise
-blocks may be as small as one byte or as large as the entire file.
-In particular, blocks may be of different sizes.
-.Pp
-The client skip callback returns the number of bytes actually
-skipped, which may be much smaller than the skip requested.
-The only requirement is that the skip not be larger.
-In particular, clients are allowed to return zero for any
-skip that they don't want to handle.
-The skip callback must never be invoked with a negative value.
-.Pp
-Keep in mind that not all clients are reading from disk:
-clients reading from networks may provide different-sized
-blocks on every request and cannot skip at all;
-advanced clients may use
-.Xr mmap 2
-to read the entire file into memory at once and return the
-entire file to libarchive as a single block;
-other clients may begin asynchronous I/O operations for the
-next block on each request.
-.Ss Decompression Layer
-The decompression layer not only handles decompression,
-it also buffers data so that the format handlers see a
-much nicer I/O model.
-The decompression API is a two stage peek/consume model.
-A read_ahead request specifies a minimum read amount;
-the decompression layer must provide a pointer to at least
-that much data.
-If more data is immediately available, it should return more:
-the format layer handles bulk data reads by asking for a minimum
-of one byte and then copying as much data as is available.
-.Pp
-A subsequent call to the
-.Fn consume
-function advances the read pointer.
-Note that data returned from a
-.Fn read_ahead
-call is guaranteed to remain in place until
-the next call to
-.Fn read_ahead .
-Intervening calls to
-.Fn consume
-should not cause the data to move.
-.Pp
-Skip requests must always be handled exactly.
-Decompression handlers that cannot seek forward should
-not register a skip handler;
-the API layer fills in a generic skip handler that reads and discards data.
-.Pp
-A decompression handler has a specific lifecycle:
-.Bl -tag -compact -width indent
-.It Registration/Configuration
-When the client invokes the public support function,
-the decompression handler invokes the internal
-.Fn __archive_read_register_compression
-function to provide bid and initialization functions.
-This function returns
-.Cm NULL
-on error or else a pointer to a
-.Cm struct decompressor_t .
-This structure contains a
-.Va void * config
-slot that can be used for storing any customization information.
-.It Bid
-The bid function is invoked with a pointer and size of a block of data.
-The decompressor can access its config data
-through the
-.Va decompressor
-element of the
-.Cm archive_read
-object.
-The bid function is otherwise stateless.
-In particular, it must not perform any I/O operations.
-.Pp
-The value returned by the bid function indicates its suitability
-for handling this data stream.
-A bid of zero will ensure that this decompressor is never invoked.
-Return zero if magic number checks fail.
-Otherwise, your initial implementation should return the number of bits
-actually checked.
-For example, if you verify two full bytes and three bits of another
-byte, bid 19.
-Note that the initial block may be very short;
-be careful to only inspect the data you are given.
-(The current decompressors require two bytes for correct bidding.)
-.It Initialize
-The winning bidder will have its init function called.
-This function should initialize the remaining slots of the
-.Va struct decompressor_t
-object pointed to by the
-.Va decompressor
-element of the
-.Va archive_read
-object.
-In particular, it should allocate any working data it needs
-in the
-.Va data
-slot of that structure.
-The init function is called with the block of data that
-was used for tasting.
-At this point, the decompressor is responsible for all I/O
-requests to the client callbacks.
-The decompressor is free to read more data as and when
-necessary.
-.It Satisfy I/O requests
-The format handler will invoke the
-.Va read_ahead ,
-.Va consume ,
-and
-.Va skip
-functions as needed.
-.It Finish
-The finish method is called only once when the archive is closed.
-It should release anything stored in the
-.Va data
-and
-.Va config
-slots of the
-.Va decompressor
-object.
-It should not invoke the client close callback.
-.El
-.Ss Format Layer
-The read formats have a similar lifecycle to the decompression handlers:
-.Bl -tag -compact -width indent
-.It Registration
-Allocate your private data and initialize your pointers.
-.It Bid
-Formats bid by invoking the
-.Fn read_ahead
-decompression method but not calling the
-.Fn consume
-method.
-This allows each bidder to look ahead in the input stream.
-Bidders should not look further ahead than necessary, as long
-look aheads put pressure on the decompression layer to buffer
-lots of data.
-Most formats only require a few hundred bytes of look ahead;
-look aheads of a few kilobytes are reasonable.
-(The ISO9660 reader sometimes looks ahead by 48k, which
-should be considered an upper limit.)
-.It Read header
-The header read is usually the most complex part of any format.
-There are a few strategies worth mentioning:
-For formats such as tar or cpio, reading and parsing the header is
-straightforward since headers alternate with data.
-For formats that store all header data at the beginning of the file,
-the first header read request may have to read all headers into
-memory and store that data, sorted by the location of the file
-data.
-Subsequent header read requests will skip forward to the
-beginning of the file data and return the corresponding header.
-.It Read Data
-The read data interface supports sparse files; this requires that
-each call return a block of data specifying the file offset and
-size.
-This may require you to carefully track the location so that you
-can return accurate file offsets for each read.
-Remember that the decompressor will return as much data as it has.
-Generally, you will want to request one byte,
-examine the return value to see how much data is available, and
-possibly trim that to the amount you can use.
-You should invoke consume for each block just before you return it.
-.It Skip All Data
-The skip data call should skip over all file data and trailing padding.
-This is called automatically by the API layer just before each
-header read.
-It is also called in response to the client calling the public
-.Fn data_skip
-function.
-.It Cleanup
-On cleanup, the format should release all of its allocated memory.
-.El
-.Ss API Layer
-XXX to do XXX
-.Sh WRITE ARCHITECTURE
-The write API has a similar set of four layers:
-an API layer, a format layer, a compression layer, and an I/O layer.
-The registration here is much simpler because only
-one format and one compression can be registered at a time.
-.Ss I/O Layer and Client Callbacks
-XXX To be written XXX
-.Ss Compression Layer
-XXX To be written XXX
-.Ss Format Layer
-XXX To be written XXX
-.Ss API Layer
-XXX To be written XXX
-.Sh WRITE_DISK ARCHITECTURE
-The write_disk API is intended to look just like the write API
-to clients.
-Since it does not handle multiple formats or compression, it
-is not layered internally.
-.Sh GENERAL SERVICES
-The
-.Nm archive_read ,
-.Nm archive_write ,
-and
-.Nm archive_write_disk
-objects all contain an initial
-.Nm archive
-object which provides common support for a set of standard services.
-(Recall that ANSI/ISO C90 guarantees that you can cast freely between
-a pointer to a structure and a pointer to the first element of that
-structure.)
-The
-.Nm archive
-object has a magic value that indicates which API this object
-is associated with,
-slots for storing error information,
-and function pointers for virtualized API functions.
-.Sh MISCELLANEOUS NOTES
-Connecting existing archiving libraries into libarchive is generally
-quite difficult.
-In particular, many existing libraries strongly assume that you
-are reading from a file; they seek forwards and backwards as necessary
-to locate various pieces of information.
-In contrast, libarchive never seeks backwards in its input, which
-sometimes requires very different approaches.
-.Pp
-For example, libarchive's ISO9660 support operates very differently
-from most ISO9660 readers.
-The libarchive support utilizes a work-queue design that
-keeps a list of known entries sorted by their location in the input.
-Whenever libarchive's ISO9660 implementation is asked for the next
-header, checks this list to find the next item on the disk.
-Directories are parsed when they are encountered and new
-items are added to the list.
-This design relies heavily on the ISO9660 image being optimized so that
-directories always occur earlier on the disk than the files they
-describe.
-.Pp
-Depending on the specific format, such approaches may not be possible.
-The ZIP format specification, for example, allows archivers to store
-key information only at the end of the file.
-In theory, it is possible to create ZIP archives that cannot
-be read without seeking.
-Fortunately, such archives are very rare, and libarchive can read
-most ZIP archives, though it cannot always extract as much information
-as a dedicated ZIP program.
-.Sh SEE ALSO
-.Xr archive 3 ,
-.Xr archive_entry 3 ,
-.Xr archive_read 3 ,
-.Xr archive_write 3 ,
-.Xr archive_write_disk 3
-.Sh HISTORY
-The
-.Nm libarchive
-library first appeared in
-.Fx 5.3 .
-.Sh AUTHORS
-.An -nosplit
-The
-.Nm libarchive
-library was written by
-.An Tim Kientzle Aq kientzle@acm.org .
diff --git a/lib/libarchive/test/.cvsignore b/lib/libarchive/test/.cvsignore
deleted file mode 100644
index b71f5a0..0000000
--- a/lib/libarchive/test/.cvsignore
+++ /dev/null
@@ -1,10 +0,0 @@
-*.tar
-*.tar.gz
-*.tgz
-*.zip
-.depend
-.deps
-.dirstamp
-archive.h
-libarchive_test
-list.h
diff --git a/lib/libarchive/test/Makefile b/lib/libarchive/test/Makefile
index ba72db7..c8fc0a6 100644
--- a/lib/libarchive/test/Makefile
+++ b/lib/libarchive/test/Makefile
@@ -1,8 +1,23 @@
# $FreeBSD$
-# Where to find the libarchive sources
-LA_SRCDIR=${.CURDIR}/..
+LIBARCHIVEDIR= ${.CURDIR}/../../../contrib/libarchive
+NO_MAN=yes
+
+PROG=libarchive_test
+INTERNALPROG=yes # Don't install this; it's just for testing
+DPADD=${LIBBZ2} ${LIBZ} ${LIBMD} ${LIBCRYPTO} ${LIBBSDXML}
+LDADD= -L ${.OBJDIR}/.. -larchive
+LDADD+= -lz -lbz2 -llzma -lmd -lcrypto -lbsdxml
+CFLAGS+= -g
+CFLAGS+= -I${.CURDIR}/.. -I${LIBARCHIVEDIR} -I${.OBJDIR}
+CFLAGS+= -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1
+
+# Uncomment to link against dmalloc
+#LDADD+= -L/usr/local/lib -ldmalloc
+#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC
+
+.PATH: ${LIBARCHIVEDIR}/libarchive/test
TESTS= \
test_acl_basic.c \
test_acl_freebsd.c \
@@ -52,7 +67,7 @@ TESTS= \
test_read_format_gtar_gz.c \
test_read_format_gtar_lzma.c \
test_read_format_gtar_sparse.c \
- test_read_format_iso_gz.c \
+ test_read_format_iso_Z.c \
test_read_format_iso_multi_extent.c \
test_read_format_isorr_rr_moved.c \
test_read_format_isojoliet_bz2.c \
@@ -120,28 +135,14 @@ SRCS= \
main.c \
read_open_memory.c
-NO_MAN=yes
-
-PROG=libarchive_test
-INTERNALPROG=yes # Don't install this; it's just for testing
-DPADD=${LIBBZ2} ${LIBZ} ${LIBMD} ${LIBCRYPTO} ${LIBBSDXML}
-LDADD= -L ${.OBJDIR}/.. -larchive
-LDADD+= -lz -lbz2 -llzma -lmd -lcrypto -lbsdxml
-CFLAGS+= -g
-CFLAGS+= -I${LA_SRCDIR} -I.
-CFLAGS+= -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1
-
-# Uncomment to link against dmalloc
-#LDADD+= -L/usr/local/lib -ldmalloc
-#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC
-
# Build libarchive_test and run it.
check test: libarchive_test
- ./libarchive_test -r ${.CURDIR}
+ ./libarchive_test -r ${LIBARCHIVEDIR}/libarchive/test
# list.h is just a list of all tests, as indicated by DEFINE_TEST macro lines
list.h: ${TESTS} Makefile
- (cd ${.CURDIR}; cat test_*.c) | grep DEFINE_TEST > list.h
+ (cd ${LIBARCHIVEDIR}/libarchive/test; cat test_*.c) | \
+ grep DEFINE_TEST > ${.OBJDIR}/list.h
CLEANFILES += *.out *.o *.core *~ list.h .dirstamp .depend
CLEANDIRS += .deps .libs
diff --git a/lib/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.c b/lib/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.c
deleted file mode 100644
index 005838d..0000000
--- a/lib/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.c
+++ /dev/null
@@ -1,128 +0,0 @@
-/*-
- * Copyright (c) 2003-2007 Tim Kientzle
- * Copyright (c) 2009 Michihiro NAKAJIMA
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-#include "test.h"
-__FBSDID("$FreeBSD$");
-
-/*
-Execute the following command to rebuild the data for this program:
- tail -n +32 test_read_format_cpio_svr4_bzip2_rpm.c | /bin/sh
-
-F=test_read_format_cpio_svr4_bzip2_rpm.rpm
-NAME=rpmsample
-TMPRPM=/tmp/rpm
-rm -rf ${TMPRPM}
-mkdir -p ${TMPRPM}/BUILD
-mkdir -p ${TMPRPM}/RPMS
-mkdir -p ${TMPRPM}/SOURCES
-mkdir -p ${TMPRPM}/SPECS
-mkdir -p ${TMPRPM}/SRPMS
-echo "hello" > ${TMPRPM}/BUILD/file1
-echo "hello" > ${TMPRPM}/BUILD/file2
-echo "hello" > ${TMPRPM}/BUILD/file3
-cat > ${TMPRPM}/SPECS/${NAME}.spec <<END
-##
-%define _topdir ${TMPRPM}
-%define _binary_payload w9.bzdio
-
-Summary: Sample data of RPM filter of libarchive
-Name: ${NAME}
-Version: 1.0.0
-Release: 1
-License: BSD
-URL: http://code.google.com/p/libarchive
-BuildArch: noarch
-BuildRoot: %{_tmppath}/%{name}-%{version}-root
-
-%install
-rm -rf \$RPM_BUILD_ROOT
-
-mkdir -p \$RPM_BUILD_ROOT%{_sysconfdir}
-install -m 644 file1 \$RPM_BUILD_ROOT%{_sysconfdir}/file1
-install -m 644 file2 \$RPM_BUILD_ROOT%{_sysconfdir}/file2
-install -m 644 file3 \$RPM_BUILD_ROOT%{_sysconfdir}/file3
-TZ=utc touch -afm -t 197001020000.01 \$RPM_BUILD_ROOT%{_sysconfdir}/file1
-TZ=utc touch -afm -t 197001020000.01 \$RPM_BUILD_ROOT%{_sysconfdir}/file2
-TZ=utc touch -afm -t 197001020000.01 \$RPM_BUILD_ROOT%{_sysconfdir}/file3
-
-%files
-%{_sysconfdir}/file1
-%{_sysconfdir}/file2
-%{_sysconfdir}/file3
-
-%description
-Sample data.
-END
-#
-rpmbuild -bb ${TMPRPM}/SPECS/${NAME}.spec
-uuencode ${F} < ${TMPRPM}/RPMS/noarch/${NAME}-1.0.0-1.noarch.rpm > ${F}.uu
-
-rm -rf ${TMPRPM}
-exit 1
-*/
-
-DEFINE_TEST(test_read_format_cpio_svr4_bzip2_rpm)
-{
- struct archive_entry *ae;
- struct archive *a;
- const char *name = "test_read_format_cpio_svr4_bzip2_rpm.rpm";
- int r;
-
- assert((a = archive_read_new()) != NULL);
- r = archive_read_support_compression_bzip2(a);
- if (r == ARCHIVE_WARN) {
- skipping("bzip2 reading not fully supported on this platform");
- assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
- return;
- }
- assertEqualIntA(a, ARCHIVE_OK, r);
- assertEqualIntA(a, ARCHIVE_OK,
- archive_read_support_compression_rpm(a));
- assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
- extract_reference_file(name);
- assertEqualIntA(a, ARCHIVE_OK, archive_read_open_filename(a, name, 2));
-
- assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
- assertEqualString("./etc/file1", archive_entry_pathname(ae));
- assertEqualInt(86401, archive_entry_mtime(ae));
- assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
- assertEqualString("./etc/file2", archive_entry_pathname(ae));
- assertEqualInt(86401, archive_entry_mtime(ae));
- assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
- assertEqualString("./etc/file3", archive_entry_pathname(ae));
- assertEqualInt(86401, archive_entry_mtime(ae));
-
- /* Verify the end-of-archive. */
- assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae));
-
- /* Verify that the format detection worked. */
- assertEqualInt(archive_compression(a), ARCHIVE_COMPRESSION_BZIP2);
- assertEqualString(archive_compression_name(a), "bzip2");
- assertEqualInt(archive_format(a), ARCHIVE_FORMAT_CPIO_SVR4_NOCRC);
-
- assertEqualInt(ARCHIVE_OK, archive_read_close(a));
- assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
-}
-
diff --git a/lib/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.rpm.uu b/lib/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.rpm.uu
deleted file mode 100644
index 3e85150..0000000
--- a/lib/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.rpm.uu
+++ /dev/null
@@ -1,49 +0,0 @@
-$FreeBSD$
-
-begin 644 test_read_format_cpio_svr4_bzip2_rpm.rpm
-M[:ONVP,``````7)P;7-A;7!L92TQ+C`N,"TQ````````````````````````
-M```````````````````````````````````````````!``4`````````````
-M````````CJWH`0`````````%````5````#X````'````1````!````$-````
-M!@`````````!```#Z`````0````L`````0```^P````'````,````!````/O
-M````!````$`````!,F4X-3)F-39E,#,W83EE.61A9C<W8V(Q,&0P8S4T-65E
-M9&8S-6$U8@````````:<A,!!LG.$S/]SK-(FA0BH6@```@@````^````!___
-M_[`````0`````(ZMZ`$`````````,0```NP````_````!P```MP````0````
-M9`````@``````````0```^@````&`````@````$```/I````!@````P````!
-M```#Z@````8````2`````0```^P````)````%`````$```/M````"0```#P`
-M```!```#[@````0```!,`````0```^\````&````4`````$```/Q````!```
-M`%P````!```#]@````8```!@`````0```_@````)````9`````$```/\````
-M!@```'`````!```#_0````8```"4`````0```_X````&````F@````$```0$
-M````!````*0````#```$!@````,```"P`````P``!`D````#````M@````,`
-M``0*````!````+P````#```$"P````@```#(`````P``!`P````(```!*P``
-M``,```0-````!````3`````#```$#P````@```$\`````P``!!`````(```!
-M2P````,```04````!@```5H````!```$%0````0```%T`````P``!!<````(
-M```!@`````$```08````!````8P````#```$&0````@```&8`````P``!!H`
-M```(```!Z@````,```0H````!@```@`````!```$1P````0```((`````P``
-M!$@````$```"%`````,```1)````"````B`````#```$6`````0```(D````
-M`0``!%D````(```"*`````$```1<````!````C`````#```$70````@```(\
-M`````P``!%X````(```"3@````$```1B````!@```E0````!```$9`````8`
-M``)S`````0``!&4````&```">`````$```1F````!@```GX````!```$;```
-M``8```*``````0``!'0````$```"E`````,```1U````!````J`````#```$
-M=@````@```*L`````P``!'<````$```"Q`````,```1X````!````M`````#
-M0P!R<&US86UP;&4`,2XP+C``,0!386UP;&4@9&%T82!O9B!24$T@9FEL=&5R
-M(&]F(&QI8F%R8VAI=F4`4V%M<&QE(&1A=&$N`````$L)MWQC=64M9&5S:W1O
-M<``````20E-$`%5N<W!E8VEF:65D`&AT='`Z+R]C;V1E+F=O;V=L92YC;VTO
-M<"]L:6)A<F-H:79E`&QI;G5X`&YO87)C:``````````&````!@````:!I(&D
-M@:0``````````5&!``%1@0`!48%B,3DT-F%C.3(T.3)D,C,T-V,V,C,U8C1D
-M,C8Q,3$X-`!B,3DT-F%C.3(T.3)D,C,T-V,V,C,U8C1D,C8Q,3$X-`!B,3DT
-M-F%C.3(T.3)D,C,T-V,V,C,U8C1D,C8Q,3$X-```````````````````````
-M`')O;W0`<F]O=`!R;V]T`')O;W0`<F]O=`!R;V]T`')P;7-A;7!L92TQ+C`N
-M,"TQ+G-R8RYR<&T`________________<G!M<V%M<&QE`````0``2@$``$H!
-M``!*<G!M;&EB*$-O;7!R97-S961&:6QE3F%M97,I`')P;6QI8BA087EL;V%D
-M1FEL97-(879E4')E9FEX*0!R<&UL:6(H4&%Y;&]A9$ES0GII<#(I`#,N,"XT
-M+3$`-"XP+3$`,RXP+C4M,0`T+C<N,```````"`$```@!```(`0``*H<``"J(
-M```JB0`````````(,2XP+C`M,0````````````````!F:6QE,0!F:6QE,@!F
-M:6QE,P`O971C+P`M3S(@+6<@+6UA<F-H/6DS.#8@+6UT=6YE/6DV.#8`8W!I
-M;P!B>FEP,@`Y`&YO87)C:"UR<&TM;&EN=7@`````````````````````````
-M`0````$````!`$%30TE)('1E>'0`9&ER96-T;W)Y````````````````````
-M````````````````````/P````?___SP````$$)::#DQ05DF4UFX89DX``!=
-M?X!,$`@`*`'_X"(D%``[9(0`(`"2B/50T#0#0`](9!%(C1,0&GJ`R`M@PQRG
-M<PN0PPC]8&X[2P=KHS%0Q<^=89M6CI5L`O2\("`W!K-V.;*M63U;6ES%CQI6
-E4,1$DE)B@G&.7I5?NT46(XB0/D,B!$Z-!A_B[DBG"A(7##,G````
-`
-end
diff --git a/lib/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.c b/lib/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.c
deleted file mode 100644
index 59e53f1..0000000
--- a/lib/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.c
+++ /dev/null
@@ -1,128 +0,0 @@
-/*-
- * Copyright (c) 2003-2007 Tim Kientzle
- * Copyright (c) 2009 Michihiro NAKAJIMA
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-#include "test.h"
-__FBSDID("$FreeBSD$");
-
-/*
-Execute the following command to rebuild the data for this program:
- tail -n +32 test_read_format_cpio_svr4_gzip_rpm.c | /bin/sh
-
-F=test_read_format_cpio_svr4_gzip_rpm.rpm
-NAME=rpmsample
-TMPRPM=/tmp/rpm
-rm -rf ${TMPRPM}
-mkdir -p ${TMPRPM}/BUILD
-mkdir -p ${TMPRPM}/RPMS
-mkdir -p ${TMPRPM}/SOURCES
-mkdir -p ${TMPRPM}/SPECS
-mkdir -p ${TMPRPM}/SRPMS
-echo "hello" > ${TMPRPM}/BUILD/file1
-echo "hello" > ${TMPRPM}/BUILD/file2
-echo "hello" > ${TMPRPM}/BUILD/file3
-cat > ${TMPRPM}/SPECS/${NAME}.spec <<END
-##
-%define _topdir ${TMPRPM}
-%define _binary_payload w9.gzdio
-
-Summary: Sample data of RPM filter of libarchive
-Name: ${NAME}
-Version: 1.0.0
-Release: 1
-License: BSD
-URL: http://code.google.com/p/libarchive
-BuildArch: noarch
-BuildRoot: %{_tmppath}/%{name}-%{version}-root
-
-%install
-rm -rf \$RPM_BUILD_ROOT
-
-mkdir -p \$RPM_BUILD_ROOT%{_sysconfdir}
-install -m 644 file1 \$RPM_BUILD_ROOT%{_sysconfdir}/file1
-install -m 644 file2 \$RPM_BUILD_ROOT%{_sysconfdir}/file2
-install -m 644 file3 \$RPM_BUILD_ROOT%{_sysconfdir}/file3
-TZ=utc touch -afm -t 197001020000.01 \$RPM_BUILD_ROOT%{_sysconfdir}/file1
-TZ=utc touch -afm -t 197001020000.01 \$RPM_BUILD_ROOT%{_sysconfdir}/file2
-TZ=utc touch -afm -t 197001020000.01 \$RPM_BUILD_ROOT%{_sysconfdir}/file3
-
-%files
-%{_sysconfdir}/file1
-%{_sysconfdir}/file2
-%{_sysconfdir}/file3
-
-%description
-Sample data.
-END
-#
-rpmbuild -bb ${TMPRPM}/SPECS/${NAME}.spec
-uuencode ${F} < ${TMPRPM}/RPMS/noarch/${NAME}-1.0.0-1.noarch.rpm > ${F}.uu
-
-rm -rf ${TMPRPM}
-exit 1
-*/
-
-DEFINE_TEST(test_read_format_cpio_svr4_gzip_rpm)
-{
- struct archive_entry *ae;
- struct archive *a;
- const char *name = "test_read_format_cpio_svr4_gzip_rpm.rpm";
- int r;
-
- assert((a = archive_read_new()) != NULL);
- r = archive_read_support_compression_gzip(a);
- if (r == ARCHIVE_WARN) {
- skipping("gzip reading not fully supported on this platform");
- assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
- return;
- }
- assertEqualIntA(a, ARCHIVE_OK, r);
- assertEqualIntA(a, ARCHIVE_OK,
- archive_read_support_compression_rpm(a));
- assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
- extract_reference_file(name);
- assertEqualIntA(a, ARCHIVE_OK, archive_read_open_filename(a, name, 2));
-
- assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
- assertEqualString("./etc/file1", archive_entry_pathname(ae));
- assertEqualInt(86401, archive_entry_mtime(ae));
- assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
- assertEqualString("./etc/file2", archive_entry_pathname(ae));
- assertEqualInt(86401, archive_entry_mtime(ae));
- assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
- assertEqualString("./etc/file3", archive_entry_pathname(ae));
- assertEqualInt(86401, archive_entry_mtime(ae));
-
- /* Verify the end-of-archive. */
- assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae));
-
- /* Verify that the format detection worked. */
- assertEqualInt(archive_compression(a), ARCHIVE_COMPRESSION_GZIP);
- assertEqualString(archive_compression_name(a), "gzip");
- assertEqualInt(archive_format(a), ARCHIVE_FORMAT_CPIO_SVR4_NOCRC);
-
- assertEqualInt(ARCHIVE_OK, archive_read_close(a));
- assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
-}
-
diff --git a/lib/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.rpm.uu b/lib/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.rpm.uu
deleted file mode 100644
index ac29865..0000000
--- a/lib/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.rpm.uu
+++ /dev/null
@@ -1,48 +0,0 @@
-$FreeBSD$
-
-begin 644 test_read_format_cpio_svr4_gzip_rpm.rpm
-M[:ONVP,``````7)P;7-A;7!L92TQ+C`N,"TQ````````````````````````
-M```````````````````````````````````````````!``4`````````````
-M````````CJWH`0`````````%````5````#X````'````1````!````$-````
-M!@`````````!```#Z`````0````L`````0```^P````'````,````!````/O
-M````!````$`````!9&9E8V,W,#4T,C@X,V1D-&8P-6%E.#4Y,S<S,&1F,V)D
-M,#$Q,S0V80````````9=A5.[L^@5U91731!5GLHZC0```@@````^````!___
-M_[`````0`````(ZMZ`$`````````,0```L0````_````!P```K0````0````
-M9`````@``````````0```^@````&`````@````$```/I````!@````P````!
-M```#Z@````8````2`````0```^P````)````%`````$```/M````"0```#P`
-M```!```#[@````0```!,`````0```^\````&````4`````$```/Q````!```
-M`%P````!```#]@````8```!@`````0```_@````)````9`````$```/\````
-M!@```'`````!```#_0````8```"4`````0```_X````&````F@````$```0$
-M````!````*0````#```$!@````,```"P`````P``!`D````#````M@````,`
-M``0*````!````+P````#```$"P````@```#(`````P``!`P````(```!*P``
-M``,```0-````!````3`````#```$#P````@```$\`````P``!!`````(```!
-M2P````,```04````!@```5H````!```$%0````0```%T`````P``!!<````(
-M```!@`````$```08````!````8P````"```$&0````@```&4`````@``!!H`
-M```(```!SP````(```0H````!@```=T````!```$1P````0```'D`````P``
-M!$@````$```!\`````,```1)````"````?P````#```$6`````0```(`````
-M`0``!%D````(```"!`````$```1<````!````@P````#```$70````@```(8
-M`````P``!%X````(```"*@````$```1B````!@```C`````!```$9`````8`
-M``)/`````0``!&4````&```"5`````$```1F````!@```ED````!```$;```
-M``8```);`````0``!'0````$```";`````,```1U````!````G@````#```$
-M=@````@```*$`````P``!'<````$```"G`````,```1X````!````J@````#
-M0P!R<&US86UP;&4`,2XP+C``,0!386UP;&4@9&%T82!O9B!24$T@9FEL=&5R
-M(&]F(&QI8F%R8VAI=F4`4V%M<&QE(&1A=&$N`````$L)MAUC=64M9&5S:W1O
-M<``````20E-$`%5N<W!E8VEF:65D`&AT='`Z+R]C;V1E+F=O;V=L92YC;VTO
-M<"]L:6)A<F-H:79E`&QI;G5X`&YO87)C:``````````&````!@````:!I(&D
-M@:0``````````5&!``%1@0`!48%B,3DT-F%C.3(T.3)D,C,T-V,V,C,U8C1D
-M,C8Q,3$X-`!B,3DT-F%C.3(T.3)D,C,T-V,V,C,U8C1D,C8Q,3$X-`!B,3DT
-M-F%C.3(T.3)D,C,T-V,V,C,U8C1D,C8Q,3$X-```````````````````````
-M`')O;W0`<F]O=`!R;V]T`')O;W0`<F]O=`!R;V]T`')P;7-A;7!L92TQ+C`N
-M,"TQ+G-R8RYR<&T`________________<G!M<V%M<&QE`````0``2@$``$IR
-M<&UL:6(H0V]M<')E<W-E9$9I;&5.86UE<RD`<G!M;&EB*%!A>6QO861&:6QE
-M<TAA=F50<F5F:7@I`#,N,"XT+3$`-"XP+3$`-"XW+C``````"`$```@!```(
-M`0``*H<``"J(```JB0`````````(,2XP+C`M,0````````````````!F:6QE
-M,0!F:6QE,@!F:6QE,P`O971C+P`M3S(@+6<@+6UA<F-H/6DS.#8@+6UT=6YE
-M/6DV.#8`8W!I;P!G>FEP`#D`;F]A<F-H+7)P;2UL:6YU>```````````````
-M```````!`````0````$`05-#24D@=&5X=`!D:7)E8W1O<GD`````````````
-M```````````````````````````_````!____/`````0'XL(```````"`S,P
-M-S`W,#0``J-$"W,0;6&8:&*`'8#4&9H:6AA"^690V@))'AM(AC'T]%-+DO73
-M,G-2#1D8&#)2<W+RN1@8#)#=8$$_-QCA<H,E_=Q@C-4-1`!BU:&#)!@C),C1
-3T\<U2%%1$>@$!@"1O'?9"`(`````
-`
-end
diff --git a/lib/libarchive/test/test_read_format_iso_2.iso.Z.uu b/lib/libarchive/test/test_read_format_iso_2.iso.Z.uu
deleted file mode 100644
index 6851f31..0000000
--- a/lib/libarchive/test/test_read_format_iso_2.iso.Z.uu
+++ /dev/null
@@ -1,37 +0,0 @@
-$FreeBSD$
-
-begin 644 test_read_format_iso_2.iso.Z
-M'YV0``(*'$BPH,&#"!,J7,BPH<.'$"-*G$BQHL6+&#-JW,BQH\>/($.*'$FR
-MI,F3*%.J7,FRI<N7,&/*G$FSILV;.'/JW,FSI\^?0(,*'4JTJ-&C2),J7<JT
-MJ=.G4*-*G4JUJM6K6+-JW<JUJ]>O8,.*'4NVK-FS:-.J7<NVK=NW<./*G4NW
-MKMV[>//JW<NWK]^_@`,+'DRXL.'#B!,K7LRXL>/'D"-+GDRYLN7+F#-KWLRY
-ML^?/H$.+'DVZM.G3J%.K7LVZM>O7L&/+GDV[MNW;N'/KWLV[M^_?P(,+'TZ\
-MN/'CR),K7\Z\N?/GT*-+GTZ]NO7KV+-KW\Z]N_?OX,.+'T^^O/GSZ-.K7\^^
-MO?OW\./+GT^_OOW[^//KW\^_O_^_`0Q!!`PPQ!```$Z408<04Q`!PH,01BCA
-MA!16:.&%$!Z404$;>G0@``%\>"`""`#@04$>2)#0!`.)```%!<%8HD`EEF+C
-MC:4($)"(!V+HXX]`!BGDD$06:>212":IY)),-NGDDU!&*>645%9II8\R%!@#
-M##C$0(,,,6Q)PPP$DI-EF%QZ"::89,)`#H%PQBDGG&=NV>67:(Y9YH?_]>GG
-MGX7](R"!!@)JZ*&()JKHHL<="...`AU80:0`!`$B`!=0.@2CG';JZ:>@A@H8
-MGR]>:FI`DP9@*:F9!BCJJ[#&*NNLM#[EXJ,#R3A0C3C:J*.I(0)P:XP`S!@0
-MK[W^RF,`+DY*T*3&%@O`&P@X4($"!I"C[(ZJNI@I09E&6R*UUBJP@+:0@NAJ
-MK>RVZ^Z[\$;7;$'0[CIMM==FNZVZPI9*D*XT`M"KK^F&&(`)`%A0D`4&%&0`
-MN?F20RF(!`CAP@XQQ*OQQAQW['%S:)3!!AMO*/#QR2BGK/+*G7I;4+CV0FPN
-MNL`>..R_T@8\<(X%AX@P!@5AT#!!#^,[\\0!$$#$Q1FS[/334$<M-6$ACUSR
-MU%AGK?767'?M]==@ARWVV&27;?;9:*>M]MILM^WVVW#'+??<=-=M]]UXYZWW
-MWGSW[???@`<N^."$%V[XX8@GKOCBC#?N^..01R[YY)17;OGEF&>N^>:<=^[Y
-MYZ"'+OKHI)=N^NFHIZ[ZZJRW[OKKL,<N^^RTUV[[[;CGKOONO/?N^^_`!R_\
-M\,07;_SQR">O_/+,-^_\\]!'+_WTU%=O_?789Z_]]MQW[_WWX(<O_OCDEV_^
-M^>BGK_[Z[+?O_OOPQR___/37;__]^.>O__[\]^___P`,H``'2,`"&O"`"$R@
-M`A?(P`8Z\($0C*`$)TC!"EKP@AC,H`8WR,$.>O"#(`RA"$=(PA*:\(0H3*$*
-M5\C"%KKPA3",H0QG2,,:VO"&.,RA#G?(PQ[Z\(=`#*(0ATC$(AKQB$A,HA*7
-MR,0F.O&)4(RB%*=(Q2I:\8I8S*(6M\C%+GKQBV`,HQC'2,8RFO&,:$RC&M?(
-MQC:Z\8UPC*,<YTC'.MKQCGC,HQ[WR,<^^O&/@`RD(`=)R$(:\I"(3*0B%\G(
-M1CKRD9",I"0G2<E*6O*2F,RD)C?)R4YZ\I.@#*4H1TG*4IKRE*A,I2I7R<I6
-MNO*5L(RE+&=)RUK:\I:XS*4N=\G+7OKRE\`,IC"'2<QB&O.8R$RF,I?)S&8Z
-M\YG0C*8TITG-:EKSFMC,IC:WR<UN>O.;X`RG.,=)SG*:\YSH3*<ZU\G.=KKS
-MG?",ISSG2<]ZVO.>^,RG/O?)SW[Z\Y\`#:A`!TK0@AKTH`A-J$(7RM"&.O2A
-M$(VH1"=*T8I:]*(8S:A&-\K1CGKTHR`-J4A'2M*2FO2D*$VI2E?*TI:Z]*4P
-MC:E,9TK3FMKTICC-J4YWRM.>^O2G0`VJ4(=*U*(:]:A(3:I2E\K4ICKUJ5"-
-MJE2G2M6J6O6J6,VJ5K?*U:YZ]:M@#:M8QTK6LIKUK&A-JUK7RM:VNO6M<`TG
-`
-end
diff --git a/lib/libarchive/test/test_read_format_iso_gz.c b/lib/libarchive/test/test_read_format_iso_gz.c
deleted file mode 100644
index d0d6b3c..0000000
--- a/lib/libarchive/test/test_read_format_iso_gz.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/*-
- * Copyright (c) 2003-2007 Tim Kientzle
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-#include "test.h"
-__FBSDID("$FreeBSD$");
-
-static void
-test1(void)
-{
- struct archive_entry *ae;
- struct archive *a;
- const char *name = "test_read_format_iso.iso.Z";
-
- extract_reference_file(name);
-
- assert((a = archive_read_new()) != NULL);
- assertEqualIntA(a, ARCHIVE_OK,
- archive_read_support_compression_all(a));
- assertEqualIntA(a, ARCHIVE_OK,
- archive_read_support_format_all(a));
- assertEqualIntA(a, ARCHIVE_OK,
- archive_read_open_filename(a, name, 512));
- assertEqualIntA(a, ARCHIVE_OK,
- archive_read_next_header(a, &ae));
- assertEqualInt(archive_compression(a),
- ARCHIVE_COMPRESSION_COMPRESS);
- assertEqualInt(archive_format(a), ARCHIVE_FORMAT_ISO9660);
- assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
- assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
-}
-
-static
-void test2(void)
-{
- struct archive_entry *ae;
- struct archive *a;
- const char *name = "test_read_format_iso_2.iso.Z";
-
- extract_reference_file(name);
-
- assert((a = archive_read_new()) != NULL);
- assertEqualIntA(a, ARCHIVE_OK,
- archive_read_support_compression_all(a));
- assertEqualIntA(a, ARCHIVE_OK,
- archive_read_support_format_all(a));
- assertEqualIntA(a, ARCHIVE_OK,
- archive_read_open_filename(a, name, 512));
- assertEqualIntA(a, ARCHIVE_OK,
- archive_read_next_header(a, &ae));
- assertEqualString(".", archive_entry_pathname(ae));
- assertEqualIntA(a, ARCHIVE_OK,
- archive_read_next_header(a, &ae));
- assertEqualString("A", archive_entry_pathname(ae));
- assertEqualIntA(a, ARCHIVE_OK,
- archive_read_next_header(a, &ae));
- assertEqualString("A/B", archive_entry_pathname(ae));
- assertEqualIntA(a, ARCHIVE_OK,
- archive_read_next_header(a, &ae));
- assertEqualString("C", archive_entry_pathname(ae));
- assertEqualIntA(a, ARCHIVE_OK,
- archive_read_next_header(a, &ae));
- assertEqualString("C/D", archive_entry_pathname(ae));
- assertEqualIntA(a, ARCHIVE_EOF,
- archive_read_next_header(a, &ae));
- assertEqualInt(archive_compression(a),
- ARCHIVE_COMPRESSION_COMPRESS);
- assertEqualInt(archive_format(a), ARCHIVE_FORMAT_ISO9660);
- assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
- assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
-}
-
-DEFINE_TEST(test_read_format_iso_gz)
-{
- test1();
- test2();
-}
-
-
diff --git a/lib/libc/Makefile b/lib/libc/Makefile
index 77c7ce0..bcf1797 100644
--- a/lib/libc/Makefile
+++ b/lib/libc/Makefile
@@ -127,8 +127,8 @@ SRCS+= ${_src}
KQSRCS= adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \
lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \
subdi3.c ucmpdi2.c udivdi3.c umoddi3.c xordi3.c
-KSRCS= bcmp.c ffs.c ffsl.c fls.c flsl.c index.c mcount.c rindex.c \
- strcat.c strcmp.c strcpy.c strlen.c strncpy.c
+KSRCS= bcmp.c ffs.c ffsl.c fls.c flsl.c mcount.c strcat.c strchr.c \
+ strcmp.c strcpy.c strlen.c strncpy.c strrchr.c
libkern: libkern.gen libkern.${LIBC_ARCH}
diff --git a/lib/libc/amd64/gen/Makefile.inc b/lib/libc/amd64/gen/Makefile.inc
index 30fb05f..fb4f7f4 100644
--- a/lib/libc/amd64/gen/Makefile.inc
+++ b/lib/libc/amd64/gen/Makefile.inc
@@ -2,7 +2,7 @@
# $FreeBSD$
SRCS+= _setjmp.S _set_tp.c rfork_thread.S setjmp.S sigsetjmp.S \
- fabs.S \
+ fabs.S getcontextx.c \
infinity.c ldexp.c makecontext.c signalcontext.c \
flt_rounds.c fpgetmask.c fpsetmask.c fpgetprec.c fpsetprec.c \
fpgetround.c fpsetround.c fpgetsticky.c
diff --git a/lib/libc/amd64/gen/getcontextx.c b/lib/libc/amd64/gen/getcontextx.c
new file mode 100644
index 0000000..24361bc
--- /dev/null
+++ b/lib/libc/amd64/gen/getcontextx.c
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2011 Konstantin Belousov <kib@FreeBSD.org>
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/types.h>
+#include <sys/ucontext.h>
+#include <errno.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <machine/cpufunc.h>
+#include <machine/fpu.h>
+#include <machine/specialreg.h>
+#include <machine/sysarch.h>
+
+static int xstate_sz = -1;
+
+size_t
+__getcontextx_size(void)
+{
+ u_int p[4];
+
+ if (xstate_sz == -1) {
+ do_cpuid(1, p);
+ if ((p[2] & CPUID2_OSXSAVE) != 0) {
+ cpuid_count(0xd, 0x0, p);
+ xstate_sz = p[1] - sizeof(struct savefpu);
+ } else
+ xstate_sz = 0;
+ }
+
+ return (sizeof(ucontext_t) + xstate_sz);
+}
+
+int
+__fillcontextx(char *ctx)
+{
+ struct amd64_get_xfpustate xfpu;
+ ucontext_t *ucp;
+
+ ucp = (ucontext_t *)ctx;
+ if (getcontext(ucp) == -1)
+ return (-1);
+ if (xstate_sz != 0) {
+ xfpu.addr = (char *)(ucp + 1);
+ xfpu.len = xstate_sz;
+ if (sysarch(AMD64_GET_XFPUSTATE, &xfpu) == -1)
+ return (-1);
+ ucp->uc_mcontext.mc_xfpustate = (__register_t)xfpu.addr;
+ ucp->uc_mcontext.mc_xfpustate_len = xstate_sz;
+ ucp->uc_mcontext.mc_flags |= _MC_HASFPXSTATE;
+ } else {
+ ucp->uc_mcontext.mc_xfpustate = 0;
+ ucp->uc_mcontext.mc_xfpustate_len = 0;
+ }
+ return (0);
+}
+
+__weak_reference(__getcontextx, getcontextx);
+
+ucontext_t *
+__getcontextx(void)
+{
+ char *ctx;
+ int error;
+
+ ctx = malloc(__getcontextx_size());
+ if (ctx == NULL)
+ return (NULL);
+ if (__fillcontextx(ctx) == -1) {
+ error = errno;
+ free(ctx);
+ errno = error;
+ return (NULL);
+ }
+ return ((ucontext_t *)ctx);
+}
diff --git a/lib/libc/arm/_fpmath.h b/lib/libc/arm/_fpmath.h
index b0ce8f4..4c18945 100644
--- a/lib/libc/arm/_fpmath.h
+++ b/lib/libc/arm/_fpmath.h
@@ -55,9 +55,10 @@ union IEEEl2bits {
};
#define LDBL_NBIT 0
+#define LDBL_IMPLICIT_NBIT
#define mask_nbit_l(u) ((void)0)
-#define LDBL_MANH_SIZE 32
+#define LDBL_MANH_SIZE 20
#define LDBL_MANL_SIZE 32
#define LDBL_TO_ARRAY32(u, a) do { \
diff --git a/lib/libc/arm/gen/Makefile.inc b/lib/libc/arm/gen/Makefile.inc
index fb9d885..b47f57d 100644
--- a/lib/libc/arm/gen/Makefile.inc
+++ b/lib/libc/arm/gen/Makefile.inc
@@ -2,5 +2,5 @@
# $FreeBSD$
SRCS+= _ctx_start.S _setjmp.S _set_tp.c alloca.S fabs.c \
- infinity.c ldexp.c makecontext.c \
- setjmp.S signalcontext.c sigsetjmp.S divsi3.S
+ getcontextx.c infinity.c ldexp.c makecontext.c \
+ setjmp.S signalcontext.c sigsetjmp.S divsi3.S flt_rounds.c
diff --git a/lib/libc/arm/gen/flt_rounds.c b/lib/libc/arm/gen/flt_rounds.c
new file mode 100644
index 0000000..81ab08b
--- /dev/null
+++ b/lib/libc/arm/gen/flt_rounds.c
@@ -0,0 +1,65 @@
+/*-
+ * Copyright (c) 2012 Ian Lepore <freebsd@damnhippie.dyndns.org>
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <fenv.h>
+#include <float.h>
+
+#include "softfloat-for-gcc.h"
+#include "milieu.h"
+#include "softfloat.h"
+
+int
+__flt_rounds(void)
+{
+
+#ifndef ARM_HARD_FLOAT
+ /*
+ * Translate our rounding modes to the unnamed
+ * manifest constants required by C99 et. al.
+ */
+ switch (__softfloat_float_rounding_mode) {
+ case FE_TOWARDZERO:
+ return (0);
+ case FE_TONEAREST:
+ return (1);
+ case FE_UPWARD:
+ return (2);
+ case FE_DOWNWARD:
+ return (3);
+ }
+ return (-1);
+#else /* ARM_HARD_FLOAT */
+ /*
+ * Apparently, the rounding mode is specified as part of the
+ * instruction format on ARM, so the dynamic rounding mode is
+ * indeterminate. Some FPUs may differ.
+ */
+ return (-1);
+#endif /* ARM_HARD_FLOAT */
+}
diff --git a/lib/libc/arm/gen/getcontextx.c b/lib/libc/arm/gen/getcontextx.c
new file mode 100644
index 0000000..b701c18
--- /dev/null
+++ b/lib/libc/arm/gen/getcontextx.c
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2011 Konstantin Belousov <kib@FreeBSD.org>
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/types.h>
+#include <sys/ucontext.h>
+#include <errno.h>
+#include <stdlib.h>
+
+size_t
+__getcontextx_size(void)
+{
+
+ return (sizeof(ucontext_t));
+}
+
+int
+__fillcontextx(char *ctx)
+{
+ ucontext_t *ucp;
+
+ ucp = (ucontext_t *)ctx;
+ return (getcontext(ucp));
+}
+
+__weak_reference(__getcontextx, getcontextx);
+
+ucontext_t *
+__getcontextx(void)
+{
+ char *ctx;
+ int error;
+
+ ctx = malloc(__getcontextx_size());
+ if (ctx == NULL)
+ return (NULL);
+ if (__fillcontextx(ctx) == -1) {
+ error = errno;
+ free(ctx);
+ errno = error;
+ return (NULL);
+ }
+ return ((ucontext_t *)ctx);
+}
diff --git a/lib/libc/arm/softfloat/softfloat.h b/lib/libc/arm/softfloat/softfloat.h
index 50b5fa6..6aef499 100644
--- a/lib/libc/arm/softfloat/softfloat.h
+++ b/lib/libc/arm/softfloat/softfloat.h
@@ -45,7 +45,7 @@ the `FLOAT128' macro and the quadruple-precision format `float128'.
/* #define FLOATX80 */
/* #define FLOAT128 */
-#include <machine/ieeefp.h>
+#include <fenv.h>
/*
-------------------------------------------------------------------------------
@@ -84,12 +84,12 @@ enum {
Software IEC/IEEE floating-point rounding mode.
-------------------------------------------------------------------------------
*/
-extern fp_rnd_t float_rounding_mode;
+extern int float_rounding_mode;
enum {
- float_round_nearest_even = FP_RN,
- float_round_to_zero = FP_RZ,
- float_round_down = FP_RM,
- float_round_up = FP_RP
+ float_round_nearest_even = FE_TONEAREST,
+ float_round_to_zero = FE_TOWARDZERO,
+ float_round_down = FE_DOWNWARD,
+ float_round_up = FE_UPWARD
};
/*
@@ -97,14 +97,14 @@ enum {
Software IEC/IEEE floating-point exception flags.
-------------------------------------------------------------------------------
*/
-extern fp_except float_exception_flags;
-extern fp_except float_exception_mask;
+extern int float_exception_flags;
+extern int float_exception_mask;
enum {
- float_flag_inexact = FP_X_IMP,
- float_flag_underflow = FP_X_UFL,
- float_flag_overflow = FP_X_OFL,
- float_flag_divbyzero = FP_X_DZ,
- float_flag_invalid = FP_X_INV
+ float_flag_inexact = FE_INEXACT,
+ float_flag_underflow = FE_UNDERFLOW,
+ float_flag_overflow = FE_OVERFLOW,
+ float_flag_divbyzero = FE_DIVBYZERO,
+ float_flag_invalid = FE_INVALID
};
/*
@@ -113,7 +113,7 @@ Routine to raise any or all of the software IEC/IEEE floating-point
exception flags.
-------------------------------------------------------------------------------
*/
-void float_raise( fp_except );
+void float_raise( int );
/*
-------------------------------------------------------------------------------
diff --git a/lib/libc/arm/string/Makefile.inc b/lib/libc/arm/string/Makefile.inc
index 6658ce7..0ba43e6 100644
--- a/lib/libc/arm/string/Makefile.inc
+++ b/lib/libc/arm/string/Makefile.inc
@@ -1,7 +1,6 @@
# @(#)Makefile.inc 8.1 (Berkeley) 6/4/93
# $FreeBSD$
-MDSRCS+=bcmp.c bcopy.S bzero.S ffs.S index.c memchr.c memcmp.S memcpy.S \
- memmove.S memset.S rindex.c strcat.c strchr.c strcmp.S strcpy.c \
- strlen.S strncmp.S strrchr.c swab.c wcschr.c wcscmp.c wcslen.c \
- wmemchr.c
+MDSRCS+=bcmp.c bcopy.S bzero.S ffs.S memchr.c memcmp.S memcpy.S \
+ memmove.S memset.S strcat.c strchr.c strcmp.S strcpy.c strlen.S \
+ strncmp.S strrchr.c swab.c wcschr.c wcscmp.c wcslen.c wmemchr.c
diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc
index d3ccf0a..11d1a58 100644
--- a/lib/libc/gen/Makefile.inc
+++ b/lib/libc/gen/Makefile.inc
@@ -20,6 +20,7 @@ SRCS+= __getosreldate.c __xuname.c \
getpeereid.c getprogname.c getpwent.c getttyent.c \
getusershell.c getutxent.c getvfsbyname.c glob.c \
initgroups.c isatty.c isinf.c isnan.c jrand48.c lcong48.c \
+ libc_dlopen.c \
lockf.c lrand48.c mrand48.c nftw.c nice.c \
nlist.c nrand48.c opendir.c \
pause.c pmadvise.c popen.c posix_spawn.c \
@@ -94,8 +95,8 @@ MLINKS+=directory.3 closedir.3 directory.3 dirfd.3 directory.3 opendir.3 \
directory.3 fdopendir.3 \
directory.3 readdir.3 directory.3 readdir_r.3 directory.3 rewinddir.3 \
directory.3 seekdir.3 directory.3 telldir.3
-MLINKS+=dlopen.3 dlclose.3 dlopen.3 dlerror.3 dlopen.3 dlfunc.3 \
- dlopen.3 dlsym.3
+MLINKS+=dlopen.3 fdlopen.3 dlopen.3 dlclose.3 dlopen.3 dlerror.3 \
+ dlopen.3 dlfunc.3 dlopen.3 dlsym.3
MLINKS+=err.3 err_set_exit.3 err.3 err_set_file.3 err.3 errc.3 err.3 errx.3 \
err.3 verr.3 err.3 verrc.3 err.3 verrx.3 err.3 vwarn.3 err.3 vwarnc.3 \
err.3 vwarnx.3 err.3 warnc.3 err.3 warn.3 err.3 warnx.3
diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map
index c62e016..d794c0a 100644
--- a/lib/libc/gen/Symbol.map
+++ b/lib/libc/gen/Symbol.map
@@ -381,6 +381,12 @@ FBSD_1.2 {
setutxent;
};
+FBSD_1.3 {
+ fdlopen;
+ __FreeBSD_libc_enter_restricted_mode;
+ getcontextx;
+};
+
FBSDprivate_1.0 {
/* needed by thread libraries */
__thr_jtable;
@@ -502,4 +508,6 @@ FBSDprivate_1.0 {
__elf_aux_vector;
__pthread_map_stacks_exec;
+ __fillcontextx;
+ __getcontextx_size;
};
diff --git a/lib/libc/gen/dlfcn.c b/lib/libc/gen/dlfcn.c
index b109cc9..7be9f87 100644
--- a/lib/libc/gen/dlfcn.c
+++ b/lib/libc/gen/dlfcn.c
@@ -147,6 +147,15 @@ dl_iterate_phdr(int (*callback)(struct dl_phdr_info *, size_t, void *),
return 0;
}
+#pragma weak fdlopen
+void *
+fdlopen(int fd, int mode)
+{
+
+ _rtld_error(sorry);
+ return NULL;
+}
+
#pragma weak _rtld_atfork_pre
void
_rtld_atfork_pre(int *locks)
diff --git a/lib/libc/gen/dlopen.3 b/lib/libc/gen/dlopen.3
index 3da9b6e..089e631 100644
--- a/lib/libc/gen/dlopen.3
+++ b/lib/libc/gen/dlopen.3
@@ -32,11 +32,12 @@
.\" @(#) dlopen.3 1.6 90/01/31 SMI
.\" $FreeBSD$
.\"
-.Dd July 7, 2009
+.Dd December 21, 2011
.Dt DLOPEN 3
.Os
.Sh NAME
.Nm dlopen ,
+.Nm fdlopen ,
.Nm dlsym ,
.Nm dlfunc ,
.Nm dlerror ,
@@ -49,6 +50,8 @@
.Ft void *
.Fn dlopen "const char *path" "int mode"
.Ft void *
+.Fn fdlopen "int fd" "int mode"
+.Ft void *
.Fn dlsym "void * restrict handle" "const char * restrict symbol"
.Ft dlfunc_t
.Fn dlfunc "void * restrict handle" "const char * restrict symbol"
@@ -164,6 +167,36 @@ be interrogated with
.Fn dlerror .
.Pp
The
+.Fn fdlopen
+function is similar to
+.Fn dlopen ,
+but it takes the file descriptor argument
+.Fa fd ,
+which is used for the file operations needed to load an object
+into the address space.
+The file descriptor
+.Fa fd
+is not closed by the function regardless a result of execution,
+but a duplicate of the file descriptor is.
+This may be important if a
+.Xr lockf 3
+lock is held on the passed descriptor.
+The
+.Fa fd
+argument -1 is interpreted as a reference to the main
+executable of the process, similar to
+.Va NULL
+value for the
+.Fa name
+argument to
+.Fn dlopen .
+The
+.Fn fdlopen
+function can be used by the code that needs to perform
+additional checks on the loaded objects, to prevent races with
+symlinking or renames.
+.Pp
+The
.Fn dlsym
function
returns the address binding of the symbol described in the null-terminated
@@ -354,6 +387,7 @@ option to the C language compiler.
.Sh ERRORS
The
.Fn dlopen ,
+.Fn fdlopen ,
.Fn dlsym ,
and
.Fn dlfunc
diff --git a/lib/libc/gen/exec.c b/lib/libc/gen/exec.c
index b83136e..4998ee8 100644
--- a/lib/libc/gen/exec.c
+++ b/lib/libc/gen/exec.c
@@ -159,7 +159,7 @@ execvPe(const char *name, const char *path, char * const *argv,
eacces = 0;
/* If it's an absolute or relative path name, it's easy. */
- if (index(name, '/')) {
+ if (strchr(name, '/')) {
bp = name;
cur = NULL;
goto retry;
diff --git a/lib/libc/gen/getcontext.3 b/lib/libc/gen/getcontext.3
index 2fda6b8..5b801fd 100644
--- a/lib/libc/gen/getcontext.3
+++ b/lib/libc/gen/getcontext.3
@@ -35,11 +35,11 @@
.\"
.\" $FreeBSD$
.\"
-.Dd September 10, 2002
+.Dd December 26, 2011
.Dt GETCONTEXT 3
.Os
.Sh NAME
-.Nm getcontext , setcontext
+.Nm getcontext , getcontextx , setcontext
.Nd get and set user thread context
.Sh LIBRARY
.Lb libc
@@ -59,6 +59,20 @@ This saved context may then later be restored by calling
.Fn setcontext .
.Pp
The
+.Fn getcontextx
+function saves the current execution context in the newly allocated structure
+.Vt ucontext_t ,
+which is returned on success.
+If architecture defines additional CPU states that can be stored in extended
+blocks referenced from the
+.Vt ucontext_t ,
+the memory for them may be allocated and their context also stored.
+Memory returned by
+.Fn getcontextx
+function shall be freed using
+.Fn free 3 .
+.Pp
+The
.Fn setcontext
function
makes a previously saved thread context the current thread context, i.e.,
@@ -109,11 +123,24 @@ If successful,
returns zero and
.Fn setcontext
does not return; otherwise \-1 is returned.
+The
+.Fn getcontextx
+returns pointer to the allocated and initialized context on success, and
+.Va NULL
+on failure.
.Sh ERRORS
No errors are defined for
.Fn getcontext
or
.Fn setcontext .
+The
+.Fn getcontextx
+may return the following errors in
+.Va errno :
+.Bl -tag -width Er
+.It Bq Er ENOMEM
+No memory was available to allocate for the context or some extended state.
+.El
.Sh SEE ALSO
.Xr sigaction 2 ,
.Xr sigaltstack 2 ,
diff --git a/lib/libc/gen/getosreldate.c b/lib/libc/gen/getosreldate.c
index 83bdc85..b4bf545 100644
--- a/lib/libc/gen/getosreldate.c
+++ b/lib/libc/gen/getosreldate.c
@@ -33,12 +33,11 @@ static char sccsid[] = "@(#)gethostid.c 8.1 (Berkeley) 6/2/93";
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/sysctl.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <osreldate.h>
+#include <stdlib.h>
+#include <unistd.h>
int
getosreldate(void)
diff --git a/lib/libc/gen/getttyent.c b/lib/libc/gen/getttyent.c
index 9b9e3ea..f2fc298 100644
--- a/lib/libc/gen/getttyent.c
+++ b/lib/libc/gen/getttyent.c
@@ -78,7 +78,7 @@ getttyent(void)
if (!fgets(p = line, lbsize, tf))
return (NULL);
/* extend buffer if line was too big, and retry */
- while (!index(p, '\n') && !feof(tf)) {
+ while (!strchr(p, '\n') && !feof(tf)) {
i = strlen(p);
lbsize += MALLOCCHUNK;
if ((p = realloc(line, lbsize)) == NULL) {
@@ -148,7 +148,7 @@ getttyent(void)
tty.ty_comment = p;
if (*p == 0)
tty.ty_comment = 0;
- if ( (p = index(p, '\n')) )
+ if ((p = strchr(p, '\n')))
*p = '\0';
return (&tty);
}
@@ -196,7 +196,7 @@ static char *
value(char *p)
{
- return ((p = index(p, '=')) ? ++p : NULL);
+ return ((p = strchr(p, '=')) ? ++p : NULL);
}
int
diff --git a/lib/libc/gen/getusershell.c b/lib/libc/gen/getusershell.c
index d09b50c..ce50069 100644
--- a/lib/libc/gen/getusershell.c
+++ b/lib/libc/gen/getusershell.c
@@ -58,12 +58,6 @@ __FBSDID("$FreeBSD$");
#endif
#include "un-namespace.h"
-/*
- * Local shells should NOT be added here. They should be added in
- * /etc/shells.
- */
-
-static const char *const okshells[] = { _PATH_BSHELL, _PATH_CSHELL, NULL };
static const char *const *curshell;
static StringList *sl;
@@ -261,8 +255,13 @@ initshells()
!= NS_SUCCESS) {
if (sl)
sl_free(sl, 1);
- sl = NULL;
- return (okshells);
+ sl = sl_init();
+ /*
+ * Local shells should NOT be added here. They should be
+ * added in /etc/shells.
+ */
+ sl_add(sl, strdup(_PATH_BSHELL));
+ sl_add(sl, strdup(_PATH_CSHELL));
}
sl_add(sl, NULL);
diff --git a/lib/libc/gen/getutxent.3 b/lib/libc/gen/getutxent.3
index e7bfae4..2707ee8 100644
--- a/lib/libc/gen/getutxent.3
+++ b/lib/libc/gen/getutxent.3
@@ -418,7 +418,6 @@ The file format is invalid.
.Sh SEE ALSO
.Xr last 1 ,
.Xr write 1 ,
-.Xr wtmpcvt 1 ,
.Xr getpid 2 ,
.Xr gettimeofday 2 ,
.Xr tty 4 ,
diff --git a/lib/libc/gen/glob.3 b/lib/libc/gen/glob.3
index 7d6e43b..468a73b 100644
--- a/lib/libc/gen/glob.3
+++ b/lib/libc/gen/glob.3
@@ -30,7 +30,7 @@
.\" @(#)glob.3 8.3 (Berkeley) 4/16/94
.\" $FreeBSD$
.\"
-.Dd February 15, 2011
+.Dd December 20, 2011
.Dt GLOB 3
.Os
.Sh NAME
@@ -42,7 +42,7 @@
.Sh SYNOPSIS
.In glob.h
.Ft int
-.Fn glob "const char *pattern" "int flags" "int (*errfunc)(const char *, int)" "glob_t *pglob"
+.Fn glob "const char * restrict pattern" "int flags" "int (*errfunc)(const char *, int)" "glob_t * restrict pglob"
.Ft void
.Fn globfree "glob_t *pglob"
.Sh DESCRIPTION
diff --git a/lib/libc/gen/glob.c b/lib/libc/gen/glob.c
index 59663d9..211b535 100644
--- a/lib/libc/gen/glob.c
+++ b/lib/libc/gen/glob.c
@@ -168,7 +168,8 @@ static void qprintf(const char *, Char *);
#endif
int
-glob(const char *pattern, int flags, int (*errfunc)(const char *, int), glob_t *pglob)
+glob(const char * __restrict pattern, int flags,
+ int (*errfunc)(const char *, int), glob_t * __restrict pglob)
{
const char *patnext;
size_t limit;
@@ -231,9 +232,9 @@ glob(const char *pattern, int flags, int (*errfunc)(const char *, int), glob_t *
*bufnext = EOS;
if (flags & GLOB_BRACE)
- return globexp1(patbuf, pglob, &limit);
+ return (globexp1(patbuf, pglob, &limit));
else
- return glob0(patbuf, pglob, &limit);
+ return (glob0(patbuf, pglob, &limit));
}
/*
@@ -303,7 +304,7 @@ globexp2(const Char *ptr, const Char *pattern, glob_t *pglob, int *rv, size_t *l
/* Non matching braces; just glob the pattern */
if (i != 0 || *pe == EOS) {
*rv = glob0(patbuf, pglob, limit);
- return 0;
+ return (0);
}
for (i = 0, pl = pm = ptr; pm <= pe; pm++)
@@ -360,7 +361,7 @@ globexp2(const Char *ptr, const Char *pattern, glob_t *pglob, int *rv, size_t *l
break;
}
*rv = 0;
- return 0;
+ return (0);
}
@@ -377,7 +378,7 @@ globtilde(const Char *pattern, Char *patbuf, size_t patbuf_len, glob_t *pglob)
Char *b, *eb;
if (*pattern != TILDE || !(pglob->gl_flags & GLOB_TILDE))
- return pattern;
+ return (pattern);
/*
* Copy up to the end of the string or /
@@ -402,7 +403,7 @@ globtilde(const Char *pattern, Char *patbuf, size_t patbuf_len, glob_t *pglob)
(pwd = getpwuid(getuid())) != NULL)
h = pwd->pw_dir;
else
- return pattern;
+ return (pattern);
}
}
else {
@@ -410,7 +411,7 @@ globtilde(const Char *pattern, Char *patbuf, size_t patbuf_len, glob_t *pglob)
* Expand a ~user
*/
if ((pwd = getpwnam((char*) patbuf)) == NULL)
- return pattern;
+ return (pattern);
else
h = pwd->pw_dir;
}
@@ -424,7 +425,7 @@ globtilde(const Char *pattern, Char *patbuf, size_t patbuf_len, glob_t *pglob)
continue;
*b = EOS;
- return patbuf;
+ return (patbuf);
}
@@ -511,20 +512,20 @@ glob0(const Char *pattern, glob_t *pglob, size_t *limit)
if (((pglob->gl_flags & GLOB_NOCHECK) ||
((pglob->gl_flags & GLOB_NOMAGIC) &&
!(pglob->gl_flags & GLOB_MAGCHAR))))
- return(globextend(pattern, pglob, limit));
+ return (globextend(pattern, pglob, limit));
else
- return(GLOB_NOMATCH);
+ return (GLOB_NOMATCH);
}
if (!(pglob->gl_flags & GLOB_NOSORT))
qsort(pglob->gl_pathv + pglob->gl_offs + oldpathc,
pglob->gl_pathc - oldpathc, sizeof(char *), compare);
- return(0);
+ return (0);
}
static int
compare(const void *p, const void *q)
{
- return(strcmp(*(char **)p, *(char **)q));
+ return (strcmp(*(char **)p, *(char **)q));
}
static int
@@ -534,8 +535,8 @@ glob1(Char *pattern, glob_t *pglob, size_t *limit)
/* A null pathname is invalid -- POSIX 1003.1 sect. 2.4. */
if (*pattern == EOS)
- return(0);
- return(glob2(pathbuf, pathbuf, pathbuf + MAXPATHLEN - 1,
+ return (0);
+ return (glob2(pathbuf, pathbuf, pathbuf + MAXPATHLEN - 1,
pattern, pglob, limit));
}
@@ -560,7 +561,7 @@ glob2(Char *pathbuf, Char *pathend, Char *pathend_last, Char *pattern,
if (*pattern == EOS) { /* End of pattern? */
*pathend = EOS;
if (g_lstat(pathbuf, &sb, pglob))
- return(0);
+ return (0);
if (((pglob->gl_flags & GLOB_MARK) &&
pathend[-1] != SEP) && (S_ISDIR(sb.st_mode)
@@ -573,7 +574,7 @@ glob2(Char *pathbuf, Char *pathend, Char *pathend_last, Char *pattern,
*pathend = EOS;
}
++pglob->gl_matchc;
- return(globextend(pathbuf, pglob, limit));
+ return (globextend(pathbuf, pglob, limit));
}
/* Find end of next segment, copy tentatively to pathend. */
@@ -596,8 +597,8 @@ glob2(Char *pathbuf, Char *pathend, Char *pathend_last, Char *pattern,
*pathend++ = *pattern++;
}
} else /* Need expansion, recurse. */
- return(glob3(pathbuf, pathend, pathend_last, pattern, p,
- pglob, limit));
+ return (glob3(pathbuf, pathend, pathend_last, pattern,
+ p, pglob, limit));
}
/* NOTREACHED */
}
@@ -634,7 +635,7 @@ glob3(Char *pathbuf, Char *pathend, Char *pathend_last,
pglob->gl_flags & GLOB_ERR)
return (GLOB_ABORTED);
}
- return(0);
+ return (0);
}
err = 0;
@@ -682,7 +683,7 @@ glob3(Char *pathbuf, Char *pathend, Char *pathend_last,
(*pglob->gl_closedir)(dirp);
else
closedir(dirp);
- return(err);
+ return (err);
}
@@ -722,7 +723,7 @@ globextend(const Char *path, glob_t *pglob, size_t *limit)
free(pglob->gl_pathv);
pglob->gl_pathv = NULL;
}
- return(GLOB_NOSPACE);
+ return (GLOB_NOSPACE);
}
if (pglob->gl_pathv == NULL && pglob->gl_offs > 0) {
@@ -744,7 +745,7 @@ globextend(const Char *path, glob_t *pglob, size_t *limit)
pathv[pglob->gl_offs + pglob->gl_pathc++] = copy;
}
pathv[pglob->gl_offs + pglob->gl_pathc] = NULL;
- return(copy == NULL ? GLOB_NOSPACE : 0);
+ return (copy == NULL ? GLOB_NOSPACE : 0);
}
/*
@@ -764,20 +765,20 @@ match(Char *name, Char *pat, Char *patend)
switch (c & M_MASK) {
case M_ALL:
if (pat == patend)
- return(1);
+ return (1);
do
if (match(name, pat, patend))
- return(1);
+ return (1);
while (*name++ != EOS);
- return(0);
+ return (0);
case M_ONE:
if (*name++ == EOS)
- return(0);
+ return (0);
break;
case M_SET:
ok = 0;
if ((k = *name++) == EOS)
- return(0);
+ return (0);
if ((negate_range = ((*pat & M_MASK) == M_NOT)) != EOS)
++pat;
while (((c = *pat++) & M_MASK) != M_END)
@@ -792,15 +793,15 @@ match(Char *name, Char *pat, Char *patend)
} else if (c == k)
ok = 1;
if (ok == negate_range)
- return(0);
+ return (0);
break;
default:
if (*name++ != c)
- return(0);
+ return (0);
break;
}
}
- return(*name == EOS);
+ return (*name == EOS);
}
/* Free allocated data belonging to a glob_t structure. */
@@ -833,9 +834,9 @@ g_opendir(Char *str, glob_t *pglob)
}
if (pglob->gl_flags & GLOB_ALTDIRFUNC)
- return((*pglob->gl_opendir)(buf));
+ return ((*pglob->gl_opendir)(buf));
- return(opendir(buf));
+ return (opendir(buf));
}
static int
@@ -849,7 +850,7 @@ g_lstat(Char *fn, struct stat *sb, glob_t *pglob)
}
if (pglob->gl_flags & GLOB_ALTDIRFUNC)
return((*pglob->gl_lstat)(buf, sb));
- return(lstat(buf, sb));
+ return (lstat(buf, sb));
}
static int
@@ -862,8 +863,8 @@ g_stat(Char *fn, struct stat *sb, glob_t *pglob)
return (-1);
}
if (pglob->gl_flags & GLOB_ALTDIRFUNC)
- return((*pglob->gl_stat)(buf, sb));
- return(stat(buf, sb));
+ return ((*pglob->gl_stat)(buf, sb));
+ return (stat(buf, sb));
}
static const Char *
diff --git a/lib/libc/gen/libc_dlopen.c b/lib/libc/gen/libc_dlopen.c
new file mode 100644
index 0000000..2b1aa9e
--- /dev/null
+++ b/lib/libc/gen/libc_dlopen.c
@@ -0,0 +1,61 @@
+/*-
+ * Copyright (c) 2011 Xin Li <delphij@FreeBSD.org>
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <dlfcn.h>
+#include <stddef.h>
+#include <unistd.h>
+
+#include "libc_private.h"
+
+/*
+ * Whether we want to restrict dlopen()s.
+ */
+static int __libc_restricted_mode = 0;
+
+void *
+libc_dlopen(const char *path, int mode)
+{
+
+ if (__libc_restricted_mode) {
+ _rtld_error("Service unavailable -- libc in restricted mode");
+ return (NULL);
+ } else
+ return (dlopen(path, mode));
+}
+
+void
+__FreeBSD_libc_enter_restricted_mode(void)
+{
+
+ __libc_restricted_mode = 1;
+ return;
+}
+
diff --git a/lib/libc/gen/sem.c b/lib/libc/gen/sem.c
index e9ae669..842298f 100644
--- a/lib/libc/gen/sem.c
+++ b/lib/libc/gen/sem.c
@@ -434,7 +434,7 @@ _libc_sem_post_compat(sem_t *sem)
return ksem_post((*sem)->semid);
atomic_add_rel_int(&(*sem)->count, 1);
-
+ rmb();
if ((*sem)->nwaiters)
return _umtx_wake(&(*sem)->count);
return (0);
diff --git a/lib/libc/gen/sem_new.c b/lib/libc/gen/sem_new.c
index 2698b40..1480afb 100644
--- a/lib/libc/gen/sem_new.c
+++ b/lib/libc/gen/sem_new.c
@@ -332,6 +332,7 @@ _sem_getvalue(sem_t * __restrict sem, int * __restrict sval)
static __inline int
usem_wake(struct _usem *sem)
{
+ rmb();
if (!sem->_has_waiters)
return (0);
return _umtx_op(sem, UMTX_OP_SEM_WAKE, 0, NULL, NULL);
diff --git a/lib/libc/gen/strtofflags.c b/lib/libc/gen/strtofflags.c
index 12db2b4..1edaa5a 100644
--- a/lib/libc/gen/strtofflags.c
+++ b/lib/libc/gen/strtofflags.c
@@ -41,35 +41,35 @@ __FBSDID("$FreeBSD$");
#include <string.h>
#include <unistd.h>
+#define longestflaglen 12
static struct {
- char *name;
+ char name[longestflaglen + 1];
+ char invert;
u_long flag;
- int invert;
-} mapping[] = {
+} const mapping[] = {
/* shorter names per flag first, all prefixed by "no" */
- { "nosappnd", SF_APPEND, 0 },
- { "nosappend", SF_APPEND, 0 },
- { "noarch", SF_ARCHIVED, 0 },
- { "noarchived", SF_ARCHIVED, 0 },
- { "noschg", SF_IMMUTABLE, 0 },
- { "noschange", SF_IMMUTABLE, 0 },
- { "nosimmutable", SF_IMMUTABLE, 0 },
- { "nosunlnk", SF_NOUNLINK, 0 },
- { "nosunlink", SF_NOUNLINK, 0 },
+ { "nosappnd", 0, SF_APPEND },
+ { "nosappend", 0, SF_APPEND },
+ { "noarch", 0, SF_ARCHIVED },
+ { "noarchived", 0, SF_ARCHIVED },
+ { "noschg", 0, SF_IMMUTABLE },
+ { "noschange", 0, SF_IMMUTABLE },
+ { "nosimmutable", 0, SF_IMMUTABLE },
+ { "nosunlnk", 0, SF_NOUNLINK },
+ { "nosunlink", 0, SF_NOUNLINK },
#ifdef SF_SNAPSHOT
- { "nosnapshot", SF_SNAPSHOT, 0 },
+ { "nosnapshot", 0, SF_SNAPSHOT },
#endif
- { "nouappnd", UF_APPEND, 0 },
- { "nouappend", UF_APPEND, 0 },
- { "nouchg", UF_IMMUTABLE, 0 },
- { "nouchange", UF_IMMUTABLE, 0 },
- { "nouimmutable", UF_IMMUTABLE, 0 },
- { "nodump", UF_NODUMP, 1 },
- { "noopaque", UF_OPAQUE, 0 },
- { "nouunlnk", UF_NOUNLINK, 0 },
- { "nouunlink", UF_NOUNLINK, 0 }
+ { "nouappnd", 0, UF_APPEND },
+ { "nouappend", 0, UF_APPEND },
+ { "nouchg", 0, UF_IMMUTABLE },
+ { "nouchange", 0, UF_IMMUTABLE },
+ { "nouimmutable", 0, UF_IMMUTABLE },
+ { "nodump", 1, UF_NODUMP },
+ { "noopaque", 0, UF_OPAQUE },
+ { "nouunlnk", 0, UF_NOUNLINK },
+ { "nouunlink", 0, UF_NOUNLINK }
};
-#define longestflaglen 12
#define nmappings (sizeof(mapping) / sizeof(mapping[0]))
/*
@@ -82,7 +82,8 @@ fflagstostr(flags)
u_long flags;
{
char *string;
- char *sp, *dp;
+ const char *sp;
+ char *dp;
u_long setflags;
int i;
diff --git a/lib/libc/gen/timezone.c b/lib/libc/gen/timezone.c
index 5f0fa66..9b50e79 100644
--- a/lib/libc/gen/timezone.c
+++ b/lib/libc/gen/timezone.c
@@ -59,7 +59,7 @@ timezone(int zone, int dst)
*end;
if ( (beg = getenv("TZNAME")) ) { /* set in environment */
- if ( (end = index(beg, ',')) ) {/* "PST,PDT" */
+ if ((end = strchr(beg, ','))) { /* "PST,PDT" */
if (dst)
return(++end);
*end = '\0';
diff --git a/lib/libc/gen/ucontext.3 b/lib/libc/gen/ucontext.3
index 0574322..69ecbc1 100644
--- a/lib/libc/gen/ucontext.3
+++ b/lib/libc/gen/ucontext.3
@@ -92,6 +92,9 @@ structures:
.Ft int
.Fn getcontext "ucontext_t *" ;
.It
+.Ft "ucontext_t *"
+.Fn getcontextx "void" ;
+.It
.Ft int
.Fn setcontext "const ucontext_t *" ;
.It
@@ -104,4 +107,5 @@ structures:
.Sh SEE ALSO
.Xr sigaltstack 2 ,
.Xr getcontext 3 ,
+.Xr getcontextx 3 ,
.Xr makecontext 3
diff --git a/lib/libc/i386/gen/Makefile.inc b/lib/libc/i386/gen/Makefile.inc
index 45e69ca..73dcabb 100644
--- a/lib/libc/i386/gen/Makefile.inc
+++ b/lib/libc/i386/gen/Makefile.inc
@@ -2,5 +2,5 @@
# $FreeBSD$
SRCS+= _ctx_start.S _setjmp.S _set_tp.c fabs.S \
- flt_rounds.c infinity.c ldexp.c makecontext.c \
+ flt_rounds.c getcontextx.c infinity.c ldexp.c makecontext.c \
rfork_thread.S setjmp.S signalcontext.c sigsetjmp.S
diff --git a/lib/libc/i386/gen/getcontextx.c b/lib/libc/i386/gen/getcontextx.c
new file mode 100644
index 0000000..de0a1a3
--- /dev/null
+++ b/lib/libc/i386/gen/getcontextx.c
@@ -0,0 +1,133 @@
+/*
+ * Copyright (c) 2011 Konstantin Belousov <kib@FreeBSD.org>
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/types.h>
+#include <sys/ucontext.h>
+#include <errno.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <machine/npx.h>
+#include <machine/specialreg.h>
+#include <machine/sysarch.h>
+
+static int xstate_sz = -1;
+
+size_t
+__getcontextx_size(void)
+{
+ u_int p[4];
+ int cpuid_supported;
+
+ if (xstate_sz == -1) {
+ __asm __volatile(
+ " pushfl\n"
+ " popl %%eax\n"
+ " movl %%eax,%%ecx\n"
+ " xorl $0x200000,%%eax\n"
+ " pushl %%eax\n"
+ " popfl\n"
+ " pushfl\n"
+ " popl %%eax\n"
+ " xorl %%eax,%%ecx\n"
+ " je 1f\n"
+ " movl $1,%0\n"
+ " jmp 2f\n"
+ "1: movl $0,%0\n"
+ "2:\n"
+ : "=r" (cpuid_supported) : : "eax", "ecx");
+ if (cpuid_supported) {
+ __asm __volatile(
+ " pushl %%ebx\n"
+ " cpuid\n"
+ " movl %%ebx,%1\n"
+ " popl %%ebx\n"
+ : "=a" (p[0]), "=r" (p[1]), "=c" (p[2]), "=d" (p[3])
+ : "0" (0x0));
+ if ((p[2] & CPUID2_OSXSAVE) != 0) {
+ __asm __volatile(
+ " pushl %%ebx\n"
+ " cpuid\n"
+ " movl %%ebx,%1\n"
+ " popl %%ebx\n"
+ : "=a" (p[0]), "=r" (p[1]), "=c" (p[2]),
+ "=d" (p[3])
+ : "0" (0xd), "2" (0x0));
+ xstate_sz = p[1] - sizeof(struct savexmm);
+ } else
+ xstate_sz = 0;
+ } else
+ xstate_sz = 0;
+ }
+
+ return (sizeof(ucontext_t) + xstate_sz);
+}
+
+int
+__fillcontextx(char *ctx)
+{
+ struct i386_get_xfpustate xfpu;
+ ucontext_t *ucp;
+
+ ucp = (ucontext_t *)ctx;
+ if (getcontext(ucp) == -1)
+ return (-1);
+ if (xstate_sz != 0) {
+ xfpu.addr = (char *)(ucp + 1);
+ xfpu.len = xstate_sz;
+ if (sysarch(I386_GET_XFPUSTATE, &xfpu) == -1)
+ return (-1);
+ ucp->uc_mcontext.mc_xfpustate = (__register_t)xfpu.addr;
+ ucp->uc_mcontext.mc_xfpustate_len = xstate_sz;
+ ucp->uc_mcontext.mc_flags |= _MC_HASFPXSTATE;
+ } else {
+ ucp->uc_mcontext.mc_xfpustate = 0;
+ ucp->uc_mcontext.mc_xfpustate_len = 0;
+ }
+ return (0);
+}
+
+__weak_reference(__getcontextx, getcontextx);
+
+ucontext_t *
+__getcontextx(void)
+{
+ char *ctx;
+ int error;
+
+ ctx = malloc(__getcontextx_size());
+ if (ctx == NULL)
+ return (NULL);
+ if (__fillcontextx(ctx) == -1) {
+ error = errno;
+ free(ctx);
+ errno = error;
+ return (NULL);
+ }
+ return ((ucontext_t *)ctx);
+}
diff --git a/lib/libc/i386/string/Makefile.inc b/lib/libc/i386/string/Makefile.inc
index 3292267..f574c8f 100644
--- a/lib/libc/i386/string/Makefile.inc
+++ b/lib/libc/i386/string/Makefile.inc
@@ -1,7 +1,6 @@
# @(#)Makefile.inc 8.1 (Berkeley) 6/4/93
# $FreeBSD$
-MDSRCS+=bcmp.S bcopy.S bzero.S ffs.S index.S memchr.S memcmp.S memcpy.S \
- memmove.S memset.S rindex.S strcat.S strchr.S strcmp.S strcpy.S \
- strncmp.S strrchr.S swab.S wcschr.S wcscmp.S wcslen.S \
- wmemchr.S
+MDSRCS+=bcmp.S bcopy.S bzero.S ffs.S memchr.S memcmp.S memcpy.S memmove.S \
+ memset.S strcat.S strchr.S strcmp.S strcpy.S strncmp.S strrchr.S \
+ swab.S wcschr.S wcscmp.S wcslen.S wmemchr.S
diff --git a/lib/libc/i386/string/index.S b/lib/libc/i386/string/index.S
deleted file mode 100644
index 3bdd68d..0000000
--- a/lib/libc/i386/string/index.S
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 1993 Winning Strategies, Inc.
- * 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 Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- */
-
-#include <machine/asm.h>
-__FBSDID("$FreeBSD$");
-
-/*
- * index(s, c)
- * return a pointer to the first occurance of the character c in
- * string s, or NULL if c does not occur in the string.
- *
- * %edx - pointer iterating through string
- * %eax - pointer to first occurance of 'c'
- * %cl - character we're comparing against
- * %bl - character at %edx
- *
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-ENTRY(index)
- pushl %ebx
- movl 8(%esp),%eax
- movb 12(%esp),%cl
- .align 2,0x90
-L1:
- movb (%eax),%bl
- cmpb %bl,%cl /* found char??? */
- je L2
- incl %eax
- testb %bl,%bl /* null terminator??? */
- jne L1
- xorl %eax,%eax
-L2:
- popl %ebx
- ret
-END(index)
-
- .section .note.GNU-stack,"",%progbits
diff --git a/lib/libc/i386/string/rindex.S b/lib/libc/i386/string/rindex.S
deleted file mode 100644
index e59406c9..0000000
--- a/lib/libc/i386/string/rindex.S
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 1993 Winning Strategies, Inc.
- * 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 Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- */
-
-#include <machine/asm.h>
-__FBSDID("$FreeBSD$");
-
-/*
- * rindex(s, c)
- * return a pointer to the last occurance of the character c in
- * string s, or NULL if c does not occur in the string.
- *
- * %edx - pointer iterating through string
- * %eax - pointer to last occurance of 'c'
- * %cl - character we're comparing against
- * %bl - character at %edx
- *
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-ENTRY(rindex)
- pushl %ebx
- movl 8(%esp),%edx
- movb 12(%esp),%cl
- xorl %eax,%eax /* init pointer to null */
- .align 2,0x90
-L1:
- movb (%edx),%bl
- cmpb %bl,%cl
- jne L2
- movl %edx,%eax
-L2:
- incl %edx
- testb %bl,%bl /* null terminator??? */
- jne L1
- popl %ebx
- ret
-END(rindex)
-
- .section .note.GNU-stack,"",%progbits
diff --git a/lib/libc/i386/string/strchr.S b/lib/libc/i386/string/strchr.S
index ddae795..57fc6dd 100644
--- a/lib/libc/i386/string/strchr.S
+++ b/lib/libc/i386/string/strchr.S
@@ -63,4 +63,6 @@ L2:
ret
END(strchr)
+WEAK_ALIAS(index, strchr)
+
.section .note.GNU-stack,"",%progbits
diff --git a/lib/libc/i386/string/strrchr.S b/lib/libc/i386/string/strrchr.S
index 0d7f0ca..29942c4 100644
--- a/lib/libc/i386/string/strrchr.S
+++ b/lib/libc/i386/string/strrchr.S
@@ -64,4 +64,6 @@ L2:
ret
END(strrchr)
+WEAK_ALIAS(rindex, strrchr)
+
.section .note.GNU-stack,"",%progbits
diff --git a/lib/libc/ia64/gen/Makefile.inc b/lib/libc/ia64/gen/Makefile.inc
index 685ab86..1e3373a 100644
--- a/lib/libc/ia64/gen/Makefile.inc
+++ b/lib/libc/ia64/gen/Makefile.inc
@@ -3,7 +3,7 @@
SRCS+= __divdf3.S __divdi3.S __divsf3.S __divsi3.S __moddi3.S __modsi3.S \
__udivdi3.S __udivsi3.S __umoddi3.S __umodsi3.S _mcount.S _set_tp.c \
_setjmp.S fabs.S flt_rounds.c fpgetmask.c fpgetround.c fpsetmask.c \
- fpsetround.c infinity.c ldexp.c makecontext.c setjmp.S \
+ fpsetround.c getcontextx.c infinity.c ldexp.c makecontext.c setjmp.S \
signalcontext.c sigsetjmp.S
# The following may go away if function _Unwind_FindTableEntry()
diff --git a/lib/libc/ia64/gen/getcontextx.c b/lib/libc/ia64/gen/getcontextx.c
new file mode 100644
index 0000000..b701c18
--- /dev/null
+++ b/lib/libc/ia64/gen/getcontextx.c
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2011 Konstantin Belousov <kib@FreeBSD.org>
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/types.h>
+#include <sys/ucontext.h>
+#include <errno.h>
+#include <stdlib.h>
+
+size_t
+__getcontextx_size(void)
+{
+
+ return (sizeof(ucontext_t));
+}
+
+int
+__fillcontextx(char *ctx)
+{
+ ucontext_t *ucp;
+
+ ucp = (ucontext_t *)ctx;
+ return (getcontext(ucp));
+}
+
+__weak_reference(__getcontextx, getcontextx);
+
+ucontext_t *
+__getcontextx(void)
+{
+ char *ctx;
+ int error;
+
+ ctx = malloc(__getcontextx_size());
+ if (ctx == NULL)
+ return (NULL);
+ if (__fillcontextx(ctx) == -1) {
+ error = errno;
+ free(ctx);
+ errno = error;
+ return (NULL);
+ }
+ return ((ucontext_t *)ctx);
+}
diff --git a/lib/libc/iconv/citrus_module.c b/lib/libc/iconv/citrus_module.c
index aa96aba..32b7e6e 100644
--- a/lib/libc/iconv/citrus_module.c
+++ b/lib/libc/iconv/citrus_module.c
@@ -109,6 +109,7 @@
#include "citrus_namespace.h"
#include "citrus_bcs.h"
#include "citrus_module.h"
+#include "libc_private.h"
static int _getdewey(int[], char *);
static int _cmpndewey(int[], int, int[], int);
@@ -294,7 +295,7 @@ _citrus_load_module(_citrus_module_t *rhandle, const char *encname)
p = _findshlib(path, &maj, &min);
if (!p)
return (EINVAL);
- handle = dlopen(p, RTLD_LAZY);
+ handle = libc_dlopen(p, RTLD_LAZY);
if (!handle) {
printf("%s", dlerror());
return (EINVAL);
diff --git a/lib/libc/include/libc_private.h b/lib/libc/include/libc_private.h
index a4737fe..c7284cc 100644
--- a/lib/libc/include/libc_private.h
+++ b/lib/libc/include/libc_private.h
@@ -44,6 +44,17 @@
extern int __isthreaded;
/*
+ * libc should use libc_dlopen internally, which respects a global
+ * flag where loading of new shared objects can be restricted.
+ */
+void *libc_dlopen(const char *, int);
+
+/*
+ * For dynamic linker.
+ */
+void _rtld_error(const char *fmt, ...);
+
+/*
* File lock contention is difficult to diagnose without knowing
* where locks were set. Allow a debug library to be built which
* records the source file and line number of each lock call.
diff --git a/lib/libc/locale/setlocale.c b/lib/libc/locale/setlocale.c
index 8cf8fd4..0322af2 100644
--- a/lib/libc/locale/setlocale.c
+++ b/lib/libc/locale/setlocale.c
@@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$");
/*
* Category names for getenv()
*/
-static char *categories[_LC_LAST] = {
+static const char categories[_LC_LAST][12] = {
"LC_ALL",
"LC_COLLATE",
"LC_CTYPE",
diff --git a/lib/libc/mips/gen/Makefile.inc b/lib/libc/mips/gen/Makefile.inc
index 8ee69d0..9d9cc7a 100644
--- a/lib/libc/mips/gen/Makefile.inc
+++ b/lib/libc/mips/gen/Makefile.inc
@@ -6,4 +6,5 @@ SRCS+= infinity.c fabs.c ldexp.c
# SRCS+= flt_rounds.c fpgetmask.c fpgetround.c fpgetsticky.c fpsetmask.c \
# fpsetround.c fpsetsticky.c
-SRCS+= _ctx_start.S _set_tp.c _setjmp.S makecontext.c setjmp.S signalcontext.c sigsetjmp.S
+SRCS+= _ctx_start.S _set_tp.c _setjmp.S getcontextx.c makecontext.c \
+ setjmp.S signalcontext.c sigsetjmp.S
diff --git a/lib/libc/mips/gen/getcontextx.c b/lib/libc/mips/gen/getcontextx.c
new file mode 100644
index 0000000..b701c18
--- /dev/null
+++ b/lib/libc/mips/gen/getcontextx.c
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2011 Konstantin Belousov <kib@FreeBSD.org>
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/types.h>
+#include <sys/ucontext.h>
+#include <errno.h>
+#include <stdlib.h>
+
+size_t
+__getcontextx_size(void)
+{
+
+ return (sizeof(ucontext_t));
+}
+
+int
+__fillcontextx(char *ctx)
+{
+ ucontext_t *ucp;
+
+ ucp = (ucontext_t *)ctx;
+ return (getcontext(ucp));
+}
+
+__weak_reference(__getcontextx, getcontextx);
+
+ucontext_t *
+__getcontextx(void)
+{
+ char *ctx;
+ int error;
+
+ ctx = malloc(__getcontextx_size());
+ if (ctx == NULL)
+ return (NULL);
+ if (__fillcontextx(ctx) == -1) {
+ error = errno;
+ free(ctx);
+ errno = error;
+ return (NULL);
+ }
+ return ((ucontext_t *)ctx);
+}
diff --git a/lib/libc/mips/softfloat/softfloat.h b/lib/libc/mips/softfloat/softfloat.h
index 50b5fa6..6aef499 100644
--- a/lib/libc/mips/softfloat/softfloat.h
+++ b/lib/libc/mips/softfloat/softfloat.h
@@ -45,7 +45,7 @@ the `FLOAT128' macro and the quadruple-precision format `float128'.
/* #define FLOATX80 */
/* #define FLOAT128 */
-#include <machine/ieeefp.h>
+#include <fenv.h>
/*
-------------------------------------------------------------------------------
@@ -84,12 +84,12 @@ enum {
Software IEC/IEEE floating-point rounding mode.
-------------------------------------------------------------------------------
*/
-extern fp_rnd_t float_rounding_mode;
+extern int float_rounding_mode;
enum {
- float_round_nearest_even = FP_RN,
- float_round_to_zero = FP_RZ,
- float_round_down = FP_RM,
- float_round_up = FP_RP
+ float_round_nearest_even = FE_TONEAREST,
+ float_round_to_zero = FE_TOWARDZERO,
+ float_round_down = FE_DOWNWARD,
+ float_round_up = FE_UPWARD
};
/*
@@ -97,14 +97,14 @@ enum {
Software IEC/IEEE floating-point exception flags.
-------------------------------------------------------------------------------
*/
-extern fp_except float_exception_flags;
-extern fp_except float_exception_mask;
+extern int float_exception_flags;
+extern int float_exception_mask;
enum {
- float_flag_inexact = FP_X_IMP,
- float_flag_underflow = FP_X_UFL,
- float_flag_overflow = FP_X_OFL,
- float_flag_divbyzero = FP_X_DZ,
- float_flag_invalid = FP_X_INV
+ float_flag_inexact = FE_INEXACT,
+ float_flag_underflow = FE_UNDERFLOW,
+ float_flag_overflow = FE_OVERFLOW,
+ float_flag_divbyzero = FE_DIVBYZERO,
+ float_flag_invalid = FE_INVALID
};
/*
@@ -113,7 +113,7 @@ Routine to raise any or all of the software IEC/IEEE floating-point
exception flags.
-------------------------------------------------------------------------------
*/
-void float_raise( fp_except );
+void float_raise( int );
/*
-------------------------------------------------------------------------------
diff --git a/lib/libc/mips/string/Makefile.inc b/lib/libc/mips/string/Makefile.inc
index 48111e5..f37b9af 100644
--- a/lib/libc/mips/string/Makefile.inc
+++ b/lib/libc/mips/string/Makefile.inc
@@ -1,8 +1,8 @@
# $NetBSD: Makefile.inc,v 1.2 2000/10/10 21:51:54 jeffs Exp $
# $FreeBSD$
-SRCS+= bcmp.S bcopy.S bzero.S ffs.S index.S memchr.c memcmp.c memset.c \
+SRCS+= bcmp.S bcopy.S bzero.S ffs.S memchr.c memcmp.c memset.c \
memcpy.S memmove.S \
- rindex.S strcat.c strcmp.S strcpy.c strcspn.c strlen.S \
- strncat.c strncmp.c strncpy.c strpbrk.c strsep.c \
+ strcat.c strchr.S strcmp.S strcpy.c strcspn.c strlen.S \
+ strncat.c strncmp.c strncpy.c strrchr.S strpbrk.c strsep.c \
strspn.c strstr.c swab.c
diff --git a/lib/libc/mips/string/index.S b/lib/libc/mips/string/index.S
deleted file mode 100644
index d1df540..0000000
--- a/lib/libc/mips/string/index.S
+++ /dev/null
@@ -1,59 +0,0 @@
-/* $NetBSD: index.S,v 1.8 2005/04/22 06:59:00 simonb Exp $ */
-
-/*-
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Ralph Campbell.
- *
- * 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. 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.
- */
-
-#include <machine/asm.h>
-__FBSDID("$FreeBSD$");
-
-#if defined(LIBC_SCCS) && !defined(lint)
- ASMSTR("from: @(#)index.s 8.1 (Berkeley) 6/4/93")
- ASMSTR("$NetBSD: index.S,v 1.8 2005/04/22 06:59:00 simonb Exp $")
-#endif /* LIBC_SCCS and not lint */
-
-#ifdef __ABICALLS__
- .abicalls
-#endif
-
-LEAF(index)
-1:
- lbu a2, 0(a0) # get a byte
- PTR_ADDU a0, a0, 1
- beq a2, a1, fnd
- bne a2, zero, 1b
-notfnd:
- move v0, zero
- j ra
-fnd:
- PTR_SUBU v0, a0, 1
- j ra
-END(index)
diff --git a/lib/libc/mips/string/rindex.S b/lib/libc/mips/string/rindex.S
deleted file mode 100644
index e50379e..0000000
--- a/lib/libc/mips/string/rindex.S
+++ /dev/null
@@ -1,57 +0,0 @@
-/* $NetBSD: rindex.S,v 1.7 2003/08/07 16:42:16 agc Exp $ */
-
-/*-
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Ralph Campbell.
- *
- * 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. 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.
- */
-
-#include <machine/asm.h>
-__FBSDID("$FreeBSD$");
-
-#if defined(LIBC_SCCS) && !defined(lint)
- ASMSTR("from: @(#)rindex.s 8.1 (Berkeley) 6/4/93")
- ASMSTR("$NetBSD: rindex.S,v 1.7 2003/08/07 16:42:16 agc Exp $")
-#endif /* LIBC_SCCS and not lint */
-
-#ifdef __ABICALLS__
- .abicalls
-#endif
-
-LEAF(rindex)
- move v0, zero # default if not found
-1:
- lbu a3, 0(a0) # get a byte
- PTR_ADDU a0, a0, 1
- bne a3, a1, 2f
- PTR_SUBU v0, a0, 1 # save address of last match
-2:
- bne a3, zero, 1b # continue if not end
- j ra
-END(rindex)
diff --git a/lib/libc/mips/string/strchr.S b/lib/libc/mips/string/strchr.S
new file mode 100644
index 0000000..198366f
--- /dev/null
+++ b/lib/libc/mips/string/strchr.S
@@ -0,0 +1,61 @@
+/* $NetBSD: index.S,v 1.8 2005/04/22 06:59:00 simonb Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Ralph Campbell.
+ *
+ * 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. 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.
+ */
+
+#include <machine/asm.h>
+__FBSDID("$FreeBSD$");
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ ASMSTR("from: @(#)index.s 8.1 (Berkeley) 6/4/93")
+ ASMSTR("$NetBSD: index.S,v 1.8 2005/04/22 06:59:00 simonb Exp $")
+#endif /* LIBC_SCCS and not lint */
+
+#ifdef __ABICALLS__
+ .abicalls
+#endif
+
+LEAF(strchr)
+1:
+ lbu a2, 0(a0) # get a byte
+ PTR_ADDU a0, a0, 1
+ beq a2, a1, fnd
+ bne a2, zero, 1b
+notfnd:
+ move v0, zero
+ j ra
+fnd:
+ PTR_SUBU v0, a0, 1
+ j ra
+END(strchr)
+
+WEAK_ALIAS(index, strchr)
diff --git a/lib/libc/mips/string/strrchr.S b/lib/libc/mips/string/strrchr.S
new file mode 100644
index 0000000..5a88a42
--- /dev/null
+++ b/lib/libc/mips/string/strrchr.S
@@ -0,0 +1,59 @@
+/* $NetBSD: rindex.S,v 1.7 2003/08/07 16:42:16 agc Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Ralph Campbell.
+ *
+ * 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. 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.
+ */
+
+#include <machine/asm.h>
+__FBSDID("$FreeBSD$");
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ ASMSTR("from: @(#)rindex.s 8.1 (Berkeley) 6/4/93")
+ ASMSTR("$NetBSD: rindex.S,v 1.7 2003/08/07 16:42:16 agc Exp $")
+#endif /* LIBC_SCCS and not lint */
+
+#ifdef __ABICALLS__
+ .abicalls
+#endif
+
+LEAF(strrchr)
+ move v0, zero # default if not found
+1:
+ lbu a3, 0(a0) # get a byte
+ PTR_ADDU a0, a0, 1
+ bne a3, a1, 2f
+ PTR_SUBU v0, a0, 1 # save address of last match
+2:
+ bne a3, zero, 1b # continue if not end
+ j ra
+END(strrchr)
+
+WEAK_ALIAS(rindex, strrchr)
diff --git a/lib/libc/net/getaddrinfo.c b/lib/libc/net/getaddrinfo.c
index 830e464..37f09f8 100644
--- a/lib/libc/net/getaddrinfo.c
+++ b/lib/libc/net/getaddrinfo.c
@@ -1576,7 +1576,8 @@ ip6_str2scopeid(char *scope, struct sockaddr_in6 *sin6, u_int32_t *scopeid)
if (*scope == '\0')
return -1;
- if (IN6_IS_ADDR_LINKLOCAL(a6) || IN6_IS_ADDR_MC_LINKLOCAL(a6)) {
+ if (IN6_IS_ADDR_LINKLOCAL(a6) || IN6_IS_ADDR_MC_LINKLOCAL(a6) ||
+ IN6_IS_ADDR_MC_NODELOCAL(a6)) {
/*
* We currently assume a one-to-one mapping between links
* and interfaces, so we simply use interface indices for
diff --git a/lib/libc/net/gethostbynis.c b/lib/libc/net/gethostbynis.c
index 11de8ae..c0d5177 100644
--- a/lib/libc/net/gethostbynis.c
+++ b/lib/libc/net/gethostbynis.c
@@ -91,7 +91,7 @@ _gethostbynis(const char *name, char *map, int af, struct hostent *he,
free(result);
result = (char *)&ypbuf;
- if ((cp = index(result, '\n')))
+ if ((cp = strchr(result, '\n')))
*cp = '\0';
cp = strpbrk(result, " \t");
diff --git a/lib/libc/net/getifaddrs.c b/lib/libc/net/getifaddrs.c
index 41ef3f4..aada929 100644
--- a/lib/libc/net/getifaddrs.c
+++ b/lib/libc/net/getifaddrs.c
@@ -76,7 +76,7 @@ __FBSDID("$FreeBSD$");
#define HAVE_IFM_DATA
#endif
-#if _BSDI_VERSION >= 199802
+#if (_BSDI_VERSION >= 199802) || (__FreeBSD_version >= 1000003)
/* ifam_data is very specific to recent versions of bsdi */
#define HAVE_IFAM_DATA
#endif
diff --git a/lib/libc/net/getnetbynis.c b/lib/libc/net/getnetbynis.c
index 811e431..1dbed83 100644
--- a/lib/libc/net/getnetbynis.c
+++ b/lib/libc/net/getnetbynis.c
@@ -80,7 +80,7 @@ _getnetbynis(const char *name, char *map, int af, struct netent *ne,
free(result);
result = (char *)&ypbuf;
- if ((cp = index(result, '\n')))
+ if ((cp = strchr(result, '\n')))
*cp = '\0';
cp = strpbrk(result, " \t");
diff --git a/lib/libc/net/nsdispatch.c b/lib/libc/net/nsdispatch.c
index 6b7bd02..f9d787a 100644
--- a/lib/libc/net/nsdispatch.c
+++ b/lib/libc/net/nsdispatch.c
@@ -384,7 +384,7 @@ nss_configure(void)
confmod = statbuf.st_mtime;
#ifdef NS_CACHING
- handle = dlopen(NULL, RTLD_LAZY | RTLD_GLOBAL);
+ handle = libc_dlopen(NULL, RTLD_LAZY | RTLD_GLOBAL);
if (handle != NULL) {
nss_cache_cycle_prevention_func = dlsym(handle,
"_nss_cache_cycle_prevention_function");
@@ -497,7 +497,7 @@ nss_load_module(const char *source, nss_module_register_fn reg_fn)
if (snprintf(buf, sizeof(buf), "nss_%s.so.%d", mod.name,
NSS_MODULE_INTERFACE_VERSION) >= (int)sizeof(buf))
goto fin;
- mod.handle = dlopen(buf, RTLD_LOCAL|RTLD_LAZY);
+ mod.handle = libc_dlopen(buf, RTLD_LOCAL|RTLD_LAZY);
if (mod.handle == NULL) {
#ifdef _NSS_DEBUG
/* This gets pretty annoying since the built-in
diff --git a/lib/libc/net/sctp_sys_calls.c b/lib/libc/net/sctp_sys_calls.c
index 72e9883..e9c9d64 100644
--- a/lib/libc/net/sctp_sys_calls.c
+++ b/lib/libc/net/sctp_sys_calls.c
@@ -245,7 +245,8 @@ sctp_bindx(int sd, struct sockaddr *addrs, int addrcnt, int flags)
struct sockaddr *sa;
struct sockaddr_in *sin;
struct sockaddr_in6 *sin6;
- int i, sz, argsz;
+ int i;
+ size_t argsz;
uint16_t sport = 0;
/* validate the flags */
@@ -269,7 +270,6 @@ sctp_bindx(int sd, struct sockaddr *addrs, int addrcnt, int flags)
/* First pre-screen the addresses */
sa = addrs;
for (i = 0; i < addrcnt; i++) {
- sz = sa->sa_len;
if (sa->sa_family == AF_INET) {
if (sa->sa_len != sizeof(struct sockaddr_in))
goto out_error;
@@ -307,7 +307,7 @@ sctp_bindx(int sd, struct sockaddr *addrs, int addrcnt, int flags)
goto out_error;
}
- sa = (struct sockaddr *)((caddr_t)sa + sz);
+ sa = (struct sockaddr *)((caddr_t)sa + sa->sa_len);
}
sa = addrs;
/*
@@ -319,7 +319,6 @@ sctp_bindx(int sd, struct sockaddr *addrs, int addrcnt, int flags)
sin->sin_port = sport;
}
for (i = 0; i < addrcnt; i++) {
- sz = sa->sa_len;
if (sa->sa_family == AF_INET) {
if (sa->sa_len != sizeof(struct sockaddr_in))
goto out_error;
@@ -335,13 +334,13 @@ sctp_bindx(int sd, struct sockaddr *addrs, int addrcnt, int flags)
}
memset(gaddrs, 0, argsz);
gaddrs->sget_assoc_id = 0;
- memcpy(gaddrs->addr, sa, sz);
+ memcpy(gaddrs->addr, sa, sa->sa_len);
if (setsockopt(sd, IPPROTO_SCTP, flags, gaddrs,
(socklen_t) argsz) != 0) {
free(gaddrs);
return (-1);
}
- sa = (struct sockaddr *)((caddr_t)sa + sz);
+ sa = (struct sockaddr *)((caddr_t)sa + sa->sa_len);
}
free(gaddrs);
return (0);
@@ -430,10 +429,9 @@ sctp_getpaddrs(int sd, sctp_assoc_t id, struct sockaddr **raddrs)
{
struct sctp_getaddresses *addrs;
struct sockaddr *sa;
- struct sockaddr *re;
sctp_assoc_t asoc;
caddr_t lim;
- socklen_t siz;
+ socklen_t opt_len;
int cnt;
if (raddrs == NULL) {
@@ -441,30 +439,28 @@ sctp_getpaddrs(int sd, sctp_assoc_t id, struct sockaddr **raddrs)
return (-1);
}
asoc = id;
- siz = sizeof(sctp_assoc_t);
+ opt_len = (socklen_t) sizeof(sctp_assoc_t);
if (getsockopt(sd, IPPROTO_SCTP, SCTP_GET_REMOTE_ADDR_SIZE,
- &asoc, &siz) != 0) {
+ &asoc, &opt_len) != 0) {
return (-1);
}
/* size required is returned in 'asoc' */
- siz = (size_t)asoc;
- siz += sizeof(struct sctp_getaddresses);
- addrs = calloc(1, siz);
+ opt_len = (socklen_t) ((size_t)asoc + sizeof(struct sctp_getaddresses));
+ addrs = calloc(1, (size_t)opt_len);
if (addrs == NULL) {
return (-1);
}
addrs->sget_assoc_id = id;
/* Now lets get the array of addresses */
if (getsockopt(sd, IPPROTO_SCTP, SCTP_GET_PEER_ADDRESSES,
- addrs, &siz) != 0) {
+ addrs, &opt_len) != 0) {
free(addrs);
return (-1);
}
- re = (struct sockaddr *)&addrs->addr[0];
- *raddrs = re;
+ *raddrs = (struct sockaddr *)&addrs->addr[0];
cnt = 0;
sa = (struct sockaddr *)&addrs->addr[0];
- lim = (caddr_t)addrs + siz;
+ lim = (caddr_t)addrs + opt_len;
while (((caddr_t)sa < lim) && (sa->sa_len > 0)) {
sa = (struct sockaddr *)((caddr_t)sa + sa->sa_len);
cnt++;
@@ -487,11 +483,10 @@ int
sctp_getladdrs(int sd, sctp_assoc_t id, struct sockaddr **raddrs)
{
struct sctp_getaddresses *addrs;
- struct sockaddr *re;
caddr_t lim;
struct sockaddr *sa;
- int size_of_addresses;
- socklen_t siz;
+ size_t size_of_addresses;
+ socklen_t opt_len;
int cnt;
if (raddrs == NULL) {
@@ -499,9 +494,9 @@ sctp_getladdrs(int sd, sctp_assoc_t id, struct sockaddr **raddrs)
return (-1);
}
size_of_addresses = 0;
- siz = sizeof(int);
+ opt_len = (socklen_t) sizeof(int);
if (getsockopt(sd, IPPROTO_SCTP, SCTP_GET_LOCAL_ADDR_SIZE,
- &size_of_addresses, &siz) != 0) {
+ &size_of_addresses, &opt_len) != 0) {
errno = ENOMEM;
return (-1);
}
@@ -509,9 +504,10 @@ sctp_getladdrs(int sd, sctp_assoc_t id, struct sockaddr **raddrs)
errno = ENOTCONN;
return (-1);
}
- siz = size_of_addresses + sizeof(struct sockaddr_storage);
- siz += sizeof(struct sctp_getaddresses);
- addrs = calloc(1, siz);
+ opt_len = (socklen_t) (size_of_addresses +
+ sizeof(struct sockaddr_storage) +
+ sizeof(struct sctp_getaddresses));
+ addrs = calloc(1, (size_t)opt_len);
if (addrs == NULL) {
errno = ENOMEM;
return (-1);
@@ -519,16 +515,15 @@ sctp_getladdrs(int sd, sctp_assoc_t id, struct sockaddr **raddrs)
addrs->sget_assoc_id = id;
/* Now lets get the array of addresses */
if (getsockopt(sd, IPPROTO_SCTP, SCTP_GET_LOCAL_ADDRESSES, addrs,
- &siz) != 0) {
+ &opt_len) != 0) {
free(addrs);
errno = ENOMEM;
return (-1);
}
- re = (struct sockaddr *)&addrs->addr[0];
- *raddrs = re;
+ *raddrs = (struct sockaddr *)&addrs->addr[0];
cnt = 0;
sa = (struct sockaddr *)&addrs->addr[0];
- lim = (caddr_t)addrs + siz;
+ lim = (caddr_t)addrs + opt_len;
while (((caddr_t)sa < lim) && (sa->sa_len > 0)) {
sa = (struct sockaddr *)((caddr_t)sa + sa->sa_len);
cnt++;
@@ -563,6 +558,7 @@ sctp_sendmsg(int s,
#ifdef SYS_sctp_generic_sendmsg
struct sctp_sndrcvinfo sinfo;
+ memset(&sinfo, 0, sizeof(struct sctp_sndrcvinfo));
sinfo.sinfo_ppid = ppid;
sinfo.sinfo_flags = flags;
sinfo.sinfo_stream = stream_no;
@@ -734,7 +730,8 @@ sctp_sendx(int sd, const void *msg, size_t msg_len,
ssize_t ret;
int i, cnt, *aa, saved_errno;
char *buf;
- int add_len, len, no_end_cx = 0;
+ int no_end_cx = 0;
+ size_t len, add_len;
struct sockaddr *at;
if (addrs == NULL) {
@@ -784,7 +781,7 @@ sctp_sendx(int sd, const void *msg, size_t msg_len,
aa = (int *)buf;
*aa = cnt;
aa++;
- memcpy((caddr_t)aa, addrs, (len - sizeof(int)));
+ memcpy((caddr_t)aa, addrs, (size_t)(len - sizeof(int)));
ret = setsockopt(sd, IPPROTO_SCTP, SCTP_CONNECT_X_DELAYED, (void *)buf,
(socklen_t) len);
@@ -861,7 +858,6 @@ sctp_recvmsg(int s,
#else
struct sctp_sndrcvinfo *s_info;
ssize_t sz;
- int sinfo_found = 0;
struct msghdr msg;
struct iovec iov;
char controlVector[SCTP_CONTROL_VEC_SIZE_RCV];
@@ -890,7 +886,6 @@ sctp_recvmsg(int s,
return (sz);
}
s_info = NULL;
- len = sz;
if (sinfo) {
sinfo->sinfo_assoc_id = 0;
}
@@ -911,7 +906,6 @@ sctp_recvmsg(int s,
/* Copy it to the user */
if (sinfo)
*sinfo = *s_info;
- sinfo_found = 1;
break;
} else if (cmsg->cmsg_type == SCTP_EXTRCV) {
/*
@@ -924,7 +918,6 @@ sctp_recvmsg(int s,
if (sinfo) {
memcpy(sinfo, s_info, sizeof(struct sctp_extrcvinfo));
}
- sinfo_found = 1;
break;
}
@@ -1057,7 +1050,7 @@ sctp_sendv(int sd,
cmsgbuf = malloc(CMSG_SPACE(sizeof(struct sctp_sndinfo)) +
CMSG_SPACE(sizeof(struct sctp_prinfo)) +
CMSG_SPACE(sizeof(struct sctp_authinfo)) +
- addrcnt * CMSG_SPACE(sizeof(struct in6_addr)));
+ (size_t)addrcnt * CMSG_SPACE(sizeof(struct in6_addr)));
if (cmsgbuf == NULL) {
errno = ENOBUFS;
return (-1);
diff --git a/lib/libc/powerpc/SYS.h b/lib/libc/powerpc/SYS.h
index 7ec3075..f775f37 100644
--- a/lib/libc/powerpc/SYS.h
+++ b/lib/libc/powerpc/SYS.h
@@ -44,10 +44,8 @@
.align 2; \
2: b PIC_PLT(CNAME(HIDENAME(cerror))); \
ENTRY(__CONCAT(__sys_,x)); \
- .weak CNAME(x); \
- .set CNAME(x),CNAME(__CONCAT(__sys_,x)); \
- .weak CNAME(__CONCAT(_,x)); \
- .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \
+ WEAK_ALIAS(x,__CONCAT(__sys_,x)); \
+ WEAK_ALIAS(__CONCAT(_,x),__CONCAT(__sys_,x)); \
_SYSCALL(x); \
bso 2b
@@ -55,8 +53,7 @@ ENTRY(__CONCAT(__sys_,x)); \
.text; \
.align 2; \
ENTRY(__CONCAT(__sys_,x)); \
- .weak CNAME(__CONCAT(_,x)); \
- .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \
+ WEAK_ALIAS(__CONCAT(_,x),__CONCAT(__sys_,x)); \
_SYSCALL(x); \
bnslr; \
b PIC_PLT(CNAME(HIDENAME(cerror)))
@@ -66,10 +63,8 @@ ENTRY(__CONCAT(__sys_,x)); \
.align 2; \
2: b PIC_PLT(CNAME(HIDENAME(cerror))); \
ENTRY(__CONCAT(__sys_,x)); \
- .weak CNAME(x); \
- .set CNAME(x),CNAME(__CONCAT(__sys_,x)); \
- .weak CNAME(__CONCAT(_,x)); \
- .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \
+ WEAK_ALIAS(x,__CONCAT(__sys_,x)); \
+ WEAK_ALIAS(__CONCAT(_,x), __CONCAT(__sys_,x)); \
_SYSCALL(x); \
bnslr; \
b PIC_PLT(CNAME(HIDENAME(cerror)))
diff --git a/lib/libc/powerpc/gen/Makefile.inc b/lib/libc/powerpc/gen/Makefile.inc
index 3bfabda..79a2746 100644
--- a/lib/libc/powerpc/gen/Makefile.inc
+++ b/lib/libc/powerpc/gen/Makefile.inc
@@ -1,7 +1,7 @@
# $FreeBSD$
SRCS += _ctx_start.S fabs.S flt_rounds.c fpgetmask.c fpgetround.c \
- fpgetsticky.c fpsetmask.c fpsetround.c \
+ fpgetsticky.c fpsetmask.c fpsetround.c getcontextx.c \
infinity.c ldexp.c makecontext.c _setjmp.S \
setjmp.S sigsetjmp.S signalcontext.c syncicache.c \
_set_tp.c
diff --git a/lib/libc/powerpc/gen/getcontextx.c b/lib/libc/powerpc/gen/getcontextx.c
new file mode 100644
index 0000000..b701c18
--- /dev/null
+++ b/lib/libc/powerpc/gen/getcontextx.c
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2011 Konstantin Belousov <kib@FreeBSD.org>
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/types.h>
+#include <sys/ucontext.h>
+#include <errno.h>
+#include <stdlib.h>
+
+size_t
+__getcontextx_size(void)
+{
+
+ return (sizeof(ucontext_t));
+}
+
+int
+__fillcontextx(char *ctx)
+{
+ ucontext_t *ucp;
+
+ ucp = (ucontext_t *)ctx;
+ return (getcontext(ucp));
+}
+
+__weak_reference(__getcontextx, getcontextx);
+
+ucontext_t *
+__getcontextx(void)
+{
+ char *ctx;
+ int error;
+
+ ctx = malloc(__getcontextx_size());
+ if (ctx == NULL)
+ return (NULL);
+ if (__fillcontextx(ctx) == -1) {
+ error = errno;
+ free(ctx);
+ errno = error;
+ return (NULL);
+ }
+ return ((ucontext_t *)ctx);
+}
diff --git a/lib/libc/powerpc/gen/setjmp.S b/lib/libc/powerpc/gen/setjmp.S
index 6aaf81c..27567ff 100644
--- a/lib/libc/powerpc/gen/setjmp.S
+++ b/lib/libc/powerpc/gen/setjmp.S
@@ -69,8 +69,7 @@ ENTRY(setjmp)
li %r3,0 /* return (0) */
blr
- .weak CNAME(longjmp)
- .set CNAME(longjmp),CNAME(__longjmp)
+ WEAK_ALIAS(longjmp, __longjmp)
ENTRY(__longjmp)
lmw %r9,20(%r3) /* restore regs */
mr %r6,%r4 /* save val param */
diff --git a/lib/libc/powerpc64/SYS.h b/lib/libc/powerpc64/SYS.h
index a361767..80a6b1b 100644
--- a/lib/libc/powerpc64/SYS.h
+++ b/lib/libc/powerpc64/SYS.h
@@ -52,10 +52,8 @@
mtlr %r0; \
blr; \
ENTRY(__CONCAT(__sys_,x)); \
- .weak CNAME(x); \
- .set CNAME(x),CNAME(__CONCAT(__sys_,x)); \
- .weak CNAME(__CONCAT(_,x)); \
- .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \
+ WEAK_ALIAS(x,__CONCAT(__sys_,x)); \
+ WEAK_ALIAS(__CONCAT(_,x),__CONCAT(__sys_,x)); \
_SYSCALL(x); \
bso 2b
@@ -63,8 +61,7 @@ ENTRY(__CONCAT(__sys_,x)); \
.text; \
.align 2; \
ENTRY(__CONCAT(__sys_,x)); \
- .weak CNAME(__CONCAT(_,x)); \
- .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \
+ WEAK_ALIAS(__CONCAT(_,x),__CONCAT(__sys_,x)); \
_SYSCALL(x); \
bnslr; \
mflr %r0; \
@@ -81,10 +78,8 @@ ENTRY(__CONCAT(__sys_,x)); \
.text; \
.align 2; \
ENTRY(__CONCAT(__sys_,x)); \
- .weak CNAME(x); \
- .set CNAME(x),CNAME(__CONCAT(__sys_,x)); \
- .weak CNAME(__CONCAT(_,x)); \
- .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \
+ WEAK_ALIAS(x,__CONCAT(__sys_,x)); \
+ WEAK_ALIAS(__CONCAT(_,x), __CONCAT(__sys_,x)); \
_SYSCALL(x); \
bnslr; \
\
diff --git a/lib/libc/powerpc64/gen/Makefile.inc b/lib/libc/powerpc64/gen/Makefile.inc
index 3bfabda..79a2746 100644
--- a/lib/libc/powerpc64/gen/Makefile.inc
+++ b/lib/libc/powerpc64/gen/Makefile.inc
@@ -1,7 +1,7 @@
# $FreeBSD$
SRCS += _ctx_start.S fabs.S flt_rounds.c fpgetmask.c fpgetround.c \
- fpgetsticky.c fpsetmask.c fpsetround.c \
+ fpgetsticky.c fpsetmask.c fpsetround.c getcontextx.c \
infinity.c ldexp.c makecontext.c _setjmp.S \
setjmp.S sigsetjmp.S signalcontext.c syncicache.c \
_set_tp.c
diff --git a/lib/libc/powerpc64/gen/getcontextx.c b/lib/libc/powerpc64/gen/getcontextx.c
new file mode 100644
index 0000000..b701c18
--- /dev/null
+++ b/lib/libc/powerpc64/gen/getcontextx.c
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2011 Konstantin Belousov <kib@FreeBSD.org>
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/types.h>
+#include <sys/ucontext.h>
+#include <errno.h>
+#include <stdlib.h>
+
+size_t
+__getcontextx_size(void)
+{
+
+ return (sizeof(ucontext_t));
+}
+
+int
+__fillcontextx(char *ctx)
+{
+ ucontext_t *ucp;
+
+ ucp = (ucontext_t *)ctx;
+ return (getcontext(ucp));
+}
+
+__weak_reference(__getcontextx, getcontextx);
+
+ucontext_t *
+__getcontextx(void)
+{
+ char *ctx;
+ int error;
+
+ ctx = malloc(__getcontextx_size());
+ if (ctx == NULL)
+ return (NULL);
+ if (__fillcontextx(ctx) == -1) {
+ error = errno;
+ free(ctx);
+ errno = error;
+ return (NULL);
+ }
+ return ((ucontext_t *)ctx);
+}
diff --git a/lib/libc/powerpc64/gen/setjmp.S b/lib/libc/powerpc64/gen/setjmp.S
index 0f33ab2..23002ab 100644
--- a/lib/libc/powerpc64/gen/setjmp.S
+++ b/lib/libc/powerpc64/gen/setjmp.S
@@ -93,10 +93,7 @@ ENTRY(setjmp)
li %r3,0 /* return (0) */
blr
- .weak CNAME(longjmp)
- .set CNAME(longjmp),CNAME(__longjmp)
- .weak CNAME(.longjmp)
- .set CNAME(.longjmp),CNAME(.__longjmp)
+ WEAK_ALIAS(longjmp, __longjmp)
ENTRY(__longjmp)
ld %r9,40 + 0*8(%r3)
ld %r10,40 + 1*8(%r3)
diff --git a/lib/libc/powerpc64/sys/cerror.S b/lib/libc/powerpc64/sys/cerror.S
index 9bf33bf..515d7e5 100644
--- a/lib/libc/powerpc64/sys/cerror.S
+++ b/lib/libc/powerpc64/sys/cerror.S
@@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$");
* programs and the initial threaded in threaded programs,
* it returns a pointer to the global errno variable.
*/
-ENTRY(HIDENAME(cerror))
+ENTRY_NOPROF(HIDENAME(cerror))
mflr %r0
std %r0,16(%r1) /* save lr */
stdu %r1,-64(%r1) /* allocate new stack frame */
diff --git a/lib/libc/resolv/res_send.c b/lib/libc/resolv/res_send.c
index d4f0c33..716ae32 100644
--- a/lib/libc/resolv/res_send.c
+++ b/lib/libc/resolv/res_send.c
@@ -1102,8 +1102,6 @@ Aerror(const res_state statp, FILE *file, const char *string, int error,
char hbuf[NI_MAXHOST];
char sbuf[NI_MAXSERV];
- alen = alen;
-
if ((statp->options & RES_DEBUG) != 0U) {
if (getnameinfo(address, alen, hbuf, sizeof(hbuf),
sbuf, sizeof(sbuf), niflags)) {
diff --git a/lib/libc/rpc/crypt_client.c b/lib/libc/rpc/crypt_client.c
index 255b266..4e5c793 100644
--- a/lib/libc/rpc/crypt_client.c
+++ b/lib/libc/rpc/crypt_client.c
@@ -75,8 +75,8 @@ _des_crypt_call(buf, len, dparms)
des_crypt_1_arg.desbuf.desbuf_len = len;
des_crypt_1_arg.desbuf.desbuf_val = buf;
- des_crypt_1_arg.des_dir = dparms->des_dir;
- des_crypt_1_arg.des_mode = dparms->des_mode;
+ des_crypt_1_arg.des_dir = (dparms->des_dir == ENCRYPT) ? ENCRYPT_DES : DECRYPT_DES;
+ des_crypt_1_arg.des_mode = (dparms->des_mode == CBC) ? CBC_DES : ECB_DES;
bcopy(dparms->des_ivec, des_crypt_1_arg.des_ivec, 8);
bcopy(dparms->des_key, des_crypt_1_arg.des_key, 8);
diff --git a/lib/libc/softfloat/Makefile.inc b/lib/libc/softfloat/Makefile.inc
index ac7fbf7..2213403 100644
--- a/lib/libc/softfloat/Makefile.inc
+++ b/lib/libc/softfloat/Makefile.inc
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.3 2003/05/06 08:58:20 rearnsha Exp $
+# $NetBSD: Makefile.inc,v 1.10 2011/07/04 02:53:15 mrg Exp $
# $FreeBSD$
SOFTFLOAT_BITS?=64
@@ -17,4 +17,14 @@ SRCS+= eqsf2.c nesf2.c gtsf2.c gesf2.c ltsf2.c lesf2.c negsf2.c \
eqdf2.c nedf2.c gtdf2.c gedf2.c ltdf2.c ledf2.c negdf2.c \
unordsf2.c unorddf2.c
+.if defined(SOFTFLOAT_128)
+CFLAGS+= -DFLOAT128
+SRCS+= eqtf2.c netf2.c gttf2.c getf2.c lttf2.c letf2.c negtf2.c
+.endif
+
+.if defined(SOFTFLOAT_X80)
+CFLAGS+= -DFLOATX80
+SRCS+= nexf2.c gtxf2.c gexf2.c negxf2.c
+.endif
+
SYM_MAPS+= ${.CURDIR}/softfloat/Symbol.map
diff --git a/lib/libc/softfloat/Symbol.map b/lib/libc/softfloat/Symbol.map
index 12fb335..9c9662a 100644
--- a/lib/libc/softfloat/Symbol.map
+++ b/lib/libc/softfloat/Symbol.map
@@ -18,16 +18,10 @@ FBSD_1.0 {
};
FBSDprivate_1.0 {
- _softfloat_float_exception_flags;
- _softfloat_float_exception_mask;
- _softfloat_float_rounding_mode;
- _softfloat_float_raise;
- _softfloat_float32_eq;
- _softfloat_float32_le;
- _softfloat_float32_lt;
- _softfloat_float64_eq;
- _softfloat_float64_le;
- _softfloat_float64_lt;
+ __softfloat_float_exception_flags;
+ __softfloat_float_exception_mask;
+ __softfloat_float_rounding_mode;
+ __softfloat_float_raise;
__eqdf2;
__eqsf2;
__gedf2;
diff --git a/lib/libc/softfloat/bits32/softfloat-macros b/lib/libc/softfloat/bits32/softfloat-macros
index 4fd4f2f..db4e038 100644
--- a/lib/libc/softfloat/bits32/softfloat-macros
+++ b/lib/libc/softfloat/bits32/softfloat-macros
@@ -312,7 +312,7 @@ INLINE void
carry0 = ( z1 < a1 );
z0 = a0 + b0;
z1 += carry1;
- z0 += ( z1 < carry1 );
+ z0 += ( z1 < (bits32)carry1 );
z0 += carry0;
*z2Ptr = z2;
*z1Ptr = z1;
@@ -369,7 +369,7 @@ INLINE void
z1 = a1 - b1;
borrow0 = ( a1 < b1 );
z0 = a0 - b0;
- z0 -= ( z1 < borrow1 );
+ z0 -= ( z1 < (bits32)borrow1 );
z1 -= borrow1;
z0 -= borrow0;
*z2Ptr = z2;
diff --git a/lib/libc/softfloat/bits32/softfloat.c b/lib/libc/softfloat/bits32/softfloat.c
index 7785c4e..ad7c016 100644
--- a/lib/libc/softfloat/bits32/softfloat.c
+++ b/lib/libc/softfloat/bits32/softfloat.c
@@ -77,8 +77,8 @@ __FBSDID("$FreeBSD$");
Floating-point rounding mode and exception flags.
-------------------------------------------------------------------------------
*/
-fp_rnd_t float_rounding_mode = float_round_nearest_even;
-fp_except float_exception_flags = 0;
+int float_rounding_mode = float_round_nearest_even;
+int float_exception_flags = 0;
/*
-------------------------------------------------------------------------------
diff --git a/lib/libc/softfloat/bits64/softfloat-macros b/lib/libc/softfloat/bits64/softfloat-macros
index 9b478e8..f4647de 100644
--- a/lib/libc/softfloat/bits64/softfloat-macros
+++ b/lib/libc/softfloat/bits64/softfloat-macros
@@ -1,4 +1,4 @@
-/* $NetBSD: softfloat-macros,v 1.1 2002/05/21 23:51:08 bjh21 Exp $ */
+/* $NetBSD: softfloat-macros,v 1.2 2009/02/16 10:23:35 tron Exp $ */
/* $FreeBSD$ */
/*
@@ -387,7 +387,7 @@ INLINE void
carry0 = ( z1 < a1 );
z0 = a0 + b0;
z1 += carry1;
- z0 += ( z1 < carry1 );
+ z0 += ( z1 < (bits64)carry1 );
z0 += carry0;
*z2Ptr = z2;
*z1Ptr = z1;
@@ -444,7 +444,7 @@ INLINE void
z1 = a1 - b1;
borrow0 = ( a1 < b1 );
z0 = a0 - b0;
- z0 -= ( z1 < borrow1 );
+ z0 -= ( z1 < (bits64)borrow1 );
z1 -= borrow1;
z0 -= borrow0;
*z2Ptr = z2;
diff --git a/lib/libc/softfloat/bits64/softfloat.c b/lib/libc/softfloat/bits64/softfloat.c
index ffd5661..79993fb 100644
--- a/lib/libc/softfloat/bits64/softfloat.c
+++ b/lib/libc/softfloat/bits64/softfloat.c
@@ -1,4 +1,4 @@
-/* $NetBSD: softfloat.c,v 1.2 2003/07/26 19:24:52 salo Exp $ */
+/* $NetBSD: softfloat.c,v 1.8 2011/07/10 04:52:23 matt Exp $ */
/*
* This version hacked for use with gcc -msoft-float by bjh21.
@@ -71,8 +71,8 @@ Floating-point rounding mode, extended double-precision rounding precision,
and exception flags.
-------------------------------------------------------------------------------
*/
-fp_rnd_t float_rounding_mode = float_round_nearest_even;
-fp_except float_exception_flags = 0;
+int float_rounding_mode = float_round_nearest_even;
+int float_exception_flags = 0;
#ifdef FLOATX80
int8 floatx80_rounding_precision = 80;
#endif
@@ -1126,6 +1126,17 @@ float32 int32_to_float32( int32 a )
}
+#ifndef SOFTFLOAT_FOR_GCC /* __floatunsisf is in libgcc */
+float32 uint32_to_float32( uint32 a )
+{
+ if ( a == 0 ) return 0;
+ if ( a & (bits32) 0x80000000 )
+ return normalizeRoundAndPackFloat32( 0, 0x9D, a >> 1 );
+ return normalizeRoundAndPackFloat32( 0, 0x9C, a );
+}
+#endif
+
+
/*
-------------------------------------------------------------------------------
Returns the result of converting the 32-bit two's complement integer `a'
@@ -1149,6 +1160,19 @@ float64 int32_to_float64( int32 a )
}
+#ifndef SOFTFLOAT_FOR_GCC /* __floatunsidf is in libgcc */
+float64 uint32_to_float64( uint32 a )
+{
+ int8 shiftCount;
+ bits64 zSig = a;
+
+ if ( a == 0 ) return 0;
+ shiftCount = countLeadingZeros32( a ) + 21;
+ return packFloat64( 0, 0x432 - shiftCount, zSig<<shiftCount );
+
+}
+#endif
+
#ifdef FLOATX80
/*
@@ -1175,6 +1199,17 @@ floatx80 int32_to_floatx80( int32 a )
}
+floatx80 uint32_to_floatx80( uint32 a )
+{
+ int8 shiftCount;
+ bits64 zSig = a;
+
+ if ( a == 0 ) return packFloatx80( 0, 0, 0 );
+ shiftCount = countLeadingZeros32( a ) + 32;
+ return packFloatx80( 0, 0x403E - shiftCount, zSig<<shiftCount );
+
+}
+
#endif
#ifdef FLOAT128
@@ -1202,6 +1237,17 @@ float128 int32_to_float128( int32 a )
}
+float128 uint32_to_float128( uint32 a )
+{
+ int8 shiftCount;
+ bits64 zSig0 = a;
+
+ if ( a == 0 ) return packFloat128( 0, 0, 0, 0 );
+ shiftCount = countLeadingZeros32( a ) + 17;
+ return packFloat128( 0, 0x402E - shiftCount, zSig0<<shiftCount, 0 );
+
+}
+
#endif
#ifndef SOFTFLOAT_FOR_GCC /* __floatdi?f is in libgcc2.c */
@@ -4438,6 +4484,59 @@ int64 float128_to_int64_round_to_zero( float128 a )
}
+#if (defined(SOFTFLOATSPARC64_FOR_GCC) || defined(SOFTFLOAT_FOR_GCC)) \
+ && defined(SOFTFLOAT_NEED_FIXUNS)
+/*
+ * just like above - but do not care for overflow of signed results
+ */
+uint64 float128_to_uint64_round_to_zero( float128 a )
+{
+ flag aSign;
+ int32 aExp, shiftCount;
+ bits64 aSig0, aSig1;
+ uint64 z;
+
+ aSig1 = extractFloat128Frac1( a );
+ aSig0 = extractFloat128Frac0( a );
+ aExp = extractFloat128Exp( a );
+ aSign = extractFloat128Sign( a );
+ if ( aExp ) aSig0 |= LIT64( 0x0001000000000000 );
+ shiftCount = aExp - 0x402F;
+ if ( 0 < shiftCount ) {
+ if ( 0x403F <= aExp ) {
+ aSig0 &= LIT64( 0x0000FFFFFFFFFFFF );
+ if ( ( a.high == LIT64( 0xC03E000000000000 ) )
+ && ( aSig1 < LIT64( 0x0002000000000000 ) ) ) {
+ if ( aSig1 ) float_exception_flags |= float_flag_inexact;
+ }
+ else {
+ float_raise( float_flag_invalid );
+ }
+ return LIT64( 0xFFFFFFFFFFFFFFFF );
+ }
+ z = ( aSig0<<shiftCount ) | ( aSig1>>( ( - shiftCount ) & 63 ) );
+ if ( (bits64) ( aSig1<<shiftCount ) ) {
+ float_exception_flags |= float_flag_inexact;
+ }
+ }
+ else {
+ if ( aExp < 0x3FFF ) {
+ if ( aExp | aSig0 | aSig1 ) {
+ float_exception_flags |= float_flag_inexact;
+ }
+ return 0;
+ }
+ z = aSig0>>( - shiftCount );
+ if (aSig1 || ( shiftCount && (bits64) ( aSig0<<( shiftCount & 63 ) ) ) ) {
+ float_exception_flags |= float_flag_inexact;
+ }
+ }
+ if ( aSign ) z = - z;
+ return z;
+
+}
+#endif /* (SOFTFLOATSPARC64_FOR_GCC || SOFTFLOAT_FOR_GCC) && SOFTFLOAT_NEED_FIXUNS */
+
/*
-------------------------------------------------------------------------------
Returns the result of converting the quadruple-precision floating-point
@@ -5110,7 +5209,7 @@ float128 float128_rem( float128 a, float128 b )
sub128( aSig0, aSig1, bSig0, bSig1, &aSig0, &aSig1 );
} while ( 0 <= (sbits64) aSig0 );
add128(
- aSig0, aSig1, alternateASig0, alternateASig1, &sigMean0, &sigMean1 );
+ aSig0, aSig1, alternateASig0, alternateASig1, (bits64 *)&sigMean0, &sigMean1 );
if ( ( sigMean0 < 0 )
|| ( ( ( sigMean0 | sigMean1 ) == 0 ) && ( q & 1 ) ) ) {
aSig0 = alternateASig0;
diff --git a/lib/libc/softfloat/eqtf2.c b/lib/libc/softfloat/eqtf2.c
new file mode 100644
index 0000000..1839404
--- /dev/null
+++ b/lib/libc/softfloat/eqtf2.c
@@ -0,0 +1,24 @@
+/* $NetBSD: eqtf2.c,v 1.1 2011/01/17 10:08:35 matt Exp $ */
+
+/*
+ * Written by Matt Thomas, 2011. This file is in the Public Domain.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include "softfloat-for-gcc.h"
+#include "milieu.h"
+#include "softfloat.h"
+
+#ifdef FLOAT128
+flag __eqtf2(float128, float128);
+
+flag
+__eqtf2(float128 a, float128 b)
+{
+
+ /* libgcc1.c says !(a == b) */
+ return !float128_eq(a, b);
+}
+#endif /* FLOAT128 */
diff --git a/lib/libc/softfloat/getf2.c b/lib/libc/softfloat/getf2.c
new file mode 100644
index 0000000..8639c4d
--- /dev/null
+++ b/lib/libc/softfloat/getf2.c
@@ -0,0 +1,26 @@
+/* $NetBSD: getf2.c,v 1.1 2011/01/17 10:08:35 matt Exp $ */
+
+/*
+ * Written by Matt Thomas, 2011. This file is in the Public Domain.
+ */
+
+#include "softfloat-for-gcc.h"
+#include "milieu.h"
+#include "softfloat.h"
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#ifdef FLOAT128
+
+flag __getf2(float128, float128);
+
+flag
+__getf2(float128 a, float128 b)
+{
+
+ /* libgcc1.c says (a >= b) - 1 */
+ return float128_le(b, a) - 1;
+}
+
+#endif /* FLOAT128 */
diff --git a/lib/libc/softfloat/gexf2.c b/lib/libc/softfloat/gexf2.c
new file mode 100644
index 0000000..70cf1c3
--- /dev/null
+++ b/lib/libc/softfloat/gexf2.c
@@ -0,0 +1,25 @@
+/* $NetBSD: gexf2.c,v 1.2 2004/09/27 10:16:24 he Exp $ */
+
+/*
+ * Written by Ben Harris, 2000. This file is in the Public Domain.
+ */
+
+#include "softfloat-for-gcc.h"
+#include "milieu.h"
+#include "softfloat.h"
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#ifdef FLOATX80
+
+flag __gexf2(floatx80, floatx80);
+
+flag
+__gexf2(floatx80 a, floatx80 b)
+{
+
+ /* libgcc1.c says (a >= b) - 1 */
+ return floatx80_le(b, a) - 1;
+}
+#endif /* FLOATX80 */
diff --git a/lib/libc/softfloat/gttf2.c b/lib/libc/softfloat/gttf2.c
new file mode 100644
index 0000000..519ea84
--- /dev/null
+++ b/lib/libc/softfloat/gttf2.c
@@ -0,0 +1,26 @@
+/* $NetBSD: gttf2.c,v 1.1 2011/01/17 10:08:35 matt Exp $ */
+
+/*
+ * Written by Matt Thomas, 2011. This file is in the Public Domain.
+ */
+
+#include "softfloat-for-gcc.h"
+#include "milieu.h"
+#include "softfloat.h"
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#ifdef FLOAT128
+
+flag __gttf2(float128, float128);
+
+flag
+__gttf2(float128 a, float128 b)
+{
+
+ /* libgcc1.c says a > b */
+ return float128_lt(b, a);
+}
+
+#endif /* FLOAT128 */
diff --git a/lib/libc/softfloat/gtxf2.c b/lib/libc/softfloat/gtxf2.c
new file mode 100644
index 0000000..fe8be52
--- /dev/null
+++ b/lib/libc/softfloat/gtxf2.c
@@ -0,0 +1,25 @@
+/* $NetBSD: gtxf2.c,v 1.2 2004/09/27 10:16:24 he Exp $ */
+
+/*
+ * Written by Ben Harris, 2000. This file is in the Public Domain.
+ */
+
+#include "softfloat-for-gcc.h"
+#include "milieu.h"
+#include "softfloat.h"
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#ifdef FLOATX80
+
+flag __gtxf2(floatx80, floatx80);
+
+flag
+__gtxf2(floatx80 a, floatx80 b)
+{
+
+ /* libgcc1.c says a > b */
+ return floatx80_lt(b, a);
+}
+#endif /* FLOATX80 */
diff --git a/lib/libc/softfloat/letf2.c b/lib/libc/softfloat/letf2.c
new file mode 100644
index 0000000..e9a18f8
--- /dev/null
+++ b/lib/libc/softfloat/letf2.c
@@ -0,0 +1,26 @@
+/* $NetBSD: letf2.c,v 1.1 2011/01/17 10:08:35 matt Exp $ */
+
+/*
+ * Written by Matt Thomas, 2011. This file is in the Public Domain.
+ */
+
+#include "softfloat-for-gcc.h"
+#include "milieu.h"
+#include "softfloat.h"
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#ifdef FLOAT128
+
+flag __letf2(float128, float128);
+
+flag
+__letf2(float128 a, float128 b)
+{
+
+ /* libgcc1.c says 1 - (a <= b) */
+ return 1 - float128_le(a, b);
+}
+
+#endif /* FLOAT128 */
diff --git a/lib/libc/softfloat/lttf2.c b/lib/libc/softfloat/lttf2.c
new file mode 100644
index 0000000..13c01b1
--- /dev/null
+++ b/lib/libc/softfloat/lttf2.c
@@ -0,0 +1,26 @@
+/* $NetBSD: lttf2.c,v 1.1 2011/01/17 10:08:35 matt Exp $ */
+
+/*
+ * Written by Matt Thomas, 2011. This file is in the Public Domain.
+ */
+
+#include "softfloat-for-gcc.h"
+#include "milieu.h"
+#include "softfloat.h"
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#ifdef FLOAT128
+
+flag __lttf2(float128, float128);
+
+flag
+__lttf2(float128 a, float128 b)
+{
+
+ /* libgcc1.c says -(a < b) */
+ return -float128_lt(a, b);
+}
+
+#endif /* FLOAT128 */
diff --git a/lib/libc/softfloat/negtf2.c b/lib/libc/softfloat/negtf2.c
new file mode 100644
index 0000000..5be582d
--- /dev/null
+++ b/lib/libc/softfloat/negtf2.c
@@ -0,0 +1,27 @@
+/* $NetBSD: negtf2.c,v 1.1 2011/01/17 10:08:35 matt Exp $ */
+
+/*
+ * Written by Matt Thomas, 2011. This file is in the Public Domain.
+ */
+
+#include "softfloat-for-gcc.h"
+#include "milieu.h"
+#include "softfloat.h"
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#ifdef FLOAT128
+
+float128 __negtf2(float128);
+
+float128
+__negtf2(float128 a)
+{
+
+ /* libgcc1.c says -a */
+ a.high ^= FLOAT64_MANGLE(0x8000000000000000ULL);
+ return a;
+}
+
+#endif /* FLOAT128 */
diff --git a/lib/libc/softfloat/negxf2.c b/lib/libc/softfloat/negxf2.c
new file mode 100644
index 0000000..0e2d08b
--- /dev/null
+++ b/lib/libc/softfloat/negxf2.c
@@ -0,0 +1,25 @@
+/* $NetBSD: negxf2.c,v 1.2 2004/09/27 10:16:24 he Exp $ */
+
+/*
+ * Written by Ben Harris, 2000. This file is in the Public Domain.
+ */
+
+#include "softfloat-for-gcc.h"
+#include "milieu.h"
+#include "softfloat.h"
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#ifdef FLOATX80
+
+floatx80 __negxf2(floatx80);
+
+floatx80
+__negxf2(floatx80 a)
+{
+
+ /* libgcc1.c says -a */
+ return __mulxf3(a,__floatsixf(-1));
+}
+#endif /* FLOATX80 */
diff --git a/lib/libc/softfloat/netf2.c b/lib/libc/softfloat/netf2.c
new file mode 100644
index 0000000..26e17cd
--- /dev/null
+++ b/lib/libc/softfloat/netf2.c
@@ -0,0 +1,26 @@
+/* $NetBSD: netf2.c,v 1.1 2011/01/17 10:08:35 matt Exp $ */
+
+/*
+ * Written by Matt Thomas, 2011. This file is in the Public Domain.
+ */
+
+#include "softfloat-for-gcc.h"
+#include "milieu.h"
+#include "softfloat.h"
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#ifdef FLOAT128
+
+flag __netf2(float128, float128);
+
+flag
+__netf2(float128 a, float128 b)
+{
+
+ /* libgcc1.c says a != b */
+ return !float128_eq(a, b);
+}
+
+#endif /* FLOAT128 */
diff --git a/lib/libc/softfloat/nexf2.c b/lib/libc/softfloat/nexf2.c
new file mode 100644
index 0000000..153a703
--- /dev/null
+++ b/lib/libc/softfloat/nexf2.c
@@ -0,0 +1,25 @@
+/* $NetBSD: nexf2.c,v 1.2 2004/09/27 10:16:24 he Exp $ */
+
+/*
+ * Written by Ben Harris, 2000. This file is in the Public Domain.
+ */
+
+#include "softfloat-for-gcc.h"
+#include "milieu.h"
+#include "softfloat.h"
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#ifdef FLOATX80
+
+flag __nexf2(floatx80, floatx80);
+
+flag
+__nexf2(floatx80 a, floatx80 b)
+{
+
+ /* libgcc1.c says a != b */
+ return !floatx80_eq(a, b);
+}
+#endif /* FLOATX80 */
diff --git a/lib/libc/softfloat/softfloat-for-gcc.h b/lib/libc/softfloat/softfloat-for-gcc.h
index fa5b3e8..cf17e56 100644
--- a/lib/libc/softfloat/softfloat-for-gcc.h
+++ b/lib/libc/softfloat/softfloat-for-gcc.h
@@ -1,21 +1,24 @@
-/* $NetBSD: softfloat-for-gcc.h,v 1.6 2003/07/26 19:24:51 salo Exp $ */
+/* $NetBSD: softfloat-for-gcc.h,v 1.8 2009/12/14 01:07:42 matt Exp $ */
/* $FreeBSD$ */
/*
* Move private identifiers with external linkage into implementation
* namespace. -- Klaus Klein <kleink@NetBSD.org>, May 5, 1999
*/
-#define float_exception_flags _softfloat_float_exception_flags
-#define float_exception_mask _softfloat_float_exception_mask
-#define float_rounding_mode _softfloat_float_rounding_mode
-#define float_raise _softfloat_float_raise
+#define float_exception_flags __softfloat_float_exception_flags
+#define float_exception_mask __softfloat_float_exception_mask
+#define float_rounding_mode __softfloat_float_rounding_mode
+#define float_raise __softfloat_float_raise
/* The following batch are called by GCC through wrappers */
-#define float32_eq _softfloat_float32_eq
-#define float32_le _softfloat_float32_le
-#define float32_lt _softfloat_float32_lt
-#define float64_eq _softfloat_float64_eq
-#define float64_le _softfloat_float64_le
-#define float64_lt _softfloat_float64_lt
+#define float32_eq __softfloat_float32_eq
+#define float32_le __softfloat_float32_le
+#define float32_lt __softfloat_float32_lt
+#define float64_eq __softfloat_float64_eq
+#define float64_le __softfloat_float64_le
+#define float64_lt __softfloat_float64_lt
+#define float128_eq __softfloat_float128_eq
+#define float128_le __softfloat_float128_le
+#define float128_lt __softfloat_float128_lt
/*
* Macros to define functions with the GCC expected names
@@ -23,21 +26,144 @@
#define float32_add __addsf3
#define float64_add __adddf3
+#define floatx80_add __addxf3
+#define float128_add __addtf3
+
#define float32_sub __subsf3
#define float64_sub __subdf3
+#define floatx80_sub __subxf3
+#define float128_sub __subtf3
+
#define float32_mul __mulsf3
#define float64_mul __muldf3
+#define floatx80_mul __mulxf3
+#define float128_mul __multf3
+
#define float32_div __divsf3
#define float64_div __divdf3
+#define floatx80_div __divxf3
+#define float128_div __divtf3
+
+#if 0
+#define float32_neg __negsf2
+#define float64_neg __negdf2
+#define floatx80_neg __negxf2
+#define float128_neg __negtf2
+#endif
+
#define int32_to_float32 __floatsisf
#define int32_to_float64 __floatsidf
+#define int32_to_floatx80 __floatsixf
+#define int32_to_float128 __floatsitf
+
#define int64_to_float32 __floatdisf
#define int64_to_float64 __floatdidf
+#define int64_to_floatx80 __floatdixf
+#define int64_to_float128 __floatditf
+
+#define int128_to_float32 __floattisf
+#define int128_to_float64 __floattidf
+#define int128_to_floatx80 __floattixf
+#define int128_to_float128 __floattitf
+
+#define uint32_to_float32 __floatunsisf
+#define uint32_to_float64 __floatunsidf
+#define uint32_to_floatx80 __floatunsixf
+#define uint32_to_float128 __floatunsitf
+
+#define uint64_to_float32 __floatundisf
+#define uint64_to_float64 __floatundidf
+#define uint64_to_floatx80 __floatundixf
+#define uint64_to_float128 __floatunditf
+
+#define uint128_to_float32 __floatuntisf
+#define uint128_to_float64 __floatuntidf
+#define uint128_to_floatx80 __floatuntixf
+#define uint128_to_float128 __floatuntitf
+
#define float32_to_int32_round_to_zero __fixsfsi
#define float64_to_int32_round_to_zero __fixdfsi
+#define floatx80_to_int32_round_to_zero __fixxfsi
+#define float128_to_int32_round_to_zero __fixtfsi
+
#define float32_to_int64_round_to_zero __fixsfdi
#define float64_to_int64_round_to_zero __fixdfdi
+#define floatx80_to_int64_round_to_zero __fixxfdi
+#define float128_to_int64_round_to_zero __fixtfdi
+
+#define float32_to_int128_round_to_zero __fixsfti
+#define float64_to_int128_round_to_zero __fixdfti
+#define floatx80_to_int128_round_to_zero __fixxfti
+#define float128_to_int128_round_to_zero __fixtfti
+
#define float32_to_uint32_round_to_zero __fixunssfsi
#define float64_to_uint32_round_to_zero __fixunsdfsi
+#define floatx80_to_uint32_round_to_zero __fixunsxfsi
+#define float128_to_uint32_round_to_zero __fixunstfsi
+
+#define float32_to_uint64_round_to_zero __fixunssfdi
+#define float64_to_uint64_round_to_zero __fixunsdfdi
+#define floatx80_to_uint64_round_to_zero __fixunsxfdi
+#define float128_to_uint64_round_to_zero __fixunstfdi
+
+#define float32_to_uint128_round_to_zero __fixunssfti
+#define float64_to_uint128_round_to_zero __fixunsdfti
+#define floatx80_to_uint128_round_to_zero __fixunsxfti
+#define float128_to_uint128_round_to_zero __fixunstfti
+
#define float32_to_float64 __extendsfdf2
+#define float32_to_floatx80 __extendsfxf2
+#define float32_to_float128 __extendsftf2
+#define float64_to_floatx80 __extenddfxf2
+#define float64_to_float128 __extenddftf2
+
+#define float128_to_float64 __trunctfdf2
+#define floatx80_to_float64 __truncxfdf2
+#define float128_to_float32 __trunctfsf2
+#define floatx80_to_float32 __truncxfsf2
#define float64_to_float32 __truncdfsf2
+
+#if 0
+#define float32_cmp __cmpsf2
+#define float32_unord __unordsf2
+#define float32_eq __eqsf2
+#define float32_ne __nesf2
+#define float32_ge __gesf2
+#define float32_lt __ltsf2
+#define float32_le __lesf2
+#define float32_gt __gtsf2
+#endif
+
+#if 0
+#define float64_cmp __cmpdf2
+#define float64_unord __unorddf2
+#define float64_eq __eqdf2
+#define float64_ne __nedf2
+#define float64_ge __gedf2
+#define float64_lt __ltdf2
+#define float64_le __ledf2
+#define float64_gt __gtdf2
+#endif
+
+/* XXX not in libgcc */
+#if 1
+#define floatx80_cmp __cmpxf2
+#define floatx80_unord __unordxf2
+#define floatx80_eq __eqxf2
+#define floatx80_ne __nexf2
+#define floatx80_ge __gexf2
+#define floatx80_lt __ltxf2
+#define floatx80_le __lexf2
+#define floatx80_gt __gtxf2
+#endif
+
+#if 0
+#define float128_cmp __cmptf2
+#define float128_unord __unordtf2
+#define float128_eq __eqtf2
+#define float128_ne __netf2
+#define float128_ge __getf2
+#define float128_lt __lttf2
+#define float128_le __letf2
+#define float128_gt __gttf2
+#endif
diff --git a/lib/libc/softfloat/softfloat-source.txt b/lib/libc/softfloat/softfloat-source.txt
index 0675966..2a15f2a 100644
--- a/lib/libc/softfloat/softfloat-source.txt
+++ b/lib/libc/softfloat/softfloat-source.txt
@@ -1,4 +1,4 @@
-$NetBSD: softfloat-source.txt,v 1.1 2000/06/06 08:15:10 bjh21 Exp $
+$NetBSD: softfloat-source.txt,v 1.2 2006/11/24 19:46:58 christos Exp $
$FreeBSD$
SoftFloat Release 2a Source Documentation
@@ -33,7 +33,7 @@ C Compiler (`gcc') for several platforms.
Limitations
SoftFloat as written requires an ISO/ANSI-style C compiler. No attempt has
-been made to accomodate compilers that are not ISO-conformant. Older ``K&R-
+been made to accommodate compilers that are not ISO-conformant. Older ``K&R-
style'' compilers are not adequate for compiling SoftFloat. All testing I
have done so far has been with the GNU C Compiler. Compilation with other
compilers should be possible but has not been tested.
diff --git a/lib/libc/softfloat/softfloat-specialize b/lib/libc/softfloat/softfloat-specialize
index e8585ce..b5eb8c3 100644
--- a/lib/libc/softfloat/softfloat-specialize
+++ b/lib/libc/softfloat/softfloat-specialize
@@ -1,4 +1,4 @@
-/* $NetBSD: softfloat-specialize,v 1.3 2002/05/12 13:12:45 bjh21 Exp $ */
+/* $NetBSD: softfloat-specialize,v 1.6 2011/03/06 10:27:37 martin Exp $ */
/* $FreeBSD$ */
/* This is a derivative work. */
@@ -34,6 +34,8 @@ this code that are retained.
*/
#include <signal.h>
+#include <string.h>
+#include <unistd.h>
/*
-------------------------------------------------------------------------------
@@ -58,16 +60,39 @@ substitute a result value. If traps are not implemented, this routine
should be simply `float_exception_flags |= flags;'.
-------------------------------------------------------------------------------
*/
-fp_except float_exception_mask = 0;
-void float_raise( fp_except flags )
+#ifdef SOFTFLOAT_FOR_GCC
+#define float_exception_mask __softfloat_float_exception_mask
+#endif
+int float_exception_mask = 0;
+void float_raise( int flags )
{
float_exception_flags |= flags;
if ( flags & float_exception_mask ) {
+#if 0
+ siginfo_t info;
+ memset(&info, 0, sizeof info);
+ info.si_signo = SIGFPE;
+ info.si_pid = getpid();
+ info.si_uid = geteuid();
+ if (flags & float_flag_underflow)
+ info.si_code = FPE_FLTUND;
+ else if (flags & float_flag_overflow)
+ info.si_code = FPE_FLTOVF;
+ else if (flags & float_flag_divbyzero)
+ info.si_code = FPE_FLTDIV;
+ else if (flags & float_flag_invalid)
+ info.si_code = FPE_FLTINV;
+ else if (flags & float_flag_inexact)
+ info.si_code = FPE_FLTRES;
+ sigqueueinfo(getpid(), &info);
+#else
raise( SIGFPE );
+#endif
}
}
+#undef float_exception_mask
/*
-------------------------------------------------------------------------------
@@ -108,7 +133,8 @@ Returns 1 if the single-precision floating-point value `a' is a signaling
NaN; otherwise returns 0.
-------------------------------------------------------------------------------
*/
-#if defined(SOFTFLOAT_FOR_GCC) && !defined(SOFTFLOATSPARC64_FOR_GCC)
+#if defined(SOFTFLOAT_FOR_GCC) && !defined(SOFTFLOATSPARC64_FOR_GCC) && \
+ !defined(SOFTFLOAT_M68K_FOR_GCC)
static
#endif
flag float32_is_signaling_nan( float32 a )
@@ -207,7 +233,8 @@ Returns 1 if the double-precision floating-point value `a' is a signaling
NaN; otherwise returns 0.
-------------------------------------------------------------------------------
*/
-#if defined(SOFTFLOAT_FOR_GCC) && !defined(SOFTFLOATSPARC64_FOR_GCC)
+#if defined(SOFTFLOAT_FOR_GCC) && !defined(SOFTFLOATSPARC64_FOR_GCC) && \
+ !defined(SOFTFLOATM68K_FOR_GCC)
static
#endif
flag float64_is_signaling_nan( float64 a )
diff --git a/lib/libc/softfloat/softfloat.txt b/lib/libc/softfloat/softfloat.txt
index bd63324..414506f 100644
--- a/lib/libc/softfloat/softfloat.txt
+++ b/lib/libc/softfloat/softfloat.txt
@@ -1,4 +1,4 @@
-$NetBSD: softfloat.txt,v 1.1 2000/06/06 08:15:10 bjh21 Exp $
+$NetBSD: softfloat.txt,v 1.2 2006/11/24 19:46:58 christos Exp $
$FreeBSD$
SoftFloat Release 2a General Documentation
@@ -27,7 +27,7 @@ Limitations
SoftFloat is written in C and is designed to work with other C code. The
SoftFloat header files assume an ISO/ANSI-style C compiler. No attempt
-has been made to accomodate compilers that are not ISO-conformant. In
+has been made to accommodate compilers that are not ISO-conformant. In
particular, the distributed header files will not be acceptable to any
compiler that does not recognize function prototypes.
diff --git a/lib/libc/sparc64/fpu/fpu_emu.h b/lib/libc/sparc64/fpu/fpu_emu.h
index 0d1d16d..0822de8 100644
--- a/lib/libc/sparc64/fpu/fpu_emu.h
+++ b/lib/libc/sparc64/fpu/fpu_emu.h
@@ -159,7 +159,8 @@ struct fpemu {
* Each of these may modify its inputs (f1,f2) and/or the temporary.
* Each returns a pointer to the result and/or sets exceptions.
*/
-#define __fpu_sub(fe) ((fe)->fe_f2.fp_sign ^= 1, __fpu_add(fe))
+#define __fpu_sub(fe) (ISNAN(&(fe)->fe_f2) ? 0 : ((fe)->fe_f2.fp_sign ^= 1), \
+ __fpu_add(fe))
#ifdef FPU_DEBUG
#define FPE_INSN 0x1
diff --git a/lib/libc/sparc64/fpu/fpu_mul.c b/lib/libc/sparc64/fpu/fpu_mul.c
index 173810e..3fe27c4 100644
--- a/lib/libc/sparc64/fpu/fpu_mul.c
+++ b/lib/libc/sparc64/fpu/fpu_mul.c
@@ -125,10 +125,8 @@ __fpu_mul(fe)
* The result is x * y (XOR sign, multiply bits, add exponents).
*/
ORDER(x, y);
- if (ISNAN(y)) {
- y->fp_sign ^= x->fp_sign;
+ if (ISNAN(y))
return (y);
- }
if (ISINF(y)) {
if (ISZERO(x))
return (__fpu_newnan(fe));
diff --git a/lib/libc/sparc64/gen/Makefile.inc b/lib/libc/sparc64/gen/Makefile.inc
index f82f225..d3fbfe4 100644
--- a/lib/libc/sparc64/gen/Makefile.inc
+++ b/lib/libc/sparc64/gen/Makefile.inc
@@ -2,5 +2,5 @@
SRCS+= _ctx_start.S _setjmp.S fabs.S fixunsdfsi.S flt_rounds.c fpgetmask.c \
fpgetround.c fpgetsticky.c fpsetmask.c fpsetround.c \
- infinity.c ldexp.c makecontext.c \
+ getcontextx.c infinity.c ldexp.c makecontext.c \
signalcontext.c setjmp.S sigsetjmp.S _set_tp.c
diff --git a/lib/libc/sparc64/gen/getcontextx.c b/lib/libc/sparc64/gen/getcontextx.c
new file mode 100644
index 0000000..b701c18
--- /dev/null
+++ b/lib/libc/sparc64/gen/getcontextx.c
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2011 Konstantin Belousov <kib@FreeBSD.org>
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/types.h>
+#include <sys/ucontext.h>
+#include <errno.h>
+#include <stdlib.h>
+
+size_t
+__getcontextx_size(void)
+{
+
+ return (sizeof(ucontext_t));
+}
+
+int
+__fillcontextx(char *ctx)
+{
+ ucontext_t *ucp;
+
+ ucp = (ucontext_t *)ctx;
+ return (getcontext(ucp));
+}
+
+__weak_reference(__getcontextx, getcontextx);
+
+ucontext_t *
+__getcontextx(void)
+{
+ char *ctx;
+ int error;
+
+ ctx = malloc(__getcontextx_size());
+ if (ctx == NULL)
+ return (NULL);
+ if (__fillcontextx(ctx) == -1) {
+ error = errno;
+ free(ctx);
+ errno = error;
+ return (NULL);
+ }
+ return ((ucontext_t *)ctx);
+}
diff --git a/lib/libc/stdlib/Makefile.inc b/lib/libc/stdlib/Makefile.inc
index 7db0f60..9d530bc 100644
--- a/lib/libc/stdlib/Makefile.inc
+++ b/lib/libc/stdlib/Makefile.inc
@@ -18,17 +18,18 @@ SYM_MAPS+= ${.CURDIR}/stdlib/Symbol.map
# machine-dependent stdlib sources
.sinclude "${.CURDIR}/${LIBC_ARCH}/stdlib/Makefile.inc"
-MAN+= a64l.3 abort.3 abs.3 alloca.3 atexit.3 atof.3 atoi.3 atol.3 \
- at_quick_exit.3 bsearch.3 \
+MAN+= a64l.3 abort.3 abs.3 aligned_alloc.3 alloca.3 atexit.3 atof.3 \
+ atoi.3 atol.3 at_quick_exit.3 bsearch.3 \
div.3 exit.3 getenv.3 getopt.3 getopt_long.3 getsubopt.3 \
hcreate.3 imaxabs.3 imaxdiv.3 insque.3 labs.3 ldiv.3 llabs.3 lldiv.3 \
- lsearch.3 malloc.3 memory.3 posix_memalign.3 ptsname.3 qsort.3 \
+ lsearch.3 malloc.3 memory.3 ptsname.3 qsort.3 \
quick_exit.3 \
radixsort.3 rand.3 random.3 \
realpath.3 strfmon.3 strtod.3 strtol.3 strtonum.3 strtoul.3 system.3 \
tsearch.3
MLINKS+=a64l.3 l64a.3 a64l.3 l64a_r.3
+MLINKS+=aligned_alloc.3 posix_memalign.3
MLINKS+=atol.3 atoll.3
MLINKS+=exit.3 _Exit.3
MLINKS+=getenv.3 putenv.3 getenv.3 setenv.3 getenv.3 unsetenv.3
diff --git a/lib/libc/stdlib/Symbol.map b/lib/libc/stdlib/Symbol.map
index 897bccd..89dea44 100644
--- a/lib/libc/stdlib/Symbol.map
+++ b/lib/libc/stdlib/Symbol.map
@@ -93,18 +93,19 @@ FBSD_1.0 {
};
FBSD_1.3 {
+ aligned_alloc;
+ at_quick_exit;
atof_l;
atoi_l;
atol_l;
atoll_l;
- at_quick_exit;
quick_exit;
strtod_l;
- strtol_l;
- strtoll_l;
strtof_l;
strtoimax_l;
+ strtol_l;
strtold_l;
+ strtoll_l;
strtoq_l;
strtoul_l;
strtoull_l;
diff --git a/lib/libc/stdlib/aligned_alloc.3 b/lib/libc/stdlib/aligned_alloc.3
new file mode 100644
index 0000000..ff78b4b
--- /dev/null
+++ b/lib/libc/stdlib/aligned_alloc.3
@@ -0,0 +1,126 @@
+.\" Copyright (C) 2006 Jason Evans <jasone@FreeBSD.org>.
+.\" 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(s), this list of conditions and the following disclaimer as
+.\" the first lines of this file unmodified other than the possible
+.\" addition of one or more copyright notices.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice(s), this list of conditions and the following disclaimer in
+.\" the documentation and/or other materials provided with the
+.\" distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY
+.\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE
+.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+.\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+.\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+.\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 7, 2011
+.Dt ALIGNED_ALLOC 3
+.Os
+.Sh NAME
+.Nm aligned_alloc ,
+.Nm posix_memalign
+.Nd aligned memory allocation
+.Sh LIBRARY
+.Lb libc
+.Sh SYNOPSIS
+.In stdlib.h
+.Ft void *
+.Fn aligned_alloc "size_t alignment" "size_t size"
+.Ft int
+.Fn posix_memalign "void **ptr" "size_t alignment" "size_t size"
+.Sh DESCRIPTION
+The
+.Fn aligned_alloc
+and
+.Fn posix_memalign
+functions allocate
+.Fa size
+bytes of memory such that the allocation's base address is an even multiple of
+.Fa alignment .
+The
+.Fn aligned_alloc
+function returns the allocation, while the
+.Fn posix_memalign
+function stores the allocation in the value pointed to by
+.Fa ptr .
+.Pp
+The requested
+.Fa alignment
+must be a power of 2 at least as large as
+.Fn sizeof "void *" .
+.Pp
+Memory that is allocated via
+.Fn aligned_alloc
+and
+.Fn posix_memalign
+can be used as an argument in subsequent calls to
+.Xr realloc 3 ,
+.Xr reallocf 3 ,
+and
+.Xr free 3 .
+.Sh RETURN VALUES
+The
+.Fn aligned_alloc
+function returns a pointer to the allocation if successful; otherwise a
+NULL pointer is returned and
+.Va errno
+is set to an error value.
+.Pp
+The
+.Fn posix_memalign
+function returns the value 0 if successful; otherwise it returns an error value.
+.Sh ERRORS
+The
+.Fn aligned_alloc
+and
+.Fn posix_memalign
+functions will fail if:
+.Bl -tag -width Er
+.It Bq Er EINVAL
+The
+.Fa alignment
+parameter is not a power of 2 at least as large as
+.Fn sizeof "void *" .
+.It Bq Er ENOMEM
+Memory allocation error.
+.El
+.Sh SEE ALSO
+.Xr free 3 ,
+.Xr malloc 3 ,
+.Xr realloc 3 ,
+.Xr reallocf 3 ,
+.Xr valloc 3
+.Sh STANDARDS
+The
+.Fn aligned_alloc
+function conforms to
+.St -isoC-2011 .
+.Pp
+The
+.Fn posix_memalign
+function conforms to
+.St -p1003.1-2001 .
+.Sh HISTORY
+The
+.Fn posix_memalign
+function first appeared in
+.Fx 7.0 .
+.Pp
+The
+.Fn aligned_alloc
+function first appeared in
+.Fx 10.0 .
diff --git a/lib/libc/stdlib/getopt_long.3 b/lib/libc/stdlib/getopt_long.3
index 72f6534..06eadca 100644
--- a/lib/libc/stdlib/getopt_long.3
+++ b/lib/libc/stdlib/getopt_long.3
@@ -31,7 +31,7 @@
.\" @(#)getopt.3 8.5 (Berkeley) 4/27/95
.\" $FreeBSD$
.\"
-.Dd April 1, 2000
+.Dd December 25, 2011
.Dt GETOPT_LONG 3
.Os
.Sh NAME
@@ -239,7 +239,7 @@ static struct option longopts[] = {
};
bflag = 0;
-while ((ch = getopt_long(argc, argv, "bf:", longopts, NULL)) != -1)
+while ((ch = getopt_long(argc, argv, "bf:", longopts, NULL)) != -1) {
switch (ch) {
case 'b':
bflag = 1;
@@ -256,6 +256,7 @@ while ((ch = getopt_long(argc, argv, "bf:", longopts, NULL)) != -1)
break;
default:
usage();
+ }
}
argc -= optind;
argv += optind;
diff --git a/lib/libc/stdlib/getsubopt.3 b/lib/libc/stdlib/getsubopt.3
index b624eff..86894eb 100644
--- a/lib/libc/stdlib/getsubopt.3
+++ b/lib/libc/stdlib/getsubopt.3
@@ -28,7 +28,7 @@
.\" @(#)getsubopt.3 8.1 (Berkeley) 6/9/93
.\" $FreeBSD$
.\"
-.Dd June 9, 1993
+.Dd December 25, 2011
.Dt GETSUBOPT 3
.Os
.Sh NAME
@@ -131,9 +131,11 @@ while ((ch = getopt(argc, argv, "ab:")) != \-1) {
else
error("missing sub option");
break;
+ }
}
break;
}
+}
.Ed
.Sh SEE ALSO
.Xr getopt 3 ,
diff --git a/lib/libc/stdlib/malloc.c b/lib/libc/stdlib/malloc.c
index 5290512..2d932cb 100644
--- a/lib/libc/stdlib/malloc.c
+++ b/lib/libc/stdlib/malloc.c
@@ -219,7 +219,11 @@ __FBSDID("$FreeBSD$");
# define LG_QUANTUM 4
# define LG_SIZEOF_PTR 2
# define CPU_SPINWAIT __asm__ volatile("pause")
-# define TLS_MODEL __attribute__((tls_model("initial-exec")))
+# ifdef __clang__
+# define TLS_MODEL /* clang does not support tls_model yet */
+# else
+# define TLS_MODEL __attribute__((tls_model("initial-exec")))
+# endif
#endif
#ifdef __ia64__
# define LG_QUANTUM 4
@@ -240,7 +244,11 @@ __FBSDID("$FreeBSD$");
# define LG_QUANTUM 4
# define LG_SIZEOF_PTR 3
# define CPU_SPINWAIT __asm__ volatile("pause")
-# define TLS_MODEL __attribute__((tls_model("initial-exec")))
+# ifdef __clang__
+# define TLS_MODEL /* clang does not support tls_model yet */
+# else
+# define TLS_MODEL __attribute__((tls_model("initial-exec")))
+# endif
#endif
#ifdef __arm__
# define LG_QUANTUM 3
@@ -6035,6 +6043,20 @@ RETURN:
}
void *
+aligned_alloc(size_t alignment, size_t size)
+{
+ void *memptr;
+ int ret;
+
+ ret = posix_memalign(&memptr, alignment, size);
+ if (ret != 0) {
+ errno = ret;
+ return (NULL);
+ }
+ return (memptr);
+}
+
+void *
calloc(size_t num, size_t size)
{
void *ret;
diff --git a/lib/libc/stdlib/posix_memalign.3 b/lib/libc/stdlib/posix_memalign.3
deleted file mode 100644
index b092ced..0000000
--- a/lib/libc/stdlib/posix_memalign.3
+++ /dev/null
@@ -1,96 +0,0 @@
-.\" Copyright (C) 2006 Jason Evans <jasone@FreeBSD.org>.
-.\" 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(s), this list of conditions and the following disclaimer as
-.\" the first lines of this file unmodified other than the possible
-.\" addition of one or more copyright notices.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice(s), this list of conditions and the following disclaimer in
-.\" the documentation and/or other materials provided with the
-.\" distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY
-.\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE
-.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-.\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-.\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-.\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" $FreeBSD$
-.\"
-.Dd January 11, 2006
-.Dt POSIX_MEMALIGN 3
-.Os
-.Sh NAME
-.Nm posix_memalign
-.Nd aligned memory allocation
-.Sh LIBRARY
-.Lb libc
-.Sh SYNOPSIS
-.In stdlib.h
-.Ft int
-.Fn posix_memalign "void **ptr" "size_t alignment" "size_t size"
-.Sh DESCRIPTION
-The
-.Fn posix_memalign
-function allocates
-.Fa size
-bytes of memory such that the allocation's base address is an even multiple of
-.Fa alignment ,
-and returns the allocation in the value pointed to by
-.Fa ptr .
-.Pp
-The requested
-.Fa alignment
-must be a power of 2 at least as large as
-.Fn sizeof "void *" .
-.Pp
-Memory that is allocated via
-.Fn posix_memalign
-can be used as an argument in subsequent calls to
-.Xr realloc 3 ,
-.Xr reallocf 3 ,
-and
-.Xr free 3 .
-.Sh RETURN VALUES
-The
-.Fn posix_memalign
-function returns the value 0 if successful; otherwise it returns an error value.
-.Sh ERRORS
-The
-.Fn posix_memalign
-function will fail if:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-The
-.Fa alignment
-parameter is not a power of 2 at least as large as
-.Fn sizeof "void *" .
-.It Bq Er ENOMEM
-Memory allocation error.
-.El
-.Sh SEE ALSO
-.Xr free 3 ,
-.Xr malloc 3 ,
-.Xr realloc 3 ,
-.Xr reallocf 3 ,
-.Xr valloc 3
-.Sh STANDARDS
-The
-.Fn posix_memalign
-function conforms to
-.St -p1003.1-2001 .
-.Sh HISTORY
-The
-.Fn posix_memalign
-function first appeared in
-.Fx 7.0 .
diff --git a/lib/libc/stdlib/quick_exit.c b/lib/libc/stdlib/quick_exit.c
index 33f9348..ef8cdb1 100644
--- a/lib/libc/stdlib/quick_exit.c
+++ b/lib/libc/stdlib/quick_exit.c
@@ -51,10 +51,12 @@ static struct quick_exit_handler *handlers;
int
at_quick_exit(void (*func)(void))
{
- struct quick_exit_handler *h = malloc(sizeof(struct quick_exit_handler));
+ struct quick_exit_handler *h;
+
+ h = malloc(sizeof(*h));
if (NULL == h)
- return 1;
+ return (1);
h->cleanup = func;
pthread_mutex_lock(&atexit_mutex);
h->next = handlers;
diff --git a/lib/libc/string/Makefile.inc b/lib/libc/string/Makefile.inc
index 3673a41..1dbe317 100644
--- a/lib/libc/string/Makefile.inc
+++ b/lib/libc/string/Makefile.inc
@@ -7,8 +7,8 @@ CFLAGS+= -I${.CURDIR}/locale
# machine-independent string sources
MISRCS+=bcmp.c bcopy.c bzero.c ffs.c ffsl.c ffsll.c fls.c flsl.c flsll.c \
- index.c memccpy.c memchr.c memrchr.c memcmp.c \
- memcpy.c memmem.c memmove.c memset.c rindex.c \
+ memccpy.c memchr.c memrchr.c memcmp.c \
+ memcpy.c memmem.c memmove.c memset.c \
stpcpy.c stpncpy.c strcasecmp.c \
strcat.c strcasestr.c strchr.c strcmp.c strcoll.c strcpy.c strcspn.c \
strdup.c strerror.c strlcat.c strlcpy.c strlen.c strmode.c strncat.c \
diff --git a/lib/libc/string/index.c b/lib/libc/string/index.c
deleted file mode 100644
index a3a317d..0000000
--- a/lib/libc/string/index.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/*-
- * Copyright (c) 1990, 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.
- * 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.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)index.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <stddef.h>
-
-#ifdef STRCHR
-#include <string.h>
-
-char *
-strchr
-#else
-#include <strings.h>
-
-char *
-index
-#endif
-(const char *p, int ch)
-{
- char c;
-
- c = ch;
- for (;; ++p) {
- if (*p == c)
- return ((char *)p);
- if (*p == '\0')
- return (NULL);
- }
- /* NOTREACHED */
-}
diff --git a/lib/libc/string/rindex.c b/lib/libc/string/rindex.c
deleted file mode 100644
index 9fd0bdc..0000000
--- a/lib/libc/string/rindex.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 1988, 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.
- * 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.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)rindex.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <stddef.h>
-
-#ifdef STRRCHR
-#include <string.h>
-
-char *
-strrchr
-#else
-#include <strings.h>
-
-char *
-rindex
-#endif
-(const char *p, int ch)
-{
- char *save;
- char c;
-
- c = ch;
- for (save = NULL;; ++p) {
- if (*p == c)
- save = (char *)p;
- if (*p == '\0')
- return (save);
- }
- /* NOTREACHED */
-}
diff --git a/lib/libc/string/strchr.c b/lib/libc/string/strchr.c
index 1d82abe..1245f13 100644
--- a/lib/libc/string/strchr.c
+++ b/lib/libc/string/strchr.c
@@ -1,5 +1,54 @@
+/*-
+ * Copyright (c) 1990, 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.
+ * 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.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+static char sccsid[] = "@(#)index.c 8.1 (Berkeley) 6/4/93";
+#endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#define STRCHR
-#include "index.c"
+#include <stddef.h>
+#include <string.h>
+
+char *
+strchr(const char *p, int ch)
+{
+ char c;
+
+ c = ch;
+ for (;; ++p) {
+ if (*p == c)
+ return ((char *)p);
+ if (*p == '\0')
+ return (NULL);
+ }
+ /* NOTREACHED */
+}
+
+__weak_reference(strchr, index);
diff --git a/lib/libc/string/strrchr.c b/lib/libc/string/strrchr.c
index 11cbd31..be9f978 100644
--- a/lib/libc/string/strrchr.c
+++ b/lib/libc/string/strrchr.c
@@ -1,5 +1,55 @@
+/*
+ * Copyright (c) 1988, 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.
+ * 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.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+static char sccsid[] = "@(#)rindex.c 8.1 (Berkeley) 6/4/93";
+#endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#define STRRCHR
-#include "rindex.c"
+#include <stddef.h>
+#include <string.h>
+
+char *
+strrchr(const char *p, int ch)
+{
+ char *save;
+ char c;
+
+ c = ch;
+ for (save = NULL;; ++p) {
+ if (*p == c)
+ save = (char *)p;
+ if (*p == '\0')
+ return (save);
+ }
+ /* NOTREACHED */
+}
+
+__weak_reference(strrchr, rindex);
diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc
index ea38b51..073220e 100644
--- a/lib/libc/sys/Makefile.inc
+++ b/lib/libc/sys/Makefile.inc
@@ -188,6 +188,7 @@ MLINKS+=read.2 pread.2 read.2 preadv.2 read.2 readv.2
MLINKS+=readlink.2 readlinkat.2
MLINKS+=recv.2 recvfrom.2 recv.2 recvmsg.2
MLINKS+=rename.2 renameat.2
+MLINKS+=rtprio.2 rtprio_thread.2
.if !defined(NO_P1003_1B)
MLINKS+=sched_get_priority_max.2 sched_get_priority_min.2 \
sched_get_priority_max.2 sched_rr_get_interval.2
diff --git a/lib/libc/sys/cap_new.2 b/lib/libc/sys/cap_new.2
index c15cc46..362be5c 100644
--- a/lib/libc/sys/cap_new.2
+++ b/lib/libc/sys/cap_new.2
@@ -107,17 +107,17 @@ Permit checking of an ACL on a file descriptor; there is no cross-reference
for this system call.
.It Dv CAP_ACL_DELETE
Permit
-.Xr acl_delete_fd_np 2 .
+.Xr acl_delete_fd_np 3 .
.It Dv CAP_ACL_GET
Permit
-.Xr acl_get_fd 2
+.Xr acl_get_fd 3
and
-.Xr acl_get_fd_np 2 .
+.Xr acl_get_fd_np 3 .
.It Dv CAP_ACL_SET
Permit
-.Xr acl_set_fd 2
+.Xr acl_set_fd 3
and
-.Xr acl_set_fd_np 2 .
+.Xr acl_set_fd_np 3 .
.It Dv CAP_BIND
Permit
.Xr bind 2 .
@@ -240,10 +240,10 @@ a global name space; see
for details.
.It Dv CAP_MAC_GET
Permit
-.Xr mac_get_fd 2 .
+.Xr mac_get_fd 3 .
.It Dv CAP_MAC_SET
Permit
-.Xr mac_set_fd 2 .
+.Xr mac_set_fd 3 .
.It Dv CAP_MMAP
Permit
.Xr mmap 2 ;
@@ -385,12 +385,8 @@ argument is not a capability.
.El
.Sh SEE ALSO
.Xr accept 2 ,
-.Xr acl_delete_fd_np 2 ,
-.Xr acl_get_fd 2 ,
-.Xr acl_get_fd_np 2 ,
-.Xr acl_set_fd_np 2 ,
-.Xr aio_read 2 ,
.Xr aio_fsync 2 ,
+.Xr aio_read 2 ,
.Xr aio_write 2 ,
.Xr bind 2 ,
.Xr cap_enter 2 ,
@@ -421,8 +417,6 @@ argument is not a capability.
.Xr kqueue 2 ,
.Xr linkat 2 ,
.Xr listen 2 ,
-.Xr mac_get_fd 2 ,
-.Xr mac_set_fd 2 ,
.Xr mmap 2 ,
.Xr mq_open 2 ,
.Xr open 2 ,
@@ -450,8 +444,14 @@ argument is not a capability.
.Xr socketpair 2 ,
.Xr unlinkat 2 ,
.Xr write 2 ,
+.Xr acl_delete_fd_np 3 ,
+.Xr acl_get_fd 3 ,
+.Xr acl_get_fd_np 3 ,
+.Xr acl_set_fd_np 3 ,
.Xr cap_limitfd 3 ,
.Xr libcapsicum 3 ,
+.Xr mac_get_fd 3 ,
+.Xr mac_set_fd 3 ,
.Xr sem_getvalue 3 ,
.Xr sem_post 3 ,
.Xr sem_trywait 3 ,
diff --git a/lib/libc/sys/chroot.2 b/lib/libc/sys/chroot.2
index ecf2eb5..060d064 100644
--- a/lib/libc/sys/chroot.2
+++ b/lib/libc/sys/chroot.2
@@ -28,7 +28,7 @@
.\" @(#)chroot.2 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
-.Dd June 4, 1993
+.Dd January 3, 2012
.Dt CHROOT 2
.Os
.Sh NAME
@@ -134,9 +134,27 @@ The
.Fn chroot
system call appeared in
.Bx 4.2 .
+It was marked as
+.Dq legacy
+in
+.St -susv2 ,
+and was removed in subsequent standards.
.Sh BUGS
If the process is able to change its working directory to the target
directory, but another access control check fails (such as a check for
open directories, or a MAC check), it is possible that this system
call may return an error, with the working directory of the process
left changed.
+.Sh SECURITY CONSIDERATIONS
+The system have many hardcoded paths to files where it may load after
+the process starts.
+It is generally recommended to drop privileges immediately after a
+successful
+.Nm
+call,
+and restrict write access to a limited subtree of the
+.Nm
+root,
+for instance,
+setup the sandbox so that the sandboxed user will have no write
+access to any well-known system directories.
diff --git a/lib/libc/sys/close.2 b/lib/libc/sys/close.2
index 524322b..c3a0972 100644
--- a/lib/libc/sys/close.2
+++ b/lib/libc/sys/close.2
@@ -28,7 +28,7 @@
.\" @(#)close.2 8.2 (Berkeley) 4/19/94
.\" $FreeBSD$
.\"
-.Dd December 4, 2006
+.Dd January 22, 2012
.Dt CLOSE 2
.Os
.Sh NAME
@@ -118,6 +118,10 @@ The underlying object did not fit, cached data was lost.
The underlying object was a stream socket that was shut down by the peer
before all pending data was delivered.
.El
+.Pp
+In case of any error except
+.Er EBADF ,
+the supplied file descriptor is deallocated and therefore is no longer valid.
.Sh SEE ALSO
.Xr accept 2 ,
.Xr closefrom 2 ,
diff --git a/lib/libc/sys/read.2 b/lib/libc/sys/read.2
index 19e4ffe..06e0ef1 100644
--- a/lib/libc/sys/read.2
+++ b/lib/libc/sys/read.2
@@ -28,7 +28,7 @@
.\" @(#)read.2 8.4 (Berkeley) 2/26/94
.\" $FreeBSD$
.\"
-.Dd October 11, 2006
+.Dd January 22, 2012
.Dt READ 2
.Os
.Sh NAME
@@ -41,12 +41,12 @@
.Lb libc
.Sh SYNOPSIS
.In sys/types.h
-.In sys/uio.h
.In unistd.h
.Ft ssize_t
.Fn read "int d" "void *buf" "size_t nbytes"
.Ft ssize_t
.Fn pread "int d" "void *buf" "size_t nbytes" "off_t offset"
+.In sys/uio.h
.Ft ssize_t
.Fn readv "int d" "const struct iovec *iov" "int iovcnt"
.Ft ssize_t
diff --git a/lib/libc/sys/rtprio.2 b/lib/libc/sys/rtprio.2
index afed81e..faad941 100644
--- a/lib/libc/sys/rtprio.2
+++ b/lib/libc/sys/rtprio.2
@@ -1,3 +1,4 @@
+.\"-
.\" Copyright (c) 1994, Henrik Vestergaard Draboel
.\" All rights reserved.
.\"
@@ -26,15 +27,40 @@
.\" 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.
+.\"-
+.\" Copyright (c) 2011 Xin LI <delphij@FreeBSD.org>
+.\" 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.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
.\"
.\" $FreeBSD$
.\"
-.Dd July 23, 1994
+.Dd December 27, 2011
.Dt RTPRIO 2
.Os
.Sh NAME
-.Nm rtprio
-.Nd examine or modify a process realtime or idle priority
+.Nm rtprio ,
+.Nm rtprio_thread
+.Nd examine or modify realtime or idle priority
.Sh LIBRARY
.Lb libc
.Sh SYNOPSIS
@@ -42,11 +68,18 @@
.In sys/rtprio.h
.Ft int
.Fn rtprio "int function" "pid_t pid" "struct rtprio *rtp"
+.Ft int
+.Fn rtprio_thread "int function" "lwpid_t lwpid" "struct rtprio *rtp"
.Sh DESCRIPTION
The
.Fn rtprio
system call
-is used to lookup or change the realtime or idle priority of a process.
+is used to lookup or change the realtime or idle priority of a process,
+or the calling thread.
+The
+.Fn rtprio_thread
+system call
+is used to lookup or change the realtime or idle priority of a thread.
.Pp
The
.Fa function
@@ -54,10 +87,31 @@ argument
specifies the operation to be performed.
RTP_LOOKUP to lookup the current priority,
and RTP_SET to set the priority.
-The
+.Pp
+For the
+.Fn rtprio
+system call,
+the
.Fa pid
argument
-specifies the process to be used, 0 for the current process.
+specifies the process to operate on,
+0 for the calling thread.
+When
+.Fa pid
+is non-zero,
+the system call reports the highest priority in the process,
+or sets all threads' priority in the process,
+depending on value of the
+.Fa function
+argument.
+.Pp
+For the
+.Fn rtprio_thread
+system call,
+the
+.Fa lwpid
+specifies the thread to operate on,
+0 for the calling thread.
.Pp
The
.Fa *rtp
@@ -83,12 +137,12 @@ field ranges between 0 and
.Pp
Realtime and idle priority is inherited through fork() and exec().
.Pp
-A realtime process can only be preempted by a process of equal or
-higher priority, or by an interrupt; idle priority processes will run only
-when no other real/normal priority process is runnable.
-Higher real/idle priority processes
-preempt lower real/idle priority processes.
-Processes of equal real/idle priority are run round-robin.
+A realtime thread can only be preempted by a thread of equal or
+higher priority, or by an interrupt; idle priority threads will run only
+when no other real/normal priority thread is runnable.
+Higher real/idle priority threads
+preempt lower real/idle priority threads.
+Threads of equal real/idle priority are run round-robin.
.Sh RETURN VALUES
.Rv -std rtprio
.Sh ERRORS
@@ -102,12 +156,17 @@ The specified
.Fa prio
was out of range.
.It Bq Er EPERM
-The calling process is not allowed to set the realtime priority.
+The calling thread is not allowed to set the realtime priority.
Only
-root is allowed to change the realtime priority of any process, and non-root
-may only change the idle priority of the current process.
+root is allowed to change the realtime priority of any thread, and non-root
+may only change the idle priority of threads the user owns,
+when the
+.Xr sysctl 8
+variable
+.Va security.bsd.unprivileged_idprio
+is set to non-zero.
.It Bq Er ESRCH
-The specified process was not found.
+The specified process or thread was not found or visible.
.El
.Sh SEE ALSO
.Xr nice 1 ,
@@ -115,7 +174,8 @@ The specified process was not found.
.Xr rtprio 1 ,
.Xr setpriority 2 ,
.Xr nice 3 ,
-.Xr renice 8
+.Xr renice 8 ,
+.Xr p_cansee 9 .
.Sh AUTHORS
.An -nosplit
The original author was
@@ -124,3 +184,7 @@ This implementation in
.Fx
was substantially rewritten by
.An David Greenman .
+The
+.Fn rtprio_thread
+system call was implemented by
+.An David Xu .
diff --git a/lib/libc/sys/setuid.2 b/lib/libc/sys/setuid.2
index 4bb4a68..4c7d5ad 100644
--- a/lib/libc/sys/setuid.2
+++ b/lib/libc/sys/setuid.2
@@ -170,7 +170,7 @@ potentially sensitive data.
.Pp
To prevent these files from remaining open after an
.Xr exec 3
-call, be sure to set the close-on-exec flag is set:
+call, be sure to set the close-on-exec flag:
.Bd -literal
void
pseudocode(void)
diff --git a/lib/libc/sys/write.2 b/lib/libc/sys/write.2
index 6d60835..d22b985 100644
--- a/lib/libc/sys/write.2
+++ b/lib/libc/sys/write.2
@@ -28,7 +28,7 @@
.\" @(#)write.2 8.5 (Berkeley) 4/2/94
.\" $FreeBSD$
.\"
-.Dd July 7, 2005
+.Dd January 22, 2012
.Dt WRITE 2
.Os
.Sh NAME
@@ -41,12 +41,12 @@
.Lb libc
.Sh SYNOPSIS
.In sys/types.h
-.In sys/uio.h
.In unistd.h
.Ft ssize_t
.Fn write "int d" "const void *buf" "size_t nbytes"
.Ft ssize_t
.Fn pwrite "int d" "const void *buf" "size_t nbytes" "off_t offset"
+.In sys/uio.h
.Ft ssize_t
.Fn writev "int d" "const struct iovec *iov" "int iovcnt"
.Ft ssize_t
diff --git a/lib/libc/yp/xdryp.c b/lib/libc/yp/xdryp.c
index ec2f71a..bb9096b 100644
--- a/lib/libc/yp/xdryp.c
+++ b/lib/libc/yp/xdryp.c
@@ -82,10 +82,21 @@ xdr_ypresp_all_seq(XDR *xdrs, u_long *objp)
switch (status) {
case YP_TRUE:
key = (char *)malloc(out.ypresp_all_u.val.key.keydat_len + 1);
+ if (key == NULL) {
+ xdr_free((xdrproc_t)xdr_ypresp_all, &out);
+ *objp = YP_YPERR;
+ return (FALSE);
+ }
bcopy(out.ypresp_all_u.val.key.keydat_val, key,
out.ypresp_all_u.val.key.keydat_len);
key[out.ypresp_all_u.val.key.keydat_len] = '\0';
val = (char *)malloc(out.ypresp_all_u.val.val.valdat_len + 1);
+ if (val == NULL) {
+ free(key);
+ xdr_free((xdrproc_t)xdr_ypresp_all, &out);
+ *objp = YP_YPERR;
+ return (FALSE);
+ }
bcopy(out.ypresp_all_u.val.val.valdat_val, val,
out.ypresp_all_u.val.val.valdat_len);
val[out.ypresp_all_u.val.val.valdat_len] = '\0';
diff --git a/lib/libc/yp/yplib.c b/lib/libc/yp/yplib.c
index 87d16dd..3dfc0aa 100644
--- a/lib/libc/yp/yplib.c
+++ b/lib/libc/yp/yplib.c
@@ -331,6 +331,8 @@ _yp_dobind(char *dom, struct dom_binding **ypdb)
if (ysd == NULL) {
ysd = (struct dom_binding *)malloc(sizeof *ysd);
+ if (ysd == NULL)
+ return (YPERR_RESRC);
bzero((char *)ysd, sizeof *ysd);
ysd->dom_socket = -1;
ysd->dom_vers = 0;
@@ -683,11 +685,18 @@ yp_match(char *indomain, char *inmap, const char *inkey, int inkeylen,
*/
*outvallen = yprv.val.valdat_len;
*outval = (char *)malloc(*outvallen+1);
+ if (*outval == NULL) {
+ _yp_unbind(ysd);
+ *outvallen = 0;
+ YPUNLOCK();
+ return (YPERR_RESRC);
+ }
bcopy(yprv.val.valdat_val, *outval, *outvallen);
(*outval)[*outvallen] = '\0';
YPUNLOCK();
return (0);
}
+ _yp_unbind(ysd);
#endif
again:
@@ -713,6 +722,13 @@ again:
if (!(r = ypprot_err(yprv.stat))) {
*outvallen = yprv.val.valdat_len;
*outval = (char *)malloc(*outvallen+1);
+ if (*outval == NULL) {
+ _yp_unbind(ysd);
+ *outvallen = 0;
+ xdr_free((xdrproc_t)xdr_ypresp_val, &yprv);
+ YPUNLOCK();
+ return (YPERR_RESRC);
+ }
bcopy(yprv.val.valdat_val, *outval, *outvallen);
(*outval)[*outvallen] = '\0';
#ifdef YPMATCHCACHE
@@ -791,10 +807,25 @@ again:
if (!(r = ypprot_err(yprkv.stat))) {
*outkeylen = yprkv.key.keydat_len;
*outkey = (char *)malloc(*outkeylen+1);
+ if (*outkey == NULL) {
+ _yp_unbind(ysd);
+ *outkeylen = 0;
+ xdr_free((xdrproc_t)xdr_ypresp_key_val, &yprkv);
+ YPUNLOCK();
+ return (YPERR_RESRC);
+ }
bcopy(yprkv.key.keydat_val, *outkey, *outkeylen);
(*outkey)[*outkeylen] = '\0';
*outvallen = yprkv.val.valdat_len;
*outval = (char *)malloc(*outvallen+1);
+ if (*outval == NULL) {
+ free(*outkey);
+ _yp_unbind(ysd);
+ *outkeylen = *outvallen = 0;
+ xdr_free((xdrproc_t)xdr_ypresp_key_val, &yprkv);
+ YPUNLOCK();
+ return (YPERR_RESRC);
+ }
bcopy(yprkv.val.valdat_val, *outval, *outvallen);
(*outval)[*outvallen] = '\0';
}
@@ -851,10 +882,25 @@ again:
if (!(r = ypprot_err(yprkv.stat))) {
*outkeylen = yprkv.key.keydat_len;
*outkey = (char *)malloc(*outkeylen+1);
+ if (*outkey == NULL) {
+ _yp_unbind(ysd);
+ *outkeylen = 0;
+ xdr_free((xdrproc_t)xdr_ypresp_key_val, &yprkv);
+ YPUNLOCK();
+ return (YPERR_RESRC);
+ }
bcopy(yprkv.key.keydat_val, *outkey, *outkeylen);
(*outkey)[*outkeylen] = '\0';
*outvallen = yprkv.val.valdat_len;
*outval = (char *)malloc(*outvallen+1);
+ if (*outval == NULL) {
+ free(*outkey);
+ _yp_unbind(ysd);
+ *outkeylen = *outvallen = 0;
+ xdr_free((xdrproc_t)xdr_ypresp_key_val, &yprkv);
+ YPUNLOCK();
+ return (YPERR_RESRC);
+ }
bcopy(yprkv.val.valdat_val, *outval, *outvallen);
(*outval)[*outvallen] = '\0';
}
diff --git a/lib/libcam/camlib.c b/lib/libcam/camlib.c
index 47ca384..525ad2f 100644
--- a/lib/libcam/camlib.c
+++ b/lib/libcam/camlib.c
@@ -137,7 +137,7 @@ cam_get_device(const char *path, char *dev_name, int devnamelen, int *unit)
*/
if (*tmpstr == '/') {
tmpstr2 = tmpstr;
- tmpstr = (char *)rindex(tmpstr2, '/');
+ tmpstr = strrchr(tmpstr2, '/');
if ((tmpstr != NULL) && (*tmpstr != '\0'))
tmpstr++;
}
diff --git a/lib/libcompiler_rt/Makefile b/lib/libcompiler_rt/Makefile
index 3a501f5..ff9daad 100644
--- a/lib/libcompiler_rt/Makefile
+++ b/lib/libcompiler_rt/Makefile
@@ -79,12 +79,16 @@ SRCF= absvdi2 \
floatuntidf \
floatuntisf \
floatuntixf \
+ int_util \
lshrdi3 \
lshrti3 \
moddi3 \
modti3 \
muldc3 \
muldi3 \
+ mulodi4 \
+ mulosi4 \
+ muloti4 \
mulsc3 \
multi3 \
mulvdi3 \
@@ -144,6 +148,26 @@ SRCF+= adddf3 \
umodsi3
.endif
+# FreeBSD-specific atomic intrinsics.
+.if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "mips"
+SRCF+= __sync_fetch_and_add_4 \
+ __sync_fetch_and_and_4 \
+ __sync_fetch_and_or_4 \
+ __sync_fetch_and_sub_4 \
+ __sync_fetch_and_xor_4 \
+ __sync_lock_test_and_set_4 \
+ __sync_val_compare_and_swap_4
+.endif
+.if ${MACHINE_ARCH:Mmips64*} != ""
+SRCF+= __sync_fetch_and_add_8 \
+ __sync_fetch_and_and_8 \
+ __sync_fetch_and_or_8 \
+ __sync_fetch_and_sub_8 \
+ __sync_fetch_and_xor_8 \
+ __sync_lock_test_and_set_8 \
+ __sync_val_compare_and_swap_8
+.endif
+
.for file in ${SRCF}
. if ${MACHINE_CPUARCH} != "arm" && exists(${CRTSRC}/${CRTARCH}/${file}.S)
SRCS+= ${file}.S
diff --git a/lib/libcompiler_rt/__sync_fetch_and_add_4.c b/lib/libcompiler_rt/__sync_fetch_and_add_4.c
new file mode 100644
index 0000000..3c11a3b
--- /dev/null
+++ b/lib/libcompiler_rt/__sync_fetch_and_add_4.c
@@ -0,0 +1,6 @@
+/* $FreeBSD$ */
+#define NAME __sync_fetch_and_add_4
+#define TYPE uint32_t
+#define FETCHADD(x, y) atomic_fetchadd_32(x, y)
+
+#include "__sync_fetch_and_op_n.h"
diff --git a/lib/libcompiler_rt/__sync_fetch_and_add_8.c b/lib/libcompiler_rt/__sync_fetch_and_add_8.c
new file mode 100644
index 0000000..6157c15
--- /dev/null
+++ b/lib/libcompiler_rt/__sync_fetch_and_add_8.c
@@ -0,0 +1,6 @@
+/* $FreeBSD$ */
+#define NAME __sync_fetch_and_add_8
+#define TYPE uint64_t
+#define FETCHADD(x, y) atomic_fetchadd_64(x, y)
+
+#include "__sync_fetch_and_op_n.h"
diff --git a/lib/libcompiler_rt/__sync_fetch_and_and_4.c b/lib/libcompiler_rt/__sync_fetch_and_and_4.c
new file mode 100644
index 0000000..1a488ec
--- /dev/null
+++ b/lib/libcompiler_rt/__sync_fetch_and_and_4.c
@@ -0,0 +1,7 @@
+/* $FreeBSD$ */
+#define NAME __sync_fetch_and_and_4
+#define TYPE uint32_t
+#define CMPSET atomic_cmpset_32
+#define EXPRESSION t & value
+
+#include "__sync_fetch_and_op_n.h"
diff --git a/lib/libcompiler_rt/__sync_fetch_and_and_8.c b/lib/libcompiler_rt/__sync_fetch_and_and_8.c
new file mode 100644
index 0000000..9923e31
--- /dev/null
+++ b/lib/libcompiler_rt/__sync_fetch_and_and_8.c
@@ -0,0 +1,7 @@
+/* $FreeBSD$ */
+#define NAME __sync_fetch_and_and_8
+#define TYPE uint64_t
+#define CMPSET atomic_cmpset_64
+#define EXPRESSION t & value
+
+#include "__sync_fetch_and_op_n.h"
diff --git a/lib/libcompiler_rt/__sync_fetch_and_op_n.h b/lib/libcompiler_rt/__sync_fetch_and_op_n.h
new file mode 100644
index 0000000..f7f0e06
--- /dev/null
+++ b/lib/libcompiler_rt/__sync_fetch_and_op_n.h
@@ -0,0 +1,47 @@
+/*-
+ * Copyright (c) 2011 Ed Schouten <ed@FreeBSD.org>
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/types.h>
+#include <machine/atomic.h>
+
+TYPE
+NAME(volatile TYPE *ptr, TYPE value)
+{
+ TYPE t;
+
+#ifdef FETCHADD
+ t = FETCHADD(ptr, value);
+#else
+ do {
+ t = *ptr;
+ } while (!CMPSET(ptr, t, EXPRESSION));
+#endif
+
+ return (t);
+}
diff --git a/lib/libcompiler_rt/__sync_fetch_and_or_4.c b/lib/libcompiler_rt/__sync_fetch_and_or_4.c
new file mode 100644
index 0000000..1feeeb1
--- /dev/null
+++ b/lib/libcompiler_rt/__sync_fetch_and_or_4.c
@@ -0,0 +1,7 @@
+/* $FreeBSD$ */
+#define NAME __sync_fetch_and_or_4
+#define TYPE uint32_t
+#define CMPSET atomic_cmpset_32
+#define EXPRESSION t | value
+
+#include "__sync_fetch_and_op_n.h"
diff --git a/lib/libcompiler_rt/__sync_fetch_and_or_8.c b/lib/libcompiler_rt/__sync_fetch_and_or_8.c
new file mode 100644
index 0000000..7cb9403
--- /dev/null
+++ b/lib/libcompiler_rt/__sync_fetch_and_or_8.c
@@ -0,0 +1,7 @@
+/* $FreeBSD$ */
+#define NAME __sync_fetch_and_or_8
+#define TYPE uint64_t
+#define CMPSET atomic_cmpset_64
+#define EXPRESSION t | value
+
+#include "__sync_fetch_and_op_n.h"
diff --git a/lib/libcompiler_rt/__sync_fetch_and_sub_4.c b/lib/libcompiler_rt/__sync_fetch_and_sub_4.c
new file mode 100644
index 0000000..a251add
--- /dev/null
+++ b/lib/libcompiler_rt/__sync_fetch_and_sub_4.c
@@ -0,0 +1,6 @@
+/* $FreeBSD$ */
+#define NAME __sync_fetch_and_sub_4
+#define TYPE uint32_t
+#define FETCHADD(x, y) atomic_fetchadd_32(x, -(y))
+
+#include "__sync_fetch_and_op_n.h"
diff --git a/lib/libcompiler_rt/__sync_fetch_and_sub_8.c b/lib/libcompiler_rt/__sync_fetch_and_sub_8.c
new file mode 100644
index 0000000..5a93f97
--- /dev/null
+++ b/lib/libcompiler_rt/__sync_fetch_and_sub_8.c
@@ -0,0 +1,6 @@
+/* $FreeBSD$ */
+#define NAME __sync_fetch_and_sub_8
+#define TYPE uint64_t
+#define FETCHADD(x, y) atomic_fetchadd_64(x, -(y))
+
+#include "__sync_fetch_and_op_n.h"
diff --git a/lib/libcompiler_rt/__sync_fetch_and_xor_4.c b/lib/libcompiler_rt/__sync_fetch_and_xor_4.c
new file mode 100644
index 0000000..d5f732d
--- /dev/null
+++ b/lib/libcompiler_rt/__sync_fetch_and_xor_4.c
@@ -0,0 +1,7 @@
+/* $FreeBSD$ */
+#define NAME __sync_fetch_and_xor_4
+#define TYPE uint32_t
+#define CMPSET atomic_cmpset_32
+#define EXPRESSION t ^ value
+
+#include "__sync_fetch_and_op_n.h"
diff --git a/lib/libcompiler_rt/__sync_fetch_and_xor_8.c b/lib/libcompiler_rt/__sync_fetch_and_xor_8.c
new file mode 100644
index 0000000..610037e
--- /dev/null
+++ b/lib/libcompiler_rt/__sync_fetch_and_xor_8.c
@@ -0,0 +1,7 @@
+/* $FreeBSD$ */
+#define NAME __sync_fetch_and_xor_8
+#define TYPE uint64_t
+#define CMPSET atomic_cmpset_64
+#define EXPRESSION t ^ value
+
+#include "__sync_fetch_and_op_n.h"
diff --git a/lib/libcompiler_rt/__sync_lock_test_and_set_4.c b/lib/libcompiler_rt/__sync_lock_test_and_set_4.c
new file mode 100644
index 0000000..d4965f9
--- /dev/null
+++ b/lib/libcompiler_rt/__sync_lock_test_and_set_4.c
@@ -0,0 +1,7 @@
+/* $FreeBSD$ */
+#define NAME __sync_lock_test_and_set_4
+#define TYPE uint32_t
+#define CMPSET atomic_cmpset_32
+#define EXPRESSION value
+
+#include "__sync_fetch_and_op_n.h"
diff --git a/lib/libcompiler_rt/__sync_lock_test_and_set_8.c b/lib/libcompiler_rt/__sync_lock_test_and_set_8.c
new file mode 100644
index 0000000..1e02203
--- /dev/null
+++ b/lib/libcompiler_rt/__sync_lock_test_and_set_8.c
@@ -0,0 +1,7 @@
+/* $FreeBSD$ */
+#define NAME __sync_lock_test_and_set_8
+#define TYPE uint64_t
+#define CMPSET atomic_cmpset_64
+#define EXPRESSION value
+
+#include "__sync_fetch_and_op_n.h"
diff --git a/lib/libcompiler_rt/__sync_val_compare_and_swap_4.c b/lib/libcompiler_rt/__sync_val_compare_and_swap_4.c
new file mode 100644
index 0000000..e0ab115
--- /dev/null
+++ b/lib/libcompiler_rt/__sync_val_compare_and_swap_4.c
@@ -0,0 +1,6 @@
+/* $FreeBSD$ */
+#define NAME __sync_val_compare_and_swap_4
+#define TYPE uint32_t
+#define CMPSET atomic_cmpset_32
+
+#include "__sync_val_compare_and_swap_n.h"
diff --git a/lib/libcompiler_rt/__sync_val_compare_and_swap_8.c b/lib/libcompiler_rt/__sync_val_compare_and_swap_8.c
new file mode 100644
index 0000000..c6f1101
--- /dev/null
+++ b/lib/libcompiler_rt/__sync_val_compare_and_swap_8.c
@@ -0,0 +1,6 @@
+/* $FreeBSD$ */
+#define NAME __sync_val_compare_and_swap_8
+#define TYPE uint64_t
+#define CMPSET atomic_cmpset_64
+
+#include "__sync_val_compare_and_swap_n.h"
diff --git a/lib/libcompiler_rt/__sync_val_compare_and_swap_n.h b/lib/libcompiler_rt/__sync_val_compare_and_swap_n.h
new file mode 100644
index 0000000..cd4c9a3
--- /dev/null
+++ b/lib/libcompiler_rt/__sync_val_compare_and_swap_n.h
@@ -0,0 +1,45 @@
+/*-
+ * Copyright (c) 2011 Ed Schouten <ed@FreeBSD.org>
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/types.h>
+#include <machine/atomic.h>
+
+TYPE
+NAME(volatile TYPE *ptr, TYPE oldval, TYPE newval)
+{
+ TYPE t;
+
+ while (!CMPSET(ptr, oldval, newval)) {
+ t = *ptr;
+ if (t != oldval)
+ return (t);
+ }
+
+ return (oldval);
+}
diff --git a/lib/libdevstat/devstat.c b/lib/libdevstat/devstat.c
index 06d2148..ff0767a 100644
--- a/lib/libdevstat/devstat.c
+++ b/lib/libdevstat/devstat.c
@@ -365,6 +365,12 @@ devstat_getdevs(kvm_t *kd, struct statinfo *stats)
dssize = (dinfo->numdevs * sizeof(struct devstat)) +
sizeof(long);
dinfo->mem_ptr = (u_int8_t *)malloc(dssize);
+ if (dinfo->mem_ptr == NULL) {
+ snprintf(devstat_errbuf, sizeof(devstat_errbuf),
+ "%s: Cannot allocate memory for mem_ptr element",
+ __func__);
+ return(-1);
+ }
} else
dssize = (dinfo->numdevs * sizeof(struct devstat)) +
sizeof(long);
@@ -567,7 +573,7 @@ devstat_selectdevs(struct device_selection **dev_select, int *num_selected,
* either enlarge or reduce the size of the device selection list.
*/
} else if (*num_selections != numdevs) {
- *dev_select = (struct device_selection *)realloc(*dev_select,
+ *dev_select = (struct device_selection *)reallocf(*dev_select,
numdevs * sizeof(struct device_selection));
*select_generation = current_generation;
init_selections = 1;
@@ -581,6 +587,13 @@ devstat_selectdevs(struct device_selection **dev_select, int *num_selected,
init_selections = 1;
}
+ if (*dev_select == NULL) {
+ snprintf(devstat_errbuf, sizeof(devstat_errbuf),
+ "%s: Cannot (re)allocate memory for dev_select argument",
+ __func__);
+ return(-1);
+ }
+
/*
* If we're in "only" mode, we want to clear out the selected
* variable since we're going to select exactly what the user wants
@@ -608,6 +621,12 @@ devstat_selectdevs(struct device_selection **dev_select, int *num_selected,
|| (perf_select != 0)) && (changed == 0)){
old_dev_select = (struct device_selection *)malloc(
*num_selections * sizeof(struct device_selection));
+ if (old_dev_select == NULL) {
+ snprintf(devstat_errbuf, sizeof(devstat_errbuf),
+ "%s: Cannot allocate memory for selection list backup",
+ __func__);
+ return(-1);
+ }
old_num_selections = *num_selections;
bcopy(*dev_select, old_dev_select,
sizeof(struct device_selection) * *num_selections);
@@ -1028,16 +1047,17 @@ devstat_buildmatch(char *match_str, struct devstat_match **matches,
return(-1);
}
- /*
- * Since you can't realloc a pointer that hasn't been malloced
- * first, we malloc first and then realloc.
- */
if (*num_matches == 0)
- *matches = (struct devstat_match *)malloc(
- sizeof(struct devstat_match));
- else
- *matches = (struct devstat_match *)realloc(*matches,
- sizeof(struct devstat_match) * (*num_matches + 1));
+ *matches = NULL;
+
+ *matches = (struct devstat_match *)reallocf(*matches,
+ sizeof(struct devstat_match) * (*num_matches + 1));
+
+ if (*matches == NULL) {
+ snprintf(devstat_errbuf, sizeof(devstat_errbuf),
+ "%s: Cannot allocate memory for matches list", __func__);
+ return(-1);
+ }
/* Make sure the current entry is clear */
bzero(&matches[0][*num_matches], sizeof(struct devstat_match));
diff --git a/lib/libdisk/libdisk.h b/lib/libdisk/libdisk.h
index 301d054..a302c64 100644
--- a/lib/libdisk/libdisk.h
+++ b/lib/libdisk/libdisk.h
@@ -293,8 +293,6 @@ int Fixup_Names(struct disk *);
int MakeDevChunk(const struct chunk *, const char *);
__END_DECLS
-#define dprintf printf
-
/* TODO
*
* Need an error string mechanism from the functions instead of warn()
diff --git a/lib/libedit/histedit.h b/lib/libedit/histedit.h
index f245748..8417bb3 100644
--- a/lib/libedit/histedit.h
+++ b/lib/libedit/histedit.h
@@ -158,8 +158,8 @@ void el_resize(EditLine *);
/*
* Set user private data.
*/
-void el_data_set __P((EditLine *, void *));
-void * el_data_get __P((EditLine *));
+void el_data_set(EditLine *, void *);
+void * el_data_get(EditLine *);
/*
* User-defined function interface.
diff --git a/lib/libfetch/common.c b/lib/libfetch/common.c
index 0d5f2d6..e6f67c3 100644
--- a/lib/libfetch/common.c
+++ b/lib/libfetch/common.c
@@ -404,6 +404,33 @@ fetch_ssl_read(SSL *ssl, char *buf, size_t len)
}
#endif
+/*
+ * Cache some data that was read from a socket but cannot be immediately
+ * returned because of an interrupted system call.
+ */
+static int
+fetch_cache_data(conn_t *conn, char *src, size_t nbytes)
+{
+ char *tmp;
+
+ if (conn->cache.size < nbytes) {
+ tmp = realloc(conn->cache.buf, nbytes);
+ if (tmp == NULL) {
+ fetch_syserr();
+ return (-1);
+ }
+ conn->cache.buf = tmp;
+ conn->cache.size = nbytes;
+ }
+
+ memcpy(conn->cache.buf, src, nbytes);
+ conn->cache.len = nbytes;
+ conn->cache.pos = 0;
+
+ return (0);
+}
+
+
static ssize_t
fetch_socket_read(int sd, char *buf, size_t len)
{
@@ -429,6 +456,7 @@ fetch_read(conn_t *conn, char *buf, size_t len)
fd_set readfds;
ssize_t rlen, total;
int r;
+ char *start;
if (fetchTimeout) {
FD_ZERO(&readfds);
@@ -437,6 +465,24 @@ fetch_read(conn_t *conn, char *buf, size_t len)
}
total = 0;
+ start = buf;
+
+ if (conn->cache.len > 0) {
+ /*
+ * The last invocation of fetch_read was interrupted by a
+ * signal after some data had been read from the socket. Copy
+ * the cached data into the supplied buffer before trying to
+ * read from the socket again.
+ */
+ total = (conn->cache.len < len) ? conn->cache.len : len;
+ memcpy(buf, conn->cache.buf, total);
+
+ conn->cache.len -= total;
+ conn->cache.pos += total;
+ len -= total;
+ buf += total;
+ }
+
while (len > 0) {
/*
* The socket is non-blocking. Instead of the canonical
@@ -472,6 +518,8 @@ fetch_read(conn_t *conn, char *buf, size_t len)
total += rlen;
continue;
} else if (rlen == FETCH_READ_ERROR) {
+ if (errno == EINTR)
+ fetch_cache_data(conn, start, total);
return (-1);
}
// assert(rlen == FETCH_READ_WAIT);
@@ -492,8 +540,12 @@ fetch_read(conn_t *conn, char *buf, size_t len)
errno = 0;
r = select(conn->sd + 1, &readfds, NULL, NULL, &delta);
if (r == -1) {
- if (errno == EINTR && fetchRestartCalls)
- continue;
+ if (errno == EINTR) {
+ if (fetchRestartCalls)
+ continue;
+ /* Save anything that was read. */
+ fetch_cache_data(conn, start, total);
+ }
fetch_syserr();
return (-1);
}
@@ -677,6 +729,7 @@ fetch_close(conn_t *conn)
if (--conn->ref > 0)
return (0);
ret = close(conn->sd);
+ free(conn->cache.buf);
free(conn->buf);
free(conn);
return (ret);
diff --git a/lib/libfetch/common.h b/lib/libfetch/common.h
index 35e0dfd..241dbbf 100644
--- a/lib/libfetch/common.h
+++ b/lib/libfetch/common.h
@@ -52,6 +52,13 @@ struct fetchconn {
size_t bufsize; /* buffer size */
size_t buflen; /* length of buffer contents */
int err; /* last protocol reply code */
+ struct { /* data cached after an interrupted
+ read */
+ char *buf;
+ size_t size;
+ size_t pos;
+ size_t len;
+ } cache;
#ifdef WITH_SSL
SSL *ssl; /* SSL handle */
SSL_CTX *ssl_ctx; /* SSL context */
diff --git a/lib/libfetch/http.c b/lib/libfetch/http.c
index b33d6f1..557ff26 100644
--- a/lib/libfetch/http.c
+++ b/lib/libfetch/http.c
@@ -196,6 +196,8 @@ http_growbuf(struct httpio *io, size_t len)
static int
http_fillbuf(struct httpio *io, size_t len)
{
+ ssize_t nbytes;
+
if (io->error)
return (-1);
if (io->eof)
@@ -204,10 +206,11 @@ http_fillbuf(struct httpio *io, size_t len)
if (io->chunked == 0) {
if (http_growbuf(io, len) == -1)
return (-1);
- if ((io->buflen = fetch_read(io->conn, io->buf, len)) == -1) {
- io->error = 1;
+ if ((nbytes = fetch_read(io->conn, io->buf, len)) == -1) {
+ io->error = errno;
return (-1);
}
+ io->buflen = nbytes;
io->bufpos = 0;
return (io->buflen);
}
@@ -227,10 +230,11 @@ http_fillbuf(struct httpio *io, size_t len)
len = io->chunksize;
if (http_growbuf(io, len) == -1)
return (-1);
- if ((io->buflen = fetch_read(io->conn, io->buf, len)) == -1) {
- io->error = 1;
+ if ((nbytes = fetch_read(io->conn, io->buf, len)) == -1) {
+ io->error = errno;
return (-1);
}
+ io->buflen = nbytes;
io->chunksize -= io->buflen;
if (io->chunksize == 0) {
@@ -272,8 +276,11 @@ http_readfn(void *v, char *buf, int len)
io->bufpos += l;
}
- if (!pos && io->error)
+ if (!pos && io->error) {
+ if (io->error == EINTR)
+ io->error = 0;
return (-1);
+ }
return (pos);
}
diff --git a/lib/libgssapi/gss_display_status.c b/lib/libgssapi/gss_display_status.c
index 0374fbd..3119995 100644
--- a/lib/libgssapi/gss_display_status.c
+++ b/lib/libgssapi/gss_display_status.c
@@ -26,7 +26,7 @@
* $FreeBSD$
*/
/*
- * Copyright (c) 1998 - 2005 Kungliga Tekniska Högskolan
+ * Copyright (c) 1998 - 2005 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@@ -58,7 +58,7 @@
* SUCH DAMAGE.
*/
/*
- * Copyright (c) 1998 - 2005 Kungliga Tekniska Högskolan
+ * Copyright (c) 1998 - 2005 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
diff --git a/lib/libgssapi/gss_pseudo_random.c b/lib/libgssapi/gss_pseudo_random.c
index 7216609..c250d71 100644
--- a/lib/libgssapi/gss_pseudo_random.c
+++ b/lib/libgssapi/gss_pseudo_random.c
@@ -1,5 +1,5 @@
-/*
- * Copyright (c) 2007 Kungliga Tekniska Högskolan
+/*-
+ * Copyright (c) 2007 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
diff --git a/lib/libgssapi/gss_release_oid.c b/lib/libgssapi/gss_release_oid.c
index a2e7a61..01d0693 100644
--- a/lib/libgssapi/gss_release_oid.c
+++ b/lib/libgssapi/gss_release_oid.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2006 Kungliga Tekniska Högskolan
+ * Copyright (c) 2006 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
diff --git a/lib/libipsec/policy_token.l b/lib/libipsec/policy_token.l
index d648702..2a79d5e 100644
--- a/lib/libipsec/policy_token.l
+++ b/lib/libipsec/policy_token.l
@@ -54,6 +54,7 @@ int yylex(void);
%option noyywrap
%option nounput
+%option noinput
/* common section */
nl \n
diff --git a/lib/libkvm/kvm_proc.c b/lib/libkvm/kvm_proc.c
index d32575c..dcf034c 100644
--- a/lib/libkvm/kvm_proc.c
+++ b/lib/libkvm/kvm_proc.c
@@ -658,30 +658,38 @@ kvm_argv(kvm_t *kd, const struct kinfo_proc *kp, int env, int nchr)
buflen = nchr;
}
}
- if (buf != NULL) {
- oid[0] = CTL_KERN;
- oid[1] = KERN_PROC;
- oid[2] = env ? KERN_PROC_ENV : KERN_PROC_ARGS;
- oid[3] = kp->ki_pid;
- bufsz = buflen;
- i = sysctl(oid, 4, buf, &bufsz, 0, 0);
- if (i == 0 && bufsz > 0) {
- i = 0;
- p = buf;
- do {
- bufp[i++] = p;
- p += strlen(p) + 1;
- if (i >= argc) {
- argc += argc;
- bufp = realloc(bufp,
- sizeof(char *) * argc);
- }
- } while (p < buf + bufsz);
- bufp[i++] = 0;
- return (bufp);
- }
+ oid[0] = CTL_KERN;
+ oid[1] = KERN_PROC;
+ oid[2] = env ? KERN_PROC_ENV : KERN_PROC_ARGS;
+ oid[3] = kp->ki_pid;
+ bufsz = buflen;
+ if (sysctl(oid, 4, buf, &bufsz, 0, 0) == -1) {
+ /*
+ * If the supplied buf is too short to hold the requested
+ * value the sysctl returns with ENOMEM. The buf is filled
+ * with the truncated value and the returned bufsz is equal
+ * to the requested len.
+ */
+ if (errno != ENOMEM || bufsz != (size_t)buflen)
+ return (0);
+ buf[bufsz - 1] = '\0';
+ errno = 0;
+ } else if (bufsz == 0) {
+ return (0);
}
- return (NULL);
+ i = 0;
+ p = buf;
+ do {
+ bufp[i++] = p;
+ p += strlen(p) + 1;
+ if (i >= argc) {
+ argc += argc;
+ bufp = realloc(bufp,
+ sizeof(char *) * argc);
+ }
+ } while (p < buf + bufsz);
+ bufp[i++] = 0;
+ return (bufp);
}
char **
diff --git a/lib/libopie/config.h b/lib/libopie/config.h
index ca0c338..b9bc40c 100644
--- a/lib/libopie/config.h
+++ b/lib/libopie/config.h
@@ -54,7 +54,7 @@
/* #undef DOANONYMOUS */
/* The default value of the PATH environment variable */
-#define DEFAULT_PATH "/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin"
+#define DEFAULT_PATH "/usr/bin:/bin:/usr/sbin:/sbin"
/* Defined if the file /etc/default/login exists
(and, presumably, should be looked at by login) */
diff --git a/lib/libpam/libpam/Makefile b/lib/libpam/libpam/Makefile
index 12cd96a..1071e05 100644
--- a/lib/libpam/libpam/Makefile
+++ b/lib/libpam/libpam/Makefile
@@ -42,7 +42,9 @@ LIB= pam
NO_PROFILE=
SRCS= openpam_borrow_cred.c \
+ openpam_check_owner_perms.c \
openpam_configure.c \
+ openpam_constants.c \
openpam_dispatch.c \
openpam_dynamic.c \
openpam_findenv.c \
@@ -55,6 +57,7 @@ SRCS= openpam_borrow_cred.c \
openpam_readline.c \
openpam_restore_cred.c \
openpam_set_option.c \
+ openpam_subst.c \
openpam_ttyconv.c \
pam_acct_mgmt.c \
pam_authenticate.c \
@@ -94,6 +97,7 @@ MAN= openpam.3 \
openpam_readline.3 \
openpam_restore_cred.3 \
openpam_set_option.3 \
+ openpam_subst.3 \
openpam_ttyconv.3 \
pam.3 \
pam_acct_mgmt.3 \
@@ -137,6 +141,7 @@ WARNS?= 3
CFLAGS+= -I${.CURDIR} -I${OPENPAM}/include
CFLAGS+= -DLIB_MAJ=${SHLIB_MAJOR}
CFLAGS+= -DOPENPAM_MODULES_DIR='"${PAM_MOD_DIR:C/\/*$//}/"'
+CFLAGS+= -DHAVE_FPURGE=1 -DHAVE_STRLCPY=1
HEADERS= security/openpam.h \
security/openpam_attr.h \
diff --git a/lib/libpam/modules/pam_unix/Makefile b/lib/libpam/modules/pam_unix/Makefile
index ce66768..4d28cfd 100644
--- a/lib/libpam/modules/pam_unix/Makefile
+++ b/lib/libpam/modules/pam_unix/Makefile
@@ -40,8 +40,8 @@ LIB= pam_unix
SRCS= pam_unix.c
MAN= pam_unix.8
-DPADD= ${LIBUTIL} ${LIBCRYPT}
-LDADD= -lutil -lcrypt
+DPADD+= ${LIBUTIL} ${LIBCRYPT}
+LDADD+= -lutil -lcrypt
.if ${MK_NIS} != "no"
CFLAGS+= -DYP
diff --git a/lib/libpmc/libpmc.c b/lib/libpmc/libpmc.c
index f0d5b0c..ba63ace 100644
--- a/lib/libpmc/libpmc.c
+++ b/lib/libpmc/libpmc.c
@@ -83,6 +83,10 @@ static int mips24k_allocate_pmc(enum pmc_event _pe, char* ctrspec,
struct pmc_op_pmcallocate *_pmc_config);
#endif /* __mips__ */
+#if defined(__powerpc__)
+static int ppc7450_allocate_pmc(enum pmc_event _pe, char* ctrspec,
+ struct pmc_op_pmcallocate *_pmc_config);
+#endif /* __powerpc__ */
#define PMC_CALL(cmd, params) \
syscall(pmc_syscall, PMC_OP_##cmd, (params))
@@ -149,6 +153,7 @@ PMC_CLASSDEP_TABLE(p6, P6);
PMC_CLASSDEP_TABLE(xscale, XSCALE);
PMC_CLASSDEP_TABLE(mips24k, MIPS24K);
PMC_CLASSDEP_TABLE(ucf, UCF);
+PMC_CLASSDEP_TABLE(ppc7450, PPC7450);
#undef __PMC_EV_ALIAS
#define __PMC_EV_ALIAS(N,CODE) { N, PMC_EV_##CODE },
@@ -211,6 +216,7 @@ PMC_MDEP_TABLE(p5, P5, PMC_CLASS_TSC);
PMC_MDEP_TABLE(p6, P6, PMC_CLASS_TSC);
PMC_MDEP_TABLE(xscale, XSCALE, PMC_CLASS_XSCALE);
PMC_MDEP_TABLE(mips24k, MIPS24K, PMC_CLASS_MIPS24K);
+PMC_MDEP_TABLE(ppc7450, PPC7450, PMC_CLASS_PPC7450);
static const struct pmc_event_descr tsc_event_table[] =
{
@@ -263,6 +269,10 @@ PMC_CLASS_TABLE_DESC(xscale, XSCALE, xscale, xscale);
PMC_CLASS_TABLE_DESC(mips24k, MIPS24K, mips24k, mips24k);
#endif /* __mips__ */
+#if defined(__powerpc__)
+PMC_CLASS_TABLE_DESC(ppc7450, PPC7450, ppc7450, ppc7450);
+#endif
+
#undef PMC_CLASS_TABLE_DESC
static const struct pmc_class_descr **pmc_class_table;
@@ -289,7 +299,7 @@ static const char * pmc_class_names[] = {
};
struct pmc_cputype_map {
- enum pmc_class pm_cputype;
+ enum pmc_cputype pm_cputype;
const char *pm_name;
};
@@ -2212,6 +2222,44 @@ mips24k_allocate_pmc(enum pmc_event pe, char *ctrspec __unused,
}
#endif /* __mips__ */
+#if defined(__powerpc__)
+
+static struct pmc_event_alias ppc7450_aliases[] = {
+ EV_ALIAS("instructions", "INSTR_COMPLETED"),
+ EV_ALIAS("branches", "BRANCHES_COMPLETED"),
+ EV_ALIAS("branch-mispredicts", "MISPREDICTED_BRANCHES"),
+ EV_ALIAS(NULL, NULL)
+};
+
+#define PPC7450_KW_OS "os"
+#define PPC7450_KW_USR "usr"
+#define PPC7450_KW_ANYTHREAD "anythread"
+
+static int
+ppc7450_allocate_pmc(enum pmc_event pe, char *ctrspec __unused,
+ struct pmc_op_pmcallocate *pmc_config __unused)
+{
+ char *p;
+
+ (void) pe;
+
+ pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE);
+
+ while ((p = strsep(&ctrspec, ",")) != NULL) {
+ if (KWMATCH(p, PPC7450_KW_OS))
+ pmc_config->pm_caps |= PMC_CAP_SYSTEM;
+ else if (KWMATCH(p, PPC7450_KW_USR))
+ pmc_config->pm_caps |= PMC_CAP_USER;
+ else if (KWMATCH(p, PPC7450_KW_ANYTHREAD))
+ pmc_config->pm_caps |= (PMC_CAP_USER | PMC_CAP_SYSTEM);
+ else
+ return (-1);
+ }
+
+ return (0);
+}
+#endif /* __powerpc__ */
+
/*
* Match an event name `name' with its canonical form.
@@ -2573,6 +2621,10 @@ pmc_event_names_of_class(enum pmc_class cl, const char ***eventnames,
ev = mips24k_event_table;
count = PMC_EVENT_TABLE_SIZE(mips24k);
break;
+ case PMC_CLASS_PPC7450:
+ ev = ppc7450_event_table;
+ count = PMC_EVENT_TABLE_SIZE(ppc7450);
+ break;
default:
errno = EINVAL;
return (-1);
@@ -2784,6 +2836,12 @@ pmc_init(void)
pmc_class_table[n] = &mips24k_class_table_descr;
break;
#endif /* __mips__ */
+#if defined(__powerpc__)
+ case PMC_CPU_PPC_7450:
+ PMC_MDEP_INIT(ppc7450);
+ pmc_class_table[n] = &ppc7450_class_table_descr;
+ break;
+#endif
default:
/*
* Some kind of CPU this version of the library knows nothing
@@ -2924,6 +2982,10 @@ _pmc_name_of_event(enum pmc_event pe, enum pmc_cputype cpu)
ev = mips24k_event_table;
evfence = mips24k_event_table + PMC_EVENT_TABLE_SIZE(mips24k
);
+ } else if (pe >= PMC_EV_PPC7450_FIRST && pe <= PMC_EV_PPC7450_LAST) {
+ ev = ppc7450_event_table;
+ evfence = ppc7450_event_table + PMC_EVENT_TABLE_SIZE(ppc7450
+);
} else if (pe == PMC_EV_TSC_TSC) {
ev = tsc_event_table;
evfence = tsc_event_table + PMC_EVENT_TABLE_SIZE(tsc);
diff --git a/lib/libpmc/pmc.corei7.3 b/lib/libpmc/pmc.corei7.3
index 679313f..bd37818 100644
--- a/lib/libpmc/pmc.corei7.3
+++ b/lib/libpmc/pmc.corei7.3
@@ -200,10 +200,6 @@ Number of cache load STLB hits
.Pq Event 08H , Umask 20H
Number of DTLB cache load misses where the low part of the linear to
physical address translation was missed.
-.It Li DTLB_LOAD_MISSES.PDP_MISS
-.Pq Event 08H , Umask 40H
-Number of DTLB cache load misses where the high part of the linear to
-physical address translation was missed.
.It Li DTLB_LOAD_MISSES.LARGE_WALK_COMPLETED
.Pq Event 08H , Umask 80H
Counts number of completed large page walks due to load miss in the STLB.
@@ -646,10 +642,6 @@ Counter 0, 1 only
Counts all data reads and writes (speculated and retired) from cacheable
memory, including locked operations.
Counter 0, 1 only
-.It Li L1D_PEND_MISS.LOAD_BUFFERS_FULL
-.Pq Event 48H , Umask 02H
-Counts cycles of L1 data cache load fill buffers full.
-Counter 0, 1 only
.It Li DTLB_MISSES.ANY
.Pq Event 49H , Umask 01H
Counts the number of misses in the STLB which causes a page walk.
@@ -660,6 +652,12 @@ Counts number of misses in the STLB which resulted in a completed page walk.
.Pq Event 49H , Umask 10H
Counts the number of DTLB first level misses that hit in the second level
TLB. This event is only relevant if the core contains multiple DTLB levels.
+.It Li DTLB_MISSES.PDE_MISS
+.Pq Event 49H , Umask 20H
+Number of DTLB misses caused by low part of address, includes references to 2M pages because 2M pages do not use the PDE.
+.It Li DTLB_MISSES.LARGE_WALK_COMPLETED
+.Pq Event 49H , Umask 80H
+Counts number of misses in the STLB which resulted in a completed page walk for large pages.
.It Li LOAD_HIT_PRE
.Pq Event 4CH , Umask 01H
Counts load operations sent to the L1 data cache while a previous SSE
@@ -1205,9 +1203,6 @@ The BPU clear leads to 2 cycle bubble in the Front End.
.Pq Event E8H , Umask 02H
Counts late Branch Prediction Unit clears due to Most Recently Used
conflicts. The PBU clear leads to a 3 cycle bubble in the Front End.
-.It Li BPU_CLEARS.ANY
-.Pq Event E8H , Umask 03H
-Counts all BPU clears.
.It Li L2_TRANSACTIONS.LOAD
.Pq Event F0H , Umask 01H
Counts L2 load operations due to HW prefetch or demand loads.
diff --git a/lib/libradius/Makefile b/lib/libradius/Makefile
index 5723bf1..d71d8f2 100644
--- a/lib/libradius/Makefile
+++ b/lib/libradius/Makefile
@@ -36,6 +36,7 @@ MAN= libradius.3 radius.conf.5
MLINKS+=libradius.3 rad_acct_open.3 \
libradius.3 rad_add_server.3 \
libradius.3 rad_auth_open.3 \
+ libradius.3 rad_bind_to.3 \
libradius.3 rad_close.3 \
libradius.3 rad_config.3 \
libradius.3 rad_continue_send_request.3 \
diff --git a/lib/libradius/libradius.3 b/lib/libradius/libradius.3
index 7fc1162..dca38ca 100644
--- a/lib/libradius/libradius.3
+++ b/lib/libradius/libradius.3
@@ -91,6 +91,8 @@
.Fn rad_server_open "int fd"
.Ft "const char *"
.Fn rad_server_secret "struct rad_handle *h"
+.Ft "void"
+.Fn rad_bind_to "struct rad_handle *h" "in_addr_t addr"
.Ft u_char *
.Fn rad_demangle "struct rad_handle *h" "const void *mangled" "size_t mlen"
.Ft u_char *
@@ -431,6 +433,10 @@ returns the secret shared with the current RADIUS server according to the
supplied rad_handle.
.Pp
The
+.Fn rad_bind_to
+assigns a source address for all requests to the current RADIUS server.
+.Pp
+The
.Fn rad_demangle
function demangles attributes containing passwords and MS-CHAPv1 MPPE-Keys.
The return value is
diff --git a/lib/libradius/radlib.c b/lib/libradius/radlib.c
index e4e4a94..46a9b58 100644
--- a/lib/libradius/radlib.c
+++ b/lib/libradius/radlib.c
@@ -756,9 +756,16 @@ rad_create_request(struct rad_handle *h, int code)
clear_password(h);
h->authentic_pos = 0;
h->out_created = 1;
+ h->bindto = INADDR_ANY;
return 0;
}
+void
+rad_bind_to(struct rad_handle *h, in_addr_t addr)
+{
+ h->bindto = addr;
+}
+
int
rad_create_response(struct rad_handle *h, int code)
{
@@ -857,7 +864,7 @@ rad_init_send_request(struct rad_handle *h, int *fd, struct timeval *tv)
memset(&sin, 0, sizeof sin);
sin.sin_len = sizeof sin;
sin.sin_family = AF_INET;
- sin.sin_addr.s_addr = INADDR_ANY;
+ sin.sin_addr.s_addr = h->bindto;
sin.sin_port = htons(0);
if (bind(h->fd, (const struct sockaddr *)&sin,
sizeof sin) == -1) {
diff --git a/lib/libradius/radlib.h b/lib/libradius/radlib.h
index b26be41..f9e451b 100644
--- a/lib/libradius/radlib.h
+++ b/lib/libradius/radlib.h
@@ -195,6 +195,7 @@ struct rad_handle *rad_acct_open(void);
int rad_add_server(struct rad_handle *,
const char *, int, const char *, int, int);
struct rad_handle *rad_auth_open(void);
+void rad_bind_to(struct rad_handle *, in_addr_t);
void rad_close(struct rad_handle *);
int rad_config(struct rad_handle *, const char *);
int rad_continue_send_request(struct rad_handle *, int,
diff --git a/lib/libradius/radlib_private.h b/lib/libradius/radlib_private.h
index d886c74..a76e594aa 100644
--- a/lib/libradius/radlib_private.h
+++ b/lib/libradius/radlib_private.h
@@ -92,6 +92,7 @@ struct rad_handle {
int try; /* How many requests we've sent */
int srv; /* Server number we did last */
int type; /* Handle type */
+ in_addr_t bindto; /* Bind to address */
};
struct vendor_attribute {
diff --git a/lib/libsm/Makefile b/lib/libsm/Makefile
index ce590d7..661e87a 100644
--- a/lib/libsm/Makefile
+++ b/lib/libsm/Makefile
@@ -18,6 +18,13 @@ CFLAGS+=${SENDMAIL_CFLAGS}
WARNS?= 2
+.if ${CC:T:Mclang} == "clang"
+# Unfortunately, clang gives warnings about sendmail code that cannot
+# be turned off yet. Since this is contrib code, and we don't really
+# care about the warnings, just make them non-fatal for now.
+NO_WERROR=
+.endif
+
LIB= sm
SRCS+= sm_os.h
diff --git a/lib/libstand/Makefile b/lib/libstand/Makefile
index 05f0995..567c886 100644
--- a/lib/libstand/Makefile
+++ b/lib/libstand/Makefile
@@ -54,10 +54,10 @@ SRCS+= ntoh.c
.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "powerpc" || \
${MACHINE_CPUARCH} == "sparc64" || ${MACHINE_CPUARCH} == "amd64" || \
${MACHINE_CPUARCH} == "arm"
-SRCS+= bcmp.c bcopy.c bzero.c ffs.c index.c memccpy.c memchr.c memcmp.c \
- memcpy.c memmove.c memset.c qdivrem.c rindex.c strcat.c strchr.c \
- strcmp.c strcpy.c strcspn.c strlen.c strncat.c strncmp.c strncpy.c \
- strpbrk.c strrchr.c strsep.c strspn.c strstr.c strtok.c swab.c
+SRCS+= bcmp.c bcopy.c bzero.c ffs.c memccpy.c memchr.c memcmp.c memcpy.c \
+ memmove.c memset.c qdivrem.c strcat.c strchr.c strcmp.c strcpy.c \
+ strcspn.c strlen.c strncat.c strncmp.c strncpy.c strpbrk.c \
+ strrchr.c strsep.c strspn.c strstr.c strtok.c swab.c
.endif
.if ${MACHINE_CPUARCH} == "arm"
.PATH: ${.CURDIR}/../libc/arm/gen
@@ -65,10 +65,9 @@ SRCS+= divsi3.S
.endif
.if ${MACHINE_CPUARCH} == "ia64"
.PATH: ${.CURDIR}/../libc/ia64/string
-SRCS+= bcmp.c bcopy.S bzero.S ffs.S index.c memccpy.c memchr.c memcmp.c \
- memcpy.S memmove.S memset.c rindex.c strcat.c strchr.c \
- strcmp.c strcpy.c strcspn.c strlen.c \
- strncat.c strncmp.c strncpy.c strpbrk.c strrchr.c strsep.c \
+SRCS+= bcmp.c bcopy.S bzero.S ffs.S memccpy.c memchr.c memcmp.c memcpy.S \
+ memmove.S memset.c strcat.c strchr.c strcmp.c strcpy.c strcspn.c \
+ strlen.c strncat.c strncmp.c strncpy.c strpbrk.c strrchr.c strsep.c \
strspn.c strstr.c strtok.c swab.c
.PATH: ${.CURDIR}/../libc/ia64/gen
diff --git a/lib/libstand/bootp.c b/lib/libstand/bootp.c
index eb4a8ba..904b3ba 100644
--- a/lib/libstand/bootp.c
+++ b/lib/libstand/bootp.c
@@ -703,13 +703,13 @@ setenv_(u_char *cp, u_char *ep, struct dhcp_opt *opts)
u_char *s = NULL; /* semicolon ? */
/* skip leading whitespace */
- while (*endv && index(" \t\n\r", *endv))
+ while (*endv && strchr(" \t\n\r", *endv))
endv++;
- vp = index(endv, '='); /* find name=value separator */
+ vp = strchr(endv, '='); /* find name=value separator */
if (!vp)
break;
*vp++ = 0;
- if (op->fmt == __ILIST && (s = index(vp, ';')))
+ if (op->fmt == __ILIST && (s = strchr(vp, ';')))
*s++ = '\0';
setenv(endv, vp, 1);
vp = s; /* prepare for next round */
diff --git a/lib/libstand/tftp.c b/lib/libstand/tftp.c
index bf92c04..aa331b3 100644
--- a/lib/libstand/tftp.c
+++ b/lib/libstand/tftp.c
@@ -292,8 +292,15 @@ tftp_makereq(struct tftp_handle *h)
wbuf.t.th_opcode = htons((u_short) RRQ);
wtail = wbuf.t.th_stuff;
l = strlen(h->path);
+#ifdef TFTP_PREPEND_PATH
+ if (l > FNAME_SIZE - (sizeof(TFTP_PREPEND_PATH) - 1))
+ return (ENAMETOOLONG);
+ bcopy(TFTP_PREPEND_PATH, wtail, sizeof(TFTP_PREPEND_PATH) - 1);
+ wtail += sizeof(TFTP_PREPEND_PATH) - 1;
+#else
if (l > FNAME_SIZE)
return (ENAMETOOLONG);
+#endif
bcopy(h->path, wtail, l + 1);
wtail += l + 1;
bcopy("octet", wtail, 6);
diff --git a/lib/libstdthreads/Makefile b/lib/libstdthreads/Makefile
new file mode 100644
index 0000000..544eeb0
--- /dev/null
+++ b/lib/libstdthreads/Makefile
@@ -0,0 +1,41 @@
+# $FreeBSD$
+
+LIB= stdthreads
+SHLIB_MAJOR= 0
+
+INCS= threads.h
+SRCS= threads.h call_once.c cnd.c mtx.c thrd.c tss.c
+
+MAN= thrd_create.3
+MLINKS= thrd_create.3 call_once.3 \
+ thrd_create.3 cnd_broadcast.3 \
+ thrd_create.3 cnd_destroy.3 \
+ thrd_create.3 cnd_init.3 \
+ thrd_create.3 cnd_signal.3 \
+ thrd_create.3 cnd_timedwait.3 \
+ thrd_create.3 cnd_wait.3 \
+ thrd_create.3 mtx_destroy.3 \
+ thrd_create.3 mtx_init.3 \
+ thrd_create.3 mtx_lock.3 \
+ thrd_create.3 mtx_timedlock.3 \
+ thrd_create.3 mtx_trylock.3 \
+ thrd_create.3 mtx_unlock.3 \
+ thrd_create.3 thrd_current.3 \
+ thrd_create.3 thrd_detach.3 \
+ thrd_create.3 thrd_equal.3 \
+ thrd_create.3 thrd_exit.3 \
+ thrd_create.3 thrd_join.3 \
+ thrd_create.3 thrd_sleep.3 \
+ thrd_create.3 thrd_yield.3 \
+ thrd_create.3 tss_create.3 \
+ thrd_create.3 tss_delete.3 \
+ thrd_create.3 tss_get.3 \
+ thrd_create.3 tss_set.3
+
+DPADD= ${LIBPTHREAD}
+LDADD= -lpthread
+
+VERSION_DEF= ${.CURDIR}/../libc/Versions.def
+SYMBOL_MAPS= ${.CURDIR}/Symbol.map
+
+.include <bsd.lib.mk>
diff --git a/lib/libstdthreads/Symbol.map b/lib/libstdthreads/Symbol.map
new file mode 100644
index 0000000..0fe6eac
--- /dev/null
+++ b/lib/libstdthreads/Symbol.map
@@ -0,0 +1,31 @@
+/*
+ * $FreeBSD$
+ */
+
+FBSD_1.3 {
+ call_once;
+ cnd_broadcast;
+ cnd_destroy;
+ cnd_init;
+ cnd_signal;
+ cnd_timedwait;
+ cnd_wait;
+ mtx_destroy;
+ mtx_init;
+ mtx_lock;
+ mtx_timedlock;
+ mtx_trylock;
+ mtx_unlock;
+ thrd_create;
+ thrd_current;
+ thrd_detach;
+ thrd_equal;
+ thrd_exit;
+ thrd_join;
+ thrd_sleep;
+ thrd_yield;
+ tss_create;
+ tss_delete;
+ tss_get;
+ tss_set;
+};
diff --git a/lib/libstdthreads/call_once.c b/lib/libstdthreads/call_once.c
new file mode 100644
index 0000000..70ce8de
--- /dev/null
+++ b/lib/libstdthreads/call_once.c
@@ -0,0 +1,44 @@
+/*-
+ * Copyright (c) 2011 Ed Schouten <ed@FreeBSD.org>
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <pthread.h>
+
+#include "threads.h"
+
+void
+call_once(once_flag *flag, void (*func)(void))
+{
+
+ (void)pthread_once((pthread_once_t *)flag, func);
+}
+
+_Static_assert(sizeof(once_flag) == sizeof(pthread_once_t),
+ "once_flag must be of the same size as pthread_once_t");
diff --git a/lib/libstdthreads/cnd.c b/lib/libstdthreads/cnd.c
new file mode 100644
index 0000000..145960d
--- /dev/null
+++ b/lib/libstdthreads/cnd.c
@@ -0,0 +1,98 @@
+/*-
+ * Copyright (c) 2011 Ed Schouten <ed@FreeBSD.org>
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <errno.h>
+#include <pthread.h>
+
+#include "threads.h"
+
+int
+cnd_broadcast(cnd_t *cond)
+{
+
+ if (pthread_cond_broadcast(cond) != 0)
+ return (thrd_error);
+ return (thrd_success);
+}
+
+void
+cnd_destroy(cnd_t *cond)
+{
+
+ (void)pthread_cond_destroy(cond);
+}
+
+int
+cnd_init(cnd_t *cond)
+{
+
+ switch (pthread_cond_init(cond, NULL)) {
+ case 0:
+ return (thrd_success);
+ case ENOMEM:
+ return (thrd_nomem);
+ default:
+ return (thrd_error);
+ }
+}
+
+int
+cnd_signal(cnd_t *cond)
+{
+
+ if (pthread_cond_signal(cond) != 0)
+ return (thrd_error);
+ return (thrd_success);
+}
+
+int
+cnd_timedwait(cnd_t *restrict cond, mtx_t *restrict mtx,
+ const struct timespec *restrict ts)
+{
+
+ switch (pthread_cond_timedwait(cond, mtx, ts)) {
+ case 0:
+ return (thrd_success);
+ case ETIMEDOUT:
+ return (thrd_timedout);
+ default:
+ return (thrd_error);
+ }
+}
+
+int
+cnd_wait(cnd_t *cond, mtx_t *mtx)
+{
+
+ if (pthread_cond_wait(cond, mtx) != 0)
+ return (thrd_error);
+ return (thrd_success);
+}
diff --git a/lib/libstdthreads/mtx.c b/lib/libstdthreads/mtx.c
new file mode 100644
index 0000000..6c9166d
--- /dev/null
+++ b/lib/libstdthreads/mtx.c
@@ -0,0 +1,116 @@
+/*-
+ * Copyright (c) 2011 Ed Schouten <ed@FreeBSD.org>
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <errno.h>
+#include <pthread.h>
+
+#include "threads.h"
+
+void
+mtx_destroy(mtx_t *mtx)
+{
+
+ (void)pthread_mutex_destroy(mtx);
+}
+
+int
+mtx_init(mtx_t *mtx, int type)
+{
+ pthread_mutexattr_t attr;
+ int mt;
+
+ switch (type) {
+ case mtx_plain:
+ case mtx_timed:
+ mt = PTHREAD_MUTEX_NORMAL;
+ break;
+ case mtx_plain | mtx_recursive:
+ case mtx_timed | mtx_recursive:
+ mt = PTHREAD_MUTEX_RECURSIVE;
+ break;
+ default:
+ return (thrd_error);
+ }
+
+ if (pthread_mutexattr_init(&attr) != 0)
+ return (thrd_error);
+ if (pthread_mutexattr_settype(&attr, mt) != 0)
+ return (thrd_error);
+ if (pthread_mutex_init(mtx, &attr) != 0)
+ return (thrd_error);
+ return (thrd_success);
+}
+
+int
+mtx_lock(mtx_t *mtx)
+{
+
+ if (pthread_mutex_lock(mtx) != 0)
+ return (thrd_error);
+ return (thrd_success);
+}
+
+int
+mtx_timedlock(mtx_t *restrict mtx, const struct timespec *restrict ts)
+{
+
+ switch (pthread_mutex_timedlock(mtx, ts)) {
+ case 0:
+ return (thrd_success);
+ case ETIMEDOUT:
+ return (thrd_timedout);
+ default:
+ return (thrd_error);
+ }
+}
+
+int
+mtx_trylock(mtx_t *mtx)
+{
+
+ switch (pthread_mutex_lock(mtx)) {
+ case 0:
+ return (thrd_success);
+ case EBUSY:
+ return (thrd_busy);
+ default:
+ return (thrd_error);
+ }
+}
+
+int
+mtx_unlock(mtx_t *mtx)
+{
+
+ if (pthread_mutex_unlock(mtx) != 0)
+ return (thrd_error);
+ return (thrd_success);
+}
diff --git a/lib/libstdthreads/thrd.c b/lib/libstdthreads/thrd.c
new file mode 100644
index 0000000..f0ce55a
--- /dev/null
+++ b/lib/libstdthreads/thrd.c
@@ -0,0 +1,127 @@
+/*-
+ * Copyright (c) 2011 Ed Schouten <ed@FreeBSD.org>
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <pthread.h>
+#include <stdint.h>
+#include <stdlib.h>
+
+#include "threads.h"
+
+struct thrd_param {
+ thrd_start_t func;
+ void *arg;
+};
+
+static void *
+thrd_entry(void *arg)
+{
+ struct thrd_param tp;
+
+ tp = *(struct thrd_param *)arg;
+ free(arg);
+ return ((void *)(intptr_t)tp.func(tp.arg));
+}
+
+int
+thrd_create(thrd_t *thr, thrd_start_t func, void *arg)
+{
+ struct thrd_param *tp;
+
+ /*
+ * Work around return type inconsistency. Wrap execution using
+ * a function conforming to pthread_create()'s start_routine.
+ */
+ tp = malloc(sizeof(*tp));
+ if (tp == NULL)
+ return (thrd_nomem);
+ tp->func = func;
+ tp->arg = arg;
+ if (pthread_create(thr, NULL, thrd_entry, tp) != 0) {
+ free(tp);
+ return (thrd_error);
+ }
+ return (thrd_success);
+}
+
+thrd_t
+thrd_current(void)
+{
+
+ return (pthread_self());
+}
+
+int
+thrd_detach(thrd_t thr)
+{
+
+ if (pthread_detach(thr) != 0)
+ return (thrd_error);
+ return (thrd_success);
+}
+
+int
+thrd_equal(thrd_t thr0, thrd_t thr1)
+{
+
+ return (pthread_equal(thr0, thr1));
+}
+
+_Noreturn void
+thrd_exit(int res)
+{
+
+ pthread_exit((void *)(intptr_t)res);
+}
+
+int
+thrd_join(thrd_t thr, int *res)
+{
+ void *value_ptr;
+
+ if (pthread_join(thr, &value_ptr) != 0)
+ return (thrd_error);
+ *res = (intptr_t)value_ptr;
+ return (thrd_success);
+}
+
+int
+thrd_sleep(const struct timespec *duration, struct timespec *remaining)
+{
+
+ return (nanosleep(duration, remaining));
+}
+
+void
+thrd_yield(void)
+{
+
+ pthread_yield();
+}
diff --git a/lib/libstdthreads/thrd_create.3 b/lib/libstdthreads/thrd_create.3
new file mode 100644
index 0000000..5cd9608
--- /dev/null
+++ b/lib/libstdthreads/thrd_create.3
@@ -0,0 +1,260 @@
+.\" Copyright (c) 2011 Ed Schouten <ed@FreeBSD.org>
+.\" 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.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 26, 2011
+.Dt THRD_CREATE 3
+.Os
+.Sh NAME
+.Nm call_once ,
+.Nm cnd_broadcast ,
+.Nm cnd_destroy ,
+.Nm cnd_init ,
+.Nm cnd_signal ,
+.Nm cnd_timedwait ,
+.Nm cnd_wait ,
+.Nm mtx_destroy ,
+.Nm mtx_init ,
+.Nm mtx_lock ,
+.Nm mtx_timedlock ,
+.Nm mtx_trylock ,
+.Nm mtx_unlock ,
+.Nm thrd_create ,
+.Nm thrd_current ,
+.Nm thrd_detach ,
+.Nm thrd_equal ,
+.Nm thrd_exit ,
+.Nm thrd_join ,
+.Nm thrd_sleep ,
+.Nm thrd_yield ,
+.Nm tss_create ,
+.Nm tss_delete ,
+.Nm tss_get ,
+.Nm tss_set
+.Nd C11 threads interface
+.Sh LIBRARY
+.Lb libstdthreads
+.Sh SYNOPSIS
+.In threads.h
+.Ft void
+.Fn call_once "once_flag *flag" "void (*func)(void)"
+.Ft int
+.Fn cnd_broadcast "cnd_t *cond"
+.Ft void
+.Fn cnd_destroy "cnd_t *cond"
+.Ft int
+.Fn cnd_init "cnd_t *cond"
+.Ft int
+.Fn cnd_signal "cnd_t *cond"
+.Ft int
+.Fn cnd_timedwait "cnd_t * restrict cond" "mtx_t * restrict mtx" "const struct timespec * restrict ts"
+.Ft int
+.Fn cnd_wait "cnd_t *cond" "mtx_t *mtx"
+.Ft void
+.Fn mtx_destroy "mtx_t *mtx"
+.Ft int
+.Fn mtx_init "mtx_t *mtx" "int type"
+.Ft int
+.Fn mtx_lock "mtx_t *mtx"
+.Ft int
+.Fn mtx_timedlock "mtx_t * restrict mtx" "const struct timespec * restrict ts"
+.Ft int
+.Fn mtx_trylock "mtx_t *mtx"
+.Ft int
+.Fn mtx_unlock "mtx_t *mtx"
+.Ft int
+.Fn thrd_create "thrd_t *thr" "int (*func)(void *)" "void *arg"
+.Ft thrd_t
+.Fn thrd_current "void"
+.Ft int
+.Fn thrd_detach "thrd_t thr"
+.Ft int
+.Fn thrd_equal "thrd_t thr0" "thrd_t thr1"
+.Ft _Noreturn void
+.Fn thrd_exit "int res"
+.Ft int
+.Fn thrd_join "thrd_t thr" "int *res"
+.Ft int
+.Fn thrd_sleep "const struct timespec *duration" "struct timespec *remaining"
+.Ft void
+.Fn thrd_yield "void"
+.Ft int
+.Fn tss_create "tss_t *key" "void (*dtor)(void *)"
+.Ft void
+.Fn tss_delete "tss_t key"
+.Ft void *
+.Fn tss_get "tss_t key"
+.Ft int
+.Fn tss_set "tss_t key" "void *val"
+.Sh DESCRIPTION
+As of
+.St -isoC-2011 ,
+the C standard includes an API for writing multithreaded applications.
+Since POSIX.1 already includes a threading API that is used by virtually
+any multithreaded application, the interface provided by the C standard
+can be considered superfluous.
+.Pp
+In this implementation, the threading interface is therefore implemented
+as a light-weight layer on top of existing interfaces.
+The functions to which these routines are mapped, are listed in the
+following table.
+Please refer to the documentation of the POSIX equivalent functions for
+more information.
+.Bl -column ".Fn mtx_timedlock" ".Xr pthread_mutex_timedlock 3" -offset indent
+.It Em Function Ta Em POSIX equivalent
+.It Fn call_once Ta Xr pthread_once 3
+.It Fn cnd_broadcast Ta Xr pthread_cond_broadcast 3
+.It Fn cnd_destroy Ta Xr pthread_cond_destroy 3
+.It Fn cnd_init Ta Xr pthread_cond_init 3
+.It Fn cnd_signal Ta Xr pthread_cond_signal 3
+.It Fn cnd_timedwait Ta Xr pthread_cond_timedwait 3
+.It Fn cnd_wait Ta Xr pthread_cond_wait 3
+.It Fn mtx_destroy Ta Xr pthread_mutex_destroy 3
+.It Fn mtx_init Ta Xr pthread_mutex_init 3
+.It Fn mtx_lock Ta Xr pthread_mutex_lock 3
+.It Fn mtx_timedlock Ta Xr pthread_mutex_timedlock 3
+.It Fn mtx_trylock Ta Xr pthread_mutex_trylock 3
+.It Fn mtx_unlock Ta Xr pthread_mutex_unlock 3
+.It Fn thrd_create Ta Xr pthread_create 3
+.It Fn thrd_current Ta Xr pthread_self 3
+.It Fn thrd_detach Ta Xr pthread_detach 3
+.It Fn thrd_equal Ta Xr pthread_equal 3
+.It Fn thrd_exit Ta Xr pthread_exit 3
+.It Fn thrd_join Ta Xr pthread_join 3
+.It Fn thrd_sleep Ta Xr nanosleep 2
+.It Fn thrd_yield Ta Xr pthread_yield 3
+.It Fn tss_create Ta Xr pthread_key_create 3
+.It Fn tss_delete Ta Xr pthread_key_delete 3
+.It Fn tss_get Ta Xr pthread_getspecific 3
+.It Fn tss_set Ta Xr pthread_setspecific 3
+.El
+.Sh DIFFERENCES WITH POSIX EQUIVALENTS
+The
+.Fn thrd_exit
+function returns an integer value to the thread calling
+.Fn thrd_join ,
+whereas the
+.Fn pthread_exit
+function uses a pointer.
+.Pp
+The mutex created by
+.Fn mtx_init
+can be of
+.Fa type
+.Dv mtx_plain
+or
+.Dv mtx_timed
+to distinguish between a mutex that supports
+.Fn mtx_timedlock .
+This type can be
+.Em or'd
+with
+.Dv mtx_recursive
+to create a mutex that allows recursive acquisition.
+These properties are normally set using
+.Fn pthread_mutex_init Ns 's
+.Fa attr
+parameter.
+.Sh RETURN VALUES
+If successful, the
+.Fn cnd_broadcast ,
+.Fn cnd_init ,
+.Fn cnd_signal ,
+.Fn cnd_timedwait ,
+.Fn cnd_wait ,
+.Fn mtx_init ,
+.Fn mtx_lock ,
+.Fn mtx_timedlock ,
+.Fn mtx_trylock ,
+.Fn mtx_unlock ,
+.Fn thrd_create ,
+.Fn thrd_detach ,
+.Fn thrd_equal ,
+.Fn thrd_join ,
+.Fn thrd_sleep ,
+.Fn tss_create
+and
+.Fn tss_set
+functions return
+.Dv thrd_success .
+Otherwise an error code will be returned to indicate the error.
+.Pp
+The
+.Fn thrd_current
+function returns the thread ID of the calling thread.
+.Pp
+The
+.Fn tss_get
+function returns the thread-specific data value associated with the
+given
+.Fa key .
+If no thread-specific data value is associated with
+.Fa key ,
+then the value NULL is returned.
+.Sh ERRORS
+The
+.Fn cnd_init
+and
+.Fn thrd_create
+functions will fail if:
+.Bl -tag -width thrd_timedout
+.It Dv thrd_nomem
+The system has insufficient memory.
+.El
+.Pp
+The
+.Fn cnd_timedwait
+and
+.Fn mtx_timedlock
+functions will fail if:
+.Bl -tag -width thrd_timedout
+.It Dv thrd_timedout
+The system time has reached or exceeded the time specified in
+.Fa ts
+before the operation could be completed.
+.El
+.Pp
+The
+.Fn mtx_trylock
+function will fail if:
+.Bl -tag -width thrd_timedout
+.It Dv thrd_busy
+The mutex is already locked.
+.El
+.Pp
+In all other cases, these functions may fail by returning general error
+code
+.Dv thrd_error .
+.Sh SEE ALSO
+.Xr nanosleep 2 ,
+.Xr pthread 3
+.Sh STANDARDS
+These functions are expected to conform to
+.St -isoC-2011 .
+.Sh HISTORY
+These functions appeared in
+.Fx 10.0 .
+.Sh AUTHORS
+.An Ed Schouten Aq ed@FreeBSD.org
diff --git a/lib/libstdthreads/threads.h b/lib/libstdthreads/threads.h
new file mode 100644
index 0000000..aba9ca1
--- /dev/null
+++ b/lib/libstdthreads/threads.h
@@ -0,0 +1,106 @@
+/*-
+ * Copyright (c) 2011 Ed Schouten <ed@FreeBSD.org>
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _THREADS_H_
+#define _THREADS_H_
+
+#include <time.h>
+
+/*
+ * The C11 threads interface.
+ *
+ * This interface is implemented as a light-weight wrapper around
+ * <pthread.h>. To prevent namespace pollution, the once_flag object,
+ * its corresponding ONCE_FLAG_INIT and TSS_DTOR_ITERATIONS have been
+ * copied from this header file. They must be kept in sync.
+ */
+
+typedef struct pthread_cond *cnd_t;
+typedef struct pthread_mutex *mtx_t;
+typedef struct pthread *thrd_t;
+typedef int tss_t;
+
+typedef struct {
+ int __state;
+ mtx_t __mutex;
+} once_flag;
+
+typedef void (*tss_dtor_t)(void *);
+typedef int (*thrd_start_t)(void *);
+
+enum {
+ mtx_plain = 0x1,
+ mtx_recursive = 0x2,
+ mtx_timed = 0x4
+};
+
+enum {
+ thrd_busy = 1,
+ thrd_error = 2,
+ thrd_nomem = 3,
+ thrd_success = 4,
+ thrd_timedout = 5
+};
+
+#if !defined(__cplusplus) || __cplusplus < 201103L
+#define thread_local _Thread_local
+#endif
+#define ONCE_FLAG_INIT { 0, NULL }
+#define TSS_DTOR_ITERATIONS 4
+
+__BEGIN_DECLS
+void call_once(once_flag *, void (*)(void));
+int cnd_broadcast(cnd_t *);
+void cnd_destroy(cnd_t *);
+int cnd_init(cnd_t *);
+int cnd_signal(cnd_t *);
+int cnd_timedwait(cnd_t *__restrict, mtx_t *__restrict,
+ const struct timespec *__restrict);
+int cnd_wait(cnd_t *, mtx_t *);
+void mtx_destroy(mtx_t *);
+int mtx_init(mtx_t *, int);
+int mtx_lock(mtx_t *);
+int mtx_timedlock(mtx_t *__restrict, const struct timespec *__restrict);
+int mtx_trylock(mtx_t *);
+int mtx_unlock(mtx_t *);
+int thrd_create(thrd_t *, thrd_start_t, void *);
+thrd_t thrd_current(void);
+int thrd_detach(thrd_t);
+int thrd_equal(thrd_t, thrd_t);
+_Noreturn void
+ thrd_exit(int);
+int thrd_join(thrd_t, int *);
+int thrd_sleep(const struct timespec *, struct timespec *);
+void thrd_yield(void);
+int tss_create(tss_t *, tss_dtor_t);
+void tss_delete(tss_t);
+void * tss_get(tss_t);
+int tss_set(tss_t, void *);
+__END_DECLS
+
+#endif /* !_THREADS_H_ */
diff --git a/lib/libstdthreads/tss.c b/lib/libstdthreads/tss.c
new file mode 100644
index 0000000..ef78b4b
--- /dev/null
+++ b/lib/libstdthreads/tss.c
@@ -0,0 +1,69 @@
+/*-
+ * Copyright (c) 2011 Ed Schouten <ed@FreeBSD.org>
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <pthread.h>
+
+#include "threads.h"
+
+int
+tss_create(tss_t *key, tss_dtor_t dtor)
+{
+
+ if (pthread_key_create(key, dtor) != 0)
+ return (thrd_error);
+ return (thrd_success);
+}
+
+void
+tss_delete(tss_t key)
+{
+
+ (void)pthread_key_delete(key);
+}
+
+void *
+tss_get(tss_t key)
+{
+
+ return (pthread_getspecific(key));
+}
+
+int
+tss_set(tss_t key, void *val)
+{
+
+ if (pthread_setspecific(key, val) != 0)
+ return (thrd_error);
+ return (thrd_success);
+}
+
+_Static_assert(TSS_DTOR_ITERATIONS == PTHREAD_DESTRUCTOR_ITERATIONS,
+ "TSS_DTOR_ITERATIONS must be identical to PTHREAD_DESTRUCTOR_ITERATIONS");
diff --git a/lib/libthr/arch/amd64/include/pthread_md.h b/lib/libthr/arch/amd64/include/pthread_md.h
index 9f6d3a1..0ebea2e 100644
--- a/lib/libthr/arch/amd64/include/pthread_md.h
+++ b/lib/libthr/arch/amd64/include/pthread_md.h
@@ -71,7 +71,7 @@ struct tcb {
u_long __i; \
__asm __volatile("movq %%fs:%1, %0" \
: "=r" (__i) \
- : "m" (*(u_long *)(__tcb_offset(name)))); \
+ : "m" (*(volatile u_long *)(__tcb_offset(name)))); \
__result = (__tcb_type(name))__i; \
\
__result; \
diff --git a/lib/libthr/arch/i386/include/pthread_md.h b/lib/libthr/arch/i386/include/pthread_md.h
index 5c00cf6..c160aa4 100644
--- a/lib/libthr/arch/i386/include/pthread_md.h
+++ b/lib/libthr/arch/i386/include/pthread_md.h
@@ -70,7 +70,7 @@ struct tcb {
u_int __i; \
__asm __volatile("movl %%gs:%1, %0" \
: "=r" (__i) \
- : "m" (*(u_int *)(__tcb_offset(name)))); \
+ : "m" (*(volatile u_int *)(__tcb_offset(name)))); \
__result = (__tcb_type(name))__i; \
\
__result; \
diff --git a/lib/libthr/thread/thr_sig.c b/lib/libthr/thread/thr_sig.c
index 66358db..46cbd82 100644
--- a/lib/libthr/thread/thr_sig.c
+++ b/lib/libthr/thread/thr_sig.c
@@ -32,6 +32,7 @@
#include <sys/signalvar.h>
#include <signal.h>
#include <errno.h>
+#include <stdlib.h>
#include <string.h>
#include <pthread.h>
#include "un-namespace.h"
@@ -314,16 +315,24 @@ check_cancel(struct pthread *curthread, ucontext_t *ucp)
static void
check_deferred_signal(struct pthread *curthread)
{
- ucontext_t uc;
+ ucontext_t *uc;
struct sigaction act;
siginfo_t info;
if (__predict_true(curthread->deferred_siginfo.si_signo == 0))
return;
- getcontext(&uc);
+
+#if defined(__amd64__) || defined(__i386__)
+ uc = alloca(__getcontextx_size());
+ __fillcontextx((char *)uc);
+#else
+ ucontext_t ucv;
+ uc = &ucv;
+ getcontext(uc);
+#endif
if (curthread->deferred_siginfo.si_signo != 0) {
act = curthread->deferred_sigact;
- uc.uc_sigmask = curthread->deferred_sigmask;
+ uc->uc_sigmask = curthread->deferred_sigmask;
memcpy(&info, &curthread->deferred_siginfo, sizeof(siginfo_t));
/* remove signal */
curthread->deferred_siginfo.si_signo = 0;
@@ -334,7 +343,7 @@ check_deferred_signal(struct pthread *curthread)
tact.sa_handler = SIG_DFL;
_sigaction(info.si_signo, &tact, NULL);
}
- handle_signal(&act, info.si_signo, &info, &uc);
+ handle_signal(&act, info.si_signo, &info, uc);
}
}
diff --git a/lib/libthread_db/Makefile b/lib/libthread_db/Makefile
index 047bbe6..a66f25d 100644
--- a/lib/libthread_db/Makefile
+++ b/lib/libthread_db/Makefile
@@ -16,4 +16,10 @@ SYM_MAPS+=${.CURDIR}/Symbol.map
SYMBOL_MAPS=${SYM_MAPS}
VERSION_DEF=${.CURDIR}/../libc/Versions.def
+.if ${CC:T:Mclang} == "clang"
+# Unfortunately, clang gives an incorrect warning about alignment in
+# arch/i386/libpthread_md.c, so turn that off for now.
+NO_WCAST_ALIGN=
+.endif
+
.include <bsd.lib.mk>
diff --git a/lib/libutil/Makefile b/lib/libutil/Makefile
index b2378ad..3136a05 100644
--- a/lib/libutil/Makefile
+++ b/lib/libutil/Makefile
@@ -25,47 +25,48 @@ CFLAGS+= -DINET6
CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../libc/gen/
-MAN+= kld.3 login_auth.3 login_tty.3 pty.3 \
- login_cap.3 login_class.3 login_times.3 login_ok.3 \
- _secure_path.3 uucplock.3 property.3 auth.3 realhostname.3 \
- realhostname_sa.3 trimdomain.3 fparseln.3 humanize_number.3 \
- pidfile.3 flopen.3 expand_number.3 hexdump.3 \
- kinfo_getfile.3 kinfo_getallproc.3 kinfo_getproc.3 \
- kinfo_getvmmap.3 quotafile.3
-MAN+= login.conf.5 auth.conf.5
-MLINKS+= kld.3 kld_isloaded.3 kld.3 kld_load.3
-MLINKS+= property.3 properties_read.3 property.3 properties_free.3
-MLINKS+= property.3 property_find.3
+MAN+= auth.3 expand_number.3 flopen.3 fparseln.3 hexdump.3 \
+ humanize_number.3 kinfo_getallproc.3 kinfo_getfile.3 \
+ kinfo_getproc.3 kinfo_getvmmap.3 kld.3 login_auth.3 login_cap.3 \
+ login_class.3 login_ok.3 login_times.3 login_tty.3 pidfile.3 \
+ property.3 pty.3 quotafile.3 realhostname.3 realhostname_sa.3 \
+ _secure_path.3 trimdomain.3 uucplock.3
+MAN+= auth.conf.5 login.conf.5
MLINKS+= auth.3 auth_getval.3
-MLINKS+= pty.3 openpty.3 pty.3 forkpty.3
-MLINKS+=login_cap.3 login_getclassbyname.3 login_cap.3 login_close.3 \
- login_cap.3 login_getclass.3 login_cap.3 login_getuserclass.3 \
- login_cap.3 login_getcapstr.3 login_cap.3 login_getcaplist.3 \
- login_cap.3 login_getstyle.3 login_cap.3 login_getcaptime.3 \
- login_cap.3 login_getcapnum.3 login_cap.3 login_getcapsize.3 \
- login_cap.3 login_getcapbool.3 login_cap.3 login_getpath.3 \
- login_cap.3 login_getpwclass.3 login_cap.3 login_setcryptfmt.3
-MLINKS+=login_class.3 setusercontext.3 login_class.3 setclasscontext.3 \
- login_class.3 setclassenvironment.3 login_class.3 setclassresources.3
-MLINKS+=login_times.3 parse_lt.3 login_times.3 in_ltm.3 \
- login_times.3 in_lt.3 login_times.3 in_ltms.3 \
- login_times.3 in_lts.3
-MLINKS+=login_ok.3 auth_ttyok.3 login_ok.3 auth_hostok.3 \
- login_ok.3 auth_timeok.3
-MLINKS+=login_auth.3 auth_checknologin.3 login_auth.3 auth_cat.3
-MLINKS+=uucplock.3 uu_lock.3 uucplock.3 uu_lock_txfr.3 \
- uucplock.3 uu_unlock.3 uucplock.3 uu_lockerr.3
-MLINKS+=pidfile.3 pidfile_open.3 \
- pidfile.3 pidfile_write.3 \
- pidfile.3 pidfile_close.3 \
- pidfile.3 pidfile_remove.3
-MLINKS+=quotafile.3 quota_open.3 \
+MLINKS+= kld.3 kld_isloaded.3 kld.3 kld_load.3
+MLINKS+=login_auth.3 auth_cat.3 login_auth.3 auth_checknologin.3
+MLINKS+=login_cap.3 login_close.3 login_cap.3 login_getcapbool.3 \
+ login_cap.3 login_getcaplist.3 login_cap.3 login_getcapnum.3 \
+ login_cap.3 login_getcapsize.3 login_cap.3 login_getcapstr.3 \
+ login_cap.3 login_getcaptime.3 login_cap.3 login_getclass.3 \
+ login_cap.3 login_getclassbyname.3 login_cap.3 login_getpath.3 \
+ login_cap.3 login_getpwclass.3 login_cap.3 login_getstyle.3 \
+ login_cap.3 login_getuserclass.3 login_cap.3 login_setcryptfmt.3
+MLINKS+=login_class.3 setclasscontext.3 login_class.3 setclassenvironment.3 \
+ login_class.3 setclassresources.3 login_class.3 setusercontext.3
+MLINKS+=login_ok.3 auth_hostok.3 login_ok.3 auth_timeok.3 \
+ login_ok.3 auth_ttyok.3
+MLINKS+=login_times.3 in_lt.3 login_times.3 in_ltm.3 \
+ login_times.3 in_ltms.3 \
+ login_times.3 in_lts.3 \
+ login_times.3 parse_lt.3
+MLINKS+=pidfile.3 pidfile_close.3 \
+ pidfile.3 pidfile_fileno.3 \
+ pidfile.3 pidfile_open.3 \
+ pidfile.3 pidfile_remove.3 \
+ pidfile.3 pidfile_write.3
+MLINKS+= property.3 property_find.3 property.3 properties_free.3
+MLINKS+= property.3 properties_read.3
+MLINKS+= pty.3 forkpty.3 pty.3 openpty.3
+MLINKS+=quotafile.3 quota_close.3 \
quotafile.3 quota_fsname.3 \
+ quotafile.3 quota_open.3 \
quotafile.3 quota_qfname.3 \
- quotafile.3 quota_statfs.3 \
quotafile.3 quota_read.3 \
+ quotafile.3 quota_statfs.3 \
quotafile.3 quota_write_limits.3 \
- quotafile.3 quota_write_usage.3 \
- quotafile.3 quota_close.3
+ quotafile.3 quota_write_usage.3
+MLINKS+=uucplock.3 uu_lock.3 uucplock.3 uu_lock_txfr.3 \
+ uucplock.3 uu_lockerr.3 uucplock.3 uu_unlock.3
.include <bsd.lib.mk>
diff --git a/lib/libutil/flopen.3 b/lib/libutil/flopen.3
index 26d1c04..6665702 100644
--- a/lib/libutil/flopen.3
+++ b/lib/libutil/flopen.3
@@ -1,5 +1,5 @@
.\"-
-.\" Copyright (c) 2007 Dag-Erling Coïdan Smørgrav
+.\" Copyright (c) 2007 Dag-Erling Coïdan Smørgrav
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
diff --git a/lib/libutil/gr_util.c b/lib/libutil/gr_util.c
index 633f435..0173595 100644
--- a/lib/libutil/gr_util.c
+++ b/lib/libutil/gr_util.c
@@ -28,23 +28,319 @@
__FBSDID("$FreeBSD$");
#include <sys/param.h>
+#include <sys/errno.h>
+#include <sys/stat.h>
+#include <ctype.h>
+#include <err.h>
+#include <fcntl.h>
#include <grp.h>
#include <inttypes.h>
#include <libutil.h>
+#include <paths.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
struct group_storage {
struct group gr;
char *members[];
};
+static int lockfd = -1;
+static char group_dir[PATH_MAX];
+static char group_file[PATH_MAX];
+static char tempname[PATH_MAX];
+static int initialized;
+
static const char group_line_format[] = "%s:%s:%ju:";
/*
+ * Initialize statics
+ */
+int
+gr_init(const char *dir, const char *group)
+{
+ if (dir == NULL) {
+ strcpy(group_dir, _PATH_ETC);
+ } else {
+ if (strlen(dir) >= sizeof(group_dir)) {
+ errno = ENAMETOOLONG;
+ return (-1);
+ }
+ strcpy(group_dir, dir);
+ }
+
+ if (group == NULL) {
+ if (dir == NULL) {
+ strcpy(group_file, _PATH_GROUP);
+ } else if (snprintf(group_file, sizeof(group_file), "%s/group",
+ group_dir) > (int)sizeof(group_file)) {
+ errno = ENAMETOOLONG;
+ return (-1);
+ }
+ } else {
+ if (strlen(group) >= sizeof(group_file)) {
+ errno = ENAMETOOLONG;
+ return (-1);
+ }
+ strcpy(group_file, group);
+ }
+ initialized = 1;
+ return (0);
+}
+
+/*
+ * Lock the group file
+ */
+int
+gr_lock(void)
+{
+ if (*group_file == '\0')
+ return (-1);
+
+ for (;;) {
+ struct stat st;
+
+ lockfd = open(group_file, O_RDONLY, 0);
+ if (lockfd < 0 || fcntl(lockfd, F_SETFD, 1) == -1)
+ err(1, "%s", group_file);
+ if (flock(lockfd, LOCK_EX|LOCK_NB) == -1) {
+ if (errno == EWOULDBLOCK) {
+ errx(1, "the group file is busy");
+ } else {
+ err(1, "could not lock the group file: ");
+ }
+ }
+ if (fstat(lockfd, &st) == -1)
+ err(1, "fstat() failed: ");
+ if (st.st_nlink != 0)
+ break;
+ close(lockfd);
+ lockfd = -1;
+ }
+ return (lockfd);
+}
+
+/*
+ * Create and open a presmuably safe temp file for editing group data
+ */
+int
+gr_tmp(int mfd)
+{
+ char buf[8192];
+ ssize_t nr;
+ const char *p;
+ int tfd;
+
+ if (*group_file == '\0')
+ return (-1);
+ if ((p = strrchr(group_file, '/')))
+ ++p;
+ else
+ p = group_file;
+ if (snprintf(tempname, sizeof(tempname), "%.*sgroup.XXXXXX",
+ (int)(p - group_file), group_file) >= (int)sizeof(tempname)) {
+ errno = ENAMETOOLONG;
+ return (-1);
+ }
+ if ((tfd = mkstemp(tempname)) == -1)
+ return (-1);
+ if (mfd != -1) {
+ while ((nr = read(mfd, buf, sizeof(buf))) > 0)
+ if (write(tfd, buf, (size_t)nr) != nr)
+ break;
+ if (nr != 0) {
+ unlink(tempname);
+ *tempname = '\0';
+ close(tfd);
+ return (-1);
+ }
+ }
+ return (tfd);
+}
+
+/*
+ * Copy the group file from one descriptor to another, replacing, deleting
+ * or adding a single record on the way.
+ */
+int
+gr_copy(int ffd, int tfd, const struct group *gr, struct group *old_gr)
+{
+ char buf[8192], *end, *line, *p, *q, *r, t;
+ struct group *fgr;
+ const struct group *sgr;
+ size_t len;
+ int eof, readlen;
+
+ sgr = gr;
+ if (gr == NULL) {
+ line = NULL;
+ if (old_gr == NULL)
+ return (-1);
+ sgr = old_gr;
+ } else if ((line = gr_make(gr)) == NULL)
+ return (-1);
+
+ eof = 0;
+ len = 0;
+ p = q = end = buf;
+ for (;;) {
+ /* find the end of the current line */
+ for (p = q; q < end && *q != '\0'; ++q)
+ if (*q == '\n')
+ break;
+
+ /* if we don't have a complete line, fill up the buffer */
+ if (q >= end) {
+ if (eof)
+ break;
+ if ((size_t)(q - p) >= sizeof(buf)) {
+ warnx("group line too long");
+ errno = EINVAL; /* hack */
+ goto err;
+ }
+ if (p < end) {
+ q = memmove(buf, p, end -p);
+ end -= p - buf;
+ } else {
+ p = q = end = buf;
+ }
+ readlen = read(ffd, end, sizeof(buf) - (end -buf));
+ if (readlen == -1)
+ goto err;
+ else
+ len = (size_t)readlen;
+ if (len == 0 && p == buf)
+ break;
+ end += len;
+ len = end - buf;
+ if (len < (ssize_t)sizeof(buf)) {
+ eof = 1;
+ if (len > 0 && buf[len -1] != '\n')
+ ++len, *end++ = '\n';
+ }
+ continue;
+ }
+
+ /* is it a blank line or a comment? */
+ for (r = p; r < q && isspace(*r); ++r)
+ /* nothing */;
+ if (r == q || *r == '#') {
+ /* yep */
+ if (write(tfd, p, q -p + 1) != q - p + 1)
+ goto err;
+ ++q;
+ continue;
+ }
+
+ /* is it the one we're looking for? */
+
+ t = *q;
+ *q = '\0';
+
+ fgr = gr_scan(r);
+
+ /* fgr is either a struct group for the current line,
+ * or NULL if the line is malformed.
+ */
+
+ *q = t;
+ if (fgr == NULL || fgr->gr_gid != sgr->gr_gid) {
+ /* nope */
+ if (fgr != NULL)
+ free(fgr);
+ if (write(tfd, p, q - p + 1) != q - p + 1)
+ goto err;
+ ++q;
+ continue;
+ }
+ if (old_gr && !gr_equal(fgr, old_gr)) {
+ warnx("entry inconsistent");
+ free(fgr);
+ errno = EINVAL; /* hack */
+ goto err;
+ }
+ free(fgr);
+
+ /* it is, replace or remove it */
+ if (line != NULL) {
+ len = strlen(line);
+ if (write(tfd, line, len) != (int) len)
+ goto err;
+ } else {
+ /* when removed, avoid the \n */
+ q++;
+ }
+ /* we're done, just copy the rest over */
+ for (;;) {
+ if (write(tfd, q, end - q) != end - q)
+ goto err;
+ q = buf;
+ readlen = read(ffd, buf, sizeof(buf));
+ if (readlen == 0)
+ break;
+ else
+ len = (size_t)readlen;
+ if (readlen == -1)
+ goto err;
+ end = buf + len;
+ }
+ goto done;
+ }
+
+ /* if we got here, we didn't find the old entry */
+ if (line == NULL) {
+ errno = ENOENT;
+ goto err;
+ }
+ len = strlen(line);
+ if ((size_t)write(tfd, line, len) != len ||
+ write(tfd, "\n", 1) != 1)
+ goto err;
+ done:
+ if (line != NULL)
+ free(line);
+ return (0);
+ err:
+ if (line != NULL)
+ free(line);
+ return (-1);
+}
+
+/*
+ * Regenerate the group file
+ */
+int
+gr_mkdb(void)
+{
+ return (rename(tempname, group_file));
+}
+
+/*
+ * Clean up. Preserver errno for the caller's convenience.
+ */
+void
+gr_fini(void)
+{
+ int serrno;
+
+ if (!initialized)
+ return;
+ initialized = 0;
+ serrno = errno;
+ if (*tempname != '\0') {
+ unlink(tempname);
+ *tempname = '\0';
+ }
+ if (lockfd != -1)
+ close(lockfd);
+ errno = serrno;
+}
+
+/*
* Compares two struct group's.
*/
int
diff --git a/lib/libutil/kld.3 b/lib/libutil/kld.3
index 6b77c47..595ac96 100644
--- a/lib/libutil/kld.3
+++ b/lib/libutil/kld.3
@@ -1,5 +1,5 @@
.\"-
-.\" Copyright (c) 2006 Dag-Erling Coïdan Smørgrav
+.\" Copyright (c) 2006 Dag-Erling Coïdan Smørgrav
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
diff --git a/lib/libutil/libutil.h b/lib/libutil/libutil.h
index fc6d3bb..b6bdbe0 100644
--- a/lib/libutil/libutil.h
+++ b/lib/libutil/libutil.h
@@ -48,6 +48,11 @@ typedef __gid_t gid_t;
#define _GID_T_DECLARED
#endif
+#ifndef _MODE_T_DECLARED
+typedef __mode_t mode_t;
+#define _MODE_T_DECLARED
+#endif
+
#ifndef _PID_T_DECLARED
typedef __pid_t pid_t;
#define _PID_T_DECLARED
@@ -63,66 +68,36 @@ typedef __uid_t uid_t;
#define _UID_T_DECLARED
#endif
-#define PROPERTY_MAX_NAME 64
-#define PROPERTY_MAX_VALUE 512
+#define PROPERTY_MAX_NAME 64
+#define PROPERTY_MAX_VALUE 512
/* for properties.c */
typedef struct _property {
struct _property *next;
- char *name;
- char *value;
+ char *name;
+ char *value;
} *properties;
-#ifdef _SYS_PARAM_H_
-/* for pidfile.c */
-struct pidfh {
- int pf_fd;
- char pf_path[MAXPATHLEN + 1];
- __dev_t pf_dev;
- ino_t pf_ino;
-};
-#endif
-
/* Avoid pulling in all the include files for no need */
+struct in_addr;
+struct pidfh;
+struct sockaddr;
struct termios;
struct winsize;
-struct in_addr;
-struct kinfo_file;
-struct kinfo_proc;
-struct kinfo_vmentry;
__BEGIN_DECLS
+char *auth_getval(const char *_name);
void clean_environment(const char * const *_white,
const char * const *_more_white);
+int expand_number(const char *_buf, uint64_t *_num);
int extattr_namespace_to_string(int _attrnamespace, char **_string);
int extattr_string_to_namespace(const char *_string, int *_attrnamespace);
int flopen(const char *_path, int _flags, ...);
-void hexdump(const void *ptr, int length, const char *hdr, int flags);
-int login_tty(int _fd);
-void trimdomain(char *_fullhost, int _hostsize);
-int openpty(int *_amaster, int *_aslave, char *_name,
- struct termios *_termp, struct winsize *_winp);
int forkpty(int *_amaster, char *_name,
- struct termios *_termp, struct winsize *_winp);
+ struct termios *_termp, struct winsize *_winp);
+void hexdump(const void *_ptr, int _length, const char *_hdr, int _flags);
int humanize_number(char *_buf, size_t _len, int64_t _number,
const char *_suffix, int _scale, int _flags);
-int expand_number(const char *_buf, uint64_t *_num);
-const char *uu_lockerr(int _uu_lockresult);
-int uu_lock(const char *_ttyname);
-int uu_unlock(const char *_ttyname);
-int uu_lock_txfr(const char *_ttyname, pid_t _pid);
-int _secure_path(const char *_path, uid_t _uid, gid_t _gid);
-properties properties_read(int fd);
-void properties_free(properties list);
-char *property_find(properties list, const char *name);
-char *auth_getval(const char *name);
-int realhostname(char *host, size_t hsize, const struct in_addr *ip);
-struct sockaddr;
-int realhostname_sa(char *host, size_t hsize, struct sockaddr *addr,
- int addrlen);
-
-int kld_isloaded(const char *name);
-int kld_load(const char *name);
struct kinfo_file *
kinfo_getfile(pid_t _pid, int *_cntp);
struct kinfo_vmentry *
@@ -131,75 +106,95 @@ struct kinfo_proc *
kinfo_getallproc(int *_cntp);
struct kinfo_proc *
kinfo_getproc(pid_t _pid);
+int kld_isloaded(const char *_name);
+int kld_load(const char *_name);
+int login_tty(int _fd);
+int openpty(int *_amaster, int *_aslave, char *_name,
+ struct termios *_termp, struct winsize *_winp);
+int pidfile_close(struct pidfh *_pfh);
+int pidfile_fileno(const struct pidfh *_pfh);
+struct pidfh *
+ pidfile_open(const char *_path, mode_t _mode, pid_t *_pidptr);
+int pidfile_remove(struct pidfh *_pfh);
+int pidfile_write(struct pidfh *_pfh);
+void properties_free(properties _list);
+char *property_find(properties _list, const char *_name);
+properties
+ properties_read(int _fd);
+int realhostname(char *_host, size_t _hsize, const struct in_addr *_ip);
+int realhostname_sa(char *_host, size_t _hsize, struct sockaddr *_addr,
+ int _addrlen);
+int _secure_path(const char *_path, uid_t _uid, gid_t _gid);
+void trimdomain(char *_fullhost, int _hostsize);
+const char *
+ uu_lockerr(int _uu_lockresult);
+int uu_lock(const char *_ttyname);
+int uu_unlock(const char *_ttyname);
+int uu_lock_txfr(const char *_ttyname, pid_t _pid);
#ifdef _STDIO_H_ /* avoid adding new includes */
-char *fparseln(FILE *, size_t *, size_t *, const char[3], int);
+char *fparseln(FILE *_fp, size_t *_len, size_t *_lineno,
+ const char _delim[3], int _flags);
#endif
#ifdef _PWD_H_
-int pw_copy(int _ffd, int _tfd, const struct passwd *_pw, struct passwd *_old_pw);
-struct passwd *pw_dup(const struct passwd *_pw);
+int pw_copy(int _ffd, int _tfd, const struct passwd *_pw,
+ struct passwd *_old_pw);
+struct passwd
+ *pw_dup(const struct passwd *_pw);
int pw_edit(int _notsetuid);
int pw_equal(const struct passwd *_pw1, const struct passwd *_pw2);
void pw_fini(void);
int pw_init(const char *_dir, const char *_master);
char *pw_make(const struct passwd *_pw);
+char *pw_make_v7(const struct passwd *_pw);
int pw_mkdb(const char *_user);
int pw_lock(void);
-struct passwd *pw_scan(const char *_line, int _flags);
-const char *pw_tempname(void);
+struct passwd
+ *pw_scan(const char *_line, int _flags);
+const char
+ *pw_tempname(void);
int pw_tmp(int _mfd);
#endif
#ifdef _GRP_H_
-int gr_equal(const struct group *gr1, const struct group *gr2);
-char *gr_make(const struct group *gr);
-struct group *gr_dup(const struct group *gr);
-struct group *gr_scan(const char *line);
-#endif
-
-#ifdef _SYS_PARAM_H_
-struct pidfh *pidfile_open(const char *path, mode_t mode, pid_t *pidptr);
-int pidfile_write(struct pidfh *pfh);
-int pidfile_close(struct pidfh *pfh);
-int pidfile_remove(struct pidfh *pfh);
+int gr_copy(int __ffd, int _tfd, const struct group *_gr,
+ struct group *_old_gr);
+struct group
+ *gr_dup(const struct group *_gr);
+int gr_equal(const struct group *_gr1, const struct group *_gr2);
+void gr_fini(void);
+int gr_init(const char *_dir, const char *_master);
+int gr_lock(void);
+char *gr_make(const struct group *_gr);
+int gr_mkdb(void);
+struct group
+ *gr_scan(const char *_line);
+int gr_tmp(int _mdf);
#endif
#ifdef _UFS_UFS_QUOTA_H_
-struct quotafile;
struct fstab;
-struct quotafile *quota_open(struct fstab *, int, int);
-void quota_close(struct quotafile *);
-int quota_on(struct quotafile *);
-int quota_off(struct quotafile *);
-const char *quota_fsname(const struct quotafile *);
-const char *quota_qfname(const struct quotafile *);
-int quota_maxid(struct quotafile *);
-int quota_check_path(const struct quotafile *, const char *path);
-int quota_read(struct quotafile *, struct dqblk *, int);
-int quota_write_limits(struct quotafile *, struct dqblk *, int);
-int quota_write_usage(struct quotafile *, struct dqblk *, int);
-int quota_convert(struct quotafile *, int);
+struct quotafile;
+int quota_check_path(const struct quotafile *_qf, const char *_path);
+void quota_close(struct quotafile *_qf);
+int quota_convert(struct quotafile *_qf, int _wordsize);
+const char *
+ quota_fsname(const struct quotafile *_qf);
+int quota_maxid(struct quotafile *_qf);
+int quota_off(struct quotafile *_qf);
+int quota_on(struct quotafile *_qf);
+struct quotafile *
+ quota_open(struct fstab *_fs, int _quotatype, int _openflags);
+const char *
+ quota_qfname(const struct quotafile *_qf);
+int quota_read(struct quotafile *_qf, struct dqblk *_dqb, int _id);
+int quota_write_limits(struct quotafile *_qf, struct dqblk *_dqb, int _id);
+int quota_write_usage(struct quotafile *_qf, struct dqblk *_dqb, int _id);
#endif
__END_DECLS
-#define UU_LOCK_INUSE (1)
-#define UU_LOCK_OK (0)
-#define UU_LOCK_OPEN_ERR (-1)
-#define UU_LOCK_READ_ERR (-2)
-#define UU_LOCK_CREAT_ERR (-3)
-#define UU_LOCK_WRITE_ERR (-4)
-#define UU_LOCK_LINK_ERR (-5)
-#define UU_LOCK_TRY_ERR (-6)
-#define UU_LOCK_OWNER_ERR (-7)
-
-/* return values from realhostname() */
-#define HOSTNAME_FOUND (0)
-#define HOSTNAME_INCORRECTNAME (1)
-#define HOSTNAME_INVALIDADDR (2)
-#define HOSTNAME_INVALIDNAME (3)
-
/* fparseln(3) */
#define FPARSELN_UNESCESC 0x01
#define FPARSELN_UNESCCONT 0x02
@@ -207,26 +202,43 @@ __END_DECLS
#define FPARSELN_UNESCREST 0x08
#define FPARSELN_UNESCALL 0x0f
-/* pw_scan() */
-#define PWSCAN_MASTER 0x01
-#define PWSCAN_WARN 0x02
-
-/* humanize_number(3) */
-#define HN_DECIMAL 0x01
-#define HN_NOSPACE 0x02
-#define HN_B 0x04
-#define HN_DIVISOR_1000 0x08
-#define HN_IEC_PREFIXES 0x10
-
-/* maxscale = 0x07 */
-#define HN_GETSCALE 0x10
-#define HN_AUTOSCALE 0x20
-
-/* hexdump(3) */
+/* Flags for hexdump(3). */
#define HD_COLUMN_MASK 0xff
#define HD_DELIM_MASK 0xff00
#define HD_OMIT_COUNT (1 << 16)
#define HD_OMIT_HEX (1 << 17)
#define HD_OMIT_CHARS (1 << 18)
+/* Flags for humanize_number(3) flags. */
+#define HN_DECIMAL 0x01
+#define HN_NOSPACE 0x02
+#define HN_B 0x04
+#define HN_DIVISOR_1000 0x08
+#define HN_IEC_PREFIXES 0x10
+
+/* Flags for humanize_number(3) scale. */
+#define HN_GETSCALE 0x10
+#define HN_AUTOSCALE 0x20
+
+/* return values from realhostname(). */
+#define HOSTNAME_FOUND 0
+#define HOSTNAME_INCORRECTNAME 1
+#define HOSTNAME_INVALIDADDR 2
+#define HOSTNAME_INVALIDNAME 3
+
+/* Flags for pw_scan(). */
+#define PWSCAN_MASTER 0x01
+#define PWSCAN_WARN 0x02
+
+/* Return values from uu_lock(). */
+#define UU_LOCK_INUSE 1
+#define UU_LOCK_OK 0
+#define UU_LOCK_OPEN_ERR -1
+#define UU_LOCK_READ_ERR -2
+#define UU_LOCK_CREAT_ERR -3
+#define UU_LOCK_WRITE_ERR -4
+#define UU_LOCK_LINK_ERR -5
+#define UU_LOCK_TRY_ERR -6
+#define UU_LOCK_OWNER_ERR -7
+
#endif /* !_LIBUTIL_H_ */
diff --git a/lib/libutil/pidfile.3 b/lib/libutil/pidfile.3
index c42b95b..d10ab81 100644
--- a/lib/libutil/pidfile.3
+++ b/lib/libutil/pidfile.3
@@ -36,7 +36,6 @@
.Sh LIBRARY
.Lb libutil
.Sh SYNOPSIS
-.In sys/param.h
.In libutil.h
.Ft "struct pidfh *"
.Fn pidfile_open "const char *path" "mode_t mode" "pid_t *pidptr"
@@ -46,6 +45,8 @@
.Fn pidfile_close "struct pidfh *pfh"
.Ft int
.Fn pidfile_remove "struct pidfh *pfh"
+.Ft int
+.Fn pidfile_fileno "struct pidfh *pfh"
.Sh DESCRIPTION
The
.Nm pidfile
@@ -77,6 +78,9 @@ argument is
.Dv NULL ,
.Pa /var/run/ Ns Ao Va progname Ac Ns Pa .pid
file will be used.
+The
+.Fn pidfile_open
+function sets the O_CLOEXEC close-on-exec flag when opening the pidfile.
.Pp
The
.Fn pidfile_write
@@ -92,6 +96,10 @@ to start a child process.
The
.Fn pidfile_remove
function closes and removes a pidfile.
+.Pp
+The
+.Fn pidfile_fileno
+function returns the file descriptor for the open pidfile.
.Sh RETURN VALUES
The
.Fn pidfile_open
@@ -105,15 +113,27 @@ If an error occurs,
will be set.
.Pp
.Rv -std pidfile_write pidfile_close pidfile_remove
+.Pp
+The
+.Fn pidfile_fileno
+function returns the low-level file descriptor.
+It returns
+.Li -1
+and sets
+.Va errno
+if a NULL
+.Vt pidfh
+is specified, or if the pidfile is no longer open.
.Sh EXAMPLES
The following example shows in which order these functions should be used.
Note that it is safe to pass
.Dv NULL
to
.Fn pidfile_write ,
-.Fn pidfile_remove
-and
+.Fn pidfile_remove ,
.Fn pidfile_close
+and
+.Fn pidfile_fileno
functions.
.Bd -literal
struct pidfh *pfh;
@@ -244,6 +264,16 @@ and
system calls and the
.Xr flopen 3
library function.
+.Pp
+The
+.Fn pidfile_fileno
+function will fail if:
+.Bl -tag -width Er
+.It Bq Er EDOOFUS
+Improper function use.
+Probably called not from the process which used
+.Fn pidfile_open .
+.El
.Sh SEE ALSO
.Xr open 2 ,
.Xr daemon 3 ,
diff --git a/lib/libutil/pidfile.c b/lib/libutil/pidfile.c
index 953d1e0..bca0315 100644
--- a/lib/libutil/pidfile.c
+++ b/lib/libutil/pidfile.c
@@ -41,10 +41,17 @@ __FBSDID("$FreeBSD$");
#include <errno.h>
#include <libutil.h>
+struct pidfh {
+ int pf_fd;
+ char pf_path[MAXPATHLEN + 1];
+ dev_t pf_dev;
+ ino_t pf_ino;
+};
+
static int _pidfile_remove(struct pidfh *pfh, int freeit);
static int
-pidfile_verify(struct pidfh *pfh)
+pidfile_verify(const struct pidfh *pfh)
{
struct stat sb;
@@ -117,7 +124,7 @@ pidfile_open(const char *path, mode_t mode, pid_t *pidptr)
* pidfile_write() can be called multiple times.
*/
fd = flopen(pfh->pf_path,
- O_WRONLY | O_CREAT | O_TRUNC | O_NONBLOCK, mode);
+ O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC | O_NONBLOCK, mode);
if (fd == -1) {
if (errno == EWOULDBLOCK && pidptr != NULL) {
count = 20;
@@ -137,6 +144,7 @@ pidfile_open(const char *path, mode_t mode, pid_t *pidptr)
free(pfh);
return (NULL);
}
+
/*
* Remember file information, so in pidfile_write() we are sure we write
* to the proper descriptor.
@@ -252,3 +260,14 @@ pidfile_remove(struct pidfh *pfh)
return (_pidfile_remove(pfh, 1));
}
+
+int
+pidfile_fileno(const struct pidfh *pfh)
+{
+
+ if (pfh == NULL || pfh->pf_fd == -1) {
+ errno = EDOOFUS;
+ return (-1);
+ }
+ return (pfh->pf_fd);
+}
diff --git a/lib/libutil/property.3 b/lib/libutil/property.3
index b363089..efe0079 100644
--- a/lib/libutil/property.3
+++ b/lib/libutil/property.3
@@ -36,7 +36,6 @@
.Sh LIBRARY
.Lb libutil
.Sh SYNOPSIS
-.In sys/types.h
.In libutil.h
.Ft properties
.Fn properties_read "int fd"
diff --git a/lib/libutil/pw_util.c b/lib/libutil/pw_util.c
index 5eae280..5cd27b1 100644
--- a/lib/libutil/pw_util.c
+++ b/lib/libutil/pw_util.c
@@ -406,22 +406,43 @@ pw_make(const struct passwd *pw)
pw->pw_passwd, (uintmax_t)pw->pw_uid, (uintmax_t)pw->pw_gid,
pw->pw_class, (uintmax_t)pw->pw_change, (uintmax_t)pw->pw_expire,
pw->pw_gecos, pw->pw_dir, pw->pw_shell);
- return line;
+ return (line);
}
/*
- * Copy password file from one descriptor to another, replacing or adding
- * a single record on the way.
+ * Make a passwd line (in v7 format) out of a struct passwd
+ */
+char *
+pw_make_v7(const struct passwd *pw)
+{
+ char *line;
+
+ asprintf(&line, "%s:*:%ju:%ju:%s:%s:%s", pw->pw_name,
+ (uintmax_t)pw->pw_uid, (uintmax_t)pw->pw_gid,
+ pw->pw_gecos, pw->pw_dir, pw->pw_shell);
+ return (line);
+}
+
+/*
+ * Copy password file from one descriptor to another, replacing, deleting
+ * or adding a single record on the way.
*/
int
pw_copy(int ffd, int tfd, const struct passwd *pw, struct passwd *old_pw)
{
char buf[8192], *end, *line, *p, *q, *r, t;
struct passwd *fpw;
+ const struct passwd *spw;
size_t len;
int eof, readlen;
- if ((line = pw_make(pw)) == NULL)
+ spw = pw;
+ if (pw == NULL) {
+ line = NULL;
+ if (old_pw == NULL)
+ return (-1);
+ spw = old_pw;
+ } else if ((line = pw_make(pw)) == NULL)
return (-1);
eof = 0;
@@ -489,7 +510,7 @@ pw_copy(int ffd, int tfd, const struct passwd *pw, struct passwd *old_pw)
*/
*q = t;
- if (fpw == NULL || strcmp(fpw->pw_name, pw->pw_name) != 0) {
+ if (fpw == NULL || fpw->pw_uid != spw->pw_uid) {
/* nope */
if (fpw != NULL)
free(fpw);
@@ -506,11 +527,15 @@ pw_copy(int ffd, int tfd, const struct passwd *pw, struct passwd *old_pw)
}
free(fpw);
- /* it is, replace it */
- len = strlen(line);
- if (write(tfd, line, len) != (int)len)
- goto err;
-
+ /* it is, replace or remove it */
+ if (line != NULL) {
+ len = strlen(line);
+ if (write(tfd, line, len) != (int)len)
+ goto err;
+ } else {
+ /* when removed, avoid the \n */
+ q++;
+ }
/* we're done, just copy the rest over */
for (;;) {
if (write(tfd, q, end - q) != end - q)
@@ -528,16 +553,22 @@ pw_copy(int ffd, int tfd, const struct passwd *pw, struct passwd *old_pw)
goto done;
}
- /* if we got here, we have a new entry */
+ /* if we got here, we didn't find the old entry */
+ if (line == NULL) {
+ errno = ENOENT;
+ goto err;
+ }
len = strlen(line);
if ((size_t)write(tfd, line, len) != len ||
write(tfd, "\n", 1) != 1)
goto err;
done:
- free(line);
+ if (line != NULL)
+ free(line);
return (0);
err:
- free(line);
+ if (line != NULL)
+ free(line);
return (-1);
}
diff --git a/lib/libutil/quotafile.c b/lib/libutil/quotafile.c
index 0fda5f6..03e3de4 100644
--- a/lib/libutil/quotafile.c
+++ b/lib/libutil/quotafile.c
@@ -84,7 +84,7 @@ hasquota(struct fstab *fs, int type, char *qfnamep, int qfbufsize)
}
strcpy(buf, fs->fs_mntops);
for (opt = strtok(buf, ","); opt; opt = strtok(NULL, ",")) {
- if ((cp = index(opt, '=')))
+ if ((cp = strchr(opt, '=')))
*cp++ = '\0';
if (type == USRQUOTA && strcmp(opt, usrname) == 0)
break;
diff --git a/lib/libutil/realhostname.3 b/lib/libutil/realhostname.3
index 0300ed3..28e2325 100644
--- a/lib/libutil/realhostname.3
+++ b/lib/libutil/realhostname.3
@@ -33,8 +33,6 @@
.Sh LIBRARY
.Lb libutil
.Sh SYNOPSIS
-.In sys/types.h
-.In netinet/in.h
.In libutil.h
.Ft int
.Fn realhostname "char *host" "size_t hsize" "const struct in_addr *ip"
diff --git a/lib/libvgl/bitmap.c b/lib/libvgl/bitmap.c
index ec99d26..fa130c5 100644
--- a/lib/libvgl/bitmap.c
+++ b/lib/libvgl/bitmap.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1991-1997 Søren Schmidt
+ * Copyright (c) 1991-1997 Søren Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/lib/libvgl/keyboard.c b/lib/libvgl/keyboard.c
index 5c437ad..9811650 100644
--- a/lib/libvgl/keyboard.c
+++ b/lib/libvgl/keyboard.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1997 Søren Schmidt
+ * Copyright (c) 1997 Søren Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/lib/libvgl/main.c b/lib/libvgl/main.c
index 8506a1b..964d355 100644
--- a/lib/libvgl/main.c
+++ b/lib/libvgl/main.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1991-1997 Søren Schmidt
+ * Copyright (c) 1991-1997 Søren Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/lib/libvgl/mouse.c b/lib/libvgl/mouse.c
index 4f9dc62..7d9465b 100644
--- a/lib/libvgl/mouse.c
+++ b/lib/libvgl/mouse.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1991-1997 Søren Schmidt
+ * Copyright (c) 1991-1997 Søren Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/lib/libvgl/simple.c b/lib/libvgl/simple.c
index 09ca9b0..4ca90fc 100644
--- a/lib/libvgl/simple.c
+++ b/lib/libvgl/simple.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1991-1997 Søren Schmidt
+ * Copyright (c) 1991-1997 Søren Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -198,36 +198,205 @@ get_planar:
return 0; /* XXX black? */
}
+ /*
+ * Symmetric Double Step Line Algorithm by Brian Wyvill from
+ * "Graphics Gems", Academic Press, 1990.
+ */
+
+#define SL_SWAP(a,b) {a^=b; b^=a; a^=b;}
+#define SL_ABSOLUTE(i,j,k) ( (i-j)*(k = ( (i-j)<0 ? -1 : 1)))
+
+void
+plot(VGLBitmap * object, int x, int y, int flag, byte color)
+{
+ /* non-zero flag indicates the pixels need swapping back. */
+ if (flag)
+ VGLSetXY(object, y, x, color);
+ else
+ VGLSetXY(object, x, y, color);
+}
+
+
void
VGLLine(VGLBitmap *object, int x1, int y1, int x2, int y2, u_long color)
{
- int d, x, y, ax, ay, sx, sy, dx, dy;
+ int dx, dy, incr1, incr2, D, x, y, xend, c, pixels_left;
+ int sign_x, sign_y, step, reverse, i;
+
+ dx = SL_ABSOLUTE(x2, x1, sign_x);
+ dy = SL_ABSOLUTE(y2, y1, sign_y);
+ /* decide increment sign by the slope sign */
+ if (sign_x == sign_y)
+ step = 1;
+ else
+ step = -1;
+
+ if (dy > dx) { /* chooses axis of greatest movement (make dx) */
+ SL_SWAP(x1, y1);
+ SL_SWAP(x2, y2);
+ SL_SWAP(dx, dy);
+ reverse = 1;
+ } else
+ reverse = 0;
+ /* note error check for dx==0 should be included here */
+ if (x1 > x2) { /* start from the smaller coordinate */
+ x = x2;
+ y = y2;
+/* x1 = x1;
+ y1 = y1; */
+ } else {
+ x = x1;
+ y = y1;
+ x1 = x2;
+ y1 = y2;
+ }
- dx = x2-x1; ax = ABS(dx)<<1; sx = SGN(dx); x = x1;
- dy = y2-y1; ay = ABS(dy)<<1; sy = SGN(dy); y = y1;
- if (ax>ay) { /* x dominant */
- d = ay-(ax>>1);
- for (;;) {
- VGLSetXY(object, x, y, color);
- if (x==x2)
- break;
- if (d>=0) {
- y += sy; d -= ax;
+ /* Note dx=n implies 0 - n or (dx+1) pixels to be set */
+ /* Go round loop dx/4 times then plot last 0,1,2 or 3 pixels */
+ /* In fact (dx-1)/4 as 2 pixels are already plotted */
+ xend = (dx - 1) / 4;
+ pixels_left = (dx - 1) % 4; /* number of pixels left over at the
+ * end */
+ plot(object, x, y, reverse, color);
+ if (pixels_left < 0)
+ return; /* plot only one pixel for zero length
+ * vectors */
+ plot(object, x1, y1, reverse, color); /* plot first two points */
+ incr2 = 4 * dy - 2 * dx;
+ if (incr2 < 0) { /* slope less than 1/2 */
+ c = 2 * dy;
+ incr1 = 2 * c;
+ D = incr1 - dx;
+
+ for (i = 0; i < xend; i++) { /* plotting loop */
+ ++x;
+ --x1;
+ if (D < 0) {
+ /* pattern 1 forwards */
+ plot(object, x, y, reverse, color);
+ plot(object, ++x, y, reverse, color);
+ /* pattern 1 backwards */
+ plot(object, x1, y1, reverse, color);
+ plot(object, --x1, y1, reverse, color);
+ D += incr1;
+ } else {
+ if (D < c) {
+ /* pattern 2 forwards */
+ plot(object, x, y, reverse, color);
+ plot(object, ++x, y += step, reverse,
+ color);
+ /* pattern 2 backwards */
+ plot(object, x1, y1, reverse, color);
+ plot(object, --x1, y1 -= step, reverse,
+ color);
+ } else {
+ /* pattern 3 forwards */
+ plot(object, x, y += step, reverse, color);
+ plot(object, ++x, y, reverse, color);
+ /* pattern 3 backwards */
+ plot(object, x1, y1 -= step, reverse,
+ color);
+ plot(object, --x1, y1, reverse, color);
+ }
+ D += incr2;
}
- x += sx; d += ay;
- }
+ } /* end for */
+
+ /* plot last pattern */
+ if (pixels_left) {
+ if (D < 0) {
+ plot(object, ++x, y, reverse, color); /* pattern 1 */
+ if (pixels_left > 1)
+ plot(object, ++x, y, reverse, color);
+ if (pixels_left > 2)
+ plot(object, --x1, y1, reverse, color);
+ } else {
+ if (D < c) {
+ plot(object, ++x, y, reverse, color); /* pattern 2 */
+ if (pixels_left > 1)
+ plot(object, ++x, y += step, reverse, color);
+ if (pixels_left > 2)
+ plot(object, --x1, y1, reverse, color);
+ } else {
+ /* pattern 3 */
+ plot(object, ++x, y += step, reverse, color);
+ if (pixels_left > 1)
+ plot(object, ++x, y, reverse, color);
+ if (pixels_left > 2)
+ plot(object, --x1, y1 -= step, reverse, color);
+ }
+ }
+ } /* end if pixels_left */
}
- else { /* y dominant */
- d = ax-(ay>>1);
- for (;;) {
- VGLSetXY(object, x, y, color);
- if (y==y2)
- break;
- if (d>=0) {
- x += sx; d -= ay;
+ /* end slope < 1/2 */
+ else { /* slope greater than 1/2 */
+ c = 2 * (dy - dx);
+ incr1 = 2 * c;
+ D = incr1 + dx;
+ for (i = 0; i < xend; i++) {
+ ++x;
+ --x1;
+ if (D > 0) {
+ /* pattern 4 forwards */
+ plot(object, x, y += step, reverse, color);
+ plot(object, ++x, y += step, reverse, color);
+ /* pattern 4 backwards */
+ plot(object, x1, y1 -= step, reverse, color);
+ plot(object, --x1, y1 -= step, reverse, color);
+ D += incr1;
+ } else {
+ if (D < c) {
+ /* pattern 2 forwards */
+ plot(object, x, y, reverse, color);
+ plot(object, ++x, y += step, reverse,
+ color);
+
+ /* pattern 2 backwards */
+ plot(object, x1, y1, reverse, color);
+ plot(object, --x1, y1 -= step, reverse,
+ color);
+ } else {
+ /* pattern 3 forwards */
+ plot(object, x, y += step, reverse, color);
+ plot(object, ++x, y, reverse, color);
+ /* pattern 3 backwards */
+ plot(object, x1, y1 -= step, reverse, color);
+ plot(object, --x1, y1, reverse, color);
+ }
+ D += incr2;
+ }
+ } /* end for */
+ /* plot last pattern */
+ if (pixels_left) {
+ if (D > 0) {
+ plot(object, ++x, y += step, reverse, color); /* pattern 4 */
+ if (pixels_left > 1)
+ plot(object, ++x, y += step, reverse,
+ color);
+ if (pixels_left > 2)
+ plot(object, --x1, y1 -= step, reverse,
+ color);
+ } else {
+ if (D < c) {
+ plot(object, ++x, y, reverse, color); /* pattern 2 */
+ if (pixels_left > 1)
+ plot(object, ++x, y += step, reverse, color);
+ if (pixels_left > 2)
+ plot(object, --x1, y1, reverse, color);
+ } else {
+ /* pattern 3 */
+ plot(object, ++x, y += step, reverse, color);
+ if (pixels_left > 1)
+ plot(object, ++x, y, reverse, color);
+ if (pixels_left > 2) {
+ if (D > c) /* step 3 */
+ plot(object, --x1, y1 -= step, reverse, color);
+ else /* step 2 */
+ plot(object, --x1, y1, reverse, color);
+ }
+ }
}
- y += sy; d += ax;
}
}
}
diff --git a/lib/libvgl/text.c b/lib/libvgl/text.c
index 757702f..02ee420 100644
--- a/lib/libvgl/text.c
+++ b/lib/libvgl/text.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1991-1997 Søren Schmidt
+ * Copyright (c) 1991-1997 Søren Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/lib/libvgl/vgl.3 b/lib/libvgl/vgl.3
index ca628f7..b105ab3 100644
--- a/lib/libvgl/vgl.3
+++ b/lib/libvgl/vgl.3
@@ -1,4 +1,5 @@
-.\" Copyright (c) 1997 Søren Schmidt
+.\"-
+.\" Copyright (c) 1997 Søren Schmidt
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
diff --git a/lib/libvgl/vgl.h b/lib/libvgl/vgl.h
index 1b84382..742a903 100644
--- a/lib/libvgl/vgl.h
+++ b/lib/libvgl/vgl.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1991-1997 Søren Schmidt
+ * Copyright (c) 1991-1997 Søren Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/lib/msun/Makefile b/lib/msun/Makefile
index f1385f1..0646dc0 100644
--- a/lib/msun/Makefile
+++ b/lib/msun/Makefile
@@ -125,7 +125,7 @@ XRINT_CFLAGS:= ${.IMPSRC:M*/s_nearbyint.c:C/^.+$/${XRINT_CFLAGS}/:C/^$//}
SRCS= ${COMMON_SRCS} ${ARCH_SRCS}
-INCS= fenv.h math.h
+INCS+= fenv.h math.h
MAN= acos.3 acosh.3 asin.3 asinh.3 atan.3 atan2.3 atanh.3 \
ceil.3 ccos.3 ccosh.3 cexp.3 \
diff --git a/lib/msun/arm/Symbol.map b/lib/msun/arm/Symbol.map
index 971112e..c43d8cf 100644
--- a/lib/msun/arm/Symbol.map
+++ b/lib/msun/arm/Symbol.map
@@ -5,8 +5,13 @@ FBSD_1.0 {
};
FBSD_1.3 {
+ feclearexcept;
+ fegetexceptflag;
fesetexceptflag;
feraiseexcept;
+ fetestexcept;
+ fegetround;
+ fesetround;
fegetenv;
feholdexcept;
feupdateenv;
diff --git a/lib/msun/arm/fenv.c b/lib/msun/arm/fenv.c
index a5a5c03..c94f9b4 100644
--- a/lib/msun/arm/fenv.c
+++ b/lib/msun/arm/fenv.c
@@ -29,6 +29,20 @@
#define __fenv_static
#include "fenv.h"
+/*
+ * The following macros map between the softfloat emulator's flags and
+ * the hardware's FPSR. The hardware this file was written for doesn't
+ * have rounding control bits, so we stick those in the system ID byte.
+ */
+#define __set_env(env, flags, mask, rnd) env = ((flags) \
+ | (mask)<<_FPUSW_SHIFT \
+ | (rnd) << 24)
+#define __env_flags(env) ((env) & FE_ALL_EXCEPT)
+#define __env_mask(env) (((env) >> _FPUSW_SHIFT) \
+ & FE_ALL_EXCEPT)
+#define __env_round(env) (((env) >> 24) & _ROUND_MASK)
+#include "fenv-softfloat.h"
+
#ifdef __GNUC_GNU_INLINE__
#error "This file must be compiled with C99 'inline' semantics"
#endif
diff --git a/lib/msun/arm/fenv.h b/lib/msun/arm/fenv.h
index f114998..e245fb0 100644
--- a/lib/msun/arm/fenv.h
+++ b/lib/msun/arm/fenv.h
@@ -64,13 +64,24 @@ extern const fenv_t __fe_dfl_env;
#define _FPUSW_SHIFT 16
#define _ENABLE_MASK (FE_ALL_EXCEPT << _FPUSW_SHIFT)
-#ifdef ARM_HARD_FLOAT
+#ifndef ARM_HARD_FLOAT
+
+int feclearexcept(int __excepts);
+int fegetexceptflag(fexcept_t *__flagp, int __excepts);
+int fesetexceptflag(const fexcept_t *__flagp, int __excepts);
+int feraiseexcept(int __excepts);
+int fetestexcept(int __excepts);
+int fegetround(void);
+int fesetround(int __round);
+int fegetenv(fenv_t *__envp);
+int feholdexcept(fenv_t *__envp);
+int fesetenv(const fenv_t *__envp);
+int feupdateenv(const fenv_t *__envp);
+
+#else /* ARM_HARD_FLOAT */
+
#define __rfs(__fpsr) __asm __volatile("rfs %0" : "=r" (*(__fpsr)))
#define __wfs(__fpsr) __asm __volatile("wfs %0" : : "r" (__fpsr))
-#else
-#define __rfs(__fpsr)
-#define __wfs(__fpsr)
-#endif
__fenv_static inline int
feclearexcept(int __excepts)
@@ -218,6 +229,8 @@ fegetexcept(void)
#endif /* __BSD_VISIBLE */
+#endif /* ARM_HARD_FLOAT */
+
__END_DECLS
#endif /* !_FENV_H_ */
diff --git a/lib/msun/src/fenv-softfloat.h b/lib/msun/src/fenv-softfloat.h
new file mode 100644
index 0000000..02d2a2c
--- /dev/null
+++ b/lib/msun/src/fenv-softfloat.h
@@ -0,0 +1,184 @@
+/*-
+ * Copyright (c) 2004-2011 David Schultz <das@FreeBSD.ORG>
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _FENV_H_
+#error "This file is meant to be included only by <fenv.h>."
+#endif
+
+/*
+ * This file implements the functionality of <fenv.h> on platforms that
+ * lack an FPU and use softfloat in libc for floating point. To use it,
+ * you must write an <fenv.h> that provides the following:
+ *
+ * - a typedef for fenv_t, which may be an integer or struct type
+ * - a typedef for fexcept_t (XXX This file assumes fexcept_t is a
+ * simple integer type containing the exception mask.)
+ * - definitions of FE_* constants for the five exceptions and four
+ * rounding modes in IEEE 754, as described in fenv(3)
+ * - a definition, and the corresponding external symbol, for FE_DFL_ENV
+ * - a macro __set_env(env, flags, mask, rnd), which sets the given fenv_t
+ * from the exception flags, mask, and rounding mode
+ * - macros __env_flags(env), __env_mask(env), and __env_round(env), which
+ * extract fields from an fenv_t
+ * - a definition of __fenv_static
+ *
+ * If the architecture supports an optional FPU, it's recommended that you
+ * define fenv_t and fexcept_t to match the hardware ABI. Otherwise, it
+ * doesn't matter how you define them.
+ */
+
+extern int __softfloat_float_exception_flags;
+extern int __softfloat_float_exception_mask;
+extern int __softfloat_float_rounding_mode;
+void __softfloat_float_raise(int);
+
+__fenv_static inline int
+feclearexcept(int __excepts)
+{
+
+ __softfloat_float_exception_flags &= ~__excepts;
+ return (0);
+}
+
+__fenv_static inline int
+fegetexceptflag(fexcept_t *__flagp, int __excepts)
+{
+
+ *__flagp = __softfloat_float_exception_flags & __excepts;
+ return (0);
+}
+
+__fenv_static inline int
+fesetexceptflag(const fexcept_t *__flagp, int __excepts)
+{
+
+ __softfloat_float_exception_flags &= ~__excepts;
+ __softfloat_float_exception_flags |= *__flagp & __excepts;
+ return (0);
+}
+
+__fenv_static inline int
+feraiseexcept(int __excepts)
+{
+
+ __softfloat_float_raise(__excepts);
+ return (0);
+}
+
+__fenv_static inline int
+fetestexcept(int __excepts)
+{
+
+ return (__softfloat_float_exception_flags & __excepts);
+}
+
+__fenv_static inline int
+fegetround(void)
+{
+
+ return (__softfloat_float_rounding_mode);
+}
+
+__fenv_static inline int
+fesetround(int __round)
+{
+
+ __softfloat_float_rounding_mode = __round;
+ return (0);
+}
+
+__fenv_static inline int
+fegetenv(fenv_t *__envp)
+{
+
+ __set_env(*__envp, __softfloat_float_exception_flags,
+ __softfloat_float_exception_mask, __softfloat_float_rounding_mode);
+ return (0);
+}
+
+__fenv_static inline int
+feholdexcept(fenv_t *__envp)
+{
+ fenv_t __env;
+
+ fegetenv(__envp);
+ __softfloat_float_exception_flags = 0;
+ __softfloat_float_exception_mask = 0;
+ return (0);
+}
+
+__fenv_static inline int
+fesetenv(const fenv_t *__envp)
+{
+
+ __softfloat_float_exception_flags = __env_flags(*__envp);
+ __softfloat_float_exception_mask = __env_mask(*__envp);
+ __softfloat_float_rounding_mode = __env_round(*__envp);
+ return (0);
+}
+
+__fenv_static inline int
+feupdateenv(const fenv_t *__envp)
+{
+ int __oflags = __softfloat_float_exception_flags;
+
+ fesetenv(__envp);
+ feraiseexcept(__oflags);
+ return (0);
+}
+
+#if __BSD_VISIBLE
+
+/* We currently provide no external definitions of the functions below. */
+
+static inline int
+feenableexcept(int __mask)
+{
+ int __omask = __softfloat_float_exception_mask;
+
+ __softfloat_float_exception_mask |= __mask;
+ return (__omask);
+}
+
+static inline int
+fedisableexcept(int __mask)
+{
+ int __omask = __softfloat_float_exception_mask;
+
+ __softfloat_float_exception_mask &= ~__mask;
+ return (__omask);
+}
+
+static inline int
+fegetexcept(void)
+{
+
+ return (__softfloat_float_exception_mask);
+}
+
+#endif /* __BSD_VISIBLE */
diff --git a/lib/msun/src/k_expf.c b/lib/msun/src/k_expf.c
index a860b9f..548a008 100644
--- a/lib/msun/src/k_expf.c
+++ b/lib/msun/src/k_expf.c
@@ -44,7 +44,7 @@ static const float kln2 = 162.88958740F; /* k * ln2 */
static float
__frexp_expf(float x, int *expt)
{
- double exp_x;
+ float exp_x;
uint32_t hx;
exp_x = expf(x - kln2);
diff --git a/lib/msun/src/s_fabsl.c b/lib/msun/src/s_fabsl.c
index f150ddd..283875e 100644
--- a/lib/msun/src/s_fabsl.c
+++ b/lib/msun/src/s_fabsl.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2003 Dag-Erling Coïdan Smørgrav
+ * Copyright (c) 2003 Dag-Erling Coïdan Smørgrav
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/libexec/bootpd/bootpd.c b/libexec/bootpd/bootpd.c
index b0a49b5..fe9cefa 100644
--- a/libexec/bootpd/bootpd.c
+++ b/libexec/bootpd/bootpd.c
@@ -663,7 +663,7 @@ ignoring request for server %s from client at %s address %s",
bp->bp_op = BOOTREPLY;
if (bp->bp_ciaddr.s_addr == 0) {
/*
- * client doesnt know his IP address,
+ * client doesn't know his IP address,
* search by hardware address.
*/
if (debug > 1) {
@@ -1119,7 +1119,7 @@ sendreply(forward, dst_override)
/*
* This call checks read access to a file. It returns 0 if the file given
- * by "path" exists and is publically readable. A value of -1 is returned if
+ * by "path" exists and is publicly readable. A value of -1 is returned if
* access is not permitted or an error occurs. Successful calls also
* return the file size in bytes using the long pointer "filesize".
*
diff --git a/libexec/bootpd/bootpgw/bootpgw.c b/libexec/bootpd/bootpgw/bootpgw.c
index f180fd6..16bb66b 100644
--- a/libexec/bootpd/bootpgw/bootpgw.c
+++ b/libexec/bootpd/bootpgw/bootpgw.c
@@ -452,7 +452,7 @@ main(argc, argv)
}
if (!(readfds & (1 << s))) {
report(LOG_INFO, "exiting after %ld minutes of inactivity",
- actualtimeout.tv_sec / 60);
+ (long)(actualtimeout.tv_sec / 60));
exit(0);
}
ra_len = sizeof(recv_addr);
@@ -534,7 +534,7 @@ handle_request()
/* Has this packet hopped too many times? */
hops = bp->bp_hops;
if (++hops > maxhops) {
- report(LOG_NOTICE, "reqest from %s reached hop limit",
+ report(LOG_NOTICE, "request from %s reached hop limit",
inet_ntoa(recv_addr.sin_addr));
return;
}
diff --git a/libexec/bootpd/hash.h b/libexec/bootpd/hash.h
index 22cdc04..969703d 100644
--- a/libexec/bootpd/hash.h
+++ b/libexec/bootpd/hash.h
@@ -81,7 +81,7 @@ SOFTWARE.
*
* A generalized hash function, hash_HashFunction(), is included
* with this package to make things a little easier. It is not
- * guarenteed to use the best hash algorithm in existence. . . .
+ * guaranteed to use the best hash algorithm in existence. . . .
*/
diff --git a/libexec/bootpd/tools/bootptest/bootptest.c b/libexec/bootpd/tools/bootptest/bootptest.c
index 0490987..bf27470 100644
--- a/libexec/bootpd/tools/bootptest/bootptest.c
+++ b/libexec/bootpd/tools/bootptest/bootptest.c
@@ -186,7 +186,7 @@ main(argc, argv)
break;
switch (argv[0][1]) {
- case 'f': /* File name to reqest. */
+ case 'f': /* File name to request. */
if (argc < 2)
goto error;
argc--; argv++;
diff --git a/libexec/bootpd/tools/bootptest/print-bootp.c b/libexec/bootpd/tools/bootptest/print-bootp.c
index 9ea450e..eb474d3 100644
--- a/libexec/bootpd/tools/bootptest/print-bootp.c
+++ b/libexec/bootpd/tools/bootptest/print-bootp.c
@@ -187,7 +187,7 @@ bootp_print(bp, length, sport, dport)
/*
* Option description data follows.
- * These are decribed in: RFC-1048, RFC-1395, RFC-1497, RFC-1533
+ * These are described in: RFC-1048, RFC-1395, RFC-1497, RFC-1533
*
* The first char of each option string encodes the data format:
* ?: unknown
@@ -310,7 +310,7 @@ rfc1048_print(bp, length)
len = *bp++;
if (bp + len > ep) {
/* truncated option */
- printf(" |(%d>%d)", len, ep - bp);
+ printf(" |(%d>%td)", len, ep - bp);
return;
}
/* Print the option value(s). */
diff --git a/libexec/comsat/comsat.c b/libexec/comsat/comsat.c
index 2a0fd3c..d15c2a4 100644
--- a/libexec/comsat/comsat.c
+++ b/libexec/comsat/comsat.c
@@ -68,17 +68,17 @@ static const char rcsid[] =
#include <unistd.h>
#include <utmpx.h>
-int debug = 0;
+static int debug = 0;
#define dsyslog if (debug) syslog
#define MAXIDLE 120
-char hostname[MAXHOSTNAMELEN];
+static char hostname[MAXHOSTNAMELEN];
-void jkfprintf(FILE *, char[], char[], off_t);
-void mailfor(char *);
-void notify(struct utmpx *, char[], off_t, int);
-void reapchildren(int);
+static void jkfprintf(FILE *, char[], char[], off_t);
+static void mailfor(char *);
+static void notify(struct utmpx *, char[], off_t, int);
+static void reapchildren(int);
int
main(int argc __unused, char *argv[] __unused)
@@ -115,13 +115,13 @@ main(int argc __unused, char *argv[] __unused)
}
}
-void
+static void
reapchildren(int signo __unused)
{
while (wait3(NULL, WNOHANG, NULL) > 0);
}
-void
+static void
mailfor(char *name)
{
struct utmpx *utp;
@@ -157,7 +157,7 @@ mailfor(char *name)
static const char *cr;
-void
+static void
notify(struct utmpx *utp, char file[], off_t offset, int folder)
{
FILE *tp;
@@ -219,7 +219,7 @@ notify(struct utmpx *utp, char file[], off_t offset, int folder)
_exit(0);
}
-void
+static void
jkfprintf(FILE *tp, char user[], char file[], off_t offset)
{
unsigned char *cp, ch;
diff --git a/libexec/ftpd/ftpcmd.y b/libexec/ftpd/ftpcmd.y
index 07ece34..f3718ea 100644
--- a/libexec/ftpd/ftpcmd.y
+++ b/libexec/ftpd/ftpcmd.y
@@ -1718,7 +1718,7 @@ exptilde(char *s)
* Avoid expanding to a pathname including '\r' or '\n' in order to
* not disrupt the FTP protocol.
* The expansion found must be unique.
- * Return the result as a malloced string, or NULL if an error occured.
+ * Return the result as a malloced string, or NULL if an error occurred.
*
* Problem: this production is used for all pathname
* processing, but only gives a 550 error reply.
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c
index 5894f3c..00570d6 100644
--- a/libexec/ftpd/ftpd.c
+++ b/libexec/ftpd/ftpd.c
@@ -1562,6 +1562,7 @@ skip:
reply(550, "Can't change root.");
goto bad;
}
+ __FreeBSD_libc_enter_restricted_mode();
} else /* real user w/o chroot */
homedir = pw->pw_dir;
/*
diff --git a/libexec/ftpd/popen.c b/libexec/ftpd/popen.c
index 8a739dc..9f80507 100644
--- a/libexec/ftpd/popen.c
+++ b/libexec/ftpd/popen.c
@@ -143,6 +143,9 @@ ftpd_popen(char *program, char *type)
}
(void)close(pdes[1]);
}
+ /* Drop privileges before proceeding */
+ if (getuid() != geteuid() && setuid(geteuid()) < 0)
+ _exit(1);
if (strcmp(gargv[0], _PATH_LS) == 0) {
/* Reset getopt for ls_main() */
optreset = optind = optopt = 1;
diff --git a/libexec/getty/chat.c b/libexec/getty/chat.c
index 8fb8aad..4817c97 100644
--- a/libexec/getty/chat.c
+++ b/libexec/getty/chat.c
@@ -388,7 +388,7 @@ chat_send(char const *str)
{
int r = 0;
- if (chat_debug && CHATDEBUG_SEND)
+ if (chat_debug & CHATDEBUG_SEND)
syslog(LOG_DEBUG, "chat_send '%s'", cleanstr(str, strlen(str)));
if (*str) {
diff --git a/libexec/getty/init.c b/libexec/getty/init.c
index b832bb2..81384d9 100644
--- a/libexec/getty/init.c
+++ b/libexec/getty/init.c
@@ -64,7 +64,7 @@ struct gettystrs gettystrs[] = {
{ "et", &omode.c_cc[VEOF] }, /* eof chatacter (eot) */
{ "pc", nullstr }, /* pad character */
{ "tt" }, /* terminal type */
- { "ev" }, /* enviroment */
+ { "ev" }, /* environment */
{ "lo", loginprg }, /* login program */
{ "hn", hostname }, /* host name */
{ "he" }, /* host name edit */
diff --git a/libexec/lukemftpd/nbsd_pidfile.h b/libexec/lukemftpd/nbsd_pidfile.h
index 23dbe38..5348770 100644
--- a/libexec/lukemftpd/nbsd_pidfile.h
+++ b/libexec/lukemftpd/nbsd_pidfile.h
@@ -10,7 +10,7 @@ pidfile(const char *basename)
pid_t otherpid, childpid;
if (basename != NULL) {
- errx(EX_USAGE, "Need to impliment NetBSD semantics.");
+ errx(EX_USAGE, "Need to implement NetBSD semantics.");
}
pfh = pidfile_open(basename, 0644, &otherpid);
diff --git a/libexec/mail.local/Makefile b/libexec/mail.local/Makefile
index 3e59609..de490fb 100644
--- a/libexec/mail.local/Makefile
+++ b/libexec/mail.local/Makefile
@@ -12,6 +12,13 @@ CFLAGS+=-I${SENDMAIL_DIR}/include -I.
WARNS?= 2
WFORMAT=0
+.if ${CC:T:Mclang} == "clang"
+# Unfortunately, clang gives warnings about sendmail code that cannot
+# be turned off yet. Since this is contrib code, and we don't really
+# care about the warnings, just make them non-fatal for now.
+NO_WERROR=
+.endif
+
LIBSMDIR= ${.OBJDIR}/../../lib/libsm
LIBSM= ${LIBSMDIR}/libsm.a
diff --git a/libexec/mknetid/parse_group.c b/libexec/mknetid/parse_group.c
index 84cb991..75665dc 100644
--- a/libexec/mknetid/parse_group.c
+++ b/libexec/mknetid/parse_group.c
@@ -114,7 +114,7 @@ grscan(int search, int gid)
return(0);
bp = line;
/* skip lines that are too big */
- if (!index(line, '\n')) {
+ if (!strchr(line, '\n')) {
int ch;
while ((ch = getc(_gr_fp)) != '\n' && ch != EOF)
diff --git a/libexec/pppoed/pppoed.c b/libexec/pppoed/pppoed.c
index f07dd8c..a5c0b7a 100644
--- a/libexec/pppoed/pppoed.c
+++ b/libexec/pppoed/pppoed.c
@@ -570,8 +570,8 @@ main(int argc, char *argv[])
}
exec = (char *)alloca(sizeof DEFAULT_EXEC_PREFIX + strlen(label));
if (exec == NULL) {
- fprintf(stderr, "%s: Cannot allocate %d bytes\n", prog,
- (int)(sizeof DEFAULT_EXEC_PREFIX) + strlen(label));
+ fprintf(stderr, "%s: Cannot allocate %zu bytes\n", prog,
+ sizeof DEFAULT_EXEC_PREFIX + strlen(label));
return EX_OSERR;
}
strcpy(exec, DEFAULT_EXEC_PREFIX);
diff --git a/libexec/rbootd/parseconf.c b/libexec/rbootd/parseconf.c
index 2eb33e0..7151dae 100644
--- a/libexec/rbootd/parseconf.c
+++ b/libexec/rbootd/parseconf.c
@@ -145,7 +145,7 @@ ParseConfig(void)
*/
if ((addr = ParseAddr(bcp)) == NULL) {
syslog(LOG_ERR,
- "ParseConfig: line %d: cant parse <%s>",
+ "ParseConfig: line %d: can't parse <%s>",
linecnt, bcp);
continue;
}
@@ -193,7 +193,7 @@ ParseConfig(void)
/*
* Restricted list of boot files were spec'd,
* however, none of them were found. Since we
- * apparently cant let them boot "just anything",
+ * apparently can't let them boot "just anything",
* the entire record is invalidated.
*/
if (i == 0) {
@@ -355,7 +355,7 @@ GetBootFiles(void)
(void) closedir(dfd); /* close BootDir */
- if (i == 0) /* cant find any boot files */
+ if (i == 0) /* can't find any boot files */
syslog(LOG_ERR, "GetBootFiles: no boot files (%s)\n", BootDir);
return(i);
diff --git a/libexec/rbootd/rbootd.c b/libexec/rbootd/rbootd.c
index e71b1ec..e56a3e7 100644
--- a/libexec/rbootd/rbootd.c
+++ b/libexec/rbootd/rbootd.c
@@ -231,7 +231,7 @@ main(int argc, char *argv[])
r = rset;
- if (RmpConns == NULL) { /* timeout isnt necessary */
+ if (RmpConns == NULL) { /* timeout isn't necessary */
nsel = select(maxfds, &r, NULL, NULL, NULL);
} else {
timeout.tv_sec = RMP_TIMEOUT;
diff --git a/libexec/rbootd/rmpproto.c b/libexec/rbootd/rmpproto.c
index 78c2488..8d51445 100644
--- a/libexec/rbootd/rmpproto.c
+++ b/libexec/rbootd/rmpproto.c
@@ -401,7 +401,7 @@ SendReadRepl(RMPCONN *rconn)
int madeconn = 0;
/*
- * Find the old connection. If one doesnt exist, create one only
+ * Find the old connection. If one doesn't exist, create one only
* to return the error code.
*/
if ((oldconn = FindConn(rconn)) == NULL) {
@@ -515,7 +515,7 @@ BootDone(RMPCONN *rconn)
struct rmp_packet *rpl;
/*
- * If we cant find the connection, ignore the request.
+ * If we can't find the connection, ignore the request.
*/
if ((oldconn = FindConn(rconn)) == NULL) {
syslog(LOG_ERR, "BootDone: no existing connection (%s)",
diff --git a/libexec/rbootd/utils.c b/libexec/rbootd/utils.c
index 138bc4c..d13f123 100644
--- a/libexec/rbootd/utils.c
+++ b/libexec/rbootd/utils.c
@@ -82,8 +82,8 @@ static const char rcsid[] =
void
DispPkt(RMPCONN *rconn, int direct)
{
- static const char BootFmt[] = "\t\tRetCode:%u SeqNo:%lx SessID:%x Vers:%u";
- static const char ReadFmt[] = "\t\tRetCode:%u Offset:%lx SessID:%x\n";
+ static const char BootFmt[] = "\t\tRetCode:%u SeqNo:%x SessID:%x Vers:%u";
+ static const char ReadFmt[] = "\t\tRetCode:%u Offset:%x SessID:%x\n";
struct tm *tmp;
struct rmp_packet *rmp;
@@ -166,7 +166,7 @@ DispPkt(RMPCONN *rconn, int direct)
GETWORD(rmp->r_rrpl.rmp_offset, t);
(void) fprintf(DbgFp, ReadFmt, rmp->r_rrpl.rmp_retcode,
t, ntohs(rmp->r_rrpl.rmp_session));
- (void) fprintf(DbgFp, "\t\tNoOfBytesSent: %d\n",
+ (void) fprintf(DbgFp, "\t\tNoOfBytesSent: %zu\n",
rconn->rmplen - RMPREADSIZE(0));
break;
case RMP_BOOT_DONE: /* boot complete */
diff --git a/libexec/revnetgroup/parse_netgroup.c b/libexec/revnetgroup/parse_netgroup.c
index 67e1b14..a962e72 100644
--- a/libexec/revnetgroup/parse_netgroup.c
+++ b/libexec/revnetgroup/parse_netgroup.c
@@ -199,8 +199,8 @@ parse_netgrp(char *group)
if (lp->l_parsed) {
#ifdef DEBUG
/*
- * This error message is largely superflous since the
- * code handles the error condition sucessfully, and
+ * This error message is largely superfluous since the
+ * code handles the error condition successfully, and
* spewing it out from inside libc can actually hose
* certain programs.
*/
diff --git a/libexec/rlogind/rlogind.c b/libexec/rlogind/rlogind.c
index 2c2c9ef..be92f0f 100644
--- a/libexec/rlogind/rlogind.c
+++ b/libexec/rlogind/rlogind.c
@@ -543,16 +543,17 @@ extern char **environ;
void
setup_term(int fd)
{
- char *cp = index(term+ENVSIZE, '/');
+ char *cp;
char *speed;
struct termios tt, def;
+ cp = strchr(term + ENVSIZE, '/');
#ifndef notyet
tcgetattr(fd, &tt);
if (cp) {
*cp++ = '\0';
speed = cp;
- cp = index(speed, '/');
+ cp = strchr(speed, '/');
if (cp)
*cp++ = '\0';
cfsetspeed(&tt, atoi(speed));
@@ -567,7 +568,7 @@ setup_term(int fd)
if (cp) {
*cp++ = '\0';
speed = cp;
- cp = index(speed, '/');
+ cp = strchr(speed, '/');
if (cp)
*cp++ = '\0';
tcgetattr(fd, &tt);
diff --git a/libexec/rshd/rshd.8 b/libexec/rshd/rshd.8
index bc77108..cd4021a 100644
--- a/libexec/rshd/rshd.8
+++ b/libexec/rshd/rshd.8
@@ -148,7 +148,7 @@ by
The options are as follows:
.Bl -tag -width indent
.It Fl a
-This flag is ignored, and is present for compatability purposes.
+This flag is ignored, and is present for compatibility purposes.
.It Fl D
Sets the TCP_NODELAY socket option, which improves the performance
of small back-to-back writes at the expense of additional network
diff --git a/libexec/rtld-aout/shlib.c b/libexec/rtld-aout/shlib.c
index f2c74a4..5cfa3f3 100644
--- a/libexec/rtld-aout/shlib.c
+++ b/libexec/rtld-aout/shlib.c
@@ -159,7 +159,7 @@ cmpndewey(int d1[], int n1, int d2[], int n2)
if (i == n2)
return 1;
- errx(1, "cmpndewey: cant happen");
+ errx(1, "cmpndewey: can't happen");
return 0;
}
diff --git a/libexec/rtld-elf/Symbol.map b/libexec/rtld-elf/Symbol.map
index 28b24a1..9ad6251 100644
--- a/libexec/rtld-elf/Symbol.map
+++ b/libexec/rtld-elf/Symbol.map
@@ -18,6 +18,10 @@ FBSD_1.0 {
__tls_get_addr;
};
+FBSD_1.3 {
+ fdlopen;
+};
+
FBSDprivate_1.0 {
_rtld_thread_init;
_rtld_allocate_tls;
diff --git a/libexec/rtld-elf/amd64/reloc.c b/libexec/rtld-elf/amd64/reloc.c
index 0bfc4fe..5f40847 100644
--- a/libexec/rtld-elf/amd64/reloc.c
+++ b/libexec/rtld-elf/amd64/reloc.c
@@ -344,11 +344,22 @@ reloc_plt(Obj_Entry *obj)
for (rela = obj->pltrela; rela < relalim; rela++) {
Elf_Addr *where;
- assert(ELF_R_TYPE(rela->r_info) == R_X86_64_JMP_SLOT);
-
- /* Relocate the GOT slot pointing into the PLT. */
- where = (Elf_Addr *)(obj->relocbase + rela->r_offset);
- *where += (Elf_Addr)obj->relocbase;
+ switch(ELF_R_TYPE(rela->r_info)) {
+ case R_X86_64_JMP_SLOT:
+ /* Relocate the GOT slot pointing into the PLT. */
+ where = (Elf_Addr *)(obj->relocbase + rela->r_offset);
+ *where += (Elf_Addr)obj->relocbase;
+ break;
+
+ case R_X86_64_IRELATIVE:
+ obj->irelative = true;
+ break;
+
+ default:
+ _rtld_error("Unknown relocation type %x in PLT",
+ (unsigned int)ELF_R_TYPE(rela->r_info));
+ return (-1);
+ }
}
return 0;
}
@@ -368,19 +379,98 @@ reloc_jmpslots(Obj_Entry *obj, RtldLockState *lockstate)
const Elf_Sym *def;
const Obj_Entry *defobj;
- assert(ELF_R_TYPE(rela->r_info) == R_X86_64_JMP_SLOT);
- where = (Elf_Addr *)(obj->relocbase + rela->r_offset);
- def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, true, NULL,
- lockstate);
- if (def == NULL)
- return -1;
- target = (Elf_Addr)(defobj->relocbase + def->st_value + rela->r_addend);
- reloc_jmpslot(where, target, defobj, obj, (const Elf_Rel *)rela);
+ switch (ELF_R_TYPE(rela->r_info)) {
+ case R_X86_64_JMP_SLOT:
+ where = (Elf_Addr *)(obj->relocbase + rela->r_offset);
+ def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, true, NULL,
+ lockstate);
+ if (def == NULL)
+ return (-1);
+ if (ELF_ST_TYPE(def->st_info) == STT_GNU_IFUNC) {
+ obj->gnu_ifunc = true;
+ continue;
+ }
+ target = (Elf_Addr)(defobj->relocbase + def->st_value + rela->r_addend);
+ reloc_jmpslot(where, target, defobj, obj, (const Elf_Rel *)rela);
+ break;
+
+ case R_X86_64_IRELATIVE:
+ break;
+
+ default:
+ _rtld_error("Unknown relocation type %x in PLT",
+ (unsigned int)ELF_R_TYPE(rela->r_info));
+ return (-1);
+ }
}
obj->jmpslots_done = true;
return 0;
}
+int
+reloc_iresolve(Obj_Entry *obj, RtldLockState *lockstate)
+{
+ const Elf_Rela *relalim;
+ const Elf_Rela *rela;
+
+ if (!obj->irelative)
+ return (0);
+ relalim = (const Elf_Rela *)((char *)obj->pltrela + obj->pltrelasize);
+ for (rela = obj->pltrela; rela < relalim; rela++) {
+ Elf_Addr *where, target, *ptr;
+
+ switch (ELF_R_TYPE(rela->r_info)) {
+ case R_X86_64_JMP_SLOT:
+ break;
+
+ case R_X86_64_IRELATIVE:
+ ptr = (Elf_Addr *)(obj->relocbase + rela->r_addend);
+ where = (Elf_Addr *)(obj->relocbase + rela->r_offset);
+ lock_release(rtld_bind_lock, lockstate);
+ target = ((Elf_Addr (*)(void))ptr)();
+ wlock_acquire(rtld_bind_lock, lockstate);
+ *where = target;
+ break;
+ }
+ }
+ obj->irelative = false;
+ return (0);
+}
+
+int
+reloc_gnu_ifunc(Obj_Entry *obj, RtldLockState *lockstate)
+{
+ const Elf_Rela *relalim;
+ const Elf_Rela *rela;
+
+ if (!obj->gnu_ifunc)
+ return (0);
+ relalim = (const Elf_Rela *)((char *)obj->pltrela + obj->pltrelasize);
+ for (rela = obj->pltrela; rela < relalim; rela++) {
+ Elf_Addr *where, target;
+ const Elf_Sym *def;
+ const Obj_Entry *defobj;
+
+ switch (ELF_R_TYPE(rela->r_info)) {
+ case R_X86_64_JMP_SLOT:
+ where = (Elf_Addr *)(obj->relocbase + rela->r_offset);
+ def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, true, NULL,
+ lockstate);
+ if (def == NULL)
+ return (-1);
+ if (ELF_ST_TYPE(def->st_info) != STT_GNU_IFUNC)
+ continue;
+ lock_release(rtld_bind_lock, lockstate);
+ target = (Elf_Addr)rtld_resolve_ifunc(defobj, def);
+ wlock_acquire(rtld_bind_lock, lockstate);
+ reloc_jmpslot(where, target, defobj, obj, (const Elf_Rel *)rela);
+ break;
+ }
+ }
+ obj->gnu_ifunc = false;
+ return (0);
+}
+
void
allocate_initial_tls(Obj_Entry *objs)
{
@@ -397,10 +487,8 @@ allocate_initial_tls(Obj_Entry *objs)
void *__tls_get_addr(tls_index *ti)
{
Elf_Addr** segbase;
- Elf_Addr* dtv;
__asm __volatile("movq %%fs:0, %0" : "=r" (segbase));
- dtv = segbase[1];
return tls_get_addr_common(&segbase[1], ti->ti_module, ti->ti_offset);
}
diff --git a/libexec/rtld-elf/arm/reloc.c b/libexec/rtld-elf/arm/reloc.c
index 8f83a8e..c0afba9 100644
--- a/libexec/rtld-elf/arm/reloc.c
+++ b/libexec/rtld-elf/arm/reloc.c
@@ -337,6 +337,22 @@ reloc_jmpslots(Obj_Entry *obj, RtldLockState *lockstate)
return (0);
}
+int
+reloc_iresolve(Obj_Entry *obj, struct Struct_RtldLockState *lockstate)
+{
+
+ /* XXX not implemented */
+ return (0);
+}
+
+int
+reloc_gnu_ifunc(Obj_Entry *obj, struct Struct_RtldLockState *lockstate)
+{
+
+ /* XXX not implemented */
+ return (0);
+}
+
Elf_Addr
reloc_jmpslot(Elf_Addr *where, Elf_Addr target, const Obj_Entry *defobj,
const Obj_Entry *obj, const Elf_Rel *rel)
diff --git a/libexec/rtld-elf/i386/reloc.c b/libexec/rtld-elf/i386/reloc.c
index c9a6e53..a2c8c98 100644
--- a/libexec/rtld-elf/i386/reloc.c
+++ b/libexec/rtld-elf/i386/reloc.c
@@ -298,13 +298,24 @@ reloc_plt(Obj_Entry *obj)
rellim = (const Elf_Rel *)((char *)obj->pltrel + obj->pltrelsize);
for (rel = obj->pltrel; rel < rellim; rel++) {
- Elf_Addr *where;
-
- assert(ELF_R_TYPE(rel->r_info) == R_386_JMP_SLOT);
-
- /* Relocate the GOT slot pointing into the PLT. */
- where = (Elf_Addr *)(obj->relocbase + rel->r_offset);
- *where += (Elf_Addr)obj->relocbase;
+ Elf_Addr *where/*, val*/;
+
+ switch (ELF_R_TYPE(rel->r_info)) {
+ case R_386_JMP_SLOT:
+ /* Relocate the GOT slot pointing into the PLT. */
+ where = (Elf_Addr *)(obj->relocbase + rel->r_offset);
+ *where += (Elf_Addr)obj->relocbase;
+ break;
+
+ case R_386_IRELATIVE:
+ obj->irelative = true;
+ break;
+
+ default:
+ _rtld_error("Unknown relocation type %x in PLT",
+ ELF_R_TYPE(rel->r_info));
+ return (-1);
+ }
}
return 0;
}
@@ -324,19 +335,95 @@ reloc_jmpslots(Obj_Entry *obj, RtldLockState *lockstate)
const Elf_Sym *def;
const Obj_Entry *defobj;
- assert(ELF_R_TYPE(rel->r_info) == R_386_JMP_SLOT);
- where = (Elf_Addr *)(obj->relocbase + rel->r_offset);
- def = find_symdef(ELF_R_SYM(rel->r_info), obj, &defobj, true, NULL,
- lockstate);
- if (def == NULL)
- return -1;
- target = (Elf_Addr)(defobj->relocbase + def->st_value);
- reloc_jmpslot(where, target, defobj, obj, rel);
+ switch (ELF_R_TYPE(rel->r_info)) {
+ case R_386_JMP_SLOT:
+ where = (Elf_Addr *)(obj->relocbase + rel->r_offset);
+ def = find_symdef(ELF_R_SYM(rel->r_info), obj, &defobj, true, NULL,
+ lockstate);
+ if (def == NULL)
+ return (-1);
+ if (ELF_ST_TYPE(def->st_info) == STT_GNU_IFUNC) {
+ obj->gnu_ifunc = true;
+ continue;
+ }
+ target = (Elf_Addr)(defobj->relocbase + def->st_value);
+ reloc_jmpslot(where, target, defobj, obj, rel);
+ break;
+
+ case R_386_IRELATIVE:
+ break;
+
+ default:
+ _rtld_error("Unknown relocation type %x in PLT",
+ ELF_R_TYPE(rel->r_info));
+ return (-1);
+ }
}
+
obj->jmpslots_done = true;
return 0;
}
+int
+reloc_iresolve(Obj_Entry *obj, RtldLockState *lockstate)
+{
+ const Elf_Rel *rellim;
+ const Elf_Rel *rel;
+ Elf_Addr *where, target;
+
+ if (!obj->irelative)
+ return (0);
+ rellim = (const Elf_Rel *)((char *)obj->pltrel + obj->pltrelsize);
+ for (rel = obj->pltrel; rel < rellim; rel++) {
+ switch (ELF_R_TYPE(rel->r_info)) {
+ case R_386_IRELATIVE:
+ where = (Elf_Addr *)(obj->relocbase + rel->r_offset);
+ lock_release(rtld_bind_lock, lockstate);
+ target = ((Elf_Addr (*)(void))(obj->relocbase + *where))();
+ wlock_acquire(rtld_bind_lock, lockstate);
+ *where = target;
+ break;
+ }
+ }
+ obj->irelative = false;
+ return (0);
+}
+
+int
+reloc_gnu_ifunc(Obj_Entry *obj, RtldLockState *lockstate)
+{
+ const Elf_Rel *rellim;
+ const Elf_Rel *rel;
+
+ if (!obj->gnu_ifunc)
+ return (0);
+ rellim = (const Elf_Rel *)((char *)obj->pltrel + obj->pltrelsize);
+ for (rel = obj->pltrel; rel < rellim; rel++) {
+ Elf_Addr *where, target;
+ const Elf_Sym *def;
+ const Obj_Entry *defobj;
+
+ switch (ELF_R_TYPE(rel->r_info)) {
+ case R_386_JMP_SLOT:
+ where = (Elf_Addr *)(obj->relocbase + rel->r_offset);
+ def = find_symdef(ELF_R_SYM(rel->r_info), obj, &defobj, true, NULL,
+ lockstate);
+ if (def == NULL)
+ return (-1);
+ if (ELF_ST_TYPE(def->st_info) != STT_GNU_IFUNC)
+ continue;
+ lock_release(rtld_bind_lock, lockstate);
+ target = (Elf_Addr)rtld_resolve_ifunc(defobj, def);
+ wlock_acquire(rtld_bind_lock, lockstate);
+ reloc_jmpslot(where, target, defobj, obj, rel);
+ break;
+ }
+ }
+
+ obj->gnu_ifunc = false;
+ return (0);
+}
+
void
allocate_initial_tls(Obj_Entry *objs)
{
@@ -357,10 +444,8 @@ __attribute__((__regparm__(1)))
void *___tls_get_addr(tls_index *ti)
{
Elf_Addr** segbase;
- Elf_Addr* dtv;
__asm __volatile("movl %%gs:0, %0" : "=r" (segbase));
- dtv = segbase[1];
return tls_get_addr_common(&segbase[1], ti->ti_module, ti->ti_offset);
}
@@ -369,10 +454,8 @@ void *___tls_get_addr(tls_index *ti)
void *__tls_get_addr(tls_index *ti)
{
Elf_Addr** segbase;
- Elf_Addr* dtv;
__asm __volatile("movl %%gs:0, %0" : "=r" (segbase));
- dtv = segbase[1];
return tls_get_addr_common(&segbase[1], ti->ti_module, ti->ti_offset);
}
diff --git a/libexec/rtld-elf/ia64/reloc.c b/libexec/rtld-elf/ia64/reloc.c
index 6ee0947..921e5d4 100644
--- a/libexec/rtld-elf/ia64/reloc.c
+++ b/libexec/rtld-elf/ia64/reloc.c
@@ -435,6 +435,22 @@ reloc_plt(Obj_Entry *obj)
return 0;
}
+int
+reloc_iresolve(Obj_Entry *obj, struct Struct_RtldLockState *lockstate)
+{
+
+ /* XXX not implemented */
+ return (0);
+}
+
+int
+reloc_gnu_ifunc(Obj_Entry *obj, struct Struct_RtldLockState *lockstate)
+{
+
+ /* XXX not implemented */
+ return (0);
+}
+
/* Relocate the jump slots in an object. */
int
reloc_jmpslots(Obj_Entry *obj, RtldLockState *lockstate)
diff --git a/libexec/rtld-elf/mips/reloc.c b/libexec/rtld-elf/mips/reloc.c
index 682adcd..35c732e 100644
--- a/libexec/rtld-elf/mips/reloc.c
+++ b/libexec/rtld-elf/mips/reloc.c
@@ -358,7 +358,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, RtldLockState *lockstate)
def = find_symdef(i, obj, &defobj, false, NULL,
lockstate);
if (def == NULL) {
- dbg("Warning4, cant find symbole %d", i);
+ dbg("Warning4, can't find symbole %d", i);
return -1;
}
*got = def->st_value + (Elf_Addr)defobj->relocbase;
@@ -498,6 +498,22 @@ reloc_jmpslots(Obj_Entry *obj, RtldLockState *lockstate)
return (0);
}
+int
+reloc_iresolve(Obj_Entry *obj, struct Struct_RtldLockState *lockstate)
+{
+
+ /* XXX not implemented */
+ return (0);
+}
+
+int
+reloc_gnu_ifunc(Obj_Entry *obj, struct Struct_RtldLockState *lockstate)
+{
+
+ /* XXX not implemented */
+ return (0);
+}
+
Elf_Addr
reloc_jmpslot(Elf_Addr *where, Elf_Addr target, const Obj_Entry *defobj,
const Obj_Entry *obj, const Elf_Rel *rel)
diff --git a/libexec/rtld-elf/powerpc/reloc.c b/libexec/rtld-elf/powerpc/reloc.c
index 4aca86e..d0637f4 100644
--- a/libexec/rtld-elf/powerpc/reloc.c
+++ b/libexec/rtld-elf/powerpc/reloc.c
@@ -317,6 +317,10 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, RtldLockState *lockstate)
done:
if (cache != NULL)
free(cache);
+
+ /* Synchronize icache for text seg in case we made any changes */
+ __syncicache(obj->mapbase, obj->textsize);
+
return (r);
}
@@ -366,7 +370,7 @@ reloc_plt_object(Obj_Entry *obj, const Elf_Rela *rela)
/*
- * The icache will be sync'd in init_pltgot, which is called
+ * The icache will be sync'd in reloc_plt, which is called
* after all the slots have been updated
*/
@@ -382,6 +386,7 @@ reloc_plt(Obj_Entry *obj)
{
const Elf_Rela *relalim;
const Elf_Rela *rela;
+ int N = obj->pltrelasize / sizeof(Elf_Rela);
if (obj->pltrelasize != 0) {
@@ -396,6 +401,13 @@ reloc_plt(Obj_Entry *obj)
}
}
+ /*
+ * Sync the icache for the byte range represented by the
+ * trampoline routines and call slots.
+ */
+ if (obj->pltgot != NULL)
+ __syncicache(obj->pltgot, JMPTAB_BASE(N)*4);
+
return (0);
}
@@ -504,6 +516,21 @@ reloc_jmpslot(Elf_Addr *wherep, Elf_Addr target, const Obj_Entry *defobj,
return (target);
}
+int
+reloc_iresolve(Obj_Entry *obj, struct Struct_RtldLockState *lockstate)
+{
+
+ /* XXX not implemented */
+ return (0);
+}
+
+int
+reloc_gnu_ifunc(Obj_Entry *obj, struct Struct_RtldLockState *lockstate)
+{
+
+ /* XXX not implemented */
+ return (0);
+}
/*
* Setup the plt glue routines.
@@ -580,10 +607,9 @@ init_pltgot(Obj_Entry *obj)
pltresolve[4] |= _ppc_la(obj);
/*
- * Sync the icache for the byte range represented by the
- * trampoline routines and call slots.
+ * The icache will be sync'd in reloc_plt, which is called
+ * after all the slots have been updated
*/
- __syncicache(obj->pltgot, JMPTAB_BASE(N)*4);
}
void
diff --git a/libexec/rtld-elf/powerpc64/reloc.c b/libexec/rtld-elf/powerpc64/reloc.c
index df14af2..47368a8 100644
--- a/libexec/rtld-elf/powerpc64/reloc.c
+++ b/libexec/rtld-elf/powerpc64/reloc.c
@@ -313,9 +313,12 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, RtldLockState *lockstate)
}
r = 0;
done:
- if (cache) {
+ if (cache)
munmap(cache, bytes);
- }
+
+ /* Synchronize icache for text seg in case we made any changes */
+ __syncicache(obj->mapbase, obj->textsize);
+
return (r);
}
@@ -456,6 +459,22 @@ reloc_jmpslot(Elf_Addr *wherep, Elf_Addr target, const Obj_Entry *defobj,
return (target);
}
+int
+reloc_iresolve(Obj_Entry *obj, struct Struct_RtldLockState *lockstate)
+{
+
+ /* XXX not implemented */
+ return (0);
+}
+
+int
+reloc_gnu_ifunc(Obj_Entry *obj, struct Struct_RtldLockState *lockstate)
+{
+
+ /* XXX not implemented */
+ return (0);
+}
+
void
init_pltgot(Obj_Entry *obj)
{
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
index 0d4e972..c6eea1a 100644
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -83,7 +83,7 @@ static void digest_dynamic2(Obj_Entry *, const Elf_Dyn *, const Elf_Dyn *);
static void digest_dynamic(Obj_Entry *, int);
static Obj_Entry *digest_phdr(const Elf_Phdr *, int, caddr_t, const char *);
static Obj_Entry *dlcheck(void *);
-static Obj_Entry *dlopen_object(const char *name, Obj_Entry *refobj,
+static Obj_Entry *dlopen_object(const char *name, int fd, Obj_Entry *refobj,
int lo_flags, int mode);
static Obj_Entry *do_load_object(int, const char *, char *, struct stat *, int);
static int do_search_info(const Obj_Entry *obj, int, struct dl_serinfo *);
@@ -103,7 +103,7 @@ static void load_filtees(Obj_Entry *, int flags, RtldLockState *);
static void unload_filtees(Obj_Entry *);
static int load_needed_objects(Obj_Entry *, int);
static int load_preload_objects(void);
-static Obj_Entry *load_object(const char *, const Obj_Entry *, int);
+static Obj_Entry *load_object(const char *, int fd, const Obj_Entry *, int);
static void map_stacks_exec(RtldLockState *);
static Obj_Entry *obj_from_addr(const void *);
static void objlist_call_fini(Objlist *, Obj_Entry *, RtldLockState *);
@@ -116,8 +116,11 @@ static void objlist_push_tail(Objlist *, Obj_Entry *);
static void objlist_remove(Objlist *, Obj_Entry *);
static void *path_enumerate(const char *, path_enum_proc, void *);
static int relocate_objects(Obj_Entry *, bool, Obj_Entry *, RtldLockState *);
+static int resolve_objects_ifunc(Obj_Entry *first, bool bind_now,
+ RtldLockState *lockstate);
static int rtld_dirname(const char *, char *);
static int rtld_dirname_abs(const char *, char *);
+static void *rtld_dlopen(const char *name, int fd, int mode);
static void rtld_exit(void);
static char *search_library_path(const char *, const char *);
static const void **get_program_var_addr(const char *, RtldLockState *);
@@ -543,6 +546,11 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entry **objp)
map_stacks_exec(NULL);
+ dbg("resolving ifuncs");
+ if (resolve_objects_ifunc(obj_main,
+ ld_bind_now != NULL && *ld_bind_now != '\0', NULL) == -1)
+ die();
+
wlock_acquire(rtld_bind_lock, &lockstate);
objlist_call_init(&initlist, &lockstate);
objlist_clear(&initlist);
@@ -561,6 +569,17 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entry **objp)
return (func_ptr_type) obj_main->entry;
}
+void *
+rtld_resolve_ifunc(const Obj_Entry *obj, const Elf_Sym *def)
+{
+ void *ptr;
+ Elf_Addr target;
+
+ ptr = (void *)make_function_pointer(def, obj);
+ target = ((Elf_Addr (*)(void))ptr)();
+ return ((void *)target);
+}
+
Elf_Addr
_rtld_bind(Obj_Entry *obj, Elf_Size reloff)
{
@@ -584,8 +603,10 @@ _rtld_bind(Obj_Entry *obj, Elf_Size reloff)
&lockstate);
if (def == NULL)
die();
-
- target = (Elf_Addr)(defobj->relocbase + def->st_value);
+ if (ELF_ST_TYPE(def->st_info) == STT_GNU_IFUNC)
+ target = (Elf_Addr)rtld_resolve_ifunc(defobj, def);
+ else
+ target = (Elf_Addr)(defobj->relocbase + def->st_value);
dbg("\"%s\" in \"%s\" ==> %p in \"%s\"",
defobj->strtab + def->st_name, basename(obj->path),
@@ -1524,7 +1545,7 @@ load_filtee1(Obj_Entry *obj, Needed_Entry *needed, int flags)
{
for (; needed != NULL; needed = needed->next) {
- needed->obj = dlopen_object(obj->strtab + needed->name, obj,
+ needed->obj = dlopen_object(obj->strtab + needed->name, -1, obj,
flags, ((ld_loadfltr || obj->z_loadfltr) ? RTLD_NOW : RTLD_LAZY) |
RTLD_LOCAL);
}
@@ -1548,7 +1569,7 @@ process_needed(Obj_Entry *obj, Needed_Entry *needed, int flags)
Obj_Entry *obj1;
for (; needed != NULL; needed = needed->next) {
- obj1 = needed->obj = load_object(obj->strtab + needed->name, obj,
+ obj1 = needed->obj = load_object(obj->strtab + needed->name, -1, obj,
flags & ~RTLD_LO_NOLOAD);
if (obj1 == NULL && !ld_tracing && (flags & RTLD_LO_FILTEES) == 0)
return (-1);
@@ -1595,7 +1616,7 @@ load_preload_objects(void)
savech = p[len];
p[len] = '\0';
- if (load_object(p, NULL, 0) == NULL)
+ if (load_object(p, -1, NULL, 0) == NULL)
return -1; /* XXX - cleanup */
p[len] = savech;
p += len;
@@ -1605,43 +1626,68 @@ load_preload_objects(void)
return 0;
}
+static const char *
+printable_path(const char *path)
+{
+
+ return (path == NULL ? "<unknown>" : path);
+}
+
/*
- * Load a shared object into memory, if it is not already loaded.
+ * Load a shared object into memory, if it is not already loaded. The
+ * object may be specified by name or by user-supplied file descriptor
+ * fd_u. In the later case, the fd_u descriptor is not closed, but its
+ * duplicate is.
*
* Returns a pointer to the Obj_Entry for the object. Returns NULL
* on failure.
*/
static Obj_Entry *
-load_object(const char *name, const Obj_Entry *refobj, int flags)
+load_object(const char *name, int fd_u, const Obj_Entry *refobj, int flags)
{
Obj_Entry *obj;
- int fd = -1;
+ int fd;
struct stat sb;
char *path;
- for (obj = obj_list->next; obj != NULL; obj = obj->next)
- if (object_match_name(obj, name))
- return obj;
+ if (name != NULL) {
+ for (obj = obj_list->next; obj != NULL; obj = obj->next) {
+ if (object_match_name(obj, name))
+ return (obj);
+ }
- path = find_library(name, refobj);
- if (path == NULL)
- return NULL;
+ path = find_library(name, refobj);
+ if (path == NULL)
+ return (NULL);
+ } else
+ path = NULL;
/*
- * If we didn't find a match by pathname, open the file and check
- * again by device and inode. This avoids false mismatches caused
- * by multiple links or ".." in pathnames.
+ * If we didn't find a match by pathname, or the name is not
+ * supplied, open the file and check again by device and inode.
+ * This avoids false mismatches caused by multiple links or ".."
+ * in pathnames.
*
* To avoid a race, we open the file and use fstat() rather than
* using stat().
*/
- if ((fd = open(path, O_RDONLY)) == -1) {
- _rtld_error("Cannot open \"%s\"", path);
- free(path);
- return NULL;
+ fd = -1;
+ if (fd_u == -1) {
+ if ((fd = open(path, O_RDONLY)) == -1) {
+ _rtld_error("Cannot open \"%s\"", path);
+ free(path);
+ return (NULL);
+ }
+ } else {
+ fd = dup(fd_u);
+ if (fd == -1) {
+ _rtld_error("Cannot dup fd");
+ free(path);
+ return (NULL);
+ }
}
if (fstat(fd, &sb) == -1) {
- _rtld_error("Cannot fstat \"%s\"", path);
+ _rtld_error("Cannot fstat \"%s\"", printable_path(path));
close(fd);
free(path);
return NULL;
@@ -1649,7 +1695,7 @@ load_object(const char *name, const Obj_Entry *refobj, int flags)
for (obj = obj_list->next; obj != NULL; obj = obj->next)
if (obj->ino == sb.st_ino && obj->dev == sb.st_dev)
break;
- if (obj != NULL) {
+ if (obj != NULL && name != NULL) {
object_add_name(obj, name);
free(path);
close(fd);
@@ -1683,20 +1729,25 @@ do_load_object(int fd, const char *name, char *path, struct stat *sbp,
*/
if (dangerous_ld_env) {
if (fstatfs(fd, &fs) != 0) {
- _rtld_error("Cannot fstatfs \"%s\"", path);
- return NULL;
+ _rtld_error("Cannot fstatfs \"%s\"", printable_path(path));
+ return NULL;
}
if (fs.f_flags & MNT_NOEXEC) {
_rtld_error("Cannot execute objects on %s\n", fs.f_mntonname);
return NULL;
}
}
- dbg("loading \"%s\"", path);
- obj = map_object(fd, path, sbp);
+ dbg("loading \"%s\"", printable_path(path));
+ obj = map_object(fd, printable_path(path), sbp);
if (obj == NULL)
return NULL;
- object_add_name(obj, name);
+ /*
+ * If DT_SONAME is present in the object, digest_dynamic2 already
+ * added it to the object names.
+ */
+ if (name != NULL)
+ object_add_name(obj, name);
obj->path = path;
digest_dynamic(obj, 0);
if (obj->z_noopen && (flags & (RTLD_LO_DLOPEN | RTLD_LO_TRACE)) ==
@@ -1944,6 +1995,10 @@ relocate_objects(Obj_Entry *first, bool bind_now, Obj_Entry *rtldobj,
}
}
+
+ /* Set the special PLT or GOT entries. */
+ init_pltgot(obj);
+
/* Process the PLT relocations. */
if (reloc_plt(obj) == -1)
return -1;
@@ -1952,7 +2007,6 @@ relocate_objects(Obj_Entry *first, bool bind_now, Obj_Entry *rtldobj,
if (reloc_jmpslots(obj, lockstate) == -1)
return -1;
-
/*
* Set up the magic number and version in the Obj_Entry. These
* were checked in the crt1.o from the original ElfKit, so we
@@ -1960,12 +2014,55 @@ relocate_objects(Obj_Entry *first, bool bind_now, Obj_Entry *rtldobj,
*/
obj->magic = RTLD_MAGIC;
obj->version = RTLD_VERSION;
-
- /* Set the special PLT or GOT entries. */
- init_pltgot(obj);
}
- return 0;
+ return (0);
+}
+
+/*
+ * The handling of R_MACHINE_IRELATIVE relocations and jumpslots
+ * referencing STT_GNU_IFUNC symbols is postponed till the other
+ * relocations are done. The indirect functions specified as
+ * ifunc are allowed to call other symbols, so we need to have
+ * objects relocated before asking for resolution from indirects.
+ *
+ * The R_MACHINE_IRELATIVE slots are resolved in greedy fashion,
+ * instead of the usual lazy handling of PLT slots. It is
+ * consistent with how GNU does it.
+ */
+static int
+resolve_object_ifunc(Obj_Entry *obj, bool bind_now, RtldLockState *lockstate)
+{
+ if (obj->irelative && reloc_iresolve(obj, lockstate) == -1)
+ return (-1);
+ if ((obj->bind_now || bind_now) && obj->gnu_ifunc &&
+ reloc_gnu_ifunc(obj, lockstate) == -1)
+ return (-1);
+ return (0);
+}
+
+static int
+resolve_objects_ifunc(Obj_Entry *first, bool bind_now, RtldLockState *lockstate)
+{
+ Obj_Entry *obj;
+
+ for (obj = first; obj != NULL; obj = obj->next) {
+ if (resolve_object_ifunc(obj, bind_now, lockstate) == -1)
+ return (-1);
+ }
+ return (0);
+}
+
+static int
+initlist_objects_ifunc(Objlist *list, bool bind_now, RtldLockState *lockstate)
+{
+ Objlist_Entry *elm;
+
+ STAILQ_FOREACH(elm, list, link) {
+ if (resolve_object_ifunc(elm->obj, bind_now, lockstate) == -1)
+ return (-1);
+ }
+ return (0);
}
/*
@@ -2146,6 +2243,20 @@ dllockinit(void *context,
void *
dlopen(const char *name, int mode)
{
+
+ return (rtld_dlopen(name, -1, mode));
+}
+
+void *
+fdlopen(int fd, int mode)
+{
+
+ return (rtld_dlopen(NULL, fd, mode));
+}
+
+static void *
+rtld_dlopen(const char *name, int fd, int mode)
+{
RtldLockState lockstate;
int lo_flags;
@@ -2166,12 +2277,23 @@ dlopen(const char *name, int mode)
if (ld_tracing != NULL)
lo_flags |= RTLD_LO_TRACE;
- return (dlopen_object(name, obj_main, lo_flags,
+ return (dlopen_object(name, fd, obj_main, lo_flags,
mode & (RTLD_MODEMASK | RTLD_GLOBAL)));
}
+static void
+dlopen_cleanup(Obj_Entry *obj)
+{
+
+ obj->dl_refcount--;
+ unref_dag(obj);
+ if (obj->refcount == 0)
+ unload_object(obj);
+}
+
static Obj_Entry *
-dlopen_object(const char *name, Obj_Entry *refobj, int lo_flags, int mode)
+dlopen_object(const char *name, int fd, Obj_Entry *refobj, int lo_flags,
+ int mode)
{
Obj_Entry **old_obj_tail;
Obj_Entry *obj;
@@ -2186,11 +2308,11 @@ dlopen_object(const char *name, Obj_Entry *refobj, int lo_flags, int mode)
old_obj_tail = obj_tail;
obj = NULL;
- if (name == NULL) {
+ if (name == NULL && fd == -1) {
obj = obj_main;
obj->refcount++;
} else {
- obj = load_object(name, refobj, lo_flags);
+ obj = load_object(name, fd, refobj, lo_flags);
}
if (obj) {
@@ -2208,10 +2330,7 @@ dlopen_object(const char *name, Obj_Entry *refobj, int lo_flags, int mode)
goto trace;
if (result == -1 || (relocate_objects(obj, (mode & RTLD_MODEMASK)
== RTLD_NOW, &obj_rtld, &lockstate)) == -1) {
- obj->dl_refcount--;
- unref_dag(obj);
- if (obj->refcount == 0)
- unload_object(obj);
+ dlopen_cleanup(obj);
obj = NULL;
} else {
/* Make list of init functions to call. */
@@ -2245,6 +2364,14 @@ dlopen_object(const char *name, Obj_Entry *refobj, int lo_flags, int mode)
map_stacks_exec(&lockstate);
+ if (initlist_objects_ifunc(&initlist, (mode & RTLD_MODEMASK) == RTLD_NOW,
+ &lockstate) == -1) {
+ objlist_clear(&initlist);
+ dlopen_cleanup(obj);
+ lock_release(rtld_bind_lock, &lockstate);
+ return (NULL);
+ }
+
/* Call the init functions. */
objlist_call_init(&initlist, &lockstate);
objlist_clear(&initlist);
@@ -2376,9 +2503,11 @@ do_dlsym(void *handle, const char *name, void *retaddr, const Ver_Entry *ve,
* the relocated value of the symbol.
*/
if (ELF_ST_TYPE(def->st_info) == STT_FUNC)
- return make_function_pointer(def, defobj);
+ return (make_function_pointer(def, defobj));
+ else if (ELF_ST_TYPE(def->st_info) == STT_GNU_IFUNC)
+ return (rtld_resolve_ifunc(defobj, def));
else
- return defobj->relocbase + def->st_value;
+ return (defobj->relocbase + def->st_value);
}
_rtld_error("Undefined symbol \"%s\"", name);
@@ -2822,6 +2951,8 @@ get_program_var_addr(const char *name, RtldLockState *lockstate)
if (ELF_ST_TYPE(req.sym_out->st_info) == STT_FUNC)
return ((const void **)make_function_pointer(req.sym_out,
req.defobj_out));
+ else if (ELF_ST_TYPE(req.sym_out->st_info) == STT_GNU_IFUNC)
+ return ((const void **)rtld_resolve_ifunc(req.defobj_out, req.sym_out));
else
return ((const void **)(req.defobj_out->relocbase +
req.sym_out->st_value));
@@ -3088,6 +3219,7 @@ symlook_obj1(SymLook *req, const Obj_Entry *obj)
case STT_FUNC:
case STT_NOTYPE:
case STT_OBJECT:
+ case STT_GNU_IFUNC:
if (symp->st_value == 0)
continue;
/* fallthrough */
diff --git a/libexec/rtld-elf/rtld.h b/libexec/rtld-elf/rtld.h
index 36b4bf6..e969d36 100644
--- a/libexec/rtld-elf/rtld.h
+++ b/libexec/rtld-elf/rtld.h
@@ -230,13 +230,15 @@ typedef struct Struct_Obj_Entry {
bool on_fini_list: 1; /* Object is already on fini list. */
bool dag_inited : 1; /* Object has its DAG initialized. */
bool filtees_loaded : 1; /* Filtees loaded */
+ bool irelative : 1; /* Object has R_MACHDEP_IRELATIVE relocs */
+ bool gnu_ifunc : 1; /* Object has references to STT_GNU_IFUNC */
struct link_map linkmap; /* For GDB and dlinfo() */
Objlist dldags; /* Object belongs to these dlopened DAGs (%) */
Objlist dagmembers; /* DAG has these members (%) */
dev_t dev; /* Object's filesystem's device */
ino_t ino; /* Object's inode number */
- void *priv; /* Platform-dependant */
+ void *priv; /* Platform-dependent */
} Obj_Entry;
#define RTLD_MAGIC 0xd550b87a
@@ -317,6 +319,7 @@ void lockdflt_init(void);
void obj_free(Obj_Entry *);
Obj_Entry *obj_new(void);
void _rtld_bind_start(void);
+void *rtld_resolve_ifunc(const Obj_Entry *obj, const Elf_Sym *def);
void symlook_init(SymLook *, const char *);
int symlook_obj(SymLook *, const Obj_Entry *);
void *tls_get_addr_common(Elf_Addr** dtvp, int index, size_t offset);
@@ -334,6 +337,8 @@ int do_copy_relocations(Obj_Entry *);
int reloc_non_plt(Obj_Entry *, Obj_Entry *, struct Struct_RtldLockState *);
int reloc_plt(Obj_Entry *);
int reloc_jmpslots(Obj_Entry *, struct Struct_RtldLockState *);
+int reloc_iresolve(Obj_Entry *, struct Struct_RtldLockState *);
+int reloc_gnu_ifunc(Obj_Entry *, struct Struct_RtldLockState *);
void allocate_initial_tls(Obj_Entry *);
#endif /* } */
diff --git a/libexec/rtld-elf/sparc64/reloc.c b/libexec/rtld-elf/sparc64/reloc.c
index 4cb2bca..4ab0eae 100644
--- a/libexec/rtld-elf/sparc64/reloc.c
+++ b/libexec/rtld-elf/sparc64/reloc.c
@@ -550,6 +550,22 @@ reloc_jmpslots(Obj_Entry *obj, RtldLockState *lockstate)
return (0);
}
+int
+reloc_iresolve(Obj_Entry *obj, struct Struct_RtldLockState *lockstate)
+{
+
+ /* XXX not implemented */
+ return (0);
+}
+
+int
+reloc_gnu_ifunc(Obj_Entry *obj, struct Struct_RtldLockState *lockstate)
+{
+
+ /* XXX not implemented */
+ return (0);
+}
+
Elf_Addr
reloc_jmpslot(Elf_Addr *wherep, Elf_Addr target, const Obj_Entry *obj,
const Obj_Entry *refobj, const Elf_Rel *rel)
@@ -607,7 +623,7 @@ reloc_jmpslot(Elf_Addr *wherep, Elf_Addr target, const Obj_Entry *obj,
flush(where, 4);
} else if (target >= 0 && target < (1L<<32)) {
/*
- * We're withing 32-bits of address zero.
+ * We're within 32-bits of address zero.
*
* The resulting code in the jump slot is:
*
@@ -627,7 +643,7 @@ reloc_jmpslot(Elf_Addr *wherep, Elf_Addr target, const Obj_Entry *obj,
flush(where, 4);
} else if (target <= 0 && target > -(1L<<32)) {
/*
- * We're withing 32-bits of address -1.
+ * We're within 32-bits of address -1.
*
* The resulting code in the jump slot is:
*
@@ -649,7 +665,7 @@ reloc_jmpslot(Elf_Addr *wherep, Elf_Addr target, const Obj_Entry *obj,
flush(where, 4);
} else if (offset <= (1L<<32) && offset >= -((1L<<32) - 4)) {
/*
- * We're withing 32-bits -- we can use a direct call
+ * We're within 32-bits -- we can use a direct call
* insn
*
* The resulting code in the jump slot is:
@@ -672,7 +688,7 @@ reloc_jmpslot(Elf_Addr *wherep, Elf_Addr target, const Obj_Entry *obj,
flush(where, 4);
} else if (offset >= 0 && offset < (1L<<44)) {
/*
- * We're withing 44 bits. We can generate this
+ * We're within 44 bits. We can generate this
* pattern:
*
* The resulting code in the jump slot is:
@@ -697,7 +713,7 @@ reloc_jmpslot(Elf_Addr *wherep, Elf_Addr target, const Obj_Entry *obj,
flush(where, 4);
} else if (offset < 0 && offset > -(1L<<44)) {
/*
- * We're withing 44 bits. We can generate this
+ * We're within 44 bits. We can generate this
* pattern:
*
* The resulting code in the jump slot is:
diff --git a/libexec/smrsh/Makefile b/libexec/smrsh/Makefile
index ae86155..7080fba 100644
--- a/libexec/smrsh/Makefile
+++ b/libexec/smrsh/Makefile
@@ -17,6 +17,13 @@ LDADD= ${LIBSM}
WARNS?= 2
+.if ${CC:T:Mclang} == "clang"
+# Unfortunately, clang gives warnings about sendmail code that cannot
+# be turned off yet. Since this is contrib code, and we don't really
+# care about the warnings, just make them non-fatal for now.
+NO_WERROR=
+.endif
+
SRCS+= sm_os.h
CLEANFILES+=sm_os.h
diff --git a/libexec/tftpd/tftp-io.c b/libexec/tftpd/tftp-io.c
index 17eabcb..bc5379c 100644
--- a/libexec/tftpd/tftp-io.c
+++ b/libexec/tftpd/tftp-io.c
@@ -72,13 +72,13 @@ struct errmsg {
#define DROPPACKET(s) \
if (packetdroppercentage != 0 && \
random()%100 < packetdroppercentage) { \
- tftp_log(LOG_DEBUG, "Artifical packet drop in %s", s); \
+ tftp_log(LOG_DEBUG, "Artificial packet drop in %s", s); \
return; \
}
#define DROPPACKETn(s,n) \
if (packetdroppercentage != 0 && \
random()%100 < packetdroppercentage) { \
- tftp_log(LOG_DEBUG, "Artifical packet drop in %s", s); \
+ tftp_log(LOG_DEBUG, "Artificial packet drop in %s", s); \
return (n); \
}
@@ -323,7 +323,6 @@ send_ack(int fp, uint16_t block)
{
struct tftphdr *tp;
int size;
- char *bp;
char buf[MAXPKTSIZE];
if (debug&DEBUG_PACKETS)
@@ -332,7 +331,6 @@ send_ack(int fp, uint16_t block)
DROPPACKETn("send_ack", 0);
tp = (struct tftphdr *)buf;
- bp = buf + 2;
size = sizeof(buf) - 2;
tp->th_opcode = htons((u_short)ACK);
tp->th_block = htons((u_short)block);
diff --git a/libexec/tftpd/tftp-utils.h b/libexec/tftpd/tftp-utils.h
index a789252..0468612 100644
--- a/libexec/tftpd/tftp-utils.h
+++ b/libexec/tftpd/tftp-utils.h
@@ -36,11 +36,11 @@ __FBSDID("$FreeBSD$");
#define MAXPKTSIZE (MAXSEGSIZE + 4) /* Maximum size of the packet */
/* For the blksize option */
-#define BLKSIZE_MIN 8 /* Minumum size of the data segment */
+#define BLKSIZE_MIN 8 /* Minimum size of the data segment */
#define BLKSIZE_MAX MAXSEGSIZE /* Maximum size of the data segment */
/* For the timeout option */
-#define TIMEOUT_MIN 0 /* Minumum timeout value */
+#define TIMEOUT_MIN 0 /* Minimum timeout value */
#define TIMEOUT_MAX 255 /* Maximum timeout value */
#define MIN_TIMEOUTS 3
diff --git a/libexec/ypxfr/ypxfr_getmap.c b/libexec/ypxfr/ypxfr_getmap.c
index 452b186..4b8794f 100644
--- a/libexec/ypxfr/ypxfr_getmap.c
+++ b/libexec/ypxfr/ypxfr_getmap.c
@@ -73,7 +73,7 @@ ypxfr_get_map(char *map, char *domain, char *host,
if ((clnt = clnt_create(host, YPPROG, YPVERS, "tcp")) == NULL) {
yp_error("%s", clnt_spcreateerror("failed to \
create tcp handle"));
- yp_errno = YPXFR_YPERR;
+ yp_errno = (enum ypstat)YPXFR_YPERR;
return(1);
}
@@ -91,7 +91,7 @@ create tcp handle"));
return(0);
if (status != YP_TRUE) {
- yp_errno = YPXFR_YPERR;
+ yp_errno = (enum ypstat)YPXFR_YPERR;
return(1);
}
diff --git a/libexec/ypxfr/ypxfr_main.c b/libexec/ypxfr/ypxfr_main.c
index f6b478a..70fd1f5 100644
--- a/libexec/ypxfr/ypxfr_main.c
+++ b/libexec/ypxfr/ypxfr_main.c
@@ -88,7 +88,7 @@ ypxfr_exit(ypxfrstat retval, char *temp)
exit(1);
}
- ypxfr_resp.status = retval;
+ ypxfr_resp.status = (yppush_status)retval;
if (yppushproc_xfrresp_1(&ypxfr_resp, clnt) == NULL) {
yp_error("%s", clnt_sperror(clnt, "callback failed"));
@@ -329,7 +329,7 @@ the local domain name isn't set");
ypxfr_use_yplib)) == NULL) {
yp_error("failed to find master of %s in domain %s: %s",
ypxfr_mapname, ypxfr_source_domain,
- ypxfrerr_string(yp_errno));
+ ypxfrerr_string((ypxfrstat)yp_errno));
ypxfr_exit(YPXFR_MADDR,NULL);
}
}
@@ -358,7 +358,8 @@ the local domain name isn't set");
ypxfr_master, 0)) == 0) {
yp_error("failed to get order number of %s: %s",
ypxfr_mapname, yp_errno == YPXFR_SUCC ?
- "map has order 0" : ypxfrerr_string(yp_errno));
+ "map has order 0" :
+ ypxfrerr_string((ypxfrstat)yp_errno));
ypxfr_exit(YPXFR_YPERR,NULL);
}
@@ -533,7 +534,8 @@ leave:
ypxfr_master, 0)) == 0) {
yp_error("failed to get order number of %s: %s",
ypxfr_mapname, yp_errno == YPXFR_SUCC ?
- "map has order 0" : ypxfrerr_string(yp_errno));
+ "map has order 0" :
+ ypxfrerr_string((ypxfrstat)yp_errno));
ypxfr_exit(YPXFR_YPERR,ypxfr_temp_map);
}
diff --git a/libexec/ypxfr/ypxfr_misc.c b/libexec/ypxfr/ypxfr_misc.c
index 726abec..323fd53 100644
--- a/libexec/ypxfr/ypxfr_misc.c
+++ b/libexec/ypxfr/ypxfr_misc.c
@@ -130,14 +130,14 @@ ypxfr_get_master(char *domain, char *map, char *source, const int yplib)
if ((res = yp_master(domain, map, &master))) {
switch (res) {
case YPERR_DOMAIN:
- yp_errno = YPXFR_NODOM;
+ yp_errno = (enum ypstat)YPXFR_NODOM;
break;
case YPERR_MAP:
- yp_errno = YPXFR_NOMAP;
+ yp_errno = (enum ypstat)YPXFR_NOMAP;
break;
case YPERR_YPERR:
default:
- yp_errno = YPXFR_YPERR;
+ yp_errno = (enum ypstat)YPXFR_YPERR;
break;
}
return(NULL);
@@ -154,7 +154,7 @@ ypxfr_get_master(char *domain, char *map, char *source, const int yplib)
if ((clnt = clnt_create(source,YPPROG,YPVERS,"udp")) == NULL) {
yp_error("%s",clnt_spcreateerror("failed to \
create udp handle to ypserv"));
- yp_errno = YPXFR_RPC;
+ yp_errno = (enum ypstat)YPXFR_RPC;
return(NULL);
}
@@ -164,21 +164,21 @@ create udp handle to ypserv"));
yp_error("%s",clnt_sperror(clnt,"YPPROC_MASTER \
failed"));
clnt_destroy(clnt);
- yp_errno = YPXFR_RPC;
+ yp_errno = (enum ypstat)YPXFR_RPC;
return(NULL);
}
clnt_destroy(clnt);
if (resp->stat != YP_TRUE) {
switch (resp->stat) {
case YP_NODOM:
- yp_errno = YPXFR_NODOM;
+ yp_errno = (enum ypstat)YPXFR_NODOM;
break;
case YP_NOMAP:
- yp_errno = YPXFR_NOMAP;
+ yp_errno = (enum ypstat)YPXFR_NOMAP;
break;
case YP_YPERR:
default:
- yp_errno = YPXFR_YPERR;
+ yp_errno = (enum ypstat)YPXFR_YPERR;
break;
}
return(NULL);
@@ -198,14 +198,14 @@ ypxfr_get_order(char *domain, char *map, char *source, const int yplib)
if ((res = yp_order(domain, map, &order))) {
switch (res) {
case YPERR_DOMAIN:
- yp_errno = YPXFR_NODOM;
+ yp_errno = (enum ypstat)YPXFR_NODOM;
break;
case YPERR_MAP:
- yp_errno = YPXFR_NOMAP;
+ yp_errno = (enum ypstat)YPXFR_NOMAP;
break;
case YPERR_YPERR:
default:
- yp_errno = YPXFR_YPERR;
+ yp_errno = (enum ypstat)YPXFR_YPERR;
break;
}
return(0);
@@ -219,7 +219,7 @@ ypxfr_get_order(char *domain, char *map, char *source, const int yplib)
if ((clnt = clnt_create(source,YPPROG,YPVERS,"udp")) == NULL) {
yp_error("%s",clnt_spcreateerror("couldn't create \
udp handle to ypserv"));
- yp_errno = YPXFR_RPC;
+ yp_errno = (enum ypstat)YPXFR_RPC;
return(0);
}
req.map = map;
@@ -228,21 +228,21 @@ udp handle to ypserv"));
yp_error("%s", clnt_sperror(clnt, "YPPROC_ORDER \
failed"));
clnt_destroy(clnt);
- yp_errno = YPXFR_RPC;
+ yp_errno = (enum ypstat)YPXFR_RPC;
return(0);
}
clnt_destroy(clnt);
if (resp->stat != YP_TRUE) {
switch (resp->stat) {
case YP_NODOM:
- yp_errno = YPXFR_NODOM;
+ yp_errno = (enum ypstat)YPXFR_NODOM;
break;
case YP_NOMAP:
- yp_errno = YPXFR_NOMAP;
+ yp_errno = (enum ypstat)YPXFR_NOMAP;
break;
case YP_YPERR:
default:
- yp_errno = YPXFR_YPERR;
+ yp_errno = (enum ypstat)YPXFR_YPERR;
break;
}
return(0);
diff --git a/release/Makefile b/release/Makefile
index 19987cf..964676b 100644
--- a/release/Makefile
+++ b/release/Makefile
@@ -75,7 +75,7 @@ base.txz:
kernel.txz:
-mkdir ${DISTDIR}
cd ${WORLDDIR} && ${IMAKE} distributekernel packagekernel DISTDIR=${DISTDIR}
- mv ${DISTDIR}/kernel.txz ${.OBJDIR}
+ mv ${DISTDIR}/kernel*.txz ${.OBJDIR}
src.txz:
-mkdir -p ${DISTDIR}/usr
diff --git a/release/doc/en_US.ISO8859-1/hardware/article.sgml b/release/doc/en_US.ISO8859-1/hardware/article.sgml
index 70d04e7..92d1c1f 100644
--- a/release/doc/en_US.ISO8859-1/hardware/article.sgml
+++ b/release/doc/en_US.ISO8859-1/hardware/article.sgml
@@ -32,6 +32,7 @@
<year>2009</year>
<year>2010</year>
<year>2011</year>
+ <year>2012</year>
<holder role="mailto:doc@FreeBSD.org">The &os; Documentation Project</holder>
</copyright>
@@ -773,6 +774,8 @@
&hwlist.esp;
+ &hwlist.hpt27xx;
+
&hwlist.hptiop;
&hwlist.hptmv;
diff --git a/release/doc/en_US.ISO8859-1/relnotes/article.sgml b/release/doc/en_US.ISO8859-1/relnotes/article.sgml
index b40da22..9a6d591 100644
--- a/release/doc/en_US.ISO8859-1/relnotes/article.sgml
+++ b/release/doc/en_US.ISO8859-1/relnotes/article.sgml
@@ -314,9 +314,8 @@
on behalf of an NFS client.</para>
<para role="merged">The <application>ZFS</application> file system
- has been upgraded to version 14. Additional changes include
- support for NFSv4 ACLs, a speedup of zfs send and an improved L2ARC.
- New statistics for prefetch and L2ARC have been introduced.</para>
+ has been upgraded to version 28. Changes include Data
+ Deduplication, Triple parity RAIDZ, and zfs diff.</para>
</sect3>
</sect2>
@@ -340,7 +339,7 @@
with the same semantics as (for example)
&man.chmod.1;.</para>
- <para>For compatiblity with other implementations, &man.cp.1; now
+ <para>For compatibility with other implementations, &man.cp.1; now
supports a <option>-a</option> flag, which is equivalent to
specifying the <option>-RrP</option> flags.</para>
@@ -367,10 +366,6 @@
of primaries that were present in GNU find but not &os;
&man.find.1;.</para>
- <para>&man.jexec.8; now supports <option>-h
- <replaceable>hostname</replaceable></option> option to specify the
- jail where the command will be executed.</para>
-
<para>&man.kgdb.1; now supports a new <command>add-kld</command>
command to make it easier to debug crash dumps with kernel
modules.</para>
@@ -397,6 +392,11 @@
a <option>-q</option> flag to suppress warnings; it now also
accepts multiple paths on its command line.</para>
+ <para>&man.sh.1; has many bug fixes, some new features, and will now
+ refuse to parse some invalid scripts. Additionally, it now
+ has filename completion and defaults to the &quot;emacs&quot; editing
+ mode.</para>
+
<para>The &man.split.1; utility now supports a <option>-n</option>
flag to split a file into a certain number of chunks.</para>
@@ -549,12 +549,6 @@
The &man.freebsd-update.8; utility requires that the host being
upgraded have Internet connectivity.</para>
- <para>An older form of binary upgrade is supported through the
- <command>Upgrade</command> option from the main &man.sysinstall.8;
- menu on CDROM distribution media. This type of binary upgrade
- may be useful on non-&arch.i386;, non-&arch.amd64; machines
- or on systems with no Internet connectivity.</para>
-
<para>Source-based upgrades (those based on recompiling the &os;
base system from source code) from previous versions are
supported, according to the instructions in
diff --git a/release/doc/share/misc/dev.archlist.txt b/release/doc/share/misc/dev.archlist.txt
index 10b7853..c462b8f 100644
--- a/release/doc/share/misc/dev.archlist.txt
+++ b/release/doc/share/misc/dev.archlist.txt
@@ -72,6 +72,7 @@ ex i386,amd64
fe i386,pc98,amd64
fwohci i386,sparc64,ia64,amd64,powerpc
hifn i386,pc98,amd64
+hpt27xx i386,amd64
hptiop i386,amd64
hptmv i386,amd64
hptrr i386,amd64
diff --git a/release/doc/share/misc/man2hwnotes.pl b/release/doc/share/misc/man2hwnotes.pl
index 2fbc066..aa8d023 100644
--- a/release/doc/share/misc/man2hwnotes.pl
+++ b/release/doc/share/misc/man2hwnotes.pl
@@ -324,6 +324,11 @@ sub parse {
} elsif (/^Fx/) {
dlog(3, "Got Fx command");
parabuf_addline(\%mdocvars, "FreeBSD");
+ } elsif (/^Em (.+)$/) {
+ my ($txt, $punct_str) = split_punct_chars($1);
+
+ parabuf_addline(\%mdocvars,
+ normalize("<emphasis>$txt</emphasis>$punct_str"));
} else {
# Ignore all other commands.
dlog(3, "Ignoring unknown command $cmd");
diff --git a/release/generate-release.sh b/release/generate-release.sh
index 6a95e36..3514fec 100755
--- a/release/generate-release.sh
+++ b/release/generate-release.sh
@@ -3,7 +3,7 @@
# generate-release.sh: check out source trees, and build release components with
# totally clean, fresh trees.
#
-# Usage: generate-release.sh svn-branch scratch-dir
+# Usage: generate-release.sh [-r revision] svn-branch scratch-dir
#
# Environment variables:
# CVSUP_HOST: Host of a cvsup server to obtain the ports and documentation
@@ -21,10 +21,42 @@
# $FreeBSD$
#
-mkdir -p $2/usr/src
+usage()
+{
+ echo "Usage: $0 [-r revision] svn-branch scratch-dir"
+ exit 1
+}
+
+REVISION=
+while getopts r: opt; do
+ case $opt in
+ r)
+ REVISION="-r $OPTARG"
+ ;;
+ \?)
+ usage
+ ;;
+ esac
+done
+shift $(($OPTIND - 1))
+
+if [ $# -lt 2 ]; then
+ usage
+fi
+
set -e # Everything must succeed
-svn co ${SVNROOT:-svn://svn.freebsd.org/base}/$1 $2/usr/src
+case $MAKE_FLAGS in
+ *-j*)
+ ;;
+ *)
+ MAKE_FLAGS="$MAKE_FLAGS -j "$(sysctl -n hw.ncpu)
+ ;;
+esac
+
+mkdir -p $2/usr/src
+
+svn co ${SVNROOT:-svn://svn.freebsd.org/base}/$1 $2/usr/src $REVISION
if [ ! -z $CVSUP_HOST ]; then
cat > $2/docports-supfile << EOF
*default host=$CVSUP_HOST
diff --git a/release/picobsd/build/Makefile.conf b/release/picobsd/build/Makefile.conf
index 5234349..7340663 100644
--- a/release/picobsd/build/Makefile.conf
+++ b/release/picobsd/build/Makefile.conf
@@ -13,6 +13,7 @@ BINMAKE?=make
SRC?=/usr/src
CONFIG?=config
MODULES?=-DNO_MODULES # do not build them as a default
+KERNCONF ?= PICOBSD
# caller will set MODULES to empty if modules are needed.
# Indeed, it can be used to specify other Makefile options as well.
@@ -45,10 +46,10 @@ ${COMPILE}: ${CONF}/${CONFFILE}
(cd ${CONF}; ${CONFIG} -d ${COMPILE} ${CONFFILE}; \
cd ${COMPILE}; ${BINMAKE} KERNEL=kernel ${MODULES} depend )
-${CONF}/${CONFFILE}: PICOBSD
+${CONF}/${CONFFILE}: ${KERNCONF}
# -mkdir -p ${CONF} # XXX not needed yet.
cp ${.OODATE} ${.TARGET}
- if [ -f PICOBSD.hints ] ; then cp PICOBSD.hints ${CONF}/PICOBSD.hints ; fi
+ [ -f PICOBSD.hints ] && cp PICOBSD.hints ${CONF}/
# This part creates crunch1.conf and crunch.mk from crunch.conf
${BUILDDIR}/crunch.mk: ${BUILDDIR}/crunch1.conf
diff --git a/release/picobsd/build/picobsd b/release/picobsd/build/picobsd
index 2910f9f..60cc1c3 100755
--- a/release/picobsd/build/picobsd
+++ b/release/picobsd/build/picobsd
@@ -105,11 +105,6 @@ set_defaults() { # no arguments
EDITOR=${EDITOR:-vi}
fd_size=${fd_size:-1440}
- o_use_loader="yes" # use /boot/loader
- # You should not change it unless you are really short
- # of space, and your kernel is small enough that the
- # bootblocks manage to load it.
-
o_all_in_mfs="yes" # put all files in mfs so you can boot
# and run the image via diskless boot.
o_clean="" # set if you want to clean prev.builds.
@@ -166,20 +161,30 @@ set_defaults() { # no arguments
# and also to build a specific target
create_includes_and_libraries2() { # opt_dir opt_target
local no
- log "create_includes_and_libraries2() for ${SRC}"
+ log "create_includes_and_libraries2() for ${SRC} $1"
if [ ${OSVERSION} -ge 600000 ] ; then
no="-DNO_CLEAN -DNO_PROFILE -DNO_GAMES -DNO_LIBC_R" # WITHOUT_CDDL=1"
else
no="-DNOCLEAN -DNOPROFILE -DNOGAMES -DNOLIBC_R"
fi
- MAKEOBJDIRPREFIX=${l_objtree}
- export MAKEOBJDIRPREFIX
( cd ${SRC};
# make -DNOCLEAN -DNOPROFILE -DNOGAMES -DNOLIBC_R -DPICOBSD buildworld
if [ -d "$1" ] ; then
cd $1 ; ${BINMAKE} ${o_par} $2 # specific target, e.g. ld-elf.so
else
- ${BINMAKE} ${o_par} _+_= $no toolchain _includes _libraries
+ MAKEOBJDIRPREFIX=${l_objtree}
+ export MAKEOBJDIRPREFIX
+ # export WITH_RESCUE=yes # build crunchide
+ # ${BINMAKE} ${o_par} _+_= $no toolchain _includes _libraries
+ (
+ # eval export `cd ${SRC}; ${BINMAKE} -f Makefile.inc1 -V BMAKEENV`
+ eval "export XMAKE=\"`cd ${SRC}; make -f Makefile -V XMAKE`\""
+ ${BINMAKE} ${o_par} _+_= $no toolchain
+ )
+ eval export `cd ${SRC}; ${BINMAKE} -f Makefile.inc1 -V WMAKEENV`
+ ${BINMAKE} ${o_par} _+_= $no _includes _libraries
+ [ ${o_arch} != `uname -m` ] && \
+ (cd ${l_objtree}; ln -s . ${o_arch}.${o_arch} || true )
fi
)
}
@@ -242,16 +247,19 @@ set_type() { # the_type the_site
name="" # clear in case of errors
for i in ${c_startdir}/${a} ${PICO_TREE}/${a} ; do
log "set_type: checking $i"
- [ -d $i -a -f $i/PICOBSD -a -f $i/crunch.conf ] || continue
- set -- `cat $i/PICOBSD | \
+ [ -d $i -a -f $i/crunch.conf ] || continue
+ # look for a kernel config file, privilege arch-specific
+ l_kernconf=$i/PICOBSD.${o_arch}
+ [ -f $l_kernconf ] || l_kernconf=$i/PICOBSD
+ [ -f $l_kernconf ] || continue
+ set -- `cat $l_kernconf | \
awk '/^#PicoBSD/ {print $2, $3, $4, $5, $6}'`
[ x"$1" != "x" ] || continue
- MFS_SIZE=$1 ; init_name=$2
- mfs_inodes=$3 ; fd_inodes=$4
+ MFS_SIZE=$1
name=`(cd $i ; pwd) `
name=`basename $name`
MY_TREE=$i
- BUILDDIR=${c_startdir}/build_dir-${name}
+ BUILDDIR=${c_startdir}/build_dir-${name}-${o_arch}
log "Matching file $name in $i"
return ;
done
@@ -328,10 +336,7 @@ main_dialog() {
K "edit Kernel config file" \
E "Edit crunch.conf file" \
S "MFS Size: ${MFS_SIZE}kB" \
- I "Init type: ${init_name}" \
F "Floppy size: ${fd_size}kB" \
- M "MFS bytes per inode: ${mfs_inodes}" \
- U "UFS bytes per inode: ${fd_inodes}" \
$ "Site-info: ${SITE}" \
Q "Quit" \
2> ${c_reply}
@@ -349,12 +354,6 @@ main_dialog() {
{ dialog --menu "Setup the type of configuration" 12 70 5 $l \
2> ${c_reply} && set_type "`cat ${c_reply}`" ${SITE} ; } || true
;;
- I)
- { dialog --menu "Choose your init(8) program" \
- 10 70 2 init "Standard init (requires getty)" \
- oinit "small init from TinyWare" 2> ${c_reply} \
- && init_name=`cat ${c_reply}` ; } || true
- ;;
K) ${EDITOR} ${MY_TREE}/PICOBSD ;;
@@ -386,20 +385,6 @@ this as small as possible. " 10 70 2> ${c_reply} \
2> ${c_reply} && fd_size=`cat ${c_reply}` ; } || true
;;
- M)
- { dialog --title "MFS bytes per inode:" --inputbox \
- "Enter MFS bytes per inode (typically 4096..65536). \
- A larger value means fewer inodes but more space on MFS" \
- 10 70 2> ${c_reply} && mfs_inodes=`cat ${c_reply}` ; } || true
- ;;
-
- U)
- { dialog --title "Floppy bytes per inode:" --inputbox \
- "Enter floppy bytes per inode (typically 3072..65536). \
- A larger value means fewer inodes but more space on the floppy." \
- 10 70 2> ${c_reply} && fd_inodes=`cat ${c_reply}` ; } || true
- ;;
-
N) break 2
;;
@@ -454,8 +439,9 @@ do_kernel() { # OK
# export CONFIG
export WARNS CWARNFLAGS
[ "${o_do_modules}" = "yes" ] && export MODULES=""
- ${BINMAKE} ${o_par} -v -f ${PICO_TREE}/build/Makefile.conf ) || \
- fail $? missing_kernel
+ ${BINMAKE} ${o_par} KERNCONF=${l_kernconf} \
+ -v -f ${PICO_TREE}/build/Makefile.conf ) || \
+ fail $? missing_kernel
}
# Populate the variable part of the floppy filesystem. Must be done before
@@ -565,7 +551,7 @@ do_links() { # rootdir varname
# find_progs is a helper function to locate the named programs
# or libraries in ${o_objdir} or ${_SHLIBDIRPREFIX},
# and return the full pathnames.
-# Called as "find_progs [-L libpath] [-P binpath] prog1 prog2 ... "
+# Called as "find_progs [[-L libpath] [-P binpath]] prog1 prog2 ... "
# On return it sets ${u_progs} to the list of programs, and ${u_libs}
# to the list of shared libraries used.
#
@@ -588,23 +574,32 @@ do_links() { # rootdir varname
# }
find_progs() { # programs
- local i
- local oo=${o_objdir:-${_SHLIBDIRPREFIX}} # default objdir
- local lp=$oo/lib # default lib.prefix
- local o="" # additional objdir
+ local pass i old_libs="" tmp o=""
if [ x"$1" = "x-L" -a -d "$2" ] ; then # set lib search path
- o=$2; shift; shift
- lp="$lp:$o/lib:$o/usr/lib:$o/usr/local/lib"
- o="-P $o"
+ o="-P $2"; shift; shift
fi
- u_libs=""
- u_progs="`find_progs_helper $*`"
- log "looking for libs for <$u_progs> in $lp"
+ # Result returned in global variables
+ u_libs="" ; u_progs="`find_progs_helper $*`"
[ -z "${u_progs}" ] && return 1 # not found, error
- i="`( LD_LIBRARY_PATH=$lp ldd ${u_progs} ) | \
- grep -v '^/' | awk '{print $1}' | sort | uniq`"
- u_libs="`find_progs_helper $o $i`"
- return 0
+ # use objdump to find libraries. Iterate to fetch recursive
+ # dependencies.
+ tmp="${u_progs}" ; pass=1
+ while [ $pass -lt 10 ] ; do
+ pass=$(($pass + 1))
+ i="`objdump -x ${tmp} | \
+ awk '$1 == "NEEDED" { print $2 }' | sort | uniq`"
+ if [ "$old_libs" = "$i" ] ; then
+ log "libraries for: $my_progs ($u_progs) are ($i) $u_libs"
+ log "--- done find_progs ---"
+ return 0
+ else
+ # logverbose "old--- $old_libs --- new +++ $i +++"
+ fi
+ u_libs="`find_progs_helper $o $i`"
+ old_libs="$i"
+ tmp="$tmp $u_libs"
+ done
+ log "WARNING: Too many passes, giving up"
}
find_progs_helper() { # programs
@@ -637,8 +632,12 @@ find_progs_helper() { # programs
[ -d "${ldir}/${i}" ] && places="${places} ${ldir}/${i}"
done
fi
+ for i in $progs ; do
+ # full pathnames are just listed
+ [ -f "$i" ] && echo $i && continue
+ find ${places} -maxdepth 3 -type f -name ${i} | head -1
+ done
# use maxdepth 3 because some libs are way down
- find ${places} -maxdepth 3 -type f \( ${names} \)
}
# Populate the memory filesystem with binaries and non-variable
@@ -788,7 +787,6 @@ populate_mfs_tree() {
final_cleanup() {
log "final_cleanup()"
rm -rf ${c_mnt} ${c_reply} 2> /dev/null || true
- rm -f ${c_reply}
}
# fail errno errcode
@@ -857,17 +855,6 @@ fill_floppy_image() {
fi
log "Labeling floppy image"
- b2=${BUILDDIR}/boot2 # modified boot2
- cp -f ${c_boot2} ${b2}
- chmod 0644 ${b2}
-
- if [ ${o_use_loader} = "no" ] ; then
- log "patch ${c_boot2} to boot /kernel right away"
- set `strings -at d ${b2} | grep "/boot/loader"`
- echo -e "/kernel\0\0\0\0\0" | \
- dd of=${b2} obs=$1 oseek=1 conv=notrunc 2>/dev/null
- fi
- chmod 0444 ${b2}
dst=${BUILDDIR}/image.tree
rm -rf ${dst}
@@ -893,17 +880,13 @@ fill_floppy_image() {
log "not loading mfs, size ${mfs_size} img ${imgsize}"
fi
log "Compress with kgzip and copy to floppy image"
- if [ ${o_use_loader} = "no" ] ; then
- kgzip -o kernel.gz kernel
- cp -p kernel.gz ${dst}/kernel || fail $? no_space "copying kernel"
- else
- gzip kernel
- mkdir -p ${dst}/boot/kernel
- echo "hint.acpi.0.disabled=\"1\"" > ${dst}/boot/loader.conf
- echo "console=\"comconsole\"" >> ${dst}/boot/loader.conf
- cp -p /boot/loader ${dst}/boot/loader || fail $? no_space "copying bootloader"
- cp -p kernel.gz ${dst}/boot/kernel/kernel.gz || fail $? no_space "copying kernel"
- fi
+
+ mkdir -p ${dst}/boot/kernel
+ # XXX update loader.conf
+ echo "hint.acpi.0.disabled=\"1\"" > ${dst}/boot/loader.conf
+ echo "console=\"comconsole\"" >> ${dst}/boot/loader.conf
+ cp -p /boot/loader ${dst}/boot/loader || fail $? no_space "copying bootloader"
+ gzip -c kernel > ${dst}/boot/kernel/kernel.gz || fail $? no_space "copying kernel"
# now transfer the floppy tree. If it is already in mfs, dont bother.
if [ "${o_all_in_mfs}" != "yes" ] ; then
@@ -953,10 +936,13 @@ fill_floppy_image() {
# so we skip 276 from the source, and 276+512=788 from dst
# the old style blocks used 512 and 1024 respectively
- dd if=${b2} iseek=1 ibs=276 2> /dev/null | \
+ dd if=${c_boot2} iseek=1 ibs=276 2> /dev/null | \
dd of=${BUILDDIR}/${c_img} oseek=1 obs=788 conv=notrunc 2>/dev/null
log "done disk image"
# XXX (log "Fixing permissions"; cd ${dst}; chown -R root *)
+ # leave build stuff if verbose
+ [ ${o_verbose} -gt 0 ] && return
+
rm -rf ${BUILDDIR}/floppy.tree || true # cleanup
# df -ik ${dst} | colrm 70 > .build.reply
rm -rf ${dst}
@@ -984,9 +970,10 @@ set_build_parameters() {
if [ ${OSVERSION} -ge 500035 ] ; then
export MAKEOBJDIRPREFIX=${l_objtree}
export TARGET_ARCH=${o_arch} TARGET=${o_arch}
+ # XXX why change machine_arch ?
+ #-- export MACHINE_ARCH=`uname -m` MACHINE=`uname -m`
# export CWARNFLAGS="-Wextra -Wno-sign-compare -Wno-missing-field-initializers"
eval "export BINMAKE=\"`cd ${SRC}; make -f Makefile -V BINMAKE`\""
- eval export `cd ${SRC}; ${BINMAKE} -f Makefile.inc1 -V WMAKEENV`
fi
if [ "${o_init_src}" != "" ] ; then
@@ -995,6 +982,8 @@ set_build_parameters() {
else
create_includes_and_libraries2
fi
+ else
+ eval export `cd ${SRC}; ${BINMAKE} -f Makefile.inc1 -V WMAKEENV`
fi
if [ ${OSVERSION} -lt 500035 ] ; then
# Create the right LIBS and CFLAGS for further builds.
@@ -1030,29 +1019,29 @@ set_defaults
while [ true ]; do
log "Parsing $1"
case $1 in
+ --par)
+ o_par="-j 8"
+ ;;
+
--src) # set the source path instead of /usr/src
SRC=`realpath $2`
shift
;;
- --init)
+
+ --init) # run a partial buildworld on the source tree
o_init_src="YES"
;;
- --arch)
+ --arch) # override the target architecture
o_arch=$2
shift
;;
- --floppy_size)
+ --floppy_size) # image size
fd_size=$2
shift
;;
- --no_loader) # omit /boot/loader, just rely on boot2
- # (it may have problems with kernels > 4MB)
- o_use_loader="no"
- ;;
-
--all_in_mfs)
o_all_in_mfs="yes"
;;
@@ -1064,6 +1053,7 @@ while [ true ]; do
--modules) # also build kernel modules
o_do_modules="yes"
;;
+
-n)
o_interactive="NO"
;;
diff --git a/release/picobsd/tinyware/passwd/local_passwd.c b/release/picobsd/tinyware/passwd/local_passwd.c
index 6bbf24d..33af88a 100644
--- a/release/picobsd/tinyware/passwd/local_passwd.c
+++ b/release/picobsd/tinyware/passwd/local_passwd.c
@@ -172,7 +172,7 @@ getnewpasswd(pw, nis)
to64(&salt[5], random(), 4);
salt[9] = '\0';
#else
- /* Make a good size salt for algoritms that can use it. */
+ /* Make a good size salt for algorithms that can use it. */
gettimeofday(&tv,0);
#ifdef LOGIN_CAP
if (login_setcryptfmt(lc, "md5", NULL) == NULL)
diff --git a/release/picobsd/tinyware/passwd/pw_copy.c b/release/picobsd/tinyware/passwd/pw_copy.c
index ba3c886..753e1a6 100644
--- a/release/picobsd/tinyware/passwd/pw_copy.c
+++ b/release/picobsd/tinyware/passwd/pw_copy.c
@@ -193,7 +193,7 @@ err: pw_error(NULL, 1, 1);
* by default, warning for IDs greater than USHRT_MAX.
*
* If pw_big_ids_warning is anything other than -1 on entry to pw_scan()
- * it will be set based on the existance of PW_SCAN_BIG_IDS in the
+ * it will be set based on the existence of PW_SCAN_BIG_IDS in the
* environment.
*/
int pw_big_ids_warning = -1;
diff --git a/release/picobsd/tinyware/simple_httpd/README b/release/picobsd/tinyware/simple_httpd/README
index 6961954..ade3be1 100644
--- a/release/picobsd/tinyware/simple_httpd/README
+++ b/release/picobsd/tinyware/simple_httpd/README
@@ -21,14 +21,14 @@ of html,gif,cgi whatever. Your traditional www server.
The "fetch" mode supports file transfer over httpd. This
is best thought of as mate for fetch(1). This feature can be
-usefull to transfer a file from one host to another.
+useful to transfer a file from one host to another.
Simple_httpd has the ability to run CGI scripts. All CGI
scripts must be located in ${DOCUMENT_ROOT}/cgi-bin. The
-server currently only sets 3 enviroment variables before calling
+server currently only sets 3 environment variables before calling
the script.
-CGI Enviroment variables are below:
+CGI Environment variables are below:
SERVER_SOFTWARE = FreeBSD/PicoBSD
REMOTE_HOST = client.canada_lower_taxes.com
@@ -61,7 +61,7 @@ daemonize without fear of output on stdout.
-D
Do not daemonize. The server will not run in the background. It will
-stay attached to the tty. This is usefull for debugging. In this
+stay attached to the tty. This is useful for debugging. In this
mode no log file is created. Logging info is to stdout.
This option is automatically selected if fetch option is selected.
@@ -139,7 +139,7 @@ receiver# fetch http://sender.com:53/Industrial_Secrets.tgz
To Do
=====
-Simple authentication would be very usefull[understatment].
+Simple authentication would be very useful [understatment].
/etc/passwd or PAM would be nice.
I think a netmask option would be good. Most internet appliances
diff --git a/release/rc.local b/release/rc.local
index 1816f38..d84bcc2 100755
--- a/release/rc.local
+++ b/release/rc.local
@@ -10,8 +10,17 @@
kbdcontrol -d >/dev/null 2>&1
if [ $? -eq 0 ]; then
- # Syscons: use xterm
+ # Syscons: use xterm, start interesting things on other VTYs
TERM=xterm
+
+ if [ -z "$EXTERNAL_VTY_STARTED" ]; then
+ # Init will clean these processes up if/when the system
+ # goes multiuser
+ touch /tmp/bsdinstall_log
+ tail -f /tmp/bsdinstall_log > /dev/ttyv2 &
+ /usr/libexec/getty autologin ttyv3
+ EXTERNAL_VTY_STARTED=1
+ fi
else
# Serial or other console
echo
diff --git a/sbin/atm/atmconfig/diag.c b/sbin/atm/atmconfig/diag.c
index 0211318..3225e10 100644
--- a/sbin/atm/atmconfig/diag.c
+++ b/sbin/atm/atmconfig/diag.c
@@ -426,7 +426,7 @@ diag_loop(int argc, char *argv[], const char *text,
for (i = 0; i < argc; i++) {
TAILQ_FOREACH(aif, &diagif_list, link) {
if (strcmp(argv[i], aif->ifname) == 0) {
- heading(text);
+ heading("%s", text);
(*func)(aif);
break;
}
@@ -436,7 +436,7 @@ diag_loop(int argc, char *argv[], const char *text,
}
} else {
TAILQ_FOREACH(aif, &diagif_list, link) {
- heading(text);
+ heading("%s", text);
(*func)(aif);
}
}
@@ -992,7 +992,7 @@ diag_vcc_loop(void (*func)(const struct diagif *), const char *text,
TAILQ_FOREACH(aif, &diagif_list, link) {
diagif_fetch_vcc(aif, fd);
if (aif->vtab->count != 0) {
- heading(text);
+ heading("%s", text);
(*func)(aif);
}
}
@@ -1003,7 +1003,7 @@ diag_vcc_loop(void (*func)(const struct diagif *), const char *text,
if (strcmp(aif->ifname, argv[optind]) == 0) {
diagif_fetch_vcc(aif, fd);
if (aif->vtab->count != 0) {
- heading(text);
+ heading("%s", text);
(*func)(aif);
}
break;
diff --git a/sbin/bsdlabel/bsdlabel.c b/sbin/bsdlabel/bsdlabel.c
index ac83a41..24d852b 100644
--- a/sbin/bsdlabel/bsdlabel.c
+++ b/sbin/bsdlabel/bsdlabel.c
@@ -130,7 +130,7 @@ static int labelsoffset = LABELSECTOR;
static int labeloffset = LABELOFFSET;
static int bbsize = BBSIZE;
-enum {
+static enum {
UNSPEC, EDIT, READ, RESTORE, WRITE, WRITEBOOT
} op = UNSPEC;
@@ -189,8 +189,8 @@ main(int argc, char *argv[])
break;
case 'r':
/*
- * We accept and ignode -r for compatibility with
- * historically disklabel usage.
+ * We accept and ignore -r for compatibility with
+ * historical disklabel usage.
*/
break;
case 'w':
@@ -386,7 +386,7 @@ writelabel(void)
struct disklabel *lp = &lab;
if (disable_write) {
- warnx("write to disk label supressed - label was as follows:");
+ warnx("write to disk label suppressed - label was as follows:");
display(stdout, NULL);
return (0);
}
@@ -400,7 +400,7 @@ writelabel(void)
for (i = 0; i < lab.d_npartitions; i++)
if (lab.d_partitions[i].p_size)
lab.d_partitions[i].p_offset += lba_offset;
- bsd_disklabel_le_enc(bootarea + labeloffset + labelsoffset * secsize,
+ bsd_disklabel_le_enc(bootarea + labeloffset + labelsoffset * lab.d_secsize,
lp);
fd = open(specname, O_RDWR);
@@ -434,7 +434,7 @@ writelabel(void)
gctl_ro_param(grq, "class", -1, "BSD");
gctl_ro_param(grq, "geom", -1, pname);
gctl_ro_param(grq, "label", 148+16*8,
- bootarea + labeloffset + labelsoffset * secsize);
+ bootarea + labeloffset + labelsoffset * lab.d_secsize);
errstr = gctl_issue(grq);
if (errstr != NULL) {
warnx("%s", errstr);
@@ -782,12 +782,12 @@ getasciilabel(FILE *f, struct disklabel *lp)
lp->d_sbsize = 0; /* XXX */
while (fgets(line, sizeof(line) - 1, f)) {
lineno++;
- if ((cp = index(line,'\n')) != 0)
+ if ((cp = strchr(line,'\n')) != 0)
*cp = '\0';
cp = skip(line);
if (cp == NULL)
continue;
- tp = index(cp, ':');
+ tp = strchr(cp, ':');
if (tp == NULL) {
fprintf(stderr, "line %d: syntax error\n", lineno);
errors++;
@@ -1512,8 +1512,8 @@ getvirginlabel(void)
loclab.d_secperunit = mediasize / secsize;
/*
- * Nobody in these enligthened days uses the CHS geometry for
- * anything, but nontheless try to get it right. If we fail
+ * Nobody in these enlightened days uses the CHS geometry for
+ * anything, but nonetheless try to get it right. If we fail
* to get any good ideas from the device, construct something
* which is IBM-PC friendly.
*/
diff --git a/sbin/camcontrol/camcontrol.c b/sbin/camcontrol/camcontrol.c
index b801823..6116db7 100644
--- a/sbin/camcontrol/camcontrol.c
+++ b/sbin/camcontrol/camcontrol.c
@@ -2506,7 +2506,7 @@ scsicmd(struct cam_device *device, int argc, char **argv, char *combinedopt,
if (((retval = cam_send_ccb(device, ccb)) < 0)
|| ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)) {
- const char *warnstr = "error sending command";
+ const char warnstr[] = "error sending command";
if (retval < 0)
warn(warnstr);
@@ -3412,7 +3412,6 @@ ratecontrol(struct cam_device *device, int retry_count, int timeout,
}
if (spi && syncrate != -1) {
int prelim_sync_period;
- u_int freq;
if ((cpi.hba_inquiry & PI_SDTR_ABLE) == 0) {
warnx("HBA is not capable of changing "
@@ -3437,7 +3436,6 @@ ratecontrol(struct cam_device *device, int retry_count, int timeout,
prelim_sync_period = 10000000 / syncrate;
spi->sync_period =
scsi_calc_syncparam(prelim_sync_period);
- freq = scsi_calc_syncsrate(spi->sync_period);
didsettings++;
}
if (sata && syncrate != -1) {
@@ -4030,13 +4028,12 @@ retry:
RPL_LUNDATA_LUN_LUN_MASK);
break;
case RPL_LUNDATA_ATYP_EXTLUN: {
- int field_len, field_len_code, eam_code;
+ int field_len_code, eam_code;
eam_code = lundata->luns[i].lundata[j] &
RPL_LUNDATA_EXT_EAM_MASK;
field_len_code = (lundata->luns[i].lundata[j] &
RPL_LUNDATA_EXT_LEN_MASK) >> 4;
- field_len = field_len_code * 2;
if ((eam_code == RPL_LUNDATA_EXT_EAM_WK)
&& (field_len_code == 0x00)) {
@@ -4449,7 +4446,7 @@ smpcmd(struct cam_device *device, int argc, char **argv, char *combinedopt,
if (((retval = cam_send_ccb(device, ccb)) < 0)
|| ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)) {
- const char *warnstr = "error sending command";
+ const char warnstr[] = "error sending command";
if (retval < 0)
warn(warnstr);
@@ -4567,7 +4564,7 @@ try_long:
if (((retval = cam_send_ccb(device, ccb)) < 0)
|| ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)) {
- const char *warnstr = "error sending command";
+ const char warnstr[] = "error sending command";
if (retval < 0)
warn(warnstr);
@@ -4872,7 +4869,7 @@ smpphycontrol(struct cam_device *device, int argc, char **argv,
if (((retval = cam_send_ccb(device, ccb)) < 0)
|| ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)) {
- const char *warnstr = "error sending command";
+ const char warnstr[] = "error sending command";
if (retval < 0)
warn(warnstr);
@@ -4954,7 +4951,7 @@ smpmaninfo(struct cam_device *device, int argc, char **argv,
if (((retval = cam_send_ccb(device, ccb)) < 0)
|| ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)) {
- const char *warnstr = "error sending command";
+ const char warnstr[] = "error sending command";
if (retval < 0)
warn(warnstr);
@@ -5351,7 +5348,7 @@ smpphylist(struct cam_device *device, int argc, char **argv,
if (((retval = cam_send_ccb(device, ccb)) < 0)
|| ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)) {
- const char *warnstr = "error sending command";
+ const char warnstr[] = "error sending command";
if (retval < 0)
warn(warnstr);
@@ -5431,7 +5428,7 @@ smpphylist(struct cam_device *device, int argc, char **argv,
if (((retval = cam_send_ccb(device, ccb)) < 0)
|| (((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)
&& (disresponse->function_result != SMP_FR_PHY_VACANT))) {
- const char *warnstr = "error sending command";
+ const char warnstr[] = "error sending command";
if (retval < 0)
warn(warnstr);
@@ -5732,7 +5729,7 @@ usage(int verbose)
"defects arguments:\n"
"-f format specify defect list format (block, bfi or phys)\n"
"-G get the grown defect list\n"
-"-P get the permanant defect list\n"
+"-P get the permanent defect list\n"
"inquiry arguments:\n"
"-D get the standard inquiry data\n"
"-S get the serial number\n"
diff --git a/sbin/camcontrol/fwdownload.c b/sbin/camcontrol/fwdownload.c
index e59ae4c..abb3726 100644
--- a/sbin/camcontrol/fwdownload.c
+++ b/sbin/camcontrol/fwdownload.c
@@ -88,7 +88,7 @@ struct fw_vendor {
int inc_cdb_offset;
};
-struct fw_vendor vendors_list[] = {
+static const struct fw_vendor vendors_list[] = {
{VENDOR_HITACHI, "HITACHI", 0x8000, 0x05, 0x05, 1, 0},
{VENDOR_HP, "HP", 0x8000, 0x07, 0x07, 0, 1},
{VENDOR_IBM, "IBM", 0x8000, 0x05, 0x05, 1, 0},
@@ -98,22 +98,22 @@ struct fw_vendor vendors_list[] = {
{VENDOR_UNKNOWN, NULL, 0x0000, 0x00, 0x00, 0, 0}
};
-static struct fw_vendor *fw_get_vendor(struct cam_device *cam_dev);
-static char *fw_read_img(char *fw_img_path, struct fw_vendor *vp,
- int *num_bytes);
+static const struct fw_vendor *fw_get_vendor(struct cam_device *cam_dev);
+static char *fw_read_img(const char *fw_img_path,
+ const struct fw_vendor *vp, int *num_bytes);
static int fw_download_img(struct cam_device *cam_dev,
- struct fw_vendor *vp, char *buf, int img_size,
+ const struct fw_vendor *vp, char *buf, int img_size,
int sim_mode, int verbose, int retry_count, int timeout);
/*
* Find entry in vendors list that belongs to
* the vendor of given cam device.
*/
-static struct fw_vendor *
+static const struct fw_vendor *
fw_get_vendor(struct cam_device *cam_dev)
{
char vendor[SID_VENDOR_SIZE + 1];
- struct fw_vendor *vp;
+ const struct fw_vendor *vp;
if (cam_dev == NULL)
return (NULL);
@@ -133,7 +133,7 @@ fw_get_vendor(struct cam_device *cam_dev)
* in num_bytes.
*/
static char *
-fw_read_img(char *fw_img_path, struct fw_vendor *vp, int *num_bytes)
+fw_read_img(const char *fw_img_path, const struct fw_vendor *vp, int *num_bytes)
{
int fd;
struct stat stbuf;
@@ -205,7 +205,7 @@ bailout1:
* device but do not sent any actual packets
*/
static int
-fw_download_img(struct cam_device *cam_dev, struct fw_vendor *vp,
+fw_download_img(struct cam_device *cam_dev, const struct fw_vendor *vp,
char *buf, int img_size, int sim_mode, int verbose, int retry_count,
int timeout)
{
@@ -319,7 +319,7 @@ int
fwdownload(struct cam_device *device, int argc, char **argv,
char *combinedopt, int verbose, int retry_count, int timeout)
{
- struct fw_vendor *vp;
+ const struct fw_vendor *vp;
char *fw_img_path = NULL;
char *buf;
int img_size;
diff --git a/sbin/camcontrol/modeedit.c b/sbin/camcontrol/modeedit.c
index eaf87d6..6a628e8 100644
--- a/sbin/camcontrol/modeedit.c
+++ b/sbin/camcontrol/modeedit.c
@@ -83,15 +83,15 @@ struct editentry {
char *svalue;
} value;
};
-STAILQ_HEAD(, editentry) editlist; /* List of page entries. */
-int editlist_changed = 0; /* Whether any entries were changed. */
+static STAILQ_HEAD(, editentry) editlist; /* List of page entries. */
+static int editlist_changed = 0; /* Whether any entries were changed. */
struct pagename {
SLIST_ENTRY(pagename) link;
int pagenum;
char *name;
};
-SLIST_HEAD(, pagename) namelist; /* Page number to name mappings. */
+static SLIST_HEAD(, pagename) namelist; /* Page number to name mappings. */
static char format[MAX_FORMAT_SPEC]; /* Buffer for scsi cdb format def. */
@@ -869,7 +869,6 @@ mode_list(struct cam_device *device, int page_control, int dbd,
int retry_count, int timeout)
{
u_int8_t data[MAX_COMMAND_SIZE];/* Buffer to hold sense data. */
- u_int8_t *mode_pars; /* Pointer to modepage params. */
struct scsi_mode_header_6 *mh; /* Location of mode header. */
struct scsi_mode_page_header *mph;
struct pagename *nameentry;
@@ -895,7 +894,6 @@ mode_list(struct cam_device *device, int page_control, int dbd,
/* Locate the next mode page header. */
mph = (struct scsi_mode_page_header *)
((intptr_t)mh + sizeof(*mh) + len);
- mode_pars = MODE_PAGE_DATA(mph);
mph->page_code &= SMS_PAGE_CODE;
nameentry = nameentry_lookup(mph->page_code);
diff --git a/sbin/devd/devd.cc b/sbin/devd/devd.cc
index fd3b6e3..6eefec8 100644
--- a/sbin/devd/devd.cc
+++ b/sbin/devd/devd.cc
@@ -298,7 +298,6 @@ media::media(config &, const char *var, const char *type)
{ IFM_FDDI, "FDDI" },
{ IFM_IEEE80211, "802.11" },
{ IFM_ATM, "ATM" },
- { IFM_CARP, "CARP" },
{ -1, "unknown" },
{ 0, NULL },
};
diff --git a/sbin/devd/devd.conf.5 b/sbin/devd/devd.conf.5
index 09e902b..944bdbb 100644
--- a/sbin/devd/devd.conf.5
+++ b/sbin/devd/devd.conf.5
@@ -41,7 +41,7 @@
.\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
.\" SOFTWARE.
.\"
-.Dd October 25, 2011
+.Dd December 16, 2011
.Dt DEVD.CONF 5
.Os
.Sh NAME
@@ -542,4 +542,5 @@ has many additional examples.
.Sh SEE ALSO
.Xr coretemp 4 ,
.Xr devfs 5 ,
+.Xr re_format 7 ,
.Xr devd 8
diff --git a/sbin/devd/devd.hh b/sbin/devd/devd.hh
index d70d178..1830dad 100644
--- a/sbin/devd/devd.hh
+++ b/sbin/devd/devd.hh
@@ -65,7 +65,7 @@ private:
* eps is short for event_proc_single. It is a single entry in an
* event_proc. Each keyword needs its own subclass from eps.
*/
-class eps
+struct eps
{
public:
eps() {}
@@ -126,7 +126,7 @@ private:
std::string _cmd;
};
-class event_proc
+struct event_proc
{
public:
event_proc();
diff --git a/sbin/devfs/rule.c b/sbin/devfs/rule.c
index e4726d7..bb3ebe1 100644
--- a/sbin/devfs/rule.c
+++ b/sbin/devfs/rule.c
@@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$");
#include "extern.h"
-static void rulespec_infp(FILE *fp, unsigned long reqest, devfs_rsnum rsnum);
+static void rulespec_infp(FILE *fp, unsigned long request, devfs_rsnum rsnum);
static void rulespec_instr(struct devfs_rule *dr, const char *str,
devfs_rsnum rsnum);
static void rulespec_intok(struct devfs_rule *dr, int ac, char **av,
diff --git a/sbin/dhclient/clparse.c b/sbin/dhclient/clparse.c
index 7c1e74f..58de8cc 100644
--- a/sbin/dhclient/clparse.c
+++ b/sbin/dhclient/clparse.c
@@ -873,6 +873,7 @@ parse_string_list(FILE *cfile, struct string_list **lp, int multiple)
{
int token;
char *val;
+ size_t valsize;
struct string_list *cur, *tmp;
/* Find the last medium in the media list. */
@@ -890,10 +891,11 @@ parse_string_list(FILE *cfile, struct string_list **lp, int multiple)
return;
}
- tmp = new_string_list(strlen(val) + 1);
+ valsize = strlen(val) + 1;
+ tmp = new_string_list(valsize);
if (tmp == NULL)
error("no memory for string list entry.");
- strlcpy(tmp->string, val, strlen(val) + 1);
+ memcpy(tmp->string, val, valsize);
tmp->next = NULL;
/* Store this medium at the end of the media list. */
diff --git a/sbin/dhclient/dhclient-script b/sbin/dhclient/dhclient-script
index b066400..3439fd9 100644..100755
--- a/sbin/dhclient/dhclient-script
+++ b/sbin/dhclient/dhclient-script
@@ -320,7 +320,7 @@ MEDIUM)
PREINIT)
delete_old_alias
- $IFCONFIG $interface inet alias 0.0.0.0 netmask 0.0.0.0 broadcast 255.255.255.255 up
+ $IFCONFIG $interface inet alias 0.0.0.0 netmask 255.0.0.0 broadcast 255.255.255.255 up
;;
ARPCHECK|ARPSEND)
diff --git a/sbin/dhclient/dhclient-script.8 b/sbin/dhclient/dhclient-script.8
index 89d43cb..fdb46a7 100644
--- a/sbin/dhclient/dhclient-script.8
+++ b/sbin/dhclient/dhclient-script.8
@@ -232,7 +232,7 @@ will check for the existence of
.Pa /etc/dhclient-exit-hooks .
If found, it will be sourced
.Pq see Xr sh 1 .
-These hooks scripts can be used to dynamically modify the enviornment at
+These hooks scripts can be used to dynamically modify the environment at
appropriate times during the DHCP negotiations.
For example, if the administrator wishes to disable alias IP numbers on
the DHCP interface, they might want to put the following in
diff --git a/sbin/dhclient/options.c b/sbin/dhclient/options.c
index 3f87028..be073da 100644
--- a/sbin/dhclient/options.c
+++ b/sbin/dhclient/options.c
@@ -211,7 +211,7 @@ parse_option_buffer(struct packet *packet,
void
expand_domain_search(struct packet *packet)
{
- int offset, expanded_len;
+ int offset, expanded_len, next_domain_len;
struct option_data *option;
unsigned char *domain_search, *cursor;
@@ -224,9 +224,13 @@ expand_domain_search(struct packet *packet)
expanded_len = 0;
offset = 0;
while (offset < option->len) {
+ next_domain_len = find_search_domain_name_len(option, &offset);
+ if (next_domain_len < 0)
+ /* The Domain Search option value is invalid. */
+ return;
+
/* We add 1 for the space between domain names. */
- expanded_len +=
- find_search_domain_name_len(option, &offset) + 1;
+ expanded_len += next_domain_len + 1;
}
if (expanded_len > 0)
/* Remove 1 for the superfluous trailing space. */
@@ -271,19 +275,21 @@ find_search_domain_name_len(struct option_data *option, int *offset)
/* This is a pointer to another list of labels. */
if (i + 1 >= option->len) {
/* The pointer is truncated. */
- error("Truncated pointer in DHCP Domain "
+ warning("Truncated pointer in DHCP Domain "
"Search option.");
+ return (-1);
}
pointer = ((label_len & ~(0xC0)) << 8) +
option->data[i + 1];
if (pointer >= *offset) {
/*
- * The pointer must indicates a prior
- * occurance.
+ * The pointer must indicate a prior
+ * occurrence.
*/
- error("Invalid forward pointer in DHCP Domain "
- "Search option compression.");
+ warning("Invalid forward pointer in DHCP "
+ "Domain Search option compression.");
+ return (-1);
}
pointed_len = find_search_domain_name_len(option,
@@ -295,7 +301,9 @@ find_search_domain_name_len(struct option_data *option, int *offset)
}
if (i + label_len >= option->len) {
- error("Truncated label in DHCP Domain Search option.");
+ warning("Truncated label in DHCP Domain Search "
+ "option.");
+ return (-1);
}
/*
@@ -308,9 +316,9 @@ find_search_domain_name_len(struct option_data *option, int *offset)
i += label_len + 1;
}
- error("Truncated DHCP Domain Search option.");
+ warning("Truncated DHCP Domain Search option.");
- return (0);
+ return (-1);
}
void
diff --git a/sbin/dhclient/parse.c b/sbin/dhclient/parse.c
index 6a54fd0..e548bd3 100644
--- a/sbin/dhclient/parse.c
+++ b/sbin/dhclient/parse.c
@@ -116,6 +116,7 @@ char *
parse_string(FILE *cfile)
{
char *val, *s;
+ size_t valsize;
int token;
token = next_token(&val, cfile);
@@ -124,10 +125,11 @@ parse_string(FILE *cfile)
skip_to_semi(cfile);
return (NULL);
}
- s = malloc(strlen(val) + 1);
+ valsize = strlen(val) + 1;
+ s = malloc(valsize);
if (!s)
error("no memory for string %s.", val);
- strlcpy(s, val, strlen(val) + 1);
+ memcpy(s, val, valsize);
if (!parse_semi(cfile))
return (NULL);
@@ -242,6 +244,7 @@ parse_numeric_aggregate(FILE *cfile, unsigned char *buf, int *max,
unsigned char *bufp = buf, *s = NULL;
int token, count = 0;
char *val, *t;
+ size_t valsize;
pair c = NULL;
if (!bufp && *max) {
@@ -288,10 +291,11 @@ parse_numeric_aggregate(FILE *cfile, unsigned char *buf, int *max,
convert_num(s, val, base, size);
s += size / 8;
} else {
- t = malloc(strlen(val) + 1);
+ valsize = strlen(val) + 1;
+ t = malloc(valsize);
if (!t)
error("no temp space for number.");
- strlcpy(t, val, strlen(val) + 1);
+ memcpy(t, val, valsize);
c = cons(t, c);
}
} while (++count != *max);
diff --git a/sbin/dump/main.c b/sbin/dump/main.c
index 3e6ed1f..3ec78fd1 100644
--- a/sbin/dump/main.c
+++ b/sbin/dump/main.c
@@ -290,7 +290,7 @@ main(int argc, char *argv[])
tape = strchr(host, ':');
*tape++ = '\0';
#ifdef RDUMP
- if (index(tape, '\n')) {
+ if (strchr(tape, '\n')) {
(void)fprintf(stderr, "invalid characters in tape\n");
exit(X_STARTUP);
}
diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c
index a21f2f2..2926d1a 100644
--- a/sbin/dumpfs/dumpfs.c
+++ b/sbin/dumpfs/dumpfs.c
@@ -79,16 +79,16 @@ static const char rcsid[] =
static struct uufsd disk;
-int dumpfs(const char *);
-int dumpfsid(void);
-int dumpcg(void);
-int dumpfreespace(const char *, int);
-void dumpfreespacecg(int);
-int marshal(const char *);
-void pbits(void *, int);
-void pblklist(void *, int, off_t, int);
-void ufserr(const char *);
-void usage(void) __dead2;
+static int dumpfs(const char *);
+static int dumpfsid(void);
+static int dumpcg(void);
+static int dumpfreespace(const char *, int);
+static void dumpfreespacecg(int);
+static int marshal(const char *);
+static void pbits(void *, int);
+static void pblklist(void *, int, off_t, int);
+static void ufserr(const char *);
+static void usage(void) __dead2;
int
main(int argc, char *argv[])
@@ -143,7 +143,7 @@ main(int argc, char *argv[])
exit(eval);
}
-int
+static int
dumpfsid(void)
{
@@ -151,7 +151,7 @@ dumpfsid(void)
return 0;
}
-int
+static int
dumpfs(const char *name)
{
time_t fstime;
@@ -309,7 +309,7 @@ err: ufserr(name);
return (1);
}
-int
+static int
dumpcg(void)
{
time_t cgtime;
@@ -370,7 +370,7 @@ dumpcg(void)
return (0);
}
-int
+static int
dumpfreespace(const char *name, int fflag)
{
int i;
@@ -386,7 +386,7 @@ err:
return (1);
}
-void
+static void
dumpfreespacecg(int fflag)
{
@@ -394,7 +394,7 @@ dumpfreespacecg(int fflag)
fflag);
}
-int
+static int
marshal(const char *name)
{
struct fs *fs;
@@ -444,7 +444,7 @@ marshal(const char *name)
return 0;
}
-void
+static void
pbits(void *vp, int max)
{
int i;
@@ -466,7 +466,7 @@ pbits(void *vp, int max)
printf("\n");
}
-void
+static void
pblklist(void *vp, int max, off_t offset, int fflag)
{
int i, j;
@@ -487,7 +487,7 @@ pblklist(void *vp, int max, off_t offset, int fflag)
}
}
-void
+static void
ufserr(const char *name)
{
if (disk.d_error != NULL)
@@ -496,9 +496,9 @@ ufserr(const char *name)
warn("%s", name);
}
-void
+static void
usage(void)
{
- (void)fprintf(stderr, "usage: dumpfs [-fm] filesys | device\n");
+ (void)fprintf(stderr, "usage: dumpfs [-flm] filesys | device\n");
exit(1);
}
diff --git a/sbin/fsck_ffs/fsck.h b/sbin/fsck_ffs/fsck.h
index 8091d0f..6ac004e 100644
--- a/sbin/fsck_ffs/fsck.h
+++ b/sbin/fsck_ffs/fsck.h
@@ -220,7 +220,7 @@ struct inodesc {
* To check if a block has been found as a duplicate it is only
* necessary to search from duplist through muldup. To find the
* total number of times that a block has been found as a duplicate
- * the entire list must be searched for occurences of the block
+ * the entire list must be searched for occurrences of the block
* in question. The following diagram shows a sample list where
* w (found twice), x (found once), y (found three times), and z
* (found once) are duplicate block numbers:
@@ -268,7 +268,7 @@ char snapname[BUFSIZ]; /* when doing snapshots, the name of the file */
char *cdevname; /* name of device being checked */
long dev_bsize; /* computed value of DEV_BSIZE */
long secsize; /* actual disk sector size */
-long real_dev_bsize;
+u_int real_dev_bsize; /* actual disk sector size, not overriden */
char nflag; /* assume a no response */
char yflag; /* assume a yes response */
int bkgrdflag; /* use a snapshot to run on an active system */
diff --git a/sbin/fsck_ffs/fsutil.c b/sbin/fsck_ffs/fsutil.c
index 85ea033..59b73c8 100644
--- a/sbin/fsck_ffs/fsutil.c
+++ b/sbin/fsck_ffs/fsutil.c
@@ -717,7 +717,7 @@ dofix(struct inodesc *idesc, const char *msg)
#include <stdarg.h>
/*
- * An unexpected inconsistency occured.
+ * An unexpected inconsistency occurred.
* Die if preening or file system is running with soft dependency protocol,
* otherwise just print message and continue.
*/
diff --git a/sbin/fsck_ffs/gjournal.c b/sbin/fsck_ffs/gjournal.c
index 10c32c0..e8ecaf0 100644
--- a/sbin/fsck_ffs/gjournal.c
+++ b/sbin/fsck_ffs/gjournal.c
@@ -399,7 +399,7 @@ gjournal_check(const char *filesys)
void *p;
struct cgchain *cgc;
struct cg *cgp;
- uint8_t *inosused, *blksfree;
+ uint8_t *inosused;
ino_t cino, ino;
int cg, mode;
@@ -438,7 +438,6 @@ gjournal_check(const char *filesys)
/* We don't want it to be freed in the meantime. */
busycg(cgc);
inosused = cg_inosused(cgp);
- blksfree = cg_blksfree(cgp);
/*
* Now go through the list of all inodes in this cylinder group
* to find unreferenced ones.
diff --git a/sbin/fsck_ffs/pass2.c b/sbin/fsck_ffs/pass2.c
index 5959778..bd9bf97 100644
--- a/sbin/fsck_ffs/pass2.c
+++ b/sbin/fsck_ffs/pass2.c
@@ -613,7 +613,7 @@ fix_extraneous(struct inoinfo *inp, struct inodesc *idesc)
printf(" (IGNORED)\n");
return (0);
}
- if ((cp = rindex(oldname, '/')) == NULL) {
+ if ((cp = strchr(oldname, '/')) == NULL) {
printf(" (IGNORED)\n");
return (0);
}
diff --git a/sbin/fsck_ffs/suj.c b/sbin/fsck_ffs/suj.c
index ec8b5ab..b784519 100644
--- a/sbin/fsck_ffs/suj.c
+++ b/sbin/fsck_ffs/suj.c
@@ -206,7 +206,7 @@ opendisk(const char *devnam)
&real_dev_bsize) == -1)
real_dev_bsize = secsize;
if (debug)
- printf("dev_bsize %ld\n", real_dev_bsize);
+ printf("dev_bsize %u\n", real_dev_bsize);
}
/*
diff --git a/sbin/fsdb/Makefile b/sbin/fsdb/Makefile
index 65333ef..038f82e 100644
--- a/sbin/fsdb/Makefile
+++ b/sbin/fsdb/Makefile
@@ -9,6 +9,10 @@ SRCS= fsdb.c fsdbutil.c \
pass5.c setup.c utilities.c ffs_subr.c ffs_tables.c
CFLAGS+= -I${.CURDIR}/../fsck_ffs
WARNS?= 2
+.if ${CC:T:Mclang} == "clang"
+# Work around a problem with format string warnings and ntohs macros.
+NO_WFORMAT=
+.endif
LDADD= -ledit -ltermcap
DPADD= ${LIBEDIT} ${LIBTERMCAP}
.PATH: ${.CURDIR}/../fsck_ffs ${.CURDIR}/../../sys/ufs/ffs
diff --git a/sbin/fsirand/fsirand.c b/sbin/fsirand/fsirand.c
index c3ae3e0..ca7841a 100644
--- a/sbin/fsirand/fsirand.c
+++ b/sbin/fsirand/fsirand.c
@@ -115,7 +115,7 @@ fsirand(char *device)
caddr_t inodebuf;
ssize_t ibufsize;
struct fs *sblock;
- ino_t inumber, maxino;
+ ino_t inumber;
ufs2_daddr_t sblockloc, dblk;
char sbuf[SBLOCKSIZE], sbuftmp[SBLOCKSIZE];
int i, devfd, n, cg;
@@ -165,7 +165,6 @@ fsirand(char *device)
fprintf(stderr, "Cannot find file system superblock\n");
return (1);
}
- maxino = sblock->fs_ncg * sblock->fs_ipg;
if (sblock->fs_magic == FS_UFS1_MAGIC &&
sblock->fs_old_inodefmt < FS_44INODEFMT) {
diff --git a/sbin/gbde/Makefile b/sbin/gbde/Makefile
index 2abfcb8..3975eb6 100644
--- a/sbin/gbde/Makefile
+++ b/sbin/gbde/Makefile
@@ -7,11 +7,9 @@ SRCS+= rijndael-api-fst.c
SRCS+= sha2.c
SRCS+= g_bde_lock.c
-# rijndael-fst.c does evil casting things which results in warnings on
-# 64 bit machines, the test-vectors check out however, so it works right.
-.if ${MACHINE_CPUARCH} != "i386"
-WARNS?= 3
-.endif
+# rijndael-fst.c does evil casting things which can results in warnings,
+# the test-vectors check out however, so it works right.
+NO_WCAST_ALIGN=
CFLAGS+= -I${.CURDIR}/../../sys
.PATH: ${.CURDIR}/../../sys/geom/bde \
diff --git a/sbin/geom/class/part/geom_part.c b/sbin/geom/class/part/geom_part.c
index 8db0773..8296517 100644
--- a/sbin/geom/class/part/geom_part.c
+++ b/sbin/geom/class/part/geom_part.c
@@ -718,7 +718,7 @@ gpart_backup(struct gctl_req *req, unsigned int fl __unused)
struct ggeom *gp;
const char *s, *scheme;
off_t sector, end;
- off_t length, secsz;
+ off_t length;
int error, i, windex, wblocks, wtype;
if (gctl_get_int(req, "nargs") != 1)
@@ -744,7 +744,6 @@ gpart_backup(struct gctl_req *req, unsigned int fl __unused)
if (scheme == NULL)
abort();
pp = LIST_FIRST(&gp->lg_consumer)->lg_provider;
- secsz = pp->lg_sectorsize;
s = find_geomcfg(gp, "last");
wblocks = strlen(s);
wtype = 0;
diff --git a/sbin/geom/class/part/gpart.8 b/sbin/geom/class/part/gpart.8
index b915316..d8bf62a 100644
--- a/sbin/geom/class/part/gpart.8
+++ b/sbin/geom/class/part/gpart.8
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd November 21, 2011
+.Dd January 8, 2012
.Dt GPART 8
.Os
.Sh NAME
@@ -33,7 +33,7 @@
.Sh SYNOPSIS
To add support for the disk partitioning GEOM class,
place one or more of the following
-lines in your kernel configuration file:
+lines in the kernel configuration file:
.Bd -ragged -offset indent
.Cd "options GEOM_PART_APM"
.Cd "options GEOM_PART_BSD"
@@ -48,7 +48,8 @@ lines in your kernel configuration file:
These options provide support for the various types of partitioning
schemes supported by the
.Ns Nm
-utility. See
+utility.
+See
.Sx "PARTITIONING SCHEMES"
below for more details.
.Pp
@@ -410,13 +411,13 @@ about its use.
.El
.\" ==== RESTORE ====
.It Cm restore
-Restore the partition table from backup previously created by
+Restore the partition table from a backup previously created by the
.Cm backup
-action and given from standard input.
-Only partition table may be restored.
-This action does not affect content of partitions.
-This mean that you should copy your data from backup after restoring
-partition table and write bootcode again if it is needed.
+action and read from standard input.
+Only the partition table is restored.
+This action does not affect the content of partitions.
+After restoring the partition table and writing bootcode if needed,
+user data must be restored from backup.
.Pp
Additional options include:
.Bl -tag -width 10n
@@ -502,8 +503,8 @@ Traditional BSD disklabel, usually used to subdivide MBR partitions.
.Po
This scheme can also be used as the sole partitioning method, without
an MBR.
-Partition editing tools from other operating systems often do not
-understand the bare disklabel partition layout, so this is sometimes
+Partition editing tools from other operating systems often do not
+understand the bare disklabel partition layout, so this is sometimes
called
.Dq dangerously dedicated .
.Pc
@@ -959,17 +960,21 @@ partition that can boot
from a
.Cm freebsd-ufs
partition, and install bootstrap code into it.
-This partition must be larger than
-.Pa /boot/gptboot ,
-or the GPT boot you are planning to write, but smaller than 545 KB.
-A size of 15 blocks (7680 bytes) would be sufficient for
-booting from UFS but 128 blocks (64 KB) is used in
-this example to reserve some space for potential
-future need (e.g.\& a larger
+This partition must be larger than the bootstrap code
+.Po
+usually either
+.Pa /boot/gptboot
+or
.Pa /boot/gptzfsboot
-for booting from a ZFS partition).
+.Pc ,
+but smaller than 545 kB since the first-stage loader will load the
+entire partition into memory during boot, regardless of how much data
+it actually contains.
+This example uses 94 blocks (47 kB) so the next partition will be
+aligned on a 64 kB boundary without the need to specify an explicit
+offset or alignment.
.Bd -literal -offset indent
-/sbin/gpart add -b 34 -s 128 -t freebsd-boot ad0
+/sbin/gpart add -b 34 -s 94 -t freebsd-boot ad0
/sbin/gpart bootcode -p /boot/gptboot -i 1 ad0
.Ed
.Pp
@@ -977,7 +982,7 @@ Create a 512MB-sized
.Cm freebsd-ufs
partition to contain a UFS filesystem from which the system can boot.
.Bd -literal -offset indent
-/sbin/gpart add -b 162 -s 1048576 -t freebsd-ufs ad0
+/sbin/gpart add -s 512M -t freebsd-ufs ad0
.Ed
.Pp
Create an MBR scheme on
diff --git a/sbin/geom/class/raid/graid.8 b/sbin/geom/class/raid/graid.8
index 4166371..4ed3296 100644
--- a/sbin/geom/class/raid/graid.8
+++ b/sbin/geom/class/raid/graid.8
@@ -251,7 +251,7 @@ complete it there.
Do not run GEOM RAID class on migrating volumes under pain of possible data
corruption!
.Sh 2TiB BARRIERS
-Intel and Promise metadata formats do not support disks above 2TiB.
+Promise metadata format does not support disks above 2TiB.
NVIDIA metadata format does not support volumes above 2TiB.
.Sh EXIT STATUS
Exit status is 0 on success, and non-zero if the command fails.
diff --git a/sbin/growfs/growfs.c b/sbin/growfs/growfs.c
index 18b4a05..3e9ba1a 100644
--- a/sbin/growfs/growfs.c
+++ b/sbin/growfs/growfs.c
@@ -374,7 +374,9 @@ initcg(int cylno, time_t modtime, int fso, unsigned int Nflag)
static caddr_t iobuf;
long blkno, start;
ufs2_daddr_t i, cbase, dmax;
+#ifdef FSIRAND
struct ufs1_dinode *dp1;
+#endif
struct csum *cs;
uint d, dupper, dlower;
@@ -452,8 +454,8 @@ initcg(int cylno, time_t modtime, int fso, unsigned int Nflag)
bzero(iobuf, sblock.fs_bsize);
for (i = 0; i < sblock.fs_ipg / INOPF(&sblock);
i += sblock.fs_frag) {
- dp1 = (struct ufs1_dinode *)(void *)iobuf;
#ifdef FSIRAND
+ dp1 = (struct ufs1_dinode *)(void *)iobuf;
for (j = 0; j < INOPB(&sblock); j++) {
dp1->di_gen = random();
dp1++;
diff --git a/sbin/gvinum/gvinum.c b/sbin/gvinum/gvinum.c
index 0544d00..bb4b47d 100644
--- a/sbin/gvinum/gvinum.c
+++ b/sbin/gvinum/gvinum.c
@@ -937,14 +937,12 @@ gvinum_parityop(int argc, char **argv, int rebuild)
struct gctl_req *req;
int flags, i;
const char *errstr;
- char *op, *msg;
+ char *op;
if (rebuild) {
op = "rebuildparity";
- msg = "Rebuilding";
} else {
op = "checkparity";
- msg = "Checking";
}
optreset = 1;
@@ -1057,9 +1055,8 @@ gvinum_rm(int argc, char **argv)
struct gctl_req *req;
int flags, i, j;
const char *errstr;
- char buf[20], *cmd;
+ char buf[20];
- cmd = argv[0];
flags = 0;
optreset = 1;
optind = 1;
diff --git a/sbin/hastctl/Makefile b/sbin/hastctl/Makefile
index af946a2..e7cd9cb 100644
--- a/sbin/hastctl/Makefile
+++ b/sbin/hastctl/Makefile
@@ -20,6 +20,7 @@ SRCS+= y.tab.h
MAN= hastctl.8
NO_WFORMAT=
+NO_WCAST_ALIGN=
CFLAGS+=-I${.CURDIR}/../hastd
CFLAGS+=-DHAVE_CAPSICUM
CFLAGS+=-DINET
diff --git a/sbin/hastctl/hastctl.8 b/sbin/hastctl/hastctl.8
index 8ec2843..31353ca5 100644
--- a/sbin/hastctl/hastctl.8
+++ b/sbin/hastctl/hastctl.8
@@ -97,7 +97,7 @@ If extent size is too small, there will be too much disk activity
related to dirty map updates, which will degrade performance of the
given resource.
If extent size is too large, synchronization, even in case of short
-outage, can take a long time increasing the risk of loosing up-to-date
+outage, can take a long time increasing the risk of losing up-to-date
node before synchronization process is completed.
The default extent size is
.Va 2MB .
diff --git a/sbin/hastctl/hastctl.c b/sbin/hastctl/hastctl.c
index 838e11d..0bd47f2 100644
--- a/sbin/hastctl/hastctl.c
+++ b/sbin/hastctl/hastctl.c
@@ -104,7 +104,7 @@ create_one(struct hast_resource *res, intmax_t mediasize, intmax_t extentsize,
ec = 0;
pjdlog_prefix_set("[%s] ", res->hr_name);
- if (provinfo(res, true) < 0) {
+ if (provinfo(res, true) == -1) {
ec = EX_NOINPUT;
goto end;
}
@@ -146,7 +146,7 @@ create_one(struct hast_resource *res, intmax_t mediasize, intmax_t extentsize,
res->hr_localoff = METADATA_SIZE + mapsize;
- if (metadata_write(res) < 0) {
+ if (metadata_write(res) == -1) {
ec = EX_IOERR;
goto end;
}
@@ -401,15 +401,15 @@ main(int argc, char *argv[])
debug++;
break;
case 'e':
- if (expand_number(optarg, &extentsize) < 0)
+ if (expand_number(optarg, &extentsize) == -1)
errx(EX_USAGE, "Invalid extentsize");
break;
case 'k':
- if (expand_number(optarg, &keepdirty) < 0)
+ if (expand_number(optarg, &keepdirty) == -1)
errx(EX_USAGE, "Invalid keepdirty");
break;
case 'm':
- if (expand_number(optarg, &mediasize) < 0)
+ if (expand_number(optarg, &mediasize) == -1)
errx(EX_USAGE, "Invalid mediasize");
break;
case 'h':
@@ -479,13 +479,13 @@ main(int argc, char *argv[])
}
/* Setup control connection... */
- if (proto_client(NULL, cfg->hc_controladdr, &controlconn) < 0) {
+ if (proto_client(NULL, cfg->hc_controladdr, &controlconn) == -1) {
pjdlog_exit(EX_OSERR,
"Unable to setup control connection to %s",
cfg->hc_controladdr);
}
/* ...and connect to hastd. */
- if (proto_connect(controlconn, HAST_TIMEOUT) < 0) {
+ if (proto_connect(controlconn, HAST_TIMEOUT) == -1) {
pjdlog_exit(EX_OSERR, "Unable to connect to hastd via %s",
cfg->hc_controladdr);
}
@@ -494,14 +494,14 @@ main(int argc, char *argv[])
exit(EX_CONFIG);
/* Send the command to the server... */
- if (hast_proto_send(NULL, controlconn, nv, NULL, 0) < 0) {
+ if (hast_proto_send(NULL, controlconn, nv, NULL, 0) == -1) {
pjdlog_exit(EX_UNAVAILABLE,
"Unable to send command to hastd via %s",
cfg->hc_controladdr);
}
nv_free(nv);
/* ...and receive reply. */
- if (hast_proto_recv_hdr(controlconn, &nv) < 0) {
+ if (hast_proto_recv_hdr(controlconn, &nv) == -1) {
pjdlog_exit(EX_UNAVAILABLE,
"cannot receive reply from hastd via %s",
cfg->hc_controladdr);
diff --git a/sbin/hastd/Makefile b/sbin/hastd/Makefile
index 3c4eef1..2a4a9ce 100644
--- a/sbin/hastd/Makefile
+++ b/sbin/hastd/Makefile
@@ -20,6 +20,7 @@ SRCS+= y.tab.h
MAN= hastd.8 hast.conf.5
NO_WFORMAT=
+NO_WCAST_ALIGN=
CFLAGS+=-I${.CURDIR}
CFLAGS+=-DHAVE_CAPSICUM
CFLAGS+=-DPROTO_TCP_DEFAULT_PORT=8457
@@ -27,9 +28,6 @@ CFLAGS+=-DINET
.if ${MK_INET6_SUPPORT} != "no"
CFLAGS+=-DINET6
.endif
-# This is needed to have WARNS > 1.
-CFLAGS+=-DYY_NO_UNPUT
-CFLAGS+=-DYY_NO_INPUT
DPADD= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} ${LIBL} ${LIBPTHREAD} ${LIBUTIL}
LDADD= -lgeom -lbsdxml -lsbuf -ll -lpthread -lutil
diff --git a/sbin/hastd/activemap.c b/sbin/hastd/activemap.c
index e388bb2..64b95e3 100644
--- a/sbin/hastd/activemap.c
+++ b/sbin/hastd/activemap.c
@@ -219,7 +219,7 @@ keepdirty_add(struct activemap *amp, int extent)
kd = keepdirty_find(amp, extent);
if (kd != NULL) {
/*
- * Only move element at the begining.
+ * Only move element at the beginning.
*/
TAILQ_REMOVE(&amp->am_keepdirty, kd, kd_next);
TAILQ_INSERT_HEAD(&amp->am_keepdirty, kd, kd_next);
@@ -573,7 +573,7 @@ activemap_sync_rewind(struct activemap *amp)
return;
}
/*
- * Mark that we want to start synchronization from the begining.
+ * Mark that we want to start synchronization from the beginning.
*/
amp->am_syncoff = -1;
}
diff --git a/sbin/hastd/control.c b/sbin/hastd/control.c
index 93bfbb7..925fd32 100644
--- a/sbin/hastd/control.c
+++ b/sbin/hastd/control.c
@@ -115,7 +115,7 @@ control_set_role_common(struct hastd_config *cfg, struct nv *nvout,
* doing that work.
*/
if (res->hr_workerpid != 0) {
- if (kill(res->hr_workerpid, SIGTERM) < 0) {
+ if (kill(res->hr_workerpid, SIGTERM) == -1) {
pjdlog_errno(LOG_WARNING,
"Unable to kill worker process %u",
(unsigned int)res->hr_workerpid);
@@ -167,7 +167,7 @@ control_status_worker(struct hast_resource *res, struct nv *nvout,
"Unable to prepare control header");
goto end;
}
- if (hast_proto_send(res, res->hr_ctrl, cnvout, NULL, 0) < 0) {
+ if (hast_proto_send(res, res->hr_ctrl, cnvout, NULL, 0) == -1) {
error = errno;
pjdlog_errno(LOG_ERR, "Unable to send control header");
goto end;
@@ -176,7 +176,7 @@ control_status_worker(struct hast_resource *res, struct nv *nvout,
/*
* Receive response.
*/
- if (hast_proto_recv_hdr(res->hr_ctrl, &cnvin) < 0) {
+ if (hast_proto_recv_hdr(res->hr_ctrl, &cnvin) == -1) {
error = errno;
pjdlog_errno(LOG_ERR, "Unable to receive control header");
goto end;
@@ -293,7 +293,7 @@ control_handle(struct hastd_config *cfg)
uint8_t cmd, role;
int error;
- if (proto_accept(cfg->hc_controlconn, &conn) < 0) {
+ if (proto_accept(cfg->hc_controlconn, &conn) == -1) {
pjdlog_errno(LOG_ERR, "Unable to accept control connection");
return;
}
@@ -302,7 +302,7 @@ control_handle(struct hastd_config *cfg)
nvin = nvout = NULL;
role = HAST_ROLE_UNDEF;
- if (hast_proto_recv_hdr(conn, &nvin) < 0) {
+ if (hast_proto_recv_hdr(conn, &nvin) == -1) {
pjdlog_errno(LOG_ERR, "Unable to receive control header");
nvin = NULL;
goto close;
@@ -312,7 +312,6 @@ control_handle(struct hastd_config *cfg)
cmd = nv_get_uint8(nvin, "cmd");
if (cmd == 0) {
pjdlog_error("Control header is missing 'cmd' field.");
- error = EHAST_INVALID;
goto close;
}
@@ -320,7 +319,6 @@ control_handle(struct hastd_config *cfg)
nvout = nv_alloc();
if (nvout == NULL) {
pjdlog_error("Unable to allocate header for control response.");
- error = EHAST_NOMEMORY;
goto close;
}
@@ -397,7 +395,7 @@ fail:
if (error != 0)
nv_add_int16(nvout, error, "error");
- if (hast_proto_send(NULL, conn, nvout, NULL, 0) < 0)
+ if (hast_proto_send(NULL, conn, nvout, NULL, 0) == -1)
pjdlog_errno(LOG_ERR, "Unable to send control response");
close:
if (nvin != NULL)
@@ -419,7 +417,7 @@ ctrl_thread(void *arg)
uint8_t cmd;
for (;;) {
- if (hast_proto_recv_hdr(res->hr_ctrl, &nvin) < 0) {
+ if (hast_proto_recv_hdr(res->hr_ctrl, &nvin) == -1) {
if (sigexit_received)
pthread_exit(NULL);
pjdlog_errno(LOG_ERR,
@@ -483,7 +481,7 @@ ctrl_thread(void *arg)
nv_free(nvout);
continue;
}
- if (hast_proto_send(NULL, res->hr_ctrl, nvout, NULL, 0) < 0) {
+ if (hast_proto_send(NULL, res->hr_ctrl, nvout, NULL, 0) == -1) {
pjdlog_errno(LOG_ERR,
"Unable to send reply to control message");
}
diff --git a/sbin/hastd/ebuf.c b/sbin/hastd/ebuf.c
index f5908a4..1ae2a26 100644
--- a/sbin/hastd/ebuf.c
+++ b/sbin/hastd/ebuf.c
@@ -116,7 +116,7 @@ ebuf_add_head(struct ebuf *eb, const void *data, size_t size)
* We can't add more entries at the front, so we have to extend
* our buffer.
*/
- if (ebuf_head_extend(eb, size) < 0)
+ if (ebuf_head_extend(eb, size) == -1)
return (-1);
}
PJDLOG_ASSERT(size <= (size_t)(eb->eb_used - eb->eb_start));
@@ -143,7 +143,7 @@ ebuf_add_tail(struct ebuf *eb, const void *data, size_t size)
* We can't add more entries at the back, so we have to extend
* our buffer.
*/
- if (ebuf_tail_extend(eb, size) < 0)
+ if (ebuf_tail_extend(eb, size) == -1)
return (-1);
}
PJDLOG_ASSERT(size <=
diff --git a/sbin/hastd/event.c b/sbin/hastd/event.c
index d895f67..ef65df1 100644
--- a/sbin/hastd/event.c
+++ b/sbin/hastd/event.c
@@ -61,11 +61,11 @@ event_send(const struct hast_resource *res, int event)
"Unable to prepare event header");
goto done;
}
- if (hast_proto_send(res, res->hr_event, nvout, NULL, 0) < 0) {
+ if (hast_proto_send(res, res->hr_event, nvout, NULL, 0) == -1) {
pjdlog_errno(LOG_ERR, "Unable to send event header");
goto done;
}
- if (hast_proto_recv_hdr(res->hr_event, &nvin) < 0) {
+ if (hast_proto_recv_hdr(res->hr_event, &nvin) == -1) {
pjdlog_errno(LOG_ERR, "Unable to receive event header");
goto done;
}
@@ -92,7 +92,7 @@ event_recv(const struct hast_resource *res)
nvin = nvout = NULL;
- if (hast_proto_recv_hdr(res->hr_event, &nvin) < 0) {
+ if (hast_proto_recv_hdr(res->hr_event, &nvin) == -1) {
/*
* First error log as debug. This is because worker process
* most likely exited.
@@ -145,7 +145,7 @@ event_recv(const struct hast_resource *res)
"Unable to prepare event header");
goto fail;
}
- if (hast_proto_send(res, res->hr_event, nvout, NULL, 0) < 0) {
+ if (hast_proto_send(res, res->hr_event, nvout, NULL, 0) == -1) {
pjdlog_errno(LOG_ERR, "Unable to send event header");
goto fail;
}
diff --git a/sbin/hastd/hast.conf.5 b/sbin/hastd/hast.conf.5
index 9ecfa1d..0a0921a 100644
--- a/sbin/hastd/hast.conf.5
+++ b/sbin/hastd/hast.conf.5
@@ -1,8 +1,8 @@
.\" Copyright (c) 2010 The FreeBSD Foundation
-.\" Copyright (c) 2010-2011 Pawel Jakub Dawidek <pawel@dawidek.net>
+.\" Copyright (c) 2010-2012 Pawel Jakub Dawidek <pawel@dawidek.net>
.\" All rights reserved.
.\"
-.\" This software was developed by Pawel Jakub Dawidek under sponsorship from
+.\" This documentation was written by Pawel Jakub Dawidek under sponsorship from
.\" the FreeBSD Foundation.
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -28,7 +28,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd October 27, 2011
+.Dd January 25, 2012
.Dt HAST.CONF 5
.Os
.Sh NAME
@@ -389,7 +389,9 @@ statement.
.Bl -tag -width ".Pa /var/run/hastctl" -compact
.It Pa /etc/hast.conf
The default
-.Nm
+.Xr hastctl 8
+and
+.Xr hastd 8
configuration file.
.It Pa /var/run/hastctl
Control socket used by the
diff --git a/sbin/hastd/hast_checksum.c b/sbin/hastd/hast_checksum.c
index 1133aea..795744e 100644
--- a/sbin/hastd/hast_checksum.c
+++ b/sbin/hastd/hast_checksum.c
@@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$");
#define MAX_HASH_SIZE 4
#endif
-static int
+static void
hast_crc32_checksum(const unsigned char *data, size_t size,
unsigned char *hash, size_t *hsizep)
{
@@ -58,12 +58,10 @@ hast_crc32_checksum(const unsigned char *data, size_t size,
/* XXXPJD: Do we have to use htole32() on crc first? */
bcopy(&crc, hash, sizeof(crc));
*hsizep = sizeof(crc);
-
- return (0);
}
#ifdef HAVE_CRYPTO
-static int
+static void
hast_sha256_checksum(const unsigned char *data, size_t size,
unsigned char *hash, size_t *hsizep)
{
@@ -73,8 +71,6 @@ hast_sha256_checksum(const unsigned char *data, size_t size,
SHA256_Update(&ctx, data, size);
SHA256_Final(hash, &ctx);
*hsizep = SHA256_DIGEST_LENGTH;
-
- return (0);
}
#endif /* HAVE_CRYPTO */
@@ -99,25 +95,21 @@ checksum_send(const struct hast_resource *res, struct nv *nv, void **datap,
{
unsigned char hash[MAX_HASH_SIZE];
size_t hsize;
- int ret;
switch (res->hr_checksum) {
case HAST_CHECKSUM_NONE:
return (0);
case HAST_CHECKSUM_CRC32:
- ret = hast_crc32_checksum(*datap, *sizep, hash, &hsize);
+ hast_crc32_checksum(*datap, *sizep, hash, &hsize);
break;
#ifdef HAVE_CRYPTO
case HAST_CHECKSUM_SHA256:
- ret = hast_sha256_checksum(*datap, *sizep, hash, &hsize);
+ hast_sha256_checksum(*datap, *sizep, hash, &hsize);
break;
#endif
default:
PJDLOG_ABORT("Invalid checksum: %d.", res->hr_checksum);
}
-
- if (ret != 0)
- return (ret);
nv_add_string(nv, checksum_name(res->hr_checksum), "checksum");
nv_add_uint8_array(nv, hash, hsize, "hash");
if (nv_error(nv) != 0) {
@@ -135,7 +127,6 @@ checksum_recv(const struct hast_resource *res __unused, struct nv *nv,
const unsigned char *rhash;
size_t chsize, rhsize;
const char *algo;
- int ret;
algo = nv_get_string(nv, "checksum");
if (algo == NULL)
@@ -146,10 +137,10 @@ checksum_recv(const struct hast_resource *res __unused, struct nv *nv,
return (-1); /* Hash not found. */
}
if (strcmp(algo, "crc32") == 0)
- ret = hast_crc32_checksum(*datap, *sizep, chash, &chsize);
+ hast_crc32_checksum(*datap, *sizep, chash, &chsize);
#ifdef HAVE_CRYPTO
else if (strcmp(algo, "sha256") == 0)
- ret = hast_sha256_checksum(*datap, *sizep, chash, &chsize);
+ hast_sha256_checksum(*datap, *sizep, chash, &chsize);
#endif
else {
pjdlog_error("Unknown checksum algorithm '%s'.", algo);
diff --git a/sbin/hastd/hast_compression.c b/sbin/hastd/hast_compression.c
index 4f4a93a..f524eb1 100644
--- a/sbin/hastd/hast_compression.c
+++ b/sbin/hastd/hast_compression.c
@@ -55,7 +55,7 @@ allzeros(const void *data, size_t size)
* Because inside the loop we don't check at every step, we would
* get an answer only after walking through entire buffer.
* To return early if the buffer doesn't contain all zeros, we probe
- * 8 bytes at the begining, in the middle and at the end of the buffer
+ * 8 bytes at the beginning, in the middle and at the end of the buffer
* first.
*/
diff --git a/sbin/hastd/hast_proto.c b/sbin/hastd/hast_proto.c
index 439b0f3..039e767 100644
--- a/sbin/hastd/hast_proto.c
+++ b/sbin/hastd/hast_proto.c
@@ -114,13 +114,13 @@ hast_proto_send(const struct hast_resource *res, struct proto_conn *conn,
hdr.version = HAST_PROTO_VERSION;
hdr.size = htole32((uint32_t)ebuf_size(eb));
- if (ebuf_add_head(eb, &hdr, sizeof(hdr)) < 0)
+ if (ebuf_add_head(eb, &hdr, sizeof(hdr)) == -1)
goto end;
hptr = ebuf_data(eb, &hsize);
- if (proto_send(conn, hptr, hsize) < 0)
+ if (proto_send(conn, hptr, hsize) == -1)
goto end;
- if (data != NULL && proto_send(conn, dptr, size) < 0)
+ if (data != NULL && proto_send(conn, dptr, size) == -1)
goto end;
ret = 0;
@@ -141,7 +141,7 @@ hast_proto_recv_hdr(const struct proto_conn *conn, struct nv **nvp)
eb = NULL;
nv = NULL;
- if (proto_recv(conn, &hdr, sizeof(hdr)) < 0)
+ if (proto_recv(conn, &hdr, sizeof(hdr)) == -1)
goto fail;
if (hdr.version != HAST_PROTO_VERSION) {
@@ -154,11 +154,11 @@ hast_proto_recv_hdr(const struct proto_conn *conn, struct nv **nvp)
eb = ebuf_alloc(hdr.size);
if (eb == NULL)
goto fail;
- if (ebuf_add_tail(eb, NULL, hdr.size) < 0)
+ if (ebuf_add_tail(eb, NULL, hdr.size) == -1)
goto fail;
hptr = ebuf_data(eb, NULL);
PJDLOG_ASSERT(hptr != NULL);
- if (proto_recv(conn, hptr, hdr.size) < 0)
+ if (proto_recv(conn, hptr, hdr.size) == -1)
goto fail;
nv = nv_ntoh(eb);
if (nv == NULL)
@@ -196,7 +196,7 @@ hast_proto_recv_data(const struct hast_resource *res, struct proto_conn *conn,
} else if (dsize == 0) {
(void)nv_set_error(nv, 0);
} else {
- if (proto_recv(conn, data, dsize) < 0)
+ if (proto_recv(conn, data, dsize) == -1)
goto end;
for (ii = sizeof(pipeline) / sizeof(pipeline[0]); ii > 0;
ii--) {
diff --git a/sbin/hastd/hastd.c b/sbin/hastd/hastd.c
index fdb1c5b..e3b946c 100644
--- a/sbin/hastd/hastd.c
+++ b/sbin/hastd/hastd.c
@@ -68,6 +68,8 @@ static struct hastd_config *cfg;
bool sigexit_received = false;
/* PID file handle. */
struct pidfh *pfh;
+/* Do we run in foreground? */
+static bool foreground;
/* How often check for hooks running for too long. */
#define REPORT_INTERVAL 5
@@ -97,10 +99,10 @@ g_gate_load(void)
void
descriptors_cleanup(struct hast_resource *res)
{
- struct hast_resource *tres;
+ struct hast_resource *tres, *tmres;
struct hastd_listen *lst;
- TAILQ_FOREACH(tres, &cfg->hc_resources, hr_next) {
+ TAILQ_FOREACH_SAFE(tres, &cfg->hc_resources, hr_next, tmres) {
if (tres == res) {
PJDLOG_VERIFY(res->hr_role == HAST_ROLE_SECONDARY ||
(res->hr_remotein == NULL &&
@@ -117,13 +119,17 @@ descriptors_cleanup(struct hast_resource *res)
proto_close(tres->hr_event);
if (tres->hr_conn != NULL)
proto_close(tres->hr_conn);
+ TAILQ_REMOVE(&cfg->hc_resources, tres, hr_next);
+ free(tres);
}
if (cfg->hc_controlin != NULL)
proto_close(cfg->hc_controlin);
proto_close(cfg->hc_controlconn);
- TAILQ_FOREACH(lst, &cfg->hc_listen, hl_next) {
+ while ((lst = TAILQ_FIRST(&cfg->hc_listen)) != NULL) {
+ TAILQ_REMOVE(&cfg->hc_listen, lst, hl_next);
if (lst->hl_conn != NULL)
proto_close(lst->hl_conn);
+ free(lst);
}
(void)pidfile_close(pfh);
hook_fini();
@@ -172,7 +178,7 @@ descriptors_assert(const struct hast_resource *res, int pjdlogmode)
msg[0] = '\0';
maxfd = sysconf(_SC_OPEN_MAX);
- if (maxfd < 0) {
+ if (maxfd == -1) {
pjdlog_init(pjdlogmode);
pjdlog_prefix_set("[%s] (%s) ", res->hr_name,
role2str(res->hr_role));
@@ -450,7 +456,7 @@ resource_reload(const struct hast_resource *res)
pjdlog_error("Unable to allocate header for reload message.");
return;
}
- if (hast_proto_send(res, res->hr_ctrl, nvout, NULL, 0) < 0) {
+ if (hast_proto_send(res, res->hr_ctrl, nvout, NULL, 0) == -1) {
pjdlog_errno(LOG_ERR, "Unable to send reload message");
nv_free(nvout);
return;
@@ -458,7 +464,7 @@ resource_reload(const struct hast_resource *res)
nv_free(nvout);
/* Receive response. */
- if (hast_proto_recv_hdr(res->hr_ctrl, &nvin) < 0) {
+ if (hast_proto_recv_hdr(res->hr_ctrl, &nvin) == -1) {
pjdlog_errno(LOG_ERR, "Unable to receive reload reply");
return;
}
@@ -494,7 +500,7 @@ hastd_reload(void)
*/
if (strcmp(cfg->hc_controladdr, newcfg->hc_controladdr) != 0) {
if (proto_server(newcfg->hc_controladdr,
- &newcfg->hc_controlconn) < 0) {
+ &newcfg->hc_controlconn) == -1) {
pjdlog_errno(LOG_ERR,
"Unable to listen on control address %s",
newcfg->hc_controladdr);
@@ -531,7 +537,7 @@ hastd_reload(void)
/*
* Check if pidfile's path has changed.
*/
- if (strcmp(cfg->hc_pidfile, newcfg->hc_pidfile) != 0) {
+ if (!foreground && strcmp(cfg->hc_pidfile, newcfg->hc_pidfile) != 0) {
newpfh = pidfile_open(newcfg->hc_pidfile, 0600, &otherpid);
if (newpfh == NULL) {
if (errno == EEXIST) {
@@ -543,7 +549,7 @@ hastd_reload(void)
"Unable to open or create pidfile %s",
newcfg->hc_pidfile);
}
- } else if (pidfile_write(newpfh) < 0) {
+ } else if (pidfile_write(newpfh) == -1) {
/* Write PID to a file. */
pjdlog_errno(LOG_WARNING,
"Unable to write PID to file %s",
@@ -571,10 +577,14 @@ hastd_reload(void)
/*
* Switch to new pidfile.
*/
- (void)pidfile_remove(pfh);
- pfh = newpfh;
- (void)strlcpy(cfg->hc_pidfile, newcfg->hc_pidfile,
- sizeof(cfg->hc_pidfile));
+ if (newpfh != NULL) {
+ pjdlog_info("Pidfile changed from %s to %s.", cfg->hc_pidfile,
+ newcfg->hc_pidfile);
+ (void)pidfile_remove(pfh);
+ pfh = newpfh;
+ (void)strlcpy(cfg->hc_pidfile, newcfg->hc_pidfile,
+ sizeof(cfg->hc_pidfile));
+ }
/*
* Switch to new listen addresses. Close all that were removed.
*/
@@ -742,7 +752,7 @@ listen_accept(struct hastd_listen *lst)
proto_local_address(lst->hl_conn, laddr, sizeof(laddr));
pjdlog_debug(1, "Accepting connection to %s.", laddr);
- if (proto_accept(lst->hl_conn, &conn) < 0) {
+ if (proto_accept(lst->hl_conn, &conn) == -1) {
pjdlog_errno(LOG_ERR, "Unable to accept connection %s", laddr);
return;
}
@@ -752,7 +762,7 @@ listen_accept(struct hastd_listen *lst)
pjdlog_info("Connection from %s to %s.", raddr, laddr);
/* Error in setting timeout is not critical, but why should it fail? */
- if (proto_timeout(conn, HAST_TIMEOUT) < 0)
+ if (proto_timeout(conn, HAST_TIMEOUT) == -1)
pjdlog_errno(LOG_WARNING, "Unable to set connection timeout");
nvin = nvout = nverr = NULL;
@@ -771,7 +781,7 @@ listen_accept(struct hastd_listen *lst)
}
/* Ok, remote host can access at least one resource. */
- if (hast_proto_recv_hdr(conn, &nvin) < 0) {
+ if (hast_proto_recv_hdr(conn, &nvin) == -1) {
pjdlog_errno(LOG_ERR, "Unable to receive header from %s",
raddr);
goto close;
@@ -786,7 +796,7 @@ listen_accept(struct hastd_listen *lst)
pjdlog_debug(2, "%s: resource=%s", raddr, resname);
token = nv_get_uint8_array(nvin, &size, "token");
/*
- * NULL token means that this is first conection.
+ * NULL token means that this is first connection.
*/
if (token != NULL && size != sizeof(res->hr_token)) {
pjdlog_error("Received token of invalid size from %s (expected %zu, got %zu).",
@@ -859,7 +869,7 @@ listen_accept(struct hastd_listen *lst)
"Worker process exists (pid=%u), stopping it.",
(unsigned int)res->hr_workerpid);
/* Stop child process. */
- if (kill(res->hr_workerpid, SIGINT) < 0) {
+ if (kill(res->hr_workerpid, SIGINT) == -1) {
pjdlog_errno(LOG_ERR,
"Unable to stop worker process (pid=%u)",
(unsigned int)res->hr_workerpid);
@@ -909,7 +919,7 @@ listen_accept(struct hastd_listen *lst)
strerror(nv_error(nvout)));
goto fail;
}
- if (hast_proto_send(NULL, conn, nvout, NULL, 0) < 0) {
+ if (hast_proto_send(NULL, conn, nvout, NULL, 0) == -1) {
int error = errno;
pjdlog_errno(LOG_ERR, "Unable to send response to %s",
@@ -938,7 +948,7 @@ fail:
"Unable to prepare error header for %s", raddr);
goto close;
}
- if (hast_proto_send(NULL, conn, nverr, NULL, 0) < 0) {
+ if (hast_proto_send(NULL, conn, nverr, NULL, 0) == -1) {
pjdlog_errno(LOG_ERR, "Unable to send error to %s", raddr);
goto close;
}
@@ -963,20 +973,20 @@ connection_migrate(struct hast_resource *res)
PJDLOG_ASSERT(res->hr_role == HAST_ROLE_PRIMARY);
- if (proto_recv(res->hr_conn, &val, sizeof(val)) < 0) {
+ if (proto_recv(res->hr_conn, &val, sizeof(val)) == -1) {
pjdlog_errno(LOG_WARNING,
"Unable to receive connection command");
return;
}
if (proto_client(res->hr_sourceaddr[0] != '\0' ? res->hr_sourceaddr : NULL,
- res->hr_remoteaddr, &conn) < 0) {
+ res->hr_remoteaddr, &conn) == -1) {
val = errno;
pjdlog_errno(LOG_WARNING,
"Unable to create outgoing connection to %s",
res->hr_remoteaddr);
goto out;
}
- if (proto_connect(conn, -1) < 0) {
+ if (proto_connect(conn, -1) == -1) {
val = errno;
pjdlog_errno(LOG_WARNING, "Unable to connect to %s",
res->hr_remoteaddr);
@@ -985,11 +995,11 @@ connection_migrate(struct hast_resource *res)
}
val = 0;
out:
- if (proto_send(res->hr_conn, &val, sizeof(val)) < 0) {
+ if (proto_send(res->hr_conn, &val, sizeof(val)) == -1) {
pjdlog_errno(LOG_WARNING,
"Unable to send reply to connection request");
}
- if (val == 0 && proto_connection_send(res->hr_conn, conn) < 0)
+ if (val == 0 && proto_connection_send(res->hr_conn, conn) == -1)
pjdlog_errno(LOG_WARNING, "Unable to send connection");
pjdlog_prefix_set("%s", "");
@@ -1155,7 +1165,6 @@ main(int argc, char *argv[])
struct hastd_listen *lst;
const char *pidfile;
pid_t otherpid;
- bool foreground;
int debuglevel;
sigset_t mask;
@@ -1220,16 +1229,23 @@ main(int argc, char *argv[])
pjdlog_exitx(EX_CONFIG, "Pidfile path is too long.");
}
}
- pfh = pidfile_open(cfg->hc_pidfile, 0600, &otherpid);
- if (pfh == NULL) {
- if (errno == EEXIST) {
- pjdlog_exitx(EX_TEMPFAIL,
- "Another hastd is already running, pidfile: %s, pid: %jd.",
- cfg->hc_pidfile, (intmax_t)otherpid);
+
+ if (!foreground) {
+ pfh = pidfile_open(cfg->hc_pidfile, 0600, &otherpid);
+ if (pfh == NULL) {
+ if (errno == EEXIST) {
+ pjdlog_exitx(EX_TEMPFAIL,
+ "Another hastd is already running, pidfile: %s, pid: %jd.",
+ cfg->hc_pidfile, (intmax_t)otherpid);
+ }
+ /*
+ * If we cannot create pidfile for other reasons,
+ * only warn.
+ */
+ pjdlog_errno(LOG_WARNING,
+ "Unable to open or create pidfile %s",
+ cfg->hc_pidfile);
}
- /* If we cannot create pidfile for other reasons, only warn. */
- pjdlog_errno(LOG_WARNING, "Unable to open or create pidfile %s",
- cfg->hc_pidfile);
}
/*
@@ -1253,14 +1269,14 @@ main(int argc, char *argv[])
PJDLOG_VERIFY(sigprocmask(SIG_SETMASK, &mask, NULL) == 0);
/* Listen on control address. */
- if (proto_server(cfg->hc_controladdr, &cfg->hc_controlconn) < 0) {
+ if (proto_server(cfg->hc_controladdr, &cfg->hc_controlconn) == -1) {
KEEP_ERRNO((void)pidfile_remove(pfh));
pjdlog_exit(EX_OSERR, "Unable to listen on control address %s",
cfg->hc_controladdr);
}
/* Listen for remote connections. */
TAILQ_FOREACH(lst, &cfg->hc_listen, hl_next) {
- if (proto_server(lst->hl_addr, &lst->hl_conn) < 0) {
+ if (proto_server(lst->hl_addr, &lst->hl_conn) == -1) {
KEEP_ERRNO((void)pidfile_remove(pfh));
pjdlog_exit(EX_OSERR, "Unable to listen on address %s",
lst->hl_addr);
@@ -1268,7 +1284,7 @@ main(int argc, char *argv[])
}
if (!foreground) {
- if (daemon(0, 0) < 0) {
+ if (daemon(0, 0) == -1) {
KEEP_ERRNO((void)pidfile_remove(pfh));
pjdlog_exit(EX_OSERR, "Unable to daemonize");
}
@@ -1277,7 +1293,7 @@ main(int argc, char *argv[])
pjdlog_mode_set(PJDLOG_MODE_SYSLOG);
/* Write PID to a file. */
- if (pidfile_write(pfh) < 0) {
+ if (pidfile_write(pfh) == -1) {
pjdlog_errno(LOG_WARNING,
"Unable to write PID to a file %s",
cfg->hc_pidfile);
diff --git a/sbin/hastd/hooks.c b/sbin/hastd/hooks.c
index 60d48d1..b1886ca 100644
--- a/sbin/hastd/hooks.c
+++ b/sbin/hastd/hooks.c
@@ -105,26 +105,26 @@ descriptors(void)
* Redirect stdin, stdout and stderr to /dev/null.
*/
fd = open(_PATH_DEVNULL, O_RDONLY);
- if (fd < 0) {
+ if (fd == -1) {
pjdlog_errno(LOG_WARNING, "Unable to open %s for reading",
_PATH_DEVNULL);
} else if (fd != STDIN_FILENO) {
- if (dup2(fd, STDIN_FILENO) < 0) {
+ if (dup2(fd, STDIN_FILENO) == -1) {
pjdlog_errno(LOG_WARNING,
"Unable to duplicate descriptor for stdin");
}
close(fd);
}
fd = open(_PATH_DEVNULL, O_WRONLY);
- if (fd < 0) {
+ if (fd == -1) {
pjdlog_errno(LOG_WARNING, "Unable to open %s for writing",
_PATH_DEVNULL);
} else {
- if (fd != STDOUT_FILENO && dup2(fd, STDOUT_FILENO) < 0) {
+ if (fd != STDOUT_FILENO && dup2(fd, STDOUT_FILENO) == -1) {
pjdlog_errno(LOG_WARNING,
"Unable to duplicate descriptor for stdout");
}
- if (fd != STDERR_FILENO && dup2(fd, STDERR_FILENO) < 0) {
+ if (fd != STDERR_FILENO && dup2(fd, STDERR_FILENO) == -1) {
pjdlog_errno(LOG_WARNING,
"Unable to duplicate descriptor for stderr");
}
diff --git a/sbin/hastd/lzf.h b/sbin/hastd/lzf.h
index 92fdd0f..d9563ef 100644
--- a/sbin/hastd/lzf.h
+++ b/sbin/hastd/lzf.h
@@ -146,7 +146,7 @@ lzf_decompress (const void *const in_data, unsigned int in_len,
/*
* Avoid assigning values to errno variable? for some embedding purposes
- * (linux kernel for example), this is neccessary. NOTE: this breaks
+ * (linux kernel for example), this is necessary. NOTE: this breaks
* the documentation in lzf.h.
*/
#ifndef AVOID_ERRNO
@@ -167,7 +167,7 @@ lzf_decompress (const void *const in_data, unsigned int in_len,
* and return EINVAL if the input stream has been corrupted. This
* only shields against overflowing the input buffer and will not
* detect most corrupted streams.
- * This check is not normally noticable on modern hardware
+ * This check is not normally noticeable on modern hardware
* (<1% slowdown), but might slow down older cpus considerably.
*/
#ifndef CHECK_INPUT
diff --git a/sbin/hastd/metadata.c b/sbin/hastd/metadata.c
index ad6c75b..6d9f366 100644
--- a/sbin/hastd/metadata.c
+++ b/sbin/hastd/metadata.c
@@ -61,14 +61,14 @@ metadata_read(struct hast_resource *res, bool openrw)
* Is this first metadata_read() call for this resource?
*/
if (res->hr_localfd == -1) {
- if (provinfo(res, openrw) < 0) {
+ if (provinfo(res, openrw) == -1) {
rerrno = errno;
goto fail;
}
opened_here = true;
pjdlog_debug(1, "Obtained info about %s.", res->hr_localpath);
if (openrw) {
- if (flock(res->hr_localfd, LOCK_EX | LOCK_NB) < 0) {
+ if (flock(res->hr_localfd, LOCK_EX | LOCK_NB) == -1) {
rerrno = errno;
if (errno == EOPNOTSUPP) {
pjdlog_warning("Unable to lock %s (operation not supported), but continuing.",
@@ -91,7 +91,7 @@ metadata_read(struct hast_resource *res, bool openrw)
"Unable to allocate memory to read metadata");
goto fail;
}
- if (ebuf_add_tail(eb, NULL, METADATA_SIZE) < 0) {
+ if (ebuf_add_tail(eb, NULL, METADATA_SIZE) == -1) {
rerrno = errno;
pjdlog_errno(LOG_ERR,
"Unable to allocate memory to read metadata");
@@ -101,7 +101,7 @@ metadata_read(struct hast_resource *res, bool openrw)
buf = ebuf_data(eb, NULL);
PJDLOG_ASSERT(buf != NULL);
done = pread(res->hr_localfd, buf, METADATA_SIZE, 0);
- if (done < 0 || done != METADATA_SIZE) {
+ if (done == -1 || done != METADATA_SIZE) {
rerrno = errno;
pjdlog_errno(LOG_ERR, "Unable to read metadata");
ebuf_free(eb);
@@ -213,7 +213,7 @@ metadata_write(struct hast_resource *res)
PJDLOG_ASSERT(size < METADATA_SIZE);
bcopy(ptr, buf, size);
done = pwrite(res->hr_localfd, buf, METADATA_SIZE, 0);
- if (done < 0 || done != METADATA_SIZE) {
+ if (done == -1 || done != METADATA_SIZE) {
pjdlog_errno(LOG_ERR, "Unable to write metadata");
goto end;
}
diff --git a/sbin/hastd/nv.c b/sbin/hastd/nv.c
index 89c174a..a884a3c 100644
--- a/sbin/hastd/nv.c
+++ b/sbin/hastd/nv.c
@@ -385,7 +385,7 @@ nv_ntoh(struct ebuf *eb)
nv->nv_ebuf = eb;
nv->nv_magic = NV_MAGIC;
- if (nv_validate(nv, &extra) < 0) {
+ if (nv_validate(nv, &extra) == -1) {
rerrno = errno;
nv->nv_magic = 0;
free(nv);
@@ -480,7 +480,7 @@ nv_add_stringv(struct nv *nv, const char *name, const char *valuefmt,
ssize_t size;
size = vasprintf(&value, valuefmt, valueap);
- if (size < 0) {
+ if (size == -1) {
if (nv->nv_error == 0)
nv->nv_error = ENOMEM;
return;
@@ -627,7 +627,7 @@ nv_dump(struct nv *nv)
unsigned int ii;
bool swap;
- if (nv_validate(nv, NULL) < 0) {
+ if (nv_validate(nv, NULL) == -1) {
printf("error: %d\n", errno);
return;
}
@@ -784,7 +784,7 @@ nv_add(struct nv *nv, const unsigned char *value, size_t vsize, int type,
bcopy(name, nvh->nvh_name, namesize);
/* Add header first. */
- if (ebuf_add_tail(nv->nv_ebuf, nvh, NVH_HSIZE(nvh)) < 0) {
+ if (ebuf_add_tail(nv->nv_ebuf, nvh, NVH_HSIZE(nvh)) == -1) {
PJDLOG_ASSERT(errno != 0);
if (nv->nv_error == 0)
nv->nv_error = errno;
@@ -793,7 +793,7 @@ nv_add(struct nv *nv, const unsigned char *value, size_t vsize, int type,
}
free(nvh);
/* Add the actual data. */
- if (ebuf_add_tail(nv->nv_ebuf, value, vsize) < 0) {
+ if (ebuf_add_tail(nv->nv_ebuf, value, vsize) == -1) {
PJDLOG_ASSERT(errno != 0);
if (nv->nv_error == 0)
nv->nv_error = errno;
@@ -804,7 +804,7 @@ nv_add(struct nv *nv, const unsigned char *value, size_t vsize, int type,
if (vsize == 0)
return;
PJDLOG_ASSERT(vsize > 0 && vsize <= sizeof(align));
- if (ebuf_add_tail(nv->nv_ebuf, align, vsize) < 0) {
+ if (ebuf_add_tail(nv->nv_ebuf, align, vsize) == -1) {
PJDLOG_ASSERT(errno != 0);
if (nv->nv_error == 0)
nv->nv_error = errno;
diff --git a/sbin/hastd/parse.y b/sbin/hastd/parse.y
index 72d24b4..eefd591 100644
--- a/sbin/hastd/parse.y
+++ b/sbin/hastd/parse.y
@@ -369,8 +369,8 @@ yy_config_free(struct hastd_config *config)
}
%}
-%token CONTROL PIDFILE LISTEN PORT REPLICATION CHECKSUM COMPRESSION METAFLUSH
-%token TIMEOUT EXEC EXTENTSIZE RESOURCE NAME LOCAL REMOTE SOURCE ON OFF
+%token CONTROL PIDFILE LISTEN REPLICATION CHECKSUM COMPRESSION METAFLUSH
+%token TIMEOUT EXEC RESOURCE NAME LOCAL REMOTE SOURCE ON OFF
%token FULLSYNC MEMSYNC ASYNC NONE CRC32 SHA256 HOLE LZF
%token NUM STR OB CB
@@ -812,6 +812,7 @@ resource_start: STR
sizeof(curres->hr_name)) >=
sizeof(curres->hr_name)) {
pjdlog_error("Resource name is too long.");
+ free(curres);
free($1);
return (1);
}
diff --git a/sbin/hastd/pjdlog.h b/sbin/hastd/pjdlog.h
index 0f01f79..bae431e 100644
--- a/sbin/hastd/pjdlog.h
+++ b/sbin/hastd/pjdlog.h
@@ -95,7 +95,7 @@ void pjdlog_abort(const char *func, const char *file, int line,
#define PJDLOG_VERIFY(expr) do { \
if (!(expr)) { \
pjdlog_abort(__func__, __FILE__, __LINE__, #expr, \
- __func__); \
+ "%s", __func__); \
} \
} while (0)
#define PJDLOG_RVERIFY(expr, ...) do { \
diff --git a/sbin/hastd/primary.c b/sbin/hastd/primary.c
index be1d7bb..ca1ab53 100644
--- a/sbin/hastd/primary.c
+++ b/sbin/hastd/primary.c
@@ -254,7 +254,7 @@ cleanup(struct hast_resource *res)
ggiod.gctl_version = G_GATE_VERSION;
ggiod.gctl_unit = res->hr_ggateunit;
ggiod.gctl_force = 1;
- if (ioctl(res->hr_ggatefd, G_GATE_CMD_DESTROY, &ggiod) < 0) {
+ if (ioctl(res->hr_ggatefd, G_GATE_CMD_DESTROY, &ggiod) == -1) {
pjdlog_errno(LOG_WARNING,
"Unable to destroy hast/%s device",
res->hr_provname);
@@ -451,7 +451,7 @@ init_resuid(struct hast_resource *res)
/* Initialize unique resource identifier. */
arc4random_buf(&res->hr_resuid, sizeof(res->hr_resuid));
mtx_unlock(&metadata_lock);
- if (metadata_write(res) < 0)
+ if (metadata_write(res) == -1)
exit(EX_NOINPUT);
return (true);
}
@@ -463,19 +463,19 @@ init_local(struct hast_resource *res)
unsigned char *buf;
size_t mapsize;
- if (metadata_read(res, true) < 0)
+ if (metadata_read(res, true) == -1)
exit(EX_NOINPUT);
mtx_init(&res->hr_amp_lock);
if (activemap_init(&res->hr_amp, res->hr_datasize, res->hr_extentsize,
- res->hr_local_sectorsize, res->hr_keepdirty) < 0) {
+ res->hr_local_sectorsize, res->hr_keepdirty) == -1) {
primary_exit(EX_TEMPFAIL, "Unable to create activemap");
}
mtx_init(&range_lock);
cv_init(&range_regular_cond);
- if (rangelock_init(&range_regular) < 0)
+ if (rangelock_init(&range_regular) == -1)
primary_exit(EX_TEMPFAIL, "Unable to create regular range lock");
cv_init(&range_sync_cond);
- if (rangelock_init(&range_sync) < 0)
+ if (rangelock_init(&range_sync) == -1)
primary_exit(EX_TEMPFAIL, "Unable to create sync range lock");
mapsize = activemap_ondisk_size(res->hr_amp);
buf = calloc(1, mapsize);
@@ -500,7 +500,7 @@ init_local(struct hast_resource *res)
*/
res->hr_primary_localcnt = 0;
res->hr_primary_remotecnt = 0;
- if (metadata_write(res) < 0)
+ if (metadata_write(res) == -1)
exit(EX_NOINPUT);
}
@@ -511,11 +511,11 @@ primary_connect(struct hast_resource *res, struct proto_conn **connp)
int16_t val;
val = 1;
- if (proto_send(res->hr_conn, &val, sizeof(val)) < 0) {
+ if (proto_send(res->hr_conn, &val, sizeof(val)) == -1) {
primary_exit(EX_TEMPFAIL,
"Unable to send connection request to parent");
}
- if (proto_recv(res->hr_conn, &val, sizeof(val)) < 0) {
+ if (proto_recv(res->hr_conn, &val, sizeof(val)) == -1) {
primary_exit(EX_TEMPFAIL,
"Unable to receive reply to connection request from parent");
}
@@ -525,18 +525,18 @@ primary_connect(struct hast_resource *res, struct proto_conn **connp)
res->hr_remoteaddr);
return (-1);
}
- if (proto_connection_recv(res->hr_conn, true, &conn) < 0) {
+ if (proto_connection_recv(res->hr_conn, true, &conn) == -1) {
primary_exit(EX_TEMPFAIL,
"Unable to receive connection from parent");
}
- if (proto_connect_wait(conn, res->hr_timeout) < 0) {
+ if (proto_connect_wait(conn, res->hr_timeout) == -1) {
pjdlog_errno(LOG_WARNING, "Unable to connect to %s",
res->hr_remoteaddr);
proto_close(conn);
return (-1);
}
/* Error in setting timeout is not critical, but why should it fail? */
- if (proto_timeout(conn, res->hr_timeout) < 0)
+ if (proto_timeout(conn, res->hr_timeout) == -1)
pjdlog_errno(LOG_WARNING, "Unable to set connection timeout");
*connp = conn;
@@ -583,7 +583,7 @@ init_remote(struct hast_resource *res, struct proto_conn **inp,
nv_free(nvout);
goto close;
}
- if (hast_proto_send(res, out, nvout, NULL, 0) < 0) {
+ if (hast_proto_send(res, out, nvout, NULL, 0) == -1) {
pjdlog_errno(LOG_WARNING,
"Unable to send handshake header to %s",
res->hr_remoteaddr);
@@ -591,7 +591,7 @@ init_remote(struct hast_resource *res, struct proto_conn **inp,
goto close;
}
nv_free(nvout);
- if (hast_proto_recv_hdr(out, &nvin) < 0) {
+ if (hast_proto_recv_hdr(out, &nvin) == -1) {
pjdlog_errno(LOG_WARNING,
"Unable to receive handshake header from %s",
res->hr_remoteaddr);
@@ -655,7 +655,7 @@ init_remote(struct hast_resource *res, struct proto_conn **inp,
nv_free(nvout);
goto close;
}
- if (hast_proto_send(res, in, nvout, NULL, 0) < 0) {
+ if (hast_proto_send(res, in, nvout, NULL, 0) == -1) {
pjdlog_errno(LOG_WARNING,
"Unable to send handshake header to %s",
res->hr_remoteaddr);
@@ -663,7 +663,7 @@ init_remote(struct hast_resource *res, struct proto_conn **inp,
goto close;
}
nv_free(nvout);
- if (hast_proto_recv_hdr(out, &nvin) < 0) {
+ if (hast_proto_recv_hdr(out, &nvin) == -1) {
pjdlog_errno(LOG_WARNING,
"Unable to receive handshake header from %s",
res->hr_remoteaddr);
@@ -726,7 +726,7 @@ init_remote(struct hast_resource *res, struct proto_conn **inp,
* download its activemap.
*/
if (hast_proto_recv_data(res, out, nvin, map,
- mapsize) < 0) {
+ mapsize) == -1) {
pjdlog_errno(LOG_ERR,
"Unable to receive remote activemap");
nv_free(nvin);
@@ -801,7 +801,7 @@ init_ggate(struct hast_resource *res)
* We communicate with ggate via /dev/ggctl. Open it.
*/
res->hr_ggatefd = open("/dev/" G_GATE_CTL_NAME, O_RDWR);
- if (res->hr_ggatefd < 0)
+ if (res->hr_ggatefd == -1)
primary_exit(EX_OSFILE, "Unable to open /dev/" G_GATE_CTL_NAME);
/*
* Create provider before trying to connect, as connection failure
@@ -859,7 +859,7 @@ hastd_primary(struct hast_resource *res)
* Create communication channel for sending control commands from
* parent to child.
*/
- if (proto_client(NULL, "socketpair://", &res->hr_ctrl) < 0) {
+ if (proto_client(NULL, "socketpair://", &res->hr_ctrl) == -1) {
/* TODO: There's no need for this to be fatal error. */
KEEP_ERRNO((void)pidfile_remove(pfh));
pjdlog_exit(EX_OSERR,
@@ -868,7 +868,7 @@ hastd_primary(struct hast_resource *res)
/*
* Create communication channel for sending events from child to parent.
*/
- if (proto_client(NULL, "socketpair://", &res->hr_event) < 0) {
+ if (proto_client(NULL, "socketpair://", &res->hr_event) == -1) {
/* TODO: There's no need for this to be fatal error. */
KEEP_ERRNO((void)pidfile_remove(pfh));
pjdlog_exit(EX_OSERR,
@@ -878,7 +878,7 @@ hastd_primary(struct hast_resource *res)
* Create communication channel for sending connection requests from
* child to parent.
*/
- if (proto_client(NULL, "socketpair://", &res->hr_conn) < 0) {
+ if (proto_client(NULL, "socketpair://", &res->hr_conn) == -1) {
/* TODO: There's no need for this to be fatal error. */
KEEP_ERRNO((void)pidfile_remove(pfh));
pjdlog_exit(EX_OSERR,
@@ -886,7 +886,7 @@ hastd_primary(struct hast_resource *res)
}
pid = fork();
- if (pid < 0) {
+ if (pid == -1) {
/* TODO: There's no need for this to be fatal error. */
KEEP_ERRNO((void)pidfile_remove(pfh));
pjdlog_exit(EX_TEMPFAIL, "Unable to fork");
@@ -933,7 +933,7 @@ hastd_primary(struct hast_resource *res)
/*
* Create the guard thread first, so we can handle signals from the
- * very begining.
+ * very beginning.
*/
error = pthread_create(&td, NULL, guard_thread, res);
PJDLOG_ASSERT(error == 0);
@@ -1095,7 +1095,7 @@ write_complete(struct hast_resource *res, struct hio *hio)
mtx_unlock(&metadata_lock);
}
rw_unlock(&hio_remote_lock[ncomp]);
- if (ioctl(res->hr_ggatefd, G_GATE_CMD_DONE, ggio) < 0)
+ if (ioctl(res->hr_ggatefd, G_GATE_CMD_DONE, ggio) == -1)
primary_exit(EX_OSERR, "G_GATE_CMD_DONE failed");
hio->hio_done = true;
}
@@ -1133,7 +1133,7 @@ ggate_recv_thread(void *arg)
pjdlog_debug(2,
"ggate_recv: (%p) Waiting for request from the kernel.",
hio);
- if (ioctl(res->hr_ggatefd, G_GATE_CMD_START, ggio) < 0) {
+ if (ioctl(res->hr_ggatefd, G_GATE_CMD_START, ggio) == -1) {
if (sigexit_received)
pthread_exit(NULL);
primary_exit(EX_OSERR, "G_GATE_CMD_START failed");
@@ -1225,7 +1225,7 @@ ggate_recv_thread(void *arg)
continue;
}
if (rangelock_add(range_regular,
- ggio->gctl_offset, ggio->gctl_length) < 0) {
+ ggio->gctl_offset, ggio->gctl_length) == -1) {
mtx_unlock(&range_lock);
pjdlog_debug(2,
"regular: Range offset=%jd length=%zu is already locked, waiting.",
@@ -1296,7 +1296,7 @@ local_send_thread(void *arg)
/*
* If READ failed, try to read from remote node.
*/
- if (ret < 0) {
+ if (ret == -1) {
reqlog(LOG_WARNING, 0, ggio,
"Local request failed (%s), trying remote node. ",
strerror(errno));
@@ -1313,7 +1313,7 @@ local_send_thread(void *arg)
ret = pwrite(res->hr_localfd, ggio->gctl_data,
ggio->gctl_length,
ggio->gctl_offset + res->hr_localoff);
- if (ret < 0) {
+ if (ret == -1) {
hio->hio_errors[ncomp] = errno;
reqlog(LOG_WARNING, 0, ggio,
"Local request failed (%s): ",
@@ -1336,7 +1336,7 @@ local_send_thread(void *arg)
ret = g_delete(res->hr_localfd,
ggio->gctl_offset + res->hr_localoff,
ggio->gctl_length);
- if (ret < 0) {
+ if (ret == -1) {
hio->hio_errors[ncomp] = errno;
reqlog(LOG_WARNING, 0, ggio,
"Local request failed (%s): ",
@@ -1352,7 +1352,7 @@ local_send_thread(void *arg)
break;
}
ret = g_flush(res->hr_localfd);
- if (ret < 0) {
+ if (ret == -1) {
if (errno == EOPNOTSUPP)
res->hr_localflush = false;
hio->hio_errors[ncomp] = errno;
@@ -1406,7 +1406,7 @@ keepalive_send(struct hast_resource *res, unsigned int ncomp)
"keepalive_send: Unable to prepare header to send.");
return;
}
- if (hast_proto_send(res, res->hr_remoteout, nv, NULL, 0) < 0) {
+ if (hast_proto_send(res, res->hr_remoteout, nv, NULL, 0) == -1) {
rw_unlock(&hio_remote_lock[ncomp]);
pjdlog_common(LOG_DEBUG, 1, errno,
"keepalive_send: Unable to send request");
@@ -1520,7 +1520,7 @@ remote_send_thread(void *arg)
TAILQ_INSERT_TAIL(&hio_recv_list[ncomp], hio, hio_next[ncomp]);
mtx_unlock(&hio_recv_list_lock[ncomp]);
if (hast_proto_send(res, res->hr_remoteout, nv, data,
- data != NULL ? length : 0) < 0) {
+ data != NULL ? length : 0) == -1) {
hio->hio_errors[ncomp] = errno;
rw_unlock(&hio_remote_lock[ncomp]);
pjdlog_debug(2,
@@ -1617,7 +1617,7 @@ remote_recv_thread(void *arg)
mtx_unlock(&hio_recv_list_lock[ncomp]);
goto done_queue;
}
- if (hast_proto_recv_hdr(res->hr_remotein, &nv) < 0) {
+ if (hast_proto_recv_hdr(res->hr_remotein, &nv) == -1) {
pjdlog_errno(LOG_ERR,
"Unable to receive reply header");
rw_unlock(&hio_remote_lock[ncomp]);
@@ -1665,7 +1665,7 @@ remote_recv_thread(void *arg)
goto done_queue;
}
if (hast_proto_recv_data(res, res->hr_remotein, nv,
- ggio->gctl_data, ggio->gctl_length) < 0) {
+ ggio->gctl_data, ggio->gctl_length) == -1) {
hio->hio_errors[ncomp] = errno;
pjdlog_errno(LOG_ERR,
"Unable to receive reply data");
@@ -1766,7 +1766,7 @@ ggate_send_thread(void *arg)
if (!hio->hio_done)
write_complete(res, hio);
} else {
- if (ioctl(res->hr_ggatefd, G_GATE_CMD_DONE, ggio) < 0) {
+ if (ioctl(res->hr_ggatefd, G_GATE_CMD_DONE, ggio) == -1) {
primary_exit(EX_OSERR,
"G_GATE_CMD_DONE failed");
}
@@ -1834,7 +1834,7 @@ sync_thread(void *arg __unused)
mtx_unlock(&res->hr_amp_lock);
if (dorewind) {
dorewind = false;
- if (offset < 0)
+ if (offset == -1)
pjdlog_info("Nodes are in sync.");
else {
pjdlog_info("Synchronization started. %NB to go.",
@@ -1844,7 +1844,7 @@ sync_thread(void *arg __unused)
gettimeofday(&tstart, NULL);
}
}
- if (offset < 0) {
+ if (offset == -1) {
sync_stop();
pjdlog_debug(1, "Nothing to synchronize.");
/*
@@ -1903,7 +1903,7 @@ sync_thread(void *arg __unused)
mtx_unlock(&range_lock);
continue;
}
- if (rangelock_add(range_sync, offset, length) < 0) {
+ if (rangelock_add(range_sync, offset, length) == -1) {
mtx_unlock(&range_lock);
pjdlog_debug(2,
"sync: Range offset=%jd length=%jd is already locked, waiting.",
@@ -2124,12 +2124,12 @@ primary_config_reload(struct hast_resource *res, struct nv *nv)
}
rw_unlock(&hio_remote_lock[ii]);
if (proto_timeout(gres->hr_remotein,
- gres->hr_timeout) < 0) {
+ gres->hr_timeout) == -1) {
pjdlog_errno(LOG_WARNING,
"Unable to set connection timeout");
}
if (proto_timeout(gres->hr_remoteout,
- gres->hr_timeout) < 0) {
+ gres->hr_timeout) == -1) {
pjdlog_errno(LOG_WARNING,
"Unable to set connection timeout");
}
diff --git a/sbin/hastd/proto.c b/sbin/hastd/proto.c
index 72c8c75..73487c0 100644
--- a/sbin/hastd/proto.c
+++ b/sbin/hastd/proto.c
@@ -131,7 +131,7 @@ proto_common_setup(const char *srcaddr, const char *dstaddr,
/*
* ret == 0 - success
* ret == -1 - dstaddr is not for this protocol
- * ret > 0 - right protocol, but an error occured
+ * ret > 0 - right protocol, but an error occurred
*/
if (ret >= 0)
break;
@@ -142,7 +142,7 @@ proto_common_setup(const char *srcaddr, const char *dstaddr,
return (-1);
}
if (ret > 0) {
- /* An error occured. */
+ /* An error occurred. */
errno = ret;
return (-1);
}
@@ -419,14 +419,14 @@ proto_timeout(const struct proto_conn *conn, int timeout)
PJDLOG_ASSERT(conn->pc_proto != NULL);
fd = proto_descriptor(conn);
- if (fd < 0)
+ if (fd == -1)
return (-1);
tv.tv_sec = timeout;
tv.tv_usec = 0;
- if (setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv)) < 0)
+ if (setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv)) == -1)
return (-1);
- if (setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)) < 0)
+ if (setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)) == -1)
return (-1);
return (0);
diff --git a/sbin/hastd/proto_common.c b/sbin/hastd/proto_common.c
index 183b4e4..59b1e39 100644
--- a/sbin/hastd/proto_common.c
+++ b/sbin/hastd/proto_common.c
@@ -116,7 +116,7 @@ proto_common_send(int sock, const unsigned char *data, size_t size, int fd)
done = send(sock, data, sendsize, MSG_NOSIGNAL);
if (done == 0) {
return (ENOTCONN);
- } else if (done < 0) {
+ } else if (done == -1) {
if (errno == EINTR)
continue;
if (errno == ENOBUFS) {
@@ -215,7 +215,7 @@ proto_common_recv(int sock, unsigned char *data, size_t size, int *fdp)
} while (done == -1 && errno == EINTR);
if (done == 0) {
return (ENOTCONN);
- } else if (done < 0) {
+ } else if (done == -1) {
/*
* If this is blocking socket and we got EAGAIN, this
* means the request timed out. Translate errno to
diff --git a/sbin/hastd/proto_socketpair.c b/sbin/hastd/proto_socketpair.c
index 913d59c..d13caa9 100644
--- a/sbin/hastd/proto_socketpair.c
+++ b/sbin/hastd/proto_socketpair.c
@@ -70,7 +70,7 @@ sp_client(const char *srcaddr, const char *dstaddr, void **ctxp)
if (spctx == NULL)
return (errno);
- if (socketpair(PF_UNIX, SOCK_STREAM, 0, spctx->sp_fd) < 0) {
+ if (socketpair(PF_UNIX, SOCK_STREAM, 0, spctx->sp_fd) == -1) {
ret = errno;
free(spctx);
return (ret);
diff --git a/sbin/hastd/proto_tcp.c b/sbin/hastd/proto_tcp.c
index 44eb13b..6dc0661 100644
--- a/sbin/hastd/proto_tcp.c
+++ b/sbin/hastd/proto_tcp.c
@@ -151,7 +151,7 @@ tcp_addr(const char *addr, int defport, struct sockaddr_storage *sap)
/* Port not given, use the default. */
port = defport;
} else {
- if (numfromstr(pp + 1, 1, 65535, &port) < 0)
+ if (numfromstr(pp + 1, 1, 65535, &port) == -1)
return (errno);
}
(void)snprintf(portstr, sizeof(portstr), "%jd", (intmax_t)port);
@@ -275,7 +275,7 @@ tcp_client(const char *srcaddr, const char *dstaddr, void **ctxp)
tcp_close(tctx);
return (ret);
}
- if (bind(tctx->tc_fd, (struct sockaddr *)&sa, sa.ss_len) < 0) {
+ if (bind(tctx->tc_fd, (struct sockaddr *)&sa, sa.ss_len) == -1) {
ret = errno;
tcp_close(tctx);
return (ret);
@@ -423,12 +423,12 @@ tcp_server(const char *addr, void **ctxp)
PJDLOG_ASSERT(tctx->tc_sa.ss_family != AF_UNSPEC);
if (bind(tctx->tc_fd, (struct sockaddr *)&tctx->tc_sa,
- tctx->tc_sa.ss_len) < 0) {
+ tctx->tc_sa.ss_len) == -1) {
ret = errno;
tcp_close(tctx);
return (ret);
}
- if (listen(tctx->tc_fd, 8) < 0) {
+ if (listen(tctx->tc_fd, 8) == -1) {
ret = errno;
tcp_close(tctx);
return (ret);
@@ -458,7 +458,7 @@ tcp_accept(void *ctx, void **newctxp)
fromlen = tctx->tc_sa.ss_len;
newtctx->tc_fd = accept(tctx->tc_fd, (struct sockaddr *)&tctx->tc_sa,
&fromlen);
- if (newtctx->tc_fd < 0) {
+ if (newtctx->tc_fd == -1) {
ret = errno;
free(newtctx);
return (ret);
@@ -530,7 +530,7 @@ tcp_address_match(const void *ctx, const char *addr)
return (false);
salen = sizeof(sa2);
- if (getpeername(tctx->tc_fd, (struct sockaddr *)&sa2, &salen) < 0)
+ if (getpeername(tctx->tc_fd, (struct sockaddr *)&sa2, &salen) == -1)
return (false);
if (sa1.ss_family != sa2.ss_family || sa1.ss_len != sa2.ss_len)
@@ -573,7 +573,7 @@ tcp_local_address(const void *ctx, char *addr, size_t size)
PJDLOG_ASSERT(tctx->tc_magic == TCP_CTX_MAGIC);
salen = sizeof(sa);
- if (getsockname(tctx->tc_fd, (struct sockaddr *)&sa, &salen) < 0) {
+ if (getsockname(tctx->tc_fd, (struct sockaddr *)&sa, &salen) == -1) {
PJDLOG_VERIFY(strlcpy(addr, "N/A", size) < size);
return;
}
@@ -591,7 +591,7 @@ tcp_remote_address(const void *ctx, char *addr, size_t size)
PJDLOG_ASSERT(tctx->tc_magic == TCP_CTX_MAGIC);
salen = sizeof(sa);
- if (getpeername(tctx->tc_fd, (struct sockaddr *)&sa, &salen) < 0) {
+ if (getpeername(tctx->tc_fd, (struct sockaddr *)&sa, &salen) == -1) {
PJDLOG_VERIFY(strlcpy(addr, "N/A", size) < size);
return;
}
diff --git a/sbin/hastd/proto_uds.c b/sbin/hastd/proto_uds.c
index 9dd5303..087b788 100644
--- a/sbin/hastd/proto_uds.c
+++ b/sbin/hastd/proto_uds.c
@@ -144,7 +144,7 @@ uds_connect(void *ctx, int timeout)
PJDLOG_ASSERT(timeout >= -1);
if (connect(uctx->uc_fd, (struct sockaddr *)&uctx->uc_sun,
- sizeof(uctx->uc_sun)) < 0) {
+ sizeof(uctx->uc_sun)) == -1) {
return (errno);
}
@@ -179,13 +179,13 @@ uds_server(const char *addr, void **ctxp)
(void)unlink(uctx->uc_sun.sun_path);
if (bind(uctx->uc_fd, (struct sockaddr *)&uctx->uc_sun,
- sizeof(uctx->uc_sun)) < 0) {
+ sizeof(uctx->uc_sun)) == -1) {
ret = errno;
uds_close(uctx);
return (ret);
}
uctx->uc_owner = getpid();
- if (listen(uctx->uc_fd, 8) < 0) {
+ if (listen(uctx->uc_fd, 8) == -1) {
ret = errno;
uds_close(uctx);
return (ret);
@@ -214,7 +214,7 @@ uds_accept(void *ctx, void **newctxp)
fromlen = sizeof(newuctx->uc_sun);
newuctx->uc_fd = accept(uctx->uc_fd,
(struct sockaddr *)&newuctx->uc_sun, &fromlen);
- if (newuctx->uc_fd < 0) {
+ if (newuctx->uc_fd == -1) {
ret = errno;
free(newuctx);
return (ret);
@@ -274,7 +274,7 @@ uds_local_address(const void *ctx, char *addr, size_t size)
PJDLOG_ASSERT(addr != NULL);
sunlen = sizeof(sun);
- if (getsockname(uctx->uc_fd, (struct sockaddr *)&sun, &sunlen) < 0) {
+ if (getsockname(uctx->uc_fd, (struct sockaddr *)&sun, &sunlen) == -1) {
PJDLOG_VERIFY(strlcpy(addr, "N/A", size) < size);
return;
}
@@ -298,7 +298,7 @@ uds_remote_address(const void *ctx, char *addr, size_t size)
PJDLOG_ASSERT(addr != NULL);
sunlen = sizeof(sun);
- if (getpeername(uctx->uc_fd, (struct sockaddr *)&sun, &sunlen) < 0) {
+ if (getpeername(uctx->uc_fd, (struct sockaddr *)&sun, &sunlen) == -1) {
PJDLOG_VERIFY(strlcpy(addr, "N/A", size) < size);
return;
}
diff --git a/sbin/hastd/secondary.c b/sbin/hastd/secondary.c
index 7a50f1e..8ebcd48 100644
--- a/sbin/hastd/secondary.c
+++ b/sbin/hastd/secondary.c
@@ -181,7 +181,7 @@ static void
init_local(struct hast_resource *res)
{
- if (metadata_read(res, true) < 0)
+ if (metadata_read(res, true) == -1)
exit(EX_NOINPUT);
}
@@ -199,8 +199,6 @@ init_remote(struct hast_resource *res, struct nv *nvin)
pjdlog_errno(LOG_WARNING, "Unable to set connection direction");
#endif
- map = NULL;
- mapsize = 0;
nvout = nv_alloc();
nv_add_int64(nvout, (int64_t)res->hr_datasize, "datasize");
nv_add_int32(nvout, (int32_t)res->hr_extentsize, "extentsize");
@@ -264,7 +262,7 @@ init_remote(struct hast_resource *res, struct nv *nvin)
*/
PJDLOG_ASSERT(res->hr_secondary_localcnt == 0);
res->hr_resuid = resuid;
- if (metadata_write(res) < 0)
+ if (metadata_write(res) == -1)
exit(EX_NOINPUT);
if (nv_exists(nvin, "virgin")) {
free(map);
@@ -284,8 +282,10 @@ init_remote(struct hast_resource *res, struct nv *nvin)
(uintmax_t)resuid, (uintmax_t)res->hr_resuid);
pjdlog_error("%s", errmsg);
nv_add_string(nvout, errmsg, "errmsg");
- if (hast_proto_send(res, res->hr_remotein, nvout, NULL, 0) < 0) {
- pjdlog_exit(EX_TEMPFAIL, "Unable to send response to %s",
+ if (hast_proto_send(res, res->hr_remotein, nvout,
+ NULL, 0) == -1) {
+ pjdlog_exit(EX_TEMPFAIL,
+ "Unable to send response to %s",
res->hr_remoteaddr);
}
nv_free(nvout);
@@ -329,8 +329,10 @@ init_remote(struct hast_resource *res, struct nv *nvin)
free(map);
pjdlog_error("Split-brain detected, exiting.");
nv_add_string(nvout, "Split-brain condition!", "errmsg");
- if (hast_proto_send(res, res->hr_remotein, nvout, NULL, 0) < 0) {
- pjdlog_exit(EX_TEMPFAIL, "Unable to send response to %s",
+ if (hast_proto_send(res, res->hr_remotein, nvout,
+ NULL, 0) == -1) {
+ pjdlog_exit(EX_TEMPFAIL,
+ "Unable to send response to %s",
res->hr_remoteaddr);
}
nv_free(nvout);
@@ -363,7 +365,7 @@ init_remote(struct hast_resource *res, struct nv *nvin)
(uintmax_t)res->hr_secondary_remotecnt);
}
nv_add_uint32(nvout, (uint32_t)mapsize, "mapsize");
- if (hast_proto_send(res, res->hr_remotein, nvout, map, mapsize) < 0) {
+ if (hast_proto_send(res, res->hr_remotein, nvout, map, mapsize) == -1) {
pjdlog_exit(EX_TEMPFAIL, "Unable to send activemap to %s",
res->hr_remoteaddr);
}
@@ -388,7 +390,7 @@ hastd_secondary(struct hast_resource *res, struct nv *nvin)
/*
* Create communication channel between parent and child.
*/
- if (proto_client(NULL, "socketpair://", &res->hr_ctrl) < 0) {
+ if (proto_client(NULL, "socketpair://", &res->hr_ctrl) == -1) {
KEEP_ERRNO((void)pidfile_remove(pfh));
pjdlog_exit(EX_OSERR,
"Unable to create control sockets between parent and child");
@@ -396,14 +398,14 @@ hastd_secondary(struct hast_resource *res, struct nv *nvin)
/*
* Create communication channel between child and parent.
*/
- if (proto_client(NULL, "socketpair://", &res->hr_event) < 0) {
+ if (proto_client(NULL, "socketpair://", &res->hr_event) == -1) {
KEEP_ERRNO((void)pidfile_remove(pfh));
pjdlog_exit(EX_OSERR,
"Unable to create event sockets between child and parent");
}
pid = fork();
- if (pid < 0) {
+ if (pid == -1) {
KEEP_ERRNO((void)pidfile_remove(pfh));
pjdlog_exit(EX_OSERR, "Unable to fork");
}
@@ -443,9 +445,9 @@ hastd_secondary(struct hast_resource *res, struct nv *nvin)
PJDLOG_VERIFY(sigprocmask(SIG_SETMASK, &mask, NULL) == 0);
/* Error in setting timeout is not critical, but why should it fail? */
- if (proto_timeout(res->hr_remotein, 2 * HAST_KEEPALIVE) < 0)
+ if (proto_timeout(res->hr_remotein, 2 * HAST_KEEPALIVE) == -1)
pjdlog_errno(LOG_WARNING, "Unable to set connection timeout");
- if (proto_timeout(res->hr_remoteout, res->hr_timeout) < 0)
+ if (proto_timeout(res->hr_remoteout, res->hr_timeout) == -1)
pjdlog_errno(LOG_WARNING, "Unable to set connection timeout");
init_local(res);
@@ -477,7 +479,8 @@ hastd_secondary(struct hast_resource *res, struct nv *nvin)
}
static void
-reqlog(int loglevel, int debuglevel, int error, struct hio *hio, const char *fmt, ...)
+reqlog(int loglevel, int debuglevel, int error, struct hio *hio,
+ const char *fmt, ...)
{
char msg[1024];
va_list ap;
@@ -625,7 +628,7 @@ recv_thread(void *arg)
pjdlog_debug(2, "recv: Taking free request.");
QUEUE_TAKE(free, hio);
pjdlog_debug(2, "recv: (%p) Got request.", hio);
- if (hast_proto_recv_hdr(res->hr_remotein, &nv) < 0) {
+ if (hast_proto_recv_hdr(res->hr_remotein, &nv) == -1) {
secondary_exit(EX_TEMPFAIL,
"Unable to receive request header");
}
@@ -668,7 +671,7 @@ recv_thread(void *arg)
continue;
} else if (hio->hio_cmd == HIO_WRITE) {
if (hast_proto_recv_data(res, res->hr_remotein, nv,
- hio->hio_data, MAXPHYS) < 0) {
+ hio->hio_data, MAXPHYS) == -1) {
secondary_exit(EX_TEMPFAIL,
"Unable to receive request data");
}
@@ -737,7 +740,7 @@ disk_thread(void *arg)
ret = pread(res->hr_localfd, hio->hio_data,
hio->hio_length,
hio->hio_offset + res->hr_localoff);
- if (ret < 0)
+ if (ret == -1)
hio->hio_error = errno;
else if (ret != (int64_t)hio->hio_length)
hio->hio_error = EIO;
@@ -748,7 +751,7 @@ disk_thread(void *arg)
ret = pwrite(res->hr_localfd, hio->hio_data,
hio->hio_length,
hio->hio_offset + res->hr_localoff);
- if (ret < 0)
+ if (ret == -1)
hio->hio_error = errno;
else if (ret != (int64_t)hio->hio_length)
hio->hio_error = EIO;
@@ -759,7 +762,7 @@ disk_thread(void *arg)
ret = g_delete(res->hr_localfd,
hio->hio_offset + res->hr_localoff,
hio->hio_length);
- if (ret < 0)
+ if (ret == -1)
hio->hio_error = errno;
else
hio->hio_error = 0;
@@ -772,7 +775,7 @@ disk_thread(void *arg)
break;
}
ret = g_flush(res->hr_localfd);
- if (ret < 0) {
+ if (ret == -1) {
if (errno == EOPNOTSUPP)
res->hr_localflush = false;
hio->hio_error = errno;
@@ -839,8 +842,8 @@ send_thread(void *arg)
if (hio->hio_error != 0)
nv_add_int16(nvout, hio->hio_error, "error");
if (hast_proto_send(res, res->hr_remoteout, nvout, data,
- length) < 0) {
- secondary_exit(EX_TEMPFAIL, "Unable to send reply.");
+ length) == -1) {
+ secondary_exit(EX_TEMPFAIL, "Unable to send reply");
}
nv_free(nvout);
pjdlog_debug(2, "send: (%p) Moving request to the free queue.",
diff --git a/sbin/hastd/subr.c b/sbin/hastd/subr.c
index 45218bb..ae6f984 100644
--- a/sbin/hastd/subr.c
+++ b/sbin/hastd/subr.c
@@ -86,13 +86,13 @@ provinfo(struct hast_resource *res, bool dowrite)
if (res->hr_localfd == -1) {
res->hr_localfd = open(res->hr_localpath,
dowrite ? O_RDWR : O_RDONLY);
- if (res->hr_localfd < 0) {
+ if (res->hr_localfd == -1) {
pjdlog_errno(LOG_ERR, "Unable to open %s",
res->hr_localpath);
return (-1);
}
}
- if (fstat(res->hr_localfd, &sb) < 0) {
+ if (fstat(res->hr_localfd, &sb) == -1) {
pjdlog_errno(LOG_ERR, "Unable to stat %s", res->hr_localpath);
return (-1);
}
@@ -101,14 +101,14 @@ provinfo(struct hast_resource *res, bool dowrite)
* If this is character device, it is most likely GEOM provider.
*/
if (ioctl(res->hr_localfd, DIOCGMEDIASIZE,
- &res->hr_local_mediasize) < 0) {
+ &res->hr_local_mediasize) == -1) {
pjdlog_errno(LOG_ERR,
"Unable obtain provider %s mediasize",
res->hr_localpath);
return (-1);
}
if (ioctl(res->hr_localfd, DIOCGSECTORSIZE,
- &res->hr_local_sectorsize) < 0) {
+ &res->hr_local_sectorsize) == -1) {
pjdlog_errno(LOG_ERR,
"Unable obtain provider %s sectorsize",
res->hr_localpath);
@@ -149,7 +149,7 @@ role2str(int role)
}
int
-drop_privs(struct hast_resource *res)
+drop_privs(const struct hast_resource *res)
{
char jailhost[sizeof(res->hr_name) * 2];
struct jail jailst;
diff --git a/sbin/hastd/subr.h b/sbin/hastd/subr.h
index e76930a..c765754 100644
--- a/sbin/hastd/subr.h
+++ b/sbin/hastd/subr.h
@@ -51,6 +51,6 @@ int snprlcat(char *str, size_t size, const char *fmt, ...);
int provinfo(struct hast_resource *res, bool dowrite);
const char *role2str(int role);
-int drop_privs(struct hast_resource *res);
+int drop_privs(const struct hast_resource *res);
#endif /* !_SUBR_H_ */
diff --git a/sbin/hastd/token.l b/sbin/hastd/token.l
index 0d15075..38bf8d6 100644
--- a/sbin/hastd/token.l
+++ b/sbin/hastd/token.l
@@ -44,11 +44,13 @@ int lineno;
#define DP do { } while (0)
%}
+%option noinput
+%option nounput
+
%%
control { DP; return CONTROL; }
pidfile { DP; return PIDFILE; }
listen { DP; return LISTEN; }
-port { DP; return PORT; }
replication { DP; return REPLICATION; }
checksum { DP; return CHECKSUM; }
compression { DP; return COMPRESSION; }
diff --git a/sbin/ifconfig/Makefile b/sbin/ifconfig/Makefile
index d4bdd1e..dafaea2 100644
--- a/sbin/ifconfig/Makefile
+++ b/sbin/ifconfig/Makefile
@@ -38,7 +38,7 @@ SRCS+= ifieee80211.c regdomain.c # SIOC[GS]IEEE80211 support
DPADD+= ${LIBBSDXML} ${LIBJAIL} ${LIBSBUF}
LDADD+= -lbsdxml -ljail -lsbuf
-SRCS+= ifcarp.c # SIOC[GS]VH support
+SRCS+= carp.c # SIOC[GS]VH support
SRCS+= ifgroup.c # ...
SRCS+= ifpfsync.c # pfsync(4) support
diff --git a/sbin/ifconfig/af_inet.c b/sbin/ifconfig/af_inet.c
index edb9b80..c733373 100644
--- a/sbin/ifconfig/af_inet.c
+++ b/sbin/ifconfig/af_inet.c
@@ -84,8 +84,11 @@ in_status(int s __unused, const struct ifaddrs *ifa)
if (ifa->ifa_flags & IFF_BROADCAST) {
sin = (struct sockaddr_in *)ifa->ifa_broadaddr;
if (sin != NULL && sin->sin_addr.s_addr != 0)
- printf("broadcast %s", inet_ntoa(sin->sin_addr));
+ printf("broadcast %s ", inet_ntoa(sin->sin_addr));
}
+
+ print_vhid(ifa, " ");
+
putchar('\n');
}
@@ -123,6 +126,7 @@ in_getaddr(const char *s, int which)
*p = '/';
errx(1, "%s: bad value (width %s)", s, errstr);
}
+ min->sin_family = AF_INET;
min->sin_len = sizeof(*min);
min->sin_addr.s_addr = htonl(~((1LL << (32 - masklen)) - 1) &
0xffffffff);
diff --git a/sbin/ifconfig/af_inet6.c b/sbin/ifconfig/af_inet6.c
index e39c1c8..0731238 100644
--- a/sbin/ifconfig/af_inet6.c
+++ b/sbin/ifconfig/af_inet6.c
@@ -307,6 +307,8 @@ in6_status(int s __unused, const struct ifaddrs *ifa)
printf("infty ");
}
+ print_vhid(ifa, " ");
+
putchar('\n');
}
diff --git a/sbin/ifconfig/carp.c b/sbin/ifconfig/carp.c
new file mode 100644
index 0000000..2c58fcb
--- /dev/null
+++ b/sbin/ifconfig/carp.c
@@ -0,0 +1,228 @@
+/* $FreeBSD$ */
+/* from $OpenBSD: ifconfig.c,v 1.82 2003/10/19 05:43:35 mcbride Exp $ */
+
+/*
+ * Copyright (c) 2002 Michael Shalayeff. All rights reserved.
+ * Copyright (c) 2003 Ryan McBride. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR OR HIS RELATIVES 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 MIND, 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.
+ */
+
+#include <sys/param.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <sys/sockio.h>
+
+#include <stdlib.h>
+#include <unistd.h>
+
+#include <net/if.h>
+#include <net/if_var.h>
+#include <netinet/in.h>
+#include <netinet/in_var.h>
+#include <netinet/ip_carp.h>
+
+#include <ctype.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <err.h>
+#include <errno.h>
+
+#include "ifconfig.h"
+
+static const char *carp_states[] = { CARP_STATES };
+
+static void carp_status(int s);
+static void setcarp_vhid(const char *, int, int, const struct afswtch *rafp);
+static void setcarp_callback(int, void *);
+static void setcarp_advbase(const char *,int, int, const struct afswtch *rafp);
+static void setcarp_advskew(const char *, int, int, const struct afswtch *rafp);
+static void setcarp_passwd(const char *, int, int, const struct afswtch *rafp);
+
+static int carpr_vhid = -1;
+static int carpr_advskew = -1;
+static int carpr_advbase = -1;
+static int carpr_state = -1;
+static unsigned char const *carpr_key;
+
+static void
+carp_status(int s)
+{
+ struct carpreq carpr[CARP_MAXVHID];
+ int i;
+
+ bzero(carpr, sizeof(struct carpreq) * CARP_MAXVHID);
+ carpr[0].carpr_count = CARP_MAXVHID;
+ ifr.ifr_data = (caddr_t)&carpr;
+
+ if (ioctl(s, SIOCGVH, (caddr_t)&ifr) == -1)
+ return;
+
+ for (i = 0; i < carpr[0].carpr_count; i++) {
+ printf("\tcarp: %s vhid %d advbase %d advskew %d",
+ carp_states[carpr[i].carpr_state], carpr[i].carpr_vhid,
+ carpr[i].carpr_advbase, carpr[i].carpr_advskew);
+ if (printkeys && carpr[i].carpr_key[0] != '\0')
+ printf(" key \"%s\"\n", carpr[i].carpr_key);
+ else
+ printf("\n");
+ }
+}
+
+static void
+setcarp_vhid(const char *val, int d, int s, const struct afswtch *afp)
+{
+
+ carpr_vhid = atoi(val);
+
+ if (carpr_vhid <= 0 || carpr_vhid > CARP_MAXVHID)
+ errx(1, "vhid must be greater than 0 and less than %u",
+ CARP_MAXVHID);
+
+ switch (afp->af_af) {
+#ifdef INET
+ case AF_INET:
+ {
+ struct in_aliasreq *ifra;
+
+ ifra = (struct in_aliasreq *)afp->af_addreq;
+ ifra->ifra_vhid = carpr_vhid;
+ break;
+ }
+#endif
+#ifdef INET6
+ case AF_INET6:
+ {
+ struct in6_aliasreq *ifra;
+
+ ifra = (struct in6_aliasreq *)afp->af_addreq;
+ ifra->ifra_vhid = carpr_vhid;
+ break;
+ }
+#endif
+ default:
+ errx(1, "%s doesn't support carp(4)", afp->af_name);
+ }
+
+ callback_register(setcarp_callback, NULL);
+}
+
+static void
+setcarp_callback(int s, void *arg __unused)
+{
+ struct carpreq carpr;
+
+ bzero(&carpr, sizeof(struct carpreq));
+ carpr.carpr_vhid = carpr_vhid;
+ carpr.carpr_count = 1;
+ ifr.ifr_data = (caddr_t)&carpr;
+
+ if (ioctl(s, SIOCGVH, (caddr_t)&ifr) == -1 && errno != ENOENT)
+ err(1, "SIOCGVH");
+
+ if (carpr_key != NULL)
+ /* XXX Should hash the password into the key here? */
+ strlcpy(carpr.carpr_key, carpr_key, CARP_KEY_LEN);
+ if (carpr_advskew > -1)
+ carpr.carpr_advskew = carpr_advskew;
+ if (carpr_advbase > -1)
+ carpr.carpr_advbase = carpr_advbase;
+ if (carpr_state > -1)
+ carpr.carpr_state = carpr_state;
+
+ if (ioctl(s, SIOCSVH, (caddr_t)&ifr) == -1)
+ err(1, "SIOCSVH");
+}
+
+static void
+setcarp_passwd(const char *val, int d, int s, const struct afswtch *afp)
+{
+
+ if (carpr_vhid == -1)
+ errx(1, "passwd requires vhid");
+
+ carpr_key = val;
+}
+
+static void
+setcarp_advskew(const char *val, int d, int s, const struct afswtch *afp)
+{
+
+ if (carpr_vhid == -1)
+ errx(1, "advskew requires vhid");
+
+ carpr_advskew = atoi(val);
+}
+
+static void
+setcarp_advbase(const char *val, int d, int s, const struct afswtch *afp)
+{
+
+ if (carpr_vhid == -1)
+ errx(1, "advbase requires vhid");
+
+ carpr_advbase = atoi(val);
+}
+
+static void
+setcarp_state(const char *val, int d, int s, const struct afswtch *afp)
+{
+ int i;
+
+ if (carpr_vhid == -1)
+ errx(1, "state requires vhid");
+
+ for (i = 0; i <= CARP_MAXSTATE; i++)
+ if (strcasecmp(carp_states[i], val) == 0) {
+ carpr_state = i;
+ return;
+ }
+
+ errx(1, "unknown state");
+}
+
+static struct cmd carp_cmds[] = {
+ DEF_CMD_ARG("advbase", setcarp_advbase),
+ DEF_CMD_ARG("advskew", setcarp_advskew),
+ DEF_CMD_ARG("pass", setcarp_passwd),
+ DEF_CMD_ARG("vhid", setcarp_vhid),
+ DEF_CMD_ARG("state", setcarp_state),
+};
+static struct afswtch af_carp = {
+ .af_name = "af_carp",
+ .af_af = AF_UNSPEC,
+ .af_other_status = carp_status,
+};
+
+static __constructor void
+carp_ctor(void)
+{
+#define N(a) (sizeof(a) / sizeof(a[0]))
+ int i;
+
+ for (i = 0; i < N(carp_cmds); i++)
+ cmd_register(&carp_cmds[i]);
+ af_register(&af_carp);
+#undef N
+}
diff --git a/sbin/ifconfig/ifcarp.c b/sbin/ifconfig/ifcarp.c
deleted file mode 100644
index 2306717..0000000
--- a/sbin/ifconfig/ifcarp.c
+++ /dev/null
@@ -1,200 +0,0 @@
-/* $FreeBSD$ */
-/* from $OpenBSD: ifconfig.c,v 1.82 2003/10/19 05:43:35 mcbride Exp $ */
-
-/*
- * Copyright (c) 2002 Michael Shalayeff. All rights reserved.
- * Copyright (c) 2003 Ryan McBride. 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR OR HIS RELATIVES 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 MIND, 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.
- */
-
-#include <sys/param.h>
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-#include <sys/sockio.h>
-
-#include <stdlib.h>
-#include <unistd.h>
-
-#include <net/ethernet.h>
-#include <net/if.h>
-#include <netinet/ip_carp.h>
-#include <net/route.h>
-
-#include <ctype.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <err.h>
-#include <errno.h>
-
-#include "ifconfig.h"
-
-static const char *carp_states[] = { CARP_STATES };
-
-void carp_status(int s);
-void setcarp_advbase(const char *,int, int, const struct afswtch *rafp);
-void setcarp_advskew(const char *, int, int, const struct afswtch *rafp);
-void setcarp_passwd(const char *, int, int, const struct afswtch *rafp);
-void setcarp_vhid(const char *, int, int, const struct afswtch *rafp);
-
-void
-carp_status(int s)
-{
- const char *state;
- struct carpreq carpr;
-
- memset((char *)&carpr, 0, sizeof(struct carpreq));
- ifr.ifr_data = (caddr_t)&carpr;
-
- if (ioctl(s, SIOCGVH, (caddr_t)&ifr) == -1)
- return;
-
- if (carpr.carpr_vhid > 0) {
- if (carpr.carpr_state > CARP_MAXSTATE)
- state = "<UNKNOWN>";
- else
- state = carp_states[carpr.carpr_state];
-
- printf("\tcarp: %s vhid %d advbase %d advskew %d\n",
- state, carpr.carpr_vhid, carpr.carpr_advbase,
- carpr.carpr_advskew);
- }
-
- return;
-
-}
-
-void
-setcarp_passwd(const char *val, int d, int s, const struct afswtch *afp)
-{
- struct carpreq carpr;
-
- memset((char *)&carpr, 0, sizeof(struct carpreq));
- ifr.ifr_data = (caddr_t)&carpr;
-
- if (ioctl(s, SIOCGVH, (caddr_t)&ifr) == -1)
- err(1, "SIOCGVH");
-
- memset(carpr.carpr_key, 0, sizeof(carpr.carpr_key));
- /* XXX Should hash the password into the key here, perhaps? */
- strlcpy(carpr.carpr_key, val, CARP_KEY_LEN);
-
- if (ioctl(s, SIOCSVH, (caddr_t)&ifr) == -1)
- err(1, "SIOCSVH");
-
- return;
-}
-
-void
-setcarp_vhid(const char *val, int d, int s, const struct afswtch *afp)
-{
- int vhid;
- struct carpreq carpr;
-
- vhid = atoi(val);
-
- if (vhid <= 0)
- errx(1, "vhid must be greater than 0");
-
- memset((char *)&carpr, 0, sizeof(struct carpreq));
- ifr.ifr_data = (caddr_t)&carpr;
-
- if (ioctl(s, SIOCGVH, (caddr_t)&ifr) == -1)
- err(1, "SIOCGVH");
-
- carpr.carpr_vhid = vhid;
-
- if (ioctl(s, SIOCSVH, (caddr_t)&ifr) == -1)
- err(1, "SIOCSVH");
-
- return;
-}
-
-void
-setcarp_advskew(const char *val, int d, int s, const struct afswtch *afp)
-{
- int advskew;
- struct carpreq carpr;
-
- advskew = atoi(val);
-
- memset((char *)&carpr, 0, sizeof(struct carpreq));
- ifr.ifr_data = (caddr_t)&carpr;
-
- if (ioctl(s, SIOCGVH, (caddr_t)&ifr) == -1)
- err(1, "SIOCGVH");
-
- carpr.carpr_advskew = advskew;
-
- if (ioctl(s, SIOCSVH, (caddr_t)&ifr) == -1)
- err(1, "SIOCSVH");
-
- return;
-}
-
-void
-setcarp_advbase(const char *val, int d, int s, const struct afswtch *afp)
-{
- int advbase;
- struct carpreq carpr;
-
- advbase = atoi(val);
-
- memset((char *)&carpr, 0, sizeof(struct carpreq));
- ifr.ifr_data = (caddr_t)&carpr;
-
- if (ioctl(s, SIOCGVH, (caddr_t)&ifr) == -1)
- err(1, "SIOCGVH");
-
- carpr.carpr_advbase = advbase;
-
- if (ioctl(s, SIOCSVH, (caddr_t)&ifr) == -1)
- err(1, "SIOCSVH");
-
- return;
-}
-
-static struct cmd carp_cmds[] = {
- DEF_CMD_ARG("advbase", setcarp_advbase),
- DEF_CMD_ARG("advskew", setcarp_advskew),
- DEF_CMD_ARG("pass", setcarp_passwd),
- DEF_CMD_ARG("vhid", setcarp_vhid),
-};
-static struct afswtch af_carp = {
- .af_name = "af_carp",
- .af_af = AF_UNSPEC,
- .af_other_status = carp_status,
-};
-
-static __constructor void
-carp_ctor(void)
-{
-#define N(a) (sizeof(a) / sizeof(a[0]))
- int i;
-
- for (i = 0; i < N(carp_cmds); i++)
- cmd_register(&carp_cmds[i]);
- af_register(&af_carp);
-#undef N
-}
diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8
index c6b8ea3..e9c6995 100644
--- a/sbin/ifconfig/ifconfig.8
+++ b/sbin/ifconfig/ifconfig.8
@@ -28,7 +28,7 @@
.\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94
.\" $FreeBSD$
.\"
-.Dd November 12, 2011
+.Dd January 4, 2012
.Dt IFCONFIG 8
.Os
.Sh NAME
@@ -423,10 +423,10 @@ they support in their capabilities.
is a synonym for enabling all available WOL mechanisms.
To disable WOL use
.Fl wol .
-.It Cm vlanmtu , vlanhwtag, vlanhwfilter, vlanhwtso
+.It Cm vlanmtu , vlanhwtag, vlanhwfilter, vlanhwcsum, vlanhwtso
If the driver offers user-configurable VLAN support, enable
reception of extended frames, tag processing in hardware,
-frame filtering in hardware, or TSO on VLAN,
+frame filtering in hardware, checksum offloading, or TSO on VLAN,
respectively.
Note that this must be issued on a physical interface associated with
.Xr vlan 4 ,
@@ -2378,7 +2378,7 @@ interfaces:
.It Cm vlan Ar vlan_tag
Set the VLAN tag value to
.Ar vlan_tag .
-This value is a 16-bit number which is used to create an 802.1Q
+This value is a 12-bit VLAN Identifier (VID) which is used to create an 802.1Q
VLAN header for packets sent from the
.Xr vlan 4
interface.
@@ -2400,7 +2400,7 @@ diverted to the specified physical interface
.Ar iface
with 802.1Q VLAN encapsulation.
Packets with 802.1Q encapsulation received
-by the parent interface with the correct VLAN tag will be diverted to
+by the parent interface with the correct VLAN Identifier will be diverted to
the associated
.Xr vlan 4
pseudo-interface.
@@ -2439,22 +2439,43 @@ pseudo device, disassociate the parent interface from it.
This breaks the link between the
.Xr vlan 4
interface and its parent,
-clears its VLAN tag, flags and its link address and shuts the interface down.
+clears its VLAN Identifier, flags and its link address and shuts the interface
+down.
The
.Ar iface
argument is useless and hence deprecated.
.El
.Pp
-The following parameters are specific to
+The following parameters are used to configure
.Xr carp 4
-interfaces:
+protocol on an interface:
.Bl -tag -width indent
+.It Cm vhid Ar n
+Set the virtual host ID.
+This is a required setting to initiate
+.Xr carp 4 .
+If the virtual host ID doesn't exist yet, it is created and attached to the
+interface, otherwise configuration of an existing vhid is adjusted.
+If the
+.Cm vhid
+keyword is supplied along with an
+.Dq inet6
+or
+.Dq inet
+address, then this address is configured to be run under control of the
+specified vhid.
+Whenever a last address that refers to a particular vhid is removed from an
+interface, the vhid is automatically removed from interface and destroyed.
+Any other configuration parameters for the
+.Xr carp 4
+protocol should be supplied along with the
+.Cm vhid
+keyword.
+Acceptable values for vhid are 1 to 255.
.It Cm advbase Ar seconds
Specifies the base of the advertisement interval in seconds.
The acceptable values are 1 to 255.
The default value is 1.
-.\" The default value is
-.\" .Dv CARP_DFLTINTV .
.It Cm advskew Ar interval
Specifies the skew to add to the base advertisement interval to
make one host advertise slower than another host.
@@ -2464,10 +2485,8 @@ The default value is 0.
.It Cm pass Ar phrase
Set the authentication key to
.Ar phrase .
-.It Cm vhid Ar n
-Set the virtual host ID.
-This is a required setting.
-Acceptable values are 1 to 255.
+.It Cm state Ar MASTER|BACKUP
+Forcibly change state of a given vhid.
.El
.Pp
The
@@ -2530,8 +2549,9 @@ The
.Fl k
flag causes keying information for the interface, if available, to be
printed.
-For example, the values of 802.11 WEP keys will be printed, if accessible to
-the current user.
+For example, the values of 802.11 WEP keys and
+.Xr carp 4
+passphrases will be printed, if accessible to the current user.
This information is not printed by default, as it may be considered
sensitive.
.Pp
@@ -2593,6 +2613,11 @@ as a synonym for the canonical form of the option
.Fl alias :
.Dl # ifconfig em0 inet6 2001:db8:bdbd::123/48 delete
.Pp
+Configure a single CARP redundant address on igb0, and then switch it
+to be master:
+.Dl # ifconfig igb0 vhid 1 10.0.0.1/24 pass foobar
+.Dl # ifconfig igb0 vhid 1 state master
+.Pp
Configure the interface
.Li xl0 ,
to use 100baseTX, full duplex Ethernet media options:
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index af280ce..0e3c3a3 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -1078,6 +1078,21 @@ printb(const char *s, unsigned v, const char *bits)
}
void
+print_vhid(const struct ifaddrs *ifa, const char *s)
+{
+ struct if_data *ifd;
+
+ if (ifa->ifa_data == NULL)
+ return;
+
+ ifd = ifa->ifa_data;
+ if (ifd->ifi_vhid == 0)
+ return;
+
+ printf("vhid %d ", ifd->ifi_vhid);
+}
+
+void
ifmaybeload(const char *name)
{
#define MOD_PREFIX_LEN 3 /* "if_" */
diff --git a/sbin/ifconfig/ifconfig.h b/sbin/ifconfig/ifconfig.h
index d6f5349..ea21db5 100644
--- a/sbin/ifconfig/ifconfig.h
+++ b/sbin/ifconfig/ifconfig.h
@@ -148,3 +148,6 @@ void clone_setdefcallback(const char *, clone_callback_func *);
* operations on ifmedia can avoid cmd line ordering confusion.
*/
struct ifmediareq *ifmedia_getstate(int s);
+
+void print_vhid(const struct ifaddrs *, const char *);
+
diff --git a/sbin/ifconfig/ifieee80211.c b/sbin/ifconfig/ifieee80211.c
index a84c5bf..7bb4e35 100644
--- a/sbin/ifconfig/ifieee80211.c
+++ b/sbin/ifconfig/ifieee80211.c
@@ -884,7 +884,7 @@ set80211wepkey(const char *val, int d, int s, const struct afswtch *rafp)
}
/*
- * This function is purely a NetBSD compatability interface. The NetBSD
+ * This function is purely a NetBSD compatibility interface. The NetBSD
* interface is too inflexible, but it's there so we'll support it since
* it's not all that hard.
*/
@@ -4383,7 +4383,6 @@ ieee80211_status(int s)
if (get80211val(s, IEEE80211_IOC_WEP, &wepmode) != -1 &&
wepmode != IEEE80211_WEP_NOSUP) {
- int firstkey;
switch (wepmode) {
case IEEE80211_WEP_OFF:
@@ -4419,7 +4418,6 @@ ieee80211_status(int s)
goto end;
}
- firstkey = 1;
for (i = 0; i < num; i++) {
struct ieee80211req_key ik;
@@ -4433,7 +4431,6 @@ ieee80211_status(int s)
if (verbose)
LINE_BREAK();
printkey(&ik);
- firstkey = 0;
}
}
end:
diff --git a/sbin/ifconfig/ifvlan.c b/sbin/ifconfig/ifvlan.c
index 3000585..cefcbbc 100644
--- a/sbin/ifconfig/ifvlan.c
+++ b/sbin/ifconfig/ifvlan.c
@@ -183,6 +183,8 @@ static struct cmd vlan_cmds[] = {
DEF_CMD("-vlanhwfilter", -IFCAP_VLAN_HWFILTER, setifcap),
DEF_CMD("-vlanhwtso", -IFCAP_VLAN_HWTSO, setifcap),
DEF_CMD("vlanhwtso", IFCAP_VLAN_HWTSO, setifcap),
+ DEF_CMD("vlanhwcsum", IFCAP_VLAN_HWCSUM, setifcap),
+ DEF_CMD("-vlanhwcsum", -IFCAP_VLAN_HWCSUM, setifcap),
};
static struct afswtch af_vlan = {
.af_name = "af_vlan",
diff --git a/sbin/ipf/Makefile.inc b/sbin/ipf/Makefile.inc
index 0065ce7..b3efd6f 100644
--- a/sbin/ipf/Makefile.inc
+++ b/sbin/ipf/Makefile.inc
@@ -1,6 +1,8 @@
# $FreeBSD$
WARNS?= 2
+NO_WFORMAT=
+NO_WARRAY_BOUNDS=
CFLAGS+= -I${.CURDIR}/../../../contrib/ipfilter
CFLAGS+= -I${.CURDIR}/../../../contrib/ipfilter/tools
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c
index 615c4d1..6b0e0f0 100644
--- a/sbin/ipfw/ipfw2.c
+++ b/sbin/ipfw/ipfw2.c
@@ -454,8 +454,8 @@ _substrcmp(const char *str1, const char* str2)
* of the first. A warning is printed to stderr in the case that the
* first string does not match the third.
*
- * This function exists to warn about the bizzare construction
- * strncmp(str, "by", 2) which is used to allow people to use a shotcut
+ * This function exists to warn about the bizarre construction
+ * strncmp(str, "by", 2) which is used to allow people to use a shortcut
* for "bytes". The problem is that in addition to accepting "by",
* "byt", "byte", and "bytes", it also excepts "by_rabid_dogs" and any
* other string beginning with "by".
@@ -2866,9 +2866,9 @@ chkarg:
((struct sockaddr_in*)&result)->sin_addr.s_addr =
INADDR_ANY;
} else {
- /*
+ /*
* Resolve the host name or address to a family and a
- * network representation of the addres.
+ * network representation of the address.
*/
if (getaddrinfo(*av, NULL, NULL, &res))
errx(EX_DATAERR, NULL);
diff --git a/sbin/ipfw/main.c b/sbin/ipfw/main.c
index e665b45..82a299b 100644
--- a/sbin/ipfw/main.c
+++ b/sbin/ipfw/main.c
@@ -122,9 +122,9 @@ ipfw_main(int oldac, char **oldav)
break;
if (copy) {
arg[j++] = arg[i];
- copy = !index("," WHITESP, arg[i]);
+ copy = !strchr("," WHITESP, arg[i]);
} else {
- copy = !index(WHITESP, arg[i]);
+ copy = !strchr(WHITESP, arg[i]);
if (copy)
arg[j++] = arg[i];
}
@@ -141,7 +141,7 @@ ipfw_main(int oldac, char **oldav)
* processing, this is just the number of blanks plus 1.
*/
for (i = 0, ac = 1; i < l; i++)
- if (index(WHITESP, arg[i]) != NULL)
+ if (strchr(WHITESP, arg[i]) != NULL)
ac++;
/*
@@ -162,12 +162,12 @@ ipfw_main(int oldac, char **oldav)
*/
av_p = (char *)&av[ac+1];
for (ac = 1, i = j = 0; i < l; i++) {
- if (index(WHITESP, arg[i]) != NULL || i == l-1) {
+ if (strchr(WHITESP, arg[i]) != NULL || i == l-1) {
if (i == l-1)
i++;
bcopy(arg+j, av_p, i-j);
av[ac] = av_p;
- av_p += i-j; /* the lenght of the string */
+ av_p += i-j; /* the length of the string */
*av_p++ = '\0';
ac++;
j = i + 1;
@@ -240,7 +240,7 @@ ipfw_main(int oldac, char **oldav)
" ipfw sysctl -a\n");
return 0;
}
- s = index(av[2], '=');
+ s = strchr(av[2], '=');
if (s == NULL) {
s = !strcmp(av[2], "-a") ? NULL : av[2];
sysctlbyname(s, NULL, NULL, NULL, 0);
@@ -309,6 +309,7 @@ ipfw_main(int oldac, char **oldav)
case 'p':
errx(EX_USAGE, "An absolute pathname must be used "
"with -p option.");
+ /* NOTREACHED */
case 'q':
co.do_quiet = 1;
diff --git a/sbin/mdconfig/mdconfig.c b/sbin/mdconfig/mdconfig.c
index 70f725b..0e44b1a 100644
--- a/sbin/mdconfig/mdconfig.c
+++ b/sbin/mdconfig/mdconfig.c
@@ -1,14 +1,31 @@
-/*
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@FreeBSD.ORG> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
+/*-
+ * Copyright (c) 2000-2004 Poul-Henning Kamp <phk@FreeBSD.org>
+ * All rights reserved.
*
- * $FreeBSD$
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
*
+ * $FreeBSD$
*/
+
#include <sys/param.h>
#include <sys/devicestat.h>
#include <sys/ioctl.h>
diff --git a/sbin/mdmfs/mdmfs.c b/sbin/mdmfs/mdmfs.c
index e093265..66a6911 100644
--- a/sbin/mdmfs/mdmfs.c
+++ b/sbin/mdmfs/mdmfs.c
@@ -632,7 +632,7 @@ run(int *ofd, const char *cmdline, ...)
* loop.
*/
(void)fprintf(stderr, "DEBUG: running:");
- /* Should be equivilent to 'cmd' (before strsep, of course). */
+ /* Should be equivalent to 'cmd' (before strsep, of course). */
for (i = 0; argv[i] != NULL; i++)
(void)fprintf(stderr, " %s", argv[i]);
(void)fprintf(stderr, "\n");
diff --git a/sbin/mount/getmntopts.c b/sbin/mount/getmntopts.c
index 194b3df..f8a3453 100644
--- a/sbin/mount/getmntopts.c
+++ b/sbin/mount/getmntopts.c
@@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$");
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <sysexits.h>
#include "mntopts.h"
@@ -124,16 +123,18 @@ rmslashes(char *rrpin, char *rrpout)
*rrpout = '\0';
}
-void
+int
checkpath(const char *path, char *resolved)
{
struct stat sb;
- if (realpath(path, resolved) != NULL && stat(resolved, &sb) == 0) {
- if (!S_ISDIR(sb.st_mode))
- errx(EX_USAGE, "%s: not a directory", resolved);
- } else
- errx(EX_USAGE, "%s: %s", resolved, strerror(errno));
+ if (realpath(path, resolved) == NULL || stat(resolved, &sb) != 0)
+ return (1);
+ if (!S_ISDIR(sb.st_mode)) {
+ errno = ENOTDIR;
+ return (1);
+ }
+ return (0);
}
void
diff --git a/sbin/mount/mntopts.h b/sbin/mount/mntopts.h
index 2903d55..86a350f 100644
--- a/sbin/mount/mntopts.h
+++ b/sbin/mount/mntopts.h
@@ -93,7 +93,7 @@ struct mntopt {
void getmntopts(const char *, const struct mntopt *, int *, int *);
void rmslashes(char *, char *);
-void checkpath(const char *, char resolved_path[]);
+int checkpath(const char *, char resolved_path[]);
extern int getmnt_silent;
void build_iovec(struct iovec **iov, int *iovlen, const char *name, void *val, size_t len);
void build_iovec_argf(struct iovec **iov, int *iovlen, const char *name, const char *fmt, ...);
diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c
index cf142e4..ca81795 100644
--- a/sbin/mount/mount.c
+++ b/sbin/mount/mount.c
@@ -539,7 +539,10 @@ mountfs(const char *vfstype, const char *spec, const char *name, int flags,
static struct cpa mnt_argv;
/* resolve the mountpoint with realpath(3) */
- (void)checkpath(name, mntpath);
+ if (checkpath(name, mntpath) != 0) {
+ warn("%s", mntpath);
+ return (1);
+ }
name = mntpath;
if (mntopts == NULL)
diff --git a/sbin/mount/mount_fs.c b/sbin/mount/mount_fs.c
index 526d493..385cd0f 100644
--- a/sbin/mount/mount_fs.c
+++ b/sbin/mount/mount_fs.c
@@ -82,7 +82,6 @@ mount_fs(const char *vfstype, int argc, char *argv[])
char fstype[32];
char errmsg[255];
char *p, *val;
- int ret;
strlcpy(fstype, vfstype, sizeof(fstype));
memset(errmsg, 0, sizeof(errmsg));
@@ -118,17 +117,23 @@ mount_fs(const char *vfstype, int argc, char *argv[])
dev = argv[0];
dir = argv[1];
- (void)checkpath(dir, mntpath);
+ if (checkpath(dir, mntpath) != 0) {
+ warn("%s", mntpath);
+ return (1);
+ }
(void)rmslashes(dev, dev);
build_iovec(&iov, &iovlen, "fstype", fstype, (size_t)-1);
build_iovec(&iov, &iovlen, "fspath", mntpath, (size_t)-1);
build_iovec(&iov, &iovlen, "from", dev, (size_t)-1);
build_iovec(&iov, &iovlen, "errmsg", errmsg, sizeof(errmsg));
-
- ret = nmount(iov, iovlen, mntflags);
- if (ret < 0)
- err(1, "%s %s", dev, errmsg);
- return (ret);
+ if (nmount(iov, iovlen, mntflags) == -1) {
+ if (*errmsg != '\0')
+ warn("%s: %s", dev, errmsg);
+ else
+ warn("%s", dev);
+ return (1);
+ }
+ return (0);
}
diff --git a/sbin/mount_cd9660/mount_cd9660.c b/sbin/mount_cd9660/mount_cd9660.c
index 3b2827e..2215966 100644
--- a/sbin/mount_cd9660/mount_cd9660.c
+++ b/sbin/mount_cd9660/mount_cd9660.c
@@ -149,7 +149,8 @@ main(int argc, char **argv)
* Resolve the mountpoint with realpath(3) and remove unnecessary
* slashes from the devicename if there are any.
*/
- (void)checkpath(dir, mntpath);
+ if (checkpath(dir, mntpath) != 0)
+ err(1, "%s", mntpath);
(void)rmslashes(dev, dev);
if (ssector == -1) {
diff --git a/sbin/mount_ext2fs/mount_ext2fs.c b/sbin/mount_ext2fs/mount_ext2fs.c
index 04d2ea0..8753997 100644
--- a/sbin/mount_ext2fs/mount_ext2fs.c
+++ b/sbin/mount_ext2fs/mount_ext2fs.c
@@ -103,7 +103,8 @@ main(int argc, char *argv[])
* Resolve the mountpoint with realpath(3) and remove unnecessary
* slashes from the devicename if there are any.
*/
- (void)checkpath(fs_name, mntpath);
+ if (checkpath(fs_name, mntpath) != 0)
+ err(EX_USAGE, "%s", mntpath);
(void)rmslashes(fspec, fspec);
build_iovec(&iov, &iovlen, "fstype", fstype, strlen(fstype) + 1);
diff --git a/sbin/mount_msdosfs/mount_msdosfs.c b/sbin/mount_msdosfs/mount_msdosfs.c
index 3ba67ea..3da673d 100644
--- a/sbin/mount_msdosfs/mount_msdosfs.c
+++ b/sbin/mount_msdosfs/mount_msdosfs.c
@@ -193,7 +193,8 @@ main(int argc, char **argv)
* Resolve the mountpoint with realpath(3) and remove unnecessary
* slashes from the devicename if there are any.
*/
- (void)checkpath(dir, mntpath);
+ if (checkpath(dir, mntpath) != 0)
+ err(EX_USAGE, "%s", mntpath);
(void)rmslashes(dev, dev);
if (!set_gid || !set_uid || !set_mask) {
diff --git a/sbin/mount_nfs/mount_nfs.8 b/sbin/mount_nfs/mount_nfs.8
index bdb0707..b1b5c6e 100644
--- a/sbin/mount_nfs/mount_nfs.8
+++ b/sbin/mount_nfs/mount_nfs.8
@@ -157,6 +157,10 @@ Force the mount protocol to use UDP transport, even for TCP NFS mounts.
(Necessary for some old
.Bx
servers.)
+.It Cm nametimeo Ns = Ns Aq Ar value
+Override the default of NFS_DEFAULT_NAMETIMEO for the timeout (in seconds)
+for positive name cache entries.
+If this is set to 0 it disables positive name caching for the mount point.
.It Cm negnametimeo Ns = Ns Aq Ar value
Override the default of NFS_DEFAULT_NEGNAMETIMEO for the timeout (in seconds)
for negative name cache entries. If this is set to 0 it disables negative
diff --git a/sbin/mount_nfs/mount_nfs.c b/sbin/mount_nfs/mount_nfs.c
index 9da3137..d71e952 100644
--- a/sbin/mount_nfs/mount_nfs.c
+++ b/sbin/mount_nfs/mount_nfs.c
@@ -411,7 +411,8 @@ main(int argc, char *argv[])
exit(1);
/* resolve the mountpoint with realpath(3) */
- (void)checkpath(name, mntpath);
+ if (checkpath(name, mntpath) != 0)
+ err(1, "%s", mntpath);
build_iovec(&iov, &iovlen, "fstype", fstype, (size_t)-1);
build_iovec(&iov, &iovlen, "fspath", mntpath, (size_t)-1);
@@ -788,7 +789,7 @@ getnfsargs(char *spec, struct iovec **iov, int *iovlen)
for (;;) {
/*
* Try each entry returned by getaddrinfo(). Note the
- * occurence of remote errors by setting `remoteerr'.
+ * occurrence of remote errors by setting `remoteerr'.
*/
remoteerr = 0;
for (ai = ai_nfs; ai != NULL; ai = ai->ai_next) {
diff --git a/sbin/mount_ntfs/mount_ntfs.c b/sbin/mount_ntfs/mount_ntfs.c
index 80fcab0..9adfeb5 100644
--- a/sbin/mount_ntfs/mount_ntfs.c
+++ b/sbin/mount_ntfs/mount_ntfs.c
@@ -163,7 +163,8 @@ main(int argc, char *argv[])
* Resolve the mountpoint with realpath(3) and remove unnecessary
* slashes from the devicename if there are any.
*/
- (void)checkpath(dir, mntpath);
+ if (checkpath(dir, mntpath) != 0)
+ err(EX_USAGE, "%s", mntpath);
(void)rmslashes(dev, dev);
args.fspec = dev;
diff --git a/sbin/mount_nullfs/mount_nullfs.c b/sbin/mount_nullfs/mount_nullfs.c
index 4f84954..c88db3d 100644
--- a/sbin/mount_nullfs/mount_nullfs.c
+++ b/sbin/mount_nullfs/mount_nullfs.c
@@ -90,8 +90,10 @@ main(int argc, char *argv[])
usage();
/* resolve target and source with realpath(3) */
- (void)checkpath(argv[0], target);
- (void)checkpath(argv[1], source);
+ if (checkpath(argv[0], target) != 0)
+ err(EX_USAGE, "%s", target);
+ if (checkpath(argv[1], source) != 0)
+ err(EX_USAGE, "%s", source);
if (subdir(target, source) || subdir(source, target))
errx(EX_USAGE, "%s (%s) and %s are not distinct paths",
diff --git a/sbin/mount_reiserfs/mount_reiserfs.c b/sbin/mount_reiserfs/mount_reiserfs.c
index 5fccfbe..bf62526 100644
--- a/sbin/mount_reiserfs/mount_reiserfs.c
+++ b/sbin/mount_reiserfs/mount_reiserfs.c
@@ -78,7 +78,8 @@ main(int argc, char *argv[])
* Resolve the mountpoint with realpath(3) and remove unnecessary
* slashes from the devicename if there are any.
*/
- (void)checkpath(dir, mntpath);
+ if (checkpath(dir, mntpath) != 0)
+ err(EX_USAGE, "%s", mntpath);
(void)rmslashes(dev, dev);
/* Read-only support for now */
diff --git a/sbin/mount_std/mount_std.c b/sbin/mount_std/mount_std.c
index 3f292b4..c7f1643 100644
--- a/sbin/mount_std/mount_std.c
+++ b/sbin/mount_std/mount_std.c
@@ -112,7 +112,8 @@ main(int argc, char *argv[])
usage();
/* resolve the mountpoint with realpath(3) */
- (void)checkpath(argv[1], mntpath);
+ if (checkpath(argv[1], mntpath) != 0)
+ err(EX_USAGE, "%s", mntpath);
iov[0].iov_base = "fstype";
iov[0].iov_len = sizeof("fstype");
diff --git a/sbin/mount_udf/mount_udf.c b/sbin/mount_udf/mount_udf.c
index 033db70..8ee1286 100644
--- a/sbin/mount_udf/mount_udf.c
+++ b/sbin/mount_udf/mount_udf.c
@@ -111,7 +111,8 @@ main(int argc, char **argv)
* Resolve the mountpoint with realpath(3) and remove unnecessary
* slashes from the devicename if there are any.
*/
- (void)checkpath(dir, mntpath);
+ if (checkpath(dir, mntpath) != 0)
+ err(EX_USAGE, "%s", mntpath);
(void)rmslashes(dev, dev);
/*
diff --git a/sbin/mount_unionfs/mount_unionfs.c b/sbin/mount_unionfs/mount_unionfs.c
index edb0fff..c42bf04 100644
--- a/sbin/mount_unionfs/mount_unionfs.c
+++ b/sbin/mount_unionfs/mount_unionfs.c
@@ -176,8 +176,10 @@ main(int argc, char *argv[])
usage();
/* resolve both target and source with realpath(3) */
- (void)checkpath(argv[0], target);
- (void)checkpath(argv[1], source);
+ if (checkpath(argv[0], target) != 0)
+ err(EX_USAGE, "%s", target);
+ if (checkpath(argv[1], source) != 0)
+ err(EX_USAGE, "%s", source);
if (subdir(target, source) || subdir(source, target))
errx(EX_USAGE, "%s (%s) and %s (%s) are not distinct paths",
diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c
index c40026a..5e2a579 100644
--- a/sbin/newfs/mkfs.c
+++ b/sbin/newfs/mkfs.c
@@ -989,9 +989,7 @@ void
iput(union dinode *ip, ino_t ino)
{
ufs2_daddr_t d;
- int c;
- c = ino_to_cg(&sblock, ino);
bread(&disk, part_ofs + fsbtodb(&sblock, cgtod(&sblock, 0)), (char *)&acg,
sblock.fs_cgsize);
if (acg.cg_magic != CG_MAGIC) {
diff --git a/sbin/newfs/newfs.h b/sbin/newfs/newfs.h
index d25baa7..25bfcc8 100644
--- a/sbin/newfs/newfs.h
+++ b/sbin/newfs/newfs.h
@@ -70,7 +70,7 @@
* We allocate one inode slot per NFPI fragments, expecting this
* to be far more than we will ever need.
*/
-#define NFPI 4
+#define NFPI 2
/*
* variables set up by front end.
diff --git a/sbin/newfs_msdos/newfs_msdos.8 b/sbin/newfs_msdos/newfs_msdos.8
index d888fe5..5896992 100644
--- a/sbin/newfs_msdos/newfs_msdos.8
+++ b/sbin/newfs_msdos/newfs_msdos.8
@@ -180,27 +180,27 @@ For reference purposes, this structure is presented
below.
.Bd -literal
struct bsbpb {
- u_int16_t bps; /* [-S] bytes per sector */
- u_int8_t spc; /* [-c] sectors per cluster */
- u_int16_t res; /* [-r] reserved sectors */
- u_int8_t nft; /* [-n] number of FATs */
- u_int16_t rde; /* [-e] root directory entries */
- u_int16_t sec; /* [-s] total sectors */
- u_int8_t mid; /* [-m] media descriptor */
- u_int16_t spf; /* [-a] sectors per FAT */
- u_int16_t spt; /* [-u] sectors per track */
- u_int16_t hds; /* [-h] drive heads */
- u_int32_t hid; /* [-o] hidden sectors */
- u_int32_t bsec; /* [-s] big total sectors */
+ u_int16_t bpbBytesPerSec; /* [-S] bytes per sector */
+ u_int8_t bpbSecPerClust; /* [-c] sectors per cluster */
+ u_int16_t bpbResSectors; /* [-r] reserved sectors */
+ u_int8_t bpbFATs; /* [-n] number of FATs */
+ u_int16_t bpbRootDirEnts; /* [-e] root directory entries */
+ u_int16_t bpbSectors; /* [-s] total sectors */
+ u_int8_t bpbMedia; /* [-m] media descriptor */
+ u_int16_t bpbFATsecs; /* [-a] sectors per FAT */
+ u_int16_t bpbSecPerTrack; /* [-u] sectors per track */
+ u_int16_t bpbHeads; /* [-h] drive heads */
+ u_int32_t bpbHiddenSecs; /* [-o] hidden sectors */
+ u_int32_t bpbHugeSectors; /* [-s] big total sectors */
};
/* FAT32 extensions */
struct bsxbpb {
- u_int32_t bspf; /* [-a] big sectors per FAT */
- u_int16_t xflg; /* control flags */
- u_int16_t vers; /* file system version */
- u_int32_t rdcl; /* root directory start cluster */
- u_int16_t infs; /* [-i] file system info sector */
- u_int16_t bkbs; /* [-k] backup boot sector */
+ u_int32_t bpbBigFATsecs; /* [-a] big sectors per FAT */
+ u_int16_t bpbExtFlags; /* control flags */
+ u_int16_t bpbFSVers; /* file system version */
+ u_int32_t bpbRootClust; /* root directory start cluster */
+ u_int16_t bpbFSInfo; /* [-i] file system info sector */
+ u_int16_t bpbBackup; /* [-k] backup boot sector */
};
.Ed
.Sh LIMITATION
diff --git a/sbin/newfs_msdos/newfs_msdos.c b/sbin/newfs_msdos/newfs_msdos.c
index c7ec59b..c2e9a35 100644
--- a/sbin/newfs_msdos/newfs_msdos.c
+++ b/sbin/newfs_msdos/newfs_msdos.c
@@ -66,7 +66,7 @@ static const char rcsid[] =
#define MINCLS12 1U /* minimum FAT12 clusters */
#define MINCLS16 0x1000U /* minimum FAT16 clusters */
#define MINCLS32 2U /* minimum FAT32 clusters */
-#define MAXCLS12 0xfedU /* maximum FAT12 clusters */
+#define MAXCLS12 0xfedU /* maximum FAT12 clusters */
#define MAXCLS16 0xfff5U /* maximum FAT16 clusters */
#define MAXCLS32 0xffffff5U /* maximum FAT32 clusters */
@@ -97,7 +97,7 @@ static const char rcsid[] =
#define argtox(arg, lo, msg) argtou(arg, lo, UINT_MAX, msg)
struct bs {
- u_int8_t bsJump[3]; /* bootstrap entry point */
+ u_int8_t bsJump[3]; /* bootstrap entry point */
u_int8_t bsOemName[8]; /* OEM name and version */
} __packed;
@@ -123,7 +123,7 @@ struct bsxbpb {
u_int8_t bpbRootClust[4]; /* root directory start cluster */
u_int8_t bpbFSInfo[2]; /* file system info sector */
u_int8_t bpbBackup[2]; /* backup boot sector */
- u_int8_t bpbReserved[12]; /* reserved */
+ u_int8_t bpbReserved[12]; /* reserved */
} __packed;
struct bsx {
@@ -136,13 +136,13 @@ struct bsx {
} __packed;
struct de {
- u_int8_t deName[11]; /* name and extension */
- u_int8_t deAttributes; /* attributes */
- u_int8_t rsvd[10]; /* reserved */
- u_int8_t deMTime[2]; /* creation time */
- u_int8_t deMDate[2]; /* creation date */
- u_int8_t deStartCluster[2]; /* starting cluster */
- u_int8_t deFileSize[4]; /* size */
+ u_int8_t deName[11]; /* name and extension */
+ u_int8_t deAttributes; /* attributes */
+ u_int8_t rsvd[10]; /* reserved */
+ u_int8_t deMTime[2]; /* creation time */
+ u_int8_t deMDate[2]; /* creation date */
+ u_int8_t deStartCluster[2]; /* starting cluster */
+ u_int8_t deFileSize[4]; /* size */
} __packed;
struct bpb {
@@ -160,29 +160,26 @@ struct bpb {
u_int bpbHugeSectors; /* big total sectors */
u_int bpbBigFATsecs; /* big sectors per FAT */
u_int bpbRootClust; /* root directory start cluster */
- u_int bpbFSInfo; /* file system info sector */
- u_int bpbBackup; /* backup boot sector */
+ u_int bpbFSInfo; /* file system info sector */
+ u_int bpbBackup; /* backup boot sector */
};
#define BPBGAP 0, 0, 0, 0, 0, 0
-#define INIT(a, b, c, d, e, f, g, h, i, j) \
- { .bpbBytesPerSec = a, .bpbSecPerClust = b, .bpbResSectors = c, .bpbFATs = d, .bpbRootDirEnts = e, \
- .bpbSectors = f, .bpbMedia = g, .bpbFATsecs = h, .bpbSecPerTrack = i, .bpbHeads = j, }
static struct {
const char *name;
struct bpb bpb;
} const stdfmt[] = {
- {"160", INIT(512, 1, 1, 2, 64, 320, 0xfe, 1, 8, 1)},
- {"180", INIT(512, 1, 1, 2, 64, 360, 0xfc, 2, 9, 1)},
- {"320", INIT(512, 2, 1, 2, 112, 640, 0xff, 1, 8, 2)},
- {"360", INIT(512, 2, 1, 2, 112, 720, 0xfd, 2, 9, 2)},
- {"640", INIT(512, 2, 1, 2, 112, 1280, 0xfb, 2, 8, 2)},
- {"720", INIT(512, 2, 1, 2, 112, 1440, 0xf9, 3, 9, 2)},
- {"1200", INIT(512, 1, 1, 2, 224, 2400, 0xf9, 7, 15, 2)},
- {"1232", INIT(1024,1, 1, 2, 192, 1232, 0xfe, 2, 8, 2)},
- {"1440", INIT(512, 1, 1, 2, 224, 2880, 0xf0, 9, 18, 2)},
- {"2880", INIT(512, 2, 1, 2, 240, 5760, 0xf0, 9, 36, 2)}
+ {"160", {512, 1, 1, 2, 64, 320, 0xfe, 1, 8, 1, BPBGAP}},
+ {"180", {512, 1, 1, 2, 64, 360, 0xfc, 2, 9, 1, BPBGAP}},
+ {"320", {512, 2, 1, 2, 112, 640, 0xff, 1, 8, 2, BPBGAP}},
+ {"360", {512, 2, 1, 2, 112, 720, 0xfd, 2, 9, 2, BPBGAP}},
+ {"640", {512, 2, 1, 2, 112, 1280, 0xfb, 2, 8, 2, BPBGAP}},
+ {"720", {512, 2, 1, 2, 112, 1440, 0xf9, 3, 9, 2, BPBGAP}},
+ {"1200", {512, 1, 1, 2, 224, 2400, 0xf9, 7, 15, 2, BPBGAP}},
+ {"1232", {1024,1, 1, 2, 192, 1232, 0xfe, 2, 8, 2, BPBGAP}},
+ {"1440", {512, 1, 1, 2, 224, 2880, 0xf0, 9, 18, 2, BPBGAP}},
+ {"2880", {512, 2, 1, 2, 240, 5760, 0xf0, 9, 36, 2, BPBGAP}}
};
static const u_int8_t bootcode[] = {
@@ -494,7 +491,8 @@ main(int argc, char *argv[])
if ((fd1 = open(bname, O_RDONLY)) == -1 || fstat(fd1, &sb))
err(1, "%s", bname);
if (!S_ISREG(sb.st_mode) || sb.st_size % bpb.bpbBytesPerSec ||
- sb.st_size < bpb.bpbBytesPerSec || sb.st_size > bpb.bpbBytesPerSec * MAXU16)
+ sb.st_size < bpb.bpbBytesPerSec ||
+ sb.st_size > bpb.bpbBytesPerSec * MAXU16)
errx(1, "%s: inappropriate file type or format", bname);
bss = sb.st_size / bpb.bpbBytesPerSec;
}
@@ -503,19 +501,23 @@ main(int argc, char *argv[])
if (!fat) {
if (bpb.bpbHugeSectors < (bpb.bpbResSectors ? bpb.bpbResSectors : bss) +
howmany((RESFTE + (bpb.bpbSecPerClust ? MINCLS16 : MAXCLS12 + 1)) *
- ((bpb.bpbSecPerClust ? 16 : 12) / BPN), bpb.bpbBytesPerSec * NPB) *
+ (bpb.bpbSecPerClust ? 16 : 12) / BPN,
+ bpb.bpbBytesPerSec * NPB) *
bpb.bpbFATs +
howmany(bpb.bpbRootDirEnts ? bpb.bpbRootDirEnts : DEFRDE,
bpb.bpbBytesPerSec / sizeof(struct de)) +
(bpb.bpbSecPerClust ? MINCLS16 : MAXCLS12 + 1) *
- (bpb.bpbSecPerClust ? bpb.bpbSecPerClust : howmany(DEFBLK, bpb.bpbBytesPerSec)))
+ (bpb.bpbSecPerClust ? bpb.bpbSecPerClust :
+ howmany(DEFBLK, bpb.bpbBytesPerSec)))
fat = 12;
else if (bpb.bpbRootDirEnts || bpb.bpbHugeSectors <
(bpb.bpbResSectors ? bpb.bpbResSectors : bss) +
- howmany((RESFTE + MAXCLS16) * 2, bpb.bpbBytesPerSec) * bpb.bpbFATs +
+ howmany((RESFTE + MAXCLS16) * 2, bpb.bpbBytesPerSec) *
+ bpb.bpbFATs +
howmany(DEFRDE, bpb.bpbBytesPerSec / sizeof(struct de)) +
(MAXCLS16 + 1) *
- (bpb.bpbSecPerClust ? bpb.bpbSecPerClust : howmany(8192, bpb.bpbBytesPerSec)))
+ (bpb.bpbSecPerClust ? bpb.bpbSecPerClust :
+ howmany(8192, bpb.bpbBytesPerSec)))
fat = 16;
else
fat = 32;
@@ -539,21 +541,27 @@ main(int argc, char *argv[])
x = bpb.bpbBackup + 1;
}
if (!bpb.bpbResSectors)
- bpb.bpbResSectors = fat == 32 ? MAX(x, MAX(16384 / bpb.bpbBytesPerSec, 4)) : x;
+ bpb.bpbResSectors = fat == 32 ?
+ MAX(x, MAX(16384 / bpb.bpbBytesPerSec, 4)) : x;
else if (bpb.bpbResSectors < x)
- errx(1, "too few reserved sectors (need %d have %d)", x, bpb.bpbResSectors);
+ errx(1, "too few reserved sectors (need %d have %d)", x,
+ bpb.bpbResSectors);
if (fat != 32 && !bpb.bpbRootDirEnts)
bpb.bpbRootDirEnts = DEFRDE;
rds = howmany(bpb.bpbRootDirEnts, bpb.bpbBytesPerSec / sizeof(struct de));
if (!bpb.bpbSecPerClust)
- for (bpb.bpbSecPerClust = howmany(fat == 16 ? DEFBLK16 : DEFBLK, bpb.bpbBytesPerSec);
+ for (bpb.bpbSecPerClust = howmany(fat == 16 ? DEFBLK16 :
+ DEFBLK, bpb.bpbBytesPerSec);
bpb.bpbSecPerClust < MAXSPC &&
bpb.bpbResSectors +
howmany((RESFTE + maxcls(fat)) * (fat / BPN),
- bpb.bpbBytesPerSec * NPB) * bpb.bpbFATs +
+ bpb.bpbBytesPerSec * NPB) *
+ bpb.bpbFATs +
rds +
- (u_int64_t)(maxcls(fat) + 1) * bpb.bpbSecPerClust <= bpb.bpbHugeSectors;
- bpb.bpbSecPerClust <<= 1);
+ (u_int64_t) (maxcls(fat) + 1) *
+ bpb.bpbSecPerClust <= bpb.bpbHugeSectors;
+ bpb.bpbSecPerClust <<= 1)
+ continue;
if (fat != 32 && bpb.bpbBigFATsecs > MAXU16)
errx(1, "too many sectors/FAT for FAT12/16");
x1 = bpb.bpbResSectors + rds;
@@ -562,7 +570,8 @@ main(int argc, char *argv[])
errx(1, "meta data exceeds file system size");
x1 += x * bpb.bpbFATs;
x = (u_int64_t)(bpb.bpbHugeSectors - x1) * bpb.bpbBytesPerSec * NPB /
- (bpb.bpbSecPerClust * bpb.bpbBytesPerSec * NPB + fat / BPN * bpb.bpbFATs);
+ (bpb.bpbSecPerClust * bpb.bpbBytesPerSec * NPB + fat /
+ BPN * bpb.bpbFATs);
x2 = howmany((RESFTE + MIN(x, maxcls(fat))) * (fat / BPN),
bpb.bpbBytesPerSec * NPB);
if (!bpb.bpbBigFATsecs) {
@@ -570,7 +579,8 @@ main(int argc, char *argv[])
x1 += (bpb.bpbBigFATsecs - 1) * bpb.bpbFATs;
}
cls = (bpb.bpbHugeSectors - x1) / bpb.bpbSecPerClust;
- x = (u_int64_t)bpb.bpbBigFATsecs * bpb.bpbBytesPerSec * NPB / (fat / BPN) - RESFTE;
+ x = (u_int64_t)bpb.bpbBigFATsecs * bpb.bpbBytesPerSec * NPB / (fat / BPN) -
+ RESFTE;
if (cls > x)
cls = x;
if (bpb.bpbBigFATsecs < x2)
@@ -608,7 +618,8 @@ main(int argc, char *argv[])
tm = localtime(&now);
if (!(img = malloc(bpb.bpbBytesPerSec)))
err(1, NULL);
- dir = bpb.bpbResSectors + (bpb.bpbFATsecs ? bpb.bpbFATsecs : bpb.bpbBigFATsecs) * bpb.bpbFATs;
+ dir = bpb.bpbResSectors + (bpb.bpbFATsecs ? bpb.bpbFATsecs :
+ bpb.bpbBigFATsecs) * bpb.bpbFATs;
memset(&si_sa, 0, sizeof(si_sa));
si_sa.sa_handler = infohandler;
if (sigaction(SIGINFO, &si_sa, NULL) == -1)
@@ -638,7 +649,8 @@ main(int argc, char *argv[])
} else
memset(img, 0, bpb.bpbBytesPerSec);
if (!lsn ||
- (fat == 32 && bpb.bpbBackup != MAXU16 && lsn == bpb.bpbBackup)) {
+ (fat == 32 && bpb.bpbBackup != MAXU16 &&
+ lsn == bpb.bpbBackup)) {
x1 = sizeof(struct bs);
bsbpb = (struct bsbpb *)(img + x1);
mk2(bsbpb->bpbBytesPerSec, bpb.bpbBytesPerSec);
@@ -702,7 +714,8 @@ main(int argc, char *argv[])
mk2(img + MINBPS - 2, DOSMAGIC);
} else if (lsn >= bpb.bpbResSectors && lsn < dir &&
!((lsn - bpb.bpbResSectors) %
- (bpb.bpbFATsecs ? bpb.bpbFATsecs : bpb.bpbBigFATsecs))) {
+ (bpb.bpbFATsecs ? bpb.bpbFATsecs :
+ bpb.bpbBigFATsecs))) {
mk1(img[0], bpb.bpbMedia);
for (x = 1; x < fat * (fat == 32 ? 3 : 2) / 8; x++)
mk1(img[x], fat == 32 && x % 4 == 3 ? 0x0f : 0xff);
@@ -817,16 +830,19 @@ getdiskinfo(int fd, const char *fname, const char *dtype, __unused int oflag,
if (bpb->bpbBytesPerSec)
dlp.d_secsize = bpb->bpbBytesPerSec;
if (ioctl(fd, DIOCGDINFO, &dlp) == -1) {
- if (bpb->bpbBytesPerSec == 0 && ioctl(fd, DIOCGSECTORSIZE, &dlp.d_secsize) == -1)
+ if (bpb->bpbBytesPerSec == 0 && ioctl(fd, DIOCGSECTORSIZE,
+ &dlp.d_secsize) == -1)
errx(1, "Cannot get sector size, %s", strerror(errno));
dlp.d_secperunit = ms / dlp.d_secsize;
- if (bpb->bpbSecPerTrack == 0 && ioctl(fd, DIOCGFWSECTORS, &dlp.d_nsectors) == -1) {
+ if (bpb->bpbSecPerTrack == 0 && ioctl(fd, DIOCGFWSECTORS,
+ &dlp.d_nsectors) == -1) {
warnx("Cannot get number of sectors per track, %s", strerror(errno));
dlp.d_nsectors = 63;
}
- if (bpb->bpbHeads == 0 && ioctl(fd, DIOCGFWHEADS, &dlp.d_ntracks) == -1) {
+ if (bpb->bpbHeads == 0 &&
+ ioctl(fd, DIOCGFWHEADS, &dlp.d_ntracks) == -1) {
warnx("Cannot get number of heads, %s", strerror(errno));
if (dlp.d_secperunit <= 63*1*1024)
dlp.d_ntracks = 1;
@@ -859,7 +875,8 @@ getdiskinfo(int fd, const char *fname, const char *dtype, __unused int oflag,
static void
print_bpb(struct bpb *bpb)
{
- printf("BytesPerSec=%u SecPerClust=%u ResSectors=%u FATs=%u", bpb->bpbBytesPerSec, bpb->bpbSecPerClust, bpb->bpbResSectors,
+ printf("BytesPerSec=%u SecPerClust=%u ResSectors=%u FATs=%u",
+ bpb->bpbBytesPerSec, bpb->bpbSecPerClust, bpb->bpbResSectors,
bpb->bpbFATs);
if (bpb->bpbRootDirEnts)
printf(" RootDirEnts=%u", bpb->bpbRootDirEnts);
@@ -868,11 +885,13 @@ print_bpb(struct bpb *bpb)
printf(" Media=%#x", bpb->bpbMedia);
if (bpb->bpbFATsecs)
printf(" FATsecs=%u", bpb->bpbFATsecs);
- printf(" SecPerTrack=%u Heads=%u HiddenSecs=%u", bpb->bpbSecPerTrack, bpb->bpbHeads, bpb->bpbHiddenSecs);
+ printf(" SecPerTrack=%u Heads=%u HiddenSecs=%u", bpb->bpbSecPerTrack,
+ bpb->bpbHeads, bpb->bpbHiddenSecs);
if (bpb->bpbHugeSectors)
printf(" HugeSectors=%u", bpb->bpbHugeSectors);
if (!bpb->bpbFATsecs) {
- printf(" FATsecs=%u RootCluster=%u", bpb->bpbBigFATsecs, bpb->bpbRootClust);
+ printf(" FATsecs=%u RootCluster=%u", bpb->bpbBigFATsecs,
+ bpb->bpbRootClust);
printf(" FSInfo=");
printf(bpb->bpbFSInfo == MAXU16 ? "%#x" : "%u", bpb->bpbFSInfo);
printf(" Backup=");
@@ -919,6 +938,7 @@ argtooff(const char *arg, const char *msg)
char *s;
off_t x;
+ errno = 0;
x = strtoll(arg, &s, 0);
/* allow at most one extra char */
if (errno || x < 0 || (s[0] && s[1]) )
@@ -929,30 +949,30 @@ argtooff(const char *arg, const char *msg)
errx(1, "%s: bad %s", arg, msg);
/* notreached */
- case 's': /* sector */
+ case 's': /* sector */
case 'S':
- x <<= 9; /* times 512 */
+ x <<= 9; /* times 512 */
break;
- case 'k': /* kilobyte */
+ case 'k': /* kilobyte */
case 'K':
- x <<= 10; /* times 1024 */
+ x <<= 10; /* times 1024 */
break;
- case 'm': /* megabyte */
+ case 'm': /* megabyte */
case 'M':
- x <<= 20; /* times 1024*1024 */
+ x <<= 20; /* times 1024*1024 */
break;
- case 'g': /* gigabyte */
+ case 'g': /* gigabyte */
case 'G':
- x <<= 30; /* times 1024*1024*1024 */
+ x <<= 30; /* times 1024*1024*1024 */
break;
- case 'p': /* partition start */
- case 'P': /* partition start */
- case 'l': /* partition length */
- case 'L': /* partition length */
+ case 'p': /* partition start */
+ case 'P':
+ case 'l': /* partition length */
+ case 'L':
errx(1, "%s: not supported yet %s", arg, msg);
/* notreached */
}
diff --git a/sbin/ping6/ping6.c b/sbin/ping6/ping6.c
index e01bf5c..711561e 100644
--- a/sbin/ping6/ping6.c
+++ b/sbin/ping6/ping6.c
@@ -1166,7 +1166,7 @@ main(int argc, char *argv[])
/*
* receive control messages only. Process the
- * exceptions (currently the only possiblity is
+ * exceptions (currently the only possibility is
* a path MTU notification.)
*/
if ((mtu = get_pathmtu(&m)) > 0) {
@@ -1812,7 +1812,7 @@ pr_ip6opt(void *extbuf, size_t bufsize)
struct ip6_hbh *ext;
int currentlen;
u_int8_t type;
- socklen_t extlen, len, origextlen;
+ socklen_t extlen, len;
void *databuf;
size_t offset;
u_int16_t value2;
@@ -1828,7 +1828,6 @@ pr_ip6opt(void *extbuf, size_t bufsize)
* subtract the size of a cmsg structure from the buffer size.
*/
if (bufsize < (extlen + CMSG_SPACE(0))) {
- origextlen = extlen;
extlen = bufsize - CMSG_SPACE(0);
warnx("options truncated, showing only %u (total=%u)",
(unsigned int)(extlen / 8 - 1),
diff --git a/sbin/rcorder/rcorder.c b/sbin/rcorder/rcorder.c
index 5eedc48..c92d063 100644
--- a/sbin/rcorder/rcorder.c
+++ b/sbin/rcorder/rcorder.c
@@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$");
#include "hash.h"
#ifdef DEBUG
-int debug = 0;
+static int debug = 0;
# define DPRINTF(args) if (debug) { fflush(stdout); fprintf args; }
#else
# define DPRINTF(args)
@@ -124,33 +124,32 @@ struct filenode {
strnodelist *keyword_list;
};
-filenode fn_head_s, *fn_head;
-
-strnodelist *bl_list;
-strnodelist *keep_list;
-strnodelist *skip_list;
-
-void do_file(filenode *fnode);
-void strnode_add(strnodelist **, char *, filenode *);
-int skip_ok(filenode *fnode);
-int keep_ok(filenode *fnode);
-void satisfy_req(f_reqnode *rnode, char *filename);
-void crunch_file(char *);
-void parse_require(filenode *, char *);
-void parse_provide(filenode *, char *);
-void parse_before(filenode *, char *);
-void parse_keywords(filenode *, char *);
-filenode *filenode_new(char *);
-void add_require(filenode *, char *);
-void add_provide(filenode *, char *);
-void add_before(filenode *, char *);
-void add_keyword(filenode *, char *);
-void insert_before(void);
-Hash_Entry *make_fake_provision(filenode *);
-void crunch_all_files(void);
-void initialize(void);
-void generate_ordering(void);
-int main(int, char *[]);
+static filenode fn_head_s, *fn_head;
+
+static strnodelist *bl_list;
+static strnodelist *keep_list;
+static strnodelist *skip_list;
+
+static void do_file(filenode *fnode);
+static void strnode_add(strnodelist **, char *, filenode *);
+static int skip_ok(filenode *fnode);
+static int keep_ok(filenode *fnode);
+static void satisfy_req(f_reqnode *rnode, char *filename);
+static void crunch_file(char *);
+static void parse_require(filenode *, char *);
+static void parse_provide(filenode *, char *);
+static void parse_before(filenode *, char *);
+static void parse_keywords(filenode *, char *);
+static filenode *filenode_new(char *);
+static void add_require(filenode *, char *);
+static void add_provide(filenode *, char *);
+static void add_before(filenode *, char *);
+static void add_keyword(filenode *, char *);
+static void insert_before(void);
+static Hash_Entry *make_fake_provision(filenode *);
+static void crunch_all_files(void);
+static void initialize(void);
+static void generate_ordering(void);
int
main(int argc, char *argv[])
@@ -196,7 +195,7 @@ main(int argc, char *argv[])
/*
* initialise various variables.
*/
-void
+static void
initialize(void)
{
@@ -207,7 +206,7 @@ initialize(void)
}
/* generic function to insert a new strnodelist element */
-void
+static void
strnode_add(strnodelist **listp, char *s, filenode *fnode)
{
strnodelist *ent;
@@ -229,7 +228,7 @@ strnode_add(strnodelist **listp, char *s, filenode *fnode)
* we have a new filename, create a new filenode structure.
* fill in the bits, and put it in the filenode linked list
*/
-filenode *
+static filenode *
filenode_new(char *filename)
{
filenode *temp;
@@ -257,7 +256,7 @@ filenode_new(char *filename)
/*
* add a requirement to a filenode.
*/
-void
+static void
add_require(filenode *fnode, char *s)
{
Hash_Entry *entry;
@@ -277,7 +276,7 @@ add_require(filenode *fnode, char *s)
* add a provision to a filenode. if this provision doesn't
* have a head node, create one here.
*/
-void
+static void
add_provide(filenode *fnode, char *s)
{
Hash_Entry *entry;
@@ -356,7 +355,7 @@ add_provide(filenode *fnode, char *s)
/*
* put the BEFORE: lines to a list and handle them later.
*/
-void
+static void
add_before(filenode *fnode, char *s)
{
strnodelist *bf_ent;
@@ -371,7 +370,7 @@ add_before(filenode *fnode, char *s)
/*
* add a key to a filenode.
*/
-void
+static void
add_keyword(filenode *fnode, char *s)
{
@@ -382,7 +381,7 @@ add_keyword(filenode *fnode, char *s)
* loop over the rest of a REQUIRE line, giving each word to
* add_require() to do the real work.
*/
-void
+static void
parse_require(filenode *node, char *buffer)
{
char *s;
@@ -396,7 +395,7 @@ parse_require(filenode *node, char *buffer)
* loop over the rest of a PROVIDE line, giving each word to
* add_provide() to do the real work.
*/
-void
+static void
parse_provide(filenode *node, char *buffer)
{
char *s;
@@ -410,7 +409,7 @@ parse_provide(filenode *node, char *buffer)
* loop over the rest of a BEFORE line, giving each word to
* add_before() to do the real work.
*/
-void
+static void
parse_before(filenode *node, char *buffer)
{
char *s;
@@ -424,7 +423,7 @@ parse_before(filenode *node, char *buffer)
* loop over the rest of a KEYWORD line, giving each word to
* add_keyword() to do the real work.
*/
-void
+static void
parse_keywords(filenode *node, char *buffer)
{
char *s;
@@ -438,7 +437,7 @@ parse_keywords(filenode *node, char *buffer)
* given a file name, create a filenode for it, read in lines looking
* for provision and requirement lines, building the graphs as needed.
*/
-void
+static void
crunch_file(char *filename)
{
FILE *fp;
@@ -510,7 +509,7 @@ crunch_file(char *filename)
fclose(fp);
}
-Hash_Entry *
+static Hash_Entry *
make_fake_provision(filenode *node)
{
Hash_Entry *entry;
@@ -556,7 +555,7 @@ make_fake_provision(filenode *node)
* for each entry in the provision list for S, add a requirement to
* that provisions filenode for P.
*/
-void
+static void
insert_before(void)
{
Hash_Entry *entry, *fake_prov_entry;
@@ -594,7 +593,7 @@ insert_before(void)
* real work. after we have built all the nodes, insert the BEFORE:
* lines into graph(s).
*/
-void
+static void
crunch_all_files(void)
{
int i;
@@ -619,7 +618,7 @@ crunch_all_files(void)
* calling do_file() (enter recursion) for each filenode in this
* provision.
*/
-void
+static void
satisfy_req(f_reqnode *rnode, char *filename)
{
Hash_Entry *entry;
@@ -660,7 +659,7 @@ satisfy_req(f_reqnode *rnode, char *filename)
do_file(head->next->fnode);
}
-int
+static int
skip_ok(filenode *fnode)
{
strnodelist *s;
@@ -674,7 +673,7 @@ skip_ok(filenode *fnode)
return (1);
}
-int
+static int
keep_ok(filenode *fnode)
{
strnodelist *s;
@@ -699,7 +698,7 @@ keep_ok(filenode *fnode)
* safely free() anything related to items that may be recursed on.
* Circular dependancies will cause problems if we do.
*/
-void
+static void
do_file(filenode *fnode)
{
f_reqnode *r, *r_tmp;
@@ -782,7 +781,7 @@ do_file(filenode *fnode)
#endif
}
-void
+static void
generate_ordering(void)
{
diff --git a/sbin/reboot/nextboot.8 b/sbin/reboot/nextboot.8
index 765fa79..99986b1 100644
--- a/sbin/reboot/nextboot.8
+++ b/sbin/reboot/nextboot.8
@@ -117,7 +117,7 @@ The
.Nm
code is implemented in the
.Xr loader 8 .
-It is not the most throughly tested code.
+It is not the most thoroughly tested code.
It is also my first attempt to write in Forth.
.Pp
Finally, it does some evil things like writing to the file system before it
diff --git a/sbin/reboot/reboot.c b/sbin/reboot/reboot.c
index 9e5dab8..d927db0 100644
--- a/sbin/reboot/reboot.c
+++ b/sbin/reboot/reboot.c
@@ -60,7 +60,7 @@ __FBSDID("$FreeBSD$");
static void usage(void);
static u_int get_pageins(void);
-int dohalt;
+static int dohalt;
int
main(int argc, char *argv[])
@@ -69,9 +69,9 @@ main(int argc, char *argv[])
const struct passwd *pw;
int ch, howto, i, fd, lflag, nflag, qflag, sverrno;
u_int pageins;
- const char *p, *user, *kernel = NULL;
+ const char *user, *kernel = NULL;
- if (strstr((p = rindex(*argv, '/')) ? p + 1 : *argv, "halt")) {
+ if (strcmp(getprogname(), "halt") == 0) {
dohalt = 1;
howto = RB_HALT;
} else
diff --git a/sbin/recoverdisk/recoverdisk.1 b/sbin/recoverdisk/recoverdisk.1
index 9eff8f7..ef1241b 100644
--- a/sbin/recoverdisk/recoverdisk.1
+++ b/sbin/recoverdisk/recoverdisk.1
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd May 1, 2011
+.Dd January 5, 2012
.Dt RECOVERDISK 1
.Os
.Sh NAME
@@ -124,7 +124,11 @@ recoverdisk -b 0 /dev/ad3 /somewhere
.Ed
.Sh SEE ALSO
-.Xr dd 1
+.Xr dd 1 ,
+.Xr ada 4,
+.Xr cam 4,
+.Xr cd 4,
+.Xr da 4
.Sh HISTORY
The
.Nm
@@ -149,6 +153,18 @@ flying by.
This is harmless and can be avoided by setting
.Fl b
to no more than 128kB.
+.Pp
+.Nm
+needs to know about read errors as fast as possible, i.e. retries by lower
+layers will usually slow down the operation.
+When using
+.Xr cam 4
+attached drives, you may want to set kern.cam.XX.retry_count to zero, e.g.:
+.Bd -literal
+# sysctl kern.cam.ada.retry_count=0
+# sysctl kern.cam.cd.retry_count=0
+# sysctl kern.cam.da.retry_count=0
+.Ed
.\".Pp
.\"When reading from optical media, a bug in the GEOM framework will
.\"prevent it from seeing that the media has been removed.
diff --git a/sbin/route/route.c b/sbin/route/route.c
index 49d14dd..4b2f16e 100644
--- a/sbin/route/route.c
+++ b/sbin/route/route.c
@@ -375,7 +375,8 @@ routename(struct sockaddr *sa)
#ifdef __KAME__
if (sa->sa_len == sizeof(struct sockaddr_in6) &&
(IN6_IS_ADDR_LINKLOCAL(&sin6.sin6_addr) ||
- IN6_IS_ADDR_MC_LINKLOCAL(&sin6.sin6_addr)) &&
+ IN6_IS_ADDR_MC_LINKLOCAL(&sin6.sin6_addr) ||
+ IN6_IS_ADDR_MC_NODELOCAL(&sin6.sin6_addr)) &&
sin6.sin6_scope_id == 0) {
sin6.sin6_scope_id =
ntohs(*(u_int16_t *)&sin6.sin6_addr.s6_addr[2]);
@@ -500,7 +501,8 @@ netname(struct sockaddr *sa)
#ifdef __KAME__
if (sa->sa_len == sizeof(struct sockaddr_in6) &&
(IN6_IS_ADDR_LINKLOCAL(&sin6.sin6_addr) ||
- IN6_IS_ADDR_MC_LINKLOCAL(&sin6.sin6_addr)) &&
+ IN6_IS_ADDR_MC_LINKLOCAL(&sin6.sin6_addr) ||
+ IN6_IS_ADDR_MC_NODELOCAL(&sin6.sin6_addr)) &&
sin6.sin6_scope_id == 0) {
sin6.sin6_scope_id =
ntohs(*(u_int16_t *)&sin6.sin6_addr.s6_addr[2]);
@@ -1002,7 +1004,8 @@ getaddr(int which, char *str, struct hostent **hpp)
memcpy(&su->sin6, res->ai_addr, sizeof(su->sin6));
#ifdef __KAME__
if ((IN6_IS_ADDR_LINKLOCAL(&su->sin6.sin6_addr) ||
- IN6_IS_ADDR_MC_LINKLOCAL(&su->sin6.sin6_addr)) &&
+ IN6_IS_ADDR_MC_LINKLOCAL(&su->sin6.sin6_addr) ||
+ IN6_IS_ADDR_MC_NODELOCAL(&su->sin6.sin6_addr)) &&
su->sin6.sin6_scope_id) {
*(u_int16_t *)&su->sin6.sin6_addr.s6_addr[2] =
htons(su->sin6.sin6_scope_id);
diff --git a/sbin/routed/main.c b/sbin/routed/main.c
index 85bc9e8..1658d2e 100644
--- a/sbin/routed/main.c
+++ b/sbin/routed/main.c
@@ -414,7 +414,7 @@ usage:
continue;
}
- /* Check the kernel table occassionally for mysteriously
+ /* Check the kernel table occasionally for mysteriously
* evaporated routes
*/
timevalsub(&t2, &flush_kern_timer, &now);
@@ -446,7 +446,7 @@ usage:
* the previous update was finished.
* Even if we just started after discovering
* a 2nd interface or were otherwise delayed,
- * pick a 30-second aniversary of the
+ * pick a 30-second anniversary of the
* original broadcast time.
*/
n = 1 + (0-t2.tv_sec)/SUPPLY_INTERVAL;
diff --git a/sbin/routed/parms.c b/sbin/routed/parms.c
index b68b107..d5313e0 100644
--- a/sbin/routed/parms.c
+++ b/sbin/routed/parms.c
@@ -188,7 +188,7 @@ gwkludge(void)
}
for (lnum = 1; ; lnum++) {
- if (0 == fgets(lbuf, sizeof(lbuf), fp))
+ if (fgets(lbuf, sizeof(lbuf), fp) == NULL)
break;
lptr = lbuf;
while (*lptr == ' ')
diff --git a/sbin/routed/radix.c b/sbin/routed/radix.c
index 7685f78..5365e6d 100644
--- a/sbin/routed/radix.c
+++ b/sbin/routed/radix.c
@@ -97,7 +97,7 @@ static struct radix_node *rn_match(void *v_arg, struct radix_node_head *head);
* node as high in the tree as we can go.
*
* The present version of the code makes use of normal routes in short-
- * circuiting an explict mask and compare operation when testing whether
+ * circuiting an explicit mask and compare operation when testing whether
* a key satisfies a normal route, and also in remembering the unique leaf
* that governs a subtree.
*/
@@ -247,7 +247,7 @@ rn_match(void *v_arg,
*
* In this case, we have a complete match of the key. Unless
* the node is one of the roots, we are finished.
- * If it is the zeros root, then take what we have, prefering
+ * If it is the zeros root, then take what we have, preferring
* any real data.
* If it is the ones root, then pretend the target key was followed
* by a byte of zeros.
diff --git a/sbin/routed/rtquery/Makefile b/sbin/routed/rtquery/Makefile
index 458d1ca..e5d0f5a 100644
--- a/sbin/routed/rtquery/Makefile
+++ b/sbin/routed/rtquery/Makefile
@@ -7,5 +7,6 @@ MAN= rtquery.8
LDADD= -lmd
DPADD= ${LIBMD}
WARNS?= 3
+NO_WARRAY_BOUNDS=
.include <bsd.prog.mk>
diff --git a/sbin/routed/table.c b/sbin/routed/table.c
index 8054a49..ec36989 100644
--- a/sbin/routed/table.c
+++ b/sbin/routed/table.c
@@ -2071,7 +2071,7 @@ walk_age(struct radix_node *rn,
/* try to switch to an alternative */
rtswitch(RT, 0);
- /* Delete a dead route after it has been publically mourned. */
+ /* Delete a dead route after it has been publicly mourned. */
if (now_garbage > RT->rt_time) {
rtdelete(RT);
return 0;
diff --git a/sbin/shutdown/shutdown.c b/sbin/shutdown/shutdown.c
index 7bd93a0..6e662a8 100644
--- a/sbin/shutdown/shutdown.c
+++ b/sbin/shutdown/shutdown.c
@@ -123,7 +123,7 @@ main(int argc, char **argv)
* Test for the special case where the utility is called as
* "poweroff", for which it runs 'shutdown -p now'.
*/
- if ((p = rindex(argv[0], '/')) == NULL)
+ if ((p = strrchr(argv[0], '/')) == NULL)
p = argv[0];
else
++p;
diff --git a/sbin/tunefs/tunefs.c b/sbin/tunefs/tunefs.c
index 11ffbe6..de3db12 100644
--- a/sbin/tunefs/tunefs.c
+++ b/sbin/tunefs/tunefs.c
@@ -90,7 +90,7 @@ main(int argc, char *argv[])
int Aflag, aflag, eflag, evalue, fflag, fvalue, jflag, Jflag, Lflag;
int lflag, mflag, mvalue, Nflag, nflag, oflag, ovalue, pflag, sflag;
int tflag;
- int svalue, Sflag, Svalue;
+ int svalue, Svalue;
int ch, found_arg, i;
const char *chg[2];
struct ufs_args args;
@@ -269,7 +269,6 @@ main(int argc, char *argv[])
if (Svalue < SUJ_MIN)
errx(10, "%s must be >= %d (was %s)",
name, SUJ_MIN, optarg);
- Sflag = 1;
break;
case 't':
diff --git a/share/doc/IPv6/IMPLEMENTATION b/share/doc/IPv6/IMPLEMENTATION
index 9b5d8ee..95cff2c 100644
--- a/share/doc/IPv6/IMPLEMENTATION
+++ b/share/doc/IPv6/IMPLEMENTATION
@@ -1404,7 +1404,7 @@ both definitions. As an userland programmer, the most portable way of
dealing with it is to:
(1) ensure ss_family and/or ss_len are available on the platform, by using
GNU autoconf,
-(2) have -Dss_family=__ss_family to unify all occurences (including header
+(2) have -Dss_family=__ss_family to unify all occurrences (including header
file) into __ss_family, or
(3) never touch __ss_family. cast to sockaddr * and use sa_family like:
struct sockaddr_storage ss;
@@ -1414,7 +1414,7 @@ dealing with it is to:
Some of IPv6 transition technologies embed IPv4 address into IPv6 address.
These specifications themselves are fine, however, there can be certain
-set of attacks enabled by these specifications. Recent speicifcation
+set of attacks enabled by these specifications. Recent specification
documents covers up those issues, however, there are already-published RFCs
that does not have protection against those (like using source address of
::ffff:127.0.0.1 to bypass "reject packet from remote" filter).
@@ -1441,7 +1441,7 @@ compatible is very rare. You should take caution if you see those on the wire.
If we see IPv6 packets with IPv4 mapped address (::ffff:0.0.0.0/96) in the
header in dual-stack environment (not in SIIT environment), they indicate
-that someone is trying to inpersonate IPv4 peer. The packet should be dropped.
+that someone is trying to impersonate IPv4 peer. The packet should be dropped.
IPv6 specifications do not talk very much about IPv6 unspecified address (::)
in the IPv6 source address field. Clarification is in progress.
@@ -1456,10 +1456,10 @@ Here are couple of comments:
- The following examples are seemingly illegal. It seems that there's general
consensus among ipngwg for those. (1) Mobile IPv6 home address option,
(2) offlink packets (so routers should not forward them).
- KAME implmements (2) already.
+ KAME implements (2) already.
KAME code is carefully written to avoid such incidents. More specifically,
-KAME kernel will reject packets with certain source/dstination address in IPv6
+KAME kernel will reject packets with certain source/destination address in IPv6
base header, or IPv6 routing header. Also, KAME default configuration file
is written carefully, to avoid those attacks.
@@ -1552,7 +1552,7 @@ KAME implementation treats them as follows:
1.17 DNS resolver
KAME ships with modified DNS resolver, in libinet6.a.
-libinet6.a has a comple of extensions against libc DNS resolver:
+libinet6.a has a couple of extensions against libc DNS resolver:
- Can take "options insecure1" and "options insecure2" in /etc/resolv.conf,
which toggles RES_INSECURE[12] option flag bit.
- EDNS0 receive buffer size notification support. It can be enabled by
@@ -1870,7 +1870,7 @@ Tunnel mode works basically fine, but comes with the following restrictions:
- Path MTU discovery does not work across IPv6 IPsec tunnel gateway due to
insufficient code.
-AH specificaton does not talk much about "multiple AH on a packet" case.
+AH specification does not talk much about "multiple AH on a packet" case.
We incrementally compute AH checksum, from inside to outside. Also, we
treat inner AH to be immutable.
For example, if we are to create the following packet:
@@ -1890,8 +1890,8 @@ to randomly pad packets shorter than N bytes, to random length smaller than
or equal to N. Note that N does not include ESP authentication data length.
Also note that the random padding is not included in TCP segment
size computation. Negative value will turn off the functionality.
-Recommeded value for N is like 128, or 256. If you use a too big number
-as N, you may experience inefficiency due to fragmented packtes.
+Recommended value for N is like 128, or 256. If you use a too big number
+as N, you may experience inefficiency due to fragmented packets.
4.4 IPComp handling
@@ -2097,7 +2097,7 @@ RFC2401 defines IPsec tunnel mode, within the context of IPsec. RFC2401
defines tunnel mode packet encapsulation/decapsulation on its own, and
does not refer other tunnelling specifications. Since RFC2401 advocates
filter-based SPD database matches, it would be natural for us to implement
-IPsec IPsec tunnel mode as filters - not as pseudo interfaces.
+IPsec tunnel mode as filters - not as pseudo interfaces.
There are some people who are trying to separate IPsec "tunnel mode" from
the IPsec itself. They would like to implement IPsec transport mode only,
@@ -2110,7 +2110,7 @@ interpretation.
The KAME stack implements can be configured in two ways. You may need
to recompile your kernel to switch the behavior.
-- RFC2401 IPsec tunnel mode appraoch (4.8.1)
+- RFC2401 IPsec tunnel mode approach (4.8.1)
- draft-touch-ipsec-vpn approach (4.8.2)
Works in all kernel configuration, but racoon(8) may not interoperate.
@@ -2226,7 +2226,7 @@ ALTQ occupies single character device number. For FreeBSD, it is officially
allocated. For OpenBSD and NetBSD, we use the number which is not
currently allocated (will eventually get an official number).
The character device is enabled for i386 architecture only. To enable and
-compile ALTQ-ready kernel for other archititectures, take the following steps:
+compile ALTQ-ready kernel for other architectures, take the following steps:
- assume that your architecture is FOOBAA.
- modify sys/arch/FOOBAA/FOOBAA/conf.c (or somewhere that defines cdevsw),
to include a line for ALTQ. look at sys/arch/i386/i386/conf.c for
@@ -2243,7 +2243,7 @@ compile ALTQ-ready kernel for other archititectures, take the following steps:
6.1 KAME node as correspondent node
Default installation recognizes home address option (in destination
-options header). No sub-options are supported. interaction with
+options header). No sub-options are supported. Interaction with
IPsec, and/or 2292bis API, needs further study.
6.2 KAME node as home agent/mobile node
@@ -2262,7 +2262,7 @@ are other implementations available:
The KAME developers basically do not make a bother about coding
style. However, there is still some agreement on the style, in order
-to make the distributed develoment smooth.
+to make the distributed development smooth.
- follow *BSD KNF where possible. note: there are multiple KNF standards.
- the tab character should be 8 columns wide (tabstops are at 8, 16, 24, ...
@@ -2291,13 +2291,13 @@ to make the distributed develoment smooth.
where "(dollar)" is the dollar character ($), and around "$" are tabs.
(this is for C. For other language, you should use its own comment
line.)
- Once commited to the CVS repository, this line will contain its
+ Once committed to the CVS repository, this line will contain its
version number (see, for example, at the top of this file). This
would make it easy to report a bug.
- when creating a new file with the WIDE copyright, tap "make copyright.c" at
the top-level, and use copyright.c as a template. KAME RCS tag will be
included automatically.
-- when editting a third-party package, keep its own coding style as
+- when editing a third-party package, keep its own coding style as
much as possible, even if the style does not follow the items above.
- it is recommended to always wrap an expression containing
bitwise operators by parentheses, especially when the expression is
@@ -2384,7 +2384,7 @@ is free of IPR infringement, you MUST check it if you are to integrate
KAME into your product (or whatever):
READ CAREFULLY: Several countries have legal enforcement for
export/import/use of cryptographic software. Check it before playing
- with the kit. We do not intend to be your legalease clearing house
+ with the kit. We do not intend to be your legalese clearing house
(NO WARRANTY). If you intend to include KAME stack into your product,
you'll need to check if the licenses on each file fit your situations,
and/or possible intellectual property right issues.
diff --git a/share/examples/diskless/README.TEMPLATING b/share/examples/diskless/README.TEMPLATING
index 28edcae..48984e0 100644
--- a/share/examples/diskless/README.TEMPLATING
+++ b/share/examples/diskless/README.TEMPLATING
@@ -94,8 +94,8 @@ be useful to set up clients and server for diskless boot.
/usr/ports ( note 5 )
/usr/src ( note 5 )
/usr/local/crack ( note 5 )
- /usr/X11R6/lib/X11/xdm/xdm-errors ( note 6 )
- /usr/X11R6/lib/X11/xdm/xdm-pid ( note 6 )
+ /usr/local/lib/X11/xdm/xdm-errors ( note 6 )
+ /usr/local/lib/X11/xdm/xdm-pid ( note 6 )
/usr/local/etc/ssh_host_key ( note 6 )
/usr/local/etc/ssh_host_key.pub ( note 6 )
/usr/local/etc/ssh_random_seed ( note 6 )
@@ -120,7 +120,7 @@ be useful to set up clients and server for diskless boot.
do not want to template such directories.
note 6: Note that you can solve the problem of xdm and sshd creating
- files in /usr. With xdm, edit /usr/X11R6/lib/xdm/xdm-config
+ files in /usr. With xdm, edit /usr/local/lib/xdm/xdm-config
and change the errorLogFile and pidFile config lines.
With sshd, add 'HostKey' and 'RandomSeed' directives to specify
diff --git a/share/examples/etc/make.conf b/share/examples/etc/make.conf
index d3cdf3e7..05872ff 100644
--- a/share/examples/etc/make.conf
+++ b/share/examples/etc/make.conf
@@ -91,13 +91,13 @@
#
#COPTFLAGS= -O -pipe
#
-# Compare before install
+# Compare before install.
#INSTALL=install -C
#
-# Mtree will follow symlinks
+# Mtree will follow symlinks.
#MTREE_FOLLOWS_SYMLINKS= -L
#
-# To enable installing ssh(1) with the setuid bit turned on
+# To enable installing ssh(1) with the setuid bit turned on.
#ENABLE_SUID_SSH=
#
# To enable installing newgrp(1) with the setuid bit turned on.
@@ -117,7 +117,7 @@
#
#TRACEROUTE_NO_IPSEC= # do not build traceroute(8) with IPSEC support
#
-# To build sys/modules when building the world (our old way of doing things)
+# To build sys/modules when building the world (our old way of doing things).
#MODULES_WITH_WORLD= # do not build modules when building kernel
#
# The list of modules to build instead of all of them.
@@ -133,7 +133,7 @@
#
#
# Default format for system documentation, depends on your printer.
-# Set this to "ascii" for simple printers or screen
+# Set this to "ascii" for simple printers or screen.
#
#PRINTERDEVICE= ps
#
@@ -199,7 +199,7 @@
#
# Documentation
#
-# The list of languages and encodings to build and install
+# The list of languages and encodings to build and install.
#
#DOC_LANG= en_US.ISO8859-1 ru_RU.KOI8-R
#
diff --git a/share/examples/ppp/ppp.linkdown.sample b/share/examples/ppp/ppp.linkdown.sample
index c7da79e..749dd94 100644
--- a/share/examples/ppp/ppp.linkdown.sample
+++ b/share/examples/ppp/ppp.linkdown.sample
@@ -23,7 +23,7 @@
# ``auplay'' (assuming NAS is installed and configured).
#
MYADDR:
- !bg /usr/X11R6/bin/auplay /etc/ppp/linkdown.au
+ !bg /usr/local/bin/auplay /etc/ppp/linkdown.au
# If you're running ``ppp -auto -nat dynamic-nat-auto'', and are
# assigned a dynamic IP number by the peer, this may be worth while
diff --git a/share/examples/printing/hpvf b/share/examples/printing/hpvf
index 233de80..c900f31 100644
--- a/share/examples/printing/hpvf
+++ b/share/examples/printing/hpvf
@@ -1,10 +1,10 @@
#!/bin/sh
#
+# $FreeBSD$
+#
# hpvf - Convert GIF files into HP/PCL, then print
# Installed in /usr/local/libexec/hpvf
-PATH=/usr/X11R6/bin:$PATH; export PATH
-
giftopnm | ppmtopgm | pgmtopbm | pbmtolj -resolution 300 \
&& exit 0 \
|| exit 2
diff --git a/share/examples/scsi_target/scsi_cmds.c b/share/examples/scsi_target/scsi_cmds.c
index 10295d7..7a95606 100644
--- a/share/examples/scsi_target/scsi_cmds.c
+++ b/share/examples/scsi_target/scsi_cmds.c
@@ -103,8 +103,8 @@ static struct targ_cdb_handlers cdb_handlers[] = {
static struct scsi_inquiry_data inq_data;
static struct initiator_state istates[MAX_INITIATORS];
extern int debug;
-extern uint64_t volume_size;
-extern size_t sector_size;
+extern off_t volume_size;
+extern u_int sector_size;
extern size_t buf_size;
cam_status
@@ -328,7 +328,7 @@ tcmd_inquiry(struct ccb_accept_tio *atio, struct ccb_scsiio *ctio)
bcopy(&inq_data, ctio->data_ptr, sizeof(inq_data));
ctio->dxfer_len = inq_data.additional_length + 4;
ctio->dxfer_len = min(ctio->dxfer_len,
- SCSI_CDB6_LEN(inq->length));
+ scsi_2btoul(inq->length));
ctio->ccb_h.flags |= CAM_DIR_IN | CAM_SEND_STATUS;
ctio->scsi_status = SCSI_STATUS_OK;
}
@@ -609,7 +609,7 @@ start_io(struct ccb_accept_tio *atio, struct ccb_scsiio *ctio, int dir)
if (dir == CAM_DIR_IN) {
if (notaio) {
if (debug)
- warnx("read sync %lud @ block " OFF_FMT,
+ warnx("read sync %lu @ block " OFF_FMT,
(unsigned long)
(ctio->dxfer_len / sector_size),
c_descr->offset / sector_size);
@@ -625,7 +625,7 @@ start_io(struct ccb_accept_tio *atio, struct ccb_scsiio *ctio, int dir)
}
} else {
if (debug)
- warnx("read async %lud @ block " OFF_FMT,
+ warnx("read async %lu @ block " OFF_FMT,
(unsigned long)
(ctio->dxfer_len / sector_size),
c_descr->offset / sector_size);
@@ -725,7 +725,7 @@ tcmd_rdwr_done(struct ccb_accept_tio *atio, struct ccb_scsiio *ctio,
a_descr->targ_req += ctio->dxfer_len;
if (notaio) {
if (debug)
- warnx("write sync %lud @ block "
+ warnx("write sync %lu @ block "
OFF_FMT, (unsigned long)
(ctio->dxfer_len / sector_size),
c_descr->offset / sector_size);
@@ -742,7 +742,7 @@ tcmd_rdwr_done(struct ccb_accept_tio *atio, struct ccb_scsiio *ctio,
tcmd_rdwr_done(atio, ctio, AIO_DONE);
} else {
if (debug)
- warnx("write async %lud @ block "
+ warnx("write async %lu @ block "
OFF_FMT, (unsigned long)
(ctio->dxfer_len / sector_size),
c_descr->offset / sector_size);
diff --git a/share/examples/scsi_target/scsi_target.c b/share/examples/scsi_target/scsi_target.c
index e6ff5c71..6f665af 100644
--- a/share/examples/scsi_target/scsi_target.c
+++ b/share/examples/scsi_target/scsi_target.c
@@ -100,8 +100,8 @@ static void usage(void);
int
main(int argc, char *argv[])
{
- int ch, unit;
- char *file_name, targname[16];
+ int ch;
+ char *file_name;
u_int16_t req_flags, sim_flags;
off_t user_size;
@@ -283,17 +283,11 @@ main(int argc, char *argv[])
warnx("aio support tested ok");
}
- /* Go through all the control devices and find one that isn't busy. */
- unit = 0;
- do {
- snprintf(targname, sizeof(targname), "/dev/targ%d", unit++);
- targ_fd = open(targname, O_RDWR);
- } while (targ_fd < 0 && errno == EBUSY);
-
+ targ_fd = open("/dev/targ", O_RDWR);
if (targ_fd < 0)
- errx(1, "Tried to open %d devices, none available", unit);
+ err(1, "/dev/targ");
else
- warnx("opened %s", targname);
+ warnx("opened /dev/targ");
/* The first three are handled by kevent() later */
signal(SIGHUP, SIG_IGN);
diff --git a/share/man/man3/ATOMIC_VAR_INIT.3 b/share/man/man3/ATOMIC_VAR_INIT.3
new file mode 100644
index 0000000..1f85d3b
--- /dev/null
+++ b/share/man/man3/ATOMIC_VAR_INIT.3
@@ -0,0 +1,301 @@
+.\" Copyright (c) 2011 Ed Schouten <ed@FreeBSD.org>
+.\" 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.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 27, 2011
+.Dt ATOMIC_VAR_INIT 3
+.Os
+.Sh NAME
+.Nm ATOMIC_VAR_INIT ,
+.Nm atomic_init ,
+.Nm atomic_load ,
+.Nm atomic_store ,
+.Nm atomic_exchange ,
+.Nm atomic_compare_exchange_strong ,
+.Nm atomic_compare_exchange_weak ,
+.Nm atomic_fetch_add ,
+.Nm atomic_fetch_and ,
+.Nm atomic_fetch_or ,
+.Nm atomic_fetch_sub ,
+.Nm atomic_fetch_xor ,
+.Nm atomic_is_lock_free
+.Nd type-generic atomic operations
+.Sh SYNOPSIS
+.In stdatomic.h
+.Pp
+_Atomic(T)
+.Fa v
+= ATOMIC_VAR_INIT(c);
+.Ft void
+.Fn atomic_init "_Atomic(T) *object" "T value"
+.Ft T
+.Fn atomic_load "_Atomic(T) *object"
+.Ft T
+.Fn atomic_load_explicit "_Atomic(T) *object" "memory_order order"
+.Ft void
+.Fn atomic_store "_Atomic(T) *object" "T desired"
+.Ft void
+.Fn atomic_store_explicit "_Atomic(T) *object" "T desired" "memory_order order"
+.Ft T
+.Fn atomic_exchange "_Atomic(T) *object" "T desired"
+.Ft T
+.Fn atomic_exchange_explicit "_Atomic(T) *object" "T desired" "memory_order order"
+.Ft _Bool
+.Fn atomic_compare_exchange_strong "_Atomic(T) *object" "T *expected" "T desired"
+.Ft _Bool
+.Fn atomic_compare_exchange_strong_explicit "_Atomic(T) *object" "T *expected" "T desired" "memory_order success" "memory_order failure"
+.Ft _Bool
+.Fn atomic_compare_exchange_weak "_Atomic(T) *object" "T *expected" "T desired"
+.Ft _Bool
+.Fn atomic_compare_exchange_weak_explicit "_Atomic(T) *object" "T *expected" "T desired" "memory_order success" "memory_order failure"
+.Ft T
+.Fn atomic_fetch_add "_Atomic(T) *object" "T operand"
+.Ft T
+.Fn atomic_fetch_add_explicit "_Atomic(T) *object" "T operand" "memory_order order"
+.Ft T
+.Fn atomic_fetch_and "_Atomic(T) *object" "T operand"
+.Ft T
+.Fn atomic_fetch_and_explicit "_Atomic(T) *object" "T operand" "memory_order order"
+.Ft T
+.Fn atomic_fetch_or "_Atomic(T) *object" "T operand"
+.Ft T
+.Fn atomic_fetch_or_explicit "_Atomic(T) *object" "T operand" "memory_order order"
+.Ft T
+.Fn atomic_fetch_sub "_Atomic(T) *object" "T operand"
+.Ft T
+.Fn atomic_fetch_sub_explicit "_Atomic(T) *object" "T operand" "memory_order order"
+.Ft T
+.Fn atomic_fetch_xor "_Atomic(T) *object" "T operand"
+.Ft T
+.Fn atomic_fetch_xor_explicit "_Atomic(T) *object" "T operand" "memory_order order"
+.Ft _Bool
+.Fn atomic_is_lock_free "const _Atomic(T) *object"
+.Sh DESCRIPTION
+The header
+.In stdatomic.h
+provides type-generic macros for atomic operations.
+Atomic operations can be used by multithreaded programs to provide
+shared variables between threads that in most cases may be modified
+without acquiring locks.
+.Pp
+Atomic variables are declared using the
+.Fn _Atomic
+type specifier.
+These variables are not type-compatible with their non-atomic
+counterparts.
+Depending on the compiler used, atomic variables may be opaque and can
+therefore only be influenced using the macros described.
+.Pp
+The
+.Fn atomic_init
+macro initializes the atomic variable
+.Fa object
+with a
+.Fa value .
+Atomic variables can be initialized while being declared using
+.Fn ATOMIC_VAR_INIT .
+.Pp
+The
+.Fn atomic_load
+macro returns the value of atomic variable
+.Fa object .
+The
+.Fn atomic_store
+macro sets the atomic variable
+.Fa object
+to its
+.Fa desired
+value.
+.Pp
+The
+.Fn atomic_exchange
+macro combines the behaviour of
+.Fn atomic_load
+and
+.Fn atomic_store .
+It sets the atomic variable
+.Fa object
+to its desired
+.Fa value
+and returs the original contents of the atomic variable.
+.Pp
+The
+.Fn atomic_compare_exchange_strong
+macro stores a
+.Fa desired
+value into atomic variable
+.Fa object ,
+only if the atomic variable is equal to its
+.Fa expected
+value.
+Upon success, the macro returns
+.Dv true .
+Upon failure, the
+.Fa desired
+value is overwritten with the value of the atomic variable and
+.Dv false
+is returned.
+The
+.Fn atomic_compare_exchange_weak
+macro is identical to
+.Fn atomic_compare_exchange_strong ,
+but is allowed to fail even if atomic variable
+.Fa object
+is equal to its
+.Fa expected
+value.
+.Pp
+The
+.Fn atomic_fetch_add
+macro adds the value
+.Fa operand
+to atomic variable
+.Fa object
+and returns the original contents of the atomic variable.
+.Pp
+The
+.Fn atomic_fetch_and
+macro applies the
+.Em and
+operator to atomic variable
+.Fa object
+and
+.Fa operand
+and stores the value into
+.Fa object ,
+while returning the original contents of the atomic variable.
+.Pp
+The
+.Fn atomic_fetch_or
+macro applies the
+.Em or
+operator to atomic variable
+.Fa object
+and
+.Fa operand
+and stores the value into
+.Fa object ,
+while returning the original contents of the atomic variable.
+.Pp
+The
+.Fn atomic_fetch_sub
+macro subtracts the value
+.Fa operand
+to atomic variable
+.Fa object
+and returns the original contents of the atomic variable.
+.Pp
+The
+.Fn atomic_fetch_xor
+macro applies the
+.Em xor
+operator to atomic variable
+.Fa object
+and
+.Fa operand
+and stores the value into
+.Fa object ,
+while returning the original contents of the atomic variable.
+.Pp
+The
+.Fn atomic_is_lock_free
+macro returns whether atomic variable
+.Fa object
+uses locks when using atomic operations.
+.Sh BARRIERS
+The atomic operations described previously are implemented in such a way
+that they disallow both the compiler and the executing processor to
+re-order any nearby memory operations across the atomic operation.
+In certain cases this behaviour may cause suboptimal performance.
+To mitigate this, every atomic operation has an
+.Fn _explicit
+version that allows the re-ordering to be configured.
+.Pp
+The
+.Fa order
+parameter of these
+.Fn _explicit
+macros can have one of the following values.
+.Bl -tag -width memory_order_relaxed
+.It Dv memory_order_relaxed
+No operation orders memory.
+.It Dv memory_order_consume
+Perform consume operation.
+.It Dv memory_order_acquire
+Acquire fence.
+.It Dv memory_order_release
+Release fence.
+.It Dv memory_order_acq_rel
+Acquire and release fence.
+.It Dv memory_order_seq_cst
+Sequentially consistent acquire and release fence.
+.El
+.Pp
+The previously described macros are identical to the
+.Fn _explicit
+macros, when
+.Fa order
+is
+.Dv memory_order_seq_cst .
+.Sh COMPILER SUPPORT
+These atomic operations are typically implemented by the compiler, as
+they must be implemented type-generically and must often use special
+hardware instructions.
+As this interface has not been adopted by most compilers yet, the
+.In stdatomic.h
+header implements these macros on top of existing compiler intrinsics to
+provide forward compatibility.
+.Pp
+This means that certain aspects of the interface, such as support for
+different barrier types may simply be ignored.
+When using GCC, all atomic operations are executed as if they are using
+.Dv memory_order_seq_cst .
+.Pp
+Instead of using the atomic operations provided by this interface,
+.St -isoC-2011
+allows the atomic variables to be modified directly using built-in
+language operators.
+This behaviour cannot be emulated for older compilers.
+To prevent unintended non-atomic access to these variables, this header
+file places the atomic variable in a structure when using an older
+compiler.
+.Pp
+When using GCC on architectures on which it lacks support for built-in
+atomic intrinsics, these macros may emit function calls to fallback
+routines.
+These fallback routines are only implemented for 32-bits and 64-bits
+datatypes, if supported by the CPU.
+.Sh SEE ALSO
+.Xr pthread 3 ,
+.Xr atomic 9
+.Sh STANDARDS
+These macros attempt to conform to
+.St -isoC-2011 .
+.Sh HISTORY
+These macros appeared in
+.Fx 10.0 .
+.Sh AUTHORS
+.An Ed Schouten Aq ed@FreeBSD.org ,
+.An David Chisnall Aq theraven@FreeBSD.org
diff --git a/share/man/man3/Makefile b/share/man/man3/Makefile
index 148f460..4706506 100644
--- a/share/man/man3/Makefile
+++ b/share/man/man3/Makefile
@@ -4,6 +4,7 @@
.include <bsd.own.mk>
MAN= assert.3 \
+ ATOMIC_VAR_INIT.3 \
bitstring.3 \
end.3 \
fpgetround.3 \
@@ -18,7 +19,29 @@ MAN= assert.3 \
timeradd.3 \
tree.3
-MLINKS= bitstring.3 bit_alloc.3 \
+MLINKS= ATOMIC_VAR_INIT.3 atomic_compare_exchange_strong.3 \
+ ATOMIC_VAR_INIT.3 atomic_compare_exchange_strong_explicit.3 \
+ ATOMIC_VAR_INIT.3 atomic_compare_exchange_weak.3 \
+ ATOMIC_VAR_INIT.3 atomic_compare_exchange_weak_explicit.3 \
+ ATOMIC_VAR_INIT.3 atomic_exchange.3 \
+ ATOMIC_VAR_INIT.3 atomic_exchange_explicit.3 \
+ ATOMIC_VAR_INIT.3 atomic_fetch_add.3 \
+ ATOMIC_VAR_INIT.3 atomic_fetch_add_explicit.3 \
+ ATOMIC_VAR_INIT.3 atomic_fetch_and.3 \
+ ATOMIC_VAR_INIT.3 atomic_fetch_and_explicit.3 \
+ ATOMIC_VAR_INIT.3 atomic_fetch_or.3 \
+ ATOMIC_VAR_INIT.3 atomic_fetch_or_explicit.3 \
+ ATOMIC_VAR_INIT.3 atomic_fetch_sub.3 \
+ ATOMIC_VAR_INIT.3 atomic_fetch_sub_explicit.3 \
+ ATOMIC_VAR_INIT.3 atomic_fetch_xor.3 \
+ ATOMIC_VAR_INIT.3 atomic_fetch_xor_explicit.3 \
+ ATOMIC_VAR_INIT.3 atomic_init.3 \
+ ATOMIC_VAR_INIT.3 atomic_is_lock_free.3 \
+ ATOMIC_VAR_INIT.3 atomic_load.3 \
+ ATOMIC_VAR_INIT.3 atomic_load_explicit.3 \
+ ATOMIC_VAR_INIT.3 atomic_store.3 \
+ ATOMIC_VAR_INIT.3 atomic_store_explicit.3
+MLINKS+= bitstring.3 bit_alloc.3 \
bitstring.3 bit_clear.3 \
bitstring.3 bit_decl.3 \
bitstring.3 bit_ffc.3 \
diff --git a/share/man/man3/tgmath.3 b/share/man/man3/tgmath.3
index f8faf26..70e4a81 100644
--- a/share/man/man3/tgmath.3
+++ b/share/man/man3/tgmath.3
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd August 14, 2004
+.Dd January 4, 2012
.Dt TGMATH 3
.Os
.Sh NAME
@@ -139,15 +139,24 @@ The header
.In tgmath.h
first appeared in
.Fx 5.3 .
-.Sh BUGS
-The header
+.Sh COMPILER SUPPORT
+Before
+.St -isoC-2011 ,
+the header
.In tgmath.h
-cannot be implemented with strictly conforming C code and needs
+could not be implemented with strictly conforming C code and needed
special compiler support.
-The current implementation only works for GCC.
-.Pp
+As of
+.St -isoC-2011 ,
+this header file can be implemented using the
+.Fn _Generic
+language keyword.
+In addition to compilers that support this keyword, this header file
+works with GCC.
+.Sh BUGS
Many of the functions mentioned here are not prototyped in
.In math.h
or
.In complex.h
as they are not yet implemented.
+This prevents the corresponding type-generic macro from working at all.
diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile
index 6f87417..3629146 100644
--- a/share/man/man4/Makefile
+++ b/share/man/man4/Makefile
@@ -38,6 +38,7 @@ MAN= aac.4 \
${_amdtemp.4} \
amr.4 \
an.4 \
+ ${_apic.4} \
arcmsr.4 \
${_asmc.4} \
asr.4 \
@@ -116,6 +117,7 @@ MAN= aac.4 \
epair.4 \
esp.4 \
et.4 \
+ eventtimers.4 \
exca.4 \
faith.4 \
fatm.4 \
@@ -148,6 +150,7 @@ MAN= aac.4 \
hifn.4 \
hme.4 \
hpet.4 \
+ ${_hpt27xx.4} \
${_hptiop.4} \
${_hptmv.4} \
${_hptrr.4} \
@@ -444,6 +447,7 @@ MAN= aac.4 \
termios.4 \
textdump.4 \
ti.4 \
+ timecounters.4 \
tl.4 \
tnt4882.4 \
${_tpm.4} \
@@ -500,12 +504,17 @@ MAN= aac.4 \
vga.4 \
vge.4 \
viapm.4 \
+ ${_viawd.4} \
vinum.4 \
+ ${_virtio.4} \
+ ${_virtio_balloon.4} \
+ ${_virtio_blk.4} \
vkbd.4 \
vlan.4 \
vpo.4 \
vr.4 \
vte.4 \
+ ${_vtnet.4} \
${_vxge.4} \
watchdog.4 \
wb.4 \
@@ -652,6 +661,7 @@ MLINKS+=vge.4 if_vge.4
MLINKS+=vlan.4 if_vlan.4
MLINKS+=vpo.4 imm.4
MLINKS+=vr.4 if_vr.4
+MLINKS+=${_vtnet.4} ${_if_vtnet.4}
MLINKS+=${_vxge.4} ${_if_vxge.4}
MLINKS+=watchdog.4 SW_WATCHDOG.4
MLINKS+=wb.4 if_wb.4
@@ -672,6 +682,7 @@ _acpi_sony.4= acpi_sony.4
_acpi_toshiba.4=acpi_toshiba.4
_acpi_wmi.4= acpi_wmi.4
_aesni.4= aesni.4
+_apic.4= apic.4
_atrtc.4= atrtc.4
_attimer.4= attimer.4
_aibs.4= aibs.4
@@ -683,6 +694,7 @@ _atp.4= atp.4
_coretemp.4= coretemp.4
_cpuctl.4= cpuctl.4
_dpms.4= dpms.4
+_hpt27xx.4= hpt27xx.4
_hptiop.4= hptiop.4
_hptmv.4= hptmv.4
_hptrr.4= hptrr.4
@@ -693,6 +705,7 @@ _if_nfe.4= if_nfe.4
_if_nve.4= if_nve.4
_if_nxge.4= if_nxge.4
_if_urtw.4= if_urtw.4
+_if_vtnet.4= if_vtnet.4
_if_vxge.4= if_vxge.4
_if_wpi.4= if_wpi.4
_ipmi.4= ipmi.4
@@ -705,6 +718,10 @@ _nfsmb.4= nfsmb.4
_nve.4= nve.4
_nvram.4= nvram.4
_nxge.4= nxge.4
+_virtio.4= virtio.4
+_virtio_balloon.4=virtio_balloon.4
+_virtio_blk.4= virtio_blk.4
+_vtnet.4= vtnet.4
_vxge.4= vxge.4
_padlock.4= padlock.4
_rr232x.4= rr232x.4
@@ -712,6 +729,7 @@ _speaker.4= speaker.4
_spkr.4= spkr.4
_tpm.4= tpm.4
_urtw.4= urtw.4
+_viawd.4= viawd.4
_wpi.4= wpi.4
_xen.4= xen.4
diff --git a/share/man/man4/apic.4 b/share/man/man4/apic.4
new file mode 100644
index 0000000..0856232
--- /dev/null
+++ b/share/man/man4/apic.4
@@ -0,0 +1,77 @@
+.\" Copyright (c) 2011 Alexander Motin <mav@FreeBSD.org>
+.\" 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.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 20, 2011
+.Dt APIC 4
+.Os
+.Sh NAME
+.Nm apic
+.Nd Advanced Programmable Interrupt Controller (APIC) driver
+.Sh SYNOPSIS
+This driver is a mandatory part of amd64 kernel.
+To compile this driver into i386 or pc98 kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device apic"
+.Ed
+.Pp
+The following tunable is settable from the
+.Xr loader 8 :
+.Bl -ohang
+.It Va hint.apic. Ns Ar X Ns Va .clock
+controls event timers functionality support. Setting to 0, disables it.
+Default value is 1.
+.It Va hint.apic. Ns Ar X Ns Va .disabled
+Set this to 1 to disable APIC support, falling back to the legacy PIC.
+.El
+.Sh DESCRIPTION
+There are two components in the Intel APIC system, the local APIC (LAPIC)
+and the I/O APIC.
+There is one local APIC in each CPU in the system.
+There is typically one I/O APIC for each peripheral bus in the system.
+.Pp
+Local APICs manage all external interrupts for a specific processor.
+In addition, they are able to accept and generate inter-processor interrupts
+(IPIs).
+.Pp
+I/O APICs contain a redirection table, which is used to route the interrupts
+they receive from peripheral buses to one or more local APICs.
+.Pp
+Each local APIC includes one 32-bit programmable timer.
+This driver uses them to supply kernel with one event timer named "LAPIC".
+Event timer provided by the driver supports both one-shot an periodic modes.
+Because of local APIC nature it is per-CPU.
+The timer frequency is not reported by the platform and so automatically
+measured by the driver on the first use.
+Depending on CPU model this timer may stop in C3 and deeper CPU sleep states.
+Driver automatically adjusts event timer priority and reports it to prevent
+entering dangerous sleep states when it is used.
+.Sh SEE ALSO
+.Xr atrtc 4 ,
+.Xr attimer 4 ,
+.Xr eventtimers 4 ,
+.Xr hpet 4
diff --git a/share/man/man4/atrtc.4 b/share/man/man4/atrtc.4
index 51d6f05..0b0dd8f 100644
--- a/share/man/man4/atrtc.4
+++ b/share/man/man4/atrtc.4
@@ -51,6 +51,7 @@ divisors.
.Pp
Event timer provided by the driver is irrelevant to CPU power states.
.Sh SEE ALSO
+.Xr apic 4 ,
.Xr attimer 4 ,
-.Xr hpet 4 ,
-.Xr eventtimers 7
+.Xr eventtimers 4 ,
+.Xr hpet 4
diff --git a/share/man/man4/attimer.4 b/share/man/man4/attimer.4
index 67d001e..751b9ea 100644
--- a/share/man/man4/attimer.4
+++ b/share/man/man4/attimer.4
@@ -70,6 +70,8 @@ functionality is disabled.
.Pp
Event timer provided by the driver is irrelevant to CPU power states.
.Sh SEE ALSO
+.Xr apic 4 ,
.Xr atrtc 4 ,
+.Xr eventtimers 4 ,
.Xr hpet 4 ,
-.Xr eventtimers 7
+.Xr timecounters 4
diff --git a/share/man/man4/bce.4 b/share/man/man4/bce.4
index 0bca57b..cbad861 100644
--- a/share/man/man4/bce.4
+++ b/share/man/man4/bce.4
@@ -251,7 +251,7 @@ status block.
.It "bce%d: Could not allocate status block DMA memory!"
The driver could not allocate DMA addressable memory for the controller's
status block.
-.It "bce_d: Could not map status block DMA memory!"
+.It "bce%d: Could not map status block DMA memory!"
The driver could not map the status block memory into the controller's DMA
address space.
.It "bce%d: Could not allocate statistics block DMA tag!"
diff --git a/share/man/man4/bge.4 b/share/man/man4/bge.4
index 13a4aa6..dc31ff6 100644
--- a/share/man/man4/bge.4
+++ b/share/man/man4/bge.4
@@ -31,7 +31,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd December 2, 2011
+.Dd January 19, 2012
.Dt BGE 4
.Os
.Sh NAME
@@ -188,7 +188,7 @@ SysKonnect SK-9D21 (10/100/1000baseTX)
SysKonnect SK-9D41 (1000baseSX)
.El
.Sh LOADER TUNABLES
-The following tunable can be set at the
+The following tunables can be set at the
.Xr loader 8
prompt before booting the kernel, or stored in
.Xr loader.conf 5 .
@@ -197,6 +197,9 @@ prompt before booting the kernel, or stored in
Allow the ASF feature for cooperating with IPMI.
Can cause system lockup problems on a small number of systems.
Enabled by default.
+.It Va dev.bge.%d.msi
+Non-zero value enables MSI support on the Ethernet hardware.
+The default value is 1.
.El
.Sh SYSCTL VARIABLES
The following variables are available as both
diff --git a/share/man/man4/carp.4 b/share/man/man4/carp.4
index 4064c6c..5a761ec 100644
--- a/share/man/man4/carp.4
+++ b/share/man/man4/carp.4
@@ -1,6 +1,7 @@
.\" $OpenBSD: carp.4,v 1.16 2004/12/07 23:41:35 jmc Exp $
.\"
.\" Copyright (c) 2003, Ryan McBride. All rights reserved.
+.\" Copyright (c) 2011, Gleb Smirnoff <glebius@FreeBSD.org>
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
@@ -25,7 +26,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd August 15, 2011
+.Dd December 20, 2011
.Dt CARP 4
.Os
.Sh NAME
@@ -34,33 +35,17 @@
.Sh SYNOPSIS
.Cd "device carp"
.Sh DESCRIPTION
-The
-.Nm
-interface is a pseudo-device that implements and controls the
-CARP protocol.
-CARP allows multiple hosts on the same local network to share a set of IP addresses.
+The CARP allows multiple hosts on the same local network to share a set of
+IPv4 and/or IPv6 addresses.
Its primary purpose is to ensure that these
-addresses are always available, but in some configurations
-.Nm
-can also provide load balancing functionality.
-.Pp
-A
-.Nm
-interface can be created at runtime using the
-.Nm ifconfig Li carp Ns Ar N Cm create
-command or by configuring
-it via
-.Va cloned_interfaces
-in the
-.Pa /etc/rc.conf
-file.
+addresses are always available.
.Pp
To use
.Nm ,
-the administrator needs to configure at minimum a common virtual host ID (VHID)
-and virtual host IP address on each machine which is to take part in the virtual
-group.
-Additional parameters can also be set on a per-interface basis:
+the administrator needs to configure at minimum a common virtual host ID
+(vhid) and attach at least one IP address to this vhid on each machine which
+is to take part in the virtual group.
+Additional parameters can also be set on a per-vhid basis:
.Cm advbase
and
.Cm advskew ,
@@ -93,9 +78,20 @@ or through the
.Dv SIOCSVH
.Xr ioctl 2 .
.Pp
+CARP virtual hosts can be configured on multicast capable interfaces: Ethernet,
+layer 2 VLAN, FDDI and Token Ring.
+An arbitrary number of virtual host IDs can be configured on an interface.
+An arbitrary number of IPv4 or IPv6 addresses can be attached to a particular
+vhid.
+It is important that all hosts participating in a vhid have the same list
+of prefixes configured on the vhid, since all prefixes are included in the
+cryptographic checksum supplied in each advertisement.
+Multiple vhids running on one interface participate in master/backup
+elections independently.
+.Pp
Additionally, there are a number of global parameters which can be set using
.Xr sysctl 8 :
-.Bl -tag -width ".Va net.inet.carp.arpbalance"
+.Bl -tag -width ".Va net.inet.carp.preempt"
.It Va net.inet.carp.allow
Accept incoming
.Nm
@@ -125,49 +121,69 @@ Values above 1 enable logging of bad
.Nm
packets.
Default value is 1.
-.It Va net.inet.carp.arpbalance
-Balance local traffic using ARP (see below).
-Disabled by default.
-.It Va net.inet.carp.suppress_preempt
-A read only value showing the status of preemption suppression.
-Preemption can be suppressed if link on an interface is down
-or when
+.It Va net.inet.carp.demotion
+This value shows current level of CARP demotion.
+The value is added to the actual advskew sent in announcements for
+all vhids.
+At normal system operation the demotion factor is zero.
+However, problematic conditions raise its level: when
+.Nm
+experiences problem with sending announcements, when an interface
+running a vhid goes down, or while the
.Xr pfsync 4
interface is not synchronized.
-Value of 0 means that preemption is not suppressed, since no
-problems are detected.
-Every problem increments suppression counter.
-.El
-.Sh ARP level load balancing
-The
+The demotion value is writable, so that user may alter it
+depending on some external conditions, for example on status of some
+daemon utility.
+However, altering the value should be performed with care, do
+not conflict with subsystems that adjust demotion factor
+automatically:
.Nm
-has limited abilities for load balancing the incoming connections
-between hosts in Ethernet network.
-For load balancing operation, one needs several CARP interfaces that
-are configured to the same IP address, but to a different VHIDs.
-Once an ARP request is received, the CARP protocol will use a hashing
-function against the source IP address in the ARP request to determine
-which VHID should this request belong to.
-If the corresponding CARP interface is in master state, the ARP request
-will be replied, otherwise it will be ignored.
-See the
-.Sx EXAMPLES
-section for a practical example of load balancing.
-.Pp
-The ARP load balancing has some limitations.
-First, ARP balancing only works on the local network segment.
-It cannot balance traffic that crosses a router, because the
-router itself will always be balanced to the same virtual host.
-Second, ARP load balancing can lead to asymmetric routing
-of incoming and outgoing traffic, and thus combining it with
-.Xr pfsync 4
-is dangerous, because this creates a race condition between
-balanced routers and a host they are serving.
-Imagine an incoming packet creating state on the first router, being
-forwarded to its destination, and destination replying faster
-than the state information is packed and synced with the second router.
-If the reply would be load balanced to second router, it will be
-dropped due to no state.
+and
+.Xr pfsync 4 .
+.It Va net.inet.carp.ifdown_demotion_factor
+Value added to
+.Va net.inet.carp.demotion
+when interface running a vhid goes down.
+Default value is 240 (maximum advskew value).
+.It Va net.inet.carp.senderr_demotion_factor
+Value added to
+.Va net.inet.carp.demotion
+when
+.Nm
+experiences errors sending its announcements.
+Default value is 240 (maximum advskew value).
+.El
+.\".Sh ARP level load balancing
+.\"The
+.\".Nm
+.\"has limited abilities for load balancing the incoming connections
+.\"between hosts in Ethernet network.
+.\"For load balancing operation, one needs several CARP interfaces that
+.\"are configured to the same IP address, but to a different vhids.
+.\"Once an ARP request is received, the CARP protocol will use a hashing
+.\"function against the source IP address in the ARP request to determine
+.\"which vhid should this request belong to.
+.\"If the corresponding CARP interface is in master state, the ARP request
+.\"will be replied, otherwise it will be ignored.
+.\"See the
+.\".Sx EXAMPLES
+.\"section for a practical example of load balancing.
+.\".Pp
+.\"The ARP load balancing has some limitations.
+.\"First, ARP balancing only works on the local network segment.
+.\"It cannot balance traffic that crosses a router, because the
+.\"router itself will always be balanced to the same virtual host.
+.\"Second, ARP load balancing can lead to asymmetric routing
+.\"of incoming and outgoing traffic, and thus combining it with
+.\".Xr pfsync 4
+.\"is dangerous, because this creates a race condition between
+.\"balanced routers and a host they are serving.
+.\"Imagine an incoming packet creating state on the first router, being
+.\"forwarded to its destination, and destination replying faster
+.\"than the state information is packed and synced with the second router.
+.\"If the reply would be load balanced to second router, it will be
+.\"dropped due to no state.
.Sh STATE CHANGE NOTIFICATIONS
Sometimes it is useful to get notified about
.Nm
@@ -175,13 +191,10 @@ status change events.
This can be accomplished by using
.Xr devd 8
hooks.
-Master/slave events are signalled as
-.Nm
-interface
-.Dv LINK_UP
-or
-.Dv LINK_DOWN
-event.
+Master/slave events are signalled under system
+.Dv CARP .
+Subsystem specifies vhid and name of interface, where event occurred.
+Type of the message displays new state of vhid.
Please see
.Xr devd.conf 5
and
@@ -197,23 +210,19 @@ Enable it on both host A and B:
.Pp
.Dl sysctl net.inet.carp.preempt=1
.Pp
-Assume that host A is the preferred master and 192.168.1.x/24 is
-configured on one physical interface and 192.168.2.y/24 on another.
+Assume that host A is the preferred master and we are running the
+192.168.1.0/24 prefix on em0 and 192.168.2.0/24 on em1.
This is the setup for host A:
.Bd -literal -offset indent
-ifconfig carp0 create
-ifconfig carp0 vhid 1 pass mekmitasdigoat 192.168.1.1/24
-ifconfig carp1 create
-ifconfig carp1 vhid 2 pass mekmitasdigoat 192.168.2.1/24
+ifconfig em0 vhid 1 pass mekmitasdigoat 192.168.1.1/24
+ifconfig em1 vhid 2 pass mekmitasdigoat 192.168.2.1/24
.Ed
.Pp
The setup for host B is identical, but it has a higher
.Cm advskew :
.Bd -literal -offset indent
-ifconfig carp0 create
-ifconfig carp0 vhid 1 advskew 100 pass mekmitasdigoat 192.168.1.1/24
-ifconfig carp1 create
-ifconfig carp1 vhid 2 advskew 100 pass mekmitasdigoat 192.168.2.1/24
+ifconfig em0 vhid 1 advskew 100 pass mekmitasdigoat 192.168.1.1/24
+ifconfig em1 vhid 2 advskew 100 pass mekmitasdigoat 192.168.2.1/24
.Ed
.Pp
Because of the preempt option, when one of the physical interfaces of
@@ -224,67 +233,60 @@ is adjusted to 240 on all its
interfaces.
This will cause host B to preempt on both interfaces instead of
just the failed one.
-.Pp
-In order to set up an ARP balanced virtual host, it is necessary to configure
-one virtual host for each physical host which would respond to ARP requests
-and thus handle the traffic.
-In the following example, two virtual hosts are configured on two hosts to
-provide balancing and failover for the IP address 192.168.1.10.
-.Pp
-First the
-.Nm
-interfaces on host A are configured.
-The
-.Cm advskew
-of 100 on the second virtual host means that its advertisements will be sent
-out slightly less frequently.
-.Bd -literal -offset indent
-ifconfig carp0 create
-ifconfig carp0 vhid 1 pass mekmitasdigoat 192.168.1.10/24
-ifconfig carp1 create
-ifconfig carp1 vhid 2 advskew 100 pass mekmitasdigoat 192.168.1.10/24
-.Ed
-.Pp
-The configuration for host B is identical, except the
-.Cm advskew
-is on virtual host 1 rather than virtual host 2.
-.Bd -literal -offset indent
-ifconfig carp0 create
-ifconfig carp0 vhid 1 advskew 100 pass mekmitasdigoat 192.168.1.10/24
-ifconfig carp1 create
-ifconfig carp1 vhid 2 pass mekmitasdigoat 192.168.1.10/24
-.Ed
-.Pp
-Finally, the ARP balancing feature must be enabled on both hosts:
-.Pp
-.Dl sysctl net.inet.carp.arpbalance=1
-.Pp
-When the hosts receive an ARP request for 192.168.1.10, the source IP address
-of the request is used to compute which virtual host should answer the request.
-The host which is master of the selected virtual host will reply to the
-request, the other(s) will ignore it.
-.Pp
-This way, locally connected systems will receive different ARP replies and
-subsequent IP traffic will be balanced among the hosts.
-If one of the hosts fails, the other will take over the virtual MAC address,
-and begin answering ARP requests on its behalf.
+.\".Pp
+.\"In order to set up an ARP balanced virtual host, it is necessary to configure
+.\"one virtual host for each physical host which would respond to ARP requests
+.\"and thus handle the traffic.
+.\"In the following example, two virtual hosts are configured on two hosts to
+.\"provide balancing and failover for the IP address 192.168.1.10.
+.\".Pp
+.\"First the
+.\".Nm
+.\"interfaces on host A are configured.
+.\"The
+.\".Cm advskew
+.\"of 100 on the second virtual host means that its advertisements will be sent
+.\"out slightly less frequently.
+.\".Bd -literal -offset indent
+.\"ifconfig carp0 create
+.\"ifconfig carp0 vhid 1 pass mekmitasdigoat 192.168.1.10/24
+.\"ifconfig carp1 create
+.\"ifconfig carp1 vhid 2 advskew 100 pass mekmitasdigoat 192.168.1.10/24
+.\".Ed
+.\".Pp
+.\"The configuration for host B is identical, except the
+.\".Cm advskew
+.\"is on virtual host 1 rather than virtual host 2.
+.\".Bd -literal -offset indent
+.\"ifconfig carp0 create
+.\"ifconfig carp0 vhid 1 advskew 100 pass mekmitasdigoat 192.168.1.10/24
+.\"ifconfig carp1 create
+.\"ifconfig carp1 vhid 2 pass mekmitasdigoat 192.168.1.10/24
+.\".Ed
+.\".Pp
+.\"Finally, the ARP balancing feature must be enabled on both hosts:
+.\".Pp
+.\".Dl sysctl net.inet.carp.arpbalance=1
+.\".Pp
+.\"When the hosts receive an ARP request for 192.168.1.10, the source IP address
+.\"of the request is used to compute which virtual host should answer the request.
+.\"The host which is master of the selected virtual host will reply to the
+.\"request, the other(s) will ignore it.
+.\".Pp
+.\"This way, locally connected systems will receive different ARP replies and
+.\"subsequent IP traffic will be balanced among the hosts.
+.\"If one of the hosts fails, the other will take over the virtual MAC address,
+.\"and begin answering ARP requests on its behalf.
.Pp
Processing of
.Nm
-status change events can be set up by using the following devd.conf rules:
+status change events can be set up by using the following devd.conf rule:
.Bd -literal -offset indent
notify 0 {
- match "system" "IFNET";
- match "type" "LINK_UP";
- match "subsystem" "carp*";
- action "/root/carpcontrol.sh $type $subsystem";
-};
-
-notify 0 {
- match "system" "IFNET";
- match "type" "LINK_DOWN";
- match "subsystem" "carp*";
- action "/root/carpcontrol.sh $type $subsystem";
+ match "system" "CARP";
+ match "subsystem" "[0-9]+@";
+ match "type" "(MASTER|BACKUP)";
+ action "/root/carpcontrol.sh $subsystem $type";
};
.Ed
.Sh SEE ALSO
@@ -303,3 +305,8 @@ The
.Nm
device was imported into
.Fx 5.4 .
+In
+.Fx 10
+the
+.Nm
+was significantly rewritten, and is no longer a pseudo-interface.
diff --git a/share/man/man4/ciss.4 b/share/man/man4/ciss.4
index f975707..bf9ce87 100644
--- a/share/man/man4/ciss.4
+++ b/share/man/man4/ciss.4
@@ -2,7 +2,7 @@
.\" Written by Tom Rhodes
.\" This file is in the public domain.
.\"
-.Dd November 3, 2005
+.Dd January 18, 2012
.Dt CISS 4
.Os
.Sh NAME
@@ -131,6 +131,8 @@ HP Smart Array P410i
.It
HP Smart Array P411
.It
+HP Smart Array P420
+.It
HP Smart Array P600
.It
HP Smart Array P800
diff --git a/share/man/man4/cpufreq.4 b/share/man/man4/cpufreq.4
index bd6885e..d4a2a3f 100644
--- a/share/man/man4/cpufreq.4
+++ b/share/man/man4/cpufreq.4
@@ -286,6 +286,7 @@ then it should set all elements to
.Dv CPUFREQ_VAL_UNKNOWN .
.Sh SEE ALSO
.Xr acpi 4 ,
+.Xr timecounters 4 ,
.Xr powerd 8 ,
.Xr sysctl 8
.Sh AUTHORS
diff --git a/share/man/man4/cxgbe.4 b/share/man/man4/cxgbe.4
index ab2979a..4bf5ac3 100644
--- a/share/man/man4/cxgbe.4
+++ b/share/man/man4/cxgbe.4
@@ -99,18 +99,29 @@ Tunables can be set at the
prompt before booting the kernel or stored in
.Xr loader.conf 5 .
.Bl -tag -width indent
-.It Va hw.cxgbe.max_ntxq_10G_port
-The maximum number of tx queues to use for a 10Gb port.
-The default value is 8.
-.It Va hw.cxgbe.max_nrxq_10G_port
-The maximum number of rx queues to use for a 10Gb port.
-The default value is 8.
-.It Va hw.cxgbe.max_ntxq_1G_port
-The maximum number of tx queues to use for a 1Gb port.
-The default value is 2.
-.It Va hw.cxgbe.max_nrxq_1G_port
-The maximum number of rx queues to use for a 1Gb port.
-The default value is 2.
+.It Va hw.cxgbe.ntxq10g
+The number of tx queues to use for a 10Gb port. The default is 16 or the number
+of CPU cores in the system, whichever is less.
+.It Va hw.cxgbe.nrxq10g
+The number of rx queues to use for a 10Gb port. The default is 8 or the number
+of CPU cores in the system, whichever is less.
+.It Va hw.cxgbe.ntxq1g
+The number of tx queues to use for a 1Gb port. The default is 4 or the number
+of CPU cores in the system, whichever is less.
+.It Va hw.cxgbe.nrxq1g
+The number of rx queues to use for a 1Gb port. The default is 2 or the number
+of CPU cores in the system, whichever is less.
+.It Va hw.cxgbe.nofldtxq10g
+The number of TOE tx queues to use for a 10Gb port. The default is 8 or the
+number of CPU cores in the system, whichever is less.
+.It Va hw.cxgbe.nofldrxq10g
+The number of TOE rx queues to use for a 10Gb port. The default is 2 or the
+number of CPU cores in the system, whichever is less.
+.It Va hw.cxgbe.nofldtxq1g
+The number of TOE tx queues to use for a 1Gb port. The default is 2 or the
+number of CPU cores in the system, whichever is less.
+.It Va hw.cxgbe.nofldrxq1g
+The number of TOE rx queues to use for a 1Gb port. The default is 1.
.It Va hw.cxgbe.holdoff_timer_idx_10G
.It Va hw.cxgbe.holdoff_timer_idx_1G
The timer index value to use to delay interrupts.
@@ -119,6 +130,8 @@ by default (all values are in microseconds) and the index selects a
value from this list.
The default value is 1 for both 10Gb and 1Gb ports, which means the
timer value is 5us.
+Different cxgbe interfaces can be assigned different values at any time via the
+dev.cxgbe.X.holdoff_tmr_idx sysctl.
.It Va hw.cxgbe.holdoff_pktc_idx_10G
.It Va hw.cxgbe.holdoff_pktc_idx_1G
The packet-count index value to use to delay interrupts.
@@ -127,6 +140,11 @@ and the index selects a value from this list.
The default value is 2 for both 10Gb and 1Gb ports, which means 16
packets (or the holdoff timer going off) before an interrupt is
generated.
+-1 disables packet counting.
+Different cxgbe interfaces can be assigned different values via the
+dev.cxgbe.X.holdoff_pktc_idx sysctl.
+This sysctl works only when the interface has never been marked up (as done by
+ifconfig up).
.It Va hw.cxgbe.qsize_txq
The size, in number of entries, of the descriptor ring used for a tx
queue.
@@ -134,10 +152,46 @@ A buf_ring of the same size is also allocated for additional
software queuing. See
.Xr ifnet 9 .
The default value is 1024.
+Different cxgbe interfaces can be assigned different values via the
+dev.cxgbe.X.qsize_txq sysctl.
+This sysctl works only when the interface has never been marked up (as done by
+ifconfig up).
.It Va hw.cxgbe.qsize_rxq
The size, in number of entries, of the descriptor ring used for an
rx queue.
The default value is 1024.
+Different cxgbe interfaces can be assigned different values via the
+dev.cxgbe.X.qsize_rxq sysctl.
+This sysctl works only when the interface has never been marked up (as done by
+ifconfig up).
+.It Va hw.cxgbe.interrupt_types
+The interrupt types that the driver is allowed to use.
+Bit 0 represents INTx (line interrupts), bit 1 MSI, bit 2 MSI-X.
+The default is 7 (all allowed).
+The driver will select the best possible type out of the allowed types by
+itself.
+.It Va hw.cxgbe.config_file
+Select a pre-packaged device configuration file.
+A configuration file contains a recipe for partitioning and configuring the
+hardware resources on the card.
+This tunable is for specialized applications only and should not be used in
+normal operation.
+The configuration profile currently in use is available in the dev.t4nex.X.cf
+and dev.t4nex.X.cfcsum sysctls.
+.It Va hw.cxgbe.linkcaps_allowed
+.It Va hw.cxgbe.niccaps_allowed
+.It Va hw.cxgbe.toecaps_allowed
+.It Va hw.cxgbe.rdmacaps_allowed
+.It Va hw.cxgbe.iscsicaps_allowed
+.It Va hw.cxgbe.fcoecaps_allowed
+Disallowing capabilities provides a hint to the driver and firmware to not
+reserve hardware resources for that feature.
+Each of these is a bit field with a bit for each sub-capability within the
+capability.
+This tunable is for specialized applications only and should not be used in
+normal operation.
+The capabilities for which hardware resources have been reserved are listed in
+dev.t4nex.X.*caps sysctls.
.El
.Sh SUPPORT
For general information and support,
diff --git a/share/man/man4/ddb.4 b/share/man/man4/ddb.4
index b9a8c82..c174b51 100644
--- a/share/man/man4/ddb.4
+++ b/share/man/man4/ddb.4
@@ -60,7 +60,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd September 5, 2010
+.Dd December 16, 2011
.Dt DDB 4
.Os
.Sh NAME
@@ -523,6 +523,16 @@ The optional
argument limits the search.
.\"
.Pp
+.It Xo
+.Ic findstack
+.Ar addr
+.Xc
+Prints the thread address for a thread kernel-mode stack of which contains the
+specified address.
+If the thread is not found, search the thread stack cache and prints the
+cached stack address.
+Otherwise, prints nothing.
+.Pp
.It Ic show Cm all procs Ns Op Li / Ns Cm m
.It Ic ps Ns Op Li / Ns Cm m
Display all process information.
diff --git a/share/man/man4/ed.4 b/share/man/man4/ed.4
index 6217669..d002b96 100644
--- a/share/man/man4/ed.4
+++ b/share/man/man4/ed.4
@@ -139,7 +139,7 @@ Allied Telesis SIC-98, SIC-98NOTE (110pin), SIU-98 (flags 0x600000) (PC-98)
.It
Allied Telesis SIU-98-D (flags 0x610000) (PC-98)
.It
-AmbiCom 10BaseT card
+AmbiCom 10BaseT card (8002, 8002T, 8010 and 8610)
.It
Bay Networks NETGEAR FA410TXC Fast Ethernet
.It
@@ -147,11 +147,15 @@ Belkin F5D5020 PC Card Fast Ethernet
.It
Billionton LM5LT-10B Ethernet/Modem PC Card
.It
+Billionton LNT-10TB, LNT-10TN Ethernet PC Card
+.It
Bromax iPort 10/100 Ethernet PC Card
.It
Bromax iPort 10 Ethernet PC Card
.It
-Buffalo LPC2-CLT, LPC3-CLT, LPC3-CLX, LPC4-TX PC Card
+Buffalo LPC2-CLT, LPC3-CLT, LPC3-CLX, LPC4-TX, LPC-CTX PC Card
+.It
+Buffalo LPC-CF-CLT CF Card
.It
CNet BC40 adapter
.It
diff --git a/share/man/man4/eventtimers.4 b/share/man/man4/eventtimers.4
new file mode 100644
index 0000000..c935c3e
--- /dev/null
+++ b/share/man/man4/eventtimers.4
@@ -0,0 +1,153 @@
+.\" Copyright (c) 2010 Alexander Motin <mav@FreeBSD.org>
+.\" 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.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd September 15, 2010
+.Dt EVENTTIMERS 4
+.Os
+.Sh NAME
+.Nm eventtimers
+.Nd kernel event timers subsystem
+.Sh SYNOPSIS
+Kernel uses several types of time-related devices, such as: real time clocks,
+time counters and event timers.
+Real time clocks responsible for tracking real world time, mostly when system
+is down.
+Time counters are responsible for generation of monotonically increasing
+timestamps for precise uptime tracking purposes, when system is running.
+Event timers are responsible for generating interrupts at specified time or
+periodically, to run different time-based events.
+This page is about the last.
+.Sh DESCRIPTION
+Kernel uses time-based events for many different purposes: scheduling,
+statistics, time keeping, profiling and many other things, based on
+.Xr callout 9
+mechanism.
+These purposes now grouped into three main callbacks:
+.Bl -tag -width ".Fn hardclock"
+.It Fn hardclock
+.Xr callout 9
+and timekeeping events entry.
+Called with frequency defined by
+.Va hz
+variable,
+usually 1000Hz.
+.It Fn statclock
+statistics and scheduler events entry.
+Called with frequency about 128Hz.
+.It Fn profclock
+profiler events entry.
+When enabled, called with frequency about 8KHz.
+.El
+.Pp
+Different platforms provide different kinds of timer hardware.
+The goal of the event timers subsystem is to provide unified way to control
+that hardware, and to use it, supplying kernel with all required time-based
+events.
+.Pp
+Each driver implementing event timers, registers them at the subsystem.
+It is possible to see the list of present event timers, like this, via
+.Va kern.eventtimer
+sysctl:
+.Bd -literal
+kern.eventtimer.choice: HPET(550) LAPIC(400) i8254(100) RTC(0)
+kern.eventtimer.et.LAPIC.flags: 15
+kern.eventtimer.et.LAPIC.frequency: 0
+kern.eventtimer.et.LAPIC.quality: 400
+kern.eventtimer.et.i8254.flags: 1
+kern.eventtimer.et.i8254.frequency: 1193182
+kern.eventtimer.et.i8254.quality: 100
+kern.eventtimer.et.RTC.flags: 17
+kern.eventtimer.et.RTC.frequency: 32768
+kern.eventtimer.et.RTC.quality: 0
+kern.eventtimer.et.HPET.flags: 7
+kern.eventtimer.et.HPET.frequency: 14318180
+kern.eventtimer.et.HPET.quality: 550
+.Ed
+.Pp
+where:
+.Bl -inset
+.It Va kern.eventtimer.et. Ns Ar X Ns Va .flags
+is a
+bitmask, defining event timer capabilities:
+.Bl -tag -offset indent -width indent -compact
+.It 1
+periodic mode supported,
+.It 2
+one-shot mode supported,
+.It 4
+timer is per-CPU,
+.It 8
+timer may stop when CPU goes to sleep state,
+.It 16
+timer supports only power-of-2 divisors.
+.El
+.It Va kern.eventtimer.et. Ns Ar X Ns Va .frequency
+is a
+timer base frequency,
+.It Va kern.eventtimer.et. Ns Ar X Ns Va .quality
+is an
+integral value, defining how good is this timer, comparing to others.
+.El
+.Pp
+Timers management code of the kernel chooses one timer from that list.
+Current choice can be read and affected via
+.Va kern.eventtimer.timer
+tunable/sysctl.
+Several other tunables/sysctls are affecting how exactly this timer is used:
+.Bl -inset
+.It Va kern.eventtimer.periodic
+allows to choose periodic and one-shot operation mode.
+In periodic mode, periodic interrupts from timer hardware are taken as the
+only source of time for time events.
+One-shot mode instead uses currently selected time counter to precisely
+schedule all needed events and programs event timer to generate interrupt
+exactly in specified time.
+Default value depends of chosen timer capabilities, but one-shot mode is
+preferred, until other is forced by user or hardware.
+.It Va kern.eventtimer.singlemul
+in periodic mode specifies how much times higher timer frequency should be,
+to not strictly alias
+.Fn hardclock
+and
+.Fn statclock
+events.
+Default values are
+1, 2 or 4, depending on configured HZ value.
+.It Va kern.eventtimer.idletick
+makes each CPU to receive every timer interrupt independently of whether they
+busy or not.
+By default this options is disabled.
+If chosen timer is per-CPU
+and runs in periodic mode, this option has no effect - all interrupts are
+always generating.
+.El
+.Sh SEE ALSO
+.Xr apic 4 ,
+.Xr atrtc 4 ,
+.Xr attimer 4 ,
+.Xr hpet 4 ,
+.Xr timecounters 4 ,
+.Xr eventtimers 9
diff --git a/share/man/man4/ffclock.4 b/share/man/man4/ffclock.4
index d47edb2..9110c16 100644
--- a/share/man/man4/ffclock.4
+++ b/share/man/man4/ffclock.4
@@ -110,6 +110,7 @@ but currently does nothing.
.Xr clock_gettime 2 ,
.Xr ffclock 2 ,
.Xr bpf 4 ,
+.Xr timecounters 4 ,
.Xr sysctl 8
.Sh HISTORY
Feed-forward clock support first appeared in
diff --git a/share/man/man4/h_ertt.4 b/share/man/man4/h_ertt.4
index 70ed36d..3dbedab 100644
--- a/share/man/man4/h_ertt.4
+++ b/share/man/man4/h_ertt.4
@@ -29,8 +29,8 @@
.\"
.\" $FreeBSD$
.\"
-.Dd February 15, 2011
-.Dt H_ERTT 9
+.Dd January 18, 2012
+.Dt H_ERTT 4
.Os
.Sh NAME
.Nm h_ertt
diff --git a/share/man/man4/hpet.4 b/share/man/man4/hpet.4
index f501e0b..cd1b766 100644
--- a/share/man/man4/hpet.4
+++ b/share/man/man4/hpet.4
@@ -94,9 +94,11 @@ group is bound to specific CPU core. This is possible only when each
of these comparators has own unsharable IRQ.
.Sh SEE ALSO
.Xr acpi 4 ,
+.Xr apic 4 ,
.Xr atrtc 4 ,
.Xr attimer 4 ,
-.Xr eventtimers 7
+.Xr eventtimers 4 ,
+.Xr timecounters 4
.Sh HISTORY
The
.Nm
diff --git a/share/man/man4/hpt27xx.4 b/share/man/man4/hpt27xx.4
new file mode 100644
index 0000000..01f9ba5
--- /dev/null
+++ b/share/man/man4/hpt27xx.4
@@ -0,0 +1,101 @@
+.\"
+.\" Copyright (c) 2011 iXsystems, Inc.
+.\" 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.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``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 DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 28, 2011
+.Dt HPT27XX 4
+.Os
+.Sh NAME
+.Nm hpt27xx
+.Nd "HighPoint RocketRAID 27xx SAS 6Gb/s HBA card driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device hpt27xx"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+hpt27xx_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for HighPoint's RocketRAID 27xx based RAID controller.
+.Pp
+These devices support SAS disk drives
+and provide RAID0 (striping), RAID1 (mirroring), and RAID5 functionality.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following SAS
+controllers:
+.Pp
+.Bl -bullet -compact
+.It
+HighPoint's RocketRAID 271x series
+.It
+HighPoint's RocketRAID 272x series
+.It
+HighPoint's RocketRAID 274x series
+.It
+HighPoint's RocketRAID 276x series
+.It
+HighPoint's RocketRAID 278x series
+.El
+.Sh NOTES
+The
+.Nm
+driver only works on the i386 and amd64 platforms as it requires a binary
+blob object from the manufacturer which they only supply for these platforms.
+The
+.Nm
+driver does
+.Em not
+work on i386 with
+.Xr pae 4
+enabled.
+.Sh SEE ALSO
+.Xr kld 4 ,
+.Xr kldload 8 ,
+.Xr loader 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 10.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+device driver was written by
+.An HighPoint Technologies, Inc. .
+This manual page was written by
+.An Xin LI Aq delphij@FreeBSD.org
+for iXsystems, Inc.
diff --git a/share/man/man4/man4.i386/CPU_ELAN.4 b/share/man/man4/man4.i386/CPU_ELAN.4
index 7fe7741..4a0611f 100644
--- a/share/man/man4/man4.i386/CPU_ELAN.4
+++ b/share/man/man4/man4.i386/CPU_ELAN.4
@@ -148,6 +148,7 @@ and the GPIO pins which are not
available will be disabled.
.Sh SEE ALSO
.Xr led 4 ,
+.Xr timecounters 4 ,
.Xr sysctl 8
.Sh HISTORY
The
diff --git a/share/man/man4/ng_ksocket.4 b/share/man/man4/ng_ksocket.4
index d20ee46..e74f61a 100644
--- a/share/man/man4/ng_ksocket.4
+++ b/share/man/man4/ng_ksocket.4
@@ -34,7 +34,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd October 28, 2005
+.Dd January 09, 2012
.Dt NG_KSOCKET 4
.Os
.Sh NAME
@@ -199,7 +199,7 @@ For
the address is the pathname as a doubly quoted string.
.Pp
Examples:
-.Bl -tag -width XXXXXXXXXX
+.Bl -tag -width "PF_LOCAL"
.It Dv PF_LOCAL
local/"/tmp/foo.socket"
.It Dv PF_INET
@@ -215,6 +215,12 @@ the normal
form for that structure is used.
In the future, more
convenient encoding of the more common socket options may be supported.
+.Pp
+Setting socket options example:
+.Bl -tag -width "PF_LOCAL"
+.It Set FIB 2 for a socket (SOL_SOCKET, SO_SETFIB):
+.Dv "setopt \&{ level=0xffff name=0x1014 data=[ 2 ] \&}"
+.El
.Sh SHUTDOWN
This node shuts down upon receipt of a
.Dv NGM_SHUTDOWN
diff --git a/share/man/man4/pcm.4 b/share/man/man4/pcm.4
index 333033d..268e784 100644
--- a/share/man/man4/pcm.4
+++ b/share/man/man4/pcm.4
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 31, 2011
+.Dd January 22, 2012
.Dt SOUND 4
.Os
.Sh NAME
@@ -324,8 +324,17 @@ for Linux applications, and deny for everything else.
Always allow PROT_EXEC page mappings.
.El
.It Va hw.snd.default_auto
-Enable to automatically assign default sound unit to the most recent
-attached device.
+Automatically assign the default sound unit.
+The following values are supported (default is 1):
+.Bl -tag -width 2n
+.It 0
+Do not assign the default sound unit automatically.
+.It 1
+Use the best available sound device based on playing and recording
+capabilities of the device.
+.It 2
+Use the most recently attached device.
+.El
.It Va hw.snd.default_unit
Default sound card for systems with multiple sound cards.
When using
diff --git a/share/man/man4/snd_hda.4 b/share/man/man4/snd_hda.4
index 6dedb02..bcdd95a 100644
--- a/share/man/man4/snd_hda.4
+++ b/share/man/man4/snd_hda.4
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd January 22, 2010
+.Dd January 25, 2012
.Dt SND_HDA 4
.Os
.Sh NAME
@@ -53,8 +53,9 @@ support for several logical audio devices, and general purpose DMA channels.
.Pp
The
.Nm
-driver is a HDA bus controller driver and HDA codecs audio functions bridge
-driver that allows the generic audio driver,
+driver includes HDA bus controller driver (hdac), HDA codec driver (hdacc)
+and HDA codecs audio functions bridge driver (hdaa) that allows
+the generic audio driver,
.Xr sound 4 ,
to be used with this hardware.
Only audio functions are supported by
@@ -77,7 +78,9 @@ For example, one device for main rear 7.1 output and inputs, one device
for independent headset connectors at front and one device for SPDIF or
HDMI audio input/output.
The assignment of audio inputs and outputs may be tuned with
-.Xr device.hints 5 .
+.Xr device.hints 5
+or
+.Xr sysctl 8 .
The driver's verbose boot messages provide a lot of information about
the operation of the driver and present audio setup.
.Pp
@@ -92,19 +95,26 @@ The following variables are available at boot-time through the
file:
.Bl -tag -width ".Va hint.hdac.%d.config"-offset indent
.It Va hint.hdac.%d.config
-Configures a range of possible options.
+Configures a range of possible controller options.
Possible values are:
+.Dq Li 64bit ,
.Dq Li dmapos ,
+.Dq Li msi .
+An option prefixed with
+.Dq Li no ,
+such as
+.Dq Li nomsi ,
+will do the opposite and takes precedence.
+Options can be separated by whitespace and commas.
+.It Va hint.hdac.%d.msi
+Controls MSI (Message Signaled Interrupts) support.
+.It Va hint.hdac.%d.cad%d.nid%d.config
+Same as
+.Va hint.hdaa.%d.nid%d.config
+.It Va hint.hdaa.%d.config
+Configures a range of possible audio function options.
+Possible values are:
.Dq Li eapdinv ,
-.Dq Li gpio0 ,
-.Dq Li gpio1 ,
-.Dq Li gpio2 ,
-.Dq Li gpio3 ,
-.Dq Li gpio4 ,
-.Dq Li gpio5 ,
-.Dq Li gpio6 ,
-.Dq Li gpio7 ,
-.Dq Li gpioflush ,
.Dq Li ivref ,
.Dq Li ivref50 ,
.Dq Li ivref80 ,
@@ -126,27 +136,64 @@ such as
will do the opposite and takes precedence.
Options can be separated by whitespace and commas.
.Pp
+The
+.Dq Li eapdinv
+option inverts External Amplifier Power Down signal.
+The
+.Dq Li fixedrate
+denies all sampling rates except 48KHz.
+The
+.Dq Li forcestereo
+denies mono playback/recording.
+The
+.Dq Li senseinv
+option inverts jack sensing logic.
+The
+.Dq Li ivref Ns Ar X
+and
+.Dq Li ovref Ns Ar X
+options control the voltage used to power external microphones.
+.It Va hint.hdaa.%d.gpio_config
+Overrides audio function GPIO pins configuration set by BIOS.
+May be specified as a set of space-separated
+.Dq Ar num Ns = Ns Ar value
+pairs, where
+.Ar num
+is GPIO line number, and
+.Ar value
+is one of:
+.Dq Li keep ,
+.Dq Li set ,
+.Dq Li clear ,
+.Dq Li disable
+and
+.Dq Li input .
+.Pp
.Dq Li GPIO Ns s
are a codec's General Purpose I/O pins which system integrators sometimes
use to control external muters, amplifiers and so on.
If you have no sound, or sound volume is not adequate, you may have to
experiment a bit with the GPIO setup to find the optimal setup for your
system.
-.Pp
-The
-.Dq Li ivref Ns Ar X
-and
-.Dq Li ovref Ns Ar X
-options control the voltage used to power external microphones.
-.It Va hint.hdac.%d.msi
-Controls MSI (Message Signaled Interrupts) support.
-.It Va hint.hdac.%d.cad%d.nid%d.config
-Overrides codec pin configuration set by BIOS.
+.It Va hint.hdaa.%d.nid%d.config
+Overrides audio function pin configuration set by BIOS.
May be specified as a 32-bit hexadecimal value with a leading
.Dq 0x ,
or as a set of space-separated
.Dq Ar option Ns = Ns Ar value
pairs.
+.It Va hint.pcm.%d.rec.autosrc
+Controls automatic recording source feature:
+.Bl -tag -compact
+.It 0
+disabled,
+.It 1
+once on attach,
+.It 2
+enabled.
+.El
+When enabled, driver will automatically set recording source of the mixer to
+connected input using jack presence detection statuses.
.El
.Pp
Pin configuration is the UAA driver's main source of information about codec
@@ -165,7 +212,7 @@ The following options are supported:
Association number.
Associations are used to group individual pins to form a complex multi-pin
device.
-For example, to group 4 connectors for 7.1 output, or to treat several
+For example, to group 4 connectors for 7.1 input/output, or to treat several
input connectors as sources for the same input device.
Association numbers can be specified as numeric values from 0 to 15.
A value of 0 means disabled pin.
@@ -180,16 +227,22 @@ A unique, per-association number used to order pins inside the
particular association.
Sequence numbers can be specified as numeric values from 0 to 15.
.Pp
-For output assotiations sequence numbers encode speaker pairs positions:
-0 - Front, 1 - Center/LFE, 2 - Back, 3 - Front Wide Center, 4 - Side.
-Standard combinations are: (0) - Stereo; (0, 2), (0, 4) - Quadro;
-(0, 1, 2), (0, 1, 4) - 5.1; (0, 1, 2, 4) - 7.1.
-.Pp
The sequence number 15 has a special meaning for output associations.
Output pins with this number and device type
.Dq Ar Headphones
will duplicate (with automatic mute if jack detection is supported) the
first pin in that association.
+.Pp
+The sequence numbers 14 and 15 has a special meaning for input associations.
+Their presence in association defines it as multiplexed or mixed respectively.
+If none of them present and there are more then one pin in association,
+the association will provide multichannel input.
+.Pp
+For multichannel input/output assotiations sequence numbers encode
+channel pairs positions:
+0 - Front, 1 - Center/LFE, 2 - Back, 3 - Front Wide Center, 4 - Side.
+Standard combinations are: (0) - Stereo; (0, 2), (0, 4) - Quadro;
+(0, 1, 2), (0, 1, 4) - 5.1; (0, 1, 2, 4) - 7.1.
.It Va device
Device type.
Can be specified as a number from 0 to 15 or as a name:
@@ -278,7 +331,11 @@ The following
variables are available in addition to those available to all
.Xr sound 4
devices:
-.Bl -tag -width ".Va dev.hdac.%d.polling" -offset indent
+.Bl -tag -width ".Va dev.hdaa.%d.nid%d_original" -offset indent
+.It Va dev.hdac.%d.pindump
+Setting this to a non-zero value dumps the current pin configuration, main
+capabilities and jack sense status of all audio functions on the controller
+to console and syslog.
.It Va dev.hdac.%d.polling
Enables polling mode.
In this mode the driver operates by querying the device state on timer
@@ -288,11 +345,40 @@ instead of interrupts.
Polling is disabled by default.
Do not enable it unless you are facing weird interrupt problems or if the
device cannot generate interrupts at all.
-.It Va dev.hdac.%d.polling_interval
-Controller/Jack Sense polling interval (1-1000 ms)
-.It Va dev.hdac.%d.pindump
-Setting this to a non-zero value dumps the current pin configuration, main
-capabilities and jack sense status to console and syslog.
+.It Va dev.hdaa.%d.config
+Run-time equivalent of the
+.Va hint.hdaa.%d.config
+tunable.
+.It Va dev.hdaa.%d.gpi_state
+Current state of GPI lines.
+.It Va dev.hdaa.%d.gpio_state
+Current state of GPIO lines.
+.It Va dev.hdaa.%d.gpio_config
+Run-time equivalent of the
+.Va hint.hdaa.%d.gpio.config
+tunable.
+.It Va dev.hdaa.%d.gpo_state
+Current state of GPO lines.
+.It Va dev.hdaa.%d.nid%d_config
+Run-time equivalent of the
+.Va hint.hdaa.%d.nid%d.config
+tunable.
+.It Va dev.hdaa.%d.nid%d_original
+Original pin configuration written by BIOS.
+.It Va dev.hdaa.%d.reconfig
+Setting this to a non-zero value makes driver to destroy existing pcm devices
+and process new pins configuration set via
+.Va dev.hdaa.%d.nid%d_config.
+.It Va dev.pcm.%d.play.32bit , dev.pcm.%d.rec.32bit
+HDA controller uses 32bit representation for all samples of more then 16 bits.
+These variables allow to specify how many bits of these 32 should be
+used by CODEC.
+Depending on codec capabilities, possible values are 20, 24 and 32 bit.
+The default value is 24.
+.It Va dev.pcm.%d.rec.autosrc
+Run-time equivalent of the
+.Va hint.pcm.%d.rec.autosrc
+tunable.
.El
.Sh EXAMPLES
Taking HP Compaq DX2300 with Realtek ALC888 HDA codec for example.
@@ -307,22 +393,23 @@ So high codec uniformity and flexibility allow driver to configure it in many
different ways, depending on requested pins usage described by pins configuration.
The driver reports such default pin configuration when verbose messages enabled:
.Bd -literal
-hdac0: nid 20 0x01014020 as 2 seq 0 Line-out Jack jack 1 loc 1 color Green misc 0
-hdac0: nid 21 0x99130110 as 1 seq 0 Speaker Fixed jack 3 loc 25 color Unknown misc 1
-hdac0: nid 22 0x411111f0 as 15 seq 0 Speaker None jack 1 loc 1 color Black misc 1
-hdac0: nid 23 0x411111f0 as 15 seq 0 Speaker None jack 1 loc 1 color Black misc 1
-hdac0: nid 24 0x01a19830 as 3 seq 0 Mic Jack jack 1 loc 1 color Pink misc 8
-hdac0: nid 25 0x02a1983f as 3 seq 15 Mic Jack jack 1 loc 2 color Pink misc 8
-hdac0: nid 26 0x01813031 as 3 seq 1 Line-in Jack jack 1 loc 1 color Blue misc 0
-hdac0: nid 27 0x0221401f as 1 seq 15 Headphones Jack jack 1 loc 2 color Green misc 0
-hdac0: nid 28 0x411111f0 as 15 seq 0 Speaker None jack 1 loc 1 color Black misc 1
-hdac0: nid 30 0x411111f0 as 15 seq 0 Speaker None jack 1 loc 1 color Black misc 1
-hdac0: nid 31 0x411111f0 as 15 seq 0 Speaker None jack 1 loc 1 color Black misc 1
+hdaa0: nid 0x as seq device conn jack loc color misc
+hdaa0: 20 01014020 2 0 Line-out Jack 1/8 Rear Green 0
+hdaa0: 21 99130110 1 0 Speaker Fixed ATAPI Onboard Unknown 1
+hdaa0: 22 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
+hdaa0: 23 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
+hdaa0: 24 01a19830 3 0 Mic Jack 1/8 Rear Pink 8
+hdaa0: 25 02a1983f 3 15 Mic Jack 1/8 Front Pink 8
+hdaa0: 26 01813031 3 1 Line-in Jack 1/8 Rear Blue 0
+hdaa0: 27 0221401f 1 15 Headphones Jack 1/8 Front Green 0
+hdaa0: 28 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
+hdaa0: 30 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
+hdaa0: 31 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
.Ed
.Pp
Here we can see, that the nodes with ID (nid) 25 and 27 are front panel
-connectors (Jack, loc 2), nids 20, 24 and 26 are rear panel connectors
-(Jack, loc 1) and nid 21 is a built-in speaker (Fixed, loc 25).
+connectors (Jack, Front), nids 20, 24 and 26 are rear panel connectors
+(Jack, Rear) and nid 21 is a built-in speaker (Fixed, Onboard).
Pins with nids 22, 23, 28, 30 and 31 will be disabled by driver due to "None"
connectivity. So the pin count and description matches to connectors that
we have.
@@ -330,15 +417,15 @@ we have.
Using association (as) and sequence (seq) fields values pins are grouped into
3 associations:
.Bd -literal
-hdac0: Association 0 (1) out:
-hdac0: Pin nid=21 seq=0
-hdac0: Pin nid=27 seq=15
-hdac0: Association 1 (2) out:
-hdac0: Pin nid=20 seq=0
-hdac0: Association 2 (3) in:
-hdac0: Pin nid=24 seq=0
-hdac0: Pin nid=26 seq=1
-hdac0: Pin nid=25 seq=15
+hdaa0: Association 0 (1) out:
+hdaa0: Pin nid=21 seq=0
+hdaa0: Pin nid=27 seq=15
+hdaa0: Association 1 (2) out:
+hdaa0: Pin nid=20 seq=0
+hdaa0: Association 2 (3) in:
+hdaa0: Pin nid=24 seq=0
+hdaa0: Pin nid=26 seq=1
+hdaa0: Pin nid=25 seq=15
.Ed
.Pp
Each
@@ -497,148 +584,14 @@ Most of controls use logarithmic scale.
.Sh HARDWARE
The
.Nm
-driver supports many Intel HDA compatible audio chipsets including the
-following:
+driver supports controllers having PCI class 4 (multimedia) and
+subclass 3 (HDA), compatible with Intel HDA specification.
.Pp
-.Bl -bullet -compact
-.It
-ATI SB450
-.It
-ATI SB600
-.It
-Intel 631x/632xESB
-.It
-Intel 82801F (ICH6)
-.It
-Intel 82801G (ICH7)
-.It
-Intel 82801H (ICH8)
-.It
-Intel 82801I (ICH9)
-.It
-Intel 82801J (ICH10)
-.It
-Intel US15W (SCH)
-.It
-nVidia MCP51
-.It
-nVidia MCP55
-.It
-nVidia MCP61A
-.It
-nVidia MCP61B
-.It
-nVidia MCP63
-.It
-nVidia MCP65A
-.It
-nVidia MCP65B
-.It
-nVidia MCP67A
-.It
-nVidia MCP67B
-.It
-nVidia MCP68
-.It
-nVidia MCP69
-.It
-nVidia MCP73
-.It
-nVidia MCP78
-.It
-nVidia MCP79
-.It
-nVidia MCP89
-.It
-SiS 966
-.It
-VIA VT8251/8237A
-.El
-.Pp
-The following and many other codecs have been verified to work:
-.Pp
-.Bl -bullet -compact
-.It
-Analog Devices AD1981HD
-.It
-Analog Devices AD1983
-.It
-Analog Devices AD1984
-.It
-Analog Devices AD1986A
-.It
-Analog Devices AD1988
-.It
-Analog Devices AD1988B
-.It
-CMedia CMI9880
-.It
-Conexant CX20549 (Venice)
-.It
-Conexant CX20551 (Waikiki)
-.It
-Conexant CX20561 (Hermosa)
-.It
-Realtek ALC260
-.It
-Realtek ALC262
-.It
-Realtek ALC268
-.It
-Realtek ALC660
-.It
-Realtek ALC861
-.It
-Realtek ALC861VD
-.It
-Realtek ALC880
-.It
-Realtek ALC882
-.It
-Realtek ALC883
-.It
-Realtek ALC885
-.It
-Realtek ALC888
-.It
-Realtek ALC889
-.It
-Sigmatel STAC9205
-.It
-Sigmatel STAC9220
-.It
-Sigmatel STAC9220D / 9223D
-.It
-Sigmatel STAC9221
-.It
-Sigmatel STAC9221D
-.It
-Sigmatel STAC9227D
-.It
-Sigmatel STAC9227X
-.It
-Sigmatel STAC9228D
-.It
-Sigmatel STAC9228X
-.It
-Sigmatel STAC9229D
-.It
-Sigmatel STAC9229X
-.It
-Sigmatel STAC9230D
-.It
-Sigmatel STAC9230X
-.It
-Sigmatel STAC9271D
-.It
-Sigmatel STAC9872AK
-.It
-VIA VT1708
-.It
-VIA VT1708B
-.It
-VIA VT1709
-.El
+The
+.Nm
+driver supports more then two hundred different controllers and CODECs.
+There is no sense to list all of them here, as in most cases specific CODEC
+configuration and wiring are more important then type of the CODEC itself.
.Sh SEE ALSO
.Xr sound 4 ,
.Xr snd_ich 4 ,
@@ -665,19 +618,17 @@ This manual page was written by
and
.An Giorgos Keramidas Aq keramida@FreeBSD.org .
.Sh BUGS
-A few Hardware/OEM vendors tend to screw up BIOS settings, thus
-rendering the
-.Nm
-driver useless.
-This usually results in a state where the
+Some Hardware/OEM vendors tend to screw up BIOS settings or use custom
+unusual CODEC wiring that create problems to the driver.
+This may result in missing pcm devices, or a state where the
.Nm
driver seems to attach and work, but no sound is played.
Some cases can be solved by tuning
.Pa loader.conf
variables.
-Before trying to fix problem that way, make sure that there really is a problem
-and that the PCM audio device in use really corresponds to the expected
-audio connector.
+But before trying to fix problem that way, make sure that there really is
+a problem and that the PCM audio device in use really corresponds to the
+expected audio connector.
.Pp
Some vendors use non-standardized General Purpose I/O (GPIO) pins of the codec
to control external amplifiers.
diff --git a/share/man/man4/splash.4 b/share/man/man4/splash.4
index 29a9693..4b5f224 100644
--- a/share/man/man4/splash.4
+++ b/share/man/man4/splash.4
@@ -74,6 +74,14 @@ Bitmaps of other color depths will not be displayed.
ZSoft PCX decoder.
This decoder currently only supports version 5 8-bpp single-plane
images.
+.It Pa splash_txt.ko
+TheDraw binary ASCII drawing file decoder.
+Displays a text-mode 80x25 ASCII drawing, such as that produced by
+the Binary save format in TheDraw.
+This format consists of a sequence
+of two byte pairs representing the 80x25 display, where the first byte
+is the ASCII character to draw and the second byte indicates the
+colors/attributes to use when drawing the character.
.El
.Pp
The
@@ -223,6 +231,16 @@ If the VESA support is statically linked to the kernel, it is not
necessary to load the VESA module.
Just load the bitmap file and the splash decoder module as in the
first example above.
+.Pp
+To load a binary ASCII drawing and display this while booting, include the
+following into your
+.Pa /boot/loader.conf
+:
+.Bd -literal -offset indent
+splash_txt_load="YES"
+bitmap_load="YES"
+bitmap_name="/boot/splash.bin"
+.Ed
.\".Sh DIAGNOSTICS
.Sh SEE ALSO
.Xr vidcontrol 1 ,
@@ -256,6 +274,15 @@ module was written by
based on the
.Pa splash_bmp
code.
+The
+.Pa splash_txt
+module was written by
+.An Antony Mawer Aq antony@mawer.org
+based on the
+.Pa splash_bmp
+code, with some additional inspiration from the
+.Pa daemon_saver
+code.
.Sh CAVEATS
Both the splash screen and the screen saver work with
.Xr syscons 4
diff --git a/share/man/man4/targ.4 b/share/man/man4/targ.4
index 5e78200..6c61735 100644
--- a/share/man/man4/targ.4
+++ b/share/man/man4/targ.4
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd November 15, 2002
+.Dd December 13, 2011
.Dt TARG 4
.Os
.Sh NAME
@@ -49,16 +49,8 @@ can be found in
.Pp
The
.Nm
-driver supplies control devices,
-.Pa /dev/targ0 ,
-.Pa /dev/targ1 ,
-etc.
-If a device is already in use,
-.Xr open 2
-will fail and
-.Va errno
-will be set to
-.Er EBUSY .
+driver supplies the control device
+.Pa /dev/targ .
After opening the device, the file descriptor must be bound to a
specific bus/target/LUN and enabled to process CCBs using the
.Dv TARGIOCENABLE
@@ -123,8 +115,8 @@ it.
describes the usermode interface.
.It Pa /sys/cam/scsi/scsi_target.c
is the driver source file.
-.It Pa /dev/targ*
-are the control devices.
+.It Pa /dev/targ
+is the control device.
.El
.Sh SEE ALSO
.Pa /usr/share/examples/scsi_target ,
diff --git a/share/man/man4/timecounters.4 b/share/man/man4/timecounters.4
new file mode 100644
index 0000000..b6fc85e
--- /dev/null
+++ b/share/man/man4/timecounters.4
@@ -0,0 +1,106 @@
+.\" Copyright (c) 2011 Alexander Motin <mav@FreeBSD.org>
+.\" 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.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 20, 2011
+.Dt TIMECOUNTERS 4
+.Os
+.Sh NAME
+.Nm timecounters
+.Nd kernel time counters subsystem
+.Sh SYNOPSIS
+Kernel uses several types of time-related devices, such as: real time clocks,
+time counters and event timers.
+Real time clocks responsible for tracking real world time, mostly when system
+is down.
+Time counters are responsible for tracking purposes, when system is running.
+Event timers are responsible for generating interrupts at specified time or
+periodically, to run different time-based events.
+This page is about the second.
+.Sh DESCRIPTION
+Time counters are the lowest level of time tracking in kernel.
+They provide monotonically increasing timestamps with known width and
+update frequency.
+They can overflow, drift, etc and so in raw form used only in very limited
+performance-critical places like process scheduler.
+.Pp
+More usable time is created by scaling the values read from the selected
+time counter and combining it with some offset, regularly updated by
+.Fn tc_windup
+on
+.Fn hardclock
+invocation.
+.Pp
+Different platforms provide different kinds of timer hardware.
+The goal of the time counters subsystem is to provide unified way to access
+that hardware.
+.Pp
+Each driver implementing time counters, registers them at the subsystem.
+It is possible to see the list of present time counters, like this, via
+.Va kern.timecounter
+sysctl:
+.Bd -literal
+kern.timecounter.choice: TSC-low(-100) HPET(950) i8254(0) ACPI-fast(900) dummy(-1000000)
+kern.timecounter.tc.ACPI-fast.mask: 16777215
+kern.timecounter.tc.ACPI-fast.counter: 13467909
+kern.timecounter.tc.ACPI-fast.frequency: 3579545
+kern.timecounter.tc.ACPI-fast.quality: 900
+kern.timecounter.tc.i8254.mask: 65535
+kern.timecounter.tc.i8254.counter: 62692
+kern.timecounter.tc.i8254.frequency: 1193182
+kern.timecounter.tc.i8254.quality: 0
+kern.timecounter.tc.HPET.mask: 4294967295
+kern.timecounter.tc.HPET.counter: 3013495652
+kern.timecounter.tc.HPET.frequency: 14318180
+kern.timecounter.tc.HPET.quality: 950
+kern.timecounter.tc.TSC-low.mask: 4294967295
+kern.timecounter.tc.TSC-low.counter: 4067509463
+kern.timecounter.tc.TSC-low.frequency: 11458556
+kern.timecounter.tc.TSC-low.quality: -100
+.Ed
+.Pp
+where:
+.Bl -inset
+.It Va kern.timecounter.tc. Ns Ar X Ns Va .mask
+is a bitmask, defining valid counter bits,
+.It Va kern.timecounter.tc. Ns Ar X Ns Va .counter
+is a present counter value,
+.It Va kern.timecounter.tc. Ns Ar X Ns Va .frequency
+is a counter update frequency,
+.It Va kern.timecounter.tc. Ns Ar X Ns Va .quality
+is an integral value, defining how good is this time counter,
+comparing to others.
+Negative value means that this time counter is broken and should not be used.
+.El
+.Pp
+Time management code of the kernel chooses one time counter from that list.
+Current choice can be read and affected via
+.Va kern.timecounter.hardware
+tunable/sysctl.
+.Sh SEE ALSO
+.Xr attimer 4 ,
+.Xr eventtimers 4 ,
+.Xr ffclock 4 ,
+.Xr hpet 4
diff --git a/share/man/man4/viawd.4 b/share/man/man4/viawd.4
new file mode 100644
index 0000000..47473cf
--- /dev/null
+++ b/share/man/man4/viawd.4
@@ -0,0 +1,79 @@
+.\"-
+.\" Copyright (c) 2011 Fabien Thomas <fabient@FreeBSD.org>
+.\" 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.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 7, 2011
+.Dt VIAWD 4
+.Os
+.Sh NAME
+.Nm viawd
+.Nd device driver for VIA south bridge watchdog timer
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device viawd"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+viawd_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides
+.Xr watchdog 4
+support for the watchdog interrupt timer present on
+VIA south bridge chipset (VT8251, CX700, VX800, VX855, VX900).
+.Pp
+The VIA south bridge have a built-in watchdog timer,
+which can be enabled and disabled by user's program and set between
+1 to 1023 seconds.
+.Pp
+The
+.Nm
+driver when unloaded with running watchdog will reschedule the watchdog
+to 5 minutes.
+.Sh SEE ALSO
+.Xr watchdog 4 ,
+.Xr watchdog 8 ,
+.Xr watchdogd 8 ,
+.Xr watchdog 9
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 10.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver and this manual page were written by
+.An Fabien Thomas Aq fabient@FreeBSD.org .
diff --git a/share/man/man4/virtio.4 b/share/man/man4/virtio.4
index 7787051..030f0aa 100644
--- a/share/man/man4/virtio.4
+++ b/share/man/man4/virtio.4
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 4, 2011
+.Dd January 22, 2012
.Dt VIRTIO 4
.Os
.Sh NAME
@@ -48,24 +48,25 @@ virtio_pci_load="YES"
.Sh DESCRIPTION
VirtIO is a specification for para-virtualized I/O in a virtual machine (VM).
Traditionally, the hypervisor emulated real devices such as an Ethernet
-interface or disk controller to provide the VM with I/O. This emulation is
-often inefficient.
+interface or disk controller to provide the VM with I/O.
+This emulation is often inefficient.
.Pp
VirtIO defines an interface for efficient I/O between the hypervisor and VM.
-The
-.Xr virtio 4
+The
+.Xr virtio 4
module provides a shared memory transport called a virtqueue.
The
.Xr virtio_pci 4
device driver represents an emulated PCI device that the hypervisor makes
-available to the VM. This device provides the probing, configuration, and
-interrupt notifications need to interact with the hypervisor.
+available to the VM.
+This device provides the probing, configuration, and
+interrupt notifications needed to interact with the hypervisor.
.Fx
supports the following VirtIO devices:
.Bl -hang -offset indent -width xxxxxxxx
.It Nm Ethernet
An emulated Ethernet device is provided by the
-.Xr if_vtnet 4
+.Xr vtnet 4
device driver.
.It Nm Block
An emulated disk controller is provided by the
@@ -78,9 +79,9 @@ provided by the
device driver.
.El
.Sh SEE ALSO
-.Xr if_vtnet 4 ,
+.Xr virtio_balloon 4 ,
.Xr virtio_blk 4 ,
-.Xr virtio_balloon 4
+.Xr vtnet 4
.Sh HISTORY
Support for VirtIO first appeared in
.Fx 9.0 .
diff --git a/share/man/man4/virtio_balloon.4 b/share/man/man4/virtio_balloon.4
index 4053f78..96e8c73 100644
--- a/share/man/man4/virtio_balloon.4
+++ b/share/man/man4/virtio_balloon.4
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 4, 2011
+.Dd January 22, 2012
.Dt VIRTIO_BALLOON 4
.Os
.Sh NAME
@@ -51,8 +51,8 @@ device driver provides support for VirtIO memory balloon devices.
.Pp
The memory balloon allows the guest to, at the request of the
hypervisor, return memory allocated to the hypervisor so it can
-be made available to other guests. The hypervisor can later
-signal the balloon to return the memory.
+be made available to other guests.
+The hypervisor can later signal the balloon to return the memory.
.Sh SEE ALSO
.Xr virtio 4
.Sh HISTORY
diff --git a/share/man/man4/virtio_blk.4 b/share/man/man4/virtio_blk.4
index 4250141..7be4425 100644
--- a/share/man/man4/virtio_blk.4
+++ b/share/man/man4/virtio_blk.4
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 4, 2011
+.Dd January 22, 2012
.Dt VIRTIO_BLK 4
.Os
.Sh NAME
@@ -48,7 +48,6 @@ virtio_blk_load="YES"
The
.Nm
device driver provides support for VirtIO block devices.
-.Pp
.Sh LOADER TUNABLES
Tunables can be set at the
.Xr loader 8
@@ -57,7 +56,8 @@ prompt before booting the kernel or stored in
.Bl -tag -width "xxxxxx"
.It Va hw.vtblk.no_ident
This tunable disables retrieving the device identification string
-from the hypervisor. The default value is 0.
+from the hypervisor.
+The default value is 0.
.El
.Sh SEE ALSO
.Xr virtio 4
diff --git a/share/man/man4/vtnet.4 b/share/man/man4/vtnet.4
index 900d12d..febb0ac 100644
--- a/share/man/man4/vtnet.4
+++ b/share/man/man4/vtnet.4
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 4, 2011
+.Dd January 22, 2012
.Dt VTNET 4
.Os
.Sh NAME
@@ -62,7 +62,6 @@ utility configures the adapter to receive and transmit Jumbo Frames.
.Pp
For more information on configuring this device, see
.Xr ifconfig 8 .
-.El
.Sh LOADER TUNABLES
Tunables can be set at the
.Xr loader 8
@@ -70,19 +69,21 @@ prompt before booting the kernel or stored in
.Xr loader.conf 5 .
.Bl -tag -width "xxxxxx"
.It Va hw.vtnet.csum_disable
-This tunable disables receive and send checksum offload. The default
-value is 0.
+This tunable disables receive and send checksum offload.
+The default value is 0.
.It Va hw.vtnet.tso_disable
-This tunable disables TSO. The default value is 0.
+This tunable disables TSO.
+The default value is 0.
.It Va hw.vtnet.lro_disable
-This tunable disables LRO. The default value is 0.
+This tunable disables LRO.
+The default value is 0.
.El
.Sh SEE ALSO
.Xr arp 4 ,
.Xr netintro 4 ,
.Xr ng_ether 4 ,
-.Xr vlan 4 ,
.Xr virtio 4 ,
+.Xr vlan 4 ,
.Xr ifconfig 8
.Sh HISTORY
The
diff --git a/share/man/man5/Makefile b/share/man/man5/Makefile
index fdf3b33..b05c1eb 100644
--- a/share/man/man5/Makefile
+++ b/share/man/man5/Makefile
@@ -76,6 +76,7 @@ MLINKS+=fs.5 inode.5
MLINKS+=hosts.equiv.5 rhosts.5
MLINKS+=msdosfs.5 msdos.5
MLINKS+=passwd.5 master.passwd.5
+MLINKS+=portindex.5 INDEX.5
MLINKS+=quota.user.5 quota.group.5
MLINKS+=rc.conf.5 rc.conf.local.5
MLINKS+=resolver.5 resolv.conf.5
diff --git a/share/man/man5/ar.5 b/share/man/man5/ar.5
index 81bc7e6..2acbde4 100644
--- a/share/man/man5/ar.5
+++ b/share/man/man5/ar.5
@@ -126,7 +126,7 @@ The BSD and SVR4/GNU variants use different schemes for encoding file
names for members.
.Bl -tag -width "SVR4/GNU"
.It "BSD"
-File names that are upto 16 bytes long and which do not contain
+File names that are up to 16 bytes long and which do not contain
embedded spaces are stored directly in the
.Ar ar_name
field of the archive header.
@@ -164,7 +164,7 @@ ASCII
.Dq "A BC D"
.Pc .
.It "SVR4/GNU"
-File names that are upto 15 characters long are stored directly in the
+File names that are up to 15 characters long are stored directly in the
.Ar ar_name
field of the header, terminated by a
.Dq Li /
diff --git a/share/man/man5/make.conf.5 b/share/man/man5/make.conf.5
index c424a1e..d9967ea 100644
--- a/share/man/man5/make.conf.5
+++ b/share/man/man5/make.conf.5
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd June 16, 2011
+.Dd December 11, 2011
.Dt MAKE.CONF 5
.Os
.Sh NAME
@@ -333,6 +333,12 @@ to update your
.Pa src
tree with
.Dq Li "make update" .
+Note that since a subversion client is not included in the base system,
+you will need to set
+.Va SVN
+to the full path of a
+.Xr svn 1
+binary.
.It Va WWWSUPFILE
.Pq Vt str
The www
@@ -494,7 +500,7 @@ rather than load the server's kernel.
.Pq Vt bool
Defining this and recompiling
.Pa /usr/src/sys/boot/i386
-will add
+will add
.Xr dcons 4
console driver to
.Xr loader 8
@@ -634,7 +640,7 @@ The default value is 0640.
.Pq Vt str
Additional maps to rebuild when using
.Pa /etc/mail/Makefile .
-The
+The
.Pa access ,
.Pa bitdomain ,
.Pa domaintable ,
diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5
index e4a058a..47a325b 100644
--- a/share/man/man5/rc.conf.5
+++ b/share/man/man5/rc.conf.5
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd October 23, 2011
+.Dd December 13, 2011
.Dt RC.CONF 5
.Os
.Sh NAME
@@ -1101,7 +1101,9 @@ ipv4_addrs_ed0="192.0.2.129/27 192.0.2.1-5/28"
.Pp
It is also possible to add IP alias entries using
.Xr ifconfig 8
-syntax.
+syntax with the
+.Dq Li inet
+keyword.
Assuming that the interface in question was
.Li ed0 ,
it might look
@@ -1114,7 +1116,9 @@ ifconfig_ed0_alias1="inet 127.0.0.254 netmask 0xffffffff"
And so on.
For each
.Va ifconfig_ Ns Ao Ar interface Ac Ns Va _alias Ns Aq Ar n
-entry that is found,
+entry with the
+.Dq Li inet
+keyword that is found,
its contents are passed to
.Xr ifconfig 8 .
Execution stops at the first unsuccessful access, so if
diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5
index ab5adc5..68a93cd 100644
--- a/share/man/man5/src.conf.5
+++ b/share/man/man5/src.conf.5
@@ -1,7 +1,7 @@
.\" DO NOT EDIT-- this file is automatically generated.
.\" from FreeBSD: head/tools/build/options/makeman 221733 2011-05-10 13:01:11Z ru
.\" $FreeBSD$
-.Dd December 2, 2011
+.Dd January 13, 2012
.Dt SRC.CONF 5
.Os
.Sh NAME
@@ -251,6 +251,9 @@ Set to build some programs without optional bzip2 support.
.\" from FreeBSD: head/tools/build/options/WITHOUT_CALENDAR 156932 2006-03-21 07:50:50Z ru
Set to not build
.Xr calendar 1 .
+.It Va WITHOUT_CAPSICUM
+.\" from FreeBSD: head/tools/build/options/WITHOUT_CAPSICUM 229319 2012-01-02 21:57:58Z rwatson
+Set to not build Capsicum support into system programs.
.It Va WITHOUT_CDDL
.\" from FreeBSD: head/tools/build/options/WITHOUT_CDDL 163861 2006-11-01 09:02:11Z jb
Set to not build code licensed under Sun's CDDL.
@@ -821,7 +824,7 @@ Set to not build
.Xr ppp 8
and related programs.
.It Va WITHOUT_PROFILE
-.\" from FreeBSD: head/tools/build/options/WITH_PROFILE 228143 2011-11-29 19:46:17Z fjoe
+.\" from FreeBSD: head/tools/build/options/WITHOUT_PROFILE 228196 2011-12-02 09:09:54Z fjoe
Set to avoid compiling profiled libraries.
.It Va WITHOUT_QUOTAS
.\" from FreeBSD: head/tools/build/options/WITHOUT_QUOTAS 183242 2008-09-21 22:02:26Z sam
@@ -927,12 +930,11 @@ When set, it also enforces the following options:
.\" from FreeBSD: head/tools/build/options/WITHOUT_USB 156932 2006-03-21 07:50:50Z ru
Set to not build USB-related programs and libraries.
.It Va WITHOUT_UTMPX
-.\" from FreeBSD: head/tools/build/options/WITHOUT_UTMPX 223209 2011-06-17 21:30:21Z ed
+.\" from FreeBSD: head/tools/build/options/WITHOUT_UTMPX 230060 2012-01-13 15:40:49Z ed
Set to not build user accounting tools such as
.Xr last 1 ,
.Xr users 1 ,
.Xr who 1 ,
-.Xr wtmpcvt 1 ,
.Xr ac 8 ,
.Xr lastlogin 8
and
diff --git a/share/man/man7/Makefile b/share/man/man7/Makefile
index e279b37..011fbaf 100644
--- a/share/man/man7/Makefile
+++ b/share/man/man7/Makefile
@@ -10,7 +10,6 @@ MAN= adding_user.7 \
c99.7 \
development.7 \
environ.7 \
- eventtimers.7 \
ffs.7 \
firewall.7 \
hier.7 \
diff --git a/share/man/man7/eventtimers.7 b/share/man/man7/eventtimers.7
deleted file mode 100644
index 37d5fc8..0000000
--- a/share/man/man7/eventtimers.7
+++ /dev/null
@@ -1,133 +0,0 @@
-.\" Copyright (c) 2010 Alexander Motin <mav@FreeBSD.org>
-.\" 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.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
-.\"
-.\" $FreeBSD$
-.\"
-.Dd September 15, 2010
-.Dt EVENTTIMERS 4
-.Os
-.Sh NAME
-.Nm eventtimers
-.Nd kernel event timers subsystem
-.Sh SYNOPSIS
-Kernel uses several types of time-related devices, such as: real time clocks,
-time counters and event timers.
-Real time clocks responsible for tracking real world time, mostly when system
-is down.
-Time counters are responsible for generation of monotonically increasing
-timestamps for precise uptime tracking purposes, when system is running.
-Event timers are responsible for generating interrupts at specified time or
-periodically, to run different time-based events.
-This page is about the last.
-.Sh DESCRIPTION
-Kernel uses time-based events for many different purposes: scheduling,
-statistics, time keeping, profiling and many other things, based on
-.Xr callout 9
-mechanism.
-These purposes now grouped into three main callbacks:
-.Bl -tag
-.It hardclock()
-.Xr callout 9
-and timekeeping events entry. Called with frequency defined by hz variable,
-usually 1000Hz.
-.It statclock()
-statistics and scheduler events entry. Called with frequency about 128Hz.
-.It profclock()
-profiler events entry. When enabled, called with frequency about 8KHz.
-.El
-Different platforms provide different kinds of timer hardware.
-The goal of the event timers subsystem is to provide unified way to control
-that hardware, and to use it, supplying kernel with all required time-based
-events.
-.Pp
-Each driver implementing event timers, registers them at the subsystem.
-It is possible to see the list of present event timers, like this, via
-.Va kern.eventtimer
-sysctl:
-.Bd -literal
-kern.eventtimer.choice: HPET(550) LAPIC(400) i8254(100) RTC(0)
-kern.eventtimer.et.LAPIC.flags: 15
-kern.eventtimer.et.LAPIC.frequency: 0
-kern.eventtimer.et.LAPIC.quality: 400
-kern.eventtimer.et.i8254.flags: 1
-kern.eventtimer.et.i8254.frequency: 1193182
-kern.eventtimer.et.i8254.quality: 100
-kern.eventtimer.et.RTC.flags: 17
-kern.eventtimer.et.RTC.frequency: 32768
-kern.eventtimer.et.RTC.quality: 0
-kern.eventtimer.et.HPET.flags: 7
-kern.eventtimer.et.HPET.frequency: 14318180
-kern.eventtimer.et.HPET.quality: 550
-.Ed
-, where:
-.Bl -tag
-.It Va kern.eventtimer.et. Ns Ar X Ns Va .flags
-bitmask, defining event timer capabilities:
-.Bl -tag -compact
-.It 1
-periodic mode supported,
-.It 2
-one-shot mode supported,
-.It 4
-timer is per-CPU,
-.It 8
-timer may stop when CPU goes to sleep state,
-.It 16
-timer supports only power-of-2 divisors.
-.El
-.It Va kern.eventtimer.et. Ns Ar X Ns Va .frequency
-timer base frequency,
-.It Va kern.eventtimer.et. Ns Ar X Ns Va .quality
-integral value, defining how good is this timer, comparing to others.
-.El
-.Pp
-Timers management code of the kernel chooses one timer from that list.
-Current choice can be read and affected via
-.Va kern.eventtimer.timer
-tunable/sysctl.
-Several other tunables/sysctls are affecting how exactly this timer is used:
-.Bl -tag
-.It Va kern.eventtimer.periodic
-allows to choose periodic and one-shot operation mode.
-In periodic mode, periodic interrupts from timer hardware are taken as the
-only source of time for time events.
-One-shot mode instead uses currently selected time counter to precisely
-schedule all needed events and programs event timer to generate interrupt
-exactly in specified time.
-Default value depends of chosen timer capabilities, but one-shot mode is
-preferred, until other is forced by user or hardware.
-.It Va kern.eventtimer.singlemul
-in periodic mode specifies how much times higher timer frequency should be,
-to not strictly alias hardclock() and statclock() events. Default values are
-1, 2 or 4, depending on configured HZ value.
-.It Va kern.eventtimer.idletick
-makes each CPU to receive every timer interrupt independently of whether they
-busy or not. By default this options is disabled. If chosen timer is per-CPU
-and runs in periodic mode, this option has no effect - all interrupts are
-always generating.
-.El
-.Sh SEE ALSO
-.Xr attimer 4 ,
-.Xr atrtc 4 ,
-.Xr hpet 4
diff --git a/share/man/man7/release.7 b/share/man/man7/release.7
index f527c24..2d66691 100644
--- a/share/man/man7/release.7
+++ b/share/man/man7/release.7
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd March 18, 2011
+.Dd January 14, 2012
.Dt RELEASE 7
.Os
.Sh NAME
@@ -316,9 +316,7 @@ The following sequence of commands can be used to build a
.Dq "-CURRENT snapshot"
in a clean environment, including ports and documentation:
.Bd -literal -offset indent
-cd /usr/src
-make buildworld
-cd release
+cd /usr/src/release
export CVSUP_HOST=cvsupN.freebsd.org
sh generate-release.sh head /local3/release
.Ed
diff --git a/share/man/man8/rc.8 b/share/man/man8/rc.8
index 82737d4..56a33ce 100644
--- a/share/man/man8/rc.8
+++ b/share/man/man8/rc.8
@@ -35,7 +35,7 @@
.\" @(#)rc.8 8.2 (Berkeley) 12/11/93
.\" $FreeBSD$
.\"
-.Dd November 17, 2009
+.Dd January 14, 2012
.Dt RC 8
.Os
.Sh NAME
@@ -485,7 +485,7 @@ Most scripts require little more than the following.
\&. /etc/rc.subr
name="foo"
-rcvar=`set_rcvar`
+rcvar=foo_enable
command="/usr/local/bin/foo"
load_rc_config $name
@@ -506,7 +506,7 @@ The script may list and define as many commands at it needs.
\&. /etc/rc.subr
name="foo"
-rcvar=`set_rcvar`
+rcvar=foo_enable
command="/usr/local/bin/foo"
extra_commands="nop hello"
hello_cmd="echo Hello World."
diff --git a/share/man/man8/rc.subr.8 b/share/man/man8/rc.subr.8
index 9f6c7fa..8ed2470 100644
--- a/share/man/man8/rc.subr.8
+++ b/share/man/man8/rc.subr.8
@@ -29,7 +29,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd May 18, 2007
+.Dd January 14, 2012
.Dt RC.SUBR 8
.Os
.Sh NAME
@@ -73,8 +73,6 @@
.It
.Ic run_rc_script Ar file Ar argument
.It
-.Ic set_rcvar Op Ar base
-.It
.Ic wait_for_pids Op Ar pid ...
.It
.Ic warn Ar message
@@ -339,7 +337,7 @@ with
being the list of valid arguments
prefixed by
.Sm off
-.Dq Bq Li fast | force | one .
+.Dq Bq Li fast | force | one | quiet .
.Sm on
.It Ic reverse_list Ar item ...
Print the list of
@@ -427,6 +425,22 @@ Skip the checks for
being set to
.Dq Li YES ,
but performs all the other prerequisite tests.
+.It Li quiet
+Inhibits some verbose diagnostics.
+Currently, this includes messages
+.Qq Starting ${name}
+(as checked by
+.Ic check_startmsgs
+inside
+.Nm )
+and errors about usage of services that are not enabled in
+.Xr rc.conf 5 .
+This prefix also sets
+.Va rc_quiet Ns = Ns Li YES .
+.Em Please, note:
+.Va rc_quiet
+is not intended to completely mask all debug and warning messages,
+but only certain small classes of them.
.El
.Pp
.Ic run_rc_command
@@ -816,32 +830,6 @@ signal is sent to the parent
process, which is assumed to be
.Xr rc 8 .
Otherwise, the shell exits with a non-zero status.
-.It Ic set_rcvar Op Ar base
-Set the variable name required to start a service.
-In
-.Fx
-a daemon is usually controlled by an
-.Xr rc.conf 5
-variable consisting of a daemon's name postfixed by the string
-.Dq Li "_enable" .
-This is not the case in
-.Nx .
-When the following line is included in a script:
-.Pp
-.Dl "rcvar=`set_rcvar`"
-.Pp
-this function will use the value of the
-.Va $name
-variable, which should be defined by the calling script,
-to construct the appropriate
-.Xr rc.conf 5
-knob.
-If the
-.Ar base
-argument is set it will use
-.Ar base
-instead of
-.Va $name .
.It Ic wait_for_pids Op Ar pid ...
Wait until all of the provided
.Ar pids
diff --git a/share/man/man8/yp.8 b/share/man/man8/yp.8
index f57c8df..db5610b 100644
--- a/share/man/man8/yp.8
+++ b/share/man/man8/yp.8
@@ -28,7 +28,7 @@
.\" from: @(#)yp.8 1.0 (deraadt) 4/26/93
.\" $FreeBSD$
.\"
-.Dd June 25, 2009
+.Dd December 14, 2011
.Dt YP 8
.Os
.Sh NAME
@@ -519,6 +519,20 @@ a v1 and v2 server.
.Xr ypserv 8
manual page for a detailed description of these special features
and flags.)
+.Sh SEE ALSO
+.Xr domainname 1 ,
+.Xr ypcat 1 ,
+.Xr ypmatch 1 ,
+.Xr ypwhich 1 ,
+.Xr nsswitch.conf 5 ,
+.Xr yp_mkdb 8 ,
+.Xr ypbind 8 ,
+.Xr ypinit 8 ,
+.Xr yppoll 8 ,
+.Xr yppush 8 ,
+.Xr ypserv 8 ,
+.Xr ypset 8 ,
+.Xr ypxfr 8
.Sh HISTORY
The
.Nm YP
diff --git a/share/man/man9/DEV_MODULE.9 b/share/man/man9/DEV_MODULE.9
index 13a81c1..28465b3 100644
--- a/share/man/man9/DEV_MODULE.9
+++ b/share/man/man9/DEV_MODULE.9
@@ -28,7 +28,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd March 11, 2001
+.Dd January 19, 2012
.Dt DEV_MODULE 9
.Os
.Sh NAME
@@ -68,7 +68,7 @@ on load and to destroy it when it is unloaded using
static struct cdevsw foo_devsw = { ... };
-static dev_t sdev;
+static struct cdev *sdev;
static int
foo_load(module_t mod, int cmd, void *arg)
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile
index 0870355..7d2af8a 100644
--- a/share/man/man9/Makefile
+++ b/share/man/man9/Makefile
@@ -102,6 +102,7 @@ MAN= accept_filter.9 \
driver.9 \
DRIVER_MODULE.9 \
EVENTHANDLER.9 \
+ eventtimers.9 \
extattr.9 \
fail.9 \
fetch.9 \
@@ -163,6 +164,7 @@ MAN= accept_filter.9 \
mbuf_tags.9 \
MD5.9 \
mdchain.9 \
+ memcchr.9 \
memguard.9 \
microseq.9 \
microtime.9 \
@@ -234,6 +236,7 @@ MAN= accept_filter.9 \
sema.9 \
sf_buf.9 \
sglist.9 \
+ shm_map.9 \
signal.9 \
sleep.9 \
sleepqueue.9 \
@@ -613,6 +616,16 @@ MLINKS+=EVENTHANDLER.9 EVENTHANDLER_DECLARE.9 \
EVENTHANDLER.9 eventhandler_prune_list.9 \
EVENTHANDLER.9 EVENTHANDLER_REGISTER.9 \
EVENTHANDLER.9 eventhandler_register.9
+MLINKS+=eventtimers.9 et_register.9 \
+ eventtimers.9 et_deregister.9 \
+ eventtimers.9 et_ban.9 \
+ eventtimers.9 et_find.9 \
+ eventtimers.9 et_free.9 \
+ eventtimers.9 et_init.9 \
+ eventtimers.9 ET_LOCK.9 \
+ eventtimers.9 ET_UNLOCK.9 \
+ eventtimers.9 et_start.9 \
+ eventtimers.9 et_stop.9
MLINKS+=fetch.9 fubyte.9 \
fetch.9 fuswintr.9 \
fetch.9 fuword.9 \
@@ -1023,8 +1036,12 @@ MLINKS+=rmlock.9 rm_destroy.9 \
rmlock.9 rm_wunlock.9
MLINKS+=rtalloc.9 rtalloc1.9 \
rtalloc.9 rtalloc_ign.9 \
+ rtalloc.9 RTFREE_LOCKED.9 \
rtalloc.9 RTFREE.9 \
- rtalloc.9 rtfree.9
+ rtalloc.9 rtfree.9 \
+ rtalloc.9 rtalloc1_fib.9 \
+ rtalloc.9 rtalloc_ign_fib.9 \
+ rtalloc.9 rtalloc_fib.9
MLINKS+=runqueue.9 choosethread.9 \
runqueue.9 procrunnable.9 \
runqueue.9 remrunqueue.9 \
@@ -1107,6 +1124,7 @@ MLINKS+=sglist.9 sglist_alloc.9 \
sglist.9 sglist_reset.9 \
sglist.9 sglist_slice.9 \
sglist.9 sglist_split.9
+MLINKS+=shm_map.9 shm_unmap.9
MLINKS+=signal.9 cursig.9 \
signal.9 execsigs.9 \
signal.9 issignal.9 \
@@ -1244,6 +1262,7 @@ MLINKS+=sysctl_ctx_init.9 sysctl_ctx_entry_add.9 \
sysctl_ctx_init.9 sysctl_ctx_free.9
MLINKS+=SYSINIT.9 SYSUNINIT.9
MLINKS+=taskqueue.9 TASK_INIT.9 \
+ taskqueue.9 TASK_INITIALIZER.9 \
taskqueue.9 taskqueue_cancel.9 \
taskqueue.9 taskqueue_create.9 \
taskqueue.9 taskqueue_create_fast.9 \
diff --git a/share/man/man9/devtoname.9 b/share/man/man9/devtoname.9
index f93e77b..0e6e0db 100644
--- a/share/man/man9/devtoname.9
+++ b/share/man/man9/devtoname.9
@@ -24,17 +24,17 @@
.\"
.\" $FreeBSD$
.\"
-.Dd September 25, 1999
+.Dd January 19, 2012
.Dt DEVTONAME 9
.Os
.Sh NAME
.Nm devtoname
-.Nd "converts dev_t data into a string indicating the device name"
+.Nd "converts character device into a string indicating the device name"
.Sh SYNOPSIS
.In sys/param.h
.In sys/conf.h
.Ft const char *
-.Fn devtoname "dev_t dev"
+.Fn devtoname "struct cdev *dev"
.Sh DESCRIPTION
The
.Fn devtoname
diff --git a/share/man/man9/eventtimers.9 b/share/man/man9/eventtimers.9
new file mode 100644
index 0000000..db530a9
--- /dev/null
+++ b/share/man/man9/eventtimers.9
@@ -0,0 +1,236 @@
+.\"
+.\" Copyright (c) 2011 Alexander Motin <mav@FreeBSD.org>
+.\" 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.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``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 DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 14, 2011
+.Dt EVENTTIMERS 9
+.Os
+.Sh NAME
+.Nm eventtimers
+.Nd kernel event timers subsystem
+.Sh SYNOPSIS
+.In sys/timeet.h
+.Bd -literal
+struct eventtimer;
+
+typedef int et_start_t(struct eventtimer *et,
+ struct bintime *first, struct bintime *period);
+typedef int et_stop_t(struct eventtimer *et);
+typedef void et_event_cb_t(struct eventtimer *et, void *arg);
+typedef int et_deregister_cb_t(struct eventtimer *et, void *arg);
+
+struct eventtimer {
+ SLIST_ENTRY(eventtimer) et_all;
+ char *et_name;
+ int et_flags;
+#define ET_FLAGS_PERIODIC 1
+#define ET_FLAGS_ONESHOT 2
+#define ET_FLAGS_PERCPU 4
+#define ET_FLAGS_C3STOP 8
+#define ET_FLAGS_POW2DIV 16
+ int et_quality;
+ int et_active;
+ u_int64_t et_frequency;
+ struct bintime et_min_period;
+ struct bintime et_max_period;
+ et_start_t *et_start;
+ et_stop_t *et_stop;
+ et_event_cb_t *et_event_cb;
+ et_deregister_cb_t *et_deregister_cb;
+ void *et_arg;
+ void *et_priv;
+ struct sysctl_oid *et_sysctl;
+};
+.Ed
+.Ft int
+.Fn et_register "struct eventtimer *et"
+.Ft int
+.Fn et_deregister "struct eventtimer *et"
+.Fn ET_LOCK
+.Fn ET_UNLOCK
+.Ft struct eventtimer *
+.Fn et_find "const char *name" "int check" "int want"
+.Ft int
+.Fn et_init "struct eventtimer *et" "et_event_cb_t *event" "et_deregister_cb_t *deregister" "void *arg"
+.Ft int
+.Fn et_start "struct eventtimer *et" "struct bintime *first" "struct bintime *period"
+.Ft int
+.Fn et_stop "struct eventtimer *et"
+.Ft int
+.Fn et_ban "struct eventtimer *et"
+.Ft int
+.Fn et_free "struct eventtimer *et"
+.Sh DESCRIPTION
+Event timers are responsible for generating interrupts at specified time
+or periodically, to run different time-based events.
+Subsystem consists of three main parts:
+.Bl -tag
+.It Drivers
+Manage hardware to generate requested time events.
+.It Consumers
+.Pa sys/kern/kern_clocksource.c
+uses event timers to supply kernel with
+.Fn hardclock ,
+.Fn statclock
+and
+.Fn profclock
+time events.
+.It Glue code
+.Pa sys/sys/timeet.h ,
+.Pa sys/kern/kern_et.c
+provide APIs for event timer drivers and consumers.
+.El
+.Sh DRIVER API
+Driver API is built around eventtimer structure.
+To register its functionality driver allocates that structure and calls
+.Fn et_register .
+Driver should fill following fields there:
+.Bl -tag
+.It Va et_name
+Unique name of the event timer for management purposes.
+.It Va et_flags
+Set of flags, describing timer capabilities:
+.Bl -tag -width "ET_FLAGS_PERIODIC" -compact
+.It ET_FLAGS_PERIODIC
+Periodic mode supported.
+.It ET_FLAGS_ONESHOT
+One-shot mode supported.
+.It ET_FLAGS_PERCPU
+Timer is per-CPU.
+.It ET_FLAGS_C3STOP
+Timer may stop in CPU sleep state.
+.It ET_FLAGS_POW2DIV
+Timer supports only 2^n divisors.
+.El
+.It Va et_quality
+Abstract value to certify whether this timecounter is better than the others.
+Higher value means better.
+.It Va et_frequency
+Timer oscillator's base frequency, if applicable and known.
+Used by consumers to predict set of possible frequencies that could be
+obtained by dividing it.
+Should be zero if not applicable or unknown.
+.It Va et_min_period , et_max_period
+Minimal and maximal reliably programmable time periods.
+.It Va et_start
+Driver's timer start function pointer.
+.It Va et_stop
+Driver's timer stop function pointer.
+.It Va et_priv
+Driver's private data storage.
+.El
+.Pp
+After the event timer functionality is registered, it is controlled via
+.Va et_start
+and
+.Va et_stop
+methods.
+.Va et_start
+method is called to start the specified event timer.
+The last two arguments are used to specify time when events should be
+generated.
+.Va first
+argument specifies time period before the first event generated.
+In periodic mode NULL value specifies that first period is equal to the
+.Va period
+argument value.
+.Va period
+argument specifies the time period between following events for the
+periodic mode.
+The NULL value there specifies the one-shot mode.
+At least one of these two arguments should be not NULL.
+When event time arrive, driver should call
+.Va et_event_cb
+callback function, passing
+.Va et_arg
+as the second argument.
+.Va et_stop
+method is called to stop the specified event timer.
+For the per-CPU event timers
+.Va et_start
+and
+.Va et_stop
+methods control timers associated with the current CPU.
+.Pp
+Driver may deregister its functionality by calling
+.Fn et_deregister .
+.Sh CONSUMER API
+.Fn et_find
+allows consumer to find available event timer, optionally matching specific
+name and/or capability flags.
+Consumer may read returned eventtimer structure, but should not modify it.
+When wanted event timer is found,
+.Fn et_init
+should be called for it, submitting
+.Va event
+and optionally
+.Va deregister
+callbacks functions, and the opaque argument
+.Va arg .
+That argument will be passed as argument to the callbacks.
+Event callback function will be called on scheduled time events.
+It is called from the hardware interrupt context, so no sleep is permitted
+there.
+Deregister callback function may be called to report consumer that the event
+timer functionality is no longer available.
+On this call, consumer should stop using event timer before the return.
+.Pp
+After the timer is found and initialized, it can be controlled via
+.Fn et_start
+and
+.Fn et_stop .
+The arguments are the same as described in driver API.
+Per-CPU event timers can be controlled only from specific CPUs.
+.Pp
+.Fn et_ban
+allows consumer to mark event timer as broken via clearing both one-shot and
+periodic capability flags, if it was somehow detected.
+.Fn et_free
+is the opposite to
+.Fn et_init .
+It releases the event timer for other consumers use.
+.Pp
+.Fn ET_LOCK
+and
+.Fn ET_UNLOCK
+macros should be used to manage
+.Xr mutex 9
+lock around
+.Fn et_find ,
+.Fn et_init
+and
+.Fn et_free
+calls to serialize access to the list of the registered event timers and the
+pointers returned by
+.Fn et_find .
+.Fn et_start
+and
+.Fn et_stop
+calls should be serialized in consumer's internal way to avoid concurrent
+timer hardware access.
+.Sh SEE ALSO
+.Xr eventtimers 4
+.Sh AUTHORS
+.An Alexander Motin Aq mav@FreeBSD.org
diff --git a/share/man/man9/memcchr.9 b/share/man/man9/memcchr.9
new file mode 100644
index 0000000..0be3b79
--- /dev/null
+++ b/share/man/man9/memcchr.9
@@ -0,0 +1,59 @@
+.\" Copyright (c) 2012 Ed Schouten <ed@FreeBSD.org>
+.\" 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.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 1, 2012
+.Dt MEMCCHR 9
+.Os
+.Sh NAME
+.Nm memcchr
+.Nd locate the complement of a byte in byte string
+.Sh SYNOPSIS
+.In sys/libkern.h
+.Ft void *
+.Fn memcchr "const void *b" "int c" "size_t len"
+.Sh DESCRIPTION
+The
+.Fn memcchr
+function locates the first occurrence of a byte unequal to
+.Fa c
+(converted to an
+.Vt "unsigned char" )
+in string
+.Fa b .
+.Sh RETURN VALUES
+The
+.Fn memcchr
+function returns a pointer to the byte located, or NULL if no such byte
+exists within
+.Fa len
+bytes.
+.Sh SEE ALSO
+.Xr memchr 3
+.Sh HISTORY
+The
+.Fn memcchr
+function first appeared in
+.Fx 10.0 .
diff --git a/share/man/man9/namei.9 b/share/man/man9/namei.9
index c941004..f643a3f 100644
--- a/share/man/man9/namei.9
+++ b/share/man/man9/namei.9
@@ -196,10 +196,6 @@ With this flag,
will follow the symbolic link if the last part
of the path supplied is a symbolic link (i.e., it will return a vnode
for whatever the link points at, instead for the link itself).
-.It Dv NOOBJ
-Do not call
-.Fn vfs_object_create
-for the returned vnode, even though it meets required criteria for VM support.
.It Dv NOFOLLOW
Do not follow symbolic links (pseudo).
This flag is not looked for by the actual code, which looks for
diff --git a/share/man/man9/physio.9 b/share/man/man9/physio.9
index 7d7174e..977c467 100644
--- a/share/man/man9/physio.9
+++ b/share/man/man9/physio.9
@@ -29,7 +29,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 8, 2004
+.Dd January 19, 2012
.Dt PHYSIO 9
.Os
.Sh NAME
@@ -41,7 +41,7 @@
.In sys/bio.h
.In sys/buf.h
.Ft int
-.Fn physio "dev_t dev" "struct uio *uio" "int ioflag"
+.Fn physio "struct cdev *dev" "struct uio *uio" "int ioflag"
.Sh DESCRIPTION
The
.Fn physio
diff --git a/share/man/man9/rtalloc.9 b/share/man/man9/rtalloc.9
index 31d5ebb..ab5379a 100644
--- a/share/man/man9/rtalloc.9
+++ b/share/man/man9/rtalloc.9
@@ -28,160 +28,163 @@
.\"
.\" $FreeBSD$
.\"
-.Dd December 11, 2008
+.Dd December 14, 2011
.Dt RTALLOC 9
.Os
.Sh NAME
-.Nm rtalloc ,
-.Nm rtalloc_ign ,
-.Nm rtalloc1 ,
-.Nm rtfree
+.Nm rtalloc1_fib ,
+.Nm rtalloc_ign_fib ,
+.Nm rtalloc_fib
.Nd look up a route in the kernel routing table
.Sh SYNOPSIS
.In sys/types.h
.In sys/socket.h
.In net/route.h
-.Ft void
-.Fn rtalloc "struct route *ro"
-.Ft void
-.Fn rtalloc_ign "struct route *ro" "u_long flags"
.Ft "struct rtentry *"
-.Fn rtalloc1 "struct sockaddr *sa" "int report" "u_long flags"
+.Fn rtalloc1_fib "struct sockaddr *dst" "int report" "u_long flags" "u_int fibnum"
.Ft void
-.Fn rtfree "struct rt_entry *rt"
+.Fn rtalloc_fib "struct route *ro" "u_int fibnum"
+.Ft void
+.Fn rtalloc_ign_fib "struct route *ro" "u_long flags" "u_int fibnum"
+.Fn RTFREE_LOCKED "struct rt_entry *rt"
.Fn RTFREE "struct rt_entry *rt"
.Fn RT_LOCK "struct rt_entry *rt"
.Fn RT_UNLOCK "struct rt_entry *rt"
.Fn RT_ADDREF "struct rt_entry *rt"
.Fn RT_REMREF "struct rt_entry *rt"
+.Ft void
+.Fn rtfree "struct rt_entry *rt"
+.Ft "struct rtentry *"
+.Fn rtalloc1 "struct sockaddr *dst" "int report" "u_long flags"
+.Ft void
+.Fn rtalloc "struct route *ro"
+.Ft void
+.Fn rtalloc_ign "struct route *ro" "u_long flags"
+.Pp
+.Cd options RADIX_MPATH
.Sh DESCRIPTION
The kernel uses a radix tree structure to manage routes for the
networking subsystem.
+If compiled with
+.Cd options RADIX_MPATH
+kernel may maintain several independent forwarding information databases (FIBs).
The
.Fn rtalloc
-family of routines is used by protocols to query this structure for a
+family of routines is used by protocols to query these structures for a
route corresponding to a particular end-node address, and to cause
certain protocol\- and interface-specific actions to take place.
-.\" XXX - -mdoc should contain a standard request for getting em and
-.\" en dashes.
.Pp
-.Dv RTF_PRCLONING
-flag is obsolete and thus ignored by facility.
-If the
-.Dv RTF_XRESOLVE
-flag is set, then the
-.Dv RTM_RESOLVE
-message is sent instead on the
-.Xr route 4
-socket interface, requesting that an external program resolve the
-address in question and modify the route appropriately.
+The
+.Fn rtalloc1_fib
+function is the most general form of
+.Fn rtalloc ,
+and all of the other forms are implemented as calls to it.
+It takes a
+.Fa "struct sockaddr *"
+directly as the
+.Fa dst
+argument.
+The second argument,
+.Fa report ,
+controls whether the routing sockets are notified when a lookup fails.
+The third argument,
+.Fa flags ,
+is a combination of
+the following values:
+.Bl -item -offset indent
+.It
+.Dv RTF_RNH_LOCKED
+indicates that the radix tree lock is already held
+.El
+.Pp
+The last argument
+.Fa fibnum
+specifies number of forwarding information database (FIB) on which
+the lookup should be performed.
+In case of success the
+.Fn rtalloc1_fib
+function returns a pointer to a locked
+.Vt "struct rtentry"
+with an additional reference.
.Pp
-The default interface is
-.Fn rtalloc .
-Its only argument is
+The
+.Fn rtalloc_fib
+is the most simple variant.
+Its main argument is
.Fa ro ,
a pointer to a
-.Dq Li "struct route" ,
+.Fa "struct route" ,
which is defined as follows:
.Bd -literal -offset indent
struct route {
- struct sockaddr ro_dst;
struct rtentry *ro_rt;
+ struct llentry *ro_lle;
+ struct sockaddr ro_dst;
};
.Ed
.Pp
Thus, this function can only be used for address families which are
smaller than the default
-.Dq Li "struct sockaddr" .
+.Ft "struct sockaddr" .
Before calling
-.Fn rtalloc
+.Fn rtalloc_fib
for the first time, callers should ensure that unused bits of the
structure are set to zero.
+The second argument
+.Fa fibnum
+is FIB number.
+In case of success of the
+.Fn rtalloc_fib
+the
+.Fa ro_rt
+points to a valid and unlocked
+.Xr rtentry 9 ,
+which has an additional reference put on it, freeing which is
+responsibility of the caller.
On subsequent calls,
-.Fn rtalloc
+.Fn rtalloc_fib
returns without performing a lookup if
.Fa ro->ro_rt
is non-null and the
.Dv RTF_UP
-flag is set in the route's
-.Li rt_flags
+flag is set in the rtentry's
+.Fa rt_flags
field.
.Pp
The
-.Fn rtalloc_ign
-interface can be used when the caller does not want to receive
-the returned
-.Fa rtentry
-locked.
-The
-.Fa ro
-argument is the same as
-.Fn rtalloc ,
-but there is additionally a
+.Fn rtalloc_ign_fib
+function is the same as the
+.Fn rtalloc_fib ,
+but there is additional
.Fa flags
-argument, which is now only used to pass
-.Dv RTF_RNH_LOCKED
-indicating that the radix tree lock is already held.
-Both
-.Fn rtalloc
-and
-.Fn rtalloc_ign
-functions return a pointer to an unlocked
-.Vt "struct rtentry" .
+argument, which is same as in
+.Fn rtalloc1_fib .
.Pp
The
-.Fn rtalloc1
-function is the most general form of
-.Fn rtalloc
-(and both of the other forms are implemented as calls to rtalloc1).
-It does not use the
-.Dq Li "struct route" ,
-and is therefore suitable for address families which require more
-space than is in a traditional
-.Dq Li "struct sockaddr" .
-Instead, it takes a
-.Dq Li "struct sockaddr *"
-directly as the
-.Fa sa
-argument.
-The second argument,
-.Fa report ,
-controls whether the lower layers are notified when a lookup fails.
-The third argument,
-.Fa flags ,
-is a set of flags to ignore, as in
-.Fn rtalloc_ign .
-The
-.Fn rtalloc1
-function returns a pointer to a locked
-.Vt "struct rtentry" .
-.Pp
-The
-.Fn rtfree
-function frees a locked route entry, e.g., a previously allocated by
-.Fn rtalloc1 .
+.Fn RTFREE_LOCKED
+macro is used to unref and possibly free a locked routing entry
+with one our reference, for example previously allocated by
+.Fn rtalloc1_fib .
.Pp
The
.Fn RTFREE
-macro is used to free unlocked route entries, previously allocated by
-.Fn rtalloc
+macro is used to unref and possibly free an unlocked route entries with
+one our reference, for example previously allocated by
+.Fn rtalloc_fib
or
-.Fn rtalloc_ign .
-The
-.Fn RTFREE
-macro decrements the reference count on the routing table entry (see below),
-and frees it if the reference count has reached zero.
+.Fn rtalloc_ign_fib .
.Pp
-The preferred usage is allocating a route using
-.Fn rtalloc
-or
-.Fn rtalloc_ign
-and freeing using
-.Fn RTFREE .
+Both
+.Fn RTFREE_LOCKED
+and
+.Fn RTFREE
+macros decrement the reference count on the routing table entry,
+and proceed with actual freeing if the reference count has reached zero.
.Pp
The
.Fn RT_LOCK
macro is used to lock a routing table entry.
+.Pp
The
.Fn RT_UNLOCK
macro is used to unlock a routing table entry.
@@ -189,20 +192,53 @@ macro is used to unlock a routing table entry.
The
.Fn RT_ADDREF
macro increments the reference count on a previously locked route entry.
+It should be used whenever a reference to an
+.Xr rtentry 9
+is going to be stored outside the routing table.
+.Pp
The
.Fn RT_REMREF
macro decrements the reference count on a previously locked route entry.
-.Sh RETURN VALUES
+Its usage is contrary to
+.Fn RT_ADDREF .
+.Pp
The
-.Fn rtalloc ,
-.Fn rtalloc_ign
-and
.Fn rtfree
-functions do not return a value.
+function does the actual free of the routing table entry, and shouldn't
+be called directly by facilities, that just perform routing table lookups.
+.Sh LEGACY INTERFACE
+Prior to introduction of multiple routing tables functions did not
+require the
+.Fa "u_int fibnum"
+argument.
+Legacy
+.Fn rtalloc1 ,
+.Fn rtalloc
+and
+.Fn rtalloc_ign
+functions are kept for compatibility, and are equivalent to
+calling new interface with
+.Fa fibnum
+argument equal to
+.Va 0 ,
+which implies default forwarding table.
+.Sh RETURN VALUES
The
-.Fn rtalloc1
-function returns a pointer to a routing-table entry if it succeeds,
+.Fn rtalloc1_fib
+function returns a pointer to a locked routing-table entry if it succeeds,
otherwise a null pointer.
+The
+.Fn rtalloc_fib
+and
+.Fn rtalloc_ign_fib
+functions do not return a value, but they fill in the
+.Fa *ro_rt
+member of the
+.Fa *ro
+argument with a pointer to an unlocked routing-table entry if they
+succeed, otherwise a null pointer.
+In a case of success all functions put a reference on the
+routing-table entry, freeing of which is responsibility of the caller.
Lack of a route should in most cases be
translated to the
.Xr errno 2
@@ -213,7 +249,7 @@ value
.Xr rtentry 9
.Sh HISTORY
The
-.Nm
+.Nm rtalloc
facility first appeared in
.Bx 4.2 ,
although with much different internals.
@@ -227,14 +263,11 @@ first appeared in
.Fx 2.0 .
Routing table locking was introduced in
.Fx 5.2 .
+Multiple routing tables were introduced in
+.Fx 8.0 .
.Sh AUTHORS
-This manual page was written by
-.An Garrett Wollman ,
-as were the changes to implement
-.Dv RTF_PRCLONING
-and the
-.Fn rtalloc_ign
-function and the
-.Fa flags
-argument to
-.Fn rtalloc1 .
+The original version of this manual page was written by
+.An -nosplit
+.An "Garrett Wollman" .
+It was significantly updated by
+.An "Gleb Smirnoff" .
diff --git a/share/man/man9/sbuf.9 b/share/man/man9/sbuf.9
index 4ee05f4..7336c42 100644
--- a/share/man/man9/sbuf.9
+++ b/share/man/man9/sbuf.9
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd December 9, 2011
+.Dd December 21, 2011
.Dt SBUF 9
.Os
.Sh NAME
@@ -495,8 +495,8 @@ TAILQ_FOREACH(foo, &foolist, list) {
sbuf_printf(sb, " Address: %s\en", foo->address);
sbuf_printf(sb, " Zip: %s\en", foo->zipcode);
}
-if (sbuf_finish(sb)) /* Check for any and all errors */
- err(1,"Could not generate message");
+if (sbuf_finish(sb) != 0) /* Check for any and all errors */
+ err(1, "Could not generate message");
transmit_msg(sbuf_data(sb), sbuf_len(sb));
sbuf_delete(sb);
.Ed
diff --git a/share/man/man9/shm_map.9 b/share/man/man9/shm_map.9
new file mode 100644
index 0000000..a711fb6
--- /dev/null
+++ b/share/man/man9/shm_map.9
@@ -0,0 +1,186 @@
+.\"
+.\" Copyright (c) 2011 Advanced Computing Technologies LLC
+.\" Written by: John H. Baldwin <jhb@FreeBSD.org>
+.\" 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.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 14, 2011
+.Dt SHM_MAP 9
+.Os
+.Sh NAME
+.Nm shm_map , shm_unmap
+.Nd "map shared memory objects into the kernel's address space"
+.Sh SYNOPSIS
+.In sys/types.h
+.In sys/mman.h
+.Ft int
+.Fn shm_map "struct file *fp" "size_t size" "off_t offset" "void **memp"
+.Ft int
+.Fn shm_unmap "struct file *fp" "void *mem" "size_t size"
+.Sh DESCRIPTION
+The
+.Fn shm_map
+and
+.Fn shm_unmap
+functions provide an API for mapping shared memory objects into the kernel.
+Shared memory objects are created by
+.Xr shm_open 2 .
+These objects can then be passed into the kernel via file descriptors.
+.Pp
+A shared memory object cannot be shrunk while it is mapped into the kernel.
+This is to avoid invalidating any pages that may be wired into the kernel's
+address space.
+Shared memory objects can still be grown while mapped into the kernel.
+.Pp
+To simplify the accounting needed to enforce the above requirement,
+callers of this API are required to unmap the entire region mapped by
+.Fn shm_map
+when calling
+.Fn shm_unmap .
+Unmapping only a portion of the region is not permitted.
+.Pp
+The
+.Fn shm_map
+function locates the shared memory object associated with the open file
+.Fa fp .
+It maps the region of that object described by
+.Fa offset
+and
+.Fa size
+into the kernel's address space.
+If it succeeds,
+.Fa *memp
+will be set to the start of the mapping.
+All pages for the range will be wired into memory upon successful return.
+.Pp
+The
+.Fn shm_unmap
+function unmaps a region previously mapped by
+.Fn shm_map .
+The
+.Fa mem
+argument should match the value previously returned in
+.Fa *memp ,
+and the
+.Fa size
+argument should match the value passed to
+.Fn shm_map .
+.Pp
+Note that
+.Fn shm_map
+will not hold an extra reference on the open file
+.Fa fp
+for the lifetime of the mapping.
+Instead,
+the calling code is required to do this if it wishes to use
+.Fn shm_unmap
+on the region in the future.
+.Sh RETURN VALUES
+The
+.Fn shm_map
+and
+.Fn shm_unmap
+functions return zero on success or an error on failure.
+.Sh EXAMPLES
+The following function accepts a file descriptor for a shared memory
+object.
+It maps the first sixteen kilobytes of the object into the kernel,
+performs some work on that address,
+and then unmaps the address before returning.
+.Bd -literal -offset indent
+int
+shm_example(int fd)
+{
+ struct file *fp;
+ void *mem;
+ int error;
+
+ error = fget(curthread, fd, CAP_MMAP, &fp);
+ if (error)
+ return (error);
+ error = shm_map(fp, 16384, 0, &mem);
+ if (error) {
+ fdrop(fp, curthread);
+ return (error);
+ }
+
+ /* Do something with 'mem'. */
+
+ error = shm_unmap(fp, mem, 16384);
+ fdrop(fp, curthread);
+ return (error);
+}
+.Ed
+.Sh ERRORS
+The
+.Fn shm_map
+function returns the following errors on failure:
+.Bl -tag -width Er
+.It Bq Er EINVAL
+The open file
+.Fa fp
+is not a shared memory object.
+.It Bq Er EINVAL
+The requested region described by
+.Fa offset
+and
+.Fa size
+extends beyond the end of the shared memory object.
+.It Bq Er ENOMEM
+Insufficient address space was available.
+.It Bq Er EACCES
+The shared memory object could not be mapped due to a protection error.
+.It Bq Er EINVAL
+The shared memory object could not be mapped due to some other VM error.
+.El
+.Pp
+The
+.Fn shm_unmap
+function returns the following errors on failure:
+.Bl -tag -width Er
+.It Bq Er EINVAL
+The open file
+.Fa fp
+is not a shared memory object.
+.It Bq Er EINVAL
+The address range described by
+.Fa mem
+and
+.Fa size
+is not a valid address range.
+.It Bq Er EINVAL
+The address range described by
+.Fa mem
+and
+.Fa size
+is not backed by the shared memory object associated with the open file
+.Fa fp ,
+or the address range does not cover the entire mapping of the object.
+.El
+.Sh SEE ALSO
+.Xr shm_open 2
+.Sh HISTORY
+This API was first introduced in
+.Fx 10.0 .
diff --git a/share/man/man9/taskqueue.9 b/share/man/man9/taskqueue.9
index 40d64af..056ee66 100644
--- a/share/man/man9/taskqueue.9
+++ b/share/man/man9/taskqueue.9
@@ -80,6 +80,7 @@ struct timeout_task;
.Ft void
.Fn taskqueue_run "struct taskqueue *queue"
.Fn TASK_INIT "struct task *task" "int priority" "task_fn_t func" "void *context"
+.Fn TASK_INITIALIZER "int priority" "task_fn_t func" "void *context"
.Fn TASKQUEUE_DECLARE "name"
.Fn TASKQUEUE_DEFINE "name" "taskqueue_enqueue_fn enqueue" "void *context" "init"
.Fn TASKQUEUE_FAST_DEFINE "name" "taskqueue_enqueue_fn enqueue" "void *context" "init"
@@ -243,9 +244,14 @@ A convenience macro,
is provided to initialise a
.Va task
structure.
+The
+.Fn TASK_INITIALIZER
+macro generates an initializer for a task structure.
A macro
.Fn TIMEOUT_TASK_INIT "queue" "timeout_task" "priority" "func" "context"
-initializes the timeout_task structure.
+initializes the
+.Va timeout_task
+structure.
The values of
.Va priority ,
.Va func ,
diff --git a/share/man/man9/uio.9 b/share/man/man9/uio.9
index 9d569b7..fd66e3d 100644
--- a/share/man/man9/uio.9
+++ b/share/man/man9/uio.9
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 9, 2011
+.Dd January 19, 2012
.Dt UIO 9
.Os
.Sh NAME
@@ -154,7 +154,7 @@ static char buffer[BUFSIZE];
static int data_available; /* amount of data that can be read */
static int
-fooread(dev_t dev, struct uio *uio, int flag)
+fooread(struct cdev *dev, struct uio *uio, int flag)
{
int rv, amnt;
diff --git a/share/man/man9/vcount.9 b/share/man/man9/vcount.9
index 41263b9..186a350 100644
--- a/share/man/man9/vcount.9
+++ b/share/man/man9/vcount.9
@@ -32,7 +32,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd February 6, 2001
+.Dd January 19, 2012
.Dt VCOUNT 9
.Os
.Sh NAME
@@ -47,7 +47,7 @@
.Ft int
.Fn vcount "struct vnode *vp"
.Ft int
-.Fn count_dev "dev_t dev"
+.Fn count_dev "struct cdev *dev"
.Sh DESCRIPTION
.Fn vcount
is used to get the number of references to a particular device.
@@ -56,7 +56,7 @@ It allows for the fact that multiple vnodes may reference the same device.
does the same thing as
.Fn vcount ,
but takes a
-.Vt dev_t
+.Vt "struct cdev"
rather than a
.Vt "struct vnode"
pointer as an argument.
diff --git a/share/man/man9/vnode.9 b/share/man/man9/vnode.9
index cfc6f7d..eba208f 100644
--- a/share/man/man9/vnode.9
+++ b/share/man/man9/vnode.9
@@ -119,13 +119,13 @@ No type.
.It Dv VREG
A regular file; may be with or without VM object backing.
If you want to make sure this get a backing object, call
-.Xr vfs_object_create 9 .
+.Fn vnode_create_vobject .
.It Dv VDIR
A directory.
.It Dv VBLK
A block device; may be with or without VM object backing.
If you want to make sure this get a backing object, call
-.Xr vfs_object_create 9 .
+.Fn vnode_create_vobject .
.It Dv VCHR
A character device.
.It Dv VLNK
diff --git a/share/misc/bsd-family-tree b/share/misc/bsd-family-tree
index 822e5f2..162bca1 100644
--- a/share/misc/bsd-family-tree
+++ b/share/misc/bsd-family-tree
@@ -247,11 +247,14 @@ FreeBSD 5.2 | | | |
| FreeBSD FreeBSD | | | |
| 8.2 7.4 | | | DragonFly 2.10.1
| v | | OpenBSD 4.9 |
- | | | | |
- | | | | |
+ | Mac OS X | | |
+ | 10.7 | | |
| | | OpenBSD 5.0 |
+ +--FreeBSD | | | |
+ | 9.0 | | | |
+ | v | | | |
| | | | |
-FreeBSD 9 -current | NetBSD -current OpenBSD -current |
+FreeBSD 10 -current | NetBSD -current OpenBSD -current |
| | | | |
v v v v v
@@ -537,7 +540,9 @@ FreeBSD 7.4 2011-02-24 [FBD]
FreeBSD 8.2 2011-02-24 [FBD]
DragonFly 2.10.1 2011-04-26 [DFB]
OpenBSD 4.9 2011-05-01 [OBD]
+Mac OS X 10.7 2011-07-20 [APL]
OpenBSD 5.0 2011-11-01 [OBD]
+FreeBSD 9.0 2012-01-12 [FBD]
Bibliography
------------------------
@@ -595,7 +600,7 @@ original BSD announcements from Usenet or tapes.
Steven M. Schultz for providing 2.8BSD, 2.10BSD, 2.11BSD manual pages.
--
-Copyright (c) 1997-2007 Wolfram Schneider <wosch@FreeBSD.ORG>
+Copyright (c) 1997-2012 Wolfram Schneider <wosch@FreeBSD.ORG>
URL: http://cvsweb.freebsd.org/src/share/misc/bsd-family-tree
$FreeBSD$
diff --git a/share/misc/committers-ports.dot b/share/misc/committers-ports.dot
index 35587e2..a4e858c 100644
--- a/share/misc/committers-ports.dot
+++ b/share/misc/committers-ports.dot
@@ -99,6 +99,7 @@ ijliao [label="Ying-Chieh Liao\nijliao@FreeBSD.org\n2001/01/20"]
itetcu [label="Ion-Mihai Tetcu\nitetcu@FreeBSD.org\n2006/06/07"]
jacula [label="Giuseppe Pilichi\njacula@FreeBSD.org\n2010/04/05"]
jadawin [label="Philippe Audeoud\njadawin@FreeBSD.org\n2008/03/02"]
+jgh [label="Jason Helfman\njgh@FreeBSD.org\n2011/12/16"]
jkim [label="Jung-uk Kim\njkim@FreeBSD.org\n2007/09/12"]
jlaffaye [label="Julien Laffaye\njlaffaye@FreeBSD.org\n2011/06/06"]
jmelo [label="Jean Milanez Melo\njmelo@FreeBSD.org\n2006/03/31"]
@@ -234,6 +235,8 @@ clement -> lawrance
clsung -> lwhsu
clsung -> tabthorpe
+crees -> jgh
+
delphij -> nemoliu
delphij -> rafan
@@ -395,6 +398,7 @@ philip -> koitsu
rafan -> chinsan
rene -> crees
+rene -> jgh
sahil -> culot
sahil -> eadler
@@ -422,6 +426,7 @@ tabthorpe -> ashish
tabthorpe -> avilla
tabthorpe -> avl
tabthorpe -> bapt
+tabthorpe -> crees
tabthorpe -> dhn
tabthorpe -> fluffy
tabthorpe -> jacula
diff --git a/share/misc/committers-src.dot b/share/misc/committers-src.dot
index b58713b..c894455 100644
--- a/share/misc/committers-src.dot
+++ b/share/misc/committers-src.dot
@@ -101,6 +101,7 @@ antoine [label="Antoine Brodin\nantoine@FreeBSD.org\n2008/02/03"]
ariff [label="Ariff Abdullah\nariff@FreeBSD.org\n2005/11/14"]
art [label="Artem Belevich\nart@FreeBSD.org\n2011/03/29"]
avg [label="Andriy Gapon\navg@FreeBSD.org\n2009/02/18"]
+bapt [label="Baptiste Daroussin\nbapt@FreeBSD.org\n2011/12/23"]
benl [label="Ben Laurie\nbenl@FreeBSD.org\n2011/05/18"]
benno [label="Benno Rice\nbenno@FreeBSD.org\n2000/11/02"]
bms [label="Bruce M Simpson\nbms@FreeBSD.org\n2003/08/06"]
@@ -333,6 +334,7 @@ des -> hmp
des -> mike
des -> olli
des -> ru
+des -> bapt
dds -> versus
diff --git a/share/mk/bsd.crunchgen.mk b/share/mk/bsd.crunchgen.mk
index 5ebfd94..540c6d2 100644
--- a/share/mk/bsd.crunchgen.mk
+++ b/share/mk/bsd.crunchgen.mk
@@ -22,6 +22,8 @@
# Specific links can be suppressed by setting
# CRUNCH_SUPPRESS_LINK_$(NAME) to 1.
#
+# If CRUNCH_GENERATE_LINKS is set to no, no links will be generated.
+#
# $FreeBSD$
@@ -39,6 +41,7 @@ CANONICALOBJDIR:= ${MAKEOBJDIRPREFIX}${.CURDIR}
.else
CANONICALOBJDIR:= /usr/obj${.CURDIR}
.endif
+CRUNCH_GENERATE_LINKS?= yes
CLEANFILES+= $(CONF) *.o *.lo *.c *.mk *.cache *.a *.h
@@ -51,6 +54,7 @@ $(OUTPUTS): $(CRUNCH_SRCDIR_${P})/Makefile
.else
$(OUTPUTS): $(.CURDIR)/../../$(D)/$(P)/Makefile
.endif
+.if ${CRUNCH_GENERATE_LINKS} == "yes"
.ifndef CRUNCH_SUPPRESS_LINK_${P}
LINKS+= $(BINDIR)/$(PROG) $(BINDIR)/$(P)
.endif
@@ -59,6 +63,7 @@ LINKS+= $(BINDIR)/$(PROG) $(BINDIR)/$(P)
LINKS+= $(BINDIR)/$(PROG) $(BINDIR)/$(A)
.endif
.endfor
+.endif
.endfor
.endfor
diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk
index 9a51608..d3183c4 100644
--- a/share/mk/bsd.own.mk
+++ b/share/mk/bsd.own.mk
@@ -322,6 +322,7 @@ __DEFAULT_YES_OPTIONS = \
BSNMP \
BZIP2 \
CALENDAR \
+ CAPSICUM \
CDDL \
CPP \
CRYPT \
diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk
index 796d169..7a72ca6 100644
--- a/share/mk/bsd.sys.mk
+++ b/share/mk/bsd.sys.mk
@@ -57,6 +57,24 @@ CWARNFLAGS += -Wchar-subscripts -Winline -Wnested-externs\
CWARNFLAGS += -Wno-uninitialized
. endif
CWARNFLAGS += -Wno-pointer-sign
+# Clang has more warnings enabled by default, and when using -Wall, so if WARNS
+# is set to low values, these have to be disabled explicitly.
+. if ${CC:T:Mclang} == "clang"
+. if ${WARNS} <= 3
+CWARNFLAGS += -Wno-tautological-compare -Wno-unused-value\
+ -Wno-parentheses-equality -Wno-unused-function\
+ -Wno-conversion
+. endif
+. if ${WARNS} <= 2
+CWARNFLAGS += -Wno-switch-enum -Wno-empty-body
+. endif
+. if ${WARNS} <= 1
+CWARNFLAGS += -Wno-parentheses
+. endif
+. if defined(NO_WARRAY_BOUNDS)
+CWARNFLAGS += -Wno-array-bounds
+. endif
+. endif
. endif
. if defined(FORMAT_AUDIT)
diff --git a/share/termcap/termcap.src b/share/termcap/termcap.src
index 90e889b..a5117a8 100644
--- a/share/termcap/termcap.src
+++ b/share/termcap/termcap.src
@@ -4409,11 +4409,11 @@ yterm10|yterm 1.0 UCB ascii.kbd:\
:ku=^K:kd=^J:kl=^H:kr=^L:kh=^^:ma=^Hh\012j^Kk^Ll^^H:\
:k0=\E0:k1=\E1:k2=\E2:k3=\E3:k4=\E4:k5=\E5:k6=\E6:k7=\E7:k8=\E8:k9=\E9:\
:vs=^O\E[7i\E[m\E[?7h\E[?3g\r\EHY0 \EH \EH \EH \EH \EH \EH \EH \EH \EH\r:
-# YTERM varient version 1.1. (gts 9-13-84) Version 1.1 has :xn:.
+# YTERM variant version 1.1. (gts 9-13-84) Version 1.1 has :xn:.
yterm11|yterm 1.1 UCB ascii.kbd:\
:xn:is=^O\E[7i\E[m\E[?7h\E[?3g\r\EHY1 for \EHYTERM 1.\EH1 with A\EHSCII.KBD\EH 9-13-84\EH \EH \EH \EH \EH\n:\
:tc=yterm10:
-# YTERM 1.0 varient no autowrap or tabs
+# YTERM 1.0 variant no autowrap or tabs
# X does not remember autowrap or tabs when T is deleted and restarted.
yterm10nat|yterm 1.0 UCB ascii.kbd no autowrap or tabs:\
:am@:pt@:vs=^O\E[7i\E[m\E[?7l\E[?3g\rY2\r:\
@@ -4475,7 +4475,7 @@ h19k|h19kermit|heathkit emulation provided by Kermit (no auto margin):\
:am@:ta@:pt@:xt:da:db:tc=h19-u:
# Amiga termcap by Kent Polk, kent@swrinde.nde.swri.edu (30 May 90)
# Added a few more entries, converted caret-type control sequence (^x) entries
-# to '\0xx' entries since a couple of people mentioned loosing '^x' sequences.
+# to '\0xx' entries since a couple of people mentioned losing '^x' sequences.
#
# :as, :ae Support for alternate character sets.
# :ve=\E[\040p:vi=\E[\060\040p cursor visible/invisible.
diff --git a/sys/Makefile b/sys/Makefile
index 969994f..a1a67ca 100644
--- a/sys/Makefile
+++ b/sys/Makefile
@@ -13,10 +13,18 @@ CSCOPEDIRS= boot bsm cam cddl compat conf contrib crypto ddb dev fs gdb \
netgraph netinet netinet6 netipsec netipx netnatm netncp \
netsmb nfs nfsclient nfsserver nlm opencrypto \
pci rpc security sys ufs vm xdr xen ${CSCOPE_ARCHDIR}
+.if !defined(CSCOPE_ARCHDIR)
.if defined(ALL_ARCH)
-CSCOPE_ARCHDIR ?= amd64 arm i386 ia64 mips pc98 powerpc sparc64 x86
+CSCOPE_ARCHDIR = amd64 arm i386 ia64 mips pc98 powerpc sparc64 x86
.else
-CSCOPE_ARCHDIR ?= ${MACHINE}
+CSCOPE_ARCHDIR = ${MACHINE}
+.if ${MACHINE} != ${MACHINE_CPUARCH}
+CSCOPE_ARCHDIR += ${MACHINE_CPUARCH}
+.endif
+.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
+CSCOPE_ARCHDIR += x86
+.endif
+.endif
.endif
# Loadable kernel modules
diff --git a/sys/amd64/acpica/acpi_switch.S b/sys/amd64/acpica/acpi_switch.S
index 45bad1f..6091e2a 100644
--- a/sys/amd64/acpica/acpi_switch.S
+++ b/sys/amd64/acpica/acpi_switch.S
@@ -146,11 +146,22 @@ ENTRY(acpi_restorecpu)
/* Restore FPU state. */
fninit
- fxrstor PCB_USERFPU(%rdi)
+ movq WAKEUP_CTX(fpusave),%rdi
+ cmpl $0,use_xsave
+ jne 1f
+ fxrstor (%rdi)
+ jmp 2f
+1: movl xsave_mask,%eax
+ movl xsave_mask+4,%edx
+/* xrstor (%rdi) */
+ .byte 0x0f,0xae,0x2f
+2:
/* Reload CR0. */
movq %rcx, %cr0
+ movq WAKEUP_CTX(pcb),%rdi
+
/* Restore return address. */
movq PCB_RIP(%rdi), %rax
movq %rax, (%rsp)
diff --git a/sys/amd64/acpica/acpi_wakecode.S b/sys/amd64/acpica/acpi_wakecode.S
index 49d14f5..6e44e6c5 100644
--- a/sys/amd64/acpica/acpi_wakecode.S
+++ b/sys/amd64/acpica/acpi_wakecode.S
@@ -270,6 +270,8 @@ wakeup_pcb:
wakeup_gdt:
.word 0
.quad 0
+wakeup_fpusave:
+ .quad 0
ALIGN_DATA
wakeup_efer:
diff --git a/sys/amd64/acpica/acpi_wakeup.c b/sys/amd64/acpica/acpi_wakeup.c
index 43aeec3..f862435 100644
--- a/sys/amd64/acpica/acpi_wakeup.c
+++ b/sys/amd64/acpica/acpi_wakeup.c
@@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$");
#include <machine/pcb.h>
#include <machine/pmap.h>
#include <machine/specialreg.h>
+#include <machine/md_var.h>
#ifdef SMP
#include <x86/apicreg.h>
@@ -67,8 +68,10 @@ extern int acpi_reset_video;
#ifdef SMP
extern struct pcb **susppcbs;
+extern void **suspfpusave;
#else
static struct pcb **susppcbs;
+static void **suspfpusave;
#endif
int acpi_restorecpu(vm_offset_t, struct pcb *);
@@ -105,6 +108,7 @@ acpi_wakeup_ap(struct acpi_softc *sc, int cpu)
int ms;
WAKECODE_FIXUP(wakeup_pcb, struct pcb *, susppcbs[cpu]);
+ WAKECODE_FIXUP(wakeup_fpusave, void *, suspfpusave[cpu]);
WAKECODE_FIXUP(wakeup_gdt, uint16_t, susppcbs[cpu]->pcb_gdt.rd_limit);
WAKECODE_FIXUP(wakeup_gdt + 2, uint64_t,
susppcbs[cpu]->pcb_gdt.rd_base);
@@ -244,6 +248,7 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state)
load_cr3(KPML4phys);
if (savectx(susppcbs[0])) {
+ ctx_fpusave(suspfpusave[0]);
#ifdef SMP
if (!CPU_EMPTY(&wakeup_cpus) &&
suspend_cpus(wakeup_cpus) == 0) {
@@ -256,6 +261,7 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state)
WAKECODE_FIXUP(reset_video, uint8_t, (acpi_reset_video != 0));
WAKECODE_FIXUP(wakeup_pcb, struct pcb *, susppcbs[0]);
+ WAKECODE_FIXUP(wakeup_fpusave, void *, suspfpusave[0]);
WAKECODE_FIXUP(wakeup_gdt, uint16_t,
susppcbs[0]->pcb_gdt.rd_limit);
WAKECODE_FIXUP(wakeup_gdt + 2, uint64_t,
@@ -333,8 +339,11 @@ acpi_alloc_wakeup_handler(void)
return (NULL);
}
susppcbs = malloc(mp_ncpus * sizeof(*susppcbs), M_DEVBUF, M_WAITOK);
- for (i = 0; i < mp_ncpus; i++)
+ suspfpusave = malloc(mp_ncpus * sizeof(void *), M_DEVBUF, M_WAITOK);
+ for (i = 0; i < mp_ncpus; i++) {
susppcbs[i] = malloc(sizeof(**susppcbs), M_DEVBUF, M_WAITOK);
+ suspfpusave[i] = alloc_fpusave(M_WAITOK);
+ }
return (wakeaddr);
}
diff --git a/sys/amd64/amd64/cpu_switch.S b/sys/amd64/amd64/cpu_switch.S
index efb01b1..bef4b75 100644
--- a/sys/amd64/amd64/cpu_switch.S
+++ b/sys/amd64/amd64/cpu_switch.S
@@ -112,16 +112,25 @@ done_store_dr:
/* have we used fp, and need a save? */
cmpq %rdi,PCPU(FPCURTHREAD)
- jne 1f
+ jne 3f
movq PCB_SAVEFPU(%r8),%r8
clts
+ cmpl $0,use_xsave
+ jne 1f
fxsave (%r8)
- smsw %ax
+ jmp 2f
+1: movq %rdx,%rcx
+ movl xsave_mask,%eax
+ movl xsave_mask+4,%edx
+/* xsave (%r8) */
+ .byte 0x41,0x0f,0xae,0x20
+ movq %rcx,%rdx
+2: smsw %ax
orb $CR0_TS,%al
lmsw %ax
xorl %eax,%eax
movq %rax,PCPU(FPCURTHREAD)
-1:
+3:
/* Save is done. Now fire up new thread. Leave old vmspace. */
movq TD_PCB(%rsi),%r8
@@ -354,10 +363,19 @@ ENTRY(savectx)
sldt PCB_LDT(%rdi)
str PCB_TR(%rdi)
- clts
- fxsave PCB_USERFPU(%rdi)
- movq %rsi,%cr0 /* The previous %cr0 is saved in %rsi. */
+2: movq %rsi,%cr0 /* The previous %cr0 is saved in %rsi. */
movl $1,%eax
ret
END(savectx)
+
+/*
+ * Wrapper around fpusave to care about TS0_CR.
+ */
+ENTRY(ctx_fpusave)
+ movq %cr0,%rsi
+ clts
+ call fpusave
+ movq %rsi,%cr0
+ ret
+END(ctx_fpusave)
diff --git a/sys/amd64/amd64/fpu.c b/sys/amd64/amd64/fpu.c
index 08e5e57..af1fc5e 100644
--- a/sys/amd64/amd64/fpu.c
+++ b/sys/amd64/amd64/fpu.c
@@ -96,19 +96,97 @@ void stop_emulating(void);
#define GET_FPU_CW(thread) ((thread)->td_pcb->pcb_save->sv_env.en_cw)
#define GET_FPU_SW(thread) ((thread)->td_pcb->pcb_save->sv_env.en_sw)
-typedef u_char bool_t;
+CTASSERT(sizeof(struct savefpu) == 512);
+CTASSERT(sizeof(struct xstate_hdr) == 64);
+CTASSERT(sizeof(struct savefpu_ymm) == 832);
+
+/*
+ * This requirement is to make it easier for asm code to calculate
+ * offset of the fpu save area from the pcb address. FPU save area
+ * must by 64-bytes aligned.
+ */
+CTASSERT(sizeof(struct pcb) % XSAVE_AREA_ALIGN == 0);
static void fpu_clean_state(void);
SYSCTL_INT(_hw, HW_FLOATINGPT, floatingpoint, CTLFLAG_RD,
NULL, 1, "Floating point instructions executed in hardware");
-static struct savefpu fpu_initialstate;
+int use_xsave; /* non-static for cpu_switch.S */
+uint64_t xsave_mask; /* the same */
+static struct savefpu *fpu_initialstate;
+
+void
+fpusave(void *addr)
+{
+
+ if (use_xsave)
+ xsave((char *)addr, xsave_mask);
+ else
+ fxsave((char *)addr);
+}
+
+static void
+fpurestore(void *addr)
+{
+
+ if (use_xsave)
+ xrstor((char *)addr, xsave_mask);
+ else
+ fxrstor((char *)addr);
+}
+
+/*
+ * Enable XSAVE if supported and allowed by user.
+ * Calculate the xsave_mask.
+ */
+static void
+fpuinit_bsp1(void)
+{
+ u_int cp[4];
+ uint64_t xsave_mask_user;
+
+ if ((cpu_feature2 & CPUID2_XSAVE) != 0) {
+ use_xsave = 1;
+ TUNABLE_INT_FETCH("hw.use_xsave", &use_xsave);
+ }
+ if (!use_xsave)
+ return;
+
+ cpuid_count(0xd, 0x0, cp);
+ xsave_mask = XFEATURE_ENABLED_X87 | XFEATURE_ENABLED_SSE;
+ if ((cp[0] & xsave_mask) != xsave_mask)
+ panic("CPU0 does not support X87 or SSE: %x", cp[0]);
+ xsave_mask = ((uint64_t)cp[3] << 32) | cp[0];
+ xsave_mask_user = xsave_mask;
+ TUNABLE_ULONG_FETCH("hw.xsave_mask", &xsave_mask_user);
+ xsave_mask_user |= XFEATURE_ENABLED_X87 | XFEATURE_ENABLED_SSE;
+ xsave_mask &= xsave_mask_user;
+}
/*
- * Initialize the floating point unit. On the boot CPU we generate a
- * clean state that is used to initialize the floating point unit when
- * it is first used by a process.
+ * Calculate the fpu save area size.
+ */
+static void
+fpuinit_bsp2(void)
+{
+ u_int cp[4];
+
+ if (use_xsave) {
+ cpuid_count(0xd, 0x0, cp);
+ cpu_max_ext_state_size = cp[1];
+
+ /*
+ * Reload the cpu_feature2, since we enabled OSXSAVE.
+ */
+ do_cpuid(1, cp);
+ cpu_feature2 = cp[2];
+ } else
+ cpu_max_ext_state_size = sizeof(struct savefpu);
+}
+
+/*
+ * Initialize the floating point unit.
*/
void
fpuinit(void)
@@ -117,6 +195,20 @@ fpuinit(void)
u_int mxcsr;
u_short control;
+ if (IS_BSP())
+ fpuinit_bsp1();
+
+ if (use_xsave) {
+ load_cr4(rcr4() | CR4_XSAVE);
+ xsetbv(XCR0, xsave_mask);
+ }
+
+ /*
+ * XCR0 shall be set up before CPU can report the save area size.
+ */
+ if (IS_BSP())
+ fpuinit_bsp2();
+
/*
* It is too early for critical_enter() to work on AP.
*/
@@ -127,20 +219,46 @@ fpuinit(void)
fldcw(control);
mxcsr = __INITIAL_MXCSR__;
ldmxcsr(mxcsr);
- if (PCPU_GET(cpuid) == 0) {
- fxsave(&fpu_initialstate);
- if (fpu_initialstate.sv_env.en_mxcsr_mask)
- cpu_mxcsr_mask = fpu_initialstate.sv_env.en_mxcsr_mask;
- else
- cpu_mxcsr_mask = 0xFFBF;
- bzero(fpu_initialstate.sv_fp, sizeof(fpu_initialstate.sv_fp));
- bzero(fpu_initialstate.sv_xmm, sizeof(fpu_initialstate.sv_xmm));
- }
start_emulating();
intr_restore(saveintr);
}
/*
+ * On the boot CPU we generate a clean state that is used to
+ * initialize the floating point unit when it is first used by a
+ * process.
+ */
+static void
+fpuinitstate(void *arg __unused)
+{
+ register_t saveintr;
+
+ fpu_initialstate = malloc(cpu_max_ext_state_size, M_DEVBUF,
+ M_WAITOK | M_ZERO);
+ saveintr = intr_disable();
+ stop_emulating();
+
+ fpusave(fpu_initialstate);
+ if (fpu_initialstate->sv_env.en_mxcsr_mask)
+ cpu_mxcsr_mask = fpu_initialstate->sv_env.en_mxcsr_mask;
+ else
+ cpu_mxcsr_mask = 0xFFBF;
+
+ /*
+ * The fninit instruction does not modify XMM registers. The
+ * fpusave call dumped the garbage contained in the registers
+ * after reset to the initial state saved. Clear XMM
+ * registers file image to make the startup program state and
+ * signal handler XMM register content predictable.
+ */
+ bzero(&fpu_initialstate->sv_xmm[0], sizeof(struct xmmacc));
+
+ start_emulating();
+ intr_restore(saveintr);
+}
+SYSINIT(fpuinitstate, SI_SUB_DRIVERS, SI_ORDER_ANY, fpuinitstate, NULL);
+
+/*
* Free coprocessor (if we have it).
*/
void
@@ -150,7 +268,7 @@ fpuexit(struct thread *td)
critical_enter();
if (curthread == PCPU_GET(fpcurthread)) {
stop_emulating();
- fxsave(PCPU_GET(curpcb)->pcb_save);
+ fpusave(PCPU_GET(curpcb)->pcb_save);
start_emulating();
PCPU_SET(fpcurthread, 0);
}
@@ -423,7 +541,7 @@ fpudna(void)
* the PCB doesn't contain a clean FPU state. Explicitly
* load an initial state.
*/
- fxrstor(&fpu_initialstate);
+ fpurestore(fpu_initialstate);
if (pcb->pcb_initial_fpucw != __INITIAL_FPUCW__)
fldcw(pcb->pcb_initial_fpucw);
if (PCB_USER_FPU(pcb))
@@ -432,7 +550,7 @@ fpudna(void)
else
set_pcb_flags(pcb, PCB_FPUINITDONE);
} else
- fxrstor(pcb->pcb_save);
+ fpurestore(pcb->pcb_save);
critical_exit();
}
@@ -461,15 +579,16 @@ fpugetregs(struct thread *td)
pcb = td->td_pcb;
if ((pcb->pcb_flags & PCB_USERFPUINITDONE) == 0) {
- bcopy(&fpu_initialstate, &pcb->pcb_user_save,
- sizeof(fpu_initialstate));
- pcb->pcb_user_save.sv_env.en_cw = pcb->pcb_initial_fpucw;
+ bcopy(fpu_initialstate, get_pcb_user_save_pcb(pcb),
+ cpu_max_ext_state_size);
+ get_pcb_user_save_pcb(pcb)->sv_env.en_cw =
+ pcb->pcb_initial_fpucw;
fpuuserinited(td);
return (_MC_FPOWNED_PCB);
}
critical_enter();
if (td == PCPU_GET(fpcurthread) && PCB_USER_FPU(pcb)) {
- fxsave(&pcb->pcb_user_save);
+ fpusave(get_pcb_user_save_pcb(pcb));
critical_exit();
return (_MC_FPOWNED_FPU);
} else {
@@ -491,25 +610,78 @@ fpuuserinited(struct thread *td)
set_pcb_flags(pcb, PCB_FPUINITDONE);
}
+int
+fpusetxstate(struct thread *td, char *xfpustate, size_t xfpustate_size)
+{
+ struct xstate_hdr *hdr, *ehdr;
+ size_t len, max_len;
+ uint64_t bv;
+
+ /* XXXKIB should we clear all extended state in xstate_bv instead ? */
+ if (xfpustate == NULL)
+ return (0);
+ if (!use_xsave)
+ return (EOPNOTSUPP);
+
+ len = xfpustate_size;
+ if (len < sizeof(struct xstate_hdr))
+ return (EINVAL);
+ max_len = cpu_max_ext_state_size - sizeof(struct savefpu);
+ if (len > max_len)
+ return (EINVAL);
+
+ ehdr = (struct xstate_hdr *)xfpustate;
+ bv = ehdr->xstate_bv;
+
+ /*
+ * Avoid #gp.
+ */
+ if (bv & ~xsave_mask)
+ return (EINVAL);
+ if ((bv & (XFEATURE_ENABLED_X87 | XFEATURE_ENABLED_SSE)) !=
+ (XFEATURE_ENABLED_X87 | XFEATURE_ENABLED_SSE))
+ return (EINVAL);
+
+ hdr = (struct xstate_hdr *)(get_pcb_user_save_td(td) + 1);
+
+ hdr->xstate_bv = bv;
+ bcopy(xfpustate + sizeof(struct xstate_hdr),
+ (char *)(hdr + 1), len - sizeof(struct xstate_hdr));
+
+ return (0);
+}
+
/*
* Set the state of the FPU.
*/
-void
-fpusetregs(struct thread *td, struct savefpu *addr)
+int
+fpusetregs(struct thread *td, struct savefpu *addr, char *xfpustate,
+ size_t xfpustate_size)
{
struct pcb *pcb;
+ int error;
pcb = td->td_pcb;
critical_enter();
if (td == PCPU_GET(fpcurthread) && PCB_USER_FPU(pcb)) {
- fxrstor(addr);
+ error = fpusetxstate(td, xfpustate, xfpustate_size);
+ if (error != 0) {
+ critical_exit();
+ return (error);
+ }
+ bcopy(addr, get_pcb_user_save_td(td), sizeof(*addr));
+ fpurestore(get_pcb_user_save_td(td));
critical_exit();
set_pcb_flags(pcb, PCB_FPUINITDONE | PCB_USERFPUINITDONE);
} else {
critical_exit();
- bcopy(addr, &td->td_pcb->pcb_user_save, sizeof(*addr));
+ error = fpusetxstate(td, xfpustate, xfpustate_size);
+ if (error != 0)
+ return (error);
+ bcopy(addr, get_pcb_user_save_td(td), sizeof(*addr));
fpuuserinited(td);
}
+ return (0);
}
/*
@@ -599,20 +771,62 @@ static devclass_t fpupnp_devclass;
DRIVER_MODULE(fpupnp, acpi, fpupnp_driver, fpupnp_devclass, 0, 0);
#endif /* DEV_ISA */
+static MALLOC_DEFINE(M_FPUKERN_CTX, "fpukern_ctx",
+ "Kernel contexts for FPU state");
+
+#define FPU_KERN_CTX_FPUINITDONE 0x01
+
+struct fpu_kern_ctx {
+ struct savefpu *prev;
+ uint32_t flags;
+ char hwstate1[];
+};
+
+struct fpu_kern_ctx *
+fpu_kern_alloc_ctx(u_int flags)
+{
+ struct fpu_kern_ctx *res;
+ size_t sz;
+
+ sz = sizeof(struct fpu_kern_ctx) + XSAVE_AREA_ALIGN +
+ cpu_max_ext_state_size;
+ res = malloc(sz, M_FPUKERN_CTX, ((flags & FPU_KERN_NOWAIT) ?
+ M_NOWAIT : M_WAITOK) | M_ZERO);
+ return (res);
+}
+
+void
+fpu_kern_free_ctx(struct fpu_kern_ctx *ctx)
+{
+
+ /* XXXKIB clear the memory ? */
+ free(ctx, M_FPUKERN_CTX);
+}
+
+static struct savefpu *
+fpu_kern_ctx_savefpu(struct fpu_kern_ctx *ctx)
+{
+ vm_offset_t p;
+
+ p = (vm_offset_t)&ctx->hwstate1;
+ p = roundup2(p, XSAVE_AREA_ALIGN);
+ return ((struct savefpu *)p);
+}
+
int
fpu_kern_enter(struct thread *td, struct fpu_kern_ctx *ctx, u_int flags)
{
struct pcb *pcb;
pcb = td->td_pcb;
- KASSERT(!PCB_USER_FPU(pcb) || pcb->pcb_save == &pcb->pcb_user_save,
- ("mangled pcb_save"));
+ KASSERT(!PCB_USER_FPU(pcb) || pcb->pcb_save ==
+ get_pcb_user_save_pcb(pcb), ("mangled pcb_save"));
ctx->flags = 0;
if ((pcb->pcb_flags & PCB_FPUINITDONE) != 0)
ctx->flags |= FPU_KERN_CTX_FPUINITDONE;
fpuexit(td);
ctx->prev = pcb->pcb_save;
- pcb->pcb_save = &ctx->hwstate;
+ pcb->pcb_save = fpu_kern_ctx_savefpu(ctx);
set_pcb_flags(pcb, PCB_KERNFPU);
clear_pcb_flags(pcb, PCB_FPUINITDONE);
return (0);
@@ -629,7 +843,7 @@ fpu_kern_leave(struct thread *td, struct fpu_kern_ctx *ctx)
fpudrop();
critical_exit();
pcb->pcb_save = ctx->prev;
- if (pcb->pcb_save == &pcb->pcb_user_save) {
+ if (pcb->pcb_save == get_pcb_user_save_pcb(pcb)) {
if ((pcb->pcb_flags & PCB_USERFPUINITDONE) != 0) {
set_pcb_flags(pcb, PCB_FPUINITDONE);
clear_pcb_flags(pcb, PCB_KERNFPU);
@@ -653,7 +867,8 @@ fpu_kern_thread(u_int flags)
pcb = PCPU_GET(curpcb);
KASSERT((curthread->td_pflags & TDP_KTHREAD) != 0,
("Only kthread may use fpu_kern_thread"));
- KASSERT(pcb->pcb_save == &pcb->pcb_user_save, ("mangled pcb_save"));
+ KASSERT(pcb->pcb_save == get_pcb_user_save_pcb(pcb),
+ ("mangled pcb_save"));
KASSERT(PCB_USER_FPU(pcb), ("recursive call"));
set_pcb_flags(pcb, PCB_KERNFPU);
diff --git a/sys/amd64/amd64/genassym.c b/sys/amd64/amd64/genassym.c
index d133223..3796aa8 100644
--- a/sys/amd64/amd64/genassym.c
+++ b/sys/amd64/amd64/genassym.c
@@ -156,7 +156,7 @@ ASSYM(PCB_GS32SD, offsetof(struct pcb, pcb_gs32sd));
ASSYM(PCB_TSSP, offsetof(struct pcb, pcb_tssp));
ASSYM(PCB_SAVEFPU, offsetof(struct pcb, pcb_save));
ASSYM(PCB_SAVEFPU_SIZE, sizeof(struct savefpu));
-ASSYM(PCB_USERFPU, offsetof(struct pcb, pcb_user_save));
+ASSYM(PCB_USERFPU, sizeof(struct pcb));
ASSYM(PCB_SIZE, sizeof(struct pcb));
ASSYM(PCB_FULL_IRET, PCB_FULL_IRET);
ASSYM(PCB_DBREGS, PCB_DBREGS);
diff --git a/sys/amd64/amd64/initcpu.c b/sys/amd64/amd64/initcpu.c
index 5a832a6..02588af 100644
--- a/sys/amd64/amd64/initcpu.c
+++ b/sys/amd64/amd64/initcpu.c
@@ -72,6 +72,7 @@ u_int cpu_vendor_id; /* CPU vendor ID */
u_int cpu_fxsr; /* SSE enabled */
u_int cpu_mxcsr_mask; /* Valid bits in mxcsr */
u_int cpu_clflush_line_size = 32;
+u_int cpu_max_ext_state_size;
SYSCTL_UINT(_hw, OID_AUTO, via_feature_rng, CTLFLAG_RD,
&via_feature_rng, 0, "VIA RNG feature available in CPU");
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index fab3111..bc14745 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -154,8 +154,10 @@ extern void panicifcpuunsupported(void);
#define EFL_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0)
static void cpu_startup(void *);
-static void get_fpcontext(struct thread *td, mcontext_t *mcp);
-static int set_fpcontext(struct thread *td, const mcontext_t *mcp);
+static void get_fpcontext(struct thread *td, mcontext_t *mcp,
+ char *xfpusave, size_t xfpusave_len);
+static int set_fpcontext(struct thread *td, const mcontext_t *mcp,
+ char *xfpustate, size_t xfpustate_len);
SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL);
/*
@@ -315,6 +317,8 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
struct sigacts *psp;
char *sp;
struct trapframe *regs;
+ char *xfpusave;
+ size_t xfpusave_len;
int sig;
int oonstack;
@@ -328,6 +332,14 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
regs = td->td_frame;
oonstack = sigonstack(regs->tf_rsp);
+ if (cpu_max_ext_state_size > sizeof(struct savefpu) && use_xsave) {
+ xfpusave_len = cpu_max_ext_state_size - sizeof(struct savefpu);
+ xfpusave = __builtin_alloca(xfpusave_len);
+ } else {
+ xfpusave_len = 0;
+ xfpusave = NULL;
+ }
+
/* Save user context. */
bzero(&sf, sizeof(sf));
sf.sf_uc.uc_sigmask = *mask;
@@ -337,7 +349,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
sf.sf_uc.uc_mcontext.mc_onstack = (oonstack) ? 1 : 0;
bcopy(regs, &sf.sf_uc.uc_mcontext.mc_rdi, sizeof(*regs));
sf.sf_uc.uc_mcontext.mc_len = sizeof(sf.sf_uc.uc_mcontext); /* magic */
- get_fpcontext(td, &sf.sf_uc.uc_mcontext);
+ get_fpcontext(td, &sf.sf_uc.uc_mcontext, xfpusave, xfpusave_len);
fpstate_drop(td);
sf.sf_uc.uc_mcontext.mc_fsbase = pcb->pcb_fsbase;
sf.sf_uc.uc_mcontext.mc_gsbase = pcb->pcb_gsbase;
@@ -348,13 +360,18 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
/* Allocate space for the signal handler context. */
if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack &&
SIGISMEMBER(psp->ps_sigonstack, sig)) {
- sp = td->td_sigstk.ss_sp +
- td->td_sigstk.ss_size - sizeof(struct sigframe);
+ sp = td->td_sigstk.ss_sp + td->td_sigstk.ss_size;
#if defined(COMPAT_43)
td->td_sigstk.ss_flags |= SS_ONSTACK;
#endif
} else
- sp = (char *)regs->tf_rsp - sizeof(struct sigframe) - 128;
+ sp = (char *)regs->tf_rsp - 128;
+ if (xfpusave != NULL) {
+ sp -= xfpusave_len;
+ sp = (char *)((unsigned long)sp & ~0x3Ful);
+ sf.sf_uc.uc_mcontext.mc_xfpustate = (register_t)sp;
+ }
+ sp -= sizeof(struct sigframe);
/* Align to 16 bytes. */
sfp = (struct sigframe *)((unsigned long)sp & ~0xFul);
@@ -387,7 +404,10 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
/*
* Copy the sigframe out to the user's stack.
*/
- if (copyout(&sf, sfp, sizeof(*sfp)) != 0) {
+ if (copyout(&sf, sfp, sizeof(*sfp)) != 0 ||
+ (xfpusave != NULL && copyout(xfpusave,
+ (void *)sf.sf_uc.uc_mcontext.mc_xfpustate, xfpusave_len)
+ != 0)) {
#ifdef DEBUG
printf("process %ld has trashed its stack\n", (long)p->p_pid);
#endif
@@ -432,6 +452,8 @@ sys_sigreturn(td, uap)
struct proc *p;
struct trapframe *regs;
ucontext_t *ucp;
+ char *xfpustate;
+ size_t xfpustate_len;
long rflags;
int cs, error, ret;
ksiginfo_t ksi;
@@ -490,7 +512,28 @@ sys_sigreturn(td, uap)
return (EINVAL);
}
- ret = set_fpcontext(td, &ucp->uc_mcontext);
+ if ((uc.uc_mcontext.mc_flags & _MC_HASFPXSTATE) != 0) {
+ xfpustate_len = uc.uc_mcontext.mc_xfpustate_len;
+ if (xfpustate_len > cpu_max_ext_state_size -
+ sizeof(struct savefpu)) {
+ uprintf("pid %d (%s): sigreturn xfpusave_len = 0x%zx\n",
+ p->p_pid, td->td_name, xfpustate_len);
+ return (EINVAL);
+ }
+ xfpustate = __builtin_alloca(xfpustate_len);
+ error = copyin((const void *)uc.uc_mcontext.mc_xfpustate,
+ xfpustate, xfpustate_len);
+ if (error != 0) {
+ uprintf(
+ "pid %d (%s): sigreturn copying xfpustate failed\n",
+ p->p_pid, td->td_name);
+ return (error);
+ }
+ } else {
+ xfpustate = NULL;
+ xfpustate_len = 0;
+ }
+ ret = set_fpcontext(td, &ucp->uc_mcontext, xfpustate, xfpustate_len);
if (ret != 0) {
uprintf("pid %d (%s): sigreturn set_fpcontext err %d\n",
p->p_pid, td->td_name, ret);
@@ -1401,10 +1444,13 @@ getmemsize(caddr_t kmdp, u_int64_t first)
Maxmem = atop(physmem_tunable);
/*
- * By default keep the memtest enabled. Use a general name so that
+ * By default enable the memory test on real hardware, and disable
+ * it if we appear to be running in a VM. This avoids touching all
+ * pages unnecessarily, which doesn't matter on real hardware but is
+ * bad for shared VM hosts. Use a general name so that
* one could eventually do more with the code than just disable it.
*/
- memtest = 1;
+ memtest = (vm_guest > VM_GUEST_NO) ? 0 : 1;
TUNABLE_ULONG_FETCH("hw.memtest.tests", &memtest);
/*
@@ -1589,6 +1635,7 @@ hammer_time(u_int64_t modulep, u_int64_t physfree)
int gsel_tss, x;
struct pcpu *pc;
struct nmi_pcpu *np;
+ struct xstate_hdr *xhdr;
u_int64_t msr;
char *env;
size_t kstack0_sz;
@@ -1598,7 +1645,6 @@ hammer_time(u_int64_t modulep, u_int64_t physfree)
kstack0_sz = thread0.td_kstack_pages * PAGE_SIZE;
bzero((void *)thread0.td_kstack, kstack0_sz);
physfree += kstack0_sz;
- thread0.td_pcb = (struct pcb *)(thread0.td_kstack + kstack0_sz) - 1;
/*
* This may be done better later if it gets more high level
@@ -1647,7 +1693,6 @@ hammer_time(u_int64_t modulep, u_int64_t physfree)
physfree += DPCPU_SIZE;
PCPU_SET(prvspace, pc);
PCPU_SET(curthread, &thread0);
- PCPU_SET(curpcb, thread0.td_pcb);
PCPU_SET(tssp, &common_tss[0]);
PCPU_SET(commontssp, &common_tss[0]);
PCPU_SET(tss, (struct system_segment_descriptor *)&gdt[GPROC0_SEL]);
@@ -1739,13 +1784,6 @@ hammer_time(u_int64_t modulep, u_int64_t physfree)
initializecpu(); /* Initialize CPU registers */
initializecpucache();
- /* make an initial tss so cpu can get interrupt stack on syscall! */
- common_tss[0].tss_rsp0 = thread0.td_kstack +
- kstack0_sz - sizeof(struct pcb);
- /* Ensure the stack is aligned to 16 bytes */
- common_tss[0].tss_rsp0 &= ~0xFul;
- PCPU_SET(rsp0, common_tss[0].tss_rsp0);
-
/* doublefault stack space, runs on ist1 */
common_tss[0].tss_ist1 = (long)&dblfault_stack[sizeof(dblfault_stack)];
@@ -1782,6 +1820,25 @@ hammer_time(u_int64_t modulep, u_int64_t physfree)
msgbufinit(msgbufp, msgbufsize);
fpuinit();
+ /*
+ * Set up thread0 pcb after fpuinit calculated pcb + fpu save
+ * area size. Zero out the extended state header in fpu save
+ * area.
+ */
+ thread0.td_pcb = get_pcb_td(&thread0);
+ bzero(get_pcb_user_save_td(&thread0), cpu_max_ext_state_size);
+ if (use_xsave) {
+ xhdr = (struct xstate_hdr *)(get_pcb_user_save_td(&thread0) +
+ 1);
+ xhdr->xstate_bv = xsave_mask;
+ }
+ /* make an initial tss so cpu can get interrupt stack on syscall! */
+ common_tss[0].tss_rsp0 = (vm_offset_t)thread0.td_pcb;
+ /* Ensure the stack is aligned to 16 bytes */
+ common_tss[0].tss_rsp0 &= ~0xFul;
+ PCPU_SET(rsp0, common_tss[0].tss_rsp0);
+ PCPU_SET(curpcb, thread0.td_pcb);
+
/* transfer to user mode */
_ucodesel = GSEL(GUCODE_SEL, SEL_UPL);
@@ -2051,7 +2108,7 @@ fill_fpregs(struct thread *td, struct fpreg *fpregs)
P_SHOULDSTOP(td->td_proc),
("not suspended thread %p", td));
fpugetregs(td);
- fill_fpregs_xmm(&td->td_pcb->pcb_user_save, fpregs);
+ fill_fpregs_xmm(get_pcb_user_save_td(td), fpregs);
return (0);
}
@@ -2060,7 +2117,7 @@ int
set_fpregs(struct thread *td, struct fpreg *fpregs)
{
- set_fpregs_xmm(fpregs, &td->td_pcb->pcb_user_save);
+ set_fpregs_xmm(fpregs, get_pcb_user_save_td(td));
fpuuserinited(td);
return (0);
}
@@ -2111,9 +2168,11 @@ get_mcontext(struct thread *td, mcontext_t *mcp, int flags)
mcp->mc_gs = tp->tf_gs;
mcp->mc_flags = tp->tf_flags;
mcp->mc_len = sizeof(*mcp);
- get_fpcontext(td, mcp);
+ get_fpcontext(td, mcp, NULL, 0);
mcp->mc_fsbase = pcb->pcb_fsbase;
mcp->mc_gsbase = pcb->pcb_gsbase;
+ mcp->mc_xfpustate = 0;
+ mcp->mc_xfpustate_len = 0;
bzero(mcp->mc_spare, sizeof(mcp->mc_spare));
return (0);
}
@@ -2129,6 +2188,7 @@ set_mcontext(struct thread *td, const mcontext_t *mcp)
{
struct pcb *pcb;
struct trapframe *tp;
+ char *xfpustate;
long rflags;
int ret;
@@ -2139,7 +2199,18 @@ set_mcontext(struct thread *td, const mcontext_t *mcp)
return (EINVAL);
rflags = (mcp->mc_rflags & PSL_USERCHANGE) |
(tp->tf_rflags & ~PSL_USERCHANGE);
- ret = set_fpcontext(td, mcp);
+ if (mcp->mc_flags & _MC_HASFPXSTATE) {
+ if (mcp->mc_xfpustate_len > cpu_max_ext_state_size -
+ sizeof(struct savefpu))
+ return (EINVAL);
+ xfpustate = __builtin_alloca(mcp->mc_xfpustate_len);
+ ret = copyin((void *)mcp->mc_xfpustate, xfpustate,
+ mcp->mc_xfpustate_len);
+ if (ret != 0)
+ return (ret);
+ } else
+ xfpustate = NULL;
+ ret = set_fpcontext(td, mcp, xfpustate, mcp->mc_xfpustate_len);
if (ret != 0)
return (ret);
tp->tf_r15 = mcp->mc_r15;
@@ -2177,35 +2248,51 @@ set_mcontext(struct thread *td, const mcontext_t *mcp)
}
static void
-get_fpcontext(struct thread *td, mcontext_t *mcp)
+get_fpcontext(struct thread *td, mcontext_t *mcp, char *xfpusave,
+ size_t xfpusave_len)
{
+ size_t max_len, len;
mcp->mc_ownedfp = fpugetregs(td);
- bcopy(&td->td_pcb->pcb_user_save, &mcp->mc_fpstate,
+ bcopy(get_pcb_user_save_td(td), &mcp->mc_fpstate,
sizeof(mcp->mc_fpstate));
mcp->mc_fpformat = fpuformat();
+ if (!use_xsave || xfpusave_len == 0)
+ return;
+ max_len = cpu_max_ext_state_size - sizeof(struct savefpu);
+ len = xfpusave_len;
+ if (len > max_len) {
+ len = max_len;
+ bzero(xfpusave + max_len, len - max_len);
+ }
+ mcp->mc_flags |= _MC_HASFPXSTATE;
+ mcp->mc_xfpustate_len = len;
+ bcopy(get_pcb_user_save_td(td) + 1, xfpusave, len);
}
static int
-set_fpcontext(struct thread *td, const mcontext_t *mcp)
+set_fpcontext(struct thread *td, const mcontext_t *mcp, char *xfpustate,
+ size_t xfpustate_len)
{
struct savefpu *fpstate;
+ int error;
if (mcp->mc_fpformat == _MC_FPFMT_NODEV)
return (0);
else if (mcp->mc_fpformat != _MC_FPFMT_XMM)
return (EINVAL);
- else if (mcp->mc_ownedfp == _MC_FPOWNED_NONE)
+ else if (mcp->mc_ownedfp == _MC_FPOWNED_NONE) {
/* We don't care what state is left in the FPU or PCB. */
fpstate_drop(td);
- else if (mcp->mc_ownedfp == _MC_FPOWNED_FPU ||
+ error = 0;
+ } else if (mcp->mc_ownedfp == _MC_FPOWNED_FPU ||
mcp->mc_ownedfp == _MC_FPOWNED_PCB) {
fpstate = (struct savefpu *)&mcp->mc_fpstate;
fpstate->sv_env.en_mxcsr &= cpu_mxcsr_mask;
- fpusetregs(td, fpstate);
+ error = fpusetregs(td, fpstate, xfpustate, xfpustate_len);
} else
return (EINVAL);
- return (0);
+ return (error);
}
void
diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c
index 50b52c8..da1812d 100644
--- a/sys/amd64/amd64/mp_machdep.c
+++ b/sys/amd64/amd64/mp_machdep.c
@@ -99,7 +99,8 @@ char *nmi_stack;
void *dpcpu;
struct pcb stoppcbs[MAXCPU];
-struct pcb **susppcbs = NULL;
+struct pcb **susppcbs;
+void **suspfpusave;
/* Variables needed for SMP tlb shootdown. */
vm_offset_t smp_tlb_addr1;
@@ -1422,6 +1423,7 @@ cpususpend_handler(void)
cr3 = rcr3();
if (savectx(susppcbs[cpu])) {
+ ctx_fpusave(suspfpusave[cpu]);
wbinvd();
CPU_SET_ATOMIC(cpu, &stopped_cpus);
} else {
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index f7c0d2d..4c7bd2f 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -1255,8 +1255,8 @@ retry:
if (pdep != NULL && (pde = *pdep)) {
if (pde & PG_PS) {
if ((pde & PG_RW) || (prot & VM_PROT_WRITE) == 0) {
- if (vm_page_pa_tryrelock(pmap, (pde & PG_PS_FRAME) |
- (va & PDRMASK), &pa))
+ if (vm_page_pa_tryrelock(pmap, (pde &
+ PG_PS_FRAME) | (va & PDRMASK), &pa))
goto retry;
m = PHYS_TO_VM_PAGE((pde & PG_PS_FRAME) |
(va & PDRMASK));
@@ -1266,7 +1266,8 @@ retry:
pte = *pmap_pde_to_pte(pdep, va);
if ((pte & PG_V) &&
((pte & PG_RW) || (prot & VM_PROT_WRITE) == 0)) {
- if (vm_page_pa_tryrelock(pmap, pte & PG_FRAME, &pa))
+ if (vm_page_pa_tryrelock(pmap, pte & PG_FRAME,
+ &pa))
goto retry;
m = PHYS_TO_VM_PAGE(pte & PG_FRAME);
vm_page_hold(m);
diff --git a/sys/amd64/amd64/ptrace_machdep.c b/sys/amd64/amd64/ptrace_machdep.c
new file mode 100644
index 0000000..8eea132
--- /dev/null
+++ b/sys/amd64/amd64/ptrace_machdep.c
@@ -0,0 +1,141 @@
+/*-
+ * Copyright (c) 2011 Konstantin Belousov <kib@FreeBSD.org>
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include "opt_compat.h"
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/malloc.h>
+#include <sys/proc.h>
+#include <sys/ptrace.h>
+#include <sys/sysent.h>
+#include <machine/md_var.h>
+#include <machine/pcb.h>
+
+static int
+cpu_ptrace_xstate(struct thread *td, int req, void *addr, int data)
+{
+ char *savefpu;
+ int error;
+
+ if (!use_xsave)
+ return (EOPNOTSUPP);
+
+ switch (req) {
+ case PT_GETXSTATE:
+ savefpu = (char *)(get_pcb_user_save_td(td) + 1);
+ error = copyout(savefpu, addr,
+ cpu_max_ext_state_size - sizeof(struct savefpu));
+ break;
+
+ case PT_SETXSTATE:
+ if (data > cpu_max_ext_state_size - sizeof(struct savefpu)) {
+ error = EINVAL;
+ break;
+ }
+ savefpu = malloc(data, M_TEMP, M_WAITOK);
+ error = copyin(addr, savefpu, data);
+ if (error == 0)
+ error = fpusetxstate(td, savefpu, data);
+ free(savefpu, M_TEMP);
+ break;
+
+ default:
+ error = EINVAL;
+ break;
+ }
+
+ return (error);
+}
+
+#ifdef COMPAT_FREEBSD32
+#define PT_I386_GETXMMREGS (PT_FIRSTMACH + 0)
+#define PT_I386_SETXMMREGS (PT_FIRSTMACH + 1)
+#define PT_I386_GETXSTATE (PT_FIRSTMACH + 2)
+#define PT_I386_SETXSTATE (PT_FIRSTMACH + 3)
+
+static int
+cpu32_ptrace(struct thread *td, int req, void *addr, int data)
+{
+ struct savefpu *fpstate;
+ int error;
+
+ switch (req) {
+ case PT_I386_GETXMMREGS:
+ error = copyout(get_pcb_user_save_td(td), addr,
+ sizeof(*fpstate));
+ break;
+
+ case PT_I386_SETXMMREGS:
+ fpstate = get_pcb_user_save_td(td);
+ error = copyin(addr, fpstate, sizeof(*fpstate));
+ fpstate->sv_env.en_mxcsr &= cpu_mxcsr_mask;
+ break;
+
+ case PT_I386_GETXSTATE:
+ error = cpu_ptrace_xstate(td, PT_GETXSTATE, addr, data);
+ break;
+
+ case PT_I386_SETXSTATE:
+ error = cpu_ptrace_xstate(td, PT_SETXSTATE, addr, data);
+ break;
+
+ default:
+ error = EINVAL;
+ break;
+ }
+
+ return (error);
+}
+#endif
+
+int
+cpu_ptrace(struct thread *td, int req, void *addr, int data)
+{
+ int error;
+
+#ifdef COMPAT_FREEBSD32
+ if (SV_CURPROC_FLAG(SV_ILP32))
+ return (cpu32_ptrace(td, req, addr, data));
+#endif
+
+ switch (req) {
+ case PT_GETXSTATE:
+ case PT_SETXSTATE:
+ error = cpu_ptrace_xstate(td, req, addr, data);
+ break;
+
+ default:
+ error = EINVAL;
+ break;
+ }
+
+ return (error);
+}
diff --git a/sys/amd64/amd64/sys_machdep.c b/sys/amd64/amd64/sys_machdep.c
index bcd7fa3..2f136ab 100644
--- a/sys/amd64/amd64/sys_machdep.c
+++ b/sys/amd64/amd64/sys_machdep.c
@@ -179,6 +179,8 @@ sysarch(td, uap)
uint32_t i386base;
uint64_t a64base;
struct i386_ioperm_args iargs;
+ struct i386_get_xfpustate i386xfpu;
+ struct amd64_get_xfpustate a64xfpu;
#ifdef CAPABILITY_MODE
/*
@@ -195,10 +197,12 @@ sysarch(td, uap)
case I386_SET_FSBASE:
case I386_GET_GSBASE:
case I386_SET_GSBASE:
+ case I386_GET_XFPUSTATE:
case AMD64_GET_FSBASE:
case AMD64_SET_FSBASE:
case AMD64_GET_GSBASE:
case AMD64_SET_GSBASE:
+ case AMD64_GET_XFPUSTATE:
break;
case I386_SET_IOPERM:
@@ -226,6 +230,18 @@ sysarch(td, uap)
sizeof(struct i386_ioperm_args))) != 0)
return (error);
break;
+ case I386_GET_XFPUSTATE:
+ if ((error = copyin(uap->parms, &i386xfpu,
+ sizeof(struct i386_get_xfpustate))) != 0)
+ return (error);
+ a64xfpu.addr = (void *)(uintptr_t)i386xfpu.addr;
+ a64xfpu.len = i386xfpu.len;
+ break;
+ case AMD64_GET_XFPUSTATE:
+ if ((error = copyin(uap->parms, &a64xfpu,
+ sizeof(struct amd64_get_xfpustate))) != 0)
+ return (error);
+ break;
default:
break;
}
@@ -296,6 +312,16 @@ sysarch(td, uap)
}
break;
+ case I386_GET_XFPUSTATE:
+ case AMD64_GET_XFPUSTATE:
+ if (a64xfpu.len > cpu_max_ext_state_size -
+ sizeof(struct savefpu))
+ return (EINVAL);
+ fpugetregs(td);
+ error = copyout((char *)(get_pcb_user_save_td(td) + 1),
+ a64xfpu.addr, a64xfpu.len);
+ return (error);
+
default:
error = EINVAL;
break;
diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c
index 16b9c1a..a2363db 100644
--- a/sys/amd64/amd64/trap.c
+++ b/sys/amd64/amd64/trap.c
@@ -934,7 +934,7 @@ amd64_syscall(struct thread *td, int traced)
KASSERT(PCB_USER_FPU(td->td_pcb),
("System call %s returing with kernel FPU ctx leaked",
syscallname(td->td_proc, sa.code)));
- KASSERT(td->td_pcb->pcb_save == &td->td_pcb->pcb_user_save,
+ KASSERT(td->td_pcb->pcb_save == get_pcb_user_save_td(td),
("System call %s returning with mangled pcb_save",
syscallname(td->td_proc, sa.code)));
diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c
index d05880f..acb2188 100644
--- a/sys/amd64/amd64/vm_machdep.c
+++ b/sys/amd64/amd64/vm_machdep.c
@@ -90,6 +90,51 @@ static u_int cpu_reset_proxyid;
static volatile u_int cpu_reset_proxy_active;
#endif
+struct savefpu *
+get_pcb_user_save_td(struct thread *td)
+{
+ vm_offset_t p;
+
+ p = td->td_kstack + td->td_kstack_pages * PAGE_SIZE -
+ cpu_max_ext_state_size;
+ KASSERT((p % 64) == 0, ("Unaligned pcb_user_save area"));
+ return ((struct savefpu *)p);
+}
+
+struct savefpu *
+get_pcb_user_save_pcb(struct pcb *pcb)
+{
+ vm_offset_t p;
+
+ p = (vm_offset_t)(pcb + 1);
+ return ((struct savefpu *)p);
+}
+
+struct pcb *
+get_pcb_td(struct thread *td)
+{
+ vm_offset_t p;
+
+ p = td->td_kstack + td->td_kstack_pages * PAGE_SIZE -
+ cpu_max_ext_state_size - sizeof(struct pcb);
+ return ((struct pcb *)p);
+}
+
+void *
+alloc_fpusave(int flags)
+{
+ struct pcb *res;
+ struct savefpu_ymm *sf;
+
+ res = malloc(cpu_max_ext_state_size, M_DEVBUF, flags);
+ if (use_xsave) {
+ sf = (struct savefpu_ymm *)res;
+ bzero(&sf->sv_xstate.sx_hd, sizeof(sf->sv_xstate.sx_hd));
+ sf->sv_xstate.sx_hd.xstate_bv = xsave_mask;
+ }
+ return (res);
+}
+
/*
* Finish a fork operation, with process p2 nearly set up.
* Copy and update the pcb, set up the stack so that the child
@@ -127,15 +172,16 @@ cpu_fork(td1, p2, td2, flags)
fpuexit(td1);
/* Point the pcb to the top of the stack */
- pcb2 = (struct pcb *)(td2->td_kstack +
- td2->td_kstack_pages * PAGE_SIZE) - 1;
+ pcb2 = get_pcb_td(td2);
td2->td_pcb = pcb2;
/* Copy td1's pcb */
bcopy(td1->td_pcb, pcb2, sizeof(*pcb2));
/* Properly initialize pcb_save */
- pcb2->pcb_save = &pcb2->pcb_user_save;
+ pcb2->pcb_save = get_pcb_user_save_pcb(pcb2);
+ bcopy(get_pcb_user_save_td(td1), get_pcb_user_save_pcb(pcb2),
+ cpu_max_ext_state_size);
/* Point mdproc and then copy over td1's contents */
mdp2 = &p2->p_md;
@@ -310,11 +356,17 @@ cpu_thread_swapout(struct thread *td)
void
cpu_thread_alloc(struct thread *td)
{
-
- td->td_pcb = (struct pcb *)(td->td_kstack +
- td->td_kstack_pages * PAGE_SIZE) - 1;
- td->td_frame = (struct trapframe *)td->td_pcb - 1;
- td->td_pcb->pcb_save = &td->td_pcb->pcb_user_save;
+ struct pcb *pcb;
+ struct xstate_hdr *xhdr;
+
+ td->td_pcb = pcb = get_pcb_td(td);
+ td->td_frame = (struct trapframe *)pcb - 1;
+ pcb->pcb_save = get_pcb_user_save_pcb(pcb);
+ if (use_xsave) {
+ xhdr = (struct xstate_hdr *)(pcb->pcb_save + 1);
+ bzero(xhdr, sizeof(*xhdr));
+ xhdr->xstate_bv = xsave_mask;
+ }
}
void
@@ -387,7 +439,9 @@ cpu_set_upcall(struct thread *td, struct thread *td0)
*/
bcopy(td0->td_pcb, pcb2, sizeof(*pcb2));
clear_pcb_flags(pcb2, PCB_FPUINITDONE | PCB_USERFPUINITDONE);
- pcb2->pcb_save = &pcb2->pcb_user_save;
+ pcb2->pcb_save = get_pcb_user_save_pcb(pcb2);
+ bcopy(get_pcb_user_save_td(td0), pcb2->pcb_save,
+ cpu_max_ext_state_size);
set_pcb_flags(pcb2, PCB_FULL_IRET);
/*
diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC
index 103f88b..8db8e27 100644
--- a/sys/amd64/conf/GENERIC
+++ b/sys/amd64/conf/GENERIC
@@ -60,6 +60,8 @@ options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed.
options KBD_INSTALL_CDEV # install a CDEV entry in /dev
options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4)
options AUDIT # Security event auditing
+options CAPABILITY_MODE # Capsicum capability mode
+options CAPABILITIES # Capsicum capabilities
options MAC # TrustedBSD MAC Framework
#options KDTRACE_FRAME # Ensure frames are compiled in
#options KDTRACE_HOOKS # Kernel DTrace hooks
@@ -130,7 +132,8 @@ device da # Direct Access (disks)
device sa # Sequential Access (tape etc)
device cd # CD
device pass # Passthrough device (direct ATA/SCSI access)
-device ses # SCSI Environmental Services (and SAF-TE)
+device ses # Enclosure Services (SES and SAF-TE)
+device ctl # CAM Target Layer
# RAID controllers interfaced to the SCSI subsystem
device amr # AMI MegaRAID
diff --git a/sys/amd64/conf/NOTES b/sys/amd64/conf/NOTES
index ebfc810..7c72055 100644
--- a/sys/amd64/conf/NOTES
+++ b/sys/amd64/conf/NOTES
@@ -388,6 +388,10 @@ device aac
device aacp # SCSI Passthrough interface (optional, CAM required)
#
+# Highpoint RocketRAID 27xx.
+device hpt27xx
+
+#
# Highpoint RocketRAID 182x.
device hptmv
@@ -460,9 +464,11 @@ device tpm
#
# ichwd: Intel ICH watchdog timer
# amdsbwd: AMD SB7xx watchdog timer
+# viawd: VIA south bridge watchdog timer
#
device ichwd
device amdsbwd
+device viawd
#
# Temperature sensors:
diff --git a/sys/amd64/ia32/ia32_reg.c b/sys/amd64/ia32/ia32_reg.c
index 279df9a..71eed5e 100644
--- a/sys/amd64/ia32/ia32_reg.c
+++ b/sys/amd64/ia32/ia32_reg.c
@@ -155,7 +155,7 @@ fill_fpregs32(struct thread *td, struct fpreg32 *regs)
sv_87 = (struct save87 *)regs;
penv_87 = &sv_87->sv_env;
fpugetregs(td);
- sv_fpu = &td->td_pcb->pcb_user_save;
+ sv_fpu = get_pcb_user_save_td(td);
penv_xmm = &sv_fpu->sv_env;
/* FPU control/status */
@@ -187,7 +187,7 @@ set_fpregs32(struct thread *td, struct fpreg32 *regs)
{
struct save87 *sv_87 = (struct save87 *)regs;
struct env87 *penv_87 = &sv_87->sv_env;
- struct savefpu *sv_fpu = &td->td_pcb->pcb_user_save;
+ struct savefpu *sv_fpu = get_pcb_user_save_td(td);
struct envxmm *penv_xmm = &sv_fpu->sv_env;
int i;
diff --git a/sys/amd64/ia32/ia32_signal.c b/sys/amd64/ia32/ia32_signal.c
index 2f41870..09ec7ab 100644
--- a/sys/amd64/ia32/ia32_signal.c
+++ b/sys/amd64/ia32/ia32_signal.c
@@ -71,6 +71,7 @@ __FBSDID("$FreeBSD$");
#include <compat/freebsd32/freebsd32_signal.h>
#include <compat/freebsd32/freebsd32_util.h>
#include <compat/freebsd32/freebsd32_proto.h>
+#include <compat/freebsd32/freebsd32.h>
#include <compat/ia32/ia32_signal.h>
#include <machine/psl.h>
#include <machine/segments.h>
@@ -83,15 +84,15 @@ __FBSDID("$FreeBSD$");
#ifdef COMPAT_FREEBSD4
static void freebsd4_ia32_sendsig(sig_t, ksiginfo_t *, sigset_t *);
#endif
-static void ia32_get_fpcontext(struct thread *td, struct ia32_mcontext *mcp);
-static int ia32_set_fpcontext(struct thread *td, const struct ia32_mcontext *mcp);
#define CS_SECURE(cs) (ISPL(cs) == SEL_UPL)
#define EFL_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0)
static void
-ia32_get_fpcontext(struct thread *td, struct ia32_mcontext *mcp)
+ia32_get_fpcontext(struct thread *td, struct ia32_mcontext *mcp,
+ char *xfpusave, size_t xfpusave_len)
{
+ size_t max_len, len;
/*
* XXX Format of 64bit and 32bit FXSAVE areas differs. FXSAVE
@@ -100,28 +101,43 @@ ia32_get_fpcontext(struct thread *td, struct ia32_mcontext *mcp)
* for now, it should be irrelevant for most applications.
*/
mcp->mc_ownedfp = fpugetregs(td);
- bcopy(&td->td_pcb->pcb_user_save, &mcp->mc_fpstate,
+ bcopy(get_pcb_user_save_td(td), &mcp->mc_fpstate,
sizeof(mcp->mc_fpstate));
mcp->mc_fpformat = fpuformat();
+ if (!use_xsave || xfpusave_len == 0)
+ return;
+ max_len = cpu_max_ext_state_size - sizeof(struct savefpu);
+ len = xfpusave_len;
+ if (len > max_len) {
+ len = max_len;
+ bzero(xfpusave + max_len, len - max_len);
+ }
+ mcp->mc_flags |= _MC_HASFPXSTATE;
+ mcp->mc_xfpustate_len = len;
+ bcopy(get_pcb_user_save_td(td) + 1, xfpusave, len);
}
static int
-ia32_set_fpcontext(struct thread *td, const struct ia32_mcontext *mcp)
+ia32_set_fpcontext(struct thread *td, const struct ia32_mcontext *mcp,
+ char *xfpustate, size_t xfpustate_len)
{
+ int error;
if (mcp->mc_fpformat == _MC_FPFMT_NODEV)
return (0);
else if (mcp->mc_fpformat != _MC_FPFMT_XMM)
return (EINVAL);
- else if (mcp->mc_ownedfp == _MC_FPOWNED_NONE)
+ else if (mcp->mc_ownedfp == _MC_FPOWNED_NONE) {
/* We don't care what state is left in the FPU or PCB. */
fpstate_drop(td);
- else if (mcp->mc_ownedfp == _MC_FPOWNED_FPU ||
+ error = 0;
+ } else if (mcp->mc_ownedfp == _MC_FPOWNED_FPU ||
mcp->mc_ownedfp == _MC_FPOWNED_PCB) {
- fpusetregs(td, (struct savefpu *)&mcp->mc_fpstate);
+ error = fpusetregs(td, (struct savefpu *)&mcp->mc_fpstate,
+ xfpustate, xfpustate_len);
} else
return (EINVAL);
- return (0);
+ return (error);
}
/*
@@ -164,10 +180,12 @@ ia32_get_mcontext(struct thread *td, struct ia32_mcontext *mcp, int flags)
mcp->mc_esp = tp->tf_rsp;
mcp->mc_ss = tp->tf_ss;
mcp->mc_len = sizeof(*mcp);
- ia32_get_fpcontext(td, mcp);
+ mcp->mc_flags = tp->tf_flags;
+ ia32_get_fpcontext(td, mcp, NULL, 0);
mcp->mc_fsbase = pcb->pcb_fsbase;
mcp->mc_gsbase = pcb->pcb_gsbase;
- bzero(mcp->mc_spare1, sizeof(mcp->mc_spare1));
+ mcp->mc_xfpustate = 0;
+ mcp->mc_xfpustate_len = 0;
bzero(mcp->mc_spare2, sizeof(mcp->mc_spare2));
set_pcb_flags(pcb, PCB_FULL_IRET);
return (0);
@@ -183,6 +201,7 @@ static int
ia32_set_mcontext(struct thread *td, const struct ia32_mcontext *mcp)
{
struct trapframe *tp;
+ char *xfpustate;
long rflags;
int ret;
@@ -191,7 +210,18 @@ ia32_set_mcontext(struct thread *td, const struct ia32_mcontext *mcp)
return (EINVAL);
rflags = (mcp->mc_eflags & PSL_USERCHANGE) |
(tp->tf_rflags & ~PSL_USERCHANGE);
- ret = ia32_set_fpcontext(td, mcp);
+ if (mcp->mc_flags & _MC_IA32_HASFPXSTATE) {
+ if (mcp->mc_xfpustate_len > cpu_max_ext_state_size -
+ sizeof(struct savefpu))
+ return (EINVAL);
+ xfpustate = __builtin_alloca(mcp->mc_xfpustate_len);
+ ret = copyin(PTRIN(mcp->mc_xfpustate), xfpustate,
+ mcp->mc_xfpustate_len);
+ if (ret != 0)
+ return (ret);
+ } else
+ xfpustate = NULL;
+ ret = ia32_set_fpcontext(td, mcp, xfpustate, mcp->mc_xfpustate_len);
if (ret != 0)
return (ret);
tp->tf_gs = mcp->mc_gs;
@@ -529,6 +559,8 @@ ia32_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
struct sigacts *psp;
char *sp;
struct trapframe *regs;
+ char *xfpusave;
+ size_t xfpusave_len;
int oonstack;
int sig;
@@ -554,6 +586,14 @@ ia32_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
regs = td->td_frame;
oonstack = sigonstack(regs->tf_rsp);
+ if (cpu_max_ext_state_size > sizeof(struct savefpu) && use_xsave) {
+ xfpusave_len = cpu_max_ext_state_size - sizeof(struct savefpu);
+ xfpusave = __builtin_alloca(xfpusave_len);
+ } else {
+ xfpusave_len = 0;
+ xfpusave = NULL;
+ }
+
/* Save user context. */
bzero(&sf, sizeof(sf));
sf.sf_uc.uc_sigmask = *mask;
@@ -582,7 +622,7 @@ ia32_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
sf.sf_uc.uc_mcontext.mc_fs = regs->tf_fs;
sf.sf_uc.uc_mcontext.mc_gs = regs->tf_gs;
sf.sf_uc.uc_mcontext.mc_len = sizeof(sf.sf_uc.uc_mcontext); /* magic */
- ia32_get_fpcontext(td, &sf.sf_uc.uc_mcontext);
+ ia32_get_fpcontext(td, &sf.sf_uc.uc_mcontext, xfpusave, xfpusave_len);
fpstate_drop(td);
sf.sf_uc.uc_mcontext.mc_fsbase = td->td_pcb->pcb_fsbase;
sf.sf_uc.uc_mcontext.mc_gsbase = td->td_pcb->pcb_gsbase;
@@ -590,11 +630,16 @@ ia32_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
/* Allocate space for the signal handler context. */
if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack &&
- SIGISMEMBER(psp->ps_sigonstack, sig)) {
- sp = td->td_sigstk.ss_sp +
- td->td_sigstk.ss_size - sizeof(sf);
- } else
- sp = (char *)regs->tf_rsp - sizeof(sf);
+ SIGISMEMBER(psp->ps_sigonstack, sig))
+ sp = td->td_sigstk.ss_sp + td->td_sigstk.ss_size;
+ else
+ sp = (char *)regs->tf_rsp;
+ if (xfpusave != NULL) {
+ sp -= xfpusave_len;
+ sp = (char *)((unsigned long)sp & ~0x3Ful);
+ sf.sf_uc.uc_mcontext.mc_xfpustate = (register_t)sp;
+ }
+ sp -= sizeof(sf);
/* Align to 16 bytes. */
sfp = (struct ia32_sigframe *)((uintptr_t)sp & ~0xF);
PROC_UNLOCK(p);
@@ -626,7 +671,10 @@ ia32_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
/*
* Copy the sigframe out to the user's stack.
*/
- if (copyout(&sf, sfp, sizeof(*sfp)) != 0) {
+ if (copyout(&sf, sfp, sizeof(*sfp)) != 0 ||
+ (xfpusave != NULL && copyout(xfpusave,
+ PTRIN(sf.sf_uc.uc_mcontext.mc_xfpustate), xfpusave_len)
+ != 0)) {
#ifdef DEBUG
printf("process %ld has trashed its stack\n", (long)p->p_pid);
#endif
@@ -812,6 +860,8 @@ freebsd32_sigreturn(td, uap)
struct ia32_ucontext uc;
struct trapframe *regs;
struct ia32_ucontext *ucp;
+ char *xfpustate;
+ size_t xfpustate_len;
int cs, eflags, error, ret;
ksiginfo_t ksi;
@@ -858,9 +908,34 @@ freebsd32_sigreturn(td, uap)
return (EINVAL);
}
- ret = ia32_set_fpcontext(td, &ucp->uc_mcontext);
- if (ret != 0)
+ if ((ucp->uc_mcontext.mc_flags & _MC_HASFPXSTATE) != 0) {
+ xfpustate_len = uc.uc_mcontext.mc_xfpustate_len;
+ if (xfpustate_len > cpu_max_ext_state_size -
+ sizeof(struct savefpu)) {
+ uprintf("pid %d (%s): sigreturn xfpusave_len = 0x%zx\n",
+ td->td_proc->p_pid, td->td_name, xfpustate_len);
+ return (EINVAL);
+ }
+ xfpustate = __builtin_alloca(xfpustate_len);
+ error = copyin(PTRIN(ucp->uc_mcontext.mc_xfpustate),
+ xfpustate, xfpustate_len);
+ if (error != 0) {
+ uprintf(
+ "pid %d (%s): sigreturn copying xfpustate failed\n",
+ td->td_proc->p_pid, td->td_name);
+ return (error);
+ }
+ } else {
+ xfpustate = NULL;
+ xfpustate_len = 0;
+ }
+ ret = ia32_set_fpcontext(td, &ucp->uc_mcontext, xfpustate,
+ xfpustate_len);
+ if (ret != 0) {
+ uprintf("pid %d (%s): sigreturn set_fpcontext err %d\n",
+ td->td_proc->p_pid, td->td_name, ret);
return (ret);
+ }
regs->tf_rdi = ucp->uc_mcontext.mc_edi;
regs->tf_rsi = ucp->uc_mcontext.mc_esi;
diff --git a/sys/amd64/include/_types.h b/sys/amd64/include/_types.h
index 13dc3ea..99db9b0 100644
--- a/sys/amd64/include/_types.h
+++ b/sys/amd64/include/_types.h
@@ -48,7 +48,7 @@
/*
* Basic types upon which most other types are built.
*/
-typedef __signed char __int8_t;
+typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef short __int16_t;
typedef unsigned short __uint16_t;
diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h
index c07e09b..d112e66 100644
--- a/sys/amd64/include/cpufunc.h
+++ b/sys/amd64/include/cpufunc.h
@@ -669,6 +669,41 @@ intr_restore(register_t rflags)
write_rflags(rflags);
}
+static __inline void
+xsave(char *addr, uint64_t mask)
+{
+ uint32_t low, hi;
+
+ low = mask;
+ hi = mask >> 32;
+ /* xsave (%rdi) */
+ __asm __volatile(".byte 0x0f,0xae,0x27" : :
+ "a" (low), "d" (hi), "D" (addr) : "memory");
+}
+
+static __inline void
+xsetbv(uint32_t reg, uint64_t val)
+{
+ uint32_t low, hi;
+
+ low = val;
+ hi = val >> 32;
+ __asm __volatile(".byte 0x0f,0x01,0xd1" : :
+ "c" (reg), "a" (low), "d" (hi));
+}
+
+static __inline void
+xrstor(char *addr, uint64_t mask)
+{
+ uint32_t low, hi;
+
+ low = mask;
+ hi = mask >> 32;
+ /* xrstor (%rdi) */
+ __asm __volatile(".byte 0x0f,0xae,0x2f" : :
+ "a" (low), "d" (hi), "D" (addr));
+}
+
#else /* !(__GNUCLIKE_ASM && __CC_SUPPORTS___INLINE) */
int breakpoint(void);
@@ -733,6 +768,9 @@ u_int rgs(void);
void wbinvd(void);
void write_rflags(u_int rf);
void wrmsr(u_int msr, uint64_t newval);
+void xsave(char *addr, uint64_t mask);
+void xsetbv(uint32_t reg, uint64_t val);
+void xrstor(char *addr, uint64_t mask);
#endif /* __GNUCLIKE_ASM && __CC_SUPPORTS___INLINE */
diff --git a/sys/amd64/include/float.h b/sys/amd64/include/float.h
index 8f0d713..00ed6e2 100644
--- a/sys/amd64/include/float.h
+++ b/sys/amd64/include/float.h
@@ -55,6 +55,11 @@ __END_DECLS
#define FLT_MAX_EXP 128 /* emax */
#define FLT_MAX 3.40282347E+38F /* (1-b**(-p))*b**emax */
#define FLT_MAX_10_EXP 38 /* floor(log10((1-b**(-p))*b**emax)) */
+#if __ISO_C_VISIBLE >= 2011
+#define FLT_TRUE_MIN 1.40129846E-45F /* b**(emin-p) */
+#define FLT_DECIMAL_DIG 9 /* ceil(1+p*log10(b)) */
+#define FLT_HAS_SUBNORM 1
+#endif /* __ISO_C_VISIBLE >= 2011 */
#define DBL_MANT_DIG 53
#define DBL_EPSILON 2.2204460492503131E-16
@@ -65,6 +70,11 @@ __END_DECLS
#define DBL_MAX_EXP 1024
#define DBL_MAX 1.7976931348623157E+308
#define DBL_MAX_10_EXP 308
+#if __ISO_C_VISIBLE >= 2011
+#define DBL_TRUE_MIN 4.9406564584124654E-324
+#define DBL_DECIMAL_DIG 17
+#define DBL_HAS_SUBNORM 1
+#endif /* __ISO_C_VISIBLE >= 2011 */
#define LDBL_MANT_DIG 64
#define LDBL_EPSILON 1.0842021724855044340E-19L
@@ -75,4 +85,10 @@ __END_DECLS
#define LDBL_MAX_EXP 16384
#define LDBL_MAX 1.1897314953572317650E+4932L
#define LDBL_MAX_10_EXP 4932
+#if __ISO_C_VISIBLE >= 2011
+#define LDBL_TRUE_MIN 3.6451995318824746025E-4951L
+#define LDBL_DECIMAL_DIG 21
+#define LDBL_HAS_SUBNORM 1
+#endif /* __ISO_C_VISIBLE >= 2011 */
+
#endif /* _MACHINE_FLOAT_H_ */
diff --git a/sys/amd64/include/fpu.h b/sys/amd64/include/fpu.h
index 50b3819..d208789 100644
--- a/sys/amd64/include/fpu.h
+++ b/sys/amd64/include/fpu.h
@@ -43,45 +43,71 @@
/* Contents of each x87 floating point accumulator */
struct fpacc87 {
- u_char fp_bytes[10];
+ uint8_t fp_bytes[10];
};
/* Contents of each SSE extended accumulator */
struct xmmacc {
- u_char xmm_bytes[16];
+ uint8_t xmm_bytes[16];
+};
+
+/* Contents of the upper 16 bytes of each AVX extended accumulator */
+struct ymmacc {
+ uint8_t ymm_bytes[16];
};
struct envxmm {
- u_int16_t en_cw; /* control word (16bits) */
- u_int16_t en_sw; /* status word (16bits) */
- u_int8_t en_tw; /* tag word (8bits) */
- u_int8_t en_zero;
- u_int16_t en_opcode; /* opcode last executed (11 bits ) */
- u_int64_t en_rip; /* floating point instruction pointer */
- u_int64_t en_rdp; /* floating operand pointer */
- u_int32_t en_mxcsr; /* SSE sontorol/status register */
- u_int32_t en_mxcsr_mask; /* valid bits in mxcsr */
+ uint16_t en_cw; /* control word (16bits) */
+ uint16_t en_sw; /* status word (16bits) */
+ uint8_t en_tw; /* tag word (8bits) */
+ uint8_t en_zero;
+ uint16_t en_opcode; /* opcode last executed (11 bits ) */
+ uint64_t en_rip; /* floating point instruction pointer */
+ uint64_t en_rdp; /* floating operand pointer */
+ uint32_t en_mxcsr; /* SSE sontorol/status register */
+ uint32_t en_mxcsr_mask; /* valid bits in mxcsr */
};
struct savefpu {
struct envxmm sv_env;
struct {
struct fpacc87 fp_acc;
- u_char fp_pad[6]; /* padding */
+ uint8_t fp_pad[6]; /* padding */
} sv_fp[8];
struct xmmacc sv_xmm[16];
- u_char sv_pad[96];
+ uint8_t sv_pad[96];
} __aligned(16);
-#ifdef _KERNEL
-struct fpu_kern_ctx {
- struct savefpu hwstate;
- struct savefpu *prev;
- uint32_t flags;
+struct xstate_hdr {
+ uint64_t xstate_bv;
+ uint8_t xstate_rsrv0[16];
+ uint8_t xstate_rsrv[40];
+};
+
+struct savefpu_xstate {
+ struct xstate_hdr sx_hd;
+ struct ymmacc sx_ymm[16];
};
-#define FPU_KERN_CTX_FPUINITDONE 0x01
+
+struct savefpu_ymm {
+ struct envxmm sv_env;
+ struct {
+ struct fpacc87 fp_acc;
+ int8_t fp_pad[6]; /* padding */
+ } sv_fp[8];
+ struct xmmacc sv_xmm[16];
+ uint8_t sv_pad[96];
+ struct savefpu_xstate sv_xstate;
+} __aligned(64);
+
+#ifdef _KERNEL
+
+struct fpu_kern_ctx;
#define PCB_USER_FPU(pcb) (((pcb)->pcb_flags & PCB_KERNFPU) == 0)
+
+#define XSAVE_AREA_ALIGN 64
+
#endif
/*
@@ -114,9 +140,15 @@ void fpuexit(struct thread *td);
int fpuformat(void);
int fpugetregs(struct thread *td);
void fpuinit(void);
-void fpusetregs(struct thread *td, struct savefpu *addr);
+void fpusave(void *addr);
+int fpusetregs(struct thread *td, struct savefpu *addr,
+ char *xfpustate, size_t xfpustate_size);
+int fpusetxstate(struct thread *td, char *xfpustate,
+ size_t xfpustate_size);
int fputrap(void);
void fpuuserinited(struct thread *td);
+struct fpu_kern_ctx *fpu_kern_alloc_ctx(u_int flags);
+void fpu_kern_free_ctx(struct fpu_kern_ctx *ctx);
int fpu_kern_enter(struct thread *td, struct fpu_kern_ctx *ctx,
u_int flags);
int fpu_kern_leave(struct thread *td, struct fpu_kern_ctx *ctx);
@@ -124,9 +156,10 @@ int fpu_kern_thread(u_int flags);
int is_fpu_kern_thread(u_int flags);
/*
- * Flags for fpu_kern_enter() and fpu_kern_thread().
+ * Flags for fpu_kern_alloc_ctx(), fpu_kern_enter() and fpu_kern_thread().
*/
#define FPU_KERN_NORMAL 0x0000
+#define FPU_KERN_NOWAIT 0x0001
#endif
diff --git a/sys/amd64/include/frame.h b/sys/amd64/include/frame.h
index 12722a4..e171407 100644
--- a/sys/amd64/include/frame.h
+++ b/sys/amd64/include/frame.h
@@ -81,6 +81,7 @@ struct trapframe {
};
#define TF_HASSEGS 0x1
-/* #define _MC_HASBASES 0x2 */
+#define TF_HASBASES 0x2
+#define TF_HASFPXSTATE 0x4
#endif /* _MACHINE_FRAME_H_ */
diff --git a/sys/amd64/include/md_var.h b/sys/amd64/include/md_var.h
index 479c84e..ff11ea1 100644
--- a/sys/amd64/include/md_var.h
+++ b/sys/amd64/include/md_var.h
@@ -51,6 +51,7 @@ extern u_int cpu_clflush_line_size;
extern u_int cpu_fxsr;
extern u_int cpu_high;
extern u_int cpu_id;
+extern u_int cpu_max_ext_state_size;
extern u_int cpu_mxcsr_mask;
extern u_int cpu_procinfo;
extern u_int cpu_procinfo2;
@@ -67,17 +68,23 @@ extern int _ucodesel;
extern int _ucode32sel;
extern int _ufssel;
extern int _ugssel;
+extern int use_xsave;
+extern uint64_t xsave_mask;
typedef void alias_for_inthand_t(u_int cs, u_int ef, u_int esp, u_int ss);
+struct pcb;
+struct savefpu;
struct thread;
struct reg;
struct fpreg;
struct dbreg;
struct dumperinfo;
+void *alloc_fpusave(int flags);
void amd64_syscall(struct thread *td, int traced);
void busdma_swi(void);
void cpu_setregs(void);
+void ctx_fpusave(void *);
void doreti_iret(void) __asm(__STRING(doreti_iret));
void doreti_iret_fault(void) __asm(__STRING(doreti_iret_fault));
void ld_ds(void) __asm(__STRING(ld_ds));
@@ -105,5 +112,8 @@ void pagezero(void *addr);
void setidt(int idx, alias_for_inthand_t *func, int typ, int dpl, int ist);
int user_dbreg_trap(void);
void minidumpsys(struct dumperinfo *);
+struct savefpu *get_pcb_user_save_td(struct thread *td);
+struct savefpu *get_pcb_user_save_pcb(struct pcb *pcb);
+struct pcb *get_pcb_td(struct thread *td);
#endif /* !_MACHINE_MD_VAR_H_ */
diff --git a/sys/amd64/include/pcb.h b/sys/amd64/include/pcb.h
index 1af8f6d..61f651bb 100644
--- a/sys/amd64/include/pcb.h
+++ b/sys/amd64/include/pcb.h
@@ -92,7 +92,8 @@ struct pcb {
struct amd64tss *pcb_tssp;
struct savefpu *pcb_save;
- struct savefpu pcb_user_save;
+
+ uint64_t pcb_pad[2];
};
#ifdef _KERNEL
@@ -130,6 +131,7 @@ clear_pcb_flags(struct pcb *pcb, const u_int flags)
void makectx(struct trapframe *, struct pcb *);
int savectx(struct pcb *);
+
#endif
#endif /* _AMD64_PCB_H_ */
diff --git a/sys/amd64/include/pcpu.h b/sys/amd64/include/pcpu.h
index c4b0c44..d07dbac 100644
--- a/sys/amd64/include/pcpu.h
+++ b/sys/amd64/include/pcpu.h
@@ -226,6 +226,8 @@ __curthread(void)
}
#define curthread (__curthread())
+#define IS_BSP() (PCPU_GET(cpuid) == 0)
+
#else /* !lint || defined(__GNUCLIKE_ASM) && defined(__GNUCLIKE___TYPEOF) */
#error "this file needs to be ported to your compiler"
diff --git a/sys/amd64/include/ptrace.h b/sys/amd64/include/ptrace.h
index eef24f8..28f94f7 100644
--- a/sys/amd64/include/ptrace.h
+++ b/sys/amd64/include/ptrace.h
@@ -33,4 +33,9 @@
#ifndef _MACHINE_PTRACE_H_
#define _MACHINE_PTRACE_H_
+#define __HAVE_PTRACE_MACHDEP
+
+#define PT_GETXSTATE (PT_FIRSTMACH + 0)
+#define PT_SETXSTATE (PT_FIRSTMACH + 1)
+
#endif
diff --git a/sys/amd64/include/specialreg.h b/sys/amd64/include/specialreg.h
index 4c50166..7ba5f9f 100644
--- a/sys/amd64/include/specialreg.h
+++ b/sys/amd64/include/specialreg.h
@@ -66,6 +66,7 @@
#define CR4_PCE 0x00000100 /* Performance monitoring counter enable */
#define CR4_FXSR 0x00000200 /* Fast FPU save/restore used by OS */
#define CR4_XMM 0x00000400 /* enable SIMD/MMX2 to use except 16 */
+#define CR4_XSAVE 0x00040000 /* XSETBV/XGETBV */
/*
* Bits in AMD64 special registers. EFER is 64 bits wide.
@@ -76,6 +77,18 @@
#define EFER_NXE 0x000000800 /* PTE No-Execute bit enable (R/W) */
/*
+ * Intel Extended Features registers
+ */
+#define XCR0 0 /* XFEATURE_ENABLED_MASK register */
+
+#define XFEATURE_ENABLED_X87 0x00000001
+#define XFEATURE_ENABLED_SSE 0x00000002
+#define XFEATURE_ENABLED_AVX 0x00000004
+
+#define XFEATURE_AVX \
+ (XFEATURE_ENABLED_X87 | XFEATURE_ENABLED_SSE | XFEATURE_ENABLED_AVX)
+
+/*
* CPUID instruction features register
*/
#define CPUID_FPU 0x00000001
diff --git a/sys/amd64/include/sysarch.h b/sys/amd64/include/sysarch.h
index 7b95a8b..195d882 100644
--- a/sys/amd64/include/sysarch.h
+++ b/sys/amd64/include/sysarch.h
@@ -50,12 +50,14 @@
#define I386_SET_FSBASE 8
#define I386_GET_GSBASE 9
#define I386_SET_GSBASE 10
+#define I386_GET_XFPUSTATE 11
/* Leave space for 0-127 for to avoid translating syscalls */
#define AMD64_GET_FSBASE 128
#define AMD64_SET_FSBASE 129
#define AMD64_GET_GSBASE 130
#define AMD64_SET_GSBASE 131
+#define AMD64_GET_XFPUSTATE 132
struct i386_ldt_args {
unsigned int start;
@@ -69,6 +71,16 @@ struct i386_ioperm_args {
int enable;
};
+struct i386_get_xfpustate {
+ unsigned int addr;
+ int len;
+};
+
+struct amd64_get_xfpustate {
+ void *addr;
+ int len;
+};
+
#ifndef _KERNEL
__BEGIN_DECLS
int amd64_get_fsbase(void **);
diff --git a/sys/amd64/include/ucontext.h b/sys/amd64/include/ucontext.h
index 75b7bd2..5ab841e 100644
--- a/sys/amd64/include/ucontext.h
+++ b/sys/amd64/include/ucontext.h
@@ -37,7 +37,8 @@
*/
#define _MC_HASSEGS 0x1
#define _MC_HASBASES 0x2
-#define _MC_FLAG_MASK (_MC_HASSEGS | _MC_HASBASES)
+#define _MC_HASFPXSTATE 0x4
+#define _MC_FLAG_MASK (_MC_HASSEGS | _MC_HASBASES | _MC_HASFPXSTATE)
typedef struct __mcontext {
/*
@@ -93,7 +94,10 @@ typedef struct __mcontext {
__register_t mc_fsbase;
__register_t mc_gsbase;
- long mc_spare[6];
+ __register_t mc_xfpustate;
+ __register_t mc_xfpustate_len;
+
+ long mc_spare[4];
} mcontext_t;
#endif /* !_MACHINE_UCONTEXT_H_ */
diff --git a/sys/amd64/linux32/linux.h b/sys/amd64/linux32/linux.h
index 4a5ec01..4eb1425 100644
--- a/sys/amd64/linux32/linux.h
+++ b/sys/amd64/linux32/linux.h
@@ -1,7 +1,7 @@
/*-
* Copyright (c) 2004 Tim J. Robbins
* Copyright (c) 2001 Doug Rabson
- * Copyright (c) 1994-1996 Søren Schmidt
+ * Copyright (c) 1994-1996 Søren Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -597,6 +597,16 @@ int linux_ioctl_unregister_handler(struct linux_ioctl_handler *h);
#define LINUX_F_UNLCK 2
/*
+ * posix_fadvise advice
+ */
+#define LINUX_POSIX_FADV_NORMAL 0
+#define LINUX_POSIX_FADV_RANDOM 1
+#define LINUX_POSIX_FADV_SEQUENTIAL 2
+#define LINUX_POSIX_FADV_WILLNEED 3
+#define LINUX_POSIX_FADV_DONTNEED 4
+#define LINUX_POSIX_FADV_NOREUSE 5
+
+/*
* mount flags
*/
#define LINUX_MS_RDONLY 0x0001
diff --git a/sys/amd64/linux32/linux32_dummy.c b/sys/amd64/linux32/linux32_dummy.c
index a147b91..d67b27e 100644
--- a/sys/amd64/linux32/linux32_dummy.c
+++ b/sys/amd64/linux32/linux32_dummy.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1994-1995 Søren Schmidt
+ * Copyright (c) 1994-1995 Søren Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -59,7 +59,6 @@ DUMMY(setfsuid);
DUMMY(setfsgid);
DUMMY(pivot_root);
DUMMY(mincore);
-DUMMY(fadvise64);
DUMMY(ptrace);
DUMMY(lookup_dcookie);
DUMMY(epoll_create);
@@ -72,7 +71,6 @@ DUMMY(timer_gettime);
DUMMY(timer_getoverrun);
DUMMY(timer_delete);
DUMMY(fstatfs64);
-DUMMY(fadvise64_64);
DUMMY(mbind);
DUMMY(get_mempolicy);
DUMMY(set_mempolicy);
diff --git a/sys/amd64/linux32/linux32_proto.h b/sys/amd64/linux32/linux32_proto.h
index cc9b97d..88c1f69 100644
--- a/sys/amd64/linux32/linux32_proto.h
+++ b/sys/amd64/linux32/linux32_proto.h
@@ -3,7 +3,7 @@
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
- * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 227693 2011-11-19 07:19:37Z ed
+ * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 228957 2011-12-29 15:34:59Z jhb
*/
#ifndef _LINUX_SYSPROTO_H_
@@ -756,7 +756,10 @@ struct linux_set_thread_area_args {
char desc_l_[PADL_(struct l_user_desc *)]; struct l_user_desc * desc; char desc_r_[PADR_(struct l_user_desc *)];
};
struct linux_fadvise64_args {
- register_t dummy;
+ char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+ char offset_l_[PADL_(l_loff_t)]; l_loff_t offset; char offset_r_[PADR_(l_loff_t)];
+ char len_l_[PADL_(l_size_t)]; l_size_t len; char len_r_[PADR_(l_size_t)];
+ char advice_l_[PADL_(int)]; int advice; char advice_r_[PADR_(int)];
};
struct linux_exit_group_args {
char error_code_l_[PADL_(int)]; int error_code; char error_code_r_[PADR_(int)];
@@ -830,7 +833,10 @@ struct linux_utimes_args {
char tptr_l_[PADL_(struct l_timeval *)]; struct l_timeval * tptr; char tptr_r_[PADR_(struct l_timeval *)];
};
struct linux_fadvise64_64_args {
- register_t dummy;
+ char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+ char offset_l_[PADL_(l_loff_t)]; l_loff_t offset; char offset_r_[PADR_(l_loff_t)];
+ char len_l_[PADL_(l_loff_t)]; l_loff_t len; char len_r_[PADR_(l_loff_t)];
+ char advice_l_[PADL_(int)]; int advice; char advice_r_[PADR_(int)];
};
struct linux_mbind_args {
register_t dummy;
diff --git a/sys/amd64/linux32/linux32_syscall.h b/sys/amd64/linux32/linux32_syscall.h
index 7b74cd4..f0b0fe1 100644
--- a/sys/amd64/linux32/linux32_syscall.h
+++ b/sys/amd64/linux32/linux32_syscall.h
@@ -3,7 +3,7 @@
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
- * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 227693 2011-11-19 07:19:37Z ed
+ * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 228957 2011-12-29 15:34:59Z jhb
*/
#define LINUX_SYS_exit 1
diff --git a/sys/amd64/linux32/linux32_syscalls.c b/sys/amd64/linux32/linux32_syscalls.c
index c83a923..421a773 100644
--- a/sys/amd64/linux32/linux32_syscalls.c
+++ b/sys/amd64/linux32/linux32_syscalls.c
@@ -3,7 +3,7 @@
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
- * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 227693 2011-11-19 07:19:37Z ed
+ * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 228957 2011-12-29 15:34:59Z jhb
*/
const char *linux_syscallnames[] = {
diff --git a/sys/amd64/linux32/linux32_sysent.c b/sys/amd64/linux32/linux32_sysent.c
index 549bf8e..911ced5 100644
--- a/sys/amd64/linux32/linux32_sysent.c
+++ b/sys/amd64/linux32/linux32_sysent.c
@@ -3,7 +3,7 @@
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
- * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 227693 2011-11-19 07:19:37Z ed
+ * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 228957 2011-12-29 15:34:59Z jhb
*/
#include "opt_compat.h"
@@ -269,7 +269,7 @@ struct sysent linux_sysent[] = {
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 247 = linux_io_getevents */
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 248 = linux_io_submit */
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 249 = linux_io_cancel */
- { 0, (sy_call_t *)linux_fadvise64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 250 = linux_fadvise64 */
+ { AS(linux_fadvise64_args), (sy_call_t *)linux_fadvise64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 250 = linux_fadvise64 */
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 251 = */
{ AS(linux_exit_group_args), (sy_call_t *)linux_exit_group, AUE_EXIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 252 = linux_exit_group */
{ 0, (sy_call_t *)linux_lookup_dcookie, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 253 = linux_lookup_dcookie */
@@ -291,7 +291,7 @@ struct sysent linux_sysent[] = {
{ 0, (sy_call_t *)linux_fstatfs64, AUE_FSTATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 269 = linux_fstatfs64 */
{ AS(linux_tgkill_args), (sy_call_t *)linux_tgkill, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 270 = linux_tgkill */
{ AS(linux_utimes_args), (sy_call_t *)linux_utimes, AUE_UTIMES, NULL, 0, 0, 0, SY_THR_STATIC }, /* 271 = linux_utimes */
- { 0, (sy_call_t *)linux_fadvise64_64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 272 = linux_fadvise64_64 */
+ { AS(linux_fadvise64_64_args), (sy_call_t *)linux_fadvise64_64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 272 = linux_fadvise64_64 */
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 273 = */
{ 0, (sy_call_t *)linux_mbind, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 274 = linux_mbind */
{ 0, (sy_call_t *)linux_get_mempolicy, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 275 = linux_get_mempolicy */
diff --git a/sys/amd64/linux32/linux32_systrace_args.c b/sys/amd64/linux32/linux32_systrace_args.c
index 2a5e835..6310f08 100644
--- a/sys/amd64/linux32/linux32_systrace_args.c
+++ b/sys/amd64/linux32/linux32_systrace_args.c
@@ -1674,7 +1674,12 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
}
/* linux_fadvise64 */
case 250: {
- *n_args = 0;
+ struct linux_fadvise64_args *p = params;
+ iarg[0] = p->fd; /* int */
+ iarg[1] = p->offset; /* l_loff_t */
+ iarg[2] = p->len; /* l_size_t */
+ iarg[3] = p->advice; /* int */
+ *n_args = 4;
break;
}
/* linux_exit_group */
@@ -1808,7 +1813,12 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
}
/* linux_fadvise64_64 */
case 272: {
- *n_args = 0;
+ struct linux_fadvise64_64_args *p = params;
+ iarg[0] = p->fd; /* int */
+ iarg[1] = p->offset; /* l_loff_t */
+ iarg[2] = p->len; /* l_loff_t */
+ iarg[3] = p->advice; /* int */
+ *n_args = 4;
break;
}
/* linux_mbind */
@@ -4614,6 +4624,22 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
/* linux_fadvise64 */
case 250:
+ switch(ndx) {
+ case 0:
+ p = "int";
+ break;
+ case 1:
+ p = "l_loff_t";
+ break;
+ case 2:
+ p = "l_size_t";
+ break;
+ case 3:
+ p = "int";
+ break;
+ default:
+ break;
+ };
break;
/* linux_exit_group */
case 252:
@@ -4773,6 +4799,22 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
/* linux_fadvise64_64 */
case 272:
+ switch(ndx) {
+ case 0:
+ p = "int";
+ break;
+ case 1:
+ p = "l_loff_t";
+ break;
+ case 2:
+ p = "l_loff_t";
+ break;
+ case 3:
+ p = "int";
+ break;
+ default:
+ break;
+ };
break;
/* linux_mbind */
case 274:
@@ -6089,6 +6131,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
/* linux_fadvise64 */
case 250:
+ if (ndx == 0 || ndx == 1)
+ p = "int";
+ break;
/* linux_exit_group */
case 252:
if (ndx == 0 || ndx == 1)
@@ -6158,6 +6203,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
/* linux_fadvise64_64 */
case 272:
+ if (ndx == 0 || ndx == 1)
+ p = "int";
+ break;
/* linux_mbind */
case 274:
/* linux_get_mempolicy */
diff --git a/sys/amd64/linux32/linux32_sysvec.c b/sys/amd64/linux32/linux32_sysvec.c
index 4ff5483..5afc9ce 100644
--- a/sys/amd64/linux32/linux32_sysvec.c
+++ b/sys/amd64/linux32/linux32_sysvec.c
@@ -3,7 +3,7 @@
* Copyright (c) 2003 Peter Wemm
* Copyright (c) 2002 Doug Rabson
* Copyright (c) 1998-1999 Andrew Gallatin
- * Copyright (c) 1994-1996 Søren Schmidt
+ * Copyright (c) 1994-1996 Søren Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/amd64/linux32/syscalls.master b/sys/amd64/linux32/syscalls.master
index 1c09084..0554a60 100644
--- a/sys/amd64/linux32/syscalls.master
+++ b/sys/amd64/linux32/syscalls.master
@@ -419,7 +419,8 @@
247 AUE_NULL UNIMPL linux_io_getevents
248 AUE_NULL UNIMPL linux_io_submit
249 AUE_NULL UNIMPL linux_io_cancel
-250 AUE_NULL STD { int linux_fadvise64(void); }
+250 AUE_NULL STD { int linux_fadvise64(int fd, l_loff_t offset, \
+ l_size_t len, int advice); }
251 AUE_NULL UNIMPL
252 AUE_EXIT STD { int linux_exit_group(int error_code); }
253 AUE_NULL STD { int linux_lookup_dcookie(void); }
@@ -443,7 +444,9 @@
270 AUE_NULL STD { int linux_tgkill(int tgid, int pid, int sig); }
271 AUE_UTIMES STD { int linux_utimes(char *fname, \
struct l_timeval *tptr); }
-272 AUE_NULL STD { int linux_fadvise64_64(void); }
+272 AUE_NULL STD { int linux_fadvise64_64(int fd, \
+ l_loff_t offset, l_loff_t len, \
+ int advice); }
273 AUE_NULL UNIMPL
274 AUE_NULL STD { int linux_mbind(void); }
275 AUE_NULL STD { int linux_get_mempolicy(void); }
diff --git a/sys/arm/arm/irq_dispatch.S b/sys/arm/arm/irq_dispatch.S
index c919de0..3995731 100644
--- a/sys/arm/arm/irq_dispatch.S
+++ b/sys/arm/arm/irq_dispatch.S
@@ -98,10 +98,9 @@ ASENTRY_NP(irq_entry)
PULLFRAMEFROMSVCANDEXIT
movs pc, lr /* Exit */
- .bss
+ .data
.align 0
-
.global _C_LABEL(intrnames), _C_LABEL(sintrnames)
.global _C_LABEL(intrcnt), _C_LABEL(sintrcnt)
_C_LABEL(intrnames):
diff --git a/sys/arm/arm/machdep.c b/sys/arm/arm/machdep.c
index a7a792d..abd04a7 100644
--- a/sys/arm/arm/machdep.c
+++ b/sys/arm/arm/machdep.c
@@ -137,7 +137,7 @@ sendsig(catcher, ksi, mask)
catcher, sig);
/* Allocate and validate space for the signal handler context. */
- if ((td->td_flags & TDP_ALTSTACK) != 0 && !(onstack) &&
+ if ((td->td_pflags & TDP_ALTSTACK) != 0 && !(onstack) &&
SIGISMEMBER(psp->ps_sigonstack, sig)) {
fp = (struct sigframe *)(td->td_sigstk.ss_sp +
td->td_sigstk.ss_size);
diff --git a/sys/arm/arm/pmap.c b/sys/arm/arm/pmap.c
index ec7fb1b..b6d8c76 100644
--- a/sys/arm/arm/pmap.c
+++ b/sys/arm/arm/pmap.c
@@ -4039,6 +4039,7 @@ pmap_zero_page_generic(vm_paddr_t phys, int off, int size)
* order to work without corruption when write-allocate is enabled.
*/
*cdst_pte = L2_S_PROTO | phys | L2_S_PROT(PTE_KERNEL, VM_PROT_WRITE);
+ PTE_SYNC(cdst_pte);
cpu_tlb_flushD_SE(cdstp);
cpu_cpwait();
if (off || size != PAGE_SIZE)
diff --git a/sys/arm/arm/vm_machdep.c b/sys/arm/arm/vm_machdep.c
index 1f31e3d..54e561e 100644
--- a/sys/arm/arm/vm_machdep.c
+++ b/sys/arm/arm/vm_machdep.c
@@ -617,7 +617,6 @@ uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait)
void *ret;
struct arm_small_page *sp;
TAILQ_HEAD(,arm_small_page) *head;
- static vm_pindex_t color;
vm_page_t m;
*flags = UMA_SLAB_PRIV;
@@ -650,8 +649,7 @@ uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait)
if (wait & M_ZERO)
pflags |= VM_ALLOC_ZERO;
for (;;) {
- m = vm_page_alloc(NULL, color++,
- pflags | VM_ALLOC_NOOBJ);
+ m = vm_page_alloc(NULL, 0, pflags | VM_ALLOC_NOOBJ);
if (m == NULL) {
if (wait & M_NOWAIT)
return (NULL);
diff --git a/sys/arm/at91/at91_st.c b/sys/arm/at91/at91_st.c
index e195653..ac20bc1 100644
--- a/sys/arm/at91/at91_st.c
+++ b/sys/arm/at91/at91_st.c
@@ -200,7 +200,7 @@ cpu_initclocks(void)
hz = 32768 / rel_value;
tick = 1000000 / hz;
}
- /* Disable all interrupts. */
+ /* Disable all interrupts. */
WR4(ST_IDR, 0xffffffff);
/* The system timer shares the system irq (1) */
irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 1, 1, 1,
diff --git a/sys/arm/conf/KB920X b/sys/arm/conf/KB920X
index 524e387..0405147 100644
--- a/sys/arm/conf/KB920X
+++ b/sys/arm/conf/KB920X
@@ -138,3 +138,6 @@ device wlan_wep # 802.11 WEP support
device wlan_ccmp # 802.11 CCMP support
device wlan_tkip # 802.11 TKIP support
device wlan_amrr # AMRR transmit rate control algorithm
+options IEEE80211_SUPPORT_MESH
+
+options AH_SUPPORT_AR5416
diff --git a/sys/arm/econa/ehci_ebus.c b/sys/arm/econa/ehci_ebus.c
index ee20148..4b72b7f 100644
--- a/sys/arm/econa/ehci_ebus.c
+++ b/sys/arm/econa/ehci_ebus.c
@@ -75,10 +75,6 @@ __FBSDID("$FreeBSD$");
static device_attach_t ehci_ebus_attach;
static device_detach_t ehci_ebus_detach;
-static device_shutdown_t ehci_ebus_shutdown;
-static device_suspend_t ehci_ebus_suspend;
-static device_resume_t ehci_ebus_resume;
-
static void *ih_err;
@@ -86,45 +82,6 @@ static void *ih_err;
#define USB_BRIDGE_INTR_MASK 0x214
static int
-ehci_ebus_suspend(device_t self)
-{
- ehci_softc_t *sc = device_get_softc(self);
- int err;
-
- err = bus_generic_suspend(self);
- if (err)
- return (err);
- ehci_suspend(sc);
- return (0);
-}
-
-static int
-ehci_ebus_resume(device_t self)
-{
- ehci_softc_t *sc = device_get_softc(self);
-
- ehci_resume(sc);
-
- bus_generic_resume(self);
-
- return (0);
-}
-
-static int
-ehci_ebus_shutdown(device_t self)
-{
- ehci_softc_t *sc = device_get_softc(self);
- int err;
-
- err = bus_generic_shutdown(self);
- if (err)
- return (err);
- ehci_shutdown(sc);
-
- return (0);
-}
-
-static int
ehci_ebus_probe(device_t self)
{
@@ -277,17 +234,17 @@ static device_method_t ehci_methods[] = {
DEVMETHOD(device_probe, ehci_ebus_probe),
DEVMETHOD(device_attach, ehci_ebus_attach),
DEVMETHOD(device_detach, ehci_ebus_detach),
- DEVMETHOD(device_suspend, ehci_ebus_suspend),
- DEVMETHOD(device_resume, ehci_ebus_resume),
- DEVMETHOD(device_shutdown, ehci_ebus_shutdown),
+ DEVMETHOD(device_suspend, bus_generic_suspend),
+ DEVMETHOD(device_resume, bus_generic_resume),
+ DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD_END
};
static driver_t ehci_driver = {
- "ehci",
- ehci_methods,
- sizeof(ehci_softc_t),
+ .name = "ehci",
+ .methods = ehci_methods,
+ .size = sizeof(ehci_softc_t),
};
static devclass_t ehci_devclass;
diff --git a/sys/arm/econa/ohci_ec.c b/sys/arm/econa/ohci_ec.c
index ee44960..543aae1 100644
--- a/sys/arm/econa/ohci_ec.c
+++ b/sys/arm/econa/ohci_ec.c
@@ -220,15 +220,17 @@ static device_method_t ohci_methods[] = {
DEVMETHOD(device_probe, ohci_ec_probe),
DEVMETHOD(device_attach, ohci_ec_attach),
DEVMETHOD(device_detach, ohci_ec_detach),
+ DEVMETHOD(device_resume, bus_generic_resume),
+ DEVMETHOD(device_suspend, bus_generic_suspend),
DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD_END
};
static driver_t ohci_driver = {
- "ohci",
- ohci_methods,
- sizeof(struct ec_ohci_softc),
+ .name = "ohci",
+ .methods = ohci_methods,
+ .size = sizeof(struct ec_ohci_softc),
};
static devclass_t ohci_devclass;
diff --git a/sys/arm/include/_types.h b/sys/arm/include/_types.h
index d8386f3..338c19c 100644
--- a/sys/arm/include/_types.h
+++ b/sys/arm/include/_types.h
@@ -46,7 +46,7 @@
/*
* Basic types upon which most other types are built.
*/
-typedef __signed char __int8_t;
+typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef short __int16_t;
typedef unsigned short __uint16_t;
@@ -69,7 +69,7 @@ typedef unsigned long long __uint64_t;
typedef __uint32_t __clock_t; /* clock()... */
typedef __int32_t __critical_t;
typedef double __double_t;
-typedef double __float_t;
+typedef float __float_t;
typedef __int32_t __intfptr_t;
typedef __int64_t __intmax_t;
typedef __int32_t __intptr_t;
diff --git a/sys/arm/include/float.h b/sys/arm/include/float.h
index ac5ceb9..644b5ff 100644
--- a/sys/arm/include/float.h
+++ b/sys/arm/include/float.h
@@ -44,9 +44,15 @@ extern int __flt_rounds(void);
__END_DECLS
#define FLT_RADIX 2 /* b */
-#define FLT_ROUNDS -1
-#define FLT_EVAL_METHOD (-1) /* XXX */
+#ifndef _ARM_HARD_FLOAT
+#define FLT_ROUNDS __flt_rounds()
+#else
+#define FLT_ROUNDS (-1)
+#endif
+#if __ISO_C_VISIBLE >= 1999
+#define FLT_EVAL_METHOD 0
#define DECIMAL_DIG 17 /* max precision in decimal digits */
+#endif
#define FLT_MANT_DIG 24 /* p */
#define FLT_EPSILON 1.19209290E-07F /* b**(1-p) */
@@ -57,6 +63,11 @@ __END_DECLS
#define FLT_MAX_EXP 128 /* emax */
#define FLT_MAX 3.40282347E+38F /* (1-b**(-p))*b**emax */
#define FLT_MAX_10_EXP 38 /* floor(log10((1-b**(-p))*b**emax)) */
+#if __ISO_C_VISIBLE >= 2011
+#define FLT_TRUE_MIN 1.40129846E-45F /* b**(emin-p) */
+#define FLT_DECIMAL_DIG 9 /* ceil(1+p*log10(b)) */
+#define FLT_HAS_SUBNORM 1
+#endif /* __ISO_C_VISIBLE >= 2011 */
#define DBL_MANT_DIG 53
#define DBL_EPSILON 2.2204460492503131E-16
@@ -67,14 +78,25 @@ __END_DECLS
#define DBL_MAX_EXP 1024
#define DBL_MAX 1.7976931348623157E+308
#define DBL_MAX_10_EXP 308
+#if __ISO_C_VISIBLE >= 2011
+#define DBL_TRUE_MIN 4.9406564584124654E-324
+#define DBL_DECIMAL_DIG 17
+#define DBL_HAS_SUBNORM 1
+#endif /* __ISO_C_VISIBLE >= 2011 */
#define LDBL_MANT_DIG DBL_MANT_DIG
-#define LDBL_EPSILON DBL_EPSILON
+#define LDBL_EPSILON ((long double)DBL_EPSILON)
#define LDBL_DIG DBL_DIG
#define LDBL_MIN_EXP DBL_MIN_EXP
-#define LDBL_MIN DBL_MIN
+#define LDBL_MIN ((long double)DBL_MIN)
#define LDBL_MIN_10_EXP DBL_MIN_10_EXP
#define LDBL_MAX_EXP DBL_MAX_EXP
-#define LDBL_MAX DBL_MAX
+#define LDBL_MAX ((long double)DBL_MAX)
#define LDBL_MAX_10_EXP DBL_MAX_10_EXP
+#if __ISO_C_VISIBLE >= 2011
+#define LDBL_TRUE_MIN ((long double)DBL_TRUE_MIN)
+#define LDBL_DECIMAL_DIG DBL_DECIMAL_DIG
+#define LDBL_HAS_SUBNORM DBL_HAS_SUBNORM
+#endif /* __ISO_C_VISIBLE >= 2011 */
+
#endif /* _MACHINE_FLOAT_H_ */
diff --git a/sys/arm/include/pmap.h b/sys/arm/include/pmap.h
index 3d63432..5f499a1 100644
--- a/sys/arm/include/pmap.h
+++ b/sys/arm/include/pmap.h
@@ -382,7 +382,8 @@ do { \
if (PMAP_NEEDS_PTE_SYNC) { \
cpu_dcache_wb_range((vm_offset_t)(pte), sizeof(pt_entry_t));\
cpu_l2cache_wb_range((vm_offset_t)(pte), sizeof(pt_entry_t));\
- }\
+ } else \
+ cpu_drain_writebuf(); \
} while (/*CONSTCOND*/0)
#define PTE_SYNC_RANGE(pte, cnt) \
@@ -392,7 +393,8 @@ do { \
(cnt) << 2); /* * sizeof(pt_entry_t) */ \
cpu_l2cache_wb_range((vm_offset_t)(pte), \
(cnt) << 2); /* * sizeof(pt_entry_t) */ \
- } \
+ } else \
+ cpu_drain_writebuf(); \
} while (/*CONSTCOND*/0)
extern pt_entry_t pte_l1_s_cache_mode;
diff --git a/sys/arm/sa11x0/sa11x0_ost.c b/sys/arm/sa11x0/sa11x0_ost.c
index 1ffb26c..21991e5 100644
--- a/sys/arm/sa11x0/sa11x0_ost.c
+++ b/sys/arm/sa11x0/sa11x0_ost.c
@@ -251,7 +251,7 @@ cpu_initclocks()
stathz = STATHZ;
profhz = stathz;
#if 0
- mtx_init(&clock_lock, "SA1110 Clock locké", NULL, MTX_SPIN);
+ mtx_init(&clock_lock, "SA1110 Clock locked", NULL, MTX_SPIN);
#endif
saost_sc->sc_statclock_step = TIMER_FREQUENCY / stathz;
struct resource *irq1, *irq2;
diff --git a/sys/arm/xscale/ixp425/ixdp425_pci.c b/sys/arm/xscale/ixp425/ixdp425_pci.c
index 817e6af..9fc3694 100644
--- a/sys/arm/xscale/ixp425/ixdp425_pci.c
+++ b/sys/arm/xscale/ixp425/ixdp425_pci.c
@@ -43,6 +43,9 @@ __FBSDID("$FreeBSD$");
#include <sys/module.h>
#include <sys/malloc.h>
#include <sys/rman.h>
+
+#include <dev/pci/pcivar.h>
+
#include <machine/bus.h>
#include <machine/intr.h>
diff --git a/sys/arm/xscale/ixp425/ixp425_pci.c b/sys/arm/xscale/ixp425/ixp425_pci.c
index b7513fc..ff54a21 100644
--- a/sys/arm/xscale/ixp425/ixp425_pci.c
+++ b/sys/arm/xscale/ixp425/ixp425_pci.c
@@ -45,9 +45,12 @@ __FBSDID("$FreeBSD$");
#include <sys/module.h>
#include <sys/rman.h>
+#include <dev/pci/pcivar.h>
+
#include <machine/bus.h>
#include <machine/cpu.h>
#include <machine/pcb.h>
+
#include <vm/vm.h>
#include <vm/pmap.h>
#include <vm/vm_extern.h>
diff --git a/sys/arm/xscale/ixp425/ixp425var.h b/sys/arm/xscale/ixp425/ixp425var.h
index 5d90e10..761836b 100644
--- a/sys/arm/xscale/ixp425/ixp425var.h
+++ b/sys/arm/xscale/ixp425/ixp425var.h
@@ -44,7 +44,6 @@
#include <machine/bus.h>
-#include <dev/pci/pcivar.h>
#include <sys/rman.h>
/* NB: cputype is setup by set_cpufuncs */
diff --git a/sys/boot/arm/at91/libat91/sd-card.c b/sys/boot/arm/at91/libat91/sd-card.c
index d0b7beb..acc8e33 100644
--- a/sys/boot/arm/at91/libat91/sd-card.c
+++ b/sys/boot/arm/at91/libat91/sd-card.c
@@ -94,14 +94,14 @@ MCIDeviceWaitReady(unsigned int timeout)
} // End of if AT91C_MCI_RXBUFF
}
-inline static unsigned int
+static inline unsigned int
swap(unsigned int a)
{
return (((a & 0xff) << 24) | ((a & 0xff00) << 8) | ((a & 0xff0000) >> 8)
| ((a & 0xff000000) >> 24));
}
-inline static void
+static inline void
wait_ready()
{
int status;
diff --git a/sys/boot/common/interp_parse.c b/sys/boot/common/interp_parse.c
index 32b01c8..32d4f48 100644
--- a/sys/boot/common/interp_parse.c
+++ b/sys/boot/common/interp_parse.c
@@ -137,7 +137,7 @@ parse(int *argc, char ***argv, char *str)
case VAR:
if (token) {
- PARSE_FAIL((q = index(p, token)) == NULL);
+ PARSE_FAIL((q = strchr(p, token)) == NULL);
} else {
q = p;
while (*q && !isspace(*q))
diff --git a/sys/boot/common/loader.8 b/sys/boot/common/loader.8
index c36072c..6c027ff 100644
--- a/sys/boot/common/loader.8
+++ b/sys/boot/common/loader.8
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd February 15, 2009
+.Dd January 7, 2012
.Dt LOADER 8
.Os
.Sh NAME
@@ -419,6 +419,43 @@ was compiled.
Changes to the
.Va comconsole_speed
variable take effect immediately.
+.It Va comconsole_port
+Defines the base i/o port used to access console UART
+(i386 and amd64 only).
+If the variable is not set, its assumed value is 0x3F8, which
+corresponds to PC port COM1, unless overriden by
+.Va BOOT_COMCONSOLE_PORT
+variable during the compilation of
+.Nm .
+Setting the
+.Va comconsole_port
+variable automatically set
+.Va hw.uart.console
+environment variable to provide a hint to kernel for location of the console.
+Loader console is changed immediately after variable
+.Va comconsole_port
+is set.
+.It Va comconsole_pcidev
+Defines the location of a PCI device of the 'simple communication'
+class to be used as the serial console UART (i386 and amd64 only).
+The syntax of the variable is
+.Li 'bus:device:function[:bar]' ,
+where all members must be numeric, with possible
+.Li 0x
+prefix to indicate a hexadecimal value.
+The
+.Va bar
+member is optional and assumed to be 0x10 if omitted.
+The bar must decode i/o space.
+Setting the variable
+.Va comconsole_pcidev
+automatically sets the variable
+.Va comconsole_port
+to the base of the selected bar, and hint
+.Va hw.uart.console .
+Loader console is changed immediately after variable
+.Va comconsole_pcidev
+is set.
.It Va console
Defines the current console or consoles.
Multiple consoles may be specified.
@@ -926,10 +963,10 @@ autoboot 5
.Pp
Set the disk unit of the root device to 2, and then boot.
This would be needed in a system with two IDE disks,
-with the second IDE disk hardwired to wd2 instead of wd1.
+with the second IDE disk hardwired to ad2 instead of ad1.
.Bd -literal -offset indent
set root_disk_unit=2
-boot /kernel
+boot /boot/kernel/kernel
.Ed
.Pp
See also:
diff --git a/sys/boot/forth/loader.4th b/sys/boot/forth/loader.4th
index c765147..437533a 100644
--- a/sys/boot/forth/loader.4th
+++ b/sys/boot/forth/loader.4th
@@ -41,12 +41,26 @@ s" arch-i386" environment? [if] [if]
include /boot/support.4th
-\ ***** boot-conf
-\
-\ Prepares to boot as specified by loaded configuration files.
-
only forth also support-functions also builtins definitions
+: try-menu-unset
+ \ menu-unset may not be present
+ s" beastie_disable" getenv
+ dup -1 <> if
+ s" YES" compare-insensitive 0= if
+ exit
+ then
+ else
+ drop
+ then
+ s" menu-unset"
+ sfind if
+ execute
+ else
+ drop
+ then
+;
+
: boot
0= if ( interpreted ) get_arguments then
@@ -57,24 +71,32 @@ only forth also support-functions also builtins definitions
0 1 unload drop
else
s" kernelname" getenv? if ( a kernel has been loaded )
+ try-menu-unset
1 boot exit
then
load_kernel_and_modules
?dup if exit then
+ try-menu-unset
0 1 boot exit
then
else
s" kernelname" getenv? if ( a kernel has been loaded )
+ try-menu-unset
1 boot exit
then
load_kernel_and_modules
?dup if exit then
+ try-menu-unset
0 1 boot exit
then
load_kernel_and_modules
?dup 0= if 0 1 boot then
;
+\ ***** boot-conf
+\
+\ Prepares to boot as specified by loaded configuration files.
+
: boot-conf
0= if ( interpreted ) get_arguments then
0 1 unload drop
diff --git a/sys/boot/forth/loader.conf b/sys/boot/forth/loader.conf
index 7a20f91..a6a7785 100644
--- a/sys/boot/forth/loader.conf
+++ b/sys/boot/forth/loader.conf
@@ -31,9 +31,10 @@ verbose_loading="NO" # Set to YES for verbose loader output
splash_bmp_load="NO" # Set this to YES for bmp splash screen!
splash_pcx_load="NO" # Set this to YES for pcx splash screen!
+splash_txt_load="NO" # Set this to YES for TheDraw splash screen!
vesa_load="NO" # Set this to YES to load the vesa module
bitmap_load="NO" # Set this to YES if you want splash screen!
-bitmap_name="splash.bmp" # Set this to the name of the bmp or pcx file
+bitmap_name="splash.bmp" # Set this to the name of the file
bitmap_type="splash_image_data" # and place it on the module_path
@@ -260,6 +261,7 @@ pf_load="NO" # packet filter
bridgestp_load="NO" # if_bridge(4) support
miibus_load="NO" # miibus support, needed for some drivers
+carp_load="NO" # carp(4) protocol
if_ae_load="NO" # Attansic/Atheros L2 FastEthernet
if_age_load="NO" # Attansic/Atheros L1 Gigabit Ethernet
if_alc_load="NO" # Atheros AR8131/AR8132 Ethernet
@@ -275,7 +277,6 @@ if_bridge_load="NO" # if_bridge(4) devices
if_bwi_load="NO" # Broadcom BCM53xx IEEE 802.11b/g wireness NICs
if_bwn_load="NO" # Broadcom BCM43xx IEEE 802.11 wireless NICs
if_bxe_load="NO" # Broadcom NetXtreme II 10Gb Ethernet
-if_carp_load="NO" # carp(4) devices
if_cas_load="NO" # Sun Cassini/Cassini+ and NS DP83065 Saturn
if_cm_load="NO" # SMC (90c26, 90c56, 90c66)
if_cs_load="NO" # Crystal Semiconductor CS8920
diff --git a/sys/boot/forth/menu.4th b/sys/boot/forth/menu.4th
index fbb6c16..daac6c8 100644
--- a/sys/boot/forth/menu.4th
+++ b/sys/boot/forth/menu.4th
@@ -131,11 +131,11 @@ create init_text8 255 allot
\ Print the value of menuidx
loader_color? if
- ." "
+ ." " (  )
then
menuidx @ .
loader_color? if
- ." "
+ ." " (  )
then
\ Move the cursor forward 1 column
@@ -897,22 +897,60 @@ create init_text8 255 allot
;
\ This function unsets all the possible environment variables associated with
-\ creating the interactive menu. Call this when you want to clear the menu
-\ area in preparation for another menu.
+\ creating the interactive menu.
\
-: menu-clear ( -- )
+: menu-unset ( -- )
49 \ Iterator start (loop range 49 to 56; ASCII '1' to '8')
begin
- \ basename for caption variable
- loader_color? if
- s" ansi_caption[x]"
- else
- s" menu_caption[x]"
- then
+ \ Unset variables in-order of appearance in menu.4th(8)
+
+ s" menu_caption[x]" \ basename for caption variable
-rot 2dup 13 + c! rot \ replace 'x' with current iteration
unsetenv \ not erroneous to unset unknown var
+ s" menu_command[x]" \ command basename
+ -rot 2dup 13 + c! rot \ replace 'x'
+ unsetenv
+
+ s" menu_keycode[x]" \ keycode basename
+ -rot 2dup 13 + c! rot \ replace 'x'
+ unsetenv
+
+ s" ansi_caption[x]" \ ANSI caption basename
+ -rot 2dup 13 + c! rot \ replace 'x'
+ unsetenv
+
+ s" toggled_text[x]" \ toggle_menuitem caption basename
+ -rot 2dup 13 + c! rot \ replace 'x'
+ unsetenv
+
+ s" toggled_ansi[x]" \ toggle_menuitem ANSI caption basename
+ -rot 2dup 13 + c! rot \ replace 'x'
+ unsetenv
+
+ s" menu_caption[x][y]" \ cycle_menuitem caption
+ -rot 2dup 13 + c! rot \ replace 'x'
+ 49 -rot
+ begin
+ 16 2over rot + c! \ replace 'y'
+ 2dup unsetenv
+
+ rot 1+ dup 56 > 2swap rot
+ until
+ 2drop drop
+
+ s" ansi_caption[x][y]" \ cycle_menuitem ANSI caption
+ -rot 2dup 13 + c! rot \ replace 'x'
+ 49 -rot
+ begin
+ 16 2over rot + c! \ replace 'y'
+ 2dup unsetenv
+
+ rot 1+ dup 56 > 2swap rot
+ until
+ 2drop drop
+
s" 0 menukeyN !" \ basename for key association var
-rot 2dup 9 + c! rot \ replace 'N' with current iteration
evaluate \ assign zero (0) to key assoc. var
@@ -921,6 +959,9 @@ create init_text8 255 allot
until
drop \ iterator
+ \ unset the timeout command
+ s" menu_timeout_command" unsetenv
+
\ clear the "Reboot" menu option flag
s" menu_reboot" unsetenv
0 menureboot !
@@ -933,6 +974,13 @@ create init_text8 255 allot
s" menu_options" unsetenv
0 menuoptions !
+;
+
+\ This function both unsets menu variables and visually erases the menu area
+\ in-preparation for another menu.
+\
+: menu-clear ( -- )
+ menu-unset
menu-erase
;
diff --git a/sys/boot/forth/menu.4th.8 b/sys/boot/forth/menu.4th.8
index 55cbfd1..dc00af8 100644
--- a/sys/boot/forth/menu.4th.8
+++ b/sys/boot/forth/menu.4th.8
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd Aug 29, 2011
+.Dd Dec 27, 2011
.Dt MENU.4TH 8
.Os
.Sh NAME
@@ -69,9 +69,13 @@ Clears the screen area within the menu bounding box.
Calls
.Ic menu-erase
and then redraws the menu.
+.It Ic menu-unset
+Unsets the environment variables associated with individual menu items,
+clearing the way for a new menu.
.It Ic menu-clear
-Unsets all possible environment variables used
-to configure the menu and then calls
+Calls
+.Ic menu-unset
+and then
.Ic menu-erase .
.El
.Pp
diff --git a/sys/boot/forth/menu.rc b/sys/boot/forth/menu.rc
index d8af4b2..c2faf68 100644
--- a/sys/boot/forth/menu.rc
+++ b/sys/boot/forth/menu.rc
@@ -18,9 +18,9 @@ menu-init \ initialize the menu area (see `menu.4th')
\ Initialize main menu constructs (see `menu.4th')
\ NOTE: To use the `ansi' variants, add `loader_color=1' to loader.conf(5)
-set menu_caption[1]="Boot [ENTER]"
+set menu_caption[1]="Boot [Enter]"
set menu_command[1]="boot"
-set ansi_caption[1]="Boot [ENTER]"
+set ansi_caption[1]="Boot [Enter]"
set menu_keycode[1]="98"
set menu_caption[2]="[Esc]ape to loader prompt"
@@ -38,34 +38,34 @@ set menu_reboot
\
set menu_options=4
-set menu_caption[4]="[A]CPI Support: Disabled"
-set toggled_text[4]="[A]CPI Support: Enabled"
+set menu_caption[4]="[A]CPI Support off"
+set toggled_text[4]="[A]CPI Support On"
set menu_command[4]="toggle_acpi"
set menu_keycode[4]="97"
set menu_acpi=4
-set ansi_caption[4]="ACPI Support: Disabled"
-set toggled_ansi[4]="ACPI Support: Enabled"
+set ansi_caption[4]="ACPI Support Off"
+set toggled_ansi[4]="ACPI Support On"
-set menu_caption[5]="Boot Safe [M]ode: NO"
-set toggled_text[5]="Boot Safe [M]ode: YES"
+set menu_caption[5]="Safe [M]ode... off"
+set toggled_text[5]="Safe [M]ode... On"
set menu_command[5]="toggle_safemode"
set menu_keycode[5]="109"
-set ansi_caption[5]="Boot Safe Mode: NO"
-set toggled_ansi[5]="Boot Safe Mode: YES"
+set ansi_caption[5]="Safe Mode... Off"
+set toggled_ansi[5]="Safe Mode... On"
-set menu_caption[6]="Boot [S]ingle User: NO"
-set toggled_text[6]="Boot [S]ingle User: YES"
+set menu_caption[6]="[S]ingle User. off"
+set toggled_text[6]="[S]ingle User. On"
set menu_command[6]="toggle_singleuser"
set menu_keycode[6]="115"
-set ansi_caption[6]="Boot Single User: NO"
-set toggled_ansi[6]="Boot Single User: YES"
+set ansi_caption[6]="Single User. Off"
+set toggled_ansi[6]="Single User. On"
-set menu_caption[7]="Boot [V]erbose: NO"
-set toggled_text[7]="Boot [V]erbose: YES"
+set menu_caption[7]="[V]erbose..... off"
+set toggled_text[7]="[V]erbose..... On"
set menu_command[7]="toggle_verbose"
set menu_keycode[7]="118"
-set ansi_caption[7]="Boot Verbose: NO"
-set toggled_ansi[7]="Boot Verbose: YES"
+set ansi_caption[7]="Verbose..... Off"
+set toggled_ansi[7]="Verbose..... On"
\ Enable automatic booting (add ``autoboot_delay=N'' to loader.conf(5) to
\ customize the timeout; default is 10-seconds)
diff --git a/sys/boot/i386/boot0/boot0.S b/sys/boot/i386/boot0/boot0.S
index 2950124..798ee97 100644
--- a/sys/boot/i386/boot0/boot0.S
+++ b/sys/boot/i386/boot0/boot0.S
@@ -413,6 +413,7 @@ got_key:
3:
#endif /* ONLY_F_KEYS */
#endif /* SIO */
+check_selection:
cmpb $0x5,%al # F1..F6 or 1..6 ?
#ifdef PXE /* enable PXE/INT18 using F6 */
jne 1f;
@@ -421,7 +422,6 @@ got_key:
#endif /* PXE */
jae beep # Not in F1..F5, beep
-check_selection:
/*
* We have a selection. If it's a bad selection go back to complain.
* The bits in MNUOPT were set when the options were printed.
diff --git a/sys/boot/i386/libi386/biospci.c b/sys/boot/i386/libi386/biospci.c
index ecbe7db..ff4e862 100644
--- a/sys/boot/i386/libi386/biospci.c
+++ b/sys/boot/i386/libi386/biospci.c
@@ -342,3 +342,9 @@ biospci_read_config(uint32_t locator, int offset, int width, uint32_t *val)
return (0);
}
+uint32_t
+biospci_locator(int8_t bus, uint8_t device, uint8_t function)
+{
+
+ return ((bus << 8) | ((device & 0x1f) << 3) | (function & 0x7));
+}
diff --git a/sys/boot/i386/libi386/comconsole.c b/sys/boot/i386/libi386/comconsole.c
index fa2b1b5..bf0d67b 100644
--- a/sys/boot/i386/libi386/comconsole.c
+++ b/sys/boot/i386/libi386/comconsole.c
@@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$");
#include <bootstrap.h>
#include <machine/cpufunc.h>
#include <dev/ic/ns16550.h>
+#include <dev/pci/pcireg.h>
#include "libi386.h"
#define COMC_FMT 0x3 /* 8N1 */
@@ -49,14 +50,23 @@ static int comc_init(int arg);
static void comc_putchar(int c);
static int comc_getchar(void);
static int comc_getspeed(void);
+static void set_hw_console_hint(void);
static int comc_ischar(void);
-static int comc_parsespeed(const char *string);
-static void comc_setup(int speed);
+static int comc_parseint(const char *string);
+static uint32_t comc_parse_pcidev(const char *string);
+static int comc_pcidev_set(struct env_var *ev, int flags,
+ const void *value);
+static int comc_pcidev_handle(uint32_t locator);
+static int comc_port_set(struct env_var *ev, int flags,
+ const void *value);
+static void comc_setup(int speed, int port);
static int comc_speed_set(struct env_var *ev, int flags,
const void *value);
static int comc_started;
static int comc_curspeed;
+static int comc_port = COMPORT;
+static uint32_t comc_locator;
struct console comconsole = {
"comconsole",
@@ -72,9 +82,10 @@ struct console comconsole = {
static void
comc_probe(struct console *cp)
{
- char speedbuf[16];
- char *cons, *speedenv;
- int speed;
+ char intbuf[16];
+ char *cons, *env;
+ int speed, port;
+ uint32_t locator;
/* XXX check the BIOS equipment list? */
cp->c_flags |= (C_PRESENTIN | C_PRESENTOUT);
@@ -90,16 +101,40 @@ comc_probe(struct console *cp)
getenv("boot_multicons") != NULL) {
comc_curspeed = comc_getspeed();
}
- speedenv = getenv("comconsole_speed");
- if (speedenv != NULL) {
- speed = comc_parsespeed(speedenv);
+
+ env = getenv("comconsole_speed");
+ if (env != NULL) {
+ speed = comc_parseint(env);
if (speed > 0)
comc_curspeed = speed;
}
- sprintf(speedbuf, "%d", comc_curspeed);
+ sprintf(intbuf, "%d", comc_curspeed);
unsetenv("comconsole_speed");
- env_setenv("comconsole_speed", EV_VOLATILE, speedbuf, comc_speed_set,
+ env_setenv("comconsole_speed", EV_VOLATILE, intbuf, comc_speed_set,
+ env_nounset);
+
+ env = getenv("comconsole_port");
+ if (env != NULL) {
+ port = comc_parseint(env);
+ if (port > 0)
+ comc_port = port;
+ }
+
+ sprintf(intbuf, "%d", comc_port);
+ unsetenv("comconsole_port");
+ env_setenv("comconsole_port", EV_VOLATILE, intbuf, comc_port_set,
+ env_nounset);
+
+ env = getenv("comconsole_pcidev");
+ if (env != NULL) {
+ locator = comc_parse_pcidev(env);
+ if (locator != 0)
+ comc_pcidev_handle(locator);
+ }
+
+ unsetenv("comconsole_pcidev");
+ env_setenv("comconsole_pcidev", EV_VOLATILE, env, comc_pcidev_set,
env_nounset);
}
}
@@ -111,7 +146,7 @@ comc_init(int arg)
return 0;
comc_started = 1;
- comc_setup(comc_curspeed);
+ comc_setup(comc_curspeed, comc_port);
return(0);
}
@@ -122,8 +157,8 @@ comc_putchar(int c)
int wait;
for (wait = COMC_TXWAIT; wait > 0; wait--)
- if (inb(COMPORT + com_lsr) & LSR_TXRDY) {
- outb(COMPORT + com_data, (u_char)c);
+ if (inb(comc_port + com_lsr) & LSR_TXRDY) {
+ outb(comc_port + com_data, (u_char)c);
break;
}
}
@@ -131,13 +166,13 @@ comc_putchar(int c)
static int
comc_getchar(void)
{
- return(comc_ischar() ? inb(COMPORT + com_data) : -1);
+ return(comc_ischar() ? inb(comc_port + com_data) : -1);
}
static int
comc_ischar(void)
{
- return(inb(COMPORT + com_lsr) & LSR_RXRDY);
+ return(inb(comc_port + com_lsr) & LSR_RXRDY);
}
static int
@@ -145,13 +180,33 @@ comc_speed_set(struct env_var *ev, int flags, const void *value)
{
int speed;
- if (value == NULL || (speed = comc_parsespeed(value)) <= 0) {
+ if (value == NULL || (speed = comc_parseint(value)) <= 0) {
printf("Invalid speed\n");
return (CMD_ERROR);
}
if (comc_started && comc_curspeed != speed)
- comc_setup(speed);
+ comc_setup(speed, comc_port);
+
+ env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL);
+
+ return (CMD_OK);
+}
+
+static int
+comc_port_set(struct env_var *ev, int flags, const void *value)
+{
+ int port;
+
+ if (value == NULL || (port = comc_parseint(value)) <= 0) {
+ printf("Invalid port\n");
+ return (CMD_ERROR);
+ }
+
+ if (comc_started && comc_port != port) {
+ comc_setup(comc_curspeed, port);
+ set_hw_console_hint();
+ }
env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL);
@@ -159,24 +214,126 @@ comc_speed_set(struct env_var *ev, int flags, const void *value)
}
static void
-comc_setup(int speed)
+set_hw_console_hint(void)
+{
+ char intbuf[64];
+
+ unsetenv("hw.uart.console");
+ sprintf(intbuf, "io:%d,br:%d", comc_port, comc_curspeed);
+ env_setenv("hw.uart.console", EV_VOLATILE, intbuf,
+ env_noset, env_nounset);
+}
+
+/*
+ * Input: bus:dev:func[:bar]. If bar is not specified, it is 0x10.
+ * Output: bar[24:16] bus[15:8] dev[7:3] func[2:0]
+ */
+static uint32_t
+comc_parse_pcidev(const char *string)
+{
+ char *p, *p1;
+ uint8_t bus, dev, func, bar;
+ uint32_t locator;
+ int pres;
+
+ pres = strtol(string, &p, 0);
+ if (p == string || *p != ':' || pres < 0 )
+ return (0);
+ bus = pres;
+ p1 = ++p;
+
+ pres = strtol(p1, &p, 0);
+ if (p == string || *p != ':' || pres < 0 )
+ return (0);
+ dev = pres;
+ p1 = ++p;
+
+ pres = strtol(p1, &p, 0);
+ if (p == string || (*p != ':' && *p != '\0') || pres < 0 )
+ return (0);
+ func = pres;
+
+ if (*p == ':') {
+ p1 = ++p;
+ pres = strtol(p1, &p, 0);
+ if (p == string || *p != '\0' || pres <= 0 )
+ return (0);
+ bar = pres;
+ } else
+ bar = 0x10;
+
+ locator = (bar << 16) | biospci_locator(bus, dev, func);
+ return (locator);
+}
+
+static int
+comc_pcidev_handle(uint32_t locator)
+{
+ char intbuf[64];
+ uint32_t port;
+
+ if (biospci_read_config(locator & 0xffff,
+ (locator & 0xff0000) >> 16, 2, &port) == -1) {
+ printf("Cannot read bar at 0x%x\n", locator);
+ return (CMD_ERROR);
+ }
+ if (!PCI_BAR_IO(port)) {
+ printf("Memory bar at 0x%x\n", locator);
+ return (CMD_ERROR);
+ }
+ port &= PCIM_BAR_IO_BASE;
+
+ sprintf(intbuf, "%d", port);
+ unsetenv("comconsole_port");
+ env_setenv("comconsole_port", EV_VOLATILE, intbuf,
+ comc_port_set, env_nounset);
+
+ comc_setup(comc_curspeed, port);
+ set_hw_console_hint();
+ comc_locator = locator;
+
+ return (CMD_OK);
+}
+
+static int
+comc_pcidev_set(struct env_var *ev, int flags, const void *value)
+{
+ uint32_t locator;
+ int error;
+
+ if (value == NULL || (locator = comc_parse_pcidev(value)) <= 0) {
+ printf("Invalid pcidev\n");
+ return (CMD_ERROR);
+ }
+ if (comc_started && comc_locator != locator) {
+ error = comc_pcidev_handle(locator);
+ if (error != CMD_OK)
+ return (error);
+ }
+ env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL);
+ return (CMD_OK);
+}
+
+static void
+comc_setup(int speed, int port)
{
comc_curspeed = speed;
+ comc_port = port;
- outb(COMPORT + com_cfcr, CFCR_DLAB | COMC_FMT);
- outb(COMPORT + com_dlbl, COMC_BPS(speed) & 0xff);
- outb(COMPORT + com_dlbh, COMC_BPS(speed) >> 8);
- outb(COMPORT + com_cfcr, COMC_FMT);
- outb(COMPORT + com_mcr, MCR_RTS | MCR_DTR);
+ outb(comc_port + com_cfcr, CFCR_DLAB | COMC_FMT);
+ outb(comc_port + com_dlbl, COMC_BPS(speed) & 0xff);
+ outb(comc_port + com_dlbh, COMC_BPS(speed) >> 8);
+ outb(comc_port + com_cfcr, COMC_FMT);
+ outb(comc_port + com_mcr, MCR_RTS | MCR_DTR);
do
- inb(COMPORT + com_data);
- while (inb(COMPORT + com_lsr) & LSR_RXRDY);
+ inb(comc_port + com_data);
+ while (inb(comc_port + com_lsr) & LSR_RXRDY);
}
static int
-comc_parsespeed(const char *speedstr)
+comc_parseint(const char *speedstr)
{
char *p;
int speed;
@@ -196,13 +353,13 @@ comc_getspeed(void)
u_char dlbl;
u_char cfcr;
- cfcr = inb(COMPORT + com_cfcr);
- outb(COMPORT + com_cfcr, CFCR_DLAB | cfcr);
+ cfcr = inb(comc_port + com_cfcr);
+ outb(comc_port + com_cfcr, CFCR_DLAB | cfcr);
- dlbl = inb(COMPORT + com_dlbl);
- dlbh = inb(COMPORT + com_dlbh);
+ dlbl = inb(comc_port + com_dlbl);
+ dlbh = inb(comc_port + com_dlbh);
- outb(COMPORT + com_cfcr, cfcr);
+ outb(comc_port + com_cfcr, cfcr);
divisor = dlbh << 8 | dlbl;
diff --git a/sys/boot/i386/libi386/libi386.h b/sys/boot/i386/libi386/libi386.h
index 8cfe922..b8842ba 100644
--- a/sys/boot/i386/libi386/libi386.h
+++ b/sys/boot/i386/libi386/libi386.h
@@ -97,6 +97,7 @@ extern vm_offset_t high_heap_base; /* for use as the heap */
int biospci_find_devclass(uint32_t class, int index, uint32_t *locator);
int biospci_write_config(uint32_t locator, int offset, int width, uint32_t val);
int biospci_read_config(uint32_t locator, int offset, int width, uint32_t *val);
+uint32_t biospci_locator(int8_t bus, uint8_t device, uint8_t function);
void biosacpi_detect(void);
diff --git a/sys/boot/i386/libi386/pxe.c b/sys/boot/i386/libi386/pxe.c
index 0caee6a..dbb58de 100644
--- a/sys/boot/i386/libi386/pxe.c
+++ b/sys/boot/i386/libi386/pxe.c
@@ -405,6 +405,7 @@ pxe_perror(int err)
return;
}
+#ifdef LOADER_NFS_SUPPORT
/*
* Reach inside the libstand NFS code and dig out an NFS handle
* for the root filesystem.
@@ -515,6 +516,7 @@ pxe_setnfshandle(char *rootpath)
setenv("boot.nfsroot.nfshandlelen", buf, 1);
}
#endif /* OLD_NFSV2 */
+#endif /* LOADER_NFS_SUPPORT */
void
pxenv_call(int func)
diff --git a/sys/boot/i386/libi386/time.c b/sys/boot/i386/libi386/time.c
index 183ac3c..c27dcf6 100644
--- a/sys/boot/i386/libi386/time.c
+++ b/sys/boot/i386/libi386/time.c
@@ -62,7 +62,7 @@ bios_seconds(void)
* Some BIOSes (notably qemu) don't correctly read the RTC
* registers in an atomic way, sometimes returning bogus values.
* Therefore we "debounce" the reading by accepting it only when
- * we got two identical values in succession.
+ * we got 8 identical values in succession.
*
* If we pass midnight, don't wrap back to 0.
*/
@@ -71,14 +71,16 @@ time(time_t *t)
{
static time_t lasttime;
time_t now, check;
- int try;
+ int same, try;
- try = 0;
+ same = try = 0;
check = bios_seconds();
do {
now = check;
check = bios_seconds();
- } while (now != check && ++try < 1000);
+ if (check != now)
+ same = 0;
+ } while (++same < 8 && ++try < 1000);
if (now < lasttime)
now += 24 * 3600;
diff --git a/sys/boot/ofw/common/main.c b/sys/boot/ofw/common/main.c
index 52e69199..940ca63 100644
--- a/sys/boot/ofw/common/main.c
+++ b/sys/boot/ofw/common/main.c
@@ -133,7 +133,7 @@ main(int (*openfirm)(void *))
printf("Memory: %lldKB\n", memsize() / 1024);
OF_getprop(chosen, "bootpath", bootpath, 64);
- ch = index(bootpath, ':');
+ ch = strchr(bootpath, ':');
*ch = '\0';
printf("Booted from: %s\n", bootpath);
diff --git a/sys/boot/ofw/libofw/ofw_net.c b/sys/boot/ofw/libofw/ofw_net.c
index 36600ef..691deda 100644
--- a/sys/boot/ofw/libofw/ofw_net.c
+++ b/sys/boot/ofw/libofw/ofw_net.c
@@ -185,7 +185,7 @@ ofwn_init(struct iodesc *desc, void *machdep_hint)
int pathlen;
pathlen = OF_getprop(chosen, "bootpath", path, 64);
- if ((ch = index(path, ':')) != NULL)
+ if ((ch = strchr(path, ':')) != NULL)
*ch = '\0';
netdev = OF_finddevice(path);
#ifdef __sparc64__
diff --git a/sys/boot/pc98/boot2/boot1.S b/sys/boot/pc98/boot2/boot1.S
index e4f48eb..5c97206 100644
--- a/sys/boot/pc98/boot2/boot1.S
+++ b/sys/boot/pc98/boot2/boot1.S
@@ -219,7 +219,7 @@ read: xor %ax,%ax
jc read_load
and $0xff7f,%si /* SCSI MO */
mov %di,%cx
- shr $16,%di
+ shr $16,%edi
mov %di,%dx
jmp read_load
read_fd: or $0xd000,%si
diff --git a/sys/boot/pc98/libpc98/comconsole.c b/sys/boot/pc98/libpc98/comconsole.c
index e2ba067..c4028db 100644
--- a/sys/boot/pc98/libpc98/comconsole.c
+++ b/sys/boot/pc98/libpc98/comconsole.c
@@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$");
#include <bootstrap.h>
#include <machine/cpufunc.h>
#include <dev/ic/ns16550.h>
+#include <dev/pci/pcireg.h>
#include "libi386.h"
#define COMC_FMT 0x3 /* 8N1 */
@@ -49,14 +50,23 @@ static int comc_init(int arg);
static void comc_putchar(int c);
static int comc_getchar(void);
static int comc_getspeed(void);
+static void set_hw_console_hint(void);
static int comc_ischar(void);
-static int comc_parsespeed(const char *string);
-static void comc_setup(int speed);
+static int comc_parseint(const char *string);
+static uint32_t comc_parse_pcidev(const char *string);
+static int comc_pcidev_set(struct env_var *ev, int flags,
+ const void *value);
+static int comc_pcidev_handle(uint32_t locator);
+static int comc_port_set(struct env_var *ev, int flags,
+ const void *value);
+static void comc_setup(int speed, int port);
static int comc_speed_set(struct env_var *ev, int flags,
const void *value);
static int comc_started;
static int comc_curspeed;
+static int comc_port = COMPORT;
+static uint32_t comc_locator;
struct console comconsole = {
"comconsole",
@@ -72,9 +82,10 @@ struct console comconsole = {
static void
comc_probe(struct console *cp)
{
- char speedbuf[16];
- char *cons, *speedenv;
- int speed;
+ char intbuf[16];
+ char *cons, *env;
+ int speed, port;
+ uint32_t locator;
/* XXX check the BIOS equipment list? */
cp->c_flags |= (C_PRESENTIN | C_PRESENTOUT);
@@ -90,16 +101,40 @@ comc_probe(struct console *cp)
getenv("boot_multicons") != NULL) {
comc_curspeed = comc_getspeed();
}
- speedenv = getenv("comconsole_speed");
- if (speedenv != NULL) {
- speed = comc_parsespeed(speedenv);
+
+ env = getenv("comconsole_speed");
+ if (env != NULL) {
+ speed = comc_parseint(env);
if (speed > 0)
comc_curspeed = speed;
}
- sprintf(speedbuf, "%d", comc_curspeed);
+ sprintf(intbuf, "%d", comc_curspeed);
unsetenv("comconsole_speed");
- env_setenv("comconsole_speed", EV_VOLATILE, speedbuf, comc_speed_set,
+ env_setenv("comconsole_speed", EV_VOLATILE, intbuf, comc_speed_set,
+ env_nounset);
+
+ env = getenv("comconsole_port");
+ if (env != NULL) {
+ port = comc_parseint(env);
+ if (port > 0)
+ comc_port = port;
+ }
+
+ sprintf(intbuf, "%d", comc_port);
+ unsetenv("comconsole_port");
+ env_setenv("comconsole_port", EV_VOLATILE, intbuf, comc_port_set,
+ env_nounset);
+
+ env = getenv("comconsole_pcidev");
+ if (env != NULL) {
+ locator = comc_parse_pcidev(env);
+ if (locator != 0)
+ comc_pcidev_handle(locator);
+ }
+
+ unsetenv("comconsole_pcidev");
+ env_setenv("comconsole_pcidev", EV_VOLATILE, env, comc_pcidev_set,
env_nounset);
}
}
@@ -111,7 +146,7 @@ comc_init(int arg)
return 0;
comc_started = 1;
- comc_setup(comc_curspeed);
+ comc_setup(comc_curspeed, comc_port);
return(0);
}
@@ -122,8 +157,8 @@ comc_putchar(int c)
int wait;
for (wait = COMC_TXWAIT; wait > 0; wait--)
- if (inb(COMPORT + com_lsr) & LSR_TXRDY) {
- outb(COMPORT + com_data, (u_char)c);
+ if (inb(comc_port + com_lsr) & LSR_TXRDY) {
+ outb(comc_port + com_data, (u_char)c);
break;
}
}
@@ -131,13 +166,13 @@ comc_putchar(int c)
static int
comc_getchar(void)
{
- return(comc_ischar() ? inb(COMPORT + com_data) : -1);
+ return(comc_ischar() ? inb(comc_port + com_data) : -1);
}
static int
comc_ischar(void)
{
- return(inb(COMPORT + com_lsr) & LSR_RXRDY);
+ return(inb(comc_port + com_lsr) & LSR_RXRDY);
}
static int
@@ -145,13 +180,33 @@ comc_speed_set(struct env_var *ev, int flags, const void *value)
{
int speed;
- if (value == NULL || (speed = comc_parsespeed(value)) <= 0) {
+ if (value == NULL || (speed = comc_parseint(value)) <= 0) {
printf("Invalid speed\n");
return (CMD_ERROR);
}
if (comc_started && comc_curspeed != speed)
- comc_setup(speed);
+ comc_setup(speed, comc_port);
+
+ env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL);
+
+ return (CMD_OK);
+}
+
+static int
+comc_port_set(struct env_var *ev, int flags, const void *value)
+{
+ int port;
+
+ if (value == NULL || (port = comc_parseint(value)) <= 0) {
+ printf("Invalid port\n");
+ return (CMD_ERROR);
+ }
+
+ if (comc_started && comc_port != port) {
+ comc_setup(comc_curspeed, port);
+ set_hw_console_hint();
+ }
env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL);
@@ -159,24 +214,126 @@ comc_speed_set(struct env_var *ev, int flags, const void *value)
}
static void
-comc_setup(int speed)
+set_hw_console_hint(void)
+{
+ char intbuf[64];
+
+ unsetenv("hw.uart.console");
+ sprintf(intbuf, "io:%d,br:%d", comc_port, comc_curspeed);
+ env_setenv("hw.uart.console", EV_VOLATILE, intbuf,
+ env_noset, env_nounset);
+}
+
+/*
+ * Input: bus:dev:func[:bar]. If bar is not specified, it is 0x10.
+ * Output: bar[24:16] bus[15:8] dev[7:3] func[2:0]
+ */
+static uint32_t
+comc_parse_pcidev(const char *string)
+{
+ char *p, *p1;
+ uint8_t bus, dev, func, bar;
+ uint32_t locator;
+ int pres;
+
+ pres = strtol(string, &p, 0);
+ if (p == string || *p != ':' || pres < 0 )
+ return (0);
+ bus = pres;
+ p1 = ++p;
+
+ pres = strtol(p1, &p, 0);
+ if (p == string || *p != ':' || pres < 0 )
+ return (0);
+ dev = pres;
+ p1 = ++p;
+
+ pres = strtol(p1, &p, 0);
+ if (p == string || (*p != ':' && *p != '\0') || pres < 0 )
+ return (0);
+ func = pres;
+
+ if (*p == ':') {
+ p1 = ++p;
+ pres = strtol(p1, &p, 0);
+ if (p == string || *p != '\0' || pres <= 0 )
+ return (0);
+ bar = pres;
+ } else
+ bar = 0x10;
+
+ locator = (bar << 16) | biospci_locator(bus, dev, func);
+ return (locator);
+}
+
+static int
+comc_pcidev_handle(uint32_t locator)
+{
+ char intbuf[64];
+ uint32_t port;
+
+ if (biospci_read_config(locator & 0xffff,
+ (locator & 0xff0000) >> 16, 2, &port) == -1) {
+ printf("Cannot read bar at 0x%x\n", locator);
+ return (CMD_ERROR);
+ }
+ if (!PCI_BAR_IO(port)) {
+ printf("Memory bar at 0x%x\n", locator);
+ return (CMD_ERROR);
+ }
+ port &= PCIM_BAR_IO_BASE;
+
+ sprintf(intbuf, "%d", port);
+ unsetenv("comconsole_port");
+ env_setenv("comconsole_port", EV_VOLATILE, intbuf,
+ comc_port_set, env_nounset);
+
+ comc_setup(comc_curspeed, port);
+ set_hw_console_hint();
+ comc_locator = locator;
+
+ return (CMD_OK);
+}
+
+static int
+comc_pcidev_set(struct env_var *ev, int flags, const void *value)
+{
+ uint32_t locator;
+ int error;
+
+ if (value == NULL || (locator = comc_parse_pcidev(value)) <= 0) {
+ printf("Invalid pcidev\n");
+ return (CMD_ERROR);
+ }
+ if (comc_started && comc_locator != locator) {
+ error = comc_pcidev_handle(locator);
+ if (error != CMD_OK)
+ return (error);
+ }
+ env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL);
+ return (CMD_OK);
+}
+
+static void
+comc_setup(int speed, int port)
{
comc_curspeed = speed;
+ comc_port = port;
- outb(COMPORT + com_cfcr, CFCR_DLAB | COMC_FMT);
- outb(COMPORT + com_dlbl, COMC_BPS(speed) & 0xff);
- outb(COMPORT + com_dlbh, COMC_BPS(speed) >> 8);
- outb(COMPORT + com_cfcr, COMC_FMT);
- outb(COMPORT + com_mcr, MCR_RTS | MCR_DTR);
+ outb(comc_port + com_cfcr, CFCR_DLAB | COMC_FMT);
+ outb(comc_port + com_dlbl, COMC_BPS(speed) & 0xff);
+ outb(comc_port + com_dlbh, COMC_BPS(speed) >> 8);
+ outb(comc_port + com_cfcr, COMC_FMT);
+ outb(comc_port + com_mcr, MCR_RTS | MCR_DTR);
do
- inb(COMPORT + com_data);
- while (inb(COMPORT + com_lsr) & LSR_RXRDY);
+ inb(comc_port + com_data);
+ while (inb(comc_port + com_lsr) & LSR_RXRDY);
}
static int
-comc_parsespeed(const char *speedstr)
+comc_parseint(const char *speedstr)
{
char *p;
int speed;
@@ -196,13 +353,13 @@ comc_getspeed(void)
u_char dlbl;
u_char cfcr;
- cfcr = inb(COMPORT + com_cfcr);
- outb(COMPORT + com_cfcr, CFCR_DLAB | cfcr);
+ cfcr = inb(comc_port + com_cfcr);
+ outb(comc_port + com_cfcr, CFCR_DLAB | cfcr);
- dlbl = inb(COMPORT + com_dlbl);
- dlbh = inb(COMPORT + com_dlbh);
+ dlbl = inb(comc_port + com_dlbl);
+ dlbh = inb(comc_port + com_dlbh);
- outb(COMPORT + com_cfcr, cfcr);
+ outb(comc_port + com_cfcr, cfcr);
divisor = dlbh << 8 | dlbl;
diff --git a/sys/boot/powerpc/boot1.chrp/Makefile b/sys/boot/powerpc/boot1.chrp/Makefile
index f3f7e4d..71d0ce6 100644
--- a/sys/boot/powerpc/boot1.chrp/Makefile
+++ b/sys/boot/powerpc/boot1.chrp/Makefile
@@ -10,7 +10,6 @@ INSTALLFLAGS= -b
FILES= boot1.hfs
SRCS= boot1.c ashldi3.c
-INTERNALPROG=
NO_MAN=
CFLAGS= -ffreestanding -msoft-float -Os \
diff --git a/sys/boot/powerpc/ps3/ps3mmu.c b/sys/boot/powerpc/ps3/ps3mmu.c
index a7005fb..08dcf75 100644
--- a/sys/boot/powerpc/ps3/ps3mmu.c
+++ b/sys/boot/powerpc/ps3/ps3mmu.c
@@ -113,7 +113,7 @@ ps3mmu_init(int maxmem)
"r"(1 << SLBV_VSID_SHIFT),
"r"((1 << SLBE_ESID_SHIFT) | SLBE_VALID | 1));
- mtmsr(mfmsr() | PSL_IR | PSL_DR | PSL_RI | PSL_ME);
+ mtmsr(PSL_IR | PSL_DR | PSL_RI | PSL_ME);
return (0);
}
diff --git a/sys/boot/userboot/libstand/Makefile b/sys/boot/userboot/libstand/Makefile
index 9e71a24..7bb4638 100644
--- a/sys/boot/userboot/libstand/Makefile
+++ b/sys/boot/userboot/libstand/Makefile
@@ -60,10 +60,10 @@ SRCS+= ntoh.c
.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "powerpc" || \
${MACHINE_CPUARCH} == "sparc64" || ${MACHINE_CPUARCH} == "amd64" || \
${MACHINE_CPUARCH} == "arm"
-SRCS+= bcmp.c bcopy.c bzero.c ffs.c index.c memccpy.c memchr.c memcmp.c \
- memcpy.c memmove.c memset.c qdivrem.c rindex.c strcat.c strchr.c \
- strcmp.c strcpy.c strcspn.c strlen.c strncat.c strncmp.c strncpy.c \
- strpbrk.c strrchr.c strsep.c strspn.c strstr.c strtok.c swab.c
+SRCS+= bcmp.c bcopy.c bzero.c ffs.c memccpy.c memchr.c memcmp.c memcpy.c \
+ memmove.c memset.c qdivrem.c strcat.c strchr.c strcmp.c strcpy.c \
+ strcspn.c strlen.c strncat.c strncmp.c strncpy.c strpbrk.c \
+ strrchr.c strsep.c strspn.c strstr.c strtok.c swab.c
.endif
.if ${MACHINE_CPUARCH} == "arm"
.PATH: ${LIBC}/arm/gen
diff --git a/sys/cam/ata/ata_da.c b/sys/cam/ata/ata_da.c
index f004ee82..ede7221 100644
--- a/sys/cam/ata/ata_da.c
+++ b/sys/cam/ata/ata_da.c
@@ -165,6 +165,11 @@ static struct ada_quirk_entry ada_quirk_table[] =
},
{
/* Samsung Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "*", "SAMSUNG HD155UI*", "*" },
+ /*quirks*/ADA_Q_4K
+ },
+ {
+ /* Samsung Advanced Format (4k) drives */
{ T_DIRECT, SIP_MEDIA_FIXED, "*", "SAMSUNG HD204UI*", "*" },
/*quirks*/ADA_Q_4K
},
@@ -174,6 +179,16 @@ static struct ada_quirk_entry ada_quirk_table[] =
/*quirks*/ADA_Q_4K
},
{
+ /* Seagate Barracuda Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "*", "ST???DM*", "*" },
+ /*quirks*/ADA_Q_4K
+ },
+ {
+ /* Seagate Barracuda Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "*", "ST????DM*", "*" },
+ /*quirks*/ADA_Q_4K
+ },
+ {
/* Seagate Momentus Advanced Format (4k) drives */
{ T_DIRECT, SIP_MEDIA_FIXED, "*", "ST9500423AS*", "*" },
/*quirks*/ADA_Q_4K
@@ -185,6 +200,16 @@ static struct ada_quirk_entry ada_quirk_table[] =
},
{
/* Seagate Momentus Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "*", "ST9640423AS*", "*" },
+ /*quirks*/ADA_Q_4K
+ },
+ {
+ /* Seagate Momentus Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "*", "ST9640424AS*", "*" },
+ /*quirks*/ADA_Q_4K
+ },
+ {
+ /* Seagate Momentus Advanced Format (4k) drives */
{ T_DIRECT, SIP_MEDIA_FIXED, "*", "ST9750420AS*", "*" },
/*quirks*/ADA_Q_4K
},
@@ -194,6 +219,11 @@ static struct ada_quirk_entry ada_quirk_table[] =
/*quirks*/ADA_Q_4K
},
{
+ /* Seagate Momentus Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "*", "ST9750423AS*", "*" },
+ /*quirks*/ADA_Q_4K
+ },
+ {
/* Seagate Momentus Thin Advanced Format (4k) drives */
{ T_DIRECT, SIP_MEDIA_FIXED, "*", "ST???LT*", "*" },
/*quirks*/ADA_Q_4K
@@ -463,13 +493,6 @@ adaclose(struct disk *dp)
if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)
xpt_print(periph->path, "Synchronize cache failed\n");
-
- if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
- cam_release_devq(ccb->ccb_h.path,
- /*relsim_flags*/0,
- /*reduction*/0,
- /*timeout*/0,
- /*getcount_only*/0);
xpt_release_ccb(ccb);
}
diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c
index 3854b5c..bf8d4cc 100644
--- a/sys/cam/cam_periph.c
+++ b/sys/cam/cam_periph.c
@@ -171,14 +171,16 @@ cam_periph_alloc(periph_ctor_t *periph_ctor,
return (CAM_REQ_INPROG);
} else {
printf("cam_periph_alloc: attempt to re-allocate "
- "valid device %s%d rejected\n",
- periph->periph_name, periph->unit_number);
+ "valid device %s%d rejected flags %#x "
+ "refcount %d\n", periph->periph_name,
+ periph->unit_number, periph->flags,
+ periph->refcount);
}
return (CAM_REQ_INVALID);
}
periph = (struct cam_periph *)malloc(sizeof(*periph), M_CAMPERIPH,
- M_NOWAIT);
+ M_NOWAIT|M_ZERO);
if (periph == NULL)
return (CAM_RESRC_UNAVAIL);
@@ -190,7 +192,6 @@ cam_periph_alloc(periph_ctor_t *periph_ctor,
path_id = xpt_path_path_id(path);
target_id = xpt_path_target_id(path);
lun_id = xpt_path_lun_id(path);
- bzero(periph, sizeof(*periph));
cam_init_pinfo(&periph->pinfo);
periph->periph_start = periph_start;
periph->periph_dtor = periph_dtor;
@@ -305,17 +306,20 @@ cam_periph_find(struct cam_path *path, char *name)
}
/*
- * Find a peripheral structure with the specified path, target, lun,
- * and (optionally) type. If the name is NULL, this function will return
- * the first peripheral driver that matches the specified path.
+ * Find peripheral driver instances attached to the specified path.
*/
int
cam_periph_list(struct cam_path *path, struct sbuf *sb)
{
+ struct sbuf local_sb;
struct periph_driver **p_drv;
struct cam_periph *periph;
int count;
+ int sbuf_alloc_len;
+ sbuf_alloc_len = 16;
+retry:
+ sbuf_new(&local_sb, NULL, sbuf_alloc_len, SBUF_FIXEDLEN);
count = 0;
xpt_lock_buses();
for (p_drv = periph_drivers; *p_drv != NULL; p_drv++) {
@@ -324,49 +328,71 @@ cam_periph_list(struct cam_path *path, struct sbuf *sb)
if (xpt_path_comp(periph->path, path) != 0)
continue;
- if (sbuf_len(sb) != 0)
- sbuf_cat(sb, ",");
+ if (sbuf_len(&local_sb) != 0)
+ sbuf_cat(&local_sb, ",");
- sbuf_printf(sb, "%s%d", periph->periph_name,
+ sbuf_printf(&local_sb, "%s%d", periph->periph_name,
periph->unit_number);
+
+ if (sbuf_error(&local_sb) == ENOMEM) {
+ sbuf_alloc_len *= 2;
+ xpt_unlock_buses();
+ sbuf_delete(&local_sb);
+ goto retry;
+ }
count++;
}
}
xpt_unlock_buses();
+ sbuf_finish(&local_sb);
+ sbuf_cpy(sb, sbuf_data(&local_sb));
+ sbuf_delete(&local_sb);
return (count);
}
cam_status
cam_periph_acquire(struct cam_periph *periph)
{
+ cam_status status;
+ status = CAM_REQ_CMP_ERR;
if (periph == NULL)
- return(CAM_REQ_CMP_ERR);
+ return (status);
xpt_lock_buses();
- periph->refcount++;
+ if ((periph->flags & CAM_PERIPH_INVALID) == 0) {
+ periph->refcount++;
+ status = CAM_REQ_CMP;
+ }
xpt_unlock_buses();
- return(CAM_REQ_CMP);
+ return (status);
}
void
-cam_periph_release_locked(struct cam_periph *periph)
+cam_periph_release_locked_buses(struct cam_periph *periph)
{
-
- if (periph == NULL)
- return;
-
- xpt_lock_buses();
if (periph->refcount != 0) {
periph->refcount--;
} else {
- xpt_print(periph->path, "%s: release %p when refcount is zero\n ", __func__, periph);
+ panic("%s: release of %p when refcount is zero\n ", __func__,
+ periph);
}
if (periph->refcount == 0
&& (periph->flags & CAM_PERIPH_INVALID)) {
camperiphfree(periph);
}
+}
+
+void
+cam_periph_release_locked(struct cam_periph *periph)
+{
+
+ if (periph == NULL)
+ return;
+
+ xpt_lock_buses();
+ cam_periph_release_locked_buses(periph);
xpt_unlock_buses();
}
@@ -1812,9 +1838,6 @@ cam_periph_error(union ccb *ccb, cam_flags camflags,
error = EIO;
break;
case CAM_SEL_TIMEOUT:
- {
- struct cam_path *newpath;
-
if ((camflags & CAM_RETRY_SELTO) != 0) {
if (ccb->ccb_h.retry_count > 0 &&
(periph->flags & CAM_PERIPH_INVALID) == 0) {
@@ -1837,12 +1860,30 @@ cam_periph_error(union ccb *ccb, cam_flags camflags,
}
action_string = "Retries exhausted";
}
+ /* FALLTHROUGH */
+ case CAM_DEV_NOT_THERE:
+ {
+ struct cam_path *newpath;
+ lun_id_t lun_id;
+
error = ENXIO;
+
+ /*
+ * For a selection timeout, we consider all of the LUNs on
+ * the target to be gone. If the status is CAM_DEV_NOT_THERE,
+ * then we only get rid of the device(s) specified by the
+ * path in the original CCB.
+ */
+ if (status == CAM_DEV_NOT_THERE)
+ lun_id = xpt_path_lun_id(ccb->ccb_h.path);
+ else
+ lun_id = CAM_LUN_WILDCARD;
+
/* Should we do more if we can't create the path?? */
if (xpt_create_path(&newpath, periph,
xpt_path_path_id(ccb->ccb_h.path),
xpt_path_target_id(ccb->ccb_h.path),
- CAM_LUN_WILDCARD) != CAM_REQ_CMP)
+ lun_id) != CAM_REQ_CMP)
break;
/*
@@ -1855,7 +1896,6 @@ cam_periph_error(union ccb *ccb, cam_flags camflags,
}
case CAM_REQ_INVALID:
case CAM_PATH_INVALID:
- case CAM_DEV_NOT_THERE:
case CAM_NO_HBA:
case CAM_PROVIDE_FAIL:
case CAM_REQ_TOO_BIG:
diff --git a/sys/cam/cam_periph.h b/sys/cam/cam_periph.h
index 58bfd7b..6c232ca 100644
--- a/sys/cam/cam_periph.h
+++ b/sys/cam/cam_periph.h
@@ -119,6 +119,7 @@ struct cam_periph {
#define CAM_PERIPH_NEW_DEV_FOUND 0x10
#define CAM_PERIPH_RECOVERY_INPROG 0x20
#define CAM_PERIPH_SENSE_INPROG 0x40
+#define CAM_PERIPH_FREE 0x80
u_int32_t immediate_priority;
u_int32_t refcount;
SLIST_HEAD(, ccb_hdr) ccb_list; /* For "immediate" requests */
@@ -146,6 +147,7 @@ int cam_periph_list(struct cam_path *, struct sbuf *);
cam_status cam_periph_acquire(struct cam_periph *periph);
void cam_periph_release(struct cam_periph *periph);
void cam_periph_release_locked(struct cam_periph *periph);
+void cam_periph_release_locked_buses(struct cam_periph *periph);
int cam_periph_hold(struct cam_periph *periph, int priority);
void cam_periph_unhold(struct cam_periph *periph);
void cam_periph_invalidate(struct cam_periph *periph);
diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c
index 000e48a..7b639a9 100644
--- a/sys/cam/cam_xpt.c
+++ b/sys/cam/cam_xpt.c
@@ -2026,12 +2026,24 @@ xptbustraverse(struct cam_eb *start_bus, xpt_busfunc_t *tr_func, void *arg)
for (bus = (start_bus ? start_bus : TAILQ_FIRST(&xsoftc.xpt_busses));
bus != NULL;
bus = next_bus) {
- next_bus = TAILQ_NEXT(bus, links);
+ bus->refcount++;
+
+ /*
+ * XXX The locking here is obviously very complex. We
+ * should work to simplify it.
+ */
mtx_unlock(&xsoftc.xpt_topo_lock);
CAM_SIM_LOCK(bus->sim);
retval = tr_func(bus, arg);
CAM_SIM_UNLOCK(bus->sim);
+
+ mtx_lock(&xsoftc.xpt_topo_lock);
+ next_bus = TAILQ_NEXT(bus, links);
+ mtx_unlock(&xsoftc.xpt_topo_lock);
+
+ xpt_release_bus(bus);
+
if (retval == 0)
return(retval);
mtx_lock(&xsoftc.xpt_topo_lock);
@@ -2086,10 +2098,14 @@ xpttargettraverse(struct cam_eb *bus, struct cam_et *start_target,
TAILQ_FIRST(&bus->et_entries));
target != NULL; target = next_target) {
- next_target = TAILQ_NEXT(target, links);
+ target->refcount++;
retval = tr_func(target, arg);
+ next_target = TAILQ_NEXT(target, links);
+
+ xpt_release_target(target);
+
if (retval == 0)
return(retval);
}
@@ -2110,10 +2126,22 @@ xptdevicetraverse(struct cam_et *target, struct cam_ed *start_device,
device != NULL;
device = next_device) {
- next_device = TAILQ_NEXT(device, links);
+ /*
+ * Hold a reference so the current device does not go away
+ * on us.
+ */
+ device->refcount++;
retval = tr_func(device, arg);
+ /*
+ * Grab our next pointer before we release the current
+ * device.
+ */
+ next_device = TAILQ_NEXT(device, links);
+
+ xpt_release_device(device);
+
if (retval == 0)
return(retval);
}
@@ -2130,18 +2158,57 @@ xptperiphtraverse(struct cam_ed *device, struct cam_periph *start_periph,
retval = 1;
+ xpt_lock_buses();
for (periph = (start_periph ? start_periph :
SLIST_FIRST(&device->periphs));
periph != NULL;
periph = next_periph) {
- next_periph = SLIST_NEXT(periph, periph_links);
+
+ /*
+ * In this case, we want to show peripherals that have been
+ * invalidated, but not peripherals that are scheduled to
+ * be freed. So instead of calling cam_periph_acquire(),
+ * which will fail if the periph has been invalidated, we
+ * just check for the free flag here. If it is free, we
+ * skip to the next periph.
+ */
+ if (periph->flags & CAM_PERIPH_FREE) {
+ next_periph = SLIST_NEXT(periph, periph_links);
+ continue;
+ }
+
+ /*
+ * Acquire a reference to this periph while we call the
+ * traversal function, so it can't go away.
+ */
+ periph->refcount++;
+
+ xpt_unlock_buses();
retval = tr_func(periph, arg);
+
+ /*
+ * We need the lock for list traversal.
+ */
+ xpt_lock_buses();
+
+ /*
+ * Grab the next peripheral before we release this one, so
+ * our next pointer is still valid.
+ */
+ next_periph = SLIST_NEXT(periph, periph_links);
+
+ cam_periph_release_locked_buses(periph);
+
if (retval == 0)
- return(retval);
+ goto bailout_done;
}
+bailout_done:
+
+ xpt_unlock_buses();
+
return(retval);
}
@@ -2188,15 +2255,48 @@ xptpdperiphtraverse(struct periph_driver **pdrv,
TAILQ_FIRST(&(*pdrv)->units)); periph != NULL;
periph = next_periph) {
- next_periph = TAILQ_NEXT(periph, unit_links);
- retval = tr_func(periph, arg);
- if (retval == 0) {
- xpt_unlock_buses();
- return(retval);
+ /*
+ * In this case, we want to show peripherals that have been
+ * invalidated, but not peripherals that are scheduled to
+ * be freed. So instead of calling cam_periph_acquire(),
+ * which will fail if the periph has been invalidated, we
+ * just check for the free flag here. If it is free, we
+ * skip to the next periph.
+ */
+ if (periph->flags & CAM_PERIPH_FREE) {
+ next_periph = TAILQ_NEXT(periph, unit_links);
+ continue;
}
+
+ /*
+ * Acquire a reference to this periph while we call the
+ * traversal function, so it can't go away.
+ */
+ periph->refcount++;
+
+ /*
+ * XXX KDM we have the toplogy lock here, but in
+ * xptperiphtraverse(), we drop it before calling the
+ * traversal function. Which is correct?
+ */
+ retval = tr_func(periph, arg);
+
+ /*
+ * Grab the next peripheral before we release this one, so
+ * our next pointer is still valid.
+ */
+ next_periph = TAILQ_NEXT(periph, unit_links);
+
+ cam_periph_release_locked_buses(periph);
+
+ if (retval == 0)
+ goto bailout_done;
}
+bailout_done:
+
xpt_unlock_buses();
+
return(retval);
}
diff --git a/sys/cam/ctl/README.ctl.txt b/sys/cam/ctl/README.ctl.txt
new file mode 100644
index 0000000..4ccbadf
--- /dev/null
+++ b/sys/cam/ctl/README.ctl.txt
@@ -0,0 +1,449 @@
+/* $FreeBSD$ */
+
+CTL - CAM Target Layer Description
+
+Revision 1.4 (December 29th, 2011)
+Ken Merry <ken@FreeBSD.org>
+
+Table of Contents:
+=================
+
+Introduction
+Features
+Configuring and Running CTL
+Revision 1.N Changes
+To Do List
+Code Roadmap
+Userland Commands
+
+Introduction:
+============
+
+CTL is a disk and processor device emulation subsystem originally written
+for Copan Systems under Linux starting in 2003. It has been shipping in
+Copan (now SGI) products since 2005.
+
+It was ported to FreeBSD in 2008, and thanks to an agreement between SGI
+(who acquired Copan's assets in 2010) and Spectra Logic in 2010, CTL is
+available under a BSD-style license. The intent behind the agreement was
+that Spectra would work to get CTL into the FreeBSD tree.
+
+Features:
+========
+
+ - Disk and processor device emulation.
+ - Tagged queueing
+ - SCSI task attribute support (ordered, head of queue, simple tags)
+ - SCSI implicit command ordering support. (e.g. if a read follows a mode
+ select, the read will be blocked until the mode select completes.)
+ - Full task management support (abort, LUN reset, target reset, etc.)
+ - Support for multiple ports
+ - Support for multiple simultaneous initiators
+ - Support for multiple simultaneous backing stores
+ - Persistent reservation support
+ - Mode sense/select support
+ - Error injection support
+ - High Availability support (1)
+ - All I/O handled in-kernel, no userland context switch overhead.
+
+(1) HA Support is just an API stub, and needs much more to be fully
+ functional. See the to-do list below.
+
+Configuring and Running CTL:
+===========================
+
+ - After applying the CTL patchset to your tree, build world and install it
+ on your target system.
+
+ - Add 'device ctl' to your kernel configuration file.
+
+ - If you're running with a 8Gb or 4Gb Qlogic FC board, add
+ 'options ISP_TARGET_MODE' to your kernel config file. Keep in mind that
+ the isp(4) driver can run in target or initiator mode, but not both on
+ the same machine. 'device ispfw' or loading the ispfw module is also
+ recommended.
+
+ - Rebuild and install a new kernel.
+
+ - Reboot with the new kernel.
+
+ - To add a LUN with the RAM disk backend:
+
+ ctladm create -b ramdisk -s 10485760000000000000
+ ctladm port -o on
+
+ - You should now see the CTL disk LUN through camcontrol devlist:
+
+scbus6 on ctl2cam0 bus 0:
+<FREEBSD CTLDISK 0001> at scbus6 target 1 lun 0 (da24,pass32)
+<> at scbus6 target -1 lun -1 ()
+
+ This is visible through the CTL CAM SIM. This allows using CTL without
+ any physical hardware. You should be able to issue any normal SCSI
+ commands to the device via the pass(4)/da(4) devices.
+
+ If any target-capable HBAs are in the system (e.g. isp(4)), and have
+ target mode enabled, you should now also be able to see the CTL LUNs via
+ that target interface.
+
+ Note that all CTL LUNs are presented to all frontends. There is no
+ LUN masking, or separate, per-port configuration.
+
+ - Note that the ramdisk backend is a "fake" ramdisk. That is, it is
+ backed by a small amount of RAM that is used for all I/O requests. This
+ is useful for performance testing, but not for any data integrity tests.
+
+ - To add a LUN with the block/file backend:
+
+ truncate -s +1T myfile
+ ctladm create -b block -o file=myfile
+ ctladm port -o on
+
+ - You can also see a list of LUNs and their backends like this:
+
+# ctladm devlist
+LUN Backend Size (Blocks) BS Serial Number Device ID
+ 0 block 2147483648 512 MYSERIAL 0 MYDEVID 0
+ 1 block 2147483648 512 MYSERIAL 1 MYDEVID 1
+ 2 block 2147483648 512 MYSERIAL 2 MYDEVID 2
+ 3 block 2147483648 512 MYSERIAL 3 MYDEVID 3
+ 4 block 2147483648 512 MYSERIAL 4 MYDEVID 4
+ 5 block 2147483648 512 MYSERIAL 5 MYDEVID 5
+ 6 block 2147483648 512 MYSERIAL 6 MYDEVID 6
+ 7 block 2147483648 512 MYSERIAL 7 MYDEVID 7
+ 8 block 2147483648 512 MYSERIAL 8 MYDEVID 8
+ 9 block 2147483648 512 MYSERIAL 9 MYDEVID 9
+ 10 block 2147483648 512 MYSERIAL 10 MYDEVID 10
+ 11 block 2147483648 512 MYSERIAL 11 MYDEVID 11
+
+ - You can see the LUN type and backing store for block/file backend LUNs
+ like this:
+
+# ctladm devlist -v
+LUN Backend Size (Blocks) BS Serial Number Device ID
+ 0 block 2147483648 512 MYSERIAL 0 MYDEVID 0
+ lun_type=0
+ num_threads=14
+ file=testdisk0
+ 1 block 2147483648 512 MYSERIAL 1 MYDEVID 1
+ lun_type=0
+ num_threads=14
+ file=testdisk1
+ 2 block 2147483648 512 MYSERIAL 2 MYDEVID 2
+ lun_type=0
+ num_threads=14
+ file=testdisk2
+ 3 block 2147483648 512 MYSERIAL 3 MYDEVID 3
+ lun_type=0
+ num_threads=14
+ file=testdisk3
+ 4 block 2147483648 512 MYSERIAL 4 MYDEVID 4
+ lun_type=0
+ num_threads=14
+ file=testdisk4
+ 5 block 2147483648 512 MYSERIAL 5 MYDEVID 5
+ lun_type=0
+ num_threads=14
+ file=testdisk5
+ 6 block 2147483648 512 MYSERIAL 6 MYDEVID 6
+ lun_type=0
+ num_threads=14
+ file=testdisk6
+ 7 block 2147483648 512 MYSERIAL 7 MYDEVID 7
+ lun_type=0
+ num_threads=14
+ file=testdisk7
+ 8 block 2147483648 512 MYSERIAL 8 MYDEVID 8
+ lun_type=0
+ num_threads=14
+ file=testdisk8
+ 9 block 2147483648 512 MYSERIAL 9 MYDEVID 9
+ lun_type=0
+ num_threads=14
+ file=testdisk9
+ 10 ramdisk 0 0 MYSERIAL 0 MYDEVID 0
+ lun_type=3
+ 11 ramdisk 204800000000000 512 MYSERIAL 1 MYDEVID 1
+ lun_type=0
+
+
+Revision 1.4 Changes
+====================
+ - Added in the second HA mode (where CTL does the data transfers instead
+ of having data transfers done below CTL), and abstracted out the Copan
+ HA API.
+
+ - Fixed the phantom device problem in the CTL CAM SIM and improved the
+ CAM SIM to automatically trigger a rescan when the port is enabled and
+ disabled.
+
+ - Made the number of threads in the block backend configurable via sysctl,
+ loader tunable and the ctladm command line. (You can now specify
+ -o num_threads=4 when creating a LUN with ctladm create.)
+
+ - Fixed some LUN selection issues in ctlstat(8) and allowed for selection
+ of LUN numbers up to 1023.
+
+ - General cleanup.
+
+ - This version intended for public release.
+
+Revision 1.3 Changes
+====================
+ - Added descriptor sense support to CTL. It can be enabled through the
+ control mode page (10), but is disabled by default.
+
+ - Improved error injection support. The number of errors that can be
+ injected with 'ctladm inject' has been increased, and any arbitrary
+ sense data may now be injected as well.
+
+ - The port infrastructure has been revamped. Individual ports and types
+ of ports may now be enabled and disabled from the command line. ctladm
+ now has the ability to set the WWNN and WWPN for each port.
+
+ - The block backend can now send multiple I/Os to backing files. Multiple
+ writes are only allowed for ZFS, but multiple readers are allowed for
+ any filesystem.
+
+ - The block and ramdisk backends now support setting the LUN blocksize.
+ There are some restrictions when the backing device is a block device,
+ but otherwise the blocksize may be set to anything.
+
+Revision 1.2 Changes
+====================
+
+ - CTL initialization process has been revamped. Instead of using an
+ ad-hoc method, it is now sequenced through SYSINIT() calls.
+
+ - A block/file backend has been added. This allows using arbitrary files
+ or block devices as a backing store.
+
+ - The userland LUN configuration interface has been completely rewritten.
+ Configuration is now done out of band.
+
+ - The ctladm(8) command line interface has been revamped, and is now
+ similar to camcontrol(8).
+
+To Do List:
+==========
+
+ - Make CTL buildable as a module. Work needs to be done on initialization,
+ and on freeing resources and LUNs when it is built as a module.
+
+ - Use devstat(9) for CTL's statistics collection. CTL uses a home-grown
+ statistics collection system that is similar to devstat(9). ctlstat
+ should be retired in favor of iostat, etc., once aggregation modes are
+ available in iostat to match the behavior of ctlstat -t and dump modes
+ are available to match the behavior of ctlstat -d/ctlstat -J.
+
+ - ZFS ARC backend for CTL. Since ZFS copies all I/O into the ARC
+ (Adaptive Replacement Cache), running the block/file backend on top of a
+ ZFS-backed zdev or file will involve an extra set of copies. The
+ optimal solution for backing targets served by CTL with ZFS would be to
+ allocate buffers out of the ARC directly, and DMA to/from them directly.
+ That would eliminate an extra data buffer allocation and copy.
+
+ - Switch CTL over to using CAM CCBs instead of its own union ctl_io. This
+ will likely require a significant amount of work, but will eliminate
+ another data structure in the stack, more memory allocations, etc. This
+ will also require changes to the CAM CCB structure to support CTL.
+
+ - Full-featured High Availability support. The HA API that is in ctl_ha.h
+ is essentially a renamed version of Copan's HA API. There is no
+ substance to it, but it remains in CTL to show what needs to be done to
+ implement active/active HA from a CTL standpoint. The things that would
+ need to be done include:
+ - A kernel level software API for message passing as well as DMA
+ between at least two nodes.
+ - Hardware support and drivers for inter-node communication. This
+ could be as simples as ethernet hardware and drivers.
+ - A "supervisor", or startup framework to control and coordinate
+ HA startup, failover (going from active/active to single mode),
+ and failback (going from single mode to active/active).
+ - HA support in other components of the stack. The goal behind HA
+ is that one node can fail and another node can seamlessly take
+ over handling I/O requests. This requires support from pretty
+ much every component in the storage stack, from top to bottom.
+ CTL is one piece of it, but you also need support in the RAID
+ stack/filesystem/backing store. You also need full configuration
+ mirroring, and all peer nodes need to be able to talk to the
+ underlying storage hardware.
+
+Code Roadmap:
+============
+
+CTL has the concept of pluggable frontend ports and backends. All
+frontends and backends can be active at the same time. You can have a
+ramdisk-backed LUN present along side a file backed LUN.
+
+ctl.c:
+-----
+
+This is the core of CTL, where all of the command handlers and a lot of
+other things live. Yes, it is large. It started off small and grew to its
+current size over time. Perhaps it can be split into more files at some
+point.
+
+Here is a roadmap of some of the primary functions in ctl.c. Starting here
+and following the various leaf functions will show the command flow.
+
+ctl_queue() This is where commands from the frontend ports come
+ in.
+
+ctl_queue_sense() This is only used for non-packetized SCSI. i.e.
+ parallel SCSI prior to U320 and perhaps U160.
+
+ctl_work_thread() This is the primary work thread, and everything gets
+ executed from there.
+
+ctl_scsiio_precheck() This where all of the initial checks are done, and I/O
+ is either queued for execution or blocked.
+
+ctl_scsiio() This is where the command handler is actually
+ executed. (See ctl_cmd_table.c for the mapping of
+ SCSI opcode to command handler function.)
+
+ctl_done() This is the routine called (or ctl_done_lock()) to
+ initiate the command completion process.
+
+ctl_process_done() This is where command completion actually happens.
+
+ctl.h:
+-----
+
+Basic function declarations and data structures.
+
+ctl_backend.c,
+ctl_backend.h:
+-------------
+
+These files define the basic CTL backend API. The comments in the header
+explain the API.
+
+ctl_backend_block.c
+ctl_backend_block.h:
+-------------------
+
+The block and file backend. This allows for using a disk or a file as the
+backing store for a LUN. Multiple threads are started to do I/O to the
+backing device, primarily because the VFS API requires that to get any
+concurrency.
+
+ctl_backend_ramdisk.c:
+---------------------
+
+A "fake" ramdisk backend. It only allocates a small amount of memory to
+act as a source and sink for reads and writes from an initiator. Therefore
+it cannot be used for any real data, but it can be used to test for
+throughput. It can also be used to test initiators' support for extremely
+large LUNs.
+
+ctl_cmd_table.c:
+---------------
+
+This is a table with all 256 possible SCSI opcodes, and command handler
+functions defined for supported opcodes. It is included in ctl.c.
+
+ctl_debug.h:
+-----------
+
+Simplistic debugging support.
+
+ctl_error.c,
+ctl_error.h:
+-----------
+
+CTL-specific wrappers around the CAM sense building functions.
+
+ctl_frontend.c,
+ctl_frontend.h:
+--------------
+
+These files define the basic CTL frontend port API. The comments in the
+header explain the API.
+
+ctl_frontend_cam_sim.c:
+----------------------
+
+This is a CTL frontend port that is also a CAM SIM. The idea is that this
+frontend allows for using CTL without any target-capable hardware. So any
+LUNs you create in CTL are visible via this port.
+
+
+ctl_frontend_internal.c
+ctl_frontend_internal.h:
+-----------------------
+
+This is a frontend port written for Copan to do some system-specific tasks
+that required sending commands into CTL from inside the kernel. This isn't
+entirely relevant to FreeBSD in general, but can perhaps be repurposed or
+removed later.
+
+ctl_ha.h:
+--------
+
+This is a stubbed-out High Availability API. See the comments in the
+header and the description of what is needed as far as HA support above.
+
+ctl_io.h:
+--------
+
+This defines most of the core CTL I/O structures. union ctl_io is
+conceptually very similar to CAM's union ccb.
+
+ctl_ioctl.h:
+-----------
+
+This defines all ioctls available through the CTL character device, and
+the data structures needed for those ioctls.
+
+ctl_mem_pool.c
+ctl_mem_pool.h:
+--------------
+
+Generic memory pool implementation. This is currently only used by the
+internal frontend. The internal frontend can probably be rewritten to use
+UMA zones and this can be removed.
+
+ctl_private.h:
+-------------
+
+Private data structres (e.g. CTL softc) and function prototypes. This also
+includes the SCSI vendor and product names used by CTL.
+
+ctl_scsi_all.c
+ctl_scsi_all.h:
+--------------
+
+CTL wrappers around CAM sense printing functions.
+
+ctl_ser_table.c:
+---------------
+
+Command serialization table. This defines what happens when one type of
+command is followed by another type of command. e.g., what do you do when
+you have a mode select followed by a write? You block the write until the
+mode select is complete. That is defined in this table.
+
+ctl_util.c
+ctl_util.h:
+----------
+
+CTL utility functions, primarily designed to be used from userland. See
+ctladm for the primary consumer of these functions. These include CDB
+building functions.
+
+scsi_ctl.c:
+----------
+
+CAM target peripheral driver and CTL frontend port. This is the path into
+CTL for commands from target-capable hardware/SIMs.
+
+Userland Commands:
+=================
+
+ctladm(8) fills a role similar to camcontrol(8). It allow configuring LUNs,
+issuing commands, injecting errors and various other control functions.
+
+ctlstat(8) fills a role similar to iostat(8). It reports I/O statistics
+for CTL.
diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c
new file mode 100644
index 0000000..7a36509
--- /dev/null
+++ b/sys/cam/ctl/ctl.c
@@ -0,0 +1,13085 @@
+/*-
+ * Copyright (c) 2003-2009 Silicon Graphics International Corp.
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl.c#8 $
+ */
+/*
+ * CAM Target Layer, a SCSI device emulation subsystem.
+ *
+ * Author: Ken Merry <ken@FreeBSD.org>
+ */
+
+#define _CTL_C
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/kernel.h>
+#include <sys/types.h>
+#include <sys/kthread.h>
+#include <sys/bio.h>
+#include <sys/fcntl.h>
+#include <sys/lock.h>
+#include <sys/mutex.h>
+#include <sys/condvar.h>
+#include <sys/malloc.h>
+#include <sys/conf.h>
+#include <sys/ioccom.h>
+#include <sys/queue.h>
+#include <sys/sbuf.h>
+#include <sys/endian.h>
+#include <sys/sysctl.h>
+
+#include <cam/cam.h>
+#include <cam/scsi/scsi_all.h>
+#include <cam/scsi/scsi_da.h>
+#include <cam/ctl/ctl_io.h>
+#include <cam/ctl/ctl.h>
+#include <cam/ctl/ctl_frontend.h>
+#include <cam/ctl/ctl_frontend_internal.h>
+#include <cam/ctl/ctl_util.h>
+#include <cam/ctl/ctl_backend.h>
+#include <cam/ctl/ctl_ioctl.h>
+#include <cam/ctl/ctl_ha.h>
+#include <cam/ctl/ctl_private.h>
+#include <cam/ctl/ctl_debug.h>
+#include <cam/ctl/ctl_scsi_all.h>
+#include <cam/ctl/ctl_error.h>
+
+struct ctl_softc *control_softc = NULL;
+
+/*
+ * The default is to run with CTL_DONE_THREAD turned on. Completed
+ * transactions are queued for processing by the CTL work thread. When
+ * CTL_DONE_THREAD is not defined, completed transactions are processed in
+ * the caller's context.
+ */
+#define CTL_DONE_THREAD
+
+/*
+ * * Use the serial number and device ID provided by the backend, rather than
+ * * making up our own.
+ * */
+#define CTL_USE_BACKEND_SN
+
+/*
+ * Size and alignment macros needed for Copan-specific HA hardware. These
+ * can go away when the HA code is re-written, and uses busdma for any
+ * hardware.
+ */
+#define CTL_ALIGN_8B(target, source, type) \
+ if (((uint32_t)source & 0x7) != 0) \
+ target = (type)(source + (0x8 - ((uint32_t)source & 0x7)));\
+ else \
+ target = (type)source;
+
+#define CTL_SIZE_8B(target, size) \
+ if ((size & 0x7) != 0) \
+ target = size + (0x8 - (size & 0x7)); \
+ else \
+ target = size;
+
+#define CTL_ALIGN_8B_MARGIN 16
+
+/*
+ * Template mode pages.
+ */
+
+/*
+ * Note that these are default values only. The actual values will be
+ * filled in when the user does a mode sense.
+ */
+static struct copan_power_subpage power_page_default = {
+ /*page_code*/ PWR_PAGE_CODE | SMPH_SPF,
+ /*subpage*/ PWR_SUBPAGE_CODE,
+ /*page_length*/ {(sizeof(struct copan_power_subpage) - 4) & 0xff00,
+ (sizeof(struct copan_power_subpage) - 4) & 0x00ff},
+ /*page_version*/ PWR_VERSION,
+ /* total_luns */ 26,
+ /* max_active_luns*/ PWR_DFLT_MAX_LUNS,
+ /*reserved*/ {0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0}
+};
+
+static struct copan_power_subpage power_page_changeable = {
+ /*page_code*/ PWR_PAGE_CODE | SMPH_SPF,
+ /*subpage*/ PWR_SUBPAGE_CODE,
+ /*page_length*/ {(sizeof(struct copan_power_subpage) - 4) & 0xff00,
+ (sizeof(struct copan_power_subpage) - 4) & 0x00ff},
+ /*page_version*/ 0,
+ /* total_luns */ 0,
+ /* max_active_luns*/ 0,
+ /*reserved*/ {0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0}
+};
+
+static struct copan_aps_subpage aps_page_default = {
+ APS_PAGE_CODE | SMPH_SPF, //page_code
+ APS_SUBPAGE_CODE, //subpage
+ {(sizeof(struct copan_aps_subpage) - 4) & 0xff00,
+ (sizeof(struct copan_aps_subpage) - 4) & 0x00ff}, //page_length
+ APS_VERSION, //page_version
+ 0, //lock_active
+ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0} //reserved
+};
+
+static struct copan_aps_subpage aps_page_changeable = {
+ APS_PAGE_CODE | SMPH_SPF, //page_code
+ APS_SUBPAGE_CODE, //subpage
+ {(sizeof(struct copan_aps_subpage) - 4) & 0xff00,
+ (sizeof(struct copan_aps_subpage) - 4) & 0x00ff}, //page_length
+ 0, //page_version
+ 0, //lock_active
+ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0} //reserved
+};
+
+static struct copan_debugconf_subpage debugconf_page_default = {
+ DBGCNF_PAGE_CODE | SMPH_SPF, /* page_code */
+ DBGCNF_SUBPAGE_CODE, /* subpage */
+ {(sizeof(struct copan_debugconf_subpage) - 4) >> 8,
+ (sizeof(struct copan_debugconf_subpage) - 4) >> 0}, /* page_length */
+ DBGCNF_VERSION, /* page_version */
+ {CTL_TIME_IO_DEFAULT_SECS>>8,
+ CTL_TIME_IO_DEFAULT_SECS>>0}, /* ctl_time_io_secs */
+};
+
+static struct copan_debugconf_subpage debugconf_page_changeable = {
+ DBGCNF_PAGE_CODE | SMPH_SPF, /* page_code */
+ DBGCNF_SUBPAGE_CODE, /* subpage */
+ {(sizeof(struct copan_debugconf_subpage) - 4) >> 8,
+ (sizeof(struct copan_debugconf_subpage) - 4) >> 0}, /* page_length */
+ 0, /* page_version */
+ {0xff,0xff}, /* ctl_time_io_secs */
+};
+
+static struct scsi_format_page format_page_default = {
+ /*page_code*/SMS_FORMAT_DEVICE_PAGE,
+ /*page_length*/sizeof(struct scsi_format_page) - 2,
+ /*tracks_per_zone*/ {0, 0},
+ /*alt_sectors_per_zone*/ {0, 0},
+ /*alt_tracks_per_zone*/ {0, 0},
+ /*alt_tracks_per_lun*/ {0, 0},
+ /*sectors_per_track*/ {(CTL_DEFAULT_SECTORS_PER_TRACK >> 8) & 0xff,
+ CTL_DEFAULT_SECTORS_PER_TRACK & 0xff},
+ /*bytes_per_sector*/ {0, 0},
+ /*interleave*/ {0, 0},
+ /*track_skew*/ {0, 0},
+ /*cylinder_skew*/ {0, 0},
+ /*flags*/ SFP_HSEC,
+ /*reserved*/ {0, 0, 0}
+};
+
+static struct scsi_format_page format_page_changeable = {
+ /*page_code*/SMS_FORMAT_DEVICE_PAGE,
+ /*page_length*/sizeof(struct scsi_format_page) - 2,
+ /*tracks_per_zone*/ {0, 0},
+ /*alt_sectors_per_zone*/ {0, 0},
+ /*alt_tracks_per_zone*/ {0, 0},
+ /*alt_tracks_per_lun*/ {0, 0},
+ /*sectors_per_track*/ {0, 0},
+ /*bytes_per_sector*/ {0, 0},
+ /*interleave*/ {0, 0},
+ /*track_skew*/ {0, 0},
+ /*cylinder_skew*/ {0, 0},
+ /*flags*/ 0,
+ /*reserved*/ {0, 0, 0}
+};
+
+static struct scsi_rigid_disk_page rigid_disk_page_default = {
+ /*page_code*/SMS_RIGID_DISK_PAGE,
+ /*page_length*/sizeof(struct scsi_rigid_disk_page) - 2,
+ /*cylinders*/ {0, 0, 0},
+ /*heads*/ CTL_DEFAULT_HEADS,
+ /*start_write_precomp*/ {0, 0, 0},
+ /*start_reduced_current*/ {0, 0, 0},
+ /*step_rate*/ {0, 0},
+ /*landing_zone_cylinder*/ {0, 0, 0},
+ /*rpl*/ SRDP_RPL_DISABLED,
+ /*rotational_offset*/ 0,
+ /*reserved1*/ 0,
+ /*rotation_rate*/ {(CTL_DEFAULT_ROTATION_RATE >> 8) & 0xff,
+ CTL_DEFAULT_ROTATION_RATE & 0xff},
+ /*reserved2*/ {0, 0}
+};
+
+static struct scsi_rigid_disk_page rigid_disk_page_changeable = {
+ /*page_code*/SMS_RIGID_DISK_PAGE,
+ /*page_length*/sizeof(struct scsi_rigid_disk_page) - 2,
+ /*cylinders*/ {0, 0, 0},
+ /*heads*/ 0,
+ /*start_write_precomp*/ {0, 0, 0},
+ /*start_reduced_current*/ {0, 0, 0},
+ /*step_rate*/ {0, 0},
+ /*landing_zone_cylinder*/ {0, 0, 0},
+ /*rpl*/ 0,
+ /*rotational_offset*/ 0,
+ /*reserved1*/ 0,
+ /*rotation_rate*/ {0, 0},
+ /*reserved2*/ {0, 0}
+};
+
+static struct scsi_caching_page caching_page_default = {
+ /*page_code*/SMS_CACHING_PAGE,
+ /*page_length*/sizeof(struct scsi_caching_page) - 2,
+ /*flags1*/ SCP_DISC | SCP_WCE,
+ /*ret_priority*/ 0,
+ /*disable_pf_transfer_len*/ {0xff, 0xff},
+ /*min_prefetch*/ {0, 0},
+ /*max_prefetch*/ {0xff, 0xff},
+ /*max_pf_ceiling*/ {0xff, 0xff},
+ /*flags2*/ 0,
+ /*cache_segments*/ 0,
+ /*cache_seg_size*/ {0, 0},
+ /*reserved*/ 0,
+ /*non_cache_seg_size*/ {0, 0, 0}
+};
+
+static struct scsi_caching_page caching_page_changeable = {
+ /*page_code*/SMS_CACHING_PAGE,
+ /*page_length*/sizeof(struct scsi_caching_page) - 2,
+ /*flags1*/ 0,
+ /*ret_priority*/ 0,
+ /*disable_pf_transfer_len*/ {0, 0},
+ /*min_prefetch*/ {0, 0},
+ /*max_prefetch*/ {0, 0},
+ /*max_pf_ceiling*/ {0, 0},
+ /*flags2*/ 0,
+ /*cache_segments*/ 0,
+ /*cache_seg_size*/ {0, 0},
+ /*reserved*/ 0,
+ /*non_cache_seg_size*/ {0, 0, 0}
+};
+
+static struct scsi_control_page control_page_default = {
+ /*page_code*/SMS_CONTROL_MODE_PAGE,
+ /*page_length*/sizeof(struct scsi_control_page) - 2,
+ /*rlec*/0,
+ /*queue_flags*/0,
+ /*eca_and_aen*/0,
+ /*reserved*/0,
+ /*aen_holdoff_period*/{0, 0}
+};
+
+static struct scsi_control_page control_page_changeable = {
+ /*page_code*/SMS_CONTROL_MODE_PAGE,
+ /*page_length*/sizeof(struct scsi_control_page) - 2,
+ /*rlec*/SCP_DSENSE,
+ /*queue_flags*/0,
+ /*eca_and_aen*/0,
+ /*reserved*/0,
+ /*aen_holdoff_period*/{0, 0}
+};
+
+SYSCTL_NODE(_kern_cam, OID_AUTO, ctl, CTLFLAG_RD, 0, "CAM Target Layer");
+
+/*
+ * XXX KDM move these into the softc.
+ */
+static int rcv_sync_msg;
+static int persis_offset;
+static uint8_t ctl_pause_rtr;
+static int ctl_is_single;
+static int index_to_aps_page;
+
+
+/*
+ * Serial number (0x80), device id (0x83), and supported pages (0x00)
+ */
+#define SCSI_EVPD_NUM_SUPPORTED_PAGES 3
+
+static void ctl_isc_event_handler(ctl_ha_channel chanel, ctl_ha_event event,
+ int param);
+static void ctl_copy_sense_data(union ctl_ha_msg *src, union ctl_io *dest);
+static void ctl_init(void);
+void ctl_shutdown(void);
+static int ctl_open(struct cdev *dev, int flags, int fmt, struct thread *td);
+static int ctl_close(struct cdev *dev, int flags, int fmt, struct thread *td);
+static void ctl_ioctl_online(void *arg);
+static void ctl_ioctl_offline(void *arg);
+static int ctl_ioctl_targ_enable(void *arg, struct ctl_id targ_id);
+static int ctl_ioctl_targ_disable(void *arg, struct ctl_id targ_id);
+static int ctl_ioctl_lun_enable(void *arg, struct ctl_id targ_id, int lun_id);
+static int ctl_ioctl_lun_disable(void *arg, struct ctl_id targ_id, int lun_id);
+static int ctl_ioctl_do_datamove(struct ctl_scsiio *ctsio);
+static int ctl_serialize_other_sc_cmd(struct ctl_scsiio *ctsio, int have_lock);
+static int ctl_ioctl_submit_wait(union ctl_io *io);
+static void ctl_ioctl_datamove(union ctl_io *io);
+static void ctl_ioctl_done(union ctl_io *io);
+static void ctl_ioctl_hard_startstop_callback(void *arg,
+ struct cfi_metatask *metatask);
+static void ctl_ioctl_bbrread_callback(void *arg,struct cfi_metatask *metatask);
+static int ctl_ioctl_fill_ooa(struct ctl_lun *lun, uint32_t *cur_fill_num,
+ struct ctl_ooa *ooa_hdr);
+static int ctl_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag,
+ struct thread *td);
+uint32_t ctl_get_resindex(struct ctl_nexus *nexus);
+uint32_t ctl_port_idx(int port_num);
+#ifdef unused
+static union ctl_io *ctl_malloc_io(ctl_io_type io_type, uint32_t targ_port,
+ uint32_t targ_target, uint32_t targ_lun,
+ int can_wait);
+static void ctl_kfree_io(union ctl_io *io);
+#endif /* unused */
+static void ctl_free_io_internal(union ctl_io *io, int have_lock);
+static int ctl_alloc_lun(struct ctl_softc *ctl_softc, struct ctl_lun *lun,
+ struct ctl_be_lun *be_lun, struct ctl_id target_id);
+static int ctl_free_lun(struct ctl_lun *lun);
+static void ctl_create_lun(struct ctl_be_lun *be_lun);
+/**
+static void ctl_failover_change_pages(struct ctl_softc *softc,
+ struct ctl_scsiio *ctsio, int master);
+**/
+
+static int ctl_do_mode_select(union ctl_io *io);
+static int ctl_pro_preempt(struct ctl_softc *softc, struct ctl_lun *lun,
+ uint64_t res_key, uint64_t sa_res_key,
+ uint8_t type, uint32_t residx,
+ struct ctl_scsiio *ctsio,
+ struct scsi_per_res_out *cdb,
+ struct scsi_per_res_out_parms* param);
+static void ctl_pro_preempt_other(struct ctl_lun *lun,
+ union ctl_ha_msg *msg);
+static void ctl_hndl_per_res_out_on_other_sc(union ctl_ha_msg *msg);
+static int ctl_inquiry_evpd_supported(struct ctl_scsiio *ctsio, int alloc_len);
+static int ctl_inquiry_evpd_serial(struct ctl_scsiio *ctsio, int alloc_len);
+static int ctl_inquiry_evpd_devid(struct ctl_scsiio *ctsio, int alloc_len);
+static int ctl_inquiry_evpd(struct ctl_scsiio *ctsio);
+static int ctl_inquiry_std(struct ctl_scsiio *ctsio);
+static int ctl_get_lba_len(union ctl_io *io, uint64_t *lba, uint32_t *len);
+static ctl_action ctl_extent_check(union ctl_io *io1, union ctl_io *io2);
+static ctl_action ctl_check_for_blockage(union ctl_io *pending_io,
+ union ctl_io *ooa_io);
+static ctl_action ctl_check_ooa(struct ctl_lun *lun, union ctl_io *pending_io,
+ union ctl_io *starting_io);
+static int ctl_check_blocked(struct ctl_lun *lun);
+static int ctl_scsiio_lun_check(struct ctl_softc *ctl_softc,
+ struct ctl_lun *lun,
+ struct ctl_cmd_entry *entry,
+ struct ctl_scsiio *ctsio);
+//static int ctl_check_rtr(union ctl_io *pending_io, struct ctl_softc *softc);
+static void ctl_failover(void);
+static int ctl_scsiio_precheck(struct ctl_softc *ctl_softc,
+ struct ctl_scsiio *ctsio);
+static int ctl_scsiio(struct ctl_scsiio *ctsio);
+
+static int ctl_bus_reset(struct ctl_softc *ctl_softc, union ctl_io *io);
+static int ctl_target_reset(struct ctl_softc *ctl_softc, union ctl_io *io,
+ ctl_ua_type ua_type);
+static int ctl_lun_reset(struct ctl_lun *lun, union ctl_io *io,
+ ctl_ua_type ua_type);
+static int ctl_abort_task(union ctl_io *io);
+static void ctl_run_task_queue(struct ctl_softc *ctl_softc);
+#ifdef CTL_IO_DELAY
+static void ctl_datamove_timer_wakeup(void *arg);
+static void ctl_done_timer_wakeup(void *arg);
+#endif /* CTL_IO_DELAY */
+
+static void ctl_send_datamove_done(union ctl_io *io, int have_lock);
+static void ctl_datamove_remote_write_cb(struct ctl_ha_dt_req *rq);
+static int ctl_datamove_remote_dm_write_cb(union ctl_io *io);
+static void ctl_datamove_remote_write(union ctl_io *io);
+static int ctl_datamove_remote_dm_read_cb(union ctl_io *io);
+static void ctl_datamove_remote_read_cb(struct ctl_ha_dt_req *rq);
+static int ctl_datamove_remote_sgl_setup(union ctl_io *io);
+static int ctl_datamove_remote_xfer(union ctl_io *io, unsigned command,
+ ctl_ha_dt_cb callback);
+static void ctl_datamove_remote_read(union ctl_io *io);
+static void ctl_datamove_remote(union ctl_io *io);
+static int ctl_process_done(union ctl_io *io, int have_lock);
+static void ctl_work_thread(void *arg);
+
+/*
+ * Load the serialization table. This isn't very pretty, but is probably
+ * the easiest way to do it.
+ */
+#include "ctl_ser_table.c"
+
+/*
+ * We only need to define open, close and ioctl routines for this driver.
+ */
+static struct cdevsw ctl_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = 0,
+ .d_open = ctl_open,
+ .d_close = ctl_close,
+ .d_ioctl = ctl_ioctl,
+ .d_name = "ctl",
+};
+
+
+MALLOC_DEFINE(M_CTL, "ctlmem", "Memory used for CTL");
+
+/*
+ * If we have the CAM SIM, we may or may not have another SIM that will
+ * cause CTL to get initialized. If not, we need to initialize it.
+ */
+SYSINIT(ctl_init, SI_SUB_CONFIGURE, SI_ORDER_THIRD, ctl_init, NULL);
+
+static void
+ctl_isc_handler_finish_xfer(struct ctl_softc *ctl_softc,
+ union ctl_ha_msg *msg_info)
+{
+ struct ctl_scsiio *ctsio;
+
+ if (msg_info->hdr.original_sc == NULL) {
+ printf("%s: original_sc == NULL!\n", __func__);
+ /* XXX KDM now what? */
+ return;
+ }
+
+ ctsio = &msg_info->hdr.original_sc->scsiio;
+ ctsio->io_hdr.flags |= CTL_FLAG_IO_ACTIVE;
+ ctsio->io_hdr.msg_type = CTL_MSG_FINISH_IO;
+ ctsio->io_hdr.status = msg_info->hdr.status;
+ ctsio->scsi_status = msg_info->scsi.scsi_status;
+ ctsio->sense_len = msg_info->scsi.sense_len;
+ ctsio->sense_residual = msg_info->scsi.sense_residual;
+ ctsio->residual = msg_info->scsi.residual;
+ memcpy(&ctsio->sense_data, &msg_info->scsi.sense_data,
+ sizeof(ctsio->sense_data));
+ memcpy(&ctsio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].bytes,
+ &msg_info->scsi.lbalen, sizeof(msg_info->scsi.lbalen));;
+ STAILQ_INSERT_TAIL(&ctl_softc->isc_queue, &ctsio->io_hdr, links);
+ ctl_wakeup_thread();
+}
+
+static void
+ctl_isc_handler_finish_ser_only(struct ctl_softc *ctl_softc,
+ union ctl_ha_msg *msg_info)
+{
+ struct ctl_scsiio *ctsio;
+
+ if (msg_info->hdr.serializing_sc == NULL) {
+ printf("%s: serializing_sc == NULL!\n", __func__);
+ /* XXX KDM now what? */
+ return;
+ }
+
+ ctsio = &msg_info->hdr.serializing_sc->scsiio;
+#if 0
+ /*
+ * Attempt to catch the situation where an I/O has
+ * been freed, and we're using it again.
+ */
+ if (ctsio->io_hdr.io_type == 0xff) {
+ union ctl_io *tmp_io;
+ tmp_io = (union ctl_io *)ctsio;
+ printf("%s: %p use after free!\n", __func__,
+ ctsio);
+ printf("%s: type %d msg %d cdb %x iptl: "
+ "%d:%d:%d:%d tag 0x%04x "
+ "flag %#x status %x\n",
+ __func__,
+ tmp_io->io_hdr.io_type,
+ tmp_io->io_hdr.msg_type,
+ tmp_io->scsiio.cdb[0],
+ tmp_io->io_hdr.nexus.initid.id,
+ tmp_io->io_hdr.nexus.targ_port,
+ tmp_io->io_hdr.nexus.targ_target.id,
+ tmp_io->io_hdr.nexus.targ_lun,
+ (tmp_io->io_hdr.io_type ==
+ CTL_IO_TASK) ?
+ tmp_io->taskio.tag_num :
+ tmp_io->scsiio.tag_num,
+ tmp_io->io_hdr.flags,
+ tmp_io->io_hdr.status);
+ }
+#endif
+ ctsio->io_hdr.msg_type = CTL_MSG_FINISH_IO;
+ STAILQ_INSERT_TAIL(&ctl_softc->isc_queue, &ctsio->io_hdr, links);
+ ctl_wakeup_thread();
+}
+
+/*
+ * ISC (Inter Shelf Communication) event handler. Events from the HA
+ * subsystem come in here.
+ */
+static void
+ctl_isc_event_handler(ctl_ha_channel channel, ctl_ha_event event, int param)
+{
+ struct ctl_softc *ctl_softc;
+ union ctl_io *io;
+ struct ctl_prio *presio;
+ ctl_ha_status isc_status;
+
+ ctl_softc = control_softc;
+ io = NULL;
+
+
+#if 0
+ printf("CTL: Isc Msg event %d\n", event);
+#endif
+ if (event == CTL_HA_EVT_MSG_RECV) {
+ union ctl_ha_msg msg_info;
+
+ isc_status = ctl_ha_msg_recv(CTL_HA_CHAN_CTL, &msg_info,
+ sizeof(msg_info), /*wait*/ 0);
+#if 0
+ printf("CTL: msg_type %d\n", msg_info.msg_type);
+#endif
+ if (isc_status != 0) {
+ printf("Error receiving message, status = %d\n",
+ isc_status);
+ return;
+ }
+ mtx_lock(&ctl_softc->ctl_lock);
+
+ switch (msg_info.hdr.msg_type) {
+ case CTL_MSG_SERIALIZE:
+#if 0
+ printf("Serialize\n");
+#endif
+ io = ctl_alloc_io((void *)ctl_softc->othersc_pool);
+ if (io == NULL) {
+ printf("ctl_isc_event_handler: can't allocate "
+ "ctl_io!\n");
+ /* Bad Juju */
+ /* Need to set busy and send msg back */
+ mtx_unlock(&ctl_softc->ctl_lock);
+ msg_info.hdr.msg_type = CTL_MSG_BAD_JUJU;
+ msg_info.hdr.status = CTL_SCSI_ERROR;
+ msg_info.scsi.scsi_status = SCSI_STATUS_BUSY;
+ msg_info.scsi.sense_len = 0;
+ if (ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info,
+ sizeof(msg_info), 0) > CTL_HA_STATUS_SUCCESS){
+ }
+ goto bailout;
+ }
+ ctl_zero_io(io);
+ // populate ctsio from msg_info
+ io->io_hdr.io_type = CTL_IO_SCSI;
+ io->io_hdr.msg_type = CTL_MSG_SERIALIZE;
+ io->io_hdr.original_sc = msg_info.hdr.original_sc;
+#if 0
+ printf("pOrig %x\n", (int)msg_info.original_sc);
+#endif
+ io->io_hdr.flags |= CTL_FLAG_FROM_OTHER_SC |
+ CTL_FLAG_IO_ACTIVE;
+ /*
+ * If we're in serialization-only mode, we don't
+ * want to go through full done processing. Thus
+ * the COPY flag.
+ *
+ * XXX KDM add another flag that is more specific.
+ */
+ if (ctl_softc->ha_mode == CTL_HA_MODE_SER_ONLY)
+ io->io_hdr.flags |= CTL_FLAG_INT_COPY;
+ io->io_hdr.nexus = msg_info.hdr.nexus;
+#if 0
+ printf("targ %d, port %d, iid %d, lun %d\n",
+ io->io_hdr.nexus.targ_target.id,
+ io->io_hdr.nexus.targ_port,
+ io->io_hdr.nexus.initid.id,
+ io->io_hdr.nexus.targ_lun);
+#endif
+ io->scsiio.tag_num = msg_info.scsi.tag_num;
+ io->scsiio.tag_type = msg_info.scsi.tag_type;
+ memcpy(io->scsiio.cdb, msg_info.scsi.cdb,
+ CTL_MAX_CDBLEN);
+ if (ctl_softc->ha_mode == CTL_HA_MODE_XFER) {
+ struct ctl_cmd_entry *entry;
+ uint8_t opcode;
+
+ opcode = io->scsiio.cdb[0];
+ entry = &ctl_cmd_table[opcode];
+ io->io_hdr.flags &= ~CTL_FLAG_DATA_MASK;
+ io->io_hdr.flags |=
+ entry->flags & CTL_FLAG_DATA_MASK;
+ }
+ STAILQ_INSERT_TAIL(&ctl_softc->isc_queue,
+ &io->io_hdr, links);
+ ctl_wakeup_thread();
+ break;
+
+ /* Performed on the Originating SC, XFER mode only */
+ case CTL_MSG_DATAMOVE: {
+ struct ctl_sg_entry *sgl;
+ int i, j;
+
+ io = msg_info.hdr.original_sc;
+ if (io == NULL) {
+ printf("%s: original_sc == NULL!\n", __func__);
+ /* XXX KDM do something here */
+ break;
+ }
+ io->io_hdr.msg_type = CTL_MSG_DATAMOVE;
+ io->io_hdr.flags |= CTL_FLAG_IO_ACTIVE;
+ /*
+ * Keep track of this, we need to send it back over
+ * when the datamove is complete.
+ */
+ io->io_hdr.serializing_sc = msg_info.hdr.serializing_sc;
+
+ if (msg_info.dt.sg_sequence == 0) {
+ /*
+ * XXX KDM we use the preallocated S/G list
+ * here, but we'll need to change this to
+ * dynamic allocation if we need larger S/G
+ * lists.
+ */
+ if (msg_info.dt.kern_sg_entries >
+ sizeof(io->io_hdr.remote_sglist) /
+ sizeof(io->io_hdr.remote_sglist[0])) {
+ printf("%s: number of S/G entries "
+ "needed %u > allocated num %zd\n",
+ __func__,
+ msg_info.dt.kern_sg_entries,
+ sizeof(io->io_hdr.remote_sglist)/
+ sizeof(io->io_hdr.remote_sglist[0]));
+
+ /*
+ * XXX KDM send a message back to
+ * the other side to shut down the
+ * DMA. The error will come back
+ * through via the normal channel.
+ */
+ break;
+ }
+ sgl = io->io_hdr.remote_sglist;
+ memset(sgl, 0,
+ sizeof(io->io_hdr.remote_sglist));
+
+ io->scsiio.kern_data_ptr = (uint8_t *)sgl;
+
+ io->scsiio.kern_sg_entries =
+ msg_info.dt.kern_sg_entries;
+ io->scsiio.rem_sg_entries =
+ msg_info.dt.kern_sg_entries;
+ io->scsiio.kern_data_len =
+ msg_info.dt.kern_data_len;
+ io->scsiio.kern_total_len =
+ msg_info.dt.kern_total_len;
+ io->scsiio.kern_data_resid =
+ msg_info.dt.kern_data_resid;
+ io->scsiio.kern_rel_offset =
+ msg_info.dt.kern_rel_offset;
+ /*
+ * Clear out per-DMA flags.
+ */
+ io->io_hdr.flags &= ~CTL_FLAG_RDMA_MASK;
+ /*
+ * Add per-DMA flags that are set for this
+ * particular DMA request.
+ */
+ io->io_hdr.flags |= msg_info.dt.flags &
+ CTL_FLAG_RDMA_MASK;
+ } else
+ sgl = (struct ctl_sg_entry *)
+ io->scsiio.kern_data_ptr;
+
+ for (i = msg_info.dt.sent_sg_entries, j = 0;
+ i < (msg_info.dt.sent_sg_entries +
+ msg_info.dt.cur_sg_entries); i++, j++) {
+ sgl[i].addr = msg_info.dt.sg_list[j].addr;
+ sgl[i].len = msg_info.dt.sg_list[j].len;
+
+#if 0
+ printf("%s: L: %p,%d -> %p,%d j=%d, i=%d\n",
+ __func__,
+ msg_info.dt.sg_list[j].addr,
+ msg_info.dt.sg_list[j].len,
+ sgl[i].addr, sgl[i].len, j, i);
+#endif
+ }
+#if 0
+ memcpy(&sgl[msg_info.dt.sent_sg_entries],
+ msg_info.dt.sg_list,
+ sizeof(*sgl) * msg_info.dt.cur_sg_entries);
+#endif
+
+ /*
+ * If this is the last piece of the I/O, we've got
+ * the full S/G list. Queue processing in the thread.
+ * Otherwise wait for the next piece.
+ */
+ if (msg_info.dt.sg_last != 0) {
+ STAILQ_INSERT_TAIL(&ctl_softc->isc_queue,
+ &io->io_hdr, links);
+ ctl_wakeup_thread();
+ }
+ break;
+ }
+ /* Performed on the Serializing (primary) SC, XFER mode only */
+ case CTL_MSG_DATAMOVE_DONE: {
+ if (msg_info.hdr.serializing_sc == NULL) {
+ printf("%s: serializing_sc == NULL!\n",
+ __func__);
+ /* XXX KDM now what? */
+ break;
+ }
+ /*
+ * We grab the sense information here in case
+ * there was a failure, so we can return status
+ * back to the initiator.
+ */
+ io = msg_info.hdr.serializing_sc;
+ io->io_hdr.msg_type = CTL_MSG_DATAMOVE_DONE;
+ io->io_hdr.status = msg_info.hdr.status;
+ io->scsiio.scsi_status = msg_info.scsi.scsi_status;
+ io->scsiio.sense_len = msg_info.scsi.sense_len;
+ io->scsiio.sense_residual =msg_info.scsi.sense_residual;
+ io->io_hdr.port_status = msg_info.scsi.fetd_status;
+ io->scsiio.residual = msg_info.scsi.residual;
+ memcpy(&io->scsiio.sense_data,&msg_info.scsi.sense_data,
+ sizeof(io->scsiio.sense_data));
+
+ STAILQ_INSERT_TAIL(&ctl_softc->isc_queue,
+ &io->io_hdr, links);
+ ctl_wakeup_thread();
+ break;
+ }
+
+ /* Preformed on Originating SC, SER_ONLY mode */
+ case CTL_MSG_R2R:
+ io = msg_info.hdr.original_sc;
+ if (io == NULL) {
+ printf("%s: Major Bummer\n", __func__);
+ mtx_unlock(&ctl_softc->ctl_lock);
+ return;
+ } else {
+#if 0
+ printf("pOrig %x\n",(int) ctsio);
+#endif
+ }
+ io->io_hdr.msg_type = CTL_MSG_R2R;
+ io->io_hdr.serializing_sc = msg_info.hdr.serializing_sc;
+ STAILQ_INSERT_TAIL(&ctl_softc->isc_queue,
+ &io->io_hdr, links);
+ ctl_wakeup_thread();
+ break;
+
+ /*
+ * Performed on Serializing(i.e. primary SC) SC in SER_ONLY
+ * mode.
+ * Performed on the Originating (i.e. secondary) SC in XFER
+ * mode
+ */
+ case CTL_MSG_FINISH_IO:
+ if (ctl_softc->ha_mode == CTL_HA_MODE_XFER)
+ ctl_isc_handler_finish_xfer(ctl_softc,
+ &msg_info);
+ else
+ ctl_isc_handler_finish_ser_only(ctl_softc,
+ &msg_info);
+ break;
+
+ /* Preformed on Originating SC */
+ case CTL_MSG_BAD_JUJU:
+ io = msg_info.hdr.original_sc;
+ if (io == NULL) {
+ printf("%s: Bad JUJU!, original_sc is NULL!\n",
+ __func__);
+ break;
+ }
+ ctl_copy_sense_data(&msg_info, io);
+ /*
+ * IO should have already been cleaned up on other
+ * SC so clear this flag so we won't send a message
+ * back to finish the IO there.
+ */
+ io->io_hdr.flags &= ~CTL_FLAG_SENT_2OTHER_SC;
+ io->io_hdr.flags |= CTL_FLAG_IO_ACTIVE;
+
+ /* io = msg_info.hdr.serializing_sc; */
+ io->io_hdr.msg_type = CTL_MSG_BAD_JUJU;
+ STAILQ_INSERT_TAIL(&ctl_softc->isc_queue,
+ &io->io_hdr, links);
+ ctl_wakeup_thread();
+ break;
+
+ /* Handle resets sent from the other side */
+ case CTL_MSG_MANAGE_TASKS: {
+ struct ctl_taskio *taskio;
+ taskio = (struct ctl_taskio *)ctl_alloc_io(
+ (void *)ctl_softc->othersc_pool);
+ if (taskio == NULL) {
+ printf("ctl_isc_event_handler: can't allocate "
+ "ctl_io!\n");
+ /* Bad Juju */
+ /* should I just call the proper reset func
+ here??? */
+ mtx_unlock(&ctl_softc->ctl_lock);
+ goto bailout;
+ }
+ ctl_zero_io((union ctl_io *)taskio);
+ taskio->io_hdr.io_type = CTL_IO_TASK;
+ taskio->io_hdr.flags |= CTL_FLAG_FROM_OTHER_SC;
+ taskio->io_hdr.nexus = msg_info.hdr.nexus;
+ taskio->task_action = msg_info.task.task_action;
+ taskio->tag_num = msg_info.task.tag_num;
+ taskio->tag_type = msg_info.task.tag_type;
+#ifdef CTL_TIME_IO
+ taskio->io_hdr.start_time = time_uptime;
+ getbintime(&taskio->io_hdr.start_bt);
+#if 0
+ cs_prof_gettime(&taskio->io_hdr.start_ticks);
+#endif
+#endif /* CTL_TIME_IO */
+ STAILQ_INSERT_TAIL(&ctl_softc->task_queue,
+ &taskio->io_hdr, links);
+ ctl_softc->flags |= CTL_FLAG_TASK_PENDING;
+ ctl_wakeup_thread();
+ break;
+ }
+ /* Persistent Reserve action which needs attention */
+ case CTL_MSG_PERS_ACTION:
+ presio = (struct ctl_prio *)ctl_alloc_io(
+ (void *)ctl_softc->othersc_pool);
+ if (presio == NULL) {
+ printf("ctl_isc_event_handler: can't allocate "
+ "ctl_io!\n");
+ /* Bad Juju */
+ /* Need to set busy and send msg back */
+ mtx_unlock(&ctl_softc->ctl_lock);
+ goto bailout;
+ }
+ ctl_zero_io((union ctl_io *)presio);
+ presio->io_hdr.msg_type = CTL_MSG_PERS_ACTION;
+ presio->pr_msg = msg_info.pr;
+ STAILQ_INSERT_TAIL(&ctl_softc->isc_queue,
+ &presio->io_hdr, links);
+ ctl_wakeup_thread();
+ break;
+ case CTL_MSG_SYNC_FE:
+ rcv_sync_msg = 1;
+ break;
+ case CTL_MSG_APS_LOCK: {
+ // It's quicker to execute this then to
+ // queue it.
+ struct ctl_lun *lun;
+ struct ctl_page_index *page_index;
+ struct copan_aps_subpage *current_sp;
+
+ lun = ctl_softc->ctl_luns[msg_info.hdr.nexus.targ_lun];
+ page_index = &lun->mode_pages.index[index_to_aps_page];
+ current_sp = (struct copan_aps_subpage *)
+ (page_index->page_data +
+ (page_index->page_len * CTL_PAGE_CURRENT));
+
+ current_sp->lock_active = msg_info.aps.lock_flag;
+ break;
+ }
+ default:
+ printf("How did I get here?\n");
+ }
+ mtx_unlock(&ctl_softc->ctl_lock);
+ } else if (event == CTL_HA_EVT_MSG_SENT) {
+ if (param != CTL_HA_STATUS_SUCCESS) {
+ printf("Bad status from ctl_ha_msg_send status %d\n",
+ param);
+ }
+ return;
+ } else if (event == CTL_HA_EVT_DISCONNECT) {
+ printf("CTL: Got a disconnect from Isc\n");
+ return;
+ } else {
+ printf("ctl_isc_event_handler: Unknown event %d\n", event);
+ return;
+ }
+
+bailout:
+ return;
+}
+
+static void
+ctl_copy_sense_data(union ctl_ha_msg *src, union ctl_io *dest)
+{
+ struct scsi_sense_data *sense;
+
+ sense = &dest->scsiio.sense_data;
+ bcopy(&src->scsi.sense_data, sense, sizeof(*sense));
+ dest->scsiio.scsi_status = src->scsi.scsi_status;
+ dest->scsiio.sense_len = src->scsi.sense_len;
+ dest->io_hdr.status = src->hdr.status;
+}
+
+static void
+ctl_init(void)
+{
+ struct ctl_softc *softc;
+ struct ctl_io_pool *internal_pool, *emergency_pool, *other_pool;
+ struct ctl_frontend *fe;
+ struct ctl_lun *lun;
+ uint8_t sc_id =0;
+#if 0
+ int i;
+#endif
+ int retval;
+ //int isc_retval;
+
+ retval = 0;
+ ctl_pause_rtr = 0;
+ rcv_sync_msg = 0;
+
+ control_softc = malloc(sizeof(*control_softc), M_DEVBUF, M_WAITOK);
+ softc = control_softc;
+
+ memset(softc, 0, sizeof(*softc));
+
+ softc->dev = make_dev(&ctl_cdevsw, 0, UID_ROOT, GID_OPERATOR, 0600,
+ "cam/ctl");
+
+ softc->dev->si_drv1 = softc;
+
+ mtx_init(&softc->ctl_lock, "CTL mutex", NULL, MTX_DEF);
+ softc->open_count = 0;
+
+ /*
+ * Default to actually sending a SYNCHRONIZE CACHE command down to
+ * the drive.
+ */
+ softc->flags = CTL_FLAG_REAL_SYNC;
+
+ /*
+ * In Copan's HA scheme, the "master" and "slave" roles are
+ * figured out through the slot the controller is in. Although it
+ * is an active/active system, someone has to be in charge.
+ */
+#ifdef NEEDTOPORT
+ scmicro_rw(SCMICRO_GET_SHELF_ID, &sc_id);
+#endif
+
+ if (sc_id == 0) {
+ softc->flags |= CTL_FLAG_MASTER_SHELF;
+ persis_offset = 0;
+ } else
+ persis_offset = CTL_MAX_INITIATORS;
+
+ /*
+ * XXX KDM need to figure out where we want to get our target ID
+ * and WWID. Is it different on each port?
+ */
+ softc->target.id = 0;
+ softc->target.wwid[0] = 0x12345678;
+ softc->target.wwid[1] = 0x87654321;
+ STAILQ_INIT(&softc->lun_list);
+ STAILQ_INIT(&softc->pending_lun_queue);
+ STAILQ_INIT(&softc->task_queue);
+ STAILQ_INIT(&softc->incoming_queue);
+ STAILQ_INIT(&softc->rtr_queue);
+ STAILQ_INIT(&softc->done_queue);
+ STAILQ_INIT(&softc->isc_queue);
+ STAILQ_INIT(&softc->fe_list);
+ STAILQ_INIT(&softc->be_list);
+ STAILQ_INIT(&softc->io_pools);
+
+ lun = &softc->lun;
+
+ /*
+ * We don't bother calling these with ctl_lock held here, because,
+ * in theory, no one else can try to do anything while we're in our
+ * module init routine.
+ */
+ if (ctl_pool_create(softc, CTL_POOL_INTERNAL, CTL_POOL_ENTRIES_INTERNAL,
+ &internal_pool)!= 0){
+ printf("ctl: can't allocate %d entry internal pool, "
+ "exiting\n", CTL_POOL_ENTRIES_INTERNAL);
+ return;
+ }
+
+ if (ctl_pool_create(softc, CTL_POOL_EMERGENCY,
+ CTL_POOL_ENTRIES_EMERGENCY, &emergency_pool) != 0) {
+ printf("ctl: can't allocate %d entry emergency pool, "
+ "exiting\n", CTL_POOL_ENTRIES_EMERGENCY);
+ ctl_pool_free(softc, internal_pool);
+ return;
+ }
+
+ if (ctl_pool_create(softc, CTL_POOL_4OTHERSC, CTL_POOL_ENTRIES_OTHER_SC,
+ &other_pool) != 0)
+ {
+ printf("ctl: can't allocate %d entry other SC pool, "
+ "exiting\n", CTL_POOL_ENTRIES_OTHER_SC);
+ ctl_pool_free(softc, internal_pool);
+ ctl_pool_free(softc, emergency_pool);
+ return;
+ }
+
+ softc->internal_pool = internal_pool;
+ softc->emergency_pool = emergency_pool;
+ softc->othersc_pool = other_pool;
+
+ ctl_pool_acquire(internal_pool);
+ ctl_pool_acquire(emergency_pool);
+ ctl_pool_acquire(other_pool);
+
+ /*
+ * We used to allocate a processor LUN here. The new scheme is to
+ * just let the user allocate LUNs as he sees fit.
+ */
+#if 0
+ mtx_lock(&softc->ctl_lock);
+ ctl_alloc_lun(softc, lun, /*be_lun*/NULL, /*target*/softc->target);
+ mtx_unlock(&softc->ctl_lock);
+#endif
+
+ if (kproc_create(ctl_work_thread, softc, &softc->work_thread, 0, 0,
+ "ctl_thrd") != 0) {
+ printf("error creating CTL work thread!\n");
+ ctl_free_lun(lun);
+ ctl_pool_free(softc, internal_pool);
+ ctl_pool_free(softc, emergency_pool);
+ ctl_pool_free(softc, other_pool);
+ return;
+ }
+ printf("ctl: CAM Target Layer loaded\n");
+
+ /*
+ * Initialize the initiator and portname mappings
+ */
+ memset(softc->wwpn_iid, 0, sizeof(softc->wwpn_iid));
+
+ /*
+ * Initialize the ioctl front end.
+ */
+ fe = &softc->ioctl_info.fe;
+ sprintf(softc->ioctl_info.port_name, "CTL ioctl");
+ fe->port_type = CTL_PORT_IOCTL;
+ fe->num_requested_ctl_io = 100;
+ fe->port_name = softc->ioctl_info.port_name;
+ fe->port_online = ctl_ioctl_online;
+ fe->port_offline = ctl_ioctl_offline;
+ fe->onoff_arg = &softc->ioctl_info;
+ fe->targ_enable = ctl_ioctl_targ_enable;
+ fe->targ_disable = ctl_ioctl_targ_disable;
+ fe->lun_enable = ctl_ioctl_lun_enable;
+ fe->lun_disable = ctl_ioctl_lun_disable;
+ fe->targ_lun_arg = &softc->ioctl_info;
+ fe->fe_datamove = ctl_ioctl_datamove;
+ fe->fe_done = ctl_ioctl_done;
+ fe->max_targets = 15;
+ fe->max_target_id = 15;
+
+ if (ctl_frontend_register(&softc->ioctl_info.fe,
+ (softc->flags & CTL_FLAG_MASTER_SHELF)) != 0) {
+ printf("ctl: ioctl front end registration failed, will "
+ "continue anyway\n");
+ }
+
+#ifdef CTL_IO_DELAY
+ if (sizeof(struct callout) > CTL_TIMER_BYTES) {
+ printf("sizeof(struct callout) %zd > CTL_TIMER_BYTES %zd\n",
+ sizeof(struct callout), CTL_TIMER_BYTES);
+ return;
+ }
+#endif /* CTL_IO_DELAY */
+
+}
+
+void
+ctl_shutdown(void)
+{
+ struct ctl_softc *softc;
+ struct ctl_lun *lun, *next_lun;
+ struct ctl_io_pool *pool, *next_pool;
+
+ softc = (struct ctl_softc *)control_softc;
+
+ if (ctl_frontend_deregister(&softc->ioctl_info.fe) != 0)
+ printf("ctl: ioctl front end deregistration failed\n");
+
+ mtx_lock(&softc->ctl_lock);
+
+ /*
+ * Free up each LUN.
+ */
+ for (lun = STAILQ_FIRST(&softc->lun_list); lun != NULL; lun = next_lun){
+ next_lun = STAILQ_NEXT(lun, links);
+ ctl_free_lun(lun);
+ }
+
+ /*
+ * This will rip the rug out from under any FETDs or anyone else
+ * that has a pool allocated. Since we increment our module
+ * refcount any time someone outside the main CTL module allocates
+ * a pool, we shouldn't have any problems here. The user won't be
+ * able to unload the CTL module until client modules have
+ * successfully unloaded.
+ */
+ for (pool = STAILQ_FIRST(&softc->io_pools); pool != NULL;
+ pool = next_pool) {
+ next_pool = STAILQ_NEXT(pool, links);
+ ctl_pool_free(softc, pool);
+ }
+
+ mtx_unlock(&softc->ctl_lock);
+
+#if 0
+ ctl_shutdown_thread(softc->work_thread);
+#endif
+
+ mtx_destroy(&softc->ctl_lock);
+
+ destroy_dev(softc->dev);
+
+ printf("ctl: CAM Target Layer unloaded\n");
+}
+
+/*
+ * XXX KDM should we do some access checks here? Bump a reference count to
+ * prevent a CTL module from being unloaded while someone has it open?
+ */
+static int
+ctl_open(struct cdev *dev, int flags, int fmt, struct thread *td)
+{
+ return (0);
+}
+
+static int
+ctl_close(struct cdev *dev, int flags, int fmt, struct thread *td)
+{
+ return (0);
+}
+
+int
+ctl_port_enable(ctl_port_type port_type)
+{
+ struct ctl_softc *softc;
+ struct ctl_frontend *fe;
+
+ if (ctl_is_single == 0) {
+ union ctl_ha_msg msg_info;
+ int isc_retval;
+
+#if 0
+ printf("%s: HA mode, synchronizing frontend enable\n",
+ __func__);
+#endif
+ msg_info.hdr.msg_type = CTL_MSG_SYNC_FE;
+ if ((isc_retval=ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info,
+ sizeof(msg_info), 1 )) > CTL_HA_STATUS_SUCCESS) {
+ printf("Sync msg send error retval %d\n", isc_retval);
+ }
+ if (!rcv_sync_msg) {
+ isc_retval=ctl_ha_msg_recv(CTL_HA_CHAN_CTL, &msg_info,
+ sizeof(msg_info), 1);
+ }
+#if 0
+ printf("CTL:Frontend Enable\n");
+ } else {
+ printf("%s: single mode, skipping frontend synchronization\n",
+ __func__);
+#endif
+ }
+
+ softc = control_softc;
+
+ STAILQ_FOREACH(fe, &softc->fe_list, links) {
+ if (port_type & fe->port_type)
+ {
+#if 0
+ printf("port %d\n", fe->targ_port);
+#endif
+ ctl_frontend_online(fe);
+ }
+ }
+
+ return (0);
+}
+
+int
+ctl_port_disable(ctl_port_type port_type)
+{
+ struct ctl_softc *softc;
+ struct ctl_frontend *fe;
+
+ softc = control_softc;
+
+ STAILQ_FOREACH(fe, &softc->fe_list, links) {
+ if (port_type & fe->port_type)
+ ctl_frontend_offline(fe);
+ }
+
+ return (0);
+}
+
+/*
+ * Returns 0 for success, 1 for failure.
+ * Currently the only failure mode is if there aren't enough entries
+ * allocated. So, in case of a failure, look at num_entries_dropped,
+ * reallocate and try again.
+ */
+int
+ctl_port_list(struct ctl_port_entry *entries, int num_entries_alloced,
+ int *num_entries_filled, int *num_entries_dropped,
+ ctl_port_type port_type, int no_virtual)
+{
+ struct ctl_softc *softc;
+ struct ctl_frontend *fe;
+ int entries_dropped, entries_filled;
+ int retval;
+ int i;
+
+ softc = control_softc;
+
+ retval = 0;
+ entries_filled = 0;
+ entries_dropped = 0;
+
+ i = 0;
+ mtx_lock(&softc->ctl_lock);
+ STAILQ_FOREACH(fe, &softc->fe_list, links) {
+ struct ctl_port_entry *entry;
+
+ if ((fe->port_type & port_type) == 0)
+ continue;
+
+ if ((no_virtual != 0)
+ && (fe->virtual_port != 0))
+ continue;
+
+ if (entries_filled >= num_entries_alloced) {
+ entries_dropped++;
+ continue;
+ }
+ entry = &entries[i];
+
+ entry->port_type = fe->port_type;
+ strlcpy(entry->port_name, fe->port_name,
+ sizeof(entry->port_name));
+ entry->physical_port = fe->physical_port;
+ entry->virtual_port = fe->virtual_port;
+ entry->wwnn = fe->wwnn;
+ entry->wwpn = fe->wwpn;
+
+ i++;
+ entries_filled++;
+ }
+
+ mtx_unlock(&softc->ctl_lock);
+
+ if (entries_dropped > 0)
+ retval = 1;
+
+ *num_entries_dropped = entries_dropped;
+ *num_entries_filled = entries_filled;
+
+ return (retval);
+}
+
+static void
+ctl_ioctl_online(void *arg)
+{
+ struct ctl_ioctl_info *ioctl_info;
+
+ ioctl_info = (struct ctl_ioctl_info *)arg;
+
+ ioctl_info->flags |= CTL_IOCTL_FLAG_ENABLED;
+}
+
+static void
+ctl_ioctl_offline(void *arg)
+{
+ struct ctl_ioctl_info *ioctl_info;
+
+ ioctl_info = (struct ctl_ioctl_info *)arg;
+
+ ioctl_info->flags &= ~CTL_IOCTL_FLAG_ENABLED;
+}
+
+/*
+ * Remove an initiator by port number and initiator ID.
+ * Returns 0 for success, 1 for failure.
+ * Assumes the caller does NOT hold the CTL lock.
+ */
+int
+ctl_remove_initiator(int32_t targ_port, uint32_t iid)
+{
+ struct ctl_softc *softc;
+
+ softc = control_softc;
+
+ if ((targ_port < 0)
+ || (targ_port > CTL_MAX_PORTS)) {
+ printf("%s: invalid port number %d\n", __func__, targ_port);
+ return (1);
+ }
+ if (iid > CTL_MAX_INIT_PER_PORT) {
+ printf("%s: initiator ID %u > maximun %u!\n",
+ __func__, iid, CTL_MAX_INIT_PER_PORT);
+ return (1);
+ }
+
+ mtx_lock(&softc->ctl_lock);
+
+ softc->wwpn_iid[targ_port][iid].in_use = 0;
+
+ mtx_unlock(&softc->ctl_lock);
+
+ return (0);
+}
+
+/*
+ * Add an initiator to the initiator map.
+ * Returns 0 for success, 1 for failure.
+ * Assumes the caller does NOT hold the CTL lock.
+ */
+int
+ctl_add_initiator(uint64_t wwpn, int32_t targ_port, uint32_t iid)
+{
+ struct ctl_softc *softc;
+ int retval;
+
+ softc = control_softc;
+
+ retval = 0;
+
+ if ((targ_port < 0)
+ || (targ_port > CTL_MAX_PORTS)) {
+ printf("%s: invalid port number %d\n", __func__, targ_port);
+ return (1);
+ }
+ if (iid > CTL_MAX_INIT_PER_PORT) {
+ printf("%s: WWPN %#jx initiator ID %u > maximun %u!\n",
+ __func__, wwpn, iid, CTL_MAX_INIT_PER_PORT);
+ return (1);
+ }
+
+ mtx_lock(&softc->ctl_lock);
+
+ if (softc->wwpn_iid[targ_port][iid].in_use != 0) {
+ /*
+ * We don't treat this as an error.
+ */
+ if (softc->wwpn_iid[targ_port][iid].wwpn == wwpn) {
+ printf("%s: port %d iid %u WWPN %#jx arrived again?\n",
+ __func__, targ_port, iid, (uintmax_t)wwpn);
+ goto bailout;
+ }
+
+ /*
+ * This is an error, but what do we do about it? The
+ * driver is telling us we have a new WWPN for this
+ * initiator ID, so we pretty much need to use it.
+ */
+ printf("%s: port %d iid %u WWPN %#jx arrived, WWPN %#jx is "
+ "still at that address\n", __func__, targ_port, iid,
+ (uintmax_t)wwpn,
+ (uintmax_t)softc->wwpn_iid[targ_port][iid].wwpn);
+
+ /*
+ * XXX KDM clear have_ca and ua_pending on each LUN for
+ * this initiator.
+ */
+ }
+ softc->wwpn_iid[targ_port][iid].in_use = 1;
+ softc->wwpn_iid[targ_port][iid].iid = iid;
+ softc->wwpn_iid[targ_port][iid].wwpn = wwpn;
+ softc->wwpn_iid[targ_port][iid].port = targ_port;
+
+bailout:
+
+ mtx_unlock(&softc->ctl_lock);
+
+ return (retval);
+}
+
+/*
+ * XXX KDM should we pretend to do something in the target/lun
+ * enable/disable functions?
+ */
+static int
+ctl_ioctl_targ_enable(void *arg, struct ctl_id targ_id)
+{
+ return (0);
+}
+
+static int
+ctl_ioctl_targ_disable(void *arg, struct ctl_id targ_id)
+{
+ return (0);
+}
+
+static int
+ctl_ioctl_lun_enable(void *arg, struct ctl_id targ_id, int lun_id)
+{
+ return (0);
+}
+
+static int
+ctl_ioctl_lun_disable(void *arg, struct ctl_id targ_id, int lun_id)
+{
+ return (0);
+}
+
+/*
+ * Data movement routine for the CTL ioctl frontend port.
+ */
+static int
+ctl_ioctl_do_datamove(struct ctl_scsiio *ctsio)
+{
+ struct ctl_sg_entry *ext_sglist, *kern_sglist;
+ struct ctl_sg_entry ext_entry, kern_entry;
+ int ext_sglen, ext_sg_entries, kern_sg_entries;
+ int ext_sg_start, ext_offset;
+ int len_to_copy, len_copied;
+ int kern_watermark, ext_watermark;
+ int ext_sglist_malloced;
+ int i, j;
+
+ ext_sglist_malloced = 0;
+ ext_sg_start = 0;
+ ext_offset = 0;
+
+ CTL_DEBUG_PRINT(("ctl_ioctl_do_datamove\n"));
+
+ /*
+ * If this flag is set, fake the data transfer.
+ */
+ if (ctsio->io_hdr.flags & CTL_FLAG_NO_DATAMOVE) {
+ ctsio->ext_data_filled = ctsio->ext_data_len;
+ goto bailout;
+ }
+
+ /*
+ * To simplify things here, if we have a single buffer, stick it in
+ * a S/G entry and just make it a single entry S/G list.
+ */
+ if (ctsio->io_hdr.flags & CTL_FLAG_EDPTR_SGLIST) {
+ int len_seen;
+
+ ext_sglen = ctsio->ext_sg_entries * sizeof(*ext_sglist);
+
+ ext_sglist = (struct ctl_sg_entry *)malloc(ext_sglen, M_CTL,
+ M_WAITOK);
+ if (ext_sglist == NULL) {
+ ctl_set_internal_failure(ctsio,
+ /*sks_valid*/ 0,
+ /*retry_count*/ 0);
+ return (CTL_RETVAL_COMPLETE);
+ }
+ ext_sglist_malloced = 1;
+ if (copyin(ctsio->ext_data_ptr, ext_sglist,
+ ext_sglen) != 0) {
+ ctl_set_internal_failure(ctsio,
+ /*sks_valid*/ 0,
+ /*retry_count*/ 0);
+ goto bailout;
+ }
+ ext_sg_entries = ctsio->ext_sg_entries;
+ len_seen = 0;
+ for (i = 0; i < ext_sg_entries; i++) {
+ if ((len_seen + ext_sglist[i].len) >=
+ ctsio->ext_data_filled) {
+ ext_sg_start = i;
+ ext_offset = ctsio->ext_data_filled - len_seen;
+ break;
+ }
+ len_seen += ext_sglist[i].len;
+ }
+ } else {
+ ext_sglist = &ext_entry;
+ ext_sglist->addr = ctsio->ext_data_ptr;
+ ext_sglist->len = ctsio->ext_data_len;
+ ext_sg_entries = 1;
+ ext_sg_start = 0;
+ ext_offset = ctsio->ext_data_filled;
+ }
+
+ if (ctsio->kern_sg_entries > 0) {
+ kern_sglist = (struct ctl_sg_entry *)ctsio->kern_data_ptr;
+ kern_sg_entries = ctsio->kern_sg_entries;
+ } else {
+ kern_sglist = &kern_entry;
+ kern_sglist->addr = ctsio->kern_data_ptr;
+ kern_sglist->len = ctsio->kern_data_len;
+ kern_sg_entries = 1;
+ }
+
+
+ kern_watermark = 0;
+ ext_watermark = ext_offset;
+ len_copied = 0;
+ for (i = ext_sg_start, j = 0;
+ i < ext_sg_entries && j < kern_sg_entries;) {
+ uint8_t *ext_ptr, *kern_ptr;
+
+ len_to_copy = ctl_min(ext_sglist[i].len - ext_watermark,
+ kern_sglist[j].len - kern_watermark);
+
+ ext_ptr = (uint8_t *)ext_sglist[i].addr;
+ ext_ptr = ext_ptr + ext_watermark;
+ if (ctsio->io_hdr.flags & CTL_FLAG_BUS_ADDR) {
+ /*
+ * XXX KDM fix this!
+ */
+ panic("need to implement bus address support");
+#if 0
+ kern_ptr = bus_to_virt(kern_sglist[j].addr);
+#endif
+ } else
+ kern_ptr = (uint8_t *)kern_sglist[j].addr;
+ kern_ptr = kern_ptr + kern_watermark;
+
+ kern_watermark += len_to_copy;
+ ext_watermark += len_to_copy;
+
+ if ((ctsio->io_hdr.flags & CTL_FLAG_DATA_MASK) ==
+ CTL_FLAG_DATA_IN) {
+ CTL_DEBUG_PRINT(("ctl_ioctl_do_datamove: copying %d "
+ "bytes to user\n", len_to_copy));
+ CTL_DEBUG_PRINT(("ctl_ioctl_do_datamove: from %p "
+ "to %p\n", kern_ptr, ext_ptr));
+ if (copyout(kern_ptr, ext_ptr, len_to_copy) != 0) {
+ ctl_set_internal_failure(ctsio,
+ /*sks_valid*/ 0,
+ /*retry_count*/ 0);
+ goto bailout;
+ }
+ } else {
+ CTL_DEBUG_PRINT(("ctl_ioctl_do_datamove: copying %d "
+ "bytes from user\n", len_to_copy));
+ CTL_DEBUG_PRINT(("ctl_ioctl_do_datamove: from %p "
+ "to %p\n", ext_ptr, kern_ptr));
+ if (copyin(ext_ptr, kern_ptr, len_to_copy)!= 0){
+ ctl_set_internal_failure(ctsio,
+ /*sks_valid*/ 0,
+ /*retry_count*/0);
+ goto bailout;
+ }
+ }
+
+ len_copied += len_to_copy;
+
+ if (ext_sglist[i].len == ext_watermark) {
+ i++;
+ ext_watermark = 0;
+ }
+
+ if (kern_sglist[j].len == kern_watermark) {
+ j++;
+ kern_watermark = 0;
+ }
+ }
+
+ ctsio->ext_data_filled += len_copied;
+
+ CTL_DEBUG_PRINT(("ctl_ioctl_do_datamove: ext_sg_entries: %d, "
+ "kern_sg_entries: %d\n", ext_sg_entries,
+ kern_sg_entries));
+ CTL_DEBUG_PRINT(("ctl_ioctl_do_datamove: ext_data_len = %d, "
+ "kern_data_len = %d\n", ctsio->ext_data_len,
+ ctsio->kern_data_len));
+
+
+ /* XXX KDM set residual?? */
+bailout:
+
+ if (ext_sglist_malloced != 0)
+ free(ext_sglist, M_CTL);
+
+ return (CTL_RETVAL_COMPLETE);
+}
+
+/*
+ * Serialize a command that went down the "wrong" side, and so was sent to
+ * this controller for execution. The logic is a little different than the
+ * standard case in ctl_scsiio_precheck(). Errors in this case need to get
+ * sent back to the other side, but in the success case, we execute the
+ * command on this side (XFER mode) or tell the other side to execute it
+ * (SER_ONLY mode).
+ */
+static int
+ctl_serialize_other_sc_cmd(struct ctl_scsiio *ctsio, int have_lock)
+{
+ struct ctl_softc *ctl_softc;
+ union ctl_ha_msg msg_info;
+ struct ctl_lun *lun;
+ int retval = 0;
+
+ ctl_softc = control_softc;
+ if (have_lock == 0)
+ mtx_lock(&ctl_softc->ctl_lock);
+
+ lun = ctl_softc->ctl_luns[ctsio->io_hdr.nexus.targ_lun];
+ if (lun==NULL)
+ {
+ /*
+ * Why isn't LUN defined? The other side wouldn't
+ * send a cmd if the LUN is undefined.
+ */
+ printf("%s: Bad JUJU!, LUN is NULL!\n", __func__);
+
+ /* "Logical unit not supported" */
+ ctl_set_sense_data(&msg_info.scsi.sense_data,
+ lun,
+ /*sense_format*/SSD_TYPE_NONE,
+ /*current_error*/ 1,
+ /*sense_key*/ SSD_KEY_ILLEGAL_REQUEST,
+ /*asc*/ 0x25,
+ /*ascq*/ 0x00,
+ SSD_ELEM_NONE);
+
+ msg_info.scsi.sense_len = SSD_FULL_SIZE;
+ msg_info.scsi.scsi_status = SCSI_STATUS_CHECK_COND;
+ msg_info.hdr.status = CTL_SCSI_ERROR | CTL_AUTOSENSE;
+ msg_info.hdr.original_sc = ctsio->io_hdr.original_sc;
+ msg_info.hdr.serializing_sc = NULL;
+ msg_info.hdr.msg_type = CTL_MSG_BAD_JUJU;
+ if (ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info,
+ sizeof(msg_info), 0 ) > CTL_HA_STATUS_SUCCESS) {
+ }
+ if (have_lock == 0)
+ mtx_unlock(&ctl_softc->ctl_lock);
+ return(1);
+
+ }
+
+ TAILQ_INSERT_TAIL(&lun->ooa_queue, &ctsio->io_hdr, ooa_links);
+
+ switch (ctl_check_ooa(lun, (union ctl_io *)ctsio,
+ (union ctl_io *)TAILQ_PREV(&ctsio->io_hdr, ctl_ooaq,
+ ooa_links))) {
+ case CTL_ACTION_BLOCK:
+ ctsio->io_hdr.flags |= CTL_FLAG_BLOCKED;
+ TAILQ_INSERT_TAIL(&lun->blocked_queue, &ctsio->io_hdr,
+ blocked_links);
+ break;
+ case CTL_ACTION_PASS:
+ case CTL_ACTION_SKIP:
+ if (ctl_softc->ha_mode == CTL_HA_MODE_XFER) {
+ ctsio->io_hdr.flags |= CTL_FLAG_IS_WAS_ON_RTR;
+ STAILQ_INSERT_TAIL(&ctl_softc->rtr_queue,
+ &ctsio->io_hdr, links);
+ } else {
+
+ /* send msg back to other side */
+ msg_info.hdr.original_sc = ctsio->io_hdr.original_sc;
+ msg_info.hdr.serializing_sc = (union ctl_io *)ctsio;
+ msg_info.hdr.msg_type = CTL_MSG_R2R;
+#if 0
+ printf("2. pOrig %x\n", (int)msg_info.hdr.original_sc);
+#endif
+ if (ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info,
+ sizeof(msg_info), 0 ) > CTL_HA_STATUS_SUCCESS) {
+ }
+ }
+ break;
+ case CTL_ACTION_OVERLAP:
+ /* OVERLAPPED COMMANDS ATTEMPTED */
+ ctl_set_sense_data(&msg_info.scsi.sense_data,
+ lun,
+ /*sense_format*/SSD_TYPE_NONE,
+ /*current_error*/ 1,
+ /*sense_key*/ SSD_KEY_ILLEGAL_REQUEST,
+ /*asc*/ 0x4E,
+ /*ascq*/ 0x00,
+ SSD_ELEM_NONE);
+
+ msg_info.scsi.sense_len = SSD_FULL_SIZE;
+ msg_info.scsi.scsi_status = SCSI_STATUS_CHECK_COND;
+ msg_info.hdr.status = CTL_SCSI_ERROR | CTL_AUTOSENSE;
+ msg_info.hdr.original_sc = ctsio->io_hdr.original_sc;
+ msg_info.hdr.serializing_sc = NULL;
+ msg_info.hdr.msg_type = CTL_MSG_BAD_JUJU;
+#if 0
+ printf("BAD JUJU:Major Bummer Overlap\n");
+#endif
+ TAILQ_REMOVE(&lun->ooa_queue, &ctsio->io_hdr, ooa_links);
+ retval = 1;
+ if (ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info,
+ sizeof(msg_info), 0 ) > CTL_HA_STATUS_SUCCESS) {
+ }
+ break;
+ case CTL_ACTION_OVERLAP_TAG:
+ /* TAGGED OVERLAPPED COMMANDS (NN = QUEUE TAG) */
+ ctl_set_sense_data(&msg_info.scsi.sense_data,
+ lun,
+ /*sense_format*/SSD_TYPE_NONE,
+ /*current_error*/ 1,
+ /*sense_key*/ SSD_KEY_ILLEGAL_REQUEST,
+ /*asc*/ 0x4D,
+ /*ascq*/ ctsio->tag_num & 0xff,
+ SSD_ELEM_NONE);
+
+ msg_info.scsi.sense_len = SSD_FULL_SIZE;
+ msg_info.scsi.scsi_status = SCSI_STATUS_CHECK_COND;
+ msg_info.hdr.status = CTL_SCSI_ERROR | CTL_AUTOSENSE;
+ msg_info.hdr.original_sc = ctsio->io_hdr.original_sc;
+ msg_info.hdr.serializing_sc = NULL;
+ msg_info.hdr.msg_type = CTL_MSG_BAD_JUJU;
+#if 0
+ printf("BAD JUJU:Major Bummer Overlap Tag\n");
+#endif
+ TAILQ_REMOVE(&lun->ooa_queue, &ctsio->io_hdr, ooa_links);
+ retval = 1;
+ if (ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info,
+ sizeof(msg_info), 0 ) > CTL_HA_STATUS_SUCCESS) {
+ }
+ break;
+ case CTL_ACTION_ERROR:
+ default:
+ /* "Internal target failure" */
+ ctl_set_sense_data(&msg_info.scsi.sense_data,
+ lun,
+ /*sense_format*/SSD_TYPE_NONE,
+ /*current_error*/ 1,
+ /*sense_key*/ SSD_KEY_HARDWARE_ERROR,
+ /*asc*/ 0x44,
+ /*ascq*/ 0x00,
+ SSD_ELEM_NONE);
+
+ msg_info.scsi.sense_len = SSD_FULL_SIZE;
+ msg_info.scsi.scsi_status = SCSI_STATUS_CHECK_COND;
+ msg_info.hdr.status = CTL_SCSI_ERROR | CTL_AUTOSENSE;
+ msg_info.hdr.original_sc = ctsio->io_hdr.original_sc;
+ msg_info.hdr.serializing_sc = NULL;
+ msg_info.hdr.msg_type = CTL_MSG_BAD_JUJU;
+#if 0
+ printf("BAD JUJU:Major Bummer HW Error\n");
+#endif
+ TAILQ_REMOVE(&lun->ooa_queue, &ctsio->io_hdr, ooa_links);
+ retval = 1;
+ if (ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info,
+ sizeof(msg_info), 0 ) > CTL_HA_STATUS_SUCCESS) {
+ }
+ break;
+ }
+ if (have_lock == 0)
+ mtx_unlock(&ctl_softc->ctl_lock);
+ return (retval);
+}
+
+static int
+ctl_ioctl_submit_wait(union ctl_io *io)
+{
+ struct ctl_fe_ioctl_params params;
+ ctl_fe_ioctl_state last_state;
+ int done, retval;
+
+ retval = 0;
+
+ bzero(&params, sizeof(params));
+
+ mtx_init(&params.ioctl_mtx, "ctliocmtx", NULL, MTX_DEF);
+ cv_init(&params.sem, "ctlioccv");
+ params.state = CTL_IOCTL_INPROG;
+ last_state = params.state;
+
+ io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = &params;
+
+ CTL_DEBUG_PRINT(("ctl_ioctl_submit_wait\n"));
+
+ /* This shouldn't happen */
+ if ((retval = ctl_queue(io)) != CTL_RETVAL_COMPLETE)
+ return (retval);
+
+ done = 0;
+
+ do {
+ mtx_lock(&params.ioctl_mtx);
+ /*
+ * Check the state here, and don't sleep if the state has
+ * already changed (i.e. wakeup has already occured, but we
+ * weren't waiting yet).
+ */
+ if (params.state == last_state) {
+ /* XXX KDM cv_wait_sig instead? */
+ cv_wait(&params.sem, &params.ioctl_mtx);
+ }
+ last_state = params.state;
+
+ switch (params.state) {
+ case CTL_IOCTL_INPROG:
+ /* Why did we wake up? */
+ /* XXX KDM error here? */
+ mtx_unlock(&params.ioctl_mtx);
+ break;
+ case CTL_IOCTL_DATAMOVE:
+ CTL_DEBUG_PRINT(("got CTL_IOCTL_DATAMOVE\n"));
+
+ /*
+ * change last_state back to INPROG to avoid
+ * deadlock on subsequent data moves.
+ */
+ params.state = last_state = CTL_IOCTL_INPROG;
+
+ mtx_unlock(&params.ioctl_mtx);
+ ctl_ioctl_do_datamove(&io->scsiio);
+ /*
+ * Note that in some cases, most notably writes,
+ * this will queue the I/O and call us back later.
+ * In other cases, generally reads, this routine
+ * will immediately call back and wake us up,
+ * probably using our own context.
+ */
+ io->scsiio.be_move_done(io);
+ break;
+ case CTL_IOCTL_DONE:
+ mtx_unlock(&params.ioctl_mtx);
+ CTL_DEBUG_PRINT(("got CTL_IOCTL_DONE\n"));
+ done = 1;
+ break;
+ default:
+ mtx_unlock(&params.ioctl_mtx);
+ /* XXX KDM error here? */
+ break;
+ }
+ } while (done == 0);
+
+ mtx_destroy(&params.ioctl_mtx);
+ cv_destroy(&params.sem);
+
+ return (CTL_RETVAL_COMPLETE);
+}
+
+static void
+ctl_ioctl_datamove(union ctl_io *io)
+{
+ struct ctl_fe_ioctl_params *params;
+
+ params = (struct ctl_fe_ioctl_params *)
+ io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr;
+
+ mtx_lock(&params->ioctl_mtx);
+ params->state = CTL_IOCTL_DATAMOVE;
+ cv_broadcast(&params->sem);
+ mtx_unlock(&params->ioctl_mtx);
+}
+
+static void
+ctl_ioctl_done(union ctl_io *io)
+{
+ struct ctl_fe_ioctl_params *params;
+
+ params = (struct ctl_fe_ioctl_params *)
+ io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr;
+
+ mtx_lock(&params->ioctl_mtx);
+ params->state = CTL_IOCTL_DONE;
+ cv_broadcast(&params->sem);
+ mtx_unlock(&params->ioctl_mtx);
+}
+
+static void
+ctl_ioctl_hard_startstop_callback(void *arg, struct cfi_metatask *metatask)
+{
+ struct ctl_fe_ioctl_startstop_info *sd_info;
+
+ sd_info = (struct ctl_fe_ioctl_startstop_info *)arg;
+
+ sd_info->hs_info.status = metatask->status;
+ sd_info->hs_info.total_luns = metatask->taskinfo.startstop.total_luns;
+ sd_info->hs_info.luns_complete =
+ metatask->taskinfo.startstop.luns_complete;
+ sd_info->hs_info.luns_failed = metatask->taskinfo.startstop.luns_failed;
+
+ cv_broadcast(&sd_info->sem);
+}
+
+static void
+ctl_ioctl_bbrread_callback(void *arg, struct cfi_metatask *metatask)
+{
+ struct ctl_fe_ioctl_bbrread_info *fe_bbr_info;
+
+ fe_bbr_info = (struct ctl_fe_ioctl_bbrread_info *)arg;
+
+ mtx_lock(fe_bbr_info->lock);
+ fe_bbr_info->bbr_info->status = metatask->status;
+ fe_bbr_info->bbr_info->bbr_status = metatask->taskinfo.bbrread.status;
+ fe_bbr_info->wakeup_done = 1;
+ mtx_unlock(fe_bbr_info->lock);
+
+ cv_broadcast(&fe_bbr_info->sem);
+}
+
+/*
+ * Must be called with the ctl_lock held.
+ * Returns 0 for success, errno for failure.
+ */
+static int
+ctl_ioctl_fill_ooa(struct ctl_lun *lun, uint32_t *cur_fill_num,
+ struct ctl_ooa *ooa_hdr)
+{
+ union ctl_io *io;
+ int retval;
+
+ retval = 0;
+
+ for (io = (union ctl_io *)TAILQ_FIRST(&lun->ooa_queue); (io != NULL);
+ (*cur_fill_num)++, io = (union ctl_io *)TAILQ_NEXT(&io->io_hdr,
+ ooa_links)) {
+ struct ctl_ooa_entry *cur_entry, entry;
+
+ /*
+ * If we've got more than we can fit, just count the
+ * remaining entries.
+ */
+ if (*cur_fill_num >= ooa_hdr->alloc_num)
+ continue;
+
+ cur_entry = &ooa_hdr->entries[*cur_fill_num];
+
+ bzero(&entry, sizeof(entry));
+
+ entry.tag_num = io->scsiio.tag_num;
+ entry.lun_num = lun->lun;
+#ifdef CTL_TIME_IO
+ entry.start_bt = io->io_hdr.start_bt;
+#endif
+ bcopy(io->scsiio.cdb, entry.cdb, io->scsiio.cdb_len);
+ entry.cdb_len = io->scsiio.cdb_len;
+ if (io->io_hdr.flags & CTL_FLAG_BLOCKED)
+ entry.cmd_flags |= CTL_OOACMD_FLAG_BLOCKED;
+
+ if (io->io_hdr.flags & CTL_FLAG_DMA_INPROG)
+ entry.cmd_flags |= CTL_OOACMD_FLAG_DMA;
+
+ if (io->io_hdr.flags & CTL_FLAG_ABORT)
+ entry.cmd_flags |= CTL_OOACMD_FLAG_ABORT;
+
+ if (io->io_hdr.flags & CTL_FLAG_IS_WAS_ON_RTR)
+ entry.cmd_flags |= CTL_OOACMD_FLAG_RTR;
+
+ if (io->io_hdr.flags & CTL_FLAG_DMA_QUEUED)
+ entry.cmd_flags |= CTL_OOACMD_FLAG_DMA_QUEUED;
+
+ retval = copyout(&entry, cur_entry, sizeof(entry));
+
+ if (retval != 0)
+ break;
+ }
+
+ return (retval);
+}
+
+static void *
+ctl_copyin_alloc(void *user_addr, int len, char *error_str,
+ size_t error_str_len)
+{
+ void *kptr;
+
+ kptr = malloc(len, M_CTL, M_WAITOK | M_ZERO);
+ if (kptr == NULL) {
+ snprintf(error_str, error_str_len, "Cannot allocate %d bytes",
+ len);
+ return (NULL);
+ }
+
+ if (copyin(user_addr, kptr, len) != 0) {
+ snprintf(error_str, error_str_len, "Error copying %d bytes "
+ "from user address %p to kernel address %p", len,
+ user_addr, kptr);
+ free(kptr, M_CTL);
+ return (NULL);
+ }
+
+ return (kptr);
+}
+
+static void
+ctl_free_args(int num_be_args, struct ctl_be_arg *be_args)
+{
+ int i;
+
+ if (be_args == NULL)
+ return;
+
+ for (i = 0; i < num_be_args; i++) {
+ free(be_args[i].kname, M_CTL);
+ free(be_args[i].kvalue, M_CTL);
+ }
+
+ free(be_args, M_CTL);
+}
+
+static struct ctl_be_arg *
+ctl_copyin_args(int num_be_args, struct ctl_be_arg *be_args,
+ char *error_str, size_t error_str_len)
+{
+ struct ctl_be_arg *args;
+ int i;
+
+ args = ctl_copyin_alloc(be_args, num_be_args * sizeof(*be_args),
+ error_str, error_str_len);
+
+ if (args == NULL)
+ goto bailout;
+
+ for (i = 0; i < num_be_args; i++) {
+ uint8_t *tmpptr;
+
+ args[i].kname = ctl_copyin_alloc(args[i].name,
+ args[i].namelen, error_str, error_str_len);
+ if (args[i].kname == NULL)
+ goto bailout;
+
+ if (args[i].kname[args[i].namelen - 1] != '\0') {
+ snprintf(error_str, error_str_len, "Argument %d "
+ "name is not NUL-terminated", i);
+ goto bailout;
+ }
+
+ args[i].kvalue = NULL;
+
+ tmpptr = ctl_copyin_alloc(args[i].value,
+ args[i].vallen, error_str, error_str_len);
+ if (tmpptr == NULL)
+ goto bailout;
+
+ args[i].kvalue = tmpptr;
+
+ if ((args[i].flags & CTL_BEARG_ASCII)
+ && (tmpptr[args[i].vallen - 1] != '\0')) {
+ snprintf(error_str, error_str_len, "Argument %d "
+ "value is not NUL-terminated", i);
+ goto bailout;
+ }
+ }
+
+ return (args);
+bailout:
+
+ ctl_free_args(num_be_args, args);
+
+ return (NULL);
+}
+
+/*
+ * Escape characters that are illegal or not recommended in XML.
+ */
+int
+ctl_sbuf_printf_esc(struct sbuf *sb, char *str)
+{
+ int retval;
+
+ retval = 0;
+
+ for (; *str; str++) {
+ switch (*str) {
+ case '&':
+ retval = sbuf_printf(sb, "&amp;");
+ break;
+ case '>':
+ retval = sbuf_printf(sb, "&gt;");
+ break;
+ case '<':
+ retval = sbuf_printf(sb, "&lt;");
+ break;
+ default:
+ retval = sbuf_putc(sb, *str);
+ break;
+ }
+
+ if (retval != 0)
+ break;
+
+ }
+
+ return (retval);
+}
+
+static int
+ctl_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag,
+ struct thread *td)
+{
+ struct ctl_softc *softc;
+ int retval;
+
+ softc = control_softc;
+
+ retval = 0;
+
+ switch (cmd) {
+ case CTL_IO: {
+ union ctl_io *io;
+ void *pool_tmp;
+
+ /*
+ * If we haven't been "enabled", don't allow any SCSI I/O
+ * to this FETD.
+ */
+ if ((softc->ioctl_info.flags & CTL_IOCTL_FLAG_ENABLED) == 0) {
+ retval = -EPERM;
+ break;
+ }
+
+ io = ctl_alloc_io(softc->ioctl_info.fe.ctl_pool_ref);
+ if (io == NULL) {
+ printf("ctl_ioctl: can't allocate ctl_io!\n");
+ retval = -ENOSPC;
+ break;
+ }
+
+ /*
+ * Need to save the pool reference so it doesn't get
+ * spammed by the user's ctl_io.
+ */
+ pool_tmp = io->io_hdr.pool;
+
+ memcpy(io, (void *)addr, sizeof(*io));
+
+ io->io_hdr.pool = pool_tmp;
+ /*
+ * No status yet, so make sure the status is set properly.
+ */
+ io->io_hdr.status = CTL_STATUS_NONE;
+
+ /*
+ * The user sets the initiator ID, target and LUN IDs.
+ */
+ io->io_hdr.nexus.targ_port = softc->ioctl_info.fe.targ_port;
+ io->io_hdr.flags |= CTL_FLAG_USER_REQ;
+ if ((io->io_hdr.io_type == CTL_IO_SCSI)
+ && (io->scsiio.tag_type != CTL_TAG_UNTAGGED))
+ io->scsiio.tag_num = softc->ioctl_info.cur_tag_num++;
+
+ retval = ctl_ioctl_submit_wait(io);
+
+ if (retval != 0) {
+ ctl_free_io(io);
+ break;
+ }
+
+ memcpy((void *)addr, io, sizeof(*io));
+
+ /* return this to our pool */
+ ctl_free_io(io);
+
+ break;
+ }
+ case CTL_ENABLE_PORT:
+ case CTL_DISABLE_PORT:
+ case CTL_SET_PORT_WWNS: {
+ struct ctl_frontend *fe;
+ struct ctl_port_entry *entry;
+
+ entry = (struct ctl_port_entry *)addr;
+
+ mtx_lock(&softc->ctl_lock);
+ STAILQ_FOREACH(fe, &softc->fe_list, links) {
+ int action, done;
+
+ action = 0;
+ done = 0;
+
+ if ((entry->port_type == CTL_PORT_NONE)
+ && (entry->targ_port == fe->targ_port)) {
+ /*
+ * If the user only wants to enable or
+ * disable or set WWNs on a specific port,
+ * do the operation and we're done.
+ */
+ action = 1;
+ done = 1;
+ } else if (entry->port_type & fe->port_type) {
+ /*
+ * Compare the user's type mask with the
+ * particular frontend type to see if we
+ * have a match.
+ */
+ action = 1;
+ done = 0;
+
+ /*
+ * Make sure the user isn't trying to set
+ * WWNs on multiple ports at the same time.
+ */
+ if (cmd == CTL_SET_PORT_WWNS) {
+ printf("%s: Can't set WWNs on "
+ "multiple ports\n", __func__);
+ retval = EINVAL;
+ break;
+ }
+ }
+ if (action != 0) {
+ /*
+ * XXX KDM we have to drop the lock here,
+ * because the online/offline operations
+ * can potentially block. We need to
+ * reference count the frontends so they
+ * can't go away,
+ */
+ mtx_unlock(&softc->ctl_lock);
+
+ if (cmd == CTL_ENABLE_PORT)
+ ctl_frontend_online(fe);
+ else if (cmd == CTL_DISABLE_PORT)
+ ctl_frontend_offline(fe);
+
+ mtx_lock(&softc->ctl_lock);
+
+ if (cmd == CTL_SET_PORT_WWNS)
+ ctl_frontend_set_wwns(fe,
+ (entry->flags & CTL_PORT_WWNN_VALID) ?
+ 1 : 0, entry->wwnn,
+ (entry->flags & CTL_PORT_WWPN_VALID) ?
+ 1 : 0, entry->wwpn);
+ }
+ if (done != 0)
+ break;
+ }
+ mtx_unlock(&softc->ctl_lock);
+ break;
+ }
+ case CTL_GET_PORT_LIST: {
+ struct ctl_frontend *fe;
+ struct ctl_port_list *list;
+ int i;
+
+ list = (struct ctl_port_list *)addr;
+
+ if (list->alloc_len != (list->alloc_num *
+ sizeof(struct ctl_port_entry))) {
+ printf("%s: CTL_GET_PORT_LIST: alloc_len %u != "
+ "alloc_num %u * sizeof(struct ctl_port_entry) "
+ "%zu\n", __func__, list->alloc_len,
+ list->alloc_num, sizeof(struct ctl_port_entry));
+ retval = EINVAL;
+ break;
+ }
+ list->fill_len = 0;
+ list->fill_num = 0;
+ list->dropped_num = 0;
+ i = 0;
+ mtx_lock(&softc->ctl_lock);
+ STAILQ_FOREACH(fe, &softc->fe_list, links) {
+ struct ctl_port_entry entry, *list_entry;
+
+ if (list->fill_num >= list->alloc_num) {
+ list->dropped_num++;
+ continue;
+ }
+
+ entry.port_type = fe->port_type;
+ strlcpy(entry.port_name, fe->port_name,
+ sizeof(entry.port_name));
+ entry.targ_port = fe->targ_port;
+ entry.physical_port = fe->physical_port;
+ entry.virtual_port = fe->virtual_port;
+ entry.wwnn = fe->wwnn;
+ entry.wwpn = fe->wwpn;
+ if (fe->status & CTL_PORT_STATUS_ONLINE)
+ entry.online = 1;
+ else
+ entry.online = 0;
+
+ list_entry = &list->entries[i];
+
+ retval = copyout(&entry, list_entry, sizeof(entry));
+ if (retval != 0) {
+ printf("%s: CTL_GET_PORT_LIST: copyout "
+ "returned %d\n", __func__, retval);
+ break;
+ }
+ i++;
+ list->fill_num++;
+ list->fill_len += sizeof(entry);
+ }
+ mtx_unlock(&softc->ctl_lock);
+
+ /*
+ * If this is non-zero, we had a copyout fault, so there's
+ * probably no point in attempting to set the status inside
+ * the structure.
+ */
+ if (retval != 0)
+ break;
+
+ if (list->dropped_num > 0)
+ list->status = CTL_PORT_LIST_NEED_MORE_SPACE;
+ else
+ list->status = CTL_PORT_LIST_OK;
+ break;
+ }
+ case CTL_DUMP_OOA: {
+ struct ctl_lun *lun;
+ union ctl_io *io;
+ char printbuf[128];
+ struct sbuf sb;
+
+ mtx_lock(&softc->ctl_lock);
+ printf("Dumping OOA queues:\n");
+ STAILQ_FOREACH(lun, &softc->lun_list, links) {
+ for (io = (union ctl_io *)TAILQ_FIRST(
+ &lun->ooa_queue); io != NULL;
+ io = (union ctl_io *)TAILQ_NEXT(&io->io_hdr,
+ ooa_links)) {
+ sbuf_new(&sb, printbuf, sizeof(printbuf),
+ SBUF_FIXEDLEN);
+ sbuf_printf(&sb, "LUN %jd tag 0x%04x%s%s%s%s: ",
+ (intmax_t)lun->lun,
+ io->scsiio.tag_num,
+ (io->io_hdr.flags &
+ CTL_FLAG_BLOCKED) ? "" : " BLOCKED",
+ (io->io_hdr.flags &
+ CTL_FLAG_DMA_INPROG) ? " DMA" : "",
+ (io->io_hdr.flags &
+ CTL_FLAG_ABORT) ? " ABORT" : "",
+ (io->io_hdr.flags &
+ CTL_FLAG_IS_WAS_ON_RTR) ? " RTR" : "");
+ ctl_scsi_command_string(&io->scsiio, NULL, &sb);
+ sbuf_finish(&sb);
+ printf("%s\n", sbuf_data(&sb));
+ }
+ }
+ printf("OOA queues dump done\n");
+ mtx_unlock(&softc->ctl_lock);
+ break;
+ }
+ case CTL_GET_OOA: {
+ struct ctl_lun *lun;
+ struct ctl_ooa *ooa_hdr;
+ uint32_t cur_fill_num;
+
+ ooa_hdr = (struct ctl_ooa *)addr;
+
+ if ((ooa_hdr->alloc_len == 0)
+ || (ooa_hdr->alloc_num == 0)) {
+ printf("%s: CTL_GET_OOA: alloc len %u and alloc num %u "
+ "must be non-zero\n", __func__,
+ ooa_hdr->alloc_len, ooa_hdr->alloc_num);
+ retval = EINVAL;
+ break;
+ }
+
+ if (ooa_hdr->alloc_len != (ooa_hdr->alloc_num *
+ sizeof(struct ctl_ooa_entry))) {
+ printf("%s: CTL_GET_OOA: alloc len %u must be alloc "
+ "num %d * sizeof(struct ctl_ooa_entry) %zd\n",
+ __func__, ooa_hdr->alloc_len,
+ ooa_hdr->alloc_num,sizeof(struct ctl_ooa_entry));
+ retval = EINVAL;
+ break;
+ }
+
+ mtx_lock(&softc->ctl_lock);
+ if (((ooa_hdr->flags & CTL_OOA_FLAG_ALL_LUNS) == 0)
+ && ((ooa_hdr->lun_num > CTL_MAX_LUNS)
+ || (softc->ctl_luns[ooa_hdr->lun_num] == NULL))) {
+ mtx_unlock(&softc->ctl_lock);
+ printf("%s: CTL_GET_OOA: invalid LUN %ju\n",
+ __func__, (uintmax_t)ooa_hdr->lun_num);
+ retval = EINVAL;
+ break;
+ }
+
+ cur_fill_num = 0;
+
+ if (ooa_hdr->flags & CTL_OOA_FLAG_ALL_LUNS) {
+ STAILQ_FOREACH(lun, &softc->lun_list, links) {
+ retval = ctl_ioctl_fill_ooa(lun, &cur_fill_num,
+ ooa_hdr);
+ if (retval != 0)
+ break;
+ }
+ if (retval != 0) {
+ mtx_unlock(&softc->ctl_lock);
+ break;
+ }
+ } else {
+ lun = softc->ctl_luns[ooa_hdr->lun_num];
+
+ retval = ctl_ioctl_fill_ooa(lun, &cur_fill_num,ooa_hdr);
+ }
+ mtx_unlock(&softc->ctl_lock);
+
+ ooa_hdr->fill_num = min(cur_fill_num, ooa_hdr->alloc_num);
+ ooa_hdr->fill_len = ooa_hdr->fill_num *
+ sizeof(struct ctl_ooa_entry);
+
+ getbintime(&ooa_hdr->cur_bt);
+
+ if (cur_fill_num > ooa_hdr->alloc_num) {
+ ooa_hdr->dropped_num = cur_fill_num -ooa_hdr->alloc_num;
+ ooa_hdr->status = CTL_OOA_NEED_MORE_SPACE;
+ } else {
+ ooa_hdr->dropped_num = 0;
+ ooa_hdr->status = CTL_OOA_OK;
+ }
+ break;
+ }
+ case CTL_CHECK_OOA: {
+ union ctl_io *io;
+ struct ctl_lun *lun;
+ struct ctl_ooa_info *ooa_info;
+
+
+ ooa_info = (struct ctl_ooa_info *)addr;
+
+ if (ooa_info->lun_id >= CTL_MAX_LUNS) {
+ ooa_info->status = CTL_OOA_INVALID_LUN;
+ break;
+ }
+ mtx_lock(&softc->ctl_lock);
+ lun = softc->ctl_luns[ooa_info->lun_id];
+ if (lun == NULL) {
+ mtx_unlock(&softc->ctl_lock);
+ ooa_info->status = CTL_OOA_INVALID_LUN;
+ break;
+ }
+
+ ooa_info->num_entries = 0;
+ for (io = (union ctl_io *)TAILQ_FIRST(&lun->ooa_queue);
+ io != NULL; io = (union ctl_io *)TAILQ_NEXT(
+ &io->io_hdr, ooa_links)) {
+ ooa_info->num_entries++;
+ }
+
+ mtx_unlock(&softc->ctl_lock);
+ ooa_info->status = CTL_OOA_SUCCESS;
+
+ break;
+ }
+ case CTL_HARD_START:
+ case CTL_HARD_STOP: {
+ struct ctl_fe_ioctl_startstop_info ss_info;
+ struct cfi_metatask *metatask;
+ struct mtx hs_mtx;
+
+ mtx_init(&hs_mtx, "HS Mutex", NULL, MTX_DEF);
+
+ cv_init(&ss_info.sem, "hard start/stop cv" );
+
+ metatask = cfi_alloc_metatask(/*can_wait*/ 1);
+ if (metatask == NULL) {
+ retval = ENOMEM;
+ mtx_destroy(&hs_mtx);
+ break;
+ }
+
+ if (cmd == CTL_HARD_START)
+ metatask->tasktype = CFI_TASK_STARTUP;
+ else
+ metatask->tasktype = CFI_TASK_SHUTDOWN;
+
+ metatask->callback = ctl_ioctl_hard_startstop_callback;
+ metatask->callback_arg = &ss_info;
+
+ cfi_action(metatask);
+
+ /* Wait for the callback */
+ mtx_lock(&hs_mtx);
+ cv_wait_sig(&ss_info.sem, &hs_mtx);
+ mtx_unlock(&hs_mtx);
+
+ /*
+ * All information has been copied from the metatask by the
+ * time cv_broadcast() is called, so we free the metatask here.
+ */
+ cfi_free_metatask(metatask);
+
+ memcpy((void *)addr, &ss_info.hs_info, sizeof(ss_info.hs_info));
+
+ mtx_destroy(&hs_mtx);
+ break;
+ }
+ case CTL_BBRREAD: {
+ struct ctl_bbrread_info *bbr_info;
+ struct ctl_fe_ioctl_bbrread_info fe_bbr_info;
+ struct mtx bbr_mtx;
+ struct cfi_metatask *metatask;
+
+ bbr_info = (struct ctl_bbrread_info *)addr;
+
+ bzero(&fe_bbr_info, sizeof(fe_bbr_info));
+
+ bzero(&bbr_mtx, sizeof(bbr_mtx));
+ mtx_init(&bbr_mtx, "BBR Mutex", NULL, MTX_DEF);
+
+ fe_bbr_info.bbr_info = bbr_info;
+ fe_bbr_info.lock = &bbr_mtx;
+
+ cv_init(&fe_bbr_info.sem, "BBR read cv");
+ metatask = cfi_alloc_metatask(/*can_wait*/ 1);
+
+ if (metatask == NULL) {
+ mtx_destroy(&bbr_mtx);
+ cv_destroy(&fe_bbr_info.sem);
+ retval = ENOMEM;
+ break;
+ }
+ metatask->tasktype = CFI_TASK_BBRREAD;
+ metatask->callback = ctl_ioctl_bbrread_callback;
+ metatask->callback_arg = &fe_bbr_info;
+ metatask->taskinfo.bbrread.lun_num = bbr_info->lun_num;
+ metatask->taskinfo.bbrread.lba = bbr_info->lba;
+ metatask->taskinfo.bbrread.len = bbr_info->len;
+
+ cfi_action(metatask);
+
+ mtx_lock(&bbr_mtx);
+ while (fe_bbr_info.wakeup_done == 0)
+ cv_wait_sig(&fe_bbr_info.sem, &bbr_mtx);
+ mtx_unlock(&bbr_mtx);
+
+ bbr_info->status = metatask->status;
+ bbr_info->bbr_status = metatask->taskinfo.bbrread.status;
+ bbr_info->scsi_status = metatask->taskinfo.bbrread.scsi_status;
+ memcpy(&bbr_info->sense_data,
+ &metatask->taskinfo.bbrread.sense_data,
+ ctl_min(sizeof(bbr_info->sense_data),
+ sizeof(metatask->taskinfo.bbrread.sense_data)));
+
+ cfi_free_metatask(metatask);
+
+ mtx_destroy(&bbr_mtx);
+ cv_destroy(&fe_bbr_info.sem);
+
+ break;
+ }
+ case CTL_DELAY_IO: {
+ struct ctl_io_delay_info *delay_info;
+#ifdef CTL_IO_DELAY
+ struct ctl_lun *lun;
+#endif /* CTL_IO_DELAY */
+
+ delay_info = (struct ctl_io_delay_info *)addr;
+
+#ifdef CTL_IO_DELAY
+ mtx_lock(&softc->ctl_lock);
+
+ if ((delay_info->lun_id > CTL_MAX_LUNS)
+ || (softc->ctl_luns[delay_info->lun_id] == NULL)) {
+ delay_info->status = CTL_DELAY_STATUS_INVALID_LUN;
+ } else {
+ lun = softc->ctl_luns[delay_info->lun_id];
+
+ delay_info->status = CTL_DELAY_STATUS_OK;
+
+ switch (delay_info->delay_type) {
+ case CTL_DELAY_TYPE_CONT:
+ break;
+ case CTL_DELAY_TYPE_ONESHOT:
+ break;
+ default:
+ delay_info->status =
+ CTL_DELAY_STATUS_INVALID_TYPE;
+ break;
+ }
+
+ switch (delay_info->delay_loc) {
+ case CTL_DELAY_LOC_DATAMOVE:
+ lun->delay_info.datamove_type =
+ delay_info->delay_type;
+ lun->delay_info.datamove_delay =
+ delay_info->delay_secs;
+ break;
+ case CTL_DELAY_LOC_DONE:
+ lun->delay_info.done_type =
+ delay_info->delay_type;
+ lun->delay_info.done_delay =
+ delay_info->delay_secs;
+ break;
+ default:
+ delay_info->status =
+ CTL_DELAY_STATUS_INVALID_LOC;
+ break;
+ }
+ }
+
+ mtx_unlock(&softc->ctl_lock);
+#else
+ delay_info->status = CTL_DELAY_STATUS_NOT_IMPLEMENTED;
+#endif /* CTL_IO_DELAY */
+ break;
+ }
+ case CTL_REALSYNC_SET: {
+ int *syncstate;
+
+ syncstate = (int *)addr;
+
+ mtx_lock(&softc->ctl_lock);
+ switch (*syncstate) {
+ case 0:
+ softc->flags &= ~CTL_FLAG_REAL_SYNC;
+ break;
+ case 1:
+ softc->flags |= CTL_FLAG_REAL_SYNC;
+ break;
+ default:
+ retval = -EINVAL;
+ break;
+ }
+ mtx_unlock(&softc->ctl_lock);
+ break;
+ }
+ case CTL_REALSYNC_GET: {
+ int *syncstate;
+
+ syncstate = (int*)addr;
+
+ mtx_lock(&softc->ctl_lock);
+ if (softc->flags & CTL_FLAG_REAL_SYNC)
+ *syncstate = 1;
+ else
+ *syncstate = 0;
+ mtx_unlock(&softc->ctl_lock);
+
+ break;
+ }
+ case CTL_SETSYNC:
+ case CTL_GETSYNC: {
+ struct ctl_sync_info *sync_info;
+ struct ctl_lun *lun;
+
+ sync_info = (struct ctl_sync_info *)addr;
+
+ mtx_lock(&softc->ctl_lock);
+ lun = softc->ctl_luns[sync_info->lun_id];
+ if (lun == NULL) {
+ mtx_unlock(&softc->ctl_lock);
+ sync_info->status = CTL_GS_SYNC_NO_LUN;
+ }
+ /*
+ * Get or set the sync interval. We're not bounds checking
+ * in the set case, hopefully the user won't do something
+ * silly.
+ */
+ if (cmd == CTL_GETSYNC)
+ sync_info->sync_interval = lun->sync_interval;
+ else
+ lun->sync_interval = sync_info->sync_interval;
+
+ mtx_unlock(&softc->ctl_lock);
+
+ sync_info->status = CTL_GS_SYNC_OK;
+
+ break;
+ }
+ case CTL_GETSTATS: {
+ struct ctl_stats *stats;
+ struct ctl_lun *lun;
+ int i;
+
+ stats = (struct ctl_stats *)addr;
+
+ if ((sizeof(struct ctl_lun_io_stats) * softc->num_luns) >
+ stats->alloc_len) {
+ stats->status = CTL_SS_NEED_MORE_SPACE;
+ stats->num_luns = softc->num_luns;
+ break;
+ }
+ /*
+ * XXX KDM no locking here. If the LUN list changes,
+ * things can blow up.
+ */
+ for (i = 0, lun = STAILQ_FIRST(&softc->lun_list); lun != NULL;
+ i++, lun = STAILQ_NEXT(lun, links)) {
+ retval = copyout(&lun->stats, &stats->lun_stats[i],
+ sizeof(lun->stats));
+ if (retval != 0)
+ break;
+ }
+ stats->num_luns = softc->num_luns;
+ stats->fill_len = sizeof(struct ctl_lun_io_stats) *
+ softc->num_luns;
+ stats->status = CTL_SS_OK;
+#ifdef CTL_TIME_IO
+ stats->flags = CTL_STATS_FLAG_TIME_VALID;
+#else
+ stats->flags = CTL_STATS_FLAG_NONE;
+#endif
+ getnanouptime(&stats->timestamp);
+ break;
+ }
+ case CTL_ERROR_INJECT: {
+ struct ctl_error_desc *err_desc, *new_err_desc;
+ struct ctl_lun *lun;
+
+ err_desc = (struct ctl_error_desc *)addr;
+
+ new_err_desc = malloc(sizeof(*new_err_desc), M_CTL,
+ M_WAITOK | M_ZERO);
+ if (new_err_desc == NULL) {
+ printf("%s: CTL_ERROR_INJECT: error allocating %zu "
+ "bytes\n", __func__, sizeof(*new_err_desc));
+ retval = ENOMEM;
+ break;
+ }
+ bcopy(err_desc, new_err_desc, sizeof(*new_err_desc));
+
+ mtx_lock(&softc->ctl_lock);
+ lun = softc->ctl_luns[err_desc->lun_id];
+ if (lun == NULL) {
+ mtx_unlock(&softc->ctl_lock);
+ printf("%s: CTL_ERROR_INJECT: invalid LUN %ju\n",
+ __func__, (uintmax_t)err_desc->lun_id);
+ retval = EINVAL;
+ break;
+ }
+
+ /*
+ * We could do some checking here to verify the validity
+ * of the request, but given the complexity of error
+ * injection requests, the checking logic would be fairly
+ * complex.
+ *
+ * For now, if the request is invalid, it just won't get
+ * executed and might get deleted.
+ */
+ STAILQ_INSERT_TAIL(&lun->error_list, new_err_desc, links);
+
+ /*
+ * XXX KDM check to make sure the serial number is unique,
+ * in case we somehow manage to wrap. That shouldn't
+ * happen for a very long time, but it's the right thing to
+ * do.
+ */
+ new_err_desc->serial = lun->error_serial;
+ err_desc->serial = lun->error_serial;
+ lun->error_serial++;
+
+ mtx_unlock(&softc->ctl_lock);
+ break;
+ }
+ case CTL_ERROR_INJECT_DELETE: {
+ struct ctl_error_desc *delete_desc, *desc, *desc2;
+ struct ctl_lun *lun;
+ int delete_done;
+
+ delete_desc = (struct ctl_error_desc *)addr;
+ delete_done = 0;
+
+ mtx_lock(&softc->ctl_lock);
+ lun = softc->ctl_luns[delete_desc->lun_id];
+ if (lun == NULL) {
+ mtx_unlock(&softc->ctl_lock);
+ printf("%s: CTL_ERROR_INJECT_DELETE: invalid LUN %ju\n",
+ __func__, (uintmax_t)delete_desc->lun_id);
+ retval = EINVAL;
+ break;
+ }
+ STAILQ_FOREACH_SAFE(desc, &lun->error_list, links, desc2) {
+ if (desc->serial != delete_desc->serial)
+ continue;
+
+ STAILQ_REMOVE(&lun->error_list, desc, ctl_error_desc,
+ links);
+ free(desc, M_CTL);
+ delete_done = 1;
+ }
+ mtx_unlock(&softc->ctl_lock);
+ if (delete_done == 0) {
+ printf("%s: CTL_ERROR_INJECT_DELETE: can't find "
+ "error serial %ju on LUN %u\n", __func__,
+ delete_desc->serial, delete_desc->lun_id);
+ retval = EINVAL;
+ break;
+ }
+ break;
+ }
+ case CTL_DUMP_STRUCTS: {
+ int i, j, k;
+ struct ctl_frontend *fe;
+
+ printf("CTL IID to WWPN map start:\n");
+ for (i = 0; i < CTL_MAX_PORTS; i++) {
+ for (j = 0; j < CTL_MAX_INIT_PER_PORT; j++) {
+ if (softc->wwpn_iid[i][j].in_use == 0)
+ continue;
+
+ printf("port %d iid %u WWPN %#jx\n",
+ softc->wwpn_iid[i][j].port,
+ softc->wwpn_iid[i][j].iid,
+ (uintmax_t)softc->wwpn_iid[i][j].wwpn);
+ }
+ }
+ printf("CTL IID to WWPN map end\n");
+ printf("CTL Persistent Reservation information start:\n");
+ for (i = 0; i < CTL_MAX_LUNS; i++) {
+ struct ctl_lun *lun;
+
+ lun = softc->ctl_luns[i];
+
+ if ((lun == NULL)
+ || ((lun->flags & CTL_LUN_DISABLED) != 0))
+ continue;
+
+ for (j = 0; j < (CTL_MAX_PORTS * 2); j++) {
+ for (k = 0; k < CTL_MAX_INIT_PER_PORT; k++){
+ if (lun->per_res[j+k].registered == 0)
+ continue;
+ printf("LUN %d port %d iid %d key "
+ "%#jx\n", i, j, k,
+ (uintmax_t)scsi_8btou64(
+ lun->per_res[j+k].res_key.key));
+ }
+ }
+ }
+ printf("CTL Persistent Reservation information end\n");
+ printf("CTL Frontends:\n");
+ /*
+ * XXX KDM calling this without a lock. We'd likely want
+ * to drop the lock before calling the frontend's dump
+ * routine anyway.
+ */
+ STAILQ_FOREACH(fe, &softc->fe_list, links) {
+ printf("Frontend %s Type %u pport %d vport %d WWNN "
+ "%#jx WWPN %#jx\n", fe->port_name, fe->port_type,
+ fe->physical_port, fe->virtual_port,
+ (uintmax_t)fe->wwnn, (uintmax_t)fe->wwpn);
+
+ /*
+ * Frontends are not required to support the dump
+ * routine.
+ */
+ if (fe->fe_dump == NULL)
+ continue;
+
+ fe->fe_dump();
+ }
+ printf("CTL Frontend information end\n");
+ break;
+ }
+ case CTL_LUN_REQ: {
+ struct ctl_lun_req *lun_req;
+ struct ctl_backend_driver *backend;
+
+ lun_req = (struct ctl_lun_req *)addr;
+
+ backend = ctl_backend_find(lun_req->backend);
+ if (backend == NULL) {
+ lun_req->status = CTL_LUN_ERROR;
+ snprintf(lun_req->error_str,
+ sizeof(lun_req->error_str),
+ "Backend \"%s\" not found.",
+ lun_req->backend);
+ break;
+ }
+ if (lun_req->num_be_args > 0) {
+ lun_req->kern_be_args = ctl_copyin_args(
+ lun_req->num_be_args,
+ lun_req->be_args,
+ lun_req->error_str,
+ sizeof(lun_req->error_str));
+ if (lun_req->kern_be_args == NULL) {
+ lun_req->status = CTL_LUN_ERROR;
+ break;
+ }
+ }
+
+ retval = backend->ioctl(dev, cmd, addr, flag, td);
+
+ if (lun_req->num_be_args > 0) {
+ ctl_free_args(lun_req->num_be_args,
+ lun_req->kern_be_args);
+ }
+ break;
+ }
+ case CTL_LUN_LIST: {
+ struct sbuf *sb;
+ struct ctl_lun *lun;
+ struct ctl_lun_list *list;
+
+ list = (struct ctl_lun_list *)addr;
+
+ /*
+ * Allocate a fixed length sbuf here, based on the length
+ * of the user's buffer. We could allocate an auto-extending
+ * buffer, and then tell the user how much larger our
+ * amount of data is than his buffer, but that presents
+ * some problems:
+ *
+ * 1. The sbuf(9) routines use a blocking malloc, and so
+ * we can't hold a lock while calling them with an
+ * auto-extending buffer.
+ *
+ * 2. There is not currently a LUN reference counting
+ * mechanism, outside of outstanding transactions on
+ * the LUN's OOA queue. So a LUN could go away on us
+ * while we're getting the LUN number, backend-specific
+ * information, etc. Thus, given the way things
+ * currently work, we need to hold the CTL lock while
+ * grabbing LUN information.
+ *
+ * So, from the user's standpoint, the best thing to do is
+ * allocate what he thinks is a reasonable buffer length,
+ * and then if he gets a CTL_LUN_LIST_NEED_MORE_SPACE error,
+ * double the buffer length and try again. (And repeat
+ * that until he succeeds.)
+ */
+ sb = sbuf_new(NULL, NULL, list->alloc_len, SBUF_FIXEDLEN);
+ if (sb == NULL) {
+ list->status = CTL_LUN_LIST_ERROR;
+ snprintf(list->error_str, sizeof(list->error_str),
+ "Unable to allocate %d bytes for LUN list",
+ list->alloc_len);
+ break;
+ }
+
+ sbuf_printf(sb, "<ctllunlist>\n");
+
+ mtx_lock(&softc->ctl_lock);
+
+ STAILQ_FOREACH(lun, &softc->lun_list, links) {
+ retval = sbuf_printf(sb, "<lun id=\"%ju\">\n",
+ (uintmax_t)lun->lun);
+
+ /*
+ * Bail out as soon as we see that we've overfilled
+ * the buffer.
+ */
+ if (retval != 0)
+ break;
+
+ retval = sbuf_printf(sb, "<backend_type>%s"
+ "</backend_type>\n",
+ (lun->backend == NULL) ? "none" :
+ lun->backend->name);
+
+ if (retval != 0)
+ break;
+
+ retval = sbuf_printf(sb, "<lun_type>%d</lun_type>\n",
+ lun->be_lun->lun_type);
+
+ if (retval != 0)
+ break;
+
+ if (lun->backend == NULL) {
+ retval = sbuf_printf(sb, "</lun>\n");
+ if (retval != 0)
+ break;
+ continue;
+ }
+
+ retval = sbuf_printf(sb, "<size>%ju</size>\n",
+ (lun->be_lun->maxlba > 0) ?
+ lun->be_lun->maxlba + 1 : 0);
+
+ if (retval != 0)
+ break;
+
+ retval = sbuf_printf(sb, "<blocksize>%u</blocksize>\n",
+ lun->be_lun->blocksize);
+
+ if (retval != 0)
+ break;
+
+ retval = sbuf_printf(sb, "<serial_number>");
+
+ if (retval != 0)
+ break;
+
+ retval = ctl_sbuf_printf_esc(sb,
+ lun->be_lun->serial_num);
+
+ if (retval != 0)
+ break;
+
+ retval = sbuf_printf(sb, "</serial_number>\n");
+
+ if (retval != 0)
+ break;
+
+ retval = sbuf_printf(sb, "<device_id>");
+
+ if (retval != 0)
+ break;
+
+ retval = ctl_sbuf_printf_esc(sb,lun->be_lun->device_id);
+
+ if (retval != 0)
+ break;
+
+ retval = sbuf_printf(sb, "</device_id>\n");
+
+ if (retval != 0)
+ break;
+
+ if (lun->backend->lun_info == NULL) {
+ retval = sbuf_printf(sb, "</lun>\n");
+ if (retval != 0)
+ break;
+ continue;
+ }
+
+ retval =lun->backend->lun_info(lun->be_lun->be_lun, sb);
+
+ if (retval != 0)
+ break;
+
+ retval = sbuf_printf(sb, "</lun>\n");
+
+ if (retval != 0)
+ break;
+ }
+ mtx_unlock(&softc->ctl_lock);
+
+ if ((retval != 0)
+ || ((retval = sbuf_printf(sb, "</ctllunlist>\n")) != 0)) {
+ retval = 0;
+ sbuf_delete(sb);
+ list->status = CTL_LUN_LIST_NEED_MORE_SPACE;
+ snprintf(list->error_str, sizeof(list->error_str),
+ "Out of space, %d bytes is too small",
+ list->alloc_len);
+ break;
+ }
+
+ sbuf_finish(sb);
+
+ retval = copyout(sbuf_data(sb), list->lun_xml,
+ sbuf_len(sb) + 1);
+
+ list->fill_len = sbuf_len(sb) + 1;
+ list->status = CTL_LUN_LIST_OK;
+ sbuf_delete(sb);
+ break;
+ }
+ default: {
+ /* XXX KDM should we fix this? */
+#if 0
+ struct ctl_backend_driver *backend;
+ unsigned int type;
+ int found;
+
+ found = 0;
+
+ /*
+ * We encode the backend type as the ioctl type for backend
+ * ioctls. So parse it out here, and then search for a
+ * backend of this type.
+ */
+ type = _IOC_TYPE(cmd);
+
+ STAILQ_FOREACH(backend, &softc->be_list, links) {
+ if (backend->type == type) {
+ found = 1;
+ break;
+ }
+ }
+ if (found == 0) {
+ printf("ctl: unknown ioctl command %#lx or backend "
+ "%d\n", cmd, type);
+ retval = -EINVAL;
+ break;
+ }
+ retval = backend->ioctl(dev, cmd, addr, flag, td);
+#endif
+ retval = ENOTTY;
+ break;
+ }
+ }
+ return (retval);
+}
+
+uint32_t
+ctl_get_initindex(struct ctl_nexus *nexus)
+{
+ if (nexus->targ_port < CTL_MAX_PORTS)
+ return (nexus->initid.id +
+ (nexus->targ_port * CTL_MAX_INIT_PER_PORT));
+ else
+ return (nexus->initid.id +
+ ((nexus->targ_port - CTL_MAX_PORTS) *
+ CTL_MAX_INIT_PER_PORT));
+}
+
+uint32_t
+ctl_get_resindex(struct ctl_nexus *nexus)
+{
+ return (nexus->initid.id + (nexus->targ_port * CTL_MAX_INIT_PER_PORT));
+}
+
+uint32_t
+ctl_port_idx(int port_num)
+{
+ if (port_num < CTL_MAX_PORTS)
+ return(port_num);
+ else
+ return(port_num - CTL_MAX_PORTS);
+}
+
+/*
+ * Note: This only works for bitmask sizes that are at least 32 bits, and
+ * that are a power of 2.
+ */
+int
+ctl_ffz(uint32_t *mask, uint32_t size)
+{
+ uint32_t num_chunks, num_pieces;
+ int i, j;
+
+ num_chunks = (size >> 5);
+ if (num_chunks == 0)
+ num_chunks++;
+ num_pieces = ctl_min((sizeof(uint32_t) * 8), size);
+
+ for (i = 0; i < num_chunks; i++) {
+ for (j = 0; j < num_pieces; j++) {
+ if ((mask[i] & (1 << j)) == 0)
+ return ((i << 5) + j);
+ }
+ }
+
+ return (-1);
+}
+
+int
+ctl_set_mask(uint32_t *mask, uint32_t bit)
+{
+ uint32_t chunk, piece;
+
+ chunk = bit >> 5;
+ piece = bit % (sizeof(uint32_t) * 8);
+
+ if ((mask[chunk] & (1 << piece)) != 0)
+ return (-1);
+ else
+ mask[chunk] |= (1 << piece);
+
+ return (0);
+}
+
+int
+ctl_clear_mask(uint32_t *mask, uint32_t bit)
+{
+ uint32_t chunk, piece;
+
+ chunk = bit >> 5;
+ piece = bit % (sizeof(uint32_t) * 8);
+
+ if ((mask[chunk] & (1 << piece)) == 0)
+ return (-1);
+ else
+ mask[chunk] &= ~(1 << piece);
+
+ return (0);
+}
+
+int
+ctl_is_set(uint32_t *mask, uint32_t bit)
+{
+ uint32_t chunk, piece;
+
+ chunk = bit >> 5;
+ piece = bit % (sizeof(uint32_t) * 8);
+
+ if ((mask[chunk] & (1 << piece)) == 0)
+ return (0);
+ else
+ return (1);
+}
+
+#ifdef unused
+/*
+ * The bus, target and lun are optional, they can be filled in later.
+ * can_wait is used to determine whether we can wait on the malloc or not.
+ */
+union ctl_io*
+ctl_malloc_io(ctl_io_type io_type, uint32_t targ_port, uint32_t targ_target,
+ uint32_t targ_lun, int can_wait)
+{
+ union ctl_io *io;
+
+ if (can_wait)
+ io = (union ctl_io *)malloc(sizeof(*io), M_CTL, M_WAITOK);
+ else
+ io = (union ctl_io *)malloc(sizeof(*io), M_CTL, M_NOWAIT);
+
+ if (io != NULL) {
+ io->io_hdr.io_type = io_type;
+ io->io_hdr.targ_port = targ_port;
+ /*
+ * XXX KDM this needs to change/go away. We need to move
+ * to a preallocated pool of ctl_scsiio structures.
+ */
+ io->io_hdr.nexus.targ_target.id = targ_target;
+ io->io_hdr.nexus.targ_lun = targ_lun;
+ }
+
+ return (io);
+}
+
+void
+ctl_kfree_io(union ctl_io *io)
+{
+ free(io, M_CTL);
+}
+#endif /* unused */
+
+/*
+ * ctl_softc, pool_type, total_ctl_io are passed in.
+ * npool is passed out.
+ */
+int
+ctl_pool_create(struct ctl_softc *ctl_softc, ctl_pool_type pool_type,
+ uint32_t total_ctl_io, struct ctl_io_pool **npool)
+{
+ uint32_t i;
+ union ctl_io *cur_io, *next_io;
+ struct ctl_io_pool *pool;
+ int retval;
+
+ retval = 0;
+
+ pool = (struct ctl_io_pool *)malloc(sizeof(*pool), M_CTL, M_NOWAIT);
+ if (pool == NULL) {
+ retval = -ENOMEM;
+ goto bailout;
+ }
+
+ memset(pool, 0, sizeof(*pool));
+
+ pool->type = pool_type;
+ pool->ctl_softc = ctl_softc;
+
+ mtx_lock(&ctl_softc->ctl_lock);
+ pool->id = ctl_softc->cur_pool_id++;
+ mtx_unlock(&ctl_softc->ctl_lock);
+
+ pool->flags = CTL_POOL_FLAG_NONE;
+ STAILQ_INIT(&pool->free_queue);
+
+ /*
+ * XXX KDM other options here:
+ * - allocate a page at a time
+ * - allocate one big chunk of memory.
+ * Page allocation might work well, but would take a little more
+ * tracking.
+ */
+ for (i = 0; i < total_ctl_io; i++) {
+ cur_io = (union ctl_io *)malloc(sizeof(*cur_io), M_CTL,
+ M_NOWAIT);
+ if (cur_io == NULL) {
+ retval = ENOMEM;
+ break;
+ }
+ cur_io->io_hdr.pool = pool;
+ STAILQ_INSERT_TAIL(&pool->free_queue, &cur_io->io_hdr, links);
+ pool->total_ctl_io++;
+ pool->free_ctl_io++;
+ }
+
+ if (retval != 0) {
+ for (cur_io = (union ctl_io *)STAILQ_FIRST(&pool->free_queue);
+ cur_io != NULL; cur_io = next_io) {
+ next_io = (union ctl_io *)STAILQ_NEXT(&cur_io->io_hdr,
+ links);
+ STAILQ_REMOVE(&pool->free_queue, &cur_io->io_hdr,
+ ctl_io_hdr, links);
+ free(cur_io, M_CTL);
+ }
+
+ free(pool, M_CTL);
+ goto bailout;
+ }
+ mtx_lock(&ctl_softc->ctl_lock);
+ ctl_softc->num_pools++;
+ STAILQ_INSERT_TAIL(&ctl_softc->io_pools, pool, links);
+ /*
+ * Increment our usage count if this is an external consumer, so we
+ * can't get unloaded until the external consumer (most likely a
+ * FETD) unloads and frees his pool.
+ *
+ * XXX KDM will this increment the caller's module use count, or
+ * mine?
+ */
+#if 0
+ if ((pool_type != CTL_POOL_EMERGENCY)
+ && (pool_type != CTL_POOL_INTERNAL)
+ && (pool_type != CTL_POOL_IOCTL)
+ && (pool_type != CTL_POOL_4OTHERSC))
+ MOD_INC_USE_COUNT;
+#endif
+
+ mtx_unlock(&ctl_softc->ctl_lock);
+
+ *npool = pool;
+
+bailout:
+
+ return (retval);
+}
+
+/*
+ * Caller must hold ctl_softc->ctl_lock.
+ */
+int
+ctl_pool_acquire(struct ctl_io_pool *pool)
+{
+ if (pool == NULL)
+ return (-EINVAL);
+
+ if (pool->flags & CTL_POOL_FLAG_INVALID)
+ return (-EINVAL);
+
+ pool->refcount++;
+
+ return (0);
+}
+
+/*
+ * Caller must hold ctl_softc->ctl_lock.
+ */
+int
+ctl_pool_invalidate(struct ctl_io_pool *pool)
+{
+ if (pool == NULL)
+ return (-EINVAL);
+
+ pool->flags |= CTL_POOL_FLAG_INVALID;
+
+ return (0);
+}
+
+/*
+ * Caller must hold ctl_softc->ctl_lock.
+ */
+int
+ctl_pool_release(struct ctl_io_pool *pool)
+{
+ if (pool == NULL)
+ return (-EINVAL);
+
+ if ((--pool->refcount == 0)
+ && (pool->flags & CTL_POOL_FLAG_INVALID)) {
+ ctl_pool_free(pool->ctl_softc, pool);
+ }
+
+ return (0);
+}
+
+/*
+ * Must be called with ctl_softc->ctl_lock held.
+ */
+void
+ctl_pool_free(struct ctl_softc *ctl_softc, struct ctl_io_pool *pool)
+{
+ union ctl_io *cur_io, *next_io;
+
+ for (cur_io = (union ctl_io *)STAILQ_FIRST(&pool->free_queue);
+ cur_io != NULL; cur_io = next_io) {
+ next_io = (union ctl_io *)STAILQ_NEXT(&cur_io->io_hdr,
+ links);
+ STAILQ_REMOVE(&pool->free_queue, &cur_io->io_hdr, ctl_io_hdr,
+ links);
+ free(cur_io, M_CTL);
+ }
+
+ STAILQ_REMOVE(&ctl_softc->io_pools, pool, ctl_io_pool, links);
+ ctl_softc->num_pools--;
+
+ /*
+ * XXX KDM will this decrement the caller's usage count or mine?
+ */
+#if 0
+ if ((pool->type != CTL_POOL_EMERGENCY)
+ && (pool->type != CTL_POOL_INTERNAL)
+ && (pool->type != CTL_POOL_IOCTL))
+ MOD_DEC_USE_COUNT;
+#endif
+
+ free(pool, M_CTL);
+}
+
+/*
+ * This routine does not block (except for spinlocks of course).
+ * It tries to allocate a ctl_io union from the caller's pool as quickly as
+ * possible.
+ */
+union ctl_io *
+ctl_alloc_io(void *pool_ref)
+{
+ union ctl_io *io;
+ struct ctl_softc *ctl_softc;
+ struct ctl_io_pool *pool, *npool;
+ struct ctl_io_pool *emergency_pool;
+
+ pool = (struct ctl_io_pool *)pool_ref;
+
+ if (pool == NULL) {
+ printf("%s: pool is NULL\n", __func__);
+ return (NULL);
+ }
+
+ emergency_pool = NULL;
+
+ ctl_softc = pool->ctl_softc;
+
+ mtx_lock(&ctl_softc->ctl_lock);
+ /*
+ * First, try to get the io structure from the user's pool.
+ */
+ if (ctl_pool_acquire(pool) == 0) {
+ io = (union ctl_io *)STAILQ_FIRST(&pool->free_queue);
+ if (io != NULL) {
+ STAILQ_REMOVE_HEAD(&pool->free_queue, links);
+ pool->total_allocated++;
+ pool->free_ctl_io--;
+ mtx_unlock(&ctl_softc->ctl_lock);
+ return (io);
+ } else
+ ctl_pool_release(pool);
+ }
+ /*
+ * If he doesn't have any io structures left, search for an
+ * emergency pool and grab one from there.
+ */
+ STAILQ_FOREACH(npool, &ctl_softc->io_pools, links) {
+ if (npool->type != CTL_POOL_EMERGENCY)
+ continue;
+
+ if (ctl_pool_acquire(npool) != 0)
+ continue;
+
+ emergency_pool = npool;
+
+ io = (union ctl_io *)STAILQ_FIRST(&npool->free_queue);
+ if (io != NULL) {
+ STAILQ_REMOVE_HEAD(&npool->free_queue, links);
+ npool->total_allocated++;
+ npool->free_ctl_io--;
+ mtx_unlock(&ctl_softc->ctl_lock);
+ return (io);
+ } else
+ ctl_pool_release(npool);
+ }
+
+ /* Drop the spinlock before we malloc */
+ mtx_unlock(&ctl_softc->ctl_lock);
+
+ /*
+ * The emergency pool (if it exists) didn't have one, so try an
+ * atomic (i.e. nonblocking) malloc and see if we get lucky.
+ */
+ io = (union ctl_io *)malloc(sizeof(*io), M_CTL, M_NOWAIT);
+ if (io != NULL) {
+ /*
+ * If the emergency pool exists but is empty, add this
+ * ctl_io to its list when it gets freed.
+ */
+ if (emergency_pool != NULL) {
+ mtx_lock(&ctl_softc->ctl_lock);
+ if (ctl_pool_acquire(emergency_pool) == 0) {
+ io->io_hdr.pool = emergency_pool;
+ emergency_pool->total_ctl_io++;
+ /*
+ * Need to bump this, otherwise
+ * total_allocated and total_freed won't
+ * match when we no longer have anything
+ * outstanding.
+ */
+ emergency_pool->total_allocated++;
+ }
+ mtx_unlock(&ctl_softc->ctl_lock);
+ } else
+ io->io_hdr.pool = NULL;
+ }
+
+ return (io);
+}
+
+static void
+ctl_free_io_internal(union ctl_io *io, int have_lock)
+{
+ if (io == NULL)
+ return;
+
+ /*
+ * If this ctl_io has a pool, return it to that pool.
+ */
+ if (io->io_hdr.pool != NULL) {
+ struct ctl_io_pool *pool;
+#if 0
+ struct ctl_softc *ctl_softc;
+ union ctl_io *tmp_io;
+ unsigned long xflags;
+ int i;
+
+ ctl_softc = control_softc;
+#endif
+
+ pool = (struct ctl_io_pool *)io->io_hdr.pool;
+
+ if (have_lock == 0)
+ mtx_lock(&pool->ctl_softc->ctl_lock);
+#if 0
+ save_flags(xflags);
+
+ for (i = 0, tmp_io = (union ctl_io *)STAILQ_FIRST(
+ &ctl_softc->task_queue); tmp_io != NULL; i++,
+ tmp_io = (union ctl_io *)STAILQ_NEXT(&tmp_io->io_hdr,
+ links)) {
+ if (tmp_io == io) {
+ printf("%s: %p is still on the task queue!\n",
+ __func__, tmp_io);
+ printf("%s: (%d): type %d "
+ "msg %d cdb %x iptl: "
+ "%d:%d:%d:%d tag 0x%04x "
+ "flg %#lx\n",
+ __func__, i,
+ tmp_io->io_hdr.io_type,
+ tmp_io->io_hdr.msg_type,
+ tmp_io->scsiio.cdb[0],
+ tmp_io->io_hdr.nexus.initid.id,
+ tmp_io->io_hdr.nexus.targ_port,
+ tmp_io->io_hdr.nexus.targ_target.id,
+ tmp_io->io_hdr.nexus.targ_lun,
+ (tmp_io->io_hdr.io_type ==
+ CTL_IO_TASK) ?
+ tmp_io->taskio.tag_num :
+ tmp_io->scsiio.tag_num,
+ xflags);
+ panic("I/O still on the task queue!");
+ }
+ }
+#endif
+ io->io_hdr.io_type = 0xff;
+ STAILQ_INSERT_TAIL(&pool->free_queue, &io->io_hdr, links);
+ pool->total_freed++;
+ pool->free_ctl_io++;
+ ctl_pool_release(pool);
+ if (have_lock == 0)
+ mtx_unlock(&pool->ctl_softc->ctl_lock);
+ } else {
+ /*
+ * Otherwise, just free it. We probably malloced it and
+ * the emergency pool wasn't available.
+ */
+ free(io, M_CTL);
+ }
+
+}
+
+void
+ctl_free_io(union ctl_io *io)
+{
+ ctl_free_io_internal(io, /*have_lock*/ 0);
+}
+
+void
+ctl_zero_io(union ctl_io *io)
+{
+ void *pool_ref;
+
+ if (io == NULL)
+ return;
+
+ /*
+ * May need to preserve linked list pointers at some point too.
+ */
+ pool_ref = io->io_hdr.pool;
+
+ memset(io, 0, sizeof(*io));
+
+ io->io_hdr.pool = pool_ref;
+}
+
+/*
+ * This routine is currently used for internal copies of ctl_ios that need
+ * to persist for some reason after we've already returned status to the
+ * FETD. (Thus the flag set.)
+ *
+ * XXX XXX
+ * Note that this makes a blind copy of all fields in the ctl_io, except
+ * for the pool reference. This includes any memory that has been
+ * allocated! That memory will no longer be valid after done has been
+ * called, so this would be VERY DANGEROUS for command that actually does
+ * any reads or writes. Right now (11/7/2005), this is only used for immediate
+ * start and stop commands, which don't transfer any data, so this is not a
+ * problem. If it is used for anything else, the caller would also need to
+ * allocate data buffer space and this routine would need to be modified to
+ * copy the data buffer(s) as well.
+ */
+void
+ctl_copy_io(union ctl_io *src, union ctl_io *dest)
+{
+ void *pool_ref;
+
+ if ((src == NULL)
+ || (dest == NULL))
+ return;
+
+ /*
+ * May need to preserve linked list pointers at some point too.
+ */
+ pool_ref = dest->io_hdr.pool;
+
+ memcpy(dest, src, ctl_min(sizeof(*src), sizeof(*dest)));
+
+ dest->io_hdr.pool = pool_ref;
+ /*
+ * We need to know that this is an internal copy, and doesn't need
+ * to get passed back to the FETD that allocated it.
+ */
+ dest->io_hdr.flags |= CTL_FLAG_INT_COPY;
+}
+
+#ifdef NEEDTOPORT
+static void
+ctl_update_power_subpage(struct copan_power_subpage *page)
+{
+ int num_luns, num_partitions, config_type;
+ struct ctl_softc *softc;
+ cs_BOOL_t aor_present, shelf_50pct_power;
+ cs_raidset_personality_t rs_type;
+ int max_active_luns;
+
+ softc = control_softc;
+
+ /* subtract out the processor LUN */
+ num_luns = softc->num_luns - 1;
+ /*
+ * Default to 7 LUNs active, which was the only number we allowed
+ * in the past.
+ */
+ max_active_luns = 7;
+
+ num_partitions = config_GetRsPartitionInfo();
+ config_type = config_GetConfigType();
+ shelf_50pct_power = config_GetShelfPowerMode();
+ aor_present = config_IsAorRsPresent();
+
+ rs_type = ddb_GetRsRaidType(1);
+ if ((rs_type != CS_RAIDSET_PERSONALITY_RAID5)
+ && (rs_type != CS_RAIDSET_PERSONALITY_RAID1)) {
+ EPRINT(0, "Unsupported RS type %d!", rs_type);
+ }
+
+
+ page->total_luns = num_luns;
+
+ switch (config_type) {
+ case 40:
+ /*
+ * In a 40 drive configuration, it doesn't matter what DC
+ * cards we have, whether we have AOR enabled or not,
+ * partitioning or not, or what type of RAIDset we have.
+ * In that scenario, we can power up every LUN we present
+ * to the user.
+ */
+ max_active_luns = num_luns;
+
+ break;
+ case 64:
+ if (shelf_50pct_power == CS_FALSE) {
+ /* 25% power */
+ if (aor_present == CS_TRUE) {
+ if (rs_type ==
+ CS_RAIDSET_PERSONALITY_RAID5) {
+ max_active_luns = 7;
+ } else if (rs_type ==
+ CS_RAIDSET_PERSONALITY_RAID1){
+ max_active_luns = 14;
+ } else {
+ /* XXX KDM now what?? */
+ }
+ } else {
+ if (rs_type ==
+ CS_RAIDSET_PERSONALITY_RAID5) {
+ max_active_luns = 8;
+ } else if (rs_type ==
+ CS_RAIDSET_PERSONALITY_RAID1){
+ max_active_luns = 16;
+ } else {
+ /* XXX KDM now what?? */
+ }
+ }
+ } else {
+ /* 50% power */
+ /*
+ * With 50% power in a 64 drive configuration, we
+ * can power all LUNs we present.
+ */
+ max_active_luns = num_luns;
+ }
+ break;
+ case 112:
+ if (shelf_50pct_power == CS_FALSE) {
+ /* 25% power */
+ if (aor_present == CS_TRUE) {
+ if (rs_type ==
+ CS_RAIDSET_PERSONALITY_RAID5) {
+ max_active_luns = 7;
+ } else if (rs_type ==
+ CS_RAIDSET_PERSONALITY_RAID1){
+ max_active_luns = 14;
+ } else {
+ /* XXX KDM now what?? */
+ }
+ } else {
+ if (rs_type ==
+ CS_RAIDSET_PERSONALITY_RAID5) {
+ max_active_luns = 8;
+ } else if (rs_type ==
+ CS_RAIDSET_PERSONALITY_RAID1){
+ max_active_luns = 16;
+ } else {
+ /* XXX KDM now what?? */
+ }
+ }
+ } else {
+ /* 50% power */
+ if (aor_present == CS_TRUE) {
+ if (rs_type ==
+ CS_RAIDSET_PERSONALITY_RAID5) {
+ max_active_luns = 14;
+ } else if (rs_type ==
+ CS_RAIDSET_PERSONALITY_RAID1){
+ /*
+ * We're assuming here that disk
+ * caching is enabled, and so we're
+ * able to power up half of each
+ * LUN, and cache all writes.
+ */
+ max_active_luns = num_luns;
+ } else {
+ /* XXX KDM now what?? */
+ }
+ } else {
+ if (rs_type ==
+ CS_RAIDSET_PERSONALITY_RAID5) {
+ max_active_luns = 15;
+ } else if (rs_type ==
+ CS_RAIDSET_PERSONALITY_RAID1){
+ max_active_luns = 30;
+ } else {
+ /* XXX KDM now what?? */
+ }
+ }
+ }
+ break;
+ default:
+ /*
+ * In this case, we have an unknown configuration, so we
+ * just use the default from above.
+ */
+ break;
+ }
+
+ page->max_active_luns = max_active_luns;
+#if 0
+ printk("%s: total_luns = %d, max_active_luns = %d\n", __func__,
+ page->total_luns, page->max_active_luns);
+#endif
+}
+#endif /* NEEDTOPORT */
+
+/*
+ * This routine could be used in the future to load default and/or saved
+ * mode page parameters for a particuar lun.
+ */
+static int
+ctl_init_page_index(struct ctl_lun *lun)
+{
+ int i;
+ struct ctl_page_index *page_index;
+ struct ctl_softc *softc;
+
+ memcpy(&lun->mode_pages.index, page_index_template,
+ sizeof(page_index_template));
+
+ softc = lun->ctl_softc;
+
+ for (i = 0; i < CTL_NUM_MODE_PAGES; i++) {
+
+ page_index = &lun->mode_pages.index[i];
+ /*
+ * If this is a disk-only mode page, there's no point in
+ * setting it up. For some pages, we have to have some
+ * basic information about the disk in order to calculate the
+ * mode page data.
+ */
+ if ((lun->be_lun->lun_type != T_DIRECT)
+ && (page_index->page_flags & CTL_PAGE_FLAG_DISK_ONLY))
+ continue;
+
+ switch (page_index->page_code & SMPH_PC_MASK) {
+ case SMS_FORMAT_DEVICE_PAGE: {
+ struct scsi_format_page *format_page;
+
+ if (page_index->subpage != SMS_SUBPAGE_PAGE_0)
+ panic("subpage is incorrect!");
+
+ /*
+ * Sectors per track are set above. Bytes per
+ * sector need to be set here on a per-LUN basis.
+ */
+ memcpy(&lun->mode_pages.format_page[CTL_PAGE_CURRENT],
+ &format_page_default,
+ sizeof(format_page_default));
+ memcpy(&lun->mode_pages.format_page[
+ CTL_PAGE_CHANGEABLE], &format_page_changeable,
+ sizeof(format_page_changeable));
+ memcpy(&lun->mode_pages.format_page[CTL_PAGE_DEFAULT],
+ &format_page_default,
+ sizeof(format_page_default));
+ memcpy(&lun->mode_pages.format_page[CTL_PAGE_SAVED],
+ &format_page_default,
+ sizeof(format_page_default));
+
+ format_page = &lun->mode_pages.format_page[
+ CTL_PAGE_CURRENT];
+ scsi_ulto2b(lun->be_lun->blocksize,
+ format_page->bytes_per_sector);
+
+ format_page = &lun->mode_pages.format_page[
+ CTL_PAGE_DEFAULT];
+ scsi_ulto2b(lun->be_lun->blocksize,
+ format_page->bytes_per_sector);
+
+ format_page = &lun->mode_pages.format_page[
+ CTL_PAGE_SAVED];
+ scsi_ulto2b(lun->be_lun->blocksize,
+ format_page->bytes_per_sector);
+
+ page_index->page_data =
+ (uint8_t *)lun->mode_pages.format_page;
+ break;
+ }
+ case SMS_RIGID_DISK_PAGE: {
+ struct scsi_rigid_disk_page *rigid_disk_page;
+ uint32_t sectors_per_cylinder;
+ uint64_t cylinders;
+#ifndef __XSCALE__
+ int shift;
+#endif /* !__XSCALE__ */
+
+ if (page_index->subpage != SMS_SUBPAGE_PAGE_0)
+ panic("invalid subpage value %d",
+ page_index->subpage);
+
+ /*
+ * Rotation rate and sectors per track are set
+ * above. We calculate the cylinders here based on
+ * capacity. Due to the number of heads and
+ * sectors per track we're using, smaller arrays
+ * may turn out to have 0 cylinders. Linux and
+ * FreeBSD don't pay attention to these mode pages
+ * to figure out capacity, but Solaris does. It
+ * seems to deal with 0 cylinders just fine, and
+ * works out a fake geometry based on the capacity.
+ */
+ memcpy(&lun->mode_pages.rigid_disk_page[
+ CTL_PAGE_CURRENT], &rigid_disk_page_default,
+ sizeof(rigid_disk_page_default));
+ memcpy(&lun->mode_pages.rigid_disk_page[
+ CTL_PAGE_CHANGEABLE],&rigid_disk_page_changeable,
+ sizeof(rigid_disk_page_changeable));
+ memcpy(&lun->mode_pages.rigid_disk_page[
+ CTL_PAGE_DEFAULT], &rigid_disk_page_default,
+ sizeof(rigid_disk_page_default));
+ memcpy(&lun->mode_pages.rigid_disk_page[
+ CTL_PAGE_SAVED], &rigid_disk_page_default,
+ sizeof(rigid_disk_page_default));
+
+ sectors_per_cylinder = CTL_DEFAULT_SECTORS_PER_TRACK *
+ CTL_DEFAULT_HEADS;
+
+ /*
+ * The divide method here will be more accurate,
+ * probably, but results in floating point being
+ * used in the kernel on i386 (__udivdi3()). On the
+ * XScale, though, __udivdi3() is implemented in
+ * software.
+ *
+ * The shift method for cylinder calculation is
+ * accurate if sectors_per_cylinder is a power of
+ * 2. Otherwise it might be slightly off -- you
+ * might have a bit of a truncation problem.
+ */
+#ifdef __XSCALE__
+ cylinders = (lun->be_lun->maxlba + 1) /
+ sectors_per_cylinder;
+#else
+ for (shift = 31; shift > 0; shift--) {
+ if (sectors_per_cylinder & (1 << shift))
+ break;
+ }
+ cylinders = (lun->be_lun->maxlba + 1) >> shift;
+#endif
+
+ /*
+ * We've basically got 3 bytes, or 24 bits for the
+ * cylinder size in the mode page. If we're over,
+ * just round down to 2^24.
+ */
+ if (cylinders > 0xffffff)
+ cylinders = 0xffffff;
+
+ rigid_disk_page = &lun->mode_pages.rigid_disk_page[
+ CTL_PAGE_CURRENT];
+ scsi_ulto3b(cylinders, rigid_disk_page->cylinders);
+
+ rigid_disk_page = &lun->mode_pages.rigid_disk_page[
+ CTL_PAGE_DEFAULT];
+ scsi_ulto3b(cylinders, rigid_disk_page->cylinders);
+
+ rigid_disk_page = &lun->mode_pages.rigid_disk_page[
+ CTL_PAGE_SAVED];
+ scsi_ulto3b(cylinders, rigid_disk_page->cylinders);
+
+ page_index->page_data =
+ (uint8_t *)lun->mode_pages.rigid_disk_page;
+ break;
+ }
+ case SMS_CACHING_PAGE: {
+
+ if (page_index->subpage != SMS_SUBPAGE_PAGE_0)
+ panic("invalid subpage value %d",
+ page_index->subpage);
+ /*
+ * Defaults should be okay here, no calculations
+ * needed.
+ */
+ memcpy(&lun->mode_pages.caching_page[CTL_PAGE_CURRENT],
+ &caching_page_default,
+ sizeof(caching_page_default));
+ memcpy(&lun->mode_pages.caching_page[
+ CTL_PAGE_CHANGEABLE], &caching_page_changeable,
+ sizeof(caching_page_changeable));
+ memcpy(&lun->mode_pages.caching_page[CTL_PAGE_DEFAULT],
+ &caching_page_default,
+ sizeof(caching_page_default));
+ memcpy(&lun->mode_pages.caching_page[CTL_PAGE_SAVED],
+ &caching_page_default,
+ sizeof(caching_page_default));
+ page_index->page_data =
+ (uint8_t *)lun->mode_pages.caching_page;
+ break;
+ }
+ case SMS_CONTROL_MODE_PAGE: {
+
+ if (page_index->subpage != SMS_SUBPAGE_PAGE_0)
+ panic("invalid subpage value %d",
+ page_index->subpage);
+
+ /*
+ * Defaults should be okay here, no calculations
+ * needed.
+ */
+ memcpy(&lun->mode_pages.control_page[CTL_PAGE_CURRENT],
+ &control_page_default,
+ sizeof(control_page_default));
+ memcpy(&lun->mode_pages.control_page[
+ CTL_PAGE_CHANGEABLE], &control_page_changeable,
+ sizeof(control_page_changeable));
+ memcpy(&lun->mode_pages.control_page[CTL_PAGE_DEFAULT],
+ &control_page_default,
+ sizeof(control_page_default));
+ memcpy(&lun->mode_pages.control_page[CTL_PAGE_SAVED],
+ &control_page_default,
+ sizeof(control_page_default));
+ page_index->page_data =
+ (uint8_t *)lun->mode_pages.control_page;
+ break;
+
+ }
+ case SMS_VENDOR_SPECIFIC_PAGE:{
+ switch (page_index->subpage) {
+ case PWR_SUBPAGE_CODE: {
+ struct copan_power_subpage *current_page,
+ *saved_page;
+
+ memcpy(&lun->mode_pages.power_subpage[
+ CTL_PAGE_CURRENT],
+ &power_page_default,
+ sizeof(power_page_default));
+ memcpy(&lun->mode_pages.power_subpage[
+ CTL_PAGE_CHANGEABLE],
+ &power_page_changeable,
+ sizeof(power_page_changeable));
+ memcpy(&lun->mode_pages.power_subpage[
+ CTL_PAGE_DEFAULT],
+ &power_page_default,
+ sizeof(power_page_default));
+ memcpy(&lun->mode_pages.power_subpage[
+ CTL_PAGE_SAVED],
+ &power_page_default,
+ sizeof(power_page_default));
+ page_index->page_data =
+ (uint8_t *)lun->mode_pages.power_subpage;
+
+ current_page = (struct copan_power_subpage *)
+ (page_index->page_data +
+ (page_index->page_len *
+ CTL_PAGE_CURRENT));
+ saved_page = (struct copan_power_subpage *)
+ (page_index->page_data +
+ (page_index->page_len *
+ CTL_PAGE_SAVED));
+ break;
+ }
+ case APS_SUBPAGE_CODE: {
+ struct copan_aps_subpage *current_page,
+ *saved_page;
+
+ // This gets set multiple times but
+ // it should always be the same. It's
+ // only done during init so who cares.
+ index_to_aps_page = i;
+
+ memcpy(&lun->mode_pages.aps_subpage[
+ CTL_PAGE_CURRENT],
+ &aps_page_default,
+ sizeof(aps_page_default));
+ memcpy(&lun->mode_pages.aps_subpage[
+ CTL_PAGE_CHANGEABLE],
+ &aps_page_changeable,
+ sizeof(aps_page_changeable));
+ memcpy(&lun->mode_pages.aps_subpage[
+ CTL_PAGE_DEFAULT],
+ &aps_page_default,
+ sizeof(aps_page_default));
+ memcpy(&lun->mode_pages.aps_subpage[
+ CTL_PAGE_SAVED],
+ &aps_page_default,
+ sizeof(aps_page_default));
+ page_index->page_data =
+ (uint8_t *)lun->mode_pages.aps_subpage;
+
+ current_page = (struct copan_aps_subpage *)
+ (page_index->page_data +
+ (page_index->page_len *
+ CTL_PAGE_CURRENT));
+ saved_page = (struct copan_aps_subpage *)
+ (page_index->page_data +
+ (page_index->page_len *
+ CTL_PAGE_SAVED));
+ break;
+ }
+ case DBGCNF_SUBPAGE_CODE: {
+ struct copan_debugconf_subpage *current_page,
+ *saved_page;
+
+ memcpy(&lun->mode_pages.debugconf_subpage[
+ CTL_PAGE_CURRENT],
+ &debugconf_page_default,
+ sizeof(debugconf_page_default));
+ memcpy(&lun->mode_pages.debugconf_subpage[
+ CTL_PAGE_CHANGEABLE],
+ &debugconf_page_changeable,
+ sizeof(debugconf_page_changeable));
+ memcpy(&lun->mode_pages.debugconf_subpage[
+ CTL_PAGE_DEFAULT],
+ &debugconf_page_default,
+ sizeof(debugconf_page_default));
+ memcpy(&lun->mode_pages.debugconf_subpage[
+ CTL_PAGE_SAVED],
+ &debugconf_page_default,
+ sizeof(debugconf_page_default));
+ page_index->page_data =
+ (uint8_t *)lun->mode_pages.debugconf_subpage;
+
+ current_page = (struct copan_debugconf_subpage *)
+ (page_index->page_data +
+ (page_index->page_len *
+ CTL_PAGE_CURRENT));
+ saved_page = (struct copan_debugconf_subpage *)
+ (page_index->page_data +
+ (page_index->page_len *
+ CTL_PAGE_SAVED));
+ break;
+ }
+ default:
+ panic("invalid subpage value %d",
+ page_index->subpage);
+ break;
+ }
+ break;
+ }
+ default:
+ panic("invalid page value %d",
+ page_index->page_code & SMPH_PC_MASK);
+ break;
+ }
+ }
+
+ return (CTL_RETVAL_COMPLETE);
+}
+
+/*
+ * LUN allocation.
+ *
+ * Requirements:
+ * - caller allocates and zeros LUN storage, or passes in a NULL LUN if he
+ * wants us to allocate the LUN and he can block.
+ * - ctl_softc is always set
+ * - be_lun is set if the LUN has a backend (needed for disk LUNs)
+ *
+ * Returns 0 for success, non-zero (errno) for failure.
+ */
+static int
+ctl_alloc_lun(struct ctl_softc *ctl_softc, struct ctl_lun *ctl_lun,
+ struct ctl_be_lun *const be_lun, struct ctl_id target_id)
+{
+ struct ctl_lun *nlun, *lun;
+ struct ctl_frontend *fe;
+ int lun_number, i;
+
+ if (be_lun == NULL)
+ return (EINVAL);
+
+ /*
+ * We currently only support Direct Access or Processor LUN types.
+ */
+ switch (be_lun->lun_type) {
+ case T_DIRECT:
+ break;
+ case T_PROCESSOR:
+ break;
+ case T_SEQUENTIAL:
+ case T_CHANGER:
+ default:
+ be_lun->lun_config_status(be_lun->be_lun,
+ CTL_LUN_CONFIG_FAILURE);
+ break;
+ }
+ if (ctl_lun == NULL) {
+ lun = malloc(sizeof(*lun), M_CTL, M_WAITOK);
+ if (lun == NULL) {
+ be_lun->lun_config_status(lun->be_lun->be_lun,
+ CTL_LUN_CONFIG_FAILURE);
+ return (-ENOMEM);
+ }
+ lun->flags = CTL_LUN_MALLOCED;
+ } else
+ lun = ctl_lun;
+
+ memset(lun, 0, sizeof(*lun));
+
+ mtx_lock(&ctl_softc->ctl_lock);
+ /*
+ * See if the caller requested a particular LUN number. If so, see
+ * if it is available. Otherwise, allocate the first available LUN.
+ */
+ if (be_lun->flags & CTL_LUN_FLAG_ID_REQ) {
+ if ((be_lun->req_lun_id > (CTL_MAX_LUNS - 1))
+ || (ctl_is_set(ctl_softc->ctl_lun_mask, be_lun->req_lun_id))) {
+ mtx_unlock(&ctl_softc->ctl_lock);
+ if (be_lun->req_lun_id > (CTL_MAX_LUNS - 1)) {
+ printf("ctl: requested LUN ID %d is higher "
+ "than CTL_MAX_LUNS - 1 (%d)\n",
+ be_lun->req_lun_id, CTL_MAX_LUNS - 1);
+ } else {
+ /*
+ * XXX KDM return an error, or just assign
+ * another LUN ID in this case??
+ */
+ printf("ctl: requested LUN ID %d is already "
+ "in use\n", be_lun->req_lun_id);
+ }
+ if (lun->flags & CTL_LUN_MALLOCED)
+ free(lun, M_CTL);
+ be_lun->lun_config_status(be_lun->be_lun,
+ CTL_LUN_CONFIG_FAILURE);
+ return (ENOSPC);
+ }
+ lun_number = be_lun->req_lun_id;
+ } else {
+ lun_number = ctl_ffz(ctl_softc->ctl_lun_mask, CTL_MAX_LUNS);
+ if (lun_number == -1) {
+ mtx_unlock(&ctl_softc->ctl_lock);
+ printf("ctl: can't allocate LUN on target %ju, out of "
+ "LUNs\n", (uintmax_t)target_id.id);
+ if (lun->flags & CTL_LUN_MALLOCED)
+ free(lun, M_CTL);
+ be_lun->lun_config_status(be_lun->be_lun,
+ CTL_LUN_CONFIG_FAILURE);
+ return (ENOSPC);
+ }
+ }
+ ctl_set_mask(ctl_softc->ctl_lun_mask, lun_number);
+
+ lun->target = target_id;
+ lun->lun = lun_number;
+ lun->be_lun = be_lun;
+ /*
+ * The processor LUN is always enabled. Disk LUNs come on line
+ * disabled, and must be enabled by the backend.
+ */
+ lun->flags = CTL_LUN_DISABLED;
+ lun->backend = be_lun->be;
+ be_lun->ctl_lun = lun;
+ be_lun->lun_id = lun_number;
+ atomic_add_int(&be_lun->be->num_luns, 1);
+ if (be_lun->flags & CTL_LUN_FLAG_POWERED_OFF)
+ lun->flags |= CTL_LUN_STOPPED;
+
+ if (be_lun->flags & CTL_LUN_FLAG_INOPERABLE)
+ lun->flags |= CTL_LUN_INOPERABLE;
+
+ if (be_lun->flags & CTL_LUN_FLAG_PRIMARY)
+ lun->flags |= CTL_LUN_PRIMARY_SC;
+
+ lun->ctl_softc = ctl_softc;
+ TAILQ_INIT(&lun->ooa_queue);
+ TAILQ_INIT(&lun->blocked_queue);
+ STAILQ_INIT(&lun->error_list);
+
+ /*
+ * Initialize the mode page index.
+ */
+ ctl_init_page_index(lun);
+
+ /*
+ * Set the poweron UA for all initiators on this LUN only.
+ */
+ for (i = 0; i < CTL_MAX_INITIATORS; i++)
+ lun->pending_sense[i].ua_pending = CTL_UA_POWERON;
+
+ /*
+ * Now, before we insert this lun on the lun list, set the lun
+ * inventory changed UA for all other luns.
+ */
+ STAILQ_FOREACH(nlun, &ctl_softc->lun_list, links) {
+ for (i = 0; i < CTL_MAX_INITIATORS; i++) {
+ nlun->pending_sense[i].ua_pending |= CTL_UA_LUN_CHANGE;
+ }
+ }
+
+ STAILQ_INSERT_TAIL(&ctl_softc->lun_list, lun, links);
+
+ ctl_softc->ctl_luns[lun_number] = lun;
+
+ ctl_softc->num_luns++;
+
+ /* Setup statistics gathering */
+ lun->stats.device_type = be_lun->lun_type;
+ lun->stats.lun_number = lun_number;
+ if (lun->stats.device_type == T_DIRECT)
+ lun->stats.blocksize = be_lun->blocksize;
+ else
+ lun->stats.flags = CTL_LUN_STATS_NO_BLOCKSIZE;
+ for (i = 0;i < CTL_MAX_PORTS;i++)
+ lun->stats.ports[i].targ_port = i;
+
+ mtx_unlock(&ctl_softc->ctl_lock);
+
+ lun->be_lun->lun_config_status(lun->be_lun->be_lun, CTL_LUN_CONFIG_OK);
+
+ /*
+ * Run through each registered FETD and bring it online if it isn't
+ * already. Enable the target ID if it hasn't been enabled, and
+ * enable this particular LUN.
+ */
+ STAILQ_FOREACH(fe, &ctl_softc->fe_list, links) {
+ int retval;
+
+ /*
+ * XXX KDM this only works for ONE TARGET ID. We'll need
+ * to do things differently if we go to a multiple target
+ * ID scheme.
+ */
+ if ((fe->status & CTL_PORT_STATUS_TARG_ONLINE) == 0) {
+
+ retval = fe->targ_enable(fe->targ_lun_arg, target_id);
+ if (retval != 0) {
+ printf("ctl_alloc_lun: FETD %s port %d "
+ "returned error %d for targ_enable on "
+ "target %ju\n", fe->port_name,
+ fe->targ_port, retval,
+ (uintmax_t)target_id.id);
+ } else
+ fe->status |= CTL_PORT_STATUS_TARG_ONLINE;
+ }
+
+ retval = fe->lun_enable(fe->targ_lun_arg, target_id,lun_number);
+ if (retval != 0) {
+ printf("ctl_alloc_lun: FETD %s port %d returned error "
+ "%d for lun_enable on target %ju lun %d\n",
+ fe->port_name, fe->targ_port, retval,
+ (uintmax_t)target_id.id, lun_number);
+ } else
+ fe->status |= CTL_PORT_STATUS_LUN_ONLINE;
+ }
+ return (0);
+}
+
+/*
+ * Delete a LUN.
+ * Assumptions:
+ * - caller holds ctl_softc->ctl_lock.
+ * - LUN has already been marked invalid and any pending I/O has been taken
+ * care of.
+ */
+static int
+ctl_free_lun(struct ctl_lun *lun)
+{
+ struct ctl_softc *softc;
+#if 0
+ struct ctl_frontend *fe;
+#endif
+ struct ctl_lun *nlun;
+ union ctl_io *io, *next_io;
+ int i;
+
+ softc = lun->ctl_softc;
+
+ STAILQ_REMOVE(&softc->lun_list, lun, ctl_lun, links);
+
+ ctl_clear_mask(softc->ctl_lun_mask, lun->lun);
+
+ softc->ctl_luns[lun->lun] = NULL;
+
+ if (TAILQ_FIRST(&lun->ooa_queue) != NULL) {
+ printf("ctl_free_lun: aieee!! freeing a LUN with "
+ "outstanding I/O!!\n");
+ }
+
+ /*
+ * If we have anything pending on the RtR queue, remove it.
+ */
+ for (io = (union ctl_io *)STAILQ_FIRST(&softc->rtr_queue); io != NULL;
+ io = next_io) {
+ next_io = (union ctl_io *)STAILQ_NEXT(&io->io_hdr, links);
+ if ((io->io_hdr.nexus.targ_target.id == lun->target.id)
+ && (io->io_hdr.nexus.targ_lun == lun->lun))
+ STAILQ_REMOVE(&softc->rtr_queue, &io->io_hdr,
+ ctl_io_hdr, links);
+ }
+
+ /*
+ * Then remove everything from the blocked queue.
+ */
+ for (io = (union ctl_io *)TAILQ_FIRST(&lun->blocked_queue); io != NULL;
+ io = next_io) {
+ next_io = (union ctl_io *)TAILQ_NEXT(&io->io_hdr,blocked_links);
+ TAILQ_REMOVE(&lun->blocked_queue, &io->io_hdr, blocked_links);
+ io->io_hdr.flags &= ~CTL_FLAG_BLOCKED;
+ }
+
+ /*
+ * Now clear out the OOA queue, and free all the I/O.
+ * XXX KDM should we notify the FETD here? We probably need to
+ * quiesce the LUN before deleting it.
+ */
+ for (io = (union ctl_io *)TAILQ_FIRST(&lun->ooa_queue); io != NULL;
+ io = next_io) {
+ next_io = (union ctl_io *)TAILQ_NEXT(&io->io_hdr, ooa_links);
+ TAILQ_REMOVE(&lun->ooa_queue, &io->io_hdr, ooa_links);
+ ctl_free_io_internal(io, /*have_lock*/ 1);
+ }
+
+ softc->num_luns--;
+
+ /*
+ * XXX KDM this scheme only works for a single target/multiple LUN
+ * setup. It needs to be revamped for a multiple target scheme.
+ *
+ * XXX KDM this results in fe->lun_disable() getting called twice,
+ * once when ctl_disable_lun() is called, and a second time here.
+ * We really need to re-think the LUN disable semantics. There
+ * should probably be several steps/levels to LUN removal:
+ * - disable
+ * - invalidate
+ * - free
+ *
+ * Right now we only have a disable method when communicating to
+ * the front end ports, at least for individual LUNs.
+ */
+#if 0
+ STAILQ_FOREACH(fe, &softc->fe_list, links) {
+ int retval;
+
+ retval = fe->lun_disable(fe->targ_lun_arg, lun->target,
+ lun->lun);
+ if (retval != 0) {
+ printf("ctl_free_lun: FETD %s port %d returned error "
+ "%d for lun_disable on target %ju lun %jd\n",
+ fe->port_name, fe->targ_port, retval,
+ (uintmax_t)lun->target.id, (intmax_t)lun->lun);
+ }
+
+ if (STAILQ_FIRST(&softc->lun_list) == NULL) {
+ fe->status &= ~CTL_PORT_STATUS_LUN_ONLINE;
+
+ retval = fe->targ_disable(fe->targ_lun_arg,lun->target);
+ if (retval != 0) {
+ printf("ctl_free_lun: FETD %s port %d "
+ "returned error %d for targ_disable on "
+ "target %ju\n", fe->port_name,
+ fe->targ_port, retval,
+ (uintmax_t)lun->target.id);
+ } else
+ fe->status &= ~CTL_PORT_STATUS_TARG_ONLINE;
+
+ if ((fe->status & CTL_PORT_STATUS_TARG_ONLINE) != 0)
+ continue;
+
+#if 0
+ fe->port_offline(fe->onoff_arg);
+ fe->status &= ~CTL_PORT_STATUS_ONLINE;
+#endif
+ }
+ }
+#endif
+
+ /*
+ * Tell the backend to free resources, if this LUN has a backend.
+ */
+ atomic_subtract_int(&lun->be_lun->be->num_luns, 1);
+ lun->be_lun->lun_shutdown(lun->be_lun->be_lun);
+
+ if (lun->flags & CTL_LUN_MALLOCED)
+ free(lun, M_CTL);
+
+ STAILQ_FOREACH(nlun, &softc->lun_list, links) {
+ for (i = 0; i < CTL_MAX_INITIATORS; i++) {
+ nlun->pending_sense[i].ua_pending |= CTL_UA_LUN_CHANGE;
+ }
+ }
+
+ return (0);
+}
+
+static void
+ctl_create_lun(struct ctl_be_lun *be_lun)
+{
+ struct ctl_softc *ctl_softc;
+
+ ctl_softc = control_softc;
+
+ /*
+ * ctl_alloc_lun() should handle all potential failure cases.
+ */
+ ctl_alloc_lun(ctl_softc, NULL, be_lun, ctl_softc->target);
+}
+
+int
+ctl_add_lun(struct ctl_be_lun *be_lun)
+{
+ struct ctl_softc *ctl_softc;
+
+ ctl_softc = control_softc;
+
+ mtx_lock(&ctl_softc->ctl_lock);
+ STAILQ_INSERT_TAIL(&ctl_softc->pending_lun_queue, be_lun, links);
+ mtx_unlock(&ctl_softc->ctl_lock);
+
+ ctl_wakeup_thread();
+
+ return (0);
+}
+
+int
+ctl_enable_lun(struct ctl_be_lun *be_lun)
+{
+ struct ctl_softc *ctl_softc;
+ struct ctl_frontend *fe, *nfe;
+ struct ctl_lun *lun;
+ int retval;
+
+ ctl_softc = control_softc;
+
+ lun = (struct ctl_lun *)be_lun->ctl_lun;
+
+ mtx_lock(&ctl_softc->ctl_lock);
+ if ((lun->flags & CTL_LUN_DISABLED) == 0) {
+ /*
+ * eh? Why did we get called if the LUN is already
+ * enabled?
+ */
+ mtx_unlock(&ctl_softc->ctl_lock);
+ return (0);
+ }
+ lun->flags &= ~CTL_LUN_DISABLED;
+
+ for (fe = STAILQ_FIRST(&ctl_softc->fe_list); fe != NULL; fe = nfe) {
+ nfe = STAILQ_NEXT(fe, links);
+
+ /*
+ * Drop the lock while we call the FETD's enable routine.
+ * This can lead to a callback into CTL (at least in the
+ * case of the internal initiator frontend.
+ */
+ mtx_unlock(&ctl_softc->ctl_lock);
+ retval = fe->lun_enable(fe->targ_lun_arg, lun->target,lun->lun);
+ mtx_lock(&ctl_softc->ctl_lock);
+ if (retval != 0) {
+ printf("%s: FETD %s port %d returned error "
+ "%d for lun_enable on target %ju lun %jd\n",
+ __func__, fe->port_name, fe->targ_port, retval,
+ (uintmax_t)lun->target.id, (intmax_t)lun->lun);
+ }
+#if 0
+ else {
+ /* NOTE: TODO: why does lun enable affect port status? */
+ fe->status |= CTL_PORT_STATUS_LUN_ONLINE;
+ }
+#endif
+ }
+
+ mtx_unlock(&ctl_softc->ctl_lock);
+
+ return (0);
+}
+
+int
+ctl_disable_lun(struct ctl_be_lun *be_lun)
+{
+ struct ctl_softc *ctl_softc;
+ struct ctl_frontend *fe;
+ struct ctl_lun *lun;
+ int retval;
+
+ ctl_softc = control_softc;
+
+ lun = (struct ctl_lun *)be_lun->ctl_lun;
+
+ mtx_lock(&ctl_softc->ctl_lock);
+
+ if (lun->flags & CTL_LUN_DISABLED) {
+ mtx_unlock(&ctl_softc->ctl_lock);
+ return (0);
+ }
+ lun->flags |= CTL_LUN_DISABLED;
+
+ STAILQ_FOREACH(fe, &ctl_softc->fe_list, links) {
+ mtx_unlock(&ctl_softc->ctl_lock);
+ /*
+ * Drop the lock before we call the frontend's disable
+ * routine, to avoid lock order reversals.
+ *
+ * XXX KDM what happens if the frontend list changes while
+ * we're traversing it? It's unlikely, but should be handled.
+ */
+ retval = fe->lun_disable(fe->targ_lun_arg, lun->target,
+ lun->lun);
+ mtx_lock(&ctl_softc->ctl_lock);
+ if (retval != 0) {
+ printf("ctl_alloc_lun: FETD %s port %d returned error "
+ "%d for lun_disable on target %ju lun %jd\n",
+ fe->port_name, fe->targ_port, retval,
+ (uintmax_t)lun->target.id, (intmax_t)lun->lun);
+ }
+ }
+
+ mtx_unlock(&ctl_softc->ctl_lock);
+
+ return (0);
+}
+
+int
+ctl_start_lun(struct ctl_be_lun *be_lun)
+{
+ struct ctl_softc *ctl_softc;
+ struct ctl_lun *lun;
+
+ ctl_softc = control_softc;
+
+ lun = (struct ctl_lun *)be_lun->ctl_lun;
+
+ mtx_lock(&ctl_softc->ctl_lock);
+ lun->flags &= ~CTL_LUN_STOPPED;
+ mtx_unlock(&ctl_softc->ctl_lock);
+
+ return (0);
+}
+
+int
+ctl_stop_lun(struct ctl_be_lun *be_lun)
+{
+ struct ctl_softc *ctl_softc;
+ struct ctl_lun *lun;
+
+ ctl_softc = control_softc;
+
+ lun = (struct ctl_lun *)be_lun->ctl_lun;
+
+ mtx_lock(&ctl_softc->ctl_lock);
+ lun->flags |= CTL_LUN_STOPPED;
+ mtx_unlock(&ctl_softc->ctl_lock);
+
+ return (0);
+}
+
+int
+ctl_lun_offline(struct ctl_be_lun *be_lun)
+{
+ struct ctl_softc *ctl_softc;
+ struct ctl_lun *lun;
+
+ ctl_softc = control_softc;
+
+ lun = (struct ctl_lun *)be_lun->ctl_lun;
+
+ mtx_lock(&ctl_softc->ctl_lock);
+ lun->flags |= CTL_LUN_OFFLINE;
+ mtx_unlock(&ctl_softc->ctl_lock);
+
+ return (0);
+}
+
+int
+ctl_lun_online(struct ctl_be_lun *be_lun)
+{
+ struct ctl_softc *ctl_softc;
+ struct ctl_lun *lun;
+
+ ctl_softc = control_softc;
+
+ lun = (struct ctl_lun *)be_lun->ctl_lun;
+
+ mtx_lock(&ctl_softc->ctl_lock);
+ lun->flags &= ~CTL_LUN_OFFLINE;
+ mtx_unlock(&ctl_softc->ctl_lock);
+
+ return (0);
+}
+
+int
+ctl_invalidate_lun(struct ctl_be_lun *be_lun)
+{
+ struct ctl_softc *ctl_softc;
+ struct ctl_lun *lun;
+
+ ctl_softc = control_softc;
+
+ lun = (struct ctl_lun *)be_lun->ctl_lun;
+
+ mtx_lock(&ctl_softc->ctl_lock);
+
+ /*
+ * The LUN needs to be disabled before it can be marked invalid.
+ */
+ if ((lun->flags & CTL_LUN_DISABLED) == 0) {
+ mtx_unlock(&ctl_softc->ctl_lock);
+ return (-1);
+ }
+ /*
+ * Mark the LUN invalid.
+ */
+ lun->flags |= CTL_LUN_INVALID;
+
+ /*
+ * If there is nothing in the OOA queue, go ahead and free the LUN.
+ * If we have something in the OOA queue, we'll free it when the
+ * last I/O completes.
+ */
+ if (TAILQ_FIRST(&lun->ooa_queue) == NULL)
+ ctl_free_lun(lun);
+ mtx_unlock(&ctl_softc->ctl_lock);
+
+ return (0);
+}
+
+int
+ctl_lun_inoperable(struct ctl_be_lun *be_lun)
+{
+ struct ctl_softc *ctl_softc;
+ struct ctl_lun *lun;
+
+ ctl_softc = control_softc;
+ lun = (struct ctl_lun *)be_lun->ctl_lun;
+
+ mtx_lock(&ctl_softc->ctl_lock);
+ lun->flags |= CTL_LUN_INOPERABLE;
+ mtx_unlock(&ctl_softc->ctl_lock);
+
+ return (0);
+}
+
+int
+ctl_lun_operable(struct ctl_be_lun *be_lun)
+{
+ struct ctl_softc *ctl_softc;
+ struct ctl_lun *lun;
+
+ ctl_softc = control_softc;
+ lun = (struct ctl_lun *)be_lun->ctl_lun;
+
+ mtx_lock(&ctl_softc->ctl_lock);
+ lun->flags &= ~CTL_LUN_INOPERABLE;
+ mtx_unlock(&ctl_softc->ctl_lock);
+
+ return (0);
+}
+
+int
+ctl_lun_power_lock(struct ctl_be_lun *be_lun, struct ctl_nexus *nexus,
+ int lock)
+{
+ struct ctl_softc *softc;
+ struct ctl_lun *lun;
+ struct copan_aps_subpage *current_sp;
+ struct ctl_page_index *page_index;
+ int i;
+
+ softc = control_softc;
+
+ mtx_lock(&softc->ctl_lock);
+
+ lun = (struct ctl_lun *)be_lun->ctl_lun;
+
+ page_index = NULL;
+ for (i = 0; i < CTL_NUM_MODE_PAGES; i++) {
+ if ((lun->mode_pages.index[i].page_code & SMPH_PC_MASK) !=
+ APS_PAGE_CODE)
+ continue;
+
+ if (lun->mode_pages.index[i].subpage != APS_SUBPAGE_CODE)
+ continue;
+ page_index = &lun->mode_pages.index[i];
+ }
+
+ if (page_index == NULL) {
+ mtx_unlock(&softc->ctl_lock);
+ printf("%s: APS subpage not found for lun %ju!\n", __func__,
+ (uintmax_t)lun->lun);
+ return (1);
+ }
+#if 0
+ if ((softc->aps_locked_lun != 0)
+ && (softc->aps_locked_lun != lun->lun)) {
+ printf("%s: attempt to lock LUN %llu when %llu is already "
+ "locked\n");
+ mtx_unlock(&softc->ctl_lock);
+ return (1);
+ }
+#endif
+
+ current_sp = (struct copan_aps_subpage *)(page_index->page_data +
+ (page_index->page_len * CTL_PAGE_CURRENT));
+
+ if (lock != 0) {
+ current_sp->lock_active = APS_LOCK_ACTIVE;
+ softc->aps_locked_lun = lun->lun;
+ } else {
+ current_sp->lock_active = 0;
+ softc->aps_locked_lun = 0;
+ }
+
+
+ /*
+ * If we're in HA mode, try to send the lock message to the other
+ * side.
+ */
+ if (ctl_is_single == 0) {
+ int isc_retval;
+ union ctl_ha_msg lock_msg;
+
+ lock_msg.hdr.nexus = *nexus;
+ lock_msg.hdr.msg_type = CTL_MSG_APS_LOCK;
+ if (lock != 0)
+ lock_msg.aps.lock_flag = 1;
+ else
+ lock_msg.aps.lock_flag = 0;
+ isc_retval = ctl_ha_msg_send(CTL_HA_CHAN_CTL, &lock_msg,
+ sizeof(lock_msg), 0);
+ if (isc_retval > CTL_HA_STATUS_SUCCESS) {
+ printf("%s: APS (lock=%d) error returned from "
+ "ctl_ha_msg_send: %d\n", __func__, lock, isc_retval);
+ mtx_unlock(&softc->ctl_lock);
+ return (1);
+ }
+ }
+
+ mtx_unlock(&softc->ctl_lock);
+
+ return (0);
+}
+
+/*
+ * Backend "memory move is complete" callback for requests that never
+ * make it down to say RAIDCore's configuration code.
+ */
+int
+ctl_config_move_done(union ctl_io *io)
+{
+ int retval;
+
+ retval = CTL_RETVAL_COMPLETE;
+
+
+ CTL_DEBUG_PRINT(("ctl_config_move_done\n"));
+ /*
+ * XXX KDM this shouldn't happen, but what if it does?
+ */
+ if (io->io_hdr.io_type != CTL_IO_SCSI)
+ panic("I/O type isn't CTL_IO_SCSI!");
+
+ if ((io->io_hdr.port_status == 0)
+ && ((io->io_hdr.flags & CTL_FLAG_ABORT) == 0)
+ && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE))
+ io->io_hdr.status = CTL_SUCCESS;
+ else if ((io->io_hdr.port_status != 0)
+ && ((io->io_hdr.flags & CTL_FLAG_ABORT) == 0)
+ && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE)){
+ /*
+ * For hardware error sense keys, the sense key
+ * specific value is defined to be a retry count,
+ * but we use it to pass back an internal FETD
+ * error code. XXX KDM Hopefully the FETD is only
+ * using 16 bits for an error code, since that's
+ * all the space we have in the sks field.
+ */
+ ctl_set_internal_failure(&io->scsiio,
+ /*sks_valid*/ 1,
+ /*retry_count*/
+ io->io_hdr.port_status);
+ free(io->scsiio.kern_data_ptr, M_CTL);
+ ctl_done(io);
+ goto bailout;
+ }
+
+ if (((io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_IN)
+ || ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS)
+ || ((io->io_hdr.flags & CTL_FLAG_ABORT) != 0)) {
+ /*
+ * XXX KDM just assuming a single pointer here, and not a
+ * S/G list. If we start using S/G lists for config data,
+ * we'll need to know how to clean them up here as well.
+ */
+ free(io->scsiio.kern_data_ptr, M_CTL);
+ /* Hopefully the user has already set the status... */
+ ctl_done(io);
+ } else {
+ /*
+ * XXX KDM now we need to continue data movement. Some
+ * options:
+ * - call ctl_scsiio() again? We don't do this for data
+ * writes, because for those at least we know ahead of
+ * time where the write will go and how long it is. For
+ * config writes, though, that information is largely
+ * contained within the write itself, thus we need to
+ * parse out the data again.
+ *
+ * - Call some other function once the data is in?
+ */
+
+ /*
+ * XXX KDM call ctl_scsiio() again for now, and check flag
+ * bits to see whether we're allocated or not.
+ */
+ retval = ctl_scsiio(&io->scsiio);
+ }
+bailout:
+ return (retval);
+}
+
+/*
+ * This gets called by a backend driver when it is done with a
+ * configuration write.
+ */
+void
+ctl_config_write_done(union ctl_io *io)
+{
+ /*
+ * If the IO_CONT flag is set, we need to call the supplied
+ * function to continue processing the I/O, instead of completing
+ * the I/O just yet.
+ *
+ * If there is an error, though, we don't want to keep processing.
+ * Instead, just send status back to the initiator.
+ */
+ if ((io->io_hdr.flags & CTL_FLAG_IO_CONT)
+ && (((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE)
+ || ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS))) {
+ io->scsiio.io_cont(io);
+ return;
+ }
+ /*
+ * Since a configuration write can be done for commands that actually
+ * have data allocated, like write buffer, and commands that have
+ * no data, like start/stop unit, we need to check here.
+ */
+ if ((io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_OUT)
+ free(io->scsiio.kern_data_ptr, M_CTL);
+ ctl_done(io);
+}
+
+/*
+ * SCSI release command.
+ */
+int
+ctl_scsi_release(struct ctl_scsiio *ctsio)
+{
+ int length, longid, thirdparty_id, resv_id;
+ struct ctl_softc *ctl_softc;
+ struct ctl_lun *lun;
+
+ length = 0;
+ resv_id = 0;
+
+ CTL_DEBUG_PRINT(("ctl_scsi_release\n"));
+
+ lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
+ ctl_softc = control_softc;
+
+ switch (ctsio->cdb[0]) {
+ case RELEASE: {
+ struct scsi_release *cdb;
+
+ cdb = (struct scsi_release *)ctsio->cdb;
+ if ((cdb->byte2 & 0x1f) != 0) {
+ ctl_set_invalid_field(ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 1,
+ /*field*/ 1,
+ /*bit_valid*/ 0,
+ /*bit*/ 0);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+ break;
+ }
+ case RELEASE_10: {
+ struct scsi_release_10 *cdb;
+
+ cdb = (struct scsi_release_10 *)ctsio->cdb;
+
+ if ((cdb->byte2 & SR10_EXTENT) != 0) {
+ ctl_set_invalid_field(ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 1,
+ /*field*/ 1,
+ /*bit_valid*/ 1,
+ /*bit*/ 0);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+
+ }
+
+ if ((cdb->byte2 & SR10_3RDPTY) != 0) {
+ ctl_set_invalid_field(ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 1,
+ /*field*/ 1,
+ /*bit_valid*/ 1,
+ /*bit*/ 4);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ if (cdb->byte2 & SR10_LONGID)
+ longid = 1;
+ else
+ thirdparty_id = cdb->thirdparty_id;
+
+ resv_id = cdb->resv_id;
+ length = scsi_2btoul(cdb->length);
+ break;
+ }
+ }
+
+
+ /*
+ * XXX KDM right now, we only support LUN reservation. We don't
+ * support 3rd party reservations, or extent reservations, which
+ * might actually need the parameter list. If we've gotten this
+ * far, we've got a LUN reservation. Anything else got kicked out
+ * above. So, according to SPC, ignore the length.
+ */
+ length = 0;
+
+ if (((ctsio->io_hdr.flags & CTL_FLAG_ALLOCATED) == 0)
+ && (length > 0)) {
+ ctsio->kern_data_ptr = malloc(length, M_CTL, M_WAITOK);
+ if (ctsio->kern_data_ptr == NULL) {
+ ctsio->io_hdr.status = CTL_SCSI_ERROR;
+ ctsio->io_hdr.status = SCSI_STATUS_BUSY;
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+ ctsio->kern_data_len = length;
+ ctsio->kern_total_len = length;
+ ctsio->kern_data_resid = 0;
+ ctsio->kern_rel_offset = 0;
+ ctsio->kern_sg_entries = 0;
+ ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED;
+ ctsio->be_move_done = ctl_config_move_done;
+ ctl_datamove((union ctl_io *)ctsio);
+
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ if (length > 0)
+ thirdparty_id = scsi_8btou64(ctsio->kern_data_ptr);
+
+ mtx_lock(&ctl_softc->ctl_lock);
+
+ /*
+ * According to SPC, it is not an error for an intiator to attempt
+ * to release a reservation on a LUN that isn't reserved, or that
+ * is reserved by another initiator. The reservation can only be
+ * released, though, by the initiator who made it or by one of
+ * several reset type events.
+ */
+ if (lun->flags & CTL_LUN_RESERVED) {
+ if ((ctsio->io_hdr.nexus.initid.id == lun->rsv_nexus.initid.id)
+ && (ctsio->io_hdr.nexus.targ_port == lun->rsv_nexus.targ_port)
+ && (ctsio->io_hdr.nexus.targ_target.id ==
+ lun->rsv_nexus.targ_target.id)) {
+ lun->flags &= ~CTL_LUN_RESERVED;
+ }
+ }
+
+ ctsio->scsi_status = SCSI_STATUS_OK;
+ ctsio->io_hdr.status = CTL_SUCCESS;
+
+ if (ctsio->io_hdr.flags & CTL_FLAG_ALLOCATED) {
+ free(ctsio->kern_data_ptr, M_CTL);
+ ctsio->io_hdr.flags &= ~CTL_FLAG_ALLOCATED;
+ }
+
+ mtx_unlock(&ctl_softc->ctl_lock);
+
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+}
+
+int
+ctl_scsi_reserve(struct ctl_scsiio *ctsio)
+{
+ int extent, thirdparty, longid;
+ int resv_id, length;
+ uint64_t thirdparty_id;
+ struct ctl_softc *ctl_softc;
+ struct ctl_lun *lun;
+
+ extent = 0;
+ thirdparty = 0;
+ longid = 0;
+ resv_id = 0;
+ length = 0;
+ thirdparty_id = 0;
+
+ CTL_DEBUG_PRINT(("ctl_reserve\n"));
+
+ lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
+ ctl_softc = control_softc;
+
+ switch (ctsio->cdb[0]) {
+ case RESERVE: {
+ struct scsi_reserve *cdb;
+
+ cdb = (struct scsi_reserve *)ctsio->cdb;
+ if ((cdb->byte2 & 0x1f) != 0) {
+ ctl_set_invalid_field(ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 1,
+ /*field*/ 1,
+ /*bit_valid*/ 0,
+ /*bit*/ 0);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+ resv_id = cdb->resv_id;
+ length = scsi_2btoul(cdb->length);
+ break;
+ }
+ case RESERVE_10: {
+ struct scsi_reserve_10 *cdb;
+
+ cdb = (struct scsi_reserve_10 *)ctsio->cdb;
+
+ if ((cdb->byte2 & SR10_EXTENT) != 0) {
+ ctl_set_invalid_field(ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 1,
+ /*field*/ 1,
+ /*bit_valid*/ 1,
+ /*bit*/ 0);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+ if ((cdb->byte2 & SR10_3RDPTY) != 0) {
+ ctl_set_invalid_field(ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 1,
+ /*field*/ 1,
+ /*bit_valid*/ 1,
+ /*bit*/ 4);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+ if (cdb->byte2 & SR10_LONGID)
+ longid = 1;
+ else
+ thirdparty_id = cdb->thirdparty_id;
+
+ resv_id = cdb->resv_id;
+ length = scsi_2btoul(cdb->length);
+ break;
+ }
+ }
+
+ /*
+ * XXX KDM right now, we only support LUN reservation. We don't
+ * support 3rd party reservations, or extent reservations, which
+ * might actually need the parameter list. If we've gotten this
+ * far, we've got a LUN reservation. Anything else got kicked out
+ * above. So, according to SPC, ignore the length.
+ */
+ length = 0;
+
+ if (((ctsio->io_hdr.flags & CTL_FLAG_ALLOCATED) == 0)
+ && (length > 0)) {
+ ctsio->kern_data_ptr = malloc(length, M_CTL, M_WAITOK);
+ if (ctsio->kern_data_ptr == NULL) {
+ ctsio->io_hdr.status = CTL_SCSI_ERROR;
+ ctsio->io_hdr.status = SCSI_STATUS_BUSY;
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+ ctsio->kern_data_len = length;
+ ctsio->kern_total_len = length;
+ ctsio->kern_data_resid = 0;
+ ctsio->kern_rel_offset = 0;
+ ctsio->kern_sg_entries = 0;
+ ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED;
+ ctsio->be_move_done = ctl_config_move_done;
+ ctl_datamove((union ctl_io *)ctsio);
+
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ if (length > 0)
+ thirdparty_id = scsi_8btou64(ctsio->kern_data_ptr);
+
+ mtx_lock(&ctl_softc->ctl_lock);
+ if (lun->flags & CTL_LUN_RESERVED) {
+ if ((ctsio->io_hdr.nexus.initid.id != lun->rsv_nexus.initid.id)
+ || (ctsio->io_hdr.nexus.targ_port != lun->rsv_nexus.targ_port)
+ || (ctsio->io_hdr.nexus.targ_target.id !=
+ lun->rsv_nexus.targ_target.id)) {
+ ctsio->scsi_status = SCSI_STATUS_RESERV_CONFLICT;
+ ctsio->io_hdr.status = CTL_SCSI_ERROR;
+ goto bailout;
+ }
+ }
+
+ lun->flags |= CTL_LUN_RESERVED;
+ lun->rsv_nexus = ctsio->io_hdr.nexus;
+
+ ctsio->scsi_status = SCSI_STATUS_OK;
+ ctsio->io_hdr.status = CTL_SUCCESS;
+
+bailout:
+ if (ctsio->io_hdr.flags & CTL_FLAG_ALLOCATED) {
+ free(ctsio->kern_data_ptr, M_CTL);
+ ctsio->io_hdr.flags &= ~CTL_FLAG_ALLOCATED;
+ }
+
+ mtx_unlock(&ctl_softc->ctl_lock);
+
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+}
+
+int
+ctl_start_stop(struct ctl_scsiio *ctsio)
+{
+ struct scsi_start_stop_unit *cdb;
+ struct ctl_lun *lun;
+ struct ctl_softc *ctl_softc;
+ int retval;
+
+ CTL_DEBUG_PRINT(("ctl_start_stop\n"));
+
+ lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
+ ctl_softc = control_softc;
+ retval = 0;
+
+ cdb = (struct scsi_start_stop_unit *)ctsio->cdb;
+
+ /*
+ * XXX KDM
+ * We don't support the immediate bit on a stop unit. In order to
+ * do that, we would need to code up a way to know that a stop is
+ * pending, and hold off any new commands until it completes, one
+ * way or another. Then we could accept or reject those commands
+ * depending on its status. We would almost need to do the reverse
+ * of what we do below for an immediate start -- return the copy of
+ * the ctl_io to the FETD with status to send to the host (and to
+ * free the copy!) and then free the original I/O once the stop
+ * actually completes. That way, the OOA queue mechanism can work
+ * to block commands that shouldn't proceed. Another alternative
+ * would be to put the copy in the queue in place of the original,
+ * and return the original back to the caller. That could be
+ * slightly safer..
+ */
+ if ((cdb->byte2 & SSS_IMMED)
+ && ((cdb->how & SSS_START) == 0)) {
+ ctl_set_invalid_field(ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 1,
+ /*field*/ 1,
+ /*bit_valid*/ 1,
+ /*bit*/ 0);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ /*
+ * We don't support the power conditions field. We need to check
+ * this prior to checking the load/eject and start/stop bits.
+ */
+ if ((cdb->how & SSS_PC_MASK) != SSS_PC_START_VALID) {
+ ctl_set_invalid_field(ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 1,
+ /*field*/ 4,
+ /*bit_valid*/ 1,
+ /*bit*/ 4);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ /*
+ * Media isn't removable, so we can't load or eject it.
+ */
+ if ((cdb->how & SSS_LOEJ) != 0) {
+ ctl_set_invalid_field(ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 1,
+ /*field*/ 4,
+ /*bit_valid*/ 1,
+ /*bit*/ 1);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ if ((lun->flags & CTL_LUN_PR_RESERVED)
+ && ((cdb->how & SSS_START)==0)) {
+ uint32_t residx;
+
+ residx = ctl_get_resindex(&ctsio->io_hdr.nexus);
+ if (!lun->per_res[residx].registered
+ || (lun->pr_res_idx!=residx && lun->res_type < 4)) {
+
+ ctl_set_reservation_conflict(ctsio);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+ }
+
+ /*
+ * If there is no backend on this device, we can't start or stop
+ * it. In theory we shouldn't get any start/stop commands in the
+ * first place at this level if the LUN doesn't have a backend.
+ * That should get stopped by the command decode code.
+ */
+ if (lun->backend == NULL) {
+ ctl_set_invalid_opcode(ctsio);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ /*
+ * XXX KDM Copan-specific offline behavior.
+ * Figure out a reasonable way to port this?
+ */
+#ifdef NEEDTOPORT
+ mtx_lock(&ctl_softc->ctl_lock);
+
+ if (((cdb->byte2 & SSS_ONOFFLINE) == 0)
+ && (lun->flags & CTL_LUN_OFFLINE)) {
+ /*
+ * If the LUN is offline, and the on/offline bit isn't set,
+ * reject the start or stop. Otherwise, let it through.
+ */
+ mtx_unlock(&ctl_softc->ctl_lock);
+ ctl_set_lun_not_ready(ctsio);
+ ctl_done((union ctl_io *)ctsio);
+ } else {
+ mtx_unlock(&ctl_softc->ctl_lock);
+#endif /* NEEDTOPORT */
+ /*
+ * This could be a start or a stop when we're online,
+ * or a stop/offline or start/online. A start or stop when
+ * we're offline is covered in the case above.
+ */
+ /*
+ * In the non-immediate case, we send the request to
+ * the backend and return status to the user when
+ * it is done.
+ *
+ * In the immediate case, we allocate a new ctl_io
+ * to hold a copy of the request, and send that to
+ * the backend. We then set good status on the
+ * user's request and return it immediately.
+ */
+ if (cdb->byte2 & SSS_IMMED) {
+ union ctl_io *new_io;
+
+ new_io = ctl_alloc_io(ctsio->io_hdr.pool);
+ if (new_io == NULL) {
+ ctl_set_busy(ctsio);
+ ctl_done((union ctl_io *)ctsio);
+ } else {
+ ctl_copy_io((union ctl_io *)ctsio,
+ new_io);
+ retval = lun->backend->config_write(new_io);
+ ctl_set_success(ctsio);
+ ctl_done((union ctl_io *)ctsio);
+ }
+ } else {
+ retval = lun->backend->config_write(
+ (union ctl_io *)ctsio);
+ }
+#ifdef NEEDTOPORT
+ }
+#endif
+ return (retval);
+}
+
+/*
+ * We support the SYNCHRONIZE CACHE command (10 and 16 byte versions), but
+ * we don't really do anything with the LBA and length fields if the user
+ * passes them in. Instead we'll just flush out the cache for the entire
+ * LUN.
+ */
+int
+ctl_sync_cache(struct ctl_scsiio *ctsio)
+{
+ struct ctl_lun *lun;
+ struct ctl_softc *ctl_softc;
+ uint64_t starting_lba;
+ uint32_t block_count;
+ int reladr, immed;
+ int retval;
+
+ CTL_DEBUG_PRINT(("ctl_sync_cache\n"));
+
+ lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
+ ctl_softc = control_softc;
+ retval = 0;
+ reladr = 0;
+ immed = 0;
+
+ switch (ctsio->cdb[0]) {
+ case SYNCHRONIZE_CACHE: {
+ struct scsi_sync_cache *cdb;
+ cdb = (struct scsi_sync_cache *)ctsio->cdb;
+
+ if (cdb->byte2 & SSC_RELADR)
+ reladr = 1;
+
+ if (cdb->byte2 & SSC_IMMED)
+ immed = 1;
+
+ starting_lba = scsi_4btoul(cdb->begin_lba);
+ block_count = scsi_2btoul(cdb->lb_count);
+ break;
+ }
+ case SYNCHRONIZE_CACHE_16: {
+ struct scsi_sync_cache_16 *cdb;
+ cdb = (struct scsi_sync_cache_16 *)ctsio->cdb;
+
+ if (cdb->byte2 & SSC_RELADR)
+ reladr = 1;
+
+ if (cdb->byte2 & SSC_IMMED)
+ immed = 1;
+
+ starting_lba = scsi_8btou64(cdb->begin_lba);
+ block_count = scsi_4btoul(cdb->lb_count);
+ break;
+ }
+ default:
+ ctl_set_invalid_opcode(ctsio);
+ ctl_done((union ctl_io *)ctsio);
+ goto bailout;
+ break; /* NOTREACHED */
+ }
+
+ if (immed) {
+ /*
+ * We don't support the immediate bit. Since it's in the
+ * same place for the 10 and 16 byte SYNCHRONIZE CACHE
+ * commands, we can just return the same error in either
+ * case.
+ */
+ ctl_set_invalid_field(ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 1,
+ /*field*/ 1,
+ /*bit_valid*/ 1,
+ /*bit*/ 1);
+ ctl_done((union ctl_io *)ctsio);
+ goto bailout;
+ }
+
+ if (reladr) {
+ /*
+ * We don't support the reladr bit either. It can only be
+ * used with linked commands, and we don't support linked
+ * commands. Since the bit is in the same place for the
+ * 10 and 16 byte SYNCHRONIZE CACHE * commands, we can
+ * just return the same error in either case.
+ */
+ ctl_set_invalid_field(ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 1,
+ /*field*/ 1,
+ /*bit_valid*/ 1,
+ /*bit*/ 0);
+ ctl_done((union ctl_io *)ctsio);
+ goto bailout;
+ }
+
+ /*
+ * We check the LBA and length, but don't do anything with them.
+ * A SYNCHRONIZE CACHE will cause the entire cache for this lun to
+ * get flushed. This check will just help satisfy anyone who wants
+ * to see an error for an out of range LBA.
+ */
+ if ((starting_lba + block_count) > (lun->be_lun->maxlba + 1)) {
+ ctl_set_lba_out_of_range(ctsio);
+ ctl_done((union ctl_io *)ctsio);
+ goto bailout;
+ }
+
+ /*
+ * If this LUN has no backend, we can't flush the cache anyway.
+ */
+ if (lun->backend == NULL) {
+ ctl_set_invalid_opcode(ctsio);
+ ctl_done((union ctl_io *)ctsio);
+ goto bailout;
+ }
+
+ /*
+ * Check to see whether we're configured to send the SYNCHRONIZE
+ * CACHE command directly to the back end.
+ */
+ mtx_lock(&ctl_softc->ctl_lock);
+ if ((ctl_softc->flags & CTL_FLAG_REAL_SYNC)
+ && (++(lun->sync_count) >= lun->sync_interval)) {
+ lun->sync_count = 0;
+ mtx_unlock(&ctl_softc->ctl_lock);
+ retval = lun->backend->config_write((union ctl_io *)ctsio);
+ } else {
+ mtx_unlock(&ctl_softc->ctl_lock);
+ ctl_set_success(ctsio);
+ ctl_done((union ctl_io *)ctsio);
+ }
+
+bailout:
+
+ return (retval);
+}
+
+int
+ctl_format(struct ctl_scsiio *ctsio)
+{
+ struct scsi_format *cdb;
+ struct ctl_lun *lun;
+ struct ctl_softc *ctl_softc;
+ int length, defect_list_len;
+
+ CTL_DEBUG_PRINT(("ctl_format\n"));
+
+ lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
+ ctl_softc = control_softc;
+
+ cdb = (struct scsi_format *)ctsio->cdb;
+
+ length = 0;
+ if (cdb->byte2 & SF_FMTDATA) {
+ if (cdb->byte2 & SF_LONGLIST)
+ length = sizeof(struct scsi_format_header_long);
+ else
+ length = sizeof(struct scsi_format_header_short);
+ }
+
+ if (((ctsio->io_hdr.flags & CTL_FLAG_ALLOCATED) == 0)
+ && (length > 0)) {
+ ctsio->kern_data_ptr = malloc(length, M_CTL, M_WAITOK);
+ if (ctsio->kern_data_ptr == NULL) {
+ ctsio->io_hdr.status = CTL_SCSI_ERROR;
+ ctsio->io_hdr.status = SCSI_STATUS_BUSY;
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+ ctsio->kern_data_len = length;
+ ctsio->kern_total_len = length;
+ ctsio->kern_data_resid = 0;
+ ctsio->kern_rel_offset = 0;
+ ctsio->kern_sg_entries = 0;
+ ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED;
+ ctsio->be_move_done = ctl_config_move_done;
+ ctl_datamove((union ctl_io *)ctsio);
+
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ defect_list_len = 0;
+
+ if (cdb->byte2 & SF_FMTDATA) {
+ if (cdb->byte2 & SF_LONGLIST) {
+ struct scsi_format_header_long *header;
+
+ header = (struct scsi_format_header_long *)
+ ctsio->kern_data_ptr;
+
+ defect_list_len = scsi_4btoul(header->defect_list_len);
+ if (defect_list_len != 0) {
+ ctl_set_invalid_field(ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 0,
+ /*field*/ 2,
+ /*bit_valid*/ 0,
+ /*bit*/ 0);
+ goto bailout;
+ }
+ } else {
+ struct scsi_format_header_short *header;
+
+ header = (struct scsi_format_header_short *)
+ ctsio->kern_data_ptr;
+
+ defect_list_len = scsi_2btoul(header->defect_list_len);
+ if (defect_list_len != 0) {
+ ctl_set_invalid_field(ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 0,
+ /*field*/ 2,
+ /*bit_valid*/ 0,
+ /*bit*/ 0);
+ goto bailout;
+ }
+ }
+ }
+
+ /*
+ * The format command will clear out the "Medium format corrupted"
+ * status if set by the configuration code. That status is really
+ * just a way to notify the host that we have lost the media, and
+ * get them to issue a command that will basically make them think
+ * they're blowing away the media.
+ */
+ mtx_lock(&ctl_softc->ctl_lock);
+ lun->flags &= ~CTL_LUN_INOPERABLE;
+ mtx_unlock(&ctl_softc->ctl_lock);
+
+ ctsio->scsi_status = SCSI_STATUS_OK;
+ ctsio->io_hdr.status = CTL_SUCCESS;
+bailout:
+
+ if (ctsio->io_hdr.flags & CTL_FLAG_ALLOCATED) {
+ free(ctsio->kern_data_ptr, M_CTL);
+ ctsio->io_hdr.flags &= ~CTL_FLAG_ALLOCATED;
+ }
+
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+}
+
+int
+ctl_write_buffer(struct ctl_scsiio *ctsio)
+{
+ struct scsi_write_buffer *cdb;
+ struct copan_page_header *header;
+ struct ctl_lun *lun;
+ struct ctl_softc *ctl_softc;
+ int buffer_offset, len;
+ int retval;
+
+ header = NULL;
+
+ retval = CTL_RETVAL_COMPLETE;
+
+ CTL_DEBUG_PRINT(("ctl_write_buffer\n"));
+
+ lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
+ ctl_softc = control_softc;
+ cdb = (struct scsi_write_buffer *)ctsio->cdb;
+
+ if ((cdb->byte2 & RWB_MODE) != RWB_MODE_DATA) {
+ ctl_set_invalid_field(ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 1,
+ /*field*/ 1,
+ /*bit_valid*/ 1,
+ /*bit*/ 4);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+ if (cdb->buffer_id != 0) {
+ ctl_set_invalid_field(ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 1,
+ /*field*/ 2,
+ /*bit_valid*/ 0,
+ /*bit*/ 0);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ len = scsi_3btoul(cdb->length);
+ buffer_offset = scsi_3btoul(cdb->offset);
+
+ if (len > sizeof(lun->write_buffer)) {
+ ctl_set_invalid_field(ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 1,
+ /*field*/ 6,
+ /*bit_valid*/ 0,
+ /*bit*/ 0);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ if (buffer_offset != 0) {
+ ctl_set_invalid_field(ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 1,
+ /*field*/ 3,
+ /*bit_valid*/ 0,
+ /*bit*/ 0);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ /*
+ * If we've got a kernel request that hasn't been malloced yet,
+ * malloc it and tell the caller the data buffer is here.
+ */
+ if ((ctsio->io_hdr.flags & CTL_FLAG_ALLOCATED) == 0) {
+ ctsio->kern_data_ptr = lun->write_buffer;
+ ctsio->kern_data_len = len;
+ ctsio->kern_total_len = len;
+ ctsio->kern_data_resid = 0;
+ ctsio->kern_rel_offset = 0;
+ ctsio->kern_sg_entries = 0;
+ ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED;
+ ctsio->be_move_done = ctl_config_move_done;
+ ctl_datamove((union ctl_io *)ctsio);
+
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ ctl_done((union ctl_io *)ctsio);
+
+ return (CTL_RETVAL_COMPLETE);
+}
+
+/*
+ * Note that this function currently doesn't actually do anything inside
+ * CTL to enforce things if the DQue bit is turned on.
+ *
+ * Also note that this function can't be used in the default case, because
+ * the DQue bit isn't set in the changeable mask for the control mode page
+ * anyway. This is just here as an example for how to implement a page
+ * handler, and a placeholder in case we want to allow the user to turn
+ * tagged queueing on and off.
+ *
+ * The D_SENSE bit handling is functional, however, and will turn
+ * descriptor sense on and off for a given LUN.
+ */
+int
+ctl_control_page_handler(struct ctl_scsiio *ctsio,
+ struct ctl_page_index *page_index, uint8_t *page_ptr)
+{
+ struct scsi_control_page *current_cp, *saved_cp, *user_cp;
+ struct ctl_lun *lun;
+ struct ctl_softc *softc;
+ int set_ua;
+ uint32_t initidx;
+
+ lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
+ initidx = ctl_get_initindex(&ctsio->io_hdr.nexus);
+ set_ua = 0;
+
+ user_cp = (struct scsi_control_page *)page_ptr;
+ current_cp = (struct scsi_control_page *)
+ (page_index->page_data + (page_index->page_len *
+ CTL_PAGE_CURRENT));
+ saved_cp = (struct scsi_control_page *)
+ (page_index->page_data + (page_index->page_len *
+ CTL_PAGE_SAVED));
+
+ softc = control_softc;
+
+ mtx_lock(&softc->ctl_lock);
+ if (((current_cp->rlec & SCP_DSENSE) == 0)
+ && ((user_cp->rlec & SCP_DSENSE) != 0)) {
+ /*
+ * Descriptor sense is currently turned off and the user
+ * wants to turn it on.
+ */
+ current_cp->rlec |= SCP_DSENSE;
+ saved_cp->rlec |= SCP_DSENSE;
+ lun->flags |= CTL_LUN_SENSE_DESC;
+ set_ua = 1;
+ } else if (((current_cp->rlec & SCP_DSENSE) != 0)
+ && ((user_cp->rlec & SCP_DSENSE) == 0)) {
+ /*
+ * Descriptor sense is currently turned on, and the user
+ * wants to turn it off.
+ */
+ current_cp->rlec &= ~SCP_DSENSE;
+ saved_cp->rlec &= ~SCP_DSENSE;
+ lun->flags &= ~CTL_LUN_SENSE_DESC;
+ set_ua = 1;
+ }
+ if (current_cp->queue_flags & SCP_QUEUE_DQUE) {
+ if (user_cp->queue_flags & SCP_QUEUE_DQUE) {
+#ifdef NEEDTOPORT
+ csevent_log(CSC_CTL | CSC_SHELF_SW |
+ CTL_UNTAG_TO_UNTAG,
+ csevent_LogType_Trace,
+ csevent_Severity_Information,
+ csevent_AlertLevel_Green,
+ csevent_FRU_Firmware,
+ csevent_FRU_Unknown,
+ "Received untagged to untagged transition");
+#endif /* NEEDTOPORT */
+ } else {
+#ifdef NEEDTOPORT
+ csevent_log(CSC_CTL | CSC_SHELF_SW |
+ CTL_UNTAG_TO_TAG,
+ csevent_LogType_ConfigChange,
+ csevent_Severity_Information,
+ csevent_AlertLevel_Green,
+ csevent_FRU_Firmware,
+ csevent_FRU_Unknown,
+ "Received untagged to tagged "
+ "queueing transition");
+#endif /* NEEDTOPORT */
+
+ current_cp->queue_flags &= ~SCP_QUEUE_DQUE;
+ saved_cp->queue_flags &= ~SCP_QUEUE_DQUE;
+ set_ua = 1;
+ }
+ } else {
+ if (user_cp->queue_flags & SCP_QUEUE_DQUE) {
+#ifdef NEEDTOPORT
+ csevent_log(CSC_CTL | CSC_SHELF_SW |
+ CTL_TAG_TO_UNTAG,
+ csevent_LogType_ConfigChange,
+ csevent_Severity_Warning,
+ csevent_AlertLevel_Yellow,
+ csevent_FRU_Firmware,
+ csevent_FRU_Unknown,
+ "Received tagged queueing to untagged "
+ "transition");
+#endif /* NEEDTOPORT */
+
+ current_cp->queue_flags |= SCP_QUEUE_DQUE;
+ saved_cp->queue_flags |= SCP_QUEUE_DQUE;
+ set_ua = 1;
+ } else {
+#ifdef NEEDTOPORT
+ csevent_log(CSC_CTL | CSC_SHELF_SW |
+ CTL_TAG_TO_TAG,
+ csevent_LogType_Trace,
+ csevent_Severity_Information,
+ csevent_AlertLevel_Green,
+ csevent_FRU_Firmware,
+ csevent_FRU_Unknown,
+ "Received tagged queueing to tagged "
+ "queueing transition");
+#endif /* NEEDTOPORT */
+ }
+ }
+ if (set_ua != 0) {
+ int i;
+ /*
+ * Let other initiators know that the mode
+ * parameters for this LUN have changed.
+ */
+ for (i = 0; i < CTL_MAX_INITIATORS; i++) {
+ if (i == initidx)
+ continue;
+
+ lun->pending_sense[i].ua_pending |=
+ CTL_UA_MODE_CHANGE;
+ }
+ }
+ mtx_unlock(&softc->ctl_lock);
+
+ return (0);
+}
+
+int
+ctl_power_sp_handler(struct ctl_scsiio *ctsio,
+ struct ctl_page_index *page_index, uint8_t *page_ptr)
+{
+ return (0);
+}
+
+int
+ctl_power_sp_sense_handler(struct ctl_scsiio *ctsio,
+ struct ctl_page_index *page_index, int pc)
+{
+ struct copan_power_subpage *page;
+
+ page = (struct copan_power_subpage *)page_index->page_data +
+ (page_index->page_len * pc);
+
+ switch (pc) {
+ case SMS_PAGE_CTRL_CHANGEABLE >> 6:
+ /*
+ * We don't update the changable bits for this page.
+ */
+ break;
+ case SMS_PAGE_CTRL_CURRENT >> 6:
+ case SMS_PAGE_CTRL_DEFAULT >> 6:
+ case SMS_PAGE_CTRL_SAVED >> 6:
+#ifdef NEEDTOPORT
+ ctl_update_power_subpage(page);
+#endif
+ break;
+ default:
+#ifdef NEEDTOPORT
+ EPRINT(0, "Invalid PC %d!!", pc);
+#endif
+ break;
+ }
+ return (0);
+}
+
+
+int
+ctl_aps_sp_handler(struct ctl_scsiio *ctsio,
+ struct ctl_page_index *page_index, uint8_t *page_ptr)
+{
+ struct copan_aps_subpage *user_sp;
+ struct copan_aps_subpage *current_sp;
+ union ctl_modepage_info *modepage_info;
+ struct ctl_softc *softc;
+ struct ctl_lun *lun;
+ int retval;
+
+ retval = CTL_RETVAL_COMPLETE;
+ current_sp = (struct copan_aps_subpage *)(page_index->page_data +
+ (page_index->page_len * CTL_PAGE_CURRENT));
+ softc = control_softc;
+ lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
+
+ user_sp = (struct copan_aps_subpage *)page_ptr;
+
+ modepage_info = (union ctl_modepage_info *)
+ ctsio->io_hdr.ctl_private[CTL_PRIV_MODEPAGE].bytes;
+
+ modepage_info->header.page_code = page_index->page_code & SMPH_PC_MASK;
+ modepage_info->header.subpage = page_index->subpage;
+ modepage_info->aps.lock_active = user_sp->lock_active;
+
+ mtx_lock(&softc->ctl_lock);
+
+ /*
+ * If there is a request to lock the LUN and another LUN is locked
+ * this is an error. If the requested LUN is already locked ignore
+ * the request. If no LUN is locked attempt to lock it.
+ * if there is a request to unlock the LUN and the LUN is currently
+ * locked attempt to unlock it. Otherwise ignore the request. i.e.
+ * if another LUN is locked or no LUN is locked.
+ */
+ if (user_sp->lock_active & APS_LOCK_ACTIVE) {
+ if (softc->aps_locked_lun == lun->lun) {
+ /*
+ * This LUN is already locked, so we're done.
+ */
+ retval = CTL_RETVAL_COMPLETE;
+ } else if (softc->aps_locked_lun == 0) {
+ /*
+ * No one has the lock, pass the request to the
+ * backend.
+ */
+ retval = lun->backend->config_write(
+ (union ctl_io *)ctsio);
+ } else {
+ /*
+ * Someone else has the lock, throw out the request.
+ */
+ ctl_set_already_locked(ctsio);
+ free(ctsio->kern_data_ptr, M_CTL);
+ ctl_done((union ctl_io *)ctsio);
+
+ /*
+ * Set the return value so that ctl_do_mode_select()
+ * won't try to complete the command. We already
+ * completed it here.
+ */
+ retval = CTL_RETVAL_ERROR;
+ }
+ } else if (softc->aps_locked_lun == lun->lun) {
+ /*
+ * This LUN is locked, so pass the unlock request to the
+ * backend.
+ */
+ retval = lun->backend->config_write((union ctl_io *)ctsio);
+ }
+ mtx_unlock(&softc->ctl_lock);
+
+ return (retval);
+}
+
+int
+ctl_debugconf_sp_select_handler(struct ctl_scsiio *ctsio,
+ struct ctl_page_index *page_index,
+ uint8_t *page_ptr)
+{
+ uint8_t *c;
+ int i;
+
+ c = ((struct copan_debugconf_subpage *)page_ptr)->ctl_time_io_secs;
+ ctl_time_io_secs =
+ (c[0] << 8) |
+ (c[1] << 0) |
+ 0;
+ CTL_DEBUG_PRINT(("set ctl_time_io_secs to %d\n", ctl_time_io_secs));
+ printf("set ctl_time_io_secs to %d\n", ctl_time_io_secs);
+ printf("page data:");
+ for (i=0; i<8; i++)
+ printf(" %.2x",page_ptr[i]);
+ printf("\n");
+ return (0);
+}
+
+int
+ctl_debugconf_sp_sense_handler(struct ctl_scsiio *ctsio,
+ struct ctl_page_index *page_index,
+ int pc)
+{
+ struct copan_debugconf_subpage *page;
+
+ page = (struct copan_debugconf_subpage *)page_index->page_data +
+ (page_index->page_len * pc);
+
+ switch (pc) {
+ case SMS_PAGE_CTRL_CHANGEABLE >> 6:
+ case SMS_PAGE_CTRL_DEFAULT >> 6:
+ case SMS_PAGE_CTRL_SAVED >> 6:
+ /*
+ * We don't update the changable or default bits for this page.
+ */
+ break;
+ case SMS_PAGE_CTRL_CURRENT >> 6:
+ page->ctl_time_io_secs[0] = ctl_time_io_secs >> 8;
+ page->ctl_time_io_secs[1] = ctl_time_io_secs >> 0;
+ break;
+ default:
+#ifdef NEEDTOPORT
+ EPRINT(0, "Invalid PC %d!!", pc);
+#endif /* NEEDTOPORT */
+ break;
+ }
+ return (0);
+}
+
+
+static int
+ctl_do_mode_select(union ctl_io *io)
+{
+ struct scsi_mode_page_header *page_header;
+ struct ctl_page_index *page_index;
+ struct ctl_scsiio *ctsio;
+ int control_dev, page_len;
+ int page_len_offset, page_len_size;
+ union ctl_modepage_info *modepage_info;
+ struct ctl_lun *lun;
+ int *len_left, *len_used;
+ int retval, i;
+
+ ctsio = &io->scsiio;
+ page_index = NULL;
+ page_len = 0;
+ retval = CTL_RETVAL_COMPLETE;
+
+ lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
+
+ if (lun->be_lun->lun_type != T_DIRECT)
+ control_dev = 1;
+ else
+ control_dev = 0;
+
+ modepage_info = (union ctl_modepage_info *)
+ ctsio->io_hdr.ctl_private[CTL_PRIV_MODEPAGE].bytes;
+ len_left = &modepage_info->header.len_left;
+ len_used = &modepage_info->header.len_used;
+
+do_next_page:
+
+ page_header = (struct scsi_mode_page_header *)
+ (ctsio->kern_data_ptr + *len_used);
+
+ if (*len_left == 0) {
+ free(ctsio->kern_data_ptr, M_CTL);
+ ctl_set_success(ctsio);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ } else if (*len_left < sizeof(struct scsi_mode_page_header)) {
+
+ free(ctsio->kern_data_ptr, M_CTL);
+ ctl_set_param_len_error(ctsio);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+
+ } else if ((page_header->page_code & SMPH_SPF)
+ && (*len_left < sizeof(struct scsi_mode_page_header_sp))) {
+
+ free(ctsio->kern_data_ptr, M_CTL);
+ ctl_set_param_len_error(ctsio);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+
+ /*
+ * XXX KDM should we do something with the block descriptor?
+ */
+ for (i = 0; i < CTL_NUM_MODE_PAGES; i++) {
+
+ if ((control_dev != 0)
+ && (lun->mode_pages.index[i].page_flags &
+ CTL_PAGE_FLAG_DISK_ONLY))
+ continue;
+
+ if ((lun->mode_pages.index[i].page_code & SMPH_PC_MASK) !=
+ (page_header->page_code & SMPH_PC_MASK))
+ continue;
+
+ /*
+ * If neither page has a subpage code, then we've got a
+ * match.
+ */
+ if (((lun->mode_pages.index[i].page_code & SMPH_SPF) == 0)
+ && ((page_header->page_code & SMPH_SPF) == 0)) {
+ page_index = &lun->mode_pages.index[i];
+ page_len = page_header->page_length;
+ break;
+ }
+
+ /*
+ * If both pages have subpages, then the subpage numbers
+ * have to match.
+ */
+ if ((lun->mode_pages.index[i].page_code & SMPH_SPF)
+ && (page_header->page_code & SMPH_SPF)) {
+ struct scsi_mode_page_header_sp *sph;
+
+ sph = (struct scsi_mode_page_header_sp *)page_header;
+
+ if (lun->mode_pages.index[i].subpage ==
+ sph->subpage) {
+ page_index = &lun->mode_pages.index[i];
+ page_len = scsi_2btoul(sph->page_length);
+ break;
+ }
+ }
+ }
+
+ /*
+ * If we couldn't find the page, or if we don't have a mode select
+ * handler for it, send back an error to the user.
+ */
+ if ((page_index == NULL)
+ || (page_index->select_handler == NULL)) {
+ ctl_set_invalid_field(ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 0,
+ /*field*/ *len_used,
+ /*bit_valid*/ 0,
+ /*bit*/ 0);
+ free(ctsio->kern_data_ptr, M_CTL);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ if (page_index->page_code & SMPH_SPF) {
+ page_len_offset = 2;
+ page_len_size = 2;
+ } else {
+ page_len_size = 1;
+ page_len_offset = 1;
+ }
+
+ /*
+ * If the length the initiator gives us isn't the one we specify in
+ * the mode page header, or if they didn't specify enough data in
+ * the CDB to avoid truncating this page, kick out the request.
+ */
+ if ((page_len != (page_index->page_len - page_len_offset -
+ page_len_size))
+ || (*len_left < page_index->page_len)) {
+
+
+ ctl_set_invalid_field(ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 0,
+ /*field*/ *len_used + page_len_offset,
+ /*bit_valid*/ 0,
+ /*bit*/ 0);
+ free(ctsio->kern_data_ptr, M_CTL);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ /*
+ * Run through the mode page, checking to make sure that the bits
+ * the user changed are actually legal for him to change.
+ */
+ for (i = 0; i < page_index->page_len; i++) {
+ uint8_t *user_byte, *change_mask, *current_byte;
+ int bad_bit;
+ int j;
+
+ user_byte = (uint8_t *)page_header + i;
+ change_mask = page_index->page_data +
+ (page_index->page_len * CTL_PAGE_CHANGEABLE) + i;
+ current_byte = page_index->page_data +
+ (page_index->page_len * CTL_PAGE_CURRENT) + i;
+
+ /*
+ * Check to see whether the user set any bits in this byte
+ * that he is not allowed to set.
+ */
+ if ((*user_byte & ~(*change_mask)) ==
+ (*current_byte & ~(*change_mask)))
+ continue;
+
+ /*
+ * Go through bit by bit to determine which one is illegal.
+ */
+ bad_bit = 0;
+ for (j = 7; j >= 0; j--) {
+ if ((((1 << i) & ~(*change_mask)) & *user_byte) !=
+ (((1 << i) & ~(*change_mask)) & *current_byte)) {
+ bad_bit = i;
+ break;
+ }
+ }
+ ctl_set_invalid_field(ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 0,
+ /*field*/ *len_used + i,
+ /*bit_valid*/ 1,
+ /*bit*/ bad_bit);
+ free(ctsio->kern_data_ptr, M_CTL);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ /*
+ * Decrement these before we call the page handler, since we may
+ * end up getting called back one way or another before the handler
+ * returns to this context.
+ */
+ *len_left -= page_index->page_len;
+ *len_used += page_index->page_len;
+
+ retval = page_index->select_handler(ctsio, page_index,
+ (uint8_t *)page_header);
+
+ /*
+ * If the page handler returns CTL_RETVAL_QUEUED, then we need to
+ * wait until this queued command completes to finish processing
+ * the mode page. If it returns anything other than
+ * CTL_RETVAL_COMPLETE (e.g. CTL_RETVAL_ERROR), then it should have
+ * already set the sense information, freed the data pointer, and
+ * completed the io for us.
+ */
+ if (retval != CTL_RETVAL_COMPLETE)
+ goto bailout_no_done;
+
+ /*
+ * If the initiator sent us more than one page, parse the next one.
+ */
+ if (*len_left > 0)
+ goto do_next_page;
+
+ ctl_set_success(ctsio);
+ free(ctsio->kern_data_ptr, M_CTL);
+ ctl_done((union ctl_io *)ctsio);
+
+bailout_no_done:
+
+ return (CTL_RETVAL_COMPLETE);
+
+}
+
+int
+ctl_mode_select(struct ctl_scsiio *ctsio)
+{
+ int param_len, pf, sp;
+ int header_size, bd_len;
+ int len_left, len_used;
+ struct ctl_page_index *page_index;
+ struct ctl_lun *lun;
+ int control_dev, page_len;
+ union ctl_modepage_info *modepage_info;
+ int retval;
+
+ pf = 0;
+ sp = 0;
+ page_len = 0;
+ len_used = 0;
+ len_left = 0;
+ retval = 0;
+ bd_len = 0;
+ page_index = NULL;
+
+ lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
+
+ if (lun->be_lun->lun_type != T_DIRECT)
+ control_dev = 1;
+ else
+ control_dev = 0;
+
+ switch (ctsio->cdb[0]) {
+ case MODE_SELECT_6: {
+ struct scsi_mode_select_6 *cdb;
+
+ cdb = (struct scsi_mode_select_6 *)ctsio->cdb;
+
+ pf = (cdb->byte2 & SMS_PF) ? 1 : 0;
+ sp = (cdb->byte2 & SMS_SP) ? 1 : 0;
+
+ param_len = cdb->length;
+ header_size = sizeof(struct scsi_mode_header_6);
+ break;
+ }
+ case MODE_SELECT_10: {
+ struct scsi_mode_select_10 *cdb;
+
+ cdb = (struct scsi_mode_select_10 *)ctsio->cdb;
+
+ pf = (cdb->byte2 & SMS_PF) ? 1 : 0;
+ sp = (cdb->byte2 & SMS_SP) ? 1 : 0;
+
+ param_len = scsi_2btoul(cdb->length);
+ header_size = sizeof(struct scsi_mode_header_10);
+ break;
+ }
+ default:
+ ctl_set_invalid_opcode(ctsio);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ break; /* NOTREACHED */
+ }
+
+ /*
+ * From SPC-3:
+ * "A parameter list length of zero indicates that the Data-Out Buffer
+ * shall be empty. This condition shall not be considered as an error."
+ */
+ if (param_len == 0) {
+ ctl_set_success(ctsio);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ /*
+ * Since we'll hit this the first time through, prior to
+ * allocation, we don't need to free a data buffer here.
+ */
+ if (param_len < header_size) {
+ ctl_set_param_len_error(ctsio);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ /*
+ * Allocate the data buffer and grab the user's data. In theory,
+ * we shouldn't have to sanity check the parameter list length here
+ * because the maximum size is 64K. We should be able to malloc
+ * that much without too many problems.
+ */
+ if ((ctsio->io_hdr.flags & CTL_FLAG_ALLOCATED) == 0) {
+ ctsio->kern_data_ptr = malloc(param_len, M_CTL, M_WAITOK);
+ if (ctsio->kern_data_ptr == NULL) {
+ ctl_set_busy(ctsio);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+ ctsio->kern_data_len = param_len;
+ ctsio->kern_total_len = param_len;
+ ctsio->kern_data_resid = 0;
+ ctsio->kern_rel_offset = 0;
+ ctsio->kern_sg_entries = 0;
+ ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED;
+ ctsio->be_move_done = ctl_config_move_done;
+ ctl_datamove((union ctl_io *)ctsio);
+
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ switch (ctsio->cdb[0]) {
+ case MODE_SELECT_6: {
+ struct scsi_mode_header_6 *mh6;
+
+ mh6 = (struct scsi_mode_header_6 *)ctsio->kern_data_ptr;
+ bd_len = mh6->blk_desc_len;
+ break;
+ }
+ case MODE_SELECT_10: {
+ struct scsi_mode_header_10 *mh10;
+
+ mh10 = (struct scsi_mode_header_10 *)ctsio->kern_data_ptr;
+ bd_len = scsi_2btoul(mh10->blk_desc_len);
+ break;
+ }
+ default:
+ panic("Invalid CDB type %#x", ctsio->cdb[0]);
+ break;
+ }
+
+ if (param_len < (header_size + bd_len)) {
+ free(ctsio->kern_data_ptr, M_CTL);
+ ctl_set_param_len_error(ctsio);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ /*
+ * Set the IO_CONT flag, so that if this I/O gets passed to
+ * ctl_config_write_done(), it'll get passed back to
+ * ctl_do_mode_select() for further processing, or completion if
+ * we're all done.
+ */
+ ctsio->io_hdr.flags |= CTL_FLAG_IO_CONT;
+ ctsio->io_cont = ctl_do_mode_select;
+
+ modepage_info = (union ctl_modepage_info *)
+ ctsio->io_hdr.ctl_private[CTL_PRIV_MODEPAGE].bytes;
+
+ memset(modepage_info, 0, sizeof(*modepage_info));
+
+ len_left = param_len - header_size - bd_len;
+ len_used = header_size + bd_len;
+
+ modepage_info->header.len_left = len_left;
+ modepage_info->header.len_used = len_used;
+
+ return (ctl_do_mode_select((union ctl_io *)ctsio));
+}
+
+int
+ctl_mode_sense(struct ctl_scsiio *ctsio)
+{
+ struct ctl_lun *lun;
+ int pc, page_code, dbd, llba, subpage;
+ int alloc_len, page_len, header_len, total_len;
+ struct scsi_mode_block_descr *block_desc;
+ struct ctl_page_index *page_index;
+ int control_dev;
+
+ dbd = 0;
+ llba = 0;
+ block_desc = NULL;
+ page_index = NULL;
+
+ CTL_DEBUG_PRINT(("ctl_mode_sense\n"));
+
+ lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
+
+ if (lun->be_lun->lun_type != T_DIRECT)
+ control_dev = 1;
+ else
+ control_dev = 0;
+
+ switch (ctsio->cdb[0]) {
+ case MODE_SENSE_6: {
+ struct scsi_mode_sense_6 *cdb;
+
+ cdb = (struct scsi_mode_sense_6 *)ctsio->cdb;
+
+ header_len = sizeof(struct scsi_mode_hdr_6);
+ if (cdb->byte2 & SMS_DBD)
+ dbd = 1;
+ else
+ header_len += sizeof(struct scsi_mode_block_descr);
+
+ pc = (cdb->page & SMS_PAGE_CTRL_MASK) >> 6;
+ page_code = cdb->page & SMS_PAGE_CODE;
+ subpage = cdb->subpage;
+ alloc_len = cdb->length;
+ break;
+ }
+ case MODE_SENSE_10: {
+ struct scsi_mode_sense_10 *cdb;
+
+ cdb = (struct scsi_mode_sense_10 *)ctsio->cdb;
+
+ header_len = sizeof(struct scsi_mode_hdr_10);
+
+ if (cdb->byte2 & SMS_DBD)
+ dbd = 1;
+ else
+ header_len += sizeof(struct scsi_mode_block_descr);
+ if (cdb->byte2 & SMS10_LLBAA)
+ llba = 1;
+ pc = (cdb->page & SMS_PAGE_CTRL_MASK) >> 6;
+ page_code = cdb->page & SMS_PAGE_CODE;
+ subpage = cdb->subpage;
+ alloc_len = scsi_2btoul(cdb->length);
+ break;
+ }
+ default:
+ ctl_set_invalid_opcode(ctsio);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ break; /* NOTREACHED */
+ }
+
+ /*
+ * We have to make a first pass through to calculate the size of
+ * the pages that match the user's query. Then we allocate enough
+ * memory to hold it, and actually copy the data into the buffer.
+ */
+ switch (page_code) {
+ case SMS_ALL_PAGES_PAGE: {
+ int i;
+
+ page_len = 0;
+
+ /*
+ * At the moment, values other than 0 and 0xff here are
+ * reserved according to SPC-3.
+ */
+ if ((subpage != SMS_SUBPAGE_PAGE_0)
+ && (subpage != SMS_SUBPAGE_ALL)) {
+ ctl_set_invalid_field(ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 1,
+ /*field*/ 3,
+ /*bit_valid*/ 0,
+ /*bit*/ 0);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ for (i = 0; i < CTL_NUM_MODE_PAGES; i++) {
+ if ((control_dev != 0)
+ && (lun->mode_pages.index[i].page_flags &
+ CTL_PAGE_FLAG_DISK_ONLY))
+ continue;
+
+ /*
+ * We don't use this subpage if the user didn't
+ * request all subpages.
+ */
+ if ((lun->mode_pages.index[i].subpage != 0)
+ && (subpage == SMS_SUBPAGE_PAGE_0))
+ continue;
+
+#if 0
+ printf("found page %#x len %d\n",
+ lun->mode_pages.index[i].page_code &
+ SMPH_PC_MASK,
+ lun->mode_pages.index[i].page_len);
+#endif
+ page_len += lun->mode_pages.index[i].page_len;
+ }
+ break;
+ }
+ default: {
+ int i;
+
+ page_len = 0;
+
+ for (i = 0; i < CTL_NUM_MODE_PAGES; i++) {
+ /* Look for the right page code */
+ if ((lun->mode_pages.index[i].page_code &
+ SMPH_PC_MASK) != page_code)
+ continue;
+
+ /* Look for the right subpage or the subpage wildcard*/
+ if ((lun->mode_pages.index[i].subpage != subpage)
+ && (subpage != SMS_SUBPAGE_ALL))
+ continue;
+
+ /* Make sure the page is supported for this dev type */
+ if ((control_dev != 0)
+ && (lun->mode_pages.index[i].page_flags &
+ CTL_PAGE_FLAG_DISK_ONLY))
+ continue;
+
+#if 0
+ printf("found page %#x len %d\n",
+ lun->mode_pages.index[i].page_code &
+ SMPH_PC_MASK,
+ lun->mode_pages.index[i].page_len);
+#endif
+
+ page_len += lun->mode_pages.index[i].page_len;
+ }
+
+ if (page_len == 0) {
+ ctl_set_invalid_field(ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 1,
+ /*field*/ 2,
+ /*bit_valid*/ 1,
+ /*bit*/ 5);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+ break;
+ }
+ }
+
+ total_len = header_len + page_len;
+#if 0
+ printf("header_len = %d, page_len = %d, total_len = %d\n",
+ header_len, page_len, total_len);
+#endif
+
+ ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK);
+ if (ctsio->kern_data_ptr == NULL) {
+ ctsio->io_hdr.status = CTL_SCSI_ERROR;
+ ctsio->scsi_status = SCSI_STATUS_BUSY;
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+ ctsio->kern_sg_entries = 0;
+ ctsio->kern_data_resid = 0;
+ ctsio->kern_rel_offset = 0;
+ if (total_len < alloc_len) {
+ ctsio->residual = alloc_len - total_len;
+ ctsio->kern_data_len = total_len;
+ ctsio->kern_total_len = total_len;
+ } else {
+ ctsio->residual = 0;
+ ctsio->kern_data_len = alloc_len;
+ ctsio->kern_total_len = alloc_len;
+ }
+ memset(ctsio->kern_data_ptr, 0, total_len);
+
+ switch (ctsio->cdb[0]) {
+ case MODE_SENSE_6: {
+ struct scsi_mode_hdr_6 *header;
+
+ header = (struct scsi_mode_hdr_6 *)ctsio->kern_data_ptr;
+
+ header->datalen = ctl_min(total_len - 1, 254);
+
+ if (dbd)
+ header->block_descr_len = 0;
+ else
+ header->block_descr_len =
+ sizeof(struct scsi_mode_block_descr);
+ block_desc = (struct scsi_mode_block_descr *)&header[1];
+ break;
+ }
+ case MODE_SENSE_10: {
+ struct scsi_mode_hdr_10 *header;
+ int datalen;
+
+ header = (struct scsi_mode_hdr_10 *)ctsio->kern_data_ptr;
+
+ datalen = ctl_min(total_len - 2, 65533);
+ scsi_ulto2b(datalen, header->datalen);
+ if (dbd)
+ scsi_ulto2b(0, header->block_descr_len);
+ else
+ scsi_ulto2b(sizeof(struct scsi_mode_block_descr),
+ header->block_descr_len);
+ block_desc = (struct scsi_mode_block_descr *)&header[1];
+ break;
+ }
+ default:
+ panic("invalid CDB type %#x", ctsio->cdb[0]);
+ break; /* NOTREACHED */
+ }
+
+ /*
+ * If we've got a disk, use its blocksize in the block
+ * descriptor. Otherwise, just set it to 0.
+ */
+ if (dbd == 0) {
+ if (control_dev != 0)
+ scsi_ulto3b(lun->be_lun->blocksize,
+ block_desc->block_len);
+ else
+ scsi_ulto3b(0, block_desc->block_len);
+ }
+
+ switch (page_code) {
+ case SMS_ALL_PAGES_PAGE: {
+ int i, data_used;
+
+ data_used = header_len;
+ for (i = 0; i < CTL_NUM_MODE_PAGES; i++) {
+ struct ctl_page_index *page_index;
+
+ page_index = &lun->mode_pages.index[i];
+
+ if ((control_dev != 0)
+ && (page_index->page_flags &
+ CTL_PAGE_FLAG_DISK_ONLY))
+ continue;
+
+ /*
+ * We don't use this subpage if the user didn't
+ * request all subpages. We already checked (above)
+ * to make sure the user only specified a subpage
+ * of 0 or 0xff in the SMS_ALL_PAGES_PAGE case.
+ */
+ if ((page_index->subpage != 0)
+ && (subpage == SMS_SUBPAGE_PAGE_0))
+ continue;
+
+ /*
+ * Call the handler, if it exists, to update the
+ * page to the latest values.
+ */
+ if (page_index->sense_handler != NULL)
+ page_index->sense_handler(ctsio, page_index,pc);
+
+ memcpy(ctsio->kern_data_ptr + data_used,
+ page_index->page_data +
+ (page_index->page_len * pc),
+ page_index->page_len);
+ data_used += page_index->page_len;
+ }
+ break;
+ }
+ default: {
+ int i, data_used;
+
+ data_used = header_len;
+
+ for (i = 0; i < CTL_NUM_MODE_PAGES; i++) {
+ struct ctl_page_index *page_index;
+
+ page_index = &lun->mode_pages.index[i];
+
+ /* Look for the right page code */
+ if ((page_index->page_code & SMPH_PC_MASK) != page_code)
+ continue;
+
+ /* Look for the right subpage or the subpage wildcard*/
+ if ((page_index->subpage != subpage)
+ && (subpage != SMS_SUBPAGE_ALL))
+ continue;
+
+ /* Make sure the page is supported for this dev type */
+ if ((control_dev != 0)
+ && (page_index->page_flags &
+ CTL_PAGE_FLAG_DISK_ONLY))
+ continue;
+
+ /*
+ * Call the handler, if it exists, to update the
+ * page to the latest values.
+ */
+ if (page_index->sense_handler != NULL)
+ page_index->sense_handler(ctsio, page_index,pc);
+
+ memcpy(ctsio->kern_data_ptr + data_used,
+ page_index->page_data +
+ (page_index->page_len * pc),
+ page_index->page_len);
+ data_used += page_index->page_len;
+ }
+ break;
+ }
+ }
+
+ ctsio->scsi_status = SCSI_STATUS_OK;
+
+ ctsio->be_move_done = ctl_config_move_done;
+ ctl_datamove((union ctl_io *)ctsio);
+
+ return (CTL_RETVAL_COMPLETE);
+}
+
+int
+ctl_read_capacity(struct ctl_scsiio *ctsio)
+{
+ struct scsi_read_capacity *cdb;
+ struct scsi_read_capacity_data *data;
+ struct ctl_lun *lun;
+ uint32_t lba;
+
+ CTL_DEBUG_PRINT(("ctl_read_capacity\n"));
+
+ cdb = (struct scsi_read_capacity *)ctsio->cdb;
+
+ lba = scsi_4btoul(cdb->addr);
+ if (((cdb->pmi & SRC_PMI) == 0)
+ && (lba != 0)) {
+ ctl_set_invalid_field(/*ctsio*/ ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 1,
+ /*field*/ 2,
+ /*bit_valid*/ 0,
+ /*bit*/ 0);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
+
+ ctsio->kern_data_ptr = malloc(sizeof(*data), M_CTL, M_WAITOK);
+ if (ctsio->kern_data_ptr == NULL) {
+ ctsio->io_hdr.status = CTL_SCSI_ERROR;
+ ctsio->scsi_status = SCSI_STATUS_BUSY;
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+ data = (struct scsi_read_capacity_data *)ctsio->kern_data_ptr;
+ ctsio->residual = 0;
+ ctsio->kern_data_len = sizeof(*data);
+ ctsio->kern_total_len = sizeof(*data);
+ ctsio->kern_data_resid = 0;
+ ctsio->kern_rel_offset = 0;
+ ctsio->kern_sg_entries = 0;
+
+ memset(data, 0, sizeof(*data));
+
+ /*
+ * If the maximum LBA is greater than 0xfffffffe, the user must
+ * issue a SERVICE ACTION IN (16) command, with the read capacity
+ * serivce action set.
+ */
+ if (lun->be_lun->maxlba > 0xfffffffe)
+ scsi_ulto4b(0xffffffff, data->addr);
+ else
+ scsi_ulto4b(lun->be_lun->maxlba, data->addr);
+
+ /*
+ * XXX KDM this may not be 512 bytes...
+ */
+ scsi_ulto4b(lun->be_lun->blocksize, data->length);
+
+ ctsio->scsi_status = SCSI_STATUS_OK;
+
+ ctsio->be_move_done = ctl_config_move_done;
+ ctl_datamove((union ctl_io *)ctsio);
+
+ return (CTL_RETVAL_COMPLETE);
+}
+
+static int
+ctl_read_capacity_16(struct ctl_scsiio *ctsio)
+{
+ struct scsi_read_capacity_16 *cdb;
+ struct scsi_read_capacity_data_long *data;
+ struct ctl_lun *lun;
+ uint64_t lba;
+ uint32_t alloc_len;
+
+ CTL_DEBUG_PRINT(("ctl_read_capacity_16\n"));
+
+ cdb = (struct scsi_read_capacity_16 *)ctsio->cdb;
+
+ alloc_len = scsi_4btoul(cdb->alloc_len);
+ lba = scsi_8btou64(cdb->addr);
+
+ if ((cdb->reladr & SRC16_PMI)
+ && (lba != 0)) {
+ ctl_set_invalid_field(/*ctsio*/ ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 1,
+ /*field*/ 2,
+ /*bit_valid*/ 0,
+ /*bit*/ 0);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
+
+ ctsio->kern_data_ptr = malloc(sizeof(*data), M_CTL, M_WAITOK);
+ if (ctsio->kern_data_ptr == NULL) {
+ ctsio->io_hdr.status = CTL_SCSI_ERROR;
+ ctsio->scsi_status = SCSI_STATUS_BUSY;
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+ data = (struct scsi_read_capacity_data_long *)ctsio->kern_data_ptr;
+
+ if (sizeof(*data) < alloc_len) {
+ ctsio->residual = alloc_len - sizeof(*data);
+ ctsio->kern_data_len = sizeof(*data);
+ ctsio->kern_total_len = sizeof(*data);
+ } else {
+ ctsio->residual = 0;
+ ctsio->kern_data_len = alloc_len;
+ ctsio->kern_total_len = alloc_len;
+ }
+ ctsio->kern_data_resid = 0;
+ ctsio->kern_rel_offset = 0;
+ ctsio->kern_sg_entries = 0;
+
+ memset(data, 0, sizeof(*data));
+
+ scsi_u64to8b(lun->be_lun->maxlba, data->addr);
+ /* XXX KDM this may not be 512 bytes... */
+ scsi_ulto4b(lun->be_lun->blocksize, data->length);
+
+ ctsio->scsi_status = SCSI_STATUS_OK;
+
+ ctsio->be_move_done = ctl_config_move_done;
+ ctl_datamove((union ctl_io *)ctsio);
+
+ return (CTL_RETVAL_COMPLETE);
+}
+
+int
+ctl_service_action_in(struct ctl_scsiio *ctsio)
+{
+ struct scsi_service_action_in *cdb;
+ int retval;
+
+ CTL_DEBUG_PRINT(("ctl_service_action_in\n"));
+
+ cdb = (struct scsi_service_action_in *)ctsio->cdb;
+
+ retval = CTL_RETVAL_COMPLETE;
+
+ switch (cdb->service_action) {
+ case SRC16_SERVICE_ACTION:
+ retval = ctl_read_capacity_16(ctsio);
+ break;
+ default:
+ ctl_set_invalid_field(/*ctsio*/ ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 1,
+ /*field*/ 1,
+ /*bit_valid*/ 1,
+ /*bit*/ 4);
+ ctl_done((union ctl_io *)ctsio);
+ break;
+ }
+
+ return (retval);
+}
+
+int
+ctl_maintenance_in(struct ctl_scsiio *ctsio)
+{
+ struct scsi_maintenance_in *cdb;
+ int retval;
+ int alloc_len, total_len = 0;
+ int num_target_port_groups;
+ struct ctl_lun *lun;
+ struct ctl_softc *softc;
+ struct scsi_target_group_data *rtg_ptr;
+ struct scsi_target_port_group_descriptor *tpg_desc_ptr1, *tpg_desc_ptr2;
+ struct scsi_target_port_descriptor *tp_desc_ptr1_1, *tp_desc_ptr1_2,
+ *tp_desc_ptr2_1, *tp_desc_ptr2_2;
+
+ CTL_DEBUG_PRINT(("ctl_maintenance_in\n"));
+
+ cdb = (struct scsi_maintenance_in *)ctsio->cdb;
+ softc = control_softc;
+ lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
+
+ retval = CTL_RETVAL_COMPLETE;
+ mtx_lock(&softc->ctl_lock);
+
+ if ((cdb->byte2 & SERVICE_ACTION_MASK) != SA_RPRT_TRGT_GRP) {
+ ctl_set_invalid_field(/*ctsio*/ ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 1,
+ /*field*/ 1,
+ /*bit_valid*/ 1,
+ /*bit*/ 4);
+ ctl_done((union ctl_io *)ctsio);
+ return(retval);
+ }
+
+ if (ctl_is_single)
+ num_target_port_groups = NUM_TARGET_PORT_GROUPS - 1;
+ else
+ num_target_port_groups = NUM_TARGET_PORT_GROUPS;
+
+ total_len = sizeof(struct scsi_target_group_data) +
+ sizeof(struct scsi_target_port_group_descriptor) *
+ num_target_port_groups +
+ sizeof(struct scsi_target_port_descriptor) *
+ NUM_PORTS_PER_GRP * num_target_port_groups;
+
+ alloc_len = scsi_4btoul(cdb->length);
+
+ ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK);
+ if (ctsio->kern_data_ptr == NULL) {
+ ctsio->io_hdr.status = CTL_SCSI_ERROR;
+ ctsio->scsi_status = SCSI_STATUS_BUSY;
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+ memset(ctsio->kern_data_ptr, 0, total_len);
+
+ ctsio->kern_sg_entries = 0;
+
+ if (total_len < alloc_len) {
+ ctsio->residual = alloc_len - total_len;
+ ctsio->kern_data_len = total_len;
+ ctsio->kern_total_len = total_len;
+ } else {
+ ctsio->residual = 0;
+ ctsio->kern_data_len = alloc_len;
+ ctsio->kern_total_len = alloc_len;
+ }
+ ctsio->kern_data_resid = 0;
+ ctsio->kern_rel_offset = 0;
+
+ rtg_ptr = (struct scsi_target_group_data *)ctsio->kern_data_ptr;
+
+ tpg_desc_ptr1 = &rtg_ptr->groups[0];
+ tp_desc_ptr1_1 = &tpg_desc_ptr1->descriptors[0];
+ tp_desc_ptr1_2 = (struct scsi_target_port_descriptor *)
+ &tp_desc_ptr1_1->desc_list[0];
+
+
+
+ if (ctl_is_single == 0) {
+ tpg_desc_ptr2 = (struct scsi_target_port_group_descriptor *)
+ &tp_desc_ptr1_2->desc_list[0];
+ tp_desc_ptr2_1 = &tpg_desc_ptr2->descriptors[0];
+ tp_desc_ptr2_2 = (struct scsi_target_port_descriptor *)
+ &tp_desc_ptr2_1->desc_list[0];
+ } else {
+ tpg_desc_ptr2 = NULL;
+ tp_desc_ptr2_1 = NULL;
+ tp_desc_ptr2_2 = NULL;
+ }
+
+ scsi_ulto4b(total_len - 4, rtg_ptr->length);
+ if (ctl_is_single == 0) {
+ if (ctsio->io_hdr.nexus.targ_port < CTL_MAX_PORTS) {
+ if (lun->flags & CTL_LUN_PRIMARY_SC) {
+ tpg_desc_ptr1->pref_state = TPG_PRIMARY;
+ tpg_desc_ptr2->pref_state =
+ TPG_ASYMMETRIC_ACCESS_NONOPTIMIZED;
+ } else {
+ tpg_desc_ptr1->pref_state =
+ TPG_ASYMMETRIC_ACCESS_NONOPTIMIZED;
+ tpg_desc_ptr2->pref_state = TPG_PRIMARY;
+ }
+ } else {
+ if (lun->flags & CTL_LUN_PRIMARY_SC) {
+ tpg_desc_ptr1->pref_state =
+ TPG_ASYMMETRIC_ACCESS_NONOPTIMIZED;
+ tpg_desc_ptr2->pref_state = TPG_PRIMARY;
+ } else {
+ tpg_desc_ptr1->pref_state = TPG_PRIMARY;
+ tpg_desc_ptr2->pref_state =
+ TPG_ASYMMETRIC_ACCESS_NONOPTIMIZED;
+ }
+ }
+ } else {
+ tpg_desc_ptr1->pref_state = TPG_PRIMARY;
+ }
+ tpg_desc_ptr1->support = 0;
+ tpg_desc_ptr1->target_port_group[1] = 1;
+ tpg_desc_ptr1->status = TPG_IMPLICIT;
+ tpg_desc_ptr1->target_port_count= NUM_PORTS_PER_GRP;
+
+ if (ctl_is_single == 0) {
+ tpg_desc_ptr2->support = 0;
+ tpg_desc_ptr2->target_port_group[1] = 2;
+ tpg_desc_ptr2->status = TPG_IMPLICIT;
+ tpg_desc_ptr2->target_port_count = NUM_PORTS_PER_GRP;
+
+ tp_desc_ptr1_1->relative_target_port_identifier[1] = 1;
+ tp_desc_ptr1_2->relative_target_port_identifier[1] = 2;
+
+ tp_desc_ptr2_1->relative_target_port_identifier[1] = 9;
+ tp_desc_ptr2_2->relative_target_port_identifier[1] = 10;
+ } else {
+ if (ctsio->io_hdr.nexus.targ_port < CTL_MAX_PORTS) {
+ tp_desc_ptr1_1->relative_target_port_identifier[1] = 1;
+ tp_desc_ptr1_2->relative_target_port_identifier[1] = 2;
+ } else {
+ tp_desc_ptr1_1->relative_target_port_identifier[1] = 9;
+ tp_desc_ptr1_2->relative_target_port_identifier[1] = 10;
+ }
+ }
+
+ mtx_unlock(&softc->ctl_lock);
+
+ ctsio->be_move_done = ctl_config_move_done;
+
+ CTL_DEBUG_PRINT(("buf = %x %x %x %x %x %x %x %x\n",
+ ctsio->kern_data_ptr[0], ctsio->kern_data_ptr[1],
+ ctsio->kern_data_ptr[2], ctsio->kern_data_ptr[3],
+ ctsio->kern_data_ptr[4], ctsio->kern_data_ptr[5],
+ ctsio->kern_data_ptr[6], ctsio->kern_data_ptr[7]));
+
+ ctl_datamove((union ctl_io *)ctsio);
+ return(retval);
+}
+
+int
+ctl_persistent_reserve_in(struct ctl_scsiio *ctsio)
+{
+ struct scsi_per_res_in *cdb;
+ int alloc_len, total_len = 0;
+ /* struct scsi_per_res_in_rsrv in_data; */
+ struct ctl_lun *lun;
+ struct ctl_softc *softc;
+
+ CTL_DEBUG_PRINT(("ctl_persistent_reserve_in\n"));
+
+ softc = control_softc;
+
+ cdb = (struct scsi_per_res_in *)ctsio->cdb;
+
+ alloc_len = scsi_2btoul(cdb->length);
+
+ lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
+
+retry:
+ mtx_lock(&softc->ctl_lock);
+ switch (cdb->action) {
+ case SPRI_RK: /* read keys */
+ total_len = sizeof(struct scsi_per_res_in_keys) +
+ lun->pr_key_count *
+ sizeof(struct scsi_per_res_key);
+ break;
+ case SPRI_RR: /* read reservation */
+ if (lun->flags & CTL_LUN_PR_RESERVED)
+ total_len = sizeof(struct scsi_per_res_in_rsrv);
+ else
+ total_len = sizeof(struct scsi_per_res_in_header);
+ break;
+ case SPRI_RC: /* report capabilities */
+ total_len = sizeof(struct scsi_per_res_cap);
+ break;
+ case SPRI_RS: /* read full status */
+ default:
+ mtx_unlock(&softc->ctl_lock);
+ ctl_set_invalid_field(ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 1,
+ /*field*/ 1,
+ /*bit_valid*/ 1,
+ /*bit*/ 0);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ break; /* NOTREACHED */
+ }
+ mtx_unlock(&softc->ctl_lock);
+
+ ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK);
+ if (ctsio->kern_data_ptr == NULL) {
+ ctsio->io_hdr.status = CTL_SCSI_ERROR;
+ ctsio->scsi_status = SCSI_STATUS_BUSY;
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ if (total_len < alloc_len) {
+ ctsio->residual = alloc_len - total_len;
+ ctsio->kern_data_len = total_len;
+ ctsio->kern_total_len = total_len;
+ } else {
+ ctsio->residual = 0;
+ ctsio->kern_data_len = alloc_len;
+ ctsio->kern_total_len = alloc_len;
+ }
+
+ ctsio->kern_data_resid = 0;
+ ctsio->kern_rel_offset = 0;
+ ctsio->kern_sg_entries = 0;
+
+ memset(ctsio->kern_data_ptr, 0, total_len);
+
+ mtx_lock(&softc->ctl_lock);
+ switch (cdb->action) {
+ case SPRI_RK: { // read keys
+ struct scsi_per_res_in_keys *res_keys;
+ int i, key_count;
+
+ res_keys = (struct scsi_per_res_in_keys*)ctsio->kern_data_ptr;
+
+ /*
+ * We had to drop the lock to allocate our buffer, which
+ * leaves time for someone to come in with another
+ * persistent reservation. (That is unlikely, though,
+ * since this should be the only persistent reservation
+ * command active right now.)
+ */
+ if (total_len != (sizeof(struct scsi_per_res_in_keys) +
+ (lun->pr_key_count *
+ sizeof(struct scsi_per_res_key)))){
+ mtx_unlock(&softc->ctl_lock);
+ free(ctsio->kern_data_ptr, M_CTL);
+ printf("%s: reservation length changed, retrying\n",
+ __func__);
+ goto retry;
+ }
+
+ scsi_ulto4b(lun->PRGeneration, res_keys->header.generation);
+
+ scsi_ulto4b(sizeof(struct scsi_per_res_key) *
+ lun->pr_key_count, res_keys->header.length);
+
+ for (i = 0, key_count = 0; i < 2*CTL_MAX_INITIATORS; i++) {
+ if (!lun->per_res[i].registered)
+ continue;
+
+ /*
+ * We used lun->pr_key_count to calculate the
+ * size to allocate. If it turns out the number of
+ * initiators with the registered flag set is
+ * larger than that (i.e. they haven't been kept in
+ * sync), we've got a problem.
+ */
+ if (key_count >= lun->pr_key_count) {
+#ifdef NEEDTOPORT
+ csevent_log(CSC_CTL | CSC_SHELF_SW |
+ CTL_PR_ERROR,
+ csevent_LogType_Fault,
+ csevent_AlertLevel_Yellow,
+ csevent_FRU_ShelfController,
+ csevent_FRU_Firmware,
+ csevent_FRU_Unknown,
+ "registered keys %d >= key "
+ "count %d", key_count,
+ lun->pr_key_count);
+#endif
+ key_count++;
+ continue;
+ }
+ memcpy(res_keys->keys[key_count].key,
+ lun->per_res[i].res_key.key,
+ ctl_min(sizeof(res_keys->keys[key_count].key),
+ sizeof(lun->per_res[i].res_key)));
+ key_count++;
+ }
+ break;
+ }
+ case SPRI_RR: { // read reservation
+ struct scsi_per_res_in_rsrv *res;
+ int tmp_len, header_only;
+
+ res = (struct scsi_per_res_in_rsrv *)ctsio->kern_data_ptr;
+
+ scsi_ulto4b(lun->PRGeneration, res->header.generation);
+
+ if (lun->flags & CTL_LUN_PR_RESERVED)
+ {
+ tmp_len = sizeof(struct scsi_per_res_in_rsrv);
+ scsi_ulto4b(sizeof(struct scsi_per_res_in_rsrv_data),
+ res->header.length);
+ header_only = 0;
+ } else {
+ tmp_len = sizeof(struct scsi_per_res_in_header);
+ scsi_ulto4b(0, res->header.length);
+ header_only = 1;
+ }
+
+ /*
+ * We had to drop the lock to allocate our buffer, which
+ * leaves time for someone to come in with another
+ * persistent reservation. (That is unlikely, though,
+ * since this should be the only persistent reservation
+ * command active right now.)
+ */
+ if (tmp_len != total_len) {
+ mtx_unlock(&softc->ctl_lock);
+ free(ctsio->kern_data_ptr, M_CTL);
+ printf("%s: reservation status changed, retrying\n",
+ __func__);
+ goto retry;
+ }
+
+ /*
+ * No reservation held, so we're done.
+ */
+ if (header_only != 0)
+ break;
+
+ /*
+ * If the registration is an All Registrants type, the key
+ * is 0, since it doesn't really matter.
+ */
+ if (lun->pr_res_idx != CTL_PR_ALL_REGISTRANTS) {
+ memcpy(res->data.reservation,
+ &lun->per_res[lun->pr_res_idx].res_key,
+ sizeof(struct scsi_per_res_key));
+ }
+ res->data.scopetype = lun->res_type;
+ break;
+ }
+ case SPRI_RC: //report capabilities
+ {
+ struct scsi_per_res_cap *res_cap;
+ uint16_t type_mask;
+
+ res_cap = (struct scsi_per_res_cap *)ctsio->kern_data_ptr;
+ scsi_ulto2b(sizeof(*res_cap), res_cap->length);
+ res_cap->flags2 |= SPRI_TMV;
+ type_mask = SPRI_TM_WR_EX_AR |
+ SPRI_TM_EX_AC_RO |
+ SPRI_TM_WR_EX_RO |
+ SPRI_TM_EX_AC |
+ SPRI_TM_WR_EX |
+ SPRI_TM_EX_AC_AR;
+ scsi_ulto2b(type_mask, res_cap->type_mask);
+ break;
+ }
+ case SPRI_RS: //read full status
+ default:
+ /*
+ * This is a bug, because we just checked for this above,
+ * and should have returned an error.
+ */
+ panic("Invalid PR type %x", cdb->action);
+ break; /* NOTREACHED */
+ }
+ mtx_unlock(&softc->ctl_lock);
+
+ ctsio->be_move_done = ctl_config_move_done;
+
+ CTL_DEBUG_PRINT(("buf = %x %x %x %x %x %x %x %x\n",
+ ctsio->kern_data_ptr[0], ctsio->kern_data_ptr[1],
+ ctsio->kern_data_ptr[2], ctsio->kern_data_ptr[3],
+ ctsio->kern_data_ptr[4], ctsio->kern_data_ptr[5],
+ ctsio->kern_data_ptr[6], ctsio->kern_data_ptr[7]));
+
+ ctl_datamove((union ctl_io *)ctsio);
+
+ return (CTL_RETVAL_COMPLETE);
+}
+
+/*
+ * Returns 0 if ctl_persistent_reserve_out() should continue, non-zero if
+ * it should return.
+ */
+static int
+ctl_pro_preempt(struct ctl_softc *softc, struct ctl_lun *lun, uint64_t res_key,
+ uint64_t sa_res_key, uint8_t type, uint32_t residx,
+ struct ctl_scsiio *ctsio, struct scsi_per_res_out *cdb,
+ struct scsi_per_res_out_parms* param)
+{
+ union ctl_ha_msg persis_io;
+ int retval, i;
+ int isc_retval;
+
+ retval = 0;
+
+ if (sa_res_key == 0) {
+ mtx_lock(&softc->ctl_lock);
+ if (lun->pr_res_idx == CTL_PR_ALL_REGISTRANTS) {
+ /* validate scope and type */
+ if ((cdb->scope_type & SPR_SCOPE_MASK) !=
+ SPR_LU_SCOPE) {
+ mtx_unlock(&softc->ctl_lock);
+ ctl_set_invalid_field(/*ctsio*/ ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 1,
+ /*field*/ 2,
+ /*bit_valid*/ 1,
+ /*bit*/ 4);
+ ctl_done((union ctl_io *)ctsio);
+ return (1);
+ }
+
+ if (type>8 || type==2 || type==4 || type==0) {
+ mtx_unlock(&softc->ctl_lock);
+ ctl_set_invalid_field(/*ctsio*/ ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 1,
+ /*field*/ 2,
+ /*bit_valid*/ 1,
+ /*bit*/ 0);
+ ctl_done((union ctl_io *)ctsio);
+ return (1);
+ }
+
+ /* temporarily unregister this nexus */
+ lun->per_res[residx].registered = 0;
+
+ /*
+ * Unregister everybody else and build UA for
+ * them
+ */
+ for(i=0; i < 2*CTL_MAX_INITIATORS; i++) {
+ if (lun->per_res[i].registered == 0)
+ continue;
+
+ if (!persis_offset
+ && i <CTL_MAX_INITIATORS)
+ lun->pending_sense[i].ua_pending |=
+ CTL_UA_REG_PREEMPT;
+ else if (persis_offset
+ && i >= persis_offset)
+ lun->pending_sense[i-persis_offset
+ ].ua_pending |=
+ CTL_UA_REG_PREEMPT;
+ lun->per_res[i].registered = 0;
+ memset(&lun->per_res[i].res_key, 0,
+ sizeof(struct scsi_per_res_key));
+ }
+ lun->per_res[residx].registered = 1;
+ lun->pr_key_count = 1;
+ lun->res_type = type;
+ if (lun->res_type != SPR_TYPE_WR_EX_AR
+ && lun->res_type != SPR_TYPE_EX_AC_AR)
+ lun->pr_res_idx = residx;
+
+ mtx_unlock(&softc->ctl_lock);
+ /* send msg to other side */
+ persis_io.hdr.nexus = ctsio->io_hdr.nexus;
+ persis_io.hdr.msg_type = CTL_MSG_PERS_ACTION;
+ persis_io.pr.pr_info.action = CTL_PR_PREEMPT;
+ persis_io.pr.pr_info.residx = lun->pr_res_idx;
+ persis_io.pr.pr_info.res_type = type;
+ memcpy(persis_io.pr.pr_info.sa_res_key,
+ param->serv_act_res_key,
+ sizeof(param->serv_act_res_key));
+ if ((isc_retval=ctl_ha_msg_send(CTL_HA_CHAN_CTL,
+ &persis_io, sizeof(persis_io), 0)) >
+ CTL_HA_STATUS_SUCCESS) {
+ printf("CTL:Persis Out error returned "
+ "from ctl_ha_msg_send %d\n",
+ isc_retval);
+ }
+ } else {
+ /* not all registrants */
+ mtx_unlock(&softc->ctl_lock);
+ free(ctsio->kern_data_ptr, M_CTL);
+ ctl_set_invalid_field(ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 0,
+ /*field*/ 8,
+ /*bit_valid*/ 0,
+ /*bit*/ 0);
+ ctl_done((union ctl_io *)ctsio);
+ return (1);
+ }
+ } else if (lun->pr_res_idx == CTL_PR_ALL_REGISTRANTS
+ || !(lun->flags & CTL_LUN_PR_RESERVED)) {
+ int found = 0;
+
+ mtx_lock(&softc->ctl_lock);
+ if (res_key == sa_res_key) {
+ /* special case */
+ /*
+ * The spec implies this is not good but doesn't
+ * say what to do. There are two choices either
+ * generate a res conflict or check condition
+ * with illegal field in parameter data. Since
+ * that is what is done when the sa_res_key is
+ * zero I'll take that approach since this has
+ * to do with the sa_res_key.
+ */
+ mtx_unlock(&softc->ctl_lock);
+ free(ctsio->kern_data_ptr, M_CTL);
+ ctl_set_invalid_field(ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 0,
+ /*field*/ 8,
+ /*bit_valid*/ 0,
+ /*bit*/ 0);
+ ctl_done((union ctl_io *)ctsio);
+ return (1);
+ }
+
+ for (i=0; i < 2*CTL_MAX_INITIATORS; i++) {
+ if (lun->per_res[i].registered
+ && memcmp(param->serv_act_res_key,
+ lun->per_res[i].res_key.key,
+ sizeof(struct scsi_per_res_key)) != 0)
+ continue;
+
+ found = 1;
+ lun->per_res[i].registered = 0;
+ memset(&lun->per_res[i].res_key, 0,
+ sizeof(struct scsi_per_res_key));
+ lun->pr_key_count--;
+
+ if (!persis_offset
+ && i < CTL_MAX_INITIATORS)
+ lun->pending_sense[i].ua_pending |=
+ CTL_UA_REG_PREEMPT;
+ else if (persis_offset
+ && i >= persis_offset)
+ lun->pending_sense[i-persis_offset].ua_pending|=
+ CTL_UA_REG_PREEMPT;
+ }
+ mtx_unlock(&softc->ctl_lock);
+ if (!found) {
+ free(ctsio->kern_data_ptr, M_CTL);
+ ctl_set_reservation_conflict(ctsio);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+ /* send msg to other side */
+ persis_io.hdr.nexus = ctsio->io_hdr.nexus;
+ persis_io.hdr.msg_type = CTL_MSG_PERS_ACTION;
+ persis_io.pr.pr_info.action = CTL_PR_PREEMPT;
+ persis_io.pr.pr_info.residx = lun->pr_res_idx;
+ persis_io.pr.pr_info.res_type = type;
+ memcpy(persis_io.pr.pr_info.sa_res_key,
+ param->serv_act_res_key,
+ sizeof(param->serv_act_res_key));
+ if ((isc_retval=ctl_ha_msg_send(CTL_HA_CHAN_CTL,
+ &persis_io, sizeof(persis_io), 0)) >
+ CTL_HA_STATUS_SUCCESS) {
+ printf("CTL:Persis Out error returned from "
+ "ctl_ha_msg_send %d\n", isc_retval);
+ }
+ } else {
+ /* Reserved but not all registrants */
+ /* sa_res_key is res holder */
+ if (memcmp(param->serv_act_res_key,
+ lun->per_res[lun->pr_res_idx].res_key.key,
+ sizeof(struct scsi_per_res_key)) == 0) {
+ /* validate scope and type */
+ if ((cdb->scope_type & SPR_SCOPE_MASK) !=
+ SPR_LU_SCOPE) {
+ ctl_set_invalid_field(/*ctsio*/ ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 1,
+ /*field*/ 2,
+ /*bit_valid*/ 1,
+ /*bit*/ 4);
+ ctl_done((union ctl_io *)ctsio);
+ return (1);
+ }
+
+ if (type>8 || type==2 || type==4 || type==0) {
+ ctl_set_invalid_field(/*ctsio*/ ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 1,
+ /*field*/ 2,
+ /*bit_valid*/ 1,
+ /*bit*/ 0);
+ ctl_done((union ctl_io *)ctsio);
+ return (1);
+ }
+
+ /*
+ * Do the following:
+ * if sa_res_key != res_key remove all
+ * registrants w/sa_res_key and generate UA
+ * for these registrants(Registrations
+ * Preempted) if it wasn't an exclusive
+ * reservation generate UA(Reservations
+ * Preempted) for all other registered nexuses
+ * if the type has changed. Establish the new
+ * reservation and holder. If res_key and
+ * sa_res_key are the same do the above
+ * except don't unregister the res holder.
+ */
+
+ /*
+ * Temporarily unregister so it won't get
+ * removed or UA generated
+ */
+ lun->per_res[residx].registered = 0;
+ for(i=0; i < 2*CTL_MAX_INITIATORS; i++) {
+ if (lun->per_res[i].registered == 0)
+ continue;
+
+ if (memcmp(param->serv_act_res_key,
+ lun->per_res[i].res_key.key,
+ sizeof(struct scsi_per_res_key)) == 0) {
+ lun->per_res[i].registered = 0;
+ memset(&lun->per_res[i].res_key,
+ 0,
+ sizeof(struct scsi_per_res_key));
+ lun->pr_key_count--;
+
+ if (!persis_offset
+ && i < CTL_MAX_INITIATORS)
+ lun->pending_sense[i
+ ].ua_pending |=
+ CTL_UA_REG_PREEMPT;
+ else if (persis_offset
+ && i >= persis_offset)
+ lun->pending_sense[
+ i-persis_offset].ua_pending |=
+ CTL_UA_REG_PREEMPT;
+ } else if (type != lun->res_type
+ && (lun->res_type == SPR_TYPE_WR_EX_RO
+ || lun->res_type ==SPR_TYPE_EX_AC_RO)){
+ if (!persis_offset
+ && i < CTL_MAX_INITIATORS)
+ lun->pending_sense[i
+ ].ua_pending |=
+ CTL_UA_RES_RELEASE;
+ else if (persis_offset
+ && i >= persis_offset)
+ lun->pending_sense[
+ i-persis_offset
+ ].ua_pending |=
+ CTL_UA_RES_RELEASE;
+ }
+ }
+ lun->per_res[residx].registered = 1;
+ lun->res_type = type;
+ if (lun->res_type != SPR_TYPE_WR_EX_AR
+ && lun->res_type != SPR_TYPE_EX_AC_AR)
+ lun->pr_res_idx = residx;
+ else
+ lun->pr_res_idx =
+ CTL_PR_ALL_REGISTRANTS;
+
+ persis_io.hdr.nexus = ctsio->io_hdr.nexus;
+ persis_io.hdr.msg_type = CTL_MSG_PERS_ACTION;
+ persis_io.pr.pr_info.action = CTL_PR_PREEMPT;
+ persis_io.pr.pr_info.residx = lun->pr_res_idx;
+ persis_io.pr.pr_info.res_type = type;
+ memcpy(persis_io.pr.pr_info.sa_res_key,
+ param->serv_act_res_key,
+ sizeof(param->serv_act_res_key));
+ if ((isc_retval=ctl_ha_msg_send(CTL_HA_CHAN_CTL,
+ &persis_io, sizeof(persis_io), 0)) >
+ CTL_HA_STATUS_SUCCESS) {
+ printf("CTL:Persis Out error returned "
+ "from ctl_ha_msg_send %d\n",
+ isc_retval);
+ }
+ } else {
+ /*
+ * sa_res_key is not the res holder just
+ * remove registrants
+ */
+ int found=0;
+ mtx_lock(&softc->ctl_lock);
+
+ for (i=0; i < 2*CTL_MAX_INITIATORS; i++) {
+ if (memcmp(param->serv_act_res_key,
+ lun->per_res[i].res_key.key,
+ sizeof(struct scsi_per_res_key)) != 0)
+ continue;
+
+ found = 1;
+ lun->per_res[i].registered = 0;
+ memset(&lun->per_res[i].res_key, 0,
+ sizeof(struct scsi_per_res_key));
+ lun->pr_key_count--;
+
+ if (!persis_offset
+ && i < CTL_MAX_INITIATORS)
+ lun->pending_sense[i].ua_pending |=
+ CTL_UA_REG_PREEMPT;
+ else if (persis_offset
+ && i >= persis_offset)
+ lun->pending_sense[
+ i-persis_offset].ua_pending |=
+ CTL_UA_REG_PREEMPT;
+ }
+
+ if (!found) {
+ mtx_unlock(&softc->ctl_lock);
+ free(ctsio->kern_data_ptr, M_CTL);
+ ctl_set_reservation_conflict(ctsio);
+ ctl_done((union ctl_io *)ctsio);
+ return (1);
+ }
+ mtx_unlock(&softc->ctl_lock);
+ persis_io.hdr.nexus = ctsio->io_hdr.nexus;
+ persis_io.hdr.msg_type = CTL_MSG_PERS_ACTION;
+ persis_io.pr.pr_info.action = CTL_PR_PREEMPT;
+ persis_io.pr.pr_info.residx = lun->pr_res_idx;
+ persis_io.pr.pr_info.res_type = type;
+ memcpy(persis_io.pr.pr_info.sa_res_key,
+ param->serv_act_res_key,
+ sizeof(param->serv_act_res_key));
+ if ((isc_retval=ctl_ha_msg_send(CTL_HA_CHAN_CTL,
+ &persis_io, sizeof(persis_io), 0)) >
+ CTL_HA_STATUS_SUCCESS) {
+ printf("CTL:Persis Out error returned "
+ "from ctl_ha_msg_send %d\n",
+ isc_retval);
+ }
+ }
+ }
+
+ lun->PRGeneration++;
+
+ return (retval);
+}
+
+static void
+ctl_pro_preempt_other(struct ctl_lun *lun, union ctl_ha_msg *msg)
+{
+ int i;
+
+ if (lun->pr_res_idx == CTL_PR_ALL_REGISTRANTS
+ || lun->pr_res_idx == CTL_PR_NO_RESERVATION
+ || memcmp(&lun->per_res[lun->pr_res_idx].res_key,
+ msg->pr.pr_info.sa_res_key,
+ sizeof(struct scsi_per_res_key)) != 0) {
+ uint64_t sa_res_key;
+ sa_res_key = scsi_8btou64(msg->pr.pr_info.sa_res_key);
+
+ if (sa_res_key == 0) {
+ /* temporarily unregister this nexus */
+ lun->per_res[msg->pr.pr_info.residx].registered = 0;
+
+ /*
+ * Unregister everybody else and build UA for
+ * them
+ */
+ for(i=0; i < 2*CTL_MAX_INITIATORS; i++) {
+ if (lun->per_res[i].registered == 0)
+ continue;
+
+ if (!persis_offset
+ && i < CTL_MAX_INITIATORS)
+ lun->pending_sense[i].ua_pending |=
+ CTL_UA_REG_PREEMPT;
+ else if (persis_offset && i >= persis_offset)
+ lun->pending_sense[i -
+ persis_offset].ua_pending |=
+ CTL_UA_REG_PREEMPT;
+ lun->per_res[i].registered = 0;
+ memset(&lun->per_res[i].res_key, 0,
+ sizeof(struct scsi_per_res_key));
+ }
+
+ lun->per_res[msg->pr.pr_info.residx].registered = 1;
+ lun->pr_key_count = 1;
+ lun->res_type = msg->pr.pr_info.res_type;
+ if (lun->res_type != SPR_TYPE_WR_EX_AR
+ && lun->res_type != SPR_TYPE_EX_AC_AR)
+ lun->pr_res_idx = msg->pr.pr_info.residx;
+ } else {
+ for (i=0; i < 2*CTL_MAX_INITIATORS; i++) {
+ if (memcmp(msg->pr.pr_info.sa_res_key,
+ lun->per_res[i].res_key.key,
+ sizeof(struct scsi_per_res_key)) != 0)
+ continue;
+
+ lun->per_res[i].registered = 0;
+ memset(&lun->per_res[i].res_key, 0,
+ sizeof(struct scsi_per_res_key));
+ lun->pr_key_count--;
+
+ if (!persis_offset
+ && i < persis_offset)
+ lun->pending_sense[i].ua_pending |=
+ CTL_UA_REG_PREEMPT;
+ else if (persis_offset
+ && i >= persis_offset)
+ lun->pending_sense[i -
+ persis_offset].ua_pending |=
+ CTL_UA_REG_PREEMPT;
+ }
+ }
+ } else {
+ /*
+ * Temporarily unregister so it won't get removed
+ * or UA generated
+ */
+ lun->per_res[msg->pr.pr_info.residx].registered = 0;
+ for (i=0; i < 2*CTL_MAX_INITIATORS; i++) {
+ if (lun->per_res[i].registered == 0)
+ continue;
+
+ if (memcmp(msg->pr.pr_info.sa_res_key,
+ lun->per_res[i].res_key.key,
+ sizeof(struct scsi_per_res_key)) == 0) {
+ lun->per_res[i].registered = 0;
+ memset(&lun->per_res[i].res_key, 0,
+ sizeof(struct scsi_per_res_key));
+ lun->pr_key_count--;
+ if (!persis_offset
+ && i < CTL_MAX_INITIATORS)
+ lun->pending_sense[i].ua_pending |=
+ CTL_UA_REG_PREEMPT;
+ else if (persis_offset
+ && i >= persis_offset)
+ lun->pending_sense[i -
+ persis_offset].ua_pending |=
+ CTL_UA_REG_PREEMPT;
+ } else if (msg->pr.pr_info.res_type != lun->res_type
+ && (lun->res_type == SPR_TYPE_WR_EX_RO
+ || lun->res_type == SPR_TYPE_EX_AC_RO)) {
+ if (!persis_offset
+ && i < persis_offset)
+ lun->pending_sense[i
+ ].ua_pending |=
+ CTL_UA_RES_RELEASE;
+ else if (persis_offset
+ && i >= persis_offset)
+ lun->pending_sense[i -
+ persis_offset].ua_pending |=
+ CTL_UA_RES_RELEASE;
+ }
+ }
+ lun->per_res[msg->pr.pr_info.residx].registered = 1;
+ lun->res_type = msg->pr.pr_info.res_type;
+ if (lun->res_type != SPR_TYPE_WR_EX_AR
+ && lun->res_type != SPR_TYPE_EX_AC_AR)
+ lun->pr_res_idx = msg->pr.pr_info.residx;
+ else
+ lun->pr_res_idx = CTL_PR_ALL_REGISTRANTS;
+ }
+ lun->PRGeneration++;
+
+}
+
+
+int
+ctl_persistent_reserve_out(struct ctl_scsiio *ctsio)
+{
+ int retval;
+ int isc_retval;
+ u_int32_t param_len;
+ struct scsi_per_res_out *cdb;
+ struct ctl_lun *lun;
+ struct scsi_per_res_out_parms* param;
+ struct ctl_softc *softc;
+ uint32_t residx;
+ uint64_t res_key, sa_res_key;
+ uint8_t type;
+ union ctl_ha_msg persis_io;
+ int i;
+
+ CTL_DEBUG_PRINT(("ctl_persistent_reserve_out\n"));
+
+ retval = CTL_RETVAL_COMPLETE;
+
+ softc = control_softc;
+
+ cdb = (struct scsi_per_res_out *)ctsio->cdb;
+ lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
+
+ /*
+ * We only support whole-LUN scope. The scope & type are ignored for
+ * register, register and ignore existing key and clear.
+ * We sometimes ignore scope and type on preempts too!!
+ * Verify reservation type here as well.
+ */
+ type = cdb->scope_type & SPR_TYPE_MASK;
+ if ((cdb->action == SPRO_RESERVE)
+ || (cdb->action == SPRO_RELEASE)) {
+ if ((cdb->scope_type & SPR_SCOPE_MASK) != SPR_LU_SCOPE) {
+ ctl_set_invalid_field(/*ctsio*/ ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 1,
+ /*field*/ 2,
+ /*bit_valid*/ 1,
+ /*bit*/ 4);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ if (type>8 || type==2 || type==4 || type==0) {
+ ctl_set_invalid_field(/*ctsio*/ ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 1,
+ /*field*/ 2,
+ /*bit_valid*/ 1,
+ /*bit*/ 0);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+ }
+
+ switch (cdb->action & SPRO_ACTION_MASK) {
+ case SPRO_REGISTER:
+ case SPRO_RESERVE:
+ case SPRO_RELEASE:
+ case SPRO_CLEAR:
+ case SPRO_PREEMPT:
+ case SPRO_REG_IGNO:
+ break;
+ case SPRO_REG_MOVE:
+ case SPRO_PRE_ABO:
+ default:
+ ctl_set_invalid_field(/*ctsio*/ ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 1,
+ /*field*/ 1,
+ /*bit_valid*/ 1,
+ /*bit*/ 0);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ break; /* NOTREACHED */
+ }
+
+ param_len = scsi_4btoul(cdb->length);
+
+ if ((ctsio->io_hdr.flags & CTL_FLAG_ALLOCATED) == 0) {
+ ctsio->kern_data_ptr = malloc(param_len, M_CTL, M_WAITOK);
+ if (ctsio->kern_data_ptr == NULL) {
+ ctl_set_busy(ctsio);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+ ctsio->kern_data_len = param_len;
+ ctsio->kern_total_len = param_len;
+ ctsio->kern_data_resid = 0;
+ ctsio->kern_rel_offset = 0;
+ ctsio->kern_sg_entries = 0;
+ ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED;
+ ctsio->be_move_done = ctl_config_move_done;
+ ctl_datamove((union ctl_io *)ctsio);
+
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ param = (struct scsi_per_res_out_parms *)ctsio->kern_data_ptr;
+
+ residx = ctl_get_resindex(&ctsio->io_hdr.nexus);
+ res_key = scsi_8btou64(param->res_key.key);
+ sa_res_key = scsi_8btou64(param->serv_act_res_key);
+
+ /*
+ * Validate the reservation key here except for SPRO_REG_IGNO
+ * This must be done for all other service actions
+ */
+ if ((cdb->action & SPRO_ACTION_MASK) != SPRO_REG_IGNO) {
+ mtx_lock(&softc->ctl_lock);
+ if (lun->per_res[residx].registered) {
+ if (memcmp(param->res_key.key,
+ lun->per_res[residx].res_key.key,
+ ctl_min(sizeof(param->res_key),
+ sizeof(lun->per_res[residx].res_key))) != 0) {
+ /*
+ * The current key passed in doesn't match
+ * the one the initiator previously
+ * registered.
+ */
+ mtx_unlock(&softc->ctl_lock);
+ free(ctsio->kern_data_ptr, M_CTL);
+ ctl_set_reservation_conflict(ctsio);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+ } else if ((cdb->action & SPRO_ACTION_MASK) != SPRO_REGISTER) {
+ /*
+ * We are not registered
+ */
+ mtx_unlock(&softc->ctl_lock);
+ free(ctsio->kern_data_ptr, M_CTL);
+ ctl_set_reservation_conflict(ctsio);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ } else if (res_key != 0) {
+ /*
+ * We are not registered and trying to register but
+ * the register key isn't zero.
+ */
+ mtx_unlock(&softc->ctl_lock);
+ free(ctsio->kern_data_ptr, M_CTL);
+ ctl_set_reservation_conflict(ctsio);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+ mtx_unlock(&softc->ctl_lock);
+ }
+
+ switch (cdb->action & SPRO_ACTION_MASK) {
+ case SPRO_REGISTER:
+ case SPRO_REG_IGNO: {
+
+#if 0
+ printf("Registration received\n");
+#endif
+
+ /*
+ * We don't support any of these options, as we report in
+ * the read capabilities request (see
+ * ctl_persistent_reserve_in(), above).
+ */
+ if ((param->flags & SPR_SPEC_I_PT)
+ || (param->flags & SPR_ALL_TG_PT)
+ || (param->flags & SPR_APTPL)) {
+ int bit_ptr;
+
+ if (param->flags & SPR_APTPL)
+ bit_ptr = 0;
+ else if (param->flags & SPR_ALL_TG_PT)
+ bit_ptr = 2;
+ else /* SPR_SPEC_I_PT */
+ bit_ptr = 3;
+
+ free(ctsio->kern_data_ptr, M_CTL);
+ ctl_set_invalid_field(ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 0,
+ /*field*/ 20,
+ /*bit_valid*/ 1,
+ /*bit*/ bit_ptr);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ mtx_lock(&softc->ctl_lock);
+
+ /*
+ * The initiator wants to clear the
+ * key/unregister.
+ */
+ if (sa_res_key == 0) {
+ if ((res_key == 0
+ && (cdb->action & SPRO_ACTION_MASK) == SPRO_REGISTER)
+ || ((cdb->action & SPRO_ACTION_MASK) == SPRO_REG_IGNO
+ && !lun->per_res[residx].registered)) {
+ mtx_unlock(&softc->ctl_lock);
+ goto done;
+ }
+
+ lun->per_res[residx].registered = 0;
+ memset(&lun->per_res[residx].res_key,
+ 0, sizeof(lun->per_res[residx].res_key));
+ lun->pr_key_count--;
+
+ if (residx == lun->pr_res_idx) {
+ lun->flags &= ~CTL_LUN_PR_RESERVED;
+ lun->pr_res_idx = CTL_PR_NO_RESERVATION;
+
+ if ((lun->res_type == SPR_TYPE_WR_EX_RO
+ || lun->res_type == SPR_TYPE_EX_AC_RO)
+ && lun->pr_key_count) {
+ /*
+ * If the reservation is a registrants
+ * only type we need to generate a UA
+ * for other registered inits. The
+ * sense code should be RESERVATIONS
+ * RELEASED
+ */
+
+ for (i = 0; i < CTL_MAX_INITIATORS;i++){
+ if (lun->per_res[
+ i+persis_offset].registered
+ == 0)
+ continue;
+ lun->pending_sense[i
+ ].ua_pending |=
+ CTL_UA_RES_RELEASE;
+ }
+ }
+ lun->res_type = 0;
+ } else if (lun->pr_res_idx == CTL_PR_ALL_REGISTRANTS) {
+ if (lun->pr_key_count==0) {
+ lun->flags &= ~CTL_LUN_PR_RESERVED;
+ lun->res_type = 0;
+ lun->pr_res_idx = CTL_PR_NO_RESERVATION;
+ }
+ }
+ persis_io.hdr.nexus = ctsio->io_hdr.nexus;
+ persis_io.hdr.msg_type = CTL_MSG_PERS_ACTION;
+ persis_io.pr.pr_info.action = CTL_PR_UNREG_KEY;
+ persis_io.pr.pr_info.residx = residx;
+ if ((isc_retval = ctl_ha_msg_send(CTL_HA_CHAN_CTL,
+ &persis_io, sizeof(persis_io), 0 )) >
+ CTL_HA_STATUS_SUCCESS) {
+ printf("CTL:Persis Out error returned from "
+ "ctl_ha_msg_send %d\n", isc_retval);
+ }
+ mtx_unlock(&softc->ctl_lock);
+ } else /* sa_res_key != 0 */ {
+
+ /*
+ * If we aren't registered currently then increment
+ * the key count and set the registered flag.
+ */
+ if (!lun->per_res[residx].registered) {
+ lun->pr_key_count++;
+ lun->per_res[residx].registered = 1;
+ }
+
+ memcpy(&lun->per_res[residx].res_key,
+ param->serv_act_res_key,
+ ctl_min(sizeof(param->serv_act_res_key),
+ sizeof(lun->per_res[residx].res_key)));
+
+ persis_io.hdr.nexus = ctsio->io_hdr.nexus;
+ persis_io.hdr.msg_type = CTL_MSG_PERS_ACTION;
+ persis_io.pr.pr_info.action = CTL_PR_REG_KEY;
+ persis_io.pr.pr_info.residx = residx;
+ memcpy(persis_io.pr.pr_info.sa_res_key,
+ param->serv_act_res_key,
+ sizeof(param->serv_act_res_key));
+ mtx_unlock(&softc->ctl_lock);
+ if ((isc_retval=ctl_ha_msg_send(CTL_HA_CHAN_CTL,
+ &persis_io, sizeof(persis_io), 0)) >
+ CTL_HA_STATUS_SUCCESS) {
+ printf("CTL:Persis Out error returned from "
+ "ctl_ha_msg_send %d\n", isc_retval);
+ }
+ }
+ lun->PRGeneration++;
+
+ break;
+ }
+ case SPRO_RESERVE:
+#if 0
+ printf("Reserve executed type %d\n", type);
+#endif
+ mtx_lock(&softc->ctl_lock);
+ if (lun->flags & CTL_LUN_PR_RESERVED) {
+ /*
+ * if this isn't the reservation holder and it's
+ * not a "all registrants" type or if the type is
+ * different then we have a conflict
+ */
+ if ((lun->pr_res_idx != residx
+ && lun->pr_res_idx != CTL_PR_ALL_REGISTRANTS)
+ || lun->res_type != type) {
+ mtx_unlock(&softc->ctl_lock);
+ free(ctsio->kern_data_ptr, M_CTL);
+ ctl_set_reservation_conflict(ctsio);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+ } else /* create a reservation */ {
+ /*
+ * If it's not an "all registrants" type record
+ * reservation holder
+ */
+ if (type != SPR_TYPE_WR_EX_AR
+ && type != SPR_TYPE_EX_AC_AR)
+ lun->pr_res_idx = residx; /* Res holder */
+ else
+ lun->pr_res_idx = CTL_PR_ALL_REGISTRANTS;
+
+ lun->flags |= CTL_LUN_PR_RESERVED;
+ lun->res_type = type;
+
+ mtx_unlock(&softc->ctl_lock);
+
+ /* send msg to other side */
+ persis_io.hdr.nexus = ctsio->io_hdr.nexus;
+ persis_io.hdr.msg_type = CTL_MSG_PERS_ACTION;
+ persis_io.pr.pr_info.action = CTL_PR_RESERVE;
+ persis_io.pr.pr_info.residx = lun->pr_res_idx;
+ persis_io.pr.pr_info.res_type = type;
+ if ((isc_retval=ctl_ha_msg_send(CTL_HA_CHAN_CTL,
+ &persis_io, sizeof(persis_io), 0)) >
+ CTL_HA_STATUS_SUCCESS) {
+ printf("CTL:Persis Out error returned from "
+ "ctl_ha_msg_send %d\n", isc_retval);
+ }
+ }
+ break;
+
+ case SPRO_RELEASE:
+ mtx_lock(&softc->ctl_lock);
+ if ((lun->flags & CTL_LUN_PR_RESERVED) == 0) {
+ /* No reservation exists return good status */
+ mtx_unlock(&softc->ctl_lock);
+ goto done;
+ }
+ /*
+ * Is this nexus a reservation holder?
+ */
+ if (lun->pr_res_idx != residx
+ && lun->pr_res_idx != CTL_PR_ALL_REGISTRANTS) {
+ /*
+ * not a res holder return good status but
+ * do nothing
+ */
+ mtx_unlock(&softc->ctl_lock);
+ goto done;
+ }
+
+ if (lun->res_type != type) {
+ mtx_unlock(&softc->ctl_lock);
+ free(ctsio->kern_data_ptr, M_CTL);
+ ctl_set_illegal_pr_release(ctsio);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ /* okay to release */
+ lun->flags &= ~CTL_LUN_PR_RESERVED;
+ lun->pr_res_idx = CTL_PR_NO_RESERVATION;
+ lun->res_type = 0;
+
+ /*
+ * if this isn't an exclusive access
+ * res generate UA for all other
+ * registrants.
+ */
+ if (type != SPR_TYPE_EX_AC
+ && type != SPR_TYPE_WR_EX) {
+ /*
+ * temporarily unregister so we don't generate UA
+ */
+ lun->per_res[residx].registered = 0;
+
+ for (i = 0; i < CTL_MAX_INITIATORS; i++) {
+ if (lun->per_res[i+persis_offset].registered
+ == 0)
+ continue;
+ lun->pending_sense[i].ua_pending |=
+ CTL_UA_RES_RELEASE;
+ }
+
+ lun->per_res[residx].registered = 1;
+ }
+ mtx_unlock(&softc->ctl_lock);
+ /* Send msg to other side */
+ persis_io.hdr.nexus = ctsio->io_hdr.nexus;
+ persis_io.hdr.msg_type = CTL_MSG_PERS_ACTION;
+ persis_io.pr.pr_info.action = CTL_PR_RELEASE;
+ if ((isc_retval=ctl_ha_msg_send( CTL_HA_CHAN_CTL, &persis_io,
+ sizeof(persis_io), 0)) > CTL_HA_STATUS_SUCCESS) {
+ printf("CTL:Persis Out error returned from "
+ "ctl_ha_msg_send %d\n", isc_retval);
+ }
+ break;
+
+ case SPRO_CLEAR:
+ /* send msg to other side */
+
+ mtx_lock(&softc->ctl_lock);
+ lun->flags &= ~CTL_LUN_PR_RESERVED;
+ lun->res_type = 0;
+ lun->pr_key_count = 0;
+ lun->pr_res_idx = CTL_PR_NO_RESERVATION;
+
+
+ memset(&lun->per_res[residx].res_key,
+ 0, sizeof(lun->per_res[residx].res_key));
+ lun->per_res[residx].registered = 0;
+
+ for (i=0; i < 2*CTL_MAX_INITIATORS; i++)
+ if (lun->per_res[i].registered) {
+ if (!persis_offset && i < CTL_MAX_INITIATORS)
+ lun->pending_sense[i].ua_pending |=
+ CTL_UA_RES_PREEMPT;
+ else if (persis_offset && i >= persis_offset)
+ lun->pending_sense[i-persis_offset
+ ].ua_pending |= CTL_UA_RES_PREEMPT;
+
+ memset(&lun->per_res[i].res_key,
+ 0, sizeof(struct scsi_per_res_key));
+ lun->per_res[i].registered = 0;
+ }
+ lun->PRGeneration++;
+ mtx_unlock(&softc->ctl_lock);
+ persis_io.hdr.nexus = ctsio->io_hdr.nexus;
+ persis_io.hdr.msg_type = CTL_MSG_PERS_ACTION;
+ persis_io.pr.pr_info.action = CTL_PR_CLEAR;
+ if ((isc_retval=ctl_ha_msg_send(CTL_HA_CHAN_CTL, &persis_io,
+ sizeof(persis_io), 0)) > CTL_HA_STATUS_SUCCESS) {
+ printf("CTL:Persis Out error returned from "
+ "ctl_ha_msg_send %d\n", isc_retval);
+ }
+ break;
+
+ case SPRO_PREEMPT: {
+ int nretval;
+
+ nretval = ctl_pro_preempt(softc, lun, res_key, sa_res_key, type,
+ residx, ctsio, cdb, param);
+ if (nretval != 0)
+ return (CTL_RETVAL_COMPLETE);
+ break;
+ }
+ case SPRO_REG_MOVE:
+ case SPRO_PRE_ABO:
+ default:
+ free(ctsio->kern_data_ptr, M_CTL);
+ ctl_set_invalid_field(/*ctsio*/ ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 1,
+ /*field*/ 1,
+ /*bit_valid*/ 1,
+ /*bit*/ 0);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ break; /* NOTREACHED */
+ }
+
+done:
+ free(ctsio->kern_data_ptr, M_CTL);
+ ctl_set_success(ctsio);
+ ctl_done((union ctl_io *)ctsio);
+
+ return (retval);
+}
+
+/*
+ * This routine is for handling a message from the other SC pertaining to
+ * persistent reserve out. All the error checking will have been done
+ * so only perorming the action need be done here to keep the two
+ * in sync.
+ */
+static void
+ctl_hndl_per_res_out_on_other_sc(union ctl_ha_msg *msg)
+{
+ struct ctl_lun *lun;
+ struct ctl_softc *softc;
+ int i;
+
+ softc = control_softc;
+
+ mtx_lock(&softc->ctl_lock);
+
+ lun = softc->ctl_luns[msg->hdr.nexus.targ_lun];
+ switch(msg->pr.pr_info.action) {
+ case CTL_PR_REG_KEY:
+ if (!lun->per_res[msg->pr.pr_info.residx].registered) {
+ lun->per_res[msg->pr.pr_info.residx].registered = 1;
+ lun->pr_key_count++;
+ }
+ lun->PRGeneration++;
+ memcpy(&lun->per_res[msg->pr.pr_info.residx].res_key,
+ msg->pr.pr_info.sa_res_key,
+ sizeof(struct scsi_per_res_key));
+ break;
+
+ case CTL_PR_UNREG_KEY:
+ lun->per_res[msg->pr.pr_info.residx].registered = 0;
+ memset(&lun->per_res[msg->pr.pr_info.residx].res_key,
+ 0, sizeof(struct scsi_per_res_key));
+ lun->pr_key_count--;
+
+ /* XXX Need to see if the reservation has been released */
+ /* if so do we need to generate UA? */
+ if (msg->pr.pr_info.residx == lun->pr_res_idx) {
+ lun->flags &= ~CTL_LUN_PR_RESERVED;
+ lun->pr_res_idx = CTL_PR_NO_RESERVATION;
+
+ if ((lun->res_type == SPR_TYPE_WR_EX_RO
+ || lun->res_type == SPR_TYPE_EX_AC_RO)
+ && lun->pr_key_count) {
+ /*
+ * If the reservation is a registrants
+ * only type we need to generate a UA
+ * for other registered inits. The
+ * sense code should be RESERVATIONS
+ * RELEASED
+ */
+
+ for (i = 0; i < CTL_MAX_INITIATORS; i++) {
+ if (lun->per_res[i+
+ persis_offset].registered == 0)
+ continue;
+
+ lun->pending_sense[i
+ ].ua_pending |=
+ CTL_UA_RES_RELEASE;
+ }
+ }
+ lun->res_type = 0;
+ } else if (lun->pr_res_idx == CTL_PR_ALL_REGISTRANTS) {
+ if (lun->pr_key_count==0) {
+ lun->flags &= ~CTL_LUN_PR_RESERVED;
+ lun->res_type = 0;
+ lun->pr_res_idx = CTL_PR_NO_RESERVATION;
+ }
+ }
+ lun->PRGeneration++;
+ break;
+
+ case CTL_PR_RESERVE:
+ lun->flags |= CTL_LUN_PR_RESERVED;
+ lun->res_type = msg->pr.pr_info.res_type;
+ lun->pr_res_idx = msg->pr.pr_info.residx;
+
+ break;
+
+ case CTL_PR_RELEASE:
+ /*
+ * if this isn't an exclusive access res generate UA for all
+ * other registrants.
+ */
+ if (lun->res_type != SPR_TYPE_EX_AC
+ && lun->res_type != SPR_TYPE_WR_EX) {
+ for (i = 0; i < CTL_MAX_INITIATORS; i++)
+ if (lun->per_res[i+persis_offset].registered)
+ lun->pending_sense[i].ua_pending |=
+ CTL_UA_RES_RELEASE;
+ }
+
+ lun->flags &= ~CTL_LUN_PR_RESERVED;
+ lun->pr_res_idx = CTL_PR_NO_RESERVATION;
+ lun->res_type = 0;
+ break;
+
+ case CTL_PR_PREEMPT:
+ ctl_pro_preempt_other(lun, msg);
+ break;
+ case CTL_PR_CLEAR:
+ lun->flags &= ~CTL_LUN_PR_RESERVED;
+ lun->res_type = 0;
+ lun->pr_key_count = 0;
+ lun->pr_res_idx = CTL_PR_NO_RESERVATION;
+
+ for (i=0; i < 2*CTL_MAX_INITIATORS; i++) {
+ if (lun->per_res[i].registered == 0)
+ continue;
+ if (!persis_offset
+ && i < CTL_MAX_INITIATORS)
+ lun->pending_sense[i].ua_pending |=
+ CTL_UA_RES_PREEMPT;
+ else if (persis_offset
+ && i >= persis_offset)
+ lun->pending_sense[i-persis_offset].ua_pending|=
+ CTL_UA_RES_PREEMPT;
+ memset(&lun->per_res[i].res_key, 0,
+ sizeof(struct scsi_per_res_key));
+ lun->per_res[i].registered = 0;
+ }
+ lun->PRGeneration++;
+ break;
+ }
+
+ mtx_unlock(&softc->ctl_lock);
+}
+
+int
+ctl_read_write(struct ctl_scsiio *ctsio)
+{
+ struct ctl_lun *lun;
+ struct ctl_lba_len lbalen;
+ uint64_t lba;
+ uint32_t num_blocks;
+ int reladdr, fua, dpo, ebp;
+ int retval;
+ int isread;
+
+ lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
+
+ CTL_DEBUG_PRINT(("ctl_read_write: command: %#x\n", ctsio->cdb[0]));
+
+ reladdr = 0;
+ fua = 0;
+ dpo = 0;
+ ebp = 0;
+
+ retval = CTL_RETVAL_COMPLETE;
+
+ isread = ctsio->cdb[0] == READ_6 || ctsio->cdb[0] == READ_10
+ || ctsio->cdb[0] == READ_12 || ctsio->cdb[0] == READ_16;
+ if (lun->flags & CTL_LUN_PR_RESERVED && isread) {
+ uint32_t residx;
+
+ /*
+ * XXX KDM need a lock here.
+ */
+ residx = ctl_get_resindex(&ctsio->io_hdr.nexus);
+ if ((lun->res_type == SPR_TYPE_EX_AC
+ && residx != lun->pr_res_idx)
+ || ((lun->res_type == SPR_TYPE_EX_AC_RO
+ || lun->res_type == SPR_TYPE_EX_AC_AR)
+ && !lun->per_res[residx].registered)) {
+ ctl_set_reservation_conflict(ctsio);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+ }
+
+ switch (ctsio->cdb[0]) {
+ case READ_6:
+ case WRITE_6: {
+ struct scsi_rw_6 *cdb;
+
+ cdb = (struct scsi_rw_6 *)ctsio->cdb;
+
+ lba = scsi_3btoul(cdb->addr);
+ /* only 5 bits are valid in the most significant address byte */
+ lba &= 0x1fffff;
+ num_blocks = cdb->length;
+ /*
+ * This is correct according to SBC-2.
+ */
+ if (num_blocks == 0)
+ num_blocks = 256;
+ break;
+ }
+ case READ_10:
+ case WRITE_10: {
+ struct scsi_rw_10 *cdb;
+
+ cdb = (struct scsi_rw_10 *)ctsio->cdb;
+
+ if (cdb->byte2 & SRW10_RELADDR)
+ reladdr = 1;
+ if (cdb->byte2 & SRW10_FUA)
+ fua = 1;
+ if (cdb->byte2 & SRW10_DPO)
+ dpo = 1;
+
+ if ((cdb->opcode == WRITE_10)
+ && (cdb->byte2 & SRW10_EBP))
+ ebp = 1;
+
+ lba = scsi_4btoul(cdb->addr);
+ num_blocks = scsi_2btoul(cdb->length);
+ break;
+ }
+ case WRITE_VERIFY_10: {
+ struct scsi_write_verify_10 *cdb;
+
+ cdb = (struct scsi_write_verify_10 *)ctsio->cdb;
+
+ /*
+ * XXX KDM we should do actual write verify support at some
+ * point. This is obviously fake, we're just translating
+ * things to a write. So we don't even bother checking the
+ * BYTCHK field, since we don't do any verification. If
+ * the user asks for it, we'll just pretend we did it.
+ */
+ if (cdb->byte2 & SWV_DPO)
+ dpo = 1;
+
+ lba = scsi_4btoul(cdb->addr);
+ num_blocks = scsi_2btoul(cdb->length);
+ break;
+ }
+ case READ_12:
+ case WRITE_12: {
+ struct scsi_rw_12 *cdb;
+
+ cdb = (struct scsi_rw_12 *)ctsio->cdb;
+
+ if (cdb->byte2 & SRW12_RELADDR)
+ reladdr = 1;
+ if (cdb->byte2 & SRW12_FUA)
+ fua = 1;
+ if (cdb->byte2 & SRW12_DPO)
+ dpo = 1;
+ lba = scsi_4btoul(cdb->addr);
+ num_blocks = scsi_4btoul(cdb->length);
+ break;
+ }
+ case WRITE_VERIFY_12: {
+ struct scsi_write_verify_12 *cdb;
+
+ cdb = (struct scsi_write_verify_12 *)ctsio->cdb;
+
+ if (cdb->byte2 & SWV_DPO)
+ dpo = 1;
+
+ lba = scsi_4btoul(cdb->addr);
+ num_blocks = scsi_4btoul(cdb->length);
+
+ break;
+ }
+ case READ_16:
+ case WRITE_16: {
+ struct scsi_rw_16 *cdb;
+
+ cdb = (struct scsi_rw_16 *)ctsio->cdb;
+
+ if (cdb->byte2 & SRW12_RELADDR)
+ reladdr = 1;
+ if (cdb->byte2 & SRW12_FUA)
+ fua = 1;
+ if (cdb->byte2 & SRW12_DPO)
+ dpo = 1;
+
+ lba = scsi_8btou64(cdb->addr);
+ num_blocks = scsi_4btoul(cdb->length);
+ break;
+ }
+ case WRITE_VERIFY_16: {
+ struct scsi_write_verify_16 *cdb;
+
+ cdb = (struct scsi_write_verify_16 *)ctsio->cdb;
+
+ if (cdb->byte2 & SWV_DPO)
+ dpo = 1;
+
+ lba = scsi_8btou64(cdb->addr);
+ num_blocks = scsi_4btoul(cdb->length);
+ break;
+ }
+ default:
+ /*
+ * We got a command we don't support. This shouldn't
+ * happen, commands should be filtered out above us.
+ */
+ ctl_set_invalid_opcode(ctsio);
+ ctl_done((union ctl_io *)ctsio);
+
+ return (CTL_RETVAL_COMPLETE);
+ break; /* NOTREACHED */
+ }
+
+ /*
+ * XXX KDM what do we do with the DPO and FUA bits? FUA might be
+ * interesting for us, but if RAIDCore is in write-back mode,
+ * getting it to do write-through for a particular transaction may
+ * not be possible.
+ */
+ /*
+ * We don't support relative addressing. That also requires
+ * supporting linked commands, which we don't do.
+ */
+ if (reladdr != 0) {
+ ctl_set_invalid_field(ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 1,
+ /*field*/ 1,
+ /*bit_valid*/ 1,
+ /*bit*/ 0);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ /*
+ * The first check is to make sure we're in bounds, the second
+ * check is to catch wrap-around problems. If the lba + num blocks
+ * is less than the lba, then we've wrapped around and the block
+ * range is invalid anyway.
+ */
+ if (((lba + num_blocks) > (lun->be_lun->maxlba + 1))
+ || ((lba + num_blocks) < lba)) {
+ ctl_set_lba_out_of_range(ctsio);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ /*
+ * According to SBC-3, a transfer length of 0 is not an error.
+ * Note that this cannot happen with WRITE(6) or READ(6), since 0
+ * translates to 256 blocks for those commands.
+ */
+ if (num_blocks == 0) {
+ ctl_set_success(ctsio);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ lbalen.lba = lba;
+ lbalen.len = num_blocks;
+ memcpy(ctsio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].bytes, &lbalen,
+ sizeof(lbalen));
+
+ CTL_DEBUG_PRINT(("ctl_read_write: calling data_submit()\n"));
+
+ retval = lun->backend->data_submit((union ctl_io *)ctsio);
+
+ return (retval);
+}
+
+int
+ctl_report_luns(struct ctl_scsiio *ctsio)
+{
+ struct scsi_report_luns *cdb;
+ struct scsi_report_luns_data *lun_data;
+ struct ctl_lun *lun, *request_lun;
+ int num_luns, retval;
+ uint32_t alloc_len, lun_datalen;
+ int num_filled, well_known;
+ uint32_t initidx;
+
+ retval = CTL_RETVAL_COMPLETE;
+ well_known = 0;
+
+ cdb = (struct scsi_report_luns *)ctsio->cdb;
+
+ CTL_DEBUG_PRINT(("ctl_report_luns\n"));
+
+ mtx_lock(&control_softc->ctl_lock);
+ num_luns = control_softc->num_luns;
+ mtx_unlock(&control_softc->ctl_lock);
+
+ switch (cdb->select_report) {
+ case RPL_REPORT_DEFAULT:
+ case RPL_REPORT_ALL:
+ break;
+ case RPL_REPORT_WELLKNOWN:
+ well_known = 1;
+ num_luns = 0;
+ break;
+ default:
+ ctl_set_invalid_field(ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 1,
+ /*field*/ 2,
+ /*bit_valid*/ 0,
+ /*bit*/ 0);
+ ctl_done((union ctl_io *)ctsio);
+ return (retval);
+ break; /* NOTREACHED */
+ }
+
+ alloc_len = scsi_4btoul(cdb->length);
+ /*
+ * The initiator has to allocate at least 16 bytes for this request,
+ * so he can at least get the header and the first LUN. Otherwise
+ * we reject the request (per SPC-3 rev 14, section 6.21).
+ */
+ if (alloc_len < (sizeof(struct scsi_report_luns_data) +
+ sizeof(struct scsi_report_luns_lundata))) {
+ ctl_set_invalid_field(ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 1,
+ /*field*/ 6,
+ /*bit_valid*/ 0,
+ /*bit*/ 0);
+ ctl_done((union ctl_io *)ctsio);
+ return (retval);
+ }
+
+ request_lun = (struct ctl_lun *)
+ ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
+
+ lun_datalen = sizeof(*lun_data) +
+ (num_luns * sizeof(struct scsi_report_luns_lundata));
+
+ ctsio->kern_data_ptr = malloc(lun_datalen, M_CTL, M_WAITOK);
+ if (ctsio->kern_data_ptr == NULL) {
+ ctsio->io_hdr.status = CTL_SCSI_ERROR;
+ ctsio->scsi_status = SCSI_STATUS_BUSY;
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ lun_data = (struct scsi_report_luns_data *)ctsio->kern_data_ptr;
+ ctsio->kern_sg_entries = 0;
+
+ if (lun_datalen < alloc_len) {
+ ctsio->residual = alloc_len - lun_datalen;
+ ctsio->kern_data_len = lun_datalen;
+ ctsio->kern_total_len = lun_datalen;
+ } else {
+ ctsio->residual = 0;
+ ctsio->kern_data_len = alloc_len;
+ ctsio->kern_total_len = alloc_len;
+ }
+ ctsio->kern_data_resid = 0;
+ ctsio->kern_rel_offset = 0;
+ ctsio->kern_sg_entries = 0;
+
+ initidx = ctl_get_initindex(&ctsio->io_hdr.nexus);
+
+ memset(lun_data, 0, lun_datalen);
+
+ /*
+ * We set this to the actual data length, regardless of how much
+ * space we actually have to return results. If the user looks at
+ * this value, he'll know whether or not he allocated enough space
+ * and reissue the command if necessary. We don't support well
+ * known logical units, so if the user asks for that, return none.
+ */
+ scsi_ulto4b(lun_datalen - 8, lun_data->length);
+
+ mtx_lock(&control_softc->ctl_lock);
+ for (num_filled = 0, lun = STAILQ_FIRST(&control_softc->lun_list);
+ (lun != NULL) && (num_filled < num_luns);
+ lun = STAILQ_NEXT(lun, links)) {
+
+ if (lun->lun <= 0xff) {
+ /*
+ * Peripheral addressing method, bus number 0.
+ */
+ lun_data->luns[num_filled].lundata[0] =
+ RPL_LUNDATA_ATYP_PERIPH;
+ lun_data->luns[num_filled].lundata[1] = lun->lun;
+ num_filled++;
+ } else if (lun->lun <= 0x3fff) {
+ /*
+ * Flat addressing method.
+ */
+ lun_data->luns[num_filled].lundata[0] =
+ RPL_LUNDATA_ATYP_FLAT |
+ (lun->lun & RPL_LUNDATA_FLAT_LUN_MASK);
+#ifdef OLDCTLHEADERS
+ (SRLD_ADDR_FLAT << SRLD_ADDR_SHIFT) |
+ (lun->lun & SRLD_BUS_LUN_MASK);
+#endif
+ lun_data->luns[num_filled].lundata[1] =
+#ifdef OLDCTLHEADERS
+ lun->lun >> SRLD_BUS_LUN_BITS;
+#endif
+ lun->lun >> RPL_LUNDATA_FLAT_LUN_BITS;
+ num_filled++;
+ } else {
+ printf("ctl_report_luns: bogus LUN number %jd, "
+ "skipping\n", (intmax_t)lun->lun);
+ }
+ /*
+ * According to SPC-3, rev 14 section 6.21:
+ *
+ * "The execution of a REPORT LUNS command to any valid and
+ * installed logical unit shall clear the REPORTED LUNS DATA
+ * HAS CHANGED unit attention condition for all logical
+ * units of that target with respect to the requesting
+ * initiator. A valid and installed logical unit is one
+ * having a PERIPHERAL QUALIFIER of 000b in the standard
+ * INQUIRY data (see 6.4.2)."
+ *
+ * If request_lun is NULL, the LUN this report luns command
+ * was issued to is either disabled or doesn't exist. In that
+ * case, we shouldn't clear any pending lun change unit
+ * attention.
+ */
+ if (request_lun != NULL)
+ lun->pending_sense[initidx].ua_pending &=
+ ~CTL_UA_LUN_CHANGE;
+ }
+ mtx_unlock(&control_softc->ctl_lock);
+
+ /*
+ * We can only return SCSI_STATUS_CHECK_COND when we can't satisfy
+ * this request.
+ */
+ ctsio->scsi_status = SCSI_STATUS_OK;
+
+ ctsio->be_move_done = ctl_config_move_done;
+ ctl_datamove((union ctl_io *)ctsio);
+
+ return (retval);
+}
+
+int
+ctl_request_sense(struct ctl_scsiio *ctsio)
+{
+ struct scsi_request_sense *cdb;
+ struct scsi_sense_data *sense_ptr;
+ struct ctl_lun *lun;
+ uint32_t initidx;
+ int have_error;
+ scsi_sense_data_type sense_format;
+
+ cdb = (struct scsi_request_sense *)ctsio->cdb;
+
+ lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
+
+ CTL_DEBUG_PRINT(("ctl_request_sense\n"));
+
+ /*
+ * Determine which sense format the user wants.
+ */
+ if (cdb->byte2 & SRS_DESC)
+ sense_format = SSD_TYPE_DESC;
+ else
+ sense_format = SSD_TYPE_FIXED;
+
+ ctsio->kern_data_ptr = malloc(sizeof(*sense_ptr), M_CTL, M_WAITOK);
+ if (ctsio->kern_data_ptr == NULL) {
+ ctsio->io_hdr.status = CTL_SCSI_ERROR;
+ ctsio->scsi_status = SCSI_STATUS_BUSY;
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+ sense_ptr = (struct scsi_sense_data *)ctsio->kern_data_ptr;
+ ctsio->kern_sg_entries = 0;
+
+ /*
+ * struct scsi_sense_data, which is currently set to 256 bytes, is
+ * larger than the largest allowed value for the length field in the
+ * REQUEST SENSE CDB, which is 252 bytes as of SPC-4.
+ */
+ ctsio->residual = 0;
+ ctsio->kern_data_len = cdb->length;
+ ctsio->kern_total_len = cdb->length;
+
+ ctsio->kern_data_resid = 0;
+ ctsio->kern_rel_offset = 0;
+ ctsio->kern_sg_entries = 0;
+
+ /*
+ * If we don't have a LUN, we don't have any pending sense.
+ */
+ if (lun == NULL)
+ goto no_sense;
+
+ have_error = 0;
+ initidx = ctl_get_initindex(&ctsio->io_hdr.nexus);
+ /*
+ * Check for pending sense, and then for pending unit attentions.
+ * Pending sense gets returned first, then pending unit attentions.
+ */
+ mtx_lock(&lun->ctl_softc->ctl_lock);
+ if (ctl_is_set(lun->have_ca, initidx)) {
+ scsi_sense_data_type stored_format;
+
+ /*
+ * Check to see which sense format was used for the stored
+ * sense data.
+ */
+ stored_format = scsi_sense_type(
+ &lun->pending_sense[initidx].sense);
+
+ /*
+ * If the user requested a different sense format than the
+ * one we stored, then we need to convert it to the other
+ * format. If we're going from descriptor to fixed format
+ * sense data, we may lose things in translation, depending
+ * on what options were used.
+ *
+ * If the stored format is SSD_TYPE_NONE (i.e. invalid),
+ * for some reason we'll just copy it out as-is.
+ */
+ if ((stored_format == SSD_TYPE_FIXED)
+ && (sense_format == SSD_TYPE_DESC))
+ ctl_sense_to_desc((struct scsi_sense_data_fixed *)
+ &lun->pending_sense[initidx].sense,
+ (struct scsi_sense_data_desc *)sense_ptr);
+ else if ((stored_format == SSD_TYPE_DESC)
+ && (sense_format == SSD_TYPE_FIXED))
+ ctl_sense_to_fixed((struct scsi_sense_data_desc *)
+ &lun->pending_sense[initidx].sense,
+ (struct scsi_sense_data_fixed *)sense_ptr);
+ else
+ memcpy(sense_ptr, &lun->pending_sense[initidx].sense,
+ ctl_min(sizeof(*sense_ptr),
+ sizeof(lun->pending_sense[initidx].sense)));
+
+ ctl_clear_mask(lun->have_ca, initidx);
+ have_error = 1;
+ } else if (lun->pending_sense[initidx].ua_pending != CTL_UA_NONE) {
+ ctl_ua_type ua_type;
+
+ ua_type = ctl_build_ua(lun->pending_sense[initidx].ua_pending,
+ sense_ptr, sense_format);
+ if (ua_type != CTL_UA_NONE) {
+ have_error = 1;
+ /* We're reporting this UA, so clear it */
+ lun->pending_sense[initidx].ua_pending &= ~ua_type;
+ }
+ }
+ mtx_unlock(&lun->ctl_softc->ctl_lock);
+
+ /*
+ * We already have a pending error, return it.
+ */
+ if (have_error != 0) {
+ /*
+ * We report the SCSI status as OK, since the status of the
+ * request sense command itself is OK.
+ */
+ ctsio->scsi_status = SCSI_STATUS_OK;
+
+ /*
+ * We report 0 for the sense length, because we aren't doing
+ * autosense in this case. We're reporting sense as
+ * parameter data.
+ */
+ ctsio->sense_len = 0;
+
+ ctsio->be_move_done = ctl_config_move_done;
+ ctl_datamove((union ctl_io *)ctsio);
+
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+no_sense:
+
+ /*
+ * No sense information to report, so we report that everything is
+ * okay.
+ */
+ ctl_set_sense_data(sense_ptr,
+ lun,
+ sense_format,
+ /*current_error*/ 1,
+ /*sense_key*/ SSD_KEY_NO_SENSE,
+ /*asc*/ 0x00,
+ /*ascq*/ 0x00,
+ SSD_ELEM_NONE);
+
+ ctsio->scsi_status = SCSI_STATUS_OK;
+
+ /*
+ * We report 0 for the sense length, because we aren't doing
+ * autosense in this case. We're reporting sense as parameter data.
+ */
+ ctsio->sense_len = 0;
+ ctsio->be_move_done = ctl_config_move_done;
+ ctl_datamove((union ctl_io *)ctsio);
+
+ return (CTL_RETVAL_COMPLETE);
+}
+
+int
+ctl_tur(struct ctl_scsiio *ctsio)
+{
+ struct ctl_lun *lun;
+
+ lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
+
+ CTL_DEBUG_PRINT(("ctl_tur\n"));
+
+ if (lun == NULL)
+ return (-EINVAL);
+
+ ctsio->scsi_status = SCSI_STATUS_OK;
+ ctsio->io_hdr.status = CTL_SUCCESS;
+
+ ctl_done((union ctl_io *)ctsio);
+
+ return (CTL_RETVAL_COMPLETE);
+}
+
+#ifdef notyet
+static int
+ctl_cmddt_inquiry(struct ctl_scsiio *ctsio)
+{
+
+}
+#endif
+
+static int
+ctl_inquiry_evpd_supported(struct ctl_scsiio *ctsio, int alloc_len)
+{
+ struct scsi_vpd_supported_pages *pages;
+ int sup_page_size;
+ struct ctl_lun *lun;
+
+ lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
+
+ sup_page_size = sizeof(struct scsi_vpd_supported_pages) +
+ SCSI_EVPD_NUM_SUPPORTED_PAGES;
+ /*
+ * XXX KDM GFP_??? We probably don't want to wait here,
+ * unless we end up having a process/thread context.
+ */
+ ctsio->kern_data_ptr = malloc(sup_page_size, M_CTL, M_WAITOK);
+ if (ctsio->kern_data_ptr == NULL) {
+ ctsio->io_hdr.status = CTL_SCSI_ERROR;
+ ctsio->scsi_status = SCSI_STATUS_BUSY;
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+ pages = (struct scsi_vpd_supported_pages *)ctsio->kern_data_ptr;
+ ctsio->kern_sg_entries = 0;
+
+ if (sup_page_size < alloc_len) {
+ ctsio->residual = alloc_len - sup_page_size;
+ ctsio->kern_data_len = sup_page_size;
+ ctsio->kern_total_len = sup_page_size;
+ } else {
+ ctsio->residual = 0;
+ ctsio->kern_data_len = alloc_len;
+ ctsio->kern_total_len = alloc_len;
+ }
+ ctsio->kern_data_resid = 0;
+ ctsio->kern_rel_offset = 0;
+ ctsio->kern_sg_entries = 0;
+
+ memset(pages, 0, sup_page_size);
+
+ /*
+ * The control device is always connected. The disk device, on the
+ * other hand, may not be online all the time. Need to change this
+ * to figure out whether the disk device is actually online or not.
+ */
+ if (lun != NULL)
+ pages->device = (SID_QUAL_LU_CONNECTED << 5) |
+ lun->be_lun->lun_type;
+ else
+ pages->device = (SID_QUAL_LU_OFFLINE << 5) | T_DIRECT;
+
+ pages->length = SCSI_EVPD_NUM_SUPPORTED_PAGES;
+ /* Supported VPD pages */
+ pages->page_list[0] = SVPD_SUPPORTED_PAGES;
+ /* Serial Number */
+ pages->page_list[1] = SVPD_UNIT_SERIAL_NUMBER;
+ /* Device Identification */
+ pages->page_list[2] = SVPD_DEVICE_ID;
+
+ ctsio->scsi_status = SCSI_STATUS_OK;
+
+ ctsio->be_move_done = ctl_config_move_done;
+ ctl_datamove((union ctl_io *)ctsio);
+
+ return (CTL_RETVAL_COMPLETE);
+}
+
+static int
+ctl_inquiry_evpd_serial(struct ctl_scsiio *ctsio, int alloc_len)
+{
+ struct scsi_vpd_unit_serial_number *sn_ptr;
+ struct ctl_lun *lun;
+#ifndef CTL_USE_BACKEND_SN
+ char tmpstr[32];
+#endif
+
+ lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
+
+ /* XXX KDM which malloc flags here?? */
+ ctsio->kern_data_ptr = malloc(sizeof(*sn_ptr), M_CTL, M_WAITOK);
+ if (ctsio->kern_data_ptr == NULL) {
+ ctsio->io_hdr.status = CTL_SCSI_ERROR;
+ ctsio->scsi_status = SCSI_STATUS_BUSY;
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+ sn_ptr = (struct scsi_vpd_unit_serial_number *)ctsio->kern_data_ptr;
+ ctsio->kern_sg_entries = 0;
+
+ if (sizeof(*sn_ptr) < alloc_len) {
+ ctsio->residual = alloc_len - sizeof(*sn_ptr);
+ ctsio->kern_data_len = sizeof(*sn_ptr);
+ ctsio->kern_total_len = sizeof(*sn_ptr);
+ } else {
+ ctsio->residual = 0;
+ ctsio->kern_data_len = alloc_len;
+ ctsio->kern_total_len = alloc_len;
+ }
+ ctsio->kern_data_resid = 0;
+ ctsio->kern_rel_offset = 0;
+ ctsio->kern_sg_entries = 0;
+
+ memset(sn_ptr, 0, sizeof(*sn_ptr));
+
+ /*
+ * The control device is always connected. The disk device, on the
+ * other hand, may not be online all the time. Need to change this
+ * to figure out whether the disk device is actually online or not.
+ */
+ if (lun != NULL)
+ sn_ptr->device = (SID_QUAL_LU_CONNECTED << 5) |
+ lun->be_lun->lun_type;
+ else
+ sn_ptr->device = (SID_QUAL_LU_OFFLINE << 5) | T_DIRECT;
+
+ sn_ptr->page_code = SVPD_UNIT_SERIAL_NUMBER;
+ sn_ptr->length = ctl_min(sizeof(*sn_ptr) - 4, CTL_SN_LEN);
+#ifdef CTL_USE_BACKEND_SN
+ /*
+ * If we don't have a LUN, we just leave the serial number as
+ * all spaces.
+ */
+ memset(sn_ptr->serial_num, 0x20, sizeof(sn_ptr->serial_num));
+ if (lun != NULL) {
+ strncpy((char *)sn_ptr->serial_num,
+ (char *)lun->be_lun->serial_num, CTL_SN_LEN);
+ }
+#else
+ /*
+ * Note that we're using a non-unique serial number here,
+ */
+ snprintf(tmpstr, sizeof(tmpstr), "MYSERIALNUMIS000");
+ memset(sn_ptr->serial_num, 0x20, sizeof(sn_ptr->serial_num));
+ strncpy(sn_ptr->serial_num, tmpstr, ctl_min(CTL_SN_LEN,
+ ctl_min(sizeof(tmpstr), sizeof(*sn_ptr) - 4)));
+#endif
+ ctsio->scsi_status = SCSI_STATUS_OK;
+
+ ctsio->be_move_done = ctl_config_move_done;
+ ctl_datamove((union ctl_io *)ctsio);
+
+ return (CTL_RETVAL_COMPLETE);
+}
+
+
+static int
+ctl_inquiry_evpd_devid(struct ctl_scsiio *ctsio, int alloc_len)
+{
+ struct scsi_vpd_device_id *devid_ptr;
+ struct scsi_vpd_id_descriptor *desc, *desc1;
+ struct scsi_vpd_id_descriptor *desc2, *desc3; /* for types 4h and 5h */
+ struct scsi_vpd_id_t10 *t10id;
+ struct ctl_softc *ctl_softc;
+ struct ctl_lun *lun;
+ struct ctl_frontend *fe;
+#ifndef CTL_USE_BACKEND_SN
+ char tmpstr[32];
+#endif /* CTL_USE_BACKEND_SN */
+ int devid_len;
+
+ ctl_softc = control_softc;
+ lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
+
+ devid_len = sizeof(struct scsi_vpd_device_id) +
+ sizeof(struct scsi_vpd_id_descriptor) +
+ sizeof(struct scsi_vpd_id_t10) + CTL_DEVID_LEN +
+ sizeof(struct scsi_vpd_id_descriptor) + CTL_WWPN_LEN +
+ sizeof(struct scsi_vpd_id_descriptor) +
+ sizeof(struct scsi_vpd_id_rel_trgt_port_id) +
+ sizeof(struct scsi_vpd_id_descriptor) +
+ sizeof(struct scsi_vpd_id_trgt_port_grp_id);
+
+ /* XXX KDM which malloc flags here ?? */
+ ctsio->kern_data_ptr = malloc(devid_len, M_CTL, M_WAITOK);
+ if (ctsio->kern_data_ptr == NULL) {
+ ctsio->io_hdr.status = CTL_SCSI_ERROR;
+ ctsio->scsi_status = SCSI_STATUS_BUSY;
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+ devid_ptr = (struct scsi_vpd_device_id *)ctsio->kern_data_ptr;
+ ctsio->kern_sg_entries = 0;
+
+ if (devid_len < alloc_len) {
+ ctsio->residual = alloc_len - devid_len;
+ ctsio->kern_data_len = devid_len;
+ ctsio->kern_total_len = devid_len;
+ } else {
+ ctsio->residual = 0;
+ ctsio->kern_data_len = alloc_len;
+ ctsio->kern_total_len = alloc_len;
+ }
+ ctsio->kern_data_resid = 0;
+ ctsio->kern_rel_offset = 0;
+ ctsio->kern_sg_entries = 0;
+
+ desc = (struct scsi_vpd_id_descriptor *)devid_ptr->desc_list;
+ t10id = (struct scsi_vpd_id_t10 *)&desc->identifier[0];
+ desc1 = (struct scsi_vpd_id_descriptor *)(&desc->identifier[0] +
+ sizeof(struct scsi_vpd_id_t10) + CTL_DEVID_LEN);
+ desc2 = (struct scsi_vpd_id_descriptor *)(&desc1->identifier[0] +
+ CTL_WWPN_LEN);
+ desc3 = (struct scsi_vpd_id_descriptor *)(&desc2->identifier[0] +
+ sizeof(struct scsi_vpd_id_rel_trgt_port_id));
+ memset(devid_ptr, 0, devid_len);
+
+ /*
+ * The control device is always connected. The disk device, on the
+ * other hand, may not be online all the time.
+ */
+ if (lun != NULL)
+ devid_ptr->device = (SID_QUAL_LU_CONNECTED << 5) |
+ lun->be_lun->lun_type;
+ else
+ devid_ptr->device = (SID_QUAL_LU_OFFLINE << 5) | T_DIRECT;
+
+ devid_ptr->page_code = SVPD_DEVICE_ID;
+
+ scsi_ulto2b(devid_len - 4, devid_ptr->length);
+
+ mtx_lock(&ctl_softc->ctl_lock);
+
+ fe = ctl_softc->ctl_ports[ctl_port_idx(ctsio->io_hdr.nexus.targ_port)];
+
+ /*
+ * For Fibre channel,
+ */
+ if (fe->port_type == CTL_PORT_FC)
+ {
+ desc->proto_codeset = (SCSI_PROTO_FC << 4) |
+ SVPD_ID_CODESET_ASCII;
+ desc1->proto_codeset = (SCSI_PROTO_FC << 4) |
+ SVPD_ID_CODESET_BINARY;
+ }
+ else
+ {
+ desc->proto_codeset = (SCSI_PROTO_SPI << 4) |
+ SVPD_ID_CODESET_ASCII;
+ desc1->proto_codeset = (SCSI_PROTO_SPI << 4) |
+ SVPD_ID_CODESET_BINARY;
+ }
+ desc2->proto_codeset = desc3->proto_codeset = desc1->proto_codeset;
+ mtx_unlock(&ctl_softc->ctl_lock);
+
+ /*
+ * We're using a LUN association here. i.e., this device ID is a
+ * per-LUN identifier.
+ */
+ desc->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_LUN | SVPD_ID_TYPE_T10;
+ desc->length = sizeof(*t10id) + CTL_DEVID_LEN;
+ strncpy((char *)t10id->vendor, CTL_VENDOR, sizeof(t10id->vendor));
+
+ /*
+ * desc1 is for the WWPN which is a port asscociation.
+ */
+ desc1->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_PORT | SVPD_ID_TYPE_NAA;
+ desc1->length = CTL_WWPN_LEN;
+ /* XXX Call Reggie's get_WWNN func here then add port # to the end */
+ /* For testing just create the WWPN */
+#if 0
+ ddb_GetWWNN((char *)desc1->identifier);
+
+ /* NOTE: if the port is 0 or 8 we don't want to subtract 1 */
+ /* This is so Copancontrol will return something sane */
+ if (ctsio->io_hdr.nexus.targ_port!=0 &&
+ ctsio->io_hdr.nexus.targ_port!=8)
+ desc1->identifier[7] += ctsio->io_hdr.nexus.targ_port-1;
+ else
+ desc1->identifier[7] += ctsio->io_hdr.nexus.targ_port;
+#endif
+
+ be64enc(desc1->identifier, fe->wwpn);
+
+ /*
+ * desc2 is for the Relative Target Port(type 4h) identifier
+ */
+ desc2->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_PORT
+ | SVPD_ID_TYPE_RELTARG;
+ desc2->length = 4;
+//#if 0
+ /* NOTE: if the port is 0 or 8 we don't want to subtract 1 */
+ /* This is so Copancontrol will return something sane */
+ if (ctsio->io_hdr.nexus.targ_port!=0 &&
+ ctsio->io_hdr.nexus.targ_port!=8)
+ desc2->identifier[3] = ctsio->io_hdr.nexus.targ_port - 1;
+ else
+ desc2->identifier[3] = ctsio->io_hdr.nexus.targ_port;
+//#endif
+
+ /*
+ * desc3 is for the Target Port Group(type 5h) identifier
+ */
+ desc3->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_PORT
+ | SVPD_ID_TYPE_TPORTGRP;
+ desc3->length = 4;
+ if (ctsio->io_hdr.nexus.targ_port < CTL_MAX_PORTS || ctl_is_single)
+ desc3->identifier[3] = 1;
+ else
+ desc3->identifier[3] = 2;
+
+#ifdef CTL_USE_BACKEND_SN
+ /*
+ * If we've actually got a backend, copy the device id from the
+ * per-LUN data. Otherwise, set it to all spaces.
+ */
+ if (lun != NULL) {
+ /*
+ * Copy the backend's LUN ID.
+ */
+ strncpy((char *)t10id->vendor_spec_id,
+ (char *)lun->be_lun->device_id, CTL_DEVID_LEN);
+ } else {
+ /*
+ * No backend, set this to spaces.
+ */
+ memset(t10id->vendor_spec_id, 0x20, CTL_DEVID_LEN);
+ }
+#else
+ snprintf(tmpstr, sizeof(tmpstr), "MYDEVICEIDIS%4d",
+ (lun != NULL) ? (int)lun->lun : 0);
+ strncpy(t10id->vendor_spec_id, tmpstr, ctl_min(CTL_DEVID_LEN,
+ sizeof(tmpstr)));
+#endif
+
+ ctsio->scsi_status = SCSI_STATUS_OK;
+
+ ctsio->be_move_done = ctl_config_move_done;
+ ctl_datamove((union ctl_io *)ctsio);
+
+ return (CTL_RETVAL_COMPLETE);
+}
+
+static int
+ctl_inquiry_evpd(struct ctl_scsiio *ctsio)
+{
+ struct scsi_inquiry *cdb;
+ int alloc_len, retval;
+
+ cdb = (struct scsi_inquiry *)ctsio->cdb;
+
+ retval = CTL_RETVAL_COMPLETE;
+
+ alloc_len = scsi_2btoul(cdb->length);
+
+ switch (cdb->page_code) {
+ case SVPD_SUPPORTED_PAGES:
+ retval = ctl_inquiry_evpd_supported(ctsio, alloc_len);
+ break;
+ case SVPD_UNIT_SERIAL_NUMBER:
+ retval = ctl_inquiry_evpd_serial(ctsio, alloc_len);
+ break;
+ case SVPD_DEVICE_ID:
+ retval = ctl_inquiry_evpd_devid(ctsio, alloc_len);
+ break;
+ default:
+ ctl_set_invalid_field(ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 1,
+ /*field*/ 2,
+ /*bit_valid*/ 0,
+ /*bit*/ 0);
+ ctl_done((union ctl_io *)ctsio);
+ retval = CTL_RETVAL_COMPLETE;
+ break;
+ }
+
+ return (retval);
+}
+
+static int
+ctl_inquiry_std(struct ctl_scsiio *ctsio)
+{
+ struct scsi_inquiry_data *inq_ptr;
+ struct scsi_inquiry *cdb;
+ struct ctl_softc *ctl_softc;
+ struct ctl_lun *lun;
+ uint32_t alloc_len;
+ int is_fc;
+
+ ctl_softc = control_softc;
+
+ /*
+ * Figure out whether we're talking to a Fibre Channel port or not.
+ * We treat the ioctl front end, and any SCSI adapters, as packetized
+ * SCSI front ends.
+ */
+ mtx_lock(&ctl_softc->ctl_lock);
+ if (ctl_softc->ctl_ports[ctl_port_idx(ctsio->io_hdr.nexus.targ_port)]->port_type !=
+ CTL_PORT_FC)
+ is_fc = 0;
+ else
+ is_fc = 1;
+ mtx_unlock(&ctl_softc->ctl_lock);
+
+ lun = ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
+ cdb = (struct scsi_inquiry *)ctsio->cdb;
+ alloc_len = scsi_2btoul(cdb->length);
+
+ /*
+ * We malloc the full inquiry data size here and fill it
+ * in. If the user only asks for less, we'll give him
+ * that much.
+ */
+ /* XXX KDM what malloc flags should we use here?? */
+ ctsio->kern_data_ptr = malloc(sizeof(*inq_ptr), M_CTL, M_WAITOK);
+ if (ctsio->kern_data_ptr == NULL) {
+ ctsio->io_hdr.status = CTL_SCSI_ERROR;
+ ctsio->scsi_status = SCSI_STATUS_BUSY;
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+ inq_ptr = (struct scsi_inquiry_data *)ctsio->kern_data_ptr;
+ ctsio->kern_sg_entries = 0;
+ ctsio->kern_data_resid = 0;
+ ctsio->kern_rel_offset = 0;
+
+ if (sizeof(*inq_ptr) < alloc_len) {
+ ctsio->residual = alloc_len - sizeof(*inq_ptr);
+ ctsio->kern_data_len = sizeof(*inq_ptr);
+ ctsio->kern_total_len = sizeof(*inq_ptr);
+ } else {
+ ctsio->residual = 0;
+ ctsio->kern_data_len = alloc_len;
+ ctsio->kern_total_len = alloc_len;
+ }
+
+ memset(inq_ptr, 0, sizeof(*inq_ptr));
+
+ /*
+ * The control device is always connected. The disk device, on the
+ * other hand, may not be online all the time. If we don't have a
+ * LUN mapping, we'll just say it's offline.
+ */
+ if (lun != NULL)
+ inq_ptr->device = (SID_QUAL_LU_CONNECTED << 5) |
+ lun->be_lun->lun_type;
+ else
+ inq_ptr->device = (SID_QUAL_LU_OFFLINE << 5) | T_DIRECT;
+
+ /* RMB in byte 2 is 0 */
+ inq_ptr->version = SCSI_REV_SPC3;
+
+ /*
+ * According to SAM-3, even if a device only supports a single
+ * level of LUN addressing, it should still set the HISUP bit:
+ *
+ * 4.9.1 Logical unit numbers overview
+ *
+ * All logical unit number formats described in this standard are
+ * hierarchical in structure even when only a single level in that
+ * hierarchy is used. The HISUP bit shall be set to one in the
+ * standard INQUIRY data (see SPC-2) when any logical unit number
+ * format described in this standard is used. Non-hierarchical
+ * formats are outside the scope of this standard.
+ *
+ * Therefore we set the HiSup bit here.
+ *
+ * The reponse format is 2, per SPC-3.
+ */
+ inq_ptr->response_format = SID_HiSup | 2;
+
+ inq_ptr->additional_length = sizeof(*inq_ptr) - 4;
+ CTL_DEBUG_PRINT(("additional_length = %d\n",
+ inq_ptr->additional_length));
+
+ inq_ptr->spc3_flags = SPC3_SID_TPGS_IMPLICIT;
+ /* 16 bit addressing */
+ if (is_fc == 0)
+ inq_ptr->spc2_flags = SPC2_SID_ADDR16;
+ /* XXX set the SID_MultiP bit here if we're actually going to
+ respond on multiple ports */
+ inq_ptr->spc2_flags |= SPC2_SID_MultiP;
+
+ /* 16 bit data bus, synchronous transfers */
+ /* XXX these flags don't apply for FC */
+ if (is_fc == 0)
+ inq_ptr->flags = SID_WBus16 | SID_Sync;
+ /*
+ * XXX KDM do we want to support tagged queueing on the control
+ * device at all?
+ */
+ if ((lun == NULL)
+ || (lun->be_lun->lun_type != T_PROCESSOR))
+ inq_ptr->flags |= SID_CmdQue;
+ /*
+ * Per SPC-3, unused bytes in ASCII strings are filled with spaces.
+ * We have 8 bytes for the vendor name, and 16 bytes for the device
+ * name and 4 bytes for the revision.
+ */
+ strncpy(inq_ptr->vendor, CTL_VENDOR, sizeof(inq_ptr->vendor));
+ if (lun == NULL) {
+ strcpy(inq_ptr->product, CTL_DIRECT_PRODUCT);
+ } else {
+ switch (lun->be_lun->lun_type) {
+ case T_DIRECT:
+ strcpy(inq_ptr->product, CTL_DIRECT_PRODUCT);
+ break;
+ case T_PROCESSOR:
+ strcpy(inq_ptr->product, CTL_PROCESSOR_PRODUCT);
+ break;
+ default:
+ strcpy(inq_ptr->product, CTL_UNKNOWN_PRODUCT);
+ break;
+ }
+ }
+
+ /*
+ * XXX make this a macro somewhere so it automatically gets
+ * incremented when we make changes.
+ */
+ strncpy(inq_ptr->revision, "0001", sizeof(inq_ptr->revision));
+
+ /*
+ * For parallel SCSI, we support double transition and single
+ * transition clocking. We also support QAS (Quick Arbitration
+ * and Selection) and Information Unit transfers on both the
+ * control and array devices.
+ */
+ if (is_fc == 0)
+ inq_ptr->spi3data = SID_SPI_CLOCK_DT_ST | SID_SPI_QAS |
+ SID_SPI_IUS;
+
+ /* SAM-3 */
+ scsi_ulto2b(0x0060, inq_ptr->version1);
+ /* SPC-3 (no version claimed) XXX should we claim a version? */
+ scsi_ulto2b(0x0300, inq_ptr->version2);
+ if (is_fc) {
+ /* FCP-2 ANSI INCITS.350:2003 */
+ scsi_ulto2b(0x0917, inq_ptr->version3);
+ } else {
+ /* SPI-4 ANSI INCITS.362:200x */
+ scsi_ulto2b(0x0B56, inq_ptr->version3);
+ }
+
+ if (lun == NULL) {
+ /* SBC-2 (no version claimed) XXX should we claim a version? */
+ scsi_ulto2b(0x0320, inq_ptr->version4);
+ } else {
+ switch (lun->be_lun->lun_type) {
+ case T_DIRECT:
+ /*
+ * SBC-2 (no version claimed) XXX should we claim a
+ * version?
+ */
+ scsi_ulto2b(0x0320, inq_ptr->version4);
+ break;
+ case T_PROCESSOR:
+ default:
+ break;
+ }
+ }
+ sprintf((char *)inq_ptr->vendor_specific1, "Copyright (C) 2004, COPAN "
+ "Systems, Inc. All Rights Reserved.");
+
+ ctsio->scsi_status = SCSI_STATUS_OK;
+ if (ctsio->kern_data_len > 0) {
+ ctsio->be_move_done = ctl_config_move_done;
+ ctl_datamove((union ctl_io *)ctsio);
+ } else {
+ ctsio->io_hdr.status = CTL_SUCCESS;
+ ctl_done((union ctl_io *)ctsio);
+ }
+
+ return (CTL_RETVAL_COMPLETE);
+}
+
+int
+ctl_inquiry(struct ctl_scsiio *ctsio)
+{
+ struct scsi_inquiry *cdb;
+ int retval;
+
+ cdb = (struct scsi_inquiry *)ctsio->cdb;
+
+ retval = 0;
+
+ CTL_DEBUG_PRINT(("ctl_inquiry\n"));
+
+ /*
+ * Right now, we don't support the CmdDt inquiry information.
+ * This would be nice to support in the future. When we do
+ * support it, we should change this test so that it checks to make
+ * sure SI_EVPD and SI_CMDDT aren't both set at the same time.
+ */
+#ifdef notyet
+ if (((cdb->byte2 & SI_EVPD)
+ && (cdb->byte2 & SI_CMDDT)))
+#endif
+ if (cdb->byte2 & SI_CMDDT) {
+ /*
+ * Point to the SI_CMDDT bit. We might change this
+ * when we support SI_CMDDT, but since both bits would be
+ * "wrong", this should probably just stay as-is then.
+ */
+ ctl_set_invalid_field(ctsio,
+ /*sks_valid*/ 1,
+ /*command*/ 1,
+ /*field*/ 1,
+ /*bit_valid*/ 1,
+ /*bit*/ 1);
+ ctl_done((union ctl_io *)ctsio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+ if (cdb->byte2 & SI_EVPD)
+ retval = ctl_inquiry_evpd(ctsio);
+#ifdef notyet
+ else if (cdb->byte2 & SI_CMDDT)
+ retval = ctl_inquiry_cmddt(ctsio);
+#endif
+ else
+ retval = ctl_inquiry_std(ctsio);
+
+ return (retval);
+}
+
+/*
+ * For known CDB types, parse the LBA and length.
+ */
+static int
+ctl_get_lba_len(union ctl_io *io, uint64_t *lba, uint32_t *len)
+{
+ if (io->io_hdr.io_type != CTL_IO_SCSI)
+ return (1);
+
+ switch (io->scsiio.cdb[0]) {
+ case READ_6:
+ case WRITE_6: {
+ struct scsi_rw_6 *cdb;
+
+ cdb = (struct scsi_rw_6 *)io->scsiio.cdb;
+
+ *lba = scsi_3btoul(cdb->addr);
+ /* only 5 bits are valid in the most significant address byte */
+ *lba &= 0x1fffff;
+ *len = cdb->length;
+ break;
+ }
+ case READ_10:
+ case WRITE_10: {
+ struct scsi_rw_10 *cdb;
+
+ cdb = (struct scsi_rw_10 *)io->scsiio.cdb;
+
+ *lba = scsi_4btoul(cdb->addr);
+ *len = scsi_2btoul(cdb->length);
+ break;
+ }
+ case WRITE_VERIFY_10: {
+ struct scsi_write_verify_10 *cdb;
+
+ cdb = (struct scsi_write_verify_10 *)io->scsiio.cdb;
+
+ *lba = scsi_4btoul(cdb->addr);
+ *len = scsi_2btoul(cdb->length);
+ break;
+ }
+ case READ_12:
+ case WRITE_12: {
+ struct scsi_rw_12 *cdb;
+
+ cdb = (struct scsi_rw_12 *)io->scsiio.cdb;
+
+ *lba = scsi_4btoul(cdb->addr);
+ *len = scsi_4btoul(cdb->length);
+ break;
+ }
+ case WRITE_VERIFY_12: {
+ struct scsi_write_verify_12 *cdb;
+
+ cdb = (struct scsi_write_verify_12 *)io->scsiio.cdb;
+
+ *lba = scsi_4btoul(cdb->addr);
+ *len = scsi_4btoul(cdb->length);
+ break;
+ }
+ case READ_16:
+ case WRITE_16: {
+ struct scsi_rw_16 *cdb;
+
+ cdb = (struct scsi_rw_16 *)io->scsiio.cdb;
+
+ *lba = scsi_8btou64(cdb->addr);
+ *len = scsi_4btoul(cdb->length);
+ break;
+ }
+ case WRITE_VERIFY_16: {
+ struct scsi_write_verify_16 *cdb;
+
+ cdb = (struct scsi_write_verify_16 *)io->scsiio.cdb;
+
+
+ *lba = scsi_8btou64(cdb->addr);
+ *len = scsi_4btoul(cdb->length);
+ break;
+ }
+ default:
+ return (1);
+ break; /* NOTREACHED */
+ }
+
+ return (0);
+}
+
+static ctl_action
+ctl_extent_check_lba(uint64_t lba1, uint32_t len1, uint64_t lba2, uint32_t len2)
+{
+ uint64_t endlba1, endlba2;
+
+ endlba1 = lba1 + len1 - 1;
+ endlba2 = lba2 + len2 - 1;
+
+ if ((endlba1 < lba2)
+ || (endlba2 < lba1))
+ return (CTL_ACTION_PASS);
+ else
+ return (CTL_ACTION_BLOCK);
+}
+
+static ctl_action
+ctl_extent_check(union ctl_io *io1, union ctl_io *io2)
+{
+ uint64_t lba1, lba2;
+ uint32_t len1, len2;
+ int retval;
+
+ retval = ctl_get_lba_len(io1, &lba1, &len1);
+ if (retval != 0)
+ return (CTL_ACTION_ERROR);
+
+ retval = ctl_get_lba_len(io2, &lba2, &len2);
+ if (retval != 0)
+ return (CTL_ACTION_ERROR);
+
+ return (ctl_extent_check_lba(lba1, len1, lba2, len2));
+}
+
+static ctl_action
+ctl_check_for_blockage(union ctl_io *pending_io, union ctl_io *ooa_io)
+{
+ struct ctl_cmd_entry *pending_entry, *ooa_entry;
+ ctl_serialize_action *serialize_row;
+
+ /*
+ * The initiator attempted multiple untagged commands at the same
+ * time. Can't do that.
+ */
+ if ((pending_io->scsiio.tag_type == CTL_TAG_UNTAGGED)
+ && (ooa_io->scsiio.tag_type == CTL_TAG_UNTAGGED)
+ && ((pending_io->io_hdr.nexus.targ_port ==
+ ooa_io->io_hdr.nexus.targ_port)
+ && (pending_io->io_hdr.nexus.initid.id ==
+ ooa_io->io_hdr.nexus.initid.id))
+ && ((ooa_io->io_hdr.flags & CTL_FLAG_ABORT) == 0))
+ return (CTL_ACTION_OVERLAP);
+
+ /*
+ * The initiator attempted to send multiple tagged commands with
+ * the same ID. (It's fine if different initiators have the same
+ * tag ID.)
+ *
+ * Even if all of those conditions are true, we don't kill the I/O
+ * if the command ahead of us has been aborted. We won't end up
+ * sending it to the FETD, and it's perfectly legal to resend a
+ * command with the same tag number as long as the previous
+ * instance of this tag number has been aborted somehow.
+ */
+ if ((pending_io->scsiio.tag_type != CTL_TAG_UNTAGGED)
+ && (ooa_io->scsiio.tag_type != CTL_TAG_UNTAGGED)
+ && (pending_io->scsiio.tag_num == ooa_io->scsiio.tag_num)
+ && ((pending_io->io_hdr.nexus.targ_port ==
+ ooa_io->io_hdr.nexus.targ_port)
+ && (pending_io->io_hdr.nexus.initid.id ==
+ ooa_io->io_hdr.nexus.initid.id))
+ && ((ooa_io->io_hdr.flags & CTL_FLAG_ABORT) == 0))
+ return (CTL_ACTION_OVERLAP_TAG);
+
+ /*
+ * If we get a head of queue tag, SAM-3 says that we should
+ * immediately execute it.
+ *
+ * What happens if this command would normally block for some other
+ * reason? e.g. a request sense with a head of queue tag
+ * immediately after a write. Normally that would block, but this
+ * will result in its getting executed immediately...
+ *
+ * We currently return "pass" instead of "skip", so we'll end up
+ * going through the rest of the queue to check for overlapped tags.
+ *
+ * XXX KDM check for other types of blockage first??
+ */
+ if (pending_io->scsiio.tag_type == CTL_TAG_HEAD_OF_QUEUE)
+ return (CTL_ACTION_PASS);
+
+ /*
+ * Ordered tags have to block until all items ahead of them
+ * have completed. If we get called with an ordered tag, we always
+ * block, if something else is ahead of us in the queue.
+ */
+ if (pending_io->scsiio.tag_type == CTL_TAG_ORDERED)
+ return (CTL_ACTION_BLOCK);
+
+ /*
+ * Simple tags get blocked until all head of queue and ordered tags
+ * ahead of them have completed. I'm lumping untagged commands in
+ * with simple tags here. XXX KDM is that the right thing to do?
+ */
+ if (((pending_io->scsiio.tag_type == CTL_TAG_UNTAGGED)
+ || (pending_io->scsiio.tag_type == CTL_TAG_SIMPLE))
+ && ((ooa_io->scsiio.tag_type == CTL_TAG_HEAD_OF_QUEUE)
+ || (ooa_io->scsiio.tag_type == CTL_TAG_ORDERED)))
+ return (CTL_ACTION_BLOCK);
+
+ pending_entry = &ctl_cmd_table[pending_io->scsiio.cdb[0]];
+ ooa_entry = &ctl_cmd_table[ooa_io->scsiio.cdb[0]];
+
+ serialize_row = ctl_serialize_table[ooa_entry->seridx];
+
+ switch (serialize_row[pending_entry->seridx]) {
+ case CTL_SER_BLOCK:
+ return (CTL_ACTION_BLOCK);
+ break; /* NOTREACHED */
+ case CTL_SER_EXTENT:
+ return (ctl_extent_check(pending_io, ooa_io));
+ break; /* NOTREACHED */
+ case CTL_SER_PASS:
+ return (CTL_ACTION_PASS);
+ break; /* NOTREACHED */
+ case CTL_SER_SKIP:
+ return (CTL_ACTION_SKIP);
+ break;
+ default:
+ panic("invalid serialization value %d",
+ serialize_row[pending_entry->seridx]);
+ break; /* NOTREACHED */
+ }
+
+ return (CTL_ACTION_ERROR);
+}
+
+/*
+ * Check for blockage or overlaps against the OOA (Order Of Arrival) queue.
+ * Assumptions:
+ * - caller holds ctl_lock
+ * - pending_io is generally either incoming, or on the blocked queue
+ * - starting I/O is the I/O we want to start the check with.
+ */
+static ctl_action
+ctl_check_ooa(struct ctl_lun *lun, union ctl_io *pending_io,
+ union ctl_io *starting_io)
+{
+ union ctl_io *ooa_io;
+ ctl_action action;
+
+ /*
+ * Run back along the OOA queue, starting with the current
+ * blocked I/O and going through every I/O before it on the
+ * queue. If starting_io is NULL, we'll just end up returning
+ * CTL_ACTION_PASS.
+ */
+ for (ooa_io = starting_io; ooa_io != NULL;
+ ooa_io = (union ctl_io *)TAILQ_PREV(&ooa_io->io_hdr, ctl_ooaq,
+ ooa_links)){
+
+ /*
+ * This routine just checks to see whether
+ * cur_blocked is blocked by ooa_io, which is ahead
+ * of it in the queue. It doesn't queue/dequeue
+ * cur_blocked.
+ */
+ action = ctl_check_for_blockage(pending_io, ooa_io);
+ switch (action) {
+ case CTL_ACTION_BLOCK:
+ case CTL_ACTION_OVERLAP:
+ case CTL_ACTION_OVERLAP_TAG:
+ case CTL_ACTION_SKIP:
+ case CTL_ACTION_ERROR:
+ return (action);
+ break; /* NOTREACHED */
+ case CTL_ACTION_PASS:
+ break;
+ default:
+ panic("invalid action %d", action);
+ break; /* NOTREACHED */
+ }
+ }
+
+ return (CTL_ACTION_PASS);
+}
+
+/*
+ * Assumptions:
+ * - An I/O has just completed, and has been removed from the per-LUN OOA
+ * queue, so some items on the blocked queue may now be unblocked.
+ * - The caller holds ctl_softc->ctl_lock
+ */
+static int
+ctl_check_blocked(struct ctl_lun *lun)
+{
+ union ctl_io *cur_blocked, *next_blocked;
+
+ /*
+ * Run forward from the head of the blocked queue, checking each
+ * entry against the I/Os prior to it on the OOA queue to see if
+ * there is still any blockage.
+ *
+ * We cannot use the TAILQ_FOREACH() macro, because it can't deal
+ * with our removing a variable on it while it is traversing the
+ * list.
+ */
+ for (cur_blocked = (union ctl_io *)TAILQ_FIRST(&lun->blocked_queue);
+ cur_blocked != NULL; cur_blocked = next_blocked) {
+ union ctl_io *prev_ooa;
+ ctl_action action;
+
+ next_blocked = (union ctl_io *)TAILQ_NEXT(&cur_blocked->io_hdr,
+ blocked_links);
+
+ prev_ooa = (union ctl_io *)TAILQ_PREV(&cur_blocked->io_hdr,
+ ctl_ooaq, ooa_links);
+
+ /*
+ * If cur_blocked happens to be the first item in the OOA
+ * queue now, prev_ooa will be NULL, and the action
+ * returned will just be CTL_ACTION_PASS.
+ */
+ action = ctl_check_ooa(lun, cur_blocked, prev_ooa);
+
+ switch (action) {
+ case CTL_ACTION_BLOCK:
+ /* Nothing to do here, still blocked */
+ break;
+ case CTL_ACTION_OVERLAP:
+ case CTL_ACTION_OVERLAP_TAG:
+ /*
+ * This shouldn't happen! In theory we've already
+ * checked this command for overlap...
+ */
+ break;
+ case CTL_ACTION_PASS:
+ case CTL_ACTION_SKIP: {
+ struct ctl_softc *softc;
+ struct ctl_cmd_entry *entry;
+ uint32_t initidx;
+ uint8_t opcode;
+ int isc_retval;
+
+ /*
+ * The skip case shouldn't happen, this transaction
+ * should have never made it onto the blocked queue.
+ */
+ /*
+ * This I/O is no longer blocked, we can remove it
+ * from the blocked queue. Since this is a TAILQ
+ * (doubly linked list), we can do O(1) removals
+ * from any place on the list.
+ */
+ TAILQ_REMOVE(&lun->blocked_queue, &cur_blocked->io_hdr,
+ blocked_links);
+ cur_blocked->io_hdr.flags &= ~CTL_FLAG_BLOCKED;
+
+ if (cur_blocked->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC){
+ /*
+ * Need to send IO back to original side to
+ * run
+ */
+ union ctl_ha_msg msg_info;
+
+ msg_info.hdr.original_sc =
+ cur_blocked->io_hdr.original_sc;
+ msg_info.hdr.serializing_sc = cur_blocked;
+ msg_info.hdr.msg_type = CTL_MSG_R2R;
+ if ((isc_retval=ctl_ha_msg_send(CTL_HA_CHAN_CTL,
+ &msg_info, sizeof(msg_info), 0)) >
+ CTL_HA_STATUS_SUCCESS) {
+ printf("CTL:Check Blocked error from "
+ "ctl_ha_msg_send %d\n",
+ isc_retval);
+ }
+ break;
+ }
+ opcode = cur_blocked->scsiio.cdb[0];
+ entry = &ctl_cmd_table[opcode];
+ softc = control_softc;
+
+ initidx = ctl_get_initindex(&cur_blocked->io_hdr.nexus);
+
+ /*
+ * Check this I/O for LUN state changes that may
+ * have happened while this command was blocked.
+ * The LUN state may have been changed by a command
+ * ahead of us in the queue, so we need to re-check
+ * for any states that can be caused by SCSI
+ * commands.
+ */
+ if (ctl_scsiio_lun_check(softc, lun, entry,
+ &cur_blocked->scsiio) == 0) {
+ cur_blocked->io_hdr.flags |=
+ CTL_FLAG_IS_WAS_ON_RTR;
+ STAILQ_INSERT_TAIL(&lun->ctl_softc->rtr_queue,
+ &cur_blocked->io_hdr, links);
+ /*
+ * In the non CTL_DONE_THREAD case, we need
+ * to wake up the work thread here. When
+ * we're processing completed requests from
+ * the work thread context, we'll pop back
+ * around and end up pulling things off the
+ * RtR queue. When we aren't processing
+ * things from the work thread context,
+ * though, we won't ever check the RtR queue.
+ * So we need to wake up the thread to clear
+ * things off the queue. Otherwise this
+ * transaction will just sit on the RtR queue
+ * until a new I/O comes in. (Which may or
+ * may not happen...)
+ */
+#ifndef CTL_DONE_THREAD
+ ctl_wakeup_thread();
+#endif
+ } else
+ ctl_done_lock(cur_blocked, /*have_lock*/ 1);
+ break;
+ }
+ default:
+ /*
+ * This probably shouldn't happen -- we shouldn't
+ * get CTL_ACTION_ERROR, or anything else.
+ */
+ break;
+ }
+ }
+
+ return (CTL_RETVAL_COMPLETE);
+}
+
+/*
+ * This routine (with one exception) checks LUN flags that can be set by
+ * commands ahead of us in the OOA queue. These flags have to be checked
+ * when a command initially comes in, and when we pull a command off the
+ * blocked queue and are preparing to execute it. The reason we have to
+ * check these flags for commands on the blocked queue is that the LUN
+ * state may have been changed by a command ahead of us while we're on the
+ * blocked queue.
+ *
+ * Ordering is somewhat important with these checks, so please pay
+ * careful attention to the placement of any new checks.
+ */
+static int
+ctl_scsiio_lun_check(struct ctl_softc *ctl_softc, struct ctl_lun *lun,
+ struct ctl_cmd_entry *entry, struct ctl_scsiio *ctsio)
+{
+ int retval;
+
+ retval = 0;
+
+ /*
+ * If this shelf is a secondary shelf controller, we have to reject
+ * any media access commands.
+ */
+#if 0
+ /* No longer needed for HA */
+ if (((ctl_softc->flags & CTL_FLAG_MASTER_SHELF) == 0)
+ && ((entry->flags & CTL_CMD_FLAG_OK_ON_SECONDARY) == 0)) {
+ ctl_set_lun_standby(ctsio);
+ retval = 1;
+ goto bailout;
+ }
+#endif
+
+ /*
+ * Check for a reservation conflict. If this command isn't allowed
+ * even on reserved LUNs, and if this initiator isn't the one who
+ * reserved us, reject the command with a reservation conflict.
+ */
+ if ((lun->flags & CTL_LUN_RESERVED)
+ && ((entry->flags & CTL_CMD_FLAG_ALLOW_ON_RESV) == 0)) {
+ if ((ctsio->io_hdr.nexus.initid.id != lun->rsv_nexus.initid.id)
+ || (ctsio->io_hdr.nexus.targ_port != lun->rsv_nexus.targ_port)
+ || (ctsio->io_hdr.nexus.targ_target.id !=
+ lun->rsv_nexus.targ_target.id)) {
+ ctsio->scsi_status = SCSI_STATUS_RESERV_CONFLICT;
+ ctsio->io_hdr.status = CTL_SCSI_ERROR;
+ retval = 1;
+ goto bailout;
+ }
+ }
+
+ if ( (lun->flags & CTL_LUN_PR_RESERVED)
+ && ((entry->flags & CTL_CMD_FLAG_ALLOW_ON_PR_RESV) == 0)) {
+ uint32_t residx;
+
+ residx = ctl_get_resindex(&ctsio->io_hdr.nexus);
+ /*
+ * if we aren't registered or it's a res holder type
+ * reservation and this isn't the res holder then set a
+ * conflict.
+ * NOTE: Commands which might be allowed on write exclusive
+ * type reservations are checked in the particular command
+ * for a conflict. Read and SSU are the only ones.
+ */
+ if (!lun->per_res[residx].registered
+ || (residx != lun->pr_res_idx && lun->res_type < 4)) {
+ ctsio->scsi_status = SCSI_STATUS_RESERV_CONFLICT;
+ ctsio->io_hdr.status = CTL_SCSI_ERROR;
+ retval = 1;
+ goto bailout;
+ }
+
+ }
+
+ if ((lun->flags & CTL_LUN_OFFLINE)
+ && ((entry->flags & CTL_CMD_FLAG_OK_ON_OFFLINE) == 0)) {
+ ctl_set_lun_not_ready(ctsio);
+ retval = 1;
+ goto bailout;
+ }
+
+ /*
+ * If the LUN is stopped, see if this particular command is allowed
+ * for a stopped lun. Otherwise, reject it with 0x04,0x02.
+ */
+ if ((lun->flags & CTL_LUN_STOPPED)
+ && ((entry->flags & CTL_CMD_FLAG_OK_ON_STOPPED) == 0)) {
+ /* "Logical unit not ready, initializing cmd. required" */
+ ctl_set_lun_stopped(ctsio);
+ retval = 1;
+ goto bailout;
+ }
+
+ if ((lun->flags & CTL_LUN_INOPERABLE)
+ && ((entry->flags & CTL_CMD_FLAG_OK_ON_INOPERABLE) == 0)) {
+ /* "Medium format corrupted" */
+ ctl_set_medium_format_corrupted(ctsio);
+ retval = 1;
+ goto bailout;
+ }
+
+bailout:
+ return (retval);
+
+}
+
+static void
+ctl_failover_io(union ctl_io *io, int have_lock)
+{
+ ctl_set_busy(&io->scsiio);
+ ctl_done_lock(io, have_lock);
+}
+
+static void
+ctl_failover(void)
+{
+ struct ctl_lun *lun;
+ struct ctl_softc *ctl_softc;
+ union ctl_io *next_io, *pending_io;
+ union ctl_io *io;
+ int lun_idx;
+ int i;
+
+ ctl_softc = control_softc;
+
+ mtx_lock(&ctl_softc->ctl_lock);
+ /*
+ * Remove any cmds from the other SC from the rtr queue. These
+ * will obviously only be for LUNs for which we're the primary.
+ * We can't send status or get/send data for these commands.
+ * Since they haven't been executed yet, we can just remove them.
+ * We'll either abort them or delete them below, depending on
+ * which HA mode we're in.
+ */
+ for (io = (union ctl_io *)STAILQ_FIRST(&ctl_softc->rtr_queue);
+ io != NULL; io = next_io) {
+ next_io = (union ctl_io *)STAILQ_NEXT(&io->io_hdr, links);
+ if (io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC)
+ STAILQ_REMOVE(&ctl_softc->rtr_queue, &io->io_hdr,
+ ctl_io_hdr, links);
+ }
+
+ for (lun_idx=0; lun_idx < ctl_softc->num_luns; lun_idx++) {
+ lun = ctl_softc->ctl_luns[lun_idx];
+ if (lun==NULL)
+ continue;
+
+ /*
+ * Processor LUNs are primary on both sides.
+ * XXX will this always be true?
+ */
+ if (lun->be_lun->lun_type == T_PROCESSOR)
+ continue;
+
+ if ((lun->flags & CTL_LUN_PRIMARY_SC)
+ && (ctl_softc->ha_mode == CTL_HA_MODE_SER_ONLY)) {
+ printf("FAILOVER: primary lun %d\n", lun_idx);
+ /*
+ * Remove all commands from the other SC. First from the
+ * blocked queue then from the ooa queue. Once we have
+ * removed them. Call ctl_check_blocked to see if there
+ * is anything that can run.
+ */
+ for (io = (union ctl_io *)TAILQ_FIRST(
+ &lun->blocked_queue); io != NULL; io = next_io) {
+
+ next_io = (union ctl_io *)TAILQ_NEXT(
+ &io->io_hdr, blocked_links);
+
+ if (io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC) {
+ TAILQ_REMOVE(&lun->blocked_queue,
+ &io->io_hdr,blocked_links);
+ io->io_hdr.flags &= ~CTL_FLAG_BLOCKED;
+ TAILQ_REMOVE(&lun->ooa_queue,
+ &io->io_hdr, ooa_links);
+
+ ctl_free_io_internal(io, 1);
+ }
+ }
+
+ for (io = (union ctl_io *)TAILQ_FIRST(&lun->ooa_queue);
+ io != NULL; io = next_io) {
+
+ next_io = (union ctl_io *)TAILQ_NEXT(
+ &io->io_hdr, ooa_links);
+
+ if (io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC) {
+
+ TAILQ_REMOVE(&lun->ooa_queue,
+ &io->io_hdr,
+ ooa_links);
+
+ ctl_free_io_internal(io, 1);
+ }
+ }
+ ctl_check_blocked(lun);
+ } else if ((lun->flags & CTL_LUN_PRIMARY_SC)
+ && (ctl_softc->ha_mode == CTL_HA_MODE_XFER)) {
+
+ printf("FAILOVER: primary lun %d\n", lun_idx);
+ /*
+ * Abort all commands from the other SC. We can't
+ * send status back for them now. These should get
+ * cleaned up when they are completed or come out
+ * for a datamove operation.
+ */
+ for (io = (union ctl_io *)TAILQ_FIRST(&lun->ooa_queue);
+ io != NULL; io = next_io) {
+ next_io = (union ctl_io *)TAILQ_NEXT(
+ &io->io_hdr, ooa_links);
+
+ if (io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC)
+ io->io_hdr.flags |= CTL_FLAG_ABORT;
+ }
+ } else if (((lun->flags & CTL_LUN_PRIMARY_SC) == 0)
+ && (ctl_softc->ha_mode == CTL_HA_MODE_XFER)) {
+
+ printf("FAILOVER: secondary lun %d\n", lun_idx);
+
+ lun->flags |= CTL_LUN_PRIMARY_SC;
+
+ /*
+ * We send all I/O that was sent to this controller
+ * and redirected to the other side back with
+ * busy status, and have the initiator retry it.
+ * Figuring out how much data has been transferred,
+ * etc. and picking up where we left off would be
+ * very tricky.
+ *
+ * XXX KDM need to remove I/O from the blocked
+ * queue as well!
+ */
+ for (pending_io = (union ctl_io *)TAILQ_FIRST(
+ &lun->ooa_queue); pending_io != NULL;
+ pending_io = next_io) {
+
+ next_io = (union ctl_io *)TAILQ_NEXT(
+ &pending_io->io_hdr, ooa_links);
+
+ pending_io->io_hdr.flags &=
+ ~CTL_FLAG_SENT_2OTHER_SC;
+
+ if (pending_io->io_hdr.flags &
+ CTL_FLAG_IO_ACTIVE) {
+ pending_io->io_hdr.flags |=
+ CTL_FLAG_FAILOVER;
+ } else {
+ ctl_set_busy(&pending_io->scsiio);
+ ctl_done_lock(pending_io,
+ /*have_lock*/1);
+ }
+ }
+
+ /*
+ * Build Unit Attention
+ */
+ for (i = 0; i < CTL_MAX_INITIATORS; i++) {
+ lun->pending_sense[i].ua_pending |=
+ CTL_UA_ASYM_ACC_CHANGE;
+ }
+ } else if (((lun->flags & CTL_LUN_PRIMARY_SC) == 0)
+ && (ctl_softc->ha_mode == CTL_HA_MODE_SER_ONLY)) {
+ printf("FAILOVER: secondary lun %d\n", lun_idx);
+ /*
+ * if the first io on the OOA is not on the RtR queue
+ * add it.
+ */
+ lun->flags |= CTL_LUN_PRIMARY_SC;
+
+ pending_io = (union ctl_io *)TAILQ_FIRST(
+ &lun->ooa_queue);
+ if (pending_io==NULL) {
+ printf("Nothing on OOA queue\n");
+ continue;
+ }
+
+ pending_io->io_hdr.flags &= ~CTL_FLAG_SENT_2OTHER_SC;
+ if ((pending_io->io_hdr.flags &
+ CTL_FLAG_IS_WAS_ON_RTR) == 0) {
+ pending_io->io_hdr.flags |=
+ CTL_FLAG_IS_WAS_ON_RTR;
+ STAILQ_INSERT_TAIL(&ctl_softc->rtr_queue,
+ &pending_io->io_hdr, links);
+ }
+#if 0
+ else
+ {
+ printf("Tag 0x%04x is running\n",
+ pending_io->scsiio.tag_num);
+ }
+#endif
+
+ next_io = (union ctl_io *)TAILQ_NEXT(
+ &pending_io->io_hdr, ooa_links);
+ for (pending_io=next_io; pending_io != NULL;
+ pending_io = next_io) {
+ pending_io->io_hdr.flags &=
+ ~CTL_FLAG_SENT_2OTHER_SC;
+ next_io = (union ctl_io *)TAILQ_NEXT(
+ &pending_io->io_hdr, ooa_links);
+ if (pending_io->io_hdr.flags &
+ CTL_FLAG_IS_WAS_ON_RTR) {
+#if 0
+ printf("Tag 0x%04x is running\n",
+ pending_io->scsiio.tag_num);
+#endif
+ continue;
+ }
+
+ switch (ctl_check_ooa(lun, pending_io,
+ (union ctl_io *)TAILQ_PREV(
+ &pending_io->io_hdr, ctl_ooaq,
+ ooa_links))) {
+
+ case CTL_ACTION_BLOCK:
+ TAILQ_INSERT_TAIL(&lun->blocked_queue,
+ &pending_io->io_hdr,
+ blocked_links);
+ pending_io->io_hdr.flags |=
+ CTL_FLAG_BLOCKED;
+ break;
+ case CTL_ACTION_PASS:
+ case CTL_ACTION_SKIP:
+ pending_io->io_hdr.flags |=
+ CTL_FLAG_IS_WAS_ON_RTR;
+ STAILQ_INSERT_TAIL(
+ &ctl_softc->rtr_queue,
+ &pending_io->io_hdr, links);
+ break;
+ case CTL_ACTION_OVERLAP:
+ ctl_set_overlapped_cmd(
+ (struct ctl_scsiio *)pending_io);
+ ctl_done_lock(pending_io,
+ /*have_lock*/ 1);
+ break;
+ case CTL_ACTION_OVERLAP_TAG:
+ ctl_set_overlapped_tag(
+ (struct ctl_scsiio *)pending_io,
+ pending_io->scsiio.tag_num & 0xff);
+ ctl_done_lock(pending_io,
+ /*have_lock*/ 1);
+ break;
+ case CTL_ACTION_ERROR:
+ default:
+ ctl_set_internal_failure(
+ (struct ctl_scsiio *)pending_io,
+ 0, // sks_valid
+ 0); //retry count
+ ctl_done_lock(pending_io,
+ /*have_lock*/ 1);
+ break;
+ }
+ }
+
+ /*
+ * Build Unit Attention
+ */
+ for (i = 0; i < CTL_MAX_INITIATORS; i++) {
+ lun->pending_sense[i].ua_pending |=
+ CTL_UA_ASYM_ACC_CHANGE;
+ }
+ } else {
+ panic("Unhandled HA mode failover, LUN flags = %#x, "
+ "ha_mode = #%x", lun->flags, ctl_softc->ha_mode);
+ }
+ }
+ ctl_pause_rtr = 0;
+ mtx_unlock(&ctl_softc->ctl_lock);
+}
+
+static int
+ctl_scsiio_precheck(struct ctl_softc *ctl_softc, struct ctl_scsiio *ctsio)
+{
+ struct ctl_lun *lun;
+ struct ctl_cmd_entry *entry;
+ uint8_t opcode;
+ uint32_t initidx;
+ int retval;
+
+ retval = 0;
+
+ lun = NULL;
+
+ opcode = ctsio->cdb[0];
+
+ mtx_lock(&ctl_softc->ctl_lock);
+
+ if ((ctsio->io_hdr.nexus.targ_lun < CTL_MAX_LUNS)
+ && (ctl_softc->ctl_luns[ctsio->io_hdr.nexus.targ_lun] != NULL)) {
+ lun = ctl_softc->ctl_luns[ctsio->io_hdr.nexus.targ_lun];
+ /*
+ * If the LUN is invalid, pretend that it doesn't exist.
+ * It will go away as soon as all pending I/O has been
+ * completed.
+ */
+ if (lun->flags & CTL_LUN_DISABLED) {
+ lun = NULL;
+ } else {
+ ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr = lun;
+ ctsio->io_hdr.ctl_private[CTL_PRIV_BACKEND_LUN].ptr =
+ lun->be_lun;
+ if (lun->be_lun->lun_type == T_PROCESSOR) {
+ ctsio->io_hdr.flags |= CTL_FLAG_CONTROL_DEV;
+ }
+ }
+ } else {
+ ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr = NULL;
+ ctsio->io_hdr.ctl_private[CTL_PRIV_BACKEND_LUN].ptr = NULL;
+ }
+
+ entry = &ctl_cmd_table[opcode];
+
+ ctsio->io_hdr.flags &= ~CTL_FLAG_DATA_MASK;
+ ctsio->io_hdr.flags |= entry->flags & CTL_FLAG_DATA_MASK;
+
+ /*
+ * Check to see whether we can send this command to LUNs that don't
+ * exist. This should pretty much only be the case for inquiry
+ * and request sense. Further checks, below, really require having
+ * a LUN, so we can't really check the command anymore. Just put
+ * it on the rtr queue.
+ */
+ if (lun == NULL) {
+ if (entry->flags & CTL_CMD_FLAG_OK_ON_ALL_LUNS)
+ goto queue_rtr;
+
+ ctl_set_unsupported_lun(ctsio);
+ mtx_unlock(&ctl_softc->ctl_lock);
+ ctl_done((union ctl_io *)ctsio);
+ goto bailout;
+ } else {
+ /*
+ * Every I/O goes into the OOA queue for a particular LUN, and
+ * stays there until completion.
+ */
+ TAILQ_INSERT_TAIL(&lun->ooa_queue, &ctsio->io_hdr, ooa_links);
+
+ /*
+ * Make sure we support this particular command on this LUN.
+ * e.g., we don't support writes to the control LUN.
+ */
+ switch (lun->be_lun->lun_type) {
+ case T_PROCESSOR:
+ if (((entry->flags & CTL_CMD_FLAG_OK_ON_PROC) == 0)
+ && ((entry->flags & CTL_CMD_FLAG_OK_ON_ALL_LUNS)
+ == 0)) {
+ ctl_set_invalid_opcode(ctsio);
+ mtx_unlock(&ctl_softc->ctl_lock);
+ ctl_done((union ctl_io *)ctsio);
+ goto bailout;
+ }
+ break;
+ case T_DIRECT:
+ if (((entry->flags & CTL_CMD_FLAG_OK_ON_SLUN) == 0)
+ && ((entry->flags & CTL_CMD_FLAG_OK_ON_ALL_LUNS)
+ == 0)){
+ ctl_set_invalid_opcode(ctsio);
+ mtx_unlock(&ctl_softc->ctl_lock);
+ ctl_done((union ctl_io *)ctsio);
+ goto bailout;
+ }
+ break;
+ default:
+ printf("Unsupported CTL LUN type %d\n",
+ lun->be_lun->lun_type);
+ panic("Unsupported CTL LUN type %d\n",
+ lun->be_lun->lun_type);
+ break; /* NOTREACHED */
+ }
+ }
+
+ initidx = ctl_get_initindex(&ctsio->io_hdr.nexus);
+
+ /*
+ * If we've got a request sense, it'll clear the contingent
+ * allegiance condition. Otherwise, if we have a CA condition for
+ * this initiator, clear it, because it sent down a command other
+ * than request sense.
+ */
+ if ((opcode != REQUEST_SENSE)
+ && (ctl_is_set(lun->have_ca, initidx)))
+ ctl_clear_mask(lun->have_ca, initidx);
+
+ /*
+ * If the command has this flag set, it handles its own unit
+ * attention reporting, we shouldn't do anything. Otherwise we
+ * check for any pending unit attentions, and send them back to the
+ * initiator. We only do this when a command initially comes in,
+ * not when we pull it off the blocked queue.
+ *
+ * According to SAM-3, section 5.3.2, the order that things get
+ * presented back to the host is basically unit attentions caused
+ * by some sort of reset event, busy status, reservation conflicts
+ * or task set full, and finally any other status.
+ *
+ * One issue here is that some of the unit attentions we report
+ * don't fall into the "reset" category (e.g. "reported luns data
+ * has changed"). So reporting it here, before the reservation
+ * check, may be technically wrong. I guess the only thing to do
+ * would be to check for and report the reset events here, and then
+ * check for the other unit attention types after we check for a
+ * reservation conflict.
+ *
+ * XXX KDM need to fix this
+ */
+ if ((entry->flags & CTL_CMD_FLAG_NO_SENSE) == 0) {
+ ctl_ua_type ua_type;
+
+ ua_type = lun->pending_sense[initidx].ua_pending;
+ if (ua_type != CTL_UA_NONE) {
+ scsi_sense_data_type sense_format;
+
+ if (lun != NULL)
+ sense_format = (lun->flags &
+ CTL_LUN_SENSE_DESC) ? SSD_TYPE_DESC :
+ SSD_TYPE_FIXED;
+ else
+ sense_format = SSD_TYPE_FIXED;
+
+ ua_type = ctl_build_ua(ua_type, &ctsio->sense_data,
+ sense_format);
+ if (ua_type != CTL_UA_NONE) {
+ ctsio->scsi_status = SCSI_STATUS_CHECK_COND;
+ ctsio->io_hdr.status = CTL_SCSI_ERROR |
+ CTL_AUTOSENSE;
+ ctsio->sense_len = SSD_FULL_SIZE;
+ lun->pending_sense[initidx].ua_pending &=
+ ~ua_type;
+ mtx_unlock(&ctl_softc->ctl_lock);
+ ctl_done((union ctl_io *)ctsio);
+ goto bailout;
+ }
+ }
+ }
+
+
+ if (ctl_scsiio_lun_check(ctl_softc, lun, entry, ctsio) != 0) {
+ mtx_unlock(&ctl_softc->ctl_lock);
+ ctl_done((union ctl_io *)ctsio);
+ goto bailout;
+ }
+
+ /*
+ * XXX CHD this is where we want to send IO to other side if
+ * this LUN is secondary on this SC. We will need to make a copy
+ * of the IO and flag the IO on this side as SENT_2OTHER and the flag
+ * the copy we send as FROM_OTHER.
+ * We also need to stuff the address of the original IO so we can
+ * find it easily. Something similar will need be done on the other
+ * side so when we are done we can find the copy.
+ */
+ if ((lun->flags & CTL_LUN_PRIMARY_SC) == 0) {
+ union ctl_ha_msg msg_info;
+ int isc_retval;
+
+ ctsio->io_hdr.flags |= CTL_FLAG_SENT_2OTHER_SC;
+
+ msg_info.hdr.msg_type = CTL_MSG_SERIALIZE;
+ msg_info.hdr.original_sc = (union ctl_io *)ctsio;
+#if 0
+ printf("1. ctsio %p\n", ctsio);
+#endif
+ msg_info.hdr.serializing_sc = NULL;
+ msg_info.hdr.nexus = ctsio->io_hdr.nexus;
+ msg_info.scsi.tag_num = ctsio->tag_num;
+ msg_info.scsi.tag_type = ctsio->tag_type;
+ memcpy(msg_info.scsi.cdb, ctsio->cdb, CTL_MAX_CDBLEN);
+
+ ctsio->io_hdr.flags &= ~CTL_FLAG_IO_ACTIVE;
+
+ if ((isc_retval=ctl_ha_msg_send(CTL_HA_CHAN_CTL,
+ (void *)&msg_info, sizeof(msg_info), 0)) >
+ CTL_HA_STATUS_SUCCESS) {
+ printf("CTL:precheck, ctl_ha_msg_send returned %d\n",
+ isc_retval);
+ printf("CTL:opcode is %x\n",opcode);
+ } else {
+#if 0
+ printf("CTL:Precheck sent msg, opcode is %x\n",opcode);
+#endif
+ }
+
+ /*
+ * XXX KDM this I/O is off the incoming queue, but hasn't
+ * been inserted on any other queue. We may need to come
+ * up with a holding queue while we wait for serialization
+ * so that we have an idea of what we're waiting for from
+ * the other side.
+ */
+ goto bailout_unlock;
+ }
+
+ switch (ctl_check_ooa(lun, (union ctl_io *)ctsio,
+ (union ctl_io *)TAILQ_PREV(&ctsio->io_hdr,
+ ctl_ooaq, ooa_links))) {
+ case CTL_ACTION_BLOCK:
+ ctsio->io_hdr.flags |= CTL_FLAG_BLOCKED;
+ TAILQ_INSERT_TAIL(&lun->blocked_queue, &ctsio->io_hdr,
+ blocked_links);
+ goto bailout_unlock;
+ break; /* NOTREACHED */
+ case CTL_ACTION_PASS:
+ case CTL_ACTION_SKIP:
+ goto queue_rtr;
+ break; /* NOTREACHED */
+ case CTL_ACTION_OVERLAP:
+ ctl_set_overlapped_cmd(ctsio);
+ mtx_unlock(&ctl_softc->ctl_lock);
+ ctl_done((union ctl_io *)ctsio);
+ goto bailout;
+ break; /* NOTREACHED */
+ case CTL_ACTION_OVERLAP_TAG:
+ ctl_set_overlapped_tag(ctsio, ctsio->tag_num & 0xff);
+ mtx_unlock(&ctl_softc->ctl_lock);
+ ctl_done((union ctl_io *)ctsio);
+ goto bailout;
+ break; /* NOTREACHED */
+ case CTL_ACTION_ERROR:
+ default:
+ ctl_set_internal_failure(ctsio,
+ /*sks_valid*/ 0,
+ /*retry_count*/ 0);
+ mtx_unlock(&ctl_softc->ctl_lock);
+ ctl_done((union ctl_io *)ctsio);
+ goto bailout;
+ break; /* NOTREACHED */
+ }
+
+ goto bailout_unlock;
+
+queue_rtr:
+ ctsio->io_hdr.flags |= CTL_FLAG_IS_WAS_ON_RTR;
+ STAILQ_INSERT_TAIL(&ctl_softc->rtr_queue, &ctsio->io_hdr, links);
+
+bailout_unlock:
+ mtx_unlock(&ctl_softc->ctl_lock);
+
+bailout:
+ return (retval);
+}
+
+static int
+ctl_scsiio(struct ctl_scsiio *ctsio)
+{
+ int retval;
+ struct ctl_cmd_entry *entry;
+
+ retval = CTL_RETVAL_COMPLETE;
+
+ CTL_DEBUG_PRINT(("ctl_scsiio cdb[0]=%02X\n", ctsio->cdb[0]));
+
+ entry = &ctl_cmd_table[ctsio->cdb[0]];
+
+ /*
+ * If this I/O has been aborted, just send it straight to
+ * ctl_done() without executing it.
+ */
+ if (ctsio->io_hdr.flags & CTL_FLAG_ABORT) {
+ ctl_done((union ctl_io *)ctsio);
+ goto bailout;
+ }
+
+ /*
+ * All the checks should have been handled by ctl_scsiio_precheck().
+ * We should be clear now to just execute the I/O.
+ */
+ retval = entry->execute(ctsio);
+
+bailout:
+ return (retval);
+}
+
+/*
+ * Since we only implement one target right now, a bus reset simply resets
+ * our single target.
+ */
+static int
+ctl_bus_reset(struct ctl_softc *ctl_softc, union ctl_io *io)
+{
+ return(ctl_target_reset(ctl_softc, io, CTL_UA_BUS_RESET));
+}
+
+static int
+ctl_target_reset(struct ctl_softc *ctl_softc, union ctl_io *io,
+ ctl_ua_type ua_type)
+{
+ struct ctl_lun *lun;
+ int retval;
+
+ if (!(io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC)) {
+ union ctl_ha_msg msg_info;
+
+ io->io_hdr.flags |= CTL_FLAG_SENT_2OTHER_SC;
+ msg_info.hdr.nexus = io->io_hdr.nexus;
+ if (ua_type==CTL_UA_TARG_RESET)
+ msg_info.task.task_action = CTL_TASK_TARGET_RESET;
+ else
+ msg_info.task.task_action = CTL_TASK_BUS_RESET;
+ msg_info.hdr.msg_type = CTL_MSG_MANAGE_TASKS;
+ msg_info.hdr.original_sc = NULL;
+ msg_info.hdr.serializing_sc = NULL;
+ if (CTL_HA_STATUS_SUCCESS != ctl_ha_msg_send(CTL_HA_CHAN_CTL,
+ (void *)&msg_info, sizeof(msg_info), 0)) {
+ }
+ }
+ retval = 0;
+
+ STAILQ_FOREACH(lun, &ctl_softc->lun_list, links)
+ retval += ctl_lun_reset(lun, io, ua_type);
+
+ return (retval);
+}
+
+/*
+ * The LUN should always be set. The I/O is optional, and is used to
+ * distinguish between I/Os sent by this initiator, and by other
+ * initiators. We set unit attention for initiators other than this one.
+ * SAM-3 is vague on this point. It does say that a unit attention should
+ * be established for other initiators when a LUN is reset (see section
+ * 5.7.3), but it doesn't specifically say that the unit attention should
+ * be established for this particular initiator when a LUN is reset. Here
+ * is the relevant text, from SAM-3 rev 8:
+ *
+ * 5.7.2 When a SCSI initiator port aborts its own tasks
+ *
+ * When a SCSI initiator port causes its own task(s) to be aborted, no
+ * notification that the task(s) have been aborted shall be returned to
+ * the SCSI initiator port other than the completion response for the
+ * command or task management function action that caused the task(s) to
+ * be aborted and notification(s) associated with related effects of the
+ * action (e.g., a reset unit attention condition).
+ *
+ * XXX KDM for now, we're setting unit attention for all initiators.
+ */
+static int
+ctl_lun_reset(struct ctl_lun *lun, union ctl_io *io, ctl_ua_type ua_type)
+{
+ union ctl_io *xio;
+#if 0
+ uint32_t initindex;
+#endif
+ int i;
+
+ /*
+ * Run through the OOA queue and abort each I/O.
+ */
+#if 0
+ TAILQ_FOREACH((struct ctl_io_hdr *)xio, &lun->ooa_queue, ooa_links) {
+#endif
+ for (xio = (union ctl_io *)TAILQ_FIRST(&lun->ooa_queue); xio != NULL;
+ xio = (union ctl_io *)TAILQ_NEXT(&xio->io_hdr, ooa_links)) {
+ xio->io_hdr.flags |= CTL_FLAG_ABORT;
+ }
+
+ /*
+ * This version sets unit attention for every
+ */
+#if 0
+ initindex = ctl_get_initindex(&io->io_hdr.nexus);
+ for (i = 0; i < CTL_MAX_INITIATORS; i++) {
+ if (initindex == i)
+ continue;
+ lun->pending_sense[i].ua_pending |= ua_type;
+ }
+#endif
+
+ /*
+ * A reset (any kind, really) clears reservations established with
+ * RESERVE/RELEASE. It does not clear reservations established
+ * with PERSISTENT RESERVE OUT, but we don't support that at the
+ * moment anyway. See SPC-2, section 5.6. SPC-3 doesn't address
+ * reservations made with the RESERVE/RELEASE commands, because
+ * those commands are obsolete in SPC-3.
+ */
+ lun->flags &= ~CTL_LUN_RESERVED;
+
+ for (i = 0; i < CTL_MAX_INITIATORS; i++) {
+ ctl_clear_mask(lun->have_ca, i);
+ lun->pending_sense[i].ua_pending |= ua_type;
+ }
+
+ return (0);
+}
+
+static int
+ctl_abort_task(union ctl_io *io)
+{
+ union ctl_io *xio;
+ struct ctl_lun *lun;
+ struct ctl_softc *ctl_softc;
+#if 0
+ struct sbuf sb;
+ char printbuf[128];
+#endif
+ int found;
+
+ ctl_softc = control_softc;
+ found = 0;
+
+ /*
+ * Look up the LUN.
+ */
+ if ((io->io_hdr.nexus.targ_lun < CTL_MAX_LUNS)
+ && (ctl_softc->ctl_luns[io->io_hdr.nexus.targ_lun] != NULL))
+ lun = ctl_softc->ctl_luns[io->io_hdr.nexus.targ_lun];
+ else
+ goto bailout;
+
+#if 0
+ printf("ctl_abort_task: called for lun %lld, tag %d type %d\n",
+ lun->lun, io->taskio.tag_num, io->taskio.tag_type);
+#endif
+
+ /*
+ * Run through the OOA queue and attempt to find the given I/O.
+ * The target port, initiator ID, tag type and tag number have to
+ * match the values that we got from the initiator. If we have an
+ * untagged command to abort, simply abort the first untagged command
+ * we come to. We only allow one untagged command at a time of course.
+ */
+#if 0
+ TAILQ_FOREACH((struct ctl_io_hdr *)xio, &lun->ooa_queue, ooa_links) {
+#endif
+ for (xio = (union ctl_io *)TAILQ_FIRST(&lun->ooa_queue); xio != NULL;
+ xio = (union ctl_io *)TAILQ_NEXT(&xio->io_hdr, ooa_links)) {
+#if 0
+ sbuf_new(&sb, printbuf, sizeof(printbuf), SBUF_FIXEDLEN);
+
+ sbuf_printf(&sb, "LUN %lld tag %d type %d%s%s%s%s: ",
+ lun->lun, xio->scsiio.tag_num,
+ xio->scsiio.tag_type,
+ (xio->io_hdr.blocked_links.tqe_prev
+ == NULL) ? "" : " BLOCKED",
+ (xio->io_hdr.flags &
+ CTL_FLAG_DMA_INPROG) ? " DMA" : "",
+ (xio->io_hdr.flags &
+ CTL_FLAG_ABORT) ? " ABORT" : ""),
+ (xio->io_hdr.flags &
+ CTL_FLAG_IS_WAS_ON_RTR ? " RTR" : "");
+ ctl_scsi_command_string(&xio->scsiio, NULL, &sb);
+ sbuf_finish(&sb);
+ printf("%s\n", sbuf_data(&sb));
+#endif
+
+ if ((xio->io_hdr.nexus.targ_port == io->io_hdr.nexus.targ_port)
+ && (xio->io_hdr.nexus.initid.id ==
+ io->io_hdr.nexus.initid.id)) {
+ /*
+ * If the abort says that the task is untagged, the
+ * task in the queue must be untagged. Otherwise,
+ * we just check to see whether the tag numbers
+ * match. This is because the QLogic firmware
+ * doesn't pass back the tag type in an abort
+ * request.
+ */
+#if 0
+ if (((xio->scsiio.tag_type == CTL_TAG_UNTAGGED)
+ && (io->taskio.tag_type == CTL_TAG_UNTAGGED))
+ || (xio->scsiio.tag_num == io->taskio.tag_num)) {
+#endif
+ /*
+ * XXX KDM we've got problems with FC, because it
+ * doesn't send down a tag type with aborts. So we
+ * can only really go by the tag number...
+ * This may cause problems with parallel SCSI.
+ * Need to figure that out!!
+ */
+ if (xio->scsiio.tag_num == io->taskio.tag_num) {
+ xio->io_hdr.flags |= CTL_FLAG_ABORT;
+ found = 1;
+ if ((io->io_hdr.flags &
+ CTL_FLAG_FROM_OTHER_SC) == 0 &&
+ !(lun->flags & CTL_LUN_PRIMARY_SC)) {
+ union ctl_ha_msg msg_info;
+
+ io->io_hdr.flags |=
+ CTL_FLAG_SENT_2OTHER_SC;
+ msg_info.hdr.nexus = io->io_hdr.nexus;
+ msg_info.task.task_action =
+ CTL_TASK_ABORT_TASK;
+ msg_info.task.tag_num =
+ io->taskio.tag_num;
+ msg_info.task.tag_type =
+ io->taskio.tag_type;
+ msg_info.hdr.msg_type =
+ CTL_MSG_MANAGE_TASKS;
+ msg_info.hdr.original_sc = NULL;
+ msg_info.hdr.serializing_sc = NULL;
+#if 0
+ printf("Sent Abort to other side\n");
+#endif
+ if (CTL_HA_STATUS_SUCCESS !=
+ ctl_ha_msg_send(CTL_HA_CHAN_CTL,
+ (void *)&msg_info,
+ sizeof(msg_info), 0)) {
+ }
+ }
+#if 0
+ printf("ctl_abort_task: found I/O to abort\n");
+#endif
+ break;
+ }
+ }
+ }
+
+bailout:
+
+ if (found == 0) {
+ /*
+ * This isn't really an error. It's entirely possible for
+ * the abort and command completion to cross on the wire.
+ * This is more of an informative/diagnostic error.
+ */
+#if 0
+ printf("ctl_abort_task: ABORT sent for nonexistent I/O: "
+ "%d:%d:%d:%d tag %d type %d\n",
+ io->io_hdr.nexus.initid.id,
+ io->io_hdr.nexus.targ_port,
+ io->io_hdr.nexus.targ_target.id,
+ io->io_hdr.nexus.targ_lun, io->taskio.tag_num,
+ io->taskio.tag_type);
+#endif
+ return (1);
+ } else
+ return (0);
+}
+
+/*
+ * Assumptions: caller holds ctl_softc->ctl_lock
+ *
+ * This routine cannot block! It must be callable from an interrupt
+ * handler as well as from the work thread.
+ */
+static void
+ctl_run_task_queue(struct ctl_softc *ctl_softc)
+{
+ union ctl_io *io, *next_io;
+
+ CTL_DEBUG_PRINT(("ctl_run_task_queue\n"));
+
+ for (io = (union ctl_io *)STAILQ_FIRST(&ctl_softc->task_queue);
+ io != NULL; io = next_io) {
+ int retval;
+ const char *task_desc;
+
+ next_io = (union ctl_io *)STAILQ_NEXT(&io->io_hdr, links);
+
+ retval = 0;
+
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_TASK: {
+ task_desc = ctl_scsi_task_string(&io->taskio);
+ if (task_desc != NULL) {
+#ifdef NEEDTOPORT
+ csevent_log(CSC_CTL | CSC_SHELF_SW |
+ CTL_TASK_REPORT,
+ csevent_LogType_Trace,
+ csevent_Severity_Information,
+ csevent_AlertLevel_Green,
+ csevent_FRU_Firmware,
+ csevent_FRU_Unknown,
+ "CTL: received task: %s",task_desc);
+#endif
+ } else {
+#ifdef NEEDTOPORT
+ csevent_log(CSC_CTL | CSC_SHELF_SW |
+ CTL_TASK_REPORT,
+ csevent_LogType_Trace,
+ csevent_Severity_Information,
+ csevent_AlertLevel_Green,
+ csevent_FRU_Firmware,
+ csevent_FRU_Unknown,
+ "CTL: received unknown task "
+ "type: %d (%#x)",
+ io->taskio.task_action,
+ io->taskio.task_action);
+#endif
+ }
+ switch (io->taskio.task_action) {
+ case CTL_TASK_ABORT_TASK:
+ retval = ctl_abort_task(io);
+ break;
+ case CTL_TASK_ABORT_TASK_SET:
+ break;
+ case CTL_TASK_CLEAR_ACA:
+ break;
+ case CTL_TASK_CLEAR_TASK_SET:
+ break;
+ case CTL_TASK_LUN_RESET: {
+ struct ctl_lun *lun;
+ uint32_t targ_lun;
+ int retval;
+
+ targ_lun = io->io_hdr.nexus.targ_lun;
+
+ if ((targ_lun < CTL_MAX_LUNS)
+ && (ctl_softc->ctl_luns[targ_lun] != NULL))
+ lun = ctl_softc->ctl_luns[targ_lun];
+ else {
+ retval = 1;
+ break;
+ }
+
+ if (!(io->io_hdr.flags &
+ CTL_FLAG_FROM_OTHER_SC)) {
+ union ctl_ha_msg msg_info;
+
+ io->io_hdr.flags |=
+ CTL_FLAG_SENT_2OTHER_SC;
+ msg_info.hdr.msg_type =
+ CTL_MSG_MANAGE_TASKS;
+ msg_info.hdr.nexus = io->io_hdr.nexus;
+ msg_info.task.task_action =
+ CTL_TASK_LUN_RESET;
+ msg_info.hdr.original_sc = NULL;
+ msg_info.hdr.serializing_sc = NULL;
+ if (CTL_HA_STATUS_SUCCESS !=
+ ctl_ha_msg_send(CTL_HA_CHAN_CTL,
+ (void *)&msg_info,
+ sizeof(msg_info), 0)) {
+ }
+ }
+
+ retval = ctl_lun_reset(lun, io,
+ CTL_UA_LUN_RESET);
+ break;
+ }
+ case CTL_TASK_TARGET_RESET:
+ retval = ctl_target_reset(ctl_softc, io,
+ CTL_UA_TARG_RESET);
+ break;
+ case CTL_TASK_BUS_RESET:
+ retval = ctl_bus_reset(ctl_softc, io);
+ break;
+ case CTL_TASK_PORT_LOGIN:
+ break;
+ case CTL_TASK_PORT_LOGOUT:
+ break;
+ default:
+ printf("ctl_run_task_queue: got unknown task "
+ "management event %d\n",
+ io->taskio.task_action);
+ break;
+ }
+ if (retval == 0)
+ io->io_hdr.status = CTL_SUCCESS;
+ else
+ io->io_hdr.status = CTL_ERROR;
+
+ STAILQ_REMOVE(&ctl_softc->task_queue, &io->io_hdr,
+ ctl_io_hdr, links);
+ /*
+ * This will queue this I/O to the done queue, but the
+ * work thread won't be able to process it until we
+ * return and the lock is released.
+ */
+ ctl_done_lock(io, /*have_lock*/ 1);
+ break;
+ }
+ default: {
+
+ printf("%s: invalid I/O type %d msg %d cdb %x"
+ " iptl: %ju:%d:%ju:%d tag 0x%04x\n",
+ __func__, io->io_hdr.io_type,
+ io->io_hdr.msg_type, io->scsiio.cdb[0],
+ (uintmax_t)io->io_hdr.nexus.initid.id,
+ io->io_hdr.nexus.targ_port,
+ (uintmax_t)io->io_hdr.nexus.targ_target.id,
+ io->io_hdr.nexus.targ_lun,
+ (io->io_hdr.io_type == CTL_IO_TASK) ?
+ io->taskio.tag_num : io->scsiio.tag_num);
+ STAILQ_REMOVE(&ctl_softc->task_queue, &io->io_hdr,
+ ctl_io_hdr, links);
+ ctl_free_io_internal(io, 1);
+ break;
+ }
+ }
+ }
+
+ ctl_softc->flags &= ~CTL_FLAG_TASK_PENDING;
+}
+
+/*
+ * For HA operation. Handle commands that come in from the other
+ * controller.
+ */
+static void
+ctl_handle_isc(union ctl_io *io)
+{
+ int free_io;
+ struct ctl_lun *lun;
+ struct ctl_softc *ctl_softc;
+
+ ctl_softc = control_softc;
+
+ lun = ctl_softc->ctl_luns[io->io_hdr.nexus.targ_lun];
+
+ switch (io->io_hdr.msg_type) {
+ case CTL_MSG_SERIALIZE:
+ free_io = ctl_serialize_other_sc_cmd(&io->scsiio,
+ /*have_lock*/ 0);
+ break;
+ case CTL_MSG_R2R: {
+ uint8_t opcode;
+ struct ctl_cmd_entry *entry;
+
+ /*
+ * This is only used in SER_ONLY mode.
+ */
+ free_io = 0;
+ opcode = io->scsiio.cdb[0];
+ entry = &ctl_cmd_table[opcode];
+ mtx_lock(&ctl_softc->ctl_lock);
+ if (ctl_scsiio_lun_check(ctl_softc, lun,
+ entry, (struct ctl_scsiio *)io) != 0) {
+ ctl_done_lock(io, /*have_lock*/ 1);
+ mtx_unlock(&ctl_softc->ctl_lock);
+ break;
+ }
+ io->io_hdr.flags |= CTL_FLAG_IS_WAS_ON_RTR;
+ STAILQ_INSERT_TAIL(&ctl_softc->rtr_queue,
+ &io->io_hdr, links);
+ mtx_unlock(&ctl_softc->ctl_lock);
+ break;
+ }
+ case CTL_MSG_FINISH_IO:
+ if (ctl_softc->ha_mode == CTL_HA_MODE_XFER) {
+ free_io = 0;
+ ctl_done_lock(io, /*have_lock*/ 0);
+ } else {
+ free_io = 1;
+ mtx_lock(&ctl_softc->ctl_lock);
+ TAILQ_REMOVE(&lun->ooa_queue, &io->io_hdr,
+ ooa_links);
+ STAILQ_REMOVE(&ctl_softc->task_queue,
+ &io->io_hdr, ctl_io_hdr, links);
+ ctl_check_blocked(lun);
+ mtx_unlock(&ctl_softc->ctl_lock);
+ }
+ break;
+ case CTL_MSG_PERS_ACTION:
+ ctl_hndl_per_res_out_on_other_sc(
+ (union ctl_ha_msg *)&io->presio.pr_msg);
+ free_io = 1;
+ break;
+ case CTL_MSG_BAD_JUJU:
+ free_io = 0;
+ ctl_done_lock(io, /*have_lock*/ 0);
+ break;
+ case CTL_MSG_DATAMOVE:
+ /* Only used in XFER mode */
+ free_io = 0;
+ ctl_datamove_remote(io);
+ break;
+ case CTL_MSG_DATAMOVE_DONE:
+ /* Only used in XFER mode */
+ free_io = 0;
+ io->scsiio.be_move_done(io);
+ break;
+ default:
+ free_io = 1;
+ printf("%s: Invalid message type %d\n",
+ __func__, io->io_hdr.msg_type);
+ break;
+ }
+ if (free_io)
+ ctl_free_io_internal(io, 0);
+
+}
+
+
+/*
+ * Returns the match type in the case of a match, or CTL_LUN_PAT_NONE if
+ * there is no match.
+ */
+static ctl_lun_error_pattern
+ctl_cmd_pattern_match(struct ctl_scsiio *ctsio, struct ctl_error_desc *desc)
+{
+ struct ctl_cmd_entry *entry;
+ ctl_lun_error_pattern filtered_pattern, pattern;
+ uint8_t opcode;
+
+ pattern = desc->error_pattern;
+
+ /*
+ * XXX KDM we need more data passed into this function to match a
+ * custom pattern, and we actually need to implement custom pattern
+ * matching.
+ */
+ if (pattern & CTL_LUN_PAT_CMD)
+ return (CTL_LUN_PAT_CMD);
+
+ if ((pattern & CTL_LUN_PAT_MASK) == CTL_LUN_PAT_ANY)
+ return (CTL_LUN_PAT_ANY);
+
+ opcode = ctsio->cdb[0];
+ entry = &ctl_cmd_table[opcode];
+
+ filtered_pattern = entry->pattern & pattern;
+
+ /*
+ * If the user requested specific flags in the pattern (e.g.
+ * CTL_LUN_PAT_RANGE), make sure the command supports all of those
+ * flags.
+ *
+ * If the user did not specify any flags, it doesn't matter whether
+ * or not the command supports the flags.
+ */
+ if ((filtered_pattern & ~CTL_LUN_PAT_MASK) !=
+ (pattern & ~CTL_LUN_PAT_MASK))
+ return (CTL_LUN_PAT_NONE);
+
+ /*
+ * If the user asked for a range check, see if the requested LBA
+ * range overlaps with this command's LBA range.
+ */
+ if (filtered_pattern & CTL_LUN_PAT_RANGE) {
+ uint64_t lba1;
+ uint32_t len1;
+ ctl_action action;
+ int retval;
+
+ retval = ctl_get_lba_len((union ctl_io *)ctsio, &lba1, &len1);
+ if (retval != 0)
+ return (CTL_LUN_PAT_NONE);
+
+ action = ctl_extent_check_lba(lba1, len1, desc->lba_range.lba,
+ desc->lba_range.len);
+ /*
+ * A "pass" means that the LBA ranges don't overlap, so
+ * this doesn't match the user's range criteria.
+ */
+ if (action == CTL_ACTION_PASS)
+ return (CTL_LUN_PAT_NONE);
+ }
+
+ return (filtered_pattern);
+}
+
+/*
+ * Called with the CTL lock held.
+ */
+static void
+ctl_inject_error(struct ctl_lun *lun, union ctl_io *io)
+{
+ struct ctl_error_desc *desc, *desc2;
+
+ STAILQ_FOREACH_SAFE(desc, &lun->error_list, links, desc2) {
+ ctl_lun_error_pattern pattern;
+ /*
+ * Check to see whether this particular command matches
+ * the pattern in the descriptor.
+ */
+ pattern = ctl_cmd_pattern_match(&io->scsiio, desc);
+ if ((pattern & CTL_LUN_PAT_MASK) == CTL_LUN_PAT_NONE)
+ continue;
+
+ switch (desc->lun_error & CTL_LUN_INJ_TYPE) {
+ case CTL_LUN_INJ_ABORTED:
+ ctl_set_aborted(&io->scsiio);
+ break;
+ case CTL_LUN_INJ_MEDIUM_ERR:
+ ctl_set_medium_error(&io->scsiio);
+ break;
+ case CTL_LUN_INJ_UA:
+ /* 29h/00h POWER ON, RESET, OR BUS DEVICE RESET
+ * OCCURRED */
+ ctl_set_ua(&io->scsiio, 0x29, 0x00);
+ break;
+ case CTL_LUN_INJ_CUSTOM:
+ /*
+ * We're assuming the user knows what he is doing.
+ * Just copy the sense information without doing
+ * checks.
+ */
+ bcopy(&desc->custom_sense, &io->scsiio.sense_data,
+ ctl_min(sizeof(desc->custom_sense),
+ sizeof(io->scsiio.sense_data)));
+ io->scsiio.scsi_status = SCSI_STATUS_CHECK_COND;
+ io->scsiio.sense_len = SSD_FULL_SIZE;
+ io->io_hdr.status = CTL_SCSI_ERROR | CTL_AUTOSENSE;
+ break;
+ case CTL_LUN_INJ_NONE:
+ default:
+ /*
+ * If this is an error injection type we don't know
+ * about, clear the continuous flag (if it is set)
+ * so it will get deleted below.
+ */
+ desc->lun_error &= ~CTL_LUN_INJ_CONTINUOUS;
+ break;
+ }
+ /*
+ * By default, each error injection action is a one-shot
+ */
+ if (desc->lun_error & CTL_LUN_INJ_CONTINUOUS)
+ continue;
+
+ STAILQ_REMOVE(&lun->error_list, desc, ctl_error_desc, links);
+
+ free(desc, M_CTL);
+ }
+}
+
+#ifdef CTL_IO_DELAY
+static void
+ctl_datamove_timer_wakeup(void *arg)
+{
+ union ctl_io *io;
+
+ io = (union ctl_io *)arg;
+
+ ctl_datamove(io);
+}
+#endif /* CTL_IO_DELAY */
+
+/*
+ * Assumption: caller does NOT hold ctl_lock
+ */
+void
+ctl_datamove(union ctl_io *io)
+{
+ void (*fe_datamove)(union ctl_io *io);
+
+ CTL_DEBUG_PRINT(("ctl_datamove\n"));
+
+#ifdef CTL_TIME_IO
+ if ((time_uptime - io->io_hdr.start_time) > ctl_time_io_secs) {
+ char str[256];
+ char path_str[64];
+ struct sbuf sb;
+
+ ctl_scsi_path_string(io, path_str, sizeof(path_str));
+ sbuf_new(&sb, str, sizeof(str), SBUF_FIXEDLEN);
+
+ sbuf_cat(&sb, path_str);
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ ctl_scsi_command_string(&io->scsiio, NULL, &sb);
+ sbuf_printf(&sb, "\n");
+ sbuf_cat(&sb, path_str);
+ sbuf_printf(&sb, "Tag: 0x%04x, type %d\n",
+ io->scsiio.tag_num, io->scsiio.tag_type);
+ break;
+ case CTL_IO_TASK:
+ sbuf_printf(&sb, "Task I/O type: %d, Tag: 0x%04x, "
+ "Tag Type: %d\n", io->taskio.task_action,
+ io->taskio.tag_num, io->taskio.tag_type);
+ break;
+ default:
+ printf("Invalid CTL I/O type %d\n", io->io_hdr.io_type);
+ panic("Invalid CTL I/O type %d\n", io->io_hdr.io_type);
+ break;
+ }
+ sbuf_cat(&sb, path_str);
+ sbuf_printf(&sb, "ctl_datamove: %jd seconds\n",
+ (intmax_t)time_uptime - io->io_hdr.start_time);
+ sbuf_finish(&sb);
+ printf("%s", sbuf_data(&sb));
+ }
+#endif /* CTL_TIME_IO */
+
+ mtx_lock(&control_softc->ctl_lock);
+#ifdef CTL_IO_DELAY
+ if (io->io_hdr.flags & CTL_FLAG_DELAY_DONE) {
+ struct ctl_lun *lun;
+
+ lun =(struct ctl_lun *)io->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
+
+ io->io_hdr.flags &= ~CTL_FLAG_DELAY_DONE;
+ } else {
+ struct ctl_lun *lun;
+
+ lun =(struct ctl_lun *)io->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
+ if ((lun != NULL)
+ && (lun->delay_info.datamove_delay > 0)) {
+ struct callout *callout;
+
+ callout = (struct callout *)&io->io_hdr.timer_bytes;
+ callout_init(callout, /*mpsafe*/ 1);
+ io->io_hdr.flags |= CTL_FLAG_DELAY_DONE;
+ callout_reset(callout,
+ lun->delay_info.datamove_delay * hz,
+ ctl_datamove_timer_wakeup, io);
+ if (lun->delay_info.datamove_type ==
+ CTL_DELAY_TYPE_ONESHOT)
+ lun->delay_info.datamove_delay = 0;
+ mtx_unlock(&control_softc->ctl_lock);
+ return;
+ }
+ }
+#endif
+ /*
+ * If we have any pending task management commands, process them
+ * first. This is necessary to eliminate a race condition with the
+ * FETD:
+ *
+ * - FETD submits a task management command, like an abort.
+ * - Back end calls fe_datamove() to move the data for the aborted
+ * command. The FETD can't really accept it, but if it did, it
+ * would end up transmitting data for a command that the initiator
+ * told us to abort.
+ *
+ * We close the race by processing all pending task management
+ * commands here (we can't block!), and then check this I/O to see
+ * if it has been aborted. If so, return it to the back end with
+ * bad status, so the back end can say return an error to the back end
+ * and then when the back end returns an error, we can return the
+ * aborted command to the FETD, so it can clean up its resources.
+ */
+ if (control_softc->flags & CTL_FLAG_TASK_PENDING)
+ ctl_run_task_queue(control_softc);
+
+ /*
+ * This command has been aborted. Set the port status, so we fail
+ * the data move.
+ */
+ if (io->io_hdr.flags & CTL_FLAG_ABORT) {
+ printf("ctl_datamove: tag 0x%04x on (%ju:%d:%ju:%d) aborted\n",
+ io->scsiio.tag_num,(uintmax_t)io->io_hdr.nexus.initid.id,
+ io->io_hdr.nexus.targ_port,
+ (uintmax_t)io->io_hdr.nexus.targ_target.id,
+ io->io_hdr.nexus.targ_lun);
+ io->io_hdr.status = CTL_CMD_ABORTED;
+ io->io_hdr.port_status = 31337;
+ mtx_unlock(&control_softc->ctl_lock);
+ /*
+ * Note that the backend, in this case, will get the
+ * callback in its context. In other cases it may get
+ * called in the frontend's interrupt thread context.
+ */
+ io->scsiio.be_move_done(io);
+ return;
+ }
+
+ /*
+ * If we're in XFER mode and this I/O is from the other shelf
+ * controller, we need to send the DMA to the other side to
+ * actually transfer the data to/from the host. In serialize only
+ * mode the transfer happens below CTL and ctl_datamove() is only
+ * called on the machine that originally received the I/O.
+ */
+ if ((control_softc->ha_mode == CTL_HA_MODE_XFER)
+ && (io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC)) {
+ union ctl_ha_msg msg;
+ uint32_t sg_entries_sent;
+ int do_sg_copy;
+ int i;
+
+ memset(&msg, 0, sizeof(msg));
+ msg.hdr.msg_type = CTL_MSG_DATAMOVE;
+ msg.hdr.original_sc = io->io_hdr.original_sc;
+ msg.hdr.serializing_sc = io;
+ msg.hdr.nexus = io->io_hdr.nexus;
+ msg.dt.flags = io->io_hdr.flags;
+ /*
+ * We convert everything into a S/G list here. We can't
+ * pass by reference, only by value between controllers.
+ * So we can't pass a pointer to the S/G list, only as many
+ * S/G entries as we can fit in here. If it's possible for
+ * us to get more than CTL_HA_MAX_SG_ENTRIES S/G entries,
+ * then we need to break this up into multiple transfers.
+ */
+ if (io->scsiio.kern_sg_entries == 0) {
+ msg.dt.kern_sg_entries = 1;
+ /*
+ * If this is in cached memory, flush the cache
+ * before we send the DMA request to the other
+ * controller. We want to do this in either the
+ * read or the write case. The read case is
+ * straightforward. In the write case, we want to
+ * make sure nothing is in the local cache that
+ * could overwrite the DMAed data.
+ */
+ if ((io->io_hdr.flags & CTL_FLAG_NO_DATASYNC) == 0) {
+ /*
+ * XXX KDM use bus_dmamap_sync() here.
+ */
+ }
+
+ /*
+ * Convert to a physical address if this is a
+ * virtual address.
+ */
+ if (io->io_hdr.flags & CTL_FLAG_BUS_ADDR) {
+ msg.dt.sg_list[0].addr =
+ io->scsiio.kern_data_ptr;
+ } else {
+ /*
+ * XXX KDM use busdma here!
+ */
+#if 0
+ msg.dt.sg_list[0].addr = (void *)
+ vtophys(io->scsiio.kern_data_ptr);
+#endif
+ }
+
+ msg.dt.sg_list[0].len = io->scsiio.kern_data_len;
+ do_sg_copy = 0;
+ } else {
+ struct ctl_sg_entry *sgl;
+
+ do_sg_copy = 1;
+ msg.dt.kern_sg_entries = io->scsiio.kern_sg_entries;
+ sgl = (struct ctl_sg_entry *)io->scsiio.kern_data_ptr;
+ if ((io->io_hdr.flags & CTL_FLAG_NO_DATASYNC) == 0) {
+ /*
+ * XXX KDM use bus_dmamap_sync() here.
+ */
+ }
+ }
+
+ msg.dt.kern_data_len = io->scsiio.kern_data_len;
+ msg.dt.kern_total_len = io->scsiio.kern_total_len;
+ msg.dt.kern_data_resid = io->scsiio.kern_data_resid;
+ msg.dt.kern_rel_offset = io->scsiio.kern_rel_offset;
+ msg.dt.sg_sequence = 0;
+
+ /*
+ * Loop until we've sent all of the S/G entries. On the
+ * other end, we'll recompose these S/G entries into one
+ * contiguous list before passing it to the
+ */
+ for (sg_entries_sent = 0; sg_entries_sent <
+ msg.dt.kern_sg_entries; msg.dt.sg_sequence++) {
+ msg.dt.cur_sg_entries = ctl_min((sizeof(msg.dt.sg_list)/
+ sizeof(msg.dt.sg_list[0])),
+ msg.dt.kern_sg_entries - sg_entries_sent);
+
+ if (do_sg_copy != 0) {
+ struct ctl_sg_entry *sgl;
+ int j;
+
+ sgl = (struct ctl_sg_entry *)
+ io->scsiio.kern_data_ptr;
+ /*
+ * If this is in cached memory, flush the cache
+ * before we send the DMA request to the other
+ * controller. We want to do this in either
+ * the * read or the write case. The read
+ * case is straightforward. In the write
+ * case, we want to make sure nothing is
+ * in the local cache that could overwrite
+ * the DMAed data.
+ */
+
+ for (i = sg_entries_sent, j = 0;
+ i < msg.dt.cur_sg_entries; i++, j++) {
+ if ((io->io_hdr.flags &
+ CTL_FLAG_NO_DATASYNC) == 0) {
+ /*
+ * XXX KDM use bus_dmamap_sync()
+ */
+ }
+ if ((io->io_hdr.flags &
+ CTL_FLAG_BUS_ADDR) == 0) {
+ /*
+ * XXX KDM use busdma.
+ */
+#if 0
+ msg.dt.sg_list[j].addr =(void *)
+ vtophys(sgl[i].addr);
+#endif
+ } else {
+ msg.dt.sg_list[j].addr =
+ sgl[i].addr;
+ }
+ msg.dt.sg_list[j].len = sgl[i].len;
+ }
+ }
+
+ sg_entries_sent += msg.dt.cur_sg_entries;
+ if (sg_entries_sent >= msg.dt.kern_sg_entries)
+ msg.dt.sg_last = 1;
+ else
+ msg.dt.sg_last = 0;
+
+ /*
+ * XXX KDM drop and reacquire the lock here?
+ */
+ if (ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg,
+ sizeof(msg), 0) > CTL_HA_STATUS_SUCCESS) {
+ /*
+ * XXX do something here.
+ */
+ }
+
+ msg.dt.sent_sg_entries = sg_entries_sent;
+ }
+ io->io_hdr.flags &= ~CTL_FLAG_IO_ACTIVE;
+ if (io->io_hdr.flags & CTL_FLAG_FAILOVER)
+ ctl_failover_io(io, /*have_lock*/ 1);
+
+ } else {
+
+ /*
+ * Lookup the fe_datamove() function for this particular
+ * front end.
+ */
+ fe_datamove =
+ control_softc->ctl_ports[ctl_port_idx(io->io_hdr.nexus.targ_port)]->fe_datamove;
+ mtx_unlock(&control_softc->ctl_lock);
+
+ fe_datamove(io);
+ }
+}
+
+static void
+ctl_send_datamove_done(union ctl_io *io, int have_lock)
+{
+ union ctl_ha_msg msg;
+ int isc_status;
+
+ memset(&msg, 0, sizeof(msg));
+
+ msg.hdr.msg_type = CTL_MSG_DATAMOVE_DONE;
+ msg.hdr.original_sc = io;
+ msg.hdr.serializing_sc = io->io_hdr.serializing_sc;
+ msg.hdr.nexus = io->io_hdr.nexus;
+ msg.hdr.status = io->io_hdr.status;
+ msg.scsi.tag_num = io->scsiio.tag_num;
+ msg.scsi.tag_type = io->scsiio.tag_type;
+ msg.scsi.scsi_status = io->scsiio.scsi_status;
+ memcpy(&msg.scsi.sense_data, &io->scsiio.sense_data,
+ sizeof(io->scsiio.sense_data));
+ msg.scsi.sense_len = io->scsiio.sense_len;
+ msg.scsi.sense_residual = io->scsiio.sense_residual;
+ msg.scsi.fetd_status = io->io_hdr.port_status;
+ msg.scsi.residual = io->scsiio.residual;
+ io->io_hdr.flags &= ~CTL_FLAG_IO_ACTIVE;
+
+ if (io->io_hdr.flags & CTL_FLAG_FAILOVER) {
+ ctl_failover_io(io, /*have_lock*/ have_lock);
+ return;
+ }
+
+ isc_status = ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg, sizeof(msg), 0);
+ if (isc_status > CTL_HA_STATUS_SUCCESS) {
+ /* XXX do something if this fails */
+ }
+
+}
+
+/*
+ * The DMA to the remote side is done, now we need to tell the other side
+ * we're done so it can continue with its data movement.
+ */
+static void
+ctl_datamove_remote_write_cb(struct ctl_ha_dt_req *rq)
+{
+ union ctl_io *io;
+
+ io = rq->context;
+
+ if (rq->ret != CTL_HA_STATUS_SUCCESS) {
+ printf("%s: ISC DMA write failed with error %d", __func__,
+ rq->ret);
+ ctl_set_internal_failure(&io->scsiio,
+ /*sks_valid*/ 1,
+ /*retry_count*/ rq->ret);
+ }
+
+ ctl_dt_req_free(rq);
+
+ /*
+ * In this case, we had to malloc the memory locally. Free it.
+ */
+ if ((io->io_hdr.flags & CTL_FLAG_AUTO_MIRROR) == 0) {
+ int i;
+ for (i = 0; i < io->scsiio.kern_sg_entries; i++)
+ free(io->io_hdr.local_sglist[i].addr, M_CTL);
+ }
+ /*
+ * The data is in local and remote memory, so now we need to send
+ * status (good or back) back to the other side.
+ */
+ ctl_send_datamove_done(io, /*have_lock*/ 0);
+}
+
+/*
+ * We've moved the data from the host/controller into local memory. Now we
+ * need to push it over to the remote controller's memory.
+ */
+static int
+ctl_datamove_remote_dm_write_cb(union ctl_io *io)
+{
+ int retval;
+
+ retval = 0;
+
+ retval = ctl_datamove_remote_xfer(io, CTL_HA_DT_CMD_WRITE,
+ ctl_datamove_remote_write_cb);
+
+ return (retval);
+}
+
+static void
+ctl_datamove_remote_write(union ctl_io *io)
+{
+ int retval;
+ void (*fe_datamove)(union ctl_io *io);
+
+ /*
+ * - Get the data from the host/HBA into local memory.
+ * - DMA memory from the local controller to the remote controller.
+ * - Send status back to the remote controller.
+ */
+
+ retval = ctl_datamove_remote_sgl_setup(io);
+ if (retval != 0)
+ return;
+
+ /* Switch the pointer over so the FETD knows what to do */
+ io->scsiio.kern_data_ptr = (uint8_t *)io->io_hdr.local_sglist;
+
+ /*
+ * Use a custom move done callback, since we need to send completion
+ * back to the other controller, not to the backend on this side.
+ */
+ io->scsiio.be_move_done = ctl_datamove_remote_dm_write_cb;
+
+ fe_datamove = control_softc->ctl_ports[ctl_port_idx(io->io_hdr.nexus.targ_port)]->fe_datamove;
+
+ fe_datamove(io);
+
+ return;
+
+}
+
+static int
+ctl_datamove_remote_dm_read_cb(union ctl_io *io)
+{
+#if 0
+ char str[256];
+ char path_str[64];
+ struct sbuf sb;
+#endif
+
+ /*
+ * In this case, we had to malloc the memory locally. Free it.
+ */
+ if ((io->io_hdr.flags & CTL_FLAG_AUTO_MIRROR) == 0) {
+ int i;
+ for (i = 0; i < io->scsiio.kern_sg_entries; i++)
+ free(io->io_hdr.local_sglist[i].addr, M_CTL);
+ }
+
+#if 0
+ scsi_path_string(io, path_str, sizeof(path_str));
+ sbuf_new(&sb, str, sizeof(str), SBUF_FIXEDLEN);
+ sbuf_cat(&sb, path_str);
+ scsi_command_string(&io->scsiio, NULL, &sb);
+ sbuf_printf(&sb, "\n");
+ sbuf_cat(&sb, path_str);
+ sbuf_printf(&sb, "Tag: 0x%04x, type %d\n",
+ io->scsiio.tag_num, io->scsiio.tag_type);
+ sbuf_cat(&sb, path_str);
+ sbuf_printf(&sb, "%s: flags %#x, status %#x\n", __func__,
+ io->io_hdr.flags, io->io_hdr.status);
+ sbuf_finish(&sb);
+ printk("%s", sbuf_data(&sb));
+#endif
+
+
+ /*
+ * The read is done, now we need to send status (good or bad) back
+ * to the other side.
+ */
+ ctl_send_datamove_done(io, /*have_lock*/ 0);
+
+ return (0);
+}
+
+static void
+ctl_datamove_remote_read_cb(struct ctl_ha_dt_req *rq)
+{
+ union ctl_io *io;
+ void (*fe_datamove)(union ctl_io *io);
+
+ io = rq->context;
+
+ if (rq->ret != CTL_HA_STATUS_SUCCESS) {
+ printf("%s: ISC DMA read failed with error %d", __func__,
+ rq->ret);
+ ctl_set_internal_failure(&io->scsiio,
+ /*sks_valid*/ 1,
+ /*retry_count*/ rq->ret);
+ }
+
+ ctl_dt_req_free(rq);
+
+ /* Switch the pointer over so the FETD knows what to do */
+ io->scsiio.kern_data_ptr = (uint8_t *)io->io_hdr.local_sglist;
+
+ /*
+ * Use a custom move done callback, since we need to send completion
+ * back to the other controller, not to the backend on this side.
+ */
+ io->scsiio.be_move_done = ctl_datamove_remote_dm_read_cb;
+
+ /* XXX KDM add checks like the ones in ctl_datamove? */
+
+ fe_datamove = control_softc->ctl_ports[ctl_port_idx(io->io_hdr.nexus.targ_port)]->fe_datamove;
+
+ fe_datamove(io);
+}
+
+static int
+ctl_datamove_remote_sgl_setup(union ctl_io *io)
+{
+ struct ctl_sg_entry *local_sglist, *remote_sglist;
+ struct ctl_sg_entry *local_dma_sglist, *remote_dma_sglist;
+ struct ctl_softc *softc;
+ int retval;
+ int i;
+
+ retval = 0;
+ softc = control_softc;
+
+ local_sglist = io->io_hdr.local_sglist;
+ local_dma_sglist = io->io_hdr.local_dma_sglist;
+ remote_sglist = io->io_hdr.remote_sglist;
+ remote_dma_sglist = io->io_hdr.remote_dma_sglist;
+
+ if (io->io_hdr.flags & CTL_FLAG_AUTO_MIRROR) {
+ for (i = 0; i < io->scsiio.kern_sg_entries; i++) {
+ local_sglist[i].len = remote_sglist[i].len;
+
+ /*
+ * XXX Detect the situation where the RS-level I/O
+ * redirector on the other side has already read the
+ * data off of the AOR RS on this side, and
+ * transferred it to remote (mirror) memory on the
+ * other side. Since we already have the data in
+ * memory here, we just need to use it.
+ *
+ * XXX KDM this can probably be removed once we
+ * get the cache device code in and take the
+ * current AOR implementation out.
+ */
+#ifdef NEEDTOPORT
+ if ((remote_sglist[i].addr >=
+ (void *)vtophys(softc->mirr->addr))
+ && (remote_sglist[i].addr <
+ ((void *)vtophys(softc->mirr->addr) +
+ CacheMirrorOffset))) {
+ local_sglist[i].addr = remote_sglist[i].addr -
+ CacheMirrorOffset;
+ if ((io->io_hdr.flags & CTL_FLAG_DATA_MASK) ==
+ CTL_FLAG_DATA_IN)
+ io->io_hdr.flags |= CTL_FLAG_REDIR_DONE;
+ } else {
+ local_sglist[i].addr = remote_sglist[i].addr +
+ CacheMirrorOffset;
+ }
+#endif
+#if 0
+ printf("%s: local %p, remote %p, len %d\n",
+ __func__, local_sglist[i].addr,
+ remote_sglist[i].addr, local_sglist[i].len);
+#endif
+ }
+ } else {
+ uint32_t len_to_go;
+
+ /*
+ * In this case, we don't have automatically allocated
+ * memory for this I/O on this controller. This typically
+ * happens with internal CTL I/O -- e.g. inquiry, mode
+ * sense, etc. Anything coming from RAIDCore will have
+ * a mirror area available.
+ */
+ len_to_go = io->scsiio.kern_data_len;
+
+ /*
+ * Clear the no datasync flag, we have to use malloced
+ * buffers.
+ */
+ io->io_hdr.flags &= ~CTL_FLAG_NO_DATASYNC;
+
+ /*
+ * The difficult thing here is that the size of the various
+ * S/G segments may be different than the size from the
+ * remote controller. That'll make it harder when DMAing
+ * the data back to the other side.
+ */
+ for (i = 0; (i < sizeof(io->io_hdr.remote_sglist) /
+ sizeof(io->io_hdr.remote_sglist[0])) &&
+ (len_to_go > 0); i++) {
+ local_sglist[i].len = ctl_min(len_to_go, 131072);
+ CTL_SIZE_8B(local_dma_sglist[i].len,
+ local_sglist[i].len);
+ local_sglist[i].addr =
+ malloc(local_dma_sglist[i].len, M_CTL,M_WAITOK);
+
+ local_dma_sglist[i].addr = local_sglist[i].addr;
+
+ if (local_sglist[i].addr == NULL) {
+ int j;
+
+ printf("malloc failed for %zd bytes!",
+ local_dma_sglist[i].len);
+ for (j = 0; j < i; j++) {
+ free(local_sglist[j].addr, M_CTL);
+ }
+ ctl_set_internal_failure(&io->scsiio,
+ /*sks_valid*/ 1,
+ /*retry_count*/ 4857);
+ retval = 1;
+ goto bailout_error;
+
+ }
+ /* XXX KDM do we need a sync here? */
+
+ len_to_go -= local_sglist[i].len;
+ }
+ /*
+ * Reset the number of S/G entries accordingly. The
+ * original number of S/G entries is available in
+ * rem_sg_entries.
+ */
+ io->scsiio.kern_sg_entries = i;
+
+#if 0
+ printf("%s: kern_sg_entries = %d\n", __func__,
+ io->scsiio.kern_sg_entries);
+ for (i = 0; i < io->scsiio.kern_sg_entries; i++)
+ printf("%s: sg[%d] = %p, %d (DMA: %d)\n", __func__, i,
+ local_sglist[i].addr, local_sglist[i].len,
+ local_dma_sglist[i].len);
+#endif
+ }
+
+
+ return (retval);
+
+bailout_error:
+
+ ctl_send_datamove_done(io, /*have_lock*/ 0);
+
+ return (retval);
+}
+
+static int
+ctl_datamove_remote_xfer(union ctl_io *io, unsigned command,
+ ctl_ha_dt_cb callback)
+{
+ struct ctl_ha_dt_req *rq;
+ struct ctl_sg_entry *remote_sglist, *local_sglist;
+ struct ctl_sg_entry *remote_dma_sglist, *local_dma_sglist;
+ uint32_t local_used, remote_used, total_used;
+ int retval;
+ int i, j;
+
+ retval = 0;
+
+ rq = ctl_dt_req_alloc();
+
+ /*
+ * If we failed to allocate the request, and if the DMA didn't fail
+ * anyway, set busy status. This is just a resource allocation
+ * failure.
+ */
+ if ((rq == NULL)
+ && ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE))
+ ctl_set_busy(&io->scsiio);
+
+ if ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE) {
+
+ if (rq != NULL)
+ ctl_dt_req_free(rq);
+
+ /*
+ * The data move failed. We need to return status back
+ * to the other controller. No point in trying to DMA
+ * data to the remote controller.
+ */
+
+ ctl_send_datamove_done(io, /*have_lock*/ 0);
+
+ retval = 1;
+
+ goto bailout;
+ }
+
+ local_sglist = io->io_hdr.local_sglist;
+ local_dma_sglist = io->io_hdr.local_dma_sglist;
+ remote_sglist = io->io_hdr.remote_sglist;
+ remote_dma_sglist = io->io_hdr.remote_dma_sglist;
+ local_used = 0;
+ remote_used = 0;
+ total_used = 0;
+
+ if (io->io_hdr.flags & CTL_FLAG_REDIR_DONE) {
+ rq->ret = CTL_HA_STATUS_SUCCESS;
+ rq->context = io;
+ callback(rq);
+ goto bailout;
+ }
+
+ /*
+ * Pull/push the data over the wire from/to the other controller.
+ * This takes into account the possibility that the local and
+ * remote sglists may not be identical in terms of the size of
+ * the elements and the number of elements.
+ *
+ * One fundamental assumption here is that the length allocated for
+ * both the local and remote sglists is identical. Otherwise, we've
+ * essentially got a coding error of some sort.
+ */
+ for (i = 0, j = 0; total_used < io->scsiio.kern_data_len; ) {
+ int isc_ret;
+ uint32_t cur_len, dma_length;
+ uint8_t *tmp_ptr;
+
+ rq->id = CTL_HA_DATA_CTL;
+ rq->command = command;
+ rq->context = io;
+
+ /*
+ * Both pointers should be aligned. But it is possible
+ * that the allocation length is not. They should both
+ * also have enough slack left over at the end, though,
+ * to round up to the next 8 byte boundary.
+ */
+ cur_len = ctl_min(local_sglist[i].len - local_used,
+ remote_sglist[j].len - remote_used);
+
+ /*
+ * In this case, we have a size issue and need to decrease
+ * the size, except in the case where we actually have less
+ * than 8 bytes left. In that case, we need to increase
+ * the DMA length to get the last bit.
+ */
+ if ((cur_len & 0x7) != 0) {
+ if (cur_len > 0x7) {
+ cur_len = cur_len - (cur_len & 0x7);
+ dma_length = cur_len;
+ } else {
+ CTL_SIZE_8B(dma_length, cur_len);
+ }
+
+ } else
+ dma_length = cur_len;
+
+ /*
+ * If we had to allocate memory for this I/O, instead of using
+ * the non-cached mirror memory, we'll need to flush the cache
+ * before trying to DMA to the other controller.
+ *
+ * We could end up doing this multiple times for the same
+ * segment if we have a larger local segment than remote
+ * segment. That shouldn't be an issue.
+ */
+ if ((io->io_hdr.flags & CTL_FLAG_NO_DATASYNC) == 0) {
+ /*
+ * XXX KDM use bus_dmamap_sync() here.
+ */
+ }
+
+ rq->size = dma_length;
+
+ tmp_ptr = (uint8_t *)local_sglist[i].addr;
+ tmp_ptr += local_used;
+
+ /* Use physical addresses when talking to ISC hardware */
+ if ((io->io_hdr.flags & CTL_FLAG_BUS_ADDR) == 0) {
+ /* XXX KDM use busdma */
+#if 0
+ rq->local = vtophys(tmp_ptr);
+#endif
+ } else
+ rq->local = tmp_ptr;
+
+ tmp_ptr = (uint8_t *)remote_sglist[j].addr;
+ tmp_ptr += remote_used;
+ rq->remote = tmp_ptr;
+
+ rq->callback = NULL;
+
+ local_used += cur_len;
+ if (local_used >= local_sglist[i].len) {
+ i++;
+ local_used = 0;
+ }
+
+ remote_used += cur_len;
+ if (remote_used >= remote_sglist[j].len) {
+ j++;
+ remote_used = 0;
+ }
+ total_used += cur_len;
+
+ if (total_used >= io->scsiio.kern_data_len)
+ rq->callback = callback;
+
+ if ((rq->size & 0x7) != 0) {
+ printf("%s: warning: size %d is not on 8b boundary\n",
+ __func__, rq->size);
+ }
+ if (((uintptr_t)rq->local & 0x7) != 0) {
+ printf("%s: warning: local %p not on 8b boundary\n",
+ __func__, rq->local);
+ }
+ if (((uintptr_t)rq->remote & 0x7) != 0) {
+ printf("%s: warning: remote %p not on 8b boundary\n",
+ __func__, rq->local);
+ }
+#if 0
+ printf("%s: %s: local %#x remote %#x size %d\n", __func__,
+ (command == CTL_HA_DT_CMD_WRITE) ? "WRITE" : "READ",
+ rq->local, rq->remote, rq->size);
+#endif
+
+ isc_ret = ctl_dt_single(rq);
+ if (isc_ret == CTL_HA_STATUS_WAIT)
+ continue;
+
+ if (isc_ret == CTL_HA_STATUS_DISCONNECT) {
+ rq->ret = CTL_HA_STATUS_SUCCESS;
+ } else {
+ rq->ret = isc_ret;
+ }
+ callback(rq);
+ goto bailout;
+ }
+
+bailout:
+ return (retval);
+
+}
+
+static void
+ctl_datamove_remote_read(union ctl_io *io)
+{
+ int retval;
+ int i;
+
+ /*
+ * This will send an error to the other controller in the case of a
+ * failure.
+ */
+ retval = ctl_datamove_remote_sgl_setup(io);
+ if (retval != 0)
+ return;
+
+ retval = ctl_datamove_remote_xfer(io, CTL_HA_DT_CMD_READ,
+ ctl_datamove_remote_read_cb);
+ if ((retval != 0)
+ && ((io->io_hdr.flags & CTL_FLAG_AUTO_MIRROR) == 0)) {
+ /*
+ * Make sure we free memory if there was an error.. The
+ * ctl_datamove_remote_xfer() function will send the
+ * datamove done message, or call the callback with an
+ * error if there is a problem.
+ */
+ for (i = 0; i < io->scsiio.kern_sg_entries; i++)
+ free(io->io_hdr.local_sglist[i].addr, M_CTL);
+ }
+
+ return;
+}
+
+/*
+ * Process a datamove request from the other controller. This is used for
+ * XFER mode only, not SER_ONLY mode. For writes, we DMA into local memory
+ * first. Once that is complete, the data gets DMAed into the remote
+ * controller's memory. For reads, we DMA from the remote controller's
+ * memory into our memory first, and then move it out to the FETD.
+ *
+ * Should be called without the ctl_lock held.
+ */
+static void
+ctl_datamove_remote(union ctl_io *io)
+{
+ struct ctl_softc *softc;
+
+ softc = control_softc;
+
+ /*
+ * Note that we look for an aborted I/O here, but don't do some of
+ * the other checks that ctl_datamove() normally does. We don't
+ * need to run the task queue, because this I/O is on the ISC
+ * queue, which is executed by the work thread after the task queue.
+ * We don't need to run the datamove delay code, since that should
+ * have been done if need be on the other controller.
+ */
+ mtx_lock(&softc->ctl_lock);
+
+ if (io->io_hdr.flags & CTL_FLAG_ABORT) {
+
+ printf("%s: tag 0x%04x on (%d:%d:%d:%d) aborted\n", __func__,
+ io->scsiio.tag_num, io->io_hdr.nexus.initid.id,
+ io->io_hdr.nexus.targ_port,
+ io->io_hdr.nexus.targ_target.id,
+ io->io_hdr.nexus.targ_lun);
+ io->io_hdr.status = CTL_CMD_ABORTED;
+ io->io_hdr.port_status = 31338;
+
+ mtx_unlock(&softc->ctl_lock);
+
+ ctl_send_datamove_done(io, /*have_lock*/ 0);
+
+ return;
+ }
+
+ if ((io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_OUT) {
+ mtx_unlock(&softc->ctl_lock);
+ ctl_datamove_remote_write(io);
+ } else if ((io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_IN){
+ mtx_unlock(&softc->ctl_lock);
+ ctl_datamove_remote_read(io);
+ } else {
+ union ctl_ha_msg msg;
+ struct scsi_sense_data *sense;
+ uint8_t sks[3];
+ int retry_count;
+
+ memset(&msg, 0, sizeof(msg));
+
+ msg.hdr.msg_type = CTL_MSG_BAD_JUJU;
+ msg.hdr.status = CTL_SCSI_ERROR;
+ msg.scsi.scsi_status = SCSI_STATUS_CHECK_COND;
+
+ retry_count = 4243;
+
+ sense = &msg.scsi.sense_data;
+ sks[0] = SSD_SCS_VALID;
+ sks[1] = (retry_count >> 8) & 0xff;
+ sks[2] = retry_count & 0xff;
+
+ /* "Internal target failure" */
+ scsi_set_sense_data(sense,
+ /*sense_format*/ SSD_TYPE_NONE,
+ /*current_error*/ 1,
+ /*sense_key*/ SSD_KEY_HARDWARE_ERROR,
+ /*asc*/ 0x44,
+ /*ascq*/ 0x00,
+ /*type*/ SSD_ELEM_SKS,
+ /*size*/ sizeof(sks),
+ /*data*/ sks,
+ SSD_ELEM_NONE);
+
+ io->io_hdr.flags &= ~CTL_FLAG_IO_ACTIVE;
+ if (io->io_hdr.flags & CTL_FLAG_FAILOVER) {
+ ctl_failover_io(io, /*have_lock*/ 1);
+ mtx_unlock(&softc->ctl_lock);
+ return;
+ }
+
+ mtx_unlock(&softc->ctl_lock);
+
+ if (ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg, sizeof(msg), 0) >
+ CTL_HA_STATUS_SUCCESS) {
+ /* XXX KDM what to do if this fails? */
+ }
+ return;
+ }
+
+}
+
+static int
+ctl_process_done(union ctl_io *io, int have_lock)
+{
+ struct ctl_lun *lun;
+ struct ctl_softc *ctl_softc;
+ void (*fe_done)(union ctl_io *io);
+ uint32_t targ_port = ctl_port_idx(io->io_hdr.nexus.targ_port);
+
+ CTL_DEBUG_PRINT(("ctl_process_done\n"));
+
+ fe_done =
+ control_softc->ctl_ports[targ_port]->fe_done;
+
+#ifdef CTL_TIME_IO
+ if ((time_uptime - io->io_hdr.start_time) > ctl_time_io_secs) {
+ char str[256];
+ char path_str[64];
+ struct sbuf sb;
+
+ ctl_scsi_path_string(io, path_str, sizeof(path_str));
+ sbuf_new(&sb, str, sizeof(str), SBUF_FIXEDLEN);
+
+ sbuf_cat(&sb, path_str);
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ ctl_scsi_command_string(&io->scsiio, NULL, &sb);
+ sbuf_printf(&sb, "\n");
+ sbuf_cat(&sb, path_str);
+ sbuf_printf(&sb, "Tag: 0x%04x, type %d\n",
+ io->scsiio.tag_num, io->scsiio.tag_type);
+ break;
+ case CTL_IO_TASK:
+ sbuf_printf(&sb, "Task I/O type: %d, Tag: 0x%04x, "
+ "Tag Type: %d\n", io->taskio.task_action,
+ io->taskio.tag_num, io->taskio.tag_type);
+ break;
+ default:
+ printf("Invalid CTL I/O type %d\n", io->io_hdr.io_type);
+ panic("Invalid CTL I/O type %d\n", io->io_hdr.io_type);
+ break;
+ }
+ sbuf_cat(&sb, path_str);
+ sbuf_printf(&sb, "ctl_process_done: %jd seconds\n",
+ (intmax_t)time_uptime - io->io_hdr.start_time);
+ sbuf_finish(&sb);
+ printf("%s", sbuf_data(&sb));
+ }
+#endif /* CTL_TIME_IO */
+
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ break;
+ case CTL_IO_TASK:
+ ctl_io_error_print(io, NULL);
+ if (io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC)
+ ctl_free_io_internal(io, /*have_lock*/ 0);
+ else
+ fe_done(io);
+ return (CTL_RETVAL_COMPLETE);
+ break;
+ default:
+ printf("ctl_process_done: invalid io type %d\n",
+ io->io_hdr.io_type);
+ panic("ctl_process_done: invalid io type %d\n",
+ io->io_hdr.io_type);
+ break; /* NOTREACHED */
+ }
+
+ lun = (struct ctl_lun *)io->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
+ if (lun == NULL) {
+ CTL_DEBUG_PRINT(("NULL LUN for lun %d\n",
+ io->io_hdr.nexus.targ_lun));
+ fe_done(io);
+ goto bailout;
+ }
+ ctl_softc = lun->ctl_softc;
+
+ /*
+ * Remove this from the OOA queue.
+ */
+ if (have_lock == 0)
+ mtx_lock(&ctl_softc->ctl_lock);
+
+ /*
+ * Check to see if we have any errors to inject here. We only
+ * inject errors for commands that don't already have errors set.
+ */
+ if ((STAILQ_FIRST(&lun->error_list) != NULL)
+ && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS))
+ ctl_inject_error(lun, io);
+
+ /*
+ * XXX KDM how do we treat commands that aren't completed
+ * successfully?
+ *
+ * XXX KDM should we also track I/O latency?
+ */
+ if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS) {
+ uint32_t blocksize;
+#ifdef CTL_TIME_IO
+ struct bintime cur_bt;
+#endif
+
+ if ((lun->be_lun != NULL)
+ && (lun->be_lun->blocksize != 0))
+ blocksize = lun->be_lun->blocksize;
+ else
+ blocksize = 512;
+
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI: {
+ int isread;
+ struct ctl_lba_len lbalen;
+
+ isread = 0;
+ switch (io->scsiio.cdb[0]) {
+ case READ_6:
+ case READ_10:
+ case READ_12:
+ case READ_16:
+ isread = 1;
+ /* FALLTHROUGH */
+ case WRITE_6:
+ case WRITE_10:
+ case WRITE_12:
+ case WRITE_16:
+ case WRITE_VERIFY_10:
+ case WRITE_VERIFY_12:
+ case WRITE_VERIFY_16:
+ memcpy(&lbalen, io->io_hdr.ctl_private[
+ CTL_PRIV_LBA_LEN].bytes, sizeof(lbalen));
+
+ if (isread) {
+ lun->stats.ports[targ_port].bytes[CTL_STATS_READ] +=
+ lbalen.len * blocksize;
+ lun->stats.ports[targ_port].operations[CTL_STATS_READ]++;
+
+#ifdef CTL_TIME_IO
+ bintime_add(
+ &lun->stats.ports[targ_port].dma_time[CTL_STATS_READ],
+ &io->io_hdr.dma_bt);
+ lun->stats.ports[targ_port].num_dmas[CTL_STATS_READ] +=
+ io->io_hdr.num_dmas;
+ getbintime(&cur_bt);
+ bintime_sub(&cur_bt,
+ &io->io_hdr.start_bt);
+
+ bintime_add(
+ &lun->stats.ports[targ_port].time[CTL_STATS_READ],
+ &cur_bt);
+
+#if 0
+ cs_prof_gettime(&cur_ticks);
+ lun->stats.time[CTL_STATS_READ] +=
+ cur_ticks -
+ io->io_hdr.start_ticks;
+#endif
+#if 0
+ lun->stats.time[CTL_STATS_READ] +=
+ jiffies - io->io_hdr.start_time;
+#endif
+#endif /* CTL_TIME_IO */
+ } else {
+ lun->stats.ports[targ_port].bytes[CTL_STATS_WRITE] +=
+ lbalen.len * blocksize;
+ lun->stats.ports[targ_port].operations[
+ CTL_STATS_WRITE]++;
+
+#ifdef CTL_TIME_IO
+ bintime_add(
+ &lun->stats.ports[targ_port].dma_time[CTL_STATS_WRITE],
+ &io->io_hdr.dma_bt);
+ lun->stats.ports[targ_port].num_dmas[CTL_STATS_WRITE] +=
+ io->io_hdr.num_dmas;
+ getbintime(&cur_bt);
+ bintime_sub(&cur_bt,
+ &io->io_hdr.start_bt);
+
+ bintime_add(
+ &lun->stats.ports[targ_port].time[CTL_STATS_WRITE],
+ &cur_bt);
+#if 0
+ cs_prof_gettime(&cur_ticks);
+ lun->stats.ports[targ_port].time[CTL_STATS_WRITE] +=
+ cur_ticks -
+ io->io_hdr.start_ticks;
+ lun->stats.ports[targ_port].time[CTL_STATS_WRITE] +=
+ jiffies - io->io_hdr.start_time;
+#endif
+#endif /* CTL_TIME_IO */
+ }
+ break;
+ default:
+ lun->stats.ports[targ_port].operations[CTL_STATS_NO_IO]++;
+
+#ifdef CTL_TIME_IO
+ bintime_add(
+ &lun->stats.ports[targ_port].dma_time[CTL_STATS_NO_IO],
+ &io->io_hdr.dma_bt);
+ lun->stats.ports[targ_port].num_dmas[CTL_STATS_NO_IO] +=
+ io->io_hdr.num_dmas;
+ getbintime(&cur_bt);
+ bintime_sub(&cur_bt, &io->io_hdr.start_bt);
+
+ bintime_add(&lun->stats.ports[targ_port].time[CTL_STATS_NO_IO],
+ &cur_bt);
+
+#if 0
+ cs_prof_gettime(&cur_ticks);
+ lun->stats.ports[targ_port].time[CTL_STATS_NO_IO] +=
+ cur_ticks -
+ io->io_hdr.start_ticks;
+ lun->stats.ports[targ_port].time[CTL_STATS_NO_IO] +=
+ jiffies - io->io_hdr.start_time;
+#endif
+#endif /* CTL_TIME_IO */
+ break;
+ }
+ break;
+ }
+ default:
+ break;
+ }
+ }
+
+ TAILQ_REMOVE(&lun->ooa_queue, &io->io_hdr, ooa_links);
+
+ /*
+ * Run through the blocked queue on this LUN and see if anything
+ * has become unblocked, now that this transaction is done.
+ */
+ ctl_check_blocked(lun);
+
+ /*
+ * If the LUN has been invalidated, free it if there is nothing
+ * left on its OOA queue.
+ */
+ if ((lun->flags & CTL_LUN_INVALID)
+ && (TAILQ_FIRST(&lun->ooa_queue) == NULL))
+ ctl_free_lun(lun);
+
+ /*
+ * If this command has been aborted, make sure we set the status
+ * properly. The FETD is responsible for freeing the I/O and doing
+ * whatever it needs to do to clean up its state.
+ */
+ if (io->io_hdr.flags & CTL_FLAG_ABORT)
+ io->io_hdr.status = CTL_CMD_ABORTED;
+
+ /*
+ * We print out status for every task management command. For SCSI
+ * commands, we filter out any unit attention errors; they happen
+ * on every boot, and would clutter up the log. Note: task
+ * management commands aren't printed here, they are printed above,
+ * since they should never even make it down here.
+ */
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI: {
+ int error_code, sense_key, asc, ascq;
+
+ sense_key = 0;
+
+ if (((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SCSI_ERROR)
+ && (io->scsiio.scsi_status == SCSI_STATUS_CHECK_COND)) {
+ /*
+ * Since this is just for printing, no need to
+ * show errors here.
+ */
+ scsi_extract_sense_len(&io->scsiio.sense_data,
+ io->scsiio.sense_len,
+ &error_code,
+ &sense_key,
+ &asc,
+ &ascq,
+ /*show_errors*/ 0);
+ }
+
+ if (((io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS)
+ && (((io->io_hdr.status & CTL_STATUS_MASK) != CTL_SCSI_ERROR)
+ || (io->scsiio.scsi_status != SCSI_STATUS_CHECK_COND)
+ || (sense_key != SSD_KEY_UNIT_ATTENTION))) {
+
+ if ((time_uptime - ctl_softc->last_print_jiffies) <= 0){
+ ctl_softc->skipped_prints++;
+ if (have_lock == 0)
+ mtx_unlock(&ctl_softc->ctl_lock);
+ } else {
+ uint32_t skipped_prints;
+
+ skipped_prints = ctl_softc->skipped_prints;
+
+ ctl_softc->skipped_prints = 0;
+ ctl_softc->last_print_jiffies = time_uptime;
+
+ if (have_lock == 0)
+ mtx_unlock(&ctl_softc->ctl_lock);
+ if (skipped_prints > 0) {
+#ifdef NEEDTOPORT
+ csevent_log(CSC_CTL | CSC_SHELF_SW |
+ CTL_ERROR_REPORT,
+ csevent_LogType_Trace,
+ csevent_Severity_Information,
+ csevent_AlertLevel_Green,
+ csevent_FRU_Firmware,
+ csevent_FRU_Unknown,
+ "High CTL error volume, %d prints "
+ "skipped", skipped_prints);
+#endif
+ }
+ ctl_io_error_print(io, NULL);
+ }
+ } else {
+ if (have_lock == 0)
+ mtx_unlock(&ctl_softc->ctl_lock);
+ }
+ break;
+ }
+ case CTL_IO_TASK:
+ if (have_lock == 0)
+ mtx_unlock(&ctl_softc->ctl_lock);
+ ctl_io_error_print(io, NULL);
+ break;
+ default:
+ if (have_lock == 0)
+ mtx_unlock(&ctl_softc->ctl_lock);
+ break;
+ }
+
+ /*
+ * Tell the FETD or the other shelf controller we're done with this
+ * command. Note that only SCSI commands get to this point. Task
+ * management commands are completed above.
+ *
+ * We only send status to the other controller if we're in XFER
+ * mode. In SER_ONLY mode, the I/O is done on the controller that
+ * received the I/O (from CTL's perspective), and so the status is
+ * generated there.
+ *
+ * XXX KDM if we hold the lock here, we could cause a deadlock
+ * if the frontend comes back in in this context to queue
+ * something.
+ */
+ if ((ctl_softc->ha_mode == CTL_HA_MODE_XFER)
+ && (io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC)) {
+ union ctl_ha_msg msg;
+
+ memset(&msg, 0, sizeof(msg));
+ msg.hdr.msg_type = CTL_MSG_FINISH_IO;
+ msg.hdr.original_sc = io->io_hdr.original_sc;
+ msg.hdr.nexus = io->io_hdr.nexus;
+ msg.hdr.status = io->io_hdr.status;
+ msg.scsi.scsi_status = io->scsiio.scsi_status;
+ msg.scsi.tag_num = io->scsiio.tag_num;
+ msg.scsi.tag_type = io->scsiio.tag_type;
+ msg.scsi.sense_len = io->scsiio.sense_len;
+ msg.scsi.sense_residual = io->scsiio.sense_residual;
+ msg.scsi.residual = io->scsiio.residual;
+ memcpy(&msg.scsi.sense_data, &io->scsiio.sense_data,
+ sizeof(io->scsiio.sense_data));
+ /*
+ * We copy this whether or not this is an I/O-related
+ * command. Otherwise, we'd have to go and check to see
+ * whether it's a read/write command, and it really isn't
+ * worth it.
+ */
+ memcpy(&msg.scsi.lbalen,
+ &io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].bytes,
+ sizeof(msg.scsi.lbalen));;
+
+ if (ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg,
+ sizeof(msg), 0) > CTL_HA_STATUS_SUCCESS) {
+ /* XXX do something here */
+ }
+
+ ctl_free_io_internal(io, /*have_lock*/ 0);
+ } else
+ fe_done(io);
+
+bailout:
+
+ return (CTL_RETVAL_COMPLETE);
+}
+
+/*
+ * Front end should call this if it doesn't do autosense. When the request
+ * sense comes back in from the initiator, we'll dequeue this and send it.
+ */
+int
+ctl_queue_sense(union ctl_io *io)
+{
+ struct ctl_lun *lun;
+ struct ctl_softc *ctl_softc;
+ uint32_t initidx;
+
+ ctl_softc = control_softc;
+
+ CTL_DEBUG_PRINT(("ctl_queue_sense\n"));
+
+ /*
+ * LUN lookup will likely move to the ctl_work_thread() once we
+ * have our new queueing infrastructure (that doesn't put things on
+ * a per-LUN queue initially). That is so that we can handle
+ * things like an INQUIRY to a LUN that we don't have enabled. We
+ * can't deal with that right now.
+ */
+ mtx_lock(&ctl_softc->ctl_lock);
+
+ /*
+ * If we don't have a LUN for this, just toss the sense
+ * information.
+ */
+ if ((io->io_hdr.nexus.targ_lun < CTL_MAX_LUNS)
+ && (ctl_softc->ctl_luns[io->io_hdr.nexus.targ_lun] != NULL))
+ lun = ctl_softc->ctl_luns[io->io_hdr.nexus.targ_lun];
+ else
+ goto bailout;
+
+ initidx = ctl_get_initindex(&io->io_hdr.nexus);
+
+ /*
+ * Already have CA set for this LUN...toss the sense information.
+ */
+ if (ctl_is_set(lun->have_ca, initidx))
+ goto bailout;
+
+ memcpy(&lun->pending_sense[initidx].sense, &io->scsiio.sense_data,
+ ctl_min(sizeof(lun->pending_sense[initidx].sense),
+ sizeof(io->scsiio.sense_data)));
+ ctl_set_mask(lun->have_ca, initidx);
+
+bailout:
+ mtx_unlock(&ctl_softc->ctl_lock);
+
+ ctl_free_io(io);
+
+ return (CTL_RETVAL_COMPLETE);
+}
+
+/*
+ * Primary command inlet from frontend ports. All SCSI and task I/O
+ * requests must go through this function.
+ */
+int
+ctl_queue(union ctl_io *io)
+{
+ struct ctl_softc *ctl_softc;
+
+ CTL_DEBUG_PRINT(("ctl_queue cdb[0]=%02X\n", io->scsiio.cdb[0]));
+
+ ctl_softc = control_softc;
+
+#ifdef CTL_TIME_IO
+ io->io_hdr.start_time = time_uptime;
+ getbintime(&io->io_hdr.start_bt);
+#endif /* CTL_TIME_IO */
+
+ mtx_lock(&ctl_softc->ctl_lock);
+
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ STAILQ_INSERT_TAIL(&ctl_softc->incoming_queue, &io->io_hdr,
+ links);
+ break;
+ case CTL_IO_TASK:
+ STAILQ_INSERT_TAIL(&ctl_softc->task_queue, &io->io_hdr, links);
+ /*
+ * Set the task pending flag. This is necessary to close a
+ * race condition with the FETD:
+ *
+ * - FETD submits a task management command, like an abort.
+ * - Back end calls fe_datamove() to move the data for the
+ * aborted command. The FETD can't really accept it, but
+ * if it did, it would end up transmitting data for a
+ * command that the initiator told us to abort.
+ *
+ * We close the race condition by setting the flag here,
+ * and checking it in ctl_datamove(), before calling the
+ * FETD's fe_datamove routine. If we've got a task
+ * pending, we run the task queue and then check to see
+ * whether our particular I/O has been aborted.
+ */
+ ctl_softc->flags |= CTL_FLAG_TASK_PENDING;
+ break;
+ default:
+ mtx_unlock(&ctl_softc->ctl_lock);
+ printf("ctl_queue: unknown I/O type %d\n", io->io_hdr.io_type);
+ return (-EINVAL);
+ break; /* NOTREACHED */
+ }
+ mtx_unlock(&ctl_softc->ctl_lock);
+
+ ctl_wakeup_thread();
+
+ return (CTL_RETVAL_COMPLETE);
+}
+
+#ifdef CTL_IO_DELAY
+static void
+ctl_done_timer_wakeup(void *arg)
+{
+ union ctl_io *io;
+
+ io = (union ctl_io *)arg;
+ ctl_done_lock(io, /*have_lock*/ 0);
+}
+#endif /* CTL_IO_DELAY */
+
+void
+ctl_done_lock(union ctl_io *io, int have_lock)
+{
+ struct ctl_softc *ctl_softc;
+#ifndef CTL_DONE_THREAD
+ union ctl_io *xio;
+#endif /* !CTL_DONE_THREAD */
+
+ ctl_softc = control_softc;
+
+ if (have_lock == 0)
+ mtx_lock(&ctl_softc->ctl_lock);
+
+ /*
+ * Enable this to catch duplicate completion issues.
+ */
+#if 0
+ if (io->io_hdr.flags & CTL_FLAG_ALREADY_DONE) {
+ printf("%s: type %d msg %d cdb %x iptl: "
+ "%d:%d:%d:%d tag 0x%04x "
+ "flag %#x status %x\n",
+ __func__,
+ io->io_hdr.io_type,
+ io->io_hdr.msg_type,
+ io->scsiio.cdb[0],
+ io->io_hdr.nexus.initid.id,
+ io->io_hdr.nexus.targ_port,
+ io->io_hdr.nexus.targ_target.id,
+ io->io_hdr.nexus.targ_lun,
+ (io->io_hdr.io_type ==
+ CTL_IO_TASK) ?
+ io->taskio.tag_num :
+ io->scsiio.tag_num,
+ io->io_hdr.flags,
+ io->io_hdr.status);
+ } else
+ io->io_hdr.flags |= CTL_FLAG_ALREADY_DONE;
+#endif
+
+ /*
+ * This is an internal copy of an I/O, and should not go through
+ * the normal done processing logic.
+ */
+ if (io->io_hdr.flags & CTL_FLAG_INT_COPY) {
+ if (have_lock == 0)
+ mtx_unlock(&ctl_softc->ctl_lock);
+ return;
+ }
+
+ /*
+ * We need to send a msg to the serializing shelf to finish the IO
+ * as well. We don't send a finish message to the other shelf if
+ * this is a task management command. Task management commands
+ * aren't serialized in the OOA queue, but rather just executed on
+ * both shelf controllers for commands that originated on that
+ * controller.
+ */
+ if ((io->io_hdr.flags & CTL_FLAG_SENT_2OTHER_SC)
+ && (io->io_hdr.io_type != CTL_IO_TASK)) {
+ union ctl_ha_msg msg_io;
+
+ msg_io.hdr.msg_type = CTL_MSG_FINISH_IO;
+ msg_io.hdr.serializing_sc = io->io_hdr.serializing_sc;
+ if (ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_io,
+ sizeof(msg_io), 0 ) != CTL_HA_STATUS_SUCCESS) {
+ }
+ /* continue on to finish IO */
+ }
+#ifdef CTL_IO_DELAY
+ if (io->io_hdr.flags & CTL_FLAG_DELAY_DONE) {
+ struct ctl_lun *lun;
+
+ lun =(struct ctl_lun *)io->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
+
+ io->io_hdr.flags &= ~CTL_FLAG_DELAY_DONE;
+ } else {
+ struct ctl_lun *lun;
+
+ lun =(struct ctl_lun *)io->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
+
+ if ((lun != NULL)
+ && (lun->delay_info.done_delay > 0)) {
+ struct callout *callout;
+
+ callout = (struct callout *)&io->io_hdr.timer_bytes;
+ callout_init(callout, /*mpsafe*/ 1);
+ io->io_hdr.flags |= CTL_FLAG_DELAY_DONE;
+ callout_reset(callout,
+ lun->delay_info.done_delay * hz,
+ ctl_done_timer_wakeup, io);
+ if (lun->delay_info.done_type == CTL_DELAY_TYPE_ONESHOT)
+ lun->delay_info.done_delay = 0;
+ if (have_lock == 0)
+ mtx_unlock(&ctl_softc->ctl_lock);
+ return;
+ }
+ }
+#endif /* CTL_IO_DELAY */
+
+ STAILQ_INSERT_TAIL(&ctl_softc->done_queue, &io->io_hdr, links);
+
+#ifdef CTL_DONE_THREAD
+ if (have_lock == 0)
+ mtx_unlock(&ctl_softc->ctl_lock);
+
+ ctl_wakeup_thread();
+#else /* CTL_DONE_THREAD */
+ for (xio = (union ctl_io *)STAILQ_FIRST(&ctl_softc->done_queue);
+ xio != NULL;
+ xio =(union ctl_io *)STAILQ_FIRST(&ctl_softc->done_queue)) {
+
+ STAILQ_REMOVE_HEAD(&ctl_softc->done_queue, links);
+
+ ctl_process_done(xio, /*have_lock*/ 1);
+ }
+ if (have_lock == 0)
+ mtx_unlock(&ctl_softc->ctl_lock);
+#endif /* CTL_DONE_THREAD */
+}
+
+void
+ctl_done(union ctl_io *io)
+{
+ ctl_done_lock(io, /*have_lock*/ 0);
+}
+
+int
+ctl_isc(struct ctl_scsiio *ctsio)
+{
+ struct ctl_lun *lun;
+ int retval;
+
+ lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
+
+ CTL_DEBUG_PRINT(("ctl_isc: command: %02x\n", ctsio->cdb[0]));
+
+ CTL_DEBUG_PRINT(("ctl_isc: calling data_submit()\n"));
+
+ retval = lun->backend->data_submit((union ctl_io *)ctsio);
+
+ return (retval);
+}
+
+
+static void
+ctl_work_thread(void *arg)
+{
+ struct ctl_softc *softc;
+ union ctl_io *io;
+ struct ctl_be_lun *be_lun;
+ int retval;
+
+ CTL_DEBUG_PRINT(("ctl_work_thread starting\n"));
+
+ softc = (struct ctl_softc *)arg;
+ if (softc == NULL)
+ return;
+
+ mtx_lock(&softc->ctl_lock);
+ for (;;) {
+ retval = 0;
+
+ /*
+ * We handle the queues in this order:
+ * - task management
+ * - ISC
+ * - done queue (to free up resources, unblock other commands)
+ * - RtR queue
+ * - incoming queue
+ *
+ * If those queues are empty, we break out of the loop and
+ * go to sleep.
+ */
+ io = (union ctl_io *)STAILQ_FIRST(&softc->task_queue);
+ if (io != NULL) {
+ ctl_run_task_queue(softc);
+ continue;
+ }
+ io = (union ctl_io *)STAILQ_FIRST(&softc->isc_queue);
+ if (io != NULL) {
+ STAILQ_REMOVE_HEAD(&softc->isc_queue, links);
+ ctl_handle_isc(io);
+ continue;
+ }
+ io = (union ctl_io *)STAILQ_FIRST(&softc->done_queue);
+ if (io != NULL) {
+ STAILQ_REMOVE_HEAD(&softc->done_queue, links);
+ /* clear any blocked commands, call fe_done */
+ mtx_unlock(&softc->ctl_lock);
+ /*
+ * XXX KDM
+ * Call this without a lock for now. This will
+ * depend on whether there is any way the FETD can
+ * sleep or deadlock if called with the CTL lock
+ * held.
+ */
+ retval = ctl_process_done(io, /*have_lock*/ 0);
+ mtx_lock(&softc->ctl_lock);
+ continue;
+ }
+ if (!ctl_pause_rtr) {
+ io = (union ctl_io *)STAILQ_FIRST(&softc->rtr_queue);
+ if (io != NULL) {
+ STAILQ_REMOVE_HEAD(&softc->rtr_queue, links);
+ mtx_unlock(&softc->ctl_lock);
+ goto execute;
+ }
+ }
+ io = (union ctl_io *)STAILQ_FIRST(&softc->incoming_queue);
+ if (io != NULL) {
+ STAILQ_REMOVE_HEAD(&softc->incoming_queue, links);
+ mtx_unlock(&softc->ctl_lock);
+ ctl_scsiio_precheck(softc, &io->scsiio);
+ mtx_lock(&softc->ctl_lock);
+ continue;
+ }
+ /*
+ * We might want to move this to a separate thread, so that
+ * configuration requests (in this case LUN creations)
+ * won't impact the I/O path.
+ */
+ be_lun = STAILQ_FIRST(&softc->pending_lun_queue);
+ if (be_lun != NULL) {
+ STAILQ_REMOVE_HEAD(&softc->pending_lun_queue, links);
+ mtx_unlock(&softc->ctl_lock);
+ ctl_create_lun(be_lun);
+ mtx_lock(&softc->ctl_lock);
+ continue;
+ }
+
+ /* XXX KDM use the PDROP flag?? */
+ /* Sleep until we have something to do. */
+ mtx_sleep(softc, &softc->ctl_lock, PRIBIO, "ctl_work", 0);
+
+ /* Back to the top of the loop to see what woke us up. */
+ continue;
+
+execute:
+ retval = ctl_scsiio(&io->scsiio);
+ switch (retval) {
+ case CTL_RETVAL_COMPLETE:
+ break;
+ default:
+ /*
+ * Probably need to make sure this doesn't happen.
+ */
+ break;
+ }
+ mtx_lock(&softc->ctl_lock);
+ }
+}
+
+void
+ctl_wakeup_thread()
+{
+ struct ctl_softc *softc;
+
+ softc = control_softc;
+
+ wakeup(softc);
+}
+
+/* Initialization and failover */
+
+void
+ctl_init_isc_msg(void)
+{
+ printf("CTL: Still calling this thing\n");
+}
+
+/*
+ * Init component
+ * Initializes component into configuration defined by bootMode
+ * (see hasc-sv.c)
+ * returns hasc_Status:
+ * OK
+ * ERROR - fatal error
+ */
+static ctl_ha_comp_status
+ctl_isc_init(struct ctl_ha_component *c)
+{
+ ctl_ha_comp_status ret = CTL_HA_COMP_STATUS_OK;
+
+ c->status = ret;
+ return ret;
+}
+
+/* Start component
+ * Starts component in state requested. If component starts successfully,
+ * it must set its own state to the requestrd state
+ * When requested state is HASC_STATE_HA, the component may refine it
+ * by adding _SLAVE or _MASTER flags.
+ * Currently allowed state transitions are:
+ * UNKNOWN->HA - initial startup
+ * UNKNOWN->SINGLE - initial startup when no parter detected
+ * HA->SINGLE - failover
+ * returns ctl_ha_comp_status:
+ * OK - component successfully started in requested state
+ * FAILED - could not start the requested state, failover may
+ * be possible
+ * ERROR - fatal error detected, no future startup possible
+ */
+static ctl_ha_comp_status
+ctl_isc_start(struct ctl_ha_component *c, ctl_ha_state state)
+{
+ ctl_ha_comp_status ret = CTL_HA_COMP_STATUS_OK;
+
+ // UNKNOWN->HA or UNKNOWN->SINGLE (bootstrap)
+ if (c->state == CTL_HA_STATE_UNKNOWN ) {
+ ctl_is_single = 0;
+ if (ctl_ha_msg_create(CTL_HA_CHAN_CTL, ctl_isc_event_handler)
+ != CTL_HA_STATUS_SUCCESS) {
+ printf("ctl_isc_start: ctl_ha_msg_create failed.\n");
+ ret = CTL_HA_COMP_STATUS_ERROR;
+ }
+ } else if (CTL_HA_STATE_IS_HA(c->state)
+ && CTL_HA_STATE_IS_SINGLE(state)){
+ // HA->SINGLE transition
+ ctl_failover();
+ ctl_is_single = 1;
+ } else {
+ printf("ctl_isc_start:Invalid state transition %X->%X\n",
+ c->state, state);
+ ret = CTL_HA_COMP_STATUS_ERROR;
+ }
+ if (CTL_HA_STATE_IS_SINGLE(state))
+ ctl_is_single = 1;
+
+ c->state = state;
+ c->status = ret;
+ return ret;
+}
+
+/*
+ * Quiesce component
+ * The component must clear any error conditions (set status to OK) and
+ * prepare itself to another Start call
+ * returns ctl_ha_comp_status:
+ * OK
+ * ERROR
+ */
+static ctl_ha_comp_status
+ctl_isc_quiesce(struct ctl_ha_component *c)
+{
+ int ret = CTL_HA_COMP_STATUS_OK;
+
+ ctl_pause_rtr = 1;
+ c->status = ret;
+ return ret;
+}
+
+struct ctl_ha_component ctl_ha_component_ctlisc =
+{
+ .name = "CTL ISC",
+ .state = CTL_HA_STATE_UNKNOWN,
+ .init = ctl_isc_init,
+ .start = ctl_isc_start,
+ .quiesce = ctl_isc_quiesce
+};
+
+/*
+ * vim: ts=8
+ */
diff --git a/sys/cam/ctl/ctl.h b/sys/cam/ctl/ctl.h
new file mode 100644
index 0000000..0f7656f
--- /dev/null
+++ b/sys/cam/ctl/ctl.h
@@ -0,0 +1,216 @@
+/*-
+ * Copyright (c) 2003 Silicon Graphics International Corp.
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl.h#5 $
+ * $FreeBSD$
+ */
+/*
+ * Function definitions used both within CTL and potentially in various CTL
+ * clients.
+ *
+ * Author: Ken Merry <ken@FreeBSD.org>
+ */
+
+#ifndef _CTL_H_
+#define _CTL_H_
+
+#define ctl_min(x,y) (((x) < (y)) ? (x) : (y))
+#define CTL_RETVAL_COMPLETE 0
+#define CTL_RETVAL_QUEUED 1
+#define CTL_RETVAL_ALLOCATED 2
+#define CTL_RETVAL_ERROR 3
+
+typedef enum {
+ CTL_PORT_NONE = 0x00,
+ CTL_PORT_FC = 0x01,
+ CTL_PORT_SCSI = 0x02,
+ CTL_PORT_IOCTL = 0x04,
+ CTL_PORT_INTERNAL = 0x08,
+ CTL_PORT_ALL = 0xff,
+ CTL_PORT_ISC = 0x100 // FC port for inter-shelf communication
+} ctl_port_type;
+
+struct ctl_port_entry {
+ ctl_port_type port_type;
+ char port_name[64];
+ int32_t targ_port;
+ int physical_port;
+ int virtual_port;
+ u_int flags;
+#define CTL_PORT_WWNN_VALID 0x01
+#define CTL_PORT_WWPN_VALID 0x02
+ uint64_t wwnn;
+ uint64_t wwpn;
+ int online;
+};
+
+struct ctl_modepage_header {
+ uint8_t page_code;
+ uint8_t subpage;
+ int32_t len_used;
+ int32_t len_left;
+};
+
+struct ctl_modepage_aps {
+ struct ctl_modepage_header header;
+ uint8_t lock_active;
+};
+
+union ctl_modepage_info {
+ struct ctl_modepage_header header;
+ struct ctl_modepage_aps aps;
+};
+
+/*
+ * Serial number length, for VPD page 0x80.
+ */
+#define CTL_SN_LEN 16
+
+/*
+ * Device ID length, for VPD page 0x83.
+ */
+#define CTL_DEVID_LEN 16
+/*
+ * WWPN length, for VPD page 0x83.
+ */
+#define CTL_WWPN_LEN 8
+
+/*
+ * Unit attention types. ASC/ASCQ values for these should be placed in
+ * ctl_build_ua. These are also listed in order of reporting priority.
+ * i.e. a poweron UA is reported first, bus reset second, etc.
+ */
+typedef enum {
+ CTL_UA_NONE = 0x0000,
+ CTL_UA_POWERON = 0x0001,
+ CTL_UA_BUS_RESET = 0x0002,
+ CTL_UA_TARG_RESET = 0x0004,
+ CTL_UA_LUN_RESET = 0x0008,
+ CTL_UA_LUN_CHANGE = 0x0010,
+ CTL_UA_MODE_CHANGE = 0x0020,
+ CTL_UA_LOG_CHANGE = 0x0040,
+ CTL_UA_LVD = 0x0080,
+ CTL_UA_SE = 0x0100,
+ CTL_UA_RES_PREEMPT = 0x0200,
+ CTL_UA_RES_RELEASE = 0x0400,
+ CTL_UA_REG_PREEMPT = 0x0800,
+ CTL_UA_ASYM_ACC_CHANGE = 0x1000
+} ctl_ua_type;
+
+#ifdef _KERNEL
+
+MALLOC_DECLARE(M_CTL);
+
+typedef enum {
+ CTL_THREAD_NONE = 0x00,
+ CTL_THREAD_WAKEUP = 0x01
+} ctl_thread_flags;
+
+struct ctl_thread {
+ void (*thread_func)(void *arg);
+ void *arg;
+ struct cv wait_queue;
+ const char *thread_name;
+ ctl_thread_flags thread_flags;
+ struct completion *thread_event;
+ struct task_struct *task;
+};
+
+struct ctl_page_index;
+
+#ifdef SYSCTL_DECL /* from sysctl.h */
+SYSCTL_DECL(_kern_cam_ctl);
+#endif
+
+/*
+ * Call these routines to enable or disable front end ports.
+ */
+int ctl_port_enable(ctl_port_type port_type);
+int ctl_port_disable(ctl_port_type port_type);
+/*
+ * This routine grabs a list of frontend ports.
+ */
+int ctl_port_list(struct ctl_port_entry *entries, int num_entries_alloced,
+ int *num_entries_filled, int *num_entries_dropped,
+ ctl_port_type port_type, int no_virtual);
+
+/*
+ * Put a string into an sbuf, escaping characters that are illegal or not
+ * recommended in XML. Note this doesn't escape everything, just > < and &.
+ */
+int ctl_sbuf_printf_esc(struct sbuf *sb, char *str);
+
+int ctl_ffz(uint32_t *mask, uint32_t size);
+int ctl_set_mask(uint32_t *mask, uint32_t bit);
+int ctl_clear_mask(uint32_t *mask, uint32_t bit);
+int ctl_is_set(uint32_t *mask, uint32_t bit);
+int ctl_control_page_handler(struct ctl_scsiio *ctsio,
+ struct ctl_page_index *page_index,
+ uint8_t *page_ptr);
+/**
+int ctl_failover_sp_handler(struct ctl_scsiio *ctsio,
+ struct ctl_page_index *page_index,
+ uint8_t *page_ptr);
+**/
+int ctl_power_sp_handler(struct ctl_scsiio *ctsio,
+ struct ctl_page_index *page_index, uint8_t *page_ptr);
+int ctl_power_sp_sense_handler(struct ctl_scsiio *ctsio,
+ struct ctl_page_index *page_index, int pc);
+int ctl_aps_sp_handler(struct ctl_scsiio *ctsio,
+ struct ctl_page_index *page_index, uint8_t *page_ptr);
+int ctl_debugconf_sp_sense_handler(struct ctl_scsiio *ctsio,
+ struct ctl_page_index *page_index,
+ int pc);
+int ctl_debugconf_sp_select_handler(struct ctl_scsiio *ctsio,
+ struct ctl_page_index *page_index,
+ uint8_t *page_ptr);
+int ctl_config_move_done(union ctl_io *io);
+void ctl_datamove(union ctl_io *io);
+void ctl_done(union ctl_io *io);
+void ctl_config_write_done(union ctl_io *io);
+#if 0
+int ctl_thread(void *arg);
+#endif
+void ctl_wakeup_thread(void);
+#if 0
+struct ctl_thread *ctl_create_thread(void (*thread_func)
+ (void *thread_arg), void *thread_arg, const char *thread_name);
+void ctl_signal_thread(struct ctl_thread *thread);
+void ctl_shutdown_thread(struct ctl_thread *thread);
+#endif
+void ctl_portDB_changed(int portnum);
+void ctl_init_isc_msg(void);
+
+#endif /* _KERNEL */
+
+#endif /* _CTL_H_ */
+
+/*
+ * vim: ts=8
+ */
diff --git a/sys/cam/ctl/ctl_backend.c b/sys/cam/ctl/ctl_backend.c
new file mode 100644
index 0000000..cd0d6cc
--- /dev/null
+++ b/sys/cam/ctl/ctl_backend.c
@@ -0,0 +1,177 @@
+/*-
+ * Copyright (c) 2003 Silicon Graphics International Corp.
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_backend.c#3 $
+ */
+/*
+ * CTL backend driver registration routines
+ *
+ * Author: Ken Merry <ken@FreeBSD.org>
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/kernel.h>
+#include <sys/types.h>
+#include <sys/malloc.h>
+#include <sys/lock.h>
+#include <sys/mutex.h>
+#include <sys/condvar.h>
+#include <sys/queue.h>
+
+#include <cam/scsi/scsi_all.h>
+#include <cam/scsi/scsi_da.h>
+#include <cam/ctl/ctl_io.h>
+#include <cam/ctl/ctl.h>
+#include <cam/ctl/ctl_frontend.h>
+#include <cam/ctl/ctl_backend.h>
+#include <cam/ctl/ctl_frontend_internal.h>
+#include <cam/ctl/ctl_ioctl.h>
+#include <cam/ctl/ctl_ha.h>
+#include <cam/ctl/ctl_private.h>
+#include <cam/ctl/ctl_debug.h>
+
+extern struct ctl_softc *control_softc;
+
+int
+ctl_backend_register(struct ctl_backend_driver *be)
+{
+ struct ctl_softc *ctl_softc;
+ struct ctl_backend_driver *be_tmp;
+
+ ctl_softc = control_softc;
+
+ mtx_lock(&ctl_softc->ctl_lock);
+ /*
+ * Sanity check, make sure this isn't a duplicate registration.
+ */
+ STAILQ_FOREACH(be_tmp, &ctl_softc->be_list, links) {
+ if (strcmp(be_tmp->name, be->name) == 0) {
+ mtx_unlock(&ctl_softc->ctl_lock);
+ return (-1);
+ }
+ }
+ mtx_unlock(&ctl_softc->ctl_lock);
+
+ /*
+ * Call the backend's initialization routine.
+ */
+ be->init();
+
+ mtx_lock(&ctl_softc->ctl_lock);
+
+ STAILQ_INSERT_TAIL(&ctl_softc->be_list, be, links);
+
+ ctl_softc->num_backends++;
+
+ /*
+ * Don't want to increment the usage count for internal consumers,
+ * we won't be able to unload otherwise.
+ */
+ /* XXX KDM find a substitute for this? */
+#if 0
+ if ((be->flags & CTL_BE_FLAG_INTERNAL) == 0)
+ MOD_INC_USE_COUNT;
+#endif
+
+#ifdef CS_BE_CONFIG_MOVE_DONE_IS_NOT_USED
+ be->config_move_done = ctl_config_move_done;
+#endif
+ /* XXX KDM fix this! */
+ be->num_luns = 0;
+#if 0
+ atomic_set(&be->num_luns, 0);
+#endif
+
+ mtx_unlock(&ctl_softc->ctl_lock);
+
+ return (0);
+}
+
+int
+ctl_backend_deregister(struct ctl_backend_driver *be)
+{
+ struct ctl_softc *ctl_softc;
+
+ ctl_softc = control_softc;
+
+ mtx_lock(&ctl_softc->ctl_lock);
+
+#if 0
+ if (atomic_read(&be->num_luns) != 0) {
+#endif
+ /* XXX KDM fix this! */
+ if (be->num_luns != 0) {
+ mtx_unlock(&ctl_softc->ctl_lock);
+ return (-1);
+ }
+
+ STAILQ_REMOVE(&ctl_softc->be_list, be, ctl_backend_driver, links);
+
+ ctl_softc->num_backends--;
+
+ /* XXX KDM find a substitute for this? */
+#if 0
+ if ((be->flags & CTL_BE_FLAG_INTERNAL) == 0)
+ MOD_DEC_USE_COUNT;
+#endif
+
+ mtx_unlock(&ctl_softc->ctl_lock);
+
+ return (0);
+}
+
+struct ctl_backend_driver *
+ctl_backend_find(char *backend_name)
+{
+ struct ctl_softc *ctl_softc;
+ struct ctl_backend_driver *be_tmp;
+
+ ctl_softc = control_softc;
+
+ mtx_lock(&ctl_softc->ctl_lock);
+
+ STAILQ_FOREACH(be_tmp, &ctl_softc->be_list, links) {
+ if (strcmp(be_tmp->name, backend_name) == 0) {
+ mtx_unlock(&ctl_softc->ctl_lock);
+ return (be_tmp);
+ }
+ }
+
+ mtx_unlock(&ctl_softc->ctl_lock);
+
+ return (NULL);
+}
+
+/*
+ * vim: ts=8
+ */
diff --git a/sys/cam/ctl/ctl_backend.h b/sys/cam/ctl/ctl_backend.h
new file mode 100644
index 0000000..e33b42b
--- /dev/null
+++ b/sys/cam/ctl/ctl_backend.h
@@ -0,0 +1,288 @@
+/*-
+ * Copyright (c) 2003 Silicon Graphics International Corp.
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_backend.h#2 $
+ * $FreeBSD$
+ */
+/*
+ * CTL backend driver definitions
+ *
+ * Author: Ken Merry <ken@FreeBSD.org>
+ */
+
+#ifndef _CTL_BACKEND_H_
+#define _CTL_BACKEND_H_
+
+/*
+ * XXX KDM move this to another header file?
+ */
+#define CTL_BE_NAME_LEN 32
+
+/*
+ * The ID_REQ flag is used to say that the caller has requested a
+ * particular LUN ID in the req_lun_id field. If we cannot allocate that
+ * LUN ID, the ctl_add_lun() call will fail.
+ *
+ * The POWERED_OFF flag tells us that the LUN should default to the powered
+ * off state. It will return 0x04,0x02 until it is powered up. ("Logical
+ * unit not ready, initializing command required.")
+ *
+ * The INOPERABLE flag tells us that this LUN is not operable for whatever
+ * reason. This means that user data may have been (or has been?) lost.
+ * We will return 0x31,0x00 ("Medium format corrupted") until the host
+ * issues a FORMAT UNIT command to clear the error.
+ *
+ * The PRIMARY flag tells us that this LUN is registered as a Primary LUN
+ * which is accessible via the Master shelf controller in an HA. This flag
+ * being set indicates a Primary LUN. This flag being reset represents a
+ * Secondary LUN controlled by the Secondary controller in an HA
+ * configuration. Flag is applicable at this time to T_DIRECT types.
+ *
+ * The SERIAL_NUM flag tells us that the serial_num field is filled in and
+ * valid for use in SCSI INQUIRY VPD page 0x80.
+ *
+ * The DEVID flag tells us that the device_id field is filled in and
+ * valid for use in SCSI INQUIRY VPD page 0x83.
+ *
+ * The DEV_TYPE flag tells us that the device_type field is filled in.
+ */
+typedef enum {
+ CTL_LUN_FLAG_ID_REQ = 0x01,
+ CTL_LUN_FLAG_POWERED_OFF = 0x02,
+ CTL_LUN_FLAG_INOPERABLE = 0x04,
+ CTL_LUN_FLAG_PRIMARY = 0x08,
+ CTL_LUN_FLAG_SERIAL_NUM = 0x10,
+ CTL_LUN_FLAG_DEVID = 0x20,
+ CTL_LUN_FLAG_DEV_TYPE = 0x40
+} ctl_backend_lun_flags;
+
+#ifdef _KERNEL
+
+#define CTL_BACKEND_DECLARE(name, driver) \
+ static int name ## _modevent(module_t mod, int type, void *data) \
+ { \
+ switch (type) { \
+ case MOD_LOAD: \
+ ctl_backend_register( \
+ (struct ctl_backend_driver *)data); \
+ break; \
+ case MOD_UNLOAD: \
+ printf(#name " module unload - not possible for this module type\n"); \
+ return EINVAL; \
+ default: \
+ return EOPNOTSUPP; \
+ } \
+ return 0; \
+ } \
+ static moduledata_t name ## _mod = { \
+ #name, \
+ name ## _modevent, \
+ (void *)&driver \
+ }; \
+ DECLARE_MODULE(name, name ## _mod, SI_SUB_CONFIGURE, SI_ORDER_FOURTH); \
+ MODULE_DEPEND(name, ctl, 1, 1, 1); \
+ MODULE_DEPEND(name, cam, 1, 1, 1)
+
+
+typedef enum {
+ CTL_LUN_CONFIG_OK,
+ CTL_LUN_CONFIG_FAILURE
+} ctl_lun_config_status;
+
+typedef void (*be_callback_t)(void *be_lun);
+typedef void (*be_lun_config_t)(void *be_lun,
+ ctl_lun_config_status status);
+
+/*
+ * The lun_type field is the SCSI device type of this particular LUN. In
+ * general, this should be T_DIRECT, although backends will want to create
+ * a processor LUN, typically at LUN 0. See scsi_all.h for the defines for
+ * the various SCSI device types.
+ *
+ * The flags are described above.
+ *
+ * The be_lun field is the backend driver's own context that will get
+ * passsed back so that it can tell which LUN CTL is referencing.
+ *
+ * maxlba is the maximum accessible LBA on the LUN. Note that this is
+ * different from the capacity of the array. capacity = maxlba + 1
+ *
+ * blocksize is the size, in bytes, of each LBA on the LUN. In general
+ * this should be 512. In theory CTL should be able to handle other block
+ * sizes. Host application software may not deal with it very well, though.
+ *
+ * req_lun_id is the requested LUN ID. CTL only pays attention to this
+ * field if the CTL_LUN_FLAG_ID_REQ flag is set. If the requested LUN ID is
+ * not available, the LUN addition will fail. If a particular LUN ID isn't
+ * requested, the first available LUN ID will be allocated.
+ *
+ * serial_num is the device serial number returned in the SCSI INQUIRY VPD
+ * page 0x80. This should be a unique, per-shelf value. The data inside
+ * this field should be ASCII only, left aligned, and any unused space
+ * should be padded out with ASCII spaces. This field should NOT be NULL
+ * terminated.
+ *
+ * device_id is the T10 device identifier returned in the SCSI INQUIRY VPD
+ * page 0x83. This should be a unique, per-LUN value. The data inside
+ * this field should be ASCII only, left aligned, and any unused space
+ * should be padded with ASCII spaces. This field should NOT be NULL
+ * terminated.
+ *
+ * The lun_shutdown() method is the callback for the ctl_invalidate_lun()
+ * call. It is called when all outstanding I/O for that LUN has been
+ * completed and CTL has deleted the resources for that LUN. When the CTL
+ * backend gets this call, it can safely free its per-LUN resources.
+ *
+ * The lun_config_status() method is the callback for the ctl_add_lun()
+ * call. It is called when the LUN is successfully added, or when LUN
+ * addition fails. If the LUN is successfully added, the backend may call
+ * the ctl_enable_lun() method to enable the LUN.
+ *
+ * The be field is a pointer to the ctl_backend_driver structure, which
+ * contains the backend methods to be called by CTL.
+ *
+ * The ctl_lun field is for CTL internal use only, and should not be used
+ * by the backend.
+ *
+ * The links field is for CTL internal use only, and should not be used by
+ * the backend.
+ */
+struct ctl_be_lun {
+ uint8_t lun_type; /* passed to CTL */
+ ctl_backend_lun_flags flags; /* passed to CTL */
+ void *be_lun; /* passed to CTL */
+ uint64_t maxlba; /* passed to CTL */
+ uint32_t blocksize; /* passed to CTL */
+ uint32_t req_lun_id; /* passed to CTL */
+ uint32_t lun_id; /* returned from CTL */
+ uint8_t serial_num[CTL_SN_LEN]; /* passed to CTL */
+ uint8_t device_id[CTL_DEVID_LEN];/* passed to CTL */
+ be_callback_t lun_shutdown; /* passed to CTL */
+ be_lun_config_t lun_config_status; /* passed to CTL */
+ struct ctl_backend_driver *be; /* passed to CTL */
+ void *ctl_lun; /* used by CTL */
+ STAILQ_ENTRY(ctl_be_lun) links; /* used by CTL */
+};
+
+typedef enum {
+ CTL_BE_FLAG_NONE = 0x00, /* no flags */
+ CTL_BE_FLAG_HAS_CONFIG = 0x01, /* can do config reads, writes */
+ CTL_BE_FLAG_INTERNAL = 0x02 /* don't inc mod refcount */
+} ctl_backend_flags;
+
+typedef int (*be_init_t)(void);
+typedef int (*be_func_t)(union ctl_io *io);
+typedef void (*be_vfunc_t)(union ctl_io *io);
+typedef int (*be_ioctl_t)(struct cdev *dev, u_long cmd, caddr_t addr, int flag,
+ struct thread *td);
+typedef int (*be_luninfo_t)(void *be_lun, struct sbuf *sb);
+
+struct ctl_backend_driver {
+ char name[CTL_BE_NAME_LEN]; /* passed to CTL */
+ ctl_backend_flags flags; /* passed to CTL */
+ be_init_t init; /* passed to CTL */
+ be_func_t data_submit; /* passed to CTL */
+ be_func_t data_move_done; /* passed to CTL */
+ be_func_t config_read; /* passed to CTL */
+ be_func_t config_write; /* passed to CTL */
+ be_ioctl_t ioctl; /* passed to CTL */
+ be_luninfo_t lun_info; /* passed to CTL */
+#ifdef CS_BE_CONFIG_MOVE_DONE_IS_NOT_USED
+ be_func_t config_move_done; /* passed to backend */
+#endif
+#if 0
+ be_vfunc_t config_write_done; /* passed to backend */
+#endif
+ u_int num_luns; /* used by CTL */
+ STAILQ_ENTRY(ctl_backend_driver) links; /* used by CTL */
+};
+
+int ctl_backend_register(struct ctl_backend_driver *be);
+int ctl_backend_deregister(struct ctl_backend_driver *be);
+struct ctl_backend_driver *ctl_backend_find(char *backend_name);
+
+/*
+ * To add a LUN, first call ctl_add_lun(). You will get the lun_config_status()
+ * callback when the LUN addition has either succeeded or failed.
+ *
+ * Once you get that callback, you can then call ctl_enable_lun() to enable
+ * the LUN.
+ */
+int ctl_add_lun(struct ctl_be_lun *be_lun);
+int ctl_enable_lun(struct ctl_be_lun *be_lun);
+
+/*
+ * To delete a LUN, first call ctl_disable_lun(), then
+ * ctl_invalidate_lun(). You will get the lun_shutdown() callback when all
+ * I/O to the LUN has completed and the LUN has been deleted.
+ */
+int ctl_disable_lun(struct ctl_be_lun *be_lun);
+int ctl_invalidate_lun(struct ctl_be_lun *be_lun);
+
+/*
+ * To start a LUN (transition from powered off to powered on state) call
+ * ctl_start_lun(). To stop a LUN (transition from powered on to powered
+ * off state) call ctl_stop_lun().
+ */
+int ctl_start_lun(struct ctl_be_lun *be_lun);
+int ctl_stop_lun(struct ctl_be_lun *be_lun);
+
+/*
+ * If a LUN is inoperable, call ctl_lun_inoperable(). Generally the LUN
+ * will become operable once again when the user issues the SCSI FORMAT UNIT
+ * command. (CTL will automatically clear the inoperable flag.) If we
+ * need to re-enable the LUN, we can call ctl_lun_operable() to enable it
+ * without a SCSI command.
+ */
+int ctl_lun_inoperable(struct ctl_be_lun *be_lun);
+int ctl_lun_operable(struct ctl_be_lun *be_lun);
+
+/*
+ * If a LUN is locked on or unlocked from a power/APS standpoint, call
+ * ctl_lun_power_lock() to update the current status in CTL's APS subpage.
+ * Set the lock flag to 1 to lock the LUN, set it to 0 to unlock the LUN.
+ */
+int ctl_lun_power_lock(struct ctl_be_lun *be_lun, struct ctl_nexus *nexus,
+ int lock);
+
+/*
+ * To take a LUN offline, call ctl_lun_offline(). Generally the LUN will
+ * be online again once the user sends a SCSI START STOP UNIT command with
+ * the start and on/offline bits set. The backend can bring the LUN back
+ * online via the ctl_lun_online() function, if necessary.
+ */
+int ctl_lun_offline(struct ctl_be_lun *be_lun);
+int ctl_lun_online(struct ctl_be_lun *be_lun);
+
+#endif /* _KERNEL */
+#endif /* _CTL_BACKEND_H_ */
+
+/*
+ * vim: ts=8
+ */
diff --git a/sys/cam/ctl/ctl_backend_block.c b/sys/cam/ctl/ctl_backend_block.c
new file mode 100644
index 0000000..3208304
--- /dev/null
+++ b/sys/cam/ctl/ctl_backend_block.c
@@ -0,0 +1,2213 @@
+/*-
+ * Copyright (c) 2003 Silicon Graphics International Corp.
+ * Copyright (c) 2009-2011 Spectra Logic Corporation
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_backend_block.c#5 $
+ */
+/*
+ * CAM Target Layer driver backend for block devices.
+ *
+ * Author: Ken Merry <ken@FreeBSD.org>
+ */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <opt_kdtrace.h>
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/kernel.h>
+#include <sys/types.h>
+#include <sys/kthread.h>
+#include <sys/bio.h>
+#include <sys/fcntl.h>
+#include <sys/lock.h>
+#include <sys/mutex.h>
+#include <sys/condvar.h>
+#include <sys/malloc.h>
+#include <sys/conf.h>
+#include <sys/ioccom.h>
+#include <sys/queue.h>
+#include <sys/sbuf.h>
+#include <sys/endian.h>
+#include <sys/uio.h>
+#include <sys/buf.h>
+#include <sys/taskqueue.h>
+#include <sys/vnode.h>
+#include <sys/namei.h>
+#include <sys/mount.h>
+#include <sys/disk.h>
+#include <sys/fcntl.h>
+#include <sys/filedesc.h>
+#include <sys/proc.h>
+#include <sys/pcpu.h>
+#include <sys/module.h>
+#include <sys/sdt.h>
+#include <sys/devicestat.h>
+#include <sys/sysctl.h>
+
+#include <geom/geom.h>
+
+#include <cam/cam.h>
+#include <cam/scsi/scsi_all.h>
+#include <cam/scsi/scsi_da.h>
+#include <cam/ctl/ctl_io.h>
+#include <cam/ctl/ctl.h>
+#include <cam/ctl/ctl_backend.h>
+#include <cam/ctl/ctl_frontend_internal.h>
+#include <cam/ctl/ctl_ioctl.h>
+#include <cam/ctl/ctl_scsi_all.h>
+#include <cam/ctl/ctl_error.h>
+
+/*
+ * The idea here is that we'll allocate enough S/G space to hold a 16MB
+ * I/O. If we get an I/O larger than that, we'll reject it.
+ */
+#define CTLBLK_MAX_IO_SIZE (16 * 1024 * 1024)
+#define CTLBLK_MAX_SEGS (CTLBLK_MAX_IO_SIZE / MAXPHYS) + 1
+
+#ifdef CTLBLK_DEBUG
+#define DPRINTF(fmt, args...) \
+ printf("cbb(%s:%d): " fmt, __FUNCTION__, __LINE__, ##args)
+#else
+#define DPRINTF(fmt, args...) do {} while(0)
+#endif
+
+SDT_PROVIDER_DEFINE(cbb);
+
+typedef enum {
+ CTL_BE_BLOCK_LUN_UNCONFIGURED = 0x01,
+ CTL_BE_BLOCK_LUN_CONFIG_ERR = 0x02,
+ CTL_BE_BLOCK_LUN_WAITING = 0x04,
+ CTL_BE_BLOCK_LUN_MULTI_THREAD = 0x08
+} ctl_be_block_lun_flags;
+
+typedef enum {
+ CTL_BE_BLOCK_NONE,
+ CTL_BE_BLOCK_DEV,
+ CTL_BE_BLOCK_FILE
+} ctl_be_block_type;
+
+struct ctl_be_block_devdata {
+ struct cdev *cdev;
+ struct cdevsw *csw;
+ int dev_ref;
+};
+
+struct ctl_be_block_filedata {
+ struct ucred *cred;
+};
+
+union ctl_be_block_bedata {
+ struct ctl_be_block_devdata dev;
+ struct ctl_be_block_filedata file;
+};
+
+struct ctl_be_block_io;
+struct ctl_be_block_lun;
+
+typedef void (*cbb_dispatch_t)(struct ctl_be_block_lun *be_lun,
+ struct ctl_be_block_io *beio);
+
+/*
+ * Backend LUN structure. There is a 1:1 mapping between a block device
+ * and a backend block LUN, and between a backend block LUN and a CTL LUN.
+ */
+struct ctl_be_block_lun {
+ struct ctl_block_disk *disk;
+ char lunname[32];
+ char *dev_path;
+ ctl_be_block_type dev_type;
+ struct vnode *vn;
+ union ctl_be_block_bedata backend;
+ cbb_dispatch_t dispatch;
+ cbb_dispatch_t lun_flush;
+ struct mtx lock;
+ uma_zone_t lun_zone;
+ uint64_t size_blocks;
+ uint64_t size_bytes;
+ uint32_t blocksize;
+ int blocksize_shift;
+ struct ctl_be_block_softc *softc;
+ struct devstat *disk_stats;
+ ctl_be_block_lun_flags flags;
+ STAILQ_ENTRY(ctl_be_block_lun) links;
+ struct ctl_be_lun ctl_be_lun;
+ struct taskqueue *io_taskqueue;
+ struct task io_task;
+ int num_threads;
+ STAILQ_HEAD(, ctl_io_hdr) input_queue;
+ STAILQ_HEAD(, ctl_io_hdr) config_write_queue;
+ STAILQ_HEAD(, ctl_io_hdr) datamove_queue;
+};
+
+/*
+ * Overall softc structure for the block backend module.
+ */
+struct ctl_be_block_softc {
+ STAILQ_HEAD(, ctl_be_block_io) beio_free_queue;
+ struct mtx lock;
+ int prealloc_beio;
+ int num_disks;
+ STAILQ_HEAD(, ctl_block_disk) disk_list;
+ int num_luns;
+ STAILQ_HEAD(, ctl_be_block_lun) lun_list;
+};
+
+static struct ctl_be_block_softc backend_block_softc;
+
+/*
+ * Per-I/O information.
+ */
+struct ctl_be_block_io {
+ union ctl_io *io;
+ struct ctl_sg_entry sg_segs[CTLBLK_MAX_SEGS];
+ struct iovec xiovecs[CTLBLK_MAX_SEGS];
+ int bio_cmd;
+ int bio_flags;
+ int num_segs;
+ int num_bios_sent;
+ int num_bios_done;
+ int send_complete;
+ int num_errors;
+ struct bintime ds_t0;
+ devstat_tag_type ds_tag_type;
+ devstat_trans_flags ds_trans_type;
+ uint64_t io_len;
+ uint64_t io_offset;
+ struct ctl_be_block_softc *softc;
+ struct ctl_be_block_lun *lun;
+ STAILQ_ENTRY(ctl_be_block_io) links;
+};
+
+static int cbb_num_threads = 14;
+TUNABLE_INT("kern.cam.ctl.block.num_threads", &cbb_num_threads);
+SYSCTL_NODE(_kern_cam_ctl, OID_AUTO, block, CTLFLAG_RD, 0,
+ "CAM Target Layer Block Backend");
+SYSCTL_INT(_kern_cam_ctl_block, OID_AUTO, num_threads, CTLFLAG_RW,
+ &cbb_num_threads, 0, "Number of threads per backing file");
+
+static struct ctl_be_block_io *ctl_alloc_beio(struct ctl_be_block_softc *softc);
+static void ctl_free_beio(struct ctl_be_block_io *beio);
+static int ctl_grow_beio(struct ctl_be_block_softc *softc, int count);
+#if 0
+static void ctl_shrink_beio(struct ctl_be_block_softc *softc);
+#endif
+static void ctl_complete_beio(struct ctl_be_block_io *beio);
+static int ctl_be_block_move_done(union ctl_io *io);
+static void ctl_be_block_biodone(struct bio *bio);
+static void ctl_be_block_flush_file(struct ctl_be_block_lun *be_lun,
+ struct ctl_be_block_io *beio);
+static void ctl_be_block_dispatch_file(struct ctl_be_block_lun *be_lun,
+ struct ctl_be_block_io *beio);
+static void ctl_be_block_flush_dev(struct ctl_be_block_lun *be_lun,
+ struct ctl_be_block_io *beio);
+static void ctl_be_block_dispatch_dev(struct ctl_be_block_lun *be_lun,
+ struct ctl_be_block_io *beio);
+static void ctl_be_block_cw_dispatch(struct ctl_be_block_lun *be_lun,
+ union ctl_io *io);
+static void ctl_be_block_dispatch(struct ctl_be_block_lun *be_lun,
+ union ctl_io *io);
+static void ctl_be_block_worker(void *context, int pending);
+static int ctl_be_block_submit(union ctl_io *io);
+static int ctl_be_block_ioctl(struct cdev *dev, u_long cmd, caddr_t addr,
+ int flag, struct thread *td);
+static int ctl_be_block_open_file(struct ctl_be_block_lun *be_lun,
+ struct ctl_lun_req *req);
+static int ctl_be_block_open_dev(struct ctl_be_block_lun *be_lun,
+ struct ctl_lun_req *req);
+static int ctl_be_block_close(struct ctl_be_block_lun *be_lun);
+static int ctl_be_block_open(struct ctl_be_block_softc *softc,
+ struct ctl_be_block_lun *be_lun,
+ struct ctl_lun_req *req);
+static int ctl_be_block_create(struct ctl_be_block_softc *softc,
+ struct ctl_lun_req *req);
+static int ctl_be_block_rm(struct ctl_be_block_softc *softc,
+ struct ctl_lun_req *req);
+static void ctl_be_block_lun_shutdown(void *be_lun);
+static void ctl_be_block_lun_config_status(void *be_lun,
+ ctl_lun_config_status status);
+static int ctl_be_block_config_write(union ctl_io *io);
+static int ctl_be_block_config_read(union ctl_io *io);
+static int ctl_be_block_lun_info(void *be_lun, struct sbuf *sb);
+int ctl_be_block_init(void);
+
+static struct ctl_backend_driver ctl_be_block_driver =
+{
+ .name = "block",
+ .flags = CTL_BE_FLAG_HAS_CONFIG,
+ .init = ctl_be_block_init,
+ .data_submit = ctl_be_block_submit,
+ .data_move_done = ctl_be_block_move_done,
+ .config_read = ctl_be_block_config_read,
+ .config_write = ctl_be_block_config_write,
+ .ioctl = ctl_be_block_ioctl,
+ .lun_info = ctl_be_block_lun_info
+};
+
+MALLOC_DEFINE(M_CTLBLK, "ctlblk", "Memory used for CTL block backend");
+CTL_BACKEND_DECLARE(cbb, ctl_be_block_driver);
+
+static struct ctl_be_block_io *
+ctl_alloc_beio(struct ctl_be_block_softc *softc)
+{
+ struct ctl_be_block_io *beio;
+ int count;
+
+ mtx_lock(&softc->lock);
+
+ beio = STAILQ_FIRST(&softc->beio_free_queue);
+ if (beio != NULL) {
+ STAILQ_REMOVE(&softc->beio_free_queue, beio,
+ ctl_be_block_io, links);
+ }
+ mtx_unlock(&softc->lock);
+
+ if (beio != NULL) {
+ bzero(beio, sizeof(*beio));
+ beio->softc = softc;
+ return (beio);
+ }
+
+ for (;;) {
+
+ count = ctl_grow_beio(softc, /*count*/ 10);
+
+ /*
+ * This shouldn't be possible, since ctl_grow_beio() uses a
+ * blocking malloc.
+ */
+ if (count == 0)
+ return (NULL);
+
+ /*
+ * Since we have to drop the lock when we're allocating beio
+ * structures, it's possible someone else can come along and
+ * allocate the beio's we've just allocated.
+ */
+ mtx_lock(&softc->lock);
+ beio = STAILQ_FIRST(&softc->beio_free_queue);
+ if (beio != NULL) {
+ STAILQ_REMOVE(&softc->beio_free_queue, beio,
+ ctl_be_block_io, links);
+ }
+ mtx_unlock(&softc->lock);
+
+ if (beio != NULL) {
+ bzero(beio, sizeof(*beio));
+ beio->softc = softc;
+ break;
+ }
+ }
+ return (beio);
+}
+
+static void
+ctl_free_beio(struct ctl_be_block_io *beio)
+{
+ struct ctl_be_block_softc *softc;
+ int duplicate_free;
+ int i;
+
+ softc = beio->softc;
+ duplicate_free = 0;
+
+ for (i = 0; i < beio->num_segs; i++) {
+ if (beio->sg_segs[i].addr == NULL)
+ duplicate_free++;
+
+ uma_zfree(beio->lun->lun_zone, beio->sg_segs[i].addr);
+ beio->sg_segs[i].addr = NULL;
+ }
+
+ if (duplicate_free > 0) {
+ printf("%s: %d duplicate frees out of %d segments\n", __func__,
+ duplicate_free, beio->num_segs);
+ }
+ mtx_lock(&softc->lock);
+ STAILQ_INSERT_TAIL(&softc->beio_free_queue, beio, links);
+ mtx_unlock(&softc->lock);
+}
+
+static int
+ctl_grow_beio(struct ctl_be_block_softc *softc, int count)
+{
+ int i;
+
+ for (i = 0; i < count; i++) {
+ struct ctl_be_block_io *beio;
+
+ beio = (struct ctl_be_block_io *)malloc(sizeof(*beio),
+ M_CTLBLK,
+ M_WAITOK | M_ZERO);
+ if (beio == NULL)
+ break;
+
+ bzero(beio, sizeof(*beio));
+ beio->softc = softc;
+ mtx_lock(&softc->lock);
+ STAILQ_INSERT_TAIL(&softc->beio_free_queue, beio, links);
+ mtx_unlock(&softc->lock);
+ }
+
+ return (i);
+}
+
+#if 0
+static void
+ctl_shrink_beio(struct ctl_be_block_softc *softc)
+{
+ struct ctl_be_block_io *beio, *beio_tmp;
+
+ mtx_lock(&softc->lock);
+ STAILQ_FOREACH_SAFE(beio, &softc->beio_free_queue, links, beio_tmp) {
+ STAILQ_REMOVE(&softc->beio_free_queue, beio,
+ ctl_be_block_io, links);
+ free(beio, M_CTLBLK);
+ }
+ mtx_unlock(&softc->lock);
+}
+#endif
+
+static void
+ctl_complete_beio(struct ctl_be_block_io *beio)
+{
+ union ctl_io *io;
+ int io_len;
+
+ io = beio->io;
+
+ if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)
+ io_len = beio->io_len;
+ else
+ io_len = 0;
+
+ devstat_end_transaction(beio->lun->disk_stats,
+ /*bytes*/ io_len,
+ beio->ds_tag_type,
+ beio->ds_trans_type,
+ /*now*/ NULL,
+ /*then*/&beio->ds_t0);
+
+ ctl_free_beio(beio);
+ ctl_done(io);
+}
+
+static int
+ctl_be_block_move_done(union ctl_io *io)
+{
+ struct ctl_be_block_io *beio;
+ struct ctl_be_block_lun *be_lun;
+#ifdef CTL_TIME_IO
+ struct bintime cur_bt;
+#endif
+
+ beio = (struct ctl_be_block_io *)
+ io->io_hdr.ctl_private[CTL_PRIV_BACKEND].ptr;
+
+ be_lun = beio->lun;
+
+ DPRINTF("entered\n");
+
+#ifdef CTL_TIME_IO
+ getbintime(&cur_bt);
+ bintime_sub(&cur_bt, &io->io_hdr.dma_start_bt);
+ bintime_add(&io->io_hdr.dma_bt, &cur_bt);
+ io->io_hdr.num_dmas++;
+#endif
+
+ /*
+ * We set status at this point for read commands, and write
+ * commands with errors.
+ */
+ if ((beio->bio_cmd == BIO_READ)
+ && (io->io_hdr.port_status == 0)
+ && ((io->io_hdr.flags & CTL_FLAG_ABORT) == 0)
+ && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE))
+ ctl_set_success(&io->scsiio);
+ else if ((io->io_hdr.port_status != 0)
+ && ((io->io_hdr.flags & CTL_FLAG_ABORT) == 0)
+ && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE)) {
+ /*
+ * For hardware error sense keys, the sense key
+ * specific value is defined to be a retry count,
+ * but we use it to pass back an internal FETD
+ * error code. XXX KDM Hopefully the FETD is only
+ * using 16 bits for an error code, since that's
+ * all the space we have in the sks field.
+ */
+ ctl_set_internal_failure(&io->scsiio,
+ /*sks_valid*/ 1,
+ /*retry_count*/
+ io->io_hdr.port_status);
+ }
+
+ /*
+ * If this is a read, or a write with errors, it is done.
+ */
+ if ((beio->bio_cmd == BIO_READ)
+ || ((io->io_hdr.flags & CTL_FLAG_ABORT) != 0)
+ || ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE)) {
+ ctl_complete_beio(beio);
+ return (0);
+ }
+
+ /*
+ * At this point, we have a write and the DMA completed
+ * successfully. We now have to queue it to the task queue to
+ * execute the backend I/O. That is because we do blocking
+ * memory allocations, and in the file backing case, blocking I/O.
+ * This move done routine is generally called in the SIM's
+ * interrupt context, and therefore we cannot block.
+ */
+ mtx_lock(&be_lun->lock);
+ /*
+ * XXX KDM make sure that links is okay to use at this point.
+ * Otherwise, we either need to add another field to ctl_io_hdr,
+ * or deal with resource allocation here.
+ */
+ STAILQ_INSERT_TAIL(&be_lun->datamove_queue, &io->io_hdr, links);
+ mtx_unlock(&be_lun->lock);
+
+ taskqueue_enqueue(be_lun->io_taskqueue, &be_lun->io_task);
+
+ return (0);
+}
+
+static void
+ctl_be_block_biodone(struct bio *bio)
+{
+ struct ctl_be_block_io *beio;
+ struct ctl_be_block_lun *be_lun;
+ union ctl_io *io;
+
+ beio = bio->bio_caller1;
+ be_lun = beio->lun;
+ io = beio->io;
+
+ DPRINTF("entered\n");
+
+ mtx_lock(&be_lun->lock);
+ if (bio->bio_error != 0)
+ beio->num_errors++;
+
+ beio->num_bios_done++;
+
+ /*
+ * XXX KDM will this cause WITNESS to complain? Holding a lock
+ * during the free might cause it to complain.
+ */
+ g_destroy_bio(bio);
+
+ /*
+ * If the send complete bit isn't set, or we aren't the last I/O to
+ * complete, then we're done.
+ */
+ if ((beio->send_complete == 0)
+ || (beio->num_bios_done < beio->num_bios_sent)) {
+ mtx_unlock(&be_lun->lock);
+ return;
+ }
+
+ /*
+ * At this point, we've verified that we are the last I/O to
+ * complete, so it's safe to drop the lock.
+ */
+ mtx_unlock(&be_lun->lock);
+
+ /*
+ * If there are any errors from the backing device, we fail the
+ * entire I/O with a medium error.
+ */
+ if (beio->num_errors > 0) {
+ if (beio->bio_cmd == BIO_FLUSH) {
+ /* XXX KDM is there is a better error here? */
+ ctl_set_internal_failure(&io->scsiio,
+ /*sks_valid*/ 1,
+ /*retry_count*/ 0xbad2);
+ } else
+ ctl_set_medium_error(&io->scsiio);
+ ctl_complete_beio(beio);
+ return;
+ }
+
+ /*
+ * If this is a write or a flush, we're all done.
+ * If this is a read, we can now send the data to the user.
+ */
+ if ((beio->bio_cmd == BIO_WRITE)
+ || (beio->bio_cmd == BIO_FLUSH)) {
+ ctl_set_success(&io->scsiio);
+ ctl_complete_beio(beio);
+ } else {
+ io->scsiio.be_move_done = ctl_be_block_move_done;
+ io->scsiio.kern_data_ptr = (uint8_t *)beio->sg_segs;
+ io->scsiio.kern_data_len = beio->io_len;
+ io->scsiio.kern_total_len = beio->io_len;
+ io->scsiio.kern_rel_offset = 0;
+ io->scsiio.kern_data_resid = 0;
+ io->scsiio.kern_sg_entries = beio->num_segs;
+ io->io_hdr.flags |= CTL_FLAG_ALLOCATED | CTL_FLAG_KDPTR_SGLIST;
+#ifdef CTL_TIME_IO
+ getbintime(&io->io_hdr.dma_start_bt);
+#endif
+ ctl_datamove(io);
+ }
+}
+
+static void
+ctl_be_block_flush_file(struct ctl_be_block_lun *be_lun,
+ struct ctl_be_block_io *beio)
+{
+ union ctl_io *io;
+ struct mount *mountpoint;
+ int vfs_is_locked, error, lock_flags;
+
+ DPRINTF("entered\n");
+
+ io = beio->io;
+
+ vfs_is_locked = VFS_LOCK_GIANT(be_lun->vn->v_mount);
+
+ (void) vn_start_write(be_lun->vn, &mountpoint, V_WAIT);
+
+ if (MNT_SHARED_WRITES(mountpoint)
+ || ((mountpoint == NULL)
+ && MNT_SHARED_WRITES(be_lun->vn->v_mount)))
+ lock_flags = LK_SHARED;
+ else
+ lock_flags = LK_EXCLUSIVE;
+
+ vn_lock(be_lun->vn, lock_flags | LK_RETRY);
+
+ binuptime(&beio->ds_t0);
+ devstat_start_transaction(beio->lun->disk_stats, &beio->ds_t0);
+
+ error = VOP_FSYNC(be_lun->vn, MNT_WAIT, curthread);
+ VOP_UNLOCK(be_lun->vn, 0);
+
+ vn_finished_write(mountpoint);
+
+ VFS_UNLOCK_GIANT(vfs_is_locked);
+
+ if (error == 0)
+ ctl_set_success(&io->scsiio);
+ else {
+ /* XXX KDM is there is a better error here? */
+ ctl_set_internal_failure(&io->scsiio,
+ /*sks_valid*/ 1,
+ /*retry_count*/ 0xbad1);
+ }
+
+ ctl_complete_beio(beio);
+}
+
+SDT_PROBE_DEFINE1(cbb, kernel, read, file_start, file_start, "uint64_t");
+SDT_PROBE_DEFINE1(cbb, kernel, write, file_start, file_start, "uint64_t");
+SDT_PROBE_DEFINE1(cbb, kernel, read, file_done, file_done,"uint64_t");
+SDT_PROBE_DEFINE1(cbb, kernel, write, file_done, file_done, "uint64_t");
+
+static void
+ctl_be_block_dispatch_file(struct ctl_be_block_lun *be_lun,
+ struct ctl_be_block_io *beio)
+{
+ struct ctl_be_block_filedata *file_data;
+ union ctl_io *io;
+ struct uio xuio;
+ struct iovec *xiovec;
+ int vfs_is_locked, flags;
+ int error, i;
+
+ DPRINTF("entered\n");
+
+ file_data = &be_lun->backend.file;
+ io = beio->io;
+ flags = beio->bio_flags;
+
+ if (beio->bio_cmd == BIO_READ) {
+ SDT_PROBE(cbb, kernel, read, file_start, 0, 0, 0, 0, 0);
+ } else {
+ SDT_PROBE(cbb, kernel, write, file_start, 0, 0, 0, 0, 0);
+ }
+
+ bzero(&xuio, sizeof(xuio));
+ if (beio->bio_cmd == BIO_READ)
+ xuio.uio_rw = UIO_READ;
+ else
+ xuio.uio_rw = UIO_WRITE;
+
+ xuio.uio_offset = beio->io_offset;
+ xuio.uio_resid = beio->io_len;
+ xuio.uio_segflg = UIO_SYSSPACE;
+ xuio.uio_iov = beio->xiovecs;
+ xuio.uio_iovcnt = beio->num_segs;
+ xuio.uio_td = curthread;
+
+ for (i = 0, xiovec = xuio.uio_iov; i < xuio.uio_iovcnt; i++, xiovec++) {
+ xiovec->iov_base = beio->sg_segs[i].addr;
+ xiovec->iov_len = beio->sg_segs[i].len;
+ }
+
+ vfs_is_locked = VFS_LOCK_GIANT(be_lun->vn->v_mount);
+ if (beio->bio_cmd == BIO_READ) {
+ vn_lock(be_lun->vn, LK_SHARED | LK_RETRY);
+
+ binuptime(&beio->ds_t0);
+ devstat_start_transaction(beio->lun->disk_stats, &beio->ds_t0);
+
+ /*
+ * UFS pays attention to IO_DIRECT for reads. If the
+ * DIRECTIO option is configured into the kernel, it calls
+ * ffs_rawread(). But that only works for single-segment
+ * uios with user space addresses. In our case, with a
+ * kernel uio, it still reads into the buffer cache, but it
+ * will just try to release the buffer from the cache later
+ * on in ffs_read().
+ *
+ * ZFS does not pay attention to IO_DIRECT for reads.
+ *
+ * UFS does not pay attention to IO_SYNC for reads.
+ *
+ * ZFS pays attention to IO_SYNC (which translates into the
+ * Solaris define FRSYNC for zfs_read()) for reads. It
+ * attempts to sync the file before reading.
+ *
+ * So, to attempt to provide some barrier semantics in the
+ * BIO_ORDERED case, set both IO_DIRECT and IO_SYNC.
+ */
+ error = VOP_READ(be_lun->vn, &xuio, (flags & BIO_ORDERED) ?
+ (IO_DIRECT|IO_SYNC) : 0, file_data->cred);
+
+ VOP_UNLOCK(be_lun->vn, 0);
+ } else {
+ struct mount *mountpoint;
+ int lock_flags;
+
+ (void)vn_start_write(be_lun->vn, &mountpoint, V_WAIT);
+
+ if (MNT_SHARED_WRITES(mountpoint)
+ || ((mountpoint == NULL)
+ && MNT_SHARED_WRITES(be_lun->vn->v_mount)))
+ lock_flags = LK_SHARED;
+ else
+ lock_flags = LK_EXCLUSIVE;
+
+ vn_lock(be_lun->vn, lock_flags | LK_RETRY);
+
+ binuptime(&beio->ds_t0);
+ devstat_start_transaction(beio->lun->disk_stats, &beio->ds_t0);
+
+ /*
+ * UFS pays attention to IO_DIRECT for writes. The write
+ * is done asynchronously. (Normally the write would just
+ * get put into cache.
+ *
+ * UFS pays attention to IO_SYNC for writes. It will
+ * attempt to write the buffer out synchronously if that
+ * flag is set.
+ *
+ * ZFS does not pay attention to IO_DIRECT for writes.
+ *
+ * ZFS pays attention to IO_SYNC (a.k.a. FSYNC or FRSYNC)
+ * for writes. It will flush the transaction from the
+ * cache before returning.
+ *
+ * So if we've got the BIO_ORDERED flag set, we want
+ * IO_SYNC in either the UFS or ZFS case.
+ */
+ error = VOP_WRITE(be_lun->vn, &xuio, (flags & BIO_ORDERED) ?
+ IO_SYNC : 0, file_data->cred);
+ VOP_UNLOCK(be_lun->vn, 0);
+
+ vn_finished_write(mountpoint);
+ }
+ VFS_UNLOCK_GIANT(vfs_is_locked);
+
+ /*
+ * If we got an error, set the sense data to "MEDIUM ERROR" and
+ * return the I/O to the user.
+ */
+ if (error != 0) {
+ char path_str[32];
+
+ ctl_scsi_path_string(io, path_str, sizeof(path_str));
+ /*
+ * XXX KDM ZFS returns ENOSPC when the underlying
+ * filesystem fills up. What kind of SCSI error should we
+ * return for that?
+ */
+ printf("%s%s command returned errno %d\n", path_str,
+ (beio->bio_cmd == BIO_READ) ? "READ" : "WRITE", error);
+ ctl_set_medium_error(&io->scsiio);
+ ctl_complete_beio(beio);
+ return;
+ }
+
+ /*
+ * If this is a write, we're all done.
+ * If this is a read, we can now send the data to the user.
+ */
+ if (beio->bio_cmd == BIO_WRITE) {
+ ctl_set_success(&io->scsiio);
+ SDT_PROBE(cbb, kernel, write, file_done, 0, 0, 0, 0, 0);
+ ctl_complete_beio(beio);
+ } else {
+ SDT_PROBE(cbb, kernel, read, file_done, 0, 0, 0, 0, 0);
+ io->scsiio.be_move_done = ctl_be_block_move_done;
+ io->scsiio.kern_data_ptr = (uint8_t *)beio->sg_segs;
+ io->scsiio.kern_data_len = beio->io_len;
+ io->scsiio.kern_total_len = beio->io_len;
+ io->scsiio.kern_rel_offset = 0;
+ io->scsiio.kern_data_resid = 0;
+ io->scsiio.kern_sg_entries = beio->num_segs;
+ io->io_hdr.flags |= CTL_FLAG_ALLOCATED | CTL_FLAG_KDPTR_SGLIST;
+#ifdef CTL_TIME_IO
+ getbintime(&io->io_hdr.dma_start_bt);
+#endif
+ ctl_datamove(io);
+ }
+}
+
+static void
+ctl_be_block_flush_dev(struct ctl_be_block_lun *be_lun,
+ struct ctl_be_block_io *beio)
+{
+ struct bio *bio;
+ union ctl_io *io;
+ struct ctl_be_block_devdata *dev_data;
+
+ dev_data = &be_lun->backend.dev;
+ io = beio->io;
+
+ DPRINTF("entered\n");
+
+ /* This can't fail, it's a blocking allocation. */
+ bio = g_alloc_bio();
+
+ bio->bio_cmd = BIO_FLUSH;
+ bio->bio_flags |= BIO_ORDERED;
+ bio->bio_dev = dev_data->cdev;
+ bio->bio_offset = 0;
+ bio->bio_data = 0;
+ bio->bio_done = ctl_be_block_biodone;
+ bio->bio_caller1 = beio;
+ bio->bio_pblkno = 0;
+
+ /*
+ * We don't need to acquire the LUN lock here, because we are only
+ * sending one bio, and so there is no other context to synchronize
+ * with.
+ */
+ beio->num_bios_sent = 1;
+ beio->send_complete = 1;
+
+ binuptime(&beio->ds_t0);
+ devstat_start_transaction(be_lun->disk_stats, &beio->ds_t0);
+
+ (*dev_data->csw->d_strategy)(bio);
+}
+
+static void
+ctl_be_block_dispatch_dev(struct ctl_be_block_lun *be_lun,
+ struct ctl_be_block_io *beio)
+{
+ int i;
+ struct bio *bio;
+ struct ctl_be_block_devdata *dev_data;
+ off_t cur_offset;
+ int max_iosize;
+
+ DPRINTF("entered\n");
+
+ dev_data = &be_lun->backend.dev;
+
+ /*
+ * We have to limit our I/O size to the maximum supported by the
+ * backend device. Hopefully it is MAXPHYS. If the driver doesn't
+ * set it properly, use DFLTPHYS.
+ */
+ max_iosize = dev_data->cdev->si_iosize_max;
+ if (max_iosize < PAGE_SIZE)
+ max_iosize = DFLTPHYS;
+
+ cur_offset = beio->io_offset;
+
+ /*
+ * XXX KDM need to accurately reflect the number of I/Os outstanding
+ * to a device.
+ */
+ binuptime(&beio->ds_t0);
+ devstat_start_transaction(be_lun->disk_stats, &beio->ds_t0);
+
+ for (i = 0; i < beio->num_segs; i++) {
+ size_t cur_size;
+ uint8_t *cur_ptr;
+
+ cur_size = beio->sg_segs[i].len;
+ cur_ptr = beio->sg_segs[i].addr;
+
+ while (cur_size > 0) {
+ /* This can't fail, it's a blocking allocation. */
+ bio = g_alloc_bio();
+
+ KASSERT(bio != NULL, ("g_alloc_bio() failed!\n"));
+
+ bio->bio_cmd = beio->bio_cmd;
+ bio->bio_flags |= beio->bio_flags;
+ bio->bio_dev = dev_data->cdev;
+ bio->bio_caller1 = beio;
+ bio->bio_length = min(cur_size, max_iosize);
+ bio->bio_offset = cur_offset;
+ bio->bio_data = cur_ptr;
+ bio->bio_done = ctl_be_block_biodone;
+ bio->bio_pblkno = cur_offset / be_lun->blocksize;
+
+ cur_offset += bio->bio_length;
+ cur_ptr += bio->bio_length;
+ cur_size -= bio->bio_length;
+
+ /*
+ * Make sure we set the complete bit just before we
+ * issue the last bio so we don't wind up with a
+ * race.
+ *
+ * Use the LUN mutex here instead of a combination
+ * of atomic variables for simplicity.
+ *
+ * XXX KDM we could have a per-IO lock, but that
+ * would cause additional per-IO setup and teardown
+ * overhead. Hopefully there won't be too much
+ * contention on the LUN lock.
+ */
+ mtx_lock(&be_lun->lock);
+
+ beio->num_bios_sent++;
+
+ if ((i == beio->num_segs - 1)
+ && (cur_size == 0))
+ beio->send_complete = 1;
+
+ mtx_unlock(&be_lun->lock);
+
+ (*dev_data->csw->d_strategy)(bio);
+ }
+ }
+}
+
+static void
+ctl_be_block_cw_dispatch(struct ctl_be_block_lun *be_lun,
+ union ctl_io *io)
+{
+ struct ctl_be_block_io *beio;
+ struct ctl_be_block_softc *softc;
+
+ DPRINTF("entered\n");
+
+ softc = be_lun->softc;
+ beio = ctl_alloc_beio(softc);
+ if (beio == NULL) {
+ /*
+ * This should not happen. ctl_alloc_beio() will call
+ * ctl_grow_beio() with a blocking malloc as needed.
+ * A malloc with M_WAITOK should not fail.
+ */
+ ctl_set_busy(&io->scsiio);
+ ctl_done(io);
+ return;
+ }
+
+ beio->io = io;
+ beio->softc = softc;
+ beio->lun = be_lun;
+ io->io_hdr.ctl_private[CTL_PRIV_BACKEND].ptr = beio;
+
+ switch (io->scsiio.cdb[0]) {
+ case SYNCHRONIZE_CACHE:
+ case SYNCHRONIZE_CACHE_16:
+ beio->ds_trans_type = DEVSTAT_NO_DATA;
+ beio->ds_tag_type = DEVSTAT_TAG_ORDERED;
+ beio->io_len = 0;
+ be_lun->lun_flush(be_lun, beio);
+ break;
+ default:
+ panic("Unhandled CDB type %#x", io->scsiio.cdb[0]);
+ break;
+ }
+}
+
+SDT_PROBE_DEFINE1(cbb, kernel, read, start, start, "uint64_t");
+SDT_PROBE_DEFINE1(cbb, kernel, write, start, start, "uint64_t");
+SDT_PROBE_DEFINE1(cbb, kernel, read, alloc_done, alloc_done, "uint64_t");
+SDT_PROBE_DEFINE1(cbb, kernel, write, alloc_done, alloc_done, "uint64_t");
+
+static void
+ctl_be_block_dispatch(struct ctl_be_block_lun *be_lun,
+ union ctl_io *io)
+{
+ struct ctl_be_block_io *beio;
+ struct ctl_be_block_softc *softc;
+ struct ctl_lba_len lbalen;
+ uint64_t len_left, io_size_bytes;
+ int i;
+
+ softc = be_lun->softc;
+
+ DPRINTF("entered\n");
+
+ if ((io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_IN) {
+ SDT_PROBE(cbb, kernel, read, start, 0, 0, 0, 0, 0);
+ } else {
+ SDT_PROBE(cbb, kernel, write, start, 0, 0, 0, 0, 0);
+ }
+
+ memcpy(&lbalen, io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].bytes,
+ sizeof(lbalen));
+
+ io_size_bytes = lbalen.len * be_lun->blocksize;
+
+ /*
+ * XXX KDM this is temporary, until we implement chaining of beio
+ * structures and multiple datamove calls to move all the data in
+ * or out.
+ */
+ if (io_size_bytes > CTLBLK_MAX_IO_SIZE) {
+ printf("%s: IO length %ju > max io size %u\n", __func__,
+ io_size_bytes, CTLBLK_MAX_IO_SIZE);
+ ctl_set_invalid_field(&io->scsiio,
+ /*sks_valid*/ 0,
+ /*command*/ 1,
+ /*field*/ 0,
+ /*bit_valid*/ 0,
+ /*bit*/ 0);
+ ctl_done(io);
+ return;
+ }
+
+ beio = ctl_alloc_beio(softc);
+ if (beio == NULL) {
+ /*
+ * This should not happen. ctl_alloc_beio() will call
+ * ctl_grow_beio() with a blocking malloc as needed.
+ * A malloc with M_WAITOK should not fail.
+ */
+ ctl_set_busy(&io->scsiio);
+ ctl_done(io);
+ return;
+ }
+
+ beio->io = io;
+ beio->softc = softc;
+ beio->lun = be_lun;
+ io->io_hdr.ctl_private[CTL_PRIV_BACKEND].ptr = beio;
+
+ /*
+ * If the I/O came down with an ordered or head of queue tag, set
+ * the BIO_ORDERED attribute. For head of queue tags, that's
+ * pretty much the best we can do.
+ *
+ * XXX KDM we don't have a great way to easily know about the FUA
+ * bit right now (it is decoded in ctl_read_write(), but we don't
+ * pass that knowledge to the backend), and in any case we would
+ * need to determine how to handle it.
+ */
+ if ((io->scsiio.tag_type == CTL_TAG_ORDERED)
+ || (io->scsiio.tag_type == CTL_TAG_HEAD_OF_QUEUE))
+ beio->bio_flags = BIO_ORDERED;
+
+ switch (io->scsiio.tag_type) {
+ case CTL_TAG_ORDERED:
+ beio->ds_tag_type = DEVSTAT_TAG_ORDERED;
+ break;
+ case CTL_TAG_HEAD_OF_QUEUE:
+ beio->ds_tag_type = DEVSTAT_TAG_HEAD;
+ break;
+ case CTL_TAG_UNTAGGED:
+ case CTL_TAG_SIMPLE:
+ case CTL_TAG_ACA:
+ default:
+ beio->ds_tag_type = DEVSTAT_TAG_SIMPLE;
+ break;
+ }
+
+ /*
+ * This path handles read and write only. The config write path
+ * handles flush operations.
+ */
+ if ((io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_IN) {
+ beio->bio_cmd = BIO_READ;
+ beio->ds_trans_type = DEVSTAT_READ;
+ } else {
+ beio->bio_cmd = BIO_WRITE;
+ beio->ds_trans_type = DEVSTAT_WRITE;
+ }
+
+ beio->io_len = lbalen.len * be_lun->blocksize;
+ beio->io_offset = lbalen.lba * be_lun->blocksize;
+
+ DPRINTF("%s at LBA %jx len %u\n",
+ (beio->bio_cmd == BIO_READ) ? "READ" : "WRITE",
+ (uintmax_t)lbalen.lba, lbalen.len);
+
+ for (i = 0, len_left = io_size_bytes; i < CTLBLK_MAX_SEGS &&
+ len_left > 0; i++) {
+
+ /*
+ * Setup the S/G entry for this chunk.
+ */
+ beio->sg_segs[i].len = min(MAXPHYS, len_left);
+ beio->sg_segs[i].addr = uma_zalloc(be_lun->lun_zone, M_WAITOK);
+ /*
+ * uma_zalloc() can in theory return NULL even with M_WAITOK
+ * if it can't pull more memory into the zone.
+ */
+ if (beio->sg_segs[i].addr == NULL) {
+ ctl_set_busy(&io->scsiio);
+ ctl_complete_beio(beio);
+ return;
+ }
+
+ DPRINTF("segment %d addr %p len %zd\n", i,
+ beio->sg_segs[i].addr, beio->sg_segs[i].len);
+
+ beio->num_segs++;
+ len_left -= beio->sg_segs[i].len;
+ }
+
+ /*
+ * For the read case, we need to read the data into our buffers and
+ * then we can send it back to the user. For the write case, we
+ * need to get the data from the user first.
+ */
+ if (beio->bio_cmd == BIO_READ) {
+ SDT_PROBE(cbb, kernel, read, alloc_done, 0, 0, 0, 0, 0);
+ be_lun->dispatch(be_lun, beio);
+ } else {
+ SDT_PROBE(cbb, kernel, write, alloc_done, 0, 0, 0, 0, 0);
+ io->scsiio.be_move_done = ctl_be_block_move_done;
+ io->scsiio.kern_data_ptr = (uint8_t *)beio->sg_segs;
+ io->scsiio.kern_data_len = beio->io_len;
+ io->scsiio.kern_total_len = beio->io_len;
+ io->scsiio.kern_rel_offset = 0;
+ io->scsiio.kern_data_resid = 0;
+ io->scsiio.kern_sg_entries = beio->num_segs;
+ io->io_hdr.flags |= CTL_FLAG_ALLOCATED | CTL_FLAG_KDPTR_SGLIST;
+#ifdef CTL_TIME_IO
+ getbintime(&io->io_hdr.dma_start_bt);
+#endif
+ ctl_datamove(io);
+ }
+}
+
+static void
+ctl_be_block_worker(void *context, int pending)
+{
+ struct ctl_be_block_lun *be_lun;
+ struct ctl_be_block_softc *softc;
+ union ctl_io *io;
+
+ be_lun = (struct ctl_be_block_lun *)context;
+ softc = be_lun->softc;
+
+ DPRINTF("entered\n");
+
+ mtx_lock(&be_lun->lock);
+ for (;;) {
+ io = (union ctl_io *)STAILQ_FIRST(&be_lun->datamove_queue);
+ if (io != NULL) {
+ struct ctl_be_block_io *beio;
+
+ DPRINTF("datamove queue\n");
+
+ STAILQ_REMOVE(&be_lun->datamove_queue, &io->io_hdr,
+ ctl_io_hdr, links);
+
+ mtx_unlock(&be_lun->lock);
+
+ beio = (struct ctl_be_block_io *)
+ io->io_hdr.ctl_private[CTL_PRIV_BACKEND].ptr;
+
+ be_lun->dispatch(be_lun, beio);
+
+ mtx_lock(&be_lun->lock);
+ continue;
+ }
+ io = (union ctl_io *)STAILQ_FIRST(&be_lun->config_write_queue);
+ if (io != NULL) {
+
+ DPRINTF("config write queue\n");
+
+ STAILQ_REMOVE(&be_lun->config_write_queue, &io->io_hdr,
+ ctl_io_hdr, links);
+
+ mtx_unlock(&be_lun->lock);
+
+ ctl_be_block_cw_dispatch(be_lun, io);
+
+ mtx_lock(&be_lun->lock);
+ continue;
+ }
+ io = (union ctl_io *)STAILQ_FIRST(&be_lun->input_queue);
+ if (io != NULL) {
+ DPRINTF("input queue\n");
+
+ STAILQ_REMOVE(&be_lun->input_queue, &io->io_hdr,
+ ctl_io_hdr, links);
+ mtx_unlock(&be_lun->lock);
+
+ /*
+ * We must drop the lock, since this routine and
+ * its children may sleep.
+ */
+ ctl_be_block_dispatch(be_lun, io);
+
+ mtx_lock(&be_lun->lock);
+ continue;
+ }
+
+ /*
+ * If we get here, there is no work left in the queues, so
+ * just break out and let the task queue go to sleep.
+ */
+ break;
+ }
+ mtx_unlock(&be_lun->lock);
+}
+
+/*
+ * Entry point from CTL to the backend for I/O. We queue everything to a
+ * work thread, so this just puts the I/O on a queue and wakes up the
+ * thread.
+ */
+static int
+ctl_be_block_submit(union ctl_io *io)
+{
+ struct ctl_be_block_lun *be_lun;
+ struct ctl_be_lun *ctl_be_lun;
+ int retval;
+
+ DPRINTF("entered\n");
+
+ retval = CTL_RETVAL_COMPLETE;
+
+ ctl_be_lun = (struct ctl_be_lun *)io->io_hdr.ctl_private[
+ CTL_PRIV_BACKEND_LUN].ptr;
+ be_lun = (struct ctl_be_block_lun *)ctl_be_lun->be_lun;
+
+ /*
+ * Make sure we only get SCSI I/O.
+ */
+ KASSERT(io->io_hdr.io_type == CTL_IO_SCSI, ("Non-SCSI I/O (type "
+ "%#x) encountered", io->io_hdr.io_type));
+
+ mtx_lock(&be_lun->lock);
+ /*
+ * XXX KDM make sure that links is okay to use at this point.
+ * Otherwise, we either need to add another field to ctl_io_hdr,
+ * or deal with resource allocation here.
+ */
+ STAILQ_INSERT_TAIL(&be_lun->input_queue, &io->io_hdr, links);
+ mtx_unlock(&be_lun->lock);
+
+ taskqueue_enqueue(be_lun->io_taskqueue, &be_lun->io_task);
+
+ return (retval);
+}
+
+static int
+ctl_be_block_ioctl(struct cdev *dev, u_long cmd, caddr_t addr,
+ int flag, struct thread *td)
+{
+ struct ctl_be_block_softc *softc;
+ int error;
+
+ softc = &backend_block_softc;
+
+ error = 0;
+
+ switch (cmd) {
+ case CTL_LUN_REQ: {
+ struct ctl_lun_req *lun_req;
+
+ lun_req = (struct ctl_lun_req *)addr;
+
+ switch (lun_req->reqtype) {
+ case CTL_LUNREQ_CREATE:
+ error = ctl_be_block_create(softc, lun_req);
+ break;
+ case CTL_LUNREQ_RM:
+ error = ctl_be_block_rm(softc, lun_req);
+ break;
+ default:
+ lun_req->status = CTL_LUN_ERROR;
+ snprintf(lun_req->error_str, sizeof(lun_req->error_str),
+ "%s: invalid LUN request type %d", __func__,
+ lun_req->reqtype);
+ break;
+ }
+ break;
+ }
+ default:
+ error = ENOTTY;
+ break;
+ }
+
+ return (error);
+}
+
+static int
+ctl_be_block_open_file(struct ctl_be_block_lun *be_lun, struct ctl_lun_req *req)
+{
+ struct ctl_be_block_filedata *file_data;
+ struct ctl_lun_create_params *params;
+ struct vattr vattr;
+ int error;
+
+ error = 0;
+ file_data = &be_lun->backend.file;
+ params = &req->reqdata.create;
+
+ be_lun->dev_type = CTL_BE_BLOCK_FILE;
+ be_lun->dispatch = ctl_be_block_dispatch_file;
+ be_lun->lun_flush = ctl_be_block_flush_file;
+
+ error = VOP_GETATTR(be_lun->vn, &vattr, curthread->td_ucred);
+ if (error != 0) {
+ snprintf(req->error_str, sizeof(req->error_str),
+ "error calling VOP_GETATTR() for file %s",
+ be_lun->dev_path);
+ return (error);
+ }
+
+ /*
+ * Verify that we have the ability to upgrade to exclusive
+ * access on this file so we can trap errors at open instead
+ * of reporting them during first access.
+ */
+ if (VOP_ISLOCKED(be_lun->vn) != LK_EXCLUSIVE) {
+ vn_lock(be_lun->vn, LK_UPGRADE | LK_RETRY);
+ if (be_lun->vn->v_iflag & VI_DOOMED) {
+ error = EBADF;
+ snprintf(req->error_str, sizeof(req->error_str),
+ "error locking file %s", be_lun->dev_path);
+ return (error);
+ }
+ }
+
+
+ file_data->cred = crhold(curthread->td_ucred);
+ be_lun->size_bytes = vattr.va_size;
+ /*
+ * We set the multi thread flag for file operations because all
+ * filesystems (in theory) are capable of allowing multiple readers
+ * of a file at once. So we want to get the maximum possible
+ * concurrency.
+ */
+ be_lun->flags |= CTL_BE_BLOCK_LUN_MULTI_THREAD;
+
+ /*
+ * XXX KDM vattr.va_blocksize may be larger than 512 bytes here.
+ * With ZFS, it is 131072 bytes. Block sizes that large don't work
+ * with disklabel and UFS on FreeBSD at least. Large block sizes
+ * may not work with other OSes as well. So just export a sector
+ * size of 512 bytes, which should work with any OS or
+ * application. Since our backing is a file, any block size will
+ * work fine for the backing store.
+ */
+#if 0
+ be_lun->blocksize= vattr.va_blocksize;
+#endif
+ if (params->blocksize_bytes != 0)
+ be_lun->blocksize = params->blocksize_bytes;
+ else
+ be_lun->blocksize = 512;
+
+ /*
+ * Sanity check. The media size has to be at least one
+ * sector long.
+ */
+ if (be_lun->size_bytes < be_lun->blocksize) {
+ error = EINVAL;
+ snprintf(req->error_str, sizeof(req->error_str),
+ "file %s size %ju < block size %u", be_lun->dev_path,
+ (uintmax_t)be_lun->size_bytes, be_lun->blocksize);
+ }
+ return (error);
+}
+
+static int
+ctl_be_block_open_dev(struct ctl_be_block_lun *be_lun, struct ctl_lun_req *req)
+{
+ struct ctl_lun_create_params *params;
+ struct vattr vattr;
+ struct cdev *dev;
+ struct cdevsw *devsw;
+ int error;
+
+ params = &req->reqdata.create;
+
+ be_lun->dev_type = CTL_BE_BLOCK_DEV;
+ be_lun->dispatch = ctl_be_block_dispatch_dev;
+ be_lun->lun_flush = ctl_be_block_flush_dev;
+ be_lun->backend.dev.cdev = be_lun->vn->v_rdev;
+ be_lun->backend.dev.csw = dev_refthread(be_lun->backend.dev.cdev,
+ &be_lun->backend.dev.dev_ref);
+ if (be_lun->backend.dev.csw == NULL)
+ panic("Unable to retrieve device switch");
+
+ error = VOP_GETATTR(be_lun->vn, &vattr, NOCRED);
+ if (error) {
+ snprintf(req->error_str, sizeof(req->error_str),
+ "%s: error getting vnode attributes for device %s",
+ __func__, be_lun->dev_path);
+ return (error);
+ }
+
+ dev = be_lun->vn->v_rdev;
+ devsw = dev->si_devsw;
+ if (!devsw->d_ioctl) {
+ snprintf(req->error_str, sizeof(req->error_str),
+ "%s: no d_ioctl for device %s!", __func__,
+ be_lun->dev_path);
+ return (ENODEV);
+ }
+
+ error = devsw->d_ioctl(dev, DIOCGSECTORSIZE,
+ (caddr_t)&be_lun->blocksize, FREAD,
+ curthread);
+ if (error) {
+ snprintf(req->error_str, sizeof(req->error_str),
+ "%s: error %d returned for DIOCGSECTORSIZE ioctl "
+ "on %s!", __func__, error, be_lun->dev_path);
+ return (error);
+ }
+
+ /*
+ * If the user has asked for a blocksize that is greater than the
+ * backing device's blocksize, we can do it only if the blocksize
+ * the user is asking for is an even multiple of the underlying
+ * device's blocksize.
+ */
+ if ((params->blocksize_bytes != 0)
+ && (params->blocksize_bytes > be_lun->blocksize)) {
+ uint32_t bs_multiple, tmp_blocksize;
+
+ bs_multiple = params->blocksize_bytes / be_lun->blocksize;
+
+ tmp_blocksize = bs_multiple * be_lun->blocksize;
+
+ if (tmp_blocksize == params->blocksize_bytes) {
+ be_lun->blocksize = params->blocksize_bytes;
+ } else {
+ snprintf(req->error_str, sizeof(req->error_str),
+ "%s: requested blocksize %u is not an even "
+ "multiple of backing device blocksize %u",
+ __func__, params->blocksize_bytes,
+ be_lun->blocksize);
+ return (EINVAL);
+
+ }
+ } else if ((params->blocksize_bytes != 0)
+ && (params->blocksize_bytes != be_lun->blocksize)) {
+ snprintf(req->error_str, sizeof(req->error_str),
+ "%s: requested blocksize %u < backing device "
+ "blocksize %u", __func__, params->blocksize_bytes,
+ be_lun->blocksize);
+ return (EINVAL);
+ }
+
+ error = devsw->d_ioctl(dev, DIOCGMEDIASIZE,
+ (caddr_t)&be_lun->size_bytes, FREAD,
+ curthread);
+ if (error) {
+ snprintf(req->error_str, sizeof(req->error_str),
+ "%s: error %d returned for DIOCGMEDIASIZE ioctl "
+ "on %s!", __func__, error, be_lun->dev_path);
+ return (error);
+ }
+
+ return (0);
+
+}
+
+
+static int
+ctl_be_block_close(struct ctl_be_block_lun *be_lun)
+{
+ DROP_GIANT();
+ if (be_lun->vn) {
+ int flags = FREAD | FWRITE;
+ int vfs_is_locked = 0;
+
+ switch (be_lun->dev_type) {
+ case CTL_BE_BLOCK_DEV:
+ if (be_lun->backend.dev.csw) {
+ dev_relthread(be_lun->backend.dev.cdev,
+ be_lun->backend.dev.dev_ref);
+ be_lun->backend.dev.csw = NULL;
+ be_lun->backend.dev.cdev = NULL;
+ }
+ break;
+ case CTL_BE_BLOCK_FILE:
+ vfs_is_locked = VFS_LOCK_GIANT(be_lun->vn->v_mount);
+ break;
+ case CTL_BE_BLOCK_NONE:
+ default:
+ panic("Unexpected backend type.");
+ break;
+ }
+
+ (void)vn_close(be_lun->vn, flags, NOCRED, curthread);
+ be_lun->vn = NULL;
+
+ switch (be_lun->dev_type) {
+ case CTL_BE_BLOCK_DEV:
+ break;
+ case CTL_BE_BLOCK_FILE:
+ VFS_UNLOCK_GIANT(vfs_is_locked);
+ if (be_lun->backend.file.cred != NULL) {
+ crfree(be_lun->backend.file.cred);
+ be_lun->backend.file.cred = NULL;
+ }
+ break;
+ case CTL_BE_BLOCK_NONE:
+ default:
+ panic("Unexpected backend type.");
+ break;
+ }
+ }
+ PICKUP_GIANT();
+
+ return (0);
+}
+
+static int
+ctl_be_block_open(struct ctl_be_block_softc *softc,
+ struct ctl_be_block_lun *be_lun, struct ctl_lun_req *req)
+{
+ struct nameidata nd;
+ int flags;
+ int error;
+ int vfs_is_locked;
+
+ /*
+ * XXX KDM allow a read-only option?
+ */
+ flags = FREAD | FWRITE;
+ error = 0;
+
+ if (rootvnode == NULL) {
+ snprintf(req->error_str, sizeof(req->error_str),
+ "%s: Root filesystem is not mounted", __func__);
+ return (1);
+ }
+
+ if (!curthread->td_proc->p_fd->fd_cdir) {
+ curthread->td_proc->p_fd->fd_cdir = rootvnode;
+ VREF(rootvnode);
+ }
+ if (!curthread->td_proc->p_fd->fd_rdir) {
+ curthread->td_proc->p_fd->fd_rdir = rootvnode;
+ VREF(rootvnode);
+ }
+ if (!curthread->td_proc->p_fd->fd_jdir) {
+ curthread->td_proc->p_fd->fd_jdir = rootvnode;
+ VREF(rootvnode);
+ }
+
+ again:
+ NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, be_lun->dev_path, curthread);
+ error = vn_open(&nd, &flags, 0, NULL);
+ if (error) {
+ /*
+ * This is the only reasonable guess we can make as far as
+ * path if the user doesn't give us a fully qualified path.
+ * If they want to specify a file, they need to specify the
+ * full path.
+ */
+ if (be_lun->dev_path[0] != '/') {
+ char *dev_path = "/dev/";
+ char *dev_name;
+
+ /* Try adding device path at beginning of name */
+ dev_name = malloc(strlen(be_lun->dev_path)
+ + strlen(dev_path) + 1,
+ M_CTLBLK, M_WAITOK);
+ if (dev_name) {
+ sprintf(dev_name, "%s%s", dev_path,
+ be_lun->dev_path);
+ free(be_lun->dev_path, M_CTLBLK);
+ be_lun->dev_path = dev_name;
+ goto again;
+ }
+ }
+ snprintf(req->error_str, sizeof(req->error_str),
+ "%s: error opening %s", __func__, be_lun->dev_path);
+ return (error);
+ }
+
+ vfs_is_locked = NDHASGIANT(&nd);
+
+ NDFREE(&nd, NDF_ONLY_PNBUF);
+
+ be_lun->vn = nd.ni_vp;
+
+ /* We only support disks and files. */
+ if (vn_isdisk(be_lun->vn, &error)) {
+ error = ctl_be_block_open_dev(be_lun, req);
+ } else if (be_lun->vn->v_type == VREG) {
+ error = ctl_be_block_open_file(be_lun, req);
+ } else {
+ error = EINVAL;
+ snprintf(req->error_str, sizeof(req->error_str),
+ "%s is not a disk or file", be_lun->dev_path);
+ }
+ VOP_UNLOCK(be_lun->vn, 0);
+ VFS_UNLOCK_GIANT(vfs_is_locked);
+
+ if (error != 0) {
+ ctl_be_block_close(be_lun);
+ return (error);
+ }
+
+ be_lun->blocksize_shift = fls(be_lun->blocksize) - 1;
+ be_lun->size_blocks = be_lun->size_bytes >> be_lun->blocksize_shift;
+
+ return (0);
+
+}
+
+static int
+ctl_be_block_mem_ctor(void *mem, int size, void *arg, int flags)
+{
+ return (0);
+}
+
+static void
+ctl_be_block_mem_dtor(void *mem, int size, void *arg)
+{
+ bzero(mem, size);
+}
+
+static int
+ctl_be_block_create(struct ctl_be_block_softc *softc, struct ctl_lun_req *req)
+{
+ struct ctl_be_block_lun *be_lun;
+ struct ctl_lun_create_params *params;
+ struct ctl_be_arg *file_arg;
+ char tmpstr[32];
+ int retval, num_threads;
+ int i;
+
+ params = &req->reqdata.create;
+ retval = 0;
+
+ num_threads = cbb_num_threads;
+
+ file_arg = NULL;
+
+ be_lun = malloc(sizeof(*be_lun), M_CTLBLK, M_ZERO | M_WAITOK);
+
+ if (be_lun == NULL) {
+ snprintf(req->error_str, sizeof(req->error_str),
+ "%s: error allocating %zd bytes", __func__,
+ sizeof(*be_lun));
+ goto bailout_error;
+ }
+
+ be_lun->softc = softc;
+ STAILQ_INIT(&be_lun->input_queue);
+ STAILQ_INIT(&be_lun->config_write_queue);
+ STAILQ_INIT(&be_lun->datamove_queue);
+ sprintf(be_lun->lunname, "cblk%d", softc->num_luns);
+ mtx_init(&be_lun->lock, be_lun->lunname, NULL, MTX_DEF);
+
+ be_lun->lun_zone = uma_zcreate(be_lun->lunname, MAXPHYS,
+ ctl_be_block_mem_ctor, ctl_be_block_mem_dtor, NULL, NULL,
+ /*align*/ 0, /*flags*/0);
+
+ if (be_lun->lun_zone == NULL) {
+ snprintf(req->error_str, sizeof(req->error_str),
+ "%s: error allocating UMA zone", __func__);
+ goto bailout_error;
+ }
+
+ if (params->flags & CTL_LUN_FLAG_DEV_TYPE)
+ be_lun->ctl_be_lun.lun_type = params->device_type;
+ else
+ be_lun->ctl_be_lun.lun_type = T_DIRECT;
+
+ if (be_lun->ctl_be_lun.lun_type == T_DIRECT) {
+ for (i = 0; i < req->num_be_args; i++) {
+ if (strcmp(req->kern_be_args[i].name, "file") == 0) {
+ file_arg = &req->kern_be_args[i];
+ break;
+ }
+ }
+
+ if (file_arg == NULL) {
+ snprintf(req->error_str, sizeof(req->error_str),
+ "%s: no file argument specified", __func__);
+ goto bailout_error;
+ }
+
+ be_lun->dev_path = malloc(file_arg->vallen, M_CTLBLK,
+ M_WAITOK | M_ZERO);
+ if (be_lun->dev_path == NULL) {
+ snprintf(req->error_str, sizeof(req->error_str),
+ "%s: error allocating %d bytes", __func__,
+ file_arg->vallen);
+ goto bailout_error;
+ }
+
+ strlcpy(be_lun->dev_path, (char *)file_arg->value,
+ file_arg->vallen);
+
+ retval = ctl_be_block_open(softc, be_lun, req);
+ if (retval != 0) {
+ retval = 0;
+ goto bailout_error;
+ }
+
+ /*
+ * Tell the user the size of the file/device.
+ */
+ params->lun_size_bytes = be_lun->size_bytes;
+
+ /*
+ * The maximum LBA is the size - 1.
+ */
+ be_lun->ctl_be_lun.maxlba = be_lun->size_blocks - 1;
+ } else {
+ /*
+ * For processor devices, we don't have any size.
+ */
+ be_lun->blocksize = 0;
+ be_lun->size_blocks = 0;
+ be_lun->size_bytes = 0;
+ be_lun->ctl_be_lun.maxlba = 0;
+ params->lun_size_bytes = 0;
+
+ /*
+ * Default to just 1 thread for processor devices.
+ */
+ num_threads = 1;
+ }
+
+ /*
+ * XXX This searching loop might be refactored to be combined with
+ * the loop above,
+ */
+ for (i = 0; i < req->num_be_args; i++) {
+ if (strcmp(req->kern_be_args[i].name, "num_threads") == 0) {
+ struct ctl_be_arg *thread_arg;
+ char num_thread_str[16];
+ int tmp_num_threads;
+
+
+ thread_arg = &req->kern_be_args[i];
+
+ strlcpy(num_thread_str, (char *)thread_arg->value,
+ min(thread_arg->vallen,
+ sizeof(num_thread_str)));
+
+ tmp_num_threads = strtol(num_thread_str, NULL, 0);
+
+ /*
+ * We don't let the user specify less than one
+ * thread, but hope he's clueful enough not to
+ * specify 1000 threads.
+ */
+ if (tmp_num_threads < 1) {
+ snprintf(req->error_str, sizeof(req->error_str),
+ "%s: invalid number of threads %s",
+ __func__, num_thread_str);
+ goto bailout_error;
+ }
+
+ num_threads = tmp_num_threads;
+ }
+ }
+
+ be_lun->flags = CTL_BE_BLOCK_LUN_UNCONFIGURED;
+ be_lun->ctl_be_lun.flags = CTL_LUN_FLAG_PRIMARY;
+ be_lun->ctl_be_lun.be_lun = be_lun;
+ be_lun->ctl_be_lun.blocksize = be_lun->blocksize;
+ /* Tell the user the blocksize we ended up using */
+ params->blocksize_bytes = be_lun->blocksize;
+ if (params->flags & CTL_LUN_FLAG_ID_REQ) {
+ be_lun->ctl_be_lun.req_lun_id = params->req_lun_id;
+ be_lun->ctl_be_lun.flags |= CTL_LUN_FLAG_ID_REQ;
+ } else
+ be_lun->ctl_be_lun.req_lun_id = 0;
+
+ be_lun->ctl_be_lun.lun_shutdown = ctl_be_block_lun_shutdown;
+ be_lun->ctl_be_lun.lun_config_status =
+ ctl_be_block_lun_config_status;
+ be_lun->ctl_be_lun.be = &ctl_be_block_driver;
+
+ if ((params->flags & CTL_LUN_FLAG_SERIAL_NUM) == 0) {
+ snprintf(tmpstr, sizeof(tmpstr), "MYSERIAL%4d",
+ softc->num_luns);
+ strncpy((char *)be_lun->ctl_be_lun.serial_num, tmpstr,
+ ctl_min(sizeof(be_lun->ctl_be_lun.serial_num),
+ sizeof(tmpstr)));
+
+ /* Tell the user what we used for a serial number */
+ strncpy((char *)params->serial_num, tmpstr,
+ ctl_min(sizeof(params->serial_num), sizeof(tmpstr)));
+ } else {
+ strncpy((char *)be_lun->ctl_be_lun.serial_num,
+ params->serial_num,
+ ctl_min(sizeof(be_lun->ctl_be_lun.serial_num),
+ sizeof(params->serial_num)));
+ }
+ if ((params->flags & CTL_LUN_FLAG_DEVID) == 0) {
+ snprintf(tmpstr, sizeof(tmpstr), "MYDEVID%4d", softc->num_luns);
+ strncpy((char *)be_lun->ctl_be_lun.device_id, tmpstr,
+ ctl_min(sizeof(be_lun->ctl_be_lun.device_id),
+ sizeof(tmpstr)));
+
+ /* Tell the user what we used for a device ID */
+ strncpy((char *)params->device_id, tmpstr,
+ ctl_min(sizeof(params->device_id), sizeof(tmpstr)));
+ } else {
+ strncpy((char *)be_lun->ctl_be_lun.device_id,
+ params->device_id,
+ ctl_min(sizeof(be_lun->ctl_be_lun.device_id),
+ sizeof(params->device_id)));
+ }
+
+ TASK_INIT(&be_lun->io_task, /*priority*/0, ctl_be_block_worker, be_lun);
+
+ be_lun->io_taskqueue = taskqueue_create(be_lun->lunname, M_WAITOK,
+ taskqueue_thread_enqueue, /*context*/&be_lun->io_taskqueue);
+
+ if (be_lun->io_taskqueue == NULL) {
+ snprintf(req->error_str, sizeof(req->error_str),
+ "%s: Unable to create taskqueue", __func__);
+ goto bailout_error;
+ }
+
+ /*
+ * Note that we start the same number of threads by default for
+ * both the file case and the block device case. For the file
+ * case, we need multiple threads to allow concurrency, because the
+ * vnode interface is designed to be a blocking interface. For the
+ * block device case, ZFS zvols at least will block the caller's
+ * context in many instances, and so we need multiple threads to
+ * overcome that problem. Other block devices don't need as many
+ * threads, but they shouldn't cause too many problems.
+ *
+ * If the user wants to just have a single thread for a block
+ * device, he can specify that when the LUN is created, or change
+ * the tunable/sysctl to alter the default number of threads.
+ */
+ retval = taskqueue_start_threads(&be_lun->io_taskqueue,
+ /*num threads*/num_threads,
+ /*priority*/PWAIT,
+ /*thread name*/
+ "%s taskq", be_lun->lunname);
+
+ if (retval != 0)
+ goto bailout_error;
+
+ be_lun->num_threads = num_threads;
+
+ mtx_lock(&softc->lock);
+ softc->num_luns++;
+ STAILQ_INSERT_TAIL(&softc->lun_list, be_lun, links);
+
+ mtx_unlock(&softc->lock);
+
+ retval = ctl_add_lun(&be_lun->ctl_be_lun);
+ if (retval != 0) {
+ mtx_lock(&softc->lock);
+ STAILQ_REMOVE(&softc->lun_list, be_lun, ctl_be_block_lun,
+ links);
+ softc->num_luns--;
+ mtx_unlock(&softc->lock);
+ snprintf(req->error_str, sizeof(req->error_str),
+ "%s: ctl_add_lun() returned error %d, see dmesg for "
+ "details", __func__, retval);
+ retval = 0;
+ goto bailout_error;
+ }
+
+ mtx_lock(&softc->lock);
+
+ /*
+ * Tell the config_status routine that we're waiting so it won't
+ * clean up the LUN in the event of an error.
+ */
+ be_lun->flags |= CTL_BE_BLOCK_LUN_WAITING;
+
+ while (be_lun->flags & CTL_BE_BLOCK_LUN_UNCONFIGURED) {
+ retval = msleep(be_lun, &softc->lock, PCATCH, "ctlblk", 0);
+ if (retval == EINTR)
+ break;
+ }
+ be_lun->flags &= ~CTL_BE_BLOCK_LUN_WAITING;
+
+ if (be_lun->flags & CTL_BE_BLOCK_LUN_CONFIG_ERR) {
+ snprintf(req->error_str, sizeof(req->error_str),
+ "%s: LUN configuration error, see dmesg for details",
+ __func__);
+ STAILQ_REMOVE(&softc->lun_list, be_lun, ctl_be_block_lun,
+ links);
+ softc->num_luns--;
+ mtx_unlock(&softc->lock);
+ goto bailout_error;
+ } else {
+ params->req_lun_id = be_lun->ctl_be_lun.lun_id;
+ }
+
+ mtx_unlock(&softc->lock);
+
+ be_lun->disk_stats = devstat_new_entry("cbb", params->req_lun_id,
+ be_lun->blocksize,
+ DEVSTAT_ALL_SUPPORTED,
+ be_lun->ctl_be_lun.lun_type
+ | DEVSTAT_TYPE_IF_OTHER,
+ DEVSTAT_PRIORITY_OTHER);
+
+
+ req->status = CTL_LUN_OK;
+
+ return (retval);
+
+bailout_error:
+ req->status = CTL_LUN_ERROR;
+
+ ctl_be_block_close(be_lun);
+
+ free(be_lun->dev_path, M_CTLBLK);
+ free(be_lun, M_CTLBLK);
+
+ return (retval);
+}
+
+static int
+ctl_be_block_rm(struct ctl_be_block_softc *softc, struct ctl_lun_req *req)
+{
+ struct ctl_lun_rm_params *params;
+ struct ctl_be_block_lun *be_lun;
+ int retval;
+
+ params = &req->reqdata.rm;
+
+ mtx_lock(&softc->lock);
+
+ be_lun = NULL;
+
+ STAILQ_FOREACH(be_lun, &softc->lun_list, links) {
+ if (be_lun->ctl_be_lun.lun_id == params->lun_id)
+ break;
+ }
+ mtx_unlock(&softc->lock);
+
+ if (be_lun == NULL) {
+ snprintf(req->error_str, sizeof(req->error_str),
+ "%s: LUN %u is not managed by the block backend",
+ __func__, params->lun_id);
+ goto bailout_error;
+ }
+
+ retval = ctl_disable_lun(&be_lun->ctl_be_lun);
+
+ if (retval != 0) {
+ snprintf(req->error_str, sizeof(req->error_str),
+ "%s: error %d returned from ctl_disable_lun() for "
+ "LUN %d", __func__, retval, params->lun_id);
+ goto bailout_error;
+
+ }
+
+ retval = ctl_invalidate_lun(&be_lun->ctl_be_lun);
+ if (retval != 0) {
+ snprintf(req->error_str, sizeof(req->error_str),
+ "%s: error %d returned from ctl_invalidate_lun() for "
+ "LUN %d", __func__, retval, params->lun_id);
+ goto bailout_error;
+ }
+
+ mtx_lock(&softc->lock);
+
+ be_lun->flags |= CTL_BE_BLOCK_LUN_WAITING;
+
+ while ((be_lun->flags & CTL_BE_BLOCK_LUN_UNCONFIGURED) == 0) {
+ retval = msleep(be_lun, &softc->lock, PCATCH, "ctlblk", 0);
+ if (retval == EINTR)
+ break;
+ }
+
+ be_lun->flags &= ~CTL_BE_BLOCK_LUN_WAITING;
+
+ if ((be_lun->flags & CTL_BE_BLOCK_LUN_UNCONFIGURED) == 0) {
+ snprintf(req->error_str, sizeof(req->error_str),
+ "%s: interrupted waiting for LUN to be freed",
+ __func__);
+ mtx_unlock(&softc->lock);
+ goto bailout_error;
+ }
+
+ STAILQ_REMOVE(&softc->lun_list, be_lun, ctl_be_block_lun, links);
+
+ softc->num_luns--;
+ mtx_unlock(&softc->lock);
+
+ taskqueue_drain(be_lun->io_taskqueue, &be_lun->io_task);
+
+ taskqueue_free(be_lun->io_taskqueue);
+
+ ctl_be_block_close(be_lun);
+
+ if (be_lun->disk_stats != NULL)
+ devstat_remove_entry(be_lun->disk_stats);
+
+ uma_zdestroy(be_lun->lun_zone);
+
+ free(be_lun->dev_path, M_CTLBLK);
+
+ free(be_lun, M_CTLBLK);
+
+ req->status = CTL_LUN_OK;
+
+ return (0);
+
+bailout_error:
+
+ req->status = CTL_LUN_ERROR;
+
+ return (0);
+}
+
+static void
+ctl_be_block_lun_shutdown(void *be_lun)
+{
+ struct ctl_be_block_lun *lun;
+ struct ctl_be_block_softc *softc;
+
+ lun = (struct ctl_be_block_lun *)be_lun;
+
+ softc = lun->softc;
+
+ mtx_lock(&softc->lock);
+ lun->flags |= CTL_BE_BLOCK_LUN_UNCONFIGURED;
+ if (lun->flags & CTL_BE_BLOCK_LUN_WAITING)
+ wakeup(lun);
+ mtx_unlock(&softc->lock);
+
+}
+
+static void
+ctl_be_block_lun_config_status(void *be_lun, ctl_lun_config_status status)
+{
+ struct ctl_be_block_lun *lun;
+ struct ctl_be_block_softc *softc;
+
+ lun = (struct ctl_be_block_lun *)be_lun;
+ softc = lun->softc;
+
+ if (status == CTL_LUN_CONFIG_OK) {
+ mtx_lock(&softc->lock);
+ lun->flags &= ~CTL_BE_BLOCK_LUN_UNCONFIGURED;
+ if (lun->flags & CTL_BE_BLOCK_LUN_WAITING)
+ wakeup(lun);
+ mtx_unlock(&softc->lock);
+
+ /*
+ * We successfully added the LUN, attempt to enable it.
+ */
+ if (ctl_enable_lun(&lun->ctl_be_lun) != 0) {
+ printf("%s: ctl_enable_lun() failed!\n", __func__);
+ if (ctl_invalidate_lun(&lun->ctl_be_lun) != 0) {
+ printf("%s: ctl_invalidate_lun() failed!\n",
+ __func__);
+ }
+ }
+
+ return;
+ }
+
+
+ mtx_lock(&softc->lock);
+ lun->flags &= ~CTL_BE_BLOCK_LUN_UNCONFIGURED;
+ lun->flags |= CTL_BE_BLOCK_LUN_CONFIG_ERR;
+ wakeup(lun);
+ mtx_unlock(&softc->lock);
+}
+
+
+static int
+ctl_be_block_config_write(union ctl_io *io)
+{
+ struct ctl_be_block_lun *be_lun;
+ struct ctl_be_lun *ctl_be_lun;
+ int retval;
+
+ retval = 0;
+
+ DPRINTF("entered\n");
+
+ ctl_be_lun = (struct ctl_be_lun *)io->io_hdr.ctl_private[
+ CTL_PRIV_BACKEND_LUN].ptr;
+ be_lun = (struct ctl_be_block_lun *)ctl_be_lun->be_lun;
+
+ switch (io->scsiio.cdb[0]) {
+ case SYNCHRONIZE_CACHE:
+ case SYNCHRONIZE_CACHE_16:
+ /*
+ * The upper level CTL code will filter out any CDBs with
+ * the immediate bit set and return the proper error.
+ *
+ * We don't really need to worry about what LBA range the
+ * user asked to be synced out. When they issue a sync
+ * cache command, we'll sync out the whole thing.
+ */
+ mtx_lock(&be_lun->lock);
+ STAILQ_INSERT_TAIL(&be_lun->config_write_queue, &io->io_hdr,
+ links);
+ mtx_unlock(&be_lun->lock);
+ taskqueue_enqueue(be_lun->io_taskqueue, &be_lun->io_task);
+ break;
+ case START_STOP_UNIT: {
+ struct scsi_start_stop_unit *cdb;
+
+ cdb = (struct scsi_start_stop_unit *)io->scsiio.cdb;
+
+ if (cdb->how & SSS_START)
+ retval = ctl_start_lun(ctl_be_lun);
+ else {
+ retval = ctl_stop_lun(ctl_be_lun);
+ /*
+ * XXX KDM Copan-specific offline behavior.
+ * Figure out a reasonable way to port this?
+ */
+#ifdef NEEDTOPORT
+ if ((retval == 0)
+ && (cdb->byte2 & SSS_ONOFFLINE))
+ retval = ctl_lun_offline(ctl_be_lun);
+#endif
+ }
+
+ /*
+ * In general, the above routines should not fail. They
+ * just set state for the LUN. So we've got something
+ * pretty wrong here if we can't start or stop the LUN.
+ */
+ if (retval != 0) {
+ ctl_set_internal_failure(&io->scsiio,
+ /*sks_valid*/ 1,
+ /*retry_count*/ 0xf051);
+ retval = CTL_RETVAL_COMPLETE;
+ } else {
+ ctl_set_success(&io->scsiio);
+ }
+ ctl_config_write_done(io);
+ break;
+ }
+ default:
+ ctl_set_invalid_opcode(&io->scsiio);
+ ctl_config_write_done(io);
+ retval = CTL_RETVAL_COMPLETE;
+ break;
+ }
+
+ return (retval);
+
+}
+
+static int
+ctl_be_block_config_read(union ctl_io *io)
+{
+ return (0);
+}
+
+static int
+ctl_be_block_lun_info(void *be_lun, struct sbuf *sb)
+{
+ struct ctl_be_block_lun *lun;
+ int retval;
+
+ lun = (struct ctl_be_block_lun *)be_lun;
+ retval = 0;
+
+ retval = sbuf_printf(sb, "<num_threads>");
+
+ if (retval != 0)
+ goto bailout;
+
+ retval = sbuf_printf(sb, "%d", lun->num_threads);
+
+ if (retval != 0)
+ goto bailout;
+
+ retval = sbuf_printf(sb, "</num_threads>");
+
+ /*
+ * For processor devices, we don't have a path variable.
+ */
+ if ((retval != 0)
+ || (lun->dev_path == NULL))
+ goto bailout;
+
+ retval = sbuf_printf(sb, "<file>");
+
+ if (retval != 0)
+ goto bailout;
+
+ retval = ctl_sbuf_printf_esc(sb, lun->dev_path);
+
+ if (retval != 0)
+ goto bailout;
+
+ retval = sbuf_printf(sb, "</file>\n");
+
+bailout:
+
+ return (retval);
+}
+
+int
+ctl_be_block_init(void)
+{
+ struct ctl_be_block_softc *softc;
+ int retval;
+
+ softc = &backend_block_softc;
+ retval = 0;
+
+ mtx_init(&softc->lock, "ctlblk", NULL, MTX_DEF);
+ STAILQ_INIT(&softc->beio_free_queue);
+ STAILQ_INIT(&softc->disk_list);
+ STAILQ_INIT(&softc->lun_list);
+ ctl_grow_beio(softc, 200);
+
+ return (retval);
+}
diff --git a/sys/cam/ctl/ctl_backend_block.h b/sys/cam/ctl/ctl_backend_block.h
new file mode 100644
index 0000000..e5781d5
--- /dev/null
+++ b/sys/cam/ctl/ctl_backend_block.h
@@ -0,0 +1,72 @@
+/*-
+ * Copyright (c) 2003 Silicon Graphics International Corp.
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_backend_block.h#1 $
+ * $FreeBSD$
+ */
+/*
+ * CAM Target Layer driver backend interface for block devices.
+ *
+ * Author: Ken Merry <ken@FreeBSD.org>
+ */
+
+#ifndef _CTL_BACKEND_BLOCK_H_
+#define _CTL_BACKEND_BLOCK_H_
+
+struct ctl_block_disk {
+ uint32_t version; /* interface version */
+ uint32_t disknum; /* returned device number */
+ STAILQ_ENTRY(ctl_block_disk) links; /* linked list pointer */
+ char disk_name[MAXPATHLEN]; /* name of this device */
+ int allocated; /* disk is allocated to a LUN */
+ uint64_t size_blocks; /* disk size in blocks */
+ uint64_t size_bytes; /* disk size in bytes */
+};
+
+typedef enum {
+ CTL_BLOCK_DEVLIST_MORE,
+ CTL_BLOCK_DEVLIST_DONE
+} ctl_block_devlist_status;
+
+struct ctl_block_devlist {
+ uint32_t version; /* interface version */
+ uint32_t buf_len; /* passed in, buffer length */
+ uint32_t ctl_disk_size; /* size of adddev, passed in */
+ struct ctl_block_disk *devbuf; /* buffer passed in/filled out*/
+ uint32_t num_bufs; /* number passed out */
+ uint32_t buf_used; /* bytes passed out */
+ uint32_t total_disks; /* number of disks in system */
+ ctl_block_devlist_status status; /* did we get the whole list? */
+};
+
+#define CTL_BLOCK_ADDDEV _IOWR(COPAN_ARRAY_BE_BLOCK, 0x00, struct ctl_block_disk)
+#define CTL_BLOCK_DEVLIST _IOWR(COPAN_ARRAY_BE_BLOCK, 0x01, struct ctl_block_devlist)
+#define CTL_BLOCK_RMDEV _IOW(COPAN_ARRAY_BE_BLOCK, 0x02, struct ctl_block_disk)
+
+#endif /* _CTL_BACKEND_BLOCK_H_ */
diff --git a/sys/cam/ctl/ctl_backend_ramdisk.c b/sys/cam/ctl/ctl_backend_ramdisk.c
new file mode 100644
index 0000000..88b5008
--- /dev/null
+++ b/sys/cam/ctl/ctl_backend_ramdisk.c
@@ -0,0 +1,835 @@
+/*-
+ * Copyright (c) 2003, 2008 Silicon Graphics International Corp.
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_backend_ramdisk.c#3 $
+ */
+/*
+ * CAM Target Layer backend for a "fake" ramdisk.
+ *
+ * Author: Ken Merry <ken@FreeBSD.org>
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/kernel.h>
+#include <sys/condvar.h>
+#include <sys/types.h>
+#include <sys/lock.h>
+#include <sys/mutex.h>
+#include <sys/malloc.h>
+#include <sys/time.h>
+#include <sys/queue.h>
+#include <sys/conf.h>
+#include <sys/ioccom.h>
+#include <sys/module.h>
+
+#include <cam/scsi/scsi_all.h>
+#include <cam/ctl/ctl_io.h>
+#include <cam/ctl/ctl.h>
+#include <cam/ctl/ctl_util.h>
+#include <cam/ctl/ctl_backend.h>
+#include <cam/ctl/ctl_frontend_internal.h>
+#include <cam/ctl/ctl_debug.h>
+#include <cam/ctl/ctl_ioctl.h>
+#include <cam/ctl/ctl_error.h>
+
+typedef enum {
+ CTL_BE_RAMDISK_LUN_UNCONFIGURED = 0x01,
+ CTL_BE_RAMDISK_LUN_CONFIG_ERR = 0x02,
+ CTL_BE_RAMDISK_LUN_WAITING = 0x04
+} ctl_be_ramdisk_lun_flags;
+
+struct ctl_be_ramdisk_lun {
+ uint64_t size_bytes;
+ uint64_t size_blocks;
+ struct ctl_be_ramdisk_softc *softc;
+ ctl_be_ramdisk_lun_flags flags;
+ STAILQ_ENTRY(ctl_be_ramdisk_lun) links;
+ struct ctl_be_lun ctl_be_lun;
+};
+
+struct ctl_be_ramdisk_softc {
+ struct mtx lock;
+ int rd_size;
+#ifdef CTL_RAMDISK_PAGES
+ uint8_t **ramdisk_pages;
+ int num_pages;
+#else
+ uint8_t *ramdisk_buffer;
+#endif
+ int num_luns;
+ STAILQ_HEAD(, ctl_be_ramdisk_lun) lun_list;
+};
+
+static struct ctl_be_ramdisk_softc rd_softc;
+
+int ctl_backend_ramdisk_init(void);
+void ctl_backend_ramdisk_shutdown(void);
+static int ctl_backend_ramdisk_move_done(union ctl_io *io);
+static int ctl_backend_ramdisk_submit(union ctl_io *io);
+static int ctl_backend_ramdisk_ioctl(struct cdev *dev, u_long cmd,
+ caddr_t addr, int flag, struct thread *td);
+static int ctl_backend_ramdisk_rm(struct ctl_be_ramdisk_softc *softc,
+ struct ctl_lun_req *req);
+static int ctl_backend_ramdisk_create(struct ctl_be_ramdisk_softc *softc,
+ struct ctl_lun_req *req, int do_wait);
+static void ctl_backend_ramdisk_lun_shutdown(void *be_lun);
+static void ctl_backend_ramdisk_lun_config_status(void *be_lun,
+ ctl_lun_config_status status);
+static int ctl_backend_ramdisk_config_write(union ctl_io *io);
+static int ctl_backend_ramdisk_config_read(union ctl_io *io);
+
+static struct ctl_backend_driver ctl_be_ramdisk_driver =
+{
+ .name = "ramdisk",
+ .flags = CTL_BE_FLAG_HAS_CONFIG,
+ .init = ctl_backend_ramdisk_init,
+ .data_submit = ctl_backend_ramdisk_submit,
+ .data_move_done = ctl_backend_ramdisk_move_done,
+ .config_read = ctl_backend_ramdisk_config_read,
+ .config_write = ctl_backend_ramdisk_config_write,
+ .ioctl = ctl_backend_ramdisk_ioctl
+};
+
+MALLOC_DEFINE(M_RAMDISK, "ramdisk", "Memory used for CTL RAMdisk");
+CTL_BACKEND_DECLARE(cbr, ctl_be_ramdisk_driver);
+
+int
+ctl_backend_ramdisk_init(void)
+{
+ struct ctl_be_ramdisk_softc *softc;
+#ifdef CTL_RAMDISK_PAGES
+ int i, j;
+#endif
+
+
+ softc = &rd_softc;
+
+ memset(softc, 0, sizeof(*softc));
+
+ mtx_init(&softc->lock, "ramdisk", NULL, MTX_DEF);
+
+ STAILQ_INIT(&softc->lun_list);
+ softc->rd_size = 4 * 1024 * 1024;
+#ifdef CTL_RAMDISK_PAGES
+ softc->num_pages = softc->rd_size / PAGE_SIZE;
+ softc->ramdisk_pages = (uint8_t **)malloc(sizeof(uint8_t *) *
+ softc->num_pages, M_RAMDISK,
+ M_WAITOK);
+ for (i = 0; i < softc->num_pages; i++) {
+ softc->ramdisk_pages[i] = malloc(PAGE_SIZE, M_RAMDISK,M_WAITOK);
+ if (softc->ramdisk_pages[i] == NULL) {
+ for (j = 0; j < i; j++) {
+ free(softc->ramdisk_pages[j], M_RAMDISK);
+ }
+ free(softc->ramdisk_pages, M_RAMDISK);
+ panic("RAMDisk initialization failed\n");
+ return (1); /* NOTREACHED */
+ }
+ }
+#else
+ softc->ramdisk_buffer = (uint8_t *)malloc(softc->rd_size, M_RAMDISK,
+ M_WAITOK);
+#endif
+
+ return (0);
+}
+
+void
+ctl_backend_ramdisk_shutdown(void)
+{
+ struct ctl_be_ramdisk_softc *softc;
+ struct ctl_be_ramdisk_lun *lun, *next_lun;
+#ifdef CTL_RAMDISK_PAGES
+ int i;
+#endif
+
+ softc = &rd_softc;
+
+ mtx_lock(&softc->lock);
+ for (lun = STAILQ_FIRST(&softc->lun_list); lun != NULL; lun = next_lun){
+ /*
+ * Grab the next LUN. The current LUN may get removed by
+ * ctl_invalidate_lun(), which will call our LUN shutdown
+ * routine, if there is no outstanding I/O for this LUN.
+ */
+ next_lun = STAILQ_NEXT(lun, links);
+
+ /*
+ * Drop our lock here. Since ctl_invalidate_lun() can call
+ * back into us, this could potentially lead to a recursive
+ * lock of the same mutex, which would cause a hang.
+ */
+ mtx_unlock(&softc->lock);
+ ctl_disable_lun(&lun->ctl_be_lun);
+ ctl_invalidate_lun(&lun->ctl_be_lun);
+ mtx_lock(&softc->lock);
+ }
+ mtx_unlock(&softc->lock);
+
+#ifdef CTL_RAMDISK_PAGES
+ for (i = 0; i < softc->num_pages; i++)
+ free(softc->ramdisk_pages[i], M_RAMDISK);
+
+ free(softc->ramdisk_pages, M_RAMDISK);
+#else
+ free(softc->ramdisk_buffer, M_RAMDISK);
+#endif
+
+ if (ctl_backend_deregister(&ctl_be_ramdisk_driver) != 0) {
+ printf("ctl_backend_ramdisk_shutdown: "
+ "ctl_backend_deregister() failed!\n");
+ }
+}
+
+static int
+ctl_backend_ramdisk_move_done(union ctl_io *io)
+{
+#ifdef CTL_TIME_IO
+ struct bintime cur_bt;
+#endif
+
+ CTL_DEBUG_PRINT(("ctl_backend_ramdisk_move_done\n"));
+ if ((io->io_hdr.port_status == 0)
+ && ((io->io_hdr.flags & CTL_FLAG_ABORT) == 0)
+ && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE))
+ io->io_hdr.status = CTL_SUCCESS;
+ else if ((io->io_hdr.port_status != 0)
+ && ((io->io_hdr.flags & CTL_FLAG_ABORT) == 0)
+ && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE)){
+ /*
+ * For hardware error sense keys, the sense key
+ * specific value is defined to be a retry count,
+ * but we use it to pass back an internal FETD
+ * error code. XXX KDM Hopefully the FETD is only
+ * using 16 bits for an error code, since that's
+ * all the space we have in the sks field.
+ */
+ ctl_set_internal_failure(&io->scsiio,
+ /*sks_valid*/ 1,
+ /*retry_count*/
+ io->io_hdr.port_status);
+ }
+#ifdef CTL_TIME_IO
+ getbintime(&cur_bt);
+ bintime_sub(&cur_bt, &io->io_hdr.dma_start_bt);
+ bintime_add(&io->io_hdr.dma_bt, &cur_bt);
+ io->io_hdr.num_dmas++;
+#endif
+
+ if (io->scsiio.kern_sg_entries > 0)
+ free(io->scsiio.kern_data_ptr, M_RAMDISK);
+ ctl_done(io);
+ return(0);
+}
+
+static int
+ctl_backend_ramdisk_submit(union ctl_io *io)
+{
+ struct ctl_lba_len lbalen;
+#ifdef CTL_RAMDISK_PAGES
+ struct ctl_sg_entry *sg_entries;
+ int len_filled;
+ int i;
+#endif
+ int num_sg_entries, len;
+ struct ctl_be_ramdisk_softc *softc;
+ struct ctl_be_lun *ctl_be_lun;
+ struct ctl_be_ramdisk_lun *be_lun;
+
+ softc = &rd_softc;
+
+ ctl_be_lun = (struct ctl_be_lun *)io->io_hdr.ctl_private[
+ CTL_PRIV_BACKEND_LUN].ptr;
+ be_lun = (struct ctl_be_ramdisk_lun *)ctl_be_lun->be_lun;
+
+ memcpy(&lbalen, io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].bytes,
+ sizeof(lbalen));
+
+ len = lbalen.len * ctl_be_lun->blocksize;
+
+ /*
+ * Kick out the request if it's bigger than we can handle.
+ */
+ if (len > softc->rd_size) {
+ ctl_set_internal_failure(&io->scsiio,
+ /*sks_valid*/ 0,
+ /*retry_count*/ 0);
+ ctl_done(io);
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ /*
+ * Kick out the request if it's larger than the device size that
+ * the user requested.
+ */
+ if (((lbalen.lba * ctl_be_lun->blocksize) + len) > be_lun->size_bytes) {
+ ctl_set_lba_out_of_range(&io->scsiio);
+ ctl_done(io);
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+#ifdef CTL_RAMDISK_PAGES
+ num_sg_entries = len >> PAGE_SHIFT;
+ if ((len & (PAGE_SIZE - 1)) != 0)
+ num_sg_entries++;
+
+ if (num_sg_entries > 1) {
+ io->scsiio.kern_data_ptr = malloc(sizeof(struct ctl_sg_entry) *
+ num_sg_entries, M_RAMDISK,
+ M_WAITOK);
+ if (io->scsiio.kern_data_ptr == NULL) {
+ ctl_set_internal_failure(&io->scsiio,
+ /*sks_valid*/ 0,
+ /*retry_count*/ 0);
+ ctl_done(io);
+ return (CTL_RETVAL_COMPLETE);
+ }
+ sg_entries = (struct ctl_sg_entry *)io->scsiio.kern_data_ptr;
+ for (i = 0, len_filled = 0; i < num_sg_entries;
+ i++, len_filled += PAGE_SIZE) {
+ sg_entries[i].addr = softc->ramdisk_pages[i];
+ sg_entries[i].len = ctl_min(PAGE_SIZE,
+ len - len_filled);
+ }
+ } else {
+#endif /* CTL_RAMDISK_PAGES */
+ /*
+ * If this is less than 1 page, don't bother allocating a
+ * scatter/gather list for it. This saves time/overhead.
+ */
+ num_sg_entries = 0;
+#ifdef CTL_RAMDISK_PAGES
+ io->scsiio.kern_data_ptr = softc->ramdisk_pages[0];
+#else
+ io->scsiio.kern_data_ptr = softc->ramdisk_buffer;
+#endif
+#ifdef CTL_RAMDISK_PAGES
+ }
+#endif
+
+ io->scsiio.be_move_done = ctl_backend_ramdisk_move_done;
+ io->scsiio.kern_data_len = len;
+ io->scsiio.kern_total_len = len;
+ io->scsiio.kern_rel_offset = 0;
+ io->scsiio.kern_data_resid = 0;
+ io->scsiio.kern_sg_entries = num_sg_entries;
+ io->io_hdr.flags |= CTL_FLAG_ALLOCATED | CTL_FLAG_KDPTR_SGLIST;
+#ifdef CTL_TIME_IO
+ getbintime(&io->io_hdr.dma_start_bt);
+#endif
+ ctl_datamove(io);
+
+ return (CTL_RETVAL_COMPLETE);
+}
+
+static int
+ctl_backend_ramdisk_ioctl(struct cdev *dev, u_long cmd, caddr_t addr,
+ int flag, struct thread *td)
+{
+ struct ctl_be_ramdisk_softc *softc;
+ int retval;
+
+ retval = 0;
+ softc = &rd_softc;
+
+ switch (cmd) {
+ case CTL_LUN_REQ: {
+ struct ctl_lun_req *lun_req;
+
+ lun_req = (struct ctl_lun_req *)addr;
+
+ switch (lun_req->reqtype) {
+ case CTL_LUNREQ_CREATE:
+ retval = ctl_backend_ramdisk_create(softc, lun_req,
+ /*do_wait*/ 1);
+ break;
+ case CTL_LUNREQ_RM:
+ retval = ctl_backend_ramdisk_rm(softc, lun_req);
+ break;
+ default:
+ lun_req->status = CTL_LUN_ERROR;
+ snprintf(lun_req->error_str, sizeof(lun_req->error_str),
+ "%s: invalid LUN request type %d", __func__,
+ lun_req->reqtype);
+ break;
+ }
+ break;
+ }
+ default:
+ retval = ENOTTY;
+ break;
+ }
+
+ return (retval);
+}
+
+static int
+ctl_backend_ramdisk_rm(struct ctl_be_ramdisk_softc *softc,
+ struct ctl_lun_req *req)
+{
+ struct ctl_be_ramdisk_lun *be_lun;
+ struct ctl_lun_rm_params *params;
+ int retval;
+
+
+ retval = 0;
+ params = &req->reqdata.rm;
+
+ be_lun = NULL;
+
+ mtx_lock(&softc->lock);
+
+ STAILQ_FOREACH(be_lun, &softc->lun_list, links) {
+ if (be_lun->ctl_be_lun.lun_id == params->lun_id)
+ break;
+ }
+ mtx_unlock(&softc->lock);
+
+ if (be_lun == NULL) {
+ snprintf(req->error_str, sizeof(req->error_str),
+ "%s: LUN %u is not managed by the ramdisk backend",
+ __func__, params->lun_id);
+ goto bailout_error;
+ }
+
+ retval = ctl_disable_lun(&be_lun->ctl_be_lun);
+
+ if (retval != 0) {
+ snprintf(req->error_str, sizeof(req->error_str),
+ "%s: error %d returned from ctl_disable_lun() for "
+ "LUN %d", __func__, retval, params->lun_id);
+ goto bailout_error;
+ }
+
+ /*
+ * Set the waiting flag before we invalidate the LUN. Our shutdown
+ * routine can be called any time after we invalidate the LUN,
+ * and can be called from our context.
+ *
+ * This tells the shutdown routine that we're waiting, or we're
+ * going to wait for the shutdown to happen.
+ */
+ mtx_lock(&softc->lock);
+ be_lun->flags |= CTL_BE_RAMDISK_LUN_WAITING;
+ mtx_unlock(&softc->lock);
+
+ retval = ctl_invalidate_lun(&be_lun->ctl_be_lun);
+ if (retval != 0) {
+ snprintf(req->error_str, sizeof(req->error_str),
+ "%s: error %d returned from ctl_invalidate_lun() for "
+ "LUN %d", __func__, retval, params->lun_id);
+ goto bailout_error;
+ }
+
+ mtx_lock(&softc->lock);
+
+ while ((be_lun->flags & CTL_BE_RAMDISK_LUN_UNCONFIGURED) == 0) {
+ retval = msleep(be_lun, &softc->lock, PCATCH, "ctlram", 0);
+ if (retval == EINTR)
+ break;
+ }
+ be_lun->flags &= ~CTL_BE_RAMDISK_LUN_WAITING;
+
+ /*
+ * We only remove this LUN from the list and free it (below) if
+ * retval == 0. If the user interrupted the wait, we just bail out
+ * without actually freeing the LUN. We let the shutdown routine
+ * free the LUN if that happens.
+ */
+ if (retval == 0) {
+ STAILQ_REMOVE(&softc->lun_list, be_lun, ctl_be_ramdisk_lun,
+ links);
+ softc->num_luns--;
+ }
+
+ mtx_unlock(&softc->lock);
+
+ if (retval == 0)
+ free(be_lun, M_RAMDISK);
+
+ req->status = CTL_LUN_OK;
+
+ return (retval);
+
+bailout_error:
+
+ /*
+ * Don't leave the waiting flag set.
+ */
+ mtx_lock(&softc->lock);
+ be_lun->flags &= ~CTL_BE_RAMDISK_LUN_WAITING;
+ mtx_unlock(&softc->lock);
+
+ req->status = CTL_LUN_ERROR;
+
+ return (0);
+}
+
+static int
+ctl_backend_ramdisk_create(struct ctl_be_ramdisk_softc *softc,
+ struct ctl_lun_req *req, int do_wait)
+{
+ struct ctl_be_ramdisk_lun *be_lun;
+ struct ctl_lun_create_params *params;
+ uint32_t blocksize;
+ char tmpstr[32];
+ int retval;
+
+ retval = 0;
+ params = &req->reqdata.create;
+ if (params->blocksize_bytes != 0)
+ blocksize = params->blocksize_bytes;
+ else
+ blocksize = 512;
+
+ be_lun = malloc(sizeof(*be_lun), M_RAMDISK, M_ZERO | (do_wait ?
+ M_WAITOK : M_NOWAIT));
+
+ if (be_lun == NULL) {
+ snprintf(req->error_str, sizeof(req->error_str),
+ "%s: error allocating %zd bytes", __func__,
+ sizeof(*be_lun));
+ goto bailout_error;
+ }
+
+ if (params->flags & CTL_LUN_FLAG_DEV_TYPE)
+ be_lun->ctl_be_lun.lun_type = params->device_type;
+ else
+ be_lun->ctl_be_lun.lun_type = T_DIRECT;
+
+ if (be_lun->ctl_be_lun.lun_type == T_DIRECT) {
+
+ if (params->lun_size_bytes < blocksize) {
+ snprintf(req->error_str, sizeof(req->error_str),
+ "%s: LUN size %ju < blocksize %u", __func__,
+ params->lun_size_bytes, blocksize);
+ goto bailout_error;
+ }
+
+ be_lun->size_blocks = params->lun_size_bytes / blocksize;
+ be_lun->size_bytes = be_lun->size_blocks * blocksize;
+
+ be_lun->ctl_be_lun.maxlba = be_lun->size_blocks - 1;
+ } else {
+ be_lun->ctl_be_lun.maxlba = 0;
+ blocksize = 0;
+ be_lun->size_bytes = 0;
+ be_lun->size_blocks = 0;
+ }
+
+ be_lun->ctl_be_lun.blocksize = blocksize;
+
+ /* Tell the user the blocksize we ended up using */
+ params->blocksize_bytes = blocksize;
+
+ /* Tell the user the exact size we ended up using */
+ params->lun_size_bytes = be_lun->size_bytes;
+
+ be_lun->softc = softc;
+
+ be_lun->flags = CTL_BE_RAMDISK_LUN_UNCONFIGURED;
+ be_lun->ctl_be_lun.flags = CTL_LUN_FLAG_PRIMARY;
+ be_lun->ctl_be_lun.be_lun = be_lun;
+
+ if (params->flags & CTL_LUN_FLAG_ID_REQ) {
+ be_lun->ctl_be_lun.req_lun_id = params->req_lun_id;
+ be_lun->ctl_be_lun.flags |= CTL_LUN_FLAG_ID_REQ;
+ } else
+ be_lun->ctl_be_lun.req_lun_id = 0;
+
+ be_lun->ctl_be_lun.lun_shutdown = ctl_backend_ramdisk_lun_shutdown;
+ be_lun->ctl_be_lun.lun_config_status =
+ ctl_backend_ramdisk_lun_config_status;
+ be_lun->ctl_be_lun.be = &ctl_be_ramdisk_driver;
+ if ((params->flags & CTL_LUN_FLAG_SERIAL_NUM) == 0) {
+ snprintf(tmpstr, sizeof(tmpstr), "MYSERIAL%4d",
+ softc->num_luns);
+ strncpy((char *)be_lun->ctl_be_lun.serial_num, tmpstr,
+ ctl_min(sizeof(be_lun->ctl_be_lun.serial_num),
+ sizeof(tmpstr)));
+
+ /* Tell the user what we used for a serial number */
+ strncpy((char *)params->serial_num, tmpstr,
+ ctl_min(sizeof(params->serial_num), sizeof(tmpstr)));
+ } else {
+ strncpy((char *)be_lun->ctl_be_lun.serial_num,
+ params->serial_num,
+ ctl_min(sizeof(be_lun->ctl_be_lun.serial_num),
+ sizeof(params->serial_num)));
+ }
+ if ((params->flags & CTL_LUN_FLAG_DEVID) == 0) {
+ snprintf(tmpstr, sizeof(tmpstr), "MYDEVID%4d", softc->num_luns);
+ strncpy((char *)be_lun->ctl_be_lun.device_id, tmpstr,
+ ctl_min(sizeof(be_lun->ctl_be_lun.device_id),
+ sizeof(tmpstr)));
+
+ /* Tell the user what we used for a device ID */
+ strncpy((char *)params->device_id, tmpstr,
+ ctl_min(sizeof(params->device_id), sizeof(tmpstr)));
+ } else {
+ strncpy((char *)be_lun->ctl_be_lun.device_id,
+ params->device_id,
+ ctl_min(sizeof(be_lun->ctl_be_lun.device_id),
+ sizeof(params->device_id)));
+ }
+
+ mtx_lock(&softc->lock);
+ softc->num_luns++;
+ STAILQ_INSERT_TAIL(&softc->lun_list, be_lun, links);
+
+ mtx_unlock(&softc->lock);
+
+ retval = ctl_add_lun(&be_lun->ctl_be_lun);
+ if (retval != 0) {
+ mtx_lock(&softc->lock);
+ STAILQ_REMOVE(&softc->lun_list, be_lun, ctl_be_ramdisk_lun,
+ links);
+ softc->num_luns--;
+ mtx_unlock(&softc->lock);
+ snprintf(req->error_str, sizeof(req->error_str),
+ "%s: ctl_add_lun() returned error %d, see dmesg for "
+ "details", __func__, retval);
+ retval = 0;
+ goto bailout_error;
+ }
+
+ if (do_wait == 0)
+ return (retval);
+
+ mtx_lock(&softc->lock);
+
+ /*
+ * Tell the config_status routine that we're waiting so it won't
+ * clean up the LUN in the event of an error.
+ */
+ be_lun->flags |= CTL_BE_RAMDISK_LUN_WAITING;
+
+ while (be_lun->flags & CTL_BE_RAMDISK_LUN_UNCONFIGURED) {
+ retval = msleep(be_lun, &softc->lock, PCATCH, "ctlram", 0);
+ if (retval == EINTR)
+ break;
+ }
+ be_lun->flags &= ~CTL_BE_RAMDISK_LUN_WAITING;
+
+ if (be_lun->flags & CTL_BE_RAMDISK_LUN_CONFIG_ERR) {
+ snprintf(req->error_str, sizeof(req->error_str),
+ "%s: LUN configuration error, see dmesg for details",
+ __func__);
+ STAILQ_REMOVE(&softc->lun_list, be_lun, ctl_be_ramdisk_lun,
+ links);
+ softc->num_luns--;
+ mtx_unlock(&softc->lock);
+ goto bailout_error;
+ } else {
+ params->req_lun_id = be_lun->ctl_be_lun.lun_id;
+ }
+ mtx_unlock(&softc->lock);
+
+ req->status = CTL_LUN_OK;
+
+ return (retval);
+
+bailout_error:
+ req->status = CTL_LUN_ERROR;
+ free(be_lun, M_RAMDISK);
+
+ return (retval);
+}
+
+static void
+ctl_backend_ramdisk_lun_shutdown(void *be_lun)
+{
+ struct ctl_be_ramdisk_lun *lun;
+ struct ctl_be_ramdisk_softc *softc;
+ int do_free;
+
+ lun = (struct ctl_be_ramdisk_lun *)be_lun;
+ softc = lun->softc;
+ do_free = 0;
+
+ mtx_lock(&softc->lock);
+
+ lun->flags |= CTL_BE_RAMDISK_LUN_UNCONFIGURED;
+
+ if (lun->flags & CTL_BE_RAMDISK_LUN_WAITING) {
+ wakeup(lun);
+ } else {
+ STAILQ_REMOVE(&softc->lun_list, be_lun, ctl_be_ramdisk_lun,
+ links);
+ softc->num_luns--;
+ do_free = 1;
+ }
+
+ mtx_unlock(&softc->lock);
+
+ if (do_free != 0)
+ free(be_lun, M_RAMDISK);
+}
+
+static void
+ctl_backend_ramdisk_lun_config_status(void *be_lun,
+ ctl_lun_config_status status)
+{
+ struct ctl_be_ramdisk_lun *lun;
+ struct ctl_be_ramdisk_softc *softc;
+
+ lun = (struct ctl_be_ramdisk_lun *)be_lun;
+ softc = lun->softc;
+
+ if (status == CTL_LUN_CONFIG_OK) {
+ mtx_lock(&softc->lock);
+ lun->flags &= ~CTL_BE_RAMDISK_LUN_UNCONFIGURED;
+ if (lun->flags & CTL_BE_RAMDISK_LUN_WAITING)
+ wakeup(lun);
+ mtx_unlock(&softc->lock);
+
+ /*
+ * We successfully added the LUN, attempt to enable it.
+ */
+ if (ctl_enable_lun(&lun->ctl_be_lun) != 0) {
+ printf("%s: ctl_enable_lun() failed!\n", __func__);
+ if (ctl_invalidate_lun(&lun->ctl_be_lun) != 0) {
+ printf("%s: ctl_invalidate_lun() failed!\n",
+ __func__);
+ }
+ }
+
+ return;
+ }
+
+
+ mtx_lock(&softc->lock);
+ lun->flags &= ~CTL_BE_RAMDISK_LUN_UNCONFIGURED;
+
+ /*
+ * If we have a user waiting, let him handle the cleanup. If not,
+ * clean things up here.
+ */
+ if (lun->flags & CTL_BE_RAMDISK_LUN_WAITING) {
+ lun->flags |= CTL_BE_RAMDISK_LUN_CONFIG_ERR;
+ wakeup(lun);
+ } else {
+ STAILQ_REMOVE(&softc->lun_list, lun, ctl_be_ramdisk_lun,
+ links);
+ softc->num_luns--;
+ free(lun, M_RAMDISK);
+ }
+ mtx_unlock(&softc->lock);
+}
+
+static int
+ctl_backend_ramdisk_config_write(union ctl_io *io)
+{
+ struct ctl_be_ramdisk_softc *softc;
+ int retval;
+
+ retval = 0;
+ softc = &rd_softc;
+
+ switch (io->scsiio.cdb[0]) {
+ case SYNCHRONIZE_CACHE:
+ case SYNCHRONIZE_CACHE_16:
+ /*
+ * The upper level CTL code will filter out any CDBs with
+ * the immediate bit set and return the proper error. It
+ * will also not allow a sync cache command to go to a LUN
+ * that is powered down.
+ *
+ * We don't really need to worry about what LBA range the
+ * user asked to be synced out. When they issue a sync
+ * cache command, we'll sync out the whole thing.
+ *
+ * This is obviously just a stubbed out implementation.
+ * The real implementation will be in the RAIDCore/CTL
+ * interface, and can only really happen when RAIDCore
+ * implements a per-array cache sync.
+ */
+ ctl_set_success(&io->scsiio);
+ ctl_config_write_done(io);
+ break;
+ case START_STOP_UNIT: {
+ struct scsi_start_stop_unit *cdb;
+ struct ctl_be_lun *ctl_be_lun;
+ struct ctl_be_ramdisk_lun *be_lun;
+
+ cdb = (struct scsi_start_stop_unit *)io->scsiio.cdb;
+
+ ctl_be_lun = (struct ctl_be_lun *)io->io_hdr.ctl_private[
+ CTL_PRIV_BACKEND_LUN].ptr;
+ be_lun = (struct ctl_be_ramdisk_lun *)ctl_be_lun->be_lun;
+
+ if (cdb->how & SSS_START)
+ retval = ctl_start_lun(ctl_be_lun);
+ else {
+ retval = ctl_stop_lun(ctl_be_lun);
+#ifdef NEEDTOPORT
+ if ((retval == 0)
+ && (cdb->byte2 & SSS_ONOFFLINE))
+ retval = ctl_lun_offline(ctl_be_lun);
+#endif
+ }
+
+ /*
+ * In general, the above routines should not fail. They
+ * just set state for the LUN. So we've got something
+ * pretty wrong here if we can't start or stop the LUN.
+ */
+ if (retval != 0) {
+ ctl_set_internal_failure(&io->scsiio,
+ /*sks_valid*/ 1,
+ /*retry_count*/ 0xf051);
+ retval = CTL_RETVAL_COMPLETE;
+ } else {
+ ctl_set_success(&io->scsiio);
+ }
+ ctl_config_write_done(io);
+ break;
+ }
+ default:
+ ctl_set_invalid_opcode(&io->scsiio);
+ ctl_config_write_done(io);
+ retval = CTL_RETVAL_COMPLETE;
+ break;
+ }
+
+ return (retval);
+}
+
+static int
+ctl_backend_ramdisk_config_read(union ctl_io *io)
+{
+ /*
+ * XXX KDM need to implement!!
+ */
+ return (0);
+}
diff --git a/sys/cam/ctl/ctl_cmd_table.c b/sys/cam/ctl/ctl_cmd_table.c
new file mode 100644
index 0000000..acd8fec
--- /dev/null
+++ b/sys/cam/ctl/ctl_cmd_table.c
@@ -0,0 +1,984 @@
+/*-
+ * Copyright (c) 2003, 2004, 2005, 2009 Silicon Graphics International Corp.
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_cmd_table.c#4 $
+ * $FreeBSD$
+ */
+/*
+ * CAM Target Layer command table.
+ *
+ * Author: Ken Merry <ken@FreeBSD.org>, Kim Le
+ */
+
+#include <sys/cdefs.h>
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/kernel.h>
+#include <sys/types.h>
+#include <sys/malloc.h>
+#include <sys/condvar.h>
+#include <sys/queue.h>
+
+#include <cam/scsi/scsi_all.h>
+#include <cam/scsi/scsi_da.h>
+#include <cam/ctl/ctl_io.h>
+#include <cam/ctl/ctl.h>
+#include <cam/ctl/ctl_frontend.h>
+#include <cam/ctl/ctl_backend.h>
+#include <cam/ctl/ctl_frontend_internal.h>
+#include <cam/ctl/ctl_ioctl.h>
+#include <cam/ctl/ctl_ha.h>
+#include <cam/ctl/ctl_private.h>
+
+/*
+ * Whenever support for a new command is added, it should be added to this
+ * table.
+ */
+struct ctl_cmd_entry ctl_cmd_table[] =
+{
+/* 00 TEST UNIT READY */
+{ctl_tur, CTL_SERIDX_TUR, CTL_CMD_FLAG_OK_ON_BOTH |
+ CTL_FLAG_DATA_NONE |
+ CTL_CMD_FLAG_ALLOW_ON_PR_RESV,
+ CTL_LUN_PAT_TUR},
+
+/* 01 REWIND */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 02 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 03 REQUEST SENSE */
+{ctl_request_sense, CTL_SERIDX_RQ_SNS, CTL_FLAG_DATA_IN |
+ CTL_CMD_FLAG_OK_ON_ALL_LUNS |
+ CTL_CMD_FLAG_ALLOW_ON_RESV |
+ CTL_CMD_FLAG_NO_SENSE |
+ CTL_CMD_FLAG_OK_ON_STOPPED |
+ CTL_CMD_FLAG_OK_ON_INOPERABLE |
+ CTL_CMD_FLAG_OK_ON_OFFLINE |
+ CTL_CMD_FLAG_OK_ON_SECONDARY |
+ CTL_CMD_FLAG_ALLOW_ON_PR_RESV,
+ CTL_LUN_PAT_NONE},
+
+/* 04 FORMAT UNIT */
+{ctl_format, CTL_SERIDX_FORMAT, CTL_CMD_FLAG_OK_ON_SLUN |
+ CTL_CMD_FLAG_OK_ON_INOPERABLE |
+ CTL_FLAG_DATA_OUT,
+ CTL_LUN_PAT_NONE},
+
+/* 05 READ BLOCK LIMITS */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 06 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 07 REASSIGN BLOCKS */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 08 READ(6) */
+{ctl_read_write, CTL_SERIDX_READ, CTL_CMD_FLAG_OK_ON_SLUN |
+ CTL_FLAG_DATA_IN |
+ CTL_CMD_FLAG_ALLOW_ON_PR_RESV,
+ CTL_LUN_PAT_READ | CTL_LUN_PAT_RANGE},
+
+/* 09 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 0A WRITE(6) */
+{ctl_read_write, CTL_SERIDX_WRITE, CTL_CMD_FLAG_OK_ON_SLUN |
+ CTL_FLAG_DATA_OUT,
+ CTL_LUN_PAT_WRITE | CTL_LUN_PAT_RANGE},
+
+/* 0B SEEK(6) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 0C */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 0D */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 0E */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 0F READ REVERSE(6) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 10 WRITE FILEMARKS(6) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 11 SPACE(6) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 12 INQUIRY */
+{ctl_inquiry, CTL_SERIDX_INQ, CTL_CMD_FLAG_OK_ON_ALL_LUNS |
+ CTL_CMD_FLAG_ALLOW_ON_RESV |
+ CTL_CMD_FLAG_NO_SENSE |
+ CTL_CMD_FLAG_OK_ON_STOPPED |
+ CTL_CMD_FLAG_OK_ON_INOPERABLE |
+ CTL_CMD_FLAG_OK_ON_OFFLINE |
+ CTL_CMD_FLAG_OK_ON_SECONDARY |
+ CTL_FLAG_DATA_IN |
+ CTL_CMD_FLAG_ALLOW_ON_PR_RESV,
+ CTL_LUN_PAT_NONE},
+
+/* 13 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 14 RECOVER BUFFERED DATA */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 15 MODE SELECT(6) */
+{ctl_mode_select, CTL_SERIDX_MD_SEL, CTL_CMD_FLAG_OK_ON_BOTH |
+ CTL_CMD_FLAG_OK_ON_STOPPED |
+ CTL_CMD_FLAG_OK_ON_INOPERABLE |
+ CTL_CMD_FLAG_OK_ON_SECONDARY |
+ CTL_FLAG_DATA_OUT,
+ CTL_LUN_PAT_NONE},
+
+/* 16 RESERVE(6) */
+{ctl_scsi_reserve, CTL_SERIDX_RESV, CTL_CMD_FLAG_ALLOW_ON_RESV |
+ CTL_CMD_FLAG_OK_ON_BOTH |
+ CTL_CMD_FLAG_OK_ON_STOPPED |
+ CTL_CMD_FLAG_OK_ON_INOPERABLE |
+ CTL_CMD_FLAG_OK_ON_SECONDARY |
+ CTL_FLAG_DATA_OUT,
+ CTL_LUN_PAT_NONE},
+
+/* 17 RELEASE(6) */
+{ctl_scsi_release, CTL_SERIDX_REL, CTL_CMD_FLAG_ALLOW_ON_RESV |
+ CTL_CMD_FLAG_OK_ON_BOTH |
+ CTL_CMD_FLAG_OK_ON_STOPPED |
+ CTL_CMD_FLAG_OK_ON_INOPERABLE |
+ CTL_CMD_FLAG_OK_ON_SECONDARY |
+ CTL_FLAG_DATA_NONE,
+ CTL_LUN_PAT_NONE},
+
+/* 18 COPY */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 19 ERASE(6) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 1A MODE SENSE(6) */
+{ctl_mode_sense, CTL_SERIDX_MD_SNS, CTL_CMD_FLAG_OK_ON_BOTH |
+ CTL_CMD_FLAG_OK_ON_STOPPED |
+ CTL_CMD_FLAG_OK_ON_INOPERABLE |
+ CTL_CMD_FLAG_OK_ON_SECONDARY |
+ CTL_FLAG_DATA_IN,
+ CTL_LUN_PAT_NONE},
+
+/* 1B START STOP UNIT */
+{ctl_start_stop, CTL_SERIDX_START, CTL_CMD_FLAG_OK_ON_SLUN |
+ CTL_CMD_FLAG_OK_ON_STOPPED |
+ CTL_CMD_FLAG_OK_ON_INOPERABLE |
+ CTL_CMD_FLAG_OK_ON_OFFLINE |
+ CTL_FLAG_DATA_NONE |
+ CTL_CMD_FLAG_ALLOW_ON_PR_RESV,
+ CTL_LUN_PAT_NONE},
+
+/* 1C RECEIVE DIAGNOSTIC RESULTS */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 1D SEND DIAGNOSTIC */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 1E PREVENT ALLOW MEDIUM REMOVAL */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 1F */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 20 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 21 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 22 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 23 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 24 SET WINDOW */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 25 READ CAPACITY(10) */
+{ctl_read_capacity, CTL_SERIDX_RD_CAP, CTL_CMD_FLAG_OK_ON_SLUN|
+ CTL_CMD_FLAG_OK_ON_STOPPED |
+ CTL_CMD_FLAG_OK_ON_INOPERABLE |
+ CTL_CMD_FLAG_OK_ON_SECONDARY |
+ CTL_FLAG_DATA_IN |
+ CTL_CMD_FLAG_ALLOW_ON_PR_RESV,
+ CTL_LUN_PAT_READCAP},
+
+/* 26 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 27 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 28 READ(10) */
+{ctl_read_write, CTL_SERIDX_READ, CTL_CMD_FLAG_OK_ON_SLUN |
+ CTL_FLAG_DATA_IN |
+ CTL_CMD_FLAG_ALLOW_ON_PR_RESV,
+ CTL_LUN_PAT_READ | CTL_LUN_PAT_RANGE},
+
+/* 29 READ GENERATION */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 2A WRITE(10) */
+{ctl_read_write, CTL_SERIDX_WRITE, CTL_CMD_FLAG_OK_ON_SLUN| CTL_FLAG_DATA_OUT,
+ CTL_LUN_PAT_WRITE | CTL_LUN_PAT_RANGE},
+
+/* 2B SEEK(10) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 2C ERASE(10) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 2D READ UPDATED BLOCK */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 2E WRITE AND VERIFY(10) */
+{ctl_read_write, CTL_SERIDX_WRITE, CTL_CMD_FLAG_OK_ON_SLUN| CTL_FLAG_DATA_OUT,
+ CTL_LUN_PAT_WRITE | CTL_LUN_PAT_RANGE},
+
+/* 2F VERIFY(10) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 30 SEARCH DATA HIGH(10) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 31 SEARCH DATA EQUAL(10) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 32 SEARCH DATA LOW(10) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 33 SET LIMITS(10) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 34 PRE-FETCH(10) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 35 SYNCHRONIZE CACHE(10) */
+{ctl_sync_cache, CTL_SERIDX_START, CTL_CMD_FLAG_OK_ON_SLUN |
+ CTL_FLAG_DATA_NONE,
+ CTL_LUN_PAT_NONE},
+
+/* 36 LOCK UNLOCK CACHE(10) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 37 READ DEFECT DATA(10) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 38 MEDIUM SCAN */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 39 COMPARE */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 3A COPY AND VERIFY */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 3B WRITE BUFFER */
+{ctl_write_buffer, CTL_SERIDX_WRITE, CTL_CMD_FLAG_OK_ON_PROC |
+ CTL_FLAG_DATA_OUT,
+ CTL_LUN_PAT_NONE},
+
+/* 3C READ BUFFER */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 3D UPDATE BLOCK */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 3E READ LONG */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 3F WRITE LONG */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 40 CHANGE DEFINITION */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 41 WRITE SAME(10) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 42 READ SUB-CHANNEL */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 43 READ TOC/PMA/ATIP */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 44 REPORT DENSITY SUPPORT */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 45 PLAY AUDIO(10) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 46 GET CONFIGURATION */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 47 PLAY AUDIO MSF */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 48 PLAY AUDIO TRACK INDEX */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 49 PLAY TRACK RELATIVE(10) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 4A GET EVENT STATUS NOTIFICATION */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 4B PAUSE/RESUME */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 4C LOG SELECT */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 4D LOG SENSE */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 4E STOP PLAY/SCAN */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 4F */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 50 XDWRITE(10) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 51 XPWRITE(10) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 52 XDREAD(10) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 53 RESERVE TRACK */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 54 SEND OPC INFORMATION */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 55 MODE SELECT(10) */
+{ctl_mode_select, CTL_SERIDX_MD_SEL, CTL_CMD_FLAG_OK_ON_BOTH |
+ CTL_CMD_FLAG_OK_ON_STOPPED |
+ CTL_CMD_FLAG_OK_ON_INOPERABLE |
+ CTL_CMD_FLAG_OK_ON_SECONDARY |
+ CTL_FLAG_DATA_OUT,
+ CTL_LUN_PAT_NONE},
+
+/* 56 RESERVE(10) */
+{ctl_scsi_reserve, CTL_SERIDX_RESV, CTL_CMD_FLAG_ALLOW_ON_RESV |
+ CTL_CMD_FLAG_OK_ON_BOTH |
+ CTL_CMD_FLAG_OK_ON_STOPPED |
+ CTL_CMD_FLAG_OK_ON_INOPERABLE |
+ CTL_CMD_FLAG_OK_ON_SECONDARY |
+ CTL_FLAG_DATA_OUT,
+ CTL_LUN_PAT_NONE},
+
+/* 57 RELEASE(10) */
+{ctl_scsi_release, CTL_SERIDX_REL, CTL_CMD_FLAG_ALLOW_ON_RESV |
+ CTL_CMD_FLAG_OK_ON_BOTH |
+ CTL_CMD_FLAG_OK_ON_STOPPED |
+ CTL_CMD_FLAG_OK_ON_INOPERABLE |
+ CTL_CMD_FLAG_OK_ON_SECONDARY |
+ CTL_FLAG_DATA_OUT,
+ CTL_LUN_PAT_NONE},
+
+/* 58 REPAIR TRACK */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 59 READ MASTER CUE */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 5A MODE SENSE(10) */
+{ctl_mode_sense, CTL_SERIDX_MD_SNS, CTL_CMD_FLAG_OK_ON_BOTH |
+ CTL_CMD_FLAG_OK_ON_STOPPED |
+ CTL_CMD_FLAG_OK_ON_INOPERABLE |
+ CTL_CMD_FLAG_OK_ON_SECONDARY |
+ CTL_FLAG_DATA_IN,
+ CTL_LUN_PAT_NONE},
+
+/* 5B CLOSE TRACK/SESSION */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 5C READ BUFFER CAPACITY */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 5D SEND CUE SHEET */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 5E PERSISTENT RESERVE IN */
+{ctl_persistent_reserve_in, CTL_SERIDX_PRES_IN, CTL_CMD_FLAG_ALLOW_ON_RESV |
+ CTL_CMD_FLAG_OK_ON_BOTH |
+ CTL_CMD_FLAG_OK_ON_STOPPED |
+ CTL_CMD_FLAG_OK_ON_INOPERABLE |
+ CTL_CMD_FLAG_OK_ON_SECONDARY |
+ CTL_FLAG_DATA_IN |
+ CTL_CMD_FLAG_ALLOW_ON_PR_RESV,
+ CTL_LUN_PAT_NONE},
+
+//{ctl_persistent_reserve_in, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE},
+
+/* 5F PERSISTENT RESERVE OUT */
+{ctl_persistent_reserve_out, CTL_SERIDX_PRES_OUT, CTL_CMD_FLAG_ALLOW_ON_RESV |
+ CTL_CMD_FLAG_OK_ON_BOTH |
+ CTL_CMD_FLAG_OK_ON_STOPPED |
+ CTL_CMD_FLAG_OK_ON_INOPERABLE|
+ CTL_CMD_FLAG_OK_ON_SECONDARY |
+ CTL_FLAG_DATA_OUT |
+ CTL_CMD_FLAG_ALLOW_ON_PR_RESV,
+ CTL_LUN_PAT_NONE},
+
+//{ctl_persistent_reserve_out, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE},
+
+/* 60 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 61 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 62 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 63 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 64 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 65 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 66 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 67 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 68 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 69 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 6A */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 6B */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 6C */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 6D */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 6E */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 6F */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 70 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 71 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 72 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 73 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 74 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 75 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 76 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 77 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 78 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 79 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 7A */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 7B */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 7C */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 7D */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 7E */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 7F */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 80 XDWRITE EXTENDED(16) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 81 REBUILD(16) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 82 REGENERATE(16) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 83 EXTENDED COPY */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 84 RECEIVE COPY RESULTS */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 85 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 86 ACCESS CONTROL IN */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 87 ACCESS CONTROL OUT */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 88 READ(16) */
+{ctl_read_write, CTL_SERIDX_READ, CTL_CMD_FLAG_OK_ON_SLUN | CTL_FLAG_DATA_IN |
+ CTL_CMD_FLAG_ALLOW_ON_PR_RESV,
+ CTL_LUN_PAT_READ | CTL_LUN_PAT_RANGE},
+
+/* 89 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 8A WRITE(16) */
+{ctl_read_write, CTL_SERIDX_WRITE, CTL_CMD_FLAG_OK_ON_SLUN| CTL_FLAG_DATA_OUT,
+ CTL_LUN_PAT_WRITE | CTL_LUN_PAT_RANGE},
+
+/* 8B */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 8C READ ATTRIBUTE */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 8D WRITE ATTRIBUTE */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 8E WRITE AND VERIFY(16) */
+{ctl_read_write, CTL_SERIDX_WRITE, CTL_CMD_FLAG_OK_ON_SLUN| CTL_FLAG_DATA_OUT,
+ CTL_LUN_PAT_WRITE | CTL_LUN_PAT_RANGE},
+
+/* 8F VERIFY(16) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 90 PRE-FETCH(16) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 91 SYNCHRONIZE CACHE(16) */
+{ctl_sync_cache, CTL_SERIDX_START, CTL_CMD_FLAG_OK_ON_SLUN |
+ CTL_FLAG_DATA_NONE,
+ CTL_LUN_PAT_NONE},
+
+/* 92 LOCK UNLOCK CACHE(16) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 93 WRITE SAME(16) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 94 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 95 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 96 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 97 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 98 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 99 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 9A */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 9B */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 9C */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 9D */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* 9E SERVICE ACTION IN(16) */
+/* XXX KDM not all service actions will be read capacity!! */
+{ctl_service_action_in, CTL_SERIDX_RD_CAP, CTL_CMD_FLAG_OK_ON_SLUN |
+ CTL_CMD_FLAG_OK_ON_STOPPED |
+ CTL_CMD_FLAG_OK_ON_INOPERABLE |
+ CTL_CMD_FLAG_OK_ON_SECONDARY |
+ CTL_FLAG_DATA_IN |
+ CTL_CMD_FLAG_ALLOW_ON_PR_RESV,
+ CTL_LUN_PAT_READCAP},
+
+/* 9F SERVICE ACTION OUT(16) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* A0 REPORT LUNS */
+{ctl_report_luns, CTL_SERIDX_INQ, CTL_CMD_FLAG_OK_ON_ALL_LUNS |
+ CTL_CMD_FLAG_ALLOW_ON_RESV |
+ CTL_CMD_FLAG_NO_SENSE |
+ CTL_CMD_FLAG_OK_ON_STOPPED |
+ CTL_CMD_FLAG_OK_ON_INOPERABLE |
+ CTL_CMD_FLAG_OK_ON_OFFLINE |
+ CTL_CMD_FLAG_OK_ON_SECONDARY |
+ CTL_FLAG_DATA_IN |
+ CTL_CMD_FLAG_ALLOW_ON_PR_RESV,
+ CTL_LUN_PAT_NONE},
+
+/* A1 BLANK */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* A2 SEND EVENT */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* A3 MAINTENANCE (IN) Service Action - (0A) REPORT TARGET PORT GROUP */
+{ctl_maintenance_in, CTL_SERIDX_MAIN_IN, CTL_CMD_FLAG_OK_ON_BOTH |
+ CTL_CMD_FLAG_OK_ON_STOPPED |
+ CTL_CMD_FLAG_OK_ON_INOPERABLE |
+ CTL_CMD_FLAG_OK_ON_SECONDARY |
+ CTL_FLAG_DATA_IN,
+ CTL_LUN_PAT_NONE},
+
+/* A4 MAINTENANCE (OUT) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* A5 MOVE MEDIUM */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* A6 EXCHANGE MEDIUM */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* A7 MOVE MEDIUM ATTACHED */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* A8 READ(12) */
+{ctl_read_write, CTL_SERIDX_READ, CTL_CMD_FLAG_OK_ON_SLUN | CTL_FLAG_DATA_IN |
+ CTL_CMD_FLAG_ALLOW_ON_PR_RESV,
+ CTL_LUN_PAT_READ | CTL_LUN_PAT_RANGE},
+
+/* A9 PLAY TRACK RELATIVE(12) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* AA WRITE(12) */
+{ctl_read_write, CTL_SERIDX_WRITE, CTL_CMD_FLAG_OK_ON_SLUN| CTL_FLAG_DATA_OUT,
+ CTL_LUN_PAT_WRITE | CTL_LUN_PAT_RANGE},
+
+/* AB SERVICE ACTION IN(12) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* AC ERASE(12) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* AD READ DVD STRUCTURE */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* AE WRITE AND VERIFY(12) */
+{ctl_read_write, CTL_SERIDX_WRITE, CTL_CMD_FLAG_OK_ON_SLUN| CTL_FLAG_DATA_OUT,
+ CTL_LUN_PAT_WRITE | CTL_LUN_PAT_RANGE},
+
+/* AF VERIFY(12) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* B0 SEARCH DATA HIGH(12) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* B1 SEARCH DATA EQUAL(12) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* B2 SEARCH DATA LOW(12) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* B3 SET LIMITS(12) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* B4 READ ELEMENT STATUS ATTACHED */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* B5 REQUEST VOLUME ELEMENT ADDRESS */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* B6 SEND VOLUME TAG */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* B7 READ DEFECT DATA(12) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* B8 READ ELEMENT STATUS */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* B9 READ CD MSF */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* BA REDUNDANCY GROUP (IN) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* BB REDUNDANCY GROUP (OUT) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* BC SPARE (IN) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* BD SPARE (OUT) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* BE VOLUME SET (IN) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* BF VOLUME SET (OUT) */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* C0 - ISC_SEND_MSG_SHORT */
+//{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE},
+{ctl_isc, CTL_SERIDX_READ, CTL_CMD_FLAG_OK_ON_PROC | CTL_FLAG_DATA_NONE,
+ CTL_LUN_PAT_NONE},
+
+/* C1 - ISC_SEND_MSG */
+//{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE},
+{ctl_isc, CTL_SERIDX_READ, CTL_CMD_FLAG_OK_ON_PROC | CTL_FLAG_DATA_OUT,
+ CTL_LUN_PAT_NONE},
+
+/* C2 - ISC_WRITE */
+//{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE},
+{ctl_isc, CTL_SERIDX_READ, CTL_CMD_FLAG_OK_ON_PROC | CTL_FLAG_DATA_OUT,
+ CTL_LUN_PAT_NONE},
+
+/* C3 - ISC_READ */
+//{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE},
+{ctl_isc, CTL_SERIDX_READ, CTL_CMD_FLAG_OK_ON_PROC | CTL_FLAG_DATA_IN,
+ CTL_LUN_PAT_NONE},
+
+/* C4 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* C5 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* C6 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* C7 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* C8 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* C9 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* CA */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* CB */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* CC */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* CD */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* CE */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* CF */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* D0 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* D1 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* D2 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* D3 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* D4 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* D5 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* D6 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* D7 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* D8 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* D9 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* DA */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* DB */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* DC */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* DD */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* DE */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* DF */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* E0 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* E1 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* E2 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* E3 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* E4 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* E5 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* E6 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* E7 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* E8 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* E9 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* EA */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* EB */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* EC */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* ED */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* EE */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* EF */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* F0 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* F1 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* F2 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* F3 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* F4 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* F5 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* F6 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* F7 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* F8 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* F9 */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* FA */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* FB */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* FC */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* FD */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* FE */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+
+/* FF */
+{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}
+
+};
diff --git a/sys/cam/ctl/ctl_debug.h b/sys/cam/ctl/ctl_debug.h
new file mode 100644
index 0000000..53f406b
--- /dev/null
+++ b/sys/cam/ctl/ctl_debug.h
@@ -0,0 +1,52 @@
+/*-
+ * Copyright (c) 2003 Silicon Graphics International Corp.
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_debug.h#2 $
+ * $FreeBSD$
+ */
+/*
+ * CAM Target Layer debugging interface.
+ *
+ * Author: Ken Merry <ken@FreeBSD.org>
+ */
+
+#ifndef _CTL_DEBUG_H_
+#define _CTL_DEBUG_H_
+
+#ifdef CAM_CTL_DEBUG
+#define CTL_DEBUG_PRINT(X) \
+ do { \
+ printf("ctl_debug: "); \
+ printf X; \
+ } while (0)
+#else /* CAM_CTL_DEBUG */
+#define CTL_DEBUG_PRINT(X)
+#endif /* CAM_CTL_DEBUG */
+
+#endif /* _CTL_DEBUG_H_ */
diff --git a/sys/cam/ctl/ctl_error.c b/sys/cam/ctl/ctl_error.c
new file mode 100644
index 0000000..617a5ab
--- /dev/null
+++ b/sys/cam/ctl/ctl_error.c
@@ -0,0 +1,796 @@
+/*-
+ * Copyright (c) 2003-2009 Silicon Graphics International Corp.
+ * Copyright (c) 2011 Spectra Logic Corporation
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_error.c#2 $
+ */
+/*
+ * CAM Target Layer error reporting routines.
+ *
+ * Author: Ken Merry <ken@FreeBSD.org>
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/kernel.h>
+#include <sys/types.h>
+#include <sys/malloc.h>
+#include <sys/lock.h>
+#include <sys/mutex.h>
+#include <sys/condvar.h>
+#include <sys/stddef.h>
+#include <sys/ctype.h>
+#include <machine/stdarg.h>
+
+#include <cam/scsi/scsi_all.h>
+#include <cam/scsi/scsi_da.h>
+#include <cam/ctl/ctl_io.h>
+#include <cam/ctl/ctl.h>
+#include <cam/ctl/ctl_frontend.h>
+#include <cam/ctl/ctl_frontend_internal.h>
+#include <cam/ctl/ctl_backend.h>
+#include <cam/ctl/ctl_ioctl.h>
+#include <cam/ctl/ctl_error.h>
+#include <cam/ctl/ctl_ha.h>
+#include <cam/ctl/ctl_private.h>
+
+void
+ctl_set_sense_data_va(struct scsi_sense_data *sense_data, void *lunptr,
+ scsi_sense_data_type sense_format, int current_error,
+ int sense_key, int asc, int ascq, va_list ap)
+{
+ struct ctl_lun *lun;
+
+ lun = (struct ctl_lun *)lunptr;
+
+ /*
+ * Determine whether to return fixed or descriptor format sense
+ * data.
+ */
+ if (sense_format == SSD_TYPE_NONE) {
+ /*
+ * If the format isn't specified, we only return descriptor
+ * sense if the LUN exists and descriptor sense is turned
+ * on for that LUN.
+ */
+ if ((lun != NULL)
+ && (lun->flags & CTL_LUN_SENSE_DESC))
+ sense_format = SSD_TYPE_DESC;
+ else
+ sense_format = SSD_TYPE_FIXED;
+ }
+
+ scsi_set_sense_data_va(sense_data, sense_format, current_error,
+ sense_key, asc, ascq, ap);
+}
+
+void
+ctl_set_sense_data(struct scsi_sense_data *sense_data, void *lunptr,
+ scsi_sense_data_type sense_format, int current_error,
+ int sense_key, int asc, int ascq, ...)
+{
+ va_list ap;
+
+ va_start(ap, ascq);
+ ctl_set_sense_data_va(sense_data, lunptr, sense_format, current_error,
+ sense_key, asc, ascq, ap);
+ va_end(ap);
+}
+
+void
+ctl_set_sense(struct ctl_scsiio *ctsio, int current_error, int sense_key,
+ int asc, int ascq, ...)
+{
+ va_list ap;
+ struct ctl_lun *lun;
+
+ /*
+ * The LUN can't go away until all of the commands have been
+ * completed. Therefore we can safely access the LUN structure and
+ * flags without the lock.
+ */
+ lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
+
+ va_start(ap, ascq);
+ ctl_set_sense_data_va(&ctsio->sense_data,
+ lun,
+ SSD_TYPE_NONE,
+ current_error,
+ sense_key,
+ asc,
+ ascq,
+ ap);
+ va_end(ap);
+
+ ctsio->scsi_status = SCSI_STATUS_CHECK_COND;
+ ctsio->sense_len = SSD_FULL_SIZE;
+ ctsio->io_hdr.status = CTL_SCSI_ERROR | CTL_AUTOSENSE;
+}
+
+/*
+ * Transform fixed sense data into descriptor sense data.
+ *
+ * For simplicity's sake, we assume that both sense structures are
+ * SSD_FULL_SIZE. Otherwise, the logic gets more complicated.
+ */
+void
+ctl_sense_to_desc(struct scsi_sense_data_fixed *sense_src,
+ struct scsi_sense_data_desc *sense_dest)
+{
+ struct scsi_sense_stream stream_sense;
+ int current_error;
+ uint8_t stream_bits;
+
+ bzero(sense_dest, sizeof(*sense_dest));
+
+ if ((sense_src->error_code & SSD_ERRCODE) == SSD_DEFERRED_ERROR)
+ current_error = 0;
+ else
+ current_error = 1;
+
+ bzero(&stream_sense, sizeof(stream_sense));
+
+ /*
+ * Check to see whether any of the tape-specific bits are set. If
+ * so, we'll need a stream sense descriptor.
+ */
+ if (sense_src->flags & (SSD_ILI|SSD_EOM|SSD_FILEMARK))
+ stream_bits = sense_src->flags & ~SSD_KEY;
+ else
+ stream_bits = 0;
+
+ /*
+ * Utilize our sense setting routine to do the transform. If a
+ * value is set in the fixed sense data, set it in the descriptor
+ * data. Otherwise, skip it.
+ */
+ ctl_set_sense_data((struct scsi_sense_data *)sense_dest,
+ /*lun*/ NULL,
+ /*sense_format*/ SSD_TYPE_DESC,
+ current_error,
+ /*sense_key*/ sense_src->flags & SSD_KEY,
+ /*asc*/ sense_src->add_sense_code,
+ /*ascq*/ sense_src->add_sense_code_qual,
+
+ /* Information Bytes */
+ (scsi_4btoul(sense_src->info) != 0) ?
+ SSD_ELEM_INFO : SSD_ELEM_SKIP,
+ sizeof(sense_src->info),
+ sense_src->info,
+
+ /* Command specific bytes */
+ (scsi_4btoul(sense_src->cmd_spec_info) != 0) ?
+ SSD_ELEM_COMMAND : SSD_ELEM_SKIP,
+ sizeof(sense_src->cmd_spec_info),
+ sense_src->cmd_spec_info,
+
+ /* FRU */
+ (sense_src->fru != 0) ?
+ SSD_ELEM_FRU : SSD_ELEM_SKIP,
+ sizeof(sense_src->fru),
+ &sense_src->fru,
+
+ /* Sense Key Specific */
+ (sense_src->sense_key_spec[0] & SSD_SCS_VALID) ?
+ SSD_ELEM_SKS : SSD_ELEM_SKIP,
+ sizeof(sense_src->sense_key_spec),
+ sense_src->sense_key_spec,
+
+ /* Tape bits */
+ (stream_bits != 0) ?
+ SSD_ELEM_STREAM : SSD_ELEM_SKIP,
+ sizeof(stream_bits),
+ &stream_bits,
+
+ SSD_ELEM_NONE);
+}
+
+/*
+ * Transform descriptor format sense data into fixed sense data.
+ *
+ * Some data may be lost in translation, because there are descriptors
+ * thant can't be represented as fixed sense data.
+ *
+ * For simplicity's sake, we assume that both sense structures are
+ * SSD_FULL_SIZE. Otherwise, the logic gets more complicated.
+ */
+void
+ctl_sense_to_fixed(struct scsi_sense_data_desc *sense_src,
+ struct scsi_sense_data_fixed *sense_dest)
+{
+ int current_error;
+ uint8_t *info_ptr = NULL, *cmd_ptr = NULL, *fru_ptr = NULL;
+ uint8_t *sks_ptr = NULL, *stream_ptr = NULL;
+ int info_size = 0, cmd_size = 0, fru_size = 0;
+ int sks_size = 0, stream_size = 0;
+ int pos;
+
+ if ((sense_src->error_code & SSD_ERRCODE) == SSD_DESC_CURRENT_ERROR)
+ current_error = 1;
+ else
+ current_error = 0;
+
+ for (pos = 0; pos < (int)(sense_src->extra_len - 1);) {
+ struct scsi_sense_desc_header *header;
+
+ header = (struct scsi_sense_desc_header *)
+ &sense_src->sense_desc[pos];
+
+ /*
+ * See if this record goes past the end of the sense data.
+ * It shouldn't, but check just in case.
+ */
+ if ((pos + header->length + sizeof(*header)) >
+ sense_src->extra_len)
+ break;
+
+ switch (sense_src->sense_desc[pos]) {
+ case SSD_DESC_INFO: {
+ struct scsi_sense_info *info;
+
+ info = (struct scsi_sense_info *)header;
+
+ info_ptr = info->info;
+ info_size = sizeof(info->info);
+
+ pos += info->length +
+ sizeof(struct scsi_sense_desc_header);
+ break;
+ }
+ case SSD_DESC_COMMAND: {
+ struct scsi_sense_command *cmd;
+
+ cmd = (struct scsi_sense_command *)header;
+ cmd_ptr = cmd->command_info;
+ cmd_size = sizeof(cmd->command_info);
+
+ pos += cmd->length +
+ sizeof(struct scsi_sense_desc_header);
+ break;
+ }
+ case SSD_DESC_FRU: {
+ struct scsi_sense_fru *fru;
+
+ fru = (struct scsi_sense_fru *)header;
+ fru_ptr = &fru->fru;
+ fru_size = sizeof(fru->fru);
+ pos += fru->length +
+ sizeof(struct scsi_sense_desc_header);
+ break;
+ }
+ case SSD_DESC_SKS: {
+ struct scsi_sense_sks *sks;
+
+ sks = (struct scsi_sense_sks *)header;
+ sks_ptr = sks->sense_key_spec;
+ sks_size = sizeof(sks->sense_key_spec);
+
+ pos = sks->length +
+ sizeof(struct scsi_sense_desc_header);
+ break;
+ }
+ case SSD_DESC_STREAM: {
+ struct scsi_sense_stream *stream_sense;
+
+ stream_sense = (struct scsi_sense_stream *)header;
+ stream_ptr = &stream_sense->byte3;
+ stream_size = sizeof(stream_sense->byte3);
+ pos = stream_sense->length +
+ sizeof(struct scsi_sense_desc_header);
+ break;
+ }
+ default:
+ /*
+ * We don't recognize this particular sense
+ * descriptor type, so just skip it.
+ */
+ pos += sizeof(*header) + header->length;
+ break;
+ }
+ }
+
+ ctl_set_sense_data((struct scsi_sense_data *)sense_dest,
+ /*lun*/ NULL,
+ /*sense_format*/ SSD_TYPE_FIXED,
+ current_error,
+ /*sense_key*/ sense_src->sense_key & SSD_KEY,
+ /*asc*/ sense_src->add_sense_code,
+ /*ascq*/ sense_src->add_sense_code_qual,
+
+ /* Information Bytes */
+ (info_ptr != NULL) ? SSD_ELEM_INFO : SSD_ELEM_SKIP,
+ info_size,
+ info_ptr,
+
+ /* Command specific bytes */
+ (cmd_ptr != NULL) ? SSD_ELEM_COMMAND : SSD_ELEM_SKIP,
+ cmd_size,
+ cmd_ptr,
+
+ /* FRU */
+ (fru_ptr != NULL) ? SSD_ELEM_FRU : SSD_ELEM_SKIP,
+ fru_size,
+ fru_ptr,
+
+ /* Sense Key Specific */
+ (sks_ptr != NULL) ? SSD_ELEM_SKS : SSD_ELEM_SKIP,
+ sks_size,
+ sks_ptr,
+
+ /* Tape bits */
+ (stream_ptr != NULL) ? SSD_ELEM_STREAM : SSD_ELEM_SKIP,
+ stream_size,
+ stream_ptr,
+
+ SSD_ELEM_NONE);
+}
+
+void
+ctl_set_ua(struct ctl_scsiio *ctsio, int asc, int ascq)
+{
+ ctl_set_sense(ctsio,
+ /*current_error*/ 1,
+ /*sense_key*/ SSD_KEY_UNIT_ATTENTION,
+ asc,
+ ascq,
+ SSD_ELEM_NONE);
+}
+
+ctl_ua_type
+ctl_build_ua(ctl_ua_type ua_type, struct scsi_sense_data *sense,
+ scsi_sense_data_type sense_format)
+{
+ ctl_ua_type ua_to_build;
+ int i, asc, ascq;
+
+ if (ua_type == CTL_UA_NONE)
+ return (ua_type);
+
+ ua_to_build = CTL_UA_NONE;
+
+ for (i = 0; i < (sizeof(ua_type) * 8); i++) {
+ if (ua_type & (1 << i)) {
+ ua_to_build = 1 << i;
+ break;
+ }
+ }
+
+ switch (ua_to_build) {
+ case CTL_UA_POWERON:
+ /* 29h/01h POWER ON OCCURRED */
+ asc = 0x29;
+ ascq = 0x01;
+ break;
+ case CTL_UA_BUS_RESET:
+ /* 29h/02h SCSI BUS RESET OCCURRED */
+ asc = 0x29;
+ ascq = 0x02;
+ break;
+ case CTL_UA_TARG_RESET:
+ /* 29h/03h BUS DEVICE RESET FUNCTION OCCURRED*/
+ asc = 0x29;
+ ascq = 0x03;
+ break;
+ case CTL_UA_LUN_RESET:
+ /* 29h/00h POWER ON, RESET, OR BUS DEVICE RESET OCCURRED */
+ /*
+ * Since we don't have a specific ASC/ASCQ pair for a LUN
+ * reset, just return the generic reset code.
+ */
+ asc = 0x29;
+ ascq = 0x00;
+ break;
+ case CTL_UA_LUN_CHANGE:
+ /* 3Fh/0Eh REPORTED LUNS DATA HAS CHANGED */
+ asc = 0x3F;
+ ascq = 0x0E;
+ break;
+ case CTL_UA_MODE_CHANGE:
+ /* 2Ah/01h MODE PARAMETERS CHANGED */
+ asc = 0x2A;
+ ascq = 0x01;
+ break;
+ case CTL_UA_LOG_CHANGE:
+ /* 2Ah/02h LOG PARAMETERS CHANGED */
+ asc = 0x2A;
+ ascq = 0x02;
+ break;
+ case CTL_UA_LVD:
+ /* 29h/06h TRANSCEIVER MODE CHANGED TO LVD */
+ asc = 0x29;
+ ascq = 0x06;
+ break;
+ case CTL_UA_SE:
+ /* 29h/05h TRANSCEIVER MODE CHANGED TO SINGLE-ENDED */
+ asc = 0x29;
+ ascq = 0x05;
+ break;
+ case CTL_UA_RES_PREEMPT:
+ /* 2Ah/03h RESERVATIONS PREEMPTED */
+ asc = 0x2A;
+ ascq = 0x03;
+ break;
+ case CTL_UA_RES_RELEASE:
+ /* 2Ah/04h RESERVATIONS RELEASED */
+ asc = 0x2A;
+ ascq = 0x04;
+ break;
+ case CTL_UA_REG_PREEMPT:
+ /* 2Ah/05h REGISTRATIONS PREEMPTED */
+ asc = 0x2A;
+ ascq = 0x05;
+ break;
+ case CTL_UA_ASYM_ACC_CHANGE:
+ /* 2Ah/06n ASYMMETRIC ACCESS STATE CHANGED */
+ asc = 0x2A;
+ ascq = 0x06;
+ break;
+ default:
+ ua_to_build = CTL_UA_NONE;
+ return (ua_to_build);
+ break; /* NOTREACHED */
+ }
+
+ ctl_set_sense_data(sense,
+ /*lun*/ NULL,
+ sense_format,
+ /*current_error*/ 1,
+ /*sense_key*/ SSD_KEY_UNIT_ATTENTION,
+ asc,
+ ascq,
+ SSD_ELEM_NONE);
+
+ return (ua_to_build);
+}
+
+void
+ctl_set_overlapped_cmd(struct ctl_scsiio *ctsio)
+{
+ /* OVERLAPPED COMMANDS ATTEMPTED */
+ ctl_set_sense(ctsio,
+ /*current_error*/ 1,
+ /*sense_key*/ SSD_KEY_ILLEGAL_REQUEST,
+ /*asc*/ 0x4E,
+ /*ascq*/ 0x00,
+ SSD_ELEM_NONE);
+}
+
+void
+ctl_set_overlapped_tag(struct ctl_scsiio *ctsio, uint8_t tag)
+{
+ /* TAGGED OVERLAPPED COMMANDS (NN = QUEUE TAG) */
+ ctl_set_sense(ctsio,
+ /*current_error*/ 1,
+ /*sense_key*/ SSD_KEY_ILLEGAL_REQUEST,
+ /*asc*/ 0x4D,
+ /*ascq*/ tag,
+ SSD_ELEM_NONE);
+}
+
+/*
+ * Tell the user that there was a problem with the command or data he sent.
+ */
+void
+ctl_set_invalid_field(struct ctl_scsiio *ctsio, int sks_valid, int command,
+ int field, int bit_valid, int bit)
+{
+ uint8_t sks[3];
+ int asc;
+
+ if (command != 0) {
+ /* "Invalid field in CDB" */
+ asc = 0x24;
+ } else {
+ /* "Invalid field in parameter list" */
+ asc = 0x26;
+ }
+
+ if (sks_valid) {
+ sks[0] = SSD_SCS_VALID;
+ if (command)
+ sks[0] |= SSD_FIELDPTR_CMD;
+ scsi_ulto2b(field, &sks[1]);
+
+ if (bit_valid)
+ sks[0] |= SSD_BITPTR_VALID | bit;
+ }
+
+ ctl_set_sense(ctsio,
+ /*current_error*/ 1,
+ /*sense_key*/ SSD_KEY_ILLEGAL_REQUEST,
+ asc,
+ /*ascq*/ 0x00,
+ /*type*/ (sks_valid != 0) ? SSD_ELEM_SKS : SSD_ELEM_SKIP,
+ /*size*/ sizeof(sks),
+ /*data*/ sks,
+ SSD_ELEM_NONE);
+}
+
+void
+ctl_set_invalid_opcode(struct ctl_scsiio *ctsio)
+{
+ struct scsi_sense_data *sense;
+ uint8_t sks[3];
+
+ sense = &ctsio->sense_data;
+
+ sks[0] = SSD_SCS_VALID | SSD_FIELDPTR_CMD;
+ scsi_ulto2b(0, &sks[1]);
+
+ /* "Invalid command operation code" */
+ ctl_set_sense(ctsio,
+ /*current_error*/ 1,
+ /*sense_key*/ SSD_KEY_ILLEGAL_REQUEST,
+ /*asc*/ 0x20,
+ /*ascq*/ 0x00,
+ /*type*/ SSD_ELEM_SKS,
+ /*size*/ sizeof(sks),
+ /*data*/ sks,
+ SSD_ELEM_NONE);
+}
+
+void
+ctl_set_param_len_error(struct ctl_scsiio *ctsio)
+{
+ /* "Parameter list length error" */
+ ctl_set_sense(ctsio,
+ /*current_error*/ 1,
+ /*sense_key*/ SSD_KEY_ILLEGAL_REQUEST,
+ /*asc*/ 0x1a,
+ /*ascq*/ 0x00,
+ SSD_ELEM_NONE);
+}
+
+void
+ctl_set_already_locked(struct ctl_scsiio *ctsio)
+{
+ /* Vendor unique "Somebody already is locked" */
+ ctl_set_sense(ctsio,
+ /*current_error*/ 1,
+ /*sense_key*/ SSD_KEY_ILLEGAL_REQUEST,
+ /*asc*/ 0x81,
+ /*ascq*/ 0x00,
+ SSD_ELEM_NONE);
+}
+
+void
+ctl_set_unsupported_lun(struct ctl_scsiio *ctsio)
+{
+ /* "Logical unit not supported" */
+ ctl_set_sense(ctsio,
+ /*current_error*/ 1,
+ /*sense_key*/ SSD_KEY_ILLEGAL_REQUEST,
+ /*asc*/ 0x25,
+ /*ascq*/ 0x00,
+ SSD_ELEM_NONE);
+}
+
+void
+ctl_set_internal_failure(struct ctl_scsiio *ctsio, int sks_valid,
+ uint16_t retry_count)
+{
+ uint8_t sks[3];
+
+ if (sks_valid) {
+ sks[0] = SSD_SCS_VALID;
+ sks[1] = (retry_count >> 8) & 0xff;
+ sks[2] = retry_count & 0xff;
+ }
+
+ /* "Internal target failure" */
+ ctl_set_sense(ctsio,
+ /*current_error*/ 1,
+ /*sense_key*/ SSD_KEY_HARDWARE_ERROR,
+ /*asc*/ 0x44,
+ /*ascq*/ 0x00,
+ /*type*/ (sks_valid != 0) ? SSD_ELEM_SKS : SSD_ELEM_SKIP,
+ /*size*/ sizeof(sks),
+ /*data*/ sks,
+ SSD_ELEM_NONE);
+}
+
+void
+ctl_set_medium_error(struct ctl_scsiio *ctsio)
+{
+ if ((ctsio->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_IN) {
+ /* "Unrecovered read error" */
+ ctl_set_sense(ctsio,
+ /*current_error*/ 1,
+ /*sense_key*/ SSD_KEY_MEDIUM_ERROR,
+ /*asc*/ 0x11,
+ /*ascq*/ 0x00,
+ SSD_ELEM_NONE);
+ } else {
+ /* "Write error - auto reallocation failed" */
+ ctl_set_sense(ctsio,
+ /*current_error*/ 1,
+ /*sense_key*/ SSD_KEY_MEDIUM_ERROR,
+ /*asc*/ 0x0C,
+ /*ascq*/ 0x02,
+ SSD_ELEM_NONE);
+ }
+}
+
+void
+ctl_set_aborted(struct ctl_scsiio *ctsio)
+{
+ ctl_set_sense(ctsio,
+ /*current_error*/ 1,
+ /*sense_key*/ SSD_KEY_ABORTED_COMMAND,
+ /*asc*/ 0x45,
+ /*ascq*/ 0x00,
+ SSD_ELEM_NONE);
+}
+
+void
+ctl_set_lba_out_of_range(struct ctl_scsiio *ctsio)
+{
+ /* "Logical block address out of range" */
+ ctl_set_sense(ctsio,
+ /*current_error*/ 1,
+ /*sense_key*/ SSD_KEY_ILLEGAL_REQUEST,
+ /*asc*/ 0x21,
+ /*ascq*/ 0x00,
+ SSD_ELEM_NONE);
+}
+
+void
+ctl_set_lun_stopped(struct ctl_scsiio *ctsio)
+{
+ /* "Logical unit not ready, initializing cmd. required" */
+ ctl_set_sense(ctsio,
+ /*current_error*/ 1,
+ /*sense_key*/ SSD_KEY_NOT_READY,
+ /*asc*/ 0x04,
+ /*ascq*/ 0x02,
+ SSD_ELEM_NONE);
+}
+
+void
+ctl_set_lun_not_ready(struct ctl_scsiio *ctsio)
+{
+ /* "Logical unit not ready, manual intervention required" */
+ ctl_set_sense(ctsio,
+ /*current_error*/ 1,
+ /*sense_key*/ SSD_KEY_NOT_READY,
+ /*asc*/ 0x04,
+ /*ascq*/ 0x05,
+ SSD_ELEM_NONE);
+}
+
+void
+ctl_set_illegal_pr_release(struct ctl_scsiio *ctsio)
+{
+ /* "Invalid release of persistent reservation" */
+ ctl_set_sense(ctsio,
+ /*current_error*/ 1,
+ /*sense_key*/ SSD_KEY_ILLEGAL_REQUEST,
+ /*asc*/ 0x26,
+ /*ascq*/ 0x04,
+ SSD_ELEM_NONE);
+}
+
+void
+ctl_set_lun_standby(struct ctl_scsiio *ctsio)
+{
+ /* "Logical unit not ready, target port in standby state" */
+ ctl_set_sense(ctsio,
+ /*current_error*/ 1,
+ /*sense_key*/ SSD_KEY_NOT_READY,
+ /*asc*/ 0x04,
+ /*ascq*/ 0x0b,
+ SSD_ELEM_NONE);
+}
+
+void
+ctl_set_medium_format_corrupted(struct ctl_scsiio *ctsio)
+{
+ /* "Medium format corrupted" */
+ ctl_set_sense(ctsio,
+ /*current_error*/ 1,
+ /*sense_key*/ SSD_KEY_MEDIUM_ERROR,
+ /*asc*/ 0x31,
+ /*ascq*/ 0x00,
+ SSD_ELEM_NONE);
+}
+
+void
+ctl_set_medium_magazine_inaccessible(struct ctl_scsiio *ctsio)
+{
+ /* "Medium magazine not accessible" */
+ ctl_set_sense(ctsio,
+ /*current_error*/ 1,
+ /*sense_key*/ SSD_KEY_NOT_READY,
+ /*asc*/ 0x3b,
+ /*ascq*/ 0x11,
+ SSD_ELEM_NONE);
+}
+
+void
+ctl_set_data_phase_error(struct ctl_scsiio *ctsio)
+{
+ /* "Data phase error" */
+ ctl_set_sense(ctsio,
+ /*current_error*/ 1,
+ /*sense_key*/ SSD_KEY_NOT_READY,
+ /*asc*/ 0x4b,
+ /*ascq*/ 0x00,
+ SSD_ELEM_NONE);
+}
+
+void
+ctl_set_reservation_conflict(struct ctl_scsiio *ctsio)
+{
+ struct scsi_sense_data *sense;
+
+ sense = &ctsio->sense_data;
+ memset(sense, 0, sizeof(*sense));
+ ctsio->scsi_status = SCSI_STATUS_RESERV_CONFLICT;
+ ctsio->sense_len = 0;
+ ctsio->io_hdr.status = CTL_SCSI_ERROR;
+}
+
+void
+ctl_set_queue_full(struct ctl_scsiio *ctsio)
+{
+ struct scsi_sense_data *sense;
+
+ sense = &ctsio->sense_data;
+ memset(sense, 0, sizeof(*sense));
+ ctsio->scsi_status = SCSI_STATUS_QUEUE_FULL;
+ ctsio->sense_len = 0;
+ ctsio->io_hdr.status = CTL_SCSI_ERROR;
+}
+
+void
+ctl_set_busy(struct ctl_scsiio *ctsio)
+{
+ struct scsi_sense_data *sense;
+
+ sense = &ctsio->sense_data;
+ memset(sense, 0, sizeof(*sense));
+ ctsio->scsi_status = SCSI_STATUS_BUSY;
+ ctsio->sense_len = 0;
+ ctsio->io_hdr.status = CTL_SCSI_ERROR;
+}
+
+void
+ctl_set_success(struct ctl_scsiio *ctsio)
+{
+ struct scsi_sense_data *sense;
+
+ sense = &ctsio->sense_data;
+ memset(sense, 0, sizeof(*sense));
+ ctsio->scsi_status = SCSI_STATUS_OK;
+ ctsio->sense_len = 0;
+ ctsio->io_hdr.status = CTL_SUCCESS;
+}
diff --git a/sys/cam/ctl/ctl_error.h b/sys/cam/ctl/ctl_error.h
new file mode 100644
index 0000000..1d8bd9b
--- /dev/null
+++ b/sys/cam/ctl/ctl_error.h
@@ -0,0 +1,85 @@
+/*-
+ * Copyright (c) 2003 Silicon Graphics International Corp.
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_error.h#1 $
+ * $FreeBSD$
+ */
+/*
+ * Function definitions for various error reporting routines used both
+ * within CTL and various CTL clients.
+ *
+ * Author: Ken Merry <ken@FreeBSD.org>
+ */
+
+#include <machine/stdarg.h>
+
+#ifndef _CTL_ERROR_H_
+#define _CTL_ERROR_H_
+
+void ctl_set_sense_data_va(struct scsi_sense_data *sense_data, void *lun,
+ scsi_sense_data_type sense_format, int current_error,
+ int sense_key, int asc, int ascq, va_list ap);
+void ctl_set_sense_data(struct scsi_sense_data *sense_data, void *lun,
+ scsi_sense_data_type sense_format, int current_error,
+ int sense_key, int asc, int ascq, ...);
+void ctl_set_sense(struct ctl_scsiio *ctsio, int current_error, int sense_key,
+ int asc, int ascq, ...);
+void ctl_sense_to_desc(struct scsi_sense_data_fixed *sense_src,
+ struct scsi_sense_data_desc *sense_dest);
+void ctl_sense_to_fixed(struct scsi_sense_data_desc *sense_src,
+ struct scsi_sense_data_fixed *sense_dest);
+void ctl_set_ua(struct ctl_scsiio *ctsio, int asc, int ascq);
+ctl_ua_type ctl_build_ua(ctl_ua_type ua_type, struct scsi_sense_data *sense,
+ scsi_sense_data_type sense_format);
+void ctl_set_overlapped_cmd(struct ctl_scsiio *ctsio);
+void ctl_set_overlapped_tag(struct ctl_scsiio *ctsio, uint8_t tag);
+void ctl_set_invalid_field(struct ctl_scsiio *ctsio, int sks_valid, int command,
+ int field, int bit_valid, int bit);
+void ctl_set_invalid_opcode(struct ctl_scsiio *ctsio);
+void ctl_set_param_len_error(struct ctl_scsiio *ctsio);
+void ctl_set_already_locked(struct ctl_scsiio *ctsio);
+void ctl_set_unsupported_lun(struct ctl_scsiio *ctsio);
+void ctl_set_lun_standby(struct ctl_scsiio *ctsio);
+void ctl_set_internal_failure(struct ctl_scsiio *ctsio, int sks_valid,
+ uint16_t retry_count);
+void ctl_set_medium_error(struct ctl_scsiio *ctsio);
+void ctl_set_aborted(struct ctl_scsiio *ctsio);
+void ctl_set_lba_out_of_range(struct ctl_scsiio *ctsio);
+void ctl_set_lun_stopped(struct ctl_scsiio *ctsio);
+void ctl_set_lun_not_ready(struct ctl_scsiio *ctsio);
+void ctl_set_illegal_pr_release(struct ctl_scsiio *ctsio);
+void ctl_set_medium_format_corrupted(struct ctl_scsiio *ctsio);
+void ctl_set_medium_magazine_inaccessible(struct ctl_scsiio *ctsio);
+void ctl_set_data_phase_error(struct ctl_scsiio *ctsio);
+void ctl_set_reservation_conflict(struct ctl_scsiio *ctsio);
+void ctl_set_queue_full(struct ctl_scsiio *ctsio);
+void ctl_set_busy(struct ctl_scsiio *ctsio);
+void ctl_set_success(struct ctl_scsiio *ctsio);
+
+#endif /* _CTL_ERROR_H_ */
diff --git a/sys/cam/ctl/ctl_frontend.c b/sys/cam/ctl/ctl_frontend.c
new file mode 100644
index 0000000..ec0ec32
--- /dev/null
+++ b/sys/cam/ctl/ctl_frontend.c
@@ -0,0 +1,187 @@
+/*-
+ * Copyright (c) 2003 Silicon Graphics International Corp.
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_frontend.c#4 $
+ */
+/*
+ * CAM Target Layer front end interface code
+ *
+ * Author: Ken Merry <ken@FreeBSD.org>
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/kernel.h>
+#include <sys/types.h>
+#include <sys/malloc.h>
+#include <sys/lock.h>
+#include <sys/mutex.h>
+#include <sys/condvar.h>
+#include <sys/endian.h>
+#include <sys/queue.h>
+
+#include <cam/scsi/scsi_all.h>
+#include <cam/scsi/scsi_da.h>
+#include <cam/ctl/ctl_io.h>
+#include <cam/ctl/ctl.h>
+#include <cam/ctl/ctl_frontend.h>
+#include <cam/ctl/ctl_frontend_internal.h>
+#include <cam/ctl/ctl_backend.h>
+/* XXX KDM move defines from ctl_ioctl.h to somewhere else */
+#include <cam/ctl/ctl_ioctl.h>
+#include <cam/ctl/ctl_ha.h>
+#include <cam/ctl/ctl_private.h>
+#include <cam/ctl/ctl_debug.h>
+
+extern struct ctl_softc *control_softc;
+
+int
+ctl_frontend_register(struct ctl_frontend *fe, int master_shelf)
+{
+ struct ctl_io_pool *pool;
+ int port_num;
+ int retval;
+
+ retval = 0;
+
+ KASSERT(control_softc != NULL, ("CTL is not initialized"));
+
+ mtx_lock(&control_softc->ctl_lock);
+ port_num = ctl_ffz(&control_softc->ctl_port_mask, CTL_MAX_PORTS);
+ if ((port_num == -1)
+ || (ctl_set_mask(&control_softc->ctl_port_mask, port_num) == -1)) {
+ fe->targ_port = -1;
+ mtx_unlock(&control_softc->ctl_lock);
+ return (1);
+ }
+ control_softc->num_frontends++;
+
+ mtx_unlock(&control_softc->ctl_lock);
+ /*
+ * We add 20 to whatever the caller requests, so he doesn't get
+ * burned by queueing things back to the pending sense queue. In
+ * theory, there should probably only be one outstanding item, at
+ * most, on the pending sense queue for a LUN. We'll clear the
+ * pending sense queue on the next command, whether or not it is
+ * a REQUEST SENSE.
+ */
+ retval = ctl_pool_create(control_softc,
+ (fe->port_type != CTL_PORT_IOCTL) ?
+ CTL_POOL_FETD : CTL_POOL_IOCTL,
+ fe->num_requested_ctl_io + 20, &pool);
+ if (retval != 0) {
+ fe->targ_port = -1;
+ mtx_lock(&control_softc->ctl_lock);
+ ctl_clear_mask(&control_softc->ctl_port_mask, port_num);
+ mtx_unlock(&control_softc->ctl_lock);
+ return (retval);
+ }
+
+ mtx_lock(&control_softc->ctl_lock);
+
+ /* For now assume master shelf */
+ //fe->targ_port = port_num;
+ fe->targ_port = port_num + (master_shelf!=0 ? 0 : CTL_MAX_PORTS);
+ fe->max_initiators = CTL_MAX_INIT_PER_PORT;
+ STAILQ_INSERT_TAIL(&control_softc->fe_list, fe, links);
+ ctl_pool_acquire(pool);
+ control_softc->ctl_ports[port_num] = fe;
+
+ mtx_unlock(&control_softc->ctl_lock);
+
+ fe->ctl_pool_ref = pool;
+
+ return (retval);
+}
+
+int
+ctl_frontend_deregister(struct ctl_frontend *fe)
+{
+ struct ctl_io_pool *pool;
+ int port_num;
+ int retval;
+
+ retval = 0;
+
+ pool = (struct ctl_io_pool *)fe->ctl_pool_ref;
+
+ if (fe->targ_port == -1) {
+ retval = 1;
+ goto bailout;
+ }
+
+ mtx_lock(&control_softc->ctl_lock);
+
+ ctl_pool_invalidate(pool);
+ ctl_pool_release(pool);
+
+ STAILQ_REMOVE(&control_softc->fe_list, fe, ctl_frontend, links);
+ control_softc->num_frontends--;
+ port_num = (fe->targ_port < CTL_MAX_PORTS) ? fe->targ_port :
+ fe->targ_port - CTL_MAX_PORTS;
+ ctl_clear_mask(&control_softc->ctl_port_mask, port_num);
+ control_softc->ctl_ports[port_num] = NULL;
+ mtx_unlock(&control_softc->ctl_lock);
+bailout:
+ return (retval);
+}
+
+void
+ctl_frontend_set_wwns(struct ctl_frontend *fe, int wwnn_valid, uint64_t wwnn,
+ int wwpn_valid, uint64_t wwpn)
+{
+ if (wwnn_valid)
+ fe->wwnn = wwnn;
+
+ if (wwpn_valid)
+ fe->wwpn = wwpn;
+}
+
+void
+ctl_frontend_online(struct ctl_frontend *fe)
+{
+ fe->port_online(fe->onoff_arg);
+ /* XXX KDM need a lock here? */
+ fe->status |= CTL_PORT_STATUS_ONLINE;
+}
+
+void
+ctl_frontend_offline(struct ctl_frontend *fe)
+{
+ fe->port_offline(fe->onoff_arg);
+ /* XXX KDM need a lock here? */
+ fe->status &= ~CTL_PORT_STATUS_ONLINE;
+}
+
+/*
+ * vim: ts=8
+ */
diff --git a/sys/cam/ctl/ctl_frontend.h b/sys/cam/ctl/ctl_frontend.h
new file mode 100644
index 0000000..b286476
--- /dev/null
+++ b/sys/cam/ctl/ctl_frontend.h
@@ -0,0 +1,295 @@
+/*-
+ * Copyright (c) 2003 Silicon Graphics International Corp.
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_frontend.h#2 $
+ * $FreeBSD$
+ */
+/*
+ * CAM Target Layer front end registration hooks
+ *
+ * Author: Ken Merry <ken@FreeBSD.org>
+ */
+
+#ifndef _CTL_FRONTEND_H_
+#define _CTL_FRONTEND_H_
+
+typedef enum {
+ CTL_PORT_STATUS_NONE = 0x00,
+ CTL_PORT_STATUS_ONLINE = 0x01,
+ CTL_PORT_STATUS_TARG_ONLINE = 0x02,
+ CTL_PORT_STATUS_LUN_ONLINE = 0x04
+} ctl_port_status;
+
+typedef void (*port_func_t)(void *onoff_arg);
+typedef int (*targ_func_t)(void *arg, struct ctl_id targ_id);
+typedef int (*lun_func_t)(void *arg, struct ctl_id targ_id, int lun_id);
+
+/*
+ * The ctl_frontend structure is the registration mechanism between a FETD
+ * (Front End Target Driver) and the CTL layer. Here is a description of
+ * the fields:
+ *
+ * port_type: This field tells CTL what kind of front end it is
+ * dealing with. This field serves two purposes.
+ * The first is to let CTL know whether the frontend
+ * in question is inside the main CTL module (i.e.
+ * the ioctl front end), and therefore its module
+ * reference count shouldn't be incremented. The
+ * CTL ioctl front end should continue to use the
+ * CTL_PORT_IOCTL argument as long as it is part of
+ * the main CTL module. The second is to let CTL
+ * know what kind of front end it is dealing with, so
+ * it can return the proper inquiry data for that
+ * particular port.
+ *
+ * num_requested_ctl_io: This is the number of ctl_io structures that the
+ * front end needs for its pool. This should
+ * generally be the maximum number of outstanding
+ * transactions that the FETD can handle. The CTL
+ * layer will add a few to this to account for
+ * ctl_io buffers queued for pending sense data.
+ * (Pending sense only gets queued if the FETD
+ * doesn't support autosense. e.g. non-packetized
+ * parallel SCSI doesn't support autosense.)
+ *
+ * port_name: A string describing the FETD. e.g. "LSI 1030T U320"
+ * or whatever you want to use to describe the driver.
+ *
+ *
+ * physical_port: This is the physical port number of this
+ * particular port within the driver/hardware. This
+ * number is hardware/driver specific.
+ * virtual_port: This is the virtual port number of this
+ * particular port. This is for things like NP-IV.
+ *
+ * port_online(): This function is called, with onoff_arg as its
+ * argument, by the CTL layer when it wants the FETD
+ * to start responding to selections on the specified
+ * target ID. (targ_target)
+ *
+ * port_offline(): This function is called, with onoff_arg as its
+ * argument, by the CTL layer when it wants the FETD
+ * to stop responding to selection on the specified
+ * target ID. (targ_target)
+ *
+ * onoff_arg: This is supplied as an argument to port_online()
+ * and port_offline(). This is specified by the
+ * FETD.
+ *
+ * targ_enable(): This function is called, with targ_lun_arg and a
+ * target ID as its arguments, by CTL when it wants
+ * the FETD to enable a particular target. targ_enable()
+ * will always be called for a particular target ID
+ * before any LUN is enabled for that target. If the
+ * FETD does not support enabling targets, but rather
+ * LUNs, it should ignore this call and return 0. If
+ * the FETD does support enabling targets, it should
+ * return 0 for success and non-zero if it cannot
+ * enable the given target.
+ *
+ * TODO: Add the ability to specify a WWID here.
+ *
+ * targ_disable(): This function is called, with targ_lun_arg and a
+ * target ID as its arguments, by CTL when it wants
+ * the FETD to disable a particular target.
+ * targ_disable() will always be called for a
+ * particular target ID after all LUNs are disabled
+ * on that particular target. If the FETD does not
+ * support enabling targets, it should ignore this
+ * call and return 0. If the FETD does support
+ * enabling targets, it should return 0 for success,
+ * and non-zero if it cannot disable the given target.
+ *
+ * lun_enable(): This function is called, with targ_lun_arg, a target
+ * ID and a LUN ID as its arguments, by CTL when it
+ * wants the FETD to enable a particular LUN. If the
+ * FETD doesn't really know about LUNs, it should
+ * just ignore this call and return 0. If the FETD
+ * cannot enable the requested LUN for some reason, the
+ * FETD should return non-zero status.
+ *
+ * lun_disable(): This function is called, with targ_lun_arg, a target
+ * ID and LUN ID as its arguments, by CTL when it
+ * wants the FETD to disable a particular LUN. If the
+ * FETD doesn't really know about LUNs, it should just
+ * ignore this call and return 0. If the FETD cannot
+ * disable the requested LUN for some reason, the
+ * FETD should return non-zero status.
+ *
+ * targ_lun_arg: This is supplied as an argument to the targ/lun
+ * enable/disable() functions. This is specified by
+ * the FETD.
+ *
+ * fe_datamove(): This function is called one or more times per I/O
+ * by the CTL layer to tell the FETD to initiate a
+ * DMA to or from the data buffer(s) specified by
+ * the passed-in ctl_io structure.
+ *
+ * fe_done(): This function is called by the CTL layer when a
+ * particular SCSI I/O or task management command has
+ * completed. For SCSI I/O requests (CTL_IO_SCSI),
+ * sense data is always supplied if the status is
+ * CTL_SCSI_ERROR and the SCSI status byte is
+ * SCSI_STATUS_CHECK_COND. If the FETD doesn't
+ * support autosense, the sense should be queued
+ * back to the CTL layer via ctl_queue_sense().
+ *
+ * fe_dump(): This function, if it exists, is called by CTL
+ * to request a dump of any debugging information or
+ * state to the console.
+ *
+ * max_targets: The maximum number of targets that we can create
+ * per-port.
+ *
+ * max_target_id: The highest target ID that we can use.
+ *
+ * targ_port: The CTL layer assigns a "port number" to every
+ * FETD. This port number should be passed back in
+ * in the header of every ctl_io that is queued to
+ * the CTL layer. This enables us to determine
+ * which bus the command came in on.
+ *
+ * ctl_pool_ref: Memory pool reference used by the FETD in calls to
+ * ctl_alloc_io().
+ *
+ * max_initiators: Maximum number of initiators that the FETD is
+ * allowed to have. Initiators should be numbered
+ * from 0 to max_initiators - 1. This value will
+ * typically be 16, and thus not a problem for
+ * parallel SCSI. This may present issues for Fibre
+ * Channel.
+ *
+ * wwnn World Wide Node Name to be used by the FETD.
+ * Note that this is set *after* registration. It
+ * will be set prior to the online function getting
+ * called.
+ *
+ * wwpn World Wide Port Name to be used by the FETD.
+ * Note that this is set *after* registration. It
+ * will be set prior to the online function getting
+ * called.
+ *
+ * status: Used by CTL to keep track of per-FETD state.
+ *
+ * links: Linked list pointers, used by CTL. The FETD
+ * shouldn't touch this field.
+ */
+struct ctl_frontend {
+ ctl_port_type port_type; /* passed to CTL */
+ int num_requested_ctl_io; /* passed to CTL */
+ char *port_name; /* passed to CTL */
+ int physical_port; /* passed to CTL */
+ int virtual_port; /* passed to CTL */
+ port_func_t port_online; /* passed to CTL */
+ port_func_t port_offline; /* passed to CTL */
+ void *onoff_arg; /* passed to CTL */
+ targ_func_t targ_enable; /* passed to CTL */
+ targ_func_t targ_disable; /* passed to CTL */
+ lun_func_t lun_enable; /* passed to CTL */
+ lun_func_t lun_disable; /* passed to CTL */
+ void *targ_lun_arg; /* passed to CTL */
+ void (*fe_datamove)(union ctl_io *io); /* passed to CTL */
+ void (*fe_done)(union ctl_io *io); /* passed to CTL */
+ void (*fe_dump)(void); /* passed to CTL */
+ int max_targets; /* passed to CTL */
+ int max_target_id; /* passed to CTL */
+ int32_t targ_port; /* passed back to FETD */
+ void *ctl_pool_ref; /* passed back to FETD */
+ uint32_t max_initiators; /* passed back to FETD */
+ uint64_t wwnn; /* set by CTL before online */
+ uint64_t wwpn; /* set by CTL before online */
+ ctl_port_status status; /* used by CTL */
+ STAILQ_ENTRY(ctl_frontend) links; /* used by CTL */
+};
+
+/*
+ * This may block until resources are allocated. Called at FETD module load
+ * time. Returns 0 for success, non-zero for failure.
+ */
+int ctl_frontend_register(struct ctl_frontend *fe, int master_SC);
+
+/*
+ * Called at FETD module unload time.
+ * Returns 0 for success, non-zero for failure.
+ */
+int ctl_frontend_deregister(struct ctl_frontend *fe);
+
+/*
+ * Called to set the WWNN and WWPN for a particular frontend.
+ */
+void ctl_frontend_set_wwns(struct ctl_frontend *fe, int wwnn_valid,
+ uint64_t wwnn, int wwpn_valid, uint64_t wwpn);
+
+/*
+ * Called to bring a particular frontend online.
+ */
+void ctl_frontend_online(struct ctl_frontend *fe);
+
+/*
+ * Called to take a particular frontend offline.
+ */
+void ctl_frontend_offline(struct ctl_frontend *fe);
+
+/*
+ * This routine queues I/O and task management requests from the FETD to the
+ * CTL layer. Returns immediately. Returns 0 for success, non-zero for
+ * failure.
+ */
+int ctl_queue(union ctl_io *io);
+
+/*
+ * This routine is used if the front end interface doesn't support
+ * autosense (e.g. non-packetized parallel SCSI). This will queue the
+ * scsiio structure back to a per-lun pending sense queue. This MUST be
+ * called BEFORE any request sense can get queued to the CTL layer -- I
+ * need it in the queue in order to service the request. The scsiio
+ * structure passed in here will be freed by the CTL layer when sense is
+ * retrieved by the initiator. Returns 0 for success, non-zero for failure.
+ */
+int ctl_queue_sense(union ctl_io *io);
+
+/*
+ * This routine adds an initiator to CTL's port database. The WWPN should
+ * be the FC WWPN, if available. The targ_port field should be the same as
+ * the targ_port passed back from CTL in the ctl_frontend structure above.
+ * The iid field should be the same as the iid passed in the nexus of each
+ * ctl_io from this initiator.
+ */
+int ctl_add_initiator(uint64_t wwpn, int32_t targ_port, uint32_t iid);
+
+/*
+ * This routine will remove an initiator from CTL's port database. The
+ * targ_port field should be the same as the targ_port passed back in the
+ * ctl_frontend structure above. The iid field should be the same as the
+ * iid passed in the nexus of each ctl_io from this initiator.
+ */
+int
+ctl_remove_initiator(int32_t targ_port, uint32_t iid);
+
+#endif /* _CTL_FRONTEND_H_ */
diff --git a/sys/cam/ctl/ctl_frontend_cam_sim.c b/sys/cam/ctl/ctl_frontend_cam_sim.c
new file mode 100644
index 0000000..bfd1e60
--- /dev/null
+++ b/sys/cam/ctl/ctl_frontend_cam_sim.c
@@ -0,0 +1,866 @@
+/*-
+ * Copyright (c) 2009 Silicon Graphics International Corp.
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_frontend_cam_sim.c#4 $
+ */
+/*
+ * CTL frontend to CAM SIM interface. This allows access to CTL LUNs via
+ * the da(4) and pass(4) drivers from inside the system.
+ *
+ * Author: Ken Merry <ken@FreeBSD.org>
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/kernel.h>
+#include <sys/types.h>
+#include <sys/malloc.h>
+#include <sys/lock.h>
+#include <sys/mutex.h>
+#include <sys/condvar.h>
+#include <sys/queue.h>
+#include <sys/bus.h>
+#include <sys/sysctl.h>
+#include <machine/bus.h>
+#include <sys/sbuf.h>
+
+#include <cam/cam.h>
+#include <cam/cam_ccb.h>
+#include <cam/cam_sim.h>
+#include <cam/cam_xpt_sim.h>
+#include <cam/cam_xpt.h>
+#include <cam/cam_periph.h>
+#include <cam/scsi/scsi_all.h>
+#include <cam/scsi/scsi_message.h>
+#include <cam/ctl/ctl_io.h>
+#include <cam/ctl/ctl.h>
+#include <cam/ctl/ctl_frontend.h>
+#include <cam/ctl/ctl_frontend_internal.h>
+#include <cam/ctl/ctl_mem_pool.h>
+#include <cam/ctl/ctl_debug.h>
+
+#define io_ptr spriv_ptr1
+
+struct cfcs_io {
+ union ccb *ccb;
+};
+
+struct cfcs_softc {
+ struct ctl_frontend fe;
+ char port_name[32];
+ struct cam_sim *sim;
+ struct cam_devq *devq;
+ struct cam_path *path;
+ struct mtx lock;
+ char lock_desc[32];
+ uint64_t wwnn;
+ uint64_t wwpn;
+ uint32_t cur_tag_num;
+ int online;
+};
+
+/*
+ * We can't handle CCBs with these flags. For the most part, we just don't
+ * handle physical addresses yet. That would require mapping things in
+ * order to do the copy.
+ */
+#define CFCS_BAD_CCB_FLAGS (CAM_DATA_PHYS | CAM_SG_LIST_PHYS | \
+ CAM_MSG_BUF_PHYS | CAM_SNS_BUF_PHYS | CAM_CDB_PHYS | CAM_SENSE_PTR |\
+ CAM_SENSE_PHYS)
+
+int cfcs_init(void);
+void cfcs_shutdown(void);
+static void cfcs_poll(struct cam_sim *sim);
+static void cfcs_online(void *arg);
+static void cfcs_offline(void *arg);
+static int cfcs_targ_enable(void *arg, struct ctl_id targ_id);
+static int cfcs_targ_disable(void *arg, struct ctl_id targ_id);
+static int cfcs_lun_enable(void *arg, struct ctl_id target_id, int lun_id);
+static int cfcs_lun_disable(void *arg, struct ctl_id target_id, int lun_id);
+static void cfcs_datamove(union ctl_io *io);
+static void cfcs_done(union ctl_io *io);
+void cfcs_action(struct cam_sim *sim, union ccb *ccb);
+static void cfcs_async(void *callback_arg, uint32_t code,
+ struct cam_path *path, void *arg);
+
+struct cfcs_softc cfcs_softc;
+/*
+ * This is primarly intended to allow for error injection to test the CAM
+ * sense data and sense residual handling code. This sets the maximum
+ * amount of SCSI sense data that we will report to CAM.
+ */
+static int cfcs_max_sense = sizeof(struct scsi_sense_data);
+
+SYSINIT(cfcs_init, SI_SUB_CONFIGURE, SI_ORDER_FOURTH, cfcs_init, NULL);
+SYSCTL_NODE(_kern_cam, OID_AUTO, ctl2cam, CTLFLAG_RD, 0,
+ "CAM Target Layer SIM frontend");
+SYSCTL_INT(_kern_cam_ctl2cam, OID_AUTO, max_sense, CTLFLAG_RW,
+ &cfcs_max_sense, 0, "Maximum sense data size");
+
+
+int
+cfcs_init(void)
+{
+ struct cfcs_softc *softc;
+ struct ccb_setasync csa;
+ struct ctl_frontend *fe;
+#ifdef NEEDTOPORT
+ char wwnn[8];
+#endif
+ int retval;
+
+ softc = &cfcs_softc;
+ retval = 0;
+ bzero(softc, sizeof(*softc));
+ sprintf(softc->lock_desc, "ctl2cam");
+ mtx_init(&softc->lock, softc->lock_desc, NULL, MTX_DEF);
+ fe = &softc->fe;
+
+ fe->port_type = CTL_PORT_INTERNAL;
+ /* XXX KDM what should the real number be here? */
+ fe->num_requested_ctl_io = 4096;
+ snprintf(softc->port_name, sizeof(softc->port_name), "ctl2cam");
+ fe->port_name = softc->port_name;
+ fe->port_online = cfcs_online;
+ fe->port_offline = cfcs_offline;
+ fe->onoff_arg = softc;
+ fe->targ_enable = cfcs_targ_enable;
+ fe->targ_disable = cfcs_targ_disable;
+ fe->lun_enable = cfcs_lun_enable;
+ fe->lun_disable = cfcs_lun_disable;
+ fe->targ_lun_arg = softc;
+ fe->fe_datamove = cfcs_datamove;
+ fe->fe_done = cfcs_done;
+
+ /* XXX KDM what should we report here? */
+ /* XXX These should probably be fetched from CTL. */
+ fe->max_targets = 1;
+ fe->max_target_id = 15;
+
+ retval = ctl_frontend_register(fe, /*master_SC*/ 1);
+ if (retval != 0) {
+ printf("%s: ctl_frontend_register() failed with error %d!\n",
+ __func__, retval);
+ retval = 1;
+ goto bailout;
+ }
+
+ /*
+ * Get the WWNN out of the database, and create a WWPN as well.
+ */
+#ifdef NEEDTOPORT
+ ddb_GetWWNN((char *)wwnn);
+ softc->wwnn = be64dec(wwnn);
+ softc->wwpn = softc->wwnn + (softc->fe.targ_port & 0xff);
+#endif
+
+ /*
+ * If the CTL frontend didn't tell us what our WWNN/WWPN is, go
+ * ahead and set something random.
+ */
+ if (fe->wwnn == 0) {
+ uint64_t random_bits;
+
+ arc4rand(&random_bits, sizeof(random_bits), 0);
+ softc->wwnn = (random_bits & 0x0000000fffffff00ULL) |
+ /* Company ID */ 0x5000000000000000ULL |
+ /* NL-Port */ 0x0300;
+ softc->wwpn = softc->wwnn + fe->targ_port + 1;
+ fe->wwnn = softc->wwnn;
+ fe->wwpn = softc->wwpn;
+ } else {
+ softc->wwnn = fe->wwnn;
+ softc->wwpn = fe->wwpn;
+ }
+
+
+ softc->devq = cam_simq_alloc(fe->num_requested_ctl_io);
+ if (softc->devq == NULL) {
+ printf("%s: error allocating devq\n", __func__);
+ retval = ENOMEM;
+ goto bailout;
+ }
+
+ softc->sim = cam_sim_alloc(cfcs_action, cfcs_poll, softc->port_name,
+ softc, /*unit*/ 0, &softc->lock, 1,
+ fe->num_requested_ctl_io, softc->devq);
+ if (softc->sim == NULL) {
+ printf("%s: error allocating SIM\n", __func__);
+ retval = ENOMEM;
+ goto bailout;
+ }
+
+ mtx_lock(&softc->lock);
+ if (xpt_bus_register(softc->sim, NULL, 0) != CAM_SUCCESS) {
+ printf("%s: error registering SIM\n", __func__);
+ retval = ENOMEM;
+ goto bailout;
+ }
+
+ if (xpt_create_path(&softc->path, /*periph*/NULL,
+ cam_sim_path(softc->sim),
+ CAM_TARGET_WILDCARD,
+ CAM_LUN_WILDCARD) != CAM_REQ_CMP) {
+ printf("%s: error creating path\n", __func__);
+ xpt_bus_deregister(cam_sim_path(softc->sim));
+ retval = 1;
+ goto bailout;
+ }
+
+ mtx_unlock(&softc->lock);
+
+ xpt_setup_ccb(&csa.ccb_h, softc->path, /*priority*/ 5);
+ csa.ccb_h.func_code = XPT_SASYNC_CB;
+ csa.event_enable = AC_LOST_DEVICE;
+ csa.callback = cfcs_async;
+ csa.callback_arg = softc->sim;
+ xpt_action((union ccb *)&csa);
+
+ return (retval);
+
+bailout:
+ if (softc->sim)
+ cam_sim_free(softc->sim, /*free_devq*/ TRUE);
+ else if (softc->devq)
+ cam_simq_free(softc->devq);
+
+ mtx_unlock(&softc->lock);
+
+ return (retval);
+}
+
+static void
+cfcs_poll(struct cam_sim *sim)
+{
+
+}
+
+void
+cfcs_shutdown(void)
+{
+
+}
+
+static void
+cfcs_online(void *arg)
+{
+ struct cfcs_softc *softc;
+ union ccb *ccb;
+
+ softc = (struct cfcs_softc *)arg;
+
+ mtx_lock(&softc->lock);
+ softc->online = 1;
+ mtx_unlock(&softc->lock);
+
+ ccb = xpt_alloc_ccb_nowait();
+ if (ccb == NULL) {
+ printf("%s: unable to allocate CCB for rescan\n", __func__);
+ return;
+ }
+
+ if (xpt_create_path(&ccb->ccb_h.path, xpt_periph,
+ cam_sim_path(softc->sim), CAM_TARGET_WILDCARD,
+ CAM_LUN_WILDCARD) != CAM_REQ_CMP) {
+ printf("%s: can't allocate path for rescan\n", __func__);
+ xpt_free_ccb(ccb);
+ return;
+ }
+ xpt_rescan(ccb);
+}
+
+static void
+cfcs_offline(void *arg)
+{
+ struct cfcs_softc *softc;
+ union ccb *ccb;
+
+ softc = (struct cfcs_softc *)arg;
+
+ mtx_lock(&softc->lock);
+ softc->online = 0;
+ mtx_unlock(&softc->lock);
+
+ ccb = xpt_alloc_ccb_nowait();
+ if (ccb == NULL) {
+ printf("%s: unable to allocate CCB for rescan\n", __func__);
+ return;
+ }
+
+ if (xpt_create_path(&ccb->ccb_h.path, xpt_periph,
+ cam_sim_path(softc->sim), CAM_TARGET_WILDCARD,
+ CAM_LUN_WILDCARD) != CAM_REQ_CMP) {
+ printf("%s: can't allocate path for rescan\n", __func__);
+ xpt_free_ccb(ccb);
+ return;
+ }
+ xpt_rescan(ccb);
+}
+
+static int
+cfcs_targ_enable(void *arg, struct ctl_id targ_id)
+{
+ return (0);
+}
+
+static int
+cfcs_targ_disable(void *arg, struct ctl_id targ_id)
+{
+ return (0);
+}
+
+static int
+cfcs_lun_enable(void *arg, struct ctl_id target_id, int lun_id)
+{
+ return (0);
+}
+static int
+cfcs_lun_disable(void *arg, struct ctl_id target_id, int lun_id)
+{
+ return (0);
+}
+
+/*
+ * This function is very similar to ctl_ioctl_do_datamove(). Is there a
+ * way to combine the functionality?
+ *
+ * XXX KDM may need to move this into a thread. We're doing a bcopy in the
+ * caller's context, which will usually be the backend. That may not be a
+ * good thing.
+ */
+static void
+cfcs_datamove(union ctl_io *io)
+{
+ union ccb *ccb;
+ bus_dma_segment_t cam_sg_entry, *cam_sglist;
+ struct ctl_sg_entry ctl_sg_entry, *ctl_sglist;
+ int cam_sg_count, ctl_sg_count, cam_sg_start;
+ int cam_sg_offset;
+ int len_to_copy, len_copied;
+ int ctl_watermark, cam_watermark;
+ int i, j;
+
+
+ cam_sg_offset = 0;
+ cam_sg_start = 0;
+
+ ccb = io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr;
+
+ /*
+ * Note that we have a check in cfcs_action() to make sure that any
+ * CCBs with "bad" flags are returned with CAM_REQ_INVALID. This
+ * is just to make sure no one removes that check without updating
+ * this code to provide the additional functionality necessary to
+ * support those modes of operation.
+ */
+ KASSERT(((ccb->ccb_h.flags & CFCS_BAD_CCB_FLAGS) == 0), ("invalid "
+ "CAM flags %#x", (ccb->ccb_h.flags & CFCS_BAD_CCB_FLAGS)));
+
+ /*
+ * Simplify things on both sides by putting single buffers into a
+ * single entry S/G list.
+ */
+ if (ccb->ccb_h.flags & CAM_SCATTER_VALID) {
+ if (ccb->ccb_h.flags & CAM_SG_LIST_PHYS) {
+ /* We should filter this out on entry */
+ panic("%s: physical S/G list, should not get here",
+ __func__);
+ } else {
+ int len_seen;
+
+ cam_sglist = (bus_dma_segment_t *)ccb->csio.data_ptr;
+ cam_sg_count = ccb->csio.sglist_cnt;
+
+ for (i = 0, len_seen = 0; i < cam_sg_count; i++) {
+ if ((len_seen + cam_sglist[i].ds_len) >=
+ io->scsiio.kern_rel_offset) {
+ cam_sg_start = i;
+ cam_sg_offset =
+ io->scsiio.kern_rel_offset -
+ len_seen;
+ break;
+ }
+ len_seen += cam_sglist[i].ds_len;
+ }
+ }
+ } else {
+ cam_sglist = &cam_sg_entry;
+ cam_sglist[0].ds_len = ccb->csio.dxfer_len;
+ cam_sglist[0].ds_addr = (bus_addr_t)ccb->csio.data_ptr;
+ cam_sg_count = 1;
+ cam_sg_start = 0;
+ cam_sg_offset = io->scsiio.kern_rel_offset;
+ }
+
+ if (io->scsiio.kern_sg_entries > 0) {
+ ctl_sglist = (struct ctl_sg_entry *)io->scsiio.kern_data_ptr;
+ ctl_sg_count = io->scsiio.kern_sg_entries;
+ } else {
+ ctl_sglist = &ctl_sg_entry;
+ ctl_sglist->addr = io->scsiio.kern_data_ptr;
+ ctl_sglist->len = io->scsiio.kern_data_len;
+ ctl_sg_count = 1;
+ }
+
+ ctl_watermark = 0;
+ cam_watermark = cam_sg_offset;
+ len_copied = 0;
+ for (i = cam_sg_start, j = 0;
+ i < cam_sg_count && j < ctl_sg_count;) {
+ uint8_t *cam_ptr, *ctl_ptr;
+
+ len_to_copy = ctl_min(cam_sglist[i].ds_len - cam_watermark,
+ ctl_sglist[j].len - ctl_watermark);
+
+ cam_ptr = (uint8_t *)cam_sglist[i].ds_addr;
+ cam_ptr = cam_ptr + cam_watermark;
+ if (io->io_hdr.flags & CTL_FLAG_BUS_ADDR) {
+ /*
+ * XXX KDM fix this!
+ */
+ panic("need to implement bus address support");
+#if 0
+ kern_ptr = bus_to_virt(kern_sglist[j].addr);
+#endif
+ } else
+ ctl_ptr = (uint8_t *)ctl_sglist[j].addr;
+ ctl_ptr = ctl_ptr + ctl_watermark;
+
+ ctl_watermark += len_to_copy;
+ cam_watermark += len_to_copy;
+
+ if ((io->io_hdr.flags & CTL_FLAG_DATA_MASK) ==
+ CTL_FLAG_DATA_IN) {
+ CTL_DEBUG_PRINT(("%s: copying %d bytes to CAM\n",
+ __func__, len_to_copy));
+ CTL_DEBUG_PRINT(("%s: from %p to %p\n", ctl_ptr,
+ __func__, cam_ptr));
+ bcopy(ctl_ptr, cam_ptr, len_to_copy);
+ } else {
+ CTL_DEBUG_PRINT(("%s: copying %d bytes from CAM\n",
+ __func__, len_to_copy));
+ CTL_DEBUG_PRINT(("%s: from %p to %p\n", cam_ptr,
+ __func__, ctl_ptr));
+ bcopy(cam_ptr, ctl_ptr, len_to_copy);
+ }
+
+ len_copied += len_to_copy;
+
+ if (cam_sglist[i].ds_len == cam_watermark) {
+ i++;
+ cam_watermark = 0;
+ }
+
+ if (ctl_sglist[j].len == ctl_watermark) {
+ j++;
+ ctl_watermark = 0;
+ }
+ }
+
+ io->scsiio.ext_data_filled += len_copied;
+
+ io->scsiio.be_move_done(io);
+}
+
+static void
+cfcs_done(union ctl_io *io)
+{
+ union ccb *ccb;
+ struct cfcs_softc *softc;
+ struct cam_sim *sim;
+
+ ccb = io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr;
+
+ sim = xpt_path_sim(ccb->ccb_h.path);
+ softc = (struct cfcs_softc *)cam_sim_softc(sim);
+
+ /*
+ * At this point we should have status. If we don't, that's a bug.
+ */
+ KASSERT(((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE),
+ ("invalid CTL status %#x", io->io_hdr.status));
+
+ /*
+ * Translate CTL status to CAM status.
+ */
+ switch (io->io_hdr.status & CTL_STATUS_MASK) {
+ case CTL_SUCCESS:
+ ccb->ccb_h.status = CAM_REQ_CMP;
+ break;
+ case CTL_SCSI_ERROR:
+ ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR | CAM_AUTOSNS_VALID;
+ ccb->csio.scsi_status = io->scsiio.scsi_status;
+ bcopy(&io->scsiio.sense_data, &ccb->csio.sense_data,
+ min(io->scsiio.sense_len, ccb->csio.sense_len));
+ if (ccb->csio.sense_len > io->scsiio.sense_len)
+ ccb->csio.sense_resid = ccb->csio.sense_len -
+ io->scsiio.sense_len;
+ else
+ ccb->csio.sense_resid = 0;
+ if ((ccb->csio.sense_len - ccb->csio.sense_resid) >
+ cfcs_max_sense) {
+ ccb->csio.sense_resid = ccb->csio.sense_len -
+ cfcs_max_sense;
+ }
+ break;
+ case CTL_CMD_ABORTED:
+ ccb->ccb_h.status = CAM_REQ_ABORTED;
+ break;
+ case CTL_ERROR:
+ default:
+ ccb->ccb_h.status = CAM_REQ_CMP_ERR;
+ break;
+ }
+
+ mtx_lock(sim->mtx);
+ xpt_done(ccb);
+ mtx_unlock(sim->mtx);
+
+ ctl_free_io(io);
+}
+
+void
+cfcs_action(struct cam_sim *sim, union ccb *ccb)
+{
+ struct cfcs_softc *softc;
+ int err;
+
+ softc = (struct cfcs_softc *)cam_sim_softc(sim);
+ mtx_assert(&softc->lock, MA_OWNED);
+
+ switch (ccb->ccb_h.func_code) {
+ case XPT_SCSI_IO: {
+ union ctl_io *io;
+ struct ccb_scsiio *csio;
+
+ csio = &ccb->csio;
+
+ /*
+ * Catch CCB flags, like physical address flags, that
+ * indicate situations we currently can't handle.
+ */
+ if (ccb->ccb_h.flags & CFCS_BAD_CCB_FLAGS) {
+ ccb->ccb_h.status = CAM_REQ_INVALID;
+ printf("%s: bad CCB flags %#x (all flags %#x)\n",
+ __func__, ccb->ccb_h.flags & CFCS_BAD_CCB_FLAGS,
+ ccb->ccb_h.flags);
+ xpt_done(ccb);
+ return;
+ }
+
+ /*
+ * If we aren't online, there are no devices to see.
+ */
+ if (softc->online == 0) {
+ ccb->ccb_h.status = CAM_DEV_NOT_THERE;
+ xpt_done(ccb);
+ return;
+ }
+
+ io = ctl_alloc_io(softc->fe.ctl_pool_ref);
+ if (io == NULL) {
+ printf("%s: can't allocate ctl_io\n", __func__);
+ ccb->ccb_h.status = CAM_BUSY | CAM_DEV_QFRZN;
+ xpt_freeze_devq(ccb->ccb_h.path, 1);
+ xpt_done(ccb);
+ return;
+ }
+ ctl_zero_io(io);
+ /* Save pointers on both sides */
+ io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = ccb;
+ ccb->ccb_h.io_ptr = io;
+
+ /*
+ * Only SCSI I/O comes down this path, resets, etc. come
+ * down via the XPT_RESET_BUS/LUN CCBs below.
+ */
+ io->io_hdr.io_type = CTL_IO_SCSI;
+ io->io_hdr.nexus.initid.id = 1;
+ io->io_hdr.nexus.targ_port = softc->fe.targ_port;
+ /*
+ * XXX KDM how do we handle target IDs?
+ */
+ io->io_hdr.nexus.targ_target.id = ccb->ccb_h.target_id;
+ io->io_hdr.nexus.targ_lun = ccb->ccb_h.target_lun;
+ /*
+ * This tag scheme isn't the best, since we could in theory
+ * have a very long-lived I/O and tag collision, especially
+ * in a high I/O environment. But it should work well
+ * enough for now. Since we're using unsigned ints,
+ * they'll just wrap around.
+ */
+ io->scsiio.tag_num = softc->cur_tag_num++;
+ csio->tag_id = io->scsiio.tag_num;
+ switch (csio->tag_action) {
+ case CAM_TAG_ACTION_NONE:
+ io->scsiio.tag_type = CTL_TAG_UNTAGGED;
+ break;
+ case MSG_SIMPLE_TASK:
+ io->scsiio.tag_type = CTL_TAG_SIMPLE;
+ break;
+ case MSG_HEAD_OF_QUEUE_TASK:
+ io->scsiio.tag_type = CTL_TAG_HEAD_OF_QUEUE;
+ break;
+ case MSG_ORDERED_TASK:
+ io->scsiio.tag_type = CTL_TAG_ORDERED;
+ break;
+ case MSG_ACA_TASK:
+ io->scsiio.tag_type = CTL_TAG_ACA;
+ break;
+ default:
+ io->scsiio.tag_type = CTL_TAG_UNTAGGED;
+ printf("%s: unhandled tag type %#x!!\n", __func__,
+ csio->tag_action);
+ break;
+ }
+ if (csio->cdb_len > sizeof(io->scsiio.cdb)) {
+ printf("%s: WARNING: CDB len %d > ctl_io space %zd\n",
+ __func__, csio->cdb_len, sizeof(io->scsiio.cdb));
+ }
+ io->scsiio.cdb_len = min(csio->cdb_len, sizeof(io->scsiio.cdb));
+ bcopy(csio->cdb_io.cdb_bytes, io->scsiio.cdb,
+ io->scsiio.cdb_len);
+
+ err = ctl_queue(io);
+ if (err != CTL_RETVAL_COMPLETE) {
+ printf("%s: func %d: error %d returned by "
+ "ctl_queue()!\n", __func__,
+ ccb->ccb_h.func_code, err);
+ ctl_free_io(io);
+ } else {
+ ccb->ccb_h.status |= CAM_SIM_QUEUED;
+ }
+ break;
+ }
+ case XPT_ABORT: {
+ union ctl_io *io;
+ union ccb *abort_ccb;
+
+ abort_ccb = ccb->cab.abort_ccb;
+
+ if (abort_ccb->ccb_h.func_code != XPT_SCSI_IO) {
+ ccb->ccb_h.status = CAM_REQ_INVALID;
+ xpt_done(ccb);
+ }
+
+ /*
+ * If we aren't online, there are no devices to talk to.
+ */
+ if (softc->online == 0) {
+ ccb->ccb_h.status = CAM_DEV_NOT_THERE;
+ xpt_done(ccb);
+ return;
+ }
+
+ io = ctl_alloc_io(softc->fe.ctl_pool_ref);
+ if (io == NULL) {
+ ccb->ccb_h.status = CAM_BUSY | CAM_DEV_QFRZN;
+ xpt_freeze_devq(ccb->ccb_h.path, 1);
+ xpt_done(ccb);
+ return;
+ }
+
+ ctl_zero_io(io);
+ /* Save pointers on both sides */
+ io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = ccb;
+ ccb->ccb_h.io_ptr = io;
+
+ io->io_hdr.io_type = CTL_IO_TASK;
+ io->io_hdr.nexus.initid.id = 1;
+ io->io_hdr.nexus.targ_port = softc->fe.targ_port;
+ io->io_hdr.nexus.targ_target.id = ccb->ccb_h.target_id;
+ io->io_hdr.nexus.targ_lun = ccb->ccb_h.target_lun;
+ io->taskio.task_action = CTL_TASK_ABORT_TASK;
+ io->taskio.tag_num = abort_ccb->csio.tag_id;
+ switch (abort_ccb->csio.tag_action) {
+ case CAM_TAG_ACTION_NONE:
+ io->taskio.tag_type = CTL_TAG_UNTAGGED;
+ break;
+ case MSG_SIMPLE_TASK:
+ io->taskio.tag_type = CTL_TAG_SIMPLE;
+ break;
+ case MSG_HEAD_OF_QUEUE_TASK:
+ io->taskio.tag_type = CTL_TAG_HEAD_OF_QUEUE;
+ break;
+ case MSG_ORDERED_TASK:
+ io->taskio.tag_type = CTL_TAG_ORDERED;
+ break;
+ case MSG_ACA_TASK:
+ io->taskio.tag_type = CTL_TAG_ACA;
+ break;
+ default:
+ io->taskio.tag_type = CTL_TAG_UNTAGGED;
+ printf("%s: unhandled tag type %#x!!\n", __func__,
+ abort_ccb->csio.tag_action);
+ break;
+ }
+ err = ctl_queue(io);
+ if (err != CTL_RETVAL_COMPLETE) {
+ printf("%s func %d: error %d returned by "
+ "ctl_queue()!\n", __func__,
+ ccb->ccb_h.func_code, err);
+ ctl_free_io(io);
+ }
+ break;
+ }
+ case XPT_GET_TRAN_SETTINGS: {
+ struct ccb_trans_settings *cts;
+ struct ccb_trans_settings_scsi *scsi;
+ struct ccb_trans_settings_fc *fc;
+
+ cts = &ccb->cts;
+ scsi = &cts->proto_specific.scsi;
+ fc = &cts->xport_specific.fc;
+
+
+ cts->protocol = PROTO_SCSI;
+ cts->protocol_version = SCSI_REV_SPC2;
+ cts->transport = XPORT_FC;
+ cts->transport_version = 0;
+
+ scsi->valid = CTS_SCSI_VALID_TQ;
+ scsi->flags = CTS_SCSI_FLAGS_TAG_ENB;
+ fc->valid = CTS_FC_VALID_SPEED;
+ fc->bitrate = 800000;
+ fc->wwnn = softc->wwnn;
+ fc->wwpn = softc->wwpn;
+ fc->port = softc->fe.targ_port;
+ fc->valid |= CTS_FC_VALID_WWNN | CTS_FC_VALID_WWPN |
+ CTS_FC_VALID_PORT;
+ ccb->ccb_h.status = CAM_REQ_CMP;
+ break;
+ }
+ case XPT_SET_TRAN_SETTINGS:
+ /* XXX KDM should we actually do something here? */
+ ccb->ccb_h.status = CAM_REQ_CMP;
+ break;
+ case XPT_RESET_BUS:
+ case XPT_RESET_DEV: {
+ union ctl_io *io;
+
+ /*
+ * If we aren't online, there are no devices to talk to.
+ */
+ if (softc->online == 0) {
+ ccb->ccb_h.status = CAM_DEV_NOT_THERE;
+ xpt_done(ccb);
+ return;
+ }
+
+ io = ctl_alloc_io(softc->fe.ctl_pool_ref);
+ if (io == NULL) {
+ ccb->ccb_h.status = CAM_BUSY | CAM_DEV_QFRZN;
+ xpt_freeze_devq(ccb->ccb_h.path, 1);
+ xpt_done(ccb);
+ return;
+ }
+
+ ctl_zero_io(io);
+ /* Save pointers on both sides */
+ io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = ccb;
+ ccb->ccb_h.io_ptr = io;
+
+ io->io_hdr.io_type = CTL_IO_TASK;
+ io->io_hdr.nexus.initid.id = 0;
+ io->io_hdr.nexus.targ_port = softc->fe.targ_port;
+ io->io_hdr.nexus.targ_target.id = ccb->ccb_h.target_id;
+ io->io_hdr.nexus.targ_lun = ccb->ccb_h.target_lun;
+ if (ccb->ccb_h.func_code == XPT_RESET_BUS)
+ io->taskio.task_action = CTL_TASK_BUS_RESET;
+ else
+ io->taskio.task_action = CTL_TASK_LUN_RESET;
+
+ err = ctl_queue(io);
+ if (err != CTL_RETVAL_COMPLETE) {
+ printf("%s func %d: error %d returned by "
+ "ctl_queue()!\n", __func__,
+ ccb->ccb_h.func_code, err);
+ ctl_free_io(io);
+ }
+ break;
+ }
+ case XPT_CALC_GEOMETRY:
+ cam_calc_geometry(&ccb->ccg, 1);
+ xpt_done(ccb);
+ break;
+ case XPT_PATH_INQ: {
+ struct ccb_pathinq *cpi;
+
+ cpi = &ccb->cpi;
+
+ cpi->version_num = 0;
+ cpi->hba_inquiry = PI_TAG_ABLE;
+ cpi->target_sprt = 0;
+ cpi->hba_misc = 0;
+ cpi->hba_eng_cnt = 0;
+ cpi->max_target = 1;
+ cpi->max_lun = 1024;
+ /* Do we really have a limit? */
+ cpi->maxio = 1024 * 1024;
+ cpi->async_flags = 0;
+ cpi->hpath_id = 0;
+ cpi->initiator_id = 0;
+
+ strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN);
+ strncpy(cpi->hba_vid, "FreeBSD", HBA_IDLEN);
+ strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN);
+ cpi->unit_number = 0;
+ cpi->bus_id = 0;
+ cpi->base_transfer_speed = 800000;
+ cpi->protocol = PROTO_SCSI;
+ cpi->protocol_version = SCSI_REV_SPC2;
+ /*
+ * Pretend to be Fibre Channel.
+ */
+ cpi->transport = XPORT_FC;
+ cpi->transport_version = 0;
+ cpi->xport_specific.fc.wwnn = softc->wwnn;
+ cpi->xport_specific.fc.wwpn = softc->wwpn;
+ cpi->xport_specific.fc.port = softc->fe.targ_port;
+ cpi->xport_specific.fc.bitrate = 8 * 1000 * 1000;
+ cpi->ccb_h.status = CAM_REQ_CMP;
+ break;
+ }
+ default:
+ ccb->ccb_h.status = CAM_PROVIDE_FAIL;
+ printf("%s: unsupported CCB type %#x\n", __func__,
+ ccb->ccb_h.func_code);
+ xpt_done(ccb);
+ break;
+ }
+}
+
+static void
+cfcs_async(void *callback_arg, uint32_t code, struct cam_path *path, void *arg)
+{
+
+}
diff --git a/sys/cam/ctl/ctl_frontend_internal.c b/sys/cam/ctl/ctl_frontend_internal.c
new file mode 100644
index 0000000..6653ed1
--- /dev/null
+++ b/sys/cam/ctl/ctl_frontend_internal.c
@@ -0,0 +1,1782 @@
+/*-
+ * Copyright (c) 2004, 2005 Silicon Graphics International Corp.
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_frontend_internal.c#5 $
+ */
+/*
+ * CTL kernel internal frontend target driver. This allows kernel-level
+ * clients to send commands into CTL.
+ *
+ * This has elements of a FETD (e.g. it has to set tag numbers, initiator,
+ * port, target, and LUN) and elements of an initiator (LUN discovery and
+ * probing, error recovery, command initiation). Even though this has some
+ * initiator type elements, this is not intended to be a full fledged
+ * initiator layer. It is only intended to send a limited number of
+ * commands to a well known target layer.
+ *
+ * To be able to fulfill the role of a full initiator layer, it would need
+ * a whole lot more functionality.
+ *
+ * Author: Ken Merry <ken@FreeBSD.org>
+ *
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/kernel.h>
+#include <sys/types.h>
+#include <sys/malloc.h>
+#include <sys/lock.h>
+#include <sys/mutex.h>
+#include <sys/condvar.h>
+#include <sys/queue.h>
+#include <sys/sbuf.h>
+#include <cam/scsi/scsi_all.h>
+#include <cam/scsi/scsi_da.h>
+#include <cam/ctl/ctl_io.h>
+#include <cam/ctl/ctl.h>
+#include <cam/ctl/ctl_frontend.h>
+#include <cam/ctl/ctl_frontend_internal.h>
+#include <cam/ctl/ctl_backend.h>
+#include <cam/ctl/ctl_ioctl.h>
+#include <cam/ctl/ctl_util.h>
+#include <cam/ctl/ctl_ha.h>
+#include <cam/ctl/ctl_private.h>
+#include <cam/ctl/ctl_mem_pool.h>
+#include <cam/ctl/ctl_debug.h>
+#include <cam/ctl/ctl_scsi_all.h>
+#include <cam/ctl/ctl_error.h>
+
+/*
+ * Task structure:
+ * - overall metatask, different potential metatask types (e.g. forced
+ * shutdown, gentle shutdown)
+ * - forced shutdown metatask:
+ * - states: report luns, pending, done?
+ * - list of luns pending, with the relevant I/O for that lun attached.
+ * This would allow moving ahead on LUNs with no errors, and going
+ * into error recovery on LUNs with problems. Per-LUN states might
+ * include inquiry, stop/offline, done.
+ *
+ * Use LUN enable for LUN list instead of getting it manually? We'd still
+ * need inquiry data for each LUN.
+ *
+ * How to handle processor LUN w.r.t. found/stopped counts?
+ */
+#ifdef oldapi
+typedef enum {
+ CFI_TASK_NONE,
+ CFI_TASK_SHUTDOWN,
+ CFI_TASK_STARTUP
+} cfi_tasktype;
+
+struct cfi_task_startstop {
+ int total_luns;
+ int luns_complete;
+ int luns_failed;
+ cfi_cb_t callback;
+ void *callback_arg;
+ /* XXX KDM add more fields here */
+};
+
+union cfi_taskinfo {
+ struct cfi_task_startstop startstop;
+};
+
+struct cfi_metatask {
+ cfi_tasktype tasktype;
+ cfi_mt_status status;
+ union cfi_taskinfo taskinfo;
+ struct ctl_mem_element *element;
+ void *cfi_context;
+ STAILQ_ENTRY(cfi_metatask) links;
+};
+#endif
+
+typedef enum {
+ CFI_ERR_RETRY = 0x000,
+ CFI_ERR_FAIL = 0x001,
+ CFI_ERR_LUN_RESET = 0x002,
+ CFI_ERR_MASK = 0x0ff,
+ CFI_ERR_NO_DECREMENT = 0x100
+} cfi_error_action;
+
+typedef enum {
+ CFI_ERR_SOFT,
+ CFI_ERR_HARD
+} cfi_error_policy;
+
+typedef enum {
+ CFI_LUN_INQUIRY,
+ CFI_LUN_READCAPACITY,
+ CFI_LUN_READCAPACITY_16,
+ CFI_LUN_READY
+} cfi_lun_state;
+
+struct cfi_lun {
+ struct ctl_id target_id;
+ int lun_id;
+ struct scsi_inquiry_data inq_data;
+ uint64_t num_blocks;
+ uint32_t blocksize;
+ int blocksize_powerof2;
+ uint32_t cur_tag_num;
+ cfi_lun_state state;
+ struct ctl_mem_element *element;
+ struct cfi_softc *softc;
+ STAILQ_HEAD(, cfi_lun_io) io_list;
+ STAILQ_ENTRY(cfi_lun) links;
+};
+
+struct cfi_lun_io {
+ struct cfi_lun *lun;
+ struct cfi_metatask *metatask;
+ cfi_error_policy policy;
+ void (*done_function)(union ctl_io *io);
+ union ctl_io *ctl_io;
+ struct cfi_lun_io *orig_lun_io;
+ STAILQ_ENTRY(cfi_lun_io) links;
+};
+
+typedef enum {
+ CFI_NONE = 0x00,
+ CFI_ONLINE = 0x01,
+} cfi_flags;
+
+struct cfi_softc {
+ struct ctl_frontend fe;
+ char fe_name[40];
+ struct mtx lock;
+ cfi_flags flags;
+ STAILQ_HEAD(, cfi_lun) lun_list;
+ STAILQ_HEAD(, cfi_metatask) metatask_list;
+ struct ctl_mem_pool lun_pool;
+ struct ctl_mem_pool metatask_pool;
+};
+
+MALLOC_DEFINE(M_CTL_CFI, "ctlcfi", "CTL CFI");
+
+static struct cfi_softc fetd_internal_softc;
+
+void cfi_init(void);
+void cfi_shutdown(void) __unused;
+static void cfi_online(void *arg);
+static void cfi_offline(void *arg);
+static int cfi_targ_enable(void *arg, struct ctl_id targ_id);
+static int cfi_targ_disable(void *arg, struct ctl_id targ_id);
+static int cfi_lun_enable(void *arg, struct ctl_id target_id, int lun_id);
+static int cfi_lun_disable(void *arg, struct ctl_id target_id, int lun_id);
+static void cfi_datamove(union ctl_io *io);
+static cfi_error_action cfi_checkcond_parse(union ctl_io *io,
+ struct cfi_lun_io *lun_io);
+static cfi_error_action cfi_error_parse(union ctl_io *io,
+ struct cfi_lun_io *lun_io);
+static void cfi_init_io(union ctl_io *io, struct cfi_lun *lun,
+ struct cfi_metatask *metatask, cfi_error_policy policy,
+ int retries, struct cfi_lun_io *orig_lun_io,
+ void (*done_function)(union ctl_io *io));
+static void cfi_done(union ctl_io *io);
+static void cfi_lun_probe_done(union ctl_io *io);
+static void cfi_lun_probe(struct cfi_lun *lun, int have_lock);
+static void cfi_metatask_done(struct cfi_softc *softc,
+ struct cfi_metatask *metatask);
+static void cfi_metatask_bbr_errorparse(struct cfi_metatask *metatask,
+ union ctl_io *io);
+static void cfi_metatask_io_done(union ctl_io *io);
+static void cfi_err_recovery_done(union ctl_io *io);
+static void cfi_lun_io_done(union ctl_io *io);
+
+SYSINIT(cfi_init, SI_SUB_CONFIGURE, SI_ORDER_FOURTH, cfi_init, NULL);
+
+void
+cfi_init(void)
+{
+ struct cfi_softc *softc;
+ struct ctl_frontend *fe;
+ int retval;
+
+ softc = &fetd_internal_softc;
+
+ fe = &softc->fe;
+
+ retval = 0;
+
+ if (sizeof(struct cfi_lun_io) > CTL_PORT_PRIV_SIZE) {
+ printf("%s: size of struct cfi_lun_io %zd > "
+ "CTL_PORT_PRIV_SIZE %d\n", __func__,
+ sizeof(struct cfi_lun_io),
+ CTL_PORT_PRIV_SIZE);
+ }
+ memset(softc, 0, sizeof(softc));
+
+ mtx_init(&softc->lock, "CTL frontend mutex", NULL, MTX_DEF);
+ softc->flags |= CTL_FLAG_MASTER_SHELF;
+
+ STAILQ_INIT(&softc->lun_list);
+ STAILQ_INIT(&softc->metatask_list);
+ sprintf(softc->fe_name, "CTL internal");
+ fe->port_type = CTL_PORT_INTERNAL;
+ fe->num_requested_ctl_io = 100;
+ fe->port_name = softc->fe_name;
+ fe->port_online = cfi_online;
+ fe->port_offline = cfi_offline;
+ fe->onoff_arg = softc;
+ fe->targ_enable = cfi_targ_enable;
+ fe->targ_disable = cfi_targ_disable;
+ fe->lun_enable = cfi_lun_enable;
+ fe->lun_disable = cfi_lun_disable;
+ fe->targ_lun_arg = softc;
+ fe->fe_datamove = cfi_datamove;
+ fe->fe_done = cfi_done;
+ fe->max_targets = 15;
+ fe->max_target_id = 15;
+
+ if (ctl_frontend_register(fe, (softc->flags & CTL_FLAG_MASTER_SHELF)) != 0)
+ {
+ printf("%s: internal frontend registration failed\n", __func__);
+ retval = 1;
+ goto bailout;
+ }
+
+ if (ctl_init_mem_pool(&softc->lun_pool,
+ sizeof(struct cfi_lun),
+ CTL_MEM_POOL_PERM_GROW, /*grow_inc*/ 3,
+ /* initial_pool_size */ CTL_MAX_LUNS) != 0) {
+ printf("%s: can't initialize LUN memory pool\n", __func__);
+ retval = 1;
+ goto bailout_error;
+ }
+
+ if (ctl_init_mem_pool(&softc->metatask_pool,
+ sizeof(struct cfi_metatask),
+ CTL_MEM_POOL_PERM_GROW, /*grow_inc*/ 3,
+ /*initial_pool_size*/ 10) != 0) {
+ printf("%s: can't initialize metatask memory pool\n", __func__);
+ retval = 2;
+ goto bailout_error;
+ }
+bailout:
+
+ return;
+
+bailout_error:
+
+ switch (retval) {
+ case 3:
+ ctl_shrink_mem_pool(&softc->metatask_pool);
+ /* FALLTHROUGH */
+ case 2:
+ ctl_shrink_mem_pool(&softc->lun_pool);
+ /* FALLTHROUGH */
+ case 1:
+ ctl_frontend_deregister(fe);
+ break;
+ default:
+ break;
+ }
+}
+
+void
+cfi_shutdown(void)
+{
+ struct cfi_softc *softc;
+
+ softc = &fetd_internal_softc;
+
+ /*
+ * XXX KDM need to clear out any I/O pending on each LUN.
+ */
+ if (ctl_frontend_deregister(&softc->fe) != 0)
+ printf("%s: ctl_frontend_deregister() failed\n", __func__);
+
+ if (ctl_shrink_mem_pool(&softc->lun_pool) != 0)
+ printf("%s: error shrinking LUN pool\n", __func__);
+
+ if (ctl_shrink_mem_pool(&softc->metatask_pool) != 0)
+ printf("%s: error shrinking LUN pool\n", __func__);
+}
+
+static void
+cfi_online(void *arg)
+{
+ struct cfi_softc *softc;
+ struct cfi_lun *lun;
+
+ softc = (struct cfi_softc *)arg;
+
+ softc->flags |= CFI_ONLINE;
+
+ /*
+ * Go through and kick off the probe for each lun. Should we check
+ * the LUN flags here to determine whether or not to probe it?
+ */
+ mtx_lock(&softc->lock);
+ STAILQ_FOREACH(lun, &softc->lun_list, links)
+ cfi_lun_probe(lun, /*have_lock*/ 1);
+ mtx_unlock(&softc->lock);
+}
+
+static void
+cfi_offline(void *arg)
+{
+ struct cfi_softc *softc;
+
+ softc = (struct cfi_softc *)arg;
+
+ softc->flags &= ~CFI_ONLINE;
+}
+
+static int
+cfi_targ_enable(void *arg, struct ctl_id targ_id)
+{
+ return (0);
+}
+
+static int
+cfi_targ_disable(void *arg, struct ctl_id targ_id)
+{
+ return (0);
+}
+
+static int
+cfi_lun_enable(void *arg, struct ctl_id target_id, int lun_id)
+{
+ struct ctl_mem_element *element;
+ struct cfi_softc *softc;
+ struct cfi_lun *lun;
+ int found;
+
+ softc = (struct cfi_softc *)arg;
+
+ found = 0;
+ mtx_lock(&softc->lock);
+ STAILQ_FOREACH(lun, &softc->lun_list, links) {
+ if ((lun->target_id.id == target_id.id)
+ && (lun->lun_id == lun_id)) {
+ found = 1;
+ break;
+ }
+ }
+ mtx_unlock(&softc->lock);
+
+ /*
+ * If we already have this target/LUN, there is no reason to add
+ * it to our lists again.
+ */
+ if (found != 0)
+ return (0);
+
+ element = ctl_alloc_mem_element(&softc->lun_pool, /*can_wait*/ 0);
+
+ if (element == NULL) {
+ printf("%s: unable to allocate LUN structure\n", __func__);
+ return (1);
+ }
+
+ lun = (struct cfi_lun *)element->bytes;
+
+ lun->element = element;
+ lun->target_id = target_id;
+ lun->lun_id = lun_id;
+ lun->cur_tag_num = 0;
+ lun->state = CFI_LUN_INQUIRY;
+ lun->softc = softc;
+ STAILQ_INIT(&lun->io_list);
+
+ mtx_lock(&softc->lock);
+ STAILQ_INSERT_TAIL(&softc->lun_list, lun, links);
+ mtx_unlock(&softc->lock);
+
+ cfi_lun_probe(lun, /*have_lock*/ 0);
+
+ return (0);
+}
+
+static int
+cfi_lun_disable(void *arg, struct ctl_id target_id, int lun_id)
+{
+ struct cfi_softc *softc;
+ struct cfi_lun *lun;
+ int found;
+
+ softc = (struct cfi_softc *)arg;
+
+ found = 0;
+
+ /*
+ * XXX KDM need to do an invalidate and then a free when any
+ * pending I/O has completed. Or do we? CTL won't free a LUN
+ * while any I/O is pending. So we won't get this notification
+ * unless any I/O we have pending on a LUN has completed.
+ */
+ mtx_lock(&softc->lock);
+ STAILQ_FOREACH(lun, &softc->lun_list, links) {
+ if ((lun->target_id.id == target_id.id)
+ && (lun->lun_id == lun_id)) {
+ found = 1;
+ break;
+ }
+ }
+ if (found != 0)
+ STAILQ_REMOVE(&softc->lun_list, lun, cfi_lun, links);
+
+ mtx_unlock(&softc->lock);
+
+ if (found == 0) {
+ printf("%s: can't find target %ju lun %d\n", __func__,
+ (uintmax_t)target_id.id, lun_id);
+ return (1);
+ }
+
+ ctl_free_mem_element(lun->element);
+
+ return (0);
+}
+
+/*
+ * XXX KDM run this inside a thread, or inside the caller's context?
+ */
+static void
+cfi_datamove(union ctl_io *io)
+{
+ struct ctl_sg_entry *ext_sglist, *kern_sglist;
+ struct ctl_sg_entry ext_entry, kern_entry;
+ int ext_sglen, ext_sg_entries, kern_sg_entries;
+ int ext_sg_start, ext_offset;
+ int len_to_copy, len_copied;
+ int kern_watermark, ext_watermark;
+ int ext_sglist_malloced;
+ struct ctl_scsiio *ctsio;
+ int i, j;
+
+ ext_sglist_malloced = 0;
+ ext_sg_start = 0;
+ ext_offset = 0;
+ ext_sglist = NULL;
+
+ CTL_DEBUG_PRINT(("%s\n", __func__));
+
+ ctsio = &io->scsiio;
+
+ /*
+ * If this is the case, we're probably doing a BBR read and don't
+ * actually need to transfer the data. This will effectively
+ * bit-bucket the data.
+ */
+ if (ctsio->ext_data_ptr == NULL)
+ goto bailout;
+
+ /*
+ * To simplify things here, if we have a single buffer, stick it in
+ * a S/G entry and just make it a single entry S/G list.
+ */
+ if (ctsio->io_hdr.flags & CTL_FLAG_EDPTR_SGLIST) {
+ int len_seen;
+
+ ext_sglen = ctsio->ext_sg_entries * sizeof(*ext_sglist);
+
+ /*
+ * XXX KDM GFP_KERNEL, don't know what the caller's context
+ * is. Need to figure that out.
+ */
+ ext_sglist = (struct ctl_sg_entry *)malloc(ext_sglen, M_CTL_CFI,
+ M_WAITOK);
+ if (ext_sglist == NULL) {
+ ctl_set_internal_failure(ctsio,
+ /*sks_valid*/ 0,
+ /*retry_count*/ 0);
+ return;
+ }
+ ext_sglist_malloced = 1;
+ if (memcpy(ext_sglist, ctsio->ext_data_ptr, ext_sglen) != 0) {
+ ctl_set_internal_failure(ctsio,
+ /*sks_valid*/ 0,
+ /*retry_count*/ 0);
+ goto bailout;
+ }
+ ext_sg_entries = ctsio->ext_sg_entries;
+ len_seen = 0;
+ for (i = 0; i < ext_sg_entries; i++) {
+ if ((len_seen + ext_sglist[i].len) >=
+ ctsio->ext_data_filled) {
+ ext_sg_start = i;
+ ext_offset = ctsio->ext_data_filled - len_seen;
+ break;
+ }
+ len_seen += ext_sglist[i].len;
+ }
+ } else {
+ ext_sglist = &ext_entry;
+ ext_sglist->addr = ctsio->ext_data_ptr;
+ ext_sglist->len = ctsio->ext_data_len;
+ ext_sg_entries = 1;
+ ext_sg_start = 0;
+ ext_offset = ctsio->ext_data_filled;
+ }
+
+ if (ctsio->kern_sg_entries > 0) {
+ kern_sglist = (struct ctl_sg_entry *)ctsio->kern_data_ptr;
+ kern_sg_entries = ctsio->kern_sg_entries;
+ } else {
+ kern_sglist = &kern_entry;
+ kern_sglist->addr = ctsio->kern_data_ptr;
+ kern_sglist->len = ctsio->kern_data_len;
+ kern_sg_entries = 1;
+ }
+
+
+ kern_watermark = 0;
+ ext_watermark = ext_offset;
+ len_copied = 0;
+ for (i = ext_sg_start, j = 0;
+ i < ext_sg_entries && j < kern_sg_entries;) {
+ uint8_t *ext_ptr, *kern_ptr;
+
+ len_to_copy = ctl_min(ext_sglist[i].len - ext_watermark,
+ kern_sglist[j].len - kern_watermark);
+
+ ext_ptr = (uint8_t *)ext_sglist[i].addr;
+ ext_ptr = ext_ptr + ext_watermark;
+ if (io->io_hdr.flags & CTL_FLAG_BUS_ADDR) {
+ /*
+ * XXX KDM fix this!
+ */
+ panic("need to implement bus address support");
+#if 0
+ kern_ptr = bus_to_virt(kern_sglist[j].addr);
+#endif
+ } else
+ kern_ptr = (uint8_t *)kern_sglist[j].addr;
+ kern_ptr = kern_ptr + kern_watermark;
+
+ kern_watermark += len_to_copy;
+ ext_watermark += len_to_copy;
+
+ if ((ctsio->io_hdr.flags & CTL_FLAG_DATA_MASK) ==
+ CTL_FLAG_DATA_IN) {
+ CTL_DEBUG_PRINT(("%s: copying %d bytes to user\n",
+ __func__, len_to_copy));
+ CTL_DEBUG_PRINT(("%s: from %p to %p\n", __func__,
+ kern_ptr, ext_ptr));
+ memcpy(ext_ptr, kern_ptr, len_to_copy);
+ } else {
+ CTL_DEBUG_PRINT(("%s: copying %d bytes from user\n",
+ __func__, len_to_copy));
+ CTL_DEBUG_PRINT(("%s: from %p to %p\n", __func__,
+ ext_ptr, kern_ptr));
+ memcpy(kern_ptr, ext_ptr, len_to_copy);
+ }
+
+ len_copied += len_to_copy;
+
+ if (ext_sglist[i].len == ext_watermark) {
+ i++;
+ ext_watermark = 0;
+ }
+
+ if (kern_sglist[j].len == kern_watermark) {
+ j++;
+ kern_watermark = 0;
+ }
+ }
+
+ ctsio->ext_data_filled += len_copied;
+
+ CTL_DEBUG_PRINT(("%s: ext_sg_entries: %d, kern_sg_entries: %d\n",
+ __func__, ext_sg_entries, kern_sg_entries));
+ CTL_DEBUG_PRINT(("%s: ext_data_len = %d, kern_data_len = %d\n",
+ __func__, ctsio->ext_data_len, ctsio->kern_data_len));
+
+
+ /* XXX KDM set residual?? */
+bailout:
+
+ if (ext_sglist_malloced != 0)
+ free(ext_sglist, M_CTL_CFI);
+
+ io->scsiio.be_move_done(io);
+
+ return;
+}
+
+/*
+ * For any sort of check condition, busy, etc., we just retry. We do not
+ * decrement the retry count for unit attention type errors. These are
+ * normal, and we want to save the retry count for "real" errors. Otherwise,
+ * we could end up with situations where a command will succeed in some
+ * situations and fail in others, depending on whether a unit attention is
+ * pending. Also, some of our error recovery actions, most notably the
+ * LUN reset action, will cause a unit attention.
+ *
+ * We can add more detail here later if necessary.
+ */
+static cfi_error_action
+cfi_checkcond_parse(union ctl_io *io, struct cfi_lun_io *lun_io)
+{
+ cfi_error_action error_action;
+ int error_code, sense_key, asc, ascq;
+
+ /*
+ * Default to retrying the command.
+ */
+ error_action = CFI_ERR_RETRY;
+
+ scsi_extract_sense_len(&io->scsiio.sense_data,
+ io->scsiio.sense_len,
+ &error_code,
+ &sense_key,
+ &asc,
+ &ascq,
+ /*show_errors*/ 1);
+
+ switch (error_code) {
+ case SSD_DEFERRED_ERROR:
+ case SSD_DESC_DEFERRED_ERROR:
+ error_action |= CFI_ERR_NO_DECREMENT;
+ break;
+ case SSD_CURRENT_ERROR:
+ case SSD_DESC_CURRENT_ERROR:
+ default: {
+ switch (sense_key) {
+ case SSD_KEY_UNIT_ATTENTION:
+ error_action |= CFI_ERR_NO_DECREMENT;
+ break;
+ case SSD_KEY_HARDWARE_ERROR:
+ /*
+ * This is our generic "something bad happened"
+ * error code. It often isn't recoverable.
+ */
+ if ((asc == 0x44) && (ascq == 0x00))
+ error_action = CFI_ERR_FAIL;
+ break;
+ case SSD_KEY_NOT_READY:
+ /*
+ * If the LUN is powered down, there likely isn't
+ * much point in retrying right now.
+ */
+ if ((asc == 0x04) && (ascq == 0x02))
+ error_action = CFI_ERR_FAIL;
+ /*
+ * If the LUN is offline, there probably isn't much
+ * point in retrying, either.
+ */
+ if ((asc == 0x04) && (ascq == 0x03))
+ error_action = CFI_ERR_FAIL;
+ break;
+ }
+ }
+ }
+
+ return (error_action);
+}
+
+static cfi_error_action
+cfi_error_parse(union ctl_io *io, struct cfi_lun_io *lun_io)
+{
+ cfi_error_action error_action;
+
+ error_action = CFI_ERR_RETRY;
+
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ switch (io->io_hdr.status & CTL_STATUS_MASK) {
+ case CTL_SCSI_ERROR:
+ switch (io->scsiio.scsi_status) {
+ case SCSI_STATUS_RESERV_CONFLICT:
+ /*
+ * For a reservation conflict, we'll usually
+ * want the hard error recovery policy, so
+ * we'll reset the LUN.
+ */
+ if (lun_io->policy == CFI_ERR_HARD)
+ error_action =
+ CFI_ERR_LUN_RESET;
+ else
+ error_action =
+ CFI_ERR_RETRY;
+ break;
+ case SCSI_STATUS_CHECK_COND:
+ default:
+ error_action = cfi_checkcond_parse(io, lun_io);
+ break;
+ }
+ break;
+ default:
+ error_action = CFI_ERR_RETRY;
+ break;
+ }
+ break;
+ case CTL_IO_TASK:
+ /*
+ * In theory task management commands shouldn't fail...
+ */
+ error_action = CFI_ERR_RETRY;
+ break;
+ default:
+ printf("%s: invalid ctl_io type %d\n", __func__,
+ io->io_hdr.io_type);
+ panic("%s: invalid ctl_io type %d\n", __func__,
+ io->io_hdr.io_type);
+ break;
+ }
+
+ return (error_action);
+}
+
+static void
+cfi_init_io(union ctl_io *io, struct cfi_lun *lun,
+ struct cfi_metatask *metatask, cfi_error_policy policy, int retries,
+ struct cfi_lun_io *orig_lun_io,
+ void (*done_function)(union ctl_io *io))
+{
+ struct cfi_lun_io *lun_io;
+
+ io->io_hdr.nexus.initid.id = 7;
+ io->io_hdr.nexus.targ_port = lun->softc->fe.targ_port;
+ io->io_hdr.nexus.targ_target.id = lun->target_id.id;
+ io->io_hdr.nexus.targ_lun = lun->lun_id;
+ io->io_hdr.retries = retries;
+ lun_io = (struct cfi_lun_io *)io->io_hdr.port_priv;
+ io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = lun_io;
+ lun_io->lun = lun;
+ lun_io->metatask = metatask;
+ lun_io->ctl_io = io;
+ lun_io->policy = policy;
+ lun_io->orig_lun_io = orig_lun_io;
+ lun_io->done_function = done_function;
+ /*
+ * We only set the tag number for SCSI I/Os. For task management
+ * commands, the tag number is only really needed for aborts, so
+ * the caller can set it if necessary.
+ */
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ io->scsiio.tag_num = lun->cur_tag_num++;
+ break;
+ case CTL_IO_TASK:
+ default:
+ break;
+ }
+}
+
+static void
+cfi_done(union ctl_io *io)
+{
+ struct cfi_lun_io *lun_io;
+ struct cfi_softc *softc;
+ struct cfi_lun *lun;
+
+ lun_io = (struct cfi_lun_io *)
+ io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr;
+
+ lun = lun_io->lun;
+ softc = lun->softc;
+
+ /*
+ * Very minimal retry logic. We basically retry if we got an error
+ * back, and the retry count is greater than 0. If we ever want
+ * more sophisticated initiator type behavior, the CAM error
+ * recovery code in ../common might be helpful.
+ */
+ if (((io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS)
+ && (io->io_hdr.retries > 0)) {
+ ctl_io_status old_status;
+ cfi_error_action error_action;
+
+ error_action = cfi_error_parse(io, lun_io);
+
+ switch (error_action & CFI_ERR_MASK) {
+ case CFI_ERR_FAIL:
+ goto done;
+ break; /* NOTREACHED */
+ case CFI_ERR_LUN_RESET: {
+ union ctl_io *new_io;
+ struct cfi_lun_io *new_lun_io;
+
+ new_io = ctl_alloc_io(softc->fe.ctl_pool_ref);
+ if (new_io == NULL) {
+ printf("%s: unable to allocate ctl_io for "
+ "error recovery\n", __func__);
+ goto done;
+ }
+ ctl_zero_io(new_io);
+
+ new_io->io_hdr.io_type = CTL_IO_TASK;
+ new_io->taskio.task_action = CTL_TASK_LUN_RESET;
+
+ cfi_init_io(new_io,
+ /*lun*/ lun_io->lun,
+ /*metatask*/ NULL,
+ /*policy*/ CFI_ERR_SOFT,
+ /*retries*/ 0,
+ /*orig_lun_io*/lun_io,
+ /*done_function*/ cfi_err_recovery_done);
+
+
+ new_lun_io = (struct cfi_lun_io *)
+ new_io->io_hdr.port_priv;
+
+ mtx_lock(&lun->softc->lock);
+ STAILQ_INSERT_TAIL(&lun->io_list, new_lun_io, links);
+ mtx_unlock(&lun->softc->lock);
+
+ io = new_io;
+ break;
+ }
+ case CFI_ERR_RETRY:
+ default:
+ if ((error_action & CFI_ERR_NO_DECREMENT) == 0)
+ io->io_hdr.retries--;
+ break;
+ }
+
+ old_status = io->io_hdr.status;
+ io->io_hdr.status = CTL_STATUS_NONE;
+#if 0
+ io->io_hdr.flags &= ~CTL_FLAG_ALREADY_DONE;
+#endif
+ io->io_hdr.flags &= ~CTL_FLAG_ABORT;
+ io->io_hdr.flags &= ~CTL_FLAG_SENT_2OTHER_SC;
+
+ if (ctl_queue(io) != CTL_RETVAL_COMPLETE) {
+ printf("%s: error returned from ctl_queue()!\n",
+ __func__);
+ io->io_hdr.status = old_status;
+ } else
+ return;
+ }
+done:
+ lun_io->done_function(io);
+}
+
+static void
+cfi_lun_probe_done(union ctl_io *io)
+{
+ struct cfi_lun *lun;
+ struct cfi_lun_io *lun_io;
+
+ lun_io = (struct cfi_lun_io *)
+ io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr;
+ lun = lun_io->lun;
+
+ switch (lun->state) {
+ case CFI_LUN_INQUIRY: {
+ if ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS) {
+ /* print out something here?? */
+ printf("%s: LUN %d probe failed because inquiry "
+ "failed\n", __func__, lun->lun_id);
+ ctl_io_error_print(io, NULL);
+ } else {
+
+ if (SID_TYPE(&lun->inq_data) != T_DIRECT) {
+ char path_str[40];
+
+ lun->state = CFI_LUN_READY;
+ ctl_scsi_path_string(io, path_str,
+ sizeof(path_str));
+ printf("%s", path_str);
+ scsi_print_inquiry(&lun->inq_data);
+ } else {
+ lun->state = CFI_LUN_READCAPACITY;
+ cfi_lun_probe(lun, /*have_lock*/ 0);
+ }
+ }
+ mtx_lock(&lun->softc->lock);
+ STAILQ_REMOVE(&lun->io_list, lun_io, cfi_lun_io, links);
+ mtx_unlock(&lun->softc->lock);
+ ctl_free_io(io);
+ break;
+ }
+ case CFI_LUN_READCAPACITY:
+ case CFI_LUN_READCAPACITY_16: {
+ uint64_t maxlba;
+ uint32_t blocksize;
+
+ maxlba = 0;
+ blocksize = 0;
+
+ if ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS) {
+ printf("%s: LUN %d probe failed because READ CAPACITY "
+ "failed\n", __func__, lun->lun_id);
+ ctl_io_error_print(io, NULL);
+ } else {
+
+ if (lun->state == CFI_LUN_READCAPACITY) {
+ struct scsi_read_capacity_data *rdcap;
+
+ rdcap = (struct scsi_read_capacity_data *)
+ io->scsiio.ext_data_ptr;
+
+ maxlba = scsi_4btoul(rdcap->addr);
+ blocksize = scsi_4btoul(rdcap->length);
+ if (blocksize == 0) {
+ printf("%s: LUN %d has invalid "
+ "blocksize 0, probe aborted\n",
+ __func__, lun->lun_id);
+ } else if (maxlba == 0xffffffff) {
+ lun->state = CFI_LUN_READCAPACITY_16;
+ cfi_lun_probe(lun, /*have_lock*/ 0);
+ } else
+ lun->state = CFI_LUN_READY;
+ } else {
+ struct scsi_read_capacity_data_long *rdcap_long;
+
+ rdcap_long = (struct
+ scsi_read_capacity_data_long *)
+ io->scsiio.ext_data_ptr;
+ maxlba = scsi_8btou64(rdcap_long->addr);
+ blocksize = scsi_4btoul(rdcap_long->length);
+
+ if (blocksize == 0) {
+ printf("%s: LUN %d has invalid "
+ "blocksize 0, probe aborted\n",
+ __func__, lun->lun_id);
+ } else
+ lun->state = CFI_LUN_READY;
+ }
+ }
+
+ if (lun->state == CFI_LUN_READY) {
+ char path_str[40];
+
+ lun->num_blocks = maxlba + 1;
+ lun->blocksize = blocksize;
+
+ /*
+ * If this is true, the blocksize is a power of 2.
+ * We already checked for 0 above.
+ */
+ if (((blocksize - 1) & blocksize) == 0) {
+ int i;
+
+ for (i = 0; i < 32; i++) {
+ if ((blocksize & (1 << i)) != 0) {
+ lun->blocksize_powerof2 = i;
+ break;
+ }
+ }
+ }
+ ctl_scsi_path_string(io, path_str,sizeof(path_str));
+ printf("%s", path_str);
+ scsi_print_inquiry(&lun->inq_data);
+ printf("%s %ju blocks, blocksize %d\n", path_str,
+ (uintmax_t)maxlba + 1, blocksize);
+ }
+ mtx_lock(&lun->softc->lock);
+ STAILQ_REMOVE(&lun->io_list, lun_io, cfi_lun_io, links);
+ mtx_unlock(&lun->softc->lock);
+ free(io->scsiio.ext_data_ptr, M_CTL_CFI);
+ ctl_free_io(io);
+ break;
+ }
+ case CFI_LUN_READY:
+ default:
+ mtx_lock(&lun->softc->lock);
+ /* How did we get here?? */
+ STAILQ_REMOVE(&lun->io_list, lun_io, cfi_lun_io, links);
+ mtx_unlock(&lun->softc->lock);
+ ctl_free_io(io);
+ break;
+ }
+}
+
+static void
+cfi_lun_probe(struct cfi_lun *lun, int have_lock)
+{
+
+ if (have_lock == 0)
+ mtx_lock(&lun->softc->lock);
+ if ((lun->softc->flags & CFI_ONLINE) == 0) {
+ if (have_lock == 0)
+ mtx_unlock(&lun->softc->lock);
+ return;
+ }
+ if (have_lock == 0)
+ mtx_unlock(&lun->softc->lock);
+
+ switch (lun->state) {
+ case CFI_LUN_INQUIRY: {
+ struct cfi_lun_io *lun_io;
+ union ctl_io *io;
+
+ io = ctl_alloc_io(lun->softc->fe.ctl_pool_ref);
+ if (io == NULL) {
+ printf("%s: unable to alloc ctl_io for target %ju "
+ "lun %d probe\n", __func__,
+ (uintmax_t)lun->target_id.id, lun->lun_id);
+ return;
+ }
+ ctl_scsi_inquiry(io,
+ /*data_ptr*/(uint8_t *)&lun->inq_data,
+ /*data_len*/ sizeof(lun->inq_data),
+ /*byte2*/ 0,
+ /*page_code*/ 0,
+ /*tag_type*/ CTL_TAG_SIMPLE,
+ /*control*/ 0);
+
+ cfi_init_io(io,
+ /*lun*/ lun,
+ /*metatask*/ NULL,
+ /*policy*/ CFI_ERR_SOFT,
+ /*retries*/ 5,
+ /*orig_lun_io*/ NULL,
+ /*done_function*/
+ cfi_lun_probe_done);
+
+ lun_io = (struct cfi_lun_io *)io->io_hdr.port_priv;
+
+ if (have_lock == 0)
+ mtx_lock(&lun->softc->lock);
+ STAILQ_INSERT_TAIL(&lun->io_list, lun_io, links);
+ if (have_lock == 0)
+ mtx_unlock(&lun->softc->lock);
+
+ if (ctl_queue(io) != CTL_RETVAL_COMPLETE) {
+ printf("%s: error returned from ctl_queue()!\n",
+ __func__);
+ STAILQ_REMOVE(&lun->io_list, lun_io,
+ cfi_lun_io, links);
+ ctl_free_io(io);
+ }
+ break;
+ }
+ case CFI_LUN_READCAPACITY:
+ case CFI_LUN_READCAPACITY_16: {
+ struct cfi_lun_io *lun_io;
+ uint8_t *dataptr;
+ union ctl_io *io;
+
+ io = ctl_alloc_io(lun->softc->fe.ctl_pool_ref);
+ if (io == NULL) {
+ printf("%s: unable to alloc ctl_io for target %ju "
+ "lun %d probe\n", __func__,
+ (uintmax_t)lun->target_id.id, lun->lun_id);
+ return;
+ }
+
+ dataptr = malloc(sizeof(struct scsi_read_capacity_data_long),
+ M_CTL_CFI, M_NOWAIT);
+ if (dataptr == NULL) {
+ printf("%s: unable to allocate SCSI read capacity "
+ "buffer for target %ju lun %d\n", __func__,
+ (uintmax_t)lun->target_id.id, lun->lun_id);
+ return;
+ }
+ if (lun->state == CFI_LUN_READCAPACITY) {
+ ctl_scsi_read_capacity(io,
+ /*data_ptr*/ dataptr,
+ /*data_len*/
+ sizeof(struct scsi_read_capacity_data_long),
+ /*addr*/ 0,
+ /*reladr*/ 0,
+ /*pmi*/ 0,
+ /*tag_type*/ CTL_TAG_SIMPLE,
+ /*control*/ 0);
+ } else {
+ ctl_scsi_read_capacity_16(io,
+ /*data_ptr*/ dataptr,
+ /*data_len*/
+ sizeof(struct scsi_read_capacity_data_long),
+ /*addr*/ 0,
+ /*reladr*/ 0,
+ /*pmi*/ 0,
+ /*tag_type*/ CTL_TAG_SIMPLE,
+ /*control*/ 0);
+ }
+ cfi_init_io(io,
+ /*lun*/ lun,
+ /*metatask*/ NULL,
+ /*policy*/ CFI_ERR_SOFT,
+ /*retries*/ 7,
+ /*orig_lun_io*/ NULL,
+ /*done_function*/ cfi_lun_probe_done);
+
+ lun_io = (struct cfi_lun_io *)io->io_hdr.port_priv;
+
+ if (have_lock == 0)
+ mtx_lock(&lun->softc->lock);
+ STAILQ_INSERT_TAIL(&lun->io_list, lun_io, links);
+ if (have_lock == 0)
+ mtx_unlock(&lun->softc->lock);
+
+ if (ctl_queue(io) != CTL_RETVAL_COMPLETE) {
+ printf("%s: error returned from ctl_queue()!\n",
+ __func__);
+ STAILQ_REMOVE(&lun->io_list, lun_io,
+ cfi_lun_io, links);
+ free(dataptr, M_CTL_CFI);
+ ctl_free_io(io);
+ }
+ break;
+ }
+ case CFI_LUN_READY:
+ default:
+ /* Why were we called? */
+ break;
+ }
+}
+
+static void
+cfi_metatask_done(struct cfi_softc *softc, struct cfi_metatask *metatask)
+{
+ mtx_lock(&softc->lock);
+ STAILQ_REMOVE(&softc->metatask_list, metatask, cfi_metatask, links);
+ mtx_unlock(&softc->lock);
+
+ /*
+ * Return status to the caller. Caller allocated storage, and is
+ * responsible for calling cfi_free_metatask to release it once
+ * they've seen the status.
+ */
+ metatask->callback(metatask->callback_arg, metatask);
+}
+
+static void
+cfi_metatask_bbr_errorparse(struct cfi_metatask *metatask, union ctl_io *io)
+{
+ int error_code, sense_key, asc, ascq;
+
+ if (metatask->tasktype != CFI_TASK_BBRREAD)
+ return;
+
+ if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS) {
+ metatask->status = CFI_MT_SUCCESS;
+ metatask->taskinfo.bbrread.status = CFI_BBR_SUCCESS;
+ return;
+ }
+
+ if ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_SCSI_ERROR) {
+ metatask->status = CFI_MT_ERROR;
+ metatask->taskinfo.bbrread.status = CFI_BBR_ERROR;
+ return;
+ }
+
+ metatask->taskinfo.bbrread.scsi_status = io->scsiio.scsi_status;
+ memcpy(&metatask->taskinfo.bbrread.sense_data, &io->scsiio.sense_data,
+ ctl_min(sizeof(metatask->taskinfo.bbrread.sense_data),
+ sizeof(io->scsiio.sense_data)));
+
+ if (io->scsiio.scsi_status == SCSI_STATUS_RESERV_CONFLICT) {
+ metatask->status = CFI_MT_ERROR;
+ metatask->taskinfo.bbrread.status = CFI_BBR_RESERV_CONFLICT;
+ return;
+ }
+
+ if (io->scsiio.scsi_status != SCSI_STATUS_CHECK_COND) {
+ metatask->status = CFI_MT_ERROR;
+ metatask->taskinfo.bbrread.status = CFI_BBR_SCSI_ERROR;
+ return;
+ }
+
+ scsi_extract_sense_len(&io->scsiio.sense_data,
+ io->scsiio.sense_len,
+ &error_code,
+ &sense_key,
+ &asc,
+ &ascq,
+ /*show_errors*/ 1);
+
+ switch (error_code) {
+ case SSD_DEFERRED_ERROR:
+ case SSD_DESC_DEFERRED_ERROR:
+ metatask->status = CFI_MT_ERROR;
+ metatask->taskinfo.bbrread.status = CFI_BBR_SCSI_ERROR;
+ break;
+ case SSD_CURRENT_ERROR:
+ case SSD_DESC_CURRENT_ERROR:
+ default: {
+ struct scsi_sense_data *sense;
+
+ sense = &io->scsiio.sense_data;
+
+ if ((asc == 0x04) && (ascq == 0x02)) {
+ metatask->status = CFI_MT_ERROR;
+ metatask->taskinfo.bbrread.status = CFI_BBR_LUN_STOPPED;
+ } else if ((asc == 0x04) && (ascq == 0x03)) {
+ metatask->status = CFI_MT_ERROR;
+ metatask->taskinfo.bbrread.status =
+ CFI_BBR_LUN_OFFLINE_CTL;
+ } else if ((asc == 0x44) && (ascq == 0x00)) {
+#ifdef NEEDTOPORT
+ if (sense->sense_key_spec[0] & SSD_SCS_VALID) {
+ uint16_t retry_count;
+
+ retry_count = sense->sense_key_spec[1] << 8 |
+ sense->sense_key_spec[2];
+ if (((retry_count & 0xf000) == CSC_RAIDCORE)
+ && ((retry_count & 0x0f00) == CSC_SHELF_SW)
+ && ((retry_count & 0xff) ==
+ RC_STS_DEVICE_OFFLINE)) {
+ metatask->status = CFI_MT_ERROR;
+ metatask->taskinfo.bbrread.status =
+ CFI_BBR_LUN_OFFLINE_RC;
+ } else {
+ metatask->status = CFI_MT_ERROR;
+ metatask->taskinfo.bbrread.status =
+ CFI_BBR_SCSI_ERROR;
+ }
+ } else {
+#endif /* NEEDTOPORT */
+ metatask->status = CFI_MT_ERROR;
+ metatask->taskinfo.bbrread.status =
+ CFI_BBR_SCSI_ERROR;
+#ifdef NEEDTOPORT
+ }
+#endif
+ } else {
+ metatask->status = CFI_MT_ERROR;
+ metatask->taskinfo.bbrread.status = CFI_BBR_SCSI_ERROR;
+ }
+ break;
+ }
+ }
+}
+
+static void
+cfi_metatask_io_done(union ctl_io *io)
+{
+ struct cfi_lun_io *lun_io;
+ struct cfi_metatask *metatask;
+ struct cfi_softc *softc;
+ struct cfi_lun *lun;
+
+ lun_io = (struct cfi_lun_io *)
+ io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr;
+
+ lun = lun_io->lun;
+ softc = lun->softc;
+
+ metatask = lun_io->metatask;
+
+ switch (metatask->tasktype) {
+ case CFI_TASK_STARTUP:
+ case CFI_TASK_SHUTDOWN: {
+ int failed, done, is_start;
+
+ failed = 0;
+ done = 0;
+ if (metatask->tasktype == CFI_TASK_STARTUP)
+ is_start = 1;
+ else
+ is_start = 0;
+
+ mtx_lock(&softc->lock);
+ if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)
+ metatask->taskinfo.startstop.luns_complete++;
+ else {
+ metatask->taskinfo.startstop.luns_failed++;
+ failed = 1;
+ }
+ if ((metatask->taskinfo.startstop.luns_complete +
+ metatask->taskinfo.startstop.luns_failed) >=
+ metatask->taskinfo.startstop.total_luns)
+ done = 1;
+
+ mtx_unlock(&softc->lock);
+
+ if (failed != 0) {
+ printf("%s: LUN %d %s request failed\n", __func__,
+ lun_io->lun->lun_id, (is_start == 1) ? "start" :
+ "stop");
+ ctl_io_error_print(io, &lun_io->lun->inq_data);
+ }
+ if (done != 0) {
+ if (metatask->taskinfo.startstop.luns_failed > 0)
+ metatask->status = CFI_MT_ERROR;
+ else
+ metatask->status = CFI_MT_SUCCESS;
+ cfi_metatask_done(softc, metatask);
+ }
+ mtx_lock(&softc->lock);
+ STAILQ_REMOVE(&lun->io_list, lun_io, cfi_lun_io, links);
+ mtx_unlock(&softc->lock);
+
+ ctl_free_io(io);
+ break;
+ }
+ case CFI_TASK_BBRREAD: {
+ /*
+ * Translate the SCSI error into an enumeration.
+ */
+ cfi_metatask_bbr_errorparse(metatask, io);
+
+ mtx_lock(&softc->lock);
+ STAILQ_REMOVE(&lun->io_list, lun_io, cfi_lun_io, links);
+ mtx_unlock(&softc->lock);
+
+ ctl_free_io(io);
+
+ cfi_metatask_done(softc, metatask);
+ break;
+ }
+ default:
+ /*
+ * This shouldn't happen.
+ */
+ mtx_lock(&softc->lock);
+ STAILQ_REMOVE(&lun->io_list, lun_io, cfi_lun_io, links);
+ mtx_unlock(&softc->lock);
+
+ ctl_free_io(io);
+ break;
+ }
+}
+
+static void
+cfi_err_recovery_done(union ctl_io *io)
+{
+ struct cfi_lun_io *lun_io, *orig_lun_io;
+ struct cfi_lun *lun;
+ union ctl_io *orig_io;
+
+ lun_io = (struct cfi_lun_io *)io->io_hdr.port_priv;
+ orig_lun_io = lun_io->orig_lun_io;
+ orig_io = orig_lun_io->ctl_io;
+ lun = lun_io->lun;
+
+ if (io->io_hdr.status != CTL_SUCCESS) {
+ printf("%s: error recovery action failed. Original "
+ "error:\n", __func__);
+
+ ctl_io_error_print(orig_lun_io->ctl_io, &lun->inq_data);
+
+ printf("%s: error from error recovery action:\n", __func__);
+
+ ctl_io_error_print(io, &lun->inq_data);
+
+ printf("%s: trying original command again...\n", __func__);
+ }
+
+ mtx_lock(&lun->softc->lock);
+ STAILQ_REMOVE(&lun->io_list, lun_io, cfi_lun_io, links);
+ mtx_unlock(&lun->softc->lock);
+ ctl_free_io(io);
+
+ orig_io->io_hdr.retries--;
+ orig_io->io_hdr.status = CTL_STATUS_NONE;
+
+ if (ctl_queue(orig_io) != CTL_RETVAL_COMPLETE) {
+ printf("%s: error returned from ctl_queue()!\n", __func__);
+ STAILQ_REMOVE(&lun->io_list, orig_lun_io,
+ cfi_lun_io, links);
+ ctl_free_io(orig_io);
+ }
+}
+
+static void
+cfi_lun_io_done(union ctl_io *io)
+{
+ struct cfi_lun *lun;
+ struct cfi_lun_io *lun_io;
+
+ lun_io = (struct cfi_lun_io *)
+ io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr;
+ lun = lun_io->lun;
+
+ if (lun_io->metatask == NULL) {
+ printf("%s: I/O has no metatask pointer, discarding\n",
+ __func__);
+ STAILQ_REMOVE(&lun->io_list, lun_io, cfi_lun_io, links);
+ ctl_free_io(io);
+ return;
+ }
+ cfi_metatask_io_done(io);
+}
+
+void
+cfi_action(struct cfi_metatask *metatask)
+{
+ struct cfi_softc *softc;
+
+ softc = &fetd_internal_softc;
+
+ mtx_lock(&softc->lock);
+
+ STAILQ_INSERT_TAIL(&softc->metatask_list, metatask, links);
+
+ if ((softc->flags & CFI_ONLINE) == 0) {
+ mtx_unlock(&softc->lock);
+ metatask->status = CFI_MT_PORT_OFFLINE;
+ cfi_metatask_done(softc, metatask);
+ return;
+ } else
+ mtx_unlock(&softc->lock);
+
+ switch (metatask->tasktype) {
+ case CFI_TASK_STARTUP:
+ case CFI_TASK_SHUTDOWN: {
+ union ctl_io *io;
+ int da_luns, ios_allocated, do_start;
+ struct cfi_lun *lun;
+ STAILQ_HEAD(, ctl_io_hdr) tmp_io_list;
+
+ da_luns = 0;
+ ios_allocated = 0;
+ STAILQ_INIT(&tmp_io_list);
+
+ if (metatask->tasktype == CFI_TASK_STARTUP)
+ do_start = 1;
+ else
+ do_start = 0;
+
+ mtx_lock(&softc->lock);
+ STAILQ_FOREACH(lun, &softc->lun_list, links) {
+ if (lun->state != CFI_LUN_READY)
+ continue;
+
+ if (SID_TYPE(&lun->inq_data) != T_DIRECT)
+ continue;
+ da_luns++;
+ io = ctl_alloc_io(softc->fe.ctl_pool_ref);
+ if (io != NULL) {
+ ios_allocated++;
+ STAILQ_INSERT_TAIL(&tmp_io_list, &io->io_hdr,
+ links);
+ }
+ }
+
+ if (ios_allocated < da_luns) {
+ printf("%s: error allocating ctl_io for %s\n",
+ __func__, (do_start == 1) ? "startup" :
+ "shutdown");
+ da_luns = ios_allocated;
+ }
+
+ metatask->taskinfo.startstop.total_luns = da_luns;
+
+ STAILQ_FOREACH(lun, &softc->lun_list, links) {
+ struct cfi_lun_io *lun_io;
+
+ if (lun->state != CFI_LUN_READY)
+ continue;
+
+ if (SID_TYPE(&lun->inq_data) != T_DIRECT)
+ continue;
+
+ io = (union ctl_io *)STAILQ_FIRST(&tmp_io_list);
+ if (io == NULL)
+ break;
+
+ STAILQ_REMOVE(&tmp_io_list, &io->io_hdr, ctl_io_hdr,
+ links);
+
+ ctl_scsi_start_stop(io,
+ /*start*/ do_start,
+ /*load_eject*/ 0,
+ /*immediate*/ 0,
+ /*power_conditions*/
+ SSS_PC_START_VALID,
+ /*onoffline*/ 1,
+ /*ctl_tag_type*/ CTL_TAG_ORDERED,
+ /*control*/ 0);
+
+ cfi_init_io(io,
+ /*lun*/ lun,
+ /*metatask*/ metatask,
+ /*policy*/ CFI_ERR_HARD,
+ /*retries*/ 3,
+ /*orig_lun_io*/ NULL,
+ /*done_function*/ cfi_lun_io_done);
+
+ lun_io = (struct cfi_lun_io *) io->io_hdr.port_priv;
+
+ STAILQ_INSERT_TAIL(&lun->io_list, lun_io, links);
+
+ if (ctl_queue(io) != CTL_RETVAL_COMPLETE) {
+ printf("%s: error returned from ctl_queue()!\n",
+ __func__);
+ STAILQ_REMOVE(&lun->io_list, lun_io,
+ cfi_lun_io, links);
+ ctl_free_io(io);
+ metatask->taskinfo.startstop.total_luns--;
+ }
+ }
+
+ if (STAILQ_FIRST(&tmp_io_list) != NULL) {
+ printf("%s: error: tmp_io_list != NULL\n", __func__);
+ for (io = (union ctl_io *)STAILQ_FIRST(&tmp_io_list);
+ io != NULL;
+ io = (union ctl_io *)STAILQ_FIRST(&tmp_io_list)) {
+ STAILQ_REMOVE(&tmp_io_list, &io->io_hdr,
+ ctl_io_hdr, links);
+ ctl_free_io(io);
+ }
+ }
+ mtx_unlock(&softc->lock);
+
+ break;
+ }
+ case CFI_TASK_BBRREAD: {
+ union ctl_io *io;
+ struct cfi_lun *lun;
+ struct cfi_lun_io *lun_io;
+ cfi_bbrread_status status;
+ int req_lun_num;
+ uint32_t num_blocks;
+
+ status = CFI_BBR_SUCCESS;
+
+ req_lun_num = metatask->taskinfo.bbrread.lun_num;
+
+ mtx_lock(&softc->lock);
+ STAILQ_FOREACH(lun, &softc->lun_list, links) {
+ if (lun->lun_id != req_lun_num)
+ continue;
+ if (lun->state != CFI_LUN_READY) {
+ status = CFI_BBR_LUN_UNCONFIG;
+ break;
+ } else
+ break;
+ }
+
+ if (lun == NULL)
+ status = CFI_BBR_NO_LUN;
+
+ if (status != CFI_BBR_SUCCESS) {
+ metatask->status = CFI_MT_ERROR;
+ metatask->taskinfo.bbrread.status = status;
+ mtx_unlock(&softc->lock);
+ cfi_metatask_done(softc, metatask);
+ break;
+ }
+
+ /*
+ * Convert the number of bytes given into blocks and check
+ * that the number of bytes is a multiple of the blocksize.
+ * CTL will verify that the LBA is okay.
+ */
+ if (lun->blocksize_powerof2 != 0) {
+ if ((metatask->taskinfo.bbrread.len &
+ (lun->blocksize - 1)) != 0) {
+ metatask->status = CFI_MT_ERROR;
+ metatask->taskinfo.bbrread.status =
+ CFI_BBR_BAD_LEN;
+ cfi_metatask_done(softc, metatask);
+ break;
+ }
+
+ num_blocks = metatask->taskinfo.bbrread.len >>
+ lun->blocksize_powerof2;
+ } else {
+ /*
+ * XXX KDM this could result in floating point
+ * division, which isn't supported in the kernel on
+ * x86 at least.
+ */
+ if ((metatask->taskinfo.bbrread.len %
+ lun->blocksize) != 0) {
+ metatask->status = CFI_MT_ERROR;
+ metatask->taskinfo.bbrread.status =
+ CFI_BBR_BAD_LEN;
+ cfi_metatask_done(softc, metatask);
+ break;
+ }
+
+ /*
+ * XXX KDM this could result in floating point
+ * division in some cases.
+ */
+ num_blocks = metatask->taskinfo.bbrread.len /
+ lun->blocksize;
+
+ }
+
+ io = ctl_alloc_io(softc->fe.ctl_pool_ref);
+ if (io == NULL) {
+ metatask->status = CFI_MT_ERROR;
+ metatask->taskinfo.bbrread.status = CFI_BBR_NO_MEM;
+ mtx_unlock(&softc->lock);
+ cfi_metatask_done(softc, metatask);
+ break;
+ }
+
+ /*
+ * XXX KDM need to do a read capacity to get the blocksize
+ * for this device.
+ */
+ ctl_scsi_read_write(io,
+ /*data_ptr*/ NULL,
+ /*data_len*/ metatask->taskinfo.bbrread.len,
+ /*read_op*/ 1,
+ /*byte2*/ 0,
+ /*minimum_cdb_size*/ 0,
+ /*lba*/ metatask->taskinfo.bbrread.lba,
+ /*num_blocks*/ num_blocks,
+ /*tag_type*/ CTL_TAG_SIMPLE,
+ /*control*/ 0);
+
+ cfi_init_io(io,
+ /*lun*/ lun,
+ /*metatask*/ metatask,
+ /*policy*/ CFI_ERR_SOFT,
+ /*retries*/ 3,
+ /*orig_lun_io*/ NULL,
+ /*done_function*/ cfi_lun_io_done);
+
+ lun_io = (struct cfi_lun_io *)io->io_hdr.port_priv;
+
+ STAILQ_INSERT_TAIL(&lun->io_list, lun_io, links);
+
+ if (ctl_queue(io) != CTL_RETVAL_COMPLETE) {
+ printf("%s: error returned from ctl_queue()!\n",
+ __func__);
+ STAILQ_REMOVE(&lun->io_list, lun_io, cfi_lun_io, links);
+ ctl_free_io(io);
+ metatask->status = CFI_MT_ERROR;
+ metatask->taskinfo.bbrread.status = CFI_BBR_ERROR;
+ mtx_unlock(&softc->lock);
+ cfi_metatask_done(softc, metatask);
+ break;
+ }
+
+ mtx_unlock(&softc->lock);
+ break;
+ }
+ default:
+ panic("invalid metatask type %d", metatask->tasktype);
+ break; /* NOTREACHED */
+ }
+}
+
+#ifdef oldapi
+void
+cfi_shutdown_shelf(cfi_cb_t callback, void *callback_arg)
+{
+ struct ctl_mem_element *element;
+ struct cfi_softc *softc;
+ struct cfi_metatask *metatask;
+
+ softc = &fetd_internal_softc;
+
+ element = ctl_alloc_mem_element(&softc->metatask_pool, /*can_wait*/ 0);
+ if (element == NULL) {
+ callback(callback_arg,
+ /*status*/ CFI_MT_ERROR,
+ /*sluns_found*/ 0,
+ /*sluns_complete*/ 0,
+ /*sluns_failed*/ 0);
+ return;
+ }
+
+ metatask = (struct cfi_metatask *)element->bytes;
+
+ memset(metatask, 0, sizeof(*metatask));
+ metatask->tasktype = CFI_TASK_SHUTDOWN;
+ metatask->status = CFI_MT_NONE;
+ metatask->taskinfo.startstop.callback = callback;
+ metatask->taskinfo.startstop.callback_arg = callback_arg;
+ metatask->element = element;
+
+ cfi_action(softc, metatask);
+
+ /*
+ * - send a report luns to lun 0, get LUN list.
+ * - send an inquiry to each lun
+ * - send a stop/offline to each direct access LUN
+ * - if we get a reservation conflict, reset the LUN and then
+ * retry sending the stop/offline
+ * - return status back to the caller
+ */
+}
+
+void
+cfi_start_shelf(cfi_cb_t callback, void *callback_arg)
+{
+ struct ctl_mem_element *element;
+ struct cfi_softc *softc;
+ struct cfi_metatask *metatask;
+
+ softc = &fetd_internal_softc;
+
+ element = ctl_alloc_mem_element(&softc->metatask_pool, /*can_wait*/ 0);
+ if (element == NULL) {
+ callback(callback_arg,
+ /*status*/ CFI_MT_ERROR,
+ /*sluns_found*/ 0,
+ /*sluns_complete*/ 0,
+ /*sluns_failed*/ 0);
+ return;
+ }
+
+ metatask = (struct cfi_metatask *)element->bytes;
+
+ memset(metatask, 0, sizeof(*metatask));
+ metatask->tasktype = CFI_TASK_STARTUP;
+ metatask->status = CFI_MT_NONE;
+ metatask->taskinfo.startstop.callback = callback;
+ metatask->taskinfo.startstop.callback_arg = callback_arg;
+ metatask->element = element;
+
+ cfi_action(softc, metatask);
+
+ /*
+ * - send a report luns to lun 0, get LUN list.
+ * - send an inquiry to each lun
+ * - send a stop/offline to each direct access LUN
+ * - if we get a reservation conflict, reset the LUN and then
+ * retry sending the stop/offline
+ * - return status back to the caller
+ */
+}
+
+#endif
+
+struct cfi_metatask *
+cfi_alloc_metatask(int can_wait)
+{
+ struct ctl_mem_element *element;
+ struct cfi_metatask *metatask;
+ struct cfi_softc *softc;
+
+ softc = &fetd_internal_softc;
+
+ element = ctl_alloc_mem_element(&softc->metatask_pool, can_wait);
+ if (element == NULL)
+ return (NULL);
+
+ metatask = (struct cfi_metatask *)element->bytes;
+ memset(metatask, 0, sizeof(*metatask));
+ metatask->status = CFI_MT_NONE;
+ metatask->element = element;
+
+ return (metatask);
+}
+
+void
+cfi_free_metatask(struct cfi_metatask *metatask)
+{
+ ctl_free_mem_element(metatask->element);
+}
+
+/*
+ * vim: ts=8
+ */
diff --git a/sys/cam/ctl/ctl_frontend_internal.h b/sys/cam/ctl/ctl_frontend_internal.h
new file mode 100644
index 0000000..cb00dc6
--- /dev/null
+++ b/sys/cam/ctl/ctl_frontend_internal.h
@@ -0,0 +1,154 @@
+/*-
+ * Copyright (c) 2004 Silicon Graphics International Corp.
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_frontend_internal.h#1 $
+ * $FreeBSD$
+ */
+/*
+ * CTL kernel internal frontend target driver. This allows kernel-level
+ * clients to send commands into CTL.
+ *
+ * Author: Ken Merry <ken@FreeBSD.org>
+ */
+
+#ifndef _CTL_FRONTEND_INTERNAL_H_
+#define _CTL_FRONTEND_INTERNAL_H_
+
+/*
+ * These are general metatask error codes. If the error code is CFI_MT_ERROR,
+ * check any metatask-specific status codes for more detail on the problem.
+ */
+typedef enum {
+ CFI_MT_NONE,
+ CFI_MT_PORT_OFFLINE,
+ CFI_MT_ERROR,
+ CFI_MT_SUCCESS
+} cfi_mt_status;
+
+typedef enum {
+ CFI_TASK_NONE,
+ CFI_TASK_SHUTDOWN,
+ CFI_TASK_STARTUP,
+ CFI_TASK_BBRREAD
+} cfi_tasktype;
+
+struct cfi_task_startstop {
+ int total_luns;
+ int luns_complete;
+ int luns_failed;
+};
+
+/*
+ * Error code description:
+ * CFI_BBR_SUCCESS - the read was successful
+ * CFI_BBR_LUN_UNCONFIG - CFI probe for this lun hasn't completed
+ * CFI_BBR_NO_LUN - this lun doesn't exist, as far as CFI knows
+ * CFI_BBR_NO_MEM - memory allocation error
+ * CFI_BBR_BAD_LEN - data length isn't a multiple of the blocksize
+ * CFI_BBR_RESERV_CONFLICT - another initiator has this lun reserved, so
+ * we can't issue I/O at all.
+ * CFI_BBR_LUN_STOPPED - the lun is powered off.
+ * CFI_BBR_LUN_OFFLINE_CTL - the lun is offline from a CTL standpoint
+ * CFI_BBR_LUN_OFFLINE_RC - the lun is offline from a RAIDCore standpoint.
+ * This is bad, because it basically means we've
+ * had a double failure on the LUN.
+ * CFI_BBR_SCSI_ERROR - generic SCSI error, see status byte and sense
+ * data for more resolution if you want it.
+ * CFI_BBR_ERROR - the catch-all error code.
+ */
+typedef enum {
+ CFI_BBR_SUCCESS,
+ CFI_BBR_LUN_UNCONFIG,
+ CFI_BBR_NO_LUN,
+ CFI_BBR_NO_MEM,
+ CFI_BBR_BAD_LEN,
+ CFI_BBR_RESERV_CONFLICT,
+ CFI_BBR_LUN_STOPPED,
+ CFI_BBR_LUN_OFFLINE_CTL,
+ CFI_BBR_LUN_OFFLINE_RC,
+ CFI_BBR_SCSI_ERROR,
+ CFI_BBR_ERROR,
+} cfi_bbrread_status;
+
+struct cfi_task_bbrread {
+ int lun_num; /* lun number */
+ uint64_t lba; /* logical block address */
+ int len; /* length in bytes */
+ cfi_bbrread_status status; /* BBR status */
+ uint8_t scsi_status; /* SCSI status */
+ struct scsi_sense_data sense_data; /* SCSI sense data */
+};
+
+union cfi_taskinfo {
+ struct cfi_task_startstop startstop;
+ struct cfi_task_bbrread bbrread;
+};
+
+struct cfi_metatask;
+
+typedef void (*cfi_cb_t)(void *arg, struct cfi_metatask *metatask);
+
+struct cfi_metatask {
+ cfi_tasktype tasktype; /* passed to CFI */
+ cfi_mt_status status; /* returned from CFI */
+ union cfi_taskinfo taskinfo; /* returned from CFI */
+ struct ctl_mem_element *element; /* used by CFI, don't touch*/
+ cfi_cb_t callback; /* passed to CFI */
+ void *callback_arg; /* passed to CFI */
+ STAILQ_ENTRY(cfi_metatask) links; /* used by CFI, don't touch*/
+};
+
+#ifdef _KERNEL
+
+MALLOC_DECLARE(M_CTL_CFI);
+
+/*
+ * This is the API for sending meta commands (commands that are sent to more
+ * than one LUN) to the internal frontend:
+ * - Allocate a metatask using cfi_alloc_metatask(). can_wait == 0 means
+ * that you're calling from an interrupt context. can_wait == 1 means
+ * that you're calling from a thread context and don't mind waiting to
+ * allocate memory.
+ * - Setup the task type, callback and callback argument.
+ * - Call cfi_action().
+ * - When the callback comes, note the status and any per-command status
+ * (see the taskinfo union) and then free the metatask with
+ * cfi_free_metatask().
+ */
+struct cfi_metatask *cfi_alloc_metatask(int can_wait);
+void cfi_free_metatask(struct cfi_metatask *metatask);
+void cfi_action(struct cfi_metatask *metatask);
+
+#endif /* _KERNEL */
+
+#endif /* _CTL_FRONTEND_INTERNAL_H_ */
+
+/*
+ * vim: ts=8
+ */
diff --git a/sys/cam/ctl/ctl_ha.h b/sys/cam/ctl/ctl_ha.h
new file mode 100644
index 0000000..6293c7c
--- /dev/null
+++ b/sys/cam/ctl/ctl_ha.h
@@ -0,0 +1,270 @@
+/*-
+ * Copyright (c) 2003-2009 Silicon Graphics International Corp.
+ * Copyright (c) 2011 Spectra Logic Corporation
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_ha.h#1 $
+ * $FreeBSD$
+ */
+
+#ifndef _CTL_HA_H_
+#define _CTL_HA_H_
+
+/*
+ * CTL High Availability Modes:
+ *
+ * CTL_HA_MODE_SER_ONLY: Commands are serialized to the other side. Write
+ * mirroring and read re-direction are assumed to
+ * happen in the back end.
+ * CTL_HA_MODE_XFER: Commands are serialized and data is transferred
+ * for write mirroring and read re-direction.
+ */
+
+typedef enum {
+ CTL_HA_MODE_SER_ONLY,
+ CTL_HA_MODE_XFER
+} ctl_ha_mode;
+
+
+/*
+ * This is a stubbed out High Availability interface. It assumes two nodes
+ * staying in sync.
+ *
+ * The reason this interface is here, and stubbed out, is that CTL was
+ * originally written with support for Copan's (now SGI) high availability
+ * framework. That framework was not released by SGI, and would not have
+ * been generally applicable to FreeBSD anyway.
+ *
+ * The idea here is to show the kind of API that would need to be in place
+ * in a HA framework to work with CTL's HA hooks. This API is very close
+ * to the Copan/SGI API, so that the code using it could stay in place
+ * as-is.
+ *
+ * So, in summary, this is a shell without real substance, and much more
+ * work would be needed to actually make HA work. The implementation
+ * inside CTL will also need to change to fit the eventual implementation.
+ * The additional pieces we would need are:
+ *
+ * - HA "Supervisor" framework that can startup the components of the
+ * system, and initiate failover (i.e. active/active to single mode)
+ * and failback (single to active/active mode) state transitions.
+ * This framework would be able to recognize when an event happens
+ * that requires it to initiate state transitions in the components it
+ * manages.
+ *
+ * - HA communication framework. This framework should have the following
+ * features:
+ * - Separate channels for separate system components. The CTL
+ * instance on one node should communicate with the CTL instance
+ * on another node.
+ * - Short message passing. These messages would be fixed length, so
+ * they could be preallocated and easily passed between the nodes.
+ * i.e. conceptually like an ethernet packet.
+ * - DMA/large buffer capability. This would require some negotiation
+ * with the other node to define the destination. It could
+ * allow for "push" (i.e. initiated by the requesting node) DMA or
+ * "pull" (i.e. initiated by the target controller) DMA or both.
+ * - Communication channel status change notification.
+ * - HA capability in other portions of the storage stack. Having two CTL
+ * instances communicate is just one part of an overall HA solution.
+ * State needs to be synchronized at multiple levels of the system in
+ * order for failover to actually work. For instance, if CTL is using a
+ * file on a ZFS filesystem as its backing store, the ZFS array state
+ * should be synchronized with the other node, so that the other node
+ * can immediately take over if the node that is primary for a particular
+ * array fails.
+ */
+
+/*
+ * Communication channel IDs for various system components. This is to
+ * make sure one CTL instance talks with another, one ZFS instance talks
+ * with another, etc.
+ */
+typedef enum {
+ CTL_HA_CHAN_NONE,
+ CTL_HA_CHAN_CTL,
+ CTL_HA_CHAN_ZFS,
+ CTL_HA_CHAN_MAX
+} ctl_ha_channel;
+
+/*
+ * HA communication event notification. These are events generated by the
+ * HA communication subsystem.
+ *
+ * CTL_HA_EVT_MSG_RECV: Message received by the other node.
+ * CTL_HA_EVT_MSG_SENT: Message sent to the other node.
+ * CTL_HA_EVT_DISCONNECT: Communication channel disconnected.
+ * CTL_HA_EVT_DMA_SENT: DMA successfully sent to other node (push).
+ * CTL_HA_EVT_DMA_RECEIVED: DMA successfully received by other node (pull).
+ */
+typedef enum {
+ CTL_HA_EVT_NONE,
+ CTL_HA_EVT_MSG_RECV,
+ CTL_HA_EVT_MSG_SENT,
+ CTL_HA_EVT_DISCONNECT,
+ CTL_HA_EVT_DMA_SENT,
+ CTL_HA_EVT_DMA_RECEIVED,
+ CTL_HA_EVT_MAX
+} ctl_ha_event;
+
+typedef enum {
+ CTL_HA_STATUS_WAIT,
+ CTL_HA_STATUS_SUCCESS,
+ CTL_HA_STATUS_ERROR,
+ CTL_HA_STATUS_INVALID,
+ CTL_HA_STATUS_DISCONNECT,
+ CTL_HA_STATUS_BUSY,
+ CTL_HA_STATUS_MAX
+} ctl_ha_status;
+
+typedef enum {
+ CTL_HA_DATA_CTL,
+ CTL_HA_DATA_ZFS,
+ CTL_HA_DATA_MAX
+} ctl_ha_dtid;
+
+typedef enum {
+ CTL_HA_DT_CMD_READ,
+ CTL_HA_DT_CMD_WRITE,
+} ctl_ha_dt_cmd;
+
+struct ctl_ha_dt_req;
+
+typedef void (*ctl_ha_dt_cb)(struct ctl_ha_dt_req *);
+
+struct ctl_ha_dt_req {
+ ctl_ha_dt_cmd command;
+ void *context;
+ ctl_ha_dt_cb callback;
+ ctl_ha_dtid id;
+ int ret;
+ uint32_t size;
+ uint8_t *local;
+ uint8_t *remote;
+};
+
+typedef void (*ctl_evt_handler)(ctl_ha_channel channel, ctl_ha_event event,
+ int param);
+void ctl_ha_register_evthandler(ctl_ha_channel channel,
+ ctl_evt_handler handler);
+
+static inline ctl_ha_status
+ctl_ha_msg_create(ctl_ha_channel channel, ctl_evt_handler handler)
+{
+ return (CTL_HA_STATUS_SUCCESS);
+}
+
+/*
+ * Receive a message of the specified size.
+ */
+static inline ctl_ha_status
+ctl_ha_msg_recv(ctl_ha_channel channel, void *buffer, unsigned int size,
+ int wait)
+{
+ return (CTL_HA_STATUS_SUCCESS);
+}
+
+/*
+ * Send a message of the specified size.
+ */
+static inline ctl_ha_status
+ctl_ha_msg_send(ctl_ha_channel channel, void *buffer, unsigned int size,
+ int wait)
+{
+ return (CTL_HA_STATUS_SUCCESS);
+}
+
+/*
+ * Allocate a data transfer request structure.
+ */
+static inline struct ctl_ha_dt_req *
+ctl_dt_req_alloc(void)
+{
+ return (NULL);
+}
+
+/*
+ * Free a data transfer request structure.
+ */
+static inline void
+ctl_dt_req_free(struct ctl_ha_dt_req *req)
+{
+ return;
+}
+
+/*
+ * Issue a DMA request for a single buffer.
+ */
+static inline ctl_ha_status
+ctl_dt_single(struct ctl_ha_dt_req *req)
+{
+ return (CTL_HA_STATUS_WAIT);
+}
+
+/*
+ * SINGLE: One node
+ * HA: Two nodes (Active/Active implied)
+ * SLAVE/MASTER: The component can set these flags to indicate which side
+ * is in control. It has no effect on the HA framework.
+ */
+typedef enum {
+ CTL_HA_STATE_UNKNOWN = 0x00,
+ CTL_HA_STATE_SINGLE = 0x01,
+ CTL_HA_STATE_HA = 0x02,
+ CTL_HA_STATE_MASK = 0x0F,
+ CTL_HA_STATE_SLAVE = 0x10,
+ CTL_HA_STATE_MASTER = 0x20
+} ctl_ha_state;
+
+typedef enum {
+ CTL_HA_COMP_STATUS_OK,
+ CTL_HA_COMP_STATUS_FAILED,
+ CTL_HA_COMP_STATUS_ERROR
+} ctl_ha_comp_status;
+
+struct ctl_ha_component;
+
+typedef ctl_ha_comp_status (*ctl_hacmp_init_t)(struct ctl_ha_component *);
+typedef ctl_ha_comp_status (*ctl_hacmp_start_t)(struct ctl_ha_component *,
+ ctl_ha_state);
+
+struct ctl_ha_component {
+ char *name;
+ ctl_ha_state state;
+ ctl_ha_comp_status status;
+ ctl_hacmp_init_t init;
+ ctl_hacmp_start_t start;
+ ctl_hacmp_init_t quiesce;
+};
+
+#define CTL_HA_STATE_IS_SINGLE(state) ((state & CTL_HA_STATE_MASK) == \
+ CTL_HA_STATE_SINGLE)
+#define CTL_HA_STATE_IS_HA(state) ((state & CTL_HA_STATE_MASK) == \
+ CTL_HA_STATE_HA)
+
+#endif /* _CTL_HA_H_ */
diff --git a/sys/cam/ctl/ctl_io.h b/sys/cam/ctl/ctl_io.h
new file mode 100644
index 0000000..aa00a06
--- /dev/null
+++ b/sys/cam/ctl/ctl_io.h
@@ -0,0 +1,474 @@
+/*-
+ * Copyright (c) 2003 Silicon Graphics International Corp.
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_io.h#5 $
+ * $FreeBSD$
+ */
+/*
+ * CAM Target Layer data movement structures/interface.
+ *
+ * Author: Ken Merry <ken@FreeBSD.org>
+ */
+
+#ifndef _CTL_IO_H_
+#define _CTL_IO_H_
+
+#ifdef _CTL_C
+#define EXTERN(__var,__val) __var = __val
+#else
+#define EXTERN(__var,__val) extern __var
+#endif
+
+#define CTL_MAX_CDBLEN 32
+/*
+ * Uncomment this next line to enable printing out times for I/Os
+ * that take longer than CTL_TIME_IO_SECS seconds to get to the datamove
+ * and/or done stage.
+ */
+#define CTL_TIME_IO
+#ifdef CTL_TIME_IO
+#define CTL_TIME_IO_DEFAULT_SECS 90
+EXTERN(int ctl_time_io_secs, CTL_TIME_IO_DEFAULT_SECS);
+#endif
+
+/*
+ * Uncomment these next two lines to enable the CTL I/O delay feature. You
+ * can delay I/O at two different points -- datamove and done. This is
+ * useful for diagnosing abort conditions (for hosts that send an abort on a
+ * timeout), and for determining how long a host's timeout is.
+ */
+#define CTL_IO_DELAY
+#define CTL_TIMER_BYTES sizeof(struct callout)
+
+typedef enum {
+ CTL_STATUS_NONE, /* No status */
+ CTL_SUCCESS, /* Transaction completed successfully */
+ CTL_CMD_TIMEOUT, /* Command timed out, shouldn't happen here */
+ CTL_SEL_TIMEOUT, /* Selection timeout, shouldn't happen here */
+ CTL_ERROR, /* General CTL error XXX expand on this? */
+ CTL_SCSI_ERROR, /* SCSI error, look at status byte/sense data */
+ CTL_CMD_ABORTED, /* Command aborted, don't return status */
+ CTL_STATUS_MASK = 0xfff,/* Mask off any status flags */
+ CTL_AUTOSENSE = 0x1000 /* Autosense performed */
+} ctl_io_status;
+
+/*
+ * WARNING: Keep the data in/out/none flags where they are. They're used
+ * in conjuction with ctl_cmd_flags. See comment above ctl_cmd_flags
+ * definition in ctl_private.h.
+ */
+typedef enum {
+ CTL_FLAG_NONE = 0x00000000, /* no flags */
+ CTL_FLAG_DATA_IN = 0x00000001, /* DATA IN */
+ CTL_FLAG_DATA_OUT = 0x00000002, /* DATA OUT */
+ CTL_FLAG_DATA_NONE = 0x00000003, /* no data */
+ CTL_FLAG_DATA_MASK = 0x00000003,
+ CTL_FLAG_KDPTR_SGLIST = 0x00000008, /* kern_data_ptr is S/G list*/
+ CTL_FLAG_EDPTR_SGLIST = 0x00000010, /* ext_data_ptr is S/G list */
+ CTL_FLAG_DO_AUTOSENSE = 0x00000020, /* grab sense info */
+ CTL_FLAG_USER_REQ = 0x00000040, /* request came from userland */
+ CTL_FLAG_CONTROL_DEV = 0x00000080, /* processor device */
+ CTL_FLAG_ALLOCATED = 0x00000100, /* data space allocated */
+ CTL_FLAG_BLOCKED = 0x00000200, /* on the blocked queue */
+ CTL_FLAG_ABORT = 0x00000800, /* this I/O should be aborted */
+ CTL_FLAG_DMA_INPROG = 0x00001000, /* DMA in progress */
+ CTL_FLAG_NO_DATASYNC = 0x00002000, /* don't cache flush data */
+ CTL_FLAG_DELAY_DONE = 0x00004000, /* delay injection done */
+ CTL_FLAG_INT_COPY = 0x00008000, /* internal copy, no done call*/
+ CTL_FLAG_SENT_2OTHER_SC = 0x00010000,
+ CTL_FLAG_FROM_OTHER_SC = 0x00020000,
+ CTL_FLAG_IS_WAS_ON_RTR = 0x00040000, /* Don't rerun cmd on failover*/
+ CTL_FLAG_BUS_ADDR = 0x00080000, /* ctl_sglist contains BUS
+ addresses, not virtual ones*/
+ CTL_FLAG_IO_CONT = 0x00100000, /* Continue I/O instead of
+ completing */
+ CTL_FLAG_AUTO_MIRROR = 0x00200000, /* Automatically use memory
+ from the RC cache mirrored
+ address area. */
+#if 0
+ CTL_FLAG_ALREADY_DONE = 0x00200000 /* I/O already completed */
+#endif
+ CTL_FLAG_NO_DATAMOVE = 0x00400000,
+ CTL_FLAG_DMA_QUEUED = 0x00800000, /* DMA queued but not started*/
+ CTL_FLAG_STATUS_QUEUED = 0x01000000, /* Status queued but not sent*/
+
+ CTL_FLAG_REDIR_DONE = 0x02000000, /* Redirection has already
+ been done. */
+ CTL_FLAG_FAILOVER = 0x04000000, /* Killed by a failover */
+ CTL_FLAG_IO_ACTIVE = 0x08000000, /* I/O active on this SC */
+ CTL_FLAG_RDMA_MASK = CTL_FLAG_NO_DATASYNC | CTL_FLAG_BUS_ADDR |
+ CTL_FLAG_AUTO_MIRROR | CTL_FLAG_REDIR_DONE
+ /* Flags we care about for
+ remote DMA */
+} ctl_io_flags;
+
+
+struct ctl_lba_len {
+ uint64_t lba;
+ uint32_t len;
+};
+
+union ctl_priv {
+ uint8_t bytes[sizeof(uint64_t) * 2];
+ uint64_t integer;
+ void *ptr;
+};
+
+/*
+ * Number of CTL private areas.
+ */
+#define CTL_NUM_PRIV 6
+
+/*
+ * Which private area are we using for a particular piece of data?
+ */
+#define CTL_PRIV_LUN 0 /* CTL LUN pointer goes here */
+#define CTL_PRIV_LBA_LEN 1 /* Decoded LBA/len for read/write*/
+#define CTL_PRIV_MODEPAGE 1 /* Modepage info for config write */
+#define CTL_PRIV_BACKEND 2 /* Reserved for block, RAIDCore */
+#define CTL_PRIV_BACKEND_LUN 3 /* Backend LUN pointer */
+#define CTL_PRIV_FRONTEND 4 /* LSI driver, ioctl front end */
+#define CTL_PRIV_USER 5 /* Userland use */
+
+#define CTL_INVALID_PORTNAME 0xFF
+#define CTL_UNMAPPED_IID 0xFF
+/*
+ * XXX KDM this size is for the port_priv variable in struct ctl_io_hdr
+ * below. This should be defined in terms of the size of struct
+ * ctlfe_lun_cmd_info at the moment:
+ * struct ctlfe_lun_cmd_info {
+ * int cur_transfer_index;
+ * ctlfe_cmd_flags flags;
+ * bus_dma_segment_t cam_sglist[32];
+ * };
+ *
+ * This isn't really the way I'd prefer to do it, but it does make some
+ * sense, AS LONG AS we can guarantee that there will always only be one
+ * outstanding DMA request per ctl_io. If that assumption isn't valid,
+ * then we've got problems.
+ *
+ * At some point it may be nice switch CTL over to using CCBs for
+ * everything. At that point we can probably use the ATIO/CTIO model, so
+ * that multiple simultaneous DMAs per command will just work.
+ *
+ * Also note that the current size, 600, is appropriate for 64-bit
+ * architectures, but is overkill for 32-bit architectures. Need a way to
+ * figure out the size at compile time, or just get rid of this altogether.
+ */
+#define CTL_PORT_PRIV_SIZE 600
+
+struct ctl_sg_entry {
+ void *addr;
+ size_t len;
+};
+
+struct ctl_id {
+ uint32_t id;
+ uint64_t wwid[2];
+};
+
+typedef enum {
+ CTL_IO_NONE,
+ CTL_IO_SCSI,
+ CTL_IO_TASK,
+} ctl_io_type;
+
+struct ctl_nexus {
+ struct ctl_id initid; /* Initiator ID */
+ uint32_t targ_port; /* Target port, filled in by PORT */
+ struct ctl_id targ_target; /* Destination target */
+ uint32_t targ_lun; /* Destination lun */
+};
+
+typedef enum {
+ CTL_MSG_SERIALIZE,
+ CTL_MSG_R2R,
+ CTL_MSG_FINISH_IO,
+ CTL_MSG_BAD_JUJU,
+ CTL_MSG_MANAGE_TASKS,
+ CTL_MSG_PERS_ACTION,
+ CTL_MSG_SYNC_FE,
+ CTL_MSG_APS_LOCK,
+ CTL_MSG_DATAMOVE,
+ CTL_MSG_DATAMOVE_DONE
+} ctl_msg_type;
+
+struct ctl_scsiio;
+
+#define CTL_NUM_SG_ENTRIES 9
+
+struct ctl_io_hdr {
+ uint32_t version; /* interface version XXX */
+ ctl_io_type io_type; /* task I/O, SCSI I/O, etc. */
+ ctl_msg_type msg_type;
+ struct ctl_nexus nexus; /* Initiator, port, target, lun */
+ uint32_t iid_indx; /* the index into the iid mapping */
+ uint32_t flags; /* transaction flags */
+ uint32_t status; /* transaction status */
+ uint32_t port_status; /* trans status, set by PORT, 0 = good*/
+ uint32_t timeout; /* timeout in ms */
+ uint32_t retries; /* retry count */
+#ifdef CTL_IO_DELAY
+ uint8_t timer_bytes[CTL_TIMER_BYTES]; /* timer kludge */
+#endif /* CTL_IO_DELAY */
+#ifdef CTL_TIME_IO
+ time_t start_time; /* I/O start time */
+ struct bintime start_bt; /* Timer start ticks */
+ struct bintime dma_start_bt; /* DMA start ticks */
+ struct bintime dma_bt; /* DMA total ticks */
+ uint32_t num_dmas; /* Number of DMAs */
+#endif /* CTL_TIME_IO */
+ union ctl_io *original_sc;
+ union ctl_io *serializing_sc;
+ void *pool; /* I/O pool */
+ union ctl_priv ctl_private[CTL_NUM_PRIV];/* CTL private area */
+ uint8_t port_priv[CTL_PORT_PRIV_SIZE];/* PORT private area*/
+ struct ctl_sg_entry remote_sglist[CTL_NUM_SG_ENTRIES];
+ struct ctl_sg_entry remote_dma_sglist[CTL_NUM_SG_ENTRIES];
+ struct ctl_sg_entry local_sglist[CTL_NUM_SG_ENTRIES];
+ struct ctl_sg_entry local_dma_sglist[CTL_NUM_SG_ENTRIES];
+ STAILQ_ENTRY(ctl_io_hdr) links; /* linked list pointer */
+ TAILQ_ENTRY(ctl_io_hdr) ooa_links;
+ TAILQ_ENTRY(ctl_io_hdr) blocked_links;
+};
+
+typedef enum {
+ CTL_TAG_UNTAGGED,
+ CTL_TAG_SIMPLE,
+ CTL_TAG_ORDERED,
+ CTL_TAG_HEAD_OF_QUEUE,
+ CTL_TAG_ACA
+} ctl_tag_type;
+
+union ctl_io;
+
+/*
+ * SCSI passthrough I/O structure for the CAM Target Layer. Note
+ * that some of these fields are here for completeness, but they aren't
+ * used in the CTL implementation. e.g., timeout and retries won't be
+ * used.
+ *
+ * Note: Make sure the io_hdr is *always* the first element in this
+ * structure.
+ */
+struct ctl_scsiio {
+ struct ctl_io_hdr io_hdr; /* common to all I/O types */
+ uint32_t ext_sg_entries; /* 0 = no S/G list, > 0 = num entries */
+ uint8_t *ext_data_ptr; /* data buffer or S/G list */
+ uint32_t ext_data_len; /* Data transfer length */
+ uint32_t ext_data_filled; /* Amount of data filled so far */
+ uint32_t kern_sg_entries; /* 0 = no S/G list, > 0 = num entries */
+ uint32_t rem_sg_entries; /* 0 = no S/G list, > 0 = num entries */
+ uint8_t *kern_data_ptr; /* data buffer or S/G list */
+ uint32_t kern_data_len; /* Length of this S/G list/buffer */
+ uint32_t kern_total_len; /* Total length of this transaction */
+ uint32_t kern_data_resid; /* Length left to transfer after this*/
+ uint32_t kern_rel_offset; /* Byte Offset of this transfer */
+ struct scsi_sense_data sense_data; /* sense data */
+ uint8_t sense_len; /* Returned sense length */
+ uint8_t scsi_status; /* SCSI status byte */
+ uint8_t sense_residual; /* sense residual length */
+ uint32_t residual; /* data residual length */
+ uint32_t tag_num; /* tag number */
+ ctl_tag_type tag_type; /* simple, ordered, head of queue,etc.*/
+ uint8_t cdb_len; /* CDB length */
+ uint8_t cdb[CTL_MAX_CDBLEN]; /* CDB */
+ int (*be_move_done)(union ctl_io *io); /* called by fe */
+ int (*io_cont)(union ctl_io *io); /* to continue processing */
+};
+
+typedef enum {
+ CTL_TASK_ABORT_TASK,
+ CTL_TASK_ABORT_TASK_SET,
+ CTL_TASK_CLEAR_ACA,
+ CTL_TASK_CLEAR_TASK_SET,
+ CTL_TASK_LUN_RESET,
+ CTL_TASK_TARGET_RESET,
+ CTL_TASK_BUS_RESET,
+ CTL_TASK_PORT_LOGIN,
+ CTL_TASK_PORT_LOGOUT
+} ctl_task_type;
+
+/*
+ * Task management I/O structure. Aborts, bus resets, etc., are sent using
+ * this structure.
+ *
+ * Note: Make sure the io_hdr is *always* the first element in this
+ * structure.
+ */
+struct ctl_taskio {
+ struct ctl_io_hdr io_hdr; /* common to all I/O types */
+ ctl_task_type task_action; /* Target Reset, Abort, etc. */
+ uint32_t tag_num; /* tag number */
+ ctl_tag_type tag_type; /* simple, ordered, etc. */
+};
+
+typedef enum {
+ CTL_PR_REG_KEY,
+ CTL_PR_UNREG_KEY,
+ CTL_PR_PREEMPT,
+ CTL_PR_CLEAR,
+ CTL_PR_RESERVE,
+ CTL_PR_RELEASE
+} ctl_pr_action;
+
+/*
+ * The PR info is specifically for sending Persistent Reserve actions
+ * to the other SC which it must also act on.
+ *
+ * Note: Make sure the io_hdr is *always* the first element in this
+ * structure.
+ */
+struct ctl_pr_info {
+ ctl_pr_action action;
+ uint8_t sa_res_key[8];
+ uint8_t res_type;
+ uint16_t residx;
+};
+
+struct ctl_ha_msg_hdr {
+ ctl_msg_type msg_type;
+ union ctl_io *original_sc;
+ union ctl_io *serializing_sc;
+ struct ctl_nexus nexus; /* Initiator, port, target, lun */
+ uint32_t status; /* transaction status */
+ TAILQ_ENTRY(ctl_ha_msg_hdr) links;
+};
+
+#define CTL_HA_MAX_SG_ENTRIES 16
+
+/*
+ * Used for CTL_MSG_APS_LOCK.
+ */
+struct ctl_ha_msg_aps {
+ struct ctl_ha_msg_hdr hdr;
+ uint8_t lock_flag;
+};
+
+/*
+ * Used for CTL_MSG_PERS_ACTION.
+ */
+struct ctl_ha_msg_pr {
+ struct ctl_ha_msg_hdr hdr;
+ struct ctl_pr_info pr_info;
+};
+
+/*
+ * The S/G handling here is a little different than the standard ctl_scsiio
+ * structure, because we can't pass data by reference in between controllers.
+ * The S/G list in the ctl_scsiio struct is normally passed in the
+ * kern_data_ptr field. So kern_sg_entries here will always be non-zero,
+ * even if there is only one entry.
+ *
+ * Used for CTL_MSG_DATAMOVE.
+ */
+struct ctl_ha_msg_dt {
+ struct ctl_ha_msg_hdr hdr;
+ ctl_io_flags flags; /* Only I/O flags are used here */
+ uint32_t sg_sequence; /* S/G portion number */
+ uint8_t sg_last; /* last S/G batch = 1 */
+ uint32_t sent_sg_entries; /* previous S/G count */
+ uint32_t cur_sg_entries; /* current S/G entries */
+ uint32_t kern_sg_entries; /* total S/G entries */
+ uint32_t kern_data_len; /* Length of this S/G list */
+ uint32_t kern_total_len; /* Total length of this
+ transaction */
+ uint32_t kern_data_resid; /* Length left to transfer
+ after this*/
+ uint32_t kern_rel_offset; /* Byte Offset of this
+ transfer */
+ struct ctl_sg_entry sg_list[CTL_HA_MAX_SG_ENTRIES];
+};
+
+/*
+ * Used for CTL_MSG_SERIALIZE, CTL_MSG_FINISH_IO, CTL_MSG_BAD_JUJU.
+ */
+struct ctl_ha_msg_scsi {
+ struct ctl_ha_msg_hdr hdr;
+ uint8_t cdb[CTL_MAX_CDBLEN]; /* CDB */
+ uint32_t tag_num; /* tag number */
+ ctl_tag_type tag_type; /* simple, ordered, etc. */
+ uint8_t scsi_status; /* SCSI status byte */
+ struct scsi_sense_data sense_data; /* sense data */
+ uint8_t sense_len; /* Returned sense length */
+ uint8_t sense_residual; /* sense residual length */
+ uint32_t residual; /* data residual length */
+ uint32_t fetd_status; /* trans status, set by FETD,
+ 0 = good*/
+ struct ctl_lba_len lbalen; /* used for stats */
+};
+
+/*
+ * Used for CTL_MSG_MANAGE_TASKS.
+ */
+struct ctl_ha_msg_task {
+ struct ctl_ha_msg_hdr hdr;
+ ctl_task_type task_action; /* Target Reset, Abort, etc. */
+ uint32_t tag_num; /* tag number */
+ ctl_tag_type tag_type; /* simple, ordered, etc. */
+};
+
+union ctl_ha_msg {
+ struct ctl_ha_msg_hdr hdr;
+ struct ctl_ha_msg_task task;
+ struct ctl_ha_msg_scsi scsi;
+ struct ctl_ha_msg_dt dt;
+ struct ctl_ha_msg_pr pr;
+ struct ctl_ha_msg_aps aps;
+};
+
+
+struct ctl_prio {
+ struct ctl_io_hdr io_hdr;
+ struct ctl_ha_msg_pr pr_msg;
+};
+
+
+
+union ctl_io {
+ struct ctl_io_hdr io_hdr; /* common to all I/O types */
+ struct ctl_scsiio scsiio; /* Normal SCSI commands */
+ struct ctl_taskio taskio; /* SCSI task management/reset */
+ struct ctl_prio presio; /* update per. res info on other SC */
+};
+
+#ifdef _KERNEL
+
+union ctl_io *ctl_alloc_io(void *pool_ref);
+void ctl_free_io(union ctl_io *io);
+void ctl_zero_io(union ctl_io *io);
+void ctl_copy_io(union ctl_io *src, union ctl_io *dest);
+
+#endif /* _KERNEL */
+
+#endif /* _CTL_IO_H_ */
+
+/*
+ * vim: ts=8
+ */
diff --git a/sys/cam/ctl/ctl_ioctl.h b/sys/cam/ctl/ctl_ioctl.h
new file mode 100644
index 0000000..7ca78eb
--- /dev/null
+++ b/sys/cam/ctl/ctl_ioctl.h
@@ -0,0 +1,604 @@
+/*-
+ * Copyright (c) 2003 Silicon Graphics International Corp.
+ * Copyright (c) 2011 Spectra Logic Corporation
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_ioctl.h#4 $
+ * $FreeBSD$
+ */
+/*
+ * CAM Target Layer ioctl interface.
+ *
+ * Author: Ken Merry <ken@FreeBSD.org>
+ */
+
+#ifndef _CTL_IOCTL_H_
+#define _CTL_IOCTL_H_
+
+#define CTL_DEFAULT_DEV "/dev/cam/ctl"
+/*
+ * Maximum number of targets we support.
+ */
+#define CTL_MAX_TARGETS 1
+
+/*
+ * Maximum target ID we support.
+ */
+#define CTL_MAX_TARGID 15
+
+/*
+ * Maximum number of LUNs we support at the moment. MUST be a power of 2.
+ */
+#define CTL_MAX_LUNS 256
+
+/*
+ * Maximum number of initiators per port.
+ */
+#define CTL_MAX_INIT_PER_PORT 2048 // Was 16
+
+/*
+ * Maximum number of ports registered at one time.
+ */
+#define CTL_MAX_PORTS 32
+
+/*
+ * Maximum number of initiators we support.
+ */
+#define CTL_MAX_INITIATORS (CTL_MAX_INIT_PER_PORT * CTL_MAX_PORTS)
+
+/* Hopefully this won't conflict with new misc devices that pop up */
+#define CTL_MINOR 225
+
+typedef enum {
+ CTL_OOA_INVALID_LUN,
+ CTL_OOA_SUCCESS
+} ctl_ooa_status;
+
+struct ctl_ooa_info {
+ uint32_t target_id; /* Passed in to CTL */
+ uint32_t lun_id; /* Passed in to CTL */
+ uint32_t num_entries; /* Returned from CTL */
+ ctl_ooa_status status; /* Returned from CTL */
+};
+
+struct ctl_hard_startstop_info {
+ cfi_mt_status status;
+ int total_luns;
+ int luns_complete;
+ int luns_failed;
+};
+
+struct ctl_bbrread_info {
+ int lun_num; /* Passed in to CTL */
+ uint64_t lba; /* Passed in to CTL */
+ int len; /* Passed in to CTL */
+ cfi_mt_status status; /* Returned from CTL */
+ cfi_bbrread_status bbr_status; /* Returned from CTL */
+ uint8_t scsi_status; /* Returned from CTL */
+ struct scsi_sense_data sense_data; /* Returned from CTL */
+};
+
+typedef enum {
+ CTL_DELAY_TYPE_NONE,
+ CTL_DELAY_TYPE_CONT,
+ CTL_DELAY_TYPE_ONESHOT
+} ctl_delay_type;
+
+typedef enum {
+ CTL_DELAY_LOC_NONE,
+ CTL_DELAY_LOC_DATAMOVE,
+ CTL_DELAY_LOC_DONE,
+} ctl_delay_location;
+
+typedef enum {
+ CTL_DELAY_STATUS_NONE,
+ CTL_DELAY_STATUS_OK,
+ CTL_DELAY_STATUS_INVALID_LUN,
+ CTL_DELAY_STATUS_INVALID_TYPE,
+ CTL_DELAY_STATUS_INVALID_LOC,
+ CTL_DELAY_STATUS_NOT_IMPLEMENTED
+} ctl_delay_status;
+
+struct ctl_io_delay_info {
+ uint32_t target_id;
+ uint32_t lun_id;
+ ctl_delay_type delay_type;
+ ctl_delay_location delay_loc;
+ uint32_t delay_secs;
+ ctl_delay_status status;
+};
+
+typedef enum {
+ CTL_GS_SYNC_NONE,
+ CTL_GS_SYNC_OK,
+ CTL_GS_SYNC_NO_LUN
+} ctl_gs_sync_status;
+
+/*
+ * The target and LUN id specify which device to modify. The sync interval
+ * means that we will let through every N SYNCHRONIZE CACHE commands.
+ */
+struct ctl_sync_info {
+ uint32_t target_id; /* passed to kernel */
+ uint32_t lun_id; /* passed to kernel */
+ int sync_interval; /* depends on whether get/set */
+ ctl_gs_sync_status status; /* passed from kernel */
+};
+
+typedef enum {
+ CTL_STATS_NO_IO,
+ CTL_STATS_READ,
+ CTL_STATS_WRITE
+} ctl_stat_types;
+#define CTL_STATS_NUM_TYPES 3
+
+typedef enum {
+ CTL_LUN_STATS_NO_BLOCKSIZE = 0x01
+} ctl_lun_stats_flags;
+
+struct ctl_lun_io_port_stats {
+ uint32_t targ_port;
+ uint64_t bytes[CTL_STATS_NUM_TYPES];
+ uint64_t operations[CTL_STATS_NUM_TYPES];
+ struct bintime time[CTL_STATS_NUM_TYPES];
+ uint64_t num_dmas[CTL_STATS_NUM_TYPES];
+ struct bintime dma_time[CTL_STATS_NUM_TYPES];
+};
+
+struct ctl_lun_io_stats {
+ uint8_t device_type;
+ uint64_t lun_number;
+ uint32_t blocksize;
+ ctl_lun_stats_flags flags;
+ struct ctl_lun_io_port_stats ports[CTL_MAX_PORTS];
+};
+
+typedef enum {
+ CTL_SS_OK,
+ CTL_SS_NEED_MORE_SPACE,
+ CTL_SS_ERROR
+} ctl_stats_status;
+
+typedef enum {
+ CTL_STATS_FLAG_NONE = 0x00,
+ CTL_STATS_FLAG_TIME_VALID = 0x01
+} ctl_stats_flags;
+
+struct ctl_stats {
+ int alloc_len; /* passed to kernel */
+ struct ctl_lun_io_stats *lun_stats; /* passed to/from kernel */
+ int fill_len; /* passed to userland */
+ int num_luns; /* passed to userland */
+ ctl_stats_status status; /* passed to userland */
+ ctl_stats_flags flags; /* passed to userland */
+ struct timespec timestamp; /* passed to userland */
+};
+
+/*
+ * The types of errors that can be injected:
+ *
+ * NONE: No error specified.
+ * ABORTED: SSD_KEY_ABORTED_COMMAND, 0x45, 0x00
+ * MEDIUM_ERR: Medium error, different asc/ascq depending on read/write.
+ * UA: Unit attention.
+ * CUSTOM: User specifies the sense data.
+ * TYPE: Mask to use with error types.
+ *
+ * Flags that affect injection behavior:
+ * CONTINUOUS: This error will stay around until explicitly cleared.
+ * DESCRIPTOR: Use descriptor sense instead of fixed sense.
+ */
+typedef enum {
+ CTL_LUN_INJ_NONE = 0x000,
+ CTL_LUN_INJ_ABORTED = 0x001,
+ CTL_LUN_INJ_MEDIUM_ERR = 0x002,
+ CTL_LUN_INJ_UA = 0x003,
+ CTL_LUN_INJ_CUSTOM = 0x004,
+ CTL_LUN_INJ_TYPE = 0x0ff,
+ CTL_LUN_INJ_CONTINUOUS = 0x100,
+ CTL_LUN_INJ_DESCRIPTOR = 0x200
+} ctl_lun_error;
+
+/*
+ * Flags to specify what type of command the given error pattern will
+ * execute on. The first group of types can be ORed together.
+ *
+ * READ: Any read command.
+ * WRITE: Any write command.
+ * READWRITE: Any read or write command.
+ * READCAP: Any read capacity command.
+ * TUR: Test Unit Ready.
+ * ANY: Any command.
+ * MASK: Mask for basic command patterns.
+ *
+ * Special types:
+ *
+ * CMD: The CDB to act on is specified in struct ctl_error_desc_cmd.
+ * RANGE: For read/write commands, act when the LBA is in the
+ * specified range.
+ */
+typedef enum {
+ CTL_LUN_PAT_NONE = 0x000,
+ CTL_LUN_PAT_READ = 0x001,
+ CTL_LUN_PAT_WRITE = 0x002,
+ CTL_LUN_PAT_READWRITE = CTL_LUN_PAT_READ | CTL_LUN_PAT_WRITE,
+ CTL_LUN_PAT_READCAP = 0x004,
+ CTL_LUN_PAT_TUR = 0x008,
+ CTL_LUN_PAT_ANY = 0x0ff,
+ CTL_LUN_PAT_MASK = 0x0ff,
+ CTL_LUN_PAT_CMD = 0x100,
+ CTL_LUN_PAT_RANGE = 0x200
+} ctl_lun_error_pattern;
+
+/*
+ * This structure allows the user to specify a particular CDB pattern to
+ * look for.
+ *
+ * cdb_pattern: Fill in the relevant bytes to look for in the CDB.
+ * cdb_valid_bytes: Bitmask specifying valid bytes in the cdb_pattern.
+ * flags: Specify any command flags (see ctl_io_flags) that
+ * should be set.
+ */
+struct ctl_error_desc_cmd {
+ uint8_t cdb_pattern[CTL_MAX_CDBLEN];
+ uint32_t cdb_valid_bytes;
+ uint32_t flags;
+};
+
+/*
+ * Error injection descriptor.
+ *
+ * target_id: Target ID to act on.
+ * lun_id LUN to act on.
+ * lun_error: The type of error to inject. See above for descriptions.
+ * error_pattern: What kind of command to act on. See above.
+ * cmd_desc: For CTL_LUN_PAT_CMD only.
+ * lba_range: For CTL_LUN_PAT_RANGE only.
+ * custom_sense: Specify sense. For CTL_LUN_INJ_CUSTOM only.
+ * serial: Serial number returned by the kernel. Use for deletion.
+ * links: Kernel use only.
+ */
+struct ctl_error_desc {
+ uint32_t target_id; /* To kernel */
+ uint32_t lun_id; /* To kernel */
+ ctl_lun_error lun_error; /* To kernel */
+ ctl_lun_error_pattern error_pattern; /* To kernel */
+ struct ctl_error_desc_cmd cmd_desc; /* To kernel */
+ struct ctl_lba_len lba_range; /* To kernel */
+ struct scsi_sense_data custom_sense; /* To kernel */
+ uint64_t serial; /* From kernel */
+ STAILQ_ENTRY(ctl_error_desc) links; /* Kernel use only */
+};
+
+typedef enum {
+ CTL_OOA_FLAG_NONE = 0x00,
+ CTL_OOA_FLAG_ALL_LUNS = 0x01
+} ctl_ooa_flags;
+
+typedef enum {
+ CTL_OOA_OK,
+ CTL_OOA_NEED_MORE_SPACE,
+ CTL_OOA_ERROR
+} ctl_get_ooa_status;
+
+typedef enum {
+ CTL_OOACMD_FLAG_NONE = 0x00,
+ CTL_OOACMD_FLAG_DMA = 0x01,
+ CTL_OOACMD_FLAG_BLOCKED = 0x02,
+ CTL_OOACMD_FLAG_ABORT = 0x04,
+ CTL_OOACMD_FLAG_RTR = 0x08,
+ CTL_OOACMD_FLAG_DMA_QUEUED = 0x10
+} ctl_ooa_cmd_flags;
+
+struct ctl_ooa_entry {
+ ctl_ooa_cmd_flags cmd_flags;
+ uint8_t cdb[CTL_MAX_CDBLEN];
+ uint8_t cdb_len;
+ uint32_t tag_num;
+ uint32_t lun_num;
+ struct bintime start_bt;
+};
+
+struct ctl_ooa {
+ ctl_ooa_flags flags; /* passed to kernel */
+ uint64_t lun_num; /* passed to kernel */
+ uint32_t alloc_len; /* passed to kernel */
+ uint32_t alloc_num; /* passed to kernel */
+ struct ctl_ooa_entry *entries; /* filled in kernel */
+ uint32_t fill_len; /* passed to userland */
+ uint32_t fill_num; /* passed to userland */
+ uint32_t dropped_num; /* passed to userland */
+ struct bintime cur_bt; /* passed to userland */
+ ctl_get_ooa_status status; /* passed to userland */
+};
+
+typedef enum {
+ CTL_PORT_LIST_NONE,
+ CTL_PORT_LIST_OK,
+ CTL_PORT_LIST_NEED_MORE_SPACE,
+ CTL_PORT_LIST_ERROR
+} ctl_port_list_status;
+
+struct ctl_port_list {
+ uint32_t alloc_len; /* passed to kernel */
+ uint32_t alloc_num; /* passed to kernel */
+ struct ctl_port_entry *entries; /* filled in kernel */
+ uint32_t fill_len; /* passed to userland */
+ uint32_t fill_num; /* passed to userland */
+ uint32_t dropped_num; /* passed to userland */
+ ctl_port_list_status status; /* passed to userland */
+};
+
+typedef enum {
+ CTL_LUN_NOSTATUS,
+ CTL_LUN_OK,
+ CTL_LUN_ERROR
+} ctl_lun_status;
+
+#define CTL_ERROR_STR_LEN 160
+
+#define CTL_BEARG_RD 0x01
+#define CTL_BEARG_WR 0x02
+#define CTL_BEARG_RW (CTL_BEARG_RD|CTL_BEARG_WR)
+#define CTL_BEARG_ASCII 0x04
+
+/*
+ * Backend Argument:
+ *
+ * namelen: Length of the name field, including the terminating NUL.
+ *
+ * name: Name of the paramter. This must be NUL-terminated.
+ *
+ * flags: Flags for the parameter, see above for values.
+ *
+ * vallen: Length of the value in bytes.
+ *
+ * value: Value to be set/fetched.
+ *
+ * kname: For kernel use only.
+ *
+ * kvalue: For kernel use only.
+ */
+struct ctl_be_arg {
+ int namelen;
+ char *name;
+ int flags;
+ int vallen;
+ void *value;
+
+ char *kname;
+ void *kvalue;
+};
+
+typedef enum {
+ CTL_LUNREQ_CREATE,
+ CTL_LUNREQ_RM
+} ctl_lunreq_type;
+
+
+/*
+ * LUN creation parameters:
+ *
+ * flags: Various LUN flags, see ctl_backend.h for a
+ * description of the flag values and meanings.
+ *
+ * device_type: The SCSI device type. e.g. 0 for Direct Access,
+ * 3 for Processor, etc. Only certain backends may
+ * support setting this field. The CTL_LUN_FLAG_DEV_TYPE
+ * flag should be set in the flags field if the device
+ * type is set.
+ *
+ * lun_size_bytes: The size of the LUN in bytes. For some backends
+ * this is relevant (e.g. ramdisk), for others, it may
+ * be ignored in favor of using the properties of the
+ * backing store. If specified, this should be a
+ * multiple of the blocksize.
+ *
+ * The actual size of the LUN is returned in this
+ * field.
+ *
+ * blocksize_bytes: The LUN blocksize in bytes. For some backends this
+ * is relevant, for others it may be ignored in
+ * favor of using the properties of the backing store.
+ *
+ * The actual blocksize of the LUN is returned in this
+ * field.
+ *
+ * req_lun_id: The requested LUN ID. The CTL_LUN_FLAG_ID_REQ flag
+ * should be set if this is set. The request will be
+ * granted if the LUN number is available, otherwise
+ * the LUN addition request will fail.
+ *
+ * The allocated LUN number is returned in this field.
+ *
+ * serial_num: This is the value returned in SCSI INQUIRY VPD page
+ * 0x80. If it is specified, the CTL_LUN_FLAG_SERIAL_NUM
+ * flag should be set.
+ *
+ * The serial number value used is returned in this
+ * field.
+ *
+ * device_id: This is the value returned in the T10 vendor ID
+ * based DESIGNATOR field in the SCSI INQUIRY VPD page
+ * 0x83 data. If it is specified, the CTL_LUN_FLAG_DEVID
+ * flag should be set.
+ *
+ * The device id value used is returned in this field.
+ */
+struct ctl_lun_create_params {
+ ctl_backend_lun_flags flags;
+ uint8_t device_type;
+ uint64_t lun_size_bytes;
+ uint32_t blocksize_bytes;
+ uint32_t req_lun_id;
+ uint8_t serial_num[CTL_SN_LEN];
+ uint8_t device_id[CTL_DEVID_LEN];
+};
+
+/*
+ * LUN removal parameters:
+ *
+ * lun_id: The number of the LUN to delete. This must be set.
+ * The LUN must be backed by the given backend.
+ */
+struct ctl_lun_rm_params {
+ uint32_t lun_id;
+};
+
+/*
+ * Union of request type data. Fill in the appropriate union member for
+ * the request type.
+ */
+union ctl_lunreq_data {
+ struct ctl_lun_create_params create;
+ struct ctl_lun_rm_params rm;
+};
+
+/*
+ * LUN request interface:
+ *
+ * backend: This is required, and is NUL-terminated a string
+ * that is the name of the backend, like "ramdisk" or
+ * "block".
+ *
+ * reqtype: The type of request, CTL_LUNREQ_CREATE to create a
+ * LUN, CTL_LUNREQ_RM to delete a LUN.
+ *
+ * reqdata: Request type-specific information. See the
+ * description of individual the union members above
+ * for more information.
+ *
+ * num_be_args: This is the number of backend-specific arguments
+ * in the be_args array.
+ *
+ * be_args: This is an array of backend-specific arguments.
+ * See above for a description of the fields in this
+ * structure.
+ *
+ * status: Status of the LUN request.
+ *
+ * error_str: If the status is CTL_LUN_ERROR, this will
+ * contain a string describing the error.
+ *
+ * kern_be_args: For kernel use only.
+ */
+struct ctl_lun_req {
+ char backend[CTL_BE_NAME_LEN];
+ ctl_lunreq_type reqtype;
+ union ctl_lunreq_data reqdata;
+ int num_be_args;
+ struct ctl_be_arg *be_args;
+ ctl_lun_status status;
+ char error_str[CTL_ERROR_STR_LEN];
+ struct ctl_be_arg *kern_be_args;
+};
+
+/*
+ * LUN list status:
+ *
+ * NONE: No status.
+ *
+ * OK: Request completed successfully.
+ *
+ * NEED_MORE_SPACE: The allocated length of the entries field is too
+ * small for the available data.
+ *
+ * ERROR: An error occured, look at the error string for a
+ * description of the error.
+ */
+typedef enum {
+ CTL_LUN_LIST_NONE,
+ CTL_LUN_LIST_OK,
+ CTL_LUN_LIST_NEED_MORE_SPACE,
+ CTL_LUN_LIST_ERROR
+} ctl_lun_list_status;
+
+/*
+ * LUN list interface
+ *
+ * backend_name: This is a NUL-terminated string. If the string
+ * length is 0, then all LUNs on all backends will
+ * be enumerated. Otherwise this is the name of the
+ * backend to be enumerated, like "ramdisk" or "block".
+ *
+ * alloc_len: The length of the data buffer allocated for entries.
+ * In order to properly size the buffer, make one call
+ * with alloc_len set to 0, and then use the returned
+ * dropped_len as the buffer length to allocate and
+ * pass in on a subsequent call.
+ *
+ * lun_xml: XML-formatted information on the requested LUNs.
+ *
+ * fill_len: The amount of data filled in the storage for entries.
+ *
+ * status: The status of the request. See above for the
+ * description of the values of this field.
+ *
+ * error_str: If the status indicates an error, this string will
+ * be filled in to describe the error.
+ */
+struct ctl_lun_list {
+ char backend[CTL_BE_NAME_LEN]; /* passed to kernel*/
+ uint32_t alloc_len; /* passed to kernel */
+ char *lun_xml; /* filled in kernel */
+ uint32_t fill_len; /* passed to userland */
+ ctl_lun_list_status status; /* passed to userland */
+ char error_str[CTL_ERROR_STR_LEN];
+ /* passed to userland */
+};
+
+#define CTL_IO _IOWR(CTL_MINOR, 0x00, union ctl_io)
+#define CTL_ENABLE_PORT _IOW(CTL_MINOR, 0x04, struct ctl_port_entry)
+#define CTL_DISABLE_PORT _IOW(CTL_MINOR, 0x05, struct ctl_port_entry)
+#define CTL_DUMP_OOA _IO(CTL_MINOR, 0x06)
+#define CTL_CHECK_OOA _IOWR(CTL_MINOR, 0x07, struct ctl_ooa_info)
+#define CTL_HARD_STOP _IOR(CTL_MINOR, 0x08, \
+ struct ctl_hard_startstop_info)
+#define CTL_HARD_START _IOR(CTL_MINOR, 0x09, \
+ struct ctl_hard_startstop_info)
+#define CTL_DELAY_IO _IOWR(CTL_MINOR, 0x10, struct ctl_io_delay_info)
+#define CTL_REALSYNC_GET _IOR(CTL_MINOR, 0x11, int)
+#define CTL_REALSYNC_SET _IOW(CTL_MINOR, 0x12, int)
+#define CTL_SETSYNC _IOWR(CTL_MINOR, 0x13, struct ctl_sync_info)
+#define CTL_GETSYNC _IOWR(CTL_MINOR, 0x14, struct ctl_sync_info)
+#define CTL_GETSTATS _IOWR(CTL_MINOR, 0x15, struct ctl_stats)
+#define CTL_ERROR_INJECT _IOWR(CTL_MINOR, 0x16, struct ctl_error_desc)
+#define CTL_BBRREAD _IOWR(CTL_MINOR, 0x17, struct ctl_bbrread_info)
+#define CTL_GET_OOA _IOWR(CTL_MINOR, 0x18, struct ctl_ooa)
+#define CTL_DUMP_STRUCTS _IO(CTL_MINOR, 0x19)
+#define CTL_GET_PORT_LIST _IOWR(CTL_MINOR, 0x20, struct ctl_port_list)
+#define CTL_LUN_REQ _IOWR(CTL_MINOR, 0x21, struct ctl_lun_req)
+#define CTL_LUN_LIST _IOWR(CTL_MINOR, 0x22, struct ctl_lun_list)
+#define CTL_ERROR_INJECT_DELETE _IOW(CTL_MINOR, 0x23, struct ctl_error_desc)
+#define CTL_SET_PORT_WWNS _IOW(CTL_MINOR, 0x24, struct ctl_port_entry)
+
+#endif /* _CTL_IOCTL_H_ */
+
+/*
+ * vim: ts=8
+ */
diff --git a/sys/cam/ctl/ctl_mem_pool.c b/sys/cam/ctl/ctl_mem_pool.c
new file mode 100644
index 0000000..801fbc9
--- /dev/null
+++ b/sys/cam/ctl/ctl_mem_pool.c
@@ -0,0 +1,192 @@
+/*-
+ * Copyright (c) 2003, 2004 Silicon Graphics International Corp.
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_mem_pool.c#1 $
+ */
+/*
+ * CAM Target Layer memory pool code.
+ *
+ * Author: Ken Merry <ken@FreeBSD.org>
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/kernel.h>
+#include <sys/types.h>
+#include <sys/malloc.h>
+#include <sys/lock.h>
+#include <sys/mutex.h>
+#include <sys/condvar.h>
+#include <sys/queue.h>
+
+#include <cam/ctl/ctl_mem_pool.h>
+
+MALLOC_DEFINE(M_CTL_POOL, "ctlpool", "CTL memory pool");
+
+int
+ctl_init_mem_pool(struct ctl_mem_pool *pool, int chunk_size,
+ ctl_mem_pool_flags flags, int grow_inc,
+ int initial_pool_size)
+{
+ pool->flags = flags;
+ pool->chunk_size = chunk_size;
+ pool->grow_inc = grow_inc;
+ mtx_init(&pool->lock, "Pool mutex", NULL, MTX_DEF);
+ STAILQ_INIT(&pool->free_mem_list);
+ cv_init(&pool->wait_mem, "CTL mem pool");
+
+ if (ctl_grow_mem_pool(pool, initial_pool_size, /*can_wait*/ 1) !=
+ initial_pool_size)
+ return (1);
+ else
+ return (0);
+}
+
+struct ctl_mem_element *
+ctl_alloc_mem_element(struct ctl_mem_pool *pool, int can_wait)
+{
+ struct ctl_mem_element *mem;
+
+ for (;;) {
+ mtx_lock(&pool->lock);
+
+ mem = STAILQ_FIRST(&pool->free_mem_list);
+ if (mem != NULL) {
+ STAILQ_REMOVE(&pool->free_mem_list, mem,
+ ctl_mem_element, links);
+ mem->flags = CTL_MEM_ELEMENT_PREALLOC;
+ }
+ mtx_unlock(&pool->lock);
+
+ if (mem != NULL)
+ return (mem);
+
+ /*
+ * Grow the pool permanantly by the requested increment
+ * instead of temporarily. This has the effect that
+ * whatever the high water mark of transactions is for
+ * this pool, we'll keep that much memory around.
+ */
+ if (pool->flags & CTL_MEM_POOL_PERM_GROW) {
+ if (ctl_grow_mem_pool(pool, pool->grow_inc,
+ can_wait) != 0)
+ continue;
+ }
+ mem = (struct ctl_mem_element *)malloc(sizeof(*mem),
+ M_CTL_POOL, can_wait ? M_WAITOK : M_NOWAIT);
+
+ if (mem != NULL) {
+ mem->flags = CTL_MEM_ELEMENT_NONE;
+ mem->pool = pool;
+
+ mem->bytes = malloc(pool->chunk_size, M_CTL_POOL,
+ can_wait ? M_WAITOK : M_NOWAIT);
+ if (mem->bytes == NULL) {
+ free(mem, M_CTL_POOL);
+ mem = NULL;
+ } else {
+ return (mem);
+ }
+ }
+
+ if (can_wait == 0)
+ return (NULL);
+
+ cv_wait_unlock(&pool->wait_mem, &pool->lock);
+ }
+}
+
+void
+ctl_free_mem_element(struct ctl_mem_element *mem)
+{
+ struct ctl_mem_pool *pool;
+
+ pool = mem->pool;
+
+ if (mem->flags & CTL_MEM_ELEMENT_PREALLOC) {
+ mtx_lock(&pool->lock);
+ STAILQ_INSERT_TAIL(&pool->free_mem_list, mem, links);
+ mtx_unlock(&pool->lock);
+ cv_broadcast(&pool->wait_mem);
+ } else
+ free(mem, M_CTL_POOL);
+}
+
+int
+ctl_grow_mem_pool(struct ctl_mem_pool *pool, int count, int can_wait)
+{
+ int i;
+
+ for (i = 0; i < count; i++) {
+ struct ctl_mem_element *mem;
+
+ mem = (struct ctl_mem_element *)malloc(sizeof(*mem),
+ M_CTL_POOL, can_wait ? M_WAITOK : M_NOWAIT);
+
+ if (mem == NULL)
+ break;
+
+ mem->bytes = malloc(pool->chunk_size, M_CTL_POOL, can_wait ?
+ M_WAITOK : M_NOWAIT);
+ if (mem->bytes == NULL) {
+ free(mem, M_CTL_POOL);
+ break;
+ }
+ mem->flags = CTL_MEM_ELEMENT_PREALLOC;
+ mem->pool = pool;
+ mtx_lock(&pool->lock);
+ STAILQ_INSERT_TAIL(&pool->free_mem_list, mem, links);
+ mtx_unlock(&pool->lock);
+ }
+
+ return (i);
+}
+
+int
+ctl_shrink_mem_pool(struct ctl_mem_pool *pool)
+{
+ struct ctl_mem_element *mem, *mem_next;
+
+ mtx_lock(&pool->lock);
+ for (mem = STAILQ_FIRST(&pool->free_mem_list); mem != NULL;
+ mem = mem_next) {
+ mem_next = STAILQ_NEXT(mem, links);
+
+ STAILQ_REMOVE(&pool->free_mem_list, mem, ctl_mem_element,
+ links);
+ free(mem->bytes, M_CTL_POOL);
+ free(mem, M_CTL_POOL);
+ }
+ mtx_unlock(&pool->lock);
+
+ return (0);
+}
diff --git a/sys/cam/ctl/ctl_mem_pool.h b/sys/cam/ctl/ctl_mem_pool.h
new file mode 100644
index 0000000..a1df7e3
--- /dev/null
+++ b/sys/cam/ctl/ctl_mem_pool.h
@@ -0,0 +1,83 @@
+/*-
+ * Copyright (c) 2003, 2004 Silicon Graphics International Corp.
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_mem_pool.h#1 $
+ * $FreeBSD$
+ */
+/*
+ * CAM Target Layer memory pool code.
+ *
+ * Author: Ken Merry <ken@FreeBSD.org>
+ */
+
+#ifndef _CTL_MEMPOOL_H_
+#define _CTL_MEMPOOL_H_
+
+typedef enum {
+ CTL_MEM_POOL_NONE,
+ CTL_MEM_POOL_PERM_GROW
+} ctl_mem_pool_flags;
+
+struct ctl_mem_pool {
+ ctl_mem_pool_flags flags;
+ int chunk_size;
+ int grow_inc;
+ struct mtx lock;
+ struct cv wait_mem;
+ STAILQ_HEAD(, ctl_mem_element) free_mem_list;
+};
+
+typedef enum {
+ CTL_MEM_ELEMENT_NONE,
+ CTL_MEM_ELEMENT_PREALLOC
+} ctl_mem_element_flags;
+
+struct ctl_mem_element {
+ ctl_mem_element_flags flags;
+ struct ctl_mem_pool *pool;
+ uint8_t *bytes;
+ STAILQ_ENTRY(ctl_mem_element) links;
+};
+
+#ifdef _KERNEL
+
+MALLOC_DECLARE(M_CTL_POOL);
+
+int ctl_init_mem_pool(struct ctl_mem_pool *pool, int chunk_size,
+ ctl_mem_pool_flags flags, int grow_inc,
+ int initial_pool_size);
+struct ctl_mem_element *ctl_alloc_mem_element(struct ctl_mem_pool *pool,
+ int can_wait);
+void ctl_free_mem_element(struct ctl_mem_element *mem);
+int ctl_grow_mem_pool(struct ctl_mem_pool *pool, int count,
+ int can_wait);
+int ctl_shrink_mem_pool(struct ctl_mem_pool *pool);
+#endif /* _KERNEL */
+
+#endif /* _CTL_MEMPOOL_H_ */
diff --git a/sys/cam/ctl/ctl_private.h b/sys/cam/ctl/ctl_private.h
new file mode 100644
index 0000000..864027d
--- /dev/null
+++ b/sys/cam/ctl/ctl_private.h
@@ -0,0 +1,493 @@
+/*-
+ * Copyright (c) 2003, 2004, 2005, 2008 Silicon Graphics International Corp.
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_private.h#7 $
+ * $FreeBSD$
+ */
+/*
+ * CAM Target Layer driver private data structures/definitions.
+ *
+ * Author: Ken Merry <ken@FreeBSD.org>
+ */
+
+#ifndef _CTL_PRIVATE_H_
+#define _CTL_PRIVATE_H_
+
+/*
+ * SCSI vendor and product names.
+ */
+#define CTL_VENDOR "FREEBSD "
+#define CTL_DIRECT_PRODUCT "CTLDISK "
+#define CTL_PROCESSOR_PRODUCT "CTLPROCESSOR "
+#define CTL_UNKNOWN_PRODUCT "CTLDEVICE "
+
+struct ctl_fe_ioctl_startstop_info {
+ struct cv sem;
+ struct ctl_hard_startstop_info hs_info;
+};
+
+struct ctl_fe_ioctl_bbrread_info {
+ struct cv sem;
+ struct ctl_bbrread_info *bbr_info;
+ int wakeup_done;
+ struct mtx *lock;
+};
+
+typedef enum {
+ CTL_IOCTL_INPROG,
+ CTL_IOCTL_DATAMOVE,
+ CTL_IOCTL_DONE
+} ctl_fe_ioctl_state;
+
+struct ctl_fe_ioctl_params {
+ struct cv sem;
+ struct mtx ioctl_mtx;
+ ctl_fe_ioctl_state state;
+};
+
+#define CTL_POOL_ENTRIES_INTERNAL 200
+#define CTL_POOL_ENTRIES_EMERGENCY 300
+#define CTL_POOL_ENTRIES_OTHER_SC 200
+
+typedef enum {
+ CTL_POOL_INTERNAL,
+ CTL_POOL_FETD,
+ CTL_POOL_EMERGENCY,
+ CTL_POOL_IOCTL,
+ CTL_POOL_4OTHERSC
+} ctl_pool_type;
+
+typedef enum {
+ CTL_POOL_FLAG_NONE = 0x00,
+ CTL_POOL_FLAG_INVALID = 0x01
+} ctl_pool_flags;
+
+struct ctl_io_pool {
+ ctl_pool_type type;
+ ctl_pool_flags flags;
+ uint32_t id;
+ struct ctl_softc *ctl_softc;
+ uint32_t refcount;
+ uint64_t total_allocated;
+ uint64_t total_freed;
+ int32_t total_ctl_io;
+ int32_t free_ctl_io;
+ STAILQ_HEAD(, ctl_io_hdr) free_queue;
+ STAILQ_ENTRY(ctl_io_pool) links;
+};
+
+typedef enum {
+ CTL_IOCTL_FLAG_NONE = 0x00,
+ CTL_IOCTL_FLAG_ENABLED = 0x01
+} ctl_ioctl_flags;
+
+struct ctl_ioctl_info {
+ ctl_ioctl_flags flags;
+ uint32_t cur_tag_num;
+ struct ctl_frontend fe;
+ char port_name[24];
+};
+
+typedef enum {
+ CTL_SER_BLOCK,
+ CTL_SER_EXTENT,
+ CTL_SER_PASS,
+ CTL_SER_SKIP
+} ctl_serialize_action;
+
+typedef enum {
+ CTL_ACTION_BLOCK,
+ CTL_ACTION_OVERLAP,
+ CTL_ACTION_OVERLAP_TAG,
+ CTL_ACTION_PASS,
+ CTL_ACTION_SKIP,
+ CTL_ACTION_ERROR
+} ctl_action;
+
+/*
+ * WARNING: Keep the bottom nibble here free, we OR in the data direction
+ * flags for each command.
+ *
+ * Note: "OK_ON_ALL_LUNS" == we don't have to have a lun configured
+ * "OK_ON_BOTH" == we have to have a lun configured
+ */
+typedef enum {
+ CTL_CMD_FLAG_NONE = 0x0000,
+ CTL_CMD_FLAG_NO_SENSE = 0x0010,
+ CTL_CMD_FLAG_OK_ON_ALL_LUNS = 0x0020,
+ CTL_CMD_FLAG_ALLOW_ON_RESV = 0x0040,
+ CTL_CMD_FLAG_OK_ON_PROC = 0x0100,
+ CTL_CMD_FLAG_OK_ON_SLUN = 0x0200,
+ CTL_CMD_FLAG_OK_ON_BOTH = 0x0300,
+ CTL_CMD_FLAG_OK_ON_STOPPED = 0x0400,
+ CTL_CMD_FLAG_OK_ON_INOPERABLE = 0x0800,
+ CTL_CMD_FLAG_OK_ON_OFFLINE = 0x1000,
+ CTL_CMD_FLAG_OK_ON_SECONDARY = 0x2000,
+ CTL_CMD_FLAG_ALLOW_ON_PR_RESV = 0x4000
+} ctl_cmd_flags;
+
+typedef enum {
+ CTL_SERIDX_TUR = 0,
+ CTL_SERIDX_READ,
+ CTL_SERIDX_WRITE,
+ CTL_SERIDX_MD_SNS,
+ CTL_SERIDX_MD_SEL,
+ CTL_SERIDX_RQ_SNS,
+ CTL_SERIDX_INQ,
+ CTL_SERIDX_RD_CAP,
+ CTL_SERIDX_RESV,
+ CTL_SERIDX_REL,
+ CTL_SERIDX_LOG_SNS,
+ CTL_SERIDX_FORMAT,
+ CTL_SERIDX_START,
+ CTL_SERIDX_PRES_IN,
+ CTL_SERIDX_PRES_OUT,
+ CTL_SERIDX_MAIN_IN,
+ /* TBD: others to be filled in as needed */
+ CTL_SERIDX_COUNT, /* LAST, not a normal code, provides # codes */
+ CTL_SERIDX_INVLD = CTL_SERIDX_COUNT
+} ctl_seridx;
+
+typedef int ctl_opfunc(struct ctl_scsiio *ctsio);
+
+struct ctl_cmd_entry {
+ ctl_opfunc *execute;
+ ctl_seridx seridx;
+ ctl_cmd_flags flags;
+ ctl_lun_error_pattern pattern;
+};
+
+typedef enum {
+ CTL_LUN_NONE = 0x000,
+ CTL_LUN_CONTROL = 0x001,
+ CTL_LUN_RESERVED = 0x002,
+ CTL_LUN_INVALID = 0x004,
+ CTL_LUN_DISABLED = 0x008,
+ CTL_LUN_MALLOCED = 0x010,
+ CTL_LUN_STOPPED = 0x020,
+ CTL_LUN_INOPERABLE = 0x040,
+ CTL_LUN_OFFLINE = 0x080,
+ CTL_LUN_PR_RESERVED = 0x100,
+ CTL_LUN_PRIMARY_SC = 0x200,
+ CTL_LUN_SENSE_DESC = 0x400
+} ctl_lun_flags;
+
+typedef enum {
+ CTLBLOCK_FLAG_NONE = 0x00,
+ CTLBLOCK_FLAG_INVALID = 0x01
+} ctlblock_flags;
+
+union ctl_softcs {
+ struct ctl_softc *ctl_softc;
+ struct ctlblock_softc *ctlblock_softc;
+};
+
+/*
+ * Mode page defaults.
+ */
+#if 0
+/*
+ * These values make Solaris trim off some of the capacity.
+ */
+#define CTL_DEFAULT_SECTORS_PER_TRACK 63
+#define CTL_DEFAULT_HEADS 255
+/*
+ * These values seem to work okay.
+ */
+#define CTL_DEFAULT_SECTORS_PER_TRACK 63
+#define CTL_DEFAULT_HEADS 16
+/*
+ * These values work reasonably well.
+ */
+#define CTL_DEFAULT_SECTORS_PER_TRACK 512
+#define CTL_DEFAULT_HEADS 64
+#endif
+
+/*
+ * Solaris is somewhat picky about how many heads and sectors per track you
+ * have defined in mode pages 3 and 4. These values seem to cause Solaris
+ * to get the capacity more or less right when you run the format tool.
+ * They still have problems when dealing with devices larger than 1TB,
+ * but there isn't anything we can do about that.
+ *
+ * For smaller LUN sizes, this ends up causing the number of cylinders to
+ * work out to 0. Solaris actually recognizes that and comes up with its
+ * own bogus geometry to fit the actual capacity of the drive. They really
+ * should just give up on geometry and stick to the read capacity
+ * information alone for modern disk drives.
+ *
+ * One thing worth mentioning about Solaris' mkfs command is that it
+ * doesn't like sectors per track values larger than 256. 512 seems to
+ * work okay for format, but causes problems when you try to make a
+ * filesystem.
+ *
+ * Another caveat about these values: the product of these two values
+ * really should be a power of 2. This is because of the simplistic
+ * shift-based calculation that we have to use on the i386 platform to
+ * calculate the number of cylinders here. (If you use a divide, you end
+ * up calling __udivdi3(), which is a hardware FP call on the PC. On the
+ * XScale, it is done in software, so you can do that from inside the
+ * kernel.)
+ *
+ * So for the current values (256 S/T, 128 H), we get 32768, which works
+ * very nicely for calculating cylinders.
+ *
+ * If you want to change these values so that their product is no longer a
+ * power of 2, re-visit the calculation in ctl_init_page_index(). You may
+ * need to make it a bit more complicated to get the number of cylinders
+ * right.
+ */
+#define CTL_DEFAULT_SECTORS_PER_TRACK 256
+#define CTL_DEFAULT_HEADS 128
+
+#define CTL_DEFAULT_ROTATION_RATE 10000
+
+struct ctl_page_index;
+
+typedef int ctl_modesen_handler(struct ctl_scsiio *ctsio,
+ struct ctl_page_index *page_index,
+ int pc);
+typedef int ctl_modesel_handler(struct ctl_scsiio *ctsio,
+ struct ctl_page_index *page_index,
+ uint8_t *page_ptr);
+
+typedef enum {
+ CTL_PAGE_FLAG_NONE = 0x00,
+ CTL_PAGE_FLAG_DISK_ONLY = 0x01
+} ctl_page_flags;
+
+struct ctl_page_index {
+ uint8_t page_code;
+ uint8_t subpage;
+ uint16_t page_len;
+ uint8_t *page_data;
+ ctl_page_flags page_flags;
+ ctl_modesen_handler *sense_handler;
+ ctl_modesel_handler *select_handler;
+};
+
+#define CTL_PAGE_CURRENT 0x00
+#define CTL_PAGE_CHANGEABLE 0x01
+#define CTL_PAGE_DEFAULT 0x02
+#define CTL_PAGE_SAVED 0x03
+
+static struct ctl_page_index page_index_template[] = {
+ {SMS_FORMAT_DEVICE_PAGE, 0, sizeof(struct scsi_format_page), NULL,
+ CTL_PAGE_FLAG_DISK_ONLY, NULL, NULL},
+ {SMS_RIGID_DISK_PAGE, 0, sizeof(struct scsi_rigid_disk_page), NULL,
+ CTL_PAGE_FLAG_DISK_ONLY, NULL, NULL},
+ {SMS_CACHING_PAGE, 0, sizeof(struct scsi_caching_page), NULL,
+ CTL_PAGE_FLAG_DISK_ONLY, NULL, NULL},
+ {SMS_CONTROL_MODE_PAGE, 0, sizeof(struct scsi_control_page), NULL,
+ CTL_PAGE_FLAG_NONE, NULL, ctl_control_page_handler},
+ {SMS_VENDOR_SPECIFIC_PAGE | SMPH_SPF, PWR_SUBPAGE_CODE,
+ sizeof(struct copan_power_subpage), NULL, CTL_PAGE_FLAG_NONE,
+ ctl_power_sp_sense_handler, ctl_power_sp_handler},
+ {SMS_VENDOR_SPECIFIC_PAGE | SMPH_SPF, APS_SUBPAGE_CODE,
+ sizeof(struct copan_aps_subpage), NULL, CTL_PAGE_FLAG_NONE,
+ NULL, ctl_aps_sp_handler},
+ {SMS_VENDOR_SPECIFIC_PAGE | SMPH_SPF, DBGCNF_SUBPAGE_CODE,
+ sizeof(struct copan_debugconf_subpage), NULL, CTL_PAGE_FLAG_NONE,
+ ctl_debugconf_sp_sense_handler, ctl_debugconf_sp_select_handler},
+};
+
+#define CTL_NUM_MODE_PAGES sizeof(page_index_template)/ \
+ sizeof(page_index_template[0])
+
+struct ctl_mode_pages {
+ struct scsi_format_page format_page[4];
+ struct scsi_rigid_disk_page rigid_disk_page[4];
+ struct scsi_caching_page caching_page[4];
+ struct scsi_control_page control_page[4];
+ struct copan_power_subpage power_subpage[4];
+ struct copan_aps_subpage aps_subpage[4];
+ struct copan_debugconf_subpage debugconf_subpage[4];
+ struct ctl_page_index index[CTL_NUM_MODE_PAGES];
+};
+
+struct ctl_pending_sense {
+ ctl_ua_type ua_pending;
+ struct scsi_sense_data sense;
+};
+
+struct ctl_lun_delay_info {
+ ctl_delay_type datamove_type;
+ uint32_t datamove_delay;
+ ctl_delay_type done_type;
+ uint32_t done_delay;
+};
+
+typedef enum {
+ CTL_ERR_INJ_NONE = 0x00,
+ CTL_ERR_INJ_ABORTED = 0x01
+} ctl_err_inject_flags;
+
+typedef enum {
+ CTL_PR_FLAG_NONE = 0x00,
+ CTL_PR_FLAG_REGISTERED = 0x01,
+ CTL_PR_FLAG_ACTIVE_RES = 0x02
+} ctl_per_res_flags;
+
+struct ctl_per_res_info {
+ struct scsi_per_res_key res_key;
+ uint8_t registered;
+};
+
+#define CTL_PR_ALL_REGISTRANTS 0xFFFF
+#define CTL_PR_NO_RESERVATION 0xFFF0
+
+/*
+ * For report target port groups.
+ */
+#define NUM_TARGET_PORT_GROUPS 2
+#define NUM_PORTS_PER_GRP 2
+
+struct ctl_lun {
+ struct mtx lun_lock;
+ struct ctl_id target;
+ uint64_t lun;
+ ctl_lun_flags flags;
+ STAILQ_HEAD(,ctl_error_desc) error_list;
+ uint64_t error_serial;
+ struct ctl_softc *ctl_softc;
+ struct ctl_be_lun *be_lun;
+ struct ctl_backend_driver *backend;
+ int io_count;
+ struct ctl_lun_delay_info delay_info;
+ int sync_interval;
+ int sync_count;
+ TAILQ_HEAD(ctl_ooaq, ctl_io_hdr) ooa_queue;
+ TAILQ_HEAD(ctl_blockq,ctl_io_hdr) blocked_queue;
+ STAILQ_ENTRY(ctl_lun) links;
+ STAILQ_ENTRY(ctl_lun) run_links;
+ struct ctl_nexus rsv_nexus;
+ uint32_t have_ca[CTL_MAX_INITIATORS >> 5];
+ struct ctl_pending_sense pending_sense[CTL_MAX_INITIATORS];
+ struct ctl_mode_pages mode_pages;
+ struct ctl_lun_io_stats stats;
+ struct ctl_per_res_info per_res[2*CTL_MAX_INITIATORS];
+ unsigned int PRGeneration;
+ int pr_key_count;
+ uint16_t pr_res_idx;
+ uint8_t res_type;
+ uint8_t write_buffer[524288];
+};
+
+typedef enum {
+ CTL_FLAG_TASK_PENDING = 0x01,
+ CTL_FLAG_REAL_SYNC = 0x02,
+ CTL_FLAG_MASTER_SHELF = 0x04
+} ctl_gen_flags;
+
+struct ctl_wwpn_iid {
+ int in_use;
+ uint64_t wwpn;
+ uint32_t iid;
+ int32_t port;
+};
+
+struct ctl_softc {
+ struct mtx ctl_lock;
+ struct cdev *dev;
+ int open_count;
+ struct ctl_id target;
+ int num_disks;
+ int num_luns;
+ ctl_gen_flags flags;
+ ctl_ha_mode ha_mode;
+ struct ctl_ioctl_info ioctl_info;
+ struct ctl_lun lun;
+ struct ctl_io_pool *internal_pool;
+ struct ctl_io_pool *emergency_pool;
+ struct ctl_io_pool *othersc_pool;
+ struct proc *work_thread;
+ int targ_online;
+ uint32_t ctl_lun_mask[CTL_MAX_LUNS >> 5];
+ struct ctl_lun *ctl_luns[CTL_MAX_LUNS];
+ struct ctl_wwpn_iid wwpn_iid[CTL_MAX_PORTS][CTL_MAX_INIT_PER_PORT];
+ uint32_t ctl_port_mask;
+ uint64_t aps_locked_lun;
+ STAILQ_HEAD(, ctl_lun) lun_list;
+ STAILQ_HEAD(, ctl_be_lun) pending_lun_queue;
+ STAILQ_HEAD(, ctl_io_hdr) task_queue;
+ STAILQ_HEAD(, ctl_io_hdr) incoming_queue;
+ STAILQ_HEAD(, ctl_io_hdr) rtr_queue;
+ STAILQ_HEAD(, ctl_io_hdr) done_queue;
+ STAILQ_HEAD(, ctl_io_hdr) isc_queue;
+ uint32_t num_frontends;
+ STAILQ_HEAD(, ctl_frontend) fe_list;
+ struct ctl_frontend *ctl_ports[CTL_MAX_PORTS];
+ uint32_t num_backends;
+ STAILQ_HEAD(, ctl_backend_driver) be_list;
+ uint32_t num_pools;
+ uint32_t cur_pool_id;
+ STAILQ_HEAD(, ctl_io_pool) io_pools;
+ time_t last_print_jiffies;
+ uint32_t skipped_prints;
+};
+
+#ifdef _KERNEL
+
+extern struct ctl_cmd_entry ctl_cmd_table[];
+
+uint32_t ctl_get_initindex(struct ctl_nexus *nexus);
+int ctl_pool_create(struct ctl_softc *ctl_softc, ctl_pool_type pool_type,
+ uint32_t total_ctl_io, struct ctl_io_pool **npool);
+int ctl_pool_acquire(struct ctl_io_pool *pool);
+int ctl_pool_invalidate(struct ctl_io_pool *pool);
+int ctl_pool_release(struct ctl_io_pool *pool);
+void ctl_pool_free(struct ctl_softc *ctl_softc, struct ctl_io_pool *pool);
+int ctl_scsi_release(struct ctl_scsiio *ctsio);
+int ctl_scsi_reserve(struct ctl_scsiio *ctsio);
+int ctl_start_stop(struct ctl_scsiio *ctsio);
+int ctl_sync_cache(struct ctl_scsiio *ctsio);
+int ctl_format(struct ctl_scsiio *ctsio);
+int ctl_write_buffer(struct ctl_scsiio *ctsio);
+int ctl_mode_select(struct ctl_scsiio *ctsio);
+int ctl_mode_sense(struct ctl_scsiio *ctsio);
+int ctl_read_capacity(struct ctl_scsiio *ctsio);
+int ctl_service_action_in(struct ctl_scsiio *ctsio);
+int ctl_read_write(struct ctl_scsiio *ctsio);
+int ctl_report_luns(struct ctl_scsiio *ctsio);
+int ctl_request_sense(struct ctl_scsiio *ctsio);
+int ctl_tur(struct ctl_scsiio *ctsio);
+int ctl_inquiry(struct ctl_scsiio *ctsio);
+int ctl_persistent_reserve_in(struct ctl_scsiio *ctsio);
+int ctl_persistent_reserve_out(struct ctl_scsiio *ctsio);
+int ctl_maintenance_in(struct ctl_scsiio *ctsio);
+void ctl_done_lock(union ctl_io *io, int have_lock);
+int ctl_isc(struct ctl_scsiio *ctsio);
+
+#endif /* _KERNEL */
+
+#endif /* _CTL_PRIVATE_H_ */
+
+/*
+ * vim: ts=8
+ */
diff --git a/sys/cam/ctl/ctl_scsi_all.c b/sys/cam/ctl/ctl_scsi_all.c
new file mode 100644
index 0000000..91b79f3
--- /dev/null
+++ b/sys/cam/ctl/ctl_scsi_all.c
@@ -0,0 +1,227 @@
+/*-
+ * Implementation of Utility functions for all SCSI device types.
+ *
+ * Copyright (c) 1997, 1998, 1999 Justin T. Gibbs.
+ * Copyright (c) 1997, 1998, 2003 Kenneth D. Merry.
+ * 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,
+ * without modification, immediately at the beginning of the file.
+ * 2. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_scsi_all.c#2 $
+ */
+
+#include <sys/param.h>
+
+__FBSDID("$FreeBSD$");
+
+#include <sys/types.h>
+#ifdef _KERNEL
+#include <sys/systm.h>
+#include <sys/libkern.h>
+#include <sys/kernel.h>
+#include <sys/sysctl.h>
+#else
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <inttypes.h>
+#endif
+
+#include <cam/cam.h>
+#include <cam/cam_ccb.h>
+#include <cam/cam_queue.h>
+#include <cam/cam_xpt.h>
+#include <cam/scsi/scsi_all.h>
+
+#include <cam/ctl/ctl_io.h>
+#include <cam/ctl/ctl_scsi_all.h>
+#include <sys/sbuf.h>
+#ifndef _KERNEL
+#include <camlib.h>
+#endif
+
+const char *
+ctl_scsi_status_string(struct ctl_scsiio *ctsio)
+{
+ switch(ctsio->scsi_status) {
+ case SCSI_STATUS_OK:
+ return("OK");
+ case SCSI_STATUS_CHECK_COND:
+ return("Check Condition");
+ case SCSI_STATUS_BUSY:
+ return("Busy");
+ case SCSI_STATUS_INTERMED:
+ return("Intermediate");
+ case SCSI_STATUS_INTERMED_COND_MET:
+ return("Intermediate-Condition Met");
+ case SCSI_STATUS_RESERV_CONFLICT:
+ return("Reservation Conflict");
+ case SCSI_STATUS_CMD_TERMINATED:
+ return("Command Terminated");
+ case SCSI_STATUS_QUEUE_FULL:
+ return("Queue Full");
+ case SCSI_STATUS_ACA_ACTIVE:
+ return("ACA Active");
+ case SCSI_STATUS_TASK_ABORTED:
+ return("Task Aborted");
+ default: {
+ static char unkstr[64];
+ snprintf(unkstr, sizeof(unkstr), "Unknown %#x",
+ ctsio->scsi_status);
+ return(unkstr);
+ }
+ }
+}
+
+/*
+ * scsi_command_string() returns 0 for success and -1 for failure.
+ */
+int
+ctl_scsi_command_string(struct ctl_scsiio *ctsio,
+ struct scsi_inquiry_data *inq_data, struct sbuf *sb)
+{
+ char cdb_str[(SCSI_MAX_CDBLEN * 3) + 1];
+
+ sbuf_printf(sb, "%s. CDB: %s",
+ scsi_op_desc(ctsio->cdb[0], inq_data),
+ scsi_cdb_string(ctsio->cdb, cdb_str, sizeof(cdb_str)));
+
+ return(0);
+}
+
+void
+ctl_scsi_path_string(union ctl_io *io, char *path_str, int len)
+{
+ if (io->io_hdr.nexus.targ_target.wwid[0] == 0) {
+ snprintf(path_str, len, "(%ju:%d:%ju:%d): ",
+ (uintmax_t)io->io_hdr.nexus.initid.id,
+ io->io_hdr.nexus.targ_port,
+ (uintmax_t)io->io_hdr.nexus.targ_target.id,
+ io->io_hdr.nexus.targ_lun);
+ } else {
+ /*
+ * XXX KDM find a better way to display FC WWIDs.
+ */
+#ifdef _KERNEL
+ snprintf(path_str, len, "(%ju:%d:%#jx,%#jx:%d): ",
+ (uintmax_t)io->io_hdr.nexus.initid.id,
+ io->io_hdr.nexus.targ_port,
+ (intmax_t)io->io_hdr.nexus.targ_target.wwid[0],
+ (intmax_t)io->io_hdr.nexus.targ_target.wwid[1],
+ io->io_hdr.nexus.targ_lun);
+#else /* _KERNEL */
+ snprintf(path_str, len, "(%ju:%d:%#jx,%#jx:%d): ",
+ (uintmax_t)io->io_hdr.nexus.initid.id,
+ io->io_hdr.nexus.targ_port,
+ (intmax_t)io->io_hdr.nexus.targ_target.wwid[0],
+ (intmax_t)io->io_hdr.nexus.targ_target.wwid[1],
+ io->io_hdr.nexus.targ_lun);
+#endif /* _KERNEL */
+ }
+}
+
+/*
+ * ctl_scsi_sense_sbuf() returns 0 for success and -1 for failure.
+ */
+int
+ctl_scsi_sense_sbuf(struct ctl_scsiio *ctsio,
+ struct scsi_inquiry_data *inq_data, struct sbuf *sb,
+ scsi_sense_string_flags flags)
+{
+ char path_str[64];
+
+ if ((ctsio == NULL) || (sb == NULL))
+ return(-1);
+
+ ctl_scsi_path_string((union ctl_io *)ctsio, path_str, sizeof(path_str));
+
+ if (flags & SSS_FLAG_PRINT_COMMAND) {
+
+ sbuf_cat(sb, path_str);
+
+ ctl_scsi_command_string(ctsio, inq_data, sb);
+
+ sbuf_printf(sb, "\n");
+ }
+
+ scsi_sense_only_sbuf(&ctsio->sense_data, ctsio->sense_len, sb,
+ path_str, inq_data, ctsio->cdb, ctsio->cdb_len);
+
+ return(0);
+}
+
+char *
+ctl_scsi_sense_string(struct ctl_scsiio *ctsio,
+ struct scsi_inquiry_data *inq_data, char *str,
+ int str_len)
+{
+ struct sbuf sb;
+
+ sbuf_new(&sb, str, str_len, 0);
+
+ ctl_scsi_sense_sbuf(ctsio, inq_data, &sb, SSS_FLAG_PRINT_COMMAND);
+
+ sbuf_finish(&sb);
+
+ return(sbuf_data(&sb));
+}
+
+#ifdef _KERNEL
+void
+ctl_scsi_sense_print(struct ctl_scsiio *ctsio,
+ struct scsi_inquiry_data *inq_data)
+{
+ struct sbuf sb;
+ char str[512];
+
+ sbuf_new(&sb, str, sizeof(str), 0);
+
+ ctl_scsi_sense_sbuf(ctsio, inq_data, &sb, SSS_FLAG_PRINT_COMMAND);
+
+ sbuf_finish(&sb);
+
+ printf("%s", sbuf_data(&sb));
+}
+
+#else /* _KERNEL */
+void
+ctl_scsi_sense_print(struct ctl_scsiio *ctsio,
+ struct scsi_inquiry_data *inq_data, FILE *ofile)
+{
+ struct sbuf sb;
+ char str[512];
+
+ if ((ctsio == NULL) || (ofile == NULL))
+ return;
+
+ sbuf_new(&sb, str, sizeof(str), 0);
+
+ ctl_scsi_sense_sbuf(ctsio, inq_data, &sb, SSS_FLAG_PRINT_COMMAND);
+
+ sbuf_finish(&sb);
+
+ fprintf(ofile, "%s", sbuf_data(&sb));
+}
+
+#endif /* _KERNEL */
+
diff --git a/sys/cam/ctl/ctl_scsi_all.h b/sys/cam/ctl/ctl_scsi_all.h
new file mode 100644
index 0000000..35e2d0a
--- /dev/null
+++ b/sys/cam/ctl/ctl_scsi_all.h
@@ -0,0 +1,52 @@
+/*-
+ * Copyright (c) 1997, 1998, 1999 Justin T. Gibbs.
+ * Copyright (c) 1997, 1998, 2003 Kenneth D. Merry.
+ * 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,
+ * without modification, immediately at the beginning of the file.
+ * 2. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_scsi_all.h#2 $
+ */
+
+__FBSDID("$FreeBSD$");
+
+__BEGIN_DECLS
+const char * ctl_scsi_status_string(struct ctl_scsiio *ctsio);
+#ifdef _KERNEL
+void ctl_scsi_sense_print(struct ctl_scsiio *ctsio,
+ struct scsi_inquiry_data *inq_data);
+#else /* _KERNEL */
+void ctl_scsi_sense_print(struct ctl_scsiio *ctsio,
+ struct scsi_inquiry_data *inq_data,
+ FILE *ofile);
+#endif /* _KERNEL */
+int ctl_scsi_command_string(struct ctl_scsiio *ctsio,
+ struct scsi_inquiry_data *inq_data,struct sbuf *sb);
+int ctl_scsi_sense_sbuf(struct ctl_scsiio *ctsio,
+ struct scsi_inquiry_data *inq_data, struct sbuf *sb,
+ scsi_sense_string_flags flags);
+void ctl_scsi_path_string(union ctl_io *io, char *path_str, int strlen);
+char *ctl_scsi_sense_string(struct ctl_scsiio *ctsio,
+ struct scsi_inquiry_data *inq_data, char *str,
+ int str_len);
+
+__END_DECLS
diff --git a/sys/cam/ctl/ctl_ser_table.c b/sys/cam/ctl/ctl_ser_table.c
new file mode 100644
index 0000000..d862788
--- /dev/null
+++ b/sys/cam/ctl/ctl_ser_table.c
@@ -0,0 +1,81 @@
+/*-
+ * Copyright (c) 2003 Silicon Graphics International Corp.
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_ser_table.c#1 $
+ * $FreeBSD$
+ */
+
+/*
+ * CAM Target Layer command serialization table.
+ *
+ * Author: Kim Le
+ */
+
+/****************************************************************************/
+/* TABLE ctlSerTbl */
+/* */
+/* The matrix which drives the serialization algorithm. The major index */
+/* (the first) into this table is the command being checked and the minor */
+/* index is the command against which the first command is being checked. */
+/* i.e., the major index (row) command is ahead of the minor index command */
+/* (column) in the queue. This allows the code to optimize by capturing */
+/* the result of the first indexing operation into a pointer. */
+/* */
+/* Whenever a new value is added to the IDX_T type, this matrix must be */
+/* expanded by one row AND one column -- Because of this, some effort */
+/* should be made to re-use the indexes whenever possible. */
+/* */
+/****************************************************************************/
+
+#define sK CTL_SER_SKIP /* Skip */
+#define pS CTL_SER_PASS /* pS */
+#define bK CTL_SER_BLOCK /* Blocked */
+#define xT CTL_SER_EXTENT /* Extent check */
+
+static ctl_serialize_action
+ctl_serialize_table[CTL_SERIDX_COUNT][CTL_SERIDX_COUNT] = {
+/**>IDX_ :: 2nd:TUR RD WRT MDSN MDSL RQSN INQ RDCP RES REL LSNS FMT STR PRIN PROT MAININ*/
+/*TUR */{ pS, pS, pS, bK, bK, bK, pS, pS, bK, bK, pS, bK, bK, bK, bK, bK},
+/*READ */{ pS, pS, xT, bK, bK, bK, pS, pS, bK, bK, pS, bK, bK, bK, bK, bK},
+/*WRITE */{ pS, xT, xT, bK, bK, bK, pS, pS, bK, bK, pS, bK, bK, bK, bK, bK},
+/*MD_SNS */{ bK, bK, bK, pS, bK, bK, pS, pS, bK, bK, pS, bK, bK, bK, bK, bK},
+/*MD_SEL */{ bK, bK, bK, bK, bK, bK, pS, pS, bK, bK, pS, bK, bK, bK, bK, bK},
+/*RQ_SNS */{ pS, pS, pS, pS, pS, bK, pS, pS, bK, bK, pS, bK, bK, bK, bK, bK},
+/*INQ */{ pS, pS, pS, pS, pS, bK, pS, pS, bK, bK, pS, bK, bK, bK, bK, bK},
+/*RD_CAP */{ pS, pS, pS, pS, pS, bK, pS, pS, bK, bK, pS, bK, bK, bK, bK, bK},
+/*RESV */{ bK, bK, bK, bK, bK, bK, bK, bK, bK, bK, bK, bK, bK, bK, bK, bK},
+/*REL */{ bK, bK, bK, bK, bK, bK, bK, bK, bK, bK, bK, bK, bK, bK, bK, bK},
+/*LOG_SNS */{ pS, pS, pS, pS, bK, bK, pS, pS, bK, bK, pS, bK, bK, bK, bK, bK},
+/*FORMAT */{ pS, bK, bK, bK, bK, pS, pS, bK, bK, bK, bK, bK, bK, bK, bK, bK},
+/*START */{ bK, bK, bK, bK, bK, bK, pS, bK, bK, bK, bK, bK, bK, bK, bK, bK},
+/*PRES_IN */{ bK, bK, bK, bK, bK, bK, bK, bK, bK, bK, bK, bK, bK, bK, bK, bK},
+/*PRES_OUT*/{ bK, bK, bK, bK, bK, bK, bK, bK, bK, bK, bK, bK, bK, bK, bK, bK},
+/*MAIN_IN */{ bK, bK, bK, bK, bK, bK, pS, bK, bK, bK, bK, bK, bK, bK, bK, pS}
+};
+
diff --git a/sys/cam/ctl/ctl_util.c b/sys/cam/ctl/ctl_util.c
new file mode 100644
index 0000000..3ca0aa2
--- /dev/null
+++ b/sys/cam/ctl/ctl_util.c
@@ -0,0 +1,843 @@
+/*-
+ * Copyright (c) 2003 Silicon Graphics International Corp.
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_util.c#2 $
+ */
+/*
+ * CAM Target Layer SCSI library
+ *
+ * Author: Ken Merry <ken@FreeBSD.org>
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#ifdef _KERNEL
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/kernel.h>
+#include <sys/types.h>
+#include <sys/malloc.h>
+#else /* __KERNEL__ */
+#include <sys/types.h>
+#include <sys/time.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#endif /* __KERNEL__ */
+#include <sys/sbuf.h>
+#include <sys/queue.h>
+#include <sys/callout.h>
+#include <cam/scsi/scsi_all.h>
+#include <cam/ctl/ctl_io.h>
+#include <cam/ctl/ctl_scsi_all.h>
+#include <cam/ctl/ctl_util.h>
+
+struct ctl_status_desc {
+ ctl_io_status status;
+ const char *description;
+};
+
+struct ctl_task_desc {
+ ctl_task_type task_action;
+ const char *description;
+};
+static struct ctl_status_desc ctl_status_table[] = {
+ {CTL_STATUS_NONE, "No Status"},
+ {CTL_SUCCESS, "Command Completed Successfully"},
+ {CTL_CMD_TIMEOUT, "Command Timed Out"},
+ {CTL_SEL_TIMEOUT, "Selection Timeout"},
+ {CTL_ERROR, "Command Failed"},
+ {CTL_SCSI_ERROR, "SCSI Error"},
+ {CTL_CMD_ABORTED, "Command Aborted"},
+};
+
+static struct ctl_task_desc ctl_task_table[] = {
+ {CTL_TASK_ABORT_TASK, "Abort Task"},
+ {CTL_TASK_ABORT_TASK_SET, "Abort Task Set"},
+ {CTL_TASK_CLEAR_ACA, "Clear ACA"},
+ {CTL_TASK_CLEAR_TASK_SET, "Clear Task Set"},
+ {CTL_TASK_LUN_RESET, "LUN Reset"},
+ {CTL_TASK_TARGET_RESET, "Target Reset"},
+ {CTL_TASK_BUS_RESET, "Bus Reset"},
+ {CTL_TASK_PORT_LOGIN, "Port Login"},
+ {CTL_TASK_PORT_LOGOUT, "Port Logout"}
+};
+
+void
+ctl_scsi_tur(union ctl_io *io, ctl_tag_type tag_type, uint8_t control)
+{
+ struct ctl_scsiio *ctsio;
+ struct scsi_test_unit_ready *cdb;
+
+ ctl_scsi_zero_io(io);
+
+ io->io_hdr.io_type = CTL_IO_SCSI;
+ ctsio = &io->scsiio;
+ cdb = (struct scsi_test_unit_ready *)ctsio->cdb;
+
+ cdb->opcode = TEST_UNIT_READY;
+ cdb->control = control;
+ io->io_hdr.flags = CTL_FLAG_DATA_NONE;
+ ctsio->tag_type = tag_type;
+ ctsio->cdb_len = sizeof(*cdb);
+ ctsio->ext_data_len = 0;
+ ctsio->ext_data_ptr = NULL;
+ ctsio->ext_sg_entries = 0;
+ ctsio->ext_data_filled = 0;
+ ctsio->sense_len = SSD_FULL_SIZE;
+}
+
+void
+ctl_scsi_inquiry(union ctl_io *io, uint8_t *data_ptr, int32_t data_len,
+ uint8_t byte2, uint8_t page_code, ctl_tag_type tag_type,
+ uint8_t control)
+{
+ struct ctl_scsiio *ctsio;
+ struct scsi_inquiry *cdb;
+
+ ctl_scsi_zero_io(io);
+
+ io->io_hdr.io_type = CTL_IO_SCSI;
+ ctsio = &io->scsiio;
+ cdb = (struct scsi_inquiry *)ctsio->cdb;
+
+ cdb->opcode = INQUIRY;
+ cdb->byte2 = byte2;
+ cdb->page_code = page_code;
+ cdb->control = control;
+ scsi_ulto2b(data_len, cdb->length);
+ io->io_hdr.io_type = CTL_IO_SCSI;
+ io->io_hdr.flags = CTL_FLAG_DATA_IN;
+ ctsio->tag_type = tag_type;
+ ctsio->cdb_len = sizeof(*cdb);
+ ctsio->ext_data_len = data_len;
+ ctsio->ext_data_ptr = data_ptr;
+ ctsio->ext_sg_entries = 0;
+ ctsio->ext_data_filled = 0;
+ ctsio->sense_len = SSD_FULL_SIZE;
+}
+
+void
+ctl_scsi_request_sense(union ctl_io *io, uint8_t *data_ptr,
+ int32_t data_len, uint8_t byte2, ctl_tag_type tag_type,
+ uint8_t control)
+{
+ struct ctl_scsiio *ctsio;
+ struct scsi_request_sense *cdb;
+
+ ctl_scsi_zero_io(io);
+
+ io->io_hdr.io_type = CTL_IO_SCSI;
+ ctsio = &io->scsiio;
+ cdb = (struct scsi_request_sense *)ctsio->cdb;
+
+ cdb->opcode = REQUEST_SENSE;
+ cdb->byte2 = byte2;
+ cdb->control = control;
+ cdb->length = data_len;
+ io->io_hdr.io_type = CTL_IO_SCSI;
+ io->io_hdr.flags = CTL_FLAG_DATA_IN;
+ ctsio->tag_type = tag_type;
+ ctsio->cdb_len = sizeof(*cdb);
+ ctsio->ext_data_ptr = data_ptr;
+ ctsio->ext_data_len = data_len;
+ ctsio->ext_sg_entries = 0;
+ ctsio->ext_data_filled = 0;
+ ctsio->sense_len = SSD_FULL_SIZE;
+}
+
+void
+ctl_scsi_report_luns(union ctl_io *io, uint8_t *data_ptr, uint32_t data_len,
+ uint8_t select_report, ctl_tag_type tag_type,
+ uint8_t control)
+{
+ struct ctl_scsiio *ctsio;
+ struct scsi_report_luns *cdb;
+
+ ctl_scsi_zero_io(io);
+
+ io->io_hdr.io_type = CTL_IO_SCSI;
+ ctsio = &io->scsiio;
+ cdb = (struct scsi_report_luns *)ctsio->cdb;
+
+ cdb->opcode = REPORT_LUNS;
+ cdb->select_report = select_report;
+ scsi_ulto4b(data_len, cdb->length);
+ cdb->control = control;
+ io->io_hdr.io_type = CTL_IO_SCSI;
+ io->io_hdr.flags = CTL_FLAG_DATA_IN;
+ ctsio->tag_type = tag_type;
+ ctsio->cdb_len = sizeof(*cdb);
+ ctsio->ext_data_ptr = data_ptr;
+ ctsio->ext_data_len = data_len;
+ ctsio->ext_sg_entries = 0;
+ ctsio->ext_data_filled = 0;
+ ctsio->sense_len = SSD_FULL_SIZE;
+}
+
+void
+ctl_scsi_read_write_buffer(union ctl_io *io, uint8_t *data_ptr,
+ uint32_t data_len, int read_buffer, uint8_t mode,
+ uint8_t buffer_id, uint32_t buffer_offset,
+ ctl_tag_type tag_type, uint8_t control)
+{
+ struct ctl_scsiio *ctsio;
+ struct scsi_write_buffer *cdb;
+
+ ctl_scsi_zero_io(io);
+
+ io->io_hdr.io_type = CTL_IO_SCSI;
+ ctsio = &io->scsiio;
+ cdb = (struct scsi_write_buffer *)ctsio->cdb;
+
+ if (read_buffer != 0)
+ cdb->opcode = READ_BUFFER;
+ else
+ cdb->opcode = WRITE_BUFFER;
+
+ cdb->byte2 = mode & RWB_MODE;
+ cdb->buffer_id = buffer_id;
+ scsi_ulto3b(buffer_offset, cdb->offset);
+ scsi_ulto3b(data_len, cdb->length);
+ cdb->control = control;
+ io->io_hdr.io_type = CTL_IO_SCSI;
+ if (read_buffer != 0)
+ io->io_hdr.flags = CTL_FLAG_DATA_IN;
+ else
+ io->io_hdr.flags = CTL_FLAG_DATA_OUT;
+ ctsio->tag_type = tag_type;
+ ctsio->cdb_len = sizeof(*cdb);
+ ctsio->ext_data_ptr = data_ptr;
+ ctsio->ext_data_len = data_len;
+ ctsio->ext_sg_entries = 0;
+ ctsio->ext_data_filled = 0;
+ ctsio->sense_len = SSD_FULL_SIZE;
+}
+
+void
+ctl_scsi_read_write(union ctl_io *io, uint8_t *data_ptr, uint32_t data_len,
+ int read_op, uint8_t byte2, int minimum_cdb_size,
+ uint64_t lba, uint32_t num_blocks, ctl_tag_type tag_type,
+ uint8_t control)
+{
+ struct ctl_scsiio *ctsio;
+
+ ctl_scsi_zero_io(io);
+
+ io->io_hdr.io_type = CTL_IO_SCSI;
+ ctsio = &io->scsiio;
+
+ /*
+ * Pick out the smallest CDB that will hold the user's request.
+ * minimum_cdb_size allows cranking the CDB size up, even for
+ * requests that would not normally need a large CDB. This can be
+ * useful for testing (e.g. to make sure READ_16 support works without
+ * having an array larger than 2TB) and for compatibility -- e.g.
+ * if your device doesn't support READ_6. (ATAPI drives don't.)
+ */
+ if ((minimum_cdb_size < 10)
+ && ((lba & 0x1fffff) == lba)
+ && ((num_blocks & 0xff) == num_blocks)
+ && (byte2 == 0)) {
+ struct scsi_rw_6 *cdb;
+
+ /*
+ * Note that according to SBC-2, the target should return 256
+ * blocks if the transfer length in a READ(6) or WRITE(6) CDB
+ * is set to 0. Since it's possible that some targets
+ * won't do the right thing, we only send a READ(6) or
+ * WRITE(6) for transfer sizes up to and including 255 blocks.
+ */
+ cdb = (struct scsi_rw_6 *)ctsio->cdb;
+
+ cdb->opcode = (read_op) ? READ_6 : WRITE_6;
+ scsi_ulto3b(lba, cdb->addr);
+ cdb->length = num_blocks & 0xff;
+ cdb->control = control;
+
+ ctsio->cdb_len = sizeof(*cdb);
+
+ } else if ((minimum_cdb_size < 12)
+ && ((num_blocks & 0xffff) == num_blocks)
+ && ((lba & 0xffffffff) == lba)) {
+ struct scsi_rw_10 *cdb;
+
+ cdb = (struct scsi_rw_10 *)ctsio->cdb;
+
+ cdb->opcode = (read_op) ? READ_10 : WRITE_10;
+ cdb->byte2 = byte2;
+ scsi_ulto4b(lba, cdb->addr);
+ cdb->reserved = 0;
+ scsi_ulto2b(num_blocks, cdb->length);
+ cdb->control = control;
+
+ ctsio->cdb_len = sizeof(*cdb);
+ } else if ((minimum_cdb_size < 16)
+ && ((num_blocks & 0xffffffff) == num_blocks)
+ && ((lba & 0xffffffff) == lba)) {
+ struct scsi_rw_12 *cdb;
+
+ cdb = (struct scsi_rw_12 *)ctsio->cdb;
+
+ cdb->opcode = (read_op) ? READ_12 : WRITE_12;
+ cdb->byte2 = byte2;
+ scsi_ulto4b(lba, cdb->addr);
+ scsi_ulto4b(num_blocks, cdb->length);
+ cdb->reserved = 0;
+ cdb->control = control;
+
+ ctsio->cdb_len = sizeof(*cdb);
+ } else {
+ struct scsi_rw_16 *cdb;
+
+ cdb = (struct scsi_rw_16 *)ctsio->cdb;
+
+ cdb->opcode = (read_op) ? READ_16 : WRITE_16;
+ cdb->byte2 = byte2;
+ scsi_u64to8b(lba, cdb->addr);
+ scsi_ulto4b(num_blocks, cdb->length);
+ cdb->reserved = 0;
+ cdb->control = control;
+
+ ctsio->cdb_len = sizeof(*cdb);
+ }
+
+ io->io_hdr.io_type = CTL_IO_SCSI;
+ if (read_op != 0)
+ io->io_hdr.flags = CTL_FLAG_DATA_IN;
+ else
+ io->io_hdr.flags = CTL_FLAG_DATA_OUT;
+ ctsio->tag_type = tag_type;
+ ctsio->ext_data_ptr = data_ptr;
+ ctsio->ext_data_len = data_len;
+ ctsio->ext_sg_entries = 0;
+ ctsio->ext_data_filled = 0;
+ ctsio->sense_len = SSD_FULL_SIZE;
+}
+
+void
+ctl_scsi_read_capacity(union ctl_io *io, uint8_t *data_ptr, uint32_t data_len,
+ uint32_t addr, int reladr, int pmi,
+ ctl_tag_type tag_type, uint8_t control)
+{
+ struct scsi_read_capacity *cdb;
+
+ ctl_scsi_zero_io(io);
+
+ io->io_hdr.io_type = CTL_IO_SCSI;
+ cdb = (struct scsi_read_capacity *)io->scsiio.cdb;
+
+ cdb->opcode = READ_CAPACITY;
+ if (reladr)
+ cdb->byte2 = SRC_RELADR;
+ if (pmi)
+ cdb->pmi = SRC_PMI;
+ scsi_ulto4b(addr, cdb->addr);
+ cdb->control = control;
+ io->io_hdr.io_type = CTL_IO_SCSI;
+ io->io_hdr.flags = CTL_FLAG_DATA_IN;
+ io->scsiio.tag_type = tag_type;
+ io->scsiio.ext_data_ptr = data_ptr;
+ io->scsiio.ext_data_len = data_len;
+ io->scsiio.ext_sg_entries = 0;
+ io->scsiio.ext_data_filled = 0;
+ io->scsiio.sense_len = SSD_FULL_SIZE;
+}
+
+void
+ctl_scsi_read_capacity_16(union ctl_io *io, uint8_t *data_ptr,
+ uint32_t data_len, uint64_t addr, int reladr,
+ int pmi, ctl_tag_type tag_type, uint8_t control)
+{
+ struct scsi_read_capacity_16 *cdb;
+
+ ctl_scsi_zero_io(io);
+
+ io->io_hdr.io_type = CTL_IO_SCSI;
+ cdb = (struct scsi_read_capacity_16 *)io->scsiio.cdb;
+
+ cdb->opcode = SERVICE_ACTION_IN;
+ cdb->service_action = SRC16_SERVICE_ACTION;
+ if (reladr)
+ cdb->reladr |= SRC16_RELADR;
+ if (pmi)
+ cdb->reladr |= SRC16_PMI;
+ scsi_u64to8b(addr, cdb->addr);
+ scsi_ulto4b(data_len, cdb->alloc_len);
+ cdb->control = control;
+
+ io->io_hdr.io_type = CTL_IO_SCSI;
+ io->io_hdr.flags = CTL_FLAG_DATA_IN;
+ io->scsiio.tag_type = tag_type;
+ io->scsiio.ext_data_ptr = data_ptr;
+ io->scsiio.ext_data_len = data_len;
+ io->scsiio.ext_sg_entries = 0;
+ io->scsiio.ext_data_filled = 0;
+ io->scsiio.sense_len = SSD_FULL_SIZE;
+}
+
+void
+ctl_scsi_mode_sense(union ctl_io *io, uint8_t *data_ptr, uint32_t data_len,
+ int dbd, int llbaa, uint8_t page_code, uint8_t pc,
+ uint8_t subpage, int minimum_cdb_size,
+ ctl_tag_type tag_type, uint8_t control)
+{
+ ctl_scsi_zero_io(io);
+
+ if ((minimum_cdb_size < 10)
+ && (llbaa == 0)
+ && (data_len < 256)) {
+ struct scsi_mode_sense_6 *cdb;
+
+ cdb = (struct scsi_mode_sense_6 *)io->scsiio.cdb;
+
+ cdb->opcode = MODE_SENSE_6;
+ if (dbd)
+ cdb->byte2 |= SMS_DBD;
+ cdb->page = page_code | pc;
+ cdb->subpage = subpage;
+ cdb->length = data_len;
+ cdb->control = control;
+ } else {
+ struct scsi_mode_sense_10 *cdb;
+
+ cdb = (struct scsi_mode_sense_10 *)io->scsiio.cdb;
+
+ cdb->opcode = MODE_SENSE_10;
+ if (dbd)
+ cdb->byte2 |= SMS_DBD;
+ if (llbaa)
+ cdb->byte2 |= SMS10_LLBAA;
+ cdb->page = page_code | pc;
+ cdb->subpage = subpage;
+ scsi_ulto2b(data_len, cdb->length);
+ cdb->control = control;
+ }
+
+ io->io_hdr.io_type = CTL_IO_SCSI;
+ io->io_hdr.flags = CTL_FLAG_DATA_IN;
+ io->scsiio.tag_type = tag_type;
+ io->scsiio.ext_data_ptr = data_ptr;
+ io->scsiio.ext_data_len = data_len;
+ io->scsiio.ext_sg_entries = 0;
+ io->scsiio.ext_data_filled = 0;
+ io->scsiio.sense_len = SSD_FULL_SIZE;
+}
+
+void
+ctl_scsi_start_stop(union ctl_io *io, int start, int load_eject, int immediate,
+ int power_conditions, int onoffline __unused,
+ ctl_tag_type tag_type, uint8_t control)
+{
+ struct scsi_start_stop_unit *cdb;
+
+ cdb = (struct scsi_start_stop_unit *)io->scsiio.cdb;
+
+ ctl_scsi_zero_io(io);
+
+ cdb->opcode = START_STOP_UNIT;
+ if (immediate)
+ cdb->byte2 |= SSS_IMMED;
+#ifdef NEEDTOPORT
+ if (onoffline)
+ cdb->byte2 |= SSS_ONOFFLINE;
+#endif
+ cdb->how = power_conditions;
+ if (load_eject)
+ cdb->how |= SSS_LOEJ;
+ if (start)
+ cdb->how |= SSS_START;
+ cdb->control = control;
+ io->io_hdr.io_type = CTL_IO_SCSI;
+ io->io_hdr.flags = CTL_FLAG_DATA_NONE;
+ io->scsiio.tag_type = tag_type;
+ io->scsiio.ext_data_ptr = NULL;
+ io->scsiio.ext_data_len = 0;
+ io->scsiio.ext_sg_entries = 0;
+ io->scsiio.ext_data_filled = 0;
+ io->scsiio.sense_len = SSD_FULL_SIZE;
+}
+
+void
+ctl_scsi_sync_cache(union ctl_io *io, int immed, int reladr,
+ int minimum_cdb_size, uint64_t starting_lba,
+ uint32_t block_count, ctl_tag_type tag_type,
+ uint8_t control)
+{
+ ctl_scsi_zero_io(io);
+
+ if ((minimum_cdb_size < 16)
+ && ((block_count & 0xffff) == block_count)
+ && ((starting_lba & 0xffffffff) == starting_lba)) {
+ struct scsi_sync_cache *cdb;
+
+ cdb = (struct scsi_sync_cache *)io->scsiio.cdb;
+
+ cdb->opcode = SYNCHRONIZE_CACHE;
+ if (reladr)
+ cdb->byte2 |= SSC_RELADR;
+
+ if (immed)
+ cdb->byte2 |= SSC_IMMED;
+
+ scsi_ulto4b(starting_lba, cdb->begin_lba);
+ scsi_ulto2b(block_count, cdb->lb_count);
+ cdb->control = control;
+ } else {
+ struct scsi_sync_cache_16 *cdb;
+
+ cdb = (struct scsi_sync_cache_16 *)io->scsiio.cdb;
+
+ cdb->opcode = SYNCHRONIZE_CACHE_16;
+ if (reladr)
+ cdb->byte2 |= SSC_RELADR;
+
+ if (immed)
+ cdb->byte2 |= SSC_IMMED;
+
+ scsi_u64to8b(starting_lba, cdb->begin_lba);
+ scsi_ulto4b(block_count, cdb->lb_count);
+ cdb->control = control;
+ }
+ io->io_hdr.io_type = CTL_IO_SCSI;
+ io->io_hdr.flags = CTL_FLAG_DATA_NONE;
+ io->scsiio.tag_type = tag_type;
+ io->scsiio.ext_data_ptr = NULL;
+ io->scsiio.ext_data_len = 0;
+ io->scsiio.ext_sg_entries = 0;
+ io->scsiio.ext_data_filled = 0;
+ io->scsiio.sense_len = SSD_FULL_SIZE;
+}
+
+void
+ctl_scsi_persistent_res_in(union ctl_io *io, uint8_t *data_ptr,
+ uint32_t data_len, int action,
+ ctl_tag_type tag_type, uint8_t control)
+{
+
+ struct scsi_per_res_in *cdb;
+
+ ctl_scsi_zero_io(io);
+
+ cdb = (struct scsi_per_res_in *)io->scsiio.cdb;
+ cdb->opcode = PERSISTENT_RES_IN;
+ cdb->action = action;
+ scsi_ulto2b(data_len, cdb->length);
+ cdb->control = control;
+
+ io->io_hdr.io_type = CTL_IO_SCSI;
+ io->io_hdr.flags = CTL_FLAG_DATA_IN;
+ io->scsiio.tag_type = tag_type;
+ io->scsiio.ext_data_ptr = data_ptr;
+ io->scsiio.ext_data_len = data_len;
+ io->scsiio.ext_sg_entries = 0;
+ io->scsiio.ext_data_filled = 0;
+ io->scsiio.sense_len = SSD_FULL_SIZE;
+}
+
+void
+ctl_scsi_persistent_res_out(union ctl_io *io, uint8_t *data_ptr,
+ uint32_t data_len, int action, int type,
+ uint64_t key, uint64_t sa_key,
+ ctl_tag_type tag_type, uint8_t control)
+{
+
+ struct scsi_per_res_out *cdb;
+ struct scsi_per_res_out_parms *params;
+
+ ctl_scsi_zero_io(io);
+
+ cdb = (struct scsi_per_res_out *)io->scsiio.cdb;
+ params = (struct scsi_per_res_out_parms *)data_ptr;
+
+ cdb->opcode = PERSISTENT_RES_OUT;
+ if (action == 5)
+ cdb->action = 6;
+ else
+ cdb->action = action;
+ switch(type)
+ {
+ case 0:
+ cdb->scope_type = 1;
+ break;
+ case 1:
+ cdb->scope_type = 3;
+ break;
+ case 2:
+ cdb->scope_type = 5;
+ break;
+ case 3:
+ cdb->scope_type = 6;
+ break;
+ case 4:
+ cdb->scope_type = 7;
+ break;
+ case 5:
+ cdb->scope_type = 8;
+ break;
+ }
+ scsi_ulto4b(data_len, cdb->length);
+ cdb->control = control;
+
+ scsi_u64to8b(key, params->res_key.key);
+ scsi_u64to8b(sa_key, params->serv_act_res_key);
+
+ io->io_hdr.io_type = CTL_IO_SCSI;
+ io->io_hdr.flags = CTL_FLAG_DATA_OUT;
+ io->scsiio.tag_type = tag_type;
+ io->scsiio.ext_data_ptr = data_ptr;
+ io->scsiio.ext_data_len = data_len;
+ io->scsiio.ext_sg_entries = 0;
+ io->scsiio.ext_data_filled = 0;
+ io->scsiio.sense_len = SSD_FULL_SIZE;
+
+}
+
+void
+ctl_scsi_maintenance_in(union ctl_io *io, uint8_t *data_ptr, uint32_t data_len,
+ uint8_t action, ctl_tag_type tag_type, uint8_t control)
+{
+ struct scsi_maintenance_in *cdb;
+
+ ctl_scsi_zero_io(io);
+
+ cdb = (struct scsi_maintenance_in *)io->scsiio.cdb;
+ cdb->opcode = MAINTENANCE_IN;
+ cdb->byte2 = action;
+ scsi_ulto4b(data_len, cdb->length);
+ cdb->control = control;
+
+ io->io_hdr.io_type = CTL_IO_SCSI;
+ io->io_hdr.flags = CTL_FLAG_DATA_IN;
+ io->scsiio.tag_type = tag_type;
+ io->scsiio.ext_data_ptr = data_ptr;
+ io->scsiio.ext_data_len = data_len;
+ io->scsiio.ext_sg_entries = 0;
+ io->scsiio.ext_data_filled = 0;
+ io->scsiio.sense_len = SSD_FULL_SIZE;
+}
+
+#ifndef _KERNEL
+union ctl_io *
+ctl_scsi_alloc_io(struct ctl_id initid)
+{
+ union ctl_io *io;
+
+ io = (union ctl_io *)malloc(sizeof(*io));
+ if (io == NULL)
+ goto bailout;
+
+ io->io_hdr.nexus.initid = initid;
+
+bailout:
+ return (io);
+}
+
+void
+ctl_scsi_free_io(union ctl_io *io)
+{
+ free(io);
+}
+
+#endif /* !_KERNEL */
+void
+ctl_scsi_zero_io(union ctl_io *io)
+{
+ void *pool_ref;
+
+ if (io == NULL)
+ return;
+
+ pool_ref = io->io_hdr.pool;
+
+ memset(io, 0, sizeof(*io));
+
+ io->io_hdr.pool = pool_ref;
+}
+
+const char *
+ctl_scsi_task_string(struct ctl_taskio *taskio)
+{
+ unsigned int i;
+
+ for (i = 0; i < (sizeof(ctl_task_table)/sizeof(ctl_task_table[0]));
+ i++) {
+ if (taskio->task_action == ctl_task_table[i].task_action) {
+ return (ctl_task_table[i].description);
+ }
+ }
+
+ return (NULL);
+}
+
+void
+ctl_io_error_sbuf(union ctl_io *io, struct scsi_inquiry_data *inq_data,
+ struct sbuf *sb)
+{
+ struct ctl_status_desc *status_desc;
+ char path_str[64];
+ unsigned int i;
+
+ status_desc = NULL;
+
+ for (i = 0; i < (sizeof(ctl_status_table)/sizeof(ctl_status_table[0]));
+ i++) {
+ if ((io->io_hdr.status & CTL_STATUS_MASK) ==
+ ctl_status_table[i].status) {
+ status_desc = &ctl_status_table[i];
+ break;
+ }
+ }
+
+ ctl_scsi_path_string(io, path_str, sizeof(path_str));
+
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ sbuf_cat(sb, path_str);
+
+ ctl_scsi_command_string(&io->scsiio, NULL, sb);
+
+ sbuf_printf(sb, "\n");
+
+ sbuf_printf(sb, "%sTag: 0x%04x, Type: %d\n", path_str,
+ io->scsiio.tag_num, io->scsiio.tag_type);
+ break;
+ case CTL_IO_TASK: {
+ const char *task_desc;
+
+ sbuf_cat(sb, path_str);
+
+ task_desc = ctl_scsi_task_string(&io->taskio);
+
+ if (task_desc == NULL)
+ sbuf_printf(sb, "Unknown Task Action %d (%#x)",
+ io->taskio.task_action,
+ io->taskio.task_action);
+ else
+ sbuf_printf(sb, "Task Action: %s", task_desc);
+
+ sbuf_printf(sb, "\n");
+
+ switch (io->taskio.task_action) {
+ case CTL_TASK_ABORT_TASK:
+ case CTL_TASK_ABORT_TASK_SET:
+ case CTL_TASK_CLEAR_TASK_SET:
+ sbuf_printf(sb, "%sTag: 0x%04x, Type: %d\n", path_str,
+ io->taskio.tag_num,
+ io->taskio.tag_type);
+ break;
+ default:
+ break;
+ }
+ break;
+ }
+ default:
+ break;
+ }
+
+ sbuf_cat(sb, path_str);
+ if (status_desc == NULL)
+ sbuf_printf(sb, "CTL Status: Unknown status %#x\n",
+ io->io_hdr.status);
+ else
+ sbuf_printf(sb, "CTL Status: %s\n", status_desc->description);
+
+ if ((io->io_hdr.io_type == CTL_IO_SCSI)
+ && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SCSI_ERROR)) {
+ sbuf_cat(sb, path_str);
+ sbuf_printf(sb, "SCSI Status: %s\n",
+ ctl_scsi_status_string(&io->scsiio));
+
+ if (io->scsiio.scsi_status == SCSI_STATUS_CHECK_COND)
+ ctl_scsi_sense_sbuf(&io->scsiio, inq_data,
+ sb, SSS_FLAG_NONE);
+ }
+}
+
+char *
+ctl_io_error_string(union ctl_io *io, struct scsi_inquiry_data *inq_data,
+ char *str, int str_len)
+{
+ struct sbuf sb;
+
+ sbuf_new(&sb, str, str_len, SBUF_FIXEDLEN);
+
+ ctl_io_error_sbuf(io, inq_data, &sb);
+
+ sbuf_finish(&sb);
+
+ return (sbuf_data(&sb));
+}
+
+#ifdef _KERNEL
+
+void
+ctl_io_error_print(union ctl_io *io, struct scsi_inquiry_data *inq_data)
+{
+ char str[512];
+#ifdef NEEDTOPORT
+ char *message;
+ char *line;
+
+ message = io_error_string(io, inq_data, str, sizeof(str));
+
+ for (line = strsep(&message, "\n"); line != NULL;
+ line = strsep(&message, "\n")) {
+ csevent_log(CSC_CTL | CSC_SHELF_SW | CTL_ERROR_REPORT,
+ csevent_LogType_Trace,
+ csevent_Severity_Information,
+ csevent_AlertLevel_Green,
+ csevent_FRU_Firmware,
+ csevent_FRU_Unknown, "%s", line);
+ }
+#else
+ printf("%s", ctl_io_error_string(io, inq_data, str, sizeof(str)));
+#endif
+
+}
+
+#else /* _KERNEL */
+
+void
+ctl_io_error_print(union ctl_io *io, struct scsi_inquiry_data *inq_data,
+ FILE *ofile)
+{
+ char str[512];
+
+ fprintf(ofile, "%s", ctl_io_error_string(io, inq_data, str,
+ sizeof(str)));
+}
+
+#endif /* _KERNEL */
+
+/*
+ * vim: ts=8
+ */
diff --git a/sys/cam/ctl/ctl_util.h b/sys/cam/ctl/ctl_util.h
new file mode 100644
index 0000000..29bc3e5
--- /dev/null
+++ b/sys/cam/ctl/ctl_util.h
@@ -0,0 +1,119 @@
+/*-
+ * Copyright (c) 2003 Silicon Graphics International Corp.
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_util.h#2 $
+ * $FreeBSD$
+ */
+/*
+ * CAM Target Layer SCSI library interface
+ *
+ * Author: Ken Merry <ken@FreeBSD.org>
+ */
+
+#ifndef _CTL_UTIL_H
+#define _CTL_UTIL_H 1
+
+__BEGIN_DECLS
+
+void ctl_scsi_tur(union ctl_io *io, ctl_tag_type tag_type, uint8_t control);
+void ctl_scsi_inquiry(union ctl_io *io, uint8_t *data_ptr, int32_t data_len,
+ uint8_t byte2, uint8_t page_code, ctl_tag_type tag_type,
+ uint8_t control);
+void ctl_scsi_request_sense(union ctl_io *io, uint8_t *data_ptr,
+ int32_t data_len, uint8_t byte2,
+ ctl_tag_type tag_type, uint8_t control);
+void ctl_scsi_report_luns(union ctl_io *io, uint8_t *data_ptr,
+ uint32_t data_len, uint8_t select_report,
+ ctl_tag_type tag_type, uint8_t control);
+void ctl_scsi_read_write_buffer(union ctl_io *io, uint8_t *data_ptr,
+ uint32_t data_len, int read_buffer,
+ uint8_t mode, uint8_t buffer_id,
+ uint32_t buffer_offset, ctl_tag_type tag_type,
+ uint8_t control);
+void ctl_scsi_read_write(union ctl_io *io, uint8_t *data_ptr,
+ uint32_t data_len, int read_op, uint8_t byte2,
+ int minimum_cdb_size, uint64_t lba,
+ uint32_t num_blocks, ctl_tag_type tag_type,
+ uint8_t control);
+void ctl_scsi_read_capacity(union ctl_io *io, uint8_t *data_ptr,
+ uint32_t data_len, uint32_t addr, int reladr,
+ int pmi, ctl_tag_type tag_type, uint8_t control);
+void ctl_scsi_read_capacity_16(union ctl_io *io, uint8_t *data_ptr,
+ uint32_t data_len, uint64_t addr, int reladr,
+ int pmi, ctl_tag_type tag_type, uint8_t control);
+void ctl_scsi_mode_sense(union ctl_io *io, uint8_t *data_ptr,
+ uint32_t data_len, int dbd, int llbaa,
+ uint8_t page_code, uint8_t pc, uint8_t subpage,
+ int minimum_cdb_size, ctl_tag_type tag_type,
+ uint8_t control);
+void ctl_scsi_start_stop(union ctl_io *io, int start, int load_eject,
+ int immediate, int power_conditions, int onoffline,
+ ctl_tag_type tag_type, uint8_t control);
+void ctl_scsi_sync_cache(union ctl_io *io, int immed, int reladr,
+ int minimum_cdb_size, uint64_t starting_lba,
+ uint32_t block_count, ctl_tag_type tag_type,
+ uint8_t control);
+void ctl_scsi_persistent_res_in(union ctl_io *io, uint8_t *data_ptr,
+ uint32_t data_len, int action,
+ ctl_tag_type tag_type, uint8_t control);
+void ctl_scsi_persistent_res_out(union ctl_io *io, uint8_t *data_ptr,
+ uint32_t data_len, int action, int type,
+ uint64_t key, uint64_t sa_key,
+ ctl_tag_type tag_type, uint8_t control);
+void ctl_scsi_maintenance_in(union ctl_io *io, uint8_t *data_ptr,
+ uint32_t data_len, uint8_t action,
+ ctl_tag_type tag_type, uint8_t control);
+#ifndef _KERNEL
+union ctl_io *ctl_scsi_alloc_io(struct ctl_id initid);
+void ctl_scsi_free_io(union ctl_io *io);
+#endif /* !_KERNEL */
+void ctl_scsi_zero_io(union ctl_io *io);
+const char *ctl_scsi_task_string(struct ctl_taskio *taskio);
+void ctl_io_error_sbuf(union ctl_io *io,
+ struct scsi_inquiry_data *inq_data, struct sbuf *sb);
+char *ctl_io_error_string(union ctl_io *io,
+ struct scsi_inquiry_data *inq_data, char *str,
+ int str_len);
+#ifdef _KERNEL
+
+void ctl_io_error_print(union ctl_io *io, struct scsi_inquiry_data *inq_data);
+#else /* _KERNEL */
+void
+ctl_io_error_print(union ctl_io *io, struct scsi_inquiry_data *inq_data,
+ FILE *ofile);
+
+#endif /* _KERNEL */
+
+__END_DECLS
+
+#endif /* _CTL_UTIL_H */
+
+/*
+ * vim: ts=8
+ */
diff --git a/sys/cam/ctl/scsi_ctl.c b/sys/cam/ctl/scsi_ctl.c
new file mode 100644
index 0000000..f3ba03b
--- /dev/null
+++ b/sys/cam/ctl/scsi_ctl.c
@@ -0,0 +1,2053 @@
+/*-
+ * Copyright (c) 2008, 2009 Silicon Graphics International Corp.
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/scsi_ctl.c#4 $
+ */
+/*
+ * Peripheral driver interface between CAM and CTL (CAM Target Layer).
+ *
+ * Author: Ken Merry <ken@FreeBSD.org>
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/queue.h>
+#include <sys/systm.h>
+#include <sys/kernel.h>
+#include <sys/lock.h>
+#include <sys/mutex.h>
+#include <sys/condvar.h>
+#include <sys/malloc.h>
+#include <sys/bus.h>
+#include <sys/endian.h>
+#include <sys/sbuf.h>
+#include <sys/sysctl.h>
+#include <sys/types.h>
+#include <sys/systm.h>
+#include <machine/bus.h>
+
+#include <cam/cam.h>
+#include <cam/cam_ccb.h>
+#include <cam/cam_periph.h>
+#include <cam/cam_queue.h>
+#include <cam/cam_xpt_periph.h>
+#include <cam/cam_debug.h>
+#include <cam/cam_sim.h>
+#include <cam/cam_xpt.h>
+
+#include <cam/scsi/scsi_all.h>
+#include <cam/scsi/scsi_message.h>
+
+#include <cam/ctl/ctl_io.h>
+#include <cam/ctl/ctl.h>
+#include <cam/ctl/ctl_frontend.h>
+#include <cam/ctl/ctl_util.h>
+#include <cam/ctl/ctl_error.h>
+
+typedef enum {
+ CTLFE_CCB_WAITING = 0x01
+} ctlfe_ccb_types;
+
+struct ctlfe_softc {
+ struct ctl_frontend fe;
+ path_id_t path_id;
+ struct cam_sim *sim;
+ char port_name[DEV_IDLEN];
+ STAILQ_HEAD(, ctlfe_lun_softc) lun_softc_list;
+ STAILQ_ENTRY(ctlfe_softc) links;
+};
+
+STAILQ_HEAD(, ctlfe_softc) ctlfe_softc_list;
+struct mtx ctlfe_list_mtx;
+static char ctlfe_mtx_desc[] = "ctlfelist";
+static int ctlfe_dma_enabled = 1;
+#ifdef CTLFE_INIT_ENABLE
+static int ctlfe_max_targets = 1;
+static int ctlfe_num_targets = 0;
+#endif
+
+typedef enum {
+ CTLFE_LUN_NONE = 0x00,
+ CTLFE_LUN_WILDCARD = 0x01
+} ctlfe_lun_flags;
+
+struct ctlfe_lun_softc {
+ struct ctlfe_softc *parent_softc;
+ struct cam_periph *periph;
+ ctlfe_lun_flags flags;
+ struct callout dma_callout;
+ uint64_t ccbs_alloced;
+ uint64_t ccbs_freed;
+ uint64_t ctios_sent;
+ uint64_t ctios_returned;
+ uint64_t atios_sent;
+ uint64_t atios_returned;
+ uint64_t inots_sent;
+ uint64_t inots_returned;
+ /* bus_dma_tag_t dma_tag; */
+ TAILQ_HEAD(, ccb_hdr) work_queue;
+ STAILQ_ENTRY(ctlfe_lun_softc) links;
+};
+
+typedef enum {
+ CTLFE_CMD_NONE = 0x00,
+ CTLFE_CMD_PIECEWISE = 0x01
+} ctlfe_cmd_flags;
+
+/*
+ * The size limit of this structure is CTL_PORT_PRIV_SIZE, from ctl_io.h.
+ * Currently that is 600 bytes.
+ */
+struct ctlfe_lun_cmd_info {
+ int cur_transfer_index;
+ ctlfe_cmd_flags flags;
+ /*
+ * XXX KDM struct bus_dma_segment is 8 bytes on i386, and 16
+ * bytes on amd64. So with 32 elements, this is 256 bytes on
+ * i386 and 512 bytes on amd64.
+ */
+ bus_dma_segment_t cam_sglist[32];
+};
+
+/*
+ * When we register the adapter/bus, request that this many ctl_ios be
+ * allocated. This should be the maximum supported by the adapter, but we
+ * currently don't have a way to get that back from the path inquiry.
+ * XXX KDM add that to the path inquiry.
+ */
+#define CTLFE_REQ_CTL_IO 4096
+/*
+ * Number of Accept Target I/O CCBs to allocate and queue down to the
+ * adapter per LUN.
+ * XXX KDM should this be controlled by CTL?
+ */
+#define CTLFE_ATIO_PER_LUN 1024
+/*
+ * Number of Immediate Notify CCBs (used for aborts, resets, etc.) to
+ * allocate and queue down to the adapter per LUN.
+ * XXX KDM should this be controlled by CTL?
+ */
+#define CTLFE_IN_PER_LUN 1024
+
+/*
+ * Timeout (in seconds) on CTIO CCB allocation for doing a DMA or sending
+ * status to the initiator. The SIM is expected to have its own timeouts,
+ * so we're not putting this timeout around the CCB execution time. The
+ * SIM should timeout and let us know if it has an issue.
+ */
+#define CTLFE_DMA_TIMEOUT 60
+
+/*
+ * Turn this on to enable extra debugging prints.
+ */
+#if 0
+#define CTLFE_DEBUG
+#endif
+
+/*
+ * Use randomly assigned WWNN/WWPN values. This is to work around an issue
+ * in the FreeBSD initiator that makes it unable to rescan the target if
+ * the target gets rebooted and the WWNN/WWPN stay the same.
+ */
+#if 0
+#define RANDOM_WWNN
+#endif
+
+SYSCTL_INT(_kern_cam_ctl, OID_AUTO, dma_enabled, CTLFLAG_RW,
+ &ctlfe_dma_enabled, 0, "DMA enabled");
+MALLOC_DEFINE(M_CTLFE, "CAM CTL FE", "CAM CTL FE interface");
+
+#define ccb_type ppriv_field0
+/* This is only used in the ATIO */
+#define io_ptr ppriv_ptr1
+
+/* This is only used in the CTIO */
+#define ccb_atio ppriv_ptr1
+
+int ctlfeinitialize(void);
+void ctlfeshutdown(void);
+static periph_init_t ctlfeinit;
+static void ctlfeasync(void *callback_arg, uint32_t code,
+ struct cam_path *path, void *arg);
+static periph_ctor_t ctlferegister;
+static periph_oninv_t ctlfeoninvalidate;
+static periph_dtor_t ctlfecleanup;
+static periph_start_t ctlfestart;
+static void ctlfedone(struct cam_periph *periph,
+ union ccb *done_ccb);
+
+static void ctlfe_onoffline(void *arg, int online);
+static void ctlfe_online(void *arg);
+static void ctlfe_offline(void *arg);
+static int ctlfe_targ_enable(void *arg, struct ctl_id targ_id);
+static int ctlfe_targ_disable(void *arg, struct ctl_id targ_id);
+static int ctlfe_lun_enable(void *arg, struct ctl_id targ_id,
+ int lun_id);
+static int ctlfe_lun_disable(void *arg, struct ctl_id targ_id,
+ int lun_id);
+static void ctlfe_dump_sim(struct cam_sim *sim);
+static void ctlfe_dump_queue(struct ctlfe_lun_softc *softc);
+static void ctlfe_dma_timeout(void *arg);
+static void ctlfe_datamove_done(union ctl_io *io);
+static void ctlfe_dump(void);
+
+static struct periph_driver ctlfe_driver =
+{
+ ctlfeinit, "ctl",
+ TAILQ_HEAD_INITIALIZER(ctlfe_driver.units), /*generation*/ 0
+};
+PERIPHDRIVER_DECLARE(ctl, ctlfe_driver);
+
+extern struct ctl_softc *control_softc;
+
+int
+ctlfeinitialize(void)
+{
+ cam_status status;
+
+ STAILQ_INIT(&ctlfe_softc_list);
+
+ mtx_init(&ctlfe_list_mtx, ctlfe_mtx_desc, NULL, MTX_DEF);
+
+ xpt_lock_buses();
+ periphdriver_register(&ctlfe_driver);
+ xpt_unlock_buses();
+
+ status = xpt_register_async(AC_PATH_REGISTERED | AC_PATH_DEREGISTERED |
+ AC_CONTRACT, ctlfeasync, NULL, NULL);
+
+ if (status != CAM_REQ_CMP) {
+ printf("ctl: Failed to attach async callback due to CAM "
+ "status 0x%x!\n", status);
+ }
+
+ return (0);
+}
+
+void
+ctlfeshutdown(void)
+{
+ return;
+}
+
+void
+ctlfeinit(void)
+{
+ cam_status status;
+
+ STAILQ_INIT(&ctlfe_softc_list);
+
+ mtx_init(&ctlfe_list_mtx, ctlfe_mtx_desc, NULL, MTX_DEF);
+
+ KASSERT(control_softc != NULL, ("CTL is not initialized!"));
+
+ status = xpt_register_async(AC_PATH_REGISTERED | AC_PATH_DEREGISTERED |
+ AC_CONTRACT, ctlfeasync, NULL, NULL);
+
+ if (status != CAM_REQ_CMP) {
+ printf("ctl: Failed to attach async callback due to CAM "
+ "status 0x%x!\n", status);
+ }
+}
+
+static void
+ctlfeasync(void *callback_arg, uint32_t code, struct cam_path *path, void *arg)
+{
+
+#ifdef CTLFEDEBUG
+ printf("%s: entered\n", __func__);
+#endif
+
+ /*
+ * When a new path gets registered, and it is capable of target
+ * mode, go ahead and attach. Later on, we may need to be more
+ * selective, but for now this will be sufficient.
+ */
+ switch (code) {
+ case AC_PATH_REGISTERED: {
+ struct ctl_frontend *fe;
+ struct ctlfe_softc *bus_softc;
+ struct ctlfe_lun_softc *lun_softc;
+ struct cam_path *path;
+ struct ccb_pathinq *cpi;
+ cam_status status;
+ int retval;
+
+ cpi = (struct ccb_pathinq *)arg;
+
+ /* Don't attach if it doesn't support target mode */
+ if ((cpi->target_sprt & PIT_PROCESSOR) == 0) {
+#ifdef CTLFEDEBUG
+ printf("%s: SIM %s%d doesn't support target mode\n",
+ __func__, cpi->dev_name, cpi->unit_number);
+#endif
+ break;
+ }
+
+#ifdef CTLFE_INIT_ENABLE
+ if (ctlfe_num_targets >= ctlfe_max_targets) {
+ union ccb *ccb;
+ struct cam_sim *sim;
+
+ ccb = (union ccb *)malloc(sizeof(*ccb), M_TEMP,
+ M_NOWAIT | M_ZERO);
+ if (ccb == NULL) {
+ printf("%s: unable to malloc CCB!\n", __func__);
+ xpt_free_path(path);
+ return;
+ }
+ xpt_setup_ccb(&ccb->ccb_h, cpi->ccb_h.path,
+ /*priority*/ 1);
+
+ sim = xpt_path_sim(cpi->ccb_h.path);
+
+ ccb->ccb_h.func_code = XPT_SET_SIM_KNOB;
+ ccb->knob.xport_specific.valid = KNOB_VALID_ROLE;
+ ccb->knob.xport_specific.fc.role = KNOB_ROLE_INITIATOR;
+
+ /* We should hold the SIM lock here */
+ mtx_assert(sim->mtx, MA_OWNED);
+
+ xpt_action(ccb);
+
+ if ((ccb->ccb_h.status & CAM_STATUS_MASK) !=
+ CAM_REQ_CMP) {
+ printf("%s: SIM %s%d (path id %d) initiator "
+ "enable failed with status %#x\n",
+ __func__, cpi->dev_name,
+ cpi->unit_number, cpi->ccb_h.path_id,
+ ccb->ccb_h.status);
+ } else {
+ printf("%s: SIM %s%d (path id %d) initiator "
+ "enable succeeded\n",
+ __func__, cpi->dev_name,
+ cpi->unit_number, cpi->ccb_h.path_id);
+ }
+
+ free(ccb, M_TEMP);
+
+ break;
+ } else {
+ ctlfe_num_targets++;
+ }
+
+ printf("%s: ctlfe_num_targets = %d\n", __func__,
+ ctlfe_num_targets);
+#endif /* CTLFE_INIT_ENABLE */
+
+ /*
+ * We're in an interrupt context here, so we have to
+ * use M_NOWAIT. Of course this means trouble if we
+ * can't allocate memory.
+ */
+ bus_softc = malloc(sizeof(*bus_softc), M_CTLFE,
+ M_NOWAIT | M_ZERO);
+ if (bus_softc == NULL) {
+ printf("%s: unable to malloc %zd bytes for softc\n",
+ __func__, sizeof(*bus_softc));
+ return;
+ }
+
+ bus_softc->path_id = cpi->ccb_h.path_id;
+ bus_softc->sim = xpt_path_sim(cpi->ccb_h.path);
+ STAILQ_INIT(&bus_softc->lun_softc_list);
+
+ fe = &bus_softc->fe;
+
+ /*
+ * XXX KDM should we be more accurate here ?
+ */
+ if (cpi->transport == XPORT_FC)
+ fe->port_type = CTL_PORT_FC;
+ else
+ fe->port_type = CTL_PORT_SCSI;
+
+ /* XXX KDM what should the real number be here? */
+ fe->num_requested_ctl_io = 4096;
+ snprintf(bus_softc->port_name, sizeof(bus_softc->port_name),
+ "%s%d", cpi->dev_name, cpi->unit_number);
+ /*
+ * XXX KDM it would be nice to allocate storage in the
+ * frontend structure itself.
+ */
+ fe->port_name = bus_softc->port_name;
+ fe->physical_port = cpi->unit_number;
+ fe->virtual_port = cpi->bus_id;
+ fe->port_online = ctlfe_online;
+ fe->port_offline = ctlfe_offline;
+ fe->onoff_arg = bus_softc;
+ fe->targ_enable = ctlfe_targ_enable;
+ fe->targ_disable = ctlfe_targ_disable;
+ fe->lun_enable = ctlfe_lun_enable;
+ fe->lun_disable = ctlfe_lun_disable;
+ fe->targ_lun_arg = bus_softc;
+ fe->fe_datamove = ctlfe_datamove_done;
+ fe->fe_done = ctlfe_datamove_done;
+ fe->fe_dump = ctlfe_dump;
+ /*
+ * XXX KDM the path inquiry doesn't give us the maximum
+ * number of targets supported.
+ */
+ fe->max_targets = cpi->max_target;
+ fe->max_target_id = cpi->max_target;
+
+ /*
+ * XXX KDM need to figure out whether we're the master or
+ * slave.
+ */
+#ifdef CTLFEDEBUG
+ printf("%s: calling ctl_frontend_register() for %s%d\n",
+ __func__, cpi->dev_name, cpi->unit_number);
+#endif
+ retval = ctl_frontend_register(fe, /*master_SC*/ 1);
+ if (retval != 0) {
+ printf("%s: ctl_frontend_register() failed with "
+ "error %d!\n", __func__, retval);
+ free(bus_softc, M_CTLFE);
+ break;
+ } else {
+ mtx_lock(&ctlfe_list_mtx);
+ STAILQ_INSERT_TAIL(&ctlfe_softc_list, bus_softc, links);
+ mtx_unlock(&ctlfe_list_mtx);
+ }
+
+ status = xpt_create_path(&path, /*periph*/ NULL,
+ bus_softc->path_id,CAM_TARGET_WILDCARD,
+ CAM_LUN_WILDCARD);
+ if (status != CAM_REQ_CMP) {
+ printf("%s: unable to create path for wildcard "
+ "periph\n", __func__);
+ break;
+ }
+ lun_softc = malloc(sizeof(*lun_softc), M_CTLFE,
+ M_NOWAIT | M_ZERO);
+ if (lun_softc == NULL) {
+ xpt_print(path, "%s: unable to allocate softc for "
+ "wildcard periph\n", __func__);
+ xpt_free_path(path);
+ break;
+ }
+
+ lun_softc->parent_softc = bus_softc;
+ lun_softc->flags |= CTLFE_LUN_WILDCARD;
+
+ status = cam_periph_alloc(ctlferegister,
+ ctlfeoninvalidate,
+ ctlfecleanup,
+ ctlfestart,
+ "ctl",
+ CAM_PERIPH_BIO,
+ path,
+ ctlfeasync,
+ 0,
+ lun_softc);
+
+ xpt_free_path(path);
+
+ break;
+ }
+ case AC_PATH_DEREGISTERED:
+ /* ctl_frontend_deregister() */
+ break;
+ case AC_CONTRACT: {
+ struct ac_contract *ac;
+
+ ac = (struct ac_contract *)arg;
+
+ switch (ac->contract_number) {
+ case AC_CONTRACT_DEV_CHG: {
+ struct ac_device_changed *dev_chg;
+ struct ctlfe_softc *softc;
+ int retval, found;
+
+ dev_chg = (struct ac_device_changed *)ac->contract_data;
+
+ printf("%s: WWPN %#jx port %u path %u target %u %s\n",
+ __func__, dev_chg->wwpn, dev_chg->port,
+ xpt_path_path_id(path), dev_chg->target,
+ (dev_chg->arrived == 0) ? "left" : "arrived");
+
+ found = 0;
+
+ mtx_lock(&ctlfe_list_mtx);
+ STAILQ_FOREACH(softc, &ctlfe_softc_list, links) {
+ if (softc->path_id == xpt_path_path_id(path)) {
+ found = 1;
+ break;
+ }
+ }
+ mtx_unlock(&ctlfe_list_mtx);
+
+ if (found == 0) {
+ printf("%s: CTL port for CAM path %u not "
+ "found!\n", __func__,
+ xpt_path_path_id(path));
+ break;
+ }
+ if (dev_chg->arrived != 0) {
+ retval = ctl_add_initiator(dev_chg->wwpn,
+ softc->fe.targ_port, dev_chg->target);
+ } else {
+ retval = ctl_remove_initiator(
+ softc->fe.targ_port, dev_chg->target);
+ }
+
+ if (retval != 0) {
+ printf("%s: could not %s port %d iid %u "
+ "WWPN %#jx!\n", __func__,
+ (dev_chg->arrived != 0) ? "add" :
+ "remove", softc->fe.targ_port,
+ dev_chg->target,
+ (uintmax_t)dev_chg->wwpn);
+ }
+ break;
+ }
+ default:
+ printf("%s: unsupported contract number %ju\n",
+ __func__, (uintmax_t)ac->contract_number);
+ break;
+ }
+ break;
+ }
+ default:
+ break;
+ }
+}
+
+static cam_status
+ctlferegister(struct cam_periph *periph, void *arg)
+{
+ struct ctlfe_softc *bus_softc;
+ struct ctlfe_lun_softc *softc;
+ struct cam_sim *sim;
+ union ccb en_lun_ccb;
+ cam_status status;
+ int i;
+
+ softc = (struct ctlfe_lun_softc *)arg;
+ bus_softc = softc->parent_softc;
+ sim = xpt_path_sim(periph->path);
+
+ TAILQ_INIT(&softc->work_queue);
+ softc->periph = periph;
+ softc->parent_softc = bus_softc;
+
+ callout_init_mtx(&softc->dma_callout, sim->mtx, /*flags*/ 0);
+ periph->softc = softc;
+
+ xpt_setup_ccb(&en_lun_ccb.ccb_h, periph->path, /*priority*/ 1);
+ en_lun_ccb.ccb_h.func_code = XPT_EN_LUN;
+ en_lun_ccb.cel.grp6_len = 0;
+ en_lun_ccb.cel.grp7_len = 0;
+ en_lun_ccb.cel.enable = 1;
+ xpt_action(&en_lun_ccb);
+ status = (en_lun_ccb.ccb_h.status & CAM_STATUS_MASK);
+ if (status != CAM_REQ_CMP) {
+ xpt_print(periph->path, "%s: Enable LUN failed, status 0x%x\n",
+ __func__, en_lun_ccb.ccb_h.status);
+ return (status);
+ }
+
+ status = CAM_REQ_CMP;
+
+ for (i = 0; i < CTLFE_ATIO_PER_LUN; i++) {
+ union ccb *new_ccb;
+
+ new_ccb = (union ccb *)malloc(sizeof(*new_ccb), M_CTLFE,
+ M_NOWAIT);
+ if (new_ccb == NULL) {
+ status = CAM_RESRC_UNAVAIL;
+ break;
+ }
+ xpt_setup_ccb(&new_ccb->ccb_h, periph->path, /*priority*/ 1);
+ new_ccb->ccb_h.func_code = XPT_ACCEPT_TARGET_IO;
+ new_ccb->ccb_h.cbfcnp = ctlfedone;
+ xpt_action(new_ccb);
+ softc->atios_sent++;
+ status = new_ccb->ccb_h.status;
+ if ((status & CAM_STATUS_MASK) != CAM_REQ_INPROG) {
+ free(new_ccb, M_CTLFE);
+ break;
+ }
+ }
+
+ status = cam_periph_acquire(periph);
+ if ((status & CAM_STATUS_MASK) != CAM_REQ_CMP) {
+ xpt_print(periph->path, "%s: could not acquire reference "
+ "count, status = %#x\n", __func__, status);
+ return (status);
+ }
+
+ if (i == 0) {
+ xpt_print(periph->path, "%s: could not allocate ATIO CCBs, "
+ "status 0x%x\n", __func__, status);
+ return (CAM_REQ_CMP_ERR);
+ }
+
+ for (i = 0; i < CTLFE_IN_PER_LUN; i++) {
+ union ccb *new_ccb;
+
+ new_ccb = (union ccb *)malloc(sizeof(*new_ccb), M_CTLFE,
+ M_NOWAIT);
+ if (new_ccb == NULL) {
+ status = CAM_RESRC_UNAVAIL;
+ break;
+ }
+
+ xpt_setup_ccb(&new_ccb->ccb_h, periph->path, /*priority*/ 1);
+ new_ccb->ccb_h.func_code = XPT_IMMEDIATE_NOTIFY;
+ new_ccb->ccb_h.cbfcnp = ctlfedone;
+ xpt_action(new_ccb);
+ softc->inots_sent++;
+ status = new_ccb->ccb_h.status;
+ if (status != CAM_REQ_INPROG) {
+ free(new_ccb, M_CTLFE);
+ break;
+ }
+ }
+ if (i == 0) {
+ xpt_print(periph->path, "%s: could not allocate immediate "
+ "notify CCBs, status 0x%x\n", __func__, status);
+ return (CAM_REQ_CMP_ERR);
+ }
+ return (CAM_REQ_CMP);
+}
+
+static void
+ctlfeoninvalidate(struct cam_periph *periph)
+{
+ union ccb en_lun_ccb;
+ cam_status status;
+ struct ctlfe_lun_softc *softc;
+
+ softc = (struct ctlfe_lun_softc *)periph->softc;
+
+ xpt_setup_ccb(&en_lun_ccb.ccb_h, periph->path, /*priority*/ 1);
+ en_lun_ccb.ccb_h.func_code = XPT_EN_LUN;
+ en_lun_ccb.cel.grp6_len = 0;
+ en_lun_ccb.cel.grp7_len = 0;
+ en_lun_ccb.cel.enable = 0;
+ xpt_action(&en_lun_ccb);
+ status = (en_lun_ccb.ccb_h.status & CAM_STATUS_MASK);
+ if (status != CAM_REQ_CMP) {
+ xpt_print(periph->path, "%s: Disable LUN failed, status 0x%x\n",
+ __func__, en_lun_ccb.ccb_h.status);
+ /*
+ * XXX KDM what do we do now?
+ */
+ }
+ xpt_print(periph->path, "LUN removed, %ju ATIOs outstanding, %ju "
+ "INOTs outstanding, %d refs\n", softc->atios_sent -
+ softc->atios_returned, softc->inots_sent -
+ softc->inots_returned, periph->refcount);
+}
+
+static void
+ctlfecleanup(struct cam_periph *periph)
+{
+ struct ctlfe_lun_softc *softc;
+ struct ctlfe_softc *bus_softc;
+
+ xpt_print(periph->path, "%s: Called\n", __func__);
+
+ softc = (struct ctlfe_lun_softc *)periph->softc;
+ bus_softc = softc->parent_softc;
+
+ STAILQ_REMOVE(&bus_softc->lun_softc_list, softc, ctlfe_lun_softc,links);
+
+ /*
+ * XXX KDM is there anything else that needs to be done here?
+ */
+ free(softc, M_CTLFE);
+}
+
+static void
+ctlfestart(struct cam_periph *periph, union ccb *start_ccb)
+{
+ struct ctlfe_lun_softc *softc;
+ struct ccb_hdr *ccb_h;
+
+ softc = (struct ctlfe_lun_softc *)periph->softc;
+
+ softc->ccbs_alloced++;
+
+ ccb_h = TAILQ_FIRST(&softc->work_queue);
+ if (periph->immediate_priority <= periph->pinfo.priority) {
+ panic("shouldn't get to the CCB waiting case!");
+ start_ccb->ccb_h.ccb_type = CTLFE_CCB_WAITING;
+ SLIST_INSERT_HEAD(&periph->ccb_list, &start_ccb->ccb_h,
+ periph_links.sle);
+ periph->immediate_priority = CAM_PRIORITY_NONE;
+ wakeup(&periph->ccb_list);
+ } else if (ccb_h == NULL) {
+ softc->ccbs_freed++;
+ xpt_release_ccb(start_ccb);
+ } else {
+ struct ccb_accept_tio *atio;
+ struct ccb_scsiio *csio;
+ uint8_t *data_ptr;
+ uint32_t dxfer_len;
+ ccb_flags flags;
+ union ctl_io *io;
+ uint8_t scsi_status;
+
+ /* Take the ATIO off the work queue */
+ TAILQ_REMOVE(&softc->work_queue, ccb_h, periph_links.tqe);
+ atio = (struct ccb_accept_tio *)ccb_h;
+ io = (union ctl_io *)ccb_h->io_ptr;
+ csio = &start_ccb->csio;
+
+ flags = atio->ccb_h.flags &
+ (CAM_DIS_DISCONNECT|CAM_TAG_ACTION_VALID|CAM_DIR_MASK);
+
+ if ((io == NULL)
+ || (io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE) {
+ /*
+ * We're done, send status back.
+ */
+ flags |= CAM_SEND_STATUS;
+ if (io == NULL) {
+ scsi_status = SCSI_STATUS_BUSY;
+ csio->sense_len = 0;
+ } else if ((io->io_hdr.status & CTL_STATUS_MASK) ==
+ CTL_CMD_ABORTED) {
+ io->io_hdr.flags &= ~CTL_FLAG_STATUS_QUEUED;
+
+ /*
+ * If this command was aborted, we don't
+ * need to send status back to the SIM.
+ * Just free the CTIO and ctl_io, and
+ * recycle the ATIO back to the SIM.
+ */
+ xpt_print(periph->path, "%s: aborted "
+ "command 0x%04x discarded\n",
+ __func__, io->scsiio.tag_num);
+ ctl_free_io(io);
+ /*
+ * For a wildcard attachment, commands can
+ * come in with a specific target/lun. Reset
+ * the target and LUN fields back to the
+ * wildcard values before we send them back
+ * down to the SIM. The SIM has a wildcard
+ * LUN enabled, not whatever target/lun
+ * these happened to be.
+ */
+ if (softc->flags & CTLFE_LUN_WILDCARD) {
+ atio->ccb_h.target_id =
+ CAM_TARGET_WILDCARD;
+ atio->ccb_h.target_lun =
+ CAM_LUN_WILDCARD;
+ }
+
+ if ((atio->ccb_h.status & CAM_DEV_QFRZN) != 0) {
+ cam_release_devq(periph->path,
+ /*relsim_flags*/0,
+ /*reduction*/0,
+ /*timeout*/0,
+ /*getcount_only*/0);
+ atio->ccb_h.status &= ~CAM_DEV_QFRZN;
+ }
+
+ ccb_h = TAILQ_FIRST(&softc->work_queue);
+
+ if (atio->ccb_h.func_code !=
+ XPT_ACCEPT_TARGET_IO) {
+ xpt_print(periph->path, "%s: func_code "
+ "is %#x\n", __func__,
+ atio->ccb_h.func_code);
+ }
+ start_ccb->ccb_h.func_code = XPT_ABORT;
+ start_ccb->cab.abort_ccb = (union ccb *)atio;
+ start_ccb->ccb_h.cbfcnp = ctlfedone;
+
+ /* Tell the SIM that we've aborted this ATIO */
+ xpt_action(start_ccb);
+ softc->ccbs_freed++;
+ xpt_release_ccb(start_ccb);
+
+ /*
+ * Send the ATIO back down to the SIM.
+ */
+ xpt_action((union ccb *)atio);
+ softc->atios_sent++;
+
+ /*
+ * If we still have work to do, ask for
+ * another CCB. Otherwise, deactivate our
+ * callout.
+ */
+ if (ccb_h != NULL)
+ xpt_schedule(periph, /*priority*/ 1);
+ else
+ callout_stop(&softc->dma_callout);
+
+ return;
+ } else {
+ io->io_hdr.flags &= ~CTL_FLAG_STATUS_QUEUED;
+ scsi_status = io->scsiio.scsi_status;
+ csio->sense_len = io->scsiio.sense_len;
+ }
+ data_ptr = NULL;
+ dxfer_len = 0;
+ if (io == NULL) {
+ printf("%s: tag %04x io is NULL\n", __func__,
+ atio->tag_id);
+ } else {
+#ifdef CTLFEDEBUG
+ printf("%s: tag %04x status %x\n", __func__,
+ atio->tag_id, io->io_hdr.status);
+#endif
+ }
+ csio->sglist_cnt = 0;
+ if (csio->sense_len != 0) {
+ csio->sense_data = io->scsiio.sense_data;
+ flags |= CAM_SEND_SENSE;
+ } else if (scsi_status == SCSI_STATUS_CHECK_COND) {
+ xpt_print(periph->path, "%s: check condition "
+ "with no sense\n", __func__);
+ }
+ } else {
+ struct ctlfe_lun_cmd_info *cmd_info;
+
+ /*
+ * Datamove call, we need to setup the S/G list.
+ * If we pass in a S/G list, the isp(4) driver at
+ * least expects physical/bus addresses.
+ */
+
+ cmd_info = (struct ctlfe_lun_cmd_info *)
+ io->io_hdr.port_priv;
+
+ KASSERT(sizeof(*cmd_info) < CTL_PORT_PRIV_SIZE,
+ ("%s: sizeof(struct ctlfe_lun_cmd_info) %zd < "
+ "CTL_PORT_PRIV_SIZE %d", __func__,
+ sizeof(*cmd_info), CTL_PORT_PRIV_SIZE));
+ io->io_hdr.flags &= ~CTL_FLAG_DMA_QUEUED;
+
+ /*
+ * Need to zero this, in case it has been used for
+ * a previous datamove for this particular I/O.
+ */
+ bzero(cmd_info, sizeof(*cmd_info));
+ scsi_status = 0;
+
+ /*
+ * Set the direction, relative to the initiator.
+ */
+ flags &= ~CAM_DIR_MASK;
+ if ((io->io_hdr.flags & CTL_FLAG_DATA_MASK) ==
+ CTL_FLAG_DATA_IN)
+ flags |= CAM_DIR_IN;
+ else
+ flags |= CAM_DIR_OUT;
+
+ csio->cdb_len = atio->cdb_len;
+
+ if (io->scsiio.kern_sg_entries == 0) {
+ /* No S/G list */
+ data_ptr = io->scsiio.kern_data_ptr;
+ dxfer_len = io->scsiio.kern_data_len;
+ csio->sglist_cnt = 0;
+
+ if (io->io_hdr.flags & CTL_FLAG_BUS_ADDR)
+ flags |= CAM_DATA_PHYS;
+ } else if (io->scsiio.kern_sg_entries <=
+ (sizeof(cmd_info->cam_sglist)/
+ sizeof(cmd_info->cam_sglist[0]))) {
+ /*
+ * S/G list with physical or virtual pointers.
+ * Just populate the CAM S/G list with the
+ * pointers.
+ */
+ int i;
+ struct ctl_sg_entry *ctl_sglist;
+ bus_dma_segment_t *cam_sglist;
+
+ ctl_sglist = (struct ctl_sg_entry *)
+ io->scsiio.kern_data_ptr;
+ cam_sglist = cmd_info->cam_sglist;
+
+ for (i = 0; i < io->scsiio.kern_sg_entries;i++){
+ cam_sglist[i].ds_addr =
+ (bus_addr_t)ctl_sglist[i].addr;
+ cam_sglist[i].ds_len =
+ ctl_sglist[i].len;
+ }
+ csio->sglist_cnt = io->scsiio.kern_sg_entries;
+ flags |= CAM_SCATTER_VALID;
+ if (io->io_hdr.flags & CTL_FLAG_BUS_ADDR)
+ flags |= CAM_SG_LIST_PHYS;
+ else
+ flags &= ~CAM_SG_LIST_PHYS;
+ data_ptr = (uint8_t *)cam_sglist;
+ dxfer_len = io->scsiio.kern_data_len;
+ } else {
+ /* S/G list with virtual pointers */
+ struct ctl_sg_entry *sglist;
+ int *ti;
+
+ /*
+ * XXX KDM this is a temporary hack. The
+ * isp(4) driver can't deal with S/G lists
+ * with virtual pointers, so we need to
+ * go through and send down one virtual
+ * pointer at a time.
+ */
+ sglist = (struct ctl_sg_entry *)
+ io->scsiio.kern_data_ptr;
+ ti = &cmd_info->cur_transfer_index;
+ data_ptr = sglist[*ti].addr;
+ dxfer_len = sglist[*ti].len;
+ csio->sglist_cnt = 0;
+ cmd_info->flags |= CTLFE_CMD_PIECEWISE;
+ (*ti)++;
+ }
+
+ io->scsiio.ext_data_filled += dxfer_len;
+
+ if (io->scsiio.ext_data_filled >
+ io->scsiio.kern_total_len) {
+ xpt_print(periph->path, "%s: tag 0x%04x "
+ "fill len %u > total %u\n",
+ __func__, io->scsiio.tag_num,
+ io->scsiio.ext_data_filled,
+ io->scsiio.kern_total_len);
+ }
+ }
+
+#ifdef CTLFEDEBUG
+ printf("%s: %s: tag %04x flags %x ptr %p len %u\n", __func__,
+ (flags & CAM_SEND_STATUS) ? "done" : "datamove",
+ atio->tag_id, flags, data_ptr, dxfer_len);
+#endif
+
+ /*
+ * Valid combinations:
+ * - CAM_SEND_STATUS, SCATTER_VALID = 0, dxfer_len = 0,
+ * sglist_cnt = 0
+ * - CAM_SEND_STATUS = 0, SCATTER_VALID = 0, dxfer_len != 0,
+ * sglist_cnt = 0
+ * - CAM_SEND_STATUS = 0, SCATTER_VALID, dxfer_len != 0,
+ * sglist_cnt != 0
+ */
+#ifdef CTLFEDEBUG
+ if (((flags & CAM_SEND_STATUS)
+ && (((flags & CAM_SCATTER_VALID) != 0)
+ || (dxfer_len != 0)
+ || (csio->sglist_cnt != 0)))
+ || (((flags & CAM_SEND_STATUS) == 0)
+ && (dxfer_len == 0))
+ || ((flags & CAM_SCATTER_VALID)
+ && (csio->sglist_cnt == 0))
+ || (((flags & CAM_SCATTER_VALID) == 0)
+ && (csio->sglist_cnt != 0))) {
+ printf("%s: tag %04x cdb %02x flags %#x dxfer_len "
+ "%d sg %u\n", __func__, atio->tag_id,
+ atio->cdb_io.cdb_bytes[0], flags, dxfer_len,
+ csio->sglist_cnt);
+ if (io != NULL) {
+ printf("%s: tag %04x io status %#x\n", __func__,
+ atio->tag_id, io->io_hdr.status);
+ } else {
+ printf("%s: tag %04x no associated io\n",
+ __func__, atio->tag_id);
+ }
+ }
+#endif
+ cam_fill_ctio(csio,
+ /*retries*/ 2,
+ ctlfedone,
+ flags,
+ (flags & CAM_TAG_ACTION_VALID) ?
+ MSG_SIMPLE_Q_TAG : 0,
+ atio->tag_id,
+ atio->init_id,
+ scsi_status,
+ /*data_ptr*/ data_ptr,
+ /*dxfer_len*/ dxfer_len,
+ /*timeout*/ 5 * 1000);
+ start_ccb->ccb_h.ccb_atio = atio;
+ if (((flags & CAM_SEND_STATUS) == 0)
+ && (io != NULL))
+ io->io_hdr.flags |= CTL_FLAG_DMA_INPROG;
+
+ softc->ctios_sent++;
+
+ xpt_action(start_ccb);
+
+ if ((atio->ccb_h.status & CAM_DEV_QFRZN) != 0) {
+ cam_release_devq(periph->path,
+ /*relsim_flags*/0,
+ /*reduction*/0,
+ /*timeout*/0,
+ /*getcount_only*/0);
+ atio->ccb_h.status &= ~CAM_DEV_QFRZN;
+ }
+
+ ccb_h = TAILQ_FIRST(&softc->work_queue);
+ }
+ /*
+ * If we still have work to do, ask for another CCB. Otherwise,
+ * deactivate our callout.
+ */
+ if (ccb_h != NULL)
+ xpt_schedule(periph, /*priority*/ 1);
+ else
+ callout_stop(&softc->dma_callout);
+}
+
+static void
+ctlfe_free_ccb(struct cam_periph *periph, union ccb *ccb)
+{
+ struct ctlfe_lun_softc *softc;
+
+ softc = (struct ctlfe_lun_softc *)periph->softc;
+
+ switch (ccb->ccb_h.func_code) {
+ case XPT_ACCEPT_TARGET_IO:
+ softc->atios_returned++;
+ break;
+ case XPT_IMMEDIATE_NOTIFY:
+ case XPT_NOTIFY_ACKNOWLEDGE:
+ softc->inots_returned++;
+ break;
+ default:
+ break;
+ }
+
+ free(ccb, M_CTLFE);
+
+ KASSERT(softc->atios_returned <= softc->atios_sent, ("%s: "
+ "atios_returned %ju > atios_sent %ju", __func__,
+ softc->atios_returned, softc->atios_sent));
+ KASSERT(softc->inots_returned <= softc->inots_sent, ("%s: "
+ "inots_returned %ju > inots_sent %ju", __func__,
+ softc->inots_returned, softc->inots_sent));
+
+ /*
+ * If we have received all of our CCBs, we can release our
+ * reference on the peripheral driver. It will probably go away
+ * now.
+ */
+ if ((softc->atios_returned == softc->atios_sent)
+ && (softc->inots_returned == softc->inots_sent)) {
+ cam_periph_release_locked(periph);
+ }
+}
+
+static void
+ctlfedone(struct cam_periph *periph, union ccb *done_ccb)
+{
+ struct ctlfe_lun_softc *softc;
+ struct ctlfe_softc *bus_softc;
+
+#ifdef CTLFE_DEBUG
+ printf("%s: entered, func_code = %#x, type = %#lx\n", __func__,
+ done_ccb->ccb_h.func_code, done_ccb->ccb_h.ccb_type);
+#endif
+
+ softc = (struct ctlfe_lun_softc *)periph->softc;
+ bus_softc = softc->parent_softc;
+
+ if (done_ccb->ccb_h.ccb_type == CTLFE_CCB_WAITING) {
+ panic("shouldn't get to the CCB waiting case!");
+ wakeup(&done_ccb->ccb_h.cbfcnp);
+ return;
+ }
+
+ /*
+ * If the peripheral is invalid, ATIOs and immediate notify CCBs
+ * need to be freed. Most of the ATIOs and INOTs that come back
+ * will be CCBs that are being returned from the SIM as a result of
+ * our disabling the LUN.
+ *
+ * Other CCB types are handled in their respective cases below.
+ */
+ if (periph->flags & CAM_PERIPH_INVALID) {
+ switch (done_ccb->ccb_h.func_code) {
+ case XPT_ACCEPT_TARGET_IO:
+ case XPT_IMMEDIATE_NOTIFY:
+ case XPT_NOTIFY_ACKNOWLEDGE:
+ ctlfe_free_ccb(periph, done_ccb);
+ return;
+ default:
+ break;
+ }
+
+ }
+ switch (done_ccb->ccb_h.func_code) {
+ case XPT_ACCEPT_TARGET_IO: {
+ union ctl_io *io;
+ struct ccb_accept_tio *atio;
+
+ atio = &done_ccb->atio;
+
+ softc->atios_returned++;
+
+ /*
+ * Allocate a ctl_io, pass it to CTL, and wait for the
+ * datamove or done.
+ */
+ io = ctl_alloc_io(bus_softc->fe.ctl_pool_ref);
+ if (io == NULL) {
+ atio->ccb_h.flags &= ~CAM_DIR_MASK;
+ atio->ccb_h.flags |= CAM_DIR_NONE;
+
+ printf("%s: ctl_alloc_io failed!\n", __func__);
+
+ /*
+ * XXX KDM need to set SCSI_STATUS_BUSY, but there
+ * is no field in the ATIO structure to do that,
+ * and we aren't able to allocate a ctl_io here.
+ * What to do?
+ */
+ atio->sense_len = 0;
+ done_ccb->ccb_h.io_ptr = NULL;
+ TAILQ_INSERT_TAIL(&softc->work_queue, &atio->ccb_h,
+ periph_links.tqe);
+ xpt_schedule(periph, /*priority*/ 1);
+ break;
+ }
+ ctl_zero_io(io);
+
+ /* Save pointers on both sides */
+ io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = done_ccb;
+ done_ccb->ccb_h.io_ptr = io;
+
+ /*
+ * Only SCSI I/O comes down this path, resets, etc. come
+ * down the immediate notify path below.
+ */
+ io->io_hdr.io_type = CTL_IO_SCSI;
+ io->io_hdr.nexus.initid.id = atio->init_id;
+ io->io_hdr.nexus.targ_port = bus_softc->fe.targ_port;
+ io->io_hdr.nexus.targ_target.id = atio->ccb_h.target_id;
+ io->io_hdr.nexus.targ_lun = atio->ccb_h.target_lun;
+ io->scsiio.tag_num = atio->tag_id;
+ switch (atio->tag_action) {
+ case CAM_TAG_ACTION_NONE:
+ io->scsiio.tag_type = CTL_TAG_UNTAGGED;
+ break;
+ case MSG_SIMPLE_TASK:
+ io->scsiio.tag_type = CTL_TAG_SIMPLE;
+ break;
+ case MSG_HEAD_OF_QUEUE_TASK:
+ io->scsiio.tag_type = CTL_TAG_HEAD_OF_QUEUE;
+ break;
+ case MSG_ORDERED_TASK:
+ io->scsiio.tag_type = CTL_TAG_ORDERED;
+ break;
+ case MSG_ACA_TASK:
+ io->scsiio.tag_type = CTL_TAG_ACA;
+ break;
+ default:
+ io->scsiio.tag_type = CTL_TAG_UNTAGGED;
+ printf("%s: unhandled tag type %#x!!\n", __func__,
+ atio->tag_action);
+ break;
+ }
+ if (atio->cdb_len > sizeof(io->scsiio.cdb)) {
+ printf("%s: WARNING: CDB len %d > ctl_io space %zd\n",
+ __func__, atio->cdb_len, sizeof(io->scsiio.cdb));
+ }
+ io->scsiio.cdb_len = min(atio->cdb_len, sizeof(io->scsiio.cdb));
+ bcopy(atio->cdb_io.cdb_bytes, io->scsiio.cdb,
+ io->scsiio.cdb_len);
+
+#ifdef CTLFEDEBUG
+ printf("%s: %ju:%d:%ju:%d: tag %04x CDB %02x\n", __func__,
+ (uintmax_t)io->io_hdr.nexus.initid.id,
+ io->io_hdr.nexus.targ_port,
+ (uintmax_t)io->io_hdr.nexus.targ_target.id,
+ io->io_hdr.nexus.targ_lun,
+ io->scsiio.tag_num, io->scsiio.cdb[0]);
+#endif
+
+ ctl_queue(io);
+ break;
+ }
+ case XPT_CONT_TARGET_IO: {
+ struct ccb_accept_tio *atio;
+ union ctl_io *io;
+
+ atio = (struct ccb_accept_tio *)done_ccb->ccb_h.ccb_atio;
+ io = (union ctl_io *)atio->ccb_h.io_ptr;
+
+ softc->ctios_returned++;
+#ifdef CTLFEDEBUG
+ printf("%s: got XPT_CONT_TARGET_IO tag %#x flags %#x\n",
+ __func__, atio->tag_id, done_ccb->ccb_h.flags);
+#endif
+ /*
+ * If we were sending status back to the initiator, free up
+ * resources. If we were doing a datamove, call the
+ * datamove done routine.
+ */
+ if (done_ccb->ccb_h.flags & CAM_SEND_STATUS) {
+ softc->ccbs_freed++;
+ xpt_release_ccb(done_ccb);
+ ctl_free_io(io);
+ /*
+ * For a wildcard attachment, commands can come in
+ * with a specific target/lun. Reset the target
+ * and LUN fields back to the wildcard values before
+ * we send them back down to the SIM. The SIM has
+ * a wildcard LUN enabled, not whatever target/lun
+ * these happened to be.
+ */
+ if (softc->flags & CTLFE_LUN_WILDCARD) {
+ atio->ccb_h.target_id = CAM_TARGET_WILDCARD;
+ atio->ccb_h.target_lun = CAM_LUN_WILDCARD;
+ }
+ if (periph->flags & CAM_PERIPH_INVALID) {
+ ctlfe_free_ccb(periph, (union ccb *)atio);
+ return;
+ } else {
+ xpt_action((union ccb *)atio);
+ softc->atios_sent++;
+ }
+ } else {
+ struct ctlfe_lun_cmd_info *cmd_info;
+ struct ccb_scsiio *csio;
+
+ csio = &done_ccb->csio;
+ cmd_info = (struct ctlfe_lun_cmd_info *)
+ io->io_hdr.port_priv;
+
+ io->io_hdr.flags &= ~CTL_FLAG_DMA_INPROG;
+
+ io->scsiio.ext_data_len += csio->dxfer_len;
+ if (io->scsiio.ext_data_len >
+ io->scsiio.kern_total_len) {
+ xpt_print(periph->path, "%s: tag 0x%04x "
+ "done len %u > total %u sent %u\n",
+ __func__, io->scsiio.tag_num,
+ io->scsiio.ext_data_len,
+ io->scsiio.kern_total_len,
+ io->scsiio.ext_data_filled);
+ }
+ /*
+ * Translate CAM status to CTL status. Success
+ * does not change the overall, ctl_io status. In
+ * that case we just set port_status to 0. If we
+ * have a failure, though, set a data phase error
+ * for the overall ctl_io.
+ */
+ switch (done_ccb->ccb_h.status & CAM_STATUS_MASK) {
+ case CAM_REQ_CMP:
+ io->io_hdr.port_status = 0;
+ break;
+ default:
+ /*
+ * XXX KDM the isp(4) driver doesn't really
+ * seem to send errors back for data
+ * transfers that I can tell. There is one
+ * case where it'll send CAM_REQ_CMP_ERR,
+ * but probably not that many more cases.
+ * So set a generic data phase error here,
+ * like the SXP driver sets.
+ */
+ io->io_hdr.port_status = 0xbad1;
+ ctl_set_data_phase_error(&io->scsiio);
+ /*
+ * XXX KDM figure out residual.
+ */
+ break;
+ }
+ /*
+ * If we had to break this S/G list into multiple
+ * pieces, figure out where we are in the list, and
+ * continue sending pieces if necessary.
+ */
+ if ((cmd_info->flags & CTLFE_CMD_PIECEWISE)
+ && (io->io_hdr.port_status == 0)
+ && (cmd_info->cur_transfer_index <
+ io->scsiio.kern_sg_entries)) {
+ struct ctl_sg_entry *sglist;
+ ccb_flags flags;
+ uint8_t scsi_status;
+ uint8_t *data_ptr;
+ uint32_t dxfer_len;
+ int *ti;
+
+ sglist = (struct ctl_sg_entry *)
+ io->scsiio.kern_data_ptr;
+ ti = &cmd_info->cur_transfer_index;
+ flags = atio->ccb_h.flags &
+ (CAM_DIS_DISCONNECT|
+ CAM_TAG_ACTION_VALID|
+ CAM_DIR_MASK);
+
+ /*
+ * Set the direction, relative to the initiator.
+ */
+ flags &= ~CAM_DIR_MASK;
+ if ((io->io_hdr.flags & CTL_FLAG_DATA_MASK) ==
+ CTL_FLAG_DATA_IN)
+ flags |= CAM_DIR_IN;
+ else
+ flags |= CAM_DIR_OUT;
+
+ data_ptr = sglist[*ti].addr;
+ dxfer_len = sglist[*ti].len;
+ (*ti)++;
+
+ scsi_status = 0;
+
+ if (((flags & CAM_SEND_STATUS) == 0)
+ && (dxfer_len == 0)) {
+ printf("%s: tag %04x no status or "
+ "len cdb = %02x\n", __func__,
+ atio->tag_id,
+ atio->cdb_io.cdb_bytes[0]);
+ printf("%s: tag %04x io status %#x\n",
+ __func__, atio->tag_id,
+ io->io_hdr.status);
+ }
+
+ cam_fill_ctio(csio,
+ /*retries*/ 2,
+ ctlfedone,
+ flags,
+ (flags & CAM_TAG_ACTION_VALID) ?
+ MSG_SIMPLE_Q_TAG : 0,
+ atio->tag_id,
+ atio->init_id,
+ scsi_status,
+ /*data_ptr*/ data_ptr,
+ /*dxfer_len*/ dxfer_len,
+ /*timeout*/ 5 * 1000);
+
+ csio->resid = 0;
+ csio->ccb_h.ccb_atio = atio;
+ io->io_hdr.flags |= CTL_FLAG_DMA_INPROG;
+ softc->ctios_sent++;
+ xpt_action((union ccb *)csio);
+ } else {
+ /*
+ * Release the CTIO. The ATIO will be sent back
+ * down to the SIM once we send status.
+ */
+ softc->ccbs_freed++;
+ xpt_release_ccb(done_ccb);
+
+ /* Call the backend move done callback */
+ io->scsiio.be_move_done(io);
+ }
+ }
+ break;
+ }
+ case XPT_IMMEDIATE_NOTIFY: {
+ union ctl_io *io;
+ struct ccb_immediate_notify *inot;
+ cam_status status;
+ int frozen;
+
+ inot = &done_ccb->cin1;
+
+ softc->inots_returned++;
+
+ frozen = (done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0;
+
+ printf("%s: got XPT_IMMEDIATE_NOTIFY status %#x tag %#x "
+ "seq %#x\n", __func__, inot->ccb_h.status,
+ inot->tag_id, inot->seq_id);
+
+ io = ctl_alloc_io(bus_softc->fe.ctl_pool_ref);
+ if (io != NULL) {
+ int send_ctl_io;
+
+ send_ctl_io = 1;
+
+ ctl_zero_io(io);
+ io->io_hdr.io_type = CTL_IO_TASK;
+ io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr =done_ccb;
+ inot->ccb_h.io_ptr = io;
+ io->io_hdr.nexus.initid.id = inot->initiator_id;
+ io->io_hdr.nexus.targ_port = bus_softc->fe.targ_port;
+ io->io_hdr.nexus.targ_target.id = inot->ccb_h.target_id;
+ io->io_hdr.nexus.targ_lun = inot->ccb_h.target_lun;
+ /* XXX KDM should this be the tag_id? */
+ io->taskio.tag_num = inot->seq_id;
+
+ status = inot->ccb_h.status & CAM_STATUS_MASK;
+ switch (status) {
+ case CAM_SCSI_BUS_RESET:
+ io->taskio.task_action = CTL_TASK_BUS_RESET;
+ break;
+ case CAM_BDR_SENT:
+ io->taskio.task_action = CTL_TASK_TARGET_RESET;
+ break;
+ case CAM_MESSAGE_RECV:
+ switch (inot->arg) {
+ case MSG_ABORT_TASK_SET:
+ /*
+ * XXX KDM this isn't currently
+ * supported by CTL. It ends up
+ * being a no-op.
+ */
+ io->taskio.task_action =
+ CTL_TASK_ABORT_TASK_SET;
+ break;
+ case MSG_TARGET_RESET:
+ io->taskio.task_action =
+ CTL_TASK_TARGET_RESET;
+ break;
+ case MSG_ABORT_TASK:
+ io->taskio.task_action =
+ CTL_TASK_ABORT_TASK;
+ break;
+ case MSG_LOGICAL_UNIT_RESET:
+ io->taskio.task_action =
+ CTL_TASK_LUN_RESET;
+ break;
+ case MSG_CLEAR_TASK_SET:
+ /*
+ * XXX KDM this isn't currently
+ * supported by CTL. It ends up
+ * being a no-op.
+ */
+ io->taskio.task_action =
+ CTL_TASK_CLEAR_TASK_SET;
+ break;
+ case MSG_CLEAR_ACA:
+ io->taskio.task_action =
+ CTL_TASK_CLEAR_ACA;
+ break;
+ case MSG_NOOP:
+ send_ctl_io = 0;
+ break;
+ default:
+ xpt_print(periph->path, "%s: "
+ "unsupported message 0x%x\n",
+ __func__, inot->arg);
+ send_ctl_io = 0;
+ break;
+ }
+ break;
+ case CAM_REQ_ABORTED:
+ /*
+ * This request was sent back by the driver.
+ * XXX KDM what do we do here?
+ */
+ send_ctl_io = 0;
+ break;
+ default:
+ xpt_print(periph->path, "%s: "
+ "unsupported CAM status 0x%x\n",
+ __func__, status);
+ send_ctl_io = 0;
+ break;
+ }
+ if (send_ctl_io != 0) {
+ ctl_queue(io);
+ } else {
+ ctl_free_io(io);
+ done_ccb->ccb_h.status = CAM_REQ_INPROG;
+ done_ccb->ccb_h.func_code =
+ XPT_NOTIFY_ACKNOWLEDGE;
+ xpt_action(done_ccb);
+ }
+ } else {
+ xpt_print(periph->path, "%s: could not allocate "
+ "ctl_io for immediate notify!\n", __func__);
+ /* requeue this to the adapter */
+ done_ccb->ccb_h.status = CAM_REQ_INPROG;
+ done_ccb->ccb_h.func_code = XPT_NOTIFY_ACKNOWLEDGE;
+ xpt_action(done_ccb);
+ }
+
+ if (frozen != 0) {
+ cam_release_devq(periph->path,
+ /*relsim_flags*/ 0,
+ /*opening reduction*/ 0,
+ /*timeout*/ 0,
+ /*getcount_only*/ 0);
+ }
+ break;
+ }
+ case XPT_NOTIFY_ACKNOWLEDGE:
+ /*
+ * Queue this back down to the SIM as an immediate notify.
+ */
+ done_ccb->ccb_h.func_code = XPT_IMMEDIATE_NOTIFY;
+ xpt_action(done_ccb);
+ softc->inots_sent++;
+ break;
+ case XPT_ABORT:
+ /*
+ * XPT_ABORT is an immediate CCB, we shouldn't get here.
+ */
+ panic("%s: XPT_ABORT CCB returned!", __func__);
+ break;
+ case XPT_SET_SIM_KNOB:
+ case XPT_GET_SIM_KNOB:
+ break;
+ default:
+ panic("%s: unexpected CCB type %#x", __func__,
+ done_ccb->ccb_h.func_code);
+ break;
+ }
+}
+
+static void
+ctlfe_onoffline(void *arg, int online)
+{
+ struct ctlfe_softc *bus_softc;
+ union ccb *ccb;
+ cam_status status;
+ struct cam_path *path;
+ struct cam_sim *sim;
+ int set_wwnn;
+
+ bus_softc = (struct ctlfe_softc *)arg;
+
+ set_wwnn = 0;
+
+ status = xpt_create_path(&path, /*periph*/ NULL, bus_softc->path_id,
+ CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD);
+ if (status != CAM_REQ_CMP) {
+ printf("%s: unable to create path!\n", __func__);
+ return;
+ }
+ ccb = (union ccb *)malloc(sizeof(*ccb), M_TEMP, M_WAITOK | M_ZERO);
+ if (ccb == NULL) {
+ printf("%s: unable to malloc CCB!\n", __func__);
+ xpt_free_path(path);
+ return;
+ }
+ xpt_setup_ccb(&ccb->ccb_h, path, /*priority*/ 1);
+
+ sim = xpt_path_sim(path);
+
+ /*
+ * Copan WWN format:
+ *
+ * Bits 63-60: 0x5 NAA, IEEE registered name
+ * Bits 59-36: 0x000ED5 IEEE Company name assigned to Copan
+ * Bits 35-12: Copan SSN (Sequential Serial Number)
+ * Bits 11-8: Type of port:
+ * 1 == N-Port
+ * 2 == F-Port
+ * 3 == NL-Port
+ * Bits 7-0: 0 == Node Name, >0 == Port Number
+ */
+
+ if (online != 0) {
+
+ ccb->ccb_h.func_code = XPT_GET_SIM_KNOB;
+
+ CAM_SIM_LOCK(sim);
+
+ xpt_action(ccb);
+
+ CAM_SIM_UNLOCK(sim);
+
+ if ((ccb->knob.xport_specific.valid & KNOB_VALID_ADDRESS) != 0){
+#ifdef RANDOM_WWNN
+ uint64_t random_bits;
+#endif
+
+ printf("%s: %s current WWNN %#jx\n", __func__,
+ bus_softc->port_name,
+ ccb->knob.xport_specific.fc.wwnn);
+ printf("%s: %s current WWPN %#jx\n", __func__,
+ bus_softc->port_name,
+ ccb->knob.xport_specific.fc.wwpn);
+
+#ifdef RANDOM_WWNN
+ arc4rand(&random_bits, sizeof(random_bits), 0);
+#endif
+
+ /*
+ * XXX KDM this is a bit of a kludge for now. We
+ * take the current WWNN/WWPN from the card, and
+ * replace the company identifier and the NL-Port
+ * indicator and the port number (for the WWPN).
+ * This should be replaced later with ddb_GetWWNN,
+ * or possibly a more centralized scheme. (It
+ * would be nice to have the WWNN/WWPN for each
+ * port stored in the ctl_frontend structure.)
+ */
+#ifdef RANDOM_WWNN
+ ccb->knob.xport_specific.fc.wwnn =
+ (random_bits &
+ 0x0000000fffffff00ULL) |
+ /* Company ID */ 0x5000ED5000000000ULL |
+ /* NL-Port */ 0x0300;
+ ccb->knob.xport_specific.fc.wwpn =
+ (random_bits &
+ 0x0000000fffffff00ULL) |
+ /* Company ID */ 0x5000ED5000000000ULL |
+ /* NL-Port */ 0x3000 |
+ /* Port Num */ (bus_softc->fe.targ_port & 0xff);
+
+ /*
+ * This is a bit of an API break/reversal, but if
+ * we're doing the random WWNN that's a little
+ * different anyway. So record what we're actually
+ * using with the frontend code so it's reported
+ * accurately.
+ */
+ bus_softc->fe.wwnn =
+ ccb->knob.xport_specific.fc.wwnn;
+ bus_softc->fe.wwpn =
+ ccb->knob.xport_specific.fc.wwpn;
+ set_wwnn = 1;
+#else /* RANDOM_WWNN */
+ /*
+ * If the user has specified a WWNN/WWPN, send them
+ * down to the SIM. Otherwise, record what the SIM
+ * has reported.
+ */
+ if ((bus_softc->fe.wwnn != 0)
+ && (bus_softc->fe.wwpn != 0)) {
+ ccb->knob.xport_specific.fc.wwnn =
+ bus_softc->fe.wwnn;
+ ccb->knob.xport_specific.fc.wwpn =
+ bus_softc->fe.wwpn;
+ set_wwnn = 1;
+ } else {
+ bus_softc->fe.wwnn =
+ ccb->knob.xport_specific.fc.wwnn;
+ bus_softc->fe.wwpn =
+ ccb->knob.xport_specific.fc.wwpn;
+ }
+#endif /* RANDOM_WWNN */
+
+
+ if (set_wwnn != 0) {
+ printf("%s: %s new WWNN %#jx\n", __func__,
+ bus_softc->port_name,
+ ccb->knob.xport_specific.fc.wwnn);
+ printf("%s: %s new WWPN %#jx\n", __func__,
+ bus_softc->port_name,
+ ccb->knob.xport_specific.fc.wwpn);
+ }
+ } else {
+ printf("%s: %s has no valid WWNN/WWPN\n", __func__,
+ bus_softc->port_name);
+ }
+ }
+ ccb->ccb_h.func_code = XPT_SET_SIM_KNOB;
+ ccb->knob.xport_specific.valid = KNOB_VALID_ROLE;
+ if (set_wwnn != 0)
+ ccb->knob.xport_specific.valid |= KNOB_VALID_ADDRESS;
+
+ if (online != 0)
+ ccb->knob.xport_specific.fc.role = KNOB_ROLE_TARGET;
+ else
+ ccb->knob.xport_specific.fc.role = KNOB_ROLE_NONE;
+
+
+ CAM_SIM_LOCK(sim);
+
+ xpt_action(ccb);
+
+ CAM_SIM_UNLOCK(sim);
+
+ if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) {
+ printf("%s: SIM %s (path id %d) target %s failed with "
+ "status %#x\n",
+ __func__, bus_softc->port_name, bus_softc->path_id,
+ (online != 0) ? "enable" : "disable",
+ ccb->ccb_h.status);
+ } else {
+ printf("%s: SIM %s (path id %d) target %s succeeded\n",
+ __func__, bus_softc->port_name, bus_softc->path_id,
+ (online != 0) ? "enable" : "disable");
+ }
+
+ free(ccb, M_TEMP);
+ xpt_free_path(path);
+
+ return;
+}
+
+static void
+ctlfe_online(void *arg)
+{
+ ctlfe_onoffline(arg, /*online*/ 1);
+}
+
+static void
+ctlfe_offline(void *arg)
+{
+ ctlfe_onoffline(arg, /*online*/ 0);
+}
+
+static int
+ctlfe_targ_enable(void *arg, struct ctl_id targ_id)
+{
+ return (0);
+}
+
+static int
+ctlfe_targ_disable(void *arg, struct ctl_id targ_id)
+{
+ return (0);
+}
+
+/*
+ * This will get called to enable a LUN on every bus that is attached to
+ * CTL. So we only need to create a path/periph for this particular bus.
+ */
+static int
+ctlfe_lun_enable(void *arg, struct ctl_id targ_id, int lun_id)
+{
+ struct ctlfe_softc *bus_softc;
+ struct ctlfe_lun_softc *softc;
+ struct cam_path *path;
+ struct cam_periph *periph;
+ struct cam_sim *sim;
+ cam_status status;
+
+
+ bus_softc = (struct ctlfe_softc *)arg;
+
+ status = xpt_create_path_unlocked(&path, /*periph*/ NULL,
+ bus_softc->path_id,
+ targ_id.id,
+ lun_id);
+ /* XXX KDM need some way to return status to CTL here? */
+ if (status != CAM_REQ_CMP) {
+ printf("%s: could not create path, status %#x\n", __func__,
+ status);
+ return (1);
+ }
+
+ softc = malloc(sizeof(*softc), M_CTLFE, M_WAITOK | M_ZERO);
+ if (softc == NULL) {
+ printf("%s: could not allocate %zd bytes for softc\n",
+ __func__, sizeof(*softc));
+ xpt_free_path(path);
+ return (1);
+ }
+ sim = xpt_path_sim(path);
+ mtx_lock(sim->mtx);
+ periph = cam_periph_find(path, "ctl");
+ if (periph != NULL) {
+ /* We've already got a periph, no need to alloc a new one. */
+ xpt_free_path(path);
+ free(softc, M_CTLFE);
+ mtx_unlock(sim->mtx);
+ return (0);
+ }
+
+ softc->parent_softc = bus_softc;
+ STAILQ_INSERT_TAIL(&bus_softc->lun_softc_list, softc, links);
+
+ status = cam_periph_alloc(ctlferegister,
+ ctlfeoninvalidate,
+ ctlfecleanup,
+ ctlfestart,
+ "ctl",
+ CAM_PERIPH_BIO,
+ path,
+ ctlfeasync,
+ 0,
+ softc);
+
+ mtx_unlock(sim->mtx);
+
+ xpt_free_path(path);
+
+ return (0);
+}
+
+/*
+ * XXX KDM we disable LUN removal here. The problem is that the isp(4)
+ * driver doesn't currently handle LUN removal properly. We need to keep
+ * enough state here at the peripheral level even after LUNs have been
+ * removed inside CTL.
+ *
+ * Once the isp(4) driver is fixed, this can be re-enabled.
+ */
+static int
+ctlfe_lun_disable(void *arg, struct ctl_id targ_id, int lun_id)
+{
+#ifdef NOTYET
+ struct ctlfe_softc *softc;
+ struct ctlfe_lun_softc *lun_softc;
+
+ softc = (struct ctlfe_softc *)arg;
+
+ mtx_lock(softc->sim->mtx);
+ STAILQ_FOREACH(lun_softc, &softc->lun_softc_list, links) {
+ struct cam_path *path;
+
+ path = lun_softc->periph->path;
+
+ if ((xpt_path_target_id(path) == targ_id.id)
+ && (xpt_path_lun_id(path) == lun_id)) {
+ break;
+ }
+ }
+ if (lun_softc == NULL) {
+ mtx_unlock(softc->sim->mtx);
+ printf("%s: can't find target %d lun %d\n", __func__,
+ targ_id.id, lun_id);
+ return (1);
+ }
+
+ cam_periph_invalidate(lun_softc->periph);
+
+ mtx_unlock(softc->sim->mtx);
+#endif
+
+ return (0);
+}
+
+static void
+ctlfe_dump_sim(struct cam_sim *sim)
+{
+ int i;
+
+ printf("%s%d: max tagged openings: %d, max dev openings: %d\n",
+ sim->sim_name, sim->unit_number,
+ sim->max_tagged_dev_openings, sim->max_dev_openings);
+ printf("%s%d: max_ccbs: %u, ccb_count: %u\n",
+ sim->sim_name, sim->unit_number,
+ sim->max_ccbs, sim->ccb_count);
+ printf("%s%d: ccb_freeq is %sempty\n",
+ sim->sim_name, sim->unit_number,
+ (SLIST_FIRST(&sim->ccb_freeq) == NULL) ? "" : "NOT ");
+ printf("%s%d: alloc_queue.entries %d, alloc_openings %d\n",
+ sim->sim_name, sim->unit_number,
+ sim->devq->alloc_queue.entries, sim->devq->alloc_openings);
+ printf("%s%d: qfrozen_cnt:", sim->sim_name, sim->unit_number);
+ for (i = 0; i < CAM_RL_VALUES; i++) {
+ printf("%s%u", (i != 0) ? ":" : "",
+ sim->devq->alloc_queue.qfrozen_cnt[i]);
+ }
+ printf("\n");
+}
+
+/*
+ * Assumes that the SIM lock is held.
+ */
+static void
+ctlfe_dump_queue(struct ctlfe_lun_softc *softc)
+{
+ struct ccb_hdr *hdr;
+ struct cam_periph *periph;
+ int num_items;
+
+ periph = softc->periph;
+ num_items = 0;
+
+ TAILQ_FOREACH(hdr, &softc->work_queue, periph_links.tqe) {
+ union ctl_io *io;
+
+ io = hdr->io_ptr;
+
+ num_items++;
+
+ /*
+ * This can happen when we get an ATIO but can't allocate
+ * a ctl_io. See the XPT_ACCEPT_TARGET_IO case in ctlfedone().
+ */
+ if (io == NULL) {
+ struct ccb_scsiio *csio;
+
+ csio = (struct ccb_scsiio *)hdr;
+
+ xpt_print(periph->path, "CCB %#x ctl_io allocation "
+ "failed\n", csio->tag_id);
+ continue;
+ }
+
+ /*
+ * Only regular SCSI I/O is put on the work
+ * queue, so we can print sense here. There may be no
+ * sense if it's no the queue for a DMA, but this serves to
+ * print out the CCB as well.
+ *
+ * XXX KDM switch this over to scsi_sense_print() when
+ * CTL is merged in with CAM.
+ */
+ ctl_io_error_print(io, NULL);
+
+ /*
+ * We're sending status back to the
+ * initiator, so we're on the queue waiting
+ * for a CTIO to do that.
+ */
+ if ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE)
+ continue;
+
+ /*
+ * Otherwise, we're on the queue waiting to
+ * do a data transfer.
+ */
+ xpt_print(periph->path, "Total %u, Current %u, Resid %u\n",
+ io->scsiio.kern_total_len, io->scsiio.kern_data_len,
+ io->scsiio.kern_data_resid);
+ }
+
+ xpt_print(periph->path, "%d requests total waiting for CCBs\n",
+ num_items);
+ xpt_print(periph->path, "%ju CCBs oustanding (%ju allocated, %ju "
+ "freed)\n", (uintmax_t)(softc->ccbs_alloced -
+ softc->ccbs_freed), (uintmax_t)softc->ccbs_alloced,
+ (uintmax_t)softc->ccbs_freed);
+ xpt_print(periph->path, "%ju CTIOs outstanding (%ju sent, %ju "
+ "returned\n", (uintmax_t)(softc->ctios_sent -
+ softc->ctios_returned), softc->ctios_sent,
+ softc->ctios_returned);
+}
+
+/*
+ * This function is called when we fail to get a CCB for a DMA or status return
+ * to the initiator within the specified time period.
+ *
+ * The callout code should insure that we hold the sim mutex here.
+ */
+static void
+ctlfe_dma_timeout(void *arg)
+{
+ struct ctlfe_lun_softc *softc;
+ struct cam_periph *periph;
+ struct cam_sim *sim;
+ int num_queued;
+
+ softc = (struct ctlfe_lun_softc *)arg;
+ periph = softc->periph;
+ sim = xpt_path_sim(periph->path);
+ num_queued = 0;
+
+ /*
+ * Nothing to do...
+ */
+ if (TAILQ_FIRST(&softc->work_queue) == NULL) {
+ xpt_print(periph->path, "TIMEOUT triggered after %d "
+ "seconds, but nothing on work queue??\n",
+ CTLFE_DMA_TIMEOUT);
+ return;
+ }
+
+ xpt_print(periph->path, "TIMEOUT (%d seconds) waiting for DMA to "
+ "start\n", CTLFE_DMA_TIMEOUT);
+
+ ctlfe_dump_queue(softc);
+
+ ctlfe_dump_sim(sim);
+
+ xpt_print(periph->path, "calling xpt_schedule() to attempt to "
+ "unstick our queue\n");
+
+ xpt_schedule(periph, /*priority*/ 1);
+
+ xpt_print(periph->path, "xpt_schedule() call complete\n");
+}
+
+/*
+ * Datamove/done routine called by CTL. Put ourselves on the queue to
+ * receive a CCB from CAM so we can queue the continue I/O request down
+ * to the adapter.
+ */
+static void
+ctlfe_datamove_done(union ctl_io *io)
+{
+ union ccb *ccb;
+ struct cam_sim *sim;
+ struct cam_periph *periph;
+ struct ctlfe_lun_softc *softc;
+
+ ccb = io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr;
+
+ sim = xpt_path_sim(ccb->ccb_h.path);
+
+ mtx_lock(sim->mtx);
+
+ periph = xpt_path_periph(ccb->ccb_h.path);
+
+ softc = (struct ctlfe_lun_softc *)periph->softc;
+
+ if (io->io_hdr.io_type == CTL_IO_TASK) {
+ /*
+ * Task management commands don't require any further
+ * communication back to the adapter. Requeue the CCB
+ * to the adapter, and free the CTL I/O.
+ */
+ xpt_print(ccb->ccb_h.path, "%s: returning task I/O "
+ "tag %#x seq %#x\n", __func__,
+ ccb->cin1.tag_id, ccb->cin1.seq_id);
+ /*
+ * Send the notify acknowledge down to the SIM, to let it
+ * know we processed the task management command.
+ */
+ ccb->ccb_h.status = CAM_REQ_INPROG;
+ ccb->ccb_h.func_code = XPT_NOTIFY_ACKNOWLEDGE;
+ xpt_action(ccb);
+ ctl_free_io(io);
+ } else {
+ if ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE)
+ io->io_hdr.flags |= CTL_FLAG_STATUS_QUEUED;
+ else
+ io->io_hdr.flags |= CTL_FLAG_DMA_QUEUED;
+
+ TAILQ_INSERT_TAIL(&softc->work_queue, &ccb->ccb_h,
+ periph_links.tqe);
+
+ /*
+ * Reset the timeout for our latest active DMA.
+ */
+ callout_reset(&softc->dma_callout,
+ CTLFE_DMA_TIMEOUT * hz,
+ ctlfe_dma_timeout, softc);
+ /*
+ * Ask for the CAM transport layer to send us a CCB to do
+ * the DMA or send status, unless ctlfe_dma_enabled is set
+ * to 0.
+ */
+ if (ctlfe_dma_enabled != 0)
+ xpt_schedule(periph, /*priority*/ 1);
+ }
+
+ mtx_unlock(sim->mtx);
+}
+
+static void
+ctlfe_dump(void)
+{
+ struct ctlfe_softc *bus_softc;
+
+ STAILQ_FOREACH(bus_softc, &ctlfe_softc_list, links) {
+ struct ctlfe_lun_softc *lun_softc;
+
+ ctlfe_dump_sim(bus_softc->sim);
+
+ STAILQ_FOREACH(lun_softc, &bus_softc->lun_softc_list, links) {
+ ctlfe_dump_queue(lun_softc);
+ }
+ }
+}
diff --git a/sys/cam/scsi/scsi_all.c b/sys/cam/scsi/scsi_all.c
index 5ec287b..93e5658 100644
--- a/sys/cam/scsi/scsi_all.c
+++ b/sys/cam/scsi/scsi_all.c
@@ -364,6 +364,8 @@ static struct op_table_entry scsi_op_codes[] = {
{ 0x40, D | T | L | P | W | R | O | M | S | C, "CHANGE DEFINITION" },
/* 41 O WRITE SAME(10) */
{ 0x41, D, "WRITE SAME(10)" },
+ /* 42 O UNMAP */
+ { 0x42, D, "UNMAP" },
/* 42 O READ SUB-CHANNEL */
{ 0x42, R, "READ SUB-CHANNEL" },
/* 43 O READ TOC/PMA/ATIP */
@@ -5057,14 +5059,7 @@ scsi_inquiry(struct ccb_scsiio *csio, u_int32_t retries,
scsi_cmd->byte2 |= SI_EVPD;
scsi_cmd->page_code = page_code;
}
- /*
- * A 'transfer units' count of 256 is coded as
- * zero for all commands with a single byte count
- * field.
- */
- if (inq_len == 256)
- inq_len = 0;
- scsi_cmd->length = inq_len;
+ scsi_ulto2b(inq_len, scsi_cmd->length);
}
void
@@ -5577,6 +5572,104 @@ scsi_read_write(struct ccb_scsiio *csio, u_int32_t retries,
}
void
+scsi_write_same(struct ccb_scsiio *csio, u_int32_t retries,
+ void (*cbfcnp)(struct cam_periph *, union ccb *),
+ u_int8_t tag_action, u_int8_t byte2,
+ int minimum_cmd_size, u_int64_t lba, u_int32_t block_count,
+ u_int8_t *data_ptr, u_int32_t dxfer_len, u_int8_t sense_len,
+ u_int32_t timeout)
+{
+ u_int8_t cdb_len;
+ if ((minimum_cmd_size < 16) &&
+ ((block_count & 0xffff) == block_count) &&
+ ((lba & 0xffffffff) == lba)) {
+ /*
+ * Need a 10 byte cdb.
+ */
+ struct scsi_write_same_10 *scsi_cmd;
+
+ scsi_cmd = (struct scsi_write_same_10 *)&csio->cdb_io.cdb_bytes;
+ scsi_cmd->opcode = WRITE_SAME_10;
+ scsi_cmd->byte2 = byte2;
+ scsi_ulto4b(lba, scsi_cmd->addr);
+ scsi_cmd->group = 0;
+ scsi_ulto2b(block_count, scsi_cmd->length);
+ scsi_cmd->control = 0;
+ cdb_len = sizeof(*scsi_cmd);
+
+ CAM_DEBUG(csio->ccb_h.path, CAM_DEBUG_SUBTRACE,
+ ("10byte: %x%x%x%x:%x%x: %d\n", scsi_cmd->addr[0],
+ scsi_cmd->addr[1], scsi_cmd->addr[2],
+ scsi_cmd->addr[3], scsi_cmd->length[0],
+ scsi_cmd->length[1], dxfer_len));
+ } else {
+ /*
+ * 16 byte CDB. We'll only get here if the LBA is larger
+ * than 2^32, or if the user asks for a 16 byte command.
+ */
+ struct scsi_write_same_16 *scsi_cmd;
+
+ scsi_cmd = (struct scsi_write_same_16 *)&csio->cdb_io.cdb_bytes;
+ scsi_cmd->opcode = WRITE_SAME_16;
+ scsi_cmd->byte2 = byte2;
+ scsi_u64to8b(lba, scsi_cmd->addr);
+ scsi_ulto4b(block_count, scsi_cmd->length);
+ scsi_cmd->group = 0;
+ scsi_cmd->control = 0;
+ cdb_len = sizeof(*scsi_cmd);
+
+ CAM_DEBUG(csio->ccb_h.path, CAM_DEBUG_SUBTRACE,
+ ("16byte: %x%x%x%x%x%x%x%x:%x%x%x%x: %d\n",
+ scsi_cmd->addr[0], scsi_cmd->addr[1],
+ scsi_cmd->addr[2], scsi_cmd->addr[3],
+ scsi_cmd->addr[4], scsi_cmd->addr[5],
+ scsi_cmd->addr[6], scsi_cmd->addr[7],
+ scsi_cmd->length[0], scsi_cmd->length[1],
+ scsi_cmd->length[2], scsi_cmd->length[3],
+ dxfer_len));
+ }
+ cam_fill_csio(csio,
+ retries,
+ cbfcnp,
+ /*flags*/CAM_DIR_OUT,
+ tag_action,
+ data_ptr,
+ dxfer_len,
+ sense_len,
+ cdb_len,
+ timeout);
+}
+
+void
+scsi_unmap(struct ccb_scsiio *csio, u_int32_t retries,
+ void (*cbfcnp)(struct cam_periph *, union ccb *),
+ u_int8_t tag_action, u_int8_t byte2,
+ u_int8_t *data_ptr, u_int16_t dxfer_len, u_int8_t sense_len,
+ u_int32_t timeout)
+{
+ struct scsi_unmap *scsi_cmd;
+
+ scsi_cmd = (struct scsi_unmap *)&csio->cdb_io.cdb_bytes;
+ scsi_cmd->opcode = UNMAP;
+ scsi_cmd->byte2 = byte2;
+ scsi_ulto4b(0, scsi_cmd->reserved);
+ scsi_cmd->group = 0;
+ scsi_ulto2b(dxfer_len, scsi_cmd->length);
+ scsi_cmd->control = 0;
+
+ cam_fill_csio(csio,
+ retries,
+ cbfcnp,
+ /*flags*/CAM_DIR_OUT,
+ tag_action,
+ data_ptr,
+ dxfer_len,
+ sense_len,
+ sizeof(*scsi_cmd),
+ timeout);
+}
+
+void
scsi_receive_diagnostic_results(struct ccb_scsiio *csio, u_int32_t retries,
void (*cbfcnp)(struct cam_periph *, union ccb*),
uint8_t tag_action, int pcv, uint8_t page_code,
diff --git a/sys/cam/scsi/scsi_all.h b/sys/cam/scsi/scsi_all.h
index 3bcc623..bc56418 100644
--- a/sys/cam/scsi/scsi_all.h
+++ b/sys/cam/scsi/scsi_all.h
@@ -175,8 +175,7 @@ struct scsi_inquiry
#define SI_EVPD 0x01
#define SI_CMDDT 0x02
u_int8_t page_code;
- u_int8_t reserved;
- u_int8_t length;
+ u_int8_t length[2];
u_int8_t control;
};
@@ -532,6 +531,55 @@ struct scsi_caching_page {
uint8_t non_cache_seg_size[3];
};
+/*
+ * XXX KDM move this off to a vendor shim.
+ */
+struct copan_power_subpage {
+ uint8_t page_code;
+#define PWR_PAGE_CODE 0x00
+ uint8_t subpage;
+#define PWR_SUBPAGE_CODE 0x02
+ uint8_t page_length[2];
+ uint8_t page_version;
+#define PWR_VERSION 0x01
+ uint8_t total_luns;
+ uint8_t max_active_luns;
+#define PWR_DFLT_MAX_LUNS 0x07
+ uint8_t reserved[25];
+};
+
+/*
+ * XXX KDM move this off to a vendor shim.
+ */
+struct copan_aps_subpage {
+ uint8_t page_code;
+#define APS_PAGE_CODE 0x00
+ uint8_t subpage;
+#define APS_SUBPAGE_CODE 0x03
+ uint8_t page_length[2];
+ uint8_t page_version;
+#define APS_VERSION 0x00
+ uint8_t lock_active;
+#define APS_LOCK_ACTIVE 0x01
+#define APS_LOCK_INACTIVE 0x00
+ uint8_t reserved[26];
+};
+
+/*
+ * XXX KDM move this off to a vendor shim.
+ */
+struct copan_debugconf_subpage {
+ uint8_t page_code;
+#define DBGCNF_PAGE_CODE 0x00
+ uint8_t subpage;
+#define DBGCNF_SUBPAGE_CODE 0xF0
+ uint8_t page_length[2];
+ uint8_t page_version;
+#define DBGCNF_VERSION 0x00
+ uint8_t ctl_time_io_secs[2];
+};
+
+
struct scsi_info_exceptions_page {
u_int8_t page_code;
#define SIEP_PAGE_SAVABLE 0x80 /* Page is savable */
@@ -771,6 +819,41 @@ struct scsi_rw_16
u_int8_t control;
};
+struct scsi_write_same_10
+{
+ uint8_t opcode;
+ uint8_t byte2;
+#define SWS_LBDATA 0x02
+#define SWS_PBDATA 0x04
+#define SWS_UNMAP 0x08
+#define SWS_ANCHOR 0x10
+ uint8_t addr[4];
+ uint8_t group;
+ uint8_t length[2];
+ uint8_t control;
+};
+
+struct scsi_write_same_16
+{
+ uint8_t opcode;
+ uint8_t byte2;
+ uint8_t addr[8];
+ uint8_t length[4];
+ uint8_t group;
+ uint8_t control;
+};
+
+struct scsi_unmap
+{
+ uint8_t opcode;
+ uint8_t byte2;
+#define SU_ANCHOR 0x01
+ uint8_t reserved[4];
+ uint8_t group;
+ uint8_t length[2];
+ uint8_t control;
+};
+
struct scsi_write_verify_10
{
uint8_t opcode;
@@ -909,6 +992,8 @@ struct ata_pass_16 {
#define WRITE_BUFFER 0x3B
#define READ_BUFFER 0x3C
#define CHANGE_DEFINITION 0x40
+#define WRITE_SAME_10 0x41
+#define UNMAP 0x42
#define LOG_SELECT 0x4C
#define LOG_SENSE 0x4D
#define MODE_SELECT_10 0x55
@@ -922,6 +1007,7 @@ struct ata_pass_16 {
#define WRITE_16 0x8A
#define WRITE_VERIFY_16 0x8E
#define SYNCHRONIZE_CACHE_16 0x91
+#define WRITE_SAME_16 0x93
#define SERVICE_ACTION_IN 0x9E
#define REPORT_LUNS 0xA0
#define ATA_PASS_12 0xA1
@@ -932,6 +1018,7 @@ struct ata_pass_16 {
#define WRITE_12 0xAA
#define WRITE_VERIFY_12 0xAE
#define READ_ELEMENT_STATUS 0xB8
+#define READ_CD 0xBE
/* Maintenance In Service Action Codes */
#define REPORT_IDENTIFYING_INFRMATION 0x05
@@ -1348,6 +1435,17 @@ struct scsi_read_capacity_data_long
{
uint8_t addr[8];
uint8_t length[4];
+#define SRC16_PROT_EN 0x01
+#define SRC16_P_TYPE 0x0e
+ uint8_t prot;
+#define SRC16_LBPPBE 0x0f
+#define SRC16_PI_EXPONENT 0xf0
+#define SRC16_PI_EXPONENT_SHIFT 4
+ uint8_t prot_lbppbe;
+#define SRC16_LALBA 0x3fff
+#define SRC16_LBPRZ 0x4000
+#define SRC16_LBPME 0x8000
+ uint8_t lalba_lbp[2];
};
struct scsi_report_luns
@@ -2252,6 +2350,20 @@ void scsi_read_write(struct ccb_scsiio *csio, u_int32_t retries,
u_int32_t dxfer_len, u_int8_t sense_len,
u_int32_t timeout);
+void scsi_write_same(struct ccb_scsiio *csio, u_int32_t retries,
+ void (*cbfcnp)(struct cam_periph *, union ccb *),
+ u_int8_t tag_action, u_int8_t byte2,
+ int minimum_cmd_size, u_int64_t lba,
+ u_int32_t block_count, u_int8_t *data_ptr,
+ u_int32_t dxfer_len, u_int8_t sense_len,
+ u_int32_t timeout);
+
+void scsi_unmap(struct ccb_scsiio *csio, u_int32_t retries,
+ void (*cbfcnp)(struct cam_periph *, union ccb *),
+ u_int8_t tag_action, u_int8_t byte2,
+ u_int8_t *data_ptr, u_int16_t dxfer_len,
+ u_int8_t sense_len, u_int32_t timeout);
+
void scsi_start_stop(struct ccb_scsiio *csio, u_int32_t retries,
void (*cbfcnp)(struct cam_periph *, union ccb *),
u_int8_t tag_action, int start, int load_eject,
diff --git a/sys/cam/scsi/scsi_cd.c b/sys/cam/scsi/scsi_cd.c
index 77dbcef..5e88a97 100644
--- a/sys/cam/scsi/scsi_cd.c
+++ b/sys/cam/scsi/scsi_cd.c
@@ -1483,6 +1483,14 @@ cdstart(struct cam_periph *periph, union ccb *start_ccb)
/* dxfer_len */ bp->bio_bcount,
/* sense_len */ SSD_FULL_SIZE,
/* timeout */ 30000);
+ /* Use READ CD command for audio tracks. */
+ if (softc->params.blksize == 2352) {
+ start_ccb->csio.cdb_io.cdb_bytes[0] = READ_CD;
+ start_ccb->csio.cdb_io.cdb_bytes[9] = 0xf8;
+ start_ccb->csio.cdb_io.cdb_bytes[10] = 0;
+ start_ccb->csio.cdb_io.cdb_bytes[11] = 0;
+ start_ccb->csio.cdb_len = 12;
+ }
start_ccb->ccb_h.ccb_state = CD_CCB_BUFFER_IO;
@@ -2677,6 +2685,16 @@ cdioctl(struct disk *dp, u_long cmd, void *addr, int flag, struct thread *td)
error = cdsetspeed(periph, CDR_MAX_SPEED, *(u_int32_t *)addr);
cam_periph_unlock(periph);
break;
+ case CDRIOCGETBLOCKSIZE:
+ *(int *)addr = softc->params.blksize;
+ break;
+ case CDRIOCSETBLOCKSIZE:
+ if (*(int *)addr <= 0) {
+ error = EINVAL;
+ break;
+ }
+ softc->disk->d_sectorsize = softc->params.blksize = *(int *)addr;
+ break;
case DVDIOCSENDKEY:
case DVDIOCREPORTKEY: {
struct dvd_authinfo *authinfo;
@@ -2880,6 +2898,13 @@ cdcheckmedia(struct cam_periph *periph)
softc->flags |= CD_FLAG_VALID_TOC;
+ /* If the first track is audio, correct sector size. */
+ if ((softc->toc.entries[0].control & 4) == 0) {
+ softc->disk->d_sectorsize = softc->params.blksize = 2352;
+ softc->disk->d_mediasize =
+ (off_t)softc->params.blksize * softc->params.disksize;
+ }
+
bailout:
/*
diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c
index 2bbbf32..756093c 100644
--- a/sys/cam/scsi/scsi_da.c
+++ b/sys/cam/scsi/scsi_da.c
@@ -82,14 +82,16 @@ typedef enum {
DA_FLAG_WENT_IDLE = 0x040,
DA_FLAG_RETRY_UA = 0x080,
DA_FLAG_OPEN = 0x100,
- DA_FLAG_SCTX_INIT = 0x200
+ DA_FLAG_SCTX_INIT = 0x200,
+ DA_FLAG_CAN_RC16 = 0x400
} da_flags;
typedef enum {
DA_Q_NONE = 0x00,
DA_Q_NO_SYNC_CACHE = 0x01,
DA_Q_NO_6_BYTE = 0x02,
- DA_Q_NO_PREVENT = 0x04
+ DA_Q_NO_PREVENT = 0x04,
+ DA_Q_4K = 0x08
} da_quirks;
typedef enum {
@@ -98,10 +100,24 @@ typedef enum {
DA_CCB_BUFFER_IO = 0x03,
DA_CCB_WAITING = 0x04,
DA_CCB_DUMP = 0x05,
+ DA_CCB_DELETE = 0x06,
DA_CCB_TYPE_MASK = 0x0F,
DA_CCB_RETRY_UA = 0x10
} da_ccb_state;
+typedef enum {
+ DA_DELETE_NONE,
+ DA_DELETE_DISABLE,
+ DA_DELETE_ZERO,
+ DA_DELETE_WS10,
+ DA_DELETE_WS16,
+ DA_DELETE_UNMAP,
+ DA_DELETE_MAX = DA_DELETE_UNMAP
+} da_delete_methods;
+
+static const char *da_delete_method_names[] =
+ { "NONE", "DISABLE", "ZERO", "WS10", "WS16", "UNMAP" };
+
/* Offsets into our private area for storing information */
#define ccb_state ppriv_field0
#define ccb_bp ppriv_ptr1
@@ -112,18 +128,29 @@ struct disk_params {
u_int8_t secs_per_track;
u_int32_t secsize; /* Number of bytes/sector */
u_int64_t sectors; /* total number sectors */
+ u_int stripesize;
+ u_int stripeoffset;
};
+#define UNMAP_MAX_RANGES 512
+
struct da_softc {
struct bio_queue_head bio_queue;
+ struct bio_queue_head delete_queue;
+ struct bio_queue_head delete_run_queue;
SLIST_ENTRY(da_softc) links;
LIST_HEAD(, ccb_hdr) pending_ccbs;
da_state state;
da_flags flags;
da_quirks quirks;
int minimum_cmd_size;
+ int error_inject;
int ordered_tag_count;
int outstanding_cmds;
+ int unmap_max_ranges;
+ int unmap_max_lba;
+ int delete_running;
+ da_delete_methods delete_method;
struct disk_params params;
struct disk *disk;
union ccb saved_ccb;
@@ -132,6 +159,7 @@ struct da_softc {
struct sysctl_oid *sysctl_tree;
struct callout sendordered_c;
uint64_t wwpn;
+ uint8_t unmap_buf[UNMAP_MAX_RANGES * 16 + 8];
};
struct da_quirk_entry {
@@ -564,7 +592,223 @@ static struct da_quirk_entry da_quirk_table[] =
*/
{T_DIRECT, SIP_MEDIA_REMOVABLE, "Sony", "Sony DSC", "*"},
/*quirks*/ DA_Q_NO_SYNC_CACHE | DA_Q_NO_PREVENT
- }
+ },
+ /* ATA/SATA devices over SAS/USB/... */
+ {
+ /* Hitachi Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "Hitachi", "H??????????E3*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* Samsung Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "SAMSUNG HD155UI*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* Samsung Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "SAMSUNG", "HD155UI*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* Samsung Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "SAMSUNG HD204UI*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* Samsung Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "SAMSUNG", "HD204UI*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* Seagate Barracuda Green Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "ST????DL*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* Seagate Barracuda Green Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "ST????DL", "*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* Seagate Barracuda Green Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "ST???DM*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* Seagate Barracuda Green Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "ST???DM*", "*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* Seagate Barracuda Green Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "ST????DM*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* Seagate Barracuda Green Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "ST????DM", "*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* Seagate Momentus Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "ST9500423AS*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* Seagate Momentus Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "ST950042", "3AS*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* Seagate Momentus Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "ST9500424AS*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* Seagate Momentus Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "ST950042", "4AS*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* Seagate Momentus Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "ST9640423AS*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* Seagate Momentus Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "ST964042", "3AS*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* Seagate Momentus Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "ST9640424AS*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* Seagate Momentus Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "ST964042", "4AS*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* Seagate Momentus Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "ST9750420AS*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* Seagate Momentus Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "ST975042", "0AS*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* Seagate Momentus Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "ST9750422AS*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* Seagate Momentus Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "ST975042", "2AS*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* Seagate Momentus Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "ST9750423AS*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* Seagate Momentus Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "ST975042", "3AS*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* Seagate Momentus Thin Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "ST???LT*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* Seagate Momentus Thin Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "ST???LT*", "*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* WDC Caviar Green Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "WDC WD????RS*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* WDC Caviar Green Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "WDC WD??", "??RS*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* WDC Caviar Green Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "WDC WD????RX*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* WDC Caviar Green Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "WDC WD??", "??RX*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* WDC Caviar Green Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "WDC WD??????RS*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* WDC Caviar Green Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "WDC WD??", "????RS*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* WDC Caviar Green Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "WDC WD??????RX*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* WDC Caviar Green Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "WDC WD??", "????RX*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* WDC Scorpio Black Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "WDC WD???PKT*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* WDC Scorpio Black Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "WDC WD??", "?PKT*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* WDC Scorpio Black Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "WDC WD?????PKT*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* WDC Scorpio Black Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "WDC WD??", "???PKT*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* WDC Scorpio Blue Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "WDC WD???PVT*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* WDC Scorpio Blue Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "WDC WD??", "?PVT*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* WDC Scorpio Blue Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "WDC WD?????PVT*", "*" },
+ /*quirks*/DA_Q_4K
+ },
+ {
+ /* WDC Scorpio Blue Advanced Format (4k) drives */
+ { T_DIRECT, SIP_MEDIA_FIXED, "WDC WD??", "???PVT*", "*" },
+ /*quirks*/DA_Q_4K
+ },
};
static disk_strategy_t dastrategy;
@@ -574,6 +818,7 @@ static void daasync(void *callback_arg, u_int32_t code,
struct cam_path *path, void *arg);
static void dasysctlinit(void *context, int pending);
static int dacmdsizesysctl(SYSCTL_HANDLER_ARGS);
+static int dadeletemethodsysctl(SYSCTL_HANDLER_ARGS);
static periph_ctor_t daregister;
static periph_dtor_t dacleanup;
static periph_start_t dastart;
@@ -585,7 +830,7 @@ static int daerror(union ccb *ccb, u_int32_t cam_flags,
static void daprevent(struct cam_periph *periph, int action);
static int dagetcapacity(struct cam_periph *periph);
static void dasetgeom(struct cam_periph *periph, uint32_t block_len,
- uint64_t maxsector);
+ uint64_t maxsector, u_int lbppbe, u_int lalba);
static timeout_t dasendorderedtag;
static void dashutdown(void *arg, int howto);
@@ -658,7 +903,7 @@ daopen(struct disk *dp)
}
if (cam_periph_acquire(periph) != CAM_REQ_CMP) {
- return(ENXIO);
+ return (ENXIO);
}
cam_periph_lock(periph);
@@ -687,11 +932,17 @@ daopen(struct disk *dp)
softc->disk->d_sectorsize = softc->params.secsize;
softc->disk->d_mediasize = softc->params.secsize * (off_t)softc->params.sectors;
+ softc->disk->d_stripesize = softc->params.stripesize;
+ softc->disk->d_stripeoffset = softc->params.stripeoffset;
/* XXX: these are not actually "firmware" values, so they may be wrong */
softc->disk->d_fwsectors = softc->params.secs_per_track;
softc->disk->d_fwheads = softc->params.heads;
softc->disk->d_devstat->block_size = softc->params.secsize;
softc->disk->d_devstat->flags &= ~DEVSTAT_BS_UNAVAILABLE;
+ if (softc->delete_method > DA_DELETE_DISABLE)
+ softc->disk->d_flags |= DISKFLAG_CANDELETE;
+ else
+ softc->disk->d_flags &= ~DISKFLAG_CANDELETE;
if ((softc->flags & DA_FLAG_PACK_REMOVABLE) != 0 &&
(softc->quirks & DA_Q_NO_PREVENT) == 0)
@@ -717,13 +968,13 @@ daclose(struct disk *dp)
periph = (struct cam_periph *)dp->d_drv1;
if (periph == NULL)
- return (ENXIO);
+ return (0);
cam_periph_lock(periph);
if ((error = cam_periph_hold(periph, PRIBIO)) != 0) {
cam_periph_unlock(periph);
cam_periph_release(periph);
- return (error);
+ return (0);
}
softc = (struct da_softc *)periph->softc;
@@ -767,13 +1018,6 @@ daclose(struct disk *dp)
}
}
- if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
- cam_release_devq(ccb->ccb_h.path,
- /*relsim_flags*/0,
- /*reduction*/0,
- /*timeout*/0,
- /*getcount_only*/0);
-
xpt_release_ccb(ccb);
}
@@ -796,6 +1040,26 @@ daclose(struct disk *dp)
return (0);
}
+static void
+daschedule(struct cam_periph *periph)
+{
+ struct da_softc *softc = (struct da_softc *)periph->softc;
+ uint32_t prio;
+
+ /* Check if cam_periph_getccb() was called. */
+ prio = periph->immediate_priority;
+
+ /* Check if we have more work to do. */
+ if (bioq_first(&softc->bio_queue) ||
+ (!softc->delete_running && bioq_first(&softc->delete_queue))) {
+ prio = CAM_PRIORITY_NORMAL;
+ }
+
+ /* Schedule CCB if any of above is true. */
+ if (prio != CAM_PRIORITY_NONE)
+ xpt_schedule(periph, prio);
+}
+
/*
* Actually translate the requested transfer into one the physical driver
* can understand. The transfer is described by a buf and will include
@@ -828,12 +1092,18 @@ dastrategy(struct bio *bp)
/*
* Place it in the queue of disk activities for this disk
*/
- bioq_disksort(&softc->bio_queue, bp);
+ if (bp->bio_cmd == BIO_DELETE) {
+ if (bp->bio_bcount == 0)
+ biodone(bp);
+ else
+ bioq_disksort(&softc->delete_queue, bp);
+ } else
+ bioq_disksort(&softc->bio_queue, bp);
/*
* Schedule ourselves for performing the work.
*/
- xpt_schedule(periph, CAM_PRIORITY_NORMAL);
+ daschedule(periph);
cam_periph_unlock(periph);
return;
@@ -878,6 +1148,7 @@ dadump(void *arg, void *virtual, vm_offset_t physical, off_t offset, size_t leng
/*sense_len*/SSD_FULL_SIZE,
DA_DEFAULT_TIMEOUT * 1000);
xpt_polled_action((union ccb *)&csio);
+ cam_periph_unlock(periph);
if ((csio.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) {
printf("Aborting dump due to I/O error.\n");
@@ -889,7 +1160,6 @@ dadump(void *arg, void *virtual, vm_offset_t physical, off_t offset, size_t leng
csio.ccb_h.status, csio.scsi_status);
return(EIO);
}
- cam_periph_unlock(periph);
return(0);
}
@@ -996,10 +1266,11 @@ daoninvalidate(struct cam_periph *periph)
* with XPT_ABORT_CCB.
*/
bioq_flush(&softc->bio_queue, NULL, ENXIO);
+ bioq_flush(&softc->delete_queue, NULL, ENXIO);
disk_gone(softc->disk);
- xpt_print(periph->path, "lost device - %d outstanding\n",
- softc->outstanding_cmds);
+ xpt_print(periph->path, "lost device - %d outstanding, %d refs\n",
+ softc->outstanding_cmds, periph->refcount);
}
static void
@@ -1141,10 +1412,24 @@ dasysctlinit(void *context, int pending)
* the fly.
*/
SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree),
+ OID_AUTO, "delete_method", CTLTYPE_STRING | CTLFLAG_RW,
+ &softc->delete_method, 0, dadeletemethodsysctl, "A",
+ "BIO_DELETE execution method");
+ SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree),
OID_AUTO, "minimum_cmd_size", CTLTYPE_INT | CTLFLAG_RW,
&softc->minimum_cmd_size, 0, dacmdsizesysctl, "I",
"Minimum CDB size");
+ SYSCTL_ADD_INT(&softc->sysctl_ctx,
+ SYSCTL_CHILDREN(softc->sysctl_tree),
+ OID_AUTO,
+ "error_inject",
+ CTLFLAG_RW,
+ &softc->error_inject,
+ 0,
+ "error_inject leaf");
+
+
/*
* Add some addressing info.
*/
@@ -1204,6 +1489,32 @@ dacmdsizesysctl(SYSCTL_HANDLER_ARGS)
return (0);
}
+static int
+dadeletemethodsysctl(SYSCTL_HANDLER_ARGS)
+{
+ char buf[16];
+ int error;
+ const char *p;
+ int i, value;
+
+ value = *(int *)arg1;
+ if (value < 0 || value > DA_DELETE_MAX)
+ p = "UNKNOWN";
+ else
+ p = da_delete_method_names[value];
+ strncpy(buf, p, sizeof(buf));
+ error = sysctl_handle_string(oidp, buf, sizeof(buf), req);
+ if (error != 0 || req->newptr == NULL)
+ return (error);
+ for (i = 0; i <= DA_DELETE_MAX; i++) {
+ if (strcmp(buf, da_delete_method_names[i]) != 0)
+ continue;
+ *(int *)arg1 = i;
+ return (0);
+ }
+ return (EINVAL);
+}
+
static cam_status
daregister(struct cam_periph *periph, void *arg)
{
@@ -1236,10 +1547,14 @@ daregister(struct cam_periph *periph, void *arg)
LIST_INIT(&softc->pending_ccbs);
softc->state = DA_STATE_PROBE;
bioq_init(&softc->bio_queue);
+ bioq_init(&softc->delete_queue);
+ bioq_init(&softc->delete_run_queue);
if (SID_IS_REMOVABLE(&cgd->inq_data))
softc->flags |= DA_FLAG_PACK_REMOVABLE;
if ((cgd->inq_data.flags & SID_CmdQue) != 0)
softc->flags |= DA_FLAG_TAGGED_QUEUING;
+ softc->unmap_max_ranges = UNMAP_MAX_RANGES;
+ softc->unmap_max_lba = 1024*1024*2;
periph->softc = softc;
@@ -1312,6 +1627,14 @@ daregister(struct cam_periph *periph, void *arg)
else if (softc->minimum_cmd_size > 12)
softc->minimum_cmd_size = 16;
+ /* Predict whether device may support READ CAPACITY(16). */
+ if (SID_ANSI_REV(&cgd->inq_data) >= SCSI_REV_SPC3 ||
+ (SID_ANSI_REV(&cgd->inq_data) >= SCSI_REV_SPC &&
+ (cgd->inq_data.spc3_flags & SPC3_SID_PROTECT))) {
+ softc->flags |= DA_FLAG_CAN_RC16;
+ softc->state = DA_STATE_PROBE2;
+ }
+
/*
* Register this media as a disk.
*/
@@ -1386,13 +1709,10 @@ dastart(struct cam_periph *periph, union ccb *start_ccb)
switch (softc->state) {
case DA_STATE_NORMAL:
{
- /* Pull a buffer from the queue and get going on it */
- struct bio *bp;
+ struct bio *bp, *bp1;
+ uint8_t tag_code;
- /*
- * See if there is a buf with work for us to do..
- */
- bp = bioq_first(&softc->bio_queue);
+ /* Execute immediate CCB if waiting. */
if (periph->immediate_priority <= periph->pinfo.priority) {
CAM_DEBUG_PRINT(CAM_DEBUG_SUBTRACE,
("queuing for immediate ccb\n"));
@@ -1401,84 +1721,186 @@ dastart(struct cam_periph *periph, union ccb *start_ccb)
periph_links.sle);
periph->immediate_priority = CAM_PRIORITY_NONE;
wakeup(&periph->ccb_list);
- } else if (bp == NULL) {
- xpt_release_ccb(start_ccb);
- } else {
- u_int8_t tag_code;
+ /* May have more work to do, so ensure we stay scheduled */
+ daschedule(periph);
+ break;
+ }
- bioq_remove(&softc->bio_queue, bp);
+ /* Run BIO_DELETE if not running yet. */
+ if (!softc->delete_running &&
+ (bp = bioq_first(&softc->delete_queue)) != NULL) {
+ uint64_t lba;
+ u_int count;
+
+ if (softc->delete_method == DA_DELETE_UNMAP) {
+ uint8_t *buf = softc->unmap_buf;
+ uint64_t lastlba = (uint64_t)-1;
+ uint32_t lastcount = 0;
+ int blocks = 0, off, ranges = 0;
+
+ softc->delete_running = 1;
+ bzero(softc->unmap_buf, sizeof(softc->unmap_buf));
+ bp1 = bp;
+ do {
+ bioq_remove(&softc->delete_queue, bp1);
+ if (bp1 != bp)
+ bioq_insert_tail(&softc->delete_run_queue, bp1);
+ lba = bp1->bio_pblkno;
+ count = bp1->bio_bcount / softc->params.secsize;
+
+ /* Try to extend the previous range. */
+ if (lba == lastlba) {
+ lastcount += count;
+ off = (ranges - 1) * 16 + 8;
+ scsi_ulto4b(lastcount, &buf[off + 8]);
+ } else if (count > 0) {
+ off = ranges * 16 + 8;
+ scsi_u64to8b(lba, &buf[off + 0]);
+ scsi_ulto4b(count, &buf[off + 8]);
+ lastcount = count;
+ ranges++;
+ }
+ blocks += count;
+ lastlba = lba + count;
+ bp1 = bioq_first(&softc->delete_queue);
+ if (bp1 == NULL ||
+ ranges >= softc->unmap_max_ranges ||
+ blocks + bp1->bio_bcount /
+ softc->params.secsize > softc->unmap_max_lba)
+ break;
+ } while (1);
+ scsi_ulto2b(count * 16 + 6, &buf[0]);
+ scsi_ulto2b(count * 16, &buf[2]);
+
+ scsi_unmap(&start_ccb->csio,
+ /*retries*/da_retry_count,
+ /*cbfcnp*/dadone,
+ /*tag_action*/MSG_SIMPLE_Q_TAG,
+ /*byte2*/0,
+ /*data_ptr*/ buf,
+ /*dxfer_len*/ count * 16 + 8,
+ /*sense_len*/SSD_FULL_SIZE,
+ da_default_timeout * 1000);
+ start_ccb->ccb_h.ccb_state = DA_CCB_DELETE;
+ goto out;
+ } else if (softc->delete_method == DA_DELETE_ZERO ||
+ softc->delete_method == DA_DELETE_WS10 ||
+ softc->delete_method == DA_DELETE_WS16) {
+ softc->delete_running = 1;
+ lba = bp->bio_pblkno;
+ count = 0;
+ bp1 = bp;
+ do {
+ bioq_remove(&softc->delete_queue, bp1);
+ if (bp1 != bp)
+ bioq_insert_tail(&softc->delete_run_queue, bp1);
+ count += bp1->bio_bcount / softc->params.secsize;
+ bp1 = bioq_first(&softc->delete_queue);
+ if (bp1 == NULL ||
+ lba + count != bp1->bio_pblkno ||
+ count + bp1->bio_bcount /
+ softc->params.secsize > 0xffff)
+ break;
+ } while (1);
+
+ scsi_write_same(&start_ccb->csio,
+ /*retries*/da_retry_count,
+ /*cbfcnp*/dadone,
+ /*tag_action*/MSG_SIMPLE_Q_TAG,
+ /*byte2*/softc->delete_method ==
+ DA_DELETE_ZERO ? 0 : SWS_UNMAP,
+ softc->delete_method ==
+ DA_DELETE_WS16 ? 16 : 10,
+ /*lba*/lba,
+ /*block_count*/count,
+ /*data_ptr*/ __DECONST(void *,
+ zero_region),
+ /*dxfer_len*/ softc->params.secsize,
+ /*sense_len*/SSD_FULL_SIZE,
+ da_default_timeout * 1000);
+ start_ccb->ccb_h.ccb_state = DA_CCB_DELETE;
+ goto out;
+ } else {
+ bioq_flush(&softc->delete_queue, NULL, 0);
+ /* FALLTHROUGH */
+ }
+ }
- if ((bp->bio_flags & BIO_ORDERED) != 0
- || (softc->flags & DA_FLAG_NEED_OTAG) != 0) {
- softc->flags &= ~DA_FLAG_NEED_OTAG;
- softc->ordered_tag_count++;
- tag_code = MSG_ORDERED_Q_TAG;
- } else {
- tag_code = MSG_SIMPLE_Q_TAG;
- }
- switch (bp->bio_cmd) {
- case BIO_READ:
- case BIO_WRITE:
- scsi_read_write(&start_ccb->csio,
- /*retries*/da_retry_count,
- /*cbfcnp*/dadone,
- /*tag_action*/tag_code,
- /*read_op*/bp->bio_cmd
- == BIO_READ,
- /*byte2*/0,
- softc->minimum_cmd_size,
- /*lba*/bp->bio_pblkno,
- /*block_count*/bp->bio_bcount /
- softc->params.secsize,
- /*data_ptr*/ bp->bio_data,
- /*dxfer_len*/ bp->bio_bcount,
- /*sense_len*/SSD_FULL_SIZE,
- da_default_timeout * 1000);
- break;
- case BIO_FLUSH:
- /*
- * BIO_FLUSH doesn't currently communicate
- * range data, so we synchronize the cache
- * over the whole disk. We also force
- * ordered tag semantics the flush applies
- * to all previously queued I/O.
- */
- scsi_synchronize_cache(&start_ccb->csio,
- /*retries*/1,
- /*cbfcnp*/dadone,
- MSG_ORDERED_Q_TAG,
- /*begin_lba*/0,
- /*lb_count*/0,
- SSD_FULL_SIZE,
- da_default_timeout*1000);
- break;
- }
- start_ccb->ccb_h.ccb_state = DA_CCB_BUFFER_IO;
+ /* Run regular command. */
+ bp = bioq_takefirst(&softc->bio_queue);
+ if (bp == NULL) {
+ xpt_release_ccb(start_ccb);
+ break;
+ }
+ if ((bp->bio_flags & BIO_ORDERED) != 0 ||
+ (softc->flags & DA_FLAG_NEED_OTAG) != 0) {
+ softc->flags &= ~DA_FLAG_NEED_OTAG;
+ softc->ordered_tag_count++;
+ tag_code = MSG_ORDERED_Q_TAG;
+ } else {
+ tag_code = MSG_SIMPLE_Q_TAG;
+ }
+
+ switch (bp->bio_cmd) {
+ case BIO_READ:
+ case BIO_WRITE:
+ scsi_read_write(&start_ccb->csio,
+ /*retries*/da_retry_count,
+ /*cbfcnp*/dadone,
+ /*tag_action*/tag_code,
+ /*read_op*/bp->bio_cmd
+ == BIO_READ,
+ /*byte2*/0,
+ softc->minimum_cmd_size,
+ /*lba*/bp->bio_pblkno,
+ /*block_count*/bp->bio_bcount /
+ softc->params.secsize,
+ /*data_ptr*/ bp->bio_data,
+ /*dxfer_len*/ bp->bio_bcount,
+ /*sense_len*/SSD_FULL_SIZE,
+ da_default_timeout * 1000);
+ break;
+ case BIO_FLUSH:
/*
- * Block out any asyncronous callbacks
- * while we touch the pending ccb list.
+ * BIO_FLUSH doesn't currently communicate
+ * range data, so we synchronize the cache
+ * over the whole disk. We also force
+ * ordered tag semantics the flush applies
+ * to all previously queued I/O.
*/
- LIST_INSERT_HEAD(&softc->pending_ccbs,
- &start_ccb->ccb_h, periph_links.le);
- softc->outstanding_cmds++;
-
- /* We expect a unit attention from this device */
- if ((softc->flags & DA_FLAG_RETRY_UA) != 0) {
- start_ccb->ccb_h.ccb_state |= DA_CCB_RETRY_UA;
- softc->flags &= ~DA_FLAG_RETRY_UA;
- }
-
- start_ccb->ccb_h.ccb_bp = bp;
- bp = bioq_first(&softc->bio_queue);
-
- xpt_action(start_ccb);
+ scsi_synchronize_cache(&start_ccb->csio,
+ /*retries*/1,
+ /*cbfcnp*/dadone,
+ MSG_ORDERED_Q_TAG,
+ /*begin_lba*/0,
+ /*lb_count*/0,
+ SSD_FULL_SIZE,
+ da_default_timeout*1000);
+ break;
}
-
- if (bp != NULL) {
- /* Have more work to do, so ensure we stay scheduled */
- xpt_schedule(periph, CAM_PRIORITY_NORMAL);
+ start_ccb->ccb_h.ccb_state = DA_CCB_BUFFER_IO;
+
+out:
+ /*
+ * Block out any asyncronous callbacks
+ * while we touch the pending ccb list.
+ */
+ LIST_INSERT_HEAD(&softc->pending_ccbs,
+ &start_ccb->ccb_h, periph_links.le);
+ softc->outstanding_cmds++;
+
+ /* We expect a unit attention from this device */
+ if ((softc->flags & DA_FLAG_RETRY_UA) != 0) {
+ start_ccb->ccb_h.ccb_state |= DA_CCB_RETRY_UA;
+ softc->flags &= ~DA_FLAG_RETRY_UA;
}
+
+ start_ccb->ccb_h.ccb_bp = bp;
+ xpt_action(start_ccb);
+
+ /* May have more work to do, so ensure we stay scheduled */
+ daschedule(periph);
break;
}
case DA_STATE_PROBE:
@@ -1544,9 +1966,42 @@ cmd6workaround(union ccb *ccb)
struct scsi_rw_10 *cmd10;
struct da_softc *softc;
u_int8_t *cdb;
+ struct bio *bp;
int frozen;
cdb = ccb->csio.cdb_io.cdb_bytes;
+ softc = (struct da_softc *)xpt_path_periph(ccb->ccb_h.path)->softc;
+
+ if (ccb->ccb_h.ccb_state == DA_CCB_DELETE) {
+ if (softc->delete_method == DA_DELETE_UNMAP) {
+ xpt_print(ccb->ccb_h.path, "UNMAP is not supported, "
+ "switching to WRITE SAME(16) with UNMAP.\n");
+ softc->delete_method = DA_DELETE_WS16;
+ } else if (softc->delete_method == DA_DELETE_WS16) {
+ xpt_print(ccb->ccb_h.path,
+ "WRITE SAME(16) with UNMAP is not supported, "
+ "disabling BIO_DELETE.\n");
+ softc->delete_method = DA_DELETE_DISABLE;
+ } else if (softc->delete_method == DA_DELETE_WS10) {
+ xpt_print(ccb->ccb_h.path,
+ "WRITE SAME(10) with UNMAP is not supported, "
+ "disabling BIO_DELETE.\n");
+ softc->delete_method = DA_DELETE_DISABLE;
+ } else if (softc->delete_method == DA_DELETE_ZERO) {
+ xpt_print(ccb->ccb_h.path,
+ "WRITE SAME(10) is not supported, "
+ "disabling BIO_DELETE.\n");
+ softc->delete_method = DA_DELETE_DISABLE;
+ } else
+ softc->delete_method = DA_DELETE_DISABLE;
+ while ((bp = bioq_takefirst(&softc->delete_run_queue))
+ != NULL)
+ bioq_disksort(&softc->delete_queue, bp);
+ bioq_insert_tail(&softc->delete_queue,
+ (struct bio *)ccb->ccb_h.ccb_bp);
+ ccb->ccb_h.ccb_bp = NULL;
+ return (0);
+ }
/* Translation only possible if CDB is an array and cmd is R/W6 */
if ((ccb->ccb_h.flags & CAM_CDB_POINTER) != 0 ||
@@ -1555,8 +2010,7 @@ cmd6workaround(union ccb *ccb)
xpt_print(ccb->ccb_h.path, "READ(6)/WRITE(6) not supported, "
"increasing minimum_cmd_size to 10.\n");
- softc = (struct da_softc *)xpt_path_periph(ccb->ccb_h.path)->softc;
- softc->minimum_cmd_size = 10;
+ softc->minimum_cmd_size = 10;
bcopy(cdb, &cmd6, sizeof(struct scsi_rw_6));
cmd10 = (struct scsi_rw_10 *)cdb;
@@ -1594,8 +2048,9 @@ dadone(struct cam_periph *periph, union ccb *done_ccb)
csio = &done_ccb->csio;
switch (csio->ccb_h.ccb_state & DA_CCB_TYPE_MASK) {
case DA_CCB_BUFFER_IO:
+ case DA_CCB_DELETE:
{
- struct bio *bp;
+ struct bio *bp, *bp1;
bp = (struct bio *)done_ccb->ccb_h.ccb_bp;
if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) {
@@ -1615,6 +2070,7 @@ dadone(struct cam_periph *periph, union ccb *done_ccb)
*/
return;
}
+ bp = (struct bio *)done_ccb->ccb_h.ccb_bp;
if (error != 0) {
int queued_error;
@@ -1642,10 +2098,12 @@ dadone(struct cam_periph *periph, union ccb *done_ccb)
}
bioq_flush(&softc->bio_queue, NULL,
queued_error);
- bp->bio_error = error;
- bp->bio_resid = bp->bio_bcount;
- bp->bio_flags |= BIO_ERROR;
- } else {
+ if (bp != NULL) {
+ bp->bio_error = error;
+ bp->bio_resid = bp->bio_bcount;
+ bp->bio_flags |= BIO_ERROR;
+ }
+ } else if (bp != NULL) {
bp->bio_resid = csio->resid;
bp->bio_error = 0;
if (bp->bio_resid != 0)
@@ -1657,12 +2115,19 @@ dadone(struct cam_periph *periph, union ccb *done_ccb)
/*reduction*/0,
/*timeout*/0,
/*getcount_only*/0);
- } else {
+ } else if (bp != NULL) {
if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
panic("REQ_CMP with QFRZN");
bp->bio_resid = csio->resid;
if (csio->resid > 0)
bp->bio_flags |= BIO_ERROR;
+ if (softc->error_inject != 0) {
+ bp->bio_error = softc->error_inject;
+ bp->bio_resid = bp->bio_bcount;
+ bp->bio_flags |= BIO_ERROR;
+ softc->error_inject = 0;
+ }
+
}
/*
@@ -1679,7 +2144,22 @@ dadone(struct cam_periph *periph, union ccb *done_ccb)
softc->outstanding_cmds);
}
- biodone(bp);
+ if ((csio->ccb_h.ccb_state & DA_CCB_TYPE_MASK) ==
+ DA_CCB_DELETE) {
+ while ((bp1 = bioq_takefirst(&softc->delete_run_queue))
+ != NULL) {
+ bp1->bio_resid = bp->bio_resid;
+ bp1->bio_error = bp->bio_error;
+ if (bp->bio_flags & BIO_ERROR)
+ bp1->bio_flags |= BIO_ERROR;
+ biodone(bp1);
+ }
+ softc->delete_running = 0;
+ if (bp != NULL)
+ biodone(bp);
+ daschedule(periph);
+ } else if (bp != NULL)
+ biodone(bp);
break;
}
case DA_CCB_PROBE:
@@ -1701,10 +2181,14 @@ dadone(struct cam_periph *periph, union ccb *done_ccb)
struct disk_params *dp;
uint32_t block_size;
uint64_t maxsector;
+ u_int lbppbe; /* LB per physical block exponent. */
+ u_int lalba; /* Lowest aligned LBA. */
if (softc->state == DA_STATE_PROBE) {
block_size = scsi_4btoul(rdcap->length);
maxsector = scsi_4btoul(rdcap->addr);
+ lbppbe = 0;
+ lalba = 0;
/*
* According to SBC-2, if the standard 10
@@ -1724,6 +2208,8 @@ dadone(struct cam_periph *periph, union ccb *done_ccb)
} else {
block_size = scsi_4btoul(rcaplong->length);
maxsector = scsi_8btou64(rcaplong->addr);
+ lbppbe = rcaplong->prot_lbppbe & SRC16_LBPPBE;
+ lalba = scsi_2btoul(rcaplong->lalba_lbp);
}
/*
@@ -1741,7 +2227,11 @@ dadone(struct cam_periph *periph, union ccb *done_ccb)
announce_buf[0] = '\0';
cam_periph_invalidate(periph);
} else {
- dasetgeom(periph, block_size, maxsector);
+ dasetgeom(periph, block_size, maxsector,
+ lbppbe, lalba & SRC16_LALBA);
+ if ((lalba & SRC16_LBPME) &&
+ softc->delete_method == DA_DELETE_NONE)
+ softc->delete_method = DA_DELETE_UNMAP;
dp = &softc->params;
snprintf(announce_buf, sizeof(announce_buf),
"%juMB (%ju %u byte sectors: %dH %dS/T "
@@ -1808,6 +2298,24 @@ dadone(struct cam_periph *periph, union ccb *done_ccb)
&ascq, /*show_errors*/ 1);
}
/*
+ * If we tried READ CAPACITY(16) and failed,
+ * fallback to READ CAPACITY(10).
+ */
+ if ((softc->state == DA_STATE_PROBE2) &&
+ (softc->flags & DA_FLAG_CAN_RC16) &&
+ (((csio->ccb_h.status & CAM_STATUS_MASK) ==
+ CAM_REQ_INVALID) ||
+ ((have_sense) &&
+ (error_code == SSD_CURRENT_ERROR) &&
+ (sense_key == SSD_KEY_ILLEGAL_REQUEST)))) {
+ softc->flags &= ~DA_FLAG_CAN_RC16;
+ softc->state = DA_STATE_PROBE;
+ free(rdcap, M_SCSIDA);
+ xpt_release_ccb(done_ccb);
+ xpt_schedule(periph, priority);
+ return;
+ } else
+ /*
* Attach to anything that claims to be a
* direct access or optical disk device,
* as long as it doesn't return a "Logical
@@ -1850,13 +2358,20 @@ dadone(struct cam_periph *periph, union ccb *done_ccb)
}
free(csio->data_ptr, M_SCSIDA);
if (announce_buf[0] != '\0') {
- xpt_announce_periph(periph, announce_buf);
/*
* Create our sysctl variables, now that we know
* we have successfully attached.
*/
- (void) cam_periph_acquire(periph); /* increase the refcount */
- taskqueue_enqueue(taskqueue_thread,&softc->sysctl_task);
+ /* increase the refcount */
+ if (cam_periph_acquire(periph) == CAM_REQ_CMP) {
+ taskqueue_enqueue(taskqueue_thread,
+ &softc->sysctl_task);
+ xpt_announce_periph(periph, announce_buf);
+ } else {
+ xpt_print(periph->path, "fatal error, "
+ "could not acquire reference count\n");
+ }
+
}
softc->state = DA_STATE_NORMAL;
/*
@@ -1977,13 +2492,18 @@ dagetcapacity(struct cam_periph *periph)
struct scsi_read_capacity_data_long *rcaplong;
uint32_t block_len;
uint64_t maxsector;
- int error;
+ int error, rc16failed;
u_int32_t sense_flags;
+ u_int lbppbe; /* Logical blocks per physical block exponent. */
+ u_int lalba; /* Lowest aligned LBA. */
softc = (struct da_softc *)periph->softc;
block_len = 0;
maxsector = 0;
+ lbppbe = 0;
+ lalba = 0;
error = 0;
+ rc16failed = 0;
sense_flags = SF_RETRY_UA;
if (softc->flags & DA_FLAG_PACK_REMOVABLE)
sense_flags |= SF_NO_PRINT;
@@ -1991,11 +2511,55 @@ dagetcapacity(struct cam_periph *periph)
/* Do a read capacity */
rcap = (struct scsi_read_capacity_data *)malloc(sizeof(*rcaplong),
M_SCSIDA,
- M_NOWAIT);
+ M_NOWAIT | M_ZERO);
if (rcap == NULL)
return (ENOMEM);
-
+ rcaplong = (struct scsi_read_capacity_data_long *)rcap;
+
ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL);
+
+ /* Try READ CAPACITY(16) first if we think it should work. */
+ if (softc->flags & DA_FLAG_CAN_RC16) {
+ scsi_read_capacity_16(&ccb->csio,
+ /*retries*/ 4,
+ /*cbfcnp*/ dadone,
+ /*tag_action*/ MSG_SIMPLE_Q_TAG,
+ /*lba*/ 0,
+ /*reladr*/ 0,
+ /*pmi*/ 0,
+ rcaplong,
+ /*sense_len*/ SSD_FULL_SIZE,
+ /*timeout*/ 60000);
+ ccb->ccb_h.ccb_bp = NULL;
+
+ error = cam_periph_runccb(ccb, daerror,
+ /*cam_flags*/CAM_RETRY_SELTO,
+ sense_flags,
+ softc->disk->d_devstat);
+ if (error == 0)
+ goto rc16ok;
+
+ /* If we got ILLEGAL REQUEST, do not prefer RC16 any more. */
+ if ((ccb->ccb_h.status & CAM_STATUS_MASK) ==
+ CAM_REQ_INVALID) {
+ softc->flags &= ~DA_FLAG_CAN_RC16;
+ } else if (((ccb->ccb_h.status & CAM_STATUS_MASK) ==
+ CAM_SCSI_STATUS_ERROR) &&
+ (ccb->csio.scsi_status == SCSI_STATUS_CHECK_COND) &&
+ (ccb->ccb_h.status & CAM_AUTOSNS_VALID) &&
+ ((ccb->ccb_h.flags & CAM_SENSE_PHYS) == 0) &&
+ ((ccb->ccb_h.flags & CAM_SENSE_PTR) == 0)) {
+ int sense_key, error_code, asc, ascq;
+
+ scsi_extract_sense(&ccb->csio.sense_data,
+ &error_code, &sense_key, &asc, &ascq);
+ if (sense_key == SSD_KEY_ILLEGAL_REQUEST)
+ softc->flags &= ~DA_FLAG_CAN_RC16;
+ }
+ rc16failed = 1;
+ }
+
+ /* Do READ CAPACITY(10). */
scsi_read_capacity(&ccb->csio,
/*retries*/4,
/*cbfncp*/dadone,
@@ -2009,25 +2573,16 @@ dagetcapacity(struct cam_periph *periph)
/*cam_flags*/CAM_RETRY_SELTO,
sense_flags,
softc->disk->d_devstat);
-
- if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
- cam_release_devq(ccb->ccb_h.path,
- /*relsim_flags*/0,
- /*reduction*/0,
- /*timeout*/0,
- /*getcount_only*/0);
-
if (error == 0) {
block_len = scsi_4btoul(rcap->length);
maxsector = scsi_4btoul(rcap->addr);
- if (maxsector != 0xffffffff)
+ if (maxsector != 0xffffffff || rc16failed)
goto done;
} else
goto done;
- rcaplong = (struct scsi_read_capacity_data_long *)rcap;
-
+ /* If READ CAPACITY(10) returned overflow, use READ CAPACITY(16) */
scsi_read_capacity_16(&ccb->csio,
/*retries*/ 4,
/*cbfcnp*/ dadone,
@@ -2044,17 +2599,12 @@ dagetcapacity(struct cam_periph *periph)
/*cam_flags*/CAM_RETRY_SELTO,
sense_flags,
softc->disk->d_devstat);
-
- if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
- cam_release_devq(ccb->ccb_h.path,
- /*relsim_flags*/0,
- /*reduction*/0,
- /*timeout*/0,
- /*getcount_only*/0);
-
if (error == 0) {
+rc16ok:
block_len = scsi_4btoul(rcaplong->length);
maxsector = scsi_8btou64(rcaplong->addr);
+ lbppbe = rcaplong->prot_lbppbe & SRC16_LBPPBE;
+ lalba = scsi_2btoul(rcaplong->lalba_lbp);
}
done:
@@ -2065,8 +2615,13 @@ done:
"unsupportable block size %ju\n",
(uintmax_t) block_len);
error = EINVAL;
- } else
- dasetgeom(periph, block_len, maxsector);
+ } else {
+ dasetgeom(periph, block_len, maxsector,
+ lbppbe, lalba & SRC16_LALBA);
+ if ((lalba & SRC16_LBPME) &&
+ softc->delete_method == DA_DELETE_NONE)
+ softc->delete_method = DA_DELETE_UNMAP;
+ }
}
xpt_release_ccb(ccb);
@@ -2077,7 +2632,8 @@ done:
}
static void
-dasetgeom(struct cam_periph *periph, uint32_t block_len, uint64_t maxsector)
+dasetgeom(struct cam_periph *periph, uint32_t block_len, uint64_t maxsector,
+ u_int lbppbe, u_int lalba)
{
struct ccb_calc_geometry ccg;
struct da_softc *softc;
@@ -2088,6 +2644,17 @@ dasetgeom(struct cam_periph *periph, uint32_t block_len, uint64_t maxsector)
dp = &softc->params;
dp->secsize = block_len;
dp->sectors = maxsector + 1;
+ if (lbppbe > 0) {
+ dp->stripesize = block_len << lbppbe;
+ dp->stripeoffset = (dp->stripesize - block_len * lalba) %
+ dp->stripesize;
+ } else if (softc->quirks & DA_Q_4K) {
+ dp->stripesize = 4096;
+ dp->stripeoffset = 0;
+ } else {
+ dp->stripesize = 0;
+ dp->stripeoffset = 0;
+ }
/*
* Have the controller provide us with a geometry
* for this disk. The only time the geometry
diff --git a/sys/cam/scsi/scsi_da.h b/sys/cam/scsi/scsi_da.h
index da099f6..7605b1a 100644
--- a/sys/cam/scsi/scsi_da.h
+++ b/sys/cam/scsi/scsi_da.h
@@ -421,6 +421,56 @@ union disk_pages /* this is the structure copied from osf */
} flexible_disk;
};
+/*
+ * XXX KDM
+ * Here for CTL compatibility, reconcile this.
+ */
+struct scsi_format_page {
+ uint8_t page_code;
+ uint8_t page_length;
+ uint8_t tracks_per_zone[2];
+ uint8_t alt_sectors_per_zone[2];
+ uint8_t alt_tracks_per_zone[2];
+ uint8_t alt_tracks_per_lun[2];
+ uint8_t sectors_per_track[2];
+ uint8_t bytes_per_sector[2];
+ uint8_t interleave[2];
+ uint8_t track_skew[2];
+ uint8_t cylinder_skew[2];
+ uint8_t flags;
+#define SFP_SSEC 0x80
+#define SFP_HSEC 0x40
+#define SFP_RMB 0x20
+#define SFP_SURF 0x10
+ uint8_t reserved[3];
+};
+
+/*
+ * XXX KDM
+ * Here for CTL compatibility, reconcile this.
+ */
+struct scsi_rigid_disk_page {
+ uint8_t page_code;
+#define SMS_RIGID_DISK_PAGE 0x04
+ uint8_t page_length;
+ uint8_t cylinders[3];
+ uint8_t heads;
+ uint8_t start_write_precomp[3];
+ uint8_t start_reduced_current[3];
+ uint8_t step_rate[2];
+ uint8_t landing_zone_cylinder[3];
+ uint8_t rpl;
+#define SRDP_RPL_DISABLED 0x00
+#define SRDP_RPL_SLAVE 0x01
+#define SRDP_RPL_MASTER 0x02
+#define SRDP_RPL_MASTER_CONTROL 0x03
+ uint8_t rotational_offset;
+ uint8_t reserved1;
+ uint8_t rotation_rate[2];
+ uint8_t reserved2[2];
+};
+
+
struct scsi_da_rw_recovery_page {
u_int8_t page_code;
#define SMS_RW_ERROR_RECOVERY_PAGE 0x01
diff --git a/sys/cam/scsi/scsi_sa.c b/sys/cam/scsi/scsi_sa.c
index a278d8e..42761bf 100644
--- a/sys/cam/scsi/scsi_sa.c
+++ b/sys/cam/scsi/scsi_sa.c
@@ -1853,14 +1853,12 @@ samount(struct cam_periph *periph, int oflags, struct cdev *dev)
MSG_SIMPLE_Q_TAG, SSD_FULL_SIZE, IO_TIMEOUT);
error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT,
softc->device_stats);
- QFRLS(ccb);
if (error == ENXIO) {
softc->flags &= ~SA_FLAG_TAPE_MOUNTED;
scsi_test_unit_ready(&ccb->csio, 0, sadone,
MSG_SIMPLE_Q_TAG, SSD_FULL_SIZE, IO_TIMEOUT);
error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT,
softc->device_stats);
- QFRLS(ccb);
} else if (error) {
/*
* We don't need to freeze the tape because we
@@ -1882,7 +1880,6 @@ samount(struct cam_periph *periph, int oflags, struct cdev *dev)
MSG_SIMPLE_Q_TAG, SSD_FULL_SIZE, IO_TIMEOUT);
error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT,
softc->device_stats);
- QFRLS(ccb);
}
if ((softc->flags & SA_FLAG_TAPE_MOUNTED) == 0) {
@@ -1905,7 +1902,6 @@ samount(struct cam_periph *periph, int oflags, struct cdev *dev)
FALSE, FALSE, 1, SSD_FULL_SIZE, REWIND_TIMEOUT);
error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT,
softc->device_stats);
- QFRLS(ccb);
/*
* In case this doesn't work, do a REWIND instead
@@ -1915,7 +1911,6 @@ samount(struct cam_periph *periph, int oflags, struct cdev *dev)
FALSE, SSD_FULL_SIZE, REWIND_TIMEOUT);
error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT,
softc->device_stats);
- QFRLS(ccb);
}
if (error) {
xpt_release_ccb(ccb);
@@ -1945,13 +1940,11 @@ samount(struct cam_periph *periph, int oflags, struct cdev *dev)
IO_TIMEOUT);
(void) cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT,
softc->device_stats);
- QFRLS(ccb);
scsi_rewind(&ccb->csio, 1, sadone, MSG_SIMPLE_Q_TAG,
FALSE, SSD_FULL_SIZE, REWIND_TIMEOUT);
error = cam_periph_runccb(ccb, saerror, CAM_RETRY_SELTO,
SF_NO_PRINT | SF_RETRY_UA,
softc->device_stats);
- QFRLS(ccb);
if (error) {
xpt_print(periph->path,
"unable to rewind after test read\n");
@@ -1969,7 +1962,6 @@ samount(struct cam_periph *periph, int oflags, struct cdev *dev)
error = cam_periph_runccb(ccb, saerror, CAM_RETRY_SELTO,
SF_NO_PRINT | SF_RETRY_UA, softc->device_stats);
- QFRLS(ccb);
xpt_release_ccb(ccb);
if (error != 0) {
@@ -2580,7 +2572,6 @@ retry:
error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT,
softc->device_stats);
- QFRLS(ccb);
status = ccb->ccb_h.status & CAM_STATUS_MASK;
@@ -2644,7 +2635,6 @@ retry:
error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT,
softc->device_stats);
- QFRLS(ccb);
if (error != 0)
goto sagetparamsexit;
@@ -2956,7 +2946,6 @@ retry:
error = cam_periph_runccb(ccb, saerror, 0,
sense_flags, softc->device_stats);
- QFRLS(ccb);
if (CAM_DEBUGGED(periph->path, CAM_DEBUG_INFO)) {
int idx;
@@ -3014,7 +3003,6 @@ retry:
ccb->ccb_h.retry_count = 1;
cam_periph_runccb(ccb, saerror, 0, sense_flags,
softc->device_stats);
- QFRLS(ccb);
}
xpt_release_ccb(ccb);
@@ -3072,7 +3060,6 @@ saprevent(struct cam_periph *periph, int action)
SSD_FULL_SIZE, SCSIOP_TIMEOUT);
error = cam_periph_runccb(ccb, saerror, 0, sf, softc->device_stats);
- QFRLS(ccb);
if (error == 0) {
if (action == PR_ALLOW)
softc->flags &= ~SA_FLAG_TAPE_LOCKED;
@@ -3102,9 +3089,6 @@ sarewind(struct cam_periph *periph)
error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats);
softc->dsreg = MTIO_DSREG_REST;
- if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
- cam_release_devq(ccb->ccb_h.path, 0, 0, 0, FALSE);
-
xpt_release_ccb(ccb);
if (error == 0)
softc->fileno = softc->blkno = (daddr_t) 0;
@@ -3138,9 +3122,6 @@ saspace(struct cam_periph *periph, int count, scsi_space_code code)
error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats);
softc->dsreg = MTIO_DSREG_REST;
- if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
- cam_release_devq(ccb->ccb_h.path, 0, 0, 0, FALSE);
-
xpt_release_ccb(ccb);
/*
@@ -3212,9 +3193,6 @@ sawritefilemarks(struct cam_periph *periph, int nmarks, int setmarks)
error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats);
- if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
- cam_release_devq(ccb->ccb_h.path, 0, 0, 0, FALSE);
-
if (error == 0 && nmarks) {
struct sa_softc *softc = (struct sa_softc *)periph->softc;
nwm = nmarks - softc->last_ctl_resid;
@@ -3265,8 +3243,6 @@ sardpos(struct cam_periph *periph, int hard, u_int32_t *blkptr)
softc->dsreg = MTIO_DSREG_RBSY;
error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats);
softc->dsreg = MTIO_DSREG_REST;
- if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
- cam_release_devq(ccb->ccb_h.path, 0, 0, 0, 0);
if (error == 0) {
if (loc.flags & SA_RPOS_UNCERTAIN) {
@@ -3306,8 +3282,6 @@ sasetpos(struct cam_periph *periph, int hard, u_int32_t *blkptr)
softc->dsreg = MTIO_DSREG_POS;
error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats);
softc->dsreg = MTIO_DSREG_REST;
- if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
- cam_release_devq(ccb->ccb_h.path, 0, 0, 0, 0);
xpt_release_ccb(ccb);
/*
* Note relative file && block number position as now unknown.
@@ -3335,8 +3309,6 @@ saretension(struct cam_periph *periph)
error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats);
softc->dsreg = MTIO_DSREG_REST;
- if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
- cam_release_devq(ccb->ccb_h.path, 0, 0, 0, FALSE);
xpt_release_ccb(ccb);
if (error == 0)
softc->fileno = softc->blkno = (daddr_t) 0;
@@ -3362,7 +3334,6 @@ sareservereleaseunit(struct cam_periph *periph, int reserve)
error = cam_periph_runccb(ccb, saerror, 0,
SF_RETRY_UA | SF_NO_PRINT, softc->device_stats);
softc->dsreg = MTIO_DSREG_REST;
- QFRLS(ccb);
xpt_release_ccb(ccb);
/*
@@ -3394,7 +3365,6 @@ saloadunload(struct cam_periph *periph, int load)
softc->dsreg = (load)? MTIO_DSREG_LD : MTIO_DSREG_UNL;
error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats);
softc->dsreg = MTIO_DSREG_REST;
- QFRLS(ccb);
xpt_release_ccb(ccb);
if (error || load == 0)
@@ -3425,8 +3395,6 @@ saerase(struct cam_periph *periph, int longerase)
error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats);
softc->dsreg = MTIO_DSREG_REST;
- if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
- cam_release_devq(ccb->ccb_h.path, 0, 0, 0, FALSE);
xpt_release_ccb(ccb);
return (error);
}
diff --git a/sys/cam/scsi/scsi_ses.c b/sys/cam/scsi/scsi_ses.c
index dcc9e4e..586e996 100644
--- a/sys/cam/scsi/scsi_ses.c
+++ b/sys/cam/scsi/scsi_ses.c
@@ -679,8 +679,6 @@ ses_runcmd(struct ses_softc *ssc, char *cdb, int cdbl, char *dptr, int *dlenp)
bcopy(cdb, ccb->csio.cdb_io.cdb_bytes, cdbl);
error = cam_periph_runccb(ccb, seserror, SES_CFLAGS, SES_FLAGS, NULL);
- if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
- cam_release_devq(ccb->ccb_h.path, 0, 0, 0, FALSE);
if (error) {
if (dptr) {
*dlenp = dlen;
diff --git a/sys/cam/scsi/scsi_sg.c b/sys/cam/scsi/scsi_sg.c
index 2a989e7..b8d2a48 100644
--- a/sys/cam/scsi/scsi_sg.c
+++ b/sys/cam/scsi/scsi_sg.c
@@ -399,18 +399,24 @@ sgopen(struct cdev *dev, int flags, int fmt, struct thread *td)
if (periph == NULL)
return (ENXIO);
+ if (cam_periph_acquire(periph) != CAM_REQ_CMP)
+ return (ENXIO);
+
/*
* Don't allow access when we're running at a high securelevel.
*/
error = securelevel_gt(td->td_ucred, 1);
- if (error)
+ if (error) {
+ cam_periph_release(periph);
return (error);
+ }
cam_periph_lock(periph);
softc = (struct sg_softc *)periph->softc;
if (softc->flags & SG_FLAG_INVALID) {
cam_periph_unlock(periph);
+ cam_periph_release(periph);
return (ENXIO);
}
diff --git a/sys/cam/scsi/scsi_targ_bh.c b/sys/cam/scsi/scsi_targ_bh.c
index 7f37157..92a7ac8 100644
--- a/sys/cam/scsi/scsi_targ_bh.c
+++ b/sys/cam/scsi/scsi_targ_bh.c
@@ -604,7 +604,7 @@ targbhdone(struct cam_periph *periph, union ccb *done_ccb)
atio->ccb_h.flags |= CAM_DIR_IN;
descr->data = &no_lun_inq_data;
descr->data_resid = MIN(sizeof(no_lun_inq_data),
- SCSI_CDB6_LEN(inq->length));
+ scsi_2btoul(inq->length));
descr->data_increment = descr->data_resid;
descr->timeout = 5 * 1000;
descr->status = SCSI_STATUS_OK;
diff --git a/sys/cam/scsi/scsi_target.c b/sys/cam/scsi/scsi_target.c
index e16186a..65f2388 100644
--- a/sys/cam/scsi/scsi_target.c
+++ b/sys/cam/scsi/scsi_target.c
@@ -96,12 +96,9 @@ struct targ_softc {
targ_state state;
struct selinfo read_select;
struct devstat device_stats;
- struct callout destroy_dev_callout;
- struct mtx destroy_mtx;
};
static d_open_t targopen;
-static d_close_t targclose;
static d_read_t targread;
static d_write_t targwrite;
static d_ioctl_t targioctl;
@@ -119,7 +116,6 @@ static struct cdevsw targ_cdevsw = {
.d_version = D_VERSION,
.d_flags = D_NEEDGIANT,
.d_open = targopen,
- .d_close = targclose,
.d_read = targread,
.d_write = targwrite,
.d_ioctl = targioctl,
@@ -152,15 +148,12 @@ static void targfreeccb(struct targ_softc *softc, union ccb *ccb);
static struct targ_cmd_descr *
targgetdescr(struct targ_softc *softc);
static periph_init_t targinit;
-static void targclone(void *arg, struct ucred *cred, char *name,
- int namelen, struct cdev **dev);
static void targasync(void *callback_arg, u_int32_t code,
struct cam_path *path, void *arg);
static void abort_all_pending(struct targ_softc *softc);
static void notify_user(struct targ_softc *softc);
static int targcamstatus(cam_status status);
static size_t targccblen(xpt_opcode func_code);
-static void targdestroy(void *);
static struct periph_driver targdriver =
{
@@ -171,66 +164,18 @@ PERIPHDRIVER_DECLARE(targ, targdriver);
static MALLOC_DEFINE(M_TARG, "TARG", "TARG data");
-/*
- * Create softc and initialize it. Only one proc can open each targ device.
- * There is no locking here because a periph doesn't get created until an
- * ioctl is issued to do so, and that can't happen until this method returns.
- */
-static int
-targopen(struct cdev *dev, int flags, int fmt, struct thread *td)
-{
- struct targ_softc *softc;
-
- if (dev->si_drv1 != 0) {
- return (EBUSY);
- }
-
- /* Mark device busy before any potentially blocking operations */
- dev->si_drv1 = (void *)~0;
-
- /* Create the targ device, allocate its softc, initialize it */
- if ((dev->si_flags & SI_NAMED) == 0) {
- make_dev(&targ_cdevsw, dev2unit(dev), UID_ROOT, GID_WHEEL, 0600,
- "targ%d", dev2unit(dev));
- }
- softc = malloc(sizeof(*softc), M_TARG,
- M_WAITOK | M_ZERO);
- dev->si_drv1 = softc;
- softc->state = TARG_STATE_OPENED;
- softc->periph = NULL;
- softc->path = NULL;
-
- TAILQ_INIT(&softc->pending_ccb_queue);
- TAILQ_INIT(&softc->work_queue);
- TAILQ_INIT(&softc->abort_queue);
- TAILQ_INIT(&softc->user_ccb_queue);
- knlist_init_mtx(&softc->read_select.si_note, NULL);
-
- return (0);
-}
-
/* Disable LUN if enabled and teardown softc */
-static int
-targclose(struct cdev *dev, int flag, int fmt, struct thread *td)
+static void
+targcdevdtor(void *data)
{
- struct targ_softc *softc;
- struct cam_periph *periph;
- int error;
+ struct targ_softc *softc;
+ struct cam_periph *periph;
- softc = (struct targ_softc *)dev->si_drv1;
- mtx_init(&softc->destroy_mtx, "targ_destroy", "SCSI Target dev destroy", MTX_DEF);
- callout_init_mtx(&softc->destroy_dev_callout, &softc->destroy_mtx, CALLOUT_RETURNUNLOCKED);
+ softc = data;
if (softc->periph == NULL) {
-#if 0
- destroy_dev(dev);
- free(softc, M_TARG);
-#endif
printf("%s: destroying non-enabled target\n", __func__);
- mtx_lock(&softc->destroy_mtx);
- callout_reset(&softc->destroy_dev_callout, hz / 2,
- (void *)targdestroy, (void *)dev);
- mtx_unlock(&softc->destroy_mtx);
- return (0);
+ free(softc, M_TARG);
+ return;
}
/*
@@ -240,25 +185,41 @@ targclose(struct cdev *dev, int flag, int fmt, struct thread *td)
periph = softc->periph;
cam_periph_acquire(periph);
cam_periph_lock(periph);
- error = targdisable(softc);
+ (void)targdisable(softc);
if (softc->periph != NULL) {
cam_periph_invalidate(softc->periph);
softc->periph = NULL;
}
cam_periph_unlock(periph);
cam_periph_release(periph);
-
-#if 0
- destroy_dev(dev);
free(softc, M_TARG);
-#endif
+}
- printf("%s: close finished error(%d)\n", __func__, error);
- mtx_lock(&softc->destroy_mtx);
- callout_reset(&softc->destroy_dev_callout, hz / 2,
- (void *)targdestroy, (void *)dev);
- mtx_unlock(&softc->destroy_mtx);
- return (error);
+/*
+ * Create softc and initialize it. There is no locking here because a
+ * periph doesn't get created until an ioctl is issued to do so, and
+ * that can't happen until this method returns.
+ */
+static int
+targopen(struct cdev *dev, int flags, int fmt, struct thread *td)
+{
+ struct targ_softc *softc;
+
+ /* Allocate its softc, initialize it */
+ softc = malloc(sizeof(*softc), M_TARG,
+ M_WAITOK | M_ZERO);
+ softc->state = TARG_STATE_OPENED;
+ softc->periph = NULL;
+ softc->path = NULL;
+
+ TAILQ_INIT(&softc->pending_ccb_queue);
+ TAILQ_INIT(&softc->work_queue);
+ TAILQ_INIT(&softc->abort_queue);
+ TAILQ_INIT(&softc->user_ccb_queue);
+ knlist_init_mtx(&softc->read_select.si_note, NULL);
+
+ devfs_set_cdevpriv(softc, targcdevdtor);
+ return (0);
}
/* Enable/disable LUNs, set debugging level */
@@ -268,7 +229,7 @@ targioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *t
struct targ_softc *softc;
cam_status status;
- softc = (struct targ_softc *)dev->si_drv1;
+ devfs_get_cdevpriv((void **)&softc);
switch (cmd) {
case TARGIOCENABLE:
@@ -346,7 +307,7 @@ targpoll(struct cdev *dev, int poll_events, struct thread *td)
struct targ_softc *softc;
int revents;
- softc = (struct targ_softc *)dev->si_drv1;
+ devfs_get_cdevpriv((void **)&softc);
/* Poll for write() is always ok. */
revents = poll_events & (POLLOUT | POLLWRNORM);
@@ -371,7 +332,7 @@ targkqfilter(struct cdev *dev, struct knote *kn)
{
struct targ_softc *softc;
- softc = (struct targ_softc *)dev->si_drv1;
+ devfs_get_cdevpriv((void **)&softc);
kn->kn_hook = (caddr_t)softc;
kn->kn_fop = &targread_filtops;
knlist_add(&softc->read_select.si_note, kn, 0);
@@ -572,7 +533,7 @@ targwrite(struct cdev *dev, struct uio *uio, int ioflag)
int write_len, error;
int func_code, priority;
- softc = (struct targ_softc *)dev->si_drv1;
+ devfs_get_cdevpriv((void **)&softc);
write_len = error = 0;
CAM_DEBUG(softc->path, CAM_DEBUG_PERIPH,
("write - uio_resid %zd\n", uio->uio_resid));
@@ -866,7 +827,7 @@ targread(struct cdev *dev, struct uio *uio, int ioflag)
error = 0;
read_len = 0;
- softc = (struct targ_softc *)dev->si_drv1;
+ devfs_get_cdevpriv((void **)&softc);
user_queue = &softc->user_ccb_queue;
abort_queue = &softc->abort_queue;
CAM_DEBUG(softc->path, CAM_DEBUG_PERIPH, ("targread\n"));
@@ -1051,23 +1012,11 @@ targgetdescr(struct targ_softc *softc)
static void
targinit(void)
{
- EVENTHANDLER_REGISTER(dev_clone, targclone, 0, 1000);
-}
-
-static void
-targclone(void *arg, struct ucred *cred, char *name, int namelen,
- struct cdev **dev)
-{
- int u;
+ struct cdev *dev;
- if (*dev != NULL)
- return;
- if (dev_stdclone(name, NULL, "targ", &u) != 1)
- return;
- *dev = make_dev(&targ_cdevsw, u, UID_ROOT, GID_WHEEL,
- 0600, "targ%d", u);
- dev_ref(*dev);
- (*dev)->si_flags |= SI_CHEAPCLONE;
+ /* Add symbolic link to targ0 for compatibility. */
+ dev = make_dev(&targ_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "targ");
+ make_dev_alias(dev, "targ0");
}
static void
@@ -1221,25 +1170,3 @@ targccblen(xpt_opcode func_code)
return (len);
}
-
-/*
- * work around to destroy targ device
- * outside of targclose
- */
-static void
-targdestroy(void *dev)
-{
- struct cdev *device = (struct cdev *)dev;
- struct targ_softc *softc = (struct targ_softc *)device->si_drv1;
-
-#if 0
- callout_stop(&softc->destroy_dev_callout);
-#endif
-
- mtx_unlock(&softc->destroy_mtx);
- mtx_destroy(&softc->destroy_mtx);
- free(softc, M_TARG);
- device->si_drv1 = 0;
- destroy_dev(device);
- printf("%s: destroyed dev\n", __func__);
-}
diff --git a/sys/cam/scsi/scsi_xpt.c b/sys/cam/scsi/scsi_xpt.c
index c1f713b..b177fca 100644
--- a/sys/cam/scsi/scsi_xpt.c
+++ b/sys/cam/scsi/scsi_xpt.c
@@ -1811,14 +1811,14 @@ scsi_find_quirk(struct cam_ed *device)
static int
sysctl_cam_search_luns(SYSCTL_HANDLER_ARGS)
{
- int error, bool;
+ int error, val;
- bool = cam_srch_hi;
- error = sysctl_handle_int(oidp, &bool, 0, req);
+ val = cam_srch_hi;
+ error = sysctl_handle_int(oidp, &val, 0, req);
if (error != 0 || req->newptr == NULL)
return (error);
- if (bool == 0 || bool == 1) {
- cam_srch_hi = bool;
+ if (val == 0 || val == 1) {
+ cam_srch_hi = val;
return (0);
} else {
return (EINVAL);
diff --git a/sys/cddl/compat/opensolaris/kern/opensolaris_cmn_err.c b/sys/cddl/compat/opensolaris/kern/opensolaris_cmn_err.c
index 12e1854..abde30d 100644
--- a/sys/cddl/compat/opensolaris/kern/opensolaris_cmn_err.c
+++ b/sys/cddl/compat/opensolaris/kern/opensolaris_cmn_err.c
@@ -28,29 +28,35 @@ void
vcmn_err(int ce, const char *fmt, va_list adx)
{
char buf[256];
+ const char *prefix;
+ prefix = NULL; /* silence unwitty compilers */
switch (ce) {
case CE_CONT:
- snprintf(buf, sizeof(buf), "Solaris(cont): %s\n", fmt);
+ prefix = "Solaris(cont): ";
break;
case CE_NOTE:
- snprintf(buf, sizeof(buf), "Solaris: NOTICE: %s\n", fmt);
+ prefix = "Solaris: NOTICE: ";
break;
case CE_WARN:
- snprintf(buf, sizeof(buf), "Solaris: WARNING: %s\n", fmt);
+ prefix = "Solaris: WARNING: ";
break;
case CE_PANIC:
- snprintf(buf, sizeof(buf), "Solaris(panic): %s\n", fmt);
+ prefix = "Solaris(panic): ";
break;
case CE_IGNORE:
break;
default:
panic("Solaris: unknown severity level");
}
- if (ce == CE_PANIC)
- panic("%s", buf);
- if (ce != CE_IGNORE)
- vprintf(buf, adx);
+ if (ce == CE_PANIC) {
+ vsnprintf(buf, sizeof(buf), fmt, adx);
+ panic("%s%s", prefix, buf);
+ }
+ if (ce != CE_IGNORE) {
+ printf("%s", prefix);
+ vprintf(fmt, adx);
+ }
}
void
diff --git a/sys/cddl/compat/opensolaris/sys/sid.h b/sys/cddl/compat/opensolaris/sys/sid.h
index d6c1b0c..cc3ca3b 100644
--- a/sys/cddl/compat/opensolaris/sys/sid.h
+++ b/sys/cddl/compat/opensolaris/sys/sid.h
@@ -30,7 +30,7 @@
#define _OPENSOLARIS_SYS_SID_H_
typedef struct ksiddomain {
- char kd_name[16]; /* Domain part of SID */
+ char kd_name[1]; /* Domain part of SID */
} ksiddomain_t;
typedef void ksid_t;
@@ -39,8 +39,8 @@ ksid_lookupdomain(const char *domain)
{
ksiddomain_t *kd;
- kd = kmem_alloc(sizeof(*kd), KM_SLEEP);
- strlcpy(kd->kd_name, "FreeBSD", sizeof(kd->kd_name));
+ kd = kmem_alloc(sizeof(*kd) + strlen(domain), KM_SLEEP);
+ strcpy(kd->kd_name, domain);
return (kd);
}
diff --git a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
index ae243fd..ebba983 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
@@ -5877,6 +5877,9 @@ dtrace_probe(dtrace_id_t id, uintptr_t arg0, uintptr_t arg1,
volatile uint16_t *flags;
hrtime_t now;
+ if (panicstr != NULL)
+ return;
+
#if defined(sun)
/*
* Kick out immediately if this CPU is still being born (in which case
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
index 294c6fd..cb81392 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
@@ -464,10 +464,10 @@ static uint64_t arc_loaned_bytes;
static uint64_t arc_meta_used;
static uint64_t arc_meta_limit;
static uint64_t arc_meta_max = 0;
-SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_meta_used, CTLFLAG_RDTUN,
- &arc_meta_used, 0, "ARC metadata used");
-SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_meta_limit, CTLFLAG_RDTUN,
- &arc_meta_limit, 0, "ARC metadata limit");
+SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_meta_used, CTLFLAG_RD, &arc_meta_used, 0,
+ "ARC metadata used");
+SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_meta_limit, CTLFLAG_RW, &arc_meta_limit, 0,
+ "ARC metadata limit");
typedef struct l2arc_buf_hdr l2arc_buf_hdr_t;
@@ -3105,6 +3105,9 @@ top:
ARCSTAT_CONDSTAT(!(hdr->b_flags & ARC_PREFETCH),
demand, prefetch, hdr->b_type != ARC_BUFC_METADATA,
data, metadata, misses);
+#ifdef _KERNEL
+ curthread->td_ru.ru_inblock++;
+#endif
if (vd != NULL && l2arc_ndev != 0 && !(l2arc_norw && devw)) {
/*
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
index 7b47f87..dc9f482 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
@@ -627,10 +627,6 @@ dbuf_read(dmu_buf_impl_t *db, zio_t *zio, uint32_t flags)
} else if (db->db_state == DB_UNCACHED) {
spa_t *spa = dn->dn_objset->os_spa;
-#ifdef _KERNEL
- curthread->td_ru.ru_inblock++;
-#endif
-
if (zio == NULL)
zio = zio_root(spa, NULL, NULL, ZIO_FLAG_CANFAIL);
dbuf_read_impl(db, zio, &flags);
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c
index b43035b..ca2b69a 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c
@@ -1077,7 +1077,7 @@ dnode_hold_impl(objset_t *os, uint64_t object, int flag,
if (children_dnodes == NULL) {
int i;
dnode_children_t *winner;
- children_dnodes = kmem_alloc(sizeof (dnode_children_t) +
+ children_dnodes = kmem_zalloc(sizeof (dnode_children_t) +
(epb - 1) * sizeof (dnode_handle_t), KM_SLEEP);
children_dnodes->dnc_count = epb;
dnh = &children_dnodes->dnc_children[0];
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c
index a0620b8..3a289da 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c
@@ -20,7 +20,7 @@
*/
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2011 by Delphix. All rights reserved.
+ * Copyright (c) 2012 by Delphix. All rights reserved.
*/
#include <sys/zfs_context.h>
@@ -36,7 +36,7 @@
* avoid having to load lots of space_maps in a given txg. There are,
* however, some cases where we want to avoid "fast" ganging and instead
* we want to do an exhaustive search of all metaslabs on this device.
- * Currently we don't allow any gang or dump device related allocations
+ * Currently we don't allow any gang, zil, or dump device related allocations
* to "fast" gang.
*/
#define CAN_FASTGANG(flags) \
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
index 8da471b..f467223 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
@@ -1073,8 +1073,10 @@ spa_unload(spa_t *spa)
}
spa->spa_spares.sav_count = 0;
- for (i = 0; i < spa->spa_l2cache.sav_count; i++)
+ for (i = 0; i < spa->spa_l2cache.sav_count; i++) {
+ vdev_clear_stats(spa->spa_l2cache.sav_vdevs[i]);
vdev_free(spa->spa_l2cache.sav_vdevs[i]);
+ }
if (spa->spa_l2cache.sav_vdevs) {
kmem_free(spa->spa_l2cache.sav_vdevs,
spa->spa_l2cache.sav_count * sizeof (void *));
@@ -1302,11 +1304,13 @@ spa_load_l2cache(spa_t *spa)
vd = oldvdevs[i];
if (vd != NULL) {
+ ASSERT(vd->vdev_isl2cache);
+
if (spa_l2cache_exists(vd->vdev_guid, &pool) &&
pool != 0ULL && l2arc_vdev_present(vd))
l2arc_remove_vdev(vd);
- (void) vdev_close(vd);
- spa_l2cache_remove(vd);
+ vdev_clear_stats(vd);
+ vdev_free(vd);
}
}
@@ -1949,7 +1953,7 @@ spa_load_impl(spa_t *spa, uint64_t pool_guid, nvlist_t *config,
*/
if (type != SPA_IMPORT_ASSEMBLE) {
spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER);
- error = vdev_validate(rvd);
+ error = vdev_validate(rvd, mosconfig);
spa_config_exit(spa, SCL_ALL, FTAG);
if (error != 0)
@@ -2818,6 +2822,7 @@ spa_validate_aux_devs(spa_t *spa, nvlist_t *nvroot, uint64_t crtxg, int mode,
if ((strcmp(config, ZPOOL_CONFIG_L2CACHE) == 0) &&
strcmp(vd->vdev_ops->vdev_op_type, VDEV_TYPE_DISK) != 0) {
error = ENOTBLK;
+ vdev_free(vd);
goto out;
}
#endif
@@ -2927,10 +2932,6 @@ spa_l2cache_drop(spa_t *spa)
if (spa_l2cache_exists(vd->vdev_guid, &pool) &&
pool != 0ULL && l2arc_vdev_present(vd))
l2arc_remove_vdev(vd);
- if (vd->vdev_isl2cache)
- spa_l2cache_remove(vd);
- vdev_clear_stats(vd);
- (void) vdev_close(vd);
}
}
@@ -3929,7 +3930,7 @@ spa_vdev_attach(spa_t *spa, uint64_t guid, nvlist_t *nvroot, int replacing)
pvd = oldvd->vdev_parent;
if ((error = spa_config_parse(spa, &newrootvd, nvroot, NULL, 0,
- VDEV_ALLOC_ADD)) != 0)
+ VDEV_ALLOC_ATTACH)) != 0)
return (spa_vdev_exit(spa, NULL, txg, EINVAL));
if (newrootvd->vdev_children != 1)
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c
index 1ce7b2a..a8df1c7 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c
@@ -29,6 +29,13 @@
#include <sys/zio.h>
#include <sys/space_map.h>
+SYSCTL_DECL(_vfs_zfs);
+static int space_map_last_hope;
+TUNABLE_INT("vfs.zfs.space_map_last_hope", &space_map_last_hope);
+SYSCTL_INT(_vfs_zfs, OID_AUTO, space_map_last_hope, CTLFLAG_RDTUN,
+ &space_map_last_hope, 0,
+ "If kernel panic in space_map code on pool import, import the pool in readonly mode and backup all your data before trying this option.");
+
/*
* Space map routines.
* NOTE: caller is responsible for all locking.
@@ -93,7 +100,7 @@ space_map_add(space_map_t *sm, uint64_t start, uint64_t size)
VERIFY(sm->sm_space + size <= sm->sm_size);
VERIFY(P2PHASE(start, 1ULL << sm->sm_shift) == 0);
VERIFY(P2PHASE(size, 1ULL << sm->sm_shift) == 0);
-
+again:
ssearch.ss_start = start;
ssearch.ss_end = end;
ss = avl_find(&sm->sm_root, &ssearch, &where);
@@ -104,6 +111,23 @@ space_map_add(space_map_t *sm, uint64_t start, uint64_t size)
(longlong_t)start, (longlong_t)size);
return;
}
+ if (ss != NULL && space_map_last_hope) {
+ uint64_t sstart, ssize;
+
+ if (ss->ss_start > start)
+ sstart = ss->ss_start;
+ else
+ sstart = start;
+ if (ss->ss_end > end)
+ ssize = end - sstart;
+ else
+ ssize = ss->ss_end - sstart;
+ ZFS_LOG(0,
+ "Removing colliding space_map range (start=%ju end=%ju). Good luck!",
+ (uintmax_t)sstart, (uintmax_t)(sstart + ssize));
+ space_map_remove(sm, sstart, ssize);
+ goto again;
+ }
/* Make sure we don't overlap with either of our neighbors */
VERIFY(ss == NULL);
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h
index 941f234..aa6559c 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h
@@ -20,6 +20,7 @@
*/
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012 by Delphix. All rights reserved.
*/
#ifndef _SYS_VDEV_H
@@ -48,7 +49,7 @@ extern boolean_t zfs_nocacheflush;
extern int vdev_open(vdev_t *);
extern void vdev_open_children(vdev_t *);
extern boolean_t vdev_uses_zvols(vdev_t *);
-extern int vdev_validate(vdev_t *);
+extern int vdev_validate(vdev_t *, boolean_t);
extern void vdev_close(vdev_t *);
extern int vdev_create(vdev_t *, uint64_t txg, boolean_t isreplace);
extern void vdev_reopen(vdev_t *);
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h
index 7efa3f3..992ce0c 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h
@@ -261,6 +261,7 @@ typedef struct vdev_label {
#define VDEV_ALLOC_L2CACHE 3
#define VDEV_ALLOC_ROOTPOOL 4
#define VDEV_ALLOC_SPLIT 5
+#define VDEV_ALLOC_ATTACH 6
/*
* Allocate or free a vdev
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h
index 5692dc6..9e9ac34 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h
@@ -300,7 +300,8 @@ typedef struct zfs_cmd {
boolean_t zc_temphold;
uint64_t zc_action_handle;
int zc_cleanup_fd;
- uint8_t zc_pad[4]; /* alignment */
+ uint8_t zc_simple;
+ uint8_t zc_pad[3]; /* alignment */
uint64_t zc_sendobj;
uint64_t zc_fromobj;
uint64_t zc_createtxg;
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
index 04597ec..b5d6fda 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
@@ -499,7 +499,7 @@ vdev_alloc(spa_t *spa, vdev_t **vdp, nvlist_t *nv, vdev_t *parent, uint_t id,
&vd->vdev_removing);
}
- if (parent && !parent->vdev_parent) {
+ if (parent && !parent->vdev_parent && alloctype != VDEV_ALLOC_ATTACH) {
ASSERT(alloctype == VDEV_ALLOC_LOAD ||
alloctype == VDEV_ALLOC_ADD ||
alloctype == VDEV_ALLOC_SPLIT ||
@@ -675,6 +675,8 @@ vdev_top_transfer(vdev_t *svd, vdev_t *tvd)
svd->vdev_ms_shift = 0;
svd->vdev_ms_count = 0;
+ if (tvd->vdev_mg)
+ ASSERT3P(tvd->vdev_mg, ==, svd->vdev_mg);
tvd->vdev_mg = svd->vdev_mg;
tvd->vdev_ms = svd->vdev_ms;
@@ -1294,13 +1296,18 @@ vdev_open(vdev_t *vd)
* contents. This needs to be done before vdev_load() so that we don't
* inadvertently do repair I/Os to the wrong device.
*
+ * If 'strict' is false ignore the spa guid check. This is necessary because
+ * if the machine crashed during a re-guid the new guid might have been written
+ * to all of the vdev labels, but not the cached config. The strict check
+ * will be performed when the pool is opened again using the mos config.
+ *
* This function will only return failure if one of the vdevs indicates that it
* has since been destroyed or exported. This is only possible if
* /etc/zfs/zpool.cache was readonly at the time. Otherwise, the vdev state
* will be updated but the function will return 0.
*/
int
-vdev_validate(vdev_t *vd)
+vdev_validate(vdev_t *vd, boolean_t strict)
{
spa_t *spa = vd->vdev_spa;
nvlist_t *label;
@@ -1308,7 +1315,7 @@ vdev_validate(vdev_t *vd)
uint64_t state;
for (int c = 0; c < vd->vdev_children; c++)
- if (vdev_validate(vd->vdev_child[c]) != 0)
+ if (vdev_validate(vd->vdev_child[c], strict) != 0)
return (EBADF);
/*
@@ -1338,8 +1345,9 @@ vdev_validate(vdev_t *vd)
return (0);
}
- if (nvlist_lookup_uint64(label, ZPOOL_CONFIG_POOL_GUID,
- &guid) != 0 || guid != spa_guid(spa)) {
+ if (strict && (nvlist_lookup_uint64(label,
+ ZPOOL_CONFIG_POOL_GUID, &guid) != 0 ||
+ guid != spa_guid(spa))) {
vdev_set_state(vd, B_FALSE, VDEV_STATE_CANT_OPEN,
VDEV_AUX_CORRUPT_DATA);
nvlist_free(label);
@@ -1501,7 +1509,7 @@ vdev_reopen(vdev_t *vd)
!l2arc_vdev_present(vd))
l2arc_add_vdev(spa, vd);
} else {
- (void) vdev_validate(vd);
+ (void) vdev_validate(vd, B_TRUE);
}
/*
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fm.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fm.c
index 0b48126..fa5903a 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fm.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fm.c
@@ -23,6 +23,10 @@
* Use is subject to license terms.
*/
+/*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
+
#include <sys/spa.h>
#include <sys/spa_impl.h>
#include <sys/vdev.h>
@@ -709,6 +713,10 @@ zfs_ereport_start_checksum(spa_t *spa, vdev_t *vd,
if (report->zcr_ereport == NULL) {
report->zcr_free(report->zcr_cbdata, report->zcr_cbinfo);
+ if (report->zcr_ckinfo != NULL) {
+ kmem_free(report->zcr_ckinfo,
+ sizeof (*report->zcr_ckinfo));
+ }
kmem_free(report, sizeof (*report));
return;
}
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
index 882bf02e..15dcfde 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
@@ -20,7 +20,7 @@
*/
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2011 Pawel Jakub Dawidek <pawel@dawidek.net>.
+ * Copyright (c) 2011-2012 Pawel Jakub Dawidek <pawel@dawidek.net>.
* All rights reserved.
* Portions Copyright 2011 Martin Matuska <mm@FreeBSD.org>
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
@@ -81,6 +81,12 @@
CTASSERT(sizeof(zfs_cmd_t) < IOCPARM_MAX);
+static int snapshot_list_prefetch;
+SYSCTL_DECL(_vfs_zfs);
+TUNABLE_INT("vfs.zfs.snapshot_list_prefetch", &snapshot_list_prefetch);
+SYSCTL_INT(_vfs_zfs, OID_AUTO, snapshot_list_prefetch, CTLFLAG_RW,
+ &snapshot_list_prefetch, 0, "Prefetch data when listing snapshots");
+
static struct cdev *zfsdev;
extern void zfs_init(void);
@@ -2030,6 +2036,7 @@ top:
* zc_name name of filesystem
* zc_cookie zap cursor
* zc_nvlist_dst_size size of buffer for property nvlist
+ * zc_simple when set, only name is requested
*
* outputs:
* zc_name name of next snapshot
@@ -2044,7 +2051,7 @@ zfs_ioc_snapshot_list_next(zfs_cmd_t *zc)
int error;
top:
- if (zc->zc_cookie == 0)
+ if (snapshot_list_prefetch && zc->zc_cookie == 0 && !zc->zc_simple)
(void) dmu_objset_find(zc->zc_name, dmu_objset_prefetch,
NULL, DS_FIND_SNAPSHOTS);
@@ -2066,7 +2073,7 @@ top:
zc->zc_name + strlen(zc->zc_name), &zc->zc_obj, &zc->zc_cookie,
NULL);
- if (error == 0) {
+ if (error == 0 && !zc->zc_simple) {
dsl_dataset_t *ds;
dsl_pool_t *dp = os->os_dsl_dataset->ds_dir->dd_pool;
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c
index ebea17a..db68623 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c
@@ -904,11 +904,15 @@ zfs_replay_setattr(zfsvfs_t *zfsvfs, lr_setattr_t *lr, boolean_t byteswap)
return (error);
}
+extern int zfs_setsecattr(vnode_t *vp, vsecattr_t *vsecp, int flag, cred_t *cr,
+ caller_context_t *ct);
+
static int
zfs_replay_acl_v0(zfsvfs_t *zfsvfs, lr_acl_v0_t *lr, boolean_t byteswap)
{
ace_t *ace = (ace_t *)(lr + 1); /* ace array follows lr_acl_t */
vsecattr_t vsa;
+ vnode_t *vp;
znode_t *zp;
int error;
@@ -927,13 +931,12 @@ zfs_replay_acl_v0(zfsvfs_t *zfsvfs, lr_acl_v0_t *lr, boolean_t byteswap)
vsa.vsa_aclflags = 0;
vsa.vsa_aclentp = ace;
-#ifdef TODO
- error = VOP_SETSECATTR(ZTOV(zp), &vsa, 0, kcred, NULL);
-#else
- panic("%s:%u: unsupported condition", __func__, __LINE__);
-#endif
+ vp = ZTOV(zp);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
+ error = zfs_setsecattr(vp, &vsa, 0, kcred, NULL);
+ VOP_UNLOCK(vp, 0);
- VN_RELE(ZTOV(zp));
+ VN_RELE(vp);
return (error);
}
@@ -958,6 +961,7 @@ zfs_replay_acl(zfsvfs_t *zfsvfs, lr_acl_t *lr, boolean_t byteswap)
ace_t *ace = (ace_t *)(lr + 1);
vsecattr_t vsa;
znode_t *zp;
+ vnode_t *vp;
int error;
if (byteswap) {
@@ -973,7 +977,6 @@ zfs_replay_acl(zfsvfs_t *zfsvfs, lr_acl_t *lr, boolean_t byteswap)
if ((error = zfs_zget(zfsvfs, lr->lr_foid, &zp)) != 0)
return (error);
-#ifdef TODO
bzero(&vsa, sizeof (vsa));
vsa.vsa_mask = VSA_ACE | VSA_ACECNT | VSA_ACE_ACLFLAGS;
vsa.vsa_aclcnt = lr->lr_aclcnt;
@@ -990,16 +993,16 @@ zfs_replay_acl(zfsvfs_t *zfsvfs, lr_acl_t *lr, boolean_t byteswap)
lr->lr_fuidcnt, lr->lr_domcnt, 0, 0);
}
- error = VOP_SETSECATTR(ZTOV(zp), &vsa, 0, kcred, NULL);
+ vp = ZTOV(zp);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
+ error = zfs_setsecattr(vp, &vsa, 0, kcred, NULL);
+ VOP_UNLOCK(vp, 0);
if (zfsvfs->z_fuid_replay)
zfs_fuid_info_free(zfsvfs->z_fuid_replay);
-#else
- error = EOPNOTSUPP;
-#endif
zfsvfs->z_fuid_replay = NULL;
- VN_RELE(ZTOV(zp));
+ VN_RELE(vp);
return (error);
}
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
index 8d8ddfc..74c80c3 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
@@ -2698,7 +2698,7 @@ zfs_getattr(vnode_t *vp, vattr_t *vap, int flags, cred_t *cr,
links = zp->z_links + 1;
else
links = zp->z_links;
- vap->va_nlink = MIN(links, UINT32_MAX); /* nlink_t limit! */
+ vap->va_nlink = MIN(links, LINK_MAX); /* nlink_t limit! */
vap->va_size = zp->z_size;
#ifdef sun
vap->va_rdev = vp->v_rdev;
@@ -5163,7 +5163,7 @@ zfs_getsecattr(vnode_t *vp, vsecattr_t *vsecp, int flag, cred_t *cr,
}
/*ARGSUSED*/
-static int
+int
zfs_setsecattr(vnode_t *vp, vsecattr_t *vsecp, int flag, cred_t *cr,
caller_context_t *ct)
{
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
index 5f8f00b..3eeeb58 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
@@ -20,7 +20,7 @@
*/
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2011 by Delphix. All rights reserved.
+ * Copyright (c) 2012 by Delphix. All rights reserved.
*/
#include <sys/zfs_context.h>
@@ -2235,13 +2235,22 @@ zio_alloc_zil(spa_t *spa, uint64_t txg, blkptr_t *new_bp, blkptr_t *old_bp,
ASSERT(txg > spa_syncing_txg(spa));
- if (use_slog)
+ /*
+ * ZIL blocks are always contiguous (i.e. not gang blocks) so we
+ * set the METASLAB_GANG_AVOID flag so that they don't "fast gang"
+ * when allocating them.
+ */
+ if (use_slog) {
error = metaslab_alloc(spa, spa_log_class(spa), size,
- new_bp, 1, txg, old_bp, METASLAB_HINTBP_AVOID);
+ new_bp, 1, txg, old_bp,
+ METASLAB_HINTBP_AVOID | METASLAB_GANG_AVOID);
+ }
- if (error)
+ if (error) {
error = metaslab_alloc(spa, spa_normal_class(spa), size,
- new_bp, 1, txg, old_bp, METASLAB_HINTBP_AVOID);
+ new_bp, 1, txg, old_bp,
+ METASLAB_HINTBP_AVOID | METASLAB_GANG_AVOID);
+ }
if (error == 0) {
BP_SET_LSIZE(new_bp, size);
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c
index 9390bc6..aff280a 100644
--- a/sys/compat/freebsd32/freebsd32_misc.c
+++ b/sys/compat/freebsd32/freebsd32_misc.c
@@ -2485,9 +2485,17 @@ freebsd32_nmount(struct thread *td,
} */ *uap)
{
struct uio *auio;
+ uint64_t flags;
int error;
- AUDIT_ARG_FFLAGS(uap->flags);
+ /*
+ * Mount flags are now 64-bits. On 32-bit archtectures only
+ * 32-bits are passed in, but from here on everything handles
+ * 64-bit flags correctly.
+ */
+ flags = uap->flags;
+
+ AUDIT_ARG_FFLAGS(flags);
/*
* Filter out MNT_ROOTFS. We do not want clients of nmount() in
@@ -2496,7 +2504,7 @@ freebsd32_nmount(struct thread *td,
* MNT_ROOTFS should only be set by the kernel when mounting its
* root file system.
*/
- uap->flags &= ~MNT_ROOTFS;
+ flags &= ~MNT_ROOTFS;
/*
* check that we have an even number of iovec's
@@ -2508,7 +2516,7 @@ freebsd32_nmount(struct thread *td,
error = freebsd32_copyinuio(uap->iovp, uap->iovcnt, &auio);
if (error)
return (error);
- error = vfs_donmount(td, uap->flags, auio);
+ error = vfs_donmount(td, flags, auio);
free(auio, M_IOV);
return error;
diff --git a/sys/compat/ia32/ia32_signal.h b/sys/compat/ia32/ia32_signal.h
index 0c54caf..78cb82a 100644
--- a/sys/compat/ia32/ia32_signal.h
+++ b/sys/compat/ia32/ia32_signal.h
@@ -32,6 +32,12 @@
#ifndef _COMPAT_IA32_IA32_SIGNAL_H
#define _COMPAT_IA32_IA32_SIGNAL_H
+#define _MC_IA32_HASSEGS 0x1
+#define _MC_IA32_HASBASES 0x2
+#define _MC_IA32_HASFPXSTATE 0x4
+#define _MC_IA32_FLAG_MASK \
+ (_MC_IA32_HASSEGS | _MC_IA32_HASBASES | _MC_IA32_HASFPXSTATE)
+
struct ia32_mcontext {
u_int32_t mc_onstack; /* XXX - sigcontext compat. */
u_int32_t mc_gs; /* machine state (struct trapframe) */
@@ -57,14 +63,16 @@ struct ia32_mcontext {
/* We use the same values for fpformat and ownedfp */
u_int32_t mc_fpformat;
u_int32_t mc_ownedfp;
- u_int32_t mc_spare1[1]; /* align next field to 16 bytes */
+ u_int32_t mc_flags;
/*
* See <i386/include/npx.h> for the internals of mc_fpstate[].
*/
u_int32_t mc_fpstate[128] __aligned(16);
u_int32_t mc_fsbase;
u_int32_t mc_gsbase;
- u_int32_t mc_spare2[6];
+ u_int32_t mc_xfpustate;
+ u_int32_t mc_xfpustate_len;
+ u_int32_t mc_spare2[4];
};
struct ia32_ucontext {
diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c
index 2549ecc..8129fe8 100644
--- a/sys/compat/linprocfs/linprocfs.c
+++ b/sys/compat/linprocfs/linprocfs.c
@@ -954,7 +954,7 @@ linprocfs_doproccmdline(PFS_FILL_ARGS)
PROC_UNLOCK(p);
- ret = proc_getargv(td, p, sb, ARG_MAX);
+ ret = proc_getargv(td, p, sb);
return (ret);
}
@@ -988,7 +988,7 @@ linprocfs_doprocenviron(PFS_FILL_ARGS)
PROC_UNLOCK(p);
- ret = proc_getenvv(td, p, sb, ARG_MAX);
+ ret = proc_getenvv(td, p, sb);
return (ret);
}
diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c
index ffa2282..0888e64 100644
--- a/sys/compat/linux/linux_file.c
+++ b/sys/compat/linux/linux_file.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1994-1995 Søren Schmidt
+ * Copyright (c) 1994-1995 Søren Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -1530,3 +1530,48 @@ linux_lchown(struct thread *td, struct linux_lchown_args *args)
LFREEPATH(path);
return (error);
}
+
+static int
+convert_fadvice(int advice)
+{
+ switch (advice) {
+ case LINUX_POSIX_FADV_NORMAL:
+ return (POSIX_FADV_NORMAL);
+ case LINUX_POSIX_FADV_RANDOM:
+ return (POSIX_FADV_RANDOM);
+ case LINUX_POSIX_FADV_SEQUENTIAL:
+ return (POSIX_FADV_SEQUENTIAL);
+ case LINUX_POSIX_FADV_WILLNEED:
+ return (POSIX_FADV_WILLNEED);
+ case LINUX_POSIX_FADV_DONTNEED:
+ return (POSIX_FADV_DONTNEED);
+ case LINUX_POSIX_FADV_NOREUSE:
+ return (POSIX_FADV_NOREUSE);
+ default:
+ return (-1);
+ }
+}
+
+int
+linux_fadvise64(struct thread *td, struct linux_fadvise64_args *args)
+{
+ int advice;
+
+ advice = convert_fadvice(args->advice);
+ if (advice == -1)
+ return (EINVAL);
+ return (kern_posix_fadvise(td, args->fd, args->offset, args->len,
+ advice));
+}
+
+int
+linux_fadvise64_64(struct thread *td, struct linux_fadvise64_64_args *args)
+{
+ int advice;
+
+ advice = convert_fadvice(args->advice);
+ if (advice == -1)
+ return (EINVAL);
+ return (kern_posix_fadvise(td, args->fd, args->offset, args->len,
+ advice));
+}
diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c
index 15e3136..0a9cd27 100644
--- a/sys/compat/linux/linux_ioctl.c
+++ b/sys/compat/linux/linux_ioctl.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1994-1995 Søren Schmidt
+ * Copyright (c) 1994-1995 Søren Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -2182,7 +2182,7 @@ linux_ifconf(struct thread *td, struct ifconf *uifc)
CURVNET_SET(TD_TO_VNET(td));
/* handle the 'request buffer size' case */
- if (ifc.ifc_buf == PTROUT(NULL)) {
+ if ((l_uintptr_t)ifc.ifc_buf == PTROUT(NULL)) {
ifc.ifc_len = 0;
IFNET_RLOCK();
TAILQ_FOREACH(ifp, &V_ifnet, if_link) {
diff --git a/sys/compat/linux/linux_ipc.c b/sys/compat/linux/linux_ipc.c
index f72a02d..1237edc 100644
--- a/sys/compat/linux/linux_ipc.c
+++ b/sys/compat/linux/linux_ipc.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1994-1995 Søren Schmidt
+ * Copyright (c) 1994-1995 Søren Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index e7e0525..dacfb69 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002 Doug Rabson
- * Copyright (c) 1994-1995 Søren Schmidt
+ * Copyright (c) 1994-1995 Søren Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/compat/linux/linux_signal.c b/sys/compat/linux/linux_signal.c
index 5f70765..1c778f9 100644
--- a/sys/compat/linux/linux_signal.c
+++ b/sys/compat/linux/linux_signal.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1994-1995 Søren Schmidt
+ * Copyright (c) 1994-1995 Søren Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c
index 431c5b9..d8fcd2d 100644
--- a/sys/compat/linux/linux_socket.c
+++ b/sys/compat/linux/linux_socket.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1995 Søren Schmidt
+ * Copyright (c) 1995 Søren Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c
index 90f860d..bea7747 100644
--- a/sys/compat/linux/linux_stats.c
+++ b/sys/compat/linux/linux_stats.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1994-1995 Søren Schmidt
+ * Copyright (c) 1994-1995 Søren Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/compat/ndis/subr_ntoskrnl.c b/sys/compat/ndis/subr_ntoskrnl.c
index b57145c..863e35e 100644
--- a/sys/compat/ndis/subr_ntoskrnl.c
+++ b/sys/compat/ndis/subr_ntoskrnl.c
@@ -3016,10 +3016,7 @@ RtlSecureZeroMemory(dst, len)
}
static void
-RtlFillMemory(dst, len, c)
- void *dst;
- size_t len;
- uint8_t c;
+RtlFillMemory(void *dst, size_t len, uint8_t c)
{
memset(dst, c, len);
}
diff --git a/sys/compat/svr4/imgact_svr4.c b/sys/compat/svr4/imgact_svr4.c
index 676acff..9b19ec3 100644
--- a/sys/compat/svr4/imgact_svr4.c
+++ b/sys/compat/svr4/imgact_svr4.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 1998 Mark Newton
- * Copyright (c) 1994-1996 Søren Schmidt
+ * Copyright (c) 1994-1996 Søren Schmidt
* All rights reserved.
*
* Based heavily on /sys/kern/imgact_aout.c which is:
diff --git a/sys/conf/NOTES b/sys/conf/NOTES
index 1a4c78d..af351fa 100644
--- a/sys/conf/NOTES
+++ b/sys/conf/NOTES
@@ -916,6 +916,8 @@ device lagg
# for sockets with the SO_DEBUG option set, which can then be examined
# using the trpt(8) utility.
#
+# RADIX_MPATH provides support for equal-cost multi-path routing.
+#
options MROUTING # Multicast routing
options IPFIREWALL #firewall
options IPFIREWALL_VERBOSE #enable logging to syslogd(8)
@@ -930,6 +932,7 @@ options IPFILTER_LOOKUP #ipfilter pools
options IPFILTER_DEFAULT_BLOCK #block all packets by default
options IPSTEALTH #support for stealth forwarding
options TCPDEBUG
+options RADIX_MPATH
# The MBUF_STRESS_TEST option enables options which create
# various random failures / extreme cases related to mbuf
@@ -1294,6 +1297,7 @@ device targ #SCSI Target Mode Code
device targbh #SCSI Target Mode Blackhole Device
device pass #CAM passthrough driver
device sg #Linux SCSI passthrough
+device ctl #CAM Target Layer
# CAM OPTIONS:
# debugging options:
diff --git a/sys/conf/files b/sys/conf/files
index 47857a6..85c87b0 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -50,11 +50,6 @@ aic79xx_reg_print.c optional ahd pci \
aic79xx_reg_print.o optional ahd pci ahd_reg_pretty_print \
compile-with "${NORMAL_C}" \
no-implicit-rule local
-emu10k1-alsa%diked.h optional snd_emu10k1 | snd_emu10kx \
- dependency "$S/tools/sound/emu10k1-mkalsa.sh $S/gnu/dev/sound/pci/emu10k1-alsa.h" \
- compile-with "CC='${CC}' AWK=${AWK} sh $S/tools/sound/emu10k1-mkalsa.sh $S/gnu/dev/sound/pci/emu10k1-alsa.h emu10k1-alsa%diked.h" \
- no-obj no-implicit-rule before-depend \
- clean "emu10k1-alsa%diked.h"
#
# The 'fdt_dtb_file' target covers an actual DTB file name, which is derived
# from the specified source (DTS) file: <platform>.dts -> <platform>.dtb
@@ -67,16 +62,6 @@ fdt_static_dtb.h optional fdt fdt_dtb_static \
compile-with "sh $S/tools/fdt/make_dtbh.sh ${FDT_DTS_FILE} ." \
no-obj no-implicit-rule before-depend \
clean "fdt_static_dtb.h"
-p16v-alsa%diked.h optional snd_emu10kx pci \
- dependency "$S/tools/sound/emu10k1-mkalsa.sh $S/gnu/dev/sound/pci/p16v-alsa.h" \
- compile-with "CC='${CC}' AWK=${AWK} sh $S/tools/sound/emu10k1-mkalsa.sh $S/gnu/dev/sound/pci/p16v-alsa.h p16v-alsa%diked.h" \
- no-obj no-implicit-rule before-depend \
- clean "p16v-alsa%diked.h"
-p17v-alsa%diked.h optional snd_emu10kx pci \
- dependency "$S/tools/sound/emu10k1-mkalsa.sh $S/gnu/dev/sound/pci/p17v-alsa.h" \
- compile-with "CC='${CC}' AWK=${AWK} sh $S/tools/sound/emu10k1-mkalsa.sh $S/gnu/dev/sound/pci/p17v-alsa.h p17v-alsa%diked.h" \
- no-obj no-implicit-rule before-depend \
- clean "p17v-alsa%diked.h"
feeder_eq_gen.h optional sound \
dependency "$S/tools/sound/feeder_eq_mkfilter.awk" \
compile-with "${AWK} -f $S/tools/sound/feeder_eq_mkfilter.awk -- ${FEEDER_EQ_PRESETS} > feeder_eq_gen.h" \
@@ -130,6 +115,19 @@ cam/scsi/scsi_all.c optional scbus
cam/scsi/scsi_cd.c optional cd
cam/scsi/scsi_ch.c optional ch
cam/ata/ata_da.c optional ada | da
+cam/ctl/ctl.c optional ctl
+cam/ctl/ctl_backend.c optional ctl
+cam/ctl/ctl_backend_block.c optional ctl
+cam/ctl/ctl_backend_ramdisk.c optional ctl
+cam/ctl/ctl_cmd_table.c optional ctl
+cam/ctl/ctl_frontend.c optional ctl
+cam/ctl/ctl_frontend_cam_sim.c optional ctl
+cam/ctl/ctl_frontend_internal.c optional ctl
+cam/ctl/ctl_mem_pool.c optional ctl
+cam/ctl/ctl_scsi_all.c optional ctl
+cam/ctl/ctl_error.c optional ctl
+cam/ctl/ctl_util.c optional ctl
+cam/ctl/scsi_ctl.c optional ctl
cam/scsi/scsi_da.c optional da
cam/scsi/scsi_low.c optional ct | ncv | nsp | stg
cam/scsi/scsi_low_pisa.c optional ct | ncv | nsp | stg
@@ -282,6 +280,7 @@ contrib/dev/acpica/tables/tbinstal.c optional acpi
contrib/dev/acpica/tables/tbutils.c optional acpi
contrib/dev/acpica/tables/tbxface.c optional acpi
contrib/dev/acpica/tables/tbxfroot.c optional acpi
+contrib/dev/acpica/utilities/utaddress.c optional acpi
contrib/dev/acpica/utilities/utalloc.c optional acpi
contrib/dev/acpica/utilities/utcache.c optional acpi
contrib/dev/acpica/utilities/utcopy.c optional acpi
@@ -304,7 +303,7 @@ contrib/dev/acpica/utilities/utxface.c optional acpi
contrib/dev/acpica/utilities/utxferror.c optional acpi
#contrib/dev/acpica/utilities/utxfmutex.c optional acpi
contrib/ipfilter/netinet/fil.c optional ipfilter inet \
- compile-with "${NORMAL_C} -I$S/contrib/ipfilter"
+ compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN} -I$S/contrib/ipfilter"
contrib/ipfilter/netinet/ip_auth.c optional ipfilter inet \
compile-with "${NORMAL_C} -I$S/contrib/ipfilter"
contrib/ipfilter/netinet/ip_fil_freebsd.c optional ipfilter inet \
@@ -316,11 +315,11 @@ contrib/ipfilter/netinet/ip_log.c optional ipfilter inet \
contrib/ipfilter/netinet/ip_nat.c optional ipfilter inet \
compile-with "${NORMAL_C} -I$S/contrib/ipfilter"
contrib/ipfilter/netinet/ip_proxy.c optional ipfilter inet \
- compile-with "${NORMAL_C} -I$S/contrib/ipfilter"
+ compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN} -I$S/contrib/ipfilter"
contrib/ipfilter/netinet/ip_state.c optional ipfilter inet \
compile-with "${NORMAL_C} -I$S/contrib/ipfilter"
contrib/ipfilter/netinet/ip_lookup.c optional ipfilter inet \
- compile-with "${NORMAL_C} -Wno-error -I$S/contrib/ipfilter"
+ compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN} -Wno-error -I$S/contrib/ipfilter"
contrib/ipfilter/netinet/ip_pool.c optional ipfilter inet \
compile-with "${NORMAL_C} -I$S/contrib/ipfilter"
contrib/ipfilter/netinet/ip_htable.c optional ipfilter inet \
@@ -508,8 +507,10 @@ dev/aic/aic.c optional aic
dev/aic/aic_pccard.c optional aic pccard
dev/aic7xxx/ahc_eisa.c optional ahc eisa
dev/aic7xxx/ahc_isa.c optional ahc isa
-dev/aic7xxx/ahc_pci.c optional ahc pci
-dev/aic7xxx/ahd_pci.c optional ahd pci
+dev/aic7xxx/ahc_pci.c optional ahc pci \
+ compile-with "${NORMAL_C} ${NO_WCONSTANT_CONVERSION}"
+dev/aic7xxx/ahd_pci.c optional ahd pci \
+ compile-with "${NORMAL_C} ${NO_WCONSTANT_CONVERSION}"
dev/aic7xxx/aic7770.c optional ahc
dev/aic7xxx/aic79xx.c optional ahd pci
dev/aic7xxx/aic79xx_osm.c optional ahd pci
@@ -529,7 +530,8 @@ dev/an/if_an.c optional an
dev/an/if_an_isa.c optional an isa
dev/an/if_an_pccard.c optional an pccard
dev/an/if_an_pci.c optional an pci
-dev/asr/asr.c optional asr pci
+dev/asr/asr.c optional asr pci \
+ compile-with "${NORMAL_C} ${NO_WARRAY_BOUNDS}"
#
dev/ata/ata_if.m optional ata | atacore
dev/ata/ata-all.c optional ata | atacore
@@ -585,6 +587,8 @@ dev/ath/if_ath_debug.c optional ath \
compile-with "${NORMAL_C} -I$S/dev/ath"
dev/ath/if_ath_keycache.c optional ath \
compile-with "${NORMAL_C} -I$S/dev/ath"
+dev/ath/if_ath_led.c optional ath \
+ compile-with "${NORMAL_C} -I$S/dev/ath"
dev/ath/if_ath_tx.c optional ath \
compile-with "${NORMAL_C} -I$S/dev/ath"
dev/ath/if_ath_tx_ht.c optional ath \
@@ -610,7 +614,7 @@ dev/ath/ath_hal/ah_eeprom_9287.c \
optional ath_hal | ath_ar9287 \
compile-with "${NORMAL_C} -I$S/dev/ath"
dev/ath/ath_hal/ah_regdomain.c optional ath \
- compile-with "${NORMAL_C} -I$S/dev/ath"
+ compile-with "${NORMAL_C} ${NO_WSHIFT_COUNT_NEGATIVE} ${NO_WSHIFT_COUNT_OVERFLOW} -I$S/dev/ath"
# ar5210
dev/ath/ath_hal/ar5210/ar5210_attach.c optional ath_hal | ath_ar5210 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
@@ -987,15 +991,18 @@ dev/drm/mga_irq.c optional mgadrm
dev/drm/mga_state.c optional mgadrm \
compile-with "${NORMAL_C} -finline-limit=13500"
dev/drm/mga_warp.c optional mgadrm
-dev/drm/r128_cce.c optional r128drm
+dev/drm/r128_cce.c optional r128drm \
+ compile-with "${NORMAL_C} ${NO_WUNUSED_VALUE} ${NO_WCONSTANT_CONVERSION}"
dev/drm/r128_drv.c optional r128drm
dev/drm/r128_irq.c optional r128drm
dev/drm/r128_state.c optional r128drm \
- compile-with "${NORMAL_C} -finline-limit=13500"
+ compile-with "${NORMAL_C} ${NO_WUNUSED_VALUE} -finline-limit=13500"
dev/drm/r300_cmdbuf.c optional radeondrm
dev/drm/r600_blit.c optional radeondrm
-dev/drm/r600_cp.c optional radeondrm
-dev/drm/radeon_cp.c optional radeondrm
+dev/drm/r600_cp.c optional radeondrm \
+ compile-with "${NORMAL_C} ${NO_WUNUSED_VALUE} ${NO_WCONSTANT_CONVERSION}"
+dev/drm/radeon_cp.c optional radeondrm \
+ compile-with "${NORMAL_C} ${NO_WUNUSED_VALUE} ${NO_WCONSTANT_CONVERSION}"
dev/drm/radeon_cs.c optional radeondrm
dev/drm/radeon_drv.c optional radeondrm
dev/drm/radeon_irq.c optional radeondrm
@@ -1514,17 +1521,25 @@ dev/ncv/ncr53c500.c optional ncv
dev/ncv/ncr53c500_pccard.c optional ncv pccard
dev/netmap/netmap.c optional netmap
dev/nge/if_nge.c optional nge
-dev/nxge/if_nxge.c optional nxge
-dev/nxge/xgehal/xgehal-device.c optional nxge
+dev/nxge/if_nxge.c optional nxge \
+ compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN}"
+dev/nxge/xgehal/xgehal-device.c optional nxge \
+ compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN}"
dev/nxge/xgehal/xgehal-mm.c optional nxge
dev/nxge/xgehal/xge-queue.c optional nxge
-dev/nxge/xgehal/xgehal-driver.c optional nxge
-dev/nxge/xgehal/xgehal-ring.c optional nxge
-dev/nxge/xgehal/xgehal-channel.c optional nxge
-dev/nxge/xgehal/xgehal-fifo.c optional nxge
-dev/nxge/xgehal/xgehal-stats.c optional nxge
+dev/nxge/xgehal/xgehal-driver.c optional nxge \
+ compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN}"
+dev/nxge/xgehal/xgehal-ring.c optional nxge \
+ compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN}"
+dev/nxge/xgehal/xgehal-channel.c optional nxge \
+ compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN}"
+dev/nxge/xgehal/xgehal-fifo.c optional nxge \
+ compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN}"
+dev/nxge/xgehal/xgehal-stats.c optional nxge \
+ compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN}"
dev/nxge/xgehal/xgehal-config.c optional nxge
-dev/nxge/xgehal/xgehal-mgmt.c optional nxge
+dev/nxge/xgehal/xgehal-mgmt.c optional nxge \
+ compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN}"
dev/nmdm/nmdm.c optional nmdm
dev/nsp/nsp.c optional nsp
dev/nsp/nsp_pccard.c optional nsp pccard
@@ -1716,30 +1731,17 @@ dev/sound/pci/csa.c optional snd_csa pci \
warning "kernel contains GPL contaminated csaimg.h header"
dev/sound/pci/csapcm.c optional snd_csa pci
dev/sound/pci/ds1.c optional snd_ds1 pci
-dev/sound/pci/emu10k1.c optional snd_emu10k1 pci \
- dependency "emu10k1-alsa%diked.h" \
- warning "kernel contains GPL contaminated emu10k1 headers"
-dev/sound/pci/emu10kx.c optional snd_emu10kx pci \
- dependency "emu10k1-alsa%diked.h" \
- dependency "p16v-alsa%diked.h" \
- dependency "p17v-alsa%diked.h" \
- warning "kernel contains GPL contaminated emu10kx headers"
-dev/sound/pci/emu10kx-pcm.c optional snd_emu10kx pci \
- dependency "emu10k1-alsa%diked.h" \
- dependency "p16v-alsa%diked.h" \
- dependency "p17v-alsa%diked.h" \
- warning "kernel contains GPL contaminated emu10kx headers"
-dev/sound/pci/emu10kx-midi.c optional snd_emu10kx pci \
- dependency "emu10k1-alsa%diked.h" \
- warning "kernel contains GPL contaminated emu10kx headers"
+dev/sound/pci/emu10k1.c optional snd_emu10k1 pci
+dev/sound/pci/emu10kx.c optional snd_emu10kx pci
+dev/sound/pci/emu10kx-pcm.c optional snd_emu10kx pci
+dev/sound/pci/emu10kx-midi.c optional snd_emu10kx pci
dev/sound/pci/envy24.c optional snd_envy24 pci
dev/sound/pci/envy24ht.c optional snd_envy24ht pci
dev/sound/pci/es137x.c optional snd_es137x pci
dev/sound/pci/fm801.c optional snd_fm801 pci
dev/sound/pci/ich.c optional snd_ich pci
dev/sound/pci/maestro.c optional snd_maestro pci
-dev/sound/pci/maestro3.c optional snd_maestro3 pci \
- warning "kernel contains GPL contaminated maestro3 headers"
+dev/sound/pci/maestro3.c optional snd_maestro3 pci
dev/sound/pci/neomagic.c optional snd_neomagic pci
dev/sound/pci/solo.c optional snd_solo pci
dev/sound/pci/spicds.c optional snd_spicds pci
@@ -1747,7 +1749,11 @@ dev/sound/pci/t4dwave.c optional snd_t4dwave pci
dev/sound/pci/via8233.c optional snd_via8233 pci
dev/sound/pci/via82c686.c optional snd_via82c686 pci
dev/sound/pci/vibes.c optional snd_vibes pci
+dev/sound/pci/hda/hdaa.c optional snd_hda pci
+dev/sound/pci/hda/hdaa_patches.c optional snd_hda pci
dev/sound/pci/hda/hdac.c optional snd_hda pci
+dev/sound/pci/hda/hdac_if.m optional snd_hda pci
+dev/sound/pci/hda/hdacc.c optional snd_hda pci
dev/sound/pcm/ac97.c optional sound
dev/sound/pcm/ac97_if.m optional sound
dev/sound/pcm/ac97_patch.c optional sound
@@ -2252,6 +2258,22 @@ geom/raid3/g_raid3.c optional geom_raid3
geom/raid3/g_raid3_ctl.c optional geom_raid3
geom/shsec/g_shsec.c optional geom_shsec
geom/stripe/g_stripe.c optional geom_stripe
+geom/uncompress/g_uncompress.c optional geom_uncompress
+contrib/xz-embedded/freebsd/xz_malloc.c \
+ optional xz_embedded | geom_uncompress \
+ compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/"
+contrib/xz-embedded/linux/lib/xz/xz_crc32.c \
+ optional xz_embedded | geom_uncompress \
+ compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/"
+contrib/xz-embedded/linux/lib/xz/xz_dec_bcj.c \
+ optional xz_embedded | geom_uncompress \
+ compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/"
+contrib/xz-embedded/linux/lib/xz/xz_dec_lzma2.c \
+ optional xz_embedded | geom_uncompress \
+ compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/"
+contrib/xz-embedded/linux/lib/xz/xz_dec_stream.c \
+ optional xz_embedded | geom_uncompress \
+ compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/"
geom/uzip/g_uzip.c optional geom_uzip
geom/virstor/binstream.c optional geom_virstor
geom/virstor/g_virstor.c optional geom_virstor
@@ -2379,8 +2401,9 @@ kern/sched_ule.c optional sched_ule
kern/serdev_if.m standard
kern/stack_protector.c standard \
compile-with "${NORMAL_C:N-fstack-protector*}"
-kern/subr_acl_nfs4.c standard
-kern/subr_acl_posix1e.c standard
+# XXX subr_acl_nfs4.c is also used by ZFS
+kern/subr_acl_nfs4.c optional ufs_acl
+kern/subr_acl_posix1e.c optional ufs_acl
kern/subr_autoconf.c standard
kern/subr_blist.c standard
kern/subr_bus.c standard
@@ -2530,27 +2553,25 @@ libkern/bcd.c standard
libkern/bsearch.c standard
libkern/crc32.c standard
libkern/fnmatch.c standard
-libkern/gets.c standard
libkern/iconv.c optional libiconv
libkern/iconv_converter_if.m optional libiconv
libkern/iconv_ucs.c optional libiconv
libkern/iconv_xlat.c optional libiconv
libkern/iconv_xlat16.c optional libiconv
-libkern/index.c standard
libkern/inet_aton.c standard
libkern/inet_ntoa.c standard
libkern/inet_ntop.c standard
libkern/inet_pton.c standard
libkern/mcount.c optional profiling-routine
+libkern/memcchr.c standard
libkern/memcmp.c standard
libkern/qsort.c standard
libkern/qsort_r.c standard
libkern/random.c standard
-libkern/rindex.c standard
libkern/scanc.c standard
-libkern/skpc.c standard
libkern/strcasecmp.c standard
libkern/strcat.c standard
+libkern/strchr.c standard
libkern/strcmp.c standard
libkern/strcpy.c standard
libkern/strcspn.c standard
@@ -2561,6 +2582,7 @@ libkern/strlen.c standard
libkern/strncmp.c standard
libkern/strncpy.c standard
libkern/strnlen.c standard
+libkern/strrchr.c standard
libkern/strsep.c standard
libkern/strspn.c standard
libkern/strstr.c standard
@@ -2623,7 +2645,7 @@ net/slcompress.c optional netgraph_vjc | sppp | \
net/vnet.c optional vimage
net/zlib.c optional crypto | geom_uzip | ipsec | \
mxge | netgraph_deflate | \
- ddb_ctf | gzio
+ ddb_ctf | gzio | geom_uncompress
net80211/ieee80211.c optional wlan
net80211/ieee80211_acl.c optional wlan wlan_acl
net80211/ieee80211_action.c optional wlan
@@ -3471,7 +3493,7 @@ gnu/fs/xfs/FreeBSD/xfs_sysctl.c optional xfs \
gnu/fs/xfs/FreeBSD/xfs_fs_subr.c optional xfs \
compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
gnu/fs/xfs/FreeBSD/xfs_ioctl.c optional xfs \
- compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+ compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
gnu/fs/xfs/FreeBSD/support/debug.c optional xfs \
compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
gnu/fs/xfs/FreeBSD/support/ktrace.c optional xfs \
diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64
index 37c913c..e8c7947 100644
--- a/sys/conf/files.amd64
+++ b/sys/conf/files.amd64
@@ -58,6 +58,10 @@ os+%DIKED-nve.h optional nve pci \
no-implicit-rule no-obj before-depend \
clean "os+%DIKED-nve.h"
#
+hpt27xx_lib.o optional hpt27xx \
+ dependency "$S/dev/hpt27xx/amd64-elf.hpt27xx_lib.o.uu" \
+ compile-with "uudecode < $S/dev/hpt27xx/amd64-elf.hpt27xx_lib.o.uu" \
+ no-implicit-rule
hptmvraid.o optional hptmv \
dependency "$S/dev/hptmv/amd64-elf.raid.o.uu" \
compile-with "uudecode < $S/dev/hptmv/amd64-elf.raid.o.uu" \
@@ -120,6 +124,7 @@ amd64/amd64/mp_watchdog.c optional mp_watchdog smp
amd64/amd64/mpboot.S optional smp
amd64/amd64/pmap.c standard
amd64/amd64/prof_machdep.c optional profiling-routine
+amd64/amd64/ptrace_machdep.c standard
amd64/amd64/sigtramp.S standard
amd64/amd64/stack_machdep.c optional ddb | stack
amd64/amd64/support.S standard
@@ -187,6 +192,9 @@ dev/fdc/fdc.c optional fdc
dev/fdc/fdc_acpi.c optional fdc
dev/fdc/fdc_isa.c optional fdc isa
dev/fdc/fdc_pccard.c optional fdc pccard
+dev/hpt27xx/os_bsd.c optional hpt27xx
+dev/hpt27xx/osm_bsd.c optional hpt27xx
+dev/hpt27xx/hpt27xx_config.c optional hpt27xx
dev/hptmv/entry.c optional hptmv
dev/hptmv/mv.c optional hptmv
dev/hptmv/gui_lib.c optional hptmv
@@ -208,6 +216,7 @@ dev/lindev/lindev.c optional lindev
dev/nfe/if_nfe.c optional nfe pci
dev/nve/if_nve.c optional nve pci
dev/nvram/nvram.c optional nvram isa
+dev/random/nehemiah.c optional random
dev/qlxgb/qla_dbg.c optional qlxgb pci
dev/qlxgb/qla_hw.c optional qlxgb pci
dev/qlxgb/qla_ioctl.c optional qlxgb pci
@@ -260,6 +269,7 @@ dev/tpm/tpm.c optional tpm
dev/tpm/tpm_acpi.c optional tpm acpi
dev/tpm/tpm_isa.c optional tpm isa
dev/uart/uart_cpu_amd64.c optional uart
+dev/viawd/viawd.c optional viawd
dev/wpi/if_wpi.c optional wpi
dev/isci/isci.c optional isci
dev/isci/isci_controller.c optional isci
diff --git a/sys/conf/files.i386 b/sys/conf/files.i386
index 4fa6a40..3056a87 100644
--- a/sys/conf/files.i386
+++ b/sys/conf/files.i386
@@ -57,6 +57,10 @@ os+%DIKED-nve.h optional nve pci \
no-implicit-rule no-obj before-depend \
clean "os+%DIKED-nve.h"
#
+hpt27xx_lib.o optional hpt27xx \
+ dependency "$S/dev/hpt27xx/i386-elf.hpt27xx_lib.o.uu" \
+ compile-with "uudecode < $S/dev/hpt27xx/i386-elf.hpt27xx_lib.o.uu" \
+ no-implicit-rule
hptmvraid.o optional hptmv \
dependency "$S/dev/hptmv/i386-elf.raid.o.uu" \
compile-with "uudecode < $S/dev/hptmv/i386-elf.raid.o.uu" \
@@ -144,7 +148,8 @@ dev/atkbdc/atkbdc_subr.c optional atkbdc
dev/atkbdc/psm.c optional psm atkbdc
dev/ce/ceddk.c optional ce
dev/ce/if_ce.c optional ce
-dev/ce/tau32-ddk.c optional ce
+dev/ce/tau32-ddk.c optional ce \
+ compile-with "${NORMAL_C} ${NO_WCONSTANT_CONVERSION}"
dev/cm/if_cm_isa.c optional cm isa
dev/coretemp/coretemp.c optional coretemp
dev/cp/cpddk.c optional cp
@@ -174,6 +179,9 @@ dev/fe/if_fe_isa.c optional fe isa
dev/glxiic/glxiic.c optional glxiic
dev/glxsb/glxsb.c optional glxsb
dev/glxsb/glxsb_hash.c optional glxsb
+dev/hpt27xx/os_bsd.c optional hpt27xx
+dev/hpt27xx/osm_bsd.c optional hpt27xx
+dev/hpt27xx/hpt27xx_config.c optional hpt27xx
dev/hptmv/entry.c optional hptmv
dev/hptmv/mv.c optional hptmv
dev/hptmv/gui_lib.c optional hptmv
@@ -236,6 +244,7 @@ dev/tpm/tpm.c optional tpm
dev/tpm/tpm_acpi.c optional tpm acpi
dev/tpm/tpm_isa.c optional tpm isa
dev/uart/uart_cpu_i386.c optional uart
+dev/viawd/viawd.c optional viawd
dev/acpica/acpi_if.m standard
dev/acpi_support/acpi_wmi_if.m standard
dev/wpi/if_wpi.c optional wpi
diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk
index 9537e70..d561aae 100644
--- a/sys/conf/kern.mk
+++ b/sys/conf/kern.mk
@@ -6,11 +6,29 @@
CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
-Wundef -Wno-pointer-sign -fformat-extensions \
- -Wmissing-include-dirs -fdiagnostics-show-option
+ -Wmissing-include-dirs -fdiagnostics-show-option \
+ ${CWARNEXTRA}
#
# The following flags are next up for working on:
# -Wextra
+# Disable a few warnings for clang, since there are several places in the
+# kernel where fixing them is more trouble than it is worth, or where there is
+# a false positive.
+.if ${CC:T:Mclang} == "clang"
+NO_WCONSTANT_CONVERSION= -Wno-constant-conversion
+NO_WARRAY_BOUNDS= -Wno-array-bounds
+NO_WSHIFT_COUNT_NEGATIVE= -Wno-shift-count-negative
+NO_WSHIFT_COUNT_OVERFLOW= -Wno-shift-count-overflow
+NO_WUNUSED_VALUE= -Wno-unused-value
+NO_WSELF_ASSIGN= -Wno-self-assign
+# Several other warnings which might be useful in some cases, but not severe
+# enough to error out the whole kernel build. Display them anyway, so there is
+# some incentive to fix them eventually.
+CWARNEXTRA?= -Wno-error-tautological-compare -Wno-error-empty-body \
+ -Wno-error-parentheses-equality
+.endif
+
#
# On i386, do not align the stack to 16-byte boundaries. Otherwise GCC 2.95
# and above adds code to the entry and exit point of every function to align the
@@ -54,7 +72,8 @@ INLINE_LIMIT?= 15000
.endif
#
-# For sparc64 we want medlow code model, and we tell gcc to use floating
+# For sparc64 we want the medany code model so modules may be located
+# anywhere in the 64-bit address space. We also tell GCC to use floating
# point emulation. This avoids using floating point registers for integer
# operations which it has a tendency to do.
#
diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk
index 6fff65c..a209ddd 100644
--- a/sys/conf/kern.pre.mk
+++ b/sys/conf/kern.pre.mk
@@ -34,8 +34,12 @@ _MINUS_O= -O2
.endif
.endif
.if ${MACHINE_CPUARCH} == "amd64"
+.if ${CC:T:Mclang} != "clang"
COPTFLAGS?=-O2 -frename-registers -pipe
.else
+COPTFLAGS?=-O2 -pipe
+.endif
+.else
COPTFLAGS?=${_MINUS_O} -pipe
.endif
.if !empty(COPTFLAGS:M-O[23s]) && empty(COPTFLAGS:M-fno-strict-aliasing)
@@ -67,10 +71,10 @@ INCLUDES+= -I$S/dev/ath -I$S/dev/ath/ath_hal
# ... and the same for the NgATM stuff
INCLUDES+= -I$S/contrib/ngatm
-# .. and the same for twa
+# ... and the same for twa
INCLUDES+= -I$S/dev/twa
-# ... and XFS
+# ... and the same for XFS
INCLUDES+= -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs
# ... and the same for cxgb and cxgbe
diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk
index 7bf7643..a0abbfc 100644
--- a/sys/conf/kmod.mk
+++ b/sys/conf/kmod.mk
@@ -340,11 +340,13 @@ CFLAGS+= ${CONF_CFLAGS}
MFILES?= dev/acpica/acpi_if.m dev/acpi_support/acpi_wmi_if.m \
dev/agp/agp_if.m dev/ata/ata_if.m dev/eisa/eisa_if.m \
+ dev/gpio/gpio_if.m dev/gpio/gpiobus_if.m \
dev/iicbus/iicbb_if.m dev/iicbus/iicbus_if.m \
dev/mmc/mmcbr_if.m dev/mmc/mmcbus_if.m \
dev/mii/miibus_if.m dev/mvs/mvs_if.m dev/ofw/ofw_bus_if.m \
dev/pccard/card_if.m dev/pccard/power_if.m dev/pci/pci_if.m \
dev/pci/pcib_if.m dev/ppbus/ppbus_if.m dev/smbus/smbus_if.m \
+ dev/sound/pci/hda/hdac_if.m \
dev/sound/pcm/ac97_if.m dev/sound/pcm/channel_if.m \
dev/sound/pcm/feeder_if.m dev/sound/pcm/mixer_if.m \
dev/sound/midi/mpu_if.m dev/sound/midi/mpufoi_if.m \
diff --git a/sys/conf/ldscript.powerpc64 b/sys/conf/ldscript.powerpc64
index a3bd1ff..fafce7b 100644
--- a/sys/conf/ldscript.powerpc64
+++ b/sys/conf/ldscript.powerpc64
@@ -1,7 +1,7 @@
/* $FreeBSD$ */
OUTPUT_FORMAT("elf64-powerpc", "elf64-powerpc", "elf64-powerpc")
-OUTPUT_ARCH(powerpc)
+OUTPUT_ARCH(powerpc:common64)
ENTRY(__start)
SEARCH_DIR(/usr/lib);
PROVIDE (__stack = 0);
@@ -56,15 +56,19 @@ SECTIONS
.sdata2 : { *(.sdata2) }
.sbss2 : { *(.sbss2) }
/* Adjust the address for the data segment to the next page up. */
- . = ((. + 0x1000) & ~(0x1000 - 1));
+ . = ALIGN(4096);
.data :
{
*(.data)
*(.gnu.linkonce.d*)
CONSTRUCTORS
}
- .data1 : { *(.data1) }
- .got1 : { *(.got1) }
+ .data1 : { *(.data1) }
+ .toc1 : ALIGN(8) { *(.toc1) }
+ .opd : ALIGN(8) { KEEP (*(.opd)) }
+ .branch_lt : ALIGN(8) { *(.branch_lt) }
+ .got : ALIGN(8) { *(.got .toc) }
+
.dynamic : { *(.dynamic) }
/* Put .ctors and .dtors next to the .got2 section, so that the pointers
get relocated with -mrelocatable. Also put in the .fixup pointers.
@@ -81,10 +85,6 @@ SECTIONS
.fixup : { *(.fixup) }
PROVIDE (_FIXUP_END_ = .);
PROVIDE (_GOT2_END_ = .);
- PROVIDE (_GOT_START_ = .);
- .got : { *(.got) }
- .got.plt : { *(.got.plt) }
- PROVIDE (_GOT_END_ = .);
/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
diff --git a/sys/conf/options b/sys/conf/options
index 12dbc81..5cbb0d3 100644
--- a/sys/conf/options
+++ b/sys/conf/options
@@ -112,6 +112,7 @@ GEOM_RAID3 opt_geom.h
GEOM_SHSEC opt_geom.h
GEOM_STRIPE opt_geom.h
GEOM_SUNLABEL opt_geom.h
+GEOM_UNCOMPRESS opt_geom.h
GEOM_UZIP opt_geom.h
GEOM_VIRSTOR opt_geom.h
GEOM_VOL opt_geom.h
@@ -898,6 +899,7 @@ RCTL opt_global.h
# At least one of the AR71XX ubiquiti boards has a Redboot configuration
# that "lies" about the amount of RAM it has. Until a cleaner method is
# defined, this option will suffice in overriding what Redboot says.
-AR71XX_REALMEM opt_global.h
-AR71XX_ENV_UBOOT opt_global.h
-AR71XX_ENV_REDBOOT opt_global.h
+AR71XX_REALMEM opt_ar71xx.h
+AR71XX_ENV_UBOOT opt_ar71xx.h
+AR71XX_ENV_REDBOOT opt_ar71xx.h
+AR71XX_ATH_EEPROM opt_ar71xx.h
diff --git a/sys/contrib/dev/acpica/changes.txt b/sys/contrib/dev/acpica/changes.txt
index 2e64a90..3271b2b 100644
--- a/sys/contrib/dev/acpica/changes.txt
+++ b/sys/contrib/dev/acpica/changes.txt
@@ -1,8 +1,56 @@
----------------------------------------
-23 November 2011. Summary of changes for version 20111123:
+11 January 2012. Summary of changes for version 20120111:
+
+This release is available at www.acpica.org/downloads.
+The ACPI 5.0 specification is available at www.acpi.info.
+
+1) ACPICA Core Subsystem:
+
+Implemented a new mechanism to allow host device drivers to check for address
+range conflicts with ACPI Operation Regions. Both SystemMemory and SystemIO
+address spaces are supported. A new external interface, AcpiCheckAddressRange,
+allows drivers to check an address range against the ACPI namespace. See the
+ACPICA reference for additional details. Adds one new file,
+utilities/utaddress.c. Lin Ming, Bob Moore.
+
+Fixed several issues with the ACPI 5.0 FADT support: Add the sleep Control and
+Status registers, update the ACPI 5.0 flags, and update internal data
+structures to handle an FADT larger than 256 bytes. The size of the ACPI 5.0
+FADT is 268 bytes.
+
+Updated all ACPICA copyrights and signons to 2012. Added the 2012 copyright to
+all module headers and signons, including the standard Linux header. This
+affects virtually every file in the ACPICA core subsystem, iASL compiler, and
+all ACPICA utilities.
+
+Example Code and Data Size: These are the sizes for the OS-independent
+acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The debug
+version of the code includes the debug output trace mechanism and has a much
+larger code and data size.
-This release is available at www.acpica.org/downloads
-The ACPI 5.0 specification is available at www.acpi.info
+ Previous Release:
+ Non-Debug Version: 92.3K Code, 24.9K Data, 117.2K Total
+ Debug Version: 170.8K Code, 72.6K Data, 243.4K Total
+ Current Release:
+ Non-Debug Version: 92.8K Code, 24.9K Data, 117.7K Total
+ Debug Version: 171.7K Code, 72.9K Data, 244.5K Total
+
+
+2) iASL Compiler/Disassembler and Tools:
+
+Disassembler: fixed a problem with the automatic resource tag generation
+support. Fixes a problem where the resource tags are inadvertently not
+constructed if the table being disassembled contains external references to
+control methods. Moved the actual construction of the tags to after the final
+namespace is constructed (after 2nd parse is invoked due to external control
+method references.) ACPICA BZ 941.
+
+Table Compiler: Make all "generic" operators caseless. These are the operators
+like UINT8, String, etc. Making these caseless improves ease-of-use. ACPICA BZ
+934.
+
+----------------------------------------
+23 November 2011. Summary of changes for version 20111123:
0) ACPI 5.0 Support:
diff --git a/sys/contrib/dev/acpica/common/adfile.c b/sys/contrib/dev/acpica/common/adfile.c
index ecb1dca..50ebffd 100644
--- a/sys/contrib/dev/acpica/common/adfile.c
+++ b/sys/contrib/dev/acpica/common/adfile.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/common/adisasm.c b/sys/contrib/dev/acpica/common/adisasm.c
index 365b323..aff3373 100644
--- a/sys/contrib/dev/acpica/common/adisasm.c
+++ b/sys/contrib/dev/acpica/common/adisasm.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -376,7 +376,8 @@ AdAmlDisassemble (
AdDisassemblerHeader (Filename);
AcpiOsPrintf (" * ACPI Data Table [%4.4s]\n *\n",
Table->Signature);
- AcpiOsPrintf (" * Format: [HexOffset DecimalOffset ByteLength] FieldName : FieldValue\n */\n\n");
+ AcpiOsPrintf (" * Format: [HexOffset DecimalOffset ByteLength] "
+ "FieldName : FieldValue\n */\n\n");
AcpiDmDumpDataTable (Table);
fprintf (stderr, "Acpi Data Table [%4.4s] decoded, written to \"%s\"\n",
@@ -403,15 +404,17 @@ AdAmlDisassemble (
AcpiOsPrintf ("*****/\n");
}
- /*
- * Load namespace from names created within control methods
- */
- AcpiDmFinishNamespaceLoad (AcpiGbl_ParseOpRoot, AcpiGbl_RootNode, OwnerId);
+ /* Load namespace from names created within control methods */
+
+ AcpiDmFinishNamespaceLoad (AcpiGbl_ParseOpRoot,
+ AcpiGbl_RootNode, OwnerId);
/*
- * Cross reference the namespace here, in order to generate External() statements
+ * Cross reference the namespace here, in order to
+ * generate External() statements
*/
- AcpiDmCrossReferenceNamespace (AcpiGbl_ParseOpRoot, AcpiGbl_RootNode, OwnerId);
+ AcpiDmCrossReferenceNamespace (AcpiGbl_ParseOpRoot,
+ AcpiGbl_RootNode, OwnerId);
if (AslCompilerdebug)
{
@@ -422,24 +425,20 @@ AdAmlDisassemble (
AcpiDmFindOrphanMethods (AcpiGbl_ParseOpRoot);
- /* Convert fixed-offset references to resource descriptors to symbolic references */
-
- AcpiDmConvertResourceIndexes (AcpiGbl_ParseOpRoot, AcpiGbl_RootNode);
-
/*
- * If we found any external control methods, we must reparse the entire
- * tree with the new information (namely, the number of arguments per
- * method)
+ * If we found any external control methods, we must reparse
+ * the entire tree with the new information (namely, the
+ * number of arguments per method)
*/
if (AcpiDmGetExternalMethodCount ())
{
fprintf (stderr,
- "\nFound %u external control methods, reparsing with new information\n",
+ "\nFound %u external control methods, "
+ "reparsing with new information\n",
AcpiDmGetExternalMethodCount ());
- /*
- * Reparse, rebuild namespace. no need to xref namespace
- */
+ /* Reparse, rebuild namespace. no need to xref namespace */
+
AcpiPsDeleteParseTree (AcpiGbl_ParseOpRoot);
AcpiNsDeleteNamespaceSubtree (AcpiGbl_RootNode);
@@ -456,7 +455,7 @@ AdAmlDisassemble (
Status = AcpiNsRootInitialize ();
AcpiDmAddExternalsToNamespace ();
- /* Parse table. No need to reload it, however (FALSE) */
+ /* Parse the table again. No need to reload it, however */
Status = AdParseTable (Table, NULL, FALSE, FALSE);
if (ACPI_FAILURE (Status))
@@ -477,6 +476,15 @@ AdAmlDisassemble (
}
}
+ /*
+ * Now that the namespace is finalized, we can perform namespace
+ * transforms.
+ *
+ * 1) Convert fixed-offset references to resource descriptors
+ * to symbolic references (Note: modifies namespace)
+ */
+ AcpiDmConvertResourceIndexes (AcpiGbl_ParseOpRoot, AcpiGbl_RootNode);
+
/* Optional displays */
if (AcpiGbl_DbOpt_disasm)
@@ -502,11 +510,12 @@ Cleanup:
if (OutToFile && File)
{
+ if (AslCompilerdebug) /* Display final namespace, with transforms */
+ {
+ LsSetupNsList (File);
+ LsDisplayNamespace ();
+ }
-#ifdef ASL_DISASM_DEBUG
- LsSetupNsList (File);
- LsDisplayNamespace ();
-#endif
fclose (File);
AcpiOsRedirectOutput (stdout);
}
diff --git a/sys/contrib/dev/acpica/common/adwalk.c b/sys/contrib/dev/acpica/common/adwalk.c
index 9db877f..027366e 100644
--- a/sys/contrib/dev/acpica/common/adwalk.c
+++ b/sys/contrib/dev/acpica/common/adwalk.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/common/dmextern.c b/sys/contrib/dev/acpica/common/dmextern.c
index 245120d..6fca187 100644
--- a/sys/contrib/dev/acpica/common/dmextern.c
+++ b/sys/contrib/dev/acpica/common/dmextern.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/common/dmrestag.c b/sys/contrib/dev/acpica/common/dmrestag.c
index 4adb416..1e2db9a 100644
--- a/sys/contrib/dev/acpica/common/dmrestag.c
+++ b/sys/contrib/dev/acpica/common/dmrestag.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/common/dmtable.c b/sys/contrib/dev/acpica/common/dmtable.c
index 64db37b..f67e122 100644
--- a/sys/contrib/dev/acpica/common/dmtable.c
+++ b/sys/contrib/dev/acpica/common/dmtable.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -232,7 +232,7 @@ static const char *AcpiDmIvrsSubnames[] =
};
-#define ACPI_FADT_PM_RESERVED 8
+#define ACPI_FADT_PM_RESERVED 9
static const char *AcpiDmFadtProfiles[] =
{
@@ -244,6 +244,7 @@ static const char *AcpiDmFadtProfiles[] =
"SOHO Server",
"Appliance PC",
"Performance Server",
+ "Tablet",
"Unknown Profile Type"
};
diff --git a/sys/contrib/dev/acpica/common/dmtbdump.c b/sys/contrib/dev/acpica/common/dmtbdump.c
index ceb52f9..c98eb87 100644
--- a/sys/contrib/dev/acpica/common/dmtbdump.c
+++ b/sys/contrib/dev/acpica/common/dmtbdump.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/common/dmtbinfo.c b/sys/contrib/dev/acpica/common/dmtbinfo.c
index 4561bd5..70ac331 100644
--- a/sys/contrib/dev/acpica/common/dmtbinfo.c
+++ b/sys/contrib/dev/acpica/common/dmtbinfo.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -78,123 +78,123 @@
/*
* Macros used to generate offsets to specific table fields
*/
-#define ACPI_FACS_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_FACS,f)
-#define ACPI_GAS_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_GENERIC_ADDRESS,f)
-#define ACPI_HDR_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_HEADER,f)
-#define ACPI_RSDP_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_RSDP,f)
-#define ACPI_BERT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_BERT,f)
-#define ACPI_BGRT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_BGRT,f)
-#define ACPI_BOOT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_BOOT,f)
-#define ACPI_CPEP_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_CPEP,f)
-#define ACPI_DBGP_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_DBGP,f)
-#define ACPI_DMAR_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_DMAR,f)
-#define ACPI_DRTM_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_DRTM,f)
-#define ACPI_ECDT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_ECDT,f)
-#define ACPI_EINJ_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_EINJ,f)
-#define ACPI_ERST_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_ERST,f)
-#define ACPI_GTDT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_GTDT,f)
-#define ACPI_HEST_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_HEST,f)
-#define ACPI_HPET_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_HPET,f)
-#define ACPI_IVRS_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_IVRS,f)
-#define ACPI_MADT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_MADT,f)
-#define ACPI_MCFG_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_MCFG,f)
-#define ACPI_MCHI_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_MCHI,f)
-#define ACPI_MPST_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_MPST,f)
-#define ACPI_MSCT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_MSCT,f)
-#define ACPI_PCCT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_PCCT,f)
-#define ACPI_PMTT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_PMTT,f)
-#define ACPI_S3PT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_S3PT,f)
-#define ACPI_SBST_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_SBST,f)
-#define ACPI_SLIT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_SLIT,f)
-#define ACPI_SPCR_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_SPCR,f)
-#define ACPI_SPMI_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_SPMI,f)
-#define ACPI_SRAT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_SRAT,f)
-#define ACPI_TCPA_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_TCPA,f)
-#define ACPI_UEFI_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_UEFI,f)
-#define ACPI_WAET_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_WAET,f)
-#define ACPI_WDAT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_WDAT,f)
-#define ACPI_WDDT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_WDDT,f)
-#define ACPI_WDRT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_WDRT,f)
+#define ACPI_FACS_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_FACS,f)
+#define ACPI_GAS_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_GENERIC_ADDRESS,f)
+#define ACPI_HDR_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_HEADER,f)
+#define ACPI_RSDP_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_RSDP,f)
+#define ACPI_BERT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_BERT,f)
+#define ACPI_BGRT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_BGRT,f)
+#define ACPI_BOOT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_BOOT,f)
+#define ACPI_CPEP_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_CPEP,f)
+#define ACPI_DBGP_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_DBGP,f)
+#define ACPI_DMAR_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_DMAR,f)
+#define ACPI_DRTM_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_DRTM,f)
+#define ACPI_ECDT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_ECDT,f)
+#define ACPI_EINJ_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_EINJ,f)
+#define ACPI_ERST_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_ERST,f)
+#define ACPI_GTDT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_GTDT,f)
+#define ACPI_HEST_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_HEST,f)
+#define ACPI_HPET_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_HPET,f)
+#define ACPI_IVRS_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_IVRS,f)
+#define ACPI_MADT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_MADT,f)
+#define ACPI_MCFG_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_MCFG,f)
+#define ACPI_MCHI_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_MCHI,f)
+#define ACPI_MPST_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_MPST,f)
+#define ACPI_MSCT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_MSCT,f)
+#define ACPI_PCCT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_PCCT,f)
+#define ACPI_PMTT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_PMTT,f)
+#define ACPI_S3PT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_S3PT,f)
+#define ACPI_SBST_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SBST,f)
+#define ACPI_SLIT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SLIT,f)
+#define ACPI_SPCR_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SPCR,f)
+#define ACPI_SPMI_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SPMI,f)
+#define ACPI_SRAT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SRAT,f)
+#define ACPI_TCPA_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_TCPA,f)
+#define ACPI_UEFI_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_UEFI,f)
+#define ACPI_WAET_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WAET,f)
+#define ACPI_WDAT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WDAT,f)
+#define ACPI_WDDT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WDDT,f)
+#define ACPI_WDRT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WDRT,f)
/* Subtables */
-#define ACPI_ASF0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_ASF_INFO,f)
-#define ACPI_ASF1_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_ASF_ALERT,f)
-#define ACPI_ASF1a_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_ASF_ALERT_DATA,f)
-#define ACPI_ASF2_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_ASF_REMOTE,f)
-#define ACPI_ASF2a_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_ASF_CONTROL_DATA,f)
-#define ACPI_ASF3_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_ASF_RMCP,f)
-#define ACPI_ASF4_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_ASF_ADDRESS,f)
-#define ACPI_CPEP0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_CPEP_POLLING,f)
-#define ACPI_DMARS_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_DMAR_DEVICE_SCOPE,f)
-#define ACPI_DMAR0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_DMAR_HARDWARE_UNIT,f)
-#define ACPI_DMAR1_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_DMAR_RESERVED_MEMORY,f)
-#define ACPI_DMAR2_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_DMAR_ATSR,f)
-#define ACPI_DMAR3_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_DMAR_RHSA,f)
-#define ACPI_EINJ0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_WHEA_HEADER,f)
-#define ACPI_ERST0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_WHEA_HEADER,f)
-#define ACPI_FPDTH_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_FPDT_HEADER,f)
-#define ACPI_FPDT0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_FPDT_BOOT,f)
-#define ACPI_FPDT1_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_FPDT_S3PT_PTR,f)
-#define ACPI_HEST0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_HEST_IA_MACHINE_CHECK,f)
-#define ACPI_HEST1_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_HEST_IA_CORRECTED,f)
-#define ACPI_HEST2_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_HEST_IA_NMI,f)
-#define ACPI_HEST6_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_HEST_AER_ROOT,f)
-#define ACPI_HEST7_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_HEST_AER,f)
-#define ACPI_HEST8_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_HEST_AER_BRIDGE,f)
-#define ACPI_HEST9_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_HEST_GENERIC,f)
-#define ACPI_HESTN_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_HEST_NOTIFY,f)
-#define ACPI_HESTB_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_HEST_IA_ERROR_BANK,f)
-#define ACPI_IVRSH_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_IVRS_HEADER,f)
-#define ACPI_IVRS0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_IVRS_HARDWARE,f)
-#define ACPI_IVRS1_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_IVRS_MEMORY,f)
-#define ACPI_IVRSD_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_IVRS_DE_HEADER,f)
-#define ACPI_IVRS8A_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_IVRS_DEVICE8A,f)
-#define ACPI_IVRS8B_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_IVRS_DEVICE8B,f)
-#define ACPI_IVRS8C_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_IVRS_DEVICE8C,f)
-#define ACPI_MADT0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MADT_LOCAL_APIC,f)
-#define ACPI_MADT1_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MADT_IO_APIC,f)
-#define ACPI_MADT2_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MADT_INTERRUPT_OVERRIDE,f)
-#define ACPI_MADT3_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MADT_NMI_SOURCE,f)
-#define ACPI_MADT4_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MADT_LOCAL_APIC_NMI,f)
-#define ACPI_MADT5_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MADT_LOCAL_APIC_OVERRIDE,f)
-#define ACPI_MADT6_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MADT_IO_SAPIC,f)
-#define ACPI_MADT7_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MADT_LOCAL_SAPIC,f)
-#define ACPI_MADT8_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MADT_INTERRUPT_SOURCE,f)
-#define ACPI_MADT9_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MADT_LOCAL_X2APIC,f)
-#define ACPI_MADT10_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MADT_LOCAL_X2APIC_NMI,f)
-#define ACPI_MADT11_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MADT_GENERIC_INTERRUPT,f)
-#define ACPI_MADT12_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MADT_GENERIC_DISTRIBUTOR,f)
-#define ACPI_MADTH_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_SUBTABLE_HEADER,f)
-#define ACPI_MCFG0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MCFG_ALLOCATION,f)
-#define ACPI_MPST0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MPST_POWER_NODE,f)
-#define ACPI_MPST0A_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MPST_POWER_STATE,f)
-#define ACPI_MPST0B_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MPST_COMPONENT,f)
-#define ACPI_MPST1_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MPST_DATA_HDR,f)
-#define ACPI_MPST2_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MPST_POWER_DATA,f)
-#define ACPI_MSCT0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MSCT_PROXIMITY,f)
-#define ACPI_PCCT0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_PCCT_SUBSPACE,f)
-#define ACPI_PMTT0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_PMTT_SOCKET,f)
-#define ACPI_PMTT1_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_PMTT_CONTROLLER,f)
-#define ACPI_PMTT1A_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_PMTT_DOMAIN,f)
-#define ACPI_PMTT2_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_PMTT_PHYSICAL_COMPONENT,f)
-#define ACPI_PMTTH_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_PMTT_HEADER,f)
-#define ACPI_S3PTH_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_S3PT_HEADER,f)
-#define ACPI_S3PT0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_S3PT_RESUME,f)
-#define ACPI_S3PT1_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_S3PT_SUSPEND,f)
-#define ACPI_SLICH_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_SLIC_HEADER,f)
-#define ACPI_SLIC0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_SLIC_KEY,f)
-#define ACPI_SLIC1_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_SLIC_MARKER,f)
-#define ACPI_SRATH_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_SUBTABLE_HEADER,f)
-#define ACPI_SRAT0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_SRAT_CPU_AFFINITY,f)
-#define ACPI_SRAT1_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_SRAT_MEM_AFFINITY,f)
-#define ACPI_SRAT2_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_SRAT_X2APIC_CPU_AFFINITY,f)
-#define ACPI_WDAT0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_WDAT_ENTRY,f)
+#define ACPI_ASF0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_INFO,f)
+#define ACPI_ASF1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_ALERT,f)
+#define ACPI_ASF1a_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_ALERT_DATA,f)
+#define ACPI_ASF2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_REMOTE,f)
+#define ACPI_ASF2a_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_CONTROL_DATA,f)
+#define ACPI_ASF3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_RMCP,f)
+#define ACPI_ASF4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_ADDRESS,f)
+#define ACPI_CPEP0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CPEP_POLLING,f)
+#define ACPI_DMARS_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_DMAR_DEVICE_SCOPE,f)
+#define ACPI_DMAR0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_DMAR_HARDWARE_UNIT,f)
+#define ACPI_DMAR1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_DMAR_RESERVED_MEMORY,f)
+#define ACPI_DMAR2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_DMAR_ATSR,f)
+#define ACPI_DMAR3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_DMAR_RHSA,f)
+#define ACPI_EINJ0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_WHEA_HEADER,f)
+#define ACPI_ERST0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_WHEA_HEADER,f)
+#define ACPI_FPDTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_FPDT_HEADER,f)
+#define ACPI_FPDT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_FPDT_BOOT,f)
+#define ACPI_FPDT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_FPDT_S3PT_PTR,f)
+#define ACPI_HEST0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_IA_MACHINE_CHECK,f)
+#define ACPI_HEST1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_IA_CORRECTED,f)
+#define ACPI_HEST2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_IA_NMI,f)
+#define ACPI_HEST6_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_AER_ROOT,f)
+#define ACPI_HEST7_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_AER,f)
+#define ACPI_HEST8_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_AER_BRIDGE,f)
+#define ACPI_HEST9_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_GENERIC,f)
+#define ACPI_HESTN_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_NOTIFY,f)
+#define ACPI_HESTB_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_IA_ERROR_BANK,f)
+#define ACPI_IVRSH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IVRS_HEADER,f)
+#define ACPI_IVRS0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IVRS_HARDWARE,f)
+#define ACPI_IVRS1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IVRS_MEMORY,f)
+#define ACPI_IVRSD_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IVRS_DE_HEADER,f)
+#define ACPI_IVRS8A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IVRS_DEVICE8A,f)
+#define ACPI_IVRS8B_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IVRS_DEVICE8B,f)
+#define ACPI_IVRS8C_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IVRS_DEVICE8C,f)
+#define ACPI_MADT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_LOCAL_APIC,f)
+#define ACPI_MADT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_IO_APIC,f)
+#define ACPI_MADT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_INTERRUPT_OVERRIDE,f)
+#define ACPI_MADT3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_NMI_SOURCE,f)
+#define ACPI_MADT4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_LOCAL_APIC_NMI,f)
+#define ACPI_MADT5_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_LOCAL_APIC_OVERRIDE,f)
+#define ACPI_MADT6_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_IO_SAPIC,f)
+#define ACPI_MADT7_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_LOCAL_SAPIC,f)
+#define ACPI_MADT8_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_INTERRUPT_SOURCE,f)
+#define ACPI_MADT9_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_LOCAL_X2APIC,f)
+#define ACPI_MADT10_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_LOCAL_X2APIC_NMI,f)
+#define ACPI_MADT11_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_GENERIC_INTERRUPT,f)
+#define ACPI_MADT12_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_GENERIC_DISTRIBUTOR,f)
+#define ACPI_MADTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SUBTABLE_HEADER,f)
+#define ACPI_MCFG0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MCFG_ALLOCATION,f)
+#define ACPI_MPST0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MPST_POWER_NODE,f)
+#define ACPI_MPST0A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MPST_POWER_STATE,f)
+#define ACPI_MPST0B_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MPST_COMPONENT,f)
+#define ACPI_MPST1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MPST_DATA_HDR,f)
+#define ACPI_MPST2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MPST_POWER_DATA,f)
+#define ACPI_MSCT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MSCT_PROXIMITY,f)
+#define ACPI_PCCT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_SUBSPACE,f)
+#define ACPI_PMTT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PMTT_SOCKET,f)
+#define ACPI_PMTT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PMTT_CONTROLLER,f)
+#define ACPI_PMTT1A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PMTT_DOMAIN,f)
+#define ACPI_PMTT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PMTT_PHYSICAL_COMPONENT,f)
+#define ACPI_PMTTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PMTT_HEADER,f)
+#define ACPI_S3PTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_S3PT_HEADER,f)
+#define ACPI_S3PT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_S3PT_RESUME,f)
+#define ACPI_S3PT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_S3PT_SUSPEND,f)
+#define ACPI_SLICH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SLIC_HEADER,f)
+#define ACPI_SLIC0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SLIC_KEY,f)
+#define ACPI_SLIC1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SLIC_MARKER,f)
+#define ACPI_SRATH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SUBTABLE_HEADER,f)
+#define ACPI_SRAT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SRAT_CPU_AFFINITY,f)
+#define ACPI_SRAT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SRAT_MEM_AFFINITY,f)
+#define ACPI_SRAT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SRAT_X2APIC_CPU_AFFINITY,f)
+#define ACPI_WDAT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_WDAT_ENTRY,f)
/*
* Simplify access to flag fields by breaking them up into bytes
*/
-#define ACPI_FLAG_OFFSET(d,f,o) (UINT8) (ACPI_OFFSET (d,f) + o)
+#define ACPI_FLAG_OFFSET(d,f,o) (UINT16) (ACPI_OFFSET (d,f) + o)
/* Flags */
@@ -384,6 +384,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoFadt1[] =
{ACPI_DMT_FLAG2, ACPI_FADT_FLAG_OFFSET (BootFlags,0), "VGA Not Present (V4)", 0},
{ACPI_DMT_FLAG3, ACPI_FADT_FLAG_OFFSET (BootFlags,0), "MSI Not Supported (V4)", 0},
{ACPI_DMT_FLAG4, ACPI_FADT_FLAG_OFFSET (BootFlags,0), "PCIe ASPM Not Supported (V4)", 0},
+ {ACPI_DMT_FLAG5, ACPI_FADT_FLAG_OFFSET (BootFlags,0), "CMOS RTC Not Present (V5)", 0},
{ACPI_DMT_UINT8, ACPI_FADT_OFFSET (Reserved), "Reserved", 0},
{ACPI_DMT_UINT32, ACPI_FADT_OFFSET (Flags), "Flags (decoded below)", DT_FLAG},
@@ -417,8 +418,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoFadt1[] =
{ACPI_DMT_FLAG2, ACPI_FADT_FLAG_OFFSET (Flags,2), "Use APIC Cluster Model (V4)", 0},
{ACPI_DMT_FLAG3, ACPI_FADT_FLAG_OFFSET (Flags,2), "Use APIC Physical Destination Mode (V4)", 0},
{ACPI_DMT_FLAG4, ACPI_FADT_FLAG_OFFSET (Flags,2), "Hardware Reduced (V5)", 0},
- {ACPI_DMT_FLAG5, ACPI_FADT_FLAG_OFFSET (Flags,2), "Prefer S0 Idle (V5)", 0},
- {ACPI_DMT_FLAG6, ACPI_FADT_FLAG_OFFSET (Flags,2), "Use Sleep Register (V5)", 0},
+ {ACPI_DMT_FLAG5, ACPI_FADT_FLAG_OFFSET (Flags,2), "Low Power S0 Idle (V5)", 0},
ACPI_DMT_TERMINATOR
};
@@ -456,7 +456,8 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoFadt3[] =
ACPI_DMTABLE_INFO AcpiDmTableInfoFadt5[] =
{
- {ACPI_DMT_GAS, ACPI_FADT_OFFSET (SleepRegister), "Sleep Register", 0},
+ {ACPI_DMT_GAS, ACPI_FADT_OFFSET (SleepControl), "Sleep Control Register", 0},
+ {ACPI_DMT_GAS, ACPI_FADT_OFFSET (SleepStatus), "Sleep Status Register", 0},
ACPI_DMT_TERMINATOR
};
diff --git a/sys/contrib/dev/acpica/common/getopt.c b/sys/contrib/dev/acpica/common/getopt.c
index 8ccf9c8..f26face 100644
--- a/sys/contrib/dev/acpica/common/getopt.c
+++ b/sys/contrib/dev/acpica/common/getopt.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/aslanalyze.c b/sys/contrib/dev/acpica/compiler/aslanalyze.c
index d7224e6..ea4ee35 100644
--- a/sys/contrib/dev/acpica/compiler/aslanalyze.c
+++ b/sys/contrib/dev/acpica/compiler/aslanalyze.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/aslbtypes.c b/sys/contrib/dev/acpica/compiler/aslbtypes.c
index bc1f17a..d7140d2 100644
--- a/sys/contrib/dev/acpica/compiler/aslbtypes.c
+++ b/sys/contrib/dev/acpica/compiler/aslbtypes.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/aslcodegen.c b/sys/contrib/dev/acpica/compiler/aslcodegen.c
index 915c356..07ece28 100644
--- a/sys/contrib/dev/acpica/compiler/aslcodegen.c
+++ b/sys/contrib/dev/acpica/compiler/aslcodegen.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/aslcompile.c b/sys/contrib/dev/acpica/compiler/aslcompile.c
index 31e764c..ad44a9e 100644
--- a/sys/contrib/dev/acpica/compiler/aslcompile.c
+++ b/sys/contrib/dev/acpica/compiler/aslcompile.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/aslcompiler.h b/sys/contrib/dev/acpica/compiler/aslcompiler.h
index d0fb0af..6d8065f 100644
--- a/sys/contrib/dev/acpica/compiler/aslcompiler.h
+++ b/sys/contrib/dev/acpica/compiler/aslcompiler.h
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/aslcompiler.l b/sys/contrib/dev/acpica/compiler/aslcompiler.l
index 390826d..86d4cec 100644
--- a/sys/contrib/dev/acpica/compiler/aslcompiler.l
+++ b/sys/contrib/dev/acpica/compiler/aslcompiler.l
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/aslcompiler.y b/sys/contrib/dev/acpica/compiler/aslcompiler.y
index eb0cc9f..15b36b7 100644
--- a/sys/contrib/dev/acpica/compiler/aslcompiler.y
+++ b/sys/contrib/dev/acpica/compiler/aslcompiler.y
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/asldefine.h b/sys/contrib/dev/acpica/compiler/asldefine.h
index eafd700..a83a021 100644
--- a/sys/contrib/dev/acpica/compiler/asldefine.h
+++ b/sys/contrib/dev/acpica/compiler/asldefine.h
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/aslerror.c b/sys/contrib/dev/acpica/compiler/aslerror.c
index e5e3e61..5839cea 100644
--- a/sys/contrib/dev/acpica/compiler/aslerror.c
+++ b/sys/contrib/dev/acpica/compiler/aslerror.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/aslfiles.c b/sys/contrib/dev/acpica/compiler/aslfiles.c
index 4cde09d..12f42af 100644
--- a/sys/contrib/dev/acpica/compiler/aslfiles.c
+++ b/sys/contrib/dev/acpica/compiler/aslfiles.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/aslfold.c b/sys/contrib/dev/acpica/compiler/aslfold.c
index 127d8e2..61a2944 100644
--- a/sys/contrib/dev/acpica/compiler/aslfold.c
+++ b/sys/contrib/dev/acpica/compiler/aslfold.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/aslglobal.h b/sys/contrib/dev/acpica/compiler/aslglobal.h
index dd1dd49..08b4b69 100644
--- a/sys/contrib/dev/acpica/compiler/aslglobal.h
+++ b/sys/contrib/dev/acpica/compiler/aslglobal.h
@@ -7,7 +7,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/asllength.c b/sys/contrib/dev/acpica/compiler/asllength.c
index bfdf941..8dc21ac 100644
--- a/sys/contrib/dev/acpica/compiler/asllength.c
+++ b/sys/contrib/dev/acpica/compiler/asllength.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/asllisting.c b/sys/contrib/dev/acpica/compiler/asllisting.c
index 070695d..106d330 100644
--- a/sys/contrib/dev/acpica/compiler/asllisting.c
+++ b/sys/contrib/dev/acpica/compiler/asllisting.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/aslload.c b/sys/contrib/dev/acpica/compiler/aslload.c
index 064116e..6198fb8 100644
--- a/sys/contrib/dev/acpica/compiler/aslload.c
+++ b/sys/contrib/dev/acpica/compiler/aslload.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/asllookup.c b/sys/contrib/dev/acpica/compiler/asllookup.c
index c8f5417..26fa305 100644
--- a/sys/contrib/dev/acpica/compiler/asllookup.c
+++ b/sys/contrib/dev/acpica/compiler/asllookup.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/aslmain.c b/sys/contrib/dev/acpica/compiler/aslmain.c
index 8a4f266..2d2a5be 100644
--- a/sys/contrib/dev/acpica/compiler/aslmain.c
+++ b/sys/contrib/dev/acpica/compiler/aslmain.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -879,6 +879,10 @@ AslCommandLine (
if (Gbl_DoSignon)
{
printf (ACPI_COMMON_SIGNON (ASL_COMPILER_NAME));
+ if (Gbl_IgnoreErrors)
+ {
+ printf ("Ignoring all errors, forcing AML file generation\n\n");
+ }
}
/* Abort if anything went wrong on the command line */
diff --git a/sys/contrib/dev/acpica/compiler/aslmap.c b/sys/contrib/dev/acpica/compiler/aslmap.c
index aef79d8..9480a63 100644
--- a/sys/contrib/dev/acpica/compiler/aslmap.c
+++ b/sys/contrib/dev/acpica/compiler/aslmap.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/aslmessages.h b/sys/contrib/dev/acpica/compiler/aslmessages.h
index 77a5c02..f96e6f1 100644
--- a/sys/contrib/dev/acpica/compiler/aslmessages.h
+++ b/sys/contrib/dev/acpica/compiler/aslmessages.h
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/aslopcodes.c b/sys/contrib/dev/acpica/compiler/aslopcodes.c
index 7852720..c9dc0f0 100644
--- a/sys/contrib/dev/acpica/compiler/aslopcodes.c
+++ b/sys/contrib/dev/acpica/compiler/aslopcodes.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/asloperands.c b/sys/contrib/dev/acpica/compiler/asloperands.c
index 9ce7b31..cecf5d9 100644
--- a/sys/contrib/dev/acpica/compiler/asloperands.c
+++ b/sys/contrib/dev/acpica/compiler/asloperands.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/aslopt.c b/sys/contrib/dev/acpica/compiler/aslopt.c
index c75668b..904c329 100644
--- a/sys/contrib/dev/acpica/compiler/aslopt.c
+++ b/sys/contrib/dev/acpica/compiler/aslopt.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/aslpredef.c b/sys/contrib/dev/acpica/compiler/aslpredef.c
index d67fcac..a5ebb83 100644
--- a/sys/contrib/dev/acpica/compiler/aslpredef.c
+++ b/sys/contrib/dev/acpica/compiler/aslpredef.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/aslresource.c b/sys/contrib/dev/acpica/compiler/aslresource.c
index cec0c97..2a576a8 100644
--- a/sys/contrib/dev/acpica/compiler/aslresource.c
+++ b/sys/contrib/dev/acpica/compiler/aslresource.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/aslrestype1.c b/sys/contrib/dev/acpica/compiler/aslrestype1.c
index 7f34a37..f3bc798 100644
--- a/sys/contrib/dev/acpica/compiler/aslrestype1.c
+++ b/sys/contrib/dev/acpica/compiler/aslrestype1.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/aslrestype1i.c b/sys/contrib/dev/acpica/compiler/aslrestype1i.c
index e4462f4..68f31e9 100644
--- a/sys/contrib/dev/acpica/compiler/aslrestype1i.c
+++ b/sys/contrib/dev/acpica/compiler/aslrestype1i.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/aslrestype2.c b/sys/contrib/dev/acpica/compiler/aslrestype2.c
index 5499196..4784f86 100644
--- a/sys/contrib/dev/acpica/compiler/aslrestype2.c
+++ b/sys/contrib/dev/acpica/compiler/aslrestype2.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/aslrestype2d.c b/sys/contrib/dev/acpica/compiler/aslrestype2d.c
index 1a9ec48..70988f0 100644
--- a/sys/contrib/dev/acpica/compiler/aslrestype2d.c
+++ b/sys/contrib/dev/acpica/compiler/aslrestype2d.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/aslrestype2e.c b/sys/contrib/dev/acpica/compiler/aslrestype2e.c
index c60a8ea..3be19ec 100644
--- a/sys/contrib/dev/acpica/compiler/aslrestype2e.c
+++ b/sys/contrib/dev/acpica/compiler/aslrestype2e.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/aslrestype2q.c b/sys/contrib/dev/acpica/compiler/aslrestype2q.c
index 7a01106..804702e 100644
--- a/sys/contrib/dev/acpica/compiler/aslrestype2q.c
+++ b/sys/contrib/dev/acpica/compiler/aslrestype2q.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/aslrestype2s.c b/sys/contrib/dev/acpica/compiler/aslrestype2s.c
index 2fa9085..4c54d24 100644
--- a/sys/contrib/dev/acpica/compiler/aslrestype2s.c
+++ b/sys/contrib/dev/acpica/compiler/aslrestype2s.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/aslrestype2w.c b/sys/contrib/dev/acpica/compiler/aslrestype2w.c
index 05fcc39..ad0a9c1 100644
--- a/sys/contrib/dev/acpica/compiler/aslrestype2w.c
+++ b/sys/contrib/dev/acpica/compiler/aslrestype2w.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/aslstartup.c b/sys/contrib/dev/acpica/compiler/aslstartup.c
index 7dbdf5f..509da43 100644
--- a/sys/contrib/dev/acpica/compiler/aslstartup.c
+++ b/sys/contrib/dev/acpica/compiler/aslstartup.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/aslstubs.c b/sys/contrib/dev/acpica/compiler/aslstubs.c
index 63d1402..5a83a0b 100644
--- a/sys/contrib/dev/acpica/compiler/aslstubs.c
+++ b/sys/contrib/dev/acpica/compiler/aslstubs.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/asltransform.c b/sys/contrib/dev/acpica/compiler/asltransform.c
index b13d46e..a3c73b0 100644
--- a/sys/contrib/dev/acpica/compiler/asltransform.c
+++ b/sys/contrib/dev/acpica/compiler/asltransform.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/asltree.c b/sys/contrib/dev/acpica/compiler/asltree.c
index 7069891..8e3e970 100644
--- a/sys/contrib/dev/acpica/compiler/asltree.c
+++ b/sys/contrib/dev/acpica/compiler/asltree.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/asltypes.h b/sys/contrib/dev/acpica/compiler/asltypes.h
index 11f4afd..0205181 100644
--- a/sys/contrib/dev/acpica/compiler/asltypes.h
+++ b/sys/contrib/dev/acpica/compiler/asltypes.h
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/aslutils.c b/sys/contrib/dev/acpica/compiler/aslutils.c
index 1ae2336..b1745a0 100644
--- a/sys/contrib/dev/acpica/compiler/aslutils.c
+++ b/sys/contrib/dev/acpica/compiler/aslutils.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/asluuid.c b/sys/contrib/dev/acpica/compiler/asluuid.c
index 98d1834..485db6b 100644
--- a/sys/contrib/dev/acpica/compiler/asluuid.c
+++ b/sys/contrib/dev/acpica/compiler/asluuid.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/aslwalks.c b/sys/contrib/dev/acpica/compiler/aslwalks.c
index c264501..7c14ef0 100644
--- a/sys/contrib/dev/acpica/compiler/aslwalks.c
+++ b/sys/contrib/dev/acpica/compiler/aslwalks.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/dtcompile.c b/sys/contrib/dev/acpica/compiler/dtcompile.c
index 56d2083..ea0f55b 100644
--- a/sys/contrib/dev/acpica/compiler/dtcompile.c
+++ b/sys/contrib/dev/acpica/compiler/dtcompile.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/dtcompiler.h b/sys/contrib/dev/acpica/compiler/dtcompiler.h
index f60a21c..4e3f149 100644
--- a/sys/contrib/dev/acpica/compiler/dtcompiler.h
+++ b/sys/contrib/dev/acpica/compiler/dtcompiler.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/dtexpress.c b/sys/contrib/dev/acpica/compiler/dtexpress.c
index 7646e17..a5565ab 100644
--- a/sys/contrib/dev/acpica/compiler/dtexpress.c
+++ b/sys/contrib/dev/acpica/compiler/dtexpress.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/dtfield.c b/sys/contrib/dev/acpica/compiler/dtfield.c
index 3f26262..6bfa649 100644
--- a/sys/contrib/dev/acpica/compiler/dtfield.c
+++ b/sys/contrib/dev/acpica/compiler/dtfield.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/dtio.c b/sys/contrib/dev/acpica/compiler/dtio.c
index ac853c0..8c745be 100644
--- a/sys/contrib/dev/acpica/compiler/dtio.c
+++ b/sys/contrib/dev/acpica/compiler/dtio.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/dtparser.l b/sys/contrib/dev/acpica/compiler/dtparser.l
index bcbcc15..b6fd6ff 100644
--- a/sys/contrib/dev/acpica/compiler/dtparser.l
+++ b/sys/contrib/dev/acpica/compiler/dtparser.l
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/dtparser.y b/sys/contrib/dev/acpica/compiler/dtparser.y
index 5204356..cac9f57 100644
--- a/sys/contrib/dev/acpica/compiler/dtparser.y
+++ b/sys/contrib/dev/acpica/compiler/dtparser.y
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/dtsubtable.c b/sys/contrib/dev/acpica/compiler/dtsubtable.c
index 70cd443..9eebe83 100644
--- a/sys/contrib/dev/acpica/compiler/dtsubtable.c
+++ b/sys/contrib/dev/acpica/compiler/dtsubtable.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/dttable.c b/sys/contrib/dev/acpica/compiler/dttable.c
index 001239d..efec963 100644
--- a/sys/contrib/dev/acpica/compiler/dttable.c
+++ b/sys/contrib/dev/acpica/compiler/dttable.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -1822,7 +1822,9 @@ DtGetGenericTableInfo (
break;
}
- if (!ACPI_STRCMP (Name, Info->Name))
+ /* Use caseless compare for generic keywords */
+
+ if (!AcpiUtStricmp (Name, Info->Name))
{
break;
}
diff --git a/sys/contrib/dev/acpica/compiler/dttemplate.c b/sys/contrib/dev/acpica/compiler/dttemplate.c
index b752470..0c35280 100644
--- a/sys/contrib/dev/acpica/compiler/dttemplate.c
+++ b/sys/contrib/dev/acpica/compiler/dttemplate.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/compiler/dttemplate.h b/sys/contrib/dev/acpica/compiler/dttemplate.h
index e330254..4d43704 100644
--- a/sys/contrib/dev/acpica/compiler/dttemplate.h
+++ b/sys/contrib/dev/acpica/compiler/dttemplate.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -302,13 +302,15 @@ const unsigned char TemplateFacs[] =
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 /* 00000038 "........" */
};
+/* Version 5 FADT */
+
const unsigned char TemplateFadt[] =
{
- 0x46,0x41,0x43,0x50,0xF4,0x00,0x00,0x00, /* 00000000 "FACP...." */
- 0x04,0x4E,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 ".NINTEL " */
+ 0x46,0x41,0x43,0x50,0x0C,0x01,0x00,0x00, /* 00000000 "FACP...." */
+ 0x05,0x18,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
0x54,0x45,0x4D,0x50,0x4C,0x41,0x54,0x45, /* 00000010 "TEMPLATE" */
0x00,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
- 0x28,0x05,0x10,0x20,0x01,0x00,0x00,0x00, /* 00000020 "(.. ...." */
+ 0x23,0x11,0x11,0x20,0x01,0x00,0x00,0x00, /* 00000020 "#.. ...." */
0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000028 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000030 "........" */
0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000038 "........" */
@@ -334,7 +336,10 @@ const unsigned char TemplateFadt[] =
0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x01, /* 000000D8 "........" */
0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000E0 "........" */
0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000E8 "........" */
- 0x00,0x00,0x00,0x00 /* 000000F0 "...." */
+ 0x00,0x00,0x00,0x00,0x01,0x08,0x00,0x01, /* 000000F0 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000F8 "........" */
+ 0x01,0x08,0x00,0x01,0x00,0x00,0x00,0x00, /* 00000100 "........" */
+ 0x00,0x00,0x00,0x00 /* 00000108 "...." */
};
const unsigned char TemplateFpdt[] =
diff --git a/sys/contrib/dev/acpica/compiler/dtutils.c b/sys/contrib/dev/acpica/compiler/dtutils.c
index c0c92d0..f87fa20 100644
--- a/sys/contrib/dev/acpica/compiler/dtutils.c
+++ b/sys/contrib/dev/acpica/compiler/dtutils.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/debugger/dbcmds.c b/sys/contrib/dev/acpica/debugger/dbcmds.c
index 873d92b..13bc3b8 100644
--- a/sys/contrib/dev/acpica/debugger/dbcmds.c
+++ b/sys/contrib/dev/acpica/debugger/dbcmds.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/debugger/dbdisply.c b/sys/contrib/dev/acpica/debugger/dbdisply.c
index 5851ff8..5b17da5 100644
--- a/sys/contrib/dev/acpica/debugger/dbdisply.c
+++ b/sys/contrib/dev/acpica/debugger/dbdisply.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/debugger/dbexec.c b/sys/contrib/dev/acpica/debugger/dbexec.c
index eb0dde2..525d84a 100644
--- a/sys/contrib/dev/acpica/debugger/dbexec.c
+++ b/sys/contrib/dev/acpica/debugger/dbexec.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/debugger/dbfileio.c b/sys/contrib/dev/acpica/debugger/dbfileio.c
index 11ecd22..a558e42 100644
--- a/sys/contrib/dev/acpica/debugger/dbfileio.c
+++ b/sys/contrib/dev/acpica/debugger/dbfileio.c
@@ -6,7 +6,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/debugger/dbhistry.c b/sys/contrib/dev/acpica/debugger/dbhistry.c
index 33f1901..6982627 100644
--- a/sys/contrib/dev/acpica/debugger/dbhistry.c
+++ b/sys/contrib/dev/acpica/debugger/dbhistry.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/debugger/dbinput.c b/sys/contrib/dev/acpica/debugger/dbinput.c
index 4f3db2d..5f60997 100644
--- a/sys/contrib/dev/acpica/debugger/dbinput.c
+++ b/sys/contrib/dev/acpica/debugger/dbinput.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/debugger/dbmethod.c b/sys/contrib/dev/acpica/debugger/dbmethod.c
index 7d5525e..ee6677d 100644
--- a/sys/contrib/dev/acpica/debugger/dbmethod.c
+++ b/sys/contrib/dev/acpica/debugger/dbmethod.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/debugger/dbnames.c b/sys/contrib/dev/acpica/debugger/dbnames.c
index 9235e33..c55ff72 100644
--- a/sys/contrib/dev/acpica/debugger/dbnames.c
+++ b/sys/contrib/dev/acpica/debugger/dbnames.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/debugger/dbstats.c b/sys/contrib/dev/acpica/debugger/dbstats.c
index e2bbff9..c51d612 100644
--- a/sys/contrib/dev/acpica/debugger/dbstats.c
+++ b/sys/contrib/dev/acpica/debugger/dbstats.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/debugger/dbutils.c b/sys/contrib/dev/acpica/debugger/dbutils.c
index 4a545bd..a46af94 100644
--- a/sys/contrib/dev/acpica/debugger/dbutils.c
+++ b/sys/contrib/dev/acpica/debugger/dbutils.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/debugger/dbxface.c b/sys/contrib/dev/acpica/debugger/dbxface.c
index e8602bc..68f927e 100644
--- a/sys/contrib/dev/acpica/debugger/dbxface.c
+++ b/sys/contrib/dev/acpica/debugger/dbxface.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/disassembler/dmbuffer.c b/sys/contrib/dev/acpica/disassembler/dmbuffer.c
index 8b38954..ee27856 100644
--- a/sys/contrib/dev/acpica/disassembler/dmbuffer.c
+++ b/sys/contrib/dev/acpica/disassembler/dmbuffer.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/disassembler/dmnames.c b/sys/contrib/dev/acpica/disassembler/dmnames.c
index ae67b36..6129cc1 100644
--- a/sys/contrib/dev/acpica/disassembler/dmnames.c
+++ b/sys/contrib/dev/acpica/disassembler/dmnames.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/disassembler/dmobject.c b/sys/contrib/dev/acpica/disassembler/dmobject.c
index df44694..8ec3527 100644
--- a/sys/contrib/dev/acpica/disassembler/dmobject.c
+++ b/sys/contrib/dev/acpica/disassembler/dmobject.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/disassembler/dmopcode.c b/sys/contrib/dev/acpica/disassembler/dmopcode.c
index 94566a4..d096010 100644
--- a/sys/contrib/dev/acpica/disassembler/dmopcode.c
+++ b/sys/contrib/dev/acpica/disassembler/dmopcode.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/disassembler/dmresrc.c b/sys/contrib/dev/acpica/disassembler/dmresrc.c
index a5845e8..57ad33b 100644
--- a/sys/contrib/dev/acpica/disassembler/dmresrc.c
+++ b/sys/contrib/dev/acpica/disassembler/dmresrc.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/disassembler/dmresrcl.c b/sys/contrib/dev/acpica/disassembler/dmresrcl.c
index dd26322..72a6e0f 100644
--- a/sys/contrib/dev/acpica/disassembler/dmresrcl.c
+++ b/sys/contrib/dev/acpica/disassembler/dmresrcl.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/disassembler/dmresrcl2.c b/sys/contrib/dev/acpica/disassembler/dmresrcl2.c
index 41b3697..9cd9f27 100644
--- a/sys/contrib/dev/acpica/disassembler/dmresrcl2.c
+++ b/sys/contrib/dev/acpica/disassembler/dmresrcl2.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/disassembler/dmresrcs.c b/sys/contrib/dev/acpica/disassembler/dmresrcs.c
index 9b0973d..f57d8e2 100644
--- a/sys/contrib/dev/acpica/disassembler/dmresrcs.c
+++ b/sys/contrib/dev/acpica/disassembler/dmresrcs.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/disassembler/dmutils.c b/sys/contrib/dev/acpica/disassembler/dmutils.c
index 556623c..05616ef 100644
--- a/sys/contrib/dev/acpica/disassembler/dmutils.c
+++ b/sys/contrib/dev/acpica/disassembler/dmutils.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/disassembler/dmwalk.c b/sys/contrib/dev/acpica/disassembler/dmwalk.c
index f4c6c85..39bc5ce 100644
--- a/sys/contrib/dev/acpica/disassembler/dmwalk.c
+++ b/sys/contrib/dev/acpica/disassembler/dmwalk.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/dispatcher/dsargs.c b/sys/contrib/dev/acpica/dispatcher/dsargs.c
index b1d0c74..0602905 100644
--- a/sys/contrib/dev/acpica/dispatcher/dsargs.c
+++ b/sys/contrib/dev/acpica/dispatcher/dsargs.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -426,5 +426,13 @@ AcpiDsGetRegionArguments (
Status = AcpiDsExecuteArguments (Node, ExtraDesc->Extra.ScopeNode,
ExtraDesc->Extra.AmlLength, ExtraDesc->Extra.AmlStart);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ Status = AcpiUtAddAddressRange (ObjDesc->Region.SpaceId,
+ ObjDesc->Region.Address, ObjDesc->Region.Length,
+ Node);
return_ACPI_STATUS (Status);
}
diff --git a/sys/contrib/dev/acpica/dispatcher/dscontrol.c b/sys/contrib/dev/acpica/dispatcher/dscontrol.c
index b612e72..340dd03 100644
--- a/sys/contrib/dev/acpica/dispatcher/dscontrol.c
+++ b/sys/contrib/dev/acpica/dispatcher/dscontrol.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/dispatcher/dsfield.c b/sys/contrib/dev/acpica/dispatcher/dsfield.c
index 98ebf9e..ec3d5dd 100644
--- a/sys/contrib/dev/acpica/dispatcher/dsfield.c
+++ b/sys/contrib/dev/acpica/dispatcher/dsfield.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/dispatcher/dsinit.c b/sys/contrib/dev/acpica/dispatcher/dsinit.c
index 5c6c534..566c22a 100644
--- a/sys/contrib/dev/acpica/dispatcher/dsinit.c
+++ b/sys/contrib/dev/acpica/dispatcher/dsinit.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/dispatcher/dsmethod.c b/sys/contrib/dev/acpica/dispatcher/dsmethod.c
index 25a41a6..50516d1 100644
--- a/sys/contrib/dev/acpica/dispatcher/dsmethod.c
+++ b/sys/contrib/dev/acpica/dispatcher/dsmethod.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/dispatcher/dsmthdat.c b/sys/contrib/dev/acpica/dispatcher/dsmthdat.c
index d72311d..c5ae511 100644
--- a/sys/contrib/dev/acpica/dispatcher/dsmthdat.c
+++ b/sys/contrib/dev/acpica/dispatcher/dsmthdat.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/dispatcher/dsobject.c b/sys/contrib/dev/acpica/dispatcher/dsobject.c
index 6d75b3e..16585ae 100644
--- a/sys/contrib/dev/acpica/dispatcher/dsobject.c
+++ b/sys/contrib/dev/acpica/dispatcher/dsobject.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/dispatcher/dsopcode.c b/sys/contrib/dev/acpica/dispatcher/dsopcode.c
index 2f8aae2..2821a8d 100644
--- a/sys/contrib/dev/acpica/dispatcher/dsopcode.c
+++ b/sys/contrib/dev/acpica/dispatcher/dsopcode.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/dispatcher/dsutils.c b/sys/contrib/dev/acpica/dispatcher/dsutils.c
index f0d5946..0bee1aa 100644
--- a/sys/contrib/dev/acpica/dispatcher/dsutils.c
+++ b/sys/contrib/dev/acpica/dispatcher/dsutils.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/dispatcher/dswexec.c b/sys/contrib/dev/acpica/dispatcher/dswexec.c
index 42b35bc..f24ea0d 100644
--- a/sys/contrib/dev/acpica/dispatcher/dswexec.c
+++ b/sys/contrib/dev/acpica/dispatcher/dswexec.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/dispatcher/dswload.c b/sys/contrib/dev/acpica/dispatcher/dswload.c
index 45c088b..ac948c4 100644
--- a/sys/contrib/dev/acpica/dispatcher/dswload.c
+++ b/sys/contrib/dev/acpica/dispatcher/dswload.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/dispatcher/dswload2.c b/sys/contrib/dev/acpica/dispatcher/dswload2.c
index fde57ca..9bc8b31 100644
--- a/sys/contrib/dev/acpica/dispatcher/dswload2.c
+++ b/sys/contrib/dev/acpica/dispatcher/dswload2.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/dispatcher/dswscope.c b/sys/contrib/dev/acpica/dispatcher/dswscope.c
index 19117f9..143d8b3 100644
--- a/sys/contrib/dev/acpica/dispatcher/dswscope.c
+++ b/sys/contrib/dev/acpica/dispatcher/dswscope.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/dispatcher/dswstate.c b/sys/contrib/dev/acpica/dispatcher/dswstate.c
index 2f6e52c..004c553 100644
--- a/sys/contrib/dev/acpica/dispatcher/dswstate.c
+++ b/sys/contrib/dev/acpica/dispatcher/dswstate.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/events/evevent.c b/sys/contrib/dev/acpica/events/evevent.c
index 109292b..ad8f334 100644
--- a/sys/contrib/dev/acpica/events/evevent.c
+++ b/sys/contrib/dev/acpica/events/evevent.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/events/evglock.c b/sys/contrib/dev/acpica/events/evglock.c
index 47e51be..092e6e83 100644
--- a/sys/contrib/dev/acpica/events/evglock.c
+++ b/sys/contrib/dev/acpica/events/evglock.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/events/evgpe.c b/sys/contrib/dev/acpica/events/evgpe.c
index 301cfd6..076456a 100644
--- a/sys/contrib/dev/acpica/events/evgpe.c
+++ b/sys/contrib/dev/acpica/events/evgpe.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/events/evgpeblk.c b/sys/contrib/dev/acpica/events/evgpeblk.c
index 3a95886..074e449 100644
--- a/sys/contrib/dev/acpica/events/evgpeblk.c
+++ b/sys/contrib/dev/acpica/events/evgpeblk.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/events/evgpeinit.c b/sys/contrib/dev/acpica/events/evgpeinit.c
index a27cdcd..b48cb79 100644
--- a/sys/contrib/dev/acpica/events/evgpeinit.c
+++ b/sys/contrib/dev/acpica/events/evgpeinit.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/events/evgpeutil.c b/sys/contrib/dev/acpica/events/evgpeutil.c
index 4da70bb..276e25a 100644
--- a/sys/contrib/dev/acpica/events/evgpeutil.c
+++ b/sys/contrib/dev/acpica/events/evgpeutil.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/events/evmisc.c b/sys/contrib/dev/acpica/events/evmisc.c
index a537bf4..f059137 100644
--- a/sys/contrib/dev/acpica/events/evmisc.c
+++ b/sys/contrib/dev/acpica/events/evmisc.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/events/evregion.c b/sys/contrib/dev/acpica/events/evregion.c
index 6b43265e..d149181 100644
--- a/sys/contrib/dev/acpica/events/evregion.c
+++ b/sys/contrib/dev/acpica/events/evregion.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/events/evrgnini.c b/sys/contrib/dev/acpica/events/evrgnini.c
index f707fa5..9fb7769 100644
--- a/sys/contrib/dev/acpica/events/evrgnini.c
+++ b/sys/contrib/dev/acpica/events/evrgnini.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/events/evsci.c b/sys/contrib/dev/acpica/events/evsci.c
index 8666858..1435247 100644
--- a/sys/contrib/dev/acpica/events/evsci.c
+++ b/sys/contrib/dev/acpica/events/evsci.c
@@ -6,7 +6,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/events/evxface.c b/sys/contrib/dev/acpica/events/evxface.c
index c42b6cb..6ea997c 100644
--- a/sys/contrib/dev/acpica/events/evxface.c
+++ b/sys/contrib/dev/acpica/events/evxface.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/events/evxfevnt.c b/sys/contrib/dev/acpica/events/evxfevnt.c
index 9df7888..38b6d2b 100644
--- a/sys/contrib/dev/acpica/events/evxfevnt.c
+++ b/sys/contrib/dev/acpica/events/evxfevnt.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/events/evxfgpe.c b/sys/contrib/dev/acpica/events/evxfgpe.c
index f444ff3..c0ea07f 100644
--- a/sys/contrib/dev/acpica/events/evxfgpe.c
+++ b/sys/contrib/dev/acpica/events/evxfgpe.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/events/evxfregn.c b/sys/contrib/dev/acpica/events/evxfregn.c
index e9555c7..9bd2854 100644
--- a/sys/contrib/dev/acpica/events/evxfregn.c
+++ b/sys/contrib/dev/acpica/events/evxfregn.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/executer/exconfig.c b/sys/contrib/dev/acpica/executer/exconfig.c
index 927c788..3bfe1ba 100644
--- a/sys/contrib/dev/acpica/executer/exconfig.c
+++ b/sys/contrib/dev/acpica/executer/exconfig.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/executer/exconvrt.c b/sys/contrib/dev/acpica/executer/exconvrt.c
index dcd15ae..fa564ef 100644
--- a/sys/contrib/dev/acpica/executer/exconvrt.c
+++ b/sys/contrib/dev/acpica/executer/exconvrt.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/executer/excreate.c b/sys/contrib/dev/acpica/executer/excreate.c
index 39791c3..73fec1d 100644
--- a/sys/contrib/dev/acpica/executer/excreate.c
+++ b/sys/contrib/dev/acpica/executer/excreate.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/executer/exdebug.c b/sys/contrib/dev/acpica/executer/exdebug.c
index 3d1882f..0188bab 100644
--- a/sys/contrib/dev/acpica/executer/exdebug.c
+++ b/sys/contrib/dev/acpica/executer/exdebug.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/executer/exdump.c b/sys/contrib/dev/acpica/executer/exdump.c
index 986c653..544b731 100644
--- a/sys/contrib/dev/acpica/executer/exdump.c
+++ b/sys/contrib/dev/acpica/executer/exdump.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/executer/exfield.c b/sys/contrib/dev/acpica/executer/exfield.c
index 92c6a7d..fdad560 100644
--- a/sys/contrib/dev/acpica/executer/exfield.c
+++ b/sys/contrib/dev/acpica/executer/exfield.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/executer/exfldio.c b/sys/contrib/dev/acpica/executer/exfldio.c
index 69185f1..7a7cf20 100644
--- a/sys/contrib/dev/acpica/executer/exfldio.c
+++ b/sys/contrib/dev/acpica/executer/exfldio.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/executer/exmisc.c b/sys/contrib/dev/acpica/executer/exmisc.c
index 9e68c38..7be2e8b 100644
--- a/sys/contrib/dev/acpica/executer/exmisc.c
+++ b/sys/contrib/dev/acpica/executer/exmisc.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/executer/exmutex.c b/sys/contrib/dev/acpica/executer/exmutex.c
index 7922067..1d0140f 100644
--- a/sys/contrib/dev/acpica/executer/exmutex.c
+++ b/sys/contrib/dev/acpica/executer/exmutex.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/executer/exnames.c b/sys/contrib/dev/acpica/executer/exnames.c
index 5a2ddce..7706420 100644
--- a/sys/contrib/dev/acpica/executer/exnames.c
+++ b/sys/contrib/dev/acpica/executer/exnames.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/executer/exoparg1.c b/sys/contrib/dev/acpica/executer/exoparg1.c
index bb36d92..69eaefb 100644
--- a/sys/contrib/dev/acpica/executer/exoparg1.c
+++ b/sys/contrib/dev/acpica/executer/exoparg1.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/executer/exoparg2.c b/sys/contrib/dev/acpica/executer/exoparg2.c
index 555f222..8c25cac 100644
--- a/sys/contrib/dev/acpica/executer/exoparg2.c
+++ b/sys/contrib/dev/acpica/executer/exoparg2.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/executer/exoparg3.c b/sys/contrib/dev/acpica/executer/exoparg3.c
index 07408ae..97136f9 100644
--- a/sys/contrib/dev/acpica/executer/exoparg3.c
+++ b/sys/contrib/dev/acpica/executer/exoparg3.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/executer/exoparg6.c b/sys/contrib/dev/acpica/executer/exoparg6.c
index be332eb..f1afbea 100644
--- a/sys/contrib/dev/acpica/executer/exoparg6.c
+++ b/sys/contrib/dev/acpica/executer/exoparg6.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/executer/exprep.c b/sys/contrib/dev/acpica/executer/exprep.c
index 3be882b..993f75b 100644
--- a/sys/contrib/dev/acpica/executer/exprep.c
+++ b/sys/contrib/dev/acpica/executer/exprep.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/executer/exregion.c b/sys/contrib/dev/acpica/executer/exregion.c
index be4a1a2..036a5cb 100644
--- a/sys/contrib/dev/acpica/executer/exregion.c
+++ b/sys/contrib/dev/acpica/executer/exregion.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/executer/exresnte.c b/sys/contrib/dev/acpica/executer/exresnte.c
index 4356049..3c14eb5 100644
--- a/sys/contrib/dev/acpica/executer/exresnte.c
+++ b/sys/contrib/dev/acpica/executer/exresnte.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/executer/exresolv.c b/sys/contrib/dev/acpica/executer/exresolv.c
index d4bd00e..bc29bde 100644
--- a/sys/contrib/dev/acpica/executer/exresolv.c
+++ b/sys/contrib/dev/acpica/executer/exresolv.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/executer/exresop.c b/sys/contrib/dev/acpica/executer/exresop.c
index 35f3649..a9243b1 100644
--- a/sys/contrib/dev/acpica/executer/exresop.c
+++ b/sys/contrib/dev/acpica/executer/exresop.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/executer/exstore.c b/sys/contrib/dev/acpica/executer/exstore.c
index efcb374..a66aa16 100644
--- a/sys/contrib/dev/acpica/executer/exstore.c
+++ b/sys/contrib/dev/acpica/executer/exstore.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/executer/exstoren.c b/sys/contrib/dev/acpica/executer/exstoren.c
index 88fa570..f9b3bc2 100644
--- a/sys/contrib/dev/acpica/executer/exstoren.c
+++ b/sys/contrib/dev/acpica/executer/exstoren.c
@@ -7,7 +7,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/executer/exstorob.c b/sys/contrib/dev/acpica/executer/exstorob.c
index c50e62f..1ee3309 100644
--- a/sys/contrib/dev/acpica/executer/exstorob.c
+++ b/sys/contrib/dev/acpica/executer/exstorob.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/executer/exsystem.c b/sys/contrib/dev/acpica/executer/exsystem.c
index 61d712d..a2ee42a 100644
--- a/sys/contrib/dev/acpica/executer/exsystem.c
+++ b/sys/contrib/dev/acpica/executer/exsystem.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/executer/exutils.c b/sys/contrib/dev/acpica/executer/exutils.c
index e2bf4e6..45414ce 100644
--- a/sys/contrib/dev/acpica/executer/exutils.c
+++ b/sys/contrib/dev/acpica/executer/exutils.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/hardware/hwacpi.c b/sys/contrib/dev/acpica/hardware/hwacpi.c
index a317f92..23fc4bf 100644
--- a/sys/contrib/dev/acpica/hardware/hwacpi.c
+++ b/sys/contrib/dev/acpica/hardware/hwacpi.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/hardware/hwgpe.c b/sys/contrib/dev/acpica/hardware/hwgpe.c
index 305d1f7..7a94acb 100644
--- a/sys/contrib/dev/acpica/hardware/hwgpe.c
+++ b/sys/contrib/dev/acpica/hardware/hwgpe.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/hardware/hwpci.c b/sys/contrib/dev/acpica/hardware/hwpci.c
index c8634f7..dc71e2d 100644
--- a/sys/contrib/dev/acpica/hardware/hwpci.c
+++ b/sys/contrib/dev/acpica/hardware/hwpci.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/hardware/hwregs.c b/sys/contrib/dev/acpica/hardware/hwregs.c
index 5afd914..14de562 100644
--- a/sys/contrib/dev/acpica/hardware/hwregs.c
+++ b/sys/contrib/dev/acpica/hardware/hwregs.c
@@ -7,7 +7,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/hardware/hwsleep.c b/sys/contrib/dev/acpica/hardware/hwsleep.c
index fbfc73b..9cc8246 100644
--- a/sys/contrib/dev/acpica/hardware/hwsleep.c
+++ b/sys/contrib/dev/acpica/hardware/hwsleep.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/hardware/hwtimer.c b/sys/contrib/dev/acpica/hardware/hwtimer.c
index 1c26fc4..933b98b 100644
--- a/sys/contrib/dev/acpica/hardware/hwtimer.c
+++ b/sys/contrib/dev/acpica/hardware/hwtimer.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/hardware/hwvalid.c b/sys/contrib/dev/acpica/hardware/hwvalid.c
index a15ae9d..6f49c78 100644
--- a/sys/contrib/dev/acpica/hardware/hwvalid.c
+++ b/sys/contrib/dev/acpica/hardware/hwvalid.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/hardware/hwxface.c b/sys/contrib/dev/acpica/hardware/hwxface.c
index 712f1a2..eeb293b 100644
--- a/sys/contrib/dev/acpica/hardware/hwxface.c
+++ b/sys/contrib/dev/acpica/hardware/hwxface.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/include/acapps.h b/sys/contrib/dev/acpica/include/acapps.h
index 2bec998..0832ca7 100644
--- a/sys/contrib/dev/acpica/include/acapps.h
+++ b/sys/contrib/dev/acpica/include/acapps.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -52,7 +52,7 @@
/* Common info for tool signons */
#define ACPICA_NAME "Intel ACPI Component Architecture"
-#define ACPICA_COPYRIGHT "Copyright (c) 2000 - 2011 Intel Corporation"
+#define ACPICA_COPYRIGHT "Copyright (c) 2000 - 2012 Intel Corporation"
#if ACPI_MACHINE_WIDTH == 64
#define ACPI_WIDTH "-64"
diff --git a/sys/contrib/dev/acpica/include/accommon.h b/sys/contrib/dev/acpica/include/accommon.h
index cc74ed1..93c9031 100644
--- a/sys/contrib/dev/acpica/include/accommon.h
+++ b/sys/contrib/dev/acpica/include/accommon.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/include/acconfig.h b/sys/contrib/dev/acpica/include/acconfig.h
index f653266..1882591 100644
--- a/sys/contrib/dev/acpica/include/acconfig.h
+++ b/sys/contrib/dev/acpica/include/acconfig.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -125,6 +125,10 @@
#define ACPI_MAX_SLEEP 2000 /* 2000 millisec == two seconds */
+/* Address Range lists are per-SpaceId (Memory and I/O only) */
+
+#define ACPI_ADDRESS_RANGE_MAX 2
+
/******************************************************************************
*
diff --git a/sys/contrib/dev/acpica/include/acdebug.h b/sys/contrib/dev/acpica/include/acdebug.h
index 9a96c74..33470fb 100644
--- a/sys/contrib/dev/acpica/include/acdebug.h
+++ b/sys/contrib/dev/acpica/include/acdebug.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/include/acdisasm.h b/sys/contrib/dev/acpica/include/acdisasm.h
index fff1e58..6618de6 100644
--- a/sys/contrib/dev/acpica/include/acdisasm.h
+++ b/sys/contrib/dev/acpica/include/acdisasm.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -63,7 +63,7 @@
typedef const struct acpi_dmtable_info
{
UINT8 Opcode;
- UINT8 Offset;
+ UINT16 Offset;
char *Name;
UINT8 Flags;
diff --git a/sys/contrib/dev/acpica/include/acdispat.h b/sys/contrib/dev/acpica/include/acdispat.h
index ae8dd93..0699ee7 100644
--- a/sys/contrib/dev/acpica/include/acdispat.h
+++ b/sys/contrib/dev/acpica/include/acdispat.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/include/acevents.h b/sys/contrib/dev/acpica/include/acevents.h
index 9f03a51..142c247 100644
--- a/sys/contrib/dev/acpica/include/acevents.h
+++ b/sys/contrib/dev/acpica/include/acevents.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/include/acexcep.h b/sys/contrib/dev/acpica/include/acexcep.h
index 7d426d0..9262d7b 100644
--- a/sys/contrib/dev/acpica/include/acexcep.h
+++ b/sys/contrib/dev/acpica/include/acexcep.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/include/acglobal.h b/sys/contrib/dev/acpica/include/acglobal.h
index 8a23fa9..6b45877 100644
--- a/sys/contrib/dev/acpica/include/acglobal.h
+++ b/sys/contrib/dev/acpica/include/acglobal.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -283,6 +283,7 @@ ACPI_EXTERN BOOLEAN AcpiGbl_AcpiHardwarePresent;
ACPI_EXTERN BOOLEAN AcpiGbl_EventsInitialized;
ACPI_EXTERN UINT8 AcpiGbl_OsiData;
ACPI_EXTERN ACPI_INTERFACE_INFO *AcpiGbl_SupportedInterfaces;
+ACPI_EXTERN ACPI_ADDRESS_RANGE *AcpiGbl_AddressRangeList[ACPI_ADDRESS_RANGE_MAX];
#ifndef DEFINE_ACPI_GLOBALS
diff --git a/sys/contrib/dev/acpica/include/achware.h b/sys/contrib/dev/acpica/include/achware.h
index ae4a77a..e808be4 100644
--- a/sys/contrib/dev/acpica/include/achware.h
+++ b/sys/contrib/dev/acpica/include/achware.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/include/acinterp.h b/sys/contrib/dev/acpica/include/acinterp.h
index 94e6e1d..45e9814 100644
--- a/sys/contrib/dev/acpica/include/acinterp.h
+++ b/sys/contrib/dev/acpica/include/acinterp.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/include/aclocal.h b/sys/contrib/dev/acpica/include/aclocal.h
index 2ad9521..d29a721 100644
--- a/sys/contrib/dev/acpica/include/aclocal.h
+++ b/sys/contrib/dev/acpica/include/aclocal.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -755,6 +755,17 @@ typedef
ACPI_STATUS (*ACPI_EXECUTE_OP) (
struct acpi_walk_state *WalkState);
+/* Address Range info block */
+
+typedef struct acpi_address_range
+{
+ struct acpi_address_range *Next;
+ ACPI_NAMESPACE_NODE *RegionNode;
+ ACPI_PHYSICAL_ADDRESS StartAddress;
+ ACPI_PHYSICAL_ADDRESS EndAddress;
+
+} ACPI_ADDRESS_RANGE;
+
/*****************************************************************************
*
diff --git a/sys/contrib/dev/acpica/include/acmacros.h b/sys/contrib/dev/acpica/include/acmacros.h
index 6581d11..a0be136 100644
--- a/sys/contrib/dev/acpica/include/acmacros.h
+++ b/sys/contrib/dev/acpica/include/acmacros.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/include/acnames.h b/sys/contrib/dev/acpica/include/acnames.h
index af292002..f0bbde8 100644
--- a/sys/contrib/dev/acpica/include/acnames.h
+++ b/sys/contrib/dev/acpica/include/acnames.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/include/acnamesp.h b/sys/contrib/dev/acpica/include/acnamesp.h
index 77f65d0..5e22cb5 100644
--- a/sys/contrib/dev/acpica/include/acnamesp.h
+++ b/sys/contrib/dev/acpica/include/acnamesp.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/include/acobject.h b/sys/contrib/dev/acpica/include/acobject.h
index 8281547..41a8e08 100644
--- a/sys/contrib/dev/acpica/include/acobject.h
+++ b/sys/contrib/dev/acpica/include/acobject.h
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/include/acopcode.h b/sys/contrib/dev/acpica/include/acopcode.h
index fc854a1..e182a07 100644
--- a/sys/contrib/dev/acpica/include/acopcode.h
+++ b/sys/contrib/dev/acpica/include/acopcode.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/include/acoutput.h b/sys/contrib/dev/acpica/include/acoutput.h
index c8007e2..88c1cab 100644
--- a/sys/contrib/dev/acpica/include/acoutput.h
+++ b/sys/contrib/dev/acpica/include/acoutput.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/include/acparser.h b/sys/contrib/dev/acpica/include/acparser.h
index 83b3c4f..f46d3cb 100644
--- a/sys/contrib/dev/acpica/include/acparser.h
+++ b/sys/contrib/dev/acpica/include/acparser.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/include/acpi.h b/sys/contrib/dev/acpica/include/acpi.h
index ea0fc8c..ad0f17b 100644
--- a/sys/contrib/dev/acpica/include/acpi.h
+++ b/sys/contrib/dev/acpica/include/acpi.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/include/acpiosxf.h b/sys/contrib/dev/acpica/include/acpiosxf.h
index 43ca582..9a439aa 100644
--- a/sys/contrib/dev/acpica/include/acpiosxf.h
+++ b/sys/contrib/dev/acpica/include/acpiosxf.h
@@ -9,7 +9,7 @@
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/include/acpixf.h b/sys/contrib/dev/acpica/include/acpixf.h
index d557943..8618c79 100644
--- a/sys/contrib/dev/acpica/include/acpixf.h
+++ b/sys/contrib/dev/acpica/include/acpixf.h
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -48,7 +48,7 @@
/* Current ACPICA subsystem version in YYYYMMDD format */
-#define ACPI_CA_VERSION 0x20111123
+#define ACPI_CA_VERSION 0x20120111
#include <contrib/dev/acpica/include/actypes.h>
#include <contrib/dev/acpica/include/actbl.h>
@@ -145,6 +145,13 @@ ACPI_STATUS
AcpiRemoveInterface (
ACPI_STRING InterfaceName);
+UINT32
+AcpiCheckAddressRange (
+ ACPI_ADR_SPACE_TYPE SpaceId,
+ ACPI_PHYSICAL_ADDRESS Address,
+ ACPI_SIZE Length,
+ BOOLEAN Warn);
+
/*
* ACPI Memory management
diff --git a/sys/contrib/dev/acpica/include/acpredef.h b/sys/contrib/dev/acpica/include/acpredef.h
index f39e283..c17a6d9 100644
--- a/sys/contrib/dev/acpica/include/acpredef.h
+++ b/sys/contrib/dev/acpica/include/acpredef.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/include/acresrc.h b/sys/contrib/dev/acpica/include/acresrc.h
index a2b7318..e9ae052 100644
--- a/sys/contrib/dev/acpica/include/acresrc.h
+++ b/sys/contrib/dev/acpica/include/acresrc.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/include/acrestyp.h b/sys/contrib/dev/acpica/include/acrestyp.h
index d61f86b..b927c9c 100644
--- a/sys/contrib/dev/acpica/include/acrestyp.h
+++ b/sys/contrib/dev/acpica/include/acrestyp.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/include/acstruct.h b/sys/contrib/dev/acpica/include/acstruct.h
index ff588f5..b3927ca 100644
--- a/sys/contrib/dev/acpica/include/acstruct.h
+++ b/sys/contrib/dev/acpica/include/acstruct.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/include/actables.h b/sys/contrib/dev/acpica/include/actables.h
index 6aad862..4277ff5 100644
--- a/sys/contrib/dev/acpica/include/actables.h
+++ b/sys/contrib/dev/acpica/include/actables.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/include/actbl.h b/sys/contrib/dev/acpica/include/actbl.h
index fd53881..35e2ffb 100644
--- a/sys/contrib/dev/acpica/include/actbl.h
+++ b/sys/contrib/dev/acpica/include/actbl.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -298,7 +298,8 @@ typedef struct acpi_table_fadt
ACPI_GENERIC_ADDRESS XPmTimerBlock; /* 64-bit Extended Power Mgt Timer Ctrl Reg Blk address */
ACPI_GENERIC_ADDRESS XGpe0Block; /* 64-bit Extended General Purpose Event 0 Reg Blk address */
ACPI_GENERIC_ADDRESS XGpe1Block; /* 64-bit Extended General Purpose Event 1 Reg Blk address */
- ACPI_GENERIC_ADDRESS SleepRegister; /* 64-bit address of the Sleep register */
+ ACPI_GENERIC_ADDRESS SleepControl; /* 64-bit Sleep Control register */
+ ACPI_GENERIC_ADDRESS SleepStatus; /* 64-bit Sleep Status register */
} ACPI_TABLE_FADT;
@@ -335,8 +336,7 @@ typedef struct acpi_table_fadt
#define ACPI_FADT_APIC_CLUSTER (1<<18) /* 18: [V4] All local APICs must use cluster model (ACPI 3.0) */
#define ACPI_FADT_APIC_PHYSICAL (1<<19) /* 19: [V4] All local xAPICs must use physical dest mode (ACPI 3.0) */
#define ACPI_FADT_HW_REDUCED (1<<20) /* 20: [V5] ACPI hardware is not implemented (ACPI 5.0) */
-#define ACPI_FADT_PREFER_S0_IDLE (1<<21) /* 21: [V5] Use advanced idle capabilities (ACPI 5.0) */
-#define ACPI_FADT_USE_SLEEP_REG (1<<22) /* 22: [V5] Use the sleep register for sleep (ACPI 5.0) */
+#define ACPI_FADT_LOW_POWER_S0 (1<<21) /* 21: [V5] S0 power savings are equal or better than S3 (ACPI 5.0) */
/* Values for PreferredProfile (Prefered Power Management Profiles) */
@@ -351,7 +351,7 @@ enum AcpiPreferedPmProfiles
PM_SOHO_SERVER = 5,
PM_APPLIANCE_PC = 6,
PM_PERFORMANCE_SERVER = 7,
- PM_SLATE = 8
+ PM_TABLET = 8
};
@@ -403,7 +403,7 @@ typedef struct acpi_table_desc
/* Macros used to generate offsets to specific table fields */
-#define ACPI_FADT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_FADT, f)
+#define ACPI_FADT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_FADT, f)
/*
* Sizes of the various flavors of FADT. We need to look closely
@@ -417,11 +417,11 @@ typedef struct acpi_table_desc
* FADT V2 size: 0x084
* FADT V3 size: 0x0F4
* FADT V4 size: 0x0F4
- * FADT V5 size: 0x100
+ * FADT V5 size: 0x10C
*/
#define ACPI_FADT_V1_SIZE (UINT32) (ACPI_FADT_OFFSET (Flags) + 4)
#define ACPI_FADT_V2_SIZE (UINT32) (ACPI_FADT_OFFSET (Reserved4[0]) + 3)
-#define ACPI_FADT_V3_SIZE (UINT32) (ACPI_FADT_OFFSET (SleepRegister))
+#define ACPI_FADT_V3_SIZE (UINT32) (ACPI_FADT_OFFSET (SleepControl))
#define ACPI_FADT_V5_SIZE (UINT32) (sizeof (ACPI_TABLE_FADT))
#endif /* __ACTBL_H__ */
diff --git a/sys/contrib/dev/acpica/include/actbl1.h b/sys/contrib/dev/acpica/include/actbl1.h
index 0458d8b..824135d 100644
--- a/sys/contrib/dev/acpica/include/actbl1.h
+++ b/sys/contrib/dev/acpica/include/actbl1.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/include/actbl2.h b/sys/contrib/dev/acpica/include/actbl2.h
index e4f01e3..70c6a09 100644
--- a/sys/contrib/dev/acpica/include/actbl2.h
+++ b/sys/contrib/dev/acpica/include/actbl2.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/include/actbl3.h b/sys/contrib/dev/acpica/include/actbl3.h
index ee19cac..c5dd418 100644
--- a/sys/contrib/dev/acpica/include/actbl3.h
+++ b/sys/contrib/dev/acpica/include/actbl3.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/include/actypes.h b/sys/contrib/dev/acpica/include/actypes.h
index 43f66f1..2d78c0b 100644
--- a/sys/contrib/dev/acpica/include/actypes.h
+++ b/sys/contrib/dev/acpica/include/actypes.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/include/acutils.h b/sys/contrib/dev/acpica/include/acutils.h
index 185e361..e9c9b95 100644
--- a/sys/contrib/dev/acpica/include/acutils.h
+++ b/sys/contrib/dev/acpica/include/acutils.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -130,7 +130,6 @@ typedef struct acpi_pkg_info
#define DB_DWORD_DISPLAY 4
#define DB_QWORD_DISPLAY 8
-
/*
* utglobal - Global data structures and procedures
*/
@@ -739,6 +738,11 @@ void
AcpiUtStrlwr (
char *SrcString);
+int
+AcpiUtStricmp (
+ char *String1,
+ char *String2);
+
void
AcpiUtPrintString (
char *String,
@@ -914,6 +918,31 @@ AcpiUtCreateList (
#endif /* ACPI_DBG_TRACK_ALLOCATIONS */
+/*
+ * utaddress - address range check
+ */
+ACPI_STATUS
+AcpiUtAddAddressRange (
+ ACPI_ADR_SPACE_TYPE SpaceId,
+ ACPI_PHYSICAL_ADDRESS Address,
+ UINT32 Length,
+ ACPI_NAMESPACE_NODE *RegionNode);
+
+void
+AcpiUtRemoveAddressRange (
+ ACPI_ADR_SPACE_TYPE SpaceId,
+ ACPI_NAMESPACE_NODE *RegionNode);
+
+UINT32
+AcpiUtCheckAddressRange (
+ ACPI_ADR_SPACE_TYPE SpaceId,
+ ACPI_PHYSICAL_ADDRESS Address,
+ UINT32 Length,
+ BOOLEAN Warn);
+
+void
+AcpiUtDeleteAddressLists (
+ void);
/*
* utxferror - various error/warning output functions
diff --git a/sys/contrib/dev/acpica/include/amlcode.h b/sys/contrib/dev/acpica/include/amlcode.h
index 452c26a..f778bb0 100644
--- a/sys/contrib/dev/acpica/include/amlcode.h
+++ b/sys/contrib/dev/acpica/include/amlcode.h
@@ -7,7 +7,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/include/amlresrc.h b/sys/contrib/dev/acpica/include/amlresrc.h
index 3cfcb2a..6d85b8a 100644
--- a/sys/contrib/dev/acpica/include/amlresrc.h
+++ b/sys/contrib/dev/acpica/include/amlresrc.h
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/include/platform/acenv.h b/sys/contrib/dev/acpica/include/platform/acenv.h
index 5a48e32..922e24a 100644
--- a/sys/contrib/dev/acpica/include/platform/acenv.h
+++ b/sys/contrib/dev/acpica/include/platform/acenv.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/include/platform/acfreebsd.h b/sys/contrib/dev/acpica/include/platform/acfreebsd.h
index 151f98f..d7aa7ed 100644
--- a/sys/contrib/dev/acpica/include/platform/acfreebsd.h
+++ b/sys/contrib/dev/acpica/include/platform/acfreebsd.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/include/platform/acgcc.h b/sys/contrib/dev/acpica/include/platform/acgcc.h
index 4b197ff..d2eafff 100644
--- a/sys/contrib/dev/acpica/include/platform/acgcc.h
+++ b/sys/contrib/dev/acpica/include/platform/acgcc.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/namespace/nsaccess.c b/sys/contrib/dev/acpica/namespace/nsaccess.c
index 2cfc8ba..2e28acf 100644
--- a/sys/contrib/dev/acpica/namespace/nsaccess.c
+++ b/sys/contrib/dev/acpica/namespace/nsaccess.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/namespace/nsalloc.c b/sys/contrib/dev/acpica/namespace/nsalloc.c
index 7d90752..607aed2 100644
--- a/sys/contrib/dev/acpica/namespace/nsalloc.c
+++ b/sys/contrib/dev/acpica/namespace/nsalloc.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/namespace/nsdump.c b/sys/contrib/dev/acpica/namespace/nsdump.c
index 09bcb99..fe44ddb 100644
--- a/sys/contrib/dev/acpica/namespace/nsdump.c
+++ b/sys/contrib/dev/acpica/namespace/nsdump.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/namespace/nsdumpdv.c b/sys/contrib/dev/acpica/namespace/nsdumpdv.c
index cabe3e0..54d5ab1 100644
--- a/sys/contrib/dev/acpica/namespace/nsdumpdv.c
+++ b/sys/contrib/dev/acpica/namespace/nsdumpdv.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/namespace/nseval.c b/sys/contrib/dev/acpica/namespace/nseval.c
index 8aefc4d..9a97c6f 100644
--- a/sys/contrib/dev/acpica/namespace/nseval.c
+++ b/sys/contrib/dev/acpica/namespace/nseval.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/namespace/nsinit.c b/sys/contrib/dev/acpica/namespace/nsinit.c
index b17fb3f..6ef516c 100644
--- a/sys/contrib/dev/acpica/namespace/nsinit.c
+++ b/sys/contrib/dev/acpica/namespace/nsinit.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/namespace/nsload.c b/sys/contrib/dev/acpica/namespace/nsload.c
index eacdd76..2d4c788 100644
--- a/sys/contrib/dev/acpica/namespace/nsload.c
+++ b/sys/contrib/dev/acpica/namespace/nsload.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/namespace/nsnames.c b/sys/contrib/dev/acpica/namespace/nsnames.c
index c3d38cb..9628029 100644
--- a/sys/contrib/dev/acpica/namespace/nsnames.c
+++ b/sys/contrib/dev/acpica/namespace/nsnames.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/namespace/nsobject.c b/sys/contrib/dev/acpica/namespace/nsobject.c
index 638b7fc..6d0d4b2 100644
--- a/sys/contrib/dev/acpica/namespace/nsobject.c
+++ b/sys/contrib/dev/acpica/namespace/nsobject.c
@@ -6,7 +6,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/namespace/nsparse.c b/sys/contrib/dev/acpica/namespace/nsparse.c
index 6b21c5d..44c5b89 100644
--- a/sys/contrib/dev/acpica/namespace/nsparse.c
+++ b/sys/contrib/dev/acpica/namespace/nsparse.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/namespace/nspredef.c b/sys/contrib/dev/acpica/namespace/nspredef.c
index ddc6e08..2006c2c 100644
--- a/sys/contrib/dev/acpica/namespace/nspredef.c
+++ b/sys/contrib/dev/acpica/namespace/nspredef.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/namespace/nsrepair.c b/sys/contrib/dev/acpica/namespace/nsrepair.c
index 565c44e..e5c8ac0 100644
--- a/sys/contrib/dev/acpica/namespace/nsrepair.c
+++ b/sys/contrib/dev/acpica/namespace/nsrepair.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/namespace/nsrepair2.c b/sys/contrib/dev/acpica/namespace/nsrepair2.c
index 530b960..06286f1 100644
--- a/sys/contrib/dev/acpica/namespace/nsrepair2.c
+++ b/sys/contrib/dev/acpica/namespace/nsrepair2.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/namespace/nssearch.c b/sys/contrib/dev/acpica/namespace/nssearch.c
index eab0431..d6106eb 100644
--- a/sys/contrib/dev/acpica/namespace/nssearch.c
+++ b/sys/contrib/dev/acpica/namespace/nssearch.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/namespace/nsutils.c b/sys/contrib/dev/acpica/namespace/nsutils.c
index 9fd11b9..f7dc768 100644
--- a/sys/contrib/dev/acpica/namespace/nsutils.c
+++ b/sys/contrib/dev/acpica/namespace/nsutils.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/namespace/nswalk.c b/sys/contrib/dev/acpica/namespace/nswalk.c
index 6e2ac27..640fd7d 100644
--- a/sys/contrib/dev/acpica/namespace/nswalk.c
+++ b/sys/contrib/dev/acpica/namespace/nswalk.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/namespace/nsxfeval.c b/sys/contrib/dev/acpica/namespace/nsxfeval.c
index 8c2a4ff..0c8cb54 100644
--- a/sys/contrib/dev/acpica/namespace/nsxfeval.c
+++ b/sys/contrib/dev/acpica/namespace/nsxfeval.c
@@ -6,7 +6,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/namespace/nsxfname.c b/sys/contrib/dev/acpica/namespace/nsxfname.c
index 03f002f..c1be8cd 100644
--- a/sys/contrib/dev/acpica/namespace/nsxfname.c
+++ b/sys/contrib/dev/acpica/namespace/nsxfname.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/namespace/nsxfobj.c b/sys/contrib/dev/acpica/namespace/nsxfobj.c
index 5428629..687f3c0 100644
--- a/sys/contrib/dev/acpica/namespace/nsxfobj.c
+++ b/sys/contrib/dev/acpica/namespace/nsxfobj.c
@@ -6,7 +6,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/os_specific/service_layers/osunixxf.c b/sys/contrib/dev/acpica/os_specific/service_layers/osunixxf.c
index fde99d4..07d8473 100644
--- a/sys/contrib/dev/acpica/os_specific/service_layers/osunixxf.c
+++ b/sys/contrib/dev/acpica/os_specific/service_layers/osunixxf.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/parser/psargs.c b/sys/contrib/dev/acpica/parser/psargs.c
index c79ab37..f3f7015 100644
--- a/sys/contrib/dev/acpica/parser/psargs.c
+++ b/sys/contrib/dev/acpica/parser/psargs.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/parser/psloop.c b/sys/contrib/dev/acpica/parser/psloop.c
index 21fdab2..c875d26 100644
--- a/sys/contrib/dev/acpica/parser/psloop.c
+++ b/sys/contrib/dev/acpica/parser/psloop.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/parser/psopcode.c b/sys/contrib/dev/acpica/parser/psopcode.c
index c52ef3b..994f188 100644
--- a/sys/contrib/dev/acpica/parser/psopcode.c
+++ b/sys/contrib/dev/acpica/parser/psopcode.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/parser/psparse.c b/sys/contrib/dev/acpica/parser/psparse.c
index c9508e7..099e6dd 100644
--- a/sys/contrib/dev/acpica/parser/psparse.c
+++ b/sys/contrib/dev/acpica/parser/psparse.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/parser/psscope.c b/sys/contrib/dev/acpica/parser/psscope.c
index 39fee4e..7e4acf0 100644
--- a/sys/contrib/dev/acpica/parser/psscope.c
+++ b/sys/contrib/dev/acpica/parser/psscope.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/parser/pstree.c b/sys/contrib/dev/acpica/parser/pstree.c
index b9484fd..e06f711 100644
--- a/sys/contrib/dev/acpica/parser/pstree.c
+++ b/sys/contrib/dev/acpica/parser/pstree.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/parser/psutils.c b/sys/contrib/dev/acpica/parser/psutils.c
index c987920..35149b5 100644
--- a/sys/contrib/dev/acpica/parser/psutils.c
+++ b/sys/contrib/dev/acpica/parser/psutils.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/parser/pswalk.c b/sys/contrib/dev/acpica/parser/pswalk.c
index 8f8d935..6dd2b0d 100644
--- a/sys/contrib/dev/acpica/parser/pswalk.c
+++ b/sys/contrib/dev/acpica/parser/pswalk.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/parser/psxface.c b/sys/contrib/dev/acpica/parser/psxface.c
index df68e6a..2cfd066 100644
--- a/sys/contrib/dev/acpica/parser/psxface.c
+++ b/sys/contrib/dev/acpica/parser/psxface.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/resources/rsaddr.c b/sys/contrib/dev/acpica/resources/rsaddr.c
index 191514c..950cafa 100644
--- a/sys/contrib/dev/acpica/resources/rsaddr.c
+++ b/sys/contrib/dev/acpica/resources/rsaddr.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/resources/rscalc.c b/sys/contrib/dev/acpica/resources/rscalc.c
index 8ce9228..c6af15c 100644
--- a/sys/contrib/dev/acpica/resources/rscalc.c
+++ b/sys/contrib/dev/acpica/resources/rscalc.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/resources/rscreate.c b/sys/contrib/dev/acpica/resources/rscreate.c
index 85e6768..dd1f6ae 100644
--- a/sys/contrib/dev/acpica/resources/rscreate.c
+++ b/sys/contrib/dev/acpica/resources/rscreate.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/resources/rsdump.c b/sys/contrib/dev/acpica/resources/rsdump.c
index 74fedd2..abde5cd 100644
--- a/sys/contrib/dev/acpica/resources/rsdump.c
+++ b/sys/contrib/dev/acpica/resources/rsdump.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/resources/rsinfo.c b/sys/contrib/dev/acpica/resources/rsinfo.c
index 86d5280..ab2254e 100644
--- a/sys/contrib/dev/acpica/resources/rsinfo.c
+++ b/sys/contrib/dev/acpica/resources/rsinfo.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/resources/rsio.c b/sys/contrib/dev/acpica/resources/rsio.c
index 495f15b..71d03c0 100644
--- a/sys/contrib/dev/acpica/resources/rsio.c
+++ b/sys/contrib/dev/acpica/resources/rsio.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/resources/rsirq.c b/sys/contrib/dev/acpica/resources/rsirq.c
index a4b85fe..0179749 100644
--- a/sys/contrib/dev/acpica/resources/rsirq.c
+++ b/sys/contrib/dev/acpica/resources/rsirq.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/resources/rslist.c b/sys/contrib/dev/acpica/resources/rslist.c
index 607748f..493d435 100644
--- a/sys/contrib/dev/acpica/resources/rslist.c
+++ b/sys/contrib/dev/acpica/resources/rslist.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/resources/rsmemory.c b/sys/contrib/dev/acpica/resources/rsmemory.c
index 3446f3c..5cb69dd 100644
--- a/sys/contrib/dev/acpica/resources/rsmemory.c
+++ b/sys/contrib/dev/acpica/resources/rsmemory.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/resources/rsmisc.c b/sys/contrib/dev/acpica/resources/rsmisc.c
index 442b720..2489016 100644
--- a/sys/contrib/dev/acpica/resources/rsmisc.c
+++ b/sys/contrib/dev/acpica/resources/rsmisc.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/resources/rsserial.c b/sys/contrib/dev/acpica/resources/rsserial.c
index 503c8df..09cc7de 100644
--- a/sys/contrib/dev/acpica/resources/rsserial.c
+++ b/sys/contrib/dev/acpica/resources/rsserial.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/resources/rsutils.c b/sys/contrib/dev/acpica/resources/rsutils.c
index 0f3b2d0..083e350 100644
--- a/sys/contrib/dev/acpica/resources/rsutils.c
+++ b/sys/contrib/dev/acpica/resources/rsutils.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/resources/rsxface.c b/sys/contrib/dev/acpica/resources/rsxface.c
index cb01ccf..152f79d 100644
--- a/sys/contrib/dev/acpica/resources/rsxface.c
+++ b/sys/contrib/dev/acpica/resources/rsxface.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/tables/tbfadt.c b/sys/contrib/dev/acpica/tables/tbfadt.c
index 6d12de4..b137446 100644
--- a/sys/contrib/dev/acpica/tables/tbfadt.c
+++ b/sys/contrib/dev/acpica/tables/tbfadt.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -77,14 +77,15 @@ AcpiTbSetupFadtRegisters (
typedef struct acpi_fadt_info
{
char *Name;
- UINT8 Address64;
- UINT8 Address32;
- UINT8 Length;
+ UINT16 Address64;
+ UINT16 Address32;
+ UINT16 Length;
UINT8 DefaultLength;
UINT8 Type;
} ACPI_FADT_INFO;
+#define ACPI_FADT_OPTIONAL 0
#define ACPI_FADT_REQUIRED 1
#define ACPI_FADT_SEPARATE_LENGTH 2
@@ -102,7 +103,7 @@ static ACPI_FADT_INFO FadtInfoTable[] =
ACPI_FADT_OFFSET (Pm1bEventBlock),
ACPI_FADT_OFFSET (Pm1EventLength),
ACPI_PM1_REGISTER_WIDTH * 2, /* Enable + Status register */
- 0},
+ ACPI_FADT_OPTIONAL},
{"Pm1aControlBlock",
ACPI_FADT_OFFSET (XPm1aControlBlock),
@@ -116,7 +117,7 @@ static ACPI_FADT_INFO FadtInfoTable[] =
ACPI_FADT_OFFSET (Pm1bControlBlock),
ACPI_FADT_OFFSET (Pm1ControlLength),
ACPI_PM1_REGISTER_WIDTH,
- 0},
+ ACPI_FADT_OPTIONAL},
{"Pm2ControlBlock",
ACPI_FADT_OFFSET (XPm2ControlBlock),
@@ -156,7 +157,7 @@ static ACPI_FADT_INFO FadtInfoTable[] =
typedef struct acpi_fadt_pm_info
{
ACPI_GENERIC_ADDRESS *Target;
- UINT8 Source;
+ UINT16 Source;
UINT8 RegisterNum;
} ACPI_FADT_PM_INFO;
diff --git a/sys/contrib/dev/acpica/tables/tbfind.c b/sys/contrib/dev/acpica/tables/tbfind.c
index 6b399e1..f3acb42 100644
--- a/sys/contrib/dev/acpica/tables/tbfind.c
+++ b/sys/contrib/dev/acpica/tables/tbfind.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/tables/tbinstal.c b/sys/contrib/dev/acpica/tables/tbinstal.c
index 8697fa1..7cfbf4d 100644
--- a/sys/contrib/dev/acpica/tables/tbinstal.c
+++ b/sys/contrib/dev/acpica/tables/tbinstal.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/tables/tbutils.c b/sys/contrib/dev/acpica/tables/tbutils.c
index 9fb6ed1..6a1068b 100644
--- a/sys/contrib/dev/acpica/tables/tbutils.c
+++ b/sys/contrib/dev/acpica/tables/tbutils.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/tables/tbxface.c b/sys/contrib/dev/acpica/tables/tbxface.c
index 25f3d1c..dc03a2c 100644
--- a/sys/contrib/dev/acpica/tables/tbxface.c
+++ b/sys/contrib/dev/acpica/tables/tbxface.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/tables/tbxfroot.c b/sys/contrib/dev/acpica/tables/tbxfroot.c
index 2ee5916..c6ade4e 100644
--- a/sys/contrib/dev/acpica/tables/tbxfroot.c
+++ b/sys/contrib/dev/acpica/tables/tbxfroot.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/utilities/utaddress.c b/sys/contrib/dev/acpica/utilities/utaddress.c
new file mode 100644
index 0000000..ca73b69
--- /dev/null
+++ b/sys/contrib/dev/acpica/utilities/utaddress.c
@@ -0,0 +1,322 @@
+/******************************************************************************
+ *
+ * Module Name: utaddress - OpRegion address range check
+ *
+ *****************************************************************************/
+
+/*
+ * Copyright (C) 2000 - 2012, Intel Corp.
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ * 3. Neither the names of the above-listed copyright holders nor the names
+ * of any contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ */
+
+#define __UTADDRESS_C__
+
+#include <contrib/dev/acpica/include/acpi.h>
+#include <contrib/dev/acpica/include/accommon.h>
+#include <contrib/dev/acpica/include/acnamesp.h>
+
+
+#define _COMPONENT ACPI_UTILITIES
+ ACPI_MODULE_NAME ("utaddress")
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiUtAddAddressRange
+ *
+ * PARAMETERS: SpaceId - Address space ID
+ * Address - OpRegion start address
+ * Length - OpRegion length
+ * RegionNode - OpRegion namespace node
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Add the Operation Region address range to the global list.
+ * The only supported Space IDs are Memory and I/O. Called when
+ * the OpRegion address/length operands are fully evaluated.
+ *
+ * MUTEX: Locks the namespace
+ *
+ * NOTE: Because this interface is only called when an OpRegion argument
+ * list is evaluated, there cannot be any duplicate RegionNodes.
+ * Duplicate Address/Length values are allowed, however, so that multiple
+ * address conflicts can be detected.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiUtAddAddressRange (
+ ACPI_ADR_SPACE_TYPE SpaceId,
+ ACPI_PHYSICAL_ADDRESS Address,
+ UINT32 Length,
+ ACPI_NAMESPACE_NODE *RegionNode)
+{
+ ACPI_ADDRESS_RANGE *RangeInfo;
+ ACPI_STATUS Status;
+
+
+ ACPI_FUNCTION_TRACE (UtAddAddressRange);
+
+
+ if ((SpaceId != ACPI_ADR_SPACE_SYSTEM_MEMORY) &&
+ (SpaceId != ACPI_ADR_SPACE_SYSTEM_IO))
+ {
+ return_ACPI_STATUS (AE_OK);
+ }
+
+ /* Allocate/init a new info block, add it to the appropriate list */
+
+ RangeInfo = ACPI_ALLOCATE (sizeof (ACPI_ADDRESS_RANGE));
+ if (!RangeInfo)
+ {
+ return_ACPI_STATUS (AE_NO_MEMORY);
+ }
+
+ RangeInfo->StartAddress = Address;
+ RangeInfo->EndAddress = (Address + Length - 1);
+ RangeInfo->RegionNode = RegionNode;
+
+ Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
+ if (ACPI_FAILURE (Status))
+ {
+ ACPI_FREE (RangeInfo);
+ return_ACPI_STATUS (Status);
+ }
+
+ RangeInfo->Next = AcpiGbl_AddressRangeList[SpaceId];
+ AcpiGbl_AddressRangeList[SpaceId] = RangeInfo;
+
+ ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
+ "\nAdded [%4.4s] address range: 0x%p-0x%p\n",
+ AcpiUtGetNodeName (RangeInfo->RegionNode),
+ ACPI_CAST_PTR (void, Address),
+ ACPI_CAST_PTR (void, RangeInfo->EndAddress)));
+
+ (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
+ return_ACPI_STATUS (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiUtRemoveAddressRange
+ *
+ * PARAMETERS: SpaceId - Address space ID
+ * RegionNode - OpRegion namespace node
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Remove the Operation Region from the global list. The only
+ * supported Space IDs are Memory and I/O. Called when an
+ * OpRegion is deleted.
+ *
+ * MUTEX: Assumes the namespace is locked
+ *
+ ******************************************************************************/
+
+void
+AcpiUtRemoveAddressRange (
+ ACPI_ADR_SPACE_TYPE SpaceId,
+ ACPI_NAMESPACE_NODE *RegionNode)
+{
+ ACPI_ADDRESS_RANGE *RangeInfo;
+ ACPI_ADDRESS_RANGE *Prev;
+
+
+ ACPI_FUNCTION_TRACE (UtRemoveAddressRange);
+
+
+ if ((SpaceId != ACPI_ADR_SPACE_SYSTEM_MEMORY) &&
+ (SpaceId != ACPI_ADR_SPACE_SYSTEM_IO))
+ {
+ return_VOID;
+ }
+
+ /* Get the appropriate list head and check the list */
+
+ RangeInfo = Prev = AcpiGbl_AddressRangeList[SpaceId];
+ while (RangeInfo)
+ {
+ if (RangeInfo->RegionNode == RegionNode)
+ {
+ if (RangeInfo == Prev) /* Found at list head */
+ {
+ AcpiGbl_AddressRangeList[SpaceId] = RangeInfo->Next;
+ }
+ else
+ {
+ Prev->Next = RangeInfo->Next;
+ }
+
+ ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
+ "\nRemoved [%4.4s] address range: 0x%p-0x%p\n",
+ AcpiUtGetNodeName (RangeInfo->RegionNode),
+ ACPI_CAST_PTR (void, RangeInfo->StartAddress),
+ ACPI_CAST_PTR (void, RangeInfo->EndAddress)));
+
+ ACPI_FREE (RangeInfo);
+ return_VOID;
+ }
+
+ Prev = RangeInfo;
+ RangeInfo = RangeInfo->Next;
+ }
+
+ return_VOID;
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiUtCheckAddressRange
+ *
+ * PARAMETERS: SpaceId - Address space ID
+ * Address - Start address
+ * Length - Length of address range
+ * Warn - TRUE if warning on overlap desired
+ *
+ * RETURN: Count of the number of conflicts detected. Zero is always
+ * returned for Space IDs other than Memory or I/O.
+ *
+ * DESCRIPTION: Check if the input address range overlaps any of the
+ * ASL operation region address ranges. The only supported
+ * Space IDs are Memory and I/O.
+ *
+ * MUTEX: Assumes the namespace is locked.
+ *
+ ******************************************************************************/
+
+UINT32
+AcpiUtCheckAddressRange (
+ ACPI_ADR_SPACE_TYPE SpaceId,
+ ACPI_PHYSICAL_ADDRESS Address,
+ UINT32 Length,
+ BOOLEAN Warn)
+{
+ ACPI_ADDRESS_RANGE *RangeInfo;
+ ACPI_PHYSICAL_ADDRESS EndAddress;
+ char *Pathname;
+ UINT32 OverlapCount = 0;
+
+
+ ACPI_FUNCTION_TRACE (UtCheckAddressRange);
+
+
+ if ((SpaceId != ACPI_ADR_SPACE_SYSTEM_MEMORY) &&
+ (SpaceId != ACPI_ADR_SPACE_SYSTEM_IO))
+ {
+ return_UINT32 (0);
+ }
+
+ RangeInfo = AcpiGbl_AddressRangeList[SpaceId];
+ EndAddress = Address + Length - 1;
+
+ /* Check entire list for all possible conflicts */
+
+ while (RangeInfo)
+ {
+ /*
+ * Check if the requested Address/Length overlaps this AddressRange.
+ * Four cases to consider:
+ *
+ * 1) Input address/length is contained completely in the address range
+ * 2) Input address/length overlaps range at the range start
+ * 3) Input address/length overlaps range at the range end
+ * 4) Input address/length completely encompasses the range
+ */
+ if ((Address <= RangeInfo->EndAddress) &&
+ (EndAddress >= RangeInfo->StartAddress))
+ {
+ /* Found an address range overlap */
+
+ OverlapCount++;
+ if (Warn) /* Optional warning message */
+ {
+ Pathname = AcpiNsGetExternalPathname (RangeInfo->RegionNode);
+
+ ACPI_WARNING ((AE_INFO,
+ "0x%p-0x%p %s conflicts with Region %s %d",
+ ACPI_CAST_PTR (void, Address),
+ ACPI_CAST_PTR (void, EndAddress),
+ AcpiUtGetRegionName (SpaceId), Pathname, OverlapCount));
+ ACPI_FREE (Pathname);
+ }
+ }
+
+ RangeInfo = RangeInfo->Next;
+ }
+
+ return_UINT32 (OverlapCount);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiUtDeleteAddressLists
+ *
+ * PARAMETERS: None
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Delete all global address range lists (called during
+ * subsystem shutdown).
+ *
+ ******************************************************************************/
+
+void
+AcpiUtDeleteAddressLists (
+ void)
+{
+ ACPI_ADDRESS_RANGE *Next;
+ ACPI_ADDRESS_RANGE *RangeInfo;
+ int i;
+
+
+ /* Delete all elements in all address range lists */
+
+ for (i = 0; i < ACPI_ADDRESS_RANGE_MAX; i++)
+ {
+ Next = AcpiGbl_AddressRangeList[i];
+
+ while (Next)
+ {
+ RangeInfo = Next;
+ Next = RangeInfo->Next;
+ ACPI_FREE (RangeInfo);
+ }
+
+ AcpiGbl_AddressRangeList[i] = NULL;
+ }
+}
diff --git a/sys/contrib/dev/acpica/utilities/utalloc.c b/sys/contrib/dev/acpica/utilities/utalloc.c
index 2f51e24..5e41bbd 100644
--- a/sys/contrib/dev/acpica/utilities/utalloc.c
+++ b/sys/contrib/dev/acpica/utilities/utalloc.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/utilities/utcache.c b/sys/contrib/dev/acpica/utilities/utcache.c
index e7c4665..b8efa68 100644
--- a/sys/contrib/dev/acpica/utilities/utcache.c
+++ b/sys/contrib/dev/acpica/utilities/utcache.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/utilities/utcopy.c b/sys/contrib/dev/acpica/utilities/utcopy.c
index a92295b..f145c57 100644
--- a/sys/contrib/dev/acpica/utilities/utcopy.c
+++ b/sys/contrib/dev/acpica/utilities/utcopy.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/utilities/utdebug.c b/sys/contrib/dev/acpica/utilities/utdebug.c
index 6e1633f..ade7dfe 100644
--- a/sys/contrib/dev/acpica/utilities/utdebug.c
+++ b/sys/contrib/dev/acpica/utilities/utdebug.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/utilities/utdecode.c b/sys/contrib/dev/acpica/utilities/utdecode.c
index 5072082..da59fbc 100644
--- a/sys/contrib/dev/acpica/utilities/utdecode.c
+++ b/sys/contrib/dev/acpica/utilities/utdecode.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/utilities/utdelete.c b/sys/contrib/dev/acpica/utilities/utdelete.c
index c804933..5f7404a 100644
--- a/sys/contrib/dev/acpica/utilities/utdelete.c
+++ b/sys/contrib/dev/acpica/utilities/utdelete.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -235,6 +235,16 @@ AcpiUtDeleteInternalObj (
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS,
"***** Region %p\n", Object));
+ /*
+ * Update AddressRange list. However, only permanent regions
+ * are installed in this list. (Not created within a method)
+ */
+ if (!(Object->Region.Node->Flags & ANOBJ_TEMPORARY))
+ {
+ AcpiUtRemoveAddressRange (Object->Region.SpaceId,
+ Object->Region.Node);
+ }
+
SecondDesc = AcpiNsGetSecondaryObject (Object);
if (SecondDesc)
{
diff --git a/sys/contrib/dev/acpica/utilities/uteval.c b/sys/contrib/dev/acpica/utilities/uteval.c
index 4f5e4a7..57dbec0 100644
--- a/sys/contrib/dev/acpica/utilities/uteval.c
+++ b/sys/contrib/dev/acpica/utilities/uteval.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/utilities/utglobal.c b/sys/contrib/dev/acpica/utilities/utglobal.c
index a978682..0d79dae 100644
--- a/sys/contrib/dev/acpica/utilities/utglobal.c
+++ b/sys/contrib/dev/acpica/utilities/utglobal.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -233,6 +233,13 @@ AcpiUtInitGlobals (
return_ACPI_STATUS (Status);
}
+ /* Address Range lists */
+
+ for (i = 0; i < ACPI_ADDRESS_RANGE_MAX; i++)
+ {
+ AcpiGbl_AddressRangeList[i] = NULL;
+ }
+
/* Mutex locked flags */
for (i = 0; i < ACPI_NUM_MUTEX; i++)
diff --git a/sys/contrib/dev/acpica/utilities/utids.c b/sys/contrib/dev/acpica/utilities/utids.c
index 2fa6140..5d5c8d3 100644
--- a/sys/contrib/dev/acpica/utilities/utids.c
+++ b/sys/contrib/dev/acpica/utilities/utids.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/utilities/utinit.c b/sys/contrib/dev/acpica/utilities/utinit.c
index 4e04bf4..5b2f713 100644
--- a/sys/contrib/dev/acpica/utilities/utinit.c
+++ b/sys/contrib/dev/acpica/utilities/utinit.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -104,6 +104,7 @@ AcpiUtTerminate (
GpeXruptInfo = NextGpeXruptInfo;
}
+ AcpiUtDeleteAddressLists ();
return_VOID;
}
diff --git a/sys/contrib/dev/acpica/utilities/utlock.c b/sys/contrib/dev/acpica/utilities/utlock.c
index 3f2d8c8..4ab3346 100644
--- a/sys/contrib/dev/acpica/utilities/utlock.c
+++ b/sys/contrib/dev/acpica/utilities/utlock.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/utilities/utmath.c b/sys/contrib/dev/acpica/utilities/utmath.c
index e0a39cc..b373923 100644
--- a/sys/contrib/dev/acpica/utilities/utmath.c
+++ b/sys/contrib/dev/acpica/utilities/utmath.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/utilities/utmisc.c b/sys/contrib/dev/acpica/utilities/utmisc.c
index cd632a7..281bb0f 100644
--- a/sys/contrib/dev/acpica/utilities/utmisc.c
+++ b/sys/contrib/dev/acpica/utilities/utmisc.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -466,6 +466,44 @@ AcpiUtStrlwr (
return;
}
+
+
+/******************************************************************************
+ *
+ * FUNCTION: AcpiUtStricmp
+ *
+ * PARAMETERS: String1 - first string to compare
+ * String2 - second string to compare
+ *
+ * RETURN: int that signifies string relationship. Zero means strings
+ * are equal.
+ *
+ * DESCRIPTION: Implementation of the non-ANSI stricmp function (compare
+ * strings with no case sensitivity)
+ *
+ ******************************************************************************/
+
+int
+AcpiUtStricmp (
+ char *String1,
+ char *String2)
+{
+ int c1;
+ int c2;
+
+
+ do
+ {
+ c1 = tolower ((int) *String1);
+ c2 = tolower ((int) *String2);
+
+ String1++;
+ String2++;
+ }
+ while ((c1 == c2) && (c1));
+
+ return (c1 - c2);
+}
#endif
diff --git a/sys/contrib/dev/acpica/utilities/utmutex.c b/sys/contrib/dev/acpica/utilities/utmutex.c
index 973c755..2991c2e 100644
--- a/sys/contrib/dev/acpica/utilities/utmutex.c
+++ b/sys/contrib/dev/acpica/utilities/utmutex.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/utilities/utobject.c b/sys/contrib/dev/acpica/utilities/utobject.c
index 90e1812..9d90a39 100644
--- a/sys/contrib/dev/acpica/utilities/utobject.c
+++ b/sys/contrib/dev/acpica/utilities/utobject.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/utilities/utosi.c b/sys/contrib/dev/acpica/utilities/utosi.c
index bdb7a51..dda5455 100644
--- a/sys/contrib/dev/acpica/utilities/utosi.c
+++ b/sys/contrib/dev/acpica/utilities/utosi.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/utilities/utresrc.c b/sys/contrib/dev/acpica/utilities/utresrc.c
index e0a9bf7..494d3fe 100644
--- a/sys/contrib/dev/acpica/utilities/utresrc.c
+++ b/sys/contrib/dev/acpica/utilities/utresrc.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/utilities/utstate.c b/sys/contrib/dev/acpica/utilities/utstate.c
index 9af1979..2a99fe8 100644
--- a/sys/contrib/dev/acpica/utilities/utstate.c
+++ b/sys/contrib/dev/acpica/utilities/utstate.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/utilities/uttrack.c b/sys/contrib/dev/acpica/utilities/uttrack.c
index b436be0..498db0c 100644
--- a/sys/contrib/dev/acpica/utilities/uttrack.c
+++ b/sys/contrib/dev/acpica/utilities/uttrack.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/utilities/utxface.c b/sys/contrib/dev/acpica/utilities/utxface.c
index bf7835f..1cb23e0 100644
--- a/sys/contrib/dev/acpica/utilities/utxface.c
+++ b/sys/contrib/dev/acpica/utilities/utxface.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -50,6 +50,7 @@
#include <contrib/dev/acpica/include/acnamesp.h>
#include <contrib/dev/acpica/include/acdebug.h>
#include <contrib/dev/acpica/include/actables.h>
+#include <contrib/dev/acpica/include/acinterp.h>
#define _COMPONENT ACPI_UTILITIES
ACPI_MODULE_NAME ("utxface")
@@ -785,5 +786,47 @@ AcpiInstallInterfaceHandler (
ACPI_EXPORT_SYMBOL (AcpiInstallInterfaceHandler)
-#endif /* !ACPI_ASL_COMPILER */
+/*****************************************************************************
+ *
+ * FUNCTION: AcpiCheckAddressRange
+ *
+ * PARAMETERS: SpaceId - Address space ID
+ * Address - Start address
+ * Length - Length
+ * Warn - TRUE if warning on overlap desired
+ *
+ * RETURN: Count of the number of conflicts detected.
+ *
+ * DESCRIPTION: Check if the input address range overlaps any of the
+ * ASL operation region address ranges.
+ *
+ ****************************************************************************/
+
+UINT32
+AcpiCheckAddressRange (
+ ACPI_ADR_SPACE_TYPE SpaceId,
+ ACPI_PHYSICAL_ADDRESS Address,
+ ACPI_SIZE Length,
+ BOOLEAN Warn)
+{
+ UINT32 Overlaps;
+ ACPI_STATUS Status;
+
+
+ Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
+ if (ACPI_FAILURE (Status))
+ {
+ return (0);
+ }
+
+ Overlaps = AcpiUtCheckAddressRange (SpaceId, Address,
+ (UINT32) Length, Warn);
+
+ (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
+ return (Overlaps);
+}
+
+ACPI_EXPORT_SYMBOL (AcpiCheckAddressRange)
+
+#endif /* !ACPI_ASL_COMPILER */
diff --git a/sys/contrib/dev/acpica/utilities/utxferror.c b/sys/contrib/dev/acpica/utilities/utxferror.c
index 5b3eab7..09df461 100644
--- a/sys/contrib/dev/acpica/utilities/utxferror.c
+++ b/sys/contrib/dev/acpica/utilities/utxferror.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/acpica/utilities/utxfmutex.c b/sys/contrib/dev/acpica/utilities/utxfmutex.c
index 0388497..ca07871 100644
--- a/sys/contrib/dev/acpica/utilities/utxfmutex.c
+++ b/sys/contrib/dev/acpica/utilities/utxfmutex.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/contrib/dev/npe/LICENSE b/sys/contrib/dev/npe/LICENSE
index 6bc5371..85ade09 100644
--- a/sys/contrib/dev/npe/LICENSE
+++ b/sys/contrib/dev/npe/LICENSE
@@ -8,5 +8,5 @@ Redistribution. Redistribution and use in binary form, without modification, are
- Neither the name of Intel Corporation nor the names of its suppliers may be used to endorse or promote products derived from this software without specific prior written permission.
- No reverse engineering, decompilation, or disassembly of this software is permitted.
-Limited patent license. Intel Corporation grants a world-wide, royalty-free, non-exclusive license under patents it now or hereafter owns or controls to make, have made, use, import, offer to sell and sell (¿Utilize¿) this software, but solely to the extent that any such patent is necessary to Utilize the software alone. The patent license shall not apply to any combinations which include this software. No hardware per se is licensed hereunder.
+Limited patent license. Intel Corporation grants a world-wide, royalty-free, non-exclusive license under patents it now or hereafter owns or controls to make, have made, use, import, offer to sell and sell ("Utilize") this software, but solely to the extent that any such patent is necessary to Utilize the software alone. The patent license shall not apply to any combinations which include this software. No hardware per se is licensed hereunder.
DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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.
diff --git a/sys/contrib/dev/nve/amd64/nvenetlib.README b/sys/contrib/dev/nve/amd64/nvenetlib.README
index fd4f6b8..3b93feb 100644
--- a/sys/contrib/dev/nve/amd64/nvenetlib.README
+++ b/sys/contrib/dev/nve/amd64/nvenetlib.README
@@ -4,7 +4,7 @@ The installation and use of this software is subject to the following license te
License For Customer Use of NVIDIA Software
-IMPORTANT NOTICE -- READ CAREFULLY: This License For Customer Use of NVIDIA Software ("LICENSE") is the agreement which governs use of the software of NVIDIA Corporation and its subsidiaries (“NVIDIA”) enclosed herewith, including computer software and associated printed materials ("SOFTWARE"). By downloading, installing, copying, or otherwise using the SOFTWARE, you agree to be bound by the terms of this LICENSE. If you do not agree to the terms of this LICENSE, do not download, install or use the SOFTWARE.
+IMPORTANT NOTICE -- READ CAREFULLY: This License For Customer Use of NVIDIA Software ("LICENSE") is the agreement which governs use of the software of NVIDIA Corporation and its subsidiaries ("NVIDIA") enclosed herewith, including computer software and associated printed materials ("SOFTWARE"). By downloading, installing, copying, or otherwise using the SOFTWARE, you agree to be bound by the terms of this LICENSE. If you do not agree to the terms of this LICENSE, do not download, install or use the SOFTWARE.
RECITALS
Use of NVIDIA's products requires three elements: the SOFTWARE, the hardware on a computer motherboard, and a personal computer. The SOFTWARE is protected by copyright laws and international copyright treaties, as well as other intellectual property laws and treaties. The SOFTWARE is not sold, and instead is only licensed for use, strictly in accordance with this document. The hardware is protected by various patents, and is sold, but this agreement does not cover that sale, since it may not necessarily be sold as a package with the SOFTWARE. This agreement sets forth the terms and conditions of the SOFTWARE LICENSE only.
diff --git a/sys/contrib/dev/nve/i386/nvenetlib.README b/sys/contrib/dev/nve/i386/nvenetlib.README
index fd4f6b8..3b93feb 100644
--- a/sys/contrib/dev/nve/i386/nvenetlib.README
+++ b/sys/contrib/dev/nve/i386/nvenetlib.README
@@ -4,7 +4,7 @@ The installation and use of this software is subject to the following license te
License For Customer Use of NVIDIA Software
-IMPORTANT NOTICE -- READ CAREFULLY: This License For Customer Use of NVIDIA Software ("LICENSE") is the agreement which governs use of the software of NVIDIA Corporation and its subsidiaries (“NVIDIA”) enclosed herewith, including computer software and associated printed materials ("SOFTWARE"). By downloading, installing, copying, or otherwise using the SOFTWARE, you agree to be bound by the terms of this LICENSE. If you do not agree to the terms of this LICENSE, do not download, install or use the SOFTWARE.
+IMPORTANT NOTICE -- READ CAREFULLY: This License For Customer Use of NVIDIA Software ("LICENSE") is the agreement which governs use of the software of NVIDIA Corporation and its subsidiaries ("NVIDIA") enclosed herewith, including computer software and associated printed materials ("SOFTWARE"). By downloading, installing, copying, or otherwise using the SOFTWARE, you agree to be bound by the terms of this LICENSE. If you do not agree to the terms of this LICENSE, do not download, install or use the SOFTWARE.
RECITALS
Use of NVIDIA's products requires three elements: the SOFTWARE, the hardware on a computer motherboard, and a personal computer. The SOFTWARE is protected by copyright laws and international copyright treaties, as well as other intellectual property laws and treaties. The SOFTWARE is not sold, and instead is only licensed for use, strictly in accordance with this document. The hardware is protected by various patents, and is sold, but this agreement does not cover that sale, since it may not necessarily be sold as a package with the SOFTWARE. This agreement sets forth the terms and conditions of the SOFTWARE LICENSE only.
diff --git a/sys/contrib/ngatm/netnatm/msg/uni_ie.c b/sys/contrib/ngatm/netnatm/msg/uni_ie.c
index 2388251..eed6458 100644
--- a/sys/contrib/ngatm/netnatm/msg/uni_ie.c
+++ b/sys/contrib/ngatm/netnatm/msg/uni_ie.c
@@ -47,6 +47,8 @@
#include <netnatm/msg/uniprint.h>
#include <netnatm/msg/priv.h>
+#define UNUSED(_p) do { (void)(_p); } while (0)
+
/*
* Define internal functions.
*/
@@ -1321,7 +1323,7 @@ check_cause(struct uni_ie_cause *ie, struct unicx *cx,
return (-1);
}
if (ie->h.present & UNI_CAUSE_PARAM_P) {
- cx = cx;
+ UNUSED(cx);
}
return (0);
@@ -1656,7 +1658,7 @@ DEF_IE_PRINT(itu, callstate)
DEF_IE_CHECK(itu, callstate)
{
- cx = cx;
+ UNUSED(cx);
switch(ie->state) {
default:
@@ -1742,7 +1744,7 @@ DEF_IE_PRINT(itu, facility)
DEF_IE_CHECK(itu, facility)
{
- cx = cx;
+ UNUSED(cx);
if(ie->len > UNI_FACILITY_MAXAPDU)
return -1;
@@ -1811,7 +1813,7 @@ DEF_IE_PRINT(itu, notify)
DEF_IE_CHECK(itu, notify)
{
- cx = cx;
+ UNUSED(cx);
if(ie->len > UNI_NOTIFY_MAXLEN)
return -1;
@@ -1904,7 +1906,7 @@ DEF_IE_PRINT(net, eetd)
DEF_IE_CHECK(itu, eetd)
{
- cx = cx;
+ UNUSED(cx);
if (!(ie->h.present & UNI_EETD_CUM_P))
return (-1);
@@ -2298,7 +2300,7 @@ DEF_IE_PRINT(itu, called)
DEF_IE_CHECK(itu, called)
{
- cx = cx;
+ UNUSED(cx);
if (check_addr(&ie->addr))
return (-1);
@@ -2345,7 +2347,7 @@ DEF_IE_PRINT(itu, calledsub)
DEF_IE_CHECK(itu, calledsub)
{
- cx = cx;
+ UNUSED(cx);
if(check_subaddr(&ie->addr))
return -1;
@@ -2396,7 +2398,7 @@ DEF_IE_PRINT(itu, calling)
DEF_IE_CHECK(itu, calling)
{
- cx = cx;
+ UNUSED(cx);
if(check_addr(&ie->addr))
return -1;
@@ -2459,7 +2461,7 @@ DEF_IE_PRINT(itu, callingsub)
DEF_IE_CHECK(itu, callingsub)
{
- cx = cx;
+ UNUSED(cx);
if(check_subaddr(&ie->addr))
return -1;
@@ -2510,7 +2512,7 @@ DEF_IE_PRINT(itu, conned)
DEF_IE_CHECK(itu, conned)
{
- cx = cx;
+ UNUSED(cx);
if(check_addr(&ie->addr))
return -1;
@@ -2573,7 +2575,7 @@ DEF_IE_PRINT(itu, connedsub)
DEF_IE_CHECK(itu, connedsub)
{
- cx = cx;
+ UNUSED(cx);
if(check_subaddr(&ie->addr))
return -1;
@@ -2627,7 +2629,7 @@ DEF_IE_PRINT(itu, epref)
DEF_IE_CHECK(itu, epref)
{
- cx = cx;
+ UNUSED(cx);
if(ie->epref >= (2<<15))
return -1;
@@ -2702,7 +2704,7 @@ DEF_IE_PRINT(itu, epstate)
DEF_IE_CHECK(itu, epstate)
{
- cx = cx;
+ UNUSED(cx);
switch(ie->state) {
default:
@@ -2895,7 +2897,7 @@ DEF_IE_PRINT(itu, aal)
DEF_IE_CHECK(itu, aal)
{
- cx = cx;
+ UNUSED(cx);
if(ie->type == UNI_AAL_0) {
;
@@ -3784,7 +3786,7 @@ DEF_IE_CHECK(itu, mintraffic)
{
u_int abr;
u_int xbr;
- cx = cx;
+ UNUSED(cx);
abr = ie->h.present & (UNI_MINTRAFFIC_FABR1_P|UNI_MINTRAFFIC_BABR1_P);
xbr = ie->h.present & (UNI_MINTRAFFIC_FPCR0_P|UNI_MINTRAFFIC_BPCR0_P|
@@ -3869,7 +3871,7 @@ DEF_IE_PRINT(net, mdcr)
DEF_IE_CHECK(net, mdcr)
{
- cx = cx;
+ UNUSED(cx);
if ((ie->origin != UNI_MDCR_ORIGIN_USER &&
ie->origin != UNI_MDCR_ORIGIN_NET) ||
@@ -3965,7 +3967,7 @@ DEF_IE_PRINT(itu, connid)
DEF_IE_CHECK(itu, connid)
{
- cx = cx;
+ UNUSED(cx);
switch(ie->type) {
default:
return -1;
@@ -4075,7 +4077,7 @@ DEF_IE_PRINT(net, qos)
DEF_IE_CHECK(itu, qos)
{
- cx = cx;
+ UNUSED(cx);
switch(ie->fwd) {
default:
@@ -4096,7 +4098,7 @@ DEF_IE_CHECK(itu, qos)
DEF_IE_CHECK(net, qos)
{
- cx = cx;
+ UNUSED(cx);
switch(ie->fwd) {
default:
@@ -4205,7 +4207,7 @@ DEF_IE_PRINT(itu, bhli)
DEF_IE_CHECK(itu, bhli)
{
- cx = cx;
+ UNUSED(cx);
switch(ie->type) {
default:
@@ -4357,7 +4359,7 @@ DEF_IE_PRINT(itu, bearer)
#define QTYPE0(C) ((UNI_BEARER_##C << 8) | (1 << 16))
DEF_IE_CHECK(itu, bearer)
{
- cx = cx;
+ UNUSED(cx);
switch((ie->bclass << 8) |
((ie->h.present & UNI_BEARER_ATC_P) == 0
@@ -4656,7 +4658,7 @@ DEF_IE_PRINT(itu, blli)
DEF_IE_CHECK(itu, blli)
{
- cx = cx;
+ UNUSED(cx);
/*
if(ie->h.present & UNI_BLLI_L1_P)
;
@@ -5171,7 +5173,7 @@ DEF_IE_PRINT(itu, lshift)
DEF_IE_CHECK(itu, lshift)
{
- cx = cx; ie = ie;
+ UNUSED(cx); UNUSED(ie);
return -1;
}
@@ -5212,7 +5214,7 @@ DEF_IE_PRINT(itu, nlshift)
DEF_IE_CHECK(itu, nlshift)
{
- cx = cx; ie = ie;
+ UNUSED(cx); UNUSED(ie);
return -1;
}
@@ -5261,7 +5263,7 @@ DEF_IE_PRINT(itu, scompl)
DEF_IE_CHECK(itu, scompl)
{
- ie = ie; cx = cx;
+ UNUSED(ie); UNUSED(cx);
return 0;
}
@@ -5398,7 +5400,7 @@ DEF_IE_CHECK(itu, tns)
{
u_int i;
- cx = cx;
+ UNUSED(cx);
if(ie->len == 0 || ie->len > UNI_TNS_MAXLEN)
return -1;
@@ -5466,7 +5468,7 @@ DEF_IE_PRINT(itu, restart)
DEF_IE_CHECK(itu, restart)
{
- cx = cx;
+ UNUSED(cx);
switch(ie->rclass) {
default:
@@ -5535,7 +5537,7 @@ DEF_IE_PRINT(itu, uu)
DEF_IE_CHECK(itu, uu)
{
- cx = cx;
+ UNUSED(cx);
if(ie->len > UNI_UU_MAXLEN)
return -1;
@@ -5754,8 +5756,8 @@ DEF_IE_PRINT(net, abradd)
DEF_IE_CHECK(net, abradd)
{
- cx = cx;
- ie = ie;
+ UNUSED(cx);
+ UNUSED(ie);
return 0;
}
@@ -6015,7 +6017,7 @@ DEF_IE_PRINT(itu, report)
DEF_IE_CHECK(itu, report)
{
- cx = cx;
+ UNUSED(cx);
switch(ie->report) {
@@ -6098,7 +6100,7 @@ DEF_IE_PRINT(net, called_soft)
DEF_IE_CHECK(net, calling_soft)
{
- cx = cx;
+ UNUSED(cx);
if(ie->vpi >= 1 << 12)
return -1;
@@ -6107,7 +6109,7 @@ DEF_IE_CHECK(net, calling_soft)
DEF_IE_CHECK(net, called_soft)
{
- cx = cx;
+ UNUSED(cx);
switch(ie->sel) {
@@ -6357,7 +6359,7 @@ DEF_IE_PRINT(net, crankback)
DEF_IE_CHECK(net, crankback)
{
- cx = cx;
+ UNUSED(cx);
if(ie->level > 104)
return -1;
@@ -6595,7 +6597,7 @@ DEF_IE_CHECK(net, dtl)
{
u_int i;
- cx = cx;
+ UNUSED(cx);
if(ie->ptr % UNI_DTL_LOGNP_SIZE != 0)
return -1;
@@ -6703,7 +6705,7 @@ DEF_IE_PRINT(net, lij_callid)
DEF_IE_CHECK(net, lij_callid)
{
- cx = cx;
+ UNUSED(cx);
switch(ie->type) {
@@ -6761,7 +6763,7 @@ DEF_IE_PRINT(net, lij_param)
DEF_IE_CHECK(net, lij_param)
{
- cx = cx;
+ UNUSED(cx);
switch(ie->screen) {
@@ -6809,7 +6811,7 @@ DEF_IE_PRINT(net, lij_seqno)
DEF_IE_CHECK(net, lij_seqno)
{
- cx = cx; ie = ie;
+ UNUSED(cx); UNUSED(ie);
return 0;
}
@@ -6888,7 +6890,7 @@ DEF_IE_PRINT(net, cscope)
DEF_IE_CHECK(net, cscope)
{
- cx = cx;
+ UNUSED(cx);
switch(ie->type) {
@@ -7018,7 +7020,7 @@ DEF_IE_PRINT(net, exqos)
DEF_IE_CHECK(net, exqos)
{
- cx = cx;
+ UNUSED(cx);
switch(ie->origin) {
case UNI_EXQOS_USER:
@@ -7130,7 +7132,7 @@ DEF_IE_PRINT(itu, unrec)
DEF_IE_CHECK(itu, unrec)
{
- cx = cx;
+ UNUSED(cx);
if (ie->len > sizeof(ie->data))
return (-1);
diff --git a/sys/contrib/octeon-sdk/cvmx-helper-board.c b/sys/contrib/octeon-sdk/cvmx-helper-board.c
index fe2f236..9ce4a53 100644
--- a/sys/contrib/octeon-sdk/cvmx-helper-board.c
+++ b/sys/contrib/octeon-sdk/cvmx-helper-board.c
@@ -866,6 +866,9 @@ cvmx_helper_board_usb_clock_types_t __cvmx_helper_board_usb_get_clock_type(void)
case CVMX_BOARD_TYPE_CUST_LANNER_MR320:
case CVMX_BOARD_TYPE_CUST_LANNER_MR321X:
#endif
+#if defined(OCTEON_BOARD_CAPK_0100ND)
+ case CVMX_BOARD_TYPE_CN3010_EVB_HS5:
+#endif
return USB_CLOCK_TYPE_CRYSTAL_12;
}
return USB_CLOCK_TYPE_REF_48;
diff --git a/sys/contrib/octeon-sdk/cvmx-pcie.c b/sys/contrib/octeon-sdk/cvmx-pcie.c
index 7c8dc2a..bfa6091 100644
--- a/sys/contrib/octeon-sdk/cvmx-pcie.c
+++ b/sys/contrib/octeon-sdk/cvmx-pcie.c
@@ -501,6 +501,12 @@ retry:
}
}
+ /* Make sure a CN56XX pass 1 isn't trying to do anything; errata for PASS 1 */
+ if (OCTEON_IS_MODEL(OCTEON_CN56XX_PASS1_X)) {
+ cvmx_dprintf ("PCIe port %d: CN56XX_PASS_1, skipping\n", pcie_port);
+ return -1;
+ }
+
/* PCIe switch arbitration mode. '0' == fixed priority NPEI, PCIe0, then PCIe1. '1' == round robin. */
npei_ctl_status.s.arb = 1;
/* Allow up to 0x20 config retries */
diff --git a/sys/contrib/octeon-sdk/cvmx-usb.c b/sys/contrib/octeon-sdk/cvmx-usb.c
index d660f0e..01dabe8 100644
--- a/sys/contrib/octeon-sdk/cvmx-usb.c
+++ b/sys/contrib/octeon-sdk/cvmx-usb.c
@@ -654,7 +654,7 @@ cvmx_usb_status_t cvmx_usb_initialize(cvmx_usb_state_t *state,
}
}
- memset(usb, 0, sizeof(usb));
+ memset(usb, 0, sizeof(*usb));
usb->init_flags = flags;
/* Initialize the USB state structure */
diff --git a/sys/contrib/pf/net/if_pfsync.c b/sys/contrib/pf/net/if_pfsync.c
index f60f70b..0f3f5cc 100644
--- a/sys/contrib/pf/net/if_pfsync.c
+++ b/sys/contrib/pf/net/if_pfsync.c
@@ -42,32 +42,24 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+/*
+ * Revisions picked from OpenBSD after revision 1.110 import:
+ * 1.118, 1.124, 1.148, 1.149, 1.151, 1.171 - fixes to bulk updates
+ * 1.120, 1.175 - use monotonic time_uptime
+ * 1.122 - reduce number of updates for non-TCP sessions
+ * 1.128 - cleanups
+ * 1.170 - SIOCSIFMTU checks
+ */
+
#ifdef __FreeBSD__
#include "opt_inet.h"
#include "opt_inet6.h"
-#include "opt_bpf.h"
#include "opt_pf.h"
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#ifdef DEV_BPF
-#define NBPFILTER DEV_BPF
-#else
-#define NBPFILTER 0
-#endif
-
-#ifdef DEV_PFSYNC
-#define NPFSYNC DEV_PFSYNC
-#else
-#define NPFSYNC 0
-#endif
-
-#ifdef DEV_CARP
-#define NCARP DEV_CARP
-#else
-#define NCARP 0
-#endif
+#define NBPFILTER 1
#endif /* __FreeBSD__ */
#include <sys/param.h>
@@ -90,6 +82,7 @@ __FBSDID("$FreeBSD$");
#include <sys/taskqueue.h>
#include <sys/lock.h>
#include <sys/mutex.h>
+#include <sys/protosw.h>
#else
#include <sys/ioctl.h>
#include <sys/timeout.h>
@@ -127,12 +120,14 @@ __FBSDID("$FreeBSD$");
#include <netinet6/nd6.h>
#endif /* INET6 */
-#ifndef __FreeBSD__
+#ifdef __FreeBSD__
+#include <netinet/ip_carp.h>
+#else
#include "carp.h"
-#endif
#if NCARP > 0
#include <netinet/ip_carp.h>
#endif
+#endif
#include <net/pfvar.h>
#include <net/if_pfsync.h>
@@ -296,39 +291,40 @@ struct pfsync_softc {
#else
struct timeout sc_tmo;
#endif
-#ifdef __FreeBSD__
- eventhandler_tag sc_detachtag;
-#endif
-
};
#ifdef __FreeBSD__
+static MALLOC_DEFINE(M_PFSYNC, "pfsync", "pfsync data");
static VNET_DEFINE(struct pfsync_softc *, pfsyncif) = NULL;
#define V_pfsyncif VNET(pfsyncif)
-
+static VNET_DEFINE(void *, pfsync_swi_cookie) = NULL;
+#define V_pfsync_swi_cookie VNET(pfsync_swi_cookie)
static VNET_DEFINE(struct pfsyncstats, pfsyncstats);
#define V_pfsyncstats VNET(pfsyncstats)
+static VNET_DEFINE(int, pfsync_carp_adj) = CARP_MAXSKEW;
+#define V_pfsync_carp_adj VNET(pfsync_carp_adj)
+
+static void pfsyncintr(void *);
+static int pfsync_multicast_setup(struct pfsync_softc *);
+static void pfsync_multicast_cleanup(struct pfsync_softc *);
+static int pfsync_init(void);
+static void pfsync_uninit(void);
+static void pfsync_sendout1(int);
+
+#define schednetisr(NETISR_PFSYNC) swi_sched(V_pfsync_swi_cookie, 0)
SYSCTL_NODE(_net, OID_AUTO, pfsync, CTLFLAG_RW, 0, "PFSYNC");
SYSCTL_VNET_STRUCT(_net_pfsync, OID_AUTO, stats, CTLFLAG_RW,
&VNET_NAME(pfsyncstats), pfsyncstats,
"PFSYNC statistics (struct pfsyncstats, net/if_pfsync.h)");
+SYSCTL_INT(_net_pfsync, OID_AUTO, carp_demotion_factor, CTLFLAG_RW,
+ &VNET_NAME(pfsync_carp_adj), 0, "pfsync's CARP demotion factor adjustment");
#else
struct pfsync_softc *pfsyncif = NULL;
struct pfsyncstats pfsyncstats;
#define V_pfsyncstats pfsyncstats
#endif
-#ifdef __FreeBSD__
-static void pfsyncintr(void *);
-struct pfsync_swi {
- void * pfsync_swi_cookie;
-};
-static struct pfsync_swi pfsync_swi;
-#define schednetisr(p) swi_sched(pfsync_swi.pfsync_swi_cookie, 0)
-#define NETISR_PFSYNC
-#endif
-
void pfsyncattach(int);
#ifdef __FreeBSD__
int pfsync_clone_create(struct if_clone *, int, caddr_t);
@@ -350,7 +346,6 @@ int pfsyncioctl(struct ifnet *, u_long, caddr_t);
void pfsyncstart(struct ifnet *);
struct mbuf *pfsync_if_dequeue(struct ifnet *);
-struct mbuf *pfsync_get_mbuf(struct pfsync_softc *);
void pfsync_deferred(struct pf_state *, int);
void pfsync_undefer(struct pfsync_deferral *, int);
@@ -362,11 +357,8 @@ void pfsync_update_state_req(struct pf_state *);
void pfsync_drop(struct pfsync_softc *);
void pfsync_sendout(void);
void pfsync_send_plus(void *, size_t);
-int pfsync_tdb_sendout(struct pfsync_softc *);
-int pfsync_sendout_mbuf(struct pfsync_softc *, struct mbuf *);
void pfsync_timeout(void *);
void pfsync_tdb_timeout(void *);
-void pfsync_send_bus(struct pfsync_softc *, u_int8_t);
void pfsync_bulk_start(void);
void pfsync_bulk_status(u_int8_t);
@@ -374,8 +366,6 @@ void pfsync_bulk_update(void *);
void pfsync_bulk_fail(void *);
#ifdef __FreeBSD__
-void pfsync_ifdetach(void *, struct ifnet *);
-
/* XXX: ugly */
#define betoh64 (unsigned long long)be64toh
#define timeout_del callout_stop
@@ -387,6 +377,10 @@ int pfsync_sync_ok;
#endif
#ifdef __FreeBSD__
+VNET_DEFINE(struct ifc_simple_data, pfsync_cloner_data);
+VNET_DEFINE(struct if_clone, pfsync_cloner);
+#define V_pfsync_cloner_data VNET(pfsync_cloner_data)
+#define V_pfsync_cloner VNET(pfsync_cloner)
IFC_SIMPLE_DECLARE(pfsync, 1);
#else
struct if_clone pfsync_cloner =
@@ -412,25 +406,20 @@ pfsync_clone_create(struct if_clone *ifc, int unit)
if (unit != 0)
return (EINVAL);
-#ifndef __FreeBSD__
+#ifdef __FreeBSD__
+ sc = malloc(sizeof(struct pfsync_softc), M_PFSYNC, M_WAITOK | M_ZERO);
+ sc->pfsync_sync_ok = 1;
+#else
pfsync_sync_ok = 1;
+ sc = malloc(sizeof(*pfsyncif), M_DEVBUF, M_NOWAIT | M_ZERO);
#endif
- sc = malloc(sizeof(struct pfsync_softc), M_DEVBUF, M_NOWAIT | M_ZERO);
- if (sc == NULL)
- return (ENOMEM);
-
for (q = 0; q < PFSYNC_S_COUNT; q++)
TAILQ_INIT(&sc->sc_qs[q]);
#ifdef __FreeBSD__
- sc->pfsync_sync_ok = 1;
- sc->sc_pool = uma_zcreate("pfsync", PFSYNC_PLSIZE,
- NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0);
- if (sc->sc_pool == NULL) {
- free(sc, M_DEVBUF);
- return (ENOMEM);
- }
+ sc->sc_pool = uma_zcreate("pfsync", PFSYNC_PLSIZE, NULL, NULL, NULL,
+ NULL, UMA_ALIGN_PTR, 0);
#else
pool_init(&sc->sc_pool, PFSYNC_PLSIZE, 0, 0, 0, "pfsync", NULL);
#endif
@@ -443,13 +432,7 @@ pfsync_clone_create(struct if_clone *ifc, int unit)
sc->sc_len = PFSYNC_MINPKT;
sc->sc_maxupdates = 128;
-#ifdef __FreeBSD__
- sc->sc_imo.imo_membership = (struct in_multi **)malloc(
- (sizeof(struct in_multi *) * IP_MIN_MEMBERSHIPS), M_DEVBUF,
- M_NOWAIT | M_ZERO);
- sc->sc_imo.imo_max_memberships = IP_MIN_MEMBERSHIPS;
- sc->sc_imo.imo_multicast_vif = -1;
-#else
+#ifndef __FreeBSD__
sc->sc_imo.imo_membership = (struct in_multi **)malloc(
(sizeof(struct in_multi *) * IP_MIN_MEMBERSHIPS), M_IPMOPTS,
M_WAITOK | M_ZERO);
@@ -459,26 +442,11 @@ pfsync_clone_create(struct if_clone *ifc, int unit)
#ifdef __FreeBSD__
ifp = sc->sc_ifp = if_alloc(IFT_PFSYNC);
if (ifp == NULL) {
- free(sc->sc_imo.imo_membership, M_DEVBUF);
uma_zdestroy(sc->sc_pool);
- free(sc, M_DEVBUF);
+ free(sc, M_PFSYNC);
return (ENOSPC);
}
if_initname(ifp, ifc->ifc_name, unit);
-
- sc->sc_detachtag = EVENTHANDLER_REGISTER(ifnet_departure_event,
-#ifdef __FreeBSD__
- pfsync_ifdetach, V_pfsyncif, EVENTHANDLER_PRI_ANY);
-#else
- pfsync_ifdetach, pfsyncif, EVENTHANDLER_PRI_ANY);
-#endif
- if (sc->sc_detachtag == NULL) {
- if_free(ifp);
- free(sc->sc_imo.imo_membership, M_DEVBUF);
- uma_zdestroy(sc->sc_pool);
- free(sc, M_DEVBUF);
- return (ENOSPC);
- }
#else
ifp = &sc->sc_if;
snprintf(ifp->if_xname, sizeof ifp->if_xname, "pfsync%d", unit);
@@ -490,13 +458,12 @@ pfsync_clone_create(struct if_clone *ifc, int unit)
ifp->if_type = IFT_PFSYNC;
ifp->if_snd.ifq_maxlen = ifqmaxlen;
ifp->if_hdrlen = sizeof(struct pfsync_header);
- ifp->if_mtu = 1500; /* XXX */
+ ifp->if_mtu = ETHERMTU;
#ifdef __FreeBSD__
callout_init(&sc->sc_tmo, CALLOUT_MPSAFE);
callout_init_mtx(&sc->sc_bulk_tmo, &pf_task_mtx, 0);
callout_init(&sc->sc_bulkfail_tmo, CALLOUT_MPSAFE);
#else
- ifp->if_hardmtu = MCLBYTES; /* XXX */
timeout_set(&sc->sc_tmo, pfsync_timeout, sc);
timeout_set(&sc->sc_bulk_tmo, pfsync_bulk_update, sc);
timeout_set(&sc->sc_bulkfail_tmo, pfsync_bulk_fail, sc);
@@ -505,11 +472,11 @@ pfsync_clone_create(struct if_clone *ifc, int unit)
if_attach(ifp);
#ifndef __FreeBSD__
if_alloc_sadl(ifp);
-#endif
#if NCARP > 0
if_addgroup(ifp, "carp");
#endif
+#endif
#if NBPFILTER > 0
#ifdef __FreeBSD__
@@ -538,17 +505,18 @@ pfsync_clone_destroy(struct ifnet *ifp)
struct pfsync_softc *sc = ifp->if_softc;
#ifdef __FreeBSD__
- EVENTHANDLER_DEREGISTER(ifnet_departure_event, sc->sc_detachtag);
+ PF_LOCK();
#endif
- timeout_del(&sc->sc_bulk_tmo); /* XXX: need PF_LOCK() before */
+ timeout_del(&sc->sc_bulkfail_tmo);
+ timeout_del(&sc->sc_bulk_tmo);
timeout_del(&sc->sc_tmo);
-#if NCARP > 0
-#ifdef notyet
#ifdef __FreeBSD__
- if (!sc->pfsync_sync_ok)
+ PF_UNLOCK();
+ if (!sc->pfsync_sync_ok && carp_demote_adj_p)
+ (*carp_demote_adj_p)(-V_pfsync_carp_adj, "pfsync destroy");
#else
+#if NCARP > 0
if (!pfsync_sync_ok)
-#endif
carp_group_demote_adj(&sc->sc_if, -1);
#endif
#endif
@@ -569,11 +537,13 @@ pfsync_clone_destroy(struct ifnet *ifp)
#endif
#ifdef __FreeBSD__
if_free(ifp);
- free(sc->sc_imo.imo_membership, M_DEVBUF);
+ if (sc->sc_imo.imo_membership)
+ pfsync_multicast_cleanup(sc);
+ free(sc, M_PFSYNC);
#else
free(sc->sc_imo.imo_membership, M_IPMOPTS);
-#endif
free(sc, M_DEVBUF);
+#endif
#ifdef __FreeBSD__
V_pfsyncif = NULL;
@@ -662,7 +632,7 @@ pfsync_state_export(struct pfsync_state *sp, struct pf_state *st)
/* copy from state */
strlcpy(sp->ifname, st->kif->pfik_name, sizeof(sp->ifname));
bcopy(&st->rt_addr, &sp->rt_addr, sizeof(sp->rt_addr));
- sp->creation = htonl(time_second - st->creation);
+ sp->creation = htonl(time_uptime - st->creation);
sp->expire = pf_state_expires(st);
if (sp->expire <= time_second)
sp->expire = htonl(0);
@@ -714,9 +684,9 @@ pfsync_state_import(struct pfsync_state *sp, u_int8_t flags)
int pool_flags;
int error;
+#ifdef __FreeBSD__
PF_LOCK_ASSERT();
-#ifdef __FreeBSD__
if (sp->creatorid == 0 && V_pf_status.debug >= PF_DEBUG_MISC) {
#else
if (sp->creatorid == 0 && pf_status.debug >= PF_DEBUG_MISC) {
@@ -813,7 +783,7 @@ pfsync_state_import(struct pfsync_state *sp, u_int8_t flags)
/* copy to state */
bcopy(&sp->rt_addr, &st->rt_addr, sizeof(st->rt_addr));
- st->creation = time_second - ntohl(sp->creation);
+ st->creation = time_uptime - ntohl(sp->creation);
st->expire = time_second;
if (sp->expire) {
/* XXX No adaptive scaling. */
@@ -836,7 +806,7 @@ pfsync_state_import(struct pfsync_state *sp, u_int8_t flags)
st->anchor.ptr = NULL;
st->rt_kif = NULL;
- st->pfsync_time = time_second;
+ st->pfsync_time = time_uptime;
st->sync_state = PFSYNC_S_NONE;
/* XXX when we have nat_rule/anchors, use STATE_INC_COUNTERS */
@@ -856,11 +826,7 @@ pfsync_state_import(struct pfsync_state *sp, u_int8_t flags)
CLR(st->state_flags, PFSTATE_NOSYNC);
if (ISSET(st->state_flags, PFSTATE_ACK)) {
pfsync_q_ins(st, PFSYNC_S_IACK);
-#ifdef __FreeBSD__
- pfsync_sendout();
-#else
schednetisr(NETISR_PFSYNC);
-#endif
}
}
CLR(st->state_flags, PFSTATE_ACK);
@@ -1316,11 +1282,7 @@ pfsync_in_upd(struct pfsync_pkt *pkt, struct mbuf *m, int offset, int count)
V_pfsyncstats.pfsyncs_stale++;
pfsync_update_state(st);
-#ifdef __FreeBSD__
- pfsync_sendout();
-#else
schednetisr(NETISR_PFSYNC);
-#endif
continue;
}
pfsync_alloc_scrub_memory(&sp->dst, &st->dst);
@@ -1328,7 +1290,7 @@ pfsync_in_upd(struct pfsync_pkt *pkt, struct mbuf *m, int offset, int count)
pf_state_peer_ntoh(&sp->dst, &st->dst);
st->expire = ntohl(sp->expire) + time_second;
st->timeout = sp->timeout;
- st->pfsync_time = time_second;
+ st->pfsync_time = time_uptime;
}
#ifdef __FreeBSD__
PF_UNLOCK();
@@ -1426,11 +1388,7 @@ pfsync_in_upd_c(struct pfsync_pkt *pkt, struct mbuf *m, int offset, int count)
V_pfsyncstats.pfsyncs_stale++;
pfsync_update_state(st);
-#ifdef __FreeBSD__
- pfsync_sendout();
-#else
schednetisr(NETISR_PFSYNC);
-#endif
continue;
}
pfsync_alloc_scrub_memory(&up->dst, &st->dst);
@@ -1438,7 +1396,7 @@ pfsync_in_upd_c(struct pfsync_pkt *pkt, struct mbuf *m, int offset, int count)
pf_state_peer_ntoh(&up->dst, &st->dst);
st->expire = ntohl(up->expire) + time_second;
st->timeout = up->timeout;
- st->pfsync_time = time_second;
+ st->pfsync_time = time_uptime;
}
#ifdef __FreeBSD__
PF_UNLOCK();
@@ -1466,6 +1424,9 @@ pfsync_in_ureq(struct pfsync_pkt *pkt, struct mbuf *m, int offset, int count)
}
ura = (struct pfsync_upd_req *)(mp->m_data + offp);
+#ifdef __FreeBSD__
+ PF_LOCK();
+#endif
for (i = 0; i < count; i++) {
ur = &ura[i];
@@ -1483,11 +1444,12 @@ pfsync_in_ureq(struct pfsync_pkt *pkt, struct mbuf *m, int offset, int count)
if (ISSET(st->state_flags, PFSTATE_NOSYNC))
continue;
- PF_LOCK();
pfsync_update_state_req(st);
- PF_UNLOCK();
}
}
+#ifdef __FreeBSD__
+ PF_UNLOCK();
+#endif
return (len);
}
@@ -1608,14 +1570,16 @@ pfsync_in_bus(struct pfsync_pkt *pkt, struct mbuf *m, int offset, int count)
switch (bus->status) {
case PFSYNC_BUS_START:
#ifdef __FreeBSD__
- callout_reset(&sc->sc_bulkfail_tmo, 5 * hz, pfsync_bulk_fail,
- V_pfsyncif);
+ callout_reset(&sc->sc_bulkfail_tmo, 4 * hz +
+ V_pf_pool_limits[PF_LIMIT_STATES].limit /
+ ((sc->sc_ifp->if_mtu - PFSYNC_MINPKT) /
+ sizeof(struct pfsync_state)),
+ pfsync_bulk_fail, V_pfsyncif);
#else
- timeout_add_sec(&sc->sc_bulkfail_tmo, 5); /* XXX magic */
-#endif
-#ifdef XXX
+ timeout_add(&sc->sc_bulkfail_tmo, 4 * hz +
pf_pool_limits[PF_LIMIT_STATES].limit /
- (PFSYNC_BULKPACKETS * sc->sc_maxcount));
+ ((sc->sc_if.if_mtu - PFSYNC_MINPKT) /
+ sizeof(struct pfsync_state)));
#endif
#ifdef __FreeBSD__
if (V_pf_status.debug >= PF_DEBUG_MISC)
@@ -1632,19 +1596,16 @@ pfsync_in_bus(struct pfsync_pkt *pkt, struct mbuf *m, int offset, int count)
sc->sc_ureq_sent = 0;
sc->sc_bulk_tries = 0;
timeout_del(&sc->sc_bulkfail_tmo);
-#if NCARP > 0
-#ifdef notyet
#ifdef __FreeBSD__
- if (!sc->pfsync_sync_ok)
+ if (!sc->pfsync_sync_ok && carp_demote_adj_p)
+ (*carp_demote_adj_p)(-V_pfsync_carp_adj,
+ "pfsync bulk done");
+ sc->pfsync_sync_ok = 1;
#else
+#if NCARP > 0
if (!pfsync_sync_ok)
-#endif
carp_group_demote_adj(&sc->sc_if, -1);
#endif
-#endif
-#ifdef __FreeBSD__
- sc->pfsync_sync_ok = 1;
-#else
pfsync_sync_ok = 1;
#endif
#ifdef __FreeBSD__
@@ -1818,10 +1779,10 @@ pfsyncioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
#endif
break;
case SIOCSIFMTU:
- if (ifr->ifr_mtu <= PFSYNC_MINPKT)
+ if (!sc->sc_sync_if ||
+ ifr->ifr_mtu <= PFSYNC_MINPKT ||
+ ifr->ifr_mtu > sc->sc_sync_if->if_mtu)
return (EINVAL);
- if (ifr->ifr_mtu > MCLBYTES) /* XXX could be bigger */
- ifr->ifr_mtu = MCLBYTES;
if (ifr->ifr_mtu < ifp->if_mtu) {
s = splnet();
#ifdef __FreeBSD__
@@ -1883,12 +1844,15 @@ pfsyncioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
sc->sc_sync_if = NULL;
#ifdef __FreeBSD__
PF_UNLOCK();
-#endif
+ if (imo->imo_membership)
+ pfsync_multicast_cleanup(sc);
+#else
if (imo->imo_num_memberships > 0) {
in_delmulti(imo->imo_membership[
--imo->imo_num_memberships]);
imo->imo_multicast_ifp = NULL;
}
+#endif
break;
}
@@ -1913,57 +1877,53 @@ pfsyncioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
pfsync_sendout();
sc->sc_sync_if = sifp;
- if (imo->imo_num_memberships > 0) {
#ifdef __FreeBSD__
+ if (imo->imo_membership) {
PF_UNLOCK();
-#endif
- in_delmulti(imo->imo_membership[--imo->imo_num_memberships]);
-#ifdef __FreeBSD__
+ pfsync_multicast_cleanup(sc);
PF_LOCK();
-#endif
+ }
+#else
+ if (imo->imo_num_memberships > 0) {
+ in_delmulti(imo->imo_membership[--imo->imo_num_memberships]);
imo->imo_multicast_ifp = NULL;
}
+#endif
- if (sc->sc_sync_if &&
#ifdef __FreeBSD__
+ if (sc->sc_sync_if &&
sc->sc_sync_peer.s_addr == htonl(INADDR_PFSYNC_GROUP)) {
+ PF_UNLOCK();
+ error = pfsync_multicast_setup(sc);
+ if (error)
+ return (error);
+ PF_LOCK();
+ }
#else
+ if (sc->sc_sync_if &&
sc->sc_sync_peer.s_addr == INADDR_PFSYNC_GROUP) {
-#endif
struct in_addr addr;
if (!(sc->sc_sync_if->if_flags & IFF_MULTICAST)) {
sc->sc_sync_if = NULL;
-#ifdef __FreeBSD__
- PF_UNLOCK();
-#endif
splx(s);
return (EADDRNOTAVAIL);
}
-#ifdef __FreeBSD__
- addr.s_addr = htonl(INADDR_PFSYNC_GROUP);
-#else
addr.s_addr = INADDR_PFSYNC_GROUP;
-#endif
-#ifdef __FreeBSD__
- PF_UNLOCK();
-#endif
if ((imo->imo_membership[0] =
in_addmulti(&addr, sc->sc_sync_if)) == NULL) {
sc->sc_sync_if = NULL;
splx(s);
return (ENOBUFS);
}
-#ifdef __FreeBSD__
- PF_LOCK();
-#endif
imo->imo_num_memberships++;
imo->imo_multicast_ifp = sc->sc_sync_if;
imo->imo_multicast_ttl = PFSYNC_DFLTTL;
imo->imo_multicast_loop = 0;
}
+#endif /* !__FreeBSD__ */
ip = &sc->sc_template;
bzero(ip, sizeof(*ip));
@@ -1984,19 +1944,16 @@ pfsyncioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
if (sc->sc_sync_if) {
/* Request a full state table update. */
sc->sc_ureq_sent = time_uptime;
-#if NCARP > 0
-#ifdef notyet
#ifdef __FreeBSD__
- if (sc->pfsync_sync_ok)
+ if (sc->pfsync_sync_ok && carp_demote_adj_p)
+ (*carp_demote_adj_p)(V_pfsync_carp_adj,
+ "pfsync bulk start");
+ sc->pfsync_sync_ok = 0;
#else
+#if NCARP > 0
if (pfsync_sync_ok)
-#endif
carp_group_demote_adj(&sc->sc_if, 1);
#endif
-#endif
-#ifdef __FreeBSD__
- sc->pfsync_sync_ok = 0;
-#else
pfsync_sync_ok = 0;
#endif
#ifdef __FreeBSD__
@@ -2102,7 +2059,7 @@ pfsync_drop(struct pfsync_softc *sc)
#ifdef PFSYNC_DEBUG
#ifdef __FreeBSD__
KASSERT(st->sync_state == q,
- ("%s: st->sync_state == q",
+ ("%s: st->sync_state == q",
__FUNCTION__));
#else
KASSERT(st->sync_state == q);
@@ -2132,12 +2089,20 @@ pfsync_drop(struct pfsync_softc *sc)
sc->sc_len = PFSYNC_MINPKT;
}
-void
-pfsync_sendout(void)
-{
#ifdef __FreeBSD__
+void pfsync_sendout()
+{
+ pfsync_sendout1(1);
+}
+
+static void
+pfsync_sendout1(int schedswi)
+{
struct pfsync_softc *sc = V_pfsyncif;
#else
+void
+pfsync_sendout(void)
+{
struct pfsync_softc *sc = pfsyncif;
#endif
#if NBPFILTER > 0
@@ -2156,10 +2121,6 @@ pfsync_sendout(void)
#ifdef notyet
struct tdb *t;
#endif
-#ifdef __FreeBSD__
- size_t pktlen;
- int dummy_error;
-#endif
int offset;
int q, count = 0;
@@ -2181,45 +2142,33 @@ pfsync_sendout(void)
return;
}
- MGETHDR(m, M_DONTWAIT, MT_DATA);
- if (m == NULL) {
#ifdef __FreeBSD__
+ m = m_get2(M_NOWAIT, MT_DATA, M_PKTHDR, max_linkhdr + sc->sc_len);
+ if (m == NULL) {
sc->sc_ifp->if_oerrors++;
+ V_pfsyncstats.pfsyncs_onomem++;
+ return;
+ }
#else
+ MGETHDR(m, M_DONTWAIT, MT_DATA);
+ if (m == NULL) {
sc->sc_if.if_oerrors++;
-#endif
- V_pfsyncstats.pfsyncs_onomem++;
+ pfsyncstats.pfsyncs_onomem++;
pfsync_drop(sc);
return;
}
-#ifdef __FreeBSD__
- pktlen = max_linkhdr + sc->sc_len;
- if (pktlen > MHLEN) {
- /* Find the right pool to allocate from. */
- /* XXX: This is ugly. */
- m_cljget(m, M_DONTWAIT, pktlen <= MSIZE ? MSIZE :
- pktlen <= MCLBYTES ? MCLBYTES :
-#if MJUMPAGESIZE != MCLBYTES
- pktlen <= MJUMPAGESIZE ? MJUMPAGESIZE :
-#endif
- pktlen <= MJUM9BYTES ? MJUM9BYTES : MJUM16BYTES);
-#else
if (max_linkhdr + sc->sc_len > MHLEN) {
MCLGETI(m, M_DONTWAIT, NULL, max_linkhdr + sc->sc_len);
-#endif
if (!ISSET(m->m_flags, M_EXT)) {
m_free(m);
-#ifdef __FreeBSD__
- sc->sc_ifp->if_oerrors++;
-#else
sc->sc_if.if_oerrors++;
-#endif
- V_pfsyncstats.pfsyncs_onomem++;
+ pfsyncstats.pfsyncs_onomem++;
pfsync_drop(sc);
return;
}
}
+#endif
m->m_data += max_linkhdr;
m->m_len = m->m_pkthdr.len = sc->sc_len;
@@ -2364,8 +2313,14 @@ pfsync_sendout(void)
sc->sc_ifp->if_obytes += m->m_pkthdr.len;
sc->sc_len = PFSYNC_MINPKT;
- IFQ_ENQUEUE(&sc->sc_ifp->if_snd, m, dummy_error);
- schednetisr(NETISR_PFSYNC);
+ if (!_IF_QFULL(&sc->sc_ifp->if_snd))
+ _IF_ENQUEUE(&sc->sc_ifp->if_snd, m);
+ else {
+ m_freem(m);
+ sc->sc_ifp->if_snd.ifq_drops++;
+ }
+ if (schedswi)
+ swi_sched(V_pfsync_swi_cookie, 0);
#else
sc->sc_if.if_opackets++;
sc->sc_if.if_obytes += m->m_pkthdr.len;
@@ -2424,11 +2379,7 @@ pfsync_insert_state(struct pf_state *st)
pfsync_q_ins(st, PFSYNC_S_INS);
if (ISSET(st->state_flags, PFSTATE_ACK))
-#ifdef __FreeBSD__
- pfsync_sendout();
-#else
schednetisr(NETISR_PFSYNC);
-#endif
else
st->sync_updates = 0;
}
@@ -2606,9 +2557,11 @@ pfsync_update_state(struct pf_state *st)
case PFSYNC_S_INS:
/* we're already handling it */
- st->sync_updates++;
- if (st->sync_updates >= sc->sc_maxupdates)
- sync = 1;
+ if (st->key[PF_SK_WIRE]->proto == IPPROTO_TCP) {
+ st->sync_updates++;
+ if (st->sync_updates >= sc->sc_maxupdates)
+ sync = 1;
+ }
break;
case PFSYNC_S_IACK:
@@ -2623,13 +2576,9 @@ pfsync_update_state(struct pf_state *st)
st->sync_state);
}
- if (sync || (time_second - st->pfsync_time) < 2) {
+ if (sync || (time_uptime - st->pfsync_time) < 2) {
pfsync_upds++;
-#ifdef __FreeBSD__
- pfsync_sendout();
-#else
schednetisr(NETISR_PFSYNC);
-#endif
}
}
@@ -2680,11 +2629,7 @@ pfsync_request_update(u_int32_t creatorid, u_int64_t id)
TAILQ_INSERT_TAIL(&sc->sc_upd_req_list, item, ur_entry);
sc->sc_len += nlen;
-#ifdef __FreeBSD__
- pfsync_sendout();
-#else
schednetisr(NETISR_PFSYNC);
-#endif
}
void
@@ -2713,11 +2658,7 @@ pfsync_update_state_req(struct pf_state *st)
pfsync_q_del(st);
case PFSYNC_S_NONE:
pfsync_q_ins(st, PFSYNC_S_UPD);
-#ifdef __FreeBSD__
- pfsync_sendout();
-#else
schednetisr(NETISR_PFSYNC);
-#endif
return;
case PFSYNC_S_INS:
@@ -2881,7 +2822,7 @@ pfsync_q_del(struct pf_state *st)
int q = st->sync_state;
#ifdef __FreeBSD__
- KASSERT(st->sync_state != PFSYNC_S_NONE,
+ KASSERT(st->sync_state != PFSYNC_S_NONE,
("%s: st->sync_state != PFSYNC_S_NONE", __FUNCTION__));
#else
KASSERT(st->sync_state != PFSYNC_S_NONE);
@@ -3012,7 +2953,7 @@ pfsync_bulk_start(void)
printf("pfsync: received bulk update request\n");
#ifdef __FreeBSD__
- PF_LOCK();
+ PF_LOCK_ASSERT();
if (TAILQ_EMPTY(&V_state_list))
#else
if (TAILQ_EMPTY(&state_list))
@@ -3026,15 +2967,11 @@ pfsync_bulk_start(void)
#else
sc->sc_bulk_next = TAILQ_FIRST(&state_list);
#endif
- sc->sc_bulk_last = sc->sc_bulk_next;
+ sc->sc_bulk_last = sc->sc_bulk_next;
- pfsync_bulk_status(PFSYNC_BUS_START);
- callout_reset(&sc->sc_bulk_tmo, 1,
- pfsync_bulk_update, sc);
+ pfsync_bulk_status(PFSYNC_BUS_START);
+ callout_reset(&sc->sc_bulk_tmo, 1, pfsync_bulk_update, sc);
}
-#ifdef __FreeBSD__
- PF_UNLOCK();
-#endif
}
void
@@ -3155,19 +3092,16 @@ pfsync_bulk_fail(void *arg)
/* Pretend like the transfer was ok */
sc->sc_ureq_sent = 0;
sc->sc_bulk_tries = 0;
-#if NCARP > 0
-#ifdef notyet
#ifdef __FreeBSD__
- if (!sc->pfsync_sync_ok)
+ if (!sc->pfsync_sync_ok && carp_demote_adj_p)
+ (*carp_demote_adj_p)(-V_pfsync_carp_adj,
+ "pfsync bulk fail");
+ sc->pfsync_sync_ok = 1;
#else
+#if NCARP > 0
if (!pfsync_sync_ok)
-#endif
carp_group_demote_adj(&sc->sc_if, -1);
#endif
-#endif
-#ifdef __FreeBSD__
- sc->pfsync_sync_ok = 1;
-#else
pfsync_sync_ok = 1;
#endif
#ifdef __FreeBSD__
@@ -3295,7 +3229,11 @@ pfsyncintr(void *arg)
CURVNET_SET(sc->sc_ifp->if_vnet);
pfsync_ints++;
- IF_DEQUEUE_ALL(&sc->sc_ifp->if_snd, m);
+ PF_LOCK();
+ if (sc->sc_len > PFSYNC_MINPKT)
+ pfsync_sendout1(0);
+ _IF_DEQUEUE_ALL(&sc->sc_ifp->if_snd, m);
+ PF_UNLOCK();
for (; m != NULL; m = n) {
@@ -3344,54 +3282,92 @@ pfsync_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp,
}
#ifdef __FreeBSD__
-void
-pfsync_ifdetach(void *arg, struct ifnet *ifp)
+static int
+pfsync_multicast_setup(struct pfsync_softc *sc)
{
- struct pfsync_softc *sc = (struct pfsync_softc *)arg;
- struct ip_moptions *imo;
-
- if (sc == NULL || sc->sc_sync_if != ifp)
- return; /* not for us; unlocked read */
+ struct ip_moptions *imo = &sc->sc_imo;
+ int error;
- CURVNET_SET(sc->sc_ifp->if_vnet);
+ if (!(sc->sc_sync_if->if_flags & IFF_MULTICAST)) {
+ sc->sc_sync_if = NULL;
+ return (EADDRNOTAVAIL);
+ }
- PF_LOCK();
+ imo->imo_membership = (struct in_multi **)malloc(
+ (sizeof(struct in_multi *) * IP_MIN_MEMBERSHIPS), M_PFSYNC,
+ M_WAITOK | M_ZERO);
+ imo->imo_max_memberships = IP_MIN_MEMBERSHIPS;
+ imo->imo_multicast_vif = -1;
- /* Deal with a member interface going away from under us. */
- sc->sc_sync_if = NULL;
- imo = &sc->sc_imo;
- if (imo->imo_num_memberships > 0) {
- KASSERT(imo->imo_num_memberships == 1,
- ("%s: imo_num_memberships != 1", __func__));
- /*
- * Our event handler is always called after protocol
- * domains have been detached from the underlying ifnet.
- * Do not call in_delmulti(); we held a single reference
- * which the protocol domain has purged in in_purgemaddrs().
- */
- PF_UNLOCK();
- imo->imo_membership[--imo->imo_num_memberships] = NULL;
- PF_LOCK();
- imo->imo_multicast_ifp = NULL;
+ if ((error = in_joingroup(sc->sc_sync_if, &sc->sc_sync_peer, NULL,
+ &imo->imo_membership[0])) != 0) {
+ free(imo->imo_membership, M_PFSYNC);
+ return (error);
}
+ imo->imo_num_memberships++;
+ imo->imo_multicast_ifp = sc->sc_sync_if;
+ imo->imo_multicast_ttl = PFSYNC_DFLTTL;
+ imo->imo_multicast_loop = 0;
- PF_UNLOCK();
-
- CURVNET_RESTORE();
+ return (0);
}
+static void
+pfsync_multicast_cleanup(struct pfsync_softc *sc)
+{
+ struct ip_moptions *imo = &sc->sc_imo;
+
+ in_leavegroup(imo->imo_membership[0], NULL);
+ free(imo->imo_membership, M_PFSYNC);
+ imo->imo_membership = NULL;
+ imo->imo_multicast_ifp = NULL;
+}
+
+#ifdef INET
+extern struct domain inetdomain;
+static struct protosw in_pfsync_protosw = {
+ .pr_type = SOCK_RAW,
+ .pr_domain = &inetdomain,
+ .pr_protocol = IPPROTO_PFSYNC,
+ .pr_flags = PR_ATOMIC|PR_ADDR,
+ .pr_input = pfsync_input,
+ .pr_output = (pr_output_t *)rip_output,
+ .pr_ctloutput = rip_ctloutput,
+ .pr_usrreqs = &rip_usrreqs
+};
+#endif
+
static int
-vnet_pfsync_init(const void *unused)
+pfsync_init()
{
+ VNET_ITERATOR_DECL(vnet_iter);
int error = 0;
- pfsyncattach(0);
-
- error = swi_add(NULL, "pfsync", pfsyncintr, V_pfsyncif,
- SWI_NET, INTR_MPSAFE, &pfsync_swi.pfsync_swi_cookie);
+ VNET_LIST_RLOCK();
+ VNET_FOREACH(vnet_iter) {
+ CURVNET_SET(vnet_iter);
+ V_pfsync_cloner = pfsync_cloner;
+ V_pfsync_cloner_data = pfsync_cloner_data;
+ V_pfsync_cloner.ifc_data = &V_pfsync_cloner_data;
+ if_clone_attach(&V_pfsync_cloner);
+ error = swi_add(NULL, "pfsync", pfsyncintr, V_pfsyncif,
+ SWI_NET, INTR_MPSAFE, &V_pfsync_swi_cookie);
+ CURVNET_RESTORE();
+ if (error)
+ goto fail_locked;
+ }
+ VNET_LIST_RUNLOCK();
+#ifdef INET
+ error = pf_proto_register(PF_INET, &in_pfsync_protosw);
if (error)
- panic("%s: swi_add %d", __func__, error);
-
+ goto fail;
+ error = ipproto_register(IPPROTO_PFSYNC);
+ if (error) {
+ pf_proto_unregister(PF_INET, IPPROTO_PFSYNC, SOCK_RAW);
+ goto fail;
+ }
+#endif
+ PF_LOCK();
pfsync_state_import_ptr = pfsync_state_import;
pfsync_up_ptr = pfsync_up;
pfsync_insert_state_ptr = pfsync_insert_state;
@@ -3400,16 +3376,32 @@ vnet_pfsync_init(const void *unused)
pfsync_clear_states_ptr = pfsync_clear_states;
pfsync_state_in_use_ptr = pfsync_state_in_use;
pfsync_defer_ptr = pfsync_defer;
+ PF_UNLOCK();
return (0);
+
+fail:
+ VNET_LIST_RLOCK();
+fail_locked:
+ VNET_FOREACH(vnet_iter) {
+ CURVNET_SET(vnet_iter);
+ if (V_pfsync_swi_cookie) {
+ swi_remove(V_pfsync_swi_cookie);
+ if_clone_detach(&V_pfsync_cloner);
+ }
+ CURVNET_RESTORE();
+ }
+ VNET_LIST_RUNLOCK();
+
+ return (error);
}
-static int
-vnet_pfsync_uninit(const void *unused)
+static void
+pfsync_uninit()
{
+ VNET_ITERATOR_DECL(vnet_iter);
- swi_remove(pfsync_swi.pfsync_swi_cookie);
-
+ PF_LOCK();
pfsync_state_import_ptr = NULL;
pfsync_up_ptr = NULL;
pfsync_insert_state_ptr = NULL;
@@ -3418,31 +3410,20 @@ vnet_pfsync_uninit(const void *unused)
pfsync_clear_states_ptr = NULL;
pfsync_state_in_use_ptr = NULL;
pfsync_defer_ptr = NULL;
+ PF_UNLOCK();
- if_clone_detach(&pfsync_cloner);
-
- return (0);
+ ipproto_unregister(IPPROTO_PFSYNC);
+ pf_proto_unregister(PF_INET, IPPROTO_PFSYNC, SOCK_RAW);
+ VNET_LIST_RLOCK();
+ VNET_FOREACH(vnet_iter) {
+ CURVNET_SET(vnet_iter);
+ swi_remove(V_pfsync_swi_cookie);
+ if_clone_detach(&V_pfsync_cloner);
+ CURVNET_RESTORE();
+ }
+ VNET_LIST_RUNLOCK();
}
-/* Define startup order. */
-#define PFSYNC_SYSINIT_ORDER SI_SUB_PROTO_IF
-#define PFSYNC_MODEVENT_ORDER (SI_ORDER_FIRST) /* On boot slot in here. */
-#define PFSYNC_VNET_ORDER (PFSYNC_MODEVENT_ORDER + 2) /* Later still. */
-
-/*
- * Starting up.
- * VNET_SYSINIT is called for each existing vnet and each new vnet.
- */
-VNET_SYSINIT(vnet_pfsync_init, PFSYNC_SYSINIT_ORDER, PFSYNC_VNET_ORDER,
- vnet_pfsync_init, NULL);
-
-/*
- * Closing up shop. These are done in REVERSE ORDER,
- * Not called on reboot.
- * VNET_SYSUNINIT is called for each exiting vnet as it exits.
- */
-VNET_SYSUNINIT(vnet_pfsync_uninit, PFSYNC_SYSINIT_ORDER, PFSYNC_VNET_ORDER,
- vnet_pfsync_uninit, NULL);
static int
pfsync_modevent(module_t mod, int type, void *data)
{
@@ -3450,21 +3431,23 @@ pfsync_modevent(module_t mod, int type, void *data)
switch (type) {
case MOD_LOAD:
-#ifndef __FreeBSD__
- pfsyncattach(0);
-#endif
+ error = pfsync_init();
+ break;
+ case MOD_QUIESCE:
+ /*
+ * Module should not be unloaded due to race conditions.
+ */
+ error = EPERM;
break;
case MOD_UNLOAD:
-#ifndef __FreeBSD__
- if_clone_detach(&pfsync_cloner);
-#endif
+ pfsync_uninit();
break;
default:
error = EINVAL;
break;
}
- return error;
+ return (error);
}
static moduledata_t pfsync_mod = {
@@ -3475,7 +3458,7 @@ static moduledata_t pfsync_mod = {
#define PFSYNC_MODVER 1
-DECLARE_MODULE(pfsync, pfsync_mod, SI_SUB_PSEUDO, SI_ORDER_ANY);
+DECLARE_MODULE(pfsync, pfsync_mod, SI_SUB_PROTO_DOMAIN, SI_ORDER_ANY);
MODULE_VERSION(pfsync, PFSYNC_MODVER);
MODULE_DEPEND(pfsync, pf, PF_MODVER, PF_MODVER, PF_MODVER);
#endif /* __FreeBSD__ */
diff --git a/sys/contrib/pf/net/pf.c b/sys/contrib/pf/net/pf.c
index 20e268f..5c9641b 100644
--- a/sys/contrib/pf/net/pf.c
+++ b/sys/contrib/pf/net/pf.c
@@ -47,23 +47,7 @@ __FBSDID("$FreeBSD$");
#include "opt_bpf.h"
#include "opt_pf.h"
-#ifdef DEV_BPF
-#define NBPFILTER DEV_BPF
-#else
-#define NBPFILTER 0
-#endif
-
-#ifdef DEV_PFLOG
-#define NPFLOG DEV_PFLOG
-#else
-#define NPFLOG 0
-#endif
-
-#ifdef DEV_PFSYNC
-#define NPFSYNC DEV_PFSYNC
-#else
-#define NPFSYNC 0
-#endif
+#define NPFSYNC 1
#ifdef DEV_PFLOW
#define NPFLOW DEV_PFLOW
diff --git a/sys/contrib/pf/net/pf_ioctl.c b/sys/contrib/pf/net/pf_ioctl.c
index d5a9b92..e78c8ff 100644
--- a/sys/contrib/pf/net/pf_ioctl.c
+++ b/sys/contrib/pf/net/pf_ioctl.c
@@ -44,11 +44,7 @@ __FBSDID("$FreeBSD$");
#include "opt_bpf.h"
#include "opt_pf.h"
-#ifdef DEV_BPF
-#define NBPFILTER DEV_BPF
-#else
-#define NBPFILTER 0
-#endif
+#define NPFSYNC 1
#ifdef DEV_PFLOG
#define NPFLOG DEV_PFLOG
@@ -56,16 +52,10 @@ __FBSDID("$FreeBSD$");
#define NPFLOG 0
#endif
-#ifdef DEV_PFSYNC
-#define NPFSYNC DEV_PFSYNC
-#else
-#define NPFSYNC 0
-#endif
-
-#else
+#else /* !__FreeBSD__ */
#include "pfsync.h"
#include "pflog.h"
-#endif
+#endif /* __FreeBSD__ */
#include <sys/param.h>
#include <sys/systm.h>
@@ -4328,57 +4318,25 @@ dehook_pf(void)
return (0);
}
-/* Vnet accessors */
-static int
-vnet_pf_init(const void *unused)
-{
-
- V_pf_pfil_hooked = 0;
- V_pf_end_threads = 0;
-
- V_debug_pfugidhack = 0;
-
- TAILQ_INIT(&V_pf_tags);
- TAILQ_INIT(&V_pf_qids);
-
- pf_load();
-
- return (0);
-}
-
-static int
-vnet_pf_uninit(const void *unused)
-{
-
- pf_unload();
-
- return (0);
-}
-
-/* Define startup order. */
-#define PF_SYSINIT_ORDER SI_SUB_PROTO_BEGIN
-#define PF_MODEVENT_ORDER (SI_ORDER_FIRST) /* On boot slot in here. */
-#define PF_VNET_ORDER (PF_MODEVENT_ORDER + 2) /* Later still. */
-
-/*
- * Starting up.
- * VNET_SYSINIT is called for each existing vnet and each new vnet.
- */
-VNET_SYSINIT(vnet_pf_init, PF_SYSINIT_ORDER, PF_VNET_ORDER,
- vnet_pf_init, NULL);
-
-/*
- * Closing up shop. These are done in REVERSE ORDER,
- * Not called on reboot.
- * VNET_SYSUNINIT is called for each exiting vnet as it exits.
- */
-VNET_SYSUNINIT(vnet_pf_uninit, PF_SYSINIT_ORDER, PF_VNET_ORDER,
- vnet_pf_uninit, NULL);
-
static int
pf_load(void)
{
+ VNET_ITERATOR_DECL(vnet_iter);
+
+ VNET_LIST_RLOCK();
+ VNET_FOREACH(vnet_iter) {
+ CURVNET_SET(vnet_iter);
+ V_pf_pfil_hooked = 0;
+ V_pf_end_threads = 0;
+ V_debug_pfugidhack = 0;
+ TAILQ_INIT(&V_pf_tags);
+ TAILQ_INIT(&V_pf_qids);
+ CURVNET_RESTORE();
+ }
+ VNET_LIST_RUNLOCK();
+ init_pf_mutex();
+ pf_dev = make_dev(&pf_cdevsw, 0, 0, 0, 0600, PF_NAME);
init_zone_var();
sx_init(&V_pf_consistency_lock, "pf_statetbl_lock");
if (pfattach() < 0)
@@ -4395,6 +4353,7 @@ pf_unload(void)
PF_LOCK();
V_pf_status.running = 0;
PF_UNLOCK();
+ m_addr_chg_pf_p = NULL;
error = dehook_pf();
if (error) {
/*
@@ -4417,6 +4376,8 @@ pf_unload(void)
pf_osfp_cleanup();
cleanup_pf_zone();
PF_UNLOCK();
+ destroy_dev(pf_dev);
+ destroy_pf_mutex();
sx_destroy(&V_pf_consistency_lock);
return error;
}
@@ -4428,12 +4389,16 @@ pf_modevent(module_t mod, int type, void *data)
switch(type) {
case MOD_LOAD:
- init_pf_mutex();
- pf_dev = make_dev(&pf_cdevsw, 0, 0, 0, 0600, PF_NAME);
+ error = pf_load();
+ break;
+ case MOD_QUIESCE:
+ /*
+ * Module should not be unloaded due to race conditions.
+ */
+ error = EPERM;
break;
case MOD_UNLOAD:
- destroy_dev(pf_dev);
- destroy_pf_mutex();
+ error = pf_unload();
break;
default:
error = EINVAL;
diff --git a/sys/contrib/pf/net/pf_table.c b/sys/contrib/pf/net/pf_table.c
index d40c95f..5e1f5f1 100644
--- a/sys/contrib/pf/net/pf_table.c
+++ b/sys/contrib/pf/net/pf_table.c
@@ -927,16 +927,12 @@ pfr_create_kentry(struct pfr_addr *ad, int intr)
{
struct pfr_kentry *ke;
- if (intr)
#ifdef __FreeBSD__
- ke = pool_get(&V_pfr_kentry_pl, PR_NOWAIT | PR_ZERO);
+ ke = pool_get(&V_pfr_kentry_pl, PR_NOWAIT | PR_ZERO);
#else
+ if (intr)
ke = pool_get(&pfr_kentry_pl, PR_NOWAIT | PR_ZERO);
-#endif
else
-#ifdef __FreeBSD__
- ke = pool_get(&V_pfr_kentry_pl, PR_WAITOK|PR_ZERO);
-#else
ke = pool_get(&pfr_kentry_pl, PR_WAITOK|PR_ZERO|PR_LIMITFAIL);
#endif
if (ke == NULL)
@@ -2081,16 +2077,12 @@ pfr_create_ktable(struct pfr_table *tbl, long tzero, int attachruleset,
struct pfr_ktable *kt;
struct pf_ruleset *rs;
- if (intr)
#ifdef __FreeBSD__
- kt = pool_get(&V_pfr_ktable_pl, PR_NOWAIT|PR_ZERO);
+ kt = pool_get(&V_pfr_ktable_pl, PR_NOWAIT|PR_ZERO);
#else
+ if (intr)
kt = pool_get(&pfr_ktable_pl, PR_NOWAIT|PR_ZERO|PR_LIMITFAIL);
-#endif
else
-#ifdef __FreeBSD__
- kt = pool_get(&V_pfr_ktable_pl, PR_WAITOK|PR_ZERO);
-#else
kt = pool_get(&pfr_ktable_pl, PR_WAITOK|PR_ZERO|PR_LIMITFAIL);
#endif
if (kt == NULL)
diff --git a/sys/contrib/pf/net/pfvar.h b/sys/contrib/pf/net/pfvar.h
index 5b47eee..fe4c0ce 100644
--- a/sys/contrib/pf/net/pfvar.h
+++ b/sys/contrib/pf/net/pfvar.h
@@ -241,15 +241,8 @@ extern struct mtx pf_task_mtx;
#define PF_LOCK_ASSERT() mtx_assert(&pf_task_mtx, MA_OWNED)
#define PF_UNLOCK_ASSERT() mtx_assert(&pf_task_mtx, MA_NOTOWNED)
-
-#define PF_LOCK() do { \
- PF_UNLOCK_ASSERT(); \
- mtx_lock(&pf_task_mtx); \
-} while(0)
-#define PF_UNLOCK() do { \
- PF_LOCK_ASSERT(); \
- mtx_unlock(&pf_task_mtx); \
-} while(0)
+#define PF_LOCK() mtx_lock(&pf_task_mtx)
+#define PF_UNLOCK() mtx_unlock(&pf_task_mtx)
#else
#define PF_LOCK_ASSERT()
#define PF_UNLOCK_ASSERT()
diff --git a/sys/contrib/rdma/ib_addr.h b/sys/contrib/rdma/ib_addr.h
index 3df9949..8734465 100644
--- a/sys/contrib/rdma/ib_addr.h
+++ b/sys/contrib/rdma/ib_addr.h
@@ -42,7 +42,7 @@
#include <contrib/rdma/ib_verbs.h>
-#define MAX_ADDR_LEN ETHER_ADDR_LEN /* XXX doesn't support IB! */
+#define MAX_ADDR_LEN 20
struct rdma_addr_client {
int refcount;
diff --git a/sys/contrib/xz-embedded/COPYING b/sys/contrib/xz-embedded/COPYING
new file mode 100644
index 0000000..fc4fbf7
--- /dev/null
+++ b/sys/contrib/xz-embedded/COPYING
@@ -0,0 +1,10 @@
+
+Licensing of XZ Embedded
+========================
+
+ All the files in this package have been written by Lasse Collin
+ and/or Igor Pavlov. All these files have been put into the
+ public domain. You can do whatever you want with these files.
+
+ As usual, this software is provided "as is", without any warranty.
+
diff --git a/sys/contrib/xz-embedded/README b/sys/contrib/xz-embedded/README
new file mode 100644
index 0000000..a0495d7
--- /dev/null
+++ b/sys/contrib/xz-embedded/README
@@ -0,0 +1,127 @@
+
+XZ Embedded
+===========
+
+ XZ Embedded is a relatively small, limited implementation of the .xz
+ file format. Currently only decoding is implemented.
+
+ XZ Embedded was written for use in the Linux kernel, but the code can
+ be easily used in other environments too, including regular userspace
+ applications.
+
+ This README contains information that is useful only when the copy
+ of XZ Embedded isn't part of the Linux kernel tree. You should also
+ read linux/Documentation/xz.txt even if you aren't using XZ Embedded
+ as part of Linux; information in that file is not repeated in this
+ README.
+
+Compiling the Linux kernel module
+
+ The xz_dec module depends on crc32 module, so make sure that you have
+ it enabled (CONFIG_CRC32).
+
+ Building the xz_dec and xz_dec_test modules without support for BCJ
+ filters:
+
+ cd linux/lib/xz
+ make -C /path/to/kernel/source \
+ KCPPFLAGS=-I"$(pwd)/../../include" M="$(pwd)" \
+ CONFIG_XZ_DEC=m CONFIG_XZ_DEC_TEST=m
+
+ Building the xz_dec and xz_dec_test modules with support for BCJ
+ filters:
+
+ cd linux/lib/xz
+ make -C /path/to/kernel/source \
+ KCPPFLAGS=-I"$(pwd)/../../include" M="$(pwd)" \
+ CONFIG_XZ_DEC=m CONFIG_XZ_DEC_TEST=m CONFIG_XZ_DEC_BCJ=y \
+ CONFIG_XZ_DEC_X86=y CONFIG_XZ_DEC_POWERPC=y \
+ CONFIG_XZ_DEC_IA64=y CONFIG_XZ_DEC_ARM=y \
+ CONFIG_XZ_DEC_ARMTHUMB=y CONFIG_XZ_DEC_SPARC=y
+
+ If you want only one or a few of the BCJ filters, omit the appropriate
+ variables. CONFIG_XZ_DEC_BCJ=y is always required to build the support
+ code shared between all BCJ filters.
+
+ Most people don't need the xz_dec_test module. You can skip building
+ it by omitting CONFIG_XZ_DEC_TEST=m from the make command line.
+
+Compiler requirements
+
+ XZ Embedded should compile as either GNU-C89 (used in the Linux
+ kernel) or with any C99 compiler. Getting the code to compile with
+ non-GNU C89 compiler or a C++ compiler should be quite easy as
+ long as there is a data type for unsigned 64-bit integer (or the
+ code is modified not to support large files, which needs some more
+ care than just using 32-bit integer instead of 64-bit).
+
+ If you use GCC, try to use a recent version. For example, on x86-32,
+ xz_dec_lzma2.c compiled with GCC 3.3.6 is 15-25 % slower than when
+ compiled with GCC 4.3.3.
+
+Embedding into userspace applications
+
+ To embed the XZ decoder, copy the following files into a single
+ directory in your source code tree:
+
+ linux/include/linux/xz.h
+ linux/lib/xz/xz_crc32.c
+ linux/lib/xz/xz_dec_lzma2.c
+ linux/lib/xz/xz_dec_stream.c
+ linux/lib/xz/xz_lzma2.h
+ linux/lib/xz/xz_private.h
+ linux/lib/xz/xz_stream.h
+ userspace/xz_config.h
+
+ Alternatively, xz.h may be placed into a different directory but then
+ that directory must be in the compiler include path when compiling
+ the .c files.
+
+ Your code should use only the functions declared in xz.h. The rest of
+ the .h files are meant only for internal use in XZ Embedded.
+
+ You may want to modify xz_config.h to be more suitable for your build
+ environment. Probably you should at least skim through it even if the
+ default file works as is.
+
+BCJ filter support
+
+ If you want support for one or more BCJ filters, you need to copy also
+ linux/lib/xz/xz_dec_bcj.c into your application, and use appropriate
+ #defines in xz_config.h or in compiler flags. You don't need these
+ #defines in the code that just uses XZ Embedded via xz.h, but having
+ them always #defined doesn't hurt either.
+
+ #define Instruction set BCJ filter endianness
+ XZ_DEC_X86 x86-32 or x86-64 Little endian only
+ XZ_DEC_POWERPC PowerPC Big endian only
+ XZ_DEC_IA64 Itanium (IA-64) Big or little endian
+ XZ_DEC_ARM ARM Little endian only
+ XZ_DEC_ARMTHUMB ARM-Thumb Little endian only
+ XZ_DEC_SPARC SPARC Big or little endian
+
+ While some architectures are (partially) bi-endian, the endianness
+ setting doesn't change the endianness of the instructions on all
+ architectures. That's why Itanium and SPARC filters work for both big
+ and little endian executables (Itanium has little endian instructions
+ and SPARC has big endian instructions).
+
+ There currently is no filter for little endian PowerPC or big endian
+ ARM or ARM-Thumb. Implementing filters for them can be considered if
+ there is a need for such filters in real-world applications.
+
+Notes about shared libraries
+
+ If you are including XZ Embedded into a shared library, you very
+ probably should rename the xz_* functions to prevent symbol
+ conflicts in case your library is linked against some other library
+ or application that also has XZ Embedded in it (which may even be
+ a different version of XZ Embedded). TODO: Provide an easy way
+ to do this.
+
+ Please don't create a shared library of XZ Embedded itself unless
+ it is fine to rebuild everything depending on that shared library
+ everytime you upgrade to a newer version of XZ Embedded. There are
+ no API or ABI stability guarantees between different versions of
+ XZ Embedded.
+
diff --git a/sys/contrib/xz-embedded/freebsd/xz_config.h b/sys/contrib/xz-embedded/freebsd/xz_config.h
new file mode 100644
index 0000000..75c63fd
--- /dev/null
+++ b/sys/contrib/xz-embedded/freebsd/xz_config.h
@@ -0,0 +1,73 @@
+/*-
+ * Copyright (c) 2010-2012 Aleksandr Rybalko
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ */
+
+#ifndef __FREEBSD_XZ_CONFIG_H__
+#define __FREEBSD_XZ_CONFIG_H__
+
+#include <sys/param.h>
+#include <sys/endian.h>
+#include <sys/types.h>
+#include <sys/systm.h>
+
+#include <contrib/xz-embedded/linux/include/linux/xz.h>
+#include "xz_malloc.h"
+
+#define XZ_DEC_SINGLE 1
+#define XZ_PREBOOT 1
+
+#undef XZ_EXTERN
+#define XZ_EXTERN extern
+
+#undef STATIC
+#define STATIC
+
+#undef INIT
+#define INIT
+
+#undef bool
+#undef true
+#undef false
+#define bool int
+#define true 1
+#define false 0
+
+#define kmalloc(size, flags) xz_malloc(size)
+#define kfree(ptr) xz_free(ptr)
+#define vmalloc(size) xz_malloc(size)
+#define vfree(ptr) xz_free(ptr)
+
+#define memeq(a, b, size) (memcmp((a), (b), (size)) == 0)
+#define memzero(buf, size) bzero((buf), (size))
+
+#ifndef min
+# define min(x, y) MIN((x), (y))
+#endif
+
+#define min_t(type, x, y) min((x), (y))
+
+#define get_le32(ptr) le32toh(*(const uint32_t *)(ptr))
+
+#endif /* __FREEBSD_XZ_CONFIG_H__ */
diff --git a/sys/contrib/xz-embedded/freebsd/xz_malloc.c b/sys/contrib/xz-embedded/freebsd/xz_malloc.c
new file mode 100644
index 0000000..17f45bd
--- /dev/null
+++ b/sys/contrib/xz-embedded/freebsd/xz_malloc.c
@@ -0,0 +1,49 @@
+/*-
+ * Copyright (c) 2010-2012 Aleksandr Rybalko
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ */
+
+#include <sys/malloc.h>
+#include <sys/kernel.h>
+#include "xz_malloc.h"
+
+/* Wraper for XZ decompressor memmory pool */
+
+static MALLOC_DEFINE(XZ_DEC, "XZ_DEC", "XZ decompressor data");
+
+void *
+xz_malloc(unsigned long size)
+{
+ void *addr;
+
+ addr = malloc(size, XZ_DEC, M_NOWAIT);
+ return (addr);
+}
+
+void
+xz_free(void *addr)
+{
+
+ free(addr, XZ_DEC);
+}
diff --git a/sys/contrib/xz-embedded/freebsd/xz_malloc.h b/sys/contrib/xz-embedded/freebsd/xz_malloc.h
new file mode 100644
index 0000000..f584d4e
--- /dev/null
+++ b/sys/contrib/xz-embedded/freebsd/xz_malloc.h
@@ -0,0 +1,34 @@
+/*-
+ * Copyright (c) 2010-2012 Aleksandr Rybalko
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ */
+
+#ifndef __XZ_MALLOC_H__
+#define __XZ_MALLOC_H__
+
+extern void *xz_malloc(unsigned long size);
+extern void xz_free(void *addr);
+
+#endif /* __XZ_MALLOC_H__ */
+
diff --git a/sys/contrib/xz-embedded/linux/Documentation/xz.txt b/sys/contrib/xz-embedded/linux/Documentation/xz.txt
new file mode 100644
index 0000000..68329ac
--- /dev/null
+++ b/sys/contrib/xz-embedded/linux/Documentation/xz.txt
@@ -0,0 +1,122 @@
+
+XZ data compression in Linux
+============================
+
+Introduction
+
+ XZ is a general purpose data compression format with high compression
+ ratio and relatively fast decompression. The primary compression
+ algorithm (filter) is LZMA2. Additional filters can be used to improve
+ compression ratio even further. E.g. Branch/Call/Jump (BCJ) filters
+ improve compression ratio of executable data.
+
+ The XZ decompressor in Linux is called XZ Embedded. It supports
+ the LZMA2 filter and optionally also BCJ filters. CRC32 is supported
+ for integrity checking. The home page of XZ Embedded is at
+ <http://tukaani.org/xz/embedded.html>, where you can find the
+ latest version and also information about using the code outside
+ the Linux kernel.
+
+ For userspace, XZ Utils provide a zlib-like compression library
+ and a gzip-like command line tool. XZ Utils can be downloaded from
+ <http://tukaani.org/xz/>.
+
+XZ related components in the kernel
+
+ The xz_dec module provides XZ decompressor with single-call (buffer
+ to buffer) and multi-call (stateful) APIs. The usage of the xz_dec
+ module is documented in include/linux/xz.h.
+
+ The xz_dec_test module is for testing xz_dec. xz_dec_test is not
+ useful unless you are hacking the XZ decompressor. xz_dec_test
+ allocates a char device major dynamically to which one can write
+ .xz files from userspace. The decompressed output is thrown away.
+ Keep an eye on dmesg to see diagnostics printed by xz_dec_test.
+ See the xz_dec_test source code for the details.
+
+ For decompressing the kernel image, initramfs, and initrd, there
+ is a wrapper function in lib/decompress_unxz.c. Its API is the
+ same as in other decompress_*.c files, which is defined in
+ include/linux/decompress/generic.h.
+
+ scripts/xz_wrap.sh is a wrapper for the xz command line tool found
+ from XZ Utils. The wrapper sets compression options to values suitable
+ for compressing the kernel image.
+
+ For kernel makefiles, two commands are provided for use with
+ $(call if_needed). The kernel image should be compressed with
+ $(call if_needed,xzkern) which will use a BCJ filter and a big LZMA2
+ dictionary. It will also append a four-byte trailer containing the
+ uncompressed size of the file, which is needed by the boot code.
+ Other things should be compressed with $(call if_needed,xzmisc)
+ which will use no BCJ filter and 1 MiB LZMA2 dictionary.
+
+Notes on compression options
+
+ Since the XZ Embedded supports only streams with no integrity check or
+ CRC32, make sure that you don't use some other integrity check type
+ when encoding files that are supposed to be decoded by the kernel. With
+ liblzma, you need to use either LZMA_CHECK_NONE or LZMA_CHECK_CRC32
+ when encoding. With the xz command line tool, use --check=none or
+ --check=crc32.
+
+ Using CRC32 is strongly recommended unless there is some other layer
+ which will verify the integrity of the uncompressed data anyway.
+ Double checking the integrity would probably be waste of CPU cycles.
+ Note that the headers will always have a CRC32 which will be validated
+ by the decoder; you can only change the integrity check type (or
+ disable it) for the actual uncompressed data.
+
+ In userspace, LZMA2 is typically used with dictionary sizes of several
+ megabytes. The decoder needs to have the dictionary in RAM, thus big
+ dictionaries cannot be used for files that are intended to be decoded
+ by the kernel. 1 MiB is probably the maximum reasonable dictionary
+ size for in-kernel use (maybe more is OK for initramfs). The presets
+ in XZ Utils may not be optimal when creating files for the kernel,
+ so don't hesitate to use custom settings. Example:
+
+ xz --check=crc32 --lzma2=dict=512KiB inputfile
+
+ An exception to above dictionary size limitation is when the decoder
+ is used in single-call mode. Decompressing the kernel itself is an
+ example of this situation. In single-call mode, the memory usage
+ doesn't depend on the dictionary size, and it is perfectly fine to
+ use a big dictionary: for maximum compression, the dictionary should
+ be at least as big as the uncompressed data itself.
+
+Future plans
+
+ Creating a limited XZ encoder may be considered if people think it is
+ useful. LZMA2 is slower to compress than e.g. Deflate or LZO even at
+ the fastest settings, so it isn't clear if LZMA2 encoder is wanted
+ into the kernel.
+
+ Support for limited random-access reading is planned for the
+ decompression code. I don't know if it could have any use in the
+ kernel, but I know that it would be useful in some embedded projects
+ outside the Linux kernel.
+
+Conformance to the .xz file format specification
+
+ There are a couple of corner cases where things have been simplified
+ at expense of detecting errors as early as possible. These should not
+ matter in practice all, since they don't cause security issues. But
+ it is good to know this if testing the code e.g. with the test files
+ from XZ Utils.
+
+Reporting bugs
+
+ Before reporting a bug, please check that it's not fixed already
+ at upstream. See <http://tukaani.org/xz/embedded.html> to get the
+ latest code.
+
+ Report bugs to <lasse.collin@tukaani.org> or visit #tukaani on
+ Freenode and talk to Larhzu. I don't actively read LKML or other
+ kernel-related mailing lists, so if there's something I should know,
+ you should email to me personally or use IRC.
+
+ Don't bother Igor Pavlov with questions about the XZ implementation
+ in the kernel or about XZ Utils. While these two implementations
+ include essential code that is directly based on Igor Pavlov's code,
+ these implementations aren't maintained nor supported by him.
+
diff --git a/sys/contrib/xz-embedded/linux/include/linux/decompress/unxz.h b/sys/contrib/xz-embedded/linux/include/linux/decompress/unxz.h
new file mode 100644
index 0000000..41728fc
--- /dev/null
+++ b/sys/contrib/xz-embedded/linux/include/linux/decompress/unxz.h
@@ -0,0 +1,19 @@
+/*
+ * Wrapper for decompressing XZ-compressed kernel, initramfs, and initrd
+ *
+ * Author: Lasse Collin <lasse.collin@tukaani.org>
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+#ifndef DECOMPRESS_UNXZ_H
+#define DECOMPRESS_UNXZ_H
+
+int unxz(unsigned char *in, int in_size,
+ int (*fill)(void *dest, unsigned int size),
+ int (*flush)(void *src, unsigned int size),
+ unsigned char *out, int *in_used,
+ void (*error)(char *x));
+
+#endif
diff --git a/sys/contrib/xz-embedded/linux/include/linux/xz.h b/sys/contrib/xz-embedded/linux/include/linux/xz.h
new file mode 100644
index 0000000..56245a1
--- /dev/null
+++ b/sys/contrib/xz-embedded/linux/include/linux/xz.h
@@ -0,0 +1,278 @@
+/*
+ * XZ decompressor
+ *
+ * Authors: Lasse Collin <lasse.collin@tukaani.org>
+ * Igor Pavlov <http://7-zip.org/>
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+#ifndef XZ_H
+#define XZ_H
+
+#ifdef __KERNEL__
+# include <linux/stddef.h>
+# include <linux/types.h>
+#else
+#ifdef __FreeBSD__
+# include <sys/stddef.h>
+# include <sys/types.h>
+#else
+# include <stddef.h>
+# include <stdint.h>
+#endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* In Linux, this is used to make extern functions static when needed. */
+#ifndef XZ_EXTERN
+# define XZ_EXTERN extern
+#endif
+
+/**
+ * enum xz_mode - Operation mode
+ *
+ * @XZ_SINGLE: Single-call mode. This uses less RAM than
+ * than multi-call modes, because the LZMA2
+ * dictionary doesn't need to be allocated as
+ * part of the decoder state. All required data
+ * structures are allocated at initialization,
+ * so xz_dec_run() cannot return XZ_MEM_ERROR.
+ * @XZ_PREALLOC: Multi-call mode with preallocated LZMA2
+ * dictionary buffer. All data structures are
+ * allocated at initialization, so xz_dec_run()
+ * cannot return XZ_MEM_ERROR.
+ * @XZ_DYNALLOC: Multi-call mode. The LZMA2 dictionary is
+ * allocated once the required size has been
+ * parsed from the stream headers. If the
+ * allocation fails, xz_dec_run() will return
+ * XZ_MEM_ERROR.
+ *
+ * It is possible to enable support only for a subset of the above
+ * modes at compile time by defining XZ_DEC_SINGLE, XZ_DEC_PREALLOC,
+ * or XZ_DEC_DYNALLOC. The xz_dec kernel module is always compiled
+ * with support for all operation modes, but the preboot code may
+ * be built with fewer features to minimize code size.
+ */
+enum xz_mode {
+ XZ_SINGLE,
+ XZ_PREALLOC,
+ XZ_DYNALLOC
+};
+
+/**
+ * enum xz_ret - Return codes
+ * @XZ_OK: Everything is OK so far. More input or more
+ * output space is required to continue. This
+ * return code is possible only in multi-call mode
+ * (XZ_PREALLOC or XZ_DYNALLOC).
+ * @XZ_STREAM_END: Operation finished successfully.
+ * @XZ_UNSUPPORTED_CHECK: Integrity check type is not supported. Decoding
+ * is still possible in multi-call mode by simply
+ * calling xz_dec_run() again.
+ * Note that this return value is used only if
+ * XZ_DEC_ANY_CHECK was defined at build time,
+ * which is not used in the kernel. Unsupported
+ * check types return XZ_OPTIONS_ERROR if
+ * XZ_DEC_ANY_CHECK was not defined at build time.
+ * @XZ_MEM_ERROR: Allocating memory failed. This return code is
+ * possible only if the decoder was initialized
+ * with XZ_DYNALLOC. The amount of memory that was
+ * tried to be allocated was no more than the
+ * dict_max argument given to xz_dec_init().
+ * @XZ_MEMLIMIT_ERROR: A bigger LZMA2 dictionary would be needed than
+ * allowed by the dict_max argument given to
+ * xz_dec_init(). This return value is possible
+ * only in multi-call mode (XZ_PREALLOC or
+ * XZ_DYNALLOC); the single-call mode (XZ_SINGLE)
+ * ignores the dict_max argument.
+ * @XZ_FORMAT_ERROR: File format was not recognized (wrong magic
+ * bytes).
+ * @XZ_OPTIONS_ERROR: This implementation doesn't support the requested
+ * compression options. In the decoder this means
+ * that the header CRC32 matches, but the header
+ * itself specifies something that we don't support.
+ * @XZ_DATA_ERROR: Compressed data is corrupt.
+ * @XZ_BUF_ERROR: Cannot make any progress. Details are slightly
+ * different between multi-call and single-call
+ * mode; more information below.
+ *
+ * In multi-call mode, XZ_BUF_ERROR is returned when two consecutive calls
+ * to XZ code cannot consume any input and cannot produce any new output.
+ * This happens when there is no new input available, or the output buffer
+ * is full while at least one output byte is still pending. Assuming your
+ * code is not buggy, you can get this error only when decoding a compressed
+ * stream that is truncated or otherwise corrupt.
+ *
+ * In single-call mode, XZ_BUF_ERROR is returned only when the output buffer
+ * is too small or the compressed input is corrupt in a way that makes the
+ * decoder produce more output than the caller expected. When it is
+ * (relatively) clear that the compressed input is truncated, XZ_DATA_ERROR
+ * is used instead of XZ_BUF_ERROR.
+ */
+enum xz_ret {
+ XZ_OK,
+ XZ_STREAM_END,
+ XZ_UNSUPPORTED_CHECK,
+ XZ_MEM_ERROR,
+ XZ_MEMLIMIT_ERROR,
+ XZ_FORMAT_ERROR,
+ XZ_OPTIONS_ERROR,
+ XZ_DATA_ERROR,
+ XZ_BUF_ERROR
+};
+
+/**
+ * struct xz_buf - Passing input and output buffers to XZ code
+ * @in: Beginning of the input buffer. This may be NULL if and only
+ * if in_pos is equal to in_size.
+ * @in_pos: Current position in the input buffer. This must not exceed
+ * in_size.
+ * @in_size: Size of the input buffer
+ * @out: Beginning of the output buffer. This may be NULL if and only
+ * if out_pos is equal to out_size.
+ * @out_pos: Current position in the output buffer. This must not exceed
+ * out_size.
+ * @out_size: Size of the output buffer
+ *
+ * Only the contents of the output buffer from out[out_pos] onward, and
+ * the variables in_pos and out_pos are modified by the XZ code.
+ */
+struct xz_buf {
+ const uint8_t *in;
+ size_t in_pos;
+ size_t in_size;
+
+ uint8_t *out;
+ size_t out_pos;
+ size_t out_size;
+};
+
+/**
+ * struct xz_dec - Opaque type to hold the XZ decoder state
+ */
+struct xz_dec;
+
+/**
+ * xz_dec_init() - Allocate and initialize a XZ decoder state
+ * @mode: Operation mode
+ * @dict_max: Maximum size of the LZMA2 dictionary (history buffer) for
+ * multi-call decoding. This is ignored in single-call mode
+ * (mode == XZ_SINGLE). LZMA2 dictionary is always 2^n bytes
+ * or 2^n + 2^(n-1) bytes (the latter sizes are less common
+ * in practice), so other values for dict_max don't make sense.
+ * In the kernel, dictionary sizes of 64 KiB, 128 KiB, 256 KiB,
+ * 512 KiB, and 1 MiB are probably the only reasonable values,
+ * except for kernel and initramfs images where a bigger
+ * dictionary can be fine and useful.
+ *
+ * Single-call mode (XZ_SINGLE): xz_dec_run() decodes the whole stream at
+ * once. The caller must provide enough output space or the decoding will
+ * fail. The output space is used as the dictionary buffer, which is why
+ * there is no need to allocate the dictionary as part of the decoder's
+ * internal state.
+ *
+ * Because the output buffer is used as the workspace, streams encoded using
+ * a big dictionary are not a problem in single-call mode. It is enough that
+ * the output buffer is big enough to hold the actual uncompressed data; it
+ * can be smaller than the dictionary size stored in the stream headers.
+ *
+ * Multi-call mode with preallocated dictionary (XZ_PREALLOC): dict_max bytes
+ * of memory is preallocated for the LZMA2 dictionary. This way there is no
+ * risk that xz_dec_run() could run out of memory, since xz_dec_run() will
+ * never allocate any memory. Instead, if the preallocated dictionary is too
+ * small for decoding the given input stream, xz_dec_run() will return
+ * XZ_MEMLIMIT_ERROR. Thus, it is important to know what kind of data will be
+ * decoded to avoid allocating excessive amount of memory for the dictionary.
+ *
+ * Multi-call mode with dynamically allocated dictionary (XZ_DYNALLOC):
+ * dict_max specifies the maximum allowed dictionary size that xz_dec_run()
+ * may allocate once it has parsed the dictionary size from the stream
+ * headers. This way excessive allocations can be avoided while still
+ * limiting the maximum memory usage to a sane value to prevent running the
+ * system out of memory when decompressing streams from untrusted sources.
+ *
+ * On success, xz_dec_init() returns a pointer to struct xz_dec, which is
+ * ready to be used with xz_dec_run(). If memory allocation fails,
+ * xz_dec_init() returns NULL.
+ */
+XZ_EXTERN struct xz_dec *xz_dec_init(enum xz_mode mode, uint32_t dict_max);
+
+/**
+ * xz_dec_run() - Run the XZ decoder
+ * @s: Decoder state allocated using xz_dec_init()
+ * @b: Input and output buffers
+ *
+ * The possible return values depend on build options and operation mode.
+ * See enum xz_ret for details.
+ *
+ * Note that if an error occurs in single-call mode (return value is not
+ * XZ_STREAM_END), b->in_pos and b->out_pos are not modified and the
+ * contents of the output buffer from b->out[b->out_pos] onward are
+ * undefined. This is true even after XZ_BUF_ERROR, because with some filter
+ * chains, there may be a second pass over the output buffer, and this pass
+ * cannot be properly done if the output buffer is truncated. Thus, you
+ * cannot give the single-call decoder a too small buffer and then expect to
+ * get that amount valid data from the beginning of the stream. You must use
+ * the multi-call decoder if you don't want to uncompress the whole stream.
+ */
+XZ_EXTERN enum xz_ret xz_dec_run(struct xz_dec *s, struct xz_buf *b);
+
+/**
+ * xz_dec_reset() - Reset an already allocated decoder state
+ * @s: Decoder state allocated using xz_dec_init()
+ *
+ * This function can be used to reset the multi-call decoder state without
+ * freeing and reallocating memory with xz_dec_end() and xz_dec_init().
+ *
+ * In single-call mode, xz_dec_reset() is always called in the beginning of
+ * xz_dec_run(). Thus, explicit call to xz_dec_reset() is useful only in
+ * multi-call mode.
+ */
+XZ_EXTERN void xz_dec_reset(struct xz_dec *s);
+
+/**
+ * xz_dec_end() - Free the memory allocated for the decoder state
+ * @s: Decoder state allocated using xz_dec_init(). If s is NULL,
+ * this function does nothing.
+ */
+XZ_EXTERN void xz_dec_end(struct xz_dec *s);
+
+/*
+ * Standalone build (userspace build or in-kernel build for boot time use)
+ * needs a CRC32 implementation. For normal in-kernel use, kernel's own
+ * CRC32 module is used instead, and users of this module don't need to
+ * care about the functions below.
+ */
+#ifndef XZ_INTERNAL_CRC32
+# ifdef __KERNEL__
+# define XZ_INTERNAL_CRC32 0
+# else
+# define XZ_INTERNAL_CRC32 1
+# endif
+#endif
+
+#if XZ_INTERNAL_CRC32
+/*
+ * This must be called before any other xz_* function to initialize
+ * the CRC32 lookup table.
+ */
+XZ_EXTERN void xz_crc32_init(void);
+
+/*
+ * Update CRC32 value using the polynomial from IEEE-802.3. To start a new
+ * calculation, the third argument must be zero. To continue the calculation,
+ * the previously returned value is passed as the third argument.
+ */
+XZ_EXTERN uint32_t xz_crc32(const uint8_t *buf, size_t size, uint32_t crc);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/sys/contrib/xz-embedded/linux/lib/decompress_unxz.c b/sys/contrib/xz-embedded/linux/lib/decompress_unxz.c
new file mode 100644
index 0000000..cecd23d
--- /dev/null
+++ b/sys/contrib/xz-embedded/linux/lib/decompress_unxz.c
@@ -0,0 +1,397 @@
+/*
+ * Wrapper for decompressing XZ-compressed kernel, initramfs, and initrd
+ *
+ * Author: Lasse Collin <lasse.collin@tukaani.org>
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+/*
+ * Important notes about in-place decompression
+ *
+ * At least on x86, the kernel is decompressed in place: the compressed data
+ * is placed to the end of the output buffer, and the decompressor overwrites
+ * most of the compressed data. There must be enough safety margin to
+ * guarantee that the write position is always behind the read position.
+ *
+ * The safety margin for XZ with LZMA2 or BCJ+LZMA2 is calculated below.
+ * Note that the margin with XZ is bigger than with Deflate (gzip)!
+ *
+ * The worst case for in-place decompression is that the beginning of
+ * the file is compressed extremely well, and the rest of the file is
+ * uncompressible. Thus, we must look for worst-case expansion when the
+ * compressor is encoding uncompressible data.
+ *
+ * The structure of the .xz file in case of a compresed kernel is as follows.
+ * Sizes (as bytes) of the fields are in parenthesis.
+ *
+ * Stream Header (12)
+ * Block Header:
+ * Block Header (8-12)
+ * Compressed Data (N)
+ * Block Padding (0-3)
+ * CRC32 (4)
+ * Index (8-20)
+ * Stream Footer (12)
+ *
+ * Normally there is exactly one Block, but let's assume that there are
+ * 2-4 Blocks just in case. Because Stream Header and also Block Header
+ * of the first Block don't make the decompressor produce any uncompressed
+ * data, we can ignore them from our calculations. Block Headers of possible
+ * additional Blocks have to be taken into account still. With these
+ * assumptions, it is safe to assume that the total header overhead is
+ * less than 128 bytes.
+ *
+ * Compressed Data contains LZMA2 or BCJ+LZMA2 encoded data. Since BCJ
+ * doesn't change the size of the data, it is enough to calculate the
+ * safety margin for LZMA2.
+ *
+ * LZMA2 stores the data in chunks. Each chunk has a header whose size is
+ * a maximum of 6 bytes, but to get round 2^n numbers, let's assume that
+ * the maximum chunk header size is 8 bytes. After the chunk header, there
+ * may be up to 64 KiB of actual payload in the chunk. Often the payload is
+ * quite a bit smaller though; to be safe, let's assume that an average
+ * chunk has only 32 KiB of payload.
+ *
+ * The maximum uncompressed size of the payload is 2 MiB. The minimum
+ * uncompressed size of the payload is in practice never less than the
+ * payload size itself. The LZMA2 format would allow uncompressed size
+ * to be less than the payload size, but no sane compressor creates such
+ * files. LZMA2 supports storing uncompressible data in uncompressed form,
+ * so there's never a need to create payloads whose uncompressed size is
+ * smaller than the compressed size.
+ *
+ * The assumption, that the uncompressed size of the payload is never
+ * smaller than the payload itself, is valid only when talking about
+ * the payload as a whole. It is possible that the payload has parts where
+ * the decompressor consumes more input than it produces output. Calculating
+ * the worst case for this would be tricky. Instead of trying to do that,
+ * let's simply make sure that the decompressor never overwrites any bytes
+ * of the payload which it is currently reading.
+ *
+ * Now we have enough information to calculate the safety margin. We need
+ * - 128 bytes for the .xz file format headers;
+ * - 8 bytes per every 32 KiB of uncompressed size (one LZMA2 chunk header
+ * per chunk, each chunk having average payload size of 32 KiB); and
+ * - 64 KiB (biggest possible LZMA2 chunk payload size) to make sure that
+ * the decompressor never overwrites anything from the LZMA2 chunk
+ * payload it is currently reading.
+ *
+ * We get the following formula:
+ *
+ * safety_margin = 128 + uncompressed_size * 8 / 32768 + 65536
+ * = 128 + (uncompressed_size >> 12) + 65536
+ *
+ * For comparision, according to arch/x86/boot/compressed/misc.c, the
+ * equivalent formula for Deflate is this:
+ *
+ * safety_margin = 18 + (uncompressed_size >> 12) + 32768
+ *
+ * Thus, when updating Deflate-only in-place kernel decompressor to
+ * support XZ, the fixed overhead has to be increased from 18+32768 bytes
+ * to 128+65536 bytes.
+ */
+
+/*
+ * STATIC is defined to "static" if we are being built for kernel
+ * decompression (pre-boot code). <linux/decompress/mm.h> will define
+ * STATIC to empty if it wasn't already defined. Since we will need to
+ * know later if we are being used for kernel decompression, we define
+ * XZ_PREBOOT here.
+ */
+#ifdef STATIC
+# define XZ_PREBOOT
+#endif
+#ifdef __KERNEL__
+# include <linux/decompress/mm.h>
+#endif
+#define XZ_EXTERN STATIC
+
+#ifndef XZ_PREBOOT
+# include <linux/slab.h>
+# include <linux/xz.h>
+#else
+/*
+ * Use the internal CRC32 code instead of kernel's CRC32 module, which
+ * is not available in early phase of booting.
+ */
+#define XZ_INTERNAL_CRC32 1
+
+/*
+ * For boot time use, we enable only the BCJ filter of the current
+ * architecture or none if no BCJ filter is available for the architecture.
+ */
+#ifdef CONFIG_X86
+# define XZ_DEC_X86
+#endif
+#ifdef CONFIG_PPC
+# define XZ_DEC_POWERPC
+#endif
+#ifdef CONFIG_ARM
+# define XZ_DEC_ARM
+#endif
+#ifdef CONFIG_IA64
+# define XZ_DEC_IA64
+#endif
+#ifdef CONFIG_SPARC
+# define XZ_DEC_SPARC
+#endif
+
+/*
+ * This will get the basic headers so that memeq() and others
+ * can be defined.
+ */
+#include "xz/xz_private.h"
+
+/*
+ * Replace the normal allocation functions with the versions from
+ * <linux/decompress/mm.h>. vfree() needs to support vfree(NULL)
+ * when XZ_DYNALLOC is used, but the pre-boot free() doesn't support it.
+ * Workaround it here because the other decompressors don't need it.
+ */
+#undef kmalloc
+#undef kfree
+#undef vmalloc
+#undef vfree
+#define kmalloc(size, flags) malloc(size)
+#define kfree(ptr) free(ptr)
+#define vmalloc(size) malloc(size)
+#define vfree(ptr) do { if (ptr != NULL) free(ptr); } while (0)
+
+/*
+ * FIXME: Not all basic memory functions are provided in architecture-specific
+ * files (yet). We define our own versions here for now, but this should be
+ * only a temporary solution.
+ *
+ * memeq and memzero are not used much and any remotely sane implementation
+ * is fast enough. memcpy/memmove speed matters in multi-call mode, but
+ * the kernel image is decompressed in single-call mode, in which only
+ * memcpy speed can matter and only if there is a lot of uncompressible data
+ * (LZMA2 stores uncompressible chunks in uncompressed form). Thus, the
+ * functions below should just be kept small; it's probably not worth
+ * optimizing for speed.
+ */
+
+#ifndef memeq
+static bool memeq(const void *a, const void *b, size_t size)
+{
+ const uint8_t *x = a;
+ const uint8_t *y = b;
+ size_t i;
+
+ for (i = 0; i < size; ++i)
+ if (x[i] != y[i])
+ return false;
+
+ return true;
+}
+#endif
+
+#ifndef memzero
+static void memzero(void *buf, size_t size)
+{
+ uint8_t *b = buf;
+ uint8_t *e = b + size;
+
+ while (b != e)
+ *b++ = '\0';
+}
+#endif
+
+#ifndef memmove
+/* Not static to avoid a conflict with the prototype in the Linux headers. */
+void *memmove(void *dest, const void *src, size_t size)
+{
+ uint8_t *d = dest;
+ const uint8_t *s = src;
+ size_t i;
+
+ if (d < s) {
+ for (i = 0; i < size; ++i)
+ d[i] = s[i];
+ } else if (d > s) {
+ i = size;
+ while (i-- > 0)
+ d[i] = s[i];
+ }
+
+ return dest;
+}
+#endif
+
+/*
+ * Since we need memmove anyway, would use it as memcpy too.
+ * Commented out for now to avoid breaking things.
+ */
+/*
+#ifndef memcpy
+# define memcpy memmove
+#endif
+*/
+
+#include "xz/xz_crc32.c"
+#include "xz/xz_dec_stream.c"
+#include "xz/xz_dec_lzma2.c"
+#include "xz/xz_dec_bcj.c"
+
+#endif /* XZ_PREBOOT */
+
+/* Size of the input and output buffers in multi-call mode */
+#define XZ_IOBUF_SIZE 4096
+
+/*
+ * This function implements the API defined in <linux/decompress/generic.h>.
+ *
+ * This wrapper will automatically choose single-call or multi-call mode
+ * of the native XZ decoder API. The single-call mode can be used only when
+ * both input and output buffers are available as a single chunk, i.e. when
+ * fill() and flush() won't be used.
+ */
+STATIC int INIT unxz(unsigned char *in, int in_size,
+ int (*fill)(void *dest, unsigned int size),
+ int (*flush)(void *src, unsigned int size),
+ unsigned char *out, int *in_used,
+ void (*error)(char *x))
+{
+ struct xz_buf b;
+ struct xz_dec *s;
+ enum xz_ret ret;
+ bool must_free_in = false;
+
+#if XZ_INTERNAL_CRC32
+ xz_crc32_init();
+#endif
+
+ if (in_used != NULL)
+ *in_used = 0;
+
+ if (fill == NULL && flush == NULL)
+ s = xz_dec_init(XZ_SINGLE, 0);
+ else
+ s = xz_dec_init(XZ_DYNALLOC, (uint32_t)-1);
+
+ if (s == NULL)
+ goto error_alloc_state;
+
+ if (flush == NULL) {
+ b.out = out;
+ b.out_size = (size_t)-1;
+ } else {
+ b.out_size = XZ_IOBUF_SIZE;
+ b.out = malloc(XZ_IOBUF_SIZE);
+ if (b.out == NULL)
+ goto error_alloc_out;
+ }
+
+ if (in == NULL) {
+ must_free_in = true;
+ in = malloc(XZ_IOBUF_SIZE);
+ if (in == NULL)
+ goto error_alloc_in;
+ }
+
+ b.in = in;
+ b.in_pos = 0;
+ b.in_size = in_size;
+ b.out_pos = 0;
+
+ if (fill == NULL && flush == NULL) {
+ ret = xz_dec_run(s, &b);
+ } else {
+ do {
+ if (b.in_pos == b.in_size && fill != NULL) {
+ if (in_used != NULL)
+ *in_used += b.in_pos;
+
+ b.in_pos = 0;
+
+ in_size = fill(in, XZ_IOBUF_SIZE);
+ if (in_size < 0) {
+ /*
+ * This isn't an optimal error code
+ * but it probably isn't worth making
+ * a new one either.
+ */
+ ret = XZ_BUF_ERROR;
+ break;
+ }
+
+ b.in_size = in_size;
+ }
+
+ ret = xz_dec_run(s, &b);
+
+ if (flush != NULL && (b.out_pos == b.out_size
+ || (ret != XZ_OK && b.out_pos > 0))) {
+ /*
+ * Setting ret here may hide an error
+ * returned by xz_dec_run(), but probably
+ * it's not too bad.
+ */
+ if (flush(b.out, b.out_pos) != (int)b.out_pos)
+ ret = XZ_BUF_ERROR;
+
+ b.out_pos = 0;
+ }
+ } while (ret == XZ_OK);
+
+ if (must_free_in)
+ free(in);
+
+ if (flush != NULL)
+ free(b.out);
+ }
+
+ if (in_used != NULL)
+ *in_used += b.in_pos;
+
+ xz_dec_end(s);
+
+ switch (ret) {
+ case XZ_STREAM_END:
+ return 0;
+
+ case XZ_MEM_ERROR:
+ /* This can occur only in multi-call mode. */
+ error("XZ decompressor ran out of memory");
+ break;
+
+ case XZ_FORMAT_ERROR:
+ error("Input is not in the XZ format (wrong magic bytes)");
+ break;
+
+ case XZ_OPTIONS_ERROR:
+ error("Input was encoded with settings that are not "
+ "supported by this XZ decoder");
+ break;
+
+ case XZ_DATA_ERROR:
+ case XZ_BUF_ERROR:
+ error("XZ-compressed data is corrupt");
+ break;
+
+ default:
+ error("Bug in the XZ decompressor");
+ break;
+ }
+
+ return -1;
+
+error_alloc_in:
+ if (flush != NULL)
+ free(b.out);
+
+error_alloc_out:
+ xz_dec_end(s);
+
+error_alloc_state:
+ error("XZ decompressor ran out of memory");
+ return -1;
+}
+
+/*
+ * This macro is used by architecture-specific files to decompress
+ * the kernel image.
+ */
+#define decompress unxz
diff --git a/sys/contrib/xz-embedded/linux/lib/xz/Kconfig b/sys/contrib/xz-embedded/linux/lib/xz/Kconfig
new file mode 100644
index 0000000..60a6088
--- /dev/null
+++ b/sys/contrib/xz-embedded/linux/lib/xz/Kconfig
@@ -0,0 +1,59 @@
+config XZ_DEC
+ tristate "XZ decompression support"
+ select CRC32
+ help
+ LZMA2 compression algorithm and BCJ filters are supported using
+ the .xz file format as the container. For integrity checking,
+ CRC32 is supported. See Documentation/xz.txt for more information.
+
+config XZ_DEC_X86
+ bool "x86 BCJ filter decoder" if EXPERT
+ default y
+ depends on XZ_DEC
+ select XZ_DEC_BCJ
+
+config XZ_DEC_POWERPC
+ bool "PowerPC BCJ filter decoder" if EXPERT
+ default y
+ depends on XZ_DEC
+ select XZ_DEC_BCJ
+
+config XZ_DEC_IA64
+ bool "IA-64 BCJ filter decoder" if EXPERT
+ default y
+ depends on XZ_DEC
+ select XZ_DEC_BCJ
+
+config XZ_DEC_ARM
+ bool "ARM BCJ filter decoder" if EXPERT
+ default y
+ depends on XZ_DEC
+ select XZ_DEC_BCJ
+
+config XZ_DEC_ARMTHUMB
+ bool "ARM-Thumb BCJ filter decoder" if EXPERT
+ default y
+ depends on XZ_DEC
+ select XZ_DEC_BCJ
+
+config XZ_DEC_SPARC
+ bool "SPARC BCJ filter decoder" if EXPERT
+ default y
+ depends on XZ_DEC
+ select XZ_DEC_BCJ
+
+config XZ_DEC_BCJ
+ bool
+ default n
+
+config XZ_DEC_TEST
+ tristate "XZ decompressor tester"
+ default n
+ depends on XZ_DEC
+ help
+ This allows passing .xz files to the in-kernel XZ decoder via
+ a character special file. It calculates CRC32 of the decompressed
+ data and writes diagnostics to the system log.
+
+ Unless you are developing the XZ decoder, you don't need this
+ and should say N.
diff --git a/sys/contrib/xz-embedded/linux/lib/xz/Makefile b/sys/contrib/xz-embedded/linux/lib/xz/Makefile
new file mode 100644
index 0000000..a7fa7693
--- /dev/null
+++ b/sys/contrib/xz-embedded/linux/lib/xz/Makefile
@@ -0,0 +1,5 @@
+obj-$(CONFIG_XZ_DEC) += xz_dec.o
+xz_dec-y := xz_dec_syms.o xz_dec_stream.o xz_dec_lzma2.o
+xz_dec-$(CONFIG_XZ_DEC_BCJ) += xz_dec_bcj.o
+
+obj-$(CONFIG_XZ_DEC_TEST) += xz_dec_test.o
diff --git a/sys/contrib/xz-embedded/linux/lib/xz/xz_crc32.c b/sys/contrib/xz-embedded/linux/lib/xz/xz_crc32.c
new file mode 100644
index 0000000..34532d1
--- /dev/null
+++ b/sys/contrib/xz-embedded/linux/lib/xz/xz_crc32.c
@@ -0,0 +1,59 @@
+/*
+ * CRC32 using the polynomial from IEEE-802.3
+ *
+ * Authors: Lasse Collin <lasse.collin@tukaani.org>
+ * Igor Pavlov <http://7-zip.org/>
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+/*
+ * This is not the fastest implementation, but it is pretty compact.
+ * The fastest versions of xz_crc32() on modern CPUs without hardware
+ * accelerated CRC instruction are 3-5 times as fast as this version,
+ * but they are bigger and use more memory for the lookup table.
+ */
+
+#include "xz_private.h"
+
+/*
+ * STATIC_RW_DATA is used in the pre-boot environment on some architectures.
+ * See <linux/decompress/mm.h> for details.
+ */
+#ifndef STATIC_RW_DATA
+# define STATIC_RW_DATA static
+#endif
+
+STATIC_RW_DATA uint32_t xz_crc32_table[256];
+
+XZ_EXTERN void xz_crc32_init(void)
+{
+ const uint32_t poly = 0xEDB88320;
+
+ uint32_t i;
+ uint32_t j;
+ uint32_t r;
+
+ for (i = 0; i < 256; ++i) {
+ r = i;
+ for (j = 0; j < 8; ++j)
+ r = (r >> 1) ^ (poly & ~((r & 1) - 1));
+
+ xz_crc32_table[i] = r;
+ }
+
+ return;
+}
+
+XZ_EXTERN uint32_t xz_crc32(const uint8_t *buf, size_t size, uint32_t crc)
+{
+ crc = ~crc;
+
+ while (size != 0) {
+ crc = xz_crc32_table[*buf++ ^ (crc & 0xFF)] ^ (crc >> 8);
+ --size;
+ }
+
+ return ~crc;
+}
diff --git a/sys/contrib/xz-embedded/linux/lib/xz/xz_dec_bcj.c b/sys/contrib/xz-embedded/linux/lib/xz/xz_dec_bcj.c
new file mode 100644
index 0000000..a768e6d
--- /dev/null
+++ b/sys/contrib/xz-embedded/linux/lib/xz/xz_dec_bcj.c
@@ -0,0 +1,574 @@
+/*
+ * Branch/Call/Jump (BCJ) filter decoders
+ *
+ * Authors: Lasse Collin <lasse.collin@tukaani.org>
+ * Igor Pavlov <http://7-zip.org/>
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+#include "xz_private.h"
+
+/*
+ * The rest of the file is inside this ifdef. It makes things a little more
+ * convenient when building without support for any BCJ filters.
+ */
+#ifdef XZ_DEC_BCJ
+
+struct xz_dec_bcj {
+ /* Type of the BCJ filter being used */
+ enum {
+ BCJ_X86 = 4, /* x86 or x86-64 */
+ BCJ_POWERPC = 5, /* Big endian only */
+ BCJ_IA64 = 6, /* Big or little endian */
+ BCJ_ARM = 7, /* Little endian only */
+ BCJ_ARMTHUMB = 8, /* Little endian only */
+ BCJ_SPARC = 9 /* Big or little endian */
+ } type;
+
+ /*
+ * Return value of the next filter in the chain. We need to preserve
+ * this information across calls, because we must not call the next
+ * filter anymore once it has returned XZ_STREAM_END.
+ */
+ enum xz_ret ret;
+
+ /* True if we are operating in single-call mode. */
+ bool single_call;
+
+ /*
+ * Absolute position relative to the beginning of the uncompressed
+ * data (in a single .xz Block). We care only about the lowest 32
+ * bits so this doesn't need to be uint64_t even with big files.
+ */
+ uint32_t pos;
+
+ /* x86 filter state */
+ uint32_t x86_prev_mask;
+
+ /* Temporary space to hold the variables from struct xz_buf */
+ uint8_t *out;
+ size_t out_pos;
+ size_t out_size;
+
+ struct {
+ /* Amount of already filtered data in the beginning of buf */
+ size_t filtered;
+
+ /* Total amount of data currently stored in buf */
+ size_t size;
+
+ /*
+ * Buffer to hold a mix of filtered and unfiltered data. This
+ * needs to be big enough to hold Alignment + 2 * Look-ahead:
+ *
+ * Type Alignment Look-ahead
+ * x86 1 4
+ * PowerPC 4 0
+ * IA-64 16 0
+ * ARM 4 0
+ * ARM-Thumb 2 2
+ * SPARC 4 0
+ */
+ uint8_t buf[16];
+ } temp;
+};
+
+#ifdef XZ_DEC_X86
+/*
+ * This is used to test the most significant byte of a memory address
+ * in an x86 instruction.
+ */
+static inline int bcj_x86_test_msbyte(uint8_t b)
+{
+ return b == 0x00 || b == 0xFF;
+}
+
+static size_t bcj_x86(struct xz_dec_bcj *s, uint8_t *buf, size_t size)
+{
+ static const bool mask_to_allowed_status[8]
+ = { true, true, true, false, true, false, false, false };
+
+ static const uint8_t mask_to_bit_num[8] = { 0, 1, 2, 2, 3, 3, 3, 3 };
+
+ size_t i;
+ size_t prev_pos = (size_t)-1;
+ uint32_t prev_mask = s->x86_prev_mask;
+ uint32_t src;
+ uint32_t dest;
+ uint32_t j;
+ uint8_t b;
+
+ if (size <= 4)
+ return 0;
+
+ size -= 4;
+ for (i = 0; i < size; ++i) {
+ if ((buf[i] & 0xFE) != 0xE8)
+ continue;
+
+ prev_pos = i - prev_pos;
+ if (prev_pos > 3) {
+ prev_mask = 0;
+ } else {
+ prev_mask = (prev_mask << (prev_pos - 1)) & 7;
+ if (prev_mask != 0) {
+ b = buf[i + 4 - mask_to_bit_num[prev_mask]];
+ if (!mask_to_allowed_status[prev_mask]
+ || bcj_x86_test_msbyte(b)) {
+ prev_pos = i;
+ prev_mask = (prev_mask << 1) | 1;
+ continue;
+ }
+ }
+ }
+
+ prev_pos = i;
+
+ if (bcj_x86_test_msbyte(buf[i + 4])) {
+ src = get_unaligned_le32(buf + i + 1);
+ while (true) {
+ dest = src - (s->pos + (uint32_t)i + 5);
+ if (prev_mask == 0)
+ break;
+
+ j = mask_to_bit_num[prev_mask] * 8;
+ b = (uint8_t)(dest >> (24 - j));
+ if (!bcj_x86_test_msbyte(b))
+ break;
+
+ src = dest ^ (((uint32_t)1 << (32 - j)) - 1);
+ }
+
+ dest &= 0x01FFFFFF;
+ dest |= (uint32_t)0 - (dest & 0x01000000);
+ put_unaligned_le32(dest, buf + i + 1);
+ i += 4;
+ } else {
+ prev_mask = (prev_mask << 1) | 1;
+ }
+ }
+
+ prev_pos = i - prev_pos;
+ s->x86_prev_mask = prev_pos > 3 ? 0 : prev_mask << (prev_pos - 1);
+ return i;
+}
+#endif
+
+#ifdef XZ_DEC_POWERPC
+static size_t bcj_powerpc(struct xz_dec_bcj *s, uint8_t *buf, size_t size)
+{
+ size_t i;
+ uint32_t instr;
+
+ for (i = 0; i + 4 <= size; i += 4) {
+ instr = get_unaligned_be32(buf + i);
+ if ((instr & 0xFC000003) == 0x48000001) {
+ instr &= 0x03FFFFFC;
+ instr -= s->pos + (uint32_t)i;
+ instr &= 0x03FFFFFC;
+ instr |= 0x48000001;
+ put_unaligned_be32(instr, buf + i);
+ }
+ }
+
+ return i;
+}
+#endif
+
+#ifdef XZ_DEC_IA64
+static size_t bcj_ia64(struct xz_dec_bcj *s, uint8_t *buf, size_t size)
+{
+ static const uint8_t branch_table[32] = {
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 4, 4, 6, 6, 0, 0, 7, 7,
+ 4, 4, 0, 0, 4, 4, 0, 0
+ };
+
+ /*
+ * The local variables take a little bit stack space, but it's less
+ * than what LZMA2 decoder takes, so it doesn't make sense to reduce
+ * stack usage here without doing that for the LZMA2 decoder too.
+ */
+
+ /* Loop counters */
+ size_t i;
+ size_t j;
+
+ /* Instruction slot (0, 1, or 2) in the 128-bit instruction word */
+ uint32_t slot;
+
+ /* Bitwise offset of the instruction indicated by slot */
+ uint32_t bit_pos;
+
+ /* bit_pos split into byte and bit parts */
+ uint32_t byte_pos;
+ uint32_t bit_res;
+
+ /* Address part of an instruction */
+ uint32_t addr;
+
+ /* Mask used to detect which instructions to convert */
+ uint32_t mask;
+
+ /* 41-bit instruction stored somewhere in the lowest 48 bits */
+ uint64_t instr;
+
+ /* Instruction normalized with bit_res for easier manipulation */
+ uint64_t norm;
+
+ for (i = 0; i + 16 <= size; i += 16) {
+ mask = branch_table[buf[i] & 0x1F];
+ for (slot = 0, bit_pos = 5; slot < 3; ++slot, bit_pos += 41) {
+ if (((mask >> slot) & 1) == 0)
+ continue;
+
+ byte_pos = bit_pos >> 3;
+ bit_res = bit_pos & 7;
+ instr = 0;
+ for (j = 0; j < 6; ++j)
+ instr |= (uint64_t)(buf[i + j + byte_pos])
+ << (8 * j);
+
+ norm = instr >> bit_res;
+
+ if (((norm >> 37) & 0x0F) == 0x05
+ && ((norm >> 9) & 0x07) == 0) {
+ addr = (norm >> 13) & 0x0FFFFF;
+ addr |= ((uint32_t)(norm >> 36) & 1) << 20;
+ addr <<= 4;
+ addr -= s->pos + (uint32_t)i;
+ addr >>= 4;
+
+ norm &= ~((uint64_t)0x8FFFFF << 13);
+ norm |= (uint64_t)(addr & 0x0FFFFF) << 13;
+ norm |= (uint64_t)(addr & 0x100000)
+ << (36 - 20);
+
+ instr &= (1 << bit_res) - 1;
+ instr |= norm << bit_res;
+
+ for (j = 0; j < 6; j++)
+ buf[i + j + byte_pos]
+ = (uint8_t)(instr >> (8 * j));
+ }
+ }
+ }
+
+ return i;
+}
+#endif
+
+#ifdef XZ_DEC_ARM
+static size_t bcj_arm(struct xz_dec_bcj *s, uint8_t *buf, size_t size)
+{
+ size_t i;
+ uint32_t addr;
+
+ for (i = 0; i + 4 <= size; i += 4) {
+ if (buf[i + 3] == 0xEB) {
+ addr = (uint32_t)buf[i] | ((uint32_t)buf[i + 1] << 8)
+ | ((uint32_t)buf[i + 2] << 16);
+ addr <<= 2;
+ addr -= s->pos + (uint32_t)i + 8;
+ addr >>= 2;
+ buf[i] = (uint8_t)addr;
+ buf[i + 1] = (uint8_t)(addr >> 8);
+ buf[i + 2] = (uint8_t)(addr >> 16);
+ }
+ }
+
+ return i;
+}
+#endif
+
+#ifdef XZ_DEC_ARMTHUMB
+static size_t bcj_armthumb(struct xz_dec_bcj *s, uint8_t *buf, size_t size)
+{
+ size_t i;
+ uint32_t addr;
+
+ for (i = 0; i + 4 <= size; i += 2) {
+ if ((buf[i + 1] & 0xF8) == 0xF0
+ && (buf[i + 3] & 0xF8) == 0xF8) {
+ addr = (((uint32_t)buf[i + 1] & 0x07) << 19)
+ | ((uint32_t)buf[i] << 11)
+ | (((uint32_t)buf[i + 3] & 0x07) << 8)
+ | (uint32_t)buf[i + 2];
+ addr <<= 1;
+ addr -= s->pos + (uint32_t)i + 4;
+ addr >>= 1;
+ buf[i + 1] = (uint8_t)(0xF0 | ((addr >> 19) & 0x07));
+ buf[i] = (uint8_t)(addr >> 11);
+ buf[i + 3] = (uint8_t)(0xF8 | ((addr >> 8) & 0x07));
+ buf[i + 2] = (uint8_t)addr;
+ i += 2;
+ }
+ }
+
+ return i;
+}
+#endif
+
+#ifdef XZ_DEC_SPARC
+static size_t bcj_sparc(struct xz_dec_bcj *s, uint8_t *buf, size_t size)
+{
+ size_t i;
+ uint32_t instr;
+
+ for (i = 0; i + 4 <= size; i += 4) {
+ instr = get_unaligned_be32(buf + i);
+ if ((instr >> 22) == 0x100 || (instr >> 22) == 0x1FF) {
+ instr <<= 2;
+ instr -= s->pos + (uint32_t)i;
+ instr >>= 2;
+ instr = ((uint32_t)0x40000000 - (instr & 0x400000))
+ | 0x40000000 | (instr & 0x3FFFFF);
+ put_unaligned_be32(instr, buf + i);
+ }
+ }
+
+ return i;
+}
+#endif
+
+/*
+ * Apply the selected BCJ filter. Update *pos and s->pos to match the amount
+ * of data that got filtered.
+ *
+ * NOTE: This is implemented as a switch statement to avoid using function
+ * pointers, which could be problematic in the kernel boot code, which must
+ * avoid pointers to static data (at least on x86).
+ */
+static void bcj_apply(struct xz_dec_bcj *s,
+ uint8_t *buf, size_t *pos, size_t size)
+{
+ size_t filtered;
+
+ buf += *pos;
+ size -= *pos;
+
+ switch (s->type) {
+#ifdef XZ_DEC_X86
+ case BCJ_X86:
+ filtered = bcj_x86(s, buf, size);
+ break;
+#endif
+#ifdef XZ_DEC_POWERPC
+ case BCJ_POWERPC:
+ filtered = bcj_powerpc(s, buf, size);
+ break;
+#endif
+#ifdef XZ_DEC_IA64
+ case BCJ_IA64:
+ filtered = bcj_ia64(s, buf, size);
+ break;
+#endif
+#ifdef XZ_DEC_ARM
+ case BCJ_ARM:
+ filtered = bcj_arm(s, buf, size);
+ break;
+#endif
+#ifdef XZ_DEC_ARMTHUMB
+ case BCJ_ARMTHUMB:
+ filtered = bcj_armthumb(s, buf, size);
+ break;
+#endif
+#ifdef XZ_DEC_SPARC
+ case BCJ_SPARC:
+ filtered = bcj_sparc(s, buf, size);
+ break;
+#endif
+ default:
+ /* Never reached but silence compiler warnings. */
+ filtered = 0;
+ break;
+ }
+
+ *pos += filtered;
+ s->pos += filtered;
+}
+
+/*
+ * Flush pending filtered data from temp to the output buffer.
+ * Move the remaining mixture of possibly filtered and unfiltered
+ * data to the beginning of temp.
+ */
+static void bcj_flush(struct xz_dec_bcj *s, struct xz_buf *b)
+{
+ size_t copy_size;
+
+ copy_size = min_t(size_t, s->temp.filtered, b->out_size - b->out_pos);
+ memcpy(b->out + b->out_pos, s->temp.buf, copy_size);
+ b->out_pos += copy_size;
+
+ s->temp.filtered -= copy_size;
+ s->temp.size -= copy_size;
+ memmove(s->temp.buf, s->temp.buf + copy_size, s->temp.size);
+}
+
+/*
+ * The BCJ filter functions are primitive in sense that they process the
+ * data in chunks of 1-16 bytes. To hide this issue, this function does
+ * some buffering.
+ */
+XZ_EXTERN enum xz_ret xz_dec_bcj_run(struct xz_dec_bcj *s,
+ struct xz_dec_lzma2 *lzma2,
+ struct xz_buf *b)
+{
+ size_t out_start;
+
+ /*
+ * Flush pending already filtered data to the output buffer. Return
+ * immediatelly if we couldn't flush everything, or if the next
+ * filter in the chain had already returned XZ_STREAM_END.
+ */
+ if (s->temp.filtered > 0) {
+ bcj_flush(s, b);
+ if (s->temp.filtered > 0)
+ return XZ_OK;
+
+ if (s->ret == XZ_STREAM_END)
+ return XZ_STREAM_END;
+ }
+
+ /*
+ * If we have more output space than what is currently pending in
+ * temp, copy the unfiltered data from temp to the output buffer
+ * and try to fill the output buffer by decoding more data from the
+ * next filter in the chain. Apply the BCJ filter on the new data
+ * in the output buffer. If everything cannot be filtered, copy it
+ * to temp and rewind the output buffer position accordingly.
+ *
+ * This needs to be always run when temp.size == 0 to handle a special
+ * case where the output buffer is full and the next filter has no
+ * more output coming but hasn't returned XZ_STREAM_END yet.
+ */
+ if (s->temp.size < b->out_size - b->out_pos || s->temp.size == 0) {
+ out_start = b->out_pos;
+ memcpy(b->out + b->out_pos, s->temp.buf, s->temp.size);
+ b->out_pos += s->temp.size;
+
+ s->ret = xz_dec_lzma2_run(lzma2, b);
+ if (s->ret != XZ_STREAM_END
+ && (s->ret != XZ_OK || s->single_call))
+ return s->ret;
+
+ bcj_apply(s, b->out, &out_start, b->out_pos);
+
+ /*
+ * As an exception, if the next filter returned XZ_STREAM_END,
+ * we can do that too, since the last few bytes that remain
+ * unfiltered are meant to remain unfiltered.
+ */
+ if (s->ret == XZ_STREAM_END)
+ return XZ_STREAM_END;
+
+ s->temp.size = b->out_pos - out_start;
+ b->out_pos -= s->temp.size;
+ memcpy(s->temp.buf, b->out + b->out_pos, s->temp.size);
+
+ /*
+ * If there wasn't enough input to the next filter to fill
+ * the output buffer with unfiltered data, there's no point
+ * to try decoding more data to temp.
+ */
+ if (b->out_pos + s->temp.size < b->out_size)
+ return XZ_OK;
+ }
+
+ /*
+ * We have unfiltered data in temp. If the output buffer isn't full
+ * yet, try to fill the temp buffer by decoding more data from the
+ * next filter. Apply the BCJ filter on temp. Then we hopefully can
+ * fill the actual output buffer by copying filtered data from temp.
+ * A mix of filtered and unfiltered data may be left in temp; it will
+ * be taken care on the next call to this function.
+ */
+ if (b->out_pos < b->out_size) {
+ /* Make b->out{,_pos,_size} temporarily point to s->temp. */
+ s->out = b->out;
+ s->out_pos = b->out_pos;
+ s->out_size = b->out_size;
+ b->out = s->temp.buf;
+ b->out_pos = s->temp.size;
+ b->out_size = sizeof(s->temp.buf);
+
+ s->ret = xz_dec_lzma2_run(lzma2, b);
+
+ s->temp.size = b->out_pos;
+ b->out = s->out;
+ b->out_pos = s->out_pos;
+ b->out_size = s->out_size;
+
+ if (s->ret != XZ_OK && s->ret != XZ_STREAM_END)
+ return s->ret;
+
+ bcj_apply(s, s->temp.buf, &s->temp.filtered, s->temp.size);
+
+ /*
+ * If the next filter returned XZ_STREAM_END, we mark that
+ * everything is filtered, since the last unfiltered bytes
+ * of the stream are meant to be left as is.
+ */
+ if (s->ret == XZ_STREAM_END)
+ s->temp.filtered = s->temp.size;
+
+ bcj_flush(s, b);
+ if (s->temp.filtered > 0)
+ return XZ_OK;
+ }
+
+ return s->ret;
+}
+
+XZ_EXTERN struct xz_dec_bcj *xz_dec_bcj_create(bool single_call)
+{
+ struct xz_dec_bcj *s = kmalloc(sizeof(*s), GFP_KERNEL);
+ if (s != NULL)
+ s->single_call = single_call;
+
+ return s;
+}
+
+XZ_EXTERN enum xz_ret xz_dec_bcj_reset(struct xz_dec_bcj *s, uint8_t id)
+{
+ switch (id) {
+#ifdef XZ_DEC_X86
+ case BCJ_X86:
+#endif
+#ifdef XZ_DEC_POWERPC
+ case BCJ_POWERPC:
+#endif
+#ifdef XZ_DEC_IA64
+ case BCJ_IA64:
+#endif
+#ifdef XZ_DEC_ARM
+ case BCJ_ARM:
+#endif
+#ifdef XZ_DEC_ARMTHUMB
+ case BCJ_ARMTHUMB:
+#endif
+#ifdef XZ_DEC_SPARC
+ case BCJ_SPARC:
+#endif
+ break;
+
+ default:
+ /* Unsupported Filter ID */
+ return XZ_OPTIONS_ERROR;
+ }
+
+ s->type = id;
+ s->ret = XZ_OK;
+ s->pos = 0;
+ s->x86_prev_mask = 0;
+ s->temp.filtered = 0;
+ s->temp.size = 0;
+
+ return XZ_OK;
+}
+
+#endif
diff --git a/sys/contrib/xz-embedded/linux/lib/xz/xz_dec_lzma2.c b/sys/contrib/xz-embedded/linux/lib/xz/xz_dec_lzma2.c
new file mode 100644
index 0000000..a6cdc96
--- /dev/null
+++ b/sys/contrib/xz-embedded/linux/lib/xz/xz_dec_lzma2.c
@@ -0,0 +1,1171 @@
+/*
+ * LZMA2 decoder
+ *
+ * Authors: Lasse Collin <lasse.collin@tukaani.org>
+ * Igor Pavlov <http://7-zip.org/>
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+#include "xz_private.h"
+#include "xz_lzma2.h"
+
+/*
+ * Range decoder initialization eats the first five bytes of each LZMA chunk.
+ */
+#define RC_INIT_BYTES 5
+
+/*
+ * Minimum number of usable input buffer to safely decode one LZMA symbol.
+ * The worst case is that we decode 22 bits using probabilities and 26
+ * direct bits. This may decode at maximum of 20 bytes of input. However,
+ * lzma_main() does an extra normalization before returning, thus we
+ * need to put 21 here.
+ */
+#define LZMA_IN_REQUIRED 21
+
+/*
+ * Dictionary (history buffer)
+ *
+ * These are always true:
+ * start <= pos <= full <= end
+ * pos <= limit <= end
+ *
+ * In multi-call mode, also these are true:
+ * end == size
+ * size <= size_max
+ * allocated <= size
+ *
+ * Most of these variables are size_t to support single-call mode,
+ * in which the dictionary variables address the actual output
+ * buffer directly.
+ */
+struct dictionary {
+ /* Beginning of the history buffer */
+ uint8_t *buf;
+
+ /* Old position in buf (before decoding more data) */
+ size_t start;
+
+ /* Position in buf */
+ size_t pos;
+
+ /*
+ * How full dictionary is. This is used to detect corrupt input that
+ * would read beyond the beginning of the uncompressed stream.
+ */
+ size_t full;
+
+ /* Write limit; we don't write to buf[limit] or later bytes. */
+ size_t limit;
+
+ /*
+ * End of the dictionary buffer. In multi-call mode, this is
+ * the same as the dictionary size. In single-call mode, this
+ * indicates the size of the output buffer.
+ */
+ size_t end;
+
+ /*
+ * Size of the dictionary as specified in Block Header. This is used
+ * together with "full" to detect corrupt input that would make us
+ * read beyond the beginning of the uncompressed stream.
+ */
+ uint32_t size;
+
+ /*
+ * Maximum allowed dictionary size in multi-call mode.
+ * This is ignored in single-call mode.
+ */
+ uint32_t size_max;
+
+ /*
+ * Amount of memory currently allocated for the dictionary.
+ * This is used only with XZ_DYNALLOC. (With XZ_PREALLOC,
+ * size_max is always the same as the allocated size.)
+ */
+ uint32_t allocated;
+
+ /* Operation mode */
+ enum xz_mode mode;
+};
+
+/* Range decoder */
+struct rc_dec {
+ uint32_t range;
+ uint32_t code;
+
+ /*
+ * Number of initializing bytes remaining to be read
+ * by rc_read_init().
+ */
+ uint32_t init_bytes_left;
+
+ /*
+ * Buffer from which we read our input. It can be either
+ * temp.buf or the caller-provided input buffer.
+ */
+ const uint8_t *in;
+ size_t in_pos;
+ size_t in_limit;
+};
+
+/* Probabilities for a length decoder. */
+struct lzma_len_dec {
+ /* Probability of match length being at least 10 */
+ uint16_t choice;
+
+ /* Probability of match length being at least 18 */
+ uint16_t choice2;
+
+ /* Probabilities for match lengths 2-9 */
+ uint16_t low[POS_STATES_MAX][LEN_LOW_SYMBOLS];
+
+ /* Probabilities for match lengths 10-17 */
+ uint16_t mid[POS_STATES_MAX][LEN_MID_SYMBOLS];
+
+ /* Probabilities for match lengths 18-273 */
+ uint16_t high[LEN_HIGH_SYMBOLS];
+};
+
+struct lzma_dec {
+ /* Distances of latest four matches */
+ uint32_t rep0;
+ uint32_t rep1;
+ uint32_t rep2;
+ uint32_t rep3;
+
+ /* Types of the most recently seen LZMA symbols */
+ enum lzma_state state;
+
+ /*
+ * Length of a match. This is updated so that dict_repeat can
+ * be called again to finish repeating the whole match.
+ */
+ uint32_t len;
+
+ /*
+ * LZMA properties or related bit masks (number of literal
+ * context bits, a mask dervied from the number of literal
+ * position bits, and a mask dervied from the number
+ * position bits)
+ */
+ uint32_t lc;
+ uint32_t literal_pos_mask; /* (1 << lp) - 1 */
+ uint32_t pos_mask; /* (1 << pb) - 1 */
+
+ /* If 1, it's a match. Otherwise it's a single 8-bit literal. */
+ uint16_t is_match[STATES][POS_STATES_MAX];
+
+ /* If 1, it's a repeated match. The distance is one of rep0 .. rep3. */
+ uint16_t is_rep[STATES];
+
+ /*
+ * If 0, distance of a repeated match is rep0.
+ * Otherwise check is_rep1.
+ */
+ uint16_t is_rep0[STATES];
+
+ /*
+ * If 0, distance of a repeated match is rep1.
+ * Otherwise check is_rep2.
+ */
+ uint16_t is_rep1[STATES];
+
+ /* If 0, distance of a repeated match is rep2. Otherwise it is rep3. */
+ uint16_t is_rep2[STATES];
+
+ /*
+ * If 1, the repeated match has length of one byte. Otherwise
+ * the length is decoded from rep_len_decoder.
+ */
+ uint16_t is_rep0_long[STATES][POS_STATES_MAX];
+
+ /*
+ * Probability tree for the highest two bits of the match
+ * distance. There is a separate probability tree for match
+ * lengths of 2 (i.e. MATCH_LEN_MIN), 3, 4, and [5, 273].
+ */
+ uint16_t dist_slot[DIST_STATES][DIST_SLOTS];
+
+ /*
+ * Probility trees for additional bits for match distance
+ * when the distance is in the range [4, 127].
+ */
+ uint16_t dist_special[FULL_DISTANCES - DIST_MODEL_END];
+
+ /*
+ * Probability tree for the lowest four bits of a match
+ * distance that is equal to or greater than 128.
+ */
+ uint16_t dist_align[ALIGN_SIZE];
+
+ /* Length of a normal match */
+ struct lzma_len_dec match_len_dec;
+
+ /* Length of a repeated match */
+ struct lzma_len_dec rep_len_dec;
+
+ /* Probabilities of literals */
+ uint16_t literal[LITERAL_CODERS_MAX][LITERAL_CODER_SIZE];
+};
+
+struct lzma2_dec {
+ /* Position in xz_dec_lzma2_run(). */
+ enum lzma2_seq {
+ SEQ_CONTROL,
+ SEQ_UNCOMPRESSED_1,
+ SEQ_UNCOMPRESSED_2,
+ SEQ_COMPRESSED_0,
+ SEQ_COMPRESSED_1,
+ SEQ_PROPERTIES,
+ SEQ_LZMA_PREPARE,
+ SEQ_LZMA_RUN,
+ SEQ_COPY
+ } sequence;
+
+ /* Next position after decoding the compressed size of the chunk. */
+ enum lzma2_seq next_sequence;
+
+ /* Uncompressed size of LZMA chunk (2 MiB at maximum) */
+ uint32_t uncompressed;
+
+ /*
+ * Compressed size of LZMA chunk or compressed/uncompressed
+ * size of uncompressed chunk (64 KiB at maximum)
+ */
+ uint32_t compressed;
+
+ /*
+ * True if dictionary reset is needed. This is false before
+ * the first chunk (LZMA or uncompressed).
+ */
+ bool need_dict_reset;
+
+ /*
+ * True if new LZMA properties are needed. This is false
+ * before the first LZMA chunk.
+ */
+ bool need_props;
+};
+
+struct xz_dec_lzma2 {
+ /*
+ * The order below is important on x86 to reduce code size and
+ * it shouldn't hurt on other platforms. Everything up to and
+ * including lzma.pos_mask are in the first 128 bytes on x86-32,
+ * which allows using smaller instructions to access those
+ * variables. On x86-64, fewer variables fit into the first 128
+ * bytes, but this is still the best order without sacrificing
+ * the readability by splitting the structures.
+ */
+ struct rc_dec rc;
+ struct dictionary dict;
+ struct lzma2_dec lzma2;
+ struct lzma_dec lzma;
+
+ /*
+ * Temporary buffer which holds small number of input bytes between
+ * decoder calls. See lzma2_lzma() for details.
+ */
+ struct {
+ uint32_t size;
+ uint8_t buf[3 * LZMA_IN_REQUIRED];
+ } temp;
+};
+
+/**************
+ * Dictionary *
+ **************/
+
+/*
+ * Reset the dictionary state. When in single-call mode, set up the beginning
+ * of the dictionary to point to the actual output buffer.
+ */
+static void dict_reset(struct dictionary *dict, struct xz_buf *b)
+{
+ if (DEC_IS_SINGLE(dict->mode)) {
+ dict->buf = b->out + b->out_pos;
+ dict->end = b->out_size - b->out_pos;
+ }
+
+ dict->start = 0;
+ dict->pos = 0;
+ dict->limit = 0;
+ dict->full = 0;
+}
+
+/* Set dictionary write limit */
+static void dict_limit(struct dictionary *dict, size_t out_max)
+{
+ if (dict->end - dict->pos <= out_max)
+ dict->limit = dict->end;
+ else
+ dict->limit = dict->pos + out_max;
+}
+
+/* Return true if at least one byte can be written into the dictionary. */
+static inline bool dict_has_space(const struct dictionary *dict)
+{
+ return dict->pos < dict->limit;
+}
+
+/*
+ * Get a byte from the dictionary at the given distance. The distance is
+ * assumed to valid, or as a special case, zero when the dictionary is
+ * still empty. This special case is needed for single-call decoding to
+ * avoid writing a '\0' to the end of the destination buffer.
+ */
+static inline uint32_t dict_get(const struct dictionary *dict, uint32_t dist)
+{
+ size_t offset = dict->pos - dist - 1;
+
+ if (dist >= dict->pos)
+ offset += dict->end;
+
+ return dict->full > 0 ? dict->buf[offset] : 0;
+}
+
+/*
+ * Put one byte into the dictionary. It is assumed that there is space for it.
+ */
+static inline void dict_put(struct dictionary *dict, uint8_t byte)
+{
+ dict->buf[dict->pos++] = byte;
+
+ if (dict->full < dict->pos)
+ dict->full = dict->pos;
+}
+
+/*
+ * Repeat given number of bytes from the given distance. If the distance is
+ * invalid, false is returned. On success, true is returned and *len is
+ * updated to indicate how many bytes were left to be repeated.
+ */
+static bool dict_repeat(struct dictionary *dict, uint32_t *len, uint32_t dist)
+{
+ size_t back;
+ uint32_t left;
+
+ if (dist >= dict->full || dist >= dict->size)
+ return false;
+
+ left = min_t(size_t, dict->limit - dict->pos, *len);
+ *len -= left;
+
+ back = dict->pos - dist - 1;
+ if (dist >= dict->pos)
+ back += dict->end;
+
+ do {
+ dict->buf[dict->pos++] = dict->buf[back++];
+ if (back == dict->end)
+ back = 0;
+ } while (--left > 0);
+
+ if (dict->full < dict->pos)
+ dict->full = dict->pos;
+
+ return true;
+}
+
+/* Copy uncompressed data as is from input to dictionary and output buffers. */
+static void dict_uncompressed(struct dictionary *dict, struct xz_buf *b,
+ uint32_t *left)
+{
+ size_t copy_size;
+
+ while (*left > 0 && b->in_pos < b->in_size
+ && b->out_pos < b->out_size) {
+ copy_size = min(b->in_size - b->in_pos,
+ b->out_size - b->out_pos);
+ if (copy_size > dict->end - dict->pos)
+ copy_size = dict->end - dict->pos;
+ if (copy_size > *left)
+ copy_size = *left;
+
+ *left -= copy_size;
+
+ memcpy(dict->buf + dict->pos, b->in + b->in_pos, copy_size);
+ dict->pos += copy_size;
+
+ if (dict->full < dict->pos)
+ dict->full = dict->pos;
+
+ if (DEC_IS_MULTI(dict->mode)) {
+ if (dict->pos == dict->end)
+ dict->pos = 0;
+
+ memcpy(b->out + b->out_pos, b->in + b->in_pos,
+ copy_size);
+ }
+
+ dict->start = dict->pos;
+
+ b->out_pos += copy_size;
+ b->in_pos += copy_size;
+ }
+}
+
+/*
+ * Flush pending data from dictionary to b->out. It is assumed that there is
+ * enough space in b->out. This is guaranteed because caller uses dict_limit()
+ * before decoding data into the dictionary.
+ */
+static uint32_t dict_flush(struct dictionary *dict, struct xz_buf *b)
+{
+ size_t copy_size = dict->pos - dict->start;
+
+ if (DEC_IS_MULTI(dict->mode)) {
+ if (dict->pos == dict->end)
+ dict->pos = 0;
+
+ memcpy(b->out + b->out_pos, dict->buf + dict->start,
+ copy_size);
+ }
+
+ dict->start = dict->pos;
+ b->out_pos += copy_size;
+ return copy_size;
+}
+
+/*****************
+ * Range decoder *
+ *****************/
+
+/* Reset the range decoder. */
+static void rc_reset(struct rc_dec *rc)
+{
+ rc->range = (uint32_t)-1;
+ rc->code = 0;
+ rc->init_bytes_left = RC_INIT_BYTES;
+}
+
+/*
+ * Read the first five initial bytes into rc->code if they haven't been
+ * read already. (Yes, the first byte gets completely ignored.)
+ */
+static bool rc_read_init(struct rc_dec *rc, struct xz_buf *b)
+{
+ while (rc->init_bytes_left > 0) {
+ if (b->in_pos == b->in_size)
+ return false;
+
+ rc->code = (rc->code << 8) + b->in[b->in_pos++];
+ --rc->init_bytes_left;
+ }
+
+ return true;
+}
+
+/* Return true if there may not be enough input for the next decoding loop. */
+static inline bool rc_limit_exceeded(const struct rc_dec *rc)
+{
+ return rc->in_pos > rc->in_limit;
+}
+
+/*
+ * Return true if it is possible (from point of view of range decoder) that
+ * we have reached the end of the LZMA chunk.
+ */
+static inline bool rc_is_finished(const struct rc_dec *rc)
+{
+ return rc->code == 0;
+}
+
+/* Read the next input byte if needed. */
+static __always_inline void rc_normalize(struct rc_dec *rc)
+{
+ if (rc->range < RC_TOP_VALUE) {
+ rc->range <<= RC_SHIFT_BITS;
+ rc->code = (rc->code << RC_SHIFT_BITS) + rc->in[rc->in_pos++];
+ }
+}
+
+/*
+ * Decode one bit. In some versions, this function has been splitted in three
+ * functions so that the compiler is supposed to be able to more easily avoid
+ * an extra branch. In this particular version of the LZMA decoder, this
+ * doesn't seem to be a good idea (tested with GCC 3.3.6, 3.4.6, and 4.3.3
+ * on x86). Using a non-splitted version results in nicer looking code too.
+ *
+ * NOTE: This must return an int. Do not make it return a bool or the speed
+ * of the code generated by GCC 3.x decreases 10-15 %. (GCC 4.3 doesn't care,
+ * and it generates 10-20 % faster code than GCC 3.x from this file anyway.)
+ */
+static __always_inline int rc_bit(struct rc_dec *rc, uint16_t *prob)
+{
+ uint32_t bound;
+ int bit;
+
+ rc_normalize(rc);
+ bound = (rc->range >> RC_BIT_MODEL_TOTAL_BITS) * *prob;
+ if (rc->code < bound) {
+ rc->range = bound;
+ *prob += (RC_BIT_MODEL_TOTAL - *prob) >> RC_MOVE_BITS;
+ bit = 0;
+ } else {
+ rc->range -= bound;
+ rc->code -= bound;
+ *prob -= *prob >> RC_MOVE_BITS;
+ bit = 1;
+ }
+
+ return bit;
+}
+
+/* Decode a bittree starting from the most significant bit. */
+static __always_inline uint32_t rc_bittree(struct rc_dec *rc,
+ uint16_t *probs, uint32_t limit)
+{
+ uint32_t symbol = 1;
+
+ do {
+ if (rc_bit(rc, &probs[symbol]))
+ symbol = (symbol << 1) + 1;
+ else
+ symbol <<= 1;
+ } while (symbol < limit);
+
+ return symbol;
+}
+
+/* Decode a bittree starting from the least significant bit. */
+static __always_inline void rc_bittree_reverse(struct rc_dec *rc,
+ uint16_t *probs,
+ uint32_t *dest, uint32_t limit)
+{
+ uint32_t symbol = 1;
+ uint32_t i = 0;
+
+ do {
+ if (rc_bit(rc, &probs[symbol])) {
+ symbol = (symbol << 1) + 1;
+ *dest += 1 << i;
+ } else {
+ symbol <<= 1;
+ }
+ } while (++i < limit);
+}
+
+/* Decode direct bits (fixed fifty-fifty probability) */
+static inline void rc_direct(struct rc_dec *rc, uint32_t *dest, uint32_t limit)
+{
+ uint32_t mask;
+
+ do {
+ rc_normalize(rc);
+ rc->range >>= 1;
+ rc->code -= rc->range;
+ mask = (uint32_t)0 - (rc->code >> 31);
+ rc->code += rc->range & mask;
+ *dest = (*dest << 1) + (mask + 1);
+ } while (--limit > 0);
+}
+
+/********
+ * LZMA *
+ ********/
+
+/* Get pointer to literal coder probability array. */
+static uint16_t *lzma_literal_probs(struct xz_dec_lzma2 *s)
+{
+ uint32_t prev_byte = dict_get(&s->dict, 0);
+ uint32_t low = prev_byte >> (8 - s->lzma.lc);
+ uint32_t high = (s->dict.pos & s->lzma.literal_pos_mask) << s->lzma.lc;
+ return s->lzma.literal[low + high];
+}
+
+/* Decode a literal (one 8-bit byte) */
+static void lzma_literal(struct xz_dec_lzma2 *s)
+{
+ uint16_t *probs;
+ uint32_t symbol;
+ uint32_t match_byte;
+ uint32_t match_bit;
+ uint32_t offset;
+ uint32_t i;
+
+ probs = lzma_literal_probs(s);
+
+ if (lzma_state_is_literal(s->lzma.state)) {
+ symbol = rc_bittree(&s->rc, probs, 0x100);
+ } else {
+ symbol = 1;
+ match_byte = dict_get(&s->dict, s->lzma.rep0) << 1;
+ offset = 0x100;
+
+ do {
+ match_bit = match_byte & offset;
+ match_byte <<= 1;
+ i = offset + match_bit + symbol;
+
+ if (rc_bit(&s->rc, &probs[i])) {
+ symbol = (symbol << 1) + 1;
+ offset &= match_bit;
+ } else {
+ symbol <<= 1;
+ offset &= ~match_bit;
+ }
+ } while (symbol < 0x100);
+ }
+
+ dict_put(&s->dict, (uint8_t)symbol);
+ lzma_state_literal(&s->lzma.state);
+}
+
+/* Decode the length of the match into s->lzma.len. */
+static void lzma_len(struct xz_dec_lzma2 *s, struct lzma_len_dec *l,
+ uint32_t pos_state)
+{
+ uint16_t *probs;
+ uint32_t limit;
+
+ if (!rc_bit(&s->rc, &l->choice)) {
+ probs = l->low[pos_state];
+ limit = LEN_LOW_SYMBOLS;
+ s->lzma.len = MATCH_LEN_MIN;
+ } else {
+ if (!rc_bit(&s->rc, &l->choice2)) {
+ probs = l->mid[pos_state];
+ limit = LEN_MID_SYMBOLS;
+ s->lzma.len = MATCH_LEN_MIN + LEN_LOW_SYMBOLS;
+ } else {
+ probs = l->high;
+ limit = LEN_HIGH_SYMBOLS;
+ s->lzma.len = MATCH_LEN_MIN + LEN_LOW_SYMBOLS
+ + LEN_MID_SYMBOLS;
+ }
+ }
+
+ s->lzma.len += rc_bittree(&s->rc, probs, limit) - limit;
+}
+
+/* Decode a match. The distance will be stored in s->lzma.rep0. */
+static void lzma_match(struct xz_dec_lzma2 *s, uint32_t pos_state)
+{
+ uint16_t *probs;
+ uint32_t dist_slot;
+ uint32_t limit;
+
+ lzma_state_match(&s->lzma.state);
+
+ s->lzma.rep3 = s->lzma.rep2;
+ s->lzma.rep2 = s->lzma.rep1;
+ s->lzma.rep1 = s->lzma.rep0;
+
+ lzma_len(s, &s->lzma.match_len_dec, pos_state);
+
+ probs = s->lzma.dist_slot[lzma_get_dist_state(s->lzma.len)];
+ dist_slot = rc_bittree(&s->rc, probs, DIST_SLOTS) - DIST_SLOTS;
+
+ if (dist_slot < DIST_MODEL_START) {
+ s->lzma.rep0 = dist_slot;
+ } else {
+ limit = (dist_slot >> 1) - 1;
+ s->lzma.rep0 = 2 + (dist_slot & 1);
+
+ if (dist_slot < DIST_MODEL_END) {
+ s->lzma.rep0 <<= limit;
+ probs = s->lzma.dist_special + s->lzma.rep0
+ - dist_slot - 1;
+ rc_bittree_reverse(&s->rc, probs,
+ &s->lzma.rep0, limit);
+ } else {
+ rc_direct(&s->rc, &s->lzma.rep0, limit - ALIGN_BITS);
+ s->lzma.rep0 <<= ALIGN_BITS;
+ rc_bittree_reverse(&s->rc, s->lzma.dist_align,
+ &s->lzma.rep0, ALIGN_BITS);
+ }
+ }
+}
+
+/*
+ * Decode a repeated match. The distance is one of the four most recently
+ * seen matches. The distance will be stored in s->lzma.rep0.
+ */
+static void lzma_rep_match(struct xz_dec_lzma2 *s, uint32_t pos_state)
+{
+ uint32_t tmp;
+
+ if (!rc_bit(&s->rc, &s->lzma.is_rep0[s->lzma.state])) {
+ if (!rc_bit(&s->rc, &s->lzma.is_rep0_long[
+ s->lzma.state][pos_state])) {
+ lzma_state_short_rep(&s->lzma.state);
+ s->lzma.len = 1;
+ return;
+ }
+ } else {
+ if (!rc_bit(&s->rc, &s->lzma.is_rep1[s->lzma.state])) {
+ tmp = s->lzma.rep1;
+ } else {
+ if (!rc_bit(&s->rc, &s->lzma.is_rep2[s->lzma.state])) {
+ tmp = s->lzma.rep2;
+ } else {
+ tmp = s->lzma.rep3;
+ s->lzma.rep3 = s->lzma.rep2;
+ }
+
+ s->lzma.rep2 = s->lzma.rep1;
+ }
+
+ s->lzma.rep1 = s->lzma.rep0;
+ s->lzma.rep0 = tmp;
+ }
+
+ lzma_state_long_rep(&s->lzma.state);
+ lzma_len(s, &s->lzma.rep_len_dec, pos_state);
+}
+
+/* LZMA decoder core */
+static bool lzma_main(struct xz_dec_lzma2 *s)
+{
+ uint32_t pos_state;
+
+ /*
+ * If the dictionary was reached during the previous call, try to
+ * finish the possibly pending repeat in the dictionary.
+ */
+ if (dict_has_space(&s->dict) && s->lzma.len > 0)
+ dict_repeat(&s->dict, &s->lzma.len, s->lzma.rep0);
+
+ /*
+ * Decode more LZMA symbols. One iteration may consume up to
+ * LZMA_IN_REQUIRED - 1 bytes.
+ */
+ while (dict_has_space(&s->dict) && !rc_limit_exceeded(&s->rc)) {
+ pos_state = s->dict.pos & s->lzma.pos_mask;
+
+ if (!rc_bit(&s->rc, &s->lzma.is_match[
+ s->lzma.state][pos_state])) {
+ lzma_literal(s);
+ } else {
+ if (rc_bit(&s->rc, &s->lzma.is_rep[s->lzma.state]))
+ lzma_rep_match(s, pos_state);
+ else
+ lzma_match(s, pos_state);
+
+ if (!dict_repeat(&s->dict, &s->lzma.len, s->lzma.rep0))
+ return false;
+ }
+ }
+
+ /*
+ * Having the range decoder always normalized when we are outside
+ * this function makes it easier to correctly handle end of the chunk.
+ */
+ rc_normalize(&s->rc);
+
+ return true;
+}
+
+/*
+ * Reset the LZMA decoder and range decoder state. Dictionary is nore reset
+ * here, because LZMA state may be reset without resetting the dictionary.
+ */
+static void lzma_reset(struct xz_dec_lzma2 *s)
+{
+ uint16_t *probs;
+ size_t i;
+
+ s->lzma.state = STATE_LIT_LIT;
+ s->lzma.rep0 = 0;
+ s->lzma.rep1 = 0;
+ s->lzma.rep2 = 0;
+ s->lzma.rep3 = 0;
+
+ /*
+ * All probabilities are initialized to the same value. This hack
+ * makes the code smaller by avoiding a separate loop for each
+ * probability array.
+ *
+ * This could be optimized so that only that part of literal
+ * probabilities that are actually required. In the common case
+ * we would write 12 KiB less.
+ */
+ probs = s->lzma.is_match[0];
+ for (i = 0; i < PROBS_TOTAL; ++i)
+ probs[i] = RC_BIT_MODEL_TOTAL / 2;
+
+ rc_reset(&s->rc);
+}
+
+/*
+ * Decode and validate LZMA properties (lc/lp/pb) and calculate the bit masks
+ * from the decoded lp and pb values. On success, the LZMA decoder state is
+ * reset and true is returned.
+ */
+static bool lzma_props(struct xz_dec_lzma2 *s, uint8_t props)
+{
+ if (props > (4 * 5 + 4) * 9 + 8)
+ return false;
+
+ s->lzma.pos_mask = 0;
+ while (props >= 9 * 5) {
+ props -= 9 * 5;
+ ++s->lzma.pos_mask;
+ }
+
+ s->lzma.pos_mask = (1 << s->lzma.pos_mask) - 1;
+
+ s->lzma.literal_pos_mask = 0;
+ while (props >= 9) {
+ props -= 9;
+ ++s->lzma.literal_pos_mask;
+ }
+
+ s->lzma.lc = props;
+
+ if (s->lzma.lc + s->lzma.literal_pos_mask > 4)
+ return false;
+
+ s->lzma.literal_pos_mask = (1 << s->lzma.literal_pos_mask) - 1;
+
+ lzma_reset(s);
+
+ return true;
+}
+
+/*********
+ * LZMA2 *
+ *********/
+
+/*
+ * The LZMA decoder assumes that if the input limit (s->rc.in_limit) hasn't
+ * been exceeded, it is safe to read up to LZMA_IN_REQUIRED bytes. This
+ * wrapper function takes care of making the LZMA decoder's assumption safe.
+ *
+ * As long as there is plenty of input left to be decoded in the current LZMA
+ * chunk, we decode directly from the caller-supplied input buffer until
+ * there's LZMA_IN_REQUIRED bytes left. Those remaining bytes are copied into
+ * s->temp.buf, which (hopefully) gets filled on the next call to this
+ * function. We decode a few bytes from the temporary buffer so that we can
+ * continue decoding from the caller-supplied input buffer again.
+ */
+static bool lzma2_lzma(struct xz_dec_lzma2 *s, struct xz_buf *b)
+{
+ size_t in_avail;
+ uint32_t tmp;
+
+ in_avail = b->in_size - b->in_pos;
+ if (s->temp.size > 0 || s->lzma2.compressed == 0) {
+ tmp = 2 * LZMA_IN_REQUIRED - s->temp.size;
+ if (tmp > s->lzma2.compressed - s->temp.size)
+ tmp = s->lzma2.compressed - s->temp.size;
+ if (tmp > in_avail)
+ tmp = in_avail;
+
+ memcpy(s->temp.buf + s->temp.size, b->in + b->in_pos, tmp);
+
+ if (s->temp.size + tmp == s->lzma2.compressed) {
+ memzero(s->temp.buf + s->temp.size + tmp,
+ sizeof(s->temp.buf)
+ - s->temp.size - tmp);
+ s->rc.in_limit = s->temp.size + tmp;
+ } else if (s->temp.size + tmp < LZMA_IN_REQUIRED) {
+ s->temp.size += tmp;
+ b->in_pos += tmp;
+ return true;
+ } else {
+ s->rc.in_limit = s->temp.size + tmp - LZMA_IN_REQUIRED;
+ }
+
+ s->rc.in = s->temp.buf;
+ s->rc.in_pos = 0;
+
+ if (!lzma_main(s) || s->rc.in_pos > s->temp.size + tmp)
+ return false;
+
+ s->lzma2.compressed -= s->rc.in_pos;
+
+ if (s->rc.in_pos < s->temp.size) {
+ s->temp.size -= s->rc.in_pos;
+ memmove(s->temp.buf, s->temp.buf + s->rc.in_pos,
+ s->temp.size);
+ return true;
+ }
+
+ b->in_pos += s->rc.in_pos - s->temp.size;
+ s->temp.size = 0;
+ }
+
+ in_avail = b->in_size - b->in_pos;
+ if (in_avail >= LZMA_IN_REQUIRED) {
+ s->rc.in = b->in;
+ s->rc.in_pos = b->in_pos;
+
+ if (in_avail >= s->lzma2.compressed + LZMA_IN_REQUIRED)
+ s->rc.in_limit = b->in_pos + s->lzma2.compressed;
+ else
+ s->rc.in_limit = b->in_size - LZMA_IN_REQUIRED;
+
+ if (!lzma_main(s))
+ return false;
+
+ in_avail = s->rc.in_pos - b->in_pos;
+ if (in_avail > s->lzma2.compressed)
+ return false;
+
+ s->lzma2.compressed -= in_avail;
+ b->in_pos = s->rc.in_pos;
+ }
+
+ in_avail = b->in_size - b->in_pos;
+ if (in_avail < LZMA_IN_REQUIRED) {
+ if (in_avail > s->lzma2.compressed)
+ in_avail = s->lzma2.compressed;
+
+ memcpy(s->temp.buf, b->in + b->in_pos, in_avail);
+ s->temp.size = in_avail;
+ b->in_pos += in_avail;
+ }
+
+ return true;
+}
+
+/*
+ * Take care of the LZMA2 control layer, and forward the job of actual LZMA
+ * decoding or copying of uncompressed chunks to other functions.
+ */
+XZ_EXTERN enum xz_ret xz_dec_lzma2_run(struct xz_dec_lzma2 *s,
+ struct xz_buf *b)
+{
+ uint32_t tmp;
+
+ while (b->in_pos < b->in_size || s->lzma2.sequence == SEQ_LZMA_RUN) {
+ switch (s->lzma2.sequence) {
+ case SEQ_CONTROL:
+ /*
+ * LZMA2 control byte
+ *
+ * Exact values:
+ * 0x00 End marker
+ * 0x01 Dictionary reset followed by
+ * an uncompressed chunk
+ * 0x02 Uncompressed chunk (no dictionary reset)
+ *
+ * Highest three bits (s->control & 0xE0):
+ * 0xE0 Dictionary reset, new properties and state
+ * reset, followed by LZMA compressed chunk
+ * 0xC0 New properties and state reset, followed
+ * by LZMA compressed chunk (no dictionary
+ * reset)
+ * 0xA0 State reset using old properties,
+ * followed by LZMA compressed chunk (no
+ * dictionary reset)
+ * 0x80 LZMA chunk (no dictionary or state reset)
+ *
+ * For LZMA compressed chunks, the lowest five bits
+ * (s->control & 1F) are the highest bits of the
+ * uncompressed size (bits 16-20).
+ *
+ * A new LZMA2 stream must begin with a dictionary
+ * reset. The first LZMA chunk must set new
+ * properties and reset the LZMA state.
+ *
+ * Values that don't match anything described above
+ * are invalid and we return XZ_DATA_ERROR.
+ */
+ tmp = b->in[b->in_pos++];
+
+ if (tmp == 0x00)
+ return XZ_STREAM_END;
+
+ if (tmp >= 0xE0 || tmp == 0x01) {
+ s->lzma2.need_props = true;
+ s->lzma2.need_dict_reset = false;
+ dict_reset(&s->dict, b);
+ } else if (s->lzma2.need_dict_reset) {
+ return XZ_DATA_ERROR;
+ }
+
+ if (tmp >= 0x80) {
+ s->lzma2.uncompressed = (tmp & 0x1F) << 16;
+ s->lzma2.sequence = SEQ_UNCOMPRESSED_1;
+
+ if (tmp >= 0xC0) {
+ /*
+ * When there are new properties,
+ * state reset is done at
+ * SEQ_PROPERTIES.
+ */
+ s->lzma2.need_props = false;
+ s->lzma2.next_sequence
+ = SEQ_PROPERTIES;
+
+ } else if (s->lzma2.need_props) {
+ return XZ_DATA_ERROR;
+
+ } else {
+ s->lzma2.next_sequence
+ = SEQ_LZMA_PREPARE;
+ if (tmp >= 0xA0)
+ lzma_reset(s);
+ }
+ } else {
+ if (tmp > 0x02)
+ return XZ_DATA_ERROR;
+
+ s->lzma2.sequence = SEQ_COMPRESSED_0;
+ s->lzma2.next_sequence = SEQ_COPY;
+ }
+
+ break;
+
+ case SEQ_UNCOMPRESSED_1:
+ s->lzma2.uncompressed
+ += (uint32_t)b->in[b->in_pos++] << 8;
+ s->lzma2.sequence = SEQ_UNCOMPRESSED_2;
+ break;
+
+ case SEQ_UNCOMPRESSED_2:
+ s->lzma2.uncompressed
+ += (uint32_t)b->in[b->in_pos++] + 1;
+ s->lzma2.sequence = SEQ_COMPRESSED_0;
+ break;
+
+ case SEQ_COMPRESSED_0:
+ s->lzma2.compressed
+ = (uint32_t)b->in[b->in_pos++] << 8;
+ s->lzma2.sequence = SEQ_COMPRESSED_1;
+ break;
+
+ case SEQ_COMPRESSED_1:
+ s->lzma2.compressed
+ += (uint32_t)b->in[b->in_pos++] + 1;
+ s->lzma2.sequence = s->lzma2.next_sequence;
+ break;
+
+ case SEQ_PROPERTIES:
+ if (!lzma_props(s, b->in[b->in_pos++]))
+ return XZ_DATA_ERROR;
+
+ s->lzma2.sequence = SEQ_LZMA_PREPARE;
+
+ case SEQ_LZMA_PREPARE:
+ if (s->lzma2.compressed < RC_INIT_BYTES)
+ return XZ_DATA_ERROR;
+
+ if (!rc_read_init(&s->rc, b))
+ return XZ_OK;
+
+ s->lzma2.compressed -= RC_INIT_BYTES;
+ s->lzma2.sequence = SEQ_LZMA_RUN;
+
+ case SEQ_LZMA_RUN:
+ /*
+ * Set dictionary limit to indicate how much we want
+ * to be encoded at maximum. Decode new data into the
+ * dictionary. Flush the new data from dictionary to
+ * b->out. Check if we finished decoding this chunk.
+ * In case the dictionary got full but we didn't fill
+ * the output buffer yet, we may run this loop
+ * multiple times without changing s->lzma2.sequence.
+ */
+ dict_limit(&s->dict, min_t(size_t,
+ b->out_size - b->out_pos,
+ s->lzma2.uncompressed));
+ if (!lzma2_lzma(s, b))
+ return XZ_DATA_ERROR;
+
+ s->lzma2.uncompressed -= dict_flush(&s->dict, b);
+
+ if (s->lzma2.uncompressed == 0) {
+ if (s->lzma2.compressed > 0 || s->lzma.len > 0
+ || !rc_is_finished(&s->rc))
+ return XZ_DATA_ERROR;
+
+ rc_reset(&s->rc);
+ s->lzma2.sequence = SEQ_CONTROL;
+
+ } else if (b->out_pos == b->out_size
+ || (b->in_pos == b->in_size
+ && s->temp.size
+ < s->lzma2.compressed)) {
+ return XZ_OK;
+ }
+
+ break;
+
+ case SEQ_COPY:
+ dict_uncompressed(&s->dict, b, &s->lzma2.compressed);
+ if (s->lzma2.compressed > 0)
+ return XZ_OK;
+
+ s->lzma2.sequence = SEQ_CONTROL;
+ break;
+ }
+ }
+
+ return XZ_OK;
+}
+
+XZ_EXTERN struct xz_dec_lzma2 *xz_dec_lzma2_create(enum xz_mode mode,
+ uint32_t dict_max)
+{
+ struct xz_dec_lzma2 *s = kmalloc(sizeof(*s), GFP_KERNEL);
+ if (s == NULL)
+ return NULL;
+
+ s->dict.mode = mode;
+ s->dict.size_max = dict_max;
+
+ if (DEC_IS_PREALLOC(mode)) {
+ s->dict.buf = vmalloc(dict_max);
+ if (s->dict.buf == NULL) {
+ kfree(s);
+ return NULL;
+ }
+ } else if (DEC_IS_DYNALLOC(mode)) {
+ s->dict.buf = NULL;
+ s->dict.allocated = 0;
+ }
+
+ return s;
+}
+
+XZ_EXTERN enum xz_ret xz_dec_lzma2_reset(struct xz_dec_lzma2 *s, uint8_t props)
+{
+ /* This limits dictionary size to 3 GiB to keep parsing simpler. */
+ if (props > 39)
+ return XZ_OPTIONS_ERROR;
+
+ s->dict.size = 2 + (props & 1);
+ s->dict.size <<= (props >> 1) + 11;
+
+ if (DEC_IS_MULTI(s->dict.mode)) {
+ if (s->dict.size > s->dict.size_max)
+ return XZ_MEMLIMIT_ERROR;
+
+ s->dict.end = s->dict.size;
+
+ if (DEC_IS_DYNALLOC(s->dict.mode)) {
+ if (s->dict.allocated < s->dict.size) {
+ vfree(s->dict.buf);
+ s->dict.buf = vmalloc(s->dict.size);
+ if (s->dict.buf == NULL) {
+ s->dict.allocated = 0;
+ return XZ_MEM_ERROR;
+ }
+ }
+ }
+ }
+
+ s->lzma.len = 0;
+
+ s->lzma2.sequence = SEQ_CONTROL;
+ s->lzma2.need_dict_reset = true;
+
+ s->temp.size = 0;
+
+ return XZ_OK;
+}
+
+XZ_EXTERN void xz_dec_lzma2_end(struct xz_dec_lzma2 *s)
+{
+ if (DEC_IS_MULTI(s->dict.mode))
+ vfree(s->dict.buf);
+
+ kfree(s);
+}
diff --git a/sys/contrib/xz-embedded/linux/lib/xz/xz_dec_stream.c b/sys/contrib/xz-embedded/linux/lib/xz/xz_dec_stream.c
new file mode 100644
index 0000000..ac809b1
--- /dev/null
+++ b/sys/contrib/xz-embedded/linux/lib/xz/xz_dec_stream.c
@@ -0,0 +1,821 @@
+/*
+ * .xz Stream decoder
+ *
+ * Author: Lasse Collin <lasse.collin@tukaani.org>
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+#include "xz_private.h"
+#include "xz_stream.h"
+
+/* Hash used to validate the Index field */
+struct xz_dec_hash {
+ vli_type unpadded;
+ vli_type uncompressed;
+ uint32_t crc32;
+};
+
+struct xz_dec {
+ /* Position in dec_main() */
+ enum {
+ SEQ_STREAM_HEADER,
+ SEQ_BLOCK_START,
+ SEQ_BLOCK_HEADER,
+ SEQ_BLOCK_UNCOMPRESS,
+ SEQ_BLOCK_PADDING,
+ SEQ_BLOCK_CHECK,
+ SEQ_INDEX,
+ SEQ_INDEX_PADDING,
+ SEQ_INDEX_CRC32,
+ SEQ_STREAM_FOOTER
+ } sequence;
+
+ /* Position in variable-length integers and Check fields */
+ uint32_t pos;
+
+ /* Variable-length integer decoded by dec_vli() */
+ vli_type vli;
+
+ /* Saved in_pos and out_pos */
+ size_t in_start;
+ size_t out_start;
+
+ /* CRC32 value in Block or Index */
+ uint32_t crc32;
+
+ /* Type of the integrity check calculated from uncompressed data */
+ enum xz_check check_type;
+
+ /* Operation mode */
+ enum xz_mode mode;
+
+ /*
+ * True if the next call to xz_dec_run() is allowed to return
+ * XZ_BUF_ERROR.
+ */
+ bool allow_buf_error;
+
+ /* Information stored in Block Header */
+ struct {
+ /*
+ * Value stored in the Compressed Size field, or
+ * VLI_UNKNOWN if Compressed Size is not present.
+ */
+ vli_type compressed;
+
+ /*
+ * Value stored in the Uncompressed Size field, or
+ * VLI_UNKNOWN if Uncompressed Size is not present.
+ */
+ vli_type uncompressed;
+
+ /* Size of the Block Header field */
+ uint32_t size;
+ } block_header;
+
+ /* Information collected when decoding Blocks */
+ struct {
+ /* Observed compressed size of the current Block */
+ vli_type compressed;
+
+ /* Observed uncompressed size of the current Block */
+ vli_type uncompressed;
+
+ /* Number of Blocks decoded so far */
+ vli_type count;
+
+ /*
+ * Hash calculated from the Block sizes. This is used to
+ * validate the Index field.
+ */
+ struct xz_dec_hash hash;
+ } block;
+
+ /* Variables needed when verifying the Index field */
+ struct {
+ /* Position in dec_index() */
+ enum {
+ SEQ_INDEX_COUNT,
+ SEQ_INDEX_UNPADDED,
+ SEQ_INDEX_UNCOMPRESSED
+ } sequence;
+
+ /* Size of the Index in bytes */
+ vli_type size;
+
+ /* Number of Records (matches block.count in valid files) */
+ vli_type count;
+
+ /*
+ * Hash calculated from the Records (matches block.hash in
+ * valid files).
+ */
+ struct xz_dec_hash hash;
+ } index;
+
+ /*
+ * Temporary buffer needed to hold Stream Header, Block Header,
+ * and Stream Footer. The Block Header is the biggest (1 KiB)
+ * so we reserve space according to that. buf[] has to be aligned
+ * to a multiple of four bytes; the size_t variables before it
+ * should guarantee this.
+ */
+ struct {
+ size_t pos;
+ size_t size;
+ uint8_t buf[1024];
+ } temp;
+
+ struct xz_dec_lzma2 *lzma2;
+
+#ifdef XZ_DEC_BCJ
+ struct xz_dec_bcj *bcj;
+ bool bcj_active;
+#endif
+};
+
+#ifdef XZ_DEC_ANY_CHECK
+/* Sizes of the Check field with different Check IDs */
+static const uint8_t check_sizes[16] = {
+ 0,
+ 4, 4, 4,
+ 8, 8, 8,
+ 16, 16, 16,
+ 32, 32, 32,
+ 64, 64, 64
+};
+#endif
+
+/*
+ * Fill s->temp by copying data starting from b->in[b->in_pos]. Caller
+ * must have set s->temp.pos to indicate how much data we are supposed
+ * to copy into s->temp.buf. Return true once s->temp.pos has reached
+ * s->temp.size.
+ */
+static bool fill_temp(struct xz_dec *s, struct xz_buf *b)
+{
+ size_t copy_size = min_t(size_t,
+ b->in_size - b->in_pos, s->temp.size - s->temp.pos);
+
+ memcpy(s->temp.buf + s->temp.pos, b->in + b->in_pos, copy_size);
+ b->in_pos += copy_size;
+ s->temp.pos += copy_size;
+
+ if (s->temp.pos == s->temp.size) {
+ s->temp.pos = 0;
+ return true;
+ }
+
+ return false;
+}
+
+/* Decode a variable-length integer (little-endian base-128 encoding) */
+static enum xz_ret dec_vli(struct xz_dec *s, const uint8_t *in,
+ size_t *in_pos, size_t in_size)
+{
+ uint8_t byte;
+
+ if (s->pos == 0)
+ s->vli = 0;
+
+ while (*in_pos < in_size) {
+ byte = in[*in_pos];
+ ++*in_pos;
+
+ s->vli |= (vli_type)(byte & 0x7F) << s->pos;
+
+ if ((byte & 0x80) == 0) {
+ /* Don't allow non-minimal encodings. */
+ if (byte == 0 && s->pos != 0)
+ return XZ_DATA_ERROR;
+
+ s->pos = 0;
+ return XZ_STREAM_END;
+ }
+
+ s->pos += 7;
+ if (s->pos == 7 * VLI_BYTES_MAX)
+ return XZ_DATA_ERROR;
+ }
+
+ return XZ_OK;
+}
+
+/*
+ * Decode the Compressed Data field from a Block. Update and validate
+ * the observed compressed and uncompressed sizes of the Block so that
+ * they don't exceed the values possibly stored in the Block Header
+ * (validation assumes that no integer overflow occurs, since vli_type
+ * is normally uint64_t). Update the CRC32 if presence of the CRC32
+ * field was indicated in Stream Header.
+ *
+ * Once the decoding is finished, validate that the observed sizes match
+ * the sizes possibly stored in the Block Header. Update the hash and
+ * Block count, which are later used to validate the Index field.
+ */
+static enum xz_ret dec_block(struct xz_dec *s, struct xz_buf *b)
+{
+ enum xz_ret ret;
+
+ s->in_start = b->in_pos;
+ s->out_start = b->out_pos;
+
+#ifdef XZ_DEC_BCJ
+ if (s->bcj_active)
+ ret = xz_dec_bcj_run(s->bcj, s->lzma2, b);
+ else
+#endif
+ ret = xz_dec_lzma2_run(s->lzma2, b);
+
+ s->block.compressed += b->in_pos - s->in_start;
+ s->block.uncompressed += b->out_pos - s->out_start;
+
+ /*
+ * There is no need to separately check for VLI_UNKNOWN, since
+ * the observed sizes are always smaller than VLI_UNKNOWN.
+ */
+ if (s->block.compressed > s->block_header.compressed
+ || s->block.uncompressed
+ > s->block_header.uncompressed)
+ return XZ_DATA_ERROR;
+
+ if (s->check_type == XZ_CHECK_CRC32)
+ s->crc32 = xz_crc32(b->out + s->out_start,
+ b->out_pos - s->out_start, s->crc32);
+
+ if (ret == XZ_STREAM_END) {
+ if (s->block_header.compressed != VLI_UNKNOWN
+ && s->block_header.compressed
+ != s->block.compressed)
+ return XZ_DATA_ERROR;
+
+ if (s->block_header.uncompressed != VLI_UNKNOWN
+ && s->block_header.uncompressed
+ != s->block.uncompressed)
+ return XZ_DATA_ERROR;
+
+ s->block.hash.unpadded += s->block_header.size
+ + s->block.compressed;
+
+#ifdef XZ_DEC_ANY_CHECK
+ s->block.hash.unpadded += check_sizes[s->check_type];
+#else
+ if (s->check_type == XZ_CHECK_CRC32)
+ s->block.hash.unpadded += 4;
+#endif
+
+ s->block.hash.uncompressed += s->block.uncompressed;
+ s->block.hash.crc32 = xz_crc32(
+ (const uint8_t *)&s->block.hash,
+ sizeof(s->block.hash), s->block.hash.crc32);
+
+ ++s->block.count;
+ }
+
+ return ret;
+}
+
+/* Update the Index size and the CRC32 value. */
+static void index_update(struct xz_dec *s, const struct xz_buf *b)
+{
+ size_t in_used = b->in_pos - s->in_start;
+ s->index.size += in_used;
+ s->crc32 = xz_crc32(b->in + s->in_start, in_used, s->crc32);
+}
+
+/*
+ * Decode the Number of Records, Unpadded Size, and Uncompressed Size
+ * fields from the Index field. That is, Index Padding and CRC32 are not
+ * decoded by this function.
+ *
+ * This can return XZ_OK (more input needed), XZ_STREAM_END (everything
+ * successfully decoded), or XZ_DATA_ERROR (input is corrupt).
+ */
+static enum xz_ret dec_index(struct xz_dec *s, struct xz_buf *b)
+{
+ enum xz_ret ret;
+
+ do {
+ ret = dec_vli(s, b->in, &b->in_pos, b->in_size);
+ if (ret != XZ_STREAM_END) {
+ index_update(s, b);
+ return ret;
+ }
+
+ switch (s->index.sequence) {
+ case SEQ_INDEX_COUNT:
+ s->index.count = s->vli;
+
+ /*
+ * Validate that the Number of Records field
+ * indicates the same number of Records as
+ * there were Blocks in the Stream.
+ */
+ if (s->index.count != s->block.count)
+ return XZ_DATA_ERROR;
+
+ s->index.sequence = SEQ_INDEX_UNPADDED;
+ break;
+
+ case SEQ_INDEX_UNPADDED:
+ s->index.hash.unpadded += s->vli;
+ s->index.sequence = SEQ_INDEX_UNCOMPRESSED;
+ break;
+
+ case SEQ_INDEX_UNCOMPRESSED:
+ s->index.hash.uncompressed += s->vli;
+ s->index.hash.crc32 = xz_crc32(
+ (const uint8_t *)&s->index.hash,
+ sizeof(s->index.hash),
+ s->index.hash.crc32);
+ --s->index.count;
+ s->index.sequence = SEQ_INDEX_UNPADDED;
+ break;
+ }
+ } while (s->index.count > 0);
+
+ return XZ_STREAM_END;
+}
+
+/*
+ * Validate that the next four input bytes match the value of s->crc32.
+ * s->pos must be zero when starting to validate the first byte.
+ */
+static enum xz_ret crc32_validate(struct xz_dec *s, struct xz_buf *b)
+{
+ do {
+ if (b->in_pos == b->in_size)
+ return XZ_OK;
+
+ if (((s->crc32 >> s->pos) & 0xFF) != b->in[b->in_pos++])
+ return XZ_DATA_ERROR;
+
+ s->pos += 8;
+
+ } while (s->pos < 32);
+
+ s->crc32 = 0;
+ s->pos = 0;
+
+ return XZ_STREAM_END;
+}
+
+#ifdef XZ_DEC_ANY_CHECK
+/*
+ * Skip over the Check field when the Check ID is not supported.
+ * Returns true once the whole Check field has been skipped over.
+ */
+static bool check_skip(struct xz_dec *s, struct xz_buf *b)
+{
+ while (s->pos < check_sizes[s->check_type]) {
+ if (b->in_pos == b->in_size)
+ return false;
+
+ ++b->in_pos;
+ ++s->pos;
+ }
+
+ s->pos = 0;
+
+ return true;
+}
+#endif
+
+/* Decode the Stream Header field (the first 12 bytes of the .xz Stream). */
+static enum xz_ret dec_stream_header(struct xz_dec *s)
+{
+ if (!memeq(s->temp.buf, HEADER_MAGIC, HEADER_MAGIC_SIZE))
+ return XZ_FORMAT_ERROR;
+
+ if (xz_crc32(s->temp.buf + HEADER_MAGIC_SIZE, 2, 0)
+ != get_le32(s->temp.buf + HEADER_MAGIC_SIZE + 2))
+ return XZ_DATA_ERROR;
+
+ if (s->temp.buf[HEADER_MAGIC_SIZE] != 0)
+ return XZ_OPTIONS_ERROR;
+
+ /*
+ * Of integrity checks, we support only none (Check ID = 0) and
+ * CRC32 (Check ID = 1). However, if XZ_DEC_ANY_CHECK is defined,
+ * we will accept other check types too, but then the check won't
+ * be verified and a warning (XZ_UNSUPPORTED_CHECK) will be given.
+ */
+ s->check_type = s->temp.buf[HEADER_MAGIC_SIZE + 1];
+
+#ifdef XZ_DEC_ANY_CHECK
+ if (s->check_type > XZ_CHECK_MAX)
+ return XZ_OPTIONS_ERROR;
+
+ if (s->check_type > XZ_CHECK_CRC32)
+ return XZ_UNSUPPORTED_CHECK;
+#else
+ if (s->check_type > XZ_CHECK_CRC32)
+ return XZ_OPTIONS_ERROR;
+#endif
+
+ return XZ_OK;
+}
+
+/* Decode the Stream Footer field (the last 12 bytes of the .xz Stream) */
+static enum xz_ret dec_stream_footer(struct xz_dec *s)
+{
+ if (!memeq(s->temp.buf + 10, FOOTER_MAGIC, FOOTER_MAGIC_SIZE))
+ return XZ_DATA_ERROR;
+
+ if (xz_crc32(s->temp.buf + 4, 6, 0) != get_le32(s->temp.buf))
+ return XZ_DATA_ERROR;
+
+ /*
+ * Validate Backward Size. Note that we never added the size of the
+ * Index CRC32 field to s->index.size, thus we use s->index.size / 4
+ * instead of s->index.size / 4 - 1.
+ */
+ if ((s->index.size >> 2) != get_le32(s->temp.buf + 4))
+ return XZ_DATA_ERROR;
+
+ if (s->temp.buf[8] != 0 || s->temp.buf[9] != s->check_type)
+ return XZ_DATA_ERROR;
+
+ /*
+ * Use XZ_STREAM_END instead of XZ_OK to be more convenient
+ * for the caller.
+ */
+ return XZ_STREAM_END;
+}
+
+/* Decode the Block Header and initialize the filter chain. */
+static enum xz_ret dec_block_header(struct xz_dec *s)
+{
+ enum xz_ret ret;
+
+ /*
+ * Validate the CRC32. We know that the temp buffer is at least
+ * eight bytes so this is safe.
+ */
+ s->temp.size -= 4;
+ if (xz_crc32(s->temp.buf, s->temp.size, 0)
+ != get_le32(s->temp.buf + s->temp.size))
+ return XZ_DATA_ERROR;
+
+ s->temp.pos = 2;
+
+ /*
+ * Catch unsupported Block Flags. We support only one or two filters
+ * in the chain, so we catch that with the same test.
+ */
+#ifdef XZ_DEC_BCJ
+ if (s->temp.buf[1] & 0x3E)
+#else
+ if (s->temp.buf[1] & 0x3F)
+#endif
+ return XZ_OPTIONS_ERROR;
+
+ /* Compressed Size */
+ if (s->temp.buf[1] & 0x40) {
+ if (dec_vli(s, s->temp.buf, &s->temp.pos, s->temp.size)
+ != XZ_STREAM_END)
+ return XZ_DATA_ERROR;
+
+ s->block_header.compressed = s->vli;
+ } else {
+ s->block_header.compressed = VLI_UNKNOWN;
+ }
+
+ /* Uncompressed Size */
+ if (s->temp.buf[1] & 0x80) {
+ if (dec_vli(s, s->temp.buf, &s->temp.pos, s->temp.size)
+ != XZ_STREAM_END)
+ return XZ_DATA_ERROR;
+
+ s->block_header.uncompressed = s->vli;
+ } else {
+ s->block_header.uncompressed = VLI_UNKNOWN;
+ }
+
+#ifdef XZ_DEC_BCJ
+ /* If there are two filters, the first one must be a BCJ filter. */
+ s->bcj_active = s->temp.buf[1] & 0x01;
+ if (s->bcj_active) {
+ if (s->temp.size - s->temp.pos < 2)
+ return XZ_OPTIONS_ERROR;
+
+ ret = xz_dec_bcj_reset(s->bcj, s->temp.buf[s->temp.pos++]);
+ if (ret != XZ_OK)
+ return ret;
+
+ /*
+ * We don't support custom start offset,
+ * so Size of Properties must be zero.
+ */
+ if (s->temp.buf[s->temp.pos++] != 0x00)
+ return XZ_OPTIONS_ERROR;
+ }
+#endif
+
+ /* Valid Filter Flags always take at least two bytes. */
+ if (s->temp.size - s->temp.pos < 2)
+ return XZ_DATA_ERROR;
+
+ /* Filter ID = LZMA2 */
+ if (s->temp.buf[s->temp.pos++] != 0x21)
+ return XZ_OPTIONS_ERROR;
+
+ /* Size of Properties = 1-byte Filter Properties */
+ if (s->temp.buf[s->temp.pos++] != 0x01)
+ return XZ_OPTIONS_ERROR;
+
+ /* Filter Properties contains LZMA2 dictionary size. */
+ if (s->temp.size - s->temp.pos < 1)
+ return XZ_DATA_ERROR;
+
+ ret = xz_dec_lzma2_reset(s->lzma2, s->temp.buf[s->temp.pos++]);
+ if (ret != XZ_OK)
+ return ret;
+
+ /* The rest must be Header Padding. */
+ while (s->temp.pos < s->temp.size)
+ if (s->temp.buf[s->temp.pos++] != 0x00)
+ return XZ_OPTIONS_ERROR;
+
+ s->temp.pos = 0;
+ s->block.compressed = 0;
+ s->block.uncompressed = 0;
+
+ return XZ_OK;
+}
+
+static enum xz_ret dec_main(struct xz_dec *s, struct xz_buf *b)
+{
+ enum xz_ret ret;
+
+ /*
+ * Store the start position for the case when we are in the middle
+ * of the Index field.
+ */
+ s->in_start = b->in_pos;
+
+ while (true) {
+ switch (s->sequence) {
+ case SEQ_STREAM_HEADER:
+ /*
+ * Stream Header is copied to s->temp, and then
+ * decoded from there. This way if the caller
+ * gives us only little input at a time, we can
+ * still keep the Stream Header decoding code
+ * simple. Similar approach is used in many places
+ * in this file.
+ */
+ if (!fill_temp(s, b))
+ return XZ_OK;
+
+ /*
+ * If dec_stream_header() returns
+ * XZ_UNSUPPORTED_CHECK, it is still possible
+ * to continue decoding if working in multi-call
+ * mode. Thus, update s->sequence before calling
+ * dec_stream_header().
+ */
+ s->sequence = SEQ_BLOCK_START;
+
+ ret = dec_stream_header(s);
+ if (ret != XZ_OK)
+ return ret;
+
+ case SEQ_BLOCK_START:
+ /* We need one byte of input to continue. */
+ if (b->in_pos == b->in_size)
+ return XZ_OK;
+
+ /* See if this is the beginning of the Index field. */
+ if (b->in[b->in_pos] == 0) {
+ s->in_start = b->in_pos++;
+ s->sequence = SEQ_INDEX;
+ break;
+ }
+
+ /*
+ * Calculate the size of the Block Header and
+ * prepare to decode it.
+ */
+ s->block_header.size
+ = ((uint32_t)b->in[b->in_pos] + 1) * 4;
+
+ s->temp.size = s->block_header.size;
+ s->temp.pos = 0;
+ s->sequence = SEQ_BLOCK_HEADER;
+
+ case SEQ_BLOCK_HEADER:
+ if (!fill_temp(s, b))
+ return XZ_OK;
+
+ ret = dec_block_header(s);
+ if (ret != XZ_OK)
+ return ret;
+
+ s->sequence = SEQ_BLOCK_UNCOMPRESS;
+
+ case SEQ_BLOCK_UNCOMPRESS:
+ ret = dec_block(s, b);
+ if (ret != XZ_STREAM_END)
+ return ret;
+
+ s->sequence = SEQ_BLOCK_PADDING;
+
+ case SEQ_BLOCK_PADDING:
+ /*
+ * Size of Compressed Data + Block Padding
+ * must be a multiple of four. We don't need
+ * s->block.compressed for anything else
+ * anymore, so we use it here to test the size
+ * of the Block Padding field.
+ */
+ while (s->block.compressed & 3) {
+ if (b->in_pos == b->in_size)
+ return XZ_OK;
+
+ if (b->in[b->in_pos++] != 0)
+ return XZ_DATA_ERROR;
+
+ ++s->block.compressed;
+ }
+
+ s->sequence = SEQ_BLOCK_CHECK;
+
+ case SEQ_BLOCK_CHECK:
+ if (s->check_type == XZ_CHECK_CRC32) {
+ ret = crc32_validate(s, b);
+ if (ret != XZ_STREAM_END)
+ return ret;
+ }
+#ifdef XZ_DEC_ANY_CHECK
+ else if (!check_skip(s, b)) {
+ return XZ_OK;
+ }
+#endif
+
+ s->sequence = SEQ_BLOCK_START;
+ break;
+
+ case SEQ_INDEX:
+ ret = dec_index(s, b);
+ if (ret != XZ_STREAM_END)
+ return ret;
+
+ s->sequence = SEQ_INDEX_PADDING;
+
+ case SEQ_INDEX_PADDING:
+ while ((s->index.size + (b->in_pos - s->in_start))
+ & 3) {
+ if (b->in_pos == b->in_size) {
+ index_update(s, b);
+ return XZ_OK;
+ }
+
+ if (b->in[b->in_pos++] != 0)
+ return XZ_DATA_ERROR;
+ }
+
+ /* Finish the CRC32 value and Index size. */
+ index_update(s, b);
+
+ /* Compare the hashes to validate the Index field. */
+ if (!memeq(&s->block.hash, &s->index.hash,
+ sizeof(s->block.hash)))
+ return XZ_DATA_ERROR;
+
+ s->sequence = SEQ_INDEX_CRC32;
+
+ case SEQ_INDEX_CRC32:
+ ret = crc32_validate(s, b);
+ if (ret != XZ_STREAM_END)
+ return ret;
+
+ s->temp.size = STREAM_HEADER_SIZE;
+ s->sequence = SEQ_STREAM_FOOTER;
+
+ case SEQ_STREAM_FOOTER:
+ if (!fill_temp(s, b))
+ return XZ_OK;
+
+ return dec_stream_footer(s);
+ }
+ }
+
+ /* Never reached */
+}
+
+/*
+ * xz_dec_run() is a wrapper for dec_main() to handle some special cases in
+ * multi-call and single-call decoding.
+ *
+ * In multi-call mode, we must return XZ_BUF_ERROR when it seems clear that we
+ * are not going to make any progress anymore. This is to prevent the caller
+ * from calling us infinitely when the input file is truncated or otherwise
+ * corrupt. Since zlib-style API allows that the caller fills the input buffer
+ * only when the decoder doesn't produce any new output, we have to be careful
+ * to avoid returning XZ_BUF_ERROR too easily: XZ_BUF_ERROR is returned only
+ * after the second consecutive call to xz_dec_run() that makes no progress.
+ *
+ * In single-call mode, if we couldn't decode everything and no error
+ * occurred, either the input is truncated or the output buffer is too small.
+ * Since we know that the last input byte never produces any output, we know
+ * that if all the input was consumed and decoding wasn't finished, the file
+ * must be corrupt. Otherwise the output buffer has to be too small or the
+ * file is corrupt in a way that decoding it produces too big output.
+ *
+ * If single-call decoding fails, we reset b->in_pos and b->out_pos back to
+ * their original values. This is because with some filter chains there won't
+ * be any valid uncompressed data in the output buffer unless the decoding
+ * actually succeeds (that's the price to pay of using the output buffer as
+ * the workspace).
+ */
+XZ_EXTERN enum xz_ret xz_dec_run(struct xz_dec *s, struct xz_buf *b)
+{
+ size_t in_start;
+ size_t out_start;
+ enum xz_ret ret;
+
+ if (DEC_IS_SINGLE(s->mode))
+ xz_dec_reset(s);
+
+ in_start = b->in_pos;
+ out_start = b->out_pos;
+ ret = dec_main(s, b);
+
+ if (DEC_IS_SINGLE(s->mode)) {
+ if (ret == XZ_OK)
+ ret = b->in_pos == b->in_size
+ ? XZ_DATA_ERROR : XZ_BUF_ERROR;
+
+ if (ret != XZ_STREAM_END) {
+ b->in_pos = in_start;
+ b->out_pos = out_start;
+ }
+
+ } else if (ret == XZ_OK && in_start == b->in_pos
+ && out_start == b->out_pos) {
+ if (s->allow_buf_error)
+ ret = XZ_BUF_ERROR;
+
+ s->allow_buf_error = true;
+ } else {
+ s->allow_buf_error = false;
+ }
+
+ return ret;
+}
+
+XZ_EXTERN struct xz_dec *xz_dec_init(enum xz_mode mode, uint32_t dict_max)
+{
+ struct xz_dec *s = kmalloc(sizeof(*s), GFP_KERNEL);
+ if (s == NULL)
+ return NULL;
+
+ s->mode = mode;
+
+#ifdef XZ_DEC_BCJ
+ s->bcj = xz_dec_bcj_create(DEC_IS_SINGLE(mode));
+ if (s->bcj == NULL)
+ goto error_bcj;
+#endif
+
+ s->lzma2 = xz_dec_lzma2_create(mode, dict_max);
+ if (s->lzma2 == NULL)
+ goto error_lzma2;
+
+ xz_dec_reset(s);
+ return s;
+
+error_lzma2:
+#ifdef XZ_DEC_BCJ
+ xz_dec_bcj_end(s->bcj);
+error_bcj:
+#endif
+ kfree(s);
+ return NULL;
+}
+
+XZ_EXTERN void xz_dec_reset(struct xz_dec *s)
+{
+ s->sequence = SEQ_STREAM_HEADER;
+ s->allow_buf_error = false;
+ s->pos = 0;
+ s->crc32 = 0;
+ memzero(&s->block, sizeof(s->block));
+ memzero(&s->index, sizeof(s->index));
+ s->temp.pos = 0;
+ s->temp.size = STREAM_HEADER_SIZE;
+}
+
+XZ_EXTERN void xz_dec_end(struct xz_dec *s)
+{
+ if (s != NULL) {
+ xz_dec_lzma2_end(s->lzma2);
+#ifdef XZ_DEC_BCJ
+ xz_dec_bcj_end(s->bcj);
+#endif
+ kfree(s);
+ }
+}
diff --git a/sys/contrib/xz-embedded/linux/lib/xz/xz_dec_syms.c b/sys/contrib/xz-embedded/linux/lib/xz/xz_dec_syms.c
new file mode 100644
index 0000000..32eb3c0
--- /dev/null
+++ b/sys/contrib/xz-embedded/linux/lib/xz/xz_dec_syms.c
@@ -0,0 +1,26 @@
+/*
+ * XZ decoder module information
+ *
+ * Author: Lasse Collin <lasse.collin@tukaani.org>
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+#include <linux/module.h>
+#include <linux/xz.h>
+
+EXPORT_SYMBOL(xz_dec_init);
+EXPORT_SYMBOL(xz_dec_reset);
+EXPORT_SYMBOL(xz_dec_run);
+EXPORT_SYMBOL(xz_dec_end);
+
+MODULE_DESCRIPTION("XZ decompressor");
+MODULE_VERSION("1.0");
+MODULE_AUTHOR("Lasse Collin <lasse.collin@tukaani.org> and Igor Pavlov");
+
+/*
+ * This code is in the public domain, but in Linux it's simplest to just
+ * say it's GPL and consider the authors as the copyright holders.
+ */
+MODULE_LICENSE("GPL");
diff --git a/sys/contrib/xz-embedded/linux/lib/xz/xz_dec_test.c b/sys/contrib/xz-embedded/linux/lib/xz/xz_dec_test.c
new file mode 100644
index 0000000..da28a19
--- /dev/null
+++ b/sys/contrib/xz-embedded/linux/lib/xz/xz_dec_test.c
@@ -0,0 +1,220 @@
+/*
+ * XZ decoder tester
+ *
+ * Author: Lasse Collin <lasse.collin@tukaani.org>
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/fs.h>
+#include <linux/uaccess.h>
+#include <linux/crc32.h>
+#include <linux/xz.h>
+
+/* Maximum supported dictionary size */
+#define DICT_MAX (1 << 20)
+
+/* Device name to pass to register_chrdev(). */
+#define DEVICE_NAME "xz_dec_test"
+
+/* Dynamically allocated device major number */
+static int device_major;
+
+/*
+ * We reuse the same decoder state, and thus can decode only one
+ * file at a time.
+ */
+static bool device_is_open;
+
+/* XZ decoder state */
+static struct xz_dec *state;
+
+/*
+ * Return value of xz_dec_run(). We need to avoid calling xz_dec_run() after
+ * it has returned XZ_STREAM_END, so we make this static.
+ */
+static enum xz_ret ret;
+
+/*
+ * Input and output buffers. The input buffer is used as a temporary safe
+ * place for the data coming from the userspace.
+ */
+static uint8_t buffer_in[1024];
+static uint8_t buffer_out[1024];
+
+/*
+ * Structure to pass the input and output buffers to the XZ decoder.
+ * A few of the fields are never modified so we initialize them here.
+ */
+static struct xz_buf buffers = {
+ .in = buffer_in,
+ .out = buffer_out,
+ .out_size = sizeof(buffer_out)
+};
+
+/*
+ * CRC32 of uncompressed data. This is used to give the user a simple way
+ * to check that the decoder produces correct output.
+ */
+static uint32_t crc;
+
+static int xz_dec_test_open(struct inode *i, struct file *f)
+{
+ if (device_is_open)
+ return -EBUSY;
+
+ device_is_open = true;
+
+ xz_dec_reset(state);
+ ret = XZ_OK;
+ crc = 0xFFFFFFFF;
+
+ buffers.in_pos = 0;
+ buffers.in_size = 0;
+ buffers.out_pos = 0;
+
+ printk(KERN_INFO DEVICE_NAME ": opened\n");
+ return 0;
+}
+
+static int xz_dec_test_release(struct inode *i, struct file *f)
+{
+ device_is_open = false;
+
+ if (ret == XZ_OK)
+ printk(KERN_INFO DEVICE_NAME ": input was truncated\n");
+
+ printk(KERN_INFO DEVICE_NAME ": closed\n");
+ return 0;
+}
+
+/*
+ * Decode the data given to us from the userspace. CRC32 of the uncompressed
+ * data is calculated and is printed at the end of successful decoding. The
+ * uncompressed data isn't stored anywhere for further use.
+ *
+ * The .xz file must have exactly one Stream and no Stream Padding. The data
+ * after the first Stream is considered to be garbage.
+ */
+static ssize_t xz_dec_test_write(struct file *file, const char __user *buf,
+ size_t size, loff_t *pos)
+{
+ size_t remaining;
+
+ if (ret != XZ_OK) {
+ if (size > 0)
+ printk(KERN_INFO DEVICE_NAME ": %zu bytes of "
+ "garbage at the end of the file\n",
+ size);
+
+ return -ENOSPC;
+ }
+
+ printk(KERN_INFO DEVICE_NAME ": decoding %zu bytes of input\n",
+ size);
+
+ remaining = size;
+ while ((remaining > 0 || buffers.out_pos == buffers.out_size)
+ && ret == XZ_OK) {
+ if (buffers.in_pos == buffers.in_size) {
+ buffers.in_pos = 0;
+ buffers.in_size = min(remaining, sizeof(buffer_in));
+ if (copy_from_user(buffer_in, buf, buffers.in_size))
+ return -EFAULT;
+
+ buf += buffers.in_size;
+ remaining -= buffers.in_size;
+ }
+
+ buffers.out_pos = 0;
+ ret = xz_dec_run(state, &buffers);
+ crc = crc32(crc, buffer_out, buffers.out_pos);
+ }
+
+ switch (ret) {
+ case XZ_OK:
+ printk(KERN_INFO DEVICE_NAME ": XZ_OK\n");
+ return size;
+
+ case XZ_STREAM_END:
+ printk(KERN_INFO DEVICE_NAME ": XZ_STREAM_END, "
+ "CRC32 = 0x%08X\n", ~crc);
+ return size - remaining - (buffers.in_size - buffers.in_pos);
+
+ case XZ_MEMLIMIT_ERROR:
+ printk(KERN_INFO DEVICE_NAME ": XZ_MEMLIMIT_ERROR\n");
+ break;
+
+ case XZ_FORMAT_ERROR:
+ printk(KERN_INFO DEVICE_NAME ": XZ_FORMAT_ERROR\n");
+ break;
+
+ case XZ_OPTIONS_ERROR:
+ printk(KERN_INFO DEVICE_NAME ": XZ_OPTIONS_ERROR\n");
+ break;
+
+ case XZ_DATA_ERROR:
+ printk(KERN_INFO DEVICE_NAME ": XZ_DATA_ERROR\n");
+ break;
+
+ case XZ_BUF_ERROR:
+ printk(KERN_INFO DEVICE_NAME ": XZ_BUF_ERROR\n");
+ break;
+
+ default:
+ printk(KERN_INFO DEVICE_NAME ": Bug detected!\n");
+ break;
+ }
+
+ return -EIO;
+}
+
+/* Allocate the XZ decoder state and register the character device. */
+static int __init xz_dec_test_init(void)
+{
+ static const struct file_operations fileops = {
+ .owner = THIS_MODULE,
+ .open = &xz_dec_test_open,
+ .release = &xz_dec_test_release,
+ .write = &xz_dec_test_write
+ };
+
+ state = xz_dec_init(XZ_PREALLOC, DICT_MAX);
+ if (state == NULL)
+ return -ENOMEM;
+
+ device_major = register_chrdev(0, DEVICE_NAME, &fileops);
+ if (device_major < 0) {
+ xz_dec_end(state);
+ return device_major;
+ }
+
+ printk(KERN_INFO DEVICE_NAME ": module loaded\n");
+ printk(KERN_INFO DEVICE_NAME ": Create a device node with "
+ "'mknod " DEVICE_NAME " c %d 0' and write .xz files "
+ "to it.\n", device_major);
+ return 0;
+}
+
+static void __exit xz_dec_test_exit(void)
+{
+ unregister_chrdev(device_major, DEVICE_NAME);
+ xz_dec_end(state);
+ printk(KERN_INFO DEVICE_NAME ": module unloaded\n");
+}
+
+module_init(xz_dec_test_init);
+module_exit(xz_dec_test_exit);
+
+MODULE_DESCRIPTION("XZ decompressor tester");
+MODULE_VERSION("1.0");
+MODULE_AUTHOR("Lasse Collin <lasse.collin@tukaani.org>");
+
+/*
+ * This code is in the public domain, but in Linux it's simplest to just
+ * say it's GPL and consider the authors as the copyright holders.
+ */
+MODULE_LICENSE("GPL");
diff --git a/sys/contrib/xz-embedded/linux/lib/xz/xz_lzma2.h b/sys/contrib/xz-embedded/linux/lib/xz/xz_lzma2.h
new file mode 100644
index 0000000..071d67b
--- /dev/null
+++ b/sys/contrib/xz-embedded/linux/lib/xz/xz_lzma2.h
@@ -0,0 +1,204 @@
+/*
+ * LZMA2 definitions
+ *
+ * Authors: Lasse Collin <lasse.collin@tukaani.org>
+ * Igor Pavlov <http://7-zip.org/>
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+#ifndef XZ_LZMA2_H
+#define XZ_LZMA2_H
+
+/* Range coder constants */
+#define RC_SHIFT_BITS 8
+#define RC_TOP_BITS 24
+#define RC_TOP_VALUE (1 << RC_TOP_BITS)
+#define RC_BIT_MODEL_TOTAL_BITS 11
+#define RC_BIT_MODEL_TOTAL (1 << RC_BIT_MODEL_TOTAL_BITS)
+#define RC_MOVE_BITS 5
+
+/*
+ * Maximum number of position states. A position state is the lowest pb
+ * number of bits of the current uncompressed offset. In some places there
+ * are different sets of probabilities for different position states.
+ */
+#define POS_STATES_MAX (1 << 4)
+
+/*
+ * This enum is used to track which LZMA symbols have occurred most recently
+ * and in which order. This information is used to predict the next symbol.
+ *
+ * Symbols:
+ * - Literal: One 8-bit byte
+ * - Match: Repeat a chunk of data at some distance
+ * - Long repeat: Multi-byte match at a recently seen distance
+ * - Short repeat: One-byte repeat at a recently seen distance
+ *
+ * The symbol names are in from STATE_oldest_older_previous. REP means
+ * either short or long repeated match, and NONLIT means any non-literal.
+ */
+enum lzma_state {
+ STATE_LIT_LIT,
+ STATE_MATCH_LIT_LIT,
+ STATE_REP_LIT_LIT,
+ STATE_SHORTREP_LIT_LIT,
+ STATE_MATCH_LIT,
+ STATE_REP_LIT,
+ STATE_SHORTREP_LIT,
+ STATE_LIT_MATCH,
+ STATE_LIT_LONGREP,
+ STATE_LIT_SHORTREP,
+ STATE_NONLIT_MATCH,
+ STATE_NONLIT_REP
+};
+
+/* Total number of states */
+#define STATES 12
+
+/* The lowest 7 states indicate that the previous state was a literal. */
+#define LIT_STATES 7
+
+/* Indicate that the latest symbol was a literal. */
+static inline void lzma_state_literal(enum lzma_state *state)
+{
+ if (*state <= STATE_SHORTREP_LIT_LIT)
+ *state = STATE_LIT_LIT;
+ else if (*state <= STATE_LIT_SHORTREP)
+ *state -= 3;
+ else
+ *state -= 6;
+}
+
+/* Indicate that the latest symbol was a match. */
+static inline void lzma_state_match(enum lzma_state *state)
+{
+ *state = *state < LIT_STATES ? STATE_LIT_MATCH : STATE_NONLIT_MATCH;
+}
+
+/* Indicate that the latest state was a long repeated match. */
+static inline void lzma_state_long_rep(enum lzma_state *state)
+{
+ *state = *state < LIT_STATES ? STATE_LIT_LONGREP : STATE_NONLIT_REP;
+}
+
+/* Indicate that the latest symbol was a short match. */
+static inline void lzma_state_short_rep(enum lzma_state *state)
+{
+ *state = *state < LIT_STATES ? STATE_LIT_SHORTREP : STATE_NONLIT_REP;
+}
+
+/* Test if the previous symbol was a literal. */
+static inline bool lzma_state_is_literal(enum lzma_state state)
+{
+ return state < LIT_STATES;
+}
+
+/* Each literal coder is divided in three sections:
+ * - 0x001-0x0FF: Without match byte
+ * - 0x101-0x1FF: With match byte; match bit is 0
+ * - 0x201-0x2FF: With match byte; match bit is 1
+ *
+ * Match byte is used when the previous LZMA symbol was something else than
+ * a literal (that is, it was some kind of match).
+ */
+#define LITERAL_CODER_SIZE 0x300
+
+/* Maximum number of literal coders */
+#define LITERAL_CODERS_MAX (1 << 4)
+
+/* Minimum length of a match is two bytes. */
+#define MATCH_LEN_MIN 2
+
+/* Match length is encoded with 4, 5, or 10 bits.
+ *
+ * Length Bits
+ * 2-9 4 = Choice=0 + 3 bits
+ * 10-17 5 = Choice=1 + Choice2=0 + 3 bits
+ * 18-273 10 = Choice=1 + Choice2=1 + 8 bits
+ */
+#define LEN_LOW_BITS 3
+#define LEN_LOW_SYMBOLS (1 << LEN_LOW_BITS)
+#define LEN_MID_BITS 3
+#define LEN_MID_SYMBOLS (1 << LEN_MID_BITS)
+#define LEN_HIGH_BITS 8
+#define LEN_HIGH_SYMBOLS (1 << LEN_HIGH_BITS)
+#define LEN_SYMBOLS (LEN_LOW_SYMBOLS + LEN_MID_SYMBOLS + LEN_HIGH_SYMBOLS)
+
+/*
+ * Maximum length of a match is 273 which is a result of the encoding
+ * described above.
+ */
+#define MATCH_LEN_MAX (MATCH_LEN_MIN + LEN_SYMBOLS - 1)
+
+/*
+ * Different sets of probabilities are used for match distances that have
+ * very short match length: Lengths of 2, 3, and 4 bytes have a separate
+ * set of probabilities for each length. The matches with longer length
+ * use a shared set of probabilities.
+ */
+#define DIST_STATES 4
+
+/*
+ * Get the index of the appropriate probability array for decoding
+ * the distance slot.
+ */
+static inline uint32_t lzma_get_dist_state(uint32_t len)
+{
+ return len < DIST_STATES + MATCH_LEN_MIN
+ ? len - MATCH_LEN_MIN : DIST_STATES - 1;
+}
+
+/*
+ * The highest two bits of a 32-bit match distance are encoded using six bits.
+ * This six-bit value is called a distance slot. This way encoding a 32-bit
+ * value takes 6-36 bits, larger values taking more bits.
+ */
+#define DIST_SLOT_BITS 6
+#define DIST_SLOTS (1 << DIST_SLOT_BITS)
+
+/* Match distances up to 127 are fully encoded using probabilities. Since
+ * the highest two bits (distance slot) are always encoded using six bits,
+ * the distances 0-3 don't need any additional bits to encode, since the
+ * distance slot itself is the same as the actual distance. DIST_MODEL_START
+ * indicates the first distance slot where at least one additional bit is
+ * needed.
+ */
+#define DIST_MODEL_START 4
+
+/*
+ * Match distances greater than 127 are encoded in three pieces:
+ * - distance slot: the highest two bits
+ * - direct bits: 2-26 bits below the highest two bits
+ * - alignment bits: four lowest bits
+ *
+ * Direct bits don't use any probabilities.
+ *
+ * The distance slot value of 14 is for distances 128-191.
+ */
+#define DIST_MODEL_END 14
+
+/* Distance slots that indicate a distance <= 127. */
+#define FULL_DISTANCES_BITS (DIST_MODEL_END / 2)
+#define FULL_DISTANCES (1 << FULL_DISTANCES_BITS)
+
+/*
+ * For match distances greater than 127, only the highest two bits and the
+ * lowest four bits (alignment) is encoded using probabilities.
+ */
+#define ALIGN_BITS 4
+#define ALIGN_SIZE (1 << ALIGN_BITS)
+#define ALIGN_MASK (ALIGN_SIZE - 1)
+
+/* Total number of all probability variables */
+#define PROBS_TOTAL (1846 + LITERAL_CODERS_MAX * LITERAL_CODER_SIZE)
+
+/*
+ * LZMA remembers the four most recent match distances. Reusing these
+ * distances tends to take less space than re-encoding the actual
+ * distance value.
+ */
+#define REPS 4
+
+#endif
diff --git a/sys/contrib/xz-embedded/linux/lib/xz/xz_private.h b/sys/contrib/xz-embedded/linux/lib/xz/xz_private.h
new file mode 100644
index 0000000..3e92303
--- /dev/null
+++ b/sys/contrib/xz-embedded/linux/lib/xz/xz_private.h
@@ -0,0 +1,156 @@
+/*
+ * Private includes and definitions
+ *
+ * Author: Lasse Collin <lasse.collin@tukaani.org>
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+#ifndef XZ_PRIVATE_H
+#define XZ_PRIVATE_H
+
+#ifdef __KERNEL__
+# include <linux/xz.h>
+# include <linux/kernel.h>
+# include <asm/unaligned.h>
+ /* XZ_PREBOOT may be defined only via decompress_unxz.c. */
+# ifndef XZ_PREBOOT
+# include <linux/slab.h>
+# include <linux/vmalloc.h>
+# include <linux/string.h>
+# ifdef CONFIG_XZ_DEC_X86
+# define XZ_DEC_X86
+# endif
+# ifdef CONFIG_XZ_DEC_POWERPC
+# define XZ_DEC_POWERPC
+# endif
+# ifdef CONFIG_XZ_DEC_IA64
+# define XZ_DEC_IA64
+# endif
+# ifdef CONFIG_XZ_DEC_ARM
+# define XZ_DEC_ARM
+# endif
+# ifdef CONFIG_XZ_DEC_ARMTHUMB
+# define XZ_DEC_ARMTHUMB
+# endif
+# ifdef CONFIG_XZ_DEC_SPARC
+# define XZ_DEC_SPARC
+# endif
+# define memeq(a, b, size) (memcmp(a, b, size) == 0)
+# define memzero(buf, size) memset(buf, 0, size)
+# endif
+# define get_le32(p) le32_to_cpup((const uint32_t *)(p))
+#else
+ /*
+ * For userspace builds, use a separate header to define the required
+ * macros and functions. This makes it easier to adapt the code into
+ * different environments and avoids clutter in the Linux kernel tree.
+ */
+# include <contrib/xz-embedded/freebsd/xz_config.h>
+#endif
+
+/* If no specific decoding mode is requested, enable support for all modes. */
+#if !defined(XZ_DEC_SINGLE) && !defined(XZ_DEC_PREALLOC) \
+ && !defined(XZ_DEC_DYNALLOC)
+# define XZ_DEC_SINGLE
+# define XZ_DEC_PREALLOC
+# define XZ_DEC_DYNALLOC
+#endif
+
+/*
+ * The DEC_IS_foo(mode) macros are used in "if" statements. If only some
+ * of the supported modes are enabled, these macros will evaluate to true or
+ * false at compile time and thus allow the compiler to omit unneeded code.
+ */
+#ifdef XZ_DEC_SINGLE
+# define DEC_IS_SINGLE(mode) ((mode) == XZ_SINGLE)
+#else
+# define DEC_IS_SINGLE(mode) (false)
+#endif
+
+#ifdef XZ_DEC_PREALLOC
+# define DEC_IS_PREALLOC(mode) ((mode) == XZ_PREALLOC)
+#else
+# define DEC_IS_PREALLOC(mode) (false)
+#endif
+
+#ifdef XZ_DEC_DYNALLOC
+# define DEC_IS_DYNALLOC(mode) ((mode) == XZ_DYNALLOC)
+#else
+# define DEC_IS_DYNALLOC(mode) (false)
+#endif
+
+#if !defined(XZ_DEC_SINGLE)
+# define DEC_IS_MULTI(mode) (true)
+#elif defined(XZ_DEC_PREALLOC) || defined(XZ_DEC_DYNALLOC)
+# define DEC_IS_MULTI(mode) ((mode) != XZ_SINGLE)
+#else
+# define DEC_IS_MULTI(mode) (false)
+#endif
+
+/*
+ * If any of the BCJ filter decoders are wanted, define XZ_DEC_BCJ.
+ * XZ_DEC_BCJ is used to enable generic support for BCJ decoders.
+ */
+#ifndef XZ_DEC_BCJ
+# if defined(XZ_DEC_X86) || defined(XZ_DEC_POWERPC) \
+ || defined(XZ_DEC_IA64) || defined(XZ_DEC_ARM) \
+ || defined(XZ_DEC_ARM) || defined(XZ_DEC_ARMTHUMB) \
+ || defined(XZ_DEC_SPARC)
+# define XZ_DEC_BCJ
+# endif
+#endif
+
+/*
+ * Allocate memory for LZMA2 decoder. xz_dec_lzma2_reset() must be used
+ * before calling xz_dec_lzma2_run().
+ */
+XZ_EXTERN struct xz_dec_lzma2 *xz_dec_lzma2_create(enum xz_mode mode,
+ uint32_t dict_max);
+
+/*
+ * Decode the LZMA2 properties (one byte) and reset the decoder. Return
+ * XZ_OK on success, XZ_MEMLIMIT_ERROR if the preallocated dictionary is not
+ * big enough, and XZ_OPTIONS_ERROR if props indicates something that this
+ * decoder doesn't support.
+ */
+XZ_EXTERN enum xz_ret xz_dec_lzma2_reset(struct xz_dec_lzma2 *s,
+ uint8_t props);
+
+/* Decode raw LZMA2 stream from b->in to b->out. */
+XZ_EXTERN enum xz_ret xz_dec_lzma2_run(struct xz_dec_lzma2 *s,
+ struct xz_buf *b);
+
+/* Free the memory allocated for the LZMA2 decoder. */
+XZ_EXTERN void xz_dec_lzma2_end(struct xz_dec_lzma2 *s);
+
+#ifdef XZ_DEC_BCJ
+/*
+ * Allocate memory for BCJ decoders. xz_dec_bcj_reset() must be used before
+ * calling xz_dec_bcj_run().
+ */
+XZ_EXTERN struct xz_dec_bcj *xz_dec_bcj_create(bool single_call);
+
+/*
+ * Decode the Filter ID of a BCJ filter. This implementation doesn't
+ * support custom start offsets, so no decoding of Filter Properties
+ * is needed. Returns XZ_OK if the given Filter ID is supported.
+ * Otherwise XZ_OPTIONS_ERROR is returned.
+ */
+XZ_EXTERN enum xz_ret xz_dec_bcj_reset(struct xz_dec_bcj *s, uint8_t id);
+
+/*
+ * Decode raw BCJ + LZMA2 stream. This must be used only if there actually is
+ * a BCJ filter in the chain. If the chain has only LZMA2, xz_dec_lzma2_run()
+ * must be called directly.
+ */
+XZ_EXTERN enum xz_ret xz_dec_bcj_run(struct xz_dec_bcj *s,
+ struct xz_dec_lzma2 *lzma2,
+ struct xz_buf *b);
+
+/* Free the memory allocated for the BCJ filters. */
+#define xz_dec_bcj_end(s) kfree(s)
+#endif
+
+#endif
diff --git a/sys/contrib/xz-embedded/linux/lib/xz/xz_stream.h b/sys/contrib/xz-embedded/linux/lib/xz/xz_stream.h
new file mode 100644
index 0000000..66cb5a7
--- /dev/null
+++ b/sys/contrib/xz-embedded/linux/lib/xz/xz_stream.h
@@ -0,0 +1,62 @@
+/*
+ * Definitions for handling the .xz file format
+ *
+ * Author: Lasse Collin <lasse.collin@tukaani.org>
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+#ifndef XZ_STREAM_H
+#define XZ_STREAM_H
+
+#if defined(__KERNEL__) && !XZ_INTERNAL_CRC32
+# include <linux/crc32.h>
+# undef crc32
+# define xz_crc32(buf, size, crc) \
+ (~crc32_le(~(uint32_t)(crc), buf, size))
+#endif
+
+/*
+ * See the .xz file format specification at
+ * http://tukaani.org/xz/xz-file-format.txt
+ * to understand the container format.
+ */
+
+#define STREAM_HEADER_SIZE 12
+
+#define HEADER_MAGIC "\3757zXZ"
+#define HEADER_MAGIC_SIZE 6
+
+#define FOOTER_MAGIC "YZ"
+#define FOOTER_MAGIC_SIZE 2
+
+/*
+ * Variable-length integer can hold a 63-bit unsigned integer or a special
+ * value indicating that the value is unknown.
+ *
+ * Experimental: vli_type can be defined to uint32_t to save a few bytes
+ * in code size (no effect on speed). Doing so limits the uncompressed and
+ * compressed size of the file to less than 256 MiB and may also weaken
+ * error detection slightly.
+ */
+typedef uint64_t vli_type;
+
+#define VLI_MAX ((vli_type)-1 / 2)
+#define VLI_UNKNOWN ((vli_type)-1)
+
+/* Maximum encoded size of a VLI */
+#define VLI_BYTES_MAX (sizeof(vli_type) * 8 / 7)
+
+/* Integrity Check types */
+enum xz_check {
+ XZ_CHECK_NONE = 0,
+ XZ_CHECK_CRC32 = 1,
+ XZ_CHECK_CRC64 = 4,
+ XZ_CHECK_SHA256 = 10
+};
+
+/* Maximum possible Check ID */
+#define XZ_CHECK_MAX 15
+
+#endif
diff --git a/sys/contrib/xz-embedded/linux/scripts/xz_wrap.sh b/sys/contrib/xz-embedded/linux/scripts/xz_wrap.sh
new file mode 100755
index 0000000..17a5798
--- /dev/null
+++ b/sys/contrib/xz-embedded/linux/scripts/xz_wrap.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+#
+# This is a wrapper for xz to compress the kernel image using appropriate
+# compression options depending on the architecture.
+#
+# Author: Lasse Collin <lasse.collin@tukaani.org>
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+
+BCJ=
+LZMA2OPTS=
+
+case $ARCH in
+ x86|x86_64) BCJ=--x86 ;;
+ powerpc) BCJ=--powerpc ;;
+ ia64) BCJ=--ia64; LZMA2OPTS=pb=4 ;;
+ arm) BCJ=--arm ;;
+ sparc) BCJ=--sparc ;;
+esac
+
+exec xz --check=crc32 $BCJ --lzma2=$LZMA2OPTS,dict=32MiB
diff --git a/sys/contrib/xz-embedded/userspace/Makefile b/sys/contrib/xz-embedded/userspace/Makefile
new file mode 100644
index 0000000..9d17799
--- /dev/null
+++ b/sys/contrib/xz-embedded/userspace/Makefile
@@ -0,0 +1,48 @@
+#
+# Makefile
+#
+# Author: Lasse Collin <lasse.collin@tukaani.org>
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+
+CC = gcc -std=gnu89
+BCJ_CPPFLAGS = -DXZ_DEC_X86 -DXZ_DEC_POWERPC -DXZ_DEC_IA64 \
+ -DXZ_DEC_ARM -DXZ_DEC_ARMTHUMB -DXZ_DEC_SPARC
+CPPFLAGS = -DXZ_DEC_ANY_CHECK
+CFLAGS = -ggdb3 -O2 -pedantic -Wall -Wextra
+RM = rm -f
+VPATH = ../linux/include/linux ../linux/lib/xz
+COMMON_SRCS = xz_crc32.c xz_dec_stream.c xz_dec_lzma2.c xz_dec_bcj.c
+COMMON_OBJS = $(COMMON_SRCS:.c=.o)
+XZMINIDEC_OBJS = xzminidec.o
+BYTETEST_OBJS = bytetest.o
+BUFTEST_OBJS = buftest.o
+BOOTTEST_OBJS = boottest.o
+XZ_HEADERS = xz.h xz_private.h xz_stream.h xz_lzma2.h xz_config.h
+PROGRAMS = xzminidec bytetest buftest boottest
+
+ALL_CPPFLAGS = -I../linux/include/linux -I. $(BCJ_CPPFLAGS) $(CPPFLAGS)
+
+all: $(PROGRAMS)
+
+%.o: %.c $(XZ_HEADERS)
+ $(CC) $(ALL_CPPFLAGS) $(CFLAGS) -c -o $@ $<
+
+xzminidec: $(COMMON_OBJS) $(XZMINIDEC_OBJS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(COMMON_OBJS) $(XZMINIDEC_OBJS)
+
+bytetest: $(COMMON_OBJS) $(BYTETEST_OBJS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(COMMON_OBJS) $(BYTETEST_OBJS)
+
+buftest: $(COMMON_OBJS) $(BUFTEST_OBJS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(COMMON_OBJS) $(BUFTEST_OBJS)
+
+boottest: $(BOOTTEST_OBJS) $(COMMON_SRCS)
+ $(CC) $(ALL_CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $(BOOTTEST_OBJS)
+
+.PHONY: clean
+clean:
+ -$(RM) $(COMMON_OBJS) $(XZMINIDEC_OBJS) $(BUFTEST_OBJS) \
+ $(BOOTTEST_OBJS) $(PROGRAMS)
diff --git a/sys/contrib/xz-embedded/userspace/boottest.c b/sys/contrib/xz-embedded/userspace/boottest.c
new file mode 100644
index 0000000..f5bc282
--- /dev/null
+++ b/sys/contrib/xz-embedded/userspace/boottest.c
@@ -0,0 +1,93 @@
+/*
+ * Test application for xz_boot.c
+ *
+ * Author: Lasse Collin <lasse.collin@tukaani.org>
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+
+#define STATIC static
+#define INIT
+
+static void error(/*const*/ char *msg)
+{
+ fprintf(stderr, "%s\n", msg);
+}
+
+#include "../linux/lib/decompress_unxz.c"
+
+static uint8_t in[1024 * 1024];
+static uint8_t out[1024 * 1024];
+
+static int fill(void *buf, unsigned int size)
+{
+ return fread(buf, 1, size, stdin);
+}
+
+static int flush(/*const*/ void *buf, unsigned int size)
+{
+ return fwrite(buf, 1, size, stdout);
+}
+
+static void test_buf_to_buf(void)
+{
+ size_t in_size;
+ int ret;
+ in_size = fread(in, 1, sizeof(in), stdin);
+ ret = decompress(in, in_size, NULL, NULL, out, NULL, &error);
+ /* fwrite(out, 1, FIXME, stdout); */
+ fprintf(stderr, "ret = %d\n", ret);
+}
+
+static void test_buf_to_cb(void)
+{
+ size_t in_size;
+ int in_used;
+ int ret;
+ in_size = fread(in, 1, sizeof(in), stdin);
+ ret = decompress(in, in_size, NULL, &flush, NULL, &in_used, &error);
+ fprintf(stderr, "ret = %d; in_used = %d\n", ret, in_used);
+}
+
+static void test_cb_to_cb(void)
+{
+ int ret;
+ ret = decompress(NULL, 0, &fill, &flush, NULL, NULL, &error);
+ fprintf(stderr, "ret = %d\n", ret);
+}
+
+/*
+ * Not used by Linux <= 2.6.37-rc4 and newer probably won't use it either,
+ * but this kind of use case is still required to be supported by the API.
+ */
+static void test_cb_to_buf(void)
+{
+ int in_used;
+ int ret;
+ ret = decompress(in, 0, &fill, NULL, out, &in_used, &error);
+ /* fwrite(out, 1, FIXME, stdout); */
+ fprintf(stderr, "ret = %d; in_used = %d\n", ret, in_used);
+}
+
+int main(int argc, char **argv)
+{
+ if (argc != 2)
+ fprintf(stderr, "Usage: %s [bb|bc|cc|cb]\n", argv[0]);
+ else if (strcmp(argv[1], "bb") == 0)
+ test_buf_to_buf();
+ else if (strcmp(argv[1], "bc") == 0)
+ test_buf_to_cb();
+ else if (strcmp(argv[1], "cc") == 0)
+ test_cb_to_cb();
+ else if (strcmp(argv[1], "cb") == 0)
+ test_cb_to_buf();
+ else
+ fprintf(stderr, "Usage: %s [bb|bc|cc|cb]\n", argv[0]);
+
+ return 0;
+}
diff --git a/sys/contrib/xz-embedded/userspace/buftest.c b/sys/contrib/xz-embedded/userspace/buftest.c
new file mode 100644
index 0000000..54b780a
--- /dev/null
+++ b/sys/contrib/xz-embedded/userspace/buftest.c
@@ -0,0 +1,48 @@
+/*
+ * Test application to test buffer-to-buffer decoding
+ *
+ * Author: Lasse Collin <lasse.collin@tukaani.org>
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <string.h>
+#include "xz.h"
+
+#define BUFFER_SIZE (1024 * 1024)
+
+static uint8_t in[BUFFER_SIZE];
+static uint8_t out[BUFFER_SIZE];
+
+int main(void)
+{
+ struct xz_buf b;
+ struct xz_dec *s;
+ enum xz_ret ret;
+
+ xz_crc32_init();
+
+ s = xz_dec_init(XZ_SINGLE, 0);
+ if (s == NULL) {
+ fputs("Initialization failed", stderr);
+ return 1;
+ }
+
+ b.in = in;
+ b.in_pos = 0;
+ b.in_size = fread(in, 1, sizeof(in), stdin);
+ b.out = out;
+ b.out_pos = 0;
+ b.out_size = sizeof(out);
+
+ ret = xz_dec_run(s, &b);
+ xz_dec_end(s);
+
+ fwrite(out, 1, b.out_pos, stdout);
+ fprintf(stderr, "%d\n", ret);
+
+ return 0;
+}
diff --git a/sys/contrib/xz-embedded/userspace/xz_config.h b/sys/contrib/xz-embedded/userspace/xz_config.h
new file mode 100644
index 0000000..71bb029
--- /dev/null
+++ b/sys/contrib/xz-embedded/userspace/xz_config.h
@@ -0,0 +1,109 @@
+/*
+ * Private includes and definitions for userspace use of XZ Embedded
+ *
+ * Author: Lasse Collin <lasse.collin@tukaani.org>
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+#ifndef XZ_CONFIG_H
+#define XZ_CONFIG_H
+
+/* Uncomment as needed to enable BCJ filter decoders. */
+/* #define XZ_DEC_X86 */
+/* #define XZ_DEC_POWERPC */
+/* #define XZ_DEC_IA64 */
+/* #define XZ_DEC_ARM */
+/* #define XZ_DEC_ARMTHUMB */
+/* #define XZ_DEC_SPARC */
+
+#include <stdbool.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "xz.h"
+
+#define kmalloc(size, flags) malloc(size)
+#define kfree(ptr) free(ptr)
+#define vmalloc(size) malloc(size)
+#define vfree(ptr) free(ptr)
+
+#define memeq(a, b, size) (memcmp(a, b, size) == 0)
+#define memzero(buf, size) memset(buf, 0, size)
+
+#ifndef min
+# define min(x, y) ((x) < (y) ? (x) : (y))
+#endif
+#define min_t(type, x, y) min(x, y)
+
+/*
+ * Some functions have been marked with __always_inline to keep the
+ * performance reasonable even when the compiler is optimizing for
+ * small code size. You may be able to save a few bytes by #defining
+ * __always_inline to plain inline, but don't complain if the code
+ * becomes slow.
+ *
+ * NOTE: System headers on GNU/Linux may #define this macro already,
+ * so if you want to change it, you need to #undef it first.
+ */
+#ifndef __always_inline
+# ifdef __GNUC__
+# define __always_inline \
+ inline __attribute__((__always_inline__))
+# else
+# define __always_inline inline
+# endif
+#endif
+
+/* Inline functions to access unaligned unsigned 32-bit integers */
+#ifndef get_unaligned_le32
+static inline uint32_t get_unaligned_le32(const uint8_t *buf)
+{
+ return (uint32_t)buf[0]
+ | ((uint32_t)buf[1] << 8)
+ | ((uint32_t)buf[2] << 16)
+ | ((uint32_t)buf[3] << 24);
+}
+#endif
+
+#ifndef get_unaligned_be32
+static inline uint32_t get_unaligned_be32(const uint8_t *buf)
+{
+ return (uint32_t)(buf[0] << 24)
+ | ((uint32_t)buf[1] << 16)
+ | ((uint32_t)buf[2] << 8)
+ | (uint32_t)buf[3];
+}
+#endif
+
+#ifndef put_unaligned_le32
+static inline void put_unaligned_le32(uint32_t val, uint8_t *buf)
+{
+ buf[0] = (uint8_t)val;
+ buf[1] = (uint8_t)(val >> 8);
+ buf[2] = (uint8_t)(val >> 16);
+ buf[3] = (uint8_t)(val >> 24);
+}
+#endif
+
+#ifndef put_unaligned_be32
+static inline void put_unaligned_be32(uint32_t val, uint8_t *buf)
+{
+ buf[0] = (uint8_t)(val >> 24);
+ buf[1] = (uint8_t)(val >> 16);
+ buf[2] = (uint8_t)(val >> 8);
+ buf[3] = (uint8_t)val;
+}
+#endif
+
+/*
+ * Use get_unaligned_le32() also for aligned access for simplicity. On
+ * little endian systems, #define get_le32(ptr) (*(const uint32_t *)(ptr))
+ * could save a few bytes in code size.
+ */
+#ifndef get_le32
+# define get_le32 get_unaligned_le32
+#endif
+
+#endif
diff --git a/sys/contrib/xz-embedded/userspace/xzminidec.c b/sys/contrib/xz-embedded/userspace/xzminidec.c
new file mode 100644
index 0000000..2a039c6
--- /dev/null
+++ b/sys/contrib/xz-embedded/userspace/xzminidec.c
@@ -0,0 +1,132 @@
+/*
+ * Simple XZ decoder command line tool
+ *
+ * Author: Lasse Collin <lasse.collin@tukaani.org>
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+/*
+ * This is really limited: Not all filters from .xz format are supported,
+ * only CRC32 is supported as the integrity check, and decoding of
+ * concatenated .xz streams is not supported. Thus, you may want to look
+ * at xzdec from XZ Utils if a few KiB bigger tool is not a problem.
+ */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <string.h>
+#include "xz.h"
+
+static uint8_t in[BUFSIZ];
+static uint8_t out[BUFSIZ];
+
+int main(int argc, char **argv)
+{
+ struct xz_buf b;
+ struct xz_dec *s;
+ enum xz_ret ret;
+ const char *msg;
+
+ if (argc >= 2 && strcmp(argv[1], "--help") == 0) {
+ fputs("Uncompress a .xz file from stdin to stdout.\n"
+ "Arguments other than `--help' are ignored.\n",
+ stdout);
+ return 0;
+ }
+
+ xz_crc32_init();
+
+ /*
+ * Support up to 64 MiB dictionary. The actually needed memory
+ * is allocated once the headers have been parsed.
+ */
+ s = xz_dec_init(XZ_DYNALLOC, 1 << 26);
+ if (s == NULL) {
+ msg = "Memory allocation failed\n";
+ goto error;
+ }
+
+ b.in = in;
+ b.in_pos = 0;
+ b.in_size = 0;
+ b.out = out;
+ b.out_pos = 0;
+ b.out_size = BUFSIZ;
+
+ while (true) {
+ if (b.in_pos == b.in_size) {
+ b.in_size = fread(in, 1, sizeof(in), stdin);
+ b.in_pos = 0;
+ }
+
+ ret = xz_dec_run(s, &b);
+
+ if (b.out_pos == sizeof(out)) {
+ if (fwrite(out, 1, b.out_pos, stdout) != b.out_pos) {
+ msg = "Write error\n";
+ goto error;
+ }
+
+ b.out_pos = 0;
+ }
+
+ if (ret == XZ_OK)
+ continue;
+
+#ifdef XZ_DEC_ANY_CHECK
+ if (ret == XZ_UNSUPPORTED_CHECK) {
+ fputs(argv[0], stderr);
+ fputs(": ", stderr);
+ fputs("Unsupported check; not verifying "
+ "file integrity\n", stderr);
+ continue;
+ }
+#endif
+
+ if (fwrite(out, 1, b.out_pos, stdout) != b.out_pos
+ || fclose(stdout)) {
+ msg = "Write error\n";
+ goto error;
+ }
+
+ switch (ret) {
+ case XZ_STREAM_END:
+ xz_dec_end(s);
+ return 0;
+
+ case XZ_MEM_ERROR:
+ msg = "Memory allocation failed\n";
+ goto error;
+
+ case XZ_MEMLIMIT_ERROR:
+ msg = "Memory usage limit reached\n";
+ goto error;
+
+ case XZ_FORMAT_ERROR:
+ msg = "Not a .xz file\n";
+ goto error;
+
+ case XZ_OPTIONS_ERROR:
+ msg = "Unsupported options in the .xz headers\n";
+ goto error;
+
+ case XZ_DATA_ERROR:
+ case XZ_BUF_ERROR:
+ msg = "File is corrupt\n";
+ goto error;
+
+ default:
+ msg = "Bug!\n";
+ goto error;
+ }
+ }
+
+error:
+ xz_dec_end(s);
+ fputs(argv[0], stderr);
+ fputs(": ", stderr);
+ fputs(msg, stderr);
+ return 1;
+}
diff --git a/sys/crypto/aesni/aesni.c b/sys/crypto/aesni/aesni.c
index ed12f28..ca00a57 100644
--- a/sys/crypto/aesni/aesni.c
+++ b/sys/crypto/aesni/aesni.c
@@ -116,6 +116,7 @@ aesni_detach(device_t dev)
}
while ((ses = TAILQ_FIRST(&sc->sessions)) != NULL) {
TAILQ_REMOVE(&sc->sessions, ses, next);
+ fpu_kern_free_ctx(ses->fpu_ctx);
free(ses, M_AESNI);
}
rw_wunlock(&sc->lock);
@@ -165,8 +166,13 @@ aesni_newsession(device_t dev, uint32_t *sidp, struct cryptoini *cri)
rw_wunlock(&sc->lock);
return (ENOMEM);
}
- KASSERT(((uintptr_t)ses) % 0x10 == 0,
- ("malloc returned unaligned pointer"));
+ ses->fpu_ctx = fpu_kern_alloc_ctx(FPU_KERN_NORMAL |
+ FPU_KERN_NOWAIT);
+ if (ses->fpu_ctx == NULL) {
+ free(ses, M_AESNI);
+ rw_wunlock(&sc->lock);
+ return (ENOMEM);
+ }
ses->id = sc->sid++;
} else {
TAILQ_REMOVE(&sc->sessions, ses, next);
@@ -191,12 +197,15 @@ aesni_newsession(device_t dev, uint32_t *sidp, struct cryptoini *cri)
static void
aesni_freesession_locked(struct aesni_softc *sc, struct aesni_session *ses)
{
+ struct fpu_kern_ctx *ctx;
uint32_t sid;
sid = ses->id;
TAILQ_REMOVE(&sc->sessions, ses, next);
+ ctx = ses->fpu_ctx;
bzero(ses, sizeof(*ses));
ses->id = sid;
+ ses->fpu_ctx = ctx;
TAILQ_INSERT_HEAD(&sc->sessions, ses, next);
}
diff --git a/sys/crypto/aesni/aesni.h b/sys/crypto/aesni/aesni.h
index b07ec8b..78255b7 100644
--- a/sys/crypto/aesni/aesni.h
+++ b/sys/crypto/aesni/aesni.h
@@ -65,7 +65,7 @@ struct aesni_session {
int used;
uint32_t id;
TAILQ_ENTRY(aesni_session) next;
- struct fpu_kern_ctx fpu_ctx;
+ struct fpu_kern_ctx *fpu_ctx;
};
/*
diff --git a/sys/crypto/aesni/aesni_wrap.c b/sys/crypto/aesni/aesni_wrap.c
index 1492640..787c1a9 100644
--- a/sys/crypto/aesni/aesni_wrap.c
+++ b/sys/crypto/aesni/aesni_wrap.c
@@ -227,7 +227,7 @@ aesni_cipher_setup(struct aesni_session *ses, struct cryptoini *encini)
td = curthread;
if (!is_fpu_kern_thread(0)) {
- error = fpu_kern_enter(td, &ses->fpu_ctx, FPU_KERN_NORMAL);
+ error = fpu_kern_enter(td, ses->fpu_ctx, FPU_KERN_NORMAL);
saved_ctx = 1;
} else {
error = 0;
@@ -237,7 +237,7 @@ aesni_cipher_setup(struct aesni_session *ses, struct cryptoini *encini)
error = aesni_cipher_setup_common(ses, encini->cri_key,
encini->cri_klen);
if (saved_ctx)
- fpu_kern_leave(td, &ses->fpu_ctx);
+ fpu_kern_leave(td, ses->fpu_ctx);
}
return (error);
}
@@ -256,7 +256,7 @@ aesni_cipher_process(struct aesni_session *ses, struct cryptodesc *enccrd,
td = curthread;
if (!is_fpu_kern_thread(0)) {
- error = fpu_kern_enter(td, &ses->fpu_ctx, FPU_KERN_NORMAL);
+ error = fpu_kern_enter(td, ses->fpu_ctx, FPU_KERN_NORMAL);
if (error != 0)
goto out;
saved_ctx = 1;
@@ -302,7 +302,7 @@ aesni_cipher_process(struct aesni_session *ses, struct cryptodesc *enccrd,
}
}
if (saved_ctx)
- fpu_kern_leave(td, &ses->fpu_ctx);
+ fpu_kern_leave(td, ses->fpu_ctx);
if (allocated)
crypto_copyback(crp->crp_flags, crp->crp_buf, enccrd->crd_skip,
enccrd->crd_len, buf);
diff --git a/sys/crypto/via/padlock.c b/sys/crypto/via/padlock.c
index ba63093..f601d2a 100644
--- a/sys/crypto/via/padlock.c
+++ b/sys/crypto/via/padlock.c
@@ -156,6 +156,7 @@ padlock_detach(device_t dev)
}
while ((ses = TAILQ_FIRST(&sc->sc_sessions)) != NULL) {
TAILQ_REMOVE(&sc->sc_sessions, ses, ses_next);
+ fpu_kern_free_ctx(ses->ses_fpu_ctx);
free(ses, M_PADLOCK);
}
rw_destroy(&sc->sc_sessions_lock);
@@ -222,6 +223,13 @@ padlock_newsession(device_t dev, uint32_t *sidp, struct cryptoini *cri)
rw_wunlock(&sc->sc_sessions_lock);
return (ENOMEM);
}
+ ses->ses_fpu_ctx = fpu_kern_alloc_ctx(FPU_KERN_NORMAL |
+ FPU_KERN_NOWAIT);
+ if (ses->ses_fpu_ctx == NULL) {
+ free(ses, M_PADLOCK);
+ rw_wunlock(&sc->sc_sessions_lock);
+ return (ENOMEM);
+ }
ses->ses_id = sc->sc_sid++;
} else {
TAILQ_REMOVE(&sc->sc_sessions, ses, ses_next);
@@ -239,7 +247,7 @@ padlock_newsession(device_t dev, uint32_t *sidp, struct cryptoini *cri)
if (macini != NULL) {
td = curthread;
if (!is_fpu_kern_thread(0)) {
- error = fpu_kern_enter(td, &ses->ses_fpu_ctx,
+ error = fpu_kern_enter(td, ses->ses_fpu_ctx,
FPU_KERN_NORMAL);
saved_ctx = 1;
} else {
@@ -249,7 +257,7 @@ padlock_newsession(device_t dev, uint32_t *sidp, struct cryptoini *cri)
if (error == 0) {
error = padlock_hash_setup(ses, macini);
if (saved_ctx)
- fpu_kern_leave(td, &ses->ses_fpu_ctx);
+ fpu_kern_leave(td, ses->ses_fpu_ctx);
}
if (error != 0) {
padlock_freesession_one(sc, ses, 0);
@@ -265,15 +273,18 @@ static void
padlock_freesession_one(struct padlock_softc *sc, struct padlock_session *ses,
int locked)
{
+ struct fpu_kern_ctx *ctx;
uint32_t sid = ses->ses_id;
if (!locked)
rw_wlock(&sc->sc_sessions_lock);
TAILQ_REMOVE(&sc->sc_sessions, ses, ses_next);
padlock_hash_free(ses);
+ ctx = ses->ses_fpu_ctx;
bzero(ses, sizeof(*ses));
ses->ses_used = 0;
ses->ses_id = sid;
+ ses->ses_fpu_ctx = ctx;
TAILQ_INSERT_HEAD(&sc->sc_sessions, ses, ses_next);
if (!locked)
rw_wunlock(&sc->sc_sessions_lock);
diff --git a/sys/crypto/via/padlock.h b/sys/crypto/via/padlock.h
index c8ee9bd..77a4673 100644
--- a/sys/crypto/via/padlock.h
+++ b/sys/crypto/via/padlock.h
@@ -76,7 +76,7 @@ struct padlock_session {
int ses_used;
uint32_t ses_id;
TAILQ_ENTRY(padlock_session) ses_next;
- struct fpu_kern_ctx ses_fpu_ctx;
+ struct fpu_kern_ctx *ses_fpu_ctx;
};
#define PADLOCK_ALIGN(p) (void *)(roundup2((uintptr_t)(p), 16))
diff --git a/sys/crypto/via/padlock_cipher.c b/sys/crypto/via/padlock_cipher.c
index 1456ddf..7170211 100644
--- a/sys/crypto/via/padlock_cipher.c
+++ b/sys/crypto/via/padlock_cipher.c
@@ -251,7 +251,7 @@ padlock_cipher_process(struct padlock_session *ses, struct cryptodesc *enccrd,
td = curthread;
if (!is_fpu_kern_thread(0)) {
- error = fpu_kern_enter(td, &ses->ses_fpu_ctx, FPU_KERN_NORMAL);
+ error = fpu_kern_enter(td, ses->ses_fpu_ctx, FPU_KERN_NORMAL);
saved_ctx = 1;
} else {
error = 0;
@@ -264,7 +264,7 @@ padlock_cipher_process(struct padlock_session *ses, struct cryptodesc *enccrd,
ses->ses_iv);
if (saved_ctx)
- fpu_kern_leave(td, &ses->ses_fpu_ctx);
+ fpu_kern_leave(td, ses->ses_fpu_ctx);
if (allocated) {
crypto_copyback(crp->crp_flags, crp->crp_buf, enccrd->crd_skip,
diff --git a/sys/crypto/via/padlock_hash.c b/sys/crypto/via/padlock_hash.c
index 0fe182b..924a9ec 100644
--- a/sys/crypto/via/padlock_hash.c
+++ b/sys/crypto/via/padlock_hash.c
@@ -370,7 +370,7 @@ padlock_hash_process(struct padlock_session *ses, struct cryptodesc *maccrd,
td = curthread;
if (!is_fpu_kern_thread(0)) {
- error = fpu_kern_enter(td, &ses->ses_fpu_ctx, FPU_KERN_NORMAL);
+ error = fpu_kern_enter(td, ses->ses_fpu_ctx, FPU_KERN_NORMAL);
saved_ctx = 1;
} else {
error = 0;
@@ -383,7 +383,7 @@ padlock_hash_process(struct padlock_session *ses, struct cryptodesc *maccrd,
error = padlock_authcompute(ses, maccrd, crp->crp_buf, crp->crp_flags);
if (saved_ctx)
- fpu_kern_leave(td, &ses->ses_fpu_ctx);
+ fpu_kern_leave(td, ses->ses_fpu_ctx);
return (error);
}
diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c
index f2e2c42..e0f14b9 100644
--- a/sys/ddb/db_command.c
+++ b/sys/ddb/db_command.c
@@ -140,6 +140,7 @@ static struct command db_cmds[] = {
{ "unscript", db_unscript_cmd, CS_OWN, 0 },
{ "capture", db_capture_cmd, CS_OWN, 0 },
{ "textdump", db_textdump_cmd, CS_OWN, 0 },
+ { "findstack", db_findstack_cmd, 0, 0 },
};
struct command_table db_cmd_table = LIST_HEAD_INITIALIZER(db_cmd_table);
diff --git a/sys/ddb/db_input.c b/sys/ddb/db_input.c
index 39f2da7..171b3da 100644
--- a/sys/ddb/db_input.c
+++ b/sys/ddb/db_input.c
@@ -253,7 +253,7 @@ db_inputchar(c)
db_putnchars(BACKUP, db_lc - db_lbuf_start);
db_putnchars(BLANK, db_le - db_lbuf_start);
db_putnchars(BACKUP, db_le - db_lbuf_start);
- db_le = index(db_lbuf_start, '\0');
+ db_le = strchr(db_lbuf_start, '\0');
if (db_le[-1] == '\r' || db_le[-1] == '\n')
*--db_le = '\0';
db_lc = db_le;
diff --git a/sys/ddb/db_ps.c b/sys/ddb/db_ps.c
index 0c45183..81e141e 100644
--- a/sys/ddb/db_ps.c
+++ b/sys/ddb/db_ps.c
@@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$");
#include <sys/proc.h>
#include <sys/sysent.h>
#include <sys/systm.h>
+#include <sys/_kstack_cache.h>
#include <vm/vm.h>
#include <vm/vm_param.h>
#include <vm/pmap.h>
@@ -429,3 +430,39 @@ DB_SHOW_COMMAND(proc, db_show_proc)
break;
}
}
+
+void
+db_findstack_cmd(db_expr_t addr, boolean_t have_addr,
+ db_expr_t dummy3 __unused, char *dummy4 __unused)
+{
+ struct proc *p;
+ struct thread *td;
+ struct kstack_cache_entry *ks_ce;
+ vm_offset_t saddr;
+
+ if (have_addr)
+ saddr = addr;
+ else {
+ db_printf("Usage: findstack <address>\n");
+ return;
+ }
+
+ FOREACH_PROC_IN_SYSTEM(p) {
+ FOREACH_THREAD_IN_PROC(p, td) {
+ if (td->td_kstack <= saddr && saddr < td->td_kstack +
+ PAGE_SIZE * td->td_kstack_pages) {
+ db_printf("Thread %p\n", td);
+ return;
+ }
+ }
+ }
+
+ for (ks_ce = kstack_cache; ks_ce != NULL;
+ ks_ce = ks_ce->next_ks_entry) {
+ if ((vm_offset_t)ks_ce <= saddr && saddr < (vm_offset_t)ks_ce +
+ PAGE_SIZE * KSTACK_PAGES) {
+ db_printf("Cached stack %p\n", ks_ce);
+ return;
+ }
+ }
+}
diff --git a/sys/ddb/db_thread.c b/sys/ddb/db_thread.c
index 43ed4f6..f6712a0 100644
--- a/sys/ddb/db_thread.c
+++ b/sys/ddb/db_thread.c
@@ -94,7 +94,8 @@ db_show_threads(db_expr_t addr, boolean_t hasaddr, db_expr_t cnt, char *mod)
thr = kdb_thr_first();
while (!db_pager_quit && thr != NULL) {
- db_printf(" %6ld (%p) ", (long)thr->td_tid, thr);
+ db_printf(" %6ld (%p) (stack %p) ", (long)thr->td_tid, thr,
+ (void *)thr->td_kstack);
prev_jb = kdb_jmpbuf(jb);
if (setjmp(jb) == 0) {
if (db_trace_thread(thr, 1) != 0)
diff --git a/sys/ddb/ddb.h b/sys/ddb/ddb.h
index 9b240b6..93bf713 100644
--- a/sys/ddb/ddb.h
+++ b/sys/ddb/ddb.h
@@ -226,6 +226,7 @@ db_cmdfcn_t db_delete_cmd;
db_cmdfcn_t db_deletehwatch_cmd;
db_cmdfcn_t db_deletewatch_cmd;
db_cmdfcn_t db_examine_cmd;
+db_cmdfcn_t db_findstack_cmd;
db_cmdfcn_t db_hwatchpoint_cmd;
db_cmdfcn_t db_listbreak_cmd;
db_cmdfcn_t db_scripts_cmd;
diff --git a/sys/dev/acpica/acpi_pcib_acpi.c b/sys/dev/acpica/acpi_pcib_acpi.c
index d0aff3b..9770f51 100644
--- a/sys/dev/acpica/acpi_pcib_acpi.c
+++ b/sys/dev/acpica/acpi_pcib_acpi.c
@@ -511,8 +511,17 @@ acpi_pcib_acpi_alloc_resource(device_t dev, device_t child, int type, int *rid,
sc = device_get_softc(dev);
res = pcib_host_res_alloc(&sc->ap_host_res, child, type, rid, start, end,
count, flags);
+
+ /*
+ * XXX: If this is a request for a specific range, assume it is
+ * correct and pass it up to the parent. What we probably want to
+ * do long-term is explicitly trust any firmware-configured
+ * resources during the initial bus scan on boot and then disable
+ * this after that.
+ */
if (res == NULL && start + count - 1 == end)
- res = acpi_alloc_sysres(child, type, rid, start, end, count, flags);
+ res = bus_generic_alloc_resource(dev, child, type, rid, start, end,
+ count, flags);
return (res);
#else
return (bus_generic_alloc_resource(dev, child, type, rid, start, end,
diff --git a/sys/dev/ahci/ahci.c b/sys/dev/ahci/ahci.c
index df4f66a..d26cdbb 100644
--- a/sys/dev/ahci/ahci.c
+++ b/sys/dev/ahci/ahci.c
@@ -171,6 +171,7 @@ static struct {
{0x1d028086, 0x00, "Intel Patsburg", 0},
{0x1d048086, 0x00, "Intel Patsburg", 0},
{0x1d068086, 0x00, "Intel Patsburg", 0},
+ {0x28268086, 0x00, "Intel Patsburg (RAID)", 0},
{0x1e028086, 0x00, "Intel Panther Point", 0},
{0x1e038086, 0x00, "Intel Panther Point", 0},
{0x1e048086, 0x00, "Intel Panther Point", 0},
diff --git a/sys/dev/ahci/ahci.h b/sys/dev/ahci/ahci.h
index 559c67a..ecce136 100644
--- a/sys/dev/ahci/ahci.h
+++ b/sys/dev/ahci/ahci.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* Copyright (c) 2009 Alexander Motin <mav@FreeBSD.org>
* All rights reserved.
*
diff --git a/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l b/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l
index ac14c12..03fb6b4 100644
--- a/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l
+++ b/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l
@@ -66,6 +66,8 @@ static char msgbuf[255];
extern int mmlex(void);
%}
+%option noinput
+
WORD [A-Za-z_][-A-Za-z_0-9]*
SPACE [ \t]+
MCARG [^(), \t]+
diff --git a/sys/dev/aic7xxx/aicasm/aicasm_scan.l b/sys/dev/aic7xxx/aicasm/aicasm_scan.l
index acc74a4..45da98f 100644
--- a/sys/dev/aic7xxx/aicasm/aicasm_scan.l
+++ b/sys/dev/aic7xxx/aicasm/aicasm_scan.l
@@ -72,6 +72,8 @@ extern void mm_switch_to_buffer(YY_BUFFER_STATE);
extern void mm_delete_buffer(YY_BUFFER_STATE);
%}
+%option noinput
+
PATH ([/]*[-A-Za-z0-9_.])+
WORD [A-Za-z_][-A-Za-z_0-9]*
SPACE [ \t]+
diff --git a/sys/dev/an/if_an.c b/sys/dev/an/if_an.c
index f52f292..5d90850 100644
--- a/sys/dev/an/if_an.c
+++ b/sys/dev/an/if_an.c
@@ -761,7 +761,6 @@ an_attach(struct an_softc *sc, int flags)
ifp->if_softc = sc;
if_initname(ifp, device_get_name(sc->an_dev),
device_get_unit(sc->an_dev));
- ifp->if_mtu = ETHERMTU;
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
ifp->if_ioctl = an_ioctl;
ifp->if_start = an_start;
@@ -797,7 +796,7 @@ an_attach(struct an_softc *sc, int flags)
ADD(IFM_AUTO, IFM_IEEE80211_ADHOC);
for (i = 0; i < nrate; i++) {
r = sc->an_caps.an_rates[i];
- mword = ieee80211_rate2media(NULL, r, IEEE80211_T_DS);
+ mword = ieee80211_rate2media(NULL, r, IEEE80211_MODE_AUTO);
if (mword == 0)
continue;
printf("%s%d%sMbps", (i != 0 ? " " : ""),
@@ -3299,7 +3298,7 @@ an_media_status(struct ifnet *ifp, struct ifmediareq *imr)
if (sc->an_config.an_opmode == AN_OPMODE_IBSS_ADHOC)
imr->ifm_active |= IFM_IEEE80211_ADHOC;
imr->ifm_active |= ieee80211_rate2media(NULL,
- status.an_current_tx_rate, IEEE80211_T_DS);
+ status.an_current_tx_rate, IEEE80211_MODE_AUTO);
imr->ifm_status = IFM_AVALID;
if (status.an_opmode & AN_STATUS_OPMODE_ASSOCIATED)
imr->ifm_status |= IFM_ACTIVE;
diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c
index 1e577b6..87072ad 100644
--- a/sys/dev/ata/ata-all.c
+++ b/sys/dev/ata/ata-all.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/ata-all.h b/sys/dev/ata/ata-all.h
index 8df57f1..25286bc 100644
--- a/sys/dev/ata/ata-all.h
+++ b/sys/dev/ata/ata-all.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/ata-card.c b/sys/dev/ata/ata-card.c
index 7286d4e..115e927 100644
--- a/sys/dev/ata/ata-card.c
+++ b/sys/dev/ata/ata-card.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/ata-cbus.c b/sys/dev/ata/ata-cbus.c
index 916be0d..eb932ba 100644
--- a/sys/dev/ata/ata-cbus.c
+++ b/sys/dev/ata/ata-cbus.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2002 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 2002 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/ata-disk.c b/sys/dev/ata/ata-disk.c
index a45221a..f5da174 100644
--- a/sys/dev/ata/ata-disk.c
+++ b/sys/dev/ata/ata-disk.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -532,8 +532,8 @@ ad_describe(device_t dev)
u_int8_t *marker, vendor[64], product[64];
/* try to separate the ATA model string into vendor and model parts */
- if ((marker = index(atadev->param.model, ' ')) ||
- (marker = index(atadev->param.model, '-'))) {
+ if ((marker = strchr(atadev->param.model, ' ')) ||
+ (marker = strchr(atadev->param.model, '-'))) {
int len = (marker - atadev->param.model);
strncpy(vendor, atadev->param.model, len);
diff --git a/sys/dev/ata/ata-disk.h b/sys/dev/ata/ata-disk.h
index 3a091b4..2d3be80 100644
--- a/sys/dev/ata/ata-disk.h
+++ b/sys/dev/ata/ata-disk.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/ata-dma.c b/sys/dev/ata/ata-dma.c
index 46ec735..ffd2461 100644
--- a/sys/dev/ata/ata-dma.c
+++ b/sys/dev/ata/ata-dma.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/ata-isa.c b/sys/dev/ata/ata-isa.c
index c7d7d0d..0900281 100644
--- a/sys/dev/ata/ata-isa.c
+++ b/sys/dev/ata/ata-isa.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/ata-lowlevel.c b/sys/dev/ata/ata-lowlevel.c
index 81cc87b..42dbf87 100644
--- a/sys/dev/ata/ata-lowlevel.c
+++ b/sys/dev/ata/ata-lowlevel.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/ata-pci.c b/sys/dev/ata/ata-pci.c
index f838d79..73f051b 100644
--- a/sys/dev/ata/ata-pci.c
+++ b/sys/dev/ata/ata-pci.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/ata-pci.h b/sys/dev/ata/ata-pci.h
index 2aa2065..e90ee23 100644
--- a/sys/dev/ata/ata-pci.h
+++ b/sys/dev/ata/ata-pci.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2003 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 2003 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -193,6 +193,10 @@ struct ata_pci_controller {
#define ATA_I82801IB_AH4 0x29238086
#define ATA_I82801IB_R1 0x29258086
#define ATA_I82801IB_S2 0x29268086
+#define ATA_I82801IBM_S1 0x29288086
+#define ATA_I82801IBM_AH 0x29298086
+#define ATA_I82801IBM_R1 0x292a8086
+#define ATA_I82801IBM_S2 0x292d8086
#define ATA_I82801JIB_S1 0x3a208086
#define ATA_I82801JIB_AH 0x3a228086
#define ATA_I82801JIB_R1 0x3a258086
@@ -232,6 +236,7 @@ struct ata_pci_controller {
#define ATA_PBG_AH1 0x1d028086
#define ATA_PBG_R1 0x1d048086
#define ATA_PBG_R2 0x1d068086
+#define ATA_PBG_R3 0x28268086
#define ATA_PBG_S2 0x1d088086
#define ATA_PPT_S1 0x1e008086
diff --git a/sys/dev/ata/ata-queue.c b/sys/dev/ata/ata-queue.c
index 4aef471..27fbf7f 100644
--- a/sys/dev/ata/ata-queue.c
+++ b/sys/dev/ata/ata-queue.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/ata-raid.c b/sys/dev/ata/ata-raid.c
index 9833678..0958ebf 100644
--- a/sys/dev/ata/ata-raid.c
+++ b/sys/dev/ata/ata-raid.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2000 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 2000 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -595,11 +595,11 @@ ata_raid_strategy(struct bio *bp)
}
if (bp->bio_cmd == BIO_WRITE) {
ata_raid_send_request(request);
- // sikre at læs-modify-skriv til hver disk er atomarisk.
+ // sikre at læs-modify-skriv til hver disk er atomarisk.
// par kopi af request
- // læse orgdata fra drv
+ // læse orgdata fra drv
// skriv nydata til drv
- // læse parorgdata fra par
+ // læse parorgdata fra par
// skriv orgdata xor parorgdata xor nydata til par
}
}
diff --git a/sys/dev/ata/ata-raid.h b/sys/dev/ata/ata-raid.h
index b0aa52b..61f8a6f 100644
--- a/sys/dev/ata/ata-raid.h
+++ b/sys/dev/ata/ata-raid.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2000 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 2000 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/ata-sata.c b/sys/dev/ata/ata-sata.c
index 1ddf238..465e4b2 100644
--- a/sys/dev/ata/ata-sata.c
+++ b/sys/dev/ata/ata-sata.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/ata_if.m b/sys/dev/ata/ata_if.m
index 4b9fea3..5894c8c 100644
--- a/sys/dev/ata/ata_if.m
+++ b/sys/dev/ata/ata_if.m
@@ -1,4 +1,4 @@
-# Copyright (c) 2004 - 2008 Søren Schmidt <sos@FreeBSD.org>
+# Copyright (c) 2004 - 2008 Søren Schmidt <sos@FreeBSD.org>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/atapi-cam.c b/sys/dev/ata/atapi-cam.c
index bce8625..25a579d 100644
--- a/sys/dev/ata/atapi-cam.c
+++ b/sys/dev/ata/atapi-cam.c
@@ -576,9 +576,10 @@ atapi_action(struct cam_sim *sim, union ccb *ccb)
struct scsi_inquiry *inq = (struct scsi_inquiry *) &request->u.atapi.ccb[0];
if (inq->byte2 == 0 && inq->page_code == 0 &&
- inq->length > SHORT_INQUIRY_LENGTH) {
+ scsi_2btoul(inq->length) > SHORT_INQUIRY_LENGTH) {
bzero(buf, len);
- len = inq->length = SHORT_INQUIRY_LENGTH;
+ len = SHORT_INQUIRY_LENGTH;
+ scsi_ulto2b(len, inq->length);
}
break;
}
diff --git a/sys/dev/ata/atapi-cd.c b/sys/dev/ata/atapi-cd.c
index 7e470ea..e67761e 100644
--- a/sys/dev/ata/atapi-cd.c
+++ b/sys/dev/ata/atapi-cd.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/atapi-cd.h b/sys/dev/ata/atapi-cd.h
index 74ce82e..33713aa 100644
--- a/sys/dev/ata/atapi-cd.h
+++ b/sys/dev/ata/atapi-cd.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/atapi-fd.c b/sys/dev/ata/atapi-fd.c
index 5572d1c..4238f20 100644
--- a/sys/dev/ata/atapi-fd.c
+++ b/sys/dev/ata/atapi-fd.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/atapi-fd.h b/sys/dev/ata/atapi-fd.h
index e44ad66..5645698 100644
--- a/sys/dev/ata/atapi-fd.h
+++ b/sys/dev/ata/atapi-fd.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/atapi-tape.c b/sys/dev/ata/atapi-tape.c
index b6ca4ad..90a7d74 100644
--- a/sys/dev/ata/atapi-tape.c
+++ b/sys/dev/ata/atapi-tape.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/atapi-tape.h b/sys/dev/ata/atapi-tape.h
index 0d4dedf..d1448c9 100644
--- a/sys/dev/ata/atapi-tape.h
+++ b/sys/dev/ata/atapi-tape.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/chipsets/ata-acard.c b/sys/dev/ata/chipsets/ata-acard.c
index 761ec54..06ca004 100644
--- a/sys/dev/ata/chipsets/ata-acard.c
+++ b/sys/dev/ata/chipsets/ata-acard.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/chipsets/ata-acerlabs.c b/sys/dev/ata/chipsets/ata-acerlabs.c
index 9d528da..dfcc3cf 100644
--- a/sys/dev/ata/chipsets/ata-acerlabs.c
+++ b/sys/dev/ata/chipsets/ata-acerlabs.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/chipsets/ata-adaptec.c b/sys/dev/ata/chipsets/ata-adaptec.c
index 26c11f2..2781a31 100644
--- a/sys/dev/ata/chipsets/ata-adaptec.c
+++ b/sys/dev/ata/chipsets/ata-adaptec.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/chipsets/ata-ahci.c b/sys/dev/ata/chipsets/ata-ahci.c
index 4ba1f48..a22898f 100644
--- a/sys/dev/ata/chipsets/ata-ahci.c
+++ b/sys/dev/ata/chipsets/ata-ahci.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/chipsets/ata-amd.c b/sys/dev/ata/chipsets/ata-amd.c
index e7038a3..c79fd6a 100644
--- a/sys/dev/ata/chipsets/ata-amd.c
+++ b/sys/dev/ata/chipsets/ata-amd.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/chipsets/ata-ati.c b/sys/dev/ata/chipsets/ata-ati.c
index ada70d7..f8cb03f 100644
--- a/sys/dev/ata/chipsets/ata-ati.c
+++ b/sys/dev/ata/chipsets/ata-ati.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/chipsets/ata-cenatek.c b/sys/dev/ata/chipsets/ata-cenatek.c
index cc54d2b..0bd6616 100644
--- a/sys/dev/ata/chipsets/ata-cenatek.c
+++ b/sys/dev/ata/chipsets/ata-cenatek.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/chipsets/ata-cypress.c b/sys/dev/ata/chipsets/ata-cypress.c
index e4c1a93..19c25eb 100644
--- a/sys/dev/ata/chipsets/ata-cypress.c
+++ b/sys/dev/ata/chipsets/ata-cypress.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/chipsets/ata-cyrix.c b/sys/dev/ata/chipsets/ata-cyrix.c
index f40f6f1..384d887 100644
--- a/sys/dev/ata/chipsets/ata-cyrix.c
+++ b/sys/dev/ata/chipsets/ata-cyrix.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/chipsets/ata-highpoint.c b/sys/dev/ata/chipsets/ata-highpoint.c
index 365128f..0597ce1 100644
--- a/sys/dev/ata/chipsets/ata-highpoint.c
+++ b/sys/dev/ata/chipsets/ata-highpoint.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/chipsets/ata-intel.c b/sys/dev/ata/chipsets/ata-intel.c
index c5c22cb..20ea492 100644
--- a/sys/dev/ata/chipsets/ata-intel.c
+++ b/sys/dev/ata/chipsets/ata-intel.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -157,6 +157,10 @@ ata_intel_probe(device_t dev)
{ ATA_I82801IB_AH4, 0, INTEL_AHCI, 0, ATA_SA300, "ICH9" },
{ ATA_I82801IB_AH6, 0, INTEL_AHCI, 0, ATA_SA300, "ICH9" },
{ ATA_I82801IB_R1, 0, INTEL_AHCI, 0, ATA_SA300, "ICH9" },
+ { ATA_I82801IBM_S1, 0, INTEL_6CH2, 0, ATA_SA300, "ICH9M" },
+ { ATA_I82801IBM_AH, 0, INTEL_AHCI, 0, ATA_SA300, "ICH9M" },
+ { ATA_I82801IBM_R1, 0, INTEL_AHCI, 0, ATA_SA300, "ICH9M" },
+ { ATA_I82801IBM_S2, 0, INTEL_6CH2, 0, ATA_SA300, "ICH9M" },
{ ATA_I82801JIB_S1, 0, INTEL_6CH, 0, ATA_SA300, "ICH10" },
{ ATA_I82801JIB_AH, 0, INTEL_AHCI, 0, ATA_SA300, "ICH10" },
{ ATA_I82801JIB_R1, 0, INTEL_AHCI, 0, ATA_SA300, "ICH10" },
@@ -193,6 +197,7 @@ ata_intel_probe(device_t dev)
{ ATA_PBG_AH1, 0, INTEL_AHCI, 0, ATA_SA300, "Patsburg" },
{ ATA_PBG_R1, 0, INTEL_AHCI, 0, ATA_SA300, "Patsburg" },
{ ATA_PBG_R2, 0, INTEL_AHCI, 0, ATA_SA300, "Patsburg" },
+ { ATA_PBG_R3, 0, INTEL_AHCI, 0, ATA_SA300, "Patsburg" },
{ ATA_PBG_S2, 0, INTEL_6CH2, 0, ATA_SA300, "Patsburg" },
{ ATA_PPT_S1, 0, INTEL_6CH, 0, ATA_SA300, "Panther Point" },
{ ATA_PPT_S2, 0, INTEL_6CH, 0, ATA_SA300, "Panther Point" },
diff --git a/sys/dev/ata/chipsets/ata-ite.c b/sys/dev/ata/chipsets/ata-ite.c
index c1cfe9a..8b6cb76 100644
--- a/sys/dev/ata/chipsets/ata-ite.c
+++ b/sys/dev/ata/chipsets/ata-ite.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/chipsets/ata-jmicron.c b/sys/dev/ata/chipsets/ata-jmicron.c
index 8d2124f..dc1aa8e 100644
--- a/sys/dev/ata/chipsets/ata-jmicron.c
+++ b/sys/dev/ata/chipsets/ata-jmicron.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/chipsets/ata-marvell.c b/sys/dev/ata/chipsets/ata-marvell.c
index 7fcf3c1..f45c927 100644
--- a/sys/dev/ata/chipsets/ata-marvell.c
+++ b/sys/dev/ata/chipsets/ata-marvell.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/chipsets/ata-micron.c b/sys/dev/ata/chipsets/ata-micron.c
index 2b74a33..985970d 100644
--- a/sys/dev/ata/chipsets/ata-micron.c
+++ b/sys/dev/ata/chipsets/ata-micron.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/chipsets/ata-national.c b/sys/dev/ata/chipsets/ata-national.c
index 0131f99..0b3977a 100644
--- a/sys/dev/ata/chipsets/ata-national.c
+++ b/sys/dev/ata/chipsets/ata-national.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/chipsets/ata-netcell.c b/sys/dev/ata/chipsets/ata-netcell.c
index 8e5a9cb..f612872 100644
--- a/sys/dev/ata/chipsets/ata-netcell.c
+++ b/sys/dev/ata/chipsets/ata-netcell.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/chipsets/ata-nvidia.c b/sys/dev/ata/chipsets/ata-nvidia.c
index 580dfca..f19d4f8 100644
--- a/sys/dev/ata/chipsets/ata-nvidia.c
+++ b/sys/dev/ata/chipsets/ata-nvidia.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/chipsets/ata-promise.c b/sys/dev/ata/chipsets/ata-promise.c
index 6f2f57c..1b2d269 100644
--- a/sys/dev/ata/chipsets/ata-promise.c
+++ b/sys/dev/ata/chipsets/ata-promise.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/chipsets/ata-serverworks.c b/sys/dev/ata/chipsets/ata-serverworks.c
index 2240d4d..785d96d 100644
--- a/sys/dev/ata/chipsets/ata-serverworks.c
+++ b/sys/dev/ata/chipsets/ata-serverworks.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/chipsets/ata-siliconimage.c b/sys/dev/ata/chipsets/ata-siliconimage.c
index 52eae96..4ec9a5b 100644
--- a/sys/dev/ata/chipsets/ata-siliconimage.c
+++ b/sys/dev/ata/chipsets/ata-siliconimage.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/chipsets/ata-sis.c b/sys/dev/ata/chipsets/ata-sis.c
index 939f77d..14d2042 100644
--- a/sys/dev/ata/chipsets/ata-sis.c
+++ b/sys/dev/ata/chipsets/ata-sis.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ata/chipsets/ata-via.c b/sys/dev/ata/chipsets/ata-via.c
index 0bfc30a..f83f2a8 100644
--- a/sys/dev/ata/chipsets/ata-via.c
+++ b/sys/dev/ata/chipsets/ata-via.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ath/ath_hal/ah.c b/sys/dev/ath/ath_hal/ah.c
index 3af16aa..5a8046d 100644
--- a/sys/dev/ath/ath_hal/ah.c
+++ b/sys/dev/ath/ath_hal/ah.c
@@ -1266,3 +1266,27 @@ ath_hal_getcca(struct ath_hal *ah)
return 1;
return ((diag & 0x500000) == 0);
}
+
+/*
+ * This routine is only needed when supporting EEPROM-in-RAM setups
+ * (eg embedded SoCs and on-board PCI/PCIe devices.)
+ */
+/* NB: This is in 16 bit words; not bytes */
+/* XXX This doesn't belong here! */
+#define ATH_DATA_EEPROM_SIZE 2048
+
+HAL_BOOL
+ath_hal_EepromDataRead(struct ath_hal *ah, u_int off, uint16_t *data)
+{
+ if (ah->ah_eepromdata == AH_NULL) {
+ HALDEBUG(ah, HAL_DEBUG_ANY, "%s: no eeprom data!\n", __func__);
+ return AH_FALSE;
+ }
+ if (off > ATH_DATA_EEPROM_SIZE) {
+ HALDEBUG(ah, HAL_DEBUG_ANY, "%s: offset %x > %x\n",
+ __func__, off, ATH_DATA_EEPROM_SIZE);
+ return AH_FALSE;
+ }
+ (*data) = ah->ah_eepromdata[off];
+ return AH_TRUE;
+}
diff --git a/sys/dev/ath/ath_hal/ah.h b/sys/dev/ath/ath_hal/ah.h
index b195d02..5c373f0 100644
--- a/sys/dev/ath/ath_hal/ah.h
+++ b/sys/dev/ath/ath_hal/ah.h
@@ -1169,4 +1169,10 @@ void __ahdecl ath_hal_setcca(struct ath_hal *ah, int ena);
*/
int __ahdecl ath_hal_getcca(struct ath_hal *ah);
+/*
+ * Read EEPROM data from ah_eepromdata
+ */
+HAL_BOOL __ahdecl ath_hal_EepromDataRead(struct ath_hal *ah,
+ u_int off, uint16_t *data);
+
#endif /* _ATH_AH_H_ */
diff --git a/sys/dev/ath/ath_hal/ah_desc.h b/sys/dev/ath/ath_hal/ah_desc.h
index 2ef7b85..0fa9bf6 100644
--- a/sys/dev/ath/ath_hal/ah_desc.h
+++ b/sys/dev/ath/ath_hal/ah_desc.h
@@ -23,6 +23,19 @@
#include "opt_ah.h" /* NB: required for AH_SUPPORT_AR5416 */
/*
+ * For now, define this for the structure definitions.
+ * Because of how the HAL / driver module currently builds,
+ * it's not very feasible to build the module without
+ * this defined. The rest of the code (eg in the driver
+ * body) can work fine with these fields being uninitialised;
+ * they'll be initialised to 0 anyway.
+ */
+
+#ifndef AH_SUPPORT_AR5416
+#define AH_SUPPORT_AR5416 1
+#endif
+
+/*
* Transmit descriptor status. This structure is filled
* in only after the tx descriptor process method finds a
* ``done'' descriptor; at which point it returns something
diff --git a/sys/dev/ath/ath_hal/ah_internal.h b/sys/dev/ath/ath_hal/ah_internal.h
index a253b65..b34d925 100644
--- a/sys/dev/ath/ath_hal/ah_internal.h
+++ b/sys/dev/ath/ath_hal/ah_internal.h
@@ -30,6 +30,10 @@
#include <net80211/_ieee80211.h>
#include "opt_ah.h" /* needed for AH_SUPPORT_AR5416 */
+#ifndef AH_SUPPORT_AR5416
+#define AH_SUPPORT_AR5416 1
+#endif
+
#ifndef NBBY
#define NBBY 8 /* number of bits/byte */
#endif
diff --git a/sys/dev/ath/ath_hal/ar5210/ar5210reg.h b/sys/dev/ath/ath_hal/ar5210/ar5210reg.h
index 894d9bb..7382107 100644
--- a/sys/dev/ath/ath_hal/ar5210/ar5210reg.h
+++ b/sys/dev/ath/ath_hal/ar5210/ar5210reg.h
@@ -245,9 +245,20 @@
#define AR_SCR_SLDUR 0x0000ffff /* sleep duration */
#define AR_SCR_SLE 0x00030000 /* sleep enable */
#define AR_SCR_SLE_S 16
-#define AR_SCR_SLE_WAKE 0x00000000 /* force wake */
-#define AR_SCR_SLE_SLP 0x00010000 /* force sleep */
-#define AR_SCR_SLE_ALLOW 0x00020000 /* allow to control sleep */
+/*
+ * The previous values for the following three defines were:
+ *
+ * AR_SCR_SLE_WAKE 0x00000000
+ * AR_SCR_SLE_SLP 0x00010000
+ * AR_SCR_SLE_ALLOW 0x00020000
+ *
+ * However, these have been pre-shifted with AR_SCR_SLE_S. The
+ * OS_REG_READ() macro would attempt to shift them again, effectively
+ * shifting out any of the set bits completely.
+ */
+#define AR_SCR_SLE_WAKE 0 /* force wake */
+#define AR_SCR_SLE_SLP 1 /* force sleep */
+#define AR_SCR_SLE_ALLOW 2 /* allow to control sleep */
#define AR_SCR_BITS "\20\20SLE_SLP\21SLE_ALLOW"
#define AR_INTPEND_IP 0x00000001 /* interrupt pending */
diff --git a/sys/dev/ath/ath_hal/ar5211/ar5211reg.h b/sys/dev/ath/ath_hal/ar5211/ar5211reg.h
index 647f20d..93d4fc5 100644
--- a/sys/dev/ath/ath_hal/ar5211/ar5211reg.h
+++ b/sys/dev/ath/ath_hal/ar5211/ar5211reg.h
@@ -618,9 +618,20 @@
#define AR_SCR_SLDUR_S 0
#define AR_SCR_SLE 0x00030000 /* sleep enable mask */
#define AR_SCR_SLE_S 16 /* sleep enable bits shift */
-#define AR_SCR_SLE_WAKE 0x00000000 /* force wake */
-#define AR_SCR_SLE_SLP 0x00010000 /* force sleep */
-#define AR_SCR_SLE_NORM 0x00020000 /* sleep logic normal operation */
+/*
+ * The previous values for the following three defines were:
+ *
+ * AR_SCR_SLE_WAKE 0x00000000
+ * AR_SCR_SLE_SLP 0x00010000
+ * AR_SCR_SLE_NORM 0x00020000
+ *
+ * However, these have been pre-shifted with AR_SCR_SLE_S. The
+ * OS_REG_READ() macro would attempt to shift them again, effectively
+ * shifting out any of the set bits completely.
+ */
+#define AR_SCR_SLE_WAKE 0 /* force wake */
+#define AR_SCR_SLE_SLP 1 /* force sleep */
+#define AR_SCR_SLE_NORM 2 /* sleep logic normal operation */
#define AR_SCR_SLE_UNITS 0x00000008 /* SCR units/TU */
#define AR_SCR_BITS "\20\20SLE_SLP\21SLE"
diff --git a/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c b/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c
index 0ea42d0..7eceec3 100644
--- a/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c
+++ b/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c
@@ -574,7 +574,7 @@ ar5212SetDecompMask(struct ath_hal *ah, uint16_t keyidx, int en)
struct ath_hal_5212 *ahp = AH5212(ah);
if (keyidx >= HAL_DECOMP_MASK_SIZE)
- return HAL_EINVAL;
+ return AH_FALSE;
OS_REG_WRITE(ah, AR_DCM_A, keyidx);
OS_REG_WRITE(ah, AR_DCM_D, en ? AR_DCM_D_EN : 0);
ahp->ah_decompMask[keyidx] = en;
diff --git a/sys/dev/ath/ath_hal/ar5416/ar2133.c b/sys/dev/ath/ath_hal/ar5416/ar2133.c
index f25c108..779f0de 100644
--- a/sys/dev/ath/ath_hal/ar5416/ar2133.c
+++ b/sys/dev/ath/ath_hal/ar5416/ar2133.c
@@ -549,3 +549,11 @@ ar2133RfAttach(struct ath_hal *ah, HAL_STATUS *status)
return AH_TRUE;
}
+
+static HAL_BOOL
+ar2133Probe(struct ath_hal *ah)
+{
+ return (AR_SREV_OWL(ah) || AR_SREV_HOWL(ah) || AR_SREV_SOWL(ah));
+}
+
+AH_RF(RF2133, ar2133Probe, ar2133RfAttach);
diff --git a/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c b/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
index 37412fa..940b516 100644
--- a/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
+++ b/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
@@ -339,7 +339,7 @@ ar5416Attach(uint16_t devid, HAL_SOFTC sc,
OS_REG_WRITE(ah, AR_PHY(0), 0x00000007);
/* Read Radio Chip Rev Extract */
- AH_PRIVATE(ah)->ah_analog5GhzRev = ar5212GetRadioRev(ah);
+ AH_PRIVATE(ah)->ah_analog5GhzRev = ar5416GetRadioRev(ah);
switch (AH_PRIVATE(ah)->ah_analog5GhzRev & AR_RADIO_SREV_MAJOR) {
case AR_RAD5122_SREV_MAJOR: /* Fowl: 5G/2x2 */
case AR_RAD2122_SREV_MAJOR: /* Fowl: 2+5G/2x2 */
@@ -865,7 +865,7 @@ ar5416FillCapabilityInfo(struct ath_hal *ah)
;
pCap->halFastCCSupport = AH_TRUE;
- pCap->halNumGpioPins = 6;
+ pCap->halNumGpioPins = 14;
pCap->halWowSupport = AH_FALSE;
pCap->halWowMatchPatternExact = AH_FALSE;
pCap->halBtCoexSupport = AH_FALSE; /* XXX need support */
diff --git a/sys/dev/ath/ath_hal/ar5416/ar5416_gpio.c b/sys/dev/ath/ath_hal/ar5416/ar5416_gpio.c
index dc56d15..89334f5 100644
--- a/sys/dev/ath/ath_hal/ar5416/ar5416_gpio.c
+++ b/sys/dev/ath/ath_hal/ar5416/ar5416_gpio.c
@@ -35,7 +35,10 @@ static void
cfgOutputMux(struct ath_hal *ah, uint32_t gpio, uint32_t type)
{
int addr;
- uint32_t gpio_shift, reg;
+ uint32_t gpio_shift, tmp;
+
+ HALDEBUG(ah, HAL_DEBUG_GPIO, "%s: gpio=%d, type=%d\n",
+ __func__, gpio, type);
/* each MUX controls 6 GPIO pins */
if (gpio > 11)
@@ -61,12 +64,17 @@ cfgOutputMux(struct ath_hal *ah, uint32_t gpio, uint32_t type)
* will never be used. So it should be fine that bit 4 won't be
* able to recover.
*/
- reg = OS_REG_READ(ah, addr);
- if (addr == AR_GPIO_OUTPUT_MUX1 && !AR_SREV_MERLIN_20_OR_LATER(ah))
- reg = ((reg & 0x1F0) << 1) | (reg & ~0x1F0);
- reg &= ~(0x1f << gpio_shift);
- reg |= type << gpio_shift;
- OS_REG_WRITE(ah, addr, reg);
+ if (AR_SREV_MERLIN_20_OR_LATER(ah) ||
+ (addr != AR_GPIO_OUTPUT_MUX1)) {
+ OS_REG_RMW(ah, addr, (type << gpio_shift),
+ (0x1f << gpio_shift));
+ } else {
+ tmp = OS_REG_READ(ah, addr);
+ tmp = ((tmp & 0x1F0) << 1) | (tmp & ~0x1F0);
+ tmp &= ~(0x1f << gpio_shift);
+ tmp |= type << gpio_shift;
+ OS_REG_WRITE(ah, addr, tmp);
+ }
}
/*
@@ -79,12 +87,17 @@ ar5416GpioCfgOutput(struct ath_hal *ah, uint32_t gpio, HAL_GPIO_MUX_TYPE type)
HALASSERT(gpio < AH_PRIVATE(ah)->ah_caps.halNumGpioPins);
+ HALDEBUG(ah, HAL_DEBUG_GPIO,
+ "%s: gpio=%d, type=%d\n", __func__, gpio, type);
+
/* NB: type maps directly to hardware */
+ /* XXX this may not actually be the case, for anything but output */
cfgOutputMux(ah, gpio, type);
gpio_shift = gpio << 1; /* 2 bits per output mode */
reg = OS_REG_READ(ah, AR_GPIO_OE_OUT);
reg &= ~(AR_GPIO_OE_OUT_DRV << gpio_shift);
+ /* Always drive, rather than tristate/drive low/drive high */
reg |= AR_GPIO_OE_OUT_DRV_ALL << gpio_shift;
OS_REG_WRITE(ah, AR_GPIO_OE_OUT, reg);
@@ -101,6 +114,8 @@ ar5416GpioCfgInput(struct ath_hal *ah, uint32_t gpio)
HALASSERT(gpio < AH_PRIVATE(ah)->ah_caps.halNumGpioPins);
+ HALDEBUG(ah, HAL_DEBUG_GPIO, "%s: gpio=%d\n", __func__, gpio);
+
/* TODO: configure input mux for AR5416 */
/* If configured as input, set output to tristate */
gpio_shift = gpio << 1;
@@ -122,6 +137,8 @@ ar5416GpioSet(struct ath_hal *ah, uint32_t gpio, uint32_t val)
uint32_t reg;
HALASSERT(gpio < AH_PRIVATE(ah)->ah_caps.halNumGpioPins);
+ HALDEBUG(ah, HAL_DEBUG_GPIO,
+ "%s: gpio=%d, val=%d\n", __func__, gpio, val);
reg = OS_REG_READ(ah, AR_GPIO_IN_OUT);
if (val & 1)
@@ -146,6 +163,8 @@ ar5416GpioGet(struct ath_hal *ah, uint32_t gpio)
* Read output value for all gpio's, shift it,
* and verify whether the specific bit is set.
*/
+ if (AR_SREV_KIWI_10_OR_LATER(ah))
+ bits = MS(OS_REG_READ(ah, AR_GPIO_IN_OUT), AR9287_GPIO_IN_VAL);
if (AR_SREV_KITE_10_OR_LATER(ah))
bits = MS(OS_REG_READ(ah, AR_GPIO_IN_OUT), AR9285_GPIO_IN_VAL);
else if (AR_SREV_MERLIN_10_OR_LATER(ah))
@@ -165,6 +184,8 @@ ar5416GpioSetIntr(struct ath_hal *ah, u_int gpio, uint32_t ilevel)
uint32_t val, mask;
HALASSERT(gpio < AH_PRIVATE(ah)->ah_caps.halNumGpioPins);
+ HALDEBUG(ah, HAL_DEBUG_GPIO,
+ "%s: gpio=%d, ilevel=%d\n", __func__, gpio, ilevel);
if (ilevel == HAL_GPIO_INTR_DISABLE) {
val = MS(OS_REG_READ(ah, AR_INTR_ASYNC_ENABLE),
diff --git a/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c b/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c
index b1c1b98..4df10cd 100644
--- a/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c
+++ b/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c
@@ -73,21 +73,29 @@ ar5416SetLedState(struct ath_hal *ah, HAL_LED_STATE state)
AR_MAC_LED_ASSOC_NONE,
AR_MAC_LED_ASSOC_NONE,
};
- uint32_t bits;
if (AR_SREV_HOWL(ah))
return;
- bits = OS_REG_READ(ah, AR_MAC_LED);
- bits = (bits &~ AR_MAC_LED_MODE)
- | SM(AR_MAC_LED_MODE_POWON, AR_MAC_LED_MODE)
-#if 1
- | SM(AR_MAC_LED_MODE_NETON, AR_MAC_LED_MODE)
-#endif
- ;
- bits = (bits &~ AR_MAC_LED_ASSOC)
- | SM(ledbits[state & 0x7], AR_MAC_LED_ASSOC);
- OS_REG_WRITE(ah, AR_MAC_LED, bits);
+ /*
+ * Set the blink operating mode.
+ */
+ OS_REG_RMW_FIELD(ah, AR_MAC_LED,
+ AR_MAC_LED_ASSOC, ledbits[state & 0x7]);
+
+ /* XXX Blink slow mode? */
+ /* XXX Blink threshold? */
+ /* XXX Blink sleep hystersis? */
+
+ /*
+ * Set the LED blink configuration to be proportional
+ * to the current TX and RX filter bytes. (Ie, RX'ed
+ * frames that don't match the filter are ignored.)
+ * This means that higher TX/RX throughput will result
+ * in the blink rate increasing.
+ */
+ OS_REG_RMW_FIELD(ah, AR_MAC_LED, AR_MAC_LED_MODE,
+ AR_MAC_LED_MODE_PROP);
}
/*
@@ -161,7 +169,7 @@ ar5416SetAntennaSwitch(struct ath_hal *ah, HAL_ANT_SETTING settings)
HAL_BOOL
ar5416SetDecompMask(struct ath_hal *ah, uint16_t keyidx, int en)
{
- return HAL_OK;
+ return AH_TRUE;
}
/* Setup coverage class */
diff --git a/sys/dev/ath/ath_hal/ar5416/ar5416reg.h b/sys/dev/ath/ath_hal/ar5416/ar5416reg.h
index 6f92eb7..6b00664 100644
--- a/sys/dev/ath/ath_hal/ar5416/ar5416reg.h
+++ b/sys/dev/ath/ath_hal/ar5416/ar5416reg.h
@@ -203,9 +203,9 @@
#define AR_MAC_LED_MODE_POWON 5 /* Power LED on (s/w control) */
#define AR_MAC_LED_MODE_NETON 6 /* Network LED on (s/w control) */
#define AR_MAC_LED_ASSOC 0x00000c00
-#define AR_MAC_LED_ASSOC_NONE 0x00000000 /* STA is not associated or trying */
-#define AR_MAC_LED_ASSOC_ACTIVE 0x00000400 /* STA is associated */
-#define AR_MAC_LED_ASSOC_PEND 0x00000800 /* STA is trying to associate */
+#define AR_MAC_LED_ASSOC_NONE 0x0 /* STA is not associated or trying */
+#define AR_MAC_LED_ASSOC_ACTIVE 0x1 /* STA is associated */
+#define AR_MAC_LED_ASSOC_PEND 0x2 /* STA is trying to associate */
#define AR_MAC_LED_ASSOC_S 10
#define AR_WA_UNTIE_RESET_EN 0x00008000 /* ena PCI reset to POR */
@@ -504,6 +504,8 @@
#define AR928X_GPIO_IN_VAL_S 10
#define AR9285_GPIO_IN_VAL 0x00FFF000
#define AR9285_GPIO_IN_VAL_S 12
+#define AR9287_GPIO_IN_VAL 0x003FF800
+#define AR9287_GPIO_IN_VAL_S 11
#define AR_GPIO_OE_OUT_DRV 0x3 /* 2 bit mask shifted by 2*bitpos */
#define AR_GPIO_OE_OUT_DRV_NO 0x0 /* tristate */
diff --git a/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c b/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c
index e880d56..5a353e9 100644
--- a/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c
+++ b/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c
@@ -119,11 +119,11 @@ ar9130Attach(uint16_t devid, HAL_SOFTC sc,
/*
* Use the "local" EEPROM data given to us by the higher layers.
- * This is a private copy out of system flash. The Linux ath9k
- * commit for the initial AR9130 support mentions MMIO flash
- * access is "unreliable." -adrian
+ * This is a private copy out of system flash.
+ * By this stage the SoC SPI flash may have disabled the memory-
+ * mapping and rely purely on port-based SPI IO.
*/
- AH_PRIVATE((ah))->ah_eepromRead = ar9130EepromRead;
+ AH_PRIVATE((ah))->ah_eepromRead = ath_hal_EepromDataRead;
AH_PRIVATE((ah))->ah_eepromWrite = NULL;
ah->ah_eepromdata = eepromdata;
diff --git a/sys/dev/ath/ath_hal/ar9001/ar9130_eeprom.c b/sys/dev/ath/ath_hal/ar9001/ar9130_eeprom.c
index 465e173..81bd0fe 100644
--- a/sys/dev/ath/ath_hal/ar9001/ar9130_eeprom.c
+++ b/sys/dev/ath/ath_hal/ar9001/ar9130_eeprom.c
@@ -16,28 +16,3 @@
*
* $FreeBSD$
*/
-#include "opt_ah.h"
-
-#include "ah.h"
-#include "ah_internal.h"
-
-#include "ar9001/ar9130_eeprom.h"
-
-/* XXX this shouldn't be done here */
-/* This is in 16 bit words; not bytes -adrian */
-#define ATH_DATA_EEPROM_SIZE 2048
-
-HAL_BOOL
-ar9130EepromRead(struct ath_hal *ah, u_int off, uint16_t *data)
-{
- if (ah->ah_eepromdata == AH_NULL) {
- HALDEBUG(ah, HAL_DEBUG_ANY, "%s: no eeprom data!\n", __func__);
- return AH_FALSE;
- }
- if (off > ATH_DATA_EEPROM_SIZE) {
- HALDEBUG(ah, HAL_DEBUG_ANY, "ar9130EepromRead: offset %x > %x\n", off, ATH_DATA_EEPROM_SIZE);
- return AH_FALSE;
- }
- (*data) = ah->ah_eepromdata[off];
- return AH_TRUE;
-}
diff --git a/sys/dev/ath/ath_hal/ar9001/ar9130_eeprom.h b/sys/dev/ath/ath_hal/ar9001/ar9130_eeprom.h
index 54556f6..5d1013b 100644
--- a/sys/dev/ath/ath_hal/ar9001/ar9130_eeprom.h
+++ b/sys/dev/ath/ath_hal/ar9001/ar9130_eeprom.h
@@ -19,6 +19,4 @@
#ifndef __AR9130_EEPROM_H__
#define __AR9130_EEPROM_H__
-extern HAL_BOOL ar9130EepromRead(struct ath_hal *ah, u_int off, uint16_t *data);
-
#endif
diff --git a/sys/dev/ath/ath_hal/ar9002/ar9280.c b/sys/dev/ath/ath_hal/ar9002/ar9280.c
index 99fd1d7..cc622f8 100644
--- a/sys/dev/ath/ath_hal/ar9002/ar9280.c
+++ b/sys/dev/ath/ath_hal/ar9002/ar9280.c
@@ -384,3 +384,11 @@ ar9280RfAttach(struct ath_hal *ah, HAL_STATUS *status)
return AH_TRUE;
}
+
+static HAL_BOOL
+ar9280RfProbe(struct ath_hal *ah)
+{
+ return (AR_SREV_MERLIN(ah));
+}
+
+AH_RF(RF9280, ar9280RfProbe, ar9280RfAttach);
diff --git a/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c b/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c
index 437e8ee..f398361 100644
--- a/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c
+++ b/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c
@@ -169,6 +169,19 @@ ar9280Attach(uint16_t devid, HAL_SOFTC sc,
ar5416InitState(AH5416(ah), devid, sc, st, sh, status);
+
+ /*
+ * Use the "local" EEPROM data given to us by the higher layers.
+ * This is a private copy out of system flash. The Linux ath9k
+ * commit for the initial AR9130 support mentions MMIO flash
+ * access is "unreliable." -adrian
+ */
+ if (eepromdata != AH_NULL) {
+ AH_PRIVATE((ah))->ah_eepromRead = ath_hal_EepromDataRead;
+ AH_PRIVATE((ah))->ah_eepromWrite = NULL;
+ ah->ah_eepromdata = eepromdata;
+ }
+
/* XXX override with 9280 specific state */
/* override 5416 methods for our needs */
AH5416(ah)->ah_initPLL = ar9280InitPLL;
diff --git a/sys/dev/ath/ath_hal/ar9002/ar9285.c b/sys/dev/ath/ath_hal/ar9002/ar9285.c
index f1851cc..9e9f95c 100644
--- a/sys/dev/ath/ath_hal/ar9002/ar9285.c
+++ b/sys/dev/ath/ath_hal/ar9002/ar9285.c
@@ -77,3 +77,11 @@ ar9285RfAttach(struct ath_hal *ah, HAL_STATUS *status)
return AH_TRUE;
}
+
+static HAL_BOOL
+ar9285RfProbe(struct ath_hal *ah)
+{
+ return (AR_SREV_KITE(ah));
+}
+
+AH_RF(RF9285, ar9285RfProbe, ar9285RfAttach);
diff --git a/sys/dev/ath/ath_hal/ar9002/ar9287.c b/sys/dev/ath/ath_hal/ar9002/ar9287.c
index 9b874b3..724fb7c 100644
--- a/sys/dev/ath/ath_hal/ar9002/ar9287.c
+++ b/sys/dev/ath/ath_hal/ar9002/ar9287.c
@@ -390,3 +390,11 @@ ar9287RfAttach(struct ath_hal *ah, HAL_STATUS *status)
return AH_TRUE;
}
+
+static HAL_BOOL
+ar9287RfProbe(struct ath_hal *ah)
+{
+ return (AR_SREV_KIWI(ah));
+}
+
+AH_RF(RF9287, ar9287RfProbe, ar9287RfAttach);
diff --git a/sys/dev/ath/ath_hal/ar9002/ar9287.h b/sys/dev/ath/ath_hal/ar9002/ar9287.h
index 90d25ed..3122ea4 100644
--- a/sys/dev/ath/ath_hal/ar9002/ar9287.h
+++ b/sys/dev/ath/ath_hal/ar9002/ar9287.h
@@ -45,9 +45,7 @@ struct ath_hal_9287 {
#define AH9287(_ah) ((struct ath_hal_9287 *)(_ah))
#define AR9287_DEFAULT_RXCHAINMASK 3
-#define AR9285_DEFAULT_RXCHAINMASK 1
#define AR9287_DEFAULT_TXCHAINMASK 3
-#define AR9285_DEFAULT_TXCHAINMASK 1
#define AR_PHY_CCA_NOM_VAL_9287_2GHZ -112
#define AR_PHY_CCA_NOM_VAL_9287_5GHZ -112
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c
index 2f7cf79..48fb917 100644
--- a/sys/dev/ath/if_ath.c
+++ b/sys/dev/ath/if_ath.c
@@ -101,6 +101,7 @@ __FBSDID("$FreeBSD$");
#include <dev/ath/if_ath_misc.h>
#include <dev/ath/if_ath_tx.h>
#include <dev/ath/if_ath_sysctl.h>
+#include <dev/ath/if_ath_led.h>
#include <dev/ath/if_ath_keycache.h>
#include <dev/ath/if_athdfs.h>
@@ -128,9 +129,9 @@ __FBSDID("$FreeBSD$");
CTASSERT(ATH_BCBUF <= 8);
static struct ieee80211vap *ath_vap_create(struct ieee80211com *,
- const char name[IFNAMSIZ], int unit, int opmode,
- int flags, const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t mac[IEEE80211_ADDR_LEN]);
+ const char [IFNAMSIZ], int, enum ieee80211_opmode, int,
+ const uint8_t [IEEE80211_ADDR_LEN],
+ const uint8_t [IEEE80211_ADDR_LEN]);
static void ath_vap_delete(struct ieee80211vap *);
static void ath_init(void *);
static void ath_stop_locked(struct ifnet *);
@@ -204,7 +205,6 @@ static int ath_setregdomain(struct ieee80211com *,
static void ath_getradiocaps(struct ieee80211com *, int, int *,
struct ieee80211_channel []);
static int ath_getchannels(struct ath_softc *);
-static void ath_led_event(struct ath_softc *, int);
static int ath_rate_setup(struct ath_softc *, u_int mode);
static void ath_setcurmode(struct ath_softc *, enum ieee80211_phymode);
@@ -299,7 +299,8 @@ ath_attach(u_int16_t devid, struct ath_softc *sc)
if_initname(ifp, device_get_name(sc->sc_dev),
device_get_unit(sc->sc_dev));
- ah = ath_hal_attach(devid, sc, sc->sc_st, sc->sc_sh, sc->sc_eepromdata, &status);
+ ah = ath_hal_attach(devid, sc, sc->sc_st, sc->sc_sh,
+ sc->sc_eepromdata, &status);
if (ah == NULL) {
if_printf(ifp, "unable to attach hardware; HAL status %u\n",
status);
@@ -469,7 +470,8 @@ ath_attach(u_int16_t devid, struct ath_softc *sc)
/* Attach DFS module */
if (! ath_dfs_attach(sc)) {
- device_printf(sc->sc_dev, "%s: unable to attach DFS\n", __func__);
+ device_printf(sc->sc_dev,
+ "%s: unable to attach DFS\n", __func__);
error = EIO;
goto bad2;
}
@@ -477,22 +479,35 @@ ath_attach(u_int16_t devid, struct ath_softc *sc)
/* Start DFS processing tasklet */
TASK_INIT(&sc->sc_dfstask, 0, ath_dfs_tasklet, sc);
+ /* Configure LED state */
sc->sc_blinking = 0;
sc->sc_ledstate = 1;
sc->sc_ledon = 0; /* low true */
sc->sc_ledidle = (2700*hz)/1000; /* 2.7sec */
callout_init(&sc->sc_ledtimer, CALLOUT_MPSAFE);
+
+ /*
+ * Don't setup hardware-based blinking.
+ *
+ * Although some NICs may have this configured in the
+ * default reset register values, the user may wish
+ * to alter which pins have which function.
+ *
+ * The reference driver attaches the MAC network LED to GPIO1 and
+ * the MAC power LED to GPIO2. However, the DWA-552 cardbus
+ * NIC has these reversed.
+ */
+ sc->sc_hardled = (1 == 0);
+ sc->sc_led_net_pin = -1;
+ sc->sc_led_pwr_pin = -1;
/*
* Auto-enable soft led processing for IBM cards and for
* 5211 minipci cards. Users can also manually enable/disable
* support with a sysctl.
*/
sc->sc_softled = (devid == AR5212_DEVID_IBM || devid == AR5211_DEVID);
- if (sc->sc_softled) {
- ath_hal_gpioCfgOutput(ah, sc->sc_ledpin,
- HAL_GPIO_MUX_MAC_NETWORK_LED);
- ath_hal_gpioset(ah, sc->sc_ledpin, !sc->sc_ledon);
- }
+ ath_led_config(sc);
+ ath_hal_setledstate(ah, HAL_LED_INIT);
ifp->if_softc = sc;
ifp->if_flags = IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST;
@@ -521,7 +536,7 @@ ath_attach(u_int16_t devid, struct ath_softc *sc)
| IEEE80211_C_BGSCAN /* capable of bg scanning */
| IEEE80211_C_TXFRAG /* handle tx frags */
#ifdef ATH_ENABLE_DFS
- | IEEE80211_C_DFS /* Enable DFS radar detection */
+ | IEEE80211_C_DFS /* Enable radar detection */
#endif
;
/*
@@ -633,11 +648,12 @@ ath_attach(u_int16_t devid, struct ath_softc *sc)
int rxs, txs;
device_printf(sc->sc_dev, "[HT] enabling HT modes\n");
- ic->ic_htcaps = IEEE80211_HTC_HT /* HT operation */
- | IEEE80211_HTC_AMPDU /* A-MPDU tx/rx */
- | IEEE80211_HTC_AMSDU /* A-MSDU tx/rx */
- | IEEE80211_HTCAP_MAXAMSDU_3839 /* max A-MSDU length */
- | IEEE80211_HTCAP_SMPS_OFF; /* SM power save off */
+ ic->ic_htcaps = IEEE80211_HTC_HT /* HT operation */
+ | IEEE80211_HTC_AMPDU /* A-MPDU tx/rx */
+ | IEEE80211_HTC_AMSDU /* A-MSDU tx/rx */
+ | IEEE80211_HTCAP_MAXAMSDU_3839
+ /* max A-MSDU length */
+ | IEEE80211_HTCAP_SMPS_OFF; /* SM power save off */
;
/*
@@ -658,8 +674,8 @@ ath_attach(u_int16_t devid, struct ath_softc *sc)
| IEEE80211_HTCAP_SHORTGI40;
/*
- * rx/tx stream is not currently used anywhere; it needs to be taken
- * into account when negotiating which MCS rates it'll receive and
+ * TX/RX streams need to be taken into account when
+ * negotiating which MCS rates it'll receive and
* what MCS rates are available for TX.
*/
(void) ath_hal_getcapability(ah, HAL_CAP_STREAMS, 0, &rxs);
@@ -671,7 +687,8 @@ ath_attach(u_int16_t devid, struct ath_softc *sc)
ic->ic_txstream = txs;
ic->ic_rxstream = rxs;
- device_printf(sc->sc_dev, "[HT] %d RX streams; %d TX streams\n", rxs, txs);
+ device_printf(sc->sc_dev,
+ "[HT] %d RX streams; %d TX streams\n", rxs, txs);
}
#endif
@@ -683,7 +700,8 @@ ath_attach(u_int16_t devid, struct ath_softc *sc)
ath_hal_getcapability(ah, HAL_CAP_SERIALISE_WAR,
0, NULL) == HAL_OK) {
sc->sc_ah->ah_config.ah_serialise_reg_war = 1;
- device_printf(sc->sc_dev, "Enabling register serialisation\n");
+ device_printf(sc->sc_dev,
+ "Enabling register serialisation\n");
}
/*
@@ -885,16 +903,17 @@ assign_bslot(struct ath_softc *sc)
}
static struct ieee80211vap *
-ath_vap_create(struct ieee80211com *ic,
- const char name[IFNAMSIZ], int unit, int opmode, int flags,
- const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t mac0[IEEE80211_ADDR_LEN])
+ath_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit,
+ enum ieee80211_opmode opmode, int flags,
+ const uint8_t bssid[IEEE80211_ADDR_LEN],
+ const uint8_t mac0[IEEE80211_ADDR_LEN])
{
struct ath_softc *sc = ic->ic_ifp->if_softc;
struct ath_vap *avp;
struct ieee80211vap *vap;
uint8_t mac[IEEE80211_ADDR_LEN];
- int ic_opmode, needbeacon, error;
+ int needbeacon, error;
+ enum ieee80211_opmode ic_opmode;
avp = (struct ath_vap *) malloc(sizeof(struct ath_vap),
M_80211_VAP, M_WAITOK | M_ZERO);
@@ -1310,9 +1329,14 @@ ath_resume(struct ath_softc *sc)
/* Let DFS at it in case it's a DFS channel */
ath_dfs_radar_enable(sc, ic->ic_curchan);
+ /* Restore the LED configuration */
+ ath_led_config(sc);
+ ath_hal_setledstate(ah, HAL_LED_INIT);
+
if (sc->sc_resume_up) {
if (ic->ic_opmode == IEEE80211_M_STA) {
ath_init(sc);
+ ath_hal_setledstate(ah, HAL_LED_RUN);
/*
* Program the beacon registers using the last rx'd
* beacon frame and enable sync on the next beacon
@@ -1326,11 +1350,6 @@ ath_resume(struct ath_softc *sc)
} else
ieee80211_resume_all(ic);
}
- if (sc->sc_softled) {
- ath_hal_gpioCfgOutput(ah, sc->sc_ledpin,
- HAL_GPIO_MUX_MAC_NETWORK_LED);
- ath_hal_gpioset(ah, sc->sc_ledpin, !sc->sc_ledon);
- }
/* XXX beacons ? */
}
@@ -1897,6 +1916,70 @@ ath_txrx_start(struct ath_softc *sc)
taskqueue_unblock(sc->sc_tq);
}
+/*
+ * Grab the reset lock, and wait around until noone else
+ * is trying to do anything with it.
+ *
+ * This is totally horrible but we can't hold this lock for
+ * long enough to do TX/RX or we end up with net80211/ip stack
+ * LORs and eventual deadlock.
+ *
+ * "dowait" signals whether to spin, waiting for the reset
+ * lock count to reach 0. This should (for now) only be used
+ * during the reset path, as the rest of the code may not
+ * be locking-reentrant enough to behave correctly.
+ *
+ * Another, cleaner way should be found to serialise all of
+ * these operations.
+ */
+#define MAX_RESET_ITERATIONS 10
+static int
+ath_reset_grablock(struct ath_softc *sc, int dowait)
+{
+ int w = 0;
+ int i = MAX_RESET_ITERATIONS;
+
+ ATH_PCU_LOCK_ASSERT(sc);
+ do {
+ if (sc->sc_inreset_cnt == 0) {
+ w = 1;
+ break;
+ }
+ if (dowait == 0) {
+ w = 0;
+ break;
+ }
+ ATH_PCU_UNLOCK(sc);
+ pause("ath_reset_grablock", 1);
+ i--;
+ ATH_PCU_LOCK(sc);
+ } while (i > 0);
+
+ /*
+ * We always increment the refcounter, regardless
+ * of whether we succeeded to get it in an exclusive
+ * way.
+ */
+ sc->sc_inreset_cnt++;
+
+ if (i <= 0)
+ device_printf(sc->sc_dev,
+ "%s: didn't finish after %d iterations\n",
+ __func__, MAX_RESET_ITERATIONS);
+
+ if (w == 0)
+ device_printf(sc->sc_dev,
+ "%s: warning, recursive reset path!\n",
+ __func__);
+
+ return w;
+}
+#undef MAX_RESET_ITERATIONS
+
+/*
+ * XXX TODO: write ath_reset_releaselock
+ */
+
static void
ath_stop(struct ifnet *ifp)
{
@@ -1925,18 +2008,15 @@ ath_reset(struct ifnet *ifp, ATH_RESET_TYPE reset_type)
DPRINTF(sc, ATH_DEBUG_RESET, "%s: called\n", __func__);
- /* XXX ensure ATH_LOCK isn't held; ath_rx_proc can't be locked */
+ /* Ensure ATH_LOCK isn't held; ath_rx_proc can't be locked */
ATH_PCU_UNLOCK_ASSERT(sc);
ATH_UNLOCK_ASSERT(sc);
ATH_PCU_LOCK(sc);
- /* XXX if we're already inside a reset, print out a big warning */
- if (sc->sc_inreset_cnt > 0) {
- device_printf(sc->sc_dev,
- "%s: concurrent ath_reset()! Danger!\n",
+ if (ath_reset_grablock(sc, 1) == 0) {
+ device_printf(sc->sc_dev, "%s: concurrent reset! Danger!\n",
__func__);
}
- sc->sc_inreset_cnt++;
ath_hal_intrset(ah, 0); /* disable interrupts */
ATH_PCU_UNLOCK(sc);
@@ -2406,6 +2486,13 @@ ath_calcrxfilter(struct ath_softc *sc)
if (IEEE80211_IS_CHAN_HT(ic->ic_curchan))
rfilt |= HAL_RX_FILTER_COMPBAR;
+ /*
+ * Enable radar PHY errors if requested by the
+ * DFS module.
+ */
+ if (sc->sc_dodfs)
+ rfilt |= HAL_RX_FILTER_PHYRADAR;
+
DPRINTF(sc, ATH_DEBUG_MODE, "%s: RX filter 0x%x, %s if_flags 0x%x\n",
__func__, rfilt, ieee80211_opmode_name[ic->ic_opmode], ifp->if_flags);
return rfilt;
@@ -3961,6 +4048,7 @@ ath_rx_proc(struct ath_softc *sc, int resched)
npkts++;
/* These aren't specifically errors */
+#ifdef AH_SUPPORT_AR5416
if (rs->rs_flags & HAL_RX_GI)
sc->sc_stats.ast_rx_halfgi++;
if (rs->rs_flags & HAL_RX_2040)
@@ -3973,6 +4061,7 @@ ath_rx_proc(struct ath_softc *sc, int resched)
sc->sc_stats.ast_rx_decrypt_busy_err++;
if (rs->rs_flags & HAL_RX_HI_RX_CHAIN)
sc->sc_stats.ast_rx_hi_rx_chain++;
+#endif /* AH_SUPPORT_AR5416 */
if (rs->rs_status != 0) {
if (rs->rs_status & HAL_RXERR_CRC)
@@ -4110,6 +4199,35 @@ rx_accept:
m->m_pkthdr.len = len;
}
+ /*
+ * Validate rs->rs_antenna.
+ *
+ * Some users w/ AR9285 NICs have reported crashes
+ * here because rs_antenna field is bogusly large.
+ * Let's enforce the maximum antenna limit of 8
+ * (and it shouldn't be hard coded, but that's a
+ * separate problem) and if there's an issue, print
+ * out an error and adjust rs_antenna to something
+ * sensible.
+ *
+ * This code should be removed once the actual
+ * root cause of the issue has been identified.
+ * For example, it may be that the rs_antenna
+ * field is only valid for the lsat frame of
+ * an aggregate and it just happens that it is
+ * "mostly" right. (This is a general statement -
+ * the majority of the statistics are only valid
+ * for the last frame in an aggregate.
+ */
+ if (rs->rs_antenna > 7) {
+ device_printf(sc->sc_dev, "%s: rs_antenna > 7 (%d)\n",
+ __func__, rs->rs_antenna);
+#ifdef ATH_DEBUG
+ ath_printrxbuf(sc, bf, 0, status == HAL_OK);
+#endif /* ATH_DEBUG */
+ rs->rs_antenna = 0; /* XXX better than nothing */
+ }
+
ifp->if_ipackets++;
sc->sc_stats.ast_ant_rx[rs->rs_antenna]++;
@@ -4161,8 +4279,10 @@ rx_accept:
IEEE80211_KEYIX_NONE : rs->rs_keyix);
sc->sc_lastrs = rs;
+#ifdef AH_SUPPORT_AR5416
if (rs->rs_isaggr)
sc->sc_stats.ast_rx_agg++;
+#endif /* AH_SUPPORT_AR5416 */
if (ni != NULL) {
/*
@@ -5216,10 +5336,10 @@ ath_chan_set(struct ath_softc *sc, struct ieee80211_channel *chan)
/* Treat this as an interface reset */
ATH_PCU_LOCK(sc);
- if (sc->sc_inreset_cnt > 0)
- device_printf(sc->sc_dev, "%s: danger! concurrent reset!\n",
+ if (ath_reset_grablock(sc, 1) == 0) {
+ device_printf(sc->sc_dev, "%s: concurrent reset! Danger!\n",
__func__);
- sc->sc_inreset_cnt++;
+ }
if (chan != sc->sc_curchan) {
dointr = 1;
/* XXX only do this if inreset_cnt is 1? */
@@ -5856,49 +5976,6 @@ ath_getchannels(struct ath_softc *sc)
return 0;
}
-static void
-ath_led_done(void *arg)
-{
- struct ath_softc *sc = arg;
-
- sc->sc_blinking = 0;
-}
-
-/*
- * Turn the LED off: flip the pin and then set a timer so no
- * update will happen for the specified duration.
- */
-static void
-ath_led_off(void *arg)
-{
- struct ath_softc *sc = arg;
-
- ath_hal_gpioset(sc->sc_ah, sc->sc_ledpin, !sc->sc_ledon);
- callout_reset(&sc->sc_ledtimer, sc->sc_ledoff, ath_led_done, sc);
-}
-
-/*
- * Blink the LED according to the specified on/off times.
- */
-static void
-ath_led_blink(struct ath_softc *sc, int on, int off)
-{
- DPRINTF(sc, ATH_DEBUG_LED, "%s: on %u off %u\n", __func__, on, off);
- ath_hal_gpioset(sc->sc_ah, sc->sc_ledpin, sc->sc_ledon);
- sc->sc_blinking = 1;
- sc->sc_ledoff = off;
- callout_reset(&sc->sc_ledtimer, on, ath_led_off, sc);
-}
-
-static void
-ath_led_event(struct ath_softc *sc, int rix)
-{
- sc->sc_ledevent = ticks; /* time of last event */
- if (sc->sc_blinking) /* don't interrupt active blink */
- return;
- ath_led_blink(sc, sc->sc_hwmap[rix].ledon, sc->sc_hwmap[rix].ledoff);
-}
-
static int
ath_rate_setup(struct ath_softc *sc, u_int mode)
{
@@ -6218,6 +6295,8 @@ ath_announce(struct ath_softc *sc)
if_printf(ifp, "AR%s mac %d.%d RF%s phy %d.%d\n",
ath_hal_mac_name(ah), ah->ah_macVersion, ah->ah_macRev,
ath_hal_rf_name(ah), ah->ah_phyRev >> 4, ah->ah_phyRev & 0xf);
+ if_printf(ifp, "2GHz radio: 0x%.4x; 5GHz radio: 0x%.4x\n",
+ ah->ah_analog2GhzRev, ah->ah_analog5GhzRev);
if (bootverbose) {
int i;
for (i = 0; i <= WME_AC_VO; i++) {
diff --git a/sys/dev/ath/if_ath_led.c b/sys/dev/ath/if_ath_led.c
new file mode 100644
index 0000000..47ae3e1
--- /dev/null
+++ b/sys/dev/ath/if_ath_led.c
@@ -0,0 +1,190 @@
+/*-
+ * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
+ * redistribution must be conditioned upon including a substantially
+ * similar Disclaimer requirement for further binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+/*
+ * Driver for the Atheros Wireless LAN controller.
+ *
+ * This software is derived from work of Atsushi Onoe; his contribution
+ * is greatly appreciated.
+ */
+
+#include "opt_inet.h"
+#include "opt_ath.h"
+/*
+ * This is needed for register operations which are performed
+ * by the driver - eg, calls to ath_hal_gettsf32().
+ */
+#include "opt_ah.h"
+#include "opt_wlan.h"
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/sysctl.h>
+#include <sys/mbuf.h>
+#include <sys/malloc.h>
+#include <sys/lock.h>
+#include <sys/mutex.h>
+#include <sys/kernel.h>
+#include <sys/socket.h>
+#include <sys/sockio.h>
+#include <sys/errno.h>
+#include <sys/callout.h>
+#include <sys/bus.h>
+#include <sys/endian.h>
+#include <sys/kthread.h>
+#include <sys/taskqueue.h>
+#include <sys/priv.h>
+#include <sys/module.h>
+#include <sys/ktr.h>
+#include <sys/smp.h> /* for mp_ncpus */
+
+#include <machine/bus.h>
+
+#include <net/if.h>
+#include <net/if_dl.h>
+#include <net/if_media.h>
+#include <net/if_types.h>
+#include <net/if_arp.h>
+#include <net/ethernet.h>
+#include <net/if_llc.h>
+
+#include <net80211/ieee80211_var.h>
+#include <net80211/ieee80211_regdomain.h>
+#ifdef IEEE80211_SUPPORT_SUPERG
+#include <net80211/ieee80211_superg.h>
+#endif
+#ifdef IEEE80211_SUPPORT_TDMA
+#include <net80211/ieee80211_tdma.h>
+#endif
+
+#include <net/bpf.h>
+
+#ifdef INET
+#include <netinet/in.h>
+#include <netinet/if_ether.h>
+#endif
+
+#include <dev/ath/if_athvar.h>
+#include <dev/ath/ath_hal/ah_devid.h> /* XXX for softled */
+#include <dev/ath/ath_hal/ah_diagcodes.h>
+
+#include <dev/ath/if_ath_debug.h>
+#include <dev/ath/if_ath_misc.h>
+
+#include <dev/ath/if_ath_led.h>
+
+/*
+ * Software LED driver routines.
+ */
+
+/*
+ * XXX TODO: move the LED sysctls here.
+ */
+
+
+/*
+ * Configure the hardware for software and LED blinking.
+ * The user may choose to configure part of each, depending upon the
+ * NIC being used.
+ *
+ * This requires the configuration to be set before this function
+ * is called.
+ */
+void
+ath_led_config(struct ath_softc *sc)
+{
+ /* Software LED blinking - GPIO controlled LED */
+ if (sc->sc_softled) {
+ ath_hal_gpioCfgOutput(sc->sc_ah, sc->sc_ledpin,
+ HAL_GPIO_MUX_OUTPUT);
+ ath_hal_gpioset(sc->sc_ah, sc->sc_ledpin, !sc->sc_ledon);
+ }
+
+ /* Hardware LED blinking - MAC controlled LED */
+ if (sc->sc_hardled) {
+ /*
+ * Only enable each LED if required.
+ *
+ * Some NICs only have one LED connected; others may
+ * have GPIO1/GPIO2 connected to other hardware.
+ */
+ if (sc->sc_led_pwr_pin > 0)
+ ath_hal_gpioCfgOutput(sc->sc_ah, sc->sc_led_pwr_pin,
+ HAL_GPIO_MUX_MAC_POWER_LED);
+ if (sc->sc_led_net_pin > 0)
+ ath_hal_gpioCfgOutput(sc->sc_ah, sc->sc_led_net_pin,
+ HAL_GPIO_MUX_MAC_NETWORK_LED);
+ }
+}
+
+static void
+ath_led_done(void *arg)
+{
+ struct ath_softc *sc = arg;
+
+ sc->sc_blinking = 0;
+}
+
+/*
+ * Turn the LED off: flip the pin and then set a timer so no
+ * update will happen for the specified duration.
+ */
+static void
+ath_led_off(void *arg)
+{
+ struct ath_softc *sc = arg;
+
+ ath_hal_gpioset(sc->sc_ah, sc->sc_ledpin, !sc->sc_ledon);
+ callout_reset(&sc->sc_ledtimer, sc->sc_ledoff, ath_led_done, sc);
+}
+
+/*
+ * Blink the LED according to the specified on/off times.
+ */
+static void
+ath_led_blink(struct ath_softc *sc, int on, int off)
+{
+ DPRINTF(sc, ATH_DEBUG_LED, "%s: on %u off %u\n", __func__, on, off);
+ ath_hal_gpioset(sc->sc_ah, sc->sc_ledpin, sc->sc_ledon);
+ sc->sc_blinking = 1;
+ sc->sc_ledoff = off;
+ callout_reset(&sc->sc_ledtimer, on, ath_led_off, sc);
+}
+
+void
+ath_led_event(struct ath_softc *sc, int rix)
+{
+ sc->sc_ledevent = ticks; /* time of last event */
+ if (sc->sc_blinking) /* don't interrupt active blink */
+ return;
+ ath_led_blink(sc, sc->sc_hwmap[rix].ledon, sc->sc_hwmap[rix].ledoff);
+}
diff --git a/sys/dev/ath/if_ath_led.h b/sys/dev/ath/if_ath_led.h
new file mode 100644
index 0000000..54de4c4
--- /dev/null
+++ b/sys/dev/ath/if_ath_led.h
@@ -0,0 +1,37 @@
+/*-
+ * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
+ * redistribution must be conditioned upon including a substantially
+ * similar Disclaimer requirement for further binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $FreeBSD$
+ */
+#ifndef __IF_ATH_LED_H__
+#define __IF_ATH_LED_H__
+
+extern void ath_led_event(struct ath_softc *sc, int rix);
+extern void ath_led_config(struct ath_softc *sc);
+
+#endif
diff --git a/sys/dev/ath/if_ath_sysctl.c b/sys/dev/ath/if_ath_sysctl.c
index a609341..57781f5 100644
--- a/sys/dev/ath/if_ath_sysctl.c
+++ b/sys/dev/ath/if_ath_sysctl.c
@@ -90,6 +90,7 @@ __FBSDID("$FreeBSD$");
#include <dev/ath/ath_hal/ah_diagcodes.h>
#include <dev/ath/if_ath_debug.h>
+#include <dev/ath/if_ath_led.h>
#include <dev/ath/if_ath_misc.h>
#include <dev/ath/if_ath_tx.h>
#include <dev/ath/if_ath_sysctl.h>
@@ -151,10 +152,7 @@ ath_sysctl_softled(SYSCTL_HANDLER_ARGS)
if (softled != sc->sc_softled) {
if (softled) {
/* NB: handle any sc_ledpin change */
- ath_hal_gpioCfgOutput(sc->sc_ah, sc->sc_ledpin,
- HAL_GPIO_MUX_MAC_NETWORK_LED);
- ath_hal_gpioset(sc->sc_ah, sc->sc_ledpin,
- !sc->sc_ledon);
+ ath_led_config(sc);
}
sc->sc_softled = softled;
}
@@ -174,16 +172,34 @@ ath_sysctl_ledpin(SYSCTL_HANDLER_ARGS)
if (ledpin != sc->sc_ledpin) {
sc->sc_ledpin = ledpin;
if (sc->sc_softled) {
- ath_hal_gpioCfgOutput(sc->sc_ah, sc->sc_ledpin,
- HAL_GPIO_MUX_MAC_NETWORK_LED);
- ath_hal_gpioset(sc->sc_ah, sc->sc_ledpin,
- !sc->sc_ledon);
+ ath_led_config(sc);
}
}
return 0;
}
static int
+ath_sysctl_hardled(SYSCTL_HANDLER_ARGS)
+{
+ struct ath_softc *sc = arg1;
+ int hardled = sc->sc_hardled;
+ int error;
+
+ error = sysctl_handle_int(oidp, &hardled, 0, req);
+ if (error || !req->newptr)
+ return error;
+ hardled = (hardled != 0);
+ if (hardled != sc->sc_hardled) {
+ if (hardled) {
+ /* NB: handle any sc_ledpin change */
+ ath_led_config(sc);
+ }
+ sc->sc_hardled = hardled;
+ }
+ return 0;
+}
+
+static int
ath_sysctl_txantenna(SYSCTL_HANDLER_ARGS)
{
struct ath_softc *sc = arg1;
@@ -496,6 +512,7 @@ ath_sysctlattach(struct ath_softc *sc)
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
"ctstimeout", CTLTYPE_INT | CTLFLAG_RW, sc, 0,
ath_sysctl_ctstimeout, "I", "802.11 CTS timeout (us)");
+
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
"softled", CTLTYPE_INT | CTLFLAG_RW, sc, 0,
ath_sysctl_softled, "I", "enable/disable software LED support");
@@ -508,6 +525,18 @@ ath_sysctlattach(struct ath_softc *sc)
SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
"ledidle", CTLFLAG_RW, &sc->sc_ledidle, 0,
"idle time for inactivity LED (ticks)");
+
+ SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+ "hardled", CTLTYPE_INT | CTLFLAG_RW, sc, 0,
+ ath_sysctl_hardled, "I", "enable/disable hardware LED support");
+ /* XXX Laziness - configure pins, then flip hardled off/on */
+ SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+ "led_net_pin", CTLFLAG_RW, &sc->sc_led_net_pin, 0,
+ "MAC Network LED pin, or -1 to disable");
+ SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+ "led_pwr_pin", CTLFLAG_RW, &sc->sc_led_pwr_pin, 0,
+ "MAC Power LED pin, or -1 to disable");
+
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
"txantenna", CTLTYPE_INT | CTLFLAG_RW, sc, 0,
ath_sysctl_txantenna, "I", "antenna switch");
diff --git a/sys/dev/ath/if_ath_tx.c b/sys/dev/ath/if_ath_tx.c
index ea48b93..0683926 100644
--- a/sys/dev/ath/if_ath_tx.c
+++ b/sys/dev/ath/if_ath_tx.c
@@ -435,7 +435,8 @@ ath_tx_setds_11n(struct ath_softc *sc, struct ath_buf *bf_first)
* Setup the last descriptor in the list.
* bf_prev points to the last; bf is NULL here.
*/
- ath_hal_setuplasttxdesc(sc->sc_ah, bf_prev->bf_desc, bf_first->bf_desc);
+ ath_hal_setuplasttxdesc(sc->sc_ah, bf_prev->bf_desc,
+ bf_first->bf_desc);
/*
* Set the first descriptor bf_lastds field to point to
@@ -481,7 +482,8 @@ ath_tx_handoff_mcast(struct ath_softc *sc, struct ath_txq *txq,
* Hand-off packet to a hardware queue.
*/
static void
-ath_tx_handoff_hw(struct ath_softc *sc, struct ath_txq *txq, struct ath_buf *bf)
+ath_tx_handoff_hw(struct ath_softc *sc, struct ath_txq *txq,
+ struct ath_buf *bf)
{
struct ath_hal *ah = sc->sc_ah;
@@ -548,7 +550,8 @@ ath_tx_handoff_hw(struct ath_softc *sc, struct ath_txq *txq, struct ath_buf *bf)
* frame at SWBA.
*/
if (!qbusy) {
- ath_hal_puttxbuf(ah, txq->axq_qnum, bf->bf_daddr);
+ ath_hal_puttxbuf(ah, txq->axq_qnum,
+ bf->bf_daddr);
txq->axq_flags &= ~ATH_TXQ_PUTPENDING;
DPRINTF(sc, ATH_DEBUG_XMIT,
"%s: TXDP[%u] = %p (%p) depth %d\n",
@@ -566,7 +569,8 @@ ath_tx_handoff_hw(struct ath_softc *sc, struct ath_txq *txq, struct ath_buf *bf)
DPRINTF(sc, ATH_DEBUG_XMIT,
"%s: link[%u](%p)=%p (%p) depth %d\n", __func__,
txq->axq_qnum, txq->axq_link,
- (caddr_t)bf->bf_daddr, bf->bf_desc, txq->axq_depth);
+ (caddr_t)bf->bf_daddr, bf->bf_desc,
+ txq->axq_depth);
if ((txq->axq_flags & ATH_TXQ_PUTPENDING) && !qbusy) {
/*
* The q was busy when we previously tried
@@ -599,7 +603,8 @@ ath_tx_handoff_hw(struct ath_softc *sc, struct ath_txq *txq, struct ath_buf *bf)
DPRINTF(sc, ATH_DEBUG_XMIT,
"%s: link[%u](%p)=%p (%p) depth %d\n", __func__,
txq->axq_qnum, txq->axq_link,
- (caddr_t)bf->bf_daddr, bf->bf_desc, txq->axq_depth);
+ (caddr_t)bf->bf_daddr, bf->bf_desc,
+ txq->axq_depth);
}
#endif /* IEEE80211_SUPPORT_TDMA */
if (bf->bf_state.bfs_aggr)
@@ -652,7 +657,8 @@ ath_tx_handoff(struct ath_softc *sc, struct ath_txq *txq, struct ath_buf *bf)
static int
ath_tx_tag_crypto(struct ath_softc *sc, struct ieee80211_node *ni,
- struct mbuf *m0, int iswep, int isfrag, int *hdrlen, int *pktlen, int *keyix)
+ struct mbuf *m0, int iswep, int isfrag, int *hdrlen, int *pktlen,
+ int *keyix)
{
if (iswep) {
const struct ieee80211_cipher *cip;
@@ -671,7 +677,7 @@ ath_tx_tag_crypto(struct ath_softc *sc, struct ieee80211_node *ni,
* 802.11 layer counts failures and provides
* debugging/diagnostics.
*/
- return 0;
+ return (0);
}
/*
* Adjust the packet + header lengths for the crypto
@@ -698,7 +704,7 @@ ath_tx_tag_crypto(struct ath_softc *sc, struct ieee80211_node *ni,
} else
(*keyix) = HAL_TXKEYIX_INVALID;
- return 1;
+ return (1);
}
static uint8_t
@@ -720,7 +726,7 @@ ath_tx_get_rtscts_rate(struct ath_hal *ah, const HAL_RATE_TABLE *rt,
if (shortPreamble)
ctsrate |= rt->info[cix].shortPreamble;
- return ctsrate;
+ return (ctsrate);
}
/*
@@ -737,7 +743,7 @@ ath_tx_calc_ctsduration(struct ath_hal *ah, int rix, int cix,
if (rt->info[cix].phy == IEEE80211_T_HT) {
printf("%s: HT rate where it shouldn't be (0x%x)\n",
__func__, rt->info[cix].rateCode);
- return -1;
+ return (-1);
}
/*
@@ -765,7 +771,7 @@ ath_tx_calc_ctsduration(struct ath_hal *ah, int rix, int cix,
ctsduration += rt->info[rix].lpAckDuration;
}
- return ctsduration;
+ return (ctsduration);
}
/*
@@ -1906,9 +1912,11 @@ ath_tx_addto_baw(struct ath_softc *sc, struct ath_node *an,
if (bf->bf_state.bfs_addedbaw)
device_printf(sc->sc_dev,
- "%s: re-added? tid=%d, seqno %d; window %d:%d; baw head=%d tail=%d\n",
+ "%s: re-added? tid=%d, seqno %d; window %d:%d; "
+ "baw head=%d tail=%d\n",
__func__, tid->tid, SEQNO(bf->bf_state.bfs_seqno),
- tap->txa_start, tap->txa_wnd, tid->baw_head, tid->baw_tail);
+ tap->txa_start, tap->txa_wnd, tid->baw_head,
+ tid->baw_tail);
/*
* ni->ni_txseqs[] is the currently allocated seqno.
@@ -1917,9 +1925,11 @@ ath_tx_addto_baw(struct ath_softc *sc, struct ath_node *an,
index = ATH_BA_INDEX(tap->txa_start, SEQNO(bf->bf_state.bfs_seqno));
cindex = (tid->baw_head + index) & (ATH_TID_MAX_BUFS - 1);
DPRINTF(sc, ATH_DEBUG_SW_TX_BAW,
- "%s: tid=%d, seqno %d; window %d:%d; index=%d cindex=%d baw head=%d tail=%d\n",
+ "%s: tid=%d, seqno %d; window %d:%d; index=%d cindex=%d "
+ "baw head=%d tail=%d\n",
__func__, tid->tid, SEQNO(bf->bf_state.bfs_seqno),
- tap->txa_start, tap->txa_wnd, index, cindex, tid->baw_head, tid->baw_tail);
+ tap->txa_start, tap->txa_wnd, index, cindex, tid->baw_head,
+ tid->baw_tail);
#if 0
@@ -1941,7 +1951,8 @@ ath_tx_addto_baw(struct ath_softc *sc, struct ath_node *an,
}
tid->tx_buf[cindex] = bf;
- if (index >= ((tid->baw_tail - tid->baw_head) & (ATH_TID_MAX_BUFS - 1))) {
+ if (index >= ((tid->baw_tail - tid->baw_head) &
+ (ATH_TID_MAX_BUFS - 1))) {
tid->baw_tail = cindex;
INCR(tid->baw_tail, ATH_TID_MAX_BUFS);
}
@@ -2019,7 +2030,8 @@ ath_tx_update_baw(struct ath_softc *sc, struct ath_node *an,
cindex = (tid->baw_head + index) & (ATH_TID_MAX_BUFS - 1);
DPRINTF(sc, ATH_DEBUG_SW_TX_BAW,
- "%s: tid=%d, baw=%d:%d, seqno=%d, index=%d, cindex=%d, baw head=%d, tail=%d\n",
+ "%s: tid=%d, baw=%d:%d, seqno=%d, index=%d, cindex=%d, "
+ "baw head=%d, tail=%d\n",
__func__, tid->tid, tap->txa_start, tap->txa_wnd, seqno, index,
cindex, tid->baw_head, tid->baw_tail);
@@ -2044,11 +2056,13 @@ ath_tx_update_baw(struct ath_softc *sc, struct ath_node *an,
tid->tx_buf[cindex] = NULL;
- while (tid->baw_head != tid->baw_tail && !tid->tx_buf[tid->baw_head]) {
+ while (tid->baw_head != tid->baw_tail &&
+ !tid->tx_buf[tid->baw_head]) {
INCR(tap->txa_start, IEEE80211_SEQ_RANGE);
INCR(tid->baw_head, ATH_TID_MAX_BUFS);
}
- DPRINTF(sc, ATH_DEBUG_SW_TX_BAW, "%s: baw is now %d:%d, baw head=%d\n",
+ DPRINTF(sc, ATH_DEBUG_SW_TX_BAW,
+ "%s: baw is now %d:%d, baw head=%d\n",
__func__, tap->txa_start, tap->txa_wnd, tid->baw_head);
}
@@ -2248,24 +2262,34 @@ ath_tx_swq(struct ath_softc *sc, struct ieee80211_node *ni, struct ath_txq *txq,
ATH_TXQ_LOCK(txq);
if (atid->paused) {
/* TID is paused, queue */
+ DPRINTF(sc, ATH_DEBUG_SW_TX, "%s: paused\n", __func__);
ATH_TXQ_INSERT_TAIL(atid, bf, bf_list);
} else if (ath_tx_ampdu_pending(sc, an, tid)) {
/* AMPDU pending; queue */
+ DPRINTF(sc, ATH_DEBUG_SW_TX, "%s: pending\n", __func__);
ATH_TXQ_INSERT_TAIL(atid, bf, bf_list);
/* XXX sched? */
} else if (ath_tx_ampdu_running(sc, an, tid)) {
/* AMPDU running, attempt direct dispatch if possible */
- if (txq->axq_depth < sc->sc_hwq_limit)
+ if (txq->axq_depth < sc->sc_hwq_limit) {
ath_tx_xmit_aggr(sc, an, bf);
- else {
+ DPRINTF(sc, ATH_DEBUG_SW_TX,
+ "%s: xmit_aggr\n",
+ __func__);
+ } else {
+ DPRINTF(sc, ATH_DEBUG_SW_TX,
+ "%s: ampdu; swq'ing\n",
+ __func__);
ATH_TXQ_INSERT_TAIL(atid, bf, bf_list);
ath_tx_tid_sched(sc, atid);
}
} else if (txq->axq_depth < sc->sc_hwq_limit) {
/* AMPDU not running, attempt direct dispatch */
+ DPRINTF(sc, ATH_DEBUG_SW_TX, "%s: xmit_normal\n", __func__);
ath_tx_xmit_normal(sc, txq, bf);
} else {
/* Busy; queue */
+ DPRINTF(sc, ATH_DEBUG_SW_TX, "%s: swq'ing\n", __func__);
ATH_TXQ_INSERT_TAIL(atid, bf, bf_list);
ath_tx_tid_sched(sc, atid);
}
@@ -2374,8 +2398,8 @@ ath_tx_tid_resume(struct ath_softc *sc, struct ath_tid *tid)
* forward.
*/
static void
-ath_tx_tid_drain(struct ath_softc *sc, struct ath_node *an, struct ath_tid *tid,
- ath_bufhead *bf_cq)
+ath_tx_tid_drain(struct ath_softc *sc, struct ath_node *an,
+ struct ath_tid *tid, ath_bufhead *bf_cq)
{
struct ath_buf *bf;
struct ieee80211_tx_ampdu *tap;
@@ -2398,13 +2422,19 @@ ath_tx_tid_drain(struct ath_softc *sc, struct ath_node *an, struct ath_tid *tid,
device_printf(sc->sc_dev,
"%s: node %p: tid %d: txq_depth=%d, "
"txq_aggr_depth=%d, sched=%d, paused=%d, "
- "hwq_depth=%d, incomp=%d, baw_head=%d, baw_tail=%d "
- "txa_start=%d, ni_txseqs=%d\n",
+ "hwq_depth=%d, incomp=%d, baw_head=%d, "
+ "baw_tail=%d txa_start=%d, ni_txseqs=%d\n",
__func__, ni, tid->tid, txq->axq_depth,
txq->axq_aggr_depth, tid->sched, tid->paused,
tid->hwq_depth, tid->incomp, tid->baw_head,
tid->baw_tail, tap == NULL ? -1 : tap->txa_start,
ni->ni_txseqs[tid->tid]);
+
+ /* XXX Dump the frame, see what it is? */
+ ieee80211_dump_pkt(ni->ni_ic,
+ mtod(bf->bf_m, const uint8_t *),
+ bf->bf_m->m_len, 0, -1);
+
t = 1;
}
@@ -2638,7 +2668,8 @@ ath_tx_cleanup(struct ath_softc *sc, struct ath_node *an, int tid)
if (! bf->bf_state.bfs_addedbaw)
device_printf(sc->sc_dev,
"%s: wasn't added: seqno %d\n",
- __func__, SEQNO(bf->bf_state.bfs_seqno));
+ __func__,
+ SEQNO(bf->bf_state.bfs_seqno));
}
bf->bf_state.bfs_dobaw = 0;
/*
@@ -3055,7 +3086,8 @@ ath_tx_comp_cleanup_aggr(struct ath_softc *sc, struct ath_buf *bf_first)
* not the last descriptor in the first frame.
*/
static void
-ath_tx_aggr_comp_aggr(struct ath_softc *sc, struct ath_buf *bf_first, int fail)
+ath_tx_aggr_comp_aggr(struct ath_softc *sc, struct ath_buf *bf_first,
+ int fail)
{
//struct ath_desc *ds = bf->bf_lastds;
struct ieee80211_node *ni = bf_first->bf_node;
@@ -3142,7 +3174,8 @@ ath_tx_aggr_comp_aggr(struct ath_softc *sc, struct ath_buf *bf_first, int fail)
memcpy(rc, bf_first->bf_state.bfs_rc, sizeof(rc));
DPRINTF(sc, ATH_DEBUG_SW_TX_AGGR,
- "%s: txa_start=%d, tx_ok=%d, status=%.8x, flags=%.8x, isaggr=%d, seq_st=%d, hasba=%d, ba=%.8x, %.8x\n",
+ "%s: txa_start=%d, tx_ok=%d, status=%.8x, flags=%.8x, "
+ "isaggr=%d, seq_st=%d, hasba=%d, ba=%.8x, %.8x\n",
__func__, tap->txa_start, tx_ok, ts.ts_status, ts.ts_flags,
isaggr, seq_st, hasba, ba[0], ba[1]);
@@ -3156,7 +3189,8 @@ ath_tx_aggr_comp_aggr(struct ath_softc *sc, struct ath_buf *bf_first, int fail)
/* AR5416 BA bug; this requires an interface reset */
if (isaggr && tx_ok && (! hasba)) {
device_printf(sc->sc_dev,
- "%s: AR5416 bug: hasba=%d; txok=%d, isaggr=%d, seq_st=%d\n",
+ "%s: AR5416 bug: hasba=%d; txok=%d, isaggr=%d, "
+ "seq_st=%d\n",
__func__, hasba, tx_ok, isaggr, seq_st);
/* XXX TODO: schedule an interface reset */
}
@@ -3187,7 +3221,8 @@ ath_tx_aggr_comp_aggr(struct ath_softc *sc, struct ath_buf *bf_first, int fail)
*/
while (bf) {
nframes++;
- ba_index = ATH_BA_INDEX(seq_st, SEQNO(bf->bf_state.bfs_seqno));
+ ba_index = ATH_BA_INDEX(seq_st,
+ SEQNO(bf->bf_state.bfs_seqno));
bf_next = bf->bf_next;
bf->bf_next = NULL; /* Remove it from the aggr list */
@@ -3239,7 +3274,8 @@ ath_tx_aggr_comp_aggr(struct ath_softc *sc, struct ath_buf *bf_first, int fail)
* control code.
*/
if (fail == 0)
- ath_tx_update_ratectrl(sc, ni, rc, &ts, pktlen, nframes, nbad);
+ ath_tx_update_ratectrl(sc, ni, rc, &ts, pktlen, nframes,
+ nbad);
/*
* send bar if we dropped any frames
@@ -3307,8 +3343,10 @@ ath_tx_aggr_comp_unaggr(struct ath_softc *sc, struct ath_buf *bf, int fail)
if (tid == IEEE80211_NONQOS_TID)
device_printf(sc->sc_dev, "%s: TID=16!\n", __func__);
- DPRINTF(sc, ATH_DEBUG_SW_TX, "%s: bf=%p: tid=%d, hwq_depth=%d\n",
- __func__, bf, bf->bf_state.bfs_tid, atid->hwq_depth);
+ DPRINTF(sc, ATH_DEBUG_SW_TX,
+ "%s: bf=%p: tid=%d, hwq_depth=%d, seqno=%d\n",
+ __func__, bf, bf->bf_state.bfs_tid, atid->hwq_depth,
+ SEQNO(bf->bf_state.bfs_seqno));
atid->hwq_depth--;
if (atid->hwq_depth < 0)
@@ -3323,6 +3361,8 @@ ath_tx_aggr_comp_unaggr(struct ath_softc *sc, struct ath_buf *bf, int fail)
*/
if (atid->cleanup_inprogress) {
ATH_TXQ_UNLOCK(sc->sc_ac2q[atid->ac]);
+ DPRINTF(sc, ATH_DEBUG_SW_TX, "%s: cleanup_unaggr\n",
+ __func__);
ath_tx_comp_cleanup_unaggr(sc, bf);
return;
}
@@ -3333,6 +3373,8 @@ ath_tx_aggr_comp_unaggr(struct ath_softc *sc, struct ath_buf *bf, int fail)
*/
if (fail == 0 && ts->ts_status & HAL_TXERR_XRETRY) {
ATH_TXQ_UNLOCK(sc->sc_ac2q[atid->ac]);
+ DPRINTF(sc, ATH_DEBUG_SW_TX, "%s: retry_unaggr\n",
+ __func__);
ath_tx_aggr_retry_unaggr(sc, bf);
return;
}
@@ -3413,7 +3455,8 @@ ath_tx_tid_hw_queue_aggr(struct ath_softc *sc, struct ath_node *an,
* data frame), schedule it directly; continue.
*/
if (! bf->bf_state.bfs_dobaw) {
- DPRINTF(sc, ATH_DEBUG_SW_TX_AGGR, "%s: non-baw packet\n",
+ DPRINTF(sc, ATH_DEBUG_SW_TX_AGGR,
+ "%s: non-baw packet\n",
__func__);
ATH_TXQ_REMOVE(tid, bf, bf_list);
bf->bf_state.bfs_aggr = 0;
@@ -3483,7 +3526,8 @@ ath_tx_tid_hw_queue_aggr(struct ath_softc *sc, struct ath_node *an,
sc->sc_aggr_stats.aggr_single_pkt++;
} else {
DPRINTF(sc, ATH_DEBUG_SW_TX_AGGR,
- "%s: multi-frame aggregate: %d frames, length %d\n",
+ "%s: multi-frame aggregate: %d frames, "
+ "length %d\n",
__func__, bf->bf_state.bfs_nframes,
bf->bf_state.bfs_al);
bf->bf_state.bfs_aggr = 1;
diff --git a/sys/dev/ath/if_athvar.h b/sys/dev/ath/if_athvar.h
index 331bea4..a6d9196 100644
--- a/sys/dev/ath/if_athvar.h
+++ b/sys/dev/ath/if_athvar.h
@@ -371,6 +371,7 @@ struct ath_softc {
unsigned int sc_invalid : 1,/* disable hardware accesses */
sc_mrretry : 1,/* multi-rate retry support */
sc_softled : 1,/* enable LED gpio status */
+ sc_hardled : 1,/* enable MAC LED status */
sc_splitmic : 1,/* split TKIP MIC keys */
sc_needmib : 1,/* enable MIB stats intr */
sc_diversity: 1,/* enable rx diversity */
@@ -445,6 +446,9 @@ struct ath_softc {
u_int sc_keymax; /* size of key cache */
u_int8_t sc_keymap[ATH_KEYBYTES];/* key use bit map */
+ /*
+ * Software based LED blinking
+ */
u_int sc_ledpin; /* GPIO pin for driving LED */
u_int sc_ledon; /* pin setting for LED on */
u_int sc_ledidle; /* idle polling interval */
@@ -453,6 +457,12 @@ struct ath_softc {
u_int16_t sc_ledoff; /* off time for current blink */
struct callout sc_ledtimer; /* led off timer */
+ /*
+ * Hardware based LED blinking
+ */
+ int sc_led_pwr_pin; /* MAC power LED GPIO pin */
+ int sc_led_net_pin; /* MAC network LED GPIO pin */
+
u_int sc_rfsilentpin; /* GPIO pin for rfkill int */
u_int sc_rfsilentpol; /* pin setting for rfkill on */
@@ -864,11 +874,14 @@ void ath_intr(void *);
#define ath_hal_settpcts(_ah, _tpcts) \
ath_hal_setcapability(_ah, HAL_CAP_TPC_CTS, 0, _tpcts, NULL)
#define ath_hal_hasintmit(_ah) \
- (ath_hal_getcapability(_ah, HAL_CAP_INTMIT, HAL_CAP_INTMIT_PRESENT, NULL) == HAL_OK)
+ (ath_hal_getcapability(_ah, HAL_CAP_INTMIT, \
+ HAL_CAP_INTMIT_PRESENT, NULL) == HAL_OK)
#define ath_hal_getintmit(_ah) \
- (ath_hal_getcapability(_ah, HAL_CAP_INTMIT, HAL_CAP_INTMIT_ENABLE, NULL) == HAL_OK)
+ (ath_hal_getcapability(_ah, HAL_CAP_INTMIT, \
+ HAL_CAP_INTMIT_ENABLE, NULL) == HAL_OK)
#define ath_hal_setintmit(_ah, _v) \
- ath_hal_setcapability(_ah, HAL_CAP_INTMIT, HAL_CAP_INTMIT_ENABLE, _v, NULL)
+ ath_hal_setcapability(_ah, HAL_CAP_INTMIT, \
+ HAL_CAP_INTMIT_ENABLE, _v, NULL)
#define ath_hal_getchannoise(_ah, _c) \
((*(_ah)->ah_getChanNoise)((_ah), (_c)))
#define ath_hal_getrxchainmask(_ah, _prxchainmask) \
@@ -876,14 +889,16 @@ void ath_intr(void *);
#define ath_hal_gettxchainmask(_ah, _ptxchainmask) \
(ath_hal_getcapability(_ah, HAL_CAP_TX_CHAINMASK, 0, _ptxchainmask))
#define ath_hal_split4ktrans(_ah) \
- (ath_hal_getcapability(_ah, HAL_CAP_SPLIT_4KB_TRANS, 0, NULL) == HAL_OK)
+ (ath_hal_getcapability(_ah, HAL_CAP_SPLIT_4KB_TRANS, \
+ 0, NULL) == HAL_OK)
#define ath_hal_self_linked_final_rxdesc(_ah) \
- (ath_hal_getcapability(_ah, HAL_CAP_RXDESC_SELFLINK, 0, NULL) == HAL_OK)
+ (ath_hal_getcapability(_ah, HAL_CAP_RXDESC_SELFLINK, \
+ 0, NULL) == HAL_OK)
#define ath_hal_gtxto_supported(_ah) \
(ath_hal_getcapability(_ah, HAL_CAP_GTXTO, 0, NULL) == HAL_OK)
#define ath_hal_has_long_rxdesc_tsf(_ah) \
- (ath_hal_getcapability(_ah, HAL_CAP_LONG_RXDESC_TSF, 0, NULL) == HAL_OK)
-
+ (ath_hal_getcapability(_ah, HAL_CAP_LONG_RXDESC_TSF, \
+ 0, NULL) == HAL_OK)
#define ath_hal_setuprxdesc(_ah, _ds, _size, _intreq) \
((*(_ah)->ah_setupRxDesc)((_ah), (_ds), (_size), (_intreq)))
#define ath_hal_rxprocdesc(_ah, _ds, _dspa, _dsnext, _rs) \
@@ -935,6 +950,15 @@ void ath_intr(void *);
#define ath_hal_clr11n_aggr(_ah, _ds) \
((*(_ah)->ah_clr11nAggr)((_ah), (_ds)))
+#define ath_hal_gpioCfgOutput(_ah, _gpio, _type) \
+ ((*(_ah)->ah_gpioCfgOutput)((_ah), (_gpio), (_type)))
+#define ath_hal_gpioset(_ah, _gpio, _b) \
+ ((*(_ah)->ah_gpioSet)((_ah), (_gpio), (_b)))
+#define ath_hal_gpioget(_ah, _gpio) \
+ ((*(_ah)->ah_gpioGet)((_ah), (_gpio)))
+#define ath_hal_gpiosetintr(_ah, _gpio, _b) \
+ ((*(_ah)->ah_gpioSetIntr)((_ah), (_gpio), (_b)))
+
/*
* This is badly-named; you need to set the correct parameters
* to begin to receive useful radar events; and even then
@@ -946,20 +970,13 @@ void ath_intr(void *);
#define ath_hal_getdfsthresh(_ah, _param) \
((*(_ah)->ah_getDfsThresh)((_ah), (_param)))
#define ath_hal_procradarevent(_ah, _rxs, _fulltsf, _buf, _event) \
- ((*(_ah)->ah_procRadarEvent)((_ah), (_rxs), (_fulltsf), (_buf), (_event)))
+ ((*(_ah)->ah_procRadarEvent)((_ah), (_rxs), (_fulltsf), \
+ (_buf), (_event)))
#define ath_hal_is_fast_clock_enabled(_ah) \
((*(_ah)->ah_isFastClockEnabled)((_ah)))
-
-#define ath_hal_gpioCfgOutput(_ah, _gpio, _type) \
- ((*(_ah)->ah_gpioCfgOutput)((_ah), (_gpio), (_type)))
-#define ath_hal_gpioset(_ah, _gpio, _b) \
- ((*(_ah)->ah_gpioSet)((_ah), (_gpio), (_b)))
-#define ath_hal_gpioget(_ah, _gpio) \
- ((*(_ah)->ah_gpioGet)((_ah), (_gpio)))
-#define ath_hal_gpiosetintr(_ah, _gpio, _b) \
- ((*(_ah)->ah_gpioSetIntr)((_ah), (_gpio), (_b)))
-
-#define ath_hal_radar_wait(_ah, _chan) \
+#define ath_hal_radar_wait(_ah, _chan) \
((*(_ah)->ah_radarWait)((_ah), (_chan)))
+#define ath_hal_get_chan_ext_busy(_ah) \
+ ((*(_ah)->ah_get11nExtBusy)((_ah)))
#endif /* _DEV_ATH_ATHVAR_H */
diff --git a/sys/dev/bce/if_bce.c b/sys/dev/bce/if_bce.c
index e0014c8..72ba76a 100644
--- a/sys/dev/bce/if_bce.c
+++ b/sys/dev/bce/if_bce.c
@@ -1982,6 +1982,7 @@ static void
bce_miibus_statchg(device_t dev)
{
struct bce_softc *sc;
+ struct ifnet *ifp;
struct mii_data *mii;
int val;
@@ -1989,42 +1990,57 @@ bce_miibus_statchg(device_t dev)
DBENTER(BCE_VERBOSE_PHY);
+ ifp = sc->bce_ifp;
mii = device_get_softc(sc->bce_miibus);
+ if (mii == NULL || ifp == NULL ||
+ (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
+ return;
+ sc->bce_link_up = FALSE;
val = REG_RD(sc, BCE_EMAC_MODE);
val &= ~(BCE_EMAC_MODE_PORT | BCE_EMAC_MODE_HALF_DUPLEX |
BCE_EMAC_MODE_MAC_LOOP | BCE_EMAC_MODE_FORCE_LINK |
BCE_EMAC_MODE_25G);
/* Set MII or GMII interface based on the PHY speed. */
- switch (IFM_SUBTYPE(mii->mii_media_active)) {
- case IFM_10_T:
- if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) {
- DBPRINT(sc, BCE_INFO_PHY,
- "Enabling 10Mb interface.\n");
- val |= BCE_EMAC_MODE_PORT_MII_10;
+ if ((mii->mii_media_status & (IFM_ACTIVE | IFM_AVALID)) ==
+ (IFM_ACTIVE | IFM_AVALID)) {
+ switch (IFM_SUBTYPE(mii->mii_media_active)) {
+ case IFM_10_T:
+ if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) {
+ DBPRINT(sc, BCE_INFO_PHY,
+ "Enabling 10Mb interface.\n");
+ val |= BCE_EMAC_MODE_PORT_MII_10;
+ sc->bce_link_up = TRUE;
+ break;
+ }
+ /* FALLTHROUGH */
+ case IFM_100_TX:
+ DBPRINT(sc, BCE_INFO_PHY, "Enabling MII interface.\n");
+ val |= BCE_EMAC_MODE_PORT_MII;
+ sc->bce_link_up = TRUE;
+ break;
+ case IFM_2500_SX:
+ DBPRINT(sc, BCE_INFO_PHY, "Enabling 2.5G MAC mode.\n");
+ val |= BCE_EMAC_MODE_25G;
+ /* FALLTHROUGH */
+ case IFM_1000_T:
+ case IFM_1000_SX:
+ DBPRINT(sc, BCE_INFO_PHY, "Enabling GMII interface.\n");
+ val |= BCE_EMAC_MODE_PORT_GMII;
+ sc->bce_link_up = TRUE;
+ if (bce_verbose || bootverbose)
+ BCE_PRINTF("Gigabit link up!\n");
+ break;
+ default:
+ DBPRINT(sc, BCE_INFO_PHY, "Unknown link speed.\n");
break;
}
- /* fall-through */
- case IFM_100_TX:
- DBPRINT(sc, BCE_INFO_PHY, "Enabling MII interface.\n");
- val |= BCE_EMAC_MODE_PORT_MII;
- break;
- case IFM_2500_SX:
- DBPRINT(sc, BCE_INFO_PHY, "Enabling 2.5G MAC mode.\n");
- val |= BCE_EMAC_MODE_25G;
- /* fall-through */
- case IFM_1000_T:
- case IFM_1000_SX:
- DBPRINT(sc, BCE_INFO_PHY, "Enabling GMII interface.\n");
- val |= BCE_EMAC_MODE_PORT_GMII;
- break;
- default:
- DBPRINT(sc, BCE_INFO_PHY, "Unknown link speed, enabling "
- "default GMII interface.\n");
- val |= BCE_EMAC_MODE_PORT_GMII;
}
+ if (sc->bce_link_up == FALSE)
+ return;
+
/* Set half or full duplex based on PHY settings. */
if ((mii->mii_media_active & IFM_GMASK) == IFM_HDX) {
DBPRINT(sc, BCE_INFO_PHY,
@@ -2036,7 +2052,7 @@ bce_miibus_statchg(device_t dev)
REG_WR(sc, BCE_EMAC_MODE, val);
- if ((mii->mii_media_active & IFM_ETH_RXPAUSE) != 0) {
+ if ((mii->mii_media_active & IFM_ETH_RXPAUSE) != 0) {
DBPRINT(sc, BCE_INFO_PHY,
"%s(): Enabling RX flow control.\n", __FUNCTION__);
BCE_SETBIT(sc, BCE_EMAC_RX_MODE, BCE_EMAC_RX_MODE_FLOW_EN);
@@ -2046,7 +2062,7 @@ bce_miibus_statchg(device_t dev)
BCE_CLRBIT(sc, BCE_EMAC_RX_MODE, BCE_EMAC_RX_MODE_FLOW_EN);
}
- if ((mii->mii_media_active & IFM_ETH_TXPAUSE) != 0) {
+ if ((mii->mii_media_active & IFM_ETH_TXPAUSE) != 0) {
DBPRINT(sc, BCE_INFO_PHY,
"%s(): Enabling TX flow control.\n", __FUNCTION__);
BCE_SETBIT(sc, BCE_EMAC_TX_MODE, BCE_EMAC_TX_MODE_FLOW_EN);
@@ -6206,15 +6222,11 @@ bce_phy_intr(struct bce_softc *sc)
DBPRINT(sc, BCE_INFO_PHY, "%s(): Link is now DOWN.\n",
__FUNCTION__);
}
-
/*
- * Assume link is down and allow
- * tick routine to update the state
- * based on the actual media state.
+ * Link state changed, allow tick routine to update
+ * the state baased on actual media state.
*/
- sc->bce_link_up = FALSE;
- callout_stop(&sc->bce_tick_callout);
- bce_tick(sc);
+ sc->bce_link_tick = TRUE;
}
/* Acknowledge the link change interrupt. */
@@ -6898,12 +6910,13 @@ bce_init_locked(struct bce_softc *sc)
/* Enable host interrupts. */
bce_enable_intr(sc, 1);
- bce_ifmedia_upd_locked(ifp);
-
/* Let the OS know the driver is up and running. */
ifp->if_drv_flags |= IFF_DRV_RUNNING;
ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
+ sc->bce_link_tick = TRUE;
+ bce_ifmedia_upd_locked(ifp);
+
callout_reset(&sc->bce_tick_callout, hz, bce_tick, sc);
bce_init_locked_exit:
@@ -8199,31 +8212,19 @@ bce_tick(void *xsc)
bce_watchdog(sc);
/* If link is up already up then we're done. */
- if (sc->bce_link_up == TRUE)
+ if (sc->bce_link_tick == FALSE && sc->bce_link_up == TRUE)
goto bce_tick_exit;
/* Link is down. Check what the PHY's doing. */
mii = device_get_softc(sc->bce_miibus);
mii_tick(mii);
- /* Check if the link has come up. */
- if ((mii->mii_media_status & IFM_ACTIVE) &&
- (IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE)) {
+ sc->bce_link_tick = FALSE;
+ /* Now that link is up, handle any outstanding TX traffic. */
+ if (sc->bce_link_up == TRUE && !IFQ_DRV_IS_EMPTY(&ifp->if_snd)) {
DBPRINT(sc, BCE_VERBOSE_MISC,
- "%s(): Link up!\n", __FUNCTION__);
- sc->bce_link_up = TRUE;
- if ((IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T ||
- IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_SX ||
- IFM_SUBTYPE(mii->mii_media_active) == IFM_2500_SX) &&
- (bce_verbose || bootverbose))
- BCE_PRINTF("Gigabit link up!\n");
-
- /* Now that link is up, handle any outstanding TX traffic. */
- if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) {
- DBPRINT(sc, BCE_VERBOSE_MISC, "%s(): Found "
- "pending TX traffic.\n", __FUNCTION__);
- bce_start_locked(ifp);
- }
+ "%s(): Found pending TX traffic.\n", __FUNCTION__);
+ bce_start_locked(ifp);
}
bce_tick_exit:
diff --git a/sys/dev/bce/if_bcereg.h b/sys/dev/bce/if_bcereg.h
index f74c4d2..65a3424 100644
--- a/sys/dev/bce/if_bcereg.h
+++ b/sys/dev/bce/if_bcereg.h
@@ -6560,6 +6560,7 @@ struct bce_softc
u16 pg_prod;
u16 pg_cons;
+ int bce_link_tick;
int bce_link_up;
struct callout bce_tick_callout;
struct callout bce_pulse_callout;
diff --git a/sys/dev/bfe/if_bfe.c b/sys/dev/bfe/if_bfe.c
index 6dd33cd..06c8fda 100644
--- a/sys/dev/bfe/if_bfe.c
+++ b/sys/dev/bfe/if_bfe.c
@@ -489,7 +489,6 @@ bfe_attach(device_t dev)
ifp->if_ioctl = bfe_ioctl;
ifp->if_start = bfe_start;
ifp->if_init = bfe_init;
- ifp->if_mtu = ETHERMTU;
IFQ_SET_MAXLEN(&ifp->if_snd, BFE_TX_QLEN);
ifp->if_snd.ifq_drv_maxlen = BFE_TX_QLEN;
IFQ_SET_READY(&ifp->if_snd);
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c
index 69d831d..4329a8d 100644
--- a/sys/dev/bge/if_bge.c
+++ b/sys/dev/bge/if_bge.c
@@ -2080,9 +2080,15 @@ bge_blockinit(struct bge_softc *sc)
val |= BGE_RDMAMODE_TSO6_ENABLE;
}
- if (sc->bge_asicrev == BGE_ASICREV_BCM5720)
+ if (sc->bge_asicrev == BGE_ASICREV_BCM5720) {
val |= CSR_READ_4(sc, BGE_RDMA_MODE) &
BGE_RDMAMODE_H2BNC_VLAN_DET;
+ /*
+ * Allow multiple outstanding read requests from
+ * non-LSO read DMA engine.
+ */
+ val &= ~BGE_RDMAMODE_MULT_DMA_RD_DIS;
+ }
if (sc->bge_asicrev == BGE_ASICREV_BCM5761 ||
sc->bge_asicrev == BGE_ASICREV_BCM5784 ||
@@ -2112,12 +2118,20 @@ bge_blockinit(struct bge_softc *sc)
BGE_RDMA_RSRVCTRL_FIFO_OFLW_FIX);
}
- if (sc->bge_asicrev == BGE_ASICREV_BCM5719 ||
- sc->bge_asicrev == BGE_ASICREV_BCM5720) {
+ if (sc->bge_asicrev == BGE_ASICREV_BCM5719) {
CSR_WRITE_4(sc, BGE_RDMA_LSO_CRPTEN_CTRL,
CSR_READ_4(sc, BGE_RDMA_LSO_CRPTEN_CTRL) |
BGE_RDMA_LSO_CRPTEN_CTRL_BLEN_BD_4K |
BGE_RDMA_LSO_CRPTEN_CTRL_BLEN_LSO_4K);
+ } else if (sc->bge_asicrev == BGE_ASICREV_BCM5720) {
+ /*
+ * Allow 4KB burst length reads for non-LSO frames.
+ * Enable 512B burst length reads for buffer descriptors.
+ */
+ CSR_WRITE_4(sc, BGE_RDMA_LSO_CRPTEN_CTRL,
+ CSR_READ_4(sc, BGE_RDMA_LSO_CRPTEN_CTRL) |
+ BGE_RDMA_LSO_CRPTEN_CTRL_BLEN_BD_512 |
+ BGE_RDMA_LSO_CRPTEN_CTRL_BLEN_LSO_4K);
}
CSR_WRITE_4(sc, BGE_RDMA_MODE, val);
@@ -2344,6 +2358,8 @@ bge_dma_free(struct bge_softc *sc)
if (sc->bge_cdata.bge_rx_mtag)
bus_dma_tag_destroy(sc->bge_cdata.bge_rx_mtag);
+ if (sc->bge_cdata.bge_mtag_jumbo)
+ bus_dma_tag_destroy(sc->bge_cdata.bge_mtag_jumbo);
if (sc->bge_cdata.bge_tx_mtag)
bus_dma_tag_destroy(sc->bge_cdata.bge_tx_mtag);
@@ -2729,6 +2745,9 @@ bge_can_use_msi(struct bge_softc *sc)
{
int can_use_msi = 0;
+ if (sc->bge_msi == 0)
+ return (0);
+
/* Disable MSI for polling(4). */
#ifdef DEVICE_POLLING
return (0);
@@ -5611,6 +5630,12 @@ bge_add_sysctls(struct bge_softc *sc)
"Number of fragmented TX buffers of a frame allowed before "
"forced collapsing");
+ sc->bge_msi = 1;
+ snprintf(tn, sizeof(tn), "dev.bge.%d.msi", unit);
+ TUNABLE_INT_FETCH(tn, &sc->bge_msi);
+ SYSCTL_ADD_INT(ctx, children, OID_AUTO, "msi",
+ CTLFLAG_RD, &sc->bge_msi, 0, "Enable MSI");
+
/*
* It seems all Broadcom controllers have a bug that can generate UDP
* datagrams with checksum value 0 when TX UDP checksum offloading is
diff --git a/sys/dev/bge/if_bgereg.h b/sys/dev/bge/if_bgereg.h
index 3ba4176..e3b1ade 100644
--- a/sys/dev/bge/if_bgereg.h
+++ b/sys/dev/bge/if_bgereg.h
@@ -1573,6 +1573,7 @@
#define BGE_RDMA_RSRVCTRL_FIFO_HWM_MASK 0x000FF000
#define BGE_RDMA_RSRVCTRL_TXMRGN_MASK 0xFFE00000
+#define BGE_RDMA_LSO_CRPTEN_CTRL_BLEN_BD_512 0x00020000
#define BGE_RDMA_LSO_CRPTEN_CTRL_BLEN_BD_4K 0x00030000
#define BGE_RDMA_LSO_CRPTEN_CTRL_BLEN_LSO_4K 0x000C0000
@@ -2863,6 +2864,7 @@ struct bge_softc {
int bge_timer;
int bge_forced_collapse;
int bge_forced_udpcsum;
+ int bge_msi;
int bge_csum_features;
struct callout bge_stat_ch;
uint32_t bge_rx_discards;
diff --git a/sys/dev/bm/if_bm.c b/sys/dev/bm/if_bm.c
index 872da6d..01706df 100644
--- a/sys/dev/bm/if_bm.c
+++ b/sys/dev/bm/if_bm.c
@@ -468,7 +468,6 @@ bm_attach(device_t dev)
if_initname(ifp, device_get_name(sc->sc_dev),
device_get_unit(sc->sc_dev));
- ifp->if_mtu = ETHERMTU;
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
ifp->if_start = bm_start;
ifp->if_ioctl = bm_ioctl;
diff --git a/sys/dev/bwi/if_bwi.c b/sys/dev/bwi/if_bwi.c
index b155507..8db43b3 100644
--- a/sys/dev/bwi/if_bwi.c
+++ b/sys/dev/bwi/if_bwi.c
@@ -96,9 +96,9 @@ struct bwi_myaddr_bssid {
} __packed;
static struct ieee80211vap *bwi_vap_create(struct ieee80211com *,
- const char [IFNAMSIZ], int, int, int,
- const uint8_t [IEEE80211_ADDR_LEN],
- const uint8_t [IEEE80211_ADDR_LEN]);
+ const char [IFNAMSIZ], int, enum ieee80211_opmode, int,
+ const uint8_t [IEEE80211_ADDR_LEN],
+ const uint8_t [IEEE80211_ADDR_LEN]);
static void bwi_vap_delete(struct ieee80211vap *);
static void bwi_init(void *);
static int bwi_ioctl(struct ifnet *, u_long, caddr_t);
@@ -118,7 +118,7 @@ static void bwi_calibrate(void *);
static int bwi_calc_rssi(struct bwi_softc *, const struct bwi_rxbuf_hdr *);
static int bwi_calc_noise(struct bwi_softc *);
-static __inline uint8_t bwi_plcp2rate(uint32_t, enum ieee80211_phymode);
+static __inline uint8_t bwi_plcp2rate(uint32_t, enum ieee80211_phytype);
static void bwi_rx_radiotap(struct bwi_softc *, struct mbuf *,
struct bwi_rxbuf_hdr *, const void *, int, int, int);
@@ -591,10 +591,10 @@ bwi_detach(struct bwi_softc *sc)
}
static struct ieee80211vap *
-bwi_vap_create(struct ieee80211com *ic,
- const char name[IFNAMSIZ], int unit, int opmode, int flags,
- const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t mac[IEEE80211_ADDR_LEN])
+bwi_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit,
+ enum ieee80211_opmode opmode, int flags,
+ const uint8_t bssid[IEEE80211_ADDR_LEN],
+ const uint8_t mac[IEEE80211_ADDR_LEN])
{
struct bwi_vap *bvp;
struct ieee80211vap *vap;
@@ -2667,9 +2667,9 @@ bwi_rxeof(struct bwi_softc *sc, int end_idx)
m_adj(m, sizeof(*hdr) + wh_ofs);
if (htole16(hdr->rxh_flags1) & BWI_RXH_F1_OFDM)
- rate = bwi_plcp2rate(plcp, IEEE80211_MODE_11G);
+ rate = bwi_plcp2rate(plcp, IEEE80211_T_OFDM);
else
- rate = bwi_plcp2rate(plcp, IEEE80211_MODE_11B);
+ rate = bwi_plcp2rate(plcp, IEEE80211_T_CCK);
/* RX radio tap */
if (ieee80211_radiotap_active(ic))
@@ -3801,10 +3801,10 @@ bwi_calc_noise(struct bwi_softc *sc)
}
static __inline uint8_t
-bwi_plcp2rate(const uint32_t plcp0, enum ieee80211_phymode phymode)
+bwi_plcp2rate(const uint32_t plcp0, enum ieee80211_phytype type)
{
- uint32_t plcp = le32toh(plcp0) & IEEE80211_OFDM_PLCP_RATE_MASK;
- return (ieee80211_plcp2rate(plcp, phymode));
+ uint32_t plcp = le32toh(plcp0) & IEEE80211_OFDM_PLCP_RATE_MASK;
+ return (ieee80211_plcp2rate(plcp, type));
}
static void
diff --git a/sys/dev/bwn/if_bwn.c b/sys/dev/bwn/if_bwn.c
index f26945f..b2cd527 100644
--- a/sys/dev/bwn/if_bwn.c
+++ b/sys/dev/bwn/if_bwn.c
@@ -193,8 +193,8 @@ static void bwn_scan_start(struct ieee80211com *);
static void bwn_scan_end(struct ieee80211com *);
static void bwn_set_channel(struct ieee80211com *);
static struct ieee80211vap *bwn_vap_create(struct ieee80211com *,
- const char [IFNAMSIZ], int, int,
- int, const uint8_t [IEEE80211_ADDR_LEN],
+ const char [IFNAMSIZ], int, enum ieee80211_opmode, int,
+ const uint8_t [IEEE80211_ADDR_LEN],
const uint8_t [IEEE80211_ADDR_LEN]);
static void bwn_vap_delete(struct ieee80211vap *);
static void bwn_stop(struct bwn_softc *, int);
@@ -2927,10 +2927,10 @@ fail:
}
static struct ieee80211vap *
-bwn_vap_create(struct ieee80211com *ic,
- const char name[IFNAMSIZ], int unit, int opmode, int flags,
- const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t mac0[IEEE80211_ADDR_LEN])
+bwn_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit,
+ enum ieee80211_opmode opmode, int flags,
+ const uint8_t bssid[IEEE80211_ADDR_LEN],
+ const uint8_t mac0[IEEE80211_ADDR_LEN])
{
struct ifnet *ifp = ic->ic_ifp;
struct bwn_softc *sc = ifp->if_softc;
diff --git a/sys/dev/bwn/if_bwnvar.h b/sys/dev/bwn/if_bwnvar.h
index 461587d..f6647b0 100644
--- a/sys/dev/bwn/if_bwnvar.h
+++ b/sys/dev/bwn/if_bwnvar.h
@@ -714,7 +714,7 @@ struct bwn_txhdr {
uint16_t tx_status;
struct bwn_plcp6 rts_plcp;
uint8_t rts_frame[16];
- uint8_t pad1[2];;
+ uint8_t pad1[2];
struct bwn_plcp6 plcp;
} __packed old;
/* format > r410 */
diff --git a/sys/dev/bxe/bxe_hsi.h b/sys/dev/bxe/bxe_hsi.h
index dfaa052..e9c01b1 100644
--- a/sys/dev/bxe/bxe_hsi.h
+++ b/sys/dev/bxe/bxe_hsi.h
@@ -282,7 +282,7 @@ struct port_hw_cfg { /* port 0: 0x12c port 1: 0x2bc */
* 4 times 16 bits for all 4 lanes. In case external PHY is present
* (not direct mode), those values will not take effect on the 4 XGXS
* lanes. For some external PHYs (such as 8706 and 8726) the values
- * will be used to configure the external PHY – in those cases, not
+ * will be used to configure the external PHY -- in those cases, not
* all 4 values are needed.
*/
uint16_t xgxs_config_rx[4]; /* 0x198 */
diff --git a/sys/dev/bxe/bxe_reg.h b/sys/dev/bxe/bxe_reg.h
index e561ce6..df2e707 100644
--- a/sys/dev/bxe/bxe_reg.h
+++ b/sys/dev/bxe/bxe_reg.h
@@ -1594,7 +1594,7 @@
/*
* [RW 1] Setting this bit enables a timer in the GRC block to timeout an
* access that does not finish within
- * ~misc_registers_grc_timout_val.grc_timeout_val cycles. When this bit is
+ * ~misc_registers_grc_timeout_val.grc_timeout_val cycles. When this bit is
* cleared; this timeout is disabled. If this timeout occurs; the GRC shall
* assert it attention output.
*/
diff --git a/sys/dev/bxe/if_bxe.c b/sys/dev/bxe/if_bxe.c
index 6ccd045..1c5398a 100644
--- a/sys/dev/bxe/if_bxe.c
+++ b/sys/dev/bxe/if_bxe.c
@@ -2136,7 +2136,6 @@ bxe_attach(device_t dev)
#endif
ifp->if_init = bxe_init;
- ifp->if_mtu = ETHERMTU;
ifp->if_hwassist = BXE_IF_HWASSIST;
ifp->if_capabilities = BXE_IF_CAPABILITIES;
/* TPA not enabled by default. */
@@ -14115,7 +14114,7 @@ bxe_set_rx_mode(struct bxe_softc *sc)
i = 0;
config = BXE_SP(sc, mcast_config);
- IF_ADDR_LOCK(ifp);
+ if_maddr_rlock(ifp);
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
if (ifma->ifma_addr->sa_family != AF_LINK)
@@ -14144,7 +14143,7 @@ bxe_set_rx_mode(struct bxe_softc *sc)
config_table->cam_entry.lsb_mac_addr);
}
- IF_ADDR_UNLOCK(ifp);
+ if_maddr_runlock(ifp);
old = config->hdr.length;
@@ -14172,7 +14171,7 @@ bxe_set_rx_mode(struct bxe_softc *sc)
/* Accept one or more multicasts */
memset(mc_filter, 0, 4 * MC_HASH_SIZE);
- IF_ADDR_LOCK(ifp);
+ if_maddr_rlock(ifp);
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
if (ifma->ifma_addr->sa_family != AF_LINK)
@@ -14184,7 +14183,7 @@ bxe_set_rx_mode(struct bxe_softc *sc)
bit &= 0x1f;
mc_filter[regidx] |= (1 << bit);
}
- IF_ADDR_UNLOCK(ifp);
+ if_maddr_runlock(ifp);
for (i = 0; i < MC_HASH_SIZE; i++)
REG_WR(sc, MC_HASH_OFFSET(sc, i), mc_filter[i]);
diff --git a/sys/dev/ce/if_ce.c b/sys/dev/ce/if_ce.c
index d151b42..7fb208a 100644
--- a/sys/dev/ce/if_ce.c
+++ b/sys/dev/ce/if_ce.c
@@ -1313,9 +1313,11 @@ static int ce_ioctl (struct cdev *dev, u_long cmd, caddr_t data, int flag, struc
IFP2SP(d->ifp)->pp_flags &= ~(PP_FR);
IFP2SP(d->ifp)->pp_flags |= PP_KEEPALIVE;
d->ifp->if_flags |= PP_CISCO;
- } else if (! strcmp ("fr", (char*)data) && PP_FR) {
+#if PP_FR != 0
+ } else if (! strcmp ("fr", (char*)data)) {
d->ifp->if_flags &= ~(PP_CISCO);
IFP2SP(d->ifp)->pp_flags |= PP_FR | PP_KEEPALIVE;
+#endif
} else if (! strcmp ("ppp", (char*)data)) {
IFP2SP(d->ifp)->pp_flags &= ~PP_FR;
IFP2SP(d->ifp)->pp_flags &= ~PP_KEEPALIVE;
diff --git a/sys/dev/cfe/cfe_console.c b/sys/dev/cfe/cfe_console.c
index 5a6b0a2..485fd08 100644
--- a/sys/dev/cfe/cfe_console.c
+++ b/sys/dev/cfe/cfe_console.c
@@ -76,6 +76,8 @@ static cn_init_t cfe_cninit;
static cn_term_t cfe_cnterm;
static cn_getc_t cfe_cngetc;
static cn_putc_t cfe_cnputc;
+static cn_grab_t cfe_cngrab;
+static cn_ungrab_t cfe_cnungrab;
CONSOLE_DRIVER(cfe);
@@ -183,6 +185,18 @@ cfe_cnterm(struct consdev *cp)
}
+static void
+cfe_cngrab(struct consdev *cp)
+{
+
+}
+
+static void
+cfe_cnungrab(struct consdev *cp)
+{
+
+}
+
static int
cfe_cngetc(struct consdev *cp)
{
diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c
index b530de1..994daa4 100644
--- a/sys/dev/ciss/ciss.c
+++ b/sys/dev/ciss/ciss.c
@@ -329,6 +329,7 @@ static struct
{ 0x103C, 0x3249, CISS_BOARD_SA5, "HP Smart Array P812" },
{ 0x103C, 0x324A, CISS_BOARD_SA5, "HP Smart Array P712m" },
{ 0x103C, 0x324B, CISS_BOARD_SA5, "HP Smart Array" },
+ { 0x103C, 0x3351, CISS_BOARD_SA5, "HP Smart Array P420" },
{ 0, 0, 0, NULL }
};
@@ -1614,7 +1615,7 @@ ciss_inquiry_logical(struct ciss_softc *sc, struct ciss_ldrive *ld)
inq->opcode = INQUIRY;
inq->byte2 = SI_EVPD;
inq->page_code = CISS_VPD_LOGICAL_DRIVE_GEOMETRY;
- inq->length = sizeof(ld->cl_geometry);
+ scsi_ulto2b(sizeof(ld->cl_geometry), inq->length);
if ((error = ciss_synch_request(cr, 60 * 1000)) != 0) {
ciss_printf(sc, "error getting geometry (%d)\n", error);
diff --git a/sys/dev/cm/smc90cx6.c b/sys/dev/cm/smc90cx6.c
index 719e468..eb89675 100644
--- a/sys/dev/cm/smc90cx6.c
+++ b/sys/dev/cm/smc90cx6.c
@@ -596,7 +596,7 @@ cleanup:
}
}
-__inline static void
+static inline void
cm_tint_locked(sc, isr)
struct cm_softc *sc;
int isr;
diff --git a/sys/dev/cp/if_cp.c b/sys/dev/cp/if_cp.c
index e640230..49e329e 100644
--- a/sys/dev/cp/if_cp.c
+++ b/sys/dev/cp/if_cp.c
@@ -1052,9 +1052,11 @@ static int cp_ioctl (struct cdev *dev, u_long cmd, caddr_t data, int flag, struc
IFP2SP(d->ifp)->pp_flags &= ~(PP_FR);
IFP2SP(d->ifp)->pp_flags |= PP_KEEPALIVE;
d->ifp->if_flags |= PP_CISCO;
- } else if (! strcmp ("fr", (char*)data) && PP_FR) {
+#if PP_FR != 0
+ } else if (! strcmp ("fr", (char*)data)) {
d->ifp->if_flags &= ~(PP_CISCO);
IFP2SP(d->ifp)->pp_flags |= PP_FR | PP_KEEPALIVE;
+#endif
} else if (! strcmp ("ppp", (char*)data)) {
IFP2SP(d->ifp)->pp_flags &= ~PP_FR;
IFP2SP(d->ifp)->pp_flags &= ~PP_KEEPALIVE;
diff --git a/sys/dev/cpuctl/cpuctl.c b/sys/dev/cpuctl/cpuctl.c
index c3a2434..1553457 100644
--- a/sys/dev/cpuctl/cpuctl.c
+++ b/sys/dev/cpuctl/cpuctl.c
@@ -74,6 +74,8 @@ static int cpuctl_do_update(int cpu, cpuctl_update_args_t *data,
static int update_intel(int cpu, cpuctl_update_args_t *args,
struct thread *td);
static int update_amd(int cpu, cpuctl_update_args_t *args, struct thread *td);
+static int update_via(int cpu, cpuctl_update_args_t *args,
+ struct thread *td);
static struct cdev **cpuctl_devs;
static MALLOC_DEFINE(M_CPUCTL, "cpuctl", "CPUCTL buffer");
@@ -281,8 +283,10 @@ cpuctl_do_update(int cpu, cpuctl_update_args_t *data, struct thread *td)
vendor[12] = '\0';
if (strncmp(vendor, INTEL_VENDOR_ID, sizeof(INTEL_VENDOR_ID)) == 0)
ret = update_intel(cpu, data, td);
- else if(strncmp(vendor, INTEL_VENDOR_ID, sizeof(AMD_VENDOR_ID)) == 0)
+ else if(strncmp(vendor, AMD_VENDOR_ID, sizeof(AMD_VENDOR_ID)) == 0)
ret = update_amd(cpu, data, td);
+ else if(strncmp(vendor, CENTAUR_VENDOR_ID, sizeof(CENTAUR_VENDOR_ID)) == 0)
+ ret = update_via(cpu, data, td);
else
ret = ENXIO;
return (ret);
@@ -402,6 +406,81 @@ fail:
return (ret);
}
+static int
+update_via(int cpu, cpuctl_update_args_t *args, struct thread *td)
+{
+ void *ptr = NULL;
+ uint64_t rev0, rev1, res;
+ uint32_t tmp[4];
+ int is_bound = 0;
+ int oldcpu;
+ int ret;
+
+ if (args->size == 0 || args->data == NULL) {
+ DPRINTF("[cpuctl,%d]: zero-sized firmware image", __LINE__);
+ return (EINVAL);
+ }
+ if (args->size > UCODE_SIZE_MAX) {
+ DPRINTF("[cpuctl,%d]: firmware image too large", __LINE__);
+ return (EINVAL);
+ }
+
+ /*
+ * 4 byte alignment required.
+ */
+ ptr = malloc(args->size + 16, M_CPUCTL, M_WAITOK);
+ ptr = (void *)(16 + ((intptr_t)ptr & ~0xf));
+ if (copyin(args->data, ptr, args->size) != 0) {
+ DPRINTF("[cpuctl,%d]: copyin %p->%p of %zd bytes failed",
+ __LINE__, args->data, ptr, args->size);
+ ret = EFAULT;
+ goto fail;
+ }
+ oldcpu = td->td_oncpu;
+ is_bound = cpu_sched_is_bound(td);
+ set_cpu(cpu, td);
+ critical_enter();
+ rdmsr_safe(MSR_BIOS_SIGN, &rev0); /* Get current micorcode revision. */
+
+ /*
+ * Perform update.
+ */
+ wrmsr_safe(MSR_BIOS_UPDT_TRIG, (uintptr_t)(ptr));
+ do_cpuid(1, tmp);
+
+ /*
+ * Result are in low byte of MSR FCR5:
+ * 0x00: No update has been attempted since RESET.
+ * 0x01: The last attempted update was successful.
+ * 0x02: The last attempted update was unsuccessful due to a bad
+ * environment. No update was loaded and any preexisting
+ * patches are still active.
+ * 0x03: The last attempted update was not applicable to this processor.
+ * No update was loaded and any preexisting patches are still
+ * active.
+ * 0x04: The last attempted update was not successful due to an invalid
+ * update data block. No update was loaded and any preexisting
+ * patches are still active
+ */
+ rdmsr_safe(0x1205, &res);
+ res &= 0xff;
+ critical_exit();
+ rdmsr_safe(MSR_BIOS_SIGN, &rev1); /* Get new microcode revision. */
+ restore_cpu(oldcpu, is_bound, td);
+
+ DPRINTF("[cpu,%d]: rev0=%x rev1=%x res=%x\n", __LINE__,
+ (unsigned)(rev0 >> 32), (unsigned)(rev1 >> 32), (unsigned)res);
+
+ if (res != 0x01)
+ ret = EINVAL;
+ else
+ ret = 0;
+fail:
+ if (ptr != NULL)
+ contigfree(ptr, args->size, M_CPUCTL);
+ return (ret);
+}
+
int
cpuctl_open(struct cdev *dev, int flags, int fmt __unused, struct thread *td)
{
diff --git a/sys/dev/cxgb/common/cxgb_aq100x.c b/sys/dev/cxgb/common/cxgb_aq100x.c
index 46f07ca..d36d07a 100644
--- a/sys/dev/cxgb/common/cxgb_aq100x.c
+++ b/sys/dev/cxgb/common/cxgb_aq100x.c
@@ -232,7 +232,7 @@ aq100x_power_down(struct cphy *phy, int off)
err = t3_mdio_change_bits(phy, MDIO_DEV_PMA_PMD, MII_BMCR, BMCR_PDOWN,
off ? BMCR_PDOWN : 0);
if (err || off)
- return (v);
+ return (err);
msleep(300);
do {
diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h
index 8624fc1..7e56932 100644
--- a/sys/dev/cxgbe/adapter.h
+++ b/sys/dev/cxgbe/adapter.h
@@ -31,6 +31,7 @@
#ifndef __T4_ADAPTER_H__
#define __T4_ADAPTER_H__
+#include <sys/kernel.h>
#include <sys/bus.h>
#include <sys/rman.h>
#include <sys/types.h>
@@ -46,8 +47,9 @@
#include <netinet/tcp_lro.h>
#include "offload.h"
-#include "common/t4fw_interface.h"
+#include "firmware/t4fw_interface.h"
+#define T4_CFGNAME "t4fw_cfg"
#define T4_FWNAME "t4fw"
MALLOC_DECLARE(M_CXGBE);
@@ -110,25 +112,21 @@ enum {
FW_IQ_QSIZE = 256,
FW_IQ_ESIZE = 64, /* At least 64 mandated by the firmware spec */
- INTR_IQ_QSIZE = 64,
- INTR_IQ_ESIZE = 64, /* Handles some CPLs too, do not reduce */
-
- CTRL_EQ_QSIZE = 128,
- CTRL_EQ_ESIZE = 64,
-
RX_IQ_QSIZE = 1024,
RX_IQ_ESIZE = 64, /* At least 64 so CPL_RX_PKT will fit */
- RX_FL_ESIZE = 64, /* 8 64bit addresses */
+ EQ_ESIZE = 64, /* All egress queues use this entry size */
+ RX_FL_ESIZE = EQ_ESIZE, /* 8 64bit addresses */
#if MJUMPAGESIZE != MCLBYTES
FL_BUF_SIZES = 4, /* cluster, jumbop, jumbo9k, jumbo16k */
#else
FL_BUF_SIZES = 3, /* cluster, jumbo9k, jumbo16k */
#endif
+ CTRL_EQ_QSIZE = 128,
+
TX_EQ_QSIZE = 1024,
- TX_EQ_ESIZE = 64,
TX_SGL_SEGS = 36,
TX_WR_FLITS = SGE_MAX_WR_LEN / 8
};
@@ -144,13 +142,16 @@ enum {
/* adapter flags */
FULL_INIT_DONE = (1 << 0),
FW_OK = (1 << 1),
- INTR_SHARED = (1 << 2), /* one set of intrq's for all ports */
+ INTR_DIRECT = (1 << 2), /* direct interrupts for everything */
+ MASTER_PF = (1 << 3),
+ ADAP_SYSCTL_CTX = (1 << 4),
CXGBE_BUSY = (1 << 9),
/* port flags */
DOOMED = (1 << 0),
- VI_ENABLED = (1 << 1),
+ PORT_INIT_DONE = (1 << 1),
+ PORT_SYSCTL_CTX = (1 << 2),
};
#define IS_DOOMED(pi) (pi->flags & DOOMED)
@@ -186,6 +187,12 @@ struct port_info {
int first_txq; /* index of first tx queue */
int nrxq; /* # of rx queues */
int first_rxq; /* index of first rx queue */
+#ifndef TCP_OFFLOAD_DISABLE
+ int nofldtxq; /* # of offload tx queues */
+ int first_ofld_txq; /* index of first offload tx queue */
+ int nofldrxq; /* # of offload rx queues */
+ int first_ofld_rxq; /* index of first offload rx queue */
+#endif
int tmr_idx;
int pktc_idx;
int qsize_rxq;
@@ -194,11 +201,8 @@ struct port_info {
struct link_config link_cfg;
struct port_stats stats;
- struct taskqueue *tq;
struct callout tick;
- struct sysctl_ctx_list ctx; /* lives from ifconfig up to down */
- struct sysctl_oid *oid_rxq;
- struct sysctl_oid *oid_txq;
+ struct sysctl_ctx_list ctx; /* from ifconfig up to driver detach */
uint8_t hw_addr[ETHER_ADDR_LEN]; /* factory MAC address, won't change */
};
@@ -222,17 +226,26 @@ struct tx_map {
bus_dmamap_t map;
};
+/* DMA maps used for tx */
+struct tx_maps {
+ struct tx_map *maps;
+ uint32_t map_total; /* # of DMA maps */
+ uint32_t map_pidx; /* next map to be used */
+ uint32_t map_cidx; /* reclaimed up to this index */
+ uint32_t map_avail; /* # of available maps */
+};
+
struct tx_sdesc {
uint8_t desc_used; /* # of hardware descriptors used by the WR */
uint8_t credits; /* NIC txq: # of frames sent out in the WR */
};
-typedef void (iq_intr_handler_t)(void *);
-
enum {
/* iq flags */
- IQ_ALLOCATED = (1 << 1), /* firmware resources allocated */
- IQ_STARTED = (1 << 2), /* started */
+ IQ_ALLOCATED = (1 << 0), /* firmware resources allocated */
+ IQ_HAS_FL = (1 << 1), /* iq associated with a freelist */
+ IQ_INTR = (1 << 2), /* iq takes direct interrupt */
+ IQ_LRO_ENABLED = (1 << 3), /* iq is an eth rxq with LRO enabled */
/* iq state */
IQS_DISABLED = 0,
@@ -252,26 +265,35 @@ struct sge_iq {
uint16_t abs_id; /* absolute SGE id for the iq */
int8_t intr_pktc_idx; /* packet count threshold index */
int8_t pad0;
- iq_intr_handler_t *handler;
__be64 *desc; /* KVA of descriptor ring */
- volatile uint32_t state;
+ volatile int state;
struct adapter *adapter;
const __be64 *cdesc; /* current descriptor */
uint8_t gen; /* generation bit */
uint8_t intr_params; /* interrupt holdoff parameters */
- uint8_t intr_next; /* holdoff for next interrupt */
+ uint8_t intr_next; /* XXX: holdoff for next interrupt */
uint8_t esize; /* size (bytes) of each entry in the queue */
uint16_t qsize; /* size (# of entries) of the queue */
uint16_t cidx; /* consumer index */
- uint16_t cntxt_id; /* SGE context id for the iq */
+ uint16_t cntxt_id; /* SGE context id for the iq */
+
+ STAILQ_ENTRY(sge_iq) link;
};
enum {
+ EQ_CTRL = 1,
+ EQ_ETH = 2,
+#ifndef TCP_OFFLOAD_DISABLE
+ EQ_OFLD = 3,
+#endif
+
/* eq flags */
- EQ_ALLOCATED = (1 << 1), /* firmware resources allocated */
- EQ_STARTED = (1 << 2), /* started */
- EQ_CRFLUSHED = (1 << 3), /* expecting an update from SGE */
+ EQ_TYPEMASK = 7, /* 3 lsbits hold the type */
+ EQ_ALLOCATED = (1 << 3), /* firmware resources allocated */
+ EQ_DOOMED = (1 << 4), /* about to be destroyed */
+ EQ_CRFLUSHED = (1 << 5), /* expecting an update from SGE */
+ EQ_STALLED = (1 << 6), /* out of hw descriptors or dmamaps */
};
/*
@@ -281,10 +303,11 @@ enum {
* consumes them) but it's special enough to have its own struct (see sge_fl).
*/
struct sge_eq {
+ unsigned int flags; /* MUST be first */
+ unsigned int cntxt_id; /* SGE context id for the eq */
bus_dma_tag_t desc_tag;
bus_dmamap_t desc_map;
char lockname[16];
- unsigned int flags;
struct mtx eq_lock;
struct tx_desc *desc; /* KVA of descriptor ring */
@@ -297,9 +320,24 @@ struct sge_eq {
uint16_t pidx; /* producer idx (desc idx) */
uint16_t pending; /* # of descriptors used since last doorbell */
uint16_t iqid; /* iq that gets egr_update for the eq */
- unsigned int cntxt_id; /* SGE context id for the eq */
+ uint8_t tx_chan; /* tx channel used by the eq */
+ struct task tx_task;
+ struct callout tx_callout;
+
+ /* stats */
+
+ uint32_t egr_update; /* # of SGE_EGR_UPDATE notifications for eq */
+ uint32_t unstalled; /* recovered from stall */
+};
+
+enum {
+ FL_STARVING = (1 << 0), /* on the adapter's list of starving fl's */
+ FL_DOOMED = (1 << 1), /* about to be destroyed */
};
+#define FL_RUNNING_LOW(fl) (fl->cap - fl->needed <= fl->lowat)
+#define FL_NOT_RUNNING_LOW(fl) (fl->cap - fl->needed >= 2 * fl->lowat)
+
struct sge_fl {
bus_dma_tag_t desc_tag;
bus_dmamap_t desc_map;
@@ -307,6 +345,7 @@ struct sge_fl {
uint8_t tag_idx;
struct mtx fl_lock;
char lockname[16];
+ int flags;
__be64 *desc; /* KVA of descriptor ring, ptr to addresses */
bus_addr_t ba; /* bus address of descriptor ring */
@@ -317,8 +356,10 @@ struct sge_fl {
uint32_t cidx; /* consumer idx (buffer idx, NOT hw desc idx) */
uint32_t pidx; /* producer idx (buffer idx, NOT hw desc idx) */
uint32_t needed; /* # of buffers needed to fill up fl. */
+ uint32_t lowat; /* # of buffers <= this means fl needs help */
uint32_t pending; /* # of bufs allocated since last doorbell */
unsigned int dmamap_failed;
+ TAILQ_ENTRY(sge_fl) link; /* All starving freelists */
};
/* txq: SGE egress queue + what's needed for Ethernet NIC */
@@ -330,14 +371,8 @@ struct sge_txq {
struct buf_ring *br; /* tx buffer ring */
struct tx_sdesc *sdesc; /* KVA of software descriptor ring */
struct mbuf *m; /* held up due to temporary resource shortage */
- struct task resume_tx;
- /* DMA maps used for tx */
- struct tx_map *maps;
- uint32_t map_total; /* # of DMA maps */
- uint32_t map_pidx; /* next map to be used */
- uint32_t map_cidx; /* reclaimed up to this index */
- uint32_t map_avail; /* # of available maps */
+ struct tx_maps txmaps;
/* stats for common events first */
@@ -354,20 +389,14 @@ struct sge_txq {
uint32_t no_dmamap; /* no DMA map to load the mbuf */
uint32_t no_desc; /* out of hardware descriptors */
- uint32_t egr_update; /* # of SGE_EGR_UPDATE notifications for txq */
} __aligned(CACHE_LINE_SIZE);
-enum {
- RXQ_LRO_ENABLED = (1 << 0)
-};
-
/* rxq: SGE ingress queue + SGE free list + miscellaneous items */
struct sge_rxq {
struct sge_iq iq; /* MUST be first */
- struct sge_fl fl;
+ struct sge_fl fl; /* MUST follow iq */
struct ifnet *ifp; /* the interface this rxq belongs to */
- unsigned int flags;
#ifdef INET
struct lro_ctrl lro; /* LRO state */
#endif
@@ -381,12 +410,28 @@ struct sge_rxq {
} __aligned(CACHE_LINE_SIZE);
-/* ctrlq: SGE egress queue + stats for control queue */
-struct sge_ctrlq {
+#ifndef TCP_OFFLOAD_DISABLE
+/* ofld_rxq: SGE ingress queue + SGE free list + miscellaneous items */
+struct sge_ofld_rxq {
+ struct sge_iq iq; /* MUST be first */
+ struct sge_fl fl; /* MUST follow iq */
+} __aligned(CACHE_LINE_SIZE);
+#endif
+
+/*
+ * wrq: SGE egress queue that is given prebuilt work requests. Both the control
+ * and offload tx queues are of this type.
+ */
+struct sge_wrq {
struct sge_eq eq; /* MUST be first */
+ struct adapter *adapter;
+ struct mbuf *head; /* held up due to lack of descriptors */
+ struct mbuf *tail; /* valid only if head is valid */
+
/* stats for common events first */
+ uint64_t tx_wrs; /* # of tx work requests */
/* stats for not-that-common events */
@@ -394,20 +439,28 @@ struct sge_ctrlq {
} __aligned(CACHE_LINE_SIZE);
struct sge {
- uint16_t timer_val[SGE_NTIMERS];
- uint8_t counter_val[SGE_NCOUNTERS];
+ int timer_val[SGE_NTIMERS];
+ int counter_val[SGE_NCOUNTERS];
int fl_starve_threshold;
- int nrxq; /* total rx queues (all ports and the rest) */
- int ntxq; /* total tx queues (all ports and the rest) */
- int niq; /* total ingress queues */
- int neq; /* total egress queues */
+ int nrxq; /* total # of Ethernet rx queues */
+ int ntxq; /* total # of Ethernet tx tx queues */
+#ifndef TCP_OFFLOAD_DISABLE
+ int nofldrxq; /* total # of TOE rx queues */
+ int nofldtxq; /* total # of TOE tx queues */
+#endif
+ int niq; /* total # of ingress queues */
+ int neq; /* total # of egress queues */
struct sge_iq fwq; /* Firmware event queue */
- struct sge_ctrlq *ctrlq;/* Control queues */
- struct sge_iq *intrq; /* Interrupt queues */
+ struct sge_wrq mgmtq; /* Management queue (control queue) */
+ struct sge_wrq *ctrlq; /* Control queues */
struct sge_txq *txq; /* NIC tx queues */
struct sge_rxq *rxq; /* NIC rx queues */
+#ifndef TCP_OFFLOAD_DISABLE
+ struct sge_wrq *ofld_txq; /* TOE tx queues */
+ struct sge_ofld_rxq *ofld_rxq; /* TOE rx queues */
+#endif
uint16_t iq_start;
int eq_start;
@@ -415,7 +468,12 @@ struct sge {
struct sge_eq **eqmap; /* eq->cntxt_id to eq mapping */
};
+struct rss_header;
+typedef int (*cpl_handler_t)(struct sge_iq *, const struct rss_header *,
+ struct mbuf *);
+
struct adapter {
+ SLIST_ENTRY(adapter) link;
device_t dev;
struct cdev *cdev;
@@ -444,27 +502,47 @@ struct adapter {
struct sge sge;
+ struct taskqueue *tq[NCHAN]; /* taskqueues that flush data out */
struct port_info *port[MAX_NPORTS];
uint8_t chan_map[NCHAN];
+ uint32_t filter_mode;
+#ifndef TCP_OFFLOAD_DISABLE
+ struct uld_softc tom;
+ struct tom_tunables tt;
+#endif
struct l2t_data *l2t; /* L2 table */
struct tid_info tids;
- int registered_device_map;
int open_device_map;
+#ifndef TCP_OFFLOAD_DISABLE
+ int offload_map;
+#endif
int flags;
char fw_version[32];
+ unsigned int cfcsum;
struct adapter_params params;
struct t4_virt_res vres;
- struct sysctl_ctx_list ctx; /* from first_port_up to last_port_down */
- struct sysctl_oid *oid_fwq;
- struct sysctl_oid *oid_ctrlq;
- struct sysctl_oid *oid_intrq;
+ uint16_t linkcaps;
+ uint16_t niccaps;
+ uint16_t toecaps;
+ uint16_t rdmacaps;
+ uint16_t iscsicaps;
+ uint16_t fcoecaps;
+
+ struct sysctl_ctx_list ctx; /* from adapter_full_init to full_uninit */
struct mtx sc_lock;
char lockname[16];
+
+ /* Starving free lists */
+ struct mtx sfl_lock; /* same cache-line as sc_lock? but that's ok */
+ TAILQ_HEAD(, sge_fl) sfl;
+ struct callout sfl_callout;
+
+ cpl_handler_t cpl_handler[256] __aligned(CACHE_LINE_SIZE);
};
#define ADAPTER_LOCK(sc) mtx_lock(&(sc)->sc_lock)
@@ -506,11 +584,15 @@ struct adapter {
#define for_each_rxq(pi, iter, rxq) \
rxq = &pi->adapter->sge.rxq[pi->first_rxq]; \
for (iter = 0; iter < pi->nrxq; ++iter, ++rxq)
+#define for_each_ofld_txq(pi, iter, ofld_txq) \
+ ofld_txq = &pi->adapter->sge.ofld_txq[pi->first_ofld_txq]; \
+ for (iter = 0; iter < pi->nofldtxq; ++iter, ++ofld_txq)
+#define for_each_ofld_rxq(pi, iter, ofld_rxq) \
+ ofld_rxq = &pi->adapter->sge.ofld_rxq[pi->first_ofld_rxq]; \
+ for (iter = 0; iter < pi->nofldrxq; ++iter, ++ofld_rxq)
/* One for errors, one for firmware events */
#define T4_EXTRA_INTR 2
-#define NINTRQ(sc) ((sc)->intr_count > T4_EXTRA_INTR ? \
- (sc)->intr_count - T4_EXTRA_INTR : 1)
static inline uint32_t
t4_read_reg(struct adapter *sc, uint32_t reg)
@@ -589,29 +671,52 @@ static inline bool is_10G_port(const struct port_info *pi)
return ((pi->link_cfg.supported & FW_PORT_CAP_SPEED_10G) != 0);
}
+static inline int tx_resume_threshold(struct sge_eq *eq)
+{
+ return (eq->qsize / 4);
+}
+
/* t4_main.c */
-void cxgbe_txq_start(void *, int);
+void t4_tx_task(void *, int);
+void t4_tx_callout(void *);
int t4_os_find_pci_capability(struct adapter *, int);
int t4_os_pci_save_state(struct adapter *);
int t4_os_pci_restore_state(struct adapter *);
void t4_os_portmod_changed(const struct adapter *, int);
void t4_os_link_changed(struct adapter *, int, int);
+void t4_iterate(void (*)(struct adapter *, void *), void *);
+int t4_register_cpl_handler(struct adapter *, int, cpl_handler_t);
/* t4_sge.c */
void t4_sge_modload(void);
-void t4_sge_init(struct adapter *);
+int t4_sge_init(struct adapter *);
int t4_create_dma_tag(struct adapter *);
int t4_destroy_dma_tag(struct adapter *);
int t4_setup_adapter_queues(struct adapter *);
int t4_teardown_adapter_queues(struct adapter *);
-int t4_setup_eth_queues(struct port_info *);
-int t4_teardown_eth_queues(struct port_info *);
+int t4_setup_port_queues(struct port_info *);
+int t4_teardown_port_queues(struct port_info *);
+int t4_alloc_tx_maps(struct tx_maps *, bus_dma_tag_t, int, int);
+void t4_free_tx_maps(struct tx_maps *, bus_dma_tag_t);
void t4_intr_all(void *);
void t4_intr(void *);
void t4_intr_err(void *);
void t4_intr_evt(void *);
int t4_mgmt_tx(struct adapter *, struct mbuf *);
+int t4_wrq_tx_locked(struct adapter *, struct sge_wrq *, struct mbuf *);
int t4_eth_tx(struct ifnet *, struct sge_txq *, struct mbuf *);
void t4_update_fl_bufsize(struct ifnet *);
+int can_resume_tx(struct sge_eq *);
+
+static inline int t4_wrq_tx(struct adapter *sc, struct sge_wrq *wrq, struct mbuf *m)
+{
+ int rc;
+
+ TXQ_LOCK(wrq);
+ rc = t4_wrq_tx_locked(sc, wrq, m);
+ TXQ_UNLOCK(wrq);
+ return (rc);
+}
+
#endif
diff --git a/sys/dev/cxgbe/common/common.h b/sys/dev/cxgbe/common/common.h
index 913be9b..81866df 100644
--- a/sys/dev/cxgbe/common/common.h
+++ b/sys/dev/cxgbe/common/common.h
@@ -42,6 +42,15 @@ enum {
enum { MEM_EDC0, MEM_EDC1, MEM_MC };
+enum {
+ MEMWIN0_APERTURE = 2048,
+ MEMWIN0_BASE = 0x1b800,
+ MEMWIN1_APERTURE = 32768,
+ MEMWIN1_BASE = 0x28000,
+ MEMWIN2_APERTURE = 65536,
+ MEMWIN2_BASE = 0x30000,
+};
+
enum dev_master { MASTER_CANT, MASTER_MAY, MASTER_MUST };
enum dev_state { DEV_STATE_UNINIT, DEV_STATE_INIT, DEV_STATE_ERR };
@@ -53,8 +62,8 @@ enum {
};
#define FW_VERSION_MAJOR 1
-#define FW_VERSION_MINOR 3
-#define FW_VERSION_MICRO 10
+#define FW_VERSION_MINOR 4
+#define FW_VERSION_MICRO 16
struct port_stats {
u64 tx_octets; /* total # of octets in good frames */
@@ -190,7 +199,6 @@ struct tp_proxy_stats {
struct tp_cpl_stats {
u32 req[4];
u32 rsp[4];
- u32 tx_err[4];
};
struct tp_rdma_stats {
@@ -214,9 +222,9 @@ struct vpd_params {
};
struct pci_params {
- unsigned int vpd_cap_addr;
- unsigned char speed;
- unsigned char width;
+ unsigned int vpd_cap_addr;
+ unsigned short speed;
+ unsigned short width;
};
/*
@@ -239,20 +247,20 @@ struct adapter_params {
unsigned int fw_vers;
unsigned int tp_vers;
- u8 api_vers[7];
unsigned short mtus[NMTUS];
unsigned short a_wnd[NCCTRL_WIN];
unsigned short b_wnd[NCCTRL_WIN];
- unsigned int mc_size; /* MC memory size */
- unsigned int nfilters; /* size of filter region */
+ unsigned int mc_size; /* MC memory size */
+ unsigned int nfilters; /* size of filter region */
unsigned int cim_la_size;
- unsigned int nports; /* # of ethernet ports */
+ /* Used as int in sysctls, do not reduce size */
+ unsigned int nports; /* # of ethernet ports */
unsigned int portvec;
- unsigned int rev; /* chip revision */
+ unsigned int rev; /* chip revision */
unsigned int offload;
unsigned int ofldq_wr_cred;
@@ -366,6 +374,9 @@ int t4_seeprom_wp(struct adapter *adapter, int enable);
int t4_read_flash(struct adapter *adapter, unsigned int addr, unsigned int nwords,
u32 *data, int byte_oriented);
int t4_load_fw(struct adapter *adapter, const u8 *fw_data, unsigned int size);
+int t4_load_boot(struct adapter *adap, const u8 *boot_data,
+ unsigned int boot_addr, unsigned int size);
+unsigned int t4_flash_cfg_addr(struct adapter *adapter);
int t4_load_cfg(struct adapter *adapter, const u8 *cfg_data, unsigned int size);
int t4_get_fw_version(struct adapter *adapter, u32 *vers);
int t4_get_tp_version(struct adapter *adapter, u32 *vers);
@@ -460,8 +471,8 @@ int t4_wol_pat_enable(struct adapter *adap, unsigned int port, unsigned int map,
int t4_fw_hello(struct adapter *adap, unsigned int mbox, unsigned int evt_mbox,
enum dev_master master, enum dev_state *state);
int t4_fw_bye(struct adapter *adap, unsigned int mbox);
-int t4_early_init(struct adapter *adap, unsigned int mbox);
int t4_fw_reset(struct adapter *adap, unsigned int mbox, int reset);
+int t4_fw_initialize(struct adapter *adap, unsigned int mbox);
int t4_query_params(struct adapter *adap, unsigned int mbox, unsigned int pf,
unsigned int vf, unsigned int nparams, const u32 *params,
u32 *val);
diff --git a/sys/dev/cxgbe/common/t4_hw.c b/sys/dev/cxgbe/common/t4_hw.c
index dd8d0fc..48462aa 100644
--- a/sys/dev/cxgbe/common/t4_hw.c
+++ b/sys/dev/cxgbe/common/t4_hw.c
@@ -30,10 +30,10 @@ __FBSDID("$FreeBSD$");
#include "common.h"
#include "t4_regs.h"
#include "t4_regs_values.h"
-#include "t4fw_interface.h"
+#include "firmware/t4fw_interface.h"
#undef msleep
-#define msleep(x) DELAY((x) * 1000)
+#define msleep(x) pause("t4hw", (x) * hz / 1000)
/**
* t4_wait_op_done_val - wait until an operation is completed
@@ -187,7 +187,7 @@ int t4_wr_mbox_meat(struct adapter *adap, int mbox, const void *cmd, int size,
* off to larger delays to a maximum retry delay.
*/
static const int delay[] = {
- 1, 1, 3, 5, 10, 10, 20, 50, 100, 200
+ 1, 1, 3, 5, 10, 10, 20, 50, 100
};
u32 v;
@@ -625,17 +625,6 @@ enum {
SF_RD_DATA_FAST = 0xb, /* read flash */
SF_RD_ID = 0x9f, /* read ID */
SF_ERASE_SECTOR = 0xd8, /* erase sector */
-
- FW_START_SEC = 8, /* first flash sector for FW */
- FW_END_SEC = 15, /* last flash sector for FW */
- FW_IMG_START = FW_START_SEC * SF_SEC_SIZE,
- FW_MAX_SIZE = (FW_END_SEC - FW_START_SEC + 1) * SF_SEC_SIZE,
-
- FLASH_CFG_MAX_SIZE = 0x10000 , /* max size of the flash config file */
- FLASH_CFG_OFFSET = 0x1f0000,
- FLASH_CFG_START_SEC = FLASH_CFG_OFFSET / SF_SEC_SIZE,
- FPGA_FLASH_CFG_OFFSET = 0xf0000 , /* if FPGA mode, then cfg file is at 1MB - 64KB */
- FPGA_FLASH_CFG_START_SEC = FPGA_FLASH_CFG_OFFSET / SF_SEC_SIZE,
};
/**
@@ -763,12 +752,15 @@ int t4_read_flash(struct adapter *adapter, unsigned int addr,
* @addr: the start address to write
* @n: length of data to write in bytes
* @data: the data to write
+ * @byte_oriented: whether to store data as bytes or as words
*
* Writes up to a page of data (256 bytes) to the serial flash starting
* at the given address. All the data must be written to the same page.
+ * If @byte_oriented is set the write data is stored as byte stream
+ * (i.e. matches what on disk), otherwise in big-endian.
*/
static int t4_write_flash(struct adapter *adapter, unsigned int addr,
- unsigned int n, const u8 *data)
+ unsigned int n, const u8 *data, int byte_oriented)
{
int ret;
u32 buf[SF_PAGE_SIZE / 4];
@@ -788,6 +780,9 @@ static int t4_write_flash(struct adapter *adapter, unsigned int addr,
for (val = 0, i = 0; i < c; ++i)
val = (val << 8) + *data++;
+ if (!byte_oriented)
+ val = htonl(val);
+
ret = sf1_write(adapter, c, c != left, 1, val);
if (ret)
goto unlock;
@@ -799,7 +794,8 @@ static int t4_write_flash(struct adapter *adapter, unsigned int addr,
t4_write_reg(adapter, A_SF_OP, 0); /* unlock SF */
/* Read the page to verify the write succeeded */
- ret = t4_read_flash(adapter, addr & ~0xff, ARRAY_SIZE(buf), buf, 1);
+ ret = t4_read_flash(adapter, addr & ~0xff, ARRAY_SIZE(buf), buf,
+ byte_oriented);
if (ret)
return ret;
@@ -825,7 +821,7 @@ unlock:
int t4_get_fw_version(struct adapter *adapter, u32 *vers)
{
return t4_read_flash(adapter,
- FW_IMG_START + offsetof(struct fw_hdr, fw_ver), 1,
+ FLASH_FW_START + offsetof(struct fw_hdr, fw_ver), 1,
vers, 0);
}
@@ -838,7 +834,7 @@ int t4_get_fw_version(struct adapter *adapter, u32 *vers)
*/
int t4_get_tp_version(struct adapter *adapter, u32 *vers)
{
- return t4_read_flash(adapter, FW_IMG_START + offsetof(struct fw_hdr,
+ return t4_read_flash(adapter, FLASH_FW_START + offsetof(struct fw_hdr,
tp_microcode_ver),
1, vers, 0);
}
@@ -854,24 +850,17 @@ int t4_get_tp_version(struct adapter *adapter, u32 *vers)
*/
int t4_check_fw_version(struct adapter *adapter)
{
- u32 api_vers[2];
int ret, major, minor, micro;
ret = t4_get_fw_version(adapter, &adapter->params.fw_vers);
if (!ret)
ret = t4_get_tp_version(adapter, &adapter->params.tp_vers);
- if (!ret)
- ret = t4_read_flash(adapter,
- FW_IMG_START + offsetof(struct fw_hdr, intfver_nic),
- 2, api_vers, 1);
if (ret)
return ret;
major = G_FW_HDR_FW_VER_MAJOR(adapter->params.fw_vers);
minor = G_FW_HDR_FW_VER_MINOR(adapter->params.fw_vers);
micro = G_FW_HDR_FW_VER_MICRO(adapter->params.fw_vers);
- memcpy(adapter->params.api_vers, api_vers,
- sizeof(adapter->params.api_vers));
if (major != FW_VERSION_MAJOR) { /* major mismatch - fail */
CH_ERR(adapter, "card FW has major version %u, driver wants "
@@ -914,6 +903,21 @@ static int t4_flash_erase_sectors(struct adapter *adapter, int start, int end)
}
/**
+ * t4_flash_cfg_addr - return the address of the flash configuration file
+ * @adapter: the adapter
+ *
+ * Return the address within the flash where the Firmware Configuration
+ * File is stored.
+ */
+unsigned int t4_flash_cfg_addr(struct adapter *adapter)
+{
+ if (adapter->params.sf_size == 0x100000)
+ return FLASH_FPGA_CFG_START;
+ else
+ return FLASH_CFG_START;
+}
+
+/**
* t4_load_cfg - download config file
* @adap: the adapter
* @cfg_data: the cfg text file to write
@@ -928,17 +932,8 @@ int t4_load_cfg(struct adapter *adap, const u8 *cfg_data, unsigned int size)
unsigned int flash_cfg_start_sec;
unsigned int sf_sec_size = adap->params.sf_size / adap->params.sf_nsec;
- if (adap->params.sf_size == 0x100000) {
- addr = FPGA_FLASH_CFG_OFFSET;
- flash_cfg_start_sec = FPGA_FLASH_CFG_START_SEC;
- } else {
- addr = FLASH_CFG_OFFSET;
- flash_cfg_start_sec = FLASH_CFG_START_SEC;
- }
- if (!size) {
- CH_ERR(adap, "cfg file has no data\n");
- return -EINVAL;
- }
+ addr = t4_flash_cfg_addr(adap);
+ flash_cfg_start_sec = addr / SF_SEC_SIZE;
if (size > FLASH_CFG_MAX_SIZE) {
CH_ERR(adap, "cfg file too large, max is %u bytes\n",
@@ -950,7 +945,11 @@ int t4_load_cfg(struct adapter *adap, const u8 *cfg_data, unsigned int size)
sf_sec_size);
ret = t4_flash_erase_sectors(adap, flash_cfg_start_sec,
flash_cfg_start_sec + i - 1);
- if (ret)
+ /*
+ * If size == 0 then we're simply erasing the FLASH sectors associated
+ * with the on-adapter Firmware Configuration File.
+ */
+ if (ret || size == 0)
goto out;
/* this will write to the flash up to SF_PAGE_SIZE at a time */
@@ -959,7 +958,7 @@ int t4_load_cfg(struct adapter *adap, const u8 *cfg_data, unsigned int size)
n = size - i;
else
n = SF_PAGE_SIZE;
- ret = t4_write_flash(adap, addr, n, cfg_data);
+ ret = t4_write_flash(adap, addr, n, cfg_data, 1);
if (ret)
goto out;
@@ -969,7 +968,8 @@ int t4_load_cfg(struct adapter *adap, const u8 *cfg_data, unsigned int size)
out:
if (ret)
- CH_ERR(adap, "config file download failed %d\n", ret);
+ CH_ERR(adap, "config file %s failed %d\n",
+ (size == 0 ? "clear" : "download"), ret);
return ret;
}
@@ -1004,9 +1004,9 @@ int t4_load_fw(struct adapter *adap, const u8 *fw_data, unsigned int size)
CH_ERR(adap, "FW image size differs from size in FW header\n");
return -EINVAL;
}
- if (size > FW_MAX_SIZE) {
+ if (size > FLASH_FW_MAX_SIZE) {
CH_ERR(adap, "FW image too large, max is %u bytes\n",
- FW_MAX_SIZE);
+ FLASH_FW_MAX_SIZE);
return -EFBIG;
}
@@ -1020,7 +1020,8 @@ int t4_load_fw(struct adapter *adap, const u8 *fw_data, unsigned int size)
}
i = DIV_ROUND_UP(size, sf_sec_size); /* # of sectors spanned */
- ret = t4_flash_erase_sectors(adap, FW_START_SEC, FW_START_SEC + i - 1);
+ ret = t4_flash_erase_sectors(adap, FLASH_FW_START_SEC,
+ FLASH_FW_START_SEC + i - 1);
if (ret)
goto out;
@@ -1031,28 +1032,110 @@ int t4_load_fw(struct adapter *adap, const u8 *fw_data, unsigned int size)
*/
memcpy(first_page, fw_data, SF_PAGE_SIZE);
((struct fw_hdr *)first_page)->fw_ver = htonl(0xffffffff);
- ret = t4_write_flash(adap, FW_IMG_START, SF_PAGE_SIZE, first_page);
+ ret = t4_write_flash(adap, FLASH_FW_START, SF_PAGE_SIZE, first_page, 1);
if (ret)
goto out;
- addr = FW_IMG_START;
+ addr = FLASH_FW_START;
for (size -= SF_PAGE_SIZE; size; size -= SF_PAGE_SIZE) {
addr += SF_PAGE_SIZE;
fw_data += SF_PAGE_SIZE;
- ret = t4_write_flash(adap, addr, SF_PAGE_SIZE, fw_data);
+ ret = t4_write_flash(adap, addr, SF_PAGE_SIZE, fw_data, 1);
if (ret)
goto out;
}
ret = t4_write_flash(adap,
- FW_IMG_START + offsetof(struct fw_hdr, fw_ver),
- sizeof(hdr->fw_ver), (const u8 *)&hdr->fw_ver);
+ FLASH_FW_START + offsetof(struct fw_hdr, fw_ver),
+ sizeof(hdr->fw_ver), (const u8 *)&hdr->fw_ver, 1);
out:
if (ret)
CH_ERR(adap, "firmware download failed, error %d\n", ret);
return ret;
}
+/* BIOS boot header */
+typedef struct boot_header_s {
+ u8 signature[2]; /* signature */
+ u8 length; /* image length (include header) */
+ u8 offset[4]; /* initialization vector */
+ u8 reserved[19]; /* reserved */
+ u8 exheader[2]; /* offset to expansion header */
+} boot_header_t;
+
+enum {
+ BOOT_FLASH_BOOT_ADDR = 0x0,/* start address of boot image in flash */
+ BOOT_SIGNATURE = 0xaa55, /* signature of BIOS boot ROM */
+ BOOT_SIZE_INC = 512, /* image size measured in 512B chunks */
+ BOOT_MIN_SIZE = sizeof(boot_header_t), /* at least basic header */
+ BOOT_MAX_SIZE = 1024*BOOT_SIZE_INC /* 1 byte * length increment */
+};
+
+/*
+ * t4_load_boot - download boot flash
+ * @adapter: the adapter
+ * @boot_data: the boot image to write
+ * @size: image size
+ *
+ * Write the supplied boot image to the card's serial flash.
+ * The boot image has the following sections: a 28-byte header and the
+ * boot image.
+ */
+int t4_load_boot(struct adapter *adap, const u8 *boot_data,
+ unsigned int boot_addr, unsigned int size)
+{
+ int ret, addr;
+ unsigned int i;
+ unsigned int boot_sector = boot_addr * 1024;
+ unsigned int sf_sec_size = adap->params.sf_size / adap->params.sf_nsec;
+
+ /*
+ * Perform some primitive sanity testing to avoid accidentally
+ * writing garbage over the boot sectors. We ought to check for
+ * more but it's not worth it for now ...
+ */
+ if (size < BOOT_MIN_SIZE || size > BOOT_MAX_SIZE) {
+ CH_ERR(adap, "boot image too small/large\n");
+ return -EFBIG;
+ }
+
+ /*
+ * Make sure the boot image does not encroach on the firmware region
+ */
+ if ((boot_sector + size) >> 16 > FLASH_FW_START_SEC) {
+ CH_ERR(adap, "boot image encroaching on firmware region\n");
+ return -EFBIG;
+ }
+
+ i = DIV_ROUND_UP(size, sf_sec_size); /* # of sectors spanned */
+ ret = t4_flash_erase_sectors(adap, boot_sector >> 16,
+ (boot_sector >> 16) + i - 1);
+ if (ret)
+ goto out;
+
+ /*
+ * Skip over the first SF_PAGE_SIZE worth of data and write it after
+ * we finish copying the rest of the boot image. This will ensure
+ * that the BIOS boot header will only be written if the boot image
+ * was written in full.
+ */
+ addr = boot_sector;
+ for (size -= SF_PAGE_SIZE; size; size -= SF_PAGE_SIZE) {
+ addr += SF_PAGE_SIZE;
+ boot_data += SF_PAGE_SIZE;
+ ret = t4_write_flash(adap, addr, SF_PAGE_SIZE, boot_data, 0);
+ if (ret)
+ goto out;
+ }
+
+ ret = t4_write_flash(adap, boot_sector, SF_PAGE_SIZE, boot_data, 0);
+
+out:
+ if (ret)
+ CH_ERR(adap, "boot image download failed, error %d\n", ret);
+ return ret;
+}
+
/**
* t4_read_cimq_cfg - read CIM queue configuration
* @adap: the adapter
@@ -1668,7 +1751,10 @@ static void sge_intr_handler(struct adapter *adapter)
err = t4_read_reg(adapter, A_SGE_ERROR_STATS);
if (err & F_ERROR_QID_VALID) {
CH_ERR(adapter, "SGE error for queue %u\n", G_ERROR_QID(err));
- t4_write_reg(adapter, A_SGE_ERROR_STATS, F_ERROR_QID_VALID);
+ if (err & F_UNCAPTURED_ERROR)
+ CH_ERR(adapter, "SGE UNCAPTURED_ERROR set (clearing)\n");
+ t4_write_reg(adapter, A_SGE_ERROR_STATS, F_ERROR_QID_VALID |
+ F_UNCAPTURED_ERROR);
}
if (v != 0)
@@ -2261,6 +2347,7 @@ int t4_config_rss_range(struct adapter *adapter, int mbox, unsigned int viid,
*/
while (n > 0) {
int nq = min(n, 32);
+ int nq_packed = 0;
__be32 *qp = &cmd.iq0_to_iq2;
/*
@@ -2282,25 +2369,28 @@ int t4_config_rss_range(struct adapter *adapter, int mbox, unsigned int viid,
* Ingress Queue ID array and insert them into the command.
*/
while (nq > 0) {
- unsigned int v;
/*
* Grab up to the next 3 Ingress Queue IDs (wrapping
* around the Ingress Queue ID array if necessary) and
* insert them into the firmware RSS command at the
* current 3-tuple position within the commad.
*/
- v = V_FW_RSS_IND_TBL_CMD_IQ0(*rsp);
- if (++rsp >= rsp_end)
- rsp = rspq;
- v |= V_FW_RSS_IND_TBL_CMD_IQ1(*rsp);
- if (++rsp >= rsp_end)
- rsp = rspq;
- v |= V_FW_RSS_IND_TBL_CMD_IQ2(*rsp);
- if (++rsp >= rsp_end)
- rsp = rspq;
-
- *qp++ = htonl(v);
- nq -= 3;
+ u16 qbuf[3];
+ u16 *qbp = qbuf;
+ int nqbuf = min(3, nq);
+
+ nq -= nqbuf;
+ qbuf[0] = qbuf[1] = qbuf[2] = 0;
+ while (nqbuf && nq_packed < 32) {
+ nqbuf--;
+ nq_packed++;
+ *qbp++ = *rsp++;
+ if (rsp >= rsp_end)
+ rsp = rspq;
+ }
+ *qp++ = cpu_to_be32(V_FW_RSS_IND_TBL_CMD_IQ0(qbuf[0]) |
+ V_FW_RSS_IND_TBL_CMD_IQ1(qbuf[1]) |
+ V_FW_RSS_IND_TBL_CMD_IQ2(qbuf[2]));
}
/*
@@ -2694,8 +2784,6 @@ void t4_tp_get_cpl_stats(struct adapter *adap, struct tp_cpl_stats *st)
{
t4_read_indirect(adap, A_TP_MIB_INDEX, A_TP_MIB_DATA, st->req,
8, A_TP_MIB_CPL_IN_REQ_0);
- t4_read_indirect(adap, A_TP_MIB_INDEX, A_TP_MIB_DATA, st->tx_err,
- 4, A_TP_MIB_CPL_OUT_ERR_0);
}
/**
@@ -3298,6 +3386,7 @@ void t4_get_port_stats(struct adapter *adap, int idx, struct port_stats *p)
t4_read_reg64(adap, PORT_REG(idx, A_MPS_PORT_STAT_##name##_L))
#define GET_STAT_COM(name) t4_read_reg64(adap, A_MPS_STAT_##name##_L)
+ p->tx_pause = GET_STAT(TX_PORT_PAUSE);
p->tx_octets = GET_STAT(TX_PORT_BYTES);
p->tx_frames = GET_STAT(TX_PORT_FRAMES);
p->tx_bcast_frames = GET_STAT(TX_PORT_BCAST);
@@ -3312,7 +3401,6 @@ void t4_get_port_stats(struct adapter *adap, int idx, struct port_stats *p)
p->tx_frames_1024_1518 = GET_STAT(TX_PORT_1024B_1518B);
p->tx_frames_1519_max = GET_STAT(TX_PORT_1519B_MAX);
p->tx_drop = GET_STAT(TX_PORT_DROP);
- p->tx_pause = GET_STAT(TX_PORT_PAUSE);
p->tx_ppp0 = GET_STAT(TX_PORT_PPP0);
p->tx_ppp1 = GET_STAT(TX_PORT_PPP1);
p->tx_ppp2 = GET_STAT(TX_PORT_PPP2);
@@ -3322,6 +3410,7 @@ void t4_get_port_stats(struct adapter *adap, int idx, struct port_stats *p)
p->tx_ppp6 = GET_STAT(TX_PORT_PPP6);
p->tx_ppp7 = GET_STAT(TX_PORT_PPP7);
+ p->rx_pause = GET_STAT(RX_PORT_PAUSE);
p->rx_octets = GET_STAT(RX_PORT_BYTES);
p->rx_frames = GET_STAT(RX_PORT_FRAMES);
p->rx_bcast_frames = GET_STAT(RX_PORT_BCAST);
@@ -3340,7 +3429,6 @@ void t4_get_port_stats(struct adapter *adap, int idx, struct port_stats *p)
p->rx_frames_512_1023 = GET_STAT(RX_PORT_512B_1023B);
p->rx_frames_1024_1518 = GET_STAT(RX_PORT_1024B_1518B);
p->rx_frames_1519_max = GET_STAT(RX_PORT_1519B_MAX);
- p->rx_pause = GET_STAT(RX_PORT_PAUSE);
p->rx_ppp0 = GET_STAT(RX_PORT_PPP0);
p->rx_ppp1 = GET_STAT(RX_PORT_PPP1);
p->rx_ppp2 = GET_STAT(RX_PORT_PPP2);
@@ -3683,28 +3771,114 @@ int t4_fw_hello(struct adapter *adap, unsigned int mbox, unsigned int evt_mbox,
{
int ret;
struct fw_hello_cmd c;
+ u32 v;
+ unsigned int master_mbox;
+ int retries = FW_CMD_HELLO_RETRIES;
+retry:
memset(&c, 0, sizeof(c));
INIT_CMD(c, HELLO, WRITE);
- c.err_to_mbasyncnot = htonl(
+ c.err_to_clearinit = htonl(
V_FW_HELLO_CMD_MASTERDIS(master == MASTER_CANT) |
V_FW_HELLO_CMD_MASTERFORCE(master == MASTER_MUST) |
V_FW_HELLO_CMD_MBMASTER(master == MASTER_MUST ? mbox :
M_FW_HELLO_CMD_MBMASTER) |
- V_FW_HELLO_CMD_MBASYNCNOT(evt_mbox));
+ V_FW_HELLO_CMD_MBASYNCNOT(evt_mbox) |
+ V_FW_HELLO_CMD_STAGE(FW_HELLO_CMD_STAGE_OS) |
+ F_FW_HELLO_CMD_CLEARINIT);
+ /*
+ * Issue the HELLO command to the firmware. If it's not successful
+ * but indicates that we got a "busy" or "timeout" condition, retry
+ * the HELLO until we exhaust our retry limit.
+ */
ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), &c);
- if (ret == 0 && state) {
- u32 v = ntohl(c.err_to_mbasyncnot);
- if (v & F_FW_HELLO_CMD_INIT)
- *state = DEV_STATE_INIT;
- else if (v & F_FW_HELLO_CMD_ERR)
+ if (ret != FW_SUCCESS) {
+ if ((ret == -EBUSY || ret == -ETIMEDOUT) && retries-- > 0)
+ goto retry;
+ return ret;
+ }
+
+ v = ntohl(c.err_to_clearinit);
+ master_mbox = G_FW_HELLO_CMD_MBMASTER(v);
+ if (state) {
+ if (v & F_FW_HELLO_CMD_ERR)
*state = DEV_STATE_ERR;
+ else if (v & F_FW_HELLO_CMD_INIT)
+ *state = DEV_STATE_INIT;
else
*state = DEV_STATE_UNINIT;
- return G_FW_HELLO_CMD_MBMASTER(v);
}
- return ret;
+
+ /*
+ * If we're not the Master PF then we need to wait around for the
+ * Master PF Driver to finish setting up the adapter.
+ *
+ * Note that we also do this wait if we're a non-Master-capable PF and
+ * there is no current Master PF; a Master PF may show up momentarily
+ * and we wouldn't want to fail pointlessly. (This can happen when an
+ * OS loads lots of different drivers rapidly at the same time). In
+ * this case, the Master PF returned by the firmware will be
+ * M_PCIE_FW_MASTER so the test below will work ...
+ */
+ if ((v & (F_FW_HELLO_CMD_ERR|F_FW_HELLO_CMD_INIT)) == 0 &&
+ master_mbox != mbox) {
+ int waiting = FW_CMD_HELLO_TIMEOUT;
+
+ /*
+ * Wait for the firmware to either indicate an error or
+ * initialized state. If we see either of these we bail out
+ * and report the issue to the caller. If we exhaust the
+ * "hello timeout" and we haven't exhausted our retries, try
+ * again. Otherwise bail with a timeout error.
+ */
+ for (;;) {
+ u32 pcie_fw;
+
+ msleep(50);
+ waiting -= 50;
+
+ /*
+ * If neither Error nor Initialialized are indicated
+ * by the firmware keep waiting till we exhaust our
+ * timeout ... and then retry if we haven't exhausted
+ * our retries ...
+ */
+ pcie_fw = t4_read_reg(adap, A_PCIE_FW);
+ if (!(pcie_fw & (F_PCIE_FW_ERR|F_PCIE_FW_INIT))) {
+ if (waiting <= 0) {
+ if (retries-- > 0)
+ goto retry;
+
+ return -ETIMEDOUT;
+ }
+ continue;
+ }
+
+ /*
+ * We either have an Error or Initialized condition
+ * report errors preferentially.
+ */
+ if (state) {
+ if (pcie_fw & F_PCIE_FW_ERR)
+ *state = DEV_STATE_ERR;
+ else if (pcie_fw & F_PCIE_FW_INIT)
+ *state = DEV_STATE_INIT;
+ }
+
+ /*
+ * If we arrived before a Master PF was selected and
+ * there's not a valid Master PF, grab its identity
+ * for our caller.
+ */
+ if (master_mbox == M_PCIE_FW_MASTER &&
+ (pcie_fw & F_PCIE_FW_MASTER_VLD))
+ master_mbox = G_PCIE_FW_MASTER(pcie_fw);
+ break;
+ }
+ }
+
+ return master_mbox;
}
/**
@@ -3724,37 +3898,37 @@ int t4_fw_bye(struct adapter *adap, unsigned int mbox)
}
/**
- * t4_init_cmd - ask FW to initialize the device
+ * t4_fw_reset - issue a reset to FW
* @adap: the adapter
* @mbox: mailbox to use for the FW command
+ * @reset: specifies the type of reset to perform
*
- * Issues a command to FW to partially initialize the device. This
- * performs initialization that generally doesn't depend on user input.
+ * Issues a reset command of the specified type to FW.
*/
-int t4_early_init(struct adapter *adap, unsigned int mbox)
+int t4_fw_reset(struct adapter *adap, unsigned int mbox, int reset)
{
- struct fw_initialize_cmd c;
+ struct fw_reset_cmd c;
memset(&c, 0, sizeof(c));
- INIT_CMD(c, INITIALIZE, WRITE);
+ INIT_CMD(c, RESET, WRITE);
+ c.val = htonl(reset);
return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL);
}
/**
- * t4_fw_reset - issue a reset to FW
+ * t4_fw_initialize - ask FW to initialize the device
* @adap: the adapter
* @mbox: mailbox to use for the FW command
- * @reset: specifies the type of reset to perform
*
- * Issues a reset command of the specified type to FW.
+ * Issues a command to FW to partially initialize the device. This
+ * performs initialization that generally doesn't depend on user input.
*/
-int t4_fw_reset(struct adapter *adap, unsigned int mbox, int reset)
+int t4_fw_initialize(struct adapter *adap, unsigned int mbox)
{
- struct fw_reset_cmd c;
+ struct fw_initialize_cmd c;
memset(&c, 0, sizeof(c));
- INIT_CMD(c, RESET, WRITE);
- c.val = htonl(reset);
+ INIT_CMD(c, INITIALIZE, WRITE);
return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL);
}
@@ -4495,6 +4669,21 @@ static int __devinit get_flash_params(struct adapter *adapter)
return 0;
}
+static void __devinit set_pcie_completion_timeout(struct adapter *adapter,
+ u8 range)
+{
+ u16 val;
+ u32 pcie_cap;
+
+ pcie_cap = t4_os_find_pci_capability(adapter, PCI_CAP_ID_EXP);
+ if (pcie_cap) {
+ t4_os_pci_read_cfg2(adapter, pcie_cap + PCI_EXP_DEVCTL2, &val);
+ val &= 0xfff0;
+ val |= range ;
+ t4_os_pci_write_cfg2(adapter, pcie_cap + PCI_EXP_DEVCTL2, val);
+ }
+}
+
/**
* t4_prep_adapter - prepare SW and HW for operation
* @adapter: the adapter
@@ -4541,6 +4730,8 @@ int __devinit t4_prep_adapter(struct adapter *adapter)
adapter->params.portvec = 1;
adapter->params.vpd.cclk = 50000;
+ /* Set pci completion timeout value to 4 seconds. */
+ set_pcie_completion_timeout(adapter, 0xd);
return 0;
}
diff --git a/sys/dev/cxgbe/common/t4_hw.h b/sys/dev/cxgbe/common/t4_hw.h
index fd48aab..b93734e 100644
--- a/sys/dev/cxgbe/common/t4_hw.h
+++ b/sys/dev/cxgbe/common/t4_hw.h
@@ -182,4 +182,82 @@ struct pagepod {
#define M_PPOD_OFST 0xFFFFFFFF
#define V_PPOD_OFST(x) ((x) << S_PPOD_OFST)
+/*
+ * Flash layout.
+ */
+#define FLASH_START(start) ((start) * SF_SEC_SIZE)
+#define FLASH_MAX_SIZE(nsecs) ((nsecs) * SF_SEC_SIZE)
+
+enum {
+ /*
+ * Various Expansion-ROM boot images, etc.
+ */
+ FLASH_EXP_ROM_START_SEC = 0,
+ FLASH_EXP_ROM_NSECS = 6,
+ FLASH_EXP_ROM_START = FLASH_START(FLASH_EXP_ROM_START_SEC),
+ FLASH_EXP_ROM_MAX_SIZE = FLASH_MAX_SIZE(FLASH_EXP_ROM_NSECS),
+
+ /*
+ * iSCSI Boot Firmware Table (iBFT) and other driver-related
+ * parameters ...
+ */
+ FLASH_IBFT_START_SEC = 6,
+ FLASH_IBFT_NSECS = 1,
+ FLASH_IBFT_START = FLASH_START(FLASH_IBFT_START_SEC),
+ FLASH_IBFT_MAX_SIZE = FLASH_MAX_SIZE(FLASH_IBFT_NSECS),
+
+ /*
+ * Boot configuration data.
+ */
+ FLASH_BOOTCFG_START_SEC = 7,
+ FLASH_BOOTCFG_NSECS = 1,
+ FLASH_BOOTCFG_START = FLASH_START(FLASH_BOOTCFG_START_SEC),
+ FLASH_BOOTCFG_MAX_SIZE = FLASH_MAX_SIZE(FLASH_BOOTCFG_NSECS),
+
+ /*
+ * Location of firmware image in FLASH.
+ */
+ FLASH_FW_START_SEC = 8,
+ FLASH_FW_NSECS = 8,
+ FLASH_FW_START = FLASH_START(FLASH_FW_START_SEC),
+ FLASH_FW_MAX_SIZE = FLASH_MAX_SIZE(FLASH_FW_NSECS),
+
+ /*
+ * iSCSI persistent/crash information.
+ */
+ FLASH_ISCSI_CRASH_START_SEC = 29,
+ FLASH_ISCSI_CRASH_NSECS = 1,
+ FLASH_ISCSI_CRASH_START = FLASH_START(FLASH_ISCSI_CRASH_START_SEC),
+ FLASH_ISCSI_CRASH_MAX_SIZE = FLASH_MAX_SIZE(FLASH_ISCSI_CRASH_NSECS),
+
+ /*
+ * FCoE persistent/crash information.
+ */
+ FLASH_FCOE_CRASH_START_SEC = 30,
+ FLASH_FCOE_CRASH_NSECS = 1,
+ FLASH_FCOE_CRASH_START = FLASH_START(FLASH_FCOE_CRASH_START_SEC),
+ FLASH_FCOE_CRASH_MAX_SIZE = FLASH_MAX_SIZE(FLASH_FCOE_CRASH_NSECS),
+
+ /*
+ * Location of Firmware Configuration File in FLASH. Since the FPGA
+ * "FLASH" is smaller we need to store the Configuration File in a
+ * different location -- which will overlap the end of the firmware
+ * image if firmware ever gets that large ...
+ */
+ FLASH_CFG_START_SEC = 31,
+ FLASH_CFG_NSECS = 1,
+ FLASH_CFG_START = FLASH_START(FLASH_CFG_START_SEC),
+ FLASH_CFG_MAX_SIZE = FLASH_MAX_SIZE(FLASH_CFG_NSECS),
+
+ FLASH_FPGA_CFG_START_SEC = 15,
+ FLASH_FPGA_CFG_START = FLASH_START(FLASH_FPGA_CFG_START_SEC),
+
+ /*
+ * Sectors 32-63 are reserved for FLASH failover.
+ */
+};
+
+#undef FLASH_START
+#undef FLASH_MAX_SIZE
+
#endif /* __T4_HW_H */
diff --git a/sys/dev/cxgbe/common/t4fw_interface.h b/sys/dev/cxgbe/common/t4fw_interface.h
deleted file mode 100644
index 3eb9615..0000000
--- a/sys/dev/cxgbe/common/t4fw_interface.h
+++ /dev/null
@@ -1,5625 +0,0 @@
-/*-
- * Copyright (c) 2011 Chelsio Communications, Inc.
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD$
- *
- */
-
-#ifndef _T4FW_INTERFACE_H_
-#define _T4FW_INTERFACE_H_
-
-/******************************************************************************
- * R E T U R N V A L U E S
- ********************************/
-
-enum fw_retval {
- FW_SUCCESS = 0, /* completed sucessfully */
- FW_EPERM = 1, /* operation not permitted */
- FW_EIO = 5, /* input/output error; hw bad */
- FW_ENOEXEC = 8, /* Exec format error; inv microcode */
- FW_EAGAIN = 11, /* try again */
- FW_ENOMEM = 12, /* out of memory */
- FW_EFAULT = 14, /* bad address; fw bad */
- FW_EBUSY = 16, /* resource busy */
- FW_EEXIST = 17, /* File exists */
- FW_EINVAL = 22, /* invalid argument */
- FW_ENOSYS = 38, /* functionality not implemented */
- FW_EPROTO = 71, /* protocol error */
- FW_ETIMEDOUT = 110, /* timeout */
- FW_EINPROGRESS = 115, /* fw internal */
- FW_SCSI_ABORT_REQUESTED = 128, /* */
- FW_SCSI_ABORT_TIMEDOUT = 129, /* */
- FW_SCSI_ABORTED = 130, /* */
- FW_SCSI_CLOSE_REQUESTED = 131, /* */
- FW_ERR_LINK_DOWN = 132, /* */
- FW_RDEV_NOT_READY = 133, /* */
- FW_ERR_RDEV_LOST = 134, /* */
- FW_ERR_RDEV_LOGO = 135, /* */
- FW_FCOE_NO_XCHG = 136, /* */
- FW_SCSI_RSP_ERR = 137, /* */
- FW_ERR_RDEV_IMPL_LOGO = 138, /* */
- FW_SCSI_UNDER_FLOW_ERR = 139, /* */
- FW_SCSI_OVER_FLOW_ERR = 140, /* */
-};
-
-/******************************************************************************
- * W O R K R E Q U E S T s
- ********************************/
-
-enum fw_wr_opcodes {
- FW_FILTER_WR = 0x02,
- FW_ULPTX_WR = 0x04,
- FW_TP_WR = 0x05,
- FW_ETH_TX_PKT_WR = 0x08,
- FW_ETH_TX_PKTS_WR = 0x09,
- FW_EQ_FLUSH_WR = 0x1b,
- FW_FLOWC_WR = 0x0a,
- FW_OFLD_TX_DATA_WR = 0x0b,
- FW_CMD_WR = 0x10,
- FW_ETH_TX_PKT_VM_WR = 0x11,
- FW_RI_RES_WR = 0x0c,
- FW_RI_RDMA_WRITE_WR = 0x14,
- FW_RI_SEND_WR = 0x15,
- FW_RI_RDMA_READ_WR = 0x16,
- FW_RI_RECV_WR = 0x17,
- FW_RI_BIND_MW_WR = 0x18,
- FW_RI_FR_NSMR_WR = 0x19,
- FW_RI_INV_LSTAG_WR = 0x1a,
- FW_RI_WR = 0x0d,
- FW_ISCSI_NODE_WR = 0x4a,
- FW_LASTC2E_WR = 0x4b
-};
-
-/*
- * Generic work request header flit0
- */
-struct fw_wr_hdr {
- __be32 hi;
- __be32 lo;
-};
-
-/* work request opcode (hi)
- */
-#define S_FW_WR_OP 24
-#define M_FW_WR_OP 0xff
-#define V_FW_WR_OP(x) ((x) << S_FW_WR_OP)
-#define G_FW_WR_OP(x) (((x) >> S_FW_WR_OP) & M_FW_WR_OP)
-
-/* atomic flag (hi) - firmware encapsulates CPLs in CPL_BARRIER
- */
-#define S_FW_WR_ATOMIC 23
-#define M_FW_WR_ATOMIC 0x1
-#define V_FW_WR_ATOMIC(x) ((x) << S_FW_WR_ATOMIC)
-#define G_FW_WR_ATOMIC(x) \
- (((x) >> S_FW_WR_ATOMIC) & M_FW_WR_ATOMIC)
-#define F_FW_WR_ATOMIC V_FW_WR_ATOMIC(1U)
-
-/* flush flag (hi) - firmware flushes flushable work request buffered
- * in the flow context.
- */
-#define S_FW_WR_FLUSH 22
-#define M_FW_WR_FLUSH 0x1
-#define V_FW_WR_FLUSH(x) ((x) << S_FW_WR_FLUSH)
-#define G_FW_WR_FLUSH(x) \
- (((x) >> S_FW_WR_FLUSH) & M_FW_WR_FLUSH)
-#define F_FW_WR_FLUSH V_FW_WR_FLUSH(1U)
-
-/* completion flag (hi) - firmware generates a cpl_fw6_ack
- */
-#define S_FW_WR_COMPL 21
-#define M_FW_WR_COMPL 0x1
-#define V_FW_WR_COMPL(x) ((x) << S_FW_WR_COMPL)
-#define G_FW_WR_COMPL(x) \
- (((x) >> S_FW_WR_COMPL) & M_FW_WR_COMPL)
-#define F_FW_WR_COMPL V_FW_WR_COMPL(1U)
-
-
-/* work request immediate data lengh (hi)
- */
-#define S_FW_WR_IMMDLEN 0
-#define M_FW_WR_IMMDLEN 0xff
-#define V_FW_WR_IMMDLEN(x) ((x) << S_FW_WR_IMMDLEN)
-#define G_FW_WR_IMMDLEN(x) \
- (((x) >> S_FW_WR_IMMDLEN) & M_FW_WR_IMMDLEN)
-
-/* egress queue status update to associated ingress queue entry (lo)
- */
-#define S_FW_WR_EQUIQ 31
-#define M_FW_WR_EQUIQ 0x1
-#define V_FW_WR_EQUIQ(x) ((x) << S_FW_WR_EQUIQ)
-#define G_FW_WR_EQUIQ(x) (((x) >> S_FW_WR_EQUIQ) & M_FW_WR_EQUIQ)
-#define F_FW_WR_EQUIQ V_FW_WR_EQUIQ(1U)
-
-/* egress queue status update to egress queue status entry (lo)
- */
-#define S_FW_WR_EQUEQ 30
-#define M_FW_WR_EQUEQ 0x1
-#define V_FW_WR_EQUEQ(x) ((x) << S_FW_WR_EQUEQ)
-#define G_FW_WR_EQUEQ(x) (((x) >> S_FW_WR_EQUEQ) & M_FW_WR_EQUEQ)
-#define F_FW_WR_EQUEQ V_FW_WR_EQUEQ(1U)
-
-/* flow context identifier (lo)
- */
-#define S_FW_WR_FLOWID 8
-#define M_FW_WR_FLOWID 0xfffff
-#define V_FW_WR_FLOWID(x) ((x) << S_FW_WR_FLOWID)
-#define G_FW_WR_FLOWID(x) (((x) >> S_FW_WR_FLOWID) & M_FW_WR_FLOWID)
-
-/* length in units of 16-bytes (lo)
- */
-#define S_FW_WR_LEN16 0
-#define M_FW_WR_LEN16 0xff
-#define V_FW_WR_LEN16(x) ((x) << S_FW_WR_LEN16)
-#define G_FW_WR_LEN16(x) (((x) >> S_FW_WR_LEN16) & M_FW_WR_LEN16)
-
-/* valid filter configurations for compressed tuple
- * Encodings: TPL - Compressed TUPLE for filter in addition to 4-tuple
- * FR - FRAGMENT, FC - FCoE, MT - MPS MATCH TYPE, M - MPS MATCH,
- * E - Ethertype, P - Port, PR - Protocol, T - TOS, IV - Inner VLAN,
- * OV - Outer VLAN/VNIC_ID,
-*/
-#define HW_TPL_FR_MT_M_E_P_FC 0x3C3
-#define HW_TPL_FR_MT_M_PR_T_FC 0x3B3
-#define HW_TPL_FR_MT_M_IV_P_FC 0x38B
-#define HW_TPL_FR_MT_M_OV_P_FC 0x387
-#define HW_TPL_FR_MT_E_PR_T 0x370
-#define HW_TPL_FR_MT_E_PR_P_FC 0X363
-#define HW_TPL_FR_MT_E_T_P_FC 0X353
-#define HW_TPL_FR_MT_PR_IV_P_FC 0X32B
-#define HW_TPL_FR_MT_PR_OV_P_FC 0X327
-#define HW_TPL_FR_MT_T_IV_P_FC 0X31B
-#define HW_TPL_FR_MT_T_OV_P_FC 0X317
-#define HW_TPL_FR_M_E_PR_FC 0X2E1
-#define HW_TPL_FR_M_E_T_FC 0X2D1
-#define HW_TPL_FR_M_PR_IV_FC 0X2A9
-#define HW_TPL_FR_M_PR_OV_FC 0X2A5
-#define HW_TPL_FR_M_T_IV_FC 0X299
-#define HW_TPL_FR_M_T_OV_FC 0X295
-#define HW_TPL_FR_E_PR_T_P 0X272
-#define HW_TPL_FR_E_PR_T_FC 0X271
-#define HW_TPL_FR_E_IV_FC 0X249
-#define HW_TPL_FR_E_OV_FC 0X245
-#define HW_TPL_FR_PR_T_IV_FC 0X239
-#define HW_TPL_FR_PR_T_OV_FC 0X235
-#define HW_TPL_FR_IV_OV_FC 0X20D
-#define HW_TPL_MT_M_E_PR 0X1E0
-#define HW_TPL_MT_M_E_T 0X1D0
-#define HW_TPL_MT_E_PR_T_FC 0X171
-#define HW_TPL_MT_E_IV 0X148
-#define HW_TPL_MT_E_OV 0X144
-#define HW_TPL_MT_PR_T_IV 0X138
-#define HW_TPL_MT_PR_T_OV 0X134
-#define HW_TPL_M_E_PR_P 0X0E2
-#define HW_TPL_M_E_T_P 0X0D2
-#define HW_TPL_E_PR_T_P_FC 0X073
-#define HW_TPL_E_IV_P 0X04A
-#define HW_TPL_E_OV_P 0X046
-#define HW_TPL_PR_T_IV_P 0X03A
-#define HW_TPL_PR_T_OV_P 0X036
-
-/* filter wr reply code in cookie in CPL_SET_TCB_RPL */
-enum fw_filter_wr_cookie {
- FW_FILTER_WR_SUCCESS,
- FW_FILTER_WR_FLT_ADDED,
- FW_FILTER_WR_FLT_DELETED,
- FW_FILTER_WR_SMT_TBL_FULL,
- FW_FILTER_WR_EINVAL,
-};
-
-struct fw_filter_wr {
- __be32 op_pkd;
- __be32 len16_pkd;
- __be64 r3;
- __be32 tid_to_iq;
- __be32 del_filter_to_l2tix;
- __be16 ethtype;
- __be16 ethtypem;
- __u8 frag_to_ovlan_vldm;
- __u8 smac_sel;
- __be16 rx_chan_rx_rpl_iq;
- __be32 maci_to_matchtypem;
- __u8 ptcl;
- __u8 ptclm;
- __u8 ttyp;
- __u8 ttypm;
- __be16 ivlan;
- __be16 ivlanm;
- __be16 ovlan;
- __be16 ovlanm;
- __u8 lip[16];
- __u8 lipm[16];
- __u8 fip[16];
- __u8 fipm[16];
- __be16 lp;
- __be16 lpm;
- __be16 fp;
- __be16 fpm;
- __be16 r7;
- __u8 sma[6];
-};
-
-#define S_FW_FILTER_WR_TID 12
-#define M_FW_FILTER_WR_TID 0xfffff
-#define V_FW_FILTER_WR_TID(x) ((x) << S_FW_FILTER_WR_TID)
-#define G_FW_FILTER_WR_TID(x) \
- (((x) >> S_FW_FILTER_WR_TID) & M_FW_FILTER_WR_TID)
-
-#define S_FW_FILTER_WR_RQTYPE 11
-#define M_FW_FILTER_WR_RQTYPE 0x1
-#define V_FW_FILTER_WR_RQTYPE(x) ((x) << S_FW_FILTER_WR_RQTYPE)
-#define G_FW_FILTER_WR_RQTYPE(x) \
- (((x) >> S_FW_FILTER_WR_RQTYPE) & M_FW_FILTER_WR_RQTYPE)
-#define F_FW_FILTER_WR_RQTYPE V_FW_FILTER_WR_RQTYPE(1U)
-
-#define S_FW_FILTER_WR_NOREPLY 10
-#define M_FW_FILTER_WR_NOREPLY 0x1
-#define V_FW_FILTER_WR_NOREPLY(x) ((x) << S_FW_FILTER_WR_NOREPLY)
-#define G_FW_FILTER_WR_NOREPLY(x) \
- (((x) >> S_FW_FILTER_WR_NOREPLY) & M_FW_FILTER_WR_NOREPLY)
-#define F_FW_FILTER_WR_NOREPLY V_FW_FILTER_WR_NOREPLY(1U)
-
-#define S_FW_FILTER_WR_IQ 0
-#define M_FW_FILTER_WR_IQ 0x3ff
-#define V_FW_FILTER_WR_IQ(x) ((x) << S_FW_FILTER_WR_IQ)
-#define G_FW_FILTER_WR_IQ(x) \
- (((x) >> S_FW_FILTER_WR_IQ) & M_FW_FILTER_WR_IQ)
-
-#define S_FW_FILTER_WR_DEL_FILTER 31
-#define M_FW_FILTER_WR_DEL_FILTER 0x1
-#define V_FW_FILTER_WR_DEL_FILTER(x) ((x) << S_FW_FILTER_WR_DEL_FILTER)
-#define G_FW_FILTER_WR_DEL_FILTER(x) \
- (((x) >> S_FW_FILTER_WR_DEL_FILTER) & M_FW_FILTER_WR_DEL_FILTER)
-#define F_FW_FILTER_WR_DEL_FILTER V_FW_FILTER_WR_DEL_FILTER(1U)
-
-#define S_FW_FILTER_WR_RPTTID 25
-#define M_FW_FILTER_WR_RPTTID 0x1
-#define V_FW_FILTER_WR_RPTTID(x) ((x) << S_FW_FILTER_WR_RPTTID)
-#define G_FW_FILTER_WR_RPTTID(x) \
- (((x) >> S_FW_FILTER_WR_RPTTID) & M_FW_FILTER_WR_RPTTID)
-#define F_FW_FILTER_WR_RPTTID V_FW_FILTER_WR_RPTTID(1U)
-
-#define S_FW_FILTER_WR_DROP 24
-#define M_FW_FILTER_WR_DROP 0x1
-#define V_FW_FILTER_WR_DROP(x) ((x) << S_FW_FILTER_WR_DROP)
-#define G_FW_FILTER_WR_DROP(x) \
- (((x) >> S_FW_FILTER_WR_DROP) & M_FW_FILTER_WR_DROP)
-#define F_FW_FILTER_WR_DROP V_FW_FILTER_WR_DROP(1U)
-
-#define S_FW_FILTER_WR_DIRSTEER 23
-#define M_FW_FILTER_WR_DIRSTEER 0x1
-#define V_FW_FILTER_WR_DIRSTEER(x) ((x) << S_FW_FILTER_WR_DIRSTEER)
-#define G_FW_FILTER_WR_DIRSTEER(x) \
- (((x) >> S_FW_FILTER_WR_DIRSTEER) & M_FW_FILTER_WR_DIRSTEER)
-#define F_FW_FILTER_WR_DIRSTEER V_FW_FILTER_WR_DIRSTEER(1U)
-
-#define S_FW_FILTER_WR_MASKHASH 22
-#define M_FW_FILTER_WR_MASKHASH 0x1
-#define V_FW_FILTER_WR_MASKHASH(x) ((x) << S_FW_FILTER_WR_MASKHASH)
-#define G_FW_FILTER_WR_MASKHASH(x) \
- (((x) >> S_FW_FILTER_WR_MASKHASH) & M_FW_FILTER_WR_MASKHASH)
-#define F_FW_FILTER_WR_MASKHASH V_FW_FILTER_WR_MASKHASH(1U)
-
-#define S_FW_FILTER_WR_DIRSTEERHASH 21
-#define M_FW_FILTER_WR_DIRSTEERHASH 0x1
-#define V_FW_FILTER_WR_DIRSTEERHASH(x) ((x) << S_FW_FILTER_WR_DIRSTEERHASH)
-#define G_FW_FILTER_WR_DIRSTEERHASH(x) \
- (((x) >> S_FW_FILTER_WR_DIRSTEERHASH) & M_FW_FILTER_WR_DIRSTEERHASH)
-#define F_FW_FILTER_WR_DIRSTEERHASH V_FW_FILTER_WR_DIRSTEERHASH(1U)
-
-#define S_FW_FILTER_WR_LPBK 20
-#define M_FW_FILTER_WR_LPBK 0x1
-#define V_FW_FILTER_WR_LPBK(x) ((x) << S_FW_FILTER_WR_LPBK)
-#define G_FW_FILTER_WR_LPBK(x) \
- (((x) >> S_FW_FILTER_WR_LPBK) & M_FW_FILTER_WR_LPBK)
-#define F_FW_FILTER_WR_LPBK V_FW_FILTER_WR_LPBK(1U)
-
-#define S_FW_FILTER_WR_DMAC 19
-#define M_FW_FILTER_WR_DMAC 0x1
-#define V_FW_FILTER_WR_DMAC(x) ((x) << S_FW_FILTER_WR_DMAC)
-#define G_FW_FILTER_WR_DMAC(x) \
- (((x) >> S_FW_FILTER_WR_DMAC) & M_FW_FILTER_WR_DMAC)
-#define F_FW_FILTER_WR_DMAC V_FW_FILTER_WR_DMAC(1U)
-
-#define S_FW_FILTER_WR_SMAC 18
-#define M_FW_FILTER_WR_SMAC 0x1
-#define V_FW_FILTER_WR_SMAC(x) ((x) << S_FW_FILTER_WR_SMAC)
-#define G_FW_FILTER_WR_SMAC(x) \
- (((x) >> S_FW_FILTER_WR_SMAC) & M_FW_FILTER_WR_SMAC)
-#define F_FW_FILTER_WR_SMAC V_FW_FILTER_WR_SMAC(1U)
-
-#define S_FW_FILTER_WR_INSVLAN 17
-#define M_FW_FILTER_WR_INSVLAN 0x1
-#define V_FW_FILTER_WR_INSVLAN(x) ((x) << S_FW_FILTER_WR_INSVLAN)
-#define G_FW_FILTER_WR_INSVLAN(x) \
- (((x) >> S_FW_FILTER_WR_INSVLAN) & M_FW_FILTER_WR_INSVLAN)
-#define F_FW_FILTER_WR_INSVLAN V_FW_FILTER_WR_INSVLAN(1U)
-
-#define S_FW_FILTER_WR_RMVLAN 16
-#define M_FW_FILTER_WR_RMVLAN 0x1
-#define V_FW_FILTER_WR_RMVLAN(x) ((x) << S_FW_FILTER_WR_RMVLAN)
-#define G_FW_FILTER_WR_RMVLAN(x) \
- (((x) >> S_FW_FILTER_WR_RMVLAN) & M_FW_FILTER_WR_RMVLAN)
-#define F_FW_FILTER_WR_RMVLAN V_FW_FILTER_WR_RMVLAN(1U)
-
-#define S_FW_FILTER_WR_HITCNTS 15
-#define M_FW_FILTER_WR_HITCNTS 0x1
-#define V_FW_FILTER_WR_HITCNTS(x) ((x) << S_FW_FILTER_WR_HITCNTS)
-#define G_FW_FILTER_WR_HITCNTS(x) \
- (((x) >> S_FW_FILTER_WR_HITCNTS) & M_FW_FILTER_WR_HITCNTS)
-#define F_FW_FILTER_WR_HITCNTS V_FW_FILTER_WR_HITCNTS(1U)
-
-#define S_FW_FILTER_WR_TXCHAN 13
-#define M_FW_FILTER_WR_TXCHAN 0x3
-#define V_FW_FILTER_WR_TXCHAN(x) ((x) << S_FW_FILTER_WR_TXCHAN)
-#define G_FW_FILTER_WR_TXCHAN(x) \
- (((x) >> S_FW_FILTER_WR_TXCHAN) & M_FW_FILTER_WR_TXCHAN)
-
-#define S_FW_FILTER_WR_PRIO 12
-#define M_FW_FILTER_WR_PRIO 0x1
-#define V_FW_FILTER_WR_PRIO(x) ((x) << S_FW_FILTER_WR_PRIO)
-#define G_FW_FILTER_WR_PRIO(x) \
- (((x) >> S_FW_FILTER_WR_PRIO) & M_FW_FILTER_WR_PRIO)
-#define F_FW_FILTER_WR_PRIO V_FW_FILTER_WR_PRIO(1U)
-
-#define S_FW_FILTER_WR_L2TIX 0
-#define M_FW_FILTER_WR_L2TIX 0xfff
-#define V_FW_FILTER_WR_L2TIX(x) ((x) << S_FW_FILTER_WR_L2TIX)
-#define G_FW_FILTER_WR_L2TIX(x) \
- (((x) >> S_FW_FILTER_WR_L2TIX) & M_FW_FILTER_WR_L2TIX)
-
-#define S_FW_FILTER_WR_FRAG 7
-#define M_FW_FILTER_WR_FRAG 0x1
-#define V_FW_FILTER_WR_FRAG(x) ((x) << S_FW_FILTER_WR_FRAG)
-#define G_FW_FILTER_WR_FRAG(x) \
- (((x) >> S_FW_FILTER_WR_FRAG) & M_FW_FILTER_WR_FRAG)
-#define F_FW_FILTER_WR_FRAG V_FW_FILTER_WR_FRAG(1U)
-
-#define S_FW_FILTER_WR_FRAGM 6
-#define M_FW_FILTER_WR_FRAGM 0x1
-#define V_FW_FILTER_WR_FRAGM(x) ((x) << S_FW_FILTER_WR_FRAGM)
-#define G_FW_FILTER_WR_FRAGM(x) \
- (((x) >> S_FW_FILTER_WR_FRAGM) & M_FW_FILTER_WR_FRAGM)
-#define F_FW_FILTER_WR_FRAGM V_FW_FILTER_WR_FRAGM(1U)
-
-#define S_FW_FILTER_WR_IVLAN_VLD 5
-#define M_FW_FILTER_WR_IVLAN_VLD 0x1
-#define V_FW_FILTER_WR_IVLAN_VLD(x) ((x) << S_FW_FILTER_WR_IVLAN_VLD)
-#define G_FW_FILTER_WR_IVLAN_VLD(x) \
- (((x) >> S_FW_FILTER_WR_IVLAN_VLD) & M_FW_FILTER_WR_IVLAN_VLD)
-#define F_FW_FILTER_WR_IVLAN_VLD V_FW_FILTER_WR_IVLAN_VLD(1U)
-
-#define S_FW_FILTER_WR_OVLAN_VLD 4
-#define M_FW_FILTER_WR_OVLAN_VLD 0x1
-#define V_FW_FILTER_WR_OVLAN_VLD(x) ((x) << S_FW_FILTER_WR_OVLAN_VLD)
-#define G_FW_FILTER_WR_OVLAN_VLD(x) \
- (((x) >> S_FW_FILTER_WR_OVLAN_VLD) & M_FW_FILTER_WR_OVLAN_VLD)
-#define F_FW_FILTER_WR_OVLAN_VLD V_FW_FILTER_WR_OVLAN_VLD(1U)
-
-#define S_FW_FILTER_WR_IVLAN_VLDM 3
-#define M_FW_FILTER_WR_IVLAN_VLDM 0x1
-#define V_FW_FILTER_WR_IVLAN_VLDM(x) ((x) << S_FW_FILTER_WR_IVLAN_VLDM)
-#define G_FW_FILTER_WR_IVLAN_VLDM(x) \
- (((x) >> S_FW_FILTER_WR_IVLAN_VLDM) & M_FW_FILTER_WR_IVLAN_VLDM)
-#define F_FW_FILTER_WR_IVLAN_VLDM V_FW_FILTER_WR_IVLAN_VLDM(1U)
-
-#define S_FW_FILTER_WR_OVLAN_VLDM 2
-#define M_FW_FILTER_WR_OVLAN_VLDM 0x1
-#define V_FW_FILTER_WR_OVLAN_VLDM(x) ((x) << S_FW_FILTER_WR_OVLAN_VLDM)
-#define G_FW_FILTER_WR_OVLAN_VLDM(x) \
- (((x) >> S_FW_FILTER_WR_OVLAN_VLDM) & M_FW_FILTER_WR_OVLAN_VLDM)
-#define F_FW_FILTER_WR_OVLAN_VLDM V_FW_FILTER_WR_OVLAN_VLDM(1U)
-
-#define S_FW_FILTER_WR_RX_CHAN 15
-#define M_FW_FILTER_WR_RX_CHAN 0x1
-#define V_FW_FILTER_WR_RX_CHAN(x) ((x) << S_FW_FILTER_WR_RX_CHAN)
-#define G_FW_FILTER_WR_RX_CHAN(x) \
- (((x) >> S_FW_FILTER_WR_RX_CHAN) & M_FW_FILTER_WR_RX_CHAN)
-#define F_FW_FILTER_WR_RX_CHAN V_FW_FILTER_WR_RX_CHAN(1U)
-
-#define S_FW_FILTER_WR_RX_RPL_IQ 0
-#define M_FW_FILTER_WR_RX_RPL_IQ 0x3ff
-#define V_FW_FILTER_WR_RX_RPL_IQ(x) ((x) << S_FW_FILTER_WR_RX_RPL_IQ)
-#define G_FW_FILTER_WR_RX_RPL_IQ(x) \
- (((x) >> S_FW_FILTER_WR_RX_RPL_IQ) & M_FW_FILTER_WR_RX_RPL_IQ)
-
-#define S_FW_FILTER_WR_MACI 23
-#define M_FW_FILTER_WR_MACI 0x1ff
-#define V_FW_FILTER_WR_MACI(x) ((x) << S_FW_FILTER_WR_MACI)
-#define G_FW_FILTER_WR_MACI(x) \
- (((x) >> S_FW_FILTER_WR_MACI) & M_FW_FILTER_WR_MACI)
-
-#define S_FW_FILTER_WR_MACIM 14
-#define M_FW_FILTER_WR_MACIM 0x1ff
-#define V_FW_FILTER_WR_MACIM(x) ((x) << S_FW_FILTER_WR_MACIM)
-#define G_FW_FILTER_WR_MACIM(x) \
- (((x) >> S_FW_FILTER_WR_MACIM) & M_FW_FILTER_WR_MACIM)
-
-#define S_FW_FILTER_WR_FCOE 13
-#define M_FW_FILTER_WR_FCOE 0x1
-#define V_FW_FILTER_WR_FCOE(x) ((x) << S_FW_FILTER_WR_FCOE)
-#define G_FW_FILTER_WR_FCOE(x) \
- (((x) >> S_FW_FILTER_WR_FCOE) & M_FW_FILTER_WR_FCOE)
-#define F_FW_FILTER_WR_FCOE V_FW_FILTER_WR_FCOE(1U)
-
-#define S_FW_FILTER_WR_FCOEM 12
-#define M_FW_FILTER_WR_FCOEM 0x1
-#define V_FW_FILTER_WR_FCOEM(x) ((x) << S_FW_FILTER_WR_FCOEM)
-#define G_FW_FILTER_WR_FCOEM(x) \
- (((x) >> S_FW_FILTER_WR_FCOEM) & M_FW_FILTER_WR_FCOEM)
-#define F_FW_FILTER_WR_FCOEM V_FW_FILTER_WR_FCOEM(1U)
-
-#define S_FW_FILTER_WR_PORT 9
-#define M_FW_FILTER_WR_PORT 0x7
-#define V_FW_FILTER_WR_PORT(x) ((x) << S_FW_FILTER_WR_PORT)
-#define G_FW_FILTER_WR_PORT(x) \
- (((x) >> S_FW_FILTER_WR_PORT) & M_FW_FILTER_WR_PORT)
-
-#define S_FW_FILTER_WR_PORTM 6
-#define M_FW_FILTER_WR_PORTM 0x7
-#define V_FW_FILTER_WR_PORTM(x) ((x) << S_FW_FILTER_WR_PORTM)
-#define G_FW_FILTER_WR_PORTM(x) \
- (((x) >> S_FW_FILTER_WR_PORTM) & M_FW_FILTER_WR_PORTM)
-
-#define S_FW_FILTER_WR_MATCHTYPE 3
-#define M_FW_FILTER_WR_MATCHTYPE 0x7
-#define V_FW_FILTER_WR_MATCHTYPE(x) ((x) << S_FW_FILTER_WR_MATCHTYPE)
-#define G_FW_FILTER_WR_MATCHTYPE(x) \
- (((x) >> S_FW_FILTER_WR_MATCHTYPE) & M_FW_FILTER_WR_MATCHTYPE)
-
-#define S_FW_FILTER_WR_MATCHTYPEM 0
-#define M_FW_FILTER_WR_MATCHTYPEM 0x7
-#define V_FW_FILTER_WR_MATCHTYPEM(x) ((x) << S_FW_FILTER_WR_MATCHTYPEM)
-#define G_FW_FILTER_WR_MATCHTYPEM(x) \
- (((x) >> S_FW_FILTER_WR_MATCHTYPEM) & M_FW_FILTER_WR_MATCHTYPEM)
-
-struct fw_ulptx_wr {
- __be32 op_to_compl;
- __be32 flowid_len16;
- __u64 cookie;
-};
-
-struct fw_tp_wr {
- __be32 op_to_immdlen;
- __be32 flowid_len16;
- __u64 cookie;
-};
-
-struct fw_eth_tx_pkt_wr {
- __be32 op_immdlen;
- __be32 equiq_to_len16;
- __be64 r3;
-};
-
-struct fw_eth_tx_pkts_wr {
- __be32 op_immdlen;
- __be32 equiq_to_len16;
- __be32 r3;
- __be16 plen;
- __u8 npkt;
- __u8 type;
-};
-
-struct fw_eq_flush_wr {
- __u8 opcode;
- __u8 r1[3];
- __be32 equiq_to_len16;
- __be64 r3;
-};
-
-enum fw_flowc_mnem {
- FW_FLOWC_MNEM_PFNVFN, /* PFN [15:8] VFN [7:0] */
- FW_FLOWC_MNEM_CH,
- FW_FLOWC_MNEM_PORT,
- FW_FLOWC_MNEM_IQID,
- FW_FLOWC_MNEM_SNDNXT,
- FW_FLOWC_MNEM_RCVNXT,
- FW_FLOWC_MNEM_SNDBUF,
- FW_FLOWC_MNEM_MSS,
- FW_FLOWC_MEM_TXDATAPLEN_MAX,
-};
-
-struct fw_flowc_mnemval {
- __u8 mnemonic;
- __u8 r4[3];
- __be32 val;
-};
-
-struct fw_flowc_wr {
- __be32 op_to_nparams;
- __be32 flowid_len16;
-#ifndef C99_NOT_SUPPORTED
- struct fw_flowc_mnemval mnemval[0];
-#endif
-};
-
-#define S_FW_FLOWC_WR_NPARAMS 0
-#define M_FW_FLOWC_WR_NPARAMS 0xff
-#define V_FW_FLOWC_WR_NPARAMS(x) ((x) << S_FW_FLOWC_WR_NPARAMS)
-#define G_FW_FLOWC_WR_NPARAMS(x) \
- (((x) >> S_FW_FLOWC_WR_NPARAMS) & M_FW_FLOWC_WR_NPARAMS)
-
-struct fw_ofld_tx_data_wr {
- __be32 op_to_immdlen;
- __be32 flowid_len16;
- __be32 plen;
- __be32 tunnel_to_proxy;
-};
-
-#define S_FW_OFLD_TX_DATA_WR_TUNNEL 19
-#define M_FW_OFLD_TX_DATA_WR_TUNNEL 0x1
-#define V_FW_OFLD_TX_DATA_WR_TUNNEL(x) ((x) << S_FW_OFLD_TX_DATA_WR_TUNNEL)
-#define G_FW_OFLD_TX_DATA_WR_TUNNEL(x) \
- (((x) >> S_FW_OFLD_TX_DATA_WR_TUNNEL) & M_FW_OFLD_TX_DATA_WR_TUNNEL)
-#define F_FW_OFLD_TX_DATA_WR_TUNNEL V_FW_OFLD_TX_DATA_WR_TUNNEL(1U)
-
-#define S_FW_OFLD_TX_DATA_WR_SAVE 18
-#define M_FW_OFLD_TX_DATA_WR_SAVE 0x1
-#define V_FW_OFLD_TX_DATA_WR_SAVE(x) ((x) << S_FW_OFLD_TX_DATA_WR_SAVE)
-#define G_FW_OFLD_TX_DATA_WR_SAVE(x) \
- (((x) >> S_FW_OFLD_TX_DATA_WR_SAVE) & M_FW_OFLD_TX_DATA_WR_SAVE)
-#define F_FW_OFLD_TX_DATA_WR_SAVE V_FW_OFLD_TX_DATA_WR_SAVE(1U)
-
-#define S_FW_OFLD_TX_DATA_WR_FLUSH 17
-#define M_FW_OFLD_TX_DATA_WR_FLUSH 0x1
-#define V_FW_OFLD_TX_DATA_WR_FLUSH(x) ((x) << S_FW_OFLD_TX_DATA_WR_FLUSH)
-#define G_FW_OFLD_TX_DATA_WR_FLUSH(x) \
- (((x) >> S_FW_OFLD_TX_DATA_WR_FLUSH) & M_FW_OFLD_TX_DATA_WR_FLUSH)
-#define F_FW_OFLD_TX_DATA_WR_FLUSH V_FW_OFLD_TX_DATA_WR_FLUSH(1U)
-
-#define S_FW_OFLD_TX_DATA_WR_URGENT 16
-#define M_FW_OFLD_TX_DATA_WR_URGENT 0x1
-#define V_FW_OFLD_TX_DATA_WR_URGENT(x) ((x) << S_FW_OFLD_TX_DATA_WR_URGENT)
-#define G_FW_OFLD_TX_DATA_WR_URGENT(x) \
- (((x) >> S_FW_OFLD_TX_DATA_WR_URGENT) & M_FW_OFLD_TX_DATA_WR_URGENT)
-#define F_FW_OFLD_TX_DATA_WR_URGENT V_FW_OFLD_TX_DATA_WR_URGENT(1U)
-
-#define S_FW_OFLD_TX_DATA_WR_MORE 15
-#define M_FW_OFLD_TX_DATA_WR_MORE 0x1
-#define V_FW_OFLD_TX_DATA_WR_MORE(x) ((x) << S_FW_OFLD_TX_DATA_WR_MORE)
-#define G_FW_OFLD_TX_DATA_WR_MORE(x) \
- (((x) >> S_FW_OFLD_TX_DATA_WR_MORE) & M_FW_OFLD_TX_DATA_WR_MORE)
-#define F_FW_OFLD_TX_DATA_WR_MORE V_FW_OFLD_TX_DATA_WR_MORE(1U)
-
-#define S_FW_OFLD_TX_DATA_WR_SHOVE 14
-#define M_FW_OFLD_TX_DATA_WR_SHOVE 0x1
-#define V_FW_OFLD_TX_DATA_WR_SHOVE(x) ((x) << S_FW_OFLD_TX_DATA_WR_SHOVE)
-#define G_FW_OFLD_TX_DATA_WR_SHOVE(x) \
- (((x) >> S_FW_OFLD_TX_DATA_WR_SHOVE) & M_FW_OFLD_TX_DATA_WR_SHOVE)
-#define F_FW_OFLD_TX_DATA_WR_SHOVE V_FW_OFLD_TX_DATA_WR_SHOVE(1U)
-
-#define S_FW_OFLD_TX_DATA_WR_ULPMODE 10
-#define M_FW_OFLD_TX_DATA_WR_ULPMODE 0xf
-#define V_FW_OFLD_TX_DATA_WR_ULPMODE(x) ((x) << S_FW_OFLD_TX_DATA_WR_ULPMODE)
-#define G_FW_OFLD_TX_DATA_WR_ULPMODE(x) \
- (((x) >> S_FW_OFLD_TX_DATA_WR_ULPMODE) & M_FW_OFLD_TX_DATA_WR_ULPMODE)
-
-#define S_FW_OFLD_TX_DATA_WR_ULPSUBMODE 6
-#define M_FW_OFLD_TX_DATA_WR_ULPSUBMODE 0xf
-#define V_FW_OFLD_TX_DATA_WR_ULPSUBMODE(x) \
- ((x) << S_FW_OFLD_TX_DATA_WR_ULPSUBMODE)
-#define G_FW_OFLD_TX_DATA_WR_ULPSUBMODE(x) \
- (((x) >> S_FW_OFLD_TX_DATA_WR_ULPSUBMODE) & \
- M_FW_OFLD_TX_DATA_WR_ULPSUBMODE)
-
-#define S_FW_OFLD_TX_DATA_WR_PROXY 5
-#define M_FW_OFLD_TX_DATA_WR_PROXY 0x1
-#define V_FW_OFLD_TX_DATA_WR_PROXY(x) ((x) << S_FW_OFLD_TX_DATA_WR_PROXY)
-#define G_FW_OFLD_TX_DATA_WR_PROXY(x) \
- (((x) >> S_FW_OFLD_TX_DATA_WR_PROXY) & M_FW_OFLD_TX_DATA_WR_PROXY)
-#define F_FW_OFLD_TX_DATA_WR_PROXY V_FW_OFLD_TX_DATA_WR_PROXY(1U)
-
-struct fw_cmd_wr {
- __be32 op_dma;
- __be32 len16_pkd;
- __be64 cookie_daddr;
-};
-
-#define S_FW_CMD_WR_DMA 17
-#define M_FW_CMD_WR_DMA 0x1
-#define V_FW_CMD_WR_DMA(x) ((x) << S_FW_CMD_WR_DMA)
-#define G_FW_CMD_WR_DMA(x) (((x) >> S_FW_CMD_WR_DMA) & M_FW_CMD_WR_DMA)
-#define F_FW_CMD_WR_DMA V_FW_CMD_WR_DMA(1U)
-
-struct fw_eth_tx_pkt_vm_wr {
- __be32 op_immdlen;
- __be32 equiq_to_len16;
- __be32 r3[2];
- __u8 ethmacdst[6];
- __u8 ethmacsrc[6];
- __be16 ethtype;
- __be16 vlantci;
-};
-
-/******************************************************************************
- * R I W O R K R E Q U E S T s
- **************************************/
-
-enum fw_ri_wr_opcode {
- FW_RI_RDMA_WRITE = 0x0, /* IETF RDMAP v1.0 ... */
- FW_RI_READ_REQ = 0x1,
- FW_RI_READ_RESP = 0x2,
- FW_RI_SEND = 0x3,
- FW_RI_SEND_WITH_INV = 0x4,
- FW_RI_SEND_WITH_SE = 0x5,
- FW_RI_SEND_WITH_SE_INV = 0x6,
- FW_RI_TERMINATE = 0x7,
- FW_RI_RDMA_INIT = 0x8, /* CHELSIO RI specific ... */
- FW_RI_BIND_MW = 0x9,
- FW_RI_FAST_REGISTER = 0xa,
- FW_RI_LOCAL_INV = 0xb,
- FW_RI_QP_MODIFY = 0xc,
- FW_RI_BYPASS = 0xd,
- FW_RI_RECEIVE = 0xe,
-
- FW_RI_SGE_EC_CR_RETURN = 0xf
-};
-
-enum fw_ri_wr_flags {
- FW_RI_COMPLETION_FLAG = 0x01,
- FW_RI_NOTIFICATION_FLAG = 0x02,
- FW_RI_SOLICITED_EVENT_FLAG = 0x04,
- FW_RI_READ_FENCE_FLAG = 0x08,
- FW_RI_LOCAL_FENCE_FLAG = 0x10,
- FW_RI_RDMA_READ_INVALIDATE = 0x20
-};
-
-enum fw_ri_mpa_attrs {
- FW_RI_MPA_RX_MARKER_ENABLE = 0x01,
- FW_RI_MPA_TX_MARKER_ENABLE = 0x02,
- FW_RI_MPA_CRC_ENABLE = 0x04,
- FW_RI_MPA_IETF_ENABLE = 0x08
-};
-
-enum fw_ri_qp_caps {
- FW_RI_QP_RDMA_READ_ENABLE = 0x01,
- FW_RI_QP_RDMA_WRITE_ENABLE = 0x02,
- FW_RI_QP_BIND_ENABLE = 0x04,
- FW_RI_QP_FAST_REGISTER_ENABLE = 0x08,
- FW_RI_QP_STAG0_ENABLE = 0x10,
- FW_RI_QP_RDMA_READ_REQ_0B_ENABLE= 0x80,
-};
-
-enum fw_ri_addr_type {
- FW_RI_ZERO_BASED_TO = 0x00,
- FW_RI_VA_BASED_TO = 0x01
-};
-
-enum fw_ri_mem_perms {
- FW_RI_MEM_ACCESS_REM_WRITE = 0x01,
- FW_RI_MEM_ACCESS_REM_READ = 0x02,
- FW_RI_MEM_ACCESS_REM = 0x03,
- FW_RI_MEM_ACCESS_LOCAL_WRITE = 0x04,
- FW_RI_MEM_ACCESS_LOCAL_READ = 0x08,
- FW_RI_MEM_ACCESS_LOCAL = 0x0C
-};
-
-enum fw_ri_stag_type {
- FW_RI_STAG_NSMR = 0x00,
- FW_RI_STAG_SMR = 0x01,
- FW_RI_STAG_MW = 0x02,
- FW_RI_STAG_MW_RELAXED = 0x03
-};
-
-enum fw_ri_data_op {
- FW_RI_DATA_IMMD = 0x81,
- FW_RI_DATA_DSGL = 0x82,
- FW_RI_DATA_ISGL = 0x83
-};
-
-enum fw_ri_sgl_depth {
- FW_RI_SGL_DEPTH_MAX_SQ = 16,
- FW_RI_SGL_DEPTH_MAX_RQ = 4
-};
-
-enum fw_ri_cqe_err {
- FW_RI_CQE_ERR_SUCCESS = 0x00, /* success, no error detected */
- FW_RI_CQE_ERR_STAG = 0x01, /* STAG invalid */
- FW_RI_CQE_ERR_PDID = 0x02, /* PDID mismatch */
- FW_RI_CQE_ERR_QPID = 0x03, /* QPID mismatch */
- FW_RI_CQE_ERR_ACCESS = 0x04, /* Invalid access right */
- FW_RI_CQE_ERR_WRAP = 0x05, /* Wrap error */
- FW_RI_CQE_ERR_BOUND = 0x06, /* base and bounds violation */
- FW_RI_CQE_ERR_INVALIDATE_SHARED_MR = 0x07, /* attempt to invalidate a SMR */
- FW_RI_CQE_ERR_INVALIDATE_MR_WITH_MW_BOUND = 0x08, /* attempt to invalidate a MR w MW */
- FW_RI_CQE_ERR_ECC = 0x09, /* ECC error detected */
- FW_RI_CQE_ERR_ECC_PSTAG = 0x0A, /* ECC error detected when reading the PSTAG for a MW Invalidate */
- FW_RI_CQE_ERR_PBL_ADDR_BOUND = 0x0B, /* pbl address out of bound : software error */
- FW_RI_CQE_ERR_CRC = 0x10, /* CRC error */
- FW_RI_CQE_ERR_MARKER = 0x11, /* Marker error */
- FW_RI_CQE_ERR_PDU_LEN_ERR = 0x12, /* invalid PDU length */
- FW_RI_CQE_ERR_OUT_OF_RQE = 0x13, /* out of RQE */
- FW_RI_CQE_ERR_DDP_VERSION = 0x14, /* wrong DDP version */
- FW_RI_CQE_ERR_RDMA_VERSION = 0x15, /* wrong RDMA version */
- FW_RI_CQE_ERR_OPCODE = 0x16, /* invalid rdma opcode */
- FW_RI_CQE_ERR_DDP_QUEUE_NUM = 0x17, /* invalid ddp queue number */
- FW_RI_CQE_ERR_MSN = 0x18, /* MSN error */
- FW_RI_CQE_ERR_TBIT = 0x19, /* tag bit not set correctly */
- FW_RI_CQE_ERR_MO = 0x1A, /* MO not zero for TERMINATE or READ_REQ */
- FW_RI_CQE_ERR_MSN_GAP = 0x1B, /* */
- FW_RI_CQE_ERR_MSN_RANGE = 0x1C, /* */
- FW_RI_CQE_ERR_IRD_OVERFLOW = 0x1D, /* */
- FW_RI_CQE_ERR_RQE_ADDR_BOUND = 0x1E, /* RQE address out of bound : software error */
- FW_RI_CQE_ERR_INTERNAL_ERR = 0x1F /* internel error (opcode mismatch) */
-
-};
-
-struct fw_ri_dsge_pair {
- __be32 len[2];
- __be64 addr[2];
-};
-
-struct fw_ri_dsgl {
- __u8 op;
- __u8 r1;
- __be16 nsge;
- __be32 len0;
- __be64 addr0;
-#ifndef C99_NOT_SUPPORTED
- struct fw_ri_dsge_pair sge[0];
-#endif
-};
-
-struct fw_ri_sge {
- __be32 stag;
- __be32 len;
- __be64 to;
-};
-
-struct fw_ri_isgl {
- __u8 op;
- __u8 r1;
- __be16 nsge;
- __be32 r2;
-#ifndef C99_NOT_SUPPORTED
- struct fw_ri_sge sge[0];
-#endif
-};
-
-struct fw_ri_immd {
- __u8 op;
- __u8 r1;
- __be16 r2;
- __be32 immdlen;
-#ifndef C99_NOT_SUPPORTED
- __u8 data[0];
-#endif
-};
-
-struct fw_ri_tpte {
- __be32 valid_to_pdid;
- __be32 locread_to_qpid;
- __be32 nosnoop_pbladdr;
- __be32 len_lo;
- __be32 va_hi;
- __be32 va_lo_fbo;
- __be32 dca_mwbcnt_pstag;
- __be32 len_hi;
-};
-
-#define S_FW_RI_TPTE_VALID 31
-#define M_FW_RI_TPTE_VALID 0x1
-#define V_FW_RI_TPTE_VALID(x) ((x) << S_FW_RI_TPTE_VALID)
-#define G_FW_RI_TPTE_VALID(x) \
- (((x) >> S_FW_RI_TPTE_VALID) & M_FW_RI_TPTE_VALID)
-#define F_FW_RI_TPTE_VALID V_FW_RI_TPTE_VALID(1U)
-
-#define S_FW_RI_TPTE_STAGKEY 23
-#define M_FW_RI_TPTE_STAGKEY 0xff
-#define V_FW_RI_TPTE_STAGKEY(x) ((x) << S_FW_RI_TPTE_STAGKEY)
-#define G_FW_RI_TPTE_STAGKEY(x) \
- (((x) >> S_FW_RI_TPTE_STAGKEY) & M_FW_RI_TPTE_STAGKEY)
-
-#define S_FW_RI_TPTE_STAGSTATE 22
-#define M_FW_RI_TPTE_STAGSTATE 0x1
-#define V_FW_RI_TPTE_STAGSTATE(x) ((x) << S_FW_RI_TPTE_STAGSTATE)
-#define G_FW_RI_TPTE_STAGSTATE(x) \
- (((x) >> S_FW_RI_TPTE_STAGSTATE) & M_FW_RI_TPTE_STAGSTATE)
-#define F_FW_RI_TPTE_STAGSTATE V_FW_RI_TPTE_STAGSTATE(1U)
-
-#define S_FW_RI_TPTE_STAGTYPE 20
-#define M_FW_RI_TPTE_STAGTYPE 0x3
-#define V_FW_RI_TPTE_STAGTYPE(x) ((x) << S_FW_RI_TPTE_STAGTYPE)
-#define G_FW_RI_TPTE_STAGTYPE(x) \
- (((x) >> S_FW_RI_TPTE_STAGTYPE) & M_FW_RI_TPTE_STAGTYPE)
-
-#define S_FW_RI_TPTE_PDID 0
-#define M_FW_RI_TPTE_PDID 0xfffff
-#define V_FW_RI_TPTE_PDID(x) ((x) << S_FW_RI_TPTE_PDID)
-#define G_FW_RI_TPTE_PDID(x) \
- (((x) >> S_FW_RI_TPTE_PDID) & M_FW_RI_TPTE_PDID)
-
-#define S_FW_RI_TPTE_PERM 28
-#define M_FW_RI_TPTE_PERM 0xf
-#define V_FW_RI_TPTE_PERM(x) ((x) << S_FW_RI_TPTE_PERM)
-#define G_FW_RI_TPTE_PERM(x) \
- (((x) >> S_FW_RI_TPTE_PERM) & M_FW_RI_TPTE_PERM)
-
-#define S_FW_RI_TPTE_REMINVDIS 27
-#define M_FW_RI_TPTE_REMINVDIS 0x1
-#define V_FW_RI_TPTE_REMINVDIS(x) ((x) << S_FW_RI_TPTE_REMINVDIS)
-#define G_FW_RI_TPTE_REMINVDIS(x) \
- (((x) >> S_FW_RI_TPTE_REMINVDIS) & M_FW_RI_TPTE_REMINVDIS)
-#define F_FW_RI_TPTE_REMINVDIS V_FW_RI_TPTE_REMINVDIS(1U)
-
-#define S_FW_RI_TPTE_ADDRTYPE 26
-#define M_FW_RI_TPTE_ADDRTYPE 1
-#define V_FW_RI_TPTE_ADDRTYPE(x) ((x) << S_FW_RI_TPTE_ADDRTYPE)
-#define G_FW_RI_TPTE_ADDRTYPE(x) \
- (((x) >> S_FW_RI_TPTE_ADDRTYPE) & M_FW_RI_TPTE_ADDRTYPE)
-#define F_FW_RI_TPTE_ADDRTYPE V_FW_RI_TPTE_ADDRTYPE(1U)
-
-#define S_FW_RI_TPTE_MWBINDEN 25
-#define M_FW_RI_TPTE_MWBINDEN 0x1
-#define V_FW_RI_TPTE_MWBINDEN(x) ((x) << S_FW_RI_TPTE_MWBINDEN)
-#define G_FW_RI_TPTE_MWBINDEN(x) \
- (((x) >> S_FW_RI_TPTE_MWBINDEN) & M_FW_RI_TPTE_MWBINDEN)
-#define F_FW_RI_TPTE_MWBINDEN V_FW_RI_TPTE_MWBINDEN(1U)
-
-#define S_FW_RI_TPTE_PS 20
-#define M_FW_RI_TPTE_PS 0x1f
-#define V_FW_RI_TPTE_PS(x) ((x) << S_FW_RI_TPTE_PS)
-#define G_FW_RI_TPTE_PS(x) \
- (((x) >> S_FW_RI_TPTE_PS) & M_FW_RI_TPTE_PS)
-
-#define S_FW_RI_TPTE_QPID 0
-#define M_FW_RI_TPTE_QPID 0xfffff
-#define V_FW_RI_TPTE_QPID(x) ((x) << S_FW_RI_TPTE_QPID)
-#define G_FW_RI_TPTE_QPID(x) \
- (((x) >> S_FW_RI_TPTE_QPID) & M_FW_RI_TPTE_QPID)
-
-#define S_FW_RI_TPTE_NOSNOOP 31
-#define M_FW_RI_TPTE_NOSNOOP 0x1
-#define V_FW_RI_TPTE_NOSNOOP(x) ((x) << S_FW_RI_TPTE_NOSNOOP)
-#define G_FW_RI_TPTE_NOSNOOP(x) \
- (((x) >> S_FW_RI_TPTE_NOSNOOP) & M_FW_RI_TPTE_NOSNOOP)
-#define F_FW_RI_TPTE_NOSNOOP V_FW_RI_TPTE_NOSNOOP(1U)
-
-#define S_FW_RI_TPTE_PBLADDR 0
-#define M_FW_RI_TPTE_PBLADDR 0x1fffffff
-#define V_FW_RI_TPTE_PBLADDR(x) ((x) << S_FW_RI_TPTE_PBLADDR)
-#define G_FW_RI_TPTE_PBLADDR(x) \
- (((x) >> S_FW_RI_TPTE_PBLADDR) & M_FW_RI_TPTE_PBLADDR)
-
-#define S_FW_RI_TPTE_DCA 24
-#define M_FW_RI_TPTE_DCA 0x1f
-#define V_FW_RI_TPTE_DCA(x) ((x) << S_FW_RI_TPTE_DCA)
-#define G_FW_RI_TPTE_DCA(x) \
- (((x) >> S_FW_RI_TPTE_DCA) & M_FW_RI_TPTE_DCA)
-
-#define S_FW_RI_TPTE_MWBCNT_PSTAG 0
-#define M_FW_RI_TPTE_MWBCNT_PSTAG 0xffffff
-#define V_FW_RI_TPTE_MWBCNT_PSTAT(x) \
- ((x) << S_FW_RI_TPTE_MWBCNT_PSTAG)
-#define G_FW_RI_TPTE_MWBCNT_PSTAG(x) \
- (((x) >> S_FW_RI_TPTE_MWBCNT_PSTAG) & M_FW_RI_TPTE_MWBCNT_PSTAG)
-
-enum fw_ri_cqe_rxtx {
- FW_RI_CQE_RXTX_RX = 0x0,
- FW_RI_CQE_RXTX_TX = 0x1,
-};
-
-struct fw_ri_cqe {
- union fw_ri_rxtx {
- struct fw_ri_scqe {
- __be32 qpid_n_stat_rxtx_type;
- __be32 plen;
- __be32 reserved;
- __be32 wrid;
- } scqe;
- struct fw_ri_rcqe {
- __be32 qpid_n_stat_rxtx_type;
- __be32 plen;
- __be32 stag;
- __be32 msn;
- } rcqe;
- } u;
-};
-
-#define S_FW_RI_CQE_QPID 12
-#define M_FW_RI_CQE_QPID 0xfffff
-#define V_FW_RI_CQE_QPID(x) ((x) << S_FW_RI_CQE_QPID)
-#define G_FW_RI_CQE_QPID(x) \
- (((x) >> S_FW_RI_CQE_QPID) & M_FW_RI_CQE_QPID)
-
-#define S_FW_RI_CQE_NOTIFY 10
-#define M_FW_RI_CQE_NOTIFY 0x1
-#define V_FW_RI_CQE_NOTIFY(x) ((x) << S_FW_RI_CQE_NOTIFY)
-#define G_FW_RI_CQE_NOTIFY(x) \
- (((x) >> S_FW_RI_CQE_NOTIFY) & M_FW_RI_CQE_NOTIFY)
-
-#define S_FW_RI_CQE_STATUS 5
-#define M_FW_RI_CQE_STATUS 0x1f
-#define V_FW_RI_CQE_STATUS(x) ((x) << S_FW_RI_CQE_STATUS)
-#define G_FW_RI_CQE_STATUS(x) \
- (((x) >> S_FW_RI_CQE_STATUS) & M_FW_RI_CQE_STATUS)
-
-
-#define S_FW_RI_CQE_RXTX 4
-#define M_FW_RI_CQE_RXTX 0x1
-#define V_FW_RI_CQE_RXTX(x) ((x) << S_FW_RI_CQE_RXTX)
-#define G_FW_RI_CQE_RXTX(x) \
- (((x) >> S_FW_RI_CQE_RXTX) & M_FW_RI_CQE_RXTX)
-
-#define S_FW_RI_CQE_TYPE 0
-#define M_FW_RI_CQE_TYPE 0xf
-#define V_FW_RI_CQE_TYPE(x) ((x) << S_FW_RI_CQE_TYPE)
-#define G_FW_RI_CQE_TYPE(x) \
- (((x) >> S_FW_RI_CQE_TYPE) & M_FW_RI_CQE_TYPE)
-
-enum fw_ri_res_type {
- FW_RI_RES_TYPE_SQ,
- FW_RI_RES_TYPE_RQ,
- FW_RI_RES_TYPE_CQ,
-};
-
-enum fw_ri_res_op {
- FW_RI_RES_OP_WRITE,
- FW_RI_RES_OP_RESET,
-};
-
-struct fw_ri_res {
- union fw_ri_restype {
- struct fw_ri_res_sqrq {
- __u8 restype;
- __u8 op;
- __be16 r3;
- __be32 eqid;
- __be32 r4[2];
- __be32 fetchszm_to_iqid;
- __be32 dcaen_to_eqsize;
- __be64 eqaddr;
- } sqrq;
- struct fw_ri_res_cq {
- __u8 restype;
- __u8 op;
- __be16 r3;
- __be32 iqid;
- __be32 r4[2];
- __be32 iqandst_to_iqandstindex;
- __be16 iqdroprss_to_iqesize;
- __be16 iqsize;
- __be64 iqaddr;
- __be32 iqns_iqro;
- __be32 r6_lo;
- __be64 r7;
- } cq;
- } u;
-};
-
-struct fw_ri_res_wr {
- __be32 op_nres;
- __be32 len16_pkd;
- __u64 cookie;
-#ifndef C99_NOT_SUPPORTED
- struct fw_ri_res res[0];
-#endif
-};
-
-#define S_FW_RI_RES_WR_NRES 0
-#define M_FW_RI_RES_WR_NRES 0xff
-#define V_FW_RI_RES_WR_NRES(x) ((x) << S_FW_RI_RES_WR_NRES)
-#define G_FW_RI_RES_WR_NRES(x) \
- (((x) >> S_FW_RI_RES_WR_NRES) & M_FW_RI_RES_WR_NRES)
-
-#define S_FW_RI_RES_WR_FETCHSZM 26
-#define M_FW_RI_RES_WR_FETCHSZM 0x1
-#define V_FW_RI_RES_WR_FETCHSZM(x) ((x) << S_FW_RI_RES_WR_FETCHSZM)
-#define G_FW_RI_RES_WR_FETCHSZM(x) \
- (((x) >> S_FW_RI_RES_WR_FETCHSZM) & M_FW_RI_RES_WR_FETCHSZM)
-#define F_FW_RI_RES_WR_FETCHSZM V_FW_RI_RES_WR_FETCHSZM(1U)
-
-#define S_FW_RI_RES_WR_STATUSPGNS 25
-#define M_FW_RI_RES_WR_STATUSPGNS 0x1
-#define V_FW_RI_RES_WR_STATUSPGNS(x) ((x) << S_FW_RI_RES_WR_STATUSPGNS)
-#define G_FW_RI_RES_WR_STATUSPGNS(x) \
- (((x) >> S_FW_RI_RES_WR_STATUSPGNS) & M_FW_RI_RES_WR_STATUSPGNS)
-#define F_FW_RI_RES_WR_STATUSPGNS V_FW_RI_RES_WR_STATUSPGNS(1U)
-
-#define S_FW_RI_RES_WR_STATUSPGRO 24
-#define M_FW_RI_RES_WR_STATUSPGRO 0x1
-#define V_FW_RI_RES_WR_STATUSPGRO(x) ((x) << S_FW_RI_RES_WR_STATUSPGRO)
-#define G_FW_RI_RES_WR_STATUSPGRO(x) \
- (((x) >> S_FW_RI_RES_WR_STATUSPGRO) & M_FW_RI_RES_WR_STATUSPGRO)
-#define F_FW_RI_RES_WR_STATUSPGRO V_FW_RI_RES_WR_STATUSPGRO(1U)
-
-#define S_FW_RI_RES_WR_FETCHNS 23
-#define M_FW_RI_RES_WR_FETCHNS 0x1
-#define V_FW_RI_RES_WR_FETCHNS(x) ((x) << S_FW_RI_RES_WR_FETCHNS)
-#define G_FW_RI_RES_WR_FETCHNS(x) \
- (((x) >> S_FW_RI_RES_WR_FETCHNS) & M_FW_RI_RES_WR_FETCHNS)
-#define F_FW_RI_RES_WR_FETCHNS V_FW_RI_RES_WR_FETCHNS(1U)
-
-#define S_FW_RI_RES_WR_FETCHRO 22
-#define M_FW_RI_RES_WR_FETCHRO 0x1
-#define V_FW_RI_RES_WR_FETCHRO(x) ((x) << S_FW_RI_RES_WR_FETCHRO)
-#define G_FW_RI_RES_WR_FETCHRO(x) \
- (((x) >> S_FW_RI_RES_WR_FETCHRO) & M_FW_RI_RES_WR_FETCHRO)
-#define F_FW_RI_RES_WR_FETCHRO V_FW_RI_RES_WR_FETCHRO(1U)
-
-#define S_FW_RI_RES_WR_HOSTFCMODE 20
-#define M_FW_RI_RES_WR_HOSTFCMODE 0x3
-#define V_FW_RI_RES_WR_HOSTFCMODE(x) ((x) << S_FW_RI_RES_WR_HOSTFCMODE)
-#define G_FW_RI_RES_WR_HOSTFCMODE(x) \
- (((x) >> S_FW_RI_RES_WR_HOSTFCMODE) & M_FW_RI_RES_WR_HOSTFCMODE)
-
-#define S_FW_RI_RES_WR_CPRIO 19
-#define M_FW_RI_RES_WR_CPRIO 0x1
-#define V_FW_RI_RES_WR_CPRIO(x) ((x) << S_FW_RI_RES_WR_CPRIO)
-#define G_FW_RI_RES_WR_CPRIO(x) \
- (((x) >> S_FW_RI_RES_WR_CPRIO) & M_FW_RI_RES_WR_CPRIO)
-#define F_FW_RI_RES_WR_CPRIO V_FW_RI_RES_WR_CPRIO(1U)
-
-#define S_FW_RI_RES_WR_ONCHIP 18
-#define M_FW_RI_RES_WR_ONCHIP 0x1
-#define V_FW_RI_RES_WR_ONCHIP(x) ((x) << S_FW_RI_RES_WR_ONCHIP)
-#define G_FW_RI_RES_WR_ONCHIP(x) \
- (((x) >> S_FW_RI_RES_WR_ONCHIP) & M_FW_RI_RES_WR_ONCHIP)
-#define F_FW_RI_RES_WR_ONCHIP V_FW_RI_RES_WR_ONCHIP(1U)
-
-#define S_FW_RI_RES_WR_PCIECHN 16
-#define M_FW_RI_RES_WR_PCIECHN 0x3
-#define V_FW_RI_RES_WR_PCIECHN(x) ((x) << S_FW_RI_RES_WR_PCIECHN)
-#define G_FW_RI_RES_WR_PCIECHN(x) \
- (((x) >> S_FW_RI_RES_WR_PCIECHN) & M_FW_RI_RES_WR_PCIECHN)
-
-#define S_FW_RI_RES_WR_IQID 0
-#define M_FW_RI_RES_WR_IQID 0xffff
-#define V_FW_RI_RES_WR_IQID(x) ((x) << S_FW_RI_RES_WR_IQID)
-#define G_FW_RI_RES_WR_IQID(x) \
- (((x) >> S_FW_RI_RES_WR_IQID) & M_FW_RI_RES_WR_IQID)
-
-#define S_FW_RI_RES_WR_DCAEN 31
-#define M_FW_RI_RES_WR_DCAEN 0x1
-#define V_FW_RI_RES_WR_DCAEN(x) ((x) << S_FW_RI_RES_WR_DCAEN)
-#define G_FW_RI_RES_WR_DCAEN(x) \
- (((x) >> S_FW_RI_RES_WR_DCAEN) & M_FW_RI_RES_WR_DCAEN)
-#define F_FW_RI_RES_WR_DCAEN V_FW_RI_RES_WR_DCAEN(1U)
-
-#define S_FW_RI_RES_WR_DCACPU 26
-#define M_FW_RI_RES_WR_DCACPU 0x1f
-#define V_FW_RI_RES_WR_DCACPU(x) ((x) << S_FW_RI_RES_WR_DCACPU)
-#define G_FW_RI_RES_WR_DCACPU(x) \
- (((x) >> S_FW_RI_RES_WR_DCACPU) & M_FW_RI_RES_WR_DCACPU)
-
-#define S_FW_RI_RES_WR_FBMIN 23
-#define M_FW_RI_RES_WR_FBMIN 0x7
-#define V_FW_RI_RES_WR_FBMIN(x) ((x) << S_FW_RI_RES_WR_FBMIN)
-#define G_FW_RI_RES_WR_FBMIN(x) \
- (((x) >> S_FW_RI_RES_WR_FBMIN) & M_FW_RI_RES_WR_FBMIN)
-
-#define S_FW_RI_RES_WR_FBMAX 20
-#define M_FW_RI_RES_WR_FBMAX 0x7
-#define V_FW_RI_RES_WR_FBMAX(x) ((x) << S_FW_RI_RES_WR_FBMAX)
-#define G_FW_RI_RES_WR_FBMAX(x) \
- (((x) >> S_FW_RI_RES_WR_FBMAX) & M_FW_RI_RES_WR_FBMAX)
-
-#define S_FW_RI_RES_WR_CIDXFTHRESHO 19
-#define M_FW_RI_RES_WR_CIDXFTHRESHO 0x1
-#define V_FW_RI_RES_WR_CIDXFTHRESHO(x) ((x) << S_FW_RI_RES_WR_CIDXFTHRESHO)
-#define G_FW_RI_RES_WR_CIDXFTHRESHO(x) \
- (((x) >> S_FW_RI_RES_WR_CIDXFTHRESHO) & M_FW_RI_RES_WR_CIDXFTHRESHO)
-#define F_FW_RI_RES_WR_CIDXFTHRESHO V_FW_RI_RES_WR_CIDXFTHRESHO(1U)
-
-#define S_FW_RI_RES_WR_CIDXFTHRESH 16
-#define M_FW_RI_RES_WR_CIDXFTHRESH 0x7
-#define V_FW_RI_RES_WR_CIDXFTHRESH(x) ((x) << S_FW_RI_RES_WR_CIDXFTHRESH)
-#define G_FW_RI_RES_WR_CIDXFTHRESH(x) \
- (((x) >> S_FW_RI_RES_WR_CIDXFTHRESH) & M_FW_RI_RES_WR_CIDXFTHRESH)
-
-#define S_FW_RI_RES_WR_EQSIZE 0
-#define M_FW_RI_RES_WR_EQSIZE 0xffff
-#define V_FW_RI_RES_WR_EQSIZE(x) ((x) << S_FW_RI_RES_WR_EQSIZE)
-#define G_FW_RI_RES_WR_EQSIZE(x) \
- (((x) >> S_FW_RI_RES_WR_EQSIZE) & M_FW_RI_RES_WR_EQSIZE)
-
-#define S_FW_RI_RES_WR_IQANDST 15
-#define M_FW_RI_RES_WR_IQANDST 0x1
-#define V_FW_RI_RES_WR_IQANDST(x) ((x) << S_FW_RI_RES_WR_IQANDST)
-#define G_FW_RI_RES_WR_IQANDST(x) \
- (((x) >> S_FW_RI_RES_WR_IQANDST) & M_FW_RI_RES_WR_IQANDST)
-#define F_FW_RI_RES_WR_IQANDST V_FW_RI_RES_WR_IQANDST(1U)
-
-#define S_FW_RI_RES_WR_IQANUS 14
-#define M_FW_RI_RES_WR_IQANUS 0x1
-#define V_FW_RI_RES_WR_IQANUS(x) ((x) << S_FW_RI_RES_WR_IQANUS)
-#define G_FW_RI_RES_WR_IQANUS(x) \
- (((x) >> S_FW_RI_RES_WR_IQANUS) & M_FW_RI_RES_WR_IQANUS)
-#define F_FW_RI_RES_WR_IQANUS V_FW_RI_RES_WR_IQANUS(1U)
-
-#define S_FW_RI_RES_WR_IQANUD 12
-#define M_FW_RI_RES_WR_IQANUD 0x3
-#define V_FW_RI_RES_WR_IQANUD(x) ((x) << S_FW_RI_RES_WR_IQANUD)
-#define G_FW_RI_RES_WR_IQANUD(x) \
- (((x) >> S_FW_RI_RES_WR_IQANUD) & M_FW_RI_RES_WR_IQANUD)
-
-#define S_FW_RI_RES_WR_IQANDSTINDEX 0
-#define M_FW_RI_RES_WR_IQANDSTINDEX 0xfff
-#define V_FW_RI_RES_WR_IQANDSTINDEX(x) ((x) << S_FW_RI_RES_WR_IQANDSTINDEX)
-#define G_FW_RI_RES_WR_IQANDSTINDEX(x) \
- (((x) >> S_FW_RI_RES_WR_IQANDSTINDEX) & M_FW_RI_RES_WR_IQANDSTINDEX)
-
-#define S_FW_RI_RES_WR_IQDROPRSS 15
-#define M_FW_RI_RES_WR_IQDROPRSS 0x1
-#define V_FW_RI_RES_WR_IQDROPRSS(x) ((x) << S_FW_RI_RES_WR_IQDROPRSS)
-#define G_FW_RI_RES_WR_IQDROPRSS(x) \
- (((x) >> S_FW_RI_RES_WR_IQDROPRSS) & M_FW_RI_RES_WR_IQDROPRSS)
-#define F_FW_RI_RES_WR_IQDROPRSS V_FW_RI_RES_WR_IQDROPRSS(1U)
-
-#define S_FW_RI_RES_WR_IQGTSMODE 14
-#define M_FW_RI_RES_WR_IQGTSMODE 0x1
-#define V_FW_RI_RES_WR_IQGTSMODE(x) ((x) << S_FW_RI_RES_WR_IQGTSMODE)
-#define G_FW_RI_RES_WR_IQGTSMODE(x) \
- (((x) >> S_FW_RI_RES_WR_IQGTSMODE) & M_FW_RI_RES_WR_IQGTSMODE)
-#define F_FW_RI_RES_WR_IQGTSMODE V_FW_RI_RES_WR_IQGTSMODE(1U)
-
-#define S_FW_RI_RES_WR_IQPCIECH 12
-#define M_FW_RI_RES_WR_IQPCIECH 0x3
-#define V_FW_RI_RES_WR_IQPCIECH(x) ((x) << S_FW_RI_RES_WR_IQPCIECH)
-#define G_FW_RI_RES_WR_IQPCIECH(x) \
- (((x) >> S_FW_RI_RES_WR_IQPCIECH) & M_FW_RI_RES_WR_IQPCIECH)
-
-#define S_FW_RI_RES_WR_IQDCAEN 11
-#define M_FW_RI_RES_WR_IQDCAEN 0x1
-#define V_FW_RI_RES_WR_IQDCAEN(x) ((x) << S_FW_RI_RES_WR_IQDCAEN)
-#define G_FW_RI_RES_WR_IQDCAEN(x) \
- (((x) >> S_FW_RI_RES_WR_IQDCAEN) & M_FW_RI_RES_WR_IQDCAEN)
-#define F_FW_RI_RES_WR_IQDCAEN V_FW_RI_RES_WR_IQDCAEN(1U)
-
-#define S_FW_RI_RES_WR_IQDCACPU 6
-#define M_FW_RI_RES_WR_IQDCACPU 0x1f
-#define V_FW_RI_RES_WR_IQDCACPU(x) ((x) << S_FW_RI_RES_WR_IQDCACPU)
-#define G_FW_RI_RES_WR_IQDCACPU(x) \
- (((x) >> S_FW_RI_RES_WR_IQDCACPU) & M_FW_RI_RES_WR_IQDCACPU)
-
-#define S_FW_RI_RES_WR_IQINTCNTTHRESH 4
-#define M_FW_RI_RES_WR_IQINTCNTTHRESH 0x3
-#define V_FW_RI_RES_WR_IQINTCNTTHRESH(x) \
- ((x) << S_FW_RI_RES_WR_IQINTCNTTHRESH)
-#define G_FW_RI_RES_WR_IQINTCNTTHRESH(x) \
- (((x) >> S_FW_RI_RES_WR_IQINTCNTTHRESH) & M_FW_RI_RES_WR_IQINTCNTTHRESH)
-
-#define S_FW_RI_RES_WR_IQO 3
-#define M_FW_RI_RES_WR_IQO 0x1
-#define V_FW_RI_RES_WR_IQO(x) ((x) << S_FW_RI_RES_WR_IQO)
-#define G_FW_RI_RES_WR_IQO(x) \
- (((x) >> S_FW_RI_RES_WR_IQO) & M_FW_RI_RES_WR_IQO)
-#define F_FW_RI_RES_WR_IQO V_FW_RI_RES_WR_IQO(1U)
-
-#define S_FW_RI_RES_WR_IQCPRIO 2
-#define M_FW_RI_RES_WR_IQCPRIO 0x1
-#define V_FW_RI_RES_WR_IQCPRIO(x) ((x) << S_FW_RI_RES_WR_IQCPRIO)
-#define G_FW_RI_RES_WR_IQCPRIO(x) \
- (((x) >> S_FW_RI_RES_WR_IQCPRIO) & M_FW_RI_RES_WR_IQCPRIO)
-#define F_FW_RI_RES_WR_IQCPRIO V_FW_RI_RES_WR_IQCPRIO(1U)
-
-#define S_FW_RI_RES_WR_IQESIZE 0
-#define M_FW_RI_RES_WR_IQESIZE 0x3
-#define V_FW_RI_RES_WR_IQESIZE(x) ((x) << S_FW_RI_RES_WR_IQESIZE)
-#define G_FW_RI_RES_WR_IQESIZE(x) \
- (((x) >> S_FW_RI_RES_WR_IQESIZE) & M_FW_RI_RES_WR_IQESIZE)
-
-#define S_FW_RI_RES_WR_IQNS 31
-#define M_FW_RI_RES_WR_IQNS 0x1
-#define V_FW_RI_RES_WR_IQNS(x) ((x) << S_FW_RI_RES_WR_IQNS)
-#define G_FW_RI_RES_WR_IQNS(x) \
- (((x) >> S_FW_RI_RES_WR_IQNS) & M_FW_RI_RES_WR_IQNS)
-#define F_FW_RI_RES_WR_IQNS V_FW_RI_RES_WR_IQNS(1U)
-
-#define S_FW_RI_RES_WR_IQRO 30
-#define M_FW_RI_RES_WR_IQRO 0x1
-#define V_FW_RI_RES_WR_IQRO(x) ((x) << S_FW_RI_RES_WR_IQRO)
-#define G_FW_RI_RES_WR_IQRO(x) \
- (((x) >> S_FW_RI_RES_WR_IQRO) & M_FW_RI_RES_WR_IQRO)
-#define F_FW_RI_RES_WR_IQRO V_FW_RI_RES_WR_IQRO(1U)
-
-struct fw_ri_rdma_write_wr {
- __u8 opcode;
- __u8 flags;
- __u16 wrid;
- __u8 r1[3];
- __u8 len16;
- __be64 r2;
- __be32 plen;
- __be32 stag_sink;
- __be64 to_sink;
-#ifndef C99_NOT_SUPPORTED
- union {
- struct fw_ri_immd immd_src[0];
- struct fw_ri_isgl isgl_src[0];
- } u;
-#endif
-};
-
-struct fw_ri_send_wr {
- __u8 opcode;
- __u8 flags;
- __u16 wrid;
- __u8 r1[3];
- __u8 len16;
- __be32 sendop_pkd;
- __be32 stag_inv;
- __be32 plen;
- __be32 r3;
- __be64 r4;
-#ifndef C99_NOT_SUPPORTED
- union {
- struct fw_ri_immd immd_src[0];
- struct fw_ri_isgl isgl_src[0];
- } u;
-#endif
-};
-
-#define S_FW_RI_SEND_WR_SENDOP 0
-#define M_FW_RI_SEND_WR_SENDOP 0xf
-#define V_FW_RI_SEND_WR_SENDOP(x) ((x) << S_FW_RI_SEND_WR_SENDOP)
-#define G_FW_RI_SEND_WR_SENDOP(x) \
- (((x) >> S_FW_RI_SEND_WR_SENDOP) & M_FW_RI_SEND_WR_SENDOP)
-
-struct fw_ri_rdma_read_wr {
- __u8 opcode;
- __u8 flags;
- __u16 wrid;
- __u8 r1[3];
- __u8 len16;
- __be64 r2;
- __be32 stag_sink;
- __be32 to_sink_hi;
- __be32 to_sink_lo;
- __be32 plen;
- __be32 stag_src;
- __be32 to_src_hi;
- __be32 to_src_lo;
- __be32 r5;
-};
-
-struct fw_ri_recv_wr {
- __u8 opcode;
- __u8 r1;
- __u16 wrid;
- __u8 r2[3];
- __u8 len16;
- struct fw_ri_isgl isgl;
-};
-
-struct fw_ri_bind_mw_wr {
- __u8 opcode;
- __u8 flags;
- __u16 wrid;
- __u8 r1[3];
- __u8 len16;
- __u8 qpbinde_to_dcacpu;
- __u8 pgsz_shift;
- __u8 addr_type;
- __u8 mem_perms;
- __be32 stag_mr;
- __be32 stag_mw;
- __be32 r3;
- __be64 len_mw;
- __be64 va_fbo;
- __be64 r4;
-};
-
-#define S_FW_RI_BIND_MW_WR_QPBINDE 6
-#define M_FW_RI_BIND_MW_WR_QPBINDE 0x1
-#define V_FW_RI_BIND_MW_WR_QPBINDE(x) ((x) << S_FW_RI_BIND_MW_WR_QPBINDE)
-#define G_FW_RI_BIND_MW_WR_QPBINDE(x) \
- (((x) >> S_FW_RI_BIND_MW_WR_QPBINDE) & M_FW_RI_BIND_MW_WR_QPBINDE)
-#define F_FW_RI_BIND_MW_WR_QPBINDE V_FW_RI_BIND_MW_WR_QPBINDE(1U)
-
-#define S_FW_RI_BIND_MW_WR_NS 5
-#define M_FW_RI_BIND_MW_WR_NS 0x1
-#define V_FW_RI_BIND_MW_WR_NS(x) ((x) << S_FW_RI_BIND_MW_WR_NS)
-#define G_FW_RI_BIND_MW_WR_NS(x) \
- (((x) >> S_FW_RI_BIND_MW_WR_NS) & M_FW_RI_BIND_MW_WR_NS)
-#define F_FW_RI_BIND_MW_WR_NS V_FW_RI_BIND_MW_WR_NS(1U)
-
-#define S_FW_RI_BIND_MW_WR_DCACPU 0
-#define M_FW_RI_BIND_MW_WR_DCACPU 0x1f
-#define V_FW_RI_BIND_MW_WR_DCACPU(x) ((x) << S_FW_RI_BIND_MW_WR_DCACPU)
-#define G_FW_RI_BIND_MW_WR_DCACPU(x) \
- (((x) >> S_FW_RI_BIND_MW_WR_DCACPU) & M_FW_RI_BIND_MW_WR_DCACPU)
-
-struct fw_ri_fr_nsmr_wr {
- __u8 opcode;
- __u8 flags;
- __u16 wrid;
- __u8 r1[3];
- __u8 len16;
- __u8 qpbinde_to_dcacpu;
- __u8 pgsz_shift;
- __u8 addr_type;
- __u8 mem_perms;
- __be32 stag;
- __be32 len_hi;
- __be32 len_lo;
- __be32 va_hi;
- __be32 va_lo_fbo;
-};
-
-#define S_FW_RI_FR_NSMR_WR_QPBINDE 6
-#define M_FW_RI_FR_NSMR_WR_QPBINDE 0x1
-#define V_FW_RI_FR_NSMR_WR_QPBINDE(x) ((x) << S_FW_RI_FR_NSMR_WR_QPBINDE)
-#define G_FW_RI_FR_NSMR_WR_QPBINDE(x) \
- (((x) >> S_FW_RI_FR_NSMR_WR_QPBINDE) & M_FW_RI_FR_NSMR_WR_QPBINDE)
-#define F_FW_RI_FR_NSMR_WR_QPBINDE V_FW_RI_FR_NSMR_WR_QPBINDE(1U)
-
-#define S_FW_RI_FR_NSMR_WR_NS 5
-#define M_FW_RI_FR_NSMR_WR_NS 0x1
-#define V_FW_RI_FR_NSMR_WR_NS(x) ((x) << S_FW_RI_FR_NSMR_WR_NS)
-#define G_FW_RI_FR_NSMR_WR_NS(x) \
- (((x) >> S_FW_RI_FR_NSMR_WR_NS) & M_FW_RI_FR_NSMR_WR_NS)
-#define F_FW_RI_FR_NSMR_WR_NS V_FW_RI_FR_NSMR_WR_NS(1U)
-
-#define S_FW_RI_FR_NSMR_WR_DCACPU 0
-#define M_FW_RI_FR_NSMR_WR_DCACPU 0x1f
-#define V_FW_RI_FR_NSMR_WR_DCACPU(x) ((x) << S_FW_RI_FR_NSMR_WR_DCACPU)
-#define G_FW_RI_FR_NSMR_WR_DCACPU(x) \
- (((x) >> S_FW_RI_FR_NSMR_WR_DCACPU) & M_FW_RI_FR_NSMR_WR_DCACPU)
-
-struct fw_ri_inv_lstag_wr {
- __u8 opcode;
- __u8 flags;
- __u16 wrid;
- __u8 r1[3];
- __u8 len16;
- __be32 r2;
- __be32 stag_inv;
-};
-
-enum fw_ri_type {
- FW_RI_TYPE_INIT,
- FW_RI_TYPE_FINI,
- FW_RI_TYPE_TERMINATE
-};
-
-enum fw_ri_init_p2ptype {
- FW_RI_INIT_P2PTYPE_RDMA_WRITE = FW_RI_RDMA_WRITE,
- FW_RI_INIT_P2PTYPE_READ_REQ = FW_RI_READ_REQ,
- FW_RI_INIT_P2PTYPE_SEND = FW_RI_SEND,
- FW_RI_INIT_P2PTYPE_SEND_WITH_INV = FW_RI_SEND_WITH_INV,
- FW_RI_INIT_P2PTYPE_SEND_WITH_SE = FW_RI_SEND_WITH_SE,
- FW_RI_INIT_P2PTYPE_SEND_WITH_SE_INV = FW_RI_SEND_WITH_SE_INV,
- FW_RI_INIT_P2PTYPE_DISABLED = 0xf,
-};
-
-struct fw_ri_wr {
- __be32 op_compl;
- __be32 flowid_len16;
- __u64 cookie;
- union fw_ri {
- struct fw_ri_init {
- __u8 type;
- __u8 mpareqbit_p2ptype;
- __u8 r4[2];
- __u8 mpa_attrs;
- __u8 qp_caps;
- __be16 nrqe;
- __be32 pdid;
- __be32 qpid;
- __be32 sq_eqid;
- __be32 rq_eqid;
- __be32 scqid;
- __be32 rcqid;
- __be32 ord_max;
- __be32 ird_max;
- __be32 iss;
- __be32 irs;
- __be32 hwrqsize;
- __be32 hwrqaddr;
- __be64 r5;
- union fw_ri_init_p2p {
- struct fw_ri_rdma_write_wr write;
- struct fw_ri_rdma_read_wr read;
- struct fw_ri_send_wr send;
- } u;
- } init;
- struct fw_ri_fini {
- __u8 type;
- __u8 r3[7];
- __be64 r4;
- } fini;
- struct fw_ri_terminate {
- __u8 type;
- __u8 r3[3];
- __be32 immdlen;
- __u8 termmsg[40];
- } terminate;
- } u;
-};
-
-#define S_FW_RI_WR_MPAREQBIT 7
-#define M_FW_RI_WR_MPAREQBIT 0x1
-#define V_FW_RI_WR_MPAREQBIT(x) ((x) << S_FW_RI_WR_MPAREQBIT)
-#define G_FW_RI_WR_MPAREQBIT(x) \
- (((x) >> S_FW_RI_WR_MPAREQBIT) & M_FW_RI_WR_MPAREQBIT)
-#define F_FW_RI_WR_MPAREQBIT V_FW_RI_WR_MPAREQBIT(1U)
-
-#define S_FW_RI_WR_0BRRBIT 6
-#define M_FW_RI_WR_0BRRBIT 0x1
-#define V_FW_RI_WR_0BRRBIT(x) ((x) << S_FW_RI_WR_0BRRBIT)
-#define G_FW_RI_WR_0BRRBIT(x) \
- (((x) >> S_FW_RI_WR_0BRRBIT) & M_FW_RI_WR_0BRRBIT)
-#define F_FW_RI_WR_0BRRBIT V_FW_RI_WR_0BRRBIT(1U)
-
-#define S_FW_RI_WR_P2PTYPE 0
-#define M_FW_RI_WR_P2PTYPE 0xf
-#define V_FW_RI_WR_P2PTYPE(x) ((x) << S_FW_RI_WR_P2PTYPE)
-#define G_FW_RI_WR_P2PTYPE(x) \
- (((x) >> S_FW_RI_WR_P2PTYPE) & M_FW_RI_WR_P2PTYPE)
-
-#ifdef FOISCSI
-struct fw_iscsi_node_wr {
- __u8 opcode;
- __u8 subop;
- __u8 node_attr_to_compl;
- __u8 len16;
- __u8 status;
- __u8 r2;
- __be16 immd_len;
- __be64 cookie;
- __be32 node_id;
- __be32 ctrl_handle;
- __be32 io_handle;
- __be32 r3;
-};
-
-#define S_FW_ISCSI_NODE_WR_NODE_ATTR 7
-#define M_FW_ISCSI_NODE_WR_NODE_ATTR 0x1
-#define V_FW_ISCSI_NODE_WR_NODE_ATTR(x) ((x) << S_FW_ISCSI_NODE_WR_NODE_ATTR)
-#define G_FW_ISCSI_NODE_WR_NODE_ATTR(x) \
- (((x) >> S_FW_ISCSI_NODE_WR_NODE_ATTR) & M_FW_ISCSI_NODE_WR_NODE_ATTR)
-#define F_FW_ISCSI_NODE_WR_NODE_ATTR V_FW_ISCSI_NODE_WR_NODE_ATTR(1U)
-
-#define S_FW_ISCSI_NODE_WR_SESS_ATTR 6
-#define M_FW_ISCSI_NODE_WR_SESS_ATTR 0x1
-#define V_FW_ISCSI_NODE_WR_SESS_ATTR(x) ((x) << S_FW_ISCSI_NODE_WR_SESS_ATTR)
-#define G_FW_ISCSI_NODE_WR_SESS_ATTR(x) \
- (((x) >> S_FW_ISCSI_NODE_WR_SESS_ATTR) & M_FW_ISCSI_NODE_WR_SESS_ATTR)
-#define F_FW_ISCSI_NODE_WR_SESS_ATTR V_FW_ISCSI_NODE_WR_SESS_ATTR(1U)
-
-#define S_FW_ISCSI_NODE_WR_CONN_ATTR 5
-#define M_FW_ISCSI_NODE_WR_CONN_ATTR 0x1
-#define V_FW_ISCSI_NODE_WR_CONN_ATTR(x) ((x) << S_FW_ISCSI_NODE_WR_CONN_ATTR)
-#define G_FW_ISCSI_NODE_WR_CONN_ATTR(x) \
- (((x) >> S_FW_ISCSI_NODE_WR_CONN_ATTR) & M_FW_ISCSI_NODE_WR_CONN_ATTR)
-#define F_FW_ISCSI_NODE_WR_CONN_ATTR V_FW_ISCSI_NODE_WR_CONN_ATTR(1U)
-
-#define S_FW_ISCSI_NODE_WR_TGT_ATTR 4
-#define M_FW_ISCSI_NODE_WR_TGT_ATTR 0x1
-#define V_FW_ISCSI_NODE_WR_TGT_ATTR(x) ((x) << S_FW_ISCSI_NODE_WR_TGT_ATTR)
-#define G_FW_ISCSI_NODE_WR_TGT_ATTR(x) \
- (((x) >> S_FW_ISCSI_NODE_WR_TGT_ATTR) & M_FW_ISCSI_NODE_WR_TGT_ATTR)
-#define F_FW_ISCSI_NODE_WR_TGT_ATTR V_FW_ISCSI_NODE_WR_TGT_ATTR(1U)
-
-#define S_FW_ISCSI_NODE_WR_NODE_TYPE 3
-#define M_FW_ISCSI_NODE_WR_NODE_TYPE 0x1
-#define V_FW_ISCSI_NODE_WR_NODE_TYPE(x) ((x) << S_FW_ISCSI_NODE_WR_NODE_TYPE)
-#define G_FW_ISCSI_NODE_WR_NODE_TYPE(x) \
- (((x) >> S_FW_ISCSI_NODE_WR_NODE_TYPE) & M_FW_ISCSI_NODE_WR_NODE_TYPE)
-#define F_FW_ISCSI_NODE_WR_NODE_TYPE V_FW_ISCSI_NODE_WR_NODE_TYPE(1U)
-
-#define S_FW_ISCSI_NODE_WR_COMPL 0
-#define M_FW_ISCSI_NODE_WR_COMPL 0x1
-#define V_FW_ISCSI_NODE_WR_COMPL(x) ((x) << S_FW_ISCSI_NODE_WR_COMPL)
-#define G_FW_ISCSI_NODE_WR_COMPL(x) \
- (((x) >> S_FW_ISCSI_NODE_WR_COMPL) & M_FW_ISCSI_NODE_WR_COMPL)
-#define F_FW_ISCSI_NODE_WR_COMPL V_FW_ISCSI_NODE_WR_COMPL(1U)
-
-#endif
-
-/******************************************************************************
- * C O M M A N D s
- *********************/
-
-/*
- * The maximum length of time, in miliseconds, that we expect any firmware
- * command to take to execute and return a reply to the host. The RESET
- * and INITIALIZE commands can take a fair amount of time to execute but
- * most execute in far less time than this maximum. This constant is used
- * by host software to determine how long to wait for a firmware command
- * reply before declaring the firmware as dead/unreachable ...
- */
-#define FW_CMD_MAX_TIMEOUT 10000
-
-enum fw_cmd_opcodes {
- FW_LDST_CMD = 0x01,
- FW_RESET_CMD = 0x03,
- FW_HELLO_CMD = 0x04,
- FW_BYE_CMD = 0x05,
- FW_INITIALIZE_CMD = 0x06,
- FW_CAPS_CONFIG_CMD = 0x07,
- FW_PARAMS_CMD = 0x08,
- FW_PFVF_CMD = 0x09,
- FW_IQ_CMD = 0x10,
- FW_EQ_MNGT_CMD = 0x11,
- FW_EQ_ETH_CMD = 0x12,
- FW_EQ_CTRL_CMD = 0x13,
- FW_EQ_OFLD_CMD = 0x21,
- FW_VI_CMD = 0x14,
- FW_VI_MAC_CMD = 0x15,
- FW_VI_RXMODE_CMD = 0x16,
- FW_VI_ENABLE_CMD = 0x17,
- FW_VI_STATS_CMD = 0x1a,
- FW_ACL_MAC_CMD = 0x18,
- FW_ACL_VLAN_CMD = 0x19,
- FW_PORT_CMD = 0x1b,
- FW_PORT_STATS_CMD = 0x1c,
- FW_PORT_LB_STATS_CMD = 0x1d,
- FW_PORT_TRACE_CMD = 0x1e,
- FW_PORT_TRACE_MMAP_CMD = 0x1f,
- FW_RSS_IND_TBL_CMD = 0x20,
- FW_RSS_GLB_CONFIG_CMD = 0x22,
- FW_RSS_VI_CONFIG_CMD = 0x23,
- FW_SCHED_CMD = 0x24,
- FW_DEVLOG_CMD = 0x25,
- FW_NETIF_CMD = 0x26,
- FW_LASTC2E_CMD = 0x40,
- FW_ERROR_CMD = 0x80,
- FW_DEBUG_CMD = 0x81,
-
-};
-
-enum fw_cmd_cap {
- FW_CMD_CAP_PF = 0x01,
- FW_CMD_CAP_DMAQ = 0x02,
- FW_CMD_CAP_PORT = 0x04,
- FW_CMD_CAP_PORTPROMISC = 0x08,
- FW_CMD_CAP_PORTSTATS = 0x10,
- FW_CMD_CAP_VF = 0x80,
-};
-
-/*
- * Generic command header flit0
- */
-struct fw_cmd_hdr {
- __be32 hi;
- __be32 lo;
-};
-
-#define S_FW_CMD_OP 24
-#define M_FW_CMD_OP 0xff
-#define V_FW_CMD_OP(x) ((x) << S_FW_CMD_OP)
-#define G_FW_CMD_OP(x) (((x) >> S_FW_CMD_OP) & M_FW_CMD_OP)
-
-#define S_FW_CMD_REQUEST 23
-#define M_FW_CMD_REQUEST 0x1
-#define V_FW_CMD_REQUEST(x) ((x) << S_FW_CMD_REQUEST)
-#define G_FW_CMD_REQUEST(x) (((x) >> S_FW_CMD_REQUEST) & M_FW_CMD_REQUEST)
-#define F_FW_CMD_REQUEST V_FW_CMD_REQUEST(1U)
-
-#define S_FW_CMD_READ 22
-#define M_FW_CMD_READ 0x1
-#define V_FW_CMD_READ(x) ((x) << S_FW_CMD_READ)
-#define G_FW_CMD_READ(x) (((x) >> S_FW_CMD_READ) & M_FW_CMD_READ)
-#define F_FW_CMD_READ V_FW_CMD_READ(1U)
-
-#define S_FW_CMD_WRITE 21
-#define M_FW_CMD_WRITE 0x1
-#define V_FW_CMD_WRITE(x) ((x) << S_FW_CMD_WRITE)
-#define G_FW_CMD_WRITE(x) (((x) >> S_FW_CMD_WRITE) & M_FW_CMD_WRITE)
-#define F_FW_CMD_WRITE V_FW_CMD_WRITE(1U)
-
-#define S_FW_CMD_EXEC 20
-#define M_FW_CMD_EXEC 0x1
-#define V_FW_CMD_EXEC(x) ((x) << S_FW_CMD_EXEC)
-#define G_FW_CMD_EXEC(x) (((x) >> S_FW_CMD_EXEC) & M_FW_CMD_EXEC)
-#define F_FW_CMD_EXEC V_FW_CMD_EXEC(1U)
-
-#define S_FW_CMD_RAMASK 20
-#define M_FW_CMD_RAMASK 0xf
-#define V_FW_CMD_RAMASK(x) ((x) << S_FW_CMD_RAMASK)
-#define G_FW_CMD_RAMASK(x) (((x) >> S_FW_CMD_RAMASK) & M_FW_CMD_RAMASK)
-
-#define S_FW_CMD_RETVAL 8
-#define M_FW_CMD_RETVAL 0xff
-#define V_FW_CMD_RETVAL(x) ((x) << S_FW_CMD_RETVAL)
-#define G_FW_CMD_RETVAL(x) (((x) >> S_FW_CMD_RETVAL) & M_FW_CMD_RETVAL)
-
-#define S_FW_CMD_LEN16 0
-#define M_FW_CMD_LEN16 0xff
-#define V_FW_CMD_LEN16(x) ((x) << S_FW_CMD_LEN16)
-#define G_FW_CMD_LEN16(x) (((x) >> S_FW_CMD_LEN16) & M_FW_CMD_LEN16)
-
-#define FW_LEN16(fw_struct) V_FW_CMD_LEN16(sizeof(fw_struct) / 16)
-
-/*
- * address spaces
- */
-enum fw_ldst_addrspc {
- FW_LDST_ADDRSPC_FIRMWARE = 0x0001,
- FW_LDST_ADDRSPC_SGE_EGRC = 0x0008,
- FW_LDST_ADDRSPC_SGE_INGC = 0x0009,
- FW_LDST_ADDRSPC_SGE_FLMC = 0x000a,
- FW_LDST_ADDRSPC_SGE_CONMC = 0x000b,
- FW_LDST_ADDRSPC_TP_PIO = 0x0010,
- FW_LDST_ADDRSPC_TP_TM_PIO = 0x0011,
- FW_LDST_ADDRSPC_TP_MIB = 0x0012,
- FW_LDST_ADDRSPC_MDIO = 0x0018,
- FW_LDST_ADDRSPC_MPS = 0x0020,
- FW_LDST_ADDRSPC_FUNC = 0x0028,
- FW_LDST_ADDRSPC_FUNC_PCIE = 0x0029,
- FW_LDST_ADDRSPC_FUNC_I2C = 0x002A,
-};
-
-/*
- * MDIO VSC8634 register access control field
- */
-enum fw_ldst_mdio_vsc8634_aid {
- FW_LDST_MDIO_VS_STANDARD,
- FW_LDST_MDIO_VS_EXTENDED,
- FW_LDST_MDIO_VS_GPIO
-};
-
-enum fw_ldst_mps_fid {
- FW_LDST_MPS_ATRB,
- FW_LDST_MPS_RPLC
-};
-
-enum fw_ldst_func_access_ctl {
- FW_LDST_FUNC_ACC_CTL_VIID,
- FW_LDST_FUNC_ACC_CTL_FID
-};
-
-enum fw_ldst_func_mod_index {
- FW_LDST_FUNC_MPS
-};
-
-struct fw_ldst_cmd {
- __be32 op_to_addrspace;
- __be32 cycles_to_len16;
- union fw_ldst {
- struct fw_ldst_addrval {
- __be32 addr;
- __be32 val;
- } addrval;
- struct fw_ldst_idctxt {
- __be32 physid;
- __be32 msg_pkd;
- __be32 ctxt_data7;
- __be32 ctxt_data6;
- __be32 ctxt_data5;
- __be32 ctxt_data4;
- __be32 ctxt_data3;
- __be32 ctxt_data2;
- __be32 ctxt_data1;
- __be32 ctxt_data0;
- } idctxt;
- struct fw_ldst_mdio {
- __be16 paddr_mmd;
- __be16 raddr;
- __be16 vctl;
- __be16 rval;
- } mdio;
- struct fw_ldst_mps {
- __be16 fid_ctl;
- __be16 rplcpf_pkd;
- __be32 rplc127_96;
- __be32 rplc95_64;
- __be32 rplc63_32;
- __be32 rplc31_0;
- __be32 atrb;
- __be16 vlan[16];
- } mps;
- struct fw_ldst_func {
- __u8 access_ctl;
- __u8 mod_index;
- __be16 ctl_id;
- __be32 offset;
- __be64 data0;
- __be64 data1;
- } func;
- struct fw_ldst_pcie {
- __u8 ctrl_to_fn;
- __u8 bnum;
- __u8 r;
- __u8 ext_r;
- __u8 select_naccess;
- __u8 pcie_fn;
- __be16 nset_pkd;
- __be32 data[12];
- } pcie;
- struct fw_ldst_i2c {
- __u8 pid_pkd;
- __u8 base;
- __u8 boffset;
- __u8 data;
- __be32 r9;
- } i2c;
- } u;
-};
-
-#define S_FW_LDST_CMD_ADDRSPACE 0
-#define M_FW_LDST_CMD_ADDRSPACE 0xff
-#define V_FW_LDST_CMD_ADDRSPACE(x) ((x) << S_FW_LDST_CMD_ADDRSPACE)
-#define G_FW_LDST_CMD_ADDRSPACE(x) \
- (((x) >> S_FW_LDST_CMD_ADDRSPACE) & M_FW_LDST_CMD_ADDRSPACE)
-
-#define S_FW_LDST_CMD_CYCLES 16
-#define M_FW_LDST_CMD_CYCLES 0xffff
-#define V_FW_LDST_CMD_CYCLES(x) ((x) << S_FW_LDST_CMD_CYCLES)
-#define G_FW_LDST_CMD_CYCLES(x) \
- (((x) >> S_FW_LDST_CMD_CYCLES) & M_FW_LDST_CMD_CYCLES)
-
-#define S_FW_LDST_CMD_MSG 31
-#define M_FW_LDST_CMD_MSG 0x1
-#define V_FW_LDST_CMD_MSG(x) ((x) << S_FW_LDST_CMD_MSG)
-#define G_FW_LDST_CMD_MSG(x) \
- (((x) >> S_FW_LDST_CMD_MSG) & M_FW_LDST_CMD_MSG)
-#define F_FW_LDST_CMD_MSG V_FW_LDST_CMD_MSG(1U)
-
-#define S_FW_LDST_CMD_PADDR 8
-#define M_FW_LDST_CMD_PADDR 0x1f
-#define V_FW_LDST_CMD_PADDR(x) ((x) << S_FW_LDST_CMD_PADDR)
-#define G_FW_LDST_CMD_PADDR(x) \
- (((x) >> S_FW_LDST_CMD_PADDR) & M_FW_LDST_CMD_PADDR)
-
-#define S_FW_LDST_CMD_MMD 0
-#define M_FW_LDST_CMD_MMD 0x1f
-#define V_FW_LDST_CMD_MMD(x) ((x) << S_FW_LDST_CMD_MMD)
-#define G_FW_LDST_CMD_MMD(x) \
- (((x) >> S_FW_LDST_CMD_MMD) & M_FW_LDST_CMD_MMD)
-
-#define S_FW_LDST_CMD_FID 15
-#define M_FW_LDST_CMD_FID 0x1
-#define V_FW_LDST_CMD_FID(x) ((x) << S_FW_LDST_CMD_FID)
-#define G_FW_LDST_CMD_FID(x) \
- (((x) >> S_FW_LDST_CMD_FID) & M_FW_LDST_CMD_FID)
-#define F_FW_LDST_CMD_FID V_FW_LDST_CMD_FID(1U)
-
-#define S_FW_LDST_CMD_CTL 0
-#define M_FW_LDST_CMD_CTL 0x7fff
-#define V_FW_LDST_CMD_CTL(x) ((x) << S_FW_LDST_CMD_CTL)
-#define G_FW_LDST_CMD_CTL(x) \
- (((x) >> S_FW_LDST_CMD_CTL) & M_FW_LDST_CMD_CTL)
-
-#define S_FW_LDST_CMD_RPLCPF 0
-#define M_FW_LDST_CMD_RPLCPF 0xff
-#define V_FW_LDST_CMD_RPLCPF(x) ((x) << S_FW_LDST_CMD_RPLCPF)
-#define G_FW_LDST_CMD_RPLCPF(x) \
- (((x) >> S_FW_LDST_CMD_RPLCPF) & M_FW_LDST_CMD_RPLCPF)
-
-#define S_FW_LDST_CMD_CTRL 7
-#define M_FW_LDST_CMD_CTRL 0x1
-#define V_FW_LDST_CMD_CTRL(x) ((x) << S_FW_LDST_CMD_CTRL)
-#define G_FW_LDST_CMD_CTRL(x) \
- (((x) >> S_FW_LDST_CMD_CTRL) & M_FW_LDST_CMD_CTRL)
-#define F_FW_LDST_CMD_CTRL V_FW_LDST_CMD_CTRL(1U)
-
-#define S_FW_LDST_CMD_LC 4
-#define M_FW_LDST_CMD_LC 0x1
-#define V_FW_LDST_CMD_LC(x) ((x) << S_FW_LDST_CMD_LC)
-#define G_FW_LDST_CMD_LC(x) (((x) >> S_FW_LDST_CMD_LC) & M_FW_LDST_CMD_LC)
-#define F_FW_LDST_CMD_LC V_FW_LDST_CMD_LC(1U)
-
-#define S_FW_LDST_CMD_AI 3
-#define M_FW_LDST_CMD_AI 0x1
-#define V_FW_LDST_CMD_AI(x) ((x) << S_FW_LDST_CMD_AI)
-#define G_FW_LDST_CMD_AI(x) (((x) >> S_FW_LDST_CMD_AI) & M_FW_LDST_CMD_AI)
-#define F_FW_LDST_CMD_AI V_FW_LDST_CMD_AI(1U)
-
-#define S_FW_LDST_CMD_FN 0
-#define M_FW_LDST_CMD_FN 0x7
-#define V_FW_LDST_CMD_FN(x) ((x) << S_FW_LDST_CMD_FN)
-#define G_FW_LDST_CMD_FN(x) (((x) >> S_FW_LDST_CMD_FN) & M_FW_LDST_CMD_FN)
-
-#define S_FW_LDST_CMD_SELECT 4
-#define M_FW_LDST_CMD_SELECT 0xf
-#define V_FW_LDST_CMD_SELECT(x) ((x) << S_FW_LDST_CMD_SELECT)
-#define G_FW_LDST_CMD_SELECT(x) \
- (((x) >> S_FW_LDST_CMD_SELECT) & M_FW_LDST_CMD_SELECT)
-
-#define S_FW_LDST_CMD_NACCESS 0
-#define M_FW_LDST_CMD_NACCESS 0xf
-#define V_FW_LDST_CMD_NACCESS(x) ((x) << S_FW_LDST_CMD_NACCESS)
-#define G_FW_LDST_CMD_NACCESS(x) \
- (((x) >> S_FW_LDST_CMD_NACCESS) & M_FW_LDST_CMD_NACCESS)
-
-#define S_FW_LDST_CMD_NSET 14
-#define M_FW_LDST_CMD_NSET 0x3
-#define V_FW_LDST_CMD_NSET(x) ((x) << S_FW_LDST_CMD_NSET)
-#define G_FW_LDST_CMD_NSET(x) \
- (((x) >> S_FW_LDST_CMD_NSET) & M_FW_LDST_CMD_NSET)
-
-#define S_FW_LDST_CMD_PID 6
-#define M_FW_LDST_CMD_PID 0x3
-#define V_FW_LDST_CMD_PID(x) ((x) << S_FW_LDST_CMD_PID)
-#define G_FW_LDST_CMD_PID(x) \
- (((x) >> S_FW_LDST_CMD_PID) & M_FW_LDST_CMD_PID)
-
-struct fw_reset_cmd {
- __be32 op_to_write;
- __be32 retval_len16;
- __be32 val;
- __be32 r3;
-};
-
-struct fw_hello_cmd {
- __be32 op_to_write;
- __be32 retval_len16;
- __be32 err_to_mbasyncnot;
- __be32 fwrev;
-};
-
-#define S_FW_HELLO_CMD_ERR 31
-#define M_FW_HELLO_CMD_ERR 0x1
-#define V_FW_HELLO_CMD_ERR(x) ((x) << S_FW_HELLO_CMD_ERR)
-#define G_FW_HELLO_CMD_ERR(x) \
- (((x) >> S_FW_HELLO_CMD_ERR) & M_FW_HELLO_CMD_ERR)
-#define F_FW_HELLO_CMD_ERR V_FW_HELLO_CMD_ERR(1U)
-
-#define S_FW_HELLO_CMD_INIT 30
-#define M_FW_HELLO_CMD_INIT 0x1
-#define V_FW_HELLO_CMD_INIT(x) ((x) << S_FW_HELLO_CMD_INIT)
-#define G_FW_HELLO_CMD_INIT(x) \
- (((x) >> S_FW_HELLO_CMD_INIT) & M_FW_HELLO_CMD_INIT)
-#define F_FW_HELLO_CMD_INIT V_FW_HELLO_CMD_INIT(1U)
-
-#define S_FW_HELLO_CMD_MASTERDIS 29
-#define M_FW_HELLO_CMD_MASTERDIS 0x1
-#define V_FW_HELLO_CMD_MASTERDIS(x) ((x) << S_FW_HELLO_CMD_MASTERDIS)
-#define G_FW_HELLO_CMD_MASTERDIS(x) \
- (((x) >> S_FW_HELLO_CMD_MASTERDIS) & M_FW_HELLO_CMD_MASTERDIS)
-#define F_FW_HELLO_CMD_MASTERDIS V_FW_HELLO_CMD_MASTERDIS(1U)
-
-#define S_FW_HELLO_CMD_MASTERFORCE 28
-#define M_FW_HELLO_CMD_MASTERFORCE 0x1
-#define V_FW_HELLO_CMD_MASTERFORCE(x) ((x) << S_FW_HELLO_CMD_MASTERFORCE)
-#define G_FW_HELLO_CMD_MASTERFORCE(x) \
- (((x) >> S_FW_HELLO_CMD_MASTERFORCE) & M_FW_HELLO_CMD_MASTERFORCE)
-#define F_FW_HELLO_CMD_MASTERFORCE V_FW_HELLO_CMD_MASTERFORCE(1U)
-
-#define S_FW_HELLO_CMD_MBMASTER 24
-#define M_FW_HELLO_CMD_MBMASTER 0xf
-#define V_FW_HELLO_CMD_MBMASTER(x) ((x) << S_FW_HELLO_CMD_MBMASTER)
-#define G_FW_HELLO_CMD_MBMASTER(x) \
- (((x) >> S_FW_HELLO_CMD_MBMASTER) & M_FW_HELLO_CMD_MBMASTER)
-
-#define S_FW_HELLO_CMD_MBASYNCNOTINT 23
-#define M_FW_HELLO_CMD_MBASYNCNOTINT 0x1
-#define V_FW_HELLO_CMD_MBASYNCNOTINT(x) ((x) << S_FW_HELLO_CMD_MBASYNCNOTINT)
-#define G_FW_HELLO_CMD_MBASYNCNOTINT(x) \
- (((x) >> S_FW_HELLO_CMD_MBASYNCNOTINT) & M_FW_HELLO_CMD_MBASYNCNOTINT)
-#define F_FW_HELLO_CMD_MBASYNCNOTINT V_FW_HELLO_CMD_MBASYNCNOTINT(1U)
-
-#define S_FW_HELLO_CMD_MBASYNCNOT 20
-#define M_FW_HELLO_CMD_MBASYNCNOT 0x7
-#define V_FW_HELLO_CMD_MBASYNCNOT(x) ((x) << S_FW_HELLO_CMD_MBASYNCNOT)
-#define G_FW_HELLO_CMD_MBASYNCNOT(x) \
- (((x) >> S_FW_HELLO_CMD_MBASYNCNOT) & M_FW_HELLO_CMD_MBASYNCNOT)
-
-struct fw_bye_cmd {
- __be32 op_to_write;
- __be32 retval_len16;
- __be64 r3;
-};
-
-struct fw_initialize_cmd {
- __be32 op_to_write;
- __be32 retval_len16;
- __be64 r3;
-};
-
-enum fw_caps_config_hm {
- FW_CAPS_CONFIG_HM_PCIE = 0x00000001,
- FW_CAPS_CONFIG_HM_PL = 0x00000002,
- FW_CAPS_CONFIG_HM_SGE = 0x00000004,
- FW_CAPS_CONFIG_HM_CIM = 0x00000008,
- FW_CAPS_CONFIG_HM_ULPTX = 0x00000010,
- FW_CAPS_CONFIG_HM_TP = 0x00000020,
- FW_CAPS_CONFIG_HM_ULPRX = 0x00000040,
- FW_CAPS_CONFIG_HM_PMRX = 0x00000080,
- FW_CAPS_CONFIG_HM_PMTX = 0x00000100,
- FW_CAPS_CONFIG_HM_MC = 0x00000200,
- FW_CAPS_CONFIG_HM_LE = 0x00000400,
- FW_CAPS_CONFIG_HM_MPS = 0x00000800,
- FW_CAPS_CONFIG_HM_XGMAC = 0x00001000,
- FW_CAPS_CONFIG_HM_CPLSWITCH = 0x00002000,
- FW_CAPS_CONFIG_HM_T4DBG = 0x00004000,
- FW_CAPS_CONFIG_HM_MI = 0x00008000,
- FW_CAPS_CONFIG_HM_I2CM = 0x00010000,
- FW_CAPS_CONFIG_HM_NCSI = 0x00020000,
- FW_CAPS_CONFIG_HM_SMB = 0x00040000,
- FW_CAPS_CONFIG_HM_MA = 0x00080000,
- FW_CAPS_CONFIG_HM_EDRAM = 0x00100000,
- FW_CAPS_CONFIG_HM_PMU = 0x00200000,
- FW_CAPS_CONFIG_HM_UART = 0x00400000,
- FW_CAPS_CONFIG_HM_SF = 0x00800000,
-};
-
-/*
- * The VF Register Map.
- *
- * The Scatter Gather Engine (SGE), Multiport Support module (MPS), PIO Local
- * bus module (PL) and CPU Interface Module (CIM) components are mapped via
- * the Slice to Module Map Table (see below) in the Physical Function Register
- * Map. The Mail Box Data (MBDATA) range is mapped via the PCI-E Mailbox Base
- * and Offset registers in the PF Register Map. The MBDATA base address is
- * quite constrained as it determines the Mailbox Data addresses for both PFs
- * and VFs, and therefore must fit in both the VF and PF Register Maps without
- * overlapping other registers.
- */
-#define FW_T4VF_SGE_BASE_ADDR 0x0000
-#define FW_T4VF_MPS_BASE_ADDR 0x0100
-#define FW_T4VF_PL_BASE_ADDR 0x0200
-#define FW_T4VF_MBDATA_BASE_ADDR 0x0240
-#define FW_T4VF_CIM_BASE_ADDR 0x0300
-
-#define FW_T4VF_REGMAP_START 0x0000
-#define FW_T4VF_REGMAP_SIZE 0x0400
-
-enum fw_caps_config_nbm {
- FW_CAPS_CONFIG_NBM_IPMI = 0x00000001,
- FW_CAPS_CONFIG_NBM_NCSI = 0x00000002,
-};
-
-enum fw_caps_config_link {
- FW_CAPS_CONFIG_LINK_PPP = 0x00000001,
- FW_CAPS_CONFIG_LINK_QFC = 0x00000002,
- FW_CAPS_CONFIG_LINK_DCBX = 0x00000004,
-};
-
-enum fw_caps_config_switch {
- FW_CAPS_CONFIG_SWITCH_INGRESS = 0x00000001,
- FW_CAPS_CONFIG_SWITCH_EGRESS = 0x00000002,
-};
-
-enum fw_caps_config_nic {
- FW_CAPS_CONFIG_NIC = 0x00000001,
- FW_CAPS_CONFIG_NIC_VM = 0x00000002,
- FW_CAPS_CONFIG_NIC_IDS = 0x00000004,
-};
-
-enum fw_caps_config_toe {
- FW_CAPS_CONFIG_TOE = 0x00000001,
-};
-
-enum fw_caps_config_rdma {
- FW_CAPS_CONFIG_RDMA_RDDP = 0x00000001,
- FW_CAPS_CONFIG_RDMA_RDMAC = 0x00000002,
-};
-
-enum fw_caps_config_iscsi {
- FW_CAPS_CONFIG_ISCSI_INITIATOR_PDU = 0x00000001,
- FW_CAPS_CONFIG_ISCSI_TARGET_PDU = 0x00000002,
- FW_CAPS_CONFIG_ISCSI_INITIATOR_CNXOFLD = 0x00000004,
- FW_CAPS_CONFIG_ISCSI_TARGET_CNXOFLD = 0x00000008,
- FW_CAPS_CONFIG_ISCSI_INITIATOR_SSNOFLD = 0x00000010,
- FW_CAPS_CONFIG_ISCSI_TARGET_SSNOFLD = 0x00000020,
-};
-
-enum fw_caps_config_fcoe {
- FW_CAPS_CONFIG_FCOE_INITIATOR = 0x00000001,
- FW_CAPS_CONFIG_FCOE_TARGET = 0x00000002,
- FW_CAPS_CONFIG_FCOE_CTRL_OFLD = 0x00000004,
-};
-
-struct fw_caps_config_cmd {
- __be32 op_to_write;
- __be32 retval_len16;
- __be32 r2;
- __be32 hwmbitmap;
- __be16 nbmcaps;
- __be16 linkcaps;
- __be16 switchcaps;
- __be16 r3;
- __be16 niccaps;
- __be16 toecaps;
- __be16 rdmacaps;
- __be16 r4;
- __be16 iscsicaps;
- __be16 fcoecaps;
- __be32 r5;
- __be64 r6;
-};
-
-/*
- * params command mnemonics
- */
-enum fw_params_mnem {
- FW_PARAMS_MNEM_DEV = 1, /* device params */
- FW_PARAMS_MNEM_PFVF = 2, /* function params */
- FW_PARAMS_MNEM_REG = 3, /* limited register access */
- FW_PARAMS_MNEM_DMAQ = 4, /* dma queue params */
- FW_PARAMS_MNEM_LAST
-};
-
-/*
- * device parameters
- */
-enum fw_params_param_dev {
- FW_PARAMS_PARAM_DEV_CCLK = 0x00, /* chip core clock in khz */
- FW_PARAMS_PARAM_DEV_PORTVEC = 0x01, /* the port vector */
- FW_PARAMS_PARAM_DEV_NTID = 0x02, /* reads the number of TIDs
- * allocated by the device's
- * Lookup Engine
- */
- FW_PARAMS_PARAM_DEV_FLOWC_BUFFIFO_SZ = 0x03,
- FW_PARAMS_PARAM_DEV_INTVER_NIC = 0x04,
- FW_PARAMS_PARAM_DEV_INTVER_VNIC = 0x05,
- FW_PARAMS_PARAM_DEV_INTVER_OFLD = 0x06,
- FW_PARAMS_PARAM_DEV_INTVER_RI = 0x07,
- FW_PARAMS_PARAM_DEV_INTVER_ISCSIPDU = 0x08,
- FW_PARAMS_PARAM_DEV_INTVER_ISCSI = 0x09,
- FW_PARAMS_PARAM_DEV_INTVER_FCOE = 0x0A,
- FW_PARAMS_PARAM_DEV_FWREV = 0x0B,
- FW_PARAMS_PARAM_DEV_TPREV = 0x0C,
-};
-
-/*
- * physical and virtual function parameters
- */
-enum fw_params_param_pfvf {
- FW_PARAMS_PARAM_PFVF_RWXCAPS = 0x00,
- FW_PARAMS_PARAM_PFVF_ROUTE_START = 0x01,
- FW_PARAMS_PARAM_PFVF_ROUTE_END = 0x02,
- FW_PARAMS_PARAM_PFVF_CLIP_START = 0x03,
- FW_PARAMS_PARAM_PFVF_CLIP_END = 0x04,
- FW_PARAMS_PARAM_PFVF_FILTER_START = 0x05,
- FW_PARAMS_PARAM_PFVF_FILTER_END = 0x06,
- FW_PARAMS_PARAM_PFVF_SERVER_START = 0x07,
- FW_PARAMS_PARAM_PFVF_SERVER_END = 0x08,
- FW_PARAMS_PARAM_PFVF_TDDP_START = 0x09,
- FW_PARAMS_PARAM_PFVF_TDDP_END = 0x0A,
- FW_PARAMS_PARAM_PFVF_ISCSI_START = 0x0B,
- FW_PARAMS_PARAM_PFVF_ISCSI_END = 0x0C,
- FW_PARAMS_PARAM_PFVF_STAG_START = 0x0D,
- FW_PARAMS_PARAM_PFVF_STAG_END = 0x0E,
- FW_PARAMS_PARAM_PFVF_RQ_START = 0x1F,
- FW_PARAMS_PARAM_PFVF_RQ_END = 0x10,
- FW_PARAMS_PARAM_PFVF_PBL_START = 0x11,
- FW_PARAMS_PARAM_PFVF_PBL_END = 0x12,
- FW_PARAMS_PARAM_PFVF_L2T_START = 0x13,
- FW_PARAMS_PARAM_PFVF_L2T_END = 0x14,
- FW_PARAMS_PARAM_PFVF_SQRQ_START = 0x15,
- FW_PARAMS_PARAM_PFVF_SQRQ_END = 0x16,
- FW_PARAMS_PARAM_PFVF_CQ_START = 0x17,
- FW_PARAMS_PARAM_PFVF_CQ_END = 0x18,
- FW_PARAMS_PARAM_PFVF_SCHEDCLASS_ETH = 0x20,
- FW_PARAMS_PARAM_PFVF_VIID = 0x24,
- FW_PARAMS_PARAM_PFVF_CPMASK = 0x25,
- FW_PARAMS_PARAM_PFVF_OCQ_START = 0x26,
- FW_PARAMS_PARAM_PFVF_OCQ_END = 0x27,
- FW_PARAMS_PARAM_PFVF_CONM_MAP = 0x28,
- FW_PARAMS_PARAM_PFVF_IQFLINT_START = 0x29,
- FW_PARAMS_PARAM_PFVF_IQFLINT_END = 0x2A,
- FW_PARAMS_PARAM_PFVF_EQ_START = 0x2B,
- FW_PARAMS_PARAM_PFVF_EQ_END = 0x2C
-};
-
-/*
- * dma queue parameters
- */
-enum fw_params_param_dmaq {
- FW_PARAMS_PARAM_DMAQ_IQ_DCAEN_DCACPU = 0x00,
- FW_PARAMS_PARAM_DMAQ_IQ_INTCNTTHRESH = 0x01,
- FW_PARAMS_PARAM_DMAQ_EQ_CMPLIQID_MNGT = 0x10,
- FW_PARAMS_PARAM_DMAQ_EQ_CMPLIQID_CTRL = 0x11,
- FW_PARAMS_PARAM_DMAQ_EQ_SCHEDCLASS_ETH = 0x12,
-};
-
-#define S_FW_PARAMS_MNEM 24
-#define M_FW_PARAMS_MNEM 0xff
-#define V_FW_PARAMS_MNEM(x) ((x) << S_FW_PARAMS_MNEM)
-#define G_FW_PARAMS_MNEM(x) \
- (((x) >> S_FW_PARAMS_MNEM) & M_FW_PARAMS_MNEM)
-
-#define S_FW_PARAMS_PARAM_X 16
-#define M_FW_PARAMS_PARAM_X 0xff
-#define V_FW_PARAMS_PARAM_X(x) ((x) << S_FW_PARAMS_PARAM_X)
-#define G_FW_PARAMS_PARAM_X(x) \
- (((x) >> S_FW_PARAMS_PARAM_X) & M_FW_PARAMS_PARAM_X)
-
-#define S_FW_PARAMS_PARAM_Y 8
-#define M_FW_PARAMS_PARAM_Y 0xff
-#define V_FW_PARAMS_PARAM_Y(x) ((x) << S_FW_PARAMS_PARAM_Y)
-#define G_FW_PARAMS_PARAM_Y(x) \
- (((x) >> S_FW_PARAMS_PARAM_Y) & M_FW_PARAMS_PARAM_Y)
-
-#define S_FW_PARAMS_PARAM_Z 0
-#define M_FW_PARAMS_PARAM_Z 0xff
-#define V_FW_PARAMS_PARAM_Z(x) ((x) << S_FW_PARAMS_PARAM_Z)
-#define G_FW_PARAMS_PARAM_Z(x) \
- (((x) >> S_FW_PARAMS_PARAM_Z) & M_FW_PARAMS_PARAM_Z)
-
-#define S_FW_PARAMS_PARAM_XYZ 0
-#define M_FW_PARAMS_PARAM_XYZ 0xffffff
-#define V_FW_PARAMS_PARAM_XYZ(x) ((x) << S_FW_PARAMS_PARAM_XYZ)
-#define G_FW_PARAMS_PARAM_XYZ(x) \
- (((x) >> S_FW_PARAMS_PARAM_XYZ) & M_FW_PARAMS_PARAM_XYZ)
-
-#define S_FW_PARAMS_PARAM_YZ 0
-#define M_FW_PARAMS_PARAM_YZ 0xffff
-#define V_FW_PARAMS_PARAM_YZ(x) ((x) << S_FW_PARAMS_PARAM_YZ)
-#define G_FW_PARAMS_PARAM_YZ(x) \
- (((x) >> S_FW_PARAMS_PARAM_YZ) & M_FW_PARAMS_PARAM_YZ)
-
-struct fw_params_cmd {
- __be32 op_to_vfn;
- __be32 retval_len16;
- struct fw_params_param {
- __be32 mnem;
- __be32 val;
- } param[7];
-};
-
-#define S_FW_PARAMS_CMD_PFN 8
-#define M_FW_PARAMS_CMD_PFN 0x7
-#define V_FW_PARAMS_CMD_PFN(x) ((x) << S_FW_PARAMS_CMD_PFN)
-#define G_FW_PARAMS_CMD_PFN(x) \
- (((x) >> S_FW_PARAMS_CMD_PFN) & M_FW_PARAMS_CMD_PFN)
-
-#define S_FW_PARAMS_CMD_VFN 0
-#define M_FW_PARAMS_CMD_VFN 0xff
-#define V_FW_PARAMS_CMD_VFN(x) ((x) << S_FW_PARAMS_CMD_VFN)
-#define G_FW_PARAMS_CMD_VFN(x) \
- (((x) >> S_FW_PARAMS_CMD_VFN) & M_FW_PARAMS_CMD_VFN)
-
-struct fw_pfvf_cmd {
- __be32 op_to_vfn;
- __be32 retval_len16;
- __be32 niqflint_niq;
- __be32 type_to_neq;
- __be32 tc_to_nexactf;
- __be32 r_caps_to_nethctrl;
- __be16 nricq;
- __be16 nriqp;
- __be32 r4;
-};
-
-#define S_FW_PFVF_CMD_PFN 8
-#define M_FW_PFVF_CMD_PFN 0x7
-#define V_FW_PFVF_CMD_PFN(x) ((x) << S_FW_PFVF_CMD_PFN)
-#define G_FW_PFVF_CMD_PFN(x) \
- (((x) >> S_FW_PFVF_CMD_PFN) & M_FW_PFVF_CMD_PFN)
-
-#define S_FW_PFVF_CMD_VFN 0
-#define M_FW_PFVF_CMD_VFN 0xff
-#define V_FW_PFVF_CMD_VFN(x) ((x) << S_FW_PFVF_CMD_VFN)
-#define G_FW_PFVF_CMD_VFN(x) \
- (((x) >> S_FW_PFVF_CMD_VFN) & M_FW_PFVF_CMD_VFN)
-
-#define S_FW_PFVF_CMD_NIQFLINT 20
-#define M_FW_PFVF_CMD_NIQFLINT 0xfff
-#define V_FW_PFVF_CMD_NIQFLINT(x) ((x) << S_FW_PFVF_CMD_NIQFLINT)
-#define G_FW_PFVF_CMD_NIQFLINT(x) \
- (((x) >> S_FW_PFVF_CMD_NIQFLINT) & M_FW_PFVF_CMD_NIQFLINT)
-
-#define S_FW_PFVF_CMD_NIQ 0
-#define M_FW_PFVF_CMD_NIQ 0xfffff
-#define V_FW_PFVF_CMD_NIQ(x) ((x) << S_FW_PFVF_CMD_NIQ)
-#define G_FW_PFVF_CMD_NIQ(x) \
- (((x) >> S_FW_PFVF_CMD_NIQ) & M_FW_PFVF_CMD_NIQ)
-
-#define S_FW_PFVF_CMD_TYPE 31
-#define M_FW_PFVF_CMD_TYPE 0x1
-#define V_FW_PFVF_CMD_TYPE(x) ((x) << S_FW_PFVF_CMD_TYPE)
-#define G_FW_PFVF_CMD_TYPE(x) \
- (((x) >> S_FW_PFVF_CMD_TYPE) & M_FW_PFVF_CMD_TYPE)
-#define F_FW_PFVF_CMD_TYPE V_FW_PFVF_CMD_TYPE(1U)
-
-#define S_FW_PFVF_CMD_CMASK 24
-#define M_FW_PFVF_CMD_CMASK 0xf
-#define V_FW_PFVF_CMD_CMASK(x) ((x) << S_FW_PFVF_CMD_CMASK)
-#define G_FW_PFVF_CMD_CMASK(x) \
- (((x) >> S_FW_PFVF_CMD_CMASK) & M_FW_PFVF_CMD_CMASK)
-
-#define S_FW_PFVF_CMD_PMASK 20
-#define M_FW_PFVF_CMD_PMASK 0xf
-#define V_FW_PFVF_CMD_PMASK(x) ((x) << S_FW_PFVF_CMD_PMASK)
-#define G_FW_PFVF_CMD_PMASK(x) \
- (((x) >> S_FW_PFVF_CMD_PMASK) & M_FW_PFVF_CMD_PMASK)
-
-#define S_FW_PFVF_CMD_NEQ 0
-#define M_FW_PFVF_CMD_NEQ 0xfffff
-#define V_FW_PFVF_CMD_NEQ(x) ((x) << S_FW_PFVF_CMD_NEQ)
-#define G_FW_PFVF_CMD_NEQ(x) \
- (((x) >> S_FW_PFVF_CMD_NEQ) & M_FW_PFVF_CMD_NEQ)
-
-#define S_FW_PFVF_CMD_TC 24
-#define M_FW_PFVF_CMD_TC 0xff
-#define V_FW_PFVF_CMD_TC(x) ((x) << S_FW_PFVF_CMD_TC)
-#define G_FW_PFVF_CMD_TC(x) (((x) >> S_FW_PFVF_CMD_TC) & M_FW_PFVF_CMD_TC)
-
-#define S_FW_PFVF_CMD_NVI 16
-#define M_FW_PFVF_CMD_NVI 0xff
-#define V_FW_PFVF_CMD_NVI(x) ((x) << S_FW_PFVF_CMD_NVI)
-#define G_FW_PFVF_CMD_NVI(x) \
- (((x) >> S_FW_PFVF_CMD_NVI) & M_FW_PFVF_CMD_NVI)
-
-#define S_FW_PFVF_CMD_NEXACTF 0
-#define M_FW_PFVF_CMD_NEXACTF 0xffff
-#define V_FW_PFVF_CMD_NEXACTF(x) ((x) << S_FW_PFVF_CMD_NEXACTF)
-#define G_FW_PFVF_CMD_NEXACTF(x) \
- (((x) >> S_FW_PFVF_CMD_NEXACTF) & M_FW_PFVF_CMD_NEXACTF)
-
-#define S_FW_PFVF_CMD_R_CAPS 24
-#define M_FW_PFVF_CMD_R_CAPS 0xff
-#define V_FW_PFVF_CMD_R_CAPS(x) ((x) << S_FW_PFVF_CMD_R_CAPS)
-#define G_FW_PFVF_CMD_R_CAPS(x) \
- (((x) >> S_FW_PFVF_CMD_R_CAPS) & M_FW_PFVF_CMD_R_CAPS)
-
-#define S_FW_PFVF_CMD_WX_CAPS 16
-#define M_FW_PFVF_CMD_WX_CAPS 0xff
-#define V_FW_PFVF_CMD_WX_CAPS(x) ((x) << S_FW_PFVF_CMD_WX_CAPS)
-#define G_FW_PFVF_CMD_WX_CAPS(x) \
- (((x) >> S_FW_PFVF_CMD_WX_CAPS) & M_FW_PFVF_CMD_WX_CAPS)
-
-#define S_FW_PFVF_CMD_NETHCTRL 0
-#define M_FW_PFVF_CMD_NETHCTRL 0xffff
-#define V_FW_PFVF_CMD_NETHCTRL(x) ((x) << S_FW_PFVF_CMD_NETHCTRL)
-#define G_FW_PFVF_CMD_NETHCTRL(x) \
- (((x) >> S_FW_PFVF_CMD_NETHCTRL) & M_FW_PFVF_CMD_NETHCTRL)
-/*
- * ingress queue type; the first 1K ingress queues can have associated 0,
- * 1 or 2 free lists and an interrupt, all other ingress queues lack these
- * capabilities
- */
-enum fw_iq_type {
- FW_IQ_TYPE_FL_INT_CAP,
- FW_IQ_TYPE_NO_FL_INT_CAP
-};
-
-struct fw_iq_cmd {
- __be32 op_to_vfn;
- __be32 alloc_to_len16;
- __be16 physiqid;
- __be16 iqid;
- __be16 fl0id;
- __be16 fl1id;
- __be32 type_to_iqandstindex;
- __be16 iqdroprss_to_iqesize;
- __be16 iqsize;
- __be64 iqaddr;
- __be32 iqns_to_fl0congen;
- __be16 fl0dcaen_to_fl0cidxfthresh;
- __be16 fl0size;
- __be64 fl0addr;
- __be32 fl1cngchmap_to_fl1congen;
- __be16 fl1dcaen_to_fl1cidxfthresh;
- __be16 fl1size;
- __be64 fl1addr;
-};
-
-#define S_FW_IQ_CMD_PFN 8
-#define M_FW_IQ_CMD_PFN 0x7
-#define V_FW_IQ_CMD_PFN(x) ((x) << S_FW_IQ_CMD_PFN)
-#define G_FW_IQ_CMD_PFN(x) (((x) >> S_FW_IQ_CMD_PFN) & M_FW_IQ_CMD_PFN)
-
-#define S_FW_IQ_CMD_VFN 0
-#define M_FW_IQ_CMD_VFN 0xff
-#define V_FW_IQ_CMD_VFN(x) ((x) << S_FW_IQ_CMD_VFN)
-#define G_FW_IQ_CMD_VFN(x) (((x) >> S_FW_IQ_CMD_VFN) & M_FW_IQ_CMD_VFN)
-
-#define S_FW_IQ_CMD_ALLOC 31
-#define M_FW_IQ_CMD_ALLOC 0x1
-#define V_FW_IQ_CMD_ALLOC(x) ((x) << S_FW_IQ_CMD_ALLOC)
-#define G_FW_IQ_CMD_ALLOC(x) \
- (((x) >> S_FW_IQ_CMD_ALLOC) & M_FW_IQ_CMD_ALLOC)
-#define F_FW_IQ_CMD_ALLOC V_FW_IQ_CMD_ALLOC(1U)
-
-#define S_FW_IQ_CMD_FREE 30
-#define M_FW_IQ_CMD_FREE 0x1
-#define V_FW_IQ_CMD_FREE(x) ((x) << S_FW_IQ_CMD_FREE)
-#define G_FW_IQ_CMD_FREE(x) (((x) >> S_FW_IQ_CMD_FREE) & M_FW_IQ_CMD_FREE)
-#define F_FW_IQ_CMD_FREE V_FW_IQ_CMD_FREE(1U)
-
-#define S_FW_IQ_CMD_MODIFY 29
-#define M_FW_IQ_CMD_MODIFY 0x1
-#define V_FW_IQ_CMD_MODIFY(x) ((x) << S_FW_IQ_CMD_MODIFY)
-#define G_FW_IQ_CMD_MODIFY(x) \
- (((x) >> S_FW_IQ_CMD_MODIFY) & M_FW_IQ_CMD_MODIFY)
-#define F_FW_IQ_CMD_MODIFY V_FW_IQ_CMD_MODIFY(1U)
-
-#define S_FW_IQ_CMD_IQSTART 28
-#define M_FW_IQ_CMD_IQSTART 0x1
-#define V_FW_IQ_CMD_IQSTART(x) ((x) << S_FW_IQ_CMD_IQSTART)
-#define G_FW_IQ_CMD_IQSTART(x) \
- (((x) >> S_FW_IQ_CMD_IQSTART) & M_FW_IQ_CMD_IQSTART)
-#define F_FW_IQ_CMD_IQSTART V_FW_IQ_CMD_IQSTART(1U)
-
-#define S_FW_IQ_CMD_IQSTOP 27
-#define M_FW_IQ_CMD_IQSTOP 0x1
-#define V_FW_IQ_CMD_IQSTOP(x) ((x) << S_FW_IQ_CMD_IQSTOP)
-#define G_FW_IQ_CMD_IQSTOP(x) \
- (((x) >> S_FW_IQ_CMD_IQSTOP) & M_FW_IQ_CMD_IQSTOP)
-#define F_FW_IQ_CMD_IQSTOP V_FW_IQ_CMD_IQSTOP(1U)
-
-#define S_FW_IQ_CMD_TYPE 29
-#define M_FW_IQ_CMD_TYPE 0x7
-#define V_FW_IQ_CMD_TYPE(x) ((x) << S_FW_IQ_CMD_TYPE)
-#define G_FW_IQ_CMD_TYPE(x) (((x) >> S_FW_IQ_CMD_TYPE) & M_FW_IQ_CMD_TYPE)
-
-#define S_FW_IQ_CMD_IQASYNCH 28
-#define M_FW_IQ_CMD_IQASYNCH 0x1
-#define V_FW_IQ_CMD_IQASYNCH(x) ((x) << S_FW_IQ_CMD_IQASYNCH)
-#define G_FW_IQ_CMD_IQASYNCH(x) \
- (((x) >> S_FW_IQ_CMD_IQASYNCH) & M_FW_IQ_CMD_IQASYNCH)
-#define F_FW_IQ_CMD_IQASYNCH V_FW_IQ_CMD_IQASYNCH(1U)
-
-#define S_FW_IQ_CMD_VIID 16
-#define M_FW_IQ_CMD_VIID 0xfff
-#define V_FW_IQ_CMD_VIID(x) ((x) << S_FW_IQ_CMD_VIID)
-#define G_FW_IQ_CMD_VIID(x) (((x) >> S_FW_IQ_CMD_VIID) & M_FW_IQ_CMD_VIID)
-
-#define S_FW_IQ_CMD_IQANDST 15
-#define M_FW_IQ_CMD_IQANDST 0x1
-#define V_FW_IQ_CMD_IQANDST(x) ((x) << S_FW_IQ_CMD_IQANDST)
-#define G_FW_IQ_CMD_IQANDST(x) \
- (((x) >> S_FW_IQ_CMD_IQANDST) & M_FW_IQ_CMD_IQANDST)
-#define F_FW_IQ_CMD_IQANDST V_FW_IQ_CMD_IQANDST(1U)
-
-#define S_FW_IQ_CMD_IQANUS 14
-#define M_FW_IQ_CMD_IQANUS 0x1
-#define V_FW_IQ_CMD_IQANUS(x) ((x) << S_FW_IQ_CMD_IQANUS)
-#define G_FW_IQ_CMD_IQANUS(x) \
- (((x) >> S_FW_IQ_CMD_IQANUS) & M_FW_IQ_CMD_IQANUS)
-#define F_FW_IQ_CMD_IQANUS V_FW_IQ_CMD_IQANUS(1U)
-
-#define S_FW_IQ_CMD_IQANUD 12
-#define M_FW_IQ_CMD_IQANUD 0x3
-#define V_FW_IQ_CMD_IQANUD(x) ((x) << S_FW_IQ_CMD_IQANUD)
-#define G_FW_IQ_CMD_IQANUD(x) \
- (((x) >> S_FW_IQ_CMD_IQANUD) & M_FW_IQ_CMD_IQANUD)
-
-#define S_FW_IQ_CMD_IQANDSTINDEX 0
-#define M_FW_IQ_CMD_IQANDSTINDEX 0xfff
-#define V_FW_IQ_CMD_IQANDSTINDEX(x) ((x) << S_FW_IQ_CMD_IQANDSTINDEX)
-#define G_FW_IQ_CMD_IQANDSTINDEX(x) \
- (((x) >> S_FW_IQ_CMD_IQANDSTINDEX) & M_FW_IQ_CMD_IQANDSTINDEX)
-
-#define S_FW_IQ_CMD_IQDROPRSS 15
-#define M_FW_IQ_CMD_IQDROPRSS 0x1
-#define V_FW_IQ_CMD_IQDROPRSS(x) ((x) << S_FW_IQ_CMD_IQDROPRSS)
-#define G_FW_IQ_CMD_IQDROPRSS(x) \
- (((x) >> S_FW_IQ_CMD_IQDROPRSS) & M_FW_IQ_CMD_IQDROPRSS)
-#define F_FW_IQ_CMD_IQDROPRSS V_FW_IQ_CMD_IQDROPRSS(1U)
-
-#define S_FW_IQ_CMD_IQGTSMODE 14
-#define M_FW_IQ_CMD_IQGTSMODE 0x1
-#define V_FW_IQ_CMD_IQGTSMODE(x) ((x) << S_FW_IQ_CMD_IQGTSMODE)
-#define G_FW_IQ_CMD_IQGTSMODE(x) \
- (((x) >> S_FW_IQ_CMD_IQGTSMODE) & M_FW_IQ_CMD_IQGTSMODE)
-#define F_FW_IQ_CMD_IQGTSMODE V_FW_IQ_CMD_IQGTSMODE(1U)
-
-#define S_FW_IQ_CMD_IQPCIECH 12
-#define M_FW_IQ_CMD_IQPCIECH 0x3
-#define V_FW_IQ_CMD_IQPCIECH(x) ((x) << S_FW_IQ_CMD_IQPCIECH)
-#define G_FW_IQ_CMD_IQPCIECH(x) \
- (((x) >> S_FW_IQ_CMD_IQPCIECH) & M_FW_IQ_CMD_IQPCIECH)
-
-#define S_FW_IQ_CMD_IQDCAEN 11
-#define M_FW_IQ_CMD_IQDCAEN 0x1
-#define V_FW_IQ_CMD_IQDCAEN(x) ((x) << S_FW_IQ_CMD_IQDCAEN)
-#define G_FW_IQ_CMD_IQDCAEN(x) \
- (((x) >> S_FW_IQ_CMD_IQDCAEN) & M_FW_IQ_CMD_IQDCAEN)
-#define F_FW_IQ_CMD_IQDCAEN V_FW_IQ_CMD_IQDCAEN(1U)
-
-#define S_FW_IQ_CMD_IQDCACPU 6
-#define M_FW_IQ_CMD_IQDCACPU 0x1f
-#define V_FW_IQ_CMD_IQDCACPU(x) ((x) << S_FW_IQ_CMD_IQDCACPU)
-#define G_FW_IQ_CMD_IQDCACPU(x) \
- (((x) >> S_FW_IQ_CMD_IQDCACPU) & M_FW_IQ_CMD_IQDCACPU)
-
-#define S_FW_IQ_CMD_IQINTCNTTHRESH 4
-#define M_FW_IQ_CMD_IQINTCNTTHRESH 0x3
-#define V_FW_IQ_CMD_IQINTCNTTHRESH(x) ((x) << S_FW_IQ_CMD_IQINTCNTTHRESH)
-#define G_FW_IQ_CMD_IQINTCNTTHRESH(x) \
- (((x) >> S_FW_IQ_CMD_IQINTCNTTHRESH) & M_FW_IQ_CMD_IQINTCNTTHRESH)
-
-#define S_FW_IQ_CMD_IQO 3
-#define M_FW_IQ_CMD_IQO 0x1
-#define V_FW_IQ_CMD_IQO(x) ((x) << S_FW_IQ_CMD_IQO)
-#define G_FW_IQ_CMD_IQO(x) (((x) >> S_FW_IQ_CMD_IQO) & M_FW_IQ_CMD_IQO)
-#define F_FW_IQ_CMD_IQO V_FW_IQ_CMD_IQO(1U)
-
-#define S_FW_IQ_CMD_IQCPRIO 2
-#define M_FW_IQ_CMD_IQCPRIO 0x1
-#define V_FW_IQ_CMD_IQCPRIO(x) ((x) << S_FW_IQ_CMD_IQCPRIO)
-#define G_FW_IQ_CMD_IQCPRIO(x) \
- (((x) >> S_FW_IQ_CMD_IQCPRIO) & M_FW_IQ_CMD_IQCPRIO)
-#define F_FW_IQ_CMD_IQCPRIO V_FW_IQ_CMD_IQCPRIO(1U)
-
-#define S_FW_IQ_CMD_IQESIZE 0
-#define M_FW_IQ_CMD_IQESIZE 0x3
-#define V_FW_IQ_CMD_IQESIZE(x) ((x) << S_FW_IQ_CMD_IQESIZE)
-#define G_FW_IQ_CMD_IQESIZE(x) \
- (((x) >> S_FW_IQ_CMD_IQESIZE) & M_FW_IQ_CMD_IQESIZE)
-
-#define S_FW_IQ_CMD_IQNS 31
-#define M_FW_IQ_CMD_IQNS 0x1
-#define V_FW_IQ_CMD_IQNS(x) ((x) << S_FW_IQ_CMD_IQNS)
-#define G_FW_IQ_CMD_IQNS(x) (((x) >> S_FW_IQ_CMD_IQNS) & M_FW_IQ_CMD_IQNS)
-#define F_FW_IQ_CMD_IQNS V_FW_IQ_CMD_IQNS(1U)
-
-#define S_FW_IQ_CMD_IQRO 30
-#define M_FW_IQ_CMD_IQRO 0x1
-#define V_FW_IQ_CMD_IQRO(x) ((x) << S_FW_IQ_CMD_IQRO)
-#define G_FW_IQ_CMD_IQRO(x) (((x) >> S_FW_IQ_CMD_IQRO) & M_FW_IQ_CMD_IQRO)
-#define F_FW_IQ_CMD_IQRO V_FW_IQ_CMD_IQRO(1U)
-
-#define S_FW_IQ_CMD_IQFLINTIQHSEN 28
-#define M_FW_IQ_CMD_IQFLINTIQHSEN 0x3
-#define V_FW_IQ_CMD_IQFLINTIQHSEN(x) ((x) << S_FW_IQ_CMD_IQFLINTIQHSEN)
-#define G_FW_IQ_CMD_IQFLINTIQHSEN(x) \
- (((x) >> S_FW_IQ_CMD_IQFLINTIQHSEN) & M_FW_IQ_CMD_IQFLINTIQHSEN)
-
-#define S_FW_IQ_CMD_IQFLINTCONGEN 27
-#define M_FW_IQ_CMD_IQFLINTCONGEN 0x1
-#define V_FW_IQ_CMD_IQFLINTCONGEN(x) ((x) << S_FW_IQ_CMD_IQFLINTCONGEN)
-#define G_FW_IQ_CMD_IQFLINTCONGEN(x) \
- (((x) >> S_FW_IQ_CMD_IQFLINTCONGEN) & M_FW_IQ_CMD_IQFLINTCONGEN)
-#define F_FW_IQ_CMD_IQFLINTCONGEN V_FW_IQ_CMD_IQFLINTCONGEN(1U)
-
-#define S_FW_IQ_CMD_IQFLINTISCSIC 26
-#define M_FW_IQ_CMD_IQFLINTISCSIC 0x1
-#define V_FW_IQ_CMD_IQFLINTISCSIC(x) ((x) << S_FW_IQ_CMD_IQFLINTISCSIC)
-#define G_FW_IQ_CMD_IQFLINTISCSIC(x) \
- (((x) >> S_FW_IQ_CMD_IQFLINTISCSIC) & M_FW_IQ_CMD_IQFLINTISCSIC)
-#define F_FW_IQ_CMD_IQFLINTISCSIC V_FW_IQ_CMD_IQFLINTISCSIC(1U)
-
-#define S_FW_IQ_CMD_FL0CNGCHMAP 20
-#define M_FW_IQ_CMD_FL0CNGCHMAP 0xf
-#define V_FW_IQ_CMD_FL0CNGCHMAP(x) ((x) << S_FW_IQ_CMD_FL0CNGCHMAP)
-#define G_FW_IQ_CMD_FL0CNGCHMAP(x) \
- (((x) >> S_FW_IQ_CMD_FL0CNGCHMAP) & M_FW_IQ_CMD_FL0CNGCHMAP)
-
-#define S_FW_IQ_CMD_FL0CACHELOCK 15
-#define M_FW_IQ_CMD_FL0CACHELOCK 0x1
-#define V_FW_IQ_CMD_FL0CACHELOCK(x) ((x) << S_FW_IQ_CMD_FL0CACHELOCK)
-#define G_FW_IQ_CMD_FL0CACHELOCK(x) \
- (((x) >> S_FW_IQ_CMD_FL0CACHELOCK) & M_FW_IQ_CMD_FL0CACHELOCK)
-#define F_FW_IQ_CMD_FL0CACHELOCK V_FW_IQ_CMD_FL0CACHELOCK(1U)
-
-#define S_FW_IQ_CMD_FL0DBP 14
-#define M_FW_IQ_CMD_FL0DBP 0x1
-#define V_FW_IQ_CMD_FL0DBP(x) ((x) << S_FW_IQ_CMD_FL0DBP)
-#define G_FW_IQ_CMD_FL0DBP(x) \
- (((x) >> S_FW_IQ_CMD_FL0DBP) & M_FW_IQ_CMD_FL0DBP)
-#define F_FW_IQ_CMD_FL0DBP V_FW_IQ_CMD_FL0DBP(1U)
-
-#define S_FW_IQ_CMD_FL0DATANS 13
-#define M_FW_IQ_CMD_FL0DATANS 0x1
-#define V_FW_IQ_CMD_FL0DATANS(x) ((x) << S_FW_IQ_CMD_FL0DATANS)
-#define G_FW_IQ_CMD_FL0DATANS(x) \
- (((x) >> S_FW_IQ_CMD_FL0DATANS) & M_FW_IQ_CMD_FL0DATANS)
-#define F_FW_IQ_CMD_FL0DATANS V_FW_IQ_CMD_FL0DATANS(1U)
-
-#define S_FW_IQ_CMD_FL0DATARO 12
-#define M_FW_IQ_CMD_FL0DATARO 0x1
-#define V_FW_IQ_CMD_FL0DATARO(x) ((x) << S_FW_IQ_CMD_FL0DATARO)
-#define G_FW_IQ_CMD_FL0DATARO(x) \
- (((x) >> S_FW_IQ_CMD_FL0DATARO) & M_FW_IQ_CMD_FL0DATARO)
-#define F_FW_IQ_CMD_FL0DATARO V_FW_IQ_CMD_FL0DATARO(1U)
-
-#define S_FW_IQ_CMD_FL0CONGCIF 11
-#define M_FW_IQ_CMD_FL0CONGCIF 0x1
-#define V_FW_IQ_CMD_FL0CONGCIF(x) ((x) << S_FW_IQ_CMD_FL0CONGCIF)
-#define G_FW_IQ_CMD_FL0CONGCIF(x) \
- (((x) >> S_FW_IQ_CMD_FL0CONGCIF) & M_FW_IQ_CMD_FL0CONGCIF)
-#define F_FW_IQ_CMD_FL0CONGCIF V_FW_IQ_CMD_FL0CONGCIF(1U)
-
-#define S_FW_IQ_CMD_FL0ONCHIP 10
-#define M_FW_IQ_CMD_FL0ONCHIP 0x1
-#define V_FW_IQ_CMD_FL0ONCHIP(x) ((x) << S_FW_IQ_CMD_FL0ONCHIP)
-#define G_FW_IQ_CMD_FL0ONCHIP(x) \
- (((x) >> S_FW_IQ_CMD_FL0ONCHIP) & M_FW_IQ_CMD_FL0ONCHIP)
-#define F_FW_IQ_CMD_FL0ONCHIP V_FW_IQ_CMD_FL0ONCHIP(1U)
-
-#define S_FW_IQ_CMD_FL0STATUSPGNS 9
-#define M_FW_IQ_CMD_FL0STATUSPGNS 0x1
-#define V_FW_IQ_CMD_FL0STATUSPGNS(x) ((x) << S_FW_IQ_CMD_FL0STATUSPGNS)
-#define G_FW_IQ_CMD_FL0STATUSPGNS(x) \
- (((x) >> S_FW_IQ_CMD_FL0STATUSPGNS) & M_FW_IQ_CMD_FL0STATUSPGNS)
-#define F_FW_IQ_CMD_FL0STATUSPGNS V_FW_IQ_CMD_FL0STATUSPGNS(1U)
-
-#define S_FW_IQ_CMD_FL0STATUSPGRO 8
-#define M_FW_IQ_CMD_FL0STATUSPGRO 0x1
-#define V_FW_IQ_CMD_FL0STATUSPGRO(x) ((x) << S_FW_IQ_CMD_FL0STATUSPGRO)
-#define G_FW_IQ_CMD_FL0STATUSPGRO(x) \
- (((x) >> S_FW_IQ_CMD_FL0STATUSPGRO) & M_FW_IQ_CMD_FL0STATUSPGRO)
-#define F_FW_IQ_CMD_FL0STATUSPGRO V_FW_IQ_CMD_FL0STATUSPGRO(1U)
-
-#define S_FW_IQ_CMD_FL0FETCHNS 7
-#define M_FW_IQ_CMD_FL0FETCHNS 0x1
-#define V_FW_IQ_CMD_FL0FETCHNS(x) ((x) << S_FW_IQ_CMD_FL0FETCHNS)
-#define G_FW_IQ_CMD_FL0FETCHNS(x) \
- (((x) >> S_FW_IQ_CMD_FL0FETCHNS) & M_FW_IQ_CMD_FL0FETCHNS)
-#define F_FW_IQ_CMD_FL0FETCHNS V_FW_IQ_CMD_FL0FETCHNS(1U)
-
-#define S_FW_IQ_CMD_FL0FETCHRO 6
-#define M_FW_IQ_CMD_FL0FETCHRO 0x1
-#define V_FW_IQ_CMD_FL0FETCHRO(x) ((x) << S_FW_IQ_CMD_FL0FETCHRO)
-#define G_FW_IQ_CMD_FL0FETCHRO(x) \
- (((x) >> S_FW_IQ_CMD_FL0FETCHRO) & M_FW_IQ_CMD_FL0FETCHRO)
-#define F_FW_IQ_CMD_FL0FETCHRO V_FW_IQ_CMD_FL0FETCHRO(1U)
-
-#define S_FW_IQ_CMD_FL0HOSTFCMODE 4
-#define M_FW_IQ_CMD_FL0HOSTFCMODE 0x3
-#define V_FW_IQ_CMD_FL0HOSTFCMODE(x) ((x) << S_FW_IQ_CMD_FL0HOSTFCMODE)
-#define G_FW_IQ_CMD_FL0HOSTFCMODE(x) \
- (((x) >> S_FW_IQ_CMD_FL0HOSTFCMODE) & M_FW_IQ_CMD_FL0HOSTFCMODE)
-
-#define S_FW_IQ_CMD_FL0CPRIO 3
-#define M_FW_IQ_CMD_FL0CPRIO 0x1
-#define V_FW_IQ_CMD_FL0CPRIO(x) ((x) << S_FW_IQ_CMD_FL0CPRIO)
-#define G_FW_IQ_CMD_FL0CPRIO(x) \
- (((x) >> S_FW_IQ_CMD_FL0CPRIO) & M_FW_IQ_CMD_FL0CPRIO)
-#define F_FW_IQ_CMD_FL0CPRIO V_FW_IQ_CMD_FL0CPRIO(1U)
-
-#define S_FW_IQ_CMD_FL0PADEN 2
-#define M_FW_IQ_CMD_FL0PADEN 0x1
-#define V_FW_IQ_CMD_FL0PADEN(x) ((x) << S_FW_IQ_CMD_FL0PADEN)
-#define G_FW_IQ_CMD_FL0PADEN(x) \
- (((x) >> S_FW_IQ_CMD_FL0PADEN) & M_FW_IQ_CMD_FL0PADEN)
-#define F_FW_IQ_CMD_FL0PADEN V_FW_IQ_CMD_FL0PADEN(1U)
-
-#define S_FW_IQ_CMD_FL0PACKEN 1
-#define M_FW_IQ_CMD_FL0PACKEN 0x1
-#define V_FW_IQ_CMD_FL0PACKEN(x) ((x) << S_FW_IQ_CMD_FL0PACKEN)
-#define G_FW_IQ_CMD_FL0PACKEN(x) \
- (((x) >> S_FW_IQ_CMD_FL0PACKEN) & M_FW_IQ_CMD_FL0PACKEN)
-#define F_FW_IQ_CMD_FL0PACKEN V_FW_IQ_CMD_FL0PACKEN(1U)
-
-#define S_FW_IQ_CMD_FL0CONGEN 0
-#define M_FW_IQ_CMD_FL0CONGEN 0x1
-#define V_FW_IQ_CMD_FL0CONGEN(x) ((x) << S_FW_IQ_CMD_FL0CONGEN)
-#define G_FW_IQ_CMD_FL0CONGEN(x) \
- (((x) >> S_FW_IQ_CMD_FL0CONGEN) & M_FW_IQ_CMD_FL0CONGEN)
-#define F_FW_IQ_CMD_FL0CONGEN V_FW_IQ_CMD_FL0CONGEN(1U)
-
-#define S_FW_IQ_CMD_FL0DCAEN 15
-#define M_FW_IQ_CMD_FL0DCAEN 0x1
-#define V_FW_IQ_CMD_FL0DCAEN(x) ((x) << S_FW_IQ_CMD_FL0DCAEN)
-#define G_FW_IQ_CMD_FL0DCAEN(x) \
- (((x) >> S_FW_IQ_CMD_FL0DCAEN) & M_FW_IQ_CMD_FL0DCAEN)
-#define F_FW_IQ_CMD_FL0DCAEN V_FW_IQ_CMD_FL0DCAEN(1U)
-
-#define S_FW_IQ_CMD_FL0DCACPU 10
-#define M_FW_IQ_CMD_FL0DCACPU 0x1f
-#define V_FW_IQ_CMD_FL0DCACPU(x) ((x) << S_FW_IQ_CMD_FL0DCACPU)
-#define G_FW_IQ_CMD_FL0DCACPU(x) \
- (((x) >> S_FW_IQ_CMD_FL0DCACPU) & M_FW_IQ_CMD_FL0DCACPU)
-
-#define S_FW_IQ_CMD_FL0FBMIN 7
-#define M_FW_IQ_CMD_FL0FBMIN 0x7
-#define V_FW_IQ_CMD_FL0FBMIN(x) ((x) << S_FW_IQ_CMD_FL0FBMIN)
-#define G_FW_IQ_CMD_FL0FBMIN(x) \
- (((x) >> S_FW_IQ_CMD_FL0FBMIN) & M_FW_IQ_CMD_FL0FBMIN)
-
-#define S_FW_IQ_CMD_FL0FBMAX 4
-#define M_FW_IQ_CMD_FL0FBMAX 0x7
-#define V_FW_IQ_CMD_FL0FBMAX(x) ((x) << S_FW_IQ_CMD_FL0FBMAX)
-#define G_FW_IQ_CMD_FL0FBMAX(x) \
- (((x) >> S_FW_IQ_CMD_FL0FBMAX) & M_FW_IQ_CMD_FL0FBMAX)
-
-#define S_FW_IQ_CMD_FL0CIDXFTHRESHO 3
-#define M_FW_IQ_CMD_FL0CIDXFTHRESHO 0x1
-#define V_FW_IQ_CMD_FL0CIDXFTHRESHO(x) ((x) << S_FW_IQ_CMD_FL0CIDXFTHRESHO)
-#define G_FW_IQ_CMD_FL0CIDXFTHRESHO(x) \
- (((x) >> S_FW_IQ_CMD_FL0CIDXFTHRESHO) & M_FW_IQ_CMD_FL0CIDXFTHRESHO)
-#define F_FW_IQ_CMD_FL0CIDXFTHRESHO V_FW_IQ_CMD_FL0CIDXFTHRESHO(1U)
-
-#define S_FW_IQ_CMD_FL0CIDXFTHRESH 0
-#define M_FW_IQ_CMD_FL0CIDXFTHRESH 0x7
-#define V_FW_IQ_CMD_FL0CIDXFTHRESH(x) ((x) << S_FW_IQ_CMD_FL0CIDXFTHRESH)
-#define G_FW_IQ_CMD_FL0CIDXFTHRESH(x) \
- (((x) >> S_FW_IQ_CMD_FL0CIDXFTHRESH) & M_FW_IQ_CMD_FL0CIDXFTHRESH)
-
-#define S_FW_IQ_CMD_FL1CNGCHMAP 20
-#define M_FW_IQ_CMD_FL1CNGCHMAP 0xf
-#define V_FW_IQ_CMD_FL1CNGCHMAP(x) ((x) << S_FW_IQ_CMD_FL1CNGCHMAP)
-#define G_FW_IQ_CMD_FL1CNGCHMAP(x) \
- (((x) >> S_FW_IQ_CMD_FL1CNGCHMAP) & M_FW_IQ_CMD_FL1CNGCHMAP)
-
-#define S_FW_IQ_CMD_FL1CACHELOCK 15
-#define M_FW_IQ_CMD_FL1CACHELOCK 0x1
-#define V_FW_IQ_CMD_FL1CACHELOCK(x) ((x) << S_FW_IQ_CMD_FL1CACHELOCK)
-#define G_FW_IQ_CMD_FL1CACHELOCK(x) \
- (((x) >> S_FW_IQ_CMD_FL1CACHELOCK) & M_FW_IQ_CMD_FL1CACHELOCK)
-#define F_FW_IQ_CMD_FL1CACHELOCK V_FW_IQ_CMD_FL1CACHELOCK(1U)
-
-#define S_FW_IQ_CMD_FL1DBP 14
-#define M_FW_IQ_CMD_FL1DBP 0x1
-#define V_FW_IQ_CMD_FL1DBP(x) ((x) << S_FW_IQ_CMD_FL1DBP)
-#define G_FW_IQ_CMD_FL1DBP(x) \
- (((x) >> S_FW_IQ_CMD_FL1DBP) & M_FW_IQ_CMD_FL1DBP)
-#define F_FW_IQ_CMD_FL1DBP V_FW_IQ_CMD_FL1DBP(1U)
-
-#define S_FW_IQ_CMD_FL1DATANS 13
-#define M_FW_IQ_CMD_FL1DATANS 0x1
-#define V_FW_IQ_CMD_FL1DATANS(x) ((x) << S_FW_IQ_CMD_FL1DATANS)
-#define G_FW_IQ_CMD_FL1DATANS(x) \
- (((x) >> S_FW_IQ_CMD_FL1DATANS) & M_FW_IQ_CMD_FL1DATANS)
-#define F_FW_IQ_CMD_FL1DATANS V_FW_IQ_CMD_FL1DATANS(1U)
-
-#define S_FW_IQ_CMD_FL1DATARO 12
-#define M_FW_IQ_CMD_FL1DATARO 0x1
-#define V_FW_IQ_CMD_FL1DATARO(x) ((x) << S_FW_IQ_CMD_FL1DATARO)
-#define G_FW_IQ_CMD_FL1DATARO(x) \
- (((x) >> S_FW_IQ_CMD_FL1DATARO) & M_FW_IQ_CMD_FL1DATARO)
-#define F_FW_IQ_CMD_FL1DATARO V_FW_IQ_CMD_FL1DATARO(1U)
-
-#define S_FW_IQ_CMD_FL1CONGCIF 11
-#define M_FW_IQ_CMD_FL1CONGCIF 0x1
-#define V_FW_IQ_CMD_FL1CONGCIF(x) ((x) << S_FW_IQ_CMD_FL1CONGCIF)
-#define G_FW_IQ_CMD_FL1CONGCIF(x) \
- (((x) >> S_FW_IQ_CMD_FL1CONGCIF) & M_FW_IQ_CMD_FL1CONGCIF)
-#define F_FW_IQ_CMD_FL1CONGCIF V_FW_IQ_CMD_FL1CONGCIF(1U)
-
-#define S_FW_IQ_CMD_FL1ONCHIP 10
-#define M_FW_IQ_CMD_FL1ONCHIP 0x1
-#define V_FW_IQ_CMD_FL1ONCHIP(x) ((x) << S_FW_IQ_CMD_FL1ONCHIP)
-#define G_FW_IQ_CMD_FL1ONCHIP(x) \
- (((x) >> S_FW_IQ_CMD_FL1ONCHIP) & M_FW_IQ_CMD_FL1ONCHIP)
-#define F_FW_IQ_CMD_FL1ONCHIP V_FW_IQ_CMD_FL1ONCHIP(1U)
-
-#define S_FW_IQ_CMD_FL1STATUSPGNS 9
-#define M_FW_IQ_CMD_FL1STATUSPGNS 0x1
-#define V_FW_IQ_CMD_FL1STATUSPGNS(x) ((x) << S_FW_IQ_CMD_FL1STATUSPGNS)
-#define G_FW_IQ_CMD_FL1STATUSPGNS(x) \
- (((x) >> S_FW_IQ_CMD_FL1STATUSPGNS) & M_FW_IQ_CMD_FL1STATUSPGNS)
-#define F_FW_IQ_CMD_FL1STATUSPGNS V_FW_IQ_CMD_FL1STATUSPGNS(1U)
-
-#define S_FW_IQ_CMD_FL1STATUSPGRO 8
-#define M_FW_IQ_CMD_FL1STATUSPGRO 0x1
-#define V_FW_IQ_CMD_FL1STATUSPGRO(x) ((x) << S_FW_IQ_CMD_FL1STATUSPGRO)
-#define G_FW_IQ_CMD_FL1STATUSPGRO(x) \
- (((x) >> S_FW_IQ_CMD_FL1STATUSPGRO) & M_FW_IQ_CMD_FL1STATUSPGRO)
-#define F_FW_IQ_CMD_FL1STATUSPGRO V_FW_IQ_CMD_FL1STATUSPGRO(1U)
-
-#define S_FW_IQ_CMD_FL1FETCHNS 7
-#define M_FW_IQ_CMD_FL1FETCHNS 0x1
-#define V_FW_IQ_CMD_FL1FETCHNS(x) ((x) << S_FW_IQ_CMD_FL1FETCHNS)
-#define G_FW_IQ_CMD_FL1FETCHNS(x) \
- (((x) >> S_FW_IQ_CMD_FL1FETCHNS) & M_FW_IQ_CMD_FL1FETCHNS)
-#define F_FW_IQ_CMD_FL1FETCHNS V_FW_IQ_CMD_FL1FETCHNS(1U)
-
-#define S_FW_IQ_CMD_FL1FETCHRO 6
-#define M_FW_IQ_CMD_FL1FETCHRO 0x1
-#define V_FW_IQ_CMD_FL1FETCHRO(x) ((x) << S_FW_IQ_CMD_FL1FETCHRO)
-#define G_FW_IQ_CMD_FL1FETCHRO(x) \
- (((x) >> S_FW_IQ_CMD_FL1FETCHRO) & M_FW_IQ_CMD_FL1FETCHRO)
-#define F_FW_IQ_CMD_FL1FETCHRO V_FW_IQ_CMD_FL1FETCHRO(1U)
-
-#define S_FW_IQ_CMD_FL1HOSTFCMODE 4
-#define M_FW_IQ_CMD_FL1HOSTFCMODE 0x3
-#define V_FW_IQ_CMD_FL1HOSTFCMODE(x) ((x) << S_FW_IQ_CMD_FL1HOSTFCMODE)
-#define G_FW_IQ_CMD_FL1HOSTFCMODE(x) \
- (((x) >> S_FW_IQ_CMD_FL1HOSTFCMODE) & M_FW_IQ_CMD_FL1HOSTFCMODE)
-
-#define S_FW_IQ_CMD_FL1CPRIO 3
-#define M_FW_IQ_CMD_FL1CPRIO 0x1
-#define V_FW_IQ_CMD_FL1CPRIO(x) ((x) << S_FW_IQ_CMD_FL1CPRIO)
-#define G_FW_IQ_CMD_FL1CPRIO(x) \
- (((x) >> S_FW_IQ_CMD_FL1CPRIO) & M_FW_IQ_CMD_FL1CPRIO)
-#define F_FW_IQ_CMD_FL1CPRIO V_FW_IQ_CMD_FL1CPRIO(1U)
-
-#define S_FW_IQ_CMD_FL1PADEN 2
-#define M_FW_IQ_CMD_FL1PADEN 0x1
-#define V_FW_IQ_CMD_FL1PADEN(x) ((x) << S_FW_IQ_CMD_FL1PADEN)
-#define G_FW_IQ_CMD_FL1PADEN(x) \
- (((x) >> S_FW_IQ_CMD_FL1PADEN) & M_FW_IQ_CMD_FL1PADEN)
-#define F_FW_IQ_CMD_FL1PADEN V_FW_IQ_CMD_FL1PADEN(1U)
-
-#define S_FW_IQ_CMD_FL1PACKEN 1
-#define M_FW_IQ_CMD_FL1PACKEN 0x1
-#define V_FW_IQ_CMD_FL1PACKEN(x) ((x) << S_FW_IQ_CMD_FL1PACKEN)
-#define G_FW_IQ_CMD_FL1PACKEN(x) \
- (((x) >> S_FW_IQ_CMD_FL1PACKEN) & M_FW_IQ_CMD_FL1PACKEN)
-#define F_FW_IQ_CMD_FL1PACKEN V_FW_IQ_CMD_FL1PACKEN(1U)
-
-#define S_FW_IQ_CMD_FL1CONGEN 0
-#define M_FW_IQ_CMD_FL1CONGEN 0x1
-#define V_FW_IQ_CMD_FL1CONGEN(x) ((x) << S_FW_IQ_CMD_FL1CONGEN)
-#define G_FW_IQ_CMD_FL1CONGEN(x) \
- (((x) >> S_FW_IQ_CMD_FL1CONGEN) & M_FW_IQ_CMD_FL1CONGEN)
-#define F_FW_IQ_CMD_FL1CONGEN V_FW_IQ_CMD_FL1CONGEN(1U)
-
-#define S_FW_IQ_CMD_FL1DCAEN 15
-#define M_FW_IQ_CMD_FL1DCAEN 0x1
-#define V_FW_IQ_CMD_FL1DCAEN(x) ((x) << S_FW_IQ_CMD_FL1DCAEN)
-#define G_FW_IQ_CMD_FL1DCAEN(x) \
- (((x) >> S_FW_IQ_CMD_FL1DCAEN) & M_FW_IQ_CMD_FL1DCAEN)
-#define F_FW_IQ_CMD_FL1DCAEN V_FW_IQ_CMD_FL1DCAEN(1U)
-
-#define S_FW_IQ_CMD_FL1DCACPU 10
-#define M_FW_IQ_CMD_FL1DCACPU 0x1f
-#define V_FW_IQ_CMD_FL1DCACPU(x) ((x) << S_FW_IQ_CMD_FL1DCACPU)
-#define G_FW_IQ_CMD_FL1DCACPU(x) \
- (((x) >> S_FW_IQ_CMD_FL1DCACPU) & M_FW_IQ_CMD_FL1DCACPU)
-
-#define S_FW_IQ_CMD_FL1FBMIN 7
-#define M_FW_IQ_CMD_FL1FBMIN 0x7
-#define V_FW_IQ_CMD_FL1FBMIN(x) ((x) << S_FW_IQ_CMD_FL1FBMIN)
-#define G_FW_IQ_CMD_FL1FBMIN(x) \
- (((x) >> S_FW_IQ_CMD_FL1FBMIN) & M_FW_IQ_CMD_FL1FBMIN)
-
-#define S_FW_IQ_CMD_FL1FBMAX 4
-#define M_FW_IQ_CMD_FL1FBMAX 0x7
-#define V_FW_IQ_CMD_FL1FBMAX(x) ((x) << S_FW_IQ_CMD_FL1FBMAX)
-#define G_FW_IQ_CMD_FL1FBMAX(x) \
- (((x) >> S_FW_IQ_CMD_FL1FBMAX) & M_FW_IQ_CMD_FL1FBMAX)
-
-#define S_FW_IQ_CMD_FL1CIDXFTHRESHO 3
-#define M_FW_IQ_CMD_FL1CIDXFTHRESHO 0x1
-#define V_FW_IQ_CMD_FL1CIDXFTHRESHO(x) ((x) << S_FW_IQ_CMD_FL1CIDXFTHRESHO)
-#define G_FW_IQ_CMD_FL1CIDXFTHRESHO(x) \
- (((x) >> S_FW_IQ_CMD_FL1CIDXFTHRESHO) & M_FW_IQ_CMD_FL1CIDXFTHRESHO)
-#define F_FW_IQ_CMD_FL1CIDXFTHRESHO V_FW_IQ_CMD_FL1CIDXFTHRESHO(1U)
-
-#define S_FW_IQ_CMD_FL1CIDXFTHRESH 0
-#define M_FW_IQ_CMD_FL1CIDXFTHRESH 0x7
-#define V_FW_IQ_CMD_FL1CIDXFTHRESH(x) ((x) << S_FW_IQ_CMD_FL1CIDXFTHRESH)
-#define G_FW_IQ_CMD_FL1CIDXFTHRESH(x) \
- (((x) >> S_FW_IQ_CMD_FL1CIDXFTHRESH) & M_FW_IQ_CMD_FL1CIDXFTHRESH)
-
-struct fw_eq_mngt_cmd {
- __be32 op_to_vfn;
- __be32 alloc_to_len16;
- __be32 cmpliqid_eqid;
- __be32 physeqid_pkd;
- __be32 fetchszm_to_iqid;
- __be32 dcaen_to_eqsize;
- __be64 eqaddr;
-};
-
-#define S_FW_EQ_MNGT_CMD_PFN 8
-#define M_FW_EQ_MNGT_CMD_PFN 0x7
-#define V_FW_EQ_MNGT_CMD_PFN(x) ((x) << S_FW_EQ_MNGT_CMD_PFN)
-#define G_FW_EQ_MNGT_CMD_PFN(x) \
- (((x) >> S_FW_EQ_MNGT_CMD_PFN) & M_FW_EQ_MNGT_CMD_PFN)
-
-#define S_FW_EQ_MNGT_CMD_VFN 0
-#define M_FW_EQ_MNGT_CMD_VFN 0xff
-#define V_FW_EQ_MNGT_CMD_VFN(x) ((x) << S_FW_EQ_MNGT_CMD_VFN)
-#define G_FW_EQ_MNGT_CMD_VFN(x) \
- (((x) >> S_FW_EQ_MNGT_CMD_VFN) & M_FW_EQ_MNGT_CMD_VFN)
-
-#define S_FW_EQ_MNGT_CMD_ALLOC 31
-#define M_FW_EQ_MNGT_CMD_ALLOC 0x1
-#define V_FW_EQ_MNGT_CMD_ALLOC(x) ((x) << S_FW_EQ_MNGT_CMD_ALLOC)
-#define G_FW_EQ_MNGT_CMD_ALLOC(x) \
- (((x) >> S_FW_EQ_MNGT_CMD_ALLOC) & M_FW_EQ_MNGT_CMD_ALLOC)
-#define F_FW_EQ_MNGT_CMD_ALLOC V_FW_EQ_MNGT_CMD_ALLOC(1U)
-
-#define S_FW_EQ_MNGT_CMD_FREE 30
-#define M_FW_EQ_MNGT_CMD_FREE 0x1
-#define V_FW_EQ_MNGT_CMD_FREE(x) ((x) << S_FW_EQ_MNGT_CMD_FREE)
-#define G_FW_EQ_MNGT_CMD_FREE(x) \
- (((x) >> S_FW_EQ_MNGT_CMD_FREE) & M_FW_EQ_MNGT_CMD_FREE)
-#define F_FW_EQ_MNGT_CMD_FREE V_FW_EQ_MNGT_CMD_FREE(1U)
-
-#define S_FW_EQ_MNGT_CMD_MODIFY 29
-#define M_FW_EQ_MNGT_CMD_MODIFY 0x1
-#define V_FW_EQ_MNGT_CMD_MODIFY(x) ((x) << S_FW_EQ_MNGT_CMD_MODIFY)
-#define G_FW_EQ_MNGT_CMD_MODIFY(x) \
- (((x) >> S_FW_EQ_MNGT_CMD_MODIFY) & M_FW_EQ_MNGT_CMD_MODIFY)
-#define F_FW_EQ_MNGT_CMD_MODIFY V_FW_EQ_MNGT_CMD_MODIFY(1U)
-
-#define S_FW_EQ_MNGT_CMD_EQSTART 28
-#define M_FW_EQ_MNGT_CMD_EQSTART 0x1
-#define V_FW_EQ_MNGT_CMD_EQSTART(x) ((x) << S_FW_EQ_MNGT_CMD_EQSTART)
-#define G_FW_EQ_MNGT_CMD_EQSTART(x) \
- (((x) >> S_FW_EQ_MNGT_CMD_EQSTART) & M_FW_EQ_MNGT_CMD_EQSTART)
-#define F_FW_EQ_MNGT_CMD_EQSTART V_FW_EQ_MNGT_CMD_EQSTART(1U)
-
-#define S_FW_EQ_MNGT_CMD_EQSTOP 27
-#define M_FW_EQ_MNGT_CMD_EQSTOP 0x1
-#define V_FW_EQ_MNGT_CMD_EQSTOP(x) ((x) << S_FW_EQ_MNGT_CMD_EQSTOP)
-#define G_FW_EQ_MNGT_CMD_EQSTOP(x) \
- (((x) >> S_FW_EQ_MNGT_CMD_EQSTOP) & M_FW_EQ_MNGT_CMD_EQSTOP)
-#define F_FW_EQ_MNGT_CMD_EQSTOP V_FW_EQ_MNGT_CMD_EQSTOP(1U)
-
-#define S_FW_EQ_MNGT_CMD_CMPLIQID 20
-#define M_FW_EQ_MNGT_CMD_CMPLIQID 0xfff
-#define V_FW_EQ_MNGT_CMD_CMPLIQID(x) ((x) << S_FW_EQ_MNGT_CMD_CMPLIQID)
-#define G_FW_EQ_MNGT_CMD_CMPLIQID(x) \
- (((x) >> S_FW_EQ_MNGT_CMD_CMPLIQID) & M_FW_EQ_MNGT_CMD_CMPLIQID)
-
-#define S_FW_EQ_MNGT_CMD_EQID 0
-#define M_FW_EQ_MNGT_CMD_EQID 0xfffff
-#define V_FW_EQ_MNGT_CMD_EQID(x) ((x) << S_FW_EQ_MNGT_CMD_EQID)
-#define G_FW_EQ_MNGT_CMD_EQID(x) \
- (((x) >> S_FW_EQ_MNGT_CMD_EQID) & M_FW_EQ_MNGT_CMD_EQID)
-
-#define S_FW_EQ_MNGT_CMD_PHYSEQID 0
-#define M_FW_EQ_MNGT_CMD_PHYSEQID 0xfffff
-#define V_FW_EQ_MNGT_CMD_PHYSEQID(x) ((x) << S_FW_EQ_MNGT_CMD_PHYSEQID)
-#define G_FW_EQ_MNGT_CMD_PHYSEQID(x) \
- (((x) >> S_FW_EQ_MNGT_CMD_PHYSEQID) & M_FW_EQ_MNGT_CMD_PHYSEQID)
-
-#define S_FW_EQ_MNGT_CMD_FETCHSZM 26
-#define M_FW_EQ_MNGT_CMD_FETCHSZM 0x1
-#define V_FW_EQ_MNGT_CMD_FETCHSZM(x) ((x) << S_FW_EQ_MNGT_CMD_FETCHSZM)
-#define G_FW_EQ_MNGT_CMD_FETCHSZM(x) \
- (((x) >> S_FW_EQ_MNGT_CMD_FETCHSZM) & M_FW_EQ_MNGT_CMD_FETCHSZM)
-#define F_FW_EQ_MNGT_CMD_FETCHSZM V_FW_EQ_MNGT_CMD_FETCHSZM(1U)
-
-#define S_FW_EQ_MNGT_CMD_STATUSPGNS 25
-#define M_FW_EQ_MNGT_CMD_STATUSPGNS 0x1
-#define V_FW_EQ_MNGT_CMD_STATUSPGNS(x) ((x) << S_FW_EQ_MNGT_CMD_STATUSPGNS)
-#define G_FW_EQ_MNGT_CMD_STATUSPGNS(x) \
- (((x) >> S_FW_EQ_MNGT_CMD_STATUSPGNS) & M_FW_EQ_MNGT_CMD_STATUSPGNS)
-#define F_FW_EQ_MNGT_CMD_STATUSPGNS V_FW_EQ_MNGT_CMD_STATUSPGNS(1U)
-
-#define S_FW_EQ_MNGT_CMD_STATUSPGRO 24
-#define M_FW_EQ_MNGT_CMD_STATUSPGRO 0x1
-#define V_FW_EQ_MNGT_CMD_STATUSPGRO(x) ((x) << S_FW_EQ_MNGT_CMD_STATUSPGRO)
-#define G_FW_EQ_MNGT_CMD_STATUSPGRO(x) \
- (((x) >> S_FW_EQ_MNGT_CMD_STATUSPGRO) & M_FW_EQ_MNGT_CMD_STATUSPGRO)
-#define F_FW_EQ_MNGT_CMD_STATUSPGRO V_FW_EQ_MNGT_CMD_STATUSPGRO(1U)
-
-#define S_FW_EQ_MNGT_CMD_FETCHNS 23
-#define M_FW_EQ_MNGT_CMD_FETCHNS 0x1
-#define V_FW_EQ_MNGT_CMD_FETCHNS(x) ((x) << S_FW_EQ_MNGT_CMD_FETCHNS)
-#define G_FW_EQ_MNGT_CMD_FETCHNS(x) \
- (((x) >> S_FW_EQ_MNGT_CMD_FETCHNS) & M_FW_EQ_MNGT_CMD_FETCHNS)
-#define F_FW_EQ_MNGT_CMD_FETCHNS V_FW_EQ_MNGT_CMD_FETCHNS(1U)
-
-#define S_FW_EQ_MNGT_CMD_FETCHRO 22
-#define M_FW_EQ_MNGT_CMD_FETCHRO 0x1
-#define V_FW_EQ_MNGT_CMD_FETCHRO(x) ((x) << S_FW_EQ_MNGT_CMD_FETCHRO)
-#define G_FW_EQ_MNGT_CMD_FETCHRO(x) \
- (((x) >> S_FW_EQ_MNGT_CMD_FETCHRO) & M_FW_EQ_MNGT_CMD_FETCHRO)
-#define F_FW_EQ_MNGT_CMD_FETCHRO V_FW_EQ_MNGT_CMD_FETCHRO(1U)
-
-#define S_FW_EQ_MNGT_CMD_HOSTFCMODE 20
-#define M_FW_EQ_MNGT_CMD_HOSTFCMODE 0x3
-#define V_FW_EQ_MNGT_CMD_HOSTFCMODE(x) ((x) << S_FW_EQ_MNGT_CMD_HOSTFCMODE)
-#define G_FW_EQ_MNGT_CMD_HOSTFCMODE(x) \
- (((x) >> S_FW_EQ_MNGT_CMD_HOSTFCMODE) & M_FW_EQ_MNGT_CMD_HOSTFCMODE)
-
-#define S_FW_EQ_MNGT_CMD_CPRIO 19
-#define M_FW_EQ_MNGT_CMD_CPRIO 0x1
-#define V_FW_EQ_MNGT_CMD_CPRIO(x) ((x) << S_FW_EQ_MNGT_CMD_CPRIO)
-#define G_FW_EQ_MNGT_CMD_CPRIO(x) \
- (((x) >> S_FW_EQ_MNGT_CMD_CPRIO) & M_FW_EQ_MNGT_CMD_CPRIO)
-#define F_FW_EQ_MNGT_CMD_CPRIO V_FW_EQ_MNGT_CMD_CPRIO(1U)
-
-#define S_FW_EQ_MNGT_CMD_ONCHIP 18
-#define M_FW_EQ_MNGT_CMD_ONCHIP 0x1
-#define V_FW_EQ_MNGT_CMD_ONCHIP(x) ((x) << S_FW_EQ_MNGT_CMD_ONCHIP)
-#define G_FW_EQ_MNGT_CMD_ONCHIP(x) \
- (((x) >> S_FW_EQ_MNGT_CMD_ONCHIP) & M_FW_EQ_MNGT_CMD_ONCHIP)
-#define F_FW_EQ_MNGT_CMD_ONCHIP V_FW_EQ_MNGT_CMD_ONCHIP(1U)
-
-#define S_FW_EQ_MNGT_CMD_PCIECHN 16
-#define M_FW_EQ_MNGT_CMD_PCIECHN 0x3
-#define V_FW_EQ_MNGT_CMD_PCIECHN(x) ((x) << S_FW_EQ_MNGT_CMD_PCIECHN)
-#define G_FW_EQ_MNGT_CMD_PCIECHN(x) \
- (((x) >> S_FW_EQ_MNGT_CMD_PCIECHN) & M_FW_EQ_MNGT_CMD_PCIECHN)
-
-#define S_FW_EQ_MNGT_CMD_IQID 0
-#define M_FW_EQ_MNGT_CMD_IQID 0xffff
-#define V_FW_EQ_MNGT_CMD_IQID(x) ((x) << S_FW_EQ_MNGT_CMD_IQID)
-#define G_FW_EQ_MNGT_CMD_IQID(x) \
- (((x) >> S_FW_EQ_MNGT_CMD_IQID) & M_FW_EQ_MNGT_CMD_IQID)
-
-#define S_FW_EQ_MNGT_CMD_DCAEN 31
-#define M_FW_EQ_MNGT_CMD_DCAEN 0x1
-#define V_FW_EQ_MNGT_CMD_DCAEN(x) ((x) << S_FW_EQ_MNGT_CMD_DCAEN)
-#define G_FW_EQ_MNGT_CMD_DCAEN(x) \
- (((x) >> S_FW_EQ_MNGT_CMD_DCAEN) & M_FW_EQ_MNGT_CMD_DCAEN)
-#define F_FW_EQ_MNGT_CMD_DCAEN V_FW_EQ_MNGT_CMD_DCAEN(1U)
-
-#define S_FW_EQ_MNGT_CMD_DCACPU 26
-#define M_FW_EQ_MNGT_CMD_DCACPU 0x1f
-#define V_FW_EQ_MNGT_CMD_DCACPU(x) ((x) << S_FW_EQ_MNGT_CMD_DCACPU)
-#define G_FW_EQ_MNGT_CMD_DCACPU(x) \
- (((x) >> S_FW_EQ_MNGT_CMD_DCACPU) & M_FW_EQ_MNGT_CMD_DCACPU)
-
-#define S_FW_EQ_MNGT_CMD_FBMIN 23
-#define M_FW_EQ_MNGT_CMD_FBMIN 0x7
-#define V_FW_EQ_MNGT_CMD_FBMIN(x) ((x) << S_FW_EQ_MNGT_CMD_FBMIN)
-#define G_FW_EQ_MNGT_CMD_FBMIN(x) \
- (((x) >> S_FW_EQ_MNGT_CMD_FBMIN) & M_FW_EQ_MNGT_CMD_FBMIN)
-
-#define S_FW_EQ_MNGT_CMD_FBMAX 20
-#define M_FW_EQ_MNGT_CMD_FBMAX 0x7
-#define V_FW_EQ_MNGT_CMD_FBMAX(x) ((x) << S_FW_EQ_MNGT_CMD_FBMAX)
-#define G_FW_EQ_MNGT_CMD_FBMAX(x) \
- (((x) >> S_FW_EQ_MNGT_CMD_FBMAX) & M_FW_EQ_MNGT_CMD_FBMAX)
-
-#define S_FW_EQ_MNGT_CMD_CIDXFTHRESHO 19
-#define M_FW_EQ_MNGT_CMD_CIDXFTHRESHO 0x1
-#define V_FW_EQ_MNGT_CMD_CIDXFTHRESHO(x) \
- ((x) << S_FW_EQ_MNGT_CMD_CIDXFTHRESHO)
-#define G_FW_EQ_MNGT_CMD_CIDXFTHRESHO(x) \
- (((x) >> S_FW_EQ_MNGT_CMD_CIDXFTHRESHO) & M_FW_EQ_MNGT_CMD_CIDXFTHRESHO)
-#define F_FW_EQ_MNGT_CMD_CIDXFTHRESHO V_FW_EQ_MNGT_CMD_CIDXFTHRESHO(1U)
-
-#define S_FW_EQ_MNGT_CMD_CIDXFTHRESH 16
-#define M_FW_EQ_MNGT_CMD_CIDXFTHRESH 0x7
-#define V_FW_EQ_MNGT_CMD_CIDXFTHRESH(x) ((x) << S_FW_EQ_MNGT_CMD_CIDXFTHRESH)
-#define G_FW_EQ_MNGT_CMD_CIDXFTHRESH(x) \
- (((x) >> S_FW_EQ_MNGT_CMD_CIDXFTHRESH) & M_FW_EQ_MNGT_CMD_CIDXFTHRESH)
-
-#define S_FW_EQ_MNGT_CMD_EQSIZE 0
-#define M_FW_EQ_MNGT_CMD_EQSIZE 0xffff
-#define V_FW_EQ_MNGT_CMD_EQSIZE(x) ((x) << S_FW_EQ_MNGT_CMD_EQSIZE)
-#define G_FW_EQ_MNGT_CMD_EQSIZE(x) \
- (((x) >> S_FW_EQ_MNGT_CMD_EQSIZE) & M_FW_EQ_MNGT_CMD_EQSIZE)
-
-struct fw_eq_eth_cmd {
- __be32 op_to_vfn;
- __be32 alloc_to_len16;
- __be32 eqid_pkd;
- __be32 physeqid_pkd;
- __be32 fetchszm_to_iqid;
- __be32 dcaen_to_eqsize;
- __be64 eqaddr;
- __be32 viid_pkd;
- __be32 r8_lo;
- __be64 r9;
-};
-
-#define S_FW_EQ_ETH_CMD_PFN 8
-#define M_FW_EQ_ETH_CMD_PFN 0x7
-#define V_FW_EQ_ETH_CMD_PFN(x) ((x) << S_FW_EQ_ETH_CMD_PFN)
-#define G_FW_EQ_ETH_CMD_PFN(x) \
- (((x) >> S_FW_EQ_ETH_CMD_PFN) & M_FW_EQ_ETH_CMD_PFN)
-
-#define S_FW_EQ_ETH_CMD_VFN 0
-#define M_FW_EQ_ETH_CMD_VFN 0xff
-#define V_FW_EQ_ETH_CMD_VFN(x) ((x) << S_FW_EQ_ETH_CMD_VFN)
-#define G_FW_EQ_ETH_CMD_VFN(x) \
- (((x) >> S_FW_EQ_ETH_CMD_VFN) & M_FW_EQ_ETH_CMD_VFN)
-
-#define S_FW_EQ_ETH_CMD_ALLOC 31
-#define M_FW_EQ_ETH_CMD_ALLOC 0x1
-#define V_FW_EQ_ETH_CMD_ALLOC(x) ((x) << S_FW_EQ_ETH_CMD_ALLOC)
-#define G_FW_EQ_ETH_CMD_ALLOC(x) \
- (((x) >> S_FW_EQ_ETH_CMD_ALLOC) & M_FW_EQ_ETH_CMD_ALLOC)
-#define F_FW_EQ_ETH_CMD_ALLOC V_FW_EQ_ETH_CMD_ALLOC(1U)
-
-#define S_FW_EQ_ETH_CMD_FREE 30
-#define M_FW_EQ_ETH_CMD_FREE 0x1
-#define V_FW_EQ_ETH_CMD_FREE(x) ((x) << S_FW_EQ_ETH_CMD_FREE)
-#define G_FW_EQ_ETH_CMD_FREE(x) \
- (((x) >> S_FW_EQ_ETH_CMD_FREE) & M_FW_EQ_ETH_CMD_FREE)
-#define F_FW_EQ_ETH_CMD_FREE V_FW_EQ_ETH_CMD_FREE(1U)
-
-#define S_FW_EQ_ETH_CMD_MODIFY 29
-#define M_FW_EQ_ETH_CMD_MODIFY 0x1
-#define V_FW_EQ_ETH_CMD_MODIFY(x) ((x) << S_FW_EQ_ETH_CMD_MODIFY)
-#define G_FW_EQ_ETH_CMD_MODIFY(x) \
- (((x) >> S_FW_EQ_ETH_CMD_MODIFY) & M_FW_EQ_ETH_CMD_MODIFY)
-#define F_FW_EQ_ETH_CMD_MODIFY V_FW_EQ_ETH_CMD_MODIFY(1U)
-
-#define S_FW_EQ_ETH_CMD_EQSTART 28
-#define M_FW_EQ_ETH_CMD_EQSTART 0x1
-#define V_FW_EQ_ETH_CMD_EQSTART(x) ((x) << S_FW_EQ_ETH_CMD_EQSTART)
-#define G_FW_EQ_ETH_CMD_EQSTART(x) \
- (((x) >> S_FW_EQ_ETH_CMD_EQSTART) & M_FW_EQ_ETH_CMD_EQSTART)
-#define F_FW_EQ_ETH_CMD_EQSTART V_FW_EQ_ETH_CMD_EQSTART(1U)
-
-#define S_FW_EQ_ETH_CMD_EQSTOP 27
-#define M_FW_EQ_ETH_CMD_EQSTOP 0x1
-#define V_FW_EQ_ETH_CMD_EQSTOP(x) ((x) << S_FW_EQ_ETH_CMD_EQSTOP)
-#define G_FW_EQ_ETH_CMD_EQSTOP(x) \
- (((x) >> S_FW_EQ_ETH_CMD_EQSTOP) & M_FW_EQ_ETH_CMD_EQSTOP)
-#define F_FW_EQ_ETH_CMD_EQSTOP V_FW_EQ_ETH_CMD_EQSTOP(1U)
-
-#define S_FW_EQ_ETH_CMD_EQID 0
-#define M_FW_EQ_ETH_CMD_EQID 0xfffff
-#define V_FW_EQ_ETH_CMD_EQID(x) ((x) << S_FW_EQ_ETH_CMD_EQID)
-#define G_FW_EQ_ETH_CMD_EQID(x) \
- (((x) >> S_FW_EQ_ETH_CMD_EQID) & M_FW_EQ_ETH_CMD_EQID)
-
-#define S_FW_EQ_ETH_CMD_PHYSEQID 0
-#define M_FW_EQ_ETH_CMD_PHYSEQID 0xfffff
-#define V_FW_EQ_ETH_CMD_PHYSEQID(x) ((x) << S_FW_EQ_ETH_CMD_PHYSEQID)
-#define G_FW_EQ_ETH_CMD_PHYSEQID(x) \
- (((x) >> S_FW_EQ_ETH_CMD_PHYSEQID) & M_FW_EQ_ETH_CMD_PHYSEQID)
-
-#define S_FW_EQ_ETH_CMD_FETCHSZM 26
-#define M_FW_EQ_ETH_CMD_FETCHSZM 0x1
-#define V_FW_EQ_ETH_CMD_FETCHSZM(x) ((x) << S_FW_EQ_ETH_CMD_FETCHSZM)
-#define G_FW_EQ_ETH_CMD_FETCHSZM(x) \
- (((x) >> S_FW_EQ_ETH_CMD_FETCHSZM) & M_FW_EQ_ETH_CMD_FETCHSZM)
-#define F_FW_EQ_ETH_CMD_FETCHSZM V_FW_EQ_ETH_CMD_FETCHSZM(1U)
-
-#define S_FW_EQ_ETH_CMD_STATUSPGNS 25
-#define M_FW_EQ_ETH_CMD_STATUSPGNS 0x1
-#define V_FW_EQ_ETH_CMD_STATUSPGNS(x) ((x) << S_FW_EQ_ETH_CMD_STATUSPGNS)
-#define G_FW_EQ_ETH_CMD_STATUSPGNS(x) \
- (((x) >> S_FW_EQ_ETH_CMD_STATUSPGNS) & M_FW_EQ_ETH_CMD_STATUSPGNS)
-#define F_FW_EQ_ETH_CMD_STATUSPGNS V_FW_EQ_ETH_CMD_STATUSPGNS(1U)
-
-#define S_FW_EQ_ETH_CMD_STATUSPGRO 24
-#define M_FW_EQ_ETH_CMD_STATUSPGRO 0x1
-#define V_FW_EQ_ETH_CMD_STATUSPGRO(x) ((x) << S_FW_EQ_ETH_CMD_STATUSPGRO)
-#define G_FW_EQ_ETH_CMD_STATUSPGRO(x) \
- (((x) >> S_FW_EQ_ETH_CMD_STATUSPGRO) & M_FW_EQ_ETH_CMD_STATUSPGRO)
-#define F_FW_EQ_ETH_CMD_STATUSPGRO V_FW_EQ_ETH_CMD_STATUSPGRO(1U)
-
-#define S_FW_EQ_ETH_CMD_FETCHNS 23
-#define M_FW_EQ_ETH_CMD_FETCHNS 0x1
-#define V_FW_EQ_ETH_CMD_FETCHNS(x) ((x) << S_FW_EQ_ETH_CMD_FETCHNS)
-#define G_FW_EQ_ETH_CMD_FETCHNS(x) \
- (((x) >> S_FW_EQ_ETH_CMD_FETCHNS) & M_FW_EQ_ETH_CMD_FETCHNS)
-#define F_FW_EQ_ETH_CMD_FETCHNS V_FW_EQ_ETH_CMD_FETCHNS(1U)
-
-#define S_FW_EQ_ETH_CMD_FETCHRO 22
-#define M_FW_EQ_ETH_CMD_FETCHRO 0x1
-#define V_FW_EQ_ETH_CMD_FETCHRO(x) ((x) << S_FW_EQ_ETH_CMD_FETCHRO)
-#define G_FW_EQ_ETH_CMD_FETCHRO(x) \
- (((x) >> S_FW_EQ_ETH_CMD_FETCHRO) & M_FW_EQ_ETH_CMD_FETCHRO)
-#define F_FW_EQ_ETH_CMD_FETCHRO V_FW_EQ_ETH_CMD_FETCHRO(1U)
-
-#define S_FW_EQ_ETH_CMD_HOSTFCMODE 20
-#define M_FW_EQ_ETH_CMD_HOSTFCMODE 0x3
-#define V_FW_EQ_ETH_CMD_HOSTFCMODE(x) ((x) << S_FW_EQ_ETH_CMD_HOSTFCMODE)
-#define G_FW_EQ_ETH_CMD_HOSTFCMODE(x) \
- (((x) >> S_FW_EQ_ETH_CMD_HOSTFCMODE) & M_FW_EQ_ETH_CMD_HOSTFCMODE)
-
-#define S_FW_EQ_ETH_CMD_CPRIO 19
-#define M_FW_EQ_ETH_CMD_CPRIO 0x1
-#define V_FW_EQ_ETH_CMD_CPRIO(x) ((x) << S_FW_EQ_ETH_CMD_CPRIO)
-#define G_FW_EQ_ETH_CMD_CPRIO(x) \
- (((x) >> S_FW_EQ_ETH_CMD_CPRIO) & M_FW_EQ_ETH_CMD_CPRIO)
-#define F_FW_EQ_ETH_CMD_CPRIO V_FW_EQ_ETH_CMD_CPRIO(1U)
-
-#define S_FW_EQ_ETH_CMD_ONCHIP 18
-#define M_FW_EQ_ETH_CMD_ONCHIP 0x1
-#define V_FW_EQ_ETH_CMD_ONCHIP(x) ((x) << S_FW_EQ_ETH_CMD_ONCHIP)
-#define G_FW_EQ_ETH_CMD_ONCHIP(x) \
- (((x) >> S_FW_EQ_ETH_CMD_ONCHIP) & M_FW_EQ_ETH_CMD_ONCHIP)
-#define F_FW_EQ_ETH_CMD_ONCHIP V_FW_EQ_ETH_CMD_ONCHIP(1U)
-
-#define S_FW_EQ_ETH_CMD_PCIECHN 16
-#define M_FW_EQ_ETH_CMD_PCIECHN 0x3
-#define V_FW_EQ_ETH_CMD_PCIECHN(x) ((x) << S_FW_EQ_ETH_CMD_PCIECHN)
-#define G_FW_EQ_ETH_CMD_PCIECHN(x) \
- (((x) >> S_FW_EQ_ETH_CMD_PCIECHN) & M_FW_EQ_ETH_CMD_PCIECHN)
-
-#define S_FW_EQ_ETH_CMD_IQID 0
-#define M_FW_EQ_ETH_CMD_IQID 0xffff
-#define V_FW_EQ_ETH_CMD_IQID(x) ((x) << S_FW_EQ_ETH_CMD_IQID)
-#define G_FW_EQ_ETH_CMD_IQID(x) \
- (((x) >> S_FW_EQ_ETH_CMD_IQID) & M_FW_EQ_ETH_CMD_IQID)
-
-#define S_FW_EQ_ETH_CMD_DCAEN 31
-#define M_FW_EQ_ETH_CMD_DCAEN 0x1
-#define V_FW_EQ_ETH_CMD_DCAEN(x) ((x) << S_FW_EQ_ETH_CMD_DCAEN)
-#define G_FW_EQ_ETH_CMD_DCAEN(x) \
- (((x) >> S_FW_EQ_ETH_CMD_DCAEN) & M_FW_EQ_ETH_CMD_DCAEN)
-#define F_FW_EQ_ETH_CMD_DCAEN V_FW_EQ_ETH_CMD_DCAEN(1U)
-
-#define S_FW_EQ_ETH_CMD_DCACPU 26
-#define M_FW_EQ_ETH_CMD_DCACPU 0x1f
-#define V_FW_EQ_ETH_CMD_DCACPU(x) ((x) << S_FW_EQ_ETH_CMD_DCACPU)
-#define G_FW_EQ_ETH_CMD_DCACPU(x) \
- (((x) >> S_FW_EQ_ETH_CMD_DCACPU) & M_FW_EQ_ETH_CMD_DCACPU)
-
-#define S_FW_EQ_ETH_CMD_FBMIN 23
-#define M_FW_EQ_ETH_CMD_FBMIN 0x7
-#define V_FW_EQ_ETH_CMD_FBMIN(x) ((x) << S_FW_EQ_ETH_CMD_FBMIN)
-#define G_FW_EQ_ETH_CMD_FBMIN(x) \
- (((x) >> S_FW_EQ_ETH_CMD_FBMIN) & M_FW_EQ_ETH_CMD_FBMIN)
-
-#define S_FW_EQ_ETH_CMD_FBMAX 20
-#define M_FW_EQ_ETH_CMD_FBMAX 0x7
-#define V_FW_EQ_ETH_CMD_FBMAX(x) ((x) << S_FW_EQ_ETH_CMD_FBMAX)
-#define G_FW_EQ_ETH_CMD_FBMAX(x) \
- (((x) >> S_FW_EQ_ETH_CMD_FBMAX) & M_FW_EQ_ETH_CMD_FBMAX)
-
-#define S_FW_EQ_ETH_CMD_CIDXFTHRESHO 19
-#define M_FW_EQ_ETH_CMD_CIDXFTHRESHO 0x1
-#define V_FW_EQ_ETH_CMD_CIDXFTHRESHO(x) ((x) << S_FW_EQ_ETH_CMD_CIDXFTHRESHO)
-#define G_FW_EQ_ETH_CMD_CIDXFTHRESHO(x) \
- (((x) >> S_FW_EQ_ETH_CMD_CIDXFTHRESHO) & M_FW_EQ_ETH_CMD_CIDXFTHRESHO)
-#define F_FW_EQ_ETH_CMD_CIDXFTHRESHO V_FW_EQ_ETH_CMD_CIDXFTHRESHO(1U)
-
-#define S_FW_EQ_ETH_CMD_CIDXFTHRESH 16
-#define M_FW_EQ_ETH_CMD_CIDXFTHRESH 0x7
-#define V_FW_EQ_ETH_CMD_CIDXFTHRESH(x) ((x) << S_FW_EQ_ETH_CMD_CIDXFTHRESH)
-#define G_FW_EQ_ETH_CMD_CIDXFTHRESH(x) \
- (((x) >> S_FW_EQ_ETH_CMD_CIDXFTHRESH) & M_FW_EQ_ETH_CMD_CIDXFTHRESH)
-
-#define S_FW_EQ_ETH_CMD_EQSIZE 0
-#define M_FW_EQ_ETH_CMD_EQSIZE 0xffff
-#define V_FW_EQ_ETH_CMD_EQSIZE(x) ((x) << S_FW_EQ_ETH_CMD_EQSIZE)
-#define G_FW_EQ_ETH_CMD_EQSIZE(x) \
- (((x) >> S_FW_EQ_ETH_CMD_EQSIZE) & M_FW_EQ_ETH_CMD_EQSIZE)
-
-#define S_FW_EQ_ETH_CMD_VIID 16
-#define M_FW_EQ_ETH_CMD_VIID 0xfff
-#define V_FW_EQ_ETH_CMD_VIID(x) ((x) << S_FW_EQ_ETH_CMD_VIID)
-#define G_FW_EQ_ETH_CMD_VIID(x) \
- (((x) >> S_FW_EQ_ETH_CMD_VIID) & M_FW_EQ_ETH_CMD_VIID)
-
-struct fw_eq_ctrl_cmd {
- __be32 op_to_vfn;
- __be32 alloc_to_len16;
- __be32 cmpliqid_eqid;
- __be32 physeqid_pkd;
- __be32 fetchszm_to_iqid;
- __be32 dcaen_to_eqsize;
- __be64 eqaddr;
-};
-
-#define S_FW_EQ_CTRL_CMD_PFN 8
-#define M_FW_EQ_CTRL_CMD_PFN 0x7
-#define V_FW_EQ_CTRL_CMD_PFN(x) ((x) << S_FW_EQ_CTRL_CMD_PFN)
-#define G_FW_EQ_CTRL_CMD_PFN(x) \
- (((x) >> S_FW_EQ_CTRL_CMD_PFN) & M_FW_EQ_CTRL_CMD_PFN)
-
-#define S_FW_EQ_CTRL_CMD_VFN 0
-#define M_FW_EQ_CTRL_CMD_VFN 0xff
-#define V_FW_EQ_CTRL_CMD_VFN(x) ((x) << S_FW_EQ_CTRL_CMD_VFN)
-#define G_FW_EQ_CTRL_CMD_VFN(x) \
- (((x) >> S_FW_EQ_CTRL_CMD_VFN) & M_FW_EQ_CTRL_CMD_VFN)
-
-#define S_FW_EQ_CTRL_CMD_ALLOC 31
-#define M_FW_EQ_CTRL_CMD_ALLOC 0x1
-#define V_FW_EQ_CTRL_CMD_ALLOC(x) ((x) << S_FW_EQ_CTRL_CMD_ALLOC)
-#define G_FW_EQ_CTRL_CMD_ALLOC(x) \
- (((x) >> S_FW_EQ_CTRL_CMD_ALLOC) & M_FW_EQ_CTRL_CMD_ALLOC)
-#define F_FW_EQ_CTRL_CMD_ALLOC V_FW_EQ_CTRL_CMD_ALLOC(1U)
-
-#define S_FW_EQ_CTRL_CMD_FREE 30
-#define M_FW_EQ_CTRL_CMD_FREE 0x1
-#define V_FW_EQ_CTRL_CMD_FREE(x) ((x) << S_FW_EQ_CTRL_CMD_FREE)
-#define G_FW_EQ_CTRL_CMD_FREE(x) \
- (((x) >> S_FW_EQ_CTRL_CMD_FREE) & M_FW_EQ_CTRL_CMD_FREE)
-#define F_FW_EQ_CTRL_CMD_FREE V_FW_EQ_CTRL_CMD_FREE(1U)
-
-#define S_FW_EQ_CTRL_CMD_MODIFY 29
-#define M_FW_EQ_CTRL_CMD_MODIFY 0x1
-#define V_FW_EQ_CTRL_CMD_MODIFY(x) ((x) << S_FW_EQ_CTRL_CMD_MODIFY)
-#define G_FW_EQ_CTRL_CMD_MODIFY(x) \
- (((x) >> S_FW_EQ_CTRL_CMD_MODIFY) & M_FW_EQ_CTRL_CMD_MODIFY)
-#define F_FW_EQ_CTRL_CMD_MODIFY V_FW_EQ_CTRL_CMD_MODIFY(1U)
-
-#define S_FW_EQ_CTRL_CMD_EQSTART 28
-#define M_FW_EQ_CTRL_CMD_EQSTART 0x1
-#define V_FW_EQ_CTRL_CMD_EQSTART(x) ((x) << S_FW_EQ_CTRL_CMD_EQSTART)
-#define G_FW_EQ_CTRL_CMD_EQSTART(x) \
- (((x) >> S_FW_EQ_CTRL_CMD_EQSTART) & M_FW_EQ_CTRL_CMD_EQSTART)
-#define F_FW_EQ_CTRL_CMD_EQSTART V_FW_EQ_CTRL_CMD_EQSTART(1U)
-
-#define S_FW_EQ_CTRL_CMD_EQSTOP 27
-#define M_FW_EQ_CTRL_CMD_EQSTOP 0x1
-#define V_FW_EQ_CTRL_CMD_EQSTOP(x) ((x) << S_FW_EQ_CTRL_CMD_EQSTOP)
-#define G_FW_EQ_CTRL_CMD_EQSTOP(x) \
- (((x) >> S_FW_EQ_CTRL_CMD_EQSTOP) & M_FW_EQ_CTRL_CMD_EQSTOP)
-#define F_FW_EQ_CTRL_CMD_EQSTOP V_FW_EQ_CTRL_CMD_EQSTOP(1U)
-
-#define S_FW_EQ_CTRL_CMD_CMPLIQID 20
-#define M_FW_EQ_CTRL_CMD_CMPLIQID 0xfff
-#define V_FW_EQ_CTRL_CMD_CMPLIQID(x) ((x) << S_FW_EQ_CTRL_CMD_CMPLIQID)
-#define G_FW_EQ_CTRL_CMD_CMPLIQID(x) \
- (((x) >> S_FW_EQ_CTRL_CMD_CMPLIQID) & M_FW_EQ_CTRL_CMD_CMPLIQID)
-
-#define S_FW_EQ_CTRL_CMD_EQID 0
-#define M_FW_EQ_CTRL_CMD_EQID 0xfffff
-#define V_FW_EQ_CTRL_CMD_EQID(x) ((x) << S_FW_EQ_CTRL_CMD_EQID)
-#define G_FW_EQ_CTRL_CMD_EQID(x) \
- (((x) >> S_FW_EQ_CTRL_CMD_EQID) & M_FW_EQ_CTRL_CMD_EQID)
-
-#define S_FW_EQ_CTRL_CMD_PHYSEQID 0
-#define M_FW_EQ_CTRL_CMD_PHYSEQID 0xfffff
-#define V_FW_EQ_CTRL_CMD_PHYSEQID(x) ((x) << S_FW_EQ_CTRL_CMD_PHYSEQID)
-#define G_FW_EQ_CTRL_CMD_PHYSEQID(x) \
- (((x) >> S_FW_EQ_CTRL_CMD_PHYSEQID) & M_FW_EQ_CTRL_CMD_PHYSEQID)
-
-#define S_FW_EQ_CTRL_CMD_FETCHSZM 26
-#define M_FW_EQ_CTRL_CMD_FETCHSZM 0x1
-#define V_FW_EQ_CTRL_CMD_FETCHSZM(x) ((x) << S_FW_EQ_CTRL_CMD_FETCHSZM)
-#define G_FW_EQ_CTRL_CMD_FETCHSZM(x) \
- (((x) >> S_FW_EQ_CTRL_CMD_FETCHSZM) & M_FW_EQ_CTRL_CMD_FETCHSZM)
-#define F_FW_EQ_CTRL_CMD_FETCHSZM V_FW_EQ_CTRL_CMD_FETCHSZM(1U)
-
-#define S_FW_EQ_CTRL_CMD_STATUSPGNS 25
-#define M_FW_EQ_CTRL_CMD_STATUSPGNS 0x1
-#define V_FW_EQ_CTRL_CMD_STATUSPGNS(x) ((x) << S_FW_EQ_CTRL_CMD_STATUSPGNS)
-#define G_FW_EQ_CTRL_CMD_STATUSPGNS(x) \
- (((x) >> S_FW_EQ_CTRL_CMD_STATUSPGNS) & M_FW_EQ_CTRL_CMD_STATUSPGNS)
-#define F_FW_EQ_CTRL_CMD_STATUSPGNS V_FW_EQ_CTRL_CMD_STATUSPGNS(1U)
-
-#define S_FW_EQ_CTRL_CMD_STATUSPGRO 24
-#define M_FW_EQ_CTRL_CMD_STATUSPGRO 0x1
-#define V_FW_EQ_CTRL_CMD_STATUSPGRO(x) ((x) << S_FW_EQ_CTRL_CMD_STATUSPGRO)
-#define G_FW_EQ_CTRL_CMD_STATUSPGRO(x) \
- (((x) >> S_FW_EQ_CTRL_CMD_STATUSPGRO) & M_FW_EQ_CTRL_CMD_STATUSPGRO)
-#define F_FW_EQ_CTRL_CMD_STATUSPGRO V_FW_EQ_CTRL_CMD_STATUSPGRO(1U)
-
-#define S_FW_EQ_CTRL_CMD_FETCHNS 23
-#define M_FW_EQ_CTRL_CMD_FETCHNS 0x1
-#define V_FW_EQ_CTRL_CMD_FETCHNS(x) ((x) << S_FW_EQ_CTRL_CMD_FETCHNS)
-#define G_FW_EQ_CTRL_CMD_FETCHNS(x) \
- (((x) >> S_FW_EQ_CTRL_CMD_FETCHNS) & M_FW_EQ_CTRL_CMD_FETCHNS)
-#define F_FW_EQ_CTRL_CMD_FETCHNS V_FW_EQ_CTRL_CMD_FETCHNS(1U)
-
-#define S_FW_EQ_CTRL_CMD_FETCHRO 22
-#define M_FW_EQ_CTRL_CMD_FETCHRO 0x1
-#define V_FW_EQ_CTRL_CMD_FETCHRO(x) ((x) << S_FW_EQ_CTRL_CMD_FETCHRO)
-#define G_FW_EQ_CTRL_CMD_FETCHRO(x) \
- (((x) >> S_FW_EQ_CTRL_CMD_FETCHRO) & M_FW_EQ_CTRL_CMD_FETCHRO)
-#define F_FW_EQ_CTRL_CMD_FETCHRO V_FW_EQ_CTRL_CMD_FETCHRO(1U)
-
-#define S_FW_EQ_CTRL_CMD_HOSTFCMODE 20
-#define M_FW_EQ_CTRL_CMD_HOSTFCMODE 0x3
-#define V_FW_EQ_CTRL_CMD_HOSTFCMODE(x) ((x) << S_FW_EQ_CTRL_CMD_HOSTFCMODE)
-#define G_FW_EQ_CTRL_CMD_HOSTFCMODE(x) \
- (((x) >> S_FW_EQ_CTRL_CMD_HOSTFCMODE) & M_FW_EQ_CTRL_CMD_HOSTFCMODE)
-
-#define S_FW_EQ_CTRL_CMD_CPRIO 19
-#define M_FW_EQ_CTRL_CMD_CPRIO 0x1
-#define V_FW_EQ_CTRL_CMD_CPRIO(x) ((x) << S_FW_EQ_CTRL_CMD_CPRIO)
-#define G_FW_EQ_CTRL_CMD_CPRIO(x) \
- (((x) >> S_FW_EQ_CTRL_CMD_CPRIO) & M_FW_EQ_CTRL_CMD_CPRIO)
-#define F_FW_EQ_CTRL_CMD_CPRIO V_FW_EQ_CTRL_CMD_CPRIO(1U)
-
-#define S_FW_EQ_CTRL_CMD_ONCHIP 18
-#define M_FW_EQ_CTRL_CMD_ONCHIP 0x1
-#define V_FW_EQ_CTRL_CMD_ONCHIP(x) ((x) << S_FW_EQ_CTRL_CMD_ONCHIP)
-#define G_FW_EQ_CTRL_CMD_ONCHIP(x) \
- (((x) >> S_FW_EQ_CTRL_CMD_ONCHIP) & M_FW_EQ_CTRL_CMD_ONCHIP)
-#define F_FW_EQ_CTRL_CMD_ONCHIP V_FW_EQ_CTRL_CMD_ONCHIP(1U)
-
-#define S_FW_EQ_CTRL_CMD_PCIECHN 16
-#define M_FW_EQ_CTRL_CMD_PCIECHN 0x3
-#define V_FW_EQ_CTRL_CMD_PCIECHN(x) ((x) << S_FW_EQ_CTRL_CMD_PCIECHN)
-#define G_FW_EQ_CTRL_CMD_PCIECHN(x) \
- (((x) >> S_FW_EQ_CTRL_CMD_PCIECHN) & M_FW_EQ_CTRL_CMD_PCIECHN)
-
-#define S_FW_EQ_CTRL_CMD_IQID 0
-#define M_FW_EQ_CTRL_CMD_IQID 0xffff
-#define V_FW_EQ_CTRL_CMD_IQID(x) ((x) << S_FW_EQ_CTRL_CMD_IQID)
-#define G_FW_EQ_CTRL_CMD_IQID(x) \
- (((x) >> S_FW_EQ_CTRL_CMD_IQID) & M_FW_EQ_CTRL_CMD_IQID)
-
-#define S_FW_EQ_CTRL_CMD_DCAEN 31
-#define M_FW_EQ_CTRL_CMD_DCAEN 0x1
-#define V_FW_EQ_CTRL_CMD_DCAEN(x) ((x) << S_FW_EQ_CTRL_CMD_DCAEN)
-#define G_FW_EQ_CTRL_CMD_DCAEN(x) \
- (((x) >> S_FW_EQ_CTRL_CMD_DCAEN) & M_FW_EQ_CTRL_CMD_DCAEN)
-#define F_FW_EQ_CTRL_CMD_DCAEN V_FW_EQ_CTRL_CMD_DCAEN(1U)
-
-#define S_FW_EQ_CTRL_CMD_DCACPU 26
-#define M_FW_EQ_CTRL_CMD_DCACPU 0x1f
-#define V_FW_EQ_CTRL_CMD_DCACPU(x) ((x) << S_FW_EQ_CTRL_CMD_DCACPU)
-#define G_FW_EQ_CTRL_CMD_DCACPU(x) \
- (((x) >> S_FW_EQ_CTRL_CMD_DCACPU) & M_FW_EQ_CTRL_CMD_DCACPU)
-
-#define S_FW_EQ_CTRL_CMD_FBMIN 23
-#define M_FW_EQ_CTRL_CMD_FBMIN 0x7
-#define V_FW_EQ_CTRL_CMD_FBMIN(x) ((x) << S_FW_EQ_CTRL_CMD_FBMIN)
-#define G_FW_EQ_CTRL_CMD_FBMIN(x) \
- (((x) >> S_FW_EQ_CTRL_CMD_FBMIN) & M_FW_EQ_CTRL_CMD_FBMIN)
-
-#define S_FW_EQ_CTRL_CMD_FBMAX 20
-#define M_FW_EQ_CTRL_CMD_FBMAX 0x7
-#define V_FW_EQ_CTRL_CMD_FBMAX(x) ((x) << S_FW_EQ_CTRL_CMD_FBMAX)
-#define G_FW_EQ_CTRL_CMD_FBMAX(x) \
- (((x) >> S_FW_EQ_CTRL_CMD_FBMAX) & M_FW_EQ_CTRL_CMD_FBMAX)
-
-#define S_FW_EQ_CTRL_CMD_CIDXFTHRESHO 19
-#define M_FW_EQ_CTRL_CMD_CIDXFTHRESHO 0x1
-#define V_FW_EQ_CTRL_CMD_CIDXFTHRESHO(x) \
- ((x) << S_FW_EQ_CTRL_CMD_CIDXFTHRESHO)
-#define G_FW_EQ_CTRL_CMD_CIDXFTHRESHO(x) \
- (((x) >> S_FW_EQ_CTRL_CMD_CIDXFTHRESHO) & M_FW_EQ_CTRL_CMD_CIDXFTHRESHO)
-#define F_FW_EQ_CTRL_CMD_CIDXFTHRESHO V_FW_EQ_CTRL_CMD_CIDXFTHRESHO(1U)
-
-#define S_FW_EQ_CTRL_CMD_CIDXFTHRESH 16
-#define M_FW_EQ_CTRL_CMD_CIDXFTHRESH 0x7
-#define V_FW_EQ_CTRL_CMD_CIDXFTHRESH(x) ((x) << S_FW_EQ_CTRL_CMD_CIDXFTHRESH)
-#define G_FW_EQ_CTRL_CMD_CIDXFTHRESH(x) \
- (((x) >> S_FW_EQ_CTRL_CMD_CIDXFTHRESH) & M_FW_EQ_CTRL_CMD_CIDXFTHRESH)
-
-#define S_FW_EQ_CTRL_CMD_EQSIZE 0
-#define M_FW_EQ_CTRL_CMD_EQSIZE 0xffff
-#define V_FW_EQ_CTRL_CMD_EQSIZE(x) ((x) << S_FW_EQ_CTRL_CMD_EQSIZE)
-#define G_FW_EQ_CTRL_CMD_EQSIZE(x) \
- (((x) >> S_FW_EQ_CTRL_CMD_EQSIZE) & M_FW_EQ_CTRL_CMD_EQSIZE)
-
-struct fw_eq_ofld_cmd {
- __be32 op_to_vfn;
- __be32 alloc_to_len16;
- __be32 eqid_pkd;
- __be32 physeqid_pkd;
- __be32 fetchszm_to_iqid;
- __be32 dcaen_to_eqsize;
- __be64 eqaddr;
-};
-
-#define S_FW_EQ_OFLD_CMD_PFN 8
-#define M_FW_EQ_OFLD_CMD_PFN 0x7
-#define V_FW_EQ_OFLD_CMD_PFN(x) ((x) << S_FW_EQ_OFLD_CMD_PFN)
-#define G_FW_EQ_OFLD_CMD_PFN(x) \
- (((x) >> S_FW_EQ_OFLD_CMD_PFN) & M_FW_EQ_OFLD_CMD_PFN)
-
-#define S_FW_EQ_OFLD_CMD_VFN 0
-#define M_FW_EQ_OFLD_CMD_VFN 0xff
-#define V_FW_EQ_OFLD_CMD_VFN(x) ((x) << S_FW_EQ_OFLD_CMD_VFN)
-#define G_FW_EQ_OFLD_CMD_VFN(x) \
- (((x) >> S_FW_EQ_OFLD_CMD_VFN) & M_FW_EQ_OFLD_CMD_VFN)
-
-#define S_FW_EQ_OFLD_CMD_ALLOC 31
-#define M_FW_EQ_OFLD_CMD_ALLOC 0x1
-#define V_FW_EQ_OFLD_CMD_ALLOC(x) ((x) << S_FW_EQ_OFLD_CMD_ALLOC)
-#define G_FW_EQ_OFLD_CMD_ALLOC(x) \
- (((x) >> S_FW_EQ_OFLD_CMD_ALLOC) & M_FW_EQ_OFLD_CMD_ALLOC)
-#define F_FW_EQ_OFLD_CMD_ALLOC V_FW_EQ_OFLD_CMD_ALLOC(1U)
-
-#define S_FW_EQ_OFLD_CMD_FREE 30
-#define M_FW_EQ_OFLD_CMD_FREE 0x1
-#define V_FW_EQ_OFLD_CMD_FREE(x) ((x) << S_FW_EQ_OFLD_CMD_FREE)
-#define G_FW_EQ_OFLD_CMD_FREE(x) \
- (((x) >> S_FW_EQ_OFLD_CMD_FREE) & M_FW_EQ_OFLD_CMD_FREE)
-#define F_FW_EQ_OFLD_CMD_FREE V_FW_EQ_OFLD_CMD_FREE(1U)
-
-#define S_FW_EQ_OFLD_CMD_MODIFY 29
-#define M_FW_EQ_OFLD_CMD_MODIFY 0x1
-#define V_FW_EQ_OFLD_CMD_MODIFY(x) ((x) << S_FW_EQ_OFLD_CMD_MODIFY)
-#define G_FW_EQ_OFLD_CMD_MODIFY(x) \
- (((x) >> S_FW_EQ_OFLD_CMD_MODIFY) & M_FW_EQ_OFLD_CMD_MODIFY)
-#define F_FW_EQ_OFLD_CMD_MODIFY V_FW_EQ_OFLD_CMD_MODIFY(1U)
-
-#define S_FW_EQ_OFLD_CMD_EQSTART 28
-#define M_FW_EQ_OFLD_CMD_EQSTART 0x1
-#define V_FW_EQ_OFLD_CMD_EQSTART(x) ((x) << S_FW_EQ_OFLD_CMD_EQSTART)
-#define G_FW_EQ_OFLD_CMD_EQSTART(x) \
- (((x) >> S_FW_EQ_OFLD_CMD_EQSTART) & M_FW_EQ_OFLD_CMD_EQSTART)
-#define F_FW_EQ_OFLD_CMD_EQSTART V_FW_EQ_OFLD_CMD_EQSTART(1U)
-
-#define S_FW_EQ_OFLD_CMD_EQSTOP 27
-#define M_FW_EQ_OFLD_CMD_EQSTOP 0x1
-#define V_FW_EQ_OFLD_CMD_EQSTOP(x) ((x) << S_FW_EQ_OFLD_CMD_EQSTOP)
-#define G_FW_EQ_OFLD_CMD_EQSTOP(x) \
- (((x) >> S_FW_EQ_OFLD_CMD_EQSTOP) & M_FW_EQ_OFLD_CMD_EQSTOP)
-#define F_FW_EQ_OFLD_CMD_EQSTOP V_FW_EQ_OFLD_CMD_EQSTOP(1U)
-
-#define S_FW_EQ_OFLD_CMD_EQID 0
-#define M_FW_EQ_OFLD_CMD_EQID 0xfffff
-#define V_FW_EQ_OFLD_CMD_EQID(x) ((x) << S_FW_EQ_OFLD_CMD_EQID)
-#define G_FW_EQ_OFLD_CMD_EQID(x) \
- (((x) >> S_FW_EQ_OFLD_CMD_EQID) & M_FW_EQ_OFLD_CMD_EQID)
-
-#define S_FW_EQ_OFLD_CMD_PHYSEQID 0
-#define M_FW_EQ_OFLD_CMD_PHYSEQID 0xfffff
-#define V_FW_EQ_OFLD_CMD_PHYSEQID(x) ((x) << S_FW_EQ_OFLD_CMD_PHYSEQID)
-#define G_FW_EQ_OFLD_CMD_PHYSEQID(x) \
- (((x) >> S_FW_EQ_OFLD_CMD_PHYSEQID) & M_FW_EQ_OFLD_CMD_PHYSEQID)
-
-#define S_FW_EQ_OFLD_CMD_FETCHSZM 26
-#define M_FW_EQ_OFLD_CMD_FETCHSZM 0x1
-#define V_FW_EQ_OFLD_CMD_FETCHSZM(x) ((x) << S_FW_EQ_OFLD_CMD_FETCHSZM)
-#define G_FW_EQ_OFLD_CMD_FETCHSZM(x) \
- (((x) >> S_FW_EQ_OFLD_CMD_FETCHSZM) & M_FW_EQ_OFLD_CMD_FETCHSZM)
-#define F_FW_EQ_OFLD_CMD_FETCHSZM V_FW_EQ_OFLD_CMD_FETCHSZM(1U)
-
-#define S_FW_EQ_OFLD_CMD_STATUSPGNS 25
-#define M_FW_EQ_OFLD_CMD_STATUSPGNS 0x1
-#define V_FW_EQ_OFLD_CMD_STATUSPGNS(x) ((x) << S_FW_EQ_OFLD_CMD_STATUSPGNS)
-#define G_FW_EQ_OFLD_CMD_STATUSPGNS(x) \
- (((x) >> S_FW_EQ_OFLD_CMD_STATUSPGNS) & M_FW_EQ_OFLD_CMD_STATUSPGNS)
-#define F_FW_EQ_OFLD_CMD_STATUSPGNS V_FW_EQ_OFLD_CMD_STATUSPGNS(1U)
-
-#define S_FW_EQ_OFLD_CMD_STATUSPGRO 24
-#define M_FW_EQ_OFLD_CMD_STATUSPGRO 0x1
-#define V_FW_EQ_OFLD_CMD_STATUSPGRO(x) ((x) << S_FW_EQ_OFLD_CMD_STATUSPGRO)
-#define G_FW_EQ_OFLD_CMD_STATUSPGRO(x) \
- (((x) >> S_FW_EQ_OFLD_CMD_STATUSPGRO) & M_FW_EQ_OFLD_CMD_STATUSPGRO)
-#define F_FW_EQ_OFLD_CMD_STATUSPGRO V_FW_EQ_OFLD_CMD_STATUSPGRO(1U)
-
-#define S_FW_EQ_OFLD_CMD_FETCHNS 23
-#define M_FW_EQ_OFLD_CMD_FETCHNS 0x1
-#define V_FW_EQ_OFLD_CMD_FETCHNS(x) ((x) << S_FW_EQ_OFLD_CMD_FETCHNS)
-#define G_FW_EQ_OFLD_CMD_FETCHNS(x) \
- (((x) >> S_FW_EQ_OFLD_CMD_FETCHNS) & M_FW_EQ_OFLD_CMD_FETCHNS)
-#define F_FW_EQ_OFLD_CMD_FETCHNS V_FW_EQ_OFLD_CMD_FETCHNS(1U)
-
-#define S_FW_EQ_OFLD_CMD_FETCHRO 22
-#define M_FW_EQ_OFLD_CMD_FETCHRO 0x1
-#define V_FW_EQ_OFLD_CMD_FETCHRO(x) ((x) << S_FW_EQ_OFLD_CMD_FETCHRO)
-#define G_FW_EQ_OFLD_CMD_FETCHRO(x) \
- (((x) >> S_FW_EQ_OFLD_CMD_FETCHRO) & M_FW_EQ_OFLD_CMD_FETCHRO)
-#define F_FW_EQ_OFLD_CMD_FETCHRO V_FW_EQ_OFLD_CMD_FETCHRO(1U)
-
-#define S_FW_EQ_OFLD_CMD_HOSTFCMODE 20
-#define M_FW_EQ_OFLD_CMD_HOSTFCMODE 0x3
-#define V_FW_EQ_OFLD_CMD_HOSTFCMODE(x) ((x) << S_FW_EQ_OFLD_CMD_HOSTFCMODE)
-#define G_FW_EQ_OFLD_CMD_HOSTFCMODE(x) \
- (((x) >> S_FW_EQ_OFLD_CMD_HOSTFCMODE) & M_FW_EQ_OFLD_CMD_HOSTFCMODE)
-
-#define S_FW_EQ_OFLD_CMD_CPRIO 19
-#define M_FW_EQ_OFLD_CMD_CPRIO 0x1
-#define V_FW_EQ_OFLD_CMD_CPRIO(x) ((x) << S_FW_EQ_OFLD_CMD_CPRIO)
-#define G_FW_EQ_OFLD_CMD_CPRIO(x) \
- (((x) >> S_FW_EQ_OFLD_CMD_CPRIO) & M_FW_EQ_OFLD_CMD_CPRIO)
-#define F_FW_EQ_OFLD_CMD_CPRIO V_FW_EQ_OFLD_CMD_CPRIO(1U)
-
-#define S_FW_EQ_OFLD_CMD_ONCHIP 18
-#define M_FW_EQ_OFLD_CMD_ONCHIP 0x1
-#define V_FW_EQ_OFLD_CMD_ONCHIP(x) ((x) << S_FW_EQ_OFLD_CMD_ONCHIP)
-#define G_FW_EQ_OFLD_CMD_ONCHIP(x) \
- (((x) >> S_FW_EQ_OFLD_CMD_ONCHIP) & M_FW_EQ_OFLD_CMD_ONCHIP)
-#define F_FW_EQ_OFLD_CMD_ONCHIP V_FW_EQ_OFLD_CMD_ONCHIP(1U)
-
-#define S_FW_EQ_OFLD_CMD_PCIECHN 16
-#define M_FW_EQ_OFLD_CMD_PCIECHN 0x3
-#define V_FW_EQ_OFLD_CMD_PCIECHN(x) ((x) << S_FW_EQ_OFLD_CMD_PCIECHN)
-#define G_FW_EQ_OFLD_CMD_PCIECHN(x) \
- (((x) >> S_FW_EQ_OFLD_CMD_PCIECHN) & M_FW_EQ_OFLD_CMD_PCIECHN)
-
-#define S_FW_EQ_OFLD_CMD_IQID 0
-#define M_FW_EQ_OFLD_CMD_IQID 0xffff
-#define V_FW_EQ_OFLD_CMD_IQID(x) ((x) << S_FW_EQ_OFLD_CMD_IQID)
-#define G_FW_EQ_OFLD_CMD_IQID(x) \
- (((x) >> S_FW_EQ_OFLD_CMD_IQID) & M_FW_EQ_OFLD_CMD_IQID)
-
-#define S_FW_EQ_OFLD_CMD_DCAEN 31
-#define M_FW_EQ_OFLD_CMD_DCAEN 0x1
-#define V_FW_EQ_OFLD_CMD_DCAEN(x) ((x) << S_FW_EQ_OFLD_CMD_DCAEN)
-#define G_FW_EQ_OFLD_CMD_DCAEN(x) \
- (((x) >> S_FW_EQ_OFLD_CMD_DCAEN) & M_FW_EQ_OFLD_CMD_DCAEN)
-#define F_FW_EQ_OFLD_CMD_DCAEN V_FW_EQ_OFLD_CMD_DCAEN(1U)
-
-#define S_FW_EQ_OFLD_CMD_DCACPU 26
-#define M_FW_EQ_OFLD_CMD_DCACPU 0x1f
-#define V_FW_EQ_OFLD_CMD_DCACPU(x) ((x) << S_FW_EQ_OFLD_CMD_DCACPU)
-#define G_FW_EQ_OFLD_CMD_DCACPU(x) \
- (((x) >> S_FW_EQ_OFLD_CMD_DCACPU) & M_FW_EQ_OFLD_CMD_DCACPU)
-
-#define S_FW_EQ_OFLD_CMD_FBMIN 23
-#define M_FW_EQ_OFLD_CMD_FBMIN 0x7
-#define V_FW_EQ_OFLD_CMD_FBMIN(x) ((x) << S_FW_EQ_OFLD_CMD_FBMIN)
-#define G_FW_EQ_OFLD_CMD_FBMIN(x) \
- (((x) >> S_FW_EQ_OFLD_CMD_FBMIN) & M_FW_EQ_OFLD_CMD_FBMIN)
-
-#define S_FW_EQ_OFLD_CMD_FBMAX 20
-#define M_FW_EQ_OFLD_CMD_FBMAX 0x7
-#define V_FW_EQ_OFLD_CMD_FBMAX(x) ((x) << S_FW_EQ_OFLD_CMD_FBMAX)
-#define G_FW_EQ_OFLD_CMD_FBMAX(x) \
- (((x) >> S_FW_EQ_OFLD_CMD_FBMAX) & M_FW_EQ_OFLD_CMD_FBMAX)
-
-#define S_FW_EQ_OFLD_CMD_CIDXFTHRESHO 19
-#define M_FW_EQ_OFLD_CMD_CIDXFTHRESHO 0x1
-#define V_FW_EQ_OFLD_CMD_CIDXFTHRESHO(x) \
- ((x) << S_FW_EQ_OFLD_CMD_CIDXFTHRESHO)
-#define G_FW_EQ_OFLD_CMD_CIDXFTHRESHO(x) \
- (((x) >> S_FW_EQ_OFLD_CMD_CIDXFTHRESHO) & M_FW_EQ_OFLD_CMD_CIDXFTHRESHO)
-#define F_FW_EQ_OFLD_CMD_CIDXFTHRESHO V_FW_EQ_OFLD_CMD_CIDXFTHRESHO(1U)
-
-#define S_FW_EQ_OFLD_CMD_CIDXFTHRESH 16
-#define M_FW_EQ_OFLD_CMD_CIDXFTHRESH 0x7
-#define V_FW_EQ_OFLD_CMD_CIDXFTHRESH(x) ((x) << S_FW_EQ_OFLD_CMD_CIDXFTHRESH)
-#define G_FW_EQ_OFLD_CMD_CIDXFTHRESH(x) \
- (((x) >> S_FW_EQ_OFLD_CMD_CIDXFTHRESH) & M_FW_EQ_OFLD_CMD_CIDXFTHRESH)
-
-#define S_FW_EQ_OFLD_CMD_EQSIZE 0
-#define M_FW_EQ_OFLD_CMD_EQSIZE 0xffff
-#define V_FW_EQ_OFLD_CMD_EQSIZE(x) ((x) << S_FW_EQ_OFLD_CMD_EQSIZE)
-#define G_FW_EQ_OFLD_CMD_EQSIZE(x) \
- (((x) >> S_FW_EQ_OFLD_CMD_EQSIZE) & M_FW_EQ_OFLD_CMD_EQSIZE)
-/* Macros for VIID parsing:
- VIID - [10:8] PFN, [7] VI Valid, [6:0] VI number */
-#define S_FW_VIID_PFN 8
-#define M_FW_VIID_PFN 0x7
-#define V_FW_VIID_PFN(x) ((x) << S_FW_VIID_PFN)
-#define G_FW_VIID_PFN(x) (((x) >> S_FW_VIID_PFN) & M_FW_VIID_PFN)
-
-#define S_FW_VIID_VIVLD 7
-#define M_FW_VIID_VIVLD 0x1
-#define V_FW_VIID_VIVLD(x) ((x) << S_FW_VIID_VIVLD)
-#define G_FW_VIID_VIVLD(x) (((x) >> S_FW_VIID_VIVLD) & M_FW_VIID_VIVLD)
-
-#define S_FW_VIID_VIN 0
-#define M_FW_VIID_VIN 0x7F
-#define V_FW_VIID_VIN(x) ((x) << S_FW_VIID_VIN)
-#define G_FW_VIID_VIN(x) (((x) >> S_FW_VIID_VIN) & M_FW_VIID_VIN)
-
-enum fw_vi_func {
- FW_VI_FUNC_ETH,
- FW_VI_FUNC_OFLD,
- FW_VI_FUNC_IWARP,
- FW_VI_FUNC_OPENISCSI,
- FW_VI_FUNC_OPENFCOE,
- FW_VI_FUNC_FOISCSI,
- FW_VI_FUNC_FOFCOE,
- FW_VI_FUNC_FW,
-};
-
-struct fw_vi_cmd {
- __be32 op_to_vfn;
- __be32 alloc_to_len16;
- __be16 type_to_viid;
- __u8 mac[6];
- __u8 portid_pkd;
- __u8 nmac;
- __u8 nmac0[6];
- __be16 rsssize_pkd;
- __u8 nmac1[6];
- __be16 idsiiq_pkd;
- __u8 nmac2[6];
- __be16 idseiq_pkd;
- __u8 nmac3[6];
- __be64 r9;
- __be64 r10;
-};
-
-#define S_FW_VI_CMD_PFN 8
-#define M_FW_VI_CMD_PFN 0x7
-#define V_FW_VI_CMD_PFN(x) ((x) << S_FW_VI_CMD_PFN)
-#define G_FW_VI_CMD_PFN(x) (((x) >> S_FW_VI_CMD_PFN) & M_FW_VI_CMD_PFN)
-
-#define S_FW_VI_CMD_VFN 0
-#define M_FW_VI_CMD_VFN 0xff
-#define V_FW_VI_CMD_VFN(x) ((x) << S_FW_VI_CMD_VFN)
-#define G_FW_VI_CMD_VFN(x) (((x) >> S_FW_VI_CMD_VFN) & M_FW_VI_CMD_VFN)
-
-#define S_FW_VI_CMD_ALLOC 31
-#define M_FW_VI_CMD_ALLOC 0x1
-#define V_FW_VI_CMD_ALLOC(x) ((x) << S_FW_VI_CMD_ALLOC)
-#define G_FW_VI_CMD_ALLOC(x) \
- (((x) >> S_FW_VI_CMD_ALLOC) & M_FW_VI_CMD_ALLOC)
-#define F_FW_VI_CMD_ALLOC V_FW_VI_CMD_ALLOC(1U)
-
-#define S_FW_VI_CMD_FREE 30
-#define M_FW_VI_CMD_FREE 0x1
-#define V_FW_VI_CMD_FREE(x) ((x) << S_FW_VI_CMD_FREE)
-#define G_FW_VI_CMD_FREE(x) (((x) >> S_FW_VI_CMD_FREE) & M_FW_VI_CMD_FREE)
-#define F_FW_VI_CMD_FREE V_FW_VI_CMD_FREE(1U)
-
-#define S_FW_VI_CMD_TYPE 15
-#define M_FW_VI_CMD_TYPE 0x1
-#define V_FW_VI_CMD_TYPE(x) ((x) << S_FW_VI_CMD_TYPE)
-#define G_FW_VI_CMD_TYPE(x) (((x) >> S_FW_VI_CMD_TYPE) & M_FW_VI_CMD_TYPE)
-#define F_FW_VI_CMD_TYPE V_FW_VI_CMD_TYPE(1U)
-
-#define S_FW_VI_CMD_FUNC 12
-#define M_FW_VI_CMD_FUNC 0x7
-#define V_FW_VI_CMD_FUNC(x) ((x) << S_FW_VI_CMD_FUNC)
-#define G_FW_VI_CMD_FUNC(x) (((x) >> S_FW_VI_CMD_FUNC) & M_FW_VI_CMD_FUNC)
-
-#define S_FW_VI_CMD_VIID 0
-#define M_FW_VI_CMD_VIID 0xfff
-#define V_FW_VI_CMD_VIID(x) ((x) << S_FW_VI_CMD_VIID)
-#define G_FW_VI_CMD_VIID(x) (((x) >> S_FW_VI_CMD_VIID) & M_FW_VI_CMD_VIID)
-
-#define S_FW_VI_CMD_PORTID 4
-#define M_FW_VI_CMD_PORTID 0xf
-#define V_FW_VI_CMD_PORTID(x) ((x) << S_FW_VI_CMD_PORTID)
-#define G_FW_VI_CMD_PORTID(x) \
- (((x) >> S_FW_VI_CMD_PORTID) & M_FW_VI_CMD_PORTID)
-
-#define S_FW_VI_CMD_RSSSIZE 0
-#define M_FW_VI_CMD_RSSSIZE 0x7ff
-#define V_FW_VI_CMD_RSSSIZE(x) ((x) << S_FW_VI_CMD_RSSSIZE)
-#define G_FW_VI_CMD_RSSSIZE(x) \
- (((x) >> S_FW_VI_CMD_RSSSIZE) & M_FW_VI_CMD_RSSSIZE)
-
-#define S_FW_VI_CMD_IDSIIQ 0
-#define M_FW_VI_CMD_IDSIIQ 0x3ff
-#define V_FW_VI_CMD_IDSIIQ(x) ((x) << S_FW_VI_CMD_IDSIIQ)
-#define G_FW_VI_CMD_IDSIIQ(x) \
- (((x) >> S_FW_VI_CMD_IDSIIQ) & M_FW_VI_CMD_IDSIIQ)
-
-#define S_FW_VI_CMD_IDSEIQ 0
-#define M_FW_VI_CMD_IDSEIQ 0x3ff
-#define V_FW_VI_CMD_IDSEIQ(x) ((x) << S_FW_VI_CMD_IDSEIQ)
-#define G_FW_VI_CMD_IDSEIQ(x) \
- (((x) >> S_FW_VI_CMD_IDSEIQ) & M_FW_VI_CMD_IDSEIQ)
-
-/* Special VI_MAC command index ids */
-#define FW_VI_MAC_ADD_MAC 0x3FF
-#define FW_VI_MAC_ADD_PERSIST_MAC 0x3FE
-#define FW_VI_MAC_MAC_BASED_FREE 0x3FD
-#define FW_CLS_TCAM_NUM_ENTRIES 336
-
-enum fw_vi_mac_smac {
- FW_VI_MAC_MPS_TCAM_ENTRY,
- FW_VI_MAC_MPS_TCAM_ONLY,
- FW_VI_MAC_SMT_ONLY,
- FW_VI_MAC_SMT_AND_MPSTCAM
-};
-
-enum fw_vi_mac_result {
- FW_VI_MAC_R_SUCCESS,
- FW_VI_MAC_R_F_NONEXISTENT_NOMEM,
- FW_VI_MAC_R_SMAC_FAIL,
- FW_VI_MAC_R_F_ACL_CHECK
-};
-
-struct fw_vi_mac_cmd {
- __be32 op_to_viid;
- __be32 freemacs_to_len16;
- union fw_vi_mac {
- struct fw_vi_mac_exact {
- __be16 valid_to_idx;
- __u8 macaddr[6];
- } exact[7];
- struct fw_vi_mac_hash {
- __be64 hashvec;
- } hash;
- } u;
-};
-
-#define S_FW_VI_MAC_CMD_VIID 0
-#define M_FW_VI_MAC_CMD_VIID 0xfff
-#define V_FW_VI_MAC_CMD_VIID(x) ((x) << S_FW_VI_MAC_CMD_VIID)
-#define G_FW_VI_MAC_CMD_VIID(x) \
- (((x) >> S_FW_VI_MAC_CMD_VIID) & M_FW_VI_MAC_CMD_VIID)
-
-#define S_FW_VI_MAC_CMD_FREEMACS 31
-#define M_FW_VI_MAC_CMD_FREEMACS 0x1
-#define V_FW_VI_MAC_CMD_FREEMACS(x) ((x) << S_FW_VI_MAC_CMD_FREEMACS)
-#define G_FW_VI_MAC_CMD_FREEMACS(x) \
- (((x) >> S_FW_VI_MAC_CMD_FREEMACS) & M_FW_VI_MAC_CMD_FREEMACS)
-#define F_FW_VI_MAC_CMD_FREEMACS V_FW_VI_MAC_CMD_FREEMACS(1U)
-
-#define S_FW_VI_MAC_CMD_HASHVECEN 23
-#define M_FW_VI_MAC_CMD_HASHVECEN 0x1
-#define V_FW_VI_MAC_CMD_HASHVECEN(x) ((x) << S_FW_VI_MAC_CMD_HASHVECEN)
-#define G_FW_VI_MAC_CMD_HASHVECEN(x) \
- (((x) >> S_FW_VI_MAC_CMD_HASHVECEN) & M_FW_VI_MAC_CMD_HASHVECEN)
-#define F_FW_VI_MAC_CMD_HASHVECEN V_FW_VI_MAC_CMD_HASHVECEN(1U)
-
-#define S_FW_VI_MAC_CMD_HASHUNIEN 22
-#define M_FW_VI_MAC_CMD_HASHUNIEN 0x1
-#define V_FW_VI_MAC_CMD_HASHUNIEN(x) ((x) << S_FW_VI_MAC_CMD_HASHUNIEN)
-#define G_FW_VI_MAC_CMD_HASHUNIEN(x) \
- (((x) >> S_FW_VI_MAC_CMD_HASHUNIEN) & M_FW_VI_MAC_CMD_HASHUNIEN)
-#define F_FW_VI_MAC_CMD_HASHUNIEN V_FW_VI_MAC_CMD_HASHUNIEN(1U)
-
-#define S_FW_VI_MAC_CMD_VALID 15
-#define M_FW_VI_MAC_CMD_VALID 0x1
-#define V_FW_VI_MAC_CMD_VALID(x) ((x) << S_FW_VI_MAC_CMD_VALID)
-#define G_FW_VI_MAC_CMD_VALID(x) \
- (((x) >> S_FW_VI_MAC_CMD_VALID) & M_FW_VI_MAC_CMD_VALID)
-#define F_FW_VI_MAC_CMD_VALID V_FW_VI_MAC_CMD_VALID(1U)
-
-#define S_FW_VI_MAC_CMD_PRIO 12
-#define M_FW_VI_MAC_CMD_PRIO 0x7
-#define V_FW_VI_MAC_CMD_PRIO(x) ((x) << S_FW_VI_MAC_CMD_PRIO)
-#define G_FW_VI_MAC_CMD_PRIO(x) \
- (((x) >> S_FW_VI_MAC_CMD_PRIO) & M_FW_VI_MAC_CMD_PRIO)
-
-#define S_FW_VI_MAC_CMD_SMAC_RESULT 10
-#define M_FW_VI_MAC_CMD_SMAC_RESULT 0x3
-#define V_FW_VI_MAC_CMD_SMAC_RESULT(x) ((x) << S_FW_VI_MAC_CMD_SMAC_RESULT)
-#define G_FW_VI_MAC_CMD_SMAC_RESULT(x) \
- (((x) >> S_FW_VI_MAC_CMD_SMAC_RESULT) & M_FW_VI_MAC_CMD_SMAC_RESULT)
-
-#define S_FW_VI_MAC_CMD_IDX 0
-#define M_FW_VI_MAC_CMD_IDX 0x3ff
-#define V_FW_VI_MAC_CMD_IDX(x) ((x) << S_FW_VI_MAC_CMD_IDX)
-#define G_FW_VI_MAC_CMD_IDX(x) \
- (((x) >> S_FW_VI_MAC_CMD_IDX) & M_FW_VI_MAC_CMD_IDX)
-
-/* T4 max MTU supported */
-#define T4_MAX_MTU_SUPPORTED 9600
-#define FW_RXMODE_MTU_NO_CHG 65535
-
-struct fw_vi_rxmode_cmd {
- __be32 op_to_viid;
- __be32 retval_len16;
- __be32 mtu_to_vlanexen;
- __be32 r4_lo;
-};
-
-#define S_FW_VI_RXMODE_CMD_VIID 0
-#define M_FW_VI_RXMODE_CMD_VIID 0xfff
-#define V_FW_VI_RXMODE_CMD_VIID(x) ((x) << S_FW_VI_RXMODE_CMD_VIID)
-#define G_FW_VI_RXMODE_CMD_VIID(x) \
- (((x) >> S_FW_VI_RXMODE_CMD_VIID) & M_FW_VI_RXMODE_CMD_VIID)
-
-#define S_FW_VI_RXMODE_CMD_MTU 16
-#define M_FW_VI_RXMODE_CMD_MTU 0xffff
-#define V_FW_VI_RXMODE_CMD_MTU(x) ((x) << S_FW_VI_RXMODE_CMD_MTU)
-#define G_FW_VI_RXMODE_CMD_MTU(x) \
- (((x) >> S_FW_VI_RXMODE_CMD_MTU) & M_FW_VI_RXMODE_CMD_MTU)
-
-#define S_FW_VI_RXMODE_CMD_PROMISCEN 14
-#define M_FW_VI_RXMODE_CMD_PROMISCEN 0x3
-#define V_FW_VI_RXMODE_CMD_PROMISCEN(x) ((x) << S_FW_VI_RXMODE_CMD_PROMISCEN)
-#define G_FW_VI_RXMODE_CMD_PROMISCEN(x) \
- (((x) >> S_FW_VI_RXMODE_CMD_PROMISCEN) & M_FW_VI_RXMODE_CMD_PROMISCEN)
-
-#define S_FW_VI_RXMODE_CMD_ALLMULTIEN 12
-#define M_FW_VI_RXMODE_CMD_ALLMULTIEN 0x3
-#define V_FW_VI_RXMODE_CMD_ALLMULTIEN(x) \
- ((x) << S_FW_VI_RXMODE_CMD_ALLMULTIEN)
-#define G_FW_VI_RXMODE_CMD_ALLMULTIEN(x) \
- (((x) >> S_FW_VI_RXMODE_CMD_ALLMULTIEN) & M_FW_VI_RXMODE_CMD_ALLMULTIEN)
-
-#define S_FW_VI_RXMODE_CMD_BROADCASTEN 10
-#define M_FW_VI_RXMODE_CMD_BROADCASTEN 0x3
-#define V_FW_VI_RXMODE_CMD_BROADCASTEN(x) \
- ((x) << S_FW_VI_RXMODE_CMD_BROADCASTEN)
-#define G_FW_VI_RXMODE_CMD_BROADCASTEN(x) \
- (((x) >> S_FW_VI_RXMODE_CMD_BROADCASTEN) & M_FW_VI_RXMODE_CMD_BROADCASTEN)
-
-#define S_FW_VI_RXMODE_CMD_VLANEXEN 8
-#define M_FW_VI_RXMODE_CMD_VLANEXEN 0x3
-#define V_FW_VI_RXMODE_CMD_VLANEXEN(x) ((x) << S_FW_VI_RXMODE_CMD_VLANEXEN)
-#define G_FW_VI_RXMODE_CMD_VLANEXEN(x) \
- (((x) >> S_FW_VI_RXMODE_CMD_VLANEXEN) & M_FW_VI_RXMODE_CMD_VLANEXEN)
-
-struct fw_vi_enable_cmd {
- __be32 op_to_viid;
- __be32 ien_to_len16;
- __be16 blinkdur;
- __be16 r3;
- __be32 r4;
-};
-
-#define S_FW_VI_ENABLE_CMD_VIID 0
-#define M_FW_VI_ENABLE_CMD_VIID 0xfff
-#define V_FW_VI_ENABLE_CMD_VIID(x) ((x) << S_FW_VI_ENABLE_CMD_VIID)
-#define G_FW_VI_ENABLE_CMD_VIID(x) \
- (((x) >> S_FW_VI_ENABLE_CMD_VIID) & M_FW_VI_ENABLE_CMD_VIID)
-
-#define S_FW_VI_ENABLE_CMD_IEN 31
-#define M_FW_VI_ENABLE_CMD_IEN 0x1
-#define V_FW_VI_ENABLE_CMD_IEN(x) ((x) << S_FW_VI_ENABLE_CMD_IEN)
-#define G_FW_VI_ENABLE_CMD_IEN(x) \
- (((x) >> S_FW_VI_ENABLE_CMD_IEN) & M_FW_VI_ENABLE_CMD_IEN)
-#define F_FW_VI_ENABLE_CMD_IEN V_FW_VI_ENABLE_CMD_IEN(1U)
-
-#define S_FW_VI_ENABLE_CMD_EEN 30
-#define M_FW_VI_ENABLE_CMD_EEN 0x1
-#define V_FW_VI_ENABLE_CMD_EEN(x) ((x) << S_FW_VI_ENABLE_CMD_EEN)
-#define G_FW_VI_ENABLE_CMD_EEN(x) \
- (((x) >> S_FW_VI_ENABLE_CMD_EEN) & M_FW_VI_ENABLE_CMD_EEN)
-#define F_FW_VI_ENABLE_CMD_EEN V_FW_VI_ENABLE_CMD_EEN(1U)
-
-#define S_FW_VI_ENABLE_CMD_LED 29
-#define M_FW_VI_ENABLE_CMD_LED 0x1
-#define V_FW_VI_ENABLE_CMD_LED(x) ((x) << S_FW_VI_ENABLE_CMD_LED)
-#define G_FW_VI_ENABLE_CMD_LED(x) \
- (((x) >> S_FW_VI_ENABLE_CMD_LED) & M_FW_VI_ENABLE_CMD_LED)
-#define F_FW_VI_ENABLE_CMD_LED V_FW_VI_ENABLE_CMD_LED(1U)
-
-/* VI VF stats offset definitions */
-#define VI_VF_NUM_STATS 16
-enum fw_vi_stats_vf_index {
- FW_VI_VF_STAT_TX_BCAST_BYTES_IX,
- FW_VI_VF_STAT_TX_BCAST_FRAMES_IX,
- FW_VI_VF_STAT_TX_MCAST_BYTES_IX,
- FW_VI_VF_STAT_TX_MCAST_FRAMES_IX,
- FW_VI_VF_STAT_TX_UCAST_BYTES_IX,
- FW_VI_VF_STAT_TX_UCAST_FRAMES_IX,
- FW_VI_VF_STAT_TX_DROP_FRAMES_IX,
- FW_VI_VF_STAT_TX_OFLD_BYTES_IX,
- FW_VI_VF_STAT_TX_OFLD_FRAMES_IX,
- FW_VI_VF_STAT_RX_BCAST_BYTES_IX,
- FW_VI_VF_STAT_RX_BCAST_FRAMES_IX,
- FW_VI_VF_STAT_RX_MCAST_BYTES_IX,
- FW_VI_VF_STAT_RX_MCAST_FRAMES_IX,
- FW_VI_VF_STAT_RX_UCAST_BYTES_IX,
- FW_VI_VF_STAT_RX_UCAST_FRAMES_IX,
- FW_VI_VF_STAT_RX_ERR_FRAMES_IX
-};
-
-/* VI PF stats offset definitions */
-#define VI_PF_NUM_STATS 17
-enum fw_vi_stats_pf_index {
- FW_VI_PF_STAT_TX_BCAST_BYTES_IX,
- FW_VI_PF_STAT_TX_BCAST_FRAMES_IX,
- FW_VI_PF_STAT_TX_MCAST_BYTES_IX,
- FW_VI_PF_STAT_TX_MCAST_FRAMES_IX,
- FW_VI_PF_STAT_TX_UCAST_BYTES_IX,
- FW_VI_PF_STAT_TX_UCAST_FRAMES_IX,
- FW_VI_PF_STAT_TX_OFLD_BYTES_IX,
- FW_VI_PF_STAT_TX_OFLD_FRAMES_IX,
- FW_VI_PF_STAT_RX_BYTES_IX,
- FW_VI_PF_STAT_RX_FRAMES_IX,
- FW_VI_PF_STAT_RX_BCAST_BYTES_IX,
- FW_VI_PF_STAT_RX_BCAST_FRAMES_IX,
- FW_VI_PF_STAT_RX_MCAST_BYTES_IX,
- FW_VI_PF_STAT_RX_MCAST_FRAMES_IX,
- FW_VI_PF_STAT_RX_UCAST_BYTES_IX,
- FW_VI_PF_STAT_RX_UCAST_FRAMES_IX,
- FW_VI_PF_STAT_RX_ERR_FRAMES_IX
-};
-
-struct fw_vi_stats_cmd {
- __be32 op_to_viid;
- __be32 retval_len16;
- union fw_vi_stats {
- struct fw_vi_stats_ctl {
- __be16 nstats_ix;
- __be16 r6;
- __be32 r7;
- __be64 stat0;
- __be64 stat1;
- __be64 stat2;
- __be64 stat3;
- __be64 stat4;
- __be64 stat5;
- } ctl;
- struct fw_vi_stats_pf {
- __be64 tx_bcast_bytes;
- __be64 tx_bcast_frames;
- __be64 tx_mcast_bytes;
- __be64 tx_mcast_frames;
- __be64 tx_ucast_bytes;
- __be64 tx_ucast_frames;
- __be64 tx_offload_bytes;
- __be64 tx_offload_frames;
- __be64 rx_pf_bytes;
- __be64 rx_pf_frames;
- __be64 rx_bcast_bytes;
- __be64 rx_bcast_frames;
- __be64 rx_mcast_bytes;
- __be64 rx_mcast_frames;
- __be64 rx_ucast_bytes;
- __be64 rx_ucast_frames;
- __be64 rx_err_frames;
- } pf;
- struct fw_vi_stats_vf {
- __be64 tx_bcast_bytes;
- __be64 tx_bcast_frames;
- __be64 tx_mcast_bytes;
- __be64 tx_mcast_frames;
- __be64 tx_ucast_bytes;
- __be64 tx_ucast_frames;
- __be64 tx_drop_frames;
- __be64 tx_offload_bytes;
- __be64 tx_offload_frames;
- __be64 rx_bcast_bytes;
- __be64 rx_bcast_frames;
- __be64 rx_mcast_bytes;
- __be64 rx_mcast_frames;
- __be64 rx_ucast_bytes;
- __be64 rx_ucast_frames;
- __be64 rx_err_frames;
- } vf;
- } u;
-};
-
-#define S_FW_VI_STATS_CMD_VIID 0
-#define M_FW_VI_STATS_CMD_VIID 0xfff
-#define V_FW_VI_STATS_CMD_VIID(x) ((x) << S_FW_VI_STATS_CMD_VIID)
-#define G_FW_VI_STATS_CMD_VIID(x) \
- (((x) >> S_FW_VI_STATS_CMD_VIID) & M_FW_VI_STATS_CMD_VIID)
-
-#define S_FW_VI_STATS_CMD_NSTATS 12
-#define M_FW_VI_STATS_CMD_NSTATS 0x7
-#define V_FW_VI_STATS_CMD_NSTATS(x) ((x) << S_FW_VI_STATS_CMD_NSTATS)
-#define G_FW_VI_STATS_CMD_NSTATS(x) \
- (((x) >> S_FW_VI_STATS_CMD_NSTATS) & M_FW_VI_STATS_CMD_NSTATS)
-
-#define S_FW_VI_STATS_CMD_IX 0
-#define M_FW_VI_STATS_CMD_IX 0x1f
-#define V_FW_VI_STATS_CMD_IX(x) ((x) << S_FW_VI_STATS_CMD_IX)
-#define G_FW_VI_STATS_CMD_IX(x) \
- (((x) >> S_FW_VI_STATS_CMD_IX) & M_FW_VI_STATS_CMD_IX)
-
-struct fw_acl_mac_cmd {
- __be32 op_to_vfn;
- __be32 en_to_len16;
- __u8 nmac;
- __u8 r3[7];
- __be16 r4;
- __u8 macaddr0[6];
- __be16 r5;
- __u8 macaddr1[6];
- __be16 r6;
- __u8 macaddr2[6];
- __be16 r7;
- __u8 macaddr3[6];
-};
-
-#define S_FW_ACL_MAC_CMD_PFN 8
-#define M_FW_ACL_MAC_CMD_PFN 0x7
-#define V_FW_ACL_MAC_CMD_PFN(x) ((x) << S_FW_ACL_MAC_CMD_PFN)
-#define G_FW_ACL_MAC_CMD_PFN(x) \
- (((x) >> S_FW_ACL_MAC_CMD_PFN) & M_FW_ACL_MAC_CMD_PFN)
-
-#define S_FW_ACL_MAC_CMD_VFN 0
-#define M_FW_ACL_MAC_CMD_VFN 0xff
-#define V_FW_ACL_MAC_CMD_VFN(x) ((x) << S_FW_ACL_MAC_CMD_VFN)
-#define G_FW_ACL_MAC_CMD_VFN(x) \
- (((x) >> S_FW_ACL_MAC_CMD_VFN) & M_FW_ACL_MAC_CMD_VFN)
-
-#define S_FW_ACL_MAC_CMD_EN 31
-#define M_FW_ACL_MAC_CMD_EN 0x1
-#define V_FW_ACL_MAC_CMD_EN(x) ((x) << S_FW_ACL_MAC_CMD_EN)
-#define G_FW_ACL_MAC_CMD_EN(x) \
- (((x) >> S_FW_ACL_MAC_CMD_EN) & M_FW_ACL_MAC_CMD_EN)
-#define F_FW_ACL_MAC_CMD_EN V_FW_ACL_MAC_CMD_EN(1U)
-
-struct fw_acl_vlan_cmd {
- __be32 op_to_vfn;
- __be32 en_to_len16;
- __u8 nvlan;
- __u8 dropnovlan_fm;
- __u8 r3_lo[6];
- __be16 vlanid[16];
-};
-
-#define S_FW_ACL_VLAN_CMD_PFN 8
-#define M_FW_ACL_VLAN_CMD_PFN 0x7
-#define V_FW_ACL_VLAN_CMD_PFN(x) ((x) << S_FW_ACL_VLAN_CMD_PFN)
-#define G_FW_ACL_VLAN_CMD_PFN(x) \
- (((x) >> S_FW_ACL_VLAN_CMD_PFN) & M_FW_ACL_VLAN_CMD_PFN)
-
-#define S_FW_ACL_VLAN_CMD_VFN 0
-#define M_FW_ACL_VLAN_CMD_VFN 0xff
-#define V_FW_ACL_VLAN_CMD_VFN(x) ((x) << S_FW_ACL_VLAN_CMD_VFN)
-#define G_FW_ACL_VLAN_CMD_VFN(x) \
- (((x) >> S_FW_ACL_VLAN_CMD_VFN) & M_FW_ACL_VLAN_CMD_VFN)
-
-#define S_FW_ACL_VLAN_CMD_EN 31
-#define M_FW_ACL_VLAN_CMD_EN 0x1
-#define V_FW_ACL_VLAN_CMD_EN(x) ((x) << S_FW_ACL_VLAN_CMD_EN)
-#define G_FW_ACL_VLAN_CMD_EN(x) \
- (((x) >> S_FW_ACL_VLAN_CMD_EN) & M_FW_ACL_VLAN_CMD_EN)
-#define F_FW_ACL_VLAN_CMD_EN V_FW_ACL_VLAN_CMD_EN(1U)
-
-#define S_FW_ACL_VLAN_CMD_DROPNOVLAN 7
-#define M_FW_ACL_VLAN_CMD_DROPNOVLAN 0x1
-#define V_FW_ACL_VLAN_CMD_DROPNOVLAN(x) ((x) << S_FW_ACL_VLAN_CMD_DROPNOVLAN)
-#define G_FW_ACL_VLAN_CMD_DROPNOVLAN(x) \
- (((x) >> S_FW_ACL_VLAN_CMD_DROPNOVLAN) & M_FW_ACL_VLAN_CMD_DROPNOVLAN)
-#define F_FW_ACL_VLAN_CMD_DROPNOVLAN V_FW_ACL_VLAN_CMD_DROPNOVLAN(1U)
-
-#define S_FW_ACL_VLAN_CMD_FM 6
-#define M_FW_ACL_VLAN_CMD_FM 0x1
-#define V_FW_ACL_VLAN_CMD_FM(x) ((x) << S_FW_ACL_VLAN_CMD_FM)
-#define G_FW_ACL_VLAN_CMD_FM(x) \
- (((x) >> S_FW_ACL_VLAN_CMD_FM) & M_FW_ACL_VLAN_CMD_FM)
-#define F_FW_ACL_VLAN_CMD_FM V_FW_ACL_VLAN_CMD_FM(1U)
-
-/* port capabilities bitmap */
-enum fw_port_cap {
- FW_PORT_CAP_SPEED_100M = 0x0001,
- FW_PORT_CAP_SPEED_1G = 0x0002,
- FW_PORT_CAP_SPEED_2_5G = 0x0004,
- FW_PORT_CAP_SPEED_10G = 0x0008,
- FW_PORT_CAP_SPEED_40G = 0x0010,
- FW_PORT_CAP_SPEED_100G = 0x0020,
- FW_PORT_CAP_FC_RX = 0x0040,
- FW_PORT_CAP_FC_TX = 0x0080,
- FW_PORT_CAP_ANEG = 0x0100,
- FW_PORT_CAP_MDIX = 0x0200,
- FW_PORT_CAP_MDIAUTO = 0x0400,
- FW_PORT_CAP_FEC = 0x0800,
- FW_PORT_CAP_TECHKR = 0x1000,
- FW_PORT_CAP_TECHKX4 = 0x2000,
-};
-
-#define S_FW_PORT_AUXLINFO_MDI 3
-#define M_FW_PORT_AUXLINFO_MDI 0x3
-#define V_FW_PORT_AUXLINFO_MDI(x) ((x) << S_FW_PORT_AUXLINFO_MDI)
-#define G_FW_PORT_AUXLINFO_MDI(x) \
- (((x) >> S_FW_PORT_AUXLINFO_MDI) & M_FW_PORT_AUXLINFO_MDI)
-
-#define S_FW_PORT_AUXLINFO_KX4 2
-#define M_FW_PORT_AUXLINFO_KX4 0x1
-#define V_FW_PORT_AUXLINFO_KX4(x) ((x) << S_FW_PORT_AUXLINFO_KX4)
-#define G_FW_PORT_AUXLINFO_KX4(x) \
- (((x) >> S_FW_PORT_AUXLINFO_KX4) & M_FW_PORT_AUXLINFO_KX4)
-#define F_FW_PORT_AUXLINFO_KX4 V_FW_PORT_AUXLINFO_KX4(1U)
-
-#define S_FW_PORT_AUXLINFO_KR 1
-#define M_FW_PORT_AUXLINFO_KR 0x1
-#define V_FW_PORT_AUXLINFO_KR(x) ((x) << S_FW_PORT_AUXLINFO_KR)
-#define G_FW_PORT_AUXLINFO_KR(x) \
- (((x) >> S_FW_PORT_AUXLINFO_KR) & M_FW_PORT_AUXLINFO_KR)
-#define F_FW_PORT_AUXLINFO_KR V_FW_PORT_AUXLINFO_KR(1U)
-
-#define S_FW_PORT_AUXLINFO_FEC 0
-#define M_FW_PORT_AUXLINFO_FEC 0x1
-#define V_FW_PORT_AUXLINFO_FEC(x) ((x) << S_FW_PORT_AUXLINFO_FEC)
-#define G_FW_PORT_AUXLINFO_FEC(x) \
- (((x) >> S_FW_PORT_AUXLINFO_FEC) & M_FW_PORT_AUXLINFO_FEC)
-#define F_FW_PORT_AUXLINFO_FEC V_FW_PORT_AUXLINFO_FEC(1U)
-
-#define S_FW_PORT_RCAP_AUX 11
-#define M_FW_PORT_RCAP_AUX 0x7
-#define V_FW_PORT_RCAP_AUX(x) ((x) << S_FW_PORT_RCAP_AUX)
-#define G_FW_PORT_RCAP_AUX(x) \
- (((x) >> S_FW_PORT_RCAP_AUX) & M_FW_PORT_RCAP_AUX)
-
-#define S_FW_PORT_CAP_SPEED 0
-#define M_FW_PORT_CAP_SPEED 0x3f
-#define V_FW_PORT_CAP_SPEED(x) ((x) << S_FW_PORT_CAP_SPEED)
-#define G_FW_PORT_CAP_SPEED(x) \
- (((x) >> S_FW_PORT_CAP_SPEED) & M_FW_PORT_CAP_SPEED)
-
-#define S_FW_PORT_CAP_FC 6
-#define M_FW_PORT_CAP_FC 0x3
-#define V_FW_PORT_CAP_FC(x) ((x) << S_FW_PORT_CAP_FC)
-#define G_FW_PORT_CAP_FC(x) \
- (((x) >> S_FW_PORT_CAP_FC) & M_FW_PORT_CAP_FC)
-
-#define S_FW_PORT_CAP_ANEG 8
-#define M_FW_PORT_CAP_ANEG 0x1
-#define V_FW_PORT_CAP_ANEG(x) ((x) << S_FW_PORT_CAP_ANEG)
-#define G_FW_PORT_CAP_ANEG(x) \
- (((x) >> S_FW_PORT_CAP_ANEG) & M_FW_PORT_CAP_ANEG)
-
-enum fw_port_mdi {
- FW_PORT_CAP_MDI_UNCHANGED,
- FW_PORT_CAP_MDI_AUTO,
- FW_PORT_CAP_MDI_F_STRAIGHT,
- FW_PORT_CAP_MDI_F_CROSSOVER
-};
-
-#define S_FW_PORT_CAP_MDI 9
-#define M_FW_PORT_CAP_MDI 3
-#define V_FW_PORT_CAP_MDI(x) ((x) << S_FW_PORT_CAP_MDI)
-#define G_FW_PORT_CAP_MDI(x) (((x) >> S_FW_PORT_CAP_MDI) & M_FW_PORT_CAP_MDI)
-
-enum fw_port_action {
- FW_PORT_ACTION_L1_CFG = 0x0001,
- FW_PORT_ACTION_L2_CFG = 0x0002,
- FW_PORT_ACTION_GET_PORT_INFO = 0x0003,
- FW_PORT_ACTION_L2_PPP_CFG = 0x0004,
- FW_PORT_ACTION_L2_DCB_CFG = 0x0005,
- FW_PORT_ACTION_LOW_PWR_TO_NORMAL = 0x0010,
- FW_PORT_ACTION_L1_LOW_PWR_EN = 0x0011,
- FW_PORT_ACTION_L2_WOL_MODE_EN = 0x0012,
- FW_PORT_ACTION_LPBK_TO_NORMAL = 0x0020,
- FW_PORT_ACTION_L1_SS_LPBK_ASIC = 0x0021,
- FW_PORT_ACTION_L1_WS_LPBK_ASIC = 0x0023,
- FW_PORT_ACTION_L1_EXT_LPBK = 0x0026,
- FW_PORT_ACTION_PHY_RESET = 0x0040,
- FW_PORT_ACTION_PMA_RESET = 0x0041,
- FW_PORT_ACTION_PCS_RESET = 0x0042,
- FW_PORT_ACTION_PHYXS_RESET = 0x0043,
- FW_PORT_ACTION_DTEXS_REEST = 0x0044,
- FW_PORT_ACTION_AN_RESET = 0x0045
-};
-
-enum fw_port_l2cfg_ctlbf {
- FW_PORT_L2_CTLBF_OVLAN0 = 0x01,
- FW_PORT_L2_CTLBF_OVLAN1 = 0x02,
- FW_PORT_L2_CTLBF_OVLAN2 = 0x04,
- FW_PORT_L2_CTLBF_OVLAN3 = 0x08,
- FW_PORT_L2_CTLBF_IVLAN = 0x10,
- FW_PORT_L2_CTLBF_TXIPG = 0x20,
- FW_PORT_L2_CTLBF_MTU = 0x40
-};
-
-enum fw_port_dcb_cfg {
- FW_PORT_DCB_CFG_PG = 0x01,
- FW_PORT_DCB_CFG_PFC = 0x02,
- FW_PORT_DCB_CFG_APPL = 0x04
-};
-
-enum fw_port_dcb_cfg_rc {
- FW_PORT_DCB_CFG_SUCCESS = 0x0,
- FW_PORT_DCB_CFG_ERROR = 0x1
-};
-
-enum fw_port_dcb_type {
- FW_PORT_DCB_TYPE_PGID = 0x00,
- FW_PORT_DCB_TYPE_PGRATE = 0x01,
- FW_PORT_DCB_TYPE_PRIORATE = 0x02,
- FW_PORT_DCB_TYPE_PFC = 0x03,
- FW_PORT_DCB_TYPE_APP_ID = 0x04,
-};
-
-struct fw_port_cmd {
- __be32 op_to_portid;
- __be32 action_to_len16;
- union fw_port {
- struct fw_port_l1cfg {
- __be32 rcap;
- __be32 r;
- } l1cfg;
- struct fw_port_l2cfg {
- __u8 ctlbf;
- __u8 ovlan3_to_ivlan0;
- __be16 ivlantype;
- __be16 txipg_force_pinfo;
- __be16 mtu;
- __be16 ovlan0mask;
- __be16 ovlan0type;
- __be16 ovlan1mask;
- __be16 ovlan1type;
- __be16 ovlan2mask;
- __be16 ovlan2type;
- __be16 ovlan3mask;
- __be16 ovlan3type;
- } l2cfg;
- struct fw_port_info {
- __be32 lstatus_to_modtype;
- __be16 pcap;
- __be16 acap;
- __be16 mtu;
- __u8 cbllen;
- __u8 auxlinfo;
- __be32 r8;
- __be64 r9;
- } info;
- union fw_port_dcb {
- struct fw_port_dcb_pgid {
- __u8 type;
- __u8 apply_pkd;
- __u8 r10_lo[2];
- __be32 pgid;
- __be64 r11;
- } pgid;
- struct fw_port_dcb_pgrate {
- __u8 type;
- __u8 apply_pkd;
- __u8 r10_lo[6];
- __u8 pgrate[8];
- } pgrate;
- struct fw_port_dcb_priorate {
- __u8 type;
- __u8 apply_pkd;
- __u8 r10_lo[6];
- __u8 strict_priorate[8];
- } priorate;
- struct fw_port_dcb_pfc {
- __u8 type;
- __u8 pfcen;
- __be16 r10[3];
- __be64 r11;
- } pfc;
- struct fw_port_app_priority {
- __u8 type;
- __u8 r10_lo[3];
- __u8 prio;
- __u8 sel;
- __be16 protocolid;
- __u8 r12[8];
- } app_priority;
- } dcb;
- } u;
-};
-
-#define S_FW_PORT_CMD_READ 22
-#define M_FW_PORT_CMD_READ 0x1
-#define V_FW_PORT_CMD_READ(x) ((x) << S_FW_PORT_CMD_READ)
-#define G_FW_PORT_CMD_READ(x) \
- (((x) >> S_FW_PORT_CMD_READ) & M_FW_PORT_CMD_READ)
-#define F_FW_PORT_CMD_READ V_FW_PORT_CMD_READ(1U)
-
-#define S_FW_PORT_CMD_PORTID 0
-#define M_FW_PORT_CMD_PORTID 0xf
-#define V_FW_PORT_CMD_PORTID(x) ((x) << S_FW_PORT_CMD_PORTID)
-#define G_FW_PORT_CMD_PORTID(x) \
- (((x) >> S_FW_PORT_CMD_PORTID) & M_FW_PORT_CMD_PORTID)
-
-#define S_FW_PORT_CMD_ACTION 16
-#define M_FW_PORT_CMD_ACTION 0xffff
-#define V_FW_PORT_CMD_ACTION(x) ((x) << S_FW_PORT_CMD_ACTION)
-#define G_FW_PORT_CMD_ACTION(x) \
- (((x) >> S_FW_PORT_CMD_ACTION) & M_FW_PORT_CMD_ACTION)
-
-#define S_FW_PORT_CMD_OVLAN3 7
-#define M_FW_PORT_CMD_OVLAN3 0x1
-#define V_FW_PORT_CMD_OVLAN3(x) ((x) << S_FW_PORT_CMD_OVLAN3)
-#define G_FW_PORT_CMD_OVLAN3(x) \
- (((x) >> S_FW_PORT_CMD_OVLAN3) & M_FW_PORT_CMD_OVLAN3)
-#define F_FW_PORT_CMD_OVLAN3 V_FW_PORT_CMD_OVLAN3(1U)
-
-#define S_FW_PORT_CMD_OVLAN2 6
-#define M_FW_PORT_CMD_OVLAN2 0x1
-#define V_FW_PORT_CMD_OVLAN2(x) ((x) << S_FW_PORT_CMD_OVLAN2)
-#define G_FW_PORT_CMD_OVLAN2(x) \
- (((x) >> S_FW_PORT_CMD_OVLAN2) & M_FW_PORT_CMD_OVLAN2)
-#define F_FW_PORT_CMD_OVLAN2 V_FW_PORT_CMD_OVLAN2(1U)
-
-#define S_FW_PORT_CMD_OVLAN1 5
-#define M_FW_PORT_CMD_OVLAN1 0x1
-#define V_FW_PORT_CMD_OVLAN1(x) ((x) << S_FW_PORT_CMD_OVLAN1)
-#define G_FW_PORT_CMD_OVLAN1(x) \
- (((x) >> S_FW_PORT_CMD_OVLAN1) & M_FW_PORT_CMD_OVLAN1)
-#define F_FW_PORT_CMD_OVLAN1 V_FW_PORT_CMD_OVLAN1(1U)
-
-#define S_FW_PORT_CMD_OVLAN0 4
-#define M_FW_PORT_CMD_OVLAN0 0x1
-#define V_FW_PORT_CMD_OVLAN0(x) ((x) << S_FW_PORT_CMD_OVLAN0)
-#define G_FW_PORT_CMD_OVLAN0(x) \
- (((x) >> S_FW_PORT_CMD_OVLAN0) & M_FW_PORT_CMD_OVLAN0)
-#define F_FW_PORT_CMD_OVLAN0 V_FW_PORT_CMD_OVLAN0(1U)
-
-#define S_FW_PORT_CMD_IVLAN0 3
-#define M_FW_PORT_CMD_IVLAN0 0x1
-#define V_FW_PORT_CMD_IVLAN0(x) ((x) << S_FW_PORT_CMD_IVLAN0)
-#define G_FW_PORT_CMD_IVLAN0(x) \
- (((x) >> S_FW_PORT_CMD_IVLAN0) & M_FW_PORT_CMD_IVLAN0)
-#define F_FW_PORT_CMD_IVLAN0 V_FW_PORT_CMD_IVLAN0(1U)
-
-#define S_FW_PORT_CMD_TXIPG 3
-#define M_FW_PORT_CMD_TXIPG 0x1fff
-#define V_FW_PORT_CMD_TXIPG(x) ((x) << S_FW_PORT_CMD_TXIPG)
-#define G_FW_PORT_CMD_TXIPG(x) \
- (((x) >> S_FW_PORT_CMD_TXIPG) & M_FW_PORT_CMD_TXIPG)
-
-#define S_FW_PORT_CMD_FORCE_PINFO 0
-#define M_FW_PORT_CMD_FORCE_PINFO 0x1
-#define V_FW_PORT_CMD_FORCE_PINFO(x) ((x) << S_FW_PORT_CMD_FORCE_PINFO)
-#define G_FW_PORT_CMD_FORCE_PINFO(x) \
- (((x) >> S_FW_PORT_CMD_FORCE_PINFO) & M_FW_PORT_CMD_FORCE_PINFO)
-#define F_FW_PORT_CMD_FORCE_PINFO V_FW_PORT_CMD_FORCE_PINFO(1U)
-
-#define S_FW_PORT_CMD_LSTATUS 31
-#define M_FW_PORT_CMD_LSTATUS 0x1
-#define V_FW_PORT_CMD_LSTATUS(x) ((x) << S_FW_PORT_CMD_LSTATUS)
-#define G_FW_PORT_CMD_LSTATUS(x) \
- (((x) >> S_FW_PORT_CMD_LSTATUS) & M_FW_PORT_CMD_LSTATUS)
-#define F_FW_PORT_CMD_LSTATUS V_FW_PORT_CMD_LSTATUS(1U)
-
-#define S_FW_PORT_CMD_LSPEED 24
-#define M_FW_PORT_CMD_LSPEED 0x3f
-#define V_FW_PORT_CMD_LSPEED(x) ((x) << S_FW_PORT_CMD_LSPEED)
-#define G_FW_PORT_CMD_LSPEED(x) \
- (((x) >> S_FW_PORT_CMD_LSPEED) & M_FW_PORT_CMD_LSPEED)
-
-#define S_FW_PORT_CMD_TXPAUSE 23
-#define M_FW_PORT_CMD_TXPAUSE 0x1
-#define V_FW_PORT_CMD_TXPAUSE(x) ((x) << S_FW_PORT_CMD_TXPAUSE)
-#define G_FW_PORT_CMD_TXPAUSE(x) \
- (((x) >> S_FW_PORT_CMD_TXPAUSE) & M_FW_PORT_CMD_TXPAUSE)
-#define F_FW_PORT_CMD_TXPAUSE V_FW_PORT_CMD_TXPAUSE(1U)
-
-#define S_FW_PORT_CMD_RXPAUSE 22
-#define M_FW_PORT_CMD_RXPAUSE 0x1
-#define V_FW_PORT_CMD_RXPAUSE(x) ((x) << S_FW_PORT_CMD_RXPAUSE)
-#define G_FW_PORT_CMD_RXPAUSE(x) \
- (((x) >> S_FW_PORT_CMD_RXPAUSE) & M_FW_PORT_CMD_RXPAUSE)
-#define F_FW_PORT_CMD_RXPAUSE V_FW_PORT_CMD_RXPAUSE(1U)
-
-#define S_FW_PORT_CMD_MDIOCAP 21
-#define M_FW_PORT_CMD_MDIOCAP 0x1
-#define V_FW_PORT_CMD_MDIOCAP(x) ((x) << S_FW_PORT_CMD_MDIOCAP)
-#define G_FW_PORT_CMD_MDIOCAP(x) \
- (((x) >> S_FW_PORT_CMD_MDIOCAP) & M_FW_PORT_CMD_MDIOCAP)
-#define F_FW_PORT_CMD_MDIOCAP V_FW_PORT_CMD_MDIOCAP(1U)
-
-#define S_FW_PORT_CMD_MDIOADDR 16
-#define M_FW_PORT_CMD_MDIOADDR 0x1f
-#define V_FW_PORT_CMD_MDIOADDR(x) ((x) << S_FW_PORT_CMD_MDIOADDR)
-#define G_FW_PORT_CMD_MDIOADDR(x) \
- (((x) >> S_FW_PORT_CMD_MDIOADDR) & M_FW_PORT_CMD_MDIOADDR)
-
-#define S_FW_PORT_CMD_LPTXPAUSE 15
-#define M_FW_PORT_CMD_LPTXPAUSE 0x1
-#define V_FW_PORT_CMD_LPTXPAUSE(x) ((x) << S_FW_PORT_CMD_LPTXPAUSE)
-#define G_FW_PORT_CMD_LPTXPAUSE(x) \
- (((x) >> S_FW_PORT_CMD_LPTXPAUSE) & M_FW_PORT_CMD_LPTXPAUSE)
-#define F_FW_PORT_CMD_LPTXPAUSE V_FW_PORT_CMD_LPTXPAUSE(1U)
-
-#define S_FW_PORT_CMD_LPRXPAUSE 14
-#define M_FW_PORT_CMD_LPRXPAUSE 0x1
-#define V_FW_PORT_CMD_LPRXPAUSE(x) ((x) << S_FW_PORT_CMD_LPRXPAUSE)
-#define G_FW_PORT_CMD_LPRXPAUSE(x) \
- (((x) >> S_FW_PORT_CMD_LPRXPAUSE) & M_FW_PORT_CMD_LPRXPAUSE)
-#define F_FW_PORT_CMD_LPRXPAUSE V_FW_PORT_CMD_LPRXPAUSE(1U)
-
-#define S_FW_PORT_CMD_PTYPE 8
-#define M_FW_PORT_CMD_PTYPE 0x1f
-#define V_FW_PORT_CMD_PTYPE(x) ((x) << S_FW_PORT_CMD_PTYPE)
-#define G_FW_PORT_CMD_PTYPE(x) \
- (((x) >> S_FW_PORT_CMD_PTYPE) & M_FW_PORT_CMD_PTYPE)
-
-#define S_FW_PORT_CMD_LINKDNRC 5
-#define M_FW_PORT_CMD_LINKDNRC 0x7
-#define V_FW_PORT_CMD_LINKDNRC(x) ((x) << S_FW_PORT_CMD_LINKDNRC)
-#define G_FW_PORT_CMD_LINKDNRC(x) \
- (((x) >> S_FW_PORT_CMD_LINKDNRC) & M_FW_PORT_CMD_LINKDNRC)
-
-#define S_FW_PORT_CMD_MODTYPE 0
-#define M_FW_PORT_CMD_MODTYPE 0x1f
-#define V_FW_PORT_CMD_MODTYPE(x) ((x) << S_FW_PORT_CMD_MODTYPE)
-#define G_FW_PORT_CMD_MODTYPE(x) \
- (((x) >> S_FW_PORT_CMD_MODTYPE) & M_FW_PORT_CMD_MODTYPE)
-
-#define S_FW_PORT_CMD_APPLY 7
-#define M_FW_PORT_CMD_APPLY 0x1
-#define V_FW_PORT_CMD_APPLY(x) ((x) << S_FW_PORT_CMD_APPLY)
-#define G_FW_PORT_CMD_APPLY(x) \
- (((x) >> S_FW_PORT_CMD_APPLY) & M_FW_PORT_CMD_APPLY)
-#define F_FW_PORT_CMD_APPLY V_FW_PORT_CMD_APPLY(1U)
-
-#define S_FW_PORT_CMD_APPLY 7
-#define M_FW_PORT_CMD_APPLY 0x1
-#define V_FW_PORT_CMD_APPLY(x) ((x) << S_FW_PORT_CMD_APPLY)
-#define G_FW_PORT_CMD_APPLY(x) \
- (((x) >> S_FW_PORT_CMD_APPLY) & M_FW_PORT_CMD_APPLY)
-#define F_FW_PORT_CMD_APPLY V_FW_PORT_CMD_APPLY(1U)
-
-#define S_FW_PORT_CMD_APPLY 7
-#define M_FW_PORT_CMD_APPLY 0x1
-#define V_FW_PORT_CMD_APPLY(x) ((x) << S_FW_PORT_CMD_APPLY)
-#define G_FW_PORT_CMD_APPLY(x) \
- (((x) >> S_FW_PORT_CMD_APPLY) & M_FW_PORT_CMD_APPLY)
-#define F_FW_PORT_CMD_APPLY V_FW_PORT_CMD_APPLY(1U)
-
-/*
- * These are configured into the VPD and hence tools that generate
- * VPD may use this enumeration.
- * extPHY #lanes T4_I2C extI2C BP_Eq BP_ANEG Speed
- */
-enum fw_port_type {
- FW_PORT_TYPE_FIBER_XFI = 0, /* Y, 1, N, Y, N, N, 10G */
- FW_PORT_TYPE_FIBER_XAUI = 1, /* Y, 4, N, Y, N, N, 10G */
- FW_PORT_TYPE_BT_SGMII = 2, /* Y, 1, No, No, No, No, 1G/100M */
- FW_PORT_TYPE_BT_XFI = 3, /* Y, 1, No, No, No, No, 10G */
- FW_PORT_TYPE_BT_XAUI = 4, /* Y, 4, No, No, No, No, 10G/1G/100M? */
- FW_PORT_TYPE_KX4 = 5, /* No, 4, No, No, Yes, Yes, 10G */
- FW_PORT_TYPE_CX4 = 6, /* No, 4, No, No, No, No, 10G */
- FW_PORT_TYPE_KX = 7, /* No, 1, No, No, Yes, No, 1G */
- FW_PORT_TYPE_KR = 8, /* No, 1, No, No, Yes, Yes, 10G */
- FW_PORT_TYPE_SFP = 9, /* No, 1, Yes, No, No, No, 10G */
- FW_PORT_TYPE_BP_AP = 10, /* No, 1, No, No, Yes, Yes, 10G, BP ANGE */
- FW_PORT_TYPE_BP4_AP = 11, /* No, 4, No, No, Yes, Yes, 10G, BP ANGE */
-
- FW_PORT_TYPE_NONE = M_FW_PORT_CMD_PTYPE
-};
-
-/* These are read from module's EEPROM and determined once the
- module is inserted. */
-enum fw_port_module_type {
- FW_PORT_MOD_TYPE_NA = 0x0,
- FW_PORT_MOD_TYPE_LR = 0x1,
- FW_PORT_MOD_TYPE_SR = 0x2,
- FW_PORT_MOD_TYPE_ER = 0x3,
- FW_PORT_MOD_TYPE_TWINAX_PASSIVE = 0x4,
- FW_PORT_MOD_TYPE_TWINAX_ACTIVE = 0x5,
- FW_PORT_MOD_TYPE_LRM = 0x6,
- FW_PORT_MOD_TYPE_UNKNOWN = M_FW_PORT_CMD_MODTYPE - 2,
- FW_PORT_MOD_TYPE_NOTSUPPORTED = M_FW_PORT_CMD_MODTYPE - 1,
- FW_PORT_MOD_TYPE_NONE = M_FW_PORT_CMD_MODTYPE
-};
-
-/* used by FW and tools may use this to generate VPD */
-enum fw_port_mod_sub_type {
- FW_PORT_MOD_SUB_TYPE_NA,
- FW_PORT_MOD_SUB_TYPE_MV88E114X=0x1,
- FW_PORT_MOD_SUB_TYPE_BT_VSC8634=0x8,
-
- /*
- * The following will never been in the VPD. They are TWINAX cable
- * lengths decoded from SFP+ module i2c PROMs. These should almost
- * certainly go somewhere else ...
- */
- FW_PORT_MOD_SUB_TYPE_TWINAX_1=0x9,
- FW_PORT_MOD_SUB_TYPE_TWINAX_3=0xA,
- FW_PORT_MOD_SUB_TYPE_TWINAX_5=0xB,
- FW_PORT_MOD_SUB_TYPE_TWINAX_7=0xC,
-};
-
-/* link down reason codes (3b) */
-enum fw_port_link_dn_rc {
- FW_PORT_LINK_DN_RC_NONE,
- FW_PORT_LINK_DN_RC_REMFLT,
- FW_PORT_LINK_DN_ANEG_F,
- FW_PORT_LINK_DN_MS_RES_F,
- FW_PORT_LINK_DN_UNKNOWN
-};
-
-/* port stats */
-#define FW_NUM_PORT_STATS 50
-#define FW_NUM_PORT_TX_STATS 23
-#define FW_NUM_PORT_RX_STATS 27
-
-enum fw_port_stats_tx_index {
- FW_STAT_TX_PORT_BYTES_IX,
- FW_STAT_TX_PORT_FRAMES_IX,
- FW_STAT_TX_PORT_BCAST_IX,
- FW_STAT_TX_PORT_MCAST_IX,
- FW_STAT_TX_PORT_UCAST_IX,
- FW_STAT_TX_PORT_ERROR_IX,
- FW_STAT_TX_PORT_64B_IX,
- FW_STAT_TX_PORT_65B_127B_IX,
- FW_STAT_TX_PORT_128B_255B_IX,
- FW_STAT_TX_PORT_256B_511B_IX,
- FW_STAT_TX_PORT_512B_1023B_IX,
- FW_STAT_TX_PORT_1024B_1518B_IX,
- FW_STAT_TX_PORT_1519B_MAX_IX,
- FW_STAT_TX_PORT_DROP_IX,
- FW_STAT_TX_PORT_PAUSE_IX,
- FW_STAT_TX_PORT_PPP0_IX,
- FW_STAT_TX_PORT_PPP1_IX,
- FW_STAT_TX_PORT_PPP2_IX,
- FW_STAT_TX_PORT_PPP3_IX,
- FW_STAT_TX_PORT_PPP4_IX,
- FW_STAT_TX_PORT_PPP5_IX,
- FW_STAT_TX_PORT_PPP6_IX,
- FW_STAT_TX_PORT_PPP7_IX
-};
-
-enum fw_port_stat_rx_index {
- FW_STAT_RX_PORT_BYTES_IX,
- FW_STAT_RX_PORT_FRAMES_IX,
- FW_STAT_RX_PORT_BCAST_IX,
- FW_STAT_RX_PORT_MCAST_IX,
- FW_STAT_RX_PORT_UCAST_IX,
- FW_STAT_RX_PORT_MTU_ERROR_IX,
- FW_STAT_RX_PORT_MTU_CRC_ERROR_IX,
- FW_STAT_RX_PORT_CRC_ERROR_IX,
- FW_STAT_RX_PORT_LEN_ERROR_IX,
- FW_STAT_RX_PORT_SYM_ERROR_IX,
- FW_STAT_RX_PORT_64B_IX,
- FW_STAT_RX_PORT_65B_127B_IX,
- FW_STAT_RX_PORT_128B_255B_IX,
- FW_STAT_RX_PORT_256B_511B_IX,
- FW_STAT_RX_PORT_512B_1023B_IX,
- FW_STAT_RX_PORT_1024B_1518B_IX,
- FW_STAT_RX_PORT_1519B_MAX_IX,
- FW_STAT_RX_PORT_PAUSE_IX,
- FW_STAT_RX_PORT_PPP0_IX,
- FW_STAT_RX_PORT_PPP1_IX,
- FW_STAT_RX_PORT_PPP2_IX,
- FW_STAT_RX_PORT_PPP3_IX,
- FW_STAT_RX_PORT_PPP4_IX,
- FW_STAT_RX_PORT_PPP5_IX,
- FW_STAT_RX_PORT_PPP6_IX,
- FW_STAT_RX_PORT_PPP7_IX,
- FW_STAT_RX_PORT_LESS_64B_IX
-};
-
-struct fw_port_stats_cmd {
- __be32 op_to_portid;
- __be32 retval_len16;
- union fw_port_stats {
- struct fw_port_stats_ctl {
- __u8 nstats_bg_bm;
- __u8 tx_ix;
- __be16 r6;
- __be32 r7;
- __be64 stat0;
- __be64 stat1;
- __be64 stat2;
- __be64 stat3;
- __be64 stat4;
- __be64 stat5;
- } ctl;
- struct fw_port_stats_all {
- __be64 tx_bytes;
- __be64 tx_frames;
- __be64 tx_bcast;
- __be64 tx_mcast;
- __be64 tx_ucast;
- __be64 tx_error;
- __be64 tx_64b;
- __be64 tx_65b_127b;
- __be64 tx_128b_255b;
- __be64 tx_256b_511b;
- __be64 tx_512b_1023b;
- __be64 tx_1024b_1518b;
- __be64 tx_1519b_max;
- __be64 tx_drop;
- __be64 tx_pause;
- __be64 tx_ppp0;
- __be64 tx_ppp1;
- __be64 tx_ppp2;
- __be64 tx_ppp3;
- __be64 tx_ppp4;
- __be64 tx_ppp5;
- __be64 tx_ppp6;
- __be64 tx_ppp7;
- __be64 rx_bytes;
- __be64 rx_frames;
- __be64 rx_bcast;
- __be64 rx_mcast;
- __be64 rx_ucast;
- __be64 rx_mtu_error;
- __be64 rx_mtu_crc_error;
- __be64 rx_crc_error;
- __be64 rx_len_error;
- __be64 rx_sym_error;
- __be64 rx_64b;
- __be64 rx_65b_127b;
- __be64 rx_128b_255b;
- __be64 rx_256b_511b;
- __be64 rx_512b_1023b;
- __be64 rx_1024b_1518b;
- __be64 rx_1519b_max;
- __be64 rx_pause;
- __be64 rx_ppp0;
- __be64 rx_ppp1;
- __be64 rx_ppp2;
- __be64 rx_ppp3;
- __be64 rx_ppp4;
- __be64 rx_ppp5;
- __be64 rx_ppp6;
- __be64 rx_ppp7;
- __be64 rx_less_64b;
- __be64 rx_bg_drop;
- __be64 rx_bg_trunc;
- } all;
- } u;
-};
-
-#define S_FW_PORT_STATS_CMD_NSTATS 4
-#define M_FW_PORT_STATS_CMD_NSTATS 0x7
-#define V_FW_PORT_STATS_CMD_NSTATS(x) ((x) << S_FW_PORT_STATS_CMD_NSTATS)
-#define G_FW_PORT_STATS_CMD_NSTATS(x) \
- (((x) >> S_FW_PORT_STATS_CMD_NSTATS) & M_FW_PORT_STATS_CMD_NSTATS)
-
-#define S_FW_PORT_STATS_CMD_BG_BM 0
-#define M_FW_PORT_STATS_CMD_BG_BM 0x3
-#define V_FW_PORT_STATS_CMD_BG_BM(x) ((x) << S_FW_PORT_STATS_CMD_BG_BM)
-#define G_FW_PORT_STATS_CMD_BG_BM(x) \
- (((x) >> S_FW_PORT_STATS_CMD_BG_BM) & M_FW_PORT_STATS_CMD_BG_BM)
-
-#define S_FW_PORT_STATS_CMD_TX 7
-#define M_FW_PORT_STATS_CMD_TX 0x1
-#define V_FW_PORT_STATS_CMD_TX(x) ((x) << S_FW_PORT_STATS_CMD_TX)
-#define G_FW_PORT_STATS_CMD_TX(x) \
- (((x) >> S_FW_PORT_STATS_CMD_TX) & M_FW_PORT_STATS_CMD_TX)
-#define F_FW_PORT_STATS_CMD_TX V_FW_PORT_STATS_CMD_TX(1U)
-
-#define S_FW_PORT_STATS_CMD_IX 0
-#define M_FW_PORT_STATS_CMD_IX 0x3f
-#define V_FW_PORT_STATS_CMD_IX(x) ((x) << S_FW_PORT_STATS_CMD_IX)
-#define G_FW_PORT_STATS_CMD_IX(x) \
- (((x) >> S_FW_PORT_STATS_CMD_IX) & M_FW_PORT_STATS_CMD_IX)
-
-/* port loopback stats */
-#define FW_NUM_LB_STATS 14
-enum fw_port_lb_stats_index {
- FW_STAT_LB_PORT_BYTES_IX,
- FW_STAT_LB_PORT_FRAMES_IX,
- FW_STAT_LB_PORT_BCAST_IX,
- FW_STAT_LB_PORT_MCAST_IX,
- FW_STAT_LB_PORT_UCAST_IX,
- FW_STAT_LB_PORT_ERROR_IX,
- FW_STAT_LB_PORT_64B_IX,
- FW_STAT_LB_PORT_65B_127B_IX,
- FW_STAT_LB_PORT_128B_255B_IX,
- FW_STAT_LB_PORT_256B_511B_IX,
- FW_STAT_LB_PORT_512B_1023B_IX,
- FW_STAT_LB_PORT_1024B_1518B_IX,
- FW_STAT_LB_PORT_1519B_MAX_IX,
- FW_STAT_LB_PORT_DROP_FRAMES_IX
-};
-
-struct fw_port_lb_stats_cmd {
- __be32 op_to_lbport;
- __be32 retval_len16;
- union fw_port_lb_stats {
- struct fw_port_lb_stats_ctl {
- __u8 nstats_bg_bm;
- __u8 ix_pkd;
- __be16 r6;
- __be32 r7;
- __be64 stat0;
- __be64 stat1;
- __be64 stat2;
- __be64 stat3;
- __be64 stat4;
- __be64 stat5;
- } ctl;
- struct fw_port_lb_stats_all {
- __be64 tx_bytes;
- __be64 tx_frames;
- __be64 tx_bcast;
- __be64 tx_mcast;
- __be64 tx_ucast;
- __be64 tx_error;
- __be64 tx_64b;
- __be64 tx_65b_127b;
- __be64 tx_128b_255b;
- __be64 tx_256b_511b;
- __be64 tx_512b_1023b;
- __be64 tx_1024b_1518b;
- __be64 tx_1519b_max;
- __be64 rx_lb_drop;
- __be64 rx_lb_trunc;
- } all;
- } u;
-};
-
-#define S_FW_PORT_LB_STATS_CMD_LBPORT 0
-#define M_FW_PORT_LB_STATS_CMD_LBPORT 0xf
-#define V_FW_PORT_LB_STATS_CMD_LBPORT(x) \
- ((x) << S_FW_PORT_LB_STATS_CMD_LBPORT)
-#define G_FW_PORT_LB_STATS_CMD_LBPORT(x) \
- (((x) >> S_FW_PORT_LB_STATS_CMD_LBPORT) & M_FW_PORT_LB_STATS_CMD_LBPORT)
-
-#define S_FW_PORT_LB_STATS_CMD_NSTATS 4
-#define M_FW_PORT_LB_STATS_CMD_NSTATS 0x7
-#define V_FW_PORT_LB_STATS_CMD_NSTATS(x) \
- ((x) << S_FW_PORT_LB_STATS_CMD_NSTATS)
-#define G_FW_PORT_LB_STATS_CMD_NSTATS(x) \
- (((x) >> S_FW_PORT_LB_STATS_CMD_NSTATS) & M_FW_PORT_LB_STATS_CMD_NSTATS)
-
-#define S_FW_PORT_LB_STATS_CMD_BG_BM 0
-#define M_FW_PORT_LB_STATS_CMD_BG_BM 0x3
-#define V_FW_PORT_LB_STATS_CMD_BG_BM(x) ((x) << S_FW_PORT_LB_STATS_CMD_BG_BM)
-#define G_FW_PORT_LB_STATS_CMD_BG_BM(x) \
- (((x) >> S_FW_PORT_LB_STATS_CMD_BG_BM) & M_FW_PORT_LB_STATS_CMD_BG_BM)
-
-#define S_FW_PORT_LB_STATS_CMD_IX 0
-#define M_FW_PORT_LB_STATS_CMD_IX 0xf
-#define V_FW_PORT_LB_STATS_CMD_IX(x) ((x) << S_FW_PORT_LB_STATS_CMD_IX)
-#define G_FW_PORT_LB_STATS_CMD_IX(x) \
- (((x) >> S_FW_PORT_LB_STATS_CMD_IX) & M_FW_PORT_LB_STATS_CMD_IX)
-
-/* Trace related defines */
-#define FW_TRACE_CAPTURE_MAX_SINGLE_FLT_MODE 10240
-#define FW_TRACE_CAPTURE_MAX_MULTI_FLT_MODE 2560
-
-struct fw_port_trace_cmd {
- __be32 op_to_portid;
- __be32 retval_len16;
- __be16 traceen_to_pciech;
- __be16 qnum;
- __be32 r5;
-};
-
-#define S_FW_PORT_TRACE_CMD_PORTID 0
-#define M_FW_PORT_TRACE_CMD_PORTID 0xf
-#define V_FW_PORT_TRACE_CMD_PORTID(x) ((x) << S_FW_PORT_TRACE_CMD_PORTID)
-#define G_FW_PORT_TRACE_CMD_PORTID(x) \
- (((x) >> S_FW_PORT_TRACE_CMD_PORTID) & M_FW_PORT_TRACE_CMD_PORTID)
-
-#define S_FW_PORT_TRACE_CMD_TRACEEN 15
-#define M_FW_PORT_TRACE_CMD_TRACEEN 0x1
-#define V_FW_PORT_TRACE_CMD_TRACEEN(x) ((x) << S_FW_PORT_TRACE_CMD_TRACEEN)
-#define G_FW_PORT_TRACE_CMD_TRACEEN(x) \
- (((x) >> S_FW_PORT_TRACE_CMD_TRACEEN) & M_FW_PORT_TRACE_CMD_TRACEEN)
-#define F_FW_PORT_TRACE_CMD_TRACEEN V_FW_PORT_TRACE_CMD_TRACEEN(1U)
-
-#define S_FW_PORT_TRACE_CMD_FLTMODE 14
-#define M_FW_PORT_TRACE_CMD_FLTMODE 0x1
-#define V_FW_PORT_TRACE_CMD_FLTMODE(x) ((x) << S_FW_PORT_TRACE_CMD_FLTMODE)
-#define G_FW_PORT_TRACE_CMD_FLTMODE(x) \
- (((x) >> S_FW_PORT_TRACE_CMD_FLTMODE) & M_FW_PORT_TRACE_CMD_FLTMODE)
-#define F_FW_PORT_TRACE_CMD_FLTMODE V_FW_PORT_TRACE_CMD_FLTMODE(1U)
-
-#define S_FW_PORT_TRACE_CMD_DUPLEN 13
-#define M_FW_PORT_TRACE_CMD_DUPLEN 0x1
-#define V_FW_PORT_TRACE_CMD_DUPLEN(x) ((x) << S_FW_PORT_TRACE_CMD_DUPLEN)
-#define G_FW_PORT_TRACE_CMD_DUPLEN(x) \
- (((x) >> S_FW_PORT_TRACE_CMD_DUPLEN) & M_FW_PORT_TRACE_CMD_DUPLEN)
-#define F_FW_PORT_TRACE_CMD_DUPLEN V_FW_PORT_TRACE_CMD_DUPLEN(1U)
-
-#define S_FW_PORT_TRACE_CMD_RUNTFLTSIZE 8
-#define M_FW_PORT_TRACE_CMD_RUNTFLTSIZE 0x1f
-#define V_FW_PORT_TRACE_CMD_RUNTFLTSIZE(x) \
- ((x) << S_FW_PORT_TRACE_CMD_RUNTFLTSIZE)
-#define G_FW_PORT_TRACE_CMD_RUNTFLTSIZE(x) \
- (((x) >> S_FW_PORT_TRACE_CMD_RUNTFLTSIZE) & \
- M_FW_PORT_TRACE_CMD_RUNTFLTSIZE)
-
-#define S_FW_PORT_TRACE_CMD_PCIECH 6
-#define M_FW_PORT_TRACE_CMD_PCIECH 0x3
-#define V_FW_PORT_TRACE_CMD_PCIECH(x) ((x) << S_FW_PORT_TRACE_CMD_PCIECH)
-#define G_FW_PORT_TRACE_CMD_PCIECH(x) \
- (((x) >> S_FW_PORT_TRACE_CMD_PCIECH) & M_FW_PORT_TRACE_CMD_PCIECH)
-
-struct fw_port_trace_mmap_cmd {
- __be32 op_to_portid;
- __be32 retval_len16;
- __be32 fid_to_skipoffset;
- __be32 minpktsize_capturemax;
- __u8 map[224];
-};
-
-#define S_FW_PORT_TRACE_MMAP_CMD_PORTID 0
-#define M_FW_PORT_TRACE_MMAP_CMD_PORTID 0xf
-#define V_FW_PORT_TRACE_MMAP_CMD_PORTID(x) \
- ((x) << S_FW_PORT_TRACE_MMAP_CMD_PORTID)
-#define G_FW_PORT_TRACE_MMAP_CMD_PORTID(x) \
- (((x) >> S_FW_PORT_TRACE_MMAP_CMD_PORTID) & \
- M_FW_PORT_TRACE_MMAP_CMD_PORTID)
-
-#define S_FW_PORT_TRACE_MMAP_CMD_FID 30
-#define M_FW_PORT_TRACE_MMAP_CMD_FID 0x3
-#define V_FW_PORT_TRACE_MMAP_CMD_FID(x) ((x) << S_FW_PORT_TRACE_MMAP_CMD_FID)
-#define G_FW_PORT_TRACE_MMAP_CMD_FID(x) \
- (((x) >> S_FW_PORT_TRACE_MMAP_CMD_FID) & M_FW_PORT_TRACE_MMAP_CMD_FID)
-
-#define S_FW_PORT_TRACE_MMAP_CMD_MMAPEN 29
-#define M_FW_PORT_TRACE_MMAP_CMD_MMAPEN 0x1
-#define V_FW_PORT_TRACE_MMAP_CMD_MMAPEN(x) \
- ((x) << S_FW_PORT_TRACE_MMAP_CMD_MMAPEN)
-#define G_FW_PORT_TRACE_MMAP_CMD_MMAPEN(x) \
- (((x) >> S_FW_PORT_TRACE_MMAP_CMD_MMAPEN) & \
- M_FW_PORT_TRACE_MMAP_CMD_MMAPEN)
-#define F_FW_PORT_TRACE_MMAP_CMD_MMAPEN V_FW_PORT_TRACE_MMAP_CMD_MMAPEN(1U)
-
-#define S_FW_PORT_TRACE_MMAP_CMD_DCMAPEN 28
-#define M_FW_PORT_TRACE_MMAP_CMD_DCMAPEN 0x1
-#define V_FW_PORT_TRACE_MMAP_CMD_DCMAPEN(x) \
- ((x) << S_FW_PORT_TRACE_MMAP_CMD_DCMAPEN)
-#define G_FW_PORT_TRACE_MMAP_CMD_DCMAPEN(x) \
- (((x) >> S_FW_PORT_TRACE_MMAP_CMD_DCMAPEN) & \
- M_FW_PORT_TRACE_MMAP_CMD_DCMAPEN)
-#define F_FW_PORT_TRACE_MMAP_CMD_DCMAPEN \
- V_FW_PORT_TRACE_MMAP_CMD_DCMAPEN(1U)
-
-#define S_FW_PORT_TRACE_MMAP_CMD_SKIPLENGTH 8
-#define M_FW_PORT_TRACE_MMAP_CMD_SKIPLENGTH 0x1f
-#define V_FW_PORT_TRACE_MMAP_CMD_SKIPLENGTH(x) \
- ((x) << S_FW_PORT_TRACE_MMAP_CMD_SKIPLENGTH)
-#define G_FW_PORT_TRACE_MMAP_CMD_SKIPLENGTH(x) \
- (((x) >> S_FW_PORT_TRACE_MMAP_CMD_SKIPLENGTH) & \
- M_FW_PORT_TRACE_MMAP_CMD_SKIPLENGTH)
-
-#define S_FW_PORT_TRACE_MMAP_CMD_SKIPOFFSET 0
-#define M_FW_PORT_TRACE_MMAP_CMD_SKIPOFFSET 0x1f
-#define V_FW_PORT_TRACE_MMAP_CMD_SKIPOFFSET(x) \
- ((x) << S_FW_PORT_TRACE_MMAP_CMD_SKIPOFFSET)
-#define G_FW_PORT_TRACE_MMAP_CMD_SKIPOFFSET(x) \
- (((x) >> S_FW_PORT_TRACE_MMAP_CMD_SKIPOFFSET) & \
- M_FW_PORT_TRACE_MMAP_CMD_SKIPOFFSET)
-
-#define S_FW_PORT_TRACE_MMAP_CMD_MINPKTSIZE 18
-#define M_FW_PORT_TRACE_MMAP_CMD_MINPKTSIZE 0x3fff
-#define V_FW_PORT_TRACE_MMAP_CMD_MINPKTSIZE(x) \
- ((x) << S_FW_PORT_TRACE_MMAP_CMD_MINPKTSIZE)
-#define G_FW_PORT_TRACE_MMAP_CMD_MINPKTSIZE(x) \
- (((x) >> S_FW_PORT_TRACE_MMAP_CMD_MINPKTSIZE) & \
- M_FW_PORT_TRACE_MMAP_CMD_MINPKTSIZE)
-
-#define S_FW_PORT_TRACE_MMAP_CMD_CAPTUREMAX 0
-#define M_FW_PORT_TRACE_MMAP_CMD_CAPTUREMAX 0x3fff
-#define V_FW_PORT_TRACE_MMAP_CMD_CAPTUREMAX(x) \
- ((x) << S_FW_PORT_TRACE_MMAP_CMD_CAPTUREMAX)
-#define G_FW_PORT_TRACE_MMAP_CMD_CAPTUREMAX(x) \
- (((x) >> S_FW_PORT_TRACE_MMAP_CMD_CAPTUREMAX) & \
- M_FW_PORT_TRACE_MMAP_CMD_CAPTUREMAX)
-
-struct fw_rss_ind_tbl_cmd {
- __be32 op_to_viid;
- __be32 retval_len16;
- __be16 niqid;
- __be16 startidx;
- __be32 r3;
- __be32 iq0_to_iq2;
- __be32 iq3_to_iq5;
- __be32 iq6_to_iq8;
- __be32 iq9_to_iq11;
- __be32 iq12_to_iq14;
- __be32 iq15_to_iq17;
- __be32 iq18_to_iq20;
- __be32 iq21_to_iq23;
- __be32 iq24_to_iq26;
- __be32 iq27_to_iq29;
- __be32 iq30_iq31;
- __be32 r15_lo;
-};
-
-#define S_FW_RSS_IND_TBL_CMD_VIID 0
-#define M_FW_RSS_IND_TBL_CMD_VIID 0xfff
-#define V_FW_RSS_IND_TBL_CMD_VIID(x) ((x) << S_FW_RSS_IND_TBL_CMD_VIID)
-#define G_FW_RSS_IND_TBL_CMD_VIID(x) \
- (((x) >> S_FW_RSS_IND_TBL_CMD_VIID) & M_FW_RSS_IND_TBL_CMD_VIID)
-
-#define S_FW_RSS_IND_TBL_CMD_IQ0 20
-#define M_FW_RSS_IND_TBL_CMD_IQ0 0x3ff
-#define V_FW_RSS_IND_TBL_CMD_IQ0(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ0)
-#define G_FW_RSS_IND_TBL_CMD_IQ0(x) \
- (((x) >> S_FW_RSS_IND_TBL_CMD_IQ0) & M_FW_RSS_IND_TBL_CMD_IQ0)
-
-#define S_FW_RSS_IND_TBL_CMD_IQ1 10
-#define M_FW_RSS_IND_TBL_CMD_IQ1 0x3ff
-#define V_FW_RSS_IND_TBL_CMD_IQ1(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ1)
-#define G_FW_RSS_IND_TBL_CMD_IQ1(x) \
- (((x) >> S_FW_RSS_IND_TBL_CMD_IQ1) & M_FW_RSS_IND_TBL_CMD_IQ1)
-
-#define S_FW_RSS_IND_TBL_CMD_IQ2 0
-#define M_FW_RSS_IND_TBL_CMD_IQ2 0x3ff
-#define V_FW_RSS_IND_TBL_CMD_IQ2(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ2)
-#define G_FW_RSS_IND_TBL_CMD_IQ2(x) \
- (((x) >> S_FW_RSS_IND_TBL_CMD_IQ2) & M_FW_RSS_IND_TBL_CMD_IQ2)
-
-#define S_FW_RSS_IND_TBL_CMD_IQ3 20
-#define M_FW_RSS_IND_TBL_CMD_IQ3 0x3ff
-#define V_FW_RSS_IND_TBL_CMD_IQ3(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ3)
-#define G_FW_RSS_IND_TBL_CMD_IQ3(x) \
- (((x) >> S_FW_RSS_IND_TBL_CMD_IQ3) & M_FW_RSS_IND_TBL_CMD_IQ3)
-
-#define S_FW_RSS_IND_TBL_CMD_IQ4 10
-#define M_FW_RSS_IND_TBL_CMD_IQ4 0x3ff
-#define V_FW_RSS_IND_TBL_CMD_IQ4(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ4)
-#define G_FW_RSS_IND_TBL_CMD_IQ4(x) \
- (((x) >> S_FW_RSS_IND_TBL_CMD_IQ4) & M_FW_RSS_IND_TBL_CMD_IQ4)
-
-#define S_FW_RSS_IND_TBL_CMD_IQ5 0
-#define M_FW_RSS_IND_TBL_CMD_IQ5 0x3ff
-#define V_FW_RSS_IND_TBL_CMD_IQ5(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ5)
-#define G_FW_RSS_IND_TBL_CMD_IQ5(x) \
- (((x) >> S_FW_RSS_IND_TBL_CMD_IQ5) & M_FW_RSS_IND_TBL_CMD_IQ5)
-
-#define S_FW_RSS_IND_TBL_CMD_IQ6 20
-#define M_FW_RSS_IND_TBL_CMD_IQ6 0x3ff
-#define V_FW_RSS_IND_TBL_CMD_IQ6(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ6)
-#define G_FW_RSS_IND_TBL_CMD_IQ6(x) \
- (((x) >> S_FW_RSS_IND_TBL_CMD_IQ6) & M_FW_RSS_IND_TBL_CMD_IQ6)
-
-#define S_FW_RSS_IND_TBL_CMD_IQ7 10
-#define M_FW_RSS_IND_TBL_CMD_IQ7 0x3ff
-#define V_FW_RSS_IND_TBL_CMD_IQ7(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ7)
-#define G_FW_RSS_IND_TBL_CMD_IQ7(x) \
- (((x) >> S_FW_RSS_IND_TBL_CMD_IQ7) & M_FW_RSS_IND_TBL_CMD_IQ7)
-
-#define S_FW_RSS_IND_TBL_CMD_IQ8 0
-#define M_FW_RSS_IND_TBL_CMD_IQ8 0x3ff
-#define V_FW_RSS_IND_TBL_CMD_IQ8(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ8)
-#define G_FW_RSS_IND_TBL_CMD_IQ8(x) \
- (((x) >> S_FW_RSS_IND_TBL_CMD_IQ8) & M_FW_RSS_IND_TBL_CMD_IQ8)
-
-#define S_FW_RSS_IND_TBL_CMD_IQ9 20
-#define M_FW_RSS_IND_TBL_CMD_IQ9 0x3ff
-#define V_FW_RSS_IND_TBL_CMD_IQ9(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ9)
-#define G_FW_RSS_IND_TBL_CMD_IQ9(x) \
- (((x) >> S_FW_RSS_IND_TBL_CMD_IQ9) & M_FW_RSS_IND_TBL_CMD_IQ9)
-
-#define S_FW_RSS_IND_TBL_CMD_IQ10 10
-#define M_FW_RSS_IND_TBL_CMD_IQ10 0x3ff
-#define V_FW_RSS_IND_TBL_CMD_IQ10(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ10)
-#define G_FW_RSS_IND_TBL_CMD_IQ10(x) \
- (((x) >> S_FW_RSS_IND_TBL_CMD_IQ10) & M_FW_RSS_IND_TBL_CMD_IQ10)
-
-#define S_FW_RSS_IND_TBL_CMD_IQ11 0
-#define M_FW_RSS_IND_TBL_CMD_IQ11 0x3ff
-#define V_FW_RSS_IND_TBL_CMD_IQ11(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ11)
-#define G_FW_RSS_IND_TBL_CMD_IQ11(x) \
- (((x) >> S_FW_RSS_IND_TBL_CMD_IQ11) & M_FW_RSS_IND_TBL_CMD_IQ11)
-
-#define S_FW_RSS_IND_TBL_CMD_IQ12 20
-#define M_FW_RSS_IND_TBL_CMD_IQ12 0x3ff
-#define V_FW_RSS_IND_TBL_CMD_IQ12(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ12)
-#define G_FW_RSS_IND_TBL_CMD_IQ12(x) \
- (((x) >> S_FW_RSS_IND_TBL_CMD_IQ12) & M_FW_RSS_IND_TBL_CMD_IQ12)
-
-#define S_FW_RSS_IND_TBL_CMD_IQ13 10
-#define M_FW_RSS_IND_TBL_CMD_IQ13 0x3ff
-#define V_FW_RSS_IND_TBL_CMD_IQ13(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ13)
-#define G_FW_RSS_IND_TBL_CMD_IQ13(x) \
- (((x) >> S_FW_RSS_IND_TBL_CMD_IQ13) & M_FW_RSS_IND_TBL_CMD_IQ13)
-
-#define S_FW_RSS_IND_TBL_CMD_IQ14 0
-#define M_FW_RSS_IND_TBL_CMD_IQ14 0x3ff
-#define V_FW_RSS_IND_TBL_CMD_IQ14(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ14)
-#define G_FW_RSS_IND_TBL_CMD_IQ14(x) \
- (((x) >> S_FW_RSS_IND_TBL_CMD_IQ14) & M_FW_RSS_IND_TBL_CMD_IQ14)
-
-#define S_FW_RSS_IND_TBL_CMD_IQ15 20
-#define M_FW_RSS_IND_TBL_CMD_IQ15 0x3ff
-#define V_FW_RSS_IND_TBL_CMD_IQ15(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ15)
-#define G_FW_RSS_IND_TBL_CMD_IQ15(x) \
- (((x) >> S_FW_RSS_IND_TBL_CMD_IQ15) & M_FW_RSS_IND_TBL_CMD_IQ15)
-
-#define S_FW_RSS_IND_TBL_CMD_IQ16 10
-#define M_FW_RSS_IND_TBL_CMD_IQ16 0x3ff
-#define V_FW_RSS_IND_TBL_CMD_IQ16(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ16)
-#define G_FW_RSS_IND_TBL_CMD_IQ16(x) \
- (((x) >> S_FW_RSS_IND_TBL_CMD_IQ16) & M_FW_RSS_IND_TBL_CMD_IQ16)
-
-#define S_FW_RSS_IND_TBL_CMD_IQ17 0
-#define M_FW_RSS_IND_TBL_CMD_IQ17 0x3ff
-#define V_FW_RSS_IND_TBL_CMD_IQ17(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ17)
-#define G_FW_RSS_IND_TBL_CMD_IQ17(x) \
- (((x) >> S_FW_RSS_IND_TBL_CMD_IQ17) & M_FW_RSS_IND_TBL_CMD_IQ17)
-
-#define S_FW_RSS_IND_TBL_CMD_IQ18 20
-#define M_FW_RSS_IND_TBL_CMD_IQ18 0x3ff
-#define V_FW_RSS_IND_TBL_CMD_IQ18(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ18)
-#define G_FW_RSS_IND_TBL_CMD_IQ18(x) \
- (((x) >> S_FW_RSS_IND_TBL_CMD_IQ18) & M_FW_RSS_IND_TBL_CMD_IQ18)
-
-#define S_FW_RSS_IND_TBL_CMD_IQ19 10
-#define M_FW_RSS_IND_TBL_CMD_IQ19 0x3ff
-#define V_FW_RSS_IND_TBL_CMD_IQ19(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ19)
-#define G_FW_RSS_IND_TBL_CMD_IQ19(x) \
- (((x) >> S_FW_RSS_IND_TBL_CMD_IQ19) & M_FW_RSS_IND_TBL_CMD_IQ19)
-
-#define S_FW_RSS_IND_TBL_CMD_IQ20 0
-#define M_FW_RSS_IND_TBL_CMD_IQ20 0x3ff
-#define V_FW_RSS_IND_TBL_CMD_IQ20(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ20)
-#define G_FW_RSS_IND_TBL_CMD_IQ20(x) \
- (((x) >> S_FW_RSS_IND_TBL_CMD_IQ20) & M_FW_RSS_IND_TBL_CMD_IQ20)
-
-#define S_FW_RSS_IND_TBL_CMD_IQ21 20
-#define M_FW_RSS_IND_TBL_CMD_IQ21 0x3ff
-#define V_FW_RSS_IND_TBL_CMD_IQ21(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ21)
-#define G_FW_RSS_IND_TBL_CMD_IQ21(x) \
- (((x) >> S_FW_RSS_IND_TBL_CMD_IQ21) & M_FW_RSS_IND_TBL_CMD_IQ21)
-
-#define S_FW_RSS_IND_TBL_CMD_IQ22 10
-#define M_FW_RSS_IND_TBL_CMD_IQ22 0x3ff
-#define V_FW_RSS_IND_TBL_CMD_IQ22(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ22)
-#define G_FW_RSS_IND_TBL_CMD_IQ22(x) \
- (((x) >> S_FW_RSS_IND_TBL_CMD_IQ22) & M_FW_RSS_IND_TBL_CMD_IQ22)
-
-#define S_FW_RSS_IND_TBL_CMD_IQ23 0
-#define M_FW_RSS_IND_TBL_CMD_IQ23 0x3ff
-#define V_FW_RSS_IND_TBL_CMD_IQ23(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ23)
-#define G_FW_RSS_IND_TBL_CMD_IQ23(x) \
- (((x) >> S_FW_RSS_IND_TBL_CMD_IQ23) & M_FW_RSS_IND_TBL_CMD_IQ23)
-
-#define S_FW_RSS_IND_TBL_CMD_IQ24 20
-#define M_FW_RSS_IND_TBL_CMD_IQ24 0x3ff
-#define V_FW_RSS_IND_TBL_CMD_IQ24(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ24)
-#define G_FW_RSS_IND_TBL_CMD_IQ24(x) \
- (((x) >> S_FW_RSS_IND_TBL_CMD_IQ24) & M_FW_RSS_IND_TBL_CMD_IQ24)
-
-#define S_FW_RSS_IND_TBL_CMD_IQ25 10
-#define M_FW_RSS_IND_TBL_CMD_IQ25 0x3ff
-#define V_FW_RSS_IND_TBL_CMD_IQ25(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ25)
-#define G_FW_RSS_IND_TBL_CMD_IQ25(x) \
- (((x) >> S_FW_RSS_IND_TBL_CMD_IQ25) & M_FW_RSS_IND_TBL_CMD_IQ25)
-
-#define S_FW_RSS_IND_TBL_CMD_IQ26 0
-#define M_FW_RSS_IND_TBL_CMD_IQ26 0x3ff
-#define V_FW_RSS_IND_TBL_CMD_IQ26(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ26)
-#define G_FW_RSS_IND_TBL_CMD_IQ26(x) \
- (((x) >> S_FW_RSS_IND_TBL_CMD_IQ26) & M_FW_RSS_IND_TBL_CMD_IQ26)
-
-#define S_FW_RSS_IND_TBL_CMD_IQ27 20
-#define M_FW_RSS_IND_TBL_CMD_IQ27 0x3ff
-#define V_FW_RSS_IND_TBL_CMD_IQ27(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ27)
-#define G_FW_RSS_IND_TBL_CMD_IQ27(x) \
- (((x) >> S_FW_RSS_IND_TBL_CMD_IQ27) & M_FW_RSS_IND_TBL_CMD_IQ27)
-
-#define S_FW_RSS_IND_TBL_CMD_IQ28 10
-#define M_FW_RSS_IND_TBL_CMD_IQ28 0x3ff
-#define V_FW_RSS_IND_TBL_CMD_IQ28(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ28)
-#define G_FW_RSS_IND_TBL_CMD_IQ28(x) \
- (((x) >> S_FW_RSS_IND_TBL_CMD_IQ28) & M_FW_RSS_IND_TBL_CMD_IQ28)
-
-#define S_FW_RSS_IND_TBL_CMD_IQ29 0
-#define M_FW_RSS_IND_TBL_CMD_IQ29 0x3ff
-#define V_FW_RSS_IND_TBL_CMD_IQ29(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ29)
-#define G_FW_RSS_IND_TBL_CMD_IQ29(x) \
- (((x) >> S_FW_RSS_IND_TBL_CMD_IQ29) & M_FW_RSS_IND_TBL_CMD_IQ29)
-
-#define S_FW_RSS_IND_TBL_CMD_IQ30 20
-#define M_FW_RSS_IND_TBL_CMD_IQ30 0x3ff
-#define V_FW_RSS_IND_TBL_CMD_IQ30(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ30)
-#define G_FW_RSS_IND_TBL_CMD_IQ30(x) \
- (((x) >> S_FW_RSS_IND_TBL_CMD_IQ30) & M_FW_RSS_IND_TBL_CMD_IQ30)
-
-#define S_FW_RSS_IND_TBL_CMD_IQ31 10
-#define M_FW_RSS_IND_TBL_CMD_IQ31 0x3ff
-#define V_FW_RSS_IND_TBL_CMD_IQ31(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ31)
-#define G_FW_RSS_IND_TBL_CMD_IQ31(x) \
- (((x) >> S_FW_RSS_IND_TBL_CMD_IQ31) & M_FW_RSS_IND_TBL_CMD_IQ31)
-
-struct fw_rss_glb_config_cmd {
- __be32 op_to_write;
- __be32 retval_len16;
- union fw_rss_glb_config {
- struct fw_rss_glb_config_manual {
- __be32 mode_pkd;
- __be32 r3;
- __be64 r4;
- __be64 r5;
- } manual;
- struct fw_rss_glb_config_basicvirtual {
- __be32 mode_pkd;
- __be32 synmapen_to_hashtoeplitz;
- __be64 r8;
- __be64 r9;
- } basicvirtual;
- } u;
-};
-
-#define S_FW_RSS_GLB_CONFIG_CMD_MODE 28
-#define M_FW_RSS_GLB_CONFIG_CMD_MODE 0xf
-#define V_FW_RSS_GLB_CONFIG_CMD_MODE(x) ((x) << S_FW_RSS_GLB_CONFIG_CMD_MODE)
-#define G_FW_RSS_GLB_CONFIG_CMD_MODE(x) \
- (((x) >> S_FW_RSS_GLB_CONFIG_CMD_MODE) & M_FW_RSS_GLB_CONFIG_CMD_MODE)
-
-#define FW_RSS_GLB_CONFIG_CMD_MODE_MANUAL 0
-#define FW_RSS_GLB_CONFIG_CMD_MODE_BASICVIRTUAL 1
-#define FW_RSS_GLB_CONFIG_CMD_MODE_MAX 1
-
-#define S_FW_RSS_GLB_CONFIG_CMD_SYNMAPEN 8
-#define M_FW_RSS_GLB_CONFIG_CMD_SYNMAPEN 0x1
-#define V_FW_RSS_GLB_CONFIG_CMD_SYNMAPEN(x) \
- ((x) << S_FW_RSS_GLB_CONFIG_CMD_SYNMAPEN)
-#define G_FW_RSS_GLB_CONFIG_CMD_SYNMAPEN(x) \
- (((x) >> S_FW_RSS_GLB_CONFIG_CMD_SYNMAPEN) & \
- M_FW_RSS_GLB_CONFIG_CMD_SYNMAPEN)
-#define F_FW_RSS_GLB_CONFIG_CMD_SYNMAPEN \
- V_FW_RSS_GLB_CONFIG_CMD_SYNMAPEN(1U)
-
-#define S_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV6 7
-#define M_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV6 0x1
-#define V_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV6(x) \
- ((x) << S_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV6)
-#define G_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV6(x) \
- (((x) >> S_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV6) & \
- M_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV6)
-#define F_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV6 \
- V_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV6(1U)
-
-#define S_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV6 6
-#define M_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV6 0x1
-#define V_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV6(x) \
- ((x) << S_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV6)
-#define G_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV6(x) \
- (((x) >> S_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV6) & \
- M_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV6)
-#define F_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV6 \
- V_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV6(1U)
-
-#define S_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV4 5
-#define M_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV4 0x1
-#define V_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV4(x) \
- ((x) << S_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV4)
-#define G_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV4(x) \
- (((x) >> S_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV4) & \
- M_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV4)
-#define F_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV4 \
- V_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV4(1U)
-
-#define S_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV4 4
-#define M_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV4 0x1
-#define V_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV4(x) \
- ((x) << S_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV4)
-#define G_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV4(x) \
- (((x) >> S_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV4) & \
- M_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV4)
-#define F_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV4 \
- V_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV4(1U)
-
-#define S_FW_RSS_GLB_CONFIG_CMD_OFDMAPEN 3
-#define M_FW_RSS_GLB_CONFIG_CMD_OFDMAPEN 0x1
-#define V_FW_RSS_GLB_CONFIG_CMD_OFDMAPEN(x) \
- ((x) << S_FW_RSS_GLB_CONFIG_CMD_OFDMAPEN)
-#define G_FW_RSS_GLB_CONFIG_CMD_OFDMAPEN(x) \
- (((x) >> S_FW_RSS_GLB_CONFIG_CMD_OFDMAPEN) & \
- M_FW_RSS_GLB_CONFIG_CMD_OFDMAPEN)
-#define F_FW_RSS_GLB_CONFIG_CMD_OFDMAPEN \
- V_FW_RSS_GLB_CONFIG_CMD_OFDMAPEN(1U)
-
-#define S_FW_RSS_GLB_CONFIG_CMD_TNLMAPEN 2
-#define M_FW_RSS_GLB_CONFIG_CMD_TNLMAPEN 0x1
-#define V_FW_RSS_GLB_CONFIG_CMD_TNLMAPEN(x) \
- ((x) << S_FW_RSS_GLB_CONFIG_CMD_TNLMAPEN)
-#define G_FW_RSS_GLB_CONFIG_CMD_TNLMAPEN(x) \
- (((x) >> S_FW_RSS_GLB_CONFIG_CMD_TNLMAPEN) & \
- M_FW_RSS_GLB_CONFIG_CMD_TNLMAPEN)
-#define F_FW_RSS_GLB_CONFIG_CMD_TNLMAPEN \
- V_FW_RSS_GLB_CONFIG_CMD_TNLMAPEN(1U)
-
-#define S_FW_RSS_GLB_CONFIG_CMD_TNLALLLKP 1
-#define M_FW_RSS_GLB_CONFIG_CMD_TNLALLLKP 0x1
-#define V_FW_RSS_GLB_CONFIG_CMD_TNLALLLKP(x) \
- ((x) << S_FW_RSS_GLB_CONFIG_CMD_TNLALLLKP)
-#define G_FW_RSS_GLB_CONFIG_CMD_TNLALLLKP(x) \
- (((x) >> S_FW_RSS_GLB_CONFIG_CMD_TNLALLLKP) & \
- M_FW_RSS_GLB_CONFIG_CMD_TNLALLLKP)
-#define F_FW_RSS_GLB_CONFIG_CMD_TNLALLLKP \
- V_FW_RSS_GLB_CONFIG_CMD_TNLALLLKP(1U)
-
-#define S_FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ 0
-#define M_FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ 0x1
-#define V_FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ(x) \
- ((x) << S_FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ)
-#define G_FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ(x) \
- (((x) >> S_FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ) & \
- M_FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ)
-#define F_FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ \
- V_FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ(1U)
-
-struct fw_rss_vi_config_cmd {
- __be32 op_to_viid;
- __be32 retval_len16;
- union fw_rss_vi_config {
- struct fw_rss_vi_config_manual {
- __be64 r3;
- __be64 r4;
- __be64 r5;
- } manual;
- struct fw_rss_vi_config_basicvirtual {
- __be32 r6;
- __be32 defaultq_to_udpen;
- __be64 r9;
- __be64 r10;
- } basicvirtual;
- } u;
-};
-
-#define S_FW_RSS_VI_CONFIG_CMD_VIID 0
-#define M_FW_RSS_VI_CONFIG_CMD_VIID 0xfff
-#define V_FW_RSS_VI_CONFIG_CMD_VIID(x) ((x) << S_FW_RSS_VI_CONFIG_CMD_VIID)
-#define G_FW_RSS_VI_CONFIG_CMD_VIID(x) \
- (((x) >> S_FW_RSS_VI_CONFIG_CMD_VIID) & M_FW_RSS_VI_CONFIG_CMD_VIID)
-
-#define S_FW_RSS_VI_CONFIG_CMD_DEFAULTQ 16
-#define M_FW_RSS_VI_CONFIG_CMD_DEFAULTQ 0x3ff
-#define V_FW_RSS_VI_CONFIG_CMD_DEFAULTQ(x) \
- ((x) << S_FW_RSS_VI_CONFIG_CMD_DEFAULTQ)
-#define G_FW_RSS_VI_CONFIG_CMD_DEFAULTQ(x) \
- (((x) >> S_FW_RSS_VI_CONFIG_CMD_DEFAULTQ) & \
- M_FW_RSS_VI_CONFIG_CMD_DEFAULTQ)
-
-#define S_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN 4
-#define M_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN 0x1
-#define V_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN(x) \
- ((x) << S_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN)
-#define G_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN(x) \
- (((x) >> S_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN) & \
- M_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN)
-#define F_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN \
- V_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN(1U)
-
-#define S_FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN 3
-#define M_FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN 0x1
-#define V_FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN(x) \
- ((x) << S_FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN)
-#define G_FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN(x) \
- (((x) >> S_FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN) & \
- M_FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN)
-#define F_FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN \
- V_FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN(1U)
-
-#define S_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN 2
-#define M_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN 0x1
-#define V_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN(x) \
- ((x) << S_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN)
-#define G_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN(x) \
- (((x) >> S_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN) & \
- M_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN)
-#define F_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN \
- V_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN(1U)
-
-#define S_FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN 1
-#define M_FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN 0x1
-#define V_FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN(x) \
- ((x) << S_FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN)
-#define G_FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN(x) \
- (((x) >> S_FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN) & \
- M_FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN)
-#define F_FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN \
- V_FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN(1U)
-
-#define S_FW_RSS_VI_CONFIG_CMD_UDPEN 0
-#define M_FW_RSS_VI_CONFIG_CMD_UDPEN 0x1
-#define V_FW_RSS_VI_CONFIG_CMD_UDPEN(x) \
- ((x) << S_FW_RSS_VI_CONFIG_CMD_UDPEN)
-#define G_FW_RSS_VI_CONFIG_CMD_UDPEN(x) \
- (((x) >> S_FW_RSS_VI_CONFIG_CMD_UDPEN) & \
- M_FW_RSS_VI_CONFIG_CMD_UDPEN)
-#define F_FW_RSS_VI_CONFIG_CMD_UDPEN \
- V_FW_RSS_VI_CONFIG_CMD_UDPEN(1U)
-
-enum fw_sched_sc {
- FW_SCHED_SC_CONFIG = 0,
- FW_SCHED_SC_PARAMS = 1,
-};
-
-enum fw_sched_type {
- FW_SCHED_TYPE_PKTSCHED = 0,
- FW_SCHED_TYPE_STREAMSCHED = 1,
-};
-
-enum fw_sched_params_level {
- FW_SCHED_PARAMS_LEVEL_CL_RL = 0,
- FW_SCHED_PARAMS_LEVEL_CL_WRR = 1,
- FW_SCHED_PARAMS_LEVEL_CH_RL = 2,
- FW_SCHED_PARAMS_LEVEL_CH_WRR = 3,
-};
-
-enum fw_sched_params_mode {
- FW_SCHED_PARAMS_MODE_CLASS = 0,
- FW_SCHED_PARAMS_MODE_FLOW = 1,
-};
-
-enum fw_sched_params_unit {
- FW_SCHED_PARAMS_UNIT_BITRATE = 0,
- FW_SCHED_PARAMS_UNIT_PKTRATE = 1,
-};
-
-enum fw_sched_params_rate {
- FW_SCHED_PARAMS_RATE_REL = 0,
- FW_SCHED_PARAMS_RATE_ABS = 1,
-};
-
-struct fw_sched_cmd {
- __be32 op_to_write;
- __be32 retval_len16;
- union fw_sched {
- struct fw_sched_config {
- __u8 sc;
- __u8 type;
- __u8 minmaxen;
- __u8 r3[5];
- } config;
- struct fw_sched_params {
- __u8 sc;
- __u8 type;
- __u8 level;
- __u8 mode;
- __u8 unit;
- __u8 rate;
- __u8 ch;
- __u8 cl;
- __be32 min;
- __be32 max;
- __be16 weight;
- __be16 pktsize;
- __be32 r4;
- } params;
- } u;
-};
-
-/*
- * length of the formatting string
- */
-#define FW_DEVLOG_FMT_LEN 192
-
-/*
- * maximum number of the formatting string parameters
- */
-#define FW_DEVLOG_FMT_PARAMS_NUM 8
-
-/*
- * priority levels
- */
-enum fw_devlog_level {
- FW_DEVLOG_LEVEL_EMERG = 0x0,
- FW_DEVLOG_LEVEL_CRIT = 0x1,
- FW_DEVLOG_LEVEL_ERR = 0x2,
- FW_DEVLOG_LEVEL_NOTICE = 0x3,
- FW_DEVLOG_LEVEL_INFO = 0x4,
- FW_DEVLOG_LEVEL_DEBUG = 0x5,
- FW_DEVLOG_LEVEL_MAX = 0x5,
-};
-
-/*
- * facilities that may send a log message
- */
-enum fw_devlog_facility {
- FW_DEVLOG_FACILITY_CORE = 0x00,
- FW_DEVLOG_FACILITY_SCHED = 0x02,
- FW_DEVLOG_FACILITY_TIMER = 0x04,
- FW_DEVLOG_FACILITY_RES = 0x06,
- FW_DEVLOG_FACILITY_HW = 0x08,
- FW_DEVLOG_FACILITY_FLR = 0x10,
- FW_DEVLOG_FACILITY_DMAQ = 0x12,
- FW_DEVLOG_FACILITY_PHY = 0x14,
- FW_DEVLOG_FACILITY_MAC = 0x16,
- FW_DEVLOG_FACILITY_PORT = 0x18,
- FW_DEVLOG_FACILITY_VI = 0x1A,
- FW_DEVLOG_FACILITY_FILTER = 0x1C,
- FW_DEVLOG_FACILITY_ACL = 0x1E,
- FW_DEVLOG_FACILITY_TM = 0x20,
- FW_DEVLOG_FACILITY_QFC = 0x22,
- FW_DEVLOG_FACILITY_DCB = 0x24,
- FW_DEVLOG_FACILITY_ETH = 0x26,
- FW_DEVLOG_FACILITY_OFLD = 0x28,
- FW_DEVLOG_FACILITY_RI = 0x2A,
- FW_DEVLOG_FACILITY_ISCSI = 0x2C,
- FW_DEVLOG_FACILITY_FCOE = 0x2E,
- FW_DEVLOG_FACILITY_FOISCSI = 0x30,
- FW_DEVLOG_FACILITY_FOFCOE = 0x32,
- FW_DEVLOG_FACILITY_MAX = 0x32,
-};
-
-/*
- * log message format
- */
-struct fw_devlog_e {
- __be64 timestamp;
- __be32 seqno;
- __be16 reserved1;
- __u8 level;
- __u8 facility;
- __u8 fmt[FW_DEVLOG_FMT_LEN];
- __be32 params[FW_DEVLOG_FMT_PARAMS_NUM];
- __be32 reserved3[4];
-};
-
-struct fw_devlog_cmd {
- __be32 op_to_write;
- __be32 retval_len16;
- __u8 level;
- __u8 r2[7];
- __be32 memtype_devlog_memaddr16_devlog;
- __be32 memsize_devlog;
- __be32 r3[2];
-};
-
-#define S_FW_DEVLOG_CMD_MEMTYPE_DEVLOG 28
-#define M_FW_DEVLOG_CMD_MEMTYPE_DEVLOG 0xf
-#define V_FW_DEVLOG_CMD_MEMTYPE_DEVLOG(x) \
- ((x) << S_FW_DEVLOG_CMD_MEMTYPE_DEVLOG)
-#define G_FW_DEVLOG_CMD_MEMTYPE_DEVLOG(x) \
- (((x) >> S_FW_DEVLOG_CMD_MEMTYPE_DEVLOG) & M_FW_DEVLOG_CMD_MEMTYPE_DEVLOG)
-
-#define S_FW_DEVLOG_CMD_MEMADDR16_DEVLOG 0
-#define M_FW_DEVLOG_CMD_MEMADDR16_DEVLOG 0xfffffff
-#define V_FW_DEVLOG_CMD_MEMADDR16_DEVLOG(x) \
- ((x) << S_FW_DEVLOG_CMD_MEMADDR16_DEVLOG)
-#define G_FW_DEVLOG_CMD_MEMADDR16_DEVLOG(x) \
- (((x) >> S_FW_DEVLOG_CMD_MEMADDR16_DEVLOG) & \
- M_FW_DEVLOG_CMD_MEMADDR16_DEVLOG)
-
-struct fw_netif_cmd {
- __be32 op_portid;
- __be32 retval_to_len16;
- __be32 add_to_ipv4gw;
- __be32 vlanid_mtuval;
- __be32 gwaddr;
- __be32 addr;
- __be32 nmask;
- __be32 bcaddr;
-};
-
-#define S_FW_NETIF_CMD_PORTID 0
-#define M_FW_NETIF_CMD_PORTID 0xf
-#define V_FW_NETIF_CMD_PORTID(x) ((x) << S_FW_NETIF_CMD_PORTID)
-#define G_FW_NETIF_CMD_PORTID(x) \
- (((x) >> S_FW_NETIF_CMD_PORTID) & M_FW_NETIF_CMD_PORTID)
-
-#define S_FW_NETIF_CMD_RETVAL 24
-#define M_FW_NETIF_CMD_RETVAL 0xff
-#define V_FW_NETIF_CMD_RETVAL(x) ((x) << S_FW_NETIF_CMD_RETVAL)
-#define G_FW_NETIF_CMD_RETVAL(x) \
- (((x) >> S_FW_NETIF_CMD_RETVAL) & M_FW_NETIF_CMD_RETVAL)
-
-#define S_FW_NETIF_CMD_IFIDX 16
-#define M_FW_NETIF_CMD_IFIDX 0xff
-#define V_FW_NETIF_CMD_IFIDX(x) ((x) << S_FW_NETIF_CMD_IFIDX)
-#define G_FW_NETIF_CMD_IFIDX(x) \
- (((x) >> S_FW_NETIF_CMD_IFIDX) & M_FW_NETIF_CMD_IFIDX)
-
-#define S_FW_NETIF_CMD_LEN16 0
-#define M_FW_NETIF_CMD_LEN16 0xff
-#define V_FW_NETIF_CMD_LEN16(x) ((x) << S_FW_NETIF_CMD_LEN16)
-#define G_FW_NETIF_CMD_LEN16(x) \
- (((x) >> S_FW_NETIF_CMD_LEN16) & M_FW_NETIF_CMD_LEN16)
-
-#define S_FW_NETIF_CMD_ADD 31
-#define M_FW_NETIF_CMD_ADD 0x1
-#define V_FW_NETIF_CMD_ADD(x) ((x) << S_FW_NETIF_CMD_ADD)
-#define G_FW_NETIF_CMD_ADD(x) \
- (((x) >> S_FW_NETIF_CMD_ADD) & M_FW_NETIF_CMD_ADD)
-#define F_FW_NETIF_CMD_ADD V_FW_NETIF_CMD_ADD(1U)
-
-#define S_FW_NETIF_CMD_LINK 30
-#define M_FW_NETIF_CMD_LINK 0x1
-#define V_FW_NETIF_CMD_LINK(x) ((x) << S_FW_NETIF_CMD_LINK)
-#define G_FW_NETIF_CMD_LINK(x) \
- (((x) >> S_FW_NETIF_CMD_LINK) & M_FW_NETIF_CMD_LINK)
-#define F_FW_NETIF_CMD_LINK V_FW_NETIF_CMD_LINK(1U)
-
-#define S_FW_NETIF_CMD_VLAN 29
-#define M_FW_NETIF_CMD_VLAN 0x1
-#define V_FW_NETIF_CMD_VLAN(x) ((x) << S_FW_NETIF_CMD_VLAN)
-#define G_FW_NETIF_CMD_VLAN(x) \
- (((x) >> S_FW_NETIF_CMD_VLAN) & M_FW_NETIF_CMD_VLAN)
-#define F_FW_NETIF_CMD_VLAN V_FW_NETIF_CMD_VLAN(1U)
-
-#define S_FW_NETIF_CMD_MTU 28
-#define M_FW_NETIF_CMD_MTU 0x1
-#define V_FW_NETIF_CMD_MTU(x) ((x) << S_FW_NETIF_CMD_MTU)
-#define G_FW_NETIF_CMD_MTU(x) \
- (((x) >> S_FW_NETIF_CMD_MTU) & M_FW_NETIF_CMD_MTU)
-#define F_FW_NETIF_CMD_MTU V_FW_NETIF_CMD_MTU(1U)
-
-#define S_FW_NETIF_CMD_DHCP 27
-#define M_FW_NETIF_CMD_DHCP 0x1
-#define V_FW_NETIF_CMD_DHCP(x) ((x) << S_FW_NETIF_CMD_DHCP)
-#define G_FW_NETIF_CMD_DHCP(x) \
- (((x) >> S_FW_NETIF_CMD_DHCP) & M_FW_NETIF_CMD_DHCP)
-#define F_FW_NETIF_CMD_DHCP V_FW_NETIF_CMD_DHCP(1U)
-
-#define S_FW_NETIF_CMD_IPV4BCADDR 3
-#define M_FW_NETIF_CMD_IPV4BCADDR 0x1
-#define V_FW_NETIF_CMD_IPV4BCADDR(x) ((x) << S_FW_NETIF_CMD_IPV4BCADDR)
-#define G_FW_NETIF_CMD_IPV4BCADDR(x) \
- (((x) >> S_FW_NETIF_CMD_IPV4BCADDR) & M_FW_NETIF_CMD_IPV4BCADDR)
-#define F_FW_NETIF_CMD_IPV4BCADDR V_FW_NETIF_CMD_IPV4BCADDR(1U)
-
-#define S_FW_NETIF_CMD_IPV4NMASK 2
-#define M_FW_NETIF_CMD_IPV4NMASK 0x1
-#define V_FW_NETIF_CMD_IPV4NMASK(x) ((x) << S_FW_NETIF_CMD_IPV4NMASK)
-#define G_FW_NETIF_CMD_IPV4NMASK(x) \
- (((x) >> S_FW_NETIF_CMD_IPV4NMASK) & M_FW_NETIF_CMD_IPV4NMASK)
-#define F_FW_NETIF_CMD_IPV4NMASK V_FW_NETIF_CMD_IPV4NMASK(1U)
-
-#define S_FW_NETIF_CMD_IPV4ADDR 1
-#define M_FW_NETIF_CMD_IPV4ADDR 0x1
-#define V_FW_NETIF_CMD_IPV4ADDR(x) ((x) << S_FW_NETIF_CMD_IPV4ADDR)
-#define G_FW_NETIF_CMD_IPV4ADDR(x) \
- (((x) >> S_FW_NETIF_CMD_IPV4ADDR) & M_FW_NETIF_CMD_IPV4ADDR)
-#define F_FW_NETIF_CMD_IPV4ADDR V_FW_NETIF_CMD_IPV4ADDR(1U)
-
-#define S_FW_NETIF_CMD_IPV4GW 0
-#define M_FW_NETIF_CMD_IPV4GW 0x1
-#define V_FW_NETIF_CMD_IPV4GW(x) ((x) << S_FW_NETIF_CMD_IPV4GW)
-#define G_FW_NETIF_CMD_IPV4GW(x) \
- (((x) >> S_FW_NETIF_CMD_IPV4GW) & M_FW_NETIF_CMD_IPV4GW)
-#define F_FW_NETIF_CMD_IPV4GW V_FW_NETIF_CMD_IPV4GW(1U)
-
-#define S_FW_NETIF_CMD_VLANID 16
-#define M_FW_NETIF_CMD_VLANID 0xfff
-#define V_FW_NETIF_CMD_VLANID(x) ((x) << S_FW_NETIF_CMD_VLANID)
-#define G_FW_NETIF_CMD_VLANID(x) \
- (((x) >> S_FW_NETIF_CMD_VLANID) & M_FW_NETIF_CMD_VLANID)
-
-#define S_FW_NETIF_CMD_MTUVAL 0
-#define M_FW_NETIF_CMD_MTUVAL 0xffff
-#define V_FW_NETIF_CMD_MTUVAL(x) ((x) << S_FW_NETIF_CMD_MTUVAL)
-#define G_FW_NETIF_CMD_MTUVAL(x) \
- (((x) >> S_FW_NETIF_CMD_MTUVAL) & M_FW_NETIF_CMD_MTUVAL)
-
-enum fw_error_type {
- FW_ERROR_TYPE_EXCEPTION = 0x0,
- FW_ERROR_TYPE_HWMODULE = 0x1,
- FW_ERROR_TYPE_WR = 0x2,
- FW_ERROR_TYPE_ACL = 0x3,
-};
-
-struct fw_error_cmd {
- __be32 op_to_type;
- __be32 len16_pkd;
- union fw_error {
- struct fw_error_exception {
- __be32 info[6];
- } exception;
- struct fw_error_hwmodule {
- __be32 regaddr;
- __be32 regval;
- } hwmodule;
- struct fw_error_wr {
- __be16 cidx;
- __be16 pfn_vfn;
- __be32 eqid;
- __u8 wrhdr[16];
- } wr;
- struct fw_error_acl {
- __be16 cidx;
- __be16 pfn_vfn;
- __be32 eqid;
- __be16 mv_pkd;
- __u8 val[6];
- __be64 r4;
- } acl;
- } u;
-};
-
-#define S_FW_ERROR_CMD_FATAL 4
-#define M_FW_ERROR_CMD_FATAL 0x1
-#define V_FW_ERROR_CMD_FATAL(x) ((x) << S_FW_ERROR_CMD_FATAL)
-#define G_FW_ERROR_CMD_FATAL(x) \
- (((x) >> S_FW_ERROR_CMD_FATAL) & M_FW_ERROR_CMD_FATAL)
-#define F_FW_ERROR_CMD_FATAL V_FW_ERROR_CMD_FATAL(1U)
-
-#define S_FW_ERROR_CMD_TYPE 0
-#define M_FW_ERROR_CMD_TYPE 0xf
-#define V_FW_ERROR_CMD_TYPE(x) ((x) << S_FW_ERROR_CMD_TYPE)
-#define G_FW_ERROR_CMD_TYPE(x) \
- (((x) >> S_FW_ERROR_CMD_TYPE) & M_FW_ERROR_CMD_TYPE)
-
-#define S_FW_ERROR_CMD_PFN 8
-#define M_FW_ERROR_CMD_PFN 0x7
-#define V_FW_ERROR_CMD_PFN(x) ((x) << S_FW_ERROR_CMD_PFN)
-#define G_FW_ERROR_CMD_PFN(x) \
- (((x) >> S_FW_ERROR_CMD_PFN) & M_FW_ERROR_CMD_PFN)
-
-#define S_FW_ERROR_CMD_VFN 0
-#define M_FW_ERROR_CMD_VFN 0xff
-#define V_FW_ERROR_CMD_VFN(x) ((x) << S_FW_ERROR_CMD_VFN)
-#define G_FW_ERROR_CMD_VFN(x) \
- (((x) >> S_FW_ERROR_CMD_VFN) & M_FW_ERROR_CMD_VFN)
-
-#define S_FW_ERROR_CMD_PFN 8
-#define M_FW_ERROR_CMD_PFN 0x7
-#define V_FW_ERROR_CMD_PFN(x) ((x) << S_FW_ERROR_CMD_PFN)
-#define G_FW_ERROR_CMD_PFN(x) \
- (((x) >> S_FW_ERROR_CMD_PFN) & M_FW_ERROR_CMD_PFN)
-
-#define S_FW_ERROR_CMD_VFN 0
-#define M_FW_ERROR_CMD_VFN 0xff
-#define V_FW_ERROR_CMD_VFN(x) ((x) << S_FW_ERROR_CMD_VFN)
-#define G_FW_ERROR_CMD_VFN(x) \
- (((x) >> S_FW_ERROR_CMD_VFN) & M_FW_ERROR_CMD_VFN)
-
-#define S_FW_ERROR_CMD_MV 15
-#define M_FW_ERROR_CMD_MV 0x1
-#define V_FW_ERROR_CMD_MV(x) ((x) << S_FW_ERROR_CMD_MV)
-#define G_FW_ERROR_CMD_MV(x) \
- (((x) >> S_FW_ERROR_CMD_MV) & M_FW_ERROR_CMD_MV)
-#define F_FW_ERROR_CMD_MV V_FW_ERROR_CMD_MV(1U)
-
-struct fw_debug_cmd {
- __be32 op_type;
- __be32 len16_pkd;
- union fw_debug {
- struct fw_debug_assert {
- __be32 fcid;
- __be32 line;
- __be32 x;
- __be32 y;
- __u8 filename_0_7[8];
- __u8 filename_8_15[8];
- __be64 r3;
- } assert;
- struct fw_debug_prt {
- __be16 dprtstridx;
- __be16 r3[3];
- __be32 dprtstrparam0;
- __be32 dprtstrparam1;
- __be32 dprtstrparam2;
- __be32 dprtstrparam3;
- } prt;
- } u;
-};
-
-#define S_FW_DEBUG_CMD_TYPE 0
-#define M_FW_DEBUG_CMD_TYPE 0xff
-#define V_FW_DEBUG_CMD_TYPE(x) ((x) << S_FW_DEBUG_CMD_TYPE)
-#define G_FW_DEBUG_CMD_TYPE(x) \
- (((x) >> S_FW_DEBUG_CMD_TYPE) & M_FW_DEBUG_CMD_TYPE)
-
-/******************************************************************************
- * B I N A R Y H E A D E R F O R M A T
- **********************************************/
-
-/*
- * firmware binary header format
- */
-struct fw_hdr {
- __u8 ver;
- __u8 reserved1;
- __be16 len512; /* bin length in units of 512-bytes */
- __be32 fw_ver; /* firmware version */
- __be32 tp_microcode_ver; /* tcp processor microcode version */
- __u8 intfver_nic;
- __u8 intfver_vnic;
- __u8 intfver_ofld;
- __u8 intfver_ri;
- __u8 intfver_iscsipdu;
- __u8 intfver_iscsi;
- __u8 intfver_fcoe;
- __u8 reserved2;
- __be32 reserved3[27];
-};
-
-#define S_FW_HDR_FW_VER_MAJOR 24
-#define M_FW_HDR_FW_VER_MAJOR 0xff
-#define V_FW_HDR_FW_VER_MAJOR(x) \
- ((x) << S_FW_HDR_FW_VER_MAJOR)
-#define G_FW_HDR_FW_VER_MAJOR(x) \
- (((x) >> S_FW_HDR_FW_VER_MAJOR) & M_FW_HDR_FW_VER_MAJOR)
-
-#define S_FW_HDR_FW_VER_MINOR 16
-#define M_FW_HDR_FW_VER_MINOR 0xff
-#define V_FW_HDR_FW_VER_MINOR(x) \
- ((x) << S_FW_HDR_FW_VER_MINOR)
-#define G_FW_HDR_FW_VER_MINOR(x) \
- (((x) >> S_FW_HDR_FW_VER_MINOR) & M_FW_HDR_FW_VER_MINOR)
-
-#define S_FW_HDR_FW_VER_MICRO 8
-#define M_FW_HDR_FW_VER_MICRO 0xff
-#define V_FW_HDR_FW_VER_MICRO(x) \
- ((x) << S_FW_HDR_FW_VER_MICRO)
-#define G_FW_HDR_FW_VER_MICRO(x) \
- (((x) >> S_FW_HDR_FW_VER_MICRO) & M_FW_HDR_FW_VER_MICRO)
-
-#define S_FW_HDR_FW_VER_BUILD 0
-#define M_FW_HDR_FW_VER_BUILD 0xff
-#define V_FW_HDR_FW_VER_BUILD(x) \
- ((x) << S_FW_HDR_FW_VER_BUILD)
-#define G_FW_HDR_FW_VER_BUILD(x) \
- (((x) >> S_FW_HDR_FW_VER_BUILD) & M_FW_HDR_FW_VER_BUILD)
-
-#endif /* _T4FW_INTERFACE_H_ */
diff --git a/sys/dev/cxgbe/firmware/t4fw_cfg.txt b/sys/dev/cxgbe/firmware/t4fw_cfg.txt
new file mode 100644
index 0000000..65d6f0b
--- /dev/null
+++ b/sys/dev/cxgbe/firmware/t4fw_cfg.txt
@@ -0,0 +1,132 @@
+# Firmware configuration file.
+#
+# Global limits (some are hardware limits, others are due to the firmware).
+# Also note that the firmware reserves some of these resources for its own use
+# so it's not always possible for the drivers to grab everything listed here.
+# nvi = 128 virtual interfaces
+# niqflint = 1023 ingress queues with freelists and/or interrupts
+# nethctrl = 64K Ethernet or ctrl egress queues
+# neq = 64K egress queues of all kinds, including freelists
+# nexactf = 336 MPS TCAM entries, can oversubscribe.
+#
+
+[global]
+ rss_glb_config_mode = basicvirtual
+ rss_glb_config_options = tnlmapen, hashtoeplitz, tnlalllkp
+
+ sge_timer_value = 1, 5, 10, 50, 100, 200 # usecs
+
+ # TP_SHIFT_CNT
+ reg[0x7dc0] = 0x64f8849
+
+ filterMode = fragmentation, mpshittype, protocol, vlan, port, fcoe
+
+ # TP rx and tx payload memory (% of the total EDRAM + DDR3).
+ tp_pmrx = 40
+ tp_pmtx = 60
+ tp_pmrx_pagesize = 64K
+ tp_pmtx_pagesize = 64K
+
+# PFs 0-3. These get 8 MSI/8 MSI-X vectors each. VFs are supported by
+# these 4 PFs only. Not used here at all.
+[function "0"]
+ nvf = 16
+ nvi = 1
+[function "0/*"]
+ nvi = 1
+
+[function "1"]
+ nvf = 16
+ nvi = 1
+[function "1/*"]
+ nvi = 1
+
+[function "2"]
+ nvf = 16
+ nvi = 1
+[function "2/*"]
+ nvi = 1
+
+[function "3"]
+ nvf = 16
+ nvi = 1
+[function "3/*"]
+ nvi = 1
+
+# PF4 is the resource-rich PF that the bus/nexus driver attaches to.
+# It gets 32 MSI/128 MSI-X vectors.
+[function "4"]
+ wx_caps = all
+ r_caps = all
+ nvi = 48
+ niqflint = 256
+ nethctrl = 128
+ neq = 256
+ nexactf = 300
+ cmask = all
+ pmask = all
+
+ # driver will mask off features it won't use
+ protocol = ofld
+
+ tp_l2t = 100
+
+ # TCAM has 8K cells; each region must start at a multiple of 128 cell.
+ # Each entry in these categories takes 4 cells each. nhash will use the
+ # TCAM iff there is room left (that is, the rest don't add up to 2048).
+ nroute = 32
+ nclip = 0 # needed only for IPv6 offload
+ nfilter = 1504
+ nserver = 512
+ nhash = 16384
+
+# PF5 is the SCSI Controller PF. It gets 32 MSI/40 MSI-X vectors.
+# Not used right now.
+[function "5"]
+ nvi = 1
+
+# PF6 is the FCoE Controller PF. It gets 32 MSI/40 MSI-X vectors.
+# Not used right now.
+[function "6"]
+ nvi = 1
+
+# MPS has 192K buffer space for ingress packets from the wire as well as
+# loopback path of the L2 switch.
+[port "0"]
+ dcb = none
+ bg_mem = 25
+ lpbk_mem = 25
+ hwm = 30
+ lwm = 15
+ dwm = 30
+
+[port "1"]
+ dcb = none
+ bg_mem = 25
+ lpbk_mem = 25
+ hwm = 30
+ lwm = 15
+ dwm = 30
+
+[port "2"]
+ dcb = none
+ bg_mem = 25
+ lpbk_mem = 25
+ hwm = 30
+ lwm = 15
+ dwm = 30
+
+[port "3"]
+ dcb = none
+ bg_mem = 25
+ lpbk_mem = 25
+ hwm = 30
+ lwm = 15
+ dwm = 30
+
+[fini]
+ version = 0x1
+ checksum = 0xb31cdfac
+#
+# $FreeBSD$
+#
diff --git a/sys/dev/cxgbe/firmware/t4fw_cfg_uwire.txt b/sys/dev/cxgbe/firmware/t4fw_cfg_uwire.txt
new file mode 100644
index 0000000..134d60c
--- /dev/null
+++ b/sys/dev/cxgbe/firmware/t4fw_cfg_uwire.txt
@@ -0,0 +1,503 @@
+# Chelsio T4 Factory Default configuration file.
+#
+# Copyright (C) 2010 Chelsio Communications. All rights reserved.
+#
+
+# This file provides the default, power-on configuration for 4-port T4-based
+# adapters shipped from the factory. These defaults are designed to address
+# the needs of the vast majority of T4 customers. The basic idea is to have
+# a default configuration which allows a customer to plug a T4 adapter in and
+# have it work regardless of OS, driver or application except in the most
+# unusual and/or demanding customer applications.
+#
+# Many of the T4 resources which are described by this configuration are
+# finite. This requires balancing the configuration/operation needs of
+# device drivers across OSes and a large number of customer application.
+#
+# Some of the more important resources to allocate and their constaints are:
+# 1. Virtual Interfaces: 128.
+# 2. Ingress Queues with Free Lists: 1024. PCI-E SR-IOV Virtual Functions
+# must use a power of 2 Ingress Queues.
+# 3. Egress Queues: 128K. PCI-E SR-IOV Virtual Functions must use a
+# power of 2 Egress Queues.
+# 4. MSI-X Vectors: 1088. A complication here is that the PCI-E SR-IOV
+# Virtual Functions based off of a Physical Function all get the
+# same umber of MSI-X Vectors as the base Physical Function.
+# Additionally, regardless of whether Virtual Functions are enabled or
+# not, their MSI-X "needs" are counted by the PCI-E implementation.
+# And finally, all Physical Funcations capable of supporting Virtual
+# Functions (PF0-3) must have the same number of configured TotalVFs in
+# their SR-IOV Capabilities.
+# 5. Multi-Port Support (MPS) TCAM: 336 entries to support MAC destination
+# address matching on Ingress Packets.
+#
+# Some of the important OS/Driver resource needs are:
+# 6. Some OS Drivers will manage all resources through a single Physical
+# Function (currently PF0 but it could be any Physical Function). Thus,
+# this "Unified PF" will need to have enough resources allocated to it
+# to allow for this. And because of the MSI-X resource allocation
+# constraints mentioned above, this probably means we'll either have to
+# severely limit the TotalVFs if we continue to use PF0 as the Unified PF
+# or we'll need to move the Unified PF into the PF4-7 range since those
+# Physical Functions don't have any Virtual Functions associated with
+# them.
+# 7. Some OS Drivers will manage different ports and functions (NIC,
+# storage, etc.) on different Physical Functions. For example, NIC
+# functions for ports 0-3 on PF0-3, FCoE on PF4, iSCSI on PF5, etc.
+#
+# Some of the customer application needs which need to be accommodated:
+# 8. Some customers will want to support large CPU count systems with
+# good scaling. Thus, we'll need to accommodate a number of
+# Ingress Queues and MSI-X Vectors to allow up to some number of CPUs
+# to be involved per port and per application function. For example,
+# in the case where all ports and application functions will be
+# managed via a single Unified PF and we want to accommodate scaling up
+# to 8 CPUs, we would want:
+#
+# 4 ports *
+# 3 application functions (NIC, FCoE, iSCSI) per port *
+# 8 Ingress Queue/MSI-X Vectors per application function
+#
+# for a total of 96 Ingress Queues and MSI-X Vectors on the Unified PF.
+# (Plus a few for Firmware Event Queues, etc.)
+#
+# 9. Some customers will want to use T4's PCI-E SR-IOV Capability to allow
+# Virtual Machines to directly access T4 functionality via SR-IOV
+# Virtual Functions and "PCI Device Passthrough" -- this is especially
+# true for the NIC application functionality. (Note that there is
+# currently no ability to use the TOE, FCoE, iSCSI, etc. via Virtual
+# Functions so this is in fact solely limited to NIC.)
+#
+
+
+# Global configuration settings.
+#
+[global]
+ rss_glb_config_mode = basicvirtual
+ rss_glb_config_options = tnlmapen,hashtoeplitz,tnlalllkp
+
+ # The following Scatter Gather Engine (SGE) settings assume a 4KB Host
+ # Page Size and a 64B L1 Cache Line Size. It programs the
+ # EgrStatusPageSize and IngPadBoundary to 64B and the PktShift to 2.
+ # If a Master PF Driver finds itself on a machine with different
+ # parameters, then the Master PF Driver is responsible for initializing
+ # these parameters to appropriate values.
+ #
+ # Notes:
+ # 1. The Free List Buffer Sizes below are raw and the firmware will
+ # round them up to the Ingress Padding Boundary.
+ # 2. The SGE Timer Values below are expressed below in microseconds.
+ # The firmware will convert these values to Core Clock Ticks when
+ # it processes the configuration parameters.
+ #
+ reg[0x1008] = 0x40810/0x21c70 # SGE_CONTROL
+ reg[0x100c] = 0x22222222 # SGE_HOST_PAGE_SIZE
+ reg[0x10a0] = 0x01040810 # SGE_INGRESS_RX_THRESHOLD
+ reg[0x1044] = 4096 # SGE_FL_BUFFER_SIZE0
+ reg[0x1048] = 65536 # SGE_FL_BUFFER_SIZE1
+ reg[0x104c] = 1536 # SGE_FL_BUFFER_SIZE2
+ reg[0x1050] = 9024 # SGE_FL_BUFFER_SIZE3
+ reg[0x1054] = 9216 # SGE_FL_BUFFER_SIZE4
+ reg[0x1058] = 2048 # SGE_FL_BUFFER_SIZE5
+ reg[0x105c] = 128 # SGE_FL_BUFFER_SIZE6
+ reg[0x1060] = 8192 # SGE_FL_BUFFER_SIZE7
+ reg[0x1064] = 16384 # SGE_FL_BUFFER_SIZE8
+ reg[0x10a4] = 0xa000a000/0xf000f000 # SGE_DBFIFO_STATUS
+ reg[0x10a8] = 0x2000/0x2000 # SGE_DOORBELL_CONTROL
+ sge_timer_value = 5, 10, 20, 50, 100, 200 # SGE_TIMER_VALUE* in usecs
+
+ reg[0x7dc0] = 0x64f8849 # TP_SHIFT_CNT
+
+ # Selection of tuples for LE filter lookup, fields (and widths which
+ # must sum to <= 36): { IP Fragment (1), MPS Match Type (3),
+ # IP Protocol (8), [Inner] VLAN (17), Port (3), FCoE (1) }
+ #
+ filterMode = fragmentation, mpshittype, protocol, vnic_id, port, fcoe
+
+ # Percentage of dynamic memory (in either the EDRAM or external MEM)
+ # to use for TP RX payload
+ tp_pmrx = 30
+
+ # TP RX payload page size
+ tp_pmrx_pagesize = 64K
+
+ # Percentage of dynamic memory (in either the EDRAM or external MEM)
+ # to use for TP TX payload
+ tp_pmtx = 50
+
+ # TP TX payload page size
+ tp_pmtx_pagesize = 64K
+
+# Some "definitions" to make the rest of this a bit more readable. We support
+# 4 ports, 3 functions (NIC, FCoE and iSCSI), scaling up to 8 "CPU Queue Sets"
+# per function per port ...
+#
+# NMSIX = 1088 # available MSI-X Vectors
+# NVI = 128 # available Virtual Interfaces
+# NMPSTCAM = 336 # MPS TCAM entries
+#
+# NPORTS = 4 # ports
+# NCPUS = 8 # CPUs we want to support scalably
+# NFUNCS = 3 # functions per port (NIC, FCoE, iSCSI)
+
+# Breakdown of Virtual Interface/Queue/Interrupt resources for the "Unified
+# PF" which many OS Drivers will use to manage most or all functions.
+#
+# Each Ingress Queue can use one MSI-X interrupt but some Ingress Queues can
+# use Forwarded Interrupt Ingress Queues. For these latter, an Ingress Queue
+# would be created and the Queue ID of a Forwarded Interrupt Ingress Queue
+# will be specified as the "Ingress Queue Asynchronous Destination Index."
+# Thus, the number of MSI-X Vectors assigned to the Unified PF will be less
+# than or equal to the number of Ingress Queues ...
+#
+# NVI_NIC = 4 # NIC access to NPORTS
+# NFLIQ_NIC = 32 # NIC Ingress Queues with Free Lists
+# NETHCTRL_NIC = 32 # NIC Ethernet Control/TX Queues
+# NEQ_NIC = 64 # NIC Egress Queues (FL, ETHCTRL/TX)
+# NMPSTCAM_NIC = 16 # NIC MPS TCAM Entries (NPORTS*4)
+# NMSIX_NIC = 32 # NIC MSI-X Interrupt Vectors (FLIQ)
+#
+# NVI_OFLD = 0 # Offload uses NIC function to access ports
+# NFLIQ_OFLD = 16 # Offload Ingress Queues with Free Lists
+# NETHCTRL_OFLD = 0 # Offload Ethernet Control/TX Queues
+# NEQ_OFLD = 16 # Offload Egress Queues (FL)
+# NMPSTCAM_OFLD = 0 # Offload MPS TCAM Entries (uses NIC's)
+# NMSIX_OFLD = 16 # Offload MSI-X Interrupt Vectors (FLIQ)
+#
+# NVI_RDMA = 0 # RDMA uses NIC function to access ports
+# NFLIQ_RDMA = 4 # RDMA Ingress Queues with Free Lists
+# NETHCTRL_RDMA = 0 # RDMA Ethernet Control/TX Queues
+# NEQ_RDMA = 4 # RDMA Egress Queues (FL)
+# NMPSTCAM_RDMA = 0 # RDMA MPS TCAM Entries (uses NIC's)
+# NMSIX_RDMA = 4 # RDMA MSI-X Interrupt Vectors (FLIQ)
+#
+# NEQ_WD = 128 # Wire Direct TX Queues and FLs
+# NETHCTRL_WD = 64 # Wire Direct TX Queues
+# NFLIQ_WD = 64 ` # Wire Direct Ingress Queues with Free Lists
+#
+# NVI_ISCSI = 4 # ISCSI access to NPORTS
+# NFLIQ_ISCSI = 4 # ISCSI Ingress Queues with Free Lists
+# NETHCTRL_ISCSI = 0 # ISCSI Ethernet Control/TX Queues
+# NEQ_ISCSI = 4 # ISCSI Egress Queues (FL)
+# NMPSTCAM_ISCSI = 4 # ISCSI MPS TCAM Entries (NPORTS)
+# NMSIX_ISCSI = 4 # ISCSI MSI-X Interrupt Vectors (FLIQ)
+#
+# NVI_FCOE = 4 # FCOE access to NPORTS
+# NFLIQ_FCOE = 34 # FCOE Ingress Queues with Free Lists
+# NETHCTRL_FCOE = 32 # FCOE Ethernet Control/TX Queues
+# NEQ_FCOE = 66 # FCOE Egress Queues (FL)
+# NMPSTCAM_FCOE = 32 # FCOE MPS TCAM Entries (NPORTS)
+# NMSIX_FCOE = 34 # FCOE MSI-X Interrupt Vectors (FLIQ)
+
+# Two extra Ingress Queues per function for Firmware Events and Forwarded
+# Interrupts, and two extra interrupts per function for Firmware Events (or a
+# Forwarded Interrupt Queue) and General Interrupts per function.
+#
+# NFLIQ_EXTRA = 6 # "extra" Ingress Queues 2*NFUNCS (Firmware and
+# # Forwarded Interrupts
+# NMSIX_EXTRA = 6 # extra interrupts 2*NFUNCS (Firmware and
+# # General Interrupts
+
+# Microsoft HyperV resources. The HyperV Virtual Ingress Queues will have
+# their interrupts forwarded to another set of Forwarded Interrupt Queues.
+#
+# NVI_HYPERV = 16 # VMs we want to support
+# NVIIQ_HYPERV = 2 # Virtual Ingress Queues with Free Lists per VM
+# NFLIQ_HYPERV = 40 # VIQs + NCPUS Forwarded Interrupt Queues
+# NEQ_HYPERV = 32 # VIQs Free Lists
+# NMPSTCAM_HYPERV = 16 # MPS TCAM Entries (NVI_HYPERV)
+# NMSIX_HYPERV = 8 # NCPUS Forwarded Interrupt Queues
+
+# Adding all of the above Unified PF resource needs together: (NIC + OFLD +
+# RDMA + ISCSI + FCOE + EXTRA + HYPERV)
+#
+# NVI_UNIFIED = 28
+# NFLIQ_UNIFIED = 106
+# NETHCTRL_UNIFIED = 32
+# NEQ_UNIFIED = 124
+# NMPSTCAM_UNIFIED = 40
+#
+# The sum of all the MSI-X resources above is 74 MSI-X Vectors but we'll round
+# that up to 128 to make sure the Unified PF doesn't run out of resources.
+#
+# NMSIX_UNIFIED = 128
+#
+# The Storage PFs could need up to NPORTS*NCPUS + NMSIX_EXTRA MSI-X Vectors
+# which is 34 but they're probably safe with 32.
+#
+# NMSIX_STORAGE = 32
+
+# Note: The UnifiedPF is PF4 which doesn't have any Virtual Functions
+# associated with it. Thus, the MSI-X Vector allocations we give to the
+# UnifiedPF aren't inherited by any Virtual Functions. As a result we can
+# provision many more Virtual Functions than we can if the UnifiedPF were
+# one of PF0-3.
+#
+
+# All of the below PCI-E parameters are actually stored in various *_init.txt
+# files. We include them below essentially as comments.
+#
+# For PF0-3 we assign 8 vectors each for NIC Ingress Queues of the associated
+# ports 0-3.
+#
+# For PF4, the Unified PF, we give it an MSI-X Table Size as outlined above.
+#
+# For PF5-6 we assign enough MSI-X Vectors to support FCoE and iSCSI
+# storage applications across all four possible ports.
+#
+# Additionally, since the UnifiedPF isn't one of the per-port Physical
+# Functions, we give the UnifiedPF and the PF0-3 Physical Functions
+# different PCI Device IDs which will allow Unified and Per-Port Drivers
+# to directly select the type of Physical Function to which they wish to be
+# attached.
+#
+# Note that the actual values used for the PCI-E Intelectual Property will be
+# 1 less than those below since that's the way it "counts" things. For
+# readability, we use the number we actually mean ...
+#
+# PF0_INT = 8 # NCPUS
+# PF1_INT = 8 # NCPUS
+# PF2_INT = 8 # NCPUS
+# PF3_INT = 8 # NCPUS
+# PF0_3_INT = 32 # PF0_INT + PF1_INT + PF2_INT + PF3_INT
+#
+# PF4_INT = 128 # NMSIX_UNIFIED
+# PF5_INT = 32 # NMSIX_STORAGE
+# PF6_INT = 32 # NMSIX_STORAGE
+# PF7_INT = 0 # Nothing Assigned
+# PF4_7_INT = 192 # PF4_INT + PF5_INT + PF6_INT + PF7_INT
+#
+# PF0_7_INT = 224 # PF0_3_INT + PF4_7_INT
+#
+# With the above we can get 17 VFs/PF0-3 (limited by 336 MPS TCAM entries)
+# but we'll lower that to 16 to make our total 64 and a nice power of 2 ...
+#
+# NVF = 16
+
+# For those OSes which manage different ports on different PFs, we need
+# only enough resources to support a single port's NIC application functions
+# on PF0-3. The below assumes that we're only doing NIC with NCPUS "Queue
+# Sets" for ports 0-3. The FCoE and iSCSI functions for such OSes will be
+# managed on the "storage PFs" (see below).
+#
+[function "0"]
+ nvf = 16 # NVF on this function
+ wx_caps = all # write/execute permissions for all commands
+ r_caps = all # read permissions for all commands
+ nvi = 1 # 1 port
+ niqflint = 8 # NCPUS "Queue Sets"
+ nethctrl = 8 # NCPUS "Queue Sets"
+ neq = 16 # niqflint + nethctrl Egress Queues
+ nexactf = 8 # number of exact MPSTCAM MAC filters
+ cmask = all # access to all channels
+ pmask = 0x1 # access to only one port
+
+[function "1"]
+ nvf = 16 # NVF on this function
+ wx_caps = all # write/execute permissions for all commands
+ r_caps = all # read permissions for all commands
+ nvi = 1 # 1 port
+ niqflint = 8 # NCPUS "Queue Sets"
+ nethctrl = 8 # NCPUS "Queue Sets"
+ neq = 16 # niqflint + nethctrl Egress Queues
+ nexactf = 8 # number of exact MPSTCAM MAC filters
+ cmask = all # access to all channels
+ pmask = 0x2 # access to only one port
+
+[function "2"]
+ nvf = 16 # NVF on this function
+ wx_caps = all # write/execute permissions for all commands
+ r_caps = all # read permissions for all commands
+ nvi = 1 # 1 port
+ niqflint = 8 # NCPUS "Queue Sets"
+ nethctrl = 8 # NCPUS "Queue Sets"
+ neq = 16 # niqflint + nethctrl Egress Queues
+ nexactf = 8 # number of exact MPSTCAM MAC filters
+ cmask = all # access to all channels
+ pmask = 0x4 # access to only one port
+
+[function "3"]
+ nvf = 16 # NVF on this function
+ wx_caps = all # write/execute permissions for all commands
+ r_caps = all # read permissions for all commands
+ nvi = 1 # 1 port
+ niqflint = 8 # NCPUS "Queue Sets"
+ nethctrl = 8 # NCPUS "Queue Sets"
+ neq = 16 # niqflint + nethctrl Egress Queues
+ nexactf = 8 # number of exact MPSTCAM MAC filters
+ cmask = all # access to all channels
+ pmask = 0x8 # access to only one port
+
+# Some OS Drivers manage all application functions for all ports via PF4.
+# Thus we need to provide a large number of resources here. For Egress
+# Queues we need to account for both TX Queues as well as Free List Queues
+# (because the host is responsible for producing Free List Buffers for the
+# hardware to consume).
+#
+[function "4"]
+ wx_caps = all # write/execute permissions for all commands
+ r_caps = all # read permissions for all commands
+ nvi = 28 # NVI_UNIFIED
+ niqflint = 170 # NFLIQ_UNIFIED + NLFIQ_WD
+ nethctrl = 96 # NETHCTRL_UNIFIED + NETHCTRL_WD
+ neq = 252 # NEQ_UNIFIED + NEQ_WD
+ nexactf = 40 # NMPSTCAM_UNIFIED
+ cmask = all # access to all channels
+ pmask = all # access to all four ports ...
+ nroute = 32 # number of routing region entries
+ nclip = 32 # number of clip region entries
+ nfilter = 768 # number of filter region entries
+ nserver = 256 # number of server region entries
+ nhash = 0 # number of hash region entries
+ protocol = nic_vm, ofld, rddp, rdmac, iscsi_initiator_pdu, iscsi_target_pdu
+ tp_l2t = 100
+ tp_ddp = 2
+ tp_ddp_iscsi = 2
+ tp_stag = 2
+ tp_pbl = 5
+ tp_rq = 7
+
+# We have FCoE and iSCSI storage functions on PF5 and PF6 each of which may
+# need to have Virtual Interfaces on each of the four ports with up to NCPUS
+# "Queue Sets" each.
+#
+[function "5"]
+ wx_caps = all # write/execute permissions for all commands
+ r_caps = all # read permissions for all commands
+ nvi = 4 # NPORTS
+ niqflint = 34 # NPORTS*NCPUS + NMSIX_EXTRA
+ nethctrl = 32 # NPORTS*NCPUS
+ neq = 64 # NPORTS*NCPUS * 2 (FL, ETHCTRL/TX)
+ nexactf = 4 # NPORTS
+ cmask = all # access to all channels
+ pmask = all # access to all four ports ...
+
+[function "6"]
+ wx_caps = all # write/execute permissions for all commands
+ r_caps = all # read permissions for all commands
+ nvi = 4 # NPORTS
+ niqflint = 34 # NPORTS*NCPUS + NMSIX_EXTRA
+ nethctrl = 32 # NPORTS*NCPUS
+ neq = 66 # NPORTS*NCPUS * 2 (FL, ETHCTRL/TX) + 2 (EXTRA)
+ nexactf = 32 # NPORTS + adding 28 exact entries for FCoE
+ # which is OK since < MIN(SUM PF0..3, PF4)
+ # and we never load PF0..3 and PF4 concurrently
+ cmask = all # access to all channels
+ pmask = all # access to all four ports ...
+ nhash = 0
+ protocol = fcoe_initiator
+ tp_ddp = 2
+ fcoe_nfcf = 16
+ fcoe_nvnp = 32
+ fcoe_nssn = 1024
+
+# For Virtual functions, we only allow NIC functionality and we only allow
+# access to one port (1 << PF). Note that because of limitations in the
+# Scatter Gather Engine (SGE) hardware which checks writes to VF KDOORBELL
+# and GTS registers, the number of Ingress and Egress Queues must be a power
+# of 2.
+#
+[function "0/*"] # NVF
+ wx_caps = 0x82 # DMAQ | VF
+ r_caps = 0x86 # DMAQ | VF | PORT
+ nvi = 1 # 1 port
+ niqflint = 4 # 2 "Queue Sets" + NXIQ
+ nethctrl = 2 # 2 "Queue Sets"
+ neq = 4 # 2 "Queue Sets" * 2
+ nexactf = 4
+ cmask = all # access to all channels
+ pmask = 0x1 # access to only one port ...
+
+[function "1/*"] # NVF
+ wx_caps = 0x82 # DMAQ | VF
+ r_caps = 0x86 # DMAQ | VF | PORT
+ nvi = 1 # 1 port
+ niqflint = 4 # 2 "Queue Sets" + NXIQ
+ nethctrl = 2 # 2 "Queue Sets"
+ neq = 4 # 2 "Queue Sets" * 2
+ nexactf = 4
+ cmask = all # access to all channels
+ pmask = 0x2 # access to only one port ...
+
+[function "2/*"] # NVF
+ wx_caps = 0x82 # DMAQ | VF
+ r_caps = 0x86 # DMAQ | VF | PORT
+ nvi = 1 # 1 port
+ niqflint = 4 # 2 "Queue Sets" + NXIQ
+ nethctrl = 2 # 2 "Queue Sets"
+ neq = 4 # 2 "Queue Sets" * 2
+ nexactf = 4
+ cmask = all # access to all channels
+ pmask = 0x4 # access to only one port ...
+
+[function "3/*"] # NVF
+ wx_caps = 0x82 # DMAQ | VF
+ r_caps = 0x86 # DMAQ | VF | PORT
+ nvi = 1 # 1 port
+ niqflint = 4 # 2 "Queue Sets" + NXIQ
+ nethctrl = 2 # 2 "Queue Sets"
+ neq = 4 # 2 "Queue Sets" * 2
+ nexactf = 4
+ cmask = all # access to all channels
+ pmask = 0x8 # access to only one port ...
+
+# MPS features a 196608 bytes ingress buffer that is used for ingress buffering
+# for packets from the wire as well as the loopback path of the L2 switch. The
+# folling params control how the buffer memory is distributed and the L2 flow
+# control settings:
+#
+# bg_mem: %-age of mem to use for port/buffer group
+# lpbk_mem: %-age of port/bg mem to use for loopback
+# hwm: high watermark; bytes available when starting to send pause
+# frames (in units of 0.1 MTU)
+# lwm: low watermark; bytes remaining when sending 'unpause' frame
+# (in inuits of 0.1 MTU)
+# dwm: minimum delta between high and low watermark (in units of 100
+# Bytes)
+#
+[port "0"]
+ dcb = ppp, dcbx # configure for DCB PPP and enable DCBX offload
+ bg_mem = 25
+ lpbk_mem = 25
+ hwm = 30
+ lwm = 15
+ dwm = 30
+
+[port "1"]
+ dcb = ppp, dcbx
+ bg_mem = 25
+ lpbk_mem = 25
+ hwm = 30
+ lwm = 15
+ dwm = 30
+
+[port "2"]
+ dcb = ppp, dcbx
+ bg_mem = 25
+ lpbk_mem = 25
+ hwm = 30
+ lwm = 15
+ dwm = 30
+
+[port "3"]
+ dcb = ppp, dcbx
+ bg_mem = 25
+ lpbk_mem = 25
+ hwm = 30
+ lwm = 15
+ dwm = 30
+
+[fini]
+ version = 0x14250007
+ checksum = 0xfcbadefb
+
+# Total resources used by above allocations:
+# Virtual Interfaces: 104
+# Ingress Queues/w Free Lists and Interrupts: 526
+# Egress Queues: 702
+# MPS TCAM Entries: 336
+# MSI-X Vectors: 736
+# Virtual Functions: 64
+#
+# $FreeBSD$
+#
diff --git a/sys/dev/cxgbe/firmware/t4fw_interface.h b/sys/dev/cxgbe/firmware/t4fw_interface.h
new file mode 100644
index 0000000..6d259a5
--- /dev/null
+++ b/sys/dev/cxgbe/firmware/t4fw_interface.h
@@ -0,0 +1,6077 @@
+/*-
+ * Copyright (c) 2011 Chelsio Communications, Inc.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ *
+ */
+
+#ifndef _T4FW_INTERFACE_H_
+#define _T4FW_INTERFACE_H_
+
+/******************************************************************************
+ * R E T U R N V A L U E S
+ ********************************/
+
+enum fw_retval {
+ FW_SUCCESS = 0, /* completed sucessfully */
+ FW_EPERM = 1, /* operation not permitted */
+ FW_ENOENT = 2, /* no such file or directory */
+ FW_EIO = 5, /* input/output error; hw bad */
+ FW_ENOEXEC = 8, /* exec format error; inv microcode */
+ FW_EAGAIN = 11, /* try again */
+ FW_ENOMEM = 12, /* out of memory */
+ FW_EFAULT = 14, /* bad address; fw bad */
+ FW_EBUSY = 16, /* resource busy */
+ FW_EEXIST = 17, /* file exists */
+ FW_EINVAL = 22, /* invalid argument */
+ FW_ENOSPC = 28, /* no space left on device */
+ FW_ENOSYS = 38, /* functionality not implemented */
+ FW_EPROTO = 71, /* protocol error */
+ FW_EADDRINUSE = 98, /* address already in use */
+ FW_EADDRNOTAVAIL = 99, /* cannot assigned requested address */
+ FW_ENETDOWN = 100, /* network is down */
+ FW_ENETUNREACH = 101, /* network is unreachable */
+ FW_ENOBUFS = 105, /* no buffer space available */
+ FW_ETIMEDOUT = 110, /* timeout */
+ FW_EINPROGRESS = 115, /* fw internal */
+ FW_SCSI_ABORT_REQUESTED = 128, /* */
+ FW_SCSI_ABORT_TIMEDOUT = 129, /* */
+ FW_SCSI_ABORTED = 130, /* */
+ FW_SCSI_CLOSE_REQUESTED = 131, /* */
+ FW_ERR_LINK_DOWN = 132, /* */
+ FW_RDEV_NOT_READY = 133, /* */
+ FW_ERR_RDEV_LOST = 134, /* */
+ FW_ERR_RDEV_LOGO = 135, /* */
+ FW_FCOE_NO_XCHG = 136, /* */
+ FW_SCSI_RSP_ERR = 137, /* */
+ FW_ERR_RDEV_IMPL_LOGO = 138, /* */
+ FW_SCSI_UNDER_FLOW_ERR = 139, /* */
+ FW_SCSI_OVER_FLOW_ERR = 140, /* */
+ FW_SCSI_DDP_ERR = 141, /* DDP error*/
+ FW_SCSI_TASK_ERR = 142, /* No SCSI tasks available */
+};
+
+/******************************************************************************
+ * W O R K R E Q U E S T s
+ ********************************/
+
+enum fw_wr_opcodes {
+ FW_FILTER_WR = 0x02,
+ FW_ULPTX_WR = 0x04,
+ FW_TP_WR = 0x05,
+ FW_ETH_TX_PKT_WR = 0x08,
+ FW_ETH_TX_PKTS_WR = 0x09,
+ FW_EQ_FLUSH_WR = 0x1b,
+ FW_FLOWC_WR = 0x0a,
+ FW_OFLD_TX_DATA_WR = 0x0b,
+ FW_CMD_WR = 0x10,
+ FW_ETH_TX_PKT_VM_WR = 0x11,
+ FW_RI_RES_WR = 0x0c,
+ FW_RI_RDMA_WRITE_WR = 0x14,
+ FW_RI_SEND_WR = 0x15,
+ FW_RI_RDMA_READ_WR = 0x16,
+ FW_RI_RECV_WR = 0x17,
+ FW_RI_BIND_MW_WR = 0x18,
+ FW_RI_FR_NSMR_WR = 0x19,
+ FW_RI_INV_LSTAG_WR = 0x1a,
+ FW_RI_WR = 0x0d,
+ FW_ISCSI_NODE_WR = 0x4a,
+ FW_LASTC2E_WR = 0x50
+};
+
+/*
+ * Generic work request header flit0
+ */
+struct fw_wr_hdr {
+ __be32 hi;
+ __be32 lo;
+};
+
+/* work request opcode (hi)
+ */
+#define S_FW_WR_OP 24
+#define M_FW_WR_OP 0xff
+#define V_FW_WR_OP(x) ((x) << S_FW_WR_OP)
+#define G_FW_WR_OP(x) (((x) >> S_FW_WR_OP) & M_FW_WR_OP)
+
+/* atomic flag (hi) - firmware encapsulates CPLs in CPL_BARRIER
+ */
+#define S_FW_WR_ATOMIC 23
+#define M_FW_WR_ATOMIC 0x1
+#define V_FW_WR_ATOMIC(x) ((x) << S_FW_WR_ATOMIC)
+#define G_FW_WR_ATOMIC(x) \
+ (((x) >> S_FW_WR_ATOMIC) & M_FW_WR_ATOMIC)
+#define F_FW_WR_ATOMIC V_FW_WR_ATOMIC(1U)
+
+/* flush flag (hi) - firmware flushes flushable work request buffered
+ * in the flow context.
+ */
+#define S_FW_WR_FLUSH 22
+#define M_FW_WR_FLUSH 0x1
+#define V_FW_WR_FLUSH(x) ((x) << S_FW_WR_FLUSH)
+#define G_FW_WR_FLUSH(x) \
+ (((x) >> S_FW_WR_FLUSH) & M_FW_WR_FLUSH)
+#define F_FW_WR_FLUSH V_FW_WR_FLUSH(1U)
+
+/* completion flag (hi) - firmware generates a cpl_fw6_ack
+ */
+#define S_FW_WR_COMPL 21
+#define M_FW_WR_COMPL 0x1
+#define V_FW_WR_COMPL(x) ((x) << S_FW_WR_COMPL)
+#define G_FW_WR_COMPL(x) \
+ (((x) >> S_FW_WR_COMPL) & M_FW_WR_COMPL)
+#define F_FW_WR_COMPL V_FW_WR_COMPL(1U)
+
+
+/* work request immediate data lengh (hi)
+ */
+#define S_FW_WR_IMMDLEN 0
+#define M_FW_WR_IMMDLEN 0xff
+#define V_FW_WR_IMMDLEN(x) ((x) << S_FW_WR_IMMDLEN)
+#define G_FW_WR_IMMDLEN(x) \
+ (((x) >> S_FW_WR_IMMDLEN) & M_FW_WR_IMMDLEN)
+
+/* egress queue status update to associated ingress queue entry (lo)
+ */
+#define S_FW_WR_EQUIQ 31
+#define M_FW_WR_EQUIQ 0x1
+#define V_FW_WR_EQUIQ(x) ((x) << S_FW_WR_EQUIQ)
+#define G_FW_WR_EQUIQ(x) (((x) >> S_FW_WR_EQUIQ) & M_FW_WR_EQUIQ)
+#define F_FW_WR_EQUIQ V_FW_WR_EQUIQ(1U)
+
+/* egress queue status update to egress queue status entry (lo)
+ */
+#define S_FW_WR_EQUEQ 30
+#define M_FW_WR_EQUEQ 0x1
+#define V_FW_WR_EQUEQ(x) ((x) << S_FW_WR_EQUEQ)
+#define G_FW_WR_EQUEQ(x) (((x) >> S_FW_WR_EQUEQ) & M_FW_WR_EQUEQ)
+#define F_FW_WR_EQUEQ V_FW_WR_EQUEQ(1U)
+
+/* flow context identifier (lo)
+ */
+#define S_FW_WR_FLOWID 8
+#define M_FW_WR_FLOWID 0xfffff
+#define V_FW_WR_FLOWID(x) ((x) << S_FW_WR_FLOWID)
+#define G_FW_WR_FLOWID(x) (((x) >> S_FW_WR_FLOWID) & M_FW_WR_FLOWID)
+
+/* length in units of 16-bytes (lo)
+ */
+#define S_FW_WR_LEN16 0
+#define M_FW_WR_LEN16 0xff
+#define V_FW_WR_LEN16(x) ((x) << S_FW_WR_LEN16)
+#define G_FW_WR_LEN16(x) (((x) >> S_FW_WR_LEN16) & M_FW_WR_LEN16)
+
+/* valid filter configurations for compressed tuple
+ * Encodings: TPL - Compressed TUPLE for filter in addition to 4-tuple
+ * FR - FRAGMENT, FC - FCoE, MT - MPS MATCH TYPE, M - MPS MATCH,
+ * E - Ethertype, P - Port, PR - Protocol, T - TOS, IV - Inner VLAN,
+ * OV - Outer VLAN/VNIC_ID,
+*/
+#define HW_TPL_FR_MT_M_E_P_FC 0x3C3
+#define HW_TPL_FR_MT_M_PR_T_FC 0x3B3
+#define HW_TPL_FR_MT_M_IV_P_FC 0x38B
+#define HW_TPL_FR_MT_M_OV_P_FC 0x387
+#define HW_TPL_FR_MT_E_PR_T 0x370
+#define HW_TPL_FR_MT_E_PR_P_FC 0X363
+#define HW_TPL_FR_MT_E_T_P_FC 0X353
+#define HW_TPL_FR_MT_PR_IV_P_FC 0X32B
+#define HW_TPL_FR_MT_PR_OV_P_FC 0X327
+#define HW_TPL_FR_MT_T_IV_P_FC 0X31B
+#define HW_TPL_FR_MT_T_OV_P_FC 0X317
+#define HW_TPL_FR_M_E_PR_FC 0X2E1
+#define HW_TPL_FR_M_E_T_FC 0X2D1
+#define HW_TPL_FR_M_PR_IV_FC 0X2A9
+#define HW_TPL_FR_M_PR_OV_FC 0X2A5
+#define HW_TPL_FR_M_T_IV_FC 0X299
+#define HW_TPL_FR_M_T_OV_FC 0X295
+#define HW_TPL_FR_E_PR_T_P 0X272
+#define HW_TPL_FR_E_PR_T_FC 0X271
+#define HW_TPL_FR_E_IV_FC 0X249
+#define HW_TPL_FR_E_OV_FC 0X245
+#define HW_TPL_FR_PR_T_IV_FC 0X239
+#define HW_TPL_FR_PR_T_OV_FC 0X235
+#define HW_TPL_FR_IV_OV_FC 0X20D
+#define HW_TPL_MT_M_E_PR 0X1E0
+#define HW_TPL_MT_M_E_T 0X1D0
+#define HW_TPL_MT_E_PR_T_FC 0X171
+#define HW_TPL_MT_E_IV 0X148
+#define HW_TPL_MT_E_OV 0X144
+#define HW_TPL_MT_PR_T_IV 0X138
+#define HW_TPL_MT_PR_T_OV 0X134
+#define HW_TPL_M_E_PR_P 0X0E2
+#define HW_TPL_M_E_T_P 0X0D2
+#define HW_TPL_E_PR_T_P_FC 0X073
+#define HW_TPL_E_IV_P 0X04A
+#define HW_TPL_E_OV_P 0X046
+#define HW_TPL_PR_T_IV_P 0X03A
+#define HW_TPL_PR_T_OV_P 0X036
+
+/* filter wr reply code in cookie in CPL_SET_TCB_RPL */
+enum fw_filter_wr_cookie {
+ FW_FILTER_WR_SUCCESS,
+ FW_FILTER_WR_FLT_ADDED,
+ FW_FILTER_WR_FLT_DELETED,
+ FW_FILTER_WR_SMT_TBL_FULL,
+ FW_FILTER_WR_EINVAL,
+};
+
+struct fw_filter_wr {
+ __be32 op_pkd;
+ __be32 len16_pkd;
+ __be64 r3;
+ __be32 tid_to_iq;
+ __be32 del_filter_to_l2tix;
+ __be16 ethtype;
+ __be16 ethtypem;
+ __u8 frag_to_ovlan_vldm;
+ __u8 smac_sel;
+ __be16 rx_chan_rx_rpl_iq;
+ __be32 maci_to_matchtypem;
+ __u8 ptcl;
+ __u8 ptclm;
+ __u8 ttyp;
+ __u8 ttypm;
+ __be16 ivlan;
+ __be16 ivlanm;
+ __be16 ovlan;
+ __be16 ovlanm;
+ __u8 lip[16];
+ __u8 lipm[16];
+ __u8 fip[16];
+ __u8 fipm[16];
+ __be16 lp;
+ __be16 lpm;
+ __be16 fp;
+ __be16 fpm;
+ __be16 r7;
+ __u8 sma[6];
+};
+
+#define S_FW_FILTER_WR_TID 12
+#define M_FW_FILTER_WR_TID 0xfffff
+#define V_FW_FILTER_WR_TID(x) ((x) << S_FW_FILTER_WR_TID)
+#define G_FW_FILTER_WR_TID(x) \
+ (((x) >> S_FW_FILTER_WR_TID) & M_FW_FILTER_WR_TID)
+
+#define S_FW_FILTER_WR_RQTYPE 11
+#define M_FW_FILTER_WR_RQTYPE 0x1
+#define V_FW_FILTER_WR_RQTYPE(x) ((x) << S_FW_FILTER_WR_RQTYPE)
+#define G_FW_FILTER_WR_RQTYPE(x) \
+ (((x) >> S_FW_FILTER_WR_RQTYPE) & M_FW_FILTER_WR_RQTYPE)
+#define F_FW_FILTER_WR_RQTYPE V_FW_FILTER_WR_RQTYPE(1U)
+
+#define S_FW_FILTER_WR_NOREPLY 10
+#define M_FW_FILTER_WR_NOREPLY 0x1
+#define V_FW_FILTER_WR_NOREPLY(x) ((x) << S_FW_FILTER_WR_NOREPLY)
+#define G_FW_FILTER_WR_NOREPLY(x) \
+ (((x) >> S_FW_FILTER_WR_NOREPLY) & M_FW_FILTER_WR_NOREPLY)
+#define F_FW_FILTER_WR_NOREPLY V_FW_FILTER_WR_NOREPLY(1U)
+
+#define S_FW_FILTER_WR_IQ 0
+#define M_FW_FILTER_WR_IQ 0x3ff
+#define V_FW_FILTER_WR_IQ(x) ((x) << S_FW_FILTER_WR_IQ)
+#define G_FW_FILTER_WR_IQ(x) \
+ (((x) >> S_FW_FILTER_WR_IQ) & M_FW_FILTER_WR_IQ)
+
+#define S_FW_FILTER_WR_DEL_FILTER 31
+#define M_FW_FILTER_WR_DEL_FILTER 0x1
+#define V_FW_FILTER_WR_DEL_FILTER(x) ((x) << S_FW_FILTER_WR_DEL_FILTER)
+#define G_FW_FILTER_WR_DEL_FILTER(x) \
+ (((x) >> S_FW_FILTER_WR_DEL_FILTER) & M_FW_FILTER_WR_DEL_FILTER)
+#define F_FW_FILTER_WR_DEL_FILTER V_FW_FILTER_WR_DEL_FILTER(1U)
+
+#define S_FW_FILTER_WR_RPTTID 25
+#define M_FW_FILTER_WR_RPTTID 0x1
+#define V_FW_FILTER_WR_RPTTID(x) ((x) << S_FW_FILTER_WR_RPTTID)
+#define G_FW_FILTER_WR_RPTTID(x) \
+ (((x) >> S_FW_FILTER_WR_RPTTID) & M_FW_FILTER_WR_RPTTID)
+#define F_FW_FILTER_WR_RPTTID V_FW_FILTER_WR_RPTTID(1U)
+
+#define S_FW_FILTER_WR_DROP 24
+#define M_FW_FILTER_WR_DROP 0x1
+#define V_FW_FILTER_WR_DROP(x) ((x) << S_FW_FILTER_WR_DROP)
+#define G_FW_FILTER_WR_DROP(x) \
+ (((x) >> S_FW_FILTER_WR_DROP) & M_FW_FILTER_WR_DROP)
+#define F_FW_FILTER_WR_DROP V_FW_FILTER_WR_DROP(1U)
+
+#define S_FW_FILTER_WR_DIRSTEER 23
+#define M_FW_FILTER_WR_DIRSTEER 0x1
+#define V_FW_FILTER_WR_DIRSTEER(x) ((x) << S_FW_FILTER_WR_DIRSTEER)
+#define G_FW_FILTER_WR_DIRSTEER(x) \
+ (((x) >> S_FW_FILTER_WR_DIRSTEER) & M_FW_FILTER_WR_DIRSTEER)
+#define F_FW_FILTER_WR_DIRSTEER V_FW_FILTER_WR_DIRSTEER(1U)
+
+#define S_FW_FILTER_WR_MASKHASH 22
+#define M_FW_FILTER_WR_MASKHASH 0x1
+#define V_FW_FILTER_WR_MASKHASH(x) ((x) << S_FW_FILTER_WR_MASKHASH)
+#define G_FW_FILTER_WR_MASKHASH(x) \
+ (((x) >> S_FW_FILTER_WR_MASKHASH) & M_FW_FILTER_WR_MASKHASH)
+#define F_FW_FILTER_WR_MASKHASH V_FW_FILTER_WR_MASKHASH(1U)
+
+#define S_FW_FILTER_WR_DIRSTEERHASH 21
+#define M_FW_FILTER_WR_DIRSTEERHASH 0x1
+#define V_FW_FILTER_WR_DIRSTEERHASH(x) ((x) << S_FW_FILTER_WR_DIRSTEERHASH)
+#define G_FW_FILTER_WR_DIRSTEERHASH(x) \
+ (((x) >> S_FW_FILTER_WR_DIRSTEERHASH) & M_FW_FILTER_WR_DIRSTEERHASH)
+#define F_FW_FILTER_WR_DIRSTEERHASH V_FW_FILTER_WR_DIRSTEERHASH(1U)
+
+#define S_FW_FILTER_WR_LPBK 20
+#define M_FW_FILTER_WR_LPBK 0x1
+#define V_FW_FILTER_WR_LPBK(x) ((x) << S_FW_FILTER_WR_LPBK)
+#define G_FW_FILTER_WR_LPBK(x) \
+ (((x) >> S_FW_FILTER_WR_LPBK) & M_FW_FILTER_WR_LPBK)
+#define F_FW_FILTER_WR_LPBK V_FW_FILTER_WR_LPBK(1U)
+
+#define S_FW_FILTER_WR_DMAC 19
+#define M_FW_FILTER_WR_DMAC 0x1
+#define V_FW_FILTER_WR_DMAC(x) ((x) << S_FW_FILTER_WR_DMAC)
+#define G_FW_FILTER_WR_DMAC(x) \
+ (((x) >> S_FW_FILTER_WR_DMAC) & M_FW_FILTER_WR_DMAC)
+#define F_FW_FILTER_WR_DMAC V_FW_FILTER_WR_DMAC(1U)
+
+#define S_FW_FILTER_WR_SMAC 18
+#define M_FW_FILTER_WR_SMAC 0x1
+#define V_FW_FILTER_WR_SMAC(x) ((x) << S_FW_FILTER_WR_SMAC)
+#define G_FW_FILTER_WR_SMAC(x) \
+ (((x) >> S_FW_FILTER_WR_SMAC) & M_FW_FILTER_WR_SMAC)
+#define F_FW_FILTER_WR_SMAC V_FW_FILTER_WR_SMAC(1U)
+
+#define S_FW_FILTER_WR_INSVLAN 17
+#define M_FW_FILTER_WR_INSVLAN 0x1
+#define V_FW_FILTER_WR_INSVLAN(x) ((x) << S_FW_FILTER_WR_INSVLAN)
+#define G_FW_FILTER_WR_INSVLAN(x) \
+ (((x) >> S_FW_FILTER_WR_INSVLAN) & M_FW_FILTER_WR_INSVLAN)
+#define F_FW_FILTER_WR_INSVLAN V_FW_FILTER_WR_INSVLAN(1U)
+
+#define S_FW_FILTER_WR_RMVLAN 16
+#define M_FW_FILTER_WR_RMVLAN 0x1
+#define V_FW_FILTER_WR_RMVLAN(x) ((x) << S_FW_FILTER_WR_RMVLAN)
+#define G_FW_FILTER_WR_RMVLAN(x) \
+ (((x) >> S_FW_FILTER_WR_RMVLAN) & M_FW_FILTER_WR_RMVLAN)
+#define F_FW_FILTER_WR_RMVLAN V_FW_FILTER_WR_RMVLAN(1U)
+
+#define S_FW_FILTER_WR_HITCNTS 15
+#define M_FW_FILTER_WR_HITCNTS 0x1
+#define V_FW_FILTER_WR_HITCNTS(x) ((x) << S_FW_FILTER_WR_HITCNTS)
+#define G_FW_FILTER_WR_HITCNTS(x) \
+ (((x) >> S_FW_FILTER_WR_HITCNTS) & M_FW_FILTER_WR_HITCNTS)
+#define F_FW_FILTER_WR_HITCNTS V_FW_FILTER_WR_HITCNTS(1U)
+
+#define S_FW_FILTER_WR_TXCHAN 13
+#define M_FW_FILTER_WR_TXCHAN 0x3
+#define V_FW_FILTER_WR_TXCHAN(x) ((x) << S_FW_FILTER_WR_TXCHAN)
+#define G_FW_FILTER_WR_TXCHAN(x) \
+ (((x) >> S_FW_FILTER_WR_TXCHAN) & M_FW_FILTER_WR_TXCHAN)
+
+#define S_FW_FILTER_WR_PRIO 12
+#define M_FW_FILTER_WR_PRIO 0x1
+#define V_FW_FILTER_WR_PRIO(x) ((x) << S_FW_FILTER_WR_PRIO)
+#define G_FW_FILTER_WR_PRIO(x) \
+ (((x) >> S_FW_FILTER_WR_PRIO) & M_FW_FILTER_WR_PRIO)
+#define F_FW_FILTER_WR_PRIO V_FW_FILTER_WR_PRIO(1U)
+
+#define S_FW_FILTER_WR_L2TIX 0
+#define M_FW_FILTER_WR_L2TIX 0xfff
+#define V_FW_FILTER_WR_L2TIX(x) ((x) << S_FW_FILTER_WR_L2TIX)
+#define G_FW_FILTER_WR_L2TIX(x) \
+ (((x) >> S_FW_FILTER_WR_L2TIX) & M_FW_FILTER_WR_L2TIX)
+
+#define S_FW_FILTER_WR_FRAG 7
+#define M_FW_FILTER_WR_FRAG 0x1
+#define V_FW_FILTER_WR_FRAG(x) ((x) << S_FW_FILTER_WR_FRAG)
+#define G_FW_FILTER_WR_FRAG(x) \
+ (((x) >> S_FW_FILTER_WR_FRAG) & M_FW_FILTER_WR_FRAG)
+#define F_FW_FILTER_WR_FRAG V_FW_FILTER_WR_FRAG(1U)
+
+#define S_FW_FILTER_WR_FRAGM 6
+#define M_FW_FILTER_WR_FRAGM 0x1
+#define V_FW_FILTER_WR_FRAGM(x) ((x) << S_FW_FILTER_WR_FRAGM)
+#define G_FW_FILTER_WR_FRAGM(x) \
+ (((x) >> S_FW_FILTER_WR_FRAGM) & M_FW_FILTER_WR_FRAGM)
+#define F_FW_FILTER_WR_FRAGM V_FW_FILTER_WR_FRAGM(1U)
+
+#define S_FW_FILTER_WR_IVLAN_VLD 5
+#define M_FW_FILTER_WR_IVLAN_VLD 0x1
+#define V_FW_FILTER_WR_IVLAN_VLD(x) ((x) << S_FW_FILTER_WR_IVLAN_VLD)
+#define G_FW_FILTER_WR_IVLAN_VLD(x) \
+ (((x) >> S_FW_FILTER_WR_IVLAN_VLD) & M_FW_FILTER_WR_IVLAN_VLD)
+#define F_FW_FILTER_WR_IVLAN_VLD V_FW_FILTER_WR_IVLAN_VLD(1U)
+
+#define S_FW_FILTER_WR_OVLAN_VLD 4
+#define M_FW_FILTER_WR_OVLAN_VLD 0x1
+#define V_FW_FILTER_WR_OVLAN_VLD(x) ((x) << S_FW_FILTER_WR_OVLAN_VLD)
+#define G_FW_FILTER_WR_OVLAN_VLD(x) \
+ (((x) >> S_FW_FILTER_WR_OVLAN_VLD) & M_FW_FILTER_WR_OVLAN_VLD)
+#define F_FW_FILTER_WR_OVLAN_VLD V_FW_FILTER_WR_OVLAN_VLD(1U)
+
+#define S_FW_FILTER_WR_IVLAN_VLDM 3
+#define M_FW_FILTER_WR_IVLAN_VLDM 0x1
+#define V_FW_FILTER_WR_IVLAN_VLDM(x) ((x) << S_FW_FILTER_WR_IVLAN_VLDM)
+#define G_FW_FILTER_WR_IVLAN_VLDM(x) \
+ (((x) >> S_FW_FILTER_WR_IVLAN_VLDM) & M_FW_FILTER_WR_IVLAN_VLDM)
+#define F_FW_FILTER_WR_IVLAN_VLDM V_FW_FILTER_WR_IVLAN_VLDM(1U)
+
+#define S_FW_FILTER_WR_OVLAN_VLDM 2
+#define M_FW_FILTER_WR_OVLAN_VLDM 0x1
+#define V_FW_FILTER_WR_OVLAN_VLDM(x) ((x) << S_FW_FILTER_WR_OVLAN_VLDM)
+#define G_FW_FILTER_WR_OVLAN_VLDM(x) \
+ (((x) >> S_FW_FILTER_WR_OVLAN_VLDM) & M_FW_FILTER_WR_OVLAN_VLDM)
+#define F_FW_FILTER_WR_OVLAN_VLDM V_FW_FILTER_WR_OVLAN_VLDM(1U)
+
+#define S_FW_FILTER_WR_RX_CHAN 15
+#define M_FW_FILTER_WR_RX_CHAN 0x1
+#define V_FW_FILTER_WR_RX_CHAN(x) ((x) << S_FW_FILTER_WR_RX_CHAN)
+#define G_FW_FILTER_WR_RX_CHAN(x) \
+ (((x) >> S_FW_FILTER_WR_RX_CHAN) & M_FW_FILTER_WR_RX_CHAN)
+#define F_FW_FILTER_WR_RX_CHAN V_FW_FILTER_WR_RX_CHAN(1U)
+
+#define S_FW_FILTER_WR_RX_RPL_IQ 0
+#define M_FW_FILTER_WR_RX_RPL_IQ 0x3ff
+#define V_FW_FILTER_WR_RX_RPL_IQ(x) ((x) << S_FW_FILTER_WR_RX_RPL_IQ)
+#define G_FW_FILTER_WR_RX_RPL_IQ(x) \
+ (((x) >> S_FW_FILTER_WR_RX_RPL_IQ) & M_FW_FILTER_WR_RX_RPL_IQ)
+
+#define S_FW_FILTER_WR_MACI 23
+#define M_FW_FILTER_WR_MACI 0x1ff
+#define V_FW_FILTER_WR_MACI(x) ((x) << S_FW_FILTER_WR_MACI)
+#define G_FW_FILTER_WR_MACI(x) \
+ (((x) >> S_FW_FILTER_WR_MACI) & M_FW_FILTER_WR_MACI)
+
+#define S_FW_FILTER_WR_MACIM 14
+#define M_FW_FILTER_WR_MACIM 0x1ff
+#define V_FW_FILTER_WR_MACIM(x) ((x) << S_FW_FILTER_WR_MACIM)
+#define G_FW_FILTER_WR_MACIM(x) \
+ (((x) >> S_FW_FILTER_WR_MACIM) & M_FW_FILTER_WR_MACIM)
+
+#define S_FW_FILTER_WR_FCOE 13
+#define M_FW_FILTER_WR_FCOE 0x1
+#define V_FW_FILTER_WR_FCOE(x) ((x) << S_FW_FILTER_WR_FCOE)
+#define G_FW_FILTER_WR_FCOE(x) \
+ (((x) >> S_FW_FILTER_WR_FCOE) & M_FW_FILTER_WR_FCOE)
+#define F_FW_FILTER_WR_FCOE V_FW_FILTER_WR_FCOE(1U)
+
+#define S_FW_FILTER_WR_FCOEM 12
+#define M_FW_FILTER_WR_FCOEM 0x1
+#define V_FW_FILTER_WR_FCOEM(x) ((x) << S_FW_FILTER_WR_FCOEM)
+#define G_FW_FILTER_WR_FCOEM(x) \
+ (((x) >> S_FW_FILTER_WR_FCOEM) & M_FW_FILTER_WR_FCOEM)
+#define F_FW_FILTER_WR_FCOEM V_FW_FILTER_WR_FCOEM(1U)
+
+#define S_FW_FILTER_WR_PORT 9
+#define M_FW_FILTER_WR_PORT 0x7
+#define V_FW_FILTER_WR_PORT(x) ((x) << S_FW_FILTER_WR_PORT)
+#define G_FW_FILTER_WR_PORT(x) \
+ (((x) >> S_FW_FILTER_WR_PORT) & M_FW_FILTER_WR_PORT)
+
+#define S_FW_FILTER_WR_PORTM 6
+#define M_FW_FILTER_WR_PORTM 0x7
+#define V_FW_FILTER_WR_PORTM(x) ((x) << S_FW_FILTER_WR_PORTM)
+#define G_FW_FILTER_WR_PORTM(x) \
+ (((x) >> S_FW_FILTER_WR_PORTM) & M_FW_FILTER_WR_PORTM)
+
+#define S_FW_FILTER_WR_MATCHTYPE 3
+#define M_FW_FILTER_WR_MATCHTYPE 0x7
+#define V_FW_FILTER_WR_MATCHTYPE(x) ((x) << S_FW_FILTER_WR_MATCHTYPE)
+#define G_FW_FILTER_WR_MATCHTYPE(x) \
+ (((x) >> S_FW_FILTER_WR_MATCHTYPE) & M_FW_FILTER_WR_MATCHTYPE)
+
+#define S_FW_FILTER_WR_MATCHTYPEM 0
+#define M_FW_FILTER_WR_MATCHTYPEM 0x7
+#define V_FW_FILTER_WR_MATCHTYPEM(x) ((x) << S_FW_FILTER_WR_MATCHTYPEM)
+#define G_FW_FILTER_WR_MATCHTYPEM(x) \
+ (((x) >> S_FW_FILTER_WR_MATCHTYPEM) & M_FW_FILTER_WR_MATCHTYPEM)
+
+struct fw_ulptx_wr {
+ __be32 op_to_compl;
+ __be32 flowid_len16;
+ __u64 cookie;
+};
+
+struct fw_tp_wr {
+ __be32 op_to_immdlen;
+ __be32 flowid_len16;
+ __u64 cookie;
+};
+
+struct fw_eth_tx_pkt_wr {
+ __be32 op_immdlen;
+ __be32 equiq_to_len16;
+ __be64 r3;
+};
+
+#define S_FW_ETH_TX_PKT_WR_IMMDLEN 0
+#define M_FW_ETH_TX_PKT_WR_IMMDLEN 0x1ff
+#define V_FW_ETH_TX_PKT_WR_IMMDLEN(x) ((x) << S_FW_ETH_TX_PKT_WR_IMMDLEN)
+#define G_FW_ETH_TX_PKT_WR_IMMDLEN(x) \
+ (((x) >> S_FW_ETH_TX_PKT_WR_IMMDLEN) & M_FW_ETH_TX_PKT_WR_IMMDLEN)
+
+struct fw_eth_tx_pkts_wr {
+ __be32 op_pkd;
+ __be32 equiq_to_len16;
+ __be32 r3;
+ __be16 plen;
+ __u8 npkt;
+ __u8 type;
+};
+
+struct fw_eq_flush_wr {
+ __u8 opcode;
+ __u8 r1[3];
+ __be32 equiq_to_len16;
+ __be64 r3;
+};
+
+enum fw_flowc_mnem {
+ FW_FLOWC_MNEM_PFNVFN, /* PFN [15:8] VFN [7:0] */
+ FW_FLOWC_MNEM_CH,
+ FW_FLOWC_MNEM_PORT,
+ FW_FLOWC_MNEM_IQID,
+ FW_FLOWC_MNEM_SNDNXT,
+ FW_FLOWC_MNEM_RCVNXT,
+ FW_FLOWC_MNEM_SNDBUF,
+ FW_FLOWC_MNEM_MSS,
+ FW_FLOWC_MNEM_TXDATAPLEN_MAX,
+};
+
+struct fw_flowc_mnemval {
+ __u8 mnemonic;
+ __u8 r4[3];
+ __be32 val;
+};
+
+struct fw_flowc_wr {
+ __be32 op_to_nparams;
+ __be32 flowid_len16;
+#ifndef C99_NOT_SUPPORTED
+ struct fw_flowc_mnemval mnemval[0];
+#endif
+};
+
+#define S_FW_FLOWC_WR_NPARAMS 0
+#define M_FW_FLOWC_WR_NPARAMS 0xff
+#define V_FW_FLOWC_WR_NPARAMS(x) ((x) << S_FW_FLOWC_WR_NPARAMS)
+#define G_FW_FLOWC_WR_NPARAMS(x) \
+ (((x) >> S_FW_FLOWC_WR_NPARAMS) & M_FW_FLOWC_WR_NPARAMS)
+
+struct fw_ofld_tx_data_wr {
+ __be32 op_to_immdlen;
+ __be32 flowid_len16;
+ __be32 plen;
+ __be32 tunnel_to_proxy;
+};
+
+#define S_FW_OFLD_TX_DATA_WR_TUNNEL 19
+#define M_FW_OFLD_TX_DATA_WR_TUNNEL 0x1
+#define V_FW_OFLD_TX_DATA_WR_TUNNEL(x) ((x) << S_FW_OFLD_TX_DATA_WR_TUNNEL)
+#define G_FW_OFLD_TX_DATA_WR_TUNNEL(x) \
+ (((x) >> S_FW_OFLD_TX_DATA_WR_TUNNEL) & M_FW_OFLD_TX_DATA_WR_TUNNEL)
+#define F_FW_OFLD_TX_DATA_WR_TUNNEL V_FW_OFLD_TX_DATA_WR_TUNNEL(1U)
+
+#define S_FW_OFLD_TX_DATA_WR_SAVE 18
+#define M_FW_OFLD_TX_DATA_WR_SAVE 0x1
+#define V_FW_OFLD_TX_DATA_WR_SAVE(x) ((x) << S_FW_OFLD_TX_DATA_WR_SAVE)
+#define G_FW_OFLD_TX_DATA_WR_SAVE(x) \
+ (((x) >> S_FW_OFLD_TX_DATA_WR_SAVE) & M_FW_OFLD_TX_DATA_WR_SAVE)
+#define F_FW_OFLD_TX_DATA_WR_SAVE V_FW_OFLD_TX_DATA_WR_SAVE(1U)
+
+#define S_FW_OFLD_TX_DATA_WR_FLUSH 17
+#define M_FW_OFLD_TX_DATA_WR_FLUSH 0x1
+#define V_FW_OFLD_TX_DATA_WR_FLUSH(x) ((x) << S_FW_OFLD_TX_DATA_WR_FLUSH)
+#define G_FW_OFLD_TX_DATA_WR_FLUSH(x) \
+ (((x) >> S_FW_OFLD_TX_DATA_WR_FLUSH) & M_FW_OFLD_TX_DATA_WR_FLUSH)
+#define F_FW_OFLD_TX_DATA_WR_FLUSH V_FW_OFLD_TX_DATA_WR_FLUSH(1U)
+
+#define S_FW_OFLD_TX_DATA_WR_URGENT 16
+#define M_FW_OFLD_TX_DATA_WR_URGENT 0x1
+#define V_FW_OFLD_TX_DATA_WR_URGENT(x) ((x) << S_FW_OFLD_TX_DATA_WR_URGENT)
+#define G_FW_OFLD_TX_DATA_WR_URGENT(x) \
+ (((x) >> S_FW_OFLD_TX_DATA_WR_URGENT) & M_FW_OFLD_TX_DATA_WR_URGENT)
+#define F_FW_OFLD_TX_DATA_WR_URGENT V_FW_OFLD_TX_DATA_WR_URGENT(1U)
+
+#define S_FW_OFLD_TX_DATA_WR_MORE 15
+#define M_FW_OFLD_TX_DATA_WR_MORE 0x1
+#define V_FW_OFLD_TX_DATA_WR_MORE(x) ((x) << S_FW_OFLD_TX_DATA_WR_MORE)
+#define G_FW_OFLD_TX_DATA_WR_MORE(x) \
+ (((x) >> S_FW_OFLD_TX_DATA_WR_MORE) & M_FW_OFLD_TX_DATA_WR_MORE)
+#define F_FW_OFLD_TX_DATA_WR_MORE V_FW_OFLD_TX_DATA_WR_MORE(1U)
+
+#define S_FW_OFLD_TX_DATA_WR_SHOVE 14
+#define M_FW_OFLD_TX_DATA_WR_SHOVE 0x1
+#define V_FW_OFLD_TX_DATA_WR_SHOVE(x) ((x) << S_FW_OFLD_TX_DATA_WR_SHOVE)
+#define G_FW_OFLD_TX_DATA_WR_SHOVE(x) \
+ (((x) >> S_FW_OFLD_TX_DATA_WR_SHOVE) & M_FW_OFLD_TX_DATA_WR_SHOVE)
+#define F_FW_OFLD_TX_DATA_WR_SHOVE V_FW_OFLD_TX_DATA_WR_SHOVE(1U)
+
+#define S_FW_OFLD_TX_DATA_WR_ULPMODE 10
+#define M_FW_OFLD_TX_DATA_WR_ULPMODE 0xf
+#define V_FW_OFLD_TX_DATA_WR_ULPMODE(x) ((x) << S_FW_OFLD_TX_DATA_WR_ULPMODE)
+#define G_FW_OFLD_TX_DATA_WR_ULPMODE(x) \
+ (((x) >> S_FW_OFLD_TX_DATA_WR_ULPMODE) & M_FW_OFLD_TX_DATA_WR_ULPMODE)
+
+#define S_FW_OFLD_TX_DATA_WR_ULPSUBMODE 6
+#define M_FW_OFLD_TX_DATA_WR_ULPSUBMODE 0xf
+#define V_FW_OFLD_TX_DATA_WR_ULPSUBMODE(x) \
+ ((x) << S_FW_OFLD_TX_DATA_WR_ULPSUBMODE)
+#define G_FW_OFLD_TX_DATA_WR_ULPSUBMODE(x) \
+ (((x) >> S_FW_OFLD_TX_DATA_WR_ULPSUBMODE) & \
+ M_FW_OFLD_TX_DATA_WR_ULPSUBMODE)
+
+#define S_FW_OFLD_TX_DATA_WR_PROXY 5
+#define M_FW_OFLD_TX_DATA_WR_PROXY 0x1
+#define V_FW_OFLD_TX_DATA_WR_PROXY(x) ((x) << S_FW_OFLD_TX_DATA_WR_PROXY)
+#define G_FW_OFLD_TX_DATA_WR_PROXY(x) \
+ (((x) >> S_FW_OFLD_TX_DATA_WR_PROXY) & M_FW_OFLD_TX_DATA_WR_PROXY)
+#define F_FW_OFLD_TX_DATA_WR_PROXY V_FW_OFLD_TX_DATA_WR_PROXY(1U)
+
+struct fw_cmd_wr {
+ __be32 op_dma;
+ __be32 len16_pkd;
+ __be64 cookie_daddr;
+};
+
+#define S_FW_CMD_WR_DMA 17
+#define M_FW_CMD_WR_DMA 0x1
+#define V_FW_CMD_WR_DMA(x) ((x) << S_FW_CMD_WR_DMA)
+#define G_FW_CMD_WR_DMA(x) (((x) >> S_FW_CMD_WR_DMA) & M_FW_CMD_WR_DMA)
+#define F_FW_CMD_WR_DMA V_FW_CMD_WR_DMA(1U)
+
+struct fw_eth_tx_pkt_vm_wr {
+ __be32 op_immdlen;
+ __be32 equiq_to_len16;
+ __be32 r3[2];
+ __u8 ethmacdst[6];
+ __u8 ethmacsrc[6];
+ __be16 ethtype;
+ __be16 vlantci;
+};
+
+/******************************************************************************
+ * R I W O R K R E Q U E S T s
+ **************************************/
+
+enum fw_ri_wr_opcode {
+ FW_RI_RDMA_WRITE = 0x0, /* IETF RDMAP v1.0 ... */
+ FW_RI_READ_REQ = 0x1,
+ FW_RI_READ_RESP = 0x2,
+ FW_RI_SEND = 0x3,
+ FW_RI_SEND_WITH_INV = 0x4,
+ FW_RI_SEND_WITH_SE = 0x5,
+ FW_RI_SEND_WITH_SE_INV = 0x6,
+ FW_RI_TERMINATE = 0x7,
+ FW_RI_RDMA_INIT = 0x8, /* CHELSIO RI specific ... */
+ FW_RI_BIND_MW = 0x9,
+ FW_RI_FAST_REGISTER = 0xa,
+ FW_RI_LOCAL_INV = 0xb,
+ FW_RI_QP_MODIFY = 0xc,
+ FW_RI_BYPASS = 0xd,
+ FW_RI_RECEIVE = 0xe,
+
+ FW_RI_SGE_EC_CR_RETURN = 0xf
+};
+
+enum fw_ri_wr_flags {
+ FW_RI_COMPLETION_FLAG = 0x01,
+ FW_RI_NOTIFICATION_FLAG = 0x02,
+ FW_RI_SOLICITED_EVENT_FLAG = 0x04,
+ FW_RI_READ_FENCE_FLAG = 0x08,
+ FW_RI_LOCAL_FENCE_FLAG = 0x10,
+ FW_RI_RDMA_READ_INVALIDATE = 0x20
+};
+
+enum fw_ri_mpa_attrs {
+ FW_RI_MPA_RX_MARKER_ENABLE = 0x01,
+ FW_RI_MPA_TX_MARKER_ENABLE = 0x02,
+ FW_RI_MPA_CRC_ENABLE = 0x04,
+ FW_RI_MPA_IETF_ENABLE = 0x08
+};
+
+enum fw_ri_qp_caps {
+ FW_RI_QP_RDMA_READ_ENABLE = 0x01,
+ FW_RI_QP_RDMA_WRITE_ENABLE = 0x02,
+ FW_RI_QP_BIND_ENABLE = 0x04,
+ FW_RI_QP_FAST_REGISTER_ENABLE = 0x08,
+ FW_RI_QP_STAG0_ENABLE = 0x10,
+ FW_RI_QP_RDMA_READ_REQ_0B_ENABLE= 0x80,
+};
+
+enum fw_ri_addr_type {
+ FW_RI_ZERO_BASED_TO = 0x00,
+ FW_RI_VA_BASED_TO = 0x01
+};
+
+enum fw_ri_mem_perms {
+ FW_RI_MEM_ACCESS_REM_WRITE = 0x01,
+ FW_RI_MEM_ACCESS_REM_READ = 0x02,
+ FW_RI_MEM_ACCESS_REM = 0x03,
+ FW_RI_MEM_ACCESS_LOCAL_WRITE = 0x04,
+ FW_RI_MEM_ACCESS_LOCAL_READ = 0x08,
+ FW_RI_MEM_ACCESS_LOCAL = 0x0C
+};
+
+enum fw_ri_stag_type {
+ FW_RI_STAG_NSMR = 0x00,
+ FW_RI_STAG_SMR = 0x01,
+ FW_RI_STAG_MW = 0x02,
+ FW_RI_STAG_MW_RELAXED = 0x03
+};
+
+enum fw_ri_data_op {
+ FW_RI_DATA_IMMD = 0x81,
+ FW_RI_DATA_DSGL = 0x82,
+ FW_RI_DATA_ISGL = 0x83
+};
+
+enum fw_ri_sgl_depth {
+ FW_RI_SGL_DEPTH_MAX_SQ = 16,
+ FW_RI_SGL_DEPTH_MAX_RQ = 4
+};
+
+enum fw_ri_cqe_err {
+ FW_RI_CQE_ERR_SUCCESS = 0x00, /* success, no error detected */
+ FW_RI_CQE_ERR_STAG = 0x01, /* STAG invalid */
+ FW_RI_CQE_ERR_PDID = 0x02, /* PDID mismatch */
+ FW_RI_CQE_ERR_QPID = 0x03, /* QPID mismatch */
+ FW_RI_CQE_ERR_ACCESS = 0x04, /* Invalid access right */
+ FW_RI_CQE_ERR_WRAP = 0x05, /* Wrap error */
+ FW_RI_CQE_ERR_BOUND = 0x06, /* base and bounds violation */
+ FW_RI_CQE_ERR_INVALIDATE_SHARED_MR = 0x07, /* attempt to invalidate a SMR */
+ FW_RI_CQE_ERR_INVALIDATE_MR_WITH_MW_BOUND = 0x08, /* attempt to invalidate a MR w MW */
+ FW_RI_CQE_ERR_ECC = 0x09, /* ECC error detected */
+ FW_RI_CQE_ERR_ECC_PSTAG = 0x0A, /* ECC error detected when reading the PSTAG for a MW Invalidate */
+ FW_RI_CQE_ERR_PBL_ADDR_BOUND = 0x0B, /* pbl address out of bound : software error */
+ FW_RI_CQE_ERR_CRC = 0x10, /* CRC error */
+ FW_RI_CQE_ERR_MARKER = 0x11, /* Marker error */
+ FW_RI_CQE_ERR_PDU_LEN_ERR = 0x12, /* invalid PDU length */
+ FW_RI_CQE_ERR_OUT_OF_RQE = 0x13, /* out of RQE */
+ FW_RI_CQE_ERR_DDP_VERSION = 0x14, /* wrong DDP version */
+ FW_RI_CQE_ERR_RDMA_VERSION = 0x15, /* wrong RDMA version */
+ FW_RI_CQE_ERR_OPCODE = 0x16, /* invalid rdma opcode */
+ FW_RI_CQE_ERR_DDP_QUEUE_NUM = 0x17, /* invalid ddp queue number */
+ FW_RI_CQE_ERR_MSN = 0x18, /* MSN error */
+ FW_RI_CQE_ERR_TBIT = 0x19, /* tag bit not set correctly */
+ FW_RI_CQE_ERR_MO = 0x1A, /* MO not zero for TERMINATE or READ_REQ */
+ FW_RI_CQE_ERR_MSN_GAP = 0x1B, /* */
+ FW_RI_CQE_ERR_MSN_RANGE = 0x1C, /* */
+ FW_RI_CQE_ERR_IRD_OVERFLOW = 0x1D, /* */
+ FW_RI_CQE_ERR_RQE_ADDR_BOUND = 0x1E, /* RQE address out of bound : software error */
+ FW_RI_CQE_ERR_INTERNAL_ERR = 0x1F /* internel error (opcode mismatch) */
+
+};
+
+struct fw_ri_dsge_pair {
+ __be32 len[2];
+ __be64 addr[2];
+};
+
+struct fw_ri_dsgl {
+ __u8 op;
+ __u8 r1;
+ __be16 nsge;
+ __be32 len0;
+ __be64 addr0;
+#ifndef C99_NOT_SUPPORTED
+ struct fw_ri_dsge_pair sge[0];
+#endif
+};
+
+struct fw_ri_sge {
+ __be32 stag;
+ __be32 len;
+ __be64 to;
+};
+
+struct fw_ri_isgl {
+ __u8 op;
+ __u8 r1;
+ __be16 nsge;
+ __be32 r2;
+#ifndef C99_NOT_SUPPORTED
+ struct fw_ri_sge sge[0];
+#endif
+};
+
+struct fw_ri_immd {
+ __u8 op;
+ __u8 r1;
+ __be16 r2;
+ __be32 immdlen;
+#ifndef C99_NOT_SUPPORTED
+ __u8 data[0];
+#endif
+};
+
+struct fw_ri_tpte {
+ __be32 valid_to_pdid;
+ __be32 locread_to_qpid;
+ __be32 nosnoop_pbladdr;
+ __be32 len_lo;
+ __be32 va_hi;
+ __be32 va_lo_fbo;
+ __be32 dca_mwbcnt_pstag;
+ __be32 len_hi;
+};
+
+#define S_FW_RI_TPTE_VALID 31
+#define M_FW_RI_TPTE_VALID 0x1
+#define V_FW_RI_TPTE_VALID(x) ((x) << S_FW_RI_TPTE_VALID)
+#define G_FW_RI_TPTE_VALID(x) \
+ (((x) >> S_FW_RI_TPTE_VALID) & M_FW_RI_TPTE_VALID)
+#define F_FW_RI_TPTE_VALID V_FW_RI_TPTE_VALID(1U)
+
+#define S_FW_RI_TPTE_STAGKEY 23
+#define M_FW_RI_TPTE_STAGKEY 0xff
+#define V_FW_RI_TPTE_STAGKEY(x) ((x) << S_FW_RI_TPTE_STAGKEY)
+#define G_FW_RI_TPTE_STAGKEY(x) \
+ (((x) >> S_FW_RI_TPTE_STAGKEY) & M_FW_RI_TPTE_STAGKEY)
+
+#define S_FW_RI_TPTE_STAGSTATE 22
+#define M_FW_RI_TPTE_STAGSTATE 0x1
+#define V_FW_RI_TPTE_STAGSTATE(x) ((x) << S_FW_RI_TPTE_STAGSTATE)
+#define G_FW_RI_TPTE_STAGSTATE(x) \
+ (((x) >> S_FW_RI_TPTE_STAGSTATE) & M_FW_RI_TPTE_STAGSTATE)
+#define F_FW_RI_TPTE_STAGSTATE V_FW_RI_TPTE_STAGSTATE(1U)
+
+#define S_FW_RI_TPTE_STAGTYPE 20
+#define M_FW_RI_TPTE_STAGTYPE 0x3
+#define V_FW_RI_TPTE_STAGTYPE(x) ((x) << S_FW_RI_TPTE_STAGTYPE)
+#define G_FW_RI_TPTE_STAGTYPE(x) \
+ (((x) >> S_FW_RI_TPTE_STAGTYPE) & M_FW_RI_TPTE_STAGTYPE)
+
+#define S_FW_RI_TPTE_PDID 0
+#define M_FW_RI_TPTE_PDID 0xfffff
+#define V_FW_RI_TPTE_PDID(x) ((x) << S_FW_RI_TPTE_PDID)
+#define G_FW_RI_TPTE_PDID(x) \
+ (((x) >> S_FW_RI_TPTE_PDID) & M_FW_RI_TPTE_PDID)
+
+#define S_FW_RI_TPTE_PERM 28
+#define M_FW_RI_TPTE_PERM 0xf
+#define V_FW_RI_TPTE_PERM(x) ((x) << S_FW_RI_TPTE_PERM)
+#define G_FW_RI_TPTE_PERM(x) \
+ (((x) >> S_FW_RI_TPTE_PERM) & M_FW_RI_TPTE_PERM)
+
+#define S_FW_RI_TPTE_REMINVDIS 27
+#define M_FW_RI_TPTE_REMINVDIS 0x1
+#define V_FW_RI_TPTE_REMINVDIS(x) ((x) << S_FW_RI_TPTE_REMINVDIS)
+#define G_FW_RI_TPTE_REMINVDIS(x) \
+ (((x) >> S_FW_RI_TPTE_REMINVDIS) & M_FW_RI_TPTE_REMINVDIS)
+#define F_FW_RI_TPTE_REMINVDIS V_FW_RI_TPTE_REMINVDIS(1U)
+
+#define S_FW_RI_TPTE_ADDRTYPE 26
+#define M_FW_RI_TPTE_ADDRTYPE 1
+#define V_FW_RI_TPTE_ADDRTYPE(x) ((x) << S_FW_RI_TPTE_ADDRTYPE)
+#define G_FW_RI_TPTE_ADDRTYPE(x) \
+ (((x) >> S_FW_RI_TPTE_ADDRTYPE) & M_FW_RI_TPTE_ADDRTYPE)
+#define F_FW_RI_TPTE_ADDRTYPE V_FW_RI_TPTE_ADDRTYPE(1U)
+
+#define S_FW_RI_TPTE_MWBINDEN 25
+#define M_FW_RI_TPTE_MWBINDEN 0x1
+#define V_FW_RI_TPTE_MWBINDEN(x) ((x) << S_FW_RI_TPTE_MWBINDEN)
+#define G_FW_RI_TPTE_MWBINDEN(x) \
+ (((x) >> S_FW_RI_TPTE_MWBINDEN) & M_FW_RI_TPTE_MWBINDEN)
+#define F_FW_RI_TPTE_MWBINDEN V_FW_RI_TPTE_MWBINDEN(1U)
+
+#define S_FW_RI_TPTE_PS 20
+#define M_FW_RI_TPTE_PS 0x1f
+#define V_FW_RI_TPTE_PS(x) ((x) << S_FW_RI_TPTE_PS)
+#define G_FW_RI_TPTE_PS(x) \
+ (((x) >> S_FW_RI_TPTE_PS) & M_FW_RI_TPTE_PS)
+
+#define S_FW_RI_TPTE_QPID 0
+#define M_FW_RI_TPTE_QPID 0xfffff
+#define V_FW_RI_TPTE_QPID(x) ((x) << S_FW_RI_TPTE_QPID)
+#define G_FW_RI_TPTE_QPID(x) \
+ (((x) >> S_FW_RI_TPTE_QPID) & M_FW_RI_TPTE_QPID)
+
+#define S_FW_RI_TPTE_NOSNOOP 31
+#define M_FW_RI_TPTE_NOSNOOP 0x1
+#define V_FW_RI_TPTE_NOSNOOP(x) ((x) << S_FW_RI_TPTE_NOSNOOP)
+#define G_FW_RI_TPTE_NOSNOOP(x) \
+ (((x) >> S_FW_RI_TPTE_NOSNOOP) & M_FW_RI_TPTE_NOSNOOP)
+#define F_FW_RI_TPTE_NOSNOOP V_FW_RI_TPTE_NOSNOOP(1U)
+
+#define S_FW_RI_TPTE_PBLADDR 0
+#define M_FW_RI_TPTE_PBLADDR 0x1fffffff
+#define V_FW_RI_TPTE_PBLADDR(x) ((x) << S_FW_RI_TPTE_PBLADDR)
+#define G_FW_RI_TPTE_PBLADDR(x) \
+ (((x) >> S_FW_RI_TPTE_PBLADDR) & M_FW_RI_TPTE_PBLADDR)
+
+#define S_FW_RI_TPTE_DCA 24
+#define M_FW_RI_TPTE_DCA 0x1f
+#define V_FW_RI_TPTE_DCA(x) ((x) << S_FW_RI_TPTE_DCA)
+#define G_FW_RI_TPTE_DCA(x) \
+ (((x) >> S_FW_RI_TPTE_DCA) & M_FW_RI_TPTE_DCA)
+
+#define S_FW_RI_TPTE_MWBCNT_PSTAG 0
+#define M_FW_RI_TPTE_MWBCNT_PSTAG 0xffffff
+#define V_FW_RI_TPTE_MWBCNT_PSTAT(x) \
+ ((x) << S_FW_RI_TPTE_MWBCNT_PSTAG)
+#define G_FW_RI_TPTE_MWBCNT_PSTAG(x) \
+ (((x) >> S_FW_RI_TPTE_MWBCNT_PSTAG) & M_FW_RI_TPTE_MWBCNT_PSTAG)
+
+enum fw_ri_cqe_rxtx {
+ FW_RI_CQE_RXTX_RX = 0x0,
+ FW_RI_CQE_RXTX_TX = 0x1,
+};
+
+struct fw_ri_cqe {
+ union fw_ri_rxtx {
+ struct fw_ri_scqe {
+ __be32 qpid_n_stat_rxtx_type;
+ __be32 plen;
+ __be32 reserved;
+ __be32 wrid;
+ } scqe;
+ struct fw_ri_rcqe {
+ __be32 qpid_n_stat_rxtx_type;
+ __be32 plen;
+ __be32 stag;
+ __be32 msn;
+ } rcqe;
+ } u;
+};
+
+#define S_FW_RI_CQE_QPID 12
+#define M_FW_RI_CQE_QPID 0xfffff
+#define V_FW_RI_CQE_QPID(x) ((x) << S_FW_RI_CQE_QPID)
+#define G_FW_RI_CQE_QPID(x) \
+ (((x) >> S_FW_RI_CQE_QPID) & M_FW_RI_CQE_QPID)
+
+#define S_FW_RI_CQE_NOTIFY 10
+#define M_FW_RI_CQE_NOTIFY 0x1
+#define V_FW_RI_CQE_NOTIFY(x) ((x) << S_FW_RI_CQE_NOTIFY)
+#define G_FW_RI_CQE_NOTIFY(x) \
+ (((x) >> S_FW_RI_CQE_NOTIFY) & M_FW_RI_CQE_NOTIFY)
+
+#define S_FW_RI_CQE_STATUS 5
+#define M_FW_RI_CQE_STATUS 0x1f
+#define V_FW_RI_CQE_STATUS(x) ((x) << S_FW_RI_CQE_STATUS)
+#define G_FW_RI_CQE_STATUS(x) \
+ (((x) >> S_FW_RI_CQE_STATUS) & M_FW_RI_CQE_STATUS)
+
+
+#define S_FW_RI_CQE_RXTX 4
+#define M_FW_RI_CQE_RXTX 0x1
+#define V_FW_RI_CQE_RXTX(x) ((x) << S_FW_RI_CQE_RXTX)
+#define G_FW_RI_CQE_RXTX(x) \
+ (((x) >> S_FW_RI_CQE_RXTX) & M_FW_RI_CQE_RXTX)
+
+#define S_FW_RI_CQE_TYPE 0
+#define M_FW_RI_CQE_TYPE 0xf
+#define V_FW_RI_CQE_TYPE(x) ((x) << S_FW_RI_CQE_TYPE)
+#define G_FW_RI_CQE_TYPE(x) \
+ (((x) >> S_FW_RI_CQE_TYPE) & M_FW_RI_CQE_TYPE)
+
+enum fw_ri_res_type {
+ FW_RI_RES_TYPE_SQ,
+ FW_RI_RES_TYPE_RQ,
+ FW_RI_RES_TYPE_CQ,
+};
+
+enum fw_ri_res_op {
+ FW_RI_RES_OP_WRITE,
+ FW_RI_RES_OP_RESET,
+};
+
+struct fw_ri_res {
+ union fw_ri_restype {
+ struct fw_ri_res_sqrq {
+ __u8 restype;
+ __u8 op;
+ __be16 r3;
+ __be32 eqid;
+ __be32 r4[2];
+ __be32 fetchszm_to_iqid;
+ __be32 dcaen_to_eqsize;
+ __be64 eqaddr;
+ } sqrq;
+ struct fw_ri_res_cq {
+ __u8 restype;
+ __u8 op;
+ __be16 r3;
+ __be32 iqid;
+ __be32 r4[2];
+ __be32 iqandst_to_iqandstindex;
+ __be16 iqdroprss_to_iqesize;
+ __be16 iqsize;
+ __be64 iqaddr;
+ __be32 iqns_iqro;
+ __be32 r6_lo;
+ __be64 r7;
+ } cq;
+ } u;
+};
+
+struct fw_ri_res_wr {
+ __be32 op_nres;
+ __be32 len16_pkd;
+ __u64 cookie;
+#ifndef C99_NOT_SUPPORTED
+ struct fw_ri_res res[0];
+#endif
+};
+
+#define S_FW_RI_RES_WR_NRES 0
+#define M_FW_RI_RES_WR_NRES 0xff
+#define V_FW_RI_RES_WR_NRES(x) ((x) << S_FW_RI_RES_WR_NRES)
+#define G_FW_RI_RES_WR_NRES(x) \
+ (((x) >> S_FW_RI_RES_WR_NRES) & M_FW_RI_RES_WR_NRES)
+
+#define S_FW_RI_RES_WR_FETCHSZM 26
+#define M_FW_RI_RES_WR_FETCHSZM 0x1
+#define V_FW_RI_RES_WR_FETCHSZM(x) ((x) << S_FW_RI_RES_WR_FETCHSZM)
+#define G_FW_RI_RES_WR_FETCHSZM(x) \
+ (((x) >> S_FW_RI_RES_WR_FETCHSZM) & M_FW_RI_RES_WR_FETCHSZM)
+#define F_FW_RI_RES_WR_FETCHSZM V_FW_RI_RES_WR_FETCHSZM(1U)
+
+#define S_FW_RI_RES_WR_STATUSPGNS 25
+#define M_FW_RI_RES_WR_STATUSPGNS 0x1
+#define V_FW_RI_RES_WR_STATUSPGNS(x) ((x) << S_FW_RI_RES_WR_STATUSPGNS)
+#define G_FW_RI_RES_WR_STATUSPGNS(x) \
+ (((x) >> S_FW_RI_RES_WR_STATUSPGNS) & M_FW_RI_RES_WR_STATUSPGNS)
+#define F_FW_RI_RES_WR_STATUSPGNS V_FW_RI_RES_WR_STATUSPGNS(1U)
+
+#define S_FW_RI_RES_WR_STATUSPGRO 24
+#define M_FW_RI_RES_WR_STATUSPGRO 0x1
+#define V_FW_RI_RES_WR_STATUSPGRO(x) ((x) << S_FW_RI_RES_WR_STATUSPGRO)
+#define G_FW_RI_RES_WR_STATUSPGRO(x) \
+ (((x) >> S_FW_RI_RES_WR_STATUSPGRO) & M_FW_RI_RES_WR_STATUSPGRO)
+#define F_FW_RI_RES_WR_STATUSPGRO V_FW_RI_RES_WR_STATUSPGRO(1U)
+
+#define S_FW_RI_RES_WR_FETCHNS 23
+#define M_FW_RI_RES_WR_FETCHNS 0x1
+#define V_FW_RI_RES_WR_FETCHNS(x) ((x) << S_FW_RI_RES_WR_FETCHNS)
+#define G_FW_RI_RES_WR_FETCHNS(x) \
+ (((x) >> S_FW_RI_RES_WR_FETCHNS) & M_FW_RI_RES_WR_FETCHNS)
+#define F_FW_RI_RES_WR_FETCHNS V_FW_RI_RES_WR_FETCHNS(1U)
+
+#define S_FW_RI_RES_WR_FETCHRO 22
+#define M_FW_RI_RES_WR_FETCHRO 0x1
+#define V_FW_RI_RES_WR_FETCHRO(x) ((x) << S_FW_RI_RES_WR_FETCHRO)
+#define G_FW_RI_RES_WR_FETCHRO(x) \
+ (((x) >> S_FW_RI_RES_WR_FETCHRO) & M_FW_RI_RES_WR_FETCHRO)
+#define F_FW_RI_RES_WR_FETCHRO V_FW_RI_RES_WR_FETCHRO(1U)
+
+#define S_FW_RI_RES_WR_HOSTFCMODE 20
+#define M_FW_RI_RES_WR_HOSTFCMODE 0x3
+#define V_FW_RI_RES_WR_HOSTFCMODE(x) ((x) << S_FW_RI_RES_WR_HOSTFCMODE)
+#define G_FW_RI_RES_WR_HOSTFCMODE(x) \
+ (((x) >> S_FW_RI_RES_WR_HOSTFCMODE) & M_FW_RI_RES_WR_HOSTFCMODE)
+
+#define S_FW_RI_RES_WR_CPRIO 19
+#define M_FW_RI_RES_WR_CPRIO 0x1
+#define V_FW_RI_RES_WR_CPRIO(x) ((x) << S_FW_RI_RES_WR_CPRIO)
+#define G_FW_RI_RES_WR_CPRIO(x) \
+ (((x) >> S_FW_RI_RES_WR_CPRIO) & M_FW_RI_RES_WR_CPRIO)
+#define F_FW_RI_RES_WR_CPRIO V_FW_RI_RES_WR_CPRIO(1U)
+
+#define S_FW_RI_RES_WR_ONCHIP 18
+#define M_FW_RI_RES_WR_ONCHIP 0x1
+#define V_FW_RI_RES_WR_ONCHIP(x) ((x) << S_FW_RI_RES_WR_ONCHIP)
+#define G_FW_RI_RES_WR_ONCHIP(x) \
+ (((x) >> S_FW_RI_RES_WR_ONCHIP) & M_FW_RI_RES_WR_ONCHIP)
+#define F_FW_RI_RES_WR_ONCHIP V_FW_RI_RES_WR_ONCHIP(1U)
+
+#define S_FW_RI_RES_WR_PCIECHN 16
+#define M_FW_RI_RES_WR_PCIECHN 0x3
+#define V_FW_RI_RES_WR_PCIECHN(x) ((x) << S_FW_RI_RES_WR_PCIECHN)
+#define G_FW_RI_RES_WR_PCIECHN(x) \
+ (((x) >> S_FW_RI_RES_WR_PCIECHN) & M_FW_RI_RES_WR_PCIECHN)
+
+#define S_FW_RI_RES_WR_IQID 0
+#define M_FW_RI_RES_WR_IQID 0xffff
+#define V_FW_RI_RES_WR_IQID(x) ((x) << S_FW_RI_RES_WR_IQID)
+#define G_FW_RI_RES_WR_IQID(x) \
+ (((x) >> S_FW_RI_RES_WR_IQID) & M_FW_RI_RES_WR_IQID)
+
+#define S_FW_RI_RES_WR_DCAEN 31
+#define M_FW_RI_RES_WR_DCAEN 0x1
+#define V_FW_RI_RES_WR_DCAEN(x) ((x) << S_FW_RI_RES_WR_DCAEN)
+#define G_FW_RI_RES_WR_DCAEN(x) \
+ (((x) >> S_FW_RI_RES_WR_DCAEN) & M_FW_RI_RES_WR_DCAEN)
+#define F_FW_RI_RES_WR_DCAEN V_FW_RI_RES_WR_DCAEN(1U)
+
+#define S_FW_RI_RES_WR_DCACPU 26
+#define M_FW_RI_RES_WR_DCACPU 0x1f
+#define V_FW_RI_RES_WR_DCACPU(x) ((x) << S_FW_RI_RES_WR_DCACPU)
+#define G_FW_RI_RES_WR_DCACPU(x) \
+ (((x) >> S_FW_RI_RES_WR_DCACPU) & M_FW_RI_RES_WR_DCACPU)
+
+#define S_FW_RI_RES_WR_FBMIN 23
+#define M_FW_RI_RES_WR_FBMIN 0x7
+#define V_FW_RI_RES_WR_FBMIN(x) ((x) << S_FW_RI_RES_WR_FBMIN)
+#define G_FW_RI_RES_WR_FBMIN(x) \
+ (((x) >> S_FW_RI_RES_WR_FBMIN) & M_FW_RI_RES_WR_FBMIN)
+
+#define S_FW_RI_RES_WR_FBMAX 20
+#define M_FW_RI_RES_WR_FBMAX 0x7
+#define V_FW_RI_RES_WR_FBMAX(x) ((x) << S_FW_RI_RES_WR_FBMAX)
+#define G_FW_RI_RES_WR_FBMAX(x) \
+ (((x) >> S_FW_RI_RES_WR_FBMAX) & M_FW_RI_RES_WR_FBMAX)
+
+#define S_FW_RI_RES_WR_CIDXFTHRESHO 19
+#define M_FW_RI_RES_WR_CIDXFTHRESHO 0x1
+#define V_FW_RI_RES_WR_CIDXFTHRESHO(x) ((x) << S_FW_RI_RES_WR_CIDXFTHRESHO)
+#define G_FW_RI_RES_WR_CIDXFTHRESHO(x) \
+ (((x) >> S_FW_RI_RES_WR_CIDXFTHRESHO) & M_FW_RI_RES_WR_CIDXFTHRESHO)
+#define F_FW_RI_RES_WR_CIDXFTHRESHO V_FW_RI_RES_WR_CIDXFTHRESHO(1U)
+
+#define S_FW_RI_RES_WR_CIDXFTHRESH 16
+#define M_FW_RI_RES_WR_CIDXFTHRESH 0x7
+#define V_FW_RI_RES_WR_CIDXFTHRESH(x) ((x) << S_FW_RI_RES_WR_CIDXFTHRESH)
+#define G_FW_RI_RES_WR_CIDXFTHRESH(x) \
+ (((x) >> S_FW_RI_RES_WR_CIDXFTHRESH) & M_FW_RI_RES_WR_CIDXFTHRESH)
+
+#define S_FW_RI_RES_WR_EQSIZE 0
+#define M_FW_RI_RES_WR_EQSIZE 0xffff
+#define V_FW_RI_RES_WR_EQSIZE(x) ((x) << S_FW_RI_RES_WR_EQSIZE)
+#define G_FW_RI_RES_WR_EQSIZE(x) \
+ (((x) >> S_FW_RI_RES_WR_EQSIZE) & M_FW_RI_RES_WR_EQSIZE)
+
+#define S_FW_RI_RES_WR_IQANDST 15
+#define M_FW_RI_RES_WR_IQANDST 0x1
+#define V_FW_RI_RES_WR_IQANDST(x) ((x) << S_FW_RI_RES_WR_IQANDST)
+#define G_FW_RI_RES_WR_IQANDST(x) \
+ (((x) >> S_FW_RI_RES_WR_IQANDST) & M_FW_RI_RES_WR_IQANDST)
+#define F_FW_RI_RES_WR_IQANDST V_FW_RI_RES_WR_IQANDST(1U)
+
+#define S_FW_RI_RES_WR_IQANUS 14
+#define M_FW_RI_RES_WR_IQANUS 0x1
+#define V_FW_RI_RES_WR_IQANUS(x) ((x) << S_FW_RI_RES_WR_IQANUS)
+#define G_FW_RI_RES_WR_IQANUS(x) \
+ (((x) >> S_FW_RI_RES_WR_IQANUS) & M_FW_RI_RES_WR_IQANUS)
+#define F_FW_RI_RES_WR_IQANUS V_FW_RI_RES_WR_IQANUS(1U)
+
+#define S_FW_RI_RES_WR_IQANUD 12
+#define M_FW_RI_RES_WR_IQANUD 0x3
+#define V_FW_RI_RES_WR_IQANUD(x) ((x) << S_FW_RI_RES_WR_IQANUD)
+#define G_FW_RI_RES_WR_IQANUD(x) \
+ (((x) >> S_FW_RI_RES_WR_IQANUD) & M_FW_RI_RES_WR_IQANUD)
+
+#define S_FW_RI_RES_WR_IQANDSTINDEX 0
+#define M_FW_RI_RES_WR_IQANDSTINDEX 0xfff
+#define V_FW_RI_RES_WR_IQANDSTINDEX(x) ((x) << S_FW_RI_RES_WR_IQANDSTINDEX)
+#define G_FW_RI_RES_WR_IQANDSTINDEX(x) \
+ (((x) >> S_FW_RI_RES_WR_IQANDSTINDEX) & M_FW_RI_RES_WR_IQANDSTINDEX)
+
+#define S_FW_RI_RES_WR_IQDROPRSS 15
+#define M_FW_RI_RES_WR_IQDROPRSS 0x1
+#define V_FW_RI_RES_WR_IQDROPRSS(x) ((x) << S_FW_RI_RES_WR_IQDROPRSS)
+#define G_FW_RI_RES_WR_IQDROPRSS(x) \
+ (((x) >> S_FW_RI_RES_WR_IQDROPRSS) & M_FW_RI_RES_WR_IQDROPRSS)
+#define F_FW_RI_RES_WR_IQDROPRSS V_FW_RI_RES_WR_IQDROPRSS(1U)
+
+#define S_FW_RI_RES_WR_IQGTSMODE 14
+#define M_FW_RI_RES_WR_IQGTSMODE 0x1
+#define V_FW_RI_RES_WR_IQGTSMODE(x) ((x) << S_FW_RI_RES_WR_IQGTSMODE)
+#define G_FW_RI_RES_WR_IQGTSMODE(x) \
+ (((x) >> S_FW_RI_RES_WR_IQGTSMODE) & M_FW_RI_RES_WR_IQGTSMODE)
+#define F_FW_RI_RES_WR_IQGTSMODE V_FW_RI_RES_WR_IQGTSMODE(1U)
+
+#define S_FW_RI_RES_WR_IQPCIECH 12
+#define M_FW_RI_RES_WR_IQPCIECH 0x3
+#define V_FW_RI_RES_WR_IQPCIECH(x) ((x) << S_FW_RI_RES_WR_IQPCIECH)
+#define G_FW_RI_RES_WR_IQPCIECH(x) \
+ (((x) >> S_FW_RI_RES_WR_IQPCIECH) & M_FW_RI_RES_WR_IQPCIECH)
+
+#define S_FW_RI_RES_WR_IQDCAEN 11
+#define M_FW_RI_RES_WR_IQDCAEN 0x1
+#define V_FW_RI_RES_WR_IQDCAEN(x) ((x) << S_FW_RI_RES_WR_IQDCAEN)
+#define G_FW_RI_RES_WR_IQDCAEN(x) \
+ (((x) >> S_FW_RI_RES_WR_IQDCAEN) & M_FW_RI_RES_WR_IQDCAEN)
+#define F_FW_RI_RES_WR_IQDCAEN V_FW_RI_RES_WR_IQDCAEN(1U)
+
+#define S_FW_RI_RES_WR_IQDCACPU 6
+#define M_FW_RI_RES_WR_IQDCACPU 0x1f
+#define V_FW_RI_RES_WR_IQDCACPU(x) ((x) << S_FW_RI_RES_WR_IQDCACPU)
+#define G_FW_RI_RES_WR_IQDCACPU(x) \
+ (((x) >> S_FW_RI_RES_WR_IQDCACPU) & M_FW_RI_RES_WR_IQDCACPU)
+
+#define S_FW_RI_RES_WR_IQINTCNTTHRESH 4
+#define M_FW_RI_RES_WR_IQINTCNTTHRESH 0x3
+#define V_FW_RI_RES_WR_IQINTCNTTHRESH(x) \
+ ((x) << S_FW_RI_RES_WR_IQINTCNTTHRESH)
+#define G_FW_RI_RES_WR_IQINTCNTTHRESH(x) \
+ (((x) >> S_FW_RI_RES_WR_IQINTCNTTHRESH) & M_FW_RI_RES_WR_IQINTCNTTHRESH)
+
+#define S_FW_RI_RES_WR_IQO 3
+#define M_FW_RI_RES_WR_IQO 0x1
+#define V_FW_RI_RES_WR_IQO(x) ((x) << S_FW_RI_RES_WR_IQO)
+#define G_FW_RI_RES_WR_IQO(x) \
+ (((x) >> S_FW_RI_RES_WR_IQO) & M_FW_RI_RES_WR_IQO)
+#define F_FW_RI_RES_WR_IQO V_FW_RI_RES_WR_IQO(1U)
+
+#define S_FW_RI_RES_WR_IQCPRIO 2
+#define M_FW_RI_RES_WR_IQCPRIO 0x1
+#define V_FW_RI_RES_WR_IQCPRIO(x) ((x) << S_FW_RI_RES_WR_IQCPRIO)
+#define G_FW_RI_RES_WR_IQCPRIO(x) \
+ (((x) >> S_FW_RI_RES_WR_IQCPRIO) & M_FW_RI_RES_WR_IQCPRIO)
+#define F_FW_RI_RES_WR_IQCPRIO V_FW_RI_RES_WR_IQCPRIO(1U)
+
+#define S_FW_RI_RES_WR_IQESIZE 0
+#define M_FW_RI_RES_WR_IQESIZE 0x3
+#define V_FW_RI_RES_WR_IQESIZE(x) ((x) << S_FW_RI_RES_WR_IQESIZE)
+#define G_FW_RI_RES_WR_IQESIZE(x) \
+ (((x) >> S_FW_RI_RES_WR_IQESIZE) & M_FW_RI_RES_WR_IQESIZE)
+
+#define S_FW_RI_RES_WR_IQNS 31
+#define M_FW_RI_RES_WR_IQNS 0x1
+#define V_FW_RI_RES_WR_IQNS(x) ((x) << S_FW_RI_RES_WR_IQNS)
+#define G_FW_RI_RES_WR_IQNS(x) \
+ (((x) >> S_FW_RI_RES_WR_IQNS) & M_FW_RI_RES_WR_IQNS)
+#define F_FW_RI_RES_WR_IQNS V_FW_RI_RES_WR_IQNS(1U)
+
+#define S_FW_RI_RES_WR_IQRO 30
+#define M_FW_RI_RES_WR_IQRO 0x1
+#define V_FW_RI_RES_WR_IQRO(x) ((x) << S_FW_RI_RES_WR_IQRO)
+#define G_FW_RI_RES_WR_IQRO(x) \
+ (((x) >> S_FW_RI_RES_WR_IQRO) & M_FW_RI_RES_WR_IQRO)
+#define F_FW_RI_RES_WR_IQRO V_FW_RI_RES_WR_IQRO(1U)
+
+struct fw_ri_rdma_write_wr {
+ __u8 opcode;
+ __u8 flags;
+ __u16 wrid;
+ __u8 r1[3];
+ __u8 len16;
+ __be64 r2;
+ __be32 plen;
+ __be32 stag_sink;
+ __be64 to_sink;
+#ifndef C99_NOT_SUPPORTED
+ union {
+ struct fw_ri_immd immd_src[0];
+ struct fw_ri_isgl isgl_src[0];
+ } u;
+#endif
+};
+
+struct fw_ri_send_wr {
+ __u8 opcode;
+ __u8 flags;
+ __u16 wrid;
+ __u8 r1[3];
+ __u8 len16;
+ __be32 sendop_pkd;
+ __be32 stag_inv;
+ __be32 plen;
+ __be32 r3;
+ __be64 r4;
+#ifndef C99_NOT_SUPPORTED
+ union {
+ struct fw_ri_immd immd_src[0];
+ struct fw_ri_isgl isgl_src[0];
+ } u;
+#endif
+};
+
+#define S_FW_RI_SEND_WR_SENDOP 0
+#define M_FW_RI_SEND_WR_SENDOP 0xf
+#define V_FW_RI_SEND_WR_SENDOP(x) ((x) << S_FW_RI_SEND_WR_SENDOP)
+#define G_FW_RI_SEND_WR_SENDOP(x) \
+ (((x) >> S_FW_RI_SEND_WR_SENDOP) & M_FW_RI_SEND_WR_SENDOP)
+
+struct fw_ri_rdma_read_wr {
+ __u8 opcode;
+ __u8 flags;
+ __u16 wrid;
+ __u8 r1[3];
+ __u8 len16;
+ __be64 r2;
+ __be32 stag_sink;
+ __be32 to_sink_hi;
+ __be32 to_sink_lo;
+ __be32 plen;
+ __be32 stag_src;
+ __be32 to_src_hi;
+ __be32 to_src_lo;
+ __be32 r5;
+};
+
+struct fw_ri_recv_wr {
+ __u8 opcode;
+ __u8 r1;
+ __u16 wrid;
+ __u8 r2[3];
+ __u8 len16;
+ struct fw_ri_isgl isgl;
+};
+
+struct fw_ri_bind_mw_wr {
+ __u8 opcode;
+ __u8 flags;
+ __u16 wrid;
+ __u8 r1[3];
+ __u8 len16;
+ __u8 qpbinde_to_dcacpu;
+ __u8 pgsz_shift;
+ __u8 addr_type;
+ __u8 mem_perms;
+ __be32 stag_mr;
+ __be32 stag_mw;
+ __be32 r3;
+ __be64 len_mw;
+ __be64 va_fbo;
+ __be64 r4;
+};
+
+#define S_FW_RI_BIND_MW_WR_QPBINDE 6
+#define M_FW_RI_BIND_MW_WR_QPBINDE 0x1
+#define V_FW_RI_BIND_MW_WR_QPBINDE(x) ((x) << S_FW_RI_BIND_MW_WR_QPBINDE)
+#define G_FW_RI_BIND_MW_WR_QPBINDE(x) \
+ (((x) >> S_FW_RI_BIND_MW_WR_QPBINDE) & M_FW_RI_BIND_MW_WR_QPBINDE)
+#define F_FW_RI_BIND_MW_WR_QPBINDE V_FW_RI_BIND_MW_WR_QPBINDE(1U)
+
+#define S_FW_RI_BIND_MW_WR_NS 5
+#define M_FW_RI_BIND_MW_WR_NS 0x1
+#define V_FW_RI_BIND_MW_WR_NS(x) ((x) << S_FW_RI_BIND_MW_WR_NS)
+#define G_FW_RI_BIND_MW_WR_NS(x) \
+ (((x) >> S_FW_RI_BIND_MW_WR_NS) & M_FW_RI_BIND_MW_WR_NS)
+#define F_FW_RI_BIND_MW_WR_NS V_FW_RI_BIND_MW_WR_NS(1U)
+
+#define S_FW_RI_BIND_MW_WR_DCACPU 0
+#define M_FW_RI_BIND_MW_WR_DCACPU 0x1f
+#define V_FW_RI_BIND_MW_WR_DCACPU(x) ((x) << S_FW_RI_BIND_MW_WR_DCACPU)
+#define G_FW_RI_BIND_MW_WR_DCACPU(x) \
+ (((x) >> S_FW_RI_BIND_MW_WR_DCACPU) & M_FW_RI_BIND_MW_WR_DCACPU)
+
+struct fw_ri_fr_nsmr_wr {
+ __u8 opcode;
+ __u8 flags;
+ __u16 wrid;
+ __u8 r1[3];
+ __u8 len16;
+ __u8 qpbinde_to_dcacpu;
+ __u8 pgsz_shift;
+ __u8 addr_type;
+ __u8 mem_perms;
+ __be32 stag;
+ __be32 len_hi;
+ __be32 len_lo;
+ __be32 va_hi;
+ __be32 va_lo_fbo;
+};
+
+#define S_FW_RI_FR_NSMR_WR_QPBINDE 6
+#define M_FW_RI_FR_NSMR_WR_QPBINDE 0x1
+#define V_FW_RI_FR_NSMR_WR_QPBINDE(x) ((x) << S_FW_RI_FR_NSMR_WR_QPBINDE)
+#define G_FW_RI_FR_NSMR_WR_QPBINDE(x) \
+ (((x) >> S_FW_RI_FR_NSMR_WR_QPBINDE) & M_FW_RI_FR_NSMR_WR_QPBINDE)
+#define F_FW_RI_FR_NSMR_WR_QPBINDE V_FW_RI_FR_NSMR_WR_QPBINDE(1U)
+
+#define S_FW_RI_FR_NSMR_WR_NS 5
+#define M_FW_RI_FR_NSMR_WR_NS 0x1
+#define V_FW_RI_FR_NSMR_WR_NS(x) ((x) << S_FW_RI_FR_NSMR_WR_NS)
+#define G_FW_RI_FR_NSMR_WR_NS(x) \
+ (((x) >> S_FW_RI_FR_NSMR_WR_NS) & M_FW_RI_FR_NSMR_WR_NS)
+#define F_FW_RI_FR_NSMR_WR_NS V_FW_RI_FR_NSMR_WR_NS(1U)
+
+#define S_FW_RI_FR_NSMR_WR_DCACPU 0
+#define M_FW_RI_FR_NSMR_WR_DCACPU 0x1f
+#define V_FW_RI_FR_NSMR_WR_DCACPU(x) ((x) << S_FW_RI_FR_NSMR_WR_DCACPU)
+#define G_FW_RI_FR_NSMR_WR_DCACPU(x) \
+ (((x) >> S_FW_RI_FR_NSMR_WR_DCACPU) & M_FW_RI_FR_NSMR_WR_DCACPU)
+
+struct fw_ri_inv_lstag_wr {
+ __u8 opcode;
+ __u8 flags;
+ __u16 wrid;
+ __u8 r1[3];
+ __u8 len16;
+ __be32 r2;
+ __be32 stag_inv;
+};
+
+enum fw_ri_type {
+ FW_RI_TYPE_INIT,
+ FW_RI_TYPE_FINI,
+ FW_RI_TYPE_TERMINATE
+};
+
+enum fw_ri_init_p2ptype {
+ FW_RI_INIT_P2PTYPE_RDMA_WRITE = FW_RI_RDMA_WRITE,
+ FW_RI_INIT_P2PTYPE_READ_REQ = FW_RI_READ_REQ,
+ FW_RI_INIT_P2PTYPE_SEND = FW_RI_SEND,
+ FW_RI_INIT_P2PTYPE_SEND_WITH_INV = FW_RI_SEND_WITH_INV,
+ FW_RI_INIT_P2PTYPE_SEND_WITH_SE = FW_RI_SEND_WITH_SE,
+ FW_RI_INIT_P2PTYPE_SEND_WITH_SE_INV = FW_RI_SEND_WITH_SE_INV,
+ FW_RI_INIT_P2PTYPE_DISABLED = 0xf,
+};
+
+struct fw_ri_wr {
+ __be32 op_compl;
+ __be32 flowid_len16;
+ __u64 cookie;
+ union fw_ri {
+ struct fw_ri_init {
+ __u8 type;
+ __u8 mpareqbit_p2ptype;
+ __u8 r4[2];
+ __u8 mpa_attrs;
+ __u8 qp_caps;
+ __be16 nrqe;
+ __be32 pdid;
+ __be32 qpid;
+ __be32 sq_eqid;
+ __be32 rq_eqid;
+ __be32 scqid;
+ __be32 rcqid;
+ __be32 ord_max;
+ __be32 ird_max;
+ __be32 iss;
+ __be32 irs;
+ __be32 hwrqsize;
+ __be32 hwrqaddr;
+ __be64 r5;
+ union fw_ri_init_p2p {
+ struct fw_ri_rdma_write_wr write;
+ struct fw_ri_rdma_read_wr read;
+ struct fw_ri_send_wr send;
+ } u;
+ } init;
+ struct fw_ri_fini {
+ __u8 type;
+ __u8 r3[7];
+ __be64 r4;
+ } fini;
+ struct fw_ri_terminate {
+ __u8 type;
+ __u8 r3[3];
+ __be32 immdlen;
+ __u8 termmsg[40];
+ } terminate;
+ } u;
+};
+
+#define S_FW_RI_WR_MPAREQBIT 7
+#define M_FW_RI_WR_MPAREQBIT 0x1
+#define V_FW_RI_WR_MPAREQBIT(x) ((x) << S_FW_RI_WR_MPAREQBIT)
+#define G_FW_RI_WR_MPAREQBIT(x) \
+ (((x) >> S_FW_RI_WR_MPAREQBIT) & M_FW_RI_WR_MPAREQBIT)
+#define F_FW_RI_WR_MPAREQBIT V_FW_RI_WR_MPAREQBIT(1U)
+
+#define S_FW_RI_WR_0BRRBIT 6
+#define M_FW_RI_WR_0BRRBIT 0x1
+#define V_FW_RI_WR_0BRRBIT(x) ((x) << S_FW_RI_WR_0BRRBIT)
+#define G_FW_RI_WR_0BRRBIT(x) \
+ (((x) >> S_FW_RI_WR_0BRRBIT) & M_FW_RI_WR_0BRRBIT)
+#define F_FW_RI_WR_0BRRBIT V_FW_RI_WR_0BRRBIT(1U)
+
+#define S_FW_RI_WR_P2PTYPE 0
+#define M_FW_RI_WR_P2PTYPE 0xf
+#define V_FW_RI_WR_P2PTYPE(x) ((x) << S_FW_RI_WR_P2PTYPE)
+#define G_FW_RI_WR_P2PTYPE(x) \
+ (((x) >> S_FW_RI_WR_P2PTYPE) & M_FW_RI_WR_P2PTYPE)
+
+/******************************************************************************
+ * S C S I W O R K R E Q U E S T s
+ **********************************************/
+
+
+/******************************************************************************
+ * F O i S C S I W O R K R E Q U E S T s
+ **********************************************/
+
+#define ISCSI_NAME_MAX_LEN 224
+#define ISCSI_ALIAS_MAX_LEN 224
+
+enum session_type {
+ ISCSI_SESSION_DISCOVERY = 0,
+ ISCSI_SESSION_NORMAL,
+};
+
+enum digest_val {
+ DIGEST_NONE = 0,
+ DIGEST_CRC32,
+ DIGEST_BOTH,
+};
+
+enum fw_iscsi_subops {
+ NODE_ONLINE = 1,
+ SESS_ONLINE,
+ CONN_ONLINE,
+ NODE_OFFLINE,
+ SESS_OFFLINE,
+ CONN_OFFLINE,
+ NODE_STATS,
+ SESS_STATS,
+ CONN_STATS,
+ UPDATE_IOHANDLE,
+};
+
+struct fw_iscsi_node_attr {
+ __u8 name_len;
+ __u8 node_name[ISCSI_NAME_MAX_LEN];
+ __u8 alias_len;
+ __u8 node_alias[ISCSI_ALIAS_MAX_LEN];
+};
+
+struct fw_iscsi_sess_attr {
+ __u8 sess_type;
+ __u8 seq_inorder;
+ __u8 pdu_inorder;
+ __u8 immd_data_en;
+ __u8 init_r2t_en;
+ __u8 erl;
+ __be16 max_conn;
+ __be16 max_r2t;
+ __be16 time2wait;
+ __be16 time2retain;
+ __be32 max_burst;
+ __be32 first_burst;
+};
+
+struct fw_iscsi_conn_attr {
+ __u8 hdr_digest;
+ __u8 data_digest;
+ __be32 max_rcv_dsl;
+ __be16 dst_port;
+ __be32 dst_addr;
+ __be16 src_port;
+ __be32 src_addr;
+ __be32 ping_tmo;
+};
+
+struct fw_iscsi_node_stats {
+ __be16 sess_count;
+ __be16 chap_fail_count;
+ __be16 login_count;
+ __be16 r1;
+};
+
+struct fw_iscsi_sess_stats {
+ __be32 rxbytes;
+ __be32 txbytes;
+ __be32 scmd_count;
+ __be32 read_cmds;
+ __be32 write_cmds;
+ __be32 read_bytes;
+ __be32 write_bytes;
+ __be32 scsi_err_count;
+ __be32 scsi_rst_count;
+ __be32 iscsi_tmf_count;
+ __be32 conn_count;
+};
+
+struct fw_iscsi_conn_stats {
+ __be32 txbytes;
+ __be32 rxbytes;
+ __be32 dataout;
+ __be32 datain;
+};
+
+struct fw_iscsi_node_wr {
+ __u8 opcode;
+ __u8 subop;
+ __be16 immd_len;
+ __be32 flowid_len16;
+ __be64 cookie;
+ __u8 node_attr_to_compl;
+ __u8 status;
+ __be16 r1;
+ __be32 node_id;
+ __be32 ctrl_handle;
+ __be32 io_handle;
+};
+
+#define S_FW_ISCSI_NODE_WR_FLOWID 8
+#define M_FW_ISCSI_NODE_WR_FLOWID 0xfffff
+#define V_FW_ISCSI_NODE_WR_FLOWID(x) ((x) << S_FW_ISCSI_NODE_WR_FLOWID)
+#define G_FW_ISCSI_NODE_WR_FLOWID(x) \
+ (((x) >> S_FW_ISCSI_NODE_WR_FLOWID) & M_FW_ISCSI_NODE_WR_FLOWID)
+
+#define S_FW_ISCSI_NODE_WR_LEN16 0
+#define M_FW_ISCSI_NODE_WR_LEN16 0xff
+#define V_FW_ISCSI_NODE_WR_LEN16(x) ((x) << S_FW_ISCSI_NODE_WR_LEN16)
+#define G_FW_ISCSI_NODE_WR_LEN16(x) \
+ (((x) >> S_FW_ISCSI_NODE_WR_LEN16) & M_FW_ISCSI_NODE_WR_LEN16)
+
+#define S_FW_ISCSI_NODE_WR_NODE_ATTR 7
+#define M_FW_ISCSI_NODE_WR_NODE_ATTR 0x1
+#define V_FW_ISCSI_NODE_WR_NODE_ATTR(x) ((x) << S_FW_ISCSI_NODE_WR_NODE_ATTR)
+#define G_FW_ISCSI_NODE_WR_NODE_ATTR(x) \
+ (((x) >> S_FW_ISCSI_NODE_WR_NODE_ATTR) & M_FW_ISCSI_NODE_WR_NODE_ATTR)
+#define F_FW_ISCSI_NODE_WR_NODE_ATTR V_FW_ISCSI_NODE_WR_NODE_ATTR(1U)
+
+#define S_FW_ISCSI_NODE_WR_SESS_ATTR 6
+#define M_FW_ISCSI_NODE_WR_SESS_ATTR 0x1
+#define V_FW_ISCSI_NODE_WR_SESS_ATTR(x) ((x) << S_FW_ISCSI_NODE_WR_SESS_ATTR)
+#define G_FW_ISCSI_NODE_WR_SESS_ATTR(x) \
+ (((x) >> S_FW_ISCSI_NODE_WR_SESS_ATTR) & M_FW_ISCSI_NODE_WR_SESS_ATTR)
+#define F_FW_ISCSI_NODE_WR_SESS_ATTR V_FW_ISCSI_NODE_WR_SESS_ATTR(1U)
+
+#define S_FW_ISCSI_NODE_WR_CONN_ATTR 5
+#define M_FW_ISCSI_NODE_WR_CONN_ATTR 0x1
+#define V_FW_ISCSI_NODE_WR_CONN_ATTR(x) ((x) << S_FW_ISCSI_NODE_WR_CONN_ATTR)
+#define G_FW_ISCSI_NODE_WR_CONN_ATTR(x) \
+ (((x) >> S_FW_ISCSI_NODE_WR_CONN_ATTR) & M_FW_ISCSI_NODE_WR_CONN_ATTR)
+#define F_FW_ISCSI_NODE_WR_CONN_ATTR V_FW_ISCSI_NODE_WR_CONN_ATTR(1U)
+
+#define S_FW_ISCSI_NODE_WR_TGT_ATTR 4
+#define M_FW_ISCSI_NODE_WR_TGT_ATTR 0x1
+#define V_FW_ISCSI_NODE_WR_TGT_ATTR(x) ((x) << S_FW_ISCSI_NODE_WR_TGT_ATTR)
+#define G_FW_ISCSI_NODE_WR_TGT_ATTR(x) \
+ (((x) >> S_FW_ISCSI_NODE_WR_TGT_ATTR) & M_FW_ISCSI_NODE_WR_TGT_ATTR)
+#define F_FW_ISCSI_NODE_WR_TGT_ATTR V_FW_ISCSI_NODE_WR_TGT_ATTR(1U)
+
+#define S_FW_ISCSI_NODE_WR_NODE_TYPE 3
+#define M_FW_ISCSI_NODE_WR_NODE_TYPE 0x1
+#define V_FW_ISCSI_NODE_WR_NODE_TYPE(x) ((x) << S_FW_ISCSI_NODE_WR_NODE_TYPE)
+#define G_FW_ISCSI_NODE_WR_NODE_TYPE(x) \
+ (((x) >> S_FW_ISCSI_NODE_WR_NODE_TYPE) & M_FW_ISCSI_NODE_WR_NODE_TYPE)
+#define F_FW_ISCSI_NODE_WR_NODE_TYPE V_FW_ISCSI_NODE_WR_NODE_TYPE(1U)
+
+#define S_FW_ISCSI_NODE_WR_COMPL 0
+#define M_FW_ISCSI_NODE_WR_COMPL 0x1
+#define V_FW_ISCSI_NODE_WR_COMPL(x) ((x) << S_FW_ISCSI_NODE_WR_COMPL)
+#define G_FW_ISCSI_NODE_WR_COMPL(x) \
+ (((x) >> S_FW_ISCSI_NODE_WR_COMPL) & M_FW_ISCSI_NODE_WR_COMPL)
+#define F_FW_ISCSI_NODE_WR_COMPL V_FW_ISCSI_NODE_WR_COMPL(1U)
+
+#define FW_ISCSI_NODE_INVALID_ID 0xffffffff
+
+struct fw_scsi_iscsi_data {
+ __u8 r0;
+ __u8 fbit_to_tattr;
+ __be16 r2;
+ __be32 r3;
+ __u8 lun[8];
+ __be32 r4;
+ __be32 dlen;
+ __be32 r5;
+ __be32 r6;
+ __u8 cdb[16];
+};
+
+#define S_FW_SCSI_ISCSI_DATA_FBIT 7
+#define M_FW_SCSI_ISCSI_DATA_FBIT 0x1
+#define V_FW_SCSI_ISCSI_DATA_FBIT(x) ((x) << S_FW_SCSI_ISCSI_DATA_FBIT)
+#define G_FW_SCSI_ISCSI_DATA_FBIT(x) \
+ (((x) >> S_FW_SCSI_ISCSI_DATA_FBIT) & M_FW_SCSI_ISCSI_DATA_FBIT)
+#define F_FW_SCSI_ISCSI_DATA_FBIT V_FW_SCSI_ISCSI_DATA_FBIT(1U)
+
+#define S_FW_SCSI_ISCSI_DATA_RBIT 6
+#define M_FW_SCSI_ISCSI_DATA_RBIT 0x1
+#define V_FW_SCSI_ISCSI_DATA_RBIT(x) ((x) << S_FW_SCSI_ISCSI_DATA_RBIT)
+#define G_FW_SCSI_ISCSI_DATA_RBIT(x) \
+ (((x) >> S_FW_SCSI_ISCSI_DATA_RBIT) & M_FW_SCSI_ISCSI_DATA_RBIT)
+#define F_FW_SCSI_ISCSI_DATA_RBIT V_FW_SCSI_ISCSI_DATA_RBIT(1U)
+
+#define S_FW_SCSI_ISCSI_DATA_WBIT 5
+#define M_FW_SCSI_ISCSI_DATA_WBIT 0x1
+#define V_FW_SCSI_ISCSI_DATA_WBIT(x) ((x) << S_FW_SCSI_ISCSI_DATA_WBIT)
+#define G_FW_SCSI_ISCSI_DATA_WBIT(x) \
+ (((x) >> S_FW_SCSI_ISCSI_DATA_WBIT) & M_FW_SCSI_ISCSI_DATA_WBIT)
+#define F_FW_SCSI_ISCSI_DATA_WBIT V_FW_SCSI_ISCSI_DATA_WBIT(1U)
+
+#define S_FW_SCSI_ISCSI_DATA_TATTR 0
+#define M_FW_SCSI_ISCSI_DATA_TATTR 0x7
+#define V_FW_SCSI_ISCSI_DATA_TATTR(x) ((x) << S_FW_SCSI_ISCSI_DATA_TATTR)
+#define G_FW_SCSI_ISCSI_DATA_TATTR(x) \
+ (((x) >> S_FW_SCSI_ISCSI_DATA_TATTR) & M_FW_SCSI_ISCSI_DATA_TATTR)
+
+#define FW_SCSI_ISCSI_DATA_TATTR_UNTAGGED 0
+#define FW_SCSI_ISCSI_DATA_TATTR_SIMPLE 1
+#define FW_SCSI_ISCSI_DATA_TATTR_ORDERED 2
+#define FW_SCSI_ISCSI_DATA_TATTR_HEADOQ 3
+#define FW_SCSI_ISCSI_DATA_TATTR_ACA 4
+
+#define FW_SCSI_ISCSI_TMF_OP 0x02
+#define FW_SCSI_ISCSI_ABORT_FUNC 0x01
+#define FW_SCSI_ISCSI_LUN_RESET_FUNC 0x05
+#define FW_SCSI_ISCSI_RESERVED_TAG 0xffffffff
+
+struct fw_scsi_iscsi_rsp {
+ __u8 r0;
+ __u8 sbit_to_uflow;
+ __u8 response;
+ __u8 status;
+ __be32 r4;
+ __u8 r5[32];
+ __be32 bidir_res_cnt;
+ __be32 res_cnt;
+ __u8 sense_data[128];
+};
+
+#define S_FW_SCSI_ISCSI_RSP_SBIT 7
+#define M_FW_SCSI_ISCSI_RSP_SBIT 0x1
+#define V_FW_SCSI_ISCSI_RSP_SBIT(x) ((x) << S_FW_SCSI_ISCSI_RSP_SBIT)
+#define G_FW_SCSI_ISCSI_RSP_SBIT(x) \
+ (((x) >> S_FW_SCSI_ISCSI_RSP_SBIT) & M_FW_SCSI_ISCSI_RSP_SBIT)
+#define F_FW_SCSI_ISCSI_RSP_SBIT V_FW_SCSI_ISCSI_RSP_SBIT(1U)
+
+#define S_FW_SCSI_ISCSI_RSP_BIDIR_OFLOW 4
+#define M_FW_SCSI_ISCSI_RSP_BIDIR_OFLOW 0x1
+#define V_FW_SCSI_ISCSI_RSP_BIDIR_OFLOW(x) \
+ ((x) << S_FW_SCSI_ISCSI_RSP_BIDIR_OFLOW)
+#define G_FW_SCSI_ISCSI_RSP_BIDIR_OFLOW(x) \
+ (((x) >> S_FW_SCSI_ISCSI_RSP_BIDIR_OFLOW) & \
+ M_FW_SCSI_ISCSI_RSP_BIDIR_OFLOW)
+#define F_FW_SCSI_ISCSI_RSP_BIDIR_OFLOW V_FW_SCSI_ISCSI_RSP_BIDIR_OFLOW(1U)
+
+#define S_FW_SCSI_ISCSI_RSP_BIDIR_UFLOW 3
+#define M_FW_SCSI_ISCSI_RSP_BIDIR_UFLOW 0x1
+#define V_FW_SCSI_ISCSI_RSP_BIDIR_UFLOW(x) \
+ ((x) << S_FW_SCSI_ISCSI_RSP_BIDIR_UFLOW)
+#define G_FW_SCSI_ISCSI_RSP_BIDIR_UFLOW(x) \
+ (((x) >> S_FW_SCSI_ISCSI_RSP_BIDIR_UFLOW) & \
+ M_FW_SCSI_ISCSI_RSP_BIDIR_UFLOW)
+#define F_FW_SCSI_ISCSI_RSP_BIDIR_UFLOW V_FW_SCSI_ISCSI_RSP_BIDIR_UFLOW(1U)
+
+#define S_FW_SCSI_ISCSI_RSP_OFLOW 2
+#define M_FW_SCSI_ISCSI_RSP_OFLOW 0x1
+#define V_FW_SCSI_ISCSI_RSP_OFLOW(x) ((x) << S_FW_SCSI_ISCSI_RSP_OFLOW)
+#define G_FW_SCSI_ISCSI_RSP_OFLOW(x) \
+ (((x) >> S_FW_SCSI_ISCSI_RSP_OFLOW) & M_FW_SCSI_ISCSI_RSP_OFLOW)
+#define F_FW_SCSI_ISCSI_RSP_OFLOW V_FW_SCSI_ISCSI_RSP_OFLOW(1U)
+
+#define S_FW_SCSI_ISCSI_RSP_UFLOW 1
+#define M_FW_SCSI_ISCSI_RSP_UFLOW 0x1
+#define V_FW_SCSI_ISCSI_RSP_UFLOW(x) ((x) << S_FW_SCSI_ISCSI_RSP_UFLOW)
+#define G_FW_SCSI_ISCSI_RSP_UFLOW(x) \
+ (((x) >> S_FW_SCSI_ISCSI_RSP_UFLOW) & M_FW_SCSI_ISCSI_RSP_UFLOW)
+#define F_FW_SCSI_ISCSI_RSP_UFLOW V_FW_SCSI_ISCSI_RSP_UFLOW(1U)
+
+/******************************************************************************
+ * C O M M A N D s
+ *********************/
+
+/*
+ * The maximum length of time, in miliseconds, that we expect any firmware
+ * command to take to execute and return a reply to the host. The RESET
+ * and INITIALIZE commands can take a fair amount of time to execute but
+ * most execute in far less time than this maximum. This constant is used
+ * by host software to determine how long to wait for a firmware command
+ * reply before declaring the firmware as dead/unreachable ...
+ */
+#define FW_CMD_MAX_TIMEOUT 10000
+
+/*
+ * If a host driver does a HELLO and discovers that there's already a MASTER
+ * selected, we may have to wait for that MASTER to finish issuing RESET,
+ * configuration and INITIALIZE commands. Also, there's a possibility that
+ * our own HELLO may get lost if it happens right as the MASTER is issuign a
+ * RESET command, so we need to be willing to make a few retries of our HELLO.
+ */
+#define FW_CMD_HELLO_TIMEOUT (3 * FW_CMD_MAX_TIMEOUT)
+#define FW_CMD_HELLO_RETRIES 3
+
+enum fw_cmd_opcodes {
+ FW_LDST_CMD = 0x01,
+ FW_RESET_CMD = 0x03,
+ FW_HELLO_CMD = 0x04,
+ FW_BYE_CMD = 0x05,
+ FW_INITIALIZE_CMD = 0x06,
+ FW_CAPS_CONFIG_CMD = 0x07,
+ FW_PARAMS_CMD = 0x08,
+ FW_PFVF_CMD = 0x09,
+ FW_IQ_CMD = 0x10,
+ FW_EQ_MNGT_CMD = 0x11,
+ FW_EQ_ETH_CMD = 0x12,
+ FW_EQ_CTRL_CMD = 0x13,
+ FW_EQ_OFLD_CMD = 0x21,
+ FW_VI_CMD = 0x14,
+ FW_VI_MAC_CMD = 0x15,
+ FW_VI_RXMODE_CMD = 0x16,
+ FW_VI_ENABLE_CMD = 0x17,
+ FW_VI_STATS_CMD = 0x1a,
+ FW_ACL_MAC_CMD = 0x18,
+ FW_ACL_VLAN_CMD = 0x19,
+ FW_PORT_CMD = 0x1b,
+ FW_PORT_STATS_CMD = 0x1c,
+ FW_PORT_LB_STATS_CMD = 0x1d,
+ FW_PORT_TRACE_CMD = 0x1e,
+ FW_PORT_TRACE_MMAP_CMD = 0x1f,
+ FW_RSS_IND_TBL_CMD = 0x20,
+ FW_RSS_GLB_CONFIG_CMD = 0x22,
+ FW_RSS_VI_CONFIG_CMD = 0x23,
+ FW_SCHED_CMD = 0x24,
+ FW_DEVLOG_CMD = 0x25,
+ FW_NETIF_CMD = 0x26,
+ FW_WATCHDOG_CMD = 0x27,
+ FW_CLIP_CMD = 0x28,
+ FW_LASTC2E_CMD = 0x40,
+ FW_ERROR_CMD = 0x80,
+ FW_DEBUG_CMD = 0x81,
+};
+
+enum fw_cmd_cap {
+ FW_CMD_CAP_PF = 0x01,
+ FW_CMD_CAP_DMAQ = 0x02,
+ FW_CMD_CAP_PORT = 0x04,
+ FW_CMD_CAP_PORTPROMISC = 0x08,
+ FW_CMD_CAP_PORTSTATS = 0x10,
+ FW_CMD_CAP_VF = 0x80,
+};
+
+/*
+ * Generic command header flit0
+ */
+struct fw_cmd_hdr {
+ __be32 hi;
+ __be32 lo;
+};
+
+#define S_FW_CMD_OP 24
+#define M_FW_CMD_OP 0xff
+#define V_FW_CMD_OP(x) ((x) << S_FW_CMD_OP)
+#define G_FW_CMD_OP(x) (((x) >> S_FW_CMD_OP) & M_FW_CMD_OP)
+
+#define S_FW_CMD_REQUEST 23
+#define M_FW_CMD_REQUEST 0x1
+#define V_FW_CMD_REQUEST(x) ((x) << S_FW_CMD_REQUEST)
+#define G_FW_CMD_REQUEST(x) (((x) >> S_FW_CMD_REQUEST) & M_FW_CMD_REQUEST)
+#define F_FW_CMD_REQUEST V_FW_CMD_REQUEST(1U)
+
+#define S_FW_CMD_READ 22
+#define M_FW_CMD_READ 0x1
+#define V_FW_CMD_READ(x) ((x) << S_FW_CMD_READ)
+#define G_FW_CMD_READ(x) (((x) >> S_FW_CMD_READ) & M_FW_CMD_READ)
+#define F_FW_CMD_READ V_FW_CMD_READ(1U)
+
+#define S_FW_CMD_WRITE 21
+#define M_FW_CMD_WRITE 0x1
+#define V_FW_CMD_WRITE(x) ((x) << S_FW_CMD_WRITE)
+#define G_FW_CMD_WRITE(x) (((x) >> S_FW_CMD_WRITE) & M_FW_CMD_WRITE)
+#define F_FW_CMD_WRITE V_FW_CMD_WRITE(1U)
+
+#define S_FW_CMD_EXEC 20
+#define M_FW_CMD_EXEC 0x1
+#define V_FW_CMD_EXEC(x) ((x) << S_FW_CMD_EXEC)
+#define G_FW_CMD_EXEC(x) (((x) >> S_FW_CMD_EXEC) & M_FW_CMD_EXEC)
+#define F_FW_CMD_EXEC V_FW_CMD_EXEC(1U)
+
+#define S_FW_CMD_RAMASK 20
+#define M_FW_CMD_RAMASK 0xf
+#define V_FW_CMD_RAMASK(x) ((x) << S_FW_CMD_RAMASK)
+#define G_FW_CMD_RAMASK(x) (((x) >> S_FW_CMD_RAMASK) & M_FW_CMD_RAMASK)
+
+#define S_FW_CMD_RETVAL 8
+#define M_FW_CMD_RETVAL 0xff
+#define V_FW_CMD_RETVAL(x) ((x) << S_FW_CMD_RETVAL)
+#define G_FW_CMD_RETVAL(x) (((x) >> S_FW_CMD_RETVAL) & M_FW_CMD_RETVAL)
+
+#define S_FW_CMD_LEN16 0
+#define M_FW_CMD_LEN16 0xff
+#define V_FW_CMD_LEN16(x) ((x) << S_FW_CMD_LEN16)
+#define G_FW_CMD_LEN16(x) (((x) >> S_FW_CMD_LEN16) & M_FW_CMD_LEN16)
+
+#define FW_LEN16(fw_struct) V_FW_CMD_LEN16(sizeof(fw_struct) / 16)
+
+/*
+ * address spaces
+ */
+enum fw_ldst_addrspc {
+ FW_LDST_ADDRSPC_FIRMWARE = 0x0001,
+ FW_LDST_ADDRSPC_SGE_EGRC = 0x0008,
+ FW_LDST_ADDRSPC_SGE_INGC = 0x0009,
+ FW_LDST_ADDRSPC_SGE_FLMC = 0x000a,
+ FW_LDST_ADDRSPC_SGE_CONMC = 0x000b,
+ FW_LDST_ADDRSPC_TP_PIO = 0x0010,
+ FW_LDST_ADDRSPC_TP_TM_PIO = 0x0011,
+ FW_LDST_ADDRSPC_TP_MIB = 0x0012,
+ FW_LDST_ADDRSPC_MDIO = 0x0018,
+ FW_LDST_ADDRSPC_MPS = 0x0020,
+ FW_LDST_ADDRSPC_FUNC = 0x0028,
+ FW_LDST_ADDRSPC_FUNC_PCIE = 0x0029,
+ FW_LDST_ADDRSPC_FUNC_I2C = 0x002A,
+};
+
+/*
+ * MDIO VSC8634 register access control field
+ */
+enum fw_ldst_mdio_vsc8634_aid {
+ FW_LDST_MDIO_VS_STANDARD,
+ FW_LDST_MDIO_VS_EXTENDED,
+ FW_LDST_MDIO_VS_GPIO
+};
+
+enum fw_ldst_mps_fid {
+ FW_LDST_MPS_ATRB,
+ FW_LDST_MPS_RPLC
+};
+
+enum fw_ldst_func_access_ctl {
+ FW_LDST_FUNC_ACC_CTL_VIID,
+ FW_LDST_FUNC_ACC_CTL_FID
+};
+
+enum fw_ldst_func_mod_index {
+ FW_LDST_FUNC_MPS
+};
+
+struct fw_ldst_cmd {
+ __be32 op_to_addrspace;
+ __be32 cycles_to_len16;
+ union fw_ldst {
+ struct fw_ldst_addrval {
+ __be32 addr;
+ __be32 val;
+ } addrval;
+ struct fw_ldst_idctxt {
+ __be32 physid;
+ __be32 msg_ctxtflush;
+ __be32 ctxt_data7;
+ __be32 ctxt_data6;
+ __be32 ctxt_data5;
+ __be32 ctxt_data4;
+ __be32 ctxt_data3;
+ __be32 ctxt_data2;
+ __be32 ctxt_data1;
+ __be32 ctxt_data0;
+ } idctxt;
+ struct fw_ldst_mdio {
+ __be16 paddr_mmd;
+ __be16 raddr;
+ __be16 vctl;
+ __be16 rval;
+ } mdio;
+ struct fw_ldst_mps {
+ __be16 fid_ctl;
+ __be16 rplcpf_pkd;
+ __be32 rplc127_96;
+ __be32 rplc95_64;
+ __be32 rplc63_32;
+ __be32 rplc31_0;
+ __be32 atrb;
+ __be16 vlan[16];
+ } mps;
+ struct fw_ldst_func {
+ __u8 access_ctl;
+ __u8 mod_index;
+ __be16 ctl_id;
+ __be32 offset;
+ __be64 data0;
+ __be64 data1;
+ } func;
+ struct fw_ldst_pcie {
+ __u8 ctrl_to_fn;
+ __u8 bnum;
+ __u8 r;
+ __u8 ext_r;
+ __u8 select_naccess;
+ __u8 pcie_fn;
+ __be16 nset_pkd;
+ __be32 data[12];
+ } pcie;
+ struct fw_ldst_i2c {
+ __u8 pid_pkd;
+ __u8 base;
+ __u8 boffset;
+ __u8 data;
+ __be32 r9;
+ } i2c;
+ } u;
+};
+
+#define S_FW_LDST_CMD_ADDRSPACE 0
+#define M_FW_LDST_CMD_ADDRSPACE 0xff
+#define V_FW_LDST_CMD_ADDRSPACE(x) ((x) << S_FW_LDST_CMD_ADDRSPACE)
+#define G_FW_LDST_CMD_ADDRSPACE(x) \
+ (((x) >> S_FW_LDST_CMD_ADDRSPACE) & M_FW_LDST_CMD_ADDRSPACE)
+
+#define S_FW_LDST_CMD_CYCLES 16
+#define M_FW_LDST_CMD_CYCLES 0xffff
+#define V_FW_LDST_CMD_CYCLES(x) ((x) << S_FW_LDST_CMD_CYCLES)
+#define G_FW_LDST_CMD_CYCLES(x) \
+ (((x) >> S_FW_LDST_CMD_CYCLES) & M_FW_LDST_CMD_CYCLES)
+
+#define S_FW_LDST_CMD_MSG 31
+#define M_FW_LDST_CMD_MSG 0x1
+#define V_FW_LDST_CMD_MSG(x) ((x) << S_FW_LDST_CMD_MSG)
+#define G_FW_LDST_CMD_MSG(x) \
+ (((x) >> S_FW_LDST_CMD_MSG) & M_FW_LDST_CMD_MSG)
+#define F_FW_LDST_CMD_MSG V_FW_LDST_CMD_MSG(1U)
+
+#define S_FW_LDST_CMD_CTXTFLUSH 30
+#define M_FW_LDST_CMD_CTXTFLUSH 0x1
+#define V_FW_LDST_CMD_CTXTFLUSH(x) ((x) << S_FW_LDST_CMD_CTXTFLUSH)
+#define G_FW_LDST_CMD_CTXTFLUSH(x) \
+ (((x) >> S_FW_LDST_CMD_CTXTFLUSH) & M_FW_LDST_CMD_CTXTFLUSH)
+#define F_FW_LDST_CMD_CTXTFLUSH V_FW_LDST_CMD_CTXTFLUSH(1U)
+
+#define S_FW_LDST_CMD_PADDR 8
+#define M_FW_LDST_CMD_PADDR 0x1f
+#define V_FW_LDST_CMD_PADDR(x) ((x) << S_FW_LDST_CMD_PADDR)
+#define G_FW_LDST_CMD_PADDR(x) \
+ (((x) >> S_FW_LDST_CMD_PADDR) & M_FW_LDST_CMD_PADDR)
+
+#define S_FW_LDST_CMD_MMD 0
+#define M_FW_LDST_CMD_MMD 0x1f
+#define V_FW_LDST_CMD_MMD(x) ((x) << S_FW_LDST_CMD_MMD)
+#define G_FW_LDST_CMD_MMD(x) \
+ (((x) >> S_FW_LDST_CMD_MMD) & M_FW_LDST_CMD_MMD)
+
+#define S_FW_LDST_CMD_FID 15
+#define M_FW_LDST_CMD_FID 0x1
+#define V_FW_LDST_CMD_FID(x) ((x) << S_FW_LDST_CMD_FID)
+#define G_FW_LDST_CMD_FID(x) \
+ (((x) >> S_FW_LDST_CMD_FID) & M_FW_LDST_CMD_FID)
+#define F_FW_LDST_CMD_FID V_FW_LDST_CMD_FID(1U)
+
+#define S_FW_LDST_CMD_CTL 0
+#define M_FW_LDST_CMD_CTL 0x7fff
+#define V_FW_LDST_CMD_CTL(x) ((x) << S_FW_LDST_CMD_CTL)
+#define G_FW_LDST_CMD_CTL(x) \
+ (((x) >> S_FW_LDST_CMD_CTL) & M_FW_LDST_CMD_CTL)
+
+#define S_FW_LDST_CMD_RPLCPF 0
+#define M_FW_LDST_CMD_RPLCPF 0xff
+#define V_FW_LDST_CMD_RPLCPF(x) ((x) << S_FW_LDST_CMD_RPLCPF)
+#define G_FW_LDST_CMD_RPLCPF(x) \
+ (((x) >> S_FW_LDST_CMD_RPLCPF) & M_FW_LDST_CMD_RPLCPF)
+
+#define S_FW_LDST_CMD_CTRL 7
+#define M_FW_LDST_CMD_CTRL 0x1
+#define V_FW_LDST_CMD_CTRL(x) ((x) << S_FW_LDST_CMD_CTRL)
+#define G_FW_LDST_CMD_CTRL(x) \
+ (((x) >> S_FW_LDST_CMD_CTRL) & M_FW_LDST_CMD_CTRL)
+#define F_FW_LDST_CMD_CTRL V_FW_LDST_CMD_CTRL(1U)
+
+#define S_FW_LDST_CMD_LC 4
+#define M_FW_LDST_CMD_LC 0x1
+#define V_FW_LDST_CMD_LC(x) ((x) << S_FW_LDST_CMD_LC)
+#define G_FW_LDST_CMD_LC(x) (((x) >> S_FW_LDST_CMD_LC) & M_FW_LDST_CMD_LC)
+#define F_FW_LDST_CMD_LC V_FW_LDST_CMD_LC(1U)
+
+#define S_FW_LDST_CMD_AI 3
+#define M_FW_LDST_CMD_AI 0x1
+#define V_FW_LDST_CMD_AI(x) ((x) << S_FW_LDST_CMD_AI)
+#define G_FW_LDST_CMD_AI(x) (((x) >> S_FW_LDST_CMD_AI) & M_FW_LDST_CMD_AI)
+#define F_FW_LDST_CMD_AI V_FW_LDST_CMD_AI(1U)
+
+#define S_FW_LDST_CMD_FN 0
+#define M_FW_LDST_CMD_FN 0x7
+#define V_FW_LDST_CMD_FN(x) ((x) << S_FW_LDST_CMD_FN)
+#define G_FW_LDST_CMD_FN(x) (((x) >> S_FW_LDST_CMD_FN) & M_FW_LDST_CMD_FN)
+
+#define S_FW_LDST_CMD_SELECT 4
+#define M_FW_LDST_CMD_SELECT 0xf
+#define V_FW_LDST_CMD_SELECT(x) ((x) << S_FW_LDST_CMD_SELECT)
+#define G_FW_LDST_CMD_SELECT(x) \
+ (((x) >> S_FW_LDST_CMD_SELECT) & M_FW_LDST_CMD_SELECT)
+
+#define S_FW_LDST_CMD_NACCESS 0
+#define M_FW_LDST_CMD_NACCESS 0xf
+#define V_FW_LDST_CMD_NACCESS(x) ((x) << S_FW_LDST_CMD_NACCESS)
+#define G_FW_LDST_CMD_NACCESS(x) \
+ (((x) >> S_FW_LDST_CMD_NACCESS) & M_FW_LDST_CMD_NACCESS)
+
+#define S_FW_LDST_CMD_NSET 14
+#define M_FW_LDST_CMD_NSET 0x3
+#define V_FW_LDST_CMD_NSET(x) ((x) << S_FW_LDST_CMD_NSET)
+#define G_FW_LDST_CMD_NSET(x) \
+ (((x) >> S_FW_LDST_CMD_NSET) & M_FW_LDST_CMD_NSET)
+
+#define S_FW_LDST_CMD_PID 6
+#define M_FW_LDST_CMD_PID 0x3
+#define V_FW_LDST_CMD_PID(x) ((x) << S_FW_LDST_CMD_PID)
+#define G_FW_LDST_CMD_PID(x) \
+ (((x) >> S_FW_LDST_CMD_PID) & M_FW_LDST_CMD_PID)
+
+struct fw_reset_cmd {
+ __be32 op_to_write;
+ __be32 retval_len16;
+ __be32 val;
+ __be32 halt_pkd;
+};
+
+#define S_FW_RESET_CMD_HALT 31
+#define M_FW_RESET_CMD_HALT 0x1
+#define V_FW_RESET_CMD_HALT(x) ((x) << S_FW_RESET_CMD_HALT)
+#define G_FW_RESET_CMD_HALT(x) \
+ (((x) >> S_FW_RESET_CMD_HALT) & M_FW_RESET_CMD_HALT)
+#define F_FW_RESET_CMD_HALT V_FW_RESET_CMD_HALT(1U)
+
+enum {
+ FW_HELLO_CMD_STAGE_OS = 0,
+ FW_HELLO_CMD_STAGE_PREOS0 = 1,
+ FW_HELLO_CMD_STAGE_PREOS1 = 2,
+ FW_HELLO_CMD_STAGE_POSTOS = 3,
+};
+
+struct fw_hello_cmd {
+ __be32 op_to_write;
+ __be32 retval_len16;
+ __be32 err_to_clearinit;
+ __be32 fwrev;
+};
+
+#define S_FW_HELLO_CMD_ERR 31
+#define M_FW_HELLO_CMD_ERR 0x1
+#define V_FW_HELLO_CMD_ERR(x) ((x) << S_FW_HELLO_CMD_ERR)
+#define G_FW_HELLO_CMD_ERR(x) \
+ (((x) >> S_FW_HELLO_CMD_ERR) & M_FW_HELLO_CMD_ERR)
+#define F_FW_HELLO_CMD_ERR V_FW_HELLO_CMD_ERR(1U)
+
+#define S_FW_HELLO_CMD_INIT 30
+#define M_FW_HELLO_CMD_INIT 0x1
+#define V_FW_HELLO_CMD_INIT(x) ((x) << S_FW_HELLO_CMD_INIT)
+#define G_FW_HELLO_CMD_INIT(x) \
+ (((x) >> S_FW_HELLO_CMD_INIT) & M_FW_HELLO_CMD_INIT)
+#define F_FW_HELLO_CMD_INIT V_FW_HELLO_CMD_INIT(1U)
+
+#define S_FW_HELLO_CMD_MASTERDIS 29
+#define M_FW_HELLO_CMD_MASTERDIS 0x1
+#define V_FW_HELLO_CMD_MASTERDIS(x) ((x) << S_FW_HELLO_CMD_MASTERDIS)
+#define G_FW_HELLO_CMD_MASTERDIS(x) \
+ (((x) >> S_FW_HELLO_CMD_MASTERDIS) & M_FW_HELLO_CMD_MASTERDIS)
+#define F_FW_HELLO_CMD_MASTERDIS V_FW_HELLO_CMD_MASTERDIS(1U)
+
+#define S_FW_HELLO_CMD_MASTERFORCE 28
+#define M_FW_HELLO_CMD_MASTERFORCE 0x1
+#define V_FW_HELLO_CMD_MASTERFORCE(x) ((x) << S_FW_HELLO_CMD_MASTERFORCE)
+#define G_FW_HELLO_CMD_MASTERFORCE(x) \
+ (((x) >> S_FW_HELLO_CMD_MASTERFORCE) & M_FW_HELLO_CMD_MASTERFORCE)
+#define F_FW_HELLO_CMD_MASTERFORCE V_FW_HELLO_CMD_MASTERFORCE(1U)
+
+#define S_FW_HELLO_CMD_MBMASTER 24
+#define M_FW_HELLO_CMD_MBMASTER 0xf
+#define V_FW_HELLO_CMD_MBMASTER(x) ((x) << S_FW_HELLO_CMD_MBMASTER)
+#define G_FW_HELLO_CMD_MBMASTER(x) \
+ (((x) >> S_FW_HELLO_CMD_MBMASTER) & M_FW_HELLO_CMD_MBMASTER)
+
+#define S_FW_HELLO_CMD_MBASYNCNOTINT 23
+#define M_FW_HELLO_CMD_MBASYNCNOTINT 0x1
+#define V_FW_HELLO_CMD_MBASYNCNOTINT(x) ((x) << S_FW_HELLO_CMD_MBASYNCNOTINT)
+#define G_FW_HELLO_CMD_MBASYNCNOTINT(x) \
+ (((x) >> S_FW_HELLO_CMD_MBASYNCNOTINT) & M_FW_HELLO_CMD_MBASYNCNOTINT)
+#define F_FW_HELLO_CMD_MBASYNCNOTINT V_FW_HELLO_CMD_MBASYNCNOTINT(1U)
+
+#define S_FW_HELLO_CMD_MBASYNCNOT 20
+#define M_FW_HELLO_CMD_MBASYNCNOT 0x7
+#define V_FW_HELLO_CMD_MBASYNCNOT(x) ((x) << S_FW_HELLO_CMD_MBASYNCNOT)
+#define G_FW_HELLO_CMD_MBASYNCNOT(x) \
+ (((x) >> S_FW_HELLO_CMD_MBASYNCNOT) & M_FW_HELLO_CMD_MBASYNCNOT)
+
+#define S_FW_HELLO_CMD_STAGE 17
+#define M_FW_HELLO_CMD_STAGE 0x7
+#define V_FW_HELLO_CMD_STAGE(x) ((x) << S_FW_HELLO_CMD_STAGE)
+#define G_FW_HELLO_CMD_STAGE(x) \
+ (((x) >> S_FW_HELLO_CMD_STAGE) & M_FW_HELLO_CMD_STAGE)
+
+#define S_FW_HELLO_CMD_CLEARINIT 16
+#define M_FW_HELLO_CMD_CLEARINIT 0x1
+#define V_FW_HELLO_CMD_CLEARINIT(x) ((x) << S_FW_HELLO_CMD_CLEARINIT)
+#define G_FW_HELLO_CMD_CLEARINIT(x) \
+ (((x) >> S_FW_HELLO_CMD_CLEARINIT) & M_FW_HELLO_CMD_CLEARINIT)
+#define F_FW_HELLO_CMD_CLEARINIT V_FW_HELLO_CMD_CLEARINIT(1U)
+
+struct fw_bye_cmd {
+ __be32 op_to_write;
+ __be32 retval_len16;
+ __be64 r3;
+};
+
+struct fw_initialize_cmd {
+ __be32 op_to_write;
+ __be32 retval_len16;
+ __be64 r3;
+};
+
+enum fw_caps_config_hm {
+ FW_CAPS_CONFIG_HM_PCIE = 0x00000001,
+ FW_CAPS_CONFIG_HM_PL = 0x00000002,
+ FW_CAPS_CONFIG_HM_SGE = 0x00000004,
+ FW_CAPS_CONFIG_HM_CIM = 0x00000008,
+ FW_CAPS_CONFIG_HM_ULPTX = 0x00000010,
+ FW_CAPS_CONFIG_HM_TP = 0x00000020,
+ FW_CAPS_CONFIG_HM_ULPRX = 0x00000040,
+ FW_CAPS_CONFIG_HM_PMRX = 0x00000080,
+ FW_CAPS_CONFIG_HM_PMTX = 0x00000100,
+ FW_CAPS_CONFIG_HM_MC = 0x00000200,
+ FW_CAPS_CONFIG_HM_LE = 0x00000400,
+ FW_CAPS_CONFIG_HM_MPS = 0x00000800,
+ FW_CAPS_CONFIG_HM_XGMAC = 0x00001000,
+ FW_CAPS_CONFIG_HM_CPLSWITCH = 0x00002000,
+ FW_CAPS_CONFIG_HM_T4DBG = 0x00004000,
+ FW_CAPS_CONFIG_HM_MI = 0x00008000,
+ FW_CAPS_CONFIG_HM_I2CM = 0x00010000,
+ FW_CAPS_CONFIG_HM_NCSI = 0x00020000,
+ FW_CAPS_CONFIG_HM_SMB = 0x00040000,
+ FW_CAPS_CONFIG_HM_MA = 0x00080000,
+ FW_CAPS_CONFIG_HM_EDRAM = 0x00100000,
+ FW_CAPS_CONFIG_HM_PMU = 0x00200000,
+ FW_CAPS_CONFIG_HM_UART = 0x00400000,
+ FW_CAPS_CONFIG_HM_SF = 0x00800000,
+};
+
+/*
+ * The VF Register Map.
+ *
+ * The Scatter Gather Engine (SGE), Multiport Support module (MPS), PIO Local
+ * bus module (PL) and CPU Interface Module (CIM) components are mapped via
+ * the Slice to Module Map Table (see below) in the Physical Function Register
+ * Map. The Mail Box Data (MBDATA) range is mapped via the PCI-E Mailbox Base
+ * and Offset registers in the PF Register Map. The MBDATA base address is
+ * quite constrained as it determines the Mailbox Data addresses for both PFs
+ * and VFs, and therefore must fit in both the VF and PF Register Maps without
+ * overlapping other registers.
+ */
+#define FW_T4VF_SGE_BASE_ADDR 0x0000
+#define FW_T4VF_MPS_BASE_ADDR 0x0100
+#define FW_T4VF_PL_BASE_ADDR 0x0200
+#define FW_T4VF_MBDATA_BASE_ADDR 0x0240
+#define FW_T4VF_CIM_BASE_ADDR 0x0300
+
+#define FW_T4VF_REGMAP_START 0x0000
+#define FW_T4VF_REGMAP_SIZE 0x0400
+
+enum fw_caps_config_nbm {
+ FW_CAPS_CONFIG_NBM_IPMI = 0x00000001,
+ FW_CAPS_CONFIG_NBM_NCSI = 0x00000002,
+};
+
+enum fw_caps_config_link {
+ FW_CAPS_CONFIG_LINK_PPP = 0x00000001,
+ FW_CAPS_CONFIG_LINK_QFC = 0x00000002,
+ FW_CAPS_CONFIG_LINK_DCBX = 0x00000004,
+};
+
+enum fw_caps_config_switch {
+ FW_CAPS_CONFIG_SWITCH_INGRESS = 0x00000001,
+ FW_CAPS_CONFIG_SWITCH_EGRESS = 0x00000002,
+};
+
+enum fw_caps_config_nic {
+ FW_CAPS_CONFIG_NIC = 0x00000001,
+ FW_CAPS_CONFIG_NIC_VM = 0x00000002,
+ FW_CAPS_CONFIG_NIC_IDS = 0x00000004,
+ FW_CAPS_CONFIG_NIC_UM = 0x00000008,
+ FW_CAPS_CONFIG_NIC_UM_ISGL = 0x00000010,
+};
+
+enum fw_caps_config_toe {
+ FW_CAPS_CONFIG_TOE = 0x00000001,
+};
+
+enum fw_caps_config_rdma {
+ FW_CAPS_CONFIG_RDMA_RDDP = 0x00000001,
+ FW_CAPS_CONFIG_RDMA_RDMAC = 0x00000002,
+};
+
+enum fw_caps_config_iscsi {
+ FW_CAPS_CONFIG_ISCSI_INITIATOR_PDU = 0x00000001,
+ FW_CAPS_CONFIG_ISCSI_TARGET_PDU = 0x00000002,
+ FW_CAPS_CONFIG_ISCSI_INITIATOR_CNXOFLD = 0x00000004,
+ FW_CAPS_CONFIG_ISCSI_TARGET_CNXOFLD = 0x00000008,
+ FW_CAPS_CONFIG_ISCSI_INITIATOR_SSNOFLD = 0x00000010,
+ FW_CAPS_CONFIG_ISCSI_TARGET_SSNOFLD = 0x00000020,
+};
+
+enum fw_caps_config_fcoe {
+ FW_CAPS_CONFIG_FCOE_INITIATOR = 0x00000001,
+ FW_CAPS_CONFIG_FCOE_TARGET = 0x00000002,
+ FW_CAPS_CONFIG_FCOE_CTRL_OFLD = 0x00000004,
+};
+
+enum fw_memtype_cf {
+ FW_MEMTYPE_CF_EDC0 = 0x0,
+ FW_MEMTYPE_CF_EDC1 = 0x1,
+ FW_MEMTYPE_CF_EXTMEM = 0x2,
+ FW_MEMTYPE_CF_FLASH = 0x4,
+};
+
+struct fw_caps_config_cmd {
+ __be32 op_to_write;
+ __be32 cfvalid_to_len16;
+ __be32 r2;
+ __be32 hwmbitmap;
+ __be16 nbmcaps;
+ __be16 linkcaps;
+ __be16 switchcaps;
+ __be16 r3;
+ __be16 niccaps;
+ __be16 toecaps;
+ __be16 rdmacaps;
+ __be16 r4;
+ __be16 iscsicaps;
+ __be16 fcoecaps;
+ __be32 cfcsum;
+ __be32 finiver;
+ __be32 finicsum;
+};
+
+#define S_FW_CAPS_CONFIG_CMD_CFVALID 27
+#define M_FW_CAPS_CONFIG_CMD_CFVALID 0x1
+#define V_FW_CAPS_CONFIG_CMD_CFVALID(x) ((x) << S_FW_CAPS_CONFIG_CMD_CFVALID)
+#define G_FW_CAPS_CONFIG_CMD_CFVALID(x) \
+ (((x) >> S_FW_CAPS_CONFIG_CMD_CFVALID) & M_FW_CAPS_CONFIG_CMD_CFVALID)
+#define F_FW_CAPS_CONFIG_CMD_CFVALID V_FW_CAPS_CONFIG_CMD_CFVALID(1U)
+
+#define S_FW_CAPS_CONFIG_CMD_MEMTYPE_CF 24
+#define M_FW_CAPS_CONFIG_CMD_MEMTYPE_CF 0x7
+#define V_FW_CAPS_CONFIG_CMD_MEMTYPE_CF(x) \
+ ((x) << S_FW_CAPS_CONFIG_CMD_MEMTYPE_CF)
+#define G_FW_CAPS_CONFIG_CMD_MEMTYPE_CF(x) \
+ (((x) >> S_FW_CAPS_CONFIG_CMD_MEMTYPE_CF) & \
+ M_FW_CAPS_CONFIG_CMD_MEMTYPE_CF)
+
+#define S_FW_CAPS_CONFIG_CMD_MEMADDR64K_CF 16
+#define M_FW_CAPS_CONFIG_CMD_MEMADDR64K_CF 0xff
+#define V_FW_CAPS_CONFIG_CMD_MEMADDR64K_CF(x) \
+ ((x) << S_FW_CAPS_CONFIG_CMD_MEMADDR64K_CF)
+#define G_FW_CAPS_CONFIG_CMD_MEMADDR64K_CF(x) \
+ (((x) >> S_FW_CAPS_CONFIG_CMD_MEMADDR64K_CF) & \
+ M_FW_CAPS_CONFIG_CMD_MEMADDR64K_CF)
+
+/*
+ * params command mnemonics
+ */
+enum fw_params_mnem {
+ FW_PARAMS_MNEM_DEV = 1, /* device params */
+ FW_PARAMS_MNEM_PFVF = 2, /* function params */
+ FW_PARAMS_MNEM_REG = 3, /* limited register access */
+ FW_PARAMS_MNEM_DMAQ = 4, /* dma queue params */
+ FW_PARAMS_MNEM_LAST
+};
+
+/*
+ * device parameters
+ */
+enum fw_params_param_dev {
+ FW_PARAMS_PARAM_DEV_CCLK = 0x00, /* chip core clock in khz */
+ FW_PARAMS_PARAM_DEV_PORTVEC = 0x01, /* the port vector */
+ FW_PARAMS_PARAM_DEV_NTID = 0x02, /* reads the number of TIDs
+ * allocated by the device's
+ * Lookup Engine
+ */
+ FW_PARAMS_PARAM_DEV_FLOWC_BUFFIFO_SZ = 0x03,
+ FW_PARAMS_PARAM_DEV_INTFVER_NIC = 0x04,
+ FW_PARAMS_PARAM_DEV_INTFVER_VNIC = 0x05,
+ FW_PARAMS_PARAM_DEV_INTFVER_OFLD = 0x06,
+ FW_PARAMS_PARAM_DEV_INTFVER_RI = 0x07,
+ FW_PARAMS_PARAM_DEV_INTFVER_ISCSIPDU = 0x08,
+ FW_PARAMS_PARAM_DEV_INTFVER_ISCSI = 0x09,
+ FW_PARAMS_PARAM_DEV_INTFVER_FCOE = 0x0A,
+ FW_PARAMS_PARAM_DEV_FWREV = 0x0B,
+ FW_PARAMS_PARAM_DEV_TPREV = 0x0C,
+ FW_PARAMS_PARAM_DEV_CF = 0x0D,
+ FW_PARAMS_PARAM_DEV_BYPASS = 0x0E,
+};
+
+/*
+ * physical and virtual function parameters
+ */
+enum fw_params_param_pfvf {
+ FW_PARAMS_PARAM_PFVF_RWXCAPS = 0x00,
+ FW_PARAMS_PARAM_PFVF_ROUTE_START = 0x01,
+ FW_PARAMS_PARAM_PFVF_ROUTE_END = 0x02,
+ FW_PARAMS_PARAM_PFVF_CLIP_START = 0x03,
+ FW_PARAMS_PARAM_PFVF_CLIP_END = 0x04,
+ FW_PARAMS_PARAM_PFVF_FILTER_START = 0x05,
+ FW_PARAMS_PARAM_PFVF_FILTER_END = 0x06,
+ FW_PARAMS_PARAM_PFVF_SERVER_START = 0x07,
+ FW_PARAMS_PARAM_PFVF_SERVER_END = 0x08,
+ FW_PARAMS_PARAM_PFVF_TDDP_START = 0x09,
+ FW_PARAMS_PARAM_PFVF_TDDP_END = 0x0A,
+ FW_PARAMS_PARAM_PFVF_ISCSI_START = 0x0B,
+ FW_PARAMS_PARAM_PFVF_ISCSI_END = 0x0C,
+ FW_PARAMS_PARAM_PFVF_STAG_START = 0x0D,
+ FW_PARAMS_PARAM_PFVF_STAG_END = 0x0E,
+ FW_PARAMS_PARAM_PFVF_RQ_START = 0x1F,
+ FW_PARAMS_PARAM_PFVF_RQ_END = 0x10,
+ FW_PARAMS_PARAM_PFVF_PBL_START = 0x11,
+ FW_PARAMS_PARAM_PFVF_PBL_END = 0x12,
+ FW_PARAMS_PARAM_PFVF_L2T_START = 0x13,
+ FW_PARAMS_PARAM_PFVF_L2T_END = 0x14,
+ FW_PARAMS_PARAM_PFVF_SQRQ_START = 0x15,
+ FW_PARAMS_PARAM_PFVF_SQRQ_END = 0x16,
+ FW_PARAMS_PARAM_PFVF_CQ_START = 0x17,
+ FW_PARAMS_PARAM_PFVF_CQ_END = 0x18,
+ FW_PARAMS_PARAM_PFVF_SCHEDCLASS_ETH = 0x20,
+ FW_PARAMS_PARAM_PFVF_VIID = 0x24,
+ FW_PARAMS_PARAM_PFVF_CPMASK = 0x25,
+ FW_PARAMS_PARAM_PFVF_OCQ_START = 0x26,
+ FW_PARAMS_PARAM_PFVF_OCQ_END = 0x27,
+ FW_PARAMS_PARAM_PFVF_CONM_MAP = 0x28,
+ FW_PARAMS_PARAM_PFVF_IQFLINT_START = 0x29,
+ FW_PARAMS_PARAM_PFVF_IQFLINT_END = 0x2A,
+ FW_PARAMS_PARAM_PFVF_EQ_START = 0x2B,
+ FW_PARAMS_PARAM_PFVF_EQ_END = 0x2C
+};
+
+/*
+ * dma queue parameters
+ */
+enum fw_params_param_dmaq {
+ FW_PARAMS_PARAM_DMAQ_IQ_DCAEN_DCACPU = 0x00,
+ FW_PARAMS_PARAM_DMAQ_IQ_INTCNTTHRESH = 0x01,
+ FW_PARAMS_PARAM_DMAQ_EQ_CMPLIQID_MNGT = 0x10,
+ FW_PARAMS_PARAM_DMAQ_EQ_CMPLIQID_CTRL = 0x11,
+ FW_PARAMS_PARAM_DMAQ_EQ_SCHEDCLASS_ETH = 0x12,
+};
+
+/*
+ * dev bypass parameters; actions and modes
+ */
+enum fw_params_param_dev_bypass {
+
+ /* actions
+ */
+ FW_PARAMS_PARAM_DEV_BYPASS_PFAIL = 0x00,
+ FW_PARAMS_PARAM_DEV_BYPASS_CURRENT = 0x01,
+
+ /* modes
+ */
+ FW_PARAMS_PARAM_DEV_BYPASS_NORMAL = 0x00,
+ FW_PARAMS_PARAM_DEV_BYPASS_DROP = 0x1,
+ FW_PARAMS_PARAM_DEV_BYPASS_BYPASS = 0x2,
+};
+
+#define S_FW_PARAMS_MNEM 24
+#define M_FW_PARAMS_MNEM 0xff
+#define V_FW_PARAMS_MNEM(x) ((x) << S_FW_PARAMS_MNEM)
+#define G_FW_PARAMS_MNEM(x) \
+ (((x) >> S_FW_PARAMS_MNEM) & M_FW_PARAMS_MNEM)
+
+#define S_FW_PARAMS_PARAM_X 16
+#define M_FW_PARAMS_PARAM_X 0xff
+#define V_FW_PARAMS_PARAM_X(x) ((x) << S_FW_PARAMS_PARAM_X)
+#define G_FW_PARAMS_PARAM_X(x) \
+ (((x) >> S_FW_PARAMS_PARAM_X) & M_FW_PARAMS_PARAM_X)
+
+#define S_FW_PARAMS_PARAM_Y 8
+#define M_FW_PARAMS_PARAM_Y 0xff
+#define V_FW_PARAMS_PARAM_Y(x) ((x) << S_FW_PARAMS_PARAM_Y)
+#define G_FW_PARAMS_PARAM_Y(x) \
+ (((x) >> S_FW_PARAMS_PARAM_Y) & M_FW_PARAMS_PARAM_Y)
+
+#define S_FW_PARAMS_PARAM_Z 0
+#define M_FW_PARAMS_PARAM_Z 0xff
+#define V_FW_PARAMS_PARAM_Z(x) ((x) << S_FW_PARAMS_PARAM_Z)
+#define G_FW_PARAMS_PARAM_Z(x) \
+ (((x) >> S_FW_PARAMS_PARAM_Z) & M_FW_PARAMS_PARAM_Z)
+
+#define S_FW_PARAMS_PARAM_XYZ 0
+#define M_FW_PARAMS_PARAM_XYZ 0xffffff
+#define V_FW_PARAMS_PARAM_XYZ(x) ((x) << S_FW_PARAMS_PARAM_XYZ)
+#define G_FW_PARAMS_PARAM_XYZ(x) \
+ (((x) >> S_FW_PARAMS_PARAM_XYZ) & M_FW_PARAMS_PARAM_XYZ)
+
+#define S_FW_PARAMS_PARAM_YZ 0
+#define M_FW_PARAMS_PARAM_YZ 0xffff
+#define V_FW_PARAMS_PARAM_YZ(x) ((x) << S_FW_PARAMS_PARAM_YZ)
+#define G_FW_PARAMS_PARAM_YZ(x) \
+ (((x) >> S_FW_PARAMS_PARAM_YZ) & M_FW_PARAMS_PARAM_YZ)
+
+struct fw_params_cmd {
+ __be32 op_to_vfn;
+ __be32 retval_len16;
+ struct fw_params_param {
+ __be32 mnem;
+ __be32 val;
+ } param[7];
+};
+
+#define S_FW_PARAMS_CMD_PFN 8
+#define M_FW_PARAMS_CMD_PFN 0x7
+#define V_FW_PARAMS_CMD_PFN(x) ((x) << S_FW_PARAMS_CMD_PFN)
+#define G_FW_PARAMS_CMD_PFN(x) \
+ (((x) >> S_FW_PARAMS_CMD_PFN) & M_FW_PARAMS_CMD_PFN)
+
+#define S_FW_PARAMS_CMD_VFN 0
+#define M_FW_PARAMS_CMD_VFN 0xff
+#define V_FW_PARAMS_CMD_VFN(x) ((x) << S_FW_PARAMS_CMD_VFN)
+#define G_FW_PARAMS_CMD_VFN(x) \
+ (((x) >> S_FW_PARAMS_CMD_VFN) & M_FW_PARAMS_CMD_VFN)
+
+struct fw_pfvf_cmd {
+ __be32 op_to_vfn;
+ __be32 retval_len16;
+ __be32 niqflint_niq;
+ __be32 type_to_neq;
+ __be32 tc_to_nexactf;
+ __be32 r_caps_to_nethctrl;
+ __be16 nricq;
+ __be16 nriqp;
+ __be32 r4;
+};
+
+#define S_FW_PFVF_CMD_PFN 8
+#define M_FW_PFVF_CMD_PFN 0x7
+#define V_FW_PFVF_CMD_PFN(x) ((x) << S_FW_PFVF_CMD_PFN)
+#define G_FW_PFVF_CMD_PFN(x) \
+ (((x) >> S_FW_PFVF_CMD_PFN) & M_FW_PFVF_CMD_PFN)
+
+#define S_FW_PFVF_CMD_VFN 0
+#define M_FW_PFVF_CMD_VFN 0xff
+#define V_FW_PFVF_CMD_VFN(x) ((x) << S_FW_PFVF_CMD_VFN)
+#define G_FW_PFVF_CMD_VFN(x) \
+ (((x) >> S_FW_PFVF_CMD_VFN) & M_FW_PFVF_CMD_VFN)
+
+#define S_FW_PFVF_CMD_NIQFLINT 20
+#define M_FW_PFVF_CMD_NIQFLINT 0xfff
+#define V_FW_PFVF_CMD_NIQFLINT(x) ((x) << S_FW_PFVF_CMD_NIQFLINT)
+#define G_FW_PFVF_CMD_NIQFLINT(x) \
+ (((x) >> S_FW_PFVF_CMD_NIQFLINT) & M_FW_PFVF_CMD_NIQFLINT)
+
+#define S_FW_PFVF_CMD_NIQ 0
+#define M_FW_PFVF_CMD_NIQ 0xfffff
+#define V_FW_PFVF_CMD_NIQ(x) ((x) << S_FW_PFVF_CMD_NIQ)
+#define G_FW_PFVF_CMD_NIQ(x) \
+ (((x) >> S_FW_PFVF_CMD_NIQ) & M_FW_PFVF_CMD_NIQ)
+
+#define S_FW_PFVF_CMD_TYPE 31
+#define M_FW_PFVF_CMD_TYPE 0x1
+#define V_FW_PFVF_CMD_TYPE(x) ((x) << S_FW_PFVF_CMD_TYPE)
+#define G_FW_PFVF_CMD_TYPE(x) \
+ (((x) >> S_FW_PFVF_CMD_TYPE) & M_FW_PFVF_CMD_TYPE)
+#define F_FW_PFVF_CMD_TYPE V_FW_PFVF_CMD_TYPE(1U)
+
+#define S_FW_PFVF_CMD_CMASK 24
+#define M_FW_PFVF_CMD_CMASK 0xf
+#define V_FW_PFVF_CMD_CMASK(x) ((x) << S_FW_PFVF_CMD_CMASK)
+#define G_FW_PFVF_CMD_CMASK(x) \
+ (((x) >> S_FW_PFVF_CMD_CMASK) & M_FW_PFVF_CMD_CMASK)
+
+#define S_FW_PFVF_CMD_PMASK 20
+#define M_FW_PFVF_CMD_PMASK 0xf
+#define V_FW_PFVF_CMD_PMASK(x) ((x) << S_FW_PFVF_CMD_PMASK)
+#define G_FW_PFVF_CMD_PMASK(x) \
+ (((x) >> S_FW_PFVF_CMD_PMASK) & M_FW_PFVF_CMD_PMASK)
+
+#define S_FW_PFVF_CMD_NEQ 0
+#define M_FW_PFVF_CMD_NEQ 0xfffff
+#define V_FW_PFVF_CMD_NEQ(x) ((x) << S_FW_PFVF_CMD_NEQ)
+#define G_FW_PFVF_CMD_NEQ(x) \
+ (((x) >> S_FW_PFVF_CMD_NEQ) & M_FW_PFVF_CMD_NEQ)
+
+#define S_FW_PFVF_CMD_TC 24
+#define M_FW_PFVF_CMD_TC 0xff
+#define V_FW_PFVF_CMD_TC(x) ((x) << S_FW_PFVF_CMD_TC)
+#define G_FW_PFVF_CMD_TC(x) (((x) >> S_FW_PFVF_CMD_TC) & M_FW_PFVF_CMD_TC)
+
+#define S_FW_PFVF_CMD_NVI 16
+#define M_FW_PFVF_CMD_NVI 0xff
+#define V_FW_PFVF_CMD_NVI(x) ((x) << S_FW_PFVF_CMD_NVI)
+#define G_FW_PFVF_CMD_NVI(x) \
+ (((x) >> S_FW_PFVF_CMD_NVI) & M_FW_PFVF_CMD_NVI)
+
+#define S_FW_PFVF_CMD_NEXACTF 0
+#define M_FW_PFVF_CMD_NEXACTF 0xffff
+#define V_FW_PFVF_CMD_NEXACTF(x) ((x) << S_FW_PFVF_CMD_NEXACTF)
+#define G_FW_PFVF_CMD_NEXACTF(x) \
+ (((x) >> S_FW_PFVF_CMD_NEXACTF) & M_FW_PFVF_CMD_NEXACTF)
+
+#define S_FW_PFVF_CMD_R_CAPS 24
+#define M_FW_PFVF_CMD_R_CAPS 0xff
+#define V_FW_PFVF_CMD_R_CAPS(x) ((x) << S_FW_PFVF_CMD_R_CAPS)
+#define G_FW_PFVF_CMD_R_CAPS(x) \
+ (((x) >> S_FW_PFVF_CMD_R_CAPS) & M_FW_PFVF_CMD_R_CAPS)
+
+#define S_FW_PFVF_CMD_WX_CAPS 16
+#define M_FW_PFVF_CMD_WX_CAPS 0xff
+#define V_FW_PFVF_CMD_WX_CAPS(x) ((x) << S_FW_PFVF_CMD_WX_CAPS)
+#define G_FW_PFVF_CMD_WX_CAPS(x) \
+ (((x) >> S_FW_PFVF_CMD_WX_CAPS) & M_FW_PFVF_CMD_WX_CAPS)
+
+#define S_FW_PFVF_CMD_NETHCTRL 0
+#define M_FW_PFVF_CMD_NETHCTRL 0xffff
+#define V_FW_PFVF_CMD_NETHCTRL(x) ((x) << S_FW_PFVF_CMD_NETHCTRL)
+#define G_FW_PFVF_CMD_NETHCTRL(x) \
+ (((x) >> S_FW_PFVF_CMD_NETHCTRL) & M_FW_PFVF_CMD_NETHCTRL)
+
+/*
+ * ingress queue type; the first 1K ingress queues can have associated 0,
+ * 1 or 2 free lists and an interrupt, all other ingress queues lack these
+ * capabilities
+ */
+enum fw_iq_type {
+ FW_IQ_TYPE_FL_INT_CAP,
+ FW_IQ_TYPE_NO_FL_INT_CAP
+};
+
+struct fw_iq_cmd {
+ __be32 op_to_vfn;
+ __be32 alloc_to_len16;
+ __be16 physiqid;
+ __be16 iqid;
+ __be16 fl0id;
+ __be16 fl1id;
+ __be32 type_to_iqandstindex;
+ __be16 iqdroprss_to_iqesize;
+ __be16 iqsize;
+ __be64 iqaddr;
+ __be32 iqns_to_fl0congen;
+ __be16 fl0dcaen_to_fl0cidxfthresh;
+ __be16 fl0size;
+ __be64 fl0addr;
+ __be32 fl1cngchmap_to_fl1congen;
+ __be16 fl1dcaen_to_fl1cidxfthresh;
+ __be16 fl1size;
+ __be64 fl1addr;
+};
+
+#define S_FW_IQ_CMD_PFN 8
+#define M_FW_IQ_CMD_PFN 0x7
+#define V_FW_IQ_CMD_PFN(x) ((x) << S_FW_IQ_CMD_PFN)
+#define G_FW_IQ_CMD_PFN(x) (((x) >> S_FW_IQ_CMD_PFN) & M_FW_IQ_CMD_PFN)
+
+#define S_FW_IQ_CMD_VFN 0
+#define M_FW_IQ_CMD_VFN 0xff
+#define V_FW_IQ_CMD_VFN(x) ((x) << S_FW_IQ_CMD_VFN)
+#define G_FW_IQ_CMD_VFN(x) (((x) >> S_FW_IQ_CMD_VFN) & M_FW_IQ_CMD_VFN)
+
+#define S_FW_IQ_CMD_ALLOC 31
+#define M_FW_IQ_CMD_ALLOC 0x1
+#define V_FW_IQ_CMD_ALLOC(x) ((x) << S_FW_IQ_CMD_ALLOC)
+#define G_FW_IQ_CMD_ALLOC(x) \
+ (((x) >> S_FW_IQ_CMD_ALLOC) & M_FW_IQ_CMD_ALLOC)
+#define F_FW_IQ_CMD_ALLOC V_FW_IQ_CMD_ALLOC(1U)
+
+#define S_FW_IQ_CMD_FREE 30
+#define M_FW_IQ_CMD_FREE 0x1
+#define V_FW_IQ_CMD_FREE(x) ((x) << S_FW_IQ_CMD_FREE)
+#define G_FW_IQ_CMD_FREE(x) (((x) >> S_FW_IQ_CMD_FREE) & M_FW_IQ_CMD_FREE)
+#define F_FW_IQ_CMD_FREE V_FW_IQ_CMD_FREE(1U)
+
+#define S_FW_IQ_CMD_MODIFY 29
+#define M_FW_IQ_CMD_MODIFY 0x1
+#define V_FW_IQ_CMD_MODIFY(x) ((x) << S_FW_IQ_CMD_MODIFY)
+#define G_FW_IQ_CMD_MODIFY(x) \
+ (((x) >> S_FW_IQ_CMD_MODIFY) & M_FW_IQ_CMD_MODIFY)
+#define F_FW_IQ_CMD_MODIFY V_FW_IQ_CMD_MODIFY(1U)
+
+#define S_FW_IQ_CMD_IQSTART 28
+#define M_FW_IQ_CMD_IQSTART 0x1
+#define V_FW_IQ_CMD_IQSTART(x) ((x) << S_FW_IQ_CMD_IQSTART)
+#define G_FW_IQ_CMD_IQSTART(x) \
+ (((x) >> S_FW_IQ_CMD_IQSTART) & M_FW_IQ_CMD_IQSTART)
+#define F_FW_IQ_CMD_IQSTART V_FW_IQ_CMD_IQSTART(1U)
+
+#define S_FW_IQ_CMD_IQSTOP 27
+#define M_FW_IQ_CMD_IQSTOP 0x1
+#define V_FW_IQ_CMD_IQSTOP(x) ((x) << S_FW_IQ_CMD_IQSTOP)
+#define G_FW_IQ_CMD_IQSTOP(x) \
+ (((x) >> S_FW_IQ_CMD_IQSTOP) & M_FW_IQ_CMD_IQSTOP)
+#define F_FW_IQ_CMD_IQSTOP V_FW_IQ_CMD_IQSTOP(1U)
+
+#define S_FW_IQ_CMD_TYPE 29
+#define M_FW_IQ_CMD_TYPE 0x7
+#define V_FW_IQ_CMD_TYPE(x) ((x) << S_FW_IQ_CMD_TYPE)
+#define G_FW_IQ_CMD_TYPE(x) (((x) >> S_FW_IQ_CMD_TYPE) & M_FW_IQ_CMD_TYPE)
+
+#define S_FW_IQ_CMD_IQASYNCH 28
+#define M_FW_IQ_CMD_IQASYNCH 0x1
+#define V_FW_IQ_CMD_IQASYNCH(x) ((x) << S_FW_IQ_CMD_IQASYNCH)
+#define G_FW_IQ_CMD_IQASYNCH(x) \
+ (((x) >> S_FW_IQ_CMD_IQASYNCH) & M_FW_IQ_CMD_IQASYNCH)
+#define F_FW_IQ_CMD_IQASYNCH V_FW_IQ_CMD_IQASYNCH(1U)
+
+#define S_FW_IQ_CMD_VIID 16
+#define M_FW_IQ_CMD_VIID 0xfff
+#define V_FW_IQ_CMD_VIID(x) ((x) << S_FW_IQ_CMD_VIID)
+#define G_FW_IQ_CMD_VIID(x) (((x) >> S_FW_IQ_CMD_VIID) & M_FW_IQ_CMD_VIID)
+
+#define S_FW_IQ_CMD_IQANDST 15
+#define M_FW_IQ_CMD_IQANDST 0x1
+#define V_FW_IQ_CMD_IQANDST(x) ((x) << S_FW_IQ_CMD_IQANDST)
+#define G_FW_IQ_CMD_IQANDST(x) \
+ (((x) >> S_FW_IQ_CMD_IQANDST) & M_FW_IQ_CMD_IQANDST)
+#define F_FW_IQ_CMD_IQANDST V_FW_IQ_CMD_IQANDST(1U)
+
+#define S_FW_IQ_CMD_IQANUS 14
+#define M_FW_IQ_CMD_IQANUS 0x1
+#define V_FW_IQ_CMD_IQANUS(x) ((x) << S_FW_IQ_CMD_IQANUS)
+#define G_FW_IQ_CMD_IQANUS(x) \
+ (((x) >> S_FW_IQ_CMD_IQANUS) & M_FW_IQ_CMD_IQANUS)
+#define F_FW_IQ_CMD_IQANUS V_FW_IQ_CMD_IQANUS(1U)
+
+#define S_FW_IQ_CMD_IQANUD 12
+#define M_FW_IQ_CMD_IQANUD 0x3
+#define V_FW_IQ_CMD_IQANUD(x) ((x) << S_FW_IQ_CMD_IQANUD)
+#define G_FW_IQ_CMD_IQANUD(x) \
+ (((x) >> S_FW_IQ_CMD_IQANUD) & M_FW_IQ_CMD_IQANUD)
+
+#define S_FW_IQ_CMD_IQANDSTINDEX 0
+#define M_FW_IQ_CMD_IQANDSTINDEX 0xfff
+#define V_FW_IQ_CMD_IQANDSTINDEX(x) ((x) << S_FW_IQ_CMD_IQANDSTINDEX)
+#define G_FW_IQ_CMD_IQANDSTINDEX(x) \
+ (((x) >> S_FW_IQ_CMD_IQANDSTINDEX) & M_FW_IQ_CMD_IQANDSTINDEX)
+
+#define S_FW_IQ_CMD_IQDROPRSS 15
+#define M_FW_IQ_CMD_IQDROPRSS 0x1
+#define V_FW_IQ_CMD_IQDROPRSS(x) ((x) << S_FW_IQ_CMD_IQDROPRSS)
+#define G_FW_IQ_CMD_IQDROPRSS(x) \
+ (((x) >> S_FW_IQ_CMD_IQDROPRSS) & M_FW_IQ_CMD_IQDROPRSS)
+#define F_FW_IQ_CMD_IQDROPRSS V_FW_IQ_CMD_IQDROPRSS(1U)
+
+#define S_FW_IQ_CMD_IQGTSMODE 14
+#define M_FW_IQ_CMD_IQGTSMODE 0x1
+#define V_FW_IQ_CMD_IQGTSMODE(x) ((x) << S_FW_IQ_CMD_IQGTSMODE)
+#define G_FW_IQ_CMD_IQGTSMODE(x) \
+ (((x) >> S_FW_IQ_CMD_IQGTSMODE) & M_FW_IQ_CMD_IQGTSMODE)
+#define F_FW_IQ_CMD_IQGTSMODE V_FW_IQ_CMD_IQGTSMODE(1U)
+
+#define S_FW_IQ_CMD_IQPCIECH 12
+#define M_FW_IQ_CMD_IQPCIECH 0x3
+#define V_FW_IQ_CMD_IQPCIECH(x) ((x) << S_FW_IQ_CMD_IQPCIECH)
+#define G_FW_IQ_CMD_IQPCIECH(x) \
+ (((x) >> S_FW_IQ_CMD_IQPCIECH) & M_FW_IQ_CMD_IQPCIECH)
+
+#define S_FW_IQ_CMD_IQDCAEN 11
+#define M_FW_IQ_CMD_IQDCAEN 0x1
+#define V_FW_IQ_CMD_IQDCAEN(x) ((x) << S_FW_IQ_CMD_IQDCAEN)
+#define G_FW_IQ_CMD_IQDCAEN(x) \
+ (((x) >> S_FW_IQ_CMD_IQDCAEN) & M_FW_IQ_CMD_IQDCAEN)
+#define F_FW_IQ_CMD_IQDCAEN V_FW_IQ_CMD_IQDCAEN(1U)
+
+#define S_FW_IQ_CMD_IQDCACPU 6
+#define M_FW_IQ_CMD_IQDCACPU 0x1f
+#define V_FW_IQ_CMD_IQDCACPU(x) ((x) << S_FW_IQ_CMD_IQDCACPU)
+#define G_FW_IQ_CMD_IQDCACPU(x) \
+ (((x) >> S_FW_IQ_CMD_IQDCACPU) & M_FW_IQ_CMD_IQDCACPU)
+
+#define S_FW_IQ_CMD_IQINTCNTTHRESH 4
+#define M_FW_IQ_CMD_IQINTCNTTHRESH 0x3
+#define V_FW_IQ_CMD_IQINTCNTTHRESH(x) ((x) << S_FW_IQ_CMD_IQINTCNTTHRESH)
+#define G_FW_IQ_CMD_IQINTCNTTHRESH(x) \
+ (((x) >> S_FW_IQ_CMD_IQINTCNTTHRESH) & M_FW_IQ_CMD_IQINTCNTTHRESH)
+
+#define S_FW_IQ_CMD_IQO 3
+#define M_FW_IQ_CMD_IQO 0x1
+#define V_FW_IQ_CMD_IQO(x) ((x) << S_FW_IQ_CMD_IQO)
+#define G_FW_IQ_CMD_IQO(x) (((x) >> S_FW_IQ_CMD_IQO) & M_FW_IQ_CMD_IQO)
+#define F_FW_IQ_CMD_IQO V_FW_IQ_CMD_IQO(1U)
+
+#define S_FW_IQ_CMD_IQCPRIO 2
+#define M_FW_IQ_CMD_IQCPRIO 0x1
+#define V_FW_IQ_CMD_IQCPRIO(x) ((x) << S_FW_IQ_CMD_IQCPRIO)
+#define G_FW_IQ_CMD_IQCPRIO(x) \
+ (((x) >> S_FW_IQ_CMD_IQCPRIO) & M_FW_IQ_CMD_IQCPRIO)
+#define F_FW_IQ_CMD_IQCPRIO V_FW_IQ_CMD_IQCPRIO(1U)
+
+#define S_FW_IQ_CMD_IQESIZE 0
+#define M_FW_IQ_CMD_IQESIZE 0x3
+#define V_FW_IQ_CMD_IQESIZE(x) ((x) << S_FW_IQ_CMD_IQESIZE)
+#define G_FW_IQ_CMD_IQESIZE(x) \
+ (((x) >> S_FW_IQ_CMD_IQESIZE) & M_FW_IQ_CMD_IQESIZE)
+
+#define S_FW_IQ_CMD_IQNS 31
+#define M_FW_IQ_CMD_IQNS 0x1
+#define V_FW_IQ_CMD_IQNS(x) ((x) << S_FW_IQ_CMD_IQNS)
+#define G_FW_IQ_CMD_IQNS(x) (((x) >> S_FW_IQ_CMD_IQNS) & M_FW_IQ_CMD_IQNS)
+#define F_FW_IQ_CMD_IQNS V_FW_IQ_CMD_IQNS(1U)
+
+#define S_FW_IQ_CMD_IQRO 30
+#define M_FW_IQ_CMD_IQRO 0x1
+#define V_FW_IQ_CMD_IQRO(x) ((x) << S_FW_IQ_CMD_IQRO)
+#define G_FW_IQ_CMD_IQRO(x) (((x) >> S_FW_IQ_CMD_IQRO) & M_FW_IQ_CMD_IQRO)
+#define F_FW_IQ_CMD_IQRO V_FW_IQ_CMD_IQRO(1U)
+
+#define S_FW_IQ_CMD_IQFLINTIQHSEN 28
+#define M_FW_IQ_CMD_IQFLINTIQHSEN 0x3
+#define V_FW_IQ_CMD_IQFLINTIQHSEN(x) ((x) << S_FW_IQ_CMD_IQFLINTIQHSEN)
+#define G_FW_IQ_CMD_IQFLINTIQHSEN(x) \
+ (((x) >> S_FW_IQ_CMD_IQFLINTIQHSEN) & M_FW_IQ_CMD_IQFLINTIQHSEN)
+
+#define S_FW_IQ_CMD_IQFLINTCONGEN 27
+#define M_FW_IQ_CMD_IQFLINTCONGEN 0x1
+#define V_FW_IQ_CMD_IQFLINTCONGEN(x) ((x) << S_FW_IQ_CMD_IQFLINTCONGEN)
+#define G_FW_IQ_CMD_IQFLINTCONGEN(x) \
+ (((x) >> S_FW_IQ_CMD_IQFLINTCONGEN) & M_FW_IQ_CMD_IQFLINTCONGEN)
+#define F_FW_IQ_CMD_IQFLINTCONGEN V_FW_IQ_CMD_IQFLINTCONGEN(1U)
+
+#define S_FW_IQ_CMD_IQFLINTISCSIC 26
+#define M_FW_IQ_CMD_IQFLINTISCSIC 0x1
+#define V_FW_IQ_CMD_IQFLINTISCSIC(x) ((x) << S_FW_IQ_CMD_IQFLINTISCSIC)
+#define G_FW_IQ_CMD_IQFLINTISCSIC(x) \
+ (((x) >> S_FW_IQ_CMD_IQFLINTISCSIC) & M_FW_IQ_CMD_IQFLINTISCSIC)
+#define F_FW_IQ_CMD_IQFLINTISCSIC V_FW_IQ_CMD_IQFLINTISCSIC(1U)
+
+#define S_FW_IQ_CMD_FL0CNGCHMAP 20
+#define M_FW_IQ_CMD_FL0CNGCHMAP 0xf
+#define V_FW_IQ_CMD_FL0CNGCHMAP(x) ((x) << S_FW_IQ_CMD_FL0CNGCHMAP)
+#define G_FW_IQ_CMD_FL0CNGCHMAP(x) \
+ (((x) >> S_FW_IQ_CMD_FL0CNGCHMAP) & M_FW_IQ_CMD_FL0CNGCHMAP)
+
+#define S_FW_IQ_CMD_FL0CACHELOCK 15
+#define M_FW_IQ_CMD_FL0CACHELOCK 0x1
+#define V_FW_IQ_CMD_FL0CACHELOCK(x) ((x) << S_FW_IQ_CMD_FL0CACHELOCK)
+#define G_FW_IQ_CMD_FL0CACHELOCK(x) \
+ (((x) >> S_FW_IQ_CMD_FL0CACHELOCK) & M_FW_IQ_CMD_FL0CACHELOCK)
+#define F_FW_IQ_CMD_FL0CACHELOCK V_FW_IQ_CMD_FL0CACHELOCK(1U)
+
+#define S_FW_IQ_CMD_FL0DBP 14
+#define M_FW_IQ_CMD_FL0DBP 0x1
+#define V_FW_IQ_CMD_FL0DBP(x) ((x) << S_FW_IQ_CMD_FL0DBP)
+#define G_FW_IQ_CMD_FL0DBP(x) \
+ (((x) >> S_FW_IQ_CMD_FL0DBP) & M_FW_IQ_CMD_FL0DBP)
+#define F_FW_IQ_CMD_FL0DBP V_FW_IQ_CMD_FL0DBP(1U)
+
+#define S_FW_IQ_CMD_FL0DATANS 13
+#define M_FW_IQ_CMD_FL0DATANS 0x1
+#define V_FW_IQ_CMD_FL0DATANS(x) ((x) << S_FW_IQ_CMD_FL0DATANS)
+#define G_FW_IQ_CMD_FL0DATANS(x) \
+ (((x) >> S_FW_IQ_CMD_FL0DATANS) & M_FW_IQ_CMD_FL0DATANS)
+#define F_FW_IQ_CMD_FL0DATANS V_FW_IQ_CMD_FL0DATANS(1U)
+
+#define S_FW_IQ_CMD_FL0DATARO 12
+#define M_FW_IQ_CMD_FL0DATARO 0x1
+#define V_FW_IQ_CMD_FL0DATARO(x) ((x) << S_FW_IQ_CMD_FL0DATARO)
+#define G_FW_IQ_CMD_FL0DATARO(x) \
+ (((x) >> S_FW_IQ_CMD_FL0DATARO) & M_FW_IQ_CMD_FL0DATARO)
+#define F_FW_IQ_CMD_FL0DATARO V_FW_IQ_CMD_FL0DATARO(1U)
+
+#define S_FW_IQ_CMD_FL0CONGCIF 11
+#define M_FW_IQ_CMD_FL0CONGCIF 0x1
+#define V_FW_IQ_CMD_FL0CONGCIF(x) ((x) << S_FW_IQ_CMD_FL0CONGCIF)
+#define G_FW_IQ_CMD_FL0CONGCIF(x) \
+ (((x) >> S_FW_IQ_CMD_FL0CONGCIF) & M_FW_IQ_CMD_FL0CONGCIF)
+#define F_FW_IQ_CMD_FL0CONGCIF V_FW_IQ_CMD_FL0CONGCIF(1U)
+
+#define S_FW_IQ_CMD_FL0ONCHIP 10
+#define M_FW_IQ_CMD_FL0ONCHIP 0x1
+#define V_FW_IQ_CMD_FL0ONCHIP(x) ((x) << S_FW_IQ_CMD_FL0ONCHIP)
+#define G_FW_IQ_CMD_FL0ONCHIP(x) \
+ (((x) >> S_FW_IQ_CMD_FL0ONCHIP) & M_FW_IQ_CMD_FL0ONCHIP)
+#define F_FW_IQ_CMD_FL0ONCHIP V_FW_IQ_CMD_FL0ONCHIP(1U)
+
+#define S_FW_IQ_CMD_FL0STATUSPGNS 9
+#define M_FW_IQ_CMD_FL0STATUSPGNS 0x1
+#define V_FW_IQ_CMD_FL0STATUSPGNS(x) ((x) << S_FW_IQ_CMD_FL0STATUSPGNS)
+#define G_FW_IQ_CMD_FL0STATUSPGNS(x) \
+ (((x) >> S_FW_IQ_CMD_FL0STATUSPGNS) & M_FW_IQ_CMD_FL0STATUSPGNS)
+#define F_FW_IQ_CMD_FL0STATUSPGNS V_FW_IQ_CMD_FL0STATUSPGNS(1U)
+
+#define S_FW_IQ_CMD_FL0STATUSPGRO 8
+#define M_FW_IQ_CMD_FL0STATUSPGRO 0x1
+#define V_FW_IQ_CMD_FL0STATUSPGRO(x) ((x) << S_FW_IQ_CMD_FL0STATUSPGRO)
+#define G_FW_IQ_CMD_FL0STATUSPGRO(x) \
+ (((x) >> S_FW_IQ_CMD_FL0STATUSPGRO) & M_FW_IQ_CMD_FL0STATUSPGRO)
+#define F_FW_IQ_CMD_FL0STATUSPGRO V_FW_IQ_CMD_FL0STATUSPGRO(1U)
+
+#define S_FW_IQ_CMD_FL0FETCHNS 7
+#define M_FW_IQ_CMD_FL0FETCHNS 0x1
+#define V_FW_IQ_CMD_FL0FETCHNS(x) ((x) << S_FW_IQ_CMD_FL0FETCHNS)
+#define G_FW_IQ_CMD_FL0FETCHNS(x) \
+ (((x) >> S_FW_IQ_CMD_FL0FETCHNS) & M_FW_IQ_CMD_FL0FETCHNS)
+#define F_FW_IQ_CMD_FL0FETCHNS V_FW_IQ_CMD_FL0FETCHNS(1U)
+
+#define S_FW_IQ_CMD_FL0FETCHRO 6
+#define M_FW_IQ_CMD_FL0FETCHRO 0x1
+#define V_FW_IQ_CMD_FL0FETCHRO(x) ((x) << S_FW_IQ_CMD_FL0FETCHRO)
+#define G_FW_IQ_CMD_FL0FETCHRO(x) \
+ (((x) >> S_FW_IQ_CMD_FL0FETCHRO) & M_FW_IQ_CMD_FL0FETCHRO)
+#define F_FW_IQ_CMD_FL0FETCHRO V_FW_IQ_CMD_FL0FETCHRO(1U)
+
+#define S_FW_IQ_CMD_FL0HOSTFCMODE 4
+#define M_FW_IQ_CMD_FL0HOSTFCMODE 0x3
+#define V_FW_IQ_CMD_FL0HOSTFCMODE(x) ((x) << S_FW_IQ_CMD_FL0HOSTFCMODE)
+#define G_FW_IQ_CMD_FL0HOSTFCMODE(x) \
+ (((x) >> S_FW_IQ_CMD_FL0HOSTFCMODE) & M_FW_IQ_CMD_FL0HOSTFCMODE)
+
+#define S_FW_IQ_CMD_FL0CPRIO 3
+#define M_FW_IQ_CMD_FL0CPRIO 0x1
+#define V_FW_IQ_CMD_FL0CPRIO(x) ((x) << S_FW_IQ_CMD_FL0CPRIO)
+#define G_FW_IQ_CMD_FL0CPRIO(x) \
+ (((x) >> S_FW_IQ_CMD_FL0CPRIO) & M_FW_IQ_CMD_FL0CPRIO)
+#define F_FW_IQ_CMD_FL0CPRIO V_FW_IQ_CMD_FL0CPRIO(1U)
+
+#define S_FW_IQ_CMD_FL0PADEN 2
+#define M_FW_IQ_CMD_FL0PADEN 0x1
+#define V_FW_IQ_CMD_FL0PADEN(x) ((x) << S_FW_IQ_CMD_FL0PADEN)
+#define G_FW_IQ_CMD_FL0PADEN(x) \
+ (((x) >> S_FW_IQ_CMD_FL0PADEN) & M_FW_IQ_CMD_FL0PADEN)
+#define F_FW_IQ_CMD_FL0PADEN V_FW_IQ_CMD_FL0PADEN(1U)
+
+#define S_FW_IQ_CMD_FL0PACKEN 1
+#define M_FW_IQ_CMD_FL0PACKEN 0x1
+#define V_FW_IQ_CMD_FL0PACKEN(x) ((x) << S_FW_IQ_CMD_FL0PACKEN)
+#define G_FW_IQ_CMD_FL0PACKEN(x) \
+ (((x) >> S_FW_IQ_CMD_FL0PACKEN) & M_FW_IQ_CMD_FL0PACKEN)
+#define F_FW_IQ_CMD_FL0PACKEN V_FW_IQ_CMD_FL0PACKEN(1U)
+
+#define S_FW_IQ_CMD_FL0CONGEN 0
+#define M_FW_IQ_CMD_FL0CONGEN 0x1
+#define V_FW_IQ_CMD_FL0CONGEN(x) ((x) << S_FW_IQ_CMD_FL0CONGEN)
+#define G_FW_IQ_CMD_FL0CONGEN(x) \
+ (((x) >> S_FW_IQ_CMD_FL0CONGEN) & M_FW_IQ_CMD_FL0CONGEN)
+#define F_FW_IQ_CMD_FL0CONGEN V_FW_IQ_CMD_FL0CONGEN(1U)
+
+#define S_FW_IQ_CMD_FL0DCAEN 15
+#define M_FW_IQ_CMD_FL0DCAEN 0x1
+#define V_FW_IQ_CMD_FL0DCAEN(x) ((x) << S_FW_IQ_CMD_FL0DCAEN)
+#define G_FW_IQ_CMD_FL0DCAEN(x) \
+ (((x) >> S_FW_IQ_CMD_FL0DCAEN) & M_FW_IQ_CMD_FL0DCAEN)
+#define F_FW_IQ_CMD_FL0DCAEN V_FW_IQ_CMD_FL0DCAEN(1U)
+
+#define S_FW_IQ_CMD_FL0DCACPU 10
+#define M_FW_IQ_CMD_FL0DCACPU 0x1f
+#define V_FW_IQ_CMD_FL0DCACPU(x) ((x) << S_FW_IQ_CMD_FL0DCACPU)
+#define G_FW_IQ_CMD_FL0DCACPU(x) \
+ (((x) >> S_FW_IQ_CMD_FL0DCACPU) & M_FW_IQ_CMD_FL0DCACPU)
+
+#define S_FW_IQ_CMD_FL0FBMIN 7
+#define M_FW_IQ_CMD_FL0FBMIN 0x7
+#define V_FW_IQ_CMD_FL0FBMIN(x) ((x) << S_FW_IQ_CMD_FL0FBMIN)
+#define G_FW_IQ_CMD_FL0FBMIN(x) \
+ (((x) >> S_FW_IQ_CMD_FL0FBMIN) & M_FW_IQ_CMD_FL0FBMIN)
+
+#define S_FW_IQ_CMD_FL0FBMAX 4
+#define M_FW_IQ_CMD_FL0FBMAX 0x7
+#define V_FW_IQ_CMD_FL0FBMAX(x) ((x) << S_FW_IQ_CMD_FL0FBMAX)
+#define G_FW_IQ_CMD_FL0FBMAX(x) \
+ (((x) >> S_FW_IQ_CMD_FL0FBMAX) & M_FW_IQ_CMD_FL0FBMAX)
+
+#define S_FW_IQ_CMD_FL0CIDXFTHRESHO 3
+#define M_FW_IQ_CMD_FL0CIDXFTHRESHO 0x1
+#define V_FW_IQ_CMD_FL0CIDXFTHRESHO(x) ((x) << S_FW_IQ_CMD_FL0CIDXFTHRESHO)
+#define G_FW_IQ_CMD_FL0CIDXFTHRESHO(x) \
+ (((x) >> S_FW_IQ_CMD_FL0CIDXFTHRESHO) & M_FW_IQ_CMD_FL0CIDXFTHRESHO)
+#define F_FW_IQ_CMD_FL0CIDXFTHRESHO V_FW_IQ_CMD_FL0CIDXFTHRESHO(1U)
+
+#define S_FW_IQ_CMD_FL0CIDXFTHRESH 0
+#define M_FW_IQ_CMD_FL0CIDXFTHRESH 0x7
+#define V_FW_IQ_CMD_FL0CIDXFTHRESH(x) ((x) << S_FW_IQ_CMD_FL0CIDXFTHRESH)
+#define G_FW_IQ_CMD_FL0CIDXFTHRESH(x) \
+ (((x) >> S_FW_IQ_CMD_FL0CIDXFTHRESH) & M_FW_IQ_CMD_FL0CIDXFTHRESH)
+
+#define S_FW_IQ_CMD_FL1CNGCHMAP 20
+#define M_FW_IQ_CMD_FL1CNGCHMAP 0xf
+#define V_FW_IQ_CMD_FL1CNGCHMAP(x) ((x) << S_FW_IQ_CMD_FL1CNGCHMAP)
+#define G_FW_IQ_CMD_FL1CNGCHMAP(x) \
+ (((x) >> S_FW_IQ_CMD_FL1CNGCHMAP) & M_FW_IQ_CMD_FL1CNGCHMAP)
+
+#define S_FW_IQ_CMD_FL1CACHELOCK 15
+#define M_FW_IQ_CMD_FL1CACHELOCK 0x1
+#define V_FW_IQ_CMD_FL1CACHELOCK(x) ((x) << S_FW_IQ_CMD_FL1CACHELOCK)
+#define G_FW_IQ_CMD_FL1CACHELOCK(x) \
+ (((x) >> S_FW_IQ_CMD_FL1CACHELOCK) & M_FW_IQ_CMD_FL1CACHELOCK)
+#define F_FW_IQ_CMD_FL1CACHELOCK V_FW_IQ_CMD_FL1CACHELOCK(1U)
+
+#define S_FW_IQ_CMD_FL1DBP 14
+#define M_FW_IQ_CMD_FL1DBP 0x1
+#define V_FW_IQ_CMD_FL1DBP(x) ((x) << S_FW_IQ_CMD_FL1DBP)
+#define G_FW_IQ_CMD_FL1DBP(x) \
+ (((x) >> S_FW_IQ_CMD_FL1DBP) & M_FW_IQ_CMD_FL1DBP)
+#define F_FW_IQ_CMD_FL1DBP V_FW_IQ_CMD_FL1DBP(1U)
+
+#define S_FW_IQ_CMD_FL1DATANS 13
+#define M_FW_IQ_CMD_FL1DATANS 0x1
+#define V_FW_IQ_CMD_FL1DATANS(x) ((x) << S_FW_IQ_CMD_FL1DATANS)
+#define G_FW_IQ_CMD_FL1DATANS(x) \
+ (((x) >> S_FW_IQ_CMD_FL1DATANS) & M_FW_IQ_CMD_FL1DATANS)
+#define F_FW_IQ_CMD_FL1DATANS V_FW_IQ_CMD_FL1DATANS(1U)
+
+#define S_FW_IQ_CMD_FL1DATARO 12
+#define M_FW_IQ_CMD_FL1DATARO 0x1
+#define V_FW_IQ_CMD_FL1DATARO(x) ((x) << S_FW_IQ_CMD_FL1DATARO)
+#define G_FW_IQ_CMD_FL1DATARO(x) \
+ (((x) >> S_FW_IQ_CMD_FL1DATARO) & M_FW_IQ_CMD_FL1DATARO)
+#define F_FW_IQ_CMD_FL1DATARO V_FW_IQ_CMD_FL1DATARO(1U)
+
+#define S_FW_IQ_CMD_FL1CONGCIF 11
+#define M_FW_IQ_CMD_FL1CONGCIF 0x1
+#define V_FW_IQ_CMD_FL1CONGCIF(x) ((x) << S_FW_IQ_CMD_FL1CONGCIF)
+#define G_FW_IQ_CMD_FL1CONGCIF(x) \
+ (((x) >> S_FW_IQ_CMD_FL1CONGCIF) & M_FW_IQ_CMD_FL1CONGCIF)
+#define F_FW_IQ_CMD_FL1CONGCIF V_FW_IQ_CMD_FL1CONGCIF(1U)
+
+#define S_FW_IQ_CMD_FL1ONCHIP 10
+#define M_FW_IQ_CMD_FL1ONCHIP 0x1
+#define V_FW_IQ_CMD_FL1ONCHIP(x) ((x) << S_FW_IQ_CMD_FL1ONCHIP)
+#define G_FW_IQ_CMD_FL1ONCHIP(x) \
+ (((x) >> S_FW_IQ_CMD_FL1ONCHIP) & M_FW_IQ_CMD_FL1ONCHIP)
+#define F_FW_IQ_CMD_FL1ONCHIP V_FW_IQ_CMD_FL1ONCHIP(1U)
+
+#define S_FW_IQ_CMD_FL1STATUSPGNS 9
+#define M_FW_IQ_CMD_FL1STATUSPGNS 0x1
+#define V_FW_IQ_CMD_FL1STATUSPGNS(x) ((x) << S_FW_IQ_CMD_FL1STATUSPGNS)
+#define G_FW_IQ_CMD_FL1STATUSPGNS(x) \
+ (((x) >> S_FW_IQ_CMD_FL1STATUSPGNS) & M_FW_IQ_CMD_FL1STATUSPGNS)
+#define F_FW_IQ_CMD_FL1STATUSPGNS V_FW_IQ_CMD_FL1STATUSPGNS(1U)
+
+#define S_FW_IQ_CMD_FL1STATUSPGRO 8
+#define M_FW_IQ_CMD_FL1STATUSPGRO 0x1
+#define V_FW_IQ_CMD_FL1STATUSPGRO(x) ((x) << S_FW_IQ_CMD_FL1STATUSPGRO)
+#define G_FW_IQ_CMD_FL1STATUSPGRO(x) \
+ (((x) >> S_FW_IQ_CMD_FL1STATUSPGRO) & M_FW_IQ_CMD_FL1STATUSPGRO)
+#define F_FW_IQ_CMD_FL1STATUSPGRO V_FW_IQ_CMD_FL1STATUSPGRO(1U)
+
+#define S_FW_IQ_CMD_FL1FETCHNS 7
+#define M_FW_IQ_CMD_FL1FETCHNS 0x1
+#define V_FW_IQ_CMD_FL1FETCHNS(x) ((x) << S_FW_IQ_CMD_FL1FETCHNS)
+#define G_FW_IQ_CMD_FL1FETCHNS(x) \
+ (((x) >> S_FW_IQ_CMD_FL1FETCHNS) & M_FW_IQ_CMD_FL1FETCHNS)
+#define F_FW_IQ_CMD_FL1FETCHNS V_FW_IQ_CMD_FL1FETCHNS(1U)
+
+#define S_FW_IQ_CMD_FL1FETCHRO 6
+#define M_FW_IQ_CMD_FL1FETCHRO 0x1
+#define V_FW_IQ_CMD_FL1FETCHRO(x) ((x) << S_FW_IQ_CMD_FL1FETCHRO)
+#define G_FW_IQ_CMD_FL1FETCHRO(x) \
+ (((x) >> S_FW_IQ_CMD_FL1FETCHRO) & M_FW_IQ_CMD_FL1FETCHRO)
+#define F_FW_IQ_CMD_FL1FETCHRO V_FW_IQ_CMD_FL1FETCHRO(1U)
+
+#define S_FW_IQ_CMD_FL1HOSTFCMODE 4
+#define M_FW_IQ_CMD_FL1HOSTFCMODE 0x3
+#define V_FW_IQ_CMD_FL1HOSTFCMODE(x) ((x) << S_FW_IQ_CMD_FL1HOSTFCMODE)
+#define G_FW_IQ_CMD_FL1HOSTFCMODE(x) \
+ (((x) >> S_FW_IQ_CMD_FL1HOSTFCMODE) & M_FW_IQ_CMD_FL1HOSTFCMODE)
+
+#define S_FW_IQ_CMD_FL1CPRIO 3
+#define M_FW_IQ_CMD_FL1CPRIO 0x1
+#define V_FW_IQ_CMD_FL1CPRIO(x) ((x) << S_FW_IQ_CMD_FL1CPRIO)
+#define G_FW_IQ_CMD_FL1CPRIO(x) \
+ (((x) >> S_FW_IQ_CMD_FL1CPRIO) & M_FW_IQ_CMD_FL1CPRIO)
+#define F_FW_IQ_CMD_FL1CPRIO V_FW_IQ_CMD_FL1CPRIO(1U)
+
+#define S_FW_IQ_CMD_FL1PADEN 2
+#define M_FW_IQ_CMD_FL1PADEN 0x1
+#define V_FW_IQ_CMD_FL1PADEN(x) ((x) << S_FW_IQ_CMD_FL1PADEN)
+#define G_FW_IQ_CMD_FL1PADEN(x) \
+ (((x) >> S_FW_IQ_CMD_FL1PADEN) & M_FW_IQ_CMD_FL1PADEN)
+#define F_FW_IQ_CMD_FL1PADEN V_FW_IQ_CMD_FL1PADEN(1U)
+
+#define S_FW_IQ_CMD_FL1PACKEN 1
+#define M_FW_IQ_CMD_FL1PACKEN 0x1
+#define V_FW_IQ_CMD_FL1PACKEN(x) ((x) << S_FW_IQ_CMD_FL1PACKEN)
+#define G_FW_IQ_CMD_FL1PACKEN(x) \
+ (((x) >> S_FW_IQ_CMD_FL1PACKEN) & M_FW_IQ_CMD_FL1PACKEN)
+#define F_FW_IQ_CMD_FL1PACKEN V_FW_IQ_CMD_FL1PACKEN(1U)
+
+#define S_FW_IQ_CMD_FL1CONGEN 0
+#define M_FW_IQ_CMD_FL1CONGEN 0x1
+#define V_FW_IQ_CMD_FL1CONGEN(x) ((x) << S_FW_IQ_CMD_FL1CONGEN)
+#define G_FW_IQ_CMD_FL1CONGEN(x) \
+ (((x) >> S_FW_IQ_CMD_FL1CONGEN) & M_FW_IQ_CMD_FL1CONGEN)
+#define F_FW_IQ_CMD_FL1CONGEN V_FW_IQ_CMD_FL1CONGEN(1U)
+
+#define S_FW_IQ_CMD_FL1DCAEN 15
+#define M_FW_IQ_CMD_FL1DCAEN 0x1
+#define V_FW_IQ_CMD_FL1DCAEN(x) ((x) << S_FW_IQ_CMD_FL1DCAEN)
+#define G_FW_IQ_CMD_FL1DCAEN(x) \
+ (((x) >> S_FW_IQ_CMD_FL1DCAEN) & M_FW_IQ_CMD_FL1DCAEN)
+#define F_FW_IQ_CMD_FL1DCAEN V_FW_IQ_CMD_FL1DCAEN(1U)
+
+#define S_FW_IQ_CMD_FL1DCACPU 10
+#define M_FW_IQ_CMD_FL1DCACPU 0x1f
+#define V_FW_IQ_CMD_FL1DCACPU(x) ((x) << S_FW_IQ_CMD_FL1DCACPU)
+#define G_FW_IQ_CMD_FL1DCACPU(x) \
+ (((x) >> S_FW_IQ_CMD_FL1DCACPU) & M_FW_IQ_CMD_FL1DCACPU)
+
+#define S_FW_IQ_CMD_FL1FBMIN 7
+#define M_FW_IQ_CMD_FL1FBMIN 0x7
+#define V_FW_IQ_CMD_FL1FBMIN(x) ((x) << S_FW_IQ_CMD_FL1FBMIN)
+#define G_FW_IQ_CMD_FL1FBMIN(x) \
+ (((x) >> S_FW_IQ_CMD_FL1FBMIN) & M_FW_IQ_CMD_FL1FBMIN)
+
+#define S_FW_IQ_CMD_FL1FBMAX 4
+#define M_FW_IQ_CMD_FL1FBMAX 0x7
+#define V_FW_IQ_CMD_FL1FBMAX(x) ((x) << S_FW_IQ_CMD_FL1FBMAX)
+#define G_FW_IQ_CMD_FL1FBMAX(x) \
+ (((x) >> S_FW_IQ_CMD_FL1FBMAX) & M_FW_IQ_CMD_FL1FBMAX)
+
+#define S_FW_IQ_CMD_FL1CIDXFTHRESHO 3
+#define M_FW_IQ_CMD_FL1CIDXFTHRESHO 0x1
+#define V_FW_IQ_CMD_FL1CIDXFTHRESHO(x) ((x) << S_FW_IQ_CMD_FL1CIDXFTHRESHO)
+#define G_FW_IQ_CMD_FL1CIDXFTHRESHO(x) \
+ (((x) >> S_FW_IQ_CMD_FL1CIDXFTHRESHO) & M_FW_IQ_CMD_FL1CIDXFTHRESHO)
+#define F_FW_IQ_CMD_FL1CIDXFTHRESHO V_FW_IQ_CMD_FL1CIDXFTHRESHO(1U)
+
+#define S_FW_IQ_CMD_FL1CIDXFTHRESH 0
+#define M_FW_IQ_CMD_FL1CIDXFTHRESH 0x7
+#define V_FW_IQ_CMD_FL1CIDXFTHRESH(x) ((x) << S_FW_IQ_CMD_FL1CIDXFTHRESH)
+#define G_FW_IQ_CMD_FL1CIDXFTHRESH(x) \
+ (((x) >> S_FW_IQ_CMD_FL1CIDXFTHRESH) & M_FW_IQ_CMD_FL1CIDXFTHRESH)
+
+struct fw_eq_mngt_cmd {
+ __be32 op_to_vfn;
+ __be32 alloc_to_len16;
+ __be32 cmpliqid_eqid;
+ __be32 physeqid_pkd;
+ __be32 fetchszm_to_iqid;
+ __be32 dcaen_to_eqsize;
+ __be64 eqaddr;
+};
+
+#define S_FW_EQ_MNGT_CMD_PFN 8
+#define M_FW_EQ_MNGT_CMD_PFN 0x7
+#define V_FW_EQ_MNGT_CMD_PFN(x) ((x) << S_FW_EQ_MNGT_CMD_PFN)
+#define G_FW_EQ_MNGT_CMD_PFN(x) \
+ (((x) >> S_FW_EQ_MNGT_CMD_PFN) & M_FW_EQ_MNGT_CMD_PFN)
+
+#define S_FW_EQ_MNGT_CMD_VFN 0
+#define M_FW_EQ_MNGT_CMD_VFN 0xff
+#define V_FW_EQ_MNGT_CMD_VFN(x) ((x) << S_FW_EQ_MNGT_CMD_VFN)
+#define G_FW_EQ_MNGT_CMD_VFN(x) \
+ (((x) >> S_FW_EQ_MNGT_CMD_VFN) & M_FW_EQ_MNGT_CMD_VFN)
+
+#define S_FW_EQ_MNGT_CMD_ALLOC 31
+#define M_FW_EQ_MNGT_CMD_ALLOC 0x1
+#define V_FW_EQ_MNGT_CMD_ALLOC(x) ((x) << S_FW_EQ_MNGT_CMD_ALLOC)
+#define G_FW_EQ_MNGT_CMD_ALLOC(x) \
+ (((x) >> S_FW_EQ_MNGT_CMD_ALLOC) & M_FW_EQ_MNGT_CMD_ALLOC)
+#define F_FW_EQ_MNGT_CMD_ALLOC V_FW_EQ_MNGT_CMD_ALLOC(1U)
+
+#define S_FW_EQ_MNGT_CMD_FREE 30
+#define M_FW_EQ_MNGT_CMD_FREE 0x1
+#define V_FW_EQ_MNGT_CMD_FREE(x) ((x) << S_FW_EQ_MNGT_CMD_FREE)
+#define G_FW_EQ_MNGT_CMD_FREE(x) \
+ (((x) >> S_FW_EQ_MNGT_CMD_FREE) & M_FW_EQ_MNGT_CMD_FREE)
+#define F_FW_EQ_MNGT_CMD_FREE V_FW_EQ_MNGT_CMD_FREE(1U)
+
+#define S_FW_EQ_MNGT_CMD_MODIFY 29
+#define M_FW_EQ_MNGT_CMD_MODIFY 0x1
+#define V_FW_EQ_MNGT_CMD_MODIFY(x) ((x) << S_FW_EQ_MNGT_CMD_MODIFY)
+#define G_FW_EQ_MNGT_CMD_MODIFY(x) \
+ (((x) >> S_FW_EQ_MNGT_CMD_MODIFY) & M_FW_EQ_MNGT_CMD_MODIFY)
+#define F_FW_EQ_MNGT_CMD_MODIFY V_FW_EQ_MNGT_CMD_MODIFY(1U)
+
+#define S_FW_EQ_MNGT_CMD_EQSTART 28
+#define M_FW_EQ_MNGT_CMD_EQSTART 0x1
+#define V_FW_EQ_MNGT_CMD_EQSTART(x) ((x) << S_FW_EQ_MNGT_CMD_EQSTART)
+#define G_FW_EQ_MNGT_CMD_EQSTART(x) \
+ (((x) >> S_FW_EQ_MNGT_CMD_EQSTART) & M_FW_EQ_MNGT_CMD_EQSTART)
+#define F_FW_EQ_MNGT_CMD_EQSTART V_FW_EQ_MNGT_CMD_EQSTART(1U)
+
+#define S_FW_EQ_MNGT_CMD_EQSTOP 27
+#define M_FW_EQ_MNGT_CMD_EQSTOP 0x1
+#define V_FW_EQ_MNGT_CMD_EQSTOP(x) ((x) << S_FW_EQ_MNGT_CMD_EQSTOP)
+#define G_FW_EQ_MNGT_CMD_EQSTOP(x) \
+ (((x) >> S_FW_EQ_MNGT_CMD_EQSTOP) & M_FW_EQ_MNGT_CMD_EQSTOP)
+#define F_FW_EQ_MNGT_CMD_EQSTOP V_FW_EQ_MNGT_CMD_EQSTOP(1U)
+
+#define S_FW_EQ_MNGT_CMD_CMPLIQID 20
+#define M_FW_EQ_MNGT_CMD_CMPLIQID 0xfff
+#define V_FW_EQ_MNGT_CMD_CMPLIQID(x) ((x) << S_FW_EQ_MNGT_CMD_CMPLIQID)
+#define G_FW_EQ_MNGT_CMD_CMPLIQID(x) \
+ (((x) >> S_FW_EQ_MNGT_CMD_CMPLIQID) & M_FW_EQ_MNGT_CMD_CMPLIQID)
+
+#define S_FW_EQ_MNGT_CMD_EQID 0
+#define M_FW_EQ_MNGT_CMD_EQID 0xfffff
+#define V_FW_EQ_MNGT_CMD_EQID(x) ((x) << S_FW_EQ_MNGT_CMD_EQID)
+#define G_FW_EQ_MNGT_CMD_EQID(x) \
+ (((x) >> S_FW_EQ_MNGT_CMD_EQID) & M_FW_EQ_MNGT_CMD_EQID)
+
+#define S_FW_EQ_MNGT_CMD_PHYSEQID 0
+#define M_FW_EQ_MNGT_CMD_PHYSEQID 0xfffff
+#define V_FW_EQ_MNGT_CMD_PHYSEQID(x) ((x) << S_FW_EQ_MNGT_CMD_PHYSEQID)
+#define G_FW_EQ_MNGT_CMD_PHYSEQID(x) \
+ (((x) >> S_FW_EQ_MNGT_CMD_PHYSEQID) & M_FW_EQ_MNGT_CMD_PHYSEQID)
+
+#define S_FW_EQ_MNGT_CMD_FETCHSZM 26
+#define M_FW_EQ_MNGT_CMD_FETCHSZM 0x1
+#define V_FW_EQ_MNGT_CMD_FETCHSZM(x) ((x) << S_FW_EQ_MNGT_CMD_FETCHSZM)
+#define G_FW_EQ_MNGT_CMD_FETCHSZM(x) \
+ (((x) >> S_FW_EQ_MNGT_CMD_FETCHSZM) & M_FW_EQ_MNGT_CMD_FETCHSZM)
+#define F_FW_EQ_MNGT_CMD_FETCHSZM V_FW_EQ_MNGT_CMD_FETCHSZM(1U)
+
+#define S_FW_EQ_MNGT_CMD_STATUSPGNS 25
+#define M_FW_EQ_MNGT_CMD_STATUSPGNS 0x1
+#define V_FW_EQ_MNGT_CMD_STATUSPGNS(x) ((x) << S_FW_EQ_MNGT_CMD_STATUSPGNS)
+#define G_FW_EQ_MNGT_CMD_STATUSPGNS(x) \
+ (((x) >> S_FW_EQ_MNGT_CMD_STATUSPGNS) & M_FW_EQ_MNGT_CMD_STATUSPGNS)
+#define F_FW_EQ_MNGT_CMD_STATUSPGNS V_FW_EQ_MNGT_CMD_STATUSPGNS(1U)
+
+#define S_FW_EQ_MNGT_CMD_STATUSPGRO 24
+#define M_FW_EQ_MNGT_CMD_STATUSPGRO 0x1
+#define V_FW_EQ_MNGT_CMD_STATUSPGRO(x) ((x) << S_FW_EQ_MNGT_CMD_STATUSPGRO)
+#define G_FW_EQ_MNGT_CMD_STATUSPGRO(x) \
+ (((x) >> S_FW_EQ_MNGT_CMD_STATUSPGRO) & M_FW_EQ_MNGT_CMD_STATUSPGRO)
+#define F_FW_EQ_MNGT_CMD_STATUSPGRO V_FW_EQ_MNGT_CMD_STATUSPGRO(1U)
+
+#define S_FW_EQ_MNGT_CMD_FETCHNS 23
+#define M_FW_EQ_MNGT_CMD_FETCHNS 0x1
+#define V_FW_EQ_MNGT_CMD_FETCHNS(x) ((x) << S_FW_EQ_MNGT_CMD_FETCHNS)
+#define G_FW_EQ_MNGT_CMD_FETCHNS(x) \
+ (((x) >> S_FW_EQ_MNGT_CMD_FETCHNS) & M_FW_EQ_MNGT_CMD_FETCHNS)
+#define F_FW_EQ_MNGT_CMD_FETCHNS V_FW_EQ_MNGT_CMD_FETCHNS(1U)
+
+#define S_FW_EQ_MNGT_CMD_FETCHRO 22
+#define M_FW_EQ_MNGT_CMD_FETCHRO 0x1
+#define V_FW_EQ_MNGT_CMD_FETCHRO(x) ((x) << S_FW_EQ_MNGT_CMD_FETCHRO)
+#define G_FW_EQ_MNGT_CMD_FETCHRO(x) \
+ (((x) >> S_FW_EQ_MNGT_CMD_FETCHRO) & M_FW_EQ_MNGT_CMD_FETCHRO)
+#define F_FW_EQ_MNGT_CMD_FETCHRO V_FW_EQ_MNGT_CMD_FETCHRO(1U)
+
+#define S_FW_EQ_MNGT_CMD_HOSTFCMODE 20
+#define M_FW_EQ_MNGT_CMD_HOSTFCMODE 0x3
+#define V_FW_EQ_MNGT_CMD_HOSTFCMODE(x) ((x) << S_FW_EQ_MNGT_CMD_HOSTFCMODE)
+#define G_FW_EQ_MNGT_CMD_HOSTFCMODE(x) \
+ (((x) >> S_FW_EQ_MNGT_CMD_HOSTFCMODE) & M_FW_EQ_MNGT_CMD_HOSTFCMODE)
+
+#define S_FW_EQ_MNGT_CMD_CPRIO 19
+#define M_FW_EQ_MNGT_CMD_CPRIO 0x1
+#define V_FW_EQ_MNGT_CMD_CPRIO(x) ((x) << S_FW_EQ_MNGT_CMD_CPRIO)
+#define G_FW_EQ_MNGT_CMD_CPRIO(x) \
+ (((x) >> S_FW_EQ_MNGT_CMD_CPRIO) & M_FW_EQ_MNGT_CMD_CPRIO)
+#define F_FW_EQ_MNGT_CMD_CPRIO V_FW_EQ_MNGT_CMD_CPRIO(1U)
+
+#define S_FW_EQ_MNGT_CMD_ONCHIP 18
+#define M_FW_EQ_MNGT_CMD_ONCHIP 0x1
+#define V_FW_EQ_MNGT_CMD_ONCHIP(x) ((x) << S_FW_EQ_MNGT_CMD_ONCHIP)
+#define G_FW_EQ_MNGT_CMD_ONCHIP(x) \
+ (((x) >> S_FW_EQ_MNGT_CMD_ONCHIP) & M_FW_EQ_MNGT_CMD_ONCHIP)
+#define F_FW_EQ_MNGT_CMD_ONCHIP V_FW_EQ_MNGT_CMD_ONCHIP(1U)
+
+#define S_FW_EQ_MNGT_CMD_PCIECHN 16
+#define M_FW_EQ_MNGT_CMD_PCIECHN 0x3
+#define V_FW_EQ_MNGT_CMD_PCIECHN(x) ((x) << S_FW_EQ_MNGT_CMD_PCIECHN)
+#define G_FW_EQ_MNGT_CMD_PCIECHN(x) \
+ (((x) >> S_FW_EQ_MNGT_CMD_PCIECHN) & M_FW_EQ_MNGT_CMD_PCIECHN)
+
+#define S_FW_EQ_MNGT_CMD_IQID 0
+#define M_FW_EQ_MNGT_CMD_IQID 0xffff
+#define V_FW_EQ_MNGT_CMD_IQID(x) ((x) << S_FW_EQ_MNGT_CMD_IQID)
+#define G_FW_EQ_MNGT_CMD_IQID(x) \
+ (((x) >> S_FW_EQ_MNGT_CMD_IQID) & M_FW_EQ_MNGT_CMD_IQID)
+
+#define S_FW_EQ_MNGT_CMD_DCAEN 31
+#define M_FW_EQ_MNGT_CMD_DCAEN 0x1
+#define V_FW_EQ_MNGT_CMD_DCAEN(x) ((x) << S_FW_EQ_MNGT_CMD_DCAEN)
+#define G_FW_EQ_MNGT_CMD_DCAEN(x) \
+ (((x) >> S_FW_EQ_MNGT_CMD_DCAEN) & M_FW_EQ_MNGT_CMD_DCAEN)
+#define F_FW_EQ_MNGT_CMD_DCAEN V_FW_EQ_MNGT_CMD_DCAEN(1U)
+
+#define S_FW_EQ_MNGT_CMD_DCACPU 26
+#define M_FW_EQ_MNGT_CMD_DCACPU 0x1f
+#define V_FW_EQ_MNGT_CMD_DCACPU(x) ((x) << S_FW_EQ_MNGT_CMD_DCACPU)
+#define G_FW_EQ_MNGT_CMD_DCACPU(x) \
+ (((x) >> S_FW_EQ_MNGT_CMD_DCACPU) & M_FW_EQ_MNGT_CMD_DCACPU)
+
+#define S_FW_EQ_MNGT_CMD_FBMIN 23
+#define M_FW_EQ_MNGT_CMD_FBMIN 0x7
+#define V_FW_EQ_MNGT_CMD_FBMIN(x) ((x) << S_FW_EQ_MNGT_CMD_FBMIN)
+#define G_FW_EQ_MNGT_CMD_FBMIN(x) \
+ (((x) >> S_FW_EQ_MNGT_CMD_FBMIN) & M_FW_EQ_MNGT_CMD_FBMIN)
+
+#define S_FW_EQ_MNGT_CMD_FBMAX 20
+#define M_FW_EQ_MNGT_CMD_FBMAX 0x7
+#define V_FW_EQ_MNGT_CMD_FBMAX(x) ((x) << S_FW_EQ_MNGT_CMD_FBMAX)
+#define G_FW_EQ_MNGT_CMD_FBMAX(x) \
+ (((x) >> S_FW_EQ_MNGT_CMD_FBMAX) & M_FW_EQ_MNGT_CMD_FBMAX)
+
+#define S_FW_EQ_MNGT_CMD_CIDXFTHRESHO 19
+#define M_FW_EQ_MNGT_CMD_CIDXFTHRESHO 0x1
+#define V_FW_EQ_MNGT_CMD_CIDXFTHRESHO(x) \
+ ((x) << S_FW_EQ_MNGT_CMD_CIDXFTHRESHO)
+#define G_FW_EQ_MNGT_CMD_CIDXFTHRESHO(x) \
+ (((x) >> S_FW_EQ_MNGT_CMD_CIDXFTHRESHO) & M_FW_EQ_MNGT_CMD_CIDXFTHRESHO)
+#define F_FW_EQ_MNGT_CMD_CIDXFTHRESHO V_FW_EQ_MNGT_CMD_CIDXFTHRESHO(1U)
+
+#define S_FW_EQ_MNGT_CMD_CIDXFTHRESH 16
+#define M_FW_EQ_MNGT_CMD_CIDXFTHRESH 0x7
+#define V_FW_EQ_MNGT_CMD_CIDXFTHRESH(x) ((x) << S_FW_EQ_MNGT_CMD_CIDXFTHRESH)
+#define G_FW_EQ_MNGT_CMD_CIDXFTHRESH(x) \
+ (((x) >> S_FW_EQ_MNGT_CMD_CIDXFTHRESH) & M_FW_EQ_MNGT_CMD_CIDXFTHRESH)
+
+#define S_FW_EQ_MNGT_CMD_EQSIZE 0
+#define M_FW_EQ_MNGT_CMD_EQSIZE 0xffff
+#define V_FW_EQ_MNGT_CMD_EQSIZE(x) ((x) << S_FW_EQ_MNGT_CMD_EQSIZE)
+#define G_FW_EQ_MNGT_CMD_EQSIZE(x) \
+ (((x) >> S_FW_EQ_MNGT_CMD_EQSIZE) & M_FW_EQ_MNGT_CMD_EQSIZE)
+
+struct fw_eq_eth_cmd {
+ __be32 op_to_vfn;
+ __be32 alloc_to_len16;
+ __be32 eqid_pkd;
+ __be32 physeqid_pkd;
+ __be32 fetchszm_to_iqid;
+ __be32 dcaen_to_eqsize;
+ __be64 eqaddr;
+ __be32 viid_pkd;
+ __be32 r8_lo;
+ __be64 r9;
+};
+
+#define S_FW_EQ_ETH_CMD_PFN 8
+#define M_FW_EQ_ETH_CMD_PFN 0x7
+#define V_FW_EQ_ETH_CMD_PFN(x) ((x) << S_FW_EQ_ETH_CMD_PFN)
+#define G_FW_EQ_ETH_CMD_PFN(x) \
+ (((x) >> S_FW_EQ_ETH_CMD_PFN) & M_FW_EQ_ETH_CMD_PFN)
+
+#define S_FW_EQ_ETH_CMD_VFN 0
+#define M_FW_EQ_ETH_CMD_VFN 0xff
+#define V_FW_EQ_ETH_CMD_VFN(x) ((x) << S_FW_EQ_ETH_CMD_VFN)
+#define G_FW_EQ_ETH_CMD_VFN(x) \
+ (((x) >> S_FW_EQ_ETH_CMD_VFN) & M_FW_EQ_ETH_CMD_VFN)
+
+#define S_FW_EQ_ETH_CMD_ALLOC 31
+#define M_FW_EQ_ETH_CMD_ALLOC 0x1
+#define V_FW_EQ_ETH_CMD_ALLOC(x) ((x) << S_FW_EQ_ETH_CMD_ALLOC)
+#define G_FW_EQ_ETH_CMD_ALLOC(x) \
+ (((x) >> S_FW_EQ_ETH_CMD_ALLOC) & M_FW_EQ_ETH_CMD_ALLOC)
+#define F_FW_EQ_ETH_CMD_ALLOC V_FW_EQ_ETH_CMD_ALLOC(1U)
+
+#define S_FW_EQ_ETH_CMD_FREE 30
+#define M_FW_EQ_ETH_CMD_FREE 0x1
+#define V_FW_EQ_ETH_CMD_FREE(x) ((x) << S_FW_EQ_ETH_CMD_FREE)
+#define G_FW_EQ_ETH_CMD_FREE(x) \
+ (((x) >> S_FW_EQ_ETH_CMD_FREE) & M_FW_EQ_ETH_CMD_FREE)
+#define F_FW_EQ_ETH_CMD_FREE V_FW_EQ_ETH_CMD_FREE(1U)
+
+#define S_FW_EQ_ETH_CMD_MODIFY 29
+#define M_FW_EQ_ETH_CMD_MODIFY 0x1
+#define V_FW_EQ_ETH_CMD_MODIFY(x) ((x) << S_FW_EQ_ETH_CMD_MODIFY)
+#define G_FW_EQ_ETH_CMD_MODIFY(x) \
+ (((x) >> S_FW_EQ_ETH_CMD_MODIFY) & M_FW_EQ_ETH_CMD_MODIFY)
+#define F_FW_EQ_ETH_CMD_MODIFY V_FW_EQ_ETH_CMD_MODIFY(1U)
+
+#define S_FW_EQ_ETH_CMD_EQSTART 28
+#define M_FW_EQ_ETH_CMD_EQSTART 0x1
+#define V_FW_EQ_ETH_CMD_EQSTART(x) ((x) << S_FW_EQ_ETH_CMD_EQSTART)
+#define G_FW_EQ_ETH_CMD_EQSTART(x) \
+ (((x) >> S_FW_EQ_ETH_CMD_EQSTART) & M_FW_EQ_ETH_CMD_EQSTART)
+#define F_FW_EQ_ETH_CMD_EQSTART V_FW_EQ_ETH_CMD_EQSTART(1U)
+
+#define S_FW_EQ_ETH_CMD_EQSTOP 27
+#define M_FW_EQ_ETH_CMD_EQSTOP 0x1
+#define V_FW_EQ_ETH_CMD_EQSTOP(x) ((x) << S_FW_EQ_ETH_CMD_EQSTOP)
+#define G_FW_EQ_ETH_CMD_EQSTOP(x) \
+ (((x) >> S_FW_EQ_ETH_CMD_EQSTOP) & M_FW_EQ_ETH_CMD_EQSTOP)
+#define F_FW_EQ_ETH_CMD_EQSTOP V_FW_EQ_ETH_CMD_EQSTOP(1U)
+
+#define S_FW_EQ_ETH_CMD_EQID 0
+#define M_FW_EQ_ETH_CMD_EQID 0xfffff
+#define V_FW_EQ_ETH_CMD_EQID(x) ((x) << S_FW_EQ_ETH_CMD_EQID)
+#define G_FW_EQ_ETH_CMD_EQID(x) \
+ (((x) >> S_FW_EQ_ETH_CMD_EQID) & M_FW_EQ_ETH_CMD_EQID)
+
+#define S_FW_EQ_ETH_CMD_PHYSEQID 0
+#define M_FW_EQ_ETH_CMD_PHYSEQID 0xfffff
+#define V_FW_EQ_ETH_CMD_PHYSEQID(x) ((x) << S_FW_EQ_ETH_CMD_PHYSEQID)
+#define G_FW_EQ_ETH_CMD_PHYSEQID(x) \
+ (((x) >> S_FW_EQ_ETH_CMD_PHYSEQID) & M_FW_EQ_ETH_CMD_PHYSEQID)
+
+#define S_FW_EQ_ETH_CMD_FETCHSZM 26
+#define M_FW_EQ_ETH_CMD_FETCHSZM 0x1
+#define V_FW_EQ_ETH_CMD_FETCHSZM(x) ((x) << S_FW_EQ_ETH_CMD_FETCHSZM)
+#define G_FW_EQ_ETH_CMD_FETCHSZM(x) \
+ (((x) >> S_FW_EQ_ETH_CMD_FETCHSZM) & M_FW_EQ_ETH_CMD_FETCHSZM)
+#define F_FW_EQ_ETH_CMD_FETCHSZM V_FW_EQ_ETH_CMD_FETCHSZM(1U)
+
+#define S_FW_EQ_ETH_CMD_STATUSPGNS 25
+#define M_FW_EQ_ETH_CMD_STATUSPGNS 0x1
+#define V_FW_EQ_ETH_CMD_STATUSPGNS(x) ((x) << S_FW_EQ_ETH_CMD_STATUSPGNS)
+#define G_FW_EQ_ETH_CMD_STATUSPGNS(x) \
+ (((x) >> S_FW_EQ_ETH_CMD_STATUSPGNS) & M_FW_EQ_ETH_CMD_STATUSPGNS)
+#define F_FW_EQ_ETH_CMD_STATUSPGNS V_FW_EQ_ETH_CMD_STATUSPGNS(1U)
+
+#define S_FW_EQ_ETH_CMD_STATUSPGRO 24
+#define M_FW_EQ_ETH_CMD_STATUSPGRO 0x1
+#define V_FW_EQ_ETH_CMD_STATUSPGRO(x) ((x) << S_FW_EQ_ETH_CMD_STATUSPGRO)
+#define G_FW_EQ_ETH_CMD_STATUSPGRO(x) \
+ (((x) >> S_FW_EQ_ETH_CMD_STATUSPGRO) & M_FW_EQ_ETH_CMD_STATUSPGRO)
+#define F_FW_EQ_ETH_CMD_STATUSPGRO V_FW_EQ_ETH_CMD_STATUSPGRO(1U)
+
+#define S_FW_EQ_ETH_CMD_FETCHNS 23
+#define M_FW_EQ_ETH_CMD_FETCHNS 0x1
+#define V_FW_EQ_ETH_CMD_FETCHNS(x) ((x) << S_FW_EQ_ETH_CMD_FETCHNS)
+#define G_FW_EQ_ETH_CMD_FETCHNS(x) \
+ (((x) >> S_FW_EQ_ETH_CMD_FETCHNS) & M_FW_EQ_ETH_CMD_FETCHNS)
+#define F_FW_EQ_ETH_CMD_FETCHNS V_FW_EQ_ETH_CMD_FETCHNS(1U)
+
+#define S_FW_EQ_ETH_CMD_FETCHRO 22
+#define M_FW_EQ_ETH_CMD_FETCHRO 0x1
+#define V_FW_EQ_ETH_CMD_FETCHRO(x) ((x) << S_FW_EQ_ETH_CMD_FETCHRO)
+#define G_FW_EQ_ETH_CMD_FETCHRO(x) \
+ (((x) >> S_FW_EQ_ETH_CMD_FETCHRO) & M_FW_EQ_ETH_CMD_FETCHRO)
+#define F_FW_EQ_ETH_CMD_FETCHRO V_FW_EQ_ETH_CMD_FETCHRO(1U)
+
+#define S_FW_EQ_ETH_CMD_HOSTFCMODE 20
+#define M_FW_EQ_ETH_CMD_HOSTFCMODE 0x3
+#define V_FW_EQ_ETH_CMD_HOSTFCMODE(x) ((x) << S_FW_EQ_ETH_CMD_HOSTFCMODE)
+#define G_FW_EQ_ETH_CMD_HOSTFCMODE(x) \
+ (((x) >> S_FW_EQ_ETH_CMD_HOSTFCMODE) & M_FW_EQ_ETH_CMD_HOSTFCMODE)
+
+#define S_FW_EQ_ETH_CMD_CPRIO 19
+#define M_FW_EQ_ETH_CMD_CPRIO 0x1
+#define V_FW_EQ_ETH_CMD_CPRIO(x) ((x) << S_FW_EQ_ETH_CMD_CPRIO)
+#define G_FW_EQ_ETH_CMD_CPRIO(x) \
+ (((x) >> S_FW_EQ_ETH_CMD_CPRIO) & M_FW_EQ_ETH_CMD_CPRIO)
+#define F_FW_EQ_ETH_CMD_CPRIO V_FW_EQ_ETH_CMD_CPRIO(1U)
+
+#define S_FW_EQ_ETH_CMD_ONCHIP 18
+#define M_FW_EQ_ETH_CMD_ONCHIP 0x1
+#define V_FW_EQ_ETH_CMD_ONCHIP(x) ((x) << S_FW_EQ_ETH_CMD_ONCHIP)
+#define G_FW_EQ_ETH_CMD_ONCHIP(x) \
+ (((x) >> S_FW_EQ_ETH_CMD_ONCHIP) & M_FW_EQ_ETH_CMD_ONCHIP)
+#define F_FW_EQ_ETH_CMD_ONCHIP V_FW_EQ_ETH_CMD_ONCHIP(1U)
+
+#define S_FW_EQ_ETH_CMD_PCIECHN 16
+#define M_FW_EQ_ETH_CMD_PCIECHN 0x3
+#define V_FW_EQ_ETH_CMD_PCIECHN(x) ((x) << S_FW_EQ_ETH_CMD_PCIECHN)
+#define G_FW_EQ_ETH_CMD_PCIECHN(x) \
+ (((x) >> S_FW_EQ_ETH_CMD_PCIECHN) & M_FW_EQ_ETH_CMD_PCIECHN)
+
+#define S_FW_EQ_ETH_CMD_IQID 0
+#define M_FW_EQ_ETH_CMD_IQID 0xffff
+#define V_FW_EQ_ETH_CMD_IQID(x) ((x) << S_FW_EQ_ETH_CMD_IQID)
+#define G_FW_EQ_ETH_CMD_IQID(x) \
+ (((x) >> S_FW_EQ_ETH_CMD_IQID) & M_FW_EQ_ETH_CMD_IQID)
+
+#define S_FW_EQ_ETH_CMD_DCAEN 31
+#define M_FW_EQ_ETH_CMD_DCAEN 0x1
+#define V_FW_EQ_ETH_CMD_DCAEN(x) ((x) << S_FW_EQ_ETH_CMD_DCAEN)
+#define G_FW_EQ_ETH_CMD_DCAEN(x) \
+ (((x) >> S_FW_EQ_ETH_CMD_DCAEN) & M_FW_EQ_ETH_CMD_DCAEN)
+#define F_FW_EQ_ETH_CMD_DCAEN V_FW_EQ_ETH_CMD_DCAEN(1U)
+
+#define S_FW_EQ_ETH_CMD_DCACPU 26
+#define M_FW_EQ_ETH_CMD_DCACPU 0x1f
+#define V_FW_EQ_ETH_CMD_DCACPU(x) ((x) << S_FW_EQ_ETH_CMD_DCACPU)
+#define G_FW_EQ_ETH_CMD_DCACPU(x) \
+ (((x) >> S_FW_EQ_ETH_CMD_DCACPU) & M_FW_EQ_ETH_CMD_DCACPU)
+
+#define S_FW_EQ_ETH_CMD_FBMIN 23
+#define M_FW_EQ_ETH_CMD_FBMIN 0x7
+#define V_FW_EQ_ETH_CMD_FBMIN(x) ((x) << S_FW_EQ_ETH_CMD_FBMIN)
+#define G_FW_EQ_ETH_CMD_FBMIN(x) \
+ (((x) >> S_FW_EQ_ETH_CMD_FBMIN) & M_FW_EQ_ETH_CMD_FBMIN)
+
+#define S_FW_EQ_ETH_CMD_FBMAX 20
+#define M_FW_EQ_ETH_CMD_FBMAX 0x7
+#define V_FW_EQ_ETH_CMD_FBMAX(x) ((x) << S_FW_EQ_ETH_CMD_FBMAX)
+#define G_FW_EQ_ETH_CMD_FBMAX(x) \
+ (((x) >> S_FW_EQ_ETH_CMD_FBMAX) & M_FW_EQ_ETH_CMD_FBMAX)
+
+#define S_FW_EQ_ETH_CMD_CIDXFTHRESHO 19
+#define M_FW_EQ_ETH_CMD_CIDXFTHRESHO 0x1
+#define V_FW_EQ_ETH_CMD_CIDXFTHRESHO(x) ((x) << S_FW_EQ_ETH_CMD_CIDXFTHRESHO)
+#define G_FW_EQ_ETH_CMD_CIDXFTHRESHO(x) \
+ (((x) >> S_FW_EQ_ETH_CMD_CIDXFTHRESHO) & M_FW_EQ_ETH_CMD_CIDXFTHRESHO)
+#define F_FW_EQ_ETH_CMD_CIDXFTHRESHO V_FW_EQ_ETH_CMD_CIDXFTHRESHO(1U)
+
+#define S_FW_EQ_ETH_CMD_CIDXFTHRESH 16
+#define M_FW_EQ_ETH_CMD_CIDXFTHRESH 0x7
+#define V_FW_EQ_ETH_CMD_CIDXFTHRESH(x) ((x) << S_FW_EQ_ETH_CMD_CIDXFTHRESH)
+#define G_FW_EQ_ETH_CMD_CIDXFTHRESH(x) \
+ (((x) >> S_FW_EQ_ETH_CMD_CIDXFTHRESH) & M_FW_EQ_ETH_CMD_CIDXFTHRESH)
+
+#define S_FW_EQ_ETH_CMD_EQSIZE 0
+#define M_FW_EQ_ETH_CMD_EQSIZE 0xffff
+#define V_FW_EQ_ETH_CMD_EQSIZE(x) ((x) << S_FW_EQ_ETH_CMD_EQSIZE)
+#define G_FW_EQ_ETH_CMD_EQSIZE(x) \
+ (((x) >> S_FW_EQ_ETH_CMD_EQSIZE) & M_FW_EQ_ETH_CMD_EQSIZE)
+
+#define S_FW_EQ_ETH_CMD_VIID 16
+#define M_FW_EQ_ETH_CMD_VIID 0xfff
+#define V_FW_EQ_ETH_CMD_VIID(x) ((x) << S_FW_EQ_ETH_CMD_VIID)
+#define G_FW_EQ_ETH_CMD_VIID(x) \
+ (((x) >> S_FW_EQ_ETH_CMD_VIID) & M_FW_EQ_ETH_CMD_VIID)
+
+struct fw_eq_ctrl_cmd {
+ __be32 op_to_vfn;
+ __be32 alloc_to_len16;
+ __be32 cmpliqid_eqid;
+ __be32 physeqid_pkd;
+ __be32 fetchszm_to_iqid;
+ __be32 dcaen_to_eqsize;
+ __be64 eqaddr;
+};
+
+#define S_FW_EQ_CTRL_CMD_PFN 8
+#define M_FW_EQ_CTRL_CMD_PFN 0x7
+#define V_FW_EQ_CTRL_CMD_PFN(x) ((x) << S_FW_EQ_CTRL_CMD_PFN)
+#define G_FW_EQ_CTRL_CMD_PFN(x) \
+ (((x) >> S_FW_EQ_CTRL_CMD_PFN) & M_FW_EQ_CTRL_CMD_PFN)
+
+#define S_FW_EQ_CTRL_CMD_VFN 0
+#define M_FW_EQ_CTRL_CMD_VFN 0xff
+#define V_FW_EQ_CTRL_CMD_VFN(x) ((x) << S_FW_EQ_CTRL_CMD_VFN)
+#define G_FW_EQ_CTRL_CMD_VFN(x) \
+ (((x) >> S_FW_EQ_CTRL_CMD_VFN) & M_FW_EQ_CTRL_CMD_VFN)
+
+#define S_FW_EQ_CTRL_CMD_ALLOC 31
+#define M_FW_EQ_CTRL_CMD_ALLOC 0x1
+#define V_FW_EQ_CTRL_CMD_ALLOC(x) ((x) << S_FW_EQ_CTRL_CMD_ALLOC)
+#define G_FW_EQ_CTRL_CMD_ALLOC(x) \
+ (((x) >> S_FW_EQ_CTRL_CMD_ALLOC) & M_FW_EQ_CTRL_CMD_ALLOC)
+#define F_FW_EQ_CTRL_CMD_ALLOC V_FW_EQ_CTRL_CMD_ALLOC(1U)
+
+#define S_FW_EQ_CTRL_CMD_FREE 30
+#define M_FW_EQ_CTRL_CMD_FREE 0x1
+#define V_FW_EQ_CTRL_CMD_FREE(x) ((x) << S_FW_EQ_CTRL_CMD_FREE)
+#define G_FW_EQ_CTRL_CMD_FREE(x) \
+ (((x) >> S_FW_EQ_CTRL_CMD_FREE) & M_FW_EQ_CTRL_CMD_FREE)
+#define F_FW_EQ_CTRL_CMD_FREE V_FW_EQ_CTRL_CMD_FREE(1U)
+
+#define S_FW_EQ_CTRL_CMD_MODIFY 29
+#define M_FW_EQ_CTRL_CMD_MODIFY 0x1
+#define V_FW_EQ_CTRL_CMD_MODIFY(x) ((x) << S_FW_EQ_CTRL_CMD_MODIFY)
+#define G_FW_EQ_CTRL_CMD_MODIFY(x) \
+ (((x) >> S_FW_EQ_CTRL_CMD_MODIFY) & M_FW_EQ_CTRL_CMD_MODIFY)
+#define F_FW_EQ_CTRL_CMD_MODIFY V_FW_EQ_CTRL_CMD_MODIFY(1U)
+
+#define S_FW_EQ_CTRL_CMD_EQSTART 28
+#define M_FW_EQ_CTRL_CMD_EQSTART 0x1
+#define V_FW_EQ_CTRL_CMD_EQSTART(x) ((x) << S_FW_EQ_CTRL_CMD_EQSTART)
+#define G_FW_EQ_CTRL_CMD_EQSTART(x) \
+ (((x) >> S_FW_EQ_CTRL_CMD_EQSTART) & M_FW_EQ_CTRL_CMD_EQSTART)
+#define F_FW_EQ_CTRL_CMD_EQSTART V_FW_EQ_CTRL_CMD_EQSTART(1U)
+
+#define S_FW_EQ_CTRL_CMD_EQSTOP 27
+#define M_FW_EQ_CTRL_CMD_EQSTOP 0x1
+#define V_FW_EQ_CTRL_CMD_EQSTOP(x) ((x) << S_FW_EQ_CTRL_CMD_EQSTOP)
+#define G_FW_EQ_CTRL_CMD_EQSTOP(x) \
+ (((x) >> S_FW_EQ_CTRL_CMD_EQSTOP) & M_FW_EQ_CTRL_CMD_EQSTOP)
+#define F_FW_EQ_CTRL_CMD_EQSTOP V_FW_EQ_CTRL_CMD_EQSTOP(1U)
+
+#define S_FW_EQ_CTRL_CMD_CMPLIQID 20
+#define M_FW_EQ_CTRL_CMD_CMPLIQID 0xfff
+#define V_FW_EQ_CTRL_CMD_CMPLIQID(x) ((x) << S_FW_EQ_CTRL_CMD_CMPLIQID)
+#define G_FW_EQ_CTRL_CMD_CMPLIQID(x) \
+ (((x) >> S_FW_EQ_CTRL_CMD_CMPLIQID) & M_FW_EQ_CTRL_CMD_CMPLIQID)
+
+#define S_FW_EQ_CTRL_CMD_EQID 0
+#define M_FW_EQ_CTRL_CMD_EQID 0xfffff
+#define V_FW_EQ_CTRL_CMD_EQID(x) ((x) << S_FW_EQ_CTRL_CMD_EQID)
+#define G_FW_EQ_CTRL_CMD_EQID(x) \
+ (((x) >> S_FW_EQ_CTRL_CMD_EQID) & M_FW_EQ_CTRL_CMD_EQID)
+
+#define S_FW_EQ_CTRL_CMD_PHYSEQID 0
+#define M_FW_EQ_CTRL_CMD_PHYSEQID 0xfffff
+#define V_FW_EQ_CTRL_CMD_PHYSEQID(x) ((x) << S_FW_EQ_CTRL_CMD_PHYSEQID)
+#define G_FW_EQ_CTRL_CMD_PHYSEQID(x) \
+ (((x) >> S_FW_EQ_CTRL_CMD_PHYSEQID) & M_FW_EQ_CTRL_CMD_PHYSEQID)
+
+#define S_FW_EQ_CTRL_CMD_FETCHSZM 26
+#define M_FW_EQ_CTRL_CMD_FETCHSZM 0x1
+#define V_FW_EQ_CTRL_CMD_FETCHSZM(x) ((x) << S_FW_EQ_CTRL_CMD_FETCHSZM)
+#define G_FW_EQ_CTRL_CMD_FETCHSZM(x) \
+ (((x) >> S_FW_EQ_CTRL_CMD_FETCHSZM) & M_FW_EQ_CTRL_CMD_FETCHSZM)
+#define F_FW_EQ_CTRL_CMD_FETCHSZM V_FW_EQ_CTRL_CMD_FETCHSZM(1U)
+
+#define S_FW_EQ_CTRL_CMD_STATUSPGNS 25
+#define M_FW_EQ_CTRL_CMD_STATUSPGNS 0x1
+#define V_FW_EQ_CTRL_CMD_STATUSPGNS(x) ((x) << S_FW_EQ_CTRL_CMD_STATUSPGNS)
+#define G_FW_EQ_CTRL_CMD_STATUSPGNS(x) \
+ (((x) >> S_FW_EQ_CTRL_CMD_STATUSPGNS) & M_FW_EQ_CTRL_CMD_STATUSPGNS)
+#define F_FW_EQ_CTRL_CMD_STATUSPGNS V_FW_EQ_CTRL_CMD_STATUSPGNS(1U)
+
+#define S_FW_EQ_CTRL_CMD_STATUSPGRO 24
+#define M_FW_EQ_CTRL_CMD_STATUSPGRO 0x1
+#define V_FW_EQ_CTRL_CMD_STATUSPGRO(x) ((x) << S_FW_EQ_CTRL_CMD_STATUSPGRO)
+#define G_FW_EQ_CTRL_CMD_STATUSPGRO(x) \
+ (((x) >> S_FW_EQ_CTRL_CMD_STATUSPGRO) & M_FW_EQ_CTRL_CMD_STATUSPGRO)
+#define F_FW_EQ_CTRL_CMD_STATUSPGRO V_FW_EQ_CTRL_CMD_STATUSPGRO(1U)
+
+#define S_FW_EQ_CTRL_CMD_FETCHNS 23
+#define M_FW_EQ_CTRL_CMD_FETCHNS 0x1
+#define V_FW_EQ_CTRL_CMD_FETCHNS(x) ((x) << S_FW_EQ_CTRL_CMD_FETCHNS)
+#define G_FW_EQ_CTRL_CMD_FETCHNS(x) \
+ (((x) >> S_FW_EQ_CTRL_CMD_FETCHNS) & M_FW_EQ_CTRL_CMD_FETCHNS)
+#define F_FW_EQ_CTRL_CMD_FETCHNS V_FW_EQ_CTRL_CMD_FETCHNS(1U)
+
+#define S_FW_EQ_CTRL_CMD_FETCHRO 22
+#define M_FW_EQ_CTRL_CMD_FETCHRO 0x1
+#define V_FW_EQ_CTRL_CMD_FETCHRO(x) ((x) << S_FW_EQ_CTRL_CMD_FETCHRO)
+#define G_FW_EQ_CTRL_CMD_FETCHRO(x) \
+ (((x) >> S_FW_EQ_CTRL_CMD_FETCHRO) & M_FW_EQ_CTRL_CMD_FETCHRO)
+#define F_FW_EQ_CTRL_CMD_FETCHRO V_FW_EQ_CTRL_CMD_FETCHRO(1U)
+
+#define S_FW_EQ_CTRL_CMD_HOSTFCMODE 20
+#define M_FW_EQ_CTRL_CMD_HOSTFCMODE 0x3
+#define V_FW_EQ_CTRL_CMD_HOSTFCMODE(x) ((x) << S_FW_EQ_CTRL_CMD_HOSTFCMODE)
+#define G_FW_EQ_CTRL_CMD_HOSTFCMODE(x) \
+ (((x) >> S_FW_EQ_CTRL_CMD_HOSTFCMODE) & M_FW_EQ_CTRL_CMD_HOSTFCMODE)
+
+#define S_FW_EQ_CTRL_CMD_CPRIO 19
+#define M_FW_EQ_CTRL_CMD_CPRIO 0x1
+#define V_FW_EQ_CTRL_CMD_CPRIO(x) ((x) << S_FW_EQ_CTRL_CMD_CPRIO)
+#define G_FW_EQ_CTRL_CMD_CPRIO(x) \
+ (((x) >> S_FW_EQ_CTRL_CMD_CPRIO) & M_FW_EQ_CTRL_CMD_CPRIO)
+#define F_FW_EQ_CTRL_CMD_CPRIO V_FW_EQ_CTRL_CMD_CPRIO(1U)
+
+#define S_FW_EQ_CTRL_CMD_ONCHIP 18
+#define M_FW_EQ_CTRL_CMD_ONCHIP 0x1
+#define V_FW_EQ_CTRL_CMD_ONCHIP(x) ((x) << S_FW_EQ_CTRL_CMD_ONCHIP)
+#define G_FW_EQ_CTRL_CMD_ONCHIP(x) \
+ (((x) >> S_FW_EQ_CTRL_CMD_ONCHIP) & M_FW_EQ_CTRL_CMD_ONCHIP)
+#define F_FW_EQ_CTRL_CMD_ONCHIP V_FW_EQ_CTRL_CMD_ONCHIP(1U)
+
+#define S_FW_EQ_CTRL_CMD_PCIECHN 16
+#define M_FW_EQ_CTRL_CMD_PCIECHN 0x3
+#define V_FW_EQ_CTRL_CMD_PCIECHN(x) ((x) << S_FW_EQ_CTRL_CMD_PCIECHN)
+#define G_FW_EQ_CTRL_CMD_PCIECHN(x) \
+ (((x) >> S_FW_EQ_CTRL_CMD_PCIECHN) & M_FW_EQ_CTRL_CMD_PCIECHN)
+
+#define S_FW_EQ_CTRL_CMD_IQID 0
+#define M_FW_EQ_CTRL_CMD_IQID 0xffff
+#define V_FW_EQ_CTRL_CMD_IQID(x) ((x) << S_FW_EQ_CTRL_CMD_IQID)
+#define G_FW_EQ_CTRL_CMD_IQID(x) \
+ (((x) >> S_FW_EQ_CTRL_CMD_IQID) & M_FW_EQ_CTRL_CMD_IQID)
+
+#define S_FW_EQ_CTRL_CMD_DCAEN 31
+#define M_FW_EQ_CTRL_CMD_DCAEN 0x1
+#define V_FW_EQ_CTRL_CMD_DCAEN(x) ((x) << S_FW_EQ_CTRL_CMD_DCAEN)
+#define G_FW_EQ_CTRL_CMD_DCAEN(x) \
+ (((x) >> S_FW_EQ_CTRL_CMD_DCAEN) & M_FW_EQ_CTRL_CMD_DCAEN)
+#define F_FW_EQ_CTRL_CMD_DCAEN V_FW_EQ_CTRL_CMD_DCAEN(1U)
+
+#define S_FW_EQ_CTRL_CMD_DCACPU 26
+#define M_FW_EQ_CTRL_CMD_DCACPU 0x1f
+#define V_FW_EQ_CTRL_CMD_DCACPU(x) ((x) << S_FW_EQ_CTRL_CMD_DCACPU)
+#define G_FW_EQ_CTRL_CMD_DCACPU(x) \
+ (((x) >> S_FW_EQ_CTRL_CMD_DCACPU) & M_FW_EQ_CTRL_CMD_DCACPU)
+
+#define S_FW_EQ_CTRL_CMD_FBMIN 23
+#define M_FW_EQ_CTRL_CMD_FBMIN 0x7
+#define V_FW_EQ_CTRL_CMD_FBMIN(x) ((x) << S_FW_EQ_CTRL_CMD_FBMIN)
+#define G_FW_EQ_CTRL_CMD_FBMIN(x) \
+ (((x) >> S_FW_EQ_CTRL_CMD_FBMIN) & M_FW_EQ_CTRL_CMD_FBMIN)
+
+#define S_FW_EQ_CTRL_CMD_FBMAX 20
+#define M_FW_EQ_CTRL_CMD_FBMAX 0x7
+#define V_FW_EQ_CTRL_CMD_FBMAX(x) ((x) << S_FW_EQ_CTRL_CMD_FBMAX)
+#define G_FW_EQ_CTRL_CMD_FBMAX(x) \
+ (((x) >> S_FW_EQ_CTRL_CMD_FBMAX) & M_FW_EQ_CTRL_CMD_FBMAX)
+
+#define S_FW_EQ_CTRL_CMD_CIDXFTHRESHO 19
+#define M_FW_EQ_CTRL_CMD_CIDXFTHRESHO 0x1
+#define V_FW_EQ_CTRL_CMD_CIDXFTHRESHO(x) \
+ ((x) << S_FW_EQ_CTRL_CMD_CIDXFTHRESHO)
+#define G_FW_EQ_CTRL_CMD_CIDXFTHRESHO(x) \
+ (((x) >> S_FW_EQ_CTRL_CMD_CIDXFTHRESHO) & M_FW_EQ_CTRL_CMD_CIDXFTHRESHO)
+#define F_FW_EQ_CTRL_CMD_CIDXFTHRESHO V_FW_EQ_CTRL_CMD_CIDXFTHRESHO(1U)
+
+#define S_FW_EQ_CTRL_CMD_CIDXFTHRESH 16
+#define M_FW_EQ_CTRL_CMD_CIDXFTHRESH 0x7
+#define V_FW_EQ_CTRL_CMD_CIDXFTHRESH(x) ((x) << S_FW_EQ_CTRL_CMD_CIDXFTHRESH)
+#define G_FW_EQ_CTRL_CMD_CIDXFTHRESH(x) \
+ (((x) >> S_FW_EQ_CTRL_CMD_CIDXFTHRESH) & M_FW_EQ_CTRL_CMD_CIDXFTHRESH)
+
+#define S_FW_EQ_CTRL_CMD_EQSIZE 0
+#define M_FW_EQ_CTRL_CMD_EQSIZE 0xffff
+#define V_FW_EQ_CTRL_CMD_EQSIZE(x) ((x) << S_FW_EQ_CTRL_CMD_EQSIZE)
+#define G_FW_EQ_CTRL_CMD_EQSIZE(x) \
+ (((x) >> S_FW_EQ_CTRL_CMD_EQSIZE) & M_FW_EQ_CTRL_CMD_EQSIZE)
+
+struct fw_eq_ofld_cmd {
+ __be32 op_to_vfn;
+ __be32 alloc_to_len16;
+ __be32 eqid_pkd;
+ __be32 physeqid_pkd;
+ __be32 fetchszm_to_iqid;
+ __be32 dcaen_to_eqsize;
+ __be64 eqaddr;
+};
+
+#define S_FW_EQ_OFLD_CMD_PFN 8
+#define M_FW_EQ_OFLD_CMD_PFN 0x7
+#define V_FW_EQ_OFLD_CMD_PFN(x) ((x) << S_FW_EQ_OFLD_CMD_PFN)
+#define G_FW_EQ_OFLD_CMD_PFN(x) \
+ (((x) >> S_FW_EQ_OFLD_CMD_PFN) & M_FW_EQ_OFLD_CMD_PFN)
+
+#define S_FW_EQ_OFLD_CMD_VFN 0
+#define M_FW_EQ_OFLD_CMD_VFN 0xff
+#define V_FW_EQ_OFLD_CMD_VFN(x) ((x) << S_FW_EQ_OFLD_CMD_VFN)
+#define G_FW_EQ_OFLD_CMD_VFN(x) \
+ (((x) >> S_FW_EQ_OFLD_CMD_VFN) & M_FW_EQ_OFLD_CMD_VFN)
+
+#define S_FW_EQ_OFLD_CMD_ALLOC 31
+#define M_FW_EQ_OFLD_CMD_ALLOC 0x1
+#define V_FW_EQ_OFLD_CMD_ALLOC(x) ((x) << S_FW_EQ_OFLD_CMD_ALLOC)
+#define G_FW_EQ_OFLD_CMD_ALLOC(x) \
+ (((x) >> S_FW_EQ_OFLD_CMD_ALLOC) & M_FW_EQ_OFLD_CMD_ALLOC)
+#define F_FW_EQ_OFLD_CMD_ALLOC V_FW_EQ_OFLD_CMD_ALLOC(1U)
+
+#define S_FW_EQ_OFLD_CMD_FREE 30
+#define M_FW_EQ_OFLD_CMD_FREE 0x1
+#define V_FW_EQ_OFLD_CMD_FREE(x) ((x) << S_FW_EQ_OFLD_CMD_FREE)
+#define G_FW_EQ_OFLD_CMD_FREE(x) \
+ (((x) >> S_FW_EQ_OFLD_CMD_FREE) & M_FW_EQ_OFLD_CMD_FREE)
+#define F_FW_EQ_OFLD_CMD_FREE V_FW_EQ_OFLD_CMD_FREE(1U)
+
+#define S_FW_EQ_OFLD_CMD_MODIFY 29
+#define M_FW_EQ_OFLD_CMD_MODIFY 0x1
+#define V_FW_EQ_OFLD_CMD_MODIFY(x) ((x) << S_FW_EQ_OFLD_CMD_MODIFY)
+#define G_FW_EQ_OFLD_CMD_MODIFY(x) \
+ (((x) >> S_FW_EQ_OFLD_CMD_MODIFY) & M_FW_EQ_OFLD_CMD_MODIFY)
+#define F_FW_EQ_OFLD_CMD_MODIFY V_FW_EQ_OFLD_CMD_MODIFY(1U)
+
+#define S_FW_EQ_OFLD_CMD_EQSTART 28
+#define M_FW_EQ_OFLD_CMD_EQSTART 0x1
+#define V_FW_EQ_OFLD_CMD_EQSTART(x) ((x) << S_FW_EQ_OFLD_CMD_EQSTART)
+#define G_FW_EQ_OFLD_CMD_EQSTART(x) \
+ (((x) >> S_FW_EQ_OFLD_CMD_EQSTART) & M_FW_EQ_OFLD_CMD_EQSTART)
+#define F_FW_EQ_OFLD_CMD_EQSTART V_FW_EQ_OFLD_CMD_EQSTART(1U)
+
+#define S_FW_EQ_OFLD_CMD_EQSTOP 27
+#define M_FW_EQ_OFLD_CMD_EQSTOP 0x1
+#define V_FW_EQ_OFLD_CMD_EQSTOP(x) ((x) << S_FW_EQ_OFLD_CMD_EQSTOP)
+#define G_FW_EQ_OFLD_CMD_EQSTOP(x) \
+ (((x) >> S_FW_EQ_OFLD_CMD_EQSTOP) & M_FW_EQ_OFLD_CMD_EQSTOP)
+#define F_FW_EQ_OFLD_CMD_EQSTOP V_FW_EQ_OFLD_CMD_EQSTOP(1U)
+
+#define S_FW_EQ_OFLD_CMD_EQID 0
+#define M_FW_EQ_OFLD_CMD_EQID 0xfffff
+#define V_FW_EQ_OFLD_CMD_EQID(x) ((x) << S_FW_EQ_OFLD_CMD_EQID)
+#define G_FW_EQ_OFLD_CMD_EQID(x) \
+ (((x) >> S_FW_EQ_OFLD_CMD_EQID) & M_FW_EQ_OFLD_CMD_EQID)
+
+#define S_FW_EQ_OFLD_CMD_PHYSEQID 0
+#define M_FW_EQ_OFLD_CMD_PHYSEQID 0xfffff
+#define V_FW_EQ_OFLD_CMD_PHYSEQID(x) ((x) << S_FW_EQ_OFLD_CMD_PHYSEQID)
+#define G_FW_EQ_OFLD_CMD_PHYSEQID(x) \
+ (((x) >> S_FW_EQ_OFLD_CMD_PHYSEQID) & M_FW_EQ_OFLD_CMD_PHYSEQID)
+
+#define S_FW_EQ_OFLD_CMD_FETCHSZM 26
+#define M_FW_EQ_OFLD_CMD_FETCHSZM 0x1
+#define V_FW_EQ_OFLD_CMD_FETCHSZM(x) ((x) << S_FW_EQ_OFLD_CMD_FETCHSZM)
+#define G_FW_EQ_OFLD_CMD_FETCHSZM(x) \
+ (((x) >> S_FW_EQ_OFLD_CMD_FETCHSZM) & M_FW_EQ_OFLD_CMD_FETCHSZM)
+#define F_FW_EQ_OFLD_CMD_FETCHSZM V_FW_EQ_OFLD_CMD_FETCHSZM(1U)
+
+#define S_FW_EQ_OFLD_CMD_STATUSPGNS 25
+#define M_FW_EQ_OFLD_CMD_STATUSPGNS 0x1
+#define V_FW_EQ_OFLD_CMD_STATUSPGNS(x) ((x) << S_FW_EQ_OFLD_CMD_STATUSPGNS)
+#define G_FW_EQ_OFLD_CMD_STATUSPGNS(x) \
+ (((x) >> S_FW_EQ_OFLD_CMD_STATUSPGNS) & M_FW_EQ_OFLD_CMD_STATUSPGNS)
+#define F_FW_EQ_OFLD_CMD_STATUSPGNS V_FW_EQ_OFLD_CMD_STATUSPGNS(1U)
+
+#define S_FW_EQ_OFLD_CMD_STATUSPGRO 24
+#define M_FW_EQ_OFLD_CMD_STATUSPGRO 0x1
+#define V_FW_EQ_OFLD_CMD_STATUSPGRO(x) ((x) << S_FW_EQ_OFLD_CMD_STATUSPGRO)
+#define G_FW_EQ_OFLD_CMD_STATUSPGRO(x) \
+ (((x) >> S_FW_EQ_OFLD_CMD_STATUSPGRO) & M_FW_EQ_OFLD_CMD_STATUSPGRO)
+#define F_FW_EQ_OFLD_CMD_STATUSPGRO V_FW_EQ_OFLD_CMD_STATUSPGRO(1U)
+
+#define S_FW_EQ_OFLD_CMD_FETCHNS 23
+#define M_FW_EQ_OFLD_CMD_FETCHNS 0x1
+#define V_FW_EQ_OFLD_CMD_FETCHNS(x) ((x) << S_FW_EQ_OFLD_CMD_FETCHNS)
+#define G_FW_EQ_OFLD_CMD_FETCHNS(x) \
+ (((x) >> S_FW_EQ_OFLD_CMD_FETCHNS) & M_FW_EQ_OFLD_CMD_FETCHNS)
+#define F_FW_EQ_OFLD_CMD_FETCHNS V_FW_EQ_OFLD_CMD_FETCHNS(1U)
+
+#define S_FW_EQ_OFLD_CMD_FETCHRO 22
+#define M_FW_EQ_OFLD_CMD_FETCHRO 0x1
+#define V_FW_EQ_OFLD_CMD_FETCHRO(x) ((x) << S_FW_EQ_OFLD_CMD_FETCHRO)
+#define G_FW_EQ_OFLD_CMD_FETCHRO(x) \
+ (((x) >> S_FW_EQ_OFLD_CMD_FETCHRO) & M_FW_EQ_OFLD_CMD_FETCHRO)
+#define F_FW_EQ_OFLD_CMD_FETCHRO V_FW_EQ_OFLD_CMD_FETCHRO(1U)
+
+#define S_FW_EQ_OFLD_CMD_HOSTFCMODE 20
+#define M_FW_EQ_OFLD_CMD_HOSTFCMODE 0x3
+#define V_FW_EQ_OFLD_CMD_HOSTFCMODE(x) ((x) << S_FW_EQ_OFLD_CMD_HOSTFCMODE)
+#define G_FW_EQ_OFLD_CMD_HOSTFCMODE(x) \
+ (((x) >> S_FW_EQ_OFLD_CMD_HOSTFCMODE) & M_FW_EQ_OFLD_CMD_HOSTFCMODE)
+
+#define S_FW_EQ_OFLD_CMD_CPRIO 19
+#define M_FW_EQ_OFLD_CMD_CPRIO 0x1
+#define V_FW_EQ_OFLD_CMD_CPRIO(x) ((x) << S_FW_EQ_OFLD_CMD_CPRIO)
+#define G_FW_EQ_OFLD_CMD_CPRIO(x) \
+ (((x) >> S_FW_EQ_OFLD_CMD_CPRIO) & M_FW_EQ_OFLD_CMD_CPRIO)
+#define F_FW_EQ_OFLD_CMD_CPRIO V_FW_EQ_OFLD_CMD_CPRIO(1U)
+
+#define S_FW_EQ_OFLD_CMD_ONCHIP 18
+#define M_FW_EQ_OFLD_CMD_ONCHIP 0x1
+#define V_FW_EQ_OFLD_CMD_ONCHIP(x) ((x) << S_FW_EQ_OFLD_CMD_ONCHIP)
+#define G_FW_EQ_OFLD_CMD_ONCHIP(x) \
+ (((x) >> S_FW_EQ_OFLD_CMD_ONCHIP) & M_FW_EQ_OFLD_CMD_ONCHIP)
+#define F_FW_EQ_OFLD_CMD_ONCHIP V_FW_EQ_OFLD_CMD_ONCHIP(1U)
+
+#define S_FW_EQ_OFLD_CMD_PCIECHN 16
+#define M_FW_EQ_OFLD_CMD_PCIECHN 0x3
+#define V_FW_EQ_OFLD_CMD_PCIECHN(x) ((x) << S_FW_EQ_OFLD_CMD_PCIECHN)
+#define G_FW_EQ_OFLD_CMD_PCIECHN(x) \
+ (((x) >> S_FW_EQ_OFLD_CMD_PCIECHN) & M_FW_EQ_OFLD_CMD_PCIECHN)
+
+#define S_FW_EQ_OFLD_CMD_IQID 0
+#define M_FW_EQ_OFLD_CMD_IQID 0xffff
+#define V_FW_EQ_OFLD_CMD_IQID(x) ((x) << S_FW_EQ_OFLD_CMD_IQID)
+#define G_FW_EQ_OFLD_CMD_IQID(x) \
+ (((x) >> S_FW_EQ_OFLD_CMD_IQID) & M_FW_EQ_OFLD_CMD_IQID)
+
+#define S_FW_EQ_OFLD_CMD_DCAEN 31
+#define M_FW_EQ_OFLD_CMD_DCAEN 0x1
+#define V_FW_EQ_OFLD_CMD_DCAEN(x) ((x) << S_FW_EQ_OFLD_CMD_DCAEN)
+#define G_FW_EQ_OFLD_CMD_DCAEN(x) \
+ (((x) >> S_FW_EQ_OFLD_CMD_DCAEN) & M_FW_EQ_OFLD_CMD_DCAEN)
+#define F_FW_EQ_OFLD_CMD_DCAEN V_FW_EQ_OFLD_CMD_DCAEN(1U)
+
+#define S_FW_EQ_OFLD_CMD_DCACPU 26
+#define M_FW_EQ_OFLD_CMD_DCACPU 0x1f
+#define V_FW_EQ_OFLD_CMD_DCACPU(x) ((x) << S_FW_EQ_OFLD_CMD_DCACPU)
+#define G_FW_EQ_OFLD_CMD_DCACPU(x) \
+ (((x) >> S_FW_EQ_OFLD_CMD_DCACPU) & M_FW_EQ_OFLD_CMD_DCACPU)
+
+#define S_FW_EQ_OFLD_CMD_FBMIN 23
+#define M_FW_EQ_OFLD_CMD_FBMIN 0x7
+#define V_FW_EQ_OFLD_CMD_FBMIN(x) ((x) << S_FW_EQ_OFLD_CMD_FBMIN)
+#define G_FW_EQ_OFLD_CMD_FBMIN(x) \
+ (((x) >> S_FW_EQ_OFLD_CMD_FBMIN) & M_FW_EQ_OFLD_CMD_FBMIN)
+
+#define S_FW_EQ_OFLD_CMD_FBMAX 20
+#define M_FW_EQ_OFLD_CMD_FBMAX 0x7
+#define V_FW_EQ_OFLD_CMD_FBMAX(x) ((x) << S_FW_EQ_OFLD_CMD_FBMAX)
+#define G_FW_EQ_OFLD_CMD_FBMAX(x) \
+ (((x) >> S_FW_EQ_OFLD_CMD_FBMAX) & M_FW_EQ_OFLD_CMD_FBMAX)
+
+#define S_FW_EQ_OFLD_CMD_CIDXFTHRESHO 19
+#define M_FW_EQ_OFLD_CMD_CIDXFTHRESHO 0x1
+#define V_FW_EQ_OFLD_CMD_CIDXFTHRESHO(x) \
+ ((x) << S_FW_EQ_OFLD_CMD_CIDXFTHRESHO)
+#define G_FW_EQ_OFLD_CMD_CIDXFTHRESHO(x) \
+ (((x) >> S_FW_EQ_OFLD_CMD_CIDXFTHRESHO) & M_FW_EQ_OFLD_CMD_CIDXFTHRESHO)
+#define F_FW_EQ_OFLD_CMD_CIDXFTHRESHO V_FW_EQ_OFLD_CMD_CIDXFTHRESHO(1U)
+
+#define S_FW_EQ_OFLD_CMD_CIDXFTHRESH 16
+#define M_FW_EQ_OFLD_CMD_CIDXFTHRESH 0x7
+#define V_FW_EQ_OFLD_CMD_CIDXFTHRESH(x) ((x) << S_FW_EQ_OFLD_CMD_CIDXFTHRESH)
+#define G_FW_EQ_OFLD_CMD_CIDXFTHRESH(x) \
+ (((x) >> S_FW_EQ_OFLD_CMD_CIDXFTHRESH) & M_FW_EQ_OFLD_CMD_CIDXFTHRESH)
+
+#define S_FW_EQ_OFLD_CMD_EQSIZE 0
+#define M_FW_EQ_OFLD_CMD_EQSIZE 0xffff
+#define V_FW_EQ_OFLD_CMD_EQSIZE(x) ((x) << S_FW_EQ_OFLD_CMD_EQSIZE)
+#define G_FW_EQ_OFLD_CMD_EQSIZE(x) \
+ (((x) >> S_FW_EQ_OFLD_CMD_EQSIZE) & M_FW_EQ_OFLD_CMD_EQSIZE)
+
+/* Macros for VIID parsing:
+ VIID - [10:8] PFN, [7] VI Valid, [6:0] VI number */
+#define S_FW_VIID_PFN 8
+#define M_FW_VIID_PFN 0x7
+#define V_FW_VIID_PFN(x) ((x) << S_FW_VIID_PFN)
+#define G_FW_VIID_PFN(x) (((x) >> S_FW_VIID_PFN) & M_FW_VIID_PFN)
+
+#define S_FW_VIID_VIVLD 7
+#define M_FW_VIID_VIVLD 0x1
+#define V_FW_VIID_VIVLD(x) ((x) << S_FW_VIID_VIVLD)
+#define G_FW_VIID_VIVLD(x) (((x) >> S_FW_VIID_VIVLD) & M_FW_VIID_VIVLD)
+
+#define S_FW_VIID_VIN 0
+#define M_FW_VIID_VIN 0x7F
+#define V_FW_VIID_VIN(x) ((x) << S_FW_VIID_VIN)
+#define G_FW_VIID_VIN(x) (((x) >> S_FW_VIID_VIN) & M_FW_VIID_VIN)
+
+enum fw_vi_func {
+ FW_VI_FUNC_ETH,
+ FW_VI_FUNC_OFLD,
+ FW_VI_FUNC_IWARP,
+ FW_VI_FUNC_OPENISCSI,
+ FW_VI_FUNC_OPENFCOE,
+ FW_VI_FUNC_FOISCSI,
+ FW_VI_FUNC_FOFCOE,
+ FW_VI_FUNC_FW,
+};
+
+struct fw_vi_cmd {
+ __be32 op_to_vfn;
+ __be32 alloc_to_len16;
+ __be16 type_to_viid;
+ __u8 mac[6];
+ __u8 portid_pkd;
+ __u8 nmac;
+ __u8 nmac0[6];
+ __be16 rsssize_pkd;
+ __u8 nmac1[6];
+ __be16 idsiiq_pkd;
+ __u8 nmac2[6];
+ __be16 idseiq_pkd;
+ __u8 nmac3[6];
+ __be64 r9;
+ __be64 r10;
+};
+
+#define S_FW_VI_CMD_PFN 8
+#define M_FW_VI_CMD_PFN 0x7
+#define V_FW_VI_CMD_PFN(x) ((x) << S_FW_VI_CMD_PFN)
+#define G_FW_VI_CMD_PFN(x) (((x) >> S_FW_VI_CMD_PFN) & M_FW_VI_CMD_PFN)
+
+#define S_FW_VI_CMD_VFN 0
+#define M_FW_VI_CMD_VFN 0xff
+#define V_FW_VI_CMD_VFN(x) ((x) << S_FW_VI_CMD_VFN)
+#define G_FW_VI_CMD_VFN(x) (((x) >> S_FW_VI_CMD_VFN) & M_FW_VI_CMD_VFN)
+
+#define S_FW_VI_CMD_ALLOC 31
+#define M_FW_VI_CMD_ALLOC 0x1
+#define V_FW_VI_CMD_ALLOC(x) ((x) << S_FW_VI_CMD_ALLOC)
+#define G_FW_VI_CMD_ALLOC(x) \
+ (((x) >> S_FW_VI_CMD_ALLOC) & M_FW_VI_CMD_ALLOC)
+#define F_FW_VI_CMD_ALLOC V_FW_VI_CMD_ALLOC(1U)
+
+#define S_FW_VI_CMD_FREE 30
+#define M_FW_VI_CMD_FREE 0x1
+#define V_FW_VI_CMD_FREE(x) ((x) << S_FW_VI_CMD_FREE)
+#define G_FW_VI_CMD_FREE(x) (((x) >> S_FW_VI_CMD_FREE) & M_FW_VI_CMD_FREE)
+#define F_FW_VI_CMD_FREE V_FW_VI_CMD_FREE(1U)
+
+#define S_FW_VI_CMD_TYPE 15
+#define M_FW_VI_CMD_TYPE 0x1
+#define V_FW_VI_CMD_TYPE(x) ((x) << S_FW_VI_CMD_TYPE)
+#define G_FW_VI_CMD_TYPE(x) (((x) >> S_FW_VI_CMD_TYPE) & M_FW_VI_CMD_TYPE)
+#define F_FW_VI_CMD_TYPE V_FW_VI_CMD_TYPE(1U)
+
+#define S_FW_VI_CMD_FUNC 12
+#define M_FW_VI_CMD_FUNC 0x7
+#define V_FW_VI_CMD_FUNC(x) ((x) << S_FW_VI_CMD_FUNC)
+#define G_FW_VI_CMD_FUNC(x) (((x) >> S_FW_VI_CMD_FUNC) & M_FW_VI_CMD_FUNC)
+
+#define S_FW_VI_CMD_VIID 0
+#define M_FW_VI_CMD_VIID 0xfff
+#define V_FW_VI_CMD_VIID(x) ((x) << S_FW_VI_CMD_VIID)
+#define G_FW_VI_CMD_VIID(x) (((x) >> S_FW_VI_CMD_VIID) & M_FW_VI_CMD_VIID)
+
+#define S_FW_VI_CMD_PORTID 4
+#define M_FW_VI_CMD_PORTID 0xf
+#define V_FW_VI_CMD_PORTID(x) ((x) << S_FW_VI_CMD_PORTID)
+#define G_FW_VI_CMD_PORTID(x) \
+ (((x) >> S_FW_VI_CMD_PORTID) & M_FW_VI_CMD_PORTID)
+
+#define S_FW_VI_CMD_RSSSIZE 0
+#define M_FW_VI_CMD_RSSSIZE 0x7ff
+#define V_FW_VI_CMD_RSSSIZE(x) ((x) << S_FW_VI_CMD_RSSSIZE)
+#define G_FW_VI_CMD_RSSSIZE(x) \
+ (((x) >> S_FW_VI_CMD_RSSSIZE) & M_FW_VI_CMD_RSSSIZE)
+
+#define S_FW_VI_CMD_IDSIIQ 0
+#define M_FW_VI_CMD_IDSIIQ 0x3ff
+#define V_FW_VI_CMD_IDSIIQ(x) ((x) << S_FW_VI_CMD_IDSIIQ)
+#define G_FW_VI_CMD_IDSIIQ(x) \
+ (((x) >> S_FW_VI_CMD_IDSIIQ) & M_FW_VI_CMD_IDSIIQ)
+
+#define S_FW_VI_CMD_IDSEIQ 0
+#define M_FW_VI_CMD_IDSEIQ 0x3ff
+#define V_FW_VI_CMD_IDSEIQ(x) ((x) << S_FW_VI_CMD_IDSEIQ)
+#define G_FW_VI_CMD_IDSEIQ(x) \
+ (((x) >> S_FW_VI_CMD_IDSEIQ) & M_FW_VI_CMD_IDSEIQ)
+
+/* Special VI_MAC command index ids */
+#define FW_VI_MAC_ADD_MAC 0x3FF
+#define FW_VI_MAC_ADD_PERSIST_MAC 0x3FE
+#define FW_VI_MAC_MAC_BASED_FREE 0x3FD
+#define FW_CLS_TCAM_NUM_ENTRIES 336
+
+enum fw_vi_mac_smac {
+ FW_VI_MAC_MPS_TCAM_ENTRY,
+ FW_VI_MAC_MPS_TCAM_ONLY,
+ FW_VI_MAC_SMT_ONLY,
+ FW_VI_MAC_SMT_AND_MPSTCAM
+};
+
+enum fw_vi_mac_result {
+ FW_VI_MAC_R_SUCCESS,
+ FW_VI_MAC_R_F_NONEXISTENT_NOMEM,
+ FW_VI_MAC_R_SMAC_FAIL,
+ FW_VI_MAC_R_F_ACL_CHECK
+};
+
+struct fw_vi_mac_cmd {
+ __be32 op_to_viid;
+ __be32 freemacs_to_len16;
+ union fw_vi_mac {
+ struct fw_vi_mac_exact {
+ __be16 valid_to_idx;
+ __u8 macaddr[6];
+ } exact[7];
+ struct fw_vi_mac_hash {
+ __be64 hashvec;
+ } hash;
+ } u;
+};
+
+#define S_FW_VI_MAC_CMD_VIID 0
+#define M_FW_VI_MAC_CMD_VIID 0xfff
+#define V_FW_VI_MAC_CMD_VIID(x) ((x) << S_FW_VI_MAC_CMD_VIID)
+#define G_FW_VI_MAC_CMD_VIID(x) \
+ (((x) >> S_FW_VI_MAC_CMD_VIID) & M_FW_VI_MAC_CMD_VIID)
+
+#define S_FW_VI_MAC_CMD_FREEMACS 31
+#define M_FW_VI_MAC_CMD_FREEMACS 0x1
+#define V_FW_VI_MAC_CMD_FREEMACS(x) ((x) << S_FW_VI_MAC_CMD_FREEMACS)
+#define G_FW_VI_MAC_CMD_FREEMACS(x) \
+ (((x) >> S_FW_VI_MAC_CMD_FREEMACS) & M_FW_VI_MAC_CMD_FREEMACS)
+#define F_FW_VI_MAC_CMD_FREEMACS V_FW_VI_MAC_CMD_FREEMACS(1U)
+
+#define S_FW_VI_MAC_CMD_HASHVECEN 23
+#define M_FW_VI_MAC_CMD_HASHVECEN 0x1
+#define V_FW_VI_MAC_CMD_HASHVECEN(x) ((x) << S_FW_VI_MAC_CMD_HASHVECEN)
+#define G_FW_VI_MAC_CMD_HASHVECEN(x) \
+ (((x) >> S_FW_VI_MAC_CMD_HASHVECEN) & M_FW_VI_MAC_CMD_HASHVECEN)
+#define F_FW_VI_MAC_CMD_HASHVECEN V_FW_VI_MAC_CMD_HASHVECEN(1U)
+
+#define S_FW_VI_MAC_CMD_HASHUNIEN 22
+#define M_FW_VI_MAC_CMD_HASHUNIEN 0x1
+#define V_FW_VI_MAC_CMD_HASHUNIEN(x) ((x) << S_FW_VI_MAC_CMD_HASHUNIEN)
+#define G_FW_VI_MAC_CMD_HASHUNIEN(x) \
+ (((x) >> S_FW_VI_MAC_CMD_HASHUNIEN) & M_FW_VI_MAC_CMD_HASHUNIEN)
+#define F_FW_VI_MAC_CMD_HASHUNIEN V_FW_VI_MAC_CMD_HASHUNIEN(1U)
+
+#define S_FW_VI_MAC_CMD_VALID 15
+#define M_FW_VI_MAC_CMD_VALID 0x1
+#define V_FW_VI_MAC_CMD_VALID(x) ((x) << S_FW_VI_MAC_CMD_VALID)
+#define G_FW_VI_MAC_CMD_VALID(x) \
+ (((x) >> S_FW_VI_MAC_CMD_VALID) & M_FW_VI_MAC_CMD_VALID)
+#define F_FW_VI_MAC_CMD_VALID V_FW_VI_MAC_CMD_VALID(1U)
+
+#define S_FW_VI_MAC_CMD_PRIO 12
+#define M_FW_VI_MAC_CMD_PRIO 0x7
+#define V_FW_VI_MAC_CMD_PRIO(x) ((x) << S_FW_VI_MAC_CMD_PRIO)
+#define G_FW_VI_MAC_CMD_PRIO(x) \
+ (((x) >> S_FW_VI_MAC_CMD_PRIO) & M_FW_VI_MAC_CMD_PRIO)
+
+#define S_FW_VI_MAC_CMD_SMAC_RESULT 10
+#define M_FW_VI_MAC_CMD_SMAC_RESULT 0x3
+#define V_FW_VI_MAC_CMD_SMAC_RESULT(x) ((x) << S_FW_VI_MAC_CMD_SMAC_RESULT)
+#define G_FW_VI_MAC_CMD_SMAC_RESULT(x) \
+ (((x) >> S_FW_VI_MAC_CMD_SMAC_RESULT) & M_FW_VI_MAC_CMD_SMAC_RESULT)
+
+#define S_FW_VI_MAC_CMD_IDX 0
+#define M_FW_VI_MAC_CMD_IDX 0x3ff
+#define V_FW_VI_MAC_CMD_IDX(x) ((x) << S_FW_VI_MAC_CMD_IDX)
+#define G_FW_VI_MAC_CMD_IDX(x) \
+ (((x) >> S_FW_VI_MAC_CMD_IDX) & M_FW_VI_MAC_CMD_IDX)
+
+/* T4 max MTU supported */
+#define T4_MAX_MTU_SUPPORTED 9600
+#define FW_RXMODE_MTU_NO_CHG 65535
+
+struct fw_vi_rxmode_cmd {
+ __be32 op_to_viid;
+ __be32 retval_len16;
+ __be32 mtu_to_vlanexen;
+ __be32 r4_lo;
+};
+
+#define S_FW_VI_RXMODE_CMD_VIID 0
+#define M_FW_VI_RXMODE_CMD_VIID 0xfff
+#define V_FW_VI_RXMODE_CMD_VIID(x) ((x) << S_FW_VI_RXMODE_CMD_VIID)
+#define G_FW_VI_RXMODE_CMD_VIID(x) \
+ (((x) >> S_FW_VI_RXMODE_CMD_VIID) & M_FW_VI_RXMODE_CMD_VIID)
+
+#define S_FW_VI_RXMODE_CMD_MTU 16
+#define M_FW_VI_RXMODE_CMD_MTU 0xffff
+#define V_FW_VI_RXMODE_CMD_MTU(x) ((x) << S_FW_VI_RXMODE_CMD_MTU)
+#define G_FW_VI_RXMODE_CMD_MTU(x) \
+ (((x) >> S_FW_VI_RXMODE_CMD_MTU) & M_FW_VI_RXMODE_CMD_MTU)
+
+#define S_FW_VI_RXMODE_CMD_PROMISCEN 14
+#define M_FW_VI_RXMODE_CMD_PROMISCEN 0x3
+#define V_FW_VI_RXMODE_CMD_PROMISCEN(x) ((x) << S_FW_VI_RXMODE_CMD_PROMISCEN)
+#define G_FW_VI_RXMODE_CMD_PROMISCEN(x) \
+ (((x) >> S_FW_VI_RXMODE_CMD_PROMISCEN) & M_FW_VI_RXMODE_CMD_PROMISCEN)
+
+#define S_FW_VI_RXMODE_CMD_ALLMULTIEN 12
+#define M_FW_VI_RXMODE_CMD_ALLMULTIEN 0x3
+#define V_FW_VI_RXMODE_CMD_ALLMULTIEN(x) \
+ ((x) << S_FW_VI_RXMODE_CMD_ALLMULTIEN)
+#define G_FW_VI_RXMODE_CMD_ALLMULTIEN(x) \
+ (((x) >> S_FW_VI_RXMODE_CMD_ALLMULTIEN) & M_FW_VI_RXMODE_CMD_ALLMULTIEN)
+
+#define S_FW_VI_RXMODE_CMD_BROADCASTEN 10
+#define M_FW_VI_RXMODE_CMD_BROADCASTEN 0x3
+#define V_FW_VI_RXMODE_CMD_BROADCASTEN(x) \
+ ((x) << S_FW_VI_RXMODE_CMD_BROADCASTEN)
+#define G_FW_VI_RXMODE_CMD_BROADCASTEN(x) \
+ (((x) >> S_FW_VI_RXMODE_CMD_BROADCASTEN) & M_FW_VI_RXMODE_CMD_BROADCASTEN)
+
+#define S_FW_VI_RXMODE_CMD_VLANEXEN 8
+#define M_FW_VI_RXMODE_CMD_VLANEXEN 0x3
+#define V_FW_VI_RXMODE_CMD_VLANEXEN(x) ((x) << S_FW_VI_RXMODE_CMD_VLANEXEN)
+#define G_FW_VI_RXMODE_CMD_VLANEXEN(x) \
+ (((x) >> S_FW_VI_RXMODE_CMD_VLANEXEN) & M_FW_VI_RXMODE_CMD_VLANEXEN)
+
+struct fw_vi_enable_cmd {
+ __be32 op_to_viid;
+ __be32 ien_to_len16;
+ __be16 blinkdur;
+ __be16 r3;
+ __be32 r4;
+};
+
+#define S_FW_VI_ENABLE_CMD_VIID 0
+#define M_FW_VI_ENABLE_CMD_VIID 0xfff
+#define V_FW_VI_ENABLE_CMD_VIID(x) ((x) << S_FW_VI_ENABLE_CMD_VIID)
+#define G_FW_VI_ENABLE_CMD_VIID(x) \
+ (((x) >> S_FW_VI_ENABLE_CMD_VIID) & M_FW_VI_ENABLE_CMD_VIID)
+
+#define S_FW_VI_ENABLE_CMD_IEN 31
+#define M_FW_VI_ENABLE_CMD_IEN 0x1
+#define V_FW_VI_ENABLE_CMD_IEN(x) ((x) << S_FW_VI_ENABLE_CMD_IEN)
+#define G_FW_VI_ENABLE_CMD_IEN(x) \
+ (((x) >> S_FW_VI_ENABLE_CMD_IEN) & M_FW_VI_ENABLE_CMD_IEN)
+#define F_FW_VI_ENABLE_CMD_IEN V_FW_VI_ENABLE_CMD_IEN(1U)
+
+#define S_FW_VI_ENABLE_CMD_EEN 30
+#define M_FW_VI_ENABLE_CMD_EEN 0x1
+#define V_FW_VI_ENABLE_CMD_EEN(x) ((x) << S_FW_VI_ENABLE_CMD_EEN)
+#define G_FW_VI_ENABLE_CMD_EEN(x) \
+ (((x) >> S_FW_VI_ENABLE_CMD_EEN) & M_FW_VI_ENABLE_CMD_EEN)
+#define F_FW_VI_ENABLE_CMD_EEN V_FW_VI_ENABLE_CMD_EEN(1U)
+
+#define S_FW_VI_ENABLE_CMD_LED 29
+#define M_FW_VI_ENABLE_CMD_LED 0x1
+#define V_FW_VI_ENABLE_CMD_LED(x) ((x) << S_FW_VI_ENABLE_CMD_LED)
+#define G_FW_VI_ENABLE_CMD_LED(x) \
+ (((x) >> S_FW_VI_ENABLE_CMD_LED) & M_FW_VI_ENABLE_CMD_LED)
+#define F_FW_VI_ENABLE_CMD_LED V_FW_VI_ENABLE_CMD_LED(1U)
+
+/* VI VF stats offset definitions */
+#define VI_VF_NUM_STATS 16
+enum fw_vi_stats_vf_index {
+ FW_VI_VF_STAT_TX_BCAST_BYTES_IX,
+ FW_VI_VF_STAT_TX_BCAST_FRAMES_IX,
+ FW_VI_VF_STAT_TX_MCAST_BYTES_IX,
+ FW_VI_VF_STAT_TX_MCAST_FRAMES_IX,
+ FW_VI_VF_STAT_TX_UCAST_BYTES_IX,
+ FW_VI_VF_STAT_TX_UCAST_FRAMES_IX,
+ FW_VI_VF_STAT_TX_DROP_FRAMES_IX,
+ FW_VI_VF_STAT_TX_OFLD_BYTES_IX,
+ FW_VI_VF_STAT_TX_OFLD_FRAMES_IX,
+ FW_VI_VF_STAT_RX_BCAST_BYTES_IX,
+ FW_VI_VF_STAT_RX_BCAST_FRAMES_IX,
+ FW_VI_VF_STAT_RX_MCAST_BYTES_IX,
+ FW_VI_VF_STAT_RX_MCAST_FRAMES_IX,
+ FW_VI_VF_STAT_RX_UCAST_BYTES_IX,
+ FW_VI_VF_STAT_RX_UCAST_FRAMES_IX,
+ FW_VI_VF_STAT_RX_ERR_FRAMES_IX
+};
+
+/* VI PF stats offset definitions */
+#define VI_PF_NUM_STATS 17
+enum fw_vi_stats_pf_index {
+ FW_VI_PF_STAT_TX_BCAST_BYTES_IX,
+ FW_VI_PF_STAT_TX_BCAST_FRAMES_IX,
+ FW_VI_PF_STAT_TX_MCAST_BYTES_IX,
+ FW_VI_PF_STAT_TX_MCAST_FRAMES_IX,
+ FW_VI_PF_STAT_TX_UCAST_BYTES_IX,
+ FW_VI_PF_STAT_TX_UCAST_FRAMES_IX,
+ FW_VI_PF_STAT_TX_OFLD_BYTES_IX,
+ FW_VI_PF_STAT_TX_OFLD_FRAMES_IX,
+ FW_VI_PF_STAT_RX_BYTES_IX,
+ FW_VI_PF_STAT_RX_FRAMES_IX,
+ FW_VI_PF_STAT_RX_BCAST_BYTES_IX,
+ FW_VI_PF_STAT_RX_BCAST_FRAMES_IX,
+ FW_VI_PF_STAT_RX_MCAST_BYTES_IX,
+ FW_VI_PF_STAT_RX_MCAST_FRAMES_IX,
+ FW_VI_PF_STAT_RX_UCAST_BYTES_IX,
+ FW_VI_PF_STAT_RX_UCAST_FRAMES_IX,
+ FW_VI_PF_STAT_RX_ERR_FRAMES_IX
+};
+
+struct fw_vi_stats_cmd {
+ __be32 op_to_viid;
+ __be32 retval_len16;
+ union fw_vi_stats {
+ struct fw_vi_stats_ctl {
+ __be16 nstats_ix;
+ __be16 r6;
+ __be32 r7;
+ __be64 stat0;
+ __be64 stat1;
+ __be64 stat2;
+ __be64 stat3;
+ __be64 stat4;
+ __be64 stat5;
+ } ctl;
+ struct fw_vi_stats_pf {
+ __be64 tx_bcast_bytes;
+ __be64 tx_bcast_frames;
+ __be64 tx_mcast_bytes;
+ __be64 tx_mcast_frames;
+ __be64 tx_ucast_bytes;
+ __be64 tx_ucast_frames;
+ __be64 tx_offload_bytes;
+ __be64 tx_offload_frames;
+ __be64 rx_pf_bytes;
+ __be64 rx_pf_frames;
+ __be64 rx_bcast_bytes;
+ __be64 rx_bcast_frames;
+ __be64 rx_mcast_bytes;
+ __be64 rx_mcast_frames;
+ __be64 rx_ucast_bytes;
+ __be64 rx_ucast_frames;
+ __be64 rx_err_frames;
+ } pf;
+ struct fw_vi_stats_vf {
+ __be64 tx_bcast_bytes;
+ __be64 tx_bcast_frames;
+ __be64 tx_mcast_bytes;
+ __be64 tx_mcast_frames;
+ __be64 tx_ucast_bytes;
+ __be64 tx_ucast_frames;
+ __be64 tx_drop_frames;
+ __be64 tx_offload_bytes;
+ __be64 tx_offload_frames;
+ __be64 rx_bcast_bytes;
+ __be64 rx_bcast_frames;
+ __be64 rx_mcast_bytes;
+ __be64 rx_mcast_frames;
+ __be64 rx_ucast_bytes;
+ __be64 rx_ucast_frames;
+ __be64 rx_err_frames;
+ } vf;
+ } u;
+};
+
+#define S_FW_VI_STATS_CMD_VIID 0
+#define M_FW_VI_STATS_CMD_VIID 0xfff
+#define V_FW_VI_STATS_CMD_VIID(x) ((x) << S_FW_VI_STATS_CMD_VIID)
+#define G_FW_VI_STATS_CMD_VIID(x) \
+ (((x) >> S_FW_VI_STATS_CMD_VIID) & M_FW_VI_STATS_CMD_VIID)
+
+#define S_FW_VI_STATS_CMD_NSTATS 12
+#define M_FW_VI_STATS_CMD_NSTATS 0x7
+#define V_FW_VI_STATS_CMD_NSTATS(x) ((x) << S_FW_VI_STATS_CMD_NSTATS)
+#define G_FW_VI_STATS_CMD_NSTATS(x) \
+ (((x) >> S_FW_VI_STATS_CMD_NSTATS) & M_FW_VI_STATS_CMD_NSTATS)
+
+#define S_FW_VI_STATS_CMD_IX 0
+#define M_FW_VI_STATS_CMD_IX 0x1f
+#define V_FW_VI_STATS_CMD_IX(x) ((x) << S_FW_VI_STATS_CMD_IX)
+#define G_FW_VI_STATS_CMD_IX(x) \
+ (((x) >> S_FW_VI_STATS_CMD_IX) & M_FW_VI_STATS_CMD_IX)
+
+struct fw_acl_mac_cmd {
+ __be32 op_to_vfn;
+ __be32 en_to_len16;
+ __u8 nmac;
+ __u8 r3[7];
+ __be16 r4;
+ __u8 macaddr0[6];
+ __be16 r5;
+ __u8 macaddr1[6];
+ __be16 r6;
+ __u8 macaddr2[6];
+ __be16 r7;
+ __u8 macaddr3[6];
+};
+
+#define S_FW_ACL_MAC_CMD_PFN 8
+#define M_FW_ACL_MAC_CMD_PFN 0x7
+#define V_FW_ACL_MAC_CMD_PFN(x) ((x) << S_FW_ACL_MAC_CMD_PFN)
+#define G_FW_ACL_MAC_CMD_PFN(x) \
+ (((x) >> S_FW_ACL_MAC_CMD_PFN) & M_FW_ACL_MAC_CMD_PFN)
+
+#define S_FW_ACL_MAC_CMD_VFN 0
+#define M_FW_ACL_MAC_CMD_VFN 0xff
+#define V_FW_ACL_MAC_CMD_VFN(x) ((x) << S_FW_ACL_MAC_CMD_VFN)
+#define G_FW_ACL_MAC_CMD_VFN(x) \
+ (((x) >> S_FW_ACL_MAC_CMD_VFN) & M_FW_ACL_MAC_CMD_VFN)
+
+#define S_FW_ACL_MAC_CMD_EN 31
+#define M_FW_ACL_MAC_CMD_EN 0x1
+#define V_FW_ACL_MAC_CMD_EN(x) ((x) << S_FW_ACL_MAC_CMD_EN)
+#define G_FW_ACL_MAC_CMD_EN(x) \
+ (((x) >> S_FW_ACL_MAC_CMD_EN) & M_FW_ACL_MAC_CMD_EN)
+#define F_FW_ACL_MAC_CMD_EN V_FW_ACL_MAC_CMD_EN(1U)
+
+struct fw_acl_vlan_cmd {
+ __be32 op_to_vfn;
+ __be32 en_to_len16;
+ __u8 nvlan;
+ __u8 dropnovlan_fm;
+ __u8 r3_lo[6];
+ __be16 vlanid[16];
+};
+
+#define S_FW_ACL_VLAN_CMD_PFN 8
+#define M_FW_ACL_VLAN_CMD_PFN 0x7
+#define V_FW_ACL_VLAN_CMD_PFN(x) ((x) << S_FW_ACL_VLAN_CMD_PFN)
+#define G_FW_ACL_VLAN_CMD_PFN(x) \
+ (((x) >> S_FW_ACL_VLAN_CMD_PFN) & M_FW_ACL_VLAN_CMD_PFN)
+
+#define S_FW_ACL_VLAN_CMD_VFN 0
+#define M_FW_ACL_VLAN_CMD_VFN 0xff
+#define V_FW_ACL_VLAN_CMD_VFN(x) ((x) << S_FW_ACL_VLAN_CMD_VFN)
+#define G_FW_ACL_VLAN_CMD_VFN(x) \
+ (((x) >> S_FW_ACL_VLAN_CMD_VFN) & M_FW_ACL_VLAN_CMD_VFN)
+
+#define S_FW_ACL_VLAN_CMD_EN 31
+#define M_FW_ACL_VLAN_CMD_EN 0x1
+#define V_FW_ACL_VLAN_CMD_EN(x) ((x) << S_FW_ACL_VLAN_CMD_EN)
+#define G_FW_ACL_VLAN_CMD_EN(x) \
+ (((x) >> S_FW_ACL_VLAN_CMD_EN) & M_FW_ACL_VLAN_CMD_EN)
+#define F_FW_ACL_VLAN_CMD_EN V_FW_ACL_VLAN_CMD_EN(1U)
+
+#define S_FW_ACL_VLAN_CMD_DROPNOVLAN 7
+#define M_FW_ACL_VLAN_CMD_DROPNOVLAN 0x1
+#define V_FW_ACL_VLAN_CMD_DROPNOVLAN(x) ((x) << S_FW_ACL_VLAN_CMD_DROPNOVLAN)
+#define G_FW_ACL_VLAN_CMD_DROPNOVLAN(x) \
+ (((x) >> S_FW_ACL_VLAN_CMD_DROPNOVLAN) & M_FW_ACL_VLAN_CMD_DROPNOVLAN)
+#define F_FW_ACL_VLAN_CMD_DROPNOVLAN V_FW_ACL_VLAN_CMD_DROPNOVLAN(1U)
+
+#define S_FW_ACL_VLAN_CMD_FM 6
+#define M_FW_ACL_VLAN_CMD_FM 0x1
+#define V_FW_ACL_VLAN_CMD_FM(x) ((x) << S_FW_ACL_VLAN_CMD_FM)
+#define G_FW_ACL_VLAN_CMD_FM(x) \
+ (((x) >> S_FW_ACL_VLAN_CMD_FM) & M_FW_ACL_VLAN_CMD_FM)
+#define F_FW_ACL_VLAN_CMD_FM V_FW_ACL_VLAN_CMD_FM(1U)
+
+/* port capabilities bitmap */
+enum fw_port_cap {
+ FW_PORT_CAP_SPEED_100M = 0x0001,
+ FW_PORT_CAP_SPEED_1G = 0x0002,
+ FW_PORT_CAP_SPEED_2_5G = 0x0004,
+ FW_PORT_CAP_SPEED_10G = 0x0008,
+ FW_PORT_CAP_SPEED_40G = 0x0010,
+ FW_PORT_CAP_SPEED_100G = 0x0020,
+ FW_PORT_CAP_FC_RX = 0x0040,
+ FW_PORT_CAP_FC_TX = 0x0080,
+ FW_PORT_CAP_ANEG = 0x0100,
+ FW_PORT_CAP_MDIX = 0x0200,
+ FW_PORT_CAP_MDIAUTO = 0x0400,
+ FW_PORT_CAP_FEC = 0x0800,
+ FW_PORT_CAP_TECHKR = 0x1000,
+ FW_PORT_CAP_TECHKX4 = 0x2000,
+};
+
+#define S_FW_PORT_AUXLINFO_MDI 3
+#define M_FW_PORT_AUXLINFO_MDI 0x3
+#define V_FW_PORT_AUXLINFO_MDI(x) ((x) << S_FW_PORT_AUXLINFO_MDI)
+#define G_FW_PORT_AUXLINFO_MDI(x) \
+ (((x) >> S_FW_PORT_AUXLINFO_MDI) & M_FW_PORT_AUXLINFO_MDI)
+
+#define S_FW_PORT_AUXLINFO_KX4 2
+#define M_FW_PORT_AUXLINFO_KX4 0x1
+#define V_FW_PORT_AUXLINFO_KX4(x) ((x) << S_FW_PORT_AUXLINFO_KX4)
+#define G_FW_PORT_AUXLINFO_KX4(x) \
+ (((x) >> S_FW_PORT_AUXLINFO_KX4) & M_FW_PORT_AUXLINFO_KX4)
+#define F_FW_PORT_AUXLINFO_KX4 V_FW_PORT_AUXLINFO_KX4(1U)
+
+#define S_FW_PORT_AUXLINFO_KR 1
+#define M_FW_PORT_AUXLINFO_KR 0x1
+#define V_FW_PORT_AUXLINFO_KR(x) ((x) << S_FW_PORT_AUXLINFO_KR)
+#define G_FW_PORT_AUXLINFO_KR(x) \
+ (((x) >> S_FW_PORT_AUXLINFO_KR) & M_FW_PORT_AUXLINFO_KR)
+#define F_FW_PORT_AUXLINFO_KR V_FW_PORT_AUXLINFO_KR(1U)
+
+#define S_FW_PORT_AUXLINFO_FEC 0
+#define M_FW_PORT_AUXLINFO_FEC 0x1
+#define V_FW_PORT_AUXLINFO_FEC(x) ((x) << S_FW_PORT_AUXLINFO_FEC)
+#define G_FW_PORT_AUXLINFO_FEC(x) \
+ (((x) >> S_FW_PORT_AUXLINFO_FEC) & M_FW_PORT_AUXLINFO_FEC)
+#define F_FW_PORT_AUXLINFO_FEC V_FW_PORT_AUXLINFO_FEC(1U)
+
+#define S_FW_PORT_RCAP_AUX 11
+#define M_FW_PORT_RCAP_AUX 0x7
+#define V_FW_PORT_RCAP_AUX(x) ((x) << S_FW_PORT_RCAP_AUX)
+#define G_FW_PORT_RCAP_AUX(x) \
+ (((x) >> S_FW_PORT_RCAP_AUX) & M_FW_PORT_RCAP_AUX)
+
+#define S_FW_PORT_CAP_SPEED 0
+#define M_FW_PORT_CAP_SPEED 0x3f
+#define V_FW_PORT_CAP_SPEED(x) ((x) << S_FW_PORT_CAP_SPEED)
+#define G_FW_PORT_CAP_SPEED(x) \
+ (((x) >> S_FW_PORT_CAP_SPEED) & M_FW_PORT_CAP_SPEED)
+
+#define S_FW_PORT_CAP_FC 6
+#define M_FW_PORT_CAP_FC 0x3
+#define V_FW_PORT_CAP_FC(x) ((x) << S_FW_PORT_CAP_FC)
+#define G_FW_PORT_CAP_FC(x) \
+ (((x) >> S_FW_PORT_CAP_FC) & M_FW_PORT_CAP_FC)
+
+#define S_FW_PORT_CAP_ANEG 8
+#define M_FW_PORT_CAP_ANEG 0x1
+#define V_FW_PORT_CAP_ANEG(x) ((x) << S_FW_PORT_CAP_ANEG)
+#define G_FW_PORT_CAP_ANEG(x) \
+ (((x) >> S_FW_PORT_CAP_ANEG) & M_FW_PORT_CAP_ANEG)
+
+enum fw_port_mdi {
+ FW_PORT_CAP_MDI_UNCHANGED,
+ FW_PORT_CAP_MDI_AUTO,
+ FW_PORT_CAP_MDI_F_STRAIGHT,
+ FW_PORT_CAP_MDI_F_CROSSOVER
+};
+
+#define S_FW_PORT_CAP_MDI 9
+#define M_FW_PORT_CAP_MDI 3
+#define V_FW_PORT_CAP_MDI(x) ((x) << S_FW_PORT_CAP_MDI)
+#define G_FW_PORT_CAP_MDI(x) (((x) >> S_FW_PORT_CAP_MDI) & M_FW_PORT_CAP_MDI)
+
+enum fw_port_action {
+ FW_PORT_ACTION_L1_CFG = 0x0001,
+ FW_PORT_ACTION_L2_CFG = 0x0002,
+ FW_PORT_ACTION_GET_PORT_INFO = 0x0003,
+ FW_PORT_ACTION_L2_PPP_CFG = 0x0004,
+ FW_PORT_ACTION_L2_DCB_CFG = 0x0005,
+ FW_PORT_ACTION_LOW_PWR_TO_NORMAL = 0x0010,
+ FW_PORT_ACTION_L1_LOW_PWR_EN = 0x0011,
+ FW_PORT_ACTION_L2_WOL_MODE_EN = 0x0012,
+ FW_PORT_ACTION_LPBK_TO_NORMAL = 0x0020,
+ FW_PORT_ACTION_L1_SS_LPBK_ASIC = 0x0021,
+ FW_PORT_ACTION_MAC_LPBK = 0x0022,
+ FW_PORT_ACTION_L1_WS_LPBK_ASIC = 0x0023,
+ FW_PORT_ACTION_L1_EXT_LPBK = 0x0026,
+ FW_PORT_ACTION_PCS_LPBK = 0x0028,
+ FW_PORT_ACTION_PHY_RESET = 0x0040,
+ FW_PORT_ACTION_PMA_RESET = 0x0041,
+ FW_PORT_ACTION_PCS_RESET = 0x0042,
+ FW_PORT_ACTION_PHYXS_RESET = 0x0043,
+ FW_PORT_ACTION_DTEXS_REEST = 0x0044,
+ FW_PORT_ACTION_AN_RESET = 0x0045
+};
+
+enum fw_port_l2cfg_ctlbf {
+ FW_PORT_L2_CTLBF_OVLAN0 = 0x01,
+ FW_PORT_L2_CTLBF_OVLAN1 = 0x02,
+ FW_PORT_L2_CTLBF_OVLAN2 = 0x04,
+ FW_PORT_L2_CTLBF_OVLAN3 = 0x08,
+ FW_PORT_L2_CTLBF_IVLAN = 0x10,
+ FW_PORT_L2_CTLBF_TXIPG = 0x20,
+ FW_PORT_L2_CTLBF_MTU = 0x40
+};
+
+enum fw_port_dcb_cfg {
+ FW_PORT_DCB_CFG_PG = 0x01,
+ FW_PORT_DCB_CFG_PFC = 0x02,
+ FW_PORT_DCB_CFG_APPL = 0x04
+};
+
+enum fw_port_dcb_cfg_rc {
+ FW_PORT_DCB_CFG_SUCCESS = 0x0,
+ FW_PORT_DCB_CFG_ERROR = 0x1
+};
+
+enum fw_port_dcb_type {
+ FW_PORT_DCB_TYPE_PGID = 0x00,
+ FW_PORT_DCB_TYPE_PGRATE = 0x01,
+ FW_PORT_DCB_TYPE_PRIORATE = 0x02,
+ FW_PORT_DCB_TYPE_PFC = 0x03,
+ FW_PORT_DCB_TYPE_APP_ID = 0x04,
+};
+
+struct fw_port_cmd {
+ __be32 op_to_portid;
+ __be32 action_to_len16;
+ union fw_port {
+ struct fw_port_l1cfg {
+ __be32 rcap;
+ __be32 r;
+ } l1cfg;
+ struct fw_port_l2cfg {
+ __u8 ctlbf;
+ __u8 ovlan3_to_ivlan0;
+ __be16 ivlantype;
+ __be16 txipg_force_pinfo;
+ __be16 mtu;
+ __be16 ovlan0mask;
+ __be16 ovlan0type;
+ __be16 ovlan1mask;
+ __be16 ovlan1type;
+ __be16 ovlan2mask;
+ __be16 ovlan2type;
+ __be16 ovlan3mask;
+ __be16 ovlan3type;
+ } l2cfg;
+ struct fw_port_info {
+ __be32 lstatus_to_modtype;
+ __be16 pcap;
+ __be16 acap;
+ __be16 mtu;
+ __u8 cbllen;
+ __u8 auxlinfo;
+ __be32 r8;
+ __be64 r9;
+ } info;
+ union fw_port_dcb {
+ struct fw_port_dcb_pgid {
+ __u8 type;
+ __u8 apply_pkd;
+ __u8 r10_lo[2];
+ __be32 pgid;
+ __be64 r11;
+ } pgid;
+ struct fw_port_dcb_pgrate {
+ __u8 type;
+ __u8 apply_pkd;
+ __u8 r10_lo[5];
+ __u8 num_tcs_supported;
+ __u8 pgrate[8];
+ } pgrate;
+ struct fw_port_dcb_priorate {
+ __u8 type;
+ __u8 apply_pkd;
+ __u8 r10_lo[6];
+ __u8 strict_priorate[8];
+ } priorate;
+ struct fw_port_dcb_pfc {
+ __u8 type;
+ __u8 pfcen;
+ __be16 r10[3];
+ __be64 r11;
+ } pfc;
+ struct fw_port_app_priority {
+ __u8 type;
+ __u8 r10[2];
+ __u8 idx;
+ __u8 user_prio_map;
+ __u8 sel_field;
+ __be16 protocolid;
+ __be64 r12;
+ } app_priority;
+ } dcb;
+ } u;
+};
+
+#define S_FW_PORT_CMD_READ 22
+#define M_FW_PORT_CMD_READ 0x1
+#define V_FW_PORT_CMD_READ(x) ((x) << S_FW_PORT_CMD_READ)
+#define G_FW_PORT_CMD_READ(x) \
+ (((x) >> S_FW_PORT_CMD_READ) & M_FW_PORT_CMD_READ)
+#define F_FW_PORT_CMD_READ V_FW_PORT_CMD_READ(1U)
+
+#define S_FW_PORT_CMD_PORTID 0
+#define M_FW_PORT_CMD_PORTID 0xf
+#define V_FW_PORT_CMD_PORTID(x) ((x) << S_FW_PORT_CMD_PORTID)
+#define G_FW_PORT_CMD_PORTID(x) \
+ (((x) >> S_FW_PORT_CMD_PORTID) & M_FW_PORT_CMD_PORTID)
+
+#define S_FW_PORT_CMD_ACTION 16
+#define M_FW_PORT_CMD_ACTION 0xffff
+#define V_FW_PORT_CMD_ACTION(x) ((x) << S_FW_PORT_CMD_ACTION)
+#define G_FW_PORT_CMD_ACTION(x) \
+ (((x) >> S_FW_PORT_CMD_ACTION) & M_FW_PORT_CMD_ACTION)
+
+#define S_FW_PORT_CMD_OVLAN3 7
+#define M_FW_PORT_CMD_OVLAN3 0x1
+#define V_FW_PORT_CMD_OVLAN3(x) ((x) << S_FW_PORT_CMD_OVLAN3)
+#define G_FW_PORT_CMD_OVLAN3(x) \
+ (((x) >> S_FW_PORT_CMD_OVLAN3) & M_FW_PORT_CMD_OVLAN3)
+#define F_FW_PORT_CMD_OVLAN3 V_FW_PORT_CMD_OVLAN3(1U)
+
+#define S_FW_PORT_CMD_OVLAN2 6
+#define M_FW_PORT_CMD_OVLAN2 0x1
+#define V_FW_PORT_CMD_OVLAN2(x) ((x) << S_FW_PORT_CMD_OVLAN2)
+#define G_FW_PORT_CMD_OVLAN2(x) \
+ (((x) >> S_FW_PORT_CMD_OVLAN2) & M_FW_PORT_CMD_OVLAN2)
+#define F_FW_PORT_CMD_OVLAN2 V_FW_PORT_CMD_OVLAN2(1U)
+
+#define S_FW_PORT_CMD_OVLAN1 5
+#define M_FW_PORT_CMD_OVLAN1 0x1
+#define V_FW_PORT_CMD_OVLAN1(x) ((x) << S_FW_PORT_CMD_OVLAN1)
+#define G_FW_PORT_CMD_OVLAN1(x) \
+ (((x) >> S_FW_PORT_CMD_OVLAN1) & M_FW_PORT_CMD_OVLAN1)
+#define F_FW_PORT_CMD_OVLAN1 V_FW_PORT_CMD_OVLAN1(1U)
+
+#define S_FW_PORT_CMD_OVLAN0 4
+#define M_FW_PORT_CMD_OVLAN0 0x1
+#define V_FW_PORT_CMD_OVLAN0(x) ((x) << S_FW_PORT_CMD_OVLAN0)
+#define G_FW_PORT_CMD_OVLAN0(x) \
+ (((x) >> S_FW_PORT_CMD_OVLAN0) & M_FW_PORT_CMD_OVLAN0)
+#define F_FW_PORT_CMD_OVLAN0 V_FW_PORT_CMD_OVLAN0(1U)
+
+#define S_FW_PORT_CMD_IVLAN0 3
+#define M_FW_PORT_CMD_IVLAN0 0x1
+#define V_FW_PORT_CMD_IVLAN0(x) ((x) << S_FW_PORT_CMD_IVLAN0)
+#define G_FW_PORT_CMD_IVLAN0(x) \
+ (((x) >> S_FW_PORT_CMD_IVLAN0) & M_FW_PORT_CMD_IVLAN0)
+#define F_FW_PORT_CMD_IVLAN0 V_FW_PORT_CMD_IVLAN0(1U)
+
+#define S_FW_PORT_CMD_TXIPG 3
+#define M_FW_PORT_CMD_TXIPG 0x1fff
+#define V_FW_PORT_CMD_TXIPG(x) ((x) << S_FW_PORT_CMD_TXIPG)
+#define G_FW_PORT_CMD_TXIPG(x) \
+ (((x) >> S_FW_PORT_CMD_TXIPG) & M_FW_PORT_CMD_TXIPG)
+
+#define S_FW_PORT_CMD_FORCE_PINFO 0
+#define M_FW_PORT_CMD_FORCE_PINFO 0x1
+#define V_FW_PORT_CMD_FORCE_PINFO(x) ((x) << S_FW_PORT_CMD_FORCE_PINFO)
+#define G_FW_PORT_CMD_FORCE_PINFO(x) \
+ (((x) >> S_FW_PORT_CMD_FORCE_PINFO) & M_FW_PORT_CMD_FORCE_PINFO)
+#define F_FW_PORT_CMD_FORCE_PINFO V_FW_PORT_CMD_FORCE_PINFO(1U)
+
+#define S_FW_PORT_CMD_LSTATUS 31
+#define M_FW_PORT_CMD_LSTATUS 0x1
+#define V_FW_PORT_CMD_LSTATUS(x) ((x) << S_FW_PORT_CMD_LSTATUS)
+#define G_FW_PORT_CMD_LSTATUS(x) \
+ (((x) >> S_FW_PORT_CMD_LSTATUS) & M_FW_PORT_CMD_LSTATUS)
+#define F_FW_PORT_CMD_LSTATUS V_FW_PORT_CMD_LSTATUS(1U)
+
+#define S_FW_PORT_CMD_LSPEED 24
+#define M_FW_PORT_CMD_LSPEED 0x3f
+#define V_FW_PORT_CMD_LSPEED(x) ((x) << S_FW_PORT_CMD_LSPEED)
+#define G_FW_PORT_CMD_LSPEED(x) \
+ (((x) >> S_FW_PORT_CMD_LSPEED) & M_FW_PORT_CMD_LSPEED)
+
+#define S_FW_PORT_CMD_TXPAUSE 23
+#define M_FW_PORT_CMD_TXPAUSE 0x1
+#define V_FW_PORT_CMD_TXPAUSE(x) ((x) << S_FW_PORT_CMD_TXPAUSE)
+#define G_FW_PORT_CMD_TXPAUSE(x) \
+ (((x) >> S_FW_PORT_CMD_TXPAUSE) & M_FW_PORT_CMD_TXPAUSE)
+#define F_FW_PORT_CMD_TXPAUSE V_FW_PORT_CMD_TXPAUSE(1U)
+
+#define S_FW_PORT_CMD_RXPAUSE 22
+#define M_FW_PORT_CMD_RXPAUSE 0x1
+#define V_FW_PORT_CMD_RXPAUSE(x) ((x) << S_FW_PORT_CMD_RXPAUSE)
+#define G_FW_PORT_CMD_RXPAUSE(x) \
+ (((x) >> S_FW_PORT_CMD_RXPAUSE) & M_FW_PORT_CMD_RXPAUSE)
+#define F_FW_PORT_CMD_RXPAUSE V_FW_PORT_CMD_RXPAUSE(1U)
+
+#define S_FW_PORT_CMD_MDIOCAP 21
+#define M_FW_PORT_CMD_MDIOCAP 0x1
+#define V_FW_PORT_CMD_MDIOCAP(x) ((x) << S_FW_PORT_CMD_MDIOCAP)
+#define G_FW_PORT_CMD_MDIOCAP(x) \
+ (((x) >> S_FW_PORT_CMD_MDIOCAP) & M_FW_PORT_CMD_MDIOCAP)
+#define F_FW_PORT_CMD_MDIOCAP V_FW_PORT_CMD_MDIOCAP(1U)
+
+#define S_FW_PORT_CMD_MDIOADDR 16
+#define M_FW_PORT_CMD_MDIOADDR 0x1f
+#define V_FW_PORT_CMD_MDIOADDR(x) ((x) << S_FW_PORT_CMD_MDIOADDR)
+#define G_FW_PORT_CMD_MDIOADDR(x) \
+ (((x) >> S_FW_PORT_CMD_MDIOADDR) & M_FW_PORT_CMD_MDIOADDR)
+
+#define S_FW_PORT_CMD_LPTXPAUSE 15
+#define M_FW_PORT_CMD_LPTXPAUSE 0x1
+#define V_FW_PORT_CMD_LPTXPAUSE(x) ((x) << S_FW_PORT_CMD_LPTXPAUSE)
+#define G_FW_PORT_CMD_LPTXPAUSE(x) \
+ (((x) >> S_FW_PORT_CMD_LPTXPAUSE) & M_FW_PORT_CMD_LPTXPAUSE)
+#define F_FW_PORT_CMD_LPTXPAUSE V_FW_PORT_CMD_LPTXPAUSE(1U)
+
+#define S_FW_PORT_CMD_LPRXPAUSE 14
+#define M_FW_PORT_CMD_LPRXPAUSE 0x1
+#define V_FW_PORT_CMD_LPRXPAUSE(x) ((x) << S_FW_PORT_CMD_LPRXPAUSE)
+#define G_FW_PORT_CMD_LPRXPAUSE(x) \
+ (((x) >> S_FW_PORT_CMD_LPRXPAUSE) & M_FW_PORT_CMD_LPRXPAUSE)
+#define F_FW_PORT_CMD_LPRXPAUSE V_FW_PORT_CMD_LPRXPAUSE(1U)
+
+#define S_FW_PORT_CMD_PTYPE 8
+#define M_FW_PORT_CMD_PTYPE 0x1f
+#define V_FW_PORT_CMD_PTYPE(x) ((x) << S_FW_PORT_CMD_PTYPE)
+#define G_FW_PORT_CMD_PTYPE(x) \
+ (((x) >> S_FW_PORT_CMD_PTYPE) & M_FW_PORT_CMD_PTYPE)
+
+#define S_FW_PORT_CMD_LINKDNRC 5
+#define M_FW_PORT_CMD_LINKDNRC 0x7
+#define V_FW_PORT_CMD_LINKDNRC(x) ((x) << S_FW_PORT_CMD_LINKDNRC)
+#define G_FW_PORT_CMD_LINKDNRC(x) \
+ (((x) >> S_FW_PORT_CMD_LINKDNRC) & M_FW_PORT_CMD_LINKDNRC)
+
+#define S_FW_PORT_CMD_MODTYPE 0
+#define M_FW_PORT_CMD_MODTYPE 0x1f
+#define V_FW_PORT_CMD_MODTYPE(x) ((x) << S_FW_PORT_CMD_MODTYPE)
+#define G_FW_PORT_CMD_MODTYPE(x) \
+ (((x) >> S_FW_PORT_CMD_MODTYPE) & M_FW_PORT_CMD_MODTYPE)
+
+#define S_FW_PORT_CMD_APPLY 7
+#define M_FW_PORT_CMD_APPLY 0x1
+#define V_FW_PORT_CMD_APPLY(x) ((x) << S_FW_PORT_CMD_APPLY)
+#define G_FW_PORT_CMD_APPLY(x) \
+ (((x) >> S_FW_PORT_CMD_APPLY) & M_FW_PORT_CMD_APPLY)
+#define F_FW_PORT_CMD_APPLY V_FW_PORT_CMD_APPLY(1U)
+
+/*
+ * These are configured into the VPD and hence tools that generate
+ * VPD may use this enumeration.
+ * extPHY #lanes T4_I2C extI2C BP_Eq BP_ANEG Speed
+ */
+enum fw_port_type {
+ FW_PORT_TYPE_FIBER_XFI = 0, /* Y, 1, N, Y, N, N, 10G */
+ FW_PORT_TYPE_FIBER_XAUI = 1, /* Y, 4, N, Y, N, N, 10G */
+ FW_PORT_TYPE_BT_SGMII = 2, /* Y, 1, No, No, No, No, 1G/100M */
+ FW_PORT_TYPE_BT_XFI = 3, /* Y, 1, No, No, No, No, 10G */
+ FW_PORT_TYPE_BT_XAUI = 4, /* Y, 4, No, No, No, No, 10G/1G/100M? */
+ FW_PORT_TYPE_KX4 = 5, /* No, 4, No, No, Yes, Yes, 10G */
+ FW_PORT_TYPE_CX4 = 6, /* No, 4, No, No, No, No, 10G */
+ FW_PORT_TYPE_KX = 7, /* No, 1, No, No, Yes, No, 1G */
+ FW_PORT_TYPE_KR = 8, /* No, 1, No, No, Yes, Yes, 10G */
+ FW_PORT_TYPE_SFP = 9, /* No, 1, Yes, No, No, No, 10G */
+ FW_PORT_TYPE_BP_AP = 10, /* No, 1, No, No, Yes, Yes, 10G, BP ANGE */
+ FW_PORT_TYPE_BP4_AP = 11, /* No, 4, No, No, Yes, Yes, 10G, BP ANGE */
+
+ FW_PORT_TYPE_NONE = M_FW_PORT_CMD_PTYPE
+};
+
+/* These are read from module's EEPROM and determined once the
+ module is inserted. */
+enum fw_port_module_type {
+ FW_PORT_MOD_TYPE_NA = 0x0,
+ FW_PORT_MOD_TYPE_LR = 0x1,
+ FW_PORT_MOD_TYPE_SR = 0x2,
+ FW_PORT_MOD_TYPE_ER = 0x3,
+ FW_PORT_MOD_TYPE_TWINAX_PASSIVE = 0x4,
+ FW_PORT_MOD_TYPE_TWINAX_ACTIVE = 0x5,
+ FW_PORT_MOD_TYPE_LRM = 0x6,
+ FW_PORT_MOD_TYPE_ERROR = M_FW_PORT_CMD_MODTYPE - 3,
+ FW_PORT_MOD_TYPE_UNKNOWN = M_FW_PORT_CMD_MODTYPE - 2,
+ FW_PORT_MOD_TYPE_NOTSUPPORTED = M_FW_PORT_CMD_MODTYPE - 1,
+ FW_PORT_MOD_TYPE_NONE = M_FW_PORT_CMD_MODTYPE
+};
+
+/* used by FW and tools may use this to generate VPD */
+enum fw_port_mod_sub_type {
+ FW_PORT_MOD_SUB_TYPE_NA,
+ FW_PORT_MOD_SUB_TYPE_MV88E114X=0x1,
+ FW_PORT_MOD_SUB_TYPE_BT_VSC8634=0x8,
+
+ /*
+ * The following will never been in the VPD. They are TWINAX cable
+ * lengths decoded from SFP+ module i2c PROMs. These should almost
+ * certainly go somewhere else ...
+ */
+ FW_PORT_MOD_SUB_TYPE_TWINAX_1=0x9,
+ FW_PORT_MOD_SUB_TYPE_TWINAX_3=0xA,
+ FW_PORT_MOD_SUB_TYPE_TWINAX_5=0xB,
+ FW_PORT_MOD_SUB_TYPE_TWINAX_7=0xC,
+};
+
+/* link down reason codes (3b) */
+enum fw_port_link_dn_rc {
+ FW_PORT_LINK_DN_RC_NONE,
+ FW_PORT_LINK_DN_RC_REMFLT,
+ FW_PORT_LINK_DN_ANEG_F,
+ FW_PORT_LINK_DN_MS_RES_F,
+ FW_PORT_LINK_DN_UNKNOWN
+};
+
+/* port stats */
+#define FW_NUM_PORT_STATS 50
+#define FW_NUM_PORT_TX_STATS 23
+#define FW_NUM_PORT_RX_STATS 27
+
+enum fw_port_stats_tx_index {
+ FW_STAT_TX_PORT_BYTES_IX,
+ FW_STAT_TX_PORT_FRAMES_IX,
+ FW_STAT_TX_PORT_BCAST_IX,
+ FW_STAT_TX_PORT_MCAST_IX,
+ FW_STAT_TX_PORT_UCAST_IX,
+ FW_STAT_TX_PORT_ERROR_IX,
+ FW_STAT_TX_PORT_64B_IX,
+ FW_STAT_TX_PORT_65B_127B_IX,
+ FW_STAT_TX_PORT_128B_255B_IX,
+ FW_STAT_TX_PORT_256B_511B_IX,
+ FW_STAT_TX_PORT_512B_1023B_IX,
+ FW_STAT_TX_PORT_1024B_1518B_IX,
+ FW_STAT_TX_PORT_1519B_MAX_IX,
+ FW_STAT_TX_PORT_DROP_IX,
+ FW_STAT_TX_PORT_PAUSE_IX,
+ FW_STAT_TX_PORT_PPP0_IX,
+ FW_STAT_TX_PORT_PPP1_IX,
+ FW_STAT_TX_PORT_PPP2_IX,
+ FW_STAT_TX_PORT_PPP3_IX,
+ FW_STAT_TX_PORT_PPP4_IX,
+ FW_STAT_TX_PORT_PPP5_IX,
+ FW_STAT_TX_PORT_PPP6_IX,
+ FW_STAT_TX_PORT_PPP7_IX
+};
+
+enum fw_port_stat_rx_index {
+ FW_STAT_RX_PORT_BYTES_IX,
+ FW_STAT_RX_PORT_FRAMES_IX,
+ FW_STAT_RX_PORT_BCAST_IX,
+ FW_STAT_RX_PORT_MCAST_IX,
+ FW_STAT_RX_PORT_UCAST_IX,
+ FW_STAT_RX_PORT_MTU_ERROR_IX,
+ FW_STAT_RX_PORT_MTU_CRC_ERROR_IX,
+ FW_STAT_RX_PORT_CRC_ERROR_IX,
+ FW_STAT_RX_PORT_LEN_ERROR_IX,
+ FW_STAT_RX_PORT_SYM_ERROR_IX,
+ FW_STAT_RX_PORT_64B_IX,
+ FW_STAT_RX_PORT_65B_127B_IX,
+ FW_STAT_RX_PORT_128B_255B_IX,
+ FW_STAT_RX_PORT_256B_511B_IX,
+ FW_STAT_RX_PORT_512B_1023B_IX,
+ FW_STAT_RX_PORT_1024B_1518B_IX,
+ FW_STAT_RX_PORT_1519B_MAX_IX,
+ FW_STAT_RX_PORT_PAUSE_IX,
+ FW_STAT_RX_PORT_PPP0_IX,
+ FW_STAT_RX_PORT_PPP1_IX,
+ FW_STAT_RX_PORT_PPP2_IX,
+ FW_STAT_RX_PORT_PPP3_IX,
+ FW_STAT_RX_PORT_PPP4_IX,
+ FW_STAT_RX_PORT_PPP5_IX,
+ FW_STAT_RX_PORT_PPP6_IX,
+ FW_STAT_RX_PORT_PPP7_IX,
+ FW_STAT_RX_PORT_LESS_64B_IX
+};
+
+struct fw_port_stats_cmd {
+ __be32 op_to_portid;
+ __be32 retval_len16;
+ union fw_port_stats {
+ struct fw_port_stats_ctl {
+ __u8 nstats_bg_bm;
+ __u8 tx_ix;
+ __be16 r6;
+ __be32 r7;
+ __be64 stat0;
+ __be64 stat1;
+ __be64 stat2;
+ __be64 stat3;
+ __be64 stat4;
+ __be64 stat5;
+ } ctl;
+ struct fw_port_stats_all {
+ __be64 tx_bytes;
+ __be64 tx_frames;
+ __be64 tx_bcast;
+ __be64 tx_mcast;
+ __be64 tx_ucast;
+ __be64 tx_error;
+ __be64 tx_64b;
+ __be64 tx_65b_127b;
+ __be64 tx_128b_255b;
+ __be64 tx_256b_511b;
+ __be64 tx_512b_1023b;
+ __be64 tx_1024b_1518b;
+ __be64 tx_1519b_max;
+ __be64 tx_drop;
+ __be64 tx_pause;
+ __be64 tx_ppp0;
+ __be64 tx_ppp1;
+ __be64 tx_ppp2;
+ __be64 tx_ppp3;
+ __be64 tx_ppp4;
+ __be64 tx_ppp5;
+ __be64 tx_ppp6;
+ __be64 tx_ppp7;
+ __be64 rx_bytes;
+ __be64 rx_frames;
+ __be64 rx_bcast;
+ __be64 rx_mcast;
+ __be64 rx_ucast;
+ __be64 rx_mtu_error;
+ __be64 rx_mtu_crc_error;
+ __be64 rx_crc_error;
+ __be64 rx_len_error;
+ __be64 rx_sym_error;
+ __be64 rx_64b;
+ __be64 rx_65b_127b;
+ __be64 rx_128b_255b;
+ __be64 rx_256b_511b;
+ __be64 rx_512b_1023b;
+ __be64 rx_1024b_1518b;
+ __be64 rx_1519b_max;
+ __be64 rx_pause;
+ __be64 rx_ppp0;
+ __be64 rx_ppp1;
+ __be64 rx_ppp2;
+ __be64 rx_ppp3;
+ __be64 rx_ppp4;
+ __be64 rx_ppp5;
+ __be64 rx_ppp6;
+ __be64 rx_ppp7;
+ __be64 rx_less_64b;
+ __be64 rx_bg_drop;
+ __be64 rx_bg_trunc;
+ } all;
+ } u;
+};
+
+#define S_FW_PORT_STATS_CMD_NSTATS 4
+#define M_FW_PORT_STATS_CMD_NSTATS 0x7
+#define V_FW_PORT_STATS_CMD_NSTATS(x) ((x) << S_FW_PORT_STATS_CMD_NSTATS)
+#define G_FW_PORT_STATS_CMD_NSTATS(x) \
+ (((x) >> S_FW_PORT_STATS_CMD_NSTATS) & M_FW_PORT_STATS_CMD_NSTATS)
+
+#define S_FW_PORT_STATS_CMD_BG_BM 0
+#define M_FW_PORT_STATS_CMD_BG_BM 0x3
+#define V_FW_PORT_STATS_CMD_BG_BM(x) ((x) << S_FW_PORT_STATS_CMD_BG_BM)
+#define G_FW_PORT_STATS_CMD_BG_BM(x) \
+ (((x) >> S_FW_PORT_STATS_CMD_BG_BM) & M_FW_PORT_STATS_CMD_BG_BM)
+
+#define S_FW_PORT_STATS_CMD_TX 7
+#define M_FW_PORT_STATS_CMD_TX 0x1
+#define V_FW_PORT_STATS_CMD_TX(x) ((x) << S_FW_PORT_STATS_CMD_TX)
+#define G_FW_PORT_STATS_CMD_TX(x) \
+ (((x) >> S_FW_PORT_STATS_CMD_TX) & M_FW_PORT_STATS_CMD_TX)
+#define F_FW_PORT_STATS_CMD_TX V_FW_PORT_STATS_CMD_TX(1U)
+
+#define S_FW_PORT_STATS_CMD_IX 0
+#define M_FW_PORT_STATS_CMD_IX 0x3f
+#define V_FW_PORT_STATS_CMD_IX(x) ((x) << S_FW_PORT_STATS_CMD_IX)
+#define G_FW_PORT_STATS_CMD_IX(x) \
+ (((x) >> S_FW_PORT_STATS_CMD_IX) & M_FW_PORT_STATS_CMD_IX)
+
+/* port loopback stats */
+#define FW_NUM_LB_STATS 14
+enum fw_port_lb_stats_index {
+ FW_STAT_LB_PORT_BYTES_IX,
+ FW_STAT_LB_PORT_FRAMES_IX,
+ FW_STAT_LB_PORT_BCAST_IX,
+ FW_STAT_LB_PORT_MCAST_IX,
+ FW_STAT_LB_PORT_UCAST_IX,
+ FW_STAT_LB_PORT_ERROR_IX,
+ FW_STAT_LB_PORT_64B_IX,
+ FW_STAT_LB_PORT_65B_127B_IX,
+ FW_STAT_LB_PORT_128B_255B_IX,
+ FW_STAT_LB_PORT_256B_511B_IX,
+ FW_STAT_LB_PORT_512B_1023B_IX,
+ FW_STAT_LB_PORT_1024B_1518B_IX,
+ FW_STAT_LB_PORT_1519B_MAX_IX,
+ FW_STAT_LB_PORT_DROP_FRAMES_IX
+};
+
+struct fw_port_lb_stats_cmd {
+ __be32 op_to_lbport;
+ __be32 retval_len16;
+ union fw_port_lb_stats {
+ struct fw_port_lb_stats_ctl {
+ __u8 nstats_bg_bm;
+ __u8 ix_pkd;
+ __be16 r6;
+ __be32 r7;
+ __be64 stat0;
+ __be64 stat1;
+ __be64 stat2;
+ __be64 stat3;
+ __be64 stat4;
+ __be64 stat5;
+ } ctl;
+ struct fw_port_lb_stats_all {
+ __be64 tx_bytes;
+ __be64 tx_frames;
+ __be64 tx_bcast;
+ __be64 tx_mcast;
+ __be64 tx_ucast;
+ __be64 tx_error;
+ __be64 tx_64b;
+ __be64 tx_65b_127b;
+ __be64 tx_128b_255b;
+ __be64 tx_256b_511b;
+ __be64 tx_512b_1023b;
+ __be64 tx_1024b_1518b;
+ __be64 tx_1519b_max;
+ __be64 rx_lb_drop;
+ __be64 rx_lb_trunc;
+ } all;
+ } u;
+};
+
+#define S_FW_PORT_LB_STATS_CMD_LBPORT 0
+#define M_FW_PORT_LB_STATS_CMD_LBPORT 0xf
+#define V_FW_PORT_LB_STATS_CMD_LBPORT(x) \
+ ((x) << S_FW_PORT_LB_STATS_CMD_LBPORT)
+#define G_FW_PORT_LB_STATS_CMD_LBPORT(x) \
+ (((x) >> S_FW_PORT_LB_STATS_CMD_LBPORT) & M_FW_PORT_LB_STATS_CMD_LBPORT)
+
+#define S_FW_PORT_LB_STATS_CMD_NSTATS 4
+#define M_FW_PORT_LB_STATS_CMD_NSTATS 0x7
+#define V_FW_PORT_LB_STATS_CMD_NSTATS(x) \
+ ((x) << S_FW_PORT_LB_STATS_CMD_NSTATS)
+#define G_FW_PORT_LB_STATS_CMD_NSTATS(x) \
+ (((x) >> S_FW_PORT_LB_STATS_CMD_NSTATS) & M_FW_PORT_LB_STATS_CMD_NSTATS)
+
+#define S_FW_PORT_LB_STATS_CMD_BG_BM 0
+#define M_FW_PORT_LB_STATS_CMD_BG_BM 0x3
+#define V_FW_PORT_LB_STATS_CMD_BG_BM(x) ((x) << S_FW_PORT_LB_STATS_CMD_BG_BM)
+#define G_FW_PORT_LB_STATS_CMD_BG_BM(x) \
+ (((x) >> S_FW_PORT_LB_STATS_CMD_BG_BM) & M_FW_PORT_LB_STATS_CMD_BG_BM)
+
+#define S_FW_PORT_LB_STATS_CMD_IX 0
+#define M_FW_PORT_LB_STATS_CMD_IX 0xf
+#define V_FW_PORT_LB_STATS_CMD_IX(x) ((x) << S_FW_PORT_LB_STATS_CMD_IX)
+#define G_FW_PORT_LB_STATS_CMD_IX(x) \
+ (((x) >> S_FW_PORT_LB_STATS_CMD_IX) & M_FW_PORT_LB_STATS_CMD_IX)
+
+/* Trace related defines */
+#define FW_TRACE_CAPTURE_MAX_SINGLE_FLT_MODE 10240
+#define FW_TRACE_CAPTURE_MAX_MULTI_FLT_MODE 2560
+
+struct fw_port_trace_cmd {
+ __be32 op_to_portid;
+ __be32 retval_len16;
+ __be16 traceen_to_pciech;
+ __be16 qnum;
+ __be32 r5;
+};
+
+#define S_FW_PORT_TRACE_CMD_PORTID 0
+#define M_FW_PORT_TRACE_CMD_PORTID 0xf
+#define V_FW_PORT_TRACE_CMD_PORTID(x) ((x) << S_FW_PORT_TRACE_CMD_PORTID)
+#define G_FW_PORT_TRACE_CMD_PORTID(x) \
+ (((x) >> S_FW_PORT_TRACE_CMD_PORTID) & M_FW_PORT_TRACE_CMD_PORTID)
+
+#define S_FW_PORT_TRACE_CMD_TRACEEN 15
+#define M_FW_PORT_TRACE_CMD_TRACEEN 0x1
+#define V_FW_PORT_TRACE_CMD_TRACEEN(x) ((x) << S_FW_PORT_TRACE_CMD_TRACEEN)
+#define G_FW_PORT_TRACE_CMD_TRACEEN(x) \
+ (((x) >> S_FW_PORT_TRACE_CMD_TRACEEN) & M_FW_PORT_TRACE_CMD_TRACEEN)
+#define F_FW_PORT_TRACE_CMD_TRACEEN V_FW_PORT_TRACE_CMD_TRACEEN(1U)
+
+#define S_FW_PORT_TRACE_CMD_FLTMODE 14
+#define M_FW_PORT_TRACE_CMD_FLTMODE 0x1
+#define V_FW_PORT_TRACE_CMD_FLTMODE(x) ((x) << S_FW_PORT_TRACE_CMD_FLTMODE)
+#define G_FW_PORT_TRACE_CMD_FLTMODE(x) \
+ (((x) >> S_FW_PORT_TRACE_CMD_FLTMODE) & M_FW_PORT_TRACE_CMD_FLTMODE)
+#define F_FW_PORT_TRACE_CMD_FLTMODE V_FW_PORT_TRACE_CMD_FLTMODE(1U)
+
+#define S_FW_PORT_TRACE_CMD_DUPLEN 13
+#define M_FW_PORT_TRACE_CMD_DUPLEN 0x1
+#define V_FW_PORT_TRACE_CMD_DUPLEN(x) ((x) << S_FW_PORT_TRACE_CMD_DUPLEN)
+#define G_FW_PORT_TRACE_CMD_DUPLEN(x) \
+ (((x) >> S_FW_PORT_TRACE_CMD_DUPLEN) & M_FW_PORT_TRACE_CMD_DUPLEN)
+#define F_FW_PORT_TRACE_CMD_DUPLEN V_FW_PORT_TRACE_CMD_DUPLEN(1U)
+
+#define S_FW_PORT_TRACE_CMD_RUNTFLTSIZE 8
+#define M_FW_PORT_TRACE_CMD_RUNTFLTSIZE 0x1f
+#define V_FW_PORT_TRACE_CMD_RUNTFLTSIZE(x) \
+ ((x) << S_FW_PORT_TRACE_CMD_RUNTFLTSIZE)
+#define G_FW_PORT_TRACE_CMD_RUNTFLTSIZE(x) \
+ (((x) >> S_FW_PORT_TRACE_CMD_RUNTFLTSIZE) & \
+ M_FW_PORT_TRACE_CMD_RUNTFLTSIZE)
+
+#define S_FW_PORT_TRACE_CMD_PCIECH 6
+#define M_FW_PORT_TRACE_CMD_PCIECH 0x3
+#define V_FW_PORT_TRACE_CMD_PCIECH(x) ((x) << S_FW_PORT_TRACE_CMD_PCIECH)
+#define G_FW_PORT_TRACE_CMD_PCIECH(x) \
+ (((x) >> S_FW_PORT_TRACE_CMD_PCIECH) & M_FW_PORT_TRACE_CMD_PCIECH)
+
+struct fw_port_trace_mmap_cmd {
+ __be32 op_to_portid;
+ __be32 retval_len16;
+ __be32 fid_to_skipoffset;
+ __be32 minpktsize_capturemax;
+ __u8 map[224];
+};
+
+#define S_FW_PORT_TRACE_MMAP_CMD_PORTID 0
+#define M_FW_PORT_TRACE_MMAP_CMD_PORTID 0xf
+#define V_FW_PORT_TRACE_MMAP_CMD_PORTID(x) \
+ ((x) << S_FW_PORT_TRACE_MMAP_CMD_PORTID)
+#define G_FW_PORT_TRACE_MMAP_CMD_PORTID(x) \
+ (((x) >> S_FW_PORT_TRACE_MMAP_CMD_PORTID) & \
+ M_FW_PORT_TRACE_MMAP_CMD_PORTID)
+
+#define S_FW_PORT_TRACE_MMAP_CMD_FID 30
+#define M_FW_PORT_TRACE_MMAP_CMD_FID 0x3
+#define V_FW_PORT_TRACE_MMAP_CMD_FID(x) ((x) << S_FW_PORT_TRACE_MMAP_CMD_FID)
+#define G_FW_PORT_TRACE_MMAP_CMD_FID(x) \
+ (((x) >> S_FW_PORT_TRACE_MMAP_CMD_FID) & M_FW_PORT_TRACE_MMAP_CMD_FID)
+
+#define S_FW_PORT_TRACE_MMAP_CMD_MMAPEN 29
+#define M_FW_PORT_TRACE_MMAP_CMD_MMAPEN 0x1
+#define V_FW_PORT_TRACE_MMAP_CMD_MMAPEN(x) \
+ ((x) << S_FW_PORT_TRACE_MMAP_CMD_MMAPEN)
+#define G_FW_PORT_TRACE_MMAP_CMD_MMAPEN(x) \
+ (((x) >> S_FW_PORT_TRACE_MMAP_CMD_MMAPEN) & \
+ M_FW_PORT_TRACE_MMAP_CMD_MMAPEN)
+#define F_FW_PORT_TRACE_MMAP_CMD_MMAPEN V_FW_PORT_TRACE_MMAP_CMD_MMAPEN(1U)
+
+#define S_FW_PORT_TRACE_MMAP_CMD_DCMAPEN 28
+#define M_FW_PORT_TRACE_MMAP_CMD_DCMAPEN 0x1
+#define V_FW_PORT_TRACE_MMAP_CMD_DCMAPEN(x) \
+ ((x) << S_FW_PORT_TRACE_MMAP_CMD_DCMAPEN)
+#define G_FW_PORT_TRACE_MMAP_CMD_DCMAPEN(x) \
+ (((x) >> S_FW_PORT_TRACE_MMAP_CMD_DCMAPEN) & \
+ M_FW_PORT_TRACE_MMAP_CMD_DCMAPEN)
+#define F_FW_PORT_TRACE_MMAP_CMD_DCMAPEN \
+ V_FW_PORT_TRACE_MMAP_CMD_DCMAPEN(1U)
+
+#define S_FW_PORT_TRACE_MMAP_CMD_SKIPLENGTH 8
+#define M_FW_PORT_TRACE_MMAP_CMD_SKIPLENGTH 0x1f
+#define V_FW_PORT_TRACE_MMAP_CMD_SKIPLENGTH(x) \
+ ((x) << S_FW_PORT_TRACE_MMAP_CMD_SKIPLENGTH)
+#define G_FW_PORT_TRACE_MMAP_CMD_SKIPLENGTH(x) \
+ (((x) >> S_FW_PORT_TRACE_MMAP_CMD_SKIPLENGTH) & \
+ M_FW_PORT_TRACE_MMAP_CMD_SKIPLENGTH)
+
+#define S_FW_PORT_TRACE_MMAP_CMD_SKIPOFFSET 0
+#define M_FW_PORT_TRACE_MMAP_CMD_SKIPOFFSET 0x1f
+#define V_FW_PORT_TRACE_MMAP_CMD_SKIPOFFSET(x) \
+ ((x) << S_FW_PORT_TRACE_MMAP_CMD_SKIPOFFSET)
+#define G_FW_PORT_TRACE_MMAP_CMD_SKIPOFFSET(x) \
+ (((x) >> S_FW_PORT_TRACE_MMAP_CMD_SKIPOFFSET) & \
+ M_FW_PORT_TRACE_MMAP_CMD_SKIPOFFSET)
+
+#define S_FW_PORT_TRACE_MMAP_CMD_MINPKTSIZE 18
+#define M_FW_PORT_TRACE_MMAP_CMD_MINPKTSIZE 0x3fff
+#define V_FW_PORT_TRACE_MMAP_CMD_MINPKTSIZE(x) \
+ ((x) << S_FW_PORT_TRACE_MMAP_CMD_MINPKTSIZE)
+#define G_FW_PORT_TRACE_MMAP_CMD_MINPKTSIZE(x) \
+ (((x) >> S_FW_PORT_TRACE_MMAP_CMD_MINPKTSIZE) & \
+ M_FW_PORT_TRACE_MMAP_CMD_MINPKTSIZE)
+
+#define S_FW_PORT_TRACE_MMAP_CMD_CAPTUREMAX 0
+#define M_FW_PORT_TRACE_MMAP_CMD_CAPTUREMAX 0x3fff
+#define V_FW_PORT_TRACE_MMAP_CMD_CAPTUREMAX(x) \
+ ((x) << S_FW_PORT_TRACE_MMAP_CMD_CAPTUREMAX)
+#define G_FW_PORT_TRACE_MMAP_CMD_CAPTUREMAX(x) \
+ (((x) >> S_FW_PORT_TRACE_MMAP_CMD_CAPTUREMAX) & \
+ M_FW_PORT_TRACE_MMAP_CMD_CAPTUREMAX)
+
+struct fw_rss_ind_tbl_cmd {
+ __be32 op_to_viid;
+ __be32 retval_len16;
+ __be16 niqid;
+ __be16 startidx;
+ __be32 r3;
+ __be32 iq0_to_iq2;
+ __be32 iq3_to_iq5;
+ __be32 iq6_to_iq8;
+ __be32 iq9_to_iq11;
+ __be32 iq12_to_iq14;
+ __be32 iq15_to_iq17;
+ __be32 iq18_to_iq20;
+ __be32 iq21_to_iq23;
+ __be32 iq24_to_iq26;
+ __be32 iq27_to_iq29;
+ __be32 iq30_iq31;
+ __be32 r15_lo;
+};
+
+#define S_FW_RSS_IND_TBL_CMD_VIID 0
+#define M_FW_RSS_IND_TBL_CMD_VIID 0xfff
+#define V_FW_RSS_IND_TBL_CMD_VIID(x) ((x) << S_FW_RSS_IND_TBL_CMD_VIID)
+#define G_FW_RSS_IND_TBL_CMD_VIID(x) \
+ (((x) >> S_FW_RSS_IND_TBL_CMD_VIID) & M_FW_RSS_IND_TBL_CMD_VIID)
+
+#define S_FW_RSS_IND_TBL_CMD_IQ0 20
+#define M_FW_RSS_IND_TBL_CMD_IQ0 0x3ff
+#define V_FW_RSS_IND_TBL_CMD_IQ0(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ0)
+#define G_FW_RSS_IND_TBL_CMD_IQ0(x) \
+ (((x) >> S_FW_RSS_IND_TBL_CMD_IQ0) & M_FW_RSS_IND_TBL_CMD_IQ0)
+
+#define S_FW_RSS_IND_TBL_CMD_IQ1 10
+#define M_FW_RSS_IND_TBL_CMD_IQ1 0x3ff
+#define V_FW_RSS_IND_TBL_CMD_IQ1(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ1)
+#define G_FW_RSS_IND_TBL_CMD_IQ1(x) \
+ (((x) >> S_FW_RSS_IND_TBL_CMD_IQ1) & M_FW_RSS_IND_TBL_CMD_IQ1)
+
+#define S_FW_RSS_IND_TBL_CMD_IQ2 0
+#define M_FW_RSS_IND_TBL_CMD_IQ2 0x3ff
+#define V_FW_RSS_IND_TBL_CMD_IQ2(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ2)
+#define G_FW_RSS_IND_TBL_CMD_IQ2(x) \
+ (((x) >> S_FW_RSS_IND_TBL_CMD_IQ2) & M_FW_RSS_IND_TBL_CMD_IQ2)
+
+#define S_FW_RSS_IND_TBL_CMD_IQ3 20
+#define M_FW_RSS_IND_TBL_CMD_IQ3 0x3ff
+#define V_FW_RSS_IND_TBL_CMD_IQ3(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ3)
+#define G_FW_RSS_IND_TBL_CMD_IQ3(x) \
+ (((x) >> S_FW_RSS_IND_TBL_CMD_IQ3) & M_FW_RSS_IND_TBL_CMD_IQ3)
+
+#define S_FW_RSS_IND_TBL_CMD_IQ4 10
+#define M_FW_RSS_IND_TBL_CMD_IQ4 0x3ff
+#define V_FW_RSS_IND_TBL_CMD_IQ4(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ4)
+#define G_FW_RSS_IND_TBL_CMD_IQ4(x) \
+ (((x) >> S_FW_RSS_IND_TBL_CMD_IQ4) & M_FW_RSS_IND_TBL_CMD_IQ4)
+
+#define S_FW_RSS_IND_TBL_CMD_IQ5 0
+#define M_FW_RSS_IND_TBL_CMD_IQ5 0x3ff
+#define V_FW_RSS_IND_TBL_CMD_IQ5(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ5)
+#define G_FW_RSS_IND_TBL_CMD_IQ5(x) \
+ (((x) >> S_FW_RSS_IND_TBL_CMD_IQ5) & M_FW_RSS_IND_TBL_CMD_IQ5)
+
+#define S_FW_RSS_IND_TBL_CMD_IQ6 20
+#define M_FW_RSS_IND_TBL_CMD_IQ6 0x3ff
+#define V_FW_RSS_IND_TBL_CMD_IQ6(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ6)
+#define G_FW_RSS_IND_TBL_CMD_IQ6(x) \
+ (((x) >> S_FW_RSS_IND_TBL_CMD_IQ6) & M_FW_RSS_IND_TBL_CMD_IQ6)
+
+#define S_FW_RSS_IND_TBL_CMD_IQ7 10
+#define M_FW_RSS_IND_TBL_CMD_IQ7 0x3ff
+#define V_FW_RSS_IND_TBL_CMD_IQ7(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ7)
+#define G_FW_RSS_IND_TBL_CMD_IQ7(x) \
+ (((x) >> S_FW_RSS_IND_TBL_CMD_IQ7) & M_FW_RSS_IND_TBL_CMD_IQ7)
+
+#define S_FW_RSS_IND_TBL_CMD_IQ8 0
+#define M_FW_RSS_IND_TBL_CMD_IQ8 0x3ff
+#define V_FW_RSS_IND_TBL_CMD_IQ8(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ8)
+#define G_FW_RSS_IND_TBL_CMD_IQ8(x) \
+ (((x) >> S_FW_RSS_IND_TBL_CMD_IQ8) & M_FW_RSS_IND_TBL_CMD_IQ8)
+
+#define S_FW_RSS_IND_TBL_CMD_IQ9 20
+#define M_FW_RSS_IND_TBL_CMD_IQ9 0x3ff
+#define V_FW_RSS_IND_TBL_CMD_IQ9(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ9)
+#define G_FW_RSS_IND_TBL_CMD_IQ9(x) \
+ (((x) >> S_FW_RSS_IND_TBL_CMD_IQ9) & M_FW_RSS_IND_TBL_CMD_IQ9)
+
+#define S_FW_RSS_IND_TBL_CMD_IQ10 10
+#define M_FW_RSS_IND_TBL_CMD_IQ10 0x3ff
+#define V_FW_RSS_IND_TBL_CMD_IQ10(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ10)
+#define G_FW_RSS_IND_TBL_CMD_IQ10(x) \
+ (((x) >> S_FW_RSS_IND_TBL_CMD_IQ10) & M_FW_RSS_IND_TBL_CMD_IQ10)
+
+#define S_FW_RSS_IND_TBL_CMD_IQ11 0
+#define M_FW_RSS_IND_TBL_CMD_IQ11 0x3ff
+#define V_FW_RSS_IND_TBL_CMD_IQ11(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ11)
+#define G_FW_RSS_IND_TBL_CMD_IQ11(x) \
+ (((x) >> S_FW_RSS_IND_TBL_CMD_IQ11) & M_FW_RSS_IND_TBL_CMD_IQ11)
+
+#define S_FW_RSS_IND_TBL_CMD_IQ12 20
+#define M_FW_RSS_IND_TBL_CMD_IQ12 0x3ff
+#define V_FW_RSS_IND_TBL_CMD_IQ12(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ12)
+#define G_FW_RSS_IND_TBL_CMD_IQ12(x) \
+ (((x) >> S_FW_RSS_IND_TBL_CMD_IQ12) & M_FW_RSS_IND_TBL_CMD_IQ12)
+
+#define S_FW_RSS_IND_TBL_CMD_IQ13 10
+#define M_FW_RSS_IND_TBL_CMD_IQ13 0x3ff
+#define V_FW_RSS_IND_TBL_CMD_IQ13(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ13)
+#define G_FW_RSS_IND_TBL_CMD_IQ13(x) \
+ (((x) >> S_FW_RSS_IND_TBL_CMD_IQ13) & M_FW_RSS_IND_TBL_CMD_IQ13)
+
+#define S_FW_RSS_IND_TBL_CMD_IQ14 0
+#define M_FW_RSS_IND_TBL_CMD_IQ14 0x3ff
+#define V_FW_RSS_IND_TBL_CMD_IQ14(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ14)
+#define G_FW_RSS_IND_TBL_CMD_IQ14(x) \
+ (((x) >> S_FW_RSS_IND_TBL_CMD_IQ14) & M_FW_RSS_IND_TBL_CMD_IQ14)
+
+#define S_FW_RSS_IND_TBL_CMD_IQ15 20
+#define M_FW_RSS_IND_TBL_CMD_IQ15 0x3ff
+#define V_FW_RSS_IND_TBL_CMD_IQ15(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ15)
+#define G_FW_RSS_IND_TBL_CMD_IQ15(x) \
+ (((x) >> S_FW_RSS_IND_TBL_CMD_IQ15) & M_FW_RSS_IND_TBL_CMD_IQ15)
+
+#define S_FW_RSS_IND_TBL_CMD_IQ16 10
+#define M_FW_RSS_IND_TBL_CMD_IQ16 0x3ff
+#define V_FW_RSS_IND_TBL_CMD_IQ16(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ16)
+#define G_FW_RSS_IND_TBL_CMD_IQ16(x) \
+ (((x) >> S_FW_RSS_IND_TBL_CMD_IQ16) & M_FW_RSS_IND_TBL_CMD_IQ16)
+
+#define S_FW_RSS_IND_TBL_CMD_IQ17 0
+#define M_FW_RSS_IND_TBL_CMD_IQ17 0x3ff
+#define V_FW_RSS_IND_TBL_CMD_IQ17(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ17)
+#define G_FW_RSS_IND_TBL_CMD_IQ17(x) \
+ (((x) >> S_FW_RSS_IND_TBL_CMD_IQ17) & M_FW_RSS_IND_TBL_CMD_IQ17)
+
+#define S_FW_RSS_IND_TBL_CMD_IQ18 20
+#define M_FW_RSS_IND_TBL_CMD_IQ18 0x3ff
+#define V_FW_RSS_IND_TBL_CMD_IQ18(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ18)
+#define G_FW_RSS_IND_TBL_CMD_IQ18(x) \
+ (((x) >> S_FW_RSS_IND_TBL_CMD_IQ18) & M_FW_RSS_IND_TBL_CMD_IQ18)
+
+#define S_FW_RSS_IND_TBL_CMD_IQ19 10
+#define M_FW_RSS_IND_TBL_CMD_IQ19 0x3ff
+#define V_FW_RSS_IND_TBL_CMD_IQ19(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ19)
+#define G_FW_RSS_IND_TBL_CMD_IQ19(x) \
+ (((x) >> S_FW_RSS_IND_TBL_CMD_IQ19) & M_FW_RSS_IND_TBL_CMD_IQ19)
+
+#define S_FW_RSS_IND_TBL_CMD_IQ20 0
+#define M_FW_RSS_IND_TBL_CMD_IQ20 0x3ff
+#define V_FW_RSS_IND_TBL_CMD_IQ20(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ20)
+#define G_FW_RSS_IND_TBL_CMD_IQ20(x) \
+ (((x) >> S_FW_RSS_IND_TBL_CMD_IQ20) & M_FW_RSS_IND_TBL_CMD_IQ20)
+
+#define S_FW_RSS_IND_TBL_CMD_IQ21 20
+#define M_FW_RSS_IND_TBL_CMD_IQ21 0x3ff
+#define V_FW_RSS_IND_TBL_CMD_IQ21(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ21)
+#define G_FW_RSS_IND_TBL_CMD_IQ21(x) \
+ (((x) >> S_FW_RSS_IND_TBL_CMD_IQ21) & M_FW_RSS_IND_TBL_CMD_IQ21)
+
+#define S_FW_RSS_IND_TBL_CMD_IQ22 10
+#define M_FW_RSS_IND_TBL_CMD_IQ22 0x3ff
+#define V_FW_RSS_IND_TBL_CMD_IQ22(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ22)
+#define G_FW_RSS_IND_TBL_CMD_IQ22(x) \
+ (((x) >> S_FW_RSS_IND_TBL_CMD_IQ22) & M_FW_RSS_IND_TBL_CMD_IQ22)
+
+#define S_FW_RSS_IND_TBL_CMD_IQ23 0
+#define M_FW_RSS_IND_TBL_CMD_IQ23 0x3ff
+#define V_FW_RSS_IND_TBL_CMD_IQ23(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ23)
+#define G_FW_RSS_IND_TBL_CMD_IQ23(x) \
+ (((x) >> S_FW_RSS_IND_TBL_CMD_IQ23) & M_FW_RSS_IND_TBL_CMD_IQ23)
+
+#define S_FW_RSS_IND_TBL_CMD_IQ24 20
+#define M_FW_RSS_IND_TBL_CMD_IQ24 0x3ff
+#define V_FW_RSS_IND_TBL_CMD_IQ24(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ24)
+#define G_FW_RSS_IND_TBL_CMD_IQ24(x) \
+ (((x) >> S_FW_RSS_IND_TBL_CMD_IQ24) & M_FW_RSS_IND_TBL_CMD_IQ24)
+
+#define S_FW_RSS_IND_TBL_CMD_IQ25 10
+#define M_FW_RSS_IND_TBL_CMD_IQ25 0x3ff
+#define V_FW_RSS_IND_TBL_CMD_IQ25(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ25)
+#define G_FW_RSS_IND_TBL_CMD_IQ25(x) \
+ (((x) >> S_FW_RSS_IND_TBL_CMD_IQ25) & M_FW_RSS_IND_TBL_CMD_IQ25)
+
+#define S_FW_RSS_IND_TBL_CMD_IQ26 0
+#define M_FW_RSS_IND_TBL_CMD_IQ26 0x3ff
+#define V_FW_RSS_IND_TBL_CMD_IQ26(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ26)
+#define G_FW_RSS_IND_TBL_CMD_IQ26(x) \
+ (((x) >> S_FW_RSS_IND_TBL_CMD_IQ26) & M_FW_RSS_IND_TBL_CMD_IQ26)
+
+#define S_FW_RSS_IND_TBL_CMD_IQ27 20
+#define M_FW_RSS_IND_TBL_CMD_IQ27 0x3ff
+#define V_FW_RSS_IND_TBL_CMD_IQ27(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ27)
+#define G_FW_RSS_IND_TBL_CMD_IQ27(x) \
+ (((x) >> S_FW_RSS_IND_TBL_CMD_IQ27) & M_FW_RSS_IND_TBL_CMD_IQ27)
+
+#define S_FW_RSS_IND_TBL_CMD_IQ28 10
+#define M_FW_RSS_IND_TBL_CMD_IQ28 0x3ff
+#define V_FW_RSS_IND_TBL_CMD_IQ28(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ28)
+#define G_FW_RSS_IND_TBL_CMD_IQ28(x) \
+ (((x) >> S_FW_RSS_IND_TBL_CMD_IQ28) & M_FW_RSS_IND_TBL_CMD_IQ28)
+
+#define S_FW_RSS_IND_TBL_CMD_IQ29 0
+#define M_FW_RSS_IND_TBL_CMD_IQ29 0x3ff
+#define V_FW_RSS_IND_TBL_CMD_IQ29(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ29)
+#define G_FW_RSS_IND_TBL_CMD_IQ29(x) \
+ (((x) >> S_FW_RSS_IND_TBL_CMD_IQ29) & M_FW_RSS_IND_TBL_CMD_IQ29)
+
+#define S_FW_RSS_IND_TBL_CMD_IQ30 20
+#define M_FW_RSS_IND_TBL_CMD_IQ30 0x3ff
+#define V_FW_RSS_IND_TBL_CMD_IQ30(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ30)
+#define G_FW_RSS_IND_TBL_CMD_IQ30(x) \
+ (((x) >> S_FW_RSS_IND_TBL_CMD_IQ30) & M_FW_RSS_IND_TBL_CMD_IQ30)
+
+#define S_FW_RSS_IND_TBL_CMD_IQ31 10
+#define M_FW_RSS_IND_TBL_CMD_IQ31 0x3ff
+#define V_FW_RSS_IND_TBL_CMD_IQ31(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ31)
+#define G_FW_RSS_IND_TBL_CMD_IQ31(x) \
+ (((x) >> S_FW_RSS_IND_TBL_CMD_IQ31) & M_FW_RSS_IND_TBL_CMD_IQ31)
+
+struct fw_rss_glb_config_cmd {
+ __be32 op_to_write;
+ __be32 retval_len16;
+ union fw_rss_glb_config {
+ struct fw_rss_glb_config_manual {
+ __be32 mode_pkd;
+ __be32 r3;
+ __be64 r4;
+ __be64 r5;
+ } manual;
+ struct fw_rss_glb_config_basicvirtual {
+ __be32 mode_pkd;
+ __be32 synmapen_to_hashtoeplitz;
+ __be64 r8;
+ __be64 r9;
+ } basicvirtual;
+ } u;
+};
+
+#define S_FW_RSS_GLB_CONFIG_CMD_MODE 28
+#define M_FW_RSS_GLB_CONFIG_CMD_MODE 0xf
+#define V_FW_RSS_GLB_CONFIG_CMD_MODE(x) ((x) << S_FW_RSS_GLB_CONFIG_CMD_MODE)
+#define G_FW_RSS_GLB_CONFIG_CMD_MODE(x) \
+ (((x) >> S_FW_RSS_GLB_CONFIG_CMD_MODE) & M_FW_RSS_GLB_CONFIG_CMD_MODE)
+
+#define FW_RSS_GLB_CONFIG_CMD_MODE_MANUAL 0
+#define FW_RSS_GLB_CONFIG_CMD_MODE_BASICVIRTUAL 1
+#define FW_RSS_GLB_CONFIG_CMD_MODE_MAX 1
+
+#define S_FW_RSS_GLB_CONFIG_CMD_SYNMAPEN 8
+#define M_FW_RSS_GLB_CONFIG_CMD_SYNMAPEN 0x1
+#define V_FW_RSS_GLB_CONFIG_CMD_SYNMAPEN(x) \
+ ((x) << S_FW_RSS_GLB_CONFIG_CMD_SYNMAPEN)
+#define G_FW_RSS_GLB_CONFIG_CMD_SYNMAPEN(x) \
+ (((x) >> S_FW_RSS_GLB_CONFIG_CMD_SYNMAPEN) & \
+ M_FW_RSS_GLB_CONFIG_CMD_SYNMAPEN)
+#define F_FW_RSS_GLB_CONFIG_CMD_SYNMAPEN \
+ V_FW_RSS_GLB_CONFIG_CMD_SYNMAPEN(1U)
+
+#define S_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV6 7
+#define M_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV6 0x1
+#define V_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV6(x) \
+ ((x) << S_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV6)
+#define G_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV6(x) \
+ (((x) >> S_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV6) & \
+ M_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV6)
+#define F_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV6 \
+ V_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV6(1U)
+
+#define S_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV6 6
+#define M_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV6 0x1
+#define V_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV6(x) \
+ ((x) << S_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV6)
+#define G_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV6(x) \
+ (((x) >> S_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV6) & \
+ M_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV6)
+#define F_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV6 \
+ V_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV6(1U)
+
+#define S_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV4 5
+#define M_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV4 0x1
+#define V_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV4(x) \
+ ((x) << S_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV4)
+#define G_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV4(x) \
+ (((x) >> S_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV4) & \
+ M_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV4)
+#define F_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV4 \
+ V_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV4(1U)
+
+#define S_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV4 4
+#define M_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV4 0x1
+#define V_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV4(x) \
+ ((x) << S_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV4)
+#define G_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV4(x) \
+ (((x) >> S_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV4) & \
+ M_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV4)
+#define F_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV4 \
+ V_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV4(1U)
+
+#define S_FW_RSS_GLB_CONFIG_CMD_OFDMAPEN 3
+#define M_FW_RSS_GLB_CONFIG_CMD_OFDMAPEN 0x1
+#define V_FW_RSS_GLB_CONFIG_CMD_OFDMAPEN(x) \
+ ((x) << S_FW_RSS_GLB_CONFIG_CMD_OFDMAPEN)
+#define G_FW_RSS_GLB_CONFIG_CMD_OFDMAPEN(x) \
+ (((x) >> S_FW_RSS_GLB_CONFIG_CMD_OFDMAPEN) & \
+ M_FW_RSS_GLB_CONFIG_CMD_OFDMAPEN)
+#define F_FW_RSS_GLB_CONFIG_CMD_OFDMAPEN \
+ V_FW_RSS_GLB_CONFIG_CMD_OFDMAPEN(1U)
+
+#define S_FW_RSS_GLB_CONFIG_CMD_TNLMAPEN 2
+#define M_FW_RSS_GLB_CONFIG_CMD_TNLMAPEN 0x1
+#define V_FW_RSS_GLB_CONFIG_CMD_TNLMAPEN(x) \
+ ((x) << S_FW_RSS_GLB_CONFIG_CMD_TNLMAPEN)
+#define G_FW_RSS_GLB_CONFIG_CMD_TNLMAPEN(x) \
+ (((x) >> S_FW_RSS_GLB_CONFIG_CMD_TNLMAPEN) & \
+ M_FW_RSS_GLB_CONFIG_CMD_TNLMAPEN)
+#define F_FW_RSS_GLB_CONFIG_CMD_TNLMAPEN \
+ V_FW_RSS_GLB_CONFIG_CMD_TNLMAPEN(1U)
+
+#define S_FW_RSS_GLB_CONFIG_CMD_TNLALLLKP 1
+#define M_FW_RSS_GLB_CONFIG_CMD_TNLALLLKP 0x1
+#define V_FW_RSS_GLB_CONFIG_CMD_TNLALLLKP(x) \
+ ((x) << S_FW_RSS_GLB_CONFIG_CMD_TNLALLLKP)
+#define G_FW_RSS_GLB_CONFIG_CMD_TNLALLLKP(x) \
+ (((x) >> S_FW_RSS_GLB_CONFIG_CMD_TNLALLLKP) & \
+ M_FW_RSS_GLB_CONFIG_CMD_TNLALLLKP)
+#define F_FW_RSS_GLB_CONFIG_CMD_TNLALLLKP \
+ V_FW_RSS_GLB_CONFIG_CMD_TNLALLLKP(1U)
+
+#define S_FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ 0
+#define M_FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ 0x1
+#define V_FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ(x) \
+ ((x) << S_FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ)
+#define G_FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ(x) \
+ (((x) >> S_FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ) & \
+ M_FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ)
+#define F_FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ \
+ V_FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ(1U)
+
+struct fw_rss_vi_config_cmd {
+ __be32 op_to_viid;
+ __be32 retval_len16;
+ union fw_rss_vi_config {
+ struct fw_rss_vi_config_manual {
+ __be64 r3;
+ __be64 r4;
+ __be64 r5;
+ } manual;
+ struct fw_rss_vi_config_basicvirtual {
+ __be32 r6;
+ __be32 defaultq_to_udpen;
+ __be64 r9;
+ __be64 r10;
+ } basicvirtual;
+ } u;
+};
+
+#define S_FW_RSS_VI_CONFIG_CMD_VIID 0
+#define M_FW_RSS_VI_CONFIG_CMD_VIID 0xfff
+#define V_FW_RSS_VI_CONFIG_CMD_VIID(x) ((x) << S_FW_RSS_VI_CONFIG_CMD_VIID)
+#define G_FW_RSS_VI_CONFIG_CMD_VIID(x) \
+ (((x) >> S_FW_RSS_VI_CONFIG_CMD_VIID) & M_FW_RSS_VI_CONFIG_CMD_VIID)
+
+#define S_FW_RSS_VI_CONFIG_CMD_DEFAULTQ 16
+#define M_FW_RSS_VI_CONFIG_CMD_DEFAULTQ 0x3ff
+#define V_FW_RSS_VI_CONFIG_CMD_DEFAULTQ(x) \
+ ((x) << S_FW_RSS_VI_CONFIG_CMD_DEFAULTQ)
+#define G_FW_RSS_VI_CONFIG_CMD_DEFAULTQ(x) \
+ (((x) >> S_FW_RSS_VI_CONFIG_CMD_DEFAULTQ) & \
+ M_FW_RSS_VI_CONFIG_CMD_DEFAULTQ)
+
+#define S_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN 4
+#define M_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN 0x1
+#define V_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN(x) \
+ ((x) << S_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN)
+#define G_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN(x) \
+ (((x) >> S_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN) & \
+ M_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN)
+#define F_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN \
+ V_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN(1U)
+
+#define S_FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN 3
+#define M_FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN 0x1
+#define V_FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN(x) \
+ ((x) << S_FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN)
+#define G_FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN(x) \
+ (((x) >> S_FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN) & \
+ M_FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN)
+#define F_FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN \
+ V_FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN(1U)
+
+#define S_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN 2
+#define M_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN 0x1
+#define V_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN(x) \
+ ((x) << S_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN)
+#define G_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN(x) \
+ (((x) >> S_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN) & \
+ M_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN)
+#define F_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN \
+ V_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN(1U)
+
+#define S_FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN 1
+#define M_FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN 0x1
+#define V_FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN(x) \
+ ((x) << S_FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN)
+#define G_FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN(x) \
+ (((x) >> S_FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN) & \
+ M_FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN)
+#define F_FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN \
+ V_FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN(1U)
+
+#define S_FW_RSS_VI_CONFIG_CMD_UDPEN 0
+#define M_FW_RSS_VI_CONFIG_CMD_UDPEN 0x1
+#define V_FW_RSS_VI_CONFIG_CMD_UDPEN(x) ((x) << S_FW_RSS_VI_CONFIG_CMD_UDPEN)
+#define G_FW_RSS_VI_CONFIG_CMD_UDPEN(x) \
+ (((x) >> S_FW_RSS_VI_CONFIG_CMD_UDPEN) & M_FW_RSS_VI_CONFIG_CMD_UDPEN)
+#define F_FW_RSS_VI_CONFIG_CMD_UDPEN V_FW_RSS_VI_CONFIG_CMD_UDPEN(1U)
+
+enum fw_sched_sc {
+ FW_SCHED_SC_CONFIG = 0,
+ FW_SCHED_SC_PARAMS = 1,
+};
+
+enum fw_sched_type {
+ FW_SCHED_TYPE_PKTSCHED = 0,
+ FW_SCHED_TYPE_STREAMSCHED = 1,
+};
+
+enum fw_sched_params_level {
+ FW_SCHED_PARAMS_LEVEL_CL_RL = 0,
+ FW_SCHED_PARAMS_LEVEL_CL_WRR = 1,
+ FW_SCHED_PARAMS_LEVEL_CH_RL = 2,
+ FW_SCHED_PARAMS_LEVEL_CH_WRR = 3,
+};
+
+enum fw_sched_params_mode {
+ FW_SCHED_PARAMS_MODE_CLASS = 0,
+ FW_SCHED_PARAMS_MODE_FLOW = 1,
+};
+
+enum fw_sched_params_unit {
+ FW_SCHED_PARAMS_UNIT_BITRATE = 0,
+ FW_SCHED_PARAMS_UNIT_PKTRATE = 1,
+};
+
+enum fw_sched_params_rate {
+ FW_SCHED_PARAMS_RATE_REL = 0,
+ FW_SCHED_PARAMS_RATE_ABS = 1,
+};
+
+struct fw_sched_cmd {
+ __be32 op_to_write;
+ __be32 retval_len16;
+ union fw_sched {
+ struct fw_sched_config {
+ __u8 sc;
+ __u8 type;
+ __u8 minmaxen;
+ __u8 r3[5];
+ } config;
+ struct fw_sched_params {
+ __u8 sc;
+ __u8 type;
+ __u8 level;
+ __u8 mode;
+ __u8 unit;
+ __u8 rate;
+ __u8 ch;
+ __u8 cl;
+ __be32 min;
+ __be32 max;
+ __be16 weight;
+ __be16 pktsize;
+ __be32 r4;
+ } params;
+ } u;
+};
+
+/*
+ * length of the formatting string
+ */
+#define FW_DEVLOG_FMT_LEN 192
+
+/*
+ * maximum number of the formatting string parameters
+ */
+#define FW_DEVLOG_FMT_PARAMS_NUM 8
+
+/*
+ * priority levels
+ */
+enum fw_devlog_level {
+ FW_DEVLOG_LEVEL_EMERG = 0x0,
+ FW_DEVLOG_LEVEL_CRIT = 0x1,
+ FW_DEVLOG_LEVEL_ERR = 0x2,
+ FW_DEVLOG_LEVEL_NOTICE = 0x3,
+ FW_DEVLOG_LEVEL_INFO = 0x4,
+ FW_DEVLOG_LEVEL_DEBUG = 0x5,
+ FW_DEVLOG_LEVEL_MAX = 0x5,
+};
+
+/*
+ * facilities that may send a log message
+ */
+enum fw_devlog_facility {
+ FW_DEVLOG_FACILITY_CORE = 0x00,
+ FW_DEVLOG_FACILITY_SCHED = 0x02,
+ FW_DEVLOG_FACILITY_TIMER = 0x04,
+ FW_DEVLOG_FACILITY_RES = 0x06,
+ FW_DEVLOG_FACILITY_HW = 0x08,
+ FW_DEVLOG_FACILITY_FLR = 0x10,
+ FW_DEVLOG_FACILITY_DMAQ = 0x12,
+ FW_DEVLOG_FACILITY_PHY = 0x14,
+ FW_DEVLOG_FACILITY_MAC = 0x16,
+ FW_DEVLOG_FACILITY_PORT = 0x18,
+ FW_DEVLOG_FACILITY_VI = 0x1A,
+ FW_DEVLOG_FACILITY_FILTER = 0x1C,
+ FW_DEVLOG_FACILITY_ACL = 0x1E,
+ FW_DEVLOG_FACILITY_TM = 0x20,
+ FW_DEVLOG_FACILITY_QFC = 0x22,
+ FW_DEVLOG_FACILITY_DCB = 0x24,
+ FW_DEVLOG_FACILITY_ETH = 0x26,
+ FW_DEVLOG_FACILITY_OFLD = 0x28,
+ FW_DEVLOG_FACILITY_RI = 0x2A,
+ FW_DEVLOG_FACILITY_ISCSI = 0x2C,
+ FW_DEVLOG_FACILITY_FCOE = 0x2E,
+ FW_DEVLOG_FACILITY_FOISCSI = 0x30,
+ FW_DEVLOG_FACILITY_FOFCOE = 0x32,
+ FW_DEVLOG_FACILITY_MAX = 0x32,
+};
+
+/*
+ * log message format
+ */
+struct fw_devlog_e {
+ __be64 timestamp;
+ __be32 seqno;
+ __be16 reserved1;
+ __u8 level;
+ __u8 facility;
+ __u8 fmt[FW_DEVLOG_FMT_LEN];
+ __be32 params[FW_DEVLOG_FMT_PARAMS_NUM];
+ __be32 reserved3[4];
+};
+
+struct fw_devlog_cmd {
+ __be32 op_to_write;
+ __be32 retval_len16;
+ __u8 level;
+ __u8 r2[7];
+ __be32 memtype_devlog_memaddr16_devlog;
+ __be32 memsize_devlog;
+ __be32 r3[2];
+};
+
+#define S_FW_DEVLOG_CMD_MEMTYPE_DEVLOG 28
+#define M_FW_DEVLOG_CMD_MEMTYPE_DEVLOG 0xf
+#define V_FW_DEVLOG_CMD_MEMTYPE_DEVLOG(x) \
+ ((x) << S_FW_DEVLOG_CMD_MEMTYPE_DEVLOG)
+#define G_FW_DEVLOG_CMD_MEMTYPE_DEVLOG(x) \
+ (((x) >> S_FW_DEVLOG_CMD_MEMTYPE_DEVLOG) & M_FW_DEVLOG_CMD_MEMTYPE_DEVLOG)
+
+#define S_FW_DEVLOG_CMD_MEMADDR16_DEVLOG 0
+#define M_FW_DEVLOG_CMD_MEMADDR16_DEVLOG 0xfffffff
+#define V_FW_DEVLOG_CMD_MEMADDR16_DEVLOG(x) \
+ ((x) << S_FW_DEVLOG_CMD_MEMADDR16_DEVLOG)
+#define G_FW_DEVLOG_CMD_MEMADDR16_DEVLOG(x) \
+ (((x) >> S_FW_DEVLOG_CMD_MEMADDR16_DEVLOG) & \
+ M_FW_DEVLOG_CMD_MEMADDR16_DEVLOG)
+
+struct fw_netif_cmd {
+ __be32 op_to_ipv4gw;
+ __be32 retval_len16;
+ __be32 netifi_ifadridx;
+ __be32 portid_to_mtuval;
+ __be32 gwaddr;
+ __be32 addr;
+ __be32 nmask;
+ __be32 bcaddr;
+};
+
+#define S_FW_NETIF_CMD_ADD 20
+#define M_FW_NETIF_CMD_ADD 0x1
+#define V_FW_NETIF_CMD_ADD(x) ((x) << S_FW_NETIF_CMD_ADD)
+#define G_FW_NETIF_CMD_ADD(x) \
+ (((x) >> S_FW_NETIF_CMD_ADD) & M_FW_NETIF_CMD_ADD)
+#define F_FW_NETIF_CMD_ADD V_FW_NETIF_CMD_ADD(1U)
+
+#define S_FW_NETIF_CMD_LINK 19
+#define M_FW_NETIF_CMD_LINK 0x1
+#define V_FW_NETIF_CMD_LINK(x) ((x) << S_FW_NETIF_CMD_LINK)
+#define G_FW_NETIF_CMD_LINK(x) \
+ (((x) >> S_FW_NETIF_CMD_LINK) & M_FW_NETIF_CMD_LINK)
+#define F_FW_NETIF_CMD_LINK V_FW_NETIF_CMD_LINK(1U)
+
+#define S_FW_NETIF_CMD_VLAN 18
+#define M_FW_NETIF_CMD_VLAN 0x1
+#define V_FW_NETIF_CMD_VLAN(x) ((x) << S_FW_NETIF_CMD_VLAN)
+#define G_FW_NETIF_CMD_VLAN(x) \
+ (((x) >> S_FW_NETIF_CMD_VLAN) & M_FW_NETIF_CMD_VLAN)
+#define F_FW_NETIF_CMD_VLAN V_FW_NETIF_CMD_VLAN(1U)
+
+#define S_FW_NETIF_CMD_MTU 17
+#define M_FW_NETIF_CMD_MTU 0x1
+#define V_FW_NETIF_CMD_MTU(x) ((x) << S_FW_NETIF_CMD_MTU)
+#define G_FW_NETIF_CMD_MTU(x) \
+ (((x) >> S_FW_NETIF_CMD_MTU) & M_FW_NETIF_CMD_MTU)
+#define F_FW_NETIF_CMD_MTU V_FW_NETIF_CMD_MTU(1U)
+
+#define S_FW_NETIF_CMD_DHCP 16
+#define M_FW_NETIF_CMD_DHCP 0x1
+#define V_FW_NETIF_CMD_DHCP(x) ((x) << S_FW_NETIF_CMD_DHCP)
+#define G_FW_NETIF_CMD_DHCP(x) \
+ (((x) >> S_FW_NETIF_CMD_DHCP) & M_FW_NETIF_CMD_DHCP)
+#define F_FW_NETIF_CMD_DHCP V_FW_NETIF_CMD_DHCP(1U)
+
+#define S_FW_NETIF_CMD_IPV4BCADDR 15
+#define M_FW_NETIF_CMD_IPV4BCADDR 0x1
+#define V_FW_NETIF_CMD_IPV4BCADDR(x) ((x) << S_FW_NETIF_CMD_IPV4BCADDR)
+#define G_FW_NETIF_CMD_IPV4BCADDR(x) \
+ (((x) >> S_FW_NETIF_CMD_IPV4BCADDR) & M_FW_NETIF_CMD_IPV4BCADDR)
+#define F_FW_NETIF_CMD_IPV4BCADDR V_FW_NETIF_CMD_IPV4BCADDR(1U)
+
+#define S_FW_NETIF_CMD_IPV4NMASK 14
+#define M_FW_NETIF_CMD_IPV4NMASK 0x1
+#define V_FW_NETIF_CMD_IPV4NMASK(x) ((x) << S_FW_NETIF_CMD_IPV4NMASK)
+#define G_FW_NETIF_CMD_IPV4NMASK(x) \
+ (((x) >> S_FW_NETIF_CMD_IPV4NMASK) & M_FW_NETIF_CMD_IPV4NMASK)
+#define F_FW_NETIF_CMD_IPV4NMASK V_FW_NETIF_CMD_IPV4NMASK(1U)
+
+#define S_FW_NETIF_CMD_IPV4ADDR 13
+#define M_FW_NETIF_CMD_IPV4ADDR 0x1
+#define V_FW_NETIF_CMD_IPV4ADDR(x) ((x) << S_FW_NETIF_CMD_IPV4ADDR)
+#define G_FW_NETIF_CMD_IPV4ADDR(x) \
+ (((x) >> S_FW_NETIF_CMD_IPV4ADDR) & M_FW_NETIF_CMD_IPV4ADDR)
+#define F_FW_NETIF_CMD_IPV4ADDR V_FW_NETIF_CMD_IPV4ADDR(1U)
+
+#define S_FW_NETIF_CMD_IPV4GW 12
+#define M_FW_NETIF_CMD_IPV4GW 0x1
+#define V_FW_NETIF_CMD_IPV4GW(x) ((x) << S_FW_NETIF_CMD_IPV4GW)
+#define G_FW_NETIF_CMD_IPV4GW(x) \
+ (((x) >> S_FW_NETIF_CMD_IPV4GW) & M_FW_NETIF_CMD_IPV4GW)
+#define F_FW_NETIF_CMD_IPV4GW V_FW_NETIF_CMD_IPV4GW(1U)
+
+#define S_FW_NETIF_CMD_NETIFI 8
+#define M_FW_NETIF_CMD_NETIFI 0xffffff
+#define V_FW_NETIF_CMD_NETIFI(x) ((x) << S_FW_NETIF_CMD_NETIFI)
+#define G_FW_NETIF_CMD_NETIFI(x) \
+ (((x) >> S_FW_NETIF_CMD_NETIFI) & M_FW_NETIF_CMD_NETIFI)
+
+#define S_FW_NETIF_CMD_IFADRIDX 0
+#define M_FW_NETIF_CMD_IFADRIDX 0xff
+#define V_FW_NETIF_CMD_IFADRIDX(x) ((x) << S_FW_NETIF_CMD_IFADRIDX)
+#define G_FW_NETIF_CMD_IFADRIDX(x) \
+ (((x) >> S_FW_NETIF_CMD_IFADRIDX) & M_FW_NETIF_CMD_IFADRIDX)
+
+#define S_FW_NETIF_CMD_PORTID 28
+#define M_FW_NETIF_CMD_PORTID 0xf
+#define V_FW_NETIF_CMD_PORTID(x) ((x) << S_FW_NETIF_CMD_PORTID)
+#define G_FW_NETIF_CMD_PORTID(x) \
+ (((x) >> S_FW_NETIF_CMD_PORTID) & M_FW_NETIF_CMD_PORTID)
+
+#define S_FW_NETIF_CMD_VLANID 16
+#define M_FW_NETIF_CMD_VLANID 0xfff
+#define V_FW_NETIF_CMD_VLANID(x) ((x) << S_FW_NETIF_CMD_VLANID)
+#define G_FW_NETIF_CMD_VLANID(x) \
+ (((x) >> S_FW_NETIF_CMD_VLANID) & M_FW_NETIF_CMD_VLANID)
+
+#define S_FW_NETIF_CMD_MTUVAL 0
+#define M_FW_NETIF_CMD_MTUVAL 0xffff
+#define V_FW_NETIF_CMD_MTUVAL(x) ((x) << S_FW_NETIF_CMD_MTUVAL)
+#define G_FW_NETIF_CMD_MTUVAL(x) \
+ (((x) >> S_FW_NETIF_CMD_MTUVAL) & M_FW_NETIF_CMD_MTUVAL)
+
+enum fw_watchdog_actions {
+ FW_WATCHDOG_ACTION_FLR = 0x1,
+ FW_WATCHDOG_ACTION_BYPASS = 0x2,
+};
+
+#define FW_WATCHDOG_MAX_TIMEOUT_SECS 60
+
+struct fw_watchdog_cmd {
+ __be32 op_to_write;
+ __be32 retval_len16;
+ __be32 timeout;
+ __be32 actions;
+};
+
+struct fw_clip_cmd {
+ __be32 op_to_write;
+ __be32 alloc_to_len16;
+ __be64 ip_hi;
+ __be64 ip_lo;
+ __be32 r4[2];
+};
+
+#define S_FW_CLIP_CMD_ALLOC 31
+#define M_FW_CLIP_CMD_ALLOC 0x1
+#define V_FW_CLIP_CMD_ALLOC(x) ((x) << S_FW_CLIP_CMD_ALLOC)
+#define G_FW_CLIP_CMD_ALLOC(x) \
+ (((x) >> S_FW_CLIP_CMD_ALLOC) & M_FW_CLIP_CMD_ALLOC)
+#define F_FW_CLIP_CMD_ALLOC V_FW_CLIP_CMD_ALLOC(1U)
+
+#define S_FW_CLIP_CMD_FREE 30
+#define M_FW_CLIP_CMD_FREE 0x1
+#define V_FW_CLIP_CMD_FREE(x) ((x) << S_FW_CLIP_CMD_FREE)
+#define G_FW_CLIP_CMD_FREE(x) \
+ (((x) >> S_FW_CLIP_CMD_FREE) & M_FW_CLIP_CMD_FREE)
+#define F_FW_CLIP_CMD_FREE V_FW_CLIP_CMD_FREE(1U)
+
+enum fw_error_type {
+ FW_ERROR_TYPE_EXCEPTION = 0x0,
+ FW_ERROR_TYPE_HWMODULE = 0x1,
+ FW_ERROR_TYPE_WR = 0x2,
+ FW_ERROR_TYPE_ACL = 0x3,
+};
+
+struct fw_error_cmd {
+ __be32 op_to_type;
+ __be32 len16_pkd;
+ union fw_error {
+ struct fw_error_exception {
+ __be32 info[6];
+ } exception;
+ struct fw_error_hwmodule {
+ __be32 regaddr;
+ __be32 regval;
+ } hwmodule;
+ struct fw_error_wr {
+ __be16 cidx;
+ __be16 pfn_vfn;
+ __be32 eqid;
+ __u8 wrhdr[16];
+ } wr;
+ struct fw_error_acl {
+ __be16 cidx;
+ __be16 pfn_vfn;
+ __be32 eqid;
+ __be16 mv_pkd;
+ __u8 val[6];
+ __be64 r4;
+ } acl;
+ } u;
+};
+
+#define S_FW_ERROR_CMD_FATAL 4
+#define M_FW_ERROR_CMD_FATAL 0x1
+#define V_FW_ERROR_CMD_FATAL(x) ((x) << S_FW_ERROR_CMD_FATAL)
+#define G_FW_ERROR_CMD_FATAL(x) \
+ (((x) >> S_FW_ERROR_CMD_FATAL) & M_FW_ERROR_CMD_FATAL)
+#define F_FW_ERROR_CMD_FATAL V_FW_ERROR_CMD_FATAL(1U)
+
+#define S_FW_ERROR_CMD_TYPE 0
+#define M_FW_ERROR_CMD_TYPE 0xf
+#define V_FW_ERROR_CMD_TYPE(x) ((x) << S_FW_ERROR_CMD_TYPE)
+#define G_FW_ERROR_CMD_TYPE(x) \
+ (((x) >> S_FW_ERROR_CMD_TYPE) & M_FW_ERROR_CMD_TYPE)
+
+#define S_FW_ERROR_CMD_PFN 8
+#define M_FW_ERROR_CMD_PFN 0x7
+#define V_FW_ERROR_CMD_PFN(x) ((x) << S_FW_ERROR_CMD_PFN)
+#define G_FW_ERROR_CMD_PFN(x) \
+ (((x) >> S_FW_ERROR_CMD_PFN) & M_FW_ERROR_CMD_PFN)
+
+#define S_FW_ERROR_CMD_VFN 0
+#define M_FW_ERROR_CMD_VFN 0xff
+#define V_FW_ERROR_CMD_VFN(x) ((x) << S_FW_ERROR_CMD_VFN)
+#define G_FW_ERROR_CMD_VFN(x) \
+ (((x) >> S_FW_ERROR_CMD_VFN) & M_FW_ERROR_CMD_VFN)
+
+#define S_FW_ERROR_CMD_PFN 8
+#define M_FW_ERROR_CMD_PFN 0x7
+#define V_FW_ERROR_CMD_PFN(x) ((x) << S_FW_ERROR_CMD_PFN)
+#define G_FW_ERROR_CMD_PFN(x) \
+ (((x) >> S_FW_ERROR_CMD_PFN) & M_FW_ERROR_CMD_PFN)
+
+#define S_FW_ERROR_CMD_VFN 0
+#define M_FW_ERROR_CMD_VFN 0xff
+#define V_FW_ERROR_CMD_VFN(x) ((x) << S_FW_ERROR_CMD_VFN)
+#define G_FW_ERROR_CMD_VFN(x) \
+ (((x) >> S_FW_ERROR_CMD_VFN) & M_FW_ERROR_CMD_VFN)
+
+#define S_FW_ERROR_CMD_MV 15
+#define M_FW_ERROR_CMD_MV 0x1
+#define V_FW_ERROR_CMD_MV(x) ((x) << S_FW_ERROR_CMD_MV)
+#define G_FW_ERROR_CMD_MV(x) \
+ (((x) >> S_FW_ERROR_CMD_MV) & M_FW_ERROR_CMD_MV)
+#define F_FW_ERROR_CMD_MV V_FW_ERROR_CMD_MV(1U)
+
+struct fw_debug_cmd {
+ __be32 op_type;
+ __be32 len16_pkd;
+ union fw_debug {
+ struct fw_debug_assert {
+ __be32 fcid;
+ __be32 line;
+ __be32 x;
+ __be32 y;
+ __u8 filename_0_7[8];
+ __u8 filename_8_15[8];
+ __be64 r3;
+ } assert;
+ struct fw_debug_prt {
+ __be16 dprtstridx;
+ __be16 r3[3];
+ __be32 dprtstrparam0;
+ __be32 dprtstrparam1;
+ __be32 dprtstrparam2;
+ __be32 dprtstrparam3;
+ } prt;
+ } u;
+};
+
+#define S_FW_DEBUG_CMD_TYPE 0
+#define M_FW_DEBUG_CMD_TYPE 0xff
+#define V_FW_DEBUG_CMD_TYPE(x) ((x) << S_FW_DEBUG_CMD_TYPE)
+#define G_FW_DEBUG_CMD_TYPE(x) \
+ (((x) >> S_FW_DEBUG_CMD_TYPE) & M_FW_DEBUG_CMD_TYPE)
+
+
+/******************************************************************************
+ * P C I E F W R E G I S T E R
+ **************************************/
+
+/**
+ * Register definitions for the PCIE_FW register which the firmware uses
+ * to retain status across RESETs. This register should be considered
+ * as a READ-ONLY register for Host Software and only to be used to
+ * track firmware initialization/error state, etc.
+ */
+#define S_PCIE_FW_ERR 31
+#define M_PCIE_FW_ERR 0x1
+#define V_PCIE_FW_ERR(x) ((x) << S_PCIE_FW_ERR)
+#define G_PCIE_FW_ERR(x) (((x) >> S_PCIE_FW_ERR) & M_PCIE_FW_ERR)
+#define F_PCIE_FW_ERR V_PCIE_FW_ERR(1U)
+
+#define S_PCIE_FW_INIT 30
+#define M_PCIE_FW_INIT 0x1
+#define V_PCIE_FW_INIT(x) ((x) << S_PCIE_FW_INIT)
+#define G_PCIE_FW_INIT(x) (((x) >> S_PCIE_FW_INIT) & M_PCIE_FW_INIT)
+#define F_PCIE_FW_INIT V_PCIE_FW_INIT(1U)
+
+#define S_PCIE_FW_HALT 29
+#define M_PCIE_FW_HALT 0x1
+#define V_PCIE_FW_HALT(x) ((x) << S_PCIE_FW_HALT)
+#define G_PCIE_FW_HALT(x) (((x) >> S_PCIE_FW_HALT) & M_PCIE_FW_HALT)
+#define F_PCIE_FW_HALT V_PCIE_FW_HALT(1U)
+
+#define S_PCIE_FW_STAGE 21
+#define M_PCIE_FW_STAGE 0x7
+#define V_PCIE_FW_STAGE(x) ((x) << S_PCIE_FW_STAGE)
+#define G_PCIE_FW_STAGE(x) (((x) >> S_PCIE_FW_STAGE) & M_PCIE_FW_STAGE)
+
+#define S_PCIE_FW_ASYNCNOT_VLD 20
+#define M_PCIE_FW_ASYNCNOT_VLD 0x1
+#define V_PCIE_FW_ASYNCNOT_VLD(x) \
+ ((x) << S_PCIE_FW_ASYNCNOT_VLD)
+#define G_PCIE_FW_ASYNCNOT_VLD(x) \
+ (((x) >> S_PCIE_FW_ASYNCNOT_VLD) & M_PCIE_FW_ASYNCNOT_VLD)
+#define F_PCIE_FW_ASYNCNOT_VLD V_PCIE_FW_ASYNCNOT_VLD(1U)
+
+#define S_PCIE_FW_ASYNCNOTINT 19
+#define M_PCIE_FW_ASYNCNOTINT 0x1
+#define V_PCIE_FW_ASYNCNOTINT(x) \
+ ((x) << S_PCIE_FW_ASYNCNOTINT)
+#define G_PCIE_FW_ASYNCNOTINT(x) \
+ (((x) >> S_PCIE_FW_ASYNCNOTINT) & M_PCIE_FW_ASYNCNOTINT)
+#define F_PCIE_FW_ASYNCNOTINT V_PCIE_FW_ASYNCNOTINT(1U)
+
+#define S_PCIE_FW_ASYNCNOT 16
+#define M_PCIE_FW_ASYNCNOT 0x7
+#define V_PCIE_FW_ASYNCNOT(x) ((x) << S_PCIE_FW_ASYNCNOT)
+#define G_PCIE_FW_ASYNCNOT(x) \
+ (((x) >> S_PCIE_FW_ASYNCNOT) & M_PCIE_FW_ASYNCNOT)
+
+#define S_PCIE_FW_MASTER_VLD 15
+#define M_PCIE_FW_MASTER_VLD 0x1
+#define V_PCIE_FW_MASTER_VLD(x) ((x) << S_PCIE_FW_MASTER_VLD)
+#define G_PCIE_FW_MASTER_VLD(x) \
+ (((x) >> S_PCIE_FW_MASTER_VLD) & M_PCIE_FW_MASTER_VLD)
+#define F_PCIE_FW_MASTER_VLD V_PCIE_FW_MASTER_VLD(1U)
+
+#define S_PCIE_FW_MASTER 12
+#define M_PCIE_FW_MASTER 0x7
+#define V_PCIE_FW_MASTER(x) ((x) << S_PCIE_FW_MASTER)
+#define G_PCIE_FW_MASTER(x) (((x) >> S_PCIE_FW_MASTER) & M_PCIE_FW_MASTER)
+
+#define S_PCIE_FW_RESET_VLD 11
+#define M_PCIE_FW_RESET_VLD 0x1
+#define V_PCIE_FW_RESET_VLD(x) ((x) << S_PCIE_FW_RESET_VLD)
+#define G_PCIE_FW_RESET_VLD(x) \
+ (((x) >> S_PCIE_FW_RESET_VLD) & M_PCIE_FW_RESET_VLD)
+#define F_PCIE_FW_RESET_VLD V_PCIE_FW_RESET_VLD(1U)
+
+#define S_PCIE_FW_RESET 8
+#define M_PCIE_FW_RESET 0x7
+#define V_PCIE_FW_RESET(x) ((x) << S_PCIE_FW_RESET)
+#define G_PCIE_FW_RESET(x) \
+ (((x) >> S_PCIE_FW_RESET) & M_PCIE_FW_RESET)
+
+#define S_PCIE_FW_REGISTERED 0
+#define M_PCIE_FW_REGISTERED 0xff
+#define V_PCIE_FW_REGISTERED(x) ((x) << S_PCIE_FW_REGISTERED)
+#define G_PCIE_FW_REGISTERED(x) \
+ (((x) >> S_PCIE_FW_REGISTERED) & M_PCIE_FW_REGISTERED)
+
+
+/******************************************************************************
+ * B I N A R Y H E A D E R F O R M A T
+ **********************************************/
+
+/*
+ * firmware binary header format
+ */
+struct fw_hdr {
+ __u8 ver;
+ __u8 chip; /* terminator chip family */
+ __be16 len512; /* bin length in units of 512-bytes */
+ __be32 fw_ver; /* firmware version */
+ __be32 tp_microcode_ver; /* tcp processor microcode version */
+ __u8 intfver_nic;
+ __u8 intfver_vnic;
+ __u8 intfver_ofld;
+ __u8 intfver_ri;
+ __u8 intfver_iscsipdu;
+ __u8 intfver_iscsi;
+ __u8 intfver_fcoe;
+ __u8 reserved2;
+ __u32 reserved3;
+ __u32 reserved4;
+ __u32 reserved5;
+ __be32 flags;
+ __be32 reserved6[23];
+};
+
+enum fw_hdr_chip {
+ FW_HDR_CHIP_T4,
+ FW_HDR_CHIP_T5
+};
+
+#define S_FW_HDR_FW_VER_MAJOR 24
+#define M_FW_HDR_FW_VER_MAJOR 0xff
+#define V_FW_HDR_FW_VER_MAJOR(x) \
+ ((x) << S_FW_HDR_FW_VER_MAJOR)
+#define G_FW_HDR_FW_VER_MAJOR(x) \
+ (((x) >> S_FW_HDR_FW_VER_MAJOR) & M_FW_HDR_FW_VER_MAJOR)
+
+#define S_FW_HDR_FW_VER_MINOR 16
+#define M_FW_HDR_FW_VER_MINOR 0xff
+#define V_FW_HDR_FW_VER_MINOR(x) \
+ ((x) << S_FW_HDR_FW_VER_MINOR)
+#define G_FW_HDR_FW_VER_MINOR(x) \
+ (((x) >> S_FW_HDR_FW_VER_MINOR) & M_FW_HDR_FW_VER_MINOR)
+
+#define S_FW_HDR_FW_VER_MICRO 8
+#define M_FW_HDR_FW_VER_MICRO 0xff
+#define V_FW_HDR_FW_VER_MICRO(x) \
+ ((x) << S_FW_HDR_FW_VER_MICRO)
+#define G_FW_HDR_FW_VER_MICRO(x) \
+ (((x) >> S_FW_HDR_FW_VER_MICRO) & M_FW_HDR_FW_VER_MICRO)
+
+#define S_FW_HDR_FW_VER_BUILD 0
+#define M_FW_HDR_FW_VER_BUILD 0xff
+#define V_FW_HDR_FW_VER_BUILD(x) \
+ ((x) << S_FW_HDR_FW_VER_BUILD)
+#define G_FW_HDR_FW_VER_BUILD(x) \
+ (((x) >> S_FW_HDR_FW_VER_BUILD) & M_FW_HDR_FW_VER_BUILD)
+
+enum fw_hdr_intfver {
+ FW_HDR_INTFVER_NIC = 0x00,
+ FW_HDR_INTFVER_VNIC = 0x00,
+ FW_HDR_INTFVER_OFLD = 0x00,
+ FW_HDR_INTFVER_RI = 0x00,
+ FW_HDR_INTFVER_ISCSIPDU = 0x00,
+ FW_HDR_INTFVER_ISCSI = 0x00,
+ FW_HDR_INTFVER_FCOE = 0x00,
+};
+
+enum fw_hdr_flags {
+ FW_HDR_FLAGS_RESET_HALT = 0x00000001,
+};
+
+#endif /* _T4FW_INTERFACE_H_ */
diff --git a/sys/dev/cxgbe/offload.h b/sys/dev/cxgbe/offload.h
index f31b840..f6ada9d 100644
--- a/sys/dev/cxgbe/offload.h
+++ b/sys/dev/cxgbe/offload.h
@@ -31,15 +31,18 @@
#ifndef __T4_OFFLOAD_H__
#define __T4_OFFLOAD_H__
-/* CPL message priority levels */
-enum {
- CPL_PRIORITY_DATA = 0, /* data messages */
- CPL_PRIORITY_SETUP = 1, /* connection setup messages */
- CPL_PRIORITY_TEARDOWN = 0, /* connection teardown messages */
- CPL_PRIORITY_LISTEN = 1, /* listen start/stop messages */
- CPL_PRIORITY_ACK = 1, /* RX ACK messages */
- CPL_PRIORITY_CONTROL = 1 /* control messages */
-};
+/* XXX: flagrant misuse of mbuf fields (during tx by TOM) */
+#define MBUF_EQ(m) (*((void **)(&(m)->m_pkthdr.rcvif)))
+/* These have to work for !M_PKTHDR so we use a field from m_hdr. */
+#define MBUF_TX_CREDITS(m) ((m)->m_hdr.pad[0])
+#define MBUF_DMA_MAPPED(m) ((m)->m_hdr.pad[1])
+
+#define INIT_ULPTX_WR(w, wrlen, atomic, tid) do { \
+ (w)->wr.wr_hi = htonl(V_FW_WR_OP(FW_ULPTX_WR) | V_FW_WR_ATOMIC(atomic)); \
+ (w)->wr.wr_mid = htonl(V_FW_WR_LEN16(DIV_ROUND_UP(wrlen, 16)) | \
+ V_FW_WR_FLOWID(tid)); \
+ (w)->wr.wr_lo = cpu_to_be64(0); \
+} while (0)
#define INIT_TP_WR(w, tid) do { \
(w)->wr.wr_hi = htonl(V_FW_WR_OP(FW_TP_WR) | \
@@ -49,13 +52,19 @@ enum {
(w)->wr.wr_lo = cpu_to_be64(0); \
} while (0)
+#define INIT_TP_WR_MIT_CPL(w, cpl, tid) do { \
+ INIT_TP_WR(w, tid); \
+ OPCODE_TID(w) = htonl(MK_OPCODE_TID(cpl, tid)); \
+} while (0)
+
/*
* Max # of ATIDs. The absolute HW max is 16K but we keep it lower.
*/
#define MAX_ATIDS 8192U
-struct serv_entry {
+union serv_entry {
void *data;
+ union serv_entry *next;
};
union aopen_entry {
@@ -71,8 +80,7 @@ struct tid_info {
void **tid_tab;
unsigned int ntids;
- struct serv_entry *stid_tab;
- unsigned long *stid_bmap;
+ union serv_entry *stid_tab;
unsigned int nstids;
unsigned int stid_base;
@@ -84,10 +92,15 @@ struct tid_info {
unsigned int ftid_base;
unsigned int ftids_in_use;
+ struct mtx atid_lock;
union aopen_entry *afree;
unsigned int atids_in_use;
+ struct mtx stid_lock;
+ union serv_entry *sfree;
unsigned int stids_in_use;
+
+ unsigned int tids_in_use;
};
struct t4_range {
@@ -101,6 +114,40 @@ struct t4_virt_res { /* virtualized HW resources */
struct t4_range stag;
struct t4_range rq;
struct t4_range pbl;
+ struct t4_range qp;
+ struct t4_range cq;
+ struct t4_range ocq;
};
+#ifndef TCP_OFFLOAD_DISABLE
+enum {
+ ULD_TOM = 1,
+};
+
+struct adapter;
+struct port_info;
+struct uld_info {
+ SLIST_ENTRY(uld_info) link;
+ int refcount;
+ int uld_id;
+ int (*attach)(struct adapter *, void **);
+ int (*detach)(void *);
+};
+
+struct uld_softc {
+ struct uld_info *uld;
+ void *softc;
+};
+
+struct tom_tunables {
+ int sndbuf;
+ int ddp;
+ int indsz;
+ int ddp_thres;
+};
+
+int t4_register_uld(struct uld_info *);
+int t4_unregister_uld(struct uld_info *);
+#endif
+
#endif
diff --git a/sys/dev/cxgbe/osdep.h b/sys/dev/cxgbe/osdep.h
index bde1eb4..40ed61b 100644
--- a/sys/dev/cxgbe/osdep.h
+++ b/sys/dev/cxgbe/osdep.h
@@ -70,9 +70,11 @@ typedef uint64_t __be64;
#error "Must set BYTE_ORDER"
#endif
+#ifndef __bool_true_false_are_defined
typedef boolean_t bool;
#define false FALSE
#define true TRUE
+#endif
#define mdelay(x) DELAY((x) * 1000)
#define udelay(x) DELAY(x)
@@ -122,6 +124,7 @@ typedef boolean_t bool;
#define PCI_EXP_LNKSTA PCIR_EXPRESS_LINK_STA
#define PCI_EXP_LNKSTA_CLS PCIM_LINK_STA_SPEED
#define PCI_EXP_LNKSTA_NLW PCIM_LINK_STA_WIDTH
+#define PCI_EXP_DEVCTL2 0x28
static inline int
ilog2(long x)
diff --git a/sys/dev/cxgbe/t4_ioctl.h b/sys/dev/cxgbe/t4_ioctl.h
index ecc2c3d..2a3fa39 100644
--- a/sys/dev/cxgbe/t4_ioctl.h
+++ b/sys/dev/cxgbe/t4_ioctl.h
@@ -47,6 +47,8 @@ enum {
T4_SET_FILTER, /* program a filter */
T4_DEL_FILTER, /* delete a filter */
T4_GET_SGE_CONTEXT, /* get SGE context for a queue */
+ T4_LOAD_FW, /* flash firmware */
+ T4_GET_MEM, /* read memory */
};
struct t4_reg {
@@ -62,6 +64,11 @@ struct t4_regdump {
uint32_t *data;
};
+struct t4_data {
+ uint32_t len;
+ uint8_t *data;
+};
+
/*
* A hardware filter is some valid combination of these.
*/
@@ -73,8 +80,8 @@ struct t4_regdump {
#define T4_FILTER_IP_DPORT 0x20 /* Destination IP port */
#define T4_FILTER_FCoE 0x40 /* Fibre Channel over Ethernet packet */
#define T4_FILTER_PORT 0x80 /* Physical ingress port */
-#define T4_FILTER_OVLAN 0x100 /* Outer VLAN ID */
-#define T4_FILTER_IVLAN 0x200 /* Inner VLAN ID */
+#define T4_FILTER_VNIC 0x100 /* VNIC id or outer VLAN */
+#define T4_FILTER_VLAN 0x200 /* VLAN ID */
#define T4_FILTER_IP_TOS 0x400 /* IPv4 TOS/IPv6 Traffic Class */
#define T4_FILTER_IP_PROTO 0x800 /* IP protocol */
#define T4_FILTER_ETH_TYPE 0x1000 /* Ethernet Type */
@@ -131,8 +138,8 @@ struct t4_filter_tuple {
* is used to select the global mode and all filters are limited to the
* set of fields allowed by the global mode.
*/
- uint16_t ovlan; /* outer VLAN */
- uint16_t ivlan; /* inner VLAN */
+ uint16_t vnic; /* VNIC id or outer VLAN tag */
+ uint16_t vlan; /* VLAN tag */
uint16_t ethtype; /* Ethernet type */
uint8_t tos; /* TOS/Traffic Type */
uint8_t proto; /* protocol type */
@@ -141,8 +148,8 @@ struct t4_filter_tuple {
uint32_t matchtype:3; /* MPS match type */
uint32_t frag:1; /* fragmentation extension header */
uint32_t macidx:9; /* exact match MAC index */
- uint32_t ivlan_vld:1; /* inner VLAN valid */
- uint32_t ovlan_vld:1; /* outer VLAN valid */
+ uint32_t vlan_vld:1; /* VLAN valid */
+ uint32_t vnic_vld:1; /* VNIC id/outer VLAN tag valid */
};
struct t4_filter_specification {
@@ -199,6 +206,12 @@ struct t4_sge_context {
uint32_t data[T4_SGE_CONTEXT_SIZE / 4];
};
+struct t4_mem_range {
+ uint32_t addr;
+ uint32_t len;
+ uint32_t *data;
+};
+
#define CHELSIO_T4_GETREG _IOWR('f', T4_GETREG, struct t4_reg)
#define CHELSIO_T4_SETREG _IOW('f', T4_SETREG, struct t4_reg)
#define CHELSIO_T4_REGDUMP _IOWR('f', T4_REGDUMP, struct t4_regdump)
@@ -209,4 +222,6 @@ struct t4_sge_context {
#define CHELSIO_T4_DEL_FILTER _IOW('f', T4_DEL_FILTER, struct t4_filter)
#define CHELSIO_T4_GET_SGE_CONTEXT _IOWR('f', T4_GET_SGE_CONTEXT, \
struct t4_sge_context)
+#define CHELSIO_T4_LOAD_FW _IOW('f', T4_LOAD_FW, struct t4_data)
+#define CHELSIO_T4_GET_MEM _IOW('f', T4_GET_MEM, struct t4_mem_range)
#endif
diff --git a/sys/dev/cxgbe/t4_l2t.c b/sys/dev/cxgbe/t4_l2t.c
index 31197b8..be206c1 100644
--- a/sys/dev/cxgbe/t4_l2t.c
+++ b/sys/dev/cxgbe/t4_l2t.c
@@ -37,7 +37,9 @@ __FBSDID("$FreeBSD$");
#include <sys/mutex.h>
#include <sys/rwlock.h>
#include <sys/socket.h>
+#include <sys/sbuf.h>
#include <net/if.h>
+#include <net/if_types.h>
#include <net/ethernet.h>
#include <net/if_vlan_var.h>
#include <net/if_dl.h>
@@ -50,9 +52,26 @@ __FBSDID("$FreeBSD$");
#include "common/common.h"
#include "common/jhash.h"
#include "common/t4_msg.h"
-#include "offload.h"
#include "t4_l2t.h"
+/*
+ * Module locking notes: There is a RW lock protecting the L2 table as a
+ * whole plus a spinlock per L2T entry. Entry lookups and allocations happen
+ * under the protection of the table lock, individual entry changes happen
+ * while holding that entry's spinlock. The table lock nests outside the
+ * entry locks. Allocations of new entries take the table lock as writers so
+ * no other lookups can happen while allocating new entries. Entry updates
+ * take the table lock as readers so multiple entries can be updated in
+ * parallel. An L2T entry can be dropped by decrementing its reference count
+ * and therefore can happen in parallel with entry allocation but no entry
+ * can change state or increment its ref count during allocation as both of
+ * these perform lookups.
+ *
+ * Note: We do not take refereces to ifnets in this module because both
+ * the TOE and the sockets already hold references to the interfaces and the
+ * lifetime of an L2T entry is fully contained in the lifetime of the TOE.
+ */
+
/* identifies sync vs async L2T_WRITE_REQs */
#define S_SYNC_WR 12
#define V_SYNC_WR(x) ((x) << S_SYNC_WR)
@@ -76,34 +95,251 @@ struct l2t_data {
struct l2t_entry l2tab[L2T_SIZE];
};
+static int do_l2t_write_rpl(struct sge_iq *, const struct rss_header *,
+ struct mbuf *);
+
+#define VLAN_NONE 0xfff
+#define SA(x) ((struct sockaddr *)(x))
+#define SIN(x) ((struct sockaddr_in *)(x))
+#define SINADDR(x) (SIN(x)->sin_addr.s_addr)
+
/*
- * Module locking notes: There is a RW lock protecting the L2 table as a
- * whole plus a spinlock per L2T entry. Entry lookups and allocations happen
- * under the protection of the table lock, individual entry changes happen
- * while holding that entry's spinlock. The table lock nests outside the
- * entry locks. Allocations of new entries take the table lock as writers so
- * no other lookups can happen while allocating new entries. Entry updates
- * take the table lock as readers so multiple entries can be updated in
- * parallel. An L2T entry can be dropped by decrementing its reference count
- * and therefore can happen in parallel with entry allocation but no entry
- * can change state or increment its ref count during allocation as both of
- * these perform lookups.
- *
- * Note: We do not take refereces to ifnets in this module because both
- * the TOE and the sockets already hold references to the interfaces and the
- * lifetime of an L2T entry is fully contained in the lifetime of the TOE.
+ * Allocate a free L2T entry. Must be called with l2t_data.lock held.
*/
+static struct l2t_entry *
+alloc_l2e(struct l2t_data *d)
+{
+ struct l2t_entry *end, *e, **p;
+
+ rw_assert(&d->lock, RA_WLOCKED);
+
+ if (!atomic_load_acq_int(&d->nfree))
+ return (NULL);
+
+ /* there's definitely a free entry */
+ for (e = d->rover, end = &d->l2tab[L2T_SIZE]; e != end; ++e)
+ if (atomic_load_acq_int(&e->refcnt) == 0)
+ goto found;
+
+ for (e = d->l2tab; atomic_load_acq_int(&e->refcnt); ++e) ;
+found:
+ d->rover = e + 1;
+ atomic_subtract_int(&d->nfree, 1);
+
+ /*
+ * The entry we found may be an inactive entry that is
+ * presently in the hash table. We need to remove it.
+ */
+ if (e->state < L2T_STATE_SWITCHING) {
+ for (p = &d->l2tab[e->hash].first; *p; p = &(*p)->next) {
+ if (*p == e) {
+ *p = e->next;
+ e->next = NULL;
+ break;
+ }
+ }
+ }
+
+ e->state = L2T_STATE_UNUSED;
+ return (e);
+}
+
+/*
+ * Write an L2T entry. Must be called with the entry locked.
+ * The write may be synchronous or asynchronous.
+ */
+static int
+write_l2e(struct adapter *sc, struct l2t_entry *e, int sync)
+{
+ struct mbuf *m;
+ struct cpl_l2t_write_req *req;
+
+ mtx_assert(&e->lock, MA_OWNED);
+
+ if ((m = m_gethdr(M_NOWAIT, MT_DATA)) == NULL)
+ return (ENOMEM);
+
+ req = mtod(m, struct cpl_l2t_write_req *);
+ m->m_pkthdr.len = m->m_len = sizeof(*req);
+
+ INIT_TP_WR(req, 0);
+ OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_L2T_WRITE_REQ, e->idx |
+ V_SYNC_WR(sync) | V_TID_QID(sc->sge.fwq.abs_id)));
+ req->params = htons(V_L2T_W_PORT(e->lport) | V_L2T_W_NOREPLY(!sync));
+ req->l2t_idx = htons(e->idx);
+ req->vlan = htons(e->vlan);
+ memcpy(req->dst_mac, e->dmac, sizeof(req->dst_mac));
+
+ t4_mgmt_tx(sc, m);
+
+ if (sync && e->state != L2T_STATE_SWITCHING)
+ e->state = L2T_STATE_SYNC_WRITE;
+
+ return (0);
+}
+
+/*
+ * Allocate an L2T entry for use by a switching rule. Such need to be
+ * explicitly freed and while busy they are not on any hash chain, so normal
+ * address resolution updates do not see them.
+ */
+struct l2t_entry *
+t4_l2t_alloc_switching(struct l2t_data *d)
+{
+ struct l2t_entry *e;
+
+ rw_rlock(&d->lock);
+ e = alloc_l2e(d);
+ if (e) {
+ mtx_lock(&e->lock); /* avoid race with t4_l2t_free */
+ e->state = L2T_STATE_SWITCHING;
+ atomic_store_rel_int(&e->refcnt, 1);
+ mtx_unlock(&e->lock);
+ }
+ rw_runlock(&d->lock);
+ return e;
+}
+
+/*
+ * Sets/updates the contents of a switching L2T entry that has been allocated
+ * with an earlier call to @t4_l2t_alloc_switching.
+ */
+int
+t4_l2t_set_switching(struct adapter *sc, struct l2t_entry *e, uint16_t vlan,
+ uint8_t port, uint8_t *eth_addr)
+{
+ int rc;
+
+ e->vlan = vlan;
+ e->lport = port;
+ memcpy(e->dmac, eth_addr, ETHER_ADDR_LEN);
+ mtx_lock(&e->lock);
+ rc = write_l2e(sc, e, 0);
+ mtx_unlock(&e->lock);
+ return (rc);
+}
+
+int
+t4_init_l2t(struct adapter *sc, int flags)
+{
+ int i;
+ struct l2t_data *d;
+
+ d = malloc(sizeof(*d), M_CXGBE, M_ZERO | flags);
+ if (!d)
+ return (ENOMEM);
+
+ d->rover = d->l2tab;
+ atomic_store_rel_int(&d->nfree, L2T_SIZE);
+ rw_init(&d->lock, "L2T");
+
+ for (i = 0; i < L2T_SIZE; i++) {
+ d->l2tab[i].idx = i;
+ d->l2tab[i].state = L2T_STATE_UNUSED;
+ mtx_init(&d->l2tab[i].lock, "L2T_E", NULL, MTX_DEF);
+ atomic_store_rel_int(&d->l2tab[i].refcnt, 0);
+ }
+
+ sc->l2t = d;
+ t4_register_cpl_handler(sc, CPL_L2T_WRITE_RPL, do_l2t_write_rpl);
+
+ return (0);
+}
+
+int
+t4_free_l2t(struct l2t_data *d)
+{
+ int i;
+
+ for (i = 0; i < L2T_SIZE; i++)
+ mtx_destroy(&d->l2tab[i].lock);
+ rw_destroy(&d->lock);
+ free(d, M_CXGBE);
+
+ return (0);
+}
+
static inline unsigned int
vlan_prio(const struct l2t_entry *e)
{
return e->vlan >> 13;
}
+static char
+l2e_state(const struct l2t_entry *e)
+{
+ switch (e->state) {
+ case L2T_STATE_VALID: return 'V'; /* valid, fast-path entry */
+ case L2T_STATE_STALE: return 'S'; /* needs revalidation, but usable */
+ case L2T_STATE_SYNC_WRITE: return 'W';
+ case L2T_STATE_RESOLVING: return e->arpq_head ? 'A' : 'R';
+ case L2T_STATE_SWITCHING: return 'X';
+ default: return 'U';
+ }
+}
+
+int
+sysctl_l2t(SYSCTL_HANDLER_ARGS)
+{
+ struct adapter *sc = arg1;
+ struct l2t_data *l2t = sc->l2t;
+ struct l2t_entry *e;
+ struct sbuf *sb;
+ int rc, i, header = 0;
+ char ip[60];
+
+ if (l2t == NULL)
+ return (ENXIO);
+
+ rc = sysctl_wire_old_buffer(req, 0);
+ if (rc != 0)
+ return (rc);
+
+ sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req);
+ if (sb == NULL)
+ return (ENOMEM);
+
+ e = &l2t->l2tab[0];
+ for (i = 0; i < L2T_SIZE; i++, e++) {
+ mtx_lock(&e->lock);
+ if (e->state == L2T_STATE_UNUSED)
+ goto skip;
+
+ if (header == 0) {
+ sbuf_printf(sb, " Idx IP address "
+ "Ethernet address VLAN/P LP State Users Port");
+ header = 1;
+ }
+ if (e->state == L2T_STATE_SWITCHING || e->v6)
+ ip[0] = 0;
+ else
+ snprintf(ip, sizeof(ip), "%s",
+ inet_ntoa(*(struct in_addr *)&e->addr[0]));
+
+ /* XXX: accessing lle probably not safe? */
+ sbuf_printf(sb, "\n%4u %-15s %02x:%02x:%02x:%02x:%02x:%02x %4d"
+ " %u %2u %c %5u %s",
+ e->idx, ip, e->dmac[0], e->dmac[1], e->dmac[2],
+ e->dmac[3], e->dmac[4], e->dmac[5],
+ e->vlan & 0xfff, vlan_prio(e), e->lport,
+ l2e_state(e), atomic_load_acq_int(&e->refcnt),
+ e->lle ? e->lle->lle_tbl->llt_ifp->if_xname : "");
+skip:
+ mtx_unlock(&e->lock);
+ }
+
+ rc = sbuf_finish(sb);
+ sbuf_delete(sb);
+
+ return (rc);
+}
+
+#ifndef TCP_OFFLOAD_DISABLE
static inline void
l2t_hold(struct l2t_data *d, struct l2t_entry *e)
{
if (atomic_fetchadd_int(&e->refcnt, 1) == 0) /* 0 -> 1 transition */
- atomic_add_int(&d->nfree, -1);
+ atomic_subtract_int(&d->nfree, 1);
}
/*
@@ -154,38 +390,6 @@ addreq(const struct l2t_entry *e, const uint32_t *addr)
}
/*
- * Write an L2T entry. Must be called with the entry locked (XXX: really?).
- * The write may be synchronous or asynchronous.
- */
-static int
-write_l2e(struct adapter *sc, struct l2t_entry *e, int sync)
-{
- struct mbuf *m;
- struct cpl_l2t_write_req *req;
-
- if ((m = m_gethdr(M_NOWAIT, MT_DATA)) == NULL)
- return (ENOMEM);
-
- req = mtod(m, struct cpl_l2t_write_req *);
- m->m_pkthdr.len = m->m_len = sizeof(*req);
-
- INIT_TP_WR(req, 0);
- OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_L2T_WRITE_REQ, e->idx |
- V_SYNC_WR(sync) | V_TID_QID(sc->sge.fwq.abs_id)));
- req->params = htons(V_L2T_W_PORT(e->lport) | V_L2T_W_NOREPLY(!sync));
- req->l2t_idx = htons(e->idx);
- req->vlan = htons(e->vlan);
- memcpy(req->dst_mac, e->dmac, sizeof(req->dst_mac));
-
- t4_mgmt_tx(sc, m);
-
- if (sync && e->state != L2T_STATE_SWITCHING)
- e->state = L2T_STATE_SYNC_WRITE;
-
- return (0);
-}
-
-/*
* Add a packet to an L2T entry's queue of packets awaiting resolution.
* Must be called with the entry's lock held.
*/
@@ -194,53 +398,133 @@ arpq_enqueue(struct l2t_entry *e, struct mbuf *m)
{
mtx_assert(&e->lock, MA_OWNED);
- m->m_next = NULL;
+ KASSERT(m->m_nextpkt == NULL, ("%s: m_nextpkt not NULL", __func__));
if (e->arpq_head)
- e->arpq_tail->m_next = m;
+ e->arpq_tail->m_nextpkt = m;
else
e->arpq_head = m;
e->arpq_tail = m;
}
-/*
- * Allocate a free L2T entry. Must be called with l2t_data.lock held.
- */
-static struct l2t_entry *
-alloc_l2e(struct l2t_data *d)
+static inline void
+send_pending(struct adapter *sc, struct l2t_entry *e)
{
- struct l2t_entry *end, *e, **p;
+ struct mbuf *m, *next;
- rw_assert(&d->lock, RA_WLOCKED);
+ mtx_assert(&e->lock, MA_OWNED);
- if (!atomic_load_acq_int(&d->nfree))
- return (NULL);
+ for (m = e->arpq_head; m; m = next) {
+ next = m->m_nextpkt;
+ m->m_nextpkt = NULL;
+ t4_wrq_tx(sc, MBUF_EQ(m), m);
+ }
+ e->arpq_head = e->arpq_tail = NULL;
+}
- /* there's definitely a free entry */
- for (e = d->rover, end = &d->l2tab[L2T_SIZE]; e != end; ++e)
- if (atomic_load_acq_int(&e->refcnt) == 0)
- goto found;
+#ifdef INET
+/*
+ * Looks up and fills up an l2t_entry's lle. We grab all the locks that we need
+ * ourself, and update e->state at the end if e->lle was successfully filled.
+ *
+ * The lle passed in comes from arpresolve and is ignored as it does not appear
+ * to be of much use.
+ */
+static int
+l2t_fill_lle(struct adapter *sc, struct l2t_entry *e, struct llentry *unused)
+{
+ int rc = 0;
+ struct sockaddr_in sin;
+ struct ifnet *ifp = e->ifp;
+ struct llentry *lle;
- for (e = d->l2tab; atomic_load_acq_int(&e->refcnt); ++e) ;
-found:
- d->rover = e + 1;
- atomic_add_int(&d->nfree, -1);
+ bzero(&sin, sizeof(struct sockaddr_in));
+ if (e->v6)
+ panic("%s: IPv6 L2 resolution not supported yet.", __func__);
+
+ sin.sin_family = AF_INET;
+ sin.sin_len = sizeof(struct sockaddr_in);
+ memcpy(&sin.sin_addr, e->addr, sizeof(struct sockaddr_in));
+
+ mtx_assert(&e->lock, MA_NOTOWNED);
+ KASSERT(e->addr && ifp, ("%s: bad prep before call", __func__));
+
+ IF_AFDATA_LOCK(ifp);
+ lle = lla_lookup(LLTABLE(ifp), LLE_EXCLUSIVE, SA(&sin));
+ IF_AFDATA_UNLOCK(ifp);
+ if (!LLE_IS_VALID(lle))
+ return (ENOMEM);
+ if (!(lle->la_flags & LLE_VALID)) {
+ rc = EINVAL;
+ goto done;
+ }
+
+ LLE_ADDREF(lle);
+
+ mtx_lock(&e->lock);
+ if (e->state == L2T_STATE_RESOLVING) {
+ KASSERT(e->lle == NULL, ("%s: lle already valid", __func__));
+ e->lle = lle;
+ memcpy(e->dmac, &lle->ll_addr, ETHER_ADDR_LEN);
+ write_l2e(sc, e, 1);
+ } else {
+ KASSERT(e->lle == lle, ("%s: lle changed", __func__));
+ LLE_REMREF(lle);
+ }
+ mtx_unlock(&e->lock);
+done:
+ LLE_WUNLOCK(lle);
+ return (rc);
+}
+#endif
- /*
- * The entry we found may be an inactive entry that is
- * presently in the hash table. We need to remove it.
- */
- if (e->state < L2T_STATE_SWITCHING) {
- for (p = &d->l2tab[e->hash].first; *p; p = &(*p)->next) {
- if (*p == e) {
- *p = e->next;
- e->next = NULL;
- break;
- }
+int
+t4_l2t_send(struct adapter *sc, struct mbuf *m, struct l2t_entry *e)
+{
+#ifndef INET
+ return (EINVAL);
+#else
+ struct llentry *lle = NULL;
+ struct sockaddr_in sin;
+ struct ifnet *ifp = e->ifp;
+
+ if (e->v6)
+ panic("%s: IPv6 L2 resolution not supported yet.", __func__);
+
+ bzero(&sin, sizeof(struct sockaddr_in));
+ sin.sin_family = AF_INET;
+ sin.sin_len = sizeof(struct sockaddr_in);
+ memcpy(&sin.sin_addr, e->addr, sizeof(struct sockaddr_in));
+
+again:
+ switch (e->state) {
+ case L2T_STATE_STALE: /* entry is stale, kick off revalidation */
+ if (arpresolve(ifp, NULL, NULL, SA(&sin), e->dmac, &lle) == 0)
+ l2t_fill_lle(sc, e, lle);
+
+ /* Fall through */
+
+ case L2T_STATE_VALID: /* fast-path, send the packet on */
+ return t4_wrq_tx(sc, MBUF_EQ(m), m);
+
+ case L2T_STATE_RESOLVING:
+ case L2T_STATE_SYNC_WRITE:
+ mtx_lock(&e->lock);
+ if (e->state != L2T_STATE_SYNC_WRITE &&
+ e->state != L2T_STATE_RESOLVING) {
+ /* state changed by the time we got here */
+ mtx_unlock(&e->lock);
+ goto again;
}
+ arpq_enqueue(e, m);
+ mtx_unlock(&e->lock);
+
+ if (e->state == L2T_STATE_RESOLVING &&
+ arpresolve(ifp, NULL, NULL, SA(&sin), e->dmac, &lle) == 0)
+ l2t_fill_lle(sc, e, lle);
}
- e->state = L2T_STATE_UNUSED;
- return e;
+ return (0);
+#endif
}
/*
@@ -287,75 +571,214 @@ t4_l2t_release(struct l2t_entry *e)
t4_l2e_free(e);
}
+static int
+do_l2t_write_rpl(struct sge_iq *iq, const struct rss_header *rss,
+ struct mbuf *m)
+{
+ struct adapter *sc = iq->adapter;
+ const struct cpl_l2t_write_rpl *rpl = (const void *)(rss + 1);
+ unsigned int tid = GET_TID(rpl);
+ unsigned int idx = tid & (L2T_SIZE - 1);
+
+ if (__predict_false(rpl->status != CPL_ERR_NONE)) {
+ log(LOG_ERR,
+ "Unexpected L2T_WRITE_RPL status %u for entry %u\n",
+ rpl->status, idx);
+ return (EINVAL);
+ }
+
+ if (tid & F_SYNC_WR) {
+ struct l2t_entry *e = &sc->l2t->l2tab[idx];
+
+ mtx_lock(&e->lock);
+ if (e->state != L2T_STATE_SWITCHING) {
+ send_pending(sc, e);
+ e->state = L2T_STATE_VALID;
+ }
+ mtx_unlock(&e->lock);
+ }
+
+ return (0);
+}
+
/*
- * Allocate an L2T entry for use by a switching rule. Such need to be
- * explicitly freed and while busy they are not on any hash chain, so normal
- * address resolution updates do not see them.
+ * Reuse an L2T entry that was previously used for the same next hop.
+ */
+static void
+reuse_entry(struct l2t_entry *e)
+{
+ struct llentry *lle;
+
+ mtx_lock(&e->lock); /* avoid race with t4_l2t_free */
+ lle = e->lle;
+ if (lle) {
+ KASSERT(lle->la_flags & LLE_VALID,
+ ("%s: invalid lle stored in l2t_entry", __func__));
+
+ if (lle->la_expire >= time_uptime)
+ e->state = L2T_STATE_STALE;
+ else
+ e->state = L2T_STATE_VALID;
+ } else
+ e->state = L2T_STATE_RESOLVING;
+ mtx_unlock(&e->lock);
+}
+
+/*
+ * The TOE wants an L2 table entry that it can use to reach the next hop over
+ * the specified port. Produce such an entry - create one if needed.
+ *
+ * Note that the ifnet could be a pseudo-device like if_vlan, if_lagg, etc. on
+ * top of the real cxgbe interface.
*/
struct l2t_entry *
-t4_l2t_alloc_switching(struct l2t_data *d)
+t4_l2t_get(struct port_info *pi, struct ifnet *ifp, struct sockaddr *sa)
{
struct l2t_entry *e;
+ struct l2t_data *d = pi->adapter->l2t;
+ int addr_len;
+ uint32_t *addr;
+ int hash;
+ struct sockaddr_in6 *sin6;
+ unsigned int smt_idx = pi->port_id;
+
+ if (sa->sa_family == AF_INET) {
+ addr = (uint32_t *)&SINADDR(sa);
+ addr_len = sizeof(SINADDR(sa));
+ } else if (sa->sa_family == AF_INET6) {
+ sin6 = (struct sockaddr_in6 *)sa;
+ addr = (uint32_t *)&sin6->sin6_addr.s6_addr;
+ addr_len = sizeof(sin6->sin6_addr.s6_addr);
+ } else
+ return (NULL);
- rw_rlock(&d->lock);
+ hash = addr_hash(addr, addr_len, ifp->if_index);
+
+ rw_wlock(&d->lock);
+ for (e = d->l2tab[hash].first; e; e = e->next) {
+ if (!addreq(e, addr) && e->ifp == ifp && e->smt_idx == smt_idx){
+ l2t_hold(d, e);
+ if (atomic_load_acq_int(&e->refcnt) == 1)
+ reuse_entry(e);
+ goto done;
+ }
+ }
+
+ /* Need to allocate a new entry */
e = alloc_l2e(d);
if (e) {
mtx_lock(&e->lock); /* avoid race with t4_l2t_free */
- e->state = L2T_STATE_SWITCHING;
+ e->state = L2T_STATE_RESOLVING;
+ memcpy(e->addr, addr, addr_len);
+ e->ifindex = ifp->if_index;
+ e->smt_idx = smt_idx;
+ e->ifp = ifp;
+ e->hash = hash;
+ e->lport = pi->lport;
+ e->v6 = (addr_len == 16);
+ e->lle = NULL;
atomic_store_rel_int(&e->refcnt, 1);
+ if (ifp->if_type == IFT_L2VLAN)
+ VLAN_TAG(ifp, &e->vlan);
+ else
+ e->vlan = VLAN_NONE;
+ e->next = d->l2tab[hash].first;
+ d->l2tab[hash].first = e;
mtx_unlock(&e->lock);
}
- rw_runlock(&d->lock);
+done:
+ rw_wunlock(&d->lock);
return e;
}
/*
- * Sets/updates the contents of a switching L2T entry that has been allocated
- * with an earlier call to @t4_l2t_alloc_switching.
+ * Called when the host's neighbor layer makes a change to some entry that is
+ * loaded into the HW L2 table.
*/
-int
-t4_l2t_set_switching(struct adapter *sc, struct l2t_entry *e, uint16_t vlan,
- uint8_t port, uint8_t *eth_addr)
+void
+t4_l2t_update(struct adapter *sc, struct llentry *lle)
{
- e->vlan = vlan;
- e->lport = port;
- memcpy(e->dmac, eth_addr, ETHER_ADDR_LEN);
- return write_l2e(sc, e, 0);
-}
+ struct l2t_entry *e;
+ struct l2t_data *d = sc->l2t;
+ struct sockaddr *sa = L3_ADDR(lle);
+ struct llentry *old_lle = NULL;
+ uint32_t *addr = (uint32_t *)&SINADDR(sa);
+ struct ifnet *ifp = lle->lle_tbl->llt_ifp;
+ int hash = addr_hash(addr, sizeof(*addr), ifp->if_index);
+
+ KASSERT(d != NULL, ("%s: no L2 table", __func__));
+ LLE_WLOCK_ASSERT(lle);
+ KASSERT(lle->la_flags & LLE_VALID || lle->la_flags & LLE_DELETED,
+ ("%s: entry neither valid nor deleted.", __func__));
-struct l2t_data *
-t4_init_l2t(int flags)
-{
- int i;
- struct l2t_data *d;
+ rw_rlock(&d->lock);
+ for (e = d->l2tab[hash].first; e; e = e->next) {
+ if (!addreq(e, addr) && e->ifp == ifp) {
+ mtx_lock(&e->lock);
+ if (atomic_load_acq_int(&e->refcnt))
+ goto found;
+ e->state = L2T_STATE_STALE;
+ mtx_unlock(&e->lock);
+ break;
+ }
+ }
+ rw_runlock(&d->lock);
- d = malloc(sizeof(*d), M_CXGBE, M_ZERO | flags);
- if (!d)
- return (NULL);
+ /* The TOE has no interest in this LLE */
+ return;
- d->rover = d->l2tab;
- atomic_store_rel_int(&d->nfree, L2T_SIZE);
- rw_init(&d->lock, "L2T");
+ found:
+ rw_runlock(&d->lock);
- for (i = 0; i < L2T_SIZE; i++) {
- d->l2tab[i].idx = i;
- d->l2tab[i].state = L2T_STATE_UNUSED;
- mtx_init(&d->l2tab[i].lock, "L2T_E", NULL, MTX_DEF);
- atomic_store_rel_int(&d->l2tab[i].refcnt, 0);
- }
+ if (atomic_load_acq_int(&e->refcnt)) {
- return (d);
-}
+ /* Entry is referenced by at least 1 offloaded connection. */
-int
-t4_free_l2t(struct l2t_data *d)
-{
- int i;
+ /* Handle deletes first */
+ if (lle->la_flags & LLE_DELETED) {
+ if (lle == e->lle) {
+ e->lle = NULL;
+ e->state = L2T_STATE_RESOLVING;
+ LLE_REMREF(lle);
+ }
+ goto done;
+ }
- for (i = 0; i < L2T_SIZE; i++)
- mtx_destroy(&d->l2tab[i].lock);
- rw_destroy(&d->lock);
- free(d, M_CXGBE);
+ if (lle != e->lle) {
+ old_lle = e->lle;
+ LLE_ADDREF(lle);
+ e->lle = lle;
+ }
- return (0);
+ if (e->state == L2T_STATE_RESOLVING ||
+ memcmp(e->dmac, &lle->ll_addr, ETHER_ADDR_LEN)) {
+
+ /* unresolved -> resolved; or dmac changed */
+
+ memcpy(e->dmac, &lle->ll_addr, ETHER_ADDR_LEN);
+ write_l2e(sc, e, 1);
+ } else {
+
+ /* +ve reinforcement of a valid or stale entry */
+
+ }
+
+ e->state = L2T_STATE_VALID;
+
+ } else {
+ /*
+ * Entry was used previously but is unreferenced right now.
+ * e->lle has been released and NULL'd out by t4_l2t_free, or
+ * l2t_release is about to call t4_l2t_free and do that.
+ *
+ * Either way this is of no interest to us.
+ */
+ }
+
+done:
+ mtx_unlock(&e->lock);
+ if (old_lle)
+ LLE_FREE(old_lle);
}
+
+#endif
diff --git a/sys/dev/cxgbe/t4_l2t.h b/sys/dev/cxgbe/t4_l2t.h
index c5520c6..8004c9e 100644
--- a/sys/dev/cxgbe/t4_l2t.h
+++ b/sys/dev/cxgbe/t4_l2t.h
@@ -54,18 +54,26 @@ struct l2t_entry {
struct mbuf *arpq_head; /* list of mbufs awaiting resolution */
struct mbuf *arpq_tail;
struct mtx lock;
- volatile uint32_t refcnt; /* entry reference count */
+ volatile int refcnt; /* entry reference count */
uint16_t hash; /* hash bucket the entry is on */
uint8_t v6; /* whether entry is for IPv6 */
uint8_t lport; /* associated offload logical port */
uint8_t dmac[ETHER_ADDR_LEN]; /* next hop's MAC address */
};
-struct l2t_data *t4_init_l2t(int);
+int t4_init_l2t(struct adapter *, int);
int t4_free_l2t(struct l2t_data *);
struct l2t_entry *t4_l2t_alloc_switching(struct l2t_data *);
int t4_l2t_set_switching(struct adapter *, struct l2t_entry *, uint16_t,
uint8_t, uint8_t *);
void t4_l2t_release(struct l2t_entry *);
+int sysctl_l2t(SYSCTL_HANDLER_ARGS);
+
+#ifndef TCP_OFFLOAD_DISABLE
+struct l2t_entry *t4_l2t_get(struct port_info *, struct ifnet *,
+ struct sockaddr *);
+int t4_l2t_send(struct adapter *, struct mbuf *, struct l2t_entry *);
+void t4_l2t_update(struct adapter *, struct llentry *);
+#endif
#endif /* __T4_L2T_H */
diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c
index adca421..37a4a7c 100644
--- a/sys/dev/cxgbe/t4_main.c
+++ b/sys/dev/cxgbe/t4_main.c
@@ -55,12 +55,10 @@ __FBSDID("$FreeBSD$");
#include <net/if_dl.h>
#include <net/if_vlan_var.h>
-#include "common/t4_hw.h"
#include "common/common.h"
#include "common/t4_msg.h"
#include "common/t4_regs.h"
#include "common/t4_regs_values.h"
-#include "common/t4fw_interface.h"
#include "t4_ioctl.h"
#include "t4_l2t.h"
@@ -122,115 +120,130 @@ static void cxgbe_media_status(struct ifnet *, struct ifmediareq *);
MALLOC_DEFINE(M_CXGBE, "cxgbe", "Chelsio T4 Ethernet driver and services");
-/*
- * Tunables.
- */
-static SYSCTL_NODE(_hw, OID_AUTO, cxgbe, CTLFLAG_RD, 0,
- "cxgbe driver parameters");
-
-static int force_firmware_install = 0;
-TUNABLE_INT("hw.cxgbe.force_firmware_install", &force_firmware_install);
-SYSCTL_UINT(_hw_cxgbe, OID_AUTO, force_firmware_install, CTLFLAG_RDTUN,
- &force_firmware_install, 0, "install firmware on every attach.");
+static struct mtx t4_list_lock;
+static SLIST_HEAD(, adapter) t4_list;
+#ifndef TCP_OFFLOAD_DISABLE
+static struct mtx t4_uld_list_lock;
+static SLIST_HEAD(, uld_info) t4_uld_list;
+#endif
/*
- * Holdoff timer and packet counter values.
+ * Tunables. See tweak_tunables() too.
*/
-static unsigned int intr_timer[SGE_NTIMERS] = {1, 5, 10, 50, 100, 200};
-static unsigned int intr_pktcount[SGE_NCOUNTERS] = {1, 8, 16, 32}; /* 63 max */
/*
- * Max # of tx and rx queues to use for each 10G and 1G port.
+ * Number of queues for tx and rx, 10G and 1G, NIC and offload.
*/
-static unsigned int max_ntxq_10g = 8;
-TUNABLE_INT("hw.cxgbe.max_ntxq_10G_port", &max_ntxq_10g);
-SYSCTL_UINT(_hw_cxgbe, OID_AUTO, max_ntxq_10G_port, CTLFLAG_RDTUN,
- &max_ntxq_10g, 0, "maximum number of tx queues per 10G port.");
-
-static unsigned int max_nrxq_10g = 8;
-TUNABLE_INT("hw.cxgbe.max_nrxq_10G_port", &max_nrxq_10g);
-SYSCTL_UINT(_hw_cxgbe, OID_AUTO, max_nrxq_10G_port, CTLFLAG_RDTUN,
- &max_nrxq_10g, 0, "maximum number of rxq's (per 10G port).");
-
-static unsigned int max_ntxq_1g = 2;
-TUNABLE_INT("hw.cxgbe.max_ntxq_1G_port", &max_ntxq_1g);
-SYSCTL_UINT(_hw_cxgbe, OID_AUTO, max_ntxq_1G_port, CTLFLAG_RDTUN,
- &max_ntxq_1g, 0, "maximum number of tx queues per 1G port.");
-
-static unsigned int max_nrxq_1g = 2;
-TUNABLE_INT("hw.cxgbe.max_nrxq_1G_port", &max_nrxq_1g);
-SYSCTL_UINT(_hw_cxgbe, OID_AUTO, max_nrxq_1G_port, CTLFLAG_RDTUN,
- &max_nrxq_1g, 0, "maximum number of rxq's (per 1G port).");
+#define NTXQ_10G 16
+static int t4_ntxq10g = -1;
+TUNABLE_INT("hw.cxgbe.ntxq10g", &t4_ntxq10g);
+
+#define NRXQ_10G 8
+static int t4_nrxq10g = -1;
+TUNABLE_INT("hw.cxgbe.nrxq10g", &t4_nrxq10g);
+
+#define NTXQ_1G 4
+static int t4_ntxq1g = -1;
+TUNABLE_INT("hw.cxgbe.ntxq1g", &t4_ntxq1g);
+
+#define NRXQ_1G 2
+static int t4_nrxq1g = -1;
+TUNABLE_INT("hw.cxgbe.nrxq1g", &t4_nrxq1g);
+
+#ifndef TCP_OFFLOAD_DISABLE
+#define NOFLDTXQ_10G 8
+static int t4_nofldtxq10g = -1;
+TUNABLE_INT("hw.cxgbe.nofldtxq10g", &t4_nofldtxq10g);
+
+#define NOFLDRXQ_10G 2
+static int t4_nofldrxq10g = -1;
+TUNABLE_INT("hw.cxgbe.nofldrxq10g", &t4_nofldrxq10g);
+
+#define NOFLDTXQ_1G 2
+static int t4_nofldtxq1g = -1;
+TUNABLE_INT("hw.cxgbe.nofldtxq1g", &t4_nofldtxq1g);
+
+#define NOFLDRXQ_1G 1
+static int t4_nofldrxq1g = -1;
+TUNABLE_INT("hw.cxgbe.nofldrxq1g", &t4_nofldrxq1g);
+#endif
/*
* Holdoff parameters for 10G and 1G ports.
*/
-static unsigned int tmr_idx_10g = 1;
-TUNABLE_INT("hw.cxgbe.holdoff_timer_idx_10G", &tmr_idx_10g);
-SYSCTL_UINT(_hw_cxgbe, OID_AUTO, holdoff_timer_idx_10G, CTLFLAG_RDTUN,
- &tmr_idx_10g, 0,
- "default timer index for interrupt holdoff (10G ports).");
-
-static int pktc_idx_10g = 2;
-TUNABLE_INT("hw.cxgbe.holdoff_pktc_idx_10G", &pktc_idx_10g);
-SYSCTL_UINT(_hw_cxgbe, OID_AUTO, holdoff_pktc_idx_10G, CTLFLAG_RDTUN,
- &pktc_idx_10g, 0,
- "default pkt counter index for interrupt holdoff (10G ports).");
-
-static unsigned int tmr_idx_1g = 1;
-TUNABLE_INT("hw.cxgbe.holdoff_timer_idx_1G", &tmr_idx_1g);
-SYSCTL_UINT(_hw_cxgbe, OID_AUTO, holdoff_timer_idx_1G, CTLFLAG_RDTUN,
- &tmr_idx_1g, 0,
- "default timer index for interrupt holdoff (1G ports).");
-
-static int pktc_idx_1g = 2;
-TUNABLE_INT("hw.cxgbe.holdoff_pktc_idx_1G", &pktc_idx_1g);
-SYSCTL_UINT(_hw_cxgbe, OID_AUTO, holdoff_pktc_idx_1G, CTLFLAG_RDTUN,
- &pktc_idx_1g, 0,
- "default pkt counter index for interrupt holdoff (1G ports).");
+#define TMR_IDX_10G 1
+static int t4_tmr_idx_10g = TMR_IDX_10G;
+TUNABLE_INT("hw.cxgbe.holdoff_timer_idx_10G", &t4_tmr_idx_10g);
+
+#define PKTC_IDX_10G 2
+static int t4_pktc_idx_10g = PKTC_IDX_10G;
+TUNABLE_INT("hw.cxgbe.holdoff_pktc_idx_10G", &t4_pktc_idx_10g);
+
+#define TMR_IDX_1G 1
+static int t4_tmr_idx_1g = TMR_IDX_1G;
+TUNABLE_INT("hw.cxgbe.holdoff_timer_idx_1G", &t4_tmr_idx_1g);
+
+#define PKTC_IDX_1G 2
+static int t4_pktc_idx_1g = PKTC_IDX_1G;
+TUNABLE_INT("hw.cxgbe.holdoff_pktc_idx_1G", &t4_pktc_idx_1g);
/*
* Size (# of entries) of each tx and rx queue.
*/
-static unsigned int qsize_txq = TX_EQ_QSIZE;
-TUNABLE_INT("hw.cxgbe.qsize_txq", &qsize_txq);
-SYSCTL_UINT(_hw_cxgbe, OID_AUTO, qsize_txq, CTLFLAG_RDTUN,
- &qsize_txq, 0, "default queue size of NIC tx queues.");
+static unsigned int t4_qsize_txq = TX_EQ_QSIZE;
+TUNABLE_INT("hw.cxgbe.qsize_txq", &t4_qsize_txq);
+
+static unsigned int t4_qsize_rxq = RX_IQ_QSIZE;
+TUNABLE_INT("hw.cxgbe.qsize_rxq", &t4_qsize_rxq);
-static unsigned int qsize_rxq = RX_IQ_QSIZE;
-TUNABLE_INT("hw.cxgbe.qsize_rxq", &qsize_rxq);
-SYSCTL_UINT(_hw_cxgbe, OID_AUTO, qsize_rxq, CTLFLAG_RDTUN,
- &qsize_rxq, 0, "default queue size of NIC rx queues.");
+/*
+ * Interrupt types allowed (bits 0, 1, 2 = INTx, MSI, MSI-X respectively).
+ */
+static int t4_intr_types = INTR_MSIX | INTR_MSI | INTR_INTX;
+TUNABLE_INT("hw.cxgbe.interrupt_types", &t4_intr_types);
/*
- * Interrupt types allowed.
+ * Configuration file.
*/
-static int intr_types = INTR_MSIX | INTR_MSI | INTR_INTX;
-TUNABLE_INT("hw.cxgbe.interrupt_types", &intr_types);
-SYSCTL_UINT(_hw_cxgbe, OID_AUTO, interrupt_types, CTLFLAG_RDTUN, &intr_types, 0,
- "interrupt types allowed (bits 0, 1, 2 = INTx, MSI, MSI-X respectively)");
+static char t4_cfg_file[32] = "default";
+TUNABLE_STR("hw.cxgbe.config_file", t4_cfg_file, sizeof(t4_cfg_file));
/*
- * Force the driver to use the same set of interrupts for all ports.
+ * ASIC features that will be used. Disable the ones you don't want so that the
+ * chip resources aren't wasted on features that will not be used.
*/
-static int intr_shared = 0;
-TUNABLE_INT("hw.cxgbe.interrupts_shared", &intr_shared);
-SYSCTL_UINT(_hw_cxgbe, OID_AUTO, interrupts_shared, CTLFLAG_RDTUN,
- &intr_shared, 0, "interrupts shared between all ports");
+static int t4_linkcaps_allowed = 0; /* No DCBX, PPP, etc. by default */
+TUNABLE_INT("hw.cxgbe.linkcaps_allowed", &t4_linkcaps_allowed);
+
+static int t4_niccaps_allowed = FW_CAPS_CONFIG_NIC;
+TUNABLE_INT("hw.cxgbe.niccaps_allowed", &t4_niccaps_allowed);
+
+static int t4_toecaps_allowed = FW_CAPS_CONFIG_TOE;
+TUNABLE_INT("hw.cxgbe.toecaps_allowed", &t4_toecaps_allowed);
+
+static int t4_rdmacaps_allowed = 0;
+TUNABLE_INT("hw.cxgbe.rdmacaps_allowed", &t4_rdmacaps_allowed);
-static unsigned int filter_mode = HW_TPL_FR_MT_PR_IV_P_FC;
-TUNABLE_INT("hw.cxgbe.filter_mode", &filter_mode);
-SYSCTL_UINT(_hw_cxgbe, OID_AUTO, filter_mode, CTLFLAG_RDTUN,
- &filter_mode, 0, "default global filter mode.");
+static int t4_iscsicaps_allowed = 0;
+TUNABLE_INT("hw.cxgbe.iscsicaps_allowed", &t4_iscsicaps_allowed);
+
+static int t4_fcoecaps_allowed = 0;
+TUNABLE_INT("hw.cxgbe.fcoecaps_allowed", &t4_fcoecaps_allowed);
struct intrs_and_queues {
int intr_type; /* INTx, MSI, or MSI-X */
int nirq; /* Number of vectors */
- int intr_shared; /* Interrupts shared between all ports */
+ int intr_flags;
int ntxq10g; /* # of NIC txq's for each 10G port */
int nrxq10g; /* # of NIC rxq's for each 10G port */
int ntxq1g; /* # of NIC txq's for each 1G port */
int nrxq1g; /* # of NIC rxq's for each 1G port */
+#ifndef TCP_OFFLOAD_DISABLE
+ int nofldtxq10g; /* # of TOE txq's for each 10G port */
+ int nofldrxq10g; /* # of TOE rxq's for each 10G port */
+ int nofldtxq1g; /* # of TOE txq's for each 1G port */
+ int nofldrxq1g; /* # of TOE rxq's for each 1G port */
+#endif
};
struct filter_entry {
@@ -244,15 +257,6 @@ struct filter_entry {
};
enum {
- MEMWIN0_APERTURE = 2048,
- MEMWIN0_BASE = 0x1b800,
- MEMWIN1_APERTURE = 32768,
- MEMWIN1_BASE = 0x28000,
- MEMWIN2_APERTURE = 65536,
- MEMWIN2_BASE = 0x30000,
-};
-
-enum {
XGMAC_MTU = (1 << 0),
XGMAC_PROMISC = (1 << 1),
XGMAC_ALLMULTI = (1 << 2),
@@ -268,9 +272,11 @@ static void setup_memwin(struct adapter *);
static int cfg_itype_and_nqueues(struct adapter *, int, int,
struct intrs_and_queues *);
static int prep_firmware(struct adapter *);
-static int get_devlog_params(struct adapter *, struct devlog_params *);
-static int get_capabilities(struct adapter *, struct fw_caps_config_cmd *);
-static int get_params(struct adapter *, struct fw_caps_config_cmd *);
+static int upload_config_file(struct adapter *, const struct firmware *,
+ uint32_t *, uint32_t *);
+static int partition_resources(struct adapter *, const struct firmware *);
+static int get_params__pre_init(struct adapter *);
+static int get_params__post_init(struct adapter *);
static void t4_set_desc(struct adapter *);
static void build_medialist(struct port_info *);
static int update_mac_settings(struct port_info *, int);
@@ -278,24 +284,46 @@ static int cxgbe_init_locked(struct port_info *);
static int cxgbe_init_synchronized(struct port_info *);
static int cxgbe_uninit_locked(struct port_info *);
static int cxgbe_uninit_synchronized(struct port_info *);
-static int first_port_up(struct adapter *);
-static int last_port_down(struct adapter *);
+static int adapter_full_init(struct adapter *);
+static int adapter_full_uninit(struct adapter *);
+static int port_full_init(struct port_info *);
+static int port_full_uninit(struct port_info *);
+static void quiesce_eq(struct adapter *, struct sge_eq *);
+static void quiesce_iq(struct adapter *, struct sge_iq *);
+static void quiesce_fl(struct adapter *, struct sge_fl *);
static int t4_alloc_irq(struct adapter *, struct irq *, int rid,
- iq_intr_handler_t *, void *, char *);
+ driver_intr_t *, void *, char *);
static int t4_free_irq(struct adapter *, struct irq *);
static void reg_block_dump(struct adapter *, uint8_t *, unsigned int,
unsigned int);
static void t4_get_regs(struct adapter *, struct t4_regdump *, uint8_t *);
static void cxgbe_tick(void *);
+static int cpl_not_handled(struct sge_iq *, const struct rss_header *,
+ struct mbuf *);
static int t4_sysctls(struct adapter *);
static int cxgbe_sysctls(struct port_info *);
static int sysctl_int_array(SYSCTL_HANDLER_ARGS);
+static int sysctl_bitfield(SYSCTL_HANDLER_ARGS);
static int sysctl_holdoff_tmr_idx(SYSCTL_HANDLER_ARGS);
static int sysctl_holdoff_pktc_idx(SYSCTL_HANDLER_ARGS);
static int sysctl_qsize_rxq(SYSCTL_HANDLER_ARGS);
static int sysctl_qsize_txq(SYSCTL_HANDLER_ARGS);
static int sysctl_handle_t4_reg64(SYSCTL_HANDLER_ARGS);
+static int sysctl_cctrl(SYSCTL_HANDLER_ARGS);
+static int sysctl_cpl_stats(SYSCTL_HANDLER_ARGS);
+static int sysctl_ddp_stats(SYSCTL_HANDLER_ARGS);
static int sysctl_devlog(SYSCTL_HANDLER_ARGS);
+static int sysctl_fcoe_stats(SYSCTL_HANDLER_ARGS);
+static int sysctl_hw_sched(SYSCTL_HANDLER_ARGS);
+static int sysctl_lb_stats(SYSCTL_HANDLER_ARGS);
+static int sysctl_meminfo(SYSCTL_HANDLER_ARGS);
+static int sysctl_path_mtus(SYSCTL_HANDLER_ARGS);
+static int sysctl_pm_stats(SYSCTL_HANDLER_ARGS);
+static int sysctl_rdma_stats(SYSCTL_HANDLER_ARGS);
+static int sysctl_tcp_stats(SYSCTL_HANDLER_ARGS);
+static int sysctl_tids(SYSCTL_HANDLER_ARGS);
+static int sysctl_tp_err_stats(SYSCTL_HANDLER_ARGS);
+static int sysctl_tx_rate(SYSCTL_HANDLER_ARGS);
static inline void txq_start(struct ifnet *, struct sge_txq *);
static uint32_t fconf_to_mode(uint32_t);
static uint32_t mode_to_fconf(uint32_t);
@@ -309,8 +337,15 @@ static int del_filter(struct adapter *, struct t4_filter *);
static void clear_filter(struct filter_entry *);
static int set_filter_wr(struct adapter *, int);
static int del_filter_wr(struct adapter *, int);
-void filter_rpl(struct adapter *, const struct cpl_set_tcb_rpl *);
+static int filter_rpl(struct sge_iq *, const struct rss_header *,
+ struct mbuf *);
static int get_sge_context(struct adapter *, struct t4_sge_context *);
+static int read_card_mem(struct adapter *, struct t4_mem_range *);
+#ifndef TCP_OFFLOAD_DISABLE
+static int toe_capability(struct port_info *, int);
+static int activate_uld(struct adapter *, int, struct uld_softc *);
+static int deactivate_uld(struct uld_softc *);
+#endif
static int t4_mod_event(module_t, int, void *);
struct t4_pciids {
@@ -332,6 +367,11 @@ struct t4_pciids {
{0x440a, 4, "Chelsio T404-BT"},
};
+#ifndef TCP_OFFLOAD_DISABLE
+/* This is used in service_iq() to get to the fl associated with an iq. */
+CTASSERT(offsetof(struct sge_ofld_rxq, fl) == offsetof(struct sge_rxq, fl));
+#endif
+
static int
t4_probe(device_t dev)
{
@@ -358,10 +398,11 @@ t4_attach(device_t dev)
{
struct adapter *sc;
int rc = 0, i, n10g, n1g, rqidx, tqidx;
- struct fw_caps_config_cmd caps;
- uint32_t p, v;
struct intrs_and_queues iaq;
struct sge *s;
+#ifndef TCP_OFFLOAD_DISABLE
+ int ofld_rqidx, ofld_tqidx;
+#endif
sc = device_get_softc(dev);
sc->dev = dev;
@@ -370,6 +411,8 @@ t4_attach(device_t dev)
pci_enable_busmaster(dev);
if (pci_find_cap(dev, PCIY_EXPRESS, &i) == 0) {
+ uint32_t v;
+
pci_set_max_read_req(dev, 4096);
v = pci_read_config(dev, i + PCIR_EXPRESS_DEVICE_CTL, 2);
v |= PCIM_EXP_CTL_RELAXED_ORD_ENABLE;
@@ -379,12 +422,22 @@ t4_attach(device_t dev)
snprintf(sc->lockname, sizeof(sc->lockname), "%s",
device_get_nameunit(dev));
mtx_init(&sc->sc_lock, sc->lockname, 0, MTX_DEF);
+ mtx_lock(&t4_list_lock);
+ SLIST_INSERT_HEAD(&t4_list, sc, link);
+ mtx_unlock(&t4_list_lock);
+
+ mtx_init(&sc->sfl_lock, "starving freelists", 0, MTX_DEF);
+ TAILQ_INIT(&sc->sfl);
+ callout_init(&sc->sfl_callout, CALLOUT_MPSAFE);
rc = map_bars(sc);
if (rc != 0)
goto done; /* error message displayed already */
memset(sc->chan_map, 0xff, sizeof(sc->chan_map));
+ for (i = 0; i < ARRAY_SIZE(sc->cpl_handler); i++)
+ sc->cpl_handler[i] = cpl_not_handled;
+ t4_register_cpl_handler(sc, CPL_SET_TCB_RPL, filter_rpl);
/* Prepare the adapter for operation */
rc = -t4_prep_adapter(sc);
@@ -393,107 +446,75 @@ t4_attach(device_t dev)
goto done;
}
- /* Do this really early */
+ /*
+ * Do this really early, with the memory windows set up even before the
+ * character device. The userland tool's register i/o and mem read
+ * will work even in "recovery mode".
+ */
+ setup_memwin(sc);
sc->cdev = make_dev(&t4_cdevsw, device_get_unit(dev), UID_ROOT,
GID_WHEEL, 0600, "%s", device_get_nameunit(dev));
sc->cdev->si_drv1 = sc;
+ /* Go no further if recovery mode has been requested. */
+ if (TUNABLE_INT_FETCH("hw.cxgbe.sos", &i) && i != 0) {
+ device_printf(dev, "recovery mode.\n");
+ goto done;
+ }
+
/* Prepare the firmware for operation */
rc = prep_firmware(sc);
if (rc != 0)
goto done; /* error message displayed already */
- /* Read firmware devlog parameters */
- (void) get_devlog_params(sc, &sc->params.devlog);
-
- /* Get device capabilities and select which ones we'll use */
- rc = get_capabilities(sc, &caps);
- if (rc != 0) {
- device_printf(dev,
- "failed to initialize adapter capabilities: %d.\n", rc);
- goto done;
- }
+ rc = get_params__pre_init(sc);
+ if (rc != 0)
+ goto done; /* error message displayed already */
- /* Choose the global RSS mode. */
- rc = -t4_config_glbl_rss(sc, sc->mbox,
- FW_RSS_GLB_CONFIG_CMD_MODE_BASICVIRTUAL,
- F_FW_RSS_GLB_CONFIG_CMD_TNLMAPEN |
- F_FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ |
- F_FW_RSS_GLB_CONFIG_CMD_TNLALLLKP);
- if (rc != 0) {
- device_printf(dev,
- "failed to select global RSS mode: %d.\n", rc);
- goto done;
- }
+ rc = t4_sge_init(sc);
+ if (rc != 0)
+ goto done; /* error message displayed already */
- /* These are total (sum of all ports) limits for a bus driver */
- rc = -t4_cfg_pfvf(sc, sc->mbox, sc->pf, 0,
- 128, /* max # of egress queues */
- 64, /* max # of egress Ethernet or control queues */
- 64, /* max # of ingress queues with fl/interrupt */
- 0, /* max # of ingress queues without interrupt */
- 0, /* PCIe traffic class */
- 4, /* max # of virtual interfaces */
- M_FW_PFVF_CMD_CMASK, M_FW_PFVF_CMD_PMASK, 16,
- FW_CMD_CAP_PF, FW_CMD_CAP_PF);
- if (rc != 0) {
- device_printf(dev,
- "failed to configure pf/vf resources: %d.\n", rc);
- goto done;
+ if (sc->flags & MASTER_PF) {
+ /* get basic stuff going */
+ rc = -t4_fw_initialize(sc, sc->mbox);
+ if (rc != 0) {
+ device_printf(dev, "early init failed: %d.\n", rc);
+ goto done;
+ }
}
- /* Need this before sge_init */
- for (i = 0; i < SGE_NTIMERS; i++)
- sc->sge.timer_val[i] = min(intr_timer[i], 200U);
- for (i = 0; i < SGE_NCOUNTERS; i++)
- sc->sge.counter_val[i] = min(intr_pktcount[i], M_THRESHOLD_0);
-
- /* Also need the cooked value of cclk before sge_init */
- p = (V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DEV) |
- V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DEV_CCLK));
- rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 1, &p, &v);
- if (rc != 0) {
- device_printf(sc->dev,
- "failed to obtain core clock value: %d.\n", rc);
- goto done;
- }
- sc->params.vpd.cclk = v;
+ rc = get_params__post_init(sc);
+ if (rc != 0)
+ goto done; /* error message displayed already */
- t4_sge_init(sc);
+ if (sc->flags & MASTER_PF) {
- t4_set_filter_mode(sc, filter_mode);
- t4_set_reg_field(sc, A_TP_GLOBAL_CONFIG,
- V_FIVETUPLELOOKUP(M_FIVETUPLELOOKUP),
- V_FIVETUPLELOOKUP(M_FIVETUPLELOOKUP));
- t4_tp_wr_bits_indirect(sc, A_TP_INGRESS_CONFIG, F_CSUM_HAS_PSEUDO_HDR,
- F_LOOKUPEVERYPKT);
+ /* final tweaks to some settings */
- /* get basic stuff going */
- rc = -t4_early_init(sc, sc->mbox);
- if (rc != 0) {
- device_printf(dev, "early init failed: %d.\n", rc);
- goto done;
+ t4_load_mtus(sc, sc->params.mtus, sc->params.a_wnd,
+ sc->params.b_wnd);
+ t4_write_reg(sc, A_ULP_RX_TDDP_PSZ, V_HPZ0(PAGE_SHIFT - 12));
+ t4_set_reg_field(sc, A_TP_PARA_REG3, F_TUNNELCNGDROP0 |
+ F_TUNNELCNGDROP1 | F_TUNNELCNGDROP2 | F_TUNNELCNGDROP3, 0);
+ t4_set_reg_field(sc, A_TP_PARA_REG5,
+ V_INDICATESIZE(M_INDICATESIZE) |
+ F_REARMDDPOFFSET | F_RESETDDPOFFSET,
+ V_INDICATESIZE(M_INDICATESIZE) |
+ F_REARMDDPOFFSET | F_RESETDDPOFFSET);
+ } else {
+ /*
+ * XXX: Verify that we can live with whatever the master driver
+ * has done so far, and hope that it doesn't change any global
+ * setting from underneath us in the future.
+ */
}
- rc = get_params(sc, &caps);
- if (rc != 0)
- goto done; /* error message displayed already */
-
- /* These are finalized by FW initialization, load their values now */
- v = t4_read_reg(sc, A_TP_TIMER_RESOLUTION);
- sc->params.tp.tre = G_TIMERRESOLUTION(v);
- sc->params.tp.dack_re = G_DELAYEDACKRESOLUTION(v);
- t4_read_mtu_tbl(sc, sc->params.mtus, NULL);
-
- /* tweak some settings */
- t4_write_reg(sc, A_TP_SHIFT_CNT, V_SYNSHIFTMAX(6) | V_RXTSHIFTMAXR1(4) |
- V_RXTSHIFTMAXR2(15) | V_PERSHIFTBACKOFFMAX(8) | V_PERSHIFTMAX(8) |
- V_KEEPALIVEMAXR1(4) | V_KEEPALIVEMAXR2(9));
- t4_write_reg(sc, A_ULP_RX_TDDP_PSZ, V_HPZ0(PAGE_SHIFT - 12));
- t4_set_reg_field(sc, A_TP_PARA_REG3, F_TUNNELCNGDROP0 |
- F_TUNNELCNGDROP1 | F_TUNNELCNGDROP2 | F_TUNNELCNGDROP3, 0);
+ t4_read_indirect(sc, A_TP_PIO_ADDR, A_TP_PIO_DATA, &sc->filter_mode, 1,
+ A_TP_VLAN_PRI_MAP);
- setup_memwin(sc);
+ for (i = 0; i < NCHAN; i++)
+ sc->params.tp.tx_modq[i] = i;
rc = t4_create_dma_tag(sc);
if (rc != 0)
@@ -532,31 +553,18 @@ t4_attach(device_t dev)
if (is_10G_port(pi)) {
n10g++;
- pi->tmr_idx = tmr_idx_10g;
- pi->pktc_idx = pktc_idx_10g;
+ pi->tmr_idx = t4_tmr_idx_10g;
+ pi->pktc_idx = t4_pktc_idx_10g;
} else {
n1g++;
- pi->tmr_idx = tmr_idx_1g;
- pi->pktc_idx = pktc_idx_1g;
+ pi->tmr_idx = t4_tmr_idx_1g;
+ pi->pktc_idx = t4_pktc_idx_1g;
}
pi->xact_addr_filt = -1;
- pi->qsize_rxq = max(qsize_rxq, 128);
- while (pi->qsize_rxq & 7)
- pi->qsize_rxq++;
- pi->qsize_txq = max(qsize_txq, 128);
-
- if (pi->qsize_rxq != qsize_rxq) {
- device_printf(dev,
- "using %d instead of %d as the rx queue size.\n",
- pi->qsize_rxq, qsize_rxq);
- }
- if (pi->qsize_txq != qsize_txq) {
- device_printf(dev,
- "using %d instead of %d as the tx queue size.\n",
- pi->qsize_txq, qsize_txq);
- }
+ pi->qsize_rxq = t4_qsize_rxq;
+ pi->qsize_txq = t4_qsize_txq;
pi->dev = device_add_child(dev, "cxgbe", -1);
if (pi->dev == NULL) {
@@ -566,14 +574,6 @@ t4_attach(device_t dev)
goto done;
}
device_set_softc(pi->dev, pi);
-
- setbit(&sc->registered_device_map, i);
- }
-
- if (sc->registered_device_map == 0) {
- device_printf(dev, "no usable ports\n");
- rc = ENXIO;
- goto done;
}
/*
@@ -585,20 +585,31 @@ t4_attach(device_t dev)
sc->intr_type = iaq.intr_type;
sc->intr_count = iaq.nirq;
+ sc->flags |= iaq.intr_flags;
s = &sc->sge;
s->nrxq = n10g * iaq.nrxq10g + n1g * iaq.nrxq1g;
s->ntxq = n10g * iaq.ntxq10g + n1g * iaq.ntxq1g;
s->neq = s->ntxq + s->nrxq; /* the free list in an rxq is an eq */
- s->neq += sc->params.nports; /* control queues, 1 per port */
+ s->neq += sc->params.nports + 1;/* ctrl queues: 1 per port + 1 mgmt */
s->niq = s->nrxq + 1; /* 1 extra for firmware event queue */
- if (iaq.intr_shared)
- sc->flags |= INTR_SHARED;
- s->niq += NINTRQ(sc); /* interrupt queues */
- s->intrq = malloc(NINTRQ(sc) * sizeof(struct sge_iq), M_CXGBE,
- M_ZERO | M_WAITOK);
- s->ctrlq = malloc(sc->params.nports * sizeof(struct sge_ctrlq), M_CXGBE,
+#ifndef TCP_OFFLOAD_DISABLE
+ if (is_offload(sc)) {
+
+ s->nofldrxq = n10g * iaq.nofldrxq10g + n1g * iaq.nofldrxq1g;
+ s->nofldtxq = n10g * iaq.nofldtxq10g + n1g * iaq.nofldtxq1g;
+ s->neq += s->nofldtxq + s->nofldrxq;
+ s->niq += s->nofldrxq;
+
+ s->ofld_rxq = malloc(s->nofldrxq * sizeof(struct sge_ofld_rxq),
+ M_CXGBE, M_ZERO | M_WAITOK);
+ s->ofld_txq = malloc(s->nofldtxq * sizeof(struct sge_wrq),
+ M_CXGBE, M_ZERO | M_WAITOK);
+ }
+#endif
+
+ s->ctrlq = malloc(sc->params.nports * sizeof(struct sge_wrq), M_CXGBE,
M_ZERO | M_WAITOK);
s->rxq = malloc(s->nrxq * sizeof(struct sge_rxq), M_CXGBE,
M_ZERO | M_WAITOK);
@@ -612,15 +623,16 @@ t4_attach(device_t dev)
sc->irq = malloc(sc->intr_count * sizeof(struct irq), M_CXGBE,
M_ZERO | M_WAITOK);
- sc->l2t = t4_init_l2t(M_WAITOK);
-
- t4_sysctls(sc);
+ t4_init_l2t(sc, M_WAITOK);
/*
* Second pass over the ports. This time we know the number of rx and
* tx queues that each port should get.
*/
rqidx = tqidx = 0;
+#ifndef TCP_OFFLOAD_DISABLE
+ ofld_rqidx = ofld_tqidx = 0;
+#endif
for_each_port(sc, i) {
struct port_info *pi = sc->port[i];
@@ -628,13 +640,33 @@ t4_attach(device_t dev)
continue;
pi->first_rxq = rqidx;
- pi->nrxq = is_10G_port(pi) ? iaq.nrxq10g : iaq.nrxq1g;
-
pi->first_txq = tqidx;
- pi->ntxq = is_10G_port(pi) ? iaq.ntxq10g : iaq.ntxq1g;
+ if (is_10G_port(pi)) {
+ pi->nrxq = iaq.nrxq10g;
+ pi->ntxq = iaq.ntxq10g;
+ } else {
+ pi->nrxq = iaq.nrxq1g;
+ pi->ntxq = iaq.ntxq1g;
+ }
rqidx += pi->nrxq;
tqidx += pi->ntxq;
+
+#ifndef TCP_OFFLOAD_DISABLE
+ if (is_offload(sc)) {
+ pi->first_ofld_rxq = ofld_rqidx;
+ pi->first_ofld_txq = ofld_tqidx;
+ if (is_10G_port(pi)) {
+ pi->nofldrxq = iaq.nofldrxq10g;
+ pi->nofldtxq = iaq.nofldtxq10g;
+ } else {
+ pi->nofldrxq = iaq.nofldrxq1g;
+ pi->nofldtxq = iaq.nofldtxq1g;
+ }
+ ofld_rqidx += pi->nofldrxq;
+ ofld_tqidx += pi->nofldtxq;
+ }
+#endif
}
rc = bus_generic_attach(dev);
@@ -644,17 +676,27 @@ t4_attach(device_t dev)
goto done;
}
-#ifdef INVARIANTS
device_printf(dev,
- "%p, %d ports (0x%x), %d intr_type, %d intr_count\n",
- sc, sc->params.nports, sc->params.portvec,
- sc->intr_type, sc->intr_count);
-#endif
+ "PCIe x%d, %d ports, %d %s interrupt%s, %d eq, %d iq\n",
+ sc->params.pci.width, sc->params.nports, sc->intr_count,
+ sc->intr_type == INTR_MSIX ? "MSI-X" :
+ (sc->intr_type == INTR_MSI ? "MSI" : "INTx"),
+ sc->intr_count > 1 ? "s" : "", sc->sge.neq, sc->sge.niq);
+
t4_set_desc(sc);
done:
+ if (rc != 0 && sc->cdev) {
+ /* cdev was created and so cxgbetool works; recover that way. */
+ device_printf(dev,
+ "error during attach, adapter is now in recovery mode.\n");
+ rc = 0;
+ }
+
if (rc != 0)
t4_detach(dev);
+ else
+ t4_sysctls(sc);
return (rc);
}
@@ -667,14 +709,25 @@ t4_detach(device_t dev)
{
struct adapter *sc;
struct port_info *pi;
- int i;
+ int i, rc;
sc = device_get_softc(dev);
- if (sc->cdev)
+ if (sc->flags & FULL_INIT_DONE)
+ t4_intr_disable(sc);
+
+ if (sc->cdev) {
destroy_dev(sc->cdev);
+ sc->cdev = NULL;
+ }
+
+ rc = bus_generic_detach(dev);
+ if (rc) {
+ device_printf(dev,
+ "failed to detach child devices: %d\n", rc);
+ return (rc);
+ }
- bus_generic_detach(dev);
for (i = 0; i < MAX_NPORTS; i++) {
pi = sc->port[i];
if (pi) {
@@ -687,6 +740,9 @@ t4_detach(device_t dev)
}
}
+ if (sc->flags & FULL_INIT_DONE)
+ adapter_full_uninit(sc);
+
if (sc->flags & FW_OK)
t4_fw_bye(sc, sc->mbox);
@@ -704,16 +760,27 @@ t4_detach(device_t dev)
if (sc->l2t)
t4_free_l2t(sc->l2t);
+#ifndef TCP_OFFLOAD_DISABLE
+ free(sc->sge.ofld_rxq, M_CXGBE);
+ free(sc->sge.ofld_txq, M_CXGBE);
+#endif
free(sc->irq, M_CXGBE);
free(sc->sge.rxq, M_CXGBE);
free(sc->sge.txq, M_CXGBE);
free(sc->sge.ctrlq, M_CXGBE);
- free(sc->sge.intrq, M_CXGBE);
free(sc->sge.iqmap, M_CXGBE);
free(sc->sge.eqmap, M_CXGBE);
free(sc->tids.ftid_tab, M_CXGBE);
t4_destroy_dma_tag(sc);
- mtx_destroy(&sc->sc_lock);
+ if (mtx_initialized(&sc->sc_lock)) {
+ mtx_lock(&t4_list_lock);
+ SLIST_REMOVE(&t4_list, sc, adapter, link);
+ mtx_unlock(&t4_list_lock);
+ mtx_destroy(&sc->sc_lock);
+ }
+
+ if (mtx_initialized(&sc->sfl_lock))
+ mtx_destroy(&sc->sfl_lock);
bzero(sc, sizeof(*sc));
@@ -727,7 +794,7 @@ cxgbe_probe(device_t dev)
char buf[128];
struct port_info *pi = device_get_softc(dev);
- snprintf(buf, sizeof(buf), "Port %d", pi->port_id);
+ snprintf(buf, sizeof(buf), "port %d", pi->port_id);
device_set_desc_copy(dev, buf);
return (BUS_PROBE_DEFAULT);
@@ -754,15 +821,6 @@ cxgbe_attach(device_t dev)
ifp->if_softc = pi;
callout_init(&pi->tick, CALLOUT_MPSAFE);
- pi->tq = taskqueue_create("cxgbe_taskq", M_NOWAIT,
- taskqueue_thread_enqueue, &pi->tq);
- if (pi->tq == NULL) {
- device_printf(dev, "failed to allocate port task queue\n");
- if_free(pi->ifp);
- return (ENOMEM);
- }
- taskqueue_start_threads(&pi->tq, 1, PI_NET, "%s taskq",
- device_get_nameunit(dev));
if_initname(ifp, device_get_name(dev), device_get_unit(dev));
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
@@ -778,6 +836,10 @@ cxgbe_attach(device_t dev)
IFQ_SET_READY(&ifp->if_snd);
ifp->if_capabilities = T4_CAP;
+#ifndef TCP_OFFLOAD_DISABLE
+ if (is_offload(pi->adapter))
+ ifp->if_capabilities |= IFCAP_TOE4;
+#endif
ifp->if_capenable = T4_CAP_ENABLE;
ifp->if_hwassist = CSUM_TCP | CSUM_UDP | CSUM_IP | CSUM_TSO;
@@ -788,9 +850,14 @@ cxgbe_attach(device_t dev)
ether_ifattach(ifp, pi->hw_addr);
-#ifdef INVARIANTS
- device_printf(dev, "%p, %d txq, %d rxq\n", pi, pi->ntxq, pi->nrxq);
+#ifndef TCP_OFFLOAD_DISABLE
+ if (is_offload(pi->adapter)) {
+ device_printf(dev,
+ "%d txq, %d rxq (NIC); %d txq, %d rxq (TOE)\n",
+ pi->ntxq, pi->nrxq, pi->nofldtxq, pi->nofldrxq);
+ } else
#endif
+ device_printf(dev, "%d txq, %d rxq\n", pi->ntxq, pi->nrxq);
cxgbe_sysctls(pi);
@@ -802,7 +869,7 @@ cxgbe_detach(device_t dev)
{
struct port_info *pi = device_get_softc(dev);
struct adapter *sc = pi->adapter;
- int rc;
+ struct ifnet *ifp = pi->ifp;
/* Tell if_ioctl and if_init that the port is going away */
ADAPTER_LOCK(sc);
@@ -813,11 +880,15 @@ cxgbe_detach(device_t dev)
SET_BUSY(sc);
ADAPTER_UNLOCK(sc);
- rc = cxgbe_uninit_synchronized(pi);
- if (rc != 0)
- device_printf(dev, "port uninit failed: %d.\n", rc);
+ PORT_LOCK(pi);
+ ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
+ callout_stop(&pi->tick);
+ PORT_UNLOCK(pi);
+ callout_drain(&pi->tick);
- taskqueue_free(pi->tq);
+ /* Let detach proceed even if these fail. */
+ cxgbe_uninit_synchronized(pi);
+ port_full_uninit(pi);
ifmedia_removeall(&pi->media);
ether_ifdetach(pi->ifp);
@@ -956,6 +1027,7 @@ fail:
if_printf(ifp,
"enable txcsum first.\n");
rc = EAGAIN;
+ goto fail;
}
} else
ifp->if_hwassist &= ~CSUM_TSO;
@@ -968,15 +1040,21 @@ fail:
ifp->if_capenable ^= IFCAP_LRO;
for_each_rxq(pi, i, rxq) {
if (ifp->if_capenable & IFCAP_LRO)
- rxq->flags |= RXQ_LRO_ENABLED;
+ rxq->iq.flags |= IQ_LRO_ENABLED;
else
- rxq->flags &= ~RXQ_LRO_ENABLED;
+ rxq->iq.flags &= ~IQ_LRO_ENABLED;
}
#endif
}
#ifndef TCP_OFFLOAD_DISABLE
- if (mask & IFCAP_TOE4) {
- rc = EOPNOTSUPP;
+ if (mask & IFCAP_TOE) {
+ int enable = (ifp->if_capenable ^ mask) & IFCAP_TOE;
+
+ rc = toe_capability(pi, enable);
+ if (rc != 0)
+ goto fail;
+
+ ifp->if_capenable ^= mask;
}
#endif
if (mask & IFCAP_VLAN_HWTAGGING) {
@@ -1041,9 +1119,9 @@ cxgbe_transmit(struct ifnet *ifp, struct mbuf *m)
M_ASSERTPKTHDR(m);
- if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) {
+ if (__predict_false(pi->link_cfg.link_ok == 0)) {
m_freem(m);
- return (0);
+ return (ENETDOWN);
}
if (m->m_flags & M_FLOWID)
@@ -1051,13 +1129,20 @@ cxgbe_transmit(struct ifnet *ifp, struct mbuf *m)
br = txq->br;
if (TXQ_TRYLOCK(txq) == 0) {
+ struct sge_eq *eq = &txq->eq;
+
/*
- * XXX: make sure that this packet really is sent out. There is
- * a small race where t4_eth_tx may stop draining the drbr and
- * goes away, just before we enqueued this mbuf.
+ * It is possible that t4_eth_tx finishes up and releases the
+ * lock between the TRYLOCK above and the drbr_enqueue here. We
+ * need to make sure that this mbuf doesn't just sit there in
+ * the drbr.
*/
- return (drbr_enqueue(ifp, br, m));
+ rc = drbr_enqueue(ifp, br, m);
+ if (rc == 0 && callout_pending(&eq->tx_callout) == 0 &&
+ !(eq->flags & EQ_DOOMED))
+ callout_reset(&eq->tx_callout, 1, t4_tx_callout, eq);
+ return (rc);
}
/*
@@ -1098,11 +1183,12 @@ cxgbe_qflush(struct ifnet *ifp)
int i;
struct mbuf *m;
- /* queues do not exist if !IFF_DRV_RUNNING. */
- if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
+ /* queues do not exist if !PORT_INIT_DONE. */
+ if (pi->flags & PORT_INIT_DONE) {
for_each_txq(pi, i, txq) {
TXQ_LOCK(txq);
m_freem(txq->m);
+ txq->m = NULL;
while ((m = buf_ring_dequeue_sc(txq->br)) != NULL)
m_freem(m);
TXQ_UNLOCK(txq);
@@ -1216,14 +1302,25 @@ static int
cfg_itype_and_nqueues(struct adapter *sc, int n10g, int n1g,
struct intrs_and_queues *iaq)
{
- int rc, itype, navail, nc, nrxq10g, nrxq1g;
+ int rc, itype, navail, nrxq10g, nrxq1g, n;
+ int nofldrxq10g = 0, nofldrxq1g = 0;
bzero(iaq, sizeof(*iaq));
- nc = mp_ncpus; /* our snapshot of the number of CPUs */
+
+ iaq->ntxq10g = t4_ntxq10g;
+ iaq->ntxq1g = t4_ntxq1g;
+ iaq->nrxq10g = nrxq10g = t4_nrxq10g;
+ iaq->nrxq1g = nrxq1g = t4_nrxq1g;
+#ifndef TCP_OFFLOAD_DISABLE
+ iaq->nofldtxq10g = t4_nofldtxq10g;
+ iaq->nofldtxq1g = t4_nofldtxq1g;
+ iaq->nofldrxq10g = nofldrxq10g = t4_nofldrxq10g;
+ iaq->nofldrxq1g = nofldrxq1g = t4_nofldrxq1g;
+#endif
for (itype = INTR_MSIX; itype; itype >>= 1) {
- if ((itype & intr_types) == 0)
+ if ((itype & t4_intr_types) == 0)
continue; /* not allowed */
if (itype == INTR_MSIX)
@@ -1232,60 +1329,93 @@ cfg_itype_and_nqueues(struct adapter *sc, int n10g, int n1g,
navail = pci_msi_count(sc->dev);
else
navail = 1;
-
+restart:
if (navail == 0)
continue;
iaq->intr_type = itype;
+ iaq->intr_flags = 0;
- iaq->ntxq10g = min(nc, max_ntxq_10g);
- iaq->ntxq1g = min(nc, max_ntxq_1g);
-
- nrxq10g = min(nc, max_nrxq_10g);
- nrxq1g = min(nc, max_nrxq_1g);
-
- iaq->nirq = n10g * nrxq10g + n1g * nrxq1g + T4_EXTRA_INTR;
- if (iaq->nirq <= navail && intr_shared == 0) {
-
- if (itype == INTR_MSI && !powerof2(iaq->nirq))
- goto share;
-
- /* One for err, one for fwq, and one for each rxq */
-
- iaq->intr_shared = 0;
- iaq->nrxq10g = nrxq10g;
- iaq->nrxq1g = nrxq1g;
+ /*
+ * Best option: an interrupt vector for errors, one for the
+ * firmware event queue, and one each for each rxq (NIC as well
+ * as offload).
+ */
+ iaq->nirq = T4_EXTRA_INTR;
+ iaq->nirq += n10g * (nrxq10g + nofldrxq10g);
+ iaq->nirq += n1g * (nrxq1g + nofldrxq1g);
+ if (iaq->nirq <= navail &&
+ (itype != INTR_MSI || powerof2(iaq->nirq))) {
+ iaq->intr_flags |= INTR_DIRECT;
+ goto allocate;
+ }
- } else {
-share:
- iaq->intr_shared = 1;
+ /*
+ * Second best option: an interrupt vector for errors, one for
+ * the firmware event queue, and one each for either NIC or
+ * offload rxq's.
+ */
+ iaq->nirq = T4_EXTRA_INTR;
+ iaq->nirq += n10g * max(nrxq10g, nofldrxq10g);
+ iaq->nirq += n1g * max(nrxq1g, nofldrxq1g);
+ if (iaq->nirq <= navail &&
+ (itype != INTR_MSI || powerof2(iaq->nirq)))
+ goto allocate;
- if (navail >= nc + T4_EXTRA_INTR) {
- if (itype == INTR_MSIX)
- navail = nc + T4_EXTRA_INTR;
+ /*
+ * Next best option: an interrupt vector for errors, one for the
+ * firmware event queue, and at least one per port. At this
+ * point we know we'll have to downsize nrxq or nofldrxq to fit
+ * what's available to us.
+ */
+ iaq->nirq = T4_EXTRA_INTR;
+ iaq->nirq += n10g + n1g;
+ if (iaq->nirq <= navail) {
+ int leftover = navail - iaq->nirq;
+
+ if (n10g > 0) {
+ int target = max(nrxq10g, nofldrxq10g);
+
+ n = 1;
+ while (n < target && leftover >= n10g) {
+ leftover -= n10g;
+ iaq->nirq += n10g;
+ n++;
+ }
+ iaq->nrxq10g = min(n, nrxq10g);
+#ifndef TCP_OFFLOAD_DISABLE
+ iaq->nofldrxq10g = min(n, nofldrxq10g);
+#endif
+ }
- /* navail is and must remain a pow2 for MSI */
- if (itype == INTR_MSI) {
- KASSERT(powerof2(navail),
- ("%d not power of 2", navail));
+ if (n1g > 0) {
+ int target = max(nrxq1g, nofldrxq1g);
- while (navail / 2 >= nc + T4_EXTRA_INTR)
- navail /= 2;
+ n = 1;
+ while (n < target && leftover >= n1g) {
+ leftover -= n1g;
+ iaq->nirq += n1g;
+ n++;
}
+ iaq->nrxq1g = min(n, nrxq1g);
+#ifndef TCP_OFFLOAD_DISABLE
+ iaq->nofldrxq1g = min(n, nofldrxq1g);
+#endif
}
- iaq->nirq = navail; /* total # of interrupts */
- /*
- * If we have multiple vectors available reserve one
- * exclusively for errors. The rest will be shared by
- * the fwq and data.
- */
- if (navail > 1)
- navail--;
- iaq->nrxq10g = min(nrxq10g, navail);
- iaq->nrxq1g = min(nrxq1g, navail);
+ if (itype != INTR_MSI || powerof2(iaq->nirq))
+ goto allocate;
}
+ /*
+ * Least desirable option: one interrupt vector for everything.
+ */
+ iaq->nirq = iaq->nrxq10g = iaq->nrxq1g = 1;
+#ifndef TCP_OFFLOAD_DISABLE
+ iaq->nofldrxq10g = iaq->nofldrxq1g = 1;
+#endif
+
+allocate:
navail = iaq->nirq;
rc = 0;
if (itype == INTR_MSIX)
@@ -1301,8 +1431,11 @@ share:
* Didn't get the number requested. Use whatever number
* the kernel is willing to allocate (it's in navail).
*/
+ device_printf(sc->dev, "fewer vectors than requested, "
+ "type=%d, req=%d, rcvd=%d; will downshift req.\n",
+ itype, iaq->nirq, navail);
pci_release_msi(sc->dev);
- goto share;
+ goto restart;
}
device_printf(sc->dev,
@@ -1312,26 +1445,30 @@ share:
device_printf(sc->dev,
"failed to find a usable interrupt type. "
- "allowed=%d, msi-x=%d, msi=%d, intx=1", intr_types,
+ "allowed=%d, msi-x=%d, msi=%d, intx=1", t4_intr_types,
pci_msix_count(sc->dev), pci_msi_count(sc->dev));
return (ENXIO);
}
/*
- * Install a compatible firmware (if required), establish contact with it,
- * become the master, and reset the device.
+ * Install a compatible firmware (if required), establish contact with it (by
+ * saying hello), and reset the device. If we end up as the master driver,
+ * partition adapter resources by providing a configuration file to the
+ * firmware.
*/
static int
prep_firmware(struct adapter *sc)
{
- const struct firmware *fw;
+ const struct firmware *fw = NULL, *cfg = NULL, *default_cfg;
int rc;
enum dev_state state;
+ default_cfg = firmware_get(T4_CFGNAME);
+
/* Check firmware version and install a different one if necessary */
rc = t4_check_fw_version(sc);
- if (rc != 0 || force_firmware_install) {
+ if (rc != 0) {
uint32_t v = 0;
fw = firmware_get(T4_FWNAME);
@@ -1343,7 +1480,7 @@ prep_firmware(struct adapter *sc)
/*
* The firmware module will not be used if it isn't the
* same major version as what the driver was compiled
- * with. This check trumps force_firmware_install.
+ * with.
*/
if (G_FW_HDR_FW_VER_MAJOR(v) != FW_VERSION_MAJOR) {
device_printf(sc->dev,
@@ -1356,17 +1493,16 @@ prep_firmware(struct adapter *sc)
}
}
- if (fw == NULL && (rc < 0 || force_firmware_install)) {
+ if (fw == NULL && rc < 0) {
device_printf(sc->dev, "No usable firmware. "
- "card has %d.%d.%d, driver compiled with %d.%d.%d, "
- "force_firmware_install%s set",
+ "card has %d.%d.%d, driver compiled with %d.%d.%d",
G_FW_HDR_FW_VER_MAJOR(sc->params.fw_vers),
G_FW_HDR_FW_VER_MINOR(sc->params.fw_vers),
G_FW_HDR_FW_VER_MICRO(sc->params.fw_vers),
FW_VERSION_MAJOR, FW_VERSION_MINOR,
- FW_VERSION_MICRO,
- force_firmware_install ? "" : " not");
- return (EAGAIN);
+ FW_VERSION_MICRO);
+ rc = EAGAIN;
+ goto done;
}
/*
@@ -1374,8 +1510,7 @@ prep_firmware(struct adapter *sc)
* Downgrade only for a major version mismatch or if
* force_firmware_install was specified.
*/
- if (fw != NULL && (rc < 0 || force_firmware_install ||
- v > sc->params.fw_vers)) {
+ if (fw != NULL && (rc < 0 || v > sc->params.fw_vers)) {
device_printf(sc->dev,
"installing firmware %d.%d.%d.%d on card.\n",
G_FW_HDR_FW_VER_MAJOR(v), G_FW_HDR_FW_VER_MINOR(v),
@@ -1385,26 +1520,24 @@ prep_firmware(struct adapter *sc)
if (rc != 0) {
device_printf(sc->dev,
"failed to install firmware: %d\n", rc);
- firmware_put(fw, FIRMWARE_UNLOAD);
- return (rc);
+ goto done;
} else {
/* refresh */
(void) t4_check_fw_version(sc);
}
}
-
- if (fw != NULL)
- firmware_put(fw, FIRMWARE_UNLOAD);
}
- /* Contact firmware, request master */
- rc = t4_fw_hello(sc, sc->mbox, sc->mbox, MASTER_MUST, &state);
+ /* Contact firmware. */
+ rc = t4_fw_hello(sc, sc->mbox, sc->mbox, MASTER_MAY, &state);
if (rc < 0) {
rc = -rc;
device_printf(sc->dev,
"failed to connect to the firmware: %d.\n", rc);
- return (rc);
+ goto done;
}
+ if (rc == sc->mbox)
+ sc->flags |= MASTER_PF;
/* Reset device */
rc = -t4_fw_reset(sc, sc->mbox, F_PIORSTMODE | F_PIORST);
@@ -1412,7 +1545,26 @@ prep_firmware(struct adapter *sc)
device_printf(sc->dev, "firmware reset failed: %d.\n", rc);
if (rc != ETIMEDOUT && rc != EIO)
t4_fw_bye(sc, sc->mbox);
- return (rc);
+ goto done;
+ }
+
+ /* Partition adapter resources as specified in the config file. */
+ if (sc->flags & MASTER_PF) {
+ if (strncmp(t4_cfg_file, "default", sizeof(t4_cfg_file))) {
+ char s[32];
+
+ snprintf(s, sizeof(s), "t4fw_cfg_%s", t4_cfg_file);
+ cfg = firmware_get(s);
+ if (cfg == NULL) {
+ device_printf(sc->dev,
+ "unable to locate %s module, "
+ "will use default config file.\n", s);
+ }
+ }
+
+ rc = partition_resources(sc, cfg ? cfg : default_cfg);
+ if (rc != 0)
+ goto done; /* error message displayed already */
}
snprintf(sc->fw_version, sizeof(sc->fw_version), "%u.%u.%u.%u",
@@ -1422,84 +1574,207 @@ prep_firmware(struct adapter *sc)
G_FW_HDR_FW_VER_BUILD(sc->params.fw_vers));
sc->flags |= FW_OK;
- return (0);
+done:
+ if (fw != NULL)
+ firmware_put(fw, FIRMWARE_UNLOAD);
+ if (cfg != NULL)
+ firmware_put(cfg, FIRMWARE_UNLOAD);
+ if (default_cfg != NULL)
+ firmware_put(default_cfg, FIRMWARE_UNLOAD);
+
+ return (rc);
}
+#define FW_PARAM_DEV(param) \
+ (V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DEV) | \
+ V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DEV_##param))
+#define FW_PARAM_PFVF(param) \
+ (V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_PFVF) | \
+ V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_PFVF_##param))
+
+/*
+ * Upload configuration file to card's memory.
+ */
static int
-get_devlog_params(struct adapter *sc, struct devlog_params *dlog)
+upload_config_file(struct adapter *sc, const struct firmware *fw, uint32_t *mt,
+ uint32_t *ma)
{
- struct fw_devlog_cmd devlog_cmd;
- uint32_t meminfo;
- int rc;
+ int rc, i;
+ uint32_t param, val, mtype, maddr, bar, off, win, remaining;
+ const uint32_t *b;
- bzero(&devlog_cmd, sizeof(devlog_cmd));
- devlog_cmd.op_to_write = htobe32(V_FW_CMD_OP(FW_DEVLOG_CMD) |
- F_FW_CMD_REQUEST | F_FW_CMD_READ);
- devlog_cmd.retval_len16 = htobe32(FW_LEN16(devlog_cmd));
- rc = -t4_wr_mbox(sc, sc->mbox, &devlog_cmd, sizeof(devlog_cmd),
- &devlog_cmd);
+ /* Figure out where the firmware wants us to upload it. */
+ param = FW_PARAM_DEV(CF);
+ rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 1, &param, &val);
if (rc != 0) {
+ /* Firmwares without config file support will fail this way */
device_printf(sc->dev,
- "failed to get devlog parameters: %d.\n", rc);
- bzero(dlog, sizeof (*dlog));
+ "failed to query config file location: %d.\n", rc);
return (rc);
}
+ *mt = mtype = G_FW_PARAMS_PARAM_Y(val);
+ *ma = maddr = G_FW_PARAMS_PARAM_Z(val) << 16;
+
+ if (maddr & 3) {
+ device_printf(sc->dev,
+ "cannot upload config file (type %u, addr %x).\n",
+ mtype, maddr);
+ return (EFAULT);
+ }
- meminfo = be32toh(devlog_cmd.memtype_devlog_memaddr16_devlog);
- dlog->memtype = G_FW_DEVLOG_CMD_MEMTYPE_DEVLOG(meminfo);
- dlog->start = G_FW_DEVLOG_CMD_MEMADDR16_DEVLOG(meminfo) << 4;
- dlog->size = be32toh(devlog_cmd.memsize_devlog);
+ /* Translate mtype/maddr to an address suitable for the PCIe window */
+ val = t4_read_reg(sc, A_MA_TARGET_MEM_ENABLE);
+ val &= F_EDRAM0_ENABLE | F_EDRAM1_ENABLE | F_EXT_MEM_ENABLE;
+ switch (mtype) {
+ case FW_MEMTYPE_CF_EDC0:
+ if (!(val & F_EDRAM0_ENABLE))
+ goto err;
+ bar = t4_read_reg(sc, A_MA_EDRAM0_BAR);
+ maddr += G_EDRAM0_BASE(bar) << 20;
+ break;
- return (0);
+ case FW_MEMTYPE_CF_EDC1:
+ if (!(val & F_EDRAM1_ENABLE))
+ goto err;
+ bar = t4_read_reg(sc, A_MA_EDRAM1_BAR);
+ maddr += G_EDRAM1_BASE(bar) << 20;
+ break;
+
+ case FW_MEMTYPE_CF_EXTMEM:
+ if (!(val & F_EXT_MEM_ENABLE))
+ goto err;
+ bar = t4_read_reg(sc, A_MA_EXT_MEMORY_BAR);
+ maddr += G_EXT_MEM_BASE(bar) << 20;
+ break;
+
+ default:
+err:
+ device_printf(sc->dev,
+ "cannot upload config file (type %u, enabled %u).\n",
+ mtype, val);
+ return (EFAULT);
+ }
+
+ /*
+ * Position the PCIe window (we use memwin2) to the 16B aligned area
+ * just at/before the upload location.
+ */
+ win = maddr & ~0xf;
+ off = maddr - win; /* offset from the start of the window. */
+ t4_write_reg(sc, PCIE_MEM_ACCESS_REG(A_PCIE_MEM_ACCESS_OFFSET, 2), win);
+ t4_read_reg(sc, PCIE_MEM_ACCESS_REG(A_PCIE_MEM_ACCESS_OFFSET, 2));
+
+ remaining = fw->datasize;
+ if (remaining > FLASH_CFG_MAX_SIZE ||
+ remaining > MEMWIN2_APERTURE - off) {
+ device_printf(sc->dev, "cannot upload config file all at once "
+ "(size %u, max %u, room %u).\n",
+ remaining, FLASH_CFG_MAX_SIZE, MEMWIN2_APERTURE - off);
+ return (EFBIG);
+ }
+
+ /*
+ * XXX: sheer laziness. We deliberately added 4 bytes of useless
+ * stuffing/comments at the end of the config file so it's ok to simply
+ * throw away the last remaining bytes when the config file is not an
+ * exact multiple of 4.
+ */
+ b = fw->data;
+ for (i = 0; remaining >= 4; i += 4, remaining -= 4)
+ t4_write_reg(sc, MEMWIN2_BASE + off + i, *b++);
+
+ return (rc);
}
+/*
+ * Partition chip resources for use between various PFs, VFs, etc. This is done
+ * by uploading the firmware configuration file to the adapter and instructing
+ * the firmware to process it.
+ */
static int
-get_capabilities(struct adapter *sc, struct fw_caps_config_cmd *caps)
+partition_resources(struct adapter *sc, const struct firmware *cfg)
{
int rc;
+ struct fw_caps_config_cmd caps;
+ uint32_t mtype, maddr, finicsum, cfcsum;
- bzero(caps, sizeof(*caps));
- caps->op_to_write = htobe32(V_FW_CMD_OP(FW_CAPS_CONFIG_CMD) |
- F_FW_CMD_REQUEST | F_FW_CMD_READ);
- caps->retval_len16 = htobe32(FW_LEN16(*caps));
+ rc = cfg ? upload_config_file(sc, cfg, &mtype, &maddr) : ENOENT;
+ if (rc != 0) {
+ mtype = FW_MEMTYPE_CF_FLASH;
+ maddr = t4_flash_cfg_addr(sc);
+ }
- rc = -t4_wr_mbox(sc, sc->mbox, caps, sizeof(*caps), caps);
- if (rc != 0)
+ bzero(&caps, sizeof(caps));
+ caps.op_to_write = htobe32(V_FW_CMD_OP(FW_CAPS_CONFIG_CMD) |
+ F_FW_CMD_REQUEST | F_FW_CMD_READ);
+ caps.cfvalid_to_len16 = htobe32(F_FW_CAPS_CONFIG_CMD_CFVALID |
+ V_FW_CAPS_CONFIG_CMD_MEMTYPE_CF(mtype) |
+ V_FW_CAPS_CONFIG_CMD_MEMADDR64K_CF(maddr >> 16) | FW_LEN16(caps));
+ rc = -t4_wr_mbox(sc, sc->mbox, &caps, sizeof(caps), &caps);
+ if (rc != 0) {
+ device_printf(sc->dev,
+ "failed to pre-process config file: %d.\n", rc);
return (rc);
+ }
- if (caps->niccaps & htobe16(FW_CAPS_CONFIG_NIC_VM))
- caps->niccaps ^= htobe16(FW_CAPS_CONFIG_NIC_VM);
+ finicsum = be32toh(caps.finicsum);
+ cfcsum = be32toh(caps.cfcsum);
+ if (finicsum != cfcsum) {
+ device_printf(sc->dev,
+ "WARNING: config file checksum mismatch: %08x %08x\n",
+ finicsum, cfcsum);
+ }
+ sc->cfcsum = cfcsum;
+
+#define LIMIT_CAPS(x) do { \
+ caps.x &= htobe16(t4_##x##_allowed); \
+ sc->x = htobe16(caps.x); \
+} while (0)
- caps->op_to_write = htobe32(V_FW_CMD_OP(FW_CAPS_CONFIG_CMD) |
+ /*
+ * Let the firmware know what features will (not) be used so it can tune
+ * things accordingly.
+ */
+ LIMIT_CAPS(linkcaps);
+ LIMIT_CAPS(niccaps);
+ LIMIT_CAPS(toecaps);
+ LIMIT_CAPS(rdmacaps);
+ LIMIT_CAPS(iscsicaps);
+ LIMIT_CAPS(fcoecaps);
+#undef LIMIT_CAPS
+
+ caps.op_to_write = htobe32(V_FW_CMD_OP(FW_CAPS_CONFIG_CMD) |
F_FW_CMD_REQUEST | F_FW_CMD_WRITE);
- rc = -t4_wr_mbox(sc, sc->mbox, caps, sizeof(*caps), NULL);
+ caps.cfvalid_to_len16 = htobe32(FW_LEN16(caps));
+ rc = -t4_wr_mbox(sc, sc->mbox, &caps, sizeof(caps), NULL);
+ if (rc != 0) {
+ device_printf(sc->dev,
+ "failed to process config file: %d.\n", rc);
+ return (rc);
+ }
- return (rc);
+ return (0);
}
+/*
+ * Retrieve parameters that are needed (or nice to have) prior to calling
+ * t4_sge_init and t4_fw_initialize.
+ */
static int
-get_params(struct adapter *sc, struct fw_caps_config_cmd *caps)
+get_params__pre_init(struct adapter *sc)
{
int rc;
- uint32_t params[7], val[7];
+ uint32_t param[2], val[2];
+ struct fw_devlog_cmd cmd;
+ struct devlog_params *dlog = &sc->params.devlog;
-#define FW_PARAM_DEV(param) \
- (V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DEV) | \
- V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DEV_##param))
-#define FW_PARAM_PFVF(param) \
- (V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_PFVF) | \
- V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_PFVF_##param))
-
- params[0] = FW_PARAM_DEV(PORTVEC);
- params[1] = FW_PARAM_PFVF(IQFLINT_START);
- params[2] = FW_PARAM_PFVF(EQ_START);
- params[3] = FW_PARAM_PFVF(FILTER_START);
- params[4] = FW_PARAM_PFVF(FILTER_END);
- rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 5, params, val);
+ param[0] = FW_PARAM_DEV(PORTVEC);
+ param[1] = FW_PARAM_DEV(CCLK);
+ rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 2, param, val);
if (rc != 0) {
device_printf(sc->dev,
- "failed to query parameters: %d.\n", rc);
- goto done;
+ "failed to query parameters (pre_init): %d.\n", rc);
+ return (rc);
}
sc->params.portvec = val[0];
@@ -1509,24 +1784,81 @@ get_params(struct adapter *sc, struct fw_caps_config_cmd *caps)
val[0] &= val[0] - 1;
}
- sc->sge.iq_start = val[1];
- sc->sge.eq_start = val[2];
- sc->tids.ftid_base = val[3];
- sc->tids.nftids = val[4] - val[3] + 1;
+ sc->params.vpd.cclk = val[1];
+
+ /* Read device log parameters. */
+ bzero(&cmd, sizeof(cmd));
+ cmd.op_to_write = htobe32(V_FW_CMD_OP(FW_DEVLOG_CMD) |
+ F_FW_CMD_REQUEST | F_FW_CMD_READ);
+ cmd.retval_len16 = htobe32(FW_LEN16(cmd));
+ rc = -t4_wr_mbox(sc, sc->mbox, &cmd, sizeof(cmd), &cmd);
+ if (rc != 0) {
+ device_printf(sc->dev,
+ "failed to get devlog parameters: %d.\n", rc);
+ bzero(dlog, sizeof (*dlog));
+ rc = 0; /* devlog isn't critical for device operation */
+ } else {
+ val[0] = be32toh(cmd.memtype_devlog_memaddr16_devlog);
+ dlog->memtype = G_FW_DEVLOG_CMD_MEMTYPE_DEVLOG(val[0]);
+ dlog->start = G_FW_DEVLOG_CMD_MEMADDR16_DEVLOG(val[0]) << 4;
+ dlog->size = be32toh(cmd.memsize_devlog);
+ }
- if (caps->toecaps) {
+ return (rc);
+}
+
+/*
+ * Retrieve various parameters that are of interest to the driver. The device
+ * has been initialized by the firmware at this point.
+ */
+static int
+get_params__post_init(struct adapter *sc)
+{
+ int rc;
+ uint32_t param[7], val[7];
+ struct fw_caps_config_cmd caps;
+
+ param[0] = FW_PARAM_PFVF(IQFLINT_START);
+ param[1] = FW_PARAM_PFVF(EQ_START);
+ param[2] = FW_PARAM_PFVF(FILTER_START);
+ param[3] = FW_PARAM_PFVF(FILTER_END);
+ rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 4, param, val);
+ if (rc != 0) {
+ device_printf(sc->dev,
+ "failed to query parameters (post_init): %d.\n", rc);
+ return (rc);
+ }
+
+ sc->sge.iq_start = val[0];
+ sc->sge.eq_start = val[1];
+ sc->tids.ftid_base = val[2];
+ sc->tids.nftids = val[3] - val[2] + 1;
+
+ /* get capabilites */
+ bzero(&caps, sizeof(caps));
+ caps.op_to_write = htobe32(V_FW_CMD_OP(FW_CAPS_CONFIG_CMD) |
+ F_FW_CMD_REQUEST | F_FW_CMD_READ);
+ caps.cfvalid_to_len16 = htobe32(FW_LEN16(caps));
+ rc = -t4_wr_mbox(sc, sc->mbox, &caps, sizeof(caps), &caps);
+ if (rc != 0) {
+ device_printf(sc->dev,
+ "failed to get card capabilities: %d.\n", rc);
+ return (rc);
+ }
+
+ if (caps.toecaps) {
/* query offload-related parameters */
- params[0] = FW_PARAM_DEV(NTID);
- params[1] = FW_PARAM_PFVF(SERVER_START);
- params[2] = FW_PARAM_PFVF(SERVER_END);
- params[3] = FW_PARAM_PFVF(TDDP_START);
- params[4] = FW_PARAM_PFVF(TDDP_END);
- params[5] = FW_PARAM_DEV(FLOWC_BUFFIFO_SZ);
- rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 6, params, val);
+ param[0] = FW_PARAM_DEV(NTID);
+ param[1] = FW_PARAM_PFVF(SERVER_START);
+ param[2] = FW_PARAM_PFVF(SERVER_END);
+ param[3] = FW_PARAM_PFVF(TDDP_START);
+ param[4] = FW_PARAM_PFVF(TDDP_END);
+ param[5] = FW_PARAM_DEV(FLOWC_BUFFIFO_SZ);
+ rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 6, param, val);
if (rc != 0) {
device_printf(sc->dev,
"failed to query TOE parameters: %d.\n", rc);
- goto done;
+ return (rc);
}
sc->tids.ntids = val[0];
sc->tids.natids = min(sc->tids.ntids / 2, MAX_ATIDS);
@@ -1537,18 +1869,18 @@ get_params(struct adapter *sc, struct fw_caps_config_cmd *caps)
sc->params.ofldq_wr_cred = val[5];
sc->params.offload = 1;
}
- if (caps->rdmacaps) {
- params[0] = FW_PARAM_PFVF(STAG_START);
- params[1] = FW_PARAM_PFVF(STAG_END);
- params[2] = FW_PARAM_PFVF(RQ_START);
- params[3] = FW_PARAM_PFVF(RQ_END);
- params[4] = FW_PARAM_PFVF(PBL_START);
- params[5] = FW_PARAM_PFVF(PBL_END);
- rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 6, params, val);
+ if (caps.rdmacaps) {
+ param[0] = FW_PARAM_PFVF(STAG_START);
+ param[1] = FW_PARAM_PFVF(STAG_END);
+ param[2] = FW_PARAM_PFVF(RQ_START);
+ param[3] = FW_PARAM_PFVF(RQ_END);
+ param[4] = FW_PARAM_PFVF(PBL_START);
+ param[5] = FW_PARAM_PFVF(PBL_END);
+ rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 6, param, val);
if (rc != 0) {
device_printf(sc->dev,
- "failed to query RDMA parameters: %d.\n", rc);
- goto done;
+ "failed to query RDMA parameters(1): %d.\n", rc);
+ return (rc);
}
sc->vres.stag.start = val[0];
sc->vres.stag.size = val[1] - val[0] + 1;
@@ -1556,37 +1888,59 @@ get_params(struct adapter *sc, struct fw_caps_config_cmd *caps)
sc->vres.rq.size = val[3] - val[2] + 1;
sc->vres.pbl.start = val[4];
sc->vres.pbl.size = val[5] - val[4] + 1;
+
+ param[0] = FW_PARAM_PFVF(SQRQ_START);
+ param[1] = FW_PARAM_PFVF(SQRQ_END);
+ param[2] = FW_PARAM_PFVF(CQ_START);
+ param[3] = FW_PARAM_PFVF(CQ_END);
+ param[4] = FW_PARAM_PFVF(OCQ_START);
+ param[5] = FW_PARAM_PFVF(OCQ_END);
+ rc = -t4_query_params(sc, 0, 0, 0, 6, param, val);
+ if (rc != 0) {
+ device_printf(sc->dev,
+ "failed to query RDMA parameters(2): %d.\n", rc);
+ return (rc);
+ }
+ sc->vres.qp.start = val[0];
+ sc->vres.qp.size = val[1] - val[0] + 1;
+ sc->vres.cq.start = val[2];
+ sc->vres.cq.size = val[3] - val[2] + 1;
+ sc->vres.ocq.start = val[4];
+ sc->vres.ocq.size = val[5] - val[4] + 1;
}
- if (caps->iscsicaps) {
- params[0] = FW_PARAM_PFVF(ISCSI_START);
- params[1] = FW_PARAM_PFVF(ISCSI_END);
- rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 2, params, val);
+ if (caps.iscsicaps) {
+ param[0] = FW_PARAM_PFVF(ISCSI_START);
+ param[1] = FW_PARAM_PFVF(ISCSI_END);
+ rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 2, param, val);
if (rc != 0) {
device_printf(sc->dev,
"failed to query iSCSI parameters: %d.\n", rc);
- goto done;
+ return (rc);
}
sc->vres.iscsi.start = val[0];
sc->vres.iscsi.size = val[1] - val[0] + 1;
}
-#undef FW_PARAM_PFVF
-#undef FW_PARAM_DEV
-done:
+ /* These are finalized by FW initialization, load their values now */
+ val[0] = t4_read_reg(sc, A_TP_TIMER_RESOLUTION);
+ sc->params.tp.tre = G_TIMERRESOLUTION(val[0]);
+ sc->params.tp.dack_re = G_DELAYEDACKRESOLUTION(val[0]);
+ t4_read_mtu_tbl(sc, sc->params.mtus, NULL);
+
return (rc);
}
+#undef FW_PARAM_PFVF
+#undef FW_PARAM_DEV
+
static void
t4_set_desc(struct adapter *sc)
{
char buf[128];
struct adapter_params *p = &sc->params;
- snprintf(buf, sizeof(buf),
- "Chelsio %s (rev %d) %d port %sNIC PCIe-x%d %d %s, S/N:%s, E/C:%s",
- p->vpd.id, p->rev, p->nports, is_offload(sc) ? "R" : "",
- p->pci.width, sc->intr_count, sc->intr_type == INTR_MSIX ? "MSI-X" :
- (sc->intr_type == INTR_MSI ? "MSI" : "INTx"), p->vpd.sn, p->vpd.ec);
+ snprintf(buf, sizeof(buf), "Chelsio %s %sNIC (rev %d), S/N:%s, E/C:%s",
+ p->vpd.id, is_offload(sc) ? "R" : "", p->rev, p->vpd.sn, p->vpd.ec);
device_set_desc_copy(sc->dev, buf);
}
@@ -1803,9 +2157,7 @@ cxgbe_init_synchronized(struct port_info *pi)
{
struct adapter *sc = pi->adapter;
struct ifnet *ifp = pi->ifp;
- int rc = 0, i;
- uint16_t *rss;
- struct sge_rxq *rxq;
+ int rc = 0;
ADAPTER_LOCK_ASSERT_NOTOWNED(sc);
@@ -1815,30 +2167,13 @@ cxgbe_init_synchronized(struct port_info *pi)
return (0); /* already running */
}
- if (sc->open_device_map == 0 && ((rc = first_port_up(sc)) != 0))
+ if (!(sc->flags & FULL_INIT_DONE) &&
+ ((rc = adapter_full_init(sc)) != 0))
return (rc); /* error message displayed already */
- /*
- * Allocate tx/rx/fl queues for this port.
- */
- rc = t4_setup_eth_queues(pi);
- if (rc != 0)
- goto done; /* error message displayed already */
-
- /*
- * Setup RSS for this port.
- */
- rss = malloc(pi->nrxq * sizeof (*rss), M_CXGBE, M_ZERO | M_WAITOK);
- for_each_rxq(pi, i, rxq) {
- rss[i] = rxq->iq.abs_id;
- }
- rc = -t4_config_rss_range(sc, sc->mbox, pi->viid, 0, pi->rss_size, rss,
- pi->nrxq);
- free(rss, M_CXGBE);
- if (rc != 0) {
- if_printf(ifp, "rss_config failed: %d\n", rc);
- goto done;
- }
+ if (!(pi->flags & PORT_INIT_DONE) &&
+ ((rc = port_full_init(pi)) != 0))
+ return (rc); /* error message displayed already */
PORT_LOCK(pi);
rc = update_mac_settings(pi, XGMAC_ALL);
@@ -1857,12 +2192,10 @@ cxgbe_init_synchronized(struct port_info *pi)
if_printf(ifp, "enable_vi failed: %d\n", rc);
goto done;
}
- pi->flags |= VI_ENABLED;
/* all ok */
setbit(&sc->open_device_map, pi->port_id);
ifp->if_drv_flags |= IFF_DRV_RUNNING;
- ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
callout_reset(&pi->tick, hz, cxgbe_tick, pi);
done:
@@ -1915,51 +2248,28 @@ cxgbe_uninit_synchronized(struct port_info *pi)
struct ifnet *ifp = pi->ifp;
int rc;
- /*
- * taskqueue_drain may cause a deadlock if the adapter lock is held.
- */
ADAPTER_LOCK_ASSERT_NOTOWNED(sc);
/*
- * Clear this port's bit from the open device map, and then drain
- * tasks and callouts.
+ * Disable the VI so that all its data in either direction is discarded
+ * by the MPS. Leave everything else (the queues, interrupts, and 1Hz
+ * tick) intact as the TP can deliver negative advice or data that it's
+ * holding in its RAM (for an offloaded connection) even after the VI is
+ * disabled.
*/
- clrbit(&sc->open_device_map, pi->port_id);
-
- PORT_LOCK(pi);
- ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);
- callout_stop(&pi->tick);
- PORT_UNLOCK(pi);
- callout_drain(&pi->tick);
-
- /*
- * Stop and then free the queues' resources, including the queues
- * themselves.
- *
- * XXX: we could just stop the queues here (on ifconfig down) and free
- * them later (on port detach), but having up/down go through the entire
- * allocate/activate/deactivate/free sequence is a good way to find
- * leaks and bugs.
- */
- rc = t4_teardown_eth_queues(pi);
- if (rc != 0)
- if_printf(ifp, "teardown failed: %d\n", rc);
-
- if (pi->flags & VI_ENABLED) {
- rc = -t4_enable_vi(sc, sc->mbox, pi->viid, false, false);
- if (rc)
- if_printf(ifp, "disable_vi failed: %d\n", rc);
- else
- pi->flags &= ~VI_ENABLED;
+ rc = -t4_enable_vi(sc, sc->mbox, pi->viid, false, false);
+ if (rc) {
+ if_printf(ifp, "disable_vi failed: %d\n", rc);
+ return (rc);
}
+ clrbit(&sc->open_device_map, pi->port_id);
+ ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
+
pi->link_cfg.link_ok = 0;
pi->link_cfg.speed = 0;
t4_os_link_changed(sc, pi->port_id, 0);
- if (sc->open_device_map == 0)
- last_port_down(sc);
-
return (0);
}
@@ -1968,15 +2278,22 @@ cxgbe_uninit_synchronized(struct port_info *pi)
if (rc != 0) \
goto done; \
} while (0)
+
static int
-first_port_up(struct adapter *sc)
+adapter_full_init(struct adapter *sc)
{
int rc, i, rid, p, q;
char s[8];
struct irq *irq;
- struct sge_iq *intrq;
+ struct port_info *pi;
+ struct sge_rxq *rxq;
+#ifndef TCP_OFFLOAD_DISABLE
+ struct sge_ofld_rxq *ofld_rxq;
+#endif
ADAPTER_LOCK_ASSERT_NOTOWNED(sc);
+ KASSERT((sc->flags & FULL_INIT_DONE) == 0,
+ ("%s: FULL_INIT_DONE already", __func__));
/*
* queues that belong to the adapter (not any particular port).
@@ -1985,95 +2302,265 @@ first_port_up(struct adapter *sc)
if (rc != 0)
goto done;
+ for (i = 0; i < ARRAY_SIZE(sc->tq); i++) {
+ sc->tq[i] = taskqueue_create("t4 taskq", M_NOWAIT,
+ taskqueue_thread_enqueue, &sc->tq[i]);
+ if (sc->tq[i] == NULL) {
+ device_printf(sc->dev,
+ "failed to allocate task queue %d\n", i);
+ rc = ENOMEM;
+ goto done;
+ }
+ taskqueue_start_threads(&sc->tq[i], 1, PI_NET, "%s tq%d",
+ device_get_nameunit(sc->dev), i);
+ }
+
/*
* Setup interrupts.
*/
irq = &sc->irq[0];
rid = sc->intr_type == INTR_INTX ? 0 : 1;
if (sc->intr_count == 1) {
- KASSERT(sc->flags & INTR_SHARED,
- ("%s: single interrupt but not shared?", __func__));
+ KASSERT(!(sc->flags & INTR_DIRECT),
+ ("%s: single interrupt && INTR_DIRECT?", __func__));
T4_ALLOC_IRQ(sc, irq, rid, t4_intr_all, sc, "all");
} else {
- /* Multiple interrupts. The first one is always error intr */
+ /* Multiple interrupts. */
+ KASSERT(sc->intr_count >= T4_EXTRA_INTR + sc->params.nports,
+ ("%s: too few intr.", __func__));
+
+ /* The first one is always error intr */
T4_ALLOC_IRQ(sc, irq, rid, t4_intr_err, sc, "err");
irq++;
rid++;
- /* Firmware event queue normally has an interrupt of its own */
- if (sc->intr_count > T4_EXTRA_INTR) {
- T4_ALLOC_IRQ(sc, irq, rid, t4_intr_evt, &sc->sge.fwq,
- "evt");
- irq++;
- rid++;
- }
-
- intrq = &sc->sge.intrq[0];
- if (sc->flags & INTR_SHARED) {
+ /* The second one is always the firmware event queue */
+ T4_ALLOC_IRQ(sc, irq, rid, t4_intr_evt, &sc->sge.fwq, "evt");
+ irq++;
+ rid++;
- /* All ports share these interrupt queues */
+ /*
+ * Note that if INTR_DIRECT is not set then either the NIC rx
+ * queues or (exclusive or) the TOE rx queueus will be taking
+ * direct interrupts.
+ *
+ * There is no need to check for is_offload(sc) as nofldrxq
+ * will be 0 if offload is disabled.
+ */
+ for_each_port(sc, p) {
+ pi = sc->port[p];
- for (i = 0; i < NINTRQ(sc); i++) {
- snprintf(s, sizeof(s), "*.%d", i);
- T4_ALLOC_IRQ(sc, irq, rid, t4_intr, intrq, s);
+#ifndef TCP_OFFLOAD_DISABLE
+ /*
+ * Skip over the NIC queues if they aren't taking direct
+ * interrupts.
+ */
+ if (!(sc->flags & INTR_DIRECT) &&
+ pi->nofldrxq > pi->nrxq)
+ goto ofld_queues;
+#endif
+ rxq = &sc->sge.rxq[pi->first_rxq];
+ for (q = 0; q < pi->nrxq; q++, rxq++) {
+ snprintf(s, sizeof(s), "%d.%d", p, q);
+ T4_ALLOC_IRQ(sc, irq, rid, t4_intr, rxq, s);
irq++;
rid++;
- intrq++;
}
- } else {
-
- /* Each port has its own set of interrupt queues */
- for (p = 0; p < sc->params.nports; p++) {
- for (q = 0; q < sc->port[p]->nrxq; q++) {
- snprintf(s, sizeof(s), "%d.%d", p, q);
- T4_ALLOC_IRQ(sc, irq, rid, t4_intr,
- intrq, s);
- irq++;
- rid++;
- intrq++;
- }
+#ifndef TCP_OFFLOAD_DISABLE
+ /*
+ * Skip over the offload queues if they aren't taking
+ * direct interrupts.
+ */
+ if (!(sc->flags & INTR_DIRECT))
+ continue;
+ofld_queues:
+ ofld_rxq = &sc->sge.ofld_rxq[pi->first_ofld_rxq];
+ for (q = 0; q < pi->nofldrxq; q++, ofld_rxq++) {
+ snprintf(s, sizeof(s), "%d,%d", p, q);
+ T4_ALLOC_IRQ(sc, irq, rid, t4_intr, ofld_rxq, s);
+ irq++;
+ rid++;
}
+#endif
}
}
t4_intr_enable(sc);
sc->flags |= FULL_INIT_DONE;
-
done:
if (rc != 0)
- last_port_down(sc);
+ adapter_full_uninit(sc);
return (rc);
}
#undef T4_ALLOC_IRQ
-/*
- * Idempotent.
- */
static int
-last_port_down(struct adapter *sc)
+adapter_full_uninit(struct adapter *sc)
{
int i;
ADAPTER_LOCK_ASSERT_NOTOWNED(sc);
- t4_intr_disable(sc);
-
t4_teardown_adapter_queues(sc);
for (i = 0; i < sc->intr_count; i++)
t4_free_irq(sc, &sc->irq[i]);
+ for (i = 0; i < ARRAY_SIZE(sc->tq) && sc->tq[i]; i++) {
+ taskqueue_free(sc->tq[i]);
+ sc->tq[i] = NULL;
+ }
+
sc->flags &= ~FULL_INIT_DONE;
return (0);
}
static int
+port_full_init(struct port_info *pi)
+{
+ struct adapter *sc = pi->adapter;
+ struct ifnet *ifp = pi->ifp;
+ uint16_t *rss;
+ struct sge_rxq *rxq;
+ int rc, i;
+
+ ADAPTER_LOCK_ASSERT_NOTOWNED(sc);
+ KASSERT((pi->flags & PORT_INIT_DONE) == 0,
+ ("%s: PORT_INIT_DONE already", __func__));
+
+ sysctl_ctx_init(&pi->ctx);
+ pi->flags |= PORT_SYSCTL_CTX;
+
+ /*
+ * Allocate tx/rx/fl queues for this port.
+ */
+ rc = t4_setup_port_queues(pi);
+ if (rc != 0)
+ goto done; /* error message displayed already */
+
+ /*
+ * Setup RSS for this port.
+ */
+ rss = malloc(pi->nrxq * sizeof (*rss), M_CXGBE,
+ M_ZERO | M_WAITOK);
+ for_each_rxq(pi, i, rxq) {
+ rss[i] = rxq->iq.abs_id;
+ }
+ rc = -t4_config_rss_range(sc, sc->mbox, pi->viid, 0,
+ pi->rss_size, rss, pi->nrxq);
+ free(rss, M_CXGBE);
+ if (rc != 0) {
+ if_printf(ifp, "rss_config failed: %d\n", rc);
+ goto done;
+ }
+
+ pi->flags |= PORT_INIT_DONE;
+done:
+ if (rc != 0)
+ port_full_uninit(pi);
+
+ return (rc);
+}
+
+/*
+ * Idempotent.
+ */
+static int
+port_full_uninit(struct port_info *pi)
+{
+ struct adapter *sc = pi->adapter;
+ int i;
+ struct sge_rxq *rxq;
+ struct sge_txq *txq;
+#ifndef TCP_OFFLOAD_DISABLE
+ struct sge_ofld_rxq *ofld_rxq;
+ struct sge_wrq *ofld_txq;
+#endif
+
+ if (pi->flags & PORT_INIT_DONE) {
+
+ /* Need to quiesce queues. XXX: ctrl queues? */
+
+ for_each_txq(pi, i, txq) {
+ quiesce_eq(sc, &txq->eq);
+ }
+
+#ifndef TCP_OFFLOAD_DISABLE
+ for_each_ofld_txq(pi, i, ofld_txq) {
+ quiesce_eq(sc, &ofld_txq->eq);
+ }
+#endif
+
+ for_each_rxq(pi, i, rxq) {
+ quiesce_iq(sc, &rxq->iq);
+ quiesce_fl(sc, &rxq->fl);
+ }
+
+#ifndef TCP_OFFLOAD_DISABLE
+ for_each_ofld_rxq(pi, i, ofld_rxq) {
+ quiesce_iq(sc, &ofld_rxq->iq);
+ quiesce_fl(sc, &ofld_rxq->fl);
+ }
+#endif
+ }
+
+ t4_teardown_port_queues(pi);
+ pi->flags &= ~PORT_INIT_DONE;
+
+ return (0);
+}
+
+static void
+quiesce_eq(struct adapter *sc, struct sge_eq *eq)
+{
+ EQ_LOCK(eq);
+ eq->flags |= EQ_DOOMED;
+
+ /*
+ * Wait for the response to a credit flush if one's
+ * pending.
+ */
+ while (eq->flags & EQ_CRFLUSHED)
+ mtx_sleep(eq, &eq->eq_lock, 0, "crflush", 0);
+ EQ_UNLOCK(eq);
+
+ callout_drain(&eq->tx_callout); /* XXX: iffy */
+ pause("callout", 10); /* Still iffy */
+
+ taskqueue_drain(sc->tq[eq->tx_chan], &eq->tx_task);
+}
+
+static void
+quiesce_iq(struct adapter *sc, struct sge_iq *iq)
+{
+ (void) sc; /* unused */
+
+ /* Synchronize with the interrupt handler */
+ while (!atomic_cmpset_int(&iq->state, IQS_IDLE, IQS_DISABLED))
+ pause("iqfree", 1);
+}
+
+static void
+quiesce_fl(struct adapter *sc, struct sge_fl *fl)
+{
+ mtx_lock(&sc->sfl_lock);
+ FL_LOCK(fl);
+ fl->flags |= FL_DOOMED;
+ FL_UNLOCK(fl);
+ mtx_unlock(&sc->sfl_lock);
+
+ callout_drain(&sc->sfl_callout);
+ KASSERT((fl->flags & FL_STARVING) == 0,
+ ("%s: still starving", __func__));
+}
+
+static int
t4_alloc_irq(struct adapter *sc, struct irq *irq, int rid,
- iq_intr_handler_t *handler, void *arg, char *name)
+ driver_intr_t *handler, void *arg, char *name)
{
int rc;
@@ -2365,12 +2852,12 @@ cxgbe_tick(void *arg)
t4_get_port_stats(pi->adapter, pi->tx_chan, s);
- ifp->if_opackets = s->tx_frames;
- ifp->if_ipackets = s->rx_frames;
- ifp->if_obytes = s->tx_octets;
- ifp->if_ibytes = s->rx_octets;
- ifp->if_omcasts = s->tx_mcast_frames;
- ifp->if_imcasts = s->rx_mcast_frames;
+ ifp->if_opackets = s->tx_frames - s->tx_pause;
+ ifp->if_ipackets = s->rx_frames - s->rx_pause;
+ ifp->if_obytes = s->tx_octets - s->tx_pause * 64;
+ ifp->if_ibytes = s->rx_octets - s->rx_pause * 64;
+ ifp->if_omcasts = s->tx_mcast_frames - s->tx_pause;
+ ifp->if_imcasts = s->rx_mcast_frames - s->rx_pause;
ifp->if_iqdrops = s->rx_ovflow0 + s->rx_ovflow1 + s->rx_ovflow2 +
s->rx_ovflow3;
@@ -2388,15 +2875,58 @@ cxgbe_tick(void *arg)
}
static int
+cpl_not_handled(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m)
+{
+#ifdef INVARIANTS
+ panic("%s: opcode %02x on iq %p with payload %p",
+ __func__, rss->opcode, iq, m);
+#else
+ log(LOG_ERR, "%s: opcode %02x on iq %p with payload %p",
+ __func__, rss->opcode, iq, m);
+ m_freem(m);
+#endif
+ return (EDOOFUS);
+}
+
+int
+t4_register_cpl_handler(struct adapter *sc, int opcode, cpl_handler_t h)
+{
+ uintptr_t *loc, new;
+
+ if (opcode >= ARRAY_SIZE(sc->cpl_handler))
+ return (EINVAL);
+
+ new = h ? (uintptr_t)h : (uintptr_t)cpl_not_handled;
+ loc = (uintptr_t *) &sc->cpl_handler[opcode];
+ atomic_store_rel_ptr(loc, new);
+
+ return (0);
+}
+
+static int
t4_sysctls(struct adapter *sc)
{
struct sysctl_ctx_list *ctx;
struct sysctl_oid *oid;
- struct sysctl_oid_list *children;
+ struct sysctl_oid_list *children, *c0;
+ static char *caps[] = {
+ "\20\1PPP\2QFC\3DCBX", /* caps[0] linkcaps */
+ "\20\1NIC\2VM\3IDS\4UM\5UM_ISGL", /* caps[1] niccaps */
+ "\20\1TOE", /* caps[2] toecaps */
+ "\20\1RDDP\2RDMAC", /* caps[3] rdmacaps */
+ "\20\1INITIATOR_PDU\2TARGET_PDU" /* caps[4] iscsicaps */
+ "\3INITIATOR_CNXOFLD\4TARGET_CNXOFLD"
+ "\5INITIATOR_SSNOFLD\6TARGET_SSNOFLD",
+ "\20\1INITIATOR\2TARGET\3CTRL_OFLD" /* caps[5] fcoecaps */
+ };
ctx = device_get_sysctl_ctx(sc->dev);
+
+ /*
+ * dev.t4nex.X.
+ */
oid = device_get_sysctl_tree(sc->dev);
- children = SYSCTL_CHILDREN(oid);
+ c0 = children = SYSCTL_CHILDREN(oid);
SYSCTL_ADD_INT(ctx, children, OID_AUTO, "nports", CTLFLAG_RD,
&sc->params.nports, 0, "# of ports");
@@ -2407,23 +2937,146 @@ t4_sysctls(struct adapter *sc)
SYSCTL_ADD_STRING(ctx, children, OID_AUTO, "firmware_version",
CTLFLAG_RD, &sc->fw_version, 0, "firmware version");
- SYSCTL_ADD_INT(ctx, children, OID_AUTO, "TOE", CTLFLAG_RD,
- &sc->params.offload, 0, "hardware is capable of TCP offload");
+ SYSCTL_ADD_STRING(ctx, children, OID_AUTO, "cf",
+ CTLFLAG_RD, &t4_cfg_file, 0, "configuration file");
+
+ SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "cfcsum", CTLFLAG_RD,
+ &sc->cfcsum, 0, "config file checksum");
+
+ SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "linkcaps",
+ CTLTYPE_STRING | CTLFLAG_RD, caps[0], sc->linkcaps,
+ sysctl_bitfield, "A", "available link capabilities");
+
+ SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "niccaps",
+ CTLTYPE_STRING | CTLFLAG_RD, caps[1], sc->niccaps,
+ sysctl_bitfield, "A", "available NIC capabilities");
+
+ SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "toecaps",
+ CTLTYPE_STRING | CTLFLAG_RD, caps[2], sc->toecaps,
+ sysctl_bitfield, "A", "available TCP offload capabilities");
+
+ SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "rdmacaps",
+ CTLTYPE_STRING | CTLFLAG_RD, caps[3], sc->rdmacaps,
+ sysctl_bitfield, "A", "available RDMA capabilities");
+
+ SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "iscsicaps",
+ CTLTYPE_STRING | CTLFLAG_RD, caps[4], sc->iscsicaps,
+ sysctl_bitfield, "A", "available iSCSI capabilities");
+
+ SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "fcoecaps",
+ CTLTYPE_STRING | CTLFLAG_RD, caps[5], sc->fcoecaps,
+ sysctl_bitfield, "A", "available FCoE capabilities");
SYSCTL_ADD_INT(ctx, children, OID_AUTO, "core_clock", CTLFLAG_RD,
&sc->params.vpd.cclk, 0, "core clock frequency (in KHz)");
SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "holdoff_timers",
- CTLTYPE_STRING | CTLFLAG_RD, &intr_timer, sizeof(intr_timer),
- sysctl_int_array, "A", "interrupt holdoff timer values (us)");
+ CTLTYPE_STRING | CTLFLAG_RD, sc->sge.timer_val,
+ sizeof(sc->sge.timer_val), sysctl_int_array, "A",
+ "interrupt holdoff timer values (us)");
SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "holdoff_pkt_counts",
- CTLTYPE_STRING | CTLFLAG_RD, &intr_pktcount, sizeof(intr_pktcount),
- sysctl_int_array, "A", "interrupt holdoff packet counter values");
+ CTLTYPE_STRING | CTLFLAG_RD, sc->sge.counter_val,
+ sizeof(sc->sge.counter_val), sysctl_int_array, "A",
+ "interrupt holdoff packet counter values");
+
+ /*
+ * dev.t4nex.X.misc. Marked CTLFLAG_SKIP to avoid information overload.
+ */
+ oid = SYSCTL_ADD_NODE(ctx, c0, OID_AUTO, "misc",
+ CTLFLAG_RD | CTLFLAG_SKIP, NULL,
+ "logs and miscellaneous information");
+ children = SYSCTL_CHILDREN(oid);
+
+ SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "cctrl",
+ CTLTYPE_STRING | CTLFLAG_RD, sc, 0,
+ sysctl_cctrl, "A", "congestion control");
+
+ SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "cpl_stats",
+ CTLTYPE_STRING | CTLFLAG_RD, sc, 0,
+ sysctl_cpl_stats, "A", "CPL statistics");
+
+ SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "ddp_stats",
+ CTLTYPE_STRING | CTLFLAG_RD, sc, 0,
+ sysctl_ddp_stats, "A", "DDP statistics");
SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "devlog",
CTLTYPE_STRING | CTLFLAG_RD, sc, 0,
- sysctl_devlog, "A", "device log");
+ sysctl_devlog, "A", "firmware's device log");
+
+ SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "fcoe_stats",
+ CTLTYPE_STRING | CTLFLAG_RD, sc, 0,
+ sysctl_fcoe_stats, "A", "FCoE statistics");
+
+ SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "hw_sched",
+ CTLTYPE_STRING | CTLFLAG_RD, sc, 0,
+ sysctl_hw_sched, "A", "hardware scheduler ");
+
+ SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "l2t",
+ CTLTYPE_STRING | CTLFLAG_RD, sc, 0,
+ sysctl_l2t, "A", "hardware L2 table");
+
+ SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "lb_stats",
+ CTLTYPE_STRING | CTLFLAG_RD, sc, 0,
+ sysctl_lb_stats, "A", "loopback statistics");
+
+ SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "meminfo",
+ CTLTYPE_STRING | CTLFLAG_RD, sc, 0,
+ sysctl_meminfo, "A", "memory regions");
+
+ SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "path_mtus",
+ CTLTYPE_STRING | CTLFLAG_RD, sc, 0,
+ sysctl_path_mtus, "A", "path MTUs");
+
+ SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "pm_stats",
+ CTLTYPE_STRING | CTLFLAG_RD, sc, 0,
+ sysctl_pm_stats, "A", "PM statistics");
+
+ SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "rdma_stats",
+ CTLTYPE_STRING | CTLFLAG_RD, sc, 0,
+ sysctl_rdma_stats, "A", "RDMA statistics");
+
+ SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "tcp_stats",
+ CTLTYPE_STRING | CTLFLAG_RD, sc, 0,
+ sysctl_tcp_stats, "A", "TCP statistics");
+
+ SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "tids",
+ CTLTYPE_STRING | CTLFLAG_RD, sc, 0,
+ sysctl_tids, "A", "TID information");
+
+ SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "tp_err_stats",
+ CTLTYPE_STRING | CTLFLAG_RD, sc, 0,
+ sysctl_tp_err_stats, "A", "TP error statistics");
+
+ SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "tx_rate",
+ CTLTYPE_STRING | CTLFLAG_RD, sc, 0,
+ sysctl_tx_rate, "A", "Tx rate");
+
+#ifndef TCP_OFFLOAD_DISABLE
+ if (is_offload(sc)) {
+ /*
+ * dev.t4nex.X.toe.
+ */
+ oid = SYSCTL_ADD_NODE(ctx, c0, OID_AUTO, "toe", CTLFLAG_RD,
+ NULL, "TOE parameters");
+ children = SYSCTL_CHILDREN(oid);
+
+ sc->tt.sndbuf = 256 * 1024;
+ SYSCTL_ADD_INT(ctx, children, OID_AUTO, "sndbuf", CTLFLAG_RW,
+ &sc->tt.sndbuf, 0, "max hardware send buffer size");
+
+ sc->tt.ddp = 0;
+ SYSCTL_ADD_INT(ctx, children, OID_AUTO, "ddp", CTLFLAG_RW,
+ &sc->tt.ddp, 0, "DDP allowed");
+ sc->tt.indsz = M_INDICATESIZE;
+ SYSCTL_ADD_INT(ctx, children, OID_AUTO, "indsz", CTLFLAG_RW,
+ &sc->tt.indsz, 0, "DDP max indicate size allowed");
+ sc->tt.ddp_thres = 3*4096;
+ SYSCTL_ADD_INT(ctx, children, OID_AUTO, "ddp_thres", CTLFLAG_RW,
+ &sc->tt.ddp_thres, 0, "DDP threshold");
+ }
+#endif
+
return (0);
}
@@ -2452,6 +3105,23 @@ cxgbe_sysctls(struct port_info *pi)
SYSCTL_ADD_INT(ctx, children, OID_AUTO, "first_txq", CTLFLAG_RD,
&pi->first_txq, 0, "index of first tx queue");
+#ifndef TCP_OFFLOAD_DISABLE
+ if (is_offload(pi->adapter)) {
+ SYSCTL_ADD_INT(ctx, children, OID_AUTO, "nofldrxq", CTLFLAG_RD,
+ &pi->nofldrxq, 0,
+ "# of rx queues for offloaded TCP connections");
+ SYSCTL_ADD_INT(ctx, children, OID_AUTO, "nofldtxq", CTLFLAG_RD,
+ &pi->nofldtxq, 0,
+ "# of tx queues for offloaded TCP connections");
+ SYSCTL_ADD_INT(ctx, children, OID_AUTO, "first_ofld_rxq",
+ CTLFLAG_RD, &pi->first_ofld_rxq, 0,
+ "index of first TOE rx queue");
+ SYSCTL_ADD_INT(ctx, children, OID_AUTO, "first_ofld_txq",
+ CTLFLAG_RD, &pi->first_ofld_txq, 0,
+ "index of first TOE tx queue");
+ }
+#endif
+
SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "holdoff_tmr_idx",
CTLTYPE_INT | CTLFLAG_RW, pi, 0, sysctl_holdoff_tmr_idx, "I",
"holdoff timer index");
@@ -2642,11 +3312,31 @@ sysctl_int_array(SYSCTL_HANDLER_ARGS)
}
static int
+sysctl_bitfield(SYSCTL_HANDLER_ARGS)
+{
+ int rc;
+ struct sbuf *sb;
+
+ rc = sysctl_wire_old_buffer(req, 0);
+ if (rc != 0)
+ return(rc);
+
+ sb = sbuf_new_for_sysctl(NULL, NULL, 128, req);
+ if (sb == NULL)
+ return (ENOMEM);
+
+ sbuf_printf(sb, "%b", (int)arg2, (char *)arg1);
+ rc = sbuf_finish(sb);
+ sbuf_delete(sb);
+
+ return (rc);
+}
+
+static int
sysctl_holdoff_tmr_idx(SYSCTL_HANDLER_ARGS)
{
struct port_info *pi = arg1;
struct adapter *sc = pi->adapter;
- struct sge_rxq *rxq;
int idx, rc, i;
idx = pi->tmr_idx;
@@ -2661,9 +3351,16 @@ sysctl_holdoff_tmr_idx(SYSCTL_HANDLER_ARGS)
ADAPTER_LOCK(sc);
rc = IS_DOOMED(pi) ? ENXIO : (IS_BUSY(sc) ? EBUSY : 0);
if (rc == 0) {
+ struct sge_rxq *rxq;
+ uint8_t v;
+
+ v = V_QINTR_TIMER_IDX(idx) | V_QINTR_CNT_EN(pi->pktc_idx != -1);
for_each_rxq(pi, i, rxq) {
- rxq->iq.intr_params = V_QINTR_TIMER_IDX(idx) |
- V_QINTR_CNT_EN(pi->pktc_idx != -1);
+#ifdef atomic_store_rel_8
+ atomic_store_rel_8(&rxq->iq.intr_params, v);
+#else
+ rxq->iq.intr_params = v;
+#endif
}
pi->tmr_idx = idx;
}
@@ -2690,8 +3387,8 @@ sysctl_holdoff_pktc_idx(SYSCTL_HANDLER_ARGS)
ADAPTER_LOCK(sc);
rc = IS_DOOMED(pi) ? ENXIO : (IS_BUSY(sc) ? EBUSY : 0);
- if (rc == 0 && pi->ifp->if_drv_flags & IFF_DRV_RUNNING)
- rc = EBUSY; /* can be changed only when port is down */
+ if (rc == 0 && pi->flags & PORT_INIT_DONE)
+ rc = EBUSY; /* cannot be changed once the queues are created */
if (rc == 0)
pi->pktc_idx = idx;
@@ -2718,8 +3415,8 @@ sysctl_qsize_rxq(SYSCTL_HANDLER_ARGS)
ADAPTER_LOCK(sc);
rc = IS_DOOMED(pi) ? ENXIO : (IS_BUSY(sc) ? EBUSY : 0);
- if (rc == 0 && pi->ifp->if_drv_flags & IFF_DRV_RUNNING)
- rc = EBUSY; /* can be changed only when port is down */
+ if (rc == 0 && pi->flags & PORT_INIT_DONE)
+ rc = EBUSY; /* cannot be changed once the queues are created */
if (rc == 0)
pi->qsize_rxq = qsize;
@@ -2746,8 +3443,8 @@ sysctl_qsize_txq(SYSCTL_HANDLER_ARGS)
ADAPTER_LOCK(sc);
rc = IS_DOOMED(pi) ? ENXIO : (IS_BUSY(sc) ? EBUSY : 0);
- if (rc == 0 && pi->ifp->if_drv_flags & IFF_DRV_RUNNING)
- rc = EBUSY; /* can be changed only when port is down */
+ if (rc == 0 && pi->flags & PORT_INIT_DONE)
+ rc = EBUSY; /* cannot be changed once the queues are created */
if (rc == 0)
pi->qsize_txq = qsize;
@@ -2768,6 +3465,103 @@ sysctl_handle_t4_reg64(SYSCTL_HANDLER_ARGS)
return (sysctl_handle_64(oidp, &val, 0, req));
}
+static int
+sysctl_cctrl(SYSCTL_HANDLER_ARGS)
+{
+ struct adapter *sc = arg1;
+ struct sbuf *sb;
+ int rc, i;
+ uint16_t incr[NMTUS][NCCTRL_WIN];
+ static const char *dec_fac[] = {
+ "0.5", "0.5625", "0.625", "0.6875", "0.75", "0.8125", "0.875",
+ "0.9375"
+ };
+
+ rc = sysctl_wire_old_buffer(req, 0);
+ if (rc != 0)
+ return (rc);
+
+ sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req);
+ if (sb == NULL)
+ return (ENOMEM);
+
+ t4_read_cong_tbl(sc, incr);
+
+ for (i = 0; i < NCCTRL_WIN; ++i) {
+ sbuf_printf(sb, "%2d: %4u %4u %4u %4u %4u %4u %4u %4u\n", i,
+ incr[0][i], incr[1][i], incr[2][i], incr[3][i], incr[4][i],
+ incr[5][i], incr[6][i], incr[7][i]);
+ sbuf_printf(sb, "%8u %4u %4u %4u %4u %4u %4u %4u %5u %s\n",
+ incr[8][i], incr[9][i], incr[10][i], incr[11][i],
+ incr[12][i], incr[13][i], incr[14][i], incr[15][i],
+ sc->params.a_wnd[i], dec_fac[sc->params.b_wnd[i]]);
+ }
+
+ rc = sbuf_finish(sb);
+ sbuf_delete(sb);
+
+ return (rc);
+}
+
+static int
+sysctl_cpl_stats(SYSCTL_HANDLER_ARGS)
+{
+ struct adapter *sc = arg1;
+ struct sbuf *sb;
+ int rc;
+ struct tp_cpl_stats stats;
+
+ rc = sysctl_wire_old_buffer(req, 0);
+ if (rc != 0)
+ return (rc);
+
+ sb = sbuf_new_for_sysctl(NULL, NULL, 256, req);
+ if (sb == NULL)
+ return (ENOMEM);
+
+ t4_tp_get_cpl_stats(sc, &stats);
+
+ sbuf_printf(sb, " channel 0 channel 1 channel 2 "
+ "channel 3\n");
+ sbuf_printf(sb, "CPL requests: %10u %10u %10u %10u\n",
+ stats.req[0], stats.req[1], stats.req[2], stats.req[3]);
+ sbuf_printf(sb, "CPL responses: %10u %10u %10u %10u",
+ stats.rsp[0], stats.rsp[1], stats.rsp[2], stats.rsp[3]);
+
+ rc = sbuf_finish(sb);
+ sbuf_delete(sb);
+
+ return (rc);
+}
+
+static int
+sysctl_ddp_stats(SYSCTL_HANDLER_ARGS)
+{
+ struct adapter *sc = arg1;
+ struct sbuf *sb;
+ int rc;
+ struct tp_usm_stats stats;
+
+ rc = sysctl_wire_old_buffer(req, 0);
+ if (rc != 0)
+ return(rc);
+
+ sb = sbuf_new_for_sysctl(NULL, NULL, 256, req);
+ if (sb == NULL)
+ return (ENOMEM);
+
+ t4_get_usm_stats(sc, &stats);
+
+ sbuf_printf(sb, "Frames: %u\n", stats.frames);
+ sbuf_printf(sb, "Octets: %ju\n", stats.octets);
+ sbuf_printf(sb, "Drops: %u", stats.drops);
+
+ rc = sbuf_finish(sb);
+ sbuf_delete(sb);
+
+ return (rc);
+}
+
const char *devlog_level_strings[] = {
[FW_DEVLOG_LEVEL_EMERG] = "EMERG",
[FW_DEVLOG_LEVEL_CRIT] = "CRIT",
@@ -2852,7 +3646,11 @@ sysctl_devlog(SYSCTL_HANDLER_ARGS)
goto done;
sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req);
- sbuf_printf(sb, "\n%10s %15s %8s %8s %s\n",
+ if (sb == NULL) {
+ rc = ENOMEM;
+ goto done;
+ }
+ sbuf_printf(sb, "%10s %15s %8s %8s %s\n",
"Seq#", "Tstamp", "Level", "Facility", "Message");
i = first;
@@ -2882,6 +3680,624 @@ done:
return (rc);
}
+static int
+sysctl_fcoe_stats(SYSCTL_HANDLER_ARGS)
+{
+ struct adapter *sc = arg1;
+ struct sbuf *sb;
+ int rc;
+ struct tp_fcoe_stats stats[4];
+
+ rc = sysctl_wire_old_buffer(req, 0);
+ if (rc != 0)
+ return (rc);
+
+ sb = sbuf_new_for_sysctl(NULL, NULL, 256, req);
+ if (sb == NULL)
+ return (ENOMEM);
+
+ t4_get_fcoe_stats(sc, 0, &stats[0]);
+ t4_get_fcoe_stats(sc, 1, &stats[1]);
+ t4_get_fcoe_stats(sc, 2, &stats[2]);
+ t4_get_fcoe_stats(sc, 3, &stats[3]);
+
+ sbuf_printf(sb, " channel 0 channel 1 "
+ "channel 2 channel 3\n");
+ sbuf_printf(sb, "octetsDDP: %16ju %16ju %16ju %16ju\n",
+ stats[0].octetsDDP, stats[1].octetsDDP, stats[2].octetsDDP,
+ stats[3].octetsDDP);
+ sbuf_printf(sb, "framesDDP: %16u %16u %16u %16u\n", stats[0].framesDDP,
+ stats[1].framesDDP, stats[2].framesDDP, stats[3].framesDDP);
+ sbuf_printf(sb, "framesDrop: %16u %16u %16u %16u",
+ stats[0].framesDrop, stats[1].framesDrop, stats[2].framesDrop,
+ stats[3].framesDrop);
+
+ rc = sbuf_finish(sb);
+ sbuf_delete(sb);
+
+ return (rc);
+}
+
+static int
+sysctl_hw_sched(SYSCTL_HANDLER_ARGS)
+{
+ struct adapter *sc = arg1;
+ struct sbuf *sb;
+ int rc, i;
+ unsigned int map, kbps, ipg, mode;
+ unsigned int pace_tab[NTX_SCHED];
+
+ rc = sysctl_wire_old_buffer(req, 0);
+ if (rc != 0)
+ return (rc);
+
+ sb = sbuf_new_for_sysctl(NULL, NULL, 256, req);
+ if (sb == NULL)
+ return (ENOMEM);
+
+ map = t4_read_reg(sc, A_TP_TX_MOD_QUEUE_REQ_MAP);
+ mode = G_TIMERMODE(t4_read_reg(sc, A_TP_MOD_CONFIG));
+ t4_read_pace_tbl(sc, pace_tab);
+
+ sbuf_printf(sb, "Scheduler Mode Channel Rate (Kbps) "
+ "Class IPG (0.1 ns) Flow IPG (us)");
+
+ for (i = 0; i < NTX_SCHED; ++i, map >>= 2) {
+ t4_get_tx_sched(sc, i, &kbps, &ipg);
+ sbuf_printf(sb, "\n %u %-5s %u ", i,
+ (mode & (1 << i)) ? "flow" : "class", map & 3);
+ if (kbps)
+ sbuf_printf(sb, "%9u ", kbps);
+ else
+ sbuf_printf(sb, " disabled ");
+
+ if (ipg)
+ sbuf_printf(sb, "%13u ", ipg);
+ else
+ sbuf_printf(sb, " disabled ");
+
+ if (pace_tab[i])
+ sbuf_printf(sb, "%10u", pace_tab[i]);
+ else
+ sbuf_printf(sb, " disabled");
+ }
+
+ rc = sbuf_finish(sb);
+ sbuf_delete(sb);
+
+ return (rc);
+}
+
+static int
+sysctl_lb_stats(SYSCTL_HANDLER_ARGS)
+{
+ struct adapter *sc = arg1;
+ struct sbuf *sb;
+ int rc, i, j;
+ uint64_t *p0, *p1;
+ struct lb_port_stats s[2];
+ static const char *stat_name[] = {
+ "OctetsOK:", "FramesOK:", "BcastFrames:", "McastFrames:",
+ "UcastFrames:", "ErrorFrames:", "Frames64:", "Frames65To127:",
+ "Frames128To255:", "Frames256To511:", "Frames512To1023:",
+ "Frames1024To1518:", "Frames1519ToMax:", "FramesDropped:",
+ "BG0FramesDropped:", "BG1FramesDropped:", "BG2FramesDropped:",
+ "BG3FramesDropped:", "BG0FramesTrunc:", "BG1FramesTrunc:",
+ "BG2FramesTrunc:", "BG3FramesTrunc:"
+ };
+
+ rc = sysctl_wire_old_buffer(req, 0);
+ if (rc != 0)
+ return (rc);
+
+ sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req);
+ if (sb == NULL)
+ return (ENOMEM);
+
+ memset(s, 0, sizeof(s));
+
+ for (i = 0; i < 4; i += 2) {
+ t4_get_lb_stats(sc, i, &s[0]);
+ t4_get_lb_stats(sc, i + 1, &s[1]);
+
+ p0 = &s[0].octets;
+ p1 = &s[1].octets;
+ sbuf_printf(sb, "%s Loopback %u"
+ " Loopback %u", i == 0 ? "" : "\n", i, i + 1);
+
+ for (j = 0; j < ARRAY_SIZE(stat_name); j++)
+ sbuf_printf(sb, "\n%-17s %20ju %20ju", stat_name[j],
+ *p0++, *p1++);
+ }
+
+ rc = sbuf_finish(sb);
+ sbuf_delete(sb);
+
+ return (rc);
+}
+
+struct mem_desc {
+ unsigned int base;
+ unsigned int limit;
+ unsigned int idx;
+};
+
+static int
+mem_desc_cmp(const void *a, const void *b)
+{
+ return ((const struct mem_desc *)a)->base -
+ ((const struct mem_desc *)b)->base;
+}
+
+static void
+mem_region_show(struct sbuf *sb, const char *name, unsigned int from,
+ unsigned int to)
+{
+ unsigned int size;
+
+ size = to - from + 1;
+ if (size == 0)
+ return;
+
+ /* XXX: need humanize_number(3) in libkern for a more readable 'size' */
+ sbuf_printf(sb, "%-15s %#x-%#x [%u]\n", name, from, to, size);
+}
+
+static int
+sysctl_meminfo(SYSCTL_HANDLER_ARGS)
+{
+ struct adapter *sc = arg1;
+ struct sbuf *sb;
+ int rc, i, n;
+ uint32_t lo, hi;
+ static const char *memory[] = { "EDC0:", "EDC1:", "MC:" };
+ static const char *region[] = {
+ "DBQ contexts:", "IMSG contexts:", "FLM cache:", "TCBs:",
+ "Pstructs:", "Timers:", "Rx FL:", "Tx FL:", "Pstruct FL:",
+ "Tx payload:", "Rx payload:", "LE hash:", "iSCSI region:",
+ "TDDP region:", "TPT region:", "STAG region:", "RQ region:",
+ "RQUDP region:", "PBL region:", "TXPBL region:", "ULPRX state:",
+ "ULPTX state:", "On-chip queues:"
+ };
+ struct mem_desc avail[3];
+ struct mem_desc mem[ARRAY_SIZE(region) + 3]; /* up to 3 holes */
+ struct mem_desc *md = mem;
+
+ rc = sysctl_wire_old_buffer(req, 0);
+ if (rc != 0)
+ return (rc);
+
+ sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req);
+ if (sb == NULL)
+ return (ENOMEM);
+
+ for (i = 0; i < ARRAY_SIZE(mem); i++) {
+ mem[i].limit = 0;
+ mem[i].idx = i;
+ }
+
+ /* Find and sort the populated memory ranges */
+ i = 0;
+ lo = t4_read_reg(sc, A_MA_TARGET_MEM_ENABLE);
+ if (lo & F_EDRAM0_ENABLE) {
+ hi = t4_read_reg(sc, A_MA_EDRAM0_BAR);
+ avail[i].base = G_EDRAM0_BASE(hi) << 20;
+ avail[i].limit = avail[i].base + (G_EDRAM0_SIZE(hi) << 20);
+ avail[i].idx = 0;
+ i++;
+ }
+ if (lo & F_EDRAM1_ENABLE) {
+ hi = t4_read_reg(sc, A_MA_EDRAM1_BAR);
+ avail[i].base = G_EDRAM1_BASE(hi) << 20;
+ avail[i].limit = avail[i].base + (G_EDRAM1_SIZE(hi) << 20);
+ avail[i].idx = 1;
+ i++;
+ }
+ if (lo & F_EXT_MEM_ENABLE) {
+ hi = t4_read_reg(sc, A_MA_EXT_MEMORY_BAR);
+ avail[i].base = G_EXT_MEM_BASE(hi) << 20;
+ avail[i].limit = avail[i].base + (G_EXT_MEM_SIZE(hi) << 20);
+ avail[i].idx = 2;
+ i++;
+ }
+ if (!i) /* no memory available */
+ return 0;
+ qsort(avail, i, sizeof(struct mem_desc), mem_desc_cmp);
+
+ (md++)->base = t4_read_reg(sc, A_SGE_DBQ_CTXT_BADDR);
+ (md++)->base = t4_read_reg(sc, A_SGE_IMSG_CTXT_BADDR);
+ (md++)->base = t4_read_reg(sc, A_SGE_FLM_CACHE_BADDR);
+ (md++)->base = t4_read_reg(sc, A_TP_CMM_TCB_BASE);
+ (md++)->base = t4_read_reg(sc, A_TP_CMM_MM_BASE);
+ (md++)->base = t4_read_reg(sc, A_TP_CMM_TIMER_BASE);
+ (md++)->base = t4_read_reg(sc, A_TP_CMM_MM_RX_FLST_BASE);
+ (md++)->base = t4_read_reg(sc, A_TP_CMM_MM_TX_FLST_BASE);
+ (md++)->base = t4_read_reg(sc, A_TP_CMM_MM_PS_FLST_BASE);
+
+ /* the next few have explicit upper bounds */
+ md->base = t4_read_reg(sc, A_TP_PMM_TX_BASE);
+ md->limit = md->base - 1 +
+ t4_read_reg(sc, A_TP_PMM_TX_PAGE_SIZE) *
+ G_PMTXMAXPAGE(t4_read_reg(sc, A_TP_PMM_TX_MAX_PAGE));
+ md++;
+
+ md->base = t4_read_reg(sc, A_TP_PMM_RX_BASE);
+ md->limit = md->base - 1 +
+ t4_read_reg(sc, A_TP_PMM_RX_PAGE_SIZE) *
+ G_PMRXMAXPAGE(t4_read_reg(sc, A_TP_PMM_RX_MAX_PAGE));
+ md++;
+
+ if (t4_read_reg(sc, A_LE_DB_CONFIG) & F_HASHEN) {
+ hi = t4_read_reg(sc, A_LE_DB_TID_HASHBASE) / 4;
+ md->base = t4_read_reg(sc, A_LE_DB_HASH_TID_BASE);
+ md->limit = (sc->tids.ntids - hi) * 16 + md->base - 1;
+ } else {
+ md->base = 0;
+ md->idx = ARRAY_SIZE(region); /* hide it */
+ }
+ md++;
+
+#define ulp_region(reg) \
+ md->base = t4_read_reg(sc, A_ULP_ ## reg ## _LLIMIT);\
+ (md++)->limit = t4_read_reg(sc, A_ULP_ ## reg ## _ULIMIT)
+
+ ulp_region(RX_ISCSI);
+ ulp_region(RX_TDDP);
+ ulp_region(TX_TPT);
+ ulp_region(RX_STAG);
+ ulp_region(RX_RQ);
+ ulp_region(RX_RQUDP);
+ ulp_region(RX_PBL);
+ ulp_region(TX_PBL);
+#undef ulp_region
+
+ md->base = t4_read_reg(sc, A_ULP_RX_CTX_BASE);
+ md->limit = md->base + sc->tids.ntids - 1;
+ md++;
+ md->base = t4_read_reg(sc, A_ULP_TX_ERR_TABLE_BASE);
+ md->limit = md->base + sc->tids.ntids - 1;
+ md++;
+
+ md->base = sc->vres.ocq.start;
+ if (sc->vres.ocq.size)
+ md->limit = md->base + sc->vres.ocq.size - 1;
+ else
+ md->idx = ARRAY_SIZE(region); /* hide it */
+ md++;
+
+ /* add any address-space holes, there can be up to 3 */
+ for (n = 0; n < i - 1; n++)
+ if (avail[n].limit < avail[n + 1].base)
+ (md++)->base = avail[n].limit;
+ if (avail[n].limit)
+ (md++)->base = avail[n].limit;
+
+ n = md - mem;
+ qsort(mem, n, sizeof(struct mem_desc), mem_desc_cmp);
+
+ for (lo = 0; lo < i; lo++)
+ mem_region_show(sb, memory[avail[lo].idx], avail[lo].base,
+ avail[lo].limit - 1);
+
+ sbuf_printf(sb, "\n");
+ for (i = 0; i < n; i++) {
+ if (mem[i].idx >= ARRAY_SIZE(region))
+ continue; /* skip holes */
+ if (!mem[i].limit)
+ mem[i].limit = i < n - 1 ? mem[i + 1].base - 1 : ~0;
+ mem_region_show(sb, region[mem[i].idx], mem[i].base,
+ mem[i].limit);
+ }
+
+ sbuf_printf(sb, "\n");
+ lo = t4_read_reg(sc, A_CIM_SDRAM_BASE_ADDR);
+ hi = t4_read_reg(sc, A_CIM_SDRAM_ADDR_SIZE) + lo - 1;
+ mem_region_show(sb, "uP RAM:", lo, hi);
+
+ lo = t4_read_reg(sc, A_CIM_EXTMEM2_BASE_ADDR);
+ hi = t4_read_reg(sc, A_CIM_EXTMEM2_ADDR_SIZE) + lo - 1;
+ mem_region_show(sb, "uP Extmem2:", lo, hi);
+
+ lo = t4_read_reg(sc, A_TP_PMM_RX_MAX_PAGE);
+ sbuf_printf(sb, "\n%u Rx pages of size %uKiB for %u channels\n",
+ G_PMRXMAXPAGE(lo),
+ t4_read_reg(sc, A_TP_PMM_RX_PAGE_SIZE) >> 10,
+ (lo & F_PMRXNUMCHN) ? 2 : 1);
+
+ lo = t4_read_reg(sc, A_TP_PMM_TX_MAX_PAGE);
+ hi = t4_read_reg(sc, A_TP_PMM_TX_PAGE_SIZE);
+ sbuf_printf(sb, "%u Tx pages of size %u%ciB for %u channels\n",
+ G_PMTXMAXPAGE(lo),
+ hi >= (1 << 20) ? (hi >> 20) : (hi >> 10),
+ hi >= (1 << 20) ? 'M' : 'K', 1 << G_PMTXNUMCHN(lo));
+ sbuf_printf(sb, "%u p-structs\n",
+ t4_read_reg(sc, A_TP_CMM_MM_MAX_PSTRUCT));
+
+ for (i = 0; i < 4; i++) {
+ lo = t4_read_reg(sc, A_MPS_RX_PG_RSV0 + i * 4);
+ sbuf_printf(sb, "\nPort %d using %u pages out of %u allocated",
+ i, G_USED(lo), G_ALLOC(lo));
+ }
+ for (i = 0; i < 4; i++) {
+ lo = t4_read_reg(sc, A_MPS_RX_PG_RSV4 + i * 4);
+ sbuf_printf(sb,
+ "\nLoopback %d using %u pages out of %u allocated",
+ i, G_USED(lo), G_ALLOC(lo));
+ }
+
+ rc = sbuf_finish(sb);
+ sbuf_delete(sb);
+
+ return (rc);
+}
+
+static int
+sysctl_path_mtus(SYSCTL_HANDLER_ARGS)
+{
+ struct adapter *sc = arg1;
+ struct sbuf *sb;
+ int rc;
+ uint16_t mtus[NMTUS];
+
+ rc = sysctl_wire_old_buffer(req, 0);
+ if (rc != 0)
+ return (rc);
+
+ sb = sbuf_new_for_sysctl(NULL, NULL, 256, req);
+ if (sb == NULL)
+ return (ENOMEM);
+
+ t4_read_mtu_tbl(sc, mtus, NULL);
+
+ sbuf_printf(sb, "%u %u %u %u %u %u %u %u %u %u %u %u %u %u %u %u",
+ mtus[0], mtus[1], mtus[2], mtus[3], mtus[4], mtus[5], mtus[6],
+ mtus[7], mtus[8], mtus[9], mtus[10], mtus[11], mtus[12], mtus[13],
+ mtus[14], mtus[15]);
+
+ rc = sbuf_finish(sb);
+ sbuf_delete(sb);
+
+ return (rc);
+}
+
+static int
+sysctl_pm_stats(SYSCTL_HANDLER_ARGS)
+{
+ struct adapter *sc = arg1;
+ struct sbuf *sb;
+ int rc, i;
+ uint32_t tx_cnt[PM_NSTATS], rx_cnt[PM_NSTATS];
+ uint64_t tx_cyc[PM_NSTATS], rx_cyc[PM_NSTATS];
+ static const char *pm_stats[] = {
+ "Read:", "Write bypass:", "Write mem:", "Flush:", "FIFO wait:"
+ };
+
+ rc = sysctl_wire_old_buffer(req, 0);
+ if (rc != 0)
+ return (rc);
+
+ sb = sbuf_new_for_sysctl(NULL, NULL, 256, req);
+ if (sb == NULL)
+ return (ENOMEM);
+
+ t4_pmtx_get_stats(sc, tx_cnt, tx_cyc);
+ t4_pmrx_get_stats(sc, rx_cnt, rx_cyc);
+
+ sbuf_printf(sb, " Tx count Tx cycles "
+ "Rx count Rx cycles");
+ for (i = 0; i < PM_NSTATS; i++)
+ sbuf_printf(sb, "\n%-13s %10u %20ju %10u %20ju",
+ pm_stats[i], tx_cnt[i], tx_cyc[i], rx_cnt[i], rx_cyc[i]);
+
+ rc = sbuf_finish(sb);
+ sbuf_delete(sb);
+
+ return (rc);
+}
+
+static int
+sysctl_rdma_stats(SYSCTL_HANDLER_ARGS)
+{
+ struct adapter *sc = arg1;
+ struct sbuf *sb;
+ int rc;
+ struct tp_rdma_stats stats;
+
+ rc = sysctl_wire_old_buffer(req, 0);
+ if (rc != 0)
+ return (rc);
+
+ sb = sbuf_new_for_sysctl(NULL, NULL, 256, req);
+ if (sb == NULL)
+ return (ENOMEM);
+
+ t4_tp_get_rdma_stats(sc, &stats);
+ sbuf_printf(sb, "NoRQEModDefferals: %u\n", stats.rqe_dfr_mod);
+ sbuf_printf(sb, "NoRQEPktDefferals: %u", stats.rqe_dfr_pkt);
+
+ rc = sbuf_finish(sb);
+ sbuf_delete(sb);
+
+ return (rc);
+}
+
+static int
+sysctl_tcp_stats(SYSCTL_HANDLER_ARGS)
+{
+ struct adapter *sc = arg1;
+ struct sbuf *sb;
+ int rc;
+ struct tp_tcp_stats v4, v6;
+
+ rc = sysctl_wire_old_buffer(req, 0);
+ if (rc != 0)
+ return (rc);
+
+ sb = sbuf_new_for_sysctl(NULL, NULL, 256, req);
+ if (sb == NULL)
+ return (ENOMEM);
+
+ t4_tp_get_tcp_stats(sc, &v4, &v6);
+ sbuf_printf(sb,
+ " IP IPv6\n");
+ sbuf_printf(sb, "OutRsts: %20u %20u\n",
+ v4.tcpOutRsts, v6.tcpOutRsts);
+ sbuf_printf(sb, "InSegs: %20ju %20ju\n",
+ v4.tcpInSegs, v6.tcpInSegs);
+ sbuf_printf(sb, "OutSegs: %20ju %20ju\n",
+ v4.tcpOutSegs, v6.tcpOutSegs);
+ sbuf_printf(sb, "RetransSegs: %20ju %20ju",
+ v4.tcpRetransSegs, v6.tcpRetransSegs);
+
+ rc = sbuf_finish(sb);
+ sbuf_delete(sb);
+
+ return (rc);
+}
+
+static int
+sysctl_tids(SYSCTL_HANDLER_ARGS)
+{
+ struct adapter *sc = arg1;
+ struct sbuf *sb;
+ int rc;
+ struct tid_info *t = &sc->tids;
+
+ rc = sysctl_wire_old_buffer(req, 0);
+ if (rc != 0)
+ return (rc);
+
+ sb = sbuf_new_for_sysctl(NULL, NULL, 256, req);
+ if (sb == NULL)
+ return (ENOMEM);
+
+ if (t->natids) {
+ sbuf_printf(sb, "ATID range: 0-%u, in use: %u\n", t->natids - 1,
+ t->atids_in_use);
+ }
+
+ if (t->ntids) {
+ if (t4_read_reg(sc, A_LE_DB_CONFIG) & F_HASHEN) {
+ uint32_t b = t4_read_reg(sc, A_LE_DB_SERVER_INDEX) / 4;
+
+ if (b) {
+ sbuf_printf(sb, "TID range: 0-%u, %u-%u", b - 1,
+ t4_read_reg(sc, A_LE_DB_TID_HASHBASE) / 4,
+ t->ntids - 1);
+ } else {
+ sbuf_printf(sb, "TID range: %u-%u",
+ t4_read_reg(sc, A_LE_DB_TID_HASHBASE) / 4,
+ t->ntids - 1);
+ }
+ } else
+ sbuf_printf(sb, "TID range: 0-%u", t->ntids - 1);
+ sbuf_printf(sb, ", in use: %u\n",
+ atomic_load_acq_int(&t->tids_in_use));
+ }
+
+ if (t->nstids) {
+ sbuf_printf(sb, "STID range: %u-%u, in use: %u\n", t->stid_base,
+ t->stid_base + t->nstids - 1, t->stids_in_use);
+ }
+
+ if (t->nftids) {
+ sbuf_printf(sb, "FTID range: %u-%u\n", t->ftid_base,
+ t->ftid_base + t->nftids - 1);
+ }
+
+ sbuf_printf(sb, "HW TID usage: %u IP users, %u IPv6 users",
+ t4_read_reg(sc, A_LE_DB_ACT_CNT_IPV4),
+ t4_read_reg(sc, A_LE_DB_ACT_CNT_IPV6));
+
+ rc = sbuf_finish(sb);
+ sbuf_delete(sb);
+
+ return (rc);
+}
+
+static int
+sysctl_tp_err_stats(SYSCTL_HANDLER_ARGS)
+{
+ struct adapter *sc = arg1;
+ struct sbuf *sb;
+ int rc;
+ struct tp_err_stats stats;
+
+ rc = sysctl_wire_old_buffer(req, 0);
+ if (rc != 0)
+ return (rc);
+
+ sb = sbuf_new_for_sysctl(NULL, NULL, 256, req);
+ if (sb == NULL)
+ return (ENOMEM);
+
+ t4_tp_get_err_stats(sc, &stats);
+
+ sbuf_printf(sb, " channel 0 channel 1 channel 2 "
+ "channel 3\n");
+ sbuf_printf(sb, "macInErrs: %10u %10u %10u %10u\n",
+ stats.macInErrs[0], stats.macInErrs[1], stats.macInErrs[2],
+ stats.macInErrs[3]);
+ sbuf_printf(sb, "hdrInErrs: %10u %10u %10u %10u\n",
+ stats.hdrInErrs[0], stats.hdrInErrs[1], stats.hdrInErrs[2],
+ stats.hdrInErrs[3]);
+ sbuf_printf(sb, "tcpInErrs: %10u %10u %10u %10u\n",
+ stats.tcpInErrs[0], stats.tcpInErrs[1], stats.tcpInErrs[2],
+ stats.tcpInErrs[3]);
+ sbuf_printf(sb, "tcp6InErrs: %10u %10u %10u %10u\n",
+ stats.tcp6InErrs[0], stats.tcp6InErrs[1], stats.tcp6InErrs[2],
+ stats.tcp6InErrs[3]);
+ sbuf_printf(sb, "tnlCongDrops: %10u %10u %10u %10u\n",
+ stats.tnlCongDrops[0], stats.tnlCongDrops[1], stats.tnlCongDrops[2],
+ stats.tnlCongDrops[3]);
+ sbuf_printf(sb, "tnlTxDrops: %10u %10u %10u %10u\n",
+ stats.tnlTxDrops[0], stats.tnlTxDrops[1], stats.tnlTxDrops[2],
+ stats.tnlTxDrops[3]);
+ sbuf_printf(sb, "ofldVlanDrops: %10u %10u %10u %10u\n",
+ stats.ofldVlanDrops[0], stats.ofldVlanDrops[1],
+ stats.ofldVlanDrops[2], stats.ofldVlanDrops[3]);
+ sbuf_printf(sb, "ofldChanDrops: %10u %10u %10u %10u\n\n",
+ stats.ofldChanDrops[0], stats.ofldChanDrops[1],
+ stats.ofldChanDrops[2], stats.ofldChanDrops[3]);
+ sbuf_printf(sb, "ofldNoNeigh: %u\nofldCongDefer: %u",
+ stats.ofldNoNeigh, stats.ofldCongDefer);
+
+ rc = sbuf_finish(sb);
+ sbuf_delete(sb);
+
+ return (rc);
+}
+
+static int
+sysctl_tx_rate(SYSCTL_HANDLER_ARGS)
+{
+ struct adapter *sc = arg1;
+ struct sbuf *sb;
+ int rc;
+ u64 nrate[NCHAN], orate[NCHAN];
+
+ rc = sysctl_wire_old_buffer(req, 0);
+ if (rc != 0)
+ return (rc);
+
+ sb = sbuf_new_for_sysctl(NULL, NULL, 256, req);
+ if (sb == NULL)
+ return (ENOMEM);
+
+ t4_get_chan_txrate(sc, nrate, orate);
+ sbuf_printf(sb, " channel 0 channel 1 channel 2 "
+ "channel 3\n");
+ sbuf_printf(sb, "NIC B/s: %10ju %10ju %10ju %10ju\n",
+ nrate[0], nrate[1], nrate[2], nrate[3]);
+ sbuf_printf(sb, "Offload B/s: %10ju %10ju %10ju %10ju",
+ orate[0], orate[1], orate[2], orate[3]);
+
+ rc = sbuf_finish(sb);
+ sbuf_delete(sb);
+
+ return (rc);
+}
+
static inline void
txq_start(struct ifnet *ifp, struct sge_txq *txq)
{
@@ -2897,17 +4313,57 @@ txq_start(struct ifnet *ifp, struct sge_txq *txq)
}
void
-cxgbe_txq_start(void *arg, int count)
+t4_tx_callout(void *arg)
{
- struct sge_txq *txq = arg;
+ struct sge_eq *eq = arg;
+ struct adapter *sc;
+
+ if (EQ_TRYLOCK(eq) == 0)
+ goto reschedule;
+
+ if (eq->flags & EQ_STALLED && !can_resume_tx(eq)) {
+ EQ_UNLOCK(eq);
+reschedule:
+ if (__predict_true(!(eq->flags && EQ_DOOMED)))
+ callout_schedule(&eq->tx_callout, 1);
+ return;
+ }
+
+ EQ_LOCK_ASSERT_OWNED(eq);
+
+ if (__predict_true((eq->flags & EQ_DOOMED) == 0)) {
+
+ if ((eq->flags & EQ_TYPEMASK) == EQ_ETH) {
+ struct sge_txq *txq = arg;
+ struct port_info *pi = txq->ifp->if_softc;
+
+ sc = pi->adapter;
+ } else {
+ struct sge_wrq *wrq = arg;
+
+ sc = wrq->adapter;
+ }
+
+ taskqueue_enqueue(sc->tq[eq->tx_chan], &eq->tx_task);
+ }
- TXQ_LOCK(txq);
- if (txq->eq.flags & EQ_CRFLUSHED) {
- txq->eq.flags &= ~EQ_CRFLUSHED;
+ EQ_UNLOCK(eq);
+}
+
+void
+t4_tx_task(void *arg, int count)
+{
+ struct sge_eq *eq = arg;
+
+ EQ_LOCK(eq);
+ if ((eq->flags & EQ_TYPEMASK) == EQ_ETH) {
+ struct sge_txq *txq = arg;
txq_start(txq->ifp, txq);
- } else
- wakeup_one(txq); /* txq is going away, wakeup free_txq */
- TXQ_UNLOCK(txq);
+ } else {
+ struct sge_wrq *wrq = arg;
+ t4_wrq_tx_locked(wrq->adapter, wrq, NULL);
+ }
+ EQ_UNLOCK(eq);
}
static uint32_t
@@ -2937,10 +4393,10 @@ fconf_to_mode(uint32_t fconf)
mode |= T4_FILTER_IP_TOS;
if (fconf & F_VLAN)
- mode |= T4_FILTER_IVLAN;
+ mode |= T4_FILTER_VLAN;
if (fconf & F_VNIC_ID)
- mode |= T4_FILTER_OVLAN;
+ mode |= T4_FILTER_VNIC;
if (fconf & F_PORT)
mode |= T4_FILTER_PORT;
@@ -2974,10 +4430,10 @@ mode_to_fconf(uint32_t mode)
if (mode & T4_FILTER_IP_TOS)
fconf |= F_TOS;
- if (mode & T4_FILTER_IVLAN)
+ if (mode & T4_FILTER_VLAN)
fconf |= F_VLAN;
- if (mode & T4_FILTER_OVLAN)
+ if (mode & T4_FILTER_VNIC)
fconf |= F_VNIC_ID;
if (mode & T4_FILTER_PORT)
@@ -3012,10 +4468,10 @@ fspec_to_fconf(struct t4_filter_specification *fs)
if (fs->val.tos || fs->mask.tos)
fconf |= F_TOS;
- if (fs->val.ivlan_vld || fs->mask.ivlan_vld)
+ if (fs->val.vlan_vld || fs->mask.vlan_vld)
fconf |= F_VLAN;
- if (fs->val.ovlan_vld || fs->mask.ovlan_vld)
+ if (fs->val.vnic_vld || fs->mask.vnic_vld)
fconf |= F_VNIC_ID;
if (fs->val.iport || fs->mask.iport)
@@ -3035,7 +4491,13 @@ get_filter_mode(struct adapter *sc, uint32_t *mode)
t4_read_indirect(sc, A_TP_PIO_ADDR, A_TP_PIO_DATA, &fconf, 1,
A_TP_VLAN_PRI_MAP);
- *mode = fconf_to_mode(fconf);
+ if (sc->filter_mode != fconf) {
+ log(LOG_WARNING, "%s: cached filter mode out of sync %x %x.\n",
+ device_get_nameunit(sc->dev), sc->filter_mode, fconf);
+ sc->filter_mode = fconf;
+ }
+
+ *mode = fconf_to_mode(sc->filter_mode);
return (0);
}
@@ -3059,7 +4521,21 @@ set_filter_mode(struct adapter *sc, uint32_t mode)
goto done;
}
+#ifndef TCP_OFFLOAD_DISABLE
+ if (sc->offload_map) {
+ rc = EBUSY;
+ goto done;
+ }
+#endif
+
+#ifdef notyet
rc = -t4_set_filter_mode(sc, fconf);
+ if (rc == 0)
+ sc->filter_mode = fconf;
+#else
+ rc = ENOTSUP;
+#endif
+
done:
ADAPTER_UNLOCK(sc);
return (rc);
@@ -3119,7 +4595,6 @@ get_filter(struct adapter *sc, struct t4_filter *t)
static int
set_filter(struct adapter *sc, struct t4_filter *t)
{
- uint32_t fconf;
unsigned int nfilters, nports;
struct filter_entry *f;
int i;
@@ -3139,9 +4614,7 @@ set_filter(struct adapter *sc, struct t4_filter *t)
return (EINVAL);
/* Validate against the global filter mode */
- t4_read_indirect(sc, A_TP_PIO_ADDR, A_TP_PIO_DATA, &fconf, 1,
- A_TP_VLAN_PRI_MAP);
- if ((fconf | fspec_to_fconf(&t->fs)) != fconf)
+ if ((sc->filter_mode | fspec_to_fconf(&t->fs)) != sc->filter_mode)
return (E2BIG);
if (t->fs.action == FILTER_SWITCH && t->fs.eport >= nports)
@@ -3238,7 +4711,6 @@ clear_filter(struct filter_entry *f)
static int
set_filter_wr(struct adapter *sc, int fidx)
{
- int rc;
struct filter_entry *f = &sc->tids.ftid_tab[fidx];
struct mbuf *m;
struct fw_filter_wr *fwr;
@@ -3298,13 +4770,13 @@ set_filter_wr(struct adapter *sc, int fidx)
fwr->frag_to_ovlan_vldm =
(V_FW_FILTER_WR_FRAG(f->fs.val.frag) |
V_FW_FILTER_WR_FRAGM(f->fs.mask.frag) |
- V_FW_FILTER_WR_IVLAN_VLD(f->fs.val.ivlan_vld) |
- V_FW_FILTER_WR_OVLAN_VLD(f->fs.val.ovlan_vld) |
- V_FW_FILTER_WR_IVLAN_VLDM(f->fs.mask.ivlan_vld) |
- V_FW_FILTER_WR_OVLAN_VLDM(f->fs.mask.ovlan_vld));
+ V_FW_FILTER_WR_IVLAN_VLD(f->fs.val.vlan_vld) |
+ V_FW_FILTER_WR_OVLAN_VLD(f->fs.val.vnic_vld) |
+ V_FW_FILTER_WR_IVLAN_VLDM(f->fs.mask.vlan_vld) |
+ V_FW_FILTER_WR_OVLAN_VLDM(f->fs.mask.vnic_vld));
fwr->smac_sel = 0;
fwr->rx_chan_rx_rpl_iq = htobe16(V_FW_FILTER_WR_RX_CHAN(0) |
- V_FW_FILTER_WR_RX_RPL_IQ(sc->sge.intrq[0].abs_id));
+ V_FW_FILTER_WR_RX_RPL_IQ(sc->sge.fwq.abs_id));
fwr->maci_to_matchtypem =
htobe32(V_FW_FILTER_WR_MACI(f->fs.val.macidx) |
V_FW_FILTER_WR_MACIM(f->fs.mask.macidx) |
@@ -3318,10 +4790,10 @@ set_filter_wr(struct adapter *sc, int fidx)
fwr->ptclm = f->fs.mask.proto;
fwr->ttyp = f->fs.val.tos;
fwr->ttypm = f->fs.mask.tos;
- fwr->ivlan = htobe16(f->fs.val.ivlan);
- fwr->ivlanm = htobe16(f->fs.mask.ivlan);
- fwr->ovlan = htobe16(f->fs.val.ovlan);
- fwr->ovlanm = htobe16(f->fs.mask.ovlan);
+ fwr->ivlan = htobe16(f->fs.val.vlan);
+ fwr->ivlanm = htobe16(f->fs.mask.vlan);
+ fwr->ovlan = htobe16(f->fs.val.vnic);
+ fwr->ovlanm = htobe16(f->fs.mask.vnic);
bcopy(f->fs.val.dip, fwr->lip, sizeof (fwr->lip));
bcopy(f->fs.mask.dip, fwr->lipm, sizeof (fwr->lipm));
bcopy(f->fs.val.sip, fwr->fip, sizeof (fwr->fip));
@@ -3335,13 +4807,9 @@ set_filter_wr(struct adapter *sc, int fidx)
f->pending = 1;
sc->tids.ftids_in_use++;
- rc = t4_mgmt_tx(sc, m);
- if (rc != 0) {
- sc->tids.ftids_in_use--;
- m_freem(m);
- clear_filter(f);
- }
- return (rc);
+
+ t4_mgmt_tx(sc, m);
+ return (0);
}
static int
@@ -3350,7 +4818,7 @@ del_filter_wr(struct adapter *sc, int fidx)
struct filter_entry *f = &sc->tids.ftid_tab[fidx];
struct mbuf *m;
struct fw_filter_wr *fwr;
- unsigned int rc, ftid;
+ unsigned int ftid;
ADAPTER_LOCK_ASSERT_OWNED(sc);
@@ -3364,55 +4832,48 @@ del_filter_wr(struct adapter *sc, int fidx)
m->m_len = m->m_pkthdr.len = sizeof(*fwr);
bzero(fwr, sizeof (*fwr));
- t4_mk_filtdelwr(ftid, fwr, sc->sge.intrq[0].abs_id);
+ t4_mk_filtdelwr(ftid, fwr, sc->sge.fwq.abs_id);
f->pending = 1;
- rc = t4_mgmt_tx(sc, m);
- if (rc != 0) {
- f->pending = 0;
- m_freem(m);
- }
- return (rc);
+ t4_mgmt_tx(sc, m);
+ return (0);
}
-/* XXX move intr handlers to main.c and make this static */
-void
-filter_rpl(struct adapter *sc, const struct cpl_set_tcb_rpl *rpl)
+static int
+filter_rpl(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m)
{
+ struct adapter *sc = iq->adapter;
+ const struct cpl_set_tcb_rpl *rpl = (const void *)(rss + 1);
unsigned int idx = GET_TID(rpl);
+ KASSERT(m == NULL, ("%s: payload with opcode %02x", __func__,
+ rss->opcode));
+
if (idx >= sc->tids.ftid_base &&
(idx -= sc->tids.ftid_base) < sc->tids.nftids) {
unsigned int rc = G_COOKIE(rpl->cookie);
struct filter_entry *f = &sc->tids.ftid_tab[idx];
- if (rc == FW_FILTER_WR_FLT_DELETED) {
- /*
- * Clear the filter when we get confirmation from the
- * hardware that the filter has been deleted.
- */
- clear_filter(f);
- sc->tids.ftids_in_use--;
- } else if (rc == FW_FILTER_WR_SMT_TBL_FULL) {
- device_printf(sc->dev,
- "filter %u setup failed due to full SMT\n", idx);
- clear_filter(f);
- sc->tids.ftids_in_use--;
- } else if (rc == FW_FILTER_WR_FLT_ADDED) {
+ if (rc == FW_FILTER_WR_FLT_ADDED) {
f->smtidx = (be64toh(rpl->oldval) >> 24) & 0xff;
f->pending = 0; /* asynchronous setup completed */
f->valid = 1;
- } else {
- /*
- * Something went wrong. Issue a warning about the
- * problem and clear everything out.
- */
+ return (0);
+ }
+
+ if (rc != FW_FILTER_WR_FLT_DELETED) {
+ /* Add or delete failed, need to display an error */
device_printf(sc->dev,
"filter %u setup failed with error %u\n", idx, rc);
- clear_filter(f);
- sc->tids.ftids_in_use--;
}
+
+ clear_filter(f);
+ ADAPTER_LOCK(sc);
+ sc->tids.ftids_in_use--;
+ ADAPTER_UNLOCK(sc);
}
+
+ return (0);
}
static int
@@ -3444,6 +4905,84 @@ get_sge_context(struct adapter *sc, struct t4_sge_context *cntxt)
return (rc);
}
+static int
+read_card_mem(struct adapter *sc, struct t4_mem_range *mr)
+{
+ uint32_t base, size, lo, hi, win, off, remaining, i, n;
+ uint32_t *buf, *b;
+ int rc;
+
+ /* reads are in multiples of 32 bits */
+ if (mr->addr & 3 || mr->len & 3 || mr->len == 0)
+ return (EINVAL);
+
+ /*
+ * We don't want to deal with potential holes so we mandate that the
+ * requested region must lie entirely within one of the 3 memories.
+ */
+ lo = t4_read_reg(sc, A_MA_TARGET_MEM_ENABLE);
+ if (lo & F_EDRAM0_ENABLE) {
+ hi = t4_read_reg(sc, A_MA_EDRAM0_BAR);
+ base = G_EDRAM0_BASE(hi) << 20;
+ size = G_EDRAM0_SIZE(hi) << 20;
+ if (size > 0 &&
+ mr->addr >= base && mr->addr < base + size &&
+ mr->addr + mr->len <= base + size)
+ goto proceed;
+ }
+ if (lo & F_EDRAM1_ENABLE) {
+ hi = t4_read_reg(sc, A_MA_EDRAM1_BAR);
+ base = G_EDRAM1_BASE(hi) << 20;
+ size = G_EDRAM1_SIZE(hi) << 20;
+ if (size > 0 &&
+ mr->addr >= base && mr->addr < base + size &&
+ mr->addr + mr->len <= base + size)
+ goto proceed;
+ }
+ if (lo & F_EXT_MEM_ENABLE) {
+ hi = t4_read_reg(sc, A_MA_EXT_MEMORY_BAR);
+ base = G_EXT_MEM_BASE(hi) << 20;
+ size = G_EXT_MEM_SIZE(hi) << 20;
+ if (size > 0 &&
+ mr->addr >= base && mr->addr < base + size &&
+ mr->addr + mr->len <= base + size)
+ goto proceed;
+ }
+ return (ENXIO);
+
+proceed:
+ buf = b = malloc(mr->len, M_CXGBE, M_WAITOK);
+
+ /*
+ * Position the PCIe window (we use memwin2) to the 16B aligned area
+ * just at/before the requested region.
+ */
+ win = mr->addr & ~0xf;
+ off = mr->addr - win; /* offset of the requested region in the win */
+ remaining = mr->len;
+
+ while (remaining) {
+ t4_write_reg(sc,
+ PCIE_MEM_ACCESS_REG(A_PCIE_MEM_ACCESS_OFFSET, 2), win);
+ t4_read_reg(sc,
+ PCIE_MEM_ACCESS_REG(A_PCIE_MEM_ACCESS_OFFSET, 2));
+
+ /* number of bytes that we'll copy in the inner loop */
+ n = min(remaining, MEMWIN2_APERTURE - off);
+
+ for (i = 0; i < n; i += 4, remaining -= 4)
+ *b++ = t4_read_reg(sc, MEMWIN2_BASE + off + i);
+
+ win += MEMWIN2_APERTURE;
+ off = 0;
+ }
+
+ rc = copyout(buf, mr->data, mr->len);
+ free(buf, M_CXGBE);
+
+ return (rc);
+}
+
int
t4_os_find_pci_capability(struct adapter *sc, int cap)
{
@@ -3514,6 +5053,22 @@ t4_os_link_changed(struct adapter *sc, int idx, int link_stat)
if_link_state_change(ifp, LINK_STATE_DOWN);
}
+void
+t4_iterate(void (*func)(struct adapter *, void *), void *arg)
+{
+ struct adapter *sc;
+
+ mtx_lock(&t4_list_lock);
+ SLIST_FOREACH(sc, &t4_list, link) {
+ /*
+ * func should not make any assumptions about what state sc is
+ * in - the only guarantee is that sc->sc_lock is a valid lock.
+ */
+ func(sc, arg);
+ }
+ mtx_unlock(&t4_list_lock);
+}
+
static int
t4_open(struct cdev *dev, int flags, int type, struct thread *td)
{
@@ -3610,6 +5165,27 @@ t4_ioctl(struct cdev *dev, unsigned long cmd, caddr_t data, int fflag,
case CHELSIO_T4_GET_SGE_CONTEXT:
rc = get_sge_context(sc, (struct t4_sge_context *)data);
break;
+ case CHELSIO_T4_LOAD_FW: {
+ struct t4_data *fw = (struct t4_data *)data;
+ uint8_t *fw_data;
+
+ if (sc->flags & FULL_INIT_DONE)
+ return (EBUSY);
+
+ fw_data = malloc(fw->len, M_CXGBE, M_NOWAIT);
+ if (fw_data == NULL)
+ return (ENOMEM);
+
+ rc = copyin(fw->data, fw_data, fw->len);
+ if (rc == 0)
+ rc = -t4_load_fw(sc, fw_data, fw->len);
+
+ free(fw_data, M_CXGBE);
+ break;
+ }
+ case CHELSIO_T4_GET_MEM:
+ rc = read_card_mem(sc, (struct t4_mem_range *)data);
+ break;
default:
rc = EINVAL;
}
@@ -3617,14 +5193,247 @@ t4_ioctl(struct cdev *dev, unsigned long cmd, caddr_t data, int fflag,
return (rc);
}
+#ifndef TCP_OFFLOAD_DISABLE
+static int
+toe_capability(struct port_info *pi, int enable)
+{
+ int rc;
+ struct adapter *sc = pi->adapter;
+
+ ADAPTER_LOCK_ASSERT_OWNED(sc);
+
+ if (!is_offload(sc))
+ return (ENODEV);
+
+ if (enable) {
+ if (isset(&sc->offload_map, pi->port_id))
+ return (0);
+
+ if (sc->offload_map == 0) {
+ rc = activate_uld(sc, ULD_TOM, &sc->tom);
+ if (rc != 0)
+ return (rc);
+ }
+
+ setbit(&sc->offload_map, pi->port_id);
+ } else {
+ if (!isset(&sc->offload_map, pi->port_id))
+ return (0);
+
+ clrbit(&sc->offload_map, pi->port_id);
+
+ if (sc->offload_map == 0) {
+ rc = deactivate_uld(&sc->tom);
+ if (rc != 0) {
+ setbit(&sc->offload_map, pi->port_id);
+ return (rc);
+ }
+ }
+ }
+
+ return (0);
+}
+
+/*
+ * Add an upper layer driver to the global list.
+ */
+int
+t4_register_uld(struct uld_info *ui)
+{
+ int rc = 0;
+ struct uld_info *u;
+
+ mtx_lock(&t4_uld_list_lock);
+ SLIST_FOREACH(u, &t4_uld_list, link) {
+ if (u->uld_id == ui->uld_id) {
+ rc = EEXIST;
+ goto done;
+ }
+ }
+
+ SLIST_INSERT_HEAD(&t4_uld_list, ui, link);
+ ui->refcount = 0;
+done:
+ mtx_unlock(&t4_uld_list_lock);
+ return (rc);
+}
+
+int
+t4_unregister_uld(struct uld_info *ui)
+{
+ int rc = EINVAL;
+ struct uld_info *u;
+
+ mtx_lock(&t4_uld_list_lock);
+
+ SLIST_FOREACH(u, &t4_uld_list, link) {
+ if (u == ui) {
+ if (ui->refcount > 0) {
+ rc = EBUSY;
+ goto done;
+ }
+
+ SLIST_REMOVE(&t4_uld_list, ui, uld_info, link);
+ rc = 0;
+ goto done;
+ }
+ }
+done:
+ mtx_unlock(&t4_uld_list_lock);
+ return (rc);
+}
+
+static int
+activate_uld(struct adapter *sc, int id, struct uld_softc *usc)
+{
+ int rc = EAGAIN;
+ struct uld_info *ui;
+
+ mtx_lock(&t4_uld_list_lock);
+
+ SLIST_FOREACH(ui, &t4_uld_list, link) {
+ if (ui->uld_id == id) {
+ rc = ui->attach(sc, &usc->softc);
+ if (rc == 0) {
+ KASSERT(usc->softc != NULL,
+ ("%s: ULD %d has no state", __func__, id));
+ ui->refcount++;
+ usc->uld = ui;
+ }
+ goto done;
+ }
+ }
+done:
+ mtx_unlock(&t4_uld_list_lock);
+
+ return (rc);
+}
+
+static int
+deactivate_uld(struct uld_softc *usc)
+{
+ int rc;
+
+ mtx_lock(&t4_uld_list_lock);
+
+ if (usc->uld == NULL || usc->softc == NULL) {
+ rc = EINVAL;
+ goto done;
+ }
+
+ rc = usc->uld->detach(usc->softc);
+ if (rc == 0) {
+ KASSERT(usc->uld->refcount > 0,
+ ("%s: ULD has bad refcount", __func__));
+ usc->uld->refcount--;
+ usc->uld = NULL;
+ usc->softc = NULL;
+ }
+done:
+ mtx_unlock(&t4_uld_list_lock);
+
+ return (rc);
+}
+#endif
+
+/*
+ * Come up with reasonable defaults for some of the tunables, provided they're
+ * not set by the user (in which case we'll use the values as is).
+ */
+static void
+tweak_tunables(void)
+{
+ int nc = mp_ncpus; /* our snapshot of the number of CPUs */
+
+ if (t4_ntxq10g < 1)
+ t4_ntxq10g = min(nc, NTXQ_10G);
+
+ if (t4_ntxq1g < 1)
+ t4_ntxq1g = min(nc, NTXQ_1G);
+
+ if (t4_nrxq10g < 1)
+ t4_nrxq10g = min(nc, NRXQ_10G);
+
+ if (t4_nrxq1g < 1)
+ t4_nrxq1g = min(nc, NRXQ_1G);
+
+#ifndef TCP_OFFLOAD_DISABLE
+ if (t4_nofldtxq10g < 1)
+ t4_nofldtxq10g = min(nc, NOFLDTXQ_10G);
+
+ if (t4_nofldtxq1g < 1)
+ t4_nofldtxq1g = min(nc, NOFLDTXQ_1G);
+
+ if (t4_nofldrxq10g < 1)
+ t4_nofldrxq10g = min(nc, NOFLDRXQ_10G);
+
+ if (t4_nofldrxq1g < 1)
+ t4_nofldrxq1g = min(nc, NOFLDRXQ_1G);
+#endif
+
+ if (t4_tmr_idx_10g < 0 || t4_tmr_idx_10g >= SGE_NTIMERS)
+ t4_tmr_idx_10g = TMR_IDX_10G;
+
+ if (t4_pktc_idx_10g < -1 || t4_pktc_idx_10g >= SGE_NCOUNTERS)
+ t4_pktc_idx_10g = PKTC_IDX_10G;
+
+ if (t4_tmr_idx_1g < 0 || t4_tmr_idx_1g >= SGE_NTIMERS)
+ t4_tmr_idx_1g = TMR_IDX_1G;
+
+ if (t4_pktc_idx_1g < -1 || t4_pktc_idx_1g >= SGE_NCOUNTERS)
+ t4_pktc_idx_1g = PKTC_IDX_1G;
+
+ if (t4_qsize_txq < 128)
+ t4_qsize_txq = 128;
+
+ if (t4_qsize_rxq < 128)
+ t4_qsize_rxq = 128;
+ while (t4_qsize_rxq & 7)
+ t4_qsize_rxq++;
+
+ t4_intr_types &= INTR_MSIX | INTR_MSI | INTR_INTX;
+}
+
static int
t4_mod_event(module_t mod, int cmd, void *arg)
{
+ int rc = 0;
- if (cmd == MOD_LOAD)
+ switch (cmd) {
+ case MOD_LOAD:
t4_sge_modload();
+ mtx_init(&t4_list_lock, "T4 adapters", 0, MTX_DEF);
+ SLIST_INIT(&t4_list);
+#ifndef TCP_OFFLOAD_DISABLE
+ mtx_init(&t4_uld_list_lock, "T4 ULDs", 0, MTX_DEF);
+ SLIST_INIT(&t4_uld_list);
+#endif
+ tweak_tunables();
+ break;
- return (0);
+ case MOD_UNLOAD:
+#ifndef TCP_OFFLOAD_DISABLE
+ mtx_lock(&t4_uld_list_lock);
+ if (!SLIST_EMPTY(&t4_uld_list)) {
+ rc = EBUSY;
+ mtx_unlock(&t4_uld_list_lock);
+ break;
+ }
+ mtx_unlock(&t4_uld_list_lock);
+ mtx_destroy(&t4_uld_list_lock);
+#endif
+ mtx_lock(&t4_list_lock);
+ if (!SLIST_EMPTY(&t4_list)) {
+ rc = EBUSY;
+ mtx_unlock(&t4_list_lock);
+ break;
+ }
+ mtx_unlock(&t4_list_lock);
+ mtx_destroy(&t4_list_lock);
+ break;
+ }
+
+ return (rc);
}
static devclass_t t4_devclass;
diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c
index b676799..41630e4 100644
--- a/sys/dev/cxgbe/t4_sge.c
+++ b/sys/dev/cxgbe/t4_sge.c
@@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$");
#include <sys/queue.h>
#include <sys/taskqueue.h>
#include <sys/sysctl.h>
+#include <sys/smp.h>
#include <net/bpf.h>
#include <net/ethernet.h>
#include <net/if.h>
@@ -50,7 +51,7 @@ __FBSDID("$FreeBSD$");
#include "common/t4_regs.h"
#include "common/t4_regs_values.h"
#include "common/t4_msg.h"
-#include "common/t4fw_interface.h"
+#include "t4_l2t.h"
struct fl_buf_info {
int size;
@@ -91,12 +92,15 @@ struct sgl {
bus_dma_segment_t seg[TX_SGL_SEGS];
};
-static void t4_evt_rx(void *);
-static void t4_eth_rx(void *);
+static int service_iq(struct sge_iq *, int);
+static struct mbuf *get_fl_payload(struct adapter *, struct sge_fl *, uint32_t,
+ int *);
+static int t4_eth_rx(struct sge_iq *, const struct rss_header *, struct mbuf *);
static inline void init_iq(struct sge_iq *, struct adapter *, int, int, int,
- int, iq_intr_handler_t *, char *);
-static inline void init_fl(struct sge_fl *, int, char *);
-static inline void init_eq(struct sge_eq *, int, char *);
+ int, char *);
+static inline void init_fl(struct sge_fl *, int, int, char *);
+static inline void init_eq(struct sge_eq *, int, int, uint8_t, uint16_t,
+ char *);
static int alloc_ring(struct adapter *, size_t, bus_dma_tag_t *, bus_dmamap_t *,
bus_addr_t *, void **);
static int free_ring(struct adapter *, bus_dma_tag_t, bus_dmamap_t, bus_addr_t,
@@ -104,26 +108,41 @@ static int free_ring(struct adapter *, bus_dma_tag_t, bus_dmamap_t, bus_addr_t,
static int alloc_iq_fl(struct port_info *, struct sge_iq *, struct sge_fl *,
int, int);
static int free_iq_fl(struct port_info *, struct sge_iq *, struct sge_fl *);
-static int alloc_intrq(struct adapter *, int, int, int);
-static int free_intrq(struct sge_iq *);
-static int alloc_fwq(struct adapter *, int);
-static int free_fwq(struct sge_iq *);
-static int alloc_rxq(struct port_info *, struct sge_rxq *, int, int);
+static int alloc_fwq(struct adapter *);
+static int free_fwq(struct adapter *);
+static int alloc_mgmtq(struct adapter *);
+static int free_mgmtq(struct adapter *);
+static int alloc_rxq(struct port_info *, struct sge_rxq *, int, int,
+ struct sysctl_oid *);
static int free_rxq(struct port_info *, struct sge_rxq *);
-static int alloc_ctrlq(struct adapter *, struct sge_ctrlq *, int);
-static int free_ctrlq(struct adapter *, struct sge_ctrlq *);
-static int alloc_txq(struct port_info *, struct sge_txq *, int);
+#ifndef TCP_OFFLOAD_DISABLE
+static int alloc_ofld_rxq(struct port_info *, struct sge_ofld_rxq *, int, int,
+ struct sysctl_oid *);
+static int free_ofld_rxq(struct port_info *, struct sge_ofld_rxq *);
+#endif
+static int ctrl_eq_alloc(struct adapter *, struct sge_eq *);
+static int eth_eq_alloc(struct adapter *, struct port_info *, struct sge_eq *);
+#ifndef TCP_OFFLOAD_DISABLE
+static int ofld_eq_alloc(struct adapter *, struct port_info *, struct sge_eq *);
+#endif
+static int alloc_eq(struct adapter *, struct port_info *, struct sge_eq *);
+static int free_eq(struct adapter *, struct sge_eq *);
+static int alloc_wrq(struct adapter *, struct port_info *, struct sge_wrq *,
+ struct sysctl_oid *);
+static int free_wrq(struct adapter *, struct sge_wrq *);
+static int alloc_txq(struct port_info *, struct sge_txq *, int,
+ struct sysctl_oid *);
static int free_txq(struct port_info *, struct sge_txq *);
static void oneseg_dma_callback(void *, bus_dma_segment_t *, int, int);
static inline bool is_new_response(const struct sge_iq *, struct rsp_ctrl **);
static inline void iq_next(struct sge_iq *);
static inline void ring_fl_db(struct adapter *, struct sge_fl *);
-static void refill_fl(struct adapter *, struct sge_fl *, int, int);
+static int refill_fl(struct adapter *, struct sge_fl *, int);
+static void refill_sfl(void *);
static int alloc_fl_sdesc(struct sge_fl *);
static void free_fl_sdesc(struct sge_fl *);
-static int alloc_tx_maps(struct sge_txq *);
-static void free_tx_maps(struct sge_txq *);
static void set_fl_tag_idx(struct sge_fl *, int);
+static void add_fl_to_sfl(struct adapter *, struct sge_fl *);
static int get_pkt_sgl(struct sge_txq *, struct mbuf **, struct sgl *, int);
static int free_pkt_sgl(struct sge_txq *, struct sgl *);
@@ -141,15 +160,13 @@ static inline int reclaimable(struct sge_eq *);
static int reclaim_tx_descs(struct sge_txq *, int, int);
static void write_eqflush_wr(struct sge_eq *);
static __be64 get_flit(bus_dma_segment_t *, int, int);
-static int handle_sge_egr_update(struct adapter *,
- const struct cpl_sge_egr_update *);
-static void handle_cpl(struct adapter *, struct sge_iq *);
+static int handle_sge_egr_update(struct sge_iq *, const struct rss_header *,
+ struct mbuf *);
+static int handle_fw_rpl(struct sge_iq *, const struct rss_header *,
+ struct mbuf *);
-static int ctrl_tx(struct adapter *, struct sge_ctrlq *, struct mbuf *);
static int sysctl_uint16(SYSCTL_HANDLER_ARGS);
-extern void filter_rpl(struct adapter *, const struct cpl_set_tcb_rpl *);
-
/*
* Called on MOD_LOAD and fills up fl_buf_info[].
*/
@@ -181,46 +198,103 @@ t4_sge_modload(void)
* We do not initialize any of the queues here, instead the driver
* top-level must request them individually.
*/
-void
+int
t4_sge_init(struct adapter *sc)
{
struct sge *s = &sc->sge;
- int i;
+ int i, rc = 0;
+ uint32_t ctrl_mask, ctrl_val, hpsize, v;
+
+ ctrl_mask = V_PKTSHIFT(M_PKTSHIFT) | F_RXPKTCPLMODE |
+ V_INGPADBOUNDARY(M_INGPADBOUNDARY) |
+ F_EGRSTATUSPAGESIZE;
+ ctrl_val = V_PKTSHIFT(FL_PKTSHIFT) | F_RXPKTCPLMODE |
+ V_INGPADBOUNDARY(ilog2(FL_ALIGN) - 5) |
+ V_EGRSTATUSPAGESIZE(SPG_LEN == 128);
+
+ hpsize = V_HOSTPAGESIZEPF0(PAGE_SHIFT - 10) |
+ V_HOSTPAGESIZEPF1(PAGE_SHIFT - 10) |
+ V_HOSTPAGESIZEPF2(PAGE_SHIFT - 10) |
+ V_HOSTPAGESIZEPF3(PAGE_SHIFT - 10) |
+ V_HOSTPAGESIZEPF4(PAGE_SHIFT - 10) |
+ V_HOSTPAGESIZEPF5(PAGE_SHIFT - 10) |
+ V_HOSTPAGESIZEPF6(PAGE_SHIFT - 10) |
+ V_HOSTPAGESIZEPF7(PAGE_SHIFT - 10);
+
+ if (sc->flags & MASTER_PF) {
+ int intr_timer[SGE_NTIMERS] = {1, 5, 10, 50, 100, 200};
+ int intr_pktcount[SGE_NCOUNTERS] = {1, 8, 16, 32}; /* 63 max */
+
+ t4_set_reg_field(sc, A_SGE_CONTROL, ctrl_mask, ctrl_val);
+ t4_write_reg(sc, A_SGE_HOST_PAGE_SIZE, hpsize);
+ for (i = 0; i < FL_BUF_SIZES; i++) {
+ t4_write_reg(sc, A_SGE_FL_BUFFER_SIZE0 + (4 * i),
+ FL_BUF_SIZE(i));
+ }
+
+ t4_write_reg(sc, A_SGE_INGRESS_RX_THRESHOLD,
+ V_THRESHOLD_0(intr_pktcount[0]) |
+ V_THRESHOLD_1(intr_pktcount[1]) |
+ V_THRESHOLD_2(intr_pktcount[2]) |
+ V_THRESHOLD_3(intr_pktcount[3]));
+
+ t4_write_reg(sc, A_SGE_TIMER_VALUE_0_AND_1,
+ V_TIMERVALUE0(us_to_core_ticks(sc, intr_timer[0])) |
+ V_TIMERVALUE1(us_to_core_ticks(sc, intr_timer[1])));
+ t4_write_reg(sc, A_SGE_TIMER_VALUE_2_AND_3,
+ V_TIMERVALUE2(us_to_core_ticks(sc, intr_timer[2])) |
+ V_TIMERVALUE3(us_to_core_ticks(sc, intr_timer[3])));
+ t4_write_reg(sc, A_SGE_TIMER_VALUE_4_AND_5,
+ V_TIMERVALUE4(us_to_core_ticks(sc, intr_timer[4])) |
+ V_TIMERVALUE5(us_to_core_ticks(sc, intr_timer[5])));
+ }
+
+ v = t4_read_reg(sc, A_SGE_CONTROL);
+ if ((v & ctrl_mask) != ctrl_val) {
+ device_printf(sc->dev, "invalid SGE_CONTROL(0x%x)\n", v);
+ rc = EINVAL;
+ }
- t4_set_reg_field(sc, A_SGE_CONTROL, V_PKTSHIFT(M_PKTSHIFT) |
- V_INGPADBOUNDARY(M_INGPADBOUNDARY) |
- F_EGRSTATUSPAGESIZE,
- V_INGPADBOUNDARY(ilog2(FL_ALIGN) - 5) |
- V_PKTSHIFT(FL_PKTSHIFT) |
- F_RXPKTCPLMODE |
- V_EGRSTATUSPAGESIZE(SPG_LEN == 128));
- t4_set_reg_field(sc, A_SGE_HOST_PAGE_SIZE,
- V_HOSTPAGESIZEPF0(M_HOSTPAGESIZEPF0),
- V_HOSTPAGESIZEPF0(PAGE_SHIFT - 10));
+ v = t4_read_reg(sc, A_SGE_HOST_PAGE_SIZE);
+ if (v != hpsize) {
+ device_printf(sc->dev, "invalid SGE_HOST_PAGE_SIZE(0x%x)\n", v);
+ rc = EINVAL;
+ }
for (i = 0; i < FL_BUF_SIZES; i++) {
- t4_write_reg(sc, A_SGE_FL_BUFFER_SIZE0 + (4 * i),
- FL_BUF_SIZE(i));
+ v = t4_read_reg(sc, A_SGE_FL_BUFFER_SIZE0 + (4 * i));
+ if (v != FL_BUF_SIZE(i)) {
+ device_printf(sc->dev,
+ "invalid SGE_FL_BUFFER_SIZE[%d](0x%x)\n", i, v);
+ rc = EINVAL;
+ }
}
- i = t4_read_reg(sc, A_SGE_CONM_CTRL);
- s->fl_starve_threshold = G_EGRTHRESHOLD(i) * 2 + 1;
+ v = t4_read_reg(sc, A_SGE_CONM_CTRL);
+ s->fl_starve_threshold = G_EGRTHRESHOLD(v) * 2 + 1;
+
+ v = t4_read_reg(sc, A_SGE_INGRESS_RX_THRESHOLD);
+ sc->sge.counter_val[0] = G_THRESHOLD_0(v);
+ sc->sge.counter_val[1] = G_THRESHOLD_1(v);
+ sc->sge.counter_val[2] = G_THRESHOLD_2(v);
+ sc->sge.counter_val[3] = G_THRESHOLD_3(v);
+
+ v = t4_read_reg(sc, A_SGE_TIMER_VALUE_0_AND_1);
+ sc->sge.timer_val[0] = G_TIMERVALUE0(v) / core_ticks_per_usec(sc);
+ sc->sge.timer_val[1] = G_TIMERVALUE1(v) / core_ticks_per_usec(sc);
+ v = t4_read_reg(sc, A_SGE_TIMER_VALUE_2_AND_3);
+ sc->sge.timer_val[2] = G_TIMERVALUE2(v) / core_ticks_per_usec(sc);
+ sc->sge.timer_val[3] = G_TIMERVALUE3(v) / core_ticks_per_usec(sc);
+ v = t4_read_reg(sc, A_SGE_TIMER_VALUE_4_AND_5);
+ sc->sge.timer_val[4] = G_TIMERVALUE4(v) / core_ticks_per_usec(sc);
+ sc->sge.timer_val[5] = G_TIMERVALUE5(v) / core_ticks_per_usec(sc);
- t4_write_reg(sc, A_SGE_INGRESS_RX_THRESHOLD,
- V_THRESHOLD_0(s->counter_val[0]) |
- V_THRESHOLD_1(s->counter_val[1]) |
- V_THRESHOLD_2(s->counter_val[2]) |
- V_THRESHOLD_3(s->counter_val[3]));
+ t4_register_cpl_handler(sc, CPL_FW4_MSG, handle_fw_rpl);
+ t4_register_cpl_handler(sc, CPL_FW6_MSG, handle_fw_rpl);
+ t4_register_cpl_handler(sc, CPL_SGE_EGR_UPDATE, handle_sge_egr_update);
+ t4_register_cpl_handler(sc, CPL_RX_PKT, t4_eth_rx);
- t4_write_reg(sc, A_SGE_TIMER_VALUE_0_AND_1,
- V_TIMERVALUE0(us_to_core_ticks(sc, s->timer_val[0])) |
- V_TIMERVALUE1(us_to_core_ticks(sc, s->timer_val[1])));
- t4_write_reg(sc, A_SGE_TIMER_VALUE_2_AND_3,
- V_TIMERVALUE2(us_to_core_ticks(sc, s->timer_val[2])) |
- V_TIMERVALUE3(us_to_core_ticks(sc, s->timer_val[3])));
- t4_write_reg(sc, A_SGE_TIMER_VALUE_4_AND_5,
- V_TIMERVALUE4(us_to_core_ticks(sc, s->timer_val[4])) |
- V_TIMERVALUE5(us_to_core_ticks(sc, s->timer_val[5])));
+ return (rc);
}
int
@@ -250,8 +324,7 @@ t4_destroy_dma_tag(struct adapter *sc)
}
/*
- * Allocate and initialize the firmware event queue, control queues, and the
- * interrupt queues. The adapter owns all of these queues.
+ * Allocate and initialize the firmware event queue and the management queue.
*
* Returns errno on failure. Resources allocated up to that point may still be
* allocated. Caller is responsible for cleanup in case this function fails.
@@ -259,110 +332,32 @@ t4_destroy_dma_tag(struct adapter *sc)
int
t4_setup_adapter_queues(struct adapter *sc)
{
- int i, j, rc, intr_idx, qsize;
- struct sge_iq *iq;
- struct sge_ctrlq *ctrlq;
- iq_intr_handler_t *handler;
- char name[16];
+ int rc;
ADAPTER_LOCK_ASSERT_NOTOWNED(sc);
- if (sysctl_ctx_init(&sc->ctx) == 0) {
- struct sysctl_oid *oid = device_get_sysctl_tree(sc->dev);
- struct sysctl_oid_list *children = SYSCTL_CHILDREN(oid);
-
- sc->oid_fwq = SYSCTL_ADD_NODE(&sc->ctx, children, OID_AUTO,
- "fwq", CTLFLAG_RD, NULL, "firmware event queue");
- sc->oid_ctrlq = SYSCTL_ADD_NODE(&sc->ctx, children, OID_AUTO,
- "ctrlq", CTLFLAG_RD, NULL, "ctrl queues");
- sc->oid_intrq = SYSCTL_ADD_NODE(&sc->ctx, children, OID_AUTO,
- "intrq", CTLFLAG_RD, NULL, "interrupt queues");
- }
-
- /*
- * Interrupt queues
- */
- intr_idx = sc->intr_count - NINTRQ(sc);
- if (sc->flags & INTR_SHARED) {
- qsize = max((sc->sge.nrxq + 1) * 2, INTR_IQ_QSIZE);
- for (i = 0; i < NINTRQ(sc); i++, intr_idx++) {
- snprintf(name, sizeof(name), "%s intrq%d",
- device_get_nameunit(sc->dev), i);
-
- iq = &sc->sge.intrq[i];
- init_iq(iq, sc, 0, 0, qsize, INTR_IQ_ESIZE, NULL, name);
- rc = alloc_intrq(sc, i % sc->params.nports, i,
- intr_idx);
-
- if (rc != 0) {
- device_printf(sc->dev,
- "failed to create %s: %d\n", name, rc);
- return (rc);
- }
- }
- } else {
- int qidx = 0;
- struct port_info *pi;
-
- for (i = 0; i < sc->params.nports; i++) {
- pi = sc->port[i];
- qsize = max((pi->nrxq + 1) * 2, INTR_IQ_QSIZE);
- for (j = 0; j < pi->nrxq; j++, qidx++, intr_idx++) {
- snprintf(name, sizeof(name), "%s intrq%d",
- device_get_nameunit(pi->dev), j);
-
- iq = &sc->sge.intrq[qidx];
- init_iq(iq, sc, 0, 0, qsize, INTR_IQ_ESIZE,
- NULL, name);
- rc = alloc_intrq(sc, i, qidx, intr_idx);
-
- if (rc != 0) {
- device_printf(sc->dev,
- "failed to create %s: %d\n",
- name, rc);
- return (rc);
- }
- }
- }
- }
+ sysctl_ctx_init(&sc->ctx);
+ sc->flags |= ADAP_SYSCTL_CTX;
/*
* Firmware event queue
*/
- snprintf(name, sizeof(name), "%s fwq", device_get_nameunit(sc->dev));
- if (sc->intr_count > T4_EXTRA_INTR) {
- handler = NULL;
- intr_idx = 1;
- } else {
- handler = t4_evt_rx;
- intr_idx = 0;
- }
-
- iq = &sc->sge.fwq;
- init_iq(iq, sc, 0, 0, FW_IQ_QSIZE, FW_IQ_ESIZE, handler, name);
- rc = alloc_fwq(sc, intr_idx);
+ rc = alloc_fwq(sc);
if (rc != 0) {
device_printf(sc->dev,
"failed to create firmware event queue: %d\n", rc);
-
return (rc);
}
/*
- * Control queues - one per port.
+ * Management queue. This is just a control queue that uses the fwq as
+ * its associated iq.
*/
- ctrlq = &sc->sge.ctrlq[0];
- for (i = 0; i < sc->params.nports; i++, ctrlq++) {
- snprintf(name, sizeof(name), "%s ctrlq%d",
- device_get_nameunit(sc->dev), i);
- init_eq(&ctrlq->eq, CTRL_EQ_QSIZE, name);
-
- rc = alloc_ctrlq(sc, ctrlq, i);
- if (rc != 0) {
- device_printf(sc->dev,
- "failed to create control queue %d: %d\n", i, rc);
- return (rc);
- }
+ rc = alloc_mgmtq(sc);
+ if (rc != 0) {
+ device_printf(sc->dev,
+ "failed to create management queue: %d\n", rc);
+ return (rc);
}
return (rc);
@@ -374,86 +369,278 @@ t4_setup_adapter_queues(struct adapter *sc)
int
t4_teardown_adapter_queues(struct adapter *sc)
{
- int i;
- struct sge_iq *iq;
ADAPTER_LOCK_ASSERT_NOTOWNED(sc);
- /* Do this before freeing the queues */
- if (sc->oid_fwq || sc->oid_ctrlq || sc->oid_intrq) {
+ /* Do this before freeing the queue */
+ if (sc->flags & ADAP_SYSCTL_CTX) {
sysctl_ctx_free(&sc->ctx);
- sc->oid_fwq = NULL;
- sc->oid_ctrlq = NULL;
- sc->oid_intrq = NULL;
+ sc->flags &= ~ADAP_SYSCTL_CTX;
}
- for (i = 0; i < sc->params.nports; i++)
- free_ctrlq(sc, &sc->sge.ctrlq[i]);
+ free_mgmtq(sc);
+ free_fwq(sc);
+
+ return (0);
+}
+
+static inline int
+first_vector(struct port_info *pi)
+{
+ struct adapter *sc = pi->adapter;
+ int rc = T4_EXTRA_INTR, i;
+
+ if (sc->intr_count == 1)
+ return (0);
- iq = &sc->sge.fwq;
- free_fwq(iq);
+ for_each_port(sc, i) {
+ if (i == pi->port_id)
+ break;
+
+#ifndef TCP_OFFLOAD_DISABLE
+ if (sc->flags & INTR_DIRECT)
+ rc += pi->nrxq + pi->nofldrxq;
+ else
+ rc += max(pi->nrxq, pi->nofldrxq);
+#else
+ /*
+ * Not compiled with offload support and intr_count > 1. Only
+ * NIC queues exist and they'd better be taking direct
+ * interrupts.
+ */
+ KASSERT(sc->flags & INTR_DIRECT,
+ ("%s: intr_count %d, !INTR_DIRECT", __func__,
+ sc->intr_count));
- for (i = 0; i < NINTRQ(sc); i++) {
- iq = &sc->sge.intrq[i];
- free_intrq(iq);
+ rc += pi->nrxq;
+#endif
}
- return (0);
+ return (rc);
+}
+
+/*
+ * Given an arbitrary "index," come up with an iq that can be used by other
+ * queues (of this port) for interrupt forwarding, SGE egress updates, etc.
+ * The iq returned is guaranteed to be something that takes direct interrupts.
+ */
+static struct sge_iq *
+port_intr_iq(struct port_info *pi, int idx)
+{
+ struct adapter *sc = pi->adapter;
+ struct sge *s = &sc->sge;
+ struct sge_iq *iq = NULL;
+
+ if (sc->intr_count == 1)
+ return (&sc->sge.fwq);
+
+#ifndef TCP_OFFLOAD_DISABLE
+ if (sc->flags & INTR_DIRECT) {
+ idx %= pi->nrxq + pi->nofldrxq;
+
+ if (idx >= pi->nrxq) {
+ idx -= pi->nrxq;
+ iq = &s->ofld_rxq[pi->first_ofld_rxq + idx].iq;
+ } else
+ iq = &s->rxq[pi->first_rxq + idx].iq;
+
+ } else {
+ idx %= max(pi->nrxq, pi->nofldrxq);
+
+ if (pi->nrxq >= pi->nofldrxq)
+ iq = &s->rxq[pi->first_rxq + idx].iq;
+ else
+ iq = &s->ofld_rxq[pi->first_ofld_rxq + idx].iq;
+ }
+#else
+ /*
+ * Not compiled with offload support and intr_count > 1. Only NIC
+ * queues exist and they'd better be taking direct interrupts.
+ */
+ KASSERT(sc->flags & INTR_DIRECT,
+ ("%s: intr_count %d, !INTR_DIRECT", __func__, sc->intr_count));
+
+ idx %= pi->nrxq;
+ iq = &s->rxq[pi->first_rxq + idx].iq;
+#endif
+
+ KASSERT(iq->flags & IQ_INTR, ("%s: EDOOFUS", __func__));
+ return (iq);
}
int
-t4_setup_eth_queues(struct port_info *pi)
+t4_setup_port_queues(struct port_info *pi)
{
- int rc = 0, i, intr_idx;
+ int rc = 0, i, j, intr_idx, iqid;
struct sge_rxq *rxq;
struct sge_txq *txq;
+ struct sge_wrq *ctrlq;
+#ifndef TCP_OFFLOAD_DISABLE
+ struct sge_ofld_rxq *ofld_rxq;
+ struct sge_wrq *ofld_txq;
+#endif
char name[16];
struct adapter *sc = pi->adapter;
+ struct sysctl_oid *oid = device_get_sysctl_tree(pi->dev), *oid2 = NULL;
+ struct sysctl_oid_list *children = SYSCTL_CHILDREN(oid);
- if (sysctl_ctx_init(&pi->ctx) == 0) {
- struct sysctl_oid *oid = device_get_sysctl_tree(pi->dev);
- struct sysctl_oid_list *children = SYSCTL_CHILDREN(oid);
+ oid = SYSCTL_ADD_NODE(&pi->ctx, children, OID_AUTO, "rxq", CTLFLAG_RD,
+ NULL, "rx queues");
- pi->oid_rxq = SYSCTL_ADD_NODE(&pi->ctx, children, OID_AUTO,
- "rxq", CTLFLAG_RD, NULL, "rx queues");
- pi->oid_txq = SYSCTL_ADD_NODE(&pi->ctx, children, OID_AUTO,
- "txq", CTLFLAG_RD, NULL, "tx queues");
+#ifndef TCP_OFFLOAD_DISABLE
+ if (is_offload(sc)) {
+ oid2 = SYSCTL_ADD_NODE(&pi->ctx, children, OID_AUTO, "ofld_rxq",
+ CTLFLAG_RD, NULL,
+ "rx queues for offloaded TCP connections");
}
+#endif
+
+ /* Interrupt vector to start from (when using multiple vectors) */
+ intr_idx = first_vector(pi);
+ /*
+ * First pass over all rx queues (NIC and TOE):
+ * a) initialize iq and fl
+ * b) allocate queue iff it will take direct interrupts.
+ */
for_each_rxq(pi, i, rxq) {
snprintf(name, sizeof(name), "%s rxq%d-iq",
device_get_nameunit(pi->dev), i);
- init_iq(&rxq->iq, sc, pi->tmr_idx, pi->pktc_idx,
- pi->qsize_rxq, RX_IQ_ESIZE, t4_eth_rx, name);
+ init_iq(&rxq->iq, sc, pi->tmr_idx, pi->pktc_idx, pi->qsize_rxq,
+ RX_IQ_ESIZE, name);
snprintf(name, sizeof(name), "%s rxq%d-fl",
device_get_nameunit(pi->dev), i);
- init_fl(&rxq->fl, pi->qsize_rxq / 8, name);
+ init_fl(&rxq->fl, pi->qsize_rxq / 8, pi->ifp->if_mtu, name);
+
+ if (sc->flags & INTR_DIRECT
+#ifndef TCP_OFFLOAD_DISABLE
+ || (sc->intr_count > 1 && pi->nrxq >= pi->nofldrxq)
+#endif
+ ) {
+ rxq->iq.flags |= IQ_INTR;
+ rc = alloc_rxq(pi, rxq, intr_idx, i, oid);
+ if (rc != 0)
+ goto done;
+ intr_idx++;
+ }
+ }
- intr_idx = pi->first_rxq + i;
- if (sc->flags & INTR_SHARED)
- intr_idx %= NINTRQ(sc);
+#ifndef TCP_OFFLOAD_DISABLE
+ for_each_ofld_rxq(pi, i, ofld_rxq) {
- rc = alloc_rxq(pi, rxq, intr_idx, i);
+ snprintf(name, sizeof(name), "%s ofld_rxq%d-iq",
+ device_get_nameunit(pi->dev), i);
+ init_iq(&ofld_rxq->iq, sc, pi->tmr_idx, pi->pktc_idx,
+ pi->qsize_rxq, RX_IQ_ESIZE, name);
+
+ snprintf(name, sizeof(name), "%s ofld_rxq%d-fl",
+ device_get_nameunit(pi->dev), i);
+ init_fl(&ofld_rxq->fl, pi->qsize_rxq / 8, MJUM16BYTES, name);
+
+ if (sc->flags & INTR_DIRECT ||
+ (sc->intr_count > 1 && pi->nofldrxq > pi->nrxq)) {
+ ofld_rxq->iq.flags |= IQ_INTR;
+ rc = alloc_ofld_rxq(pi, ofld_rxq, intr_idx, i, oid2);
+ if (rc != 0)
+ goto done;
+ intr_idx++;
+ }
+ }
+#endif
+
+ /*
+ * Second pass over all rx queues (NIC and TOE). The queues forwarding
+ * their interrupts are allocated now.
+ */
+ j = 0;
+ for_each_rxq(pi, i, rxq) {
+ if (rxq->iq.flags & IQ_INTR)
+ continue;
+
+ intr_idx = port_intr_iq(pi, j)->abs_id;
+
+ rc = alloc_rxq(pi, rxq, intr_idx, i, oid);
+ if (rc != 0)
+ goto done;
+ j++;
+ }
+
+#ifndef TCP_OFFLOAD_DISABLE
+ for_each_ofld_rxq(pi, i, ofld_rxq) {
+ if (ofld_rxq->iq.flags & IQ_INTR)
+ continue;
+
+ intr_idx = port_intr_iq(pi, j)->abs_id;
+
+ rc = alloc_ofld_rxq(pi, ofld_rxq, intr_idx, i, oid2);
if (rc != 0)
goto done;
+ j++;
}
+#endif
+ /*
+ * Now the tx queues. Only one pass needed.
+ */
+ oid = SYSCTL_ADD_NODE(&pi->ctx, children, OID_AUTO, "txq", CTLFLAG_RD,
+ NULL, "tx queues");
+ j = 0;
for_each_txq(pi, i, txq) {
+ uint16_t iqid;
+
+ iqid = port_intr_iq(pi, j)->cntxt_id;
snprintf(name, sizeof(name), "%s txq%d",
device_get_nameunit(pi->dev), i);
- init_eq(&txq->eq, pi->qsize_txq, name);
+ init_eq(&txq->eq, EQ_ETH, pi->qsize_txq, pi->tx_chan, iqid,
+ name);
- rc = alloc_txq(pi, txq, i);
+ rc = alloc_txq(pi, txq, i, oid);
if (rc != 0)
goto done;
+ j++;
}
+#ifndef TCP_OFFLOAD_DISABLE
+ oid = SYSCTL_ADD_NODE(&pi->ctx, children, OID_AUTO, "ofld_txq",
+ CTLFLAG_RD, NULL, "tx queues for offloaded TCP connections");
+ for_each_ofld_txq(pi, i, ofld_txq) {
+ uint16_t iqid;
+
+ iqid = port_intr_iq(pi, j)->cntxt_id;
+
+ snprintf(name, sizeof(name), "%s ofld_txq%d",
+ device_get_nameunit(pi->dev), i);
+ init_eq(&ofld_txq->eq, EQ_OFLD, pi->qsize_txq, pi->tx_chan,
+ iqid, name);
+
+ snprintf(name, sizeof(name), "%d", i);
+ oid2 = SYSCTL_ADD_NODE(&pi->ctx, SYSCTL_CHILDREN(oid), OID_AUTO,
+ name, CTLFLAG_RD, NULL, "offload tx queue");
+
+ rc = alloc_wrq(sc, pi, ofld_txq, oid2);
+ if (rc != 0)
+ goto done;
+ j++;
+ }
+#endif
+
+ /*
+ * Finally, the control queue.
+ */
+ oid = SYSCTL_ADD_NODE(&pi->ctx, children, OID_AUTO, "ctrlq", CTLFLAG_RD,
+ NULL, "ctrl queue");
+ ctrlq = &sc->sge.ctrlq[pi->port_id];
+ iqid = port_intr_iq(pi, 0)->cntxt_id;
+ snprintf(name, sizeof(name), "%s ctrlq", device_get_nameunit(pi->dev));
+ init_eq(&ctrlq->eq, EQ_CTRL, CTRL_EQ_QSIZE, pi->tx_chan, iqid, name);
+ rc = alloc_wrq(sc, pi, ctrlq, oid);
+
done:
if (rc)
- t4_teardown_eth_queues(pi);
+ t4_teardown_port_queues(pi);
return (rc);
}
@@ -462,90 +649,91 @@ done:
* Idempotent
*/
int
-t4_teardown_eth_queues(struct port_info *pi)
+t4_teardown_port_queues(struct port_info *pi)
{
int i;
+ struct adapter *sc = pi->adapter;
struct sge_rxq *rxq;
struct sge_txq *txq;
+#ifndef TCP_OFFLOAD_DISABLE
+ struct sge_ofld_rxq *ofld_rxq;
+ struct sge_wrq *ofld_txq;
+#endif
/* Do this before freeing the queues */
- if (pi->oid_txq || pi->oid_rxq) {
+ if (pi->flags & PORT_SYSCTL_CTX) {
sysctl_ctx_free(&pi->ctx);
- pi->oid_txq = pi->oid_rxq = NULL;
+ pi->flags &= ~PORT_SYSCTL_CTX;
}
+ /*
+ * Take down all the tx queues first, as they reference the rx queues
+ * (for egress updates, etc.).
+ */
+
+ free_wrq(sc, &sc->sge.ctrlq[pi->port_id]);
+
for_each_txq(pi, i, txq) {
free_txq(pi, txq);
}
+#ifndef TCP_OFFLOAD_DISABLE
+ for_each_ofld_txq(pi, i, ofld_txq) {
+ free_wrq(sc, ofld_txq);
+ }
+#endif
+
+ /*
+ * Then take down the rx queues that forward their interrupts, as they
+ * reference other rx queues.
+ */
+
+ for_each_rxq(pi, i, rxq) {
+ if ((rxq->iq.flags & IQ_INTR) == 0)
+ free_rxq(pi, rxq);
+ }
+
+#ifndef TCP_OFFLOAD_DISABLE
+ for_each_ofld_rxq(pi, i, ofld_rxq) {
+ if ((ofld_rxq->iq.flags & IQ_INTR) == 0)
+ free_ofld_rxq(pi, ofld_rxq);
+ }
+#endif
+
+ /*
+ * Then take down the rx queues that take direct interrupts.
+ */
+
for_each_rxq(pi, i, rxq) {
- free_rxq(pi, rxq);
+ if (rxq->iq.flags & IQ_INTR)
+ free_rxq(pi, rxq);
}
+#ifndef TCP_OFFLOAD_DISABLE
+ for_each_ofld_rxq(pi, i, ofld_rxq) {
+ if (ofld_rxq->iq.flags & IQ_INTR)
+ free_ofld_rxq(pi, ofld_rxq);
+ }
+#endif
+
return (0);
}
-/* Deals with errors and the first (and only) interrupt queue */
+/*
+ * Deals with errors and the firmware event queue. All data rx queues forward
+ * their interrupt to the firmware event queue.
+ */
void
t4_intr_all(void *arg)
{
struct adapter *sc = arg;
+ struct sge_iq *fwq = &sc->sge.fwq;
t4_intr_err(arg);
- t4_intr(&sc->sge.intrq[0]);
-}
-
-/* Deals with interrupts, and a few CPLs, on the given interrupt queue */
-void
-t4_intr(void *arg)
-{
- struct sge_iq *iq = arg, *q;
- struct adapter *sc = iq->adapter;
- struct rsp_ctrl *ctrl;
- const struct rss_header *rss;
- int ndesc_pending = 0, ndesc_total = 0;
- int qid, rsp_type;
-
- if (!atomic_cmpset_32(&iq->state, IQS_IDLE, IQS_BUSY))
- return;
-
- while (is_new_response(iq, &ctrl)) {
-
- rmb();
-
- rss = (const void *)iq->cdesc;
- rsp_type = G_RSPD_TYPE(ctrl->u.type_gen);
-
- if (__predict_false(rsp_type == X_RSPD_TYPE_CPL)) {
- handle_cpl(sc, iq);
- goto nextdesc;
- }
-
- qid = ntohl(ctrl->pldbuflen_qid) - sc->sge.iq_start;
- q = sc->sge.iqmap[qid];
-
- if (atomic_cmpset_32(&q->state, IQS_IDLE, IQS_BUSY)) {
- q->handler(q);
- atomic_cmpset_32(&q->state, IQS_BUSY, IQS_IDLE);
- }
-
-nextdesc: ndesc_total++;
- if (++ndesc_pending >= iq->qsize / 4) {
- t4_write_reg(sc, MYPF_REG(A_SGE_PF_GTS),
- V_CIDXINC(ndesc_pending) |
- V_INGRESSQID(iq->cntxt_id) |
- V_SEINTARM(
- V_QINTR_TIMER_IDX(X_TIMERREG_UPDATE_CIDX)));
- ndesc_pending = 0;
- }
-
- iq_next(iq);
+ if (atomic_cmpset_int(&fwq->state, IQS_IDLE, IQS_BUSY)) {
+ service_iq(fwq, 0);
+ atomic_cmpset_int(&fwq->state, IQS_BUSY, IQS_IDLE);
}
-
- t4_write_reg(sc, MYPF_REG(A_SGE_PF_GTS), V_CIDXINC(ndesc_pending) |
- V_INGRESSQID((u32)iq->cntxt_id) | V_SEINTARM(iq->intr_params));
-
- atomic_cmpset_32(&iq->state, IQS_BUSY, IQS_IDLE);
}
/* Deals with error interrupts */
@@ -558,259 +746,452 @@ t4_intr_err(void *arg)
t4_slow_intr_handler(sc);
}
-/* Deals with the firmware event queue */
void
t4_intr_evt(void *arg)
{
struct sge_iq *iq = arg;
- if (atomic_cmpset_32(&iq->state, IQS_IDLE, IQS_BUSY)) {
- t4_evt_rx(arg);
- atomic_cmpset_32(&iq->state, IQS_BUSY, IQS_IDLE);
+ if (atomic_cmpset_int(&iq->state, IQS_IDLE, IQS_BUSY)) {
+ service_iq(iq, 0);
+ atomic_cmpset_int(&iq->state, IQS_BUSY, IQS_IDLE);
}
}
-static void
-t4_evt_rx(void *arg)
+void
+t4_intr(void *arg)
{
struct sge_iq *iq = arg;
+
+ if (atomic_cmpset_int(&iq->state, IQS_IDLE, IQS_BUSY)) {
+ service_iq(iq, 0);
+ atomic_cmpset_int(&iq->state, IQS_BUSY, IQS_IDLE);
+ }
+}
+
+/*
+ * Deals with anything and everything on the given ingress queue.
+ */
+static int
+service_iq(struct sge_iq *iq, int budget)
+{
+ struct sge_iq *q;
+ struct sge_rxq *rxq = (void *)iq; /* Use iff iq is part of rxq */
+ struct sge_fl *fl = &rxq->fl; /* Use iff IQ_HAS_FL */
struct adapter *sc = iq->adapter;
struct rsp_ctrl *ctrl;
- int ndesc_pending = 0, ndesc_total = 0;
+ const struct rss_header *rss;
+ int ndescs = 0, limit, fl_bufs_used = 0;
+ int rsp_type;
+ uint32_t lq;
+ struct mbuf *m0;
+ STAILQ_HEAD(, sge_iq) iql = STAILQ_HEAD_INITIALIZER(iql);
+
+ limit = budget ? budget : iq->qsize / 8;
+
+ KASSERT(iq->state == IQS_BUSY, ("%s: iq %p not BUSY", __func__, iq));
+
+ /*
+ * We always come back and check the descriptor ring for new indirect
+ * interrupts and other responses after running a single handler.
+ */
+ for (;;) {
+ while (is_new_response(iq, &ctrl)) {
+
+ rmb();
+
+ m0 = NULL;
+ rsp_type = G_RSPD_TYPE(ctrl->u.type_gen);
+ lq = be32toh(ctrl->pldbuflen_qid);
+ rss = (const void *)iq->cdesc;
+
+ switch (rsp_type) {
+ case X_RSPD_TYPE_FLBUF:
+
+ KASSERT(iq->flags & IQ_HAS_FL,
+ ("%s: data for an iq (%p) with no freelist",
+ __func__, iq));
+
+ m0 = get_fl_payload(sc, fl, lq, &fl_bufs_used);
+#ifdef T4_PKT_TIMESTAMP
+ /*
+ * 60 bit timestamp for the payload is
+ * *(uint64_t *)m0->m_pktdat. Note that it is
+ * in the leading free-space in the mbuf. The
+ * kernel can clobber it during a pullup,
+ * m_copymdata, etc. You need to make sure that
+ * the mbuf reaches you unmolested if you care
+ * about the timestamp.
+ */
+ *(uint64_t *)m0->m_pktdat =
+ be64toh(ctrl->u.last_flit) &
+ 0xfffffffffffffff;
+#endif
+
+ /* fall through */
+
+ case X_RSPD_TYPE_CPL:
+ KASSERT(rss->opcode < NUM_CPL_CMDS,
+ ("%s: bad opcode %02x.", __func__,
+ rss->opcode));
+ sc->cpl_handler[rss->opcode](iq, rss, m0);
+ break;
+
+ case X_RSPD_TYPE_INTR:
+
+ /*
+ * Interrupts should be forwarded only to queues
+ * that are not forwarding their interrupts.
+ * This means service_iq can recurse but only 1
+ * level deep.
+ */
+ KASSERT(budget == 0,
+ ("%s: budget %u, rsp_type %u", __func__,
+ budget, rsp_type));
+
+ q = sc->sge.iqmap[lq - sc->sge.iq_start];
+ if (atomic_cmpset_int(&q->state, IQS_IDLE,
+ IQS_BUSY)) {
+ if (service_iq(q, q->qsize / 8) == 0) {
+ atomic_cmpset_int(&q->state,
+ IQS_BUSY, IQS_IDLE);
+ } else {
+ STAILQ_INSERT_TAIL(&iql, q,
+ link);
+ }
+ }
+ break;
- KASSERT(iq == &sc->sge.fwq, ("%s: unexpected ingress queue", __func__));
+ default:
+ panic("%s: rsp_type %u", __func__, rsp_type);
+ }
- while (is_new_response(iq, &ctrl)) {
- int rsp_type;
+ iq_next(iq);
+ if (++ndescs == limit) {
+ t4_write_reg(sc, MYPF_REG(A_SGE_PF_GTS),
+ V_CIDXINC(ndescs) |
+ V_INGRESSQID(iq->cntxt_id) |
+ V_SEINTARM(V_QINTR_TIMER_IDX(X_TIMERREG_UPDATE_CIDX)));
+ ndescs = 0;
+
+ if (fl_bufs_used > 0) {
+ FL_LOCK(fl);
+ fl->needed += fl_bufs_used;
+ refill_fl(sc, fl, fl->cap / 8);
+ FL_UNLOCK(fl);
+ fl_bufs_used = 0;
+ }
- rmb();
+ if (budget)
+ return (EINPROGRESS);
+ }
+ }
- rsp_type = G_RSPD_TYPE(ctrl->u.type_gen);
- if (__predict_false(rsp_type != X_RSPD_TYPE_CPL))
- panic("%s: unexpected rsp_type %d", __func__, rsp_type);
+ if (STAILQ_EMPTY(&iql))
+ break;
- handle_cpl(sc, iq);
+ /*
+ * Process the head only, and send it to the back of the list if
+ * it's still not done.
+ */
+ q = STAILQ_FIRST(&iql);
+ STAILQ_REMOVE_HEAD(&iql, link);
+ if (service_iq(q, q->qsize / 8) == 0)
+ atomic_cmpset_int(&q->state, IQS_BUSY, IQS_IDLE);
+ else
+ STAILQ_INSERT_TAIL(&iql, q, link);
+ }
- ndesc_total++;
- if (++ndesc_pending >= iq->qsize / 4) {
- t4_write_reg(sc, MYPF_REG(A_SGE_PF_GTS),
- V_CIDXINC(ndesc_pending) |
- V_INGRESSQID(iq->cntxt_id) |
- V_SEINTARM(
- V_QINTR_TIMER_IDX(X_TIMERREG_UPDATE_CIDX)));
- ndesc_pending = 0;
+#ifdef INET
+ if (iq->flags & IQ_LRO_ENABLED) {
+ struct lro_ctrl *lro = &rxq->lro;
+ struct lro_entry *l;
+
+ while (!SLIST_EMPTY(&lro->lro_active)) {
+ l = SLIST_FIRST(&lro->lro_active);
+ SLIST_REMOVE_HEAD(&lro->lro_active, next);
+ tcp_lro_flush(lro, l);
}
+ }
+#endif
+
+ t4_write_reg(sc, MYPF_REG(A_SGE_PF_GTS), V_CIDXINC(ndescs) |
+ V_INGRESSQID((u32)iq->cntxt_id) | V_SEINTARM(iq->intr_params));
+
+ if (iq->flags & IQ_HAS_FL) {
+ int starved;
- iq_next(iq);
+ FL_LOCK(fl);
+ fl->needed += fl_bufs_used;
+ starved = refill_fl(sc, fl, fl->cap / 4);
+ FL_UNLOCK(fl);
+ if (__predict_false(starved != 0))
+ add_fl_to_sfl(sc, fl);
}
- t4_write_reg(sc, MYPF_REG(A_SGE_PF_GTS), V_CIDXINC(ndesc_pending) |
- V_INGRESSQID(iq->cntxt_id) | V_SEINTARM(iq->intr_params));
+ return (0);
}
+
#ifdef T4_PKT_TIMESTAMP
#define RX_COPY_THRESHOLD (MINCLSIZE - 8)
#else
#define RX_COPY_THRESHOLD MINCLSIZE
#endif
-static void
-t4_eth_rx(void *arg)
+static struct mbuf *
+get_fl_payload(struct adapter *sc, struct sge_fl *fl, uint32_t len_newbuf,
+ int *fl_bufs_used)
{
- struct sge_rxq *rxq = arg;
- struct sge_iq *iq = arg;
- struct adapter *sc = iq->adapter;
- struct rsp_ctrl *ctrl;
- struct ifnet *ifp = rxq->ifp;
- struct sge_fl *fl = &rxq->fl;
- struct fl_sdesc *sd = &fl->sdesc[fl->cidx], *sd_next;
- const struct rss_header *rss;
- const struct cpl_rx_pkt *cpl;
- uint32_t len;
- int ndescs = 0, i;
struct mbuf *m0, *m;
-#ifdef INET
- struct lro_ctrl *lro = &rxq->lro;
- struct lro_entry *l;
-#endif
+ struct fl_sdesc *sd = &fl->sdesc[fl->cidx];
+ unsigned int nbuf, len;
- prefetch(sd->m);
- prefetch(sd->cl);
+ /*
+ * No assertion for the fl lock because we don't need it. This routine
+ * is called only from the rx interrupt handler and it only updates
+ * fl->cidx. (Contrast that with fl->pidx/fl->needed which could be
+ * updated in the rx interrupt handler or the starvation helper routine.
+ * That's why code that manipulates fl->pidx/fl->needed needs the fl
+ * lock but this routine does not).
+ */
- iq->intr_next = iq->intr_params;
- while (is_new_response(iq, &ctrl)) {
+ if (__predict_false((len_newbuf & F_RSPD_NEWBUF) == 0))
+ panic("%s: cannot handle packed frames", __func__);
+ len = G_RSPD_LEN(len_newbuf);
- rmb();
+ m0 = sd->m;
+ sd->m = NULL; /* consumed */
- rss = (const void *)iq->cdesc;
- i = G_RSPD_TYPE(ctrl->u.type_gen);
+ bus_dmamap_sync(fl->tag[sd->tag_idx], sd->map, BUS_DMASYNC_POSTREAD);
+ m_init(m0, NULL, 0, M_NOWAIT, MT_DATA, M_PKTHDR);
+#ifdef T4_PKT_TIMESTAMP
+ /* Leave room for a timestamp */
+ m0->m_data += 8;
+#endif
- KASSERT(i == X_RSPD_TYPE_FLBUF && rss->opcode == CPL_RX_PKT,
- ("%s: unexpected type %d CPL opcode 0x%x",
- __func__, i, rss->opcode));
+ if (len < RX_COPY_THRESHOLD) {
+ /* copy data to mbuf, buffer will be recycled */
+ bcopy(sd->cl, mtod(m0, caddr_t), len);
+ m0->m_len = len;
+ } else {
+ bus_dmamap_unload(fl->tag[sd->tag_idx], sd->map);
+ m_cljset(m0, sd->cl, FL_BUF_TYPE(sd->tag_idx));
+ sd->cl = NULL; /* consumed */
+ m0->m_len = min(len, FL_BUF_SIZE(sd->tag_idx));
+ }
+ m0->m_pkthdr.len = len;
- sd_next = sd + 1;
- if (__predict_false(fl->cidx + 1 == fl->cap))
- sd_next = fl->sdesc;
- prefetch(sd_next->m);
- prefetch(sd_next->cl);
+ sd++;
+ if (__predict_false(++fl->cidx == fl->cap)) {
+ sd = fl->sdesc;
+ fl->cidx = 0;
+ }
- cpl = (const void *)(rss + 1);
+ m = m0;
+ len -= m->m_len;
+ nbuf = 1; /* # of fl buffers used */
- m0 = sd->m;
+ while (len > 0) {
+ m->m_next = sd->m;
sd->m = NULL; /* consumed */
-
- len = be32toh(ctrl->pldbuflen_qid);
- if (__predict_false((len & F_RSPD_NEWBUF) == 0))
- panic("%s: cannot handle packed frames", __func__);
- len = G_RSPD_LEN(len);
+ m = m->m_next;
bus_dmamap_sync(fl->tag[sd->tag_idx], sd->map,
BUS_DMASYNC_POSTREAD);
- m_init(m0, NULL, 0, M_NOWAIT, MT_DATA, M_PKTHDR);
-
-#ifdef T4_PKT_TIMESTAMP
- *mtod(m0, uint64_t *) =
- be64toh(ctrl->u.last_flit & 0xfffffffffffffff);
- m0->m_data += 8;
-
- /*
- * 60 bit timestamp value is *(uint64_t *)m0->m_pktdat. Note
- * that it is in the leading free-space (see M_LEADINGSPACE) in
- * the mbuf. The kernel can clobber it during a pullup,
- * m_copymdata, etc. You need to make sure that the mbuf
- * reaches you unmolested if you care about the timestamp.
- */
-#endif
-
- if (len < RX_COPY_THRESHOLD) {
- /* copy data to mbuf, buffer will be recycled */
- bcopy(sd->cl, mtod(m0, caddr_t), len);
- m0->m_len = len;
+ m_init(m, NULL, 0, M_NOWAIT, MT_DATA, 0);
+ if (len <= MLEN) {
+ bcopy(sd->cl, mtod(m, caddr_t), len);
+ m->m_len = len;
} else {
- bus_dmamap_unload(fl->tag[sd->tag_idx], sd->map);
- m_cljset(m0, sd->cl, FL_BUF_TYPE(sd->tag_idx));
+ bus_dmamap_unload(fl->tag[sd->tag_idx],
+ sd->map);
+ m_cljset(m, sd->cl, FL_BUF_TYPE(sd->tag_idx));
sd->cl = NULL; /* consumed */
- m0->m_len = min(len, FL_BUF_SIZE(sd->tag_idx));
+ m->m_len = min(len, FL_BUF_SIZE(sd->tag_idx));
}
- len -= FL_PKTSHIFT;
- m0->m_len -= FL_PKTSHIFT;
- m0->m_data += FL_PKTSHIFT;
-
- m0->m_pkthdr.len = len;
- m0->m_pkthdr.rcvif = ifp;
- m0->m_flags |= M_FLOWID;
- m0->m_pkthdr.flowid = rss->hash_val;
-
- if (cpl->csum_calc && !cpl->err_vec &&
- ifp->if_capenable & IFCAP_RXCSUM) {
- m0->m_pkthdr.csum_flags |= (CSUM_IP_CHECKED |
- CSUM_IP_VALID | CSUM_DATA_VALID | CSUM_PSEUDO_HDR);
- if (cpl->ip_frag)
- m0->m_pkthdr.csum_data = be16toh(cpl->csum);
- else
- m0->m_pkthdr.csum_data = 0xffff;
- rxq->rxcsum++;
- }
-
- if (cpl->vlan_ex) {
- m0->m_pkthdr.ether_vtag = be16toh(cpl->vlan);
- m0->m_flags |= M_VLANTAG;
- rxq->vlan_extraction++;
- }
-
- i = 1; /* # of fl sdesc used */
- sd = sd_next;
- if (__predict_false(++fl->cidx == fl->cap))
+ sd++;
+ if (__predict_false(++fl->cidx == fl->cap)) {
+ sd = fl->sdesc;
fl->cidx = 0;
+ }
- len -= m0->m_len;
- m = m0;
- while (len) {
- i++;
-
- sd_next = sd + 1;
- if (__predict_false(fl->cidx + 1 == fl->cap))
- sd_next = fl->sdesc;
- prefetch(sd_next->m);
- prefetch(sd_next->cl);
-
- m->m_next = sd->m;
- sd->m = NULL; /* consumed */
- m = m->m_next;
-
- bus_dmamap_sync(fl->tag[sd->tag_idx], sd->map,
- BUS_DMASYNC_POSTREAD);
-
- m_init(m, NULL, 0, M_NOWAIT, MT_DATA, 0);
- if (len <= MLEN) {
- bcopy(sd->cl, mtod(m, caddr_t), len);
- m->m_len = len;
- } else {
- bus_dmamap_unload(fl->tag[sd->tag_idx],
- sd->map);
- m_cljset(m, sd->cl, FL_BUF_TYPE(sd->tag_idx));
- sd->cl = NULL; /* consumed */
- m->m_len = min(len, FL_BUF_SIZE(sd->tag_idx));
- }
+ len -= m->m_len;
+ nbuf++;
+ }
- i++;
- sd = sd_next;
- if (__predict_false(++fl->cidx == fl->cap))
- fl->cidx = 0;
+ (*fl_bufs_used) += nbuf;
- len -= m->m_len;
- }
+ return (m0);
+}
+static int
+t4_eth_rx(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m0)
+{
+ struct sge_rxq *rxq = (void *)iq;
+ struct ifnet *ifp = rxq->ifp;
+ const struct cpl_rx_pkt *cpl = (const void *)(rss + 1);
#ifdef INET
- if (cpl->l2info & htobe32(F_RXF_LRO) &&
- rxq->flags & RXQ_LRO_ENABLED &&
- tcp_lro_rx(lro, m0, 0) == 0) {
- /* queued for LRO */
- } else
+ struct lro_ctrl *lro = &rxq->lro;
#endif
- ifp->if_input(ifp, m0);
- FL_LOCK(fl);
- fl->needed += i;
- if (fl->needed >= 32)
- refill_fl(sc, fl, 64, 32);
- FL_UNLOCK(fl);
+ KASSERT(m0 != NULL, ("%s: no payload with opcode %02x", __func__,
+ rss->opcode));
- if (++ndescs > 32) {
- t4_write_reg(sc, MYPF_REG(A_SGE_PF_GTS),
- V_CIDXINC(ndescs) |
- V_INGRESSQID((u32)iq->cntxt_id) |
- V_SEINTARM(V_QINTR_TIMER_IDX(X_TIMERREG_UPDATE_CIDX)));
- ndescs = 0;
- }
+ m0->m_pkthdr.len -= FL_PKTSHIFT;
+ m0->m_len -= FL_PKTSHIFT;
+ m0->m_data += FL_PKTSHIFT;
+
+ m0->m_pkthdr.rcvif = ifp;
+ m0->m_flags |= M_FLOWID;
+ m0->m_pkthdr.flowid = rss->hash_val;
- iq_next(iq);
+ if (cpl->csum_calc && !cpl->err_vec &&
+ ifp->if_capenable & IFCAP_RXCSUM) {
+ m0->m_pkthdr.csum_flags |= (CSUM_IP_CHECKED |
+ CSUM_IP_VALID | CSUM_DATA_VALID | CSUM_PSEUDO_HDR);
+ if (cpl->ip_frag)
+ m0->m_pkthdr.csum_data = be16toh(cpl->csum);
+ else
+ m0->m_pkthdr.csum_data = 0xffff;
+ rxq->rxcsum++;
}
-#ifdef INET
- while (!SLIST_EMPTY(&lro->lro_active)) {
- l = SLIST_FIRST(&lro->lro_active);
- SLIST_REMOVE_HEAD(&lro->lro_active, next);
- tcp_lro_flush(lro, l);
+ if (cpl->vlan_ex) {
+ m0->m_pkthdr.ether_vtag = be16toh(cpl->vlan);
+ m0->m_flags |= M_VLANTAG;
+ rxq->vlan_extraction++;
}
-#endif
- t4_write_reg(sc, MYPF_REG(A_SGE_PF_GTS), V_CIDXINC(ndescs) |
- V_INGRESSQID((u32)iq->cntxt_id) | V_SEINTARM(iq->intr_next));
+#ifdef INET
+ if (cpl->l2info & htobe32(F_RXF_LRO) &&
+ iq->flags & IQ_LRO_ENABLED &&
+ tcp_lro_rx(lro, m0, 0) == 0) {
+ /* queued for LRO */
+ } else
+#endif
+ ifp->if_input(ifp, m0);
- FL_LOCK(fl);
- if (fl->needed >= 32)
- refill_fl(sc, fl, 128, 8);
- FL_UNLOCK(fl);
+ return (0);
}
int
t4_mgmt_tx(struct adapter *sc, struct mbuf *m)
{
- return ctrl_tx(sc, &sc->sge.ctrlq[0], m);
+ return t4_wrq_tx(sc, &sc->sge.mgmtq, m);
+}
+
+/*
+ * Doesn't fail. Holds on to work requests it can't send right away.
+ */
+int
+t4_wrq_tx_locked(struct adapter *sc, struct sge_wrq *wrq, struct mbuf *m0)
+{
+ struct sge_eq *eq = &wrq->eq;
+ int can_reclaim;
+ caddr_t dst;
+ struct mbuf *wr, *next;
+
+ TXQ_LOCK_ASSERT_OWNED(wrq);
+ KASSERT((eq->flags & EQ_TYPEMASK) == EQ_OFLD ||
+ (eq->flags & EQ_TYPEMASK) == EQ_CTRL,
+ ("%s: eq type %d", __func__, eq->flags & EQ_TYPEMASK));
+
+ if (__predict_true(m0 != NULL)) {
+ if (wrq->head)
+ wrq->tail->m_nextpkt = m0;
+ else
+ wrq->head = m0;
+ while (m0->m_nextpkt)
+ m0 = m0->m_nextpkt;
+ wrq->tail = m0;
+ }
+
+ can_reclaim = reclaimable(eq);
+ if (__predict_false(eq->flags & EQ_STALLED)) {
+ if (can_reclaim < tx_resume_threshold(eq))
+ return (0);
+ eq->flags &= ~EQ_STALLED;
+ eq->unstalled++;
+ }
+ eq->cidx += can_reclaim;
+ eq->avail += can_reclaim;
+ if (__predict_false(eq->cidx >= eq->cap))
+ eq->cidx -= eq->cap;
+
+ for (wr = wrq->head; wr; wr = next) {
+ int ndesc;
+ struct mbuf *m;
+
+ next = wr->m_nextpkt;
+ wr->m_nextpkt = NULL;
+
+ M_ASSERTPKTHDR(wr);
+ KASSERT(wr->m_pkthdr.len > 0 && (wr->m_pkthdr.len & 0x7) == 0,
+ ("%s: work request len %d.", __func__, wr->m_pkthdr.len));
+
+ if (wr->m_pkthdr.len > SGE_MAX_WR_LEN) {
+#ifdef INVARIANTS
+ panic("%s: oversized work request", __func__);
+#else
+ log(LOG_ERR, "%s: %s work request too long (%d)",
+ device_get_nameunit(sc->dev), __func__,
+ wr->m_pkthdr.len);
+ m_freem(wr);
+ continue;
+#endif
+ }
+
+ ndesc = howmany(wr->m_pkthdr.len, EQ_ESIZE);
+ if (eq->avail < ndesc) {
+ wr->m_nextpkt = next;
+ wrq->no_desc++;
+ break;
+ }
+
+ dst = (void *)&eq->desc[eq->pidx];
+ for (m = wr; m; m = m->m_next)
+ copy_to_txd(eq, mtod(m, caddr_t), &dst, m->m_len);
+
+ eq->pidx += ndesc;
+ eq->avail -= ndesc;
+ if (__predict_false(eq->pidx >= eq->cap))
+ eq->pidx -= eq->cap;
+
+ eq->pending += ndesc;
+ if (eq->pending > 16)
+ ring_eq_db(sc, eq);
+
+ wrq->tx_wrs++;
+ m_freem(wr);
+
+ if (eq->avail < 8) {
+ can_reclaim = reclaimable(eq);
+ eq->cidx += can_reclaim;
+ eq->avail += can_reclaim;
+ if (__predict_false(eq->cidx >= eq->cap))
+ eq->cidx -= eq->cap;
+ }
+ }
+
+ if (eq->pending)
+ ring_eq_db(sc, eq);
+
+ if (wr == NULL)
+ wrq->head = wrq->tail = NULL;
+ else {
+ wrq->head = wr;
+
+ KASSERT(wrq->tail->m_nextpkt == NULL,
+ ("%s: wrq->tail grew a tail of its own", __func__));
+
+ eq->flags |= EQ_STALLED;
+ if (callout_pending(&eq->tx_callout) == 0)
+ callout_reset(&eq->tx_callout, 1, t4_tx_callout, eq);
+ }
+
+ return (0);
}
/* Per-packet header in a coalesced tx WR, before the SGL starts (in flits) */
@@ -852,6 +1233,8 @@ t4_eth_tx(struct ifnet *ifp, struct sge_txq *txq, struct mbuf *m)
TXQ_LOCK_ASSERT_OWNED(txq);
KASSERT(m, ("%s: called with nothing to do.", __func__));
+ KASSERT((eq->flags & EQ_TYPEMASK) == EQ_ETH,
+ ("%s: eq type %d", __func__, eq->flags & EQ_TYPEMASK));
prefetch(&eq->desc[eq->pidx]);
prefetch(&txq->sdesc[eq->pidx]);
@@ -859,8 +1242,25 @@ t4_eth_tx(struct ifnet *ifp, struct sge_txq *txq, struct mbuf *m)
txpkts.npkt = 0;/* indicates there's nothing in txpkts */
coalescing = 0;
- if (eq->avail < 8)
- reclaim_tx_descs(txq, 0, 8);
+ can_reclaim = reclaimable(eq);
+ if (__predict_false(eq->flags & EQ_STALLED)) {
+ if (can_reclaim < tx_resume_threshold(eq)) {
+ txq->m = m;
+ return (0);
+ }
+ eq->flags &= ~EQ_STALLED;
+ eq->unstalled++;
+ }
+
+ if (__predict_false(eq->flags & EQ_DOOMED)) {
+ m_freem(m);
+ while ((m = buf_ring_dequeue_sc(txq->br)) != NULL)
+ m_freem(m);
+ return (ENETDOWN);
+ }
+
+ if (eq->avail < 8 && can_reclaim)
+ reclaim_tx_descs(txq, can_reclaim, 32);
for (; m; m = next ? next : drbr_dequeue(ifp, br)) {
@@ -938,15 +1338,13 @@ t4_eth_tx(struct ifnet *ifp, struct sge_txq *txq, struct mbuf *m)
ETHER_BPF_MTAP(ifp, m);
if (sgl.nsegs == 0)
m_freem(m);
-
doorbell:
- /* Fewer and fewer doorbells as the queue fills up */
- if (eq->pending >= (1 << (fls(eq->qsize - eq->avail) / 2)))
+ if (eq->pending >= 64)
ring_eq_db(sc, eq);
can_reclaim = reclaimable(eq);
if (can_reclaim >= 32)
- reclaim_tx_descs(txq, can_reclaim, 32);
+ reclaim_tx_descs(txq, can_reclaim, 64);
}
if (txpkts.npkt > 0)
@@ -957,14 +1355,17 @@ doorbell:
* This can happen when we're short of tx descriptors (no_desc) or maybe
* even DMA maps (no_dmamap). Either way, a credit flush and reclaim
* will get things going again.
- *
- * If eq->avail is already 0 we know a credit flush was requested in the
- * WR that reduced it to 0 so we don't need another flush (we don't have
- * any descriptor for a flush WR anyway, duh).
*/
- if (m && eq->avail > 0 && !(eq->flags & EQ_CRFLUSHED)) {
+ if (m && !(eq->flags & EQ_CRFLUSHED)) {
struct tx_sdesc *txsd = &txq->sdesc[eq->pidx];
+ /*
+ * If EQ_CRFLUSHED is not set then we know we have at least one
+ * available descriptor because any WR that reduces eq->avail to
+ * 0 also sets EQ_CRFLUSHED.
+ */
+ KASSERT(eq->avail > 0, ("%s: no space for eqflush.", __func__));
+
txsd->desc_used = 1;
txsd->credits = 0;
write_eqflush_wr(eq);
@@ -974,9 +1375,10 @@ doorbell:
if (eq->pending)
ring_eq_db(sc, eq);
- can_reclaim = reclaimable(eq);
- if (can_reclaim >= 32)
- reclaim_tx_descs(txq, can_reclaim, 128);
+ reclaim_tx_descs(txq, 0, 128);
+
+ if (eq->flags & EQ_STALLED && callout_pending(&eq->tx_callout) == 0)
+ callout_reset(&eq->tx_callout, 1, t4_tx_callout, eq);
return (0);
}
@@ -987,24 +1389,29 @@ t4_update_fl_bufsize(struct ifnet *ifp)
struct port_info *pi = ifp->if_softc;
struct sge_rxq *rxq;
struct sge_fl *fl;
- int i;
+ int i, bufsize;
+ /* large enough for a frame even when VLAN extraction is disabled */
+ bufsize = FL_PKTSHIFT + ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN +
+ ifp->if_mtu;
for_each_rxq(pi, i, rxq) {
fl = &rxq->fl;
FL_LOCK(fl);
- set_fl_tag_idx(fl, ifp->if_mtu);
+ set_fl_tag_idx(fl, bufsize);
FL_UNLOCK(fl);
}
}
-/*
- * A non-NULL handler indicates this iq will not receive direct interrupts, the
- * handler will be invoked by an interrupt queue.
- */
+int
+can_resume_tx(struct sge_eq *eq)
+{
+ return (reclaimable(eq) >= tx_resume_threshold(eq));
+}
+
static inline void
init_iq(struct sge_iq *iq, struct adapter *sc, int tmr_idx, int pktc_idx,
- int qsize, int esize, iq_intr_handler_t *handler, char *name)
+ int qsize, int esize, char *name)
{
KASSERT(tmr_idx >= 0 && tmr_idx < SGE_NTIMERS,
("%s: bad tmr_idx %d", __func__, tmr_idx));
@@ -1018,22 +1425,32 @@ init_iq(struct sge_iq *iq, struct adapter *sc, int tmr_idx, int pktc_idx,
iq->intr_pktc_idx = pktc_idx;
iq->qsize = roundup(qsize, 16); /* See FW_IQ_CMD/iqsize */
iq->esize = max(esize, 16); /* See FW_IQ_CMD/iqesize */
- iq->handler = handler;
strlcpy(iq->lockname, name, sizeof(iq->lockname));
}
static inline void
-init_fl(struct sge_fl *fl, int qsize, char *name)
+init_fl(struct sge_fl *fl, int qsize, int bufsize, char *name)
{
fl->qsize = qsize;
strlcpy(fl->lockname, name, sizeof(fl->lockname));
+ set_fl_tag_idx(fl, bufsize);
}
static inline void
-init_eq(struct sge_eq *eq, int qsize, char *name)
+init_eq(struct sge_eq *eq, int eqtype, int qsize, uint8_t tx_chan,
+ uint16_t iqid, char *name)
{
+ KASSERT(tx_chan < NCHAN, ("%s: bad tx channel %d", __func__, tx_chan));
+ KASSERT(eqtype <= EQ_TYPEMASK, ("%s: bad qtype %d", __func__, eqtype));
+
+ eq->flags = eqtype & EQ_TYPEMASK;
+ eq->tx_chan = tx_chan;
+ eq->iqid = iqid;
eq->qsize = qsize;
strlcpy(eq->lockname, name, sizeof(eq->lockname));
+
+ TASK_INIT(&eq->tx_task, 0, t4_tx_task, eq);
+ callout_init(&eq->tx_callout, CALLOUT_MPSAFE);
}
static int
@@ -1090,9 +1507,9 @@ free_ring(struct adapter *sc, bus_dma_tag_t tag, bus_dmamap_t map,
* Returns errno on failure. Resources allocated up to that point may still be
* allocated. Caller is responsible for cleanup in case this function fails.
*
- * If the ingress queue will take interrupts directly (iq->handler == NULL) then
+ * If the ingress queue will take interrupts directly (iq->flags & IQ_INTR) then
* the intr_idx specifies the vector, starting from 0. Otherwise it specifies
- * the index of the interrupt queue to which its interrupts will be forwarded.
+ * the abs_id of the ingress queue to which its interrupts should be forwarded.
*/
static int
alloc_iq_fl(struct port_info *pi, struct sge_iq *iq, struct sge_fl *fl,
@@ -1122,16 +1539,12 @@ alloc_iq_fl(struct port_info *pi, struct sge_iq *iq, struct sge_fl *fl,
if (iq == &sc->sge.fwq)
v |= F_FW_IQ_CMD_IQASYNCH;
- if (iq->handler) {
- KASSERT(intr_idx < NINTRQ(sc),
- ("%s: invalid indirect intr_idx %d", __func__, intr_idx));
- v |= F_FW_IQ_CMD_IQANDST;
- v |= V_FW_IQ_CMD_IQANDSTINDEX(sc->sge.intrq[intr_idx].abs_id);
- } else {
+ if (iq->flags & IQ_INTR) {
KASSERT(intr_idx < sc->intr_count,
("%s: invalid direct intr_idx %d", __func__, intr_idx));
- v |= V_FW_IQ_CMD_IQANDSTINDEX(intr_idx);
- }
+ } else
+ v |= F_FW_IQ_CMD_IQANDST;
+ v |= V_FW_IQ_CMD_IQANDSTINDEX(intr_idx);
c.type_to_iqandstindex = htobe32(v |
V_FW_IQ_CMD_TYPE(FW_IQ_TYPE_FL_INT_CAP) |
@@ -1176,7 +1589,6 @@ alloc_iq_fl(struct port_info *pi, struct sge_iq *iq, struct sge_fl *fl,
/* Allocate space for one software descriptor per buffer. */
fl->cap = (fl->qsize - SPG_LEN / RX_FL_ESIZE) * 8;
FL_LOCK(fl);
- set_fl_tag_idx(fl, pi->ifp->if_mtu);
rc = alloc_fl_sdesc(fl);
FL_UNLOCK(fl);
if (rc != 0) {
@@ -1186,8 +1598,9 @@ alloc_iq_fl(struct port_info *pi, struct sge_iq *iq, struct sge_fl *fl,
return (rc);
}
fl->needed = fl->cap;
+ fl->lowat = roundup(sc->sge.fl_starve_threshold, 8);
- c.iqns_to_fl0congen =
+ c.iqns_to_fl0congen |=
htobe32(V_FW_IQ_CMD_FL0HOSTFCMODE(X_HOSTFCMODE_NONE) |
F_FW_IQ_CMD_FL0FETCHRO | F_FW_IQ_CMD_FL0DATARO |
F_FW_IQ_CMD_FL0PADEN);
@@ -1217,12 +1630,13 @@ alloc_iq_fl(struct port_info *pi, struct sge_iq *iq, struct sge_fl *fl,
iq->intr_next = iq->intr_params;
iq->cntxt_id = be16toh(c.iqid);
iq->abs_id = be16toh(c.physiqid);
- iq->flags |= (IQ_ALLOCATED | IQ_STARTED);
+ iq->flags |= IQ_ALLOCATED;
cntxt_id = iq->cntxt_id - sc->sge.iq_start;
- KASSERT(cntxt_id < sc->sge.niq,
- ("%s: iq->cntxt_id (%d) more than the max (%d)", __func__,
- cntxt_id, sc->sge.niq - 1));
+ if (cntxt_id >= sc->sge.niq) {
+ panic ("%s: iq->cntxt_id (%d) more than the max (%d)", __func__,
+ cntxt_id, sc->sge.niq - 1);
+ }
sc->sge.iqmap[cntxt_id] = iq;
if (fl) {
@@ -1230,29 +1644,28 @@ alloc_iq_fl(struct port_info *pi, struct sge_iq *iq, struct sge_fl *fl,
fl->pidx = fl->cidx = 0;
cntxt_id = fl->cntxt_id - sc->sge.eq_start;
- KASSERT(cntxt_id < sc->sge.neq,
- ("%s: fl->cntxt_id (%d) more than the max (%d)", __func__,
- cntxt_id, sc->sge.neq - 1));
+ if (cntxt_id >= sc->sge.neq) {
+ panic("%s: fl->cntxt_id (%d) more than the max (%d)",
+ __func__, cntxt_id, sc->sge.neq - 1);
+ }
sc->sge.eqmap[cntxt_id] = (void *)fl;
FL_LOCK(fl);
- /* Just enough to make sure it doesn't starve right away. */
- refill_fl(sc, fl, roundup(sc->sge.fl_starve_threshold, 8), 8);
+ /* Enough to make sure the SGE doesn't think it's starved */
+ refill_fl(sc, fl, fl->lowat);
FL_UNLOCK(fl);
+
+ iq->flags |= IQ_HAS_FL;
}
/* Enable IQ interrupts */
- atomic_store_rel_32(&iq->state, IQS_IDLE);
+ atomic_store_rel_int(&iq->state, IQS_IDLE);
t4_write_reg(sc, MYPF_REG(A_SGE_PF_GTS), V_SEINTARM(iq->intr_params) |
V_INGRESSQID(iq->cntxt_id));
return (0);
}
-/*
- * This can be called with the iq/fl in any state - fully allocated and
- * functional, partially allocated, even all-zeroed out.
- */
static int
free_iq_fl(struct port_info *pi, struct sge_iq *iq, struct sge_fl *fl)
{
@@ -1265,23 +1678,7 @@ free_iq_fl(struct port_info *pi, struct sge_iq *iq, struct sge_fl *fl)
dev = pi ? pi->dev : sc->dev;
- if (iq->flags & IQ_STARTED) {
- rc = -t4_iq_start_stop(sc, sc->mbox, 0, sc->pf, 0,
- iq->cntxt_id, fl ? fl->cntxt_id : 0xffff, 0xffff);
- if (rc != 0) {
- device_printf(dev,
- "failed to stop queue %p: %d\n", iq, rc);
- return (rc);
- }
- iq->flags &= ~IQ_STARTED;
-
- /* Synchronize with the interrupt handler */
- while (!atomic_cmpset_32(&iq->state, IQS_IDLE, IQS_DISABLED))
- pause("iqfree", hz / 1000);
- }
-
if (iq->flags & IQ_ALLOCATED) {
-
rc = -t4_iq_free(sc, sc->mbox, sc->pf, 0,
FW_IQ_TYPE_FL_INT_CAP, iq->cntxt_id,
fl ? fl->cntxt_id : 0xffff, 0xffff);
@@ -1322,76 +1719,84 @@ free_iq_fl(struct port_info *pi, struct sge_iq *iq, struct sge_fl *fl)
}
static int
-alloc_intrq(struct adapter *sc, int port_idx, int intrq_idx, int intr_idx)
+alloc_fwq(struct adapter *sc)
{
- int rc;
- struct sysctl_oid *oid;
- struct sysctl_oid_list *children;
+ int rc, intr_idx;
+ struct sge_iq *fwq = &sc->sge.fwq;
char name[16];
- struct sge_iq *intrq = &sc->sge.intrq[intrq_idx];
+ struct sysctl_oid *oid = device_get_sysctl_tree(sc->dev);
+ struct sysctl_oid_list *children = SYSCTL_CHILDREN(oid);
- rc = alloc_iq_fl(sc->port[port_idx], intrq, NULL, intr_idx, -1);
- if (rc != 0)
+ snprintf(name, sizeof(name), "%s fwq", device_get_nameunit(sc->dev));
+ init_iq(fwq, sc, 0, 0, FW_IQ_QSIZE, FW_IQ_ESIZE, name);
+ fwq->flags |= IQ_INTR; /* always */
+ intr_idx = sc->intr_count > 1 ? 1 : 0;
+ rc = alloc_iq_fl(sc->port[0], fwq, NULL, intr_idx, -1);
+ if (rc != 0) {
+ device_printf(sc->dev,
+ "failed to create firmware event queue: %d\n", rc);
return (rc);
+ }
- children = SYSCTL_CHILDREN(sc->oid_intrq);
-
- snprintf(name, sizeof(name), "%d", intrq_idx);
- oid = SYSCTL_ADD_NODE(&sc->ctx, children, OID_AUTO, name, CTLFLAG_RD,
- NULL, "interrupt queue");
+ oid = SYSCTL_ADD_NODE(&sc->ctx, children, OID_AUTO, "fwq", CTLFLAG_RD,
+ NULL, "firmware event queue");
children = SYSCTL_CHILDREN(oid);
+ SYSCTL_ADD_PROC(&sc->ctx, children, OID_AUTO, "abs_id",
+ CTLTYPE_INT | CTLFLAG_RD, &fwq->abs_id, 0, sysctl_uint16, "I",
+ "absolute id of the queue");
+ SYSCTL_ADD_PROC(&sc->ctx, children, OID_AUTO, "cntxt_id",
+ CTLTYPE_INT | CTLFLAG_RD, &fwq->cntxt_id, 0, sysctl_uint16, "I",
+ "SGE context id of the queue");
SYSCTL_ADD_PROC(&sc->ctx, children, OID_AUTO, "cidx",
- CTLTYPE_INT | CTLFLAG_RD, &intrq->cidx, 0, sysctl_uint16, "I",
+ CTLTYPE_INT | CTLFLAG_RD, &fwq->cidx, 0, sysctl_uint16, "I",
"consumer index");
- return (rc);
+ return (0);
}
static int
-free_intrq(struct sge_iq *iq)
+free_fwq(struct adapter *sc)
{
- return free_iq_fl(NULL, iq, NULL);
-
+ return free_iq_fl(NULL, &sc->sge.fwq, NULL);
}
static int
-alloc_fwq(struct adapter *sc, int intr_idx)
+alloc_mgmtq(struct adapter *sc)
{
int rc;
- struct sysctl_oid_list *children;
- struct sge_iq *fwq = &sc->sge.fwq;
-
- rc = alloc_iq_fl(sc->port[0], fwq, NULL, intr_idx, -1);
- if (rc != 0)
- return (rc);
+ struct sge_wrq *mgmtq = &sc->sge.mgmtq;
+ char name[16];
+ struct sysctl_oid *oid = device_get_sysctl_tree(sc->dev);
+ struct sysctl_oid_list *children = SYSCTL_CHILDREN(oid);
- children = SYSCTL_CHILDREN(sc->oid_fwq);
+ oid = SYSCTL_ADD_NODE(&sc->ctx, children, OID_AUTO, "mgmtq", CTLFLAG_RD,
+ NULL, "management queue");
- SYSCTL_ADD_PROC(&sc->ctx, children, OID_AUTO, "abs_id",
- CTLTYPE_INT | CTLFLAG_RD, &fwq->abs_id, 0, sysctl_uint16, "I",
- "absolute id of the queue");
- SYSCTL_ADD_PROC(&sc->ctx, children, OID_AUTO, "cntxt_id",
- CTLTYPE_INT | CTLFLAG_RD, &fwq->cntxt_id, 0, sysctl_uint16, "I",
- "SGE context id of the queue");
- SYSCTL_ADD_PROC(&sc->ctx, children, OID_AUTO, "cidx",
- CTLTYPE_INT | CTLFLAG_RD, &fwq->cidx, 0, sysctl_uint16, "I",
- "consumer index");
+ snprintf(name, sizeof(name), "%s mgmtq", device_get_nameunit(sc->dev));
+ init_eq(&mgmtq->eq, EQ_CTRL, CTRL_EQ_QSIZE, sc->port[0]->tx_chan,
+ sc->sge.fwq.cntxt_id, name);
+ rc = alloc_wrq(sc, NULL, mgmtq, oid);
+ if (rc != 0) {
+ device_printf(sc->dev,
+ "failed to create management queue: %d\n", rc);
+ return (rc);
+ }
- return (rc);
+ return (0);
}
static int
-free_fwq(struct sge_iq *iq)
+free_mgmtq(struct adapter *sc)
{
- return free_iq_fl(NULL, iq, NULL);
+ return free_wrq(sc, &sc->sge.mgmtq);
}
static int
-alloc_rxq(struct port_info *pi, struct sge_rxq *rxq, int intr_idx, int idx)
+alloc_rxq(struct port_info *pi, struct sge_rxq *rxq, int intr_idx, int idx,
+ struct sysctl_oid *oid)
{
int rc;
- struct sysctl_oid *oid;
struct sysctl_oid_list *children;
char name[16];
@@ -1400,7 +1805,7 @@ alloc_rxq(struct port_info *pi, struct sge_rxq *rxq, int intr_idx, int idx)
return (rc);
FL_LOCK(&rxq->fl);
- refill_fl(pi->adapter, &rxq->fl, rxq->fl.needed / 8, 8);
+ refill_fl(pi->adapter, &rxq->fl, rxq->fl.needed / 8);
FL_UNLOCK(&rxq->fl);
#ifdef INET
@@ -1410,11 +1815,11 @@ alloc_rxq(struct port_info *pi, struct sge_rxq *rxq, int intr_idx, int idx)
rxq->lro.ifp = pi->ifp; /* also indicates LRO init'ed */
if (pi->ifp->if_capenable & IFCAP_LRO)
- rxq->flags |= RXQ_LRO_ENABLED;
+ rxq->iq.flags |= IQ_LRO_ENABLED;
#endif
rxq->ifp = pi->ifp;
- children = SYSCTL_CHILDREN(pi->oid_rxq);
+ children = SYSCTL_CHILDREN(oid);
snprintf(name, sizeof(name), "%d", idx);
oid = SYSCTL_ADD_NODE(&pi->ctx, children, OID_AUTO, name, CTLFLAG_RD,
@@ -1477,32 +1882,71 @@ free_rxq(struct port_info *pi, struct sge_rxq *rxq)
return (rc);
}
+#ifndef TCP_OFFLOAD_DISABLE
static int
-alloc_ctrlq(struct adapter *sc, struct sge_ctrlq *ctrlq, int idx)
+alloc_ofld_rxq(struct port_info *pi, struct sge_ofld_rxq *ofld_rxq,
+ int intr_idx, int idx, struct sysctl_oid *oid)
{
- int rc, cntxt_id;
- size_t len;
- struct fw_eq_ctrl_cmd c;
- struct sge_eq *eq = &ctrlq->eq;
- char name[16];
- struct sysctl_oid *oid;
+ int rc;
struct sysctl_oid_list *children;
+ char name[16];
- mtx_init(&eq->eq_lock, eq->lockname, NULL, MTX_DEF);
-
- len = eq->qsize * CTRL_EQ_ESIZE;
- rc = alloc_ring(sc, len, &eq->desc_tag, &eq->desc_map,
- &eq->ba, (void **)&eq->desc);
- if (rc)
+ rc = alloc_iq_fl(pi, &ofld_rxq->iq, &ofld_rxq->fl, intr_idx,
+ 1 << pi->tx_chan);
+ if (rc != 0)
return (rc);
- eq->cap = eq->qsize - SPG_LEN / CTRL_EQ_ESIZE;
- eq->spg = (void *)&eq->desc[eq->cap];
- eq->avail = eq->cap - 1; /* one less to avoid cidx = pidx */
- if (sc->flags & INTR_SHARED)
- eq->iqid = sc->sge.intrq[idx % NINTRQ(sc)].cntxt_id;
- else
- eq->iqid = sc->sge.intrq[sc->port[idx]->first_rxq].cntxt_id;
+ children = SYSCTL_CHILDREN(oid);
+
+ snprintf(name, sizeof(name), "%d", idx);
+ oid = SYSCTL_ADD_NODE(&pi->ctx, children, OID_AUTO, name, CTLFLAG_RD,
+ NULL, "rx queue");
+ children = SYSCTL_CHILDREN(oid);
+
+ SYSCTL_ADD_PROC(&pi->ctx, children, OID_AUTO, "abs_id",
+ CTLTYPE_INT | CTLFLAG_RD, &ofld_rxq->iq.abs_id, 0, sysctl_uint16,
+ "I", "absolute id of the queue");
+ SYSCTL_ADD_PROC(&pi->ctx, children, OID_AUTO, "cntxt_id",
+ CTLTYPE_INT | CTLFLAG_RD, &ofld_rxq->iq.cntxt_id, 0, sysctl_uint16,
+ "I", "SGE context id of the queue");
+ SYSCTL_ADD_PROC(&pi->ctx, children, OID_AUTO, "cidx",
+ CTLTYPE_INT | CTLFLAG_RD, &ofld_rxq->iq.cidx, 0, sysctl_uint16, "I",
+ "consumer index");
+
+ children = SYSCTL_CHILDREN(oid);
+ oid = SYSCTL_ADD_NODE(&pi->ctx, children, OID_AUTO, "fl", CTLFLAG_RD,
+ NULL, "freelist");
+ children = SYSCTL_CHILDREN(oid);
+
+ SYSCTL_ADD_PROC(&pi->ctx, children, OID_AUTO, "cntxt_id",
+ CTLTYPE_INT | CTLFLAG_RD, &ofld_rxq->fl.cntxt_id, 0, sysctl_uint16,
+ "I", "SGE context id of the queue");
+ SYSCTL_ADD_UINT(&pi->ctx, children, OID_AUTO, "cidx", CTLFLAG_RD,
+ &ofld_rxq->fl.cidx, 0, "consumer index");
+ SYSCTL_ADD_UINT(&pi->ctx, children, OID_AUTO, "pidx", CTLFLAG_RD,
+ &ofld_rxq->fl.pidx, 0, "producer index");
+
+ return (rc);
+}
+
+static int
+free_ofld_rxq(struct port_info *pi, struct sge_ofld_rxq *ofld_rxq)
+{
+ int rc;
+
+ rc = free_iq_fl(pi, &ofld_rxq->iq, &ofld_rxq->fl);
+ if (rc == 0)
+ bzero(ofld_rxq, sizeof(*ofld_rxq));
+
+ return (rc);
+}
+#endif
+
+static int
+ctrl_eq_alloc(struct adapter *sc, struct sge_eq *eq)
+{
+ int rc, cntxt_id;
+ struct fw_eq_ctrl_cmd c;
bzero(&c, sizeof(c));
@@ -1515,7 +1959,7 @@ alloc_ctrlq(struct adapter *sc, struct sge_ctrlq *ctrlq, int idx)
c.physeqid_pkd = htobe32(0);
c.fetchszm_to_iqid =
htobe32(V_FW_EQ_CTRL_CMD_HOSTFCMODE(X_HOSTFCMODE_STATUS_PAGE) |
- V_FW_EQ_CTRL_CMD_PCIECHN(sc->port[idx]->tx_chan) |
+ V_FW_EQ_CTRL_CMD_PCIECHN(eq->tx_chan) |
F_FW_EQ_CTRL_CMD_FETCHRO | V_FW_EQ_CTRL_CMD_IQID(eq->iqid));
c.dcaen_to_eqsize =
htobe32(V_FW_EQ_CTRL_CMD_FBMIN(X_FETCHBURSTMIN_64B) |
@@ -1527,51 +1971,191 @@ alloc_ctrlq(struct adapter *sc, struct sge_ctrlq *ctrlq, int idx)
rc = -t4_wr_mbox(sc, sc->mbox, &c, sizeof(c), &c);
if (rc != 0) {
device_printf(sc->dev,
- "failed to create control queue %d: %d\n", idx, rc);
+ "failed to create control queue %d: %d\n", eq->tx_chan, rc);
return (rc);
}
+ eq->flags |= EQ_ALLOCATED;
- eq->pidx = eq->cidx = 0;
eq->cntxt_id = G_FW_EQ_CTRL_CMD_EQID(be32toh(c.cmpliqid_eqid));
- eq->flags |= (EQ_ALLOCATED | EQ_STARTED);
+ cntxt_id = eq->cntxt_id - sc->sge.eq_start;
+ if (cntxt_id >= sc->sge.neq)
+ panic("%s: eq->cntxt_id (%d) more than the max (%d)", __func__,
+ cntxt_id, sc->sge.neq - 1);
+ sc->sge.eqmap[cntxt_id] = eq;
+
+ return (rc);
+}
+
+static int
+eth_eq_alloc(struct adapter *sc, struct port_info *pi, struct sge_eq *eq)
+{
+ int rc, cntxt_id;
+ struct fw_eq_eth_cmd c;
+
+ bzero(&c, sizeof(c));
+ c.op_to_vfn = htobe32(V_FW_CMD_OP(FW_EQ_ETH_CMD) | F_FW_CMD_REQUEST |
+ F_FW_CMD_WRITE | F_FW_CMD_EXEC | V_FW_EQ_ETH_CMD_PFN(sc->pf) |
+ V_FW_EQ_ETH_CMD_VFN(0));
+ c.alloc_to_len16 = htobe32(F_FW_EQ_ETH_CMD_ALLOC |
+ F_FW_EQ_ETH_CMD_EQSTART | FW_LEN16(c));
+ c.viid_pkd = htobe32(V_FW_EQ_ETH_CMD_VIID(pi->viid));
+ c.fetchszm_to_iqid =
+ htobe32(V_FW_EQ_ETH_CMD_HOSTFCMODE(X_HOSTFCMODE_STATUS_PAGE) |
+ V_FW_EQ_ETH_CMD_PCIECHN(eq->tx_chan) | F_FW_EQ_ETH_CMD_FETCHRO |
+ V_FW_EQ_ETH_CMD_IQID(eq->iqid));
+ c.dcaen_to_eqsize = htobe32(V_FW_EQ_ETH_CMD_FBMIN(X_FETCHBURSTMIN_64B) |
+ V_FW_EQ_ETH_CMD_FBMAX(X_FETCHBURSTMAX_512B) |
+ V_FW_EQ_ETH_CMD_CIDXFTHRESH(X_CIDXFLUSHTHRESH_32) |
+ V_FW_EQ_ETH_CMD_EQSIZE(eq->qsize));
+ c.eqaddr = htobe64(eq->ba);
+
+ rc = -t4_wr_mbox(sc, sc->mbox, &c, sizeof(c), &c);
+ if (rc != 0) {
+ device_printf(pi->dev,
+ "failed to create Ethernet egress queue: %d\n", rc);
+ return (rc);
+ }
+ eq->flags |= EQ_ALLOCATED;
+
+ eq->cntxt_id = G_FW_EQ_ETH_CMD_EQID(be32toh(c.eqid_pkd));
cntxt_id = eq->cntxt_id - sc->sge.eq_start;
- KASSERT(cntxt_id < sc->sge.neq,
- ("%s: eq->cntxt_id (%d) more than the max (%d)", __func__,
- cntxt_id, sc->sge.neq - 1));
+ if (cntxt_id >= sc->sge.neq)
+ panic("%s: eq->cntxt_id (%d) more than the max (%d)", __func__,
+ cntxt_id, sc->sge.neq - 1);
sc->sge.eqmap[cntxt_id] = eq;
- children = SYSCTL_CHILDREN(sc->oid_ctrlq);
+ return (rc);
+}
- snprintf(name, sizeof(name), "%d", idx);
- oid = SYSCTL_ADD_NODE(&sc->ctx, children, OID_AUTO, name, CTLFLAG_RD,
- NULL, "ctrl queue");
- children = SYSCTL_CHILDREN(oid);
+#ifndef TCP_OFFLOAD_DISABLE
+static int
+ofld_eq_alloc(struct adapter *sc, struct port_info *pi, struct sge_eq *eq)
+{
+ int rc, cntxt_id;
+ struct fw_eq_ofld_cmd c;
- SYSCTL_ADD_PROC(&sc->ctx, children, OID_AUTO, "pidx",
- CTLTYPE_INT | CTLFLAG_RD, &ctrlq->eq.pidx, 0, sysctl_uint16, "I",
- "producer index");
- SYSCTL_ADD_UINT(&sc->ctx, children, OID_AUTO, "no_desc", CTLFLAG_RD,
- &ctrlq->no_desc, 0,
- "# of times ctrlq ran out of hardware descriptors");
+ bzero(&c, sizeof(c));
+
+ c.op_to_vfn = htonl(V_FW_CMD_OP(FW_EQ_OFLD_CMD) | F_FW_CMD_REQUEST |
+ F_FW_CMD_WRITE | F_FW_CMD_EXEC | V_FW_EQ_OFLD_CMD_PFN(sc->pf) |
+ V_FW_EQ_OFLD_CMD_VFN(0));
+ c.alloc_to_len16 = htonl(F_FW_EQ_OFLD_CMD_ALLOC |
+ F_FW_EQ_OFLD_CMD_EQSTART | FW_LEN16(c));
+ c.fetchszm_to_iqid =
+ htonl(V_FW_EQ_OFLD_CMD_HOSTFCMODE(X_HOSTFCMODE_STATUS_PAGE) |
+ V_FW_EQ_OFLD_CMD_PCIECHN(eq->tx_chan) |
+ F_FW_EQ_OFLD_CMD_FETCHRO | V_FW_EQ_OFLD_CMD_IQID(eq->iqid));
+ c.dcaen_to_eqsize =
+ htobe32(V_FW_EQ_OFLD_CMD_FBMIN(X_FETCHBURSTMIN_64B) |
+ V_FW_EQ_OFLD_CMD_FBMAX(X_FETCHBURSTMAX_512B) |
+ V_FW_EQ_OFLD_CMD_CIDXFTHRESH(X_CIDXFLUSHTHRESH_32) |
+ V_FW_EQ_OFLD_CMD_EQSIZE(eq->qsize));
+ c.eqaddr = htobe64(eq->ba);
+
+ rc = -t4_wr_mbox(sc, sc->mbox, &c, sizeof(c), &c);
+ if (rc != 0) {
+ device_printf(pi->dev,
+ "failed to create egress queue for TCP offload: %d\n", rc);
+ return (rc);
+ }
+ eq->flags |= EQ_ALLOCATED;
+
+ eq->cntxt_id = G_FW_EQ_OFLD_CMD_EQID(be32toh(c.eqid_pkd));
+ cntxt_id = eq->cntxt_id - sc->sge.eq_start;
+ if (cntxt_id >= sc->sge.neq)
+ panic("%s: eq->cntxt_id (%d) more than the max (%d)", __func__,
+ cntxt_id, sc->sge.neq - 1);
+ sc->sge.eqmap[cntxt_id] = eq;
+
+ return (rc);
+}
+#endif
+
+static int
+alloc_eq(struct adapter *sc, struct port_info *pi, struct sge_eq *eq)
+{
+ int rc;
+ size_t len;
+
+ mtx_init(&eq->eq_lock, eq->lockname, NULL, MTX_DEF);
+
+ len = eq->qsize * EQ_ESIZE;
+ rc = alloc_ring(sc, len, &eq->desc_tag, &eq->desc_map,
+ &eq->ba, (void **)&eq->desc);
+ if (rc)
+ return (rc);
+
+ eq->cap = eq->qsize - SPG_LEN / EQ_ESIZE;
+ eq->spg = (void *)&eq->desc[eq->cap];
+ eq->avail = eq->cap - 1; /* one less to avoid cidx = pidx */
+ eq->pidx = eq->cidx = 0;
+
+ switch (eq->flags & EQ_TYPEMASK) {
+ case EQ_CTRL:
+ rc = ctrl_eq_alloc(sc, eq);
+ break;
+
+ case EQ_ETH:
+ rc = eth_eq_alloc(sc, pi, eq);
+ break;
+
+#ifndef TCP_OFFLOAD_DISABLE
+ case EQ_OFLD:
+ rc = ofld_eq_alloc(sc, pi, eq);
+ break;
+#endif
+
+ default:
+ panic("%s: invalid eq type %d.", __func__,
+ eq->flags & EQ_TYPEMASK);
+ }
+ if (rc != 0) {
+ device_printf(sc->dev,
+ "failed to allocate egress queue(%d): %d",
+ eq->flags & EQ_TYPEMASK, rc);
+ }
+
+ eq->tx_callout.c_cpu = eq->cntxt_id % mp_ncpus;
return (rc);
}
static int
-free_ctrlq(struct adapter *sc, struct sge_ctrlq *ctrlq)
+free_eq(struct adapter *sc, struct sge_eq *eq)
{
int rc;
- struct sge_eq *eq = &ctrlq->eq;
- if (eq->flags & (EQ_ALLOCATED | EQ_STARTED)) {
- rc = -t4_ctrl_eq_free(sc, sc->mbox, sc->pf, 0, eq->cntxt_id);
+ if (eq->flags & EQ_ALLOCATED) {
+ switch (eq->flags & EQ_TYPEMASK) {
+ case EQ_CTRL:
+ rc = -t4_ctrl_eq_free(sc, sc->mbox, sc->pf, 0,
+ eq->cntxt_id);
+ break;
+
+ case EQ_ETH:
+ rc = -t4_eth_eq_free(sc, sc->mbox, sc->pf, 0,
+ eq->cntxt_id);
+ break;
+
+#ifndef TCP_OFFLOAD_DISABLE
+ case EQ_OFLD:
+ rc = -t4_ofld_eq_free(sc, sc->mbox, sc->pf, 0,
+ eq->cntxt_id);
+ break;
+#endif
+
+ default:
+ panic("%s: invalid eq type %d.", __func__,
+ eq->flags & EQ_TYPEMASK);
+ }
if (rc != 0) {
device_printf(sc->dev,
- "failed to free ctrl queue %p: %d\n", eq, rc);
+ "failed to free egress queue (%d): %d\n",
+ eq->flags & EQ_TYPEMASK, rc);
return (rc);
}
- eq->flags &= ~(EQ_ALLOCATED | EQ_STARTED);
+ eq->flags &= ~EQ_ALLOCATED;
}
free_ring(sc, eq->desc_tag, eq->desc_map, eq->ba, eq->desc);
@@ -1579,47 +2163,77 @@ free_ctrlq(struct adapter *sc, struct sge_ctrlq *ctrlq)
if (mtx_initialized(&eq->eq_lock))
mtx_destroy(&eq->eq_lock);
- bzero(ctrlq, sizeof(*ctrlq));
+ bzero(eq, sizeof(*eq));
return (0);
}
static int
-alloc_txq(struct port_info *pi, struct sge_txq *txq, int idx)
+alloc_wrq(struct adapter *sc, struct port_info *pi, struct sge_wrq *wrq,
+ struct sysctl_oid *oid)
{
- int rc, cntxt_id;
- size_t len;
+ int rc;
+ struct sysctl_ctx_list *ctx = pi ? &pi->ctx : &sc->ctx;
+ struct sysctl_oid_list *children = SYSCTL_CHILDREN(oid);
+
+ rc = alloc_eq(sc, pi, &wrq->eq);
+ if (rc)
+ return (rc);
+
+ wrq->adapter = sc;
+
+ SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "cntxt_id", CTLFLAG_RD,
+ &wrq->eq.cntxt_id, 0, "SGE context id of the queue");
+ SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "cidx",
+ CTLTYPE_INT | CTLFLAG_RD, &wrq->eq.cidx, 0, sysctl_uint16, "I",
+ "consumer index");
+ SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "pidx",
+ CTLTYPE_INT | CTLFLAG_RD, &wrq->eq.pidx, 0, sysctl_uint16, "I",
+ "producer index");
+ SYSCTL_ADD_UQUAD(ctx, children, OID_AUTO, "tx_wrs", CTLFLAG_RD,
+ &wrq->tx_wrs, "# of work requests");
+ SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "no_desc", CTLFLAG_RD,
+ &wrq->no_desc, 0,
+ "# of times queue ran out of hardware descriptors");
+ SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "unstalled", CTLFLAG_RD,
+ &wrq->eq.unstalled, 0, "# of times queue recovered after stall");
+
+
+ return (rc);
+}
+
+static int
+free_wrq(struct adapter *sc, struct sge_wrq *wrq)
+{
+ int rc;
+
+ rc = free_eq(sc, &wrq->eq);
+ if (rc)
+ return (rc);
+
+ bzero(wrq, sizeof(*wrq));
+ return (0);
+}
+
+static int
+alloc_txq(struct port_info *pi, struct sge_txq *txq, int idx,
+ struct sysctl_oid *oid)
+{
+ int rc;
struct adapter *sc = pi->adapter;
- struct fw_eq_eth_cmd c;
struct sge_eq *eq = &txq->eq;
char name[16];
- struct sysctl_oid *oid;
- struct sysctl_oid_list *children;
- struct sge_iq *intrq;
-
- txq->ifp = pi->ifp;
- TASK_INIT(&txq->resume_tx, 0, cxgbe_txq_start, txq);
-
- mtx_init(&eq->eq_lock, eq->lockname, NULL, MTX_DEF);
+ struct sysctl_oid_list *children = SYSCTL_CHILDREN(oid);
- len = eq->qsize * TX_EQ_ESIZE;
- rc = alloc_ring(sc, len, &eq->desc_tag, &eq->desc_map,
- &eq->ba, (void **)&eq->desc);
+ rc = alloc_eq(sc, pi, eq);
if (rc)
return (rc);
- eq->cap = eq->qsize - SPG_LEN / TX_EQ_ESIZE;
- eq->spg = (void *)&eq->desc[eq->cap];
- eq->avail = eq->cap - 1; /* one less to avoid cidx = pidx */
+ txq->ifp = pi->ifp;
+
txq->sdesc = malloc(eq->cap * sizeof(struct tx_sdesc), M_CXGBE,
M_ZERO | M_WAITOK);
txq->br = buf_ring_alloc(eq->qsize, M_CXGBE, M_WAITOK, &eq->eq_lock);
- intrq = &sc->sge.intrq[0];
- if (sc->flags & INTR_SHARED)
- eq->iqid = intrq[(pi->first_txq + idx) % NINTRQ(sc)].cntxt_id;
- else
- eq->iqid = intrq[pi->first_rxq + (idx % pi->nrxq)].cntxt_id;
-
rc = bus_dma_tag_create(sc->dmat, 1, 0, BUS_SPACE_MAXADDR,
BUS_SPACE_MAXADDR, NULL, NULL, 64 * 1024, TX_SGL_SEGS,
BUS_SPACE_MAXSIZE, BUS_DMA_ALLOCNOW, NULL, NULL, &txq->tx_tag);
@@ -1629,49 +2243,18 @@ alloc_txq(struct port_info *pi, struct sge_txq *txq, int idx)
return (rc);
}
- rc = alloc_tx_maps(txq);
+ /*
+ * We can stuff ~10 frames in an 8-descriptor txpkts WR (8 is the SGE
+ * limit for any WR). txq->no_dmamap events shouldn't occur if maps is
+ * sized for the worst case.
+ */
+ rc = t4_alloc_tx_maps(&txq->txmaps, txq->tx_tag, eq->qsize * 10 / 8,
+ M_WAITOK);
if (rc != 0) {
device_printf(sc->dev, "failed to setup tx DMA maps: %d\n", rc);
return (rc);
}
- bzero(&c, sizeof(c));
-
- c.op_to_vfn = htobe32(V_FW_CMD_OP(FW_EQ_ETH_CMD) | F_FW_CMD_REQUEST |
- F_FW_CMD_WRITE | F_FW_CMD_EXEC | V_FW_EQ_ETH_CMD_PFN(sc->pf) |
- V_FW_EQ_ETH_CMD_VFN(0));
- c.alloc_to_len16 = htobe32(F_FW_EQ_ETH_CMD_ALLOC |
- F_FW_EQ_ETH_CMD_EQSTART | FW_LEN16(c));
- c.viid_pkd = htobe32(V_FW_EQ_ETH_CMD_VIID(pi->viid));
- c.fetchszm_to_iqid =
- htobe32(V_FW_EQ_ETH_CMD_HOSTFCMODE(X_HOSTFCMODE_STATUS_PAGE) |
- V_FW_EQ_ETH_CMD_PCIECHN(pi->tx_chan) | F_FW_EQ_ETH_CMD_FETCHRO |
- V_FW_EQ_ETH_CMD_IQID(eq->iqid));
- c.dcaen_to_eqsize = htobe32(V_FW_EQ_ETH_CMD_FBMIN(X_FETCHBURSTMIN_64B) |
- V_FW_EQ_ETH_CMD_FBMAX(X_FETCHBURSTMAX_512B) |
- V_FW_EQ_ETH_CMD_CIDXFTHRESH(X_CIDXFLUSHTHRESH_32) |
- V_FW_EQ_ETH_CMD_EQSIZE(eq->qsize));
- c.eqaddr = htobe64(eq->ba);
-
- rc = -t4_wr_mbox(sc, sc->mbox, &c, sizeof(c), &c);
- if (rc != 0) {
- device_printf(pi->dev,
- "failed to create egress queue: %d\n", rc);
- return (rc);
- }
-
- eq->pidx = eq->cidx = 0;
- eq->cntxt_id = G_FW_EQ_ETH_CMD_EQID(be32toh(c.eqid_pkd));
- eq->flags |= (EQ_ALLOCATED | EQ_STARTED);
-
- cntxt_id = eq->cntxt_id - sc->sge.eq_start;
- KASSERT(cntxt_id < sc->sge.neq,
- ("%s: eq->cntxt_id (%d) more than the max (%d)", __func__,
- cntxt_id, sc->sge.neq - 1));
- sc->sge.eqmap[cntxt_id] = eq;
-
- children = SYSCTL_CHILDREN(pi->oid_txq);
-
snprintf(name, sizeof(name), "%d", idx);
oid = SYSCTL_ADD_NODE(&pi->ctx, children, OID_AUTO, name, CTLFLAG_RD,
NULL, "tx queue");
@@ -1709,7 +2292,9 @@ alloc_txq(struct port_info *pi, struct sge_txq *txq, int idx)
SYSCTL_ADD_UINT(&pi->ctx, children, OID_AUTO, "no_desc", CTLFLAG_RD,
&txq->no_desc, 0, "# of times txq ran out of hardware descriptors");
SYSCTL_ADD_UINT(&pi->ctx, children, OID_AUTO, "egr_update", CTLFLAG_RD,
- &txq->egr_update, 0, "egress update notifications from the SGE");
+ &eq->egr_update, 0, "egress update notifications from the SGE");
+ SYSCTL_ADD_UINT(&pi->ctx, children, OID_AUTO, "unstalled", CTLFLAG_RD,
+ &eq->unstalled, 0, "# of times txq recovered after stall");
return (rc);
}
@@ -1721,52 +2306,20 @@ free_txq(struct port_info *pi, struct sge_txq *txq)
struct adapter *sc = pi->adapter;
struct sge_eq *eq = &txq->eq;
- if (eq->flags & (EQ_ALLOCATED | EQ_STARTED)) {
-
- /*
- * Wait for the response to a credit flush if there's one
- * pending. Clearing the flag tells handle_sge_egr_update or
- * cxgbe_txq_start (depending on how far the response has made
- * it) that they should ignore the response and wake up free_txq
- * instead.
- *
- * The interface has been marked down by the time we get here
- * (both IFF_UP and IFF_DRV_RUNNING cleared). qflush has
- * emptied the tx buf_rings and we know nothing new is being
- * queued for tx so we don't have to worry about a new credit
- * flush request.
- */
- TXQ_LOCK(txq);
- if (eq->flags & EQ_CRFLUSHED) {
- eq->flags &= ~EQ_CRFLUSHED;
- msleep(txq, &eq->eq_lock, 0, "crflush", 0);
- }
- TXQ_UNLOCK(txq);
-
- rc = -t4_eth_eq_free(sc, sc->mbox, sc->pf, 0, eq->cntxt_id);
- if (rc != 0) {
- device_printf(pi->dev,
- "failed to free egress queue %p: %d\n", eq, rc);
- return (rc);
- }
- eq->flags &= ~(EQ_ALLOCATED | EQ_STARTED);
- }
-
- free_ring(sc, eq->desc_tag, eq->desc_map, eq->ba, eq->desc);
+ rc = free_eq(sc, eq);
+ if (rc)
+ return (rc);
free(txq->sdesc, M_CXGBE);
- if (txq->maps)
- free_tx_maps(txq);
+ if (txq->txmaps.maps)
+ t4_free_tx_maps(&txq->txmaps, txq->tx_tag);
buf_ring_free(txq->br, M_CXGBE);
if (txq->tx_tag)
bus_dma_tag_destroy(txq->tx_tag);
- if (mtx_initialized(&eq->eq_lock))
- mtx_destroy(&eq->eq_lock);
-
bzero(txq, sizeof(*txq));
return (0);
}
@@ -1822,11 +2375,13 @@ ring_fl_db(struct adapter *sc, struct sge_fl *fl)
}
/*
- * Fill up the freelist by upto nbufs and ring its doorbell if the number of
- * buffers ready to be handed to the hardware >= dbthresh.
+ * Fill up the freelist by upto nbufs and maybe ring its doorbell.
+ *
+ * Returns non-zero to indicate that it should be added to the list of starving
+ * freelists.
*/
-static void
-refill_fl(struct adapter *sc, struct sge_fl *fl, int nbufs, int dbthresh)
+static int
+refill_fl(struct adapter *sc, struct sge_fl *fl, int nbufs)
{
__be64 *d = &fl->desc[fl->pidx];
struct fl_sdesc *sd = &fl->sdesc[fl->pidx];
@@ -1837,7 +2392,7 @@ refill_fl(struct adapter *sc, struct sge_fl *fl, int nbufs, int dbthresh)
FL_LOCK_ASSERT_OWNED(fl);
- if (nbufs < 0 || nbufs > fl->needed)
+ if (nbufs > fl->needed)
nbufs = fl->needed;
while (nbufs--) {
@@ -1918,8 +2473,35 @@ recycled:
}
}
- if (fl->pending >= dbthresh)
+ if (fl->pending >= 8)
ring_fl_db(sc, fl);
+
+ return (FL_RUNNING_LOW(fl) && !(fl->flags & FL_STARVING));
+}
+
+/*
+ * Attempt to refill all starving freelists.
+ */
+static void
+refill_sfl(void *arg)
+{
+ struct adapter *sc = arg;
+ struct sge_fl *fl, *fl_temp;
+
+ mtx_lock(&sc->sfl_lock);
+ TAILQ_FOREACH_SAFE(fl, &sc->sfl, link, fl_temp) {
+ FL_LOCK(fl);
+ refill_fl(sc, fl, 64);
+ if (FL_NOT_RUNNING_LOW(fl) || fl->flags & FL_DOOMED) {
+ TAILQ_REMOVE(&sc->sfl, fl, link);
+ fl->flags &= ~FL_STARVING;
+ }
+ FL_UNLOCK(fl);
+ }
+
+ if (!TAILQ_EMPTY(&sc->sfl))
+ callout_schedule(&sc->sfl_callout, hz / 5);
+ mtx_unlock(&sc->sfl_lock);
}
static int
@@ -1993,27 +2575,22 @@ free_fl_sdesc(struct sge_fl *fl)
fl->sdesc = NULL;
}
-static int
-alloc_tx_maps(struct sge_txq *txq)
+int
+t4_alloc_tx_maps(struct tx_maps *txmaps, bus_dma_tag_t tx_tag, int count,
+ int flags)
{
struct tx_map *txm;
- int i, rc, count;
+ int i, rc;
- /*
- * We can stuff ~10 frames in an 8-descriptor txpkts WR (8 is the SGE
- * limit for any WR). txq->no_dmamap events shouldn't occur if maps is
- * sized for the worst case.
- */
- count = txq->eq.qsize * 10 / 8;
- txq->map_total = txq->map_avail = count;
- txq->map_cidx = txq->map_pidx = 0;
+ txmaps->map_total = txmaps->map_avail = count;
+ txmaps->map_cidx = txmaps->map_pidx = 0;
- txq->maps = malloc(count * sizeof(struct tx_map), M_CXGBE,
- M_ZERO | M_WAITOK);
+ txmaps->maps = malloc(count * sizeof(struct tx_map), M_CXGBE,
+ M_ZERO | flags);
- txm = txq->maps;
+ txm = txmaps->maps;
for (i = 0; i < count; i++, txm++) {
- rc = bus_dmamap_create(txq->tx_tag, 0, &txm->map);
+ rc = bus_dmamap_create(tx_tag, 0, &txm->map);
if (rc != 0)
goto failed;
}
@@ -2022,36 +2599,36 @@ alloc_tx_maps(struct sge_txq *txq)
failed:
while (--i >= 0) {
txm--;
- bus_dmamap_destroy(txq->tx_tag, txm->map);
+ bus_dmamap_destroy(tx_tag, txm->map);
}
- KASSERT(txm == txq->maps, ("%s: EDOOFUS", __func__));
+ KASSERT(txm == txmaps->maps, ("%s: EDOOFUS", __func__));
- free(txq->maps, M_CXGBE);
- txq->maps = NULL;
+ free(txmaps->maps, M_CXGBE);
+ txmaps->maps = NULL;
return (rc);
}
-static void
-free_tx_maps(struct sge_txq *txq)
+void
+t4_free_tx_maps(struct tx_maps *txmaps, bus_dma_tag_t tx_tag)
{
struct tx_map *txm;
int i;
- txm = txq->maps;
- for (i = 0; i < txq->map_total; i++, txm++) {
+ txm = txmaps->maps;
+ for (i = 0; i < txmaps->map_total; i++, txm++) {
if (txm->m) {
- bus_dmamap_unload(txq->tx_tag, txm->map);
+ bus_dmamap_unload(tx_tag, txm->map);
m_freem(txm->m);
txm->m = NULL;
}
- bus_dmamap_destroy(txq->tx_tag, txm->map);
+ bus_dmamap_destroy(tx_tag, txm->map);
}
- free(txq->maps, M_CXGBE);
- txq->maps = NULL;
+ free(txmaps->maps, M_CXGBE);
+ txmaps->maps = NULL;
}
/*
@@ -2060,7 +2637,7 @@ free_tx_maps(struct sge_txq *txq)
* of immediate data.
*/
#define IMM_LEN ( \
- 2 * TX_EQ_ESIZE \
+ 2 * EQ_ESIZE \
- sizeof(struct fw_eth_tx_pkt_wr) \
- sizeof(struct cpl_tx_pkt_core))
@@ -2078,6 +2655,7 @@ get_pkt_sgl(struct sge_txq *txq, struct mbuf **fp, struct sgl *sgl,
int sgl_only)
{
struct mbuf *m = *fp;
+ struct tx_maps *txmaps;
struct tx_map *txm;
int rc, defragged = 0, n;
@@ -2091,11 +2669,12 @@ start: sgl->nsegs = 0;
if (m->m_pkthdr.len <= IMM_LEN && !sgl_only)
return (0); /* nsegs = 0 tells caller to use imm. tx */
- if (txq->map_avail == 0) {
+ txmaps = &txq->txmaps;
+ if (txmaps->map_avail == 0) {
txq->no_dmamap++;
return (ENOMEM);
}
- txm = &txq->maps[txq->map_pidx];
+ txm = &txmaps->maps[txmaps->map_pidx];
if (m->m_pkthdr.tso_segsz && m->m_len < 50) {
*fp = m_pullup(m, 50);
@@ -2119,9 +2698,9 @@ start: sgl->nsegs = 0;
return (rc);
txm->m = m;
- txq->map_avail--;
- if (++txq->map_pidx == txq->map_total)
- txq->map_pidx = 0;
+ txmaps->map_avail--;
+ if (++txmaps->map_pidx == txmaps->map_total)
+ txmaps->map_pidx = 0;
KASSERT(sgl->nsegs > 0 && sgl->nsegs <= TX_SGL_SEGS,
("%s: bad DMA mapping (%d segments)", __func__, sgl->nsegs));
@@ -2145,6 +2724,7 @@ start: sgl->nsegs = 0;
static int
free_pkt_sgl(struct sge_txq *txq, struct sgl *sgl)
{
+ struct tx_maps *txmaps;
struct tx_map *txm;
TXQ_LOCK_ASSERT_OWNED(txq);
@@ -2152,15 +2732,17 @@ free_pkt_sgl(struct sge_txq *txq, struct sgl *sgl)
if (sgl->nsegs == 0)
return (0); /* didn't use any map */
+ txmaps = &txq->txmaps;
+
/* 1 pkt uses exactly 1 map, back it out */
- txq->map_avail++;
- if (txq->map_pidx > 0)
- txq->map_pidx--;
+ txmaps->map_avail++;
+ if (txmaps->map_pidx > 0)
+ txmaps->map_pidx--;
else
- txq->map_pidx = txq->map_total - 1;
+ txmaps->map_pidx = txmaps->map_total - 1;
- txm = &txq->maps[txq->map_pidx];
+ txm = &txmaps->maps[txmaps->map_pidx];
bus_dmamap_unload(txq->tx_tag, txm->map);
txm->m = NULL;
@@ -2206,11 +2788,14 @@ write_txpkt_wr(struct port_info *pi, struct sge_txq *txq, struct mbuf *m,
/* Firmware work request header */
wr = (void *)&eq->desc[eq->pidx];
wr->op_immdlen = htobe32(V_FW_WR_OP(FW_ETH_TX_PKT_WR) |
- V_FW_WR_IMMDLEN(ctrl));
+ V_FW_ETH_TX_PKT_WR_IMMDLEN(ctrl));
ctrl = V_FW_WR_LEN16(howmany(nflits, 2));
- if (eq->avail == ndesc && !(eq->flags & EQ_CRFLUSHED)) {
- ctrl |= F_FW_WR_EQUEQ | F_FW_WR_EQUIQ;
- eq->flags |= EQ_CRFLUSHED;
+ if (eq->avail == ndesc) {
+ if (!(eq->flags & EQ_CRFLUSHED)) {
+ ctrl |= F_FW_WR_EQUEQ | F_FW_WR_EQUIQ;
+ eq->flags |= EQ_CRFLUSHED;
+ }
+ eq->flags |= EQ_STALLED;
}
wr->equiq_to_len16 = htobe32(ctrl);
@@ -2325,6 +2910,8 @@ add_to_txpkts(struct port_info *pi, struct sge_txq *txq, struct txpkts *txpkts,
TXQ_LOCK_ASSERT_OWNED(txq);
+ KASSERT(sgl->nsegs, ("%s: can't coalesce imm data", __func__));
+
if (txpkts->npkt > 0) {
flits = TXPKTS_PKT_HDR + sgl->nflits;
can_coalesce = m->m_pkthdr.tso_segsz == 0 &&
@@ -2397,12 +2984,14 @@ write_txpkts_wr(struct sge_txq *txq, struct txpkts *txpkts)
ndesc = howmany(txpkts->nflits, 8);
wr = (void *)&eq->desc[eq->pidx];
- wr->op_immdlen = htobe32(V_FW_WR_OP(FW_ETH_TX_PKTS_WR) |
- V_FW_WR_IMMDLEN(0)); /* immdlen does not matter in this WR */
+ wr->op_pkd = htobe32(V_FW_WR_OP(FW_ETH_TX_PKTS_WR));
ctrl = V_FW_WR_LEN16(howmany(txpkts->nflits, 2));
- if (eq->avail == ndesc && !(eq->flags & EQ_CRFLUSHED)) {
- ctrl |= F_FW_WR_EQUEQ | F_FW_WR_EQUIQ;
- eq->flags |= EQ_CRFLUSHED;
+ if (eq->avail == ndesc) {
+ if (!(eq->flags & EQ_CRFLUSHED)) {
+ ctrl |= F_FW_WR_EQUEQ | F_FW_WR_EQUIQ;
+ eq->flags |= EQ_CRFLUSHED;
+ }
+ eq->flags |= EQ_STALLED;
}
wr->equiq_to_len16 = htobe32(ctrl);
wr->plen = htobe16(txpkts->plen);
@@ -2616,7 +3205,7 @@ reclaimable(struct sge_eq *eq)
unsigned int cidx;
cidx = eq->spg->cidx; /* stable snapshot */
- cidx = be16_to_cpu(cidx);
+ cidx = be16toh(cidx);
if (cidx >= eq->cidx)
return (cidx - eq->cidx);
@@ -2634,11 +3223,12 @@ static int
reclaim_tx_descs(struct sge_txq *txq, int can_reclaim, int n)
{
struct tx_sdesc *txsd;
+ struct tx_maps *txmaps;
struct tx_map *txm;
unsigned int reclaimed, maps;
struct sge_eq *eq = &txq->eq;
- EQ_LOCK_ASSERT_OWNED(eq);
+ TXQ_LOCK_ASSERT_OWNED(txq);
if (can_reclaim == 0)
can_reclaim = reclaimable(eq);
@@ -2665,7 +3255,8 @@ reclaim_tx_descs(struct sge_txq *txq, int can_reclaim, int n)
eq->cidx -= eq->cap;
}
- txm = &txq->maps[txq->map_cidx];
+ txmaps = &txq->txmaps;
+ txm = &txmaps->maps[txmaps->map_cidx];
if (maps)
prefetch(txm->m);
@@ -2673,16 +3264,16 @@ reclaim_tx_descs(struct sge_txq *txq, int can_reclaim, int n)
KASSERT(eq->avail < eq->cap, /* avail tops out at (cap - 1) */
("%s: too many descriptors available", __func__));
- txq->map_avail += maps;
- KASSERT(txq->map_avail <= txq->map_total,
+ txmaps->map_avail += maps;
+ KASSERT(txmaps->map_avail <= txmaps->map_total,
("%s: too many maps available", __func__));
while (maps--) {
struct tx_map *next;
next = txm + 1;
- if (__predict_false(txq->map_cidx + 1 == txq->map_total))
- next = txq->maps;
+ if (__predict_false(txmaps->map_cidx + 1 == txmaps->map_total))
+ next = txmaps->maps;
prefetch(next->m);
bus_dmamap_unload(txq->tx_tag, txm->map);
@@ -2690,8 +3281,8 @@ reclaim_tx_descs(struct sge_txq *txq, int can_reclaim, int n)
txm->m = NULL;
txm = next;
- if (__predict_false(++txq->map_cidx == txq->map_total))
- txq->map_cidx = 0;
+ if (__predict_false(++txmaps->map_cidx == txmaps->map_total))
+ txmaps->map_cidx = 0;
}
return (reclaimed);
@@ -2704,6 +3295,7 @@ write_eqflush_wr(struct sge_eq *eq)
EQ_LOCK_ASSERT_OWNED(eq);
KASSERT(eq->avail > 0, ("%s: no descriptors left.", __func__));
+ KASSERT(!(eq->flags & EQ_CRFLUSHED), ("%s: flushed already", __func__));
wr = (void *)&eq->desc[eq->pidx];
bzero(wr, sizeof(*wr));
@@ -2711,7 +3303,7 @@ write_eqflush_wr(struct sge_eq *eq)
wr->equiq_to_len16 = htobe32(V_FW_WR_LEN16(sizeof(*wr) / 16) |
F_FW_WR_EQUEQ | F_FW_WR_EQUIQ);
- eq->flags |= EQ_CRFLUSHED;
+ eq->flags |= (EQ_CRFLUSHED | EQ_STALLED);
eq->pending++;
eq->avail--;
if (++eq->pidx == eq->cap)
@@ -2743,118 +3335,73 @@ get_flit(bus_dma_segment_t *sgl, int nsegs, int idx)
}
static void
-set_fl_tag_idx(struct sge_fl *fl, int mtu)
+set_fl_tag_idx(struct sge_fl *fl, int bufsize)
{
int i;
- FL_LOCK_ASSERT_OWNED(fl);
-
for (i = 0; i < FL_BUF_SIZES - 1; i++) {
- if (FL_BUF_SIZE(i) >= (mtu + FL_PKTSHIFT))
+ if (FL_BUF_SIZE(i) >= bufsize)
break;
}
fl->tag_idx = i;
}
-static int
-handle_sge_egr_update(struct adapter *sc, const struct cpl_sge_egr_update *cpl)
-{
- unsigned int qid = G_EGR_QID(ntohl(cpl->opcode_qid));
- struct sge *s = &sc->sge;
- struct sge_txq *txq;
- struct port_info *pi;
-
- txq = (void *)s->eqmap[qid - s->eq_start];
- TXQ_LOCK(txq);
- if (txq->eq.flags & EQ_CRFLUSHED) {
- pi = txq->ifp->if_softc;
- taskqueue_enqueue(pi->tq, &txq->resume_tx);
- txq->egr_update++;
- } else
- wakeup_one(txq); /* txq is going away, wakeup free_txq */
- TXQ_UNLOCK(txq);
-
- return (0);
-}
-
static void
-handle_cpl(struct adapter *sc, struct sge_iq *iq)
+add_fl_to_sfl(struct adapter *sc, struct sge_fl *fl)
{
- const struct rss_header *rss = (const void *)iq->cdesc;
- const struct cpl_fw6_msg *cpl = (const void *)(rss + 1);
-
- switch (rss->opcode) {
- case CPL_FW4_MSG:
- case CPL_FW6_MSG:
- if (cpl->type == FW6_TYPE_CMD_RPL)
- t4_handle_fw_rpl(sc, cpl->data);
- break;
-
- case CPL_SGE_EGR_UPDATE:
- handle_sge_egr_update(sc, (const void *)cpl);
- break;
-
- case CPL_SET_TCB_RPL:
- filter_rpl(sc, (const void *)cpl);
- break;
-
- default:
- panic("%s: unexpected CPL opcode 0x%x", __func__, rss->opcode);
+ mtx_lock(&sc->sfl_lock);
+ FL_LOCK(fl);
+ if ((fl->flags & FL_DOOMED) == 0) {
+ fl->flags |= FL_STARVING;
+ TAILQ_INSERT_TAIL(&sc->sfl, fl, link);
+ callout_reset(&sc->sfl_callout, hz / 5, refill_sfl, sc);
}
+ FL_UNLOCK(fl);
+ mtx_unlock(&sc->sfl_lock);
}
-/*
- * m0 is freed on successful transmission.
- */
static int
-ctrl_tx(struct adapter *sc, struct sge_ctrlq *ctrlq, struct mbuf *m0)
+handle_sge_egr_update(struct sge_iq *iq, const struct rss_header *rss,
+ struct mbuf *m)
{
- struct sge_eq *eq = &ctrlq->eq;
- int rc = 0, ndesc;
- int can_reclaim;
- caddr_t dst;
- struct mbuf *m;
-
- M_ASSERTPKTHDR(m0);
+ const struct cpl_sge_egr_update *cpl = (const void *)(rss + 1);
+ unsigned int qid = G_EGR_QID(ntohl(cpl->opcode_qid));
+ struct adapter *sc = iq->adapter;
+ struct sge *s = &sc->sge;
+ struct sge_eq *eq;
- if (m0->m_pkthdr.len > SGE_MAX_WR_LEN) {
- log(LOG_ERR, "%s: %s work request too long (%d)",
- device_get_nameunit(sc->dev), __func__, m0->m_pkthdr.len);
- return (EMSGSIZE);
- }
- ndesc = howmany(m0->m_pkthdr.len, CTRL_EQ_ESIZE);
+ KASSERT(m == NULL, ("%s: payload with opcode %02x", __func__,
+ rss->opcode));
+ eq = s->eqmap[qid - s->eq_start];
EQ_LOCK(eq);
+ KASSERT(eq->flags & EQ_CRFLUSHED,
+ ("%s: unsolicited egress update", __func__));
+ eq->flags &= ~EQ_CRFLUSHED;
+ eq->egr_update++;
+
+ if (__predict_false(eq->flags & EQ_DOOMED))
+ wakeup_one(eq);
+ else if (eq->flags & EQ_STALLED && can_resume_tx(eq))
+ taskqueue_enqueue(sc->tq[eq->tx_chan], &eq->tx_task);
+ EQ_UNLOCK(eq);
- can_reclaim = reclaimable(eq);
- eq->cidx += can_reclaim;
- eq->avail += can_reclaim;
- if (__predict_false(eq->cidx >= eq->cap))
- eq->cidx -= eq->cap;
-
- if (eq->avail < ndesc) {
- rc = EAGAIN;
- ctrlq->no_desc++;
- goto failed;
- }
+ return (0);
+}
- dst = (void *)&eq->desc[eq->pidx];
- for (m = m0; m; m = m->m_next)
- copy_to_txd(eq, mtod(m, caddr_t), &dst, m->m_len);
+static int
+handle_fw_rpl(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m)
+{
+ const struct cpl_fw6_msg *cpl = (const void *)(rss + 1);
- eq->pidx += ndesc;
- if (__predict_false(eq->pidx >= eq->cap))
- eq->pidx -= eq->cap;
+ KASSERT(m == NULL, ("%s: payload with opcode %02x", __func__,
+ rss->opcode));
- eq->pending += ndesc;
- ring_eq_db(sc, eq);
-failed:
- EQ_UNLOCK(eq);
- if (rc == 0)
- m_freem(m0);
+ if (cpl->type == FW6_TYPE_CMD_RPL)
+ t4_handle_fw_rpl(iq->adapter, cpl->data);
- return (rc);
+ return (0);
}
static int
diff --git a/sys/dev/dcons/dcons_os.c b/sys/dev/dcons/dcons_os.c
index d638d41..a37d64c 100644
--- a/sys/dev/dcons/dcons_os.c
+++ b/sys/dev/dcons/dcons_os.c
@@ -109,6 +109,8 @@ static cn_init_t dcons_cninit;
static cn_term_t dcons_cnterm;
static cn_getc_t dcons_cngetc;
static cn_putc_t dcons_cnputc;
+static cn_grab_t dcons_cngrab;
+static cn_ungrab_t dcons_cnungrab;
CONSOLE_DRIVER(dcons);
@@ -246,6 +248,16 @@ dcons_cnterm(struct consdev *cp)
{
}
+static void
+dcons_cngrab(struct consdev *cp)
+{
+}
+
+static void
+dcons_cnungrab(struct consdev *cp)
+{
+}
+
static int
dcons_cngetc(struct consdev *cp)
{
diff --git a/sys/dev/de/if_de.c b/sys/dev/de/if_de.c
index a9b9f31..5970bcd 100644
--- a/sys/dev/de/if_de.c
+++ b/sys/dev/de/if_de.c
@@ -1567,7 +1567,7 @@ tulip_null_media_poll(tulip_softc_t * const sc, tulip_mediapoll_event_t event)
#endif
}
-__inline static void
+static inline void
tulip_21140_mediainit(tulip_softc_t * const sc, tulip_media_info_t * const mip,
tulip_media_t const media, unsigned gpdata, unsigned cmdmode)
{
diff --git a/sys/dev/drm/i915_drv.h b/sys/dev/drm/i915_drv.h
index 4ae5e5c..3896732 100644
--- a/sys/dev/drm/i915_drv.h
+++ b/sys/dev/drm/i915_drv.h
@@ -560,7 +560,7 @@ extern void opregion_enable_asle(struct drm_device *dev);
LOCK_TEST_WITH_RETURN(dev, file_priv); \
} while (0)
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) && !defined(__bool_true_false_are_defined)
typedef boolean_t bool;
#endif
diff --git a/sys/dev/drm/mga_drv.h b/sys/dev/drm/mga_drv.h
index 61b6e82..01c5c9d 100644
--- a/sys/dev/drm/mga_drv.h
+++ b/sys/dev/drm/mga_drv.h
@@ -288,7 +288,7 @@ do { \
do { \
if ( MGA_VERBOSE ) { \
DRM_INFO( "BEGIN_DMA( %d )\n", (n) ); \
- DRM_INFO( " space=0x%x req=0x%Zx\n", \
+ DRM_INFO( " space=0x%x req=0x%zx\n", \
dev_priv->prim.space, (n) * DMA_BLOCK_SIZE ); \
} \
prim = dev_priv->prim.start; \
@@ -338,7 +338,7 @@ do { \
#define DMA_WRITE( offset, val ) \
do { \
if ( MGA_VERBOSE ) { \
- DRM_INFO( " DMA_WRITE( 0x%08x ) at 0x%04Zx\n", \
+ DRM_INFO( " DMA_WRITE( 0x%08x ) at 0x%04zx\n", \
(u32)(val), write + (offset) * sizeof(u32) ); \
} \
*(volatile u32 *)(prim + write + (offset) * sizeof(u32)) = val; \
diff --git a/sys/dev/drm/radeon_state.c b/sys/dev/drm/radeon_state.c
index 8061501..b334a88 100644
--- a/sys/dev/drm/radeon_state.c
+++ b/sys/dev/drm/radeon_state.c
@@ -1745,7 +1745,7 @@ static int radeon_cp_dispatch_texture(struct drm_device * dev,
DRM_DEBUG("tex=%dx%d blit=%d\n", tex_width, tex->height, blit_width);
do {
- DRM_DEBUG("tex: ofs=0x%x p=%d f=%d x=%hd y=%hd w=%hd h=%hd\n",
+ DRM_DEBUG("tex: ofs=0x%x p=%d f=%d x=%d y=%d w=%d h=%d\n",
tex->offset >> 10, tex->pitch, tex->format,
image->x, image->y, image->width, image->height);
diff --git a/sys/dev/e1000/e1000_80003es2lan.c b/sys/dev/e1000/e1000_80003es2lan.c
index 01b9e6d..bdbb31c 100644
--- a/sys/dev/e1000/e1000_80003es2lan.c
+++ b/sys/dev/e1000/e1000_80003es2lan.c
@@ -1,6 +1,6 @@
/******************************************************************************
- Copyright (c) 2001-2010, Intel Corporation
+ Copyright (c) 2001-2011, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -47,18 +47,18 @@ static void e1000_release_phy_80003es2lan(struct e1000_hw *hw);
static s32 e1000_acquire_nvm_80003es2lan(struct e1000_hw *hw);
static void e1000_release_nvm_80003es2lan(struct e1000_hw *hw);
static s32 e1000_read_phy_reg_gg82563_80003es2lan(struct e1000_hw *hw,
- u32 offset,
- u16 *data);
+ u32 offset,
+ u16 *data);
static s32 e1000_write_phy_reg_gg82563_80003es2lan(struct e1000_hw *hw,
- u32 offset,
- u16 data);
+ u32 offset,
+ u16 data);
static s32 e1000_write_nvm_80003es2lan(struct e1000_hw *hw, u16 offset,
- u16 words, u16 *data);
+ u16 words, u16 *data);
static s32 e1000_get_cfg_done_80003es2lan(struct e1000_hw *hw);
static s32 e1000_phy_force_speed_duplex_80003es2lan(struct e1000_hw *hw);
static s32 e1000_get_cable_length_80003es2lan(struct e1000_hw *hw);
static s32 e1000_get_link_up_info_80003es2lan(struct e1000_hw *hw, u16 *speed,
- u16 *duplex);
+ u16 *duplex);
static s32 e1000_reset_hw_80003es2lan(struct e1000_hw *hw);
static s32 e1000_init_hw_80003es2lan(struct e1000_hw *hw);
static s32 e1000_setup_copper_link_80003es2lan(struct e1000_hw *hw);
@@ -68,9 +68,9 @@ static s32 e1000_cfg_kmrn_10_100_80003es2lan(struct e1000_hw *hw, u16 duplex);
static s32 e1000_cfg_kmrn_1000_80003es2lan(struct e1000_hw *hw);
static s32 e1000_cfg_on_link_up_80003es2lan(struct e1000_hw *hw);
static s32 e1000_read_kmrn_reg_80003es2lan(struct e1000_hw *hw, u32 offset,
- u16 *data);
+ u16 *data);
static s32 e1000_write_kmrn_reg_80003es2lan(struct e1000_hw *hw, u32 offset,
- u16 data);
+ u16 data);
static s32 e1000_copper_link_setup_gg82563_80003es2lan(struct e1000_hw *hw);
static void e1000_initialize_hw_bits_80003es2lan(struct e1000_hw *hw);
static void e1000_release_swfw_sync_80003es2lan(struct e1000_hw *hw, u16 mask);
@@ -85,8 +85,8 @@ static void e1000_power_down_phy_copper_80003es2lan(struct e1000_hw *hw);
static const u16 e1000_gg82563_cable_length_table[] = {
0, 60, 115, 150, 150, 60, 115, 150, 180, 180, 0xFF };
#define GG82563_CABLE_LENGTH_TABLE_SIZE \
- (sizeof(e1000_gg82563_cable_length_table) / \
- sizeof(e1000_gg82563_cable_length_table[0]))
+ (sizeof(e1000_gg82563_cable_length_table) / \
+ sizeof(e1000_gg82563_cable_length_table[0]))
/**
* e1000_init_phy_params_80003es2lan - Init ESB2 PHY func ptrs.
@@ -100,34 +100,34 @@ static s32 e1000_init_phy_params_80003es2lan(struct e1000_hw *hw)
DEBUGFUNC("e1000_init_phy_params_80003es2lan");
if (hw->phy.media_type != e1000_media_type_copper) {
- phy->type = e1000_phy_none;
+ phy->type = e1000_phy_none;
goto out;
} else {
phy->ops.power_up = e1000_power_up_phy_copper;
phy->ops.power_down = e1000_power_down_phy_copper_80003es2lan;
}
- phy->addr = 1;
- phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT;
- phy->reset_delay_us = 100;
- phy->type = e1000_phy_gg82563;
-
- phy->ops.acquire = e1000_acquire_phy_80003es2lan;
- phy->ops.check_polarity = e1000_check_polarity_m88;
- phy->ops.check_reset_block = e1000_check_reset_block_generic;
- phy->ops.commit = e1000_phy_sw_reset_generic;
- phy->ops.get_cfg_done = e1000_get_cfg_done_80003es2lan;
- phy->ops.get_info = e1000_get_phy_info_m88;
- phy->ops.release = e1000_release_phy_80003es2lan;
- phy->ops.reset = e1000_phy_hw_reset_generic;
- phy->ops.set_d3_lplu_state = e1000_set_d3_lplu_state_generic;
+ phy->addr = 1;
+ phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT;
+ phy->reset_delay_us = 100;
+ phy->type = e1000_phy_gg82563;
+
+ phy->ops.acquire = e1000_acquire_phy_80003es2lan;
+ phy->ops.check_polarity = e1000_check_polarity_m88;
+ phy->ops.check_reset_block = e1000_check_reset_block_generic;
+ phy->ops.commit = e1000_phy_sw_reset_generic;
+ phy->ops.get_cfg_done = e1000_get_cfg_done_80003es2lan;
+ phy->ops.get_info = e1000_get_phy_info_m88;
+ phy->ops.release = e1000_release_phy_80003es2lan;
+ phy->ops.reset = e1000_phy_hw_reset_generic;
+ phy->ops.set_d3_lplu_state = e1000_set_d3_lplu_state_generic;
phy->ops.force_speed_duplex = e1000_phy_force_speed_duplex_80003es2lan;
- phy->ops.get_cable_length = e1000_get_cable_length_80003es2lan;
- phy->ops.read_reg = e1000_read_phy_reg_gg82563_80003es2lan;
- phy->ops.write_reg = e1000_write_phy_reg_gg82563_80003es2lan;
+ phy->ops.get_cable_length = e1000_get_cable_length_80003es2lan;
+ phy->ops.read_reg = e1000_read_phy_reg_gg82563_80003es2lan;
+ phy->ops.write_reg = e1000_write_phy_reg_gg82563_80003es2lan;
- phy->ops.cfg_on_link_up = e1000_cfg_on_link_up_80003es2lan;
+ phy->ops.cfg_on_link_up = e1000_cfg_on_link_up_80003es2lan;
/* This can only be done after all function pointers are setup. */
ret_val = e1000_get_phy_id(hw);
@@ -154,19 +154,19 @@ static s32 e1000_init_nvm_params_80003es2lan(struct e1000_hw *hw)
DEBUGFUNC("e1000_init_nvm_params_80003es2lan");
- nvm->opcode_bits = 8;
- nvm->delay_usec = 1;
+ nvm->opcode_bits = 8;
+ nvm->delay_usec = 1;
switch (nvm->override) {
case e1000_nvm_override_spi_large:
- nvm->page_size = 32;
+ nvm->page_size = 32;
nvm->address_bits = 16;
break;
case e1000_nvm_override_spi_small:
- nvm->page_size = 8;
+ nvm->page_size = 8;
nvm->address_bits = 8;
break;
default:
- nvm->page_size = eecd & E1000_EECD_ADDR_BITS ? 32 : 8;
+ nvm->page_size = eecd & E1000_EECD_ADDR_BITS ? 32 : 8;
nvm->address_bits = eecd & E1000_EECD_ADDR_BITS ? 16 : 8;
break;
}
@@ -174,7 +174,7 @@ static s32 e1000_init_nvm_params_80003es2lan(struct e1000_hw *hw)
nvm->type = e1000_nvm_eeprom_spi;
size = (u16)((eecd & E1000_EECD_SIZE_EX_MASK) >>
- E1000_EECD_SIZE_EX_SHIFT);
+ E1000_EECD_SIZE_EX_SHIFT);
/*
* Added to a constant, "size" becomes the left-shift value
@@ -185,16 +185,16 @@ static s32 e1000_init_nvm_params_80003es2lan(struct e1000_hw *hw)
/* EEPROM access above 16k is unsupported */
if (size > 14)
size = 14;
- nvm->word_size = 1 << size;
+ nvm->word_size = 1 << size;
/* Function Pointers */
- nvm->ops.acquire = e1000_acquire_nvm_80003es2lan;
- nvm->ops.read = e1000_read_nvm_eerd;
- nvm->ops.release = e1000_release_nvm_80003es2lan;
- nvm->ops.update = e1000_update_nvm_checksum_generic;
+ nvm->ops.acquire = e1000_acquire_nvm_80003es2lan;
+ nvm->ops.read = e1000_read_nvm_eerd;
+ nvm->ops.release = e1000_release_nvm_80003es2lan;
+ nvm->ops.update = e1000_update_nvm_checksum_generic;
nvm->ops.valid_led_default = e1000_valid_led_default_generic;
- nvm->ops.validate = e1000_validate_nvm_checksum_generic;
- nvm->ops.write = e1000_write_nvm_80003es2lan;
+ nvm->ops.validate = e1000_validate_nvm_checksum_generic;
+ nvm->ops.write = e1000_write_nvm_80003es2lan;
return E1000_SUCCESS;
}
@@ -215,13 +215,13 @@ static s32 e1000_init_mac_params_80003es2lan(struct e1000_hw *hw)
hw->phy.media_type = e1000_media_type_internal_serdes;
mac->ops.check_for_link = e1000_check_for_serdes_link_generic;
mac->ops.setup_physical_interface =
- e1000_setup_fiber_serdes_link_generic;
+ e1000_setup_fiber_serdes_link_generic;
break;
default:
hw->phy.media_type = e1000_media_type_copper;
mac->ops.check_for_link = e1000_check_for_copper_link_generic;
mac->ops.setup_physical_interface =
- e1000_setup_copper_link_80003es2lan;
+ e1000_setup_copper_link_80003es2lan;
break;
}
@@ -234,9 +234,8 @@ static s32 e1000_init_mac_params_80003es2lan(struct e1000_hw *hw)
/* FWSM register */
mac->has_fwsm = TRUE;
/* ARC supported; valid only if manageability features are enabled. */
- mac->arc_subsystem_valid =
- (E1000_READ_REG(hw, E1000_FWSM) & E1000_FWSM_MODE_MASK)
- ? TRUE : FALSE;
+ mac->arc_subsystem_valid = (E1000_READ_REG(hw, E1000_FWSM) &
+ E1000_FWSM_MODE_MASK) ? TRUE : FALSE;
/* Adaptive IFS not supported */
mac->adaptive_ifs = FALSE;
@@ -330,7 +329,7 @@ static void e1000_release_phy_80003es2lan(struct e1000_hw *hw)
}
/**
- * e1000_acquire_mac_csr_80003es2lan - Acquire rights to access Kumeran register
+ * e1000_acquire_mac_csr_80003es2lan - Acquire right to access Kumeran register
* @hw: pointer to the HW structure
*
* Acquire the semaphore to access the Kumeran interface.
@@ -348,7 +347,7 @@ static s32 e1000_acquire_mac_csr_80003es2lan(struct e1000_hw *hw)
}
/**
- * e1000_release_mac_csr_80003es2lan - Release rights to access Kumeran Register
+ * e1000_release_mac_csr_80003es2lan - Release right to access Kumeran Register
* @hw: pointer to the HW structure
*
* Release the semaphore used to access the Kumeran interface
@@ -488,7 +487,7 @@ static void e1000_release_swfw_sync_80003es2lan(struct e1000_hw *hw, u16 mask)
* Read the GG82563 PHY register.
**/
static s32 e1000_read_phy_reg_gg82563_80003es2lan(struct e1000_hw *hw,
- u32 offset, u16 *data)
+ u32 offset, u16 *data)
{
s32 ret_val;
u32 page_select;
@@ -538,14 +537,14 @@ static s32 e1000_read_phy_reg_gg82563_80003es2lan(struct e1000_hw *hw,
usec_delay(200);
ret_val = e1000_read_phy_reg_mdic(hw,
- MAX_PHY_REG_ADDRESS & offset,
- data);
+ MAX_PHY_REG_ADDRESS & offset,
+ data);
usec_delay(200);
} else {
ret_val = e1000_read_phy_reg_mdic(hw,
- MAX_PHY_REG_ADDRESS & offset,
- data);
+ MAX_PHY_REG_ADDRESS & offset,
+ data);
}
e1000_release_phy_80003es2lan(hw);
@@ -563,7 +562,7 @@ out:
* Write to the GG82563 PHY register.
**/
static s32 e1000_write_phy_reg_gg82563_80003es2lan(struct e1000_hw *hw,
- u32 offset, u16 data)
+ u32 offset, u16 data)
{
s32 ret_val;
u32 page_select;
@@ -613,14 +612,14 @@ static s32 e1000_write_phy_reg_gg82563_80003es2lan(struct e1000_hw *hw,
usec_delay(200);
ret_val = e1000_write_phy_reg_mdic(hw,
- MAX_PHY_REG_ADDRESS & offset,
- data);
+ MAX_PHY_REG_ADDRESS & offset,
+ data);
usec_delay(200);
} else {
ret_val = e1000_write_phy_reg_mdic(hw,
- MAX_PHY_REG_ADDRESS & offset,
- data);
+ MAX_PHY_REG_ADDRESS & offset,
+ data);
}
e1000_release_phy_80003es2lan(hw);
@@ -639,7 +638,7 @@ out:
* Write "words" of data to the ESB2 NVM.
**/
static s32 e1000_write_nvm_80003es2lan(struct e1000_hw *hw, u16 offset,
- u16 words, u16 *data)
+ u16 words, u16 *data)
{
DEBUGFUNC("e1000_write_nvm_80003es2lan");
@@ -729,11 +728,10 @@ static s32 e1000_phy_force_speed_duplex_80003es2lan(struct e1000_hw *hw)
usec_delay(1);
if (hw->phy.autoneg_wait_to_complete) {
- DEBUGOUT("Waiting for forced speed/duplex link "
- "on GG82563 phy.\n");
+ DEBUGOUT("Waiting for forced speed/duplex link on GG82563 phy.\n");
ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
- 100000, &link);
+ 100000, &link);
if (ret_val)
goto out;
@@ -749,12 +747,13 @@ static s32 e1000_phy_force_speed_duplex_80003es2lan(struct e1000_hw *hw)
/* Try once more */
ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
- 100000, &link);
+ 100000, &link);
if (ret_val)
goto out;
}
- ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_MAC_SPEC_CTRL, &phy_data);
+ ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_MAC_SPEC_CTRL,
+ &phy_data);
if (ret_val)
goto out;
@@ -773,7 +772,8 @@ static s32 e1000_phy_force_speed_duplex_80003es2lan(struct e1000_hw *hw)
* duplex.
*/
phy_data |= GG82563_MSCR_ASSERT_CRS_ON_TX;
- ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_MAC_SPEC_CTRL, phy_data);
+ ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_MAC_SPEC_CTRL,
+ phy_data);
out:
return ret_val;
@@ -826,21 +826,20 @@ out:
* Retrieve the current speed and duplex configuration.
**/
static s32 e1000_get_link_up_info_80003es2lan(struct e1000_hw *hw, u16 *speed,
- u16 *duplex)
+ u16 *duplex)
{
s32 ret_val;
DEBUGFUNC("e1000_get_link_up_info_80003es2lan");
if (hw->phy.media_type == e1000_media_type_copper) {
- ret_val = e1000_get_speed_and_duplex_copper_generic(hw,
- speed,
- duplex);
+ ret_val = e1000_get_speed_and_duplex_copper_generic(hw, speed,
+ duplex);
hw->phy.ops.cfg_on_link_up(hw);
} else {
ret_val = e1000_get_speed_and_duplex_fiber_serdes_generic(hw,
- speed,
- duplex);
+ speed,
+ duplex);
}
return ret_val;
@@ -939,21 +938,21 @@ static s32 e1000_init_hw_80003es2lan(struct e1000_hw *hw)
/* Disable IBIST slave mode (far-end loopback) */
e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM,
- &kum_reg_data);
+ &kum_reg_data);
kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE;
e1000_write_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM,
- kum_reg_data);
+ kum_reg_data);
/* Set the transmit descriptor write-back policy */
reg_data = E1000_READ_REG(hw, E1000_TXDCTL(0));
reg_data = (reg_data & ~E1000_TXDCTL_WTHRESH) |
- E1000_TXDCTL_FULL_TX_DESC_WB | E1000_TXDCTL_COUNT_DESC;
+ E1000_TXDCTL_FULL_TX_DESC_WB | E1000_TXDCTL_COUNT_DESC;
E1000_WRITE_REG(hw, E1000_TXDCTL(0), reg_data);
/* ...for both queues. */
reg_data = E1000_READ_REG(hw, E1000_TXDCTL(1));
reg_data = (reg_data & ~E1000_TXDCTL_WTHRESH) |
- E1000_TXDCTL_FULL_TX_DESC_WB | E1000_TXDCTL_COUNT_DESC;
+ E1000_TXDCTL_FULL_TX_DESC_WB | E1000_TXDCTL_COUNT_DESC;
E1000_WRITE_REG(hw, E1000_TXDCTL(1), reg_data);
/* Enable retransmit on late collisions */
@@ -981,9 +980,9 @@ static s32 e1000_init_hw_80003es2lan(struct e1000_hw *hw)
hw->dev_spec._80003es2lan.mdic_wa_enable = TRUE;
ret_val = e1000_read_kmrn_reg_80003es2lan(hw,
- E1000_KMRNCTRLSTA_OFFSET >>
- E1000_KMRNCTRLSTA_OFFSET_SHIFT,
- &i);
+ E1000_KMRNCTRLSTA_OFFSET >>
+ E1000_KMRNCTRLSTA_OFFSET_SHIFT,
+ &i);
if (!ret_val) {
if ((i & E1000_KMRNCTRLSTA_OPMODE_MASK) ==
E1000_KMRNCTRLSTA_OPMODE_INBAND_MDIO)
@@ -1056,11 +1055,7 @@ static s32 e1000_copper_link_setup_gg82563_80003es2lan(struct e1000_hw *hw)
DEBUGFUNC("e1000_copper_link_setup_gg82563_80003es2lan");
- if (phy->reset_disable)
- goto skip_reset;
-
- ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_MAC_SPEC_CTRL,
- &data);
+ ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_MAC_SPEC_CTRL, &data);
if (ret_val)
goto out;
@@ -1068,8 +1063,7 @@ static s32 e1000_copper_link_setup_gg82563_80003es2lan(struct e1000_hw *hw)
/* Use 25MHz for both link down and 1000Base-T for Tx clock. */
data |= GG82563_MSCR_TX_CLK_1000MBPS_25;
- ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_MAC_SPEC_CTRL,
- data);
+ ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_MAC_SPEC_CTRL, data);
if (ret_val)
goto out;
@@ -1122,7 +1116,6 @@ static s32 e1000_copper_link_setup_gg82563_80003es2lan(struct e1000_hw *hw)
goto out;
}
-skip_reset:
/* Bypass Rx and Tx FIFO's */
ret_val = e1000_write_kmrn_reg_80003es2lan(hw,
E1000_KMRNCTRLSTA_OFFSET_FIFO_CTRL,
@@ -1132,14 +1125,12 @@ skip_reset:
goto out;
ret_val = e1000_read_kmrn_reg_80003es2lan(hw,
- E1000_KMRNCTRLSTA_OFFSET_MAC2PHY_OPMODE,
- &data);
+ E1000_KMRNCTRLSTA_OFFSET_MAC2PHY_OPMODE, &data);
if (ret_val)
goto out;
data |= E1000_KMRNCTRLSTA_OPMODE_E_IDLE;
ret_val = e1000_write_kmrn_reg_80003es2lan(hw,
- E1000_KMRNCTRLSTA_OFFSET_MAC2PHY_OPMODE,
- data);
+ E1000_KMRNCTRLSTA_OFFSET_MAC2PHY_OPMODE, data);
if (ret_val)
goto out;
@@ -1169,18 +1160,18 @@ skip_reset:
/* Enable Electrical Idle on the PHY */
data |= GG82563_PMCR_ENABLE_ELECTRICAL_IDLE;
ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_PWR_MGMT_CTRL,
- data);
+ data);
if (ret_val)
goto out;
ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_KMRN_MODE_CTRL,
- &data);
+ &data);
if (ret_val)
goto out;
data &= ~GG82563_KMCR_PASS_FALSE_CARRIER;
ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_KMRN_MODE_CTRL,
- data);
+ data);
if (ret_val)
goto out;
}
@@ -1228,27 +1219,25 @@ static s32 e1000_setup_copper_link_80003es2lan(struct e1000_hw *hw)
* polling the phy; this fixes erroneous timeouts at 10Mbps.
*/
ret_val = e1000_write_kmrn_reg_80003es2lan(hw, GG82563_REG(0x34, 4),
- 0xFFFF);
+ 0xFFFF);
if (ret_val)
goto out;
ret_val = e1000_read_kmrn_reg_80003es2lan(hw, GG82563_REG(0x34, 9),
- &reg_data);
+ &reg_data);
if (ret_val)
goto out;
reg_data |= 0x3F;
ret_val = e1000_write_kmrn_reg_80003es2lan(hw, GG82563_REG(0x34, 9),
- reg_data);
+ reg_data);
if (ret_val)
goto out;
ret_val = e1000_read_kmrn_reg_80003es2lan(hw,
- E1000_KMRNCTRLSTA_OFFSET_INB_CTRL,
- &reg_data);
+ E1000_KMRNCTRLSTA_OFFSET_INB_CTRL, &reg_data);
if (ret_val)
goto out;
reg_data |= E1000_KMRNCTRLSTA_INB_CTRL_DIS_PADDING;
ret_val = e1000_write_kmrn_reg_80003es2lan(hw,
- E1000_KMRNCTRLSTA_OFFSET_INB_CTRL,
- reg_data);
+ E1000_KMRNCTRLSTA_OFFSET_INB_CTRL, reg_data);
if (ret_val)
goto out;
@@ -1279,9 +1268,8 @@ static s32 e1000_cfg_on_link_up_80003es2lan(struct e1000_hw *hw)
DEBUGFUNC("e1000_configure_on_link_up");
if (hw->phy.media_type == e1000_media_type_copper) {
- ret_val = e1000_get_speed_and_duplex_copper_generic(hw,
- &speed,
- &duplex);
+ ret_val = e1000_get_speed_and_duplex_copper_generic(hw, &speed,
+ &duplex);
if (ret_val)
goto out;
@@ -1314,8 +1302,8 @@ static s32 e1000_cfg_kmrn_10_100_80003es2lan(struct e1000_hw *hw, u16 duplex)
reg_data = E1000_KMRNCTRLSTA_HD_CTRL_10_100_DEFAULT;
ret_val = e1000_write_kmrn_reg_80003es2lan(hw,
- E1000_KMRNCTRLSTA_OFFSET_HD_CTRL,
- reg_data);
+ E1000_KMRNCTRLSTA_OFFSET_HD_CTRL,
+ reg_data);
if (ret_val)
goto out;
@@ -1327,12 +1315,12 @@ static s32 e1000_cfg_kmrn_10_100_80003es2lan(struct e1000_hw *hw, u16 duplex)
do {
ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_KMRN_MODE_CTRL,
- &reg_data);
+ &reg_data);
if (ret_val)
goto out;
ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_KMRN_MODE_CTRL,
- &reg_data2);
+ &reg_data2);
if (ret_val)
goto out;
i++;
@@ -1343,7 +1331,8 @@ static s32 e1000_cfg_kmrn_10_100_80003es2lan(struct e1000_hw *hw, u16 duplex)
else
reg_data &= ~GG82563_KMCR_PASS_FALSE_CARRIER;
- ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, reg_data);
+ ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_KMRN_MODE_CTRL,
+ reg_data);
out:
return ret_val;
@@ -1367,8 +1356,7 @@ static s32 e1000_cfg_kmrn_1000_80003es2lan(struct e1000_hw *hw)
reg_data = E1000_KMRNCTRLSTA_HD_CTRL_1000_DEFAULT;
ret_val = e1000_write_kmrn_reg_80003es2lan(hw,
- E1000_KMRNCTRLSTA_OFFSET_HD_CTRL,
- reg_data);
+ E1000_KMRNCTRLSTA_OFFSET_HD_CTRL, reg_data);
if (ret_val)
goto out;
@@ -1380,19 +1368,20 @@ static s32 e1000_cfg_kmrn_1000_80003es2lan(struct e1000_hw *hw)
do {
ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_KMRN_MODE_CTRL,
- &reg_data);
+ &reg_data);
if (ret_val)
goto out;
ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_KMRN_MODE_CTRL,
- &reg_data2);
+ &reg_data2);
if (ret_val)
goto out;
i++;
} while ((reg_data != reg_data2) && (i < GG82563_MAX_KMRN_RETRY));
reg_data &= ~GG82563_KMCR_PASS_FALSE_CARRIER;
- ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, reg_data);
+ ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_KMRN_MODE_CTRL,
+ reg_data);
out:
return ret_val;
@@ -1409,7 +1398,7 @@ out:
* Release the semaphore before exiting.
**/
static s32 e1000_read_kmrn_reg_80003es2lan(struct e1000_hw *hw, u32 offset,
- u16 *data)
+ u16 *data)
{
u32 kmrnctrlsta;
s32 ret_val = E1000_SUCCESS;
@@ -1421,8 +1410,9 @@ static s32 e1000_read_kmrn_reg_80003es2lan(struct e1000_hw *hw, u32 offset,
goto out;
kmrnctrlsta = ((offset << E1000_KMRNCTRLSTA_OFFSET_SHIFT) &
- E1000_KMRNCTRLSTA_OFFSET) | E1000_KMRNCTRLSTA_REN;
+ E1000_KMRNCTRLSTA_OFFSET) | E1000_KMRNCTRLSTA_REN;
E1000_WRITE_REG(hw, E1000_KMRNCTRLSTA, kmrnctrlsta);
+ E1000_WRITE_FLUSH(hw);
usec_delay(2);
@@ -1446,7 +1436,7 @@ out:
* before exiting.
**/
static s32 e1000_write_kmrn_reg_80003es2lan(struct e1000_hw *hw, u32 offset,
- u16 data)
+ u16 data)
{
u32 kmrnctrlsta;
s32 ret_val = E1000_SUCCESS;
@@ -1458,8 +1448,9 @@ static s32 e1000_write_kmrn_reg_80003es2lan(struct e1000_hw *hw, u32 offset,
goto out;
kmrnctrlsta = ((offset << E1000_KMRNCTRLSTA_OFFSET_SHIFT) &
- E1000_KMRNCTRLSTA_OFFSET) | data;
+ E1000_KMRNCTRLSTA_OFFSET) | data;
E1000_WRITE_REG(hw, E1000_KMRNCTRLSTA, kmrnctrlsta);
+ E1000_WRITE_FLUSH(hw);
usec_delay(2);
diff --git a/sys/dev/e1000/e1000_80003es2lan.h b/sys/dev/e1000/e1000_80003es2lan.h
index 7d147f1..157468e 100644
--- a/sys/dev/e1000/e1000_80003es2lan.h
+++ b/sys/dev/e1000/e1000_80003es2lan.h
@@ -1,6 +1,6 @@
/******************************************************************************
- Copyright (c) 2001-2010, Intel Corporation
+ Copyright (c) 2001-2011, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -35,48 +35,47 @@
#ifndef _E1000_80003ES2LAN_H_
#define _E1000_80003ES2LAN_H_
-#define E1000_KMRNCTRLSTA_OFFSET_FIFO_CTRL 0x00
-#define E1000_KMRNCTRLSTA_OFFSET_INB_CTRL 0x02
-#define E1000_KMRNCTRLSTA_OFFSET_HD_CTRL 0x10
-#define E1000_KMRNCTRLSTA_OFFSET_MAC2PHY_OPMODE 0x1F
+#define E1000_KMRNCTRLSTA_OFFSET_FIFO_CTRL 0x00
+#define E1000_KMRNCTRLSTA_OFFSET_INB_CTRL 0x02
+#define E1000_KMRNCTRLSTA_OFFSET_HD_CTRL 0x10
+#define E1000_KMRNCTRLSTA_OFFSET_MAC2PHY_OPMODE 0x1F
-#define E1000_KMRNCTRLSTA_FIFO_CTRL_RX_BYPASS 0x0008
-#define E1000_KMRNCTRLSTA_FIFO_CTRL_TX_BYPASS 0x0800
-#define E1000_KMRNCTRLSTA_INB_CTRL_DIS_PADDING 0x0010
+#define E1000_KMRNCTRLSTA_FIFO_CTRL_RX_BYPASS 0x0008
+#define E1000_KMRNCTRLSTA_FIFO_CTRL_TX_BYPASS 0x0800
+#define E1000_KMRNCTRLSTA_INB_CTRL_DIS_PADDING 0x0010
#define E1000_KMRNCTRLSTA_HD_CTRL_10_100_DEFAULT 0x0004
-#define E1000_KMRNCTRLSTA_HD_CTRL_1000_DEFAULT 0x0000
-#define E1000_KMRNCTRLSTA_OPMODE_E_IDLE 0x2000
+#define E1000_KMRNCTRLSTA_HD_CTRL_1000_DEFAULT 0x0000
+#define E1000_KMRNCTRLSTA_OPMODE_E_IDLE 0x2000
-#define E1000_KMRNCTRLSTA_OPMODE_MASK 0x000C
-#define E1000_KMRNCTRLSTA_OPMODE_INBAND_MDIO 0x0004
+#define E1000_KMRNCTRLSTA_OPMODE_MASK 0x000C
+#define E1000_KMRNCTRLSTA_OPMODE_INBAND_MDIO 0x0004
#define E1000_TCTL_EXT_GCEX_MASK 0x000FFC00 /* Gigabit Carry Extend Padding */
-#define DEFAULT_TCTL_EXT_GCEX_80003ES2LAN 0x00010000
+#define DEFAULT_TCTL_EXT_GCEX_80003ES2LAN 0x00010000
-#define DEFAULT_TIPG_IPGT_1000_80003ES2LAN 0x8
-#define DEFAULT_TIPG_IPGT_10_100_80003ES2LAN 0x9
+#define DEFAULT_TIPG_IPGT_1000_80003ES2LAN 0x8
+#define DEFAULT_TIPG_IPGT_10_100_80003ES2LAN 0x9
/* GG82563 PHY Specific Status Register (Page 0, Register 16 */
-#define GG82563_PSCR_POLARITY_REVERSAL_DISABLE 0x0002 /* 1=Reversal Disabled */
-#define GG82563_PSCR_CROSSOVER_MODE_MASK 0x0060
-#define GG82563_PSCR_CROSSOVER_MODE_MDI 0x0000 /* 00=Manual MDI */
-#define GG82563_PSCR_CROSSOVER_MODE_MDIX 0x0020 /* 01=Manual MDIX */
-#define GG82563_PSCR_CROSSOVER_MODE_AUTO 0x0060 /* 11=Auto crossover */
+#define GG82563_PSCR_POLARITY_REVERSAL_DISABLE 0x0002 /* 1=Reversal Disabled */
+#define GG82563_PSCR_CROSSOVER_MODE_MASK 0x0060
+#define GG82563_PSCR_CROSSOVER_MODE_MDI 0x0000 /* 00=Manual MDI */
+#define GG82563_PSCR_CROSSOVER_MODE_MDIX 0x0020 /* 01=Manual MDIX */
+#define GG82563_PSCR_CROSSOVER_MODE_AUTO 0x0060 /* 11=Auto crossover */
/* PHY Specific Control Register 2 (Page 0, Register 26) */
-#define GG82563_PSCR2_REVERSE_AUTO_NEG 0x2000
- /* 1=Reverse Auto-Negotiation */
+#define GG82563_PSCR2_REVERSE_AUTO_NEG 0x2000 /* 1=Reverse Auto-Nego */
/* MAC Specific Control Register (Page 2, Register 21) */
/* Tx clock speed for Link Down and 1000BASE-T for the following speeds */
-#define GG82563_MSCR_TX_CLK_MASK 0x0007
-#define GG82563_MSCR_TX_CLK_10MBPS_2_5 0x0004
-#define GG82563_MSCR_TX_CLK_100MBPS_25 0x0005
-#define GG82563_MSCR_TX_CLK_1000MBPS_2_5 0x0006
-#define GG82563_MSCR_TX_CLK_1000MBPS_25 0x0007
+#define GG82563_MSCR_TX_CLK_MASK 0x0007
+#define GG82563_MSCR_TX_CLK_10MBPS_2_5 0x0004
+#define GG82563_MSCR_TX_CLK_100MBPS_25 0x0005
+#define GG82563_MSCR_TX_CLK_1000MBPS_2_5 0x0006
+#define GG82563_MSCR_TX_CLK_1000MBPS_25 0x0007
-#define GG82563_MSCR_ASSERT_CRS_ON_TX 0x0010 /* 1=Assert */
+#define GG82563_MSCR_ASSERT_CRS_ON_TX 0x0010 /* 1=Assert */
/* DSP Distance Register (Page 5, Register 26) */
/*
@@ -86,19 +85,19 @@
* 3 = 110-140M
* 4 = >140M
*/
-#define GG82563_DSPD_CABLE_LENGTH 0x0007
+#define GG82563_DSPD_CABLE_LENGTH 0x0007
/* Kumeran Mode Control Register (Page 193, Register 16) */
-#define GG82563_KMCR_PASS_FALSE_CARRIER 0x0800
+#define GG82563_KMCR_PASS_FALSE_CARRIER 0x0800
/* Max number of times Kumeran read/write should be validated */
-#define GG82563_MAX_KMRN_RETRY 0x5
+#define GG82563_MAX_KMRN_RETRY 0x5
/* Power Management Control Register (Page 193, Register 20) */
-#define GG82563_PMCR_ENABLE_ELECTRICAL_IDLE 0x0001
- /* 1=Enable SERDES Electrical Idle */
+/* 1=Enable SERDES Electrical Idle */
+#define GG82563_PMCR_ENABLE_ELECTRICAL_IDLE 0x0001
/* In-Band Control Register (Page 194, Register 18) */
-#define GG82563_ICR_DIS_PADDING 0x0010 /* Disable Padding */
+#define GG82563_ICR_DIS_PADDING 0x0010 /* Disable Padding */
#endif
diff --git a/sys/dev/e1000/e1000_82540.c b/sys/dev/e1000/e1000_82540.c
index 35018ce..141b92e 100644
--- a/sys/dev/e1000/e1000_82540.c
+++ b/sys/dev/e1000/e1000_82540.c
@@ -1,6 +1,6 @@
/******************************************************************************
- Copyright (c) 2001-2010, Intel Corporation
+ Copyright (c) 2001-2011, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -68,23 +68,23 @@ static s32 e1000_init_phy_params_82540(struct e1000_hw *hw)
struct e1000_phy_info *phy = &hw->phy;
s32 ret_val = E1000_SUCCESS;
- phy->addr = 1;
- phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT;
- phy->reset_delay_us = 10000;
- phy->type = e1000_phy_m88;
+ phy->addr = 1;
+ phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT;
+ phy->reset_delay_us = 10000;
+ phy->type = e1000_phy_m88;
/* Function Pointers */
- phy->ops.check_polarity = e1000_check_polarity_m88;
- phy->ops.commit = e1000_phy_sw_reset_generic;
- phy->ops.force_speed_duplex = e1000_phy_force_speed_duplex_m88;
- phy->ops.get_cable_length = e1000_get_cable_length_m88;
- phy->ops.get_cfg_done = e1000_get_cfg_done_generic;
- phy->ops.read_reg = e1000_read_phy_reg_m88;
- phy->ops.reset = e1000_phy_hw_reset_generic;
- phy->ops.write_reg = e1000_write_phy_reg_m88;
- phy->ops.get_info = e1000_get_phy_info_m88;
- phy->ops.power_up = e1000_power_up_phy_copper;
- phy->ops.power_down = e1000_power_down_phy_copper_82540;
+ phy->ops.check_polarity = e1000_check_polarity_m88;
+ phy->ops.commit = e1000_phy_sw_reset_generic;
+ phy->ops.force_speed_duplex = e1000_phy_force_speed_duplex_m88;
+ phy->ops.get_cable_length = e1000_get_cable_length_m88;
+ phy->ops.get_cfg_done = e1000_get_cfg_done_generic;
+ phy->ops.read_reg = e1000_read_phy_reg_m88;
+ phy->ops.reset = e1000_phy_hw_reset_generic;
+ phy->ops.write_reg = e1000_write_phy_reg_m88;
+ phy->ops.get_info = e1000_get_phy_info_m88;
+ phy->ops.power_up = e1000_power_up_phy_copper;
+ phy->ops.power_down = e1000_power_down_phy_copper_82540;
ret_val = e1000_get_phy_id(hw);
if (ret_val)
@@ -121,32 +121,32 @@ static s32 e1000_init_nvm_params_82540(struct e1000_hw *hw)
DEBUGFUNC("e1000_init_nvm_params_82540");
- nvm->type = e1000_nvm_eeprom_microwire;
- nvm->delay_usec = 50;
- nvm->opcode_bits = 3;
+ nvm->type = e1000_nvm_eeprom_microwire;
+ nvm->delay_usec = 50;
+ nvm->opcode_bits = 3;
switch (nvm->override) {
case e1000_nvm_override_microwire_large:
- nvm->address_bits = 8;
- nvm->word_size = 256;
+ nvm->address_bits = 8;
+ nvm->word_size = 256;
break;
case e1000_nvm_override_microwire_small:
- nvm->address_bits = 6;
- nvm->word_size = 64;
+ nvm->address_bits = 6;
+ nvm->word_size = 64;
break;
default:
- nvm->address_bits = eecd & E1000_EECD_SIZE ? 8 : 6;
- nvm->word_size = eecd & E1000_EECD_SIZE ? 256 : 64;
+ nvm->address_bits = eecd & E1000_EECD_SIZE ? 8 : 6;
+ nvm->word_size = eecd & E1000_EECD_SIZE ? 256 : 64;
break;
}
/* Function Pointers */
- nvm->ops.acquire = e1000_acquire_nvm_generic;
- nvm->ops.read = e1000_read_nvm_microwire;
- nvm->ops.release = e1000_release_nvm_generic;
- nvm->ops.update = e1000_update_nvm_checksum_generic;
- nvm->ops.valid_led_default = e1000_valid_led_default_generic;
- nvm->ops.validate = e1000_validate_nvm_checksum_generic;
- nvm->ops.write = e1000_write_nvm_microwire;
+ nvm->ops.acquire = e1000_acquire_nvm_generic;
+ nvm->ops.read = e1000_read_nvm_microwire;
+ nvm->ops.release = e1000_release_nvm_generic;
+ nvm->ops.update = e1000_update_nvm_checksum_generic;
+ nvm->ops.valid_led_default = e1000_valid_led_default_generic;
+ nvm->ops.validate = e1000_validate_nvm_checksum_generic;
+ nvm->ops.write = e1000_write_nvm_microwire;
return E1000_SUCCESS;
}
@@ -198,9 +198,9 @@ static s32 e1000_init_mac_params_82540(struct e1000_hw *hw)
mac->ops.setup_link = e1000_setup_link_generic;
/* physical interface setup */
mac->ops.setup_physical_interface =
- (hw->phy.media_type == e1000_media_type_copper)
- ? e1000_setup_copper_link_82540
- : e1000_setup_fiber_serdes_link_82540;
+ (hw->phy.media_type == e1000_media_type_copper)
+ ? e1000_setup_copper_link_82540
+ : e1000_setup_fiber_serdes_link_82540;
/* check for link */
switch (hw->phy.media_type) {
case e1000_media_type_copper:
@@ -219,9 +219,9 @@ static s32 e1000_init_mac_params_82540(struct e1000_hw *hw)
}
/* link info */
mac->ops.get_link_up_info =
- (hw->phy.media_type == e1000_media_type_copper)
- ? e1000_get_speed_and_duplex_copper_generic
- : e1000_get_speed_and_duplex_fiber_serdes_generic;
+ (hw->phy.media_type == e1000_media_type_copper)
+ ? e1000_get_speed_and_duplex_copper_generic
+ : e1000_get_speed_and_duplex_fiber_serdes_generic;
/* multicast address update */
mac->ops.update_mc_addr_list = e1000_update_mc_addr_list_generic;
/* writing VFTA */
@@ -374,7 +374,7 @@ static s32 e1000_init_hw_82540(struct e1000_hw *hw)
txdctl = E1000_READ_REG(hw, E1000_TXDCTL(0));
txdctl = (txdctl & ~E1000_TXDCTL_WTHRESH) |
- E1000_TXDCTL_FULL_TX_DESC_WB;
+ E1000_TXDCTL_FULL_TX_DESC_WB;
E1000_WRITE_REG(hw, E1000_TXDCTL(0), txdctl);
/*
@@ -427,11 +427,13 @@ static s32 e1000_setup_copper_link_82540(struct e1000_hw *hw)
if (hw->mac.type == e1000_82545_rev_3 ||
hw->mac.type == e1000_82546_rev_3) {
- ret_val = hw->phy.ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL, &data);
+ ret_val = hw->phy.ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL,
+ &data);
if (ret_val)
goto out;
data |= 0x00000008;
- ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL, data);
+ ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL,
+ data);
if (ret_val)
goto out;
}
@@ -508,9 +510,8 @@ static s32 e1000_adjust_serdes_amplitude_82540(struct e1000_hw *hw)
if (nvm_data != NVM_RESERVED_WORD) {
/* Adjust serdes output amplitude only. */
nvm_data &= NVM_SERDES_AMPLITUDE_MASK;
- ret_val = hw->phy.ops.write_reg(hw,
- M88E1000_PHY_EXT_CTRL,
- nvm_data);
+ ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_EXT_CTRL,
+ nvm_data);
if (ret_val)
goto out;
}
@@ -535,9 +536,8 @@ static s32 e1000_set_vco_speed_82540(struct e1000_hw *hw)
/* Set PHY register 30, page 5, bit 8 to 0 */
- ret_val = hw->phy.ops.read_reg(hw,
- M88E1000_PHY_PAGE_SELECT,
- &default_page);
+ ret_val = hw->phy.ops.read_reg(hw, M88E1000_PHY_PAGE_SELECT,
+ &default_page);
if (ret_val)
goto out;
@@ -570,7 +570,7 @@ static s32 e1000_set_vco_speed_82540(struct e1000_hw *hw)
goto out;
ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_PAGE_SELECT,
- default_page);
+ default_page);
out:
return ret_val;
@@ -587,7 +587,6 @@ out:
**/
static s32 e1000_set_phy_mode_82540(struct e1000_hw *hw)
{
- struct e1000_phy_info *phy = &hw->phy;
s32 ret_val = E1000_SUCCESS;
u16 nvm_data;
@@ -604,20 +603,18 @@ static s32 e1000_set_phy_mode_82540(struct e1000_hw *hw)
if ((nvm_data != NVM_RESERVED_WORD) && (nvm_data & NVM_PHY_CLASS_A)) {
ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_PAGE_SELECT,
- 0x000B);
+ 0x000B);
if (ret_val) {
ret_val = -E1000_ERR_PHY;
goto out;
}
- ret_val = hw->phy.ops.write_reg(hw,
- M88E1000_PHY_GEN_CONTROL,
- 0x8104);
+ ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_GEN_CONTROL,
+ 0x8104);
if (ret_val) {
ret_val = -E1000_ERR_PHY;
goto out;
}
- phy->reset_disable = FALSE;
}
out:
diff --git a/sys/dev/e1000/e1000_82541.c b/sys/dev/e1000/e1000_82541.c
index 7c9605b..d13611e 100644
--- a/sys/dev/e1000/e1000_82541.c
+++ b/sys/dev/e1000/e1000_82541.c
@@ -1,6 +1,6 @@
/******************************************************************************
- Copyright (c) 2001-2010, Intel Corporation
+ Copyright (c) 2001-2011, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -300,7 +300,7 @@ void e1000_init_function_pointers_82541(struct e1000_hw *hw)
**/
static s32 e1000_reset_hw_82541(struct e1000_hw *hw)
{
- u32 ledctl, ctrl, manc;
+ u32 ledctl, ctrl, icr, manc;
DEBUGFUNC("e1000_reset_hw_82541");
@@ -364,7 +364,7 @@ static s32 e1000_reset_hw_82541(struct e1000_hw *hw)
E1000_WRITE_REG(hw, E1000_IMC, 0xFFFFFFFF);
/* Clear any pending interrupt events. */
- E1000_READ_REG(hw, E1000_ICR);
+ icr = E1000_READ_REG(hw, E1000_ICR);
return E1000_SUCCESS;
}
@@ -390,7 +390,7 @@ static s32 e1000_init_hw_82541(struct e1000_hw *hw)
DEBUGOUT("Error initializing identification LED\n");
/* This is not fatal and we should not stop init due to this */
}
-
+
/* Storing the Speed Power Down value for later use */
ret_val = hw->phy.ops.read_reg(hw,
IGP01E1000_GMII_FIFO,
@@ -549,8 +549,6 @@ static s32 e1000_setup_copper_link_82541(struct e1000_hw *hw)
ctrl &= ~(E1000_CTRL_FRCSPD | E1000_CTRL_FRCDPX);
E1000_WRITE_REG(hw, E1000_CTRL, ctrl);
- hw->phy.reset_disable = FALSE;
-
/* Earlier revs of the IGP phy require us to force MDI. */
if (hw->mac.type == e1000_82541 || hw->mac.type == e1000_82547) {
dev_spec->dsp_config = e1000_dsp_config_disabled;
diff --git a/sys/dev/e1000/e1000_82543.c b/sys/dev/e1000/e1000_82543.c
index 2cf6029..1507da5 100644
--- a/sys/dev/e1000/e1000_82543.c
+++ b/sys/dev/e1000/e1000_82543.c
@@ -1,6 +1,6 @@
/******************************************************************************
- Copyright (c) 2001-2010, Intel Corporation
+ Copyright (c) 2001-2011, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -901,7 +901,7 @@ static s32 e1000_phy_hw_reset_82543(struct e1000_hw *hw)
**/
static s32 e1000_reset_hw_82543(struct e1000_hw *hw)
{
- u32 ctrl;
+ u32 ctrl, icr;
s32 ret_val = E1000_SUCCESS;
DEBUGFUNC("e1000_reset_hw_82543");
@@ -943,7 +943,7 @@ static s32 e1000_reset_hw_82543(struct e1000_hw *hw)
/* Masking off and clearing any pending interrupts */
E1000_WRITE_REG(hw, E1000_IMC, 0xffffffff);
- E1000_READ_REG(hw, E1000_ICR);
+ icr = E1000_READ_REG(hw, E1000_ICR);
return ret_val;
}
@@ -1079,7 +1079,6 @@ static s32 e1000_setup_copper_link_82543(struct e1000_hw *hw)
ret_val = hw->phy.ops.reset(hw);
if (ret_val)
goto out;
- hw->phy.reset_disable = FALSE;
} else {
ctrl &= ~(E1000_CTRL_FRCSPD | E1000_CTRL_FRCDPX);
E1000_WRITE_REG(hw, E1000_CTRL, ctrl);
diff --git a/sys/dev/e1000/e1000_82571.c b/sys/dev/e1000/e1000_82571.c
index 5d5cbaa..a2982b9 100644
--- a/sys/dev/e1000/e1000_82571.c
+++ b/sys/dev/e1000/e1000_82571.c
@@ -1,6 +1,6 @@
/******************************************************************************
- Copyright (c) 2001-2010, Intel Corporation
+ Copyright (c) 2001-2011, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -57,12 +57,12 @@ static s32 e1000_init_mac_params_82571(struct e1000_hw *hw);
static s32 e1000_acquire_nvm_82571(struct e1000_hw *hw);
static void e1000_release_nvm_82571(struct e1000_hw *hw);
static s32 e1000_write_nvm_82571(struct e1000_hw *hw, u16 offset,
- u16 words, u16 *data);
+ u16 words, u16 *data);
static s32 e1000_update_nvm_checksum_82571(struct e1000_hw *hw);
static s32 e1000_validate_nvm_checksum_82571(struct e1000_hw *hw);
static s32 e1000_get_cfg_done_82571(struct e1000_hw *hw);
static s32 e1000_set_d0_lplu_state_82571(struct e1000_hw *hw,
- bool active);
+ bool active);
static s32 e1000_reset_hw_82571(struct e1000_hw *hw);
static s32 e1000_init_hw_82571(struct e1000_hw *hw);
static void e1000_clear_vfta_82571(struct e1000_hw *hw);
@@ -83,12 +83,12 @@ static void e1000_put_hw_semaphore_82573(struct e1000_hw *hw);
static s32 e1000_get_hw_semaphore_82574(struct e1000_hw *hw);
static void e1000_put_hw_semaphore_82574(struct e1000_hw *hw);
static s32 e1000_set_d0_lplu_state_82574(struct e1000_hw *hw,
- bool active);
+ bool active);
static s32 e1000_set_d3_lplu_state_82574(struct e1000_hw *hw,
- bool active);
+ bool active);
static void e1000_initialize_hw_bits_82571(struct e1000_hw *hw);
static s32 e1000_write_nvm_eewr_82571(struct e1000_hw *hw, u16 offset,
- u16 words, u16 *data);
+ u16 words, u16 *data);
static s32 e1000_read_mac_addr_82571(struct e1000_hw *hw);
static void e1000_power_down_phy_copper_82571(struct e1000_hw *hw);
@@ -108,61 +108,61 @@ static s32 e1000_init_phy_params_82571(struct e1000_hw *hw)
goto out;
}
- phy->addr = 1;
- phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT;
- phy->reset_delay_us = 100;
+ phy->addr = 1;
+ phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT;
+ phy->reset_delay_us = 100;
- phy->ops.check_reset_block = e1000_check_reset_block_generic;
- phy->ops.reset = e1000_phy_hw_reset_generic;
- phy->ops.set_d0_lplu_state = e1000_set_d0_lplu_state_82571;
- phy->ops.set_d3_lplu_state = e1000_set_d3_lplu_state_generic;
- phy->ops.power_up = e1000_power_up_phy_copper;
- phy->ops.power_down = e1000_power_down_phy_copper_82571;
+ phy->ops.check_reset_block = e1000_check_reset_block_generic;
+ phy->ops.reset = e1000_phy_hw_reset_generic;
+ phy->ops.set_d0_lplu_state = e1000_set_d0_lplu_state_82571;
+ phy->ops.set_d3_lplu_state = e1000_set_d3_lplu_state_generic;
+ phy->ops.power_up = e1000_power_up_phy_copper;
+ phy->ops.power_down = e1000_power_down_phy_copper_82571;
switch (hw->mac.type) {
case e1000_82571:
case e1000_82572:
- phy->type = e1000_phy_igp_2;
- phy->ops.get_cfg_done = e1000_get_cfg_done_82571;
- phy->ops.get_info = e1000_get_phy_info_igp;
- phy->ops.check_polarity = e1000_check_polarity_igp;
+ phy->type = e1000_phy_igp_2;
+ phy->ops.get_cfg_done = e1000_get_cfg_done_82571;
+ phy->ops.get_info = e1000_get_phy_info_igp;
+ phy->ops.check_polarity = e1000_check_polarity_igp;
phy->ops.force_speed_duplex = e1000_phy_force_speed_duplex_igp;
- phy->ops.get_cable_length = e1000_get_cable_length_igp_2;
- phy->ops.read_reg = e1000_read_phy_reg_igp;
- phy->ops.write_reg = e1000_write_phy_reg_igp;
- phy->ops.acquire = e1000_get_hw_semaphore_82571;
- phy->ops.release = e1000_put_hw_semaphore_82571;
+ phy->ops.get_cable_length = e1000_get_cable_length_igp_2;
+ phy->ops.read_reg = e1000_read_phy_reg_igp;
+ phy->ops.write_reg = e1000_write_phy_reg_igp;
+ phy->ops.acquire = e1000_get_hw_semaphore_82571;
+ phy->ops.release = e1000_put_hw_semaphore_82571;
break;
case e1000_82573:
- phy->type = e1000_phy_m88;
- phy->ops.get_cfg_done = e1000_get_cfg_done_generic;
- phy->ops.get_info = e1000_get_phy_info_m88;
- phy->ops.check_polarity = e1000_check_polarity_m88;
- phy->ops.commit = e1000_phy_sw_reset_generic;
+ phy->type = e1000_phy_m88;
+ phy->ops.get_cfg_done = e1000_get_cfg_done_generic;
+ phy->ops.get_info = e1000_get_phy_info_m88;
+ phy->ops.check_polarity = e1000_check_polarity_m88;
+ phy->ops.commit = e1000_phy_sw_reset_generic;
phy->ops.force_speed_duplex = e1000_phy_force_speed_duplex_m88;
- phy->ops.get_cable_length = e1000_get_cable_length_m88;
- phy->ops.read_reg = e1000_read_phy_reg_m88;
- phy->ops.write_reg = e1000_write_phy_reg_m88;
- phy->ops.acquire = e1000_get_hw_semaphore_82571;
- phy->ops.release = e1000_put_hw_semaphore_82571;
+ phy->ops.get_cable_length = e1000_get_cable_length_m88;
+ phy->ops.read_reg = e1000_read_phy_reg_m88;
+ phy->ops.write_reg = e1000_write_phy_reg_m88;
+ phy->ops.acquire = e1000_get_hw_semaphore_82571;
+ phy->ops.release = e1000_put_hw_semaphore_82571;
break;
case e1000_82574:
case e1000_82583:
E1000_MUTEX_INIT(&hw->dev_spec._82571.swflag_mutex);
- phy->type = e1000_phy_bm;
- phy->ops.get_cfg_done = e1000_get_cfg_done_generic;
- phy->ops.get_info = e1000_get_phy_info_m88;
- phy->ops.check_polarity = e1000_check_polarity_m88;
- phy->ops.commit = e1000_phy_sw_reset_generic;
+ phy->type = e1000_phy_bm;
+ phy->ops.get_cfg_done = e1000_get_cfg_done_generic;
+ phy->ops.get_info = e1000_get_phy_info_m88;
+ phy->ops.check_polarity = e1000_check_polarity_m88;
+ phy->ops.commit = e1000_phy_sw_reset_generic;
phy->ops.force_speed_duplex = e1000_phy_force_speed_duplex_m88;
- phy->ops.get_cable_length = e1000_get_cable_length_m88;
- phy->ops.read_reg = e1000_read_phy_reg_bm2;
- phy->ops.write_reg = e1000_write_phy_reg_bm2;
- phy->ops.acquire = e1000_get_hw_semaphore_82574;
- phy->ops.release = e1000_put_hw_semaphore_82574;
- phy->ops.set_d0_lplu_state = e1000_set_d0_lplu_state_82574;
- phy->ops.set_d3_lplu_state = e1000_set_d3_lplu_state_82574;
+ phy->ops.get_cable_length = e1000_get_cable_length_m88;
+ phy->ops.read_reg = e1000_read_phy_reg_bm2;
+ phy->ops.write_reg = e1000_write_phy_reg_bm2;
+ phy->ops.acquire = e1000_get_hw_semaphore_82574;
+ phy->ops.release = e1000_put_hw_semaphore_82574;
+ phy->ops.set_d0_lplu_state = e1000_set_d0_lplu_state_82574;
+ phy->ops.set_d3_lplu_state = e1000_set_d3_lplu_state_82574;
break;
default:
ret_val = -E1000_ERR_PHY;
@@ -253,7 +253,7 @@ static s32 e1000_init_nvm_params_82571(struct e1000_hw *hw)
default:
nvm->type = e1000_nvm_eeprom_spi;
size = (u16)((eecd & E1000_EECD_SIZE_EX_MASK) >>
- E1000_EECD_SIZE_EX_SHIFT);
+ E1000_EECD_SIZE_EX_SHIFT);
/*
* Added to a constant, "size" becomes the left-shift value
* for setting word_size.
@@ -263,7 +263,7 @@ static s32 e1000_init_nvm_params_82571(struct e1000_hw *hw)
/* EEPROM access above 16k is unsupported */
if (size > 14)
size = 14;
- nvm->word_size = 1 << size;
+ nvm->word_size = 1 << size;
break;
}
@@ -279,11 +279,11 @@ static s32 e1000_init_nvm_params_82571(struct e1000_hw *hw)
nvm->ops.release = e1000_release_nvm_82571;
break;
}
- nvm->ops.read = e1000_read_nvm_eerd;
- nvm->ops.update = e1000_update_nvm_checksum_82571;
- nvm->ops.validate = e1000_validate_nvm_checksum_82571;
+ nvm->ops.read = e1000_read_nvm_eerd;
+ nvm->ops.update = e1000_update_nvm_checksum_82571;
+ nvm->ops.validate = e1000_validate_nvm_checksum_82571;
nvm->ops.valid_led_default = e1000_valid_led_default_82571;
- nvm->ops.write = e1000_write_nvm_82571;
+ nvm->ops.write = e1000_write_nvm_82571;
return E1000_SUCCESS;
}
@@ -363,8 +363,6 @@ static s32 e1000_init_mac_params_82571(struct e1000_hw *hw)
mac->ops.read_mac_addr = e1000_read_mac_addr_82571;
/* ID LED init */
mac->ops.id_led_init = e1000_id_led_init_generic;
- /* blink LED */
- mac->ops.blink_led = e1000_blink_led_generic;
/* setup LED */
mac->ops.setup_led = e1000_setup_led_generic;
/* cleanup LED */
@@ -380,6 +378,7 @@ static s32 e1000_init_mac_params_82571(struct e1000_hw *hw)
mac->ops.set_lan_id = e1000_set_lan_id_single_port;
mac->ops.check_mng_mode = e1000_check_mng_mode_generic;
mac->ops.led_on = e1000_led_on_generic;
+ mac->ops.blink_led = e1000_blink_led_generic;
/* FWSM register */
mac->has_fwsm = TRUE;
@@ -387,9 +386,8 @@ static s32 e1000_init_mac_params_82571(struct e1000_hw *hw)
* ARC supported; valid only if manageability features are
* enabled.
*/
- mac->arc_subsystem_valid =
- (E1000_READ_REG(hw, E1000_FWSM) & E1000_FWSM_MODE_MASK)
- ? TRUE : FALSE;
+ mac->arc_subsystem_valid = (E1000_READ_REG(hw, E1000_FWSM) &
+ E1000_FWSM_MODE_MASK) ? TRUE : FALSE;
break;
case e1000_82574:
case e1000_82583:
@@ -400,6 +398,7 @@ static s32 e1000_init_mac_params_82571(struct e1000_hw *hw)
default:
mac->ops.check_mng_mode = e1000_check_mng_mode_generic;
mac->ops.led_on = e1000_led_on_generic;
+ mac->ops.blink_led = e1000_blink_led_generic;
/* FWSM register */
mac->has_fwsm = TRUE;
@@ -420,8 +419,8 @@ static s32 e1000_init_mac_params_82571(struct e1000_hw *hw)
if (!(swsm2 & E1000_SWSM2_LOCK)) {
/* Only do this for the first interface on this card */
- E1000_WRITE_REG(hw, E1000_SWSM2,
- swsm2 | E1000_SWSM2_LOCK);
+ E1000_WRITE_REG(hw, E1000_SWSM2, swsm2 |
+ E1000_SWSM2_LOCK);
force_clear_smbi = TRUE;
} else
force_clear_smbi = FALSE;
@@ -746,8 +745,8 @@ static s32 e1000_set_d3_lplu_state_82574(struct e1000_hw *hw, bool active)
if (!active) {
data &= ~E1000_PHY_CTRL_NOND0A_LPLU;
} else if ((hw->phy.autoneg_advertised == E1000_ALL_SPEED_DUPLEX) ||
- (hw->phy.autoneg_advertised == E1000_ALL_NOT_GIG) ||
- (hw->phy.autoneg_advertised == E1000_ALL_10_SPEED)) {
+ (hw->phy.autoneg_advertised == E1000_ALL_NOT_GIG) ||
+ (hw->phy.autoneg_advertised == E1000_ALL_10_SPEED)) {
data |= E1000_PHY_CTRL_NOND0A_LPLU;
}
@@ -816,7 +815,7 @@ static void e1000_release_nvm_82571(struct e1000_hw *hw)
* EEPROM will most likely contain an invalid checksum.
**/
static s32 e1000_write_nvm_82571(struct e1000_hw *hw, u16 offset, u16 words,
- u16 *data)
+ u16 *data)
{
s32 ret_val = E1000_SUCCESS;
@@ -941,7 +940,7 @@ static s32 e1000_validate_nvm_checksum_82571(struct e1000_hw *hw)
* EEPROM will most likely contain an invalid checksum.
**/
static s32 e1000_write_nvm_eewr_82571(struct e1000_hw *hw, u16 offset,
- u16 words, u16 *data)
+ u16 words, u16 *data)
{
struct e1000_nvm_info *nvm = &hw->nvm;
u32 i, eewr = 0;
@@ -1039,22 +1038,22 @@ static s32 e1000_set_d0_lplu_state_82571(struct e1000_hw *hw, bool active)
if (active) {
data |= IGP02E1000_PM_D0_LPLU;
ret_val = phy->ops.write_reg(hw, IGP02E1000_PHY_POWER_MGMT,
- data);
+ data);
if (ret_val)
goto out;
/* When LPLU is enabled, we should disable SmartSpeed */
ret_val = phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_CONFIG,
- &data);
+ &data);
data &= ~IGP01E1000_PSCFR_SMART_SPEED;
ret_val = phy->ops.write_reg(hw, IGP01E1000_PHY_PORT_CONFIG,
- data);
+ data);
if (ret_val)
goto out;
} else {
data &= ~IGP02E1000_PM_D0_LPLU;
ret_val = phy->ops.write_reg(hw, IGP02E1000_PHY_POWER_MGMT,
- data);
+ data);
/*
* LPLU and SmartSpeed are mutually exclusive. LPLU is used
* during Dx states where the power conservation is most
@@ -1063,28 +1062,28 @@ static s32 e1000_set_d0_lplu_state_82571(struct e1000_hw *hw, bool active)
*/
if (phy->smart_speed == e1000_smart_speed_on) {
ret_val = phy->ops.read_reg(hw,
- IGP01E1000_PHY_PORT_CONFIG,
- &data);
+ IGP01E1000_PHY_PORT_CONFIG,
+ &data);
if (ret_val)
goto out;
data |= IGP01E1000_PSCFR_SMART_SPEED;
ret_val = phy->ops.write_reg(hw,
- IGP01E1000_PHY_PORT_CONFIG,
- data);
+ IGP01E1000_PHY_PORT_CONFIG,
+ data);
if (ret_val)
goto out;
} else if (phy->smart_speed == e1000_smart_speed_off) {
ret_val = phy->ops.read_reg(hw,
- IGP01E1000_PHY_PORT_CONFIG,
- &data);
+ IGP01E1000_PHY_PORT_CONFIG,
+ &data);
if (ret_val)
goto out;
data &= ~IGP01E1000_PSCFR_SMART_SPEED;
ret_val = phy->ops.write_reg(hw,
- IGP01E1000_PHY_PORT_CONFIG,
- data);
+ IGP01E1000_PHY_PORT_CONFIG,
+ data);
if (ret_val)
goto out;
}
@@ -1255,8 +1254,7 @@ static s32 e1000_init_hw_82571(struct e1000_hw *hw)
/* Set the transmit descriptor write-back policy */
reg_data = E1000_READ_REG(hw, E1000_TXDCTL(0));
reg_data = (reg_data & ~E1000_TXDCTL_WTHRESH) |
- E1000_TXDCTL_FULL_TX_DESC_WB |
- E1000_TXDCTL_COUNT_DESC;
+ E1000_TXDCTL_FULL_TX_DESC_WB | E1000_TXDCTL_COUNT_DESC;
E1000_WRITE_REG(hw, E1000_TXDCTL(0), reg_data);
/* ...for both queues. */
@@ -1273,8 +1271,8 @@ static s32 e1000_init_hw_82571(struct e1000_hw *hw)
default:
reg_data = E1000_READ_REG(hw, E1000_TXDCTL(1));
reg_data = (reg_data & ~E1000_TXDCTL_WTHRESH) |
- E1000_TXDCTL_FULL_TX_DESC_WB |
- E1000_TXDCTL_COUNT_DESC;
+ E1000_TXDCTL_FULL_TX_DESC_WB |
+ E1000_TXDCTL_COUNT_DESC;
E1000_WRITE_REG(hw, E1000_TXDCTL(1), reg_data);
break;
}
@@ -1320,6 +1318,10 @@ static void e1000_initialize_hw_bits_82571(struct e1000_hw *hw)
case e1000_82572:
reg |= (1 << 23) | (1 << 24) | (1 << 25) | (1 << 26);
break;
+ case e1000_82574:
+ case e1000_82583:
+ reg |= (1 << 26);
+ break;
default:
break;
}
@@ -1527,12 +1529,12 @@ bool e1000_check_phy_82574(struct e1000_hw *hw)
* read the Base1000T status register If both are max then PHY is hung.
*/
ret_val = hw->phy.ops.read_reg(hw, E1000_RECEIVE_ERROR_COUNTER,
- &receive_errors);
+ &receive_errors);
if (ret_val)
goto out;
if (receive_errors == E1000_RECEIVE_ERROR_MAX) {
ret_val = hw->phy.ops.read_reg(hw, E1000_BASE1000T_STATUS,
- &status_1kbt);
+ &status_1kbt);
if (ret_val)
goto out;
if ((status_1kbt & E1000_IDLE_ERROR_COUNT_MASK) ==
@@ -1640,7 +1642,8 @@ static s32 e1000_setup_fiber_serdes_link_82571(struct e1000_hw *hw)
* mode. This prevents drivers from twiddling their thumbs
* if another tool failed to take it out of loopback mode.
*/
- E1000_WRITE_REG(hw, E1000_SCTL, E1000_SCTL_DISABLE_SERDES_LOOPBACK);
+ E1000_WRITE_REG(hw, E1000_SCTL,
+ E1000_SCTL_DISABLE_SERDES_LOOPBACK);
break;
default:
break;
@@ -1664,7 +1667,7 @@ static s32 e1000_setup_fiber_serdes_link_82571(struct e1000_hw *hw)
*
* 1) down
* 2) autoneg_progress
- * 3) autoneg_complete (the link sucessfully autonegotiated)
+ * 3) autoneg_complete (the link successfully autonegotiated)
* 4) forced_up (the link has been forced up, it did not autonegotiate)
*
**/
@@ -1763,7 +1766,7 @@ static s32 e1000_check_for_serdes_link_82571(struct e1000_hw *hw)
break;
}
mac->serdes_link_state =
- e1000_serdes_link_forced_up;
+ e1000_serdes_link_forced_up;
mac->serdes_has_link = TRUE;
DEBUGOUT("AN_PROG -> FORCED_UP\n");
}
@@ -1777,10 +1780,10 @@ static s32 e1000_check_for_serdes_link_82571(struct e1000_hw *hw)
* up.
*/
E1000_WRITE_REG(hw, E1000_TXCW, mac->txcw);
- E1000_WRITE_REG(hw, E1000_CTRL,
- (ctrl & ~E1000_CTRL_SLU));
+ E1000_WRITE_REG(hw, E1000_CTRL, (ctrl &
+ ~E1000_CTRL_SLU));
mac->serdes_link_state =
- e1000_serdes_link_autoneg_progress;
+ e1000_serdes_link_autoneg_progress;
mac->serdes_has_link = FALSE;
DEBUGOUT("DOWN -> AN_PROG\n");
break;
@@ -1804,7 +1807,7 @@ static s32 e1000_check_for_serdes_link_82571(struct e1000_hw *hw)
(rxcw & E1000_RXCW_C))) {
mac->serdes_has_link = FALSE;
mac->serdes_link_state =
- e1000_serdes_link_down;
+ e1000_serdes_link_down;
DEBUGOUT("ANYSTATE -> DOWN\n");
break;
}
@@ -1815,7 +1818,7 @@ static s32 e1000_check_for_serdes_link_82571(struct e1000_hw *hw)
txcw |= E1000_TXCW_ANE;
E1000_WRITE_REG(hw, E1000_TXCW, txcw);
mac->serdes_link_state =
- e1000_serdes_link_autoneg_progress;
+ e1000_serdes_link_autoneg_progress;
mac->serdes_has_link = FALSE;
DEBUGOUT("ANYSTATE -> AN_PROG\n");
}
@@ -1905,7 +1908,7 @@ void e1000_set_laa_state_82571(struct e1000_hw *hw, bool state)
* Eventually the LAA will be in RAR[0] and RAR[14].
*/
e1000_rar_set_generic(hw, hw->mac.addr,
- hw->mac.rar_entry_count - 1);
+ hw->mac.rar_entry_count - 1);
return;
}
diff --git a/sys/dev/e1000/e1000_82575.c b/sys/dev/e1000/e1000_82575.c
index 8407f7c..75fe0a4 100644
--- a/sys/dev/e1000/e1000_82575.c
+++ b/sys/dev/e1000/e1000_82575.c
@@ -1,6 +1,6 @@
/******************************************************************************
- Copyright (c) 2001-2010, Intel Corporation
+ Copyright (c) 2001-2011, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -51,32 +51,34 @@ static void e1000_release_nvm_82575(struct e1000_hw *hw);
static s32 e1000_check_for_link_82575(struct e1000_hw *hw);
static s32 e1000_get_cfg_done_82575(struct e1000_hw *hw);
static s32 e1000_get_link_up_info_82575(struct e1000_hw *hw, u16 *speed,
- u16 *duplex);
+ u16 *duplex);
static s32 e1000_init_hw_82575(struct e1000_hw *hw);
static s32 e1000_phy_hw_reset_sgmii_82575(struct e1000_hw *hw);
static s32 e1000_read_phy_reg_sgmii_82575(struct e1000_hw *hw, u32 offset,
- u16 *data);
+ u16 *data);
static s32 e1000_reset_hw_82575(struct e1000_hw *hw);
static s32 e1000_reset_hw_82580(struct e1000_hw *hw);
static s32 e1000_read_phy_reg_82580(struct e1000_hw *hw,
- u32 offset, u16 *data);
+ u32 offset, u16 *data);
static s32 e1000_write_phy_reg_82580(struct e1000_hw *hw,
- u32 offset, u16 data);
+ u32 offset, u16 data);
static s32 e1000_set_d0_lplu_state_82580(struct e1000_hw *hw,
- bool active);
+ bool active);
static s32 e1000_set_d3_lplu_state_82580(struct e1000_hw *hw,
- bool active);
+ bool active);
static s32 e1000_set_d0_lplu_state_82575(struct e1000_hw *hw,
- bool active);
+ bool active);
static s32 e1000_setup_copper_link_82575(struct e1000_hw *hw);
static s32 e1000_setup_serdes_link_82575(struct e1000_hw *hw);
+static s32 e1000_get_media_type_82575(struct e1000_hw *hw);
+static s32 e1000_set_sfp_media_type_82575(struct e1000_hw *hw);
static s32 e1000_valid_led_default_82575(struct e1000_hw *hw, u16 *data);
static s32 e1000_write_phy_reg_sgmii_82575(struct e1000_hw *hw,
- u32 offset, u16 data);
+ u32 offset, u16 data);
static void e1000_clear_hw_cntrs_82575(struct e1000_hw *hw);
static s32 e1000_acquire_swfw_sync_82575(struct e1000_hw *hw, u16 mask);
static s32 e1000_get_pcs_speed_and_duplex_82575(struct e1000_hw *hw,
- u16 *speed, u16 *duplex);
+ u16 *speed, u16 *duplex);
static s32 e1000_get_phy_id_82575(struct e1000_hw *hw);
static void e1000_release_swfw_sync_82575(struct e1000_hw *hw, u16 mask);
static bool e1000_sgmii_active_82575(struct e1000_hw *hw);
@@ -91,15 +93,28 @@ static s32 e1000_reset_mdicnfg_82580(struct e1000_hw *hw);
static s32 e1000_validate_nvm_checksum_82580(struct e1000_hw *hw);
static s32 e1000_update_nvm_checksum_82580(struct e1000_hw *hw);
static s32 e1000_update_nvm_checksum_with_offset(struct e1000_hw *hw,
- u16 offset);
+ u16 offset);
static s32 e1000_validate_nvm_checksum_with_offset(struct e1000_hw *hw,
- u16 offset);
+ u16 offset);
static s32 e1000_validate_nvm_checksum_i350(struct e1000_hw *hw);
static s32 e1000_update_nvm_checksum_i350(struct e1000_hw *hw);
-
-static const u16 e1000_82580_rxpbs_table[] =
- { 36, 72, 144, 1, 2, 4, 8, 16,
- 35, 70, 140 };
+static void e1000_write_vfta_i350(struct e1000_hw *hw, u32 offset, u32 value);
+static void e1000_clear_vfta_i350(struct e1000_hw *hw);
+
+static void e1000_i2c_start(struct e1000_hw *hw);
+static void e1000_i2c_stop(struct e1000_hw *hw);
+static s32 e1000_clock_in_i2c_byte(struct e1000_hw *hw, u8 *data);
+static s32 e1000_clock_out_i2c_byte(struct e1000_hw *hw, u8 data);
+static s32 e1000_get_i2c_ack(struct e1000_hw *hw);
+static s32 e1000_clock_in_i2c_bit(struct e1000_hw *hw, bool *data);
+static s32 e1000_clock_out_i2c_bit(struct e1000_hw *hw, bool data);
+static void e1000_raise_i2c_clk(struct e1000_hw *hw, u32 *i2cctl);
+static void e1000_lower_i2c_clk(struct e1000_hw *hw, u32 *i2cctl);
+static s32 e1000_set_i2c_data(struct e1000_hw *hw, u32 *i2cctl, bool data);
+static bool e1000_get_i2c_data(u32 *i2cctl);
+
+static const u16 e1000_82580_rxpbs_table[] = {
+ 36, 72, 144, 1, 2, 4, 8, 16, 35, 70, 140 };
#define E1000_82580_RXPBS_TABLE_SIZE \
(sizeof(e1000_82580_rxpbs_table)/sizeof(u16))
@@ -155,22 +170,22 @@ static s32 e1000_init_phy_params_82575(struct e1000_hw *hw)
phy->ops.power_up = e1000_power_up_phy_copper;
phy->ops.power_down = e1000_power_down_phy_copper_82575;
- phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT;
- phy->reset_delay_us = 100;
+ phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT;
+ phy->reset_delay_us = 100;
- phy->ops.acquire = e1000_acquire_phy_82575;
- phy->ops.check_reset_block = e1000_check_reset_block_generic;
- phy->ops.commit = e1000_phy_sw_reset_generic;
- phy->ops.get_cfg_done = e1000_get_cfg_done_82575;
- phy->ops.release = e1000_release_phy_82575;
+ phy->ops.acquire = e1000_acquire_phy_82575;
+ phy->ops.check_reset_block = e1000_check_reset_block_generic;
+ phy->ops.commit = e1000_phy_sw_reset_generic;
+ phy->ops.get_cfg_done = e1000_get_cfg_done_82575;
+ phy->ops.release = e1000_release_phy_82575;
ctrl_ext = E1000_READ_REG(hw, E1000_CTRL_EXT);
if (e1000_sgmii_active_82575(hw)) {
- phy->ops.reset = e1000_phy_hw_reset_sgmii_82575;
+ phy->ops.reset = e1000_phy_hw_reset_sgmii_82575;
ctrl_ext |= E1000_CTRL_I2C_ENA;
} else {
- phy->ops.reset = e1000_phy_hw_reset_generic;
+ phy->ops.reset = e1000_phy_hw_reset_generic;
ctrl_ext &= ~E1000_CTRL_I2C_ENA;
}
@@ -178,14 +193,14 @@ static s32 e1000_init_phy_params_82575(struct e1000_hw *hw)
e1000_reset_mdicnfg_82580(hw);
if (e1000_sgmii_active_82575(hw) && !e1000_sgmii_uses_mdio_82575(hw)) {
- phy->ops.read_reg = e1000_read_phy_reg_sgmii_82575;
- phy->ops.write_reg = e1000_write_phy_reg_sgmii_82575;
+ phy->ops.read_reg = e1000_read_phy_reg_sgmii_82575;
+ phy->ops.write_reg = e1000_write_phy_reg_sgmii_82575;
} else if (hw->mac.type >= e1000_82580) {
- phy->ops.read_reg = e1000_read_phy_reg_82580;
- phy->ops.write_reg = e1000_write_phy_reg_82580;
+ phy->ops.read_reg = e1000_read_phy_reg_82580;
+ phy->ops.write_reg = e1000_write_phy_reg_82580;
} else {
- phy->ops.read_reg = e1000_read_phy_reg_igp;
- phy->ops.write_reg = e1000_write_phy_reg_igp;
+ phy->ops.read_reg = e1000_read_phy_reg_igp;
+ phy->ops.write_reg = e1000_write_phy_reg_igp;
}
/* Set phy->phy_addr and phy->id. */
@@ -197,36 +212,38 @@ static s32 e1000_init_phy_params_82575(struct e1000_hw *hw)
case M88E1112_E_PHY_ID:
case M88E1340M_E_PHY_ID:
case M88E1111_I_PHY_ID:
- phy->type = e1000_phy_m88;
- phy->ops.check_polarity = e1000_check_polarity_m88;
- phy->ops.get_info = e1000_get_phy_info_m88;
+ phy->type = e1000_phy_m88;
+ phy->ops.check_polarity = e1000_check_polarity_m88;
+ phy->ops.get_info = e1000_get_phy_info_m88;
if (phy->id == I347AT4_E_PHY_ID ||
phy->id == M88E1112_E_PHY_ID ||
phy->id == M88E1340M_E_PHY_ID)
- phy->ops.get_cable_length = e1000_get_cable_length_m88_gen2;
+ phy->ops.get_cable_length =
+ e1000_get_cable_length_m88_gen2;
else
phy->ops.get_cable_length = e1000_get_cable_length_m88;
phy->ops.force_speed_duplex = e1000_phy_force_speed_duplex_m88;
break;
case IGP03E1000_E_PHY_ID:
case IGP04E1000_E_PHY_ID:
- phy->type = e1000_phy_igp_3;
- phy->ops.check_polarity = e1000_check_polarity_igp;
- phy->ops.get_info = e1000_get_phy_info_igp;
- phy->ops.get_cable_length = e1000_get_cable_length_igp_2;
+ phy->type = e1000_phy_igp_3;
+ phy->ops.check_polarity = e1000_check_polarity_igp;
+ phy->ops.get_info = e1000_get_phy_info_igp;
+ phy->ops.get_cable_length = e1000_get_cable_length_igp_2;
phy->ops.force_speed_duplex = e1000_phy_force_speed_duplex_igp;
- phy->ops.set_d0_lplu_state = e1000_set_d0_lplu_state_82575;
- phy->ops.set_d3_lplu_state = e1000_set_d3_lplu_state_generic;
+ phy->ops.set_d0_lplu_state = e1000_set_d0_lplu_state_82575;
+ phy->ops.set_d3_lplu_state = e1000_set_d3_lplu_state_generic;
break;
case I82580_I_PHY_ID:
case I350_I_PHY_ID:
- phy->type = e1000_phy_82580;
- phy->ops.check_polarity = e1000_check_polarity_82577;
- phy->ops.force_speed_duplex = e1000_phy_force_speed_duplex_82577;
- phy->ops.get_cable_length = e1000_get_cable_length_82577;
- phy->ops.get_info = e1000_get_phy_info_82577;
- phy->ops.set_d0_lplu_state = e1000_set_d0_lplu_state_82580;
- phy->ops.set_d3_lplu_state = e1000_set_d3_lplu_state_82580;
+ phy->type = e1000_phy_82580;
+ phy->ops.check_polarity = e1000_check_polarity_82577;
+ phy->ops.force_speed_duplex =
+ e1000_phy_force_speed_duplex_82577;
+ phy->ops.get_cable_length = e1000_get_cable_length_82577;
+ phy->ops.get_info = e1000_get_phy_info_82577;
+ phy->ops.set_d0_lplu_state = e1000_set_d0_lplu_state_82580;
+ phy->ops.set_d3_lplu_state = e1000_set_d3_lplu_state_82580;
break;
default:
ret_val = -E1000_ERR_PHY;
@@ -250,27 +267,33 @@ s32 e1000_init_nvm_params_82575(struct e1000_hw *hw)
DEBUGFUNC("e1000_init_nvm_params_82575");
size = (u16)((eecd & E1000_EECD_SIZE_EX_MASK) >>
- E1000_EECD_SIZE_EX_SHIFT);
+ E1000_EECD_SIZE_EX_SHIFT);
/*
* Added to a constant, "size" becomes the left-shift value
* for setting word_size.
*/
size += NVM_WORD_SIZE_BASE_SHIFT;
+ /* Just in case size is out of range, cap it to the largest
+ * EEPROM size supported
+ */
+ if (size > 15)
+ size = 15;
+
nvm->word_size = 1 << size;
- nvm->opcode_bits = 8;
- nvm->delay_usec = 1;
+ nvm->opcode_bits = 8;
+ nvm->delay_usec = 1;
switch (nvm->override) {
case e1000_nvm_override_spi_large:
- nvm->page_size = 32;
+ nvm->page_size = 32;
nvm->address_bits = 16;
break;
case e1000_nvm_override_spi_small:
- nvm->page_size = 8;
+ nvm->page_size = 8;
nvm->address_bits = 8;
break;
default:
- nvm->page_size = eecd & E1000_EECD_ADDR_BITS ? 32 : 8;
+ nvm->page_size = eecd & E1000_EECD_ADDR_BITS ? 32 : 8;
nvm->address_bits = eecd & E1000_EECD_ADDR_BITS ? 16 : 8;
break;
}
@@ -281,17 +304,17 @@ s32 e1000_init_nvm_params_82575(struct e1000_hw *hw)
nvm->page_size = 128;
/* Function Pointers */
- nvm->ops.acquire = e1000_acquire_nvm_82575;
- nvm->ops.release = e1000_release_nvm_82575;
+ nvm->ops.acquire = e1000_acquire_nvm_82575;
+ nvm->ops.release = e1000_release_nvm_82575;
if (nvm->word_size < (1 << 15))
- nvm->ops.read = e1000_read_nvm_eerd;
+ nvm->ops.read = e1000_read_nvm_eerd;
else
- nvm->ops.read = e1000_read_nvm_spi;
+ nvm->ops.read = e1000_read_nvm_spi;
- nvm->ops.write = e1000_write_nvm_spi;
- nvm->ops.validate = e1000_validate_nvm_checksum_generic;
- nvm->ops.update = e1000_update_nvm_checksum_generic;
- nvm->ops.valid_led_default = e1000_valid_led_default_82575;
+ nvm->ops.write = e1000_write_nvm_spi;
+ nvm->ops.validate = e1000_validate_nvm_checksum_generic;
+ nvm->ops.update = e1000_update_nvm_checksum_generic;
+ nvm->ops.valid_led_default = e1000_valid_led_default_82575;
/* override genric family function pointers for specific descendants */
switch (hw->mac.type) {
@@ -318,34 +341,11 @@ static s32 e1000_init_mac_params_82575(struct e1000_hw *hw)
{
struct e1000_mac_info *mac = &hw->mac;
struct e1000_dev_spec_82575 *dev_spec = &hw->dev_spec._82575;
- u32 ctrl_ext = 0;
DEBUGFUNC("e1000_init_mac_params_82575");
- /* Set media type */
- /*
- * The 82575 uses bits 22:23 for link mode. The mode can be changed
- * based on the EEPROM. We cannot rely upon device ID. There
- * is no distinguishable difference between fiber and internal
- * SerDes mode on the 82575. There can be an external PHY attached
- * on the SGMII interface. For this, we'll set sgmii_active to TRUE.
- */
- hw->phy.media_type = e1000_media_type_copper;
- dev_spec->sgmii_active = FALSE;
-
- ctrl_ext = E1000_READ_REG(hw, E1000_CTRL_EXT);
- switch (ctrl_ext & E1000_CTRL_EXT_LINK_MODE_MASK) {
- case E1000_CTRL_EXT_LINK_MODE_SGMII:
- dev_spec->sgmii_active = TRUE;
- break;
- case E1000_CTRL_EXT_LINK_MODE_1000BASE_KX:
- case E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES:
- hw->phy.media_type = e1000_media_type_internal_serdes;
- break;
- default:
- break;
- }
-
+ /* Derives media type */
+ e1000_get_media_type_82575(hw);
/* Set mta register count */
mac->mta_reg_count = 128;
/* Set uta register count */
@@ -368,8 +368,8 @@ static s32 e1000_init_mac_params_82575(struct e1000_hw *hw)
mac->has_fwsm = TRUE;
/* ARC supported; valid only if manageability features are enabled. */
mac->arc_subsystem_valid =
- (E1000_READ_REG(hw, E1000_FWSM) & E1000_FWSM_MODE_MASK)
- ? TRUE : FALSE;
+ (E1000_READ_REG(hw, E1000_FWSM) & E1000_FWSM_MODE_MASK)
+ ? TRUE : FALSE;
/* Function pointers */
@@ -386,9 +386,8 @@ static s32 e1000_init_mac_params_82575(struct e1000_hw *hw)
mac->ops.setup_link = e1000_setup_link_generic;
/* physical interface link setup */
mac->ops.setup_physical_interface =
- (hw->phy.media_type == e1000_media_type_copper)
- ? e1000_setup_copper_link_82575
- : e1000_setup_serdes_link_82575;
+ (hw->phy.media_type == e1000_media_type_copper)
+ ? e1000_setup_copper_link_82575 : e1000_setup_serdes_link_82575;
/* physical interface shutdown */
mac->ops.shutdown_serdes = e1000_shutdown_serdes_link_82575;
/* physical interface power up */
@@ -403,10 +402,17 @@ static s32 e1000_init_mac_params_82575(struct e1000_hw *hw)
mac->ops.config_collision_dist = e1000_config_collision_dist_82575;
/* multicast address update */
mac->ops.update_mc_addr_list = e1000_update_mc_addr_list_generic;
- /* writing VFTA */
- mac->ops.write_vfta = e1000_write_vfta_generic;
- /* clearing VFTA */
- mac->ops.clear_vfta = e1000_clear_vfta_generic;
+ if (hw->mac.type == e1000_i350) {
+ /* writing VFTA */
+ mac->ops.write_vfta = e1000_write_vfta_i350;
+ /* clearing VFTA */
+ mac->ops.clear_vfta = e1000_clear_vfta_i350;
+ } else {
+ /* writing VFTA */
+ mac->ops.write_vfta = e1000_write_vfta_generic;
+ /* clearing VFTA */
+ mac->ops.clear_vfta = e1000_clear_vfta_generic;
+ }
/* ID LED init */
mac->ops.id_led_init = e1000_id_led_init_generic;
/* blink LED */
@@ -499,7 +505,7 @@ static void e1000_release_phy_82575(struct e1000_hw *hw)
* interface and stores the retrieved information in data.
**/
static s32 e1000_read_phy_reg_sgmii_82575(struct e1000_hw *hw, u32 offset,
- u16 *data)
+ u16 *data)
{
s32 ret_val = -E1000_ERR_PARAM;
@@ -532,7 +538,7 @@ out:
* media independent interface.
**/
static s32 e1000_write_phy_reg_sgmii_82575(struct e1000_hw *hw, u32 offset,
- u16 data)
+ u16 data)
{
s32 ret_val = -E1000_ERR_PARAM;
@@ -611,7 +617,7 @@ static s32 e1000_get_phy_id_82575(struct e1000_hw *hw)
/* Power on sgmii phy if it is disabled */
ctrl_ext = E1000_READ_REG(hw, E1000_CTRL_EXT);
E1000_WRITE_REG(hw, E1000_CTRL_EXT,
- ctrl_ext & ~E1000_CTRL_EXT_SDP3_DATA);
+ ctrl_ext & ~E1000_CTRL_EXT_SDP3_DATA);
E1000_WRITE_FLUSH(hw);
msec_delay(300);
@@ -623,8 +629,7 @@ static s32 e1000_get_phy_id_82575(struct e1000_hw *hw)
ret_val = e1000_read_phy_reg_sgmii_82575(hw, PHY_ID1, &phy_id);
if (ret_val == E1000_SUCCESS) {
DEBUGOUT2("Vendor ID 0x%08X read at address %u\n",
- phy_id,
- phy->addr);
+ phy_id, phy->addr);
/*
* At the time of this writing, The M88 part is
* the only supported SGMII PHY product.
@@ -633,7 +638,7 @@ static s32 e1000_get_phy_id_82575(struct e1000_hw *hw)
break;
} else {
DEBUGOUT1("PHY address %u was unreadable\n",
- phy->addr);
+ phy->addr);
}
}
@@ -719,22 +724,22 @@ static s32 e1000_set_d0_lplu_state_82575(struct e1000_hw *hw, bool active)
if (active) {
data |= IGP02E1000_PM_D0_LPLU;
ret_val = phy->ops.write_reg(hw, IGP02E1000_PHY_POWER_MGMT,
- data);
+ data);
if (ret_val)
goto out;
/* When LPLU is enabled, we should disable SmartSpeed */
ret_val = phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_CONFIG,
- &data);
+ &data);
data &= ~IGP01E1000_PSCFR_SMART_SPEED;
ret_val = phy->ops.write_reg(hw, IGP01E1000_PHY_PORT_CONFIG,
- data);
+ data);
if (ret_val)
goto out;
} else {
data &= ~IGP02E1000_PM_D0_LPLU;
ret_val = phy->ops.write_reg(hw, IGP02E1000_PHY_POWER_MGMT,
- data);
+ data);
/*
* LPLU and SmartSpeed are mutually exclusive. LPLU is used
* during Dx states where the power conservation is most
@@ -743,28 +748,28 @@ static s32 e1000_set_d0_lplu_state_82575(struct e1000_hw *hw, bool active)
*/
if (phy->smart_speed == e1000_smart_speed_on) {
ret_val = phy->ops.read_reg(hw,
- IGP01E1000_PHY_PORT_CONFIG,
- &data);
+ IGP01E1000_PHY_PORT_CONFIG,
+ &data);
if (ret_val)
goto out;
data |= IGP01E1000_PSCFR_SMART_SPEED;
ret_val = phy->ops.write_reg(hw,
- IGP01E1000_PHY_PORT_CONFIG,
- data);
+ IGP01E1000_PHY_PORT_CONFIG,
+ data);
if (ret_val)
goto out;
} else if (phy->smart_speed == e1000_smart_speed_off) {
ret_val = phy->ops.read_reg(hw,
- IGP01E1000_PHY_PORT_CONFIG,
- &data);
+ IGP01E1000_PHY_PORT_CONFIG,
+ &data);
if (ret_val)
goto out;
data &= ~IGP01E1000_PSCFR_SMART_SPEED;
ret_val = phy->ops.write_reg(hw,
- IGP01E1000_PHY_PORT_CONFIG,
- data);
+ IGP01E1000_PHY_PORT_CONFIG,
+ data);
if (ret_val)
goto out;
}
@@ -811,11 +816,10 @@ static s32 e1000_set_d0_lplu_state_82580(struct e1000_hw *hw, bool active)
* important. During driver activity we should enable
* SmartSpeed, so performance is maintained.
*/
- if (phy->smart_speed == e1000_smart_speed_on) {
+ if (phy->smart_speed == e1000_smart_speed_on)
data |= E1000_82580_PM_SPD;
- } else if (phy->smart_speed == e1000_smart_speed_off) {
+ else if (phy->smart_speed == e1000_smart_speed_off)
data &= ~E1000_82580_PM_SPD;
- }
}
E1000_WRITE_REG(hw, E1000_82580_PHY_POWER_MGMT, data);
@@ -854,14 +858,13 @@ s32 e1000_set_d3_lplu_state_82580(struct e1000_hw *hw, bool active)
* important. During driver activity we should enable
* SmartSpeed, so performance is maintained.
*/
- if (phy->smart_speed == e1000_smart_speed_on) {
+ if (phy->smart_speed == e1000_smart_speed_on)
data |= E1000_82580_PM_SPD;
- } else if (phy->smart_speed == e1000_smart_speed_off) {
+ else if (phy->smart_speed == e1000_smart_speed_off)
data &= ~E1000_82580_PM_SPD;
- }
} else if ((phy->autoneg_advertised == E1000_ALL_SPEED_DUPLEX) ||
- (phy->autoneg_advertised == E1000_ALL_NOT_GIG) ||
- (phy->autoneg_advertised == E1000_ALL_10_SPEED)) {
+ (phy->autoneg_advertised == E1000_ALL_NOT_GIG) ||
+ (phy->autoneg_advertised == E1000_ALL_10_SPEED)) {
data |= E1000_82580_PM_D3_LPLU;
/* When LPLU is enabled, we should disable SmartSpeed */
data &= ~E1000_82580_PM_SPD;
@@ -889,7 +892,37 @@ static s32 e1000_acquire_nvm_82575(struct e1000_hw *hw)
ret_val = e1000_acquire_swfw_sync_82575(hw, E1000_SWFW_EEP_SM);
if (ret_val)
goto out;
- ret_val = e1000_acquire_nvm_generic(hw);
+
+ /*
+ * Check if there is some access
+ * error this access may hook on
+ */
+ if (hw->mac.type == e1000_i350) {
+ u32 eecd = E1000_READ_REG(hw, E1000_EECD);
+ if (eecd & (E1000_EECD_BLOCKED | E1000_EECD_ABORT |
+ E1000_EECD_TIMEOUT)) {
+ /* Clear all access error flags */
+ E1000_WRITE_REG(hw, E1000_EECD, eecd |
+ E1000_EECD_ERROR_CLR);
+ DEBUGOUT("Nvm bit banging access error detected and cleared.\n");
+ }
+ }
+ if (hw->mac.type == e1000_82580) {
+ u32 eecd = E1000_READ_REG(hw, E1000_EECD);
+ if (eecd & E1000_EECD_BLOCKED) {
+ /* Clear access error flag */
+ E1000_WRITE_REG(hw, E1000_EECD, eecd |
+ E1000_EECD_BLOCKED);
+ DEBUGOUT("Nvm bit banging access error detected and cleared.\n");
+ }
+ }
+
+
+ switch (hw->mac.type) {
+ default:
+ ret_val = e1000_acquire_nvm_generic(hw);
+ }
+
if (ret_val)
e1000_release_swfw_sync_82575(hw, E1000_SWFW_EEP_SM);
@@ -908,6 +941,10 @@ static void e1000_release_nvm_82575(struct e1000_hw *hw)
{
DEBUGFUNC("e1000_release_nvm_82575");
+ switch (hw->mac.type) {
+ default:
+ e1000_release_nvm_generic(hw);
+ }
e1000_release_swfw_sync_82575(hw, E1000_SWFW_EEP_SM);
}
@@ -977,8 +1014,8 @@ static void e1000_release_swfw_sync_82575(struct e1000_hw *hw, u16 mask)
DEBUGFUNC("e1000_release_swfw_sync_82575");
- while (e1000_get_hw_semaphore_generic(hw) != E1000_SUCCESS);
- /* Empty */
+ while (e1000_get_hw_semaphore_generic(hw) != E1000_SUCCESS)
+ ; /* Empty */
swfw_sync = E1000_READ_REG(hw, E1000_SW_FW_SYNC);
swfw_sync &= ~mask;
@@ -1039,7 +1076,7 @@ static s32 e1000_get_cfg_done_82575(struct e1000_hw *hw)
* Otherwise, use the generic function to get the link speed and duplex info.
**/
static s32 e1000_get_link_up_info_82575(struct e1000_hw *hw, u16 *speed,
- u16 *duplex)
+ u16 *duplex)
{
s32 ret_val;
@@ -1047,10 +1084,10 @@ static s32 e1000_get_link_up_info_82575(struct e1000_hw *hw, u16 *speed,
if (hw->phy.media_type != e1000_media_type_copper)
ret_val = e1000_get_pcs_speed_and_duplex_82575(hw, speed,
- duplex);
+ duplex);
else
ret_val = e1000_get_speed_and_duplex_copper_generic(hw, speed,
- duplex);
+ duplex);
return ret_val;
}
@@ -1071,7 +1108,7 @@ static s32 e1000_check_for_link_82575(struct e1000_hw *hw)
if (hw->phy.media_type != e1000_media_type_copper) {
ret_val = e1000_get_pcs_speed_and_duplex_82575(hw, &speed,
- &duplex);
+ &duplex);
/*
* Use this flag to determine if link needs to be checked or
* not. If we have link clear the flag so that we do not
@@ -1124,7 +1161,7 @@ static void e1000_power_up_serdes_link_82575(struct e1000_hw *hw)
* duplex, then store the values in the pointers provided.
**/
static s32 e1000_get_pcs_speed_and_duplex_82575(struct e1000_hw *hw,
- u16 *speed, u16 *duplex)
+ u16 *speed, u16 *duplex)
{
struct e1000_mac_info *mac = &hw->mac;
u32 pcs;
@@ -1152,20 +1189,18 @@ static s32 e1000_get_pcs_speed_and_duplex_82575(struct e1000_hw *hw,
mac->serdes_has_link = TRUE;
/* Detect and store PCS speed */
- if (pcs & E1000_PCS_LSTS_SPEED_1000) {
+ if (pcs & E1000_PCS_LSTS_SPEED_1000)
*speed = SPEED_1000;
- } else if (pcs & E1000_PCS_LSTS_SPEED_100) {
+ else if (pcs & E1000_PCS_LSTS_SPEED_100)
*speed = SPEED_100;
- } else {
+ else
*speed = SPEED_10;
- }
/* Detect and store PCS duplex */
- if (pcs & E1000_PCS_LSTS_DUPLEX_FULL) {
+ if (pcs & E1000_PCS_LSTS_DUPLEX_FULL)
*duplex = FULL_DUPLEX;
- } else {
+ else
*duplex = HALF_DUPLEX;
- }
}
return E1000_SUCCESS;
@@ -1225,15 +1260,13 @@ static s32 e1000_reset_hw_82575(struct e1000_hw *hw)
* on the last TLP read/write transaction when MAC is reset.
*/
ret_val = e1000_disable_pcie_master_generic(hw);
- if (ret_val) {
+ if (ret_val)
DEBUGOUT("PCI-E Master disable polling has failed.\n");
- }
/* set the completion timeout for interface */
ret_val = e1000_set_pcie_completion_timeout(hw);
- if (ret_val) {
+ if (ret_val)
DEBUGOUT("PCI-E Set completion timeout has failed.\n");
- }
DEBUGOUT("Masking off all interrupts\n");
E1000_WRITE_REG(hw, E1000_IMC, 0xffffffff);
@@ -1314,6 +1347,9 @@ static s32 e1000_init_hw_82575(struct e1000_hw *hw)
/* Setup link and flow control */
ret_val = mac->ops.setup_link(hw);
+ /* Set the default MTU size */
+ hw->dev_spec._82575.mtu = 1500;
+
/*
* Clear all of the statistics registers (clear on read). It is
* important that we do this after we have tried to establish link
@@ -1349,7 +1385,7 @@ static s32 e1000_setup_copper_link_82575(struct e1000_hw *hw)
if (ret_val)
goto out;
- if (e1000_sgmii_active_82575(hw) && !hw->phy.reset_disable) {
+ if (e1000_sgmii_active_82575(hw)) {
/* allow time for SFP cage time to power up phy */
msec_delay(300);
@@ -1400,12 +1436,14 @@ static s32 e1000_setup_serdes_link_82575(struct e1000_hw *hw)
{
u32 ctrl_ext, ctrl_reg, reg;
bool pcs_autoneg;
+ s32 ret_val = E1000_SUCCESS;
+ u16 data;
DEBUGFUNC("e1000_setup_serdes_link_82575");
if ((hw->phy.media_type != e1000_media_type_internal_serdes) &&
!e1000_sgmii_active_82575(hw))
- return E1000_SUCCESS;
+ return ret_val;
/*
* On the 82575, SerDes loopback mode persists until it is
@@ -1444,13 +1482,25 @@ static s32 e1000_setup_serdes_link_82575(struct e1000_hw *hw)
pcs_autoneg = FALSE;
/* fall through to default case */
default:
+ if (hw->mac.type == e1000_82575 ||
+ hw->mac.type == e1000_82576) {
+ ret_val = hw->nvm.ops.read(hw, NVM_COMPAT, 1, &data);
+ if (ret_val) {
+ DEBUGOUT("NVM Read Error\n");
+ return ret_val;
+ }
+
+ if (data & E1000_EEPROM_PCS_AUTONEG_DISABLE_BIT)
+ pcs_autoneg = FALSE;
+ }
+
/*
* non-SGMII modes only supports a speed of 1000/Full for the
* link so it is best to just force the MAC and let the pcs
* link either autoneg or be forced to 1000/Full
*/
ctrl_reg |= E1000_CTRL_SPD_1000 | E1000_CTRL_FRCSPD |
- E1000_CTRL_FD | E1000_CTRL_FRCDPX;
+ E1000_CTRL_FD | E1000_CTRL_FRCDPX;
/* set speed of 1000/Full if speed/duplex is forced */
reg |= E1000_PCS_LCTL_FSV_1000 | E1000_PCS_LCTL_FDV_FULL;
@@ -1466,7 +1516,7 @@ static s32 e1000_setup_serdes_link_82575(struct e1000_hw *hw)
* However, both are supported by the hardware and some drivers/tools.
*/
reg &= ~(E1000_PCS_LCTL_AN_ENABLE | E1000_PCS_LCTL_FLV_LINK_UP |
- E1000_PCS_LCTL_FSD | E1000_PCS_LCTL_FORCE_LINK);
+ E1000_PCS_LCTL_FSD | E1000_PCS_LCTL_FORCE_LINK);
/*
* We force flow control to prevent the CTRL register values from being
@@ -1481,7 +1531,7 @@ static s32 e1000_setup_serdes_link_82575(struct e1000_hw *hw)
DEBUGOUT1("Configuring Autoneg:PCS_LCTL=0x%08X\n", reg);
} else {
/* Set PCS register for forced link */
- reg |= E1000_PCS_LCTL_FSD; /* Force Speed */
+ reg |= E1000_PCS_LCTL_FSD; /* Force Speed */
DEBUGOUT1("Configuring Forced Link:PCS_LCTL=0x%08X\n", reg);
}
@@ -1490,7 +1540,216 @@ static s32 e1000_setup_serdes_link_82575(struct e1000_hw *hw)
if (!e1000_sgmii_active_82575(hw))
e1000_force_mac_fc_generic(hw);
- return E1000_SUCCESS;
+ return ret_val;
+}
+
+/**
+ * e1000_get_media_type_82575 - derives current media type.
+ * @hw: pointer to the HW structure
+ *
+ * The media type is chosen reflecting few settings.
+ * The following are taken into account:
+ * - link mode set in the current port Init Control Word #3
+ * - current link mode settings in CSR register
+ * - MDIO vs. I2C PHY control interface chosen
+ * - SFP module media type
+ **/
+static s32 e1000_get_media_type_82575(struct e1000_hw *hw)
+{
+ u32 lan_id = 0;
+ s32 ret_val = E1000_ERR_CONFIG;
+ struct e1000_dev_spec_82575 *dev_spec = &hw->dev_spec._82575;
+ u32 ctrl_ext = 0;
+ u32 current_link_mode = 0;
+ u16 init_ctrl_wd_3 = 0;
+ u8 init_ctrl_wd_3_offset = 0;
+ u8 init_ctrl_wd_3_bit_offset = 0;
+
+ /* Set internal phy as default */
+ dev_spec->sgmii_active = FALSE;
+ dev_spec->module_plugged = FALSE;
+
+ /*
+ * Check if NVM access method is attached already.
+ * If it is then Init Control Word #3 is considered
+ * otherwise runtime CSR register content is taken.
+ */
+
+ /* Get CSR setting */
+ ctrl_ext = E1000_READ_REG(hw, E1000_CTRL_EXT);
+
+ /* Get link mode setting */
+ if ((hw->nvm.ops.read) && (hw->nvm.ops.read != e1000_null_read_nvm)) {
+ /* Take link mode from EEPROM */
+
+ /*
+ * Get LAN port ID to derive its
+ * adequate Init Control Word #3
+ */
+ lan_id = ((E1000_READ_REG(hw, E1000_STATUS) &
+ E1000_STATUS_LAN_ID_MASK) >> E1000_STATUS_LAN_ID_OFFSET);
+ /*
+ * Derive Init Control Word #3 offset
+ * and mask to pick up link mode setting.
+ */
+ if (hw->mac.type < e1000_82580) {
+ init_ctrl_wd_3_offset = lan_id ?
+ NVM_INIT_CONTROL3_PORT_A : NVM_INIT_CONTROL3_PORT_B;
+ init_ctrl_wd_3_bit_offset = NVM_WORD24_LNK_MODE_OFFSET;
+ } else {
+ init_ctrl_wd_3_offset =
+ NVM_82580_LAN_FUNC_OFFSET(lan_id) +
+ NVM_INIT_CONTROL3_PORT_A;
+ init_ctrl_wd_3_bit_offset =
+ NVM_WORD24_82580_LNK_MODE_OFFSET;
+ }
+ /* Read Init Control Word #3*/
+ hw->nvm.ops.read(hw, init_ctrl_wd_3_offset, 1, &init_ctrl_wd_3);
+ current_link_mode = init_ctrl_wd_3;
+ /*
+ * Switch to CSR for all but internal PHY.
+ */
+ if ((init_ctrl_wd_3 << (E1000_CTRL_EXT_LINK_MODE_OFFSET -
+ init_ctrl_wd_3_bit_offset)) !=
+ E1000_CTRL_EXT_LINK_MODE_GMII) {
+ current_link_mode = ctrl_ext;
+ init_ctrl_wd_3_bit_offset =
+ E1000_CTRL_EXT_LINK_MODE_OFFSET;
+ }
+ } else {
+ /* Take link mode from CSR */
+ current_link_mode = ctrl_ext;
+ init_ctrl_wd_3_bit_offset = E1000_CTRL_EXT_LINK_MODE_OFFSET;
+ }
+
+ /*
+ * Align link mode bits to
+ * their CTRL_EXT location.
+ */
+ current_link_mode <<= (E1000_CTRL_EXT_LINK_MODE_OFFSET -
+ init_ctrl_wd_3_bit_offset);
+ current_link_mode &= E1000_CTRL_EXT_LINK_MODE_MASK;
+
+ switch (current_link_mode) {
+
+ case E1000_CTRL_EXT_LINK_MODE_1000BASE_KX:
+ hw->phy.media_type = e1000_media_type_internal_serdes;
+ current_link_mode = E1000_CTRL_EXT_LINK_MODE_1000BASE_KX;
+ break;
+ case E1000_CTRL_EXT_LINK_MODE_GMII:
+ hw->phy.media_type = e1000_media_type_copper;
+ current_link_mode = E1000_CTRL_EXT_LINK_MODE_GMII;
+ break;
+ case E1000_CTRL_EXT_LINK_MODE_SGMII:
+ case E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES:
+ /* Get phy control interface type set (MDIO vs. I2C)*/
+ if (e1000_sgmii_uses_mdio_82575(hw)) {
+ hw->phy.media_type = e1000_media_type_copper;
+ dev_spec->sgmii_active = TRUE;
+ current_link_mode = E1000_CTRL_EXT_LINK_MODE_SGMII;
+ } else {
+ ret_val = e1000_set_sfp_media_type_82575(hw);
+ if (ret_val != E1000_SUCCESS)
+ goto out;
+ if (hw->phy.media_type ==
+ e1000_media_type_internal_serdes) {
+ current_link_mode =
+ E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES;
+ } else if (hw->phy.media_type ==
+ e1000_media_type_copper) {
+ current_link_mode =
+ E1000_CTRL_EXT_LINK_MODE_SGMII;
+ }
+ }
+ break;
+ default:
+ DEBUGOUT("Link mode mask doesn't fit bit field size\n");
+ goto out;
+ }
+ /*
+ * Do not change current link mode setting
+ * if media type is fibre or has not been
+ * recognized.
+ */
+ if ((hw->phy.media_type != e1000_media_type_unknown) &&
+ (hw->phy.media_type != e1000_media_type_fiber)) {
+ /* Update link mode */
+ ctrl_ext &= ~E1000_CTRL_EXT_LINK_MODE_MASK;
+ E1000_WRITE_REG(hw, E1000_CTRL_EXT, ctrl_ext |
+ current_link_mode);
+ }
+
+ ret_val = E1000_SUCCESS;
+out:
+ /*
+ * If media type was not identified then return media type
+ * defined by the CTRL_EXT settings.
+ */
+ if (hw->phy.media_type == e1000_media_type_unknown) {
+ if (current_link_mode == E1000_CTRL_EXT_LINK_MODE_SGMII)
+ hw->phy.media_type = e1000_media_type_copper;
+ else
+ hw->phy.media_type = e1000_media_type_internal_serdes;
+ }
+
+ return ret_val;
+}
+
+/**
+ * e1000_set_sfp_media_type_82575 - derives SFP module media type.
+ * @hw: pointer to the HW structure
+ *
+ * The media type is chosen based on SFP module.
+ * compatibility flags retrieved from SFP ID EEPROM.
+ **/
+static s32 e1000_set_sfp_media_type_82575(struct e1000_hw *hw)
+{
+ s32 ret_val = E1000_ERR_CONFIG;
+ u32 ctrl_ext = 0;
+ struct e1000_dev_spec_82575 *dev_spec = &hw->dev_spec._82575;
+ struct sfp_e1000_flags eth_flags = {0};
+ u8 tranceiver_type = 0;
+
+ /* Turn I2C interface ON */
+ ctrl_ext = E1000_READ_REG(hw, E1000_CTRL_EXT);
+ E1000_WRITE_REG(hw, E1000_CTRL_EXT, ctrl_ext | E1000_CTRL_I2C_ENA);
+
+ /* Read SFP module data */
+ ret_val = e1000_read_sfp_data_byte(hw,
+ E1000_I2CCMD_SFP_DATA_ADDR(E1000_SFF_IDENTIFIER_OFFSET),
+ &tranceiver_type);
+ if (ret_val != E1000_SUCCESS)
+ goto out;
+ ret_val = e1000_read_sfp_data_byte(hw,
+ E1000_I2CCMD_SFP_DATA_ADDR(E1000_SFF_ETH_FLAGS_OFFSET),
+ (u8 *)&eth_flags);
+ if (ret_val != E1000_SUCCESS)
+ goto out;
+ /*
+ * Check if there is some SFP
+ * module plugged and powered
+ */
+ if ((tranceiver_type == E1000_SFF_IDENTIFIER_SFP) ||
+ (tranceiver_type == E1000_SFF_IDENTIFIER_SFF)) {
+ dev_spec->module_plugged = TRUE;
+ if (eth_flags.e1000_base_lx || eth_flags.e1000_base_sx) {
+ hw->phy.media_type = e1000_media_type_internal_serdes;
+ } else if (eth_flags.e1000_base_t) {
+ dev_spec->sgmii_active = TRUE;
+ hw->phy.media_type = e1000_media_type_copper;
+ } else {
+ hw->phy.media_type = e1000_media_type_unknown;
+ DEBUGOUT("PHY module has not been recognized\n");
+ goto out;
+ }
+ } else {
+ hw->phy.media_type = e1000_media_type_unknown;
+ }
+ ret_val = E1000_SUCCESS;
+out:
+ /* Restore I2C interface setting */
+ E1000_WRITE_REG(hw, E1000_CTRL_EXT, ctrl_ext);
+ return ret_val;
}
/**
@@ -1514,7 +1773,7 @@ static s32 e1000_valid_led_default_82575(struct e1000_hw *hw, u16 *data)
}
if (*data == ID_LED_RESERVED_0000 || *data == ID_LED_RESERVED_FFFF) {
- switch(hw->phy.media_type) {
+ switch (hw->phy.media_type) {
case e1000_media_type_internal_serdes:
*data = ID_LED_DEFAULT_82575_SERDES;
break;
@@ -1549,7 +1808,7 @@ static bool e1000_sgmii_active_82575(struct e1000_hw *hw)
* Inits recommended HW defaults after a reset when there is no EEPROM
* detected. This is only for the 82575.
**/
-static s32 e1000_reset_init_script_82575(struct e1000_hw* hw)
+static s32 e1000_reset_init_script_82575(struct e1000_hw *hw)
{
DEBUGFUNC("e1000_reset_init_script_82575");
@@ -1736,7 +1995,7 @@ void e1000_rx_fifo_flush_82575(struct e1000_hw *hw)
for (i = 0; i < 4; i++) {
rxdctl[i] = E1000_READ_REG(hw, E1000_RXDCTL(i));
E1000_WRITE_REG(hw, E1000_RXDCTL(i),
- rxdctl[i] & ~E1000_RXDCTL_QUEUE_ENABLE);
+ rxdctl[i] & ~E1000_RXDCTL_QUEUE_ENABLE);
}
/* Poll all queues to verify they have shut down */
for (ms_wait = 0; ms_wait < 10; ms_wait++) {
@@ -1822,14 +2081,14 @@ static s32 e1000_set_pcie_completion_timeout(struct e1000_hw *hw)
* 16ms to 55ms
*/
ret_val = e1000_read_pcie_cap_reg(hw, PCIE_DEVICE_CONTROL2,
- &pcie_devctl2);
+ &pcie_devctl2);
if (ret_val)
goto out;
pcie_devctl2 |= PCIE_DEVICE_CONTROL2_16ms;
ret_val = e1000_write_pcie_cap_reg(hw, PCIE_DEVICE_CONTROL2,
- &pcie_devctl2);
+ &pcie_devctl2);
out:
/* disable completion timeout resend */
gcr &= ~E1000_GCR_CMPL_TMOUT_RESEND;
@@ -1852,20 +2111,35 @@ void e1000_vmdq_set_anti_spoofing_pf(struct e1000_hw *hw, bool enable, int pf)
switch (hw->mac.type) {
case e1000_82576:
- case e1000_i350:
dtxswc = E1000_READ_REG(hw, E1000_DTXSWC);
if (enable) {
dtxswc |= (E1000_DTXSWC_MAC_SPOOF_MASK |
E1000_DTXSWC_VLAN_SPOOF_MASK);
/* The PF can spoof - it has to in order to
* support emulation mode NICs */
- dtxswc ^= (1 << pf | 1 << (pf + MAX_NUM_VFS));
+ dtxswc ^= (1 << pf | 1 << (pf +
+ E1000_DTXSWC_VLAN_SPOOF_SHIFT));
} else {
dtxswc &= ~(E1000_DTXSWC_MAC_SPOOF_MASK |
E1000_DTXSWC_VLAN_SPOOF_MASK);
}
E1000_WRITE_REG(hw, E1000_DTXSWC, dtxswc);
break;
+ case e1000_i350:
+ dtxswc = E1000_READ_REG(hw, E1000_TXSWC);
+ if (enable) {
+ dtxswc |= (E1000_DTXSWC_MAC_SPOOF_MASK |
+ E1000_DTXSWC_VLAN_SPOOF_MASK);
+ /* The PF can spoof - it has to in order to
+ * support emulation mode NICs
+ */
+ dtxswc ^= (1 << pf | 1 << (pf +
+ E1000_DTXSWC_VLAN_SPOOF_SHIFT));
+ } else {
+ dtxswc &= ~(E1000_DTXSWC_MAC_SPOOF_MASK |
+ E1000_DTXSWC_VLAN_SPOOF_MASK);
+ }
+ E1000_WRITE_REG(hw, E1000_TXSWC, dtxswc);
default:
break;
}
@@ -1983,7 +2257,7 @@ out:
* e1000_reset_mdicnfg_82580 - Reset MDICNFG destination and com_mdio bits
* @hw: pointer to the HW structure
*
- * This resets the MDICNFG.Destination and MDICNFG.Com_MDIO bits based on
+ * This resets the the MDICNFG.Destination and MDICNFG.Com_MDIO bits based on
* the values found in the EEPROM. This addresses an issue in which these
* bits are not restored from EEPROM after reset.
**/
@@ -2001,8 +2275,8 @@ static s32 e1000_reset_mdicnfg_82580(struct e1000_hw *hw)
goto out;
ret_val = hw->nvm.ops.read(hw, NVM_INIT_CONTROL3_PORT_A +
- NVM_82580_LAN_FUNC_OFFSET(hw->bus.func), 1,
- &nvm_data);
+ NVM_82580_LAN_FUNC_OFFSET(hw->bus.func), 1,
+ &nvm_data);
if (ret_val) {
DEBUGOUT("NVM Read Error\n");
goto out;
@@ -2057,17 +2331,18 @@ static s32 e1000_reset_hw_82580(struct e1000_hw *hw)
msec_delay(10);
/* Determine whether or not a global dev reset is requested */
- if (global_device_reset &&
- e1000_acquire_swfw_sync_82575(hw, swmbsw_mask))
+ if (global_device_reset && e1000_acquire_swfw_sync_82575(hw,
+ swmbsw_mask))
global_device_reset = FALSE;
- if (global_device_reset &&
- !(E1000_READ_REG(hw, E1000_STATUS) & E1000_STAT_DEV_RST_SET))
+ if (global_device_reset && !(E1000_READ_REG(hw, E1000_STATUS) &
+ E1000_STAT_DEV_RST_SET))
ctrl |= E1000_CTRL_DEV_RST;
else
ctrl |= E1000_CTRL_RST;
E1000_WRITE_REG(hw, E1000_CTRL, ctrl);
+ E1000_WRITE_FLUSH(hw);
/* Add delay to insure DEV_RST has time to complete */
if (global_device_reset)
@@ -2192,7 +2467,7 @@ s32 e1000_update_nvm_checksum_with_offset(struct e1000_hw *hw, u16 offset)
}
checksum = (u16) NVM_SUM - checksum;
ret_val = hw->nvm.ops.write(hw, (NVM_CHECKSUM_REG + offset), 1,
- &checksum);
+ &checksum);
if (ret_val)
DEBUGOUT("NVM Write Error while updating checksum.\n");
@@ -2232,7 +2507,7 @@ static s32 e1000_validate_nvm_checksum_82580(struct e1000_hw *hw)
for (j = 0; j < eeprom_regions_count; j++) {
nvm_offset = NVM_82580_LAN_FUNC_OFFSET(j);
ret_val = e1000_validate_nvm_checksum_with_offset(hw,
- nvm_offset);
+ nvm_offset);
if (ret_val != E1000_SUCCESS)
goto out;
}
@@ -2259,8 +2534,7 @@ static s32 e1000_update_nvm_checksum_82580(struct e1000_hw *hw)
ret_val = hw->nvm.ops.read(hw, NVM_COMPATIBILITY_REG_3, 1, &nvm_data);
if (ret_val) {
- DEBUGOUT("NVM Read Error while updating checksum"
- " compatibility bit.\n");
+ DEBUGOUT("NVM Read Error while updating checksum compatibility bit.\n");
goto out;
}
@@ -2268,10 +2542,9 @@ static s32 e1000_update_nvm_checksum_82580(struct e1000_hw *hw)
/* set compatibility bit to validate checksums appropriately */
nvm_data = nvm_data | NVM_COMPATIBILITY_BIT_MASK;
ret_val = hw->nvm.ops.write(hw, NVM_COMPATIBILITY_REG_3, 1,
- &nvm_data);
+ &nvm_data);
if (ret_val) {
- DEBUGOUT("NVM Write Error while updating checksum"
- " compatibility bit.\n");
+ DEBUGOUT("NVM Write Error while updating checksum compatibility bit.\n");
goto out;
}
}
@@ -2279,9 +2552,8 @@ static s32 e1000_update_nvm_checksum_82580(struct e1000_hw *hw)
for (j = 0; j < 4; j++) {
nvm_offset = NVM_82580_LAN_FUNC_OFFSET(j);
ret_val = e1000_update_nvm_checksum_with_offset(hw, nvm_offset);
- if (ret_val) {
+ if (ret_val)
goto out;
- }
}
out:
@@ -2307,7 +2579,7 @@ static s32 e1000_validate_nvm_checksum_i350(struct e1000_hw *hw)
for (j = 0; j < 4; j++) {
nvm_offset = NVM_82580_LAN_FUNC_OFFSET(j);
ret_val = e1000_validate_nvm_checksum_with_offset(hw,
- nvm_offset);
+ nvm_offset);
if (ret_val != E1000_SUCCESS)
goto out;
}
@@ -2353,37 +2625,628 @@ out:
s32 e1000_set_eee_i350(struct e1000_hw *hw)
{
s32 ret_val = E1000_SUCCESS;
- u32 ipcnfg, eeer, ctrl_ext;
+ u32 ipcnfg, eeer;
DEBUGFUNC("e1000_set_eee_i350");
- ctrl_ext = E1000_READ_REG(hw, E1000_CTRL_EXT);
- if ((hw->mac.type != e1000_i350) ||
- (ctrl_ext & E1000_CTRL_EXT_LINK_MODE_MASK))
+ if ((hw->mac.type < e1000_i350) ||
+ (hw->phy.media_type != e1000_media_type_copper))
goto out;
ipcnfg = E1000_READ_REG(hw, E1000_IPCNFG);
eeer = E1000_READ_REG(hw, E1000_EEER);
/* enable or disable per user setting */
if (!(hw->dev_spec._82575.eee_disable)) {
- ipcnfg |= (E1000_IPCNFG_EEE_1G_AN |
- E1000_IPCNFG_EEE_100M_AN);
- eeer |= (E1000_EEER_TX_LPI_EN |
- E1000_EEER_RX_LPI_EN |
- E1000_EEER_LPI_FC);
+ ipcnfg |= (E1000_IPCNFG_EEE_1G_AN | E1000_IPCNFG_EEE_100M_AN);
+ eeer |= (E1000_EEER_TX_LPI_EN | E1000_EEER_RX_LPI_EN |
+ E1000_EEER_LPI_FC);
} else {
- ipcnfg &= ~(E1000_IPCNFG_EEE_1G_AN |
- E1000_IPCNFG_EEE_100M_AN);
- eeer &= ~(E1000_EEER_TX_LPI_EN |
- E1000_EEER_RX_LPI_EN |
- E1000_EEER_LPI_FC);
+ ipcnfg &= ~(E1000_IPCNFG_EEE_1G_AN | E1000_IPCNFG_EEE_100M_AN);
+ eeer &= ~(E1000_EEER_TX_LPI_EN | E1000_EEER_RX_LPI_EN |
+ E1000_EEER_LPI_FC);
}
E1000_WRITE_REG(hw, E1000_IPCNFG, ipcnfg);
E1000_WRITE_REG(hw, E1000_EEER, eeer);
- E1000_READ_REG(hw, E1000_IPCNFG);
- E1000_READ_REG(hw, E1000_EEER);
+ E1000_READ_REG(hw, E1000_IPCNFG);
+ E1000_READ_REG(hw, E1000_EEER);
out:
return ret_val;
}
+
+/* Due to a hw errata, if the host tries to configure the VFTA register
+ * while performing queries from the BMC or DMA, then the VFTA in some
+ * cases won't be written.
+ */
+
+/**
+ * e1000_clear_vfta_i350 - Clear VLAN filter table
+ * @hw: pointer to the HW structure
+ *
+ * Clears the register array which contains the VLAN filter table by
+ * setting all the values to 0.
+ **/
+void e1000_clear_vfta_i350(struct e1000_hw *hw)
+{
+ u32 offset;
+ int i;
+
+ DEBUGFUNC("e1000_clear_vfta_350");
+
+ for (offset = 0; offset < E1000_VLAN_FILTER_TBL_SIZE; offset++) {
+ for (i = 0; i < 10; i++)
+ E1000_WRITE_REG_ARRAY(hw, E1000_VFTA, offset, 0);
+
+ E1000_WRITE_FLUSH(hw);
+ }
+}
+
+/**
+ * e1000_write_vfta_i350 - Write value to VLAN filter table
+ * @hw: pointer to the HW structure
+ * @offset: register offset in VLAN filter table
+ * @value: register value written to VLAN filter table
+ *
+ * Writes value at the given offset in the register array which stores
+ * the VLAN filter table.
+ **/
+void e1000_write_vfta_i350(struct e1000_hw *hw, u32 offset, u32 value)
+{
+ int i;
+
+ DEBUGFUNC("e1000_write_vfta_350");
+
+ for (i = 0; i < 10; i++)
+ E1000_WRITE_REG_ARRAY(hw, E1000_VFTA, offset, value);
+
+ E1000_WRITE_FLUSH(hw);
+}
+
+
+/**
+ * e1000_set_i2c_bb - Enable I2C bit-bang
+ * @hw: pointer to the HW structure
+ *
+ * Enable I2C bit-bang interface
+ *
+ **/
+s32 e1000_set_i2c_bb(struct e1000_hw *hw)
+{
+ s32 ret_val = E1000_SUCCESS;
+ u32 ctrl_ext, i2cparams;
+
+ DEBUGFUNC("e1000_set_i2c_bb");
+
+ ctrl_ext = E1000_READ_REG(hw, E1000_CTRL_EXT);
+ ctrl_ext |= E1000_CTRL_I2C_ENA;
+ E1000_WRITE_REG(hw, E1000_CTRL_EXT, ctrl_ext);
+ E1000_WRITE_FLUSH(hw);
+
+ i2cparams = E1000_READ_REG(hw, E1000_I2CPARAMS);
+ i2cparams |= E1000_I2CBB_EN;
+ i2cparams |= E1000_I2C_DATA_OE_N;
+ i2cparams |= E1000_I2C_CLK_OE_N;
+ E1000_WRITE_REG(hw, E1000_I2CPARAMS, i2cparams);
+ E1000_WRITE_FLUSH(hw);
+
+ return ret_val;
+}
+
+/**
+ * e1000_read_i2c_byte_generic - Reads 8 bit word over I2C
+ * @hw: pointer to hardware structure
+ * @byte_offset: byte offset to read
+ * @data: value read
+ *
+ * Performs byte read operation over I2C interface at
+ * a specified device address.
+ **/
+s32 e1000_read_i2c_byte_generic(struct e1000_hw *hw, u8 byte_offset,
+ u8 dev_addr, u8 *data)
+{
+ s32 status = E1000_SUCCESS;
+ u32 max_retry = 10;
+ u32 retry = 1;
+ u16 swfw_mask = 0;
+
+ bool nack = 1;
+
+ DEBUGFUNC("e1000_read_i2c_byte_generic");
+
+ swfw_mask = E1000_SWFW_PHY0_SM;
+
+ do {
+ if (e1000_acquire_swfw_sync_82575(hw, swfw_mask)
+ != E1000_SUCCESS) {
+ status = E1000_ERR_SWFW_SYNC;
+ goto read_byte_out;
+ }
+
+ e1000_i2c_start(hw);
+
+ /* Device Address and write indication */
+ status = e1000_clock_out_i2c_byte(hw, dev_addr);
+ if (status != E1000_SUCCESS)
+ goto fail;
+
+ status = e1000_get_i2c_ack(hw);
+ if (status != E1000_SUCCESS)
+ goto fail;
+
+ status = e1000_clock_out_i2c_byte(hw, byte_offset);
+ if (status != E1000_SUCCESS)
+ goto fail;
+
+ status = e1000_get_i2c_ack(hw);
+ if (status != E1000_SUCCESS)
+ goto fail;
+
+ e1000_i2c_start(hw);
+
+ /* Device Address and read indication */
+ status = e1000_clock_out_i2c_byte(hw, (dev_addr | 0x1));
+ if (status != E1000_SUCCESS)
+ goto fail;
+
+ status = e1000_get_i2c_ack(hw);
+ if (status != E1000_SUCCESS)
+ goto fail;
+
+ status = e1000_clock_in_i2c_byte(hw, data);
+ if (status != E1000_SUCCESS)
+ goto fail;
+
+ status = e1000_clock_out_i2c_bit(hw, nack);
+ if (status != E1000_SUCCESS)
+ goto fail;
+
+ e1000_i2c_stop(hw);
+ break;
+
+fail:
+ e1000_release_swfw_sync_82575(hw, swfw_mask);
+ msec_delay(100);
+ e1000_i2c_bus_clear(hw);
+ retry++;
+ if (retry < max_retry)
+ DEBUGOUT("I2C byte read error - Retrying.\n");
+ else
+ DEBUGOUT("I2C byte read error.\n");
+
+ } while (retry < max_retry);
+
+ e1000_release_swfw_sync_82575(hw, swfw_mask);
+
+read_byte_out:
+
+ return status;
+}
+
+/**
+ * e1000_write_i2c_byte_generic - Writes 8 bit word over I2C
+ * @hw: pointer to hardware structure
+ * @byte_offset: byte offset to write
+ * @data: value to write
+ *
+ * Performs byte write operation over I2C interface at
+ * a specified device address.
+ **/
+s32 e1000_write_i2c_byte_generic(struct e1000_hw *hw, u8 byte_offset,
+ u8 dev_addr, u8 data)
+{
+ s32 status = E1000_SUCCESS;
+ u32 max_retry = 1;
+ u32 retry = 0;
+ u16 swfw_mask = 0;
+
+ DEBUGFUNC("e1000_write_i2c_byte_generic");
+
+ swfw_mask = E1000_SWFW_PHY0_SM;
+
+ if (e1000_acquire_swfw_sync_82575(hw, swfw_mask) != E1000_SUCCESS) {
+ status = E1000_ERR_SWFW_SYNC;
+ goto write_byte_out;
+ }
+
+ do {
+ e1000_i2c_start(hw);
+
+ status = e1000_clock_out_i2c_byte(hw, dev_addr);
+ if (status != E1000_SUCCESS)
+ goto fail;
+
+ status = e1000_get_i2c_ack(hw);
+ if (status != E1000_SUCCESS)
+ goto fail;
+
+ status = e1000_clock_out_i2c_byte(hw, byte_offset);
+ if (status != E1000_SUCCESS)
+ goto fail;
+
+ status = e1000_get_i2c_ack(hw);
+ if (status != E1000_SUCCESS)
+ goto fail;
+
+ status = e1000_clock_out_i2c_byte(hw, data);
+ if (status != E1000_SUCCESS)
+ goto fail;
+
+ status = e1000_get_i2c_ack(hw);
+ if (status != E1000_SUCCESS)
+ goto fail;
+
+ e1000_i2c_stop(hw);
+ break;
+
+fail:
+ e1000_i2c_bus_clear(hw);
+ retry++;
+ if (retry < max_retry)
+ DEBUGOUT("I2C byte write error - Retrying.\n");
+ else
+ DEBUGOUT("I2C byte write error.\n");
+ } while (retry < max_retry);
+
+ e1000_release_swfw_sync_82575(hw, swfw_mask);
+
+write_byte_out:
+
+ return status;
+}
+
+/**
+ * e1000_i2c_start - Sets I2C start condition
+ * @hw: pointer to hardware structure
+ *
+ * Sets I2C start condition (High -> Low on SDA while SCL is High)
+ **/
+static void e1000_i2c_start(struct e1000_hw *hw)
+{
+ u32 i2cctl = E1000_READ_REG(hw, E1000_I2CPARAMS);
+
+ DEBUGFUNC("e1000_i2c_start");
+
+ /* Start condition must begin with data and clock high */
+ e1000_set_i2c_data(hw, &i2cctl, 1);
+ e1000_raise_i2c_clk(hw, &i2cctl);
+
+ /* Setup time for start condition (4.7us) */
+ usec_delay(E1000_I2C_T_SU_STA);
+
+ e1000_set_i2c_data(hw, &i2cctl, 0);
+
+ /* Hold time for start condition (4us) */
+ usec_delay(E1000_I2C_T_HD_STA);
+
+ e1000_lower_i2c_clk(hw, &i2cctl);
+
+ /* Minimum low period of clock is 4.7 us */
+ usec_delay(E1000_I2C_T_LOW);
+
+}
+
+/**
+ * e1000_i2c_stop - Sets I2C stop condition
+ * @hw: pointer to hardware structure
+ *
+ * Sets I2C stop condition (Low -> High on SDA while SCL is High)
+ **/
+static void e1000_i2c_stop(struct e1000_hw *hw)
+{
+ u32 i2cctl = E1000_READ_REG(hw, E1000_I2CPARAMS);
+
+ DEBUGFUNC("e1000_i2c_stop");
+
+ /* Stop condition must begin with data low and clock high */
+ e1000_set_i2c_data(hw, &i2cctl, 0);
+ e1000_raise_i2c_clk(hw, &i2cctl);
+
+ /* Setup time for stop condition (4us) */
+ usec_delay(E1000_I2C_T_SU_STO);
+
+ e1000_set_i2c_data(hw, &i2cctl, 1);
+
+ /* bus free time between stop and start (4.7us)*/
+ usec_delay(E1000_I2C_T_BUF);
+}
+
+/**
+ * e1000_clock_in_i2c_byte - Clocks in one byte via I2C
+ * @hw: pointer to hardware structure
+ * @data: data byte to clock in
+ *
+ * Clocks in one byte data via I2C data/clock
+ **/
+static s32 e1000_clock_in_i2c_byte(struct e1000_hw *hw, u8 *data)
+{
+ s32 i;
+ bool bit = 0;
+
+ DEBUGFUNC("e1000_clock_in_i2c_byte");
+
+ *data = 0;
+ for (i = 7; i >= 0; i--) {
+ e1000_clock_in_i2c_bit(hw, &bit);
+ *data |= bit << i;
+ }
+
+ return E1000_SUCCESS;
+}
+
+/**
+ * e1000_clock_out_i2c_byte - Clocks out one byte via I2C
+ * @hw: pointer to hardware structure
+ * @data: data byte clocked out
+ *
+ * Clocks out one byte data via I2C data/clock
+ **/
+static s32 e1000_clock_out_i2c_byte(struct e1000_hw *hw, u8 data)
+{
+ s32 status = E1000_SUCCESS;
+ s32 i;
+ u32 i2cctl;
+ bool bit = 0;
+
+ DEBUGFUNC("e1000_clock_out_i2c_byte");
+
+ for (i = 7; i >= 0; i--) {
+ bit = (data >> i) & 0x1;
+ status = e1000_clock_out_i2c_bit(hw, bit);
+
+ if (status != E1000_SUCCESS)
+ break;
+ }
+
+ /* Release SDA line (set high) */
+ i2cctl = E1000_READ_REG(hw, E1000_I2CPARAMS);
+
+ i2cctl |= E1000_I2C_DATA_OE_N;
+ E1000_WRITE_REG(hw, E1000_I2CPARAMS, i2cctl);
+ E1000_WRITE_FLUSH(hw);
+
+ return status;
+}
+
+/**
+ * e1000_get_i2c_ack - Polls for I2C ACK
+ * @hw: pointer to hardware structure
+ *
+ * Clocks in/out one bit via I2C data/clock
+ **/
+static s32 e1000_get_i2c_ack(struct e1000_hw *hw)
+{
+ s32 status = E1000_SUCCESS;
+ u32 i = 0;
+ u32 i2cctl = E1000_READ_REG(hw, E1000_I2CPARAMS);
+ u32 timeout = 10;
+ bool ack = 1;
+
+ DEBUGFUNC("e1000_get_i2c_ack");
+
+ e1000_raise_i2c_clk(hw, &i2cctl);
+
+ /* Minimum high period of clock is 4us */
+ usec_delay(E1000_I2C_T_HIGH);
+
+ /* Wait until SCL returns high */
+ for (i = 0; i < timeout; i++) {
+ usec_delay(1);
+ i2cctl = E1000_READ_REG(hw, E1000_I2CPARAMS);
+ if (i2cctl & E1000_I2C_CLK_IN)
+ break;
+ }
+ if (!(i2cctl & E1000_I2C_CLK_IN))
+ return E1000_ERR_I2C;
+
+ ack = e1000_get_i2c_data(&i2cctl);
+ if (ack == 1) {
+ DEBUGOUT("I2C ack was not received.\n");
+ status = E1000_ERR_I2C;
+ }
+
+ e1000_lower_i2c_clk(hw, &i2cctl);
+
+ /* Minimum low period of clock is 4.7 us */
+ usec_delay(E1000_I2C_T_LOW);
+
+ return status;
+}
+
+/**
+ * e1000_clock_in_i2c_bit - Clocks in one bit via I2C data/clock
+ * @hw: pointer to hardware structure
+ * @data: read data value
+ *
+ * Clocks in one bit via I2C data/clock
+ **/
+static s32 e1000_clock_in_i2c_bit(struct e1000_hw *hw, bool *data)
+{
+ u32 i2cctl = E1000_READ_REG(hw, E1000_I2CPARAMS);
+
+ DEBUGFUNC("e1000_clock_in_i2c_bit");
+
+ e1000_raise_i2c_clk(hw, &i2cctl);
+
+ /* Minimum high period of clock is 4us */
+ usec_delay(E1000_I2C_T_HIGH);
+
+ i2cctl = E1000_READ_REG(hw, E1000_I2CPARAMS);
+ *data = e1000_get_i2c_data(&i2cctl);
+
+ e1000_lower_i2c_clk(hw, &i2cctl);
+
+ /* Minimum low period of clock is 4.7 us */
+ usec_delay(E1000_I2C_T_LOW);
+
+ return E1000_SUCCESS;
+}
+
+/**
+ * e1000_clock_out_i2c_bit - Clocks in/out one bit via I2C data/clock
+ * @hw: pointer to hardware structure
+ * @data: data value to write
+ *
+ * Clocks out one bit via I2C data/clock
+ **/
+static s32 e1000_clock_out_i2c_bit(struct e1000_hw *hw, bool data)
+{
+ s32 status;
+ u32 i2cctl = E1000_READ_REG(hw, E1000_I2CPARAMS);
+
+ DEBUGFUNC("e1000_clock_out_i2c_bit");
+
+ status = e1000_set_i2c_data(hw, &i2cctl, data);
+ if (status == E1000_SUCCESS) {
+ e1000_raise_i2c_clk(hw, &i2cctl);
+
+ /* Minimum high period of clock is 4us */
+ usec_delay(E1000_I2C_T_HIGH);
+
+ e1000_lower_i2c_clk(hw, &i2cctl);
+
+ /* Minimum low period of clock is 4.7 us.
+ * This also takes care of the data hold time.
+ */
+ usec_delay(E1000_I2C_T_LOW);
+ } else {
+ status = E1000_ERR_I2C;
+ DEBUGOUT1("I2C data was not set to %X\n", data);
+ }
+
+ return status;
+}
+/**
+ * e1000_raise_i2c_clk - Raises the I2C SCL clock
+ * @hw: pointer to hardware structure
+ * @i2cctl: Current value of I2CCTL register
+ *
+ * Raises the I2C clock line '0'->'1'
+ **/
+static void e1000_raise_i2c_clk(struct e1000_hw *hw, u32 *i2cctl)
+{
+ DEBUGFUNC("e1000_raise_i2c_clk");
+
+ *i2cctl |= E1000_I2C_CLK_OUT;
+ *i2cctl &= ~E1000_I2C_CLK_OE_N;
+ E1000_WRITE_REG(hw, E1000_I2CPARAMS, *i2cctl);
+ E1000_WRITE_FLUSH(hw);
+
+ /* SCL rise time (1000ns) */
+ usec_delay(E1000_I2C_T_RISE);
+}
+
+/**
+ * e1000_lower_i2c_clk - Lowers the I2C SCL clock
+ * @hw: pointer to hardware structure
+ * @i2cctl: Current value of I2CCTL register
+ *
+ * Lowers the I2C clock line '1'->'0'
+ **/
+static void e1000_lower_i2c_clk(struct e1000_hw *hw, u32 *i2cctl)
+{
+
+ DEBUGFUNC("e1000_lower_i2c_clk");
+
+ *i2cctl &= ~E1000_I2C_CLK_OUT;
+ *i2cctl &= ~E1000_I2C_CLK_OE_N;
+ E1000_WRITE_REG(hw, E1000_I2CPARAMS, *i2cctl);
+ E1000_WRITE_FLUSH(hw);
+
+ /* SCL fall time (300ns) */
+ usec_delay(E1000_I2C_T_FALL);
+}
+
+/**
+ * e1000_set_i2c_data - Sets the I2C data bit
+ * @hw: pointer to hardware structure
+ * @i2cctl: Current value of I2CCTL register
+ * @data: I2C data value (0 or 1) to set
+ *
+ * Sets the I2C data bit
+ **/
+static s32 e1000_set_i2c_data(struct e1000_hw *hw, u32 *i2cctl, bool data)
+{
+ s32 status = E1000_SUCCESS;
+
+ DEBUGFUNC("e1000_set_i2c_data");
+
+ if (data)
+ *i2cctl |= E1000_I2C_DATA_OUT;
+ else
+ *i2cctl &= ~E1000_I2C_DATA_OUT;
+
+ *i2cctl &= ~E1000_I2C_DATA_OE_N;
+ *i2cctl |= E1000_I2C_CLK_OE_N;
+ E1000_WRITE_REG(hw, E1000_I2CPARAMS, *i2cctl);
+ E1000_WRITE_FLUSH(hw);
+
+ /* Data rise/fall (1000ns/300ns) and set-up time (250ns) */
+ usec_delay(E1000_I2C_T_RISE + E1000_I2C_T_FALL + E1000_I2C_T_SU_DATA);
+
+ *i2cctl = E1000_READ_REG(hw, E1000_I2CPARAMS);
+ if (data != e1000_get_i2c_data(i2cctl)) {
+ status = E1000_ERR_I2C;
+ DEBUGOUT1("Error - I2C data was not set to %X.\n", data);
+ }
+
+ return status;
+}
+
+/**
+ * e1000_get_i2c_data - Reads the I2C SDA data bit
+ * @hw: pointer to hardware structure
+ * @i2cctl: Current value of I2CCTL register
+ *
+ * Returns the I2C data bit value
+ **/
+static bool e1000_get_i2c_data(u32 *i2cctl)
+{
+ bool data;
+
+ DEBUGFUNC("e1000_get_i2c_data");
+
+ if (*i2cctl & E1000_I2C_DATA_IN)
+ data = 1;
+ else
+ data = 0;
+
+ return data;
+}
+
+/**
+ * e1000_i2c_bus_clear - Clears the I2C bus
+ * @hw: pointer to hardware structure
+ *
+ * Clears the I2C bus by sending nine clock pulses.
+ * Used when data line is stuck low.
+ **/
+void e1000_i2c_bus_clear(struct e1000_hw *hw)
+{
+ u32 i2cctl = E1000_READ_REG(hw, E1000_I2CPARAMS);
+ u32 i;
+
+ DEBUGFUNC("e1000_i2c_bus_clear");
+
+ e1000_i2c_start(hw);
+
+ e1000_set_i2c_data(hw, &i2cctl, 1);
+
+ for (i = 0; i < 9; i++) {
+ e1000_raise_i2c_clk(hw, &i2cctl);
+
+ /* Min high period of clock is 4us */
+ usec_delay(E1000_I2C_T_HIGH);
+
+ e1000_lower_i2c_clk(hw, &i2cctl);
+
+ /* Min low period of clock is 4.7us*/
+ usec_delay(E1000_I2C_T_LOW);
+ }
+
+ e1000_i2c_start(hw);
+
+ /* Put the i2c bus back to default state */
+ e1000_i2c_stop(hw);
+}
+
diff --git a/sys/dev/e1000/e1000_82575.h b/sys/dev/e1000/e1000_82575.h
index 529325b..4b2b245 100644
--- a/sys/dev/e1000/e1000_82575.h
+++ b/sys/dev/e1000/e1000_82575.h
@@ -1,6 +1,6 @@
/******************************************************************************
- Copyright (c) 2001-2010, Intel Corporation
+ Copyright (c) 2001-2011, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -35,10 +35,10 @@
#ifndef _E1000_82575_H_
#define _E1000_82575_H_
-#define ID_LED_DEFAULT_82575_SERDES ((ID_LED_DEF1_DEF2 << 12) | \
- (ID_LED_DEF1_DEF2 << 8) | \
- (ID_LED_DEF1_DEF2 << 4) | \
- (ID_LED_OFF1_ON2))
+#define ID_LED_DEFAULT_82575_SERDES ((ID_LED_DEF1_DEF2 << 12) | \
+ (ID_LED_DEF1_DEF2 << 8) | \
+ (ID_LED_DEF1_DEF2 << 4) | \
+ (ID_LED_OFF1_ON2))
/*
* Receive Address Register Count
* Number of high/low register pairs in the RAR. The RAR (Receive Address
@@ -49,13 +49,13 @@
* For 82576, there are an additional set of RARs that begin at an offset
* separate from the first set of RARs.
*/
-#define E1000_RAR_ENTRIES_82575 16
-#define E1000_RAR_ENTRIES_82576 24
-#define E1000_RAR_ENTRIES_82580 24
-#define E1000_RAR_ENTRIES_I350 32
-#define E1000_SW_SYNCH_MB 0x00000100
-#define E1000_STAT_DEV_RST_SET 0x00100000
-#define E1000_CTRL_DEV_RST 0x20000000
+#define E1000_RAR_ENTRIES_82575 16
+#define E1000_RAR_ENTRIES_82576 24
+#define E1000_RAR_ENTRIES_82580 24
+#define E1000_RAR_ENTRIES_I350 32
+#define E1000_SW_SYNCH_MB 0x00000100
+#define E1000_STAT_DEV_RST_SET 0x00100000
+#define E1000_CTRL_DEV_RST 0x20000000
#ifdef E1000_BIT_FIELDS
struct e1000_adv_data_desc {
@@ -63,137 +63,138 @@ struct e1000_adv_data_desc {
union {
u32 data;
struct {
- u32 datalen :16; /* Data buffer length */
- u32 rsvd :4;
- u32 dtyp :4; /* Descriptor type */
- u32 dcmd :8; /* Descriptor command */
+ u32 datalen:16; /* Data buffer length */
+ u32 rsvd:4;
+ u32 dtyp:4; /* Descriptor type */
+ u32 dcmd:8; /* Descriptor command */
} config;
} lower;
union {
u32 data;
struct {
- u32 status :4; /* Descriptor status */
- u32 idx :4;
- u32 popts :6; /* Packet Options */
- u32 paylen :18; /* Payload length */
+ u32 status:4; /* Descriptor status */
+ u32 idx:4;
+ u32 popts:6; /* Packet Options */
+ u32 paylen:18; /* Payload length */
} options;
} upper;
};
-#define E1000_TXD_DTYP_ADV_C 0x2 /* Advanced Context Descriptor */
-#define E1000_TXD_DTYP_ADV_D 0x3 /* Advanced Data Descriptor */
-#define E1000_ADV_TXD_CMD_DEXT 0x20 /* Descriptor extension (0 = legacy) */
-#define E1000_ADV_TUCMD_IPV4 0x2 /* IP Packet Type: 1=IPv4 */
-#define E1000_ADV_TUCMD_IPV6 0x0 /* IP Packet Type: 0=IPv6 */
-#define E1000_ADV_TUCMD_L4T_UDP 0x0 /* L4 Packet TYPE of UDP */
-#define E1000_ADV_TUCMD_L4T_TCP 0x4 /* L4 Packet TYPE of TCP */
-#define E1000_ADV_TUCMD_MKRREQ 0x10 /* Indicates markers are required */
-#define E1000_ADV_DCMD_EOP 0x1 /* End of Packet */
-#define E1000_ADV_DCMD_IFCS 0x2 /* Insert FCS (Ethernet CRC) */
-#define E1000_ADV_DCMD_RS 0x8 /* Report Status */
-#define E1000_ADV_DCMD_VLE 0x40 /* Add VLAN tag */
-#define E1000_ADV_DCMD_TSE 0x80 /* TCP Seg enable */
+#define E1000_TXD_DTYP_ADV_C 0x2 /* Advanced Context Descriptor */
+#define E1000_TXD_DTYP_ADV_D 0x3 /* Advanced Data Descriptor */
+#define E1000_ADV_TXD_CMD_DEXT 0x20 /* Descriptor extension (0 = legacy) */
+#define E1000_ADV_TUCMD_IPV4 0x2 /* IP Packet Type: 1=IPv4 */
+#define E1000_ADV_TUCMD_IPV6 0x0 /* IP Packet Type: 0=IPv6 */
+#define E1000_ADV_TUCMD_L4T_UDP 0x0 /* L4 Packet TYPE of UDP */
+#define E1000_ADV_TUCMD_L4T_TCP 0x4 /* L4 Packet TYPE of TCP */
+#define E1000_ADV_TUCMD_MKRREQ 0x10 /* Indicates markers are required */
+#define E1000_ADV_DCMD_EOP 0x1 /* End of Packet */
+#define E1000_ADV_DCMD_IFCS 0x2 /* Insert FCS (Ethernet CRC) */
+#define E1000_ADV_DCMD_RS 0x8 /* Report Status */
+#define E1000_ADV_DCMD_VLE 0x40 /* Add VLAN tag */
+#define E1000_ADV_DCMD_TSE 0x80 /* TCP Seg enable */
/* Extended Device Control */
-#define E1000_CTRL_EXT_NSICR 0x00000001 /* Disable Intr Clear all on read */
+#define E1000_CTRL_EXT_NSICR 0x00000001 /* Disable Intr Clear all on read */
struct e1000_adv_context_desc {
union {
u32 ip_config;
struct {
- u32 iplen :9;
- u32 maclen :7;
- u32 vlan_tag :16;
+ u32 iplen:9;
+ u32 maclen:7;
+ u32 vlan_tag:16;
} fields;
} ip_setup;
u32 seq_num;
union {
u64 l4_config;
struct {
- u32 mkrloc :9;
- u32 tucmd :11;
- u32 dtyp :4;
- u32 adv :8;
- u32 rsvd :4;
- u32 idx :4;
- u32 l4len :8;
- u32 mss :16;
+ u32 mkrloc:9;
+ u32 tucmd:11;
+ u32 dtyp:4;
+ u32 adv:8;
+ u32 rsvd:4;
+ u32 idx:4;
+ u32 l4len:8;
+ u32 mss:16;
} fields;
} l4_setup;
};
#endif
/* SRRCTL bit definitions */
-#define E1000_SRRCTL_BSIZEPKT_SHIFT 10 /* Shift _right_ */
-#define E1000_SRRCTL_BSIZEHDRSIZE_MASK 0x00000F00
-#define E1000_SRRCTL_BSIZEHDRSIZE_SHIFT 2 /* Shift _left_ */
-#define E1000_SRRCTL_DESCTYPE_LEGACY 0x00000000
-#define E1000_SRRCTL_DESCTYPE_ADV_ONEBUF 0x02000000
-#define E1000_SRRCTL_DESCTYPE_HDR_SPLIT 0x04000000
-#define E1000_SRRCTL_DESCTYPE_HDR_SPLIT_ALWAYS 0x0A000000
-#define E1000_SRRCTL_DESCTYPE_HDR_REPLICATION 0x06000000
+#define E1000_SRRCTL_BSIZEPKT_SHIFT 10 /* Shift _right_ */
+#define E1000_SRRCTL_BSIZEHDRSIZE_MASK 0x00000F00
+#define E1000_SRRCTL_BSIZEHDRSIZE_SHIFT 2 /* Shift _left_ */
+#define E1000_SRRCTL_DESCTYPE_LEGACY 0x00000000
+#define E1000_SRRCTL_DESCTYPE_ADV_ONEBUF 0x02000000
+#define E1000_SRRCTL_DESCTYPE_HDR_SPLIT 0x04000000
+#define E1000_SRRCTL_DESCTYPE_HDR_SPLIT_ALWAYS 0x0A000000
+#define E1000_SRRCTL_DESCTYPE_HDR_REPLICATION 0x06000000
#define E1000_SRRCTL_DESCTYPE_HDR_REPLICATION_LARGE_PKT 0x08000000
-#define E1000_SRRCTL_DESCTYPE_MASK 0x0E000000
-#define E1000_SRRCTL_TIMESTAMP 0x40000000
-#define E1000_SRRCTL_DROP_EN 0x80000000
-
-#define E1000_SRRCTL_BSIZEPKT_MASK 0x0000007F
-#define E1000_SRRCTL_BSIZEHDR_MASK 0x00003F00
-
-#define E1000_TX_HEAD_WB_ENABLE 0x1
-#define E1000_TX_SEQNUM_WB_ENABLE 0x2
-
-#define E1000_MRQC_ENABLE_RSS_4Q 0x00000002
-#define E1000_MRQC_ENABLE_VMDQ 0x00000003
-#define E1000_MRQC_ENABLE_VMDQ_RSS_2Q 0x00000005
-#define E1000_MRQC_RSS_FIELD_IPV4_UDP 0x00400000
-#define E1000_MRQC_RSS_FIELD_IPV6_UDP 0x00800000
-#define E1000_MRQC_RSS_FIELD_IPV6_UDP_EX 0x01000000
-#define E1000_MRQC_ENABLE_RSS_8Q 0x00000002
-
-#define E1000_VMRCTL_MIRROR_PORT_SHIFT 8
-#define E1000_VMRCTL_MIRROR_DSTPORT_MASK (7 << E1000_VMRCTL_MIRROR_PORT_SHIFT)
-#define E1000_VMRCTL_POOL_MIRROR_ENABLE (1 << 0)
-#define E1000_VMRCTL_UPLINK_MIRROR_ENABLE (1 << 1)
-#define E1000_VMRCTL_DOWNLINK_MIRROR_ENABLE (1 << 2)
+#define E1000_SRRCTL_DESCTYPE_MASK 0x0E000000
+#define E1000_SRRCTL_TIMESTAMP 0x40000000
+#define E1000_SRRCTL_DROP_EN 0x80000000
+
+#define E1000_SRRCTL_BSIZEPKT_MASK 0x0000007F
+#define E1000_SRRCTL_BSIZEHDR_MASK 0x00003F00
+
+#define E1000_TX_HEAD_WB_ENABLE 0x1
+#define E1000_TX_SEQNUM_WB_ENABLE 0x2
+
+#define E1000_MRQC_ENABLE_RSS_4Q 0x00000002
+#define E1000_MRQC_ENABLE_VMDQ 0x00000003
+#define E1000_MRQC_ENABLE_VMDQ_RSS_2Q 0x00000005
+#define E1000_MRQC_RSS_FIELD_IPV4_UDP 0x00400000
+#define E1000_MRQC_RSS_FIELD_IPV6_UDP 0x00800000
+#define E1000_MRQC_RSS_FIELD_IPV6_UDP_EX 0x01000000
+#define E1000_MRQC_ENABLE_RSS_8Q 0x00000002
+
+#define E1000_VMRCTL_MIRROR_PORT_SHIFT 8
+#define E1000_VMRCTL_MIRROR_DSTPORT_MASK (7 << \
+ E1000_VMRCTL_MIRROR_PORT_SHIFT)
+#define E1000_VMRCTL_POOL_MIRROR_ENABLE (1 << 0)
+#define E1000_VMRCTL_UPLINK_MIRROR_ENABLE (1 << 1)
+#define E1000_VMRCTL_DOWNLINK_MIRROR_ENABLE (1 << 2)
#define E1000_EICR_TX_QUEUE ( \
- E1000_EICR_TX_QUEUE0 | \
- E1000_EICR_TX_QUEUE1 | \
- E1000_EICR_TX_QUEUE2 | \
- E1000_EICR_TX_QUEUE3)
+ E1000_EICR_TX_QUEUE0 | \
+ E1000_EICR_TX_QUEUE1 | \
+ E1000_EICR_TX_QUEUE2 | \
+ E1000_EICR_TX_QUEUE3)
#define E1000_EICR_RX_QUEUE ( \
- E1000_EICR_RX_QUEUE0 | \
- E1000_EICR_RX_QUEUE1 | \
- E1000_EICR_RX_QUEUE2 | \
- E1000_EICR_RX_QUEUE3)
+ E1000_EICR_RX_QUEUE0 | \
+ E1000_EICR_RX_QUEUE1 | \
+ E1000_EICR_RX_QUEUE2 | \
+ E1000_EICR_RX_QUEUE3)
-#define E1000_EIMS_RX_QUEUE E1000_EICR_RX_QUEUE
-#define E1000_EIMS_TX_QUEUE E1000_EICR_TX_QUEUE
+#define E1000_EIMS_RX_QUEUE E1000_EICR_RX_QUEUE
+#define E1000_EIMS_TX_QUEUE E1000_EICR_TX_QUEUE
#define EIMS_ENABLE_MASK ( \
- E1000_EIMS_RX_QUEUE | \
- E1000_EIMS_TX_QUEUE | \
- E1000_EIMS_TCP_TIMER | \
- E1000_EIMS_OTHER)
+ E1000_EIMS_RX_QUEUE | \
+ E1000_EIMS_TX_QUEUE | \
+ E1000_EIMS_TCP_TIMER | \
+ E1000_EIMS_OTHER)
/* Immediate Interrupt Rx (A.K.A. Low Latency Interrupt) */
-#define E1000_IMIR_PORT_IM_EN 0x00010000 /* TCP port enable */
-#define E1000_IMIR_PORT_BP 0x00020000 /* TCP port check bypass */
-#define E1000_IMIREXT_SIZE_BP 0x00001000 /* Packet size bypass */
-#define E1000_IMIREXT_CTRL_URG 0x00002000 /* Check URG bit in header */
-#define E1000_IMIREXT_CTRL_ACK 0x00004000 /* Check ACK bit in header */
-#define E1000_IMIREXT_CTRL_PSH 0x00008000 /* Check PSH bit in header */
-#define E1000_IMIREXT_CTRL_RST 0x00010000 /* Check RST bit in header */
-#define E1000_IMIREXT_CTRL_SYN 0x00020000 /* Check SYN bit in header */
-#define E1000_IMIREXT_CTRL_FIN 0x00040000 /* Check FIN bit in header */
-#define E1000_IMIREXT_CTRL_BP 0x00080000 /* Bypass check of ctrl bits */
+#define E1000_IMIR_PORT_IM_EN 0x00010000 /* TCP port enable */
+#define E1000_IMIR_PORT_BP 0x00020000 /* TCP port check bypass */
+#define E1000_IMIREXT_SIZE_BP 0x00001000 /* Packet size bypass */
+#define E1000_IMIREXT_CTRL_URG 0x00002000 /* Check URG bit in header */
+#define E1000_IMIREXT_CTRL_ACK 0x00004000 /* Check ACK bit in header */
+#define E1000_IMIREXT_CTRL_PSH 0x00008000 /* Check PSH bit in header */
+#define E1000_IMIREXT_CTRL_RST 0x00010000 /* Check RST bit in header */
+#define E1000_IMIREXT_CTRL_SYN 0x00020000 /* Check SYN bit in header */
+#define E1000_IMIREXT_CTRL_FIN 0x00040000 /* Check FIN bit in header */
+#define E1000_IMIREXT_CTRL_BP 0x00080000 /* Bypass check of ctrl bits */
/* Receive Descriptor - Advanced */
union e1000_adv_rx_desc {
struct {
- __le64 pkt_addr; /* Packet buffer address */
- __le64 hdr_addr; /* Header buffer address */
+ __le64 pkt_addr; /* Packet buffer address */
+ __le64 hdr_addr; /* Header buffer address */
} read;
struct {
struct {
@@ -206,74 +207,74 @@ union e1000_adv_rx_desc {
} hs_rss;
} lo_dword;
union {
- __le32 rss; /* RSS Hash */
+ __le32 rss; /* RSS Hash */
struct {
- __le16 ip_id; /* IP id */
- __le16 csum; /* Packet Checksum */
+ __le16 ip_id; /* IP id */
+ __le16 csum; /* Packet Checksum */
} csum_ip;
} hi_dword;
} lower;
struct {
- __le32 status_error; /* ext status/error */
- __le16 length; /* Packet length */
- __le16 vlan; /* VLAN tag */
+ __le32 status_error; /* ext status/error */
+ __le16 length; /* Packet length */
+ __le16 vlan; /* VLAN tag */
} upper;
} wb; /* writeback */
};
-#define E1000_RXDADV_RSSTYPE_MASK 0x0000000F
-#define E1000_RXDADV_RSSTYPE_SHIFT 12
-#define E1000_RXDADV_HDRBUFLEN_MASK 0x7FE0
-#define E1000_RXDADV_HDRBUFLEN_SHIFT 5
-#define E1000_RXDADV_SPLITHEADER_EN 0x00001000
-#define E1000_RXDADV_SPH 0x8000
-#define E1000_RXDADV_STAT_TS 0x10000 /* Pkt was time stamped */
-#define E1000_RXDADV_STAT_TSIP 0x08000 /* timestamp in packet */
-#define E1000_RXDADV_ERR_HBO 0x00800000
+#define E1000_RXDADV_RSSTYPE_MASK 0x0000000F
+#define E1000_RXDADV_RSSTYPE_SHIFT 12
+#define E1000_RXDADV_HDRBUFLEN_MASK 0x7FE0
+#define E1000_RXDADV_HDRBUFLEN_SHIFT 5
+#define E1000_RXDADV_SPLITHEADER_EN 0x00001000
+#define E1000_RXDADV_SPH 0x8000
+#define E1000_RXDADV_STAT_TS 0x10000 /* Pkt was time stamped */
+#define E1000_RXDADV_STAT_TSIP 0x08000 /* timestamp in packet */
+#define E1000_RXDADV_ERR_HBO 0x00800000
/* RSS Hash results */
-#define E1000_RXDADV_RSSTYPE_NONE 0x00000000
-#define E1000_RXDADV_RSSTYPE_IPV4_TCP 0x00000001
-#define E1000_RXDADV_RSSTYPE_IPV4 0x00000002
-#define E1000_RXDADV_RSSTYPE_IPV6_TCP 0x00000003
-#define E1000_RXDADV_RSSTYPE_IPV6_EX 0x00000004
-#define E1000_RXDADV_RSSTYPE_IPV6 0x00000005
+#define E1000_RXDADV_RSSTYPE_NONE 0x00000000
+#define E1000_RXDADV_RSSTYPE_IPV4_TCP 0x00000001
+#define E1000_RXDADV_RSSTYPE_IPV4 0x00000002
+#define E1000_RXDADV_RSSTYPE_IPV6_TCP 0x00000003
+#define E1000_RXDADV_RSSTYPE_IPV6_EX 0x00000004
+#define E1000_RXDADV_RSSTYPE_IPV6 0x00000005
#define E1000_RXDADV_RSSTYPE_IPV6_TCP_EX 0x00000006
-#define E1000_RXDADV_RSSTYPE_IPV4_UDP 0x00000007
-#define E1000_RXDADV_RSSTYPE_IPV6_UDP 0x00000008
+#define E1000_RXDADV_RSSTYPE_IPV4_UDP 0x00000007
+#define E1000_RXDADV_RSSTYPE_IPV6_UDP 0x00000008
#define E1000_RXDADV_RSSTYPE_IPV6_UDP_EX 0x00000009
/* RSS Packet Types as indicated in the receive descriptor */
-#define E1000_RXDADV_PKTTYPE_NONE 0x00000000
-#define E1000_RXDADV_PKTTYPE_IPV4 0x00000010 /* IPV4 hdr present */
-#define E1000_RXDADV_PKTTYPE_IPV4_EX 0x00000020 /* IPV4 hdr + extensions */
-#define E1000_RXDADV_PKTTYPE_IPV6 0x00000040 /* IPV6 hdr present */
-#define E1000_RXDADV_PKTTYPE_IPV6_EX 0x00000080 /* IPV6 hdr + extensions */
-#define E1000_RXDADV_PKTTYPE_TCP 0x00000100 /* TCP hdr present */
-#define E1000_RXDADV_PKTTYPE_UDP 0x00000200 /* UDP hdr present */
-#define E1000_RXDADV_PKTTYPE_SCTP 0x00000400 /* SCTP hdr present */
-#define E1000_RXDADV_PKTTYPE_NFS 0x00000800 /* NFS hdr present */
-
-#define E1000_RXDADV_PKTTYPE_IPSEC_ESP 0x00001000 /* IPSec ESP */
-#define E1000_RXDADV_PKTTYPE_IPSEC_AH 0x00002000 /* IPSec AH */
-#define E1000_RXDADV_PKTTYPE_LINKSEC 0x00004000 /* LinkSec Encap */
-#define E1000_RXDADV_PKTTYPE_ETQF 0x00008000 /* PKTTYPE is ETQF index */
-#define E1000_RXDADV_PKTTYPE_ETQF_MASK 0x00000070 /* ETQF has 8 indices */
-#define E1000_RXDADV_PKTTYPE_ETQF_SHIFT 4 /* Right-shift 4 bits */
+#define E1000_RXDADV_PKTTYPE_NONE 0x00000000
+#define E1000_RXDADV_PKTTYPE_IPV4 0x00000010 /* IPV4 hdr present */
+#define E1000_RXDADV_PKTTYPE_IPV4_EX 0x00000020 /* IPV4 hdr + extensions */
+#define E1000_RXDADV_PKTTYPE_IPV6 0x00000040 /* IPV6 hdr present */
+#define E1000_RXDADV_PKTTYPE_IPV6_EX 0x00000080 /* IPV6 hdr + extensions */
+#define E1000_RXDADV_PKTTYPE_TCP 0x00000100 /* TCP hdr present */
+#define E1000_RXDADV_PKTTYPE_UDP 0x00000200 /* UDP hdr present */
+#define E1000_RXDADV_PKTTYPE_SCTP 0x00000400 /* SCTP hdr present */
+#define E1000_RXDADV_PKTTYPE_NFS 0x00000800 /* NFS hdr present */
+
+#define E1000_RXDADV_PKTTYPE_IPSEC_ESP 0x00001000 /* IPSec ESP */
+#define E1000_RXDADV_PKTTYPE_IPSEC_AH 0x00002000 /* IPSec AH */
+#define E1000_RXDADV_PKTTYPE_LINKSEC 0x00004000 /* LinkSec Encap */
+#define E1000_RXDADV_PKTTYPE_ETQF 0x00008000 /* PKTTYPE is ETQF index */
+#define E1000_RXDADV_PKTTYPE_ETQF_MASK 0x00000070 /* ETQF has 8 indices */
+#define E1000_RXDADV_PKTTYPE_ETQF_SHIFT 4 /* Right-shift 4 bits */
/* LinkSec results */
/* Security Processing bit Indication */
-#define E1000_RXDADV_LNKSEC_STATUS_SECP 0x00020000
-#define E1000_RXDADV_LNKSEC_ERROR_BIT_MASK 0x18000000
-#define E1000_RXDADV_LNKSEC_ERROR_NO_SA_MATCH 0x08000000
-#define E1000_RXDADV_LNKSEC_ERROR_REPLAY_ERROR 0x10000000
-#define E1000_RXDADV_LNKSEC_ERROR_BAD_SIG 0x18000000
-
-#define E1000_RXDADV_IPSEC_STATUS_SECP 0x00020000
-#define E1000_RXDADV_IPSEC_ERROR_BIT_MASK 0x18000000
-#define E1000_RXDADV_IPSEC_ERROR_INVALID_PROTOCOL 0x08000000
-#define E1000_RXDADV_IPSEC_ERROR_INVALID_LENGTH 0x10000000
-#define E1000_RXDADV_IPSEC_ERROR_AUTHENTICATION_FAILED 0x18000000
+#define E1000_RXDADV_LNKSEC_STATUS_SECP 0x00020000
+#define E1000_RXDADV_LNKSEC_ERROR_BIT_MASK 0x18000000
+#define E1000_RXDADV_LNKSEC_ERROR_NO_SA_MATCH 0x08000000
+#define E1000_RXDADV_LNKSEC_ERROR_REPLAY_ERROR 0x10000000
+#define E1000_RXDADV_LNKSEC_ERROR_BAD_SIG 0x18000000
+
+#define E1000_RXDADV_IPSEC_STATUS_SECP 0x00020000
+#define E1000_RXDADV_IPSEC_ERROR_BIT_MASK 0x18000000
+#define E1000_RXDADV_IPSEC_ERROR_INVALID_PROTOCOL 0x08000000
+#define E1000_RXDADV_IPSEC_ERROR_INVALID_LENGTH 0x10000000
+#define E1000_RXDADV_IPSEC_ERROR_AUTHENTICATION_FAILED 0x18000000
/* Transmit Descriptor - Advanced */
union e1000_adv_tx_desc {
@@ -290,25 +291,26 @@ union e1000_adv_tx_desc {
};
/* Adv Transmit Descriptor Config Masks */
-#define E1000_ADVTXD_DTYP_CTXT 0x00200000 /* Advanced Context Descriptor */
-#define E1000_ADVTXD_DTYP_DATA 0x00300000 /* Advanced Data Descriptor */
-#define E1000_ADVTXD_DCMD_EOP 0x01000000 /* End of Packet */
-#define E1000_ADVTXD_DCMD_IFCS 0x02000000 /* Insert FCS (Ethernet CRC) */
-#define E1000_ADVTXD_DCMD_RS 0x08000000 /* Report Status */
-#define E1000_ADVTXD_DCMD_DDTYP_ISCSI 0x10000000 /* DDP hdr type or iSCSI */
-#define E1000_ADVTXD_DCMD_DEXT 0x20000000 /* Descriptor extension (1=Adv) */
-#define E1000_ADVTXD_DCMD_VLE 0x40000000 /* VLAN pkt enable */
-#define E1000_ADVTXD_DCMD_TSE 0x80000000 /* TCP Seg enable */
-#define E1000_ADVTXD_MAC_LINKSEC 0x00040000 /* Apply LinkSec on packet */
-#define E1000_ADVTXD_MAC_TSTAMP 0x00080000 /* IEEE1588 Timestamp packet */
-#define E1000_ADVTXD_STAT_SN_CRC 0x00000002 /* NXTSEQ/SEED present in WB */
-#define E1000_ADVTXD_IDX_SHIFT 4 /* Adv desc Index shift */
-#define E1000_ADVTXD_POPTS_ISCO_1ST 0x00000000 /* 1st TSO of iSCSI PDU */
-#define E1000_ADVTXD_POPTS_ISCO_MDL 0x00000800 /* Middle TSO of iSCSI PDU */
-#define E1000_ADVTXD_POPTS_ISCO_LAST 0x00001000 /* Last TSO of iSCSI PDU */
-#define E1000_ADVTXD_POPTS_ISCO_FULL 0x00001800 /* 1st&Last TSO-full iSCSI PDU*/
-#define E1000_ADVTXD_POPTS_IPSEC 0x00000400 /* IPSec offload request */
-#define E1000_ADVTXD_PAYLEN_SHIFT 14 /* Adv desc PAYLEN shift */
+#define E1000_ADVTXD_DTYP_CTXT 0x00200000 /* Advanced Context Descriptor */
+#define E1000_ADVTXD_DTYP_DATA 0x00300000 /* Advanced Data Descriptor */
+#define E1000_ADVTXD_DCMD_EOP 0x01000000 /* End of Packet */
+#define E1000_ADVTXD_DCMD_IFCS 0x02000000 /* Insert FCS (Ethernet CRC) */
+#define E1000_ADVTXD_DCMD_RS 0x08000000 /* Report Status */
+#define E1000_ADVTXD_DCMD_DDTYP_ISCSI 0x10000000 /* DDP hdr type or iSCSI */
+#define E1000_ADVTXD_DCMD_DEXT 0x20000000 /* Descriptor extension (1=Adv) */
+#define E1000_ADVTXD_DCMD_VLE 0x40000000 /* VLAN pkt enable */
+#define E1000_ADVTXD_DCMD_TSE 0x80000000 /* TCP Seg enable */
+#define E1000_ADVTXD_MAC_LINKSEC 0x00040000 /* Apply LinkSec on pkt */
+#define E1000_ADVTXD_MAC_TSTAMP 0x00080000 /* IEEE1588 Timestamp pkt */
+#define E1000_ADVTXD_STAT_SN_CRC 0x00000002 /* NXTSEQ/SEED prsnt in WB */
+#define E1000_ADVTXD_IDX_SHIFT 4 /* Adv desc Index shift */
+#define E1000_ADVTXD_POPTS_ISCO_1ST 0x00000000 /* 1st TSO of iSCSI PDU */
+#define E1000_ADVTXD_POPTS_ISCO_MDL 0x00000800 /* Middle TSO of iSCSI PDU */
+#define E1000_ADVTXD_POPTS_ISCO_LAST 0x00001000 /* Last TSO of iSCSI PDU */
+/* 1st & Last TSO-full iSCSI PDU*/
+#define E1000_ADVTXD_POPTS_ISCO_FULL 0x00001800
+#define E1000_ADVTXD_POPTS_IPSEC 0x00000400 /* IPSec offload request */
+#define E1000_ADVTXD_PAYLEN_SHIFT 14 /* Adv desc PAYLEN shift */
/* Context descriptors */
struct e1000_adv_tx_context_desc {
@@ -318,65 +320,66 @@ struct e1000_adv_tx_context_desc {
__le32 mss_l4len_idx;
};
-#define E1000_ADVTXD_MACLEN_SHIFT 9 /* Adv ctxt desc mac len shift */
-#define E1000_ADVTXD_VLAN_SHIFT 16 /* Adv ctxt vlan tag shift */
-#define E1000_ADVTXD_TUCMD_IPV4 0x00000400 /* IP Packet Type: 1=IPv4 */
-#define E1000_ADVTXD_TUCMD_IPV6 0x00000000 /* IP Packet Type: 0=IPv6 */
-#define E1000_ADVTXD_TUCMD_L4T_UDP 0x00000000 /* L4 Packet TYPE of UDP */
-#define E1000_ADVTXD_TUCMD_L4T_TCP 0x00000800 /* L4 Packet TYPE of TCP */
-#define E1000_ADVTXD_TUCMD_L4T_SCTP 0x00001000 /* L4 Packet TYPE of SCTP */
-#define E1000_ADVTXD_TUCMD_IPSEC_TYPE_ESP 0x00002000 /* IPSec Type ESP */
+#define E1000_ADVTXD_MACLEN_SHIFT 9 /* Adv ctxt desc mac len shift */
+#define E1000_ADVTXD_VLAN_SHIFT 16 /* Adv ctxt vlan tag shift */
+#define E1000_ADVTXD_TUCMD_IPV4 0x00000400 /* IP Packet Type: 1=IPv4 */
+#define E1000_ADVTXD_TUCMD_IPV6 0x00000000 /* IP Packet Type: 0=IPv6 */
+#define E1000_ADVTXD_TUCMD_L4T_UDP 0x00000000 /* L4 Packet TYPE of UDP */
+#define E1000_ADVTXD_TUCMD_L4T_TCP 0x00000800 /* L4 Packet TYPE of TCP */
+#define E1000_ADVTXD_TUCMD_L4T_SCTP 0x00001000 /* L4 Packet TYPE of SCTP */
+#define E1000_ADVTXD_TUCMD_IPSEC_TYPE_ESP 0x00002000 /* IPSec Type ESP */
/* IPSec Encrypt Enable for ESP */
-#define E1000_ADVTXD_TUCMD_IPSEC_ENCRYPT_EN 0x00004000
-#define E1000_ADVTXD_TUCMD_MKRREQ 0x00002000 /* Req requires Markers and CRC */
-#define E1000_ADVTXD_L4LEN_SHIFT 8 /* Adv ctxt L4LEN shift */
-#define E1000_ADVTXD_MSS_SHIFT 16 /* Adv ctxt MSS shift */
+#define E1000_ADVTXD_TUCMD_IPSEC_ENCRYPT_EN 0x00004000
+/* Req requires Markers and CRC */
+#define E1000_ADVTXD_TUCMD_MKRREQ 0x00002000
+#define E1000_ADVTXD_L4LEN_SHIFT 8 /* Adv ctxt L4LEN shift */
+#define E1000_ADVTXD_MSS_SHIFT 16 /* Adv ctxt MSS shift */
/* Adv ctxt IPSec SA IDX mask */
-#define E1000_ADVTXD_IPSEC_SA_INDEX_MASK 0x000000FF
+#define E1000_ADVTXD_IPSEC_SA_INDEX_MASK 0x000000FF
/* Adv ctxt IPSec ESP len mask */
-#define E1000_ADVTXD_IPSEC_ESP_LEN_MASK 0x000000FF
+#define E1000_ADVTXD_IPSEC_ESP_LEN_MASK 0x000000FF
/* Additional Transmit Descriptor Control definitions */
-#define E1000_TXDCTL_QUEUE_ENABLE 0x02000000 /* Enable specific Tx Queue */
-#define E1000_TXDCTL_SWFLSH 0x04000000 /* Tx Desc. write-back flushing */
+#define E1000_TXDCTL_QUEUE_ENABLE 0x02000000 /* Ena specific Tx Queue */
+#define E1000_TXDCTL_SWFLSH 0x04000000 /* Tx Desc. wbk flushing */
/* Tx Queue Arbitration Priority 0=low, 1=high */
-#define E1000_TXDCTL_PRIORITY 0x08000000
+#define E1000_TXDCTL_PRIORITY 0x08000000
/* Additional Receive Descriptor Control definitions */
-#define E1000_RXDCTL_QUEUE_ENABLE 0x02000000 /* Enable specific Rx Queue */
-#define E1000_RXDCTL_SWFLSH 0x04000000 /* Rx Desc. write-back flushing */
+#define E1000_RXDCTL_QUEUE_ENABLE 0x02000000 /* Ena specific Rx Queue */
+#define E1000_RXDCTL_SWFLSH 0x04000000 /* Rx Desc. wbk flushing */
/* Direct Cache Access (DCA) definitions */
-#define E1000_DCA_CTRL_DCA_ENABLE 0x00000000 /* DCA Enable */
-#define E1000_DCA_CTRL_DCA_DISABLE 0x00000001 /* DCA Disable */
+#define E1000_DCA_CTRL_DCA_ENABLE 0x00000000 /* DCA Enable */
+#define E1000_DCA_CTRL_DCA_DISABLE 0x00000001 /* DCA Disable */
-#define E1000_DCA_CTRL_DCA_MODE_CB1 0x00 /* DCA Mode CB1 */
-#define E1000_DCA_CTRL_DCA_MODE_CB2 0x02 /* DCA Mode CB2 */
+#define E1000_DCA_CTRL_DCA_MODE_CB1 0x00 /* DCA Mode CB1 */
+#define E1000_DCA_CTRL_DCA_MODE_CB2 0x02 /* DCA Mode CB2 */
-#define E1000_DCA_RXCTRL_CPUID_MASK 0x0000001F /* Rx CPUID Mask */
-#define E1000_DCA_RXCTRL_DESC_DCA_EN (1 << 5) /* DCA Rx Desc enable */
-#define E1000_DCA_RXCTRL_HEAD_DCA_EN (1 << 6) /* DCA Rx Desc header enable */
-#define E1000_DCA_RXCTRL_DATA_DCA_EN (1 << 7) /* DCA Rx Desc payload enable */
+#define E1000_DCA_RXCTRL_CPUID_MASK 0x0000001F /* Rx CPUID Mask */
+#define E1000_DCA_RXCTRL_DESC_DCA_EN (1 << 5) /* DCA Rx Desc enable */
+#define E1000_DCA_RXCTRL_HEAD_DCA_EN (1 << 6) /* DCA Rx Desc header ena */
+#define E1000_DCA_RXCTRL_DATA_DCA_EN (1 << 7) /* DCA Rx Desc payload ena */
-#define E1000_DCA_TXCTRL_CPUID_MASK 0x0000001F /* Tx CPUID Mask */
-#define E1000_DCA_TXCTRL_DESC_DCA_EN (1 << 5) /* DCA Tx Desc enable */
-#define E1000_DCA_TXCTRL_TX_WB_RO_EN (1 << 11) /* Tx Desc writeback RO bit */
+#define E1000_DCA_TXCTRL_CPUID_MASK 0x0000001F /* Tx CPUID Mask */
+#define E1000_DCA_TXCTRL_DESC_DCA_EN (1 << 5) /* DCA Tx Desc enable */
+#define E1000_DCA_TXCTRL_TX_WB_RO_EN (1 << 11) /* Tx Desc writeback RO bit */
-#define E1000_DCA_TXCTRL_CPUID_MASK_82576 0xFF000000 /* Tx CPUID Mask */
-#define E1000_DCA_RXCTRL_CPUID_MASK_82576 0xFF000000 /* Rx CPUID Mask */
-#define E1000_DCA_TXCTRL_CPUID_SHIFT_82576 24 /* Tx CPUID */
-#define E1000_DCA_RXCTRL_CPUID_SHIFT_82576 24 /* Rx CPUID */
+#define E1000_DCA_TXCTRL_CPUID_MASK_82576 0xFF000000 /* Tx CPUID Mask */
+#define E1000_DCA_RXCTRL_CPUID_MASK_82576 0xFF000000 /* Rx CPUID Mask */
+#define E1000_DCA_TXCTRL_CPUID_SHIFT_82576 24 /* Tx CPUID */
+#define E1000_DCA_RXCTRL_CPUID_SHIFT_82576 24 /* Rx CPUID */
/* Additional interrupt register bit definitions */
-#define E1000_ICR_LSECPNS 0x00000020 /* PN threshold - server */
-#define E1000_IMS_LSECPNS E1000_ICR_LSECPNS /* PN threshold - server */
-#define E1000_ICS_LSECPNS E1000_ICR_LSECPNS /* PN threshold - server */
+#define E1000_ICR_LSECPNS 0x00000020 /* PN threshold - server */
+#define E1000_IMS_LSECPNS E1000_ICR_LSECPNS /* PN threshold - server */
+#define E1000_ICS_LSECPNS E1000_ICR_LSECPNS /* PN threshold - server */
/* ETQF register bit definitions */
-#define E1000_ETQF_FILTER_ENABLE (1 << 26)
-#define E1000_ETQF_IMM_INT (1 << 29)
-#define E1000_ETQF_1588 (1 << 30)
-#define E1000_ETQF_QUEUE_ENABLE (1 << 31)
+#define E1000_ETQF_FILTER_ENABLE (1 << 26)
+#define E1000_ETQF_IMM_INT (1 << 29)
+#define E1000_ETQF_1588 (1 << 30)
+#define E1000_ETQF_QUEUE_ENABLE (1 << 31)
/*
* ETQF filter list: one static filter per filter consumer. This is
* to avoid filter collisions later. Add new filters
@@ -385,87 +388,89 @@ struct e1000_adv_tx_context_desc {
* Current filters:
* EAPOL 802.1x (0x888e): Filter 0
*/
-#define E1000_ETQF_FILTER_EAPOL 0
-
-#define E1000_FTQF_VF_BP 0x00008000
-#define E1000_FTQF_1588_TIME_STAMP 0x08000000
-#define E1000_FTQF_MASK 0xF0000000
-#define E1000_FTQF_MASK_PROTO_BP 0x10000000
-#define E1000_FTQF_MASK_SOURCE_ADDR_BP 0x20000000
-#define E1000_FTQF_MASK_DEST_ADDR_BP 0x40000000
-#define E1000_FTQF_MASK_SOURCE_PORT_BP 0x80000000
-
-#define E1000_NVM_APME_82575 0x0400
-#define MAX_NUM_VFS 8
-
-#define E1000_DTXSWC_MAC_SPOOF_MASK 0x000000FF /* Per VF MAC spoof control */
-#define E1000_DTXSWC_VLAN_SPOOF_MASK 0x0000FF00 /* Per VF VLAN spoof control */
-#define E1000_DTXSWC_LLE_MASK 0x00FF0000 /* Per VF Local LB enables */
-#define E1000_DTXSWC_VLAN_SPOOF_SHIFT 8
-#define E1000_DTXSWC_LLE_SHIFT 16
-#define E1000_DTXSWC_VMDQ_LOOPBACK_EN (1 << 31) /* global VF LB enable */
+#define E1000_ETQF_FILTER_EAPOL 0
+
+#define E1000_FTQF_VF_BP 0x00008000
+#define E1000_FTQF_1588_TIME_STAMP 0x08000000
+#define E1000_FTQF_MASK 0xF0000000
+#define E1000_FTQF_MASK_PROTO_BP 0x10000000
+#define E1000_FTQF_MASK_SOURCE_ADDR_BP 0x20000000
+#define E1000_FTQF_MASK_DEST_ADDR_BP 0x40000000
+#define E1000_FTQF_MASK_SOURCE_PORT_BP 0x80000000
+
+#define E1000_NVM_APME_82575 0x0400
+#define MAX_NUM_VFS 7
+
+#define E1000_DTXSWC_MAC_SPOOF_MASK 0x000000FF /* Per VF MAC spoof cntrl */
+#define E1000_DTXSWC_VLAN_SPOOF_MASK 0x0000FF00 /* Per VF VLAN spoof cntrl */
+#define E1000_DTXSWC_LLE_MASK 0x00FF0000 /* Per VF Local LB enables */
+#define E1000_DTXSWC_VLAN_SPOOF_SHIFT 8
+#define E1000_DTXSWC_LLE_SHIFT 16
+#define E1000_DTXSWC_VMDQ_LOOPBACK_EN (1 << 31) /* global VF LB enable */
/* Easy defines for setting default pool, would normally be left a zero */
-#define E1000_VT_CTL_DEFAULT_POOL_SHIFT 7
-#define E1000_VT_CTL_DEFAULT_POOL_MASK (0x7 << E1000_VT_CTL_DEFAULT_POOL_SHIFT)
+#define E1000_VT_CTL_DEFAULT_POOL_SHIFT 7
+#define E1000_VT_CTL_DEFAULT_POOL_MASK (0x7 << E1000_VT_CTL_DEFAULT_POOL_SHIFT)
/* Other useful VMD_CTL register defines */
-#define E1000_VT_CTL_IGNORE_MAC (1 << 28)
-#define E1000_VT_CTL_DISABLE_DEF_POOL (1 << 29)
-#define E1000_VT_CTL_VM_REPL_EN (1 << 30)
+#define E1000_VT_CTL_IGNORE_MAC (1 << 28)
+#define E1000_VT_CTL_DISABLE_DEF_POOL (1 << 29)
+#define E1000_VT_CTL_VM_REPL_EN (1 << 30)
/* Per VM Offload register setup */
-#define E1000_VMOLR_RLPML_MASK 0x00003FFF /* Long Packet Maximum Length mask */
-#define E1000_VMOLR_LPE 0x00010000 /* Accept Long packet */
-#define E1000_VMOLR_RSSE 0x00020000 /* Enable RSS */
-#define E1000_VMOLR_AUPE 0x01000000 /* Accept untagged packets */
-#define E1000_VMOLR_ROMPE 0x02000000 /* Accept overflow multicast */
-#define E1000_VMOLR_ROPE 0x04000000 /* Accept overflow unicast */
-#define E1000_VMOLR_BAM 0x08000000 /* Accept Broadcast packets */
-#define E1000_VMOLR_MPME 0x10000000 /* Multicast promiscuous mode */
-#define E1000_VMOLR_STRVLAN 0x40000000 /* Vlan stripping enable */
-#define E1000_VMOLR_STRCRC 0x80000000 /* CRC stripping enable */
-
-#define E1000_VMOLR_VPE 0x00800000 /* VLAN promiscuous enable */
-#define E1000_VMOLR_UPE 0x20000000 /* Unicast promisuous enable */
-#define E1000_DVMOLR_HIDVLAN 0x20000000 /* Vlan hiding enable */
-#define E1000_DVMOLR_STRVLAN 0x40000000 /* Vlan stripping enable */
-#define E1000_DVMOLR_STRCRC 0x80000000 /* CRC stripping enable */
-
-#define E1000_PBRWAC_WALPB 0x00000007 /* Wrap around event on LAN Rx PB */
-#define E1000_PBRWAC_PBE 0x00000008 /* Rx packet buffer empty */
-
-#define E1000_VLVF_ARRAY_SIZE 32
-#define E1000_VLVF_VLANID_MASK 0x00000FFF
-#define E1000_VLVF_POOLSEL_SHIFT 12
-#define E1000_VLVF_POOLSEL_MASK (0xFF << E1000_VLVF_POOLSEL_SHIFT)
-#define E1000_VLVF_LVLAN 0x00100000
-#define E1000_VLVF_VLANID_ENABLE 0x80000000
-
-#define E1000_VMVIR_VLANA_DEFAULT 0x40000000 /* Always use default VLAN */
-#define E1000_VMVIR_VLANA_NEVER 0x80000000 /* Never insert VLAN tag */
-
-#define E1000_VF_INIT_TIMEOUT 200 /* Number of retries to clear RSTI */
-
-#define E1000_IOVCTL 0x05BBC
-#define E1000_IOVCTL_REUSE_VFQ 0x00000001
-
-#define E1000_RPLOLR_STRVLAN 0x40000000
-#define E1000_RPLOLR_STRCRC 0x80000000
-
-#define E1000_TCTL_EXT_COLD 0x000FFC00
-#define E1000_TCTL_EXT_COLD_SHIFT 10
-
-#define E1000_DTXCTL_8023LL 0x0004
-#define E1000_DTXCTL_VLAN_ADDED 0x0008
-#define E1000_DTXCTL_OOS_ENABLE 0x0010
-#define E1000_DTXCTL_MDP_EN 0x0020
-#define E1000_DTXCTL_SPOOF_INT 0x0040
-
-#define ALL_QUEUES 0xFFFF
+#define E1000_VMOLR_RLPML_MASK 0x00003FFF /* Long Packet Maximum Length mask */
+#define E1000_VMOLR_LPE 0x00010000 /* Accept Long packet */
+#define E1000_VMOLR_RSSE 0x00020000 /* Enable RSS */
+#define E1000_VMOLR_AUPE 0x01000000 /* Accept untagged packets */
+#define E1000_VMOLR_ROMPE 0x02000000 /* Accept overflow multicast */
+#define E1000_VMOLR_ROPE 0x04000000 /* Accept overflow unicast */
+#define E1000_VMOLR_BAM 0x08000000 /* Accept Broadcast packets */
+#define E1000_VMOLR_MPME 0x10000000 /* Multicast promiscuous mode */
+#define E1000_VMOLR_STRVLAN 0x40000000 /* Vlan stripping enable */
+#define E1000_VMOLR_STRCRC 0x80000000 /* CRC stripping enable */
+
+#define E1000_VMOLR_VPE 0x00800000 /* VLAN promiscuous enable */
+#define E1000_VMOLR_UPE 0x20000000 /* Unicast promisuous enable */
+#define E1000_DVMOLR_HIDVLAN 0x20000000 /* Vlan hiding enable */
+#define E1000_DVMOLR_STRVLAN 0x40000000 /* Vlan stripping enable */
+#define E1000_DVMOLR_STRCRC 0x80000000 /* CRC stripping enable */
+
+#define E1000_PBRWAC_WALPB 0x00000007 /* Wrap around event on LAN Rx PB */
+#define E1000_PBRWAC_PBE 0x00000008 /* Rx packet buffer empty */
+
+#define E1000_VLVF_ARRAY_SIZE 32
+#define E1000_VLVF_VLANID_MASK 0x00000FFF
+#define E1000_VLVF_POOLSEL_SHIFT 12
+#define E1000_VLVF_POOLSEL_MASK (0xFF << E1000_VLVF_POOLSEL_SHIFT)
+#define E1000_VLVF_LVLAN 0x00100000
+#define E1000_VLVF_VLANID_ENABLE 0x80000000
+
+#define E1000_VMVIR_VLANA_DEFAULT 0x40000000 /* Always use default VLAN */
+#define E1000_VMVIR_VLANA_NEVER 0x80000000 /* Never insert VLAN tag */
+
+#define E1000_VF_INIT_TIMEOUT 200 /* Number of retries to clear RSTI */
+
+#define E1000_IOVCTL 0x05BBC
+#define E1000_IOVCTL_REUSE_VFQ 0x00000001
+
+#define E1000_RPLOLR_STRVLAN 0x40000000
+#define E1000_RPLOLR_STRCRC 0x80000000
+
+#define E1000_TCTL_EXT_COLD 0x000FFC00
+#define E1000_TCTL_EXT_COLD_SHIFT 10
+
+#define E1000_DTXCTL_8023LL 0x0004
+#define E1000_DTXCTL_VLAN_ADDED 0x0008
+#define E1000_DTXCTL_OOS_ENABLE 0x0010
+#define E1000_DTXCTL_MDP_EN 0x0020
+#define E1000_DTXCTL_SPOOF_INT 0x0040
+
+#define E1000_EEPROM_PCS_AUTONEG_DISABLE_BIT (1 << 14)
+
+#define ALL_QUEUES 0xFFFF
/* Rx packet buffer size defines */
-#define E1000_RXPBS_SIZE_MASK_82576 0x0000007F
+#define E1000_RXPBS_SIZE_MASK_82576 0x0000007F
void e1000_vmdq_set_loopback_pf(struct e1000_hw *hw, bool enable);
void e1000_vmdq_set_anti_spoofing_pf(struct e1000_hw *hw, bool enable, int pf);
void e1000_vmdq_set_replication_pf(struct e1000_hw *hw, bool enable);
@@ -484,4 +489,23 @@ void e1000_rlpml_set_vf(struct e1000_hw *, u16);
s32 e1000_promisc_set_vf(struct e1000_hw *, enum e1000_promisc_type type);
u16 e1000_rxpbs_adjust_82580(u32 data);
s32 e1000_set_eee_i350(struct e1000_hw *);
+
+/* I2C SDA and SCL timing parameters for standard mode */
+#define E1000_I2C_T_HD_STA 4
+#define E1000_I2C_T_LOW 5
+#define E1000_I2C_T_HIGH 4
+#define E1000_I2C_T_SU_STA 5
+#define E1000_I2C_T_HD_DATA 5
+#define E1000_I2C_T_SU_DATA 1
+#define E1000_I2C_T_RISE 1
+#define E1000_I2C_T_FALL 1
+#define E1000_I2C_T_SU_STO 4
+#define E1000_I2C_T_BUF 5
+
+s32 e1000_set_i2c_bb(struct e1000_hw *hw);
+s32 e1000_read_i2c_byte_generic(struct e1000_hw *hw, u8 byte_offset,
+ u8 dev_addr, u8 *data);
+s32 e1000_write_i2c_byte_generic(struct e1000_hw *hw, u8 byte_offset,
+ u8 dev_addr, u8 data);
+void e1000_i2c_bus_clear(struct e1000_hw *hw);
#endif /* _E1000_82575_H_ */
diff --git a/sys/dev/e1000/e1000_api.c b/sys/dev/e1000/e1000_api.c
index b470cdd..fdfc4bb 100644
--- a/sys/dev/e1000/e1000_api.c
+++ b/sys/dev/e1000/e1000_api.c
@@ -1,6 +1,6 @@
/******************************************************************************
- Copyright (c) 2001-2010, Intel Corporation
+ Copyright (c) 2001-2011, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -277,7 +277,6 @@ s32 e1000_set_mac_type(struct e1000_hw *hw)
case E1000_DEV_ID_ICH10_D_BM_LM:
case E1000_DEV_ID_ICH10_D_BM_LF:
case E1000_DEV_ID_ICH10_D_BM_V:
- case E1000_DEV_ID_ICH10_HANKSVILLE:
mac->type = e1000_ich10lan;
break;
case E1000_DEV_ID_PCH_D_HV_DM:
@@ -293,7 +292,6 @@ s32 e1000_set_mac_type(struct e1000_hw *hw)
case E1000_DEV_ID_82575EB_COPPER:
case E1000_DEV_ID_82575EB_FIBER_SERDES:
case E1000_DEV_ID_82575GB_QUAD_COPPER:
- case E1000_DEV_ID_82575GB_QUAD_COPPER_PM:
mac->type = e1000_82575;
break;
case E1000_DEV_ID_82576:
@@ -322,6 +320,7 @@ s32 e1000_set_mac_type(struct e1000_hw *hw)
case E1000_DEV_ID_I350_FIBER:
case E1000_DEV_ID_I350_SERDES:
case E1000_DEV_ID_I350_SGMII:
+ case E1000_DEV_ID_I350_DA4:
mac->type = e1000_i350;
break;
case E1000_DEV_ID_82576_VF:
@@ -343,10 +342,10 @@ s32 e1000_set_mac_type(struct e1000_hw *hw)
* e1000_setup_init_funcs - Initializes function pointers
* @hw: pointer to the HW structure
* @init_device: TRUE will initialize the rest of the function pointers
- * getting the device ready for use. FALSE will only set
- * MAC type and the function pointers for the other init
- * functions. Passing FALSE will not generate any hardware
- * reads or writes.
+ * getting the device ready for use. FALSE will only set
+ * MAC type and the function pointers for the other init
+ * functions. Passing FALSE will not generate any hardware
+ * reads or writes.
*
* This function must be called by a driver in order to use the rest
* of the 'shared' code files. Called by drivers only.
@@ -518,11 +517,11 @@ void e1000_write_vfta(struct e1000_hw *hw, u32 offset, u32 value)
* The caller must have a packed mc_addr_list of multicast addresses.
**/
void e1000_update_mc_addr_list(struct e1000_hw *hw, u8 *mc_addr_list,
- u32 mc_addr_count)
+ u32 mc_addr_count)
{
if (hw->mac.ops.update_mc_addr_list)
hw->mac.ops.update_mc_addr_list(hw, mc_addr_list,
- mc_addr_count);
+ mc_addr_count);
}
/**
@@ -856,12 +855,12 @@ bool e1000_enable_tx_pkt_filtering(struct e1000_hw *hw)
* It also does alignment considerations to do the writes in most efficient
* way. Also fills up the sum of the buffer in *buffer parameter.
**/
-s32 e1000_mng_host_if_write(struct e1000_hw * hw, u8 *buffer, u16 length,
- u16 offset, u8 *sum)
+s32 e1000_mng_host_if_write(struct e1000_hw *hw, u8 *buffer, u16 length,
+ u16 offset, u8 *sum)
{
if (hw->mac.ops.mng_host_if_write)
return hw->mac.ops.mng_host_if_write(hw, buffer, length,
- offset, sum);
+ offset, sum);
return E1000_NOT_IMPLEMENTED;
}
@@ -874,7 +873,7 @@ s32 e1000_mng_host_if_write(struct e1000_hw * hw, u8 *buffer, u16 length,
* Writes the command header after does the checksum calculation.
**/
s32 e1000_mng_write_cmd_header(struct e1000_hw *hw,
- struct e1000_host_mng_command_header *hdr)
+ struct e1000_host_mng_command_header *hdr)
{
if (hw->mac.ops.mng_write_cmd_header)
return hw->mac.ops.mng_write_cmd_header(hw, hdr);
@@ -892,7 +891,7 @@ s32 e1000_mng_write_cmd_header(struct e1000_hw *hw,
* and also checks whether the previous command is completed. It busy waits
* in case of previous command is not completed.
**/
-s32 e1000_mng_enable_host_if(struct e1000_hw * hw)
+s32 e1000_mng_enable_host_if(struct e1000_hw *hw)
{
if (hw->mac.ops.mng_enable_host_if)
return hw->mac.ops.mng_enable_host_if(hw);
@@ -1277,7 +1276,7 @@ s32 e1000_write_nvm(struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
* This is a function pointer entry point called by drivers.
**/
s32 e1000_write_8bit_ctrl_reg(struct e1000_hw *hw, u32 reg, u32 offset,
- u8 data)
+ u8 data)
{
return e1000_write_8bit_ctrl_reg_generic(hw, reg, offset, data);
}
diff --git a/sys/dev/e1000/e1000_api.h b/sys/dev/e1000/e1000_api.h
index 2621a6e..70aaa15 100644
--- a/sys/dev/e1000/e1000_api.h
+++ b/sys/dev/e1000/e1000_api.h
@@ -1,6 +1,6 @@
/******************************************************************************
- Copyright (c) 2001-2010, Intel Corporation
+ Copyright (c) 2001-2011, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -37,90 +37,87 @@
#include "e1000_hw.h"
-extern void e1000_init_function_pointers_82542(struct e1000_hw *hw);
-extern void e1000_init_function_pointers_82543(struct e1000_hw *hw);
-extern void e1000_init_function_pointers_82540(struct e1000_hw *hw);
-extern void e1000_init_function_pointers_82571(struct e1000_hw *hw);
-extern void e1000_init_function_pointers_82541(struct e1000_hw *hw);
-extern void e1000_init_function_pointers_80003es2lan(struct e1000_hw *hw);
-extern void e1000_init_function_pointers_ich8lan(struct e1000_hw *hw);
-extern void e1000_init_function_pointers_82575(struct e1000_hw *hw);
-extern void e1000_rx_fifo_flush_82575(struct e1000_hw *hw);
-extern void e1000_init_function_pointers_vf(struct e1000_hw *hw);
-extern void e1000_power_up_fiber_serdes_link(struct e1000_hw *hw);
-extern void e1000_shutdown_fiber_serdes_link(struct e1000_hw *hw);
+extern void e1000_init_function_pointers_82542(struct e1000_hw *hw);
+extern void e1000_init_function_pointers_82543(struct e1000_hw *hw);
+extern void e1000_init_function_pointers_82540(struct e1000_hw *hw);
+extern void e1000_init_function_pointers_82571(struct e1000_hw *hw);
+extern void e1000_init_function_pointers_82541(struct e1000_hw *hw);
+extern void e1000_init_function_pointers_80003es2lan(struct e1000_hw *hw);
+extern void e1000_init_function_pointers_ich8lan(struct e1000_hw *hw);
+extern void e1000_init_function_pointers_82575(struct e1000_hw *hw);
+extern void e1000_rx_fifo_flush_82575(struct e1000_hw *hw);
+extern void e1000_init_function_pointers_vf(struct e1000_hw *hw);
+extern void e1000_power_up_fiber_serdes_link(struct e1000_hw *hw);
+extern void e1000_shutdown_fiber_serdes_link(struct e1000_hw *hw);
-s32 e1000_set_mac_type(struct e1000_hw *hw);
-s32 e1000_setup_init_funcs(struct e1000_hw *hw, bool init_device);
-s32 e1000_init_mac_params(struct e1000_hw *hw);
-s32 e1000_init_nvm_params(struct e1000_hw *hw);
-s32 e1000_init_phy_params(struct e1000_hw *hw);
-s32 e1000_init_mbx_params(struct e1000_hw *hw);
-s32 e1000_get_bus_info(struct e1000_hw *hw);
+s32 e1000_set_mac_type(struct e1000_hw *hw);
+s32 e1000_setup_init_funcs(struct e1000_hw *hw, bool init_device);
+s32 e1000_init_mac_params(struct e1000_hw *hw);
+s32 e1000_init_nvm_params(struct e1000_hw *hw);
+s32 e1000_init_phy_params(struct e1000_hw *hw);
+s32 e1000_init_mbx_params(struct e1000_hw *hw);
+s32 e1000_get_bus_info(struct e1000_hw *hw);
void e1000_clear_vfta(struct e1000_hw *hw);
void e1000_write_vfta(struct e1000_hw *hw, u32 offset, u32 value);
-s32 e1000_force_mac_fc(struct e1000_hw *hw);
-s32 e1000_check_for_link(struct e1000_hw *hw);
-s32 e1000_reset_hw(struct e1000_hw *hw);
-s32 e1000_init_hw(struct e1000_hw *hw);
-s32 e1000_setup_link(struct e1000_hw *hw);
-s32 e1000_get_speed_and_duplex(struct e1000_hw *hw, u16 *speed,
- u16 *duplex);
-s32 e1000_disable_pcie_master(struct e1000_hw *hw);
+s32 e1000_force_mac_fc(struct e1000_hw *hw);
+s32 e1000_check_for_link(struct e1000_hw *hw);
+s32 e1000_reset_hw(struct e1000_hw *hw);
+s32 e1000_init_hw(struct e1000_hw *hw);
+s32 e1000_setup_link(struct e1000_hw *hw);
+s32 e1000_get_speed_and_duplex(struct e1000_hw *hw, u16 *speed, u16 *duplex);
+s32 e1000_disable_pcie_master(struct e1000_hw *hw);
void e1000_config_collision_dist(struct e1000_hw *hw);
void e1000_rar_set(struct e1000_hw *hw, u8 *addr, u32 index);
-u32 e1000_hash_mc_addr(struct e1000_hw *hw, u8 *mc_addr);
-void e1000_update_mc_addr_list(struct e1000_hw *hw,
- u8 *mc_addr_list, u32 mc_addr_count);
-s32 e1000_setup_led(struct e1000_hw *hw);
-s32 e1000_cleanup_led(struct e1000_hw *hw);
-s32 e1000_check_reset_block(struct e1000_hw *hw);
-s32 e1000_blink_led(struct e1000_hw *hw);
-s32 e1000_led_on(struct e1000_hw *hw);
-s32 e1000_led_off(struct e1000_hw *hw);
+u32 e1000_hash_mc_addr(struct e1000_hw *hw, u8 *mc_addr);
+void e1000_update_mc_addr_list(struct e1000_hw *hw, u8 *mc_addr_list,
+ u32 mc_addr_count);
+s32 e1000_setup_led(struct e1000_hw *hw);
+s32 e1000_cleanup_led(struct e1000_hw *hw);
+s32 e1000_check_reset_block(struct e1000_hw *hw);
+s32 e1000_blink_led(struct e1000_hw *hw);
+s32 e1000_led_on(struct e1000_hw *hw);
+s32 e1000_led_off(struct e1000_hw *hw);
s32 e1000_id_led_init(struct e1000_hw *hw);
void e1000_reset_adaptive(struct e1000_hw *hw);
void e1000_update_adaptive(struct e1000_hw *hw);
-s32 e1000_get_cable_length(struct e1000_hw *hw);
-s32 e1000_validate_mdi_setting(struct e1000_hw *hw);
-s32 e1000_read_phy_reg(struct e1000_hw *hw, u32 offset, u16 *data);
-s32 e1000_write_phy_reg(struct e1000_hw *hw, u32 offset, u16 data);
-s32 e1000_write_8bit_ctrl_reg(struct e1000_hw *hw, u32 reg,
- u32 offset, u8 data);
-s32 e1000_get_phy_info(struct e1000_hw *hw);
+s32 e1000_get_cable_length(struct e1000_hw *hw);
+s32 e1000_validate_mdi_setting(struct e1000_hw *hw);
+s32 e1000_read_phy_reg(struct e1000_hw *hw, u32 offset, u16 *data);
+s32 e1000_write_phy_reg(struct e1000_hw *hw, u32 offset, u16 data);
+s32 e1000_write_8bit_ctrl_reg(struct e1000_hw *hw, u32 reg, u32 offset,
+ u8 data);
+s32 e1000_get_phy_info(struct e1000_hw *hw);
void e1000_release_phy(struct e1000_hw *hw);
-s32 e1000_acquire_phy(struct e1000_hw *hw);
-s32 e1000_cfg_on_link_up(struct e1000_hw *hw);
-s32 e1000_phy_hw_reset(struct e1000_hw *hw);
-s32 e1000_phy_commit(struct e1000_hw *hw);
+s32 e1000_acquire_phy(struct e1000_hw *hw);
+s32 e1000_cfg_on_link_up(struct e1000_hw *hw);
+s32 e1000_phy_hw_reset(struct e1000_hw *hw);
+s32 e1000_phy_commit(struct e1000_hw *hw);
void e1000_power_up_phy(struct e1000_hw *hw);
void e1000_power_down_phy(struct e1000_hw *hw);
-s32 e1000_read_mac_addr(struct e1000_hw *hw);
-s32 e1000_read_pba_string(struct e1000_hw *hw, u8 *pba_num,
- u32 pba_num_size);
-s32 e1000_read_pba_length(struct e1000_hw *hw, u32 *pba_num_size);
+s32 e1000_read_mac_addr(struct e1000_hw *hw);
+s32 e1000_read_pba_string(struct e1000_hw *hw, u8 *pba_num, u32 pba_num_size);
+s32 e1000_read_pba_length(struct e1000_hw *hw, u32 *pba_num_size);
void e1000_reload_nvm(struct e1000_hw *hw);
-s32 e1000_update_nvm_checksum(struct e1000_hw *hw);
-s32 e1000_validate_nvm_checksum(struct e1000_hw *hw);
-s32 e1000_read_nvm(struct e1000_hw *hw, u16 offset, u16 words, u16 *data);
-s32 e1000_read_kmrn_reg(struct e1000_hw *hw, u32 offset, u16 *data);
-s32 e1000_write_kmrn_reg(struct e1000_hw *hw, u32 offset, u16 data);
-s32 e1000_write_nvm(struct e1000_hw *hw, u16 offset, u16 words,
- u16 *data);
-s32 e1000_wait_autoneg(struct e1000_hw *hw);
-s32 e1000_set_d3_lplu_state(struct e1000_hw *hw, bool active);
-s32 e1000_set_d0_lplu_state(struct e1000_hw *hw, bool active);
+s32 e1000_update_nvm_checksum(struct e1000_hw *hw);
+s32 e1000_validate_nvm_checksum(struct e1000_hw *hw);
+s32 e1000_read_nvm(struct e1000_hw *hw, u16 offset, u16 words, u16 *data);
+s32 e1000_read_kmrn_reg(struct e1000_hw *hw, u32 offset, u16 *data);
+s32 e1000_write_kmrn_reg(struct e1000_hw *hw, u32 offset, u16 data);
+s32 e1000_write_nvm(struct e1000_hw *hw, u16 offset, u16 words, u16 *data);
+s32 e1000_wait_autoneg(struct e1000_hw *hw);
+s32 e1000_set_d3_lplu_state(struct e1000_hw *hw, bool active);
+s32 e1000_set_d0_lplu_state(struct e1000_hw *hw, bool active);
bool e1000_check_mng_mode(struct e1000_hw *hw);
bool e1000_enable_tx_pkt_filtering(struct e1000_hw *hw);
-s32 e1000_mng_enable_host_if(struct e1000_hw *hw);
-s32 e1000_mng_host_if_write(struct e1000_hw *hw,
- u8 *buffer, u16 length, u16 offset, u8 *sum);
-s32 e1000_mng_write_cmd_header(struct e1000_hw *hw,
- struct e1000_host_mng_command_header *hdr);
-s32 e1000_mng_write_dhcp_info(struct e1000_hw * hw,
- u8 *buffer, u16 length);
+s32 e1000_mng_enable_host_if(struct e1000_hw *hw);
+s32 e1000_mng_host_if_write(struct e1000_hw *hw, u8 *buffer, u16 length,
+ u16 offset, u8 *sum);
+s32 e1000_mng_write_cmd_header(struct e1000_hw *hw,
+ struct e1000_host_mng_command_header *hdr);
+s32 e1000_mng_write_dhcp_info(struct e1000_hw *hw, u8 *buffer, u16 length);
u32 e1000_translate_register_82542(u32 reg);
+
/*
* TBI_ACCEPT macro definition:
*
@@ -152,14 +149,15 @@ u32 e1000_translate_register_82542(u32 reg);
/* The carrier extension symbol, as received by the NIC. */
#define CARRIER_EXTENSION 0x0F
-#define TBI_ACCEPT(a, status, errors, length, last_byte, min_frame_size, max_frame_size) \
- (e1000_tbi_sbp_enabled_82543(a) && \
- (((errors) & E1000_RXD_ERR_FRAME_ERR_MASK) == E1000_RXD_ERR_CE) && \
- ((last_byte) == CARRIER_EXTENSION) && \
- (((status) & E1000_RXD_STAT_VP) ? \
- (((length) > (min_frame_size - VLAN_TAG_SIZE)) && \
- ((length) <= (max_frame_size + 1))) : \
- (((length) > min_frame_size) && \
- ((length) <= (max_frame_size + VLAN_TAG_SIZE + 1)))))
+#define TBI_ACCEPT(a, status, errors, length, last_byte, \
+ min_frame_size, max_frame_size) \
+ (e1000_tbi_sbp_enabled_82543(a) && \
+ (((errors) & E1000_RXD_ERR_FRAME_ERR_MASK) == E1000_RXD_ERR_CE) && \
+ ((last_byte) == CARRIER_EXTENSION) && \
+ (((status) & E1000_RXD_STAT_VP) ? \
+ (((length) > (min_frame_size - VLAN_TAG_SIZE)) && \
+ ((length) <= (max_frame_size + 1))) : \
+ (((length) > min_frame_size) && \
+ ((length) <= (max_frame_size + VLAN_TAG_SIZE + 1)))))
#endif
diff --git a/sys/dev/e1000/e1000_defines.h b/sys/dev/e1000/e1000_defines.h
index fd6a128..69ef386 100644
--- a/sys/dev/e1000/e1000_defines.h
+++ b/sys/dev/e1000/e1000_defines.h
@@ -1,6 +1,6 @@
/******************************************************************************
- Copyright (c) 2001-2010, Intel Corporation
+ Copyright (c) 2001-2011, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -41,815 +41,826 @@
/* Definitions for power management and wakeup registers */
/* Wake Up Control */
-#define E1000_WUC_APME 0x00000001 /* APM Enable */
-#define E1000_WUC_PME_EN 0x00000002 /* PME Enable */
-#define E1000_WUC_PME_STATUS 0x00000004 /* PME Status */
-#define E1000_WUC_APMPME 0x00000008 /* Assert PME on APM Wakeup */
-#define E1000_WUC_LSCWE 0x00000010 /* Link Status wake up enable */
-#define E1000_WUC_PPROXYE 0x00000010 /* Protocol Proxy Enable */
-#define E1000_WUC_LSCWO 0x00000020 /* Link Status wake up override */
-#define E1000_WUC_SPM 0x80000000 /* Enable SPM */
-#define E1000_WUC_PHY_WAKE 0x00000100 /* if PHY supports wakeup */
-#define E1000_WUC_FLX6_PHY 0x4000 /* Flexible Filter 6 Enable */
-#define E1000_WUC_FLX7_PHY 0x8000 /* Flexible Filter 7 Enable */
+#define E1000_WUC_APME 0x00000001 /* APM Enable */
+#define E1000_WUC_PME_EN 0x00000002 /* PME Enable */
+#define E1000_WUC_PME_STATUS 0x00000004 /* PME Status */
+#define E1000_WUC_APMPME 0x00000008 /* Assert PME on APM Wakeup */
+#define E1000_WUC_LSCWE 0x00000010 /* Link Status wake up enable */
+#define E1000_WUC_PPROXYE 0x00000010 /* Protocol Proxy Enable */
+#define E1000_WUC_LSCWO 0x00000020 /* Link Status wake up override */
+#define E1000_WUC_SPM 0x80000000 /* Enable SPM */
+#define E1000_WUC_PHY_WAKE 0x00000100 /* if PHY supports wakeup */
+#define E1000_WUC_FLX6_PHY 0x4000 /* Flexible Filter 6 Enable */
+#define E1000_WUC_FLX7_PHY 0x8000 /* Flexible Filter 7 Enable */
/* Wake Up Filter Control */
-#define E1000_WUFC_LNKC 0x00000001 /* Link Status Change Wakeup Enable */
-#define E1000_WUFC_MAG 0x00000002 /* Magic Packet Wakeup Enable */
-#define E1000_WUFC_EX 0x00000004 /* Directed Exact Wakeup Enable */
-#define E1000_WUFC_MC 0x00000008 /* Directed Multicast Wakeup Enable */
-#define E1000_WUFC_BC 0x00000010 /* Broadcast Wakeup Enable */
-#define E1000_WUFC_ARP 0x00000020 /* ARP Request Packet Wakeup Enable */
-#define E1000_WUFC_IPV4 0x00000040 /* Directed IPv4 Packet Wakeup Enable */
-#define E1000_WUFC_IPV6 0x00000080 /* Directed IPv6 Packet Wakeup Enable */
+#define E1000_WUFC_LNKC 0x00000001 /* Link Status Change Wakeup Enable */
+#define E1000_WUFC_MAG 0x00000002 /* Magic Packet Wakeup Enable */
+#define E1000_WUFC_EX 0x00000004 /* Directed Exact Wakeup Enable */
+#define E1000_WUFC_MC 0x00000008 /* Directed Multicast Wakeup Enable */
+#define E1000_WUFC_BC 0x00000010 /* Broadcast Wakeup Enable */
+#define E1000_WUFC_ARP 0x00000020 /* ARP Request Packet Wakeup Enable */
+#define E1000_WUFC_IPV4 0x00000040 /* Directed IPv4 Packet Wakeup Enable */
+#define E1000_WUFC_IPV6 0x00000080 /* Directed IPv6 Packet Wakeup Enable */
#define E1000_WUFC_IGNORE_TCO_PHY 0x00000800 /* Ignore WakeOn TCO packets */
-#define E1000_WUFC_FLX0_PHY 0x00001000 /* Flexible Filter 0 Enable */
-#define E1000_WUFC_FLX1_PHY 0x00002000 /* Flexible Filter 1 Enable */
-#define E1000_WUFC_FLX2_PHY 0x00004000 /* Flexible Filter 2 Enable */
-#define E1000_WUFC_FLX3_PHY 0x00008000 /* Flexible Filter 3 Enable */
-#define E1000_WUFC_FLX4_PHY 0x00000200 /* Flexible Filter 4 Enable */
-#define E1000_WUFC_FLX5_PHY 0x00000400 /* Flexible Filter 5 Enable */
-#define E1000_WUFC_IGNORE_TCO 0x00008000 /* Ignore WakeOn TCO packets */
-#define E1000_WUFC_FLX0 0x00010000 /* Flexible Filter 0 Enable */
-#define E1000_WUFC_FLX1 0x00020000 /* Flexible Filter 1 Enable */
-#define E1000_WUFC_FLX2 0x00040000 /* Flexible Filter 2 Enable */
-#define E1000_WUFC_FLX3 0x00080000 /* Flexible Filter 3 Enable */
-#define E1000_WUFC_FLX4 0x00100000 /* Flexible Filter 4 Enable */
-#define E1000_WUFC_FLX5 0x00200000 /* Flexible Filter 5 Enable */
-#define E1000_WUFC_FLX6 0x00400000 /* Flexible Filter 6 Enable */
-#define E1000_WUFC_FLX7 0x00800000 /* Flexible Filter 7 Enable */
-#define E1000_WUFC_FW_RST 0x80000000 /* Wake on FW Reset Enable */
-#define E1000_WUFC_ALL_FILTERS_PHY_4 0x0000F0FF /*Mask for all wakeup filters*/
-#define E1000_WUFC_FLX_OFFSET_PHY 12 /* Offset to the Flexible Filters bits */
-#define E1000_WUFC_FLX_FILTERS_PHY_4 0x0000F000 /*Mask for 4 flexible filters*/
-#define E1000_WUFC_ALL_FILTERS_PHY_6 0x0000F6FF /*Mask for 6 wakeup filters */
-#define E1000_WUFC_FLX_FILTERS_PHY_6 0x0000F600 /*Mask for 6 flexible filters*/
-#define E1000_WUFC_ALL_FILTERS 0x000F00FF /* Mask for all wakeup filters */
-#define E1000_WUFC_ALL_FILTERS_6 0x003F00FF /* Mask for all 6 wakeup filters*/
-#define E1000_WUFC_ALL_FILTERS_8 0x00FF00FF /* Mask for all 8 wakeup filters*/
-#define E1000_WUFC_FLX_OFFSET 16 /* Offset to the Flexible Filters bits */
-#define E1000_WUFC_FLX_FILTERS 0x000F0000 /*Mask for the 4 flexible filters */
-#define E1000_WUFC_FLX_FILTERS_6 0x003F0000 /* Mask for 6 flexible filters */
-#define E1000_WUFC_FLX_FILTERS_8 0x00FF0000 /* Mask for 8 flexible filters */
+#define E1000_WUFC_FLX0_PHY 0x00001000 /* Flexible Filter 0 Enable */
+#define E1000_WUFC_FLX1_PHY 0x00002000 /* Flexible Filter 1 Enable */
+#define E1000_WUFC_FLX2_PHY 0x00004000 /* Flexible Filter 2 Enable */
+#define E1000_WUFC_FLX3_PHY 0x00008000 /* Flexible Filter 3 Enable */
+#define E1000_WUFC_FLX4_PHY 0x00000200 /* Flexible Filter 4 Enable */
+#define E1000_WUFC_FLX5_PHY 0x00000400 /* Flexible Filter 5 Enable */
+#define E1000_WUFC_IGNORE_TCO 0x00008000 /* Ignore WakeOn TCO packets */
+#define E1000_WUFC_FLX0 0x00010000 /* Flexible Filter 0 Enable */
+#define E1000_WUFC_FLX1 0x00020000 /* Flexible Filter 1 Enable */
+#define E1000_WUFC_FLX2 0x00040000 /* Flexible Filter 2 Enable */
+#define E1000_WUFC_FLX3 0x00080000 /* Flexible Filter 3 Enable */
+#define E1000_WUFC_FLX4 0x00100000 /* Flexible Filter 4 Enable */
+#define E1000_WUFC_FLX5 0x00200000 /* Flexible Filter 5 Enable */
+#define E1000_WUFC_FLX6 0x00400000 /* Flexible Filter 6 Enable */
+#define E1000_WUFC_FLX7 0x00800000 /* Flexible Filter 7 Enable */
+#define E1000_WUFC_FW_RST 0x80000000 /* Wake on FW Reset Enable */
+#define E1000_WUFC_ALL_FILTERS_PHY_4 0x0000F0FF /* wakeup filters mask */
+#define E1000_WUFC_FLX_OFFSET_PHY 12 /* Flexible Filters bits offset */
+#define E1000_WUFC_FLX_FILTERS_PHY_4 0x0000F000 /* 4 flexible filters mask */
+#define E1000_WUFC_ALL_FILTERS_PHY_6 0x0000F6FF /* 6 wakeup filters mask */
+#define E1000_WUFC_FLX_FILTERS_PHY_6 0x0000F600 /* 6 flexible filters mask */
+#define E1000_WUFC_ALL_FILTERS 0x000F00FF /* all wakeup filters mask */
+#define E1000_WUFC_ALL_FILTERS_6 0x003F00FF /* Mask all 6 wu filters */
+#define E1000_WUFC_ALL_FILTERS_8 0x00FF00FF /* Mask all 8 wu filters */
+#define E1000_WUFC_FLX_OFFSET 16 /* Flexible Filters bits offset */
+#define E1000_WUFC_FLX_FILTERS 0x000F0000 /* 4 flexible filters mask */
+#define E1000_WUFC_FLX_FILTERS_6 0x003F0000 /* 6 flexible filters mask */
+#define E1000_WUFC_FLX_FILTERS_8 0x00FF0000 /* 8 flexible filters mask */
/*
* For 82576 to utilize Extended filter masks in addition to
* existing (filter) masks
*/
-#define E1000_WUFC_EXT_FLX_FILTERS 0x00300000 /* Ext. FLX filter mask */
+#define E1000_WUFC_EXT_FLX_FILTERS 0x00300000 /* Ext. FLX filter mask */
/* Wake Up Status */
-#define E1000_WUS_LNKC E1000_WUFC_LNKC
-#define E1000_WUS_MAG E1000_WUFC_MAG
-#define E1000_WUS_EX E1000_WUFC_EX
-#define E1000_WUS_MC E1000_WUFC_MC
-#define E1000_WUS_BC E1000_WUFC_BC
-#define E1000_WUS_ARP E1000_WUFC_ARP
-#define E1000_WUS_IPV4 E1000_WUFC_IPV4
-#define E1000_WUS_IPV6 E1000_WUFC_IPV6
-#define E1000_WUS_FLX0_PHY E1000_WUFC_FLX0_PHY
-#define E1000_WUS_FLX1_PHY E1000_WUFC_FLX1_PHY
-#define E1000_WUS_FLX2_PHY E1000_WUFC_FLX2_PHY
-#define E1000_WUS_FLX3_PHY E1000_WUFC_FLX3_PHY
-#define E1000_WUS_FLX_FILTERS_PHY_4 E1000_WUFC_FLX_FILTERS_PHY_4
-#define E1000_WUS_FLX0 E1000_WUFC_FLX0
-#define E1000_WUS_FLX1 E1000_WUFC_FLX1
-#define E1000_WUS_FLX2 E1000_WUFC_FLX2
-#define E1000_WUS_FLX3 E1000_WUFC_FLX3
-#define E1000_WUS_FLX4 E1000_WUFC_FLX4
-#define E1000_WUS_FLX5 E1000_WUFC_FLX5
-#define E1000_WUS_FLX6 E1000_WUFC_FLX6
-#define E1000_WUS_FLX7 E1000_WUFC_FLX7
-#define E1000_WUS_FLX4_PHY E1000_WUFC_FLX4_PHY
-#define E1000_WUS_FLX5_PHY E1000_WUFC_FLX5_PHY
-#define E1000_WUS_FLX6_PHY 0x0400
-#define E1000_WUS_FLX7_PHY 0x0800
-#define E1000_WUS_FLX_FILTERS E1000_WUFC_FLX_FILTERS
-#define E1000_WUS_FLX_FILTERS_6 E1000_WUFC_FLX_FILTERS_6
-#define E1000_WUS_FLX_FILTERS_8 E1000_WUFC_FLX_FILTERS_8
-#define E1000_WUS_FLX_FILTERS_PHY_6 E1000_WUFC_FLX_FILTERS_PHY_6
+#define E1000_WUS_LNKC E1000_WUFC_LNKC
+#define E1000_WUS_MAG E1000_WUFC_MAG
+#define E1000_WUS_EX E1000_WUFC_EX
+#define E1000_WUS_MC E1000_WUFC_MC
+#define E1000_WUS_BC E1000_WUFC_BC
+#define E1000_WUS_ARP E1000_WUFC_ARP
+#define E1000_WUS_IPV4 E1000_WUFC_IPV4
+#define E1000_WUS_IPV6 E1000_WUFC_IPV6
+#define E1000_WUS_FLX0_PHY E1000_WUFC_FLX0_PHY
+#define E1000_WUS_FLX1_PHY E1000_WUFC_FLX1_PHY
+#define E1000_WUS_FLX2_PHY E1000_WUFC_FLX2_PHY
+#define E1000_WUS_FLX3_PHY E1000_WUFC_FLX3_PHY
+#define E1000_WUS_FLX_FILTERS_PHY_4 E1000_WUFC_FLX_FILTERS_PHY_4
+#define E1000_WUS_FLX0 E1000_WUFC_FLX0
+#define E1000_WUS_FLX1 E1000_WUFC_FLX1
+#define E1000_WUS_FLX2 E1000_WUFC_FLX2
+#define E1000_WUS_FLX3 E1000_WUFC_FLX3
+#define E1000_WUS_FLX4 E1000_WUFC_FLX4
+#define E1000_WUS_FLX5 E1000_WUFC_FLX5
+#define E1000_WUS_FLX6 E1000_WUFC_FLX6
+#define E1000_WUS_FLX7 E1000_WUFC_FLX7
+#define E1000_WUS_FLX4_PHY E1000_WUFC_FLX4_PHY
+#define E1000_WUS_FLX5_PHY E1000_WUFC_FLX5_PHY
+#define E1000_WUS_FLX6_PHY 0x0400
+#define E1000_WUS_FLX7_PHY 0x0800
+#define E1000_WUS_FLX_FILTERS E1000_WUFC_FLX_FILTERS
+#define E1000_WUS_FLX_FILTERS_6 E1000_WUFC_FLX_FILTERS_6
+#define E1000_WUS_FLX_FILTERS_8 E1000_WUFC_FLX_FILTERS_8
+#define E1000_WUS_FLX_FILTERS_PHY_6 E1000_WUFC_FLX_FILTERS_PHY_6
/* Wake Up Packet Length */
-#define E1000_WUPL_LENGTH_MASK 0x0FFF /* Only the lower 12 bits are valid */
+#define E1000_WUPL_LENGTH_MASK 0x0FFF /* Only the lower 12 bits are valid */
/* Four Flexible Filters are supported */
-#define E1000_FLEXIBLE_FILTER_COUNT_MAX 4
+#define E1000_FLEXIBLE_FILTER_COUNT_MAX 4
/* Six Flexible Filters are supported */
-#define E1000_FLEXIBLE_FILTER_COUNT_MAX_6 6
+#define E1000_FLEXIBLE_FILTER_COUNT_MAX_6 6
/* Eight Flexible Filters are supported */
-#define E1000_FLEXIBLE_FILTER_COUNT_MAX_8 8
+#define E1000_FLEXIBLE_FILTER_COUNT_MAX_8 8
/* Two Extended Flexible Filters are supported (82576) */
-#define E1000_EXT_FLEXIBLE_FILTER_COUNT_MAX 2
-#define E1000_FHFT_LENGTH_OFFSET 0xFC /* Length byte in FHFT */
-#define E1000_FHFT_LENGTH_MASK 0x0FF /* Length in lower byte */
+#define E1000_EXT_FLEXIBLE_FILTER_COUNT_MAX 2
+#define E1000_FHFT_LENGTH_OFFSET 0xFC /* Length byte in FHFT */
+#define E1000_FHFT_LENGTH_MASK 0x0FF /* Length in lower byte */
/* Each Flexible Filter is at most 128 (0x80) bytes in length */
-#define E1000_FLEXIBLE_FILTER_SIZE_MAX 128
+#define E1000_FLEXIBLE_FILTER_SIZE_MAX 128
-#define E1000_FFLT_SIZE E1000_FLEXIBLE_FILTER_COUNT_MAX
-#define E1000_FFLT_SIZE_6 E1000_FLEXIBLE_FILTER_COUNT_MAX_6
-#define E1000_FFLT_SIZE_8 E1000_FLEXIBLE_FILTER_COUNT_MAX_8
-#define E1000_FFMT_SIZE E1000_FLEXIBLE_FILTER_SIZE_MAX
-#define E1000_FFVT_SIZE E1000_FLEXIBLE_FILTER_SIZE_MAX
+#define E1000_FFLT_SIZE E1000_FLEXIBLE_FILTER_COUNT_MAX
+#define E1000_FFLT_SIZE_6 E1000_FLEXIBLE_FILTER_COUNT_MAX_6
+#define E1000_FFLT_SIZE_8 E1000_FLEXIBLE_FILTER_COUNT_MAX_8
+#define E1000_FFMT_SIZE E1000_FLEXIBLE_FILTER_SIZE_MAX
+#define E1000_FFVT_SIZE E1000_FLEXIBLE_FILTER_SIZE_MAX
/* Extended Device Control */
-#define E1000_CTRL_EXT_GPI0_EN 0x00000001 /* Maps SDP4 to GPI0 */
-#define E1000_CTRL_EXT_GPI1_EN 0x00000002 /* Maps SDP5 to GPI1 */
-#define E1000_CTRL_EXT_PHYINT_EN E1000_CTRL_EXT_GPI1_EN
-#define E1000_CTRL_EXT_GPI2_EN 0x00000004 /* Maps SDP6 to GPI2 */
-#define E1000_CTRL_EXT_GPI3_EN 0x00000008 /* Maps SDP7 to GPI3 */
+#define E1000_CTRL_EXT_GPI0_EN 0x00000001 /* Maps SDP4 to GPI0 */
+#define E1000_CTRL_EXT_GPI1_EN 0x00000002 /* Maps SDP5 to GPI1 */
+#define E1000_CTRL_EXT_PHYINT_EN E1000_CTRL_EXT_GPI1_EN
+#define E1000_CTRL_EXT_GPI2_EN 0x00000004 /* Maps SDP6 to GPI2 */
+#define E1000_CTRL_EXT_GPI3_EN 0x00000008 /* Maps SDP7 to GPI3 */
/* Reserved (bits 4,5) in >= 82575 */
-#define E1000_CTRL_EXT_SDP4_DATA 0x00000010 /* Value of SW Definable Pin 4 */
-#define E1000_CTRL_EXT_SDP5_DATA 0x00000020 /* Value of SW Definable Pin 5 */
-#define E1000_CTRL_EXT_PHY_INT E1000_CTRL_EXT_SDP5_DATA
-#define E1000_CTRL_EXT_SDP6_DATA 0x00000040 /* Value of SW Definable Pin 6 */
-#define E1000_CTRL_EXT_SDP3_DATA 0x00000080 /* Value of SW Definable Pin 3 */
+#define E1000_CTRL_EXT_SDP4_DATA 0x00000010 /* SW Definable Pin 4 data */
+#define E1000_CTRL_EXT_SDP5_DATA 0x00000020 /* SW Definable Pin 5 data */
+#define E1000_CTRL_EXT_PHY_INT E1000_CTRL_EXT_SDP5_DATA
+#define E1000_CTRL_EXT_SDP6_DATA 0x00000040 /* SW Definable Pin 6 data */
+#define E1000_CTRL_EXT_SDP3_DATA 0x00000080 /* SW Definable Pin 3 data */
/* SDP 4/5 (bits 8,9) are reserved in >= 82575 */
-#define E1000_CTRL_EXT_SDP4_DIR 0x00000100 /* Direction of SDP4 0=in 1=out */
-#define E1000_CTRL_EXT_SDP5_DIR 0x00000200 /* Direction of SDP5 0=in 1=out */
-#define E1000_CTRL_EXT_SDP6_DIR 0x00000400 /* Direction of SDP6 0=in 1=out */
-#define E1000_CTRL_EXT_SDP3_DIR 0x00000800 /* Direction of SDP3 0=in 1=out */
-#define E1000_CTRL_EXT_ASDCHK 0x00001000 /* Initiate an ASD sequence */
-#define E1000_CTRL_EXT_EE_RST 0x00002000 /* Reinitialize from EEPROM */
-#define E1000_CTRL_EXT_IPS 0x00004000 /* Invert Power State */
+#define E1000_CTRL_EXT_SDP4_DIR 0x00000100 /* Direction of SDP4 0=in 1=out */
+#define E1000_CTRL_EXT_SDP5_DIR 0x00000200 /* Direction of SDP5 0=in 1=out */
+#define E1000_CTRL_EXT_SDP6_DIR 0x00000400 /* Direction of SDP6 0=in 1=out */
+#define E1000_CTRL_EXT_SDP3_DIR 0x00000800 /* Direction of SDP3 0=in 1=out */
+#define E1000_CTRL_EXT_ASDCHK 0x00001000 /* Initiate an ASD sequence */
+#define E1000_CTRL_EXT_EE_RST 0x00002000 /* Reinitialize from EEPROM */
+#define E1000_CTRL_EXT_IPS 0x00004000 /* Invert Power State */
/* Physical Func Reset Done Indication */
-#define E1000_CTRL_EXT_PFRSTD 0x00004000
-#define E1000_CTRL_EXT_SPD_BYPS 0x00008000 /* Speed Select Bypass */
-#define E1000_CTRL_EXT_RO_DIS 0x00020000 /* Relaxed Ordering disable */
-#define E1000_CTRL_EXT_DMA_DYN_CLK_EN 0x00080000 /* DMA Dynamic Clock Gating */
-#define E1000_CTRL_EXT_LINK_MODE_MASK 0x00C00000
-#define E1000_CTRL_EXT_LINK_MODE_82580_MASK 0x01C00000 /*82580 bit 24:22*/
-#define E1000_CTRL_EXT_LINK_MODE_1000BASE_KX 0x00400000
-#define E1000_CTRL_EXT_LINK_MODE_GMII 0x00000000
-#define E1000_CTRL_EXT_LINK_MODE_TBI 0x00C00000
-#define E1000_CTRL_EXT_LINK_MODE_KMRN 0x00000000
-#define E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES 0x00C00000
-#define E1000_CTRL_EXT_LINK_MODE_PCIX_SERDES 0x00800000
-#define E1000_CTRL_EXT_LINK_MODE_SGMII 0x00800000
-#define E1000_CTRL_EXT_EIAME 0x01000000
-#define E1000_CTRL_EXT_IRCA 0x00000001
-#define E1000_CTRL_EXT_WR_WMARK_MASK 0x03000000
-#define E1000_CTRL_EXT_WR_WMARK_256 0x00000000
-#define E1000_CTRL_EXT_WR_WMARK_320 0x01000000
-#define E1000_CTRL_EXT_WR_WMARK_384 0x02000000
-#define E1000_CTRL_EXT_WR_WMARK_448 0x03000000
-#define E1000_CTRL_EXT_CANC 0x04000000 /* Int delay cancellation */
-#define E1000_CTRL_EXT_DRV_LOAD 0x10000000 /* Driver loaded bit for FW */
+#define E1000_CTRL_EXT_PFRSTD 0x00004000
+#define E1000_CTRL_EXT_SPD_BYPS 0x00008000 /* Speed Select Bypass */
+#define E1000_CTRL_EXT_RO_DIS 0x00020000 /* Relaxed Ordering disable */
+#define E1000_CTRL_EXT_DMA_DYN_CLK_EN 0x00080000 /* DMA Dynamic Clk Gating */
+#define E1000_CTRL_EXT_LINK_MODE_MASK 0x00C00000
+/* Offset of the link mode field in Ctrl Ext register */
+#define E1000_CTRL_EXT_LINK_MODE_OFFSET 22
+#define E1000_CTRL_EXT_LINK_MODE_82580_MASK 0x01C00000 /*82580 bit 24:22*/
+#define E1000_CTRL_EXT_LINK_MODE_1000BASE_KX 0x00400000
+#define E1000_CTRL_EXT_LINK_MODE_GMII 0x00000000
+#define E1000_CTRL_EXT_LINK_MODE_TBI 0x00C00000
+#define E1000_CTRL_EXT_LINK_MODE_KMRN 0x00000000
+#define E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES 0x00C00000
+#define E1000_CTRL_EXT_LINK_MODE_PCIX_SERDES 0x00800000
+#define E1000_CTRL_EXT_LINK_MODE_SGMII 0x00800000
+#define E1000_CTRL_EXT_EIAME 0x01000000
+#define E1000_CTRL_EXT_IRCA 0x00000001
+#define E1000_CTRL_EXT_WR_WMARK_MASK 0x03000000
+#define E1000_CTRL_EXT_WR_WMARK_256 0x00000000
+#define E1000_CTRL_EXT_WR_WMARK_320 0x01000000
+#define E1000_CTRL_EXT_WR_WMARK_384 0x02000000
+#define E1000_CTRL_EXT_WR_WMARK_448 0x03000000
+#define E1000_CTRL_EXT_CANC 0x04000000 /* Int delay cancellation */
+#define E1000_CTRL_EXT_DRV_LOAD 0x10000000 /* Drv loaded bit for FW */
/* IAME enable bit (27) was removed in >= 82575 */
-#define E1000_CTRL_EXT_IAME 0x08000000 /* Int acknowledge Auto-mask */
-#define E1000_CRTL_EXT_PB_PAREN 0x01000000 /* packet buffer parity error
- * detection enabled */
-#define E1000_CTRL_EXT_DF_PAREN 0x02000000 /* descriptor FIFO parity
- * error detection enable */
-#define E1000_CTRL_EXT_GHOST_PAREN 0x40000000
-#define E1000_CTRL_EXT_PBA_CLR 0x80000000 /* PBA Clear */
-#define E1000_CTRL_EXT_LSECCK 0x00001000
-#define E1000_CTRL_EXT_PHYPDEN 0x00100000
-#define E1000_I2CCMD_REG_ADDR_SHIFT 16
-#define E1000_I2CCMD_REG_ADDR 0x00FF0000
-#define E1000_I2CCMD_PHY_ADDR_SHIFT 24
-#define E1000_I2CCMD_PHY_ADDR 0x07000000
-#define E1000_I2CCMD_OPCODE_READ 0x08000000
-#define E1000_I2CCMD_OPCODE_WRITE 0x00000000
-#define E1000_I2CCMD_RESET 0x10000000
-#define E1000_I2CCMD_READY 0x20000000
-#define E1000_I2CCMD_INTERRUPT_ENA 0x40000000
-#define E1000_I2CCMD_ERROR 0x80000000
-#define E1000_MAX_SGMII_PHY_REG_ADDR 255
-#define E1000_I2CCMD_PHY_TIMEOUT 200
-#define E1000_IVAR_VALID 0x80
-#define E1000_GPIE_NSICR 0x00000001
-#define E1000_GPIE_MSIX_MODE 0x00000010
-#define E1000_GPIE_EIAME 0x40000000
-#define E1000_GPIE_PBA 0x80000000
+#define E1000_CTRL_EXT_IAME 0x08000000 /* Int ACK Auto-mask */
+/* packet buffer parity error detection enabled */
+#define E1000_CRTL_EXT_PB_PAREN 0x01000000
+/* descriptor FIFO parity error detection enable */
+#define E1000_CTRL_EXT_DF_PAREN 0x02000000
+#define E1000_CTRL_EXT_GHOST_PAREN 0x40000000
+#define E1000_CTRL_EXT_PBA_CLR 0x80000000 /* PBA Clear */
+#define E1000_CTRL_EXT_LSECCK 0x00001000
+#define E1000_CTRL_EXT_PHYPDEN 0x00100000
+#define E1000_I2CCMD_REG_ADDR_SHIFT 16
+#define E1000_I2CCMD_REG_ADDR 0x00FF0000
+#define E1000_I2CCMD_PHY_ADDR_SHIFT 24
+#define E1000_I2CCMD_PHY_ADDR 0x07000000
+#define E1000_I2CCMD_OPCODE_READ 0x08000000
+#define E1000_I2CCMD_OPCODE_WRITE 0x00000000
+#define E1000_I2CCMD_RESET 0x10000000
+#define E1000_I2CCMD_READY 0x20000000
+#define E1000_I2CCMD_INTERRUPT_ENA 0x40000000
+#define E1000_I2CCMD_ERROR 0x80000000
+#define E1000_I2CCMD_SFP_DATA_ADDR(a) (0x0000 + (a))
+#define E1000_I2CCMD_SFP_DIAG_ADDR(a) (0x0100 + (a))
+#define E1000_MAX_SGMII_PHY_REG_ADDR 255
+#define E1000_I2CCMD_PHY_TIMEOUT 200
+#define E1000_IVAR_VALID 0x80
+#define E1000_GPIE_NSICR 0x00000001
+#define E1000_GPIE_MSIX_MODE 0x00000010
+#define E1000_GPIE_EIAME 0x40000000
+#define E1000_GPIE_PBA 0x80000000
/* Receive Descriptor bit definitions */
-#define E1000_RXD_STAT_DD 0x01 /* Descriptor Done */
-#define E1000_RXD_STAT_EOP 0x02 /* End of Packet */
-#define E1000_RXD_STAT_IXSM 0x04 /* Ignore checksum */
-#define E1000_RXD_STAT_VP 0x08 /* IEEE VLAN Packet */
-#define E1000_RXD_STAT_UDPCS 0x10 /* UDP xsum calculated */
-#define E1000_RXD_STAT_TCPCS 0x20 /* TCP xsum calculated */
-#define E1000_RXD_STAT_IPCS 0x40 /* IP xsum calculated */
-#define E1000_RXD_STAT_PIF 0x80 /* passed in-exact filter */
-#define E1000_RXD_STAT_CRCV 0x100 /* Speculative CRC Valid */
-#define E1000_RXD_STAT_IPIDV 0x200 /* IP identification valid */
-#define E1000_RXD_STAT_UDPV 0x400 /* Valid UDP checksum */
-#define E1000_RXD_STAT_DYNINT 0x800 /* Pkt caused INT via DYNINT */
-#define E1000_RXD_STAT_ACK 0x8000 /* ACK Packet indication */
-#define E1000_RXD_ERR_CE 0x01 /* CRC Error */
-#define E1000_RXD_ERR_SE 0x02 /* Symbol Error */
-#define E1000_RXD_ERR_SEQ 0x04 /* Sequence Error */
-#define E1000_RXD_ERR_CXE 0x10 /* Carrier Extension Error */
-#define E1000_RXD_ERR_TCPE 0x20 /* TCP/UDP Checksum Error */
-#define E1000_RXD_ERR_IPE 0x40 /* IP Checksum Error */
-#define E1000_RXD_ERR_RXE 0x80 /* Rx Data Error */
-#define E1000_RXD_SPC_VLAN_MASK 0x0FFF /* VLAN ID is in lower 12 bits */
-#define E1000_RXD_SPC_PRI_MASK 0xE000 /* Priority is in upper 3 bits */
-#define E1000_RXD_SPC_PRI_SHIFT 13
-#define E1000_RXD_SPC_CFI_MASK 0x1000 /* CFI is bit 12 */
-#define E1000_RXD_SPC_CFI_SHIFT 12
-
-#define E1000_RXDEXT_STATERR_LB 0x00040000
-#define E1000_RXDEXT_STATERR_CE 0x01000000
-#define E1000_RXDEXT_STATERR_SE 0x02000000
-#define E1000_RXDEXT_STATERR_SEQ 0x04000000
-#define E1000_RXDEXT_STATERR_CXE 0x10000000
-#define E1000_RXDEXT_STATERR_TCPE 0x20000000
-#define E1000_RXDEXT_STATERR_IPE 0x40000000
-#define E1000_RXDEXT_STATERR_RXE 0x80000000
-
-#define E1000_RXDEXT_LSECH 0x01000000
-#define E1000_RXDEXT_LSECE_MASK 0x60000000
-#define E1000_RXDEXT_LSECE_NO_ERROR 0x00000000
-#define E1000_RXDEXT_LSECE_NO_SA_MATCH 0x20000000
-#define E1000_RXDEXT_LSECE_REPLAY_DETECT 0x40000000
-#define E1000_RXDEXT_LSECE_BAD_SIG 0x60000000
+#define E1000_RXD_STAT_DD 0x01 /* Descriptor Done */
+#define E1000_RXD_STAT_EOP 0x02 /* End of Packet */
+#define E1000_RXD_STAT_IXSM 0x04 /* Ignore checksum */
+#define E1000_RXD_STAT_VP 0x08 /* IEEE VLAN Packet */
+#define E1000_RXD_STAT_UDPCS 0x10 /* UDP xsum calculated */
+#define E1000_RXD_STAT_TCPCS 0x20 /* TCP xsum calculated */
+#define E1000_RXD_STAT_IPCS 0x40 /* IP xsum calculated */
+#define E1000_RXD_STAT_PIF 0x80 /* passed in-exact filter */
+#define E1000_RXD_STAT_CRCV 0x100 /* Speculative CRC Valid */
+#define E1000_RXD_STAT_IPIDV 0x200 /* IP identification valid */
+#define E1000_RXD_STAT_UDPV 0x400 /* Valid UDP checksum */
+#define E1000_RXD_STAT_DYNINT 0x800 /* Pkt caused INT via DYNINT */
+#define E1000_RXD_STAT_ACK 0x8000 /* ACK Packet indication */
+#define E1000_RXD_ERR_CE 0x01 /* CRC Error */
+#define E1000_RXD_ERR_SE 0x02 /* Symbol Error */
+#define E1000_RXD_ERR_SEQ 0x04 /* Sequence Error */
+#define E1000_RXD_ERR_CXE 0x10 /* Carrier Extension Error */
+#define E1000_RXD_ERR_TCPE 0x20 /* TCP/UDP Checksum Error */
+#define E1000_RXD_ERR_IPE 0x40 /* IP Checksum Error */
+#define E1000_RXD_ERR_RXE 0x80 /* Rx Data Error */
+#define E1000_RXD_SPC_VLAN_MASK 0x0FFF /* VLAN ID is in lower 12 bits */
+#define E1000_RXD_SPC_PRI_MASK 0xE000 /* Priority is in upper 3 bits */
+#define E1000_RXD_SPC_PRI_SHIFT 13
+#define E1000_RXD_SPC_CFI_MASK 0x1000 /* CFI is bit 12 */
+#define E1000_RXD_SPC_CFI_SHIFT 12
+
+#define E1000_RXDEXT_STATERR_LB 0x00040000
+#define E1000_RXDEXT_STATERR_CE 0x01000000
+#define E1000_RXDEXT_STATERR_SE 0x02000000
+#define E1000_RXDEXT_STATERR_SEQ 0x04000000
+#define E1000_RXDEXT_STATERR_CXE 0x10000000
+#define E1000_RXDEXT_STATERR_TCPE 0x20000000
+#define E1000_RXDEXT_STATERR_IPE 0x40000000
+#define E1000_RXDEXT_STATERR_RXE 0x80000000
+
+#define E1000_RXDEXT_LSECH 0x01000000
+#define E1000_RXDEXT_LSECE_MASK 0x60000000
+#define E1000_RXDEXT_LSECE_NO_ERROR 0x00000000
+#define E1000_RXDEXT_LSECE_NO_SA_MATCH 0x20000000
+#define E1000_RXDEXT_LSECE_REPLAY_DETECT 0x40000000
+#define E1000_RXDEXT_LSECE_BAD_SIG 0x60000000
/* mask to determine if packets should be dropped due to frame errors */
#define E1000_RXD_ERR_FRAME_ERR_MASK ( \
- E1000_RXD_ERR_CE | \
- E1000_RXD_ERR_SE | \
- E1000_RXD_ERR_SEQ | \
- E1000_RXD_ERR_CXE | \
- E1000_RXD_ERR_RXE)
+ E1000_RXD_ERR_CE | \
+ E1000_RXD_ERR_SE | \
+ E1000_RXD_ERR_SEQ | \
+ E1000_RXD_ERR_CXE | \
+ E1000_RXD_ERR_RXE)
/* Same mask, but for extended and packet split descriptors */
#define E1000_RXDEXT_ERR_FRAME_ERR_MASK ( \
- E1000_RXDEXT_STATERR_CE | \
- E1000_RXDEXT_STATERR_SE | \
- E1000_RXDEXT_STATERR_SEQ | \
- E1000_RXDEXT_STATERR_CXE | \
- E1000_RXDEXT_STATERR_RXE)
-
-#define E1000_MRQC_ENABLE_MASK 0x00000007
-#define E1000_MRQC_ENABLE_RSS_2Q 0x00000001
-#define E1000_MRQC_ENABLE_RSS_INT 0x00000004
-#define E1000_MRQC_RSS_FIELD_MASK 0xFFFF0000
-#define E1000_MRQC_RSS_FIELD_IPV4_TCP 0x00010000
-#define E1000_MRQC_RSS_FIELD_IPV4 0x00020000
-#define E1000_MRQC_RSS_FIELD_IPV6_TCP_EX 0x00040000
-#define E1000_MRQC_RSS_FIELD_IPV6_EX 0x00080000
-#define E1000_MRQC_RSS_FIELD_IPV6 0x00100000
-#define E1000_MRQC_RSS_FIELD_IPV6_TCP 0x00200000
-
-#define E1000_RXDPS_HDRSTAT_HDRSP 0x00008000
-#define E1000_RXDPS_HDRSTAT_HDRLEN_MASK 0x000003FF
+ E1000_RXDEXT_STATERR_CE | \
+ E1000_RXDEXT_STATERR_SE | \
+ E1000_RXDEXT_STATERR_SEQ | \
+ E1000_RXDEXT_STATERR_CXE | \
+ E1000_RXDEXT_STATERR_RXE)
+
+#define E1000_MRQC_ENABLE_MASK 0x00000007
+#define E1000_MRQC_ENABLE_RSS_2Q 0x00000001
+#define E1000_MRQC_ENABLE_RSS_INT 0x00000004
+#define E1000_MRQC_RSS_FIELD_MASK 0xFFFF0000
+#define E1000_MRQC_RSS_FIELD_IPV4_TCP 0x00010000
+#define E1000_MRQC_RSS_FIELD_IPV4 0x00020000
+#define E1000_MRQC_RSS_FIELD_IPV6_TCP_EX 0x00040000
+#define E1000_MRQC_RSS_FIELD_IPV6_EX 0x00080000
+#define E1000_MRQC_RSS_FIELD_IPV6 0x00100000
+#define E1000_MRQC_RSS_FIELD_IPV6_TCP 0x00200000
+
+#define E1000_RXDPS_HDRSTAT_HDRSP 0x00008000
+#define E1000_RXDPS_HDRSTAT_HDRLEN_MASK 0x000003FF
/* Management Control */
-#define E1000_MANC_SMBUS_EN 0x00000001 /* SMBus Enabled - RO */
-#define E1000_MANC_ASF_EN 0x00000002 /* ASF Enabled - RO */
-#define E1000_MANC_R_ON_FORCE 0x00000004 /* Reset on Force TCO - RO */
-#define E1000_MANC_RMCP_EN 0x00000100 /* Enable RCMP 026Fh Filtering */
-#define E1000_MANC_0298_EN 0x00000200 /* Enable RCMP 0298h Filtering */
-#define E1000_MANC_IPV4_EN 0x00000400 /* Enable IPv4 */
-#define E1000_MANC_IPV6_EN 0x00000800 /* Enable IPv6 */
-#define E1000_MANC_SNAP_EN 0x00001000 /* Accept LLC/SNAP */
-#define E1000_MANC_ARP_EN 0x00002000 /* Enable ARP Request Filtering */
+#define E1000_MANC_SMBUS_EN 0x00000001 /* SMBus Enabled - RO */
+#define E1000_MANC_ASF_EN 0x00000002 /* ASF Enabled - RO */
+#define E1000_MANC_R_ON_FORCE 0x00000004 /* Reset on Force TCO - RO */
+#define E1000_MANC_RMCP_EN 0x00000100 /* Enable RCMP 026Fh Filtering */
+#define E1000_MANC_0298_EN 0x00000200 /* Enable RCMP 0298h Filtering */
+#define E1000_MANC_IPV4_EN 0x00000400 /* Enable IPv4 */
+#define E1000_MANC_IPV6_EN 0x00000800 /* Enable IPv6 */
+#define E1000_MANC_SNAP_EN 0x00001000 /* Accept LLC/SNAP */
+#define E1000_MANC_ARP_EN 0x00002000 /* Enable ARP Request Filtering */
/* Enable Neighbor Discovery Filtering */
-#define E1000_MANC_NEIGHBOR_EN 0x00004000
-#define E1000_MANC_ARP_RES_EN 0x00008000 /* Enable ARP response Filtering */
-#define E1000_MANC_TCO_RESET 0x00010000 /* TCO Reset Occurred */
-#define E1000_MANC_RCV_TCO_EN 0x00020000 /* Receive TCO Packets Enabled */
+#define E1000_MANC_NEIGHBOR_EN 0x00004000
+#define E1000_MANC_ARP_RES_EN 0x00008000 /* Enable ARP response Filtering */
+#define E1000_MANC_TCO_RESET 0x00010000 /* TCO Reset Occurred */
+#define E1000_MANC_RCV_TCO_EN 0x00020000 /* Receive TCO Packets Enabled */
#define E1000_MANC_REPORT_STATUS 0x00040000 /* Status Reporting Enabled */
-#define E1000_MANC_RCV_ALL 0x00080000 /* Receive All Enabled */
-#define E1000_MANC_BLK_PHY_RST_ON_IDE 0x00040000 /* Block phy resets */
+#define E1000_MANC_RCV_ALL 0x00080000 /* Receive All Enabled */
+#define E1000_MANC_BLK_PHY_RST_ON_IDE 0x00040000 /* Block phy resets */
/* Enable MAC address filtering */
-#define E1000_MANC_EN_MAC_ADDR_FILTER 0x00100000
+#define E1000_MANC_EN_MAC_ADDR_FILTER 0x00100000
/* Enable MNG packets to host memory */
-#define E1000_MANC_EN_MNG2HOST 0x00200000
+#define E1000_MANC_EN_MNG2HOST 0x00200000
/* Enable IP address filtering */
-#define E1000_MANC_EN_IP_ADDR_FILTER 0x00400000
-#define E1000_MANC_EN_XSUM_FILTER 0x00800000 /* Enable checksum filtering */
-#define E1000_MANC_BR_EN 0x01000000 /* Enable broadcast filtering */
-#define E1000_MANC_SMB_REQ 0x01000000 /* SMBus Request */
-#define E1000_MANC_SMB_GNT 0x02000000 /* SMBus Grant */
-#define E1000_MANC_SMB_CLK_IN 0x04000000 /* SMBus Clock In */
-#define E1000_MANC_SMB_DATA_IN 0x08000000 /* SMBus Data In */
-#define E1000_MANC_SMB_DATA_OUT 0x10000000 /* SMBus Data Out */
-#define E1000_MANC_SMB_CLK_OUT 0x20000000 /* SMBus Clock Out */
-#define E1000_MANC_MPROXYE 0x40000000 /* Mngment Proxy Enable */
-#define E1000_MANC_EN_BMC2OS 0x10000000 /* OS2BMC is enabled or not */
-
-#define E1000_MANC_SMB_DATA_OUT_SHIFT 28 /* SMBus Data Out Shift */
-#define E1000_MANC_SMB_CLK_OUT_SHIFT 29 /* SMBus Clock Out Shift */
-
-#define E1000_MANC2H_PORT_623 0x00000020 /* Port 0x26f */
-#define E1000_MANC2H_PORT_664 0x00000040 /* Port 0x298 */
-#define E1000_MDEF_PORT_623 0x00000800 /* Port 0x26f */
-#define E1000_MDEF_PORT_664 0x00000400 /* Port 0x298 */
+#define E1000_MANC_EN_IP_ADDR_FILTER 0x00400000
+#define E1000_MANC_EN_XSUM_FILTER 0x00800000 /* Ena checksum filtering */
+#define E1000_MANC_BR_EN 0x01000000 /* Ena broadcast filtering */
+#define E1000_MANC_SMB_REQ 0x01000000 /* SMBus Request */
+#define E1000_MANC_SMB_GNT 0x02000000 /* SMBus Grant */
+#define E1000_MANC_SMB_CLK_IN 0x04000000 /* SMBus Clock In */
+#define E1000_MANC_SMB_DATA_IN 0x08000000 /* SMBus Data In */
+#define E1000_MANC_SMB_DATA_OUT 0x10000000 /* SMBus Data Out */
+#define E1000_MANC_SMB_CLK_OUT 0x20000000 /* SMBus Clock Out */
+#define E1000_MANC_MPROXYE 0x40000000 /* Mngment Proxy Enable */
+#define E1000_MANC_EN_BMC2OS 0x10000000 /* OS2BMC is enabld or not */
+
+#define E1000_MANC_SMB_DATA_OUT_SHIFT 28 /* SMBus Data Out Shift */
+#define E1000_MANC_SMB_CLK_OUT_SHIFT 29 /* SMBus Clock Out Shift */
+
+#define E1000_MANC2H_PORT_623 0x00000020 /* Port 0x26f */
+#define E1000_MANC2H_PORT_664 0x00000040 /* Port 0x298 */
+#define E1000_MDEF_PORT_623 0x00000800 /* Port 0x26f */
+#define E1000_MDEF_PORT_664 0x00000400 /* Port 0x298 */
/* Receive Control */
-#define E1000_RCTL_RST 0x00000001 /* Software reset */
-#define E1000_RCTL_EN 0x00000002 /* enable */
-#define E1000_RCTL_SBP 0x00000004 /* store bad packet */
-#define E1000_RCTL_UPE 0x00000008 /* unicast promisc enable */
-#define E1000_RCTL_MPE 0x00000010 /* multicast promisc enable */
-#define E1000_RCTL_LPE 0x00000020 /* long packet enable */
-#define E1000_RCTL_LBM_NO 0x00000000 /* no loopback mode */
-#define E1000_RCTL_LBM_MAC 0x00000040 /* MAC loopback mode */
-#define E1000_RCTL_LBM_SLP 0x00000080 /* serial link loopback mode */
-#define E1000_RCTL_LBM_TCVR 0x000000C0 /* tcvr loopback mode */
-#define E1000_RCTL_DTYP_MASK 0x00000C00 /* Descriptor type mask */
-#define E1000_RCTL_DTYP_PS 0x00000400 /* Packet Split descriptor */
-#define E1000_RCTL_RDMTS_HALF 0x00000000 /* Rx desc min thresh size */
-#define E1000_RCTL_RDMTS_QUAT 0x00000100 /* Rx desc min thresh size */
-#define E1000_RCTL_RDMTS_EIGTH 0x00000200 /* Rx desc min thresh size */
-#define E1000_RCTL_MO_SHIFT 12 /* multicast offset shift */
-#define E1000_RCTL_MO_0 0x00000000 /* multicast offset 11:0 */
-#define E1000_RCTL_MO_1 0x00001000 /* multicast offset 12:1 */
-#define E1000_RCTL_MO_2 0x00002000 /* multicast offset 13:2 */
-#define E1000_RCTL_MO_3 0x00003000 /* multicast offset 15:4 */
-#define E1000_RCTL_MDR 0x00004000 /* multicast desc ring 0 */
-#define E1000_RCTL_BAM 0x00008000 /* broadcast enable */
+#define E1000_RCTL_RST 0x00000001 /* Software reset */
+#define E1000_RCTL_EN 0x00000002 /* enable */
+#define E1000_RCTL_SBP 0x00000004 /* store bad packet */
+#define E1000_RCTL_UPE 0x00000008 /* unicast promisc enable */
+#define E1000_RCTL_MPE 0x00000010 /* multicast promisc enable */
+#define E1000_RCTL_LPE 0x00000020 /* long packet enable */
+#define E1000_RCTL_LBM_NO 0x00000000 /* no loopback mode */
+#define E1000_RCTL_LBM_MAC 0x00000040 /* MAC loopback mode */
+#define E1000_RCTL_LBM_SLP 0x00000080 /* serial link loopback mode */
+#define E1000_RCTL_LBM_TCVR 0x000000C0 /* tcvr loopback mode */
+#define E1000_RCTL_DTYP_MASK 0x00000C00 /* Descriptor type mask */
+#define E1000_RCTL_DTYP_PS 0x00000400 /* Packet Split descriptor */
+#define E1000_RCTL_RDMTS_HALF 0x00000000 /* Rx desc min thresh size */
+#define E1000_RCTL_RDMTS_QUAT 0x00000100 /* Rx desc min thresh size */
+#define E1000_RCTL_RDMTS_EIGTH 0x00000200 /* Rx desc min thresh size */
+#define E1000_RCTL_MO_SHIFT 12 /* multicast offset shift */
+#define E1000_RCTL_MO_0 0x00000000 /* multicast offset 11:0 */
+#define E1000_RCTL_MO_1 0x00001000 /* multicast offset 12:1 */
+#define E1000_RCTL_MO_2 0x00002000 /* multicast offset 13:2 */
+#define E1000_RCTL_MO_3 0x00003000 /* multicast offset 15:4 */
+#define E1000_RCTL_MDR 0x00004000 /* multicast desc ring 0 */
+#define E1000_RCTL_BAM 0x00008000 /* broadcast enable */
/* these buffer sizes are valid if E1000_RCTL_BSEX is 0 */
-#define E1000_RCTL_SZ_2048 0x00000000 /* Rx buffer size 2048 */
-#define E1000_RCTL_SZ_1024 0x00010000 /* Rx buffer size 1024 */
-#define E1000_RCTL_SZ_512 0x00020000 /* Rx buffer size 512 */
-#define E1000_RCTL_SZ_256 0x00030000 /* Rx buffer size 256 */
+#define E1000_RCTL_SZ_2048 0x00000000 /* Rx buffer size 2048 */
+#define E1000_RCTL_SZ_1024 0x00010000 /* Rx buffer size 1024 */
+#define E1000_RCTL_SZ_512 0x00020000 /* Rx buffer size 512 */
+#define E1000_RCTL_SZ_256 0x00030000 /* Rx buffer size 256 */
/* these buffer sizes are valid if E1000_RCTL_BSEX is 1 */
-#define E1000_RCTL_SZ_16384 0x00010000 /* Rx buffer size 16384 */
-#define E1000_RCTL_SZ_8192 0x00020000 /* Rx buffer size 8192 */
-#define E1000_RCTL_SZ_4096 0x00030000 /* Rx buffer size 4096 */
-#define E1000_RCTL_VFE 0x00040000 /* vlan filter enable */
-#define E1000_RCTL_CFIEN 0x00080000 /* canonical form enable */
-#define E1000_RCTL_CFI 0x00100000 /* canonical form indicator */
-#define E1000_RCTL_DPF 0x00400000 /* discard pause frames */
-#define E1000_RCTL_PMCF 0x00800000 /* pass MAC control frames */
-#define E1000_RCTL_BSEX 0x02000000 /* Buffer size extension */
-#define E1000_RCTL_SECRC 0x04000000 /* Strip Ethernet CRC */
-#define E1000_RCTL_FLXBUF_MASK 0x78000000 /* Flexible buffer size */
-#define E1000_RCTL_FLXBUF_SHIFT 27 /* Flexible buffer shift */
+#define E1000_RCTL_SZ_16384 0x00010000 /* Rx buffer size 16384 */
+#define E1000_RCTL_SZ_8192 0x00020000 /* Rx buffer size 8192 */
+#define E1000_RCTL_SZ_4096 0x00030000 /* Rx buffer size 4096 */
+#define E1000_RCTL_VFE 0x00040000 /* vlan filter enable */
+#define E1000_RCTL_CFIEN 0x00080000 /* canonical form enable */
+#define E1000_RCTL_CFI 0x00100000 /* canonical form indicator */
+#define E1000_RCTL_DPF 0x00400000 /* discard pause frames */
+#define E1000_RCTL_PMCF 0x00800000 /* pass MAC control frames */
+#define E1000_RCTL_BSEX 0x02000000 /* Buffer size extension */
+#define E1000_RCTL_SECRC 0x04000000 /* Strip Ethernet CRC */
+#define E1000_RCTL_FLXBUF_MASK 0x78000000 /* Flexible buffer size */
+#define E1000_RCTL_FLXBUF_SHIFT 27 /* Flexible buffer shift */
/*
* Use byte values for the following shift parameters
* Usage:
* psrctl |= (((ROUNDUP(value0, 128) >> E1000_PSRCTL_BSIZE0_SHIFT) &
- * E1000_PSRCTL_BSIZE0_MASK) |
- * ((ROUNDUP(value1, 1024) >> E1000_PSRCTL_BSIZE1_SHIFT) &
- * E1000_PSRCTL_BSIZE1_MASK) |
- * ((ROUNDUP(value2, 1024) << E1000_PSRCTL_BSIZE2_SHIFT) &
- * E1000_PSRCTL_BSIZE2_MASK) |
- * ((ROUNDUP(value3, 1024) << E1000_PSRCTL_BSIZE3_SHIFT) |;
- * E1000_PSRCTL_BSIZE3_MASK))
+ * E1000_PSRCTL_BSIZE0_MASK) |
+ * ((ROUNDUP(value1, 1024) >> E1000_PSRCTL_BSIZE1_SHIFT) &
+ * E1000_PSRCTL_BSIZE1_MASK) |
+ * ((ROUNDUP(value2, 1024) << E1000_PSRCTL_BSIZE2_SHIFT) &
+ * E1000_PSRCTL_BSIZE2_MASK) |
+ * ((ROUNDUP(value3, 1024) << E1000_PSRCTL_BSIZE3_SHIFT) |;
+ * E1000_PSRCTL_BSIZE3_MASK))
* where value0 = [128..16256], default=256
* value1 = [1024..64512], default=4096
* value2 = [0..64512], default=4096
* value3 = [0..64512], default=0
*/
-#define E1000_PSRCTL_BSIZE0_MASK 0x0000007F
-#define E1000_PSRCTL_BSIZE1_MASK 0x00003F00
-#define E1000_PSRCTL_BSIZE2_MASK 0x003F0000
-#define E1000_PSRCTL_BSIZE3_MASK 0x3F000000
+#define E1000_PSRCTL_BSIZE0_MASK 0x0000007F
+#define E1000_PSRCTL_BSIZE1_MASK 0x00003F00
+#define E1000_PSRCTL_BSIZE2_MASK 0x003F0000
+#define E1000_PSRCTL_BSIZE3_MASK 0x3F000000
-#define E1000_PSRCTL_BSIZE0_SHIFT 7 /* Shift _right_ 7 */
-#define E1000_PSRCTL_BSIZE1_SHIFT 2 /* Shift _right_ 2 */
-#define E1000_PSRCTL_BSIZE2_SHIFT 6 /* Shift _left_ 6 */
-#define E1000_PSRCTL_BSIZE3_SHIFT 14 /* Shift _left_ 14 */
+#define E1000_PSRCTL_BSIZE0_SHIFT 7 /* Shift _right_ 7 */
+#define E1000_PSRCTL_BSIZE1_SHIFT 2 /* Shift _right_ 2 */
+#define E1000_PSRCTL_BSIZE2_SHIFT 6 /* Shift _left_ 6 */
+#define E1000_PSRCTL_BSIZE3_SHIFT 14 /* Shift _left_ 14 */
/* SWFW_SYNC Definitions */
-#define E1000_SWFW_EEP_SM 0x01
-#define E1000_SWFW_PHY0_SM 0x02
-#define E1000_SWFW_PHY1_SM 0x04
-#define E1000_SWFW_CSR_SM 0x08
-#define E1000_SWFW_PHY2_SM 0x20
-#define E1000_SWFW_PHY3_SM 0x40
-#define E1000_SWFW_SW_MNG_SM 0x400
+#define E1000_SWFW_EEP_SM 0x01
+#define E1000_SWFW_PHY0_SM 0x02
+#define E1000_SWFW_PHY1_SM 0x04
+#define E1000_SWFW_CSR_SM 0x08
+#define E1000_SWFW_PHY2_SM 0x20
+#define E1000_SWFW_PHY3_SM 0x40
+#define E1000_SWFW_SW_MNG_SM 0x400
/* FACTPS Definitions */
-#define E1000_FACTPS_LFS 0x40000000 /* LAN Function Select */
+#define E1000_FACTPS_LFS 0x40000000 /* LAN Function Select */
/* Device Control */
-#define E1000_CTRL_FD 0x00000001 /* Full duplex.0=half; 1=full */
-#define E1000_CTRL_BEM 0x00000002 /* Endian Mode.0=little,1=big */
-#define E1000_CTRL_PRIOR 0x00000004 /* Priority on PCI. 0=rx,1=fair */
+#define E1000_CTRL_FD 0x00000001 /* Full duplex.0=half; 1=full */
+#define E1000_CTRL_BEM 0x00000002 /* Endian Mode.0=little,1=big */
+#define E1000_CTRL_PRIOR 0x00000004 /* Priority on PCI. 0=rx,1=fair */
#define E1000_CTRL_GIO_MASTER_DISABLE 0x00000004 /*Blocks new Master reqs */
-#define E1000_CTRL_LRST 0x00000008 /* Link reset. 0=normal,1=reset */
-#define E1000_CTRL_TME 0x00000010 /* Test mode. 0=normal,1=test */
-#define E1000_CTRL_SLE 0x00000020 /* Serial Link on 0=dis,1=en */
-#define E1000_CTRL_ASDE 0x00000020 /* Auto-speed detect enable */
-#define E1000_CTRL_SLU 0x00000040 /* Set link up (Force Link) */
-#define E1000_CTRL_ILOS 0x00000080 /* Invert Loss-Of Signal */
-#define E1000_CTRL_SPD_SEL 0x00000300 /* Speed Select Mask */
-#define E1000_CTRL_SPD_10 0x00000000 /* Force 10Mb */
-#define E1000_CTRL_SPD_100 0x00000100 /* Force 100Mb */
-#define E1000_CTRL_SPD_1000 0x00000200 /* Force 1Gb */
-#define E1000_CTRL_BEM32 0x00000400 /* Big Endian 32 mode */
-#define E1000_CTRL_FRCSPD 0x00000800 /* Force Speed */
-#define E1000_CTRL_FRCDPX 0x00001000 /* Force Duplex */
-#define E1000_CTRL_D_UD_EN 0x00002000 /* Dock/Undock enable */
-#define E1000_CTRL_D_UD_POLARITY 0x00004000 /* Defined polarity of Dock/Undock
- * indication in SDP[0] */
-#define E1000_CTRL_FORCE_PHY_RESET 0x00008000 /* Reset both PHY ports, through
- * PHYRST_N pin */
-#define E1000_CTRL_EXT_LINK_EN 0x00010000 /* enable link status from external
- * LINK_0 and LINK_1 pins */
-#define E1000_CTRL_LANPHYPC_OVERRIDE 0x00010000 /* SW control of LANPHYPC */
-#define E1000_CTRL_LANPHYPC_VALUE 0x00020000 /* SW value of LANPHYPC */
-#define E1000_CTRL_SWDPIN0 0x00040000 /* SWDPIN 0 value */
-#define E1000_CTRL_SWDPIN1 0x00080000 /* SWDPIN 1 value */
-#define E1000_CTRL_SWDPIN2 0x00100000 /* SWDPIN 2 value */
-#define E1000_CTRL_ADVD3WUC 0x00100000 /* D3 WUC */
-#define E1000_CTRL_SWDPIN3 0x00200000 /* SWDPIN 3 value */
-#define E1000_CTRL_SWDPIO0 0x00400000 /* SWDPIN 0 Input or output */
-#define E1000_CTRL_SWDPIO1 0x00800000 /* SWDPIN 1 input or output */
-#define E1000_CTRL_SWDPIO2 0x01000000 /* SWDPIN 2 input or output */
-#define E1000_CTRL_SWDPIO3 0x02000000 /* SWDPIN 3 input or output */
-#define E1000_CTRL_RST 0x04000000 /* Global reset */
-#define E1000_CTRL_RFCE 0x08000000 /* Receive Flow Control enable */
-#define E1000_CTRL_TFCE 0x10000000 /* Transmit flow control enable */
-#define E1000_CTRL_RTE 0x20000000 /* Routing tag enable */
-#define E1000_CTRL_VME 0x40000000 /* IEEE VLAN mode enable */
-#define E1000_CTRL_PHY_RST 0x80000000 /* PHY Reset */
-#define E1000_CTRL_SW2FW_INT 0x02000000 /* Initiate an interrupt to ME */
-#define E1000_CTRL_I2C_ENA 0x02000000 /* I2C enable */
+#define E1000_CTRL_LRST 0x00000008 /* Link reset. 0=normal,1=reset */
+#define E1000_CTRL_TME 0x00000010 /* Test mode. 0=normal,1=test */
+#define E1000_CTRL_SLE 0x00000020 /* Serial Link on 0=dis,1=en */
+#define E1000_CTRL_ASDE 0x00000020 /* Auto-speed detect enable */
+#define E1000_CTRL_SLU 0x00000040 /* Set link up (Force Link) */
+#define E1000_CTRL_ILOS 0x00000080 /* Invert Loss-Of Signal */
+#define E1000_CTRL_SPD_SEL 0x00000300 /* Speed Select Mask */
+#define E1000_CTRL_SPD_10 0x00000000 /* Force 10Mb */
+#define E1000_CTRL_SPD_100 0x00000100 /* Force 100Mb */
+#define E1000_CTRL_SPD_1000 0x00000200 /* Force 1Gb */
+#define E1000_CTRL_BEM32 0x00000400 /* Big Endian 32 mode */
+#define E1000_CTRL_FRCSPD 0x00000800 /* Force Speed */
+#define E1000_CTRL_FRCDPX 0x00001000 /* Force Duplex */
+#define E1000_CTRL_D_UD_EN 0x00002000 /* Dock/Undock enable */
+/* Defined polarity of Dock/Undock indication in SDP[0] */
+#define E1000_CTRL_D_UD_POLARITY 0x00004000
+/* Reset both PHY ports, through PHYRST_N pin */
+#define E1000_CTRL_FORCE_PHY_RESET 0x00008000
+/* enable link status from external LINK_0 and LINK_1 pins */
+#define E1000_CTRL_EXT_LINK_EN 0x00010000
+#define E1000_CTRL_LANPHYPC_OVERRIDE 0x00010000 /* SW control of LANPHYPC */
+#define E1000_CTRL_LANPHYPC_VALUE 0x00020000 /* SW value of LANPHYPC */
+#define E1000_CTRL_SWDPIN0 0x00040000 /* SWDPIN 0 value */
+#define E1000_CTRL_SWDPIN1 0x00080000 /* SWDPIN 1 value */
+#define E1000_CTRL_SWDPIN2 0x00100000 /* SWDPIN 2 value */
+#define E1000_CTRL_ADVD3WUC 0x00100000 /* D3 WUC */
+#define E1000_CTRL_SWDPIN3 0x00200000 /* SWDPIN 3 value */
+#define E1000_CTRL_SWDPIO0 0x00400000 /* SWDPIN 0 Input or output */
+#define E1000_CTRL_SWDPIO1 0x00800000 /* SWDPIN 1 input or output */
+#define E1000_CTRL_SWDPIO2 0x01000000 /* SWDPIN 2 input or output */
+#define E1000_CTRL_SWDPIO3 0x02000000 /* SWDPIN 3 input or output */
+#define E1000_CTRL_RST 0x04000000 /* Global reset */
+#define E1000_CTRL_RFCE 0x08000000 /* Receive Flow Control enable */
+#define E1000_CTRL_TFCE 0x10000000 /* Transmit flow control enable */
+#define E1000_CTRL_RTE 0x20000000 /* Routing tag enable */
+#define E1000_CTRL_VME 0x40000000 /* IEEE VLAN mode enable */
+#define E1000_CTRL_PHY_RST 0x80000000 /* PHY Reset */
+#define E1000_CTRL_SW2FW_INT 0x02000000 /* Initiate an interrupt to ME */
+#define E1000_CTRL_I2C_ENA 0x02000000 /* I2C enable */
/*
* Bit definitions for the Management Data IO (MDIO) and Management Data
* Clock (MDC) pins in the Device Control Register.
*/
-#define E1000_CTRL_PHY_RESET_DIR E1000_CTRL_SWDPIO0
-#define E1000_CTRL_PHY_RESET E1000_CTRL_SWDPIN0
-#define E1000_CTRL_MDIO_DIR E1000_CTRL_SWDPIO2
-#define E1000_CTRL_MDIO E1000_CTRL_SWDPIN2
-#define E1000_CTRL_MDC_DIR E1000_CTRL_SWDPIO3
-#define E1000_CTRL_MDC E1000_CTRL_SWDPIN3
-#define E1000_CTRL_PHY_RESET_DIR4 E1000_CTRL_EXT_SDP4_DIR
-#define E1000_CTRL_PHY_RESET4 E1000_CTRL_EXT_SDP4_DATA
-
-#define E1000_CONNSW_ENRGSRC 0x4
-#define E1000_PCS_CFG_PCS_EN 8
-#define E1000_PCS_LCTL_FLV_LINK_UP 1
-#define E1000_PCS_LCTL_FSV_10 0
-#define E1000_PCS_LCTL_FSV_100 2
-#define E1000_PCS_LCTL_FSV_1000 4
-#define E1000_PCS_LCTL_FDV_FULL 8
-#define E1000_PCS_LCTL_FSD 0x10
-#define E1000_PCS_LCTL_FORCE_LINK 0x20
-#define E1000_PCS_LCTL_LOW_LINK_LATCH 0x40
-#define E1000_PCS_LCTL_FORCE_FCTRL 0x80
-#define E1000_PCS_LCTL_AN_ENABLE 0x10000
-#define E1000_PCS_LCTL_AN_RESTART 0x20000
-#define E1000_PCS_LCTL_AN_TIMEOUT 0x40000
-#define E1000_PCS_LCTL_AN_SGMII_BYPASS 0x80000
-#define E1000_PCS_LCTL_AN_SGMII_TRIGGER 0x100000
-#define E1000_PCS_LCTL_FAST_LINK_TIMER 0x1000000
-#define E1000_PCS_LCTL_LINK_OK_FIX 0x2000000
-#define E1000_PCS_LCTL_CRS_ON_NI 0x4000000
-#define E1000_ENABLE_SERDES_LOOPBACK 0x0410
-
-#define E1000_PCS_LSTS_LINK_OK 1
-#define E1000_PCS_LSTS_SPEED_10 0
-#define E1000_PCS_LSTS_SPEED_100 2
-#define E1000_PCS_LSTS_SPEED_1000 4
-#define E1000_PCS_LSTS_DUPLEX_FULL 8
-#define E1000_PCS_LSTS_SYNK_OK 0x10
-#define E1000_PCS_LSTS_AN_COMPLETE 0x10000
-#define E1000_PCS_LSTS_AN_PAGE_RX 0x20000
-#define E1000_PCS_LSTS_AN_TIMED_OUT 0x40000
-#define E1000_PCS_LSTS_AN_REMOTE_FAULT 0x80000
-#define E1000_PCS_LSTS_AN_ERROR_RWS 0x100000
+#define E1000_CTRL_PHY_RESET_DIR E1000_CTRL_SWDPIO0
+#define E1000_CTRL_PHY_RESET E1000_CTRL_SWDPIN0
+#define E1000_CTRL_MDIO_DIR E1000_CTRL_SWDPIO2
+#define E1000_CTRL_MDIO E1000_CTRL_SWDPIN2
+#define E1000_CTRL_MDC_DIR E1000_CTRL_SWDPIO3
+#define E1000_CTRL_MDC E1000_CTRL_SWDPIN3
+#define E1000_CTRL_PHY_RESET_DIR4 E1000_CTRL_EXT_SDP4_DIR
+#define E1000_CTRL_PHY_RESET4 E1000_CTRL_EXT_SDP4_DATA
+
+#define E1000_CONNSW_ENRGSRC 0x4
+#define E1000_PCS_CFG_PCS_EN 8
+#define E1000_PCS_LCTL_FLV_LINK_UP 1
+#define E1000_PCS_LCTL_FSV_10 0
+#define E1000_PCS_LCTL_FSV_100 2
+#define E1000_PCS_LCTL_FSV_1000 4
+#define E1000_PCS_LCTL_FDV_FULL 8
+#define E1000_PCS_LCTL_FSD 0x10
+#define E1000_PCS_LCTL_FORCE_LINK 0x20
+#define E1000_PCS_LCTL_LOW_LINK_LATCH 0x40
+#define E1000_PCS_LCTL_FORCE_FCTRL 0x80
+#define E1000_PCS_LCTL_AN_ENABLE 0x10000
+#define E1000_PCS_LCTL_AN_RESTART 0x20000
+#define E1000_PCS_LCTL_AN_TIMEOUT 0x40000
+#define E1000_PCS_LCTL_AN_SGMII_BYPASS 0x80000
+#define E1000_PCS_LCTL_AN_SGMII_TRIGGER 0x100000
+#define E1000_PCS_LCTL_FAST_LINK_TIMER 0x1000000
+#define E1000_PCS_LCTL_LINK_OK_FIX 0x2000000
+#define E1000_PCS_LCTL_CRS_ON_NI 0x4000000
+#define E1000_ENABLE_SERDES_LOOPBACK 0x0410
+
+#define E1000_PCS_LSTS_LINK_OK 1
+#define E1000_PCS_LSTS_SPEED_10 0
+#define E1000_PCS_LSTS_SPEED_100 2
+#define E1000_PCS_LSTS_SPEED_1000 4
+#define E1000_PCS_LSTS_DUPLEX_FULL 8
+#define E1000_PCS_LSTS_SYNK_OK 0x10
+#define E1000_PCS_LSTS_AN_COMPLETE 0x10000
+#define E1000_PCS_LSTS_AN_PAGE_RX 0x20000
+#define E1000_PCS_LSTS_AN_TIMED_OUT 0x40000
+#define E1000_PCS_LSTS_AN_REMOTE_FAULT 0x80000
+#define E1000_PCS_LSTS_AN_ERROR_RWS 0x100000
/* Device Status */
-#define E1000_STATUS_FD 0x00000001 /* Full duplex.0=half,1=full */
-#define E1000_STATUS_LU 0x00000002 /* Link up.0=no,1=link */
-#define E1000_STATUS_FUNC_MASK 0x0000000C /* PCI Function Mask */
-#define E1000_STATUS_FUNC_SHIFT 2
-#define E1000_STATUS_FUNC_0 0x00000000 /* Function 0 */
-#define E1000_STATUS_FUNC_1 0x00000004 /* Function 1 */
-#define E1000_STATUS_TXOFF 0x00000010 /* transmission paused */
-#define E1000_STATUS_TBIMODE 0x00000020 /* TBI mode */
-#define E1000_STATUS_SPEED_MASK 0x000000C0
-#define E1000_STATUS_SPEED_10 0x00000000 /* Speed 10Mb/s */
-#define E1000_STATUS_SPEED_100 0x00000040 /* Speed 100Mb/s */
-#define E1000_STATUS_SPEED_1000 0x00000080 /* Speed 1000Mb/s */
-#define E1000_STATUS_LAN_INIT_DONE 0x00000200 /* Lan Init Completion by NVM */
-#define E1000_STATUS_ASDV 0x00000300 /* Auto speed detect value */
-#define E1000_STATUS_PHYRA 0x00000400 /* PHY Reset Asserted */
-#define E1000_STATUS_DOCK_CI 0x00000800 /* Change in Dock/Undock state.
- * Clear on write '0'. */
-#define E1000_STATUS_GIO_MASTER_ENABLE 0x00080000 /* Master request status */
-#define E1000_STATUS_MTXCKOK 0x00000400 /* MTX clock running OK */
-#define E1000_STATUS_PCI66 0x00000800 /* In 66Mhz slot */
-#define E1000_STATUS_BUS64 0x00001000 /* In 64 bit slot */
-#define E1000_STATUS_PCIX_MODE 0x00002000 /* PCI-X mode */
-#define E1000_STATUS_PCIX_SPEED 0x0000C000 /* PCI-X bus speed */
-#define E1000_STATUS_BMC_SKU_0 0x00100000 /* BMC USB redirect disabled */
-#define E1000_STATUS_BMC_SKU_1 0x00200000 /* BMC SRAM disabled */
-#define E1000_STATUS_BMC_SKU_2 0x00400000 /* BMC SDRAM disabled */
-#define E1000_STATUS_BMC_CRYPTO 0x00800000 /* BMC crypto disabled */
-#define E1000_STATUS_BMC_LITE 0x01000000 /* BMC external code execution
- * disabled */
-#define E1000_STATUS_RGMII_ENABLE 0x02000000 /* RGMII disabled */
-#define E1000_STATUS_FUSE_8 0x04000000
-#define E1000_STATUS_FUSE_9 0x08000000
-#define E1000_STATUS_SERDES0_DIS 0x10000000 /* SERDES disabled on port 0 */
-#define E1000_STATUS_SERDES1_DIS 0x20000000 /* SERDES disabled on port 1 */
+#define E1000_STATUS_FD 0x00000001 /* Duplex 0=half 1=full */
+#define E1000_STATUS_LU 0x00000002 /* Link up.0=no,1=link */
+#define E1000_STATUS_FUNC_MASK 0x0000000C /* PCI Function Mask */
+#define E1000_STATUS_FUNC_SHIFT 2
+#define E1000_STATUS_FUNC_0 0x00000000 /* Function 0 */
+#define E1000_STATUS_FUNC_1 0x00000004 /* Function 1 */
+#define E1000_STATUS_TXOFF 0x00000010 /* transmission paused */
+#define E1000_STATUS_TBIMODE 0x00000020 /* TBI mode */
+#define E1000_STATUS_SPEED_MASK 0x000000C0
+#define E1000_STATUS_SPEED_10 0x00000000 /* Speed 10Mb/s */
+#define E1000_STATUS_SPEED_100 0x00000040 /* Speed 100Mb/s */
+#define E1000_STATUS_SPEED_1000 0x00000080 /* Speed 1000Mb/s */
+#define E1000_STATUS_LAN_INIT_DONE 0x00000200 /* Lan Init Compltn by NVM */
+#define E1000_STATUS_ASDV 0x00000300 /* Auto speed detect value */
+#define E1000_STATUS_PHYRA 0x00000400 /* PHY Reset Asserted */
+/* Change in Dock/Undock state clear on write '0'. */
+#define E1000_STATUS_DOCK_CI 0x00000800
+#define E1000_STATUS_GIO_MASTER_ENABLE 0x00080000 /* Master request status */
+#define E1000_STATUS_MTXCKOK 0x00000400 /* MTX clock running OK */
+#define E1000_STATUS_PCI66 0x00000800 /* In 66Mhz slot */
+#define E1000_STATUS_BUS64 0x00001000 /* In 64 bit slot */
+#define E1000_STATUS_PCIX_MODE 0x00002000 /* PCI-X mode */
+#define E1000_STATUS_PCIX_SPEED 0x0000C000 /* PCI-X bus speed */
+#define E1000_STATUS_BMC_SKU_0 0x00100000 /* BMC USB redirect disbld */
+#define E1000_STATUS_BMC_SKU_1 0x00200000 /* BMC SRAM disabled */
+#define E1000_STATUS_BMC_SKU_2 0x00400000 /* BMC SDRAM disabled */
+#define E1000_STATUS_BMC_CRYPTO 0x00800000 /* BMC crypto disabled */
+/* BMC external code execution disabled */
+#define E1000_STATUS_BMC_LITE 0x01000000
+#define E1000_STATUS_RGMII_ENABLE 0x02000000 /* RGMII disabled */
+#define E1000_STATUS_FUSE_8 0x04000000
+#define E1000_STATUS_FUSE_9 0x08000000
+#define E1000_STATUS_SERDES0_DIS 0x10000000 /* SERDES disbld on port 0 */
+#define E1000_STATUS_SERDES1_DIS 0x20000000 /* SERDES disbld on port 1 */
/* Constants used to interpret the masked PCI-X bus speed. */
-#define E1000_STATUS_PCIX_SPEED_66 0x00000000 /* PCI-X bus speed 50-66 MHz */
-#define E1000_STATUS_PCIX_SPEED_100 0x00004000 /* PCI-X bus speed 66-100 MHz */
-#define E1000_STATUS_PCIX_SPEED_133 0x00008000 /*PCI-X bus speed 100-133 MHz*/
+#define E1000_STATUS_PCIX_SPEED_66 0x00000000 /* PCI-X bus spd 50-66MHz */
+#define E1000_STATUS_PCIX_SPEED_100 0x00004000 /* PCI-X bus spd 66-100MHz */
+#define E1000_STATUS_PCIX_SPEED_133 0x00008000 /* PCI-X bus spd 100-133MHz*/
-#define SPEED_10 10
-#define SPEED_100 100
-#define SPEED_1000 1000
-#define HALF_DUPLEX 1
-#define FULL_DUPLEX 2
+#define SPEED_10 10
+#define SPEED_100 100
+#define SPEED_1000 1000
+#define HALF_DUPLEX 1
+#define FULL_DUPLEX 2
-#define PHY_FORCE_TIME 20
+#define PHY_FORCE_TIME 20
-#define ADVERTISE_10_HALF 0x0001
-#define ADVERTISE_10_FULL 0x0002
-#define ADVERTISE_100_HALF 0x0004
-#define ADVERTISE_100_FULL 0x0008
-#define ADVERTISE_1000_HALF 0x0010 /* Not used, just FYI */
-#define ADVERTISE_1000_FULL 0x0020
+#define ADVERTISE_10_HALF 0x0001
+#define ADVERTISE_10_FULL 0x0002
+#define ADVERTISE_100_HALF 0x0004
+#define ADVERTISE_100_FULL 0x0008
+#define ADVERTISE_1000_HALF 0x0010 /* Not used, just FYI */
+#define ADVERTISE_1000_FULL 0x0020
/* 1000/H is not supported, nor spec-compliant. */
-#define E1000_ALL_SPEED_DUPLEX (ADVERTISE_10_HALF | ADVERTISE_10_FULL | \
- ADVERTISE_100_HALF | ADVERTISE_100_FULL | \
- ADVERTISE_1000_FULL)
-#define E1000_ALL_NOT_GIG (ADVERTISE_10_HALF | ADVERTISE_10_FULL | \
- ADVERTISE_100_HALF | ADVERTISE_100_FULL)
-#define E1000_ALL_100_SPEED (ADVERTISE_100_HALF | ADVERTISE_100_FULL)
-#define E1000_ALL_10_SPEED (ADVERTISE_10_HALF | ADVERTISE_10_FULL)
-#define E1000_ALL_FULL_DUPLEX (ADVERTISE_10_FULL | ADVERTISE_100_FULL | \
- ADVERTISE_1000_FULL)
-#define E1000_ALL_HALF_DUPLEX (ADVERTISE_10_HALF | ADVERTISE_100_HALF)
-
-#define AUTONEG_ADVERTISE_SPEED_DEFAULT E1000_ALL_SPEED_DUPLEX
+#define E1000_ALL_SPEED_DUPLEX ( \
+ ADVERTISE_10_HALF | ADVERTISE_10_FULL | ADVERTISE_100_HALF | \
+ ADVERTISE_100_FULL | ADVERTISE_1000_FULL)
+#define E1000_ALL_NOT_GIG ( \
+ ADVERTISE_10_HALF | ADVERTISE_10_FULL | ADVERTISE_100_HALF | \
+ ADVERTISE_100_FULL)
+#define E1000_ALL_100_SPEED (ADVERTISE_100_HALF | ADVERTISE_100_FULL)
+#define E1000_ALL_10_SPEED (ADVERTISE_10_HALF | ADVERTISE_10_FULL)
+#define E1000_ALL_FULL_DUPLEX ( \
+ ADVERTISE_10_FULL | ADVERTISE_100_FULL | ADVERTISE_1000_FULL)
+#define E1000_ALL_HALF_DUPLEX (ADVERTISE_10_HALF | ADVERTISE_100_HALF)
+
+#define AUTONEG_ADVERTISE_SPEED_DEFAULT E1000_ALL_SPEED_DUPLEX
/* LED Control */
-#define E1000_PHY_LED0_MODE_MASK 0x00000007
-#define E1000_PHY_LED0_IVRT 0x00000008
-#define E1000_PHY_LED0_BLINK 0x00000010
-#define E1000_PHY_LED0_MASK 0x0000001F
-
-#define E1000_LEDCTL_LED0_MODE_MASK 0x0000000F
-#define E1000_LEDCTL_LED0_MODE_SHIFT 0
-#define E1000_LEDCTL_LED0_BLINK_RATE 0x00000020
-#define E1000_LEDCTL_LED0_IVRT 0x00000040
-#define E1000_LEDCTL_LED0_BLINK 0x00000080
-#define E1000_LEDCTL_LED1_MODE_MASK 0x00000F00
-#define E1000_LEDCTL_LED1_MODE_SHIFT 8
-#define E1000_LEDCTL_LED1_BLINK_RATE 0x00002000
-#define E1000_LEDCTL_LED1_IVRT 0x00004000
-#define E1000_LEDCTL_LED1_BLINK 0x00008000
-#define E1000_LEDCTL_LED2_MODE_MASK 0x000F0000
-#define E1000_LEDCTL_LED2_MODE_SHIFT 16
-#define E1000_LEDCTL_LED2_BLINK_RATE 0x00200000
-#define E1000_LEDCTL_LED2_IVRT 0x00400000
-#define E1000_LEDCTL_LED2_BLINK 0x00800000
-#define E1000_LEDCTL_LED3_MODE_MASK 0x0F000000
-#define E1000_LEDCTL_LED3_MODE_SHIFT 24
-#define E1000_LEDCTL_LED3_BLINK_RATE 0x20000000
-#define E1000_LEDCTL_LED3_IVRT 0x40000000
-#define E1000_LEDCTL_LED3_BLINK 0x80000000
-
-#define E1000_LEDCTL_MODE_LINK_10_1000 0x0
-#define E1000_LEDCTL_MODE_LINK_100_1000 0x1
-#define E1000_LEDCTL_MODE_LINK_UP 0x2
-#define E1000_LEDCTL_MODE_ACTIVITY 0x3
-#define E1000_LEDCTL_MODE_LINK_ACTIVITY 0x4
-#define E1000_LEDCTL_MODE_LINK_10 0x5
-#define E1000_LEDCTL_MODE_LINK_100 0x6
-#define E1000_LEDCTL_MODE_LINK_1000 0x7
-#define E1000_LEDCTL_MODE_PCIX_MODE 0x8
-#define E1000_LEDCTL_MODE_FULL_DUPLEX 0x9
-#define E1000_LEDCTL_MODE_COLLISION 0xA
-#define E1000_LEDCTL_MODE_BUS_SPEED 0xB
-#define E1000_LEDCTL_MODE_BUS_SIZE 0xC
-#define E1000_LEDCTL_MODE_PAUSED 0xD
-#define E1000_LEDCTL_MODE_LED_ON 0xE
-#define E1000_LEDCTL_MODE_LED_OFF 0xF
+#define E1000_PHY_LED0_MODE_MASK 0x00000007
+#define E1000_PHY_LED0_IVRT 0x00000008
+#define E1000_PHY_LED0_BLINK 0x00000010
+#define E1000_PHY_LED0_MASK 0x0000001F
+
+#define E1000_LEDCTL_LED0_MODE_MASK 0x0000000F
+#define E1000_LEDCTL_LED0_MODE_SHIFT 0
+#define E1000_LEDCTL_LED0_BLINK_RATE 0x00000020
+#define E1000_LEDCTL_LED0_IVRT 0x00000040
+#define E1000_LEDCTL_LED0_BLINK 0x00000080
+#define E1000_LEDCTL_LED1_MODE_MASK 0x00000F00
+#define E1000_LEDCTL_LED1_MODE_SHIFT 8
+#define E1000_LEDCTL_LED1_BLINK_RATE 0x00002000
+#define E1000_LEDCTL_LED1_IVRT 0x00004000
+#define E1000_LEDCTL_LED1_BLINK 0x00008000
+#define E1000_LEDCTL_LED2_MODE_MASK 0x000F0000
+#define E1000_LEDCTL_LED2_MODE_SHIFT 16
+#define E1000_LEDCTL_LED2_BLINK_RATE 0x00200000
+#define E1000_LEDCTL_LED2_IVRT 0x00400000
+#define E1000_LEDCTL_LED2_BLINK 0x00800000
+#define E1000_LEDCTL_LED3_MODE_MASK 0x0F000000
+#define E1000_LEDCTL_LED3_MODE_SHIFT 24
+#define E1000_LEDCTL_LED3_BLINK_RATE 0x20000000
+#define E1000_LEDCTL_LED3_IVRT 0x40000000
+#define E1000_LEDCTL_LED3_BLINK 0x80000000
+
+#define E1000_LEDCTL_MODE_LINK_10_1000 0x0
+#define E1000_LEDCTL_MODE_LINK_100_1000 0x1
+#define E1000_LEDCTL_MODE_LINK_UP 0x2
+#define E1000_LEDCTL_MODE_ACTIVITY 0x3
+#define E1000_LEDCTL_MODE_LINK_ACTIVITY 0x4
+#define E1000_LEDCTL_MODE_LINK_10 0x5
+#define E1000_LEDCTL_MODE_LINK_100 0x6
+#define E1000_LEDCTL_MODE_LINK_1000 0x7
+#define E1000_LEDCTL_MODE_PCIX_MODE 0x8
+#define E1000_LEDCTL_MODE_FULL_DUPLEX 0x9
+#define E1000_LEDCTL_MODE_COLLISION 0xA
+#define E1000_LEDCTL_MODE_BUS_SPEED 0xB
+#define E1000_LEDCTL_MODE_BUS_SIZE 0xC
+#define E1000_LEDCTL_MODE_PAUSED 0xD
+#define E1000_LEDCTL_MODE_LED_ON 0xE
+#define E1000_LEDCTL_MODE_LED_OFF 0xF
/* Transmit Descriptor bit definitions */
-#define E1000_TXD_DTYP_D 0x00100000 /* Data Descriptor */
-#define E1000_TXD_DTYP_C 0x00000000 /* Context Descriptor */
-#define E1000_TXD_POPTS_SHIFT 8 /* POPTS shift */
-#define E1000_TXD_POPTS_IXSM 0x01 /* Insert IP checksum */
-#define E1000_TXD_POPTS_TXSM 0x02 /* Insert TCP/UDP checksum */
-#define E1000_TXD_CMD_EOP 0x01000000 /* End of Packet */
-#define E1000_TXD_CMD_IFCS 0x02000000 /* Insert FCS (Ethernet CRC) */
-#define E1000_TXD_CMD_IC 0x04000000 /* Insert Checksum */
-#define E1000_TXD_CMD_RS 0x08000000 /* Report Status */
-#define E1000_TXD_CMD_RPS 0x10000000 /* Report Packet Sent */
-#define E1000_TXD_CMD_DEXT 0x20000000 /* Descriptor extension (0 = legacy) */
-#define E1000_TXD_CMD_VLE 0x40000000 /* Add VLAN tag */
-#define E1000_TXD_CMD_IDE 0x80000000 /* Enable Tidv register */
-#define E1000_TXD_STAT_DD 0x00000001 /* Descriptor Done */
-#define E1000_TXD_STAT_EC 0x00000002 /* Excess Collisions */
-#define E1000_TXD_STAT_LC 0x00000004 /* Late Collisions */
-#define E1000_TXD_STAT_TU 0x00000008 /* Transmit underrun */
-#define E1000_TXD_CMD_TCP 0x01000000 /* TCP packet */
-#define E1000_TXD_CMD_IP 0x02000000 /* IP packet */
-#define E1000_TXD_CMD_TSE 0x04000000 /* TCP Seg enable */
-#define E1000_TXD_STAT_TC 0x00000004 /* Tx Underrun */
+#define E1000_TXD_DTYP_D 0x00100000 /* Data Descriptor */
+#define E1000_TXD_DTYP_C 0x00000000 /* Context Descriptor */
+#define E1000_TXD_POPTS_SHIFT 8 /* POPTS shift */
+#define E1000_TXD_POPTS_IXSM 0x01 /* Insert IP checksum */
+#define E1000_TXD_POPTS_TXSM 0x02 /* Insert TCP/UDP checksum */
+#define E1000_TXD_CMD_EOP 0x01000000 /* End of Packet */
+#define E1000_TXD_CMD_IFCS 0x02000000 /* Insert FCS (Ethernet CRC) */
+#define E1000_TXD_CMD_IC 0x04000000 /* Insert Checksum */
+#define E1000_TXD_CMD_RS 0x08000000 /* Report Status */
+#define E1000_TXD_CMD_RPS 0x10000000 /* Report Packet Sent */
+#define E1000_TXD_CMD_DEXT 0x20000000 /* Desc extension (0 = legacy) */
+#define E1000_TXD_CMD_VLE 0x40000000 /* Add VLAN tag */
+#define E1000_TXD_CMD_IDE 0x80000000 /* Enable Tidv register */
+#define E1000_TXD_STAT_DD 0x00000001 /* Descriptor Done */
+#define E1000_TXD_STAT_EC 0x00000002 /* Excess Collisions */
+#define E1000_TXD_STAT_LC 0x00000004 /* Late Collisions */
+#define E1000_TXD_STAT_TU 0x00000008 /* Transmit underrun */
+#define E1000_TXD_CMD_TCP 0x01000000 /* TCP packet */
+#define E1000_TXD_CMD_IP 0x02000000 /* IP packet */
+#define E1000_TXD_CMD_TSE 0x04000000 /* TCP Seg enable */
+#define E1000_TXD_STAT_TC 0x00000004 /* Tx Underrun */
/* Extended desc bits for Linksec and timesync */
-#define E1000_TXD_CMD_LINKSEC 0x10000000 /* Apply LinkSec on packet */
-#define E1000_TXD_EXTCMD_TSTAMP 0x00000010 /* IEEE1588 Timestamp packet */
+#define E1000_TXD_CMD_LINKSEC 0x10000000 /* Apply LinkSec on packet */
+#define E1000_TXD_EXTCMD_TSTAMP 0x00000010 /* IEEE1588 Timestamp packet */
/* Transmit Control */
-#define E1000_TCTL_RST 0x00000001 /* software reset */
-#define E1000_TCTL_EN 0x00000002 /* enable Tx */
-#define E1000_TCTL_BCE 0x00000004 /* busy check enable */
-#define E1000_TCTL_PSP 0x00000008 /* pad short packets */
-#define E1000_TCTL_CT 0x00000ff0 /* collision threshold */
-#define E1000_TCTL_COLD 0x003ff000 /* collision distance */
-#define E1000_TCTL_SWXOFF 0x00400000 /* SW Xoff transmission */
-#define E1000_TCTL_PBE 0x00800000 /* Packet Burst Enable */
-#define E1000_TCTL_RTLC 0x01000000 /* Re-transmit on late collision */
-#define E1000_TCTL_NRTU 0x02000000 /* No Re-transmit on underrun */
-#define E1000_TCTL_MULR 0x10000000 /* Multiple request support */
+#define E1000_TCTL_RST 0x00000001 /* software reset */
+#define E1000_TCTL_EN 0x00000002 /* enable Tx */
+#define E1000_TCTL_BCE 0x00000004 /* busy check enable */
+#define E1000_TCTL_PSP 0x00000008 /* pad short packets */
+#define E1000_TCTL_CT 0x00000ff0 /* collision threshold */
+#define E1000_TCTL_COLD 0x003ff000 /* collision distance */
+#define E1000_TCTL_SWXOFF 0x00400000 /* SW Xoff transmission */
+#define E1000_TCTL_PBE 0x00800000 /* Packet Burst Enable */
+#define E1000_TCTL_RTLC 0x01000000 /* Re-transmit on late collision */
+#define E1000_TCTL_NRTU 0x02000000 /* No Re-transmit on underrun */
+#define E1000_TCTL_MULR 0x10000000 /* Multiple request support */
/* Transmit Arbitration Count */
-#define E1000_TARC0_ENABLE 0x00000400 /* Enable Tx Queue 0 */
+#define E1000_TARC0_ENABLE 0x00000400 /* Enable Tx Queue 0 */
/* SerDes Control */
-#define E1000_SCTL_DISABLE_SERDES_LOOPBACK 0x0400
+#define E1000_SCTL_DISABLE_SERDES_LOOPBACK 0x0400
/* Receive Checksum Control */
-#define E1000_RXCSUM_PCSS_MASK 0x000000FF /* Packet Checksum Start */
-#define E1000_RXCSUM_IPOFL 0x00000100 /* IPv4 checksum offload */
-#define E1000_RXCSUM_TUOFL 0x00000200 /* TCP / UDP checksum offload */
-#define E1000_RXCSUM_IPV6OFL 0x00000400 /* IPv6 checksum offload */
-#define E1000_RXCSUM_CRCOFL 0x00000800 /* CRC32 offload enable */
-#define E1000_RXCSUM_IPPCSE 0x00001000 /* IP payload checksum enable */
-#define E1000_RXCSUM_PCSD 0x00002000 /* packet checksum disabled */
+#define E1000_RXCSUM_PCSS_MASK 0x000000FF /* Packet Checksum Start */
+#define E1000_RXCSUM_IPOFL 0x00000100 /* IPv4 checksum offload */
+#define E1000_RXCSUM_TUOFL 0x00000200 /* TCP / UDP checksum offload */
+#define E1000_RXCSUM_IPV6OFL 0x00000400 /* IPv6 checksum offload */
+#define E1000_RXCSUM_CRCOFL 0x00000800 /* CRC32 offload enable */
+#define E1000_RXCSUM_IPPCSE 0x00001000 /* IP payload checksum enable */
+#define E1000_RXCSUM_PCSD 0x00002000 /* packet checksum disabled */
/* Header split receive */
-#define E1000_RFCTL_ISCSI_DIS 0x00000001
-#define E1000_RFCTL_ISCSI_DWC_MASK 0x0000003E
-#define E1000_RFCTL_ISCSI_DWC_SHIFT 1
-#define E1000_RFCTL_NFSW_DIS 0x00000040
-#define E1000_RFCTL_NFSR_DIS 0x00000080
-#define E1000_RFCTL_NFS_VER_MASK 0x00000300
-#define E1000_RFCTL_NFS_VER_SHIFT 8
-#define E1000_RFCTL_IPV6_DIS 0x00000400
-#define E1000_RFCTL_IPV6_XSUM_DIS 0x00000800
-#define E1000_RFCTL_ACK_DIS 0x00001000
-#define E1000_RFCTL_ACKD_DIS 0x00002000
-#define E1000_RFCTL_IPFRSP_DIS 0x00004000
-#define E1000_RFCTL_EXTEN 0x00008000
-#define E1000_RFCTL_IPV6_EX_DIS 0x00010000
-#define E1000_RFCTL_NEW_IPV6_EXT_DIS 0x00020000
-#define E1000_RFCTL_LEF 0x00040000
+#define E1000_RFCTL_ISCSI_DIS 0x00000001
+#define E1000_RFCTL_ISCSI_DWC_MASK 0x0000003E
+#define E1000_RFCTL_ISCSI_DWC_SHIFT 1
+#define E1000_RFCTL_NFSW_DIS 0x00000040
+#define E1000_RFCTL_NFSR_DIS 0x00000080
+#define E1000_RFCTL_NFS_VER_MASK 0x00000300
+#define E1000_RFCTL_NFS_VER_SHIFT 8
+#define E1000_RFCTL_IPV6_DIS 0x00000400
+#define E1000_RFCTL_IPV6_XSUM_DIS 0x00000800
+#define E1000_RFCTL_ACK_DIS 0x00001000
+#define E1000_RFCTL_ACKD_DIS 0x00002000
+#define E1000_RFCTL_IPFRSP_DIS 0x00004000
+#define E1000_RFCTL_EXTEN 0x00008000
+#define E1000_RFCTL_IPV6_EX_DIS 0x00010000
+#define E1000_RFCTL_NEW_IPV6_EXT_DIS 0x00020000
+#define E1000_RFCTL_LEF 0x00040000
/* Collision related configuration parameters */
-#define E1000_COLLISION_THRESHOLD 15
-#define E1000_CT_SHIFT 4
-#define E1000_COLLISION_DISTANCE 63
-#define E1000_COLD_SHIFT 12
+#define E1000_COLLISION_THRESHOLD 15
+#define E1000_CT_SHIFT 4
+#define E1000_COLLISION_DISTANCE 63
+#define E1000_COLD_SHIFT 12
/* Default values for the transmit IPG register */
-#define DEFAULT_82542_TIPG_IPGT 10
-#define DEFAULT_82543_TIPG_IPGT_FIBER 9
-#define DEFAULT_82543_TIPG_IPGT_COPPER 8
+#define DEFAULT_82542_TIPG_IPGT 10
+#define DEFAULT_82543_TIPG_IPGT_FIBER 9
+#define DEFAULT_82543_TIPG_IPGT_COPPER 8
-#define E1000_TIPG_IPGT_MASK 0x000003FF
-#define E1000_TIPG_IPGR1_MASK 0x000FFC00
-#define E1000_TIPG_IPGR2_MASK 0x3FF00000
+#define E1000_TIPG_IPGT_MASK 0x000003FF
+#define E1000_TIPG_IPGR1_MASK 0x000FFC00
+#define E1000_TIPG_IPGR2_MASK 0x3FF00000
-#define DEFAULT_82542_TIPG_IPGR1 2
-#define DEFAULT_82543_TIPG_IPGR1 8
-#define E1000_TIPG_IPGR1_SHIFT 10
+#define DEFAULT_82542_TIPG_IPGR1 2
+#define DEFAULT_82543_TIPG_IPGR1 8
+#define E1000_TIPG_IPGR1_SHIFT 10
-#define DEFAULT_82542_TIPG_IPGR2 10
-#define DEFAULT_82543_TIPG_IPGR2 6
-#define DEFAULT_80003ES2LAN_TIPG_IPGR2 7
-#define E1000_TIPG_IPGR2_SHIFT 20
+#define DEFAULT_82542_TIPG_IPGR2 10
+#define DEFAULT_82543_TIPG_IPGR2 6
+#define DEFAULT_80003ES2LAN_TIPG_IPGR2 7
+#define E1000_TIPG_IPGR2_SHIFT 20
/* Ethertype field values */
-#define ETHERNET_IEEE_VLAN_TYPE 0x8100 /* 802.3ac packet */
+#define ETHERNET_IEEE_VLAN_TYPE 0x8100 /* 802.3ac packet */
-#define ETHERNET_FCS_SIZE 4
-#define MAX_JUMBO_FRAME_SIZE 0x3F00
+#define ETHERNET_FCS_SIZE 4
+#define MAX_JUMBO_FRAME_SIZE 0x3F00
/* Extended Configuration Control and Size */
-#define E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP 0x00000020
-#define E1000_EXTCNF_CTRL_LCD_WRITE_ENABLE 0x00000001
-#define E1000_EXTCNF_CTRL_OEM_WRITE_ENABLE 0x00000008
-#define E1000_EXTCNF_CTRL_SWFLAG 0x00000020
-#define E1000_EXTCNF_CTRL_GATE_PHY_CFG 0x00000080
-#define E1000_EXTCNF_SIZE_EXT_PCIE_LENGTH_MASK 0x00FF0000
-#define E1000_EXTCNF_SIZE_EXT_PCIE_LENGTH_SHIFT 16
-#define E1000_EXTCNF_CTRL_EXT_CNF_POINTER_MASK 0x0FFF0000
-#define E1000_EXTCNF_CTRL_EXT_CNF_POINTER_SHIFT 16
-
-#define E1000_PHY_CTRL_SPD_EN 0x00000001
-#define E1000_PHY_CTRL_D0A_LPLU 0x00000002
-#define E1000_PHY_CTRL_NOND0A_LPLU 0x00000004
-#define E1000_PHY_CTRL_NOND0A_GBE_DISABLE 0x00000008
-#define E1000_PHY_CTRL_GBE_DISABLE 0x00000040
-
-#define E1000_KABGTXD_BGSQLBIAS 0x00050000
+#define E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP 0x00000020
+#define E1000_EXTCNF_CTRL_LCD_WRITE_ENABLE 0x00000001
+#define E1000_EXTCNF_CTRL_OEM_WRITE_ENABLE 0x00000008
+#define E1000_EXTCNF_CTRL_SWFLAG 0x00000020
+#define E1000_EXTCNF_CTRL_GATE_PHY_CFG 0x00000080
+#define E1000_EXTCNF_SIZE_EXT_PCIE_LENGTH_MASK 0x00FF0000
+#define E1000_EXTCNF_SIZE_EXT_PCIE_LENGTH_SHIFT 16
+#define E1000_EXTCNF_CTRL_EXT_CNF_POINTER_MASK 0x0FFF0000
+#define E1000_EXTCNF_CTRL_EXT_CNF_POINTER_SHIFT 16
+
+#define E1000_PHY_CTRL_SPD_EN 0x00000001
+#define E1000_PHY_CTRL_D0A_LPLU 0x00000002
+#define E1000_PHY_CTRL_NOND0A_LPLU 0x00000004
+#define E1000_PHY_CTRL_NOND0A_GBE_DISABLE 0x00000008
+#define E1000_PHY_CTRL_GBE_DISABLE 0x00000040
+
+#define E1000_KABGTXD_BGSQLBIAS 0x00050000
/* PBA constants */
-#define E1000_PBA_6K 0x0006 /* 6KB */
-#define E1000_PBA_8K 0x0008 /* 8KB */
-#define E1000_PBA_10K 0x000A /* 10KB */
-#define E1000_PBA_12K 0x000C /* 12KB */
-#define E1000_PBA_14K 0x000E /* 14KB */
-#define E1000_PBA_16K 0x0010 /* 16KB */
-#define E1000_PBA_18K 0x0012
-#define E1000_PBA_20K 0x0014
-#define E1000_PBA_22K 0x0016
-#define E1000_PBA_24K 0x0018
-#define E1000_PBA_26K 0x001A
-#define E1000_PBA_30K 0x001E
-#define E1000_PBA_32K 0x0020
-#define E1000_PBA_34K 0x0022
-#define E1000_PBA_35K 0x0023
-#define E1000_PBA_38K 0x0026
-#define E1000_PBA_40K 0x0028
-#define E1000_PBA_48K 0x0030 /* 48KB */
-#define E1000_PBA_64K 0x0040 /* 64KB */
-
-#define E1000_PBS_16K E1000_PBA_16K
-#define E1000_PBS_24K E1000_PBA_24K
-
-#define IFS_MAX 80
-#define IFS_MIN 40
-#define IFS_RATIO 4
-#define IFS_STEP 10
-#define MIN_NUM_XMITS 1000
+#define E1000_PBA_6K 0x0006 /* 6KB */
+#define E1000_PBA_8K 0x0008 /* 8KB */
+#define E1000_PBA_10K 0x000A /* 10KB */
+#define E1000_PBA_12K 0x000C /* 12KB */
+#define E1000_PBA_14K 0x000E /* 14KB */
+#define E1000_PBA_16K 0x0010 /* 16KB */
+#define E1000_PBA_18K 0x0012
+#define E1000_PBA_20K 0x0014
+#define E1000_PBA_22K 0x0016
+#define E1000_PBA_24K 0x0018
+#define E1000_PBA_26K 0x001A
+#define E1000_PBA_30K 0x001E
+#define E1000_PBA_32K 0x0020
+#define E1000_PBA_34K 0x0022
+#define E1000_PBA_35K 0x0023
+#define E1000_PBA_38K 0x0026
+#define E1000_PBA_40K 0x0028
+#define E1000_PBA_48K 0x0030 /* 48KB */
+#define E1000_PBA_64K 0x0040 /* 64KB */
+
+#define E1000_PBA_RXA_MASK 0xFFFF;
+
+#define E1000_PBS_16K E1000_PBA_16K
+#define E1000_PBS_24K E1000_PBA_24K
+
+#define IFS_MAX 80
+#define IFS_MIN 40
+#define IFS_RATIO 4
+#define IFS_STEP 10
+#define MIN_NUM_XMITS 1000
/* SW Semaphore Register */
-#define E1000_SWSM_SMBI 0x00000001 /* Driver Semaphore bit */
-#define E1000_SWSM_SWESMBI 0x00000002 /* FW Semaphore bit */
-#define E1000_SWSM_WMNG 0x00000004 /* Wake MNG Clock */
-#define E1000_SWSM_DRV_LOAD 0x00000008 /* Driver Loaded Bit */
+#define E1000_SWSM_SMBI 0x00000001 /* Driver Semaphore bit */
+#define E1000_SWSM_SWESMBI 0x00000002 /* FW Semaphore bit */
+#define E1000_SWSM_WMNG 0x00000004 /* Wake MNG Clock */
+#define E1000_SWSM_DRV_LOAD 0x00000008 /* Driver Loaded Bit */
-#define E1000_SWSM2_LOCK 0x00000002 /* Secondary driver semaphore bit */
+#define E1000_SWSM2_LOCK 0x00000002 /* Secondary driver semaphore bit */
/* Interrupt Cause Read */
-#define E1000_ICR_TXDW 0x00000001 /* Transmit desc written back */
-#define E1000_ICR_TXQE 0x00000002 /* Transmit Queue empty */
-#define E1000_ICR_LSC 0x00000004 /* Link Status Change */
-#define E1000_ICR_RXSEQ 0x00000008 /* Rx sequence error */
-#define E1000_ICR_RXDMT0 0x00000010 /* Rx desc min. threshold (0) */
-#define E1000_ICR_RXO 0x00000040 /* Rx overrun */
-#define E1000_ICR_RXT0 0x00000080 /* Rx timer intr (ring 0) */
-#define E1000_ICR_VMMB 0x00000100 /* VM MB event */
-#define E1000_ICR_MDAC 0x00000200 /* MDIO access complete */
-#define E1000_ICR_RXCFG 0x00000400 /* Rx /c/ ordered set */
-#define E1000_ICR_GPI_EN0 0x00000800 /* GP Int 0 */
-#define E1000_ICR_GPI_EN1 0x00001000 /* GP Int 1 */
-#define E1000_ICR_GPI_EN2 0x00002000 /* GP Int 2 */
-#define E1000_ICR_GPI_EN3 0x00004000 /* GP Int 3 */
-#define E1000_ICR_TXD_LOW 0x00008000
-#define E1000_ICR_SRPD 0x00010000
-#define E1000_ICR_ACK 0x00020000 /* Receive Ack frame */
-#define E1000_ICR_MNG 0x00040000 /* Manageability event */
-#define E1000_ICR_DOCK 0x00080000 /* Dock/Undock */
-#define E1000_ICR_DRSTA 0x40000000 /* Device Reset Asserted */
-#define E1000_ICR_INT_ASSERTED 0x80000000 /* If this bit asserted, the driver
- * should claim the interrupt */
-#define E1000_ICR_RXD_FIFO_PAR0 0x00100000 /* Q0 Rx desc FIFO parity error */
-#define E1000_ICR_TXD_FIFO_PAR0 0x00200000 /* Q0 Tx desc FIFO parity error */
-#define E1000_ICR_HOST_ARB_PAR 0x00400000 /* host arb read buffer parity err */
-#define E1000_ICR_PB_PAR 0x00800000 /* packet buffer parity error */
-#define E1000_ICR_RXD_FIFO_PAR1 0x01000000 /* Q1 Rx desc FIFO parity error */
-#define E1000_ICR_TXD_FIFO_PAR1 0x02000000 /* Q1 Tx desc FIFO parity error */
-#define E1000_ICR_ALL_PARITY 0x03F00000 /* all parity error bits */
-#define E1000_ICR_DSW 0x00000020 /* FW changed the status of DISSW
- * bit in the FWSM */
-#define E1000_ICR_PHYINT 0x00001000 /* LAN connected device generates
- * an interrupt */
-#define E1000_ICR_DOUTSYNC 0x10000000 /* NIC DMA out of sync */
-#define E1000_ICR_EPRST 0x00100000 /* ME hardware reset occurs */
-#define E1000_ICR_RXQ0 0x00100000 /* Rx Queue 0 Interrupt */
-#define E1000_ICR_RXQ1 0x00200000 /* Rx Queue 1 Interrupt */
-#define E1000_ICR_TXQ0 0x00400000 /* Tx Queue 0 Interrupt */
-#define E1000_ICR_TXQ1 0x00800000 /* Tx Queue 1 Interrupt */
-#define E1000_ICR_OTHER 0x01000000 /* Other Interrupts */
-#define E1000_ICR_FER 0x00400000 /* Fatal Error */
-
-#define E1000_ICR_THS 0x00800000 /* ICR.THS: Thermal Sensor Event*/
-#define E1000_ICR_MDDET 0x10000000 /* Malicious Driver Detect */
+#define E1000_ICR_TXDW 0x00000001 /* Transmit desc written back */
+#define E1000_ICR_TXQE 0x00000002 /* Transmit Queue empty */
+#define E1000_ICR_LSC 0x00000004 /* Link Status Change */
+#define E1000_ICR_RXSEQ 0x00000008 /* Rx sequence error */
+#define E1000_ICR_RXDMT0 0x00000010 /* Rx desc min. threshold (0) */
+#define E1000_ICR_RXO 0x00000040 /* Rx overrun */
+#define E1000_ICR_RXT0 0x00000080 /* Rx timer intr (ring 0) */
+#define E1000_ICR_VMMB 0x00000100 /* VM MB event */
+#define E1000_ICR_MDAC 0x00000200 /* MDIO access complete */
+#define E1000_ICR_RXCFG 0x00000400 /* Rx /c/ ordered set */
+#define E1000_ICR_GPI_EN0 0x00000800 /* GP Int 0 */
+#define E1000_ICR_GPI_EN1 0x00001000 /* GP Int 1 */
+#define E1000_ICR_GPI_EN2 0x00002000 /* GP Int 2 */
+#define E1000_ICR_GPI_EN3 0x00004000 /* GP Int 3 */
+#define E1000_ICR_TXD_LOW 0x00008000
+#define E1000_ICR_SRPD 0x00010000
+#define E1000_ICR_ACK 0x00020000 /* Receive Ack frame */
+#define E1000_ICR_MNG 0x00040000 /* Manageability event */
+#define E1000_ICR_DOCK 0x00080000 /* Dock/Undock */
+#define E1000_ICR_DRSTA 0x40000000 /* Device Reset Asserted */
+/* If this bit asserted, the driver should claim the interrupt */
+#define E1000_ICR_INT_ASSERTED 0x80000000
+#define E1000_ICR_RXD_FIFO_PAR0 0x00100000 /* Q0 Rx desc FIFO parity error */
+#define E1000_ICR_TXD_FIFO_PAR0 0x00200000 /* Q0 Tx desc FIFO parity error */
+#define E1000_ICR_HOST_ARB_PAR 0x00400000 /* host arb read buffer parity err */
+#define E1000_ICR_PB_PAR 0x00800000 /* packet buffer parity error */
+#define E1000_ICR_RXD_FIFO_PAR1 0x01000000 /* Q1 Rx desc FIFO parity error */
+#define E1000_ICR_TXD_FIFO_PAR1 0x02000000 /* Q1 Tx desc FIFO parity error */
+#define E1000_ICR_ALL_PARITY 0x03F00000 /* all parity error bits */
+/* FW changed the status of DISSW bit in the FWSM */
+#define E1000_ICR_DSW 0x00000020
+/* LAN connected device generates an interrupt */
+#define E1000_ICR_PHYINT 0x00001000
+#define E1000_ICR_DOUTSYNC 0x10000000 /* NIC DMA out of sync */
+#define E1000_ICR_EPRST 0x00100000 /* ME hardware reset occurs */
+#define E1000_ICR_RXQ0 0x00100000 /* Rx Queue 0 Interrupt */
+#define E1000_ICR_RXQ1 0x00200000 /* Rx Queue 1 Interrupt */
+#define E1000_ICR_TXQ0 0x00400000 /* Tx Queue 0 Interrupt */
+#define E1000_ICR_TXQ1 0x00800000 /* Tx Queue 1 Interrupt */
+#define E1000_ICR_OTHER 0x01000000 /* Other Interrupts */
+#define E1000_ICR_FER 0x00400000 /* Fatal Error */
+
+#define E1000_ICR_THS 0x00800000 /* ICR.THS: Thermal Sensor Event*/
+#define E1000_ICR_MDDET 0x10000000 /* Malicious Driver Detect */
+
+#define E1000_ITR_MASK 0x000FFFFF /* ITR value bitfield */
+#define E1000_ITR_MULT 256 /* ITR mulitplier in nsec */
+
/* PBA ECC Register */
-#define E1000_PBA_ECC_COUNTER_MASK 0xFFF00000 /* ECC counter mask */
-#define E1000_PBA_ECC_COUNTER_SHIFT 20 /* ECC counter shift value */
-#define E1000_PBA_ECC_CORR_EN 0x00000001 /* Enable ECC error correction */
-#define E1000_PBA_ECC_STAT_CLR 0x00000002 /* Clear ECC error counter */
-#define E1000_PBA_ECC_INT_EN 0x00000004 /* Enable ICR bit 5 on ECC error */
+#define E1000_PBA_ECC_COUNTER_MASK 0xFFF00000 /* ECC counter mask */
+#define E1000_PBA_ECC_COUNTER_SHIFT 20 /* ECC counter shift value */
+#define E1000_PBA_ECC_CORR_EN 0x00000001 /* Enable ECC error correction */
+#define E1000_PBA_ECC_STAT_CLR 0x00000002 /* Clear ECC error counter */
+#define E1000_PBA_ECC_INT_EN 0x00000004 /* Enable ICR bit 5 on ECC error */
/* Extended Interrupt Cause Read */
-#define E1000_EICR_RX_QUEUE0 0x00000001 /* Rx Queue 0 Interrupt */
-#define E1000_EICR_RX_QUEUE1 0x00000002 /* Rx Queue 1 Interrupt */
-#define E1000_EICR_RX_QUEUE2 0x00000004 /* Rx Queue 2 Interrupt */
-#define E1000_EICR_RX_QUEUE3 0x00000008 /* Rx Queue 3 Interrupt */
-#define E1000_EICR_TX_QUEUE0 0x00000100 /* Tx Queue 0 Interrupt */
-#define E1000_EICR_TX_QUEUE1 0x00000200 /* Tx Queue 1 Interrupt */
-#define E1000_EICR_TX_QUEUE2 0x00000400 /* Tx Queue 2 Interrupt */
-#define E1000_EICR_TX_QUEUE3 0x00000800 /* Tx Queue 3 Interrupt */
-#define E1000_EICR_TCP_TIMER 0x40000000 /* TCP Timer */
-#define E1000_EICR_OTHER 0x80000000 /* Interrupt Cause Active */
+#define E1000_EICR_RX_QUEUE0 0x00000001 /* Rx Queue 0 Interrupt */
+#define E1000_EICR_RX_QUEUE1 0x00000002 /* Rx Queue 1 Interrupt */
+#define E1000_EICR_RX_QUEUE2 0x00000004 /* Rx Queue 2 Interrupt */
+#define E1000_EICR_RX_QUEUE3 0x00000008 /* Rx Queue 3 Interrupt */
+#define E1000_EICR_TX_QUEUE0 0x00000100 /* Tx Queue 0 Interrupt */
+#define E1000_EICR_TX_QUEUE1 0x00000200 /* Tx Queue 1 Interrupt */
+#define E1000_EICR_TX_QUEUE2 0x00000400 /* Tx Queue 2 Interrupt */
+#define E1000_EICR_TX_QUEUE3 0x00000800 /* Tx Queue 3 Interrupt */
+#define E1000_EICR_TCP_TIMER 0x40000000 /* TCP Timer */
+#define E1000_EICR_OTHER 0x80000000 /* Interrupt Cause Active */
/* TCP Timer */
-#define E1000_TCPTIMER_KS 0x00000100 /* KickStart */
-#define E1000_TCPTIMER_COUNT_ENABLE 0x00000200 /* Count Enable */
-#define E1000_TCPTIMER_COUNT_FINISH 0x00000400 /* Count finish */
-#define E1000_TCPTIMER_LOOP 0x00000800 /* Loop */
+#define E1000_TCPTIMER_KS 0x00000100 /* KickStart */
+#define E1000_TCPTIMER_COUNT_ENABLE 0x00000200 /* Count Enable */
+#define E1000_TCPTIMER_COUNT_FINISH 0x00000400 /* Count finish */
+#define E1000_TCPTIMER_LOOP 0x00000800 /* Loop */
/*
* This defines the bits that are set in the Interrupt Mask
@@ -858,8 +869,8 @@
* o RXSEQ = Receive Sequence Error
*/
#define POLL_IMS_ENABLE_MASK ( \
- E1000_IMS_RXDMT0 | \
- E1000_IMS_RXSEQ)
+ E1000_IMS_RXDMT0 | \
+ E1000_IMS_RXSEQ)
/*
* This defines the bits that are set in the Interrupt Mask
@@ -871,142 +882,142 @@
* o LSC = Link Status Change
*/
#define IMS_ENABLE_MASK ( \
- E1000_IMS_RXT0 | \
- E1000_IMS_TXDW | \
- E1000_IMS_RXDMT0 | \
- E1000_IMS_RXSEQ | \
- E1000_IMS_LSC)
+ E1000_IMS_RXT0 | \
+ E1000_IMS_TXDW | \
+ E1000_IMS_RXDMT0 | \
+ E1000_IMS_RXSEQ | \
+ E1000_IMS_LSC)
/* Interrupt Mask Set */
-#define E1000_IMS_TXDW E1000_ICR_TXDW /* Tx desc written back */
-#define E1000_IMS_TXQE E1000_ICR_TXQE /* Transmit Queue empty */
-#define E1000_IMS_LSC E1000_ICR_LSC /* Link Status Change */
-#define E1000_IMS_VMMB E1000_ICR_VMMB /* Mail box activity */
-#define E1000_IMS_RXSEQ E1000_ICR_RXSEQ /* Rx sequence error */
-#define E1000_IMS_RXDMT0 E1000_ICR_RXDMT0 /* Rx desc min. threshold */
-#define E1000_IMS_RXO E1000_ICR_RXO /* Rx overrun */
-#define E1000_IMS_RXT0 E1000_ICR_RXT0 /* Rx timer intr */
-#define E1000_IMS_MDAC E1000_ICR_MDAC /* MDIO access complete */
-#define E1000_IMS_RXCFG E1000_ICR_RXCFG /* Rx /c/ ordered set */
-#define E1000_IMS_GPI_EN0 E1000_ICR_GPI_EN0 /* GP Int 0 */
-#define E1000_IMS_GPI_EN1 E1000_ICR_GPI_EN1 /* GP Int 1 */
-#define E1000_IMS_GPI_EN2 E1000_ICR_GPI_EN2 /* GP Int 2 */
-#define E1000_IMS_GPI_EN3 E1000_ICR_GPI_EN3 /* GP Int 3 */
-#define E1000_IMS_TXD_LOW E1000_ICR_TXD_LOW
-#define E1000_IMS_SRPD E1000_ICR_SRPD
-#define E1000_IMS_ACK E1000_ICR_ACK /* Receive Ack frame */
-#define E1000_IMS_MNG E1000_ICR_MNG /* Manageability event */
-#define E1000_IMS_DOCK E1000_ICR_DOCK /* Dock/Undock */
-#define E1000_IMS_DRSTA E1000_ICR_DRSTA /* Device Reset Asserted */
-#define E1000_IMS_RXD_FIFO_PAR0 E1000_ICR_RXD_FIFO_PAR0 /* Q0 Rx desc FIFO
- * parity error */
-#define E1000_IMS_TXD_FIFO_PAR0 E1000_ICR_TXD_FIFO_PAR0 /* Q0 Tx desc FIFO
- * parity error */
-#define E1000_IMS_HOST_ARB_PAR E1000_ICR_HOST_ARB_PAR /* host arb read buffer
- * parity error */
-#define E1000_IMS_PB_PAR E1000_ICR_PB_PAR /* packet buffer parity
- * error */
-#define E1000_IMS_RXD_FIFO_PAR1 E1000_ICR_RXD_FIFO_PAR1 /* Q1 Rx desc FIFO
- * parity error */
-#define E1000_IMS_TXD_FIFO_PAR1 E1000_ICR_TXD_FIFO_PAR1 /* Q1 Tx desc FIFO
- * parity error */
-#define E1000_IMS_DSW E1000_ICR_DSW
-#define E1000_IMS_PHYINT E1000_ICR_PHYINT
-#define E1000_IMS_DOUTSYNC E1000_ICR_DOUTSYNC /* NIC DMA out of sync */
-#define E1000_IMS_EPRST E1000_ICR_EPRST
-#define E1000_IMS_RXQ0 E1000_ICR_RXQ0 /* Rx Queue 0 Interrupt */
-#define E1000_IMS_RXQ1 E1000_ICR_RXQ1 /* Rx Queue 1 Interrupt */
-#define E1000_IMS_TXQ0 E1000_ICR_TXQ0 /* Tx Queue 0 Interrupt */
-#define E1000_IMS_TXQ1 E1000_ICR_TXQ1 /* Tx Queue 1 Interrupt */
-#define E1000_IMS_OTHER E1000_ICR_OTHER /* Other Interrupts */
-#define E1000_IMS_FER E1000_ICR_FER /* Fatal Error */
-
-#define E1000_IMS_THS E1000_ICR_THS /* ICR.TS: Thermal Sensor Event*/
-#define E1000_IMS_MDDET E1000_ICR_MDDET /* Malicious Driver Detect */
+#define E1000_IMS_TXDW E1000_ICR_TXDW /* Tx desc written back */
+#define E1000_IMS_TXQE E1000_ICR_TXQE /* Transmit Queue empty */
+#define E1000_IMS_LSC E1000_ICR_LSC /* Link Status Change */
+#define E1000_IMS_VMMB E1000_ICR_VMMB /* Mail box activity */
+#define E1000_IMS_RXSEQ E1000_ICR_RXSEQ /* Rx sequence error */
+#define E1000_IMS_RXDMT0 E1000_ICR_RXDMT0 /* Rx desc min. threshold */
+#define E1000_IMS_RXO E1000_ICR_RXO /* Rx overrun */
+#define E1000_IMS_RXT0 E1000_ICR_RXT0 /* Rx timer intr */
+#define E1000_IMS_MDAC E1000_ICR_MDAC /* MDIO access complete */
+#define E1000_IMS_RXCFG E1000_ICR_RXCFG /* Rx /c/ ordered set */
+#define E1000_IMS_GPI_EN0 E1000_ICR_GPI_EN0 /* GP Int 0 */
+#define E1000_IMS_GPI_EN1 E1000_ICR_GPI_EN1 /* GP Int 1 */
+#define E1000_IMS_GPI_EN2 E1000_ICR_GPI_EN2 /* GP Int 2 */
+#define E1000_IMS_GPI_EN3 E1000_ICR_GPI_EN3 /* GP Int 3 */
+#define E1000_IMS_TXD_LOW E1000_ICR_TXD_LOW
+#define E1000_IMS_SRPD E1000_ICR_SRPD
+#define E1000_IMS_ACK E1000_ICR_ACK /* Receive Ack frame */
+#define E1000_IMS_MNG E1000_ICR_MNG /* Manageability event */
+#define E1000_IMS_DOCK E1000_ICR_DOCK /* Dock/Undock */
+#define E1000_IMS_DRSTA E1000_ICR_DRSTA /* Device Reset Asserted */
+/* Q0 Rx desc FIFO parity error */
+#define E1000_IMS_RXD_FIFO_PAR0 E1000_ICR_RXD_FIFO_PAR0
+/* Q0 Tx desc FIFO parity error */
+#define E1000_IMS_TXD_FIFO_PAR0 E1000_ICR_TXD_FIFO_PAR0
+/* host arb read buffer parity error */
+#define E1000_IMS_HOST_ARB_PAR E1000_ICR_HOST_ARB_PAR
+/* packet buffer parity error */
+#define E1000_IMS_PB_PAR E1000_ICR_PB_PAR
+/* Q1 Rx desc FIFO parity error */
+#define E1000_IMS_RXD_FIFO_PAR1 E1000_ICR_RXD_FIFO_PAR1
+/* Q1 Tx desc FIFO parity error */
+#define E1000_IMS_TXD_FIFO_PAR1 E1000_ICR_TXD_FIFO_PAR1
+#define E1000_IMS_DSW E1000_ICR_DSW
+#define E1000_IMS_PHYINT E1000_ICR_PHYINT
+#define E1000_IMS_DOUTSYNC E1000_ICR_DOUTSYNC /* NIC DMA out of sync */
+#define E1000_IMS_EPRST E1000_ICR_EPRST
+#define E1000_IMS_RXQ0 E1000_ICR_RXQ0 /* Rx Queue 0 Interrupt */
+#define E1000_IMS_RXQ1 E1000_ICR_RXQ1 /* Rx Queue 1 Interrupt */
+#define E1000_IMS_TXQ0 E1000_ICR_TXQ0 /* Tx Queue 0 Interrupt */
+#define E1000_IMS_TXQ1 E1000_ICR_TXQ1 /* Tx Queue 1 Interrupt */
+#define E1000_IMS_OTHER E1000_ICR_OTHER /* Other Interrupts */
+#define E1000_IMS_FER E1000_ICR_FER /* Fatal Error */
+
+#define E1000_IMS_THS E1000_ICR_THS /* ICR.TS: Thermal Sensor Event*/
+#define E1000_IMS_MDDET E1000_ICR_MDDET /* Malicious Driver Detect */
/* Extended Interrupt Mask Set */
-#define E1000_EIMS_RX_QUEUE0 E1000_EICR_RX_QUEUE0 /* Rx Queue 0 Interrupt */
-#define E1000_EIMS_RX_QUEUE1 E1000_EICR_RX_QUEUE1 /* Rx Queue 1 Interrupt */
-#define E1000_EIMS_RX_QUEUE2 E1000_EICR_RX_QUEUE2 /* Rx Queue 2 Interrupt */
-#define E1000_EIMS_RX_QUEUE3 E1000_EICR_RX_QUEUE3 /* Rx Queue 3 Interrupt */
-#define E1000_EIMS_TX_QUEUE0 E1000_EICR_TX_QUEUE0 /* Tx Queue 0 Interrupt */
-#define E1000_EIMS_TX_QUEUE1 E1000_EICR_TX_QUEUE1 /* Tx Queue 1 Interrupt */
-#define E1000_EIMS_TX_QUEUE2 E1000_EICR_TX_QUEUE2 /* Tx Queue 2 Interrupt */
-#define E1000_EIMS_TX_QUEUE3 E1000_EICR_TX_QUEUE3 /* Tx Queue 3 Interrupt */
-#define E1000_EIMS_TCP_TIMER E1000_EICR_TCP_TIMER /* TCP Timer */
-#define E1000_EIMS_OTHER E1000_EICR_OTHER /* Interrupt Cause Active */
+#define E1000_EIMS_RX_QUEUE0 E1000_EICR_RX_QUEUE0 /* Rx Queue 0 Interrupt */
+#define E1000_EIMS_RX_QUEUE1 E1000_EICR_RX_QUEUE1 /* Rx Queue 1 Interrupt */
+#define E1000_EIMS_RX_QUEUE2 E1000_EICR_RX_QUEUE2 /* Rx Queue 2 Interrupt */
+#define E1000_EIMS_RX_QUEUE3 E1000_EICR_RX_QUEUE3 /* Rx Queue 3 Interrupt */
+#define E1000_EIMS_TX_QUEUE0 E1000_EICR_TX_QUEUE0 /* Tx Queue 0 Interrupt */
+#define E1000_EIMS_TX_QUEUE1 E1000_EICR_TX_QUEUE1 /* Tx Queue 1 Interrupt */
+#define E1000_EIMS_TX_QUEUE2 E1000_EICR_TX_QUEUE2 /* Tx Queue 2 Interrupt */
+#define E1000_EIMS_TX_QUEUE3 E1000_EICR_TX_QUEUE3 /* Tx Queue 3 Interrupt */
+#define E1000_EIMS_TCP_TIMER E1000_EICR_TCP_TIMER /* TCP Timer */
+#define E1000_EIMS_OTHER E1000_EICR_OTHER /* Interrupt Cause Active */
/* Interrupt Cause Set */
-#define E1000_ICS_TXDW E1000_ICR_TXDW /* Tx desc written back */
-#define E1000_ICS_TXQE E1000_ICR_TXQE /* Transmit Queue empty */
-#define E1000_ICS_LSC E1000_ICR_LSC /* Link Status Change */
-#define E1000_ICS_RXSEQ E1000_ICR_RXSEQ /* Rx sequence error */
-#define E1000_ICS_RXDMT0 E1000_ICR_RXDMT0 /* Rx desc min. threshold */
-#define E1000_ICS_RXO E1000_ICR_RXO /* Rx overrun */
-#define E1000_ICS_RXT0 E1000_ICR_RXT0 /* Rx timer intr */
-#define E1000_ICS_MDAC E1000_ICR_MDAC /* MDIO access complete */
-#define E1000_ICS_RXCFG E1000_ICR_RXCFG /* Rx /c/ ordered set */
-#define E1000_ICS_GPI_EN0 E1000_ICR_GPI_EN0 /* GP Int 0 */
-#define E1000_ICS_GPI_EN1 E1000_ICR_GPI_EN1 /* GP Int 1 */
-#define E1000_ICS_GPI_EN2 E1000_ICR_GPI_EN2 /* GP Int 2 */
-#define E1000_ICS_GPI_EN3 E1000_ICR_GPI_EN3 /* GP Int 3 */
-#define E1000_ICS_TXD_LOW E1000_ICR_TXD_LOW
-#define E1000_ICS_SRPD E1000_ICR_SRPD
-#define E1000_ICS_ACK E1000_ICR_ACK /* Receive Ack frame */
-#define E1000_ICS_MNG E1000_ICR_MNG /* Manageability event */
-#define E1000_ICS_DOCK E1000_ICR_DOCK /* Dock/Undock */
-#define E1000_ICS_DRSTA E1000_ICR_DRSTA /* Device Reset Aserted */
-#define E1000_ICS_RXD_FIFO_PAR0 E1000_ICR_RXD_FIFO_PAR0 /* Q0 Rx desc FIFO
- * parity error */
-#define E1000_ICS_TXD_FIFO_PAR0 E1000_ICR_TXD_FIFO_PAR0 /* Q0 Tx desc FIFO
- * parity error */
-#define E1000_ICS_HOST_ARB_PAR E1000_ICR_HOST_ARB_PAR /* host arb read buffer
- * parity error */
-#define E1000_ICS_PB_PAR E1000_ICR_PB_PAR /* packet buffer parity
- * error */
-#define E1000_ICS_RXD_FIFO_PAR1 E1000_ICR_RXD_FIFO_PAR1 /* Q1 Rx desc FIFO
- * parity error */
-#define E1000_ICS_TXD_FIFO_PAR1 E1000_ICR_TXD_FIFO_PAR1 /* Q1 Tx desc FIFO
- * parity error */
-#define E1000_ICS_DSW E1000_ICR_DSW
-#define E1000_ICS_DOUTSYNC E1000_ICR_DOUTSYNC /* NIC DMA out of sync */
-#define E1000_ICS_PHYINT E1000_ICR_PHYINT
-#define E1000_ICS_EPRST E1000_ICR_EPRST
+#define E1000_ICS_TXDW E1000_ICR_TXDW /* Tx desc written back */
+#define E1000_ICS_TXQE E1000_ICR_TXQE /* Transmit Queue empty */
+#define E1000_ICS_LSC E1000_ICR_LSC /* Link Status Change */
+#define E1000_ICS_RXSEQ E1000_ICR_RXSEQ /* Rx sequence error */
+#define E1000_ICS_RXDMT0 E1000_ICR_RXDMT0 /* Rx desc min. threshold */
+#define E1000_ICS_RXO E1000_ICR_RXO /* Rx overrun */
+#define E1000_ICS_RXT0 E1000_ICR_RXT0 /* Rx timer intr */
+#define E1000_ICS_MDAC E1000_ICR_MDAC /* MDIO access complete */
+#define E1000_ICS_RXCFG E1000_ICR_RXCFG /* Rx /c/ ordered set */
+#define E1000_ICS_GPI_EN0 E1000_ICR_GPI_EN0 /* GP Int 0 */
+#define E1000_ICS_GPI_EN1 E1000_ICR_GPI_EN1 /* GP Int 1 */
+#define E1000_ICS_GPI_EN2 E1000_ICR_GPI_EN2 /* GP Int 2 */
+#define E1000_ICS_GPI_EN3 E1000_ICR_GPI_EN3 /* GP Int 3 */
+#define E1000_ICS_TXD_LOW E1000_ICR_TXD_LOW
+#define E1000_ICS_SRPD E1000_ICR_SRPD
+#define E1000_ICS_ACK E1000_ICR_ACK /* Receive Ack frame */
+#define E1000_ICS_MNG E1000_ICR_MNG /* Manageability event */
+#define E1000_ICS_DOCK E1000_ICR_DOCK /* Dock/Undock */
+#define E1000_ICS_DRSTA E1000_ICR_DRSTA /* Device Reset Aserted */
+/* Q0 Rx desc FIFO parity error */
+#define E1000_ICS_RXD_FIFO_PAR0 E1000_ICR_RXD_FIFO_PAR0
+/* Q0 Tx desc FIFO parity error */
+#define E1000_ICS_TXD_FIFO_PAR0 E1000_ICR_TXD_FIFO_PAR0
+/* host arb read buffer parity error */
+#define E1000_ICS_HOST_ARB_PAR E1000_ICR_HOST_ARB_PAR
+/* packet buffer parity error */
+#define E1000_ICS_PB_PAR E1000_ICR_PB_PAR
+/* Q1 Rx desc FIFO parity error */
+#define E1000_ICS_RXD_FIFO_PAR1 E1000_ICR_RXD_FIFO_PAR1
+/* Q1 Tx desc FIFO parity error */
+#define E1000_ICS_TXD_FIFO_PAR1 E1000_ICR_TXD_FIFO_PAR1
+#define E1000_ICS_DSW E1000_ICR_DSW
+#define E1000_ICS_DOUTSYNC E1000_ICR_DOUTSYNC /* NIC DMA out of sync */
+#define E1000_ICS_PHYINT E1000_ICR_PHYINT
+#define E1000_ICS_EPRST E1000_ICR_EPRST
/* Extended Interrupt Cause Set */
-#define E1000_EICS_RX_QUEUE0 E1000_EICR_RX_QUEUE0 /* Rx Queue 0 Interrupt */
-#define E1000_EICS_RX_QUEUE1 E1000_EICR_RX_QUEUE1 /* Rx Queue 1 Interrupt */
-#define E1000_EICS_RX_QUEUE2 E1000_EICR_RX_QUEUE2 /* Rx Queue 2 Interrupt */
-#define E1000_EICS_RX_QUEUE3 E1000_EICR_RX_QUEUE3 /* Rx Queue 3 Interrupt */
-#define E1000_EICS_TX_QUEUE0 E1000_EICR_TX_QUEUE0 /* Tx Queue 0 Interrupt */
-#define E1000_EICS_TX_QUEUE1 E1000_EICR_TX_QUEUE1 /* Tx Queue 1 Interrupt */
-#define E1000_EICS_TX_QUEUE2 E1000_EICR_TX_QUEUE2 /* Tx Queue 2 Interrupt */
-#define E1000_EICS_TX_QUEUE3 E1000_EICR_TX_QUEUE3 /* Tx Queue 3 Interrupt */
-#define E1000_EICS_TCP_TIMER E1000_EICR_TCP_TIMER /* TCP Timer */
-#define E1000_EICS_OTHER E1000_EICR_OTHER /* Interrupt Cause Active */
-
-#define E1000_EITR_ITR_INT_MASK 0x0000FFFF
+#define E1000_EICS_RX_QUEUE0 E1000_EICR_RX_QUEUE0 /* Rx Queue 0 Interrupt */
+#define E1000_EICS_RX_QUEUE1 E1000_EICR_RX_QUEUE1 /* Rx Queue 1 Interrupt */
+#define E1000_EICS_RX_QUEUE2 E1000_EICR_RX_QUEUE2 /* Rx Queue 2 Interrupt */
+#define E1000_EICS_RX_QUEUE3 E1000_EICR_RX_QUEUE3 /* Rx Queue 3 Interrupt */
+#define E1000_EICS_TX_QUEUE0 E1000_EICR_TX_QUEUE0 /* Tx Queue 0 Interrupt */
+#define E1000_EICS_TX_QUEUE1 E1000_EICR_TX_QUEUE1 /* Tx Queue 1 Interrupt */
+#define E1000_EICS_TX_QUEUE2 E1000_EICR_TX_QUEUE2 /* Tx Queue 2 Interrupt */
+#define E1000_EICS_TX_QUEUE3 E1000_EICR_TX_QUEUE3 /* Tx Queue 3 Interrupt */
+#define E1000_EICS_TCP_TIMER E1000_EICR_TCP_TIMER /* TCP Timer */
+#define E1000_EICS_OTHER E1000_EICR_OTHER /* Interrupt Cause Active */
+
+#define E1000_EITR_ITR_INT_MASK 0x0000FFFF
/* E1000_EITR_CNT_IGNR is only for 82576 and newer */
-#define E1000_EITR_CNT_IGNR 0x80000000 /* Don't reset counters on write */
+#define E1000_EITR_CNT_IGNR 0x80000000 /* Don't reset counters on write */
/* Transmit Descriptor Control */
-#define E1000_TXDCTL_PTHRESH 0x0000003F /* TXDCTL Prefetch Threshold */
-#define E1000_TXDCTL_HTHRESH 0x00003F00 /* TXDCTL Host Threshold */
-#define E1000_TXDCTL_WTHRESH 0x003F0000 /* TXDCTL Writeback Threshold */
-#define E1000_TXDCTL_GRAN 0x01000000 /* TXDCTL Granularity */
-#define E1000_TXDCTL_LWTHRESH 0xFE000000 /* TXDCTL Low Threshold */
-#define E1000_TXDCTL_FULL_TX_DESC_WB 0x01010000 /* GRAN=1, WTHRESH=1 */
+#define E1000_TXDCTL_PTHRESH 0x0000003F /* TXDCTL Prefetch Threshold */
+#define E1000_TXDCTL_HTHRESH 0x00003F00 /* TXDCTL Host Threshold */
+#define E1000_TXDCTL_WTHRESH 0x003F0000 /* TXDCTL Writeback Threshold */
+#define E1000_TXDCTL_GRAN 0x01000000 /* TXDCTL Granularity */
+#define E1000_TXDCTL_LWTHRESH 0xFE000000 /* TXDCTL Low Threshold */
+#define E1000_TXDCTL_FULL_TX_DESC_WB 0x01010000 /* GRAN=1, WTHRESH=1 */
#define E1000_TXDCTL_MAX_TX_DESC_PREFETCH 0x0100001F /* GRAN=1, PTHRESH=31 */
/* Enable the counting of descriptors still to be processed. */
-#define E1000_TXDCTL_COUNT_DESC 0x00400000
+#define E1000_TXDCTL_COUNT_DESC 0x00400000
/* Flow Control Constants */
-#define FLOW_CONTROL_ADDRESS_LOW 0x00C28001
-#define FLOW_CONTROL_ADDRESS_HIGH 0x00000100
-#define FLOW_CONTROL_TYPE 0x8808
+#define FLOW_CONTROL_ADDRESS_LOW 0x00C28001
+#define FLOW_CONTROL_ADDRESS_HIGH 0x00000100
+#define FLOW_CONTROL_TYPE 0x8808
/* 802.1q VLAN Packet Size */
-#define VLAN_TAG_SIZE 4 /* 802.3ac tag (not DMA'd) */
-#define E1000_VLAN_FILTER_TBL_SIZE 128 /* VLAN Filter Table (4096 bits) */
+#define VLAN_TAG_SIZE 4 /* 802.3ac tag (not DMA'd) */
+#define E1000_VLAN_FILTER_TBL_SIZE 128 /* VLAN Filter Table (4096 bits) */
/* Receive Address */
/*
@@ -1016,529 +1027,550 @@
* (RAR[15]) for our directed address used by controllers with
* manageability enabled, allowing us room for 15 multicast addresses.
*/
-#define E1000_RAR_ENTRIES 15
-#define E1000_RAH_AV 0x80000000 /* Receive descriptor valid */
-#define E1000_RAL_MAC_ADDR_LEN 4
-#define E1000_RAH_MAC_ADDR_LEN 2
-#define E1000_RAH_QUEUE_MASK_82575 0x000C0000
-#define E1000_RAH_POOL_MASK 0x03FC0000
-#define E1000_RAH_POOL_SHIFT 18
-#define E1000_RAH_POOL_1 0x00040000
+#define E1000_RAR_ENTRIES 15
+#define E1000_RAH_AV 0x80000000 /* Receive descriptor valid */
+#define E1000_RAL_MAC_ADDR_LEN 4
+#define E1000_RAH_MAC_ADDR_LEN 2
+#define E1000_RAH_QUEUE_MASK_82575 0x000C0000
+#define E1000_RAH_POOL_MASK 0x03FC0000
+#define E1000_RAH_POOL_SHIFT 18
+#define E1000_RAH_POOL_1 0x00040000
/* Error Codes */
-#define E1000_SUCCESS 0
-#define E1000_ERR_NVM 1
-#define E1000_ERR_PHY 2
-#define E1000_ERR_CONFIG 3
-#define E1000_ERR_PARAM 4
-#define E1000_ERR_MAC_INIT 5
-#define E1000_ERR_PHY_TYPE 6
-#define E1000_ERR_RESET 9
-#define E1000_ERR_MASTER_REQUESTS_PENDING 10
-#define E1000_ERR_HOST_INTERFACE_COMMAND 11
-#define E1000_BLK_PHY_RESET 12
-#define E1000_ERR_SWFW_SYNC 13
-#define E1000_NOT_IMPLEMENTED 14
-#define E1000_ERR_MBX 15
-#define E1000_ERR_INVALID_ARGUMENT 16
-#define E1000_ERR_NO_SPACE 17
-#define E1000_ERR_NVM_PBA_SECTION 18
+#define E1000_SUCCESS 0
+#define E1000_ERR_NVM 1
+#define E1000_ERR_PHY 2
+#define E1000_ERR_CONFIG 3
+#define E1000_ERR_PARAM 4
+#define E1000_ERR_MAC_INIT 5
+#define E1000_ERR_PHY_TYPE 6
+#define E1000_ERR_RESET 9
+#define E1000_ERR_MASTER_REQUESTS_PENDING 10
+#define E1000_ERR_HOST_INTERFACE_COMMAND 11
+#define E1000_BLK_PHY_RESET 12
+#define E1000_ERR_SWFW_SYNC 13
+#define E1000_NOT_IMPLEMENTED 14
+#define E1000_ERR_MBX 15
+#define E1000_ERR_INVALID_ARGUMENT 16
+#define E1000_ERR_NO_SPACE 17
+#define E1000_ERR_NVM_PBA_SECTION 18
+#define E1000_ERR_I2C 19
+#define E1000_ERR_INVM_VALUE_NOT_FOUND 20
/* Loop limit on how long we wait for auto-negotiation to complete */
-#define FIBER_LINK_UP_LIMIT 50
-#define COPPER_LINK_UP_LIMIT 10
-#define PHY_AUTO_NEG_LIMIT 45
-#define PHY_FORCE_LIMIT 20
+#define FIBER_LINK_UP_LIMIT 50
+#define COPPER_LINK_UP_LIMIT 10
+#define PHY_AUTO_NEG_LIMIT 45
+#define PHY_FORCE_LIMIT 20
/* Number of 100 microseconds we wait for PCI Express master disable */
-#define MASTER_DISABLE_TIMEOUT 800
+#define MASTER_DISABLE_TIMEOUT 800
/* Number of milliseconds we wait for PHY configuration done after MAC reset */
-#define PHY_CFG_TIMEOUT 100
+#define PHY_CFG_TIMEOUT 100
/* Number of 2 milliseconds we wait for acquiring MDIO ownership. */
-#define MDIO_OWNERSHIP_TIMEOUT 10
+#define MDIO_OWNERSHIP_TIMEOUT 10
/* Number of milliseconds for NVM auto read done after MAC reset. */
-#define AUTO_READ_DONE_TIMEOUT 10
+#define AUTO_READ_DONE_TIMEOUT 10
/* Flow Control */
-#define E1000_FCRTH_RTH 0x0000FFF8 /* Mask Bits[15:3] for RTH */
-#define E1000_FCRTH_XFCE 0x80000000 /* External Flow Control Enable */
-#define E1000_FCRTL_RTL 0x0000FFF8 /* Mask Bits[15:3] for RTL */
-#define E1000_FCRTL_XONE 0x80000000 /* Enable XON frame transmission */
+#define E1000_FCRTH_RTH 0x0000FFF8 /* Mask Bits[15:3] for RTH */
+#define E1000_FCRTH_XFCE 0x80000000 /* External Flow Control Enable */
+#define E1000_FCRTL_RTL 0x0000FFF8 /* Mask Bits[15:3] for RTL */
+#define E1000_FCRTL_XONE 0x80000000 /* Enable XON frame transmission */
/* Transmit Configuration Word */
-#define E1000_TXCW_FD 0x00000020 /* TXCW full duplex */
-#define E1000_TXCW_HD 0x00000040 /* TXCW half duplex */
-#define E1000_TXCW_PAUSE 0x00000080 /* TXCW sym pause request */
-#define E1000_TXCW_ASM_DIR 0x00000100 /* TXCW astm pause direction */
-#define E1000_TXCW_PAUSE_MASK 0x00000180 /* TXCW pause request mask */
-#define E1000_TXCW_RF 0x00003000 /* TXCW remote fault */
-#define E1000_TXCW_NP 0x00008000 /* TXCW next page */
-#define E1000_TXCW_CW 0x0000ffff /* TxConfigWord mask */
-#define E1000_TXCW_TXC 0x40000000 /* Transmit Config control */
-#define E1000_TXCW_ANE 0x80000000 /* Auto-neg enable */
+#define E1000_TXCW_FD 0x00000020 /* TXCW full duplex */
+#define E1000_TXCW_HD 0x00000040 /* TXCW half duplex */
+#define E1000_TXCW_PAUSE 0x00000080 /* TXCW sym pause request */
+#define E1000_TXCW_ASM_DIR 0x00000100 /* TXCW astm pause direction */
+#define E1000_TXCW_PAUSE_MASK 0x00000180 /* TXCW pause request mask */
+#define E1000_TXCW_RF 0x00003000 /* TXCW remote fault */
+#define E1000_TXCW_NP 0x00008000 /* TXCW next page */
+#define E1000_TXCW_CW 0x0000ffff /* TxConfigWord mask */
+#define E1000_TXCW_TXC 0x40000000 /* Transmit Config control */
+#define E1000_TXCW_ANE 0x80000000 /* Auto-neg enable */
/* Receive Configuration Word */
-#define E1000_RXCW_CW 0x0000ffff /* RxConfigWord mask */
-#define E1000_RXCW_NC 0x04000000 /* Receive config no carrier */
-#define E1000_RXCW_IV 0x08000000 /* Receive config invalid */
-#define E1000_RXCW_CC 0x10000000 /* Receive config change */
-#define E1000_RXCW_C 0x20000000 /* Receive config */
-#define E1000_RXCW_SYNCH 0x40000000 /* Receive config synch */
-#define E1000_RXCW_ANC 0x80000000 /* Auto-neg complete */
-
-#define E1000_TSYNCTXCTL_VALID 0x00000001 /* Tx timestamp valid */
-#define E1000_TSYNCTXCTL_ENABLED 0x00000010 /* enable Tx timestamping */
-
-#define E1000_TSYNCRXCTL_VALID 0x00000001 /* Rx timestamp valid */
-#define E1000_TSYNCRXCTL_TYPE_MASK 0x0000000E /* Rx type mask */
-#define E1000_TSYNCRXCTL_TYPE_L2_V2 0x00
-#define E1000_TSYNCRXCTL_TYPE_L4_V1 0x02
-#define E1000_TSYNCRXCTL_TYPE_L2_L4_V2 0x04
-#define E1000_TSYNCRXCTL_TYPE_ALL 0x08
-#define E1000_TSYNCRXCTL_TYPE_EVENT_V2 0x0A
-#define E1000_TSYNCRXCTL_ENABLED 0x00000010 /* enable Rx timestamping */
-
-#define E1000_TSYNCRXCFG_PTP_V1_CTRLT_MASK 0x000000FF
-#define E1000_TSYNCRXCFG_PTP_V1_SYNC_MESSAGE 0x00
-#define E1000_TSYNCRXCFG_PTP_V1_DELAY_REQ_MESSAGE 0x01
-#define E1000_TSYNCRXCFG_PTP_V1_FOLLOWUP_MESSAGE 0x02
-#define E1000_TSYNCRXCFG_PTP_V1_DELAY_RESP_MESSAGE 0x03
-#define E1000_TSYNCRXCFG_PTP_V1_MANAGEMENT_MESSAGE 0x04
-
-#define E1000_TSYNCRXCFG_PTP_V2_MSGID_MASK 0x00000F00
-#define E1000_TSYNCRXCFG_PTP_V2_SYNC_MESSAGE 0x0000
-#define E1000_TSYNCRXCFG_PTP_V2_DELAY_REQ_MESSAGE 0x0100
-#define E1000_TSYNCRXCFG_PTP_V2_PATH_DELAY_REQ_MESSAGE 0x0200
-#define E1000_TSYNCRXCFG_PTP_V2_PATH_DELAY_RESP_MESSAGE 0x0300
-#define E1000_TSYNCRXCFG_PTP_V2_FOLLOWUP_MESSAGE 0x0800
-#define E1000_TSYNCRXCFG_PTP_V2_DELAY_RESP_MESSAGE 0x0900
-#define E1000_TSYNCRXCFG_PTP_V2_PATH_DELAY_FOLLOWUP_MESSAGE 0x0A00
-#define E1000_TSYNCRXCFG_PTP_V2_ANNOUNCE_MESSAGE 0x0B00
-#define E1000_TSYNCRXCFG_PTP_V2_SIGNALLING_MESSAGE 0x0C00
-#define E1000_TSYNCRXCFG_PTP_V2_MANAGEMENT_MESSAGE 0x0D00
-
-#define E1000_TIMINCA_16NS_SHIFT 24
+#define E1000_RXCW_CW 0x0000ffff /* RxConfigWord mask */
+#define E1000_RXCW_NC 0x04000000 /* Receive config no carrier */
+#define E1000_RXCW_IV 0x08000000 /* Receive config invalid */
+#define E1000_RXCW_CC 0x10000000 /* Receive config change */
+#define E1000_RXCW_C 0x20000000 /* Receive config */
+#define E1000_RXCW_SYNCH 0x40000000 /* Receive config synch */
+#define E1000_RXCW_ANC 0x80000000 /* Auto-neg complete */
+
+#define E1000_TSYNCTXCTL_VALID 0x00000001 /* Tx timestamp valid */
+#define E1000_TSYNCTXCTL_ENABLED 0x00000010 /* enable Tx timestamping */
+
+#define E1000_TSYNCRXCTL_VALID 0x00000001 /* Rx timestamp valid */
+#define E1000_TSYNCRXCTL_TYPE_MASK 0x0000000E /* Rx type mask */
+#define E1000_TSYNCRXCTL_TYPE_L2_V2 0x00
+#define E1000_TSYNCRXCTL_TYPE_L4_V1 0x02
+#define E1000_TSYNCRXCTL_TYPE_L2_L4_V2 0x04
+#define E1000_TSYNCRXCTL_TYPE_ALL 0x08
+#define E1000_TSYNCRXCTL_TYPE_EVENT_V2 0x0A
+#define E1000_TSYNCRXCTL_ENABLED 0x00000010 /* enable Rx timestamping */
+
+#define E1000_TSYNCRXCFG_PTP_V1_CTRLT_MASK 0x000000FF
+#define E1000_TSYNCRXCFG_PTP_V1_SYNC_MESSAGE 0x00
+#define E1000_TSYNCRXCFG_PTP_V1_DELAY_REQ_MESSAGE 0x01
+#define E1000_TSYNCRXCFG_PTP_V1_FOLLOWUP_MESSAGE 0x02
+#define E1000_TSYNCRXCFG_PTP_V1_DELAY_RESP_MESSAGE 0x03
+#define E1000_TSYNCRXCFG_PTP_V1_MANAGEMENT_MESSAGE 0x04
+
+#define E1000_TSYNCRXCFG_PTP_V2_MSGID_MASK 0x00000F00
+#define E1000_TSYNCRXCFG_PTP_V2_SYNC_MESSAGE 0x0000
+#define E1000_TSYNCRXCFG_PTP_V2_DELAY_REQ_MESSAGE 0x0100
+#define E1000_TSYNCRXCFG_PTP_V2_PATH_DELAY_REQ_MESSAGE 0x0200
+#define E1000_TSYNCRXCFG_PTP_V2_PATH_DELAY_RESP_MESSAGE 0x0300
+#define E1000_TSYNCRXCFG_PTP_V2_FOLLOWUP_MESSAGE 0x0800
+#define E1000_TSYNCRXCFG_PTP_V2_DELAY_RESP_MESSAGE 0x0900
+#define E1000_TSYNCRXCFG_PTP_V2_PATH_DELAY_FOLLOWUP_MESSAGE 0x0A00
+#define E1000_TSYNCRXCFG_PTP_V2_ANNOUNCE_MESSAGE 0x0B00
+#define E1000_TSYNCRXCFG_PTP_V2_SIGNALLING_MESSAGE 0x0C00
+#define E1000_TSYNCRXCFG_PTP_V2_MANAGEMENT_MESSAGE 0x0D00
+
+#define E1000_TIMINCA_16NS_SHIFT 24
/* TUPLE Filtering Configuration */
-#define E1000_TTQF_DISABLE_MASK 0xF0008000 /* TTQF Disable Mask */
-#define E1000_TTQF_QUEUE_ENABLE 0x100 /* TTQF Queue Enable Bit */
-#define E1000_TTQF_PROTOCOL_MASK 0xFF /* TTQF Protocol Mask */
+#define E1000_TTQF_DISABLE_MASK 0xF0008000 /* TTQF Disable Mask */
+#define E1000_TTQF_QUEUE_ENABLE 0x100 /* TTQF Queue Enable Bit */
+#define E1000_TTQF_PROTOCOL_MASK 0xFF /* TTQF Protocol Mask */
/* TTQF TCP Bit, shift with E1000_TTQF_PROTOCOL SHIFT */
-#define E1000_TTQF_PROTOCOL_TCP 0x0
+#define E1000_TTQF_PROTOCOL_TCP 0x0
/* TTQF UDP Bit, shift with E1000_TTQF_PROTOCOL_SHIFT */
-#define E1000_TTQF_PROTOCOL_UDP 0x1
+#define E1000_TTQF_PROTOCOL_UDP 0x1
/* TTQF SCTP Bit, shift with E1000_TTQF_PROTOCOL_SHIFT */
-#define E1000_TTQF_PROTOCOL_SCTP 0x2
-#define E1000_TTQF_PROTOCOL_SHIFT 5 /* TTQF Protocol Shift */
-#define E1000_TTQF_QUEUE_SHIFT 16 /* TTQF Queue Shfit */
-#define E1000_TTQF_RX_QUEUE_MASK 0x70000 /* TTQF Queue Mask */
-#define E1000_TTQF_MASK_ENABLE 0x10000000 /* TTQF Mask Enable Bit */
-#define E1000_IMIR_CLEAR_MASK 0xF001FFFF /* IMIR Reg Clear Mask */
-#define E1000_IMIR_PORT_BYPASS 0x20000 /* IMIR Port Bypass Bit */
-#define E1000_IMIR_PRIORITY_SHIFT 29 /* IMIR Priority Shift */
-#define E1000_IMIREXT_CLEAR_MASK 0x7FFFF /* IMIREXT Reg Clear Mask */
-
-#define E1000_MDICNFG_EXT_MDIO 0x80000000 /* MDI ext/int destination */
-#define E1000_MDICNFG_COM_MDIO 0x40000000 /* MDI shared w/ lan 0 */
-#define E1000_MDICNFG_PHY_MASK 0x03E00000
-#define E1000_MDICNFG_PHY_SHIFT 21
-
-#define E1000_THSTAT_LOW_EVENT 0x20000000 /* Low thermal threshold */
-#define E1000_THSTAT_MID_EVENT 0x00200000 /* Mid thermal threshold */
-#define E1000_THSTAT_HIGH_EVENT 0x00002000 /* High thermal threshold */
-#define E1000_THSTAT_PWR_DOWN 0x00000001 /* Power Down Event */
-#define E1000_THSTAT_LINK_THROTTLE 0x00000002 /* Link Speed Throttle Event */
-
-/* Powerville EEE defines */
-#define E1000_IPCNFG_EEE_1G_AN 0x00000008 /* IPCNFG EEE Enable 1G AN */
-#define E1000_IPCNFG_EEE_100M_AN 0x00000004 /* IPCNFG EEE Enable 100M AN */
-#define E1000_EEER_TX_LPI_EN 0x00010000 /* EEER Tx LPI Enable */
-#define E1000_EEER_RX_LPI_EN 0x00020000 /* EEER Rx LPI Enable */
-#define E1000_EEER_LPI_FC 0x00040000 /* EEER Enable on Flow Control*/
+#define E1000_TTQF_PROTOCOL_SCTP 0x2
+#define E1000_TTQF_PROTOCOL_SHIFT 5 /* TTQF Protocol Shift */
+#define E1000_TTQF_QUEUE_SHIFT 16 /* TTQF Queue Shfit */
+#define E1000_TTQF_RX_QUEUE_MASK 0x70000 /* TTQF Queue Mask */
+#define E1000_TTQF_MASK_ENABLE 0x10000000 /* TTQF Mask Enable Bit */
+#define E1000_IMIR_CLEAR_MASK 0xF001FFFF /* IMIR Reg Clear Mask */
+#define E1000_IMIR_PORT_BYPASS 0x20000 /* IMIR Port Bypass Bit */
+#define E1000_IMIR_PRIORITY_SHIFT 29 /* IMIR Priority Shift */
+#define E1000_IMIREXT_CLEAR_MASK 0x7FFFF /* IMIREXT Reg Clear Mask */
+
+#define E1000_MDICNFG_EXT_MDIO 0x80000000 /* MDI ext/int destination */
+#define E1000_MDICNFG_COM_MDIO 0x40000000 /* MDI shared w/ lan 0 */
+#define E1000_MDICNFG_PHY_MASK 0x03E00000
+#define E1000_MDICNFG_PHY_SHIFT 21
+
+#define E1000_THSTAT_LOW_EVENT 0x20000000 /* Low thermal threshold */
+#define E1000_THSTAT_MID_EVENT 0x00200000 /* Mid thermal threshold */
+#define E1000_THSTAT_HIGH_EVENT 0x00002000 /* High thermal threshold */
+#define E1000_THSTAT_PWR_DOWN 0x00000001 /* Power Down Event */
+#define E1000_THSTAT_LINK_THROTTLE 0x00000002 /* Link Spd Throttle Event */
+
+/* I350 EEE defines */
+#define E1000_IPCNFG_EEE_1G_AN 0x00000008 /* IPCNFG EEE Ena 1G AN */
+#define E1000_IPCNFG_EEE_100M_AN 0x00000004 /* IPCNFG EEE Ena 100M AN */
+#define E1000_EEER_TX_LPI_EN 0x00010000 /* EEER Tx LPI Enable */
+#define E1000_EEER_RX_LPI_EN 0x00020000 /* EEER Rx LPI Enable */
+#define E1000_EEER_LPI_FC 0x00040000 /* EEER Ena on Flow Cntrl */
/* EEE status */
-#define E1000_EEER_EEE_NEG 0x20000000 /* EEE capability negotiated */
-#define E1000_EEER_RX_LPI_STATUS 0x40000000 /* Rx in LPI state */
-#define E1000_EEER_TX_LPI_STATUS 0x80000000 /* Tx in LPI state */
+#define E1000_EEER_EEE_NEG 0x20000000 /* EEE capability nego */
+#define E1000_EEER_RX_LPI_STATUS 0x40000000 /* Rx in LPI state */
+#define E1000_EEER_TX_LPI_STATUS 0x80000000 /* Tx in LPI state */
/* PCI Express Control */
-#define E1000_GCR_RXD_NO_SNOOP 0x00000001
-#define E1000_GCR_RXDSCW_NO_SNOOP 0x00000002
-#define E1000_GCR_RXDSCR_NO_SNOOP 0x00000004
-#define E1000_GCR_TXD_NO_SNOOP 0x00000008
-#define E1000_GCR_TXDSCW_NO_SNOOP 0x00000010
-#define E1000_GCR_TXDSCR_NO_SNOOP 0x00000020
-#define E1000_GCR_CMPL_TMOUT_MASK 0x0000F000
-#define E1000_GCR_CMPL_TMOUT_10ms 0x00001000
-#define E1000_GCR_CMPL_TMOUT_RESEND 0x00010000
-#define E1000_GCR_CAP_VER2 0x00040000
-
-#define PCIE_NO_SNOOP_ALL (E1000_GCR_RXD_NO_SNOOP | \
- E1000_GCR_RXDSCW_NO_SNOOP | \
- E1000_GCR_RXDSCR_NO_SNOOP | \
- E1000_GCR_TXD_NO_SNOOP | \
- E1000_GCR_TXDSCW_NO_SNOOP | \
- E1000_GCR_TXDSCR_NO_SNOOP)
+#define E1000_GCR_RXD_NO_SNOOP 0x00000001
+#define E1000_GCR_RXDSCW_NO_SNOOP 0x00000002
+#define E1000_GCR_RXDSCR_NO_SNOOP 0x00000004
+#define E1000_GCR_TXD_NO_SNOOP 0x00000008
+#define E1000_GCR_TXDSCW_NO_SNOOP 0x00000010
+#define E1000_GCR_TXDSCR_NO_SNOOP 0x00000020
+#define E1000_GCR_CMPL_TMOUT_MASK 0x0000F000
+#define E1000_GCR_CMPL_TMOUT_10ms 0x00001000
+#define E1000_GCR_CMPL_TMOUT_RESEND 0x00010000
+#define E1000_GCR_CAP_VER2 0x00040000
+
+#define PCIE_NO_SNOOP_ALL (E1000_GCR_RXD_NO_SNOOP | \
+ E1000_GCR_RXDSCW_NO_SNOOP | \
+ E1000_GCR_RXDSCR_NO_SNOOP | \
+ E1000_GCR_TXD_NO_SNOOP | \
+ E1000_GCR_TXDSCW_NO_SNOOP | \
+ E1000_GCR_TXDSCR_NO_SNOOP)
+
+/* mPHY address control and data registers */
+#define E1000_MPHY_ADDR_CTL 0x0024 /* Address Control Reg */
+#define E1000_MPHY_ADDR_CTL_OFFSET_MASK 0xFFFF0000
+#define E1000_MPHY_DATA 0x0E10 /* Data Register */
+
+/* AFE CSR Offset for PCS CLK */
+#define E1000_MPHY_PCS_CLK_REG_OFFSET 0x0004
+/* Override for near end digital loopback. */
+#define E1000_MPHY_PCS_CLK_REG_DIGINELBEN 0x10
/* PHY Control Register */
-#define MII_CR_SPEED_SELECT_MSB 0x0040 /* bits 6,13: 10=1000, 01=100, 00=10 */
-#define MII_CR_COLL_TEST_ENABLE 0x0080 /* Collision test enable */
-#define MII_CR_FULL_DUPLEX 0x0100 /* FDX =1, half duplex =0 */
-#define MII_CR_RESTART_AUTO_NEG 0x0200 /* Restart auto negotiation */
-#define MII_CR_ISOLATE 0x0400 /* Isolate PHY from MII */
-#define MII_CR_POWER_DOWN 0x0800 /* Power down */
-#define MII_CR_AUTO_NEG_EN 0x1000 /* Auto Neg Enable */
-#define MII_CR_SPEED_SELECT_LSB 0x2000 /* bits 6,13: 10=1000, 01=100, 00=10 */
-#define MII_CR_LOOPBACK 0x4000 /* 0 = normal, 1 = loopback */
-#define MII_CR_RESET 0x8000 /* 0 = normal, 1 = PHY reset */
-#define MII_CR_SPEED_1000 0x0040
-#define MII_CR_SPEED_100 0x2000
-#define MII_CR_SPEED_10 0x0000
+#define MII_CR_SPEED_SELECT_MSB 0x0040 /* bits 6,13: 10=1000, 01=100, 00=10 */
+#define MII_CR_COLL_TEST_ENABLE 0x0080 /* Collision test enable */
+#define MII_CR_FULL_DUPLEX 0x0100 /* FDX =1, half duplex =0 */
+#define MII_CR_RESTART_AUTO_NEG 0x0200 /* Restart auto negotiation */
+#define MII_CR_ISOLATE 0x0400 /* Isolate PHY from MII */
+#define MII_CR_POWER_DOWN 0x0800 /* Power down */
+#define MII_CR_AUTO_NEG_EN 0x1000 /* Auto Neg Enable */
+#define MII_CR_SPEED_SELECT_LSB 0x2000 /* bits 6,13: 10=1000, 01=100, 00=10 */
+#define MII_CR_LOOPBACK 0x4000 /* 0 = normal, 1 = loopback */
+#define MII_CR_RESET 0x8000 /* 0 = normal, 1 = PHY reset */
+#define MII_CR_SPEED_1000 0x0040
+#define MII_CR_SPEED_100 0x2000
+#define MII_CR_SPEED_10 0x0000
/* PHY Status Register */
-#define MII_SR_EXTENDED_CAPS 0x0001 /* Extended register capabilities */
-#define MII_SR_JABBER_DETECT 0x0002 /* Jabber Detected */
-#define MII_SR_LINK_STATUS 0x0004 /* Link Status 1 = link */
-#define MII_SR_AUTONEG_CAPS 0x0008 /* Auto Neg Capable */
-#define MII_SR_REMOTE_FAULT 0x0010 /* Remote Fault Detect */
-#define MII_SR_AUTONEG_COMPLETE 0x0020 /* Auto Neg Complete */
+#define MII_SR_EXTENDED_CAPS 0x0001 /* Extended register capabilities */
+#define MII_SR_JABBER_DETECT 0x0002 /* Jabber Detected */
+#define MII_SR_LINK_STATUS 0x0004 /* Link Status 1 = link */
+#define MII_SR_AUTONEG_CAPS 0x0008 /* Auto Neg Capable */
+#define MII_SR_REMOTE_FAULT 0x0010 /* Remote Fault Detect */
+#define MII_SR_AUTONEG_COMPLETE 0x0020 /* Auto Neg Complete */
#define MII_SR_PREAMBLE_SUPPRESS 0x0040 /* Preamble may be suppressed */
-#define MII_SR_EXTENDED_STATUS 0x0100 /* Ext. status info in Reg 0x0F */
-#define MII_SR_100T2_HD_CAPS 0x0200 /* 100T2 Half Duplex Capable */
-#define MII_SR_100T2_FD_CAPS 0x0400 /* 100T2 Full Duplex Capable */
-#define MII_SR_10T_HD_CAPS 0x0800 /* 10T Half Duplex Capable */
-#define MII_SR_10T_FD_CAPS 0x1000 /* 10T Full Duplex Capable */
-#define MII_SR_100X_HD_CAPS 0x2000 /* 100X Half Duplex Capable */
-#define MII_SR_100X_FD_CAPS 0x4000 /* 100X Full Duplex Capable */
-#define MII_SR_100T4_CAPS 0x8000 /* 100T4 Capable */
+#define MII_SR_EXTENDED_STATUS 0x0100 /* Ext. status info in Reg 0x0F */
+#define MII_SR_100T2_HD_CAPS 0x0200 /* 100T2 Half Duplex Capable */
+#define MII_SR_100T2_FD_CAPS 0x0400 /* 100T2 Full Duplex Capable */
+#define MII_SR_10T_HD_CAPS 0x0800 /* 10T Half Duplex Capable */
+#define MII_SR_10T_FD_CAPS 0x1000 /* 10T Full Duplex Capable */
+#define MII_SR_100X_HD_CAPS 0x2000 /* 100X Half Duplex Capable */
+#define MII_SR_100X_FD_CAPS 0x4000 /* 100X Full Duplex Capable */
+#define MII_SR_100T4_CAPS 0x8000 /* 100T4 Capable */
/* Autoneg Advertisement Register */
-#define NWAY_AR_SELECTOR_FIELD 0x0001 /* indicates IEEE 802.3 CSMA/CD */
-#define NWAY_AR_10T_HD_CAPS 0x0020 /* 10T Half Duplex Capable */
-#define NWAY_AR_10T_FD_CAPS 0x0040 /* 10T Full Duplex Capable */
-#define NWAY_AR_100TX_HD_CAPS 0x0080 /* 100TX Half Duplex Capable */
-#define NWAY_AR_100TX_FD_CAPS 0x0100 /* 100TX Full Duplex Capable */
-#define NWAY_AR_100T4_CAPS 0x0200 /* 100T4 Capable */
-#define NWAY_AR_PAUSE 0x0400 /* Pause operation desired */
-#define NWAY_AR_ASM_DIR 0x0800 /* Asymmetric Pause Direction bit */
-#define NWAY_AR_REMOTE_FAULT 0x2000 /* Remote Fault detected */
-#define NWAY_AR_NEXT_PAGE 0x8000 /* Next Page ability supported */
+#define NWAY_AR_SELECTOR_FIELD 0x0001 /* indicates IEEE 802.3 CSMA/CD */
+#define NWAY_AR_10T_HD_CAPS 0x0020 /* 10T Half Duplex Capable */
+#define NWAY_AR_10T_FD_CAPS 0x0040 /* 10T Full Duplex Capable */
+#define NWAY_AR_100TX_HD_CAPS 0x0080 /* 100TX Half Duplex Capable */
+#define NWAY_AR_100TX_FD_CAPS 0x0100 /* 100TX Full Duplex Capable */
+#define NWAY_AR_100T4_CAPS 0x0200 /* 100T4 Capable */
+#define NWAY_AR_PAUSE 0x0400 /* Pause operation desired */
+#define NWAY_AR_ASM_DIR 0x0800 /* Asymmetric Pause Direction bit */
+#define NWAY_AR_REMOTE_FAULT 0x2000 /* Remote Fault detected */
+#define NWAY_AR_NEXT_PAGE 0x8000 /* Next Page ability supported */
/* Link Partner Ability Register (Base Page) */
-#define NWAY_LPAR_SELECTOR_FIELD 0x0000 /* LP protocol selector field */
-#define NWAY_LPAR_10T_HD_CAPS 0x0020 /* LP is 10T Half Duplex Capable */
-#define NWAY_LPAR_10T_FD_CAPS 0x0040 /* LP is 10T Full Duplex Capable */
-#define NWAY_LPAR_100TX_HD_CAPS 0x0080 /* LP is 100TX Half Duplex Capable */
-#define NWAY_LPAR_100TX_FD_CAPS 0x0100 /* LP is 100TX Full Duplex Capable */
-#define NWAY_LPAR_100T4_CAPS 0x0200 /* LP is 100T4 Capable */
-#define NWAY_LPAR_PAUSE 0x0400 /* LP Pause operation desired */
-#define NWAY_LPAR_ASM_DIR 0x0800 /* LP Asymmetric Pause Direction bit */
-#define NWAY_LPAR_REMOTE_FAULT 0x2000 /* LP has detected Remote Fault */
-#define NWAY_LPAR_ACKNOWLEDGE 0x4000 /* LP has rx'd link code word */
-#define NWAY_LPAR_NEXT_PAGE 0x8000 /* Next Page ability supported */
+#define NWAY_LPAR_SELECTOR_FIELD 0x0000 /* LP protocol selector field */
+#define NWAY_LPAR_10T_HD_CAPS 0x0020 /* LP 10T Half Dplx Capable */
+#define NWAY_LPAR_10T_FD_CAPS 0x0040 /* LP 10T Full Dplx Capable */
+#define NWAY_LPAR_100TX_HD_CAPS 0x0080 /* LP 100TX Half Dplx Capable */
+#define NWAY_LPAR_100TX_FD_CAPS 0x0100 /* LP 100TX Full Dplx Capable */
+#define NWAY_LPAR_100T4_CAPS 0x0200 /* LP is 100T4 Capable */
+#define NWAY_LPAR_PAUSE 0x0400 /* LP Pause operation desired */
+#define NWAY_LPAR_ASM_DIR 0x0800 /* LP Asym Pause Direction bit */
+#define NWAY_LPAR_REMOTE_FAULT 0x2000 /* LP detected Remote Fault */
+#define NWAY_LPAR_ACKNOWLEDGE 0x4000 /* LP rx'd link code word */
+#define NWAY_LPAR_NEXT_PAGE 0x8000 /* Next Page ability supported */
/* Autoneg Expansion Register */
-#define NWAY_ER_LP_NWAY_CAPS 0x0001 /* LP has Auto Neg Capability */
-#define NWAY_ER_PAGE_RXD 0x0002 /* LP is 10T Half Duplex Capable */
-#define NWAY_ER_NEXT_PAGE_CAPS 0x0004 /* LP is 10T Full Duplex Capable */
-#define NWAY_ER_LP_NEXT_PAGE_CAPS 0x0008 /* LP is 100TX Half Duplex Capable */
-#define NWAY_ER_PAR_DETECT_FAULT 0x0010 /* LP is 100TX Full Duplex Capable */
+#define NWAY_ER_LP_NWAY_CAPS 0x0001 /* LP has Auto Neg Capability */
+#define NWAY_ER_PAGE_RXD 0x0002 /* LP 10T Half Dplx Capable */
+#define NWAY_ER_NEXT_PAGE_CAPS 0x0004 /* LP 10T Full Dplx Capable */
+#define NWAY_ER_LP_NEXT_PAGE_CAPS 0x0008 /* LP 100TX Half Dplx Capable */
+#define NWAY_ER_PAR_DETECT_FAULT 0x0010 /* LP 100TX Full Dplx Capable */
/* 1000BASE-T Control Register */
-#define CR_1000T_ASYM_PAUSE 0x0080 /* Advertise asymmetric pause bit */
-#define CR_1000T_HD_CAPS 0x0100 /* Advertise 1000T HD capability */
-#define CR_1000T_FD_CAPS 0x0200 /* Advertise 1000T FD capability */
-#define CR_1000T_REPEATER_DTE 0x0400 /* 1=Repeater/switch device port */
- /* 0=DTE device */
-#define CR_1000T_MS_VALUE 0x0800 /* 1=Configure PHY as Master */
- /* 0=Configure PHY as Slave */
-#define CR_1000T_MS_ENABLE 0x1000 /* 1=Master/Slave manual config value */
- /* 0=Automatic Master/Slave config */
+#define CR_1000T_ASYM_PAUSE 0x0080 /* Advertise asymmetric pause bit */
+#define CR_1000T_HD_CAPS 0x0100 /* Advertise 1000T HD capability */
+#define CR_1000T_FD_CAPS 0x0200 /* Advertise 1000T FD capability */
+/* 1=Repeater/switch device port 0=DTE device */
+#define CR_1000T_REPEATER_DTE 0x0400
+/* 1=Configure PHY as Master 0=Configure PHY as Slave */
+#define CR_1000T_MS_VALUE 0x0800
+/* 1=Master/Slave manual config value 0=Automatic Master/Slave config */
+#define CR_1000T_MS_ENABLE 0x1000
#define CR_1000T_TEST_MODE_NORMAL 0x0000 /* Normal Operation */
-#define CR_1000T_TEST_MODE_1 0x2000 /* Transmit Waveform test */
-#define CR_1000T_TEST_MODE_2 0x4000 /* Master Transmit Jitter test */
-#define CR_1000T_TEST_MODE_3 0x6000 /* Slave Transmit Jitter test */
-#define CR_1000T_TEST_MODE_4 0x8000 /* Transmitter Distortion test */
+#define CR_1000T_TEST_MODE_1 0x2000 /* Transmit Waveform test */
+#define CR_1000T_TEST_MODE_2 0x4000 /* Master Transmit Jitter test */
+#define CR_1000T_TEST_MODE_3 0x6000 /* Slave Transmit Jitter test */
+#define CR_1000T_TEST_MODE_4 0x8000 /* Transmitter Distortion test */
/* 1000BASE-T Status Register */
-#define SR_1000T_IDLE_ERROR_CNT 0x00FF /* Num idle errors since last read */
-#define SR_1000T_ASYM_PAUSE_DIR 0x0100 /* LP asymmetric pause direction bit */
-#define SR_1000T_LP_HD_CAPS 0x0400 /* LP is 1000T HD capable */
-#define SR_1000T_LP_FD_CAPS 0x0800 /* LP is 1000T FD capable */
-#define SR_1000T_REMOTE_RX_STATUS 0x1000 /* Remote receiver OK */
-#define SR_1000T_LOCAL_RX_STATUS 0x2000 /* Local receiver OK */
-#define SR_1000T_MS_CONFIG_RES 0x4000 /* 1=Local Tx is Master, 0=Slave */
-#define SR_1000T_MS_CONFIG_FAULT 0x8000 /* Master/Slave config fault */
+#define SR_1000T_IDLE_ERROR_CNT 0x00FF /* Num idle err since last rd */
+#define SR_1000T_ASYM_PAUSE_DIR 0x0100 /* LP asym pause direction bit */
+#define SR_1000T_LP_HD_CAPS 0x0400 /* LP is 1000T HD capable */
+#define SR_1000T_LP_FD_CAPS 0x0800 /* LP is 1000T FD capable */
+#define SR_1000T_REMOTE_RX_STATUS 0x1000 /* Remote receiver OK */
+#define SR_1000T_LOCAL_RX_STATUS 0x2000 /* Local receiver OK */
+#define SR_1000T_MS_CONFIG_RES 0x4000 /* 1=Local Tx Master, 0=Slave */
+#define SR_1000T_MS_CONFIG_FAULT 0x8000 /* Master/Slave config fault */
-#define SR_1000T_PHY_EXCESSIVE_IDLE_ERR_COUNT 5
+#define SR_1000T_PHY_EXCESSIVE_IDLE_ERR_COUNT 5
/* PHY 1000 MII Register/Bit Definitions */
/* PHY Registers defined by IEEE */
-#define PHY_CONTROL 0x00 /* Control Register */
-#define PHY_STATUS 0x01 /* Status Register */
-#define PHY_ID1 0x02 /* Phy Id Reg (word 1) */
-#define PHY_ID2 0x03 /* Phy Id Reg (word 2) */
-#define PHY_AUTONEG_ADV 0x04 /* Autoneg Advertisement */
-#define PHY_LP_ABILITY 0x05 /* Link Partner Ability (Base Page) */
-#define PHY_AUTONEG_EXP 0x06 /* Autoneg Expansion Reg */
-#define PHY_NEXT_PAGE_TX 0x07 /* Next Page Tx */
-#define PHY_LP_NEXT_PAGE 0x08 /* Link Partner Next Page */
-#define PHY_1000T_CTRL 0x09 /* 1000Base-T Control Reg */
-#define PHY_1000T_STATUS 0x0A /* 1000Base-T Status Reg */
-#define PHY_EXT_STATUS 0x0F /* Extended Status Reg */
-
-#define PHY_CONTROL_LB 0x4000 /* PHY Loopback bit */
+#define PHY_CONTROL 0x00 /* Control Register */
+#define PHY_STATUS 0x01 /* Status Register */
+#define PHY_ID1 0x02 /* Phy Id Reg (word 1) */
+#define PHY_ID2 0x03 /* Phy Id Reg (word 2) */
+#define PHY_AUTONEG_ADV 0x04 /* Autoneg Advertisement */
+#define PHY_LP_ABILITY 0x05 /* Link Partner Ability (Base Page) */
+#define PHY_AUTONEG_EXP 0x06 /* Autoneg Expansion Reg */
+#define PHY_NEXT_PAGE_TX 0x07 /* Next Page Tx */
+#define PHY_LP_NEXT_PAGE 0x08 /* Link Partner Next Page */
+#define PHY_1000T_CTRL 0x09 /* 1000Base-T Control Reg */
+#define PHY_1000T_STATUS 0x0A /* 1000Base-T Status Reg */
+#define PHY_EXT_STATUS 0x0F /* Extended Status Reg */
+
+#define PHY_CONTROL_LB 0x4000 /* PHY Loopback bit */
/* NVM Control */
-#define E1000_EECD_SK 0x00000001 /* NVM Clock */
-#define E1000_EECD_CS 0x00000002 /* NVM Chip Select */
-#define E1000_EECD_DI 0x00000004 /* NVM Data In */
-#define E1000_EECD_DO 0x00000008 /* NVM Data Out */
-#define E1000_EECD_FWE_MASK 0x00000030
-#define E1000_EECD_FWE_DIS 0x00000010 /* Disable FLASH writes */
-#define E1000_EECD_FWE_EN 0x00000020 /* Enable FLASH writes */
-#define E1000_EECD_FWE_SHIFT 4
-#define E1000_EECD_REQ 0x00000040 /* NVM Access Request */
-#define E1000_EECD_GNT 0x00000080 /* NVM Access Grant */
-#define E1000_EECD_PRES 0x00000100 /* NVM Present */
-#define E1000_EECD_SIZE 0x00000200 /* NVM Size (0=64 word 1=256 word) */
+#define E1000_EECD_SK 0x00000001 /* NVM Clock */
+#define E1000_EECD_CS 0x00000002 /* NVM Chip Select */
+#define E1000_EECD_DI 0x00000004 /* NVM Data In */
+#define E1000_EECD_DO 0x00000008 /* NVM Data Out */
+#define E1000_EECD_FWE_MASK 0x00000030
+#define E1000_EECD_FWE_DIS 0x00000010 /* Disable FLASH writes */
+#define E1000_EECD_FWE_EN 0x00000020 /* Enable FLASH writes */
+#define E1000_EECD_FWE_SHIFT 4
+#define E1000_EECD_REQ 0x00000040 /* NVM Access Request */
+#define E1000_EECD_GNT 0x00000080 /* NVM Access Grant */
+#define E1000_EECD_PRES 0x00000100 /* NVM Present */
+#define E1000_EECD_SIZE 0x00000200 /* NVM Size (0=64 word 1=256 word) */
+#define E1000_EECD_BLOCKED 0x00008000 /* Bit banging access blocked flag */
+#define E1000_EECD_ABORT 0x00010000 /* NVM operation aborted flag */
+#define E1000_EECD_TIMEOUT 0x00020000 /* NVM read operation timeout flag */
+#define E1000_EECD_ERROR_CLR 0x00040000 /* NVM error status clear bit */
/* NVM Addressing bits based on type 0=small, 1=large */
-#define E1000_EECD_ADDR_BITS 0x00000400
-#define E1000_EECD_TYPE 0x00002000 /* NVM Type (1-SPI, 0-Microwire) */
+#define E1000_EECD_ADDR_BITS 0x00000400
+#define E1000_EECD_TYPE 0x00002000 /* NVM Type (1-SPI, 0-Microwire) */
#ifndef E1000_NVM_GRANT_ATTEMPTS
-#define E1000_NVM_GRANT_ATTEMPTS 1000 /* NVM # attempts to gain grant */
+#define E1000_NVM_GRANT_ATTEMPTS 1000 /* NVM # attempts to gain grant */
#endif
-#define E1000_EECD_AUTO_RD 0x00000200 /* NVM Auto Read done */
-#define E1000_EECD_SIZE_EX_MASK 0x00007800 /* NVM Size */
-#define E1000_EECD_SIZE_EX_SHIFT 11
-#define E1000_EECD_NVADDS 0x00018000 /* NVM Address Size */
-#define E1000_EECD_SELSHAD 0x00020000 /* Select Shadow RAM */
-#define E1000_EECD_INITSRAM 0x00040000 /* Initialize Shadow RAM */
-#define E1000_EECD_FLUPD 0x00080000 /* Update FLASH */
-#define E1000_EECD_AUPDEN 0x00100000 /* Enable Autonomous FLASH update */
-#define E1000_EECD_SHADV 0x00200000 /* Shadow RAM Data Valid */
-#define E1000_EECD_SEC1VAL 0x00400000 /* Sector One Valid */
-#define E1000_EECD_SECVAL_SHIFT 22
-#define E1000_EECD_SEC1VAL_VALID_MASK (E1000_EECD_AUTO_RD | E1000_EECD_PRES)
-
-#define E1000_NVM_SWDPIN0 0x0001 /* SWDPIN 0 NVM Value */
-#define E1000_NVM_LED_LOGIC 0x0020 /* Led Logic Word */
-#define E1000_NVM_RW_REG_DATA 16 /* Offset to data in NVM read/write regs */
-#define E1000_NVM_RW_REG_DONE 2 /* Offset to READ/WRITE done bit */
-#define E1000_NVM_RW_REG_START 1 /* Start operation */
-#define E1000_NVM_RW_ADDR_SHIFT 2 /* Shift to the address bits */
-#define E1000_NVM_POLL_WRITE 1 /* Flag for polling for write complete */
-#define E1000_NVM_POLL_READ 0 /* Flag for polling for read complete */
-#define E1000_FLASH_UPDATES 2000
+#define E1000_EECD_AUTO_RD 0x00000200 /* NVM Auto Read done */
+#define E1000_EECD_SIZE_EX_MASK 0x00007800 /* NVM Size */
+#define E1000_EECD_SIZE_EX_SHIFT 11
+#define E1000_EECD_NVADDS 0x00018000 /* NVM Address Size */
+#define E1000_EECD_SELSHAD 0x00020000 /* Select Shadow RAM */
+#define E1000_EECD_INITSRAM 0x00040000 /* Initialize Shadow RAM */
+#define E1000_EECD_FLUPD 0x00080000 /* Update FLASH */
+#define E1000_EECD_AUPDEN 0x00100000 /* Ena Auto FLASH update */
+#define E1000_EECD_SHADV 0x00200000 /* Shadow RAM Data Valid */
+#define E1000_EECD_SEC1VAL 0x00400000 /* Sector One Valid */
+#define E1000_EECD_SECVAL_SHIFT 22
+#define E1000_EECD_SEC1VAL_VALID_MASK (E1000_EECD_AUTO_RD | E1000_EECD_PRES)
+
+#define E1000_NVM_SWDPIN0 0x0001 /* SWDPIN 0 NVM Value */
+#define E1000_NVM_LED_LOGIC 0x0020 /* Led Logic Word */
+#define E1000_NVM_RW_REG_DATA 16 /* Offset to data in NVM read/write regs */
+#define E1000_NVM_RW_REG_DONE 2 /* Offset to READ/WRITE done bit */
+#define E1000_NVM_RW_REG_START 1 /* Start operation */
+#define E1000_NVM_RW_ADDR_SHIFT 2 /* Shift to the address bits */
+#define E1000_NVM_POLL_WRITE 1 /* Flag for polling for write complete */
+#define E1000_NVM_POLL_READ 0 /* Flag for polling for read complete */
+#define E1000_FLASH_UPDATES 2000
/* NVM Word Offsets */
-#define NVM_COMPAT 0x0003
-#define NVM_ID_LED_SETTINGS 0x0004
-#define NVM_VERSION 0x0005
-#define NVM_SERDES_AMPLITUDE 0x0006 /* SERDES output amplitude */
-#define NVM_PHY_CLASS_WORD 0x0007
-#define NVM_INIT_CONTROL1_REG 0x000A
-#define NVM_INIT_CONTROL2_REG 0x000F
-#define NVM_SWDEF_PINS_CTRL_PORT_1 0x0010
-#define NVM_INIT_CONTROL3_PORT_B 0x0014
-#define NVM_INIT_3GIO_3 0x001A
-#define NVM_SWDEF_PINS_CTRL_PORT_0 0x0020
-#define NVM_INIT_CONTROL3_PORT_A 0x0024
-#define NVM_CFG 0x0012
-#define NVM_FLASH_VERSION 0x0032
-#define NVM_ALT_MAC_ADDR_PTR 0x0037
-#define NVM_CHECKSUM_REG 0x003F
-#define NVM_COMPATIBILITY_REG_3 0x0003
-#define NVM_COMPATIBILITY_BIT_MASK 0x8000
-
-#define E1000_NVM_CFG_DONE_PORT_0 0x040000 /* MNG config cycle done */
-#define E1000_NVM_CFG_DONE_PORT_1 0x080000 /* ...for second port */
-#define E1000_NVM_CFG_DONE_PORT_2 0x100000 /* ...for third port */
-#define E1000_NVM_CFG_DONE_PORT_3 0x200000 /* ...for fourth port */
-
-#define NVM_82580_LAN_FUNC_OFFSET(a) (a ? (0x40 + (0x40 * a)) : 0)
+#define NVM_COMPAT 0x0003
+#define NVM_ID_LED_SETTINGS 0x0004
+#define NVM_VERSION 0x0005
+#define NVM_SERDES_AMPLITUDE 0x0006 /* SERDES output amplitude */
+#define NVM_PHY_CLASS_WORD 0x0007
+#define NVM_INIT_CONTROL1_REG 0x000A
+#define NVM_INIT_CONTROL2_REG 0x000F
+#define NVM_SWDEF_PINS_CTRL_PORT_1 0x0010
+#define NVM_INIT_CONTROL3_PORT_B 0x0014
+#define NVM_INIT_3GIO_3 0x001A
+#define NVM_SWDEF_PINS_CTRL_PORT_0 0x0020
+#define NVM_INIT_CONTROL3_PORT_A 0x0024
+#define NVM_CFG 0x0012
+#define NVM_FLASH_VERSION 0x0032
+#define NVM_ALT_MAC_ADDR_PTR 0x0037
+#define NVM_CHECKSUM_REG 0x003F
+#define NVM_COMPATIBILITY_REG_3 0x0003
+#define NVM_COMPATIBILITY_BIT_MASK 0x8000
+
+#define E1000_NVM_CFG_DONE_PORT_0 0x040000 /* MNG config cycle done */
+#define E1000_NVM_CFG_DONE_PORT_1 0x080000 /* ...for second port */
+#define E1000_NVM_CFG_DONE_PORT_2 0x100000 /* ...for third port */
+#define E1000_NVM_CFG_DONE_PORT_3 0x200000 /* ...for fourth port */
+
+#define NVM_82580_LAN_FUNC_OFFSET(a) (a ? (0x40 + (0x40 * a)) : 0)
/* Mask bits for fields in Word 0x24 of the NVM */
-#define NVM_WORD24_COM_MDIO 0x0008 /* MDIO interface shared */
-#define NVM_WORD24_EXT_MDIO 0x0004 /* MDIO accesses routed external */
+#define NVM_WORD24_COM_MDIO 0x0008 /* MDIO interface shared */
+#define NVM_WORD24_EXT_MDIO 0x0004 /* MDIO accesses routed extrnl */
+/* Offset of Link Mode bits for 82575 up to Kawela */
+#define NVM_WORD24_LNK_MODE_OFFSET 8
+/* Offset of Link Mode bits for 82580 up */
+#define NVM_WORD24_82580_LNK_MODE_OFFSET 4
+
/* Mask bits for fields in Word 0x0f of the NVM */
-#define NVM_WORD0F_PAUSE_MASK 0x3000
-#define NVM_WORD0F_PAUSE 0x1000
-#define NVM_WORD0F_ASM_DIR 0x2000
-#define NVM_WORD0F_ANE 0x0800
-#define NVM_WORD0F_SWPDIO_EXT_MASK 0x00F0
-#define NVM_WORD0F_LPLU 0x0001
+#define NVM_WORD0F_PAUSE_MASK 0x3000
+#define NVM_WORD0F_PAUSE 0x1000
+#define NVM_WORD0F_ASM_DIR 0x2000
+#define NVM_WORD0F_ANE 0x0800
+#define NVM_WORD0F_SWPDIO_EXT_MASK 0x00F0
+#define NVM_WORD0F_LPLU 0x0001
/* Mask bits for fields in Word 0x1a of the NVM */
-#define NVM_WORD1A_ASPM_MASK 0x000C
+#define NVM_WORD1A_ASPM_MASK 0x000C
/* Mask bits for fields in Word 0x03 of the EEPROM */
-#define NVM_COMPAT_LOM 0x0800
+#define NVM_COMPAT_LOM 0x0800
/* length of string needed to store PBA number */
-#define E1000_PBANUM_LENGTH 11
+#define E1000_PBANUM_LENGTH 11
/* For checksumming, the sum of all words in the NVM should equal 0xBABA. */
-#define NVM_SUM 0xBABA
-
-#define NVM_MAC_ADDR_OFFSET 0
-#define NVM_PBA_OFFSET_0 8
-#define NVM_PBA_OFFSET_1 9
-#define NVM_PBA_PTR_GUARD 0xFAFA
-#define NVM_RESERVED_WORD 0xFFFF
-#define NVM_PHY_CLASS_A 0x8000
-#define NVM_SERDES_AMPLITUDE_MASK 0x000F
-#define NVM_SIZE_MASK 0x1C00
-#define NVM_SIZE_SHIFT 10
-#define NVM_WORD_SIZE_BASE_SHIFT 6
-#define NVM_SWDPIO_EXT_SHIFT 4
+#define NVM_SUM 0xBABA
+
+#define NVM_MAC_ADDR_OFFSET 0
+#define NVM_PBA_OFFSET_0 8
+#define NVM_PBA_OFFSET_1 9
+#define NVM_PBA_PTR_GUARD 0xFAFA
+#define NVM_RESERVED_WORD 0xFFFF
+#define NVM_PHY_CLASS_A 0x8000
+#define NVM_SERDES_AMPLITUDE_MASK 0x000F
+#define NVM_SIZE_MASK 0x1C00
+#define NVM_SIZE_SHIFT 10
+#define NVM_WORD_SIZE_BASE_SHIFT 6
+#define NVM_SWDPIO_EXT_SHIFT 4
/* NVM Commands - Microwire */
-#define NVM_READ_OPCODE_MICROWIRE 0x6 /* NVM read opcode */
-#define NVM_WRITE_OPCODE_MICROWIRE 0x5 /* NVM write opcode */
-#define NVM_ERASE_OPCODE_MICROWIRE 0x7 /* NVM erase opcode */
-#define NVM_EWEN_OPCODE_MICROWIRE 0x13 /* NVM erase/write enable */
-#define NVM_EWDS_OPCODE_MICROWIRE 0x10 /* NVM erase/write disable */
+#define NVM_READ_OPCODE_MICROWIRE 0x6 /* NVM read opcode */
+#define NVM_WRITE_OPCODE_MICROWIRE 0x5 /* NVM write opcode */
+#define NVM_ERASE_OPCODE_MICROWIRE 0x7 /* NVM erase opcode */
+#define NVM_EWEN_OPCODE_MICROWIRE 0x13 /* NVM erase/write enable */
+#define NVM_EWDS_OPCODE_MICROWIRE 0x10 /* NVM erase/write disable */
/* NVM Commands - SPI */
-#define NVM_MAX_RETRY_SPI 5000 /* Max wait of 5ms, for RDY signal */
-#define NVM_READ_OPCODE_SPI 0x03 /* NVM read opcode */
-#define NVM_WRITE_OPCODE_SPI 0x02 /* NVM write opcode */
-#define NVM_A8_OPCODE_SPI 0x08 /* opcode bit-3 = address bit-8 */
-#define NVM_WREN_OPCODE_SPI 0x06 /* NVM set Write Enable latch */
-#define NVM_WRDI_OPCODE_SPI 0x04 /* NVM reset Write Enable latch */
-#define NVM_RDSR_OPCODE_SPI 0x05 /* NVM read Status register */
-#define NVM_WRSR_OPCODE_SPI 0x01 /* NVM write Status register */
+#define NVM_MAX_RETRY_SPI 5000 /* Max wait of 5ms, for RDY signal */
+#define NVM_READ_OPCODE_SPI 0x03 /* NVM read opcode */
+#define NVM_WRITE_OPCODE_SPI 0x02 /* NVM write opcode */
+#define NVM_A8_OPCODE_SPI 0x08 /* opcode bit-3 = address bit-8 */
+#define NVM_WREN_OPCODE_SPI 0x06 /* NVM set Write Enable latch */
+#define NVM_WRDI_OPCODE_SPI 0x04 /* NVM reset Write Enable latch */
+#define NVM_RDSR_OPCODE_SPI 0x05 /* NVM read Status register */
+#define NVM_WRSR_OPCODE_SPI 0x01 /* NVM write Status register */
/* SPI NVM Status Register */
-#define NVM_STATUS_RDY_SPI 0x01
-#define NVM_STATUS_WEN_SPI 0x02
-#define NVM_STATUS_BP0_SPI 0x04
-#define NVM_STATUS_BP1_SPI 0x08
-#define NVM_STATUS_WPEN_SPI 0x80
+#define NVM_STATUS_RDY_SPI 0x01
+#define NVM_STATUS_WEN_SPI 0x02
+#define NVM_STATUS_BP0_SPI 0x04
+#define NVM_STATUS_BP1_SPI 0x08
+#define NVM_STATUS_WPEN_SPI 0x80
/* Word definitions for ID LED Settings */
-#define ID_LED_RESERVED_0000 0x0000
-#define ID_LED_RESERVED_FFFF 0xFFFF
-#define ID_LED_DEFAULT ((ID_LED_OFF1_ON2 << 12) | \
- (ID_LED_OFF1_OFF2 << 8) | \
- (ID_LED_DEF1_DEF2 << 4) | \
- (ID_LED_DEF1_DEF2))
-#define ID_LED_DEF1_DEF2 0x1
-#define ID_LED_DEF1_ON2 0x2
-#define ID_LED_DEF1_OFF2 0x3
-#define ID_LED_ON1_DEF2 0x4
-#define ID_LED_ON1_ON2 0x5
-#define ID_LED_ON1_OFF2 0x6
-#define ID_LED_OFF1_DEF2 0x7
-#define ID_LED_OFF1_ON2 0x8
-#define ID_LED_OFF1_OFF2 0x9
-
-#define IGP_ACTIVITY_LED_MASK 0xFFFFF0FF
-#define IGP_ACTIVITY_LED_ENABLE 0x0300
-#define IGP_LED3_MODE 0x07000000
+#define ID_LED_RESERVED_0000 0x0000
+#define ID_LED_RESERVED_FFFF 0xFFFF
+#define ID_LED_DEFAULT ((ID_LED_OFF1_ON2 << 12) | \
+ (ID_LED_OFF1_OFF2 << 8) | \
+ (ID_LED_DEF1_DEF2 << 4) | \
+ (ID_LED_DEF1_DEF2))
+#define ID_LED_DEF1_DEF2 0x1
+#define ID_LED_DEF1_ON2 0x2
+#define ID_LED_DEF1_OFF2 0x3
+#define ID_LED_ON1_DEF2 0x4
+#define ID_LED_ON1_ON2 0x5
+#define ID_LED_ON1_OFF2 0x6
+#define ID_LED_OFF1_DEF2 0x7
+#define ID_LED_OFF1_ON2 0x8
+#define ID_LED_OFF1_OFF2 0x9
+
+#define IGP_ACTIVITY_LED_MASK 0xFFFFF0FF
+#define IGP_ACTIVITY_LED_ENABLE 0x0300
+#define IGP_LED3_MODE 0x07000000
/* PCI/PCI-X/PCI-EX Config space */
-#define PCIX_COMMAND_REGISTER 0xE6
-#define PCIX_STATUS_REGISTER_LO 0xE8
-#define PCIX_STATUS_REGISTER_HI 0xEA
-#define PCI_HEADER_TYPE_REGISTER 0x0E
-#define PCIE_LINK_STATUS 0x12
-#define PCIE_DEVICE_CONTROL2 0x28
-
-#define PCIX_COMMAND_MMRBC_MASK 0x000C
-#define PCIX_COMMAND_MMRBC_SHIFT 0x2
-#define PCIX_STATUS_HI_MMRBC_MASK 0x0060
-#define PCIX_STATUS_HI_MMRBC_SHIFT 0x5
-#define PCIX_STATUS_HI_MMRBC_4K 0x3
-#define PCIX_STATUS_HI_MMRBC_2K 0x2
-#define PCIX_STATUS_LO_FUNC_MASK 0x7
-#define PCI_HEADER_TYPE_MULTIFUNC 0x80
-#define PCIE_LINK_WIDTH_MASK 0x3F0
-#define PCIE_LINK_WIDTH_SHIFT 4
-#define PCIE_LINK_SPEED_MASK 0x0F
-#define PCIE_LINK_SPEED_2500 0x01
-#define PCIE_LINK_SPEED_5000 0x02
-#define PCIE_DEVICE_CONTROL2_16ms 0x0005
+#define PCIX_COMMAND_REGISTER 0xE6
+#define PCIX_STATUS_REGISTER_LO 0xE8
+#define PCIX_STATUS_REGISTER_HI 0xEA
+#define PCI_HEADER_TYPE_REGISTER 0x0E
+#define PCIE_LINK_STATUS 0x12
+#define PCIE_DEVICE_CONTROL2 0x28
+
+#define PCIX_COMMAND_MMRBC_MASK 0x000C
+#define PCIX_COMMAND_MMRBC_SHIFT 0x2
+#define PCIX_STATUS_HI_MMRBC_MASK 0x0060
+#define PCIX_STATUS_HI_MMRBC_SHIFT 0x5
+#define PCIX_STATUS_HI_MMRBC_4K 0x3
+#define PCIX_STATUS_HI_MMRBC_2K 0x2
+#define PCIX_STATUS_LO_FUNC_MASK 0x7
+#define PCI_HEADER_TYPE_MULTIFUNC 0x80
+#define PCIE_LINK_WIDTH_MASK 0x3F0
+#define PCIE_LINK_WIDTH_SHIFT 4
+#define PCIE_LINK_SPEED_MASK 0x0F
+#define PCIE_LINK_SPEED_2500 0x01
+#define PCIE_LINK_SPEED_5000 0x02
+#define PCIE_DEVICE_CONTROL2_16ms 0x0005
#ifndef ETH_ADDR_LEN
-#define ETH_ADDR_LEN 6
+#define ETH_ADDR_LEN 6
#endif
-#define PHY_REVISION_MASK 0xFFFFFFF0
-#define MAX_PHY_REG_ADDRESS 0x1F /* 5 bit address bus (0-0x1F) */
-#define MAX_PHY_MULTI_PAGE_REG 0xF
+#define PHY_REVISION_MASK 0xFFFFFFF0
+#define MAX_PHY_REG_ADDRESS 0x1F /* 5 bit address bus (0-0x1F) */
+#define MAX_PHY_MULTI_PAGE_REG 0xF
/* Bit definitions for valid PHY IDs. */
/*
* I = Integrated
* E = External
*/
-#define M88E1000_E_PHY_ID 0x01410C50
-#define M88E1000_I_PHY_ID 0x01410C30
-#define M88E1011_I_PHY_ID 0x01410C20
-#define IGP01E1000_I_PHY_ID 0x02A80380
-#define M88E1011_I_REV_4 0x04
-#define M88E1111_I_PHY_ID 0x01410CC0
-#define M88E1112_E_PHY_ID 0x01410C90
-#define I347AT4_E_PHY_ID 0x01410DC0
-#define M88E1340M_E_PHY_ID 0x01410DF0
-#define GG82563_E_PHY_ID 0x01410CA0
-#define IGP03E1000_E_PHY_ID 0x02A80390
-#define IFE_E_PHY_ID 0x02A80330
-#define IFE_PLUS_E_PHY_ID 0x02A80320
-#define IFE_C_E_PHY_ID 0x02A80310
-#define BME1000_E_PHY_ID 0x01410CB0
-#define BME1000_E_PHY_ID_R2 0x01410CB1
-#define I82577_E_PHY_ID 0x01540050
-#define I82578_E_PHY_ID 0x004DD040
-#define I82579_E_PHY_ID 0x01540090
-#define I82580_I_PHY_ID 0x015403A0
-#define I350_I_PHY_ID 0x015403B0
-#define IGP04E1000_E_PHY_ID 0x02A80391
-#define M88_VENDOR 0x0141
+#define M88E1000_E_PHY_ID 0x01410C50
+#define M88E1000_I_PHY_ID 0x01410C30
+#define M88E1011_I_PHY_ID 0x01410C20
+#define IGP01E1000_I_PHY_ID 0x02A80380
+#define M88E1011_I_REV_4 0x04
+#define M88E1111_I_PHY_ID 0x01410CC0
+#define M88E1112_E_PHY_ID 0x01410C90
+#define I347AT4_E_PHY_ID 0x01410DC0
+#define M88E1340M_E_PHY_ID 0x01410DF0
+#define GG82563_E_PHY_ID 0x01410CA0
+#define IGP03E1000_E_PHY_ID 0x02A80390
+#define IFE_E_PHY_ID 0x02A80330
+#define IFE_PLUS_E_PHY_ID 0x02A80320
+#define IFE_C_E_PHY_ID 0x02A80310
+#define BME1000_E_PHY_ID 0x01410CB0
+#define BME1000_E_PHY_ID_R2 0x01410CB1
+#define I82577_E_PHY_ID 0x01540050
+#define I82578_E_PHY_ID 0x004DD040
+#define I82579_E_PHY_ID 0x01540090
+#define I82580_I_PHY_ID 0x015403A0
+#define I350_I_PHY_ID 0x015403B0
+#define IGP04E1000_E_PHY_ID 0x02A80391
+#define M88_VENDOR 0x0141
/* M88E1000 Specific Registers */
-#define M88E1000_PHY_SPEC_CTRL 0x10 /* PHY Specific Control Register */
-#define M88E1000_PHY_SPEC_STATUS 0x11 /* PHY Specific Status Register */
-#define M88E1000_INT_ENABLE 0x12 /* Interrupt Enable Register */
-#define M88E1000_INT_STATUS 0x13 /* Interrupt Status Register */
-#define M88E1000_EXT_PHY_SPEC_CTRL 0x14 /* Extended PHY Specific Control */
-#define M88E1000_RX_ERR_CNTR 0x15 /* Receive Error Counter */
-
-#define M88E1000_PHY_EXT_CTRL 0x1A /* PHY extend control register */
-#define M88E1000_PHY_PAGE_SELECT 0x1D /* Reg 29 for page number setting */
-#define M88E1000_PHY_GEN_CONTROL 0x1E /* Its meaning depends on reg 29 */
-#define M88E1000_PHY_VCO_REG_BIT8 0x100 /* Bits 8 & 11 are adjusted for */
-#define M88E1000_PHY_VCO_REG_BIT11 0x800 /* improved BER performance */
+#define M88E1000_PHY_SPEC_CTRL 0x10 /* PHY Specific Control Reg */
+#define M88E1000_PHY_SPEC_STATUS 0x11 /* PHY Specific Status Reg */
+#define M88E1000_INT_ENABLE 0x12 /* Interrupt Enable Reg */
+#define M88E1000_INT_STATUS 0x13 /* Interrupt Status Reg */
+#define M88E1000_EXT_PHY_SPEC_CTRL 0x14 /* Extended PHY Specific Cntrl */
+#define M88E1000_RX_ERR_CNTR 0x15 /* Receive Error Counter */
+
+#define M88E1000_PHY_EXT_CTRL 0x1A /* PHY extend control register */
+#define M88E1000_PHY_PAGE_SELECT 0x1D /* Reg 29 for pg number setting */
+#define M88E1000_PHY_GEN_CONTROL 0x1E /* meaning depends on reg 29 */
+#define M88E1000_PHY_VCO_REG_BIT8 0x100 /* Bits 8 & 11 are adjusted for */
+#define M88E1000_PHY_VCO_REG_BIT11 0x800 /* improved BER performance */
/* M88E1000 PHY Specific Control Register */
-#define M88E1000_PSCR_JABBER_DISABLE 0x0001 /* 1=Jabber Function disabled */
-#define M88E1000_PSCR_POLARITY_REVERSAL 0x0002 /* 1=Polarity Reverse enabled */
-#define M88E1000_PSCR_SQE_TEST 0x0004 /* 1=SQE Test enabled */
+#define M88E1000_PSCR_JABBER_DISABLE 0x0001 /* 1=Jabber Function disabled */
+#define M88E1000_PSCR_POLARITY_REVERSAL 0x0002 /* 1=Polarity Reverse enabled */
+#define M88E1000_PSCR_SQE_TEST 0x0004 /* 1=SQE Test enabled */
/* 1=CLK125 low, 0=CLK125 toggling */
-#define M88E1000_PSCR_CLK125_DISABLE 0x0010
-#define M88E1000_PSCR_MDI_MANUAL_MODE 0x0000 /* MDI Crossover Mode bits 6:5 */
- /* Manual MDI configuration */
-#define M88E1000_PSCR_MDIX_MANUAL_MODE 0x0020 /* Manual MDIX configuration */
+#define M88E1000_PSCR_CLK125_DISABLE 0x0010
+/* MDI Crossover Mode bits 6:5 Manual MDI configuration */
+#define M88E1000_PSCR_MDI_MANUAL_MODE 0x0000
+#define M88E1000_PSCR_MDIX_MANUAL_MODE 0x0020 /* Manual MDIX configuration */
/* 1000BASE-T: Auto crossover, 100BASE-TX/10BASE-T: MDI Mode */
-#define M88E1000_PSCR_AUTO_X_1000T 0x0040
+#define M88E1000_PSCR_AUTO_X_1000T 0x0040
/* Auto crossover enabled all speeds */
-#define M88E1000_PSCR_AUTO_X_MODE 0x0060
+#define M88E1000_PSCR_AUTO_X_MODE 0x0060
/*
* 1=Enable Extended 10BASE-T distance (Lower 10BASE-T Rx Threshold
* 0=Normal 10BASE-T Rx Threshold
*/
-#define M88E1000_PSCR_EN_10BT_EXT_DIST 0x0080
+#define M88E1000_PSCR_EN_10BT_EXT_DIST 0x0080
/* 1=5-bit interface in 100BASE-TX, 0=MII interface in 100BASE-TX */
-#define M88E1000_PSCR_MII_5BIT_ENABLE 0x0100
-#define M88E1000_PSCR_SCRAMBLER_DISABLE 0x0200 /* 1=Scrambler disable */
-#define M88E1000_PSCR_FORCE_LINK_GOOD 0x0400 /* 1=Force link good */
-#define M88E1000_PSCR_ASSERT_CRS_ON_TX 0x0800 /* 1=Assert CRS on Tx */
+#define M88E1000_PSCR_MII_5BIT_ENABLE 0x0100
+#define M88E1000_PSCR_SCRAMBLER_DISABLE 0x0200 /* 1=Scrambler disable */
+#define M88E1000_PSCR_FORCE_LINK_GOOD 0x0400 /* 1=Force link good */
+#define M88E1000_PSCR_ASSERT_CRS_ON_TX 0x0800 /* 1=Assert CRS on Tx */
/* M88E1000 PHY Specific Status Register */
-#define M88E1000_PSSR_JABBER 0x0001 /* 1=Jabber */
-#define M88E1000_PSSR_REV_POLARITY 0x0002 /* 1=Polarity reversed */
-#define M88E1000_PSSR_DOWNSHIFT 0x0020 /* 1=Downshifted */
-#define M88E1000_PSSR_MDIX 0x0040 /* 1=MDIX; 0=MDI */
+#define M88E1000_PSSR_JABBER 0x0001 /* 1=Jabber */
+#define M88E1000_PSSR_REV_POLARITY 0x0002 /* 1=Polarity reversed */
+#define M88E1000_PSSR_DOWNSHIFT 0x0020 /* 1=Downshifted */
+#define M88E1000_PSSR_MDIX 0x0040 /* 1=MDIX; 0=MDI */
/*
* 0 = <50M
* 1 = 50-80M
@@ -1546,62 +1578,62 @@
* 3 = 110-140M
* 4 = >140M
*/
-#define M88E1000_PSSR_CABLE_LENGTH 0x0380
-#define M88E1000_PSSR_LINK 0x0400 /* 1=Link up, 0=Link down */
-#define M88E1000_PSSR_SPD_DPLX_RESOLVED 0x0800 /* 1=Speed & Duplex resolved */
-#define M88E1000_PSSR_PAGE_RCVD 0x1000 /* 1=Page received */
-#define M88E1000_PSSR_DPLX 0x2000 /* 1=Duplex 0=Half Duplex */
-#define M88E1000_PSSR_SPEED 0xC000 /* Speed, bits 14:15 */
-#define M88E1000_PSSR_10MBS 0x0000 /* 00=10Mbs */
-#define M88E1000_PSSR_100MBS 0x4000 /* 01=100Mbs */
-#define M88E1000_PSSR_1000MBS 0x8000 /* 10=1000Mbs */
-
-#define M88E1000_PSSR_CABLE_LENGTH_SHIFT 7
+#define M88E1000_PSSR_CABLE_LENGTH 0x0380
+#define M88E1000_PSSR_LINK 0x0400 /* 1=Link up, 0=Link down */
+#define M88E1000_PSSR_SPD_DPLX_RESOLVED 0x0800 /* 1=Speed & Duplex resolved */
+#define M88E1000_PSSR_PAGE_RCVD 0x1000 /* 1=Page received */
+#define M88E1000_PSSR_DPLX 0x2000 /* 1=Duplex 0=Half Duplex */
+#define M88E1000_PSSR_SPEED 0xC000 /* Speed, bits 14:15 */
+#define M88E1000_PSSR_10MBS 0x0000 /* 00=10Mbs */
+#define M88E1000_PSSR_100MBS 0x4000 /* 01=100Mbs */
+#define M88E1000_PSSR_1000MBS 0x8000 /* 10=1000Mbs */
+
+#define M88E1000_PSSR_CABLE_LENGTH_SHIFT 7
/* M88E1000 Extended PHY Specific Control Register */
-#define M88E1000_EPSCR_FIBER_LOOPBACK 0x4000 /* 1=Fiber loopback */
+#define M88E1000_EPSCR_FIBER_LOOPBACK 0x4000 /* 1=Fiber loopback */
/*
* 1 = Lost lock detect enabled.
* Will assert lost lock and bring
* link down if idle not seen
* within 1ms in 1000BASE-T
*/
-#define M88E1000_EPSCR_DOWN_NO_IDLE 0x8000
+#define M88E1000_EPSCR_DOWN_NO_IDLE 0x8000
/*
* Number of times we will attempt to autonegotiate before downshifting if we
* are the master
*/
-#define M88E1000_EPSCR_MASTER_DOWNSHIFT_MASK 0x0C00
-#define M88E1000_EPSCR_MASTER_DOWNSHIFT_1X 0x0000
-#define M88E1000_EPSCR_MASTER_DOWNSHIFT_2X 0x0400
-#define M88E1000_EPSCR_MASTER_DOWNSHIFT_3X 0x0800
-#define M88E1000_EPSCR_MASTER_DOWNSHIFT_4X 0x0C00
+#define M88E1000_EPSCR_MASTER_DOWNSHIFT_MASK 0x0C00
+#define M88E1000_EPSCR_MASTER_DOWNSHIFT_1X 0x0000
+#define M88E1000_EPSCR_MASTER_DOWNSHIFT_2X 0x0400
+#define M88E1000_EPSCR_MASTER_DOWNSHIFT_3X 0x0800
+#define M88E1000_EPSCR_MASTER_DOWNSHIFT_4X 0x0C00
/*
* Number of times we will attempt to autonegotiate before downshifting if we
* are the slave
*/
-#define M88E1000_EPSCR_SLAVE_DOWNSHIFT_MASK 0x0300
-#define M88E1000_EPSCR_SLAVE_DOWNSHIFT_DIS 0x0000
-#define M88E1000_EPSCR_SLAVE_DOWNSHIFT_1X 0x0100
-#define M88E1000_EPSCR_SLAVE_DOWNSHIFT_2X 0x0200
-#define M88E1000_EPSCR_SLAVE_DOWNSHIFT_3X 0x0300
-#define M88E1000_EPSCR_TX_CLK_2_5 0x0060 /* 2.5 MHz TX_CLK */
-#define M88E1000_EPSCR_TX_CLK_25 0x0070 /* 25 MHz TX_CLK */
-#define M88E1000_EPSCR_TX_CLK_0 0x0000 /* NO TX_CLK */
+#define M88E1000_EPSCR_SLAVE_DOWNSHIFT_MASK 0x0300
+#define M88E1000_EPSCR_SLAVE_DOWNSHIFT_DIS 0x0000
+#define M88E1000_EPSCR_SLAVE_DOWNSHIFT_1X 0x0100
+#define M88E1000_EPSCR_SLAVE_DOWNSHIFT_2X 0x0200
+#define M88E1000_EPSCR_SLAVE_DOWNSHIFT_3X 0x0300
+#define M88E1000_EPSCR_TX_CLK_2_5 0x0060 /* 2.5 MHz TX_CLK */
+#define M88E1000_EPSCR_TX_CLK_25 0x0070 /* 25 MHz TX_CLK */
+#define M88E1000_EPSCR_TX_CLK_0 0x0000 /* NO TX_CLK */
/* M88E1111 Specific Registers */
-#define M88E1111_PHY_PAGE_SELECT1 0x16 /* for registers 0-28 */
-#define M88E1111_PHY_PAGE_SELECT2 0x1D /* for registers 30-31 */
+#define M88E1111_PHY_PAGE_SELECT1 0x16 /* for registers 0-28 */
+#define M88E1111_PHY_PAGE_SELECT2 0x1D /* for registers 30-31 */
/* M88E1111 page select register mask */
-#define M88E1111_PHY_PAGE_SELECT_MASK1 0xFF
-#define M88E1111_PHY_PAGE_SELECT_MASK2 0x3F
+#define M88E1111_PHY_PAGE_SELECT_MASK1 0xFF
+#define M88E1111_PHY_PAGE_SELECT_MASK2 0x3F
/* Intel I347AT4 Registers */
-#define I347AT4_PCDL 0x10 /* PHY Cable Diagnostics Length */
-#define I347AT4_PCDC 0x15 /* PHY Cable Diagnostics Control */
-#define I347AT4_PAGE_SELECT 0x16
+#define I347AT4_PCDL 0x10 /* PHY Cable Diagnostics Length */
+#define I347AT4_PCDC 0x15 /* PHY Cable Diagnostics Control */
+#define I347AT4_PAGE_SELECT 0x16
/* I347AT4 Extended PHY Specific Control Register */
@@ -1609,213 +1641,220 @@
* Number of times we will attempt to autonegotiate before downshifting if we
* are the master
*/
-#define I347AT4_PSCR_DOWNSHIFT_ENABLE 0x0800
-#define I347AT4_PSCR_DOWNSHIFT_MASK 0x7000
-#define I347AT4_PSCR_DOWNSHIFT_1X 0x0000
-#define I347AT4_PSCR_DOWNSHIFT_2X 0x1000
-#define I347AT4_PSCR_DOWNSHIFT_3X 0x2000
-#define I347AT4_PSCR_DOWNSHIFT_4X 0x3000
-#define I347AT4_PSCR_DOWNSHIFT_5X 0x4000
-#define I347AT4_PSCR_DOWNSHIFT_6X 0x5000
-#define I347AT4_PSCR_DOWNSHIFT_7X 0x6000
-#define I347AT4_PSCR_DOWNSHIFT_8X 0x7000
+#define I347AT4_PSCR_DOWNSHIFT_ENABLE 0x0800
+#define I347AT4_PSCR_DOWNSHIFT_MASK 0x7000
+#define I347AT4_PSCR_DOWNSHIFT_1X 0x0000
+#define I347AT4_PSCR_DOWNSHIFT_2X 0x1000
+#define I347AT4_PSCR_DOWNSHIFT_3X 0x2000
+#define I347AT4_PSCR_DOWNSHIFT_4X 0x3000
+#define I347AT4_PSCR_DOWNSHIFT_5X 0x4000
+#define I347AT4_PSCR_DOWNSHIFT_6X 0x5000
+#define I347AT4_PSCR_DOWNSHIFT_7X 0x6000
+#define I347AT4_PSCR_DOWNSHIFT_8X 0x7000
/* I347AT4 PHY Cable Diagnostics Control */
-#define I347AT4_PCDC_CABLE_LENGTH_UNIT 0x0400 /* 0=cm 1=meters */
+#define I347AT4_PCDC_CABLE_LENGTH_UNIT 0x0400 /* 0=cm 1=meters */
/* M88E1112 only registers */
-#define M88E1112_VCT_DSP_DISTANCE 0x001A
+#define M88E1112_VCT_DSP_DISTANCE 0x001A
/* M88EC018 Rev 2 specific DownShift settings */
-#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_MASK 0x0E00
-#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_1X 0x0000
-#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_2X 0x0200
-#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_3X 0x0400
-#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_4X 0x0600
-#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_5X 0x0800
-#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_6X 0x0A00
-#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_7X 0x0C00
-#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_8X 0x0E00
-
-#define I82578_EPSCR_DOWNSHIFT_ENABLE 0x0020
-#define I82578_EPSCR_DOWNSHIFT_COUNTER_MASK 0x001C
+#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_MASK 0x0E00
+#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_1X 0x0000
+#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_2X 0x0200
+#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_3X 0x0400
+#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_4X 0x0600
+#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_5X 0x0800
+#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_6X 0x0A00
+#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_7X 0x0C00
+#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_8X 0x0E00
+
+#define I82578_EPSCR_DOWNSHIFT_ENABLE 0x0020
+#define I82578_EPSCR_DOWNSHIFT_COUNTER_MASK 0x001C
/* BME1000 PHY Specific Control Register */
-#define BME1000_PSCR_ENABLE_DOWNSHIFT 0x0800 /* 1 = enable downshift */
+#define BME1000_PSCR_ENABLE_DOWNSHIFT 0x0800 /* 1 = enable downshift */
/*
* Bits...
* 15-5: page
* 4-0: register offset
*/
-#define GG82563_PAGE_SHIFT 5
-#define GG82563_REG(page, reg) \
- (((page) << GG82563_PAGE_SHIFT) | ((reg) & MAX_PHY_REG_ADDRESS))
-#define GG82563_MIN_ALT_REG 30
+#define GG82563_PAGE_SHIFT 5
+#define GG82563_REG(page, reg) \
+ (((page) << GG82563_PAGE_SHIFT) | ((reg) & MAX_PHY_REG_ADDRESS))
+#define GG82563_MIN_ALT_REG 30
/* GG82563 Specific Registers */
-#define GG82563_PHY_SPEC_CTRL \
- GG82563_REG(0, 16) /* PHY Specific Control */
-#define GG82563_PHY_SPEC_STATUS \
- GG82563_REG(0, 17) /* PHY Specific Status */
-#define GG82563_PHY_INT_ENABLE \
- GG82563_REG(0, 18) /* Interrupt Enable */
-#define GG82563_PHY_SPEC_STATUS_2 \
- GG82563_REG(0, 19) /* PHY Specific Status 2 */
-#define GG82563_PHY_RX_ERR_CNTR \
- GG82563_REG(0, 21) /* Receive Error Counter */
-#define GG82563_PHY_PAGE_SELECT \
- GG82563_REG(0, 22) /* Page Select */
-#define GG82563_PHY_SPEC_CTRL_2 \
- GG82563_REG(0, 26) /* PHY Specific Control 2 */
-#define GG82563_PHY_PAGE_SELECT_ALT \
- GG82563_REG(0, 29) /* Alternate Page Select */
-#define GG82563_PHY_TEST_CLK_CTRL \
- GG82563_REG(0, 30) /* Test Clock Control (use reg. 29 to select) */
-
-#define GG82563_PHY_MAC_SPEC_CTRL \
- GG82563_REG(2, 21) /* MAC Specific Control Register */
-#define GG82563_PHY_MAC_SPEC_CTRL_2 \
- GG82563_REG(2, 26) /* MAC Specific Control 2 */
-
-#define GG82563_PHY_DSP_DISTANCE \
- GG82563_REG(5, 26) /* DSP Distance */
+#define GG82563_PHY_SPEC_CTRL GG82563_REG(0, 16) /* PHY Spec Cntrl */
+#define GG82563_PHY_SPEC_STATUS GG82563_REG(0, 17) /* PHY Spec Status */
+#define GG82563_PHY_INT_ENABLE GG82563_REG(0, 18) /* Interrupt Ena */
+#define GG82563_PHY_SPEC_STATUS_2 GG82563_REG(0, 19) /* PHY Spec Stat2 */
+#define GG82563_PHY_RX_ERR_CNTR GG82563_REG(0, 21) /* Rx Err Counter */
+#define GG82563_PHY_PAGE_SELECT GG82563_REG(0, 22) /* Page Select */
+#define GG82563_PHY_SPEC_CTRL_2 GG82563_REG(0, 26) /* PHY Spec Cntrl2 */
+#define GG82563_PHY_PAGE_SELECT_ALT GG82563_REG(0, 29) /* Alt Page Select */
+/* Test Clock Control (use reg. 29 to select) */
+#define GG82563_PHY_TEST_CLK_CTRL GG82563_REG(0, 30)
+
+/* MAC Specific Control Register */
+#define GG82563_PHY_MAC_SPEC_CTRL GG82563_REG(2, 21)
+#define GG82563_PHY_MAC_SPEC_CTRL_2 GG82563_REG(2, 26) /* MAC Spec Ctrl 2 */
+
+#define GG82563_PHY_DSP_DISTANCE GG82563_REG(5, 26) /* DSP Distance */
/* Page 193 - Port Control Registers */
-#define GG82563_PHY_KMRN_MODE_CTRL \
- GG82563_REG(193, 16) /* Kumeran Mode Control */
-#define GG82563_PHY_PORT_RESET \
- GG82563_REG(193, 17) /* Port Reset */
-#define GG82563_PHY_REVISION_ID \
- GG82563_REG(193, 18) /* Revision ID */
-#define GG82563_PHY_DEVICE_ID \
- GG82563_REG(193, 19) /* Device ID */
-#define GG82563_PHY_PWR_MGMT_CTRL \
- GG82563_REG(193, 20) /* Power Management Control */
-#define GG82563_PHY_RATE_ADAPT_CTRL \
- GG82563_REG(193, 25) /* Rate Adaptation Control */
+/* Kumeran Mode Control */
+#define GG82563_PHY_KMRN_MODE_CTRL GG82563_REG(193, 16)
+#define GG82563_PHY_PORT_RESET GG82563_REG(193, 17) /* Port Reset */
+#define GG82563_PHY_REVISION_ID GG82563_REG(193, 18) /* Revision ID */
+#define GG82563_PHY_DEVICE_ID GG82563_REG(193, 19) /* Device ID */
+#define GG82563_PHY_PWR_MGMT_CTRL GG82563_REG(193, 20) /* Pwr Mgt Ctrl */
+/* Rate Adaptation Control */
+#define GG82563_PHY_RATE_ADAPT_CTRL GG82563_REG(193, 25)
/* Page 194 - KMRN Registers */
-#define GG82563_PHY_KMRN_FIFO_CTRL_STAT \
- GG82563_REG(194, 16) /* FIFO's Control/Status */
-#define GG82563_PHY_KMRN_CTRL \
- GG82563_REG(194, 17) /* Control */
-#define GG82563_PHY_INBAND_CTRL \
- GG82563_REG(194, 18) /* Inband Control */
-#define GG82563_PHY_KMRN_DIAGNOSTIC \
- GG82563_REG(194, 19) /* Diagnostic */
-#define GG82563_PHY_ACK_TIMEOUTS \
- GG82563_REG(194, 20) /* Acknowledge Timeouts */
-#define GG82563_PHY_ADV_ABILITY \
- GG82563_REG(194, 21) /* Advertised Ability */
-#define GG82563_PHY_LINK_PARTNER_ADV_ABILITY \
- GG82563_REG(194, 23) /* Link Partner Advertised Ability */
-#define GG82563_PHY_ADV_NEXT_PAGE \
- GG82563_REG(194, 24) /* Advertised Next Page */
-#define GG82563_PHY_LINK_PARTNER_ADV_NEXT_PAGE \
- GG82563_REG(194, 25) /* Link Partner Advertised Next page */
-#define GG82563_PHY_KMRN_MISC \
- GG82563_REG(194, 26) /* Misc. */
+/* FIFO's Control/Status */
+#define GG82563_PHY_KMRN_FIFO_CTRL_STAT GG82563_REG(194, 16)
+#define GG82563_PHY_KMRN_CTRL GG82563_REG(194, 17) /* Control */
+#define GG82563_PHY_INBAND_CTRL GG82563_REG(194, 18) /* Inband Ctrl */
+#define GG82563_PHY_KMRN_DIAGNOSTIC GG82563_REG(194, 19) /* Diagnostic */
+#define GG82563_PHY_ACK_TIMEOUTS GG82563_REG(194, 20) /* Ack Timeouts */
+#define GG82563_PHY_ADV_ABILITY GG82563_REG(194, 21) /* Adver Ability */
+/* Link Partner Advertised Ability */
+#define GG82563_PHY_LINK_PARTNER_ADV_ABILITY GG82563_REG(194, 23)
+#define GG82563_PHY_ADV_NEXT_PAGE GG82563_REG(194, 24) /* Adver Next Pg */
+/* Link Partner Advertised Next page */
+#define GG82563_PHY_LINK_PARTNER_ADV_NEXT_PAGE GG82563_REG(194, 25)
+#define GG82563_PHY_KMRN_MISC GG82563_REG(194, 26) /* Misc. */
/* MDI Control */
-#define E1000_MDIC_DATA_MASK 0x0000FFFF
-#define E1000_MDIC_REG_MASK 0x001F0000
-#define E1000_MDIC_REG_SHIFT 16
-#define E1000_MDIC_PHY_MASK 0x03E00000
-#define E1000_MDIC_PHY_SHIFT 21
-#define E1000_MDIC_OP_WRITE 0x04000000
-#define E1000_MDIC_OP_READ 0x08000000
-#define E1000_MDIC_READY 0x10000000
-#define E1000_MDIC_INT_EN 0x20000000
-#define E1000_MDIC_ERROR 0x40000000
-#define E1000_MDIC_DEST 0x80000000
+#define E1000_MDIC_DATA_MASK 0x0000FFFF
+#define E1000_MDIC_REG_MASK 0x001F0000
+#define E1000_MDIC_REG_SHIFT 16
+#define E1000_MDIC_PHY_MASK 0x03E00000
+#define E1000_MDIC_PHY_SHIFT 21
+#define E1000_MDIC_OP_WRITE 0x04000000
+#define E1000_MDIC_OP_READ 0x08000000
+#define E1000_MDIC_READY 0x10000000
+#define E1000_MDIC_INT_EN 0x20000000
+#define E1000_MDIC_ERROR 0x40000000
+#define E1000_MDIC_DEST 0x80000000
/* SerDes Control */
-#define E1000_GEN_CTL_READY 0x80000000
-#define E1000_GEN_CTL_ADDRESS_SHIFT 8
-#define E1000_GEN_POLL_TIMEOUT 640
+#define E1000_GEN_CTL_READY 0x80000000
+#define E1000_GEN_CTL_ADDRESS_SHIFT 8
+#define E1000_GEN_POLL_TIMEOUT 640
/* LinkSec register fields */
-#define E1000_LSECTXCAP_SUM_MASK 0x00FF0000
-#define E1000_LSECTXCAP_SUM_SHIFT 16
-#define E1000_LSECRXCAP_SUM_MASK 0x00FF0000
-#define E1000_LSECRXCAP_SUM_SHIFT 16
-
-#define E1000_LSECTXCTRL_EN_MASK 0x00000003
-#define E1000_LSECTXCTRL_DISABLE 0x0
-#define E1000_LSECTXCTRL_AUTH 0x1
-#define E1000_LSECTXCTRL_AUTH_ENCRYPT 0x2
-#define E1000_LSECTXCTRL_AISCI 0x00000020
-#define E1000_LSECTXCTRL_PNTHRSH_MASK 0xFFFFFF00
-#define E1000_LSECTXCTRL_RSV_MASK 0x000000D8
-
-#define E1000_LSECRXCTRL_EN_MASK 0x0000000C
-#define E1000_LSECRXCTRL_EN_SHIFT 2
-#define E1000_LSECRXCTRL_DISABLE 0x0
-#define E1000_LSECRXCTRL_CHECK 0x1
-#define E1000_LSECRXCTRL_STRICT 0x2
-#define E1000_LSECRXCTRL_DROP 0x3
-#define E1000_LSECRXCTRL_PLSH 0x00000040
-#define E1000_LSECRXCTRL_RP 0x00000080
-#define E1000_LSECRXCTRL_RSV_MASK 0xFFFFFF33
+#define E1000_LSECTXCAP_SUM_MASK 0x00FF0000
+#define E1000_LSECTXCAP_SUM_SHIFT 16
+#define E1000_LSECRXCAP_SUM_MASK 0x00FF0000
+#define E1000_LSECRXCAP_SUM_SHIFT 16
+
+#define E1000_LSECTXCTRL_EN_MASK 0x00000003
+#define E1000_LSECTXCTRL_DISABLE 0x0
+#define E1000_LSECTXCTRL_AUTH 0x1
+#define E1000_LSECTXCTRL_AUTH_ENCRYPT 0x2
+#define E1000_LSECTXCTRL_AISCI 0x00000020
+#define E1000_LSECTXCTRL_PNTHRSH_MASK 0xFFFFFF00
+#define E1000_LSECTXCTRL_RSV_MASK 0x000000D8
+
+#define E1000_LSECRXCTRL_EN_MASK 0x0000000C
+#define E1000_LSECRXCTRL_EN_SHIFT 2
+#define E1000_LSECRXCTRL_DISABLE 0x0
+#define E1000_LSECRXCTRL_CHECK 0x1
+#define E1000_LSECRXCTRL_STRICT 0x2
+#define E1000_LSECRXCTRL_DROP 0x3
+#define E1000_LSECRXCTRL_PLSH 0x00000040
+#define E1000_LSECRXCTRL_RP 0x00000080
+#define E1000_LSECRXCTRL_RSV_MASK 0xFFFFFF33
/* Tx Rate-Scheduler Config fields */
#define E1000_RTTBCNRC_RS_ENA 0x80000000
#define E1000_RTTBCNRC_RF_DEC_MASK 0x00003FFF
-#define E1000_RTTBCNRC_RF_INT_SHIFT 14
+#define E1000_RTTBCNRC_RF_INT_SHIFT 14
#define E1000_RTTBCNRC_RF_INT_MASK \
(E1000_RTTBCNRC_RF_DEC_MASK << E1000_RTTBCNRC_RF_INT_SHIFT)
/* DMA Coalescing register fields */
-#define E1000_DMACR_DMACWT_MASK 0x00003FFF /* DMA Coalescing
- * Watchdog Timer */
-#define E1000_DMACR_DMACTHR_MASK 0x00FF0000 /* DMA Coalescing Rx
- * Threshold */
-#define E1000_DMACR_DMACTHR_SHIFT 16
-#define E1000_DMACR_DMAC_LX_MASK 0x30000000 /* Lx when no PCIe
- * transactions */
-#define E1000_DMACR_DMAC_LX_SHIFT 28
-#define E1000_DMACR_DMAC_EN 0x80000000 /* Enable DMA Coalescing */
-
-#define E1000_DMCTXTH_DMCTTHR_MASK 0x00000FFF /* DMA Coalescing Transmit
- * Threshold */
-
-#define E1000_DMCTLX_TTLX_MASK 0x00000FFF /* Time to LX request */
-
-#define E1000_DMCRTRH_UTRESH_MASK 0x0007FFFF /* Rx Traffic Rate
- * Threshold */
-#define E1000_DMCRTRH_LRPRCW 0x80000000 /* Rx packet rate in
- * current window */
-
-#define E1000_DMCCNT_CCOUNT_MASK 0x01FFFFFF /* DMA Coal Rx Traffic
- * Current Cnt */
-
-#define E1000_FCRTC_RTH_COAL_MASK 0x0003FFF0 /* Flow ctrl Rx Threshold
- * High val */
-#define E1000_FCRTC_RTH_COAL_SHIFT 4
-#define E1000_PCIEMISC_LX_DECISION 0x00000080 /* Lx power decision based
- on DMA coal */
+/* DMA Coalescing Watchdog Timer */
+#define E1000_DMACR_DMACWT_MASK 0x00003FFF
+/* DMA Coalescing Rx Threshold */
+#define E1000_DMACR_DMACTHR_MASK 0x00FF0000
+#define E1000_DMACR_DMACTHR_SHIFT 16
+/* Lx when no PCIe transactions */
+#define E1000_DMACR_DMAC_LX_MASK 0x30000000
+#define E1000_DMACR_DMAC_LX_SHIFT 28
+#define E1000_DMACR_DMAC_EN 0x80000000 /* Enable DMA Coalescing */
+
+/* DMA Coalescing Transmit Threshold */
+#define E1000_DMCTXTH_DMCTTHR_MASK 0x00000FFF
+
+#define E1000_DMCTLX_TTLX_MASK 0x00000FFF /* Time to LX request */
+
+/* Rx Traffic Rate Threshold */
+#define E1000_DMCRTRH_UTRESH_MASK 0x0007FFFF
+/* Rx packet rate in current window */
+#define E1000_DMCRTRH_LRPRCW 0x80000000
+
+/* DMA Coal Rx Traffic Current Count */
+#define E1000_DMCCNT_CCOUNT_MASK 0x01FFFFFF
+
+/* Flow ctrl Rx Threshold High val */
+#define E1000_FCRTC_RTH_COAL_MASK 0x0003FFF0
+#define E1000_FCRTC_RTH_COAL_SHIFT 4
+/* Lx power decision based on DMA coal */
+#define E1000_PCIEMISC_LX_DECISION 0x00000080
+
+#define E1000_LTRC_EEEMS_EN 0x00000005 /* Enable EEE LTR max send */
+#define E1000_RXPBS_SIZE_I210_MASK 0x0000003F /* Rx packet buffer size */
+/* Minimum time for 1000BASE-T where no data will be transmit following move out
+ * of EEE LPI Tx state
+ */
+#define E1000_TW_SYSTEM_1000_MASK 0x000000FF
+/* Minimum time for 100BASE-T where no data will be transmit following move out
+ * of EEE LPI Tx state
+ */
+#define E1000_TW_SYSTEM_100_MASK 0x0000FF00
+#define E1000_TW_SYSTEM_100_SHIFT 8
+#define E1000_LTRMINV_LTRV_MASK 0x000003FF /* LTR minimum value */
+#define E1000_LTRMAXV_LTRV_MASK 0x000003FF /* LTR maximum value */
+#define E1000_LTRMINV_SCALE_MASK 0x00001C00 /* LTR minimum scale */
+#define E1000_LTRMINV_SCALE_SHIFT 10
+/* Reg val to set scale to 1024 nsec */
+#define E1000_LTRMINV_SCALE_1024 2
+/* Reg val to set scale to 32768 nsec */
+#define E1000_LTRMINV_SCALE_32768 3
+#define E1000_LTRMAXV_SCALE_MASK 0x00001C00 /* LTR maximum scale */
+#define E1000_LTRMAXV_SCALE_SHIFT 10
+/* Reg val to set scale to 1024 nsec */
+#define E1000_LTRMAXV_SCALE_1024 2
+/* Reg val to set scale to 32768 nsec */
+#define E1000_LTRMAXV_SCALE_32768 3
+#define E1000_DOBFFCTL_OBFFTHR_MASK 0x000000FF /* OBFF threshold */
+#define E1000_DOBFFCTL_EXIT_ACT_MASK 0x01000000 /* Exit active CB */
/* Proxy Filer Control */
-#define E1000_PROXYFC_D0 0x00000001 /* Enable offload in D0 */
-#define E1000_PROXYFC_EX 0x00000004 /* Directed exact proxy */
-#define E1000_PROXYFC_MC 0x00000008 /* Directed Multicast
- * Proxy */
-#define E1000_PROXYFC_BC 0x00000010 /* Broadcast Proxy Enable */
-#define E1000_PROXYFC_ARP_DIRECTED 0x00000020 /* Directed ARP Proxy
- * Enable */
-#define E1000_PROXYFC_IPV4 0x00000040 /* Directed IPv4 Enable */
-#define E1000_PROXYFC_IPV6 0x00000080 /* Directed IPv6 Enable */
-#define E1000_PROXYFC_NS 0x00000200 /* IPv4 Neighborhood
- * Solicitation */
-#define E1000_PROXYFC_ARP 0x00000800 /* ARP Request Proxy
- * Enable */
+#define E1000_PROXYFC_D0 0x00000001 /* Enable offload in D0 */
+#define E1000_PROXYFC_EX 0x00000004 /* Directed exact proxy */
+#define E1000_PROXYFC_MC 0x00000008 /* Directed MC Proxy */
+#define E1000_PROXYFC_BC 0x00000010 /* Broadcast Proxy Enable */
+#define E1000_PROXYFC_ARP_DIRECTED 0x00000020 /* Directed ARP Proxy Ena */
+#define E1000_PROXYFC_IPV4 0x00000040 /* Directed IPv4 Enable */
+#define E1000_PROXYFC_IPV6 0x00000080 /* Directed IPv6 Enable */
+#define E1000_PROXYFC_NS 0x00000200 /* IPv4 NBRHD Solicitation */
+#define E1000_PROXYFC_ARP 0x00000800 /* ARP Request Proxy Ena */
/* Proxy Status */
-#define E1000_PROXYS_CLEAR 0xFFFFFFFF /* Clear */
+#define E1000_PROXYS_CLEAR 0xFFFFFFFF /* Clear */
/* Firmware Status */
-#define E1000_FWSTS_FWRI 0x80000000 /* Firmware Reset
- * Indication */
-
-
+#define E1000_FWSTS_FWRI 0x80000000 /* FW Reset Indication */
+/* VF Control */
+#define E1000_VTCTRL_RST 0x04000000 /* Reset VF */
+
+#define E1000_STATUS_LAN_ID_MASK 0x00000000C /* Mask for Lan ID field */
+/* Lan ID bit field offset in status register */
+#define E1000_STATUS_LAN_ID_OFFSET 2
+#define E1000_VFTA_ENTRIES 128
#endif /* _E1000_DEFINES_H_ */
diff --git a/sys/dev/e1000/e1000_hw.h b/sys/dev/e1000/e1000_hw.h
index 686a5d8..16cfa8f 100644
--- a/sys/dev/e1000/e1000_hw.h
+++ b/sys/dev/e1000/e1000_hw.h
@@ -1,6 +1,6 @@
/******************************************************************************
- Copyright (c) 2001-2010, Intel Corporation
+ Copyright (c) 2001-2011, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -41,139 +41,138 @@
struct e1000_hw;
-#define E1000_DEV_ID_82542 0x1000
-#define E1000_DEV_ID_82543GC_FIBER 0x1001
-#define E1000_DEV_ID_82543GC_COPPER 0x1004
-#define E1000_DEV_ID_82544EI_COPPER 0x1008
-#define E1000_DEV_ID_82544EI_FIBER 0x1009
-#define E1000_DEV_ID_82544GC_COPPER 0x100C
-#define E1000_DEV_ID_82544GC_LOM 0x100D
-#define E1000_DEV_ID_82540EM 0x100E
-#define E1000_DEV_ID_82540EM_LOM 0x1015
-#define E1000_DEV_ID_82540EP_LOM 0x1016
-#define E1000_DEV_ID_82540EP 0x1017
-#define E1000_DEV_ID_82540EP_LP 0x101E
-#define E1000_DEV_ID_82545EM_COPPER 0x100F
-#define E1000_DEV_ID_82545EM_FIBER 0x1011
-#define E1000_DEV_ID_82545GM_COPPER 0x1026
-#define E1000_DEV_ID_82545GM_FIBER 0x1027
-#define E1000_DEV_ID_82545GM_SERDES 0x1028
-#define E1000_DEV_ID_82546EB_COPPER 0x1010
-#define E1000_DEV_ID_82546EB_FIBER 0x1012
-#define E1000_DEV_ID_82546EB_QUAD_COPPER 0x101D
-#define E1000_DEV_ID_82546GB_COPPER 0x1079
-#define E1000_DEV_ID_82546GB_FIBER 0x107A
-#define E1000_DEV_ID_82546GB_SERDES 0x107B
-#define E1000_DEV_ID_82546GB_PCIE 0x108A
-#define E1000_DEV_ID_82546GB_QUAD_COPPER 0x1099
-#define E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3 0x10B5
-#define E1000_DEV_ID_82541EI 0x1013
-#define E1000_DEV_ID_82541EI_MOBILE 0x1018
-#define E1000_DEV_ID_82541ER_LOM 0x1014
-#define E1000_DEV_ID_82541ER 0x1078
-#define E1000_DEV_ID_82541GI 0x1076
-#define E1000_DEV_ID_82541GI_LF 0x107C
-#define E1000_DEV_ID_82541GI_MOBILE 0x1077
-#define E1000_DEV_ID_82547EI 0x1019
-#define E1000_DEV_ID_82547EI_MOBILE 0x101A
-#define E1000_DEV_ID_82547GI 0x1075
-#define E1000_DEV_ID_82571EB_COPPER 0x105E
-#define E1000_DEV_ID_82571EB_FIBER 0x105F
-#define E1000_DEV_ID_82571EB_SERDES 0x1060
-#define E1000_DEV_ID_82571EB_SERDES_DUAL 0x10D9
-#define E1000_DEV_ID_82571EB_SERDES_QUAD 0x10DA
-#define E1000_DEV_ID_82571EB_QUAD_COPPER 0x10A4
-#define E1000_DEV_ID_82571PT_QUAD_COPPER 0x10D5
-#define E1000_DEV_ID_82571EB_QUAD_FIBER 0x10A5
-#define E1000_DEV_ID_82571EB_QUAD_COPPER_LP 0x10BC
-#define E1000_DEV_ID_82572EI_COPPER 0x107D
-#define E1000_DEV_ID_82572EI_FIBER 0x107E
-#define E1000_DEV_ID_82572EI_SERDES 0x107F
-#define E1000_DEV_ID_82572EI 0x10B9
-#define E1000_DEV_ID_82573E 0x108B
-#define E1000_DEV_ID_82573E_IAMT 0x108C
-#define E1000_DEV_ID_82573L 0x109A
-#define E1000_DEV_ID_82574L 0x10D3
-#define E1000_DEV_ID_82574LA 0x10F6
-#define E1000_DEV_ID_82583V 0x150C
-#define E1000_DEV_ID_80003ES2LAN_COPPER_DPT 0x1096
-#define E1000_DEV_ID_80003ES2LAN_SERDES_DPT 0x1098
-#define E1000_DEV_ID_80003ES2LAN_COPPER_SPT 0x10BA
-#define E1000_DEV_ID_80003ES2LAN_SERDES_SPT 0x10BB
-#define E1000_DEV_ID_ICH8_82567V_3 0x1501
-#define E1000_DEV_ID_ICH8_IGP_M_AMT 0x1049
-#define E1000_DEV_ID_ICH8_IGP_AMT 0x104A
-#define E1000_DEV_ID_ICH8_IGP_C 0x104B
-#define E1000_DEV_ID_ICH8_IFE 0x104C
-#define E1000_DEV_ID_ICH8_IFE_GT 0x10C4
-#define E1000_DEV_ID_ICH8_IFE_G 0x10C5
-#define E1000_DEV_ID_ICH8_IGP_M 0x104D
-#define E1000_DEV_ID_ICH9_IGP_M 0x10BF
-#define E1000_DEV_ID_ICH9_IGP_M_AMT 0x10F5
-#define E1000_DEV_ID_ICH9_IGP_M_V 0x10CB
-#define E1000_DEV_ID_ICH9_IGP_AMT 0x10BD
-#define E1000_DEV_ID_ICH9_BM 0x10E5
-#define E1000_DEV_ID_ICH9_IGP_C 0x294C
-#define E1000_DEV_ID_ICH9_IFE 0x10C0
-#define E1000_DEV_ID_ICH9_IFE_GT 0x10C3
-#define E1000_DEV_ID_ICH9_IFE_G 0x10C2
-#define E1000_DEV_ID_ICH10_R_BM_LM 0x10CC
-#define E1000_DEV_ID_ICH10_R_BM_LF 0x10CD
-#define E1000_DEV_ID_ICH10_R_BM_V 0x10CE
-#define E1000_DEV_ID_ICH10_HANKSVILLE 0xF0FE
-#define E1000_DEV_ID_ICH10_D_BM_LM 0x10DE
-#define E1000_DEV_ID_ICH10_D_BM_LF 0x10DF
-#define E1000_DEV_ID_ICH10_D_BM_V 0x1525
-
-#define E1000_DEV_ID_PCH_M_HV_LM 0x10EA
-#define E1000_DEV_ID_PCH_M_HV_LC 0x10EB
-#define E1000_DEV_ID_PCH_D_HV_DM 0x10EF
-#define E1000_DEV_ID_PCH_D_HV_DC 0x10F0
-#define E1000_DEV_ID_PCH2_LV_LM 0x1502
-#define E1000_DEV_ID_PCH2_LV_V 0x1503
-#define E1000_DEV_ID_82576 0x10C9
-#define E1000_DEV_ID_82576_FIBER 0x10E6
-#define E1000_DEV_ID_82576_SERDES 0x10E7
-#define E1000_DEV_ID_82576_QUAD_COPPER 0x10E8
-#define E1000_DEV_ID_82576_QUAD_COPPER_ET2 0x1526
-#define E1000_DEV_ID_82576_NS 0x150A
-#define E1000_DEV_ID_82576_NS_SERDES 0x1518
-#define E1000_DEV_ID_82576_SERDES_QUAD 0x150D
-#define E1000_DEV_ID_82576_VF 0x10CA
-#define E1000_DEV_ID_I350_VF 0x1520
-#define E1000_DEV_ID_82575EB_COPPER 0x10A7
-#define E1000_DEV_ID_82575EB_FIBER_SERDES 0x10A9
-#define E1000_DEV_ID_82575GB_QUAD_COPPER 0x10D6
-#define E1000_DEV_ID_82575GB_QUAD_COPPER_PM 0x10E2
-#define E1000_DEV_ID_82580_COPPER 0x150E
-#define E1000_DEV_ID_82580_FIBER 0x150F
-#define E1000_DEV_ID_82580_SERDES 0x1510
-#define E1000_DEV_ID_82580_SGMII 0x1511
-#define E1000_DEV_ID_82580_COPPER_DUAL 0x1516
-#define E1000_DEV_ID_82580_QUAD_FIBER 0x1527
-#define E1000_DEV_ID_I350_COPPER 0x1521
-#define E1000_DEV_ID_I350_FIBER 0x1522
-#define E1000_DEV_ID_I350_SERDES 0x1523
-#define E1000_DEV_ID_I350_SGMII 0x1524
-#define E1000_DEV_ID_DH89XXCC_SGMII 0x0438
-#define E1000_DEV_ID_DH89XXCC_SERDES 0x043A
-#define E1000_DEV_ID_DH89XXCC_BACKPLANE 0x043C
-#define E1000_DEV_ID_DH89XXCC_SFP 0x0440
-#define E1000_REVISION_0 0
-#define E1000_REVISION_1 1
-#define E1000_REVISION_2 2
-#define E1000_REVISION_3 3
-#define E1000_REVISION_4 4
-
-#define E1000_FUNC_0 0
-#define E1000_FUNC_1 1
-#define E1000_FUNC_2 2
-#define E1000_FUNC_3 3
-
-#define E1000_ALT_MAC_ADDRESS_OFFSET_LAN0 0
-#define E1000_ALT_MAC_ADDRESS_OFFSET_LAN1 3
-#define E1000_ALT_MAC_ADDRESS_OFFSET_LAN2 6
-#define E1000_ALT_MAC_ADDRESS_OFFSET_LAN3 9
+#define E1000_DEV_ID_82542 0x1000
+#define E1000_DEV_ID_82543GC_FIBER 0x1001
+#define E1000_DEV_ID_82543GC_COPPER 0x1004
+#define E1000_DEV_ID_82544EI_COPPER 0x1008
+#define E1000_DEV_ID_82544EI_FIBER 0x1009
+#define E1000_DEV_ID_82544GC_COPPER 0x100C
+#define E1000_DEV_ID_82544GC_LOM 0x100D
+#define E1000_DEV_ID_82540EM 0x100E
+#define E1000_DEV_ID_82540EM_LOM 0x1015
+#define E1000_DEV_ID_82540EP_LOM 0x1016
+#define E1000_DEV_ID_82540EP 0x1017
+#define E1000_DEV_ID_82540EP_LP 0x101E
+#define E1000_DEV_ID_82545EM_COPPER 0x100F
+#define E1000_DEV_ID_82545EM_FIBER 0x1011
+#define E1000_DEV_ID_82545GM_COPPER 0x1026
+#define E1000_DEV_ID_82545GM_FIBER 0x1027
+#define E1000_DEV_ID_82545GM_SERDES 0x1028
+#define E1000_DEV_ID_82546EB_COPPER 0x1010
+#define E1000_DEV_ID_82546EB_FIBER 0x1012
+#define E1000_DEV_ID_82546EB_QUAD_COPPER 0x101D
+#define E1000_DEV_ID_82546GB_COPPER 0x1079
+#define E1000_DEV_ID_82546GB_FIBER 0x107A
+#define E1000_DEV_ID_82546GB_SERDES 0x107B
+#define E1000_DEV_ID_82546GB_PCIE 0x108A
+#define E1000_DEV_ID_82546GB_QUAD_COPPER 0x1099
+#define E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3 0x10B5
+#define E1000_DEV_ID_82541EI 0x1013
+#define E1000_DEV_ID_82541EI_MOBILE 0x1018
+#define E1000_DEV_ID_82541ER_LOM 0x1014
+#define E1000_DEV_ID_82541ER 0x1078
+#define E1000_DEV_ID_82541GI 0x1076
+#define E1000_DEV_ID_82541GI_LF 0x107C
+#define E1000_DEV_ID_82541GI_MOBILE 0x1077
+#define E1000_DEV_ID_82547EI 0x1019
+#define E1000_DEV_ID_82547EI_MOBILE 0x101A
+#define E1000_DEV_ID_82547GI 0x1075
+#define E1000_DEV_ID_82571EB_COPPER 0x105E
+#define E1000_DEV_ID_82571EB_FIBER 0x105F
+#define E1000_DEV_ID_82571EB_SERDES 0x1060
+#define E1000_DEV_ID_82571EB_SERDES_DUAL 0x10D9
+#define E1000_DEV_ID_82571EB_SERDES_QUAD 0x10DA
+#define E1000_DEV_ID_82571EB_QUAD_COPPER 0x10A4
+#define E1000_DEV_ID_82571PT_QUAD_COPPER 0x10D5
+#define E1000_DEV_ID_82571EB_QUAD_FIBER 0x10A5
+#define E1000_DEV_ID_82571EB_QUAD_COPPER_LP 0x10BC
+#define E1000_DEV_ID_82572EI_COPPER 0x107D
+#define E1000_DEV_ID_82572EI_FIBER 0x107E
+#define E1000_DEV_ID_82572EI_SERDES 0x107F
+#define E1000_DEV_ID_82572EI 0x10B9
+#define E1000_DEV_ID_82573E 0x108B
+#define E1000_DEV_ID_82573E_IAMT 0x108C
+#define E1000_DEV_ID_82573L 0x109A
+#define E1000_DEV_ID_82574L 0x10D3
+#define E1000_DEV_ID_82574LA 0x10F6
+#define E1000_DEV_ID_82583V 0x150C
+#define E1000_DEV_ID_80003ES2LAN_COPPER_DPT 0x1096
+#define E1000_DEV_ID_80003ES2LAN_SERDES_DPT 0x1098
+#define E1000_DEV_ID_80003ES2LAN_COPPER_SPT 0x10BA
+#define E1000_DEV_ID_80003ES2LAN_SERDES_SPT 0x10BB
+#define E1000_DEV_ID_ICH8_82567V_3 0x1501
+#define E1000_DEV_ID_ICH8_IGP_M_AMT 0x1049
+#define E1000_DEV_ID_ICH8_IGP_AMT 0x104A
+#define E1000_DEV_ID_ICH8_IGP_C 0x104B
+#define E1000_DEV_ID_ICH8_IFE 0x104C
+#define E1000_DEV_ID_ICH8_IFE_GT 0x10C4
+#define E1000_DEV_ID_ICH8_IFE_G 0x10C5
+#define E1000_DEV_ID_ICH8_IGP_M 0x104D
+#define E1000_DEV_ID_ICH9_IGP_M 0x10BF
+#define E1000_DEV_ID_ICH9_IGP_M_AMT 0x10F5
+#define E1000_DEV_ID_ICH9_IGP_M_V 0x10CB
+#define E1000_DEV_ID_ICH9_IGP_AMT 0x10BD
+#define E1000_DEV_ID_ICH9_BM 0x10E5
+#define E1000_DEV_ID_ICH9_IGP_C 0x294C
+#define E1000_DEV_ID_ICH9_IFE 0x10C0
+#define E1000_DEV_ID_ICH9_IFE_GT 0x10C3
+#define E1000_DEV_ID_ICH9_IFE_G 0x10C2
+#define E1000_DEV_ID_ICH10_R_BM_LM 0x10CC
+#define E1000_DEV_ID_ICH10_R_BM_LF 0x10CD
+#define E1000_DEV_ID_ICH10_R_BM_V 0x10CE
+#define E1000_DEV_ID_ICH10_D_BM_LM 0x10DE
+#define E1000_DEV_ID_ICH10_D_BM_LF 0x10DF
+#define E1000_DEV_ID_ICH10_D_BM_V 0x1525
+
+#define E1000_DEV_ID_PCH_M_HV_LM 0x10EA
+#define E1000_DEV_ID_PCH_M_HV_LC 0x10EB
+#define E1000_DEV_ID_PCH_D_HV_DM 0x10EF
+#define E1000_DEV_ID_PCH_D_HV_DC 0x10F0
+#define E1000_DEV_ID_PCH2_LV_LM 0x1502
+#define E1000_DEV_ID_PCH2_LV_V 0x1503
+#define E1000_DEV_ID_82576 0x10C9
+#define E1000_DEV_ID_82576_FIBER 0x10E6
+#define E1000_DEV_ID_82576_SERDES 0x10E7
+#define E1000_DEV_ID_82576_QUAD_COPPER 0x10E8
+#define E1000_DEV_ID_82576_QUAD_COPPER_ET2 0x1526
+#define E1000_DEV_ID_82576_NS 0x150A
+#define E1000_DEV_ID_82576_NS_SERDES 0x1518
+#define E1000_DEV_ID_82576_SERDES_QUAD 0x150D
+#define E1000_DEV_ID_82576_VF 0x10CA
+#define E1000_DEV_ID_I350_VF 0x1520
+#define E1000_DEV_ID_82575EB_COPPER 0x10A7
+#define E1000_DEV_ID_82575EB_FIBER_SERDES 0x10A9
+#define E1000_DEV_ID_82575GB_QUAD_COPPER 0x10D6
+#define E1000_DEV_ID_82580_COPPER 0x150E
+#define E1000_DEV_ID_82580_FIBER 0x150F
+#define E1000_DEV_ID_82580_SERDES 0x1510
+#define E1000_DEV_ID_82580_SGMII 0x1511
+#define E1000_DEV_ID_82580_COPPER_DUAL 0x1516
+#define E1000_DEV_ID_82580_QUAD_FIBER 0x1527
+#define E1000_DEV_ID_I350_COPPER 0x1521
+#define E1000_DEV_ID_I350_FIBER 0x1522
+#define E1000_DEV_ID_I350_SERDES 0x1523
+#define E1000_DEV_ID_I350_SGMII 0x1524
+#define E1000_DEV_ID_I350_DA4 0x1546
+#define E1000_DEV_ID_DH89XXCC_SGMII 0x0438
+#define E1000_DEV_ID_DH89XXCC_SERDES 0x043A
+#define E1000_DEV_ID_DH89XXCC_BACKPLANE 0x043C
+#define E1000_DEV_ID_DH89XXCC_SFP 0x0440
+#define E1000_REVISION_0 0
+#define E1000_REVISION_1 1
+#define E1000_REVISION_2 2
+#define E1000_REVISION_3 3
+#define E1000_REVISION_4 4
+
+#define E1000_FUNC_0 0
+#define E1000_FUNC_1 1
+#define E1000_FUNC_2 2
+#define E1000_FUNC_3 3
+
+#define E1000_ALT_MAC_ADDRESS_OFFSET_LAN0 0
+#define E1000_ALT_MAC_ADDRESS_OFFSET_LAN1 3
+#define E1000_ALT_MAC_ADDRESS_OFFSET_LAN2 6
+#define E1000_ALT_MAC_ADDRESS_OFFSET_LAN3 9
enum e1000_mac_type {
e1000_undefined = 0,
@@ -342,9 +341,9 @@ enum e1000_serdes_link_state {
struct e1000_rx_desc {
__le64 buffer_addr; /* Address of the descriptor's data buffer */
__le16 length; /* Length of data DMAed into data buffer */
- __le16 csum; /* Packet checksum */
- u8 status; /* Descriptor status */
- u8 errors; /* Descriptor Errors */
+ __le16 csum; /* Packet checksum */
+ u8 status; /* Descriptor status */
+ u8 errors; /* Descriptor Errors */
__le16 special;
};
@@ -356,9 +355,9 @@ union e1000_rx_desc_extended {
} read;
struct {
struct {
- __le32 mrq; /* Multiple Rx Queues */
+ __le32 mrq; /* Multiple Rx Queues */
union {
- __le32 rss; /* RSS Hash */
+ __le32 rss; /* RSS Hash */
struct {
__le16 ip_id; /* IP id */
__le16 csum; /* Packet Checksum */
@@ -368,7 +367,7 @@ union e1000_rx_desc_extended {
struct {
__le32 status_error; /* ext status/error */
__le16 length;
- __le16 vlan; /* VLAN tag */
+ __le16 vlan; /* VLAN tag */
} upper;
} wb; /* writeback */
};
@@ -382,9 +381,9 @@ union e1000_rx_desc_packet_split {
} read;
struct {
struct {
- __le32 mrq; /* Multiple Rx Queues */
+ __le32 mrq; /* Multiple Rx Queues */
union {
- __le32 rss; /* RSS Hash */
+ __le32 rss; /* RSS Hash */
struct {
__le16 ip_id; /* IP id */
__le16 csum; /* Packet Checksum */
@@ -393,8 +392,8 @@ union e1000_rx_desc_packet_split {
} lower;
struct {
__le32 status_error; /* ext status/error */
- __le16 length0; /* length of buffer 0 */
- __le16 vlan; /* VLAN tag */
+ __le16 length0; /* length of buffer 0 */
+ __le16 vlan; /* VLAN tag */
} middle;
struct {
__le16 header_status;
@@ -410,16 +409,16 @@ struct e1000_tx_desc {
union {
__le32 data;
struct {
- __le16 length; /* Data buffer length */
- u8 cso; /* Checksum offset */
- u8 cmd; /* Descriptor control */
+ __le16 length; /* Data buffer length */
+ u8 cso; /* Checksum offset */
+ u8 cmd; /* Descriptor control */
} flags;
} lower;
union {
__le32 data;
struct {
- u8 status; /* Descriptor status */
- u8 css; /* Checksum start */
+ u8 status; /* Descriptor status */
+ u8 css; /* Checksum start */
__le16 special;
} fields;
} upper;
@@ -430,37 +429,37 @@ struct e1000_context_desc {
union {
__le32 ip_config;
struct {
- u8 ipcss; /* IP checksum start */
- u8 ipcso; /* IP checksum offset */
- __le16 ipcse; /* IP checksum end */
+ u8 ipcss; /* IP checksum start */
+ u8 ipcso; /* IP checksum offset */
+ __le16 ipcse; /* IP checksum end */
} ip_fields;
} lower_setup;
union {
__le32 tcp_config;
struct {
- u8 tucss; /* TCP checksum start */
- u8 tucso; /* TCP checksum offset */
- __le16 tucse; /* TCP checksum end */
+ u8 tucss; /* TCP checksum start */
+ u8 tucso; /* TCP checksum offset */
+ __le16 tucse; /* TCP checksum end */
} tcp_fields;
} upper_setup;
__le32 cmd_and_length;
union {
__le32 data;
struct {
- u8 status; /* Descriptor status */
- u8 hdr_len; /* Header length */
- __le16 mss; /* Maximum segment size */
+ u8 status; /* Descriptor status */
+ u8 hdr_len; /* Header length */
+ __le16 mss; /* Maximum segment size */
} fields;
} tcp_seg_setup;
};
/* Offload data descriptor */
struct e1000_data_desc {
- __le64 buffer_addr; /* Address of the descriptor's buffer address */
+ __le64 buffer_addr; /* Address of the descriptor's buffer address */
union {
__le32 data;
struct {
- __le16 length; /* Data buffer length */
+ __le16 length; /* Data buffer length */
u8 typ_len_ext;
u8 cmd;
} flags;
@@ -468,8 +467,8 @@ struct e1000_data_desc {
union {
__le32 data;
struct {
- u8 status; /* Descriptor status */
- u8 popts; /* Packet Options */
+ u8 status; /* Descriptor status */
+ u8 popts; /* Packet Options */
__le16 special;
} fields;
} upper;
@@ -553,6 +552,10 @@ struct e1000_hw_stats {
u64 scvpc;
u64 hrmpc;
u64 doosync;
+ u64 o2bgptc;
+ u64 o2bspc;
+ u64 b2ospc;
+ u64 b2ogprc;
};
struct e1000_vf_stats {
@@ -611,7 +614,7 @@ struct e1000_host_command_header {
u8 checksum;
};
-#define E1000_HI_MAX_DATA_LENGTH 252
+#define E1000_HI_MAX_DATA_LENGTH 252
struct e1000_host_command_info {
struct e1000_host_command_header command_header;
u8 command_data[E1000_HI_MAX_DATA_LENGTH];
@@ -626,7 +629,7 @@ struct e1000_host_mng_command_header {
u16 command_length;
};
-#define E1000_HI_MAX_MNG_DATA_LENGTH 0x6F8
+#define E1000_HI_MAX_MNG_DATA_LENGTH 0x6F8
struct e1000_host_mng_command_info {
struct e1000_host_mng_command_header command_header;
u8 command_data[E1000_HI_MAX_MNG_DATA_LENGTH];
@@ -668,11 +671,26 @@ struct e1000_mac_operations {
s32 (*validate_mdi_setting)(struct e1000_hw *);
s32 (*mng_host_if_write)(struct e1000_hw *, u8*, u16, u16, u8*);
s32 (*mng_write_cmd_header)(struct e1000_hw *hw,
- struct e1000_host_mng_command_header*);
+ struct e1000_host_mng_command_header*);
s32 (*mng_enable_host_if)(struct e1000_hw *);
s32 (*wait_autoneg)(struct e1000_hw *);
};
+/*
+ * When to use various PHY register access functions:
+ *
+ * Func Caller
+ * Function Does Does When to use
+ * ~~~~~~~~~~~~ ~~~~~ ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ * X_reg L,P,A n/a for simple PHY reg accesses
+ * X_reg_locked P,A L for multiple accesses of different regs
+ * on different pages
+ * X_reg_page A L,P for multiple accesses of different regs
+ * on the same page
+ *
+ * Where X=[read|write], L=locking, P=sets page, A=register access
+ *
+ */
struct e1000_phy_operations {
s32 (*init_params)(struct e1000_hw *);
s32 (*acquire)(struct e1000_hw *);
@@ -684,16 +702,21 @@ struct e1000_phy_operations {
s32 (*get_cfg_done)(struct e1000_hw *hw);
s32 (*get_cable_length)(struct e1000_hw *);
s32 (*get_info)(struct e1000_hw *);
+ s32 (*set_page)(struct e1000_hw *, u16);
s32 (*read_reg)(struct e1000_hw *, u32, u16 *);
s32 (*read_reg_locked)(struct e1000_hw *, u32, u16 *);
+ s32 (*read_reg_page)(struct e1000_hw *, u32, u16 *);
void (*release)(struct e1000_hw *);
s32 (*reset)(struct e1000_hw *);
s32 (*set_d0_lplu_state)(struct e1000_hw *, bool);
s32 (*set_d3_lplu_state)(struct e1000_hw *, bool);
s32 (*write_reg)(struct e1000_hw *, u32, u16);
s32 (*write_reg_locked)(struct e1000_hw *, u32, u16);
+ s32 (*write_reg_page)(struct e1000_hw *, u32, u16);
void (*power_up)(struct e1000_hw *);
void (*power_down)(struct e1000_hw *);
+ s32 (*read_i2c_byte)(struct e1000_hw *, u8, u8, u8 *);
+ s32 (*write_i2c_byte)(struct e1000_hw *, u8, u8, u8);
};
struct e1000_nvm_operations {
@@ -781,7 +804,6 @@ struct e1000_phy_info {
bool disable_polarity_correction;
bool is_mdix;
bool polarity_correction;
- bool reset_disable;
bool speed_downgraded;
bool autoneg_wait_to_complete;
};
@@ -811,14 +833,14 @@ struct e1000_bus_info {
};
struct e1000_fc_info {
- u32 high_water; /* Flow control high-water mark */
- u32 low_water; /* Flow control low-water mark */
- u16 pause_time; /* Flow control pause timer */
- u16 refresh_time; /* Flow control refresh timer */
- bool send_xon; /* Flow control send XON */
- bool strict_ieee; /* Strict IEEE mode */
- enum e1000_fc_mode current_mode; /* FC mode in effect */
- enum e1000_fc_mode requested_mode; /* FC mode requested by caller */
+ u32 high_water; /* Flow control high-water mark */
+ u32 low_water; /* Flow control low-water mark */
+ u16 pause_time; /* Flow control pause timer */
+ u16 refresh_time; /* Flow control refresh timer */
+ bool send_xon; /* Flow control send XON */
+ bool strict_ieee; /* Strict IEEE mode */
+ enum e1000_fc_mode current_mode; /* FC mode in effect */
+ enum e1000_fc_mode requested_mode; /* FC mode requested by caller */
};
struct e1000_mbx_operations {
@@ -889,13 +911,15 @@ struct e1000_dev_spec_ich8lan {
E1000_MUTEX nvm_mutex;
E1000_MUTEX swflag_mutex;
bool nvm_k1_enabled;
- bool eee_disable;
+ int eee_disable;
};
struct e1000_dev_spec_82575 {
bool sgmii_active;
bool global_device_reset;
- bool eee_disable;
+ int eee_disable;
+ bool module_plugged;
+ u32 mtu;
};
struct e1000_dev_spec_vf {
diff --git a/sys/dev/e1000/e1000_ich8lan.c b/sys/dev/e1000/e1000_ich8lan.c
index 8218908..aa4802c 100644
--- a/sys/dev/e1000/e1000_ich8lan.c
+++ b/sys/dev/e1000/e1000_ich8lan.c
@@ -1,6 +1,6 @@
/******************************************************************************
- Copyright (c) 2001-2010, Intel Corporation
+ Copyright (c) 2001-2011, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -76,23 +76,23 @@ static bool e1000_check_mng_mode_ich8lan(struct e1000_hw *hw);
static bool e1000_check_mng_mode_pchlan(struct e1000_hw *hw);
static void e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index);
static void e1000_update_mc_addr_list_pch2lan(struct e1000_hw *hw,
- u8 *mc_addr_list,
- u32 mc_addr_count);
+ u8 *mc_addr_list,
+ u32 mc_addr_count);
static s32 e1000_check_reset_block_ich8lan(struct e1000_hw *hw);
static s32 e1000_phy_hw_reset_ich8lan(struct e1000_hw *hw);
static s32 e1000_set_lplu_state_pchlan(struct e1000_hw *hw, bool active);
static s32 e1000_set_d0_lplu_state_ich8lan(struct e1000_hw *hw,
- bool active);
+ bool active);
static s32 e1000_set_d3_lplu_state_ich8lan(struct e1000_hw *hw,
- bool active);
+ bool active);
static s32 e1000_read_nvm_ich8lan(struct e1000_hw *hw, u16 offset,
- u16 words, u16 *data);
+ u16 words, u16 *data);
static s32 e1000_write_nvm_ich8lan(struct e1000_hw *hw, u16 offset,
- u16 words, u16 *data);
+ u16 words, u16 *data);
static s32 e1000_validate_nvm_checksum_ich8lan(struct e1000_hw *hw);
static s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw);
static s32 e1000_valid_led_default_ich8lan(struct e1000_hw *hw,
- u16 *data);
+ u16 *data);
static s32 e1000_id_led_init_pchlan(struct e1000_hw *hw);
static s32 e1000_get_bus_info_ich8lan(struct e1000_hw *hw);
static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw);
@@ -100,7 +100,7 @@ static s32 e1000_init_hw_ich8lan(struct e1000_hw *hw);
static s32 e1000_setup_link_ich8lan(struct e1000_hw *hw);
static s32 e1000_setup_copper_link_ich8lan(struct e1000_hw *hw);
static s32 e1000_get_link_up_info_ich8lan(struct e1000_hw *hw,
- u16 *speed, u16 *duplex);
+ u16 *speed, u16 *duplex);
static s32 e1000_cleanup_led_ich8lan(struct e1000_hw *hw);
static s32 e1000_led_on_ich8lan(struct e1000_hw *hw);
static s32 e1000_led_off_ich8lan(struct e1000_hw *hw);
@@ -116,17 +116,17 @@ static s32 e1000_flash_cycle_init_ich8lan(struct e1000_hw *hw);
static void e1000_initialize_hw_bits_ich8lan(struct e1000_hw *hw);
static s32 e1000_kmrn_lock_loss_workaround_ich8lan(struct e1000_hw *hw);
static s32 e1000_read_flash_byte_ich8lan(struct e1000_hw *hw,
- u32 offset, u8 *data);
+ u32 offset, u8 *data);
static s32 e1000_read_flash_data_ich8lan(struct e1000_hw *hw, u32 offset,
- u8 size, u16 *data);
+ u8 size, u16 *data);
static s32 e1000_read_flash_word_ich8lan(struct e1000_hw *hw,
- u32 offset, u16 *data);
+ u32 offset, u16 *data);
static s32 e1000_retry_write_flash_byte_ich8lan(struct e1000_hw *hw,
- u32 offset, u8 byte);
+ u32 offset, u8 byte);
static s32 e1000_write_flash_byte_ich8lan(struct e1000_hw *hw,
- u32 offset, u8 data);
+ u32 offset, u8 data);
static s32 e1000_write_flash_data_ich8lan(struct e1000_hw *hw, u32 offset,
- u8 size, u16 data);
+ u8 size, u16 data);
static s32 e1000_get_cfg_done_ich8lan(struct e1000_hw *hw);
static void e1000_power_down_phy_copper_ich8lan(struct e1000_hw *hw);
static s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw);
@@ -135,20 +135,23 @@ static s32 e1000_sw_lcd_config_ich8lan(struct e1000_hw *hw);
static s32 e1000_set_mdio_slow_mode_hv(struct e1000_hw *hw);
static s32 e1000_k1_workaround_lv(struct e1000_hw *hw);
static void e1000_gate_hw_phy_config_ich8lan(struct e1000_hw *hw, bool gate);
+#if defined(NAHUM6_HW) && (defined(LTR_SUPPORT) || defined(OBFF_SUPPORT))
+
+#endif /* NAHUM6_HW && (LTR_SUPPORT || OBFF_SUPPORT) */
/* ICH GbE Flash Hardware Sequencing Flash Status Register bit breakdown */
/* Offset 04h HSFSTS */
union ich8_hws_flash_status {
struct ich8_hsfsts {
- u16 flcdone :1; /* bit 0 Flash Cycle Done */
- u16 flcerr :1; /* bit 1 Flash Cycle Error */
- u16 dael :1; /* bit 2 Direct Access error Log */
- u16 berasesz :2; /* bit 4:3 Sector Erase Size */
- u16 flcinprog :1; /* bit 5 flash cycle in Progress */
- u16 reserved1 :2; /* bit 13:6 Reserved */
- u16 reserved2 :6; /* bit 13:6 Reserved */
- u16 fldesvalid :1; /* bit 14 Flash Descriptor Valid */
- u16 flockdn :1; /* bit 15 Flash Config Lock-Down */
+ u16 flcdone:1; /* bit 0 Flash Cycle Done */
+ u16 flcerr:1; /* bit 1 Flash Cycle Error */
+ u16 dael:1; /* bit 2 Direct Access error Log */
+ u16 berasesz:2; /* bit 4:3 Sector Erase Size */
+ u16 flcinprog:1; /* bit 5 flash cycle in Progress */
+ u16 reserved1:2; /* bit 13:6 Reserved */
+ u16 reserved2:6; /* bit 13:6 Reserved */
+ u16 fldesvalid:1; /* bit 14 Flash Descriptor Valid */
+ u16 flockdn:1; /* bit 15 Flash Config Lock-Down */
} hsf_status;
u16 regval;
};
@@ -157,11 +160,11 @@ union ich8_hws_flash_status {
/* Offset 06h FLCTL */
union ich8_hws_flash_ctrl {
struct ich8_hsflctl {
- u16 flcgo :1; /* 0 Flash Cycle Go */
- u16 flcycle :2; /* 2:1 Flash Cycle */
- u16 reserved :5; /* 7:3 Reserved */
- u16 fldbcount :2; /* 9:8 Flash Data Byte Count */
- u16 flockdn :6; /* 15:10 Reserved */
+ u16 flcgo:1; /* 0 Flash Cycle Go */
+ u16 flcycle:2; /* 2:1 Flash Cycle */
+ u16 reserved:5; /* 7:3 Reserved */
+ u16 fldbcount:2; /* 9:8 Flash Data Byte Count */
+ u16 flockdn:6; /* 15:10 Reserved */
} hsf_ctrl;
u16 regval;
};
@@ -169,14 +172,30 @@ union ich8_hws_flash_ctrl {
/* ICH Flash Region Access Permissions */
union ich8_hws_flash_regacc {
struct ich8_flracc {
- u32 grra :8; /* 0:7 GbE region Read Access */
- u32 grwa :8; /* 8:15 GbE region Write Access */
- u32 gmrag :8; /* 23:16 GbE Master Read Access Grant */
- u32 gmwag :8; /* 31:24 GbE Master Write Access Grant */
+ u32 grra:8; /* 0:7 GbE region Read Access */
+ u32 grwa:8; /* 8:15 GbE region Write Access */
+ u32 gmrag:8; /* 23:16 GbE Master Read Access Grant */
+ u32 gmwag:8; /* 31:24 GbE Master Write Access Grant */
} hsf_flregacc;
u16 regval;
};
+static void e1000_toggle_lanphypc_value_ich8lan(struct e1000_hw *hw)
+{
+ u32 ctrl;
+
+ DEBUGFUNC("e1000_toggle_lanphypc_value_ich8lan");
+
+ ctrl = E1000_READ_REG(hw, E1000_CTRL);
+ ctrl |= E1000_CTRL_LANPHYPC_OVERRIDE;
+ ctrl &= ~E1000_CTRL_LANPHYPC_VALUE;
+ E1000_WRITE_REG(hw, E1000_CTRL, ctrl);
+ E1000_WRITE_FLUSH(hw);
+ usec_delay(10);
+ ctrl &= ~E1000_CTRL_LANPHYPC_OVERRIDE;
+ E1000_WRITE_REG(hw, E1000_CTRL, ctrl);
+}
+
/**
* e1000_init_phy_params_pchlan - Initialize PHY function pointers
* @hw: pointer to the HW structure
@@ -186,70 +205,66 @@ union ich8_hws_flash_regacc {
static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw)
{
struct e1000_phy_info *phy = &hw->phy;
- u32 ctrl, fwsm;
s32 ret_val = E1000_SUCCESS;
DEBUGFUNC("e1000_init_phy_params_pchlan");
- phy->addr = 1;
- phy->reset_delay_us = 100;
-
- phy->ops.acquire = e1000_acquire_swflag_ich8lan;
- phy->ops.check_reset_block = e1000_check_reset_block_ich8lan;
- phy->ops.get_cfg_done = e1000_get_cfg_done_ich8lan;
- phy->ops.read_reg = e1000_read_phy_reg_hv;
- phy->ops.read_reg_locked = e1000_read_phy_reg_hv_locked;
- phy->ops.release = e1000_release_swflag_ich8lan;
- phy->ops.reset = e1000_phy_hw_reset_ich8lan;
- phy->ops.set_d0_lplu_state = e1000_set_lplu_state_pchlan;
- phy->ops.set_d3_lplu_state = e1000_set_lplu_state_pchlan;
- phy->ops.write_reg = e1000_write_phy_reg_hv;
- phy->ops.write_reg_locked = e1000_write_phy_reg_hv_locked;
- phy->ops.power_up = e1000_power_up_phy_copper;
- phy->ops.power_down = e1000_power_down_phy_copper_ich8lan;
- phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT;
+ phy->addr = 1;
+ phy->reset_delay_us = 100;
+
+ phy->ops.acquire = e1000_acquire_swflag_ich8lan;
+ phy->ops.check_reset_block = e1000_check_reset_block_ich8lan;
+ phy->ops.get_cfg_done = e1000_get_cfg_done_ich8lan;
+ phy->ops.set_page = e1000_set_page_igp;
+ phy->ops.read_reg = e1000_read_phy_reg_hv;
+ phy->ops.read_reg_locked = e1000_read_phy_reg_hv_locked;
+ phy->ops.read_reg_page = e1000_read_phy_reg_page_hv;
+ phy->ops.release = e1000_release_swflag_ich8lan;
+ phy->ops.reset = e1000_phy_hw_reset_ich8lan;
+ phy->ops.set_d0_lplu_state = e1000_set_lplu_state_pchlan;
+ phy->ops.set_d3_lplu_state = e1000_set_lplu_state_pchlan;
+ phy->ops.write_reg = e1000_write_phy_reg_hv;
+ phy->ops.write_reg_locked = e1000_write_phy_reg_hv_locked;
+ phy->ops.write_reg_page = e1000_write_phy_reg_page_hv;
+ phy->ops.power_up = e1000_power_up_phy_copper;
+ phy->ops.power_down = e1000_power_down_phy_copper_ich8lan;
+ phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT;
- /*
- * The MAC-PHY interconnect may still be in SMBus mode
- * after Sx->S0. If the manageability engine (ME) is
- * disabled, then toggle the LANPHYPC Value bit to force
- * the interconnect to PCIe mode.
- */
- fwsm = E1000_READ_REG(hw, E1000_FWSM);
- if (!(fwsm & E1000_ICH_FWSM_FW_VALID) &&
- !(hw->phy.ops.check_reset_block(hw))) {
- ctrl = E1000_READ_REG(hw, E1000_CTRL);
- ctrl |= E1000_CTRL_LANPHYPC_OVERRIDE;
- ctrl &= ~E1000_CTRL_LANPHYPC_VALUE;
- E1000_WRITE_REG(hw, E1000_CTRL, ctrl);
- usec_delay(10);
- ctrl &= ~E1000_CTRL_LANPHYPC_OVERRIDE;
- E1000_WRITE_REG(hw, E1000_CTRL, ctrl);
+ if (!hw->phy.ops.check_reset_block(hw)) {
+ u32 fwsm = E1000_READ_REG(hw, E1000_FWSM);
+
+ /*
+ * The MAC-PHY interconnect may still be in SMBus mode after
+ * Sx->S0. If resetting the PHY is not blocked, toggle the
+ * LANPHYPC Value bit to force the interconnect to PCIe mode.
+ */
+ e1000_toggle_lanphypc_value_ich8lan(hw);
msec_delay(50);
/*
* Gate automatic PHY configuration by hardware on
* non-managed 82579
*/
- if (hw->mac.type == e1000_pch2lan)
+ if ((hw->mac.type == e1000_pch2lan) &&
+ !(fwsm & E1000_ICH_FWSM_FW_VALID))
e1000_gate_hw_phy_config_ich8lan(hw, TRUE);
- }
- /*
- * Reset the PHY before any acccess to it. Doing so, ensures that
- * the PHY is in a known good state before we read/write PHY registers.
- * The generic reset is sufficient here, because we haven't determined
- * the PHY type yet.
- */
- ret_val = e1000_phy_hw_reset_generic(hw);
- if (ret_val)
- goto out;
+ /*
+ * Reset the PHY before any access to it. Doing so, ensures
+ * that the PHY is in a known good state before we read/write
+ * PHY registers. The generic reset is sufficient here,
+ * because we haven't determined the PHY type yet.
+ */
+ ret_val = e1000_phy_hw_reset_generic(hw);
+ if (ret_val)
+ goto out;
- /* Ungate automatic PHY configuration on non-managed 82579 */
- if ((hw->mac.type == e1000_pch2lan) &&
- !(fwsm & E1000_ICH_FWSM_FW_VALID)) {
- msec_delay(10);
- e1000_gate_hw_phy_config_ich8lan(hw, FALSE);
+ /* Ungate automatic PHY configuration on non-managed 82579 */
+ if ((hw->mac.type == e1000_pch2lan) &&
+ !(fwsm & E1000_ICH_FWSM_FW_VALID)) {
+ msec_delay(10);
+ e1000_gate_hw_phy_config_ich8lan(hw, FALSE);
+ }
}
phy->id = e1000_phy_unknown;
@@ -315,21 +330,21 @@ static s32 e1000_init_phy_params_ich8lan(struct e1000_hw *hw)
DEBUGFUNC("e1000_init_phy_params_ich8lan");
- phy->addr = 1;
- phy->reset_delay_us = 100;
-
- phy->ops.acquire = e1000_acquire_swflag_ich8lan;
- phy->ops.check_reset_block = e1000_check_reset_block_ich8lan;
- phy->ops.get_cable_length = e1000_get_cable_length_igp_2;
- phy->ops.get_cfg_done = e1000_get_cfg_done_ich8lan;
- phy->ops.read_reg = e1000_read_phy_reg_igp;
- phy->ops.release = e1000_release_swflag_ich8lan;
- phy->ops.reset = e1000_phy_hw_reset_ich8lan;
- phy->ops.set_d0_lplu_state = e1000_set_d0_lplu_state_ich8lan;
- phy->ops.set_d3_lplu_state = e1000_set_d3_lplu_state_ich8lan;
- phy->ops.write_reg = e1000_write_phy_reg_igp;
- phy->ops.power_up = e1000_power_up_phy_copper;
- phy->ops.power_down = e1000_power_down_phy_copper_ich8lan;
+ phy->addr = 1;
+ phy->reset_delay_us = 100;
+
+ phy->ops.acquire = e1000_acquire_swflag_ich8lan;
+ phy->ops.check_reset_block = e1000_check_reset_block_ich8lan;
+ phy->ops.get_cable_length = e1000_get_cable_length_igp_2;
+ phy->ops.get_cfg_done = e1000_get_cfg_done_ich8lan;
+ phy->ops.read_reg = e1000_read_phy_reg_igp;
+ phy->ops.release = e1000_release_swflag_ich8lan;
+ phy->ops.reset = e1000_phy_hw_reset_ich8lan;
+ phy->ops.set_d0_lplu_state = e1000_set_d0_lplu_state_ich8lan;
+ phy->ops.set_d3_lplu_state = e1000_set_d3_lplu_state_ich8lan;
+ phy->ops.write_reg = e1000_write_phy_reg_igp;
+ phy->ops.power_up = e1000_power_up_phy_copper;
+ phy->ops.power_down = e1000_power_down_phy_copper_ich8lan;
/*
* We may need to do this twice - once for IGP and if that fails,
@@ -438,7 +453,7 @@ static s32 e1000_init_nvm_params_ich8lan(struct e1000_hw *hw)
* size represents two separate NVM banks.
*/
nvm->flash_bank_size = (sector_end_addr - sector_base_addr)
- << FLASH_SECTOR_ADDR_SHIFT;
+ << FLASH_SECTOR_ADDR_SHIFT;
nvm->flash_bank_size /= 2;
/* Adjust to word count */
nvm->flash_bank_size /= sizeof(u16);
@@ -455,13 +470,13 @@ static s32 e1000_init_nvm_params_ich8lan(struct e1000_hw *hw)
E1000_MUTEX_INIT(&dev_spec->swflag_mutex);
/* Function Pointers */
- nvm->ops.acquire = e1000_acquire_nvm_ich8lan;
- nvm->ops.release = e1000_release_nvm_ich8lan;
- nvm->ops.read = e1000_read_nvm_ich8lan;
- nvm->ops.update = e1000_update_nvm_checksum_ich8lan;
+ nvm->ops.acquire = e1000_acquire_nvm_ich8lan;
+ nvm->ops.release = e1000_release_nvm_ich8lan;
+ nvm->ops.read = e1000_read_nvm_ich8lan;
+ nvm->ops.update = e1000_update_nvm_checksum_ich8lan;
nvm->ops.valid_led_default = e1000_valid_led_default_ich8lan;
- nvm->ops.validate = e1000_validate_nvm_checksum_ich8lan;
- nvm->ops.write = e1000_write_nvm_ich8lan;
+ nvm->ops.validate = e1000_validate_nvm_checksum_ich8lan;
+ nvm->ops.write = e1000_write_nvm_ich8lan;
out:
return ret_val;
@@ -477,7 +492,6 @@ out:
static s32 e1000_init_mac_params_ich8lan(struct e1000_hw *hw)
{
struct e1000_mac_info *mac = &hw->mac;
- u16 pci_cfg;
DEBUGFUNC("e1000_init_mac_params_ich8lan");
@@ -549,9 +563,6 @@ static s32 e1000_init_mac_params_ich8lan(struct e1000_hw *hw)
e1000_update_mc_addr_list_pch2lan;
/* fall-through */
case e1000_pchlan:
- /* save PCH revision_id */
- e1000_read_pci_cfg(hw, 0x2, &pci_cfg);
- hw->revision_id = (u8)(pci_cfg &= 0x000F);
/* check management mode */
mac->ops.check_mng_mode = e1000_check_mng_mode_pchlan;
/* ID LED init */
@@ -568,6 +579,11 @@ static s32 e1000_init_mac_params_ich8lan(struct e1000_hw *hw)
break;
}
+#if defined(NAHUM6_HW) && (defined(LTR_SUPPORT) || defined(OBFF_SUPPORT))
+ if (mac->type == e1000_pch_lpt) {
+ }
+
+#endif /* NAHUM6_HW && (LTR_SUPPORT || OBFF_SUPPORT) */
/* Enable PCS Lock-loss workaround for ICH8 */
if (mac->type == e1000_ich8lan)
e1000_set_kmrn_lock_loss_workaround_ich8lan(hw, TRUE);
@@ -589,6 +605,7 @@ static s32 e1000_init_mac_params_ich8lan(struct e1000_hw *hw)
**/
static s32 e1000_set_eee_pchlan(struct e1000_hw *hw)
{
+ struct e1000_dev_spec_ich8lan *dev_spec = &hw->dev_spec.ich8lan;
s32 ret_val = E1000_SUCCESS;
u16 phy_reg;
@@ -601,7 +618,7 @@ static s32 e1000_set_eee_pchlan(struct e1000_hw *hw)
if (ret_val)
goto out;
- if (hw->dev_spec.ich8lan.eee_disable)
+ if (dev_spec->eee_disable)
phy_reg &= ~I82579_LPI_CTRL_ENABLE_MASK;
else
phy_reg |= I82579_LPI_CTRL_ENABLE_MASK;
@@ -624,6 +641,7 @@ static s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
struct e1000_mac_info *mac = &hw->mac;
s32 ret_val;
bool link;
+ u16 phy_reg;
DEBUGFUNC("e1000_check_for_copper_link_ich8lan");
@@ -653,21 +671,46 @@ static s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
goto out;
}
+#if defined(NAHUM6_HW) && (defined(LTR_SUPPORT) || defined(OBFF_SUPPORT))
+ if (hw->mac.type == e1000_pch_lpt) {
+ }
+
+#endif /* NAHUM6_HW && (LTR_SUPPORT || OBFF_SUPPORT) */
if (!link)
goto out; /* No link detected */
mac->get_link_status = FALSE;
- if (hw->phy.type == e1000_phy_82578) {
- ret_val = e1000_link_stall_workaround_hv(hw);
- if (ret_val)
- goto out;
- }
-
- if (hw->mac.type == e1000_pch2lan) {
+ switch (hw->mac.type) {
+ case e1000_pch2lan:
ret_val = e1000_k1_workaround_lv(hw);
if (ret_val)
goto out;
+ /* fall-thru */
+ case e1000_pchlan:
+ if (hw->phy.type == e1000_phy_82578) {
+ ret_val = e1000_link_stall_workaround_hv(hw);
+ if (ret_val)
+ goto out;
+ }
+
+ /*
+ * Workaround for PCHx parts in half-duplex:
+ * Set the number of preambles removed from the packet
+ * when it is passed from the PHY to the MAC to prevent
+ * the MAC from misinterpreting the packet type.
+ */
+ hw->phy.ops.read_reg(hw, HV_KMRN_FIFO_CTRLSTA, &phy_reg);
+ phy_reg &= ~HV_KMRN_FIFO_CTRLSTA_PREAMBLE_MASK;
+
+ if ((E1000_READ_REG(hw, E1000_STATUS) & E1000_STATUS_FD) !=
+ E1000_STATUS_FD)
+ phy_reg |= (1 << HV_KMRN_FIFO_CTRLSTA_PREAMBLE_SHIFT);
+
+ hw->phy.ops.write_reg(hw, HV_KMRN_FIFO_CTRLSTA, phy_reg);
+ break;
+ default:
+ break;
}
/*
@@ -794,7 +837,7 @@ static s32 e1000_acquire_swflag_ich8lan(struct e1000_hw *hw)
}
if (!timeout) {
- DEBUGOUT("SW/FW/HW has locked the resource for too long.\n");
+ DEBUGOUT("SW has already locked the resource.\n");
ret_val = -E1000_ERR_CONFIG;
goto out;
}
@@ -814,7 +857,8 @@ static s32 e1000_acquire_swflag_ich8lan(struct e1000_hw *hw)
}
if (!timeout) {
- DEBUGOUT("Failed to acquire the semaphore.\n");
+ DEBUGOUT2("Failed to acquire the semaphore, FW or HW has it: FWSM=0x%8.8x EXTCNF_CTRL=0x%8.8x)\n",
+ E1000_READ_REG(hw, E1000_FWSM), extcnf_ctrl);
extcnf_ctrl &= ~E1000_EXTCNF_CTRL_SWFLAG;
E1000_WRITE_REG(hw, E1000_EXTCNF_CTRL, extcnf_ctrl);
ret_val = -E1000_ERR_CONFIG;
@@ -918,8 +962,8 @@ static void e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index)
* from network order (big endian) to little endian
*/
rar_low = ((u32) addr[0] |
- ((u32) addr[1] << 8) |
- ((u32) addr[2] << 16) | ((u32) addr[3] << 24));
+ ((u32) addr[1] << 8) |
+ ((u32) addr[2] << 16) | ((u32) addr[3] << 24));
rar_high = ((u32) addr[4] | ((u32) addr[5] << 8));
@@ -963,22 +1007,38 @@ static void e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index)
* The caller must have a packed mc_addr_list of multicast addresses.
**/
static void e1000_update_mc_addr_list_pch2lan(struct e1000_hw *hw,
- u8 *mc_addr_list,
- u32 mc_addr_count)
+ u8 *mc_addr_list,
+ u32 mc_addr_count)
{
+ u16 phy_reg = 0;
int i;
+ s32 ret_val;
DEBUGFUNC("e1000_update_mc_addr_list_pch2lan");
e1000_update_mc_addr_list_generic(hw, mc_addr_list, mc_addr_count);
+ ret_val = hw->phy.ops.acquire(hw);
+ if (ret_val)
+ return;
+
+ ret_val = e1000_enable_phy_wakeup_reg_access_bm(hw, &phy_reg);
+ if (ret_val)
+ goto release;
+
for (i = 0; i < hw->mac.mta_reg_count; i++) {
- hw->phy.ops.write_reg(hw, BM_MTA(i),
- (u16)(hw->mac.mta_shadow[i] & 0xFFFF));
- hw->phy.ops.write_reg(hw, (BM_MTA(i) + 1),
- (u16)((hw->mac.mta_shadow[i] >> 16) &
- 0xFFFF));
+ hw->phy.ops.write_reg_page(hw, BM_MTA(i),
+ (u16)(hw->mac.mta_shadow[i] &
+ 0xFFFF));
+ hw->phy.ops.write_reg_page(hw, (BM_MTA(i) + 1),
+ (u16)((hw->mac.mta_shadow[i] >> 16) &
+ 0xFFFF));
}
+
+ e1000_disable_phy_wakeup_reg_access_bm(hw, &phy_reg);
+
+release:
+ hw->phy.ops.release(hw);
}
/**
@@ -995,13 +1055,10 @@ static s32 e1000_check_reset_block_ich8lan(struct e1000_hw *hw)
DEBUGFUNC("e1000_check_reset_block_ich8lan");
- if (hw->phy.reset_disable)
- return E1000_BLK_PHY_RESET;
-
fwsm = E1000_READ_REG(hw, E1000_FWSM);
return (fwsm & E1000_ICH_FWSM_RSPCIPHY) ? E1000_SUCCESS
- : E1000_BLK_PHY_RESET;
+ : E1000_BLK_PHY_RESET;
}
/**
@@ -1187,46 +1244,46 @@ static s32 e1000_k1_gig_workaround_hv(struct e1000_hw *hw, bool link)
if (link) {
if (hw->phy.type == e1000_phy_82578) {
ret_val = hw->phy.ops.read_reg_locked(hw, BM_CS_STATUS,
- &status_reg);
+ &status_reg);
if (ret_val)
goto release;
status_reg &= BM_CS_STATUS_LINK_UP |
- BM_CS_STATUS_RESOLVED |
- BM_CS_STATUS_SPEED_MASK;
+ BM_CS_STATUS_RESOLVED |
+ BM_CS_STATUS_SPEED_MASK;
if (status_reg == (BM_CS_STATUS_LINK_UP |
- BM_CS_STATUS_RESOLVED |
- BM_CS_STATUS_SPEED_1000))
+ BM_CS_STATUS_RESOLVED |
+ BM_CS_STATUS_SPEED_1000))
k1_enable = FALSE;
}
if (hw->phy.type == e1000_phy_82577) {
ret_val = hw->phy.ops.read_reg_locked(hw, HV_M_STATUS,
- &status_reg);
+ &status_reg);
if (ret_val)
goto release;
status_reg &= HV_M_STATUS_LINK_UP |
- HV_M_STATUS_AUTONEG_COMPLETE |
- HV_M_STATUS_SPEED_MASK;
+ HV_M_STATUS_AUTONEG_COMPLETE |
+ HV_M_STATUS_SPEED_MASK;
if (status_reg == (HV_M_STATUS_LINK_UP |
- HV_M_STATUS_AUTONEG_COMPLETE |
- HV_M_STATUS_SPEED_1000))
+ HV_M_STATUS_AUTONEG_COMPLETE |
+ HV_M_STATUS_SPEED_1000))
k1_enable = FALSE;
}
/* Link stall fix for link up */
ret_val = hw->phy.ops.write_reg_locked(hw, PHY_REG(770, 19),
- 0x0100);
+ 0x0100);
if (ret_val)
goto release;
} else {
/* Link stall fix for link down */
ret_val = hw->phy.ops.write_reg_locked(hw, PHY_REG(770, 19),
- 0x4100);
+ 0x4100);
if (ret_val)
goto release;
}
@@ -1259,9 +1316,8 @@ s32 e1000_configure_k1_ich8lan(struct e1000_hw *hw, bool k1_enable)
DEBUGFUNC("e1000_configure_k1_ich8lan");
- ret_val = e1000_read_kmrn_reg_locked(hw,
- E1000_KMRNCTRLSTA_K1_CONFIG,
- &kmrn_reg);
+ ret_val = e1000_read_kmrn_reg_locked(hw, E1000_KMRNCTRLSTA_K1_CONFIG,
+ &kmrn_reg);
if (ret_val)
goto out;
@@ -1270,9 +1326,8 @@ s32 e1000_configure_k1_ich8lan(struct e1000_hw *hw, bool k1_enable)
else
kmrn_reg &= ~E1000_KMRNCTRLSTA_K1_ENABLE;
- ret_val = e1000_write_kmrn_reg_locked(hw,
- E1000_KMRNCTRLSTA_K1_CONFIG,
- kmrn_reg);
+ ret_val = e1000_write_kmrn_reg_locked(hw, E1000_KMRNCTRLSTA_K1_CONFIG,
+ kmrn_reg);
if (ret_val)
goto out;
@@ -1285,9 +1340,11 @@ s32 e1000_configure_k1_ich8lan(struct e1000_hw *hw, bool k1_enable)
E1000_WRITE_REG(hw, E1000_CTRL, reg);
E1000_WRITE_REG(hw, E1000_CTRL_EXT, ctrl_ext | E1000_CTRL_EXT_SPD_BYPS);
+ E1000_WRITE_FLUSH(hw);
usec_delay(20);
E1000_WRITE_REG(hw, E1000_CTRL, ctrl_reg);
E1000_WRITE_REG(hw, E1000_CTRL_EXT, ctrl_ext);
+ E1000_WRITE_FLUSH(hw);
usec_delay(20);
out:
@@ -1303,7 +1360,7 @@ out:
* collectively called OEM bits. The OEM Write Enable bit and SW Config bit
* in NVM determines whether HW should configure LPLU and Gbe Disable.
**/
-s32 e1000_oem_bits_config_ich8lan(struct e1000_hw *hw, bool d0_state)
+static s32 e1000_oem_bits_config_ich8lan(struct e1000_hw *hw, bool d0_state)
{
s32 ret_val = 0;
u32 mac_reg;
@@ -1342,16 +1399,20 @@ s32 e1000_oem_bits_config_ich8lan(struct e1000_hw *hw, bool d0_state)
if (mac_reg & E1000_PHY_CTRL_D0A_LPLU)
oem_reg |= HV_OEM_BITS_LPLU;
+
+ /* Set Restart auto-neg to activate the bits */
+ if (!hw->phy.ops.check_reset_block(hw))
+ oem_reg |= HV_OEM_BITS_RESTART_AN;
} else {
- if (mac_reg & E1000_PHY_CTRL_NOND0A_GBE_DISABLE)
+ if (mac_reg & (E1000_PHY_CTRL_GBE_DISABLE |
+ E1000_PHY_CTRL_NOND0A_GBE_DISABLE))
oem_reg |= HV_OEM_BITS_GBE_DIS;
- if (mac_reg & E1000_PHY_CTRL_NOND0A_LPLU)
+ if (mac_reg & (E1000_PHY_CTRL_D0A_LPLU |
+ E1000_PHY_CTRL_NOND0A_LPLU))
oem_reg |= HV_OEM_BITS_LPLU;
}
- /* Restart auto-neg to activate the bits */
- if (!hw->phy.ops.check_reset_block(hw))
- oem_reg |= HV_OEM_BITS_RESTART_AN;
+
ret_val = hw->phy.ops.write_reg_locked(hw, HV_OEM_BITS, oem_reg);
out:
@@ -1362,20 +1423,6 @@ out:
/**
- * e1000_hv_phy_powerdown_workaround_ich8lan - Power down workaround on Sx
- * @hw: pointer to the HW structure
- **/
-s32 e1000_hv_phy_powerdown_workaround_ich8lan(struct e1000_hw *hw)
-{
- DEBUGFUNC("e1000_hv_phy_powerdown_workaround_ich8lan");
-
- if ((hw->phy.type != e1000_phy_82577) || (hw->revision_id > 2))
- return E1000_SUCCESS;
-
- return hw->phy.ops.write_reg(hw, PHY_REG(768, 25), 0x0444);
-}
-
-/**
* e1000_set_mdio_slow_mode_hv - Set slow MDIO access mode
* @hw: pointer to the HW structure
**/
@@ -1418,32 +1465,6 @@ static s32 e1000_hv_phy_workarounds_ich8lan(struct e1000_hw *hw)
goto out;
}
- /* Hanksville M Phy init for IEEE. */
- if ((hw->revision_id == 2) &&
- (hw->phy.type == e1000_phy_82577) &&
- ((hw->phy.revision == 2) || (hw->phy.revision == 3))) {
- hw->phy.ops.write_reg(hw, 0x10, 0x8823);
- hw->phy.ops.write_reg(hw, 0x11, 0x0018);
- hw->phy.ops.write_reg(hw, 0x10, 0x8824);
- hw->phy.ops.write_reg(hw, 0x11, 0x0016);
- hw->phy.ops.write_reg(hw, 0x10, 0x8825);
- hw->phy.ops.write_reg(hw, 0x11, 0x001A);
- hw->phy.ops.write_reg(hw, 0x10, 0x888C);
- hw->phy.ops.write_reg(hw, 0x11, 0x0007);
- hw->phy.ops.write_reg(hw, 0x10, 0x888D);
- hw->phy.ops.write_reg(hw, 0x11, 0x0007);
- hw->phy.ops.write_reg(hw, 0x10, 0x888E);
- hw->phy.ops.write_reg(hw, 0x11, 0x0007);
- hw->phy.ops.write_reg(hw, 0x10, 0x8827);
- hw->phy.ops.write_reg(hw, 0x11, 0x0001);
- hw->phy.ops.write_reg(hw, 0x10, 0x8835);
- hw->phy.ops.write_reg(hw, 0x11, 0x0001);
- hw->phy.ops.write_reg(hw, 0x10, 0x8834);
- hw->phy.ops.write_reg(hw, 0x11, 0x0001);
- hw->phy.ops.write_reg(hw, 0x10, 0x8833);
- hw->phy.ops.write_reg(hw, 0x11, 0x0002);
- }
-
if (((hw->phy.type == e1000_phy_82577) &&
((hw->phy.revision == 1) || (hw->phy.revision == 2))) ||
((hw->phy.type == e1000_phy_82578) && (hw->phy.revision == 1))) {
@@ -1453,26 +1474,13 @@ static s32 e1000_hv_phy_workarounds_ich8lan(struct e1000_hw *hw)
goto out;
/* Preamble tuning for SSC */
- ret_val = hw->phy.ops.write_reg(hw, PHY_REG(770, 16), 0xA204);
+ ret_val = hw->phy.ops.write_reg(hw, HV_KMRN_FIFO_CTRLSTA,
+ 0xA204);
if (ret_val)
goto out;
}
if (hw->phy.type == e1000_phy_82578) {
- if (hw->revision_id < 3) {
- /* PHY config */
- ret_val = hw->phy.ops.write_reg(hw, (1 << 6) | 0x29,
- 0x66C0);
- if (ret_val)
- goto out;
-
- /* PHY config */
- ret_val = hw->phy.ops.write_reg(hw, (1 << 6) | 0x1E,
- 0xFFFF);
- if (ret_val)
- goto out;
- }
-
/*
* Return registers to default by doing a soft reset then
* writing 0x3140 to the control register.
@@ -1480,25 +1488,10 @@ static s32 e1000_hv_phy_workarounds_ich8lan(struct e1000_hw *hw)
if (hw->phy.revision < 2) {
e1000_phy_sw_reset_generic(hw);
ret_val = hw->phy.ops.write_reg(hw, PHY_CONTROL,
- 0x3140);
+ 0x3140);
}
}
- if ((hw->revision_id == 2) &&
- (hw->phy.type == e1000_phy_82577) &&
- ((hw->phy.revision == 2) || (hw->phy.revision == 3))) {
- /*
- * Workaround for OEM (GbE) not operating after reset -
- * restart AN (twice)
- */
- ret_val = hw->phy.ops.write_reg(hw, PHY_REG(768, 25), 0x0400);
- if (ret_val)
- goto out;
- ret_val = hw->phy.ops.write_reg(hw, PHY_REG(768, 25), 0x0400);
- if (ret_val)
- goto out;
- }
-
/* Select page 0 */
ret_val = hw->phy.ops.acquire(hw);
if (ret_val)
@@ -1522,12 +1515,11 @@ static s32 e1000_hv_phy_workarounds_ich8lan(struct e1000_hw *hw)
ret_val = hw->phy.ops.acquire(hw);
if (ret_val)
goto out;
- ret_val = hw->phy.ops.read_reg_locked(hw, BM_PORT_GEN_CFG_REG,
- &phy_data);
+ ret_val = hw->phy.ops.read_reg_locked(hw, BM_PORT_GEN_CFG, &phy_data);
if (ret_val)
goto release;
- ret_val = hw->phy.ops.write_reg_locked(hw, BM_PORT_GEN_CFG_REG,
- phy_data & 0x00FF);
+ ret_val = hw->phy.ops.write_reg_locked(hw, BM_PORT_GEN_CFG,
+ phy_data & 0x00FF);
release:
hw->phy.ops.release(hw);
out:
@@ -1541,19 +1533,38 @@ out:
void e1000_copy_rx_addrs_to_phy_ich8lan(struct e1000_hw *hw)
{
u32 mac_reg;
- u16 i;
+ u16 i, phy_reg = 0;
+ s32 ret_val;
DEBUGFUNC("e1000_copy_rx_addrs_to_phy_ich8lan");
+ ret_val = hw->phy.ops.acquire(hw);
+ if (ret_val)
+ return;
+ ret_val = e1000_enable_phy_wakeup_reg_access_bm(hw, &phy_reg);
+ if (ret_val)
+ goto release;
+
/* Copy both RAL/H (rar_entry_count) and SHRAL/H (+4) to PHY */
for (i = 0; i < (hw->mac.rar_entry_count + 4); i++) {
mac_reg = E1000_READ_REG(hw, E1000_RAL(i));
- hw->phy.ops.write_reg(hw, BM_RAR_L(i), (u16)(mac_reg & 0xFFFF));
- hw->phy.ops.write_reg(hw, BM_RAR_M(i), (u16)((mac_reg >> 16) & 0xFFFF));
+ hw->phy.ops.write_reg_page(hw, BM_RAR_L(i),
+ (u16)(mac_reg & 0xFFFF));
+ hw->phy.ops.write_reg_page(hw, BM_RAR_M(i),
+ (u16)((mac_reg >> 16) & 0xFFFF));
+
mac_reg = E1000_READ_REG(hw, E1000_RAH(i));
- hw->phy.ops.write_reg(hw, BM_RAR_H(i), (u16)(mac_reg & 0xFFFF));
- hw->phy.ops.write_reg(hw, BM_RAR_CTRL(i), (u16)((mac_reg >> 16) & 0x8000));
+ hw->phy.ops.write_reg_page(hw, BM_RAR_H(i),
+ (u16)(mac_reg & 0xFFFF));
+ hw->phy.ops.write_reg_page(hw, BM_RAR_CTRL(i),
+ (u16)((mac_reg & E1000_RAH_AV)
+ >> 16));
}
+
+ e1000_disable_phy_wakeup_reg_access_bm(hw, &phy_reg);
+
+release:
+ hw->phy.ops.release(hw);
}
static u32 e1000_calc_rx_da_crc(u8 mac[])
@@ -1594,7 +1605,8 @@ s32 e1000_lv_jumbo_workaround_ich8lan(struct e1000_hw *hw, bool enable)
/* disable Rx path while enabling/disabling workaround */
hw->phy.ops.read_reg(hw, PHY_REG(769, 20), &phy_reg);
- ret_val = hw->phy.ops.write_reg(hw, PHY_REG(769, 20), phy_reg | (1 << 14));
+ ret_val = hw->phy.ops.write_reg(hw, PHY_REG(769, 20),
+ phy_reg | (1 << 14));
if (ret_val)
goto out;
@@ -1676,11 +1688,12 @@ s32 e1000_lv_jumbo_workaround_ich8lan(struct e1000_hw *hw, bool enable)
ret_val = hw->phy.ops.write_reg(hw, PHY_REG(776, 20), data);
if (ret_val)
goto out;
- ret_val = hw->phy.ops.write_reg(hw, PHY_REG(776, 23), 0xFE00);
+ ret_val = hw->phy.ops.write_reg(hw, PHY_REG(776, 23), 0xF100);
if (ret_val)
goto out;
hw->phy.ops.read_reg(hw, HV_PM_CTRL, &data);
- ret_val = hw->phy.ops.write_reg(hw, HV_PM_CTRL, data | (1 << 10));
+ ret_val = hw->phy.ops.write_reg(hw, HV_PM_CTRL, data |
+ (1 << 10));
if (ret_val)
goto out;
} else {
@@ -1737,13 +1750,15 @@ s32 e1000_lv_jumbo_workaround_ich8lan(struct e1000_hw *hw, bool enable)
if (ret_val)
goto out;
hw->phy.ops.read_reg(hw, HV_PM_CTRL, &data);
- ret_val = hw->phy.ops.write_reg(hw, HV_PM_CTRL, data & ~(1 << 10));
+ ret_val = hw->phy.ops.write_reg(hw, HV_PM_CTRL, data &
+ ~(1 << 10));
if (ret_val)
goto out;
}
/* re-enable Rx path after enabling/disabling workaround */
- ret_val = hw->phy.ops.write_reg(hw, PHY_REG(769, 20), phy_reg & ~(1 << 14));
+ ret_val = hw->phy.ops.write_reg(hw, PHY_REG(769, 20), phy_reg &
+ ~(1 << 14));
out:
return ret_val;
@@ -1765,6 +1780,28 @@ static s32 e1000_lv_phy_workarounds_ich8lan(struct e1000_hw *hw)
/* Set MDIO slow mode before any other MDIO access */
ret_val = e1000_set_mdio_slow_mode_hv(hw);
+ ret_val = hw->phy.ops.acquire(hw);
+ if (ret_val)
+ goto out;
+ ret_val = hw->phy.ops.write_reg_locked(hw, I82579_EMI_ADDR,
+ I82579_MSE_THRESHOLD);
+ if (ret_val)
+ goto release;
+ /* set MSE higher to enable link to stay up when noise is high */
+ ret_val = hw->phy.ops.write_reg_locked(hw, I82579_EMI_DATA,
+ 0x0034);
+ if (ret_val)
+ goto release;
+ ret_val = hw->phy.ops.write_reg_locked(hw, I82579_EMI_ADDR,
+ I82579_MSE_LINK_DOWN);
+ if (ret_val)
+ goto release;
+ /* drop link after 5 times MSE threshold was reached */
+ ret_val = hw->phy.ops.write_reg_locked(hw, I82579_EMI_DATA,
+ 0x0005);
+release:
+ hw->phy.ops.release(hw);
+
out:
return ret_val;
}
@@ -1780,6 +1817,7 @@ static s32 e1000_k1_workaround_lv(struct e1000_hw *hw)
s32 ret_val = E1000_SUCCESS;
u16 status_reg = 0;
u32 mac_reg;
+ u16 phy_reg;
DEBUGFUNC("e1000_k1_workaround_lv");
@@ -1796,12 +1834,19 @@ static s32 e1000_k1_workaround_lv(struct e1000_hw *hw)
mac_reg = E1000_READ_REG(hw, E1000_FEXTNVM4);
mac_reg &= ~E1000_FEXTNVM4_BEACON_DURATION_MASK;
- if (status_reg & HV_M_STATUS_SPEED_1000)
+ ret_val = hw->phy.ops.read_reg(hw, I82579_LPI_CTRL, &phy_reg);
+ if (ret_val)
+ goto out;
+
+ if (status_reg & HV_M_STATUS_SPEED_1000) {
mac_reg |= E1000_FEXTNVM4_BEACON_DURATION_8USEC;
- else
+ phy_reg &= ~I82579_LPI_CTRL_FORCE_PLL_LOCK_COUNT;
+ } else {
mac_reg |= E1000_FEXTNVM4_BEACON_DURATION_16USEC;
-
+ phy_reg |= I82579_LPI_CTRL_FORCE_PLL_LOCK_COUNT;
+ }
E1000_WRITE_REG(hw, E1000_FEXTNVM4, mac_reg);
+ ret_val = hw->phy.ops.write_reg(hw, I82579_LPI_CTRL, phy_reg);
}
out:
@@ -1837,34 +1882,6 @@ static void e1000_gate_hw_phy_config_ich8lan(struct e1000_hw *hw, bool gate)
}
/**
- * e1000_hv_phy_tuning_workaround_ich8lan - This is a Phy tuning work around
- * needed for Nahum3 + Hanksville testing, requested by HW team
- **/
-static s32 e1000_hv_phy_tuning_workaround_ich8lan(struct e1000_hw *hw)
-{
- s32 ret_val = E1000_SUCCESS;
-
- DEBUGFUNC("e1000_hv_phy_tuning_workaround_ich8lan");
-
- ret_val = hw->phy.ops.write_reg(hw, PHY_REG(769, 25), 0x4431);
- if (ret_val)
- goto out;
-
- ret_val = hw->phy.ops.write_reg(hw, PHY_REG(770, 16), 0xA204);
- if (ret_val)
- goto out;
-
- ret_val = hw->phy.ops.write_reg(hw, (1 << 6) | 0x29, 0x66C0);
- if (ret_val)
- goto out;
-
- ret_val = hw->phy.ops.write_reg(hw, (1 << 6) | 0x1E, 0xFFFF);
-
-out:
- return ret_val;
-}
-
-/**
* e1000_lan_init_done_ich8lan - Check for PHY config completion
* @hw: pointer to the HW structure
*
@@ -1931,16 +1948,13 @@ static s32 e1000_post_phy_reset_ich8lan(struct e1000_hw *hw)
break;
}
- if (hw->device_id == E1000_DEV_ID_ICH10_HANKSVILLE) {
- ret_val = e1000_hv_phy_tuning_workaround_ich8lan(hw);
- if (ret_val)
- goto out;
+ /* Clear the host wakeup bit after lcd reset */
+ if (hw->mac.type >= e1000_pchlan) {
+ hw->phy.ops.read_reg(hw, BM_PORT_GEN_CFG, &reg);
+ reg &= ~BM_WUC_HOST_WU_BIT;
+ hw->phy.ops.write_reg(hw, BM_PORT_GEN_CFG, reg);
}
- /* Dummy read to clear the phy wakeup bit after lcd reset */
- if (hw->mac.type >= e1000_pchlan)
- hw->phy.ops.read_reg(hw, BM_WUC, &reg);
-
/* Configure the LCD with the extended configuration region in NVM */
ret_val = e1000_sw_lcd_config_ich8lan(hw);
if (ret_val)
@@ -2031,7 +2045,9 @@ static s32 e1000_set_lplu_state_pchlan(struct e1000_hw *hw, bool active)
else
oem_reg &= ~HV_OEM_BITS_LPLU;
- oem_reg |= HV_OEM_BITS_RESTART_AN;
+ if (!hw->phy.ops.check_reset_block(hw))
+ oem_reg |= HV_OEM_BITS_RESTART_AN;
+
ret_val = hw->phy.ops.write_reg(hw, HV_OEM_BITS, oem_reg);
out:
@@ -2081,12 +2097,12 @@ static s32 e1000_set_d0_lplu_state_ich8lan(struct e1000_hw *hw, bool active)
/* When LPLU is enabled, we should disable SmartSpeed */
ret_val = phy->ops.read_reg(hw,
- IGP01E1000_PHY_PORT_CONFIG,
- &data);
+ IGP01E1000_PHY_PORT_CONFIG,
+ &data);
data &= ~IGP01E1000_PSCFR_SMART_SPEED;
ret_val = phy->ops.write_reg(hw,
- IGP01E1000_PHY_PORT_CONFIG,
- data);
+ IGP01E1000_PHY_PORT_CONFIG,
+ data);
if (ret_val)
goto out;
} else {
@@ -2104,28 +2120,28 @@ static s32 e1000_set_d0_lplu_state_ich8lan(struct e1000_hw *hw, bool active)
*/
if (phy->smart_speed == e1000_smart_speed_on) {
ret_val = phy->ops.read_reg(hw,
- IGP01E1000_PHY_PORT_CONFIG,
- &data);
+ IGP01E1000_PHY_PORT_CONFIG,
+ &data);
if (ret_val)
goto out;
data |= IGP01E1000_PSCFR_SMART_SPEED;
ret_val = phy->ops.write_reg(hw,
- IGP01E1000_PHY_PORT_CONFIG,
- data);
+ IGP01E1000_PHY_PORT_CONFIG,
+ data);
if (ret_val)
goto out;
} else if (phy->smart_speed == e1000_smart_speed_off) {
ret_val = phy->ops.read_reg(hw,
- IGP01E1000_PHY_PORT_CONFIG,
- &data);
+ IGP01E1000_PHY_PORT_CONFIG,
+ &data);
if (ret_val)
goto out;
data &= ~IGP01E1000_PSCFR_SMART_SPEED;
ret_val = phy->ops.write_reg(hw,
- IGP01E1000_PHY_PORT_CONFIG,
- data);
+ IGP01E1000_PHY_PORT_CONFIG,
+ data);
if (ret_val)
goto out;
}
@@ -2174,34 +2190,34 @@ static s32 e1000_set_d3_lplu_state_ich8lan(struct e1000_hw *hw, bool active)
*/
if (phy->smart_speed == e1000_smart_speed_on) {
ret_val = phy->ops.read_reg(hw,
- IGP01E1000_PHY_PORT_CONFIG,
- &data);
+ IGP01E1000_PHY_PORT_CONFIG,
+ &data);
if (ret_val)
goto out;
data |= IGP01E1000_PSCFR_SMART_SPEED;
ret_val = phy->ops.write_reg(hw,
- IGP01E1000_PHY_PORT_CONFIG,
- data);
+ IGP01E1000_PHY_PORT_CONFIG,
+ data);
if (ret_val)
goto out;
} else if (phy->smart_speed == e1000_smart_speed_off) {
ret_val = phy->ops.read_reg(hw,
- IGP01E1000_PHY_PORT_CONFIG,
- &data);
+ IGP01E1000_PHY_PORT_CONFIG,
+ &data);
if (ret_val)
goto out;
data &= ~IGP01E1000_PSCFR_SMART_SPEED;
ret_val = phy->ops.write_reg(hw,
- IGP01E1000_PHY_PORT_CONFIG,
- data);
+ IGP01E1000_PHY_PORT_CONFIG,
+ data);
if (ret_val)
goto out;
}
} else if ((phy->autoneg_advertised == E1000_ALL_SPEED_DUPLEX) ||
- (phy->autoneg_advertised == E1000_ALL_NOT_GIG) ||
- (phy->autoneg_advertised == E1000_ALL_10_SPEED)) {
+ (phy->autoneg_advertised == E1000_ALL_NOT_GIG) ||
+ (phy->autoneg_advertised == E1000_ALL_10_SPEED)) {
phy_ctrl |= E1000_PHY_CTRL_NOND0A_LPLU;
E1000_WRITE_REG(hw, E1000_PHY_CTRL, phy_ctrl);
@@ -2217,15 +2233,15 @@ static s32 e1000_set_d3_lplu_state_ich8lan(struct e1000_hw *hw, bool active)
/* When LPLU is enabled, we should disable SmartSpeed */
ret_val = phy->ops.read_reg(hw,
- IGP01E1000_PHY_PORT_CONFIG,
- &data);
+ IGP01E1000_PHY_PORT_CONFIG,
+ &data);
if (ret_val)
goto out;
data &= ~IGP01E1000_PSCFR_SMART_SPEED;
ret_val = phy->ops.write_reg(hw,
- IGP01E1000_PHY_PORT_CONFIG,
- data);
+ IGP01E1000_PHY_PORT_CONFIG,
+ data);
}
out:
@@ -2264,8 +2280,7 @@ static s32 e1000_valid_nvm_bank_detect_ich8lan(struct e1000_hw *hw, u32 *bank)
goto out;
}
- DEBUGOUT("Unable to determine valid NVM bank via EEC - "
- "reading flash signature\n");
+ DEBUGOUT("Unable to determine valid NVM bank via EEC - reading flash signature\n");
/* fall-thru */
default:
/* set bank to 0 in case flash read fails */
@@ -2273,7 +2288,7 @@ static s32 e1000_valid_nvm_bank_detect_ich8lan(struct e1000_hw *hw, u32 *bank)
/* Check bank 0 */
ret_val = e1000_read_flash_byte_ich8lan(hw, act_offset,
- &sig_byte);
+ &sig_byte);
if (ret_val)
goto out;
if ((sig_byte & E1000_ICH_NVM_VALID_SIG_MASK) ==
@@ -2284,8 +2299,8 @@ static s32 e1000_valid_nvm_bank_detect_ich8lan(struct e1000_hw *hw, u32 *bank)
/* Check bank 1 */
ret_val = e1000_read_flash_byte_ich8lan(hw, act_offset +
- bank1_offset,
- &sig_byte);
+ bank1_offset,
+ &sig_byte);
if (ret_val)
goto out;
if ((sig_byte & E1000_ICH_NVM_VALID_SIG_MASK) ==
@@ -2312,7 +2327,7 @@ out:
* Reads a word(s) from the NVM using the flash access registers.
**/
static s32 e1000_read_nvm_ich8lan(struct e1000_hw *hw, u16 offset, u16 words,
- u16 *data)
+ u16 *data)
{
struct e1000_nvm_info *nvm = &hw->nvm;
struct e1000_dev_spec_ich8lan *dev_spec = &hw->dev_spec.ich8lan;
@@ -2343,13 +2358,12 @@ static s32 e1000_read_nvm_ich8lan(struct e1000_hw *hw, u16 offset, u16 words,
ret_val = E1000_SUCCESS;
for (i = 0; i < words; i++) {
- if ((dev_spec->shadow_ram) &&
- (dev_spec->shadow_ram[offset+i].modified)) {
+ if (dev_spec->shadow_ram[offset+i].modified) {
data[i] = dev_spec->shadow_ram[offset+i].value;
} else {
ret_val = e1000_read_flash_word_ich8lan(hw,
- act_offset + i,
- &word);
+ act_offset + i,
+ &word);
if (ret_val)
break;
data[i] = word;
@@ -2383,8 +2397,7 @@ static s32 e1000_flash_cycle_init_ich8lan(struct e1000_hw *hw)
/* Check if the flash descriptor is valid */
if (hsfsts.hsf_status.fldesvalid == 0) {
- DEBUGOUT("Flash descriptor invalid. "
- "SW Sequencing must be used.");
+ DEBUGOUT("Flash descriptor invalid. SW Sequencing must be used.\n");
goto out;
}
@@ -2421,7 +2434,7 @@ static s32 e1000_flash_cycle_init_ich8lan(struct e1000_hw *hw)
*/
for (i = 0; i < ICH_FLASH_READ_COMMAND_TIMEOUT; i++) {
hsfsts.regval = E1000_READ_FLASH_REG16(hw,
- ICH_FLASH_HSFSTS);
+ ICH_FLASH_HSFSTS);
if (hsfsts.hsf_status.flcinprog == 0) {
ret_val = E1000_SUCCESS;
break;
@@ -2435,9 +2448,9 @@ static s32 e1000_flash_cycle_init_ich8lan(struct e1000_hw *hw)
*/
hsfsts.hsf_status.flcdone = 1;
E1000_WRITE_FLASH_REG16(hw, ICH_FLASH_HSFSTS,
- hsfsts.regval);
+ hsfsts.regval);
} else {
- DEBUGOUT("Flash controller busy, cannot get access");
+ DEBUGOUT("Flash controller busy, cannot get access\n");
}
}
@@ -2490,7 +2503,7 @@ static s32 e1000_flash_cycle_ich8lan(struct e1000_hw *hw, u32 timeout)
* to bytes before read.
**/
static s32 e1000_read_flash_word_ich8lan(struct e1000_hw *hw, u32 offset,
- u16 *data)
+ u16 *data)
{
s32 ret_val;
@@ -2519,7 +2532,7 @@ out:
* Reads a single byte from the NVM using the flash access registers.
**/
static s32 e1000_read_flash_byte_ich8lan(struct e1000_hw *hw, u32 offset,
- u8 *data)
+ u8 *data)
{
s32 ret_val = E1000_SUCCESS;
u16 word = 0;
@@ -2544,7 +2557,7 @@ out:
* Reads a byte or word from the NVM using the flash access registers.
**/
static s32 e1000_read_flash_data_ich8lan(struct e1000_hw *hw, u32 offset,
- u8 size, u16 *data)
+ u8 size, u16 *data)
{
union ich8_hws_flash_status hsfsts;
union ich8_hws_flash_ctrl hsflctl;
@@ -2559,7 +2572,7 @@ static s32 e1000_read_flash_data_ich8lan(struct e1000_hw *hw, u32 offset,
goto out;
flash_linear_addr = (ICH_FLASH_LINEAR_ADDR_MASK & offset) +
- hw->nvm.flash_base_addr;
+ hw->nvm.flash_base_addr;
do {
usec_delay(1);
@@ -2577,7 +2590,7 @@ static s32 e1000_read_flash_data_ich8lan(struct e1000_hw *hw, u32 offset,
E1000_WRITE_FLASH_REG(hw, ICH_FLASH_FADDR, flash_linear_addr);
ret_val = e1000_flash_cycle_ich8lan(hw,
- ICH_FLASH_READ_COMMAND_TIMEOUT);
+ ICH_FLASH_READ_COMMAND_TIMEOUT);
/*
* Check if FCERR is set to 1, if set to 1, clear it
@@ -2600,13 +2613,12 @@ static s32 e1000_read_flash_data_ich8lan(struct e1000_hw *hw, u32 offset,
* ICH_FLASH_CYCLE_REPEAT_COUNT times.
*/
hsfsts.regval = E1000_READ_FLASH_REG16(hw,
- ICH_FLASH_HSFSTS);
+ ICH_FLASH_HSFSTS);
if (hsfsts.hsf_status.flcerr == 1) {
/* Repeat for some time before giving up. */
continue;
} else if (hsfsts.hsf_status.flcdone == 0) {
- DEBUGOUT("Timeout error - flash cycle "
- "did not complete.");
+ DEBUGOUT("Timeout error - flash cycle did not complete.\n");
break;
}
}
@@ -2626,7 +2638,7 @@ out:
* Writes a byte or word to the NVM using the flash access registers.
**/
static s32 e1000_write_nvm_ich8lan(struct e1000_hw *hw, u16 offset, u16 words,
- u16 *data)
+ u16 *data)
{
struct e1000_nvm_info *nvm = &hw->nvm;
struct e1000_dev_spec_ich8lan *dev_spec = &hw->dev_spec.ich8lan;
@@ -2720,8 +2732,8 @@ static s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw)
data = dev_spec->shadow_ram[i].value;
} else {
ret_val = e1000_read_flash_word_ich8lan(hw, i +
- old_bank_offset,
- &data);
+ old_bank_offset,
+ &data);
if (ret_val)
break;
}
@@ -2743,15 +2755,15 @@ static s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw)
usec_delay(100);
/* Write the bytes to the new bank. */
ret_val = e1000_retry_write_flash_byte_ich8lan(hw,
- act_offset,
- (u8)data);
+ act_offset,
+ (u8)data);
if (ret_val)
break;
usec_delay(100);
ret_val = e1000_retry_write_flash_byte_ich8lan(hw,
- act_offset + 1,
- (u8)(data >> 8));
+ act_offset + 1,
+ (u8)(data >> 8));
if (ret_val)
break;
}
@@ -2778,8 +2790,8 @@ static s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw)
data &= 0xBFFF;
ret_val = e1000_retry_write_flash_byte_ich8lan(hw,
- act_offset * 2 + 1,
- (u8)(data >> 8));
+ act_offset * 2 + 1,
+ (u8)(data >> 8));
if (ret_val)
goto release;
@@ -2870,7 +2882,7 @@ out:
* Writes one/two bytes to the NVM using the flash access registers.
**/
static s32 e1000_write_flash_data_ich8lan(struct e1000_hw *hw, u32 offset,
- u8 size, u16 data)
+ u8 size, u16 data)
{
union ich8_hws_flash_status hsfsts;
union ich8_hws_flash_ctrl hsflctl;
@@ -2886,7 +2898,7 @@ static s32 e1000_write_flash_data_ich8lan(struct e1000_hw *hw, u32 offset,
goto out;
flash_linear_addr = (ICH_FLASH_LINEAR_ADDR_MASK & offset) +
- hw->nvm.flash_base_addr;
+ hw->nvm.flash_base_addr;
do {
usec_delay(1);
@@ -2915,7 +2927,7 @@ static s32 e1000_write_flash_data_ich8lan(struct e1000_hw *hw, u32 offset,
* and try the whole sequence a few more times else done
*/
ret_val = e1000_flash_cycle_ich8lan(hw,
- ICH_FLASH_WRITE_COMMAND_TIMEOUT);
+ ICH_FLASH_WRITE_COMMAND_TIMEOUT);
if (ret_val == E1000_SUCCESS)
break;
@@ -2930,8 +2942,7 @@ static s32 e1000_write_flash_data_ich8lan(struct e1000_hw *hw, u32 offset,
/* Repeat for some time before giving up. */
continue;
if (hsfsts.hsf_status.flcdone == 0) {
- DEBUGOUT("Timeout error - flash cycle "
- "did not complete.");
+ DEBUGOUT("Timeout error - flash cycle did not complete.\n");
break;
}
} while (count++ < ICH_FLASH_CYCLE_REPEAT_COUNT);
@@ -2949,7 +2960,7 @@ out:
* Writes a single byte to the NVM using the flash access registers.
**/
static s32 e1000_write_flash_byte_ich8lan(struct e1000_hw *hw, u32 offset,
- u8 data)
+ u8 data)
{
u16 word = (u16)data;
@@ -2968,7 +2979,7 @@ static s32 e1000_write_flash_byte_ich8lan(struct e1000_hw *hw, u32 offset,
* Goes through a retry algorithm before giving up.
**/
static s32 e1000_retry_write_flash_byte_ich8lan(struct e1000_hw *hw,
- u32 offset, u8 byte)
+ u32 offset, u8 byte)
{
s32 ret_val;
u16 program_retries;
@@ -3071,10 +3082,10 @@ static s32 e1000_erase_flash_bank_ich8lan(struct e1000_hw *hw, u32 bank)
* Cycle field in hw flash control
*/
hsflctl.regval = E1000_READ_FLASH_REG16(hw,
- ICH_FLASH_HSFCTL);
+ ICH_FLASH_HSFCTL);
hsflctl.hsf_ctrl.flcycle = ICH_CYCLE_ERASE;
E1000_WRITE_FLASH_REG16(hw, ICH_FLASH_HSFCTL,
- hsflctl.regval);
+ hsflctl.regval);
/*
* Write the last 24 bits of an index within the
@@ -3083,10 +3094,10 @@ static s32 e1000_erase_flash_bank_ich8lan(struct e1000_hw *hw, u32 bank)
*/
flash_linear_addr += (j * sector_size);
E1000_WRITE_FLASH_REG(hw, ICH_FLASH_FADDR,
- flash_linear_addr);
+ flash_linear_addr);
ret_val = e1000_flash_cycle_ich8lan(hw,
- ICH_FLASH_ERASE_COMMAND_TIMEOUT);
+ ICH_FLASH_ERASE_COMMAND_TIMEOUT);
if (ret_val == E1000_SUCCESS)
break;
@@ -3130,8 +3141,7 @@ static s32 e1000_valid_led_default_ich8lan(struct e1000_hw *hw, u16 *data)
goto out;
}
- if (*data == ID_LED_RESERVED_0000 ||
- *data == ID_LED_RESERVED_FFFF)
+ if (*data == ID_LED_RESERVED_0000 || *data == ID_LED_RESERVED_FFFF)
*data = ID_LED_DEFAULT_ICH8LAN;
out:
@@ -3218,7 +3228,7 @@ out:
* @hw: pointer to the HW structure
*
* ICH8 use the PCI Express bus, but does not contain a PCI Express Capability
- * register, so the bus width is hard coded.
+ * register, so the the bus width is hard coded.
**/
static s32 e1000_get_bus_info_ich8lan(struct e1000_hw *hw)
{
@@ -3320,10 +3330,11 @@ static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw)
ret_val = e1000_acquire_swflag_ich8lan(hw);
DEBUGOUT("Issuing a global reset to ich8lan\n");
E1000_WRITE_REG(hw, E1000_CTRL, (ctrl | E1000_CTRL_RST));
+ /* cannot issue a flush here because it hangs the hardware */
msec_delay(20);
if (!ret_val)
- e1000_release_swflag_ich8lan(hw);
+ E1000_MUTEX_UNLOCK(&hw->dev_spec.ich8lan.swflag_mutex);
if (ctrl & E1000_CTRL_PHY_RST) {
ret_val = hw->phy.ops.get_cfg_done(hw);
@@ -3393,11 +3404,13 @@ static s32 e1000_init_hw_ich8lan(struct e1000_hw *hw)
/*
* The 82578 Rx buffer will stall if wakeup is enabled in host and
- * the ME. Reading the BM_WUC register will clear the host wakeup bit.
+ * the ME. Disable wakeup by clearing the host wakeup bit.
* Reset the phy after disabling host wakeup to reset the Rx buffer.
*/
if (hw->phy.type == e1000_phy_82578) {
- hw->phy.ops.read_reg(hw, BM_WUC, &i);
+ hw->phy.ops.read_reg(hw, BM_PORT_GEN_CFG, &i);
+ i &= ~BM_WUC_HOST_WU_BIT;
+ hw->phy.ops.write_reg(hw, BM_PORT_GEN_CFG, i);
ret_val = e1000_phy_hw_reset_ich8lan(hw);
if (ret_val)
return ret_val;
@@ -3411,13 +3424,13 @@ static s32 e1000_init_hw_ich8lan(struct e1000_hw *hw)
txdctl = (txdctl & ~E1000_TXDCTL_WTHRESH) |
E1000_TXDCTL_FULL_TX_DESC_WB;
txdctl = (txdctl & ~E1000_TXDCTL_PTHRESH) |
- E1000_TXDCTL_MAX_TX_DESC_PREFETCH;
+ E1000_TXDCTL_MAX_TX_DESC_PREFETCH;
E1000_WRITE_REG(hw, E1000_TXDCTL(0), txdctl);
txdctl = E1000_READ_REG(hw, E1000_TXDCTL(1));
txdctl = (txdctl & ~E1000_TXDCTL_WTHRESH) |
E1000_TXDCTL_FULL_TX_DESC_WB;
txdctl = (txdctl & ~E1000_TXDCTL_PTHRESH) |
- E1000_TXDCTL_MAX_TX_DESC_PREFETCH;
+ E1000_TXDCTL_MAX_TX_DESC_PREFETCH;
E1000_WRITE_REG(hw, E1000_TXDCTL(1), txdctl);
/*
@@ -3557,8 +3570,8 @@ static s32 e1000_setup_link_ich8lan(struct e1000_hw *hw)
E1000_WRITE_REG(hw, E1000_FCRTV_PCH, hw->fc.refresh_time);
ret_val = hw->phy.ops.write_reg(hw,
- PHY_REG(BM_PORT_CTRL_PAGE, 27),
- hw->fc.pause_time);
+ PHY_REG(BM_PORT_CTRL_PAGE, 27),
+ hw->fc.pause_time);
if (ret_val)
goto out;
}
@@ -3596,18 +3609,18 @@ static s32 e1000_setup_copper_link_ich8lan(struct e1000_hw *hw)
* this fixes erroneous timeouts at 10Mbps.
*/
ret_val = e1000_write_kmrn_reg_generic(hw, E1000_KMRNCTRLSTA_TIMEOUTS,
- 0xFFFF);
+ 0xFFFF);
if (ret_val)
goto out;
ret_val = e1000_read_kmrn_reg_generic(hw,
- E1000_KMRNCTRLSTA_INBAND_PARAM,
- &reg_data);
+ E1000_KMRNCTRLSTA_INBAND_PARAM,
+ &reg_data);
if (ret_val)
goto out;
reg_data |= 0x3F;
ret_val = e1000_write_kmrn_reg_generic(hw,
- E1000_KMRNCTRLSTA_INBAND_PARAM,
- reg_data);
+ E1000_KMRNCTRLSTA_INBAND_PARAM,
+ reg_data);
if (ret_val)
goto out;
@@ -3631,7 +3644,7 @@ static s32 e1000_setup_copper_link_ich8lan(struct e1000_hw *hw)
break;
case e1000_phy_ife:
ret_val = hw->phy.ops.read_reg(hw, IFE_PHY_MDIX_CONTROL,
- &reg_data);
+ &reg_data);
if (ret_val)
goto out;
@@ -3650,7 +3663,7 @@ static s32 e1000_setup_copper_link_ich8lan(struct e1000_hw *hw)
break;
}
ret_val = hw->phy.ops.write_reg(hw, IFE_PHY_MDIX_CONTROL,
- reg_data);
+ reg_data);
if (ret_val)
goto out;
break;
@@ -3674,7 +3687,7 @@ out:
* gigabit speeds.
**/
static s32 e1000_get_link_up_info_ich8lan(struct e1000_hw *hw, u16 *speed,
- u16 *duplex)
+ u16 *duplex)
{
s32 ret_val;
@@ -3756,7 +3769,7 @@ static s32 e1000_kmrn_lock_loss_workaround_ich8lan(struct e1000_hw *hw)
/* Disable GigE link negotiation */
phy_ctrl = E1000_READ_REG(hw, E1000_PHY_CTRL);
phy_ctrl |= (E1000_PHY_CTRL_GBE_DISABLE |
- E1000_PHY_CTRL_NOND0A_GBE_DISABLE);
+ E1000_PHY_CTRL_NOND0A_GBE_DISABLE);
E1000_WRITE_REG(hw, E1000_PHY_CTRL, phy_ctrl);
/*
@@ -3781,7 +3794,7 @@ out:
* /disabled - FALSE).
**/
void e1000_set_kmrn_lock_loss_workaround_ich8lan(struct e1000_hw *hw,
- bool state)
+ bool state)
{
struct e1000_dev_spec_ich8lan *dev_spec = &hw->dev_spec.ich8lan;
@@ -3823,7 +3836,7 @@ void e1000_igp3_phy_powerdown_workaround_ich8lan(struct e1000_hw *hw)
/* Disable link */
reg = E1000_READ_REG(hw, E1000_PHY_CTRL);
reg |= (E1000_PHY_CTRL_GBE_DISABLE |
- E1000_PHY_CTRL_NOND0A_GBE_DISABLE);
+ E1000_PHY_CTRL_NOND0A_GBE_DISABLE);
E1000_WRITE_REG(hw, E1000_PHY_CTRL, reg);
/*
@@ -3837,7 +3850,7 @@ void e1000_igp3_phy_powerdown_workaround_ich8lan(struct e1000_hw *hw)
hw->phy.ops.read_reg(hw, IGP3_VR_CTRL, &data);
data &= ~IGP3_VR_CTRL_DEV_POWERDOWN_MODE_MASK;
hw->phy.ops.write_reg(hw, IGP3_VR_CTRL,
- data | IGP3_VR_CTRL_MODE_SHUTDOWN);
+ data | IGP3_VR_CTRL_MODE_SHUTDOWN);
/* Read it back and test */
hw->phy.ops.read_reg(hw, IGP3_VR_CTRL, &data);
@@ -3863,7 +3876,7 @@ out:
* LPLU, Gig disable, MDIC PHY reset):
* 1) Set Kumeran Near-end loopback
* 2) Clear Kumeran Near-end loopback
- * Should only be called for ICH8[m] devices with IGP_3 Phy.
+ * Should only be called for ICH8[m] devices with any 1G Phy.
**/
void e1000_gig_downshift_workaround_ich8lan(struct e1000_hw *hw)
{
@@ -3873,51 +3886,54 @@ void e1000_gig_downshift_workaround_ich8lan(struct e1000_hw *hw)
DEBUGFUNC("e1000_gig_downshift_workaround_ich8lan");
if ((hw->mac.type != e1000_ich8lan) ||
- (hw->phy.type != e1000_phy_igp_3))
+ (hw->phy.type == e1000_phy_ife))
goto out;
ret_val = e1000_read_kmrn_reg_generic(hw, E1000_KMRNCTRLSTA_DIAG_OFFSET,
- &reg_data);
+ &reg_data);
if (ret_val)
goto out;
reg_data |= E1000_KMRNCTRLSTA_DIAG_NELPBK;
ret_val = e1000_write_kmrn_reg_generic(hw,
- E1000_KMRNCTRLSTA_DIAG_OFFSET,
- reg_data);
+ E1000_KMRNCTRLSTA_DIAG_OFFSET,
+ reg_data);
if (ret_val)
goto out;
reg_data &= ~E1000_KMRNCTRLSTA_DIAG_NELPBK;
ret_val = e1000_write_kmrn_reg_generic(hw,
- E1000_KMRNCTRLSTA_DIAG_OFFSET,
- reg_data);
+ E1000_KMRNCTRLSTA_DIAG_OFFSET,
+ reg_data);
out:
return;
}
/**
- * e1000_disable_gig_wol_ich8lan - disable gig during WoL
+ * e1000_suspend_workarounds_ich8lan - workarounds needed during S0->Sx
* @hw: pointer to the HW structure
*
* During S0 to Sx transition, it is possible the link remains at gig
* instead of negotiating to a lower speed. Before going to Sx, set
- * 'LPLU Enabled' and 'Gig Disable' to force link speed negotiation
- * to a lower speed.
- *
- * Should only be called for applicable parts.
+ * 'Gig Disable' to force link speed negotiation to a lower speed based on
+ * the LPLU setting in the NVM or custom setting. For PCH and newer parts,
+ * the OEM bits PHY register (LED, GbE disable and LPLU configurations) also
+ * needs to be written.
**/
-void e1000_disable_gig_wol_ich8lan(struct e1000_hw *hw)
+void e1000_suspend_workarounds_ich8lan(struct e1000_hw *hw)
{
u32 phy_ctrl;
s32 ret_val;
- DEBUGFUNC("e1000_disable_gig_wol_ich8lan");
+ DEBUGFUNC("e1000_suspend_workarounds_ich8lan");
phy_ctrl = E1000_READ_REG(hw, E1000_PHY_CTRL);
- phy_ctrl |= E1000_PHY_CTRL_D0A_LPLU | E1000_PHY_CTRL_GBE_DISABLE;
+ phy_ctrl |= E1000_PHY_CTRL_GBE_DISABLE;
E1000_WRITE_REG(hw, E1000_PHY_CTRL, phy_ctrl);
+ if (hw->mac.type == e1000_ich8lan)
+ e1000_gig_downshift_workaround_ich8lan(hw);
if (hw->mac.type >= e1000_pchlan) {
e1000_oem_bits_config_ich8lan(hw, FALSE);
+ e1000_phy_hw_reset_ich8lan(hw);
ret_val = hw->phy.ops.acquire(hw);
if (ret_val)
return;
@@ -3929,6 +3945,58 @@ void e1000_disable_gig_wol_ich8lan(struct e1000_hw *hw)
}
/**
+ * e1000_resume_workarounds_pchlan - workarounds needed during Sx->S0
+ * @hw: pointer to the HW structure
+ *
+ * During Sx to S0 transitions on non-managed devices or managed devices
+ * on which PHY resets are not blocked, if the PHY registers cannot be
+ * accessed properly by the s/w toggle the LANPHYPC value to power cycle
+ * the PHY.
+ **/
+void e1000_resume_workarounds_pchlan(struct e1000_hw *hw)
+{
+ u16 phy_id1, phy_id2;
+ s32 ret_val;
+
+ DEBUGFUNC("e1000_resume_workarounds_pchlan");
+
+ if ((hw->mac.type != e1000_pch2lan) ||
+ hw->phy.ops.check_reset_block(hw))
+ return;
+
+ ret_val = hw->phy.ops.acquire(hw);
+ if (ret_val) {
+ DEBUGOUT("Failed to acquire PHY semaphore in resume\n");
+ return;
+ }
+
+ /* Test access to the PHY registers by reading the ID regs */
+ ret_val = hw->phy.ops.read_reg_locked(hw, PHY_ID1, &phy_id1);
+ if (ret_val)
+ goto release;
+ ret_val = hw->phy.ops.read_reg_locked(hw, PHY_ID2, &phy_id2);
+ if (ret_val)
+ goto release;
+
+ if (hw->phy.id == ((u32)(phy_id1 << 16) |
+ (u32)(phy_id2 & PHY_REVISION_MASK)))
+ goto release;
+
+ e1000_toggle_lanphypc_value_ich8lan(hw);
+
+ hw->phy.ops.release(hw);
+ msec_delay(50);
+ hw->phy.ops.reset(hw);
+ msec_delay(50);
+ return;
+
+release:
+ hw->phy.ops.release(hw);
+
+ return;
+}
+
+/**
* e1000_cleanup_led_ich8lan - Restore the default LED operation
* @hw: pointer to the HW structure
*
@@ -3940,7 +4008,7 @@ static s32 e1000_cleanup_led_ich8lan(struct e1000_hw *hw)
if (hw->phy.type == e1000_phy_ife)
return hw->phy.ops.write_reg(hw, IFE_PHY_SPECIAL_CONTROL_LED,
- 0);
+ 0);
E1000_WRITE_REG(hw, E1000_LEDCTL, hw->mac.ledctl_default);
return E1000_SUCCESS;
@@ -3958,7 +4026,7 @@ static s32 e1000_led_on_ich8lan(struct e1000_hw *hw)
if (hw->phy.type == e1000_phy_ife)
return hw->phy.ops.write_reg(hw, IFE_PHY_SPECIAL_CONTROL_LED,
- (IFE_PSCL_PROBE_MODE | IFE_PSCL_PROBE_LEDS_ON));
+ (IFE_PSCL_PROBE_MODE | IFE_PSCL_PROBE_LEDS_ON));
E1000_WRITE_REG(hw, E1000_LEDCTL, hw->mac.ledctl_mode2);
return E1000_SUCCESS;
@@ -3976,7 +4044,7 @@ static s32 e1000_led_off_ich8lan(struct e1000_hw *hw)
if (hw->phy.type == e1000_phy_ife)
return hw->phy.ops.write_reg(hw, IFE_PHY_SPECIAL_CONTROL_LED,
- (IFE_PSCL_PROBE_MODE | IFE_PSCL_PROBE_LEDS_OFF));
+ (IFE_PSCL_PROBE_MODE | IFE_PSCL_PROBE_LEDS_OFF));
E1000_WRITE_REG(hw, E1000_LEDCTL, hw->mac.ledctl_mode1);
return E1000_SUCCESS;
@@ -3993,7 +4061,7 @@ static s32 e1000_setup_led_pchlan(struct e1000_hw *hw)
DEBUGFUNC("e1000_setup_led_pchlan");
return hw->phy.ops.write_reg(hw, HV_LED_CONFIG,
- (u16)hw->mac.ledctl_mode1);
+ (u16)hw->mac.ledctl_mode1);
}
/**
@@ -4007,7 +4075,7 @@ static s32 e1000_cleanup_led_pchlan(struct e1000_hw *hw)
DEBUGFUNC("e1000_cleanup_led_pchlan");
return hw->phy.ops.write_reg(hw, HV_LED_CONFIG,
- (u16)hw->mac.ledctl_default);
+ (u16)hw->mac.ledctl_default);
}
/**
@@ -4165,6 +4233,7 @@ static void e1000_power_down_phy_copper_ich8lan(struct e1000_hw *hw)
static void e1000_clear_hw_cntrs_ich8lan(struct e1000_hw *hw)
{
u16 phy_data;
+ s32 ret_val;
DEBUGFUNC("e1000_clear_hw_cntrs_ich8lan");
@@ -4188,20 +4257,29 @@ static void e1000_clear_hw_cntrs_ich8lan(struct e1000_hw *hw)
if ((hw->phy.type == e1000_phy_82578) ||
(hw->phy.type == e1000_phy_82579) ||
(hw->phy.type == e1000_phy_82577)) {
- hw->phy.ops.read_reg(hw, HV_SCC_UPPER, &phy_data);
- hw->phy.ops.read_reg(hw, HV_SCC_LOWER, &phy_data);
- hw->phy.ops.read_reg(hw, HV_ECOL_UPPER, &phy_data);
- hw->phy.ops.read_reg(hw, HV_ECOL_LOWER, &phy_data);
- hw->phy.ops.read_reg(hw, HV_MCC_UPPER, &phy_data);
- hw->phy.ops.read_reg(hw, HV_MCC_LOWER, &phy_data);
- hw->phy.ops.read_reg(hw, HV_LATECOL_UPPER, &phy_data);
- hw->phy.ops.read_reg(hw, HV_LATECOL_LOWER, &phy_data);
- hw->phy.ops.read_reg(hw, HV_COLC_UPPER, &phy_data);
- hw->phy.ops.read_reg(hw, HV_COLC_LOWER, &phy_data);
- hw->phy.ops.read_reg(hw, HV_DC_UPPER, &phy_data);
- hw->phy.ops.read_reg(hw, HV_DC_LOWER, &phy_data);
- hw->phy.ops.read_reg(hw, HV_TNCRS_UPPER, &phy_data);
- hw->phy.ops.read_reg(hw, HV_TNCRS_LOWER, &phy_data);
+ ret_val = hw->phy.ops.acquire(hw);
+ if (ret_val)
+ return;
+ ret_val = hw->phy.ops.set_page(hw,
+ HV_STATS_PAGE << IGP_PAGE_SHIFT);
+ if (ret_val)
+ goto release;
+ hw->phy.ops.read_reg_page(hw, HV_SCC_UPPER, &phy_data);
+ hw->phy.ops.read_reg_page(hw, HV_SCC_LOWER, &phy_data);
+ hw->phy.ops.read_reg_page(hw, HV_ECOL_UPPER, &phy_data);
+ hw->phy.ops.read_reg_page(hw, HV_ECOL_LOWER, &phy_data);
+ hw->phy.ops.read_reg_page(hw, HV_MCC_UPPER, &phy_data);
+ hw->phy.ops.read_reg_page(hw, HV_MCC_LOWER, &phy_data);
+ hw->phy.ops.read_reg_page(hw, HV_LATECOL_UPPER, &phy_data);
+ hw->phy.ops.read_reg_page(hw, HV_LATECOL_LOWER, &phy_data);
+ hw->phy.ops.read_reg_page(hw, HV_COLC_UPPER, &phy_data);
+ hw->phy.ops.read_reg_page(hw, HV_COLC_LOWER, &phy_data);
+ hw->phy.ops.read_reg_page(hw, HV_DC_UPPER, &phy_data);
+ hw->phy.ops.read_reg_page(hw, HV_DC_LOWER, &phy_data);
+ hw->phy.ops.read_reg_page(hw, HV_TNCRS_UPPER, &phy_data);
+ hw->phy.ops.read_reg_page(hw, HV_TNCRS_LOWER, &phy_data);
+release:
+ hw->phy.ops.release(hw);
}
}
diff --git a/sys/dev/e1000/e1000_ich8lan.h b/sys/dev/e1000/e1000_ich8lan.h
index 200e4090..2eccb30 100644
--- a/sys/dev/e1000/e1000_ich8lan.h
+++ b/sys/dev/e1000/e1000_ich8lan.h
@@ -1,6 +1,6 @@
/******************************************************************************
- Copyright (c) 2001-2010, Intel Corporation
+ Copyright (c) 2001-2011, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -35,182 +35,204 @@
#ifndef _E1000_ICH8LAN_H_
#define _E1000_ICH8LAN_H_
-#define ICH_FLASH_GFPREG 0x0000
-#define ICH_FLASH_HSFSTS 0x0004
-#define ICH_FLASH_HSFCTL 0x0006
-#define ICH_FLASH_FADDR 0x0008
-#define ICH_FLASH_FDATA0 0x0010
+#define ICH_FLASH_GFPREG 0x0000
+#define ICH_FLASH_HSFSTS 0x0004
+#define ICH_FLASH_HSFCTL 0x0006
+#define ICH_FLASH_FADDR 0x0008
+#define ICH_FLASH_FDATA0 0x0010
/* Requires up to 10 seconds when MNG might be accessing part. */
-#define ICH_FLASH_READ_COMMAND_TIMEOUT 10000000
-#define ICH_FLASH_WRITE_COMMAND_TIMEOUT 10000000
-#define ICH_FLASH_ERASE_COMMAND_TIMEOUT 10000000
-#define ICH_FLASH_LINEAR_ADDR_MASK 0x00FFFFFF
-#define ICH_FLASH_CYCLE_REPEAT_COUNT 10
+#define ICH_FLASH_READ_COMMAND_TIMEOUT 10000000
+#define ICH_FLASH_WRITE_COMMAND_TIMEOUT 10000000
+#define ICH_FLASH_ERASE_COMMAND_TIMEOUT 10000000
+#define ICH_FLASH_LINEAR_ADDR_MASK 0x00FFFFFF
+#define ICH_FLASH_CYCLE_REPEAT_COUNT 10
-#define ICH_CYCLE_READ 0
-#define ICH_CYCLE_WRITE 2
-#define ICH_CYCLE_ERASE 3
+#define ICH_CYCLE_READ 0
+#define ICH_CYCLE_WRITE 2
+#define ICH_CYCLE_ERASE 3
-#define FLASH_GFPREG_BASE_MASK 0x1FFF
-#define FLASH_SECTOR_ADDR_SHIFT 12
+#define FLASH_GFPREG_BASE_MASK 0x1FFF
+#define FLASH_SECTOR_ADDR_SHIFT 12
-#define ICH_FLASH_SEG_SIZE_256 256
-#define ICH_FLASH_SEG_SIZE_4K 4096
-#define ICH_FLASH_SEG_SIZE_8K 8192
-#define ICH_FLASH_SEG_SIZE_64K 65536
-#define ICH_FLASH_SECTOR_SIZE 4096
+#define ICH_FLASH_SEG_SIZE_256 256
+#define ICH_FLASH_SEG_SIZE_4K 4096
+#define ICH_FLASH_SEG_SIZE_8K 8192
+#define ICH_FLASH_SEG_SIZE_64K 65536
+#define ICH_FLASH_SECTOR_SIZE 4096
-#define ICH_FLASH_REG_MAPSIZE 0x00A0
+#define ICH_FLASH_REG_MAPSIZE 0x00A0
-#define E1000_ICH_FWSM_RSPCIPHY 0x00000040 /* Reset PHY on PCI Reset */
-#define E1000_ICH_FWSM_DISSW 0x10000000 /* FW Disables SW Writes */
+#define E1000_ICH_FWSM_RSPCIPHY 0x00000040 /* Reset PHY on PCI Reset */
+#define E1000_ICH_FWSM_DISSW 0x10000000 /* FW Disables SW Writes */
/* FW established a valid mode */
-#define E1000_ICH_FWSM_FW_VALID 0x00008000
+#define E1000_ICH_FWSM_FW_VALID 0x00008000
+#define E1000_ICH_FWSM_PCIM2PCI 0x01000000 /* ME PCIm-to-PCI active */
+#define E1000_ICH_FWSM_PCIM2PCI_COUNT 2000
-#define E1000_ICH_MNG_IAMT_MODE 0x2
+#define E1000_ICH_MNG_IAMT_MODE 0x2
-#define E1000_FWSM_PROXY_MODE 0x00000008 /* FW is in proxy mode */
+#define E1000_FWSM_PROXY_MODE 0x00000008 /* FW is in proxy mode */
+#define E1000_FWSM_MEMC 0x00000010 /* ME Messaging capable */
/* Shared Receive Address Registers */
-#define E1000_SHRAL(_i) (0x05438 + ((_i) * 8))
-#define E1000_SHRAH(_i) (0x0543C + ((_i) * 8))
-#define E1000_SHRAH_AV 0x80000000 /* Addr Valid bit */
-#define E1000_SHRAH_MAV 0x40000000 /* Multicast Addr Valid bit */
-
-#define E1000_H2ME 0x05B50 /* Host to ME */
-#define E1000_H2ME_LSECREQ 0x00000001 /* Linksec Request */
-#define E1000_H2ME_LSECA 0x00000002 /* Linksec Active */
-#define E1000_H2ME_LSECSF 0x00000004 /* Linksec Failed */
-#define E1000_H2ME_LSECD 0x00000008 /* Linksec Disabled */
-#define E1000_H2ME_SLCAPD 0x00000010 /* Start LCAPD */
-#define E1000_H2ME_IPV4_ARP_EN 0x00000020 /* Arp Offload enable bit */
-#define E1000_H2ME_IPV6_NS_EN 0x00000040 /* NS Offload enable bit */
-
-#define ID_LED_DEFAULT_ICH8LAN ((ID_LED_DEF1_DEF2 << 12) | \
- (ID_LED_OFF1_OFF2 << 8) | \
- (ID_LED_OFF1_ON2 << 4) | \
- (ID_LED_DEF1_DEF2))
-
-#define E1000_ICH_NVM_SIG_WORD 0x13
-#define E1000_ICH_NVM_SIG_MASK 0xC000
-#define E1000_ICH_NVM_VALID_SIG_MASK 0xC0
-#define E1000_ICH_NVM_SIG_VALUE 0x80
-
-#define E1000_ICH8_LAN_INIT_TIMEOUT 1500
-
-#define E1000_FEXTNVM_SW_CONFIG 1
-#define E1000_FEXTNVM_SW_CONFIG_ICH8M (1 << 27) /* Bit redefined for ICH8M */
-
-#define E1000_FEXTNVM4_BEACON_DURATION_MASK 0x7
-#define E1000_FEXTNVM4_BEACON_DURATION_8USEC 0x7
-#define E1000_FEXTNVM4_BEACON_DURATION_16USEC 0x3
-
-#define PCIE_ICH8_SNOOP_ALL PCIE_NO_SNOOP_ALL
-
-#define E1000_ICH_RAR_ENTRIES 7
-#define E1000_PCH2_RAR_ENTRIES 5 /* RAR[0], SHRA[0-3] */
-
-#define PHY_PAGE_SHIFT 5
-#define PHY_REG(page, reg) (((page) << PHY_PAGE_SHIFT) | \
- ((reg) & MAX_PHY_REG_ADDRESS))
-#define IGP3_KMRN_DIAG PHY_REG(770, 19) /* KMRN Diagnostic */
-#define IGP3_VR_CTRL PHY_REG(776, 18) /* Voltage Regulator Control */
-#define IGP3_CAPABILITY PHY_REG(776, 19) /* Capability */
-#define IGP3_PM_CTRL PHY_REG(769, 20) /* Power Management Control */
-
-#define IGP3_KMRN_DIAG_PCS_LOCK_LOSS 0x0002
-#define IGP3_VR_CTRL_DEV_POWERDOWN_MODE_MASK 0x0300
-#define IGP3_VR_CTRL_MODE_SHUTDOWN 0x0200
-#define IGP3_PM_CTRL_FORCE_PWR_DOWN 0x0020
+#define E1000_SHRAL(_i) (0x05438 + ((_i) * 8))
+#define E1000_SHRAH(_i) (0x0543C + ((_i) * 8))
+#define E1000_SHRAH_AV 0x80000000 /* Addr Valid bit */
+#define E1000_SHRAH_MAV 0x40000000 /* Multicast Addr Valid bit */
+
+#define E1000_H2ME 0x05B50 /* Host to ME */
+#define E1000_H2ME_LSECREQ 0x00000001 /* Linksec Request */
+#define E1000_H2ME_LSECA 0x00000002 /* Linksec Active */
+#define E1000_H2ME_LSECSF 0x00000004 /* Linksec Failed */
+#define E1000_H2ME_LSECD 0x00000008 /* Linksec Disabled */
+#define E1000_H2ME_SLCAPD 0x00000010 /* Start LCAPD */
+#define E1000_H2ME_IPV4_ARP_EN 0x00000020 /* Arp Offload enable bit */
+#define E1000_H2ME_IPV6_NS_EN 0x00000040 /* NS Offload enable bit */
+
+#define ID_LED_DEFAULT_ICH8LAN ((ID_LED_DEF1_DEF2 << 12) | \
+ (ID_LED_OFF1_OFF2 << 8) | \
+ (ID_LED_OFF1_ON2 << 4) | \
+ (ID_LED_DEF1_DEF2))
+
+#define E1000_ICH_NVM_SIG_WORD 0x13
+#define E1000_ICH_NVM_SIG_MASK 0xC000
+#define E1000_ICH_NVM_VALID_SIG_MASK 0xC0
+#define E1000_ICH_NVM_SIG_VALUE 0x80
+
+#define E1000_ICH8_LAN_INIT_TIMEOUT 1500
+
+#define E1000_FEXTNVM_SW_CONFIG 1
+#define E1000_FEXTNVM_SW_CONFIG_ICH8M (1 << 27) /* Bit redefined for ICH8M */
+
+#define E1000_FEXTNVM4_BEACON_DURATION_MASK 0x7
+#define E1000_FEXTNVM4_BEACON_DURATION_8USEC 0x7
+#define E1000_FEXTNVM4_BEACON_DURATION_16USEC 0x3
+
+#define PCIE_ICH8_SNOOP_ALL PCIE_NO_SNOOP_ALL
+
+#define E1000_ICH_RAR_ENTRIES 7
+#define E1000_PCH2_RAR_ENTRIES 5 /* RAR[0], SHRA[0-3] */
+
+#define PHY_PAGE_SHIFT 5
+#define PHY_REG(page, reg) (((page) << PHY_PAGE_SHIFT) | \
+ ((reg) & MAX_PHY_REG_ADDRESS))
+#define IGP3_KMRN_DIAG PHY_REG(770, 19) /* KMRN Diagnostic */
+#define IGP3_VR_CTRL PHY_REG(776, 18) /* Voltage Regulator Control */
+#define IGP3_CAPABILITY PHY_REG(776, 19) /* Capability */
+#define IGP3_PM_CTRL PHY_REG(769, 20) /* Power Management Control */
+
+#define IGP3_KMRN_DIAG_PCS_LOCK_LOSS 0x0002
+#define IGP3_VR_CTRL_DEV_POWERDOWN_MODE_MASK 0x0300
+#define IGP3_VR_CTRL_MODE_SHUTDOWN 0x0200
+#define IGP3_PM_CTRL_FORCE_PWR_DOWN 0x0020
/* PHY Wakeup Registers and defines */
-#define BM_RCTL PHY_REG(BM_WUC_PAGE, 0)
-#define BM_WUC PHY_REG(BM_WUC_PAGE, 1)
-#define BM_WUFC PHY_REG(BM_WUC_PAGE, 2)
-#define BM_WUS PHY_REG(BM_WUC_PAGE, 3)
-#define BM_RAR_L(_i) (BM_PHY_REG(BM_WUC_PAGE, 16 + ((_i) << 2)))
-#define BM_RAR_M(_i) (BM_PHY_REG(BM_WUC_PAGE, 17 + ((_i) << 2)))
-#define BM_RAR_H(_i) (BM_PHY_REG(BM_WUC_PAGE, 18 + ((_i) << 2)))
-#define BM_RAR_CTRL(_i) (BM_PHY_REG(BM_WUC_PAGE, 19 + ((_i) << 2)))
-#define BM_MTA(_i) (BM_PHY_REG(BM_WUC_PAGE, 128 + ((_i) << 1)))
-#define BM_IPAV (BM_PHY_REG(BM_WUC_PAGE, 64))
-#define BM_IP4AT_L(_i) (BM_PHY_REG(BM_WUC_PAGE, 82 + ((_i) * 2)))
-#define BM_IP4AT_H(_i) (BM_PHY_REG(BM_WUC_PAGE, 83 + ((_i) * 2)))
-
-#define BM_SHRAL_LOWER(_i) (BM_PHY_REG(BM_WUC_PAGE, 44 + ((_i) * 4)))
-#define BM_SHRAL_UPPER(_i) (BM_PHY_REG(BM_WUC_PAGE, 45 + ((_i) * 4)))
-#define BM_SHRAH_LOWER(_i) (BM_PHY_REG(BM_WUC_PAGE, 46 + ((_i) * 4)))
-#define BM_SHRAH_UPPER(_i) (BM_PHY_REG(BM_WUC_PAGE, 47 + ((_i) * 4)))
-
-#define BM_RCTL_UPE 0x0001 /* Unicast Promiscuous Mode */
-#define BM_RCTL_MPE 0x0002 /* Multicast Promiscuous Mode */
-#define BM_RCTL_MO_SHIFT 3 /* Multicast Offset Shift */
-#define BM_RCTL_MO_MASK (3 << 3) /* Multicast Offset Mask */
-#define BM_RCTL_BAM 0x0020 /* Broadcast Accept Mode */
-#define BM_RCTL_PMCF 0x0040 /* Pass MAC Control Frames */
-#define BM_RCTL_RFCE 0x0080 /* Rx Flow Control Enable */
-
-#define HV_LED_CONFIG PHY_REG(768, 30) /* LED Configuration */
-#define HV_MUX_DATA_CTRL PHY_REG(776, 16)
-#define HV_MUX_DATA_CTRL_GEN_TO_MAC 0x0400
-#define HV_MUX_DATA_CTRL_FORCE_SPEED 0x0004
-#define HV_SCC_UPPER PHY_REG(778, 16) /* Single Collision Count */
-#define HV_SCC_LOWER PHY_REG(778, 17)
-#define HV_ECOL_UPPER PHY_REG(778, 18) /* Excessive Collision Count */
-#define HV_ECOL_LOWER PHY_REG(778, 19)
-#define HV_MCC_UPPER PHY_REG(778, 20) /* Multiple Collision Count */
-#define HV_MCC_LOWER PHY_REG(778, 21)
-#define HV_LATECOL_UPPER PHY_REG(778, 23) /* Late Collision Count */
-#define HV_LATECOL_LOWER PHY_REG(778, 24)
-#define HV_COLC_UPPER PHY_REG(778, 25) /* Collision Count */
-#define HV_COLC_LOWER PHY_REG(778, 26)
-#define HV_DC_UPPER PHY_REG(778, 27) /* Defer Count */
-#define HV_DC_LOWER PHY_REG(778, 28)
-#define HV_TNCRS_UPPER PHY_REG(778, 29) /* Transmit with no CRS */
-#define HV_TNCRS_LOWER PHY_REG(778, 30)
-
-#define E1000_FCRTV_PCH 0x05F40 /* PCH Flow Control Refresh Timer Value */
-
-#define E1000_NVM_K1_CONFIG 0x1B /* NVM K1 Config Word */
-#define E1000_NVM_K1_ENABLE 0x1 /* NVM Enable K1 bit */
+#define BM_PORT_GEN_CFG PHY_REG(BM_PORT_CTRL_PAGE, 17)
+#define BM_RCTL PHY_REG(BM_WUC_PAGE, 0)
+#define BM_WUC PHY_REG(BM_WUC_PAGE, 1)
+#define BM_WUFC PHY_REG(BM_WUC_PAGE, 2)
+#define BM_WUS PHY_REG(BM_WUC_PAGE, 3)
+#define BM_RAR_L(_i) (BM_PHY_REG(BM_WUC_PAGE, 16 + ((_i) << 2)))
+#define BM_RAR_M(_i) (BM_PHY_REG(BM_WUC_PAGE, 17 + ((_i) << 2)))
+#define BM_RAR_H(_i) (BM_PHY_REG(BM_WUC_PAGE, 18 + ((_i) << 2)))
+#define BM_RAR_CTRL(_i) (BM_PHY_REG(BM_WUC_PAGE, 19 + ((_i) << 2)))
+#define BM_MTA(_i) (BM_PHY_REG(BM_WUC_PAGE, 128 + ((_i) << 1)))
+#define BM_IPAV (BM_PHY_REG(BM_WUC_PAGE, 64))
+#define BM_IP4AT_L(_i) (BM_PHY_REG(BM_WUC_PAGE, 82 + ((_i) * 2)))
+#define BM_IP4AT_H(_i) (BM_PHY_REG(BM_WUC_PAGE, 83 + ((_i) * 2)))
+
+#define BM_SHRAL_LOWER(_i) (BM_PHY_REG(BM_WUC_PAGE, 44 + ((_i) * 4)))
+#define BM_SHRAL_UPPER(_i) (BM_PHY_REG(BM_WUC_PAGE, 45 + ((_i) * 4)))
+#define BM_SHRAH_LOWER(_i) (BM_PHY_REG(BM_WUC_PAGE, 46 + ((_i) * 4)))
+#define BM_SHRAH_UPPER(_i) (BM_PHY_REG(BM_WUC_PAGE, 47 + ((_i) * 4)))
+
+#define BM_RCTL_UPE 0x0001 /* Unicast Promiscuous Mode */
+#define BM_RCTL_MPE 0x0002 /* Multicast Promiscuous Mode */
+#define BM_RCTL_MO_SHIFT 3 /* Multicast Offset Shift */
+#define BM_RCTL_MO_MASK (3 << 3) /* Multicast Offset Mask */
+#define BM_RCTL_BAM 0x0020 /* Broadcast Accept Mode */
+#define BM_RCTL_PMCF 0x0040 /* Pass MAC Control Frames */
+#define BM_RCTL_RFCE 0x0080 /* Rx Flow Control Enable */
+
+#define HV_LED_CONFIG PHY_REG(768, 30) /* LED Configuration */
+#define HV_MUX_DATA_CTRL PHY_REG(776, 16)
+#define HV_MUX_DATA_CTRL_GEN_TO_MAC 0x0400
+#define HV_MUX_DATA_CTRL_FORCE_SPEED 0x0004
+#define HV_STATS_PAGE 778
+#define HV_SCC_UPPER PHY_REG(HV_STATS_PAGE, 16) /* Single Collision Count */
+#define HV_SCC_LOWER PHY_REG(HV_STATS_PAGE, 17)
+#define HV_ECOL_UPPER PHY_REG(HV_STATS_PAGE, 18) /* Excessive Coll. Count */
+#define HV_ECOL_LOWER PHY_REG(HV_STATS_PAGE, 19)
+#define HV_MCC_UPPER PHY_REG(HV_STATS_PAGE, 20) /* Multiple Coll. Count */
+#define HV_MCC_LOWER PHY_REG(HV_STATS_PAGE, 21)
+#define HV_LATECOL_UPPER PHY_REG(HV_STATS_PAGE, 23) /* Late Collision Count */
+#define HV_LATECOL_LOWER PHY_REG(HV_STATS_PAGE, 24)
+#define HV_COLC_UPPER PHY_REG(HV_STATS_PAGE, 25) /* Collision Count */
+#define HV_COLC_LOWER PHY_REG(HV_STATS_PAGE, 26)
+#define HV_DC_UPPER PHY_REG(HV_STATS_PAGE, 27) /* Defer Count */
+#define HV_DC_LOWER PHY_REG(HV_STATS_PAGE, 28)
+#define HV_TNCRS_UPPER PHY_REG(HV_STATS_PAGE, 29) /* Transmit with no CRS */
+#define HV_TNCRS_LOWER PHY_REG(HV_STATS_PAGE, 30)
+
+#define E1000_FCRTV_PCH 0x05F40 /* PCH Flow Control Refresh Timer Value */
+
+/*
+ * For ICH, the name used for NVM word 17h is LED1 Config.
+ * For PCH, the word was re-named to OEM Config.
+ */
+#define E1000_NVM_LED1_CONFIG 0x17 /* NVM LED1/LPLU Config Word */
+#define E1000_NVM_LED1_CONFIG_LPLU_NONDOA 0x0400 /* NVM LPLU in non-D0a Bit */
+#define E1000_NVM_OEM_CONFIG E1000_NVM_LED1_CONFIG
+#define E1000_NVM_OEM_CONFIG_LPLU_NONDOA E1000_NVM_LED1_CONFIG_LPLU_NONDOA
+
+#define E1000_NVM_K1_CONFIG 0x1B /* NVM K1 Config Word */
+#define E1000_NVM_K1_ENABLE 0x1 /* NVM Enable K1 bit */
/* SMBus Address Phy Register */
-#define HV_SMB_ADDR PHY_REG(768, 26)
-#define HV_SMB_ADDR_MASK 0x007F
-#define HV_SMB_ADDR_PEC_EN 0x0200
-#define HV_SMB_ADDR_VALID 0x0080
+#define HV_SMB_ADDR PHY_REG(768, 26)
+#define HV_SMB_ADDR_MASK 0x007F
+#define HV_SMB_ADDR_PEC_EN 0x0200
+#define HV_SMB_ADDR_VALID 0x0080
/* Strapping Option Register - RO */
-#define E1000_STRAP 0x0000C
-#define E1000_STRAP_SMBUS_ADDRESS_MASK 0x00FE0000
-#define E1000_STRAP_SMBUS_ADDRESS_SHIFT 17
+#define E1000_STRAP 0x0000C
+#define E1000_STRAP_SMBUS_ADDRESS_MASK 0x00FE0000
+#define E1000_STRAP_SMBUS_ADDRESS_SHIFT 17
/* OEM Bits Phy Register */
-#define HV_OEM_BITS PHY_REG(768, 25)
-#define HV_OEM_BITS_LPLU 0x0004 /* Low Power Link Up */
-#define HV_OEM_BITS_GBE_DIS 0x0040 /* Gigabit Disable */
-#define HV_OEM_BITS_RESTART_AN 0x0400 /* Restart Auto-negotiation */
+#define HV_OEM_BITS PHY_REG(768, 25)
+#define HV_OEM_BITS_LPLU 0x0004 /* Low Power Link Up */
+#define HV_OEM_BITS_GBE_DIS 0x0040 /* Gigabit Disable */
+#define HV_OEM_BITS_RESTART_AN 0x0400 /* Restart Auto-negotiation */
-#define LCD_CFG_PHY_ADDR_BIT 0x0020 /* Phy address bit from LCD Config word */
+#define LCD_CFG_PHY_ADDR_BIT 0x0020 /* Phy addr bit from LCD Config word */
/* KMRN Mode Control */
-#define HV_KMRN_MODE_CTRL PHY_REG(769, 16)
-#define HV_KMRN_MDIO_SLOW 0x0400
+#define HV_KMRN_MODE_CTRL PHY_REG(769, 16)
+#define HV_KMRN_MDIO_SLOW 0x0400
+
+/* KMRN FIFO Control and Status */
+#define HV_KMRN_FIFO_CTRLSTA PHY_REG(770, 16)
+#define HV_KMRN_FIFO_CTRLSTA_PREAMBLE_MASK 0x7000
+#define HV_KMRN_FIFO_CTRLSTA_PREAMBLE_SHIFT 12
/* PHY Power Management Control */
-#define HV_PM_CTRL PHY_REG(770, 17)
+#define HV_PM_CTRL PHY_REG(770, 17)
-#define SW_FLAG_TIMEOUT 1000 /* SW Semaphore flag timeout in milliseconds */
+#define SW_FLAG_TIMEOUT 1000 /* SW Semaphore flag timeout in ms */
/* PHY Low Power Idle Control */
-#define I82579_LPI_CTRL PHY_REG(772, 20)
-#define I82579_LPI_CTRL_ENABLE_MASK 0x6000
+#define I82579_LPI_CTRL PHY_REG(772, 20)
+#define I82579_LPI_CTRL_ENABLE_MASK 0x6000
+#define I82579_LPI_CTRL_FORCE_PLL_LOCK_COUNT 0x80
/* EMI Registers */
-#define I82579_EMI_ADDR 0x10
-#define I82579_EMI_DATA 0x11
-#define I82579_LPI_UPDATE_TIMER 0x4805 /* in 40ns units + 40 ns base value */
+#define I82579_EMI_ADDR 0x10
+#define I82579_EMI_DATA 0x11
+#define I82579_LPI_UPDATE_TIMER 0x4805 /* in 40ns units + 40 ns base value */
+#define I82579_MSE_THRESHOLD 0x084F /* Mean Square Error Threshold */
+#define I82579_MSE_LINK_DOWN 0x2411 /* MSE count before dropping link */
/*
* Additional interrupts need to be handled for ICH family:
@@ -219,33 +241,32 @@
* EPRST = Manageability reset event
*/
#define IMS_ICH_ENABLE_MASK (\
- E1000_IMS_DSW | \
- E1000_IMS_PHYINT | \
- E1000_IMS_EPRST)
+ E1000_IMS_DSW | \
+ E1000_IMS_PHYINT | \
+ E1000_IMS_EPRST)
/* Additional interrupt register bit definitions */
-#define E1000_ICR_LSECPNC 0x00004000 /* PN threshold - client */
-#define E1000_IMS_LSECPNC E1000_ICR_LSECPNC /* PN threshold - client */
-#define E1000_ICS_LSECPNC E1000_ICR_LSECPNC /* PN threshold - client */
+#define E1000_ICR_LSECPNC 0x00004000 /* PN threshold - client */
+#define E1000_IMS_LSECPNC E1000_ICR_LSECPNC /* PN threshold - client */
+#define E1000_ICS_LSECPNC E1000_ICR_LSECPNC /* PN threshold - client */
/* Security Processing bit Indication */
-#define E1000_RXDEXT_LINKSEC_STATUS_LSECH 0x01000000
-#define E1000_RXDEXT_LINKSEC_ERROR_BIT_MASK 0x60000000
-#define E1000_RXDEXT_LINKSEC_ERROR_NO_SA_MATCH 0x20000000
-#define E1000_RXDEXT_LINKSEC_ERROR_REPLAY_ERROR 0x40000000
-#define E1000_RXDEXT_LINKSEC_ERROR_BAD_SIG 0x60000000
+#define E1000_RXDEXT_LINKSEC_STATUS_LSECH 0x01000000
+#define E1000_RXDEXT_LINKSEC_ERROR_BIT_MASK 0x60000000
+#define E1000_RXDEXT_LINKSEC_ERROR_NO_SA_MATCH 0x20000000
+#define E1000_RXDEXT_LINKSEC_ERROR_REPLAY_ERROR 0x40000000
+#define E1000_RXDEXT_LINKSEC_ERROR_BAD_SIG 0x60000000
/* Receive Address Initial CRC Calculation */
-#define E1000_PCH_RAICC(_n) (0x05F50 + ((_n) * 4))
+#define E1000_PCH_RAICC(_n) (0x05F50 + ((_n) * 4))
void e1000_set_kmrn_lock_loss_workaround_ich8lan(struct e1000_hw *hw,
- bool state);
+ bool state);
void e1000_igp3_phy_powerdown_workaround_ich8lan(struct e1000_hw *hw);
void e1000_gig_downshift_workaround_ich8lan(struct e1000_hw *hw);
-void e1000_disable_gig_wol_ich8lan(struct e1000_hw *hw);
+void e1000_suspend_workarounds_ich8lan(struct e1000_hw *hw);
+void e1000_resume_workarounds_pchlan(struct e1000_hw *hw);
s32 e1000_configure_k1_ich8lan(struct e1000_hw *hw, bool k1_enable);
-s32 e1000_oem_bits_config_ich8lan(struct e1000_hw *hw, bool d0_config);
-s32 e1000_hv_phy_powerdown_workaround_ich8lan(struct e1000_hw *hw);
void e1000_copy_rx_addrs_to_phy_ich8lan(struct e1000_hw *hw);
s32 e1000_lv_jumbo_workaround_ich8lan(struct e1000_hw *hw, bool enable);
#endif
diff --git a/sys/dev/e1000/e1000_mac.c b/sys/dev/e1000/e1000_mac.c
index b29a38a..4fc2a7c 100644
--- a/sys/dev/e1000/e1000_mac.c
+++ b/sys/dev/e1000/e1000_mac.c
@@ -1,6 +1,6 @@
/******************************************************************************
- Copyright (c) 2001-2010, Intel Corporation
+ Copyright (c) 2001-2011, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -177,8 +177,8 @@ s32 e1000_get_bus_info_pci_generic(struct e1000_hw *hw)
/* Bus speed */
if (bus->type == e1000_bus_type_pci) {
bus->speed = (status & E1000_STATUS_PCI66)
- ? e1000_bus_speed_66
- : e1000_bus_speed_33;
+ ? e1000_bus_speed_66
+ : e1000_bus_speed_33;
} else {
switch (status & E1000_STATUS_PCIX_SPEED) {
case E1000_STATUS_PCIX_SPEED_66:
@@ -198,8 +198,8 @@ s32 e1000_get_bus_info_pci_generic(struct e1000_hw *hw)
/* Bus width */
bus->width = (status & E1000_STATUS_BUS64)
- ? e1000_bus_width_64
- : e1000_bus_width_32;
+ ? e1000_bus_width_64
+ : e1000_bus_width_32;
/* Which PCI(-X) function? */
mac->ops.set_lan_id(hw);
@@ -226,9 +226,8 @@ s32 e1000_get_bus_info_pcie_generic(struct e1000_hw *hw)
bus->type = e1000_bus_type_pci_express;
- ret_val = e1000_read_pcie_cap_reg(hw,
- PCIE_LINK_STATUS,
- &pcie_link_status);
+ ret_val = e1000_read_pcie_cap_reg(hw, PCIE_LINK_STATUS,
+ &pcie_link_status);
if (ret_val) {
bus->width = e1000_bus_width_unknown;
bus->speed = e1000_bus_speed_unknown;
@@ -246,8 +245,7 @@ s32 e1000_get_bus_info_pcie_generic(struct e1000_hw *hw)
}
bus->width = (enum e1000_bus_width)((pcie_link_status &
- PCIE_LINK_WIDTH_MASK) >>
- PCIE_LINK_WIDTH_SHIFT);
+ PCIE_LINK_WIDTH_MASK) >> PCIE_LINK_WIDTH_SHIFT);
}
mac->ops.set_lan_id(hw);
@@ -292,7 +290,7 @@ void e1000_set_lan_id_multi_port_pci(struct e1000_hw *hw)
if (pci_header_type & PCI_HEADER_TYPE_MULTIFUNC) {
status = E1000_READ_REG(hw, E1000_STATUS);
bus->func = (status & E1000_STATUS_FUNC_MASK)
- >> E1000_STATUS_FUNC_SHIFT;
+ >> E1000_STATUS_FUNC_SHIFT;
} else {
bus->func = 0;
}
@@ -352,7 +350,7 @@ void e1000_write_vfta_generic(struct e1000_hw *hw, u32 offset, u32 value)
* @hw: pointer to the HW structure
* @rar_count: receive address registers
*
- * Setups the receive address registers by setting the base receive address
+ * Setup the receive address registers by setting the base receive address
* register to the devices MAC address and clearing all the other receive
* address registers to 0.
**/
@@ -399,23 +397,28 @@ s32 e1000_check_alt_mac_addr_generic(struct e1000_hw *hw)
if (ret_val)
goto out;
- /* Check for LOM (vs. NIC) or one of two valid mezzanine cards */
- if (!((nvm_data & NVM_COMPAT_LOM) ||
- (hw->device_id == E1000_DEV_ID_82571EB_SERDES_DUAL) ||
- (hw->device_id == E1000_DEV_ID_82571EB_SERDES_QUAD)))
+ /* not supported on older hardware or 82573 */
+ if ((hw->mac.type < e1000_82571) || (hw->mac.type == e1000_82573))
+ goto out;
+
+ /*
+ * Alternate MAC address is handled by the option ROM for 82580
+ * and newer. SW support not required.
+ */
+ if (hw->mac.type >= e1000_82580)
goto out;
ret_val = hw->nvm.ops.read(hw, NVM_ALT_MAC_ADDR_PTR, 1,
- &nvm_alt_mac_addr_offset);
+ &nvm_alt_mac_addr_offset);
if (ret_val) {
DEBUGOUT("NVM Read Error\n");
goto out;
}
- if (nvm_alt_mac_addr_offset == 0xFFFF) {
+ if ((nvm_alt_mac_addr_offset == 0xFFFF) ||
+ (nvm_alt_mac_addr_offset == 0x0000))
/* There is no Alternate MAC Address */
goto out;
- }
if (hw->bus.func == E1000_FUNC_1)
nvm_alt_mac_addr_offset += E1000_ALT_MAC_ADDRESS_OFFSET_LAN1;
@@ -472,9 +475,8 @@ void e1000_rar_set_generic(struct e1000_hw *hw, u8 *addr, u32 index)
* HW expects these in little endian so we reverse the byte order
* from network order (big endian) to little endian
*/
- rar_low = ((u32) addr[0] |
- ((u32) addr[1] << 8) |
- ((u32) addr[2] << 16) | ((u32) addr[3] << 24));
+ rar_low = ((u32) addr[0] | ((u32) addr[1] << 8) |
+ ((u32) addr[2] << 16) | ((u32) addr[3] << 24));
rar_high = ((u32) addr[4] | ((u32) addr[5] << 8));
@@ -503,7 +505,7 @@ void e1000_rar_set_generic(struct e1000_hw *hw, u8 *addr, u32 index)
* The caller must have a packed mc_addr_list of multicast addresses.
**/
void e1000_update_mc_addr_list_generic(struct e1000_hw *hw,
- u8 *mc_addr_list, u32 mc_addr_count)
+ u8 *mc_addr_list, u32 mc_addr_count)
{
u32 hash_value, hash_bit, hash_reg;
int i;
@@ -574,7 +576,7 @@ u32 e1000_hash_mc_addr_generic(struct e1000_hw *hw, u8 *mc_addr)
* values resulting from each mc_filter_type...
* [0] [1] [2] [3] [4] [5]
* 01 AA 00 12 34 56
- * LSB MSB
+ * LSB MSB
*
* case 0: hash_value = ((0x34 >> 4) | (0x56 << 4)) & 0xFFF = 0x563
* case 1: hash_value = ((0x34 >> 3) | (0x56 << 5)) & 0xFFF = 0xAC6
@@ -597,7 +599,7 @@ u32 e1000_hash_mc_addr_generic(struct e1000_hw *hw, u8 *mc_addr)
}
hash_value = hash_mask & (((mc_addr[4] >> (8 - bit_shift)) |
- (((u16) mc_addr[5]) << bit_shift)));
+ (((u16) mc_addr[5]) << bit_shift)));
return hash_value;
}
@@ -627,9 +629,9 @@ void e1000_pcix_mmrbc_workaround_generic(struct e1000_hw *hw)
e1000_read_pci_cfg(hw, PCIX_COMMAND_REGISTER, &pcix_cmd);
e1000_read_pci_cfg(hw, PCIX_STATUS_REGISTER_HI, &pcix_stat_hi_word);
cmd_mmrbc = (pcix_cmd & PCIX_COMMAND_MMRBC_MASK) >>
- PCIX_COMMAND_MMRBC_SHIFT;
+ PCIX_COMMAND_MMRBC_SHIFT;
stat_mmrbc = (pcix_stat_hi_word & PCIX_STATUS_HI_MMRBC_MASK) >>
- PCIX_STATUS_HI_MMRBC_SHIFT;
+ PCIX_STATUS_HI_MMRBC_SHIFT;
if (stat_mmrbc == PCIX_STATUS_HI_MMRBC_4K)
stat_mmrbc = PCIX_STATUS_HI_MMRBC_2K;
if (cmd_mmrbc > stat_mmrbc) {
@@ -926,12 +928,10 @@ s32 e1000_check_for_serdes_link_generic(struct e1000_hw *hw)
if (rxcw & E1000_RXCW_SYNCH) {
if (!(rxcw & E1000_RXCW_IV)) {
mac->serdes_has_link = TRUE;
- DEBUGOUT("SERDES: Link up - autoneg "
- "completed sucessfully.\n");
+ DEBUGOUT("SERDES: Link up - autoneg completed successfully.\n");
} else {
mac->serdes_has_link = FALSE;
- DEBUGOUT("SERDES: Link down - invalid"
- "codewords detected in autoneg.\n");
+ DEBUGOUT("SERDES: Link down - invalid codewords detected in autoneg.\n");
}
} else {
mac->serdes_has_link = FALSE;
@@ -1423,8 +1423,7 @@ s32 e1000_config_fc_after_link_up_generic(struct e1000_hw *hw)
goto out;
if (!(mii_status_reg & MII_SR_AUTONEG_COMPLETE)) {
- DEBUGOUT("Copper PHY and Auto Neg "
- "has not completed.\n");
+ DEBUGOUT("Copper PHY and Auto Neg has not completed.\n");
goto out;
}
@@ -1436,11 +1435,11 @@ s32 e1000_config_fc_after_link_up_generic(struct e1000_hw *hw)
* flow control was negotiated.
*/
ret_val = hw->phy.ops.read_reg(hw, PHY_AUTONEG_ADV,
- &mii_nway_adv_reg);
+ &mii_nway_adv_reg);
if (ret_val)
goto out;
ret_val = hw->phy.ops.read_reg(hw, PHY_LP_ABILITY,
- &mii_nway_lp_ability_reg);
+ &mii_nway_lp_ability_reg);
if (ret_val)
goto out;
@@ -1485,15 +1484,14 @@ s32 e1000_config_fc_after_link_up_generic(struct e1000_hw *hw)
* of pause frames. In this case, we had to advertise
* FULL flow control because we could not advertise Rx
* ONLY. Hence, we must now check to see if we need to
- * turn OFF the TRANSMISSION of PAUSE frames.
+ * turn OFF the TRANSMISSION of PAUSE frames.
*/
if (hw->fc.requested_mode == e1000_fc_full) {
hw->fc.current_mode = e1000_fc_full;
- DEBUGOUT("Flow Control = FULL.\r\n");
+ DEBUGOUT("Flow Control = FULL.\n");
} else {
hw->fc.current_mode = e1000_fc_rx_pause;
- DEBUGOUT("Flow Control = "
- "Rx PAUSE frames only.\r\n");
+ DEBUGOUT("Flow Control = Rx PAUSE frames only.\n");
}
}
/*
@@ -1505,11 +1503,11 @@ s32 e1000_config_fc_after_link_up_generic(struct e1000_hw *hw)
* 0 | 1 | 1 | 1 | e1000_fc_tx_pause
*/
else if (!(mii_nway_adv_reg & NWAY_AR_PAUSE) &&
- (mii_nway_adv_reg & NWAY_AR_ASM_DIR) &&
- (mii_nway_lp_ability_reg & NWAY_LPAR_PAUSE) &&
- (mii_nway_lp_ability_reg & NWAY_LPAR_ASM_DIR)) {
+ (mii_nway_adv_reg & NWAY_AR_ASM_DIR) &&
+ (mii_nway_lp_ability_reg & NWAY_LPAR_PAUSE) &&
+ (mii_nway_lp_ability_reg & NWAY_LPAR_ASM_DIR)) {
hw->fc.current_mode = e1000_fc_tx_pause;
- DEBUGOUT("Flow Control = Tx PAUSE frames only.\r\n");
+ DEBUGOUT("Flow Control = Tx PAUSE frames only.\n");
}
/*
* For transmitting PAUSE frames ONLY.
@@ -1520,18 +1518,18 @@ s32 e1000_config_fc_after_link_up_generic(struct e1000_hw *hw)
* 1 | 1 | 0 | 1 | e1000_fc_rx_pause
*/
else if ((mii_nway_adv_reg & NWAY_AR_PAUSE) &&
- (mii_nway_adv_reg & NWAY_AR_ASM_DIR) &&
- !(mii_nway_lp_ability_reg & NWAY_LPAR_PAUSE) &&
- (mii_nway_lp_ability_reg & NWAY_LPAR_ASM_DIR)) {
+ (mii_nway_adv_reg & NWAY_AR_ASM_DIR) &&
+ !(mii_nway_lp_ability_reg & NWAY_LPAR_PAUSE) &&
+ (mii_nway_lp_ability_reg & NWAY_LPAR_ASM_DIR)) {
hw->fc.current_mode = e1000_fc_rx_pause;
- DEBUGOUT("Flow Control = Rx PAUSE frames only.\r\n");
+ DEBUGOUT("Flow Control = Rx PAUSE frames only.\n");
} else {
/*
* Per the IEEE spec, at this point flow control
* should be disabled.
*/
hw->fc.current_mode = e1000_fc_none;
- DEBUGOUT("Flow Control = NONE.\r\n");
+ DEBUGOUT("Flow Control = NONE.\n");
}
/*
@@ -1573,7 +1571,7 @@ out:
* speed and duplex for copper connections.
**/
s32 e1000_get_speed_and_duplex_copper_generic(struct e1000_hw *hw, u16 *speed,
- u16 *duplex)
+ u16 *duplex)
{
u32 status;
@@ -1612,7 +1610,7 @@ s32 e1000_get_speed_and_duplex_copper_generic(struct e1000_hw *hw, u16 *speed,
* for fiber/serdes links.
**/
s32 e1000_get_speed_and_duplex_fiber_serdes_generic(struct e1000_hw *hw,
- u16 *speed, u16 *duplex)
+ u16 *speed, u16 *duplex)
{
DEBUGFUNC("e1000_get_speed_and_duplex_fiber_serdes_generic");
@@ -1843,11 +1841,10 @@ s32 e1000_setup_led_generic(struct e1000_hw *hw)
ledctl = E1000_READ_REG(hw, E1000_LEDCTL);
hw->mac.ledctl_default = ledctl;
/* Turn off LED0 */
- ledctl &= ~(E1000_LEDCTL_LED0_IVRT |
- E1000_LEDCTL_LED0_BLINK |
- E1000_LEDCTL_LED0_MODE_MASK);
+ ledctl &= ~(E1000_LEDCTL_LED0_IVRT | E1000_LEDCTL_LED0_BLINK |
+ E1000_LEDCTL_LED0_MODE_MASK);
ledctl |= (E1000_LEDCTL_MODE_LED_OFF <<
- E1000_LEDCTL_LED0_MODE_SHIFT);
+ E1000_LEDCTL_LED0_MODE_SHIFT);
E1000_WRITE_REG(hw, E1000_LEDCTL, ledctl);
} else if (hw->phy.media_type == e1000_media_type_copper) {
E1000_WRITE_REG(hw, E1000_LEDCTL, hw->mac.ledctl_mode1);
@@ -1899,7 +1896,7 @@ s32 e1000_blink_led_generic(struct e1000_hw *hw)
if (((hw->mac.ledctl_mode2 >> (i * 8)) & 0xFF) ==
E1000_LEDCTL_MODE_LED_ON)
ledctl_blink |= (E1000_LEDCTL_LED0_BLINK <<
- (i * 8));
+ (i * 8));
}
E1000_WRITE_REG(hw, E1000_LEDCTL, ledctl_blink);
@@ -2090,7 +2087,8 @@ void e1000_update_adaptive_generic(struct e1000_hw *hw)
else
mac->current_ifs_val +=
mac->ifs_step_size;
- E1000_WRITE_REG(hw, E1000_AIT, mac->current_ifs_val);
+ E1000_WRITE_REG(hw, E1000_AIT,
+ mac->current_ifs_val);
}
}
} else {
@@ -2141,7 +2139,7 @@ out:
* completion.
**/
s32 e1000_write_8bit_ctrl_reg_generic(struct e1000_hw *hw, u32 reg,
- u32 offset, u8 data)
+ u32 offset, u8 data)
{
u32 i, regvalue = 0;
s32 ret_val = E1000_SUCCESS;
diff --git a/sys/dev/e1000/e1000_nvm.c b/sys/dev/e1000/e1000_nvm.c
index e10ac8c..d8df089 100644
--- a/sys/dev/e1000/e1000_nvm.c
+++ b/sys/dev/e1000/e1000_nvm.c
@@ -1,6 +1,6 @@
/******************************************************************************
- Copyright (c) 2001-2010, Intel Corporation
+ Copyright (c) 2001-2011, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -313,8 +313,7 @@ static void e1000_standby_nvm(struct e1000_hw *hw)
usec_delay(nvm->delay_usec);
e1000_lower_eec_clk(hw, &eecd);
- } else
- if (nvm->type == e1000_nvm_eeprom_spi) {
+ } else if (nvm->type == e1000_nvm_eeprom_spi) {
/* Toggle CS to flush commands */
eecd |= E1000_EECD_CS;
E1000_WRITE_REG(hw, E1000_EECD, eecd);
@@ -394,13 +393,13 @@ static s32 e1000_ready_nvm_eeprom(struct e1000_hw *hw)
/* Set CS */
eecd |= E1000_EECD_CS;
E1000_WRITE_REG(hw, E1000_EECD, eecd);
- } else
- if (nvm->type == e1000_nvm_eeprom_spi) {
+ } else if (nvm->type == e1000_nvm_eeprom_spi) {
u16 timeout = NVM_MAX_RETRY_SPI;
/* Clear SK and CS */
eecd &= ~(E1000_EECD_CS | E1000_EECD_SK);
E1000_WRITE_REG(hw, E1000_EECD, eecd);
+ E1000_WRITE_FLUSH(hw);
usec_delay(1);
/*
@@ -411,7 +410,7 @@ static s32 e1000_ready_nvm_eeprom(struct e1000_hw *hw)
*/
while (timeout) {
e1000_shift_out_eec_bits(hw, NVM_RDSR_OPCODE_SPI,
- hw->nvm.opcode_bits);
+ hw->nvm.opcode_bits);
spi_stat_reg = (u8)e1000_shift_in_eec_bits(hw, 8);
if (!(spi_stat_reg & NVM_STATUS_RDY_SPI))
break;
@@ -506,7 +505,7 @@ out:
* Reads a 16 bit word from the EEPROM.
**/
s32 e1000_read_nvm_microwire(struct e1000_hw *hw, u16 offset, u16 words,
- u16 *data)
+ u16 *data)
{
struct e1000_nvm_info *nvm = &hw->nvm;
u32 i = 0;
@@ -593,7 +592,7 @@ s32 e1000_read_nvm_eerd(struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
break;
data[i] = (E1000_READ_REG(hw, E1000_EERD) >>
- E1000_NVM_RW_REG_DATA);
+ E1000_NVM_RW_REG_DATA);
}
out:
@@ -646,7 +645,7 @@ s32 e1000_write_nvm_spi(struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
/* Send the WRITE ENABLE command (8 bit opcode) */
e1000_shift_out_eec_bits(hw, NVM_WREN_OPCODE_SPI,
- nvm->opcode_bits);
+ nvm->opcode_bits);
e1000_standby_nvm(hw);
@@ -660,7 +659,7 @@ s32 e1000_write_nvm_spi(struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
/* Send the Write command (8-bit opcode + addr) */
e1000_shift_out_eec_bits(hw, write_opcode, nvm->opcode_bits);
e1000_shift_out_eec_bits(hw, (u16)((offset + widx) * 2),
- nvm->address_bits);
+ nvm->address_bits);
/* Loop to allow for up to whole page write of eeprom */
while (widx < words) {
@@ -697,7 +696,7 @@ out:
* EEPROM will most likely contain an invalid checksum.
**/
s32 e1000_write_nvm_microwire(struct e1000_hw *hw, u16 offset, u16 words,
- u16 *data)
+ u16 *data)
{
struct e1000_nvm_info *nvm = &hw->nvm;
s32 ret_val;
@@ -727,7 +726,7 @@ s32 e1000_write_nvm_microwire(struct e1000_hw *hw, u16 offset, u16 words,
goto release;
e1000_shift_out_eec_bits(hw, NVM_EWEN_OPCODE_MICROWIRE,
- (u16)(nvm->opcode_bits + 2));
+ (u16)(nvm->opcode_bits + 2));
e1000_shift_out_eec_bits(hw, 0, (u16)(nvm->address_bits - 2));
@@ -735,10 +734,10 @@ s32 e1000_write_nvm_microwire(struct e1000_hw *hw, u16 offset, u16 words,
while (words_written < words) {
e1000_shift_out_eec_bits(hw, NVM_WRITE_OPCODE_MICROWIRE,
- nvm->opcode_bits);
+ nvm->opcode_bits);
e1000_shift_out_eec_bits(hw, (u16)(offset + words_written),
- nvm->address_bits);
+ nvm->address_bits);
e1000_shift_out_eec_bits(hw, data[words_written], 16);
@@ -763,7 +762,7 @@ s32 e1000_write_nvm_microwire(struct e1000_hw *hw, u16 offset, u16 words,
}
e1000_shift_out_eec_bits(hw, NVM_EWDS_OPCODE_MICROWIRE,
- (u16)(nvm->opcode_bits + 2));
+ (u16)(nvm->opcode_bits + 2));
e1000_shift_out_eec_bits(hw, 0, (u16)(nvm->address_bits - 2));
@@ -784,7 +783,7 @@ out:
* the value in pba_num.
**/
s32 e1000_read_pba_string_generic(struct e1000_hw *hw, u8 *pba_num,
- u32 pba_num_size)
+ u32 pba_num_size)
{
s32 ret_val;
u16 nvm_data;
diff --git a/sys/dev/e1000/e1000_nvm.h b/sys/dev/e1000/e1000_nvm.h
index 61ea0b1..ed23eb3 100644
--- a/sys/dev/e1000/e1000_nvm.h
+++ b/sys/dev/e1000/e1000_nvm.h
@@ -1,6 +1,6 @@
/******************************************************************************
- Copyright (c) 2001-2010, Intel Corporation
+ Copyright (c) 2001-2011, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -45,25 +45,23 @@ s32 e1000_acquire_nvm_generic(struct e1000_hw *hw);
s32 e1000_poll_eerd_eewr_done(struct e1000_hw *hw, int ee_reg);
s32 e1000_read_mac_addr_generic(struct e1000_hw *hw);
s32 e1000_read_pba_string_generic(struct e1000_hw *hw, u8 *pba_num,
- u32 pba_num_size);
+ u32 pba_num_size);
s32 e1000_read_pba_length_generic(struct e1000_hw *hw, u32 *pba_num_size);
s32 e1000_read_nvm_spi(struct e1000_hw *hw, u16 offset, u16 words, u16 *data);
s32 e1000_read_nvm_microwire(struct e1000_hw *hw, u16 offset,
- u16 words, u16 *data);
+ u16 words, u16 *data);
s32 e1000_read_nvm_eerd(struct e1000_hw *hw, u16 offset, u16 words,
- u16 *data);
+ u16 *data);
s32 e1000_valid_led_default_generic(struct e1000_hw *hw, u16 *data);
s32 e1000_validate_nvm_checksum_generic(struct e1000_hw *hw);
-s32 e1000_write_nvm_eewr(struct e1000_hw *hw, u16 offset,
- u16 words, u16 *data);
s32 e1000_write_nvm_microwire(struct e1000_hw *hw, u16 offset,
- u16 words, u16 *data);
+ u16 words, u16 *data);
s32 e1000_write_nvm_spi(struct e1000_hw *hw, u16 offset, u16 words,
- u16 *data);
+ u16 *data);
s32 e1000_update_nvm_checksum_generic(struct e1000_hw *hw);
void e1000_stop_nvm(struct e1000_hw *hw);
void e1000_release_nvm_generic(struct e1000_hw *hw);
-#define E1000_STM_OPCODE 0xDB00
+#define E1000_STM_OPCODE 0xDB00
#endif
diff --git a/sys/dev/e1000/e1000_osdep.h b/sys/dev/e1000/e1000_osdep.h
index 25231a7..7eb7bb6 100644
--- a/sys/dev/e1000/e1000_osdep.h
+++ b/sys/dev/e1000/e1000_osdep.h
@@ -73,9 +73,11 @@
#define STATIC static
#define FALSE 0
-#define false FALSE
#define TRUE 1
+#ifndef __bool_true_false_are_defined
+#define false FALSE
#define true TRUE
+#endif
#define CMD_MEM_WRT_INVALIDATE 0x0010 /* BIT_4 */
#define PCI_COMMAND_REGISTER PCIR_COMMAND
@@ -96,7 +98,9 @@ typedef int64_t s64;
typedef int32_t s32;
typedef int16_t s16;
typedef int8_t s8;
+#ifndef __bool_true_false_are_defined
typedef boolean_t bool;
+#endif
#define __le16 u16
#define __le32 u32
diff --git a/sys/dev/e1000/e1000_phy.c b/sys/dev/e1000/e1000_phy.c
index 40fd2bd..ead72690 100644
--- a/sys/dev/e1000/e1000_phy.c
+++ b/sys/dev/e1000/e1000_phy.c
@@ -1,6 +1,6 @@
/******************************************************************************
- Copyright (c) 2001-2010, Intel Corporation
+ Copyright (c) 2001-2011, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -36,17 +36,17 @@
static u32 e1000_get_phy_addr_for_bm_page(u32 page, u32 reg);
static s32 e1000_access_phy_wakeup_reg_bm(struct e1000_hw *hw, u32 offset,
- u16 *data, bool read);
+ u16 *data, bool read, bool page_set);
static u32 e1000_get_phy_addr_for_hv_page(u32 page);
static s32 e1000_access_phy_debug_regs_hv(struct e1000_hw *hw, u32 offset,
- u16 *data, bool read);
+ u16 *data, bool read);
/* Cable length tables */
static const u16 e1000_m88_cable_length_table[] = {
0, 50, 80, 110, 140, 140, E1000_CABLE_LENGTH_UNDEFINED };
#define M88E1000_CABLE_LENGTH_TABLE_SIZE \
- (sizeof(e1000_m88_cable_length_table) / \
- sizeof(e1000_m88_cable_length_table[0]))
+ (sizeof(e1000_m88_cable_length_table) / \
+ sizeof(e1000_m88_cable_length_table[0]))
static const u16 e1000_igp_2_cable_length_table[] = {
0, 0, 0, 0, 0, 0, 0, 0, 3, 5, 8, 11, 13, 16, 18, 21, 0, 0, 0, 3,
@@ -58,8 +58,8 @@ static const u16 e1000_igp_2_cable_length_table[] = {
100, 105, 109, 113, 116, 119, 122, 124, 104, 109, 114, 118, 121,
124};
#define IGP02E1000_CABLE_LENGTH_TABLE_SIZE \
- (sizeof(e1000_igp_2_cable_length_table) / \
- sizeof(e1000_igp_2_cable_length_table[0]))
+ (sizeof(e1000_igp_2_cable_length_table) / \
+ sizeof(e1000_igp_2_cable_length_table[0]))
/**
* e1000_init_phy_ops_generic - Initialize PHY function pointers
@@ -82,20 +82,35 @@ void e1000_init_phy_ops_generic(struct e1000_hw *hw)
phy->ops.get_cfg_done = e1000_null_ops_generic;
phy->ops.get_cable_length = e1000_null_ops_generic;
phy->ops.get_info = e1000_null_ops_generic;
+ phy->ops.set_page = e1000_null_set_page;
phy->ops.read_reg = e1000_null_read_reg;
phy->ops.read_reg_locked = e1000_null_read_reg;
+ phy->ops.read_reg_page = e1000_null_read_reg;
phy->ops.release = e1000_null_phy_generic;
phy->ops.reset = e1000_null_ops_generic;
phy->ops.set_d0_lplu_state = e1000_null_lplu_state;
phy->ops.set_d3_lplu_state = e1000_null_lplu_state;
phy->ops.write_reg = e1000_null_write_reg;
phy->ops.write_reg_locked = e1000_null_write_reg;
+ phy->ops.write_reg_page = e1000_null_write_reg;
phy->ops.power_up = e1000_null_phy_generic;
phy->ops.power_down = e1000_null_phy_generic;
+ phy->ops.read_i2c_byte = e1000_read_i2c_byte_generic;
+ phy->ops.write_i2c_byte = e1000_write_i2c_byte_generic;
phy->ops.cfg_on_link_up = e1000_null_ops_generic;
}
/**
+ * e1000_null_set_page - No-op function, return 0
+ * @hw: pointer to the HW structure
+ **/
+s32 e1000_null_set_page(struct e1000_hw *hw, u16 data)
+{
+ DEBUGFUNC("e1000_null_set_page");
+ return E1000_SUCCESS;
+}
+
+/**
* e1000_null_read_reg - No-op function, return 0
* @hw: pointer to the HW structure
**/
@@ -250,8 +265,8 @@ s32 e1000_read_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 *data)
* PHY to retrieve the desired data.
*/
mdic = ((offset << E1000_MDIC_REG_SHIFT) |
- (phy->addr << E1000_MDIC_PHY_SHIFT) |
- (E1000_MDIC_OP_READ));
+ (phy->addr << E1000_MDIC_PHY_SHIFT) |
+ (E1000_MDIC_OP_READ));
E1000_WRITE_REG(hw, E1000_MDIC, mdic);
@@ -316,9 +331,9 @@ s32 e1000_write_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 data)
* PHY to retrieve the desired data.
*/
mdic = (((u32)data) |
- (offset << E1000_MDIC_REG_SHIFT) |
- (phy->addr << E1000_MDIC_PHY_SHIFT) |
- (E1000_MDIC_OP_WRITE));
+ (offset << E1000_MDIC_REG_SHIFT) |
+ (phy->addr << E1000_MDIC_PHY_SHIFT) |
+ (E1000_MDIC_OP_WRITE));
E1000_WRITE_REG(hw, E1000_MDIC, mdic);
@@ -377,8 +392,8 @@ s32 e1000_read_phy_reg_i2c(struct e1000_hw *hw, u32 offset, u16 *data)
* PHY to retrieve the desired data.
*/
i2ccmd = ((offset << E1000_I2CCMD_REG_ADDR_SHIFT) |
- (phy->addr << E1000_I2CCMD_PHY_ADDR_SHIFT) |
- (E1000_I2CCMD_OPCODE_READ));
+ (phy->addr << E1000_I2CCMD_PHY_ADDR_SHIFT) |
+ (E1000_I2CCMD_OPCODE_READ));
E1000_WRITE_REG(hw, E1000_I2CCMD, i2ccmd);
@@ -420,6 +435,13 @@ s32 e1000_write_phy_reg_i2c(struct e1000_hw *hw, u32 offset, u16 data)
DEBUGFUNC("e1000_write_phy_reg_i2c");
+ /* Prevent overwritting SFP I2C EEPROM which is at A0 address.*/
+ if ((hw->phy.addr == 0) || (hw->phy.addr > 7)) {
+ DEBUGOUT1("PHY I2C Address %d is out of range.\n",
+ hw->phy.addr);
+ return -E1000_ERR_CONFIG;
+ }
+
/* Swap the data bytes for the I2C interface */
phy_data_swapped = ((data >> 8) & 0x00FF) | ((data << 8) & 0xFF00);
@@ -429,9 +451,9 @@ s32 e1000_write_phy_reg_i2c(struct e1000_hw *hw, u32 offset, u16 data)
* PHY to retrieve the desired data.
*/
i2ccmd = ((offset << E1000_I2CCMD_REG_ADDR_SHIFT) |
- (phy->addr << E1000_I2CCMD_PHY_ADDR_SHIFT) |
- E1000_I2CCMD_OPCODE_WRITE |
- phy_data_swapped);
+ (phy->addr << E1000_I2CCMD_PHY_ADDR_SHIFT) |
+ E1000_I2CCMD_OPCODE_WRITE |
+ phy_data_swapped);
E1000_WRITE_REG(hw, E1000_I2CCMD, i2ccmd);
@@ -455,6 +477,139 @@ s32 e1000_write_phy_reg_i2c(struct e1000_hw *hw, u32 offset, u16 data)
}
/**
+ * e1000_read_sfp_data_byte - Reads SFP module data.
+ * @hw: pointer to the HW structure
+ * @offset: byte location offset to be read
+ * @data: read data buffer pointer
+ *
+ * Reads one byte from SFP module data stored
+ * in SFP resided EEPROM memory or SFP diagnostic area.
+ * Function should be called with
+ * E1000_I2CCMD_SFP_DATA_ADDR(<byte offset>) for SFP module database access
+ * E1000_I2CCMD_SFP_DIAG_ADDR(<byte offset>) for SFP diagnostics parameters
+ * access
+ **/
+s32 e1000_read_sfp_data_byte(struct e1000_hw *hw, u16 offset, u8 *data)
+{
+ u32 i = 0;
+ u32 i2ccmd = 0;
+ u32 data_local = 0;
+
+ DEBUGFUNC("e1000_read_sfp_data_byte");
+
+ if (offset > E1000_I2CCMD_SFP_DIAG_ADDR(255)) {
+ DEBUGOUT("I2CCMD command address exceeds upper limit\n");
+ return -E1000_ERR_PHY;
+ }
+
+ /*
+ * Set up Op-code, EEPROM Address,in the I2CCMD
+ * register. The MAC will take care of interfacing with the
+ * EEPROM to retrieve the desired data.
+ */
+ i2ccmd = ((offset << E1000_I2CCMD_REG_ADDR_SHIFT) |
+ E1000_I2CCMD_OPCODE_READ);
+
+ E1000_WRITE_REG(hw, E1000_I2CCMD, i2ccmd);
+
+ /* Poll the ready bit to see if the I2C read completed */
+ for (i = 0; i < E1000_I2CCMD_PHY_TIMEOUT; i++) {
+ usec_delay(50);
+ data_local = E1000_READ_REG(hw, E1000_I2CCMD);
+ if (data_local & E1000_I2CCMD_READY)
+ break;
+ }
+ if (!(data_local & E1000_I2CCMD_READY)) {
+ DEBUGOUT("I2CCMD Read did not complete\n");
+ return -E1000_ERR_PHY;
+ }
+ if (data_local & E1000_I2CCMD_ERROR) {
+ DEBUGOUT("I2CCMD Error bit set\n");
+ return -E1000_ERR_PHY;
+ }
+ *data = (u8) data_local & 0xFF;
+
+ return E1000_SUCCESS;
+}
+
+/**
+ * e1000_write_sfp_data_byte - Writes SFP module data.
+ * @hw: pointer to the HW structure
+ * @offset: byte location offset to write to
+ * @data: data to write
+ *
+ * Writes one byte to SFP module data stored
+ * in SFP resided EEPROM memory or SFP diagnostic area.
+ * Function should be called with
+ * E1000_I2CCMD_SFP_DATA_ADDR(<byte offset>) for SFP module database access
+ * E1000_I2CCMD_SFP_DIAG_ADDR(<byte offset>) for SFP diagnostics parameters
+ * access
+ **/
+s32 e1000_write_sfp_data_byte(struct e1000_hw *hw, u16 offset, u8 data)
+{
+ u32 i = 0;
+ u32 i2ccmd = 0;
+ u32 data_local = 0;
+
+ DEBUGFUNC("e1000_write_sfp_data_byte");
+
+ if (offset > E1000_I2CCMD_SFP_DIAG_ADDR(255)) {
+ DEBUGOUT("I2CCMD command address exceeds upper limit\n");
+ return -E1000_ERR_PHY;
+ }
+ /*
+ * The programming interface is 16 bits wide
+ * so we need to read the whole word first
+ * then update appropriate byte lane and write
+ * the updated word back.
+ */
+ /*
+ * Set up Op-code, EEPROM Address,in the I2CCMD
+ * register. The MAC will take care of interfacing
+ * with an EEPROM to write the data given.
+ */
+ i2ccmd = ((offset << E1000_I2CCMD_REG_ADDR_SHIFT) |
+ E1000_I2CCMD_OPCODE_READ);
+ /* Set a command to read single word */
+ E1000_WRITE_REG(hw, E1000_I2CCMD, i2ccmd);
+ for (i = 0; i < E1000_I2CCMD_PHY_TIMEOUT; i++) {
+ usec_delay(50);
+ /*
+ * Poll the ready bit to see if lastly
+ * launched I2C operation completed
+ */
+ i2ccmd = E1000_READ_REG(hw, E1000_I2CCMD);
+ if (i2ccmd & E1000_I2CCMD_READY) {
+ /* Check if this is READ or WRITE phase */
+ if ((i2ccmd & E1000_I2CCMD_OPCODE_READ) ==
+ E1000_I2CCMD_OPCODE_READ) {
+ /*
+ * Write the selected byte
+ * lane and update whole word
+ */
+ data_local = i2ccmd & 0xFF00;
+ data_local |= data;
+ i2ccmd = ((offset <<
+ E1000_I2CCMD_REG_ADDR_SHIFT) |
+ E1000_I2CCMD_OPCODE_WRITE | data_local);
+ E1000_WRITE_REG(hw, E1000_I2CCMD, i2ccmd);
+ } else {
+ break;
+ }
+ }
+ }
+ if (!(i2ccmd & E1000_I2CCMD_READY)) {
+ DEBUGOUT("I2CCMD Write did not complete\n");
+ return -E1000_ERR_PHY;
+ }
+ if (i2ccmd & E1000_I2CCMD_ERROR) {
+ DEBUGOUT("I2CCMD Error bit set\n");
+ return -E1000_ERR_PHY;
+ }
+ return E1000_SUCCESS;
+}
+
+/**
* e1000_read_phy_reg_m88 - Read m88 PHY register
* @hw: pointer to the HW structure
* @offset: register offset to be read
@@ -478,7 +633,7 @@ s32 e1000_read_phy_reg_m88(struct e1000_hw *hw, u32 offset, u16 *data)
goto out;
ret_val = e1000_read_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset,
- data);
+ data);
hw->phy.ops.release(hw);
@@ -509,7 +664,7 @@ s32 e1000_write_phy_reg_m88(struct e1000_hw *hw, u32 offset, u16 data)
goto out;
ret_val = e1000_write_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset,
- data);
+ data);
hw->phy.ops.release(hw);
@@ -518,6 +673,26 @@ out:
}
/**
+ * e1000_set_page_igp - Set page as on IGP-like PHY(s)
+ * @hw: pointer to the HW structure
+ * @page: page to set (shifted left when necessary)
+ *
+ * Sets PHY page required for PHY register access. Assumes semaphore is
+ * already acquired. Note, this function sets phy.addr to 1 so the caller
+ * must set it appropriately (if necessary) after this function returns.
+ **/
+s32 e1000_set_page_igp(struct e1000_hw *hw, u16 page)
+{
+ DEBUGFUNC("e1000_set_page_igp");
+
+ DEBUGOUT1("Setting page 0x%x\n", page);
+
+ hw->phy.addr = 1;
+
+ return e1000_write_phy_reg_mdic(hw, IGP01E1000_PHY_PAGE_SELECT, page);
+}
+
+/**
* __e1000_read_phy_reg_igp - Read igp PHY register
* @hw: pointer to the HW structure
* @offset: register offset to be read
@@ -529,7 +704,7 @@ out:
* semaphores before exiting.
**/
static s32 __e1000_read_phy_reg_igp(struct e1000_hw *hw, u32 offset, u16 *data,
- bool locked)
+ bool locked)
{
s32 ret_val = E1000_SUCCESS;
@@ -546,14 +721,14 @@ static s32 __e1000_read_phy_reg_igp(struct e1000_hw *hw, u32 offset, u16 *data,
if (offset > MAX_PHY_MULTI_PAGE_REG) {
ret_val = e1000_write_phy_reg_mdic(hw,
- IGP01E1000_PHY_PAGE_SELECT,
- (u16)offset);
+ IGP01E1000_PHY_PAGE_SELECT,
+ (u16)offset);
if (ret_val)
goto release;
}
ret_val = e1000_read_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset,
- data);
+ data);
release:
if (!locked)
@@ -602,7 +777,7 @@ s32 e1000_read_phy_reg_igp_locked(struct e1000_hw *hw, u32 offset, u16 *data)
* at the offset. Release any acquired semaphores before exiting.
**/
static s32 __e1000_write_phy_reg_igp(struct e1000_hw *hw, u32 offset, u16 data,
- bool locked)
+ bool locked)
{
s32 ret_val = E1000_SUCCESS;
@@ -619,14 +794,14 @@ static s32 __e1000_write_phy_reg_igp(struct e1000_hw *hw, u32 offset, u16 data,
if (offset > MAX_PHY_MULTI_PAGE_REG) {
ret_val = e1000_write_phy_reg_mdic(hw,
- IGP01E1000_PHY_PAGE_SELECT,
- (u16)offset);
+ IGP01E1000_PHY_PAGE_SELECT,
+ (u16)offset);
if (ret_val)
goto release;
}
ret_val = e1000_write_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset,
- data);
+ data);
release:
if (!locked)
@@ -676,7 +851,7 @@ s32 e1000_write_phy_reg_igp_locked(struct e1000_hw *hw, u32 offset, u16 data)
* Release any acquired semaphores before exiting.
**/
static s32 __e1000_read_kmrn_reg(struct e1000_hw *hw, u32 offset, u16 *data,
- bool locked)
+ bool locked)
{
u32 kmrnctrlsta;
s32 ret_val = E1000_SUCCESS;
@@ -693,8 +868,9 @@ static s32 __e1000_read_kmrn_reg(struct e1000_hw *hw, u32 offset, u16 *data,
}
kmrnctrlsta = ((offset << E1000_KMRNCTRLSTA_OFFSET_SHIFT) &
- E1000_KMRNCTRLSTA_OFFSET) | E1000_KMRNCTRLSTA_REN;
+ E1000_KMRNCTRLSTA_OFFSET) | E1000_KMRNCTRLSTA_REN;
E1000_WRITE_REG(hw, E1000_KMRNCTRLSTA, kmrnctrlsta);
+ E1000_WRITE_FLUSH(hw);
usec_delay(2);
@@ -750,7 +926,7 @@ s32 e1000_read_kmrn_reg_locked(struct e1000_hw *hw, u32 offset, u16 *data)
* before exiting.
**/
static s32 __e1000_write_kmrn_reg(struct e1000_hw *hw, u32 offset, u16 data,
- bool locked)
+ bool locked)
{
u32 kmrnctrlsta;
s32 ret_val = E1000_SUCCESS;
@@ -767,8 +943,9 @@ static s32 __e1000_write_kmrn_reg(struct e1000_hw *hw, u32 offset, u16 data,
}
kmrnctrlsta = ((offset << E1000_KMRNCTRLSTA_OFFSET_SHIFT) &
- E1000_KMRNCTRLSTA_OFFSET) | data;
+ E1000_KMRNCTRLSTA_OFFSET) | data;
E1000_WRITE_REG(hw, E1000_KMRNCTRLSTA, kmrnctrlsta);
+ E1000_WRITE_FLUSH(hw);
usec_delay(2);
@@ -820,11 +997,6 @@ s32 e1000_copper_link_setup_82577(struct e1000_hw *hw)
DEBUGFUNC("e1000_copper_link_setup_82577");
- if (hw->phy.reset_disable) {
- ret_val = E1000_SUCCESS;
- goto out;
- }
-
if (hw->phy.type == e1000_phy_82580) {
ret_val = hw->phy.ops.reset(hw);
if (ret_val) {
@@ -844,6 +1016,37 @@ s32 e1000_copper_link_setup_82577(struct e1000_hw *hw)
phy_data |= I82577_CFG_ENABLE_DOWNSHIFT;
ret_val = hw->phy.ops.write_reg(hw, I82577_CFG_REG, phy_data);
+ if (ret_val)
+ goto out;
+
+ /* Resolve Master/Slave mode */
+ ret_val = hw->phy.ops.read_reg(hw, PHY_1000T_CTRL, &phy_data);
+ if (ret_val)
+ goto out;
+
+ /* load defaults for future use */
+ hw->phy.original_ms_type = (phy_data & CR_1000T_MS_ENABLE) ?
+ ((phy_data & CR_1000T_MS_VALUE) ?
+ e1000_ms_force_master :
+ e1000_ms_force_slave) : e1000_ms_auto;
+
+ switch (hw->phy.ms_type) {
+ case e1000_ms_force_master:
+ phy_data |= (CR_1000T_MS_ENABLE | CR_1000T_MS_VALUE);
+ break;
+ case e1000_ms_force_slave:
+ phy_data |= CR_1000T_MS_ENABLE;
+ phy_data &= ~(CR_1000T_MS_VALUE);
+ break;
+ case e1000_ms_auto:
+ phy_data &= ~CR_1000T_MS_ENABLE;
+ default:
+ break;
+ }
+
+ ret_val = hw->phy.ops.write_reg(hw, PHY_1000T_CTRL, phy_data);
+ if (ret_val)
+ goto out;
out:
return ret_val;
@@ -864,10 +1067,6 @@ s32 e1000_copper_link_setup_m88(struct e1000_hw *hw)
DEBUGFUNC("e1000_copper_link_setup_m88");
- if (phy->reset_disable) {
- ret_val = E1000_SUCCESS;
- goto out;
- }
/* Enable CRS on Tx. This must be set for half-duplex operation. */
ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data);
@@ -931,7 +1130,7 @@ s32 e1000_copper_link_setup_m88(struct e1000_hw *hw)
* to 25MHz clock.
*/
ret_val = phy->ops.read_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL,
- &phy_data);
+ &phy_data);
if (ret_val)
goto out;
@@ -945,12 +1144,12 @@ s32 e1000_copper_link_setup_m88(struct e1000_hw *hw)
} else {
/* Configure Master and Slave downshift values */
phy_data &= ~(M88E1000_EPSCR_MASTER_DOWNSHIFT_MASK |
- M88E1000_EPSCR_SLAVE_DOWNSHIFT_MASK);
+ M88E1000_EPSCR_SLAVE_DOWNSHIFT_MASK);
phy_data |= (M88E1000_EPSCR_MASTER_DOWNSHIFT_1X |
- M88E1000_EPSCR_SLAVE_DOWNSHIFT_1X);
+ M88E1000_EPSCR_SLAVE_DOWNSHIFT_1X);
}
ret_val = phy->ops.write_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL,
- phy_data);
+ phy_data);
if (ret_val)
goto out;
}
@@ -976,7 +1175,7 @@ s32 e1000_copper_link_setup_m88(struct e1000_hw *hw)
if (phy->type == e1000_phy_82578) {
ret_val = phy->ops.read_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL,
- &phy_data);
+ &phy_data);
if (ret_val)
goto out;
@@ -984,7 +1183,7 @@ s32 e1000_copper_link_setup_m88(struct e1000_hw *hw)
phy_data |= I82578_EPSCR_DOWNSHIFT_ENABLE;
phy_data &= ~I82578_EPSCR_DOWNSHIFT_COUNTER_MASK;
ret_val = phy->ops.write_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL,
- phy_data);
+ phy_data);
if (ret_val)
goto out;
}
@@ -1008,10 +1207,6 @@ s32 e1000_copper_link_setup_m88_gen2(struct e1000_hw *hw)
DEBUGFUNC("e1000_copper_link_setup_m88_gen2");
- if (phy->reset_disable) {
- ret_val = E1000_SUCCESS;
- goto out;
- }
/* Enable CRS on Tx. This must be set for half-duplex operation. */
ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data);
@@ -1093,10 +1288,6 @@ s32 e1000_copper_link_setup_igp(struct e1000_hw *hw)
DEBUGFUNC("e1000_copper_link_setup_igp");
- if (phy->reset_disable) {
- ret_val = E1000_SUCCESS;
- goto out;
- }
ret_val = hw->phy.ops.reset(hw);
if (ret_val) {
@@ -1164,15 +1355,15 @@ s32 e1000_copper_link_setup_igp(struct e1000_hw *hw)
if (phy->autoneg_advertised == ADVERTISE_1000_FULL) {
/* Disable SmartSpeed */
ret_val = phy->ops.read_reg(hw,
- IGP01E1000_PHY_PORT_CONFIG,
- &data);
+ IGP01E1000_PHY_PORT_CONFIG,
+ &data);
if (ret_val)
goto out;
data &= ~IGP01E1000_PSCFR_SMART_SPEED;
ret_val = phy->ops.write_reg(hw,
- IGP01E1000_PHY_PORT_CONFIG,
- data);
+ IGP01E1000_PHY_PORT_CONFIG,
+ data);
if (ret_val)
goto out;
@@ -1278,8 +1469,7 @@ s32 e1000_copper_link_autoneg(struct e1000_hw *hw)
if (phy->autoneg_wait_to_complete) {
ret_val = hw->mac.ops.wait_autoneg(hw);
if (ret_val) {
- DEBUGOUT("Error while waiting for "
- "autoneg to complete\n");
+ DEBUGOUT("Error while waiting for autoneg to complete\n");
goto out;
}
}
@@ -1318,7 +1508,7 @@ s32 e1000_phy_setup_autoneg(struct e1000_hw *hw)
if (phy->autoneg_mask & ADVERTISE_1000_FULL) {
/* Read the MII 1000Base-T Control Register (Address 9). */
ret_val = phy->ops.read_reg(hw, PHY_1000T_CTRL,
- &mii_1000t_ctrl_reg);
+ &mii_1000t_ctrl_reg);
if (ret_val)
goto out;
}
@@ -1337,9 +1527,9 @@ s32 e1000_phy_setup_autoneg(struct e1000_hw *hw)
* the 1000Base-T Control Register (Address 9).
*/
mii_autoneg_adv_reg &= ~(NWAY_AR_100TX_FD_CAPS |
- NWAY_AR_100TX_HD_CAPS |
- NWAY_AR_10T_FD_CAPS |
- NWAY_AR_10T_HD_CAPS);
+ NWAY_AR_100TX_HD_CAPS |
+ NWAY_AR_10T_FD_CAPS |
+ NWAY_AR_10T_HD_CAPS);
mii_1000t_ctrl_reg &= ~(CR_1000T_HD_CAPS | CR_1000T_FD_CAPS);
DEBUGOUT1("autoneg_advertised %x\n", phy->autoneg_advertised);
@@ -1445,9 +1635,8 @@ s32 e1000_phy_setup_autoneg(struct e1000_hw *hw)
DEBUGOUT1("Auto-Neg Advertising %x\n", mii_autoneg_adv_reg);
if (phy->autoneg_mask & ADVERTISE_1000_FULL) {
- ret_val = phy->ops.write_reg(hw,
- PHY_1000T_CTRL,
- mii_1000t_ctrl_reg);
+ ret_val = phy->ops.write_reg(hw, PHY_1000T_CTRL,
+ mii_1000t_ctrl_reg);
if (ret_val)
goto out;
}
@@ -1497,10 +1686,8 @@ s32 e1000_setup_copper_link_generic(struct e1000_hw *hw)
* Check link status. Wait up to 100 microseconds for link to become
* valid.
*/
- ret_val = e1000_phy_has_link_generic(hw,
- COPPER_LINK_UP_LIMIT,
- 10,
- &link);
+ ret_val = e1000_phy_has_link_generic(hw, COPPER_LINK_UP_LIMIT, 10,
+ &link);
if (ret_val)
goto out;
@@ -1565,10 +1752,8 @@ s32 e1000_phy_force_speed_duplex_igp(struct e1000_hw *hw)
if (phy->autoneg_wait_to_complete) {
DEBUGOUT("Waiting for forced speed/duplex link on IGP phy.\n");
- ret_val = e1000_phy_has_link_generic(hw,
- PHY_FORCE_LIMIT,
- 100000,
- &link);
+ ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
+ 100000, &link);
if (ret_val)
goto out;
@@ -1576,10 +1761,8 @@ s32 e1000_phy_force_speed_duplex_igp(struct e1000_hw *hw)
DEBUGOUT("Link taking longer than expected.\n");
/* Try once more */
- ret_val = e1000_phy_has_link_generic(hw,
- PHY_FORCE_LIMIT,
- 100000,
- &link);
+ ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
+ 100000, &link);
if (ret_val)
goto out;
}
@@ -1641,7 +1824,7 @@ s32 e1000_phy_force_speed_duplex_m88(struct e1000_hw *hw)
DEBUGOUT("Waiting for forced speed/duplex link on M88 phy.\n");
ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
- 100000, &link);
+ 100000, &link);
if (ret_val)
goto out;
@@ -1669,7 +1852,7 @@ s32 e1000_phy_force_speed_duplex_m88(struct e1000_hw *hw)
/* Try once more */
ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
- 100000, &link);
+ 100000, &link);
if (ret_val)
goto out;
}
@@ -1755,10 +1938,8 @@ s32 e1000_phy_force_speed_duplex_ife(struct e1000_hw *hw)
if (phy->autoneg_wait_to_complete) {
DEBUGOUT("Waiting for forced speed/duplex link on IFE phy.\n");
- ret_val = e1000_phy_has_link_generic(hw,
- PHY_FORCE_LIMIT,
- 100000,
- &link);
+ ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
+ 100000, &link);
if (ret_val)
goto out;
@@ -1766,10 +1947,8 @@ s32 e1000_phy_force_speed_duplex_ife(struct e1000_hw *hw)
DEBUGOUT("Link taking longer than expected.\n");
/* Try once more */
- ret_val = e1000_phy_has_link_generic(hw,
- PHY_FORCE_LIMIT,
- 100000,
- &link);
+ ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
+ 100000, &link);
if (ret_val)
goto out;
}
@@ -1872,7 +2051,7 @@ s32 e1000_set_d3_lplu_state_generic(struct e1000_hw *hw, bool active)
if (!active) {
data &= ~IGP02E1000_PM_D3_LPLU;
ret_val = phy->ops.write_reg(hw, IGP02E1000_PHY_POWER_MGMT,
- data);
+ data);
if (ret_val)
goto out;
/*
@@ -1883,49 +2062,49 @@ s32 e1000_set_d3_lplu_state_generic(struct e1000_hw *hw, bool active)
*/
if (phy->smart_speed == e1000_smart_speed_on) {
ret_val = phy->ops.read_reg(hw,
- IGP01E1000_PHY_PORT_CONFIG,
- &data);
+ IGP01E1000_PHY_PORT_CONFIG,
+ &data);
if (ret_val)
goto out;
data |= IGP01E1000_PSCFR_SMART_SPEED;
ret_val = phy->ops.write_reg(hw,
- IGP01E1000_PHY_PORT_CONFIG,
- data);
+ IGP01E1000_PHY_PORT_CONFIG,
+ data);
if (ret_val)
goto out;
} else if (phy->smart_speed == e1000_smart_speed_off) {
ret_val = phy->ops.read_reg(hw,
- IGP01E1000_PHY_PORT_CONFIG,
- &data);
+ IGP01E1000_PHY_PORT_CONFIG,
+ &data);
if (ret_val)
goto out;
data &= ~IGP01E1000_PSCFR_SMART_SPEED;
ret_val = phy->ops.write_reg(hw,
- IGP01E1000_PHY_PORT_CONFIG,
- data);
+ IGP01E1000_PHY_PORT_CONFIG,
+ data);
if (ret_val)
goto out;
}
} else if ((phy->autoneg_advertised == E1000_ALL_SPEED_DUPLEX) ||
- (phy->autoneg_advertised == E1000_ALL_NOT_GIG) ||
- (phy->autoneg_advertised == E1000_ALL_10_SPEED)) {
+ (phy->autoneg_advertised == E1000_ALL_NOT_GIG) ||
+ (phy->autoneg_advertised == E1000_ALL_10_SPEED)) {
data |= IGP02E1000_PM_D3_LPLU;
ret_val = phy->ops.write_reg(hw, IGP02E1000_PHY_POWER_MGMT,
- data);
+ data);
if (ret_val)
goto out;
/* When LPLU is enabled, we should disable SmartSpeed */
ret_val = phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_CONFIG,
- &data);
+ &data);
if (ret_val)
goto out;
data &= ~IGP01E1000_PSCFR_SMART_SPEED;
ret_val = phy->ops.write_reg(hw, IGP01E1000_PHY_PORT_CONFIG,
- data);
+ data);
}
out:
@@ -1953,14 +2132,14 @@ s32 e1000_check_downshift_generic(struct e1000_hw *hw)
case e1000_phy_gg82563:
case e1000_phy_bm:
case e1000_phy_82578:
- offset = M88E1000_PHY_SPEC_STATUS;
- mask = M88E1000_PSSR_DOWNSHIFT;
+ offset = M88E1000_PHY_SPEC_STATUS;
+ mask = M88E1000_PSSR_DOWNSHIFT;
break;
case e1000_phy_igp:
case e1000_phy_igp_2:
case e1000_phy_igp_3:
- offset = IGP01E1000_PHY_LINK_HEALTH;
- mask = IGP01E1000_PLHR_SS_DOWNGRADE;
+ offset = IGP01E1000_PHY_LINK_HEALTH;
+ mask = IGP01E1000_PLHR_SS_DOWNGRADE;
break;
default:
/* speed downshift not supported */
@@ -1998,8 +2177,8 @@ s32 e1000_check_polarity_m88(struct e1000_hw *hw)
if (!ret_val)
phy->cable_polarity = (data & M88E1000_PSSR_REV_POLARITY)
- ? e1000_rev_polarity_reversed
- : e1000_rev_polarity_normal;
+ ? e1000_rev_polarity_reversed
+ : e1000_rev_polarity_normal;
return ret_val;
}
@@ -2031,23 +2210,23 @@ s32 e1000_check_polarity_igp(struct e1000_hw *hw)
if ((data & IGP01E1000_PSSR_SPEED_MASK) ==
IGP01E1000_PSSR_SPEED_1000MBPS) {
- offset = IGP01E1000_PHY_PCS_INIT_REG;
- mask = IGP01E1000_PHY_POLARITY_MASK;
+ offset = IGP01E1000_PHY_PCS_INIT_REG;
+ mask = IGP01E1000_PHY_POLARITY_MASK;
} else {
/*
* This really only applies to 10Mbps since
* there is no polarity for 100Mbps (always 0).
*/
- offset = IGP01E1000_PHY_PORT_STATUS;
- mask = IGP01E1000_PSSR_POLARITY_REVERSED;
+ offset = IGP01E1000_PHY_PORT_STATUS;
+ mask = IGP01E1000_PSSR_POLARITY_REVERSED;
}
ret_val = phy->ops.read_reg(hw, offset, &data);
if (!ret_val)
phy->cable_polarity = (data & mask)
- ? e1000_rev_polarity_reversed
- : e1000_rev_polarity_normal;
+ ? e1000_rev_polarity_reversed
+ : e1000_rev_polarity_normal;
out:
return ret_val;
@@ -2082,8 +2261,8 @@ s32 e1000_check_polarity_ife(struct e1000_hw *hw)
if (!ret_val)
phy->cable_polarity = (phy_data & mask)
- ? e1000_rev_polarity_reversed
- : e1000_rev_polarity_normal;
+ ? e1000_rev_polarity_reversed
+ : e1000_rev_polarity_normal;
return ret_val;
}
@@ -2135,7 +2314,7 @@ s32 e1000_wait_autoneg_generic(struct e1000_hw *hw)
* Polls the PHY status register for link, 'iterations' number of times.
**/
s32 e1000_phy_has_link_generic(struct e1000_hw *hw, u32 iterations,
- u32 usec_interval, bool *success)
+ u32 usec_interval, bool *success)
{
s32 ret_val = E1000_SUCCESS;
u16 i, phy_status;
@@ -2203,7 +2382,7 @@ s32 e1000_get_cable_length_m88(struct e1000_hw *hw)
goto out;
index = (phy_data & M88E1000_PSSR_CABLE_LENGTH) >>
- M88E1000_PSSR_CABLE_LENGTH_SHIFT;
+ M88E1000_PSSR_CABLE_LENGTH_SHIFT;
if (index >= M88E1000_CABLE_LENGTH_TABLE_SIZE - 1) {
ret_val = -E1000_ERR_PHY;
goto out;
@@ -2250,14 +2429,14 @@ s32 e1000_get_cable_length_m88_gen2(struct e1000_hw *hw)
if (ret_val)
goto out;
- is_cm = !(phy_data & I347AT4_PCDC_CABLE_LENGTH_UNIT);
+ is_cm = !(phy_data2 & I347AT4_PCDC_CABLE_LENGTH_UNIT);
/* Populate the phy structure with cable length in meters */
phy->min_cable_length = phy_data / (is_cm ? 100 : 1);
phy->max_cable_length = phy_data / (is_cm ? 100 : 1);
phy->cable_length = phy_data / (is_cm ? 100 : 1);
- /* Reset the page selec to its original value */
+ /* Reset the page select to its original value */
ret_val = phy->ops.write_reg(hw, I347AT4_PAGE_SELECT,
default_page);
if (ret_val)
@@ -2327,10 +2506,10 @@ s32 e1000_get_cable_length_igp_2(struct e1000_hw *hw)
u16 cur_agc_index, max_agc_index = 0;
u16 min_agc_index = IGP02E1000_CABLE_LENGTH_TABLE_SIZE - 1;
static const u16 agc_reg_array[IGP02E1000_PHY_CHANNEL_NUM] = {
- IGP02E1000_PHY_AGC_A,
- IGP02E1000_PHY_AGC_B,
- IGP02E1000_PHY_AGC_C,
- IGP02E1000_PHY_AGC_D
+ IGP02E1000_PHY_AGC_A,
+ IGP02E1000_PHY_AGC_B,
+ IGP02E1000_PHY_AGC_C,
+ IGP02E1000_PHY_AGC_D
};
DEBUGFUNC("e1000_get_cable_length_igp_2");
@@ -2348,7 +2527,7 @@ s32 e1000_get_cable_length_igp_2(struct e1000_hw *hw)
* approximate cable length.
*/
cur_agc_index = (phy_data >> IGP02E1000_AGC_LENGTH_SHIFT) &
- IGP02E1000_AGC_LENGTH_MASK;
+ IGP02E1000_AGC_LENGTH_MASK;
/* Array index bound check. */
if ((cur_agc_index >= IGP02E1000_CABLE_LENGTH_TABLE_SIZE) ||
@@ -2369,12 +2548,12 @@ s32 e1000_get_cable_length_igp_2(struct e1000_hw *hw)
}
agc_value -= (e1000_igp_2_cable_length_table[min_agc_index] +
- e1000_igp_2_cable_length_table[max_agc_index]);
+ e1000_igp_2_cable_length_table[max_agc_index]);
agc_value /= (IGP02E1000_PHY_CHANNEL_NUM - 2);
/* Calculate cable length with the error range of +/- 10 meters. */
phy->min_cable_length = ((agc_value - IGP02E1000_AGC_RANGE) > 0) ?
- (agc_value - IGP02E1000_AGC_RANGE) : 0;
+ (agc_value - IGP02E1000_AGC_RANGE) : 0;
phy->max_cable_length = agc_value + IGP02E1000_AGC_RANGE;
phy->cable_length = (phy->min_cable_length + phy->max_cable_length) / 2;
@@ -2423,7 +2602,7 @@ s32 e1000_get_phy_info_m88(struct e1000_hw *hw)
goto out;
phy->polarity_correction = (phy_data & M88E1000_PSCR_POLARITY_REVERSAL)
- ? TRUE : FALSE;
+ ? TRUE : FALSE;
ret_val = e1000_check_polarity_m88(hw);
if (ret_val)
@@ -2445,12 +2624,12 @@ s32 e1000_get_phy_info_m88(struct e1000_hw *hw)
goto out;
phy->local_rx = (phy_data & SR_1000T_LOCAL_RX_STATUS)
- ? e1000_1000t_rx_status_ok
- : e1000_1000t_rx_status_not_ok;
+ ? e1000_1000t_rx_status_ok
+ : e1000_1000t_rx_status_not_ok;
phy->remote_rx = (phy_data & SR_1000T_REMOTE_RX_STATUS)
- ? e1000_1000t_rx_status_ok
- : e1000_1000t_rx_status_not_ok;
+ ? e1000_1000t_rx_status_ok
+ : e1000_1000t_rx_status_not_ok;
} else {
/* Set values to "undefined" */
phy->cable_length = E1000_CABLE_LENGTH_UNDEFINED;
@@ -2513,12 +2692,12 @@ s32 e1000_get_phy_info_igp(struct e1000_hw *hw)
goto out;
phy->local_rx = (data & SR_1000T_LOCAL_RX_STATUS)
- ? e1000_1000t_rx_status_ok
- : e1000_1000t_rx_status_not_ok;
+ ? e1000_1000t_rx_status_ok
+ : e1000_1000t_rx_status_not_ok;
phy->remote_rx = (data & SR_1000T_REMOTE_RX_STATUS)
- ? e1000_1000t_rx_status_ok
- : e1000_1000t_rx_status_not_ok;
+ ? e1000_1000t_rx_status_ok
+ : e1000_1000t_rx_status_not_ok;
} else {
phy->cable_length = E1000_CABLE_LENGTH_UNDEFINED;
phy->local_rx = e1000_1000t_rx_status_undefined;
@@ -2558,7 +2737,7 @@ s32 e1000_get_phy_info_ife(struct e1000_hw *hw)
if (ret_val)
goto out;
phy->polarity_correction = (data & IFE_PSC_AUTO_POLARITY_DISABLE)
- ? FALSE : TRUE;
+ ? FALSE : TRUE;
if (phy->polarity_correction) {
ret_val = e1000_check_polarity_ife(hw);
@@ -2567,8 +2746,8 @@ s32 e1000_get_phy_info_ife(struct e1000_hw *hw)
} else {
/* Polarity is forced */
phy->cable_polarity = (data & IFE_PSC_FORCE_POLARITY)
- ? e1000_rev_polarity_reversed
- : e1000_rev_polarity_normal;
+ ? e1000_rev_polarity_reversed
+ : e1000_rev_polarity_normal;
}
ret_val = phy->ops.read_reg(hw, IFE_PHY_MDIX_CONTROL, &data);
@@ -2903,7 +3082,7 @@ s32 e1000_write_phy_reg_bm(struct e1000_hw *hw, u32 offset, u16 data)
/* Page 800 works differently than the rest so it has its own func */
if (page == BM_WUC_PAGE) {
ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, &data,
- FALSE);
+ FALSE, FALSE);
goto out;
}
@@ -2927,13 +3106,13 @@ s32 e1000_write_phy_reg_bm(struct e1000_hw *hw, u32 offset, u16 data)
/* Page is shifted left, PHY expects (page x 32) */
ret_val = e1000_write_phy_reg_mdic(hw, page_select,
- (page << page_shift));
+ (page << page_shift));
if (ret_val)
goto out;
}
ret_val = e1000_write_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset,
- data);
+ data);
out:
hw->phy.ops.release(hw);
@@ -2964,7 +3143,7 @@ s32 e1000_read_phy_reg_bm(struct e1000_hw *hw, u32 offset, u16 *data)
/* Page 800 works differently than the rest so it has its own func */
if (page == BM_WUC_PAGE) {
ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, data,
- TRUE);
+ TRUE, FALSE);
goto out;
}
@@ -2988,13 +3167,13 @@ s32 e1000_read_phy_reg_bm(struct e1000_hw *hw, u32 offset, u16 *data)
/* Page is shifted left, PHY expects (page x 32) */
ret_val = e1000_write_phy_reg_mdic(hw, page_select,
- (page << page_shift));
+ (page << page_shift));
if (ret_val)
goto out;
}
ret_val = e1000_read_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset,
- data);
+ data);
out:
hw->phy.ops.release(hw);
return ret_val;
@@ -3015,7 +3194,7 @@ s32 e1000_read_phy_reg_bm2(struct e1000_hw *hw, u32 offset, u16 *data)
s32 ret_val;
u16 page = (u16)(offset >> IGP_PAGE_SHIFT);
- DEBUGFUNC("e1000_write_phy_reg_bm2");
+ DEBUGFUNC("e1000_read_phy_reg_bm2");
ret_val = hw->phy.ops.acquire(hw);
if (ret_val)
@@ -3024,7 +3203,7 @@ s32 e1000_read_phy_reg_bm2(struct e1000_hw *hw, u32 offset, u16 *data)
/* Page 800 works differently than the rest so it has its own func */
if (page == BM_WUC_PAGE) {
ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, data,
- TRUE);
+ TRUE, FALSE);
goto out;
}
@@ -3034,14 +3213,14 @@ s32 e1000_read_phy_reg_bm2(struct e1000_hw *hw, u32 offset, u16 *data)
/* Page is shifted left, PHY expects (page x 32) */
ret_val = e1000_write_phy_reg_mdic(hw, BM_PHY_PAGE_SELECT,
- page);
+ page);
if (ret_val)
goto out;
}
ret_val = e1000_read_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset,
- data);
+ data);
out:
hw->phy.ops.release(hw);
return ret_val;
@@ -3070,7 +3249,7 @@ s32 e1000_write_phy_reg_bm2(struct e1000_hw *hw, u32 offset, u16 data)
/* Page 800 works differently than the rest so it has its own func */
if (page == BM_WUC_PAGE) {
ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, &data,
- FALSE);
+ FALSE, FALSE);
goto out;
}
@@ -3079,14 +3258,14 @@ s32 e1000_write_phy_reg_bm2(struct e1000_hw *hw, u32 offset, u16 data)
if (offset > MAX_PHY_MULTI_PAGE_REG) {
/* Page is shifted left, PHY expects (page x 32) */
ret_val = e1000_write_phy_reg_mdic(hw, BM_PHY_PAGE_SELECT,
- page);
+ page);
if (ret_val)
goto out;
}
ret_val = e1000_write_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset,
- data);
+ data);
out:
hw->phy.ops.release(hw);
@@ -3094,106 +3273,176 @@ out:
}
/**
- * e1000_access_phy_wakeup_reg_bm - Read BM PHY wakeup register
+ * e1000_enable_phy_wakeup_reg_access_bm - enable access to BM wakeup registers
* @hw: pointer to the HW structure
- * @offset: register offset to be read or written
- * @data: pointer to the data to read or write
- * @read: determines if operation is read or write
- *
- * Acquires semaphore, if necessary, then reads the PHY register at offset
- * and storing the retrieved information in data. Release any acquired
- * semaphores before exiting. Note that procedure to read the wakeup
- * registers are different. It works as such:
- * 1) Set page 769, register 17, bit 2 = 1
- * 2) Set page to 800 for host (801 if we were manageability)
- * 3) Write the address using the address opcode (0x11)
- * 4) Read or write the data using the data opcode (0x12)
- * 5) Restore 769_17.2 to its original value
+ * @phy_reg: pointer to store original contents of BM_WUC_ENABLE_REG
*
- * Assumes semaphore already acquired.
+ * Assumes semaphore already acquired and phy_reg points to a valid memory
+ * address to store contents of the BM_WUC_ENABLE_REG register.
**/
-static s32 e1000_access_phy_wakeup_reg_bm(struct e1000_hw *hw, u32 offset,
- u16 *data, bool read)
+s32 e1000_enable_phy_wakeup_reg_access_bm(struct e1000_hw *hw, u16 *phy_reg)
{
s32 ret_val;
- u16 reg = BM_PHY_REG_NUM(offset);
- u16 phy_reg = 0;
+ u16 temp;
- DEBUGFUNC("e1000_access_phy_wakeup_reg_bm");
+ DEBUGFUNC("e1000_enable_phy_wakeup_reg_access_bm");
- /* Gig must be disabled for MDIO accesses to page 800 */
- if ((hw->mac.type == e1000_pchlan) &&
- (!(E1000_READ_REG(hw, E1000_PHY_CTRL) & E1000_PHY_CTRL_GBE_DISABLE)))
- DEBUGOUT("Attempting to access page 800 while gig enabled.\n");
+ if (!phy_reg) {
+ ret_val = -E1000_ERR_PARAM;
+ goto out;
+ }
- /* All operations in this function are phy address 1 */
+ /* All page select, port ctrl and wakeup registers use phy address 1 */
hw->phy.addr = 1;
- /* Set page 769 */
- e1000_write_phy_reg_mdic(hw, IGP01E1000_PHY_PAGE_SELECT,
- (BM_WUC_ENABLE_PAGE << IGP_PAGE_SHIFT));
+ /* Select Port Control Registers page */
+ ret_val = e1000_set_page_igp(hw, (BM_PORT_CTRL_PAGE << IGP_PAGE_SHIFT));
+ if (ret_val) {
+ DEBUGOUT("Could not set Port Control page\n");
+ goto out;
+ }
- ret_val = e1000_read_phy_reg_mdic(hw, BM_WUC_ENABLE_REG, &phy_reg);
+ ret_val = e1000_read_phy_reg_mdic(hw, BM_WUC_ENABLE_REG, phy_reg);
if (ret_val) {
- DEBUGOUT("Could not read PHY page 769\n");
+ DEBUGOUT2("Could not read PHY register %d.%d\n",
+ BM_PORT_CTRL_PAGE, BM_WUC_ENABLE_REG);
goto out;
}
- /* First clear bit 4 to avoid a power state change */
- phy_reg &= ~(BM_WUC_HOST_WU_BIT);
- ret_val = e1000_write_phy_reg_mdic(hw, BM_WUC_ENABLE_REG, phy_reg);
+ /*
+ * Enable both PHY wakeup mode and Wakeup register page writes.
+ * Prevent a power state change by disabling ME and Host PHY wakeup.
+ */
+ temp = *phy_reg;
+ temp |= BM_WUC_ENABLE_BIT;
+ temp &= ~(BM_WUC_ME_WU_BIT | BM_WUC_HOST_WU_BIT);
+
+ ret_val = e1000_write_phy_reg_mdic(hw, BM_WUC_ENABLE_REG, temp);
if (ret_val) {
- DEBUGOUT("Could not clear PHY page 769 bit 4\n");
+ DEBUGOUT2("Could not write PHY register %d.%d\n",
+ BM_PORT_CTRL_PAGE, BM_WUC_ENABLE_REG);
goto out;
}
- /* Write bit 2 = 1, and clear bit 4 to 769_17 */
- ret_val = e1000_write_phy_reg_mdic(hw, BM_WUC_ENABLE_REG,
- phy_reg | BM_WUC_ENABLE_BIT);
+ /* Select Host Wakeup Registers page */
+ ret_val = e1000_set_page_igp(hw, (BM_WUC_PAGE << IGP_PAGE_SHIFT));
+
+ /* caller now able to write registers on the Wakeup registers page */
+out:
+ return ret_val;
+}
+
+/**
+ * e1000_disable_phy_wakeup_reg_access_bm - disable access to BM wakeup regs
+ * @hw: pointer to the HW structure
+ * @phy_reg: pointer to original contents of BM_WUC_ENABLE_REG
+ *
+ * Restore BM_WUC_ENABLE_REG to its original value.
+ *
+ * Assumes semaphore already acquired and *phy_reg is the contents of the
+ * BM_WUC_ENABLE_REG before register(s) on BM_WUC_PAGE were accessed by
+ * caller.
+ **/
+s32 e1000_disable_phy_wakeup_reg_access_bm(struct e1000_hw *hw, u16 *phy_reg)
+{
+ s32 ret_val = E1000_SUCCESS;
+
+ DEBUGFUNC("e1000_disable_phy_wakeup_reg_access_bm");
+
+ if (!phy_reg)
+ return -E1000_ERR_PARAM;
+
+ /* Select Port Control Registers page */
+ ret_val = e1000_set_page_igp(hw, (BM_PORT_CTRL_PAGE << IGP_PAGE_SHIFT));
if (ret_val) {
- DEBUGOUT("Could not write PHY page 769 bit 2\n");
+ DEBUGOUT("Could not set Port Control page\n");
goto out;
}
- /* Select page 800 */
- ret_val = e1000_write_phy_reg_mdic(hw, IGP01E1000_PHY_PAGE_SELECT,
- (BM_WUC_PAGE << IGP_PAGE_SHIFT));
+ /* Restore 769.17 to its original value */
+ ret_val = e1000_write_phy_reg_mdic(hw, BM_WUC_ENABLE_REG, *phy_reg);
+ if (ret_val)
+ DEBUGOUT2("Could not restore PHY register %d.%d\n",
+ BM_PORT_CTRL_PAGE, BM_WUC_ENABLE_REG);
+out:
+ return ret_val;
+}
- /* Write the page 800 offset value using opcode 0x11 */
+/**
+ * e1000_access_phy_wakeup_reg_bm - Read/write BM PHY wakeup register
+ * @hw: pointer to the HW structure
+ * @offset: register offset to be read or written
+ * @data: pointer to the data to read or write
+ * @read: determines if operation is read or write
+ * @page_set: BM_WUC_PAGE already set and access enabled
+ *
+ * Read the PHY register at offset and store the retrieved information in
+ * data, or write data to PHY register at offset. Note the procedure to
+ * access the PHY wakeup registers is different than reading the other PHY
+ * registers. It works as such:
+ * 1) Set 769.17.2 (page 769, register 17, bit 2) = 1
+ * 2) Set page to 800 for host (801 if we were manageability)
+ * 3) Write the address using the address opcode (0x11)
+ * 4) Read or write the data using the data opcode (0x12)
+ * 5) Restore 769.17.2 to its original value
+ *
+ * Steps 1 and 2 are done by e1000_enable_phy_wakeup_reg_access_bm() and
+ * step 5 is done by e1000_disable_phy_wakeup_reg_access_bm().
+ *
+ * Assumes semaphore is already acquired. When page_set==TRUE, assumes
+ * the PHY page is set to BM_WUC_PAGE (i.e. a function in the call stack
+ * is responsible for calls to e1000_[enable|disable]_phy_wakeup_reg_bm()).
+ **/
+static s32 e1000_access_phy_wakeup_reg_bm(struct e1000_hw *hw, u32 offset,
+ u16 *data, bool read, bool page_set)
+{
+ s32 ret_val;
+ u16 reg = BM_PHY_REG_NUM(offset);
+ u16 phy_reg = 0;
+
+ DEBUGFUNC("e1000_access_phy_wakeup_reg_bm");
+
+ /* Gig must be disabled for MDIO accesses to Host Wakeup reg page */
+ if ((hw->mac.type == e1000_pchlan) &&
+ (!(E1000_READ_REG(hw, E1000_PHY_CTRL) & E1000_PHY_CTRL_GBE_DISABLE)))
+ DEBUGOUT1("Attempting to access page %d while gig enabled.\n",
+ page);
+
+ if (!page_set) {
+ /* Enable access to PHY wakeup registers */
+ ret_val = e1000_enable_phy_wakeup_reg_access_bm(hw, &phy_reg);
+ if (ret_val) {
+ DEBUGOUT("Could not enable PHY wakeup reg access\n");
+ goto out;
+ }
+ }
+
+ DEBUGOUT2("Accessing PHY page %d reg 0x%x\n", page, reg);
+
+ /* Write the Wakeup register page offset value using opcode 0x11 */
ret_val = e1000_write_phy_reg_mdic(hw, BM_WUC_ADDRESS_OPCODE, reg);
if (ret_val) {
- DEBUGOUT("Could not write address opcode to page 800\n");
+ DEBUGOUT1("Could not write address opcode to page %d\n", page);
goto out;
}
if (read) {
- /* Read the page 800 value using opcode 0x12 */
+ /* Read the Wakeup register page value using opcode 0x12 */
ret_val = e1000_read_phy_reg_mdic(hw, BM_WUC_DATA_OPCODE,
- data);
+ data);
} else {
- /* Write the page 800 value using opcode 0x12 */
+ /* Write the Wakeup register page value using opcode 0x12 */
ret_val = e1000_write_phy_reg_mdic(hw, BM_WUC_DATA_OPCODE,
- *data);
+ *data);
}
if (ret_val) {
- DEBUGOUT("Could not access data value from page 800\n");
+ DEBUGOUT2("Could not access PHY reg %d.%d\n", page, reg);
goto out;
}
- /*
- * Restore 769_17.2 to its original value
- * Set page 769
- */
- e1000_write_phy_reg_mdic(hw, IGP01E1000_PHY_PAGE_SELECT,
- (BM_WUC_ENABLE_PAGE << IGP_PAGE_SHIFT));
-
- /* Clear 769_17.2 */
- ret_val = e1000_write_phy_reg_mdic(hw, BM_WUC_ENABLE_REG, phy_reg);
- if (ret_val) {
- DEBUGOUT("Could not clear PHY page 769 bit 2\n");
- goto out;
- }
+ if (!page_set)
+ ret_val = e1000_disable_phy_wakeup_reg_access_bm(hw, &phy_reg);
out:
return ret_val;
@@ -3248,11 +3497,12 @@ void e1000_power_down_phy_copper(struct e1000_hw *hw)
* semaphore before exiting.
**/
static s32 __e1000_read_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 *data,
- bool locked)
+ bool locked, bool page_set)
{
s32 ret_val;
u16 page = BM_PHY_REG_PAGE(offset);
u16 reg = BM_PHY_REG_NUM(offset);
+ u32 phy_addr = hw->phy.addr = e1000_get_phy_addr_for_hv_page(page);
DEBUGFUNC("__e1000_read_phy_reg_hv");
@@ -3264,39 +3514,38 @@ static s32 __e1000_read_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 *data,
/* Page 800 works differently than the rest so it has its own func */
if (page == BM_WUC_PAGE) {
- ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset,
- data, TRUE);
+ ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, data,
+ TRUE, page_set);
goto out;
}
if (page > 0 && page < HV_INTC_FC_PAGE_START) {
ret_val = e1000_access_phy_debug_regs_hv(hw, offset,
- data, TRUE);
+ data, TRUE);
goto out;
}
- hw->phy.addr = e1000_get_phy_addr_for_hv_page(page);
+ if (!page_set) {
+ if (page == HV_INTC_FC_PAGE_START)
+ page = 0;
- if (page == HV_INTC_FC_PAGE_START)
- page = 0;
+ if (reg > MAX_PHY_MULTI_PAGE_REG) {
+ /* Page is shifted left, PHY expects (page x 32) */
+ ret_val = e1000_set_page_igp(hw,
+ (page << IGP_PAGE_SHIFT));
- if (reg > MAX_PHY_MULTI_PAGE_REG) {
- u32 phy_addr = hw->phy.addr;
+ hw->phy.addr = phy_addr;
- hw->phy.addr = 1;
-
- /* Page is shifted left, PHY expects (page x 32) */
- ret_val = e1000_write_phy_reg_mdic(hw,
- IGP01E1000_PHY_PAGE_SELECT,
- (page << IGP_PAGE_SHIFT));
- hw->phy.addr = phy_addr;
-
- if (ret_val)
- goto out;
+ if (ret_val)
+ goto out;
+ }
}
+ DEBUGOUT3("reading PHY page %d (or 0x%x shifted) reg 0x%x\n", page,
+ page << IGP_PAGE_SHIFT, reg);
+
ret_val = e1000_read_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & reg,
- data);
+ data);
out:
if (!locked)
hw->phy.ops.release(hw);
@@ -3316,7 +3565,7 @@ out:
**/
s32 e1000_read_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 *data)
{
- return __e1000_read_phy_reg_hv(hw, offset, data, FALSE);
+ return __e1000_read_phy_reg_hv(hw, offset, data, FALSE, FALSE);
}
/**
@@ -3330,7 +3579,21 @@ s32 e1000_read_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 *data)
**/
s32 e1000_read_phy_reg_hv_locked(struct e1000_hw *hw, u32 offset, u16 *data)
{
- return __e1000_read_phy_reg_hv(hw, offset, data, TRUE);
+ return __e1000_read_phy_reg_hv(hw, offset, data, TRUE, FALSE);
+}
+
+/**
+ * e1000_read_phy_reg_page_hv - Read HV PHY register
+ * @hw: pointer to the HW structure
+ * @offset: register offset to write to
+ * @data: data to write at register offset
+ *
+ * Reads the PHY register at offset and stores the retrieved information
+ * in data. Assumes semaphore already acquired and page already set.
+ **/
+s32 e1000_read_phy_reg_page_hv(struct e1000_hw *hw, u32 offset, u16 *data)
+{
+ return __e1000_read_phy_reg_hv(hw, offset, data, TRUE, true);
}
/**
@@ -3344,11 +3607,12 @@ s32 e1000_read_phy_reg_hv_locked(struct e1000_hw *hw, u32 offset, u16 *data)
* at the offset. Release any acquired semaphores before exiting.
**/
static s32 __e1000_write_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 data,
- bool locked)
+ bool locked, bool page_set)
{
s32 ret_val;
u16 page = BM_PHY_REG_PAGE(offset);
u16 reg = BM_PHY_REG_NUM(offset);
+ u32 phy_addr = hw->phy.addr = e1000_get_phy_addr_for_hv_page(page);
DEBUGFUNC("__e1000_write_phy_reg_hv");
@@ -3360,55 +3624,55 @@ static s32 __e1000_write_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 data,
/* Page 800 works differently than the rest so it has its own func */
if (page == BM_WUC_PAGE) {
- ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset,
- &data, FALSE);
+ ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, &data,
+ FALSE, page_set);
goto out;
}
if (page > 0 && page < HV_INTC_FC_PAGE_START) {
ret_val = e1000_access_phy_debug_regs_hv(hw, offset,
- &data, FALSE);
+ &data, FALSE);
goto out;
}
- hw->phy.addr = e1000_get_phy_addr_for_hv_page(page);
+ if (!page_set) {
+ if (page == HV_INTC_FC_PAGE_START)
+ page = 0;
- if (page == HV_INTC_FC_PAGE_START)
- page = 0;
-
- /*
- * Workaround MDIO accesses being disabled after entering IEEE Power
- * Down (whenever bit 11 of the PHY Control register is set)
- */
- if ((hw->phy.type == e1000_phy_82578) &&
- (hw->phy.revision >= 1) &&
- (hw->phy.addr == 2) &&
- ((MAX_PHY_REG_ADDRESS & reg) == 0) &&
- (data & (1 << 11))) {
- u16 data2 = 0x7EFF;
- ret_val = e1000_access_phy_debug_regs_hv(hw, (1 << 6) | 0x3,
- &data2, FALSE);
- if (ret_val)
- goto out;
- }
-
- if (reg > MAX_PHY_MULTI_PAGE_REG) {
- u32 phy_addr = hw->phy.addr;
+ /*
+ * Workaround MDIO accesses being disabled after entering IEEE
+ * Power Down (when bit 11 of the PHY Control register is set)
+ */
+ if ((hw->phy.type == e1000_phy_82578) &&
+ (hw->phy.revision >= 1) &&
+ (hw->phy.addr == 2) &&
+ ((MAX_PHY_REG_ADDRESS & reg) == 0) &&
+ (data & (1 << 11))) {
+ u16 data2 = 0x7EFF;
+ ret_val = e1000_access_phy_debug_regs_hv(hw,
+ (1 << 6) | 0x3,
+ &data2, FALSE);
+ if (ret_val)
+ goto out;
+ }
- hw->phy.addr = 1;
+ if (reg > MAX_PHY_MULTI_PAGE_REG) {
+ /* Page is shifted left, PHY expects (page x 32) */
+ ret_val = e1000_set_page_igp(hw,
+ (page << IGP_PAGE_SHIFT));
- /* Page is shifted left, PHY expects (page x 32) */
- ret_val = e1000_write_phy_reg_mdic(hw,
- IGP01E1000_PHY_PAGE_SELECT,
- (page << IGP_PAGE_SHIFT));
- hw->phy.addr = phy_addr;
+ hw->phy.addr = phy_addr;
- if (ret_val)
- goto out;
+ if (ret_val)
+ goto out;
+ }
}
+ DEBUGOUT3("writing PHY page %d (or 0x%x shifted) reg 0x%x\n", page,
+ page << IGP_PAGE_SHIFT, reg);
+
ret_val = e1000_write_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & reg,
- data);
+ data);
out:
if (!locked)
@@ -3428,7 +3692,7 @@ out:
**/
s32 e1000_write_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 data)
{
- return __e1000_write_phy_reg_hv(hw, offset, data, FALSE);
+ return __e1000_write_phy_reg_hv(hw, offset, data, FALSE, FALSE);
}
/**
@@ -3442,7 +3706,21 @@ s32 e1000_write_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 data)
**/
s32 e1000_write_phy_reg_hv_locked(struct e1000_hw *hw, u32 offset, u16 data)
{
- return __e1000_write_phy_reg_hv(hw, offset, data, TRUE);
+ return __e1000_write_phy_reg_hv(hw, offset, data, TRUE, FALSE);
+}
+
+/**
+ * e1000_write_phy_reg_page_hv - Write HV PHY register
+ * @hw: pointer to the HW structure
+ * @offset: register offset to write to
+ * @data: data to write at register offset
+ *
+ * Writes the data to PHY register at the offset. Assumes semaphore
+ * already acquired and page already set.
+ **/
+s32 e1000_write_phy_reg_page_hv(struct e1000_hw *hw, u32 offset, u16 data)
+{
+ return __e1000_write_phy_reg_hv(hw, offset, data, TRUE, true);
}
/**
@@ -3464,14 +3742,15 @@ static u32 e1000_get_phy_addr_for_hv_page(u32 page)
* @hw: pointer to the HW structure
* @offset: register offset to be read or written
* @data: pointer to the data to be read or written
- * @read: determines if operation is read or written
+ * @read: determines if operation is read or write
*
* Reads the PHY register at offset and stores the retreived information
* in data. Assumes semaphore already acquired. Note that the procedure
- * to read these regs uses the address port and data port to read/write.
+ * to access these regs uses the address port and data port to read/write.
+ * These accesses done with PHY address 2 and without using pages.
**/
static s32 e1000_access_phy_debug_regs_hv(struct e1000_hw *hw, u32 offset,
- u16 *data, bool read)
+ u16 *data, bool read)
{
s32 ret_val;
u32 addr_reg = 0;
@@ -3481,7 +3760,7 @@ static s32 e1000_access_phy_debug_regs_hv(struct e1000_hw *hw, u32 offset,
/* This takes care of the difference with desktop vs mobile phy */
addr_reg = (hw->phy.type == e1000_phy_82578) ?
- I82578_ADDR_REG : I82577_ADDR_REG;
+ I82578_ADDR_REG : I82577_ADDR_REG;
data_reg = addr_reg + 1;
/* All operations in this function are phy address 2 */
@@ -3490,7 +3769,7 @@ static s32 e1000_access_phy_debug_regs_hv(struct e1000_hw *hw, u32 offset,
/* masking with 0x3F to remove the page from offset */
ret_val = e1000_write_phy_reg_mdic(hw, addr_reg, (u16)offset & 0x3F);
if (ret_val) {
- DEBUGOUT("Could not write PHY the HV address register\n");
+ DEBUGOUT("Could not write the Address Offset port register\n");
goto out;
}
@@ -3501,7 +3780,7 @@ static s32 e1000_access_phy_debug_regs_hv(struct e1000_hw *hw, u32 offset,
ret_val = e1000_write_phy_reg_mdic(hw, data_reg, *data);
if (ret_val) {
- DEBUGOUT("Could not read data value from HV data register\n");
+ DEBUGOUT("Could not access the Data port register\n");
goto out;
}
@@ -3540,26 +3819,24 @@ s32 e1000_link_stall_workaround_hv(struct e1000_hw *hw)
if (ret_val)
goto out;
- data &= BM_CS_STATUS_LINK_UP |
- BM_CS_STATUS_RESOLVED |
- BM_CS_STATUS_SPEED_MASK;
+ data &= BM_CS_STATUS_LINK_UP | BM_CS_STATUS_RESOLVED |
+ BM_CS_STATUS_SPEED_MASK;
- if (data != (BM_CS_STATUS_LINK_UP |
- BM_CS_STATUS_RESOLVED |
- BM_CS_STATUS_SPEED_1000))
+ if (data != (BM_CS_STATUS_LINK_UP | BM_CS_STATUS_RESOLVED |
+ BM_CS_STATUS_SPEED_1000))
goto out;
msec_delay(200);
/* flush the packets in the fifo buffer */
ret_val = hw->phy.ops.write_reg(hw, HV_MUX_DATA_CTRL,
- HV_MUX_DATA_CTRL_GEN_TO_MAC |
- HV_MUX_DATA_CTRL_FORCE_SPEED);
+ HV_MUX_DATA_CTRL_GEN_TO_MAC |
+ HV_MUX_DATA_CTRL_FORCE_SPEED);
if (ret_val)
goto out;
ret_val = hw->phy.ops.write_reg(hw, HV_MUX_DATA_CTRL,
- HV_MUX_DATA_CTRL_GEN_TO_MAC);
+ HV_MUX_DATA_CTRL_GEN_TO_MAC);
out:
return ret_val;
@@ -3585,8 +3862,8 @@ s32 e1000_check_polarity_82577(struct e1000_hw *hw)
if (!ret_val)
phy->cable_polarity = (data & I82577_PHY_STATUS2_REV_POLARITY)
- ? e1000_rev_polarity_reversed
- : e1000_rev_polarity_normal;
+ ? e1000_rev_polarity_reversed
+ : e1000_rev_polarity_normal;
return ret_val;
}
@@ -3621,10 +3898,8 @@ s32 e1000_phy_force_speed_duplex_82577(struct e1000_hw *hw)
if (phy->autoneg_wait_to_complete) {
DEBUGOUT("Waiting for forced speed/duplex link on 82577 phy\n");
- ret_val = e1000_phy_has_link_generic(hw,
- PHY_FORCE_LIMIT,
- 100000,
- &link);
+ ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
+ 100000, &link);
if (ret_val)
goto out;
@@ -3632,10 +3907,8 @@ s32 e1000_phy_force_speed_duplex_82577(struct e1000_hw *hw)
DEBUGOUT("Link taking longer than expected.\n");
/* Try once more */
- ret_val = e1000_phy_has_link_generic(hw,
- PHY_FORCE_LIMIT,
- 100000,
- &link);
+ ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
+ 100000, &link);
if (ret_val)
goto out;
}
@@ -3695,12 +3968,12 @@ s32 e1000_get_phy_info_82577(struct e1000_hw *hw)
goto out;
phy->local_rx = (data & SR_1000T_LOCAL_RX_STATUS)
- ? e1000_1000t_rx_status_ok
- : e1000_1000t_rx_status_not_ok;
+ ? e1000_1000t_rx_status_ok
+ : e1000_1000t_rx_status_not_ok;
phy->remote_rx = (data & SR_1000T_REMOTE_RX_STATUS)
- ? e1000_1000t_rx_status_ok
- : e1000_1000t_rx_status_not_ok;
+ ? e1000_1000t_rx_status_ok
+ : e1000_1000t_rx_status_not_ok;
} else {
phy->cable_length = E1000_CABLE_LENGTH_UNDEFINED;
phy->local_rx = e1000_1000t_rx_status_undefined;
@@ -3731,7 +4004,7 @@ s32 e1000_get_cable_length_82577(struct e1000_hw *hw)
goto out;
length = (phy_data & I82577_DSTATUS_CABLE_LENGTH) >>
- I82577_DSTATUS_CABLE_LENGTH_SHIFT;
+ I82577_DSTATUS_CABLE_LENGTH_SHIFT;
if (length == E1000_CABLE_LENGTH_UNDEFINED)
ret_val = -E1000_ERR_PHY;
diff --git a/sys/dev/e1000/e1000_phy.h b/sys/dev/e1000/e1000_phy.h
index 0da4a88..93d0afc 100644
--- a/sys/dev/e1000/e1000_phy.h
+++ b/sys/dev/e1000/e1000_phy.h
@@ -1,6 +1,6 @@
/******************************************************************************
- Copyright (c) 2001-2010, Intel Corporation
+ Copyright (c) 2001-2011, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -40,6 +40,7 @@ s32 e1000_null_read_reg(struct e1000_hw *hw, u32 offset, u16 *data);
void e1000_null_phy_generic(struct e1000_hw *hw);
s32 e1000_null_lplu_state(struct e1000_hw *hw, bool active);
s32 e1000_null_write_reg(struct e1000_hw *hw, u32 offset, u16 data);
+s32 e1000_null_set_page(struct e1000_hw *hw, u16 data);
s32 e1000_check_downshift_generic(struct e1000_hw *hw);
s32 e1000_check_polarity_m88(struct e1000_hw *hw);
s32 e1000_check_polarity_igp(struct e1000_hw *hw);
@@ -67,6 +68,7 @@ s32 e1000_phy_hw_reset_generic(struct e1000_hw *hw);
s32 e1000_phy_reset_dsp_generic(struct e1000_hw *hw);
s32 e1000_read_kmrn_reg_generic(struct e1000_hw *hw, u32 offset, u16 *data);
s32 e1000_read_kmrn_reg_locked(struct e1000_hw *hw, u32 offset, u16 *data);
+s32 e1000_set_page_igp(struct e1000_hw *hw, u16 page);
s32 e1000_read_phy_reg_igp(struct e1000_hw *hw, u32 offset, u16 *data);
s32 e1000_read_phy_reg_igp_locked(struct e1000_hw *hw, u32 offset, u16 *data);
s32 e1000_read_phy_reg_m88(struct e1000_hw *hw, u32 offset, u16 *data);
@@ -80,12 +82,14 @@ s32 e1000_write_phy_reg_igp_locked(struct e1000_hw *hw, u32 offset, u16 data);
s32 e1000_write_phy_reg_m88(struct e1000_hw *hw, u32 offset, u16 data);
s32 e1000_phy_reset_dsp(struct e1000_hw *hw);
s32 e1000_phy_has_link_generic(struct e1000_hw *hw, u32 iterations,
- u32 usec_interval, bool *success);
+ u32 usec_interval, bool *success);
s32 e1000_phy_init_script_igp3(struct e1000_hw *hw);
enum e1000_phy_type e1000_get_phy_type_from_id(u32 phy_id);
s32 e1000_determine_phy_address(struct e1000_hw *hw);
s32 e1000_write_phy_reg_bm(struct e1000_hw *hw, u32 offset, u16 data);
s32 e1000_read_phy_reg_bm(struct e1000_hw *hw, u32 offset, u16 *data);
+s32 e1000_enable_phy_wakeup_reg_access_bm(struct e1000_hw *hw, u16 *phy_reg);
+s32 e1000_disable_phy_wakeup_reg_access_bm(struct e1000_hw *hw, u16 *phy_reg);
s32 e1000_read_phy_reg_bm2(struct e1000_hw *hw, u32 offset, u16 *data);
s32 e1000_write_phy_reg_bm2(struct e1000_hw *hw, u32 offset, u16 data);
void e1000_power_up_phy_copper(struct e1000_hw *hw);
@@ -94,10 +98,14 @@ s32 e1000_read_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 *data);
s32 e1000_write_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 data);
s32 e1000_read_phy_reg_i2c(struct e1000_hw *hw, u32 offset, u16 *data);
s32 e1000_write_phy_reg_i2c(struct e1000_hw *hw, u32 offset, u16 data);
+s32 e1000_read_sfp_data_byte(struct e1000_hw *hw, u16 offset, u8 *data);
+s32 e1000_write_sfp_data_byte(struct e1000_hw *hw, u16 offset, u8 data);
s32 e1000_read_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 *data);
s32 e1000_read_phy_reg_hv_locked(struct e1000_hw *hw, u32 offset, u16 *data);
+s32 e1000_read_phy_reg_page_hv(struct e1000_hw *hw, u32 offset, u16 *data);
s32 e1000_write_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 data);
s32 e1000_write_phy_reg_hv_locked(struct e1000_hw *hw, u32 offset, u16 data);
+s32 e1000_write_phy_reg_page_hv(struct e1000_hw *hw, u32 offset, u16 data);
s32 e1000_link_stall_workaround_hv(struct e1000_hw *hw);
s32 e1000_copper_link_setup_82577(struct e1000_hw *hw);
s32 e1000_check_polarity_82577(struct e1000_hw *hw);
@@ -105,34 +113,34 @@ s32 e1000_get_phy_info_82577(struct e1000_hw *hw);
s32 e1000_phy_force_speed_duplex_82577(struct e1000_hw *hw);
s32 e1000_get_cable_length_82577(struct e1000_hw *hw);
-#define E1000_MAX_PHY_ADDR 4
+#define E1000_MAX_PHY_ADDR 8
/* IGP01E1000 Specific Registers */
-#define IGP01E1000_PHY_PORT_CONFIG 0x10 /* Port Config */
-#define IGP01E1000_PHY_PORT_STATUS 0x11 /* Status */
-#define IGP01E1000_PHY_PORT_CTRL 0x12 /* Control */
-#define IGP01E1000_PHY_LINK_HEALTH 0x13 /* PHY Link Health */
-#define IGP01E1000_GMII_FIFO 0x14 /* GMII FIFO */
-#define IGP01E1000_PHY_CHANNEL_QUALITY 0x15 /* PHY Channel Quality */
-#define IGP02E1000_PHY_POWER_MGMT 0x19 /* Power Management */
-#define IGP01E1000_PHY_PAGE_SELECT 0x1F /* Page Select */
-#define BM_PHY_PAGE_SELECT 22 /* Page Select for BM */
-#define IGP_PAGE_SHIFT 5
-#define PHY_REG_MASK 0x1F
+#define IGP01E1000_PHY_PORT_CONFIG 0x10 /* Port Config */
+#define IGP01E1000_PHY_PORT_STATUS 0x11 /* Status */
+#define IGP01E1000_PHY_PORT_CTRL 0x12 /* Control */
+#define IGP01E1000_PHY_LINK_HEALTH 0x13 /* PHY Link Health */
+#define IGP01E1000_GMII_FIFO 0x14 /* GMII FIFO */
+#define IGP01E1000_PHY_CHANNEL_QUALITY 0x15 /* PHY Channel Quality */
+#define IGP02E1000_PHY_POWER_MGMT 0x19 /* Power Management */
+#define IGP01E1000_PHY_PAGE_SELECT 0x1F /* Page Select */
+#define BM_PHY_PAGE_SELECT 22 /* Page Select for BM */
+#define IGP_PAGE_SHIFT 5
+#define PHY_REG_MASK 0x1F
/* BM/HV Specific Registers */
-#define BM_PORT_CTRL_PAGE 769
-#define BM_PORT_GEN_CFG_REG PHY_REG(BM_PORT_CTRL_PAGE, 17)
-#define BM_PCIE_PAGE 770
-#define BM_WUC_PAGE 800
-#define BM_WUC_ADDRESS_OPCODE 0x11
-#define BM_WUC_DATA_OPCODE 0x12
-#define BM_WUC_ENABLE_PAGE BM_PORT_CTRL_PAGE
-#define BM_WUC_ENABLE_REG 17
-#define BM_WUC_ENABLE_BIT (1 << 2)
-#define BM_WUC_HOST_WU_BIT (1 << 4)
-
-#define PHY_UPPER_SHIFT 21
+#define BM_PORT_CTRL_PAGE 769
+#define BM_PCIE_PAGE 770
+#define BM_WUC_PAGE 800
+#define BM_WUC_ADDRESS_OPCODE 0x11
+#define BM_WUC_DATA_OPCODE 0x12
+#define BM_WUC_ENABLE_PAGE BM_PORT_CTRL_PAGE
+#define BM_WUC_ENABLE_REG 17
+#define BM_WUC_ENABLE_BIT (1 << 2)
+#define BM_WUC_HOST_WU_BIT (1 << 4)
+#define BM_WUC_ME_WU_BIT (1 << 5)
+
+#define PHY_UPPER_SHIFT 21
#define BM_PHY_REG(page, reg) \
(((reg) & MAX_PHY_REG_ADDRESS) |\
(((page) & 0xFFFF) << PHY_PAGE_SHIFT) |\
@@ -144,132 +152,156 @@ s32 e1000_get_cable_length_82577(struct e1000_hw *hw);
(((offset) >> (PHY_UPPER_SHIFT - PHY_PAGE_SHIFT)) &\
~MAX_PHY_REG_ADDRESS)))
-#define HV_INTC_FC_PAGE_START 768
-#define I82578_ADDR_REG 29
-#define I82577_ADDR_REG 16
-#define I82577_CFG_REG 22
-#define I82577_CFG_ASSERT_CRS_ON_TX (1 << 15)
-#define I82577_CFG_ENABLE_DOWNSHIFT (3 << 10) /* auto downshift 100/10 */
-#define I82577_CTRL_REG 23
+#define HV_INTC_FC_PAGE_START 768
+#define I82578_ADDR_REG 29
+#define I82577_ADDR_REG 16
+#define I82577_CFG_REG 22
+#define I82577_CFG_ASSERT_CRS_ON_TX (1 << 15)
+#define I82577_CFG_ENABLE_DOWNSHIFT (3 << 10) /* auto downshift 100/10 */
+#define I82577_CTRL_REG 23
/* 82577 specific PHY registers */
-#define I82577_PHY_CTRL_2 18
-#define I82577_PHY_LBK_CTRL 19
-#define I82577_PHY_STATUS_2 26
-#define I82577_PHY_DIAG_STATUS 31
+#define I82577_PHY_CTRL_2 18
+#define I82577_PHY_LBK_CTRL 19
+#define I82577_PHY_STATUS_2 26
+#define I82577_PHY_DIAG_STATUS 31
/* I82577 PHY Status 2 */
-#define I82577_PHY_STATUS2_REV_POLARITY 0x0400
-#define I82577_PHY_STATUS2_MDIX 0x0800
-#define I82577_PHY_STATUS2_SPEED_MASK 0x0300
-#define I82577_PHY_STATUS2_SPEED_1000MBPS 0x0200
-#define I82577_PHY_STATUS2_SPEED_100MBPS 0x0100
+#define I82577_PHY_STATUS2_REV_POLARITY 0x0400
+#define I82577_PHY_STATUS2_MDIX 0x0800
+#define I82577_PHY_STATUS2_SPEED_MASK 0x0300
+#define I82577_PHY_STATUS2_SPEED_1000MBPS 0x0200
+#define I82577_PHY_STATUS2_SPEED_100MBPS 0x0100
/* I82577 PHY Control 2 */
-#define I82577_PHY_CTRL2_AUTO_MDIX 0x0400
-#define I82577_PHY_CTRL2_FORCE_MDI_MDIX 0x0200
+#define I82577_PHY_CTRL2_AUTO_MDIX 0x0400
+#define I82577_PHY_CTRL2_FORCE_MDI_MDIX 0x0200
/* I82577 PHY Diagnostics Status */
-#define I82577_DSTATUS_CABLE_LENGTH 0x03FC
-#define I82577_DSTATUS_CABLE_LENGTH_SHIFT 2
+#define I82577_DSTATUS_CABLE_LENGTH 0x03FC
+#define I82577_DSTATUS_CABLE_LENGTH_SHIFT 2
/* 82580 PHY Power Management */
-#define E1000_82580_PHY_POWER_MGMT 0xE14
-#define E1000_82580_PM_SPD 0x0001 /* Smart Power Down */
-#define E1000_82580_PM_D0_LPLU 0x0002 /* For D0a states */
-#define E1000_82580_PM_D3_LPLU 0x0004 /* For all other states */
+#define E1000_82580_PHY_POWER_MGMT 0xE14
+#define E1000_82580_PM_SPD 0x0001 /* Smart Power Down */
+#define E1000_82580_PM_D0_LPLU 0x0002 /* For D0a states */
+#define E1000_82580_PM_D3_LPLU 0x0004 /* For all other states */
/* BM PHY Copper Specific Control 1 */
-#define BM_CS_CTRL1 16
-#define BM_CS_CTRL1_ENERGY_DETECT 0x0300 /* Enable Energy Detect */
+#define BM_CS_CTRL1 16
+#define BM_CS_CTRL1_ENERGY_DETECT 0x0300 /* Enable Energy Detect */
/* BM PHY Copper Specific Status */
-#define BM_CS_STATUS 17
-#define BM_CS_STATUS_ENERGY_DETECT 0x0010 /* Energy Detect Status */
-#define BM_CS_STATUS_LINK_UP 0x0400
-#define BM_CS_STATUS_RESOLVED 0x0800
-#define BM_CS_STATUS_SPEED_MASK 0xC000
-#define BM_CS_STATUS_SPEED_1000 0x8000
+#define BM_CS_STATUS 17
+#define BM_CS_STATUS_ENERGY_DETECT 0x0010 /* Energy Detect Status */
+#define BM_CS_STATUS_LINK_UP 0x0400
+#define BM_CS_STATUS_RESOLVED 0x0800
+#define BM_CS_STATUS_SPEED_MASK 0xC000
+#define BM_CS_STATUS_SPEED_1000 0x8000
/* 82577 Mobile Phy Status Register */
-#define HV_M_STATUS 26
-#define HV_M_STATUS_AUTONEG_COMPLETE 0x1000
-#define HV_M_STATUS_SPEED_MASK 0x0300
-#define HV_M_STATUS_SPEED_1000 0x0200
-#define HV_M_STATUS_LINK_UP 0x0040
+#define HV_M_STATUS 26
+#define HV_M_STATUS_AUTONEG_COMPLETE 0x1000
+#define HV_M_STATUS_SPEED_MASK 0x0300
+#define HV_M_STATUS_SPEED_1000 0x0200
+#define HV_M_STATUS_LINK_UP 0x0040
-#define IGP01E1000_PHY_PCS_INIT_REG 0x00B4
-#define IGP01E1000_PHY_POLARITY_MASK 0x0078
+#define IGP01E1000_PHY_PCS_INIT_REG 0x00B4
+#define IGP01E1000_PHY_POLARITY_MASK 0x0078
-#define IGP01E1000_PSCR_AUTO_MDIX 0x1000
-#define IGP01E1000_PSCR_FORCE_MDI_MDIX 0x2000 /* 0=MDI, 1=MDIX */
+#define IGP01E1000_PSCR_AUTO_MDIX 0x1000
+#define IGP01E1000_PSCR_FORCE_MDI_MDIX 0x2000 /* 0=MDI, 1=MDIX */
-#define IGP01E1000_PSCFR_SMART_SPEED 0x0080
+#define IGP01E1000_PSCFR_SMART_SPEED 0x0080
/* Enable flexible speed on link-up */
-#define IGP01E1000_GMII_FLEX_SPD 0x0010
-#define IGP01E1000_GMII_SPD 0x0020 /* Enable SPD */
-
-#define IGP02E1000_PM_SPD 0x0001 /* Smart Power Down */
-#define IGP02E1000_PM_D0_LPLU 0x0002 /* For D0a states */
-#define IGP02E1000_PM_D3_LPLU 0x0004 /* For all other states */
-
-#define IGP01E1000_PLHR_SS_DOWNGRADE 0x8000
-
-#define IGP01E1000_PSSR_POLARITY_REVERSED 0x0002
-#define IGP01E1000_PSSR_MDIX 0x0800
-#define IGP01E1000_PSSR_SPEED_MASK 0xC000
-#define IGP01E1000_PSSR_SPEED_1000MBPS 0xC000
-
-#define IGP02E1000_PHY_CHANNEL_NUM 4
-#define IGP02E1000_PHY_AGC_A 0x11B1
-#define IGP02E1000_PHY_AGC_B 0x12B1
-#define IGP02E1000_PHY_AGC_C 0x14B1
-#define IGP02E1000_PHY_AGC_D 0x18B1
-
-#define IGP02E1000_AGC_LENGTH_SHIFT 9 /* Course - 15:13, Fine - 12:9 */
-#define IGP02E1000_AGC_LENGTH_MASK 0x7F
-#define IGP02E1000_AGC_RANGE 15
-
-#define IGP03E1000_PHY_MISC_CTRL 0x1B
-#define IGP03E1000_PHY_MISC_DUPLEX_MANUAL_SET 0x1000 /* Manually Set Duplex */
-
-#define E1000_CABLE_LENGTH_UNDEFINED 0xFF
-
-#define E1000_KMRNCTRLSTA_OFFSET 0x001F0000
-#define E1000_KMRNCTRLSTA_OFFSET_SHIFT 16
-#define E1000_KMRNCTRLSTA_REN 0x00200000
-#define E1000_KMRNCTRLSTA_CTRL_OFFSET 0x1 /* Kumeran Control */
-#define E1000_KMRNCTRLSTA_DIAG_OFFSET 0x3 /* Kumeran Diagnostic */
-#define E1000_KMRNCTRLSTA_TIMEOUTS 0x4 /* Kumeran Timeouts */
-#define E1000_KMRNCTRLSTA_INBAND_PARAM 0x9 /* Kumeran InBand Parameters */
-#define E1000_KMRNCTRLSTA_IBIST_DISABLE 0x0200 /* Kumeran IBIST Disable */
-#define E1000_KMRNCTRLSTA_DIAG_NELPBK 0x1000 /* Nearend Loopback mode */
-#define E1000_KMRNCTRLSTA_K1_CONFIG 0x7
-#define E1000_KMRNCTRLSTA_K1_ENABLE 0x0002
-#define E1000_KMRNCTRLSTA_HD_CTRL 0x10 /* Kumeran HD Control */
-
-#define IFE_PHY_EXTENDED_STATUS_CONTROL 0x10
-#define IFE_PHY_SPECIAL_CONTROL 0x11 /* 100BaseTx PHY Special Control */
-#define IFE_PHY_SPECIAL_CONTROL_LED 0x1B /* PHY Special and LED Control */
-#define IFE_PHY_MDIX_CONTROL 0x1C /* MDI/MDI-X Control */
+#define IGP01E1000_GMII_FLEX_SPD 0x0010
+#define IGP01E1000_GMII_SPD 0x0020 /* Enable SPD */
+
+#define IGP02E1000_PM_SPD 0x0001 /* Smart Power Down */
+#define IGP02E1000_PM_D0_LPLU 0x0002 /* For D0a states */
+#define IGP02E1000_PM_D3_LPLU 0x0004 /* For all other states */
+
+#define IGP01E1000_PLHR_SS_DOWNGRADE 0x8000
+
+#define IGP01E1000_PSSR_POLARITY_REVERSED 0x0002
+#define IGP01E1000_PSSR_MDIX 0x0800
+#define IGP01E1000_PSSR_SPEED_MASK 0xC000
+#define IGP01E1000_PSSR_SPEED_1000MBPS 0xC000
+
+#define IGP02E1000_PHY_CHANNEL_NUM 4
+#define IGP02E1000_PHY_AGC_A 0x11B1
+#define IGP02E1000_PHY_AGC_B 0x12B1
+#define IGP02E1000_PHY_AGC_C 0x14B1
+#define IGP02E1000_PHY_AGC_D 0x18B1
+
+#define IGP02E1000_AGC_LENGTH_SHIFT 9 /* Course - 15:13, Fine - 12:9 */
+#define IGP02E1000_AGC_LENGTH_MASK 0x7F
+#define IGP02E1000_AGC_RANGE 15
+
+#define IGP03E1000_PHY_MISC_CTRL 0x1B
+#define IGP03E1000_PHY_MISC_DUPLEX_MANUAL_SET 0x1000 /* Manually Set Duplex */
+
+#define E1000_CABLE_LENGTH_UNDEFINED 0xFF
+
+#define E1000_KMRNCTRLSTA_OFFSET 0x001F0000
+#define E1000_KMRNCTRLSTA_OFFSET_SHIFT 16
+#define E1000_KMRNCTRLSTA_REN 0x00200000
+#define E1000_KMRNCTRLSTA_CTRL_OFFSET 0x1 /* Kumeran Control */
+#define E1000_KMRNCTRLSTA_DIAG_OFFSET 0x3 /* Kumeran Diagnostic */
+#define E1000_KMRNCTRLSTA_TIMEOUTS 0x4 /* Kumeran Timeouts */
+#define E1000_KMRNCTRLSTA_INBAND_PARAM 0x9 /* Kumeran InBand Parameters */
+#define E1000_KMRNCTRLSTA_IBIST_DISABLE 0x0200 /* Kumeran IBIST Disable */
+#define E1000_KMRNCTRLSTA_DIAG_NELPBK 0x1000 /* Nearend Loopback mode */
+#define E1000_KMRNCTRLSTA_K1_CONFIG 0x7
+#define E1000_KMRNCTRLSTA_K1_ENABLE 0x0002
+#define E1000_KMRNCTRLSTA_HD_CTRL 0x10 /* Kumeran HD Control */
+
+#define IFE_PHY_EXTENDED_STATUS_CONTROL 0x10
+#define IFE_PHY_SPECIAL_CONTROL 0x11 /* 100BaseTx PHY Special Control */
+#define IFE_PHY_SPECIAL_CONTROL_LED 0x1B /* PHY Special and LED Control */
+#define IFE_PHY_MDIX_CONTROL 0x1C /* MDI/MDI-X Control */
/* IFE PHY Extended Status Control */
-#define IFE_PESC_POLARITY_REVERSED 0x0100
+#define IFE_PESC_POLARITY_REVERSED 0x0100
/* IFE PHY Special Control */
-#define IFE_PSC_AUTO_POLARITY_DISABLE 0x0010
-#define IFE_PSC_FORCE_POLARITY 0x0020
-#define IFE_PSC_DISABLE_DYNAMIC_POWER_DOWN 0x0100
+#define IFE_PSC_AUTO_POLARITY_DISABLE 0x0010
+#define IFE_PSC_FORCE_POLARITY 0x0020
+#define IFE_PSC_DISABLE_DYNAMIC_POWER_DOWN 0x0100
/* IFE PHY Special Control and LED Control */
-#define IFE_PSCL_PROBE_MODE 0x0020
-#define IFE_PSCL_PROBE_LEDS_OFF 0x0006 /* Force LEDs 0 and 2 off */
-#define IFE_PSCL_PROBE_LEDS_ON 0x0007 /* Force LEDs 0 and 2 on */
+#define IFE_PSCL_PROBE_MODE 0x0020
+#define IFE_PSCL_PROBE_LEDS_OFF 0x0006 /* Force LEDs 0 and 2 off */
+#define IFE_PSCL_PROBE_LEDS_ON 0x0007 /* Force LEDs 0 and 2 on */
/* IFE PHY MDIX Control */
-#define IFE_PMC_MDIX_STATUS 0x0020 /* 1=MDI-X, 0=MDI */
-#define IFE_PMC_FORCE_MDIX 0x0040 /* 1=force MDI-X, 0=force MDI */
-#define IFE_PMC_AUTO_MDIX 0x0080 /* 1=enable auto MDI/MDI-X, 0=disable */
+#define IFE_PMC_MDIX_STATUS 0x0020 /* 1=MDI-X, 0=MDI */
+#define IFE_PMC_FORCE_MDIX 0x0040 /* 1=force MDI-X, 0=force MDI */
+#define IFE_PMC_AUTO_MDIX 0x0080 /* 1=enable auto, 0=disable */
+
+/* SFP modules ID memory locations */
+#define E1000_SFF_IDENTIFIER_OFFSET 0x00
+#define E1000_SFF_IDENTIFIER_SFF 0x02
+#define E1000_SFF_IDENTIFIER_SFP 0x03
+
+#define E1000_SFF_ETH_FLAGS_OFFSET 0x06
+/* Flags for SFP modules compatible with ETH up to 1Gb */
+struct sfp_e1000_flags {
+ u8 e1000_base_sx:1;
+ u8 e1000_base_lx:1;
+ u8 e1000_base_cx:1;
+ u8 e1000_base_t:1;
+ u8 e100_base_lx:1;
+ u8 e100_base_fx:1;
+ u8 e10_base_bx10:1;
+ u8 e10_base_px:1;
+};
+
+/* Vendor OUIs: format of OUI is 0x[byte0][byte1][byte2][00] */
+#define E1000_SFF_VENDOR_OUI_TYCO 0x00407600
+#define E1000_SFF_VENDOR_OUI_FTL 0x00906500
+#define E1000_SFF_VENDOR_OUI_AVAGO 0x00176A00
+#define E1000_SFF_VENDOR_OUI_INTEL 0x001B2100
#endif
diff --git a/sys/dev/e1000/e1000_regs.h b/sys/dev/e1000/e1000_regs.h
index f3f265d..2cc89d5 100644
--- a/sys/dev/e1000/e1000_regs.h
+++ b/sys/dev/e1000/e1000_regs.h
@@ -1,6 +1,6 @@
/******************************************************************************
- Copyright (c) 2001-2010, Intel Corporation
+ Copyright (c) 2001-2011, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -35,104 +35,114 @@
#ifndef _E1000_REGS_H_
#define _E1000_REGS_H_
-#define E1000_CTRL 0x00000 /* Device Control - RW */
-#define E1000_CTRL_DUP 0x00004 /* Device Control Duplicate (Shadow) - RW */
-#define E1000_STATUS 0x00008 /* Device Status - RO */
-#define E1000_EECD 0x00010 /* EEPROM/Flash Control - RW */
-#define E1000_EERD 0x00014 /* EEPROM Read - RW */
-#define E1000_CTRL_EXT 0x00018 /* Extended Device Control - RW */
-#define E1000_FLA 0x0001C /* Flash Access - RW */
-#define E1000_MDIC 0x00020 /* MDI Control - RW */
-#define E1000_MDICNFG 0x00E04 /* MDI Config - RW */
-#define E1000_REGISTER_SET_SIZE 0x20000 /* CSR Size */
-#define E1000_EEPROM_INIT_CTRL_WORD_2 0x0F /* EEPROM Init Ctrl Word 2 */
-#define E1000_BARCTRL 0x5BBC /* BAR ctrl reg */
-#define E1000_BARCTRL_FLSIZE 0x0700 /* BAR ctrl Flsize */
-#define E1000_BARCTRL_CSRSIZE 0x2000 /* BAR ctrl CSR size */
-#define E1000_SCTL 0x00024 /* SerDes Control - RW */
-#define E1000_FCAL 0x00028 /* Flow Control Address Low - RW */
-#define E1000_FCAH 0x0002C /* Flow Control Address High -RW */
-#define E1000_FEXT 0x0002C /* Future Extended - RW */
-#define E1000_FEXTNVM4 0x00024 /* Future Extended NVM 4 - RW */
-#define E1000_FEXTNVM 0x00028 /* Future Extended NVM - RW */
-#define E1000_FCT 0x00030 /* Flow Control Type - RW */
-#define E1000_CONNSW 0x00034 /* Copper/Fiber switch control - RW */
-#define E1000_VET 0x00038 /* VLAN Ether Type - RW */
-#define E1000_ICR 0x000C0 /* Interrupt Cause Read - R/clr */
-#define E1000_ITR 0x000C4 /* Interrupt Throttling Rate - RW */
-#define E1000_ICS 0x000C8 /* Interrupt Cause Set - WO */
-#define E1000_IMS 0x000D0 /* Interrupt Mask Set - RW */
-#define E1000_IMC 0x000D8 /* Interrupt Mask Clear - WO */
-#define E1000_IAM 0x000E0 /* Interrupt Acknowledge Auto Mask */
-#define E1000_IVAR 0x000E4 /* Interrupt Vector Allocation Register - RW */
-#define E1000_SVCR 0x000F0
-#define E1000_SVT 0x000F4
-#define E1000_RCTL 0x00100 /* Rx Control - RW */
-#define E1000_FCTTV 0x00170 /* Flow Control Transmit Timer Value - RW */
-#define E1000_TXCW 0x00178 /* Tx Configuration Word - RW */
-#define E1000_RXCW 0x00180 /* Rx Configuration Word - RO */
-#define E1000_PBA_ECC 0x01100 /* PBA ECC Register */
-#define E1000_EICR 0x01580 /* Ext. Interrupt Cause Read - R/clr */
-#define E1000_EITR(_n) (0x01680 + (0x4 * (_n)))
-#define E1000_EICS 0x01520 /* Ext. Interrupt Cause Set - W0 */
-#define E1000_EIMS 0x01524 /* Ext. Interrupt Mask Set/Read - RW */
-#define E1000_EIMC 0x01528 /* Ext. Interrupt Mask Clear - WO */
-#define E1000_EIAC 0x0152C /* Ext. Interrupt Auto Clear - RW */
-#define E1000_EIAM 0x01530 /* Ext. Interrupt Ack Auto Clear Mask - RW */
-#define E1000_GPIE 0x01514 /* General Purpose Interrupt Enable - RW */
-#define E1000_IVAR0 0x01700 /* Interrupt Vector Allocation (array) - RW */
-#define E1000_IVAR_MISC 0x01740 /* IVAR for "other" causes - RW */
-#define E1000_TCTL 0x00400 /* Tx Control - RW */
-#define E1000_TCTL_EXT 0x00404 /* Extended Tx Control - RW */
-#define E1000_TIPG 0x00410 /* Tx Inter-packet gap -RW */
-#define E1000_TBT 0x00448 /* Tx Burst Timer - RW */
-#define E1000_AIT 0x00458 /* Adaptive Interframe Spacing Throttle - RW */
-#define E1000_LEDCTL 0x00E00 /* LED Control - RW */
-#define E1000_EXTCNF_CTRL 0x00F00 /* Extended Configuration Control */
-#define E1000_EXTCNF_SIZE 0x00F08 /* Extended Configuration Size */
-#define E1000_PHY_CTRL 0x00F10 /* PHY Control Register in CSR */
-#define E1000_POEMB E1000_PHY_CTRL /* PHY OEM Bits */
-#define E1000_PBA 0x01000 /* Packet Buffer Allocation - RW */
-#define E1000_PBS 0x01008 /* Packet Buffer Size */
-#define E1000_EEMNGCTL 0x01010 /* MNG EEprom Control */
-#define E1000_EEARBC 0x01024 /* EEPROM Auto Read Bus Control */
-#define E1000_FLASHT 0x01028 /* FLASH Timer Register */
-#define E1000_EEWR 0x0102C /* EEPROM Write Register - RW */
-#define E1000_FLSWCTL 0x01030 /* FLASH control register */
-#define E1000_FLSWDATA 0x01034 /* FLASH data register */
-#define E1000_FLSWCNT 0x01038 /* FLASH Access Counter */
-#define E1000_FLOP 0x0103C /* FLASH Opcode Register */
-#define E1000_I2CCMD 0x01028 /* SFPI2C Command Register - RW */
-#define E1000_I2CPARAMS 0x0102C /* SFPI2C Parameters Register - RW */
-#define E1000_WDSTP 0x01040 /* Watchdog Setup - RW */
-#define E1000_SWDSTS 0x01044 /* SW Device Status - RW */
-#define E1000_FRTIMER 0x01048 /* Free Running Timer - RW */
-#define E1000_TCPTIMER 0x0104C /* TCP Timer - RW */
-#define E1000_VPDDIAG 0x01060 /* VPD Diagnostic - RO */
-#define E1000_ICR_V2 0x01500 /* Interrupt Cause - new location - RC */
-#define E1000_ICS_V2 0x01504 /* Interrupt Cause Set - new location - WO */
-#define E1000_IMS_V2 0x01508 /* Interrupt Mask Set/Read - new location - RW */
-#define E1000_IMC_V2 0x0150C /* Interrupt Mask Clear - new location - WO */
-#define E1000_IAM_V2 0x01510 /* Interrupt Ack Auto Mask - new location - RW */
-#define E1000_ERT 0x02008 /* Early Rx Threshold - RW */
-#define E1000_FCRTL 0x02160 /* Flow Control Receive Threshold Low - RW */
-#define E1000_FCRTH 0x02168 /* Flow Control Receive Threshold High - RW */
-#define E1000_PSRCTL 0x02170 /* Packet Split Receive Control - RW */
-#define E1000_RDFPCQ(_n) (0x02430 + (0x4 * (_n)))
-#define E1000_PBRTH 0x02458 /* PB Rx Arbitration Threshold - RW */
-#define E1000_FCRTV 0x02460 /* Flow Control Refresh Timer Value - RW */
+#define E1000_CTRL 0x00000 /* Device Control - RW */
+#define E1000_CTRL_DUP 0x00004 /* Device Control Duplicate (Shadow) - RW */
+#define E1000_STATUS 0x00008 /* Device Status - RO */
+#define E1000_EECD 0x00010 /* EEPROM/Flash Control - RW */
+#define E1000_EERD 0x00014 /* EEPROM Read - RW */
+#define E1000_CTRL_EXT 0x00018 /* Extended Device Control - RW */
+#define E1000_FLA 0x0001C /* Flash Access - RW */
+#define E1000_MDIC 0x00020 /* MDI Control - RW */
+#define E1000_MDICNFG 0x00E04 /* MDI Config - RW */
+#define E1000_REGISTER_SET_SIZE 0x20000 /* CSR Size */
+#define E1000_EEPROM_INIT_CTRL_WORD_2 0x0F /* EEPROM Init Ctrl Word 2 */
+#define E1000_EEPROM_PCIE_CTRL_WORD_2 0x28 /* EEPROM PCIe Ctrl Word 2 */
+#define E1000_BARCTRL 0x5BBC /* BAR ctrl reg */
+#define E1000_BARCTRL_FLSIZE 0x0700 /* BAR ctrl Flsize */
+#define E1000_BARCTRL_CSRSIZE 0x2000 /* BAR ctrl CSR size */
+#define E1000_I350_BARCTRL 0x5BFC /* BAR ctrl reg */
+#define E1000_SCTL 0x00024 /* SerDes Control - RW */
+#define E1000_FCAL 0x00028 /* Flow Control Address Low - RW */
+#define E1000_FCAH 0x0002C /* Flow Control Address High -RW */
+#define E1000_FEXT 0x0002C /* Future Extended - RW */
+#define E1000_FEXTNVM4 0x00024 /* Future Extended NVM 4 - RW */
+#define E1000_FEXTNVM 0x00028 /* Future Extended NVM - RW */
+#define E1000_FCT 0x00030 /* Flow Control Type - RW */
+#define E1000_CONNSW 0x00034 /* Copper/Fiber switch control - RW */
+#define E1000_VET 0x00038 /* VLAN Ether Type - RW */
+#define E1000_ICR 0x000C0 /* Interrupt Cause Read - R/clr */
+#define E1000_ITR 0x000C4 /* Interrupt Throttling Rate - RW */
+#define E1000_ICS 0x000C8 /* Interrupt Cause Set - WO */
+#define E1000_IMS 0x000D0 /* Interrupt Mask Set - RW */
+#define E1000_IMC 0x000D8 /* Interrupt Mask Clear - WO */
+#define E1000_IAM 0x000E0 /* Interrupt Acknowledge Auto Mask */
+#define E1000_IVAR 0x000E4 /* Interrupt Vector Allocation Register - RW */
+#define E1000_SVCR 0x000F0
+#define E1000_SVT 0x000F4
+#define E1000_RCTL 0x00100 /* Rx Control - RW */
+#define E1000_FCTTV 0x00170 /* Flow Control Transmit Timer Value - RW */
+#define E1000_TXCW 0x00178 /* Tx Configuration Word - RW */
+#define E1000_RXCW 0x00180 /* Rx Configuration Word - RO */
+#define E1000_PBA_ECC 0x01100 /* PBA ECC Register */
+#define E1000_EICR 0x01580 /* Ext. Interrupt Cause Read - R/clr */
+#define E1000_EITR(_n) (0x01680 + (0x4 * (_n)))
+#define E1000_EICS 0x01520 /* Ext. Interrupt Cause Set - W0 */
+#define E1000_EIMS 0x01524 /* Ext. Interrupt Mask Set/Read - RW */
+#define E1000_EIMC 0x01528 /* Ext. Interrupt Mask Clear - WO */
+#define E1000_EIAC 0x0152C /* Ext. Interrupt Auto Clear - RW */
+#define E1000_EIAM 0x01530 /* Ext. Interrupt Ack Auto Clear Mask - RW */
+#define E1000_GPIE 0x01514 /* General Purpose Interrupt Enable - RW */
+#define E1000_IVAR0 0x01700 /* Interrupt Vector Allocation (array) - RW */
+#define E1000_IVAR_MISC 0x01740 /* IVAR for "other" causes - RW */
+#define E1000_TCTL 0x00400 /* Tx Control - RW */
+#define E1000_TCTL_EXT 0x00404 /* Extended Tx Control - RW */
+#define E1000_TIPG 0x00410 /* Tx Inter-packet gap -RW */
+#define E1000_TBT 0x00448 /* Tx Burst Timer - RW */
+#define E1000_AIT 0x00458 /* Adaptive Interframe Spacing Throttle - RW */
+#define E1000_LEDCTL 0x00E00 /* LED Control - RW */
+#define E1000_EXTCNF_CTRL 0x00F00 /* Extended Configuration Control */
+#define E1000_EXTCNF_SIZE 0x00F08 /* Extended Configuration Size */
+#define E1000_PHY_CTRL 0x00F10 /* PHY Control Register in CSR */
+#define E1000_POEMB E1000_PHY_CTRL /* PHY OEM Bits */
+#define E1000_PBA 0x01000 /* Packet Buffer Allocation - RW */
+#define E1000_PBS 0x01008 /* Packet Buffer Size */
+#define E1000_EEMNGCTL 0x01010 /* MNG EEprom Control */
+#define E1000_EEARBC 0x01024 /* EEPROM Auto Read Bus Control */
+#define E1000_FLASHT 0x01028 /* FLASH Timer Register */
+#define E1000_EEWR 0x0102C /* EEPROM Write Register - RW */
+#define E1000_FLSWCTL 0x01030 /* FLASH control register */
+#define E1000_FLSWDATA 0x01034 /* FLASH data register */
+#define E1000_FLSWCNT 0x01038 /* FLASH Access Counter */
+#define E1000_FLOP 0x0103C /* FLASH Opcode Register */
+#define E1000_I2CCMD 0x01028 /* SFPI2C Command Register - RW */
+#define E1000_I2CPARAMS 0x0102C /* SFPI2C Parameters Register - RW */
+#define E1000_I2CBB_EN 0x00000100 /* I2C - Bit Bang Enable */
+#define E1000_I2C_CLK_OUT 0x00000200 /* I2C- Clock */
+#define E1000_I2C_DATA_OUT 0x00000400 /* I2C- Data Out */
+#define E1000_I2C_DATA_OE_N 0x00000800 /* I2C- Data Output Enable */
+#define E1000_I2C_DATA_IN 0x00001000 /* I2C- Data In */
+#define E1000_I2C_CLK_OE_N 0x00002000 /* I2C- Clock Output Enable */
+#define E1000_I2C_CLK_IN 0x00004000 /* I2C- Clock In */
+#define E1000_I2C_CLK_STRETCH_DIS 0x00008000 /* I2C- Dis Clk Stretching */
+#define E1000_WDSTP 0x01040 /* Watchdog Setup - RW */
+#define E1000_SWDSTS 0x01044 /* SW Device Status - RW */
+#define E1000_FRTIMER 0x01048 /* Free Running Timer - RW */
+#define E1000_TCPTIMER 0x0104C /* TCP Timer - RW */
+#define E1000_VPDDIAG 0x01060 /* VPD Diagnostic - RO */
+#define E1000_ICR_V2 0x01500 /* Intr Cause - new location - RC */
+#define E1000_ICS_V2 0x01504 /* Intr Cause Set - new location - WO */
+#define E1000_IMS_V2 0x01508 /* Intr Mask Set/Read - new location - RW */
+#define E1000_IMC_V2 0x0150C /* Intr Mask Clear - new location - WO */
+#define E1000_IAM_V2 0x01510 /* Intr Ack Auto Mask - new location - RW */
+#define E1000_ERT 0x02008 /* Early Rx Threshold - RW */
+#define E1000_FCRTL 0x02160 /* Flow Control Receive Threshold Low - RW */
+#define E1000_FCRTH 0x02168 /* Flow Control Receive Threshold High - RW */
+#define E1000_PSRCTL 0x02170 /* Packet Split Receive Control - RW */
+#define E1000_RDFPCQ(_n) (0x02430 + (0x4 * (_n)))
+#define E1000_PBRTH 0x02458 /* PB Rx Arbitration Threshold - RW */
+#define E1000_FCRTV 0x02460 /* Flow Control Refresh Timer Value - RW */
/* Split and Replication Rx Control - RW */
-#define E1000_RDPUMB 0x025CC /* DMA Rx Descriptor uC Mailbox - RW */
-#define E1000_RDPUAD 0x025D0 /* DMA Rx Descriptor uC Addr Command - RW */
-#define E1000_RDPUWD 0x025D4 /* DMA Rx Descriptor uC Data Write - RW */
-#define E1000_RDPURD 0x025D8 /* DMA Rx Descriptor uC Data Read - RW */
-#define E1000_RDPUCTL 0x025DC /* DMA Rx Descriptor uC Control - RW */
-#define E1000_PBDIAG 0x02458 /* Packet Buffer Diagnostic - RW */
-#define E1000_RXPBS 0x02404 /* Rx Packet Buffer Size - RW */
-#define E1000_IRPBS 0x02404 /* Same as RXPBS, renamed for newer adapters - RW */
-#define E1000_PBRWAC 0x024E8 /* Rx packet buffer wrap around counter - RO */
-#define E1000_RDTR 0x02820 /* Rx Delay Timer - RW */
-#define E1000_RADV 0x0282C /* Rx Interrupt Absolute Delay Timer - RW */
+#define E1000_RDPUMB 0x025CC /* DMA Rx Descriptor uC Mailbox - RW */
+#define E1000_RDPUAD 0x025D0 /* DMA Rx Descriptor uC Addr Command - RW */
+#define E1000_RDPUWD 0x025D4 /* DMA Rx Descriptor uC Data Write - RW */
+#define E1000_RDPURD 0x025D8 /* DMA Rx Descriptor uC Data Read - RW */
+#define E1000_RDPUCTL 0x025DC /* DMA Rx Descriptor uC Control - RW */
+#define E1000_PBDIAG 0x02458 /* Packet Buffer Diagnostic - RW */
+#define E1000_RXPBS 0x02404 /* Rx Packet Buffer Size - RW */
+#define E1000_IRPBS 0x02404 /* Same as RXPBS, renamed for newer Si - RW */
+#define E1000_PBRWAC 0x024E8 /* Rx packet buffer wrap around counter - RO */
+#define E1000_RDTR 0x02820 /* Rx Delay Timer - RW */
+#define E1000_RADV 0x0282C /* Rx Interrupt Absolute Delay Timer - RW */
/*
* Convenience macros
*
@@ -141,442 +151,470 @@
* Example usage:
* E1000_RDBAL_REG(current_rx_queue)
*/
-#define E1000_RDBAL(_n) ((_n) < 4 ? (0x02800 + ((_n) * 0x100)) : \
- (0x0C000 + ((_n) * 0x40)))
-#define E1000_RDBAH(_n) ((_n) < 4 ? (0x02804 + ((_n) * 0x100)) : \
- (0x0C004 + ((_n) * 0x40)))
-#define E1000_RDLEN(_n) ((_n) < 4 ? (0x02808 + ((_n) * 0x100)) : \
- (0x0C008 + ((_n) * 0x40)))
-#define E1000_SRRCTL(_n) ((_n) < 4 ? (0x0280C + ((_n) * 0x100)) : \
- (0x0C00C + ((_n) * 0x40)))
-#define E1000_RDH(_n) ((_n) < 4 ? (0x02810 + ((_n) * 0x100)) : \
- (0x0C010 + ((_n) * 0x40)))
-#define E1000_RXCTL(_n) ((_n) < 4 ? (0x02814 + ((_n) * 0x100)) : \
- (0x0C014 + ((_n) * 0x40)))
-#define E1000_DCA_RXCTRL(_n) E1000_RXCTL(_n)
-#define E1000_RDT(_n) ((_n) < 4 ? (0x02818 + ((_n) * 0x100)) : \
- (0x0C018 + ((_n) * 0x40)))
-#define E1000_RXDCTL(_n) ((_n) < 4 ? (0x02828 + ((_n) * 0x100)) : \
- (0x0C028 + ((_n) * 0x40)))
-#define E1000_RQDPC(_n) ((_n) < 4 ? (0x02830 + ((_n) * 0x100)) : \
- (0x0C030 + ((_n) * 0x40)))
-#define E1000_TDBAL(_n) ((_n) < 4 ? (0x03800 + ((_n) * 0x100)) : \
- (0x0E000 + ((_n) * 0x40)))
-#define E1000_TDBAH(_n) ((_n) < 4 ? (0x03804 + ((_n) * 0x100)) : \
- (0x0E004 + ((_n) * 0x40)))
-#define E1000_TDLEN(_n) ((_n) < 4 ? (0x03808 + ((_n) * 0x100)) : \
- (0x0E008 + ((_n) * 0x40)))
-#define E1000_TDH(_n) ((_n) < 4 ? (0x03810 + ((_n) * 0x100)) : \
- (0x0E010 + ((_n) * 0x40)))
-#define E1000_TXCTL(_n) ((_n) < 4 ? (0x03814 + ((_n) * 0x100)) : \
- (0x0E014 + ((_n) * 0x40)))
+#define E1000_RDBAL(_n) ((_n) < 4 ? (0x02800 + ((_n) * 0x100)) : \
+ (0x0C000 + ((_n) * 0x40)))
+#define E1000_RDBAH(_n) ((_n) < 4 ? (0x02804 + ((_n) * 0x100)) : \
+ (0x0C004 + ((_n) * 0x40)))
+#define E1000_RDLEN(_n) ((_n) < 4 ? (0x02808 + ((_n) * 0x100)) : \
+ (0x0C008 + ((_n) * 0x40)))
+#define E1000_SRRCTL(_n) ((_n) < 4 ? (0x0280C + ((_n) * 0x100)) : \
+ (0x0C00C + ((_n) * 0x40)))
+#define E1000_RDH(_n) ((_n) < 4 ? (0x02810 + ((_n) * 0x100)) : \
+ (0x0C010 + ((_n) * 0x40)))
+#define E1000_RXCTL(_n) ((_n) < 4 ? (0x02814 + ((_n) * 0x100)) : \
+ (0x0C014 + ((_n) * 0x40)))
+#define E1000_DCA_RXCTRL(_n) E1000_RXCTL(_n)
+#define E1000_RDT(_n) ((_n) < 4 ? (0x02818 + ((_n) * 0x100)) : \
+ (0x0C018 + ((_n) * 0x40)))
+#define E1000_RXDCTL(_n) ((_n) < 4 ? (0x02828 + ((_n) * 0x100)) : \
+ (0x0C028 + ((_n) * 0x40)))
+#define E1000_RQDPC(_n) ((_n) < 4 ? (0x02830 + ((_n) * 0x100)) : \
+ (0x0C030 + ((_n) * 0x40)))
+#define E1000_TDBAL(_n) ((_n) < 4 ? (0x03800 + ((_n) * 0x100)) : \
+ (0x0E000 + ((_n) * 0x40)))
+#define E1000_TDBAH(_n) ((_n) < 4 ? (0x03804 + ((_n) * 0x100)) : \
+ (0x0E004 + ((_n) * 0x40)))
+#define E1000_TDLEN(_n) ((_n) < 4 ? (0x03808 + ((_n) * 0x100)) : \
+ (0x0E008 + ((_n) * 0x40)))
+#define E1000_TDH(_n) ((_n) < 4 ? (0x03810 + ((_n) * 0x100)) : \
+ (0x0E010 + ((_n) * 0x40)))
+#define E1000_TXCTL(_n) ((_n) < 4 ? (0x03814 + ((_n) * 0x100)) : \
+ (0x0E014 + ((_n) * 0x40)))
#define E1000_DCA_TXCTRL(_n) E1000_TXCTL(_n)
-#define E1000_TDT(_n) ((_n) < 4 ? (0x03818 + ((_n) * 0x100)) : \
- (0x0E018 + ((_n) * 0x40)))
-#define E1000_TXDCTL(_n) ((_n) < 4 ? (0x03828 + ((_n) * 0x100)) : \
- (0x0E028 + ((_n) * 0x40)))
-#define E1000_TDWBAL(_n) ((_n) < 4 ? (0x03838 + ((_n) * 0x100)) : \
- (0x0E038 + ((_n) * 0x40)))
-#define E1000_TDWBAH(_n) ((_n) < 4 ? (0x0383C + ((_n) * 0x100)) : \
- (0x0E03C + ((_n) * 0x40)))
-#define E1000_TARC(_n) (0x03840 + ((_n) * 0x100))
-#define E1000_RSRPD 0x02C00 /* Rx Small Packet Detect - RW */
-#define E1000_RAID 0x02C08 /* Receive Ack Interrupt Delay - RW */
-#define E1000_TXDMAC 0x03000 /* Tx DMA Control - RW */
-#define E1000_KABGTXD 0x03004 /* AFE Band Gap Transmit Ref Data */
-#define E1000_PSRTYPE(_i) (0x05480 + ((_i) * 4))
-#define E1000_RAL(_i) (((_i) <= 15) ? (0x05400 + ((_i) * 8)) : \
- (0x054E0 + ((_i - 16) * 8)))
-#define E1000_RAH(_i) (((_i) <= 15) ? (0x05404 + ((_i) * 8)) : \
- (0x054E4 + ((_i - 16) * 8)))
-#define E1000_SHRAL(_i) (0x05438 + ((_i) * 8))
-#define E1000_SHRAH(_i) (0x0543C + ((_i) * 8))
-#define E1000_IP4AT_REG(_i) (0x05840 + ((_i) * 8))
-#define E1000_IP6AT_REG(_i) (0x05880 + ((_i) * 4))
-#define E1000_WUPM_REG(_i) (0x05A00 + ((_i) * 4))
-#define E1000_FFMT_REG(_i) (0x09000 + ((_i) * 8))
-#define E1000_FFVT_REG(_i) (0x09800 + ((_i) * 8))
-#define E1000_FFLT_REG(_i) (0x05F00 + ((_i) * 8))
-#define E1000_PBSLAC 0x03100 /* Packet Buffer Slave Access Control */
-#define E1000_PBSLAD(_n) (0x03110 + (0x4 * (_n))) /* Packet Buffer DWORD (_n) */
-#define E1000_TXPBS 0x03404 /* Tx Packet Buffer Size - RW */
-#define E1000_ITPBS 0x03404 /* Same as TXPBS, renamed for newer adpaters - RW */
-#define E1000_TDFH 0x03410 /* Tx Data FIFO Head - RW */
-#define E1000_TDFT 0x03418 /* Tx Data FIFO Tail - RW */
-#define E1000_TDFHS 0x03420 /* Tx Data FIFO Head Saved - RW */
-#define E1000_TDFTS 0x03428 /* Tx Data FIFO Tail Saved - RW */
-#define E1000_TDFPC 0x03430 /* Tx Data FIFO Packet Count - RW */
-#define E1000_TDPUMB 0x0357C /* DMA Tx Descriptor uC Mail Box - RW */
-#define E1000_TDPUAD 0x03580 /* DMA Tx Descriptor uC Addr Command - RW */
-#define E1000_TDPUWD 0x03584 /* DMA Tx Descriptor uC Data Write - RW */
-#define E1000_TDPURD 0x03588 /* DMA Tx Descriptor uC Data Read - RW */
-#define E1000_TDPUCTL 0x0358C /* DMA Tx Descriptor uC Control - RW */
-#define E1000_DTXCTL 0x03590 /* DMA Tx Control - RW */
-#define E1000_DTXTCPFLGL 0x0359C /* DMA Tx Control flag low - RW */
-#define E1000_DTXTCPFLGH 0x035A0 /* DMA Tx Control flag high - RW */
-#define E1000_DTXMXSZRQ 0x03540 /* DMA Tx Max Total Allow Size Requests - RW */
-#define E1000_TIDV 0x03820 /* Tx Interrupt Delay Value - RW */
-#define E1000_TADV 0x0382C /* Tx Interrupt Absolute Delay Val - RW */
-#define E1000_TSPMT 0x03830 /* TCP Segmentation PAD & Min Threshold - RW */
-#define E1000_CRCERRS 0x04000 /* CRC Error Count - R/clr */
-#define E1000_ALGNERRC 0x04004 /* Alignment Error Count - R/clr */
-#define E1000_SYMERRS 0x04008 /* Symbol Error Count - R/clr */
-#define E1000_RXERRC 0x0400C /* Receive Error Count - R/clr */
-#define E1000_MPC 0x04010 /* Missed Packet Count - R/clr */
-#define E1000_SCC 0x04014 /* Single Collision Count - R/clr */
-#define E1000_ECOL 0x04018 /* Excessive Collision Count - R/clr */
-#define E1000_MCC 0x0401C /* Multiple Collision Count - R/clr */
-#define E1000_LATECOL 0x04020 /* Late Collision Count - R/clr */
-#define E1000_COLC 0x04028 /* Collision Count - R/clr */
-#define E1000_DC 0x04030 /* Defer Count - R/clr */
-#define E1000_TNCRS 0x04034 /* Tx-No CRS - R/clr */
-#define E1000_SEC 0x04038 /* Sequence Error Count - R/clr */
-#define E1000_CEXTERR 0x0403C /* Carrier Extension Error Count - R/clr */
-#define E1000_RLEC 0x04040 /* Receive Length Error Count - R/clr */
-#define E1000_XONRXC 0x04048 /* XON Rx Count - R/clr */
-#define E1000_XONTXC 0x0404C /* XON Tx Count - R/clr */
-#define E1000_XOFFRXC 0x04050 /* XOFF Rx Count - R/clr */
-#define E1000_XOFFTXC 0x04054 /* XOFF Tx Count - R/clr */
-#define E1000_FCRUC 0x04058 /* Flow Control Rx Unsupported Count- R/clr */
-#define E1000_PRC64 0x0405C /* Packets Rx (64 bytes) - R/clr */
-#define E1000_PRC127 0x04060 /* Packets Rx (65-127 bytes) - R/clr */
-#define E1000_PRC255 0x04064 /* Packets Rx (128-255 bytes) - R/clr */
-#define E1000_PRC511 0x04068 /* Packets Rx (255-511 bytes) - R/clr */
-#define E1000_PRC1023 0x0406C /* Packets Rx (512-1023 bytes) - R/clr */
-#define E1000_PRC1522 0x04070 /* Packets Rx (1024-1522 bytes) - R/clr */
-#define E1000_GPRC 0x04074 /* Good Packets Rx Count - R/clr */
-#define E1000_BPRC 0x04078 /* Broadcast Packets Rx Count - R/clr */
-#define E1000_MPRC 0x0407C /* Multicast Packets Rx Count - R/clr */
-#define E1000_GPTC 0x04080 /* Good Packets Tx Count - R/clr */
-#define E1000_GORCL 0x04088 /* Good Octets Rx Count Low - R/clr */
-#define E1000_GORCH 0x0408C /* Good Octets Rx Count High - R/clr */
-#define E1000_GOTCL 0x04090 /* Good Octets Tx Count Low - R/clr */
-#define E1000_GOTCH 0x04094 /* Good Octets Tx Count High - R/clr */
-#define E1000_RNBC 0x040A0 /* Rx No Buffers Count - R/clr */
-#define E1000_RUC 0x040A4 /* Rx Undersize Count - R/clr */
-#define E1000_RFC 0x040A8 /* Rx Fragment Count - R/clr */
-#define E1000_ROC 0x040AC /* Rx Oversize Count - R/clr */
-#define E1000_RJC 0x040B0 /* Rx Jabber Count - R/clr */
-#define E1000_MGTPRC 0x040B4 /* Management Packets Rx Count - R/clr */
-#define E1000_MGTPDC 0x040B8 /* Management Packets Dropped Count - R/clr */
-#define E1000_MGTPTC 0x040BC /* Management Packets Tx Count - R/clr */
-#define E1000_TORL 0x040C0 /* Total Octets Rx Low - R/clr */
-#define E1000_TORH 0x040C4 /* Total Octets Rx High - R/clr */
-#define E1000_TOTL 0x040C8 /* Total Octets Tx Low - R/clr */
-#define E1000_TOTH 0x040CC /* Total Octets Tx High - R/clr */
-#define E1000_TPR 0x040D0 /* Total Packets Rx - R/clr */
-#define E1000_TPT 0x040D4 /* Total Packets Tx - R/clr */
-#define E1000_PTC64 0x040D8 /* Packets Tx (64 bytes) - R/clr */
-#define E1000_PTC127 0x040DC /* Packets Tx (65-127 bytes) - R/clr */
-#define E1000_PTC255 0x040E0 /* Packets Tx (128-255 bytes) - R/clr */
-#define E1000_PTC511 0x040E4 /* Packets Tx (256-511 bytes) - R/clr */
-#define E1000_PTC1023 0x040E8 /* Packets Tx (512-1023 bytes) - R/clr */
-#define E1000_PTC1522 0x040EC /* Packets Tx (1024-1522 Bytes) - R/clr */
-#define E1000_MPTC 0x040F0 /* Multicast Packets Tx Count - R/clr */
-#define E1000_BPTC 0x040F4 /* Broadcast Packets Tx Count - R/clr */
-#define E1000_TSCTC 0x040F8 /* TCP Segmentation Context Tx - R/clr */
-#define E1000_TSCTFC 0x040FC /* TCP Segmentation Context Tx Fail - R/clr */
-#define E1000_IAC 0x04100 /* Interrupt Assertion Count */
-#define E1000_ICRXPTC 0x04104 /* Interrupt Cause Rx Pkt Timer Expire Count */
-#define E1000_ICRXATC 0x04108 /* Interrupt Cause Rx Abs Timer Expire Count */
-#define E1000_ICTXPTC 0x0410C /* Interrupt Cause Tx Pkt Timer Expire Count */
-#define E1000_ICTXATC 0x04110 /* Interrupt Cause Tx Abs Timer Expire Count */
-#define E1000_ICTXQEC 0x04118 /* Interrupt Cause Tx Queue Empty Count */
-#define E1000_ICTXQMTC 0x0411C /* Interrupt Cause Tx Queue Min Thresh Count */
-#define E1000_ICRXDMTC 0x04120 /* Interrupt Cause Rx Desc Min Thresh Count */
-#define E1000_ICRXOC 0x04124 /* Interrupt Cause Receiver Overrun Count */
-#define E1000_CRC_OFFSET 0x05F50 /* CRC Offset register */
+#define E1000_TDT(_n) ((_n) < 4 ? (0x03818 + ((_n) * 0x100)) : \
+ (0x0E018 + ((_n) * 0x40)))
+#define E1000_TXDCTL(_n) ((_n) < 4 ? (0x03828 + ((_n) * 0x100)) : \
+ (0x0E028 + ((_n) * 0x40)))
+#define E1000_TDWBAL(_n) ((_n) < 4 ? (0x03838 + ((_n) * 0x100)) : \
+ (0x0E038 + ((_n) * 0x40)))
+#define E1000_TDWBAH(_n) ((_n) < 4 ? (0x0383C + ((_n) * 0x100)) : \
+ (0x0E03C + ((_n) * 0x40)))
+#define E1000_TARC(_n) (0x03840 + ((_n) * 0x100))
+#define E1000_RSRPD 0x02C00 /* Rx Small Packet Detect - RW */
+#define E1000_RAID 0x02C08 /* Receive Ack Interrupt Delay - RW */
+#define E1000_TXDMAC 0x03000 /* Tx DMA Control - RW */
+#define E1000_KABGTXD 0x03004 /* AFE Band Gap Transmit Ref Data */
+#define E1000_PSRTYPE(_i) (0x05480 + ((_i) * 4))
+#define E1000_RAL(_i) (((_i) <= 15) ? (0x05400 + ((_i) * 8)) : \
+ (0x054E0 + ((_i - 16) * 8)))
+#define E1000_RAH(_i) (((_i) <= 15) ? (0x05404 + ((_i) * 8)) : \
+ (0x054E4 + ((_i - 16) * 8)))
+#define E1000_SHRAL(_i) (0x05438 + ((_i) * 8))
+#define E1000_SHRAH(_i) (0x0543C + ((_i) * 8))
+#define E1000_IP4AT_REG(_i) (0x05840 + ((_i) * 8))
+#define E1000_IP6AT_REG(_i) (0x05880 + ((_i) * 4))
+#define E1000_WUPM_REG(_i) (0x05A00 + ((_i) * 4))
+#define E1000_FFMT_REG(_i) (0x09000 + ((_i) * 8))
+#define E1000_FFVT_REG(_i) (0x09800 + ((_i) * 8))
+#define E1000_FFLT_REG(_i) (0x05F00 + ((_i) * 8))
+#define E1000_PBSLAC 0x03100 /* Pkt Buffer Slave Access Control */
+#define E1000_PBSLAD(_n) (0x03110 + (0x4 * (_n))) /* Pkt Buffer DWORD */
+#define E1000_TXPBS 0x03404 /* Tx Packet Buffer Size - RW */
+/* Same as TXPBS, renamed for newer Si - RW */
+#define E1000_ITPBS 0x03404
+#define E1000_TDFH 0x03410 /* Tx Data FIFO Head - RW */
+#define E1000_TDFT 0x03418 /* Tx Data FIFO Tail - RW */
+#define E1000_TDFHS 0x03420 /* Tx Data FIFO Head Saved - RW */
+#define E1000_TDFTS 0x03428 /* Tx Data FIFO Tail Saved - RW */
+#define E1000_TDFPC 0x03430 /* Tx Data FIFO Packet Count - RW */
+#define E1000_TDPUMB 0x0357C /* DMA Tx Desc uC Mail Box - RW */
+#define E1000_TDPUAD 0x03580 /* DMA Tx Desc uC Addr Command - RW */
+#define E1000_TDPUWD 0x03584 /* DMA Tx Desc uC Data Write - RW */
+#define E1000_TDPURD 0x03588 /* DMA Tx Desc uC Data Read - RW */
+#define E1000_TDPUCTL 0x0358C /* DMA Tx Desc uC Control - RW */
+#define E1000_DTXCTL 0x03590 /* DMA Tx Control - RW */
+#define E1000_DTXTCPFLGL 0x0359C /* DMA Tx Control flag low - RW */
+#define E1000_DTXTCPFLGH 0x035A0 /* DMA Tx Control flag high - RW */
+/* DMA Tx Max Total Allow Size Reqs - RW */
+#define E1000_DTXMXSZRQ 0x03540
+#define E1000_TIDV 0x03820 /* Tx Interrupt Delay Value - RW */
+#define E1000_TADV 0x0382C /* Tx Interrupt Absolute Delay Val - RW */
+#define E1000_TSPMT 0x03830 /* TCP Segmentation PAD & Min Threshold - RW */
+#define E1000_CRCERRS 0x04000 /* CRC Error Count - R/clr */
+#define E1000_ALGNERRC 0x04004 /* Alignment Error Count - R/clr */
+#define E1000_SYMERRS 0x04008 /* Symbol Error Count - R/clr */
+#define E1000_RXERRC 0x0400C /* Receive Error Count - R/clr */
+#define E1000_MPC 0x04010 /* Missed Packet Count - R/clr */
+#define E1000_SCC 0x04014 /* Single Collision Count - R/clr */
+#define E1000_ECOL 0x04018 /* Excessive Collision Count - R/clr */
+#define E1000_MCC 0x0401C /* Multiple Collision Count - R/clr */
+#define E1000_LATECOL 0x04020 /* Late Collision Count - R/clr */
+#define E1000_COLC 0x04028 /* Collision Count - R/clr */
+#define E1000_DC 0x04030 /* Defer Count - R/clr */
+#define E1000_TNCRS 0x04034 /* Tx-No CRS - R/clr */
+#define E1000_SEC 0x04038 /* Sequence Error Count - R/clr */
+#define E1000_CEXTERR 0x0403C /* Carrier Extension Error Count - R/clr */
+#define E1000_RLEC 0x04040 /* Receive Length Error Count - R/clr */
+#define E1000_XONRXC 0x04048 /* XON Rx Count - R/clr */
+#define E1000_XONTXC 0x0404C /* XON Tx Count - R/clr */
+#define E1000_XOFFRXC 0x04050 /* XOFF Rx Count - R/clr */
+#define E1000_XOFFTXC 0x04054 /* XOFF Tx Count - R/clr */
+#define E1000_FCRUC 0x04058 /* Flow Control Rx Unsupported Count- R/clr */
+#define E1000_PRC64 0x0405C /* Packets Rx (64 bytes) - R/clr */
+#define E1000_PRC127 0x04060 /* Packets Rx (65-127 bytes) - R/clr */
+#define E1000_PRC255 0x04064 /* Packets Rx (128-255 bytes) - R/clr */
+#define E1000_PRC511 0x04068 /* Packets Rx (255-511 bytes) - R/clr */
+#define E1000_PRC1023 0x0406C /* Packets Rx (512-1023 bytes) - R/clr */
+#define E1000_PRC1522 0x04070 /* Packets Rx (1024-1522 bytes) - R/clr */
+#define E1000_GPRC 0x04074 /* Good Packets Rx Count - R/clr */
+#define E1000_BPRC 0x04078 /* Broadcast Packets Rx Count - R/clr */
+#define E1000_MPRC 0x0407C /* Multicast Packets Rx Count - R/clr */
+#define E1000_GPTC 0x04080 /* Good Packets Tx Count - R/clr */
+#define E1000_GORCL 0x04088 /* Good Octets Rx Count Low - R/clr */
+#define E1000_GORCH 0x0408C /* Good Octets Rx Count High - R/clr */
+#define E1000_GOTCL 0x04090 /* Good Octets Tx Count Low - R/clr */
+#define E1000_GOTCH 0x04094 /* Good Octets Tx Count High - R/clr */
+#define E1000_RNBC 0x040A0 /* Rx No Buffers Count - R/clr */
+#define E1000_RUC 0x040A4 /* Rx Undersize Count - R/clr */
+#define E1000_RFC 0x040A8 /* Rx Fragment Count - R/clr */
+#define E1000_ROC 0x040AC /* Rx Oversize Count - R/clr */
+#define E1000_RJC 0x040B0 /* Rx Jabber Count - R/clr */
+#define E1000_MGTPRC 0x040B4 /* Management Packets Rx Count - R/clr */
+#define E1000_MGTPDC 0x040B8 /* Management Packets Dropped Count - R/clr */
+#define E1000_MGTPTC 0x040BC /* Management Packets Tx Count - R/clr */
+#define E1000_TORL 0x040C0 /* Total Octets Rx Low - R/clr */
+#define E1000_TORH 0x040C4 /* Total Octets Rx High - R/clr */
+#define E1000_TOTL 0x040C8 /* Total Octets Tx Low - R/clr */
+#define E1000_TOTH 0x040CC /* Total Octets Tx High - R/clr */
+#define E1000_TPR 0x040D0 /* Total Packets Rx - R/clr */
+#define E1000_TPT 0x040D4 /* Total Packets Tx - R/clr */
+#define E1000_PTC64 0x040D8 /* Packets Tx (64 bytes) - R/clr */
+#define E1000_PTC127 0x040DC /* Packets Tx (65-127 bytes) - R/clr */
+#define E1000_PTC255 0x040E0 /* Packets Tx (128-255 bytes) - R/clr */
+#define E1000_PTC511 0x040E4 /* Packets Tx (256-511 bytes) - R/clr */
+#define E1000_PTC1023 0x040E8 /* Packets Tx (512-1023 bytes) - R/clr */
+#define E1000_PTC1522 0x040EC /* Packets Tx (1024-1522 Bytes) - R/clr */
+#define E1000_MPTC 0x040F0 /* Multicast Packets Tx Count - R/clr */
+#define E1000_BPTC 0x040F4 /* Broadcast Packets Tx Count - R/clr */
+#define E1000_TSCTC 0x040F8 /* TCP Segmentation Context Tx - R/clr */
+#define E1000_TSCTFC 0x040FC /* TCP Segmentation Context Tx Fail - R/clr */
+#define E1000_IAC 0x04100 /* Interrupt Assertion Count */
+#define E1000_ICRXPTC 0x04104 /* Interrupt Cause Rx Pkt Timer Expire Count */
+#define E1000_ICRXATC 0x04108 /* Interrupt Cause Rx Abs Timer Expire Count */
+#define E1000_ICTXPTC 0x0410C /* Interrupt Cause Tx Pkt Timer Expire Count */
+#define E1000_ICTXATC 0x04110 /* Interrupt Cause Tx Abs Timer Expire Count */
+#define E1000_ICTXQEC 0x04118 /* Interrupt Cause Tx Queue Empty Count */
+#define E1000_ICTXQMTC 0x0411C /* Interrupt Cause Tx Queue Min Thresh Count */
+#define E1000_ICRXDMTC 0x04120 /* Interrupt Cause Rx Desc Min Thresh Count */
+#define E1000_ICRXOC 0x04124 /* Interrupt Cause Receiver Overrun Count */
+#define E1000_CRC_OFFSET 0x05F50 /* CRC Offset register */
-#define E1000_VFGPRC 0x00F10
-#define E1000_VFGORC 0x00F18
-#define E1000_VFMPRC 0x00F3C
-#define E1000_VFGPTC 0x00F14
-#define E1000_VFGOTC 0x00F34
-#define E1000_VFGOTLBC 0x00F50
-#define E1000_VFGPTLBC 0x00F44
-#define E1000_VFGORLBC 0x00F48
-#define E1000_VFGPRLBC 0x00F40
+#define E1000_VFGPRC 0x00F10
+#define E1000_VFGORC 0x00F18
+#define E1000_VFMPRC 0x00F3C
+#define E1000_VFGPTC 0x00F14
+#define E1000_VFGOTC 0x00F34
+#define E1000_VFGOTLBC 0x00F50
+#define E1000_VFGPTLBC 0x00F44
+#define E1000_VFGORLBC 0x00F48
+#define E1000_VFGPRLBC 0x00F40
/* Virtualization statistical counters */
-#define E1000_PFVFGPRC(_n) (0x010010 + (0x100 * (_n)))
-#define E1000_PFVFGPTC(_n) (0x010014 + (0x100 * (_n)))
-#define E1000_PFVFGORC(_n) (0x010018 + (0x100 * (_n)))
-#define E1000_PFVFGOTC(_n) (0x010034 + (0x100 * (_n)))
-#define E1000_PFVFMPRC(_n) (0x010038 + (0x100 * (_n)))
-#define E1000_PFVFGPRLBC(_n) (0x010040 + (0x100 * (_n)))
-#define E1000_PFVFGPTLBC(_n) (0x010044 + (0x100 * (_n)))
-#define E1000_PFVFGORLBC(_n) (0x010048 + (0x100 * (_n)))
-#define E1000_PFVFGOTLBC(_n) (0x010050 + (0x100 * (_n)))
+#define E1000_PFVFGPRC(_n) (0x010010 + (0x100 * (_n)))
+#define E1000_PFVFGPTC(_n) (0x010014 + (0x100 * (_n)))
+#define E1000_PFVFGORC(_n) (0x010018 + (0x100 * (_n)))
+#define E1000_PFVFGOTC(_n) (0x010034 + (0x100 * (_n)))
+#define E1000_PFVFMPRC(_n) (0x010038 + (0x100 * (_n)))
+#define E1000_PFVFGPRLBC(_n) (0x010040 + (0x100 * (_n)))
+#define E1000_PFVFGPTLBC(_n) (0x010044 + (0x100 * (_n)))
+#define E1000_PFVFGORLBC(_n) (0x010048 + (0x100 * (_n)))
+#define E1000_PFVFGOTLBC(_n) (0x010050 + (0x100 * (_n)))
-#define E1000_LSECTXUT 0x04300 /* LinkSec Tx Untagged Packet Count - OutPktsUntagged */
-#define E1000_LSECTXPKTE 0x04304 /* LinkSec Encrypted Tx Packets Count - OutPktsEncrypted */
-#define E1000_LSECTXPKTP 0x04308 /* LinkSec Protected Tx Packet Count - OutPktsProtected */
-#define E1000_LSECTXOCTE 0x0430C /* LinkSec Encrypted Tx Octets Count - OutOctetsEncrypted */
-#define E1000_LSECTXOCTP 0x04310 /* LinkSec Protected Tx Octets Count - OutOctetsProtected */
-#define E1000_LSECRXUT 0x04314 /* LinkSec Untagged non-Strict Rx Packet Count - InPktsUntagged/InPktsNoTag */
-#define E1000_LSECRXOCTD 0x0431C /* LinkSec Rx Octets Decrypted Count - InOctetsDecrypted */
-#define E1000_LSECRXOCTV 0x04320 /* LinkSec Rx Octets Validated - InOctetsValidated */
-#define E1000_LSECRXBAD 0x04324 /* LinkSec Rx Bad Tag - InPktsBadTag */
-#define E1000_LSECRXNOSCI 0x04328 /* LinkSec Rx Packet No SCI Count - InPktsNoSci */
-#define E1000_LSECRXUNSCI 0x0432C /* LinkSec Rx Packet Unknown SCI Count - InPktsUnknownSci */
-#define E1000_LSECRXUNCH 0x04330 /* LinkSec Rx Unchecked Packets Count - InPktsUnchecked */
-#define E1000_LSECRXDELAY 0x04340 /* LinkSec Rx Delayed Packet Count - InPktsDelayed */
-#define E1000_LSECRXLATE 0x04350 /* LinkSec Rx Late Packets Count - InPktsLate */
-#define E1000_LSECRXOK(_n) (0x04360 + (0x04 * (_n))) /* LinkSec Rx Packet OK Count - InPktsOk */
-#define E1000_LSECRXINV(_n) (0x04380 + (0x04 * (_n))) /* LinkSec Rx Invalid Count - InPktsInvalid */
-#define E1000_LSECRXNV(_n) (0x043A0 + (0x04 * (_n))) /* LinkSec Rx Not Valid Count - InPktsNotValid */
-#define E1000_LSECRXUNSA 0x043C0 /* LinkSec Rx Unused SA Count - InPktsUnusedSa */
-#define E1000_LSECRXNUSA 0x043D0 /* LinkSec Rx Not Using SA Count - InPktsNotUsingSa */
-#define E1000_LSECTXCAP 0x0B000 /* LinkSec Tx Capabilities Register - RO */
-#define E1000_LSECRXCAP 0x0B300 /* LinkSec Rx Capabilities Register - RO */
-#define E1000_LSECTXCTRL 0x0B004 /* LinkSec Tx Control - RW */
-#define E1000_LSECRXCTRL 0x0B304 /* LinkSec Rx Control - RW */
-#define E1000_LSECTXSCL 0x0B008 /* LinkSec Tx SCI Low - RW */
-#define E1000_LSECTXSCH 0x0B00C /* LinkSec Tx SCI High - RW */
-#define E1000_LSECTXSA 0x0B010 /* LinkSec Tx SA0 - RW */
-#define E1000_LSECTXPN0 0x0B018 /* LinkSec Tx SA PN 0 - RW */
-#define E1000_LSECTXPN1 0x0B01C /* LinkSec Tx SA PN 1 - RW */
-#define E1000_LSECRXSCL 0x0B3D0 /* LinkSec Rx SCI Low - RW */
-#define E1000_LSECRXSCH 0x0B3E0 /* LinkSec Rx SCI High - RW */
-#define E1000_LSECTXKEY0(_n) (0x0B020 + (0x04 * (_n))) /* LinkSec Tx 128-bit Key 0 - WO */
-#define E1000_LSECTXKEY1(_n) (0x0B030 + (0x04 * (_n))) /* LinkSec Tx 128-bit Key 1 - WO */
-#define E1000_LSECRXSA(_n) (0x0B310 + (0x04 * (_n))) /* LinkSec Rx SAs - RW */
-#define E1000_LSECRXPN(_n) (0x0B330 + (0x04 * (_n))) /* LinkSec Rx SAs - RW */
+/* LinkSec */
+#define E1000_LSECTXUT 0x04300 /* Tx Untagged Pkt Cnt */
+#define E1000_LSECTXPKTE 0x04304 /* Encrypted Tx Pkts Cnt */
+#define E1000_LSECTXPKTP 0x04308 /* Protected Tx Pkt Cnt */
+#define E1000_LSECTXOCTE 0x0430C /* Encrypted Tx Octets Cnt */
+#define E1000_LSECTXOCTP 0x04310 /* Protected Tx Octets Cnt */
+#define E1000_LSECRXUT 0x04314 /* Untagged non-Strict Rx Pkt Cnt */
+#define E1000_LSECRXOCTD 0x0431C /* Rx Octets Decrypted Count */
+#define E1000_LSECRXOCTV 0x04320 /* Rx Octets Validated */
+#define E1000_LSECRXBAD 0x04324 /* Rx Bad Tag */
+#define E1000_LSECRXNOSCI 0x04328 /* Rx Packet No SCI Count */
+#define E1000_LSECRXUNSCI 0x0432C /* Rx Packet Unknown SCI Count */
+#define E1000_LSECRXUNCH 0x04330 /* Rx Unchecked Packets Count */
+#define E1000_LSECRXDELAY 0x04340 /* Rx Delayed Packet Count */
+#define E1000_LSECRXLATE 0x04350 /* Rx Late Packets Count */
+#define E1000_LSECRXOK(_n) (0x04360 + (0x04 * (_n))) /* Rx Pkt OK Cnt */
+#define E1000_LSECRXINV(_n) (0x04380 + (0x04 * (_n))) /* Rx Invalid Cnt */
+#define E1000_LSECRXNV(_n) (0x043A0 + (0x04 * (_n))) /* Rx Not Valid Cnt */
+#define E1000_LSECRXUNSA 0x043C0 /* Rx Unused SA Count */
+#define E1000_LSECRXNUSA 0x043D0 /* Rx Not Using SA Count */
+#define E1000_LSECTXCAP 0x0B000 /* Tx Capabilities Register - RO */
+#define E1000_LSECRXCAP 0x0B300 /* Rx Capabilities Register - RO */
+#define E1000_LSECTXCTRL 0x0B004 /* Tx Control - RW */
+#define E1000_LSECRXCTRL 0x0B304 /* Rx Control - RW */
+#define E1000_LSECTXSCL 0x0B008 /* Tx SCI Low - RW */
+#define E1000_LSECTXSCH 0x0B00C /* Tx SCI High - RW */
+#define E1000_LSECTXSA 0x0B010 /* Tx SA0 - RW */
+#define E1000_LSECTXPN0 0x0B018 /* Tx SA PN 0 - RW */
+#define E1000_LSECTXPN1 0x0B01C /* Tx SA PN 1 - RW */
+#define E1000_LSECRXSCL 0x0B3D0 /* Rx SCI Low - RW */
+#define E1000_LSECRXSCH 0x0B3E0 /* Rx SCI High - RW */
+/* LinkSec Tx 128-bit Key 0 - WO */
+#define E1000_LSECTXKEY0(_n) (0x0B020 + (0x04 * (_n)))
+/* LinkSec Tx 128-bit Key 1 - WO */
+#define E1000_LSECTXKEY1(_n) (0x0B030 + (0x04 * (_n)))
+#define E1000_LSECRXSA(_n) (0x0B310 + (0x04 * (_n))) /* Rx SAs - RW */
+#define E1000_LSECRXPN(_n) (0x0B330 + (0x04 * (_n))) /* Rx SAs - RW */
/*
* LinkSec Rx Keys - where _n is the SA no. and _m the 4 dwords of the 128 bit
* key - RW.
*/
-#define E1000_LSECRXKEY(_n, _m) (0x0B350 + (0x10 * (_n)) + (0x04 * (_m)))
+#define E1000_LSECRXKEY(_n, _m) (0x0B350 + (0x10 * (_n)) + (0x04 * (_m)))
-#define E1000_SSVPC 0x041A0 /* Switch Security Violation Packet Count */
-#define E1000_IPSCTRL 0xB430 /* IpSec Control Register */
-#define E1000_IPSRXCMD 0x0B408 /* IPSec Rx Command Register - RW */
-#define E1000_IPSRXIDX 0x0B400 /* IPSec Rx Index - RW */
-#define E1000_IPSRXIPADDR(_n) (0x0B420+ (0x04 * (_n))) /* IPSec Rx IPv4/v6 Address - RW */
-#define E1000_IPSRXKEY(_n) (0x0B410 + (0x04 * (_n))) /* IPSec Rx 128-bit Key - RW */
-#define E1000_IPSRXSALT 0x0B404 /* IPSec Rx Salt - RW */
-#define E1000_IPSRXSPI 0x0B40C /* IPSec Rx SPI - RW */
-#define E1000_IPSTXKEY(_n) (0x0B460 + (0x04 * (_n))) /* IPSec Tx 128-bit Key - RW */
-#define E1000_IPSTXSALT 0x0B454 /* IPSec Tx Salt - RW */
-#define E1000_IPSTXIDX 0x0B450 /* IPSec Tx SA IDX - RW */
-#define E1000_PCS_CFG0 0x04200 /* PCS Configuration 0 - RW */
-#define E1000_PCS_LCTL 0x04208 /* PCS Link Control - RW */
-#define E1000_PCS_LSTAT 0x0420C /* PCS Link Status - RO */
-#define E1000_CBTMPC 0x0402C /* Circuit Breaker Tx Packet Count */
-#define E1000_HTDPMC 0x0403C /* Host Transmit Discarded Packets */
-#define E1000_CBRDPC 0x04044 /* Circuit Breaker Rx Dropped Count */
-#define E1000_CBRMPC 0x040FC /* Circuit Breaker Rx Packet Count */
-#define E1000_RPTHC 0x04104 /* Rx Packets To Host */
-#define E1000_HGPTC 0x04118 /* Host Good Packets Tx Count */
-#define E1000_HTCBDPC 0x04124 /* Host Tx Circuit Breaker Dropped Count */
-#define E1000_HGORCL 0x04128 /* Host Good Octets Received Count Low */
-#define E1000_HGORCH 0x0412C /* Host Good Octets Received Count High */
-#define E1000_HGOTCL 0x04130 /* Host Good Octets Transmit Count Low */
-#define E1000_HGOTCH 0x04134 /* Host Good Octets Transmit Count High */
-#define E1000_LENERRS 0x04138 /* Length Errors Count */
-#define E1000_SCVPC 0x04228 /* SerDes/SGMII Code Violation Pkt Count */
-#define E1000_HRMPC 0x0A018 /* Header Redirection Missed Packet Count */
-#define E1000_PCS_ANADV 0x04218 /* AN advertisement - RW */
-#define E1000_PCS_LPAB 0x0421C /* Link Partner Ability - RW */
-#define E1000_PCS_NPTX 0x04220 /* AN Next Page Transmit - RW */
-#define E1000_PCS_LPABNP 0x04224 /* Link Partner Ability Next Page - RW */
-#define E1000_1GSTAT_RCV 0x04228 /* 1GSTAT Code Violation Packet Count - RW */
-#define E1000_RXCSUM 0x05000 /* Rx Checksum Control - RW */
-#define E1000_RLPML 0x05004 /* Rx Long Packet Max Length */
-#define E1000_RFCTL 0x05008 /* Receive Filter Control*/
-#define E1000_MTA 0x05200 /* Multicast Table Array - RW Array */
-#define E1000_RA 0x05400 /* Receive Address - RW Array */
-#define E1000_RA2 0x054E0 /* 2nd half of receive address array - RW Array */
-#define E1000_VFTA 0x05600 /* VLAN Filter Table Array - RW Array */
-#define E1000_VT_CTL 0x0581C /* VMDq Control - RW */
-#define E1000_VFQA0 0x0B000 /* VLAN Filter Queue Array 0 - RW Array */
-#define E1000_VFQA1 0x0B200 /* VLAN Filter Queue Array 1 - RW Array */
-#define E1000_WUC 0x05800 /* Wakeup Control - RW */
-#define E1000_WUFC 0x05808 /* Wakeup Filter Control - RW */
-#define E1000_WUS 0x05810 /* Wakeup Status - RO */
-#define E1000_MANC 0x05820 /* Management Control - RW */
-#define E1000_IPAV 0x05838 /* IP Address Valid - RW */
-#define E1000_IP4AT 0x05840 /* IPv4 Address Table - RW Array */
-#define E1000_IP6AT 0x05880 /* IPv6 Address Table - RW Array */
-#define E1000_WUPL 0x05900 /* Wakeup Packet Length - RW */
-#define E1000_WUPM 0x05A00 /* Wakeup Packet Memory - RO A */
-#define E1000_PBACL 0x05B68 /* MSIx PBA Clear - Read/Write 1's to clear */
-#define E1000_FFLT 0x05F00 /* Flexible Filter Length Table - RW Array */
-#define E1000_HOST_IF 0x08800 /* Host Interface */
-#define E1000_FFMT 0x09000 /* Flexible Filter Mask Table - RW Array */
-#define E1000_FFVT 0x09800 /* Flexible Filter Value Table - RW Array */
-#define E1000_FHFT(_n) (0x09000 + (_n * 0x100)) /* Flexible Host Filter Table */
-#define E1000_FHFT_EXT(_n) (0x09A00 + (_n * 0x100)) /* Ext Flexible Host Filter Table */
+#define E1000_SSVPC 0x041A0 /* Switch Security Violation Pkt Cnt */
+#define E1000_IPSCTRL 0xB430 /* IpSec Control Register */
+#define E1000_IPSRXCMD 0x0B408 /* IPSec Rx Command Register - RW */
+#define E1000_IPSRXIDX 0x0B400 /* IPSec Rx Index - RW */
+/* IPSec Rx IPv4/v6 Address - RW */
+#define E1000_IPSRXIPADDR(_n) (0x0B420 + (0x04 * (_n)))
+/* IPSec Rx 128-bit Key - RW */
+#define E1000_IPSRXKEY(_n) (0x0B410 + (0x04 * (_n)))
+#define E1000_IPSRXSALT 0x0B404 /* IPSec Rx Salt - RW */
+#define E1000_IPSRXSPI 0x0B40C /* IPSec Rx SPI - RW */
+/* IPSec Tx 128-bit Key - RW */
+#define E1000_IPSTXKEY(_n) (0x0B460 + (0x04 * (_n)))
+#define E1000_IPSTXSALT 0x0B454 /* IPSec Tx Salt - RW */
+#define E1000_IPSTXIDX 0x0B450 /* IPSec Tx SA IDX - RW */
+#define E1000_PCS_CFG0 0x04200 /* PCS Configuration 0 - RW */
+#define E1000_PCS_LCTL 0x04208 /* PCS Link Control - RW */
+#define E1000_PCS_LSTAT 0x0420C /* PCS Link Status - RO */
+#define E1000_CBTMPC 0x0402C /* Circuit Breaker Tx Packet Count */
+#define E1000_HTDPMC 0x0403C /* Host Transmit Discarded Packets */
+#define E1000_CBRDPC 0x04044 /* Circuit Breaker Rx Dropped Count */
+#define E1000_CBRMPC 0x040FC /* Circuit Breaker Rx Packet Count */
+#define E1000_RPTHC 0x04104 /* Rx Packets To Host */
+#define E1000_HGPTC 0x04118 /* Host Good Packets Tx Count */
+#define E1000_HTCBDPC 0x04124 /* Host Tx Circuit Breaker Dropped Count */
+#define E1000_HGORCL 0x04128 /* Host Good Octets Received Count Low */
+#define E1000_HGORCH 0x0412C /* Host Good Octets Received Count High */
+#define E1000_HGOTCL 0x04130 /* Host Good Octets Transmit Count Low */
+#define E1000_HGOTCH 0x04134 /* Host Good Octets Transmit Count High */
+#define E1000_LENERRS 0x04138 /* Length Errors Count */
+#define E1000_SCVPC 0x04228 /* SerDes/SGMII Code Violation Pkt Count */
+#define E1000_HRMPC 0x0A018 /* Header Redirection Missed Packet Count */
+#define E1000_PCS_ANADV 0x04218 /* AN advertisement - RW */
+#define E1000_PCS_LPAB 0x0421C /* Link Partner Ability - RW */
+#define E1000_PCS_NPTX 0x04220 /* AN Next Page Transmit - RW */
+#define E1000_PCS_LPABNP 0x04224 /* Link Partner Ability Next Pg - RW */
+#define E1000_1GSTAT_RCV 0x04228 /* 1GSTAT Code Violation Pkt Cnt - RW */
+#define E1000_RXCSUM 0x05000 /* Rx Checksum Control - RW */
+#define E1000_RLPML 0x05004 /* Rx Long Packet Max Length */
+#define E1000_RFCTL 0x05008 /* Receive Filter Control*/
+#define E1000_MTA 0x05200 /* Multicast Table Array - RW Array */
+#define E1000_RA 0x05400 /* Receive Address - RW Array */
+#define E1000_RA2 0x054E0 /* 2nd half of Rx address array - RW Array */
+#define E1000_VFTA 0x05600 /* VLAN Filter Table Array - RW Array */
+#define E1000_VT_CTL 0x0581C /* VMDq Control - RW */
+#define E1000_CIAA 0x05B88 /* Config Indirect Access Address - RW */
+#define E1000_CIAD 0x05B8C /* Config Indirect Access Data - RW */
+#define E1000_VFQA0 0x0B000 /* VLAN Filter Queue Array 0 - RW Array */
+#define E1000_VFQA1 0x0B200 /* VLAN Filter Queue Array 1 - RW Array */
+#define E1000_WUC 0x05800 /* Wakeup Control - RW */
+#define E1000_WUFC 0x05808 /* Wakeup Filter Control - RW */
+#define E1000_WUS 0x05810 /* Wakeup Status - RO */
+#define E1000_MANC 0x05820 /* Management Control - RW */
+#define E1000_IPAV 0x05838 /* IP Address Valid - RW */
+#define E1000_IP4AT 0x05840 /* IPv4 Address Table - RW Array */
+#define E1000_IP6AT 0x05880 /* IPv6 Address Table - RW Array */
+#define E1000_WUPL 0x05900 /* Wakeup Packet Length - RW */
+#define E1000_WUPM 0x05A00 /* Wakeup Packet Memory - RO A */
+#define E1000_PBACL 0x05B68 /* MSIx PBA Clear - Read/Write 1's to clear */
+#define E1000_FFLT 0x05F00 /* Flexible Filter Length Table - RW Array */
+#define E1000_HOST_IF 0x08800 /* Host Interface */
+#define E1000_FFMT 0x09000 /* Flexible Filter Mask Table - RW Array */
+#define E1000_FFVT 0x09800 /* Flexible Filter Value Table - RW Array */
+/* Flexible Host Filter Table */
+#define E1000_FHFT(_n) (0x09000 + (_n * 0x100))
+/* Ext Flexible Host Filter Table */
+#define E1000_FHFT_EXT(_n) (0x09A00 + (_n * 0x100))
-#define E1000_KMRNCTRLSTA 0x00034 /* MAC-PHY interface - RW */
-#define E1000_MDPHYA 0x0003C /* PHY address - RW */
-#define E1000_MANC2H 0x05860 /* Management Control To Host - RW */
-#define E1000_MDEF(_n) (0x05890 + (4 * (_n))) /* Mngmt Decision Filters */
-#define E1000_SW_FW_SYNC 0x05B5C /* Software-Firmware Synchronization - RW */
-#define E1000_CCMCTL 0x05B48 /* CCM Control Register */
-#define E1000_GIOCTL 0x05B44 /* GIO Analog Control Register */
-#define E1000_SCCTL 0x05B4C /* PCIc PLL Configuration Register */
-#define E1000_GCR 0x05B00 /* PCI-Ex Control */
-#define E1000_GCR2 0x05B64 /* PCI-Ex Control #2 */
-#define E1000_GSCL_1 0x05B10 /* PCI-Ex Statistic Control #1 */
-#define E1000_GSCL_2 0x05B14 /* PCI-Ex Statistic Control #2 */
-#define E1000_GSCL_3 0x05B18 /* PCI-Ex Statistic Control #3 */
-#define E1000_GSCL_4 0x05B1C /* PCI-Ex Statistic Control #4 */
-#define E1000_FACTPS 0x05B30 /* Function Active and Power State to MNG */
-#define E1000_SWSM 0x05B50 /* SW Semaphore */
-#define E1000_FWSM 0x05B54 /* FW Semaphore */
-#define E1000_SWSM2 0x05B58 /* Driver-only SW semaphore (not used by BOOT agents) */
-#define E1000_DCA_ID 0x05B70 /* DCA Requester ID Information - RO */
-#define E1000_DCA_CTRL 0x05B74 /* DCA Control - RW */
-#define E1000_UFUSE 0x05B78 /* UFUSE - RO */
-#define E1000_FFLT_DBG 0x05F04 /* Debug Register */
-#define E1000_HICR 0x08F00 /* Host Interface Control */
-#define E1000_FWSTS 0x08F0C /* FW Status */
+#define E1000_KMRNCTRLSTA 0x00034 /* MAC-PHY interface - RW */
+#define E1000_MDPHYA 0x0003C /* PHY address - RW */
+#define E1000_MANC2H 0x05860 /* Management Control To Host - RW */
+/* Management Decision Filters */
+#define E1000_MDEF(_n) (0x05890 + (4 * (_n)))
+#define E1000_SW_FW_SYNC 0x05B5C /* SW-FW Synchronization - RW */
+#define E1000_CCMCTL 0x05B48 /* CCM Control Register */
+#define E1000_GIOCTL 0x05B44 /* GIO Analog Control Register */
+#define E1000_SCCTL 0x05B4C /* PCIc PLL Configuration Register */
+#define E1000_GCR 0x05B00 /* PCI-Ex Control */
+#define E1000_GCR2 0x05B64 /* PCI-Ex Control #2 */
+#define E1000_GSCL_1 0x05B10 /* PCI-Ex Statistic Control #1 */
+#define E1000_GSCL_2 0x05B14 /* PCI-Ex Statistic Control #2 */
+#define E1000_GSCL_3 0x05B18 /* PCI-Ex Statistic Control #3 */
+#define E1000_GSCL_4 0x05B1C /* PCI-Ex Statistic Control #4 */
+#define E1000_FACTPS 0x05B30 /* Function Active and Power State to MNG */
+#define E1000_SWSM 0x05B50 /* SW Semaphore */
+#define E1000_FWSM 0x05B54 /* FW Semaphore */
+/* Driver-only SW semaphore (not used by BOOT agents) */
+#define E1000_SWSM2 0x05B58
+#define E1000_DCA_ID 0x05B70 /* DCA Requester ID Information - RO */
+#define E1000_DCA_CTRL 0x05B74 /* DCA Control - RW */
+#define E1000_UFUSE 0x05B78 /* UFUSE - RO */
+#define E1000_FFLT_DBG 0x05F04 /* Debug Register */
+#define E1000_HICR 0x08F00 /* Host Interface Control */
+#define E1000_FWSTS 0x08F0C /* FW Status */
/* RSS registers */
-#define E1000_CPUVEC 0x02C10 /* CPU Vector Register - RW */
-#define E1000_MRQC 0x05818 /* Multiple Receive Control - RW */
-#define E1000_IMIR(_i) (0x05A80 + ((_i) * 4)) /* Immediate Interrupt */
-#define E1000_IMIREXT(_i) (0x05AA0 + ((_i) * 4)) /* Immediate Interrupt Ext*/
-#define E1000_IMIRVP 0x05AC0 /* Immediate Interrupt Rx VLAN Priority - RW */
-#define E1000_MSIXBM(_i) (0x01600 + ((_i) * 4)) /* MSI-X Allocation Register
- * (_i) - RW */
-#define E1000_MSIXTADD(_i) (0x0C000 + ((_i) * 0x10)) /* MSI-X Table entry addr
- * low reg - RW */
-#define E1000_MSIXTUADD(_i) (0x0C004 + ((_i) * 0x10)) /* MSI-X Table entry addr
- * upper reg - RW */
-#define E1000_MSIXTMSG(_i) (0x0C008 + ((_i) * 0x10)) /* MSI-X Table entry
- * message reg - RW */
-#define E1000_MSIXVCTRL(_i) (0x0C00C + ((_i) * 0x10)) /* MSI-X Table entry
- * vector ctrl reg - RW */
-#define E1000_MSIXPBA 0x0E000 /* MSI-X Pending bit array */
-#define E1000_RETA(_i) (0x05C00 + ((_i) * 4)) /* Redirection Table - RW */
-#define E1000_RSSRK(_i) (0x05C80 + ((_i) * 4)) /* RSS Random Key - RW */
-#define E1000_RSSIM 0x05864 /* RSS Interrupt Mask */
-#define E1000_RSSIR 0x05868 /* RSS Interrupt Request */
+#define E1000_CPUVEC 0x02C10 /* CPU Vector Register - RW */
+#define E1000_MRQC 0x05818 /* Multiple Receive Control - RW */
+#define E1000_IMIR(_i) (0x05A80 + ((_i) * 4)) /* Immediate Interrupt */
+#define E1000_IMIREXT(_i) (0x05AA0 + ((_i) * 4)) /* Immediate INTR Ext*/
+#define E1000_IMIRVP 0x05AC0 /* Immediate INT Rx VLAN Priority -RW */
+#define E1000_MSIXBM(_i) (0x01600 + ((_i) * 4)) /* MSI-X Alloc Reg -RW */
+/* MSI-X Table entry addr low reg - RW */
+#define E1000_MSIXTADD(_i) (0x0C000 + ((_i) * 0x10))
+/* MSI-X Table entry addr upper reg - RW */
+#define E1000_MSIXTUADD(_i) (0x0C004 + ((_i) * 0x10))
+/* MSI-X Table entry message reg - RW */
+#define E1000_MSIXTMSG(_i) (0x0C008 + ((_i) * 0x10))
+/* MSI-X Table entry vector ctrl reg - RW */
+#define E1000_MSIXVCTRL(_i) (0x0C00C + ((_i) * 0x10))
+#define E1000_MSIXPBA 0x0E000 /* MSI-X Pending bit array */
+#define E1000_RETA(_i) (0x05C00 + ((_i) * 4)) /* Redirection Table - RW */
+#define E1000_RSSRK(_i) (0x05C80 + ((_i) * 4)) /* RSS Random Key - RW */
+#define E1000_RSSIM 0x05864 /* RSS Interrupt Mask */
+#define E1000_RSSIR 0x05868 /* RSS Interrupt Request */
/* VT Registers */
-#define E1000_SWPBS 0x03004 /* Switch Packet Buffer Size - RW */
-#define E1000_MBVFICR 0x00C80 /* Mailbox VF Cause - RWC */
-#define E1000_MBVFIMR 0x00C84 /* Mailbox VF int Mask - RW */
-#define E1000_VFLRE 0x00C88 /* VF Register Events - RWC */
-#define E1000_VFRE 0x00C8C /* VF Receive Enables */
-#define E1000_VFTE 0x00C90 /* VF Transmit Enables */
-#define E1000_QDE 0x02408 /* Queue Drop Enable - RW */
-#define E1000_DTXSWC 0x03500 /* DMA Tx Switch Control - RW */
-#define E1000_WVBR 0x03554 /* VM Wrong Behavior - RWS */
-#define E1000_RPLOLR 0x05AF0 /* Replication Offload - RW */
-#define E1000_UTA 0x0A000 /* Unicast Table Array - RW */
-#define E1000_IOVTCL 0x05BBC /* IOV Control Register */
-#define E1000_VMRCTL 0X05D80 /* Virtual Mirror Rule Control */
-#define E1000_VMRVLAN 0x05D90 /* Virtual Mirror Rule VLAN */
-#define E1000_VMRVM 0x05DA0 /* Virtual Mirror Rule VM */
-#define E1000_MDFB 0x03558 /* Malicious Driver free block */
-#define E1000_LVMMC 0x03548 /* Last VM Misbehavior cause */
-#define E1000_TXSWC 0x05ACC /* Tx Switch Control */
-#define E1000_SCCRL 0x05DB0 /* Storm Control Control */
-#define E1000_BSCTRH 0x05DB8 /* Broadcast Storm Control Threshold */
-#define E1000_MSCTRH 0x05DBC /* Multicast Storm Control Threshold */
+#define E1000_SWPBS 0x03004 /* Switch Packet Buffer Size - RW */
+#define E1000_MBVFICR 0x00C80 /* Mailbox VF Cause - RWC */
+#define E1000_MBVFIMR 0x00C84 /* Mailbox VF int Mask - RW */
+#define E1000_VFLRE 0x00C88 /* VF Register Events - RWC */
+#define E1000_VFRE 0x00C8C /* VF Receive Enables */
+#define E1000_VFTE 0x00C90 /* VF Transmit Enables */
+#define E1000_QDE 0x02408 /* Queue Drop Enable - RW */
+#define E1000_DTXSWC 0x03500 /* DMA Tx Switch Control - RW */
+#define E1000_WVBR 0x03554 /* VM Wrong Behavior - RWS */
+#define E1000_RPLOLR 0x05AF0 /* Replication Offload - RW */
+#define E1000_UTA 0x0A000 /* Unicast Table Array - RW */
+#define E1000_IOVTCL 0x05BBC /* IOV Control Register */
+#define E1000_VMRCTL 0X05D80 /* Virtual Mirror Rule Control */
+#define E1000_VMRVLAN 0x05D90 /* Virtual Mirror Rule VLAN */
+#define E1000_VMRVM 0x05DA0 /* Virtual Mirror Rule VM */
+#define E1000_MDFB 0x03558 /* Malicious Driver free block */
+#define E1000_LVMMC 0x03548 /* Last VM Misbehavior cause */
+#define E1000_TXSWC 0x05ACC /* Tx Switch Control */
+#define E1000_SCCRL 0x05DB0 /* Storm Control Control */
+#define E1000_BSCTRH 0x05DB8 /* Broadcast Storm Control Threshold */
+#define E1000_MSCTRH 0x05DBC /* Multicast Storm Control Threshold */
/* These act per VF so an array friendly macro is used */
-#define E1000_V2PMAILBOX(_n) (0x00C40 + (4 * (_n)))
-#define E1000_P2VMAILBOX(_n) (0x00C00 + (4 * (_n)))
-#define E1000_VMBMEM(_n) (0x00800 + (64 * (_n)))
-#define E1000_VFVMBMEM(_n) (0x00800 + (_n))
-#define E1000_VMOLR(_n) (0x05AD0 + (4 * (_n)))
-#define E1000_VLVF(_n) (0x05D00 + (4 * (_n))) /* VLAN Virtual Machine
- * Filter - RW */
-#define E1000_VMVIR(_n) (0x03700 + (4 * (_n)))
-#define E1000_DVMOLR(_n) (0x0C038 + (0x40 * (_n))) /* DMA VM offload */
-/* Time Sync */
-#define E1000_TSYNCRXCTL 0x0B620 /* Rx Time Sync Control register - RW */
-#define E1000_TSYNCTXCTL 0x0B614 /* Tx Time Sync Control register - RW */
-#define E1000_TSYNCRXCFG 0x05F50 /* Time Sync Rx Configuration - RW */
-#define E1000_RXSTMPL 0x0B624 /* Rx timestamp Low - RO */
-#define E1000_RXSTMPH 0x0B628 /* Rx timestamp High - RO */
-#define E1000_RXSATRL 0x0B62C /* Rx timestamp attribute low - RO */
-#define E1000_RXSATRH 0x0B630 /* Rx timestamp attribute high - RO */
-#define E1000_TXSTMPL 0x0B618 /* Tx timestamp value Low - RO */
-#define E1000_TXSTMPH 0x0B61C /* Tx timestamp value High - RO */
-#define E1000_SYSTIML 0x0B600 /* System time register Low - RO */
-#define E1000_SYSTIMH 0x0B604 /* System time register High - RO */
-#define E1000_TIMINCA 0x0B608 /* Increment attributes register - RW */
-#define E1000_TSAUXC 0x0B640 /* Timesync Auxiliary Control register */
-#define E1000_SYSTIMR 0x0B6F8 /* System time register Residue */
-#define E1000_RXMTRL 0x0B634 /* Time sync Rx EtherType and Msg Type - RW */
-#define E1000_RXUDP 0x0B638 /* Time Sync Rx UDP Port - RW */
+#define E1000_V2PMAILBOX(_n) (0x00C40 + (4 * (_n)))
+#define E1000_P2VMAILBOX(_n) (0x00C00 + (4 * (_n)))
+#define E1000_VMBMEM(_n) (0x00800 + (64 * (_n)))
+#define E1000_VFVMBMEM(_n) (0x00800 + (_n))
+#define E1000_VMOLR(_n) (0x05AD0 + (4 * (_n)))
+/* VLAN Virtual Machine Filter - RW */
+#define E1000_VLVF(_n) (0x05D00 + (4 * (_n)))
+#define E1000_VMVIR(_n) (0x03700 + (4 * (_n)))
+#define E1000_DVMOLR(_n) (0x0C038 + (0x40 * (_n))) /* DMA VM offload */
+#define E1000_VTCTRL(_n) (0x10000 + (0x100 * (_n))) /* VT Control */
+#define E1000_TSYNCRXCTL 0x0B620 /* Rx Time Sync Control register - RW */
+#define E1000_TSYNCTXCTL 0x0B614 /* Tx Time Sync Control register - RW */
+#define E1000_TSYNCRXCFG 0x05F50 /* Time Sync Rx Configuration - RW */
+#define E1000_RXSTMPL 0x0B624 /* Rx timestamp Low - RO */
+#define E1000_RXSTMPH 0x0B628 /* Rx timestamp High - RO */
+#define E1000_RXSATRL 0x0B62C /* Rx timestamp attribute low - RO */
+#define E1000_RXSATRH 0x0B630 /* Rx timestamp attribute high - RO */
+#define E1000_TXSTMPL 0x0B618 /* Tx timestamp value Low - RO */
+#define E1000_TXSTMPH 0x0B61C /* Tx timestamp value High - RO */
+#define E1000_SYSTIML 0x0B600 /* System time register Low - RO */
+#define E1000_SYSTIMH 0x0B604 /* System time register High - RO */
+#define E1000_TIMINCA 0x0B608 /* Increment attributes register - RW */
+#define E1000_TSAUXC 0x0B640 /* Timesync Auxiliary Control register */
+#define E1000_SYSTIMR 0x0B6F8 /* System time register Residue */
+#define E1000_RXMTRL 0x0B634 /* Time sync Rx EtherType and Msg Type - RW */
+#define E1000_RXUDP 0x0B638 /* Time Sync Rx UDP Port - RW */
/* Filtering Registers */
-#define E1000_SAQF(_n) (0x05980 + (4 * (_n))) /* Source Address Queue Fltr */
-#define E1000_DAQF(_n) (0x059A0 + (4 * (_n))) /* Dest Address Queue Fltr */
-#define E1000_SPQF(_n) (0x059C0 + (4 * (_n))) /* Source Port Queue Fltr */
-#define E1000_FTQF(_n) (0x059E0 + (4 * (_n))) /* 5-tuple Queue Fltr */
-#define E1000_TTQF(_n) (0x059E0 + (4 * (_n))) /* 2-tuple Queue Fltr */
-#define E1000_SYNQF(_n) (0x055FC + (4 * (_n))) /* SYN Packet Queue Fltr */
-#define E1000_ETQF(_n) (0x05CB0 + (4 * (_n))) /* EType Queue Fltr */
+#define E1000_SAQF(_n) (0x05980 + (4 * (_n))) /* Source Address Queue Fltr */
+#define E1000_DAQF(_n) (0x059A0 + (4 * (_n))) /* Dest Address Queue Fltr */
+#define E1000_SPQF(_n) (0x059C0 + (4 * (_n))) /* Source Port Queue Fltr */
+#define E1000_FTQF(_n) (0x059E0 + (4 * (_n))) /* 5-tuple Queue Fltr */
+#define E1000_TTQF(_n) (0x059E0 + (4 * (_n))) /* 2-tuple Queue Fltr */
+#define E1000_SYNQF(_n) (0x055FC + (4 * (_n))) /* SYN Packet Queue Fltr */
+#define E1000_ETQF(_n) (0x05CB0 + (4 * (_n))) /* EType Queue Fltr */
-#define E1000_RTTDCS 0x3600 /* Reedtown Tx Desc plane control and status */
-#define E1000_RTTPCS 0x3474 /* Reedtown Tx Packet Plane control and status */
-#define E1000_RTRPCS 0x2474 /* Rx packet plane control and status */
-#define E1000_RTRUP2TC 0x05AC4 /* Rx User Priority to Traffic Class */
-#define E1000_RTTUP2TC 0x0418 /* Transmit User Priority to Traffic Class */
-#define E1000_RTTDTCRC(_n) (0x3610 + ((_n) * 4)) /* Tx Desc plane TC Rate-scheduler config */
-#define E1000_RTTPTCRC(_n) (0x3480 + ((_n) * 4)) /* Tx Packet plane TC Rate-Scheduler Config */
-#define E1000_RTRPTCRC(_n) (0x2480 + ((_n) * 4)) /* Rx Packet plane TC Rate-Scheduler Config */
-#define E1000_RTTDTCRS(_n) (0x3630 + ((_n) * 4)) /* Tx Desc Plane TC Rate-Scheduler Status */
-#define E1000_RTTDTCRM(_n) (0x3650 + ((_n) * 4)) /* Tx Desc Plane TC Rate-Scheduler MMW */
-#define E1000_RTTPTCRS(_n) (0x34A0 + ((_n) * 4)) /* Tx Packet plane TC Rate-Scheduler Status */
-#define E1000_RTTPTCRM(_n) (0x34C0 + ((_n) * 4)) /* Tx Packet plane TC Rate-scheduler MMW */
-#define E1000_RTRPTCRS(_n) (0x24A0 + ((_n) * 4)) /* Rx Packet plane TC Rate-Scheduler Status */
-#define E1000_RTRPTCRM(_n) (0x24C0 + ((_n) * 4)) /* Rx Packet plane TC Rate-Scheduler MMW */
-#define E1000_RTTDVMRM(_n) (0x3670 + ((_n) * 4)) /* Tx Desc plane VM Rate-Scheduler MMW*/
-#define E1000_RTTBCNRM(_n) (0x3690 + ((_n) * 4)) /* Tx BCN Rate-Scheduler MMW */
-#define E1000_RTTDQSEL 0x3604 /* Tx Desc Plane Queue Select */
-#define E1000_RTTDVMRC 0x3608 /* Tx Desc Plane VM Rate-Scheduler Config */
-#define E1000_RTTDVMRS 0x360C /* Tx Desc Plane VM Rate-Scheduler Status */
-#define E1000_RTTBCNRC 0x36B0 /* Tx BCN Rate-Scheduler Config */
-#define E1000_RTTBCNRS 0x36B4 /* Tx BCN Rate-Scheduler Status */
-#define E1000_RTTBCNCR 0xB200 /* Tx BCN Control Register */
-#define E1000_RTTBCNTG 0x35A4 /* Tx BCN Tagging */
-#define E1000_RTTBCNCP 0xB208 /* Tx BCN Congestion point */
-#define E1000_RTRBCNCR 0xB20C /* Rx BCN Control Register */
-#define E1000_RTTBCNRD 0x36B8 /* Tx BCN Rate Drift */
-#define E1000_PFCTOP 0x1080 /* Priority Flow Control Type and Opcode */
-#define E1000_RTTBCNIDX 0xB204 /* Tx BCN Congestion Point */
-#define E1000_RTTBCNACH 0x0B214 /* Tx BCN Control High */
-#define E1000_RTTBCNACL 0x0B210 /* Tx BCN Control Low */
+#define E1000_RTTDCS 0x3600 /* Reedtown Tx Desc plane control and status */
+#define E1000_RTTPCS 0x3474 /* Reedtown Tx Packet Plane control and status */
+#define E1000_RTRPCS 0x2474 /* Rx packet plane control and status */
+#define E1000_RTRUP2TC 0x05AC4 /* Rx User Priority to Traffic Class */
+#define E1000_RTTUP2TC 0x0418 /* Transmit User Priority to Traffic Class */
+/* Tx Desc plane TC Rate-scheduler config */
+#define E1000_RTTDTCRC(_n) (0x3610 + ((_n) * 4))
+/* Tx Packet plane TC Rate-Scheduler Config */
+#define E1000_RTTPTCRC(_n) (0x3480 + ((_n) * 4))
+/* Rx Packet plane TC Rate-Scheduler Config */
+#define E1000_RTRPTCRC(_n) (0x2480 + ((_n) * 4))
+/* Tx Desc Plane TC Rate-Scheduler Status */
+#define E1000_RTTDTCRS(_n) (0x3630 + ((_n) * 4))
+/* Tx Desc Plane TC Rate-Scheduler MMW */
+#define E1000_RTTDTCRM(_n) (0x3650 + ((_n) * 4))
+/* Tx Packet plane TC Rate-Scheduler Status */
+#define E1000_RTTPTCRS(_n) (0x34A0 + ((_n) * 4))
+/* Tx Packet plane TC Rate-scheduler MMW */
+#define E1000_RTTPTCRM(_n) (0x34C0 + ((_n) * 4))
+/* Rx Packet plane TC Rate-Scheduler Status */
+#define E1000_RTRPTCRS(_n) (0x24A0 + ((_n) * 4))
+/* Rx Packet plane TC Rate-Scheduler MMW */
+#define E1000_RTRPTCRM(_n) (0x24C0 + ((_n) * 4))
+/* Tx Desc plane VM Rate-Scheduler MMW*/
+#define E1000_RTTDVMRM(_n) (0x3670 + ((_n) * 4))
+/* Tx BCN Rate-Scheduler MMW */
+#define E1000_RTTBCNRM(_n) (0x3690 + ((_n) * 4))
+#define E1000_RTTDQSEL 0x3604 /* Tx Desc Plane Queue Select */
+#define E1000_RTTDVMRC 0x3608 /* Tx Desc Plane VM Rate-Scheduler Config */
+#define E1000_RTTDVMRS 0x360C /* Tx Desc Plane VM Rate-Scheduler Status */
+#define E1000_RTTBCNRC 0x36B0 /* Tx BCN Rate-Scheduler Config */
+#define E1000_RTTBCNRS 0x36B4 /* Tx BCN Rate-Scheduler Status */
+#define E1000_RTTBCNCR 0xB200 /* Tx BCN Control Register */
+#define E1000_RTTBCNTG 0x35A4 /* Tx BCN Tagging */
+#define E1000_RTTBCNCP 0xB208 /* Tx BCN Congestion point */
+#define E1000_RTRBCNCR 0xB20C /* Rx BCN Control Register */
+#define E1000_RTTBCNRD 0x36B8 /* Tx BCN Rate Drift */
+#define E1000_PFCTOP 0x1080 /* Priority Flow Control Type and Opcode */
+#define E1000_RTTBCNIDX 0xB204 /* Tx BCN Congestion Point */
+#define E1000_RTTBCNACH 0x0B214 /* Tx BCN Control High */
+#define E1000_RTTBCNACL 0x0B210 /* Tx BCN Control Low */
/* DMA Coalescing registers */
-#define E1000_DMACR 0x02508 /* Control Register */
-#define E1000_DMCTXTH 0x03550 /* Transmit Threshold */
-#define E1000_DMCTLX 0x02514 /* Time to Lx Request */
-#define E1000_DMCRTRH 0x05DD0 /* Receive Packet Rate Threshold */
-#define E1000_DMCCNT 0x05DD4 /* Current Rx Count */
-#define E1000_FCRTC 0x02170 /* Flow Control Rx high watermark */
-#define E1000_PCIEMISC 0x05BB8 /* PCIE misc config register */
+#define E1000_DMACR 0x02508 /* Control Register */
+#define E1000_DMCTXTH 0x03550 /* Transmit Threshold */
+#define E1000_DMCTLX 0x02514 /* Time to Lx Request */
+#define E1000_DMCRTRH 0x05DD0 /* Receive Packet Rate Threshold */
+#define E1000_DMCCNT 0x05DD4 /* Current Rx Count */
+#define E1000_FCRTC 0x02170 /* Flow Control Rx high watermark */
+#define E1000_PCIEMISC 0x05BB8 /* PCIE misc config register */
/* PCIe Parity Status Register */
-#define E1000_PCIEERRSTS 0x05BA8
+#define E1000_PCIEERRSTS 0x05BA8
-#define E1000_PROXYS 0x5F64 /* Proxying Status */
-#define E1000_PROXYFC 0x5F60 /* Proxying Filter Control */
+#define E1000_LTRMINV 0x5BB0 /* LTR Minimum Value */
+#define E1000_LTRMAXV 0x5BB4 /* LTR Maximum Value */
+#define E1000_DOBFFCTL 0x3F24 /* DMA OBFF Control Register */
+
+#define E1000_PROXYS 0x5F64 /* Proxying Status */
+#define E1000_PROXYFC 0x5F60 /* Proxying Filter Control */
/* Thermal sensor configuration and status registers */
-#define E1000_THMJT 0x08100 /* Junction Temperature */
-#define E1000_THLOWTC 0x08104 /* Low Threshold Control */
-#define E1000_THMIDTC 0x08108 /* Mid Threshold Control */
-#define E1000_THHIGHTC 0x0810C /* High Threshold Control */
-#define E1000_THSTAT 0x08110 /* Thermal Sensor Status */
+#define E1000_THMJT 0x08100 /* Junction Temperature */
+#define E1000_THLOWTC 0x08104 /* Low Threshold Control */
+#define E1000_THMIDTC 0x08108 /* Mid Threshold Control */
+#define E1000_THHIGHTC 0x0810C /* High Threshold Control */
+#define E1000_THSTAT 0x08110 /* Thermal Sensor Status */
/*Energy Efficient Ethernet "EEE" registers */
-#define E1000_IPCNFG 0x0E38 /* Internal PHY Configuration */
-#define E1000_LTRC 0x01A0 /* Latency Tolerance Reporting Control */
-#define E1000_EEER 0x0E30 /* Energy Efficient Ethernet "EEE"*/
-#define E1000_EEE_SU 0x0E34 /* EEE Setup */
-#define E1000_TLPIC 0x4148 /* EEE Tx LPI Count - TLPIC */
-#define E1000_RLPIC 0x414C /* EEE Rx LPI Count - RLPIC */
+#define E1000_IPCNFG 0x0E38 /* Internal PHY Configuration */
+#define E1000_LTRC 0x01A0 /* Latency Tolerance Reporting Control */
+#define E1000_EEER 0x0E30 /* Energy Efficient Ethernet "EEE"*/
+#define E1000_EEE_SU 0x0E34 /* EEE Setup */
+#define E1000_TLPIC 0x4148 /* EEE Tx LPI Count - TLPIC */
+#define E1000_RLPIC 0x414C /* EEE Rx LPI Count - RLPIC */
/* OS2BMC Registers */
-#define E1000_B2OSPC 0x08FE0 /* BMC2OS packets sent by BMC */
-#define E1000_B2OGPRC 0x04158 /* BMC2OS packets received by host */
-#define E1000_O2BGPTC 0x08FE4 /* OS2BMC packets received by BMC */
-#define E1000_O2BSPC 0x0415C /* OS2BMC packets transmitted by host */
+#define E1000_B2OSPC 0x08FE0 /* BMC2OS packets sent by BMC */
+#define E1000_B2OGPRC 0x04158 /* BMC2OS packets received by host */
+#define E1000_O2BGPTC 0x08FE4 /* OS2BMC packets received by BMC */
+#define E1000_O2BSPC 0x0415C /* OS2BMC packets transmitted by host */
#endif
diff --git a/sys/dev/e1000/e1000_vf.c b/sys/dev/e1000/e1000_vf.c
index 3eeda24..d1286ad 100644
--- a/sys/dev/e1000/e1000_vf.c
+++ b/sys/dev/e1000/e1000_vf.c
@@ -1,6 +1,6 @@
/******************************************************************************
- Copyright (c) 2001-2010, Intel Corporation
+ Copyright (c) 2001-2011, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -36,21 +36,21 @@
#include "e1000_api.h"
-static s32 e1000_init_phy_params_vf(struct e1000_hw *hw);
-static s32 e1000_init_nvm_params_vf(struct e1000_hw *hw);
-static void e1000_release_vf(struct e1000_hw *hw);
-static s32 e1000_acquire_vf(struct e1000_hw *hw);
-static s32 e1000_setup_link_vf(struct e1000_hw *hw);
-static s32 e1000_get_bus_info_pcie_vf(struct e1000_hw *hw);
-static s32 e1000_init_mac_params_vf(struct e1000_hw *hw);
-static s32 e1000_check_for_link_vf(struct e1000_hw *hw);
-static s32 e1000_get_link_up_info_vf(struct e1000_hw *hw, u16 *speed,
- u16 *duplex);
-static s32 e1000_init_hw_vf(struct e1000_hw *hw);
-static s32 e1000_reset_hw_vf(struct e1000_hw *hw);
-static void e1000_update_mc_addr_list_vf(struct e1000_hw *hw, u8 *, u32);
-static void e1000_rar_set_vf(struct e1000_hw *, u8 *, u32);
-static s32 e1000_read_mac_addr_vf(struct e1000_hw *);
+static s32 e1000_init_phy_params_vf(struct e1000_hw *hw);
+static s32 e1000_init_nvm_params_vf(struct e1000_hw *hw);
+static void e1000_release_vf(struct e1000_hw *hw);
+static s32 e1000_acquire_vf(struct e1000_hw *hw);
+static s32 e1000_setup_link_vf(struct e1000_hw *hw);
+static s32 e1000_get_bus_info_pcie_vf(struct e1000_hw *hw);
+static s32 e1000_init_mac_params_vf(struct e1000_hw *hw);
+static s32 e1000_check_for_link_vf(struct e1000_hw *hw);
+static s32 e1000_get_link_up_info_vf(struct e1000_hw *hw, u16 *speed,
+ u16 *duplex);
+static s32 e1000_init_hw_vf(struct e1000_hw *hw);
+static s32 e1000_reset_hw_vf(struct e1000_hw *hw);
+static void e1000_update_mc_addr_list_vf(struct e1000_hw *hw, u8 *, u32);
+static void e1000_rar_set_vf(struct e1000_hw *, u8 *, u32);
+static s32 e1000_read_mac_addr_vf(struct e1000_hw *);
/**
* e1000_init_phy_params_vf - Inits PHY params
@@ -219,7 +219,7 @@ static s32 e1000_get_bus_info_pcie_vf(struct e1000_hw *hw)
* the status register's data which is often stale and inaccurate.
**/
static s32 e1000_get_link_up_info_vf(struct e1000_hw *hw, u16 *speed,
- u16 *duplex)
+ u16 *duplex)
{
s32 status;
@@ -288,7 +288,7 @@ static s32 e1000_reset_hw_vf(struct e1000_hw *hw)
ret_val = mbx->ops.read_posted(hw, msgbuf, 3, 0);
if (!ret_val) {
if (msgbuf[0] == (E1000_VF_RESET |
- E1000_VT_MSGTYPE_ACK))
+ E1000_VT_MSGTYPE_ACK))
memcpy(hw->mac.perm_addr, addr, 6);
else
ret_val = -E1000_ERR_MAC_INIT;
@@ -369,11 +369,22 @@ static u32 e1000_hash_mc_addr_vf(struct e1000_hw *hw, u8 *mc_addr)
bit_shift++;
hash_value = hash_mask & (((mc_addr[4] >> (8 - bit_shift)) |
- (((u16) mc_addr[5]) << bit_shift)));
+ (((u16) mc_addr[5]) << bit_shift)));
return hash_value;
}
+static void e1000_write_msg_read_ack(struct e1000_hw *hw,
+ u32 *msg, u16 size)
+{
+ struct e1000_mbx_info *mbx = &hw->mbx;
+ u32 retmsg[E1000_VFMAILBOX_SIZE];
+ s32 retval = mbx->ops.write_posted(hw, msg, size, 0);
+
+ if (!retval)
+ mbx->ops.read_posted(hw, retmsg, E1000_VFMAILBOX_SIZE, 0);
+}
+
/**
* e1000_update_mc_addr_list_vf - Update Multicast addresses
* @hw: pointer to the HW structure
@@ -384,9 +395,8 @@ static u32 e1000_hash_mc_addr_vf(struct e1000_hw *hw, u8 *mc_addr)
* The caller must have a packed mc_addr_list of multicast addresses.
**/
void e1000_update_mc_addr_list_vf(struct e1000_hw *hw,
- u8 *mc_addr_list, u32 mc_addr_count)
+ u8 *mc_addr_list, u32 mc_addr_count)
{
- struct e1000_mbx_info *mbx = &hw->mbx;
u32 msgbuf[E1000_VFMAILBOX_SIZE];
u16 *hash_list = (u16 *)&msgbuf[1];
u32 hash_value;
@@ -420,7 +430,7 @@ void e1000_update_mc_addr_list_vf(struct e1000_hw *hw,
mc_addr_list += ETH_ADDR_LEN;
}
- mbx->ops.write_posted(hw, msgbuf, E1000_VFMAILBOX_SIZE, 0);
+ e1000_write_msg_read_ack(hw, msgbuf, E1000_VFMAILBOX_SIZE);
}
/**
@@ -431,7 +441,6 @@ void e1000_update_mc_addr_list_vf(struct e1000_hw *hw,
**/
void e1000_vfta_set_vf(struct e1000_hw *hw, u16 vid, bool set)
{
- struct e1000_mbx_info *mbx = &hw->mbx;
u32 msgbuf[2];
msgbuf[0] = E1000_VF_SET_VLAN;
@@ -440,7 +449,7 @@ void e1000_vfta_set_vf(struct e1000_hw *hw, u16 vid, bool set)
if (set)
msgbuf[0] |= E1000_VF_SET_VLAN_ADD;
- mbx->ops.write_posted(hw, msgbuf, 2, 0);
+ e1000_write_msg_read_ack(hw, msgbuf, 2);
}
/** e1000_rlpml_set_vf - Set the maximum receive packet length
@@ -449,13 +458,12 @@ void e1000_vfta_set_vf(struct e1000_hw *hw, u16 vid, bool set)
**/
void e1000_rlpml_set_vf(struct e1000_hw *hw, u16 max_size)
{
- struct e1000_mbx_info *mbx = &hw->mbx;
u32 msgbuf[2];
msgbuf[0] = E1000_VF_SET_LPE;
msgbuf[1] = max_size;
- mbx->ops.write_posted(hw, msgbuf, 2, 0);
+ e1000_write_msg_read_ack(hw, msgbuf, 2);
}
/**
diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c
index b02c03c..95d8b9a 100644
--- a/sys/dev/e1000/if_em.c
+++ b/sys/dev/e1000/if_em.c
@@ -35,6 +35,7 @@
#ifdef HAVE_KERNEL_OPTION_HEADERS
#include "opt_device_polling.h"
#include "opt_inet.h"
+#include "opt_inet6.h"
#endif
#include <sys/param.h>
@@ -93,7 +94,7 @@ int em_display_debug_stats = 0;
/*********************************************************************
* Driver version:
*********************************************************************/
-char em_driver_version[] = "7.2.3";
+char em_driver_version[] = "7.3.2";
/*********************************************************************
* PCI Device ID Table
@@ -286,6 +287,7 @@ static void em_handle_link(void *context, int pending);
static void em_set_sysctl_value(struct adapter *, const char *,
const char *, int *, int);
+static int em_set_flowcntl(SYSCTL_HANDLER_ARGS);
static __inline void em_rx_discard(struct rx_ring *, int);
@@ -382,13 +384,8 @@ static int em_rx_process_limit = 100;
TUNABLE_INT("hw.em.rx_process_limit", &em_rx_process_limit);
SYSCTL_INT(_hw_em, OID_AUTO, rx_process_limit, CTLFLAG_RDTUN,
&em_rx_process_limit, 0,
- "Maximum number of received packets to process at a time, -1 means unlimited");
-
-/* Flow control setting - default to FULL */
-static int em_fc_setting = e1000_fc_full;
-TUNABLE_INT("hw.em.fc_setting", &em_fc_setting);
-SYSCTL_INT(_hw_em, OID_AUTO, fc_setting, CTLFLAG_RDTUN, &em_fc_setting, 0,
- "Flow control");
+ "Maximum number of received packets to process "
+ "at a time, -1 means unlimited");
/* Energy efficient ethernet - default to OFF */
static int eee_setting = 0;
@@ -473,6 +470,11 @@ em_attach(device_t dev)
INIT_DEBUGOUT("em_attach: begin");
+ if (resource_disabled("em", device_get_unit(dev))) {
+ device_printf(dev, "Disabled by device hint\n");
+ return (ENXIO);
+ }
+
adapter = device_get_softc(dev);
adapter->dev = adapter->osdep.dev = dev;
hw = &adapter->hw;
@@ -489,6 +491,11 @@ em_attach(device_t dev)
OID_AUTO, "debug", CTLTYPE_INT|CTLFLAG_RW, adapter, 0,
em_sysctl_debug_info, "I", "Debug Information");
+ SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
+ SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
+ OID_AUTO, "fc", CTLTYPE_INT|CTLFLAG_RW, adapter, 0,
+ em_set_flowcntl, "I", "Flow Control");
+
callout_init_mtx(&adapter->timer, &adapter->core_mtx, 0);
/* Determine hardware and mac info */
@@ -560,11 +567,6 @@ em_attach(device_t dev)
"max number of rx packets to process", &adapter->rx_process_limit,
em_rx_process_limit);
- /* Sysctl for setting the interface flow control */
- em_set_sysctl_value(adapter, "flow_control",
- "configure flow control",
- &adapter->fc_setting, em_fc_setting);
-
/*
* Validate number of transmit and receive descriptors. It
* must not exceed hardware maximum, and must be multiple
@@ -714,7 +716,8 @@ em_attach(device_t dev)
em_get_hw_control(adapter);
/* Tell the stack that the interface is not active */
- adapter->ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);
+ adapter->ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
+ adapter->ifp->if_drv_flags |= IFF_DRV_OACTIVE;
adapter->led_dev = led_create(em_led_func, adapter,
device_get_nameunit(dev));
@@ -847,6 +850,8 @@ em_resume(device_t dev)
struct ifnet *ifp = adapter->ifp;
EM_CORE_LOCK(adapter);
+ if (adapter->hw.mac.type == e1000_pch2lan)
+ e1000_resume_workarounds_pchlan(&adapter->hw);
em_init_locked(adapter);
em_init_manageability(adapter);
EM_CORE_UNLOCK(adapter);
@@ -856,17 +861,15 @@ em_resume(device_t dev)
}
+#ifdef EM_MULTIQUEUE
/*********************************************************************
- * Transmit entry point
+ * Multiqueue Transmit routines
*
- * em_start is called by the stack to initiate a transmit.
- * The driver will remain in this routine as long as there are
- * packets to transmit and transmit resources are available.
- * In case resources are not available stack is notified and
- * the packet is requeued.
+ * em_mq_start is called by the stack to initiate a transmit.
+ * however, if busy the driver can queue the request rather
+ * than do an immediate send. It is this that is an advantage
+ * in this driver, rather than also having multiple tx queues.
**********************************************************************/
-
-#ifdef EM_MULTIQUEUE
static int
em_mq_start_locked(struct ifnet *ifp, struct tx_ring *txr, struct mbuf *m)
{
@@ -881,10 +884,6 @@ em_mq_start_locked(struct ifnet *ifp, struct tx_ring *txr, struct mbuf *m)
return (err);
}
- /* Call cleanup if number of TX descriptors low */
- if (txr->tx_avail <= EM_TX_CLEANUP_THRESHOLD)
- em_txeof(txr);
-
enq = 0;
if (m == NULL) {
next = drbr_dequeue(ifp, txr->br);
@@ -907,10 +906,6 @@ em_mq_start_locked(struct ifnet *ifp, struct tx_ring *txr, struct mbuf *m)
ETHER_BPF_MTAP(ifp, next);
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
break;
- if (txr->tx_avail < EM_MAX_SCATTER) {
- ifp->if_drv_flags |= IFF_DRV_OACTIVE;
- break;
- }
next = drbr_dequeue(ifp, txr->br);
}
@@ -919,6 +914,11 @@ em_mq_start_locked(struct ifnet *ifp, struct tx_ring *txr, struct mbuf *m)
txr->queue_status = EM_QUEUE_WORKING;
txr->watchdog_time = ticks;
}
+
+ if (txr->tx_avail < EM_MAX_SCATTER)
+ em_txeof(txr);
+ if (txr->tx_avail < EM_MAX_SCATTER)
+ ifp->if_drv_flags |= IFF_DRV_OACTIVE;
return (err);
}
@@ -959,7 +959,6 @@ em_qflush(struct ifnet *ifp)
}
if_qflush(ifp);
}
-
#endif /* EM_MULTIQUEUE */
static void
@@ -995,7 +994,6 @@ em_start_locked(struct ifnet *ifp, struct tx_ring *txr)
if (em_xmit(txr, &m_head)) {
if (m_head == NULL)
break;
- ifp->if_drv_flags |= IFF_DRV_OACTIVE;
IFQ_DRV_PREPEND(&ifp->if_snd, m_head);
break;
}
@@ -1022,6 +1020,12 @@ em_start(struct ifnet *ifp)
em_start_locked(ifp, txr);
EM_TX_UNLOCK(txr);
}
+ /*
+ ** If we went inactive schedule
+ ** a task to clean up.
+ */
+ if (ifp->if_drv_flags & IFF_DRV_OACTIVE)
+ taskqueue_enqueue(txr->tq, &txr->tx_task);
return;
}
@@ -1038,11 +1042,12 @@ static int
em_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
{
struct adapter *adapter = ifp->if_softc;
- struct ifreq *ifr = (struct ifreq *)data;
-#ifdef INET
- struct ifaddr *ifa = (struct ifaddr *)data;
+ struct ifreq *ifr = (struct ifreq *)data;
+#if defined(INET) || defined(INET6)
+ struct ifaddr *ifa = (struct ifaddr *)data;
#endif
- int error = 0;
+ bool avoid_reset = FALSE;
+ int error = 0;
if (adapter->in_detach)
return (error);
@@ -1050,23 +1055,26 @@ em_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
switch (command) {
case SIOCSIFADDR:
#ifdef INET
- if (ifa->ifa_addr->sa_family == AF_INET) {
- /*
- * XXX
- * Since resetting hardware takes a very long time
- * and results in link renegotiation we only
- * initialize the hardware only when it is absolutely
- * required.
- */
+ if (ifa->ifa_addr->sa_family == AF_INET)
+ avoid_reset = TRUE;
+#endif
+#ifdef INET6
+ if (ifa->ifa_addr->sa_family == AF_INET6)
+ avoid_reset = TRUE;
+#endif
+ /*
+ ** Calling init results in link renegotiation,
+ ** so we avoid doing it when possible.
+ */
+ if (avoid_reset) {
ifp->if_flags |= IFF_UP;
- if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) {
- EM_CORE_LOCK(adapter);
- em_init_locked(adapter);
- EM_CORE_UNLOCK(adapter);
- }
- arp_ifinit(ifp, ifa);
- } else
+ if (!(ifp->if_drv_flags & IFF_DRV_RUNNING))
+ em_init(adapter);
+#ifdef INET
+ if (!(ifp->if_flags & IFF_NOARP))
+ arp_ifinit(ifp, ifa);
#endif
+ } else
error = ether_ioctl(ifp, command, data);
break;
case SIOCSIFMTU:
@@ -1083,6 +1091,7 @@ em_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
case e1000_ich10lan:
case e1000_pch2lan:
case e1000_82574:
+ case e1000_82583:
case e1000_80003es2lan: /* 9K Jumbo Frame size */
max_frame_size = 9234;
break;
@@ -1090,7 +1099,6 @@ em_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
max_frame_size = 4096;
break;
/* Adapters that do not support jumbo frames */
- case e1000_82583:
case e1000_ich8lan:
max_frame_size = ETHER_MAX_LEN;
break;
@@ -1145,11 +1153,6 @@ em_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
}
break;
case SIOCSIFMEDIA:
- /*
- ** As the speed/duplex settings are being
- ** changed, we need to reset the PHY.
- */
- adapter->hw.phy.reset_disable = FALSE;
/* Check SOL/IDER usage */
EM_CORE_LOCK(adapter);
if (e1000_check_reset_block(&adapter->hw)) {
@@ -1208,6 +1211,10 @@ em_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
ifp->if_capenable ^= IFCAP_VLAN_HWFILTER;
reinit = 1;
}
+ if (mask & IFCAP_VLAN_HWTSO) {
+ ifp->if_capenable ^= IFCAP_VLAN_HWTSO;
+ reinit = 1;
+ }
if ((mask & IFCAP_WOL) &&
(ifp->if_capabilities & IFCAP_WOL) != 0) {
if (mask & IFCAP_WOL_MCAST)
@@ -1246,7 +1253,6 @@ em_init_locked(struct adapter *adapter)
{
struct ifnet *ifp = adapter->ifp;
device_t dev = adapter->dev;
- u32 pba;
INIT_DEBUGOUT("em_init: begin");
@@ -1255,46 +1261,6 @@ em_init_locked(struct adapter *adapter)
em_disable_intr(adapter);
callout_stop(&adapter->timer);
- /*
- * Packet Buffer Allocation (PBA)
- * Writing PBA sets the receive portion of the buffer
- * the remainder is used for the transmit buffer.
- */
- switch (adapter->hw.mac.type) {
- /* Total Packet Buffer on these is 48K */
- case e1000_82571:
- case e1000_82572:
- case e1000_80003es2lan:
- pba = E1000_PBA_32K; /* 32K for Rx, 16K for Tx */
- break;
- case e1000_82573: /* 82573: Total Packet Buffer is 32K */
- pba = E1000_PBA_12K; /* 12K for Rx, 20K for Tx */
- break;
- case e1000_82574:
- case e1000_82583:
- pba = E1000_PBA_20K; /* 20K for Rx, 20K for Tx */
- break;
- case e1000_ich8lan:
- pba = E1000_PBA_8K;
- break;
- case e1000_ich9lan:
- case e1000_ich10lan:
- pba = E1000_PBA_10K;
- break;
- case e1000_pchlan:
- case e1000_pch2lan:
- pba = E1000_PBA_26K;
- break;
- default:
- if (adapter->max_frame_size > 8192)
- pba = E1000_PBA_40K; /* 40K for Rx, 24K for Tx */
- else
- pba = E1000_PBA_48K; /* 48K for Rx, 16K for Tx */
- }
-
- INIT_DEBUGOUT1("em_init: pba=%dK",pba);
- E1000_WRITE_REG(&adapter->hw, E1000_PBA, pba);
-
/* Get the latest mac address, User can use a LAA */
bcopy(IF_LLADDR(adapter->ifp), adapter->hw.mac.addr,
ETHER_ADDR_LEN);
@@ -1373,6 +1339,7 @@ em_init_locked(struct adapter *adapter)
/* Don't lose promiscuous settings */
em_set_promisc(adapter);
+ /* Set the interface as ACTIVE */
ifp->if_drv_flags |= IFF_DRV_RUNNING;
ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
@@ -1403,9 +1370,6 @@ em_init_locked(struct adapter *adapter)
/* AMT based hardware can now take control from firmware */
if (adapter->has_manage && adapter->has_amt)
em_get_hw_control(adapter);
-
- /* Don't reset the phy next time init gets called */
- adapter->hw.phy.reset_disable = TRUE;
}
static void
@@ -1995,6 +1959,14 @@ retry:
em_transmit_checksum_setup(txr, m_head,
ip_off, ip, &txd_upper, &txd_lower);
+ if (m_head->m_flags & M_VLANTAG) {
+ /* Set the vlan id. */
+ txd_upper |=
+ (htole16(m_head->m_pkthdr.ether_vtag) << 16);
+ /* Tell hardware to add tag */
+ txd_lower |= htole32(E1000_TXD_CMD_VLE);
+ }
+
i = txr->next_avail_desc;
/* Set up our transmit descriptors */
@@ -2052,15 +2024,13 @@ retry:
if (tso_desc) /* TSO used an extra for sentinel */
txr->tx_avail -= txd_used;
- if (m_head->m_flags & M_VLANTAG) {
- /* Set the vlan id. */
- ctxd->upper.fields.special =
- htole16(m_head->m_pkthdr.ether_vtag);
- /* Tell hardware to add tag */
- ctxd->lower.data |= htole32(E1000_TXD_CMD_VLE);
- }
-
tx_buffer->m_head = m_head;
+ /*
+ ** Here we swap the map so the last descriptor,
+ ** which gets the completion interrupt has the
+ ** real map, and the first descriptor gets the
+ ** unused map from this descriptor.
+ */
tx_buffer_mapped->map = tx_buffer->map;
tx_buffer->map = map;
bus_dmamap_sync(txr->txtag, map, BUS_DMASYNC_PREWRITE);
@@ -2230,22 +2200,21 @@ em_local_timer(void *arg)
else
trigger = E1000_ICS_RXDMT0;
- /*
- ** Don't do TX watchdog check if we've been paused
- */
- if (adapter->pause_frames) {
- adapter->pause_frames = 0;
- goto out;
- }
/*
** Check on the state of the TX queue(s), this
** can be done without the lock because its RO
** and the HUNG state will be static if set.
*/
- for (int i = 0; i < adapter->num_queues; i++, txr++)
- if (txr->queue_status == EM_QUEUE_HUNG)
+ for (int i = 0; i < adapter->num_queues; i++, txr++) {
+ if ((txr->queue_status == EM_QUEUE_HUNG) &&
+ (adapter->pause_frames == 0))
goto hung;
-out:
+ /* Schedule a TX tasklet if needed */
+ if (txr->tx_avail <= EM_MAX_SCATTER)
+ taskqueue_enqueue(txr->tq, &txr->tx_task);
+ }
+
+ adapter->pause_frames = 0;
callout_reset(&adapter->timer, hz, em_local_timer, adapter);
#ifndef DEVICE_POLLING
/* Trigger an RX interrupt to guarantee mbuf refresh */
@@ -2264,6 +2233,7 @@ hung:
txr->me, txr->tx_avail, txr->next_to_clean);
ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
adapter->watchdog_events++;
+ adapter->pause_frames = 0;
em_init_locked(adapter);
}
@@ -2362,7 +2332,8 @@ em_stop(void *arg)
callout_stop(&adapter->timer);
/* Tell the stack that the interface is no longer active */
- ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);
+ ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
+ ifp->if_drv_flags |= IFF_DRV_OACTIVE;
/* Unarm watchdog timer. */
for (int i = 0; i < adapter->num_queues; i++, txr++) {
@@ -2458,6 +2429,7 @@ int
em_allocate_legacy(struct adapter *adapter)
{
device_t dev = adapter->dev;
+ struct tx_ring *txr = adapter->tx_rings;
int error, rid = 0;
/* Manually turn off all interrupts */
@@ -2479,11 +2451,17 @@ em_allocate_legacy(struct adapter *adapter)
* deferred processing contexts.
*/
TASK_INIT(&adapter->que_task, 0, em_handle_que, adapter);
- TASK_INIT(&adapter->link_task, 0, em_handle_link, adapter);
adapter->tq = taskqueue_create_fast("em_taskq", M_NOWAIT,
taskqueue_thread_enqueue, &adapter->tq);
- taskqueue_start_threads(&adapter->tq, 1, PI_NET, "%s taskq",
+ taskqueue_start_threads(&adapter->tq, 1, PI_NET, "%s que",
device_get_nameunit(adapter->dev));
+ /* Use a TX only tasklet for local timer */
+ TASK_INIT(&txr->tx_task, 0, em_handle_tx, txr);
+ txr->tq = taskqueue_create_fast("em_txq", M_NOWAIT,
+ taskqueue_thread_enqueue, &txr->tq);
+ taskqueue_start_threads(&txr->tq, 1, PI_NET, "%s txq",
+ device_get_nameunit(adapter->dev));
+ TASK_INIT(&adapter->link_task, 0, em_handle_link, adapter);
if ((error = bus_setup_intr(dev, adapter->res, INTR_TYPE_NET,
em_irq_fast, NULL, adapter, &adapter->tag)) != 0) {
device_printf(dev, "Failed to register fast interrupt "
@@ -2500,7 +2478,8 @@ em_allocate_legacy(struct adapter *adapter)
*
* Setup the MSIX Interrupt handlers
* This is not really Multiqueue, rather
- * its just multiple interrupt vectors.
+ * its just seperate interrupt vectors
+ * for TX, RX, and Link.
*
**********************************************************************/
int
@@ -2692,7 +2671,6 @@ em_setup_msix(struct adapter *adapter)
device_t dev = adapter->dev;
int val = 0;
-
/*
** Setup MSI/X for Hartwell: tests have shown
** use of two queues to be unstable, and to
@@ -2712,16 +2690,18 @@ em_setup_msix(struct adapter *adapter)
goto msi;
}
val = pci_msix_count(dev);
- if (val < 3) {
+ /* We only need 3 vectors */
+ if (val > 3)
+ val = 3;
+ if ((val != 3) && (val != 5)) {
bus_release_resource(dev, SYS_RES_MEMORY,
PCIR_BAR(EM_MSIX_BAR), adapter->msix_mem);
adapter->msix_mem = NULL;
device_printf(adapter->dev,
- "MSIX: insufficient vectors, using MSI\n");
+ "MSIX: incorrect vectors, using MSI\n");
goto msi;
}
- val = 3;
- adapter->num_queues = 1;
+
if (pci_alloc_msix(dev, &val) == 0) {
device_printf(adapter->dev,
"Using MSIX interrupts "
@@ -2756,6 +2736,7 @@ em_reset(struct adapter *adapter)
struct ifnet *ifp = adapter->ifp;
struct e1000_hw *hw = &adapter->hw;
u16 rx_buffer_size;
+ u32 pba;
INIT_DEBUGOUT("em_reset: begin");
@@ -2771,6 +2752,48 @@ em_reset(struct adapter *adapter)
}
/*
+ * Packet Buffer Allocation (PBA)
+ * Writing PBA sets the receive portion of the buffer
+ * the remainder is used for the transmit buffer.
+ */
+ switch (hw->mac.type) {
+ /* Total Packet Buffer on these is 48K */
+ case e1000_82571:
+ case e1000_82572:
+ case e1000_80003es2lan:
+ pba = E1000_PBA_32K; /* 32K for Rx, 16K for Tx */
+ break;
+ case e1000_82573: /* 82573: Total Packet Buffer is 32K */
+ pba = E1000_PBA_12K; /* 12K for Rx, 20K for Tx */
+ break;
+ case e1000_82574:
+ case e1000_82583:
+ pba = E1000_PBA_20K; /* 20K for Rx, 20K for Tx */
+ break;
+ case e1000_ich8lan:
+ pba = E1000_PBA_8K;
+ break;
+ case e1000_ich9lan:
+ case e1000_ich10lan:
+ /* Boost Receive side for jumbo frames */
+ if (adapter->max_frame_size > 4096)
+ pba = E1000_PBA_14K;
+ else
+ pba = E1000_PBA_10K;
+ break;
+ case e1000_pchlan:
+ case e1000_pch2lan:
+ pba = E1000_PBA_26K;
+ break;
+ default:
+ if (adapter->max_frame_size > 8192)
+ pba = E1000_PBA_40K; /* 40K for Rx, 24K for Tx */
+ else
+ pba = E1000_PBA_48K; /* 48K for Rx, 16K for Tx */
+ }
+ E1000_WRITE_REG(&adapter->hw, E1000_PBA, pba);
+
+ /*
* These parameters control the automatic generation (Tx) and
* response (Rx) to Ethernet PAUSE frames.
* - High water mark should allow for at least two frames to be
@@ -2785,11 +2808,15 @@ em_reset(struct adapter *adapter)
* - The pause time is fairly large at 1000 x 512ns = 512 usec.
*/
rx_buffer_size = ((E1000_READ_REG(hw, E1000_PBA) & 0xffff) << 10 );
-
hw->fc.high_water = rx_buffer_size -
roundup2(adapter->max_frame_size, 1024);
hw->fc.low_water = hw->fc.high_water - 1500;
+ if (adapter->fc) /* locally set flow control value? */
+ hw->fc.requested_mode = adapter->fc;
+ else
+ hw->fc.requested_mode = e1000_fc_full;
+
if (hw->mac.type == e1000_80003es2lan)
hw->fc.pause_time = 0xFFFF;
else
@@ -2797,15 +2824,22 @@ em_reset(struct adapter *adapter)
hw->fc.send_xon = TRUE;
- /* Set Flow control, use the tunable location if sane */
- hw->fc.requested_mode = adapter->fc_setting;
-
- /* Workaround: no TX flow ctrl for PCH */
- if (hw->mac.type == e1000_pchlan)
+ /* Device specific overrides/settings */
+ switch (hw->mac.type) {
+ case e1000_pchlan:
+ /* Workaround: no TX flow ctrl for PCH */
hw->fc.requested_mode = e1000_fc_rx_pause;
-
- /* Override - settings for PCH2LAN, ya its magic :) */
- if (hw->mac.type == e1000_pch2lan) {
+ hw->fc.pause_time = 0xFFFF; /* override */
+ if (ifp->if_mtu > ETHERMTU) {
+ hw->fc.high_water = 0x3500;
+ hw->fc.low_water = 0x1500;
+ } else {
+ hw->fc.high_water = 0x5000;
+ hw->fc.low_water = 0x3000;
+ }
+ hw->fc.refresh_time = 0x1000;
+ break;
+ case e1000_pch2lan:
hw->fc.high_water = 0x5C20;
hw->fc.low_water = 0x5048;
hw->fc.pause_time = 0x0650;
@@ -2815,13 +2849,26 @@ em_reset(struct adapter *adapter)
E1000_WRITE_REG(hw, E1000_PBA, 12);
else
E1000_WRITE_REG(hw, E1000_PBA, 26);
+ break;
+ case e1000_ich9lan:
+ case e1000_ich10lan:
+ if (ifp->if_mtu > ETHERMTU) {
+ hw->fc.high_water = 0x2800;
+ hw->fc.low_water = hw->fc.high_water - 8;
+ break;
+ }
+ /* else fall thru */
+ default:
+ if (hw->mac.type == e1000_80003es2lan)
+ hw->fc.pause_time = 0xFFFF;
+ break;
}
/* Issue a global reset */
e1000_reset_hw(hw);
E1000_WRITE_REG(hw, E1000_WUC, 0);
em_disable_aspm(adapter);
-
+ /* and a re-init */
if (e1000_init_hw(hw) < 0) {
device_printf(dev, "Hardware Initialization Failed\n");
return;
@@ -2851,7 +2898,6 @@ em_setup_interface(device_t dev, struct adapter *adapter)
return (-1);
}
if_initname(ifp, device_get_name(dev), device_get_unit(dev));
- ifp->if_mtu = ETHERMTU;
ifp->if_init = em_init;
ifp->if_softc = adapter;
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
@@ -2866,28 +2912,25 @@ em_setup_interface(device_t dev, struct adapter *adapter)
ifp->if_capabilities = ifp->if_capenable = 0;
#ifdef EM_MULTIQUEUE
- /* Multiqueue tx functions */
+ /* Multiqueue stack interface */
ifp->if_transmit = em_mq_start;
ifp->if_qflush = em_qflush;
#endif
ifp->if_capabilities |= IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM;
- ifp->if_capenable |= IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM;
-
- /* Enable TSO by default, can disable with ifconfig */
ifp->if_capabilities |= IFCAP_TSO4;
- ifp->if_capenable |= IFCAP_TSO4;
-
/*
* Tell the upper layer(s) we
* support full VLAN capability
*/
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
- ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU;
- ifp->if_capenable |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU;
+ ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING
+ | IFCAP_VLAN_HWTSO
+ | IFCAP_VLAN_MTU;
+ ifp->if_capenable = ifp->if_capabilities;
/*
- ** Dont turn this on by default, if vlans are
+ ** Don't turn this on by default, if vlans are
** created on another pseudo device (eg. lagg)
** then vlan events are not passed thru, breaking
** operation, but with HW FILTER off it works. If
@@ -3254,16 +3297,15 @@ em_setup_transmit_ring(struct tx_ring *txr)
#ifdef DEV_NETMAP
if (slot) {
int si = i + na->tx_rings[txr->me].nkr_hwofs;
+ uint64_t paddr;
void *addr;
if (si >= na->num_tx_desc)
si -= na->num_tx_desc;
- addr = NMB(slot + si);
- txr->tx_base[i].buffer_addr =
- htole64(vtophys(addr));
+ addr = PNMB(slot + si, &paddr);
+ txr->tx_base[i].buffer_addr = htole64(paddr);
/* reload the map for netmap mode */
- netmap_load_map(txr->txtag,
- txbuf->map, addr, na->buff_size);
+ netmap_load_map(txr->txtag, txbuf->map, addr);
}
#endif /* DEV_NETMAP */
@@ -3339,11 +3381,6 @@ em_initialize_transmit_unit(struct adapter *adapter)
/* Set the default values for the Tx Inter Packet Gap timer */
switch (adapter->hw.mac.type) {
- case e1000_82542:
- tipg = DEFAULT_82542_TIPG_IPGT;
- tipg |= DEFAULT_82542_TIPG_IPGR1 << E1000_TIPG_IPGR1_SHIFT;
- tipg |= DEFAULT_82542_TIPG_IPGR2 << E1000_TIPG_IPGR2_SHIFT;
- break;
case e1000_80003es2lan:
tipg = DEFAULT_82543_TIPG_IPGR1;
tipg |= DEFAULT_80003ES2LAN_TIPG_IPGR2 <<
@@ -3813,9 +3850,12 @@ em_txeof(struct tx_ring *txr)
/*
* If we have a minimum free, clear IFF_DRV_OACTIVE
* to tell the stack that it is OK to send packets.
+ * Notice that all writes of OACTIVE happen under the
+ * TX lock which, with a single queue, guarantees
+ * sanity.
*/
- if (txr->tx_avail > EM_MAX_SCATTER)
- ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
+ if (txr->tx_avail >= EM_MAX_SCATTER)
+ ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
/* Disable watchdog if all clean */
if (txr->tx_avail == adapter->num_tx_desc) {
@@ -3978,26 +4018,55 @@ em_setup_receive_ring(struct rx_ring *rxr)
struct adapter *adapter = rxr->adapter;
struct em_buffer *rxbuf;
bus_dma_segment_t seg[1];
- int i, j, nsegs, error = 0;
+ int rsize, nsegs, error;
+#ifdef DEV_NETMAP
+ struct netmap_adapter *na = NA(adapter->ifp);
+ struct netmap_slot *slot;
+#endif
/* Clear the ring contents */
EM_RX_LOCK(rxr);
+ rsize = roundup2(adapter->num_rx_desc *
+ sizeof(struct e1000_rx_desc), EM_DBA_ALIGN);
+ bzero((void *)rxr->rx_base, rsize);
+#ifdef DEV_NETMAP
+ slot = netmap_reset(na, NR_RX, 0, 0);
+#endif
- /* Invalidate all descriptors */
- for (i = 0; i < adapter->num_rx_desc; i++) {
- struct e1000_rx_desc* cur;
- cur = &rxr->rx_base[i];
- cur->status = 0;
+ /*
+ ** Free current RX buffer structs and their mbufs
+ */
+ for (int i = 0; i < adapter->num_rx_desc; i++) {
+ rxbuf = &rxr->rx_buffers[i];
+ if (rxbuf->m_head != NULL) {
+ bus_dmamap_sync(rxr->rxtag, rxbuf->map,
+ BUS_DMASYNC_POSTREAD);
+ bus_dmamap_unload(rxr->rxtag, rxbuf->map);
+ m_freem(rxbuf->m_head);
+ rxbuf->m_head = NULL; /* mark as freed */
+ }
}
/* Now replenish the mbufs */
- i = j = rxr->next_to_refresh;
- if (++j == adapter->num_rx_desc)
- j = 0;
+ for (int j = 0; j != adapter->num_rx_desc; ++j) {
+ rxbuf = &rxr->rx_buffers[j];
+#ifdef DEV_NETMAP
+ if (slot) {
+ /* slot si is mapped to the j-th NIC-ring entry */
+ int si = j + na->rx_rings[0].nkr_hwofs;
+ uint64_t paddr;
+ void *addr;
- while (j != rxr->next_to_check) {
- rxbuf = &rxr->rx_buffers[i];
+ if (si > na->num_rx_desc)
+ si -= na->num_rx_desc;
+ addr = PNMB(slot + si, &paddr);
+ netmap_load_map(rxr->rxtag, rxbuf->map, addr);
+ /* Update descriptor */
+ rxr->rx_base[j].buffer_addr = htole64(paddr);
+ continue;
+ }
+#endif /* DEV_NETMAP */
rxbuf->m_head = m_getjcl(M_DONTWAIT, MT_DATA,
M_PKTHDR, adapter->rx_mbuf_sz);
if (rxbuf->m_head == NULL) {
@@ -4021,67 +4090,14 @@ em_setup_receive_ring(struct rx_ring *rxr)
rxbuf->map, BUS_DMASYNC_PREREAD);
/* Update descriptor */
- rxr->rx_base[i].buffer_addr = htole64(seg[0].ds_addr);
- i = j;
- if (++j == adapter->num_rx_desc)
- j = 0;
+ rxr->rx_base[j].buffer_addr = htole64(seg[0].ds_addr);
}
-#ifdef DEV_NETMAP
- {
- /*
- * This driver is slightly different from the standard:
- * it refills the rings in blocks of 8, so the while()
- * above completes any leftover work. Also, after if_init()
- * the ring starts at rxr->next_to_check instead of 0.
- *
- * Currently: we leave the mbufs allocated even in netmap
- * mode, and simply make the NIC ring point to the
- * correct buffer (netmap_buf or mbuf) depending on
- * the mode. To avoid mbuf leaks, when in netmap mode we
- * must make sure that next_to_refresh == next_to_check - 1
- * so that the above while() loop is never run on init.
- *
- * A better way would be to free the mbufs when entering
- * netmap mode, and set next_to_refresh/check in
- * a way that the mbufs are completely reallocated
- * when going back to standard mode.
- */
- struct netmap_adapter *na = NA(adapter->ifp);
- struct netmap_slot *slot = netmap_reset(na,
- NR_RX, rxr->me, rxr->next_to_check);
- int sj = slot ? na->rx_rings[rxr->me].nkr_hwofs : 0;
-
- /* slot sj corresponds to entry j in the NIC ring */
- if (sj < 0)
- sj += adapter->num_rx_desc;
-
- for (j = 0; j != adapter->num_rx_desc; j++, sj++) {
- void *addr;
- int sz;
-
- rxbuf = &rxr->rx_buffers[j];
- /* no mbuf and regular mode -> skip this entry */
- if (rxbuf->m_head == NULL && !slot)
- continue;
- /* Handle wrap. Cannot use "na" here, could be NULL */
- if (sj >= adapter->num_rx_desc)
- sj -= adapter->num_rx_desc;
- /* see comment, set slot addr and map */
- addr = slot ? NMB(slot + sj) : rxbuf->m_head->m_data;
- sz = slot ? na->buff_size : adapter->rx_mbuf_sz;
- // XXX load or reload ?
- netmap_load_map(rxr->rxtag, rxbuf->map, addr, sz);
- /* Update descriptor */
- rxr->rx_base[j].buffer_addr = htole64(vtophys(addr));
- bus_dmamap_sync(rxr->rxtag, rxbuf->map, BUS_DMASYNC_PREREAD);
- }
- }
-#endif /* DEV_NETMAP */
-
-fail:
- rxr->next_to_refresh = i;
+ rxr->next_to_check = 0;
+ rxr->next_to_refresh = 0;
bus_dmamap_sync(rxr->rxdma.dma_tag, rxr->rxdma.dma_map,
BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
+
+fail:
EM_RX_UNLOCK(rxr);
return (error);
}
@@ -4108,10 +4124,9 @@ fail:
* the rings that completed, the failing case will have
* cleaned up for itself. 'q' failed, so its the terminus.
*/
- for (int i = 0, n = 0; i < q; ++i) {
+ for (int i = 0; i < q; ++i) {
rxr = &adapter->rx_rings[i];
- n = rxr->next_to_check;
- while(n != rxr->next_to_refresh) {
+ for (int n = 0; n < adapter->num_rx_desc; n++) {
struct em_buffer *rxbuf;
rxbuf = &rxr->rx_buffers[n];
if (rxbuf->m_head != NULL) {
@@ -4121,8 +4136,6 @@ fail:
m_freem(rxbuf->m_head);
rxbuf->m_head = NULL;
}
- if (++n == adapter->num_rx_desc)
- n = 0;
}
rxr->next_to_check = 0;
rxr->next_to_refresh = 0;
@@ -4166,8 +4179,7 @@ em_free_receive_buffers(struct rx_ring *rxr)
INIT_DEBUGOUT("free_receive_buffers: begin");
if (rxr->rx_buffers != NULL) {
- int i = rxr->next_to_check;
- while(i != rxr->next_to_refresh) {
+ for (int i = 0; i < adapter->num_rx_desc; i++) {
rxbuf = &rxr->rx_buffers[i];
if (rxbuf->map != NULL) {
bus_dmamap_sync(rxr->rxtag, rxbuf->map,
@@ -4179,8 +4191,6 @@ em_free_receive_buffers(struct rx_ring *rxr)
m_freem(rxbuf->m_head);
rxbuf->m_head = NULL;
}
- if (++i == adapter->num_rx_desc)
- i = 0;
}
free(rxr->rx_buffers, M_DEVBUF);
rxr->rx_buffers = NULL;
@@ -4221,7 +4231,9 @@ em_initialize_receive_unit(struct adapter *adapter)
* up the descriptor ring
*/
rctl = E1000_READ_REG(hw, E1000_RCTL);
- E1000_WRITE_REG(hw, E1000_RCTL, rctl & ~E1000_RCTL_EN);
+ /* Do not disable if ever enabled on this hardware */
+ if ((hw->mac.type != e1000_82574) && (hw->mac.type != e1000_82583))
+ E1000_WRITE_REG(hw, E1000_RCTL, rctl & ~E1000_RCTL_EN);
E1000_WRITE_REG(&adapter->hw, E1000_RADV,
adapter->rx_abs_int_delay.value);
@@ -4235,14 +4247,13 @@ em_initialize_receive_unit(struct adapter *adapter)
** When using MSIX interrupts we need to throttle
** using the EITR register (82574 only)
*/
- if (hw->mac.type == e1000_82574)
+ if (hw->mac.type == e1000_82574) {
for (int i = 0; i < 4; i++)
E1000_WRITE_REG(hw, E1000_EITR_82574(i),
DEFAULT_ITR);
-
- /* Disable accelerated ackknowledge */
- if (adapter->hw.mac.type == e1000_82574)
+ /* Disable accelerated acknowledge */
E1000_WRITE_REG(hw, E1000_RFCTL, E1000_RFCTL_ACK_DIS);
+ }
if (ifp->if_capenable & IFCAP_RXCSUM) {
rxcsum = E1000_READ_REG(hw, E1000_RXCSUM);
@@ -4268,35 +4279,32 @@ em_initialize_receive_unit(struct adapter *adapter)
E1000_WRITE_REG(hw, E1000_RDBAH(i), (u32)(bus_addr >> 32));
E1000_WRITE_REG(hw, E1000_RDBAL(i), (u32)bus_addr);
/* Setup the Head and Tail Descriptor Pointers */
- E1000_WRITE_REG(hw, E1000_RDH(i), rxr->next_to_check);
+ E1000_WRITE_REG(hw, E1000_RDH(i), 0);
#ifdef DEV_NETMAP
/*
* an init() while a netmap client is active must
* preserve the rx buffers passed to userspace.
* In this driver it means we adjust RDT to
- * something different from next_to_refresh.
+ * something different from na->num_rx_desc - 1.
*/
if (ifp->if_capenable & IFCAP_NETMAP) {
struct netmap_adapter *na = NA(adapter->ifp);
struct netmap_kring *kring = &na->rx_rings[i];
- int t = rxr->next_to_refresh - kring->nr_hwavail;
+ int t = na->num_rx_desc - 1 - kring->nr_hwavail;
- if (t < 0)
- t += na->num_rx_desc;
E1000_WRITE_REG(hw, E1000_RDT(i), t);
} else
#endif /* DEV_NETMAP */
- E1000_WRITE_REG(hw, E1000_RDT(i), rxr->next_to_refresh);
+ E1000_WRITE_REG(hw, E1000_RDT(i), adapter->num_rx_desc - 1);
}
- /* Set early receive threshold on appropriate hw */
+ /* Set PTHRESH for improved jumbo performance */
if (((adapter->hw.mac.type == e1000_ich9lan) ||
(adapter->hw.mac.type == e1000_pch2lan) ||
(adapter->hw.mac.type == e1000_ich10lan)) &&
(ifp->if_mtu > ETHERMTU)) {
u32 rxdctl = E1000_READ_REG(hw, E1000_RXDCTL(0));
E1000_WRITE_REG(hw, E1000_RXDCTL(0), rxdctl | 3);
- E1000_WRITE_REG(hw, E1000_ERT, 0x100 | (1 << 13));
}
if (adapter->hw.mac.type == e1000_pch2lan) {
@@ -4439,14 +4447,9 @@ em_rxeof(struct rx_ring *rxr, int count, int *done)
#endif
if (status & E1000_RXD_STAT_VP) {
sendmp->m_pkthdr.ether_vtag =
- (le16toh(cur->special) &
- E1000_RXD_SPC_VLAN_MASK);
+ le16toh(cur->special);
sendmp->m_flags |= M_VLANTAG;
}
-#ifdef EM_MULTIQUEUE
- sendmp->m_pkthdr.flowid = rxr->msix;
- sendmp->m_flags |= M_FLOWID;
-#endif
#ifndef __NO_STRICT_ALIGNMENT
skip:
#endif
@@ -4921,7 +4924,7 @@ em_enable_wakeup(device_t dev)
(adapter->hw.mac.type == e1000_pchlan) ||
(adapter->hw.mac.type == e1000_ich9lan) ||
(adapter->hw.mac.type == e1000_ich10lan))
- e1000_disable_gig_wol_ich8lan(&adapter->hw);
+ e1000_suspend_workarounds_ich8lan(&adapter->hw);
/* Keep the laser running on Fiber adapters */
if (adapter->hw.phy.media_type == e1000_media_type_fiber ||
@@ -5518,7 +5521,7 @@ em_add_hw_stats(struct adapter *adapter)
static int
em_sysctl_nvm_info(SYSCTL_HANDLER_ARGS)
{
- struct adapter *adapter;
+ struct adapter *adapter = (struct adapter *)arg1;
int error;
int result;
@@ -5533,10 +5536,8 @@ em_sysctl_nvm_info(SYSCTL_HANDLER_ARGS)
* first 32 16-bit words of the EEPROM to
* the screen.
*/
- if (result == 1) {
- adapter = (struct adapter *)arg1;
+ if (result == 1)
em_print_nvm_info(adapter);
- }
return (error);
}
@@ -5626,6 +5627,49 @@ em_set_sysctl_value(struct adapter *adapter, const char *name,
OID_AUTO, name, CTLTYPE_INT|CTLFLAG_RW, limit, value, description);
}
+
+/*
+** Set flow control using sysctl:
+** Flow control values:
+** 0 - off
+** 1 - rx pause
+** 2 - tx pause
+** 3 - full
+*/
+static int
+em_set_flowcntl(SYSCTL_HANDLER_ARGS)
+{
+ int error;
+ static int input = 3; /* default is full */
+ struct adapter *adapter = (struct adapter *) arg1;
+
+ error = sysctl_handle_int(oidp, &input, 0, req);
+
+ if ((error) || (req->newptr == NULL))
+ return (error);
+
+ if (input == adapter->fc) /* no change? */
+ return (error);
+
+ switch (input) {
+ case e1000_fc_rx_pause:
+ case e1000_fc_tx_pause:
+ case e1000_fc_full:
+ case e1000_fc_none:
+ adapter->hw.fc.requested_mode = input;
+ adapter->fc = input;
+ break;
+ default:
+ /* Do nothing */
+ return (error);
+ }
+
+ adapter->hw.fc.current_mode = adapter->hw.fc.requested_mode;
+ e1000_force_mac_fc(&adapter->hw);
+ return (error);
+}
+
+
static int
em_sysctl_debug_info(SYSCTL_HANDLER_ARGS)
{
@@ -5662,10 +5706,11 @@ em_print_debug_info(struct adapter *adapter)
printf("Interface is RUNNING ");
else
printf("Interface is NOT RUNNING\n");
+
if (adapter->ifp->if_drv_flags & IFF_DRV_OACTIVE)
- printf("and ACTIVE\n");
- else
printf("and INACTIVE\n");
+ else
+ printf("and ACTIVE\n");
device_printf(dev, "hw tdh = %d, hw tdt = %d\n",
E1000_READ_REG(&adapter->hw, E1000_TDH(0)),
diff --git a/sys/dev/e1000/if_em.h b/sys/dev/e1000/if_em.h
index e25904e..f1afbad 100644
--- a/sys/dev/e1000/if_em.h
+++ b/sys/dev/e1000/if_em.h
@@ -212,7 +212,8 @@
#define EM_BAR_MEM_TYPE_64BIT 0x00000004
#define EM_MSIX_BAR 3 /* On 82575 */
-#if !defined(SYSCTL_ADD_UQUAD)
+/* More backward compatibility */
+#if __FreeBSD_version < 900000
#define SYSCTL_ADD_UQUAD SYSCTL_ADD_QUAD
#endif
@@ -418,11 +419,11 @@ struct adapter {
u32 shadow_vfta[EM_VFTA_SIZE];
/* Info about the interface */
- u8 link_active;
+ u16 link_active;
+ u16 fc;
u16 link_speed;
u16 link_duplex;
u32 smartspeed;
- u32 fc_setting;
struct em_int_delay_info tx_int_delay;
struct em_int_delay_info tx_abs_int_delay;
diff --git a/sys/dev/e1000/if_igb.c b/sys/dev/e1000/if_igb.c
index 4e85270..2c0caa4 100644
--- a/sys/dev/e1000/if_igb.c
+++ b/sys/dev/e1000/if_igb.c
@@ -100,7 +100,7 @@ int igb_display_debug_stats = 0;
/*********************************************************************
* Driver version:
*********************************************************************/
-char igb_driver_version[] = "version - 2.2.5";
+char igb_driver_version[] = "version - 2.3.1";
/*********************************************************************
@@ -171,15 +171,13 @@ static int igb_detach(device_t);
static int igb_shutdown(device_t);
static int igb_suspend(device_t);
static int igb_resume(device_t);
+static void igb_start(struct ifnet *);
+static void igb_start_locked(struct tx_ring *, struct ifnet *ifp);
#if __FreeBSD_version >= 800000
static int igb_mq_start(struct ifnet *, struct mbuf *);
static int igb_mq_start_locked(struct ifnet *,
struct tx_ring *, struct mbuf *);
static void igb_qflush(struct ifnet *);
-static void igb_deferred_mq_start(void *, int);
-#else
-static void igb_start(struct ifnet *);
-static void igb_start_locked(struct tx_ring *, struct ifnet *ifp);
#endif
static int igb_ioctl(struct ifnet *, u_long, caddr_t);
static void igb_init(void *);
@@ -225,8 +223,9 @@ static __inline void igb_rx_input(struct rx_ring *,
static bool igb_rxeof(struct igb_queue *, int, int *);
static void igb_rx_checksum(u32, struct mbuf *, u32);
-static int igb_tx_ctx_setup(struct tx_ring *, struct mbuf *);
-static bool igb_tso_setup(struct tx_ring *, struct mbuf *, u32 *);
+static bool igb_tx_ctx_setup(struct tx_ring *, struct mbuf *);
+static bool igb_tso_setup(struct tx_ring *, struct mbuf *, int,
+ struct ip *, struct tcphdr *);
static void igb_set_promisc(struct adapter *);
static void igb_disable_promisc(struct adapter *);
static void igb_set_multi(struct adapter *);
@@ -348,7 +347,7 @@ SYSCTL_INT(_hw_igb, OID_AUTO, max_interrupt_rate, CTLFLAG_RDTUN,
** into the header and thus use no cluster. Its
** a very workload dependent type feature.
*/
-static bool igb_header_split = FALSE;
+static int igb_header_split = FALSE;
TUNABLE_INT("hw.igb.hdr_split", &igb_header_split);
SYSCTL_INT(_hw_igb, OID_AUTO, header_split, CTLFLAG_RDTUN, &igb_header_split, 0,
"Enable receive mbuf header split");
@@ -614,16 +613,6 @@ igb_attach(device_t dev)
goto err_late;
}
- /*
- ** Configure Interrupts
- */
- if ((adapter->msix > 1) && (igb_enable_msix))
- error = igb_allocate_msix(adapter);
- else /* MSI or Legacy */
- error = igb_allocate_legacy(adapter);
- if (error)
- goto err_late;
-
/* Setup OS specific network interface */
if (igb_setup_interface(dev, adapter) != 0)
goto err_late;
@@ -662,11 +651,22 @@ igb_attach(device_t dev)
igb_add_hw_stats(adapter);
/* Tell the stack that the interface is not active */
- adapter->ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);
+ adapter->ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
+ adapter->ifp->if_drv_flags |= IFF_DRV_OACTIVE;
adapter->led_dev = led_create(igb_led_func, adapter,
device_get_nameunit(dev));
+ /*
+ ** Configure Interrupts
+ */
+ if ((adapter->msix > 1) && (igb_enable_msix))
+ error = igb_allocate_msix(adapter);
+ else /* MSI or Legacy */
+ error = igb_allocate_legacy(adapter);
+ if (error)
+ goto err_late;
+
#ifdef DEV_NETMAP
igb_netmap_attach(adapter);
#endif /* DEV_NETMAP */
@@ -679,10 +679,10 @@ err_late:
igb_free_transmit_structures(adapter);
igb_free_receive_structures(adapter);
igb_release_hw_control(adapter);
- if (adapter->ifp != NULL)
- if_free(adapter->ifp);
err_pci:
igb_free_pci_resources(adapter);
+ if (adapter->ifp != NULL)
+ if_free(adapter->ifp);
free(adapter->mta, M_DEVBUF);
IGB_CORE_LOCK_DESTROY(adapter);
@@ -713,8 +713,6 @@ igb_detach(device_t dev)
return (EBUSY);
}
- ether_ifdetach(adapter->ifp);
-
if (adapter->led_dev != NULL)
led_destroy(adapter->led_dev);
@@ -746,6 +744,8 @@ igb_detach(device_t dev)
if (adapter->vlan_detach != NULL)
EVENTHANDLER_DEREGISTER(vlan_unconfig, adapter->vlan_detach);
+ ether_ifdetach(adapter->ifp);
+
callout_drain(&adapter->timer);
#ifdef DEV_NETMAP
@@ -808,27 +808,14 @@ igb_resume(device_t dev)
{
struct adapter *adapter = device_get_softc(dev);
struct ifnet *ifp = adapter->ifp;
-#if __FreeBSD_version >= 800000
- struct tx_ring *txr = adapter->tx_rings;
-#endif
IGB_CORE_LOCK(adapter);
igb_init_locked(adapter);
igb_init_manageability(adapter);
if ((ifp->if_flags & IFF_UP) &&
- (ifp->if_drv_flags & IFF_DRV_RUNNING)) {
-#if __FreeBSD_version < 800000
+ (ifp->if_drv_flags & IFF_DRV_RUNNING))
igb_start(ifp);
-#else
- for (int i = 0; i < adapter->num_queues; i++, txr++) {
- IGB_TX_LOCK(txr);
- if (!drbr_empty(ifp, txr->br))
- igb_mq_start_locked(ifp, txr, NULL);
- IGB_TX_UNLOCK(txr);
- }
-#endif
- }
IGB_CORE_UNLOCK(adapter);
@@ -836,7 +823,6 @@ igb_resume(device_t dev)
}
-#if __FreeBSD_version < 800000
/*********************************************************************
* Transmit entry point
*
@@ -867,7 +853,7 @@ igb_start_locked(struct tx_ring *txr, struct ifnet *ifp)
while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) {
if (txr->tx_avail <= IGB_MAX_SCATTER) {
- ifp->if_drv_flags |= IFF_DRV_OACTIVE;
+ txr->queue_status |= IGB_QUEUE_DEPLETED;
break;
}
IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head);
@@ -878,10 +864,10 @@ igb_start_locked(struct tx_ring *txr, struct ifnet *ifp)
* NULL on failure. In that event, we can't requeue.
*/
if (igb_xmit(txr, &m_head)) {
- if (m_head == NULL)
- break;
- ifp->if_drv_flags |= IFF_DRV_OACTIVE;
- IFQ_DRV_PREPEND(&ifp->if_snd, m_head);
+ if (m_head != NULL)
+ IFQ_DRV_PREPEND(&ifp->if_snd, m_head);
+ if (txr->tx_avail <= IGB_MAX_SCATTER)
+ txr->queue_status |= IGB_QUEUE_DEPLETED;
break;
}
@@ -890,7 +876,7 @@ igb_start_locked(struct tx_ring *txr, struct ifnet *ifp)
/* Set watchdog on */
txr->watchdog_time = ticks;
- txr->queue_status = IGB_QUEUE_WORKING;
+ txr->queue_status |= IGB_QUEUE_WORKING;
}
}
@@ -913,7 +899,7 @@ igb_start(struct ifnet *ifp)
return;
}
-#else /* __FreeBSD_version >= 800000 */
+#if __FreeBSD_version >= 800000
/*
** Multiqueue Transmit driver
**
@@ -924,21 +910,25 @@ igb_mq_start(struct ifnet *ifp, struct mbuf *m)
struct adapter *adapter = ifp->if_softc;
struct igb_queue *que;
struct tx_ring *txr;
- int i = 0, err = 0;
+ int i, err = 0;
+ bool moveable = TRUE;
/* Which queue to use */
- if ((m->m_flags & M_FLOWID) != 0)
+ if ((m->m_flags & M_FLOWID) != 0) {
i = m->m_pkthdr.flowid % adapter->num_queues;
+ moveable = FALSE;
+ } else
+ i = curcpu % adapter->num_queues;
txr = &adapter->tx_rings[i];
que = &adapter->queues[i];
-
- if (IGB_TX_TRYLOCK(txr)) {
+ if (((txr->queue_status & IGB_QUEUE_DEPLETED) == 0) &&
+ IGB_TX_TRYLOCK(txr)) {
err = igb_mq_start_locked(ifp, txr, m);
IGB_TX_UNLOCK(txr);
} else {
err = drbr_enqueue(ifp, txr->br, m);
- taskqueue_enqueue(que->tq, &txr->txq_task);
+ taskqueue_enqueue(que->tq, &que->que_task);
}
return (err);
@@ -953,8 +943,9 @@ igb_mq_start_locked(struct ifnet *ifp, struct tx_ring *txr, struct mbuf *m)
IGB_TX_LOCK_ASSERT(txr);
- if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) !=
- IFF_DRV_RUNNING || adapter->link_active == 0) {
+ if (((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) ||
+ (txr->queue_status == IGB_QUEUE_DEPLETED) ||
+ adapter->link_active == 0) {
if (m != NULL)
err = drbr_enqueue(ifp, txr->br, m);
return (err);
@@ -982,39 +973,21 @@ igb_mq_start_locked(struct ifnet *ifp, struct tx_ring *txr, struct mbuf *m)
ETHER_BPF_MTAP(ifp, next);
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
break;
- if (txr->tx_avail <= IGB_TX_CLEANUP_THRESHOLD)
- igb_txeof(txr);
- if (txr->tx_avail <= IGB_MAX_SCATTER) {
- ifp->if_drv_flags |= IFF_DRV_OACTIVE;
- break;
- }
next = drbr_dequeue(ifp, txr->br);
}
if (enq > 0) {
/* Set the watchdog */
- txr->queue_status = IGB_QUEUE_WORKING;
+ txr->queue_status |= IGB_QUEUE_WORKING;
txr->watchdog_time = ticks;
}
+ if (txr->tx_avail <= IGB_TX_CLEANUP_THRESHOLD)
+ igb_txeof(txr);
+ if (txr->tx_avail <= IGB_MAX_SCATTER)
+ txr->queue_status |= IGB_QUEUE_DEPLETED;
return (err);
}
/*
- * Called from a taskqueue to drain queued transmit packets.
- */
-static void
-igb_deferred_mq_start(void *arg, int pending)
-{
- struct tx_ring *txr = arg;
- struct adapter *adapter = txr->adapter;
- struct ifnet *ifp = adapter->ifp;
-
- IGB_TX_LOCK(txr);
- if (!drbr_empty(ifp, txr->br))
- igb_mq_start_locked(ifp, txr, NULL);
- IGB_TX_UNLOCK(txr);
-}
-
-/*
** Flush all ring buffers
*/
static void
@@ -1032,7 +1005,7 @@ igb_qflush(struct ifnet *ifp)
}
if_qflush(ifp);
}
-#endif /* __FreeBSD_version < 800000 */
+#endif /* __FreeBSD_version >= 800000 */
/*********************************************************************
* Ioctl entry point
@@ -1138,11 +1111,6 @@ igb_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
}
break;
case SIOCSIFMEDIA:
- /*
- ** As the speed/duplex settings are being
- ** changed, we need toreset the PHY.
- */
- adapter->hw.phy.reset_disable = FALSE;
/* Check SOL/IDER usage */
IGB_CORE_LOCK(adapter);
if (e1000_check_reset_block(&adapter->hw)) {
@@ -1333,10 +1301,8 @@ igb_init_locked(struct adapter *adapter)
}
/* Set Energy Efficient Ethernet */
- e1000_set_eee_i350(&adapter->hw);
- /* Don't reset the phy next time init gets called */
- adapter->hw.phy.reset_disable = TRUE;
+ e1000_set_eee_i350(&adapter->hw);
}
static void
@@ -1361,18 +1327,21 @@ igb_handle_que(void *context, int pending)
if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
bool more;
- more = igb_rxeof(que, -1, NULL);
+ more = igb_rxeof(que, adapter->rx_process_limit, NULL);
IGB_TX_LOCK(txr);
if (igb_txeof(txr))
more = TRUE;
#if __FreeBSD_version >= 800000
- if (!drbr_empty(ifp, txr->br))
+ /* Process the stack queue only if not depleted */
+ if (((txr->queue_status & IGB_QUEUE_DEPLETED) == 0) &&
+ !drbr_empty(ifp, txr->br))
igb_mq_start_locked(ifp, txr, NULL);
#else
igb_start_locked(txr, ifp);
#endif
IGB_TX_UNLOCK(txr);
+ /* Do we need another? */
if (more || (ifp->if_drv_flags & IFF_DRV_OACTIVE)) {
taskqueue_enqueue(que->tq, &que->que_task);
return;
@@ -1503,7 +1472,7 @@ igb_poll(struct ifnet *ifp, enum poll_cmd cmd, int count)
/*********************************************************************
*
- * MSIX TX Interrupt Service routine
+ * MSIX Que Interrupt Service routine
*
**********************************************************************/
static void
@@ -1578,8 +1547,7 @@ igb_msix_que(void *arg)
no_calc:
/* Schedule a clean task if needed*/
- if (more_tx || more_rx ||
- (adapter->ifp->if_drv_flags & IFF_DRV_OACTIVE))
+ if (more_tx || more_rx)
taskqueue_enqueue(que->tq, &que->que_task);
else
/* Reenable this interrupt */
@@ -1727,10 +1695,8 @@ igb_media_change(struct ifnet *ifp)
/*********************************************************************
*
* This routine maps the mbufs to Advanced TX descriptors.
- * used by the 82575 adapter.
*
**********************************************************************/
-
static int
igb_xmit(struct tx_ring *txr, struct mbuf **m_headp)
{
@@ -1739,22 +1705,123 @@ igb_xmit(struct tx_ring *txr, struct mbuf **m_headp)
bus_dmamap_t map;
struct igb_tx_buffer *tx_buffer, *tx_buffer_mapped;
union e1000_adv_tx_desc *txd = NULL;
- struct mbuf *m_head;
- u32 olinfo_status = 0, cmd_type_len = 0;
- int nsegs, i, j, error, first, last = 0;
- u32 hdrlen = 0;
-
- m_head = *m_headp;
-
+ struct mbuf *m_head = *m_headp;
+ struct ether_vlan_header *eh = NULL;
+ struct ip *ip = NULL;
+ struct tcphdr *th = NULL;
+ u32 hdrlen, cmd_type_len, olinfo_status = 0;
+ int ehdrlen, poff;
+ int nsegs, i, first, last = 0;
+ int error, do_tso, remap = 1;
/* Set basic descriptor constants */
- cmd_type_len |= E1000_ADVTXD_DTYP_DATA;
+ cmd_type_len = E1000_ADVTXD_DTYP_DATA;
cmd_type_len |= E1000_ADVTXD_DCMD_IFCS | E1000_ADVTXD_DCMD_DEXT;
if (m_head->m_flags & M_VLANTAG)
cmd_type_len |= E1000_ADVTXD_DCMD_VLE;
+retry:
+ m_head = *m_headp;
+ do_tso = ((m_head->m_pkthdr.csum_flags & CSUM_TSO) != 0);
+ hdrlen = ehdrlen = poff = 0;
+
/*
- * Map the packet for DMA.
+ * Intel recommends entire IP/TCP header length reside in a single
+ * buffer. If multiple descriptors are used to describe the IP and
+ * TCP header, each descriptor should describe one or more
+ * complete headers; descriptors referencing only parts of headers
+ * are not supported. If all layer headers are not coalesced into
+ * a single buffer, each buffer should not cross a 4KB boundary,
+ * or be larger than the maximum read request size.
+ * Controller also requires modifing IP/TCP header to make TSO work
+ * so we firstly get a writable mbuf chain then coalesce ethernet/
+ * IP/TCP header into a single buffer to meet the requirement of
+ * controller. This also simplifies IP/TCP/UDP checksum offloading
+ * which also has similiar restrictions.
+ */
+ if (do_tso || m_head->m_pkthdr.csum_flags & CSUM_OFFLOAD) {
+ if (do_tso || (m_head->m_next != NULL &&
+ m_head->m_pkthdr.csum_flags & CSUM_OFFLOAD)) {
+ if (M_WRITABLE(*m_headp) == 0) {
+ m_head = m_dup(*m_headp, M_DONTWAIT);
+ m_freem(*m_headp);
+ if (m_head == NULL) {
+ *m_headp = NULL;
+ return (ENOBUFS);
+ }
+ *m_headp = m_head;
+ }
+ }
+ /*
+ * Assume IPv4, we don't have TSO/checksum offload support
+ * for IPv6 yet.
+ */
+ ehdrlen = sizeof(struct ether_header);
+ m_head = m_pullup(m_head, ehdrlen);
+ if (m_head == NULL) {
+ *m_headp = NULL;
+ return (ENOBUFS);
+ }
+ eh = mtod(m_head, struct ether_vlan_header *);
+ if (eh->evl_encap_proto == htons(ETHERTYPE_VLAN)) {
+ ehdrlen = sizeof(struct ether_vlan_header);
+ m_head = m_pullup(m_head, ehdrlen);
+ if (m_head == NULL) {
+ *m_headp = NULL;
+ return (ENOBUFS);
+ }
+ }
+ m_head = m_pullup(m_head, ehdrlen + sizeof(struct ip));
+ if (m_head == NULL) {
+ *m_headp = NULL;
+ return (ENOBUFS);
+ }
+ ip = (struct ip *)(mtod(m_head, char *) + ehdrlen);
+ poff = ehdrlen + (ip->ip_hl << 2);
+ if (do_tso) {
+ m_head = m_pullup(m_head, poff + sizeof(struct tcphdr));
+ if (m_head == NULL) {
+ *m_headp = NULL;
+ return (ENOBUFS);
+ }
+ /*
+ * The pseudo TCP checksum does not include TCP payload
+ * length so driver should recompute the checksum here
+ * what hardware expect to see. This is adherence of
+ * Microsoft's Large Send specification.
+ */
+ th = (struct tcphdr *)(mtod(m_head, char *) + poff);
+ th->th_sum = in_pseudo(ip->ip_src.s_addr,
+ ip->ip_dst.s_addr, htons(IPPROTO_TCP));
+ /* Keep track of the full header length */
+ hdrlen = poff + (th->th_off << 2);
+ } else if (m_head->m_pkthdr.csum_flags & CSUM_TCP) {
+ m_head = m_pullup(m_head, poff + sizeof(struct tcphdr));
+ if (m_head == NULL) {
+ *m_headp = NULL;
+ return (ENOBUFS);
+ }
+ th = (struct tcphdr *)(mtod(m_head, char *) + poff);
+ m_head = m_pullup(m_head, poff + (th->th_off << 2));
+ if (m_head == NULL) {
+ *m_headp = NULL;
+ return (ENOBUFS);
+ }
+ ip = (struct ip *)(mtod(m_head, char *) + ehdrlen);
+ th = (struct tcphdr *)(mtod(m_head, char *) + poff);
+ } else if (m_head->m_pkthdr.csum_flags & CSUM_UDP) {
+ m_head = m_pullup(m_head, poff + sizeof(struct udphdr));
+ if (m_head == NULL) {
+ *m_headp = NULL;
+ return (ENOBUFS);
+ }
+ ip = (struct ip *)(mtod(m_head, char *) + ehdrlen);
+ }
+ *m_headp = m_head;
+ }
+
+ /*
+ * Map the packet for DMA
*
* Capture the first descriptor index,
* this descriptor will have the index
@@ -1769,7 +1836,16 @@ igb_xmit(struct tx_ring *txr, struct mbuf **m_headp)
error = bus_dmamap_load_mbuf_sg(txr->txtag, map,
*m_headp, segs, &nsegs, BUS_DMA_NOWAIT);
- if (error == EFBIG) {
+ /*
+ * There are two types of errors we can (try) to handle:
+ * - EFBIG means the mbuf chain was too long and bus_dma ran
+ * out of segments. Defragment the mbuf chain and try again.
+ * - ENOMEM means bus_dma could not obtain enough bounce buffers
+ * at this point in time. Defer sending and try again later.
+ * All other errors, in particular EINVAL, are fatal and prevent the
+ * mbuf chain from ever going through. Drop it and report error.
+ */
+ if (error == EFBIG && remap) {
struct mbuf *m;
m = m_defrag(*m_headp, M_DONTWAIT);
@@ -1781,19 +1857,9 @@ igb_xmit(struct tx_ring *txr, struct mbuf **m_headp)
}
*m_headp = m;
- /* Try it again */
- error = bus_dmamap_load_mbuf_sg(txr->txtag, map,
- *m_headp, segs, &nsegs, BUS_DMA_NOWAIT);
-
- if (error == ENOMEM) {
- adapter->no_tx_dma_setup++;
- return (error);
- } else if (error != 0) {
- adapter->no_tx_dma_setup++;
- m_freem(*m_headp);
- *m_headp = NULL;
- return (error);
- }
+ /* Try it again, but only once */
+ remap = 0;
+ goto retry;
} else if (error == ENOMEM) {
adapter->no_tx_dma_setup++;
return (error);
@@ -1804,29 +1870,35 @@ igb_xmit(struct tx_ring *txr, struct mbuf **m_headp)
return (error);
}
- /* Check again to be sure we have enough descriptors */
- if (nsegs > (txr->tx_avail - 2)) {
+ /*
+ ** Make sure we don't overrun the ring,
+ ** we need nsegs descriptors and one for
+ ** the context descriptor used for the
+ ** offloads.
+ */
+ if ((nsegs + 1) > (txr->tx_avail - 2)) {
txr->no_desc_avail++;
bus_dmamap_unload(txr->txtag, map);
return (ENOBUFS);
}
m_head = *m_headp;
- /*
- * Set up the context descriptor:
- * used when any hardware offload is done.
- * This includes CSUM, VLAN, and TSO. It
- * will use the first descriptor.
+ /* Do hardware assists:
+ * Set up the context descriptor, used
+ * when any hardware offload is done.
+ * This includes CSUM, VLAN, and TSO.
+ * It will use the first descriptor.
*/
- if (m_head->m_pkthdr.csum_flags & CSUM_TSO) {
- if (igb_tso_setup(txr, m_head, &hdrlen)) {
+
+ if (m_head->m_pkthdr.csum_flags & CSUM_TSO) {
+ if (igb_tso_setup(txr, m_head, ehdrlen, ip, th)) {
cmd_type_len |= E1000_ADVTXD_DCMD_TSE;
olinfo_status |= E1000_TXD_POPTS_IXSM << 8;
olinfo_status |= E1000_TXD_POPTS_TXSM << 8;
} else
- return (ENXIO);
+ return (ENXIO);
} else if (igb_tx_ctx_setup(txr, m_head))
- olinfo_status |= E1000_TXD_POPTS_TXSM << 8;
+ olinfo_status |= E1000_TXD_POPTS_TXSM << 8;
/* Calculate payload length */
olinfo_status |= ((m_head->m_pkthdr.len - hdrlen)
@@ -1838,7 +1910,7 @@ igb_xmit(struct tx_ring *txr, struct mbuf **m_headp)
/* Set up our transmit descriptors */
i = txr->next_avail_desc;
- for (j = 0; j < nsegs; j++) {
+ for (int j = 0; j < nsegs; j++) {
bus_size_t seg_len;
bus_addr_t seg_addr;
@@ -1859,8 +1931,14 @@ igb_xmit(struct tx_ring *txr, struct mbuf **m_headp)
txr->next_avail_desc = i;
txr->tx_avail -= nsegs;
-
tx_buffer->m_head = m_head;
+
+ /*
+ ** Here we swap the map so the last descriptor,
+ ** which gets the completion interrupt has the
+ ** real map, and the first descriptor gets the
+ ** unused map from this descriptor.
+ */
tx_buffer_mapped->map = tx_buffer->map;
tx_buffer->map = map;
bus_dmamap_sync(txr->txtag, map, BUS_DMASYNC_PREWRITE);
@@ -1878,6 +1956,7 @@ igb_xmit(struct tx_ring *txr, struct mbuf **m_headp)
*/
tx_buffer = &txr->tx_buffers[first];
tx_buffer->next_eop = last;
+ /* Update the watchdog time early and often */
txr->watchdog_time = ticks;
/*
@@ -1890,9 +1969,7 @@ igb_xmit(struct tx_ring *txr, struct mbuf **m_headp)
++txr->tx_packets;
return (0);
-
}
-
static void
igb_set_promisc(struct adapter *adapter)
{
@@ -1999,7 +2076,10 @@ igb_local_timer(void *arg)
{
struct adapter *adapter = arg;
device_t dev = adapter->dev;
+ struct ifnet *ifp = adapter->ifp;
struct tx_ring *txr = adapter->tx_rings;
+ struct igb_queue *que = adapter->queues;
+ int hung = 0, busy = 0;
IGB_CORE_LOCK_ASSERT(adapter);
@@ -2007,22 +2087,29 @@ igb_local_timer(void *arg)
igb_update_link_status(adapter);
igb_update_stats_counters(adapter);
- /*
- ** If flow control has paused us since last checking
- ** it invalidates the watchdog timing, so dont run it.
- */
- if (adapter->pause_frames) {
- adapter->pause_frames = 0;
- goto out;
- }
-
/*
- ** Watchdog: check for time since any descriptor was cleaned
+ ** Check the TX queues status
+ ** - central locked handling of OACTIVE
+ ** - watchdog only if all queues show hung
*/
- for (int i = 0; i < adapter->num_queues; i++, txr++)
- if (txr->queue_status == IGB_QUEUE_HUNG)
- goto timeout;
-out:
+ for (int i = 0; i < adapter->num_queues; i++, que++, txr++) {
+ if ((txr->queue_status & IGB_QUEUE_HUNG) &&
+ (adapter->pause_frames == 0))
+ ++hung;
+ if (txr->queue_status & IGB_QUEUE_DEPLETED)
+ ++busy;
+ if ((txr->queue_status & IGB_QUEUE_IDLE) == 0)
+ taskqueue_enqueue(que->tq, &que->que_task);
+ }
+ if (hung == adapter->num_queues)
+ goto timeout;
+ if (busy == adapter->num_queues)
+ ifp->if_drv_flags |= IFF_DRV_OACTIVE;
+ else if ((ifp->if_drv_flags & IFF_DRV_OACTIVE) &&
+ (busy < adapter->num_queues))
+ ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
+
+ adapter->pause_frames = 0;
callout_reset(&adapter->timer, hz, igb_local_timer, adapter);
#ifndef DEVICE_POLLING
/* Schedule all queue interrupts - deadlock protection */
@@ -2115,7 +2202,7 @@ igb_update_link_status(struct adapter *adapter)
adapter->link_active = 0;
/* This can sleep */
if_link_state_change(ifp, LINK_STATE_DOWN);
- /* Turn off watchdogs */
+ /* Reset queue state */
for (int i = 0; i < adapter->num_queues; i++, txr++)
txr->queue_status = IGB_QUEUE_IDLE;
}
@@ -2144,9 +2231,10 @@ igb_stop(void *arg)
callout_stop(&adapter->timer);
/* Tell the stack that the interface is no longer active */
- ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);
+ ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
+ ifp->if_drv_flags |= IFF_DRV_OACTIVE;
- /* Unarm watchdog timer. */
+ /* Disarm watchdog timer. */
for (int i = 0; i < adapter->num_queues; i++, txr++) {
IGB_TX_LOCK(txr);
txr->queue_status = IGB_QUEUE_IDLE;
@@ -2241,7 +2329,6 @@ igb_allocate_legacy(struct adapter *adapter)
{
device_t dev = adapter->dev;
struct igb_queue *que = adapter->queues;
- struct tx_ring *txr = adapter->tx_rings;
int error, rid = 0;
/* Turn off all interrupts */
@@ -2260,10 +2347,6 @@ igb_allocate_legacy(struct adapter *adapter)
return (ENXIO);
}
-#if __FreeBSD_version >= 800000
- TASK_INIT(&txr->txq_task, 0, igb_deferred_mq_start, txr);
-#endif
-
/*
* Try allocating a fast interrupt and the associated deferred
* processing contexts.
@@ -2301,6 +2384,9 @@ igb_allocate_msix(struct adapter *adapter)
struct igb_queue *que = adapter->queues;
int error, rid, vector = 0;
+ /* Be sure to start with all interrupts disabled */
+ E1000_WRITE_REG(&adapter->hw, E1000_IMC, ~0);
+ E1000_WRITE_FLUSH(&adapter->hw);
for (int i = 0; i < adapter->num_queues; i++, vector++, que++) {
rid = vector +1;
@@ -2334,13 +2420,9 @@ igb_allocate_msix(struct adapter *adapter)
*/
if (adapter->num_queues > 1)
bus_bind_intr(dev, que->res, i);
-#if __FreeBSD_version >= 800000
- TASK_INIT(&que->txr->txq_task, 0, igb_deferred_mq_start,
- que->txr);
-#endif
/* Make tasklet for deferred handling */
TASK_INIT(&que->que_task, 0, igb_handle_que, que);
- que->tq = taskqueue_create("igb_que", M_NOWAIT,
+ que->tq = taskqueue_create_fast("igb_que", M_NOWAIT,
taskqueue_thread_enqueue, &que->tq);
taskqueue_start_threads(&que->tq, 1, PI_NET, "%s que",
device_get_nameunit(adapter->dev));
@@ -2547,24 +2629,13 @@ igb_free_pci_resources(struct adapter *adapter)
else
(adapter->msix != 0) ? (rid = 1):(rid = 0);
- que = adapter->queues;
if (adapter->tag != NULL) {
- taskqueue_drain(que->tq, &adapter->link_task);
bus_teardown_intr(dev, adapter->res, adapter->tag);
adapter->tag = NULL;
}
if (adapter->res != NULL)
bus_release_resource(dev, SYS_RES_IRQ, rid, adapter->res);
- for (int i = 0; i < adapter->num_queues; i++, que++) {
- if (que->tq != NULL) {
-#if __FreeBSD_version >= 800000
- taskqueue_drain(que->tq, &que->txr->txq_task);
-#endif
- taskqueue_drain(que->tq, &que->que_task);
- taskqueue_free(que->tq);
- }
- }
mem:
if (adapter->msix)
pci_release_msi(dev);
@@ -2695,7 +2766,6 @@ igb_reset(struct adapter *adapter)
pba = E1000_READ_REG(hw, E1000_RXPBS);
pba = e1000_rxpbs_adjust_82580(pba);
break;
- pba = E1000_PBA_35K;
default:
break;
}
@@ -2750,12 +2820,10 @@ igb_reset(struct adapter *adapter)
fc->pause_time = IGB_FC_PAUSE_TIME;
fc->send_xon = TRUE;
- if (fc->requested_mode)
- fc->current_mode = fc->requested_mode;
+ if (adapter->fc)
+ fc->requested_mode = adapter->fc;
else
- fc->current_mode = e1000_fc_full;
-
- adapter->fc = fc->current_mode;
+ fc->requested_mode = e1000_fc_default;
/* Issue a global reset */
e1000_reset_hw(hw);
@@ -2831,16 +2899,14 @@ igb_setup_interface(device_t dev, struct adapter *adapter)
return (-1);
}
if_initname(ifp, device_get_name(dev), device_get_unit(dev));
- ifp->if_mtu = ETHERMTU;
ifp->if_init = igb_init;
ifp->if_softc = adapter;
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
ifp->if_ioctl = igb_ioctl;
+ ifp->if_start = igb_start;
#if __FreeBSD_version >= 800000
ifp->if_transmit = igb_mq_start;
ifp->if_qflush = igb_qflush;
-#else
- ifp->if_start = igb_start;
#endif
IFQ_SET_MAXLEN(&ifp->if_snd, adapter->num_tx_desc - 1);
ifp->if_snd.ifq_drv_maxlen = adapter->num_tx_desc - 1;
@@ -3254,8 +3320,7 @@ igb_setup_transmit_ring(struct tx_ring *txr)
if (si < 0)
si += na->num_tx_desc;
- netmap_load_map(txr->txtag, txbuf->map,
- NMB(slot + si), na->buff_size);
+ netmap_load_map(txr->txtag, txbuf->map, NMB(slot + si));
}
#endif /* DEV_NETMAP */
/* clear the watch index */
@@ -3423,8 +3488,9 @@ igb_free_transmit_buffers(struct tx_ring *txr)
* Setup work for hardware segmentation offload (TSO)
*
**********************************************************************/
-static boolean_t
-igb_tso_setup(struct tx_ring *txr, struct mbuf *mp, u32 *hdrlen)
+static bool
+igb_tso_setup(struct tx_ring *txr, struct mbuf *mp, int ehdrlen,
+ struct ip *ip, struct tcphdr *th)
{
struct adapter *adapter = txr->adapter;
struct e1000_adv_tx_context_desc *TXD;
@@ -3432,45 +3498,15 @@ igb_tso_setup(struct tx_ring *txr, struct mbuf *mp, u32 *hdrlen)
u32 vlan_macip_lens = 0, type_tucmd_mlhl = 0;
u32 mss_l4len_idx = 0;
u16 vtag = 0;
- int ctxd, ehdrlen, ip_hlen, tcp_hlen;
- struct ether_vlan_header *eh;
- struct ip *ip;
- struct tcphdr *th;
+ int ctxd, ip_hlen, tcp_hlen;
-
- /*
- * Determine where frame payload starts.
- * Jump over vlan headers if already present
- */
- eh = mtod(mp, struct ether_vlan_header *);
- if (eh->evl_encap_proto == htons(ETHERTYPE_VLAN))
- ehdrlen = ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN;
- else
- ehdrlen = ETHER_HDR_LEN;
-
- /* Ensure we have at least the IP+TCP header in the first mbuf. */
- if (mp->m_len < ehdrlen + sizeof(struct ip) + sizeof(struct tcphdr))
- return FALSE;
-
- /* Only supports IPV4 for now */
ctxd = txr->next_avail_desc;
tx_buffer = &txr->tx_buffers[ctxd];
TXD = (struct e1000_adv_tx_context_desc *) &txr->tx_base[ctxd];
- ip = (struct ip *)(mp->m_data + ehdrlen);
- if (ip->ip_p != IPPROTO_TCP)
- return FALSE; /* 0 */
ip->ip_sum = 0;
ip_hlen = ip->ip_hl << 2;
- th = (struct tcphdr *)((caddr_t)ip + ip_hlen);
- th->th_sum = in_pseudo(ip->ip_src.s_addr,
- ip->ip_dst.s_addr, htons(IPPROTO_TCP));
tcp_hlen = th->th_off << 2;
- /*
- * Calculate header length, this is used
- * in the transmit desc in igb_xmit
- */
- *hdrlen = ehdrlen + ip_hlen + tcp_hlen;
/* VLAN MACLEN IPLEN */
if (mp->m_flags & M_VLANTAG) {
@@ -3745,20 +3781,20 @@ igb_txeof(struct tx_ring *txr)
** for too long indicates a hang.
*/
if ((!processed) && ((ticks - txr->watchdog_time) > IGB_WATCHDOG))
- txr->queue_status = IGB_QUEUE_HUNG;
-
+ txr->queue_status |= IGB_QUEUE_HUNG;
/*
- * If we have a minimum free, clear IFF_DRV_OACTIVE
- * to tell the stack that it is OK to send packets.
+ * If we have a minimum free,
+ * clear depleted state bit
*/
- if (txr->tx_avail > IGB_TX_CLEANUP_THRESHOLD) {
- ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
- /* All clean, turn off the watchdog */
- if (txr->tx_avail == adapter->num_tx_desc) {
- txr->queue_status = IGB_QUEUE_IDLE;
- return (FALSE);
- }
+ if (txr->tx_avail >= IGB_QUEUE_THRESHOLD)
+ txr->queue_status &= ~IGB_QUEUE_DEPLETED;
+
+ /* All clean, turn off the watchdog */
+ if (txr->tx_avail == adapter->num_tx_desc) {
+ txr->queue_status = IGB_QUEUE_IDLE;
+ return (FALSE);
}
+
return (TRUE);
}
@@ -4025,15 +4061,15 @@ igb_setup_receive_ring(struct rx_ring *rxr)
if (slot) {
/* slot sj is mapped to the i-th NIC-ring entry */
int sj = j + na->rx_rings[rxr->me].nkr_hwofs;
+ uint64_t paddr;
void *addr;
if (sj < 0)
sj += na->num_rx_desc;
- addr = NMB(slot + sj);
- netmap_load_map(rxr->ptag,
- rxbuf->pmap, addr, na->buff_size);
+ addr = PNMB(slot + sj, &paddr);
+ netmap_load_map(rxr->ptag, rxbuf->pmap, addr);
/* Update descriptor */
- rxr->rx_base[j].read.pkt_addr = htole64(vtophys(addr));
+ rxr->rx_base[j].read.pkt_addr = htole64(paddr);
continue;
}
#endif /* DEV_NETMAP */
@@ -4858,8 +4894,8 @@ igb_setup_vlan_hw_support(struct adapter *adapter)
e1000_vfta_set_vf(hw,
adapter->shadow_vfta[i], TRUE);
else
- E1000_WRITE_REG_ARRAY(hw, E1000_VFTA,
- i, adapter->shadow_vfta[i]);
+ e1000_write_vfta(hw,
+ i, adapter->shadow_vfta[i]);
}
}
@@ -5725,23 +5761,26 @@ igb_set_sysctl_value(struct adapter *adapter, const char *name,
static int
igb_set_flowcntl(SYSCTL_HANDLER_ARGS)
{
- int error;
- struct adapter *adapter = (struct adapter *) arg1;
+ int error;
+ static int input = 3; /* default is full */
+ struct adapter *adapter = (struct adapter *) arg1;
- error = sysctl_handle_int(oidp, &adapter->fc, 0, req);
+ error = sysctl_handle_int(oidp, &input, 0, req);
if ((error) || (req->newptr == NULL))
return (error);
- switch (adapter->fc) {
+ switch (input) {
case e1000_fc_rx_pause:
case e1000_fc_tx_pause:
case e1000_fc_full:
- adapter->hw.fc.requested_mode = adapter->fc;
- break;
case e1000_fc_none:
+ adapter->hw.fc.requested_mode = input;
+ adapter->fc = input;
+ break;
default:
- adapter->hw.fc.requested_mode = e1000_fc_none;
+ /* Do nothing */
+ return (error);
}
adapter->hw.fc.current_mode = adapter->hw.fc.requested_mode;
diff --git a/sys/dev/e1000/if_igb.h b/sys/dev/e1000/if_igb.h
index 80abf6e..9989206 100644
--- a/sys/dev/e1000/if_igb.h
+++ b/sys/dev/e1000/if_igb.h
@@ -188,9 +188,13 @@
#define IGB_TX_BUFFER_SIZE ((uint32_t) 1514)
#define IGB_FC_PAUSE_TIME 0x0680
#define IGB_EEPROM_APME 0x400;
-#define IGB_QUEUE_IDLE 0
-#define IGB_QUEUE_WORKING 1
-#define IGB_QUEUE_HUNG 2
+/* Queue minimum free for use */
+#define IGB_QUEUE_THRESHOLD (adapter->num_tx_desc / 8)
+/* Queue bit defines */
+#define IGB_QUEUE_IDLE 1
+#define IGB_QUEUE_WORKING 2
+#define IGB_QUEUE_HUNG 4
+#define IGB_QUEUE_DEPLETED 8
/*
* TDBA/RDBA should be aligned on 16 byte boundary. But TDLEN/RDLEN should be
@@ -297,7 +301,6 @@ struct tx_ring {
struct buf_ring *br;
#endif
bus_dma_tag_t txtag;
- struct task txq_task;
u32 bytes;
u32 packets;
diff --git a/sys/dev/e1000/if_lem.c b/sys/dev/e1000/if_lem.c
index 9b34a2d..0774cb9 100644
--- a/sys/dev/e1000/if_lem.c
+++ b/sys/dev/e1000/if_lem.c
@@ -1,6 +1,6 @@
/******************************************************************************
- Copyright (c) 2001-2010, Intel Corporation
+ Copyright (c) 2001-2011, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -35,6 +35,7 @@
#ifdef HAVE_KERNEL_OPTION_HEADERS
#include "opt_device_polling.h"
#include "opt_inet.h"
+#include "opt_inet6.h"
#endif
#include <sys/param.h>
@@ -84,7 +85,7 @@
/*********************************************************************
* Legacy Em Driver version:
*********************************************************************/
-char lem_driver_version[] = "1.0.3";
+char lem_driver_version[] = "1.0.4";
/*********************************************************************
* PCI Device ID Table
@@ -390,6 +391,11 @@ lem_attach(device_t dev)
INIT_DEBUGOUT("lem_attach: begin");
+ if (resource_disabled("lem", device_get_unit(dev))) {
+ device_printf(dev, "Disabled by device hint\n");
+ return (ENXIO);
+ }
+
adapter = device_get_softc(dev);
adapter->dev = adapter->osdep.dev = dev;
EM_CORE_LOCK_INIT(adapter, device_get_nameunit(dev));
@@ -453,7 +459,7 @@ lem_attach(device_t dev)
/* Sysctl for setting the interface flow control */
lem_set_flow_cntrl(adapter, "flow_control",
- "max number of rx packets to process",
+ "flow control setting",
&adapter->fc_setting, lem_fc_setting);
/*
@@ -890,11 +896,12 @@ static int
lem_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
{
struct adapter *adapter = ifp->if_softc;
- struct ifreq *ifr = (struct ifreq *)data;
-#ifdef INET
- struct ifaddr *ifa = (struct ifaddr *)data;
+ struct ifreq *ifr = (struct ifreq *)data;
+#if defined(INET) || defined(INET6)
+ struct ifaddr *ifa = (struct ifaddr *)data;
#endif
- int error = 0;
+ bool avoid_reset = FALSE;
+ int error = 0;
if (adapter->in_detach)
return (error);
@@ -902,23 +909,26 @@ lem_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
switch (command) {
case SIOCSIFADDR:
#ifdef INET
- if (ifa->ifa_addr->sa_family == AF_INET) {
- /*
- * XXX
- * Since resetting hardware takes a very long time
- * and results in link renegotiation we only
- * initialize the hardware only when it is absolutely
- * required.
- */
+ if (ifa->ifa_addr->sa_family == AF_INET)
+ avoid_reset = TRUE;
+#endif
+#ifdef INET6
+ if (ifa->ifa_addr->sa_family == AF_INET6)
+ avoid_reset = TRUE;
+#endif
+ /*
+ ** Calling init results in link renegotiation,
+ ** so we avoid doing it when possible.
+ */
+ if (avoid_reset) {
ifp->if_flags |= IFF_UP;
- if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) {
- EM_CORE_LOCK(adapter);
- lem_init_locked(adapter);
- EM_CORE_UNLOCK(adapter);
- }
- arp_ifinit(ifp, ifa);
- } else
+ if (!(ifp->if_drv_flags & IFF_DRV_RUNNING))
+ lem_init(adapter);
+#ifdef INET
+ if (!(ifp->if_flags & IFF_NOARP))
+ arp_ifinit(ifp, ifa);
#endif
+ } else
error = ether_ioctl(ifp, command, data);
break;
case SIOCSIFMTU:
@@ -1217,9 +1227,6 @@ lem_init_locked(struct adapter *adapter)
/* AMT based hardware can now take control from firmware */
if (adapter->has_manage && adapter->has_amt)
lem_get_hw_control(adapter);
-
- /* Don't reset the phy next time init gets called */
- adapter->hw.phy.reset_disable = TRUE;
}
static void
@@ -1518,11 +1525,6 @@ lem_media_change(struct ifnet *ifp)
device_printf(adapter->dev, "Unsupported media type\n");
}
- /* As the speed/duplex settings my have changed we need to
- * reset the PHY.
- */
- adapter->hw.phy.reset_disable = FALSE;
-
lem_init_locked(adapter);
EM_CORE_UNLOCK(adapter);
@@ -2352,7 +2354,6 @@ lem_setup_interface(device_t dev, struct adapter *adapter)
return (-1);
}
if_initname(ifp, device_get_name(dev), device_get_unit(dev));
- ifp->if_mtu = ETHERMTU;
ifp->if_init = lem_init;
ifp->if_softc = adapter;
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
@@ -2669,16 +2670,15 @@ lem_setup_transmit_structures(struct adapter *adapter)
if (slot) {
/* slot si is mapped to the i-th NIC-ring entry */
int si = i + na->tx_rings[0].nkr_hwofs;
+ uint64_t paddr;
void *addr;
if (si > na->num_tx_desc)
si -= na->num_tx_desc;
- addr = NMB(slot + si);
- adapter->tx_desc_base[si].buffer_addr =
- htole64(vtophys(addr));
+ addr = PNMB(slot + si, &paddr);
+ adapter->tx_desc_base[si].buffer_addr = htole64(paddr);
/* reload the map for netmap mode */
- netmap_load_map(adapter->txtag,
- tx_buffer->map, addr, na->buff_size);
+ netmap_load_map(adapter->txtag, tx_buffer->map, addr);
}
#endif /* DEV_NETMAP */
tx_buffer->next_eop = -1;
@@ -3246,16 +3246,15 @@ lem_setup_receive_structures(struct adapter *adapter)
if (slot) {
/* slot si is mapped to the i-th NIC-ring entry */
int si = i + na->rx_rings[0].nkr_hwofs;
+ uint64_t paddr;
void *addr;
if (si > na->num_rx_desc)
si -= na->num_rx_desc;
- addr = NMB(slot + si);
- netmap_load_map(adapter->rxtag,
- rx_buffer->map, addr, na->buff_size);
+ addr = PNMB(slot + si, &paddr);
+ netmap_load_map(adapter->rxtag, rx_buffer->map, addr);
/* Update descriptor */
- adapter->rx_desc_base[i].buffer_addr =
- htole64(vtophys(addr));
+ adapter->rx_desc_base[i].buffer_addr = htole64(paddr);
continue;
}
#endif /* DEV_NETMAP */
@@ -3589,8 +3588,7 @@ lem_rxeof(struct adapter *adapter, int count, int *done)
#endif
if (status & E1000_RXD_STAT_VP) {
adapter->fmp->m_pkthdr.ether_vtag =
- (le16toh(current_desc->special) &
- E1000_RXD_SPC_VLAN_MASK);
+ le16toh(current_desc->special);
adapter->fmp->m_flags |= M_VLANTAG;
}
#ifndef __NO_STRICT_ALIGNMENT
diff --git a/sys/dev/e1000/if_lem.h b/sys/dev/e1000/if_lem.h
index 46ebad1..c1973e5 100644
--- a/sys/dev/e1000/if_lem.h
+++ b/sys/dev/e1000/if_lem.h
@@ -1,6 +1,6 @@
/******************************************************************************
- Copyright (c) 2001-2010, Intel Corporation
+ Copyright (c) 2001-2011, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -217,7 +217,7 @@
#define EM_BAR_MEM_TYPE_64BIT 0x00000004
#define EM_MSIX_BAR 3 /* On 82575 */
-#if !defined(SYSCTL_ADD_UQUAD)
+#if __FreeBSD_version < 900000
#define SYSCTL_ADD_UQUAD SYSCTL_ADD_QUAD
#endif
diff --git a/sys/dev/ep/if_ep.c b/sys/dev/ep/if_ep.c
index 2436255..7be1f80 100644
--- a/sys/dev/ep/if_ep.c
+++ b/sys/dev/ep/if_ep.c
@@ -301,7 +301,6 @@ ep_attach(struct ep_softc *sc)
ifp->if_softc = sc;
if_initname(ifp, device_get_name(sc->dev), device_get_unit(sc->dev));
- ifp->if_mtu = ETHERMTU;
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
ifp->if_start = epstart;
ifp->if_ioctl = epioctl;
diff --git a/sys/dev/esp/ncr53c9x.c b/sys/dev/esp/ncr53c9x.c
index b9d4990..93ad337 100644
--- a/sys/dev/esp/ncr53c9x.c
+++ b/sys/dev/esp/ncr53c9x.c
@@ -316,7 +316,7 @@ ncr53c9x_attach(struct ncr53c9x_softc *sc)
* The recommended timeout is 250ms. This register is loaded
* with a value calculated as follows, from the docs:
*
- * (timout period) x (CLK frequency)
+ * (timeout period) x (CLK frequency)
* reg = -------------------------------------
* 8192 x (Clock Conversion Factor)
*
diff --git a/sys/dev/et/if_et.c b/sys/dev/et/if_et.c
index 426ae88..bde680e 100644
--- a/sys/dev/et/if_et.c
+++ b/sys/dev/et/if_et.c
@@ -363,8 +363,9 @@ fail:
static int
et_detach(device_t dev)
{
- struct et_softc *sc = device_get_softc(dev);
+ struct et_softc *sc;
+ sc = device_get_softc(dev);
if (device_is_attached(dev)) {
ether_ifdetach(sc->ifp);
ET_LOCK(sc);
@@ -401,8 +402,9 @@ et_detach(device_t dev)
static int
et_shutdown(device_t dev)
{
- struct et_softc *sc = device_get_softc(dev);
+ struct et_softc *sc;
+ sc = device_get_softc(dev);
ET_LOCK(sc);
et_stop(sc);
ET_UNLOCK(sc);
@@ -412,10 +414,11 @@ et_shutdown(device_t dev)
static int
et_miibus_readreg(device_t dev, int phy, int reg)
{
- struct et_softc *sc = device_get_softc(dev);
+ struct et_softc *sc;
uint32_t val;
int i, ret;
+ sc = device_get_softc(dev);
/* Stop any pending operations */
CSR_WRITE_4(sc, ET_MII_CMD, 0);
@@ -455,10 +458,11 @@ back:
static int
et_miibus_writereg(device_t dev, int phy, int reg, int val0)
{
- struct et_softc *sc = device_get_softc(dev);
+ struct et_softc *sc;
uint32_t val;
int i;
+ sc = device_get_softc(dev);
/* Stop any pending operations */
CSR_WRITE_4(sc, ET_MII_CMD, 0);
@@ -593,10 +597,12 @@ et_miibus_statchg(device_t dev)
static int
et_ifmedia_upd_locked(struct ifnet *ifp)
{
- struct et_softc *sc = ifp->if_softc;
- struct mii_data *mii = device_get_softc(sc->sc_miibus);
+ struct et_softc *sc;
+ struct mii_data *mii;
struct mii_softc *miisc;
+ sc = ifp->if_softc;
+ mii = device_get_softc(sc->sc_miibus);
LIST_FOREACH(miisc, &mii->mii_phys, mii_list)
PHY_RESET(miisc);
return (mii_mediachg(mii));
@@ -605,9 +611,10 @@ et_ifmedia_upd_locked(struct ifnet *ifp)
static int
et_ifmedia_upd(struct ifnet *ifp)
{
- struct et_softc *sc = ifp->if_softc;
+ struct et_softc *sc;
int res;
+ sc = ifp->if_softc;
ET_LOCK(sc);
res = et_ifmedia_upd_locked(ifp);
ET_UNLOCK(sc);
@@ -638,10 +645,11 @@ et_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr)
static void
et_stop(struct et_softc *sc)
{
- struct ifnet *ifp = sc->ifp;
+ struct ifnet *ifp;
ET_LOCK_ASSERT(sc);
+ ifp = sc->ifp;
callout_stop(&sc->sc_tick);
/* Disable interrupts. */
CSR_WRITE_4(sc, ET_INTR_MASK, 0xffffffff);
@@ -757,6 +765,7 @@ et_get_eaddr(device_t dev, uint8_t eaddr[])
static void
et_reset(struct et_softc *sc)
{
+
CSR_WRITE_4(sc, ET_MAC_CFG1,
ET_MAC_CFG1_RST_TXFUNC | ET_MAC_CFG1_RST_RXFUNC |
ET_MAC_CFG1_RST_TXMC | ET_MAC_CFG1_RST_RXMC |
@@ -1163,10 +1172,11 @@ et_chip_attach(struct et_softc *sc)
static void
et_intr(void *xsc)
{
- struct et_softc *sc = xsc;
+ struct et_softc *sc;
struct ifnet *ifp;
uint32_t status;
+ sc = xsc;
ET_LOCK(sc);
ifp = sc->ifp;
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
@@ -1268,10 +1278,14 @@ et_init(void *xsc)
static int
et_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
{
- struct et_softc *sc = ifp->if_softc;
- struct mii_data *mii = device_get_softc(sc->sc_miibus);
- struct ifreq *ifr = (struct ifreq *)data;
- int error = 0, mask, max_framelen;
+ struct et_softc *sc;
+ struct mii_data *mii;
+ struct ifreq *ifr;
+ int error, mask, max_framelen;
+
+ sc = ifp->if_softc;
+ ifr = (struct ifreq *)data;
+ error = 0;
/* XXX LOCKSUSED */
switch (cmd) {
@@ -1295,6 +1309,7 @@ et_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
case SIOCSIFMEDIA:
case SIOCGIFMEDIA:
+ mii = device_get_softc(sc->sc_miibus);
error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, cmd);
break;
@@ -1424,8 +1439,9 @@ et_start_locked(struct ifnet *ifp)
static void
et_start(struct ifnet *ifp)
{
- struct et_softc *sc = ifp->if_softc;
+ struct et_softc *sc;
+ sc = ifp->if_softc;
ET_LOCK(sc);
et_start_locked(ifp);
ET_UNLOCK(sc);
@@ -1456,6 +1472,7 @@ et_watchdog(struct et_softc *sc)
static int
et_stop_rxdma(struct et_softc *sc)
{
+
CSR_WRITE_4(sc, ET_RXDMA_CTRL,
ET_RXDMA_CTRL_HALT | ET_RXDMA_CTRL_RING1_ENABLE);
@@ -1470,6 +1487,7 @@ et_stop_rxdma(struct et_softc *sc)
static int
et_stop_txdma(struct et_softc *sc)
{
+
CSR_WRITE_4(sc, ET_TXDMA_CTRL,
ET_TXDMA_CTRL_HALT | ET_TXDMA_CTRL_SINGLE_EPKT);
return (0);
@@ -1598,10 +1616,11 @@ back:
static int
et_chip_init(struct et_softc *sc)
{
- struct ifnet *ifp = sc->ifp;
+ struct ifnet *ifp;
uint32_t rxq_end;
int error, frame_len, rxmem_size;
+ ifp = sc->ifp;
/*
* Split 16Kbytes internal memory between TX and RX
* according to frame length.
@@ -1716,8 +1735,8 @@ et_init_rx_ring(struct et_softc *sc)
static int
et_init_rxdma(struct et_softc *sc)
{
- struct et_rxstatus_data *rxsd = &sc->sc_rx_status;
- struct et_rxstat_ring *rxst_ring = &sc->sc_rxstat_ring;
+ struct et_rxstatus_data *rxsd;
+ struct et_rxstat_ring *rxst_ring;
struct et_rxdesc_ring *rx_ring;
int error;
@@ -1730,12 +1749,14 @@ et_init_rxdma(struct et_softc *sc)
/*
* Install RX status
*/
+ rxsd = &sc->sc_rx_status;
CSR_WRITE_4(sc, ET_RX_STATUS_HI, ET_ADDR_HI(rxsd->rxsd_paddr));
CSR_WRITE_4(sc, ET_RX_STATUS_LO, ET_ADDR_LO(rxsd->rxsd_paddr));
/*
* Install RX stat ring
*/
+ rxst_ring = &sc->sc_rxstat_ring;
CSR_WRITE_4(sc, ET_RXSTAT_HI, ET_ADDR_HI(rxst_ring->rsr_paddr));
CSR_WRITE_4(sc, ET_RXSTAT_LO, ET_ADDR_LO(rxst_ring->rsr_paddr));
CSR_WRITE_4(sc, ET_RXSTAT_CNT, ET_RX_NSTAT - 1);
@@ -1786,8 +1807,8 @@ et_init_rxdma(struct et_softc *sc)
static int
et_init_txdma(struct et_softc *sc)
{
- struct et_txdesc_ring *tx_ring = &sc->sc_tx_ring;
- struct et_txstatus_data *txsd = &sc->sc_tx_status;
+ struct et_txdesc_ring *tx_ring;
+ struct et_txstatus_data *txsd;
int error;
error = et_stop_txdma(sc);
@@ -1799,6 +1820,7 @@ et_init_txdma(struct et_softc *sc)
/*
* Install TX descriptor ring
*/
+ tx_ring = &sc->sc_tx_ring;
CSR_WRITE_4(sc, ET_TX_RING_HI, ET_ADDR_HI(tx_ring->tr_paddr));
CSR_WRITE_4(sc, ET_TX_RING_LO, ET_ADDR_LO(tx_ring->tr_paddr));
CSR_WRITE_4(sc, ET_TX_RING_CNT, ET_TX_NDESC - 1);
@@ -1806,6 +1828,7 @@ et_init_txdma(struct et_softc *sc)
/*
* Install TX status
*/
+ txsd = &sc->sc_tx_status;
CSR_WRITE_4(sc, ET_TX_STATUS_HI, ET_ADDR_HI(txsd->txsd_paddr));
CSR_WRITE_4(sc, ET_TX_STATUS_LO, ET_ADDR_LO(txsd->txsd_paddr));
@@ -1821,8 +1844,8 @@ et_init_txdma(struct et_softc *sc)
static void
et_init_mac(struct et_softc *sc)
{
- struct ifnet *ifp = sc->ifp;
- const uint8_t *eaddr = IF_LLADDR(ifp);
+ struct ifnet *ifp;
+ const uint8_t *eaddr;
uint32_t val;
/* Reset MAC */
@@ -1858,6 +1881,8 @@ et_init_mac(struct et_softc *sc)
/*
* Set MAC address
*/
+ ifp = sc->ifp;
+ eaddr = IF_LLADDR(ifp);
val = eaddr[2] | (eaddr[3] << 8) | (eaddr[4] << 16) | (eaddr[5] << 24);
CSR_WRITE_4(sc, ET_MAC_ADDR1, val);
val = (eaddr[0] << 16) | (eaddr[1] << 24);
@@ -1873,8 +1898,8 @@ et_init_mac(struct et_softc *sc)
static void
et_init_rxmac(struct et_softc *sc)
{
- struct ifnet *ifp = sc->ifp;
- const uint8_t *eaddr = IF_LLADDR(ifp);
+ struct ifnet *ifp;
+ const uint8_t *eaddr;
uint32_t val;
int i;
@@ -1892,6 +1917,8 @@ et_init_rxmac(struct et_softc *sc)
/*
* Set WOL source address. XXX is this necessary?
*/
+ ifp = sc->ifp;
+ eaddr = IF_LLADDR(ifp);
val = (eaddr[2] << 24) | (eaddr[3] << 16) | (eaddr[4] << 8) | eaddr[5];
CSR_WRITE_4(sc, ET_WOL_SA_LO, val);
val = (eaddr[0] << 8) | eaddr[1];
@@ -1958,6 +1985,7 @@ et_init_rxmac(struct et_softc *sc)
static void
et_init_txmac(struct et_softc *sc)
{
+
/* Disable TX MAC and FC(?) */
CSR_WRITE_4(sc, ET_TXMAC_CTRL, ET_TXMAC_CTRL_FC_DISABLE);
@@ -1976,12 +2004,12 @@ et_init_txmac(struct et_softc *sc)
static int
et_start_rxdma(struct et_softc *sc)
{
- uint32_t val = 0;
+ uint32_t val;
- val |= (sc->sc_rx_data[0].rbd_bufsize & ET_RXDMA_CTRL_RING0_SIZE_MASK) |
- ET_RXDMA_CTRL_RING0_ENABLE;
+ val = (sc->sc_rx_data[0].rbd_bufsize & ET_RXDMA_CTRL_RING0_SIZE_MASK) |
+ ET_RXDMA_CTRL_RING0_ENABLE;
val |= (sc->sc_rx_data[1].rbd_bufsize & ET_RXDMA_CTRL_RING1_SIZE_MASK) |
- ET_RXDMA_CTRL_RING1_ENABLE;
+ ET_RXDMA_CTRL_RING1_ENABLE;
CSR_WRITE_4(sc, ET_RXDMA_CTRL, val);
@@ -1997,6 +2025,7 @@ et_start_rxdma(struct et_softc *sc)
static int
et_start_txdma(struct et_softc *sc)
{
+
CSR_WRITE_4(sc, ET_TXDMA_CTRL, ET_TXDMA_CTRL_SINGLE_EPKT);
return (0);
}
@@ -2274,10 +2303,11 @@ et_txeof(struct et_softc *sc)
static void
et_tick(void *xsc)
{
- struct et_softc *sc = xsc;
+ struct et_softc *sc;
struct ifnet *ifp;
struct mii_data *mii;
+ sc = xsc;
ET_LOCK_ASSERT(sc);
ifp = sc->ifp;
mii = device_get_softc(sc->sc_miibus);
@@ -2539,10 +2569,12 @@ et_add_sysctls(struct et_softc * sc)
static int
et_sysctl_rx_intr_npkts(SYSCTL_HANDLER_ARGS)
{
- struct et_softc *sc = arg1;
- struct ifnet *ifp = sc->ifp;
- int error = 0, v;
+ struct et_softc *sc;
+ struct ifnet *ifp;
+ int error, v;
+ sc = arg1;
+ ifp = sc->ifp;
v = sc->sc_rx_intr_npkts;
error = sysctl_handle_int(oidp, &v, 0, req);
if (error || req->newptr == NULL)
@@ -2564,10 +2596,12 @@ back:
static int
et_sysctl_rx_intr_delay(SYSCTL_HANDLER_ARGS)
{
- struct et_softc *sc = arg1;
- struct ifnet *ifp = sc->ifp;
- int error = 0, v;
+ struct et_softc *sc;
+ struct ifnet *ifp;
+ int error, v;
+ sc = arg1;
+ ifp = sc->ifp;
v = sc->sc_rx_intr_delay;
error = sysctl_handle_int(oidp, &v, 0, req);
if (error || req->newptr == NULL)
diff --git a/sys/dev/et/if_etvar.h b/sys/dev/et/if_etvar.h
index 241c7af..e2e30ea 100644
--- a/sys/dev/et/if_etvar.h
+++ b/sys/dev/et/if_etvar.h
@@ -290,7 +290,6 @@ struct et_softc {
struct resource *sc_irq_res;
struct resource *sc_mem_res;
- struct arpcom arpcom;
int sc_if_flags;
uint32_t sc_flags; /* ET_FLAG_ */
int sc_expcap;
diff --git a/sys/dev/ex/if_ex.c b/sys/dev/ex/if_ex.c
index efd54bc..1034dacd 100644
--- a/sys/dev/ex/if_ex.c
+++ b/sys/dev/ex/if_ex.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1996, Javier Martín Rueda (jmrueda@diatel.upm.es)
+ * Copyright (c) 1996, Javier Martín Rueda (jmrueda@diatel.upm.es)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -232,7 +232,6 @@ ex_attach(device_t dev)
*/
ifp->if_softc = sc;
if_initname(ifp, device_get_name(dev), device_get_unit(dev));
- ifp->if_mtu = ETHERMTU;
ifp->if_flags = IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST;
ifp->if_start = ex_start;
ifp->if_ioctl = ex_ioctl;
diff --git a/sys/dev/ex/if_exreg.h b/sys/dev/ex/if_exreg.h
index 157eda3..8b86f36 100644
--- a/sys/dev/ex/if_exreg.h
+++ b/sys/dev/ex/if_exreg.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1996, Javier Martín Rueda (jmrueda@diatel.upm.es)
+ * Copyright (c) 1996, Javier Martín Rueda (jmrueda@diatel.upm.es)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/fb/boot_font.c b/sys/dev/fb/boot_font.c
index b1cc5f0..15da4ca 100644
--- a/sys/dev/fb/boot_font.c
+++ b/sys/dev/fb/boot_font.c
@@ -34,8 +34,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
/*-
- * This font lives in the public domain. It is a PC font, IBM encoding,
- * which was designed for use with syscons.
+ * This font lives in the public domain. It is a PC font, IBM encoding
+ * (CP437), which was designed for use with syscons.
*
* Copyright (c) 2000 Andrew Miklic
*/
@@ -2931,7 +2931,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /*   */
+ /* á */
0x00, /* ........ */
0x06, /* .....**. */
0x0c, /* ....**.. */
@@ -2949,7 +2949,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* ¡ */
+ /* í */
0x00, /* ........ */
0x06, /* .....**. */
0x0c, /* ....**.. */
@@ -2967,7 +2967,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* ¢ */
+ /* ó */
0x00, /* ........ */
0x06, /* .....**. */
0x0c, /* ....**.. */
@@ -2985,7 +2985,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* £ */
+ /* ú */
0x00, /* ........ */
0x0c, /* ....**.. */
0x18, /* ...**... */
@@ -3003,7 +3003,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* ¤ */
+ /* ñ */
0x00, /* ........ */
0x00, /* ........ */
0x76, /* .***.**. */
@@ -3021,7 +3021,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* ¥ */
+ /* Ñ */
0x76, /* .***.**. */
0xdc, /* **.***.. */
0x00, /* ........ */
@@ -3039,7 +3039,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* ¦ */
+ /* ª */
0x00, /* ........ */
0x00, /* ........ */
0x7c, /* .*****.. */
@@ -3057,7 +3057,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* § */
+ /* º */
0x00, /* ........ */
0x00, /* ........ */
0x7c, /* .*****.. */
@@ -3075,7 +3075,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* ¨ */
+ /* ¿ */
0x00, /* ........ */
0x00, /* ........ */
0x18, /* ...**... */
@@ -3093,7 +3093,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* © */
+ /* ⌠*/
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
@@ -3111,7 +3111,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* ª */
+ /* ¬ */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
@@ -3129,7 +3129,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* « */
+ /* ½ */
0x00, /* ........ */
0x18, /* ...**... */
0x38, /* ..***... */
@@ -3147,7 +3147,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* ¬ */
+ /* ¼ */
0x00, /* ........ */
0x18, /* ...**... */
0x38, /* ..***... */
@@ -3165,7 +3165,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* ­ */
+ /* ¡ */
0x00, /* ........ */
0x00, /* ........ */
0x18, /* ...**... */
@@ -3183,7 +3183,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* ® */
+ /* « */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
@@ -3201,7 +3201,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* ¯ */
+ /* » */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
@@ -3219,7 +3219,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* ° */
+ /* â–‘ */
0x82, /* *.....*. */
0x10, /* ...*.... */
0x82, /* *.....*. */
@@ -3237,7 +3237,7 @@ const struct gfb_font bold8x16 = {
0x82, /* *.....*. */
0x10, /* ...*.... */
- /* ± */
+ /* â–’ */
0x00, /* ........ */
0x95, /* *..*.*.* */
0x00, /* ........ */
@@ -3255,7 +3255,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0xa9, /* *.*.*..* */
- /* ² */
+ /* â–“ */
0x92, /* *..*..*. */
0x49, /* .*..*..* */
0x92, /* *..*..*. */
@@ -3273,7 +3273,7 @@ const struct gfb_font bold8x16 = {
0x92, /* *..*..*. */
0x49, /* .*..*..* */
- /* ³ */
+ /* │ */
0x18, /* ...**... */
0x18, /* ...**... */
0x18, /* ...**... */
@@ -3291,7 +3291,7 @@ const struct gfb_font bold8x16 = {
0x18, /* ...**... */
0x18, /* ...**... */
- /* ´ */
+ /* ┤ */
0x18, /* ...**... */
0x18, /* ...**... */
0x18, /* ...**... */
@@ -3309,7 +3309,7 @@ const struct gfb_font bold8x16 = {
0x18, /* ...**... */
0x18, /* ...**... */
- /* µ */
+ /* â•¡ */
0x18, /* ...**... */
0x18, /* ...**... */
0x18, /* ...**... */
@@ -3327,7 +3327,7 @@ const struct gfb_font bold8x16 = {
0x18, /* ...**... */
0x18, /* ...**... */
- /* ¶ */
+ /* â•¢ */
0x3c, /* ..****.. */
0x3c, /* ..****.. */
0x3c, /* ..****.. */
@@ -3345,7 +3345,7 @@ const struct gfb_font bold8x16 = {
0x3c, /* ..****.. */
0x3c, /* ..****.. */
- /* · */
+ /* â•– */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
@@ -3363,7 +3363,7 @@ const struct gfb_font bold8x16 = {
0x3c, /* ..****.. */
0x3c, /* ..****.. */
- /* ¸ */
+ /* â•• */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
@@ -3381,7 +3381,7 @@ const struct gfb_font bold8x16 = {
0x18, /* ...**... */
0x18, /* ...**... */
- /* ¹ */
+ /* â•£ */
0x3c, /* ..****.. */
0x3c, /* ..****.. */
0x3c, /* ..****.. */
@@ -3399,7 +3399,7 @@ const struct gfb_font bold8x16 = {
0x3c, /* ..****.. */
0x3c, /* ..****.. */
- /* º */
+ /* â•‘ */
0x3c, /* ..****.. */
0x3c, /* ..****.. */
0x3c, /* ..****.. */
@@ -3417,7 +3417,7 @@ const struct gfb_font bold8x16 = {
0x3c, /* ..****.. */
0x3c, /* ..****.. */
- /* » */
+ /* â•— */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
@@ -3435,7 +3435,7 @@ const struct gfb_font bold8x16 = {
0x3c, /* ..****.. */
0x3c, /* ..****.. */
- /* ¼ */
+ /* â• */
0x3c, /* ..****.. */
0x3c, /* ..****.. */
0x3c, /* ..****.. */
@@ -3453,7 +3453,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* ½ */
+ /* ╜ */
0x3c, /* ..****.. */
0x3c, /* ..****.. */
0x3c, /* ..****.. */
@@ -3471,7 +3471,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* ¾ */
+ /* â•› */
0x18, /* ...**... */
0x18, /* ...**... */
0x18, /* ...**... */
@@ -3489,7 +3489,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* ¿ */
+ /* â” */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
@@ -3507,7 +3507,7 @@ const struct gfb_font bold8x16 = {
0x18, /* ...**... */
0x18, /* ...**... */
- /* À */
+ /* â”” */
0x18, /* ...**... */
0x18, /* ...**... */
0x18, /* ...**... */
@@ -3525,7 +3525,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* Á */
+ /* â”´ */
0x18, /* ...**... */
0x18, /* ...**... */
0x18, /* ...**... */
@@ -3543,7 +3543,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* Â */
+ /* ┬ */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
@@ -3561,7 +3561,7 @@ const struct gfb_font bold8x16 = {
0x18, /* ...**... */
0x18, /* ...**... */
- /* Ã */
+ /* ├ */
0x18, /* ...**... */
0x18, /* ...**... */
0x18, /* ...**... */
@@ -3579,7 +3579,7 @@ const struct gfb_font bold8x16 = {
0x18, /* ...**... */
0x18, /* ...**... */
- /* Ä */
+ /* ─ */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
@@ -3597,7 +3597,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* Å */
+ /* ┼ */
0x18, /* ...**... */
0x18, /* ...**... */
0x18, /* ...**... */
@@ -3615,7 +3615,7 @@ const struct gfb_font bold8x16 = {
0x18, /* ...**... */
0x18, /* ...**... */
- /* Æ */
+ /* â•ž */
0x18, /* ...**... */
0x18, /* ...**... */
0x18, /* ...**... */
@@ -3633,7 +3633,7 @@ const struct gfb_font bold8x16 = {
0x18, /* ...**... */
0x18, /* ...**... */
- /* Ç */
+ /* â•Ÿ */
0x3c, /* ..****.. */
0x3c, /* ..****.. */
0x3c, /* ..****.. */
@@ -3651,7 +3651,7 @@ const struct gfb_font bold8x16 = {
0x3c, /* ..****.. */
0x3c, /* ..****.. */
- /* È */
+ /* â•š */
0x3c, /* ..****.. */
0x3c, /* ..****.. */
0x3c, /* ..****.. */
@@ -3669,7 +3669,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* É */
+ /* â•” */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
@@ -3687,7 +3687,7 @@ const struct gfb_font bold8x16 = {
0x3c, /* ..****.. */
0x3c, /* ..****.. */
- /* Ê */
+ /* â•© */
0x3c, /* ..****.. */
0x3c, /* ..****.. */
0x3c, /* ..****.. */
@@ -3705,7 +3705,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* Ë */
+ /* ╦ */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
@@ -3723,7 +3723,7 @@ const struct gfb_font bold8x16 = {
0x3c, /* ..****.. */
0x3c, /* ..****.. */
- /* Ì */
+ /* â•  */
0x3c, /* ..****.. */
0x3c, /* ..****.. */
0x3c, /* ..****.. */
@@ -3741,7 +3741,7 @@ const struct gfb_font bold8x16 = {
0x3c, /* ..****.. */
0x3c, /* ..****.. */
- /* Í */
+ /* â• */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
@@ -3759,7 +3759,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* Î */
+ /* ╬ */
0x3c, /* ..****.. */
0x3c, /* ..****.. */
0x3c, /* ..****.. */
@@ -3777,7 +3777,7 @@ const struct gfb_font bold8x16 = {
0x3c, /* ..****.. */
0x3c, /* ..****.. */
- /* Ï */
+ /* ╧ */
0x18, /* ...**... */
0x18, /* ...**... */
0x18, /* ...**... */
@@ -3795,7 +3795,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* Ð */
+ /* ╨ */
0x3c, /* ..****.. */
0x3c, /* ..****.. */
0x3c, /* ..****.. */
@@ -3813,7 +3813,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* Ñ */
+ /* ╤ */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
@@ -3831,7 +3831,7 @@ const struct gfb_font bold8x16 = {
0x18, /* ...**... */
0x18, /* ...**... */
- /* Ò */
+ /* â•¥ */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
@@ -3849,7 +3849,7 @@ const struct gfb_font bold8x16 = {
0x3c, /* ..****.. */
0x3c, /* ..****.. */
- /* Ó */
+ /* â•™ */
0x3c, /* ..****.. */
0x3c, /* ..****.. */
0x3c, /* ..****.. */
@@ -3867,7 +3867,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* Ô */
+ /* ╘ */
0x18, /* ...**... */
0x18, /* ...**... */
0x18, /* ...**... */
@@ -3885,7 +3885,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* Õ */
+ /* â•’ */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
@@ -3903,7 +3903,7 @@ const struct gfb_font bold8x16 = {
0x18, /* ...**... */
0x18, /* ...**... */
- /* Ö */
+ /* â•“ */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
@@ -3921,7 +3921,7 @@ const struct gfb_font bold8x16 = {
0x3c, /* ..****.. */
0x3c, /* ..****.. */
- /* × */
+ /* â•« */
0x3c, /* ..****.. */
0x3c, /* ..****.. */
0x3c, /* ..****.. */
@@ -3939,7 +3939,7 @@ const struct gfb_font bold8x16 = {
0x3c, /* ..****.. */
0x3c, /* ..****.. */
- /* Ø */
+ /* ╪ */
0x18, /* ...**... */
0x18, /* ...**... */
0x18, /* ...**... */
@@ -3957,7 +3957,7 @@ const struct gfb_font bold8x16 = {
0x18, /* ...**... */
0x18, /* ...**... */
- /* Ù */
+ /* ┘ */
0x18, /* ...**... */
0x18, /* ...**... */
0x18, /* ...**... */
@@ -3975,7 +3975,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* Ú */
+ /* ┌ */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
@@ -3993,7 +3993,7 @@ const struct gfb_font bold8x16 = {
0x18, /* ...**... */
0x18, /* ...**... */
- /* Û */
+ /* â–ˆ */
0xff, /* ******** */
0xff, /* ******** */
0xff, /* ******** */
@@ -4011,7 +4011,7 @@ const struct gfb_font bold8x16 = {
0xff, /* ******** */
0xff, /* ******** */
- /* Ü */
+ /* â–„ */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
@@ -4029,7 +4029,7 @@ const struct gfb_font bold8x16 = {
0xff, /* ******** */
0xff, /* ******** */
- /* Ý */
+ /* ▌ */
0xf0, /* ****.... */
0xf0, /* ****.... */
0xf0, /* ****.... */
@@ -4047,7 +4047,7 @@ const struct gfb_font bold8x16 = {
0xf0, /* ****.... */
0xf0, /* ****.... */
- /* Þ */
+ /* â– */
0x0f, /* ....**** */
0x0f, /* ....**** */
0x0f, /* ....**** */
@@ -4065,7 +4065,7 @@ const struct gfb_font bold8x16 = {
0x0f, /* ....**** */
0x0f, /* ....**** */
- /* ß */
+ /* â–€ */
0xff, /* ******** */
0xff, /* ******** */
0xff, /* ******** */
@@ -4083,7 +4083,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* à */
+ /* α */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
@@ -4101,7 +4101,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* á */
+ /* ß */
0x00, /* ........ */
0x00, /* ........ */
0x7c, /* .*****.. */
@@ -4119,7 +4119,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* â */
+ /* Γ */
0x00, /* ........ */
0x00, /* ........ */
0xfe, /* *******. */
@@ -4137,7 +4137,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* ã */
+ /* π */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
@@ -4155,7 +4155,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* ä */
+ /* Σ */
0x00, /* ........ */
0x00, /* ........ */
0xfe, /* *******. */
@@ -4173,7 +4173,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* å */
+ /* σ */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
@@ -4191,7 +4191,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* æ */
+ /* µ */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
@@ -4209,7 +4209,7 @@ const struct gfb_font bold8x16 = {
0xc0, /* **...... */
0x00, /* ........ */
- /* ç */
+ /* Ï„ */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
@@ -4227,7 +4227,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* è */
+ /* Φ */
0x00, /* ........ */
0x00, /* ........ */
0x18, /* ...**... */
@@ -4245,7 +4245,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* é */
+ /* Θ */
0x00, /* ........ */
0x00, /* ........ */
0x38, /* ..***... */
@@ -4263,7 +4263,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* ê */
+ /* Ω */
0x00, /* ........ */
0x00, /* ........ */
0x3c, /* ..****.. */
@@ -4281,7 +4281,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* ë */
+ /* δ */
0x00, /* ........ */
0x00, /* ........ */
0x1e, /* ...****. */
@@ -4299,7 +4299,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* ì */
+ /* ∞ */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
@@ -4317,7 +4317,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* í */
+ /* φ */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
@@ -4335,7 +4335,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* î */
+ /* ε */
0x00, /* ........ */
0x00, /* ........ */
0x1c, /* ...***.. */
@@ -4353,7 +4353,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* ï */
+ /* ∩ */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
@@ -4371,7 +4371,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* ð */
+ /* ≡ */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
@@ -4389,7 +4389,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* ñ */
+ /* ± */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
@@ -4407,7 +4407,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* ò */
+ /* ≥ */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
@@ -4425,7 +4425,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* ó */
+ /* ≤ */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
@@ -4443,7 +4443,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* ô */
+ /* ⌠ */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
@@ -4461,7 +4461,7 @@ const struct gfb_font bold8x16 = {
0x18, /* ...**... */
0x18, /* ...**... */
- /* õ */
+ /* ⌡ */
0x18, /* ...**... */
0x18, /* ...**... */
0x18, /* ...**... */
@@ -4479,7 +4479,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* ö */
+ /* ÷ */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
@@ -4497,7 +4497,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* ÷ */
+ /* ≈ */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
@@ -4515,7 +4515,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* ø */
+ /* ° */
0x00, /* ........ */
0x00, /* ........ */
0x38, /* ..***... */
@@ -4533,7 +4533,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* ù */
+ /* ∙ */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
@@ -4551,7 +4551,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* ú */
+ /* · */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
@@ -4569,7 +4569,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* û */
+ /* √ */
0x00, /* ........ */
0x00, /* ........ */
0x03, /* ......** */
@@ -4587,7 +4587,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* ü */
+ /* â¿ */
0x00, /* ........ */
0x00, /* ........ */
0xd8, /* **.**... */
@@ -4605,7 +4605,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* ý */
+ /* ² */
0x00, /* ........ */
0x00, /* ........ */
0x78, /* .****... */
@@ -4623,7 +4623,7 @@ const struct gfb_font bold8x16 = {
0x00, /* ........ */
0x00, /* ........ */
- /* þ */
+ /* â–  */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
diff --git a/sys/dev/fb/splash_pcx.c b/sys/dev/fb/splash_pcx.c
index 641b036..5340b2e 100644
--- a/sys/dev/fb/splash_pcx.c
+++ b/sys/dev/fb/splash_pcx.c
@@ -1,7 +1,7 @@
/*-
* Copyright (c) 1999 Michael Smith <msmith@freebsd.org>
* Copyright (c) 1999 Kazutaka YOKOTA <yokota@freebsd.org>
- * Copyright (c) 1999 Dag-Erling Coïdan Smørgrav
+ * Copyright (c) 1999 Dag-Erling Coïdan Smørgrav
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/fb/splash_txt.c b/sys/dev/fb/splash_txt.c
new file mode 100644
index 0000000..7bd9ff9
--- /dev/null
+++ b/sys/dev/fb/splash_txt.c
@@ -0,0 +1,135 @@
+/*-
+ * Copyright (c) 1999 Michael Smith <msmith@freebsd.org>
+ * Copyright (c) 1999 Kazutaka YOKOTA <yokota@freebsd.org>
+ * Copyright (c) 2005 Antony Mawer <antony@mawer.org>
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS 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 AUTHORS 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.
+ *
+ * $FreeBSD$
+ */
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/module.h>
+#include <sys/kernel.h>
+#include <sys/consio.h>
+#include <sys/fbio.h>
+
+#include <machine/pc/display.h>
+
+#include <dev/fb/fbreg.h>
+#include <dev/fb/splashreg.h>
+#include <dev/syscons/syscons.h>
+
+static int splash_on = FALSE;
+
+static int txt_init(video_adapter_t *adp);
+static int txt_end(video_adapter_t *adp);
+static int txt_splash(video_adapter_t * adp, const int on);
+
+/* These are rows by columns of the text-mode display device. */
+#define BIN_IMAGE_WIDTH 80
+#define BIN_IMAGE_HEIGHT 25
+
+static splash_decoder_t txt_decoder = {
+ .name = "splash_txt",
+ .init = txt_init,
+ .term = txt_end,
+ .splash = txt_splash,
+ .data_type = SPLASH_IMAGE,
+};
+
+SPLASH_DECODER(splash_txt, txt_decoder);
+
+static void
+draw_text_splash(sc_softc_t *sc)
+{
+ u_int x, y;
+ u_char ch, attr;
+ u_char *pdata = txt_decoder.data;
+
+ /* Init failed. */
+ if (txt_decoder.data == NULL)
+ return;
+ for (y = 0; y < BIN_IMAGE_HEIGHT; y++) {
+ for (x = 0; x < BIN_IMAGE_WIDTH; x++) {
+ ch = *pdata++;
+ attr = *pdata++;
+ sc_vtb_putc(&sc->cur_scp->scr,
+ (y * sc->cur_scp->xsize) + x,
+ sc->scr_map[ch], (int)attr << 8);
+ }
+ }
+}
+
+static int
+txt_init(video_adapter_t *adp)
+{
+
+ /* Ensure that the image data exists. */
+ if (txt_decoder.data == NULL || txt_decoder.data_size <= 0) {
+ printf("splash_txt: No ASCII bitmap file found\n");
+ return (ENODEV);
+ }
+ return (0);
+}
+
+static int
+txt_end(video_adapter_t *adp)
+{
+
+ return (0);
+}
+
+static int
+txt_splash(video_adapter_t *adp, const int on)
+{
+ sc_softc_t *sc;
+ scr_stat *scp;
+
+ sc = sc_find_softc(adp, NULL);
+ if (sc == NULL)
+ return (EAGAIN);
+ scp = sc->cur_scp;
+ if (on) {
+ if (!splash_on) {
+ if (adp->va_info.vi_flags & V_INFO_GRAPHICS)
+ return EAGAIN;
+ /* Clear screen and set border colour. */
+ sc_vtb_clear(&scp->scr, sc->scr_map[0x20],
+ (FG_LIGHTGREY | BG_BLACK) << 8);
+ (*vidsw[adp->va_index]->set_hw_cursor)(adp, -1, -1);
+ sc_set_border(scp, 0);
+ splash_on = TRUE;
+ /* Display the splash screen. */
+ draw_text_splash(sc);
+ }
+ return (0);
+ } else {
+ /* The video mode will be restored by the caller. */
+ splash_on = FALSE;
+ return (0);
+ }
+}
+
+
diff --git a/sys/dev/fb/vga.c b/sys/dev/fb/vga.c
index 1bcf935..598ea54 100644
--- a/sys/dev/fb/vga.c
+++ b/sys/dev/fb/vga.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 1999 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
- * Copyright (c) 1992-1998 Søren Schmidt
+ * Copyright (c) 1992-1998 Søren Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c
index 00cdcd6..52260c1 100644
--- a/sys/dev/fdc/fdc.c
+++ b/sys/dev/fdc/fdc.c
@@ -314,14 +314,14 @@ fdsettype(struct fd_data *fd, struct fd_type *ft)
/*
* Bus space handling (access to low-level IO).
*/
-__inline static void
+static inline void
fdregwr(struct fdc_data *fdc, int reg, uint8_t v)
{
bus_space_write_1(fdc->iot, fdc->ioh[reg], fdc->ioff[reg], v);
}
-__inline static uint8_t
+static inline uint8_t
fdregrd(struct fdc_data *fdc, int reg)
{
diff --git a/sys/dev/fdt/fdt_pci.c b/sys/dev/fdt/fdt_pci.c
index 14aa270..7f0ddd3 100644
--- a/sys/dev/fdt/fdt_pci.c
+++ b/sys/dev/fdt/fdt_pci.c
@@ -46,9 +46,6 @@ __FBSDID("$FreeBSD$");
#include "ofw_bus_if.h"
#include "pcib_if.h"
-#define DEBUG
-#undef DEBUG
-
#ifdef DEBUG
#define debugf(fmt, args...) do { printf("%s(): ", __func__); \
printf(fmt,##args); } while (0)
diff --git a/sys/dev/fdt/fdtbus.c b/sys/dev/fdt/fdtbus.c
index 50db7cd..577b159 100644
--- a/sys/dev/fdt/fdtbus.c
+++ b/sys/dev/fdt/fdtbus.c
@@ -46,9 +46,6 @@ __FBSDID("$FreeBSD$");
#include "fdt_common.h"
#include "ofw_bus_if.h"
-#define DEBUG
-#undef DEBUG
-
#ifdef DEBUG
#define debugf(fmt, args...) do { printf("%s(): ", __func__); \
printf(fmt,##args); } while (0)
diff --git a/sys/dev/fdt/simplebus.c b/sys/dev/fdt/simplebus.c
index 3fa1dd8..e6887b4 100644
--- a/sys/dev/fdt/simplebus.c
+++ b/sys/dev/fdt/simplebus.c
@@ -49,9 +49,6 @@ __FBSDID("$FreeBSD$");
#include "fdt_common.h"
#include "ofw_bus_if.h"
-#define DEBUG
-#undef DEBUG
-
#ifdef DEBUG
#define debugf(fmt, args...) do { printf("%s(): ", __func__); \
printf(fmt,##args); } while (0)
diff --git a/sys/dev/firewire/if_fwe.c b/sys/dev/firewire/if_fwe.c
index 52a9c8d..fa51026 100644
--- a/sys/dev/firewire/if_fwe.c
+++ b/sys/dev/firewire/if_fwe.c
@@ -214,7 +214,6 @@ fwe_attach(device_t dev)
#endif
ifp->if_start = fwe_start;
ifp->if_ioctl = fwe_ioctl;
- ifp->if_mtu = ETHERMTU;
ifp->if_flags = (IFF_BROADCAST|IFF_SIMPLEX|IFF_MULTICAST);
ifp->if_snd.ifq_maxlen = TX_MAX_QUEUE;
diff --git a/sys/dev/flash/mx25l.c b/sys/dev/flash/mx25l.c
index d5c2270..af098ca 100644
--- a/sys/dev/flash/mx25l.c
+++ b/sys/dev/flash/mx25l.c
@@ -101,7 +101,9 @@ struct mx25l_flash_ident flash_devices[] = {
{ "mx25ll64", 0xc2, 0x2017, 64 * 1024, 128, FL_NONE },
{ "mx25ll128", 0xc2, 0x2018, 64 * 1024, 256, FL_ERASE_4K | FL_ERASE_32K },
{ "s25fl128", 0x01, 0x2018, 64 * 1024, 256, FL_NONE },
+ { "s25s1032", 0x01, 0x0215, 64 * 1024, 64, FL_NONE },
{ "s25sl064a", 0x01, 0x0216, 64 * 1024, 128, FL_NONE },
+ { "w25q64bv", 0xef, 0x4017, 64 * 1024, 128, FL_ERASE_4K },
};
static uint8_t
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c
index 62c8dc2..8a360e7 100644
--- a/sys/dev/fxp/if_fxp.c
+++ b/sys/dev/fxp/if_fxp.c
@@ -1454,7 +1454,7 @@ fxp_encap(struct fxp_softc *sc, struct mbuf **m_head)
return (ENOBUFS);
}
tcp = (struct tcphdr *)(mtod(m, char *) + poff);
- m = m_pullup(m, poff + sizeof(struct tcphdr) + tcp->th_off);
+ m = m_pullup(m, poff + (tcp->th_off << 2));
if (m == NULL) {
*m_head = NULL;
return (ENOBUFS);
@@ -2555,7 +2555,7 @@ fxp_ifmedia_upd(struct ifnet *ifp)
{
struct fxp_softc *sc = ifp->if_softc;
struct mii_data *mii;
- struct mii_softc *miisc;
+ struct mii_softc *miisc;
mii = device_get_softc(sc->miibus);
FXP_LOCK(sc);
diff --git a/sys/dev/gpio/gpioiic.c b/sys/dev/gpio/gpioiic.c
index b5876b5..2a6d093 100644
--- a/sys/dev/gpio/gpioiic.c
+++ b/sys/dev/gpio/gpioiic.c
@@ -55,7 +55,6 @@ struct gpioiic_softc
{
device_t sc_dev;
device_t sc_busdev;
- struct mtx sc_mtx;
struct cdev *sc_leddev;
int scl_pin;
int sda_pin;
@@ -148,7 +147,6 @@ gpioiic_setsda(device_t dev, int val)
{
struct gpioiic_softc *sc = device_get_softc(dev);
- GPIOBUS_LOCK_BUS(sc->sc_busdev);
if (val == 0) {
GPIOBUS_PIN_SET(sc->sc_busdev, sc->sc_dev, sc->sda_pin, 0);
GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, sc->sda_pin,
@@ -157,7 +155,6 @@ gpioiic_setsda(device_t dev, int val)
GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, sc->sda_pin,
GPIO_PIN_INPUT);
}
- GPIOBUS_UNLOCK_BUS(sc->sc_busdev);
}
static void
@@ -165,7 +162,6 @@ gpioiic_setscl(device_t dev, int val)
{
struct gpioiic_softc *sc = device_get_softc(dev);
- GPIOBUS_LOCK_BUS(sc->sc_busdev);
if (val == 0) {
GPIOBUS_PIN_SET(sc->sc_busdev, sc->sc_dev, sc->scl_pin, 0);
GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, sc->scl_pin,
@@ -174,7 +170,6 @@ gpioiic_setscl(device_t dev, int val)
GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, sc->scl_pin,
GPIO_PIN_INPUT);
}
- GPIOBUS_UNLOCK_BUS(sc->sc_busdev);
}
static int
@@ -183,11 +178,9 @@ gpioiic_getscl(device_t dev)
struct gpioiic_softc *sc = device_get_softc(dev);
unsigned int val;
- GPIOBUS_LOCK_BUS(sc->sc_busdev);
GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, sc->scl_pin,
GPIO_PIN_INPUT);
GPIOBUS_PIN_GET(sc->sc_busdev, sc->sc_dev, sc->scl_pin, &val);
- GPIOBUS_UNLOCK_BUS(sc->sc_busdev);
return ((int)val);
}
@@ -198,11 +191,9 @@ gpioiic_getsda(device_t dev)
struct gpioiic_softc *sc = device_get_softc(dev);
unsigned int val;
- GPIOBUS_LOCK_BUS(sc->sc_busdev);
GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, sc->sda_pin,
GPIO_PIN_INPUT);
GPIOBUS_PIN_GET(sc->sc_busdev, sc->sc_dev, sc->sda_pin, &val);
- GPIOBUS_UNLOCK_BUS(sc->sc_busdev);
return ((int)val);
}
diff --git a/sys/dev/hpt27xx/README b/sys/dev/hpt27xx/README
new file mode 100644
index 0000000..f703753
--- /dev/null
+++ b/sys/dev/hpt27xx/README
@@ -0,0 +1,196 @@
+RocketRAID Controller Driver for FreeBSD
+Copyright (C) 2011 HighPoint Technologies, Inc. All rights reserved.
+
+#############################################################################
+Revision History:
+ v1.0 2011-12-27
+ First source code release
+
+#############################################################################
+
+1. Overview
+---------------------
+ This package contains FreeBSD driver source code for HighPoint RocketRAID
+ controller, include:
+ SAS Controller: RR271x, RR272x, RR274x, RR276x, RR278x.
+
+ NO WARRANTY
+
+ THE DRIVER SOURCE CODE HIGHPOINT PROVIDED IS FREE OF CHARGE, AND THERE IS
+ NO WARRANTY FOR THE PROGRAM. THERE ARE NO RESTRICTIONS ON THE USE OF THIS
+ FREE SOURCE CODE. HIGHPOINT DOES NOT PROVIDE ANY TECHNICAL SUPPORT IF THE
+ CODE HAS BEEN CHANGED FROM ORIGINAL SOURCE CODE.
+
+ LIMITATION OF LIABILITY
+
+ IN NO EVENT WILL HIGHPOINT BE LIABLE FOR DIRECT, INDIRECT, SPECIAL,
+ INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF OR
+ INABILITY TO USE THIS PRODUCT OR DOCUMENTATION, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGES. IN PARTICULAR, HIGHPOINT SHALL NOT HAVE
+ LIABILITY FOR ANY HARDWARE, SOFTWARE, OR DATA STORED USED WITH THE
+ PRODUCT, INCLUDING THE COSTS OF REPAIRING, REPLACING, OR RECOVERING
+ SUCH HARDWARE, OR DATA.
+
+
+2. Rebuild the kernel with HighPoint RocketRAID support
+-----------------------------------------------
+
+ 1) Install kernel source package and building tools.
+
+ 2) Extract the driver files under the kernel source tree:
+
+ # cd /usr/src/sys/
+ # tar xvzf /your/path/to/hpt27xx-freebsd-src-v1.0-111227.tgz
+
+ 3) Update the kernel configuration file to include the HighPoint source.
+ Assume the configure file is GENERIC, and new kernel configure file is
+ MYKERNEL:
+
+ # cd i386/conf (or amd64/conf for AMD64)
+ # cp GENERIC MYKERNEL
+
+ 4) Edit MYKERNEL, and add the following line under "RAID controllers
+ interfaced to the SCSI subsystem":
+
+ device "hpt27xx" #HighPoint RocketRAID
+
+ 5) For i386 system, edit /usr/src/sys/conf/files.i386 and append the lines
+ shown below:
+
+ hpt27xx_lib.o optional hpt27xx \
+ dependency "$S/dev/hpt27xx/i386-elf.hpt27xx_lib.o.uu" \
+ compile-with "uudecode < $S/dev/hpt27xx/i386-elf.hpt27xx_lib.o.uu" \
+ no-implicit-rule
+
+ dev/hpt27xx/os_bsd.c optional hpt27xx
+ dev/hpt27xx/osm_bsd.c optional hpt27xx
+ dev/hpt27xx/hpt27xx_config.c optional hpt27xx
+
+ For amd64 system, edit /usr/src/sys/conf/files.amd64 and append the lines
+ shown below:
+
+ hpt27xx_lib.o optional hpt27xx \
+ dependency "$S/dev/hpt27xx/amd64-elf.hpt27xx_lib.o.uu" \
+ compile-with "uudecode < $S/dev/hpt27xx/amd64-elf.hpt27xx_lib.o.uu" \
+ no-implicit-rule
+
+ dev/hpt27xx/os_bsd.c optional hpt27xx
+ dev/hpt27xx/osm_bsd.c optional hpt27xx
+ dev/hpt27xx/hpt27xx_config.c optional hpt27xx
+
+ 6) Rebuild and install the kernel:
+
+ a) for FreeBSD 5.x-i386/6.x-i386/7.x-i386/8.x-i386/9.x-i386:
+
+ # cd /usr/src/sys/i386/conf/
+ # /usr/sbin/config MYKERNEL
+ # cd ../compile/MYKERNEL/
+ # make depend
+ # make
+ # make install
+
+ b) for FreeBSD 5.x-amd64/6.x-amd64/7.x-amd64/8.x-amd64/9.x-amd64:
+
+ # cd /usr/src/sys/amd64/conf/
+ # /usr/sbin/config MYKERNEL
+ # cd ../compile/MYKERNEL/
+ # make depend
+ # make
+ # make install
+
+ c) for FreeBSD 4.x:
+
+ # cd /usr/src/sys/i386/conf/
+ # /usr/sbin/config MYKERNEL
+ # cd ../../compile/MYKERNEL/
+ # make depend
+ # make
+ # make install
+
+ If the driver was previously configured as an auto-loaded module by
+ /boot/defaults/loader.conf, please remove the entry hpt27xx_load="YES"
+ from loader.conf to prevent the driver from being loaded twice.
+
+ 7) Reboot from the new kernel.
+
+
+3. Build/Load the driver as a kernel module
+------------------------------------------------
+
+ 1) Install kernel source package and building tools.
+
+ 2) Extract the driver files under the kernel source tree:
+
+ # cd /usr/src/sys/
+ # tar xvzf /your/path/to/hpt27xx-freebsd-src-v1.0-111227.tgz
+
+
+ 4) Build the driver module:
+
+ # cd modules/hpt27xx
+ # make
+
+ 5) Copy the driver module to the kernel module directory
+
+ For FreeBSD 4.x:
+
+ # cp hpt27xx.ko /modules/
+
+ For FreeBSD 5.x/6.x/7.x/8.x/9.x:
+
+ # cp hpt27xx.ko /boot/kernel/
+
+ 6) Reboot and load the driver under loader prompt. e.g:
+
+ BTX loader 1.00 BTX version is 1.01
+ Console: internal video/keyboard
+ BIOS driver A: is disk0
+ BIOS driver C: is disk2
+ BIOS 636kB/74512kB available memory
+
+ FreeBSD/i386 bootstrap loader, Revision 0.8
+ (mailto:jkh@narf.osd.bsdi.com, Sat Apr 21 08:46:19 GMT 2001)
+ Loading /boot/defaults/loader.conf
+ /kernel text=0x24f1db data=0x3007ec+0x2062c -
+
+ Hit [Enter] to boot immediagely, or any other key for command prompt.
+ Booting [kernel] in 9 seconds
+
+ <-- press SPACE key here
+ Type '?' for a list of commands, 'help' for more detailed help.
+ ok load hpt27xx
+ /modules/hpt27xx.ko text=0xf571 data=0x2c8+0x254
+ ok boot
+
+ For FreeBSD 5.x/6.x/7.x/8.x/9.x, you can select 6 on the boot menu to get a loader
+ prompt.
+
+ 7) You can add a below line into /boot/defaults/loader.conf to load the
+ driver automatically:
+
+ hpt27xx_load="YES"
+
+ Please refer to the installation guide in HighPoint FreeBSD driver release
+ package for more information.
+
+
+#############################################################################
+Technical support and service
+
+ If you have questions about installing or using your HighPoint product,
+ check the user's guide or readme file first, and you will find answers to
+ most of your questions here. If you need further assistance, please
+ contact us. We offer the following support and information services:
+
+ 1) The HighPoint Web Site provides information on software upgrades,
+ answers to common questions, and other topics. The Web Site is
+ available from Internet 24 hours a day, 7 days a week, at
+ http://www.highpoint-tech.com.
+
+ 2) For technical support, send e-mail to support@highpoint-tech.com
+
+ NOTE: Before you send an e-mail, please visit our Web Site
+ (http://www.highpoint-tech.com) to check if there is a new or
+ updated device driver for your system.
+
+$FreeBSD$
diff --git a/sys/dev/hpt27xx/amd64-elf.hpt27xx_lib.o.uu b/sys/dev/hpt27xx/amd64-elf.hpt27xx_lib.o.uu
new file mode 100644
index 0000000..8bb1b3a
--- /dev/null
+++ b/sys/dev/hpt27xx/amd64-elf.hpt27xx_lib.o.uu
@@ -0,0 +1,22893 @@
+begin 644 hpt27xx_lib.o
+M?T5,1@(!`0D```````````$`/@`!`````````````````````````(A^"@``
+M`````````$```````$``$``-`,8'",9'`1)`@/X!&<#WT(/@!(A'`L9'`P#&
+M1P0`QD<%`,9'!@#&1P<`QD<(`,9'"0#&1PH`QD<+`(#Z`1G`@^`@B$<,QD<-
+M`,9'#@#&1P\`QD<0`,9'$0#&1Q(`QD<3`+@4````PV9F9I!F9I!F9I!(@^PX
+M2(E<)`A(B6PD$$R)9"083(EL)"!,B70D*$R)?"0P28G_2(GU08G608G-Z```
+M``!)B<2X`````$V%Y`^$HP```$F+7"0000^VU4$/MO9(C7L$Z`````!!B<7&
+M`P#&0P$`QD,"`,9#`P!(B>Y,B?_H`````+D`````NA````!(C44XB`A(_\!(
+M_\IU]D&-103&13@5QD4Y$8A%/,9%/0!(C5U81`^VZ$2);33'A90`````````
+M28M$)!!(B45(3(EE>+X`````2(G?Z`````!)BW0D&$2)ZDB)W^@`````N`$`
+M``!(BUPD"$B+;"003(MD)!A,BVPD($R+="0H3(M\)#!(@\0XPY"0D)"0D$&)
+M\&:)=PC&1PX`9L='#```O@````!F1#G&<QYF9F:0#[?.2(L71(G`9BGP_\AF
+MB01*_\9F1#G&<N;SPV9F9I!!B?!FB7<(QD<.`6;'1PP``+D`````9CGQ<Q=F
+M9I!FD`^WT4B+!V:)#%#_P69$.<%R[O/#9F9FD&9F9I!F9F:0@'\.`74J#[='
+M#`^WR$B+%__`9HE'#`^W%$IF.T<*<@9FQT<,``!F_T\(#[?"PV:09O]/"$@/
+MMU<(2(L'#[<$4,-F9F:09F9FD&9F9I!F9I!(@^P(@'\.`74J#[=7#`^W1PB)
+M1"0$C00"#[=7"HD4))GW/"1(8])(BP]FB3119O]'".L02`^W5PA(BP=FB310
+M9O]'"$B#Q`C#9F9FD&9FD&:#?P@`#Y3`#[;`PY"0D)"X`````$@Y/W012(L'
+M2(M("$B+$$B)2@A(B1'SPV9FD+@`````2#D_=!)(BT<(2(M("$B+$$B)2@A(
+MB1'SPV:02(MW8$0/MD=8N0````"ZJ````$B)^(@(2/_`2/_*=?9(B7=@1(A'
+M6,-F9F:09F:02(/L"`^V1@&(1P$/MD8"B$<"BT8$B4<$2(M'"$@/ME<!2(T4
+M4DC!X@)(BW8(2(G'Z`````!(@\0(PV9FD&9FD+D`````.-%S(V9F9I!F9I`/
+MM@<Z!G0)N`````##9F:02/_'2/_&_\$XT7+DN`$```##9F9FD&9F9I!F9I!F
+M9I#&1P$`0(AW`L='!`````##08G12`^V1P%(C01`2(M7"$R-!(+^1P%$`4\$
+MN0````"Z#````$R)P(@(2/_`2/_*=?9)B3!%B$@(1(G(P>@(08A`"42)RL'J
+M$(/B/T$/MD`*@^#`"=!!B$`*PV9FD&:0#[9'`3H'#Y+`#[;`PV9FD+G_````
+MN@`"``!(B?AF9I"("$C_P$C_RG7V\\-F9F:0N``````/M\B`?(\"_W419HDT
+MCXA4CP+K#V9F9I!F9I#_P&:#^']VW0^WP,-F9F:008G1B?!$#[?`0H!\AP+_
+M=0]F1HD,AT*(3(<"#[?`PY`/MM%!#[?QZ``````/M\##N``````/M\@X5(\"
+M=1-F.32/=0W&1(\"_V;'!(___^L(_\!F@_A_=MP/M\##9F:0N0`````/M\$X
+M5(<"=09F.32'=`C_P6:#^7]VZ6:!^8``N(`!```/1,@/M\'#9F:0#[9/.(#Y
+M"`^5P(#Y*`^5P@^VP(7"=#Z`^:AT.8#YB'0T@/D*#Y7`@/DJ#Y7"#[;`A<)T
+M(8#YJG0<@/F*=!>`^2\/E<"`^8\/E<(/ML"%P@^%S0$```^V1SB#^"\/A*X`
+M``"#^"]_.8/X"G1[@_@*D'\.@_@(='#IA@$``&9F9I"#^"@/A(<```"#^"IF
+M9F:0#X1Z````Z6<!``!F9I!FD#V/````#X3=````/8\```!_'CV(````#X3+
+M````/8H````/A,````#I-0$``&9FD#VH````=&P]J@```&9F9I!T8>D;`0``
+M#[9'.8/@'\'@$`^V5SK!X@@)T`^V5SL)T(G"#[9//.D%`0``9F:09I`/ME<Z
+MP>(8#[9'.\'@$`G"#[9'/,'@"`G"#[9'/0G"B=(/MD\_P>$(#[9'0`G!Z<T`
+M```/ME<ZP>(8#[9'.\'@$`G"#[9'/,'@"`G"#[9'/0G"B=(/MD\^P>$8#[9'
+M/\'@$`G!#[9'0,'@"`G!#[9'00G!Z8@```!(#[97.DC!XCA(#[9'.TC!X#!(
+M"<)(#[9'/$C!X"A("<)(#[9'/4C!X"!("<)(#[9'/DC!X!A("<)(#[9'/TC!
+MX!!("<)(#[9'0$C!X`A("<)(#[9'04@)P@^V3T+!X1@/MD=#P>`0"<$/MD=$
+MP>`("<$/MD=%"<'K#KH`````N0````!F9F:02(F7B````(F/D````&:#3R(!
+M\\-F9F:09F9FD&9F9I!32(/L8$B)^T0/MD\[1`^V1SH/MD\Y#[97.`^V1T>)
+M1"18#[9'1HE$)%`/MD=%B40D2`^V1T2)1"1`#[9'0XE$)#@/MD="B40D,`^V
+M1T&)1"0H#[9'0(E$)"`/MD<_B40D&`^V1SZ)1"00#[9'/8E$)`@/MD<\B00D
+M2(G^2,?'`````+@`````Z``````/MW,@2,?'`````+@`````Z`````!(@\1@
+M6\-F9F:09F9FD+K_____N0````!F.?%S(4G'P``````/M\$/M@0X,=`/ML#!
+MZ@A!,Q2`_\%F.?%RYHG0PY"0D)"0D)"0D)"0D)!(BP>+D`0!``")%0````")
+MT8'A?O_^_TB+!XF(!`$``(G1@>%^__+_2(M'"(D(2(M'"(E(#$B+1PB)2!!(
+MBT<(B4@42(M'"(E(&$B+1PB)2`1(BP>+@%0!``")!0````")P8'A_@#__TB+
+M!XF(5`$``,-F9F:09F9FD&9FD&9FD%532(/L"(GS2(LO@_X#=AB-!-W@____
+MBX0HH`$``(D%`````(G!ZQB-!-T`````B<"+A"B``0``B04`````B<&#X?Z#
+M^P-V$(T$W>#___^)C"B@`0``ZQ"-!-T`````B<")C"B``0``A-(/A*````"#
+M^P-V&(T$G?#___^+A"C@`0``B04`````B<'K&(T$G0````")P(N$*-`!``")
+M!0````")P8/)`H/[`W80C02=\/___XF,*.`!``#K$(T$G0````")P(F,*-`!
+M``"-!)T`````C7#PB<)F9F:09F:0@_L#=A&+A"[@`0``B04`````B<'K#XN$
+M*M`!``")!0````")P?;!`G76Z94```"0@_L#=A2-!-W@____QX0H4`(`````
+M``#K%(T$W0````")P,>$*%`"````````OQ`G``#H`````(/[`W88C03=X/__
+M_XN$*%0"``")!0````")P>L8C03=`````(G`BX0H5`(``(D%`````(G!@\D!
+M@_L#=A"-!-W@____B8PH5`(``.L0C03=`````(G`B8PH5`(``$B#Q`A;7<-F
+M9I!FD$%6055!5%5328G\08GU08G62(LONP````"`?SX`#X1.`@``1(GJ#[;"
+MB=E(T_BH`0^$*P(``(/[`W88C03=X/___XN$**0!``")!0````")PNL8C03=
+M`````(G`BX0HA`$``(D%`````(G"@^+^@_L#=A"-!-W@____B90HI`$``.L0
+MC03=`````(G`B90HA`$``+\0)P``Z`````!%A/8/A)H```"#^P-V&(T$G?#_
+M__^+A"C@`0``B04`````B<+K&(T$G0````")P(N$*-`!``")!0````")PH/*
+M`H/[`W80C02=\/___XF4*.`!``#K$(T$G0````")P(F4*-`!``"-!)T`````
+MC7#PB<&0@_L#=A&+A"[@`0``B04`````B<+K#XN$*=`!``")!0````")PO;"
+M`G76Z94```"0@_L#=A2-!-W@____QX0H4`(```````#K%(T$W0````")P,>$
+M*%`"````````OQ`G``#H`````(/[`W88C03=X/___XN$*%0"``")!0````")
+MPNL8C03=`````(G`BX0H5`(``(D%`````(G"@\H!@_L#=A"-!-W@____B90H
+M5`(``.L0C03=`````(G`B90H5`(``(/[`W87C03=X/___\>$**`!```!````
+MZQ=F9I"-!-T`````B<#'A"B``0```0```(/[`W88C03=X/___XN$**0!``")
+M!0````")PNL8C03=`````(G`BX0HA`$``(D%`````(G"@\H!@_L#=A"-!-W@
+M____B90HI`$``.L0C03=`````(G`B90HA`$``/_#00^V1"0^.=@/A[+]__];
+M74%<05U!7L-F9I!F9I")\4B+!XN`!`$``(D%`````$&)P`^W1SQF/8!D#Y3"
+M9CV`D0^4P`G0J`%U"&:!?SR`E'42#[;)@\$(N`$```#3X$$)P.L10`^VSH/!
+M#+@!````T^!!"<!(BP=$B8`$`0``PV9F9I!F9F:09F:09F:0B?%(BP>+@`0!
+M``")!0````!!B<`/MT<\9CV`9`^4PF8]@)$/E,`)T*@!=0AF@7\\@)1U$@^V
+MR8/!"+C^____T\!!(<#K$4`/MLZ#P0RX_O___]/`02'`2(L'1(F`!`$``,-F
+M9F:09F9FD&9FD&9FD$B#[!A(B5PD"$R)9"0028G\0`^VWHG>Z`````"_$"<`
+M`.@`````B=Y,B>?H`````$B+7"0(3(MD)!!(@\08PY")\4"`_O]T>$"`_A]W
+M-HN7&`$``(D5`````+@!````T^")P??0(=")AQ@!``"+AU@!``")!0`````A
+MR'1#B8=8`0``PXN7'`$``(D5`````$`/MLZ#Z2"X`0```-/@B<'WT"'0B8<<
+M`0``BX=@`0``B04`````(<AT!HF'8`$``//#9F9FD&9F9I!F9I!F9I!!5%53
+M2(G5B?-,BR=`@/X#=AY(C03=`````"7X!P``0L>$(``"```,`0``ZQQF9I!(
+MC03=`````"7X!P``0L>$(``"```,`0``OQ`G``#H`````(#[`W8X2(T,W0``
+M``"!X?@'```/ME4#P>(8#[9%`L'@$`G"#[9%`<'@"`G"#[9%``G"0HF4(00"
+M``#K-I!(C0S=`````('A^`<```^V50/!XA@/MD4"P>`0"<(/MD4!P>`("<(/
+MMD4`"<)"B90A!`(``(#[`W8;2(T$W0`````E^`<``$+'A"```@``$`$``.L9
+M2(T$W0`````E^`<``$+'A"```@``$`$``+\0)P``Z`````"`^P-V-TB-#-T`
+M````@>'X!P``#[95!\'B&`^V10;!X!`)P@^V107!X`@)P@^V100)PD*)E"$$
+M`@``ZS5(C0S=`````('A^`<```^V50?!XA@/MD4&P>`0"<(/MD4%P>`("<(/
+MMD4$"<)"B90A!`(``%M=05S#D)!32(/L8$B)^P^W?SQ(C40D7DB)1"0X2(U$
+M)%Q(B40D,$B-1"1:2(E$)"A(C40D6$B)1"0@2(U$)%9(B40D&$B-1"152(E$
+M)!!(C40D5$B)1"0(2(U$)%)(B00D3(U,)%%,C40D3DB-3"1-2(U4)$Q(C70D
+M2^@`````#[94)$L/MG0D3$B-?"1$Z`````!(#[94)$M(:=*(`0``2(MS($B-
+MN_@(``"Y`0```.@`````2`^V5"1-2&G2T````$B+<R!(C;L@"0``N0$```#H
+M`````$@/ME0D3$AITL@/``!(BW,@2(V[2`D``+D!````Z`````!(#[=4)%9(
+MP>(#2(MS($B-NW`)``"Y`0```.@`````2`^W5"1.2&G2J````$B+<R!(C;M(
+M"@``N0$```#H`````$@/ME0D44@/MT0D3D@/K]!(C1122,'B`DB+<R!(C;O8
+M"0``N0$```#H`````$B+<R!(C;L`"@``N0$```"Z``(``.@`````#[9,)$M(
+MBW,@2(V[$`L``+H`"```Z`````!(#[94)%1(P>(%2(MS($B-NY@*``"Y`0``
+M`.@`````2`^V5"152(T4DDC!X@5(BW,@2(V[P`H``+D!````Z`````!(#[=4
+M)%)(C1222,'B`TB+<R!(C;OH"@``N0$```#H`````$@/MU0D5D@!TDB+<R!(
+MC;LP#P``N0$```#H`````$@/ME0D2T@!TDB+<R!(C;MH#P``N0$```#H````
+M`$@/ME0D34@!TDB+<R!(C;N@#P``N0$```#H`````$@/ME0D3$@!TDB+<R!(
+MC;O8#P``N0$```#H`````$@/ME,^2`'22(MS($B-NQ`0``"Y`0```.@`````
+M2`^W5"182(T44DC!X@1(BW,@2(V[<`H``+D!````Z`````"+5"1$2(MS($B-
+MNT@0``"Y`0```.@`````2`^W5"162,'B!DB+<R!(C;MP$```0;@!````N4``
+M``#H`````$B+<R!(C;N@$```0;@!````N0`!``"Z`!D``.@`````2`^W5"16
+M2&G2L`0``$B+<R!(C;O0$```0;@!````N8````#H`````$@/MU0D7$C!X@)(
+MBW,@2(V[`!$``$&X`0```+D$````Z`````!(#[=4)%Y(P>("2(MS($B-NS`1
+M``!!N`$```"Y!````.@`````#[94)%3!X@M(BW,@2(V[8!$``$&X`0```+D(
+M````Z`````!(#[=4)%)(:=*,`0``2(MS($B!PY`1``!!N`$```"Y"````$B)
+MW^@`````N`````!(@\1@6\-F9I!FD$%6055!5%532(/L8$F)_$&^`````,9'
+M40#&1U``QD=/`$C'A_@3````````QH?Q$P```+D`````NJ`!``!(C8=`$@``
+MB`A(_\!(_\IU]DF-A"3H````28F$).@```!)B80D\````$F-A"3X````28F$
+M)/@```!)B80D``$``$F-A"0(`0``28F$)`@!``!)B80D$`$``$F-A"08`0``
+M28F$)!@!``!)B80D(`$``$F-A"0H`0``28F$)"@!``!)B80D,`$``$F-A"1(
+M`0``28F$)$@!``!)B80D4`$``$F-A"18`0``28F$)%@!``!)B80D8`$``$F-
+MA"0X`0``28F$)#@!``!)B80D0`$``$$/MWPD/$B-1"1>2(E$)#A(C40D7$B)
+M1"0P2(U$)%I(B40D*$B-1"182(E$)"!(C40D5DB)1"082(U$)%5(B40D$$B-
+M1"142(E$)`A(C40D4DB)!"1,C4PD44R-1"1.2(U,)$U(C50D3$B-="1+Z```
+M```/MD0D2T&(1"1&#[9$)$Q!B$0D1P^V1"1-08B$).$````/MT0D5F9!B40D
+M6(M$)%QF08F$)#P2```/MT0D7O_(9D&)A"0^$@``00^W1"0\/8"1``!T"SV`
+ME```#X4C"0``0<9$)$T$0<9$)$,$0<9$)$Y`0<9$)$P`0<:$)-X````)0<9$
+M)$0`28V\)/@(``#H`````$F)A"08"0``N0````!(#[94)$M(:=*(`0``ZPB(
+M"$C_RDC_P$B%TG7S28V\)"`)``#H`````$F)A"1`"0``N0````!(#[94)$U(
+M:=+0````2(72=`J("$C_P$C_RG7V28V\)$@)``#H`````$F)A"1H"0``N0``
+M``!(#[94)$Q(:=+(#P``2(72=`J("$C_P$C_RG7V28V\)'`)``#H`````$F)
+MA"20"0``N0````!(#[=4)%9(P>(#=`J("$C_P$C_RG7V28V\)``*``#H````
+M`$F)A"0@"@``28V\)-@)``#H`````$F)A"3X"0``2(G#28V\)$@*``#H````
+M`$F)A"1H"@``2(G"O0````!F.VPD3G-$28V,)`@!``!(B5I@#[9$)%&(0EA(
+MBT$(2(E1"$B)"DB)0@A(B1!(#[9$)%%(C01`2(T<@TB!PJ@```#_Q68[;"1.
+M<L1)C;PD<`H``.@`````28F$))`*``!(B<*]`````&8[;"18<RM)C8PD&`$`
+M`,9"$`!(BT$(2(E1"$B)"DB)0@A(B1!(@\(P_\5F.VPD6'+=28V\))@*``#H
+M`````$F)A"2X"@``2(G"O0````"`?"14`'0K28V,)"@!``!(BT$(2(E1"$B)
+M"DB)0@A(B1!(@\(@_\5F#[9$)%1F.>AWW4F-O"3`"@``Z`````!)B80DX`H`
+M`$B)PKT`````@'PD50!T+DF-C"1(`0``2(M!"$B)40A(B0I(B4((2(D02('"
+MH````/_%9@^V1"159CGH=]I)C;PDZ`H``.@`````28F$)`@+``!(B<*]````
+M`&8[;"12<R=)C8PD.`$``$B+00A(B5$(2(D*2(E""$B)$$B#PBC_Q68[;"12
+M<N&]`````(!\)$L`=#]-C:PD6`$```^WW4F-O"00"P``Z`````!)B83<,`L`
+M`$F+50A)B44(3(DH2(E0"$B)`O_%9@^V1"1+9CGH=\E)C;PD,`\``.@`````
+M28F$)%`/``!)B80D6`\```^W1"169D&)A"1B#P``#[?P28V\)%@/``#H````
+M`$F-O"1H#P``Z`````!)B80DB`\``$F)A"20#P``9@^V1"1+9D&)A"2:#P``
+M#[?P28V\))`/``#H`````$F-O"2@#P``Z`````!)B80DP`\``$F)A"3(#P``
+M9@^V1"1-9D&)A"32#P``#[?P28V\),@/``#H`````$F-O"38#P``Z`````!)
+MB80D^`\``$F)A"0`$```9@^V1"1,9D&)A"0*$```#[?P28V\)``0``#H````
+M`$F-O"00$```Z`````!)B80D,!```$F)A"0X$```9D$/MD0D/F9!B80D0A``
+M`$$/MG0D/DF-O"0X$```Z`````!)C;PD2!```.@`````28F$)&@0``!(#[94
+M)$Q(C132B=;!Y@>!QF!7``"Y`````(GR2(72=`J("$C_P$C_RG7V28N$)&@0
+M``"),$F+E"1H$```#[9$)$R(0@0/ME0D3$F+O"1H$```Z`````"]`````$&`
+M?"0^`'1]#[?%2&G`J````$P!X$R-L*`!``!!B&X(0<9&"0!,B:"@`0``0<9&
+M#@!!QD98`$'&1B@`0<>&H`````````!(C9#0`0``28E6,$F)5CA(C9#H`0``
+M28E62$F)5E!(!0`"``!)B49@28E&:$'&1@H"_\5F00^V1"0^9CGH=X-!QD0D
+M3`"]``````^WQ4+&A"#&"```___%9H/]`W;LO0````"`?"1+``^$D`````^W
+MS4F+E"08"0``2&G!B`$``,9$$$,!28N4)!@)``#&1!!"`$F+E"08"0``QD00
+M>/])BY0D&`D``,9$$&K_28N4)!@)``!FQX00P```````2<>$S$`$````````
+M2(G!20.,)!@)``!(C5$@2(E1($D#A"08"0``2(/`($B)0`C_Q68/MD0D2V8Y
+MZ`^'</___V9!QX0DW```````O0````!F9I!F9I`/M\5"QH0@0`@``/__Q6:!
+M_84`=NN]`````(!\)$P`#X3"````#[?528N$)&@)``!(:=+(#P``QD0"6`!)
+MBX0D:`D``,9$`ED`28N$)&@)``!(QT0"$`````!(B=%)`XPD:`D``$B-01A(
+MB4$82(G020.$)&@)``!(@\`82(E`"$B)T4D#C"1H"0``2(U!*$B)02A(B=!)
+M`X0D:`D``$B#P"A(B4`(28N$)&@)``!,B70""$B)T4D#C"1H"0``2(U!2$B)
+M04A)`Y0D:`D``$B#PDA(B5((_\5F#[9$)$QF.>@/AS[___]!QH0DWP```("]
+M`````(!\)$T`#X2'````#[?528N$)$`)``!(:=+0````9L=$`DX$`$F+A"1`
+M"0``QD0"0@!)BX0D0`D``,9$`D3_28N$)$`)``#&1`)0_TB)T4D#C"1`"0``
+M2(U!*$B)02A(B=!)`X0D0`D``$B#P"A(B4`(28N$)$`)``!,B;0"B````/_%
+M9@^V1"1-9CGH#X=Y____0<:$).````""28VT))@0``!)C;PD<!```.@`````
+M28F$))`0``!)C;0DR!```$F-O"2@$```Z`````!)B80DP!```$F-M"3X$```
+M28V\)-`0``#H`````$F)A"3P$```28VT)"@1``!)C;PD`!$``.@`````28F$
+M)"`1``!)C;0D6!$``$F-O"0P$0``Z`````!)B80D4!$``$F-M"2($0``28V\
+M)&`1``#H`````$F)A"2`$0``38NT)(@1``!)B<6]`````(!\)%0`=$A)C9PD
+M*`$``$B)W^@`````2(G"3(EH$$R)<!A(BT,(2(E3"$B)&DB)0@A(B1!)@<4`
+M"```28'&``@``/_%9@^V1"149CGH=\!)C;0DN!$``$F-O"20$0``Z`````!)
+MB80DL!$``$V+M"2X$0``28G%O0````!F.VPD4G-$28V<)#@!``!(B=_H````
+M`$B)PDR):!!,B7`82(M#"$B)4PA(B1I(B4((2(D028'%C`$``$F!QHP!``#_
+MQ68[;"12<L1(@\1@6UU!7$%=05[#9F9FD&9F9I!F9I!F9I!!5T%6055!5%53
+M2(/L"$F)_,9$)`<`2`^V1"0'0@^VE"#&"```@/K_#X2;````#[;"2&G`J```
+M`$Z-M""@`0``0;T`````08!^#@!V?$F-;F!-B?=(B>_H`````$B)PTB+10A(
+MB5T(2(DK2(E#"$B)&$B#>S@`=!I(BU,X28NT)-`(``"_!0```.@`````@$M$
+M`DB)VKX"````3(GWZ`````"`>WL`=!A,B>?H`````+\!````Z`````"`>WL`
+M=>A!_\5%.&\.=XO^1"0'@'PD!P,/AC[___],B>?H`````$B#Q`A;74%<05U!
+M7D%?PY!(@^P(2#E^*'5F#[9..(#Y"`^5P(#Y*`^5P@^VP(7"=&B`^:AT8X#Y
+MB'1>@/D*#Y7`@/DJ#Y7"#[;`A<)T2X#YJG1&@/F*=$%(C9?H````2(N'Z```
+M`$B)<`A(B09(B58(2(FWZ````.L?9F:09F:02(V'Z````$B+4`A(B7`(2(D&
+M2(E6"$B),N@`````2(/$",-F9F:09F:09F:09F:02(/L".@`````2(/$",-F
+MD$%455-(B?-(B=5!O`````!F@7XXX0%U"P^V1CJ#Z!$\`78R2(L72(NR&`D`
+M`$R-IGB&`0!F@7L@A0!W&4@/MT,@2`^VA!!`"```2&G`B`$``$R-)`;&100%
+M@&4%_H!E`-^Z`````&:!>SCA`742#[9#.O_(/`&X`0````]&T&:0B=#!X`</
+MME4`@^)_"<*(50`/MH.6````@^`!P>`&@^*_"<*(50!F@7LXX0%U$@^V0SJ#
+MZ!$\`7<'9HE-".L<D/:#E@````%T#DR)Y^@`````9HE%".L$9HE-"`^W10B(
+M0R5F@7LXX0%U+@^V0SK_R#P!=PP/ME,[ZS%F9I!F9I!F@7LXX0%U$`^V0SJ#
+MZ!&Z#P```#P!=A.Z`````$F#?"18`'0&00^V5"1Y@^(/#[9%`(/@\`G0B$4`
+M6UU!7,.02(/L"$B+/^@`````2(/$",-F9F:09F9FD&9F9I!F9I!,BP</MX<X
+M$@``_\!FB8<X$@``9CN'/!(``'()9L>'.!(`````2`^WCS@2``!(BY<@$0``
+MBP:)!(H/MX<X$@``08F`+`$``,-F9F:09F9FD$&)T4&X`````+H$````2(G(
+M1(@`2/_`2/_*=?6)\H'B_P\``(L!)0#P__\)T(D!#[97#<'B#"7_#_#_"=")
+M`4@/MD<*2-'H@^`!@_@!&<"#X`+_P,'@'8L1@>+___\?"<*)$0^V00.#R!"#
+MX/>(00/V1PH!=!1$B<J#XG_!XA2+`27__P_X"=")`?/#9F9FD$B#[#A(B5PD
+M"$B);"003(ED)!A,B6PD($R)="0H3(E\)#!)B?Q(B?-)B==!O@`````/MD8X
+M/`@/E,(\*`^4P`G0J`%U#(!^.*AT!H!^.(AU#X.+E`````KK+69FD&9FD`^V
+M1C@\"@^4PCPJ#Y3`"="H`74,@'XXJG0&@'XXBG4'@XN4`````F:!>SCA`74A
+M#[9#.H/H$3P!=Q:#BY0````(N`````#I104``&9FD&:0BT,X)?___P`]X0$0
+M``^%(`$``&:!>R"%``^'H0```$@/MT,@0H"\($`(``#_#X2-````9H-[(']W
+M)$H/MH0@0`@``$F+E"08"0``2&G`B`$``$B+1!!(1`^V:`CK:&:!>R"!`'<I
+M2`^W0R!*#[:$($`(``!)BY0D:`D``$AIP,@/``!(BT00"$0/MF@(ZS=(#[=#
+M($H/MH0@0`@``$F+E"1`"0``2&G`T````$B+A!"(````1`^V:`CK"V9FD&:0
+M0;W_____1(GJ#[;"2@^VK"#&"```2&GMJ````$J-K"6@`0``28N4)&@)``!(
+MC8(XN`\`9H%[((4`=QE(#[=#($H/MH0@0`@``$AIP,@/``!(C00"]D!=$`^%
+M@@$``,9#)`1!QP<`````N`$```#I#00``&:!>R"%``^'H0```$@/MT,@0H"\
+M($`(``#_#X2-````9H-[(']W)DH/MH0@0`@``$F+E"08"0``2&G`B`$``$B+
+M1!!(1`^V:`CK:&:09H%[(($`=RE(#[=#($H/MH0@0`@``$F+E"1H"0``2&G`
+MR`\``$B+1!`(1`^V:`CK-4@/MT,@2@^VA"!`"```28N4)$`)``!(:<#0````
+M2(N$$(@```!$#[9H".L)9F:00;W_____NO\```!F@7L@A0!W#T@/MT,@9D(/
+MMI0@0`@``$2)Z0^VP4H/MJP@Q@@``$AI[:@```!*C:PEH`$```^WPDAIP(@!
+M``!)B<9-`[0D&`D``&:!>SCA`74*#[9#.O_(/`%V*6:!^O\`=`=!]D9#!'4;
+MQD,D!D''!P````"X`0```.G6`@``9F:09F:020^V1D"H`70GJ`1T(T$/MD0D
+M1$$Z1"1.<A9!QP<!````N`$```#II0(``&9FD&:0387V#X37````20^V1D"H
+M`0^$R@```*@$#X3"````2(G>3(GWZ`````"$P'45QD,D!$''!P````"X`0``
+M`.E>`@``08!^>Q]V$4''!P$```"X`0```.E&`@``]H.6`````70&]D4,`70;
+M]H.6`````74&]D4,`74,@'LD@70&]D4,"'0A00^V]4R)Y^@`````A,!T$4''
+M!P$```"X`0```.G[`0``]H.6`````0^$;@$``/9%#`$/A&0!``!,B??H````
+M`&:#^!\/AE(!``!!QP<!````N`$```#IP0$``)#V10H"="N+0S@E____`#WA
+M`1``=!Q!#[9&>T$Z1GIR$4''!P$```"X`0```.F/`0``BT,X)?___P`]X0$0
+M``^$_````$D/MT9B2(G"2-'J@^(!N0$```"`>SCA#X7?````@'LY`0^%U0``
+M``^V0SJ#Z`:#^`D/AZT```")P/\DQ0`````/MLFZ`0```$B)WDR)Y^@`````
+MA,`/A:$```!!QP<"````N`$```#I$`$```^VR;H`````2(G>3(GGZ`````"$
+MP'5Y0<<'`@```+@!````Z>@````/MM*Y`0```$B)WDR)Y^@`````A,!U44''
+M!P(```"X`0```.G`````#[;2N0````!(B=Y,B>?H`````(3`=2E!QP<"````
+MN`$```#IF````,9#)`1!QP<`````N`$```#I@P```&9FD$F-O"18#P``Z```
+M``"$P'0/0<<'`0```+@!````ZV&0@'LXX751@'LY`75+@'LZ#W5%@'L]`74_
+M9@^V<SS!Y@AF#[9#.P'&#[?V3(GGZ`````!(.4-H#Y7"2(7`#Y3`"="H`702
+MQD,D!$''!P````"X`0```.L)N`````!F9F:02(M<)`A(BVPD$$R+9"083(ML
+M)"!,BW0D*$R+?"0P2(/$.,-F9F:09F:09F:09F:0N0````"Z#0```$B)\&9F
+MD(@(2/_`2/_*=?8/MD<YB`8/MD<ZB$8!#[9'.XA&`@^V1SR(1@,/MD<]B$8$
+M#[9'/HA&!0^V1S^(1@;VAY8````$=",/MD=`B$8(#[9'08A&"0^V1T*(1@H/
+MMD=#B$8+#[9'1(A&#+@!````PV9F9I"Z`````$&Y`````&9FD&:0N0<```!)
+M8\%$#[8$,&9FD`'21(G`T_BH`705]\(````!=1V!\G<GVP#K%69FD&:0B=`U
+M=R?;`/?"`````0]%T/_)><Q!_\%!@_D'?K.)T,'H$(@'B=#!Z`B(1P&(5P+#
+M05=!5D%505154TB#[%A)B?Y(B?5(BX?P$```2(E$)"!(QT0D$`````!!O```
+M``!(QT0D"`````!!O0````!FQT8R_P](C50D/.@`````A,!T"8M$)#SID`P`
+M`(M%."7___\`/>$!$``/A1(!``"_B!,``.@`````9H%]((4`#X><````2`^W
+M12!"@+PP0`@``/\/A(@```!F@WT@?W<B2@^VA#!`"```28N6&`D``$AIP(@!
+M``!(BT002`^V0`CK9&:!?2"!`'<G2`^W12!*#[:$,$`(``!)BY9H"0``2&G`
+MR`\``$B+1!`(#[9`".LU2`^W12!*#[:$,$`(``!)BY9`"0``2&G`T````$B+
+MA!"(````#[9`".L+9F:09F:0N/____\/ML!*#[:$,,8(``!(:="H````2HV,
+M,J`!``!(B4PD&$F+EF@)``!,C:(XN`\`9H%]((4`#X>8`0``2`^W12!*#[:$
+M,$`(``!(:<#(#P``3(TD`NEZ`0``9F:0N?\```!F@7T@A0!W#T@/MT4@9D(/
+MMHPP0`@``&:!?3CA`74/#[9%.H/H$3P!#X;?````9H%]((4`#X>6````2`^W
+M12!"@+PP0`@``/\/A((```!F@WT@?W<B2@^VA#!`"```28N6&`D``$AIP(@!
+M``!(BT002`^V0`CK7F:!?2"!`'<G2`^W12!*#[:$,$`(``!)BY9H"0``2&G`
+MR`\``$B+1!`(#[9`".LO2`^W12!*#[:$,$`(``!)BY9`"0``2&G`T````$B+
+MA!"(````#[9`".L%N/____\/ML!*#[:$,,8(``!(:=BH````2HV$,Z`!``!(
+MB40D&`^WP4AIP(@!``!)`X88"0``2(E$)!#K(@^WP4AIP-````!)`X9`"0``
+M2(E$)`A(BY"(````2(E4)!AF@7TXX0%U&P^V13J-4.^`^@$/E\+_R#P!#Y?`
+M#[;2A=!T(&:!^?\`=`M(BTPD$/9!0P1U#L9%)`:X`````.GT"0``2(UT)#!,
+MB??H`````$&)QV:)13),B??H`````$B)P[@"````2(7;#X3'"0``2(F=@```
+M`$$/M\](:<FP!```2`-,)"!(B<A)*X;P$```2(G&20.V^!```$B#QB!(BT0D
+M,(EP($B)\DC!ZB!(BT0D,(E0)$B+<QA(BT0D,(EP*$B)\DC!ZB!(BT0D,(E0
+M+$B+1"0P9D2)>`B^`````+JP!```2(G(9F9FD$"(,$C_P$C_RG7U9H%]..$!
+M=6H/MD4Z@^@1/`%W7TB-3"1`2(M$)#`/ME`(2(GN2(M\)!#H`````$$/M\=(
+M:<"P!```2`-$)"!)*X;P$```2(G&20.V^!```$B!QB`$``!(BT0D,(EP$$B)
+M\DC!ZB!(BT0D,(E0%.F8`0``2(M$)!CV0`H!=2V+13@E____`#WA`1``#X0%
+M`0``2(M4)!!(#[9"0*@!#X3S````J`0/A.L```#VA98````@=`](C70D0$B)
+M[^@`````ZQM(C4PD0$B+1"0P#[90"$B)[DB+?"00Z`````!!#[?'2&G`L`0`
+M`$@#1"0@22N&\!```$B)QDD#MO@0``!(@<8@!```2(M$)#")<!!(B?)(P>H@
+M2(M$)#")4!1F@7TXX0%U#P^V13J#Z!$\`0^&UP```$B+3"002`^V04"H`@^$
+MQ0```*@$#X2]````J`$/A+4```!!#[?'2&G`L`0``$@#1"0@22N&\!```$B)
+MQDD#MO@0``!(BT0D,(EP&$B)\DC!ZB!(BT0D,(E0'.M[9F:09F:02(M$)!CV
+M0`H"=&I!#[?'2&G`L`0``$@#1"0@2(G"22N6\!```$B)UDD#MO@0``!(BU0D
+M,(ER&$B)\4C!Z2!(BU0D,(E*'$DKAO`0``!(B<9)`[;X$```2('&(`0``$B+
+M1"0PB7`02(GR2,'J($B+1"0PB5`42(M$)#"`2`$"9@^V55E(BT0D,&:)4`*_
+M`````(!]60!T+8GX2(T$0$C!X`)(B<9(`W,02(M-8$B+%`A(B1:+1`@(B48(
+M_\</MD59.?AWTXM5-$B+1"0PB5`,9H%]..$!=5$/MD4Z@^@1/`%W1D$/M\](
+MBU0D,$B)[DB+?"08Z`````!(C4PD0$$/M]=(:=*P!```2`-4)"!(B>Y(BWPD
+M&.@`````2(M4)!B`8@S^Z6,%``!(BTPD&/9!"@(/A-T$``!(BT0D,,9`!OY(
+MBT0D,(!@!_Y(@WPD$``/A.T```!(BUPD$$@/MD-`J`(/A-L```"H!`^$TP``
+M`*@!#X3+````00^WSTB+5"0P2(GN2(M\)!CH`````/:%E@````%T$$B+1"0P
+M#[=`",'@`XA$)$%(C4PD0$$/M]=(:=*P!```2`-4)"!(B>Y(BWPD&.@`````
+M]H66`````70+2(M$)!B`2`P!ZPE(BU0D&(!B#/Y!#[?/2&G)L`0``$B+7"0@
+MQ@09H4B+1"00#[:0X@```(/B#P^V1!D!@^#P"="(1!D!2(M4)!`/MT(P_\`/
+MMM#!X@@/ML0)T&:)1!D"3(ML)!!)@<7,````Z:X#``!F@7TXX0$/A7@"```/
+MMD4Z@_@/=`Z#^!`/A.(```#IBP,``&8/ME4\P>((9@^V13L!PDB+1"0PQD`$
+M#4B+1"0P@&`%_H!,)"\(2(MT)#`/MD4E00^VCMX```#3X&8)1@A(BTPD,`^V
+M00&#X!^#R""(00%!#[?/2&G)L`0``$B+7"0@2(TT&4B+13Y(B88X!```#[;"
+MP>`(#[;6"<)FB9091`0```^V13V(A!E"!```Q@:12(M4)!`/MT(P_\`/MM#!
+MX@@/ML0)T&:)1!D"2(M<)!`/MI/B````@^(/2(M<)"`/MD09`8/@\`G0B$09
+M`4R+;"0028'%S````.FN`@``2(M4)#`/MD4E00^VCMX```#3X&8)0@A!#[?7
+M2&G2L`0``$B+1"0@Q@0"@6;'1`("__]!#[:,)+L```"#X0](BUPD(`^V1!H!
+M@^#P"<B(1!H!2(-]2`!U#L9%)"&X`````.D#!```]D4[`70]2(-]4`!T-DR+
+M;5!!#[??2&G;L`0``$F+OF@0``!,B>[H`````(/@#TB+3"0@#[94"P&#XO`)
+MPHA4"P'K`TV)Y;X$````2(M52`^V0@$]DP```'=VB<#_),4`````@\8$ZVB#
+MQ@3K8X/&".M>@\8(9F:0ZU:#Q@CK48/&".M,@\8(D.M&@\8(ZT&#QACK/(/&
+M&)#K-H/&#.LQ@\8(ZRP/MG($C32U"````.L?@<:(````D.L6@\8DZQ&#QB3K
+M#(/&))#K!H'&B````(U6`\'J`DB+1"0PB%`$2(M,)#!FP>H(@^(!#[9!!8/@
+M_@G0B$$%00^W_TAI_[`$``!(BUPD($B-O!\@!```B?)(BW5(Z`````#I*@$`
+M``^V13B#Z`0]JP```'<_B<#_),4`````#[9%0,'@"`^V54&-#!"#^0UW&+@!
+M````2-/@J=@^``!T"4B+1"0P@$@!!$B+1"0P@$@!`>L)2(M$)#"`8`'[2(M$
+M)##&0`0-2(M$)#"`8`7^2(M4)#`/MD4E00^VCMX```#3X&8)0@A(BT0D,(!@
+M`1]!#[??2&G;L`0``$B+1"0@QH0#(`0```9,BVPD$$F!Q<P```!,C20#28V\
+M)"$$``!,B>[H`````$F-O"0E!```3(GNZ`````!(BT4X28F$)$0$``!(BT5`
+M28F$)$P$``!!Q@0DD4B+3"00#[:1X@```(/B#TB+3"0@#[9$"P&#X/`)T(A$
+M"P%(BU0D$`^W0C#_P`^VT,'B"`^VQ`G09HE$"P)-A>T/A)(```!!#[?'2&G`
+ML`0``$F+50!(BTPD($B)5`@$ZW=(BUPD&/9#"@%T;$$/M\](BU0D,$B)[DB)
+MW^@`````]H66`````7002(M$)#`/MT`(P>`#B$0D04B-3"1`00^WUTAITK`$
+M``!(`U0D($B)[DB+?"08Z`````#VA98````!=`M(BT0D&(!(#`'K"4B+5"08
+M@&(,_D$/M]=)BX:0"0``2(DLT$2)^F;!Z@4/M])$B?F#X1^X`0```$C3X$$)
+MA):8"0``BT4X)?___P`]X0$0`'4O00^W]TB-3"0LN@````!(BWPD&.@`````
+MBT0D+"7___\?#0```$")1"0LZ:$```!F@7TXX0%U-@^V13J#Z!$\`7<K2(MT
+M)`A,B??H`````$B+3"0(#[914$$/M_=(C4PD+$B+?"08Z`````#K8TB+="00
+M3(GWZ`````!(BUPD$`^V4VI!#[?W2(U,)"Q(BWPD&.@`````2`^V0T"H`G0Q
+MJ`1T+:@!9I!T)XM$)"PE____'PT```!@B40D+`^V4VJ#XG_!XA0E__\/^`G0
+MB40D+$B-="0L3(GWZ`````"X`P```$B#Q%A;74%<05U!7D%?PV9FD&9FD$B#
+M["!(B5PD"$B);"003(ED)!B)\DB+'XGP9L'H!0^WZ(M$JUQ!B=1!@^0?1(GA
+M2-/XJ`%U.@^W]DB-3"0$N@````#H`````(%,)`0```#@2(UT)`2`9@/W2(G?
+MZ`````"X`0```$2)X4C3X`E$JUQ(BUPD"$B+;"003(MD)!A(@\0@PV9F9I!F
+M9F:09F9FD$B#["A(B5PD"$B);"003(ED)!A,B6PD($F)_$B)]4B+1G!,BV@H
+M9H%^((4`#X>N````2`^W1B"`O#A`"```_P^$FP```&:#?B!_=RE(#[:$.$`(
+M``!(BY<8"0``2&G`B`$``$B+1!!(2`^V0`A(!<`(``#K<&:!?B"!`'<N2`^W
+M1B!(#[:$.$`(``!(BY=H"0``2&G`R`\``$B+1!`(2`^V0`A(!<`(``#K.D@/
+MMT8@2`^VA#A`"```2(N70`D``$AIP-````!(BX00B````$@/MD`(2`7`"```
+MZPEF9F:0N+\)``!)#[9<!`9(:=NH````2HV<(Z`!``!(@WUX`'0/2(MU>$R)
+MY^@`````9F:02(GN3(GGZ`````!,B>Y(B=]!_Y6@````2(M<)`A(BVPD$$R+
+M9"083(ML)"!(@\0HPV9F9I!F9F:09F9FD&9FD$B#[#A(B5PD"$B);"003(ED
+M)!A,B6PD($R)="0H3(E\)#!)B?9)B?U,BS](C5](2(G?Z`````!)B<1)@^PX
+M3(G_Z`````!(B<5)C40D.$B+4PA(B4,(28E<)#A(B5`(2(D"N`$```!(A>UT
+M>4B-?5C&13CAQD4Y`<9%.A"`33L!28N&H````$B)16A(BT5P3(EP*$F-AI``
+M``!(B450QD4ES&9!#[9$)%MFB44@28M%`$B)12C'1320````3(EU2$C'A:``
+M````````O@````#H`````$B)[DR)_^@`````N`````!(BUPD"$B+;"003(MD
+M)!A,BVPD($R+="0H3(M\)#!(@\0XPV9F9I!F9F:02(/L*$B)'"1(B6PD"$R)
+M9"003(EL)!A,B70D($B)\TB)_4R+;TA-BV4`#[=.,HG.9L'N!0^WQD&+1(1<
+M@^$?2-/XJ`$/A68#``!)BQ0D#[?&C02%``,``(F"<`$``$F+!"2+@'0!``")
+M!0````")PL9#)"&+0S@E____`#WA`0\`=2*^`````$B)W^@`````N@````!(
+MB=Y,B>?H`````.D+`P``B=`/MTLR@^$?2-/XJ`%T&[X!````2(G?Z`````!,
+MB>?H`````&9FD&9FD`^VA>````"#^`0/A]`"``")P/\DQ0````#&A>`````!
+MN@$```!(B=Y,B>_H`````.FK`@``QH7@`````KH(````2(G>3(GOZ`````#I
+MCP(``,:%X`````-(B>J^(0```$R)[^@`````2(-]4`!T(`^V57E(BW500;@`
+M````N0$```!,B>_H`````.E1`@``00^V=0VZ`````$R)Y^@`````Z3H"``#&
+MA>`````$2(-]4`!T,$B)ZKXA````3(GOZ``````/ME5Y2(MU4$&X`````+D"
+M````3(GOZ`````#I_`$``+H`````OB$```!,B>_H`````$$/MG4-N@$```!,
+MB>?H`````.G3`0``2(GJO@8```!,B>_H`````$B#?3@`=!9(BT4XBT@$C5$!
+MB5`$@_D%#X:F`0``QD5#`<9%0@"`?7L`=!A,B>?H`````+\!````Z`````"`
+M?7L`=>A(@WU0`'082(M5&$B+11!(B5`(2(D"2(M%4/Y(6.L92(-]6`!T$DB+
+M55A(#[9%>4C'1,)8`````$B+50A(BT4`2(E0"$B)`D'^30Y(@[T8`0```'08
+M#[:U!0$``$B+O1@!``"Z`0```.@`````2(-]4`!T$@^V=7E(BWU0N@$```#H
+M`````$B#?3@`#X2"````2(M%.$C'0&``````0?Z$).\3``!,B>?H`````$B+
+M13@/MG`!N@$```!,B>?H`````$B+13@/ME`"#[9P`4C'QP````"X`````.@`
+M````2(M5.$F+M"30"```OP$```#H`````$B+53A)B[0DT`@``+\&````Z```
+M``!(QT4X`````$B)[DR)Y^@`````08!]"?]T6T&^`````$&`?0X`=CE)C5U@
+M2(G?Z`````!(B<5(BT,(2(EK"$B)70!(B44(2(DH@'U"_W4+0?_&13AU#G?3
+MZP9%.'4.=Q5!QD4)_TR)[DR)Y^@`````9F:09I!(BQPD2(ML)`A,BV0D$$R+
+M;"083(MT)"!(@\0HPV9FD$B#[#A(B5PD"$B);"003(ED)!A,B6PD($R)="0H
+M3(E\)#!(B?-(B?U,BV=(38LL)$&_`````$'V1"0,$'0'QH?@````!@^VA>``
+M``"#^`$/A(L```"#^`%_"X7`=!YFD.G[`P``@_@$#X2B````@_@&#X3Y`0``
+MZ>0#``#&A>`````!2(GN3(GOZ`````#&0R2!08!,)`P(2(.[@`````!T#TB-
+MLX````!,B>_H`````$F-E>@```!)BX7H````2(E8"$B)`TB)4PA)B9WH````
+M3(GOZ`````#I@@,``&:008!D)`SW_H7C````QH7@`````,9#)`)(B=Y,B>_H
+M`````$R)[^@`````Z5$#``"0QH7C`````$B#?3@`#X1.`0``2(M%.(M(!(U1
+M`8E0!(/Y!0^'.`$``$&`9"0,]TB#NX``````=`](C;.`````3(GOZ`````!)
+MC97H````28N%Z````$B)6`A(B0-(B5,(28F=Z````$&`3"0,$$B#?5``="`/
+MME5Y2(MU4$&X`````+D"````3(GGZ`````#IO`(``,9$)`<`08!\)`X`#X:G
+M````38UT)&!F9I!F9I!,B??H`````$B)PTF+1@A)B5X(3(DS2(E#"$B)&$B#
+M>S@`=!Q(BU,X28NUT`@``+\%````Z`````"`2T0"9F:02(G:O@8```!,B>?H
+M`````(![>P!T,D2)^$'_QSU_EI@`=R5,B>_H`````+\!````Z`````"`>WL`
+M=`U$B?A!_\<]?Y:8`';;_D0D!P^V1"0'03A$)`X/AV3____&14(#2(GN3(GO
+MZ`````#I\`$``$F-E>@```!)BX7H````2(E8"$B)`TB)4PA)B9WH````2(-]
+M.`!T%DB+13B+2`2-40&)4`2#^04/AI8!``!(Q\<`````N`````#H`````$B)
+MZKX&````3(GGZ`````!!_DPD#DB+50A(BT4`2(E0"$B)`DB#?5``=!A(BT50
+M_DA82(M5&$B+11!(B5`(2(D"ZQ](@WU8`'082(M56$@/MD5Y2,=$PE@`````
+M9F:09F:0@'U[`'0R1(GX0?_'/7^6F`!W)4R)[^@`````OP$```#H`````(!]
+M>P!T#42)^$'_QSU_EI@`=MM(BU4(2(M%`$B)4`A(B0)(@[T8`0```'0?#[:U
+M!0$``$B+O1@!``"Z`0```.@`````9F9FD&9FD$B#?5``=!D/MG5Y2(M]4+H!
+M````Z`````!F9F:09F:02(-].`!T?TB+13A(QT!@`````$'^A>\3``!,B>_H
+M`````$B+13@/MG`!N@$```!,B>_H`````$B+13@/ME`"#[9P`4C'QP````"X
+M`````.@`````2(M5.$F+M=`(``"_`0```.@`````2(M5.$F+M=`(``"_!@``
+M`.@`````2,=%.`````!(B>Y,B>_H`````.L02(GJO@(```!,B>?H`````$R)
+M[^@`````9F:09I!(BUPD"$B+;"003(MD)!A,BVPD($R+="0H3(M\)#!(@\0X
+MPV9F9I!F9I!F9I!F9I!!5D%505154TB)\TF)_$R+KX@```!)BVT`0?9%#!!T
+M!,9'409!#[9$)%&#^`$/A(D```"#^`%_#87`="!F9F:0Z7L#``"#^`0/A)H`
+M``"#^`4/A)<!``#I9`,``$'&1"11`4R)YDB)[^@`````QD,D@4&`30P(2(.[
+M@`````!T#TB-LX````!(B>_H`````$B-E>@```!(BX7H````2(E8"$B)`TB)
+M4PA(B9WH````2(GOZ`````#I!`,``$&`90SW0?Y$)%)!QD0D40#&0R0"2(G>
+M2(GOZ`````!(B>_H`````.G8`@``08!E#/=(@[N``````'0/2(VS@````$B)
+M[^@`````2(V%Z````$B+E>@```!(B5H(2(D32(E#"$B)G>@```"Z`````+X&
+M````3(GOZ`````!!#[9U#;H!````2(GOZ`````!!O@````!!@'T.``^&?```
+M`$V-96"03(GGZ`````!(B<-)BT0D"$F)7"0(3(DC2(E#"$B)&$B#>S@`=!I(
+MBU,X2(NUT`@``+\%````Z`````"`2T0"D$B)VKX&````3(GOZ`````"`>WL`
+M=!A(B>_H`````+\!````Z`````"`>WL`=>A!_\9%.'4.=XE!QD4)`$&`30P0
+M3(GOZ`````#IT@$``$&`90SW2(.[@`````!T#TB-LX````!(B>_H`````$B-
+MA>@```!(BY7H````2(E:"$B)$TB)0PA(B9WH````28U%8$B)PDDY16`/A.$`
+M``!)B<9(B=?H`````$B)PTB#>#@`=!Y(BU`X2(NUT`@``+\%````Z`````"`
+M2T0"9F:09I!(B=J^!@```$R)[^@`````@'M[`'082(GOZ`````"_`0```.@`
+M````@'M[`'7H2(-[.`!T84B+0SA(QT!@`````/Z%[Q,``$B)[^@`````2(M#
+M.`^V<`&Z`0```$B)[^@`````2(M3.$B+M=`(``"_`0```.@`````2(M3.$B+
+MM=`(``"_!@```.@`````2,=#.`````!(B=Y(B>_H`````$R)\DTY=6`/A2+_
+M__^Z`````+X&````3(GOZ`````!,B>9(B>_H`````$G'14``````2(M%`(N0
+M6`$``(D5`````(72=`I(BT4`B9!8`0``0?9%"@%T6$&^`````(!]0P!V&TD/
+MME4-2(G01(GQ2-/XJ`%U"4'_QD0X=4-WZD$/MO9(B>_H`````$R)[DB)[^@`
+M````1(GR#[;"2&O`:$C'A"A($@```````&9F9I!;74%<05U!7L-F9F:09F:0
+M05=!5D%505154TB#[`A)B?Q,BW=(28L>2(G^2(G?Z`````!!@+PDXP````%V
+M"4'&A"3@````!$F-;"0@23EL)"`/A#D"``!(B>_H`````$F)QTF+1"0@3(EX
+M"$F)!TF);PA-B7PD($&]`````.G6`0``00^WU4B+@Y`)``!(BRS02(7M#X2[
+M`0``00^W1"0P9CM%(`^%JP$```^WBSH2``!(BX-0$0``.0AT5&9F9I#_P0^W
+M@SX2```YR+@`````#T;(C5$!2(N#4!$``(L$D*D```@`=1XE_P\``&9!.<5U
+M$TDY[W492(G?Z`````"0Z8L!``!(BX-0$0``.0AUL$&`?E@`#X4Z`0``9H%]
+M((4`#X<N`0``2`^W12"`O!A`"```_P^$&P$``$V%Y`^$``$``$D/MD0D0*@!
+M#X3R````J`0/A.H```!(BQ,/MT4R9L'H!0^WP(T$A0`#``")@G`!``!(BP,/
+MMTTR@^$?N@$```!(B=9(T^:)L'0!``!(#[=-,DB+@Y`)``!(QP3(``````^W
+M33*)R&;!Z`4/M\"#X1](B=9(T^9(B?'WT2&,@Y@)```/MTTRB<AFP>@%#[?`
+M@^$?2-/B]](A5(-<3#G]=$E(BU4(2(M%`$B)4`A(B0)(@[V``````'0/2(VU
+M@````$B)W^@`````2(V3Z````$B+@^@```!(B6@(2(E%`$B)50A(B:OH````
+M#[=U,DB-NU@/``#H`````$'^3"1[ZQ)!]D8*`G0+2(GN3(GGZ`````!!_\5F
+M1#EK6`^''_[__TV%Y'0H20^V1"1`J`%T'J@$=!I)BU<(28L'2(E0"$B)`DR)
+M_DR)Y^@`````D$B#Q`A;74%<05U!7D%?PY!!5D%505154TF)_$R+MX@```!)
+MBQY(B?Y(B=_H`````$&`?"12`78&0<9$)%$$28UL)"A).6PD*`^$\@$``$B)
+M[^@`````28G%28M$)"A,B6@(28E%`$F);0A-B6PD*+T`````Z9L!``!F9F:0
+M9F:0#[?52(N#D`D``$B+--!(A?8/A'L!``!!#[=$)$!F.T8@#X5K`0``#[>+
+M.A(``$B+@U`1```Y"'179F9FD&9FD/_!#[>#/A(``#G(N``````/1LB-40%(
+MBX-0$0``BP20J0``"`!U'B7_#P``9CG%=11).?5U&DB)W^@`````9I#I.P$`
+M`$B+@U`1```Y"'6P9H%^((4`#X?V````2`^W1B"`O!A`"```_P^$XP```$&`
+M?E@`#X78````0?9&"@$/A,T```!(BQ,/MT8R9L'H!0^WP(T$A0`#``")@G`!
+M``!(BP,/MTXR@^$?N@$```!(B==(T^>)N'0!``!(#[=.,DB+@Y`)``!(QP3(
+M``````^W3C*)R&;!Z`4/M\"#X1](B==(T^=(B?GWT2&,@Y@)```/MTXRB<AF
+MP>@%#[?`@^$?2-/B]](A5(-<3#GN="Y(BU8(2(L&2(E0"$B)`DB-D^@```!(
+MBX/H````2(EP"$B)!DB)5@A(B;/H````#[=V,DB-NU@/``#H`````$'^3"1%
+M_\5F.6M8#X=B_O__0?9&"@%T&TF+50A)BT4`2(E0"$B)`DR)[DR)Y^@`````
+MD%M=05Q!74%>PV9F9I!F9I!!5T%6055!5%532(/L"$B)_4&^`````$B-A^@`
+M``!(B<)(.8?H````#X33`0``28G'28G%28G42(G7Z`````!(B<-(@WAP`'4O
+M2(GOZ`````!(B4-P2(7`=1Y(BX7H````2(E8"$B)`TR)8PA(B9WH````Z8D!
+M``"+0S@E____`#WA`1``#X3L````9H%[((``#X3@````9@^V0R!FB4,@9H/X
+M?W8:9H%[..$!=2D/MD,Z@^@1/`%W'F9F9I!F9I!F@7L@A0!W#T@/MT,@@+PH
+M0`@``/]U&<9#)`9(B=Y(B>_H`````.D&`0``9F:09I!F@7LXX0%U"P^V0SJ#
+MZ!$\`78O2(N5&`D``$R-LGB&`0!F@7L@A0!W&4@/MT,@2`^VA"A`"```2&G`
+MB`$``$R--`)F@7LXX0%U"@^V0SK_R#P!=C-F@7L@@`!T*V:!>SCA`74+#[9#
+M.H/H$3P!=AA!]D9#!'41QD,D!DB)WDB)[^@`````ZWI(B=Y(B>_H`````(/X
+M`G<+@_@!<R9F9F:0ZQ"#^`-T3V9FD&9FD&9FD.M/2(G>2(GOZ`````!F9I#K
+M/TB#NX``````=`](C;.`````2(GOZ`````!(BX7H````2(E8"$B)`TR)>PA(
+MB9WH````ZQM(B=Y(B>_H`````$R)ZDPYK>@````/A3/^__](@\0(6UU!7$%=
+M05Y!7\-!5T%6055!5%532(/L2$F)_4"(="0P2`^V5"0P2&O2:$@!^DR+LD@2
+M``!(Q\#^____B?%(T\`B@FD2``"(1"0O3(L_QT0D*`````!`@/X#=@U!QX=P
+M`0``Q`$``.L+0<>'<`$``*@!``!!BX=T`0``B04`````#[9,)#"#X0.[!P``
+M`-/CB<4)W4&)KW0!``"_Z`,``.@`````]],AW4&)KW0!``"`?"0P`W8@#[9$
+M)#!(P>`")?P#``!"BX0XT`$``(D%`````(G%ZQX/MD0D,$C!X`(E_`,``$*+
+MA#C0`0``B04`````B<6#S0B`?"0P`W88#[9$)#!(P>`")?P#``!"B:PXT`$`
+M`.L6#[9$)#!(P>`")?P#``!"B:PXT`$``(!\)#`#=AP/MD0D,$C!X`,E^`<`
+M`$+'A#@``@``.````.L:#[9$)#!(P>`#)?@'``!"QX0X``(``#@```"_$"<`
+M`.@`````@'PD,`-V'`^V1"0P2,'@`R7X!P``0L>$.`0"````````ZQH/MD0D
+M,$C!X`,E^`<``$+'A#@$`@```````$V%]@^$[@<``$&\`````$&`?4,`=BUF
+M9F:020^V1@U!#[;,2-/XJ`%T$+H!````B<Y,B>_H`````)!!_\1%.&5#=]=!
+M]D8*`71B3(GV3(GOZ``````/MG0D,$R)[^@`````2`^V1"0P2&O`:$J-E"A@
+M$@``BT(,J0``$`!T""7__^__B4(,3(GV3(GOZ`````!(#[9$)#!(:\!H2L>$
+M*$@2````````Z4L'``!!@'Y8`'0328N]:!```$R)]N@`````0?Y.6(!\)"\`
+M#X2I`@``2,=$)"``````QD0D'P`/MG0D,$R)[^@`````2`^V1"0P2&O`:$J-
+ME"A@$@``BT(,J0``$`!T""7__^__B4(,#[9$)"]!B$8-0;P`````08!]0P`/
+MAI,!``!(#[94)"](B50D$`^VR(E,)`Q!#[;,2(M$)!!(T_BH`0^$8`$``$2)
+MX@^VPDAKP&@/ME0D+T*(E"AI$@``08#\`W87C03-`````$B80L>$.``"```X
+M````ZQE*C03E`````"7X!P``0L>$.``"```X````OQ`G``#H`````$&`_`-V
+M&TJ-!.4`````)?@'``"+3"0,0HF,.`0"``#K&4J-!.4`````)?@'``"+5"0,
+M0HF4.`0"``!!@/P#=@U!QX=P`0``Q`$``.L+0<>'<`$``*@!``!!BX=T`0``
+MB04`````1(GA@^$#NP<```#3XXG%"=U!B:]T`0``O^@#``#H`````/?3(=U!
+MB:]T`0``08#\`W8?2HT$I0`````E_`,``$*+A#C0`0``B04`````B<7K'4J-
+M!*4`````)?P#``!"BX0XT`$``(D%`````(G%@\T(08#\`W872HT$I0`````E
+M_`,``$*)K#C0`0``ZQ5*C02E`````"7\`P``0HFL.-`!``!!_\1%.&5##X=_
+M_O__28U&2$B)PDDY1DAT-DB)TTB)U^@`````2(U(R$B)3"0@2(M3"$B)0PA(
+MB1A(B5`(2(D"2(-XV`!T"4B)VDDY7DAURDB#?"0@`'1%2(M$)"#&0%H`0;P`
+M````08!]0P!V+TD/MD8-1(GA2-/XJ`%T%T@/MD0D'TB+5"0@1(AD$'#^0EK^
+M1"0?0?_$13AE0W?1N@````"^@0```$R)]^@`````2`^V1"0P2&O`:$K'A"A(
+M$@```````.EH`P``N@````"^!@```$R)]^@`````#[9T)#!,B>_H`````$@/
+MMD0D,$AKP&A*C90H8!(``(M"#*D``!``=`@E___O_XE"#$F-1DA(B<)).49(
+M#X3L`0``2(D$)$B)U^@`````3(U@R$B-4!!(.5`0#X2Q`0``28U\)$CH````
+M`$B-6/"`>T$-=1I(C;!(`0``2(M#2$B+`$B+>"CH`````&9FD$B+4PA(BP-(
+MB5`(2(D"@'M[`'083(GOZ`````"_`0```.@`````@'M[`'7H2(-[.``/A"@!
+M``!(BT,X2,=`8`````"`>WL`#X29````O0````!F08-]6``/A(@```!FD$AC
+MU4F+A9`)``!(BS302(7V=&0/MT8@9CM#,'5:9CV%`'=4#[?`0H"\*$`(``#_
+M=$9)BU4`#[=&,F;!Z`4/M\"-!(4``P``B8)P`0``28M%``^W3C*#X1^Z`0``
+M`$C3XHF0=`$``,9&)"&Z`````$R)[^@`````_\5!#[=%6#GH#X]Z____]D-$
+M!'4D0?Z%[Q,``$R)[^@`````2(M#.`^V<`&Z`0```$R)[^@`````2(M#.`^V
+M4`(/MG`!2,?'`````+@`````Z`````!(BU,X28NUT`@``+\!````Z`````!(
+MBU,X28NUT`@``+\&````Z`````!(QT,X`````$'^3@Y!_DPD6$B)WDR)[^@`
+M````28U$)$A).40D2`^%3_[__T'^3BA,B>9,B>_H`````$B+%"1).59(#X48
+M_O__28U&8$B)PDDY1F`/A/8```!(B<5(B=?H`````$B)PX!X>P!T-HM$)"C_
+M1"0H/7^6F`!W)TR)[^@`````OP$```#H`````(![>P!T#XM$)"C_1"0H/7^6
+MF`!VV4B#>S@`#X2%````2(M#.$C'0&``````]D-$!'4D0?Z%[Q,``$R)[^@`
+M````2(M#.`^V<`&Z`0```$R)[^@`````2(M#.`^V4`(/MG`!2,?'`````+@`
+M````Z`````!(BU,X28NUT`@``+\!````Z`````!(BU,X28NUT`@``+\&````
+MZ`````!(QT,X`````$'^3@Y(B=Y,B>_H`````$B)ZDDY;F`/A0W___],B?9,
+MB>_H`````$@/MD0D,$AKP&A*QX0H2!(```````!!O`````!!@'U#``^&!`$`
+M`$P/MG0D+Y!,B?)$B>%(T_I$.F0D,`^4P`G0J`$/A-4```!!@/P#=@U!QX=P
+M`0``Q`$``.L+0<>'<`$``*@!``!!BX=T`0``B04`````1(GA@^$#C0Q)NP<`
+M``#3XXG%"=U!B:]T`0``O^@#``#H`````/?3(=U!B:]T`0``08#\`W8?2HT$
+MI0`````E_`,``$*+A#C0`0``B04`````B<7K'4J-!*4`````)?P#``!"BX0X
+MT`$``(D%`````(G%@\T(08#\`W872HT$I0`````E_`,``$*)K#C0`0``ZQA*
+MC02E`````"7\`P``0HFL.-`!``!F9I!!_\1%.&5##X<#____2(/$2%M=05Q!
+M74%>05_#9F9FD$B#[`A,BP>Z`````$&`>$,`=AP/ML)(:\!H2HV$`$`2``!(
+M.?AT"/_"03A00W?D#[;"2&O`:$P!P$B+L$@2``!(A?9T:_9&"@)T94@%0!(`
+M`$@Y1B!U68!^6`!T*/Y&6.M._D9800^VB;L```!)B[AH$```2<?``````$R)
+MRN@`````ZRM(BU9(3(U*R$B-1DA(.<)T&DB)PDF#>1``=,))BT$X3(U(R$@Y
+MT'7L9F:02(/$",-F9F:09F9FD&9FD$%505154TB#[`A!B?1)B?V[`````(GR
+M#[;"2&O`:$B-%#A(BZI($@``2(7M#X2!`0``2,?`_O___XGQ2-/`A$4-#X5L
+M`0``2(U%2$@Y14AT$4B-ND`2``#H`````.G^`@``0;P`````@'T.``^&[@(`
+M`$B-76!(B=_H`````$B)P4B+0PA(B4L(2(D92(E!"$B)"(!Y00`/A00!``!(
+M#[=!,$F#O,5`!````'4+2(-Y.``/A-,```!(#[=!,$F+A,5`!```2(.X@```
+M```/A*$```#&@>``````2`^V04"H`G0MJ`1T*:@!="7&04(%QD%#!`^V47E(
+MBW%02(MY2.@`````Z9@```!F9F:09F:02`^V04"H`G4GJ`1F9I!FD'0>J`%T
+M&L9!0@/&04,$2(G.3(GOZ`````#K9F9FD&:02`^V04"H`G18J`1F9I!FD'1/
+MJ`%U2\9!0P;&04(%9L>!P```````2(G.3(GOZ`````#K+4B+43A)B[70"```
+MOP0```#H`````.L62`^W43!)B[70"```OP(```#H`````$'_Q$0X90X/A\C^
+M___IK0$``&:!^_,!=V=*C02E`````$B)Q8'E_`,``&9FD&:0OQ`G``#H````
+M`$&`_`-V($F+10"+A"C0`0``B04`````J0``$`!U*>L>9F:09F:028M%`(N$
+M*-`!``")!0````"I```0`'4)_\-F@?OS`7:O00^V]$R)[^@`````3(GOZ```
+M``!$B>(/ML)(:\!H2HNL*$@2``!(A>T/A!`!``"[`````$&`?4,`=BQF9F:0
+M2`^V10T/MLM(T_BH`701N@````")SDR)[^@`````9I#_PT$X74-WV$2)X0^V
+MP4AKP&A*C80H0!(``$B)12!(C45(2#E%2'4.2(U%8$@Y16`/A(8```"^````
+M`$&\`````$B-14A(B<)(.45(=#-FD$B)TTB)U^@`````2(UPR$B+4PA(B4,(
+M2(D82(E0"$B)`DB#>-@`=`E(B=I(.5U(=<](A?9T6L9&6@"Y`````$&`?4,`
+M=DI(#[9%#4C3^*@!=!!$B>(/ML*(3#!P_D9:0?_$_\%!.$U#=]SK)/9%"@%T
+M#4B)[DR)[^@`````ZQ&^`````$B)[^@`````9F9FD$B#Q`A;74%<05W#9F:0
+M9I!(@^P(2(GX2(L_9L=`3B``2(G&Z`````!(@\0(PV9FD%-(BP]$BT<PNP``
+M``"`>4,`=AL/ML-(:\!H2(V$"$`2``!(.?AT!__#.%E#=^6`^P-V+4B-!)T`
+M````)?P#``!(BQ&+A`+0`0``B04`````J0``$`!U+>L[9F9FD&9FD$B-!)T`
+M````)?P#``!(BQ&+A`+0`0``B04`````J0``$`!T$`^V\T2)PDB)S^@`````
+MZPL/MO-(B<_H`````%O#9F9FD&9F9I!F9F:09F:02(N'P!```(L`B04`````
+M2(N'P!```(M`!(D%`````$B+A\`0``"+0`B)!0````!(BX?`$```BT`,B04`
+M````PT%7059!54%455-(@^P8B70D%$F)_$&^`````(!_0P`/ADD(``"+="04
+M00^VUHU*"$B)\$C3^*@!=1&-2A!(B?!(T_BH`0^$%0@``$&`_@-V)TJ-!/4`
+M````)?@'``!)BQ0DBX0"@`$``(D%`````*D```@`=2?K0TJ-!/4`````)?@'
+M``!)BQ0DBX0"@`$``(D%`````*D```@`=!Y,B>?H`````$2)\@^VPDAKP&A"
+M@8P@<!(`````"`!)BS0D1(GQ08#^`W8H2HT$]0`````E^`<``(N$,(`!``")
+M!0````")PH'B```!`.LF9F9FD$B-!,T`````)?@'``"+A#"``0``B04`````
+MB<*!X@```0"%TG11@/D#=AI(C03-`````"7X!P``QX0P@`$``````0#K&$B-
+M!,T`````)?@'``#'A#"``0`````!`(72=!9$B?$/ML%(:\!H0H&,('`2````
+M``$`08!\)%$!#X5M!@``08#^`W8G2HT$]0`````E^`<``$F+%"2+A`*``0``
+MB04`````J`%U*^DJ`0``2HT$]0`````E^`<``$F+%"2+A`*``0``B04`````
+MJ`$/A`0!``!$B?(/ML)(:\!H2HT<($B-LW@2``!)BWPD*.@`````2(.[2!(`
+M```/A($```!,BZM($@``0;\`````08!]#@!V9DF-;6!F9I!FD$B)[^@`````
+M2(G#2(M%"$B)70A(B2M(B4,(2(D8]D-$`G4Q2(-[.`!T&DB+4SA)B[0DT`@`
+M`+\%````Z`````"`2T0"2(G:O@8```!,B>_H`````$'_QT4X?0YWH[H@H0<`
+MZR!!#[;VN@$```!,B>?H`````+^@A@$`Z`````"Z`"TQ`42)\0^VP4AKP&A,
+M`>!(C;!X$@``B9!X$@``2,=&$`````!(!4`2``!(B48828M\)"CH`````$&`
+M_@-V($J-!/4`````)?@'``!)BQ0DBX0"@`$``(D%`````.L>2HT$]0`````E
+M^`<``$F+%"2+A`*``0``B04`````08#^`W8L2HT$]0`````E^`<``$F+%"2+
+MA`*``0``B04`````J8````!U,.G"````9I!*C03U`````"7X!P``28L4)(N$
+M`H`!``")!0````"I@`````^$EP```$&`_@-V(DJ-!/4`````)?@'``!)BQ0D
+MBX0"A`$``(D%`````(G&ZR!*C03U`````"7X!P``28L4)(N$`H0!``")!0``
+M``")QD&`_@-V(DJ-!/4`````)?@'``!)BPPDB?*!R@```0")E`&$`0``ZR=*
+MC03U`````"7X!P``28L,)(GR@<H```$`B90!A`$``&9F9I!F9I!!@/X#=BI*
+MC03U`````"7X!P``28L4)(N$`H`!``")!0````"I```$`'4NZ48"``!*C03U
+M`````"7X!P``28L4)(N$`H`!``")!0````"I```$``^$'0(``$&`_@-V(DJ-
+M!/4`````)?@'``!)BQ0DBX0"@`$``(D%`````(G&ZR!*C03U`````"7X!P``
+M28L4)(N$`H`!``")!0````")QH'.```$`$&`_@-V&DJ-!/4`````)?@'``!)
+MBQ0DB;0"@`$``.L82HT$]0`````E^`<``$F+%"2)M`*``0``1(GR#[;"2&O`
+M:$J#O"!($@````^%B````$&`_@-V(DJ-!/4`````)?@'``!)BQ0DBX0"@`$`
+M`(D%`````(G!ZR!*C03U`````"7X!P``28L4)(N$`H`!``")!0````")P4&`
+M_@-V'4J-!/4`````)?@'``!)BQ0DB8P"@`$``.D+`P``2HT$]0`````E^`<`
+M`$F+%"2)C`*``0``Z>X"``!$B?$/ML%(:\!H3HNL($@2``!)@WU```^$V0``
+M`$F+14!(#[=03O;&`0^%QP```$B)Q?;"`@^$M0```$B-L)````!)BWPD*.@`
+M````0;X`````@'T[`'9I1(GR#[;"2(M<Q5A(A=MT4$B#>S@`=!I(BU,X28NT
+M)-`(``"_!0```.@`````@$M$`DB)VKX&````3(GOZ`````"`>WL`=!F03(GG
+MZ`````"_`0```.@`````@'M[`'7H0?_&1#AU.W>7QX60````(*$'`$C'A:``
+M````````2(FMJ````$B-M9````!)BWPD*.@`````ZP9F@4A.@`!!@/X#=BA*
+MC03U`````"7X!P``28L4)(N$`H`!``")!0````#VQ`%U+.D\`0``2HT$]0``
+M```E^`<``$F+%"2+A`*``0``B04`````]L0!#X05`0``08#^`W8G2HT$]0``
+M```E^`<``$F+%"2+A`*``0``B04`````J`%T*^GH````2HT$]0`````E^`<`
+M`$F+%"2+A`*``0``B04`````J`$/A<(```!$B?%$#[;I36OM:$^-K"5`$@``
+M28-]"``/A*0```!)BT4(2(E$)`A)C74X28M\)"CH`````$&_`````$B+5"0(
+M@'H.`'932(G52(/%8$B)[^@`````2(G#2(M%"$B)70A(B2M(B4,(2(D82(-[
+M.`!T&DB+4SA)B[0DT`@``+\%````Z`````"`2T0"0?_'2(M,)`A$.'D.=[1!
+MQT4X@(0>`$G'14@`````38EM4$F-=3A)BWPD*.@`````9F9FD&9FD$&`_@-V
+M(DJ-!/4`````)?@'``!)BQ0DBX0"@`$``(D%`````(G!ZR!*C03U`````"7X
+M!P``28L4)(N$`H`!``")!0````")P4&`_@-V&DJ-!/4`````)?@'``!)BQ0D
+MB8P"@`$``.L82HT$]0`````E^`<``$F+%"2)C`*``0``0?_&13AT)$,/A[?W
+M__](@\086UU!7$%=05Y!7\-F9I!!5T%6055!5%532(/L&$B)_4F)]4B+EQ@)
+M``!,C:)XA@$`9H%^((4`=QE(#[=&($@/MH0X0`@``$AIP(@!``!,C20"00^V
+M1"1JP>`(2)A(BY7`$```BX0"0`@``(D%`````$&)QD'![A!!B<=!P>\800^V
+M1"1JP>`(2)A(BY7`$```BX0"1`@``(D%`````(A$)!!(C70D$(G"P>H(B%8!
+MP>@0B$8"00^V1"1JP>`(2)A(BY7`$```BX0"2`@``(D%`````(A&`XG"P>H(
+MB%8$P>@0B$8%QD8&`,9&!P"+3"0000^VUT$/MMY$BT8$B=Y(Q\<`````N```
+M``#H`````$6$]@^5P(/S`878=!)!QD4D`+@`````Z;,"``!F9I!!@'TD@74I
+M00^VUT$/MO9(C4PD$$R)[^@`````0<9%)`*X`````.F%`@``9F:09I!!BT4X
+M)?___P`]X0$.`'400<9%)"&X`````.EA`@``D$'VA98````!=19!]L8!=!!!
+M@'PD0O\/A2<"``!F9F:03(GF2(GOZ`````!,B>9(B>_H`````$B+50!!#[=%
+M,F;!Z`4/M\"-!(4``P``B8)P`0``2(M%`$$/MTTR@^$?N@$```!(B=-(T^.)
+MF'0!``!)#[=-,DB+A9`)``!(QP3(`````$$/MTTRB<AFP>@%#[?`@^$?2(G3
+M2-/C2(G9]]$AC(68"0``00^W33*)R&;!Z`4/M\"#X1](T^+WTB%4A5Q)BU4(
+M28M%`$B)4`A(B0)!#[=U,DB-O5@/``#H`````$'^3"1[0<9%)(%)@[V`````
+M`'0/28VU@````$B)[^@`````28U$)"!(B<)).40D(`^$!@$``$&^`0```$B-
+MA>@```!(B40D"$F)UV9F9I!(B=?H`````$B)PTB+50`/MT`R9L'H!0^WP(T$
+MA0`#``")@G`!``!(BT4`#[=+,H/A'TR)\DC3XHF0=`$``$@/MU,R2(N%D`D`
+M`$C'!-``````#[=+,HG(9L'H!0^WP(/A'TR)\DC3XDB)T??1(8R%F`D```^W
+M2S*)R&;!Z`4/M\"#X1],B?)(T^)(B='WT2%,A5P/MW,R2(V]6`\``.@`````
+M0?Y,)'M(@[N``````'0/2(VS@````$B)[^@`````2(N%Z````$B)6`A(B0-(
+MBT0D"$B)0PA(B9WH````3(GZ33E\)"`/A1/___]!@:64````___^_T'&A"3@
+M````!$R)[DR)Y^@`````N`$```#K'4$/MM=!#[;V2(U,)!!,B>_H`````+@`
+M````9F:02(/$&%M=05Q!74%>05_#D$B#[$A(B5PD&$B);"0@3(ED)"A,B6PD
+M,$R)="0X3(E\)$!(B50D$(GU2(L?3(NS\!```$&]`````$B%T@^$!0,```^W
+MUDAIPK`$``!"]D0P(0)T$4B+@Y`)``!(BP30QD`D`NL2#[?&2(N3D`D``$B+
+M!,+&0"0A#[?%2(N3D`D``$B+%,*+0C@E____`#WA`1``#X2X`0``N/____]F
+M@7H@A0!W#4@/MT(@#[:$&$`(```\_W4:#[?%2(N3D`D``$B+!,+&0"0&Z3,)
+M``!F9I`/ML!(:<"(`0``28G%3`.K&`D``(!\)!,`>6])#[9%0*@"="RH!'0H
+MJ`%T)$B+`XN`6`$``(D%`````(G"A<!T#TB+`XF06`$``&9FD&9FD$B+`XN`
+M4`$``(D%`````(G"@\H"2(L#B9!0`0``2(L#BX`$`0``B04`````B<*`SO](
+MBP.)D`0!```/M\5(:<"P!```9D+W1#`@`@@/A-X```!!N`````"^`````(![
+M0P!V?$&Y`0```&9F9I!F9I!(#[9'#4`/MLY(T_BH`7170(#^`W8BC02-````
+M`$B82(L3BX0"T`$``(D%`````*D``!``=2;K+TB-!+4`````)?P#``!(BQ.+
+MA`+0`0``B04`````J0``$`!T"TR)R(GQ2-/@00G`_\9`.'-#=Y%%A,!T3$0X
+M1PUU1HGH9L'H!0^WP(M$@UR)Z8/A'TC3^*@!=2U!@+W@`````G<(0<:%X```
+M``,/M\5(BY.0"0``2(LTPDR)[^@`````Z;`'``#V1"03`0^$I0<```^WQ4B+
+MDY`)``!(BSS"QD<D(8M'."7___\`/>$!#@`/A(`'``!!#[9%:L'@"$B82(N3
+MP!```(N$`D`(``")!0````")QL'N$$&)P$'!Z!A!#[9%:L'@"$B82(N3P!``
+M`(N$`D0(``")!0````"(1"0(2(U,)`B)PL'J"(A1`<'H$(A!`D$/MD5JP>`(
+M2)A(BY/`$```BX0"2`@``(D%`````(A!`XG"P>H(B%$$P>@0B$$%QD$&`,9!
+M!P#VAY8````!=1A`#[;V0/;&`70.00^VT.@`````Z<D&``!(B?Y(B=_H````
+M`.FY!@``#[?62(N#D`D``$B+!-!F@7@XX0$/A2\!```/MD@Z@_D0#X>2!@``
+MN`$```!(T^"IP#````^%\@```*D`@```=0VI```!`'5?D.EK!@``#[?62(N#
+MD`D``$B+#-!,:<*P!```0P^V1#`SB$$D2(N#D`D``$B+!-#V0",$#X0X!@``
+M@'@D``^$+@8``$B#>%``#X0C!@``2(M04$,/MD0P,X@"Z1(&```/M]9(:=*P
+M!```1`^WYDB+@Y`)``!*BPS@0@^V1#(JB$$D2(N#D`D``$J+!.!(@WA(``^$
+MV@4``$(/MKPR(00``.@`````B<)(BX.0"0``2HL$X#M0-'8#BU`T#[?U2(N#
+MD`D``$B+!/!(BWA(B=)(:?:P!```2HUT-BCH`````.F-!0``#[?&2(N3D`D`
+M`$B+!,+&0"0`Z78%``!F9I!F9I`/M]9(BX.0"0``3(LDT$V+?"1HN/____]F
+M08%\)""%`'<.20^W1"0@#[:$&$`(```/ML!(:<"(`0``28G%3`.K&`D``$'&
+MA>``````20^V14"H`@^$EP$``*@$#X2/`0``J`$/A(<!``!!QD0D)`!!BY0D
+ME````$C!ZA5-A?\/E<`/ML"%P@^$Y`0``$'VAZD````"#X2=````28._H```
+M``!T&$F+OZ````!!BU0D-$F+="1(Z`````#K>TF#?"1(`'1S0;X`````28._
+ML`````!T$T'VAZD````!=0E-B[>P````ZR%(B[,@"@``N@$```!,B?]!_Y>X
+M````A<!T!TR+LR`*``!!@WPD-`!T)TF+;"1(28M^"$&+%DB)[N@`````08L&
+M2`'%28U&!$F#QA"#.`!TWD$/MD5JP>`(2)A(BY/`$```BX0"0`@``(D%````
+M`(G"P>H008B7FP```,'H&&9!B8>0````00^V16K!X`A(F$B+D\`0``"+E`)$
+M"```B14`````9@^VPF9!B8>4````#[;&9D&)AY8```")T,'H$&8/ML!F08F'
+MF````,'J&$&(EYH```!!#[9%:L'@"$B82(N3P!```(N$`DP(``")!0````!F
+M#[;`9D&)AY(```#IA0,``&9FD&:0#[?52&G*L`0``$(/MD0Q,X3`#X6_````
+M2(N#D`D``$B+!-#&0"0`08N4))0```!(P>H4387_#Y7`#[;`A<(/A#P#``!"
+M#[9$,3-!B(>2````00^VAZD```"H`@^$'P,``+T`````28._L`````!T#:@!
+M=0E)BZ^P````ZR%(B[,@"@``N@$```!,B?]!_Y>X````A<!T!TB+JR`*``!!
+M@WPD-``/A-8"``!)BUPD2)!(BWT(BU4`2(G>Z`````"+10!(`<-(C44$2(/%
+M$(,X`'3>Z:D"```\`@^%6`(```^W_4AI_[`$``!*C7PW0+Y_````0"(WQD0D
+M`P#&1"0"`,9$)`$`#[?%2&G`L`0``$*+1#`XB40D!$B-3"0$#[94)`3!XA@/
+MMD$!P>`0"<(/MD$"P>`("<(/MD$#08G500G%0(#^<78P08/]`78+#[9'`8/@
+M#XA$)`-!@_T"=@@/MD\"B$PD`D&#_0-V30^V?P-`B'PD`>M"08/]`G8+#[9'
+M`H/@#XA$)`-!@_T'=BL/MD<'@\`(03G%1`]'Z$&#_0QV"`^V3PR(3"0"08/]
+M#78)#[9_#4"(?"0!#[?U2(N#D`D``$B+#/"`>3``#Y7`187M#Y7"#[;`A<)T
+M2<9!)"!(BX.0"0``2(L$\$0X:#!S!40/MF@P#[?-2(N#D`D``$B+!,A(@WA0
+M`'0L2(MX4$2)ZDAI\;`$``!*C70V0.@`````ZQ(/M\5(BY.0"0``2(L$PL9`
+M)"*`?"0#!'42#[?%2(N3D`D``$B+!,+&0"0"23E<)"@/E<!-A?\/E<(/ML"%
+MP@^$&`$``$'VA"26````$'13#[?%2&G`L`0``$(/MD0P,T&(AY(```!!]H>I
+M`````G0R1(GH13AL)#!S!D$/MD0D,(3`=!Y)B[^@````#[;0#[?U2&GVL`0`
+M`$J-=#9`Z``````/MD0D`X/X"W==B<#_),4`````0<:'J@````'IF@```(!\
+M)`($#Y3`@'PD`0(/E,(/ML`AT(/X`1G`@^#Q@\`108B'J@```.MQ0<:'J@``
+M`!#K9T'&AZH````+ZUU!QH>J````!NM30<:'J@````WK23PH=1]!#[9%>__(
+M08A%>@^WU4B+@Y`)``!(BP30QD`D@>LF/`AU"K\0)P``Z``````/M\5(BY.0
+M"0``2(L$PL9`)"%F9I!F9I!(BUPD&$B+;"0@3(MD)"A,BVPD,$R+="0X3(M\
+M)$!(@\1(PV9F9I!F9I!F9I!F9I!54TB#[`A(B?M(B?U(BP>+@%`!``")!0``
+M``")QDB+!XFP4`$``/?&`/__`'0(2(GOZ#KI__](BP.+@%`!``")!0````")
+MQDB+`XFP4`$``/?&`/__`'7.N`````!(@\0(6UW#9F9FD&9F9I!F9F:005=!
+M5D%505154TB#[$A(B?U(B7PD.$0/MZ<Z$@``2(L'BX!``0``B04`````9B7_
+M#V:)ASH2``"X`````&9$.:<Z$@``#X0L!P``9H&_.A(``/\/#X2J!@``9D0Y
+MISH2```/A)P&``!(C8?H````2(E$)!A(C9?X````2(E4)!!(B50D"$B)%"1F
+M9F:09F:02(N-\!```$'_Q&9$.:4^$@``N`````!$#T;@00^WU$B+A5`1``"+
+M=)`$]\8```@`#X2A````2(M%`(N`4`$``(D%`````(G"2(M%`(F04`$``+L`
+M````]\(`__\`=%&^`````(!]0P!T1HG79D0/MD5##[?6C4H(2(GX2-/XJ`%U
+M#8U*$$B)^$C3^*@!=!0/M\9(:<"H````2(V<**`!``#K#?_&9D$Y\'?'9F:0
+M9I!(A=MU$$B+?"0XZ`````"0Z:$%``!(BWPD..@`````B$,/Z8\%``!!B?5F
+M08'E_P]!#[?%2&G0L`0``$B+?`H@2(N5D`D``$R+-,)-A?8/A&(%``#WQ@``
+M(``/A)$!``!!@'XD@0^%90$``$'&1B0A20^W5C)(BX60"0``2,<$T`````!!
+M#[=.,HG(9L'H!0^WP(/A'[H!````2-/B2(G1]]$AC(68"0``00^W3C*)R&;!
+MZ`4/M\"#X1^Z`0```$C3XDB)T??1(4R%7$$/MW8R2(V]6`\``.@`````28.^
+M@`````!T#TF-MH````!(B>_H`````&9!@7X@A0`/A\X```!)#[=&(("\*$`(
+M``#_#X2[````9D&#?B!_=R=(#[:$*$`(``!(BY48"0``2&G`B`$``$B+1!!(
+M@'@(_W5AZ8P```!F08%^(($`=RE)#[=&($@/MH0H0`@``$B+E6@)``!(:<#(
+M#P``2(M$$`B`>`C_=2SK6DD/MT8@2`^VA"A`"```2(N50`D``$AIP-````!(
+MBX00B````(!X"/]T,$R)]DB)[^@`````2(N%Z````$R)<`A)B09(BTPD&$F)
+M3@A,B;7H````Z>@#``!FD$F-1A!(BTPD$$B+40A(B4$(28E.$$B)4`A(B0+I
+MQ0,``$2)Z&;!Z`4/M\"+1(5<1(GI@^$?2-/XJ`$/A:8#``!!#[?52(N%D`D`
+M`$B+!-!F@7@@A0`/A[,```!(#[=0(("\*D`(``#_#X2@````9H-X(']W(D@/
+MMH0J0`@``$B+E1@)``!(:<"(`0``2(M$$$@/ME`(ZWQ!#[?52(N%D`D``$B+
+M!-!F@7@@@0!W)T@/MT`@2`^VA"A`"```2(N5:`D``$AIP,@/``!(BT00"`^V
+M4`CK/D$/M]5(BX60"0``2(L$T$@/MT`@2`^VA"A`"```2(N50`D``$AIP-``
+M``!(BX00B`````^V4`CK!;K_____@/K_=`T/ML*`O"C&"```_W5&1(GH9L'H
+M!0^WP(M$A5Q$B>F#X1](T_BH`0^%H@(``$'&1B0&O@````!,B??H`````+H`
+M````3(GV2(GOZ`````#I>P(```^VPD@/MIPHQ@@``$AIVZ@```!(C9PKH`$`
+M`$B%_W0(]\8```(`=06_`````/9#"@(/A($!``!!#[?U2(GZ2(G?Z`````!$
+MB>AFP>@%#[?`BT2%7$2)Z8/A'TC3^*@!#X46`@``08!^)($/A9$```!)#[=6
+M,DB+A9`)``!(QP30`````$$/MTXRB<AFP>@%#[?`@^$?N@$```!(T^)(B='W
+MT2&,A9@)``!!#[=V,DB-O5@/``#H`````$R)]DB)[^@`````28.^@`````!T
+M#TF-MH````!(B>_H`````$B+A>@```!,B7`(28D&2(M,)!A)B4X(3(FUZ```
+M`.EZ`0``0;\`````QD0D(`!(BX7X````2#E$)!!T$DB-E?@```!!_\=(BP!(
+M.<)U]46$_W0\2(M<)`A(B=_H`````$B-2/!(BU,(2(E#"$B)&$B)4`A(B0),
+M.?&X`0````^V5"0@#T30B%0D($'^SW7)@'PD(``/A0,!``!)C4802(M,)!!(
+MBU$(2(E!"$F)3A!(B5`(2(D"1(GH9L'H!0^WP$2)Z8/A'[H!````2-/B"92%
+MG````.G#````00^W]4B)^DB)W^@`````0;\`````QD0D(`!(BX7X````2#E$
+M)!!T$DB-E?@```!!_\=(BP!(.<)U]46$_W0[2(L<)$B)W^@`````2(U(\$B+
+M4PA(B4,(2(D82(E0"$B)`DPY\;@!````#[9,)"`/1,B(3"0@0?[/=<F`?"0@
+M`'5"08!^)(%T.TF-1A!(BTPD$$B+40A(B4$(28E.$$B)4`A(B0)$B>AFP>@%
+M#[?`1(GI@^$?N@$```!(T^()E(6<````9D0YI3H2```/A8SY__](C87X````
+M2(G"2#F%^````'130;P!````9F:02(G32(G7Z`````!(C7#P#[=.,HG(9L'H
+M!0^WP(/A'TR)XDC3XDB)T??1(8R%G````+H`````2(GOZ`````!(B=I(.9WX
+M````=;9(B>_H`````+@!````2(/$2%M=05Q!74%>05_#9F9FD&9FD&9FD$B#
+M["A(B5PD"$B);"003(ED)!A,B6PD(&;'1"0&``!(BZ_0"```0;P`````3(UL
+M)`9(BT4`BX!0`0``B04`````2(M5`(F"4`$``(7`="%(BT4`QX!0`0```0``
+M`$ECW$B)[^@`````08A$'0!F9I!(@<4`%```0?_$08/\`7ZQ@'PD!@!U#+@`
+M````@'PD!P!T!;@!````2(M<)`A(BVPD$$R+9"083(ML)"!(@\0HPV9F9I!F
+M9F:09F9FD&9FD$%7059!54%455-(@^P(2(G]28GUN0````!F#[9'0XG&9H/X
+M`'8;20^V50UF9I!FD$B)T$C3^*@!=0?_P68YSG?O28-]0`!T($F+=4!(@<:0
+M````2(M]*.@`````28MU0$B)[^@`````28U%8$B)PDDY16`/A&<!``!)B<9F
+M9F:02(G7Z`````!(B<-(@W@X``^$+@$``(!X>P`/A*````!!O`````!F@WU8
+M``^$CP```$&_`0```$ECU$B+A9`)``!(BS302(7V=&8/MT8@9CM#,'5<9CV%
+M`'=6#[?`@+PH0`@``/]T24B+50`/MT8R9L'H!0^WP(T$A0`#``")@G`!``!(
+MBT4`#[=.,H/A'TR)^DC3XHF0=`$``,9&)"&Z`````$B)[^@`````9F:09I!!
+M_\0/MT581#G@#X]W____2(M#.$C'0&``````]D-$!'4C_H7O$P``2(GOZ```
+M``!(BT,X#[9P`;H!````2(GOZ`````!(BT,X#[90`@^V<`%(Q\<`````N```
+M``#H`````$B+4SA(B[70"```OP$```#H`````$B+4SA(B[70"```OP8```#H
+M`````$C'0S@`````0?Y-#DB)WDB)[^@`````3(GR33EU8`^%H/[__TG'14``
+M````2(M%`(N(6`$``(D-`````(7)=`I(BT4`B8A8`0``2(/$"%M=05Q!74%>
+M05_#9F9FD&9F9I!F9I!!5%532(G]28GTNP````"`?T,`=AY(#[96#69FD&9F
+MD$B)T(G92-/XJ`%U!__#.%U#=^U!]D0D#`)U#$F-1"1@23E$)&!U:4R)Y^@`
+M````A,!T4$B)[^@`````2(G&2(7`=$U)C40D8$B+4`A(B7`(2(D&2(E6"$B)
+M,D'^1"0.3(EF2,9&0`7&1D$`QD9Y#[D!````N@$```!,B>?H`````.L-#[;S
+M2(GOZ`````!FD%M=05S#9F9FD&9F9I!F9I!(@^PH2(D<)$B);"0(3(ED)!!,
+MB6PD&$R)="0@28G]28GT3(NVB`````^V5D=(B?Y,B??H`````$B)Q69!@TPD
+M3A"[`````&9!#[9%0XG&9H/X`'8>20^V5@UF9I!F9I!(B=")V4C3^*@!=0?_
+MPV8YWG?M9H/[`W8G2(T$G0`````E_/\#`$F+50"+A`+0`0``B04`````J0``
+M$`!U-^LE2(T$G0`````E_/\#`$F+50"+A`+0`0``B04`````J0``$`!U$`^V
+M\TR)[^@`````Z9L!``!)C49@23E&8`^$C0$``$B%[0^$A`$``$@/MD5Y2<=$
+MQ%@`````2(M5"$B+10!(B5`(2(D"2(GJO@8```!,B??H`````(!]>P!T&9!,
+MB>_H`````+\!````Z`````"`?7L`=>A(@WTX`'132(M%.$C'0&``````]D5$
+M!'4/0?Z%[Q,``$R)[^@`````2(M5.$F+M=`(``"_`0```.@`````2(M5.$F+
+MM=`(``"_!@```.@`````2,=%.`````!!_DX.2(GN3(GOZ`````!)BT4`BY!8
+M`0``B14`````A=)T"DF+10")D%@!``!!QD0D0@!F08-D)$[ONP````!!@'PD
+M.P!T(69!#[94)#L/M\-)BVS$6$B%[70&@'U"_W5]_\-F.=IWYD'V1"1.@'0-
+M3(GF3(GOZ`````#K8;L`````08!\)#L`=$)F9F:0#[?#28MLQ%A(A>UT(_9%
+M1`)T'4B+53A)B[70"```OP8```#H`````(!E1/UF9F:0_\-F00^V1"0[9CG8
+M=\)F0<=$)$X"`$&`9"1)_69F9I!(BQPD2(ML)`A,BV0D$$R+;"083(MT)"!(
+M@\0HPV9FD$B#[`A(BX:(````N0````"`?T,`=AM(#[90#69FD&:02(G02-/X
+MJ`%U!__!.$]#=^_&1D(,Z`````!(@\0(PY!!54%455-(@^P(28G\B?6[````
+M`$B-!*T`````28G%08'E_`,``+\0)P``Z`````!`@/T#=AM)BP0D0HN$*-`!
+M``")!0````"I```0`'4DZQE)BP0D0HN$*-`!``")!0````"I```0`'4)_\-F
+M@?OS`7:S0`^V]4R)Y^@`````3(GGZ`````")Z@^VPDAKP&A,`>#V@&@2```!
+M=`](B[!($@``3(GGZ`````!(@\0(6UU!7$%=PV9F9I!F9I!F9I!(@^PH2(E<
+M)`A(B6PD$$R)9"083(EL)"!(B10D3(LG#[?V28N$))`)``!(BQSP0;T`````
+MO0````!F@7LXX0%U'P^V0SJ#Z!$\`7<42(MO0$B%TG5*QD51`.M$9F:09I!)
+MBY0D&`D``$R-JGB&`0!F@7L@A0!W&4@/MT,@2@^VA"!`"```2&G`B`$``$R-
+M+`)(@SPD`'4(0<:%X`````"`>R2!=0N`9PSW9F9FD&9FD$B#/"0`#X7[````
+MQD,D`/:#E@```"`/A!8"``!(BVMH2(7M#X0)`@``]H6I`````G0D2(.]H```
+M``!T&DB#>T@`=!-(B[V@````BU,T2(MS2.@`````00^V16K!X`A(F$F+E"3`
+M$```BX0"0`@``(D%`````(G"P>H0B)6;````P>@89HF%D````$$/MD5JP>`(
+M2)A)BY0DP!```(N4`D0(``")%0````!F#[;"9HF%E`````^VQF:)A98```")
+MT,'H$&8/ML!FB868````P>H8B)6:````00^V16K!X`A(F$F+E"3`$```BX0"
+M3`@``(D%`````&8/ML!FB862````Z2P!``"`>R2`=03&0R0A2(LT)$C'QP``
+M``"X`````.@`````9H%[..$!=1@/MD,Z@^@1/`%W#4B)[^@`````Z>T```#V
+M1"0#`71YBT,X)?___P`]X0$.`'1J00^V16K!X`A(F$F+E"3`$```BX0"0`@`
+M`(D%`````$$/MD5JP>`(2)A)BY0DP!```(N$`D0(``")!0````!!#[9%:L'@
+M"$B828N4),`0``"+A`)("```B04`````2(G>3(GGZ`````#K;8!\)`,`>21)
+MBP0DBX!8`0``B04`````B<&%P'1028L$)(F(6`$``.M$9I"`/"0`>#R`?"0'
+M`'DU28L4)`^W0S)FP>@%#[?`C02%``,``(F"<`$``$F+%"0/MTLR@^$?N`$`
+M``!(T^")@G0!``!(BUPD"$B+;"003(MD)!A,BVPD($B#Q"C#D)"0D)!(@^PH
+M2(E<)`A(B6PD$$R)9"083(EL)"!(B?-)B?Q$#[9N)$B+EQ@)``!(C:IXA@$`
+M9H%^((4`=QE(#[=&($@/MH0X0`@``$AIP(@!``!(C2P"183M=2!FQX7`````
+M``"`>S@<=1&`>SH"=0M(B=Y(B>_H`````$B#>W@`=!)(C7-X3(GGZ`````!F
+M9I!F9I!(B=Y,B>?H`````$&`_09T/4B-G5@!``!)BWPD*$B)WN@`````QX58
+M`0``@(0>`$C'A6@!````````2(FM<`$``$F+?"0H2(G>Z`````!(BUPD"$B+
+M;"003(MD)!A,BVPD($B#Q"C#9F:09F:09F:02(/L*$B)'"1(B6PD"$R)9"00
+M3(EL)!A,B70D($B)_4B%_P^$PP```$B+1TA,BRA,B>_H`````$B)PTR-<%A(
+MA<`/A*0```!,B>_H`````$F)Q$B%P'402(G>3(GOZ`````#IA````,9#):P/
+MMT4P9HE#($R):RC'@Y0````(````3(EC>$F+1"002(E#2,=#-``(``!(C87D
+M````2(E#4,9#,"!(QX.@`````````,9#.!S&0SD!QD,Z`L9#.PC&0SP`O@``
+M``!,B??H`````(M3-$F+="083(GWZ`````!(B=Y,B>_H`````$B+'"1(BVPD
+M"$R+9"003(ML)!A,BW0D($B#Q"C#9F9FD&9F9I!!5T%6055!5%532(/L"$F)
+M_TF)]4&)UDB+1TA(BRA!O`````!$B>(/ML(/MH0H0`@``#S_=$L/ML!(:=B(
+M`0``2(G?2`.]&`D``$B!Q\P```"Z"````$F-=0SH`````(3`=!Y(BX48"0``
+M1(BT`P8!``!(BX48"0``3(F\`Q@!``!!_L1YGDB#Q`A;74%<05U!7D%?PV9F
+M9I!F9F:09F:02(/L2$B)7"082(EL)"!,B60D*$R);"0P3(ET)#A,B7PD0$B)
+M?"003(MV2$$/MD8"08G%0<'E"&9!#[9&`T$!Q4$/M\6#P`0/MU8T.=`/C]L`
+M``!)C5X(0;\`````00^WQ4J-1#`$2#G8#X:P````D`^V`X3`#XB%````@^`/
+M/`9U?O9#`\!T!O9#!<!U<O8#$'0P2(UK"$&\`````(![!`!V70^V4P-(B>Y(
+MBWPD$.@`````2(/%'$'_Q$0X8P1WXNL]2(UK!$&\`````(![`@!V+4$/ML>)
+M1"0,9F:09I"+5"0,2(GN2(M\)!#H`````$B#Q1Q!_\1$.&,"=^)FD$'_QT@/
+MMD,!2(U<&`)!#[?%2HU$,`1(.=@/AU'___^^`0```$B+?"00Z`````!(BUPD
+M&$B+;"0@3(MD)"A,BVPD,$R+="0X3(M\)$!(@\1(PV9F9I!F9F:09F9FD&9F
+MD$&)RTB+1TA,BPBY`````$2-%!8/ML%"#[:$"$`(```\_W0]#[;`28N1&`D`
+M`$QIP(@!``!!.+00!@$``'4B23F\$!@!``!U&$6(E!`%`0``28N!&`D``$6(
+MG``$`0``D/[!>:_SPV9F9I!F9I!F9I!(BW]0@+_`````3W<W2`^VA\````!(
+MC01`2,'@!(T4%HB4.,D```!(#[:'P````$B-!$!(P>`$B(PXR````/Z'P```
+M`//#9F9FD&9FD&9FD$%7059!54%455-(@^P(28G_2(M.2`^V00+!X`AF#[91
+M`P'0#[?`@\`$#[=6-#G0#X\%`0``2(U1",9$)`<`0;X`````#[9)`0^V0@(`
+M1"0'2`^V0@-(C50"!$'_QD0X\7/F2(G50;T`````0;X`````1#IT)`</@Z8`
+M``!F9F:0#[9-`4$!S0^V10`\`0^4PCP7#Y3`"="H`70U1(GK*,M$..MS:T&-
+M1@%$#[;@9F:0#[9-``^V\T2)XDR)_^@`````_\-$..MRY^M%9F:09I!)BT=0
+M@+C!`````70S1(GK*ET!1#CK<RA!C48!1`^VX`^V30`/MO-$B>),B?_H````
+M`/_#1#CK<N=F9F:09F:02(/%!$'_QD0Z="0'#X)>____28M'4,:`P0````&^
+M!P```$R)_^@`````2(/$"%M=05Q!74%>05_#9F9FD&9FD$B#["A)B?E!N/__
+M__](B>?\N0(```"X`````/-(J\<'`````&8Y\7-59F9FD&9FD&:#^0YW"P^W
+MT4(/M@0*B`04#[?!0@^V!`B#Z#`\"7<A08#X_[@`````1`]$P$$/ML!KP`H/
+MM]%"`@0*1(U`T.L&08#X_W4'_\%F.?%RLD$/ML!(@\0HPV9FD&9FD&9FD$&)
+MT4B+1TA,BP"Z`````)`/ML)"#[:$`$`(```\_W0P#[;`28N(&`D``$AIP(@!
+M``!(.;P(&`$``'450#BT"`4!``!U"T2(C`@'`0``PV:0_L)YO//#9F9FD&9F
+MD&9FD$%505154TB#[`A)B?5!B=1(BV]0NP````!F9F:09F:02&/#2(T$0$C!
+MX`1(C8PHP`````^V40B`^@$/E\"`^A</E<(/ML"%PG0V1#AA"74P00^V50.`
+M^B&X(`````]#T$AC^TB-/'](P><$2(V\+]@````/MM))C74$Z`````"0_\.#
+M^T]^F4B#Q`A;74%<05W#9F9FD&9F9I!F9I!F9I!!5T%6055!5%532(/L*$B)
+M?"0@0;T`````2(M&2$B)1"08#[9``HG!P>$(2(M4)!AF#[9"`P'!#[?!@\`$
+M#[=6-#G0#X\7`0``3(MD)!A)@\0(QD0D%P`/M\%(BU0D&$B-1!`$3#G@#X;D
+M````#[?!2(U$$`1(B40D"`^WR4B)#"1!#[9$)`+!X`AF00^V5"0#1(TT`D$/
+MM_9)C7PD!.@`````//]U:4&)Q4$/M\9*C5P@!$@Y7"0(=FU(BP0D2(M4)!A,
+MC7P0!`^V0P+!X`AF#[93`XTL`@^W]4B->P3H`````#S_=0Y!@/W_=3I!O0``
+M``#K,D0XZ$0/0N@/M\5(C5P8!$DYWW>_ZQQF9I!FD(G"1"CJ#[;2#[9T)!=(
+MBWPD(.@`````#[94)!=,B>9(BWPD(.@`````_D0D%T$/M\9.C60@!$PY9"0(
+M#X<P____O@(```!(BWPD(.@`````2(/$*%M=05Q!74%>05_#D%-(B?M(BTY(
+M#[9!`L'@"&8/ME$#`=`/M\"-4`0/MT8T.<)_'TB+OR`!``!(8])(B<[H````
+M`+X`````2(G?Z`````!;PV9F9I!F9F:09F:02(/L.$B)7"0(2(EL)!!,B60D
+M&$R);"0@3(ET)"A,B7PD,$F)]4F)_@^V1B2(1"0'9H%^((4`#X>K````2`^W
+M1B"`O#A`"```_P^$F````&:#?B!_=RI(#[:$.$`(``!(BY<8"0``2&G`B`$`
+M`$B+1!!(2`^V0`A(!<`(``#K;9!F@7X@@0!W+D@/MT8@2`^VA#A`"```2(N7
+M:`D``$AIP,@/``!(BT00"$@/MD`(2`7`"```ZS9(#[=&($@/MH0X0`@``$B+
+MET`)``!(:<#0````2(N$$(@```!(#[9`"$@%P`@``.L%N+\)``!-#[9\!@9-
+M:?^H````3XV\-Z`!``!)BY88"0``2(VJ>(8!`&9!@7T@A0!W&4D/MT4@2@^V
+MA#!`"```2&G`B`$``$B-+`*`?"0'``^%-`(``&;'A<```````$&`?3@<#X4@
+M`@``00^V13J#^`)T48/X`G\*@_@!="?I!P(``(/X!V9F9I!T*8/X"@^%]0$`
+M`$R)[DB)[^@`````Z>4!``!,B>Y(B>_H`````.G5`0``3(GN2(GOZ`````#I
+MQ0$``$R)[DB)[^@`````2(V=6`$``$B+14A(BP!(BW@H2(G>Z`````#'A5@!
+M``"`A!X`2,>%:`$```````!(B:UP`0``2(M%2$B+`$B+>"A(B=[H`````)#&
+M14+_0;P`````08!_#@`/AJ\```!)C5]@9F9FD&9FD$B)W^@`````2(G%2(M#
+M"$B):PA(B5T`2(E%"$B)*(!]0O]T;(!]00!U;8"]X0`````/A!D!``!(#[9%
+M0*@"=`RH!'0(J`$/A=(```!(#[9%0*@"=0RH!'0(J`$/A=(```!(#[9%0*@"
+M#X3B````J`0/A-H```"H`0^%T@```$B)[DR)]^@`````Z<(```!FD,:%X0``
+M``!!_\1%.&<.#X=<____13AG#G570;P`````08!_#@!V2DF-7V!F9I!FD$B)
+MW^@`````2(G%2(M#"$B):PA(B5T`2(E%"$B)*(!]0O]T%`^V14$\(@^4PCP-
+M#Y3`"="H`75*0?_$13AG#G>_0<9'"?],B?Y,B??H`````(!\)`<`#X6%````
+MZS(/ME5Y2(MU4$B)Z4R)_^@`````ZQU(B>Y,B??H`````&:0ZPZ^"@```$B)
+M[^@`````D$F#?7@`=`Q)C75X3(GWZ`````!,B>Y,B??H`````(!\)`<`="QF
+M_X7`````9H.]P`````IV#F;'A<```````.E,_O__O@H```!(B>_H`````$B+
+M7"0(2(ML)!!,BV0D&$R+;"0@3(MT)"A,BWPD,$B#Q#C#9F9FD&9F9I!F9F:0
+M2(/L.$B)7"0(2(EL)!!,B60D&$R);"0@3(ET)"A,B7PD,$B)_4&)]TB+1TA,
+MBRA,B>_H`````$B)PTR-<%A(A<`/A*0```!,B>_H`````$F)Q$B%P'402(G>
+M3(GOZ`````#IA````,9#):P/MT4P9HE#($R):RC'@Y0````(````3(EC>$F+
+M1"002(E#2,=#-``(``!(C87D````2(E#4,9#,"!(QX.@`````````,9#.!S&
+M0SD!1(A[.L9#.PC&0SP`O@````!,B??H`````(M3-$F+="083(GWZ`````!(
+MB=Y,B>_H`````$B+7"0(2(ML)!!,BV0D&$R+;"0@3(MT)"A,BWPD,$B#Q#C#
+M9I!(@^PX2(E<)`A(B6PD$$R)9"083(EL)"!,B70D*$R)?"0P28G]2(M'2$R+
+M,$B+ER`!```/MD("B</!XPAF#[9"`P'##[?#@\`$/0`(```/C\X```!,B??H
+M`````$B)Q4B%P`^$N@```$R)]^@`````28G'2(7`=1!(B>Y,B??H`````.F:
+M````3(UE6$B+>!`/M]N#PP1(8]-)B[4@`0``Z`````#&126L00^W13!FB44@
+M3(EU*(E=-(.-E````!))BT<02(E%2$R)?7A)C87D````2(E%4,9%,"!(QX6@
+M`````````,9%.!W&13D0QD4Z`@^VQXA%.XA=/+X`````3(GGZ`````"+531)
+MBW<83(GGZ`````!(B>Y,B??H`````$B+7"0(2(ML)!!,BV0D&$R+;"0@3(MT
+M)"A,BWPD,$B#Q#C#9F9FD&9F9I!F9I!328G208G+2(M'2$R+`$R+3U"[````
+M``^VPT(/MI0`0`@``(#Z_W18#[;"28N(&`D``$AIP(@!``!(.;P(&`$``'4]
+M0#BT"`4!``!U,T6$VW0-2(N$"!`!``!)B0+K)0^VPDF+B!@)``!(:<"(`0``
+M28L22(F4"!`!``#K!V9FD/[#>9.[`````&9F9I!F9I`/ML-(C01`2,'@!$J-
+M/`A(C8_`````#[91"(#Z`0^7P(#Z%P^5P@^VP(7"=#-`.'$)=2U%A-MT#$B+
+MA]````!)B0+K(P^VPTB-!$!(P>`$28L22HF4"-````#K"V9F9I#_PX#[3W:9
+M6\-F9F:09F:02(/L*$B)7"0(2(EL)!!,B60D&$R);"0@28G\B?%(BY<@`0``
+M#[9"`HG'P><(9@^V0@,!QP^WQX/`!#T`"```?V1`A/9T#D$/MH0D"`$``(A"
+M`>L,#[9"`4&(A"0(`0``2(U""$B)!"2[``````^WQTB-1!`$2#L$)'8J1`^V
+MZ0^WQTB-;!`$#[;S1(GI2(GB3(GGZ`````#_PTB#!"0$2#LL)'?B2(M<)`A(
+MBVPD$$R+9"083(ML)"!(@\0HPV:02(/L&$B)7"0(2(EL)!!(B?N)U4C'!"0`
+M````@']#`70_0`^V]KD!````2(GBZ`````!(@SPD`'0G2(L$)(`(@$"$[70+
+M2(L$)(!(`R#K"9!(BP0D@&`#WTB)W^@`````2(M<)`A(BVPD$$B#Q!C#D$B#
+M[!A(B1PD2(EL)`A,B60D$$B)\TF)_$B+;FAF@7X@A0`/AY@```!(#[=&(("\
+M.$`(``#_#X2%````9H-^(']W(D@/MH0X0`@``$B+EQ@)``!(:<"(`0``2(M$
+M$$@/ME`(ZV%F@7X@@0!W)T@/MT8@2`^VA#A`"```2(N7:`D``$AIP,@/``!(
+MBT00"`^V4`CK,D@/MT8@2`^VA#A`"```2(N70`D``$AIP-````!(BX00B```
+M``^V4`CK"&9FD+K_____N?____]F@7L@A0!W#D@/MT,@0@^VC"!`"```@/K_
+M="$/ML)"@+P@Q@@``/\/E,*`^?\/E,`)T*@!=0:`>R0&=3I(@WMX`'032(US
+M>$R)Y^@`````9F9FD&9FD$B)WDR)Y^@`````QT50_____TB)[_]52.MV9F:0
+M9F:0@'LD`'4[]H.4````"&9FD'002(M],(M3-$B+<TCH`````,=%4`````!(
+M@WTX`'0)2(M5.(M%((D"2(GO_U5(ZP_'15#_____2(GO_U5(9I!(@WMX`'0,
+M2(US>$R)Y^@`````2(G>3(GGZ`````!FD$B+'"1(BVPD"$R+9"002(/$&,-F
+M9F:09F:09F:09F:02(/L2$B)7"082(EL)"!,B60D*$R);"0P3(ET)#A,B7PD
+M0$B)_4&)UT&)SDR)1"0(0(AT)!=(BT=(3(LH3(GOZ`````!(B<-(C4!82(D$
+M)$B%VP^$V````$R)[^@`````28G$2(7`=1!(B=Y,B>_H`````.FX````QD,E
+MK`^W13!FB4,@2(M4)`A(B5-H3(EK*,>#E`````@```!,B6-X28M$)!!(B4-(
+M1(ES-$B-A>0```!(B4-0QD,P($C'@Z``````````QD,X/,9#.0(/MD0D%XA#
+M.D2)^,'H$(A#.TR)^@^VQHA#/$2(>SU$B?#!Z!"(0SY,B?(/ML:(0S]$B'-`
+MQD-!`+X`````2(L\).@`````BU,T28MT)!A(BSPDZ`````!(B=Y,B>_H````
+M`$B+7"082(ML)"!,BV0D*$R+;"0P3(MT)#A,BWPD0$B#Q$C#9F9FD&9FD&9F
+MD&9FD$B#[$A(B5PD&$B);"0@3(ED)"A,B6PD,$R)="0X3(E\)$!)B?R)TT&)
+MSDR)1"0(0(AT)!=(BT=(3(LX3(G_Z`````!(B<5(A<`/A.X```!,B?_H````
+M`$F)Q4B%P'412(GN3(G_Z`````#IS@```)!(C4582(D$)$F+?1!$B?))B[0D
+M(`$``.@`````QD4EK$$/MT0D,&:)12!(BU0D"$B)56A,B7TH1(EU-(.-E```
+M`!))BT402(E%2$R);7A)C80DY````$B)15#&13`@2,>%H`````````#&13@[
+MQD4Y`@^V1"07B$4ZB=C!Z!"(13L/ML>(13R(73U$B?#!Z!"(13Y,B?(/ML:(
+M13]$B'5`QD5!`+X`````2(L\).@`````BU4T28MU&$B+/"3H`````$B)[DR)
+M_^@`````2(M<)!A(BVPD($R+9"0H3(ML)#!,BW0D.$R+?"1`2(/$2,-)B=%(
+MA?\/E,)(A?8/E,`)T*@!=1)-A<D/E,)(A<D/E,`)T*@!=`FX`````,-F9I!F
+M08'XA0!W#D$/M\"`O#A`"```_W4&N`````##0<9!..%!QD$Y`4'&03H39D6)
+M02!)B7$H28F)H````+@!````PV9F9I!F9F:09F9FD&9FD$B+1PB+0`2)!0``
+M``")PH'*```,`"7___/_0(3VB=$/1,A(BT<(B0A(BT<(B4@,2(M'"(E($$B+
+M1PB)2!1(BT<(B4@82(M'"(E(!,.0D)"03(M4)"!,BUPD,`^WQST1)P``?T`]
+M$"<```^-@0```#TB(0``='H](B$``&9FD&:0?Q`]("$``'1G9F9FD&9FD.MD
+M/4`A``!T5SU$(0``9I!T3NM2/8`G``!F9F:09F:0=#X]@"<``'\,+2`G``"#
+M^`)W,^LK/8"1``!T)#V`D0``?P\]@B<``'069F:09F:0ZQ0]@)0``'4-9F9F
+MD&9FD,8&0,8"`L8!!`^V%DB+1"08B!!F0<<"@`!F0<<#``!!Q@$@2(M$)`AF
+MQP```0^V%DB+1"00B!!F#[8&9D$#`F9!`P-(BU0D*&:)`F9!B0!!#[<22(M$
+M)#AFB1!!#[<2@\(+2(M$)$!FB1##9F:09I!!5T%6055!5%532(/L&$F)_TF)
+MUD"(="072(LONP````!F@WU8``^&AP(``&9F9I")V&;!Z`4/M\"+A(6<````
+MB=F#X1](T_BH`0^%5P(```^WTTB+A9`)``!(BPS02(7)#X1``@``O@````"+
+M03@E____`#WA`1``#X7!````387V#X4?`@``9H%Y((4`#X>>````2`^W02"`
+MO"A`"```_P^$BP```&:#>2!_=R5(#[:$*$`(``!(BY48"0``2&G`B`$``$B+
+M1!!(#[90".E5`0``9H%Y(($`=RI(#[=!($@/MH0H0`@``$B+E6@)``!(:<#(
+M#P``2(M$$`@/ME`(Z2,!``!(#[=!($@/MH0H0`@``$B+E4`)``!(:<#0````
+M2(N$$(@````/ME`(Z?8```"Z_____^GL````9F9FD&:!>2"%``^'E0```$@/
+MMT$@@+PH0`@``/\/A((```!F@WD@?W<B2`^VA"A`"```2(N5&`D``$AIP(@!
+M``!(BT002`^V4`CK7F:!>2"!`'<G2`^W02!(#[:$*$`(``!(BY5H"0``2&G`
+MR`\``$B+1!`(#[90".LO2`^W02!(#[:$*$`(``!(BY5`"0``2&G`T````$B+
+MA!"(````#[90".L%NO____]F@7D@A0!W.D@/MT$@@+PH0`@``/]T*TB+M1@)
+M``!F@7D@A0!W%4@/MH0H0`@``$AIP(@!``!(`<;K!TB!QGB&`0!!.%<(=7E-
+MA?9T"T$/MT8P9CM!('5I@'PD%P9T3XM1.('B____`('ZX0$0`'0^2`^V1D"H
+M`G0UJ`1T,:@!=2V`ON``````9I!U(H'ZX0$/`'0M#[9$)!>(022Z`0```$B)
+MSDR)_^@`````ZQ,/MD0D%XA!)`^W\TR)_^@`````_\-F.5U8#X=]_?__@'PD
+M%X$/A(<!``!!O`````!(BY7H````2(V%Z````$@YT'0+0?_$2(L22#G0=?5F
+M187D#X19`0``2(V%Z````$B)PD@YA>@````/A$(!``!)B<5(B40D"&9FD&:0
+M2(G32(G7Z`````!(B<%-A?9T)4$/MT8P9CM!('0:2(M#"$B)2PA(B1E(B4$(
+M2(D(0?_,Z>4```!F@7D@A0`/AY4```!(#[=!(("\*$`(``#_#X2"````9H-Y
+M(']W(D@/MH0H0`@``$B+E1@)``!(:<"(`0``2(M$$$@/ME`(ZUYF@7D@@0!W
+M)T@/MT$@2`^VA"A`"```2(N5:`D``$AIP,@/``!(BT00"`^V4`CK+T@/MT$@
+M2`^VA"A`"```2(N50`D``$AIP-````!(BX00B`````^V4`CK!;K_____03A7
+M"'4DBT$X)?___P`]X0$/`'05#[9$)!>(021(B<Y(B>_H`````.L228M%"$F)
+M30A,B2E(B4$(2(D(0?_,9D6%Y'022(M4)`A(.97H````#X7+_O__2(/$&%M=
+M05Q!74%>05_#9F9FD&9F9I!F9F:00;@`````9H-_6``/AAT!``!,BX^0"0``
+M00^WP$F+#,%(A<D/A/<```!F@7D@A0`/AYL```!(#[=!(("\.$`(``#_#X2(
+M````9H-Y(']W(D@/MH0X0`@``$B+EQ@)``!(:<"(`0``2(M$$$@/ME`(ZV1F
+M@7D@@0!W)T@/MT$@2`^VA#A`"```2(N7:`D``$AIP,@/``!(BT00"`^V4`CK
+M-4@/MT$@2`^VA#A`"```2(N70`D``$AIP-````!(BX00B`````^V4`CK"V9F
+MD&9FD+K_____N/\```!F@7D@A0!W#D@/MT$@9@^VA#A`"```#[?`2&G`B`$`
+M`$@#AQ@)``!`./)U&D@/MD!`J`%T$:@$=`VX`0```,-F9F:09F:00?_`9D0Y
+M1U@/A^K^__^X`````,-F9F:09F9FD&9F9I!(BT=(3(L`38N8D!```$&Z````
+M`+X`````9D&#>%@`=DA-BXB0"0``#[?628,\T0!T+DF+#-&+03@E____`#WA
+M`1``=!L/MT<P9CM!('412(G02,'@!F9&.508"'0+9I#_QF9!.7!8=[]F03EP
+M6'0*0?_"9D&#^A]VFD$/M\)FD,-F9F:09F9FD&9F9I!F9I!(@W]0`'0>2(M'
+M4,8`<$B+1U!`B'`"2(M'4,9`!P!(BT=0B%`,\\-F9I!F9I!F9I#SPV9F9I!F
+M9F:09F:09F:028GXB?)(B=&!X?\!``!(BX>0"0``2(,\R`!T+$B+/,@/MD<E
+M00^VL-X```")\=/@1`^WP`^WTKC__P``T^`APDB)^$$YT'0%N`````#SPY!5
+M4TB#[`A(B?5F@7XXX0$/A:T````/MD8Z@^@1/`$/AYX```"X_P```&:!?B"%
+M`'<-2`^W1B`/MH0X0`@``(G`2&G`T````$B)PT@#GT`)``"`>T3_=4RX%```
+M`("]F`````!T"0^VA9@````!P`^VP&G`0$(/`(F#D````$C'@Z``````````
+M2(F;J````$B-LY````!(BW\HZ`````#&0T0`2(U#*$B+4`A(B6@(2(E%`$B)
+M50A(B2K^0T7IJ````+C_````9H%]((4`=PU(#[=%(`^VA#A`"```B<!(:<"(
+M`0``2(G#2`.?&`D``(M%."7___\`/>$!$`!T;(![>/]U3+@4````@+V8````
+M`'0)#[:%F`````'`#[;`:<!`0@\`B8,H`0``2,>#.`$```````!(B9M``0``
+M2(VS*`$``$B+?RCH`````,9#>`!(C4,@2(M0"$B):`A(B44`2(E5"$B)*OY#
+M>TB#Q`A;7<-F9F:09F9FD&9F9I!F9I!32(GS@'YX_W042(VV*`$``$B+?RCH
+M`````,9#>/];PU-(B?.`?D3_=!1(C;:0````2(M_*.@`````QD-$_UO#2(/L
+M*$B)7"0(2(EL)!!,B60D&$R);"0@28G\2(GS9H%^..$!#X76````#[9&.H/H
+M$3P!#X?'````N?\```!F@7X@A0!W#4@/MT8@#[:,.$`(``")R$AIP-````!(
+MB<5)`ZPD0`D``('Y_P````^$8@$``/Y-14R-;2A,B>_H`````$B)P4@YV'5+
+M2(GN3(GGZ`````!,.6TH#X0V`0``QX60`````"TQ`4C'A:``````````2(FM
+MJ````$B-M9````!)BWPD*.@`````QD5$`.D``0``2(U5*$B+12A(B4@(2(D!
+M2(E1"$B)32A(BU,(2(L#2(E0"$B)`NG6````D+G_````9H%[((4`=PY(#[=#
+M($(/MHP@0`@``(G(2&G`B`$``$B)Q4D#K"08"0``BT,X)?___P`]X0$0``^5
+MP('Y_P````^5P@^VP(7"#X2"````_DU[3(UM($R)[^@`````2(G!2#G8=49(
+MB>Y,B>?H`````$PY;2!T6L>%*`$````M,0%(QX4X`0```````$B)K4`!``!(
+MC;4H`0``28M\)"CH`````,9%>`#K)V:02(U5($B+12!(B4@(2(D!2(E1"$B)
+M32!(BU,(2(L#2(E0"$B)`DB+7"0(2(ML)!!,BV0D&$R+;"0@2(/$*,-FD$B#
+M[!A(B1PD2(EL)`A,B60D$$B)^TB)]4@/MT8P9D0/MJ0X0`@``$$/M_1(:?:(
+M`0``2`.W&`D``$B!QB`!``#H`````$@/MU4P2(.\TT`$````=!Y(BX330`0`
+M`$B#N(``````=0Q(QX330`0```````!(#[=%,,:$&$`(``#_00^W]$B-NY`/
+M``#H`````$$/M\1(BY,8"0``2&G`B`$``(!\$&K_=`Q(C3002(G?Z`````!(
+MB>Y(B=_H`````$$/M\1(BY,8"0``2&G`B`$``,9$$$(`2(N3&`D``,9$$$,!
+M2(L<)$B+;"0(3(MD)!!(@\08PV9F9I!F9I!F9I!!5T%6055!5%532(/L"$F)
+M_4&)]T&^@````&9FD&9FD$$/M\9F0@^VA"A`"```9CW_``^$ZP```&9!@?Z!
+M``^'?`````^WP$AIP,@/``!)B<1-`Z5H"0``O0````!!@'PD6``/AK<```!)
+MC5PD2&:02(G?Z`````!(C4CP2(M3"$B)0PA(B1A(B5`(2(D"BT%`)0#__P`]
+M``#_`'45]D%#!'0/2(-Y.`!T"$B+03A$B'@!_\5!.&PD6'>UZV-F9I`/M\!(
+M:<#0````2(G"20.50`D``+T`````@'H[`'9!D(GI#[;!2(M,PEA(A<ET)(M!
+M0"4`__\`/0``_P!U%?9!0P1T#TB#>3@`=`A(BT$X1(AX`?_%0#AJ.W?%9F:0
+M9I!!_\=!_\9F08'^A0`/AN[^__]-.:W0"```=1))@<4`%```1(G^3(GOZ+/^
+M__](@\0(6UU!7$%=05Y!7\-F9F:04TB)^T@/MD9;9@^VM#A`"```QH0X0`@`
+M`/\/M_9(C;\`$```Z`````!(B[O0"```O@````#H9O[__UO#9F9FD%532(/L
+M"$B)_4@/MT9`9@^VG#A`"```QH0X0`@``/\/M_-(C;_(#P``Z``````/M]M(
+MBY5`"0``2&G#T````(!\$%#_=`Q(C3002(GOZ`````!(B[W0"```O@````#H
+M_?W__TB#Q`A;7<-F9I!F9I"Y`````+K0````2(GX9F:0B`A(_\!(_\IU]L9'
+M1/_&1U#_2(U'*$B)1RA(B4<PPY!(@^PH2(E<)`A(B6PD$$R)9"083(EL)"!(
+MB?U(C;_(#P``Z`````"Z`````(3`#X71````2(V]R`\``.@`````08G%NX+_
+M__\/ML.`O"A`"```_W40.)W@````<P^(G>````#K!__#@/N%=MRZ`````(#[
+MA@^$BP````^VPT2(K"A`"```00^WQ4QIX-````!,B>=(`[U`"0``Z`````!(
+MBY5`"0``9@^VPV9!B4040(!]40%U#TB+A4`)``!F0<=$!$S__T$/M]U(BX5`
+M"0``2&G;T````,9$`T(`2(N%0`D``&;'1`-.``!(B[W0"```O@````#HQ?S_
+M_TB)VD@#E4`)``!(B=!(BUPD"$B+;"003(MD)!A,BVPD($B#Q"C#9F9FD&9F
+M9I!F9F:09F:02(/L"$@/MD8(9@^VM#C&"```QH0XQ@@``/\/M_9(@<<X$```
+MZ`````!(@\0(PV:0N0````"ZB`$``$B)^&9FD(@(2/_`2/_*=?;&1WC_QD=J
+M_\9'>A](C4<@2(E'($B)1RC#9F9FD&9FD&9FD&9FD$%505154TB#[`A(B?U(
+MC;^0#P``Z`````"Z`````(3`#X4_`0``2(V]D`\``.@`````08G%NP````!F
+M9I!F9I`/ML.`O"A`"```_W469@^VPV8YA=P```!S#6:)A=P```#K!/[#>=FZ
+M`````(#[@`^$\`````^VPT2(K"A`"```00^WQ4QIX(@!``!,B>=(`[T8"0``
+MZ`````!(BY48"0``9@^VPV9!B404,$B+A1@)``!!QD0$0@!(BX48"0``0<9$
+M!&7_2(N%&`D``$'&1`1D_TB+A1@)``!!QD0$9O](BX48"0``0<9$!&C_2(N%
+M&`D``$'&1`1G_TB+A1@)``!!QD0$:?](BX48"0``0<:$!.(`````2(N%&`D`
+M`$'&A`0'`0``_TB)[^@`````2(N5&`D``$F)A!0@`0``@'U1`74-2(N%&`D`
+M`$&`3`1$`4$/M\5(:<"(`0``2(G"2`.5&`D``$B)T$B#Q`A;74%<05W#9F9F
+MD&9FD&9FD&9FD%532(/L"$B)_4B-OP`0``#H`````+H`````A,`/A1H!``!(
+MC;T`$```Z`````")Q[Z`____B?(/ML*`O"A`"```_W420#BUWP```',10(BU
+MWP```.L(_\9`@/Z!=M>Z`````$"`_H(/A,\```")\@^VPD"(O"A`"```#[?'
+M2&G`R`\``+D`````NL@/``!(`X5H"0``B`A(_\!(_\IU]@^WWTAIV\@/``!(
+MB=I(`Y5H"0``2(U"&$B)0AA(B=A(`X5H"0``2(/`&$B)0`A(B=I(`Y5H"0``
+M2(U"*$B)0BA(B=A(`X5H"0``2(/`*$B)0`A(B=I(`Y5H"0``2(U"2$B)0DA(
+MB=A(`X5H"0``2(/`2$B)0`A(BX5H"0``0(AT`UM(B[W0"```O@````#H;OG_
+M_TB)VD@#E6@)``!(B=!(@\0(6UW#9F9FD&9FD&9FD%-(B?M(C;\X$```Z```
+M``"Z`````(3`#X7+````2(V[.!```.@`````B<>^`````(GR#[;"@+P8Q@@`
+M`/]U$4`X<TQS$T"(<TSK#69FD&:0_\9`@/X#=MBZ`````$"`_@0/A($```")
+M\@^VPD"(O!C&"```#[?'2&G`J````+D`````NJ@```!(C808H`$``(@(2/_`
+M2/_*=?8/M]=(:=*H````2`':2(V"T`$``$B)@M`!``!(B4`(2(V"Z`$``$B)
+M@N@!``!(B4`(2(V"``(``$B)@@`"``!(B4`(2('"H`$``$"(<@A(B=!;PV9F
+MD$B#[!A(B5PD"$B);"002(G]2(V'"`$``+H`````2#F'"`$``'0F2(V_"`$`
+M`.@`````2(G#2(G'Z`````!(B>_H`````$B)0W!(B=I(B=!(BUPD"$B+;"00
+M2(/$&,-FD$B#[`A(C8<(`0``2(M0"$B)<`A(B09(B58(2(DR2(-^<`!T#$B#
+MQG#H`````&9FD$B#Q`C#9F9FD&9F9I!F9I!(@^P(2(V'&`$``+H`````2#F'
+M&`$``'032(''&`$``.@`````QD`0`$B)PDB)T$B#Q`C#9F9FD&9F9I!F9F:0
+M2(L&2(''&`$``$B+5PA(B4<(2(DX2(E0"$B)`DC'!@````##9F9FD&9F9I!F
+M9F:02(/L"$B-ER@!``"X`````$@YER@!``!T"$B)U^@`````2(/$",-F9F:0
+M9F:09F:02(L&2(''*`$``$B+5PA(B4<(2(DX2(E0"$B)`DC'!@````##9F9F
+MD&9F9I!F9F:02(/L"$B-ET@!``"X`````$@YET@!``!T(DB)U^@`````O@``
+M``"YH````$B)PF:00(@R2/_"2/_)=?5(@\0(PTB!QT@!``!(BT<(2(EW"$B)
+M/DB)1@A(B3##9F:09F:02(/L"$B-EU@!``"X`````$@YEU@!``!T"$B)U^@`
+M````2(/$",-F9F:09F:09F:02(L&2(''6`$``$B+5PA(B4<(2(DX2(E0"$B)
+M`DC'!@````##9F9FD&9F9I!F9F:02(/L"$B-AS@!``"Z`````$@YAS@!``!T
+M%TB!QS@!``#H`````$C'0"``````2(G"2(G02(/$",-F9F:09F9FD$B+!DB!
+MQS@!``!(BU<(2(E'"$B).$B)4`A(B0)(QP8`````PV9F9I!F9F:09F9FD$B#
+M[$A(B5PD&$B);"0@3(ED)"A,B6PD,$R)="0X3(E\)$!(B?U)B?1F@7X@A0`/
+MAYP```!(#[=&(("\.$`(``#_#X2)````9H-^(']W(D@/MH0X0`@``$B+EQ@)
+M``!(:<"(`0``2(M$$$@/MD`(ZV5F@7X@@0!W)T@/MT8@2`^VA#A`"```2(N7
+M:`D``$AIP,@/``!(BT00"`^V0`CK-D@/MT8@2`^VA#A`"```2(N70`D``$AI
+MP-````!(BX00B`````^V0`CK#&9F9I!F9I"X_____P^VP$P/MK0HQ@@``$UI
+M]J@```!-C;0NH`$``$B+E6@)``!,C;HXN`\`9D&!?"0@A0!W&DD/MT0D($@/
+MMH0H0`@``$AIP,@/``!,C3P"28M4)$@/MD(!@_@2=!`]D0````^$)0$``.F0
+M`0``28L&2(E$)`B]``````^V0@F(1"07#[92&HA4)!9!O0````!!@'X.`'8_
+M28U>8&:02(G?Z`````!(B<5(BT,(2(EK"$B)70!(B44(2(DH3#E]4'4,#[9%
+M>4$Z1"0E=`J00?_%13AN#G?'28-\)'@`=`])BW0D>$B+?"0(Z`````!,B>9(
+MBWPD".@`````#[:5P@```(U"`8B%P@```(#Z`W<F@'PD%@!U'T$/ME0D)4B+
+M=5!!N`````"Y`@```$R)]^@`````ZSH/MI7"````C4(!B(7"````@/H"=B6`
+M?"06`'4>QD5#`L9%0O^`943^2(GN2(M\)`CH`````.FN````#[9,)!8/ME0D
+M%TR)_DR)]^@`````Z90```!F9F:0N0````!!O0````!!@'X.`'8[28U>8$B)
+MW^@`````2(G!2(M#"$B)2PA(B1E(B4$(2(D(3#EY4'4+#[9!>4$Z1"0E=`E!
+M_\5%.&X.=\E(#[9!0*@"=!JH!'06J`%T$D$/ME0D)4B+<5!,B??H`````$F#
+M?"1X`'0-28MT)'A(B>_H`````$R)YDB)[^@`````2(M<)!A(BVPD($R+9"0H
+M3(ML)#!,BW0D.$R+?"1`2(/$2,-F9F:09F:09F:09F:02(/L*$B)7"0(2(EL
+M)!!,B60D&$R);"0@28G\28GU2(LO2(GOZ`````!(B<-(A<!T<4B)[^@`````
+M2(G"2(7`=&%(C7M8QD,XX<9#.0'&0SH0QD,ENV9!#[9%6V:)0R!)BP0D2(E#
+M*,=#-)````!(C4(02(E#2$B)4WC&0`$`QD(00$C'@Z``````````O@````#H
+M`````$B)WDB)[^@`````2(M<)`A(BVPD$$R+9"083(ML)"!(@\0HPV9FD&:0
+M2(/L*$B)'"1(B6PD"$R)9"003(EL)!A,B70D($F)_$F)]4&)UDB++TB)[^@`
+M````2(G#2(7`='5(B>_H`````$B)PDB%P'1E2(U[6,9#..'&0SD!QD,Z$,9#
+M);MF00^V15MFB4,@28L$)$B)0RC'0S20````2(U"$$B)0TA(B5-XQD`!$,9"
+M$$!$B'`)2,>#H`````````"^`````.@`````2(G>2(GOZ`````!(BQPD2(ML
+M)`A,BV0D$$R+;"083(MT)"!(@\0HPV9FD&9FD$B#[#A(B5PD"$B);"003(ED
+M)!A,B6PD($R)="0H3(E\)#!)B?Q)B?5!B=9!B<](BR](B>_H`````$B)PTB%
+MP`^$@P```$B)[^@`````2(G"2(7`='-(C7M8QD,XX<9#.0'&0SH01(AS)69!
+M#[9%6V:)0R!)BP0D2(E#*,=#-)````!(C4(02(E#2$B)4WC&0`&1QD(00$2(
+M<`E$B'@*2,>#H`````````"^`````.@`````2(G>2(GOZ`````"_H(8!`.@`
+M````2(M<)`A(BVPD$$R+9"083(ML)"!,BW0D*$R+?"0P2(/$.,-F9I!FD$B#
+M[#A(B5PD"$B);"003(ED)!A,B6PD($R)="0H3(E\)#!)B?Q)B?=)B<U!B=9(
+MBR](B>_H`````$B)PTB%P'4/0<:%X0````'IC````&:02(GOZ`````!(B<)(
+MA<!U%4B)WDB)[^@`````0<:%X0````'K94B->UC&0SCAQD,Y`<9#.A!$B',E
+M9D$/MD=;9HE#($F+!"1(B4,HQT,TD````$B-0A!(B4-(2(E3>,9``1+&0A!`
+M1(AP"4C'@Z``````````O@````#H`````$B)WDB)[^@`````2(M<)`A(BVPD
+M$$R+9"083(ML)"!,BW0D*$R+?"0P2(/$.,-F9I!54TB#[`A(B?U(B?-F@7X@
+MA0`/AY@```!(#[=&(("\.$`(``#_#X2%````9H-^(']W(T@/MH0X0`@``$B+
+MEQ@)``!(:<"(`0``2(M$$$AF#[9(".M@9H%^(($`=RA(#[=&($@/MH0X0`@`
+M`$B+EV@)``!(:<#(#P``2(M$$`AF#[9(".LP2`^W1B!(#[:$.$`(``!(BY=`
+M"0``2&G`T````$B+A!"(````9@^V2`CK!;G_````OO\```!F@7L@A0!W#D@/
+MMT,@9@^VM"A`"```9H'Y_P!T'`^WP8"\*,8(``#_#Y3"9H'^_P`/E,`)T*@!
+M=!!(B=Y(B>_H`````.F(````#[?!2`^VO"C&"```2&G_J````$B-O"^@`0``
+M9@^V4SMF#[9#/,'@"`'"9H'B_P$/MD,]@_@!=`6#^`AU0`^WTDB+A9`)``!(
+MBP302#M#:'4L#[=(,HG*9L'J!0^WTH/A'TC'P/[___](T\`A1)5<2(M#:`^W
+M<#+H`````)!(B=Y(B>_H`````$B#Q`A;7<-F9F:09F9FD&9FD&9FD$B#[#A(
+MB5PD"$B);"003(ED)!A,B6PD($R)="0H3(E\)#!)B?U)B?1!B==(BR](#[=&
+M($@/MH0H0`@``$AIP(@!``!)B<9,`[48"0``2(GOZ`````!(B<-!#[=4)#*)
+MT&;!Z`4/M\"+1(5<B=&#X1](T_BH`0^%J0```$B%VP^$H````$B->UA!#[9$
+M)"4/MHW>````T^`)T,9#..'&0SD!QD,Z#XA#.V;!Z`B(0SQ$B'L]28N&U```
+M`$B)0SY,B6-HQD,EJD$/MT8P9HE#($F+10!(B4,HQT,T`````$C'0T@`````
+M2,>#H`````````"^`````.@`````2(G>2(GOZ`````!!#[=,)#*)RF;!Z@4/
+MM]*#X1^X`0```$C3X`E$E5Q(BUPD"$B+;"003(MD)!A,BVPD($R+="0H3(M\
+M)#!(@\0XPV9FD&9FD&9FD$B#["A(B1PD2(EL)`A,B60D$$R);"083(ET)"!)
+MB?Q(BT=(3(LP3(GWZ`````!(B<5(A<!U#D'&A"3A`````>FC````3(GWZ```
+M``!)B<5(A<!U'$'&A"3A`````4B)[DR)]^@`````ZWUF9I!F9I!(C5U8QD4X
+M)<9%):M!#[=$)#!FB44@3(EU*,=%-`@```#'A90````(````28M%$$B)14A(
+MC4`(2(E%4,9%,"1,B6UX2,>%H`````````"^`````$B)W^@`````28MU&+H(
+M````2(G?Z`````!(B>Y,B??H`````$B+'"1(BVPD"$R+9"003(ML)!A,BW0D
+M($B#Q"C#9F9FD&9F9I!F9F:02(/L*$B)'"1(B6PD"$R)9"003(EL)!A,B70D
+M($F)_$B+1TA,BS!,B??H`````$B)Q4B%P'4.0<:$).$````!Z:L```!,B??H
+M`````$F)Q4B%P'4<0<:$).$````!2(GN3(GWZ`````#I@@```&9FD$B-75C&
+M13B>QD4Y$,9%12#&126K00^W1"0P9HE%($R)=2C'130@````QX64````"```
+M`$F+11!(B45(3(EM>$B-0"!(B450QD4P)$C'A:``````````O@````!(B=_H
+M`````$F+=1BZ(````$B)W^@`````2(GN3(GWZ`````!(BQPD2(ML)`A,BV0D
+M$$R+;"083(MT)"!(@\0HPV9F9I!(@^PX2(E<)`A(B6PD$$R)9"083(EL)"!,
+MB70D*$R)?"0P28G\08GV2(M'2$R+*$R)[^@`````2(G#2(7`=1%!QH0DX0``
+M``'IN@```&9FD$R)[^@`````2(G%2(7`=2!!QH0DX0````%(B=Y,B>_H````
+M`.F.````9F9FD&9FD$R->UC&0S@2183V=!/&0SD!QD,Z@,9#/$#K"69FD&:0
+MQD,\),9#):M!#[=$)#!FB4,@3(EK*,=#-&````#'@Y0````(````2(M%$$B)
+M0TA(B6MX2,>#H`````````"^`````$R)_^@`````2(MU&+I@````3(G_Z```
+M``!(B=Y,B>_H`````$B+7"0(2(ML)!!,BV0D&$R+;"0@3(MT)"A,BWPD,$B#
+MQ#C#9F:09F:02(/L*$B)'"1(B6PD"$R)9"003(EL)!A,B70D($B)^TB+1TA,
+MBS!,B??H`````$B)Q4&\``@``$B%P'4,QH/A`````>G!````3(GWZ`````!)
+MB<5(A<!U&,:#X0````%(B>Y,B??H`````.F:````D&9!@?P``;C_````1`]#
+MX,9%.!K&13D(QD4Z",9%.P!$B&4\QD4]`,9%):L/MT,P9HE%($R)=2A%#[?D
+M1(EE-,>%E`````@```!)BU402(E52$2)X$@!T$B)15#&13`D3(EM>$C'A:``
+M````````2(U=6+X`````2(G?Z`````!)BW481(GB2(G?Z`````!(B>Y,B??H
+M`````$B+'"1(BVPD"$R+9"003(ML)!A,BW0D($B#Q"C#9F9FD&9FD&9FD$B#
+M[!A(B1PD2(EL)`A,B60D$$F)_$B+1TA(BRA(B>_H`````$B)PTB%P'4+0<:$
+M).$````!ZU_&0#@5QD`EJT$/MT0D,&:)0R!(B6LHN0$```"Z`0```$B)WDB)
+M[^@`````A,!U&DB)WDB)[^@`````0<:$).$````!ZQIF9F:02,>#H```````
+M``!(B=Y(B>_H`````$B+'"1(BVPD"$R+9"002(/$&,-F9F:09F:0N@0```!`
+M#[;'@_@7=T>)P/\DQ0````"#PB3K.8/".)#K,X/"$.LN@\(<ZRF#PDB0ZR.#
+MPASK'H/"/.L9@\(DD.L3@\(8ZPZ#PA3K"8/"2)#K`X/",(G0PV9F9I!F9F:0
+M2(/L&$B)7"0(2(EL)!!(B?U(B?.`?FK_=!,/MG9J2(L_Z`````#&0VK__DU$
+M2(M<)`A(BVPD$$B#Q!C#9F9FD$@/MD9`J`)T#*@$=`BH`0^$ZP```(!^:O\/
+MA>$```!(BP>+@!@!``")!0````!!B<&Y`````+@!````9F:09I!!B<!!T^!%
+MA<AU.8A.:DB+%T2)R$0)P(F"&`$``$B+!XN`6`$``(D%`````$&)P44AP0^$
+M?P```$B+!T2)B%@!``#K<__!@/D?=K5(BP>+@!P!``")!0````!!B<&Y````
+M`+@!````08G`0=/@187(=3Z-02"(1FI(BQ=$B<A$"<")@AP!``!(BP>+@&`!
+M``")!0````!!B<%%(<%T&4B+!T2)B&`!``#K#69FD&9FD/_!@/D?=K#^1T1F
+M9I!F9I#SPV9F9I!F9F:09F:09F:02(/L&$B)7"0(2(EL)!!(B?U(B?.`?E#_
+M=!,/MG902(L_Z`````#&0U#__DU$2(M<)`A(BVPD$$B#Q!C#9F9FD(!^4/\/
+MA=8```!(BP>+@!@!``")!0````!!B<&Y`````+@!````08G`0=/@187(=36(
+M3E!(BQ=$B<A$"<")@A@!``!(BP>+@%@!``")!0````!!B<%%(<%T?4B+!T2)
+MB%@!``#K<?_!@/D?=KE(BP>+@!P!``")!0````!!B<&Y`````+@!````9F9F
+MD&9FD$&)P$'3X$6%R'4UB$Y02(L71(G(1`G`B8(<`0``2(L'BX!@`0``B04`
+M````08G!12'!=!-(BP=$B8A@`0``ZP?_P8#Y'W:Y_D=$9F:09F:0\\-F9F:0
+M9F9FD&9FD&9FD$%455-)B?Q(BQ^]`````&:#>U@`#X8B`0``9F:09F:0#[?5
+M2(N#D`D``$B#/-``#X3[````00^V3"0(2(L$T&:!>""%``^'Q0```$@/MU`@
+M@+P:0`@``/\/A+(```!F@W@@?W<M2`^VA!I`"```2(N3&`D``$AIP(@!``!(
+MBT002`^V0`@YR`^$BP```.F>````#[?52(N#D`D``$B+!-!F@7@@@0!W*T@/
+MMT`@2`^VA!A`"```2(N3:`D``$AIP,@/``!(BT00"`^V0`@YR'1'ZUT/M]5(
+MBX.0"0``2(L$T$@/MT`@2`^VA!A`"```2(N30`D``$AIP-````!(BX00B```
+M``^V0`@YR'0+ZR&0@?G_````=1@/M\5(BY.0"0``2(L\PKX`````Z`````#_
+MQ68Y:U@/A^3^__];74%<PV9F9I!F9F:09F9FD&9FD$B+5G!(A=)T'$B+1CA(
+MB4(82(M&0$B)0B!(BT9(2(E"*,9"$`'SPV9FD&9FD&9FD$B+5G!(A=)T&$B+
+M0AA(B48X2(M"($B)1D!(BT(H2(E&2//#9F9FD&9FD&9FD&9FD%532(/L"$B)
+M_4B)\T@Y?B@/A,H```"`?B0`#X6G````#[9&.(/X%70)@_A5#X65````2(M3
+M<$B%T@^$B````(!Z$`$/A7X```!F@7H8X0&0=75(BXT8"0``2(VQ>(8!`&:!
+M>R"%`'<92`^W0R!(#[:$*$`(``!(:<"(`0``2(TT`0^V0AJ#^`=T'X/X!W\'
+M@_@&=![K,8/X#&9F9I!F9I!T((/X#702ZQYF@V9B_6:0ZQ5F@TYB`NL.9H-F
+M8O=FD.L%9H-.8@A(@WMX`'022(US>$B)[^@`````9F:09F:09H%[..$!#X5F
+M`0``9H%[((4`#X><````2`^W0R"`O"A`"```_P^$B0```$B+E1@)``!(C;)X
+MA@$`9H%[((4`=Q1(#[:$*$`(``!(:<"(`0``2(TT`H![)`!U60^V0SJ#^`=T
+M((/X!W\)@_@&="1FD.M"@_@,=#B#^`UF9I!F9I!T%^LP9H-F8OUF9F:09F:0
+MZR)F@TYB`NL;9H-F8O=FD.L2#[?!ZV(/M\'IIP```&:#3F((9H%[..$!#X6R
+M````@'LZ"P^%J````$B)[@^W2R`/M]$/MD5&_\C_P3G"?20/MD5&C5#_9H'Y
+MA0!W#0^WP8"\,$`(``#_=:</M\'_P3G0?..X_P```&8]_P!T7TB)[@^W2R`/
+MM]$/MD5&_\C_P3G"?2P/MD5&C5#_9F9FD&:!^84`=Q$/M\&`O#!`"```_P^%
+M7____P^WP?_!.=!\W[C_````9HE#(,9#)(!(B=Y(B>_H`````.DR`0``QD,D
+M`$@Y:RAT)TB+0W!(A<"0=!V`>!`!=0M(B=Y(B>_H`````$B-<W!(B>_H````
+M`$B#NX``````=`](C;.`````2(GOZ`````!(BWLH2(G>_Y.@````9H%[..$!
+M=6,/MD,Z@^@1/`%W6+K_````9H%[((4`=PU(#[=#(`^VE"A`"```@?K_````
+M#X2B````B=!(:<#0````2(G&2`.U0`D``(!^10`/A84```"`?E#_='](B>_H
+M`````.MU9F:09I"Z_P```&:!>R"%`'<-2`^W0R`/MI0H0`@``(G02&G`B`$`
+M`$B)QD@#M1@)``"+0S@E____`#WA`1``#Y7`@?K_````#Y7"#[;`A<)T(V:!
+M>SCA`74+#[9#.H/H$3P!=A"`?GL`=0I(B>_H`````&:02(/$"%M=PV9FD&9F
+MD&9FD$B#[!A(B5PD"$B);"002(G[2(GU#[=6,HG09L'H!0^W\(G1@^$?2,?`
+M_O___TC3P"%$MUQF@?K_#W1%#[?Z2(N+D`D``$B#//D`=#1(QP3Y`````"&$
+MLY@)```/M_)(C;M8#P``Z`````!(B>Y(B=_H`````$B)[DB)W^@`````2(M<
+M)`A(BVPD$$B#Q!C#D$%44TB#[`A)B?1(BY^0$```2(''6`\``.@`````B<8/
+MM\!(P>`&2`'828D$)+D`````ND````"("$C_P$C_RG7V#[?&2(/$"%M!7,-F
+M9F:00;@`````N`````!(@W]``'1;ZPQ)B<#K,V9F9I!F9I!(BW=`N0````!F
+M9F:09F:0#[;!2(-\QE@`=`I(BT3&6#A0>73/_\&`^01VY$B+1T!F@7A`A0`/
+MEL!-A<`/E<(/ML"%PK@`````20]%P//#D$B#["!(B1PD2(EL)`A,B60D$$R)
+M;"0828G\28G-9@^V^L'F"(T\/KX`````08!\)#``#X3H````28-\)%``#X3<
+M````08N$))0```"H";@!````#T3PNP````!(Q\4`````#[;+B?AF(T3-`&8[
+M1,T`#X69````#[9$S04\`P^4PCP'#Y3`"="H`70'0#ATS01U?4'&1"0D(`^V
+MVP^V5-T&#[9TW05,B>?H`````$F+5"10#[9$W0>(0@U-A>UT.TF+30!)BT0D
+M4$B)RDC!ZB")4`-)BT0D4(`(@$'VA"26````!'052(72=!!)BT0D4(E("$F+
+M1"10@"!_28M4)%!!#[9$)#"#Z`>(0@?K$F:0_\.`^P\/AD?___]F9I!FD$B+
+M'"1(BVPD"$R+9"003(ML)!A(@\0@PV9F9I!F9F:02(/L*$B)7"0(2(EL)!!,
+MB60D&$R);"0@2(G]2(GS9H%^((4`#X>6````2`^W1B"`O#A`"```_P^$@P``
+M`&:#?B!_=R)(#[:$.$`(``!(BY<8"0``2&G`B`$``$B+1!!(#[90".M?9H%^
+M(($`=R=(#[=&($@/MH0X0`@``$B+EV@)``!(:<#(#P``2(M$$`@/ME`(ZS!(
+M#[=&($@/MH0X0`@``$B+ET`)``!(:<#0````2(N$$(@````/ME`(ZP:0NO__
+M__^^_P```&:!>R"%`'<.2`^W0R!F#[:T*$`(``"`^O\/A)<````/MLJ`O"G&
+M"```_P^4PF:!_O\`#Y3`"="H`75[@'LD!G1U3`^VI"G&"```36GDJ````$V-
+MI"R@`0``#[?&2&G`B`$``$F)Q4P#K1@)``"`>SH!=2>_"@```.@`````2(G>
+M2(GOZ`````"Z`@```$R)[DR)Y^@`````ZQR_]`$``.@`````2(G>2(GOZ```
+M``!F9F:09F:02(M<)`A(BVPD$$R+9"083(ML)"!(@\0HPV9F9I!F9I!(@^PH
+M2(E<)`A(B6PD$$R)9"083(EL)"!)B?2)U4B+'TB)W^@`````2(G"2(7`=%_&
+M0#CAQD`Y`4"(:#K&0#L/00^W1"0P9HE"($B)6BC'0C0`````2,="2`````!(
+MQX*@`````````$B)UDB)W^@`````0(#]`74,OP4```#H`````.L*OU##``#H
+M`````$B+7"0(2(ML)!!,BV0D&$R+;"0@2(/$*,-F9F:09F9FD%532(/L"$B)
+M_4B)\V:!?B"%``^'F````$@/MT8@@+PX0`@``/\/A(4```!F@WX@?W<B2`^V
+MA#A`"```2(N7&`D``$AIP(@!``!(BT002`^V2`CK86:!?B"!`'<G2`^W1B!(
+M#[:$.$`(``!(BY=H"0``2&G`R`\``$B+1!`(#[9(".LR2`^W1B!(#[:$.$`(
+M``!(BY=`"0``2&G`T````$B+A!"(````#[9(".L(9F:0N?____^^_____V:!
+M>R"%`'<-2`^W0R`/MK0H0`@``(#Y_W0A#[;!@+PHQ@@``/\/E,)`@/[_#Y3`
+M"="H`74&@'LD!G4@2(-[>`!T#$B-<WA(B>_H`````$B)WDB)[^@`````ZVL/
+MML%(#[:\*,8(``!(:?^H````2(V\+Z`!``")\@^VPDAIP(@!``!(B<9(`[48
+M"0``@'LD`'0*N@$```#H`````$B#>W@`=!-(C7-X2(GOZ`````!F9F:09F:0
+M2(G>2(GOZ`````!F9I!FD$B#Q`A;7<-F9I!F9I!F9I!(@^PX2(E<)`A(B6PD
+M$$R)9"083(EL)"!,B70D*$R)?"0P28G_28GT3(LW3(GWZ`````!(B<5(A<`/
+MA(X```!,B??H`````$F)Q4B%P'412(GN3(GWZ`````#K<69F9I!(C5U8QD4X
+MX<9%.0'&13H.00^W1"0P9HE%(&9!@V0D8/=)BP=(B44HQT4T``@``$F+11!(
+MB45(3(EM>$C'A:``````````O@````!(B=_H`````(M5-$F+=1A(B=_H````
+M`$B)[DR)]^@`````2(M<)`A(BVPD$$R+9"083(ML)"!,BW0D*$R+?"0P2(/$
+M.,-(@^P82(D<)$B);"0(3(ED)!!(B?U!B?1(BT=(2(L82(G?Z`````!(B<)(
+MA<!T1,9`.!O&0#D!1(A@/`^W13!FB4(@QH*8````#TB)6BC'0C0`````2,="
+M2`````!(QX*@`````````$B)UDB)W^@`````2(L<)$B+;"0(3(MD)!!(@\08
+MPV9F9I!F9I!F9I!(@^P82(D<)$B);"0(3(ED)!!(B?U(BT=(3(L@3(GGZ```
+M``!(B<-(A<!T<$R)Y^@`````2(G"2(7`=13&A>$````!2(G>3(GGZ`````#K
+M3,9#.``/MT4P9HE#(,:#F`````],B6,HQT,T`````$C'0T@`````2(M"$$B)
+M0U#&0S`D2(E3>$C'@Z``````````2(G>3(GGZ`````!(BQPD2(ML)`A,BV0D
+M$$B#Q!C#D$%6055!5%5328G^28GU2(G3QD)#`<9"0@"^!@```$R)[^@`````
+M2(-[4`!T%DB+4QA(BT,02(E0"$B)`DB+0U#^2%B`>WL`=!]F9F:09F:03(GW
+MZ`````"_`0```.@`````@'M[`'7H2(.[&`$```!T'@^VLP4!``!(B[L8`0``
+MN@$```#H`````&9FD&9FD$B#>U``=!D/MG-Y2(M[4+H!````Z`````!F9F:0
+M9F:02(-[.``/A)D```!(BVLX2(.]@`````!U>TB#O8@`````=7'V0T0$=21!
+M_H;O$P``3(GWZ`````!(BT,X#[9P`;H!````3(GWZ`````!(BT,X#[90`@^V
+M<`%(Q\<`````N`````#H`````$B+4SA)B[;0"```OP$```#H`````$B+4SA)
+MB[;0"```OP8```#H`````$C'0S@`````2,=%8`````!(@WM8`'022(M36$@/
+MMD-Y2,=$PE@`````2(M3"$B+`TB)4`A(B0)!_DT.2(G>3(GWZ`````!!@'T)
+M_W150;P`````08!]#@!V.$F-;6!(B>_H`````$B)PTB+10A(B5T(2(DK2(E#
+M"$B)&(![0O]U"T'_Q$4X90YWU.L&13AE#G<00<9%"?],B>Y,B??H`````%M=
+M05Q!74%>PY")\`^VP$B-!,!(P>`'!6!7``")!\-F9F:09F9FD&9FD$&)T$B)
+M^;\`````B?)(B<A(A=)T"T"(.$C_P$C_RG7UB3&)\DB!ZF!7``!(N(_C.([C
+M.([C2/?B2,'J"HA1!$0XPG8$1(A!!+H`````@'D$`'8?#[;"QD0!!_](C03`
+M2,'@!\:$",17``#]_\(X401WX<9!!@#&004`N@````"0#[;"2&G`L````$B-
+MA`@`0@``QD`+`8A0"O_"@/H?=N#SPV9F9I!F9F:09F:09F:005154TF)]$B)
+M^[T`````@'\$`'9#B>H/ML)(C03`2,'@!T@!V("XQ%<``/UT(DB-N+Q7``"Z
+M"````$R)YN@`````A,!T"D`/ML7K$69F9I#_Q4`X:P1WO;C_````6UU!7,-F
+M9F:09F9FD&9FD&9FD%-(B?OH`````+H)````//]T$P^VP$B-!,!(P>`'#[:4
+M&&97``")T%O#9F9FD&9FD$B#["A(B5PD"$B);"003(ED)!A,B6PD($F)_4B)
+M\TB-MI````!)B=Q(BZN8````@'T&``^$3@$``$B)[^@`````B<$\_P^$/`$`
+M``^V0P&#^`%T<(/X`7\,A<!T*&9FD.DB`0``@_@0#X21````/9`````/A-4`
+M``!F9F:09F:0Z0(!``"`O0M"````9F9FD`^%\0```,:%"T(```'^308/MM%!
+MN0````!!N`````"Y`````$R)[DB)[^@`````Z<,```"`O0M"````#X6V````
+MQH4+0@```?Y-!@^VT4&Y`````$&X`````+D!````3(GN2(GOZ`````#IB```
+M`+H!````#[;"2&G`L````$B-A"@`0@``.$@(=0L/MD`)03I$)`ET!__"@/H?
+M=M?^308/MM%-B>%%#[9$)`FY$````$R)[DB)[^@`````ZSE(#[:#J@```$AI
+MP+````#&A"@+0@```?Y-!@^VT4&Y`````$&X`````+F0````3(GN2(GOZ```
+M``!(BUPD"$B+;"003(MD)!A,BVPD($B#Q"C#055!5%532(GU28G538G,08G)
+MNP`````/ML-(:<!0$```2#EL."!U:+D`````#[;#2&GP4!````^WP4C!X`5(
+M`?!,C10X38U:0$$/MD,,A,`/E,(\\`^4P`G0J`%T(DF):C!-B6HX9D6)0P)%
+MB$I`28L$)$F)0D1!QD,,_^L29I#_P6:!^8$`=JYF9F:09F:0_\.`^P-V@%M=
+M05Q!7<-FD$B#[`A)B?.)T$B)_DR-EV!!``#&APM"````0;D`````0;B0````
+M3(G19F9FD&9FD$2("4C_P4G_R'7U0<9"`0!!Q@)`2,>&`$(```````!(B;[X
+M00``#[;`2(T$P$C!X`=(BX0PO%<``$B)AO!!``!(@<9@00``3(G?Z`````!(
+M@\0(PV9F9I!F9F:09F9FD$B#[`A)B?.)T$B)_DR-EV!!``#&APM"````0;D`
+M````0;B0````3(G19F9FD&9FD$2("4C_P4G_R'7U0<9"`0%!Q@)`2,>&`$(`
+M``````!(B;[X00``#[;`2(T$P$C!X`=(BX0PO%<``$B)AO!!``!(@<9@00``
+M3(G?Z`````!(@\0(PV9F9I!F9F:09F9FD%532(/L"$B)]8G328GYN@$````/
+MML-(C03`28G#2<'C!P^VPDAIP+````!*C80(`$(``(!X"P$/A;,```"(6`B(
+M2`G&0`L`2`^V0`I(:<"P````3HV4"&!!``!!N`````"^D````$R)T&9F9I!F
+M9I!$B`!(_\!(_\YU]4'&0@$00<8"0$&(2@D/MM)(:=*P````3`'*2(V*`$(`
+M`$@/MD$*2&G`L````$P!R$C'@`!"````````2(FX^$$``$N+A`N\5P``2(F"
+M\$$``$@/MG$*2&GVL````$J-M`Y@00``2(GOZ`````#K%F9FD&9FD/_"@/H?
+M#X8F____N`$```!(@\0(6UW#9F:09F:09F:0055!5%532(/L"$F)]4F)U$R)
+MS4&)R42)P4F)^KH!````#[;=#[;"2&G`L````$P!T$B-L`!"``"`?@L!#X62
+M````QD8+`$R)D/A!``!(#[9&"DAIP+````!.C9P08$$``$&X`````+Z0````
+M3(G8D$2(`$C_P$C_SG7U0<9#`9!!Q@-`08A;!D&(2P=%B$L)2(M%`$F)0Q`/
+MMO)(:?:P````3`'62,>&`$(```````!(B;[X00``28M$)%Q(B8;P00``2('&
+M8$$``$R)[^@`````ZQ#_PH#Z'P^&1?___[@!````2(/$"%M=05Q!7<.04TB)
+M\TF)TT2)PDB)_DR-EV!!``!!N0````!!N)````!,B=!$B`A(_\!)_\AU]4'&
+M0@$30<8"0`^VQD&(0@9!B%('08A*"4C'A@!"````````2(F^^$$``$F+0UQ(
+MB8;P00``2('&8$$``$B)W^@`````6\-F9F:09F9FD&9F9I`/MM(/MTQ6>/_!
+M9HE,5GAF#[9&`@'(#[?`PV9FD&9FD+H!````B=!(:<"P````@+PX"T(```%U
+M"(G0PV9FD&:0_\*#^A]VWKC__P``9F9FD,-F9F:09F9FD&9F9I!F9I"Y`0``
+M`(G(2&G`L````$B-A#@`0@``0#AP"'4*.%`)=07&0`L!P__!@_D?9F:09I!V
+MT_/#9F9FD&9F9I!F9F:02(/L6$B)7"0H2(EL)#!,B60D.$R);"1`3(ET)$A,
+MB7PD4$F)_TB)="0808G61(A$)!=)B?Q-B<T/ML)(C03`2,'@!X"\.,17``#]
+MN/W___\/1,@/ML&#^!`/A)$"``"#^!!_'(7`#X2D````@_@!D`^$/0$``.D%
+M"0``9F:09I`]X@````^$9@@``#WB````?Q,]D`````^$5P<``&9FD.G;"```
+M/?\```!F9I!F9I`/A<H(```/ML)(C03`2,'@!\:$.,17``#_@+\+0@```74?
+M00^VUDB+="08Z`````"%P`^%F`@``$'^1P;ICP@``$2)\0^VP<9$!P<!2(M4
+M)!A(B53'$.EU"```9F:09I!(C8]@00``@+\+0@```750#[;"2(T$P$C!X`=(
+M`?@/ME$)B)!B5P``2`7`5P``#[91"H/B`8A0!<9`!`!!#[;62(MT)!CH````
+M`(7`#X4>"```0?Y'!ND5"```9F:09I`/ML+&1`<'`4B+5"082(E4QQ#I^0<`
+M`$'&1`0'_P^VTDF+=,000;D`````0;@`````N?\```!,B?_H`````.G-!P``
+MNP````!(C9=@00``1(GQ#[;!2(T$P$C!X`=(C0PX#[9",HB!LE<```^W0C!F
+MB8&P5P``2(M"*$B)@:!7``!(BT(,2(F!<%<``$B+0A1(B8&`5P``2(M"'$B)
+M@8A7``"+0B2)@9A7``#&@<17```!@'\&'P^$5`<``("Y8E<```!T?4$/ML:)
+M1"001(GR#[;"2(T$P$B)Q4C!Y0=)B<U,C;0]L%<``&9F9I!F9I`/MLN+5"00
+M2(MT)!A,B?_H`````(7`=2#_PT'^1"0&03B=8E<``'4*0<:%LU<```#K#D&(
+M7@/K"$&(7@/K%&:008!\)`8?=`I".)PE8E<``'>N0<:$)`M"```!N@````!!
+M@'PD!``/AK0&``!F9F:0#[;"08!\!`<!#X2H_O___\)!.%0D!'?HZ9,&``!F
+M9I#&1"0/_TF+01A(B40D(`^VPDB-!,!(P>`'2(TL.$B-A<!7``#&0`000?9!
+M#'`/A(`#``!(@[W(5P```'1Y#[98!DB+O<A7``!(@\=<N@@```!(C70D(.@`
+M````A,!U5T'V10\/=%!(BZW(5P``2(7M=$2`?64`=#0/MMN)VDB)[DR)Y^@`
+M````38U-&$0/M\")V4B)ZDB+="083(G_Z``````/MEUF2(MM:.L%O0````!(
+MA>UUO$$/ME4/]L(-#X0<`0``1(GQ#[;!2(T,P$B)R$C!X`=,`>"`N&!7```?
+M#X?[````#[:88%<``/;""'06#[;#2(T$R$C!X`1"QH0@X%D```;K'D2)\@^V
+MP@^VTTB-!,!(C03"2,'@!$+&A"#@60``!T2)\`^VR`^VPTB-#,E(C13(2,'B
+M!$P!XDB-LN!9``#&1@$`00^V10^(1@-(BT0D($B)@NA9``!!#[9%"8A&`DC!
+MX0=!#[9%#8/@#T(/MI0A9E<``#C"#T?0@^(/#[9&!(/@\`G0B$8$1(GR#[;"
+M2(T$P$B)\4C!X`>^#P```$$B=2E"#[:4(&97``!`./(/1];!X@0/MD$$@^`/
+M"="(001$B?$/ML%(C03`2,'@!T+^A"!@5P``Z=,!``!!]D4/`@^$R`$``$B-
+M="0@3(GGZ`````!!B<`\_P^%4@$``,9$)`\`08!\)`0`=C=(#[9$)`](C03`
+M2,'@!T(/MH0@Q%<``#S_#Y3"//T/E,`)T*@!=1#^1"0/#[9$)`]!.$0D!'?)
+M2`^V1"0/2(T$P$C!X`>Y`````+ID````2HV$(&!7``"("$C_P$C_RG7V2`^V
+M5"0/2(T4TDC!X@=,`>)$B?$/ML%(C03`2,'@!TP!X$B-N&!7``!(B;K(5P``
+M2(N(O%<``$B)BK17``!(BTPD&$B)BMA9``!(BX#05P``2(F"T%<``,:"Q%<`
+M`/](C8I@5P``2`^V<0=!#[9%"8B$,FA7``#^00=!#[95#8/B#P^V1P8XT`]'
+MPHA!!D@/MD0D#TB-!,!(P>`'3`'@2(M4)"!(B9"\5P``00^V50^(D&-7```/
+MME0D%XB0QE<``$$/MD0D!4$Z1"0$=09!QD0D!0!!_D0D!>M+QD4#`.D[`P``
+M1(GQ#[;12(T4TDC!X@</ML!(C03`2,'@!TJ--"!(C8Y@5P``2CF,(LA7``!T
+M%$@/ME$'00^V10F(A!9H5P``_D$'08#X_W462`^V1"0/0<9$!`<!2(M4)!A)
+MB53$$$$/ME4)00^V]DR)Y^@`````1(GQ#[;!2(G"2(T$P$C!X`=*C0P@2(V!
+ML%<``(!X`P`/A+8```!!@'PD!A\/A)H"```/MD`#.H%B5P``#X.*`@``10^V
+M[DF)UF9FD$B-!-)(P>`'2HT<(,:#Q%<``!!(C:NP5P``#[9-`T2)ZDB+="08
+M3(G_Z`````"%P`^%2@(``$'^1"0&#[9%`__`#[:38E<``#G0#X3L_O__3(GR
+M2XT$]DC!X`=*C30@2(V&L%<```^V2`/_P8A(`T&`?"0&'P^$!0(``#J.8E<`
+M``^">?___^GT`0``9F9FD$&`?"0&``^%Y`$``$$/MM9!N0````!!N`````"Y
+MD````$B+="083(G_Z`````#IO0$``$'&1`0'_P^VTDF+=,000;D`````0;@`
+M````N?\```!,B?_H`````,9$)`<!Z<L```#&1"0'`,=$)`@`````BT0D"$AI
+MP%`0``!(BU0D&$HY5"`@=6>]`````(M$)`A,:>A0$```B>A(P>`%3`'H3`'@
+M2(U80(![#/]U-T&`?"0&'P^$-@$```^V2$!,C4A$1`^W0P)(BU`X2(MT)!A,
+MB?_H`````(7`=0E!_D0D!L9##/#_Q8']@0```':I_T0D"(-\)`@##X9S____
+M08!\)`8`#X7F````N@````!!@'PD!`!V&`^VPD&`?`0'`0^$#?_____"03A4
+M)`1WZ(!\)`<`#X6V````00^VUD&Y`````$&X`````+GB````2(MT)!A,B?_H
+M`````.F/````NP````"`?P0`=CMF9F:0#[;#2(T$P$C!X`=*C8P@P%<```^V
+M402`^OT/E<"`^O\/E<(/ML"%PG0$QD$$_O_#03A<)`1WR42)\0^VP4B-!,!(
+MP>`'2HNL(-!7``"[``````^VPTAIP%`0``!,`>!(C5`@@'H(`74-QD((`$B+
+M<"!,B?__U?_#@/L#=M5F9I!(BUPD*$B+;"0P3(MD)#A,BVPD0$R+="1(3(M\
+M)%!(@\18PV9F9I!F9I!F9I!F9I!!B='&`?ZZ`````$&X`````(!_!`!V,P^V
+MPDB-!,!(P>`'2`'X2#FPV%D``'4513C(=0T/MH#$5P``B`'#9F:00?_`_\(X
+M5P1WS?/#9F9FD%532(/L"$F)TTR)Q4&)R$B)^P^V1P4Z1P1U!,9'!0`/MDL%
+MN@`````/ML)(:<!0$```2`'83(U(($@Y<"!U04'&00@!N0````"`>P0`=E\/
+MML%(C03`2,'@!T@!V$@YL-A9``!U#@^V@,17``"#P`,\`78Z_\$X2P1WU.LQ
+M9F:0#[;"2&G`4!```$@!V$R-2"!(@W@@`'4+2(EP($'&00@!ZPO_PH#Z`P^&
+M>O___P^VPDAIP%`0``!!N@````!!N0(0``!(C408,&9F9I!F9I!$B!!(_\!)
+M_\EU]0^VP4B)=,,02(T$P$C!X`=!N@````!!N60```!(C8088%<``$2($$C_
+MP$G_R77U#[;!2(T$P$C!X`=!N@````!!N0`"``!(C808V%<``$2($$C_P$G_
+MR77U#[;!2(T$P$C!X`=(`=A(B;#860``2(FHT%<``,:`Q%<``/](QX#(5P``
+M`````$F+$TB)D+Q7``!$B(!F5P``#[;10;D`````0;@`````N?\```#H````
+M`/Y#!4B#Q`A;7<-F9F:09F:09F:04[L`````@'\$``^&D0````^VPTB-!,!(
+MP>`'2#FT.-A9``!U<;H!````#[;"2&G`L````$B-A#@`0@``.%@(=03&0`L!
+M_\*`^A]VW@^VPTB-!,!(P>`'2`'X2,>`V%D```````"Y`````+ID````2(V`
+M8%<``(@(2/_`2/_*=?8/ML-(C03`2,'@!\:$.,17``#]_D\%_\,X7P0/AV__
+M__^[``````^VPTAIP%`0``!(`?A(C5`@2#EP('4Q2,=`(`````#&0@@`N@``
+M```/ML-(:<A0$```#[;"2,'@!4@!R,9$.$P`_\*`^H%VZO_#@/L#=K%;PV9F
+MD&9FD&9FD%-)B?E!N@````"_`````(#Z`0^%*`$``$V%P`^$`P$``$&`>00`
+M=BA$B=(/ML)(C03`2,'@!THYM`C860``=0=`.,]T"__'0?_"13A1!'?81(G0
+M#[;(2(G/2(T,R4C!X0=,`<E(C9%@5P``2(N!8%<``$F)`$B+0@A)B4`(2(M"
+M$$F)0!!(BT(828E`&$B+0B!)B4`@2(M"*$F)0"A(BT(P28E`,$B+0CA)B4`X
+M2(M"0$F)0$!(BT)(28E`2$B+0E!)B4!02(M"6$F)0%B+0F!!B4!@NP````"`
+MN6!7````=D(/ML-(B<%(P>$$3`'!2(TT_TB-!/!(P>`$3`'(2(N0X%D``$B)
+M461(BX#H60``2(E!;/_#2,'F!T(XG`Y@5P``=[Y$B=(/ML)(C03`2,'@!T(/
+MMH0(8%<``.LZ9F:00;H`````NP````!!@'D$`'8A#[;#2(T$P$C!X`=*.;0(
+MV%D```^4P$$!PO_#03A9!'??00^VPEO#D)"0D)"0D$B+%TR+`KD`````@'I#
+M`'862`^V=PU(B?!(T_BH`74'_\$X2D-W[X#Y`W8D2(T$C0`````E_`,``$*+
+MA`#0`0``B04`````ZR)F9F:09F:02(T$C0`````E_`,``$*+A`#0`0``B04`
+M````J0``$``/E<`/ML##9F:09F:09F:005=!5D%505154TB#[`A(B3PD3(LO
+M38ME`,9&00#&1D`%QD9#!DB+!"1(B49(0;\`````0;X`````NP````!!@'U#
+M`'8?2(L,)$@/ME$-9I!(B=")V4C3^*@!=0C_PT$X74-W[(#[`W8;2(T$W0``
+M```E^`<``$+'A"```@``+````.L92(T$W0`````E^`<``$+'A"```@``+```
+M`+\0)P``Z`````"`^P-V)$B-!-T`````)?@'``!"BX0@!`(``(D%``````^V
+MZ.LB9F9FD$B-!-T`````)?@'``!"BX0@!`(``(D%``````^VZ$$)[H#[`W8;
+M2(T$W0`````E^`<``$+'A"```@``)````.L92(T$W0`````E^`<``$+'A"``
+M`@``)````+\0)P``Z`````"`^P-V)TB-!-T`````)?@'``!"BX0@!`(``(D%
+M`````(G%@>7___\`ZR5FD$B-!-T`````)?@'``!"BX0@!`(``(D%`````(G%
+M@>7___\`B>C!X`A!"<:`^P-V($B-!-T`````)?@'``!"QX0@``(``"````#K
+M'F9FD&:02(T$W0`````E^`<``$+'A"```@``(````+\0)P``Z`````"`^P-V
+M'TB-!-T`````)?@'``!"BX0@!`(``(D%`````(G%ZQU(C03=`````"7X!P``
+M0HN$(`0"``")!0````")Q4&!_@$!:99U%TB+!"2`2`P&B>C!Z!`\4`^4P`^V
+MP.M`08'^`0$``'43B>C!Z!`\4`^4P`^VP.LH9F9FD+^($P``Z`````!!_\=!
+M@/\$#X;,_?__B>C!Z!`\4`^4P`^VP$B#Q`A;74%<05U!7D%?PV9F9I!F9I!F
+M9I!F9I!54TB#[`A(B?U(BQ_H`````(3`=1'&10G_2(GN2(G?Z`````#K;+D`
+M````@'M#`'862`^V50U(B=!(T_BH`74'_\$X2T-W[TB)W^@`````2(G&2(7`
+M=#M(C45@2(M0"$B)<`A(B09(B58(2(DR_D4.2(EN2,9&0`7&1D$`QD9Y#[D!
+M````N@$```!(B>_H`````$B#Q`A;7<-F9F:09F:0055!5%532(/L"$F)_$B)
+M]4R++[L*````2(GN3(GGZ`````"$P'4.O^@#``#H`````/_+=>.Y`````$&`
+M?4,`=AA)#[94)`U(B=!(T_BH`74(_\%!.$U#=^Y(BU4(2(M%`$B)4`A(B0)!
+M_DPD#DB)[DR)[^@`````0?9$)`P"=%5)@WPD0`!U($R)[V9FD&:0Z`````!(
+MB<9(A<`/A(\!``!)B40D0.L%28MT)$!,B2Y,B::(````QD9&`,9&1P#&1D(`
+M9H-.3@1,B>_H`````.E;`0``28-\)$``#X3@````28MT)$!(@<:0````28M]
+M*.@`````28MT)$!,B>_H`````$F-1"1@2(G"23E$)&`/A*(```!(B<-F9F:0
+M9F:02(G7Z`````!(B<5(@W@X`'1H2(M`.$C'0&``````]D5$!'4D0?Z%[Q,`
+M`$R)[^@`````2(M%.`^V<`&Z`0```$R)[^@`````2(M5.$F+M=`(``"_`0``
+M`.@`````2(M5.$F+M=`(``"_!@```.@`````2,=%.`````!!_DPD#DB)[DR)
+M[^@`````2(G:23E<)&`/A6C___])QT0D0`````!!@'PD#@!T%$F-?"1@Z```
+M``!(B<5!_DPD#NL+3(GOZ`````!(B<5(A>UT0TF-1"1@2(M0"$B):`A(B44`
+M2(E5"$B)*D'^1"0.3(EE2,9%0`7&14$`QD5#!L9%0@-(B>Y,B>_H`````&9F
+M9I!F9I!(@\0(6UU!7$%=PV9FD&:02(/L.$B)7"0(2(EL)!!,B60D&$R);"0@
+M3(ET)"A,B7PD,$F)_$F)]4&)UD&)STB+!TB)!"2Z`````+T`````@'\.`'9$
+M2(U?8&9F9I!F9I!(B=_H`````$B)PDB+0PA(B5,(2(D:2(E""$B)$$PY:E!U
+M#40X<GET$&9F9I!F9I#_Q4$X;"0.=\=!.&PD#F:0="Y!@/]0=2C&0D,&QD)"
+M!<9"0`?&0D$`3(EJ4$R)8DA(B=9(BSPDZ`````!F9F:02(M<)`A(BVPD$$R+
+M9"083(ML)"!,BW0D*$R+?"0P2(/$.,-F9F:09F:09F:09F:02(/L.$B)7"0(
+M2(EL)!!,B60D&$R);"0@3(ET)"A,B7PD,$F)_4F)]DR+)T&______[N`____
+MO?____^`^X5W#`^VPT(/MJP@0`@``$"`_?]T-8GJ#[;"28N4)&@)``!(:<#(
+M#P``3#EL$`AU&DB-/!"Z"````$R)]N@`````A,!T!4&)[^L+_\.`^X%F9F:0
+M=J1!#[;'2(M<)`A(BVPD$$R+9"083(ML)"!,BW0D*$R+?"0P2(/$.,-F9F:0
+M9F:005=!5D%505154TB![$@"``!)B?Y(B70D.(A4)#=(BT<(2(E$)"A,BR@/
+MME=8B%0D)TB-1TA(B<)(.4=(#X1L`@``@'PD)P`/A&$"``!,C7PD0$B)1"0(
+M2(D$)&9FD&:02(G7Z`````!(C6CP#[9,)#=-B?BZ`0```$B+="0H2(M\)#CH
+M`````$&\`````(!\)$``#X;M````2(U5$$B)5"082(M,)`A(B4PD$&9F9I!$
+MB>(/ML)(P>`$2HT<.$B->VRZ"````$B-M<P```#H`````(3`#X2=````2(U3
+M8`^V0@B#X`^(A>(````/MTU@9H'AW_V)R(/($&:)16`/MD((P.@$/`EU"8G(
+M@\@P9HE%8$2)X0^VP4C!X`1"#[9$.&C`Z`0\"G4&9H%-8``"2(M4)!!(BT((
+M2(M,)!A(B4H(2(E5$$B)00A(B0@/MD5$J`)T,H/@_8A%1$B#?3@`="5(BU4X
+M28NUT`@``+\&````Z`````#K#D'_Q$4X)P^'+/___^L)13@G#X<&`0``2(GJ
+MO@8```!(BWPD*.@`````@'U[`'083(GOZ`````"_`0```.@`````@'U[`'7H
+M2(.]&`$```!T&`^VM04!``!(B[T8`0``N@$```#H`````$B#?5``=!@/MG5Y
+M2(M]4+H!````Z`````!F9I!F9I!(@WTX`'1H2(M%.$C'0&``````]D5$!'4D
+M0?Z%[Q,``$R)[^@`````2(M%.`^V<`&Z`0```$R)[^@`````2(M5.$F+M=`(
+M``"_!@```.@`````2(M5.$F+M=`(``"_`0```.@`````2,=%.`````!(BU4(
+M2(M%`$B)4`A(B0)(BT0D*/Y(#D'^3EA(B>Y,B>_H`````/Y,)"=(BQ0D23E6
+M2'0+@'PD)P`/A;+]__](@<1(`@``6UU!7$%=05Y!7\-!5T%6055!5%532('L
+M.`(``$B)?"0H28GU2(E4)"!(BP=(B40D&,9$)!<`2(U<)#!$#[;A28G81(GA
+MN@$```!(B?Y,B>_H`````$F)WD2)XDR)[DB+?"0@Z`````!(BTPD($B+44A,
+MC7KP2(G(2(/`2$@YPG0]2(G!9F9FD&9FD$$/MD=!/`T/E,(\(@^4P`G0J`%T
+M$<9$)!<!0<9'0@5!QD=#!.L-28M'$$R->/!(.<AUS;T`````08`^``^&#`(`
+M`$B+1"0@2(/`2$B)1"0(2(D$)$B+3"0@2(M!2$R-8/!(.T0D"'0YB>H/ML)(
+MB<-(P>,$3(LL)$F-O"3,````N@@```!*C70S;.@`````A,!U#DF+1"003(U@
+M\$PYZ'7728U$)!!(.T0D"`^%D@$``,9$)!<`2(M\)!CH`````$F)Q$B%P`^$
+ME@$``$B+3"0H_D$.QD!"!<:`X`````#&0$,$9L>`P```````QH#"`````$C'
+M0'````4`B>H/ML)(P>`$2HU$,&`/ME`$08A4)$`/ME`%08A4)$%)B4PD2`^V
+M4`B#X@]!B)0DX@```$$/MTPD8&:!X=_]B<J#RA!F08E4)&`/MD`(P.@$/`EU
+M"XG(@\@P9D&)1"1@B>D/ML%(P>`$0@^V1#!HP.@$/`IU"&9!@4PD8``"2(M$
+M)"!)B40D4(GJ#[;"2,'@!$P!\`^V4&9!B%0D>4B+0&Q)B80DS````$F)A"3$
+M````2(M,)"#^05A(BT0D*$B#P&!(BU`(3(E@"$F)!"1)B50D"$R)(DF-1"00
+M2(M,)`A(BU$(2(E!"$F)3"002(E0"$B)`DD/MD0D0*@"=">H!'0CJ`%T'T$/
+MME0D>4R)X4B+="0@2(M\)"CH`````.LH9F:09I!)#[9$)$"H`G09J`1F9F:0
+M=!&H`74-3(GF2(M\)!CH`````/_%03@N#X<&_O__@'PD%P!T#;X*````3(G_
+MZ`````!(@<0X`@``6UU!7$%=05Y!7\-F9F:09F9FD&9F9I!!5T%6055!5%53
+M2('L2`(``$F)_$B)="0X3(LO#[9'*(A$)#=(C4=(2(G"2#E'2`^$1@,``(!\
+M)#<`#X0[`P``2(E$)!!(B40D"$B)U^@`````2(UHR$&X`````+D`````N@``
+M``!,B>9(BWPD..@`````08G'0;X`````03C&#X/<`0``2(U4)$!(B50D*$B-
+M33A(B4PD($B+1"002(E$)!A!#[;>0;@`````B=FZ`0```$R)YDB+?"0XZ```
+M```/ML!(P>`$2(/`9$@]``(```^'7P$``$R+1"0HB=FZ`0```$R)YDB+?"0X
+MZ`````!(BUPD*$B->URZ"````$B)[N@`````A,`/A"@!``!(BU0D&$B+0@A(
+MBTPD($B)2@A(B54X2(E!"$B)"`^V1"1"B$592(US5$R)Y^@`````//]T%0^V
+MP$AIP,@/``!)`X5H"0``2(E%$$6$]G11#[9#`]'H@^`!P>`$#[9578/B[PG"
+MB%5=#[9#`\'H`X/@`<'@!8/BWPG"B%5=#[9#`\'H`H/@`<'@`X/B]PG"B%5=
+M#[9#!HB%NP```.F6````#[9#`HA%64R)90@/MD,&B(6[````#[=#!(E%8`^W
+M0U!FB86X````#[9#4HB%N@```$B+0T!(B86H````2(M#2$B)A;````!(BT,0
+M2(E%>$B+0QA(B86`````2(M#($B)A8@```!(BT,H2(F%D````$B+0S!(B868
+M````2(M#.$B)A:````#K#D'_QD4X_@^"8/[__^L=00^VSDB)ZDB+="0X3(GG
+MZ`````!%./X/@O\```!(C45(2(G"2#E%2`^$W@```$F)QDB)U^@`````2(U8
+M\$B)VKX&````3(GGZ`````"`>WL`=!A,B>_H`````+\!````Z`````"`>WL`
+M=>A(@WLX`'1L2(M#.$C'0&``````]D-$!'4H0?Z%[Q,``$R)[^@`````2(M#
+M.`^V<`&Z`0```$R)[^@`````9F9FD$B+4SA)B[70"```OP$```#H`````$B+
+M4SA)B[70"```OP8```#H`````$C'0S@`````2(M3"$B+`TB)4`A(B0)!_DPD
+M#OY-6$B)WDR)[^@`````3(GR3#EU2`^%)?___T'^3"0H2(GN3(GOZ`````#^
+M3"0W2(M4)`A).50D2'0+@'PD-P`/A<_\__](@<1(`@``6UU!7$%=05Y!7\-F
+M9I!!5T%6055!5%532('L*`(``$F)_DB)]4B+!DB)1"082(G^2(GOZ`````!!
+MN`````"Y`````+H`````2(GN3(GWZ`````"(1"070;P`````03C$#X-&`P``
+M2(U58$B)%"1!#[;<0;@`````B=FZ`0```$B)[DR)]^@`````#[;`2,'@!$B#
+MP&1(/0`"```/A_T"``!,C40D((G9N@$```!(B>Y,B??H`````$R-;"0@28UU
+M7$B)[^@`````//\/A<T"``!(BWPD&.@`````2(G#2(7`#X3<`@``_D4HQD!8
+M`$B+1"1\2(D#28UU5$B)[^@`````//]T&@^VP$AIP,@/``!(BU0D&$@#@F@)
+M``!(B4,000^V10*(0UE!#[9%`]'H@^`!P>`$#[9378/B[PG"B%-=00^V10/!
+MZ`.#X`'!X`6#XM\)PHA374$/MD4#P>@"@^`!P>`#@^+W"<*(4UU(B6L(00^V
+M10:(@[L```!)BT4(2(E#<$$/MD4'B$-:00^W102)0V!!#[=%4&:)@[@```!!
+M#[9%4HB#N@```$F+14!(B8.H````28M%2$B)@[````!)BT402(E#>$F+11A(
+MB8.`````28M%($B)@X@```!)BT4H2(F#D````$F+13!(B8.8````28M%.$B)
+M@Z````!(C5,X2(U%2$B+2`A(B5`(2(E#.$B)2@A(B1%FQT0D%```08!]```/
+MA'$!``!(BP0D2(E$)`A,C7M(9F9FD$B+?"08Z`````!(B<%(A<`/A&\!``#^
+M10[&0$(%QH#@`````,9`0P1(QT!P```%`&;'@,```````$@/MU0D%$C!X@1*
+MC50J8`^V0@2(04`/MD(%B$%!2(EI2$B)65`/MD(&B$%Y#[9""(/@#XB!X@``
+M``^W<6!F@>;?_8GP@\@09HE!8`^V0@C`Z`0\"74)B?"#R#!FB4%@2`^W1"04
+M2,'@!$(/MD0H:,#H!#P*=09F@4E@``)(#[=$)!1(P>`$2HM$*&Q(B8',````
+M2(F!Q````/Y#6$B+5"0(2(M""$B)2@A(B1%(B4$(2(D(2(U!$$F+5PA)B4<(
+M3(EY$$B)4`A(B0)(#[9!0*@"=!FH!'05J`%T$0^V47E(B=Y(B>_H`````.L>
+M2`^V04"H`G05J`1T$:@!=0U(B<Y(BWPD&.@`````9O]$)!1F00^V10!F.T0D
+M%`^'I_[__V9F9I!F9I!!_\1$.F0D%P^"POS__X!]#@!U$<9%"?](B>Y(BWPD
+M&.@`````2('$*`(``%M=05Q!74%>05_#9F:09F:09F:0055!5%532(/L"$F)
+M_4B)]4&X`````+D`````N@````#H`````$&)Q+L`````.,-S)0^VTTB-3"0'
+M2(GN3(GOZ`````"`?"0'_@^%D0```/_#1#CC<MO^35B`?5@`=&A,BV4`QD58
+M`$B+54A(C5K(2(U%2$@YPG1H2(G"9F:09I!(@WL0`'0/2(M#.$B-6,A(.=!U
+M[.M*_D582(GN3(GOZ``````/MHN[````28N\)&@0``!)Q\``````2(G:2(GN
+MZ`````#K&4B)[DR)[^@`````2(GN3(GOZ`````!F9I!(@\0(6UU!7$%=PV9F
+MD&:02(L7O@H```"Y`````(!Z0P!V-4@/MG\-2(GX2-/XJ`%T'P^VP4AKP&B+
+MA!!L$@``)0```P#!Z!"#P`A`./`/0O#_P3A*0W?00`^VQL-F9I!(BQ>^"```
+M`+D`````@'I#`'8U2`^V?PU(B?A(T_BH`70?#[;!2&O`:(N$$&P2```E```#
+M`,'H$(/`"$`X\`]'\/_!.$I#=]!`#[;&PV9FD$B#[%A(B5PD*$B);"0P3(ED
+M)#A,B6PD0$R)="1(3(E\)%!)B?U,BR=!OP````"`?PT`#X2=`P``O0`````/
+MMD<-B<*H`74,_\6)T(GIT_BH`73TB>H/ML)(:\!H2HV4(%`2``"+0@RI```"
+M`'0-#0``!``E___]_XE"#(GI#[;!2&O`:$+VA"!>$@``!`^$CP(``$V-M"0`
+M%```33FD)-`(``!T"$V+M"30"```B>H/ML)(:\!H3`'@1`^VB&(2``!$#[:`
+M81(```^VB&`2``!!#[94)$%`#[;U#[:X9Q(``(E\)"`/MKAF$@``B7PD&`^V
+MN&42``")?"00#[:X9!(``(E\)`@/MH!C$@``B00D2,?'`````+@`````Z```
+M``!!N(````")Z0^VP4AKP&A.C8P@8!(``/Q!#[?`9D(/MH0P0`@``&8]_P!T
+M+P^WP$AIP,@/``!(B<-)`YYH"0``2(G>3(G/N0@```#SI@^7P@^2P#C"#X14
+M`0``0?_`9D&!^($`=K),B>?H`````$B)PTB%P`^$.@(``(GJ#[;"2&O`:$+V
+MA"!=$@``!'0$@$M=`HGI#[;!2&O`:$+VA"!>$@``!'0$@$M=$(GJ#[;"2&O`
+M:$+VA"!=$@``"'0$@$M=!(GI#[;!2&O`:$+VA"!>$@``"'0$@$M=((GJ#[;"
+M2&O`:$+VA"!=$@```G0$@$M=`8GI#[;!2&O`:$+VA"!>$@```G0$@$M=",9#
+M6`")Z@^VPDAKP&A*BX0@8!(``$B)`TR):PA,B>_H`````(B#NP```$'^12BY
+M`````$&`?"1#`'8E20^V10U(T_BH`7001(GZ#[;"B$P8</Y#6D'_Q__!03A,
+M)$-WVTB-4SA)C45(2(M("$B)4`A(B4,X2(E*"$B)$4'^15@/MHN[````28N\
+M)&@0``!)Q\``````2(G:3(GNZ`````#I!0$``$0/MDL$1`^V0P,/MDL"#[93
+M`0^V,P^V0P>)1"00#[9#!HE$)`@/MD,%B00D2,?'`````+@`````Z`````!!
+MQD4)_TR)[DR)Y^@`````Z;,```")Z0^VP4AKP&A*C2P@]H5>$@``"`^$F0``
+M`$R)Y^@`````2(G#2(7`#X2%````QD!#!L9`0@5FQX#```````#&0$`&QD!!
+M`$C'0'````4`2(N%8!(``$B)@\P```!(B8/$````3(EK2$R)[^@`````B(/B
+M````9H-+8!!,B>_H`````#P)=@9F@4M@``)!QD4.`4F-16!(BU`(2(E8"$B)
+M`TB)4PA(B1I(B=Y,B>?H`````$B+7"0H2(ML)#!,BV0D.$R+;"1`3(MT)$A,
+MBWPD4$B#Q%C#9F9FD&9F9I!!5T%6055!5%532(/L"$B)^TF)];@`````2(7V
+M=`0/MD8)#[;`0;P`````A<!T$3W_````#X1L`0``Z=$%``"01(GB#[;"#[:$
+M&,8(```\_W02#[;`2&G`J````$R-K!B@`0``0?_$08#\`W;30;P`````1(GB
+M#[;"#[:$&,8(```\_W0S#[;`2&G`J````$R-K!B@`0``0?9%"@)T$KX`````
+M3(GOZ`````#K"V9FD$R)[^@`````0?_$08#\`Y!VL68/MD,^9CF#0!````^%
+M/`4``$V%[0^%M````(![40`/A2D%``#&0U$!O0`````/M]5(B[330`0``$B%
+M]G0X2(.^@`````!T+DB+AH````!(QX:``````````$C'A--`!````````$B+
+MOI````"Z_______0ZT@/M]5(@[S30`0```!T.DB+A--`!```2(.XB`````!T
+M*$B+AH@```!(QX:(`````````$C'A--`!````````$B+OI````#_T)#_Q6:#
+M_3\/AF3____I?P0``$'&10G_3(GN2(G?Z`````#I:@0``,9$)`<`9F:09I!(
+M#[9$)`</MH08Q@@``#S_#X3Q````#[;`2&G`J````$R-K!B@`0``08!]"?\/
+MA-0```!!O`````!!@'T.``^&N0```$V-=6!,B??H`````$B)Q4F+1@A)B6X(
+M3(EU`$B)10A(B2B`?4+_#X2`````@+WA`````'1H2`^V14"H`G0>J`1T&J@!
+M=!8/ME5Y2(MU4$B)Z4R)[^@`````ZT*02`^V14"H`G4:J`1F9I!FD'01J`%T
+M#4B)[DB)W^@`````ZQY(#[9%0*@"=!6H!&:0=`^H`74+2(GN2(G?Z`````"X
+M`0```.EZ`P``9F:09I!!_\1%.&4.#X=+____N`$```#I7@,``/Y$)`>`?"0'
+M`P^&ZO[__\9$)`<`@'M1``^%L````+T`````9F:09F:0#[?%2(NTPT`$``!F
+M#[:4&$`(``!(A?9T=TB#OH``````=&U(@WY@`'5F9H'Z_P"0="X/M\)(BXL8
+M"0``2&G`B`$``/9$"$,$=!:`?`A!`'4/#[?22(G?Z`````#K,F:02(N&@```
+M``^WU4C'A--`!````````$C'AH``````````2(N^D````+K______]"0_\5F
+M@_T_#X9D____QD-1`>F+`@``2`^V1"0'#[:$&,8(```\_P^$90(```^VP$AI
+MP*@```!,C:P8H`$``$&\`````$&`?0X`#X9"`@``38UU8$R)]^@`````2(G%
+M28M&"$F);@A,B74`2(E%"$B)*(!]0O\/A0D"```/MT4P9HE$)`0/M\!F#[:4
+M&$`(``!FB50D`DR+O,-`!```#[9%1*@$='%-A?]T;$F#OX``````=&))@W]@
+M`'5;@^#[B$5$]D5#!'02#[=4)`),B?Y(B=_H`````.L]28N'@````$@/MU0D
+M!$C'A--`!````````$G'AX``````````2,=%.`````!)B[^0````NO____],
+MB?[_T/9%0P0/A$4!``#&A>``````08!E#.?V140!#X3[````@&5$_DB#?3@`
+M=$V`?4$`=2WV14,$="</MU0D!`^V0T'!X`8!PDACTDB+L]`(``"_!P```.@`
+M````Z?$```!(BU4X2(NST`@``+\!````Z`````#IUP```$V%_W1J28._@```
+M``!T8(!]00!U&_9%0P1T%0^W5"0"3(G^2(G?Z`````#IIP```$F+AX````!(
+M#[=4)`1(QX330`0```````!)QX>``````````$C'13@`````28N_D````+K_
+M____3(G^_]#K:(!]00!U8O9%0P1T7`^W5"0$#[9#0<'@!@'"2&/22(NST`@`
+M`+\"````Z`````#K.&9F9I!(@WTX`'0M2(M5.$B#NH@`````=!](BX*(````
+M2,>"B`````````!(BU4X2(NZD````/_0]D5$`G092(M5.$B+L]`(``"_!@``
+M`.@`````@&5$_4'_Q$4X90X/A\+]___^1"0'@'PD!P,/AG;]__^0N`$```!(
+M@\0(6UU!7$%=05Y!7\-F9F:09F9FD&9F9I!(@^PX2(E<)`A(B6PD$$R)9"08
+M3(EL)"!,B70D*$R)?"0P28G^2(GS3(MN2$@/MT8PN@````"`O#A`"```_P^$
+ML0(```^V1D*#^`\/A`0!``"#^`]_2H/X#`^$R0```(/X#'\<@_@%=&R#^`MF
+M9F:0#X2E````Z74"``!F9I!FD(/X#0^$K````(/X#F9F9I`/A*\```#I50(`
+M`&9FD&:0@_@9?Q*#^!A]7X/X%&9FD'0XZ3D"``"#^!MF9I!F9I!T-3W_````
+M#X2,````9F:0Z1L"``"^`0```$B)WV9FD.@`````Z08"``!(B??H`````.GY
+M`0``O@````!(B=_H`````.GG`0``O@$```!(B=_H`````.G5`0``2(GWZ```
+M``#IR`$``$B)]^@`````Z;L!``!(B??H`````&9FD.FK`0``2(GWZ`````!F
+M9I#IFP$``,9&0O])B=]!O`````!!@'T.``^&QP```$F-;6!(B>_H`````$B)
+MPTB+10A(B5T(2(DK2(E#"$B)&(![0O\/A(@```"`>T$`#X6%````@+OA````
+M`'1F2`^V0T"H`G0=J`1T&:@!=!4/ME-Y2(MS4$B)V4R)[^@`````ZT!(#[9#
+M0*@"=1FH!&9F9I!T$:@!=`U(B=Y,B??H`````.L>2`^V0T"H`G05J`1FD'0/
+MJ`%U"TB)WDR)]^@`````N@$```#IV@```&9FD&:0QH/A`````$'_Q$4X90X/
+MASW___]%.&4.#X6B````00^V1T$\(@^4PCP-#Y3`"="H`70_O@H```!,B?_H
+M`````+H!````Z8L```!(B=Y(Q\<`````N`````#H`````+X*````2(G?Z```
+M``"Z`0```.MC0;P`````08!]#@!V04F-;6!(B>_H`````$B)PTB+10A(B5T(
+M2(DK2(E#"$B)&`^V0T$\(@^4PCP-#Y3`"="H`7660?_$13AE#G?&9F:00<9%
+M"?],B>Y,B??H`````+H!````B=!(BUPD"$B+;"003(MD)!A,BVPD($R+="0H
+M3(M\)#!(@\0XPV9FD&9FD$B#[%A(B5PD*$B);"0P3(ED)#A,B6PD0$R)="1(
+M3(E\)%!)B?U(B?-,BWY(2`^W1C"Z`````("\.$`(``#_#X2B!@``#[9&0H/X
+M"0^$=P,``(/X"7]*@_@%#X3[````@_@%?Q>#^`,/A)X```"#^`0/A,(```#I
+M9@8``(/X!V:0#X0T`P``@_@'9F9FD&9FD`^/%@,``.FI`@``9F:09I"#^!8/
+MA.<"``"#^!9F9F:0?R.#^!0/A"H#``"#^!1FD`^/I`(``(/X"@^$!P,``)#I
+M#`8``(/X&@^$2P(``(/X&G\2@_@7#X2R`@``9F9FD.GL!0``/?\```!F9I!F
+M9I`/A.,"``#IU@4``$F+1R"!8##___[_2(M^2+D`````N@$```#H`````+\%
+M````Z`````#IJ04``$B+?DBY`````+H`````Z`````"_4,,``.@`````Z8<%
+M``!!O@````"`?T,`=B!)#[97#69FD&:02(G01(GQ2-/XJ`%U"4'_QD4X=4-W
+MZD@/MD-`J`)T#*@$=`BH`0^%TP```$F+5R"+0C"I```!`'0-)?___O^)0C#I
+MN````+T0)P``1(AT)!!*C03U`````"7X!P``2(E$)`A$B?!(P>`#28G$08'D
+M^`<``$F+50!!@/X#=AE(BTPD"(N$$8`!``")!0`````E```!`.L308N$%(`!
+M``")!0`````E```!`(7`="6`?"00`W8.0<>$%(`!``````$`ZPQ!QX04@`$`
+M`````0"%P'40O^@#``#H`````/_-=9/K!(7M=1C&0T,"QD-"_TB)WDR)[^@`
+M````Z7,$``!!]D<*`70X2(G>3(G_9F:09I#H`````(3`=22]^@```&:02(G>
+M3(G_Z`````"$P'4.O^@#``#H`````/_-=>-!@/X#=B=*C03U`````"7X!P``
+M28M-`(N4`8`!``")%0````")E`&``0``ZT]*C03U`````$B)QH'F^`<``$F+
+M30!!@/X#=@^+A#&``0``B04`````ZQY*C03U`````"7X!P``28M5`(N$`H`!
+M``")!0````")A#&``0``2(M[2$B)WNBK*```OR!.``#H`````.F=`P``#[=V
+M,$C'QP````"X`````.@`````2(M[2$B)WN@[+P``Z7<#```/MW8P2,?'````
+M`+@`````Z`````!(BWM(2(G>Z*4O``#I40,``$B+?DCH1R@``.E#`P``2(M^
+M2.B9+```Z34#``!(BWY(Z.LK``#I)P,``$B+?DCH'2T``.D9`P``2(M^2.B?
+M+0``Z0L#``!(BWY(Z"$N``"0Z?P"``#&1D+_2`^V0T"H`G0(J`1T!*@!=19(
+M@WM8`)!U#DR)_^@`````B(/B````0?9'#`(/A(H!``!-BV=`00^V5"1&00^V
+M1"0[_\@YPGTR0?Y$)$9!_D0D1T'&1"1"`$$/MT0D3H/@_H/("&9!B40D3DR)
+MYDR)[^@`````Z7X"``!!O@````!!@'\.``^&P````$F-;V!(B>_H`````$B)
+MPTB+10A(B5T(2(DK2(E#"$B)&(![0O\/A($```"`N^$`````=&E(#[9#0*@"
+M=!^H!'0;J`%T%P^V4WE(BW-02(G93(G_Z`````#K0V:02`^V0T"H`G4:J`1F
+M9I!FD'01J`%T#4B)WDR)[^@`````ZQY(#[9#0*@"=!6H!&:0=`^H`74+2(G>
+M3(GOZ`````"Z`0```.G+`0``9F:09I#&@^$`````0?_&13AW#@^'1/___T'V
+M1"1.@'0>0?9$)$D#=!9!QD0D0@!,B>9,B>_H`````.F'`0``0<9'"?]!QD0D
+M0@!!#[=$)$Z#X/.#R`)F08E$)$Y!@&0D2?Y,B?Y,B>_H`````.E4`0``O@H`
+M``!(B=_H`````+H!````D.E!`0``0;X`````08!_#@`/AL8```!)C6]@9F:0
+M9F:02(GOZ`````!(B<-(BT4(2(E="$B)*TB)0PA(B1B`>T+_#X2(````@'M!
+M`'5[@+OA`````'1K2`^V0T"H`G0AJ`1T':@!=!D/ME-Y2(MS4$B)V4R)_^@`
+M````ZT5F9F:02`^V0T"H`G4:J`1F9I!FD'01J`%T#4B)WDR)[^@`````ZQY(
+M#[9#0*@"=!6H!&:0=`^H`74+2(G>3(GOZ`````"Z`0```.M^QH/A`````$'_
+MQD4X=PX/AT3___]%.'<.=4]!O@````!!@'\.`'9"28UO8$B)[^@`````2(G#
+M2(M%"$B)70A(B2M(B4,(2(D8#[9#03PB#Y3"/`T/E,`)T*@!#X7%_O__0?_&
+M13AW#G?"0<9'"?],B?Y,B>_H`````+H!````B=!(BUPD*$B+;"0P3(MD)#A,
+MBVPD0$R+="1(3(M\)%!(@\18PV9FD&:02(/L*$B)'"1(B6PD"$R)9"003(EL
+M)!A,B70D($F)_$B)\TB+%TB+KH@````/MD9"@_@9#X==!```B<#_),4`````
+M]D9.!'0,9L=&3@$`QD9"`>L\9H-^3B!U#&;'1DX(`,9&0@WK*?9&3H!T&?9&
+M20-T$P^W1DXD?X/("&:)1D[&1D(-ZPKV0TX(=`3&0T('2(G>3(GGZ`````#I
+M]@,``(N"!`$``(D%`````(/(4(F"!`$``+D!````N@(```"^`0```$B)W^@`
+M````Z<4#``"Y`0```+H`````O@$```!(B=_H`````.FI`P``N0$```"Z`0``
+M`+X!````2(G?Z`````#IC0,``+D!````NF````"^`0```$B)W^@`````Z7$#
+M```/MDY(0;@!````NF````"^`0```$B)W^@`````Z5`#``!!N`$```"Y```!
+M!+HA````O@$```!(B=_H`````.DN`P``0;@!````N0$```"Z`@```+X`````
+M2(G?Z`````#I#`,``$&X`0```+D`````N@(```"^`````$B)W^@`````Z>H"
+M``!(BT4@@6`P___W_T&X`0```+D!````N@(```"^`````$B)W^@`````Z;T"
+M``!!N`$```"Y`````+H"````O@````!(B=_H`````.F;`@``N0$```"Z`@``
+M`+X`````2(G?Z`````#I?P(``+D!````N@````"^`````$B)W^@`````Z6,"
+M``"Y`0```+H!````O@````!(B=_H`````.E'`@``2(M%((%@,/__]_]!N`$`
+M``"Y_____[H!````O@````!(B=_H`````.D:`@``N0$```"Z`````+X`````
+M2(G?Z`````#I_@$``$@/MD9'3(MTQEA)B6Y(28EV6`^V1D=!B$9Y0<9&0@-!
+MQD9!`$&`3D`%_D4.2(U%8$B+4`A,B7`(28D&28E6"$R),K^`&@8`Z`````!!
+MO0````!!@'PD0P!V'$@/ME4-2(G01(GI2-/XJ`%U"D'_Q44X;"1#=^E(BU4@
+MBT(PJ0``"`!T"B7___?_B4(PZV"[F#H``$J-!.T`````2(G%@>7X!P``9F9F
+MD$&`_0-V&DF+!"2+A"B``0``B04`````J0``"`!U*.L828L$)(N$*(`!``")
+M!0````"I```(`'4.O^@#``#H`````/_+=;I,B?9,B>?H`````.D``0``OT`-
+M`P#H`````+D`````NB````"^`0```$B)W^@`````OQ`G``#H`````.G0````
+MN0````"Z`0```+X`````2(G?Z`````"_$"<``.@`````Z:H```!(BT4@@6`P
+M___W_T&X`````+G_____N@$```"^`````$B)W^@`````OQ`G``#H`````.MV
+MN0````"Z`````+X`````2(G?Z`````"_$"<``.@`````ZU.Y`````+H@````
+MO@$```!(B=_H`````+\0)P``Z`````#K,.@`````9F:09I#K).@`````ZQU!
+MN`$```"Y\````+J;````O@$```!(B=_H`````+@!````2(L<)$B+;"0(3(MD
+M)!!,BVPD&$R+="0@2(/$*,-F9F:09F9FD$%7059!54%455-(@^PH28G\2(L'
+M2(E$)"!!OP````"`?T,`#X:F`@``9F9FD&9FD$2)^@^VPDAKP&A*C30@2(V6
+M8!(``/9"#A`/A'("``"X`0```$2)^4C3X`A""4B+MD@2``!(B70D&/9""`(/
+MA-T```!!C5\!03A<)$,/ALX````/ML%(:\!H3`'@2(E$)`@/ML-(:\!H3HTT
+M($F-KF`2``#V10X0#X24````3(ML)`A!]X5<$@`````.``^$?@```$F-A6`2
+M``!(B40D$+H(````2(GN2(G'Z`````"$P'1>28VV5!(``+H(````28V]5!(`
+M`.@`````A,!T0K@!````B=E(T^!(BU0D$`I""8A""8A%"4B#?"08`'4.38NV
+M2!(``$R)="08ZQ0/ML-(:\!H2(M,)!A*B8P@2!(``/_#03A<)$,/AT/___]F
+MD$B#?"08``^%I````$R)Y^@`````2(E$)!A(A<`/A%T!``!$B?H/ML)(:\!H
+M3`'@2(M,)!A(B8A($@``2(V00!(``$B)42`/MH!H$@``B$$*QD$)`$R)(<9!
+M#@#&05@`QD$H`$&-7P%!.%PD0W991(GZ#[;"2&O`:$H/MI0@:1(``$B)T(G9
+M2-/XJ`%T%`^VPTAKP&A(BTPD&$J)C"!($@``_\-!.%PD0W?7ZQMF9F:01(GZ
+M#[;"2&O`:$B+3"082HF,($@2``!$B?H/ML)(:\!H2HV$(&`2```/ME`)2(M,
+M)!B(40T/ME@)08#_`W8A2HT$_0`````E^`<``$B+5"0@QX00``(``#@```#K
+M'V:02HT$_0`````E^`<``$B+3"0@QX0(``(``#@```"_$"<``.@`````08#_
+M`W8;2HT$_0`````E^`<``$B+5"0@B9P0!`(``.L92HT$_0`````E^`<``$B+
+M3"0@B9P(!`(``$'_QT4X?"1##X=A_?__2(/$*%M=05Q!74%>05_#9I!(@^P8
+M2(D<)$B);"0(3(ED)!!)B?R)\TB++T"`_@-V($B-!-T`````)?@'``#'A"@P
+M`@``#````.L>9F:09F:02(T$W0`````E^`<``,>$*%`"```,````OQ`G``#H
+M`````(#[`W8<2(T$W0`````E^`<``(N$*#0"``")!0````#K&DB-!-T`````
+M)?@'``"+A"A4`@``B04`````B<*!X@``/P#!ZA`/ML-(:\!H2HV,(&`2```/
+MMD$(@^#\B$$(@_H0=0J#R`*(00CK$F:0#[;#2&O`:$*`C"!H$@```4B+'"1(
+MBVPD"$R+9"002(/$&,-F9F:09F:09F:09F:005=!5D%505154TB#["A!B?1)
+MB==(BR^[`````$*-!.4`````1(UPX$&)Q69FD&:008/\`W81C02=``$``$&)
+MA"X@`@``ZP^-!)T``0``08F$+0`"``"_$"<``.@`````B=I!@_P#=A!!BX0N
+M)`(``(D%`````.L.08N$+00"``")!0````")!)3_PX/[!G:@2(L$)$F)!TB+
+M1"0(28E'"$B+1"0028E'$(M$)!A!B4<82(/$*%M=05Q!74%>05_#05=!5D%5
+M05154TB#["A!B?1)B==(BR^[`````$*-!.4`````1(UPX$&)Q69FD&:008/\
+M`W81C02='`$``$&)A"X@`@``ZP^-!)T<`0``08F$+0`"``"_$"<``.@`````
+MB=I!@_P#=A!!BX0N)`(``(D%`````.L.08N$+00"``")!0````")!)3_PX/[
+M!G:@2(L$)$F)!TB+1"0(28E'"$B+1"0028E'$(M$)!A!B4<82(/$*%M=05Q!
+M74%>05_##[8'P.@$@^`'B<*`S@+V1P($#T7"B<*!R@```@#V1P,$#T7"B<*`
+MS@CV1P((#T7"B<*!R@``"`#V1P,(#T7"B<*`S@3V1P("#T7"B<*!R@``!`#V
+M1P,"#T7"#[97%,'B&`G0PV9F9I!F9F:09F9FD.@`````\\-F9I!F9I!F9I!!
+M5T%6055!5%532(/L*$F)_HGU3(L_B?(/ML)(:\!H2`'X2(FX0!(``,:`:1(`
+M``!`#[;VZ`````"Y`````+H@````2(G@B`A(_\!(_\IU]D0/MNU(B>)$B>Y,
+MB??H`````(GI#[;92&O;:$P!\TB)Y^@`````B8-0$@``2(M$)`Q(B8-4$@``
+M2(V38!(``$"`_0-V&D*-!*T`````2)A"BX0XT`$``(D%`````.L;2(T$K0``
+M```E_`,``$*+A#C0`0``B04`````B4(,B>H/ML)(:\!H2HV4,'`2``!`@/T#
+M=AU(C03M`````"7X!P``0HN$.(`!``")!0````#K&TB-!.T`````)?@'``!"
+MBX0X@`$``(D%`````(D"B>D/ML%(:\!H2HV$,&`2``#V0`X0#X11`0``]D`(
+M`G18N0````"Z(````$B)X&9F9I"("$C_P$C_RG7V0`^V]4B)XDR)]^@`````
+MB>@/MMA(:]MH3`'S3(VC4!(``$B)Y^@`````08E$)`Q(BT0D#$B)@V`2``#K
+M%8GJ#[;"2&O`:$+'A#!<$@```0`"`$"`_0-V&TB-!.T`````)?@'``!"QX0X
+M,`(``!@```#K&4B-!.T`````)?@'``!"QX0X4`(``!@```"_$"<``.@`````
+M0(#]`W8?2(T$[0`````E^`<``$*+A#@T`@``B04`````B<+K'4B-!.T`````
+M)?@'``!"BX0X5`(``(D%`````(G"B>D/ML%(:\!HB=&!X?___]^!R@```"!"
+M]X0P;!(``````P`/1-%`@/T#=A=(C03M`````"7X!P``0HF4.#0"``#K%4B-
+M!.T`````)?@'``!"B90X5`(``$B#Q"A;74%<05U!7D%?PV9F9I!F9I"+A_`(
+M```E____`#U0`9,`=1,/MH?S"```P.@$N@$````\#'0%N@````")T,-F9I!!
+M54%455-(@^P(28G]3(LGN`````"P4+0%2"7__P#_2`T```0`2+K___\`____
+M_T@AT$@-````,$BZ_____P#___]((=!(N@`````1````2`G02+K______P#_
+M_T@AT$BZ``````"K``!(B<5("=5(QX?X$P```````$@YO]`(```/A>D```!(
+MC9\`%```2(V7\`@``$&X`0```+D(````O@```@#H`````$&+A>@(``!!#[:5
+M\P@``(U$@OQ!B(7S"```3(GOZ`````"$P'4'28FM\`@``(L%`````$$/MI7S
+M"````<+_P(D%`````$&(E?,(``!!#[:%\`@``(B#\`@``$$/MH7Q"```B(/Q
+M"```00^VA?((``"(@_((``!!#[:%\P@``(/``HB#\P@``$$/MH7T"```B(/T
+M"```00^VA?4(``"(@_4(``!!#[:%]@@``(B#]@@``$$/MH7W"```B(/W"```
+M9F9FD&9FD$G'A?@3````````08N$)``!``")!0`````/M]#VPB!U&XG0@\@@
+M08F$)``!``!!BX0D``$``(D%`````$F+10#'@`0!````````28M%`,>`&`$`
+M``````!)BT4`QX`<`0```````+^`A!X`Z`````!!QX0D<`$``!@!``!!BX0D
+M=`$``(D%`````(#D_4''A"1P`0``&`$``(#,!$&)A"1T`0``0<>$)'`!```H
+M`0``0<>$)'0!``!_?P``0<>$)'`!```D`0``08N$)'0!``")!0````!FN```
+M0<>$)'`!```D`0``#?\_``!!B80D=`$``$''A"1P`0``/`$``$''A"1T`0``
+M``!Z`$''A"1P`0``I`$``$''A"1T`0``?;_O_T''A"1P`0``N`$``$&+A"1T
+M`0``B04`````#[?`0<>$)'`!``"X`0``#0``^@!!B80D=`$``$''A"2<````
+M_P```$''A"20`@``1`$``$''A"24`@``!A``"$''A"20`@``M`$``$''A"24
+M`@``7W```$''A"20`@``,````$&+A"24`@``B04`````,.2`S#-!B80DE`(`
+M`+T`````08!]0P`/AEL#``!F9F:00(#]`W8;2(T$[0`````E^`<``$+'A"`P
+M`@``"````.L92(T$[0`````E^`<``$+'A"!0`@``"````+\0)P``Z`````!`
+M@/T#=AU(C03M`````"7X!P``0HN$(#0"``")!0````#K&TB-!.T`````)?@'
+M``!"BX0@5`(``(D%`````(G"0(#]`W8=2(T$[0`````E^`<``('*``"``$*)
+ME"`T`@``ZQM(C03M`````"7X!P``@<H``(``0HF4(%0"``!`#[;=28V5\`@`
+M`(G>3(GOZ`````")WDR)[^@`````0(#]`W89C03=`````$B80L>$(#`"``!$
+M`0``ZQMFD$B-!.T`````)?@'``!"QX0@4`(``$0!``"_$"<``.@`````0(#]
+M`W8;2(T$[0`````E^`<``$+'A"`T`@``!A``".L92(T$[0`````E^`<``$+'
+MA"!4`@``!A``"$"`_0-V'4B-!.T`````)?@'``!"QX0@,`(``+0!``#K&V:0
+M2(T$[0`````E^`<``$+'A"!0`@``M`$``+\0)P``Z`````!`@/T#=AM(C03M
+M`````"7X!P``0L>$(#0"``!?<```ZQE(C03M`````"7X!P``0L>$(%0"``!?
+M<```0(#]`W8=2(T$[0`````E^`<``$+'A"`P`@``"````.L;9I!(C03M````
+M`"7X!P``0L>$(%`"```(````OQ`G``#H`````+K_5(``0(#]`W8B2(T$[0``
+M```E^`<``('B_U0``$*)E"`T`@``ZR!F9I!FD$B-!.T`````)?@'``"!XO__
+M?_U"B90@5`(``$`/MMVZ`0```(G>3(GOZ`````"_(*$'`.@`````0(#]`W89
+MC03=`````$B80HN$((`!``")!0````#K&TB-!.T`````)?@'``!"BX0@@`$`
+M`(D%`````(G"@>+___[_0(#]`W872(T$[0`````E^`<``$*)E""``0``ZQ5(
+MC03M`````"7X!P``0HF4((`!``"Z!0'(`$"`_0-V&4B-!.T`````)?@'``!"
+MB90@A`$``.L79I!(C03M`````"7X!P``0HF4((0!``"_H(8!`.@`````0`^V
+M]4R)[^@`````_\5!.&U##X>I_/__3(GOZ`````!!BX0D!`$``(D%`````(/(
+M`D&)A"0$`0``08N$)``!``")!0````"#X/V#R`U!B80D``$``$&+A"0``0``
+MB04`````28N%F!```$&)A"0(`0``08N%G!```$&)A"0,`0``28N%R!```$&)
+MA"00`0``08N%S!```$&)A"04`0``0<>$)"`!````````00^WA3P2```E_P\`
+M``T```$`08F$)"`!``!)BX4H$0``08F$)"0!``!!BX4L$0``08F$)"@!``!)
+MBX50$0``QP#_#P``0<>$)#0!````````00^WA3X2```E_P\```T```$`08F$
+M)#0!``!)BX58$0``08F$)#@!``!!BX5<$0``08F$)#P!``!!QX0D2`$`````
+M``!!QX0D3`$````!``!!BX0D!`$``(D%`````(/(64&)A"0$`0``0<>$)%0!
+M``#[_P`,0<>$)%P!``#__P``2(/$"%M=05Q!7<-F9I!F9I!F9I!32(G[Z.?W
+M__^Z`````&:0#[;"QX2#F`D```````#'1(-<`````/_"@/H/=N-FQX,X$@``
+M_P]FQX,Z$@``_P_&0U`!N`$```!;PV9FD&9FD+D`````.?%]+69F9I!F9I!(
+M8\$/MA0XA-(/E<"`^B`/E<(/ML"%PG0'N`````##D/_!.?%\VK@!````9F:0
+M9I##9F9FD&9F9I!F9F:09F:02(/L.$B)7"0(2(EL)!!,B60D&$R);"0@3(ET
+M)"A,B7PD,$F)_$B)]6:!?B"%``^'G````$@/MT8@@+PX0`@``/\/A(D```!F
+M@WX@?W<B2`^VA#A`"```2(N7&`D``$AIP(@!``!(BT002`^V2`CK96:!?B"!
+M`'<G2`^W1B!(#[:$.$`(``!(BY=H"0``2&G`R`\``$B+1!`(#[9(".LV2`^W
+M1B!(#[:$.$`(``!(BY=`"0``2&G`T````$B+A!"(````#[9(".L,9F9FD&9F
+MD+G_____N_____]F@7T@A0!W#D@/MT4@0@^VG"!`"```@/G_="$/ML%"@+P@
+MQ@@``/\/E,*`^_\/E,`)T*@!=0:`?20&=2I(@WUX`'032(UU>$R)Y^@`````
+M9F9FD&9FD$B)[DR)Y^@`````Z;`&```/ML%.#[:L(,8(``!-:>VH````3XVL
+M):`!```/ML-(:<"(`0``2(G#20.<)!@)``!F@;O`````JPUW!H!])`)U-DB#
+M?7@`=`Q(C75X3(GGZ`````!(B>Y,B>?H`````,9#0O_&0T,"2(G>3(GGZ```
+M``#I.08```^V13B#^!H/A%P%``"#^!I_+(/X$G1=@_@2?Q*%P`^$_P0``&9F
+MD&:0Z=\%``"#^!4/A,<%``!FD.G/!0``@_@E#X2S`@``@_@E?Q*#^!L/A,4$
+M``!F9F:0Z:\%```]G@```&9FD&9FD`^$>P,``.F9!0``@'TD`)`/A6$"``!(
+MBTU(@'TY`&:0=&F`>T(9#Y3`@\`+B$-"2(7)=$F`>0&`=4.`>0(`=3V`>0,\
+M=S</ME$#OR````"^%````$B-0WQ`B#A(_\!(_\YU]8/Z%+@4````#T/0B=)(
+MC7M\2(UQ!.@`````9L>#P```````Z1D%``#&0T(8]D$&0'4/#[8!@^`?@_@-
+M#X4[`0``#[8!@^`?@_@-N"(```"Z#0````]$PHA#00^V\$C'QP````"X````
+M`.@`````2(-]>`!T#$B-=7A,B>?H`````$B)[DR)Y^@`````0;X`````08!]
+M#@!V04F-;6!(B>_H`````$B)PTB+10A(B5T(2(DK2(E#"$B)&`^V4T&`^B(/
+ME<"`^@T/E<(/ML"%PG4)0?_&13AU#G?#13AU#@^%B00``&;'1"0&``!!OP``
+M``!!O@````!!@'T.`'9528UM8$B)[^@`````2(G#2(M%"$B)70A(B2M(B4,(
+M2(D8#[9#03PB#Y3"/`T/E,`)T*@!=!</MT0D!F8Y0S!R#$F)WP^W6S!FB5PD
+M!D'_QD4X=0YWKTV%_P^$$00``$&`?T+_#X0&!```0<9'0O],B?Y,B>?H````
+M`.GQ`P``#[8!@^`?@_@!=0W&0T$!QD-"_^FM`P``]D$%`70$QD-"&4B#?4@`
+M#X28`P``2(M-2+X`````NB@```!(C8.0````0(@P2/_`2/_*=?6^`````+H(
+M````2(V#N````$"(,$C_P$C_RG7U2(M!"$B)@Y````!(BT$02(F#F````$B+
+M01A(B8.@````BT$@B8.X````Z2T#``!F_X/`````OQ`G``#H`````,9#0@7I
+M$P,``$B+34A(BT50#[9``H/@#X!])`!U<P^V40</MD$&P>`(`<(/MD$%P>`0
+M`<(/MD$$P>`8`<*)D]P````/ME$##[9!`L'@"`'"#[9!`<'@$`'"#[8!P>`8
+M`<)(B5-P@[O<`````'4:9O^#P````+\0)P``Z`````#&0T(+Z90"``#&0T(-
+MZ8L"``"`?20@9F:0=2X\!@^4PCP"#Y3`"="H`70>9O^#P````+\0)P``Z```
+M``#&0T(%Z5@"``!F9F:02(-]>`!T#$B-=7A,B>?H`````$B)[DR)Y^@`````
+M2(G:3(GN3(GGZ`````#I3P(``$B+15`/MD`"@^`/2(M-2(!])``/A;$````/
+MME$+#[9!"L'@"`'"#[9!"<'@$`'"#[9!",'@&`'"B9/<````#[91!P^V00;!
+MX`@!P@^V007!X!`!P@^V003!X!@!PDACTD@/MD$#2,'@($@!PD@/MD$"2,'@
+M*$@!PD@/MD$!2,'@,$@!PD@/M@%(P>`X2`'"2(E3</9!#`%T!6:#2V($@[O<
+M`````'4:9O^#P````+\0)P``Z`````#&0T(9Z6(!``#&0T(-Z5D!``"`?20@
+MD'4N/`8/E,(\`@^4P`G0J`%T'F;_@\````"_$"<``.@`````QD-"&>DH`0``
+M9F9FD$B#?7@`=`Q(C75X3(GGZ`````!(B>Y,B>?H`````$B)VDR)[DR)Y^@`
+M````Z1\!``#&0T(4Z>H```"`?20@9I!U-4B+15`/MD`"@^`//`8/E,(\`@^4
+MP`G0J`%T&F;_@\````"_$"<``.@`````QD-"%.FM````QD-"&^FD````@'TD
+M`'5,2(M-2`^W0V!F@TMB`0R&9HE#8(!Y`P!U!8`Y%G<79O^#P````+\0)P``
+MZ`````#&0T(-ZVGV008$=`=F@TMB`NM'9H-C8OUF9I#K/8!])"!U,DB+15`/
+MMD`"@^`//`8/E,(\`@^4P`G0J`%T'&;_@\````"_$"<``.@`````QD-"!>L:
+M9H-C8/G&0T(.ZP^`?20`=05F@TMB`\9#0@](@WUX`'0,2(UU>$R)Y^@`````
+M2(GN3(GGZ`````!(B=Y,B>?H`````&9FD$B+7"0(2(ML)!!,BV0D&$R+;"0@
+M3(MT)"A,BWPD,$B#Q#C#9F9FD&9FD&9FD&9FD$B#["A(B5PD"$B);"003(ED
+M)!A,B6PD($B)_4B)\V:!?B"%``^'E@```$@/MT8@@+PX0`@``/\/A(,```!F
+M@WX@?W<B2`^VA#A`"```2(N7&`D``$AIP(@!``!(BT002`^V2`CK7V:!?B"!
+M`'<G2`^W1B!(#[:$.$`(``!(BY=H"0``2&G`R`\``$B+1!`(#[9(".LP2`^W
+M1B!(#[:$.$`(``!(BY=`"0``2&G`T````$B+A!"(````#[9(".L&D+G_____
+MOO____]F@7L@A0!W#4@/MT,@#[:T*$`(``"`^?]T(0^VP8"\*,8(``#_#Y3"
+M0(#^_P^4P`G0J`%U!H![)`9U(TB#>W@`=`Q(C7-X2(GOZ`````!(B=Y(B>_H
+M`````.EX`@``#[;!3`^VI"C&"```36GDJ````$V-I"R@`0``B?(/ML)(:<"(
+M`0``28G%3`.M&`D``$B+<TB`>R0`#X2I````@'LZ!@^$GP```(![.@P/A)4`
+M``!!#[>5P````(U"`69!B87`````9H/Z"78F08!]0@9T'T'&14,"0<9%0O]!
+M@&5$_DR)[DB)[^@`````Z>8!``"_Z`,``.@`````20^V14"H`G0IJ`1T):@!
+M="%!#[95>4F+=5!!N`````"Y`@```$R)Y^@`````Z:H!``!!QD5"`TR)[DB)
+M[^@`````Z94!``!F9I!FD(![.@%U#T'&14($9F:09I#I30$``(![.@)U"D'&
+M14(%Z3T!``"`>SH##X6:````08!]0@5U+&:!?@3(-V9F9I!U($$/MW4P2,?'
+M`````+@`````Z`````!!QD5"!ND``0``3(GOZ`````!)C;V0````OB@```#H
+M!?7__X3`=3A)C7U\OA0```#H\_3__X3`=29)C;VX````O@@```#HWO3__X3`
+M=1%)@WUP`'0*0<9%0A?IJP```$'&14(:9D'_A<````#IF0```(![.A=U"D'&
+M14(5Z8D```"`>SH89F:0=0=!QD5"%NMY@'LZ!&9FD'4'0<9%0@?K:8![.@5F
+M9I!U!T'&14((ZUF`>SH&9F:0=0=!QD5"">M)@'LZ#&9FD'4'0<9%0@KK.8![
+M.A9F9I!U!T'&14(4ZRF`>SH.9F:0=2!(@WMX`'0,2(US>$B)[^@`````2(G>
+M2(GOZ`````#K+DB#>W@`=`Q(C7-X2(GOZ`````!(B=Y(B>_H`````$R)[DB)
+M[^@`````9F:09I!(BUPD"$B+;"003(MD)!A,BVPD($B#Q"C#9F9FD&9FD$B#
+M["A(B5PD"$B);"003(ED)!A,B6PD($B)_4B)\V:!?B"%``^'E@```$@/MT8@
+M@+PX0`@``/\/A(,```!F@WX@?W<B2`^VA#A`"```2(N7&`D``$AIP(@!``!(
+MBT002`^V2`CK7V:!?B"!`'<G2`^W1B!(#[:$.$`(``!(BY=H"0``2&G`R`\`
+M`$B+1!`(#[9(".LP2`^W1B!(#[:$.$`(``!(BY=`"0``2&G`T````$B+A!"(
+M````#[9(".L&D+G_____OO\```!F@7L@A0!W#D@/MT,@9@^VM"A`"```@/G_
+M#Y3"9H'^_P`/E,`)T*@!="-(@WMX`'0,2(US>$B)[^@`````2(G>2(GOZ```
+M``#IRP````^VP4P/MJ0HQ@@``$UIY*@```!-C:0LH`$```^WQDAIP(@!``!)
+MB<5,`ZT8"0``@'LD`'1$#[;Q2,?'`````+@`````Z`````!)BU4(28M%`$B)
+M4`A(B0)!_DPD#DR)[DB)[^@`````0<9$)`G_3(GF2(GOZ`````"`>SH!=2R_
+M$"<``.@`````2(G>2(GOZ`````"Y`0```+H`````3(GN3(GGZ`````#K(+]0
+MPP``Z`````!(B=Y(B>_H`````$R)[DR)Y^@`````2(M<)`A(BVPD$$R+9"08
+M3(ML)"!(@\0HPV9FD&:02(/L*$B)7"0(2(EL)!!,B60D&$R);"0@2(GU08G4
+M08G-2(L?2(G?Z`````!(B<%(A<!U#<:%X0````'&14(#ZW7&0#CAQD`Y`4&`
+M_`$9P/?0@\`"B$$ZN`\```!%A.UU$+@`````2(-]6`!T!`^V17F(03L/MT4P
+M9HE!($B)62C'030`````2,=!2`````!%A.U(Q\``````2,?"`````$@/1<)(
+MB8&@````2(G.2(G?Z`````!(BUPD"$B+;"003(MD)!A,BVPD($B#Q"C#D$%7
+M059!54%455-(@^P(28G]2(GU3(LW3(GWZ`````!(B<-(A<!U#,:%X0````'I
+MGP```$R)]^@`````28G$2(7`=13&A>$````!2(G>3(GWZ`````#K>TR->UC&
+M0SCAQD,Y`<9#.@,/MT4P9HE#($F+10!(B4,HQT,T``(``$F+1"002(E#2+D`
+M````N@`"``"("$C_P$C_RG7V3(EC>$C'@Z``````````O@````!,B?_H````
+M`(M3-$F+="083(G_Z`````!(B=Y,B??H`````$B#Q`A;74%<05U!7D%?PV9F
+M9I!F9F:09F9FD&9FD$&)T+D`````.=%S'V9F9I`/MA</MD<!B`:(5@%(@\8"
+M2(/'`O_!1#G!<N7SPV9FD$%455-(B?M(B?5)B?1F@SX`>0X/MP8E`!\``,'X
+M"(A'04B+111(B4-\2(M%'$B)@X0```"+122)@XP```!(BT4N2(F#N````$B+
+M139(B8.0````2(M%/DB)@Y@```!(BT5&2(F#H````$B+14Y(B8.H````2(M%
+M5DB)@[````!(C7M\N@H```!(B?[H0/___TB-N[@```"Z!````$B)_N@L____
+M2(V[D````+H4````2(G^Z!C___]FQT-@``!FQT-B``!F08.\)+(!```!#Y3"
+MP>(##[9#1(/@]PG0B$-$]H6G````!'0&9L=#8`$`]H6D`````70H9H-+8`+V
+MA:H````!=`5F@TMB`?:%J`````%T#&:!2V```69FD&9FD/:%I````"!T%V:#
+M2V`$]H6J````('0)9H-+8@)F9F:0]H6D````0'079H%+8(``]H6J````0'0(
+M9H-+8@AF9I#&0WH"]H69`````70G]D-@`70*9H-+8`AF@TMB$`^VA98```"#
+MX!__P(A#>CP@=03&0WH?]H68````"'0&9H%+8``"]H68````!'0%9H-+8"#V
+MA9@````"=`5F@TM@$/:%J````"!T#O:%K@```"!T!6:#2V!`]D-@`7042(N%
+MR````$B)0W#K#F9F9I!F9I"+17A(B4-P2/]+</9%:@)T'_:%@`````]T%F:#
+MO8`````"&<"#P`2(0V3K"&9F9I#&0V0"QD-E__9%?@1T!L9#90+K'/9%?@)T
+M",9#90%FD.L.]D5^`70(QD-E`&9F9I#&0V;_]D5J!'0?N0````"02`^WA;``
+M``!(T_BH`70#B$MF_\&`^09VY[X``@``2(GOZ`````")@\0```"X`0```%M=
+M05S#9F9FD&9FD&9FD$B#[!A(B1PD2(EL)`A,B60D$$B)_4B)\TR+)TR)Y^@`
+M````2(G"#[9+9DB%P'4)QH/A`````>M'QD`XX<9`.0'&0#H$B$@[#[=#,&:)
+M0B!(BT4`2(E"*,="-`````!(QT)(`````$C'@J``````````B$MI2(G63(GG
+MZ`````!(BQPD2(ML)`A,BV0D$$B#Q!C#9F9FD&9F9I!F9I!F9I!(@^P82(D<
+M)$B);"0(3(ED)!!(B?U(B?-,BR=,B>?H`````$B)P@^V2V1(A<!U"<:#X0``
+M``'K1\9`..'&0#D!QD`Z!8A(.P^W0S!FB4(@2(M%`$B)0BC'0C0`````2,="
+M2`````!(QX*@`````````(A+9TB)UDR)Y^@`````2(L<)$B+;"0(3(MD)!!(
+M@\08PV9F9I!F9F:09F:09F:02(/L&$B)'"1(B6PD"$R)9"002(G[2(GU3(LG
+M3(GGZ`````!(B<)(A<!U"<:%X0````'K0,9`..'&0#D!QD`Z!@^W13!FB4(@
+M2(L#2(E"*,="-`````!(QT)(`````$C'@J``````````2(G63(GGZ`````!(
+MBQPD2(ML)`A,BV0D$$B#Q!C#9F:09F:09F:02(/L&$B)'"1(B6PD"$R)9"00
+M2(G[2(GU3(LG3(GGZ`````!(B<)(A<!U"<:%X0````'K0,9`..'&0#D!QD`Z
+M#`^W13!FB4(@2(L#2(E"*,="-`````!(QT)(`````$C'@J``````````2(G6
+M3(GGZ`````!(BQPD2(ML)`A,BV0D$$B#Q!C#9F:09F:09F:02(/L&$B)'"1(
+MB6PD"$R)9"002(G[2(GU3(LG3(GGZ`````!(B<)(A<!U"<:%X0````'K2\9`
+M..'&0#D!QD`Z%L9`/`$/MT4P9HE"(,:"F`````](BP-(B4(HQT(T`````$C'
+M0D@`````2,>"H`````````!(B=9,B>?H`````$B+'"1(BVPD"$R+9"002(/$
+M&,-F9F:09F9FD&9FD&9FD$B#[!A(B1PD2(EL)`A,B60D$$B)^TB)]4R+)TR)
+MY^@`````2(G"2(7`=0G&A>$````!ZT#&0#CAQD`Y`<9`.A</MT4P9HE"($B+
+M`TB)0BC'0C0`````2,="2`````!(QX*@`````````$B)UDR)Y^@`````2(L<
+M)$B+;"0(3(MD)!!(@\08PV9FD&9FD&9FD$B#[!A(B1PD2(EL)`A,B60D$$B)
+M^TB)]4R+)TR)Y^@`````2(G"2(7`=0G&A>$````!ZT#&0#CAQD`Y`<9`.A@/
+MMT4P9HE"($B+`TB)0BC'0C0`````2,="2`````!(QX*@`````````$B)UDR)
+MY^@`````2(L<)$B+;"0(3(MD)!!(@\08PV9FD&9FD&9FD$B#["A(B1PD2(EL
+M)`A,B60D$$R);"083(ET)"!(B?U!B?1!B=5!B<Y(BX>(````2(L82(G?Z```
+M``!(B<;&0#CAQD`Y`<9`.A&X#P```$6$Y'4$#[9%1XA&.T2(;CP/MT5`9HE&
+M($B)7BC'1C0`````2,=&2`````!%A/9(Q\``````2,?"`````$@/1<)(B8:@
+M````2(G?Z`````!(BQPD2(ML)`A,BV0D$$R+;"083(MT)"!(@\0HPV9FD&9F
+MD$B#[#A(B5PD"$B);"003(ED)!A,B6PD($R)="0H3(E\)#!)B?R)RT&)]4&)
+MUD6)QTB+AX@```!(BRA(B>_H`````$B)QL9`..'&0#D!QD`Z$K@/````183M
+M=09!#[9$)$>(1CM$B'8\#[;'B$8]B=C!Z!"(1CZ)V,'H&(A&/XA>0$$/MT0D
+M0&:)1B!(B6XHQT8T`````$C'1D@`````183_2,?``````$C'P@````!(#T7"
+M2(F&H````$B)[^@`````2(M<)`A(BVPD$$R+9"083(ML)"!,BW0D*$R+?"0P
+M2(/$.,-F9F:09F9FD&9FD$B#[#A(B5PD"$B);"003(ED)!A,B6PD($R)="0H
+M3(E\)#!)B?Q(B?5!O@````!F@7X@A0`/AY8```!(#[=&(("\.$`(``#_#X2#
+M````9H-^(']W(D@/MH0X0`@``$B+EQ@)``!(:<"(`0``2(M$$$@/ME`(ZU]F
+M@7X@@0!W)T@/MT8@2`^VA#A`"```2(N7:`D``$AIP,@/``!(BT00"`^V4`CK
+M,$@/MT8@2`^VA#A`"```2(N70`D``$AIP-````!(BX00B`````^V4`CK!I"Z
+M_____[G_____9H%]((4`=PY(#[=%($(/MHP@0`@```^VPDH/MIP@Q@@``$AI
+MVZ@```!*C9PCH`$```^VP4AIP-````!)B<5-`ZPD0`D``(!]/`(/A88````/
+MMD5`)?````"#^"`/E,*#^!`/E,`)T*@!=&L/ME5`B="#X`^#^`%U)8G1@>'P
+M````0;@!````N@(```"^`````$R)[^@`````Z;$&``!)#[9%1TV+=,58#[9%
+M0"7P````@_@@#Y3`@\`(08B&X@```$F+1EAF@6!.__[I?P8``&9FD&9FD(!]
+M)`!T/P^V721(@WUX`'0/2(UU>$R)Y^@`````9F:02(GN3(GGZ`````"`^P(/
+MA44&``!,B>Y,B>?H`````)#I-`8``$$/MD5"@_@9#X?]!0``B<#_),4`````
+M00^V15#!X`A(F$F+E"3`$```BX0"3`@``(D%`````(G"@_@%N`4````/1L)!
+MB$4[@'L/`'0.0<9%0@#&0P\`Z;`%``!!QD5"`NFF!0``00^V15#!X`A(F$F+
+ME"3`$```BX0"3`@``(D%`````&8/ML!F08E%/$$/MD50P>`(2)A)BY0DP!``
+M`(N$`D0(``")!0````")PL'H"&9!B44^#[;"P>`(9D$)13QF08%]/D!!N`,`
+M``"Z&0````]$PD&(14+I+04``$$/MD50P>`(2)A)BY0DP!```(N$`D0(``")
+M!0````!!B$4Y00^V15#!X`A(F$F+E"3`$```BX0"3`@``(D%`````(G"J`AT
+M!T'&13H,ZR>H!'0,0<9%.@MF9I!FD.L72(G02-'H@^`!@_@!&<#WT(/@"D&(
+M13I!QD5"!.FM!```00^V15#!X`A(F$F+E"3`$```BX0"3`@``(D%`````(/(
+M"$&(14A!QD5"!>E]!```0<9%0@;I<P0``$$/MD50P>`(2)A)BY0DP!```(N$
+M`DP(``")!0````!!@'U'`1G`@^`"@\`408A%0ND^!```00^V14?_P$&(14=!
+M.D4[<PI!QD5"%NDC!```0<9%1P!!QD5"%[\@H0<`Z`````#I"@0``$'&14(4
+MZ0`$``!!QD5"".GV`P``0<9%0A20Z>L#``!!QD5*`N@`````28F%P````$'&
+M14(5Z=`#``!!#[9%4,'@"$B828N4),`0``"+A`),"```B04`````1`^V^$$/
+MMD50P>`(2)A)BY0DP!```(N$`D0(``")!0`````/ML#!X`A!"<?H`````$F)
+MA<@```!$B?B#X`^#^`-U$4&`?4H`=`I!QD5""NE=`P``28N%R````$$KA<``
+M```M0`T#`'@'08!]2@!T&4'&14(508!]2@`/A#$#``!!_DU*Z2@#``!)#[9%
+M1TF#?,58``^$U0```,9$)`<`@'L.`'8[3(U[8$R)_^@`````28G&20^V14=-
+M.73%6'0@28M'"$V)=PA-B3Y)B48(3(DP_D0D!P^V1"0'.$,.=\G^2PY)@WXX
+M`'1L28M&.$C'0&``````0?9&1`1U)4'^A"3O$P``3(GGZ`````!)BT8X#[9P
+M`;H!````3(GGZ`````!)BU8X28NT)-`(``"_`0```.@`````28M6.$F+M"30
+M"```OP8```#H`````$G'1C@`````20^V14=)QT3%6`````!,B?9,B>?H````
+M`$'&14()Z3@"``!!#[9%4,'@"$B828N4),`0``"+A`),"```B04`````#[;(
+M00^V15#!X`A(F$F+E"3`$```BX0"1`@``(D%`````,'@"`G!08E-5$&`?4(*
+M=`CWP0```0!T$4'&14(+Z=4!``#^2PYFD.MF0<9%0@Q)#[9%1TF#?,58`'1)
+MQD0D!@"`>PX`=DE,C7M@2(U[8.@`````28G&20^V14=-.73%6'3`28M'"$V)
+M=PA-B3Y)B48(3(DP_D0D!@^V1"0&.$,.=\CK"TR)Y^@`````28G&387V#X2(
+M`0``20^V14=-B73%6$$/MD5+08B&X@```.E$`0``0;X_0@\`2(M#(/9`,@AU
+M)4R)Y^@`````OP$```#H`````$'_SD&#_O]T"DB+0R#V0#((=-M!QD5"">D%
+M`0``00^V15#!X`A(F$F+E"3`$```BX0"3`@``(D%`````$0/MOA!#[9%4,'@
+M"$B828N4),`0``"+A`)$"```B04`````#[;`P>`(00G'1(GY@>'_#P``@?D3
+M`0``#Y3"@?DC`0``#Y3`"="H`70M0<9%0AB!^1,!``!U"D'&14L(Z8(```!$
+MB?@E_P\``#TC`0``=7-!QD5+">ML00^V549!#[9%.__(.<)]#T'^149!_D5'
+M0<9%0@?K34'&14(`00^W14Z#X/>#R`)F08E%3DB#?7@`=`Q(C75X3(GGZ```
+M``!(B>Y,B>?H`````,9#"?](B=Y,B>?H`````.LR0<9%0@-F9F:02(-]>`!T
+M#$B-=7A,B>?H`````$B)[DR)Y^@`````3(GN3(GGZ`````!(BUPD"$B+;"00
+M3(MD)!A,BVPD($R+="0H3(M\)#!(@\0XPV9F9I!(@^PX2(E<)`A(B6PD$$R)
+M9"083(EL)"!,B70D*$R)?"0P2(G[28GT0;\`````O@````!F08%\)""%``^'
+MGP```$D/MT0D(("\.$`(``#_#X2+````9D&#?"0@?W<B2`^VA#A`"```2(N7
+M&`D``$AIP(@!``!(BT002`^V4`CK969!@7PD(($`=RA)#[=$)"!(#[:$.$`(
+M``!(BY=H"0``2&G`R`\``$B+1!`(#[90".LS20^W1"0@2`^VA#A`"```2(N7
+M0`D``$AIP-````!(BX00B`````^V4`CK"&9FD+K_____N?____]F08%\)""%
+M`'<.20^W1"0@#[:,&$`(```/ML%(:<#0````28G%3`.K0`D```^VPD@/MJP8
+MQ@@``$AI[:@```!(C:P=H`$``(#Z_W0?@+P8Q@@``/\/E,*`^?\/E,`)T*@!
+M=0A!@'PD)`9U*TF#?"1X`'0328UT)'A(B=_H`````&9FD&9FD$R)YDB)W^@`
+M````Z=`%``!!@'PD)`!T&$B)[DB)WV:0Z`````#IM@4``&9FD&9FD$$/MD5"
+M@^@-@_@$#X=O!0``B<#_),4`````00^V15#!X`A(F$B+D\`0``"+A`),"```
+MB04`````1`^VR$$/MD50P>`(2)A(BY/`$```BX0"1`@``(D%`````,'@"$$)
+MP;\`````0;@`````0;X`````08!].P!V,D2)RF9FD&:02(G01(GQ2-/XJ`%T
+M%/_&#[;!28-\Q5@`=`5!_\#K`O_'0?_&13AU.W?60(3_=`5!@$U)`46$P'0%
+M08!-20)`@/X!#X4]`0``0;X`````08!].P!V4$2)RD$/MLY(B=!(T_BH`70<
+MB<I(B=Y(B>_H`````$B%P'052(EH2$R):%CK"T'_QD4X=3MWS>L818AU1T4X
+M=3MV#D'&14(.9F9FD.E;!```13AU.P^%400```^V=0VZ`0```$B)W^@`````
+MQD0D`P"`?0X`#X:`````3(UU8$R)]^@`````28G'28M&"$V)?@A-B3=)B4<(
+M3(DX28-_.`!T&DF+5SA(B[/0"```OP4```#H`````$&`3T0"3(GZO@8```!(
+MB>_H`````$&`?WL`=!E(B=_H`````+\!````Z`````!!@'][`'7G_D0D`P^V
+M1"0#.$4.=X1)@WPD>`!T#4F-="1X2(G?Z`````!,B>9(B=_H`````$'&14D`
+MQD4)`$B)[^@`````Z:L#``!F08%-3H``0;X`````08!].P!V342)RD$/MLY(
+MB=!(T_BH`70<B<I(B=Y(B>_H`````$B%P'062(EH2$R):%CK#$'_QD4X=3MW
+MS9#K%$6(=4=%.'4[=@I!QD5"#^D:`P``13AU.P^%$`,```^V=0VZ`0```$B)
+MW^@`````QD0D`@"`?0X`#X:`````3(UU8$R)]^@`````28G'28M&"$V)?@A-
+MB3=)B4<(3(DX28-_.`!T&DF+5SA(B[/0"```OP4```#H`````$&`3T0"3(GZ
+MO@8```!(B>_H`````$&`?WL`=!E(B=_H`````+\!````Z`````!!@'][`'7G
+M_D0D`@^V3"0".$T.=X1)@WPD>`!T#4F-="1X2(G?Z`````!,B>9(B=_H````
+M`$'&14D`QD4)`$B)[^@`````Z6H"``!!#[9%4,'@"$B82(N3P!```(N$`DP(
+M``")!0````!$#[;(00^V15#!X`A(F$B+D\`0``"+A`)$"```B04`````P>`(
+M00G!0??!```$`'0'0?9%20%U$$'WP?__^_]T$4'V14D"=`I!QD5"#^G*`0``
+M0<9%20!F9I!FD.GK`0``0;X_0@\`2(M%(/9`,@AU)4B)W^@`````OP$```#H
+M`````$'_SD&#_O]T"DB+12#V0#((=-M!QD5"$.E\`0``00^V15#!X`A(F$B+
+MD\`0``"+A`),"```B04`````#[;`B40D!$$/MD50P>`(2)A(BY/`$```BX0"
+M1`@``(D%``````^VP,'@"`E$)`2+1"0$@^`/@_@##X7`````0?9%20%T#$'&
+M14(2ZPK^30[K9D'&14(220^V14=)@WS%6`!T2<9$)`$`@'T.`'9)3(UU8$B-
+M?6#H`````$F)QTD/MD5'33E\Q5ATPDF+1@A-B7X(38DW28E'"$R)./Y$)`$/
+MMD0D`3A%#G?(ZPM(B=_H`````$F)QTV%_P^$S0```$D/MD5'38E\Q5B+1"0$
+M)?\/```]$P$``'4*0<:'X@````CK>8M$)`0E_P\``#TC`0``=6E!QH?B````
+M">M?0<9%0A/K6$$/MD50P>`(2)A(BY/`$```BX0"3`@``(D%`````$$/MD50
+MP>`(2)A(BY/`$```BX0"1`@``(D%`````$D/MD5)@^`!@_@!&<#WT(/`$T&(
+M14)F9I!F9I!)@WPD>`!T#4F-="1X2(G?Z`````!,B>9(B=_H`````$R)[DB)
+MW^@`````9F:09I!(BUPD"$B+;"003(MD)!A,BVPD($R+="0H3(M\)#!(@\0X
+MPY"0D)"0D)"0D)"0D)!(BT<(2"T``@$`@^('P>((@,X@2,'F"('F`/\``(F4
+M!AS%```/MX0&',4``&:)!0`````/ML##9F:09F:09F:02(M'"$@M``(!`(/B
+M!\'B"(C*@,X02,'F"('F`/\``(F4!AS%``##9F:09F:09F:0055!5%53NP``
+M``!!NP````!!NO____]!N0````"]`0```$&XP.'D`$$/MLG_P8GNT^:Y````
+M``^VP?_`B<(/K]9$B<!!B=6Z`````$'W]8GZ*<(Y^+C_____#T;"1#G0<PE!
+MB<)$B<M!B<O_P8#Y#W;%0?_!08#Y!W:M00^VP\'@`PG8#[;`6UU!7$%=PV:0
+M2(/L&$B)'"1,B60D"$R);"0028G\3(VOP!$``$`/MMZY`````+H'````B=[H
+M#____T$/MDT!N@,```")WDR)Y^C[_O__2(L<)$R+9"0(3(ML)!!(@\08PV9F
+M9I!F9F:005154TF)_+L`````0`^V[KH"````B>Y,B>?H@?[__Z@(=`VX````
+M`.L?9F:09F:0OP$```#H`````/_#@?L/)P``=LRX_P```%M=05S#9I!3B?,/
+MMO*Z`P```.A`_O__.-@/E,`/ML!;PV9FD&9FD$B#["A(B1PD2(EL)`A,B60D
+M$$R);"083(ET)"!(B?U!B<Y!B?1!B=4/MLI`#[;>N@$```")WN@U_O__N4``
+M``"Z`@```(G>2(GOZ"'^__^)WDB)[^@W____NO\```"%P'5S187V=$E!]L4!
+M="-!#[;4OD````!(B>_H8O___[K_````A<!T3NM'9F9FD&9FD$$/MM2^&```
+M`$B)[^@_____NO\```"%P'0KZR1F9F:000^VU+XH````2(GOZ!____^Z_P``
+M`(7`=`MF9I!F9I"Z`````(G02(L<)$B+;"0(3(MD)!!,BVPD&$R+="0@2(/$
+M*,-F9F:09F9FD&9F9I!(@^PH2(E<)`A(B6PD$$R)9"083(EL)"!(B?U)B<V)
+M\T&)U$`/MO;H9/[__[K_____A<!U,0^VTT$/MO1(B>_HG/[__[K_____A<!T
+M&0^V\[H!````2(GOZ-/\__]!B$4`N@````")T$B+7"0(2(ML)!!,BV0D&$R+
+M;"0@2(/$*,-F9F:09F9FD&9F9I!F9I!!5T%6055!5%532(/L"$B)_4F)ST6)
+MQD&)]4&)U,=$)`0`````A-(/A/@```!`#[;>N60```"Z`@```(G>Z)[\__^)
+MWDB)[^BT_?__A<!U$+H#````B=Y(B>_H0?S__Y!!#[;400^V];D!````2(GO
+MZ/O]__^Z_____X3`#X6)`0``NP````!$.?,/C7<!``!!C4;_B00D10^VY69F
+MD&:0.1PD=3NY0````+H"````1(GF2(GOZ";\__](8\M,`?FZ6````$2)YDB)
+M[^B@_O__A<`/A2\!``#K.69FD&9FD+E$````N@(```!$B>9(B>_HZ_O__TAC
+MRTP!^;I0````1(GF2(GOZ&7^__^%P`^%]````/]$)`3_PT0Y\WR"9I#IX@``
+M`+^@A@$`Z.'[__\/MLA!#[;=N@,```")WDB)[^B;^___B=Y(B>_HL?S__X7`
+M="`/MHW!$0``N@,```")WDB)[^AW^___NO_____IF````$$/MMV)VKY@````
+M2(GOZ,K\__^%P'4=#[:-P1$``+H#````B=Y(B>_H0/O__[K_____ZV2[````
+M`$0Y\WT^10^VY;E$````N@(```!$B>9(B>_H%OO__TACRTP!^;J`````1(GF
+M2(GOZ)#]__^%P'4+_T0D!/_#1#GS?,8/MHW!$0``00^V];H#````2(GOZ-GZ
+M__^+5"0$B=!(@\0(6UU!7$%=05Y!7\-F9F:02(/L&$B)7"0(3(ED)!!)B?Q(
+MB=!`#[;608G(2(G!O@````#HN/W__XG#N50```"Z`@```+X`````3(GGZ'_Z
+M__^)V$B+7"0(3(MD)!!(@\08PV9F9I!F9F:09F:09F:02(/L&$B)7"0(3(ED
+M)!!)B?Q(B=!`#[;608G(2(G!O@$```#H6/W__XG#N50```"Z`@```+X!````
+M3(GGZ!_Z__^)V$B+7"0(3(MD)!!(@\08PV9F9I!F9F:09F:09F:02(/L.$B)
+M7"0(2(EL)!!,B60D&$R);"0@3(ET)"A,B7PD,$F)_$F)ST6)Q8GU08G60`^V
+MWKED````N@(```")WNB[^?__B=Y,B>?HT?K__X7`=0^Z`P```(G>3(GGZ%[Y
+M__]!#[;60`^V];D!````3(GGZ!G[__^Z_____X3`=4?K#KK_____ZSYF9F:0
+M9F:0NP````!$.>M]*$`/MNUFD$ACPT(/MA0XN0````")[DR)Y^C9^O__A,!U
+MQ__#1#GK?-ZZ`````(G02(M<)`A(BVPD$$R+9"083(ML)"!,BW0D*$R+?"0P
+M2(/$.,-F9F:02(/L&$B)7"0(3(ED)!!)B?Q(B=!`#[;608G(2(G!O@````#H
+MZ/[__XG#N50```"Z`@```+X`````3(GGZ,_X__^)V$B+7"0(3(MD)!!(@\08
+MPV9F9I!F9F:09F:09F:02(/L&$B)7"0(3(ED)!!)B?Q(B=!`#[;608G(2(G!
+MO@$```#HB/[__XG#N50```"Z`@```+X!````3(GGZ&_X__^)V$B+7"0(3(MD
+M)!!(@\08PV9F9I!F9F:09F:09F:005=!5D%505154TB#["A(B70D($R+=BA)
+M_\9%#[96`L9$)!\`2,=$)!``````0;@`````2(NWT`@``+F`____10^VR@^V
+MP68/MI0P0`@``&:!^O\`=$I$B<!!_\!$.<AU/X#Y@7<8#[?"2&G`R`\``$@#
+MAF@)``!(B40D$.LB2(M$)"#'0%#_____2(G'_U!(N`````#INP$``&9FD&9F
+MD/_!@/F%=IQ(B[?0"```2('&`!0``+F`____00^V^F:0#[;!9@^VE#!`"```
+M9H'Z_P!T0T2)P$'_P#GX=3F`^8%W&`^WPDAIP,@/``!(`X9H"0``2(E$)!#K
+M'$B+1"0@QT!0_____TB)Q_]02+@`````Z3\!``#_P8#YA7:C00^V5@1%#[9N
+M!4'!Y1!!#[9&!L'@"$$)Q4$/MD8'00G%10^V9@A!P>0000^V1@G!X`A!"<1!
+M#[9&"D$)Q$B#?"00``^$S````$&_`````$B+1"00@'A8``^&MP```$B)PTB#
+MPT@/MM*)5"0,9F9FD&9FD$B)W^@`````2(UH\$B+4PA(B4,(2(D82(E0"$B)
+M`@^V14$\#0^4PCPB#Y3`"="H`71>00^V1@.#^#MT(X/X/'5/QD0D'P%,BT0D
+M($2)Z42)XHMT)`Q(B>_H`````.LQ2(N](`$``$2)ZDF-=@OH`````$R+1"0@
+M1(GI1(GBBW0D#$B)[^@`````QD0D'P%FD$'_QTB+1"001#AX6`^'7O___[@!
+M````@'PD'P!U%TB+1"0@QT!0_____TB)Q_]02+@`````2(/$*%M=05Q!74%>
+M05_#9F9FD&9F9I!F9F:02(/L2$B)7"082(EL)"!,B60D*$R);"0P3(ET)#A,
+MB7PD0$F)_TF)]$R+;BA)_\6+1AS_R(E$)!3'1"00`````$B+5C!(B50D"$&`
+M?0$!=1#'1E``````Z3L"``!F9F:008!]`0)U64&`?0(!9F9FD'4^2(._V`@`
+M``!T!TR+O]@(``!)BX?0"```00^V50.(D.X3``!!#[95`XB0[B<``$''1"10
+M`````.GI`0``9I#'1E#^____Z=L!``!F9F:008!]`01U&4$/MD4#@^@[/`%W
+M#>BX_/__Z=4!``!F9I!!@'T!`W5N08!]`@%F9F:0=55!#[9-`T$/MD<^C30`
+MB<B9]_Z)T3G6?B]!#[95!`^VV8G>3(G_Z`````!!#[95!(G>3(G_Z`````!!
+MQT0D4`````#I7@$``$''1"10_O___^E0`0``0<=$)%#^____Z4(!``!)@[_8
+M"````'0'38N_V`@``$R)ZT&`?0$`#X2N````#[8K2/_##[8#2/_#B<$/MM#V
+MP@%T.T2+="0000'N13MT)"`/A]D```"+3"002`-,)`A!B>B^`````$R)_^A*
+M]___.>@/A;@```!$B70D$.M32&/%3(TT&$R)\$PIZ$B#P`)(8U0D%$@YT`^/
+MD@````^VT4&)Z$B)V;X`````3(G_Z.;Y__^%P'5X3(GS08`^`'4'08!^`0!T
+M%+\0)P``Z`````"`>P$`#X52____#[8KA>UT5[E4````N@(```"^`````$R)
+M_^B@\___08M$)"`K1"00.<4/1^B+3"002`-,)`A!B>BZ`````+X`````3(G_
+MZ)3V__^%P'@&`40D$.L*0<=$)%#_____D+E4````N@(```"^`````$R)_^A)
+M\___28-\)#@`=`M)BT0D.(M4)!")$$R)YT'_5"1(2(M<)!A(BVPD($R+9"0H
+M3(ML)#!,BW0D.$R+?"1`2(/$2,-F9F:09F9FD&9FD$B#[`A(@[_8"````'0'
+M2(N_V`@``("_[A,```!U(L8%``````&Y(````$C'P@````"^#@```.@`````
+M9F:09I!(@\0(PV9F9I!F9F:09F:02(/L"$B#O]@(````=`=(B[_8"```Q@4`
+M`````+D@````2,?"`````+X.````Z`````!(@\0(PV9FD&9FD&9FD$B#[`@/
+MMM)`#[;V2(N_T`@``.@`````2(/$",-F9F:02(/L"(GP2(._V`@```!T!TB+
+MO]@(``"(!0````"Y(````$C'P@````"^#@```.@`````2(/$",-F9F:09F9F
+MD$B#[`B)\832=!:X`0```-/@9@F'[!,``.L49F:09F:0N/[____3P&8AA^P3
+M```/MK?L$P``Z`````!(@\0(PY!!5%532(G]2(._V`@```!T!TB+K]@(``!!
+MO`````!!#[;<N0````"Z!P```(G>2(GOZ)KQ__^Y1````+H"````B=Y(B>_H
+MAO'__[G0````N@````")WDB)[^AR\?__N0````"Z!````(G>2(GOZ%[Q__]!
+M_\1!@_P!=J._H(8!`.A[\?__B(7!$0``#[;(N@,```"^`````$B)[^@P\?__
+M6UU!7,.0D)"0D)"0D)"0D$B+1PA(+0`"`0")]HL$!HD%`````,-F9F:09F:0
+M9F:02(M'"$@M``(!`(GVB10&PU-(B?M(BU<(QX*`_O__`````(N"!/___XD%
+M`````(#,`8F"!/___[H$````O@S"``#H`````+JX"P``O@C"``!(B=_H````
+M`+H!``P`O@#"``!(B=_H`````+H$````O@S#``!(B=_H`````+JX"P``O@C#
+M``!(B=_H`````+H!``P`O@##``!(B=_H`````+H`````OE#"``!(B=_H````
+M`+H`````OE##``!(B=_H`````%O#9F9FD&9FD&9FD$@YO]`(``!!#Y7`@^8#
+MC31VN`<```")\=/@]]!!B<%$(T]41(E/5(32=`VX!````-/@1`G(B4=4BU=4
+M00^V\,'F"('&4,(``$B+O]`(``#H`````//#9F9FD&9FD&9FD$B#[!A(B1PD
+M2(EL)`A,B60D$$B)_4B)\TB-CR@2``!(BY=H"0``3(VB.+@/`&:!?B"%`'<9
+M2`^W1B!(#[:$.$`(``!(:<#(#P``3(TD`DB+4TB`>@$"=0](BT($2(D!2(M"
+M#$B)00A(@WMX`'022(MS>$B)[^@`````9F:09F:02(G>2(GOZ`````!!QD0D
+M7`!(BQPD2(ML)`A,BV0D$$B#Q!C#9F9FD&9F9I!F9F:02(/L.$B)7"0(2(EL
+M)!!,B60D&$R);"0@3(ET)"A,B7PD,$B)_4&)]4&)UD&)STB+1PA,BR!,B>?H
+M`````$B)PTB%P'1\3(GGZ`````!(B<)(A<!T;,9%7`%(C7M8QD,XX<9#.0'&
+M0SH0QD,ENV8/MD5;9HE#($R)8RC'0S20````2(U"$$B)0TA(B5-XQD`!`L9"
+M$$!$B&@"1(AP`T2(>`1(QX.@`````````+X`````Z`````!(B=Y,B>?H````
+M`$B+7"0(2(ML)!!,BV0D&$R+;"0@3(MT)"A,BWPD,$B#Q#C#9F9FD&9F9I!F
+M9F:005=!5D%505154TB#[`A(B?U!B?9!B==!B<U(BT<(3(L@3(GGZ`````!(
+MB<-(A<`/A/````!,B>?H`````$B)PDB%P`^$W````,9%7`%(C4-82(D$),9#
+M..'&0SD!QD,Z$,9#);MF#[9%6V:)0R!,B6,HQT,TD````$B-0A!(B4-(2(E3
+M>$B)QKD`````NI````"("$C_P$C_RG7VQD8!@L8&0$2(=@)$B'X#1(AN!$&`
+M_0)W(4J-%*T`````@>+\`P``2(U^"$F-M"0H$@``Z`````#K*TF+A"0H$@``
+M2(E&"$$/MM6-%)7X____2&/22(U^$$F-M"0P$@``Z`````!(QX.@````````
+M`+X`````2(L\).@`````2(G>3(GGZ`````!(@\0(6UU!7$%=05Y!7\-F9F:0
+M9F9FD&9F9I!!5D%505154TB)^T&)UHGPP.@"08G$0;T#````02'U2(M'"$B+
+M*+D"````N@````"^`````.@`````@'M<`'082(GOZ`````"_`0```.@`````
+M@'M<`'7H2(M#"$B+$$B!PB@2```/MD("A,!X0H/(@(A"`KD!````N@````"^
+M`````$B)W^@`````@'M<`'0?2(GOZ`````"_`0```.@`````@'M<`'7H9F9F
+MD&9FD$$/MM2Y`0```+X#````2(G?Z`````"`>UP`=!QF9F:02(GOZ`````"_
+M`0```.@`````@'M<`'7H2(M#"$B+,$B!QB@2``!!#[;%N0,````IP4ACR46$
+M]@^5P@^VTL'B`XL$#H/@YPG0B00.00^VU+D!````O@,```!(B=_H`````%M=
+M05Q!74%>PY"0D)"0D$R+AQ@)``!F@7X@A0!W(4@/MT8@2`^VA#A`"```2&G`
+MB`$``$F-/`#K#69FD&9FD$F-N'B&`0!,C8(@!```QH(@!```)V:!?CCA`74K
+M#[9&.O_(/`%W"0^V5COK*V9FD&:!?CCA`740#[9&.H/H$;H/````/`%V$+H`
+M````2(-_6`!T!`^V5WF#X@]!#[9``8/@\`G008A``;H`````9H%^..$!=0H/
+MMD8Z_\@\`78%N@$```#!X@=!#[9``8/@?PG008A``0^V009!B$`"#[8!08A`
+M`P^V005!B$`'#[9!!T&(0`\/MD$"08A`!`^V00-!B$`%#[9!!$&(0`8/MD$!
+M08A`#`^V00I!B$`(#[9!"T&(0`D/MD$,08A`"@^V00A!B$`+#[9!"4&(0`W#
+M9I!32(GS2(M/2$R+`0^V1CB#^"\/A'T```"#^"]_,X/X&P^$3@$``(/X&W\,
+M@_@29I!T8^E9`0``@_@H9F:09F:0=%.#^"IT3NE$`0``9F9FD#V*````=#X]
+MB@```&9F9I!_%8/X-0^$"0$``#V(````="/I&0$``#V/````9F9FD'03/>$`
+M```/A(P```!F9I#I^P```/9'8`%F9F:09F:0=`J!BY0```````0`]D=B$`^$
+MZ@````^V0S@\*`^4PCPJ#Y3`"="H`746@'LXB'00@'LXB@^%Q@```&9FD&9F
+MD/9!#`%U&@^V<0A,B<?H`````(3`#X2F````9F:09F:0@'LD@0^$E@```(&+
+ME````````0#IAP```+@`````@'XY`0^%?0````^V3CJ#^1QW/+@!````2-/@
+MJ?8_P!UU&ZD(0`8`=0NI```@`'469I#K&X..E`````CK18..E`````'K/(..
+ME````"#K,[@`````ZS'V1V`!=`J!BY0```````0`@XN4`````>L39F:0N```
+M``#V@Y8````@=`=FD+@!````6\-F9I!F9I!F9I!`#[;'PV9F9I!F9F:09F:0
+MB?@/ML3#9F9FD&9FD&9FD,9')`)(BT=00(AP`DB+1U#&0`<`2(M'4(A0#,-F
+M9F:0#[9'/8A&`@^V1SR(1@,/MD<[B$8$#[9'.HA&"L-F9I`/MD=!B$8"#[9'
+M0(A&`P^V1S^(1@0/MD<^B$8*#[9'/8A&"P^V1SR(1@S#9F:09I"Y`````#G1
+M?1QF9F:09F:0B=`IR(/X`@^=P`^VP(U,`0$YT7SK\\-F9I!F9I!F9I!(@^PH
+M2(D<)$B);"0(3(ED)!!,B6PD&$R)="0@2(G[2(G508GV#[9'.(/X*G0I@_@J
+M?PV#^"AT'^GS````9F:0/8@```!T*3V*````9F9FD'0>Z=D```!$#[9C0$0/
+MMFL_2(GN2(G?Z`````#K%V:01`^V8T5$#[9K1$B)[DB)W^@`````QD4%0/:#
+ME@````%T-42(90!$B&T(0HT$]0````"(10$/MD,X/"@/E,(\B`^4P`G0@^`!
+M@_@!&<#WT(/`88A%!NMI]H.6````!'0P1(AE`42(;0D/MD,X/"@/E,(\B`^4
+MP`G0@^`!@_@!&<"#X!"#P"6(10;K-69FD&:01(AE`0^V0SJ#X`\(104/MD,X
+M/"@/E,(\B`^4P`G0@^`!@_@!&<"#X`*#Z#B(10:02(L<)$B+;"0(3(MD)!!,
+MBVPD&$R+="0@2(/$*,-F9I!54TB#["A(B?-(BW9(2(GG_+D$````N`````#S
+M2*OVAJ<````$=`Q(BY;(````2/_*ZP6+5GC_RH![."5U8KT(````2(G02,'H
+M&(@$)$B)T$C!Z!"(1"0!2(G02,'H"(A$)`*(5"0#]H;5````$'4/QD0D!@+&
+M1"0'`.FG````2('&Z@```$B-?"0$N@0```#H`````.F,````9F:09F:0O2``
+M``!(B=!(P>@XB`0D2(G02,'H,(A$)`%(B=!(P>@HB$0D`DB)T$C!Z""(1"0#
+M2(G02,'H&(A$)`1(B=!(P>@0B$0D!4B)T$C!Z`B(1"0&B%0D!_:&U0```!!U
+M$L9$)`H"QD0D"P#K'&9FD&9FD$B!QNH```!(C7PD"+H$````Z`````!(BWM(
+M2&/52(GFZ`````!(@\0H6UW#9F9FD`^V1SH*1SL*1SP*1ST/ML`/ME=`@^(!
+M"=!T%;HD````O@4```#H`````//#9F9FD,9&!NQ(QX>@`````````,-(@^P@
+M2(D<)$B);"0(3(ED)!!,B6PD&$B)^TB)]0^V1SB#^"]T"CV/````=!7K4Y!$
+M#[9G0$0/MF\_Z`````"0ZP]$#[9G140/MF]$Z`````#&105`]H.6````!'02
+M1(AE`42(;0G&109"ZQ9F9F:01(AE`0^V0SJ#X`\(107&109`2(L<)$B+;"0(
+M3(MD)!!,BVPD&$B#Q"##9F:09F:02(GQQD(%0`^V1CB#^#5T$#V1````="'K
+M)V9F9I!F9I!(#[='8(/@`8/X`1G`@^#]@^@6B$(&ZQS&0@;JZQ9FD+HD````
+MO@4```!(B<_H`````//#]D$Y`G0$QD$D`//#]D<\\'0/NB0```"^!0```.@`
+M````\\-F9I!F9I!F9I!)B?)!N0````!!N`T```!(B<A$B`A(_\!)_\AU]4$/
+MMD(X@_@U#X2=````@_@U?RR#^"AT<(/X*'\1@_@;9F:0#X22````Z;4"``"#
+M^"IFD'13@_@O=&'II`(``#V/````=%4]CP```'\;/8@```"0=#,]B@```'0L
+M9F9FD&9FD.E[`@``/9$```!F9I!F9I!T-CWA````=&AF9F:09F:0Z5L"```/
+MMO)(B<I,B=?H`````.E.`@``2(G.3(G7Z`````#I/@(``$B)RDR)UN@`````
+MZ2X"``!!]D(\`709QD$&<,9!!`#&00,`QD$"`,9!!4#I#@(``,9!!N#I!0(`
+M`+@`````08!Z.0$/A?H!``!!#[9".H/X'`^'U0$``(G`_R3%`````,9!!P3I
+MU0$``,9!!P#IS`$``,9!!NQFD.G!`0``QD$&[\8!`T$/MD([@\A`B$$!Z:H!
+M``#&00;OQ@$'Z9X!``#&009`QD$!`<9!!4#IC0$``,9!!N_&`0-!#[9".X/(
+M"(A!`>EV`0``QD$&[\8!`NEJ`0``QD$&[\8!@NE>`0``QD$&[\8!!NE2`0``
+MQD$&[\8!ANE&`0``QD$&XT$/MD([B$$!Z34!``#&00:PQ@'8QD$#3\9!!,+I
+M(0$``,9!!K#&`=G&00-/QD$$PND-`0``QD$&L,8!VL9!`T_&003"Z?D```!(
+M#[='8(/@`8/X`1G`@^#]@^@6B$$&Z=X```#&00;OQ@&JZ=(```#&00;OQ@%5
+MZ<8```#&008OQD$!`<9!`A#IM0```,9!!N1!#[9"/(@!00^V0CN(007IG0``
+M`$$/MD([B$$&00^V0CR(`4$/MD(]B$$"00^V0CZ(00-!#[9"/XA!!$$/MD)!
+MB$$*00^V0D"(00'K9,9!!NA!#[9"/(@!00^V0CN(005!#[9"/8A!`D$/MD(^
+MB$$#00^V0C^(001!#[9"0(A!`>LO0?9"/`%T*,9!!G#&000`QD$#`,9!`@#&
+M005`ZQ*X`````,-F9I!F9I"X`````,.X`0```//#D)"005154XGU3(MG"$F!
+M[``"`0"[`````#GS<S9F9I!F9I!!BX0D`,@``(D%`````*@!=0ZX`````.L<
+M9F9FD&9FD+\*````Z`````#_PSGK<M"X_____UM=05S#9F:09F:02(M_"$B!
+M[P`"`0`/MM+!X@A%#[;`0<'@!$0)PHG0@\@$A,D/1=!!@_G_=!%$B<@E__\#
+M`(F'!,@``(/*`HD6PTB+1PB#S@&)L`#&___#9I!(@^PH2(E<)!!(B6PD&$R)
+M9"0@2(G[28GT2(MO"$B+A_@3```/ME`"0;G_____0;@!````N0$```!(C70D
+M#.AM____BW0D#$B)W^BA____OA`G``!(B=_H]/[__[K_____A<!U&8N%#,;_
+M_XD%`````(E$)`Q!B`0DN@````")T$B+7"002(ML)!A,BV0D($B#Q"C#9F9F
+MD&9F9I!F9F:0059!54%455-(@^P028G\B<U!B?9!B=6[`````#G+<S1(C70D
+M#TR)Y^@S____A<!U$T2)\")$)`]$..AU![@`````ZQ6_"@```.@`````_\,Y
+MZW+,N/____](@\006UU!7$%=05[#9F9FD&9FD&9FD%-(@^P02(G[2(N'^!,`
+M``^V$$&Y_____T&X`````+D`````2(UT)`SH<_[__XMT)`Q(B=_HI_[__[X0
+M)P``2(G?Z/K]__^Z_____X7`=1ZYX),$`+H"````O@,```!(B=_H*O___X/X
+M`1G2]]*)T$B#Q!!;PV9F9I!F9F:09F:055-(@^P(2(G[2(G52(N'^!,```^V
+M4`M!B?%!N`$```"Y`0```$B-="0$Z/']__^+="0$2(G?Z"7^__^^$"<``$B)
+MW^AX_?__NO____^%P'482(M#"(N`#,;__XD%`````(A%`+H`````B=!(@\0(
+M6UW#9F9FD&9F9I!F9I!F9I!54TB#[`A(B?N)]<9$)`?_2(U4)`?H`````+K_
+M____A<!U?KH`````@'PD!P!T<DB)W^C)_O__B<*#^/]T8TB+@_@3```/ME`*
+M08GI0;@`````N0````!(B>9(B=_H/OW__XLT)$B)W^AS_?__OA`G``!(B=_H
+MQOS__[K_____A<!U'KG@DP0`N@````"^`P```$B)W^CV_?__@_@!&=+WTHG0
+M2(/$"%M=PV9FD&9FD%532(/L"$B)^XGUZ$#^__^)PH/X_W1F2(N#^!,```^V
+M4`9!B>E!N`````"Y`````$B-="0$2(G?Z+/\__^+="0$2(G?Z.?\__^^$"<`
+M`$B)W^@Z_/__NO____^%P'4>N>"3!`"Z`````+X#````2(G?Z&K]__^#^`$9
+MTO?2B=!(@\0(6UW#9F9FD&9FD&9FD$B#["A(B5PD"$B);"003(ED)!A,B6PD
+M($B)_4&)]4&)U$B+7PCHEOW__T2)HPC&__](BX7X$P``#[90!46)Z4&X!```
+M`+D`````2(UT)`1(B>_H"?S__XMT)`1(B>_H/?S__[X0)P``2(GOZ)#[__^Z
+M_____X7`=1ZYB!,``+H`````O@$```!(B>_HP/S__X/X`1G2]]*)T$B+7"0(
+M2(ML)!!,BV0D&$R+;"0@2(/$*,-F9F:09F9FD&9FD&9FD$B#["A(B1PD2(EL
+M)`A,B60D$$R);"083(ET)"!)B?Y!B?5)B=2)S;L`````.<MS'XG80HL4($&-
+M=!T`3(GWZ/W^__^#^/]T#(/#!#GK<N&X`````$B+'"1(BVPD"$R+9"003(ML
+M)!A,BW0D($B#Q"C#9F9FD&9F9I!F9F:09F:02(/L*$B)7"002(EL)!A,B60D
+M($B)^TF)U$B+;PA(@>T``@$`@/D%N`0````/0\A(BX?X$P``#[90!$&)\40/
+MML&Y`0```$B-="0,Z-#Z__^+="0,2(G?Z`3[__^^$"<``$B)W^A7^O__NO__
+M__^%P'49BX4,R```B04`````B40D#$&)!"2Z`````(G02(M<)!!(BVPD&$R+
+M9"0@2(/$*,-F9F:09F9FD&9F9I!F9I!(@^PX2(E<)`A(B6PD$$R)9"083(EL
+M)"!,B70D*$R)?"0P28G^08GT2(G518T\#(GS@^/\08GU08/E`W1)N00```!(
+MC50D!(G>Z`+___^-0P2Y!````$0Y^'8)1(GY1"GA1`'I1(GJ03G-<Q=(C70D
+M!(G0#[8$!HA%`$C_Q?_".<IR[H/#!$6)_4&#Y?Q$.>MS)[D$````2(U4)`2)
+MWDR)]^BJ_O__BT0D!(E%`$B#Q02#PP1$.>MRV40Y^W,YN00```!(C50D!(G>
+M3(GWZ'[^__]$B?DIV;H`````.<IS%TB-="0$B=`/M@0&B$4`2/_%_\(YRG+N
+MN`````!(BUPD"$B+;"003(MD)!A,BVPD($R+="0H3(M\)#!(@\0XPY!54TB#
+M[`A(B?O'1"0$`````$B+;PC&A_`3````#[85`````$&Y`````$&X`@```+D!
+M````2(UT)`3H$OG__XMT)`1(B=_H1OG__[X0)P``2(G?Z)GX__^%P'4[BX4,
+MQO__B04`````B40D!#V_0P``=23'@^`3``"_0P``QX/D$P`````@`,>#Z!,`
+M```0``!FN```ZP6X_____TB#Q`A;7<-F9F:09F9FD&9FD&9FD%532(/L"$B)
+M^\=$)`0`````2(MO",:'\!,````/MA4`````0;D`````0;@"````N0$```!(
+MC70D!.AB^/__BW0D!$B)W^B6^/__OA`G``!(B=_HZ??__X7`=3N+A0S&__^)
+M!0````")1"0$/1]C``!U),>#X!,``!]C``#'@^03``````0`QX/H$P`````!
+M`&:X``#K!;C_____2(/$"%M=PV9F9I!F9F:09F:09F:055-(@^P(2(G[QT0D
+M!`````!(BV\(QH?P$P```0^V%0````!!N?____]!N`(```"Y`0```$B-="0$
+MZ++W__^+="0$2(G?Z.;W__^^$"<``$B)W^@Y]___A<!U:HN%#,;__XD%````
+M`(E$)`0]'T,``'0N/1]$``!U3,>#X!,``!]$``#'@^03``````0`QX/H$P``
+M```!`&:X``#K+69FD,>#X!,``!]#``#'@^03``````0`QX/H$P`````!`+@`
+M````ZP6X_____TB#Q`A;7<-F9F:09F9FD&9F9I!F9I!54TB#[`A(B?O'1"0$
+M`````$B+;PC&A_`3````#[85`````$&Y`````$&X`@```+D!````2(UT)`3H
+MTO;__XMT)`1(B=_H!O?__[X0)P``2(G?Z%GV__^%P'5UBX4,QO__B04`````
+MB40D!#WO$0``=`X][Q(``'0LZU5F9I!FD,>#X!,``.\1``#'@^03``````0`
+MQX/H$P`````!`+@`````ZS#'@^`3``#O$@``QX/D$P`````$`,>#Z!,`````
+M`0"X`````.L+9F:09F:0N/____](@\0(6UW#9F9FD%-(B?OHA_W__X7`=1-(
+MQX/X$P```````+H`````ZV&02(G?Z!C^__^%P'422,>#^!,```````"Z````
+M`.M"2(G?Z)K\__^%P'422,>#^!,```````"Z`````.LD2(G?Z+S^__^Z____
+M_X7`=1-(QX/X$P```````+H`````9F:0B=!;PV9F9I!F9F:09F9FD$B#["A(
+MB5PD"$B);"003(ED)!A,B6PD($B)^XGU08G-28G4N@````!(@[_X$P````^$
+MN@```$6$P'0M@_[_=1$/MX?@$P``9D&)!"3IE@```$R)XNC7^O__N@````"%
+MP`^%B@```.M_@_[_9F:09I!U$T&`/"0/#Y2'\1,``+H!````ZVNZ`````("_
+M\1,```!T78GPN@````#WM^@3``"%TG4J@+_P$P```'0.Z`````"Z`````(7`
+M=36)[DB)W^CK]___N@````"%P'4B1(GI3(GBB>Y(B=_H(OG__[H`````A<!U
+M";H!````9F9FD(G02(M<)`A(BVPD$$R+9"083(ML)"!(@\0HPY"0D)"0QX?H
+M"````0```,-F9I!FD+@`````PV9F9I!F9I!F9I"X`````#L]`````'TW2&/'
+M2,?!`````$B-!$!(P>`##[<4"&:)%@^W5`@"9HE6`@^V5`@(B%8(#[9$"`F(
+M1@FX`0```//#9F9FD&9FD&9FD$%6055!5%532(/L"(E\)`2]`````$G'Q@``
+M``!)Q\4`````2&/%2(G"2,'@!69"@SPP``^$L0```$&Z`````$V)Z$*`?"@,
+M``^$D0```$C'PP````#\0;P`````28G3D$F)T4ECPDB-!-!(C32#2(U\)`2Y
+M!````/.F#Y?"#Y+`.,)U/$R)QDR)R4C!X05"#[9$`0W_P$*(1`$-0H!\`0P`
+M=!U".D0!#'869@^VP&9"#[9\`0Q$B>)F]_>(5#$-D$'_PDR)VDG'P`````!,
+MB=A(P>`%0@^V1``,1#G0?X'_Q8/]`P^..?___TB#Q`A;74%<05U!7L-F9I!F
+M9I!F9I!!5T%6055!5%532(/L&,9$)!<`0;\`````#[9$)!>)1"0,0;X`````
+M00^VWXE<)!!!#[;6N0````"+="00BWPD#.@`````08G$0;D`````1#L-````
+M``^-2@$``$C'Q0````!)8\%(C01`2,'@`P^W5"@"P>(0#[<$*`G"1#GB#X41
+M`0``NP````!)Q\,`````26/!2(T$0$B--,4`````2<?%`````$G'P@````!F
+MD`^VTTB)T4C!X05F0H,\&0!U4DB+A@````!*B009BX8`````0HE$&0A*#[9$
+M*0Q(P>(#2(T$`@^V7"0708A<@PU*#[9$*0Q(C00"18A\@PY*#[9$*0Q(`<)%
+MB'23#T+^1"D,ZW</MOM)Q\``````2(GY2,'A!4(/MD0!#+H`````0O=T%@2%
+MTG1'2@^V1`$,2(T4_0````!(C00"#[9<)!=!B%R##4H/MD0!#$B-!`)%B'R#
+M#DH/MD0!#$@!PD6(=),/0OY$`0SK$F9F9I!F9I#_PX#[`P^&)?___TECP4B-
+M!$#_1,4,0?_!1#L-``````^,O?[__T'^Q@^$@?[__T'_QT&`_Q\/AF;^___^
+M1"07@'PD%_\/A4C^__](@\086UU!7$%=05Y!7\-F9I!F9I!!5T%6055!5%53
+M2(/L"$B)\TF)U$&]`````(,]``````!U#\<%``````$```#H[OW__TB%VW0#
+MQ@,`0;H`````1#L5`````'T[2,?!`````$C'Q@````!)8\)(C01`2(T4Q0``
+M``!$`VP*#$B%VW0(#[8#`@0RB`-!_\)$.Q4`````?---A>0/A*L```!!N@``
+M``!)8\)(B<)(P>`%9H.X```````/A(T```!!N`````"`N```````='%(Q\4`
+M````_$G'QP````!)B=9)P>8%28G328G126/`2(T$T$B-=(4`3(GGN00```#S
+MI@^7P@^2P#C"=1Q(A=MT#TR)R$C!X`5"#[9$.`V(`T</MFP^#.L90?_`3(G:
+M3(G82,'@!0^V@`````!$.<!_J$'_PD&#^@,/CEO___]!#[;%2(/$"%M=05Q!
+M74%>05_#9F:09I"X`"@``,-F9F:09F:09F:0N-````##9F9FD&9FD&9FD+@(
+M````PV9F9I!F9I!F9I!!5D%505154TF)_$&)]4B)TTF)SDB-J@`4``"Y````
+M`+H`*```2(G8B`A(_\!(_\IU]DR)<R"+%0````"-0@&)!0````"(4T!$B6LX
+MQD-!`$$/MP0D9HE#,$$/MT0D`F:)0S)!BT0D!(E#-$R)=2"(54!$B6TXQD5!
+M`4$/MP0D9HE%,$$/MT0D`F:)13)!BT0D!(E%-`^W0S(](B<``']K/2`G```/
+MC?4````]0"$```^$Z@```#U`(0``9F:09I!_&ST@(0``#X33````/2(A```/
+MA,@```#IUP```#U$(0``#X2X````/40A``!F9I`/C+X````M$"<``(/X`6:0
+M#X>N````Z94````]8"<```^$B@```#U@)P``9F:09I!_,#U`)P``='<]0"<`
+M`&:0?Q`],"<``'1G9F9FD&9FD.MR/40G``!T5V9F9I!F9I#K8CV")P``=$<]
+M@B<``&:0?Q`]@"<``'0W9F9FD&9FD.M"/8"1``!T"SV`E```9I!T'NLP9L=#
+M/("1QD,^!&;'13R`D<9%/@3K&F9FD&9FD&;'0SR`E,9#/@1FQT4\@)3&13X$
+M00^V1"0(B$-"00^V1"0(B$5"N0``!`"Z`````+X"````3(GWZ`````!(B0.Y
+M`"```+H`````O@````!,B??H`````$B)0Q!(@SL`=`5(A<!U"K@`````Z?$`
+M``!(BP-(C8@``@$`2(E+"$B-D````@!(B1-(!0!``@!(B44`2(E-"$B+0Q!(
+MB4400;@`````1#L%`````'U62,?'`````$2+#0````!)8\!(C01`2(T,Q0``
+M``!!BP0D.00Y=2A(Q\8`````BP0Q_\")!#&#?#D,`'02.T0Y#'8,N@````#W
+M=#D,B10Q0?_`13G(?+A(BT,(QX`@@O__`?`#`$B+0PC'@"B"__\!``#H2(M[
+M(+YX````Z`````")PB4`<```/0`@``!V$0^V\DB+>R"Z>````.@`````1(GO
+MZ*SX__](B=_H-/C__[@!````6UU!7$%=05[#9F:09F:04TB)^^@`````2('#
+M`!0``$B)W^@`````N`$```!;PY!(@^P82(E<)`A(B6PD$$B)_4B+G]`(``!(
+M@<,`%```Z`````"`?5$!=0:`>U$!=#M(C9UP`0``2(M]*$B)WN@`````QX5P
+M`0``Z`,``$C'A8`!````````2(FMB`$``$B+?2A(B=[H`````$B+7"0(2(ML
+M)!!(@\08PV9FD&9FD%532(/L"$B)^TB-KP`4``#H`````$B)0RA(B44H2(F;
+MT`@``$B)G=`(``"+@^@(``")A>@(``!(B=_H`````$B)[^@`````2(G?Z```
+M``"Z`````(3`='Y(B>_H`````+H`````A,!T;4B)W^@`````O]`'``#H````
+M`$B)W^@`````2(G?Z`````#'@W`!``#H`P``2,>#@`$```````!(B9N(`0``
+M2(VS<`$``$B+>RCH`````+X`````2(G?Z`````"^`````$B)[^@`````N@$`
+M``")T$B#Q`A;7<.005154TB#[#!(B?NX`````+!MM/]()?__`/](#0``(P!(
+MNO___P#_____2"'02`T````42+K_____`/___T@AT$BZ`````#H```!("=!(
+MNO______`/__2"'02+H``````.\``$@)T$BZ________`/]((=!(N@``````
+M`!8`2`G02+K_________`$@AT$BZ`````````))("=!(B40D"$B#O]@(````
+M=`=(BY_8"```N0````"Z(````$B-1"00B`A(_\!(_\IU]L9$)!0!0;P`````
+M2(UL)!"Y(````$B)ZKX.````2(G?Z`````"%P'5'OX`:!@#H`````+D@````
+M2(GJO@\```!(B=_H`````(/X('4C2(UT)"!(C7PD"+D(````_/.F#Y?`#Y+"
+M.-"X`0```$0/1.!%A.1U$4C'QP````"X`````.@`````00^VQ$B#Q#!;74%<
+MPV9FD//#9F9FD&9F9I!F9I!F9I!54TB#[`A(B?U(B?.Y`````+J`````2(GP
+M9F9FD&9FD(@(2/_`2/_*=?:#O>@(```!#Y1#$XM%.(D#@$L1$`^W13!FB4,$
+M#[=%,F:)0P:+A>@(``"(0W#&0Q(@#[=%,F8]("$/E,)F/2(A#Y3`"="H`71$
+MQD,7`L=#/%)O8VO'0T!E=%)!QT-$240@4\=#2%-$(#+'0TPQ,G@@QT-00V]N
+M=,=#5')O;&QFQT-897+&0UH`Z>(````/MU4RC8+PV/__9H/X`0^6P6:!^D`A
+M#Y3`"<BH`74+9H'Z1"$/A:0```#&0Q<$#[=%,F8M$"=F@_@!=SW'0SQ2;V-K
+MQT-`97120<=#1$E$(#+'0T@W,7@@QT-,4T%3(,=#4$-O;G3'0U1R;VQL9L=#
+M6&5RQD-:`.MI#[=%,F8]0"$/E,)F/40A#Y3`"="H`711QT,\4F]C:\=#0&5T
+M4D''0T1)1"!3QT-(4T0@,L=#3#$T>"#'0U!#;VYTQT-4<F]L;&;'0UAE<L9#
+M6@#K%,9#%PA(C7L\2,?&`````.@`````#[9#%_9C$HA#$(3`=03&0Q"`QT,8
+M2&EG:,=#'%!O:6['0R!T(%1EQT,D8VAN;\=#*&QO9VG'0RQE<RP@QT,P26YC
+M+L9#-`!(@[W@"````'012(N%X`@``$B+0!!(B4-HZPA(BT402(E#:,=#8``@
+M``!(@\0(6UW#9F9FD&9F9I!F9F:09F:0QH?+`````,-F9F:09F9FD$B#[%A(
+MB5PD0$B);"1(3(ED)%!(B?U,BV=X28N$)-`(``"`>#\`#X6K````2(N?@```
+M`$B+?V!$#[:/!P$``$0/MD4`#[9-`@^V50&+=0@/MH?3````B40D.`^VA](`
+M``")1"0P#[:'T0```(E$)"@/MH?0````B40D(`^VA\\```")1"08#[:'S@``
+M`(E$)!`/MH?-````B40D"`^VA\P```")!"1!@^`!2,?'`````+@`````Z```
+M``!(QX6``````````(M5"$B+O9````!(B>[_T^L]2(V?F````$F+?"0H2(G>
+MZ`````#'A9@```#T`0``2,>%J`````````!(B:VP````28M\)"A(B=[H````
+M`$B+7"1`2(ML)$A,BV0D4$B#Q%C#9F9FD&9F9I!!5T%6055!5%532(/L"$F)
+M_4F)]`^WTDAITH@!``!(B=5(`Z\8"0``2(N_T`@``$B!QP`4``!(B6Y@2(EU
+M.$B#?5``=0M(@WU8``^$HP,``+X`````08`,)`%(BT5828E$)'!(BT5028E$
+M)&BZ`````$&`?4,`=B5(BTU(9F9FD`^VPDAKP&A*.XPH2!(```^$A`(``/_"
+M03A50W?CNH#___])BXW0"```#[;"#[:$"$`(```\_W0D2(-]4`!T&P^VP$AI
+MP,@/``!(`X%H"0``2#M%4`^$-0(``/_&_\*`^H%VQKJ"____28N-T`@``)`/
+MML(/MH0(0`@``#S_=!T/ML!(:<#0````2`.!0`D``$@[15@/A.L!``#_QO_"
+M@/J%=LVZ@/___P^VP@^VA#A`"```//]T)$B#?5``=!L/ML!(:<#(#P``2`.'
+M:`D``$@[15`/A)\!``#_QO_"@/J!=L:Z@O___P^VP@^VA#A`"```//]T'0^V
+MP$AIP-````!(`X=`"0``2#M%6`^$70$``/_&_\*`^H5VS4&`?5$!=3](@WU0
+M`'02#[9U>4B+?5"Z`````.@`````2(.]&`$````/A`D"```/MK4%`0``2(N]
+M&`$``+H`````Z`````!(@[T8`0````^$XP$``$R+?5!!O@````!!@']8`'9*
+M28U?2$B)W^@`````2(U(\$B+4PA(B4,(2(D82(E0"$B)`H"Y!P$``/]U%H!Y
+M00!U$$B#N1@!````=0]F9I!F9I!!_\9%.'=8=[I%.'=8#X7;````#[:%!P$`
+M`$&(1"0"0;X`````08!_6``/AL`!``!)C5](2(G?Z`````!(C4CP2(M3"$B)
+M0PA(B1A(B5`(2(D"2(-Y.`!T1TB+43@/MD(".H$'`0``=#=(@[J``````'4M
+M2(.ZB`````!U(P^V@0<!``"(0@)(#[=1,$F+M=`(``"_!P```.@`````9F:0
+M0?_&13AW6'>+Z4(!``!!B'0D`>FB_O__08AT)`%F9I#IE?[__T&(="0!Z8O^
+M__]!B'0D`>F!_O__00^V14&-!()!B(0DS````.EO_?__#[9%>4&(1"0"QH4'
+M`0``_T&^`````$&`?U@`#X;A````28U?2$B)W^@`````2(U(\$B+4PA(B4,(
+M2(D82(E0"$B)`H"Y!P$``/]T3,:!!P$``/](@WDX`'0^2(M1.`^V0@(Z07ET
+M,4B#NH``````=2=(@[J(`````'4=#[9!>8A"`D@/MU$P28NUT`@``+\'````
+MZ`````!!_\9%.'=8=X3K7P^V17E!B$0D`NM400^V14&-!()!B$0D`4&(A"3,
+M````ZRFZ`````$&`?4,`=AU(BTU(#[;"2&O`:$H[C"A($@``=,C_PD$X54-W
+MYT$X54-U!D'&1"0!_T'&1"0"`&:02(N%D````$F)1"0@2(N%F````$F)1"0H
+M2(N%H````$F)1"0P2(N%J````$F)1"0X2(N%L````$F)1"1`2(M%?$F)1"0,
+M2(N%A````$F)1"04BX6,````08E$)!Q(BX6X````28E$)$@/MT5@9D&)1"18
+M#[=%8F9!B40D6DB+17!)B40D4`^V17I!B$0D7/9%1`1U(T&`O>\3````=!%!
+M_HWO$P``08"][Q,```!U"$R)[^@`````2(M%.`^V<`&Z`````$R)[^@`````
+M2`^V14"H`G0/J`1T"Z@!=0=!@`PD`NL%08`D)/T/ME5$T.J#X@1!#[8$)(/@
+M^PG008@$)$R)Y^B8^?__2(/$"%M=05Q!74%>05_#9F:09F:09F:005=!5D%5
+M05154TB#[`A)B?V)]4F)U+X`````NM````!,B>!`B#!(_\!(_\IU]4&);"0(
+M@_T_?@I)@<4`%```@^U`2&/%N@````!)@[S%0`0````/A8,"``!(8\5-B:3%
+M0`0``$V);"1X28F,)(````!-B80DD````+H!````08!]40$/A5,"``!FQT0D
+M!O\`@?V%````?P]F0@^VA"A`"```9HE$)`9F@7PD!O\`#X3^`0``2`^W1"0&
+M28N-&`D``$AIT(@!``#V1`I#!`^$WP$``(M$"D`E`/__`#T``/\`#X7+`0``
+M2(T<"O9#1`0/A$P!``#&@^``````2`^V0T"H`G0RJ`1T+J@!="K&0T(%QD-#
+M!`^V4WE(BW-02(M[2$B)V>@`````Z7T!``#&@^$````!ZW)(#[9#0*@"9I`/
+MA8````"H!'1\J`%T>$R+8TC&0T(#QD-#!$&^`````$&`?"0.`'1!28UL)&!(
+MB>_H`````$B+50A(B44(2(DH2(E0"$B)`H!X0O\/E<)(.=@/E<`/MM*%T'63
+M0?_&00^V1"0.1#GP?\2`N^$````!#X3U````2(G>3(GOZ`````#IY0```$@/
+MMD-`J`(/A-@```"H!`^$T````*@!9F:0#X7%````2(M#2`^V0`V]`````$&`
+M?3X`=BE$#[;@0`^VS4R)X$C3^*@!=`^Z`````(G.3(GOZ`````#_Q4$X;3YW
+MV\9#0P;&0T(%9L>#P```````2(G>3(GOZ`````#K:DR+>TC&1"0%`$&`?PX`
+M=DI-C7=@3(GWZ`````!(B<-)BT8(28E>"$R),TB)0PA(B1B`>T+_=!0/MD-!
+M/"(/E,(\#0^4P`G0J`%U//Y$)`4/MD0D!4$X1PYWN@^W5"0&3(GF3(GOZ```
+M``"Z`0```.LJ2&/%2<>$Q4`$````````N@````#K%$ACQ4G'A,5`!```````
+M`+H`````B=!(@\0(6UU!7$%=05Y!7\-F9I!(@^PH2(D<)$B);"0(3(ED)!!,
+MB6PD&$R)="0@2(G[28GU28G42(MO8$B%[74*2(G7_];I"`$``$B#OX@`````
+M=0I(@[^``````'0+3(GG0?_5Z>D```"`O>``````9I`/A<X```!(BWU(2`^V
+M1PRH$`^%O0```*@(#X6U````3(LW@'U[`'0-2(GJO@8```#H`````$R)JX@`
+M``!,B:.0````2`^V14"H`G0FJ`1T(J@!=![&14(%QD5#!`^V57E(BW502(M]
+M2$B)Z>@`````ZVY(#[9%0*@"=26H!&9FD'0>J`%T&L9%0@/&14,$2(GN3(GW
+MZ`````#K169FD&:02`^V14"H`G0WJ`1F9I!FD'0NJ`%U*L9%0@7&14,&9L>%
+MP```````2(GN3(GWZ`````#K#$R)YT'_U69FD&9FD$B+'"1(BVPD"$R+9"00
+M3(ML)!A,BW0D($B#Q"C#9F:02(/L&$B)'"1(B6PD"$R)9"002(GS2(M'2$R+
+M($B+;F@/MD8D@_@@=$^#^"!_$H7`="*#^`9_.NLO9F9FD&9FD(/X(G0S@_@B
+M?!Z#P("#^`%W'^L42(M'.,=`!`````#&A:H````!ZQ#&A:H````-ZP>X````
+M`.LQ2(-[>`!T$4B-<WA,B>?H`````&9FD&:02(G>3(GGZ`````!(B>__E<``
+M``"X`0```$B+'"1(BVPD"$R+9"002(/$&,-F9F:02(/L.$B)7"0(2(EL)!!,
+MB60D&$R);"0@3(ET)"A,B7PD,$B)^TB)]4R+;WA(BT9(2(DX2(-_8`!U%L:&
+MJ@````)(B??_EL````#I!P8``)!(BT=@]D!$`G05QH:J`````DB)]_^6P```
+M`.GG!0``3(GOZ`````!)B<1(A<!U%<:%J@````)(B>__E<````#IP@4``,>`
+ME`````````!(B6AH2(M#8$F)1"0H2(M#8`^W0#!F08E$)"!!QD0D)(`/MH6H
+M````@_@"#X2D`0``@_@"?PF%P'0CZ8,#``"#^`,/A#0"``"#^`1F9F:09F:0
+M#X3T`0``Z64#``!(BT-@]D!@`0^$Q````/:%J0````)T"$'&1"0XB.L9#[:%
+MJ0```(/@!#P!&<"#X`6#Z'9!B$0D.$B+E9`````/MXV8````0<9$)#D`2(G0
+M2,'H.$&(1"0Z2(G02,'H,$&(1"0[2(G02,'H*$&(1"0\2(G02,'H($&(1"0]
+M2(G02,'H&$&(1"0^2(G02,'H$$&(1"0_2(G02,'H"$&(1"1`08A4)$%!QD0D
+M0@!!QD0D0P")R&;!Z`A!B$0D1$&(3"1%0<9$)$8`0<9$)$<`Z8,```#VA:D`
+M```"=`A!QD0D."CK&0^VA:D```"#X`0\`1G`@^`%@\`J08A$)#A(BY60````
+M#[>-F````$'&1"0Y`$B)T$C!Z!A!B$0D.DB)T$C!Z!!!B$0D.TB)T$C!Z`A!
+MB$0D/$&(5"0]0<9$)#X`B<AFP>@(08A$)#]!B$PD0$'&1"1!`$B+0V!(!>0`
+M``!)B40D4$'&1"0P($&#C"24`````NGY`0``@+V0````$'<%]@,"=0S&A:H`
+M```&Z;4#``!(#[:5D````$B+M9@```!)C7PD..@`````2(M#8$@%Y````$F)
+M1"100<9$)#`@08&,))0``````!``0<9$)"6K]H6I````!@^$D@$``(N%E```
+M`$&)1"0TZ8(!```/MH6I````@^`P/"!U%T'&1"0X&T'&1"0Y`4'&1"0\`.E=
+M`0``0<9$)#@UZ5(!``!(BT-@2`^V0$"H`70$J`1U#,:%J@````;I"P,``$&!
+MC"24```````@``^WA9P```!F.X62````=$L/MH6;````@_A"=#^#^$)_#H/X
+M0'0U9F9FD&9FD.L@/;````!T"3WL````9I!U$`^WA9P```!FB862````ZPS&
+MA:H````&Z:0"``!!QD0D.+`/MX60````08A$)#D/MX62````08A$)#H/MX64
+M````08A$)#L/MX66````08A$)#P/MX68````08A$)#T/MH6:````08A$)#X/
+MMH6;````08A$)#]F#[:%D0```$&(1"1`9@^VA9,```!!B$0D068/MH65````
+M08A$)$)F#[:%EP```$&(1"1#9@^VA9D```!!B$0D1/:%J0````9T*@^WA9P`
+M``#!X`E!B40D-$&#C"24````!.L09F9FD,:%J@````;IU@$``$V-="182<>$
+M)*``````````#[:%J0```*@&#X2@`0``NP````"H`G0+08.,))0````(ZPE!
+M@XPDE````!!(@[VP`````'02]H6I`````70)2(N=L````.LJ2(.]N`````!T
+M($F+M2`*``"Z`````$B)[_^5N````(7`=`=)BYT@"@``2(7;=#5,B>?H````
+M`+X`````3(GWZ`````!(BW,(BQ-,B??H`````$B-0P1(@\,0@S@`=.7I#`$`
+M`$R)[^@`````2(D$)$B%P'4,QH6J````!NG\````2(L4)$B+0A!)B40D2$F)
+M5"1XN0````"Z``(``(@(2/_`2/_*=?;VA:D````$#X2/````0?:$))8````@
+M=!A)BWPD2$&+5"0T2(NUH````.@`````ZVQ!]H0DE@```!!T84V+?"1(2(.]
+ML`````!T$O:%J0````%U"4B+G;````#K($F+M2`*``"Z`0```$B)[_^5N```
+M`(7`=`=)BYT@"@``2(MS"(L33(G_Z`````"+`TD!QTB-0P1(@\,0@S@`=."^
+M`````$R)]^@`````08M4)#1(BP0D2(MP&$R)]^@`````ZPE!@XPDE`````%,
+MB>9,B>_H`````.L43(GF3(GOZ`````!(B>__E<````!(BUPD"$B+;"003(MD
+M)!A,BVPD($R+="0H3(M\)#!(@\0XPV9F9I!F9I!(@^QH2(E<)#A(B6PD0$R)
+M9"1(3(EL)%!,B70D6$R)?"1@2(G[28GT2(E,)#!!B=5$B$0D+\=$)!3_____
+MB=#!X`EFB40D$DR+?V!-A?]T"8"_RP````!T"8M$)!3I#P,``$F+5TA(B50D
+M"$R+=WAFQX?(````$"=,B??H`````$B)Q8M$)!1(A>T/A.$"``!,B??H````
+M`$B)1"0@2(7`=11(B>Y,B??H`````(M$)!3INP(``$F+MM`(``#&1C\!2(G:
+MOP4```#H`````$&`3T0"2(M38+XA````2(M\)`CH`````$B-15A(B40D&(!\
+M)"\`=!#'A90````*````QD4X*.LGQX64````$@```,9%."I(BU0D($B+>A!(
+M#[=4)!)(BW0D,.@`````2(M#8/9`8`%T?H!\)"\!&<"#X`*#Z'B(13C&13D`
+M3(G@2,'H.(A%.DR)X$C!Z#"(13M,B>!(P>@HB$4\3(G@2,'H((A%/4R)X$C!
+MZ!B(13Y,B>!(P>@0B$4_3(G@2,'H"(A%0$2(94'&14(`QD5#`$2)Z&;!Z`B(
+M141$B&U%QD5&`,9%1P#K3(!\)"\!&<"#X`*#P"B(13C&13D`3(G@2,'H&(A%
+M.DR)X$C!Z!"(13M,B>!(P>@(B$4\1(AE/<9%/@!$B>AFP>@(B$4_1(AM0,9%
+M00!(B>_H`````$B+0V`/MT`P9HE%(,9%)(!(B5TH2(M4)"!(BT(02(E%2`^W
+M1"02B44T2(E5>,9%,"!(BT-@2`7D````2(E%4$C'A:``````````O@````!(
+MBWPD&.@`````BU4T2(M$)"!(BW`82(M\)!CH`````,:#RP````%(B>Y,B??H
+M`````$B%VP^$GP```$B#>V``=%2`N\L`````=$MF@;O(````E@!U$DB+4V!(
+MBWI(OB$```#H`````&;_B\@```"_T`<``.@`````3(GWZ`````!(A=MT5$B#
+M>V``=`F`N\L`````=;5(A=MT/TB#>V``=#AF@[O(`````'0N@'TD`'4HQT0D
+M%`````"`?"0O`'092`^W5"022(M$)"!(BW`02(M\)##H`````$B#?7@`=`Q(
+MC75X3(GWZ`````!(B>Y,B??H`````$F+MM`(``#&1C\`2(G:OP8```#H````
+M`$&`9T3]BT0D%$B+7"0X2(ML)$!,BV0D2$R+;"103(MT)%A,BWPD8$B#Q&C#
+M9F9FD&9F9I!F9F:02(/L&$B)7"0(3(ED)!!)B?Q!B'0D3T`/MMZ)WN@`````
+M28'$`!0``(G>3(GGZ`````"X`0```$B+7"0(3(MD)!!(@\08PV9F9I!F9I!F
+M9I!(@^P(Z``````/ML!(@\0(PV9F9I!F9F:09F9FD&9FD+@`````PV9F9I!F
+M9I!F9I"Y`````+J`````2(NWT`@```^WPH"\,$`(``#_#Y7`#[;``<'_PF:!
+M^H4`=N1(B[_0"```2(''`!0``+J`````#[?"@+PX0`@``/\/E<`/ML`!P?_"
+M9H'ZA0!VY(G(PY")\HGPP.@$/`EV!8/`5^L(B?#`Z`2#P#"(!XG0@^`/@_@)
+M?@R)T(/@#X/`5^L*9I")T(/@#X/`,(A'`<-F9F:02(/L$$B)'"1,B60D"$B)
+M^T&)]$R)X`^V].BB____00^V]$B#PP)(B=_HDO___TB+'"1,BV0D"$B#Q!##
+M9F9FD%532(G50;D`````N0````"Z``$``$B)Z(@(2/_`2/_*=?:Y@````$R+
+MA]`(```/M\%F0@^VE`!`"```9H'Z_P`/A&(!``!$B<A!_\$Y\`^%5`$``&:!
+M^8$`#X?%````#[?"2&G`R`\``$B)PDD#D&@)``!(@WH0`'1GN8````!,B<8/
+MM\%F#[:$,$`(``!F/?\`=!</M\!(:<#(#P``2`.&:`D``$@[0A!T,?_!9H'Y
+M@0!VSKL`````@'I:`'8QO@$````/ML,/MDP0<(GPT^`)12#_PSA:6G?JZQ2(
+M30+KT\9%`O](BT((#[9`#8E%(,9%``$/MD)9B$4!2(M">$B)101(BX*(````
+M2(E%#$B+@I````!(B444BX*@````B44<ZWI(BX?0"```#[?22&G2T````$B)
+MTT@#F$`)``#&10+_QD4``DB+A]`(``!(BX!`"0``#[9$`CN(10%(BX.(````
+M#[9`#8E%(,9%!'8/MW,\2(U]!>A$_O__QD4,9`^W<SY(C7T-Z#/^___&11QR
+M#[9S.4B-?1WHXOW__[@`````Z9H!``#_P6:!^84`#X9R_O__2(N_T`@``$B!
+MQP`4``"Y@`````^WP68/MI0X0`@``&:!^O\`#X11`0``1(G(0?_!.?`/A4,!
+M``!F@?F!``^'P@````^WPDAIP,@/``!(B<)(`Y=H"0``2(-Z$`!T9+F`````
+M#[?!9@^VA#A`"```9CW_`'07#[?`2&G`R`\``$@#AV@)``!(.T(0=#'_P6:!
+M^8$`=LZ[`````(!Z6@!V,;X!````#[;##[9,$'")\-/@"44@_\,X6EIWZNL4
+MB$T"Z]/&10+_2(M""`^V0`V)12#&10`!#[9"68A%`4B+0GA(B44$2(N"B```
+M`$B)10Q(BX*0````2(E%%(N"H````(E%'.ML#[?22&G2T````$B)TT@#GT`)
+M``#&10+_QD4``DB+AT`)```/MD0".XA%`4B+@X@````/MD`-B44@QD4$=@^W
+M<SQ(C7T%Z+S\___&10QD#[=S/DB-?0WHJ_S__\9%''(/MG,Y2(U]'>A:_/__
+MN`````#K%69FD/_!9H'YA0`/AHO^__^X_____UM=PV9F9I!F9F:09F:055-(
+MB=5!N0````"Y`````+JD#```2(GHB`A(_\!(_\IU]KF`````3(N'T`@```^W
+MP69"#[:4`$`(``!F@?K_``^$"@,``$2)R$'_P3GP#X7\`@``9H'Y@0`/AVD"
+M```/M\)(:<#(#P``20.`:`D``$F)P$B#>!``=&ZZ@````$B+C]`(```/M\)F
+M#[:$"$`(``!F/?\`=!</M\!(:<#(#P``2`.!:`D``$D[0!!T-/_"9H'Z@0!V
+MSKH`````08!X6@!V,[X!````#[;"0@^V3`!PB?#3X`E%(/_"03A06G?HZQ2(
+M50+KT,9%`O](BT`(#[9`#8E%(,9%``%!#[9`68A%`4F+0'A(B44$28N`B```
+M`$B)10Q)BX"0````2(E%%$&+@*````")11R[`````$&`N,``````#X8$`@``
+M#[;#2(T,@$B-3,T`2(T$0$C!X`1,`<!(C;#`````#[96"(A1)`^V5@F(425(
+MBX#0````#[8`@^`/B$$F#[9!)(/X`W0R@_@#?PZ#^`(/A.$```#IS0```(/X
+M!&9F9I!F9I!T28/X$@^$BP```&9FD&:0Z:X````/MLM(C01)2,'@!$J+A`#0
+M````#[90`8/B!P^VTL'B"$B-#(D/MD`"`=!KP`J)1,THZ8<````/MM-(C012
+M2,'@!$J+A`#0````@'@"`'4.2(T$DL=$Q2@`````ZV`/ML-(C12`2(T$0$C!
+MX`1*BX0`T`````^V0`*#Z!2)1-4HZSP/MLM(C01)2,'@!$J+A`#0````#[90
+M`L'B"$B-#(D/MD`#`=!KP`J)1,THZP\/ML-(C02`QT3%*``````/ML-(C12`
+M2(U4U0!(C7(L2(T$0$C!X`1,`<!(C8C8````2(N`V````$B)0BQ(BT$(2(E&
+M"$B+01!(B4802(M!&$B)1AC_PT$XF,`````/AWC^___K>DB+A]`(```/M])(
+M:=+0````2(G32`.80`D``,9%`O_&10`"2(N'T`@``$B+@$`)```/MD0".XA%
+M`4B+@X@````/MD`-B44@QD4$=@^W<SQ(C7T%Z%#Y___&10QD#[=S/DB-?0WH
+M/_G__\9%''(/MG,Y2(U]'>CN^/__N`````#I/@,``&9F9I#_P6:!^84`#X;*
+M_/__2(N_T`@``$B!QP`4``"Y@`````^WP68/MI0X0`@``&:!^O\`#X3Q`@``
+M1(G(0?_!.?`/A>,"``!F@?F!``^'90(```^WPDAIP,@/``!)B<!,`X=H"0``
+M28-X$`!T9[J`````#[?"9@^VA#A`"```9CW_`'07#[?`2&G`R`\``$@#AV@)
+M``!).T`0=#3_PF:!^H$`=LZZ`````$&`>%H`=C.^`0````^VPD(/MDP`<(GP
+MT^`)12#_PD$X4%IWZ.L4B%4"Z]#&10+_28M`"`^V0`V)12#&10`!00^V0%F(
+M10%)BT!X2(E%!$F+@(@```!(B44,28N`D````$B)111!BX"@````B44<NP``
+M``!!@+C```````^&^0$```^VPTB-#(!(C4S-`$B-!$!(P>`$3`'`2(VPP```
+M``^V5@B(420/ME8)B%$E2(N`T`````^V`(/@#XA!)@^V022#^`-T,X/X`W\3
+M@_@"#X3D````9F:09I#IRP```(/X!'1,@_@29F:0#X2+````Z;4```!F9I!F
+MD`^VRTB-!$E(P>`$2HN$`-`````/ME`!@^('#[;2P>((2(T,B0^V0`(!T&O`
+M"HE$S2CIB0````^VTTB-!%)(P>`$2HN$`-````"`>`(`=0Y(C022QT3%*```
+M``#K8@^VPTB-%(!(C01`2,'@!$J+A`#0````#[9``H/H%(E$U2CK/@^VRTB-
+M!$E(P>`$2HN$`-`````/ME`"P>((2(T,B0^V0`,!T&O`"HE$S2CK$6:0#[;#
+M2(T$@,=$Q2@`````#[;#2(T4@$B-5-4`2(UR+$B-!$!(P>`$3`'`2(V(V```
+M`$B+@-@```!(B4(L2(M!"$B)1@A(BT$02(E&$$B+01A(B488_\-!.)C`````
+M#X=U_O__ZVP/M])(:=+0````2(G32`.?0`D``,9%`O_&10`"2(N'0`D```^V
+M1`([B$4!2(N#B`````^V0`V)12#&101V#[=S/$B-?07H(?;__\9%#&0/MW,^
+M2(U]#>@0]O__QD4<<@^V<SE(C7T=Z+_U__^X`````.L2_\%F@?F%``^&Z_S_
+M_[C_____6UW#9F:005154T&)]$B)U4&X`````+D`````NJ0,``!(B>AF9I"(
+M"$C_P$C_RG7VN8````!(B[?0"```#[?!9@^VE#!`"```9H'Z_P`/A"D#``!$
+MB<!!_\!$.>`/A1H#``!F@?F!``^'AP(```^WPDAIP,@/``!)B<!,`X9H"0``
+M28-X$`!T:KJ`````2(GQ#[?"9@^VA`A`"```9CW_`'07#[?`2&G`R`\``$@#
+M@6@)``!).T`0=#3_PF:!^H$`=LZZ`````$&`>%H`=C.^`0````^VPD(/MDP`
+M<(GPT^`)12#_PD$X4%IWZ.L4B%4"Z]#&10+_28M`"`^V0`V)12#&10`!00^V
+M0%F(10%)BT!X2(E%!$F+@(@```!(B44,28N`D````$B)111!BX"@````B44<
+M1(EE)+L`````08"XP``````/AB8"```/ML-(C0R`2(U,S0!(C01`2,'@!$P!
+MP$B-L,`````/ME8(B)&H````#[96"8B1J0```$B+@-`````/M@"#X`^(@:H`
+M```/MH&H````@_@#="Z#^`-_#H/X`@^$[0```.G6````@_@$9F:0=$R#^!(/
+MA)0```!F9I!FD.F[````#[;+2(T$24C!X`1*BX0`T`````^V4`&#X@</MM+!
+MX@A(C0R)#[9``@'0:\`*B83-K````.F4````#[;32(T$4DC!X`1*BX0`T```
+M`(!X`@!U$4B-!)+'A,6L`````````.MJ#[;#2(T4@$B-!$!(P>`$2HN$`-``
+M```/MD`"@^@4B835K````.M##[;+2(T$24C!X`1*BX0`T`````^V4`+!X@A(
+MC0R)#[9``P'0:\`*B83-K````.L3D`^VPTB-!(#'A,6L``````````^VPTB-
+M%(!(C535`$B-LK````!(C01`2,'@!$P!P$B-B-@```!(BX#8````2(F"L```
+M`$B+00A(B48(2(M!$$B)1A!(BT$82(E&&/_#03B8P`````^'6O[__^M^2(N'
+MT`@```^WTDAITM````!(B=-(`YA`"0``QD4"_\9%``)(BX?0"```2(N`0`D`
+M``^V1`([B$4!2(N#B`````^V0`V)12#&101V#[=S/$B-?07HFO+__\9%#&0/
+MMW,^2(U]#>B)\O__QD4<<@^V<SE(C7T=Z#CR__]$B64DN`````#I80,``/_!
+M9H'YA0`/AJS\__](B[_0"```2(''`!0``+F`````#[?!9@^VE#A`"```9H'Z
+M_P`/A!@#``!$B<!!_\!$.>`/A0D#``!F@?F!``^'AP(```^WPDAIP,@/``!)
+MB<!,`X=H"0``28-X$`!T9[J`````#[?"9@^VA#A`"```9CW_`'07#[?`2&G`
+MR`\``$@#AV@)``!).T`0=#3_PF:!^H$`=LZZ`````$&`>%H`=C.^`0````^V
+MPD(/MDP`<(GPT^`)12#_PD$X4%IWZ.L4B%4"Z]#&10+_28M`"`^V0`V)12#&
+M10`!00^V0%F(10%)BT!X2(E%!$F+@(@```!(B44,28N`D````$B)111!BX"@
+M````B44<1(EE)+L`````08"XP``````/AAL"```/ML-(C0R`2(U,S0!(C01`
+M2,'@!$P!P$B-L,`````/ME8(B)&H````#[96"8B1J0```$B+@-`````/M@"#
+MX`^(@:H````/MH&H````@_@#=#&#^`-_#H/X`@^$\````.G9````@_@$9F:0
+M9F:0=$R#^!(/A)0```!F9I!FD.F[````#[;+2(T$24C!X`1*BX0`T`````^V
+M4`&#X@</MM+!X@A(C0R)#[9``@'0:\`*B83-K````.F4````#[;32(T$4DC!
+MX`1*BX0`T````(!X`@!U$4B-!)+'A,6L`````````.MJ#[;#2(T4@$B-!$!(
+MP>`$2HN$`-`````/MD`"@^@4B835K````.M##[;+2(T$24C!X`1*BX0`T```
+M``^V4`+!X@A(C0R)#[9``P'0:\`*B83-K````.L3D`^VPTB-!(#'A,6L````
+M``````^VPTB-%(!(C535`$B-LK````!(C01`2,'@!$P!P$B-B-@```!(BX#8
+M````2(F"L````$B+00A(B48(2(M!$$B)1A!(BT$82(E&&/_#03B8P`````^'
+M5_[__^MP#[?22&G2T````$B)TT@#GT`)``#&10+_QD4``DB+AT`)```/MD0"
+M.XA%`4B+@X@````/MD`-B44@QD4$=@^W<SQ(C7T%Z$CO___&10QD#[=S/DB-
+M?0WH-^___\9%''(/MG,Y2(U]'>CF[O__1(EE)+@`````ZQ+_P6:!^84`#X;$
+M_/__N/____];74%<PV9F9I!)B?!,BT]XN0````"Z*````$B)\(@(2/_`2/_*
+M=?9)B[$@"@``N0````"Z``(``$B)\(@(2/_`2/_*=?9(C58VN0````"-00%(
+MF`^V1#@@B`)(_\)(8\$/MD0X((@"2/_"@\$"@_DG?MQ(C584N0````"-00%(
+MF`^V1`<,B`)(_\)(8\$/MD0'#(@"2/_"@\$"@_D3?MQ(C58NN0````"-00%(
+MF`^V1#A(B`)(_\)(8\$/MD0X2(@"2/_"@\$"@_D'?MQ)B7`82(M'4$C_P$F)
+M`$B#?V``=5?V!P%T4DB#?V@`#Y7`387)#Y7"#[;`A<)T%$B+1VA(#[9`6T*`
+MO`A`"```_W4I2(-_<``/E<!-A<D/E<(/ML"%PG1!2(M'<$@/MT!`0H"\"$`(
+M``#_="U(BT=X9H%X,A$G=1?V!P%U$D@/MD<!#[:``````$&(0`SK#P^V1P%!
+MB$`,ZP5!QD`,_P^V1P)!B$`-#[9'7$&(0`Y!QD`2$$'&0!$0#[8'@^`!`<"^
+M_?___T$B<`H)QD&(<`H/M@>#X`'!X`5!#[9("(/AWPG!08A("$@/MT=82,'H
+M!X/@`<'@!H/AOPG!08A("$@/MT=82,'H`H/@`4$/ME`)@^+^"<)!B%`)2`^W
+M1UI(P>@#@^`!P>`'@^%_"<%!B$@(2`^W1UI(T>B#X`$!P(/B_0G"08A0"4@/
+MMT=82,'H`X/@`<'@!H/BOPG"08A0"4@/MT=:2,'H!(/@`<'@!X/B?PG"08A0
+M"8/)$$&(2`@/M@?0Z(/@`8/F_@G&08AP"@^V!X/@!(/F^PG&08AP"F9!QT`4
+M`!`/MH?,````08A`(,-F9F:09F:09F:09F:0QT($`````,<"`````+@`````
+MPV9F9I!F9I!F9I!F9I!(@^PX2(E<)`A(B6PD$$R)9"083(EL)"!,B70D*$R)
+M?"0P2(G[08GU0;______2(MO8$R+=WA(A>UT%8"_RP````!U#/8'`G0/9F9F
+MD&9FD$2)^.D-`0``3(GW9F:09I#H`````$F)Q$2)^$V%Y`^$\0```$'&1"0X
+MX4'&1"0Y`4&`_0(/E<"#P!I!B$0D.D'&1"0D@`^W13!F08E$)"!)B5PD*$''
+M1"0T`````$G'1"1(`````$G'A"2@`````````$R)YDR)]^@`````QH/+````
+M`6;'@\@```#Z`$B%VW1<2(-[8`!T569F9I!F9I!F@;O(````E@!U%4B+4V!(
+MBWI(OB$```#H`````&9FD&;_B\@```"_T`<``.@`````3(GWZ`````!(A=MT
+M$$B#>V``=`F`N\L`````=;)F@[O(`````'0/08!\)"0`N`````!$#T3X3(GF
+M3(GWZ`````!$B?A(BUPD"$B+;"003(MD)!A,BVPD($R+="0H3(M\)#!(@\0X
+MPV9F9I!F9F:02(/L2$B)7"082(EL)"!,B60D*$R);"0P3(ET)#A,B7PD0$B)
+M^T&)]D&______TR+9V!,BV]X387D=`F`O\L`````=`Q$B?CI9`0``&9F9I!,
+MB>_H`````$B)Q42)^$B%[0^$200``/8#`@^%`0$``$&`_A1W#$$/MO9K]@QF
+M9I#K&F9!#[;&9FG`B0!FP>@(P.@$#[;P@<;P````QD4XX<9%.0'&13H<0(AU
+M.\9%)(!!#[=$)#!FB44@2(E=*,=%-`````!(QT5(`````$C'A:``````````
+M2(GN3(GOZ`````#&@\L````!9L>#R````,0)2(7;=%9(@WM@`'1/D&:!N\@`
+M``"6`'452(M38$B+>DB^(0```.@`````9F:09O^+R````+_0!P``Z`````!,
+MB>_H`````$B%VW002(-[8`!T"8"[RP````!ULF:#N\@`````#X1$`P``@'TD
+M``^%.@,``$&_`````.DO`P``3(GOZ`````!(B40D$$B%P`^$&0,``$B-15A(
+MB40D"$B+1"002(M`$$B)!"3&13@:QD4Y",9%.AK&13L`QD4\$,9%/0!(BT0D
+M$$B)17C&122`00^W1"0P9HE%($B)72A(BT0D$$B+0!!(B45(QT4T$````$B+
+M0V!(!>0```!(B450QD4P($C'A:``````````O@````!(BWPD".@`````BU4T
+M2(M$)!!(BW`82(M\)`CH`````$B)[DR)[^@`````QH/+`````6;'@\@```#Z
+M`$B%VW122(-[8`!T2V:!N\@```"6`'422(M38$B+>DB^(0```.@`````9O^+
+MR````+_0!P``Z`````!,B>_H`````$B%VW002(-[8`!T"8"[RP````!UM6:#
+MN\@`````=`:`?20`=!)(C70D$$R)[^@`````Z>8!``!(B>Y,B>_H`````$R)
+M[^@`````2(G%2(7`=15(C70D$$R)[^@`````1(GXZ<8!``!(C5!82(E4)`A(
+MBSPD2(/'!$B+%"1(#[9"`P^V1!`$B$($QD<!"L9'`@"Y`````+H$````2(L$
+M)(@(2/_`2/_*=?9%A/9U!H!G`_SK-T$/MO9I]E@"``"`3P,#B?'!Z1B(3P2)
+M\L'J$(A7!8GPP>@(B$<&0(AW!XA/"(A7"8A'"D"(=PM(BT0D$$B)17C&13@5
+M#[8'P/@']]"#P!&(13G&13H`QD4[`,9%/!#&13T`@"<_QD4D@$$/MT0D,&:)
+M12!(B5TH2(M$)!!(BT`02(E%2,=%-!````!(BT-@2`7D````2(E%4,9%,"!(
+MQX6@`````````+X`````2(M\)`CH`````(M5-$B+1"002(MP&$B+?"0(Z```
+M``!(B>Y,B>_H`````,:#RP````%FQX/(````^@!(A=MT4DB#>V``=$MF@;O(
+M````E@!U$DB+4V!(BWI(OB$```#H`````&;_B\@```"_T`<``.@`````3(GO
+MZ`````!(A=MT$$B#>V``=`F`N\L`````=;5F@[O(`````'0-@'TD`+@`````
+M1`]$^$B-="003(GOZ`````!F9I!F9I!(B>Y,B>_H`````$2)^&:02(M<)!A(
+MBVPD($R+9"0H3(ML)#!,BW0D.$R+?"1`2(/$2,-F9F:09F:09F:09F:02(/L
+M*$B)7"0(2(EL)!!,B60D&$R);"0@2(G[08GUN/____],BV=X2(MO8/9'6`@/
+MA(,```!)B[0DT`@``$B)^K\%````Z`````"`340"2(M]2$B)ZKXA````Z```
+M``"`?7L`=!B_T`<``.@`````3(GGZ`````"`?7L`=>A%A>UT#F:#2UH09H--
+M8A#K#&:09H-C6N]F@V5B[TF+M"30"```2(G:OP8```#H`````(!E1/VX````
+M`$B+7"0(2(ML)!!,BV0D&$R+;"0@2(/$*,-F9F:09F9FD&9F9I!F9I!(@^P8
+M2(E<)`A(B6PD$(GU2(M/>$B+7V#V!P%T.TB#>U``=!%`#[;6#[9S>4B+>U#H
+M`````$B#NQ@!````="U`#[;5#[:S!0$``$B+NQ@!``#H`````.L40`^VUDB+
+M0S@/MG`!2(G/Z`````!(BUPD"$B+;"002(/$&,-F9I!FD$B#[#A(B5PD"$B)
+M;"003(ED)!A,B6PD($R)="0H3(E\)#!(B?M!B?9!B=?'1"0$_____TR+9V!,
+MBV]X387D=`F`O\L`````=`F+1"0$Z1,!``!,B>_H`````$B)Q8M$)`1(A>T/
+MA/L```#&13CAQD4Y`46$]G0-08#_`1G`]]"#P`?K"T&`_P$9P/?0@\`-B$4Z
+MQD4D@$$/MT0D,&:)12!(B5THQT4T`````$C'14@`````2,>%H`````````!(
+MB>Y,B>_H`````,:#RP````%FQX/(````]`%(A=MT5$B#>V``=$UF@;O(````
+ME@!U$DB+4V!(BWI(OB$```#H`````&;_B\@```"_T`<``.@`````3(GOZ```
+M``!(A=MT$DB#>V``=`N`N\L`````9I!ULV:#N\@`````=!J`?20`=11(BT-@
+M#[=`8F:)0UK'1"0$`````$B)[DR)[^@`````BT0D!$B+7"0(2(ML)!!,BV0D
+M&$R+;"0@3(MT)"A,BWPD,$B#Q#C#9F9FD&9F9I!(@^P(#[8&@_@)#X>"````
+MB<#_),4`````9F9FD&9FD$B+?@C&A^\3````Z`````"X`````.M@#[96"+X`
+M````Z"O^___K4`^V5@B^`0```.@;_O__ZT`/MG8(Z`````#K-0^V5@D/MG8(
+MZ*'\__^0ZR4/MG8(Z`````!F9I!FD.L5#[9V".@`````N`````#K!;C_____
+M2(/$",-F9F:02(M'8$B%P'132,=`.`````"`2$0$2,='8`````!(QT=P````
+M`$C'1V@`````@W\(/W\52(M7>$AC1PA(QX3"0`0```````##2(M7>$AC1PA(
+MQX3"0`(```````#SPV:02(M'8$B%P'132,=`.`````"`8$3[2,='8`````!(
+MQT=P`````$C'1V@`````@W\(/W\52(M7>$AC1PA(QX3"0`0```````##2(M7
+M>$AC1PA(QX3"0`(```````#SPV:04TB)^^@`````2(N[T`@``$B!QP`4``#H
+M`````%O#9I!32(G[Z`````!(B[O0"```2(''`!0``.@`````6\-FD$%50515
+M4TB#[%A)B?Q,BZ_0"```28'%`!0``$B#/P!T%DB+-TB![@```@!(B3=(BW\@
+MZ`````!)@WPD$`!T$4F+="0028M\)"#H`````&:028-\)!@`=`])BW0D&$F+
+M?"0@Z`````!!#[=\)#Q(C40D5DB)1"0X2(U$)%1(B40D,$B-1"122(E$)"A(
+MC40D4$B)1"0@2(U$)$Y(B40D&$B-1"1-2(E$)!!(C40D3$B)1"0(2(U$)$I(
+MB00D3(U,)$E,C40D1DB-3"1%2(U4)$1(C70D0^@`````28.\)!@)````="M)
+MB[0D&`D``$F-O"3X"```Z`````!)B[48"0``28V]^`@``.@`````9F:028.\
+M)$`)````="A)B[0D0`D``$F-O"0@"0``Z`````!)B[5`"0``28V](`D``.@`
+M````28.\)&@)````="A)B[0D:`D``$F-O"1("0``Z`````!)B[5H"0``28V]
+M2`D``.@`````28.\).`*````="])B[0DX`H``$F-O"3`"@``Z`````!)B[7@
+M"@``28V]P`H``.@`````9F9FD&9FD+T`````0#IL)$-S.V9F9I")Z`^VV$F+
+MM-PP"P``28V\)!`+``#H`````$F+M-TP"P``28V]$`L``.@`````_\5`.FPD
+M0W+)28.\),`/````="Y)B[0DP`\``$F-O"2@#P``Z`````!)B[7`#P``28V]
+MH`\``.@`````9F:09F:028.\)/@/````="A)B[0D^`\``$F-O"38#P``Z```
+M``!)B[7X#P``28V]V`\``.@`````28.\)&@0````="A)B[0D:!```$F-O"1(
+M$```Z`````!)B[5H$```28V]2!```.@`````28.\))`)````="])B[0DD`D`
+M`$F-O"1P"0``Z`````!)B[60"0``28V]<`D``.@`````9F9FD&9FD$F#O"1H
+M"@```'0H28NT)&@*``!)C;PD2`H``.@`````28NU:`H``$F-O4@*``#H````
+M`$F#O"3X"0```'0H28NT)/@)``!)C;PDV`D``.@`````28NU^`D``$F-O=@)
+M``#H`````$F#O"0@"@```'0O28NT)"`*``!)C;PD``H``.@`````28NU(`H`
+M`$F-O0`*``#H`````&9F9I!F9I!)@[PDN`H```!T*$F+M"2X"@``28V\))@*
+M``#H`````$F+M;@*``!)C;V8"@``Z`````!)@[PD"`L```!T*$F+M"0("P``
+M28V\).@*``#H`````$F+M0@+``!)C;WH"@``Z`````!)@[PD4`\```!T+TF+
+MM"10#P``28V\)#`/``#H`````$F+M5`/``!)C;TP#P``Z`````!F9F:09F:0
+M28.\)(@/````="A)B[0DB`\``$F-O"1H#P``Z`````!)B[6(#P``28V]:`\`
+M`.@`````28.\)#`0````="A)B[0D,!```$F-O"00$```Z`````!)B[4P$```
+M28V]$!```.@`````28.\))`*````="])B[0DD`H``$F-O"1P"@``Z`````!)
+MB[60"@``28V]<`H``.@`````9F9FD&9FD$F#O"20$````'0W28N4))@0``!)
+MB[0DD!```$F-O"1P$```Z`````!)BY68$```28NUD!```$F-O7`0``#H````
+M`$F#O"3`$````'0W28N4),@0``!)B[0DP!```$F-O"2@$```Z`````!)BY7(
+M$```28NUP!```$F-O:`0``#H`````$F#O"3P$````'0W28N4)/@0``!)B[0D
+M\!```$F-O"30$```Z`````!)BY7X$```28NU\!```$F-O=`0``#H`````$F#
+MO"10$0```'0W28N4)%@1``!)B[0D4!$``$F-O"0P$0``Z`````!)BY58$0``
+M28NU4!$``$F-O3`1``#H`````$F#O"0@$0```'0]28N4)"@1``!)B[0D(!$`
+M`$F-O"0`$0``Z`````!)BY4H$0``28NU(!$``$F-O0`1``#H`````&9FD&9F
+MD$F#O"2`$0```'0W28N4)(@1``!)B[0D@!$``$F-O"1@$0``Z`````!)BY6(
+M$0``28NU@!$``$F-O6`1``#H`````$F#O"2P$0```'0W28N4)+@1``!)B[0D
+ML!$``$F-O"20$0``Z`````!)BY6X$0``28NUL!$``$F-O9`1``#H`````$B#
+MQ%A;74%<05W#D$B#[!A(B5PD"$R)9"002(G[Z`````!,C:,`%```3(GGZ```
+M``!(B=_H`````+_0!P``Z`````!(B=_H`````$B)W^@`````O@$```!(B=_H
+M`````+X!````3(GGZ`````!(BUPD"$R+9"002(/$&,-(@^P(2,?'`````.@`
+M````N`````!(@\0(PY"0D)"0D,8'",9'`1)`@/X!&<#WT(/@!(A'`L9'`P#&
+M1P0`QD<%`,9'!@#&1P<`QD<(`,9'"0#&1PH`QD<+`(#Z`1G`@^`@B$<,QD<-
+M`,9'#@#&1P\`QD<0`,9'$0#&1Q(`QD<3`+@4````PV9F9I!F9I!F9I!(@^PX
+M2(E<)`A(B6PD$$R)9"083(EL)"!,B70D*$R)?"0P28G_2(GU08G608G-Z```
+M``!)B<2X`````$V%Y`^$HP```$F+7"0000^VU4$/MO9(C7L$Z`````!!B<7&
+M`P#&0P$`QD,"`,9#`P!(B>Y,B?_H`````+D`````NA````!(C44XB`A(_\!(
+M_\IU]D&-103&13@5QD4Y$8A%/,9%/0!(C5U81`^VZ$2);33'A90`````````
+M28M$)!!(B45(3(EE>+X`````2(G?Z`````!)BW0D&$2)ZDB)W^@`````N`$`
+M``!(BUPD"$B+;"003(MD)!A,BVPD($R+="0H3(M\)#!(@\0XPY"0D)"0D$&)
+M\&:)=PC&1PX`9L='#```O@````!F1#G&<QYF9F:0#[?.2(L71(G`9BGP_\AF
+MB01*_\9F1#G&<N;SPV9F9I!!B?!FB7<(QD<.`6;'1PP``+D`````9CGQ<Q=F
+M9I!FD`^WT4B+!V:)#%#_P69$.<%R[O/#9F9FD&9F9I!F9F:0@'\.`74J#[='
+M#`^WR$B+%__`9HE'#`^W%$IF.T<*<@9FQT<,``!F_T\(#[?"PV:09O]/"$@/
+MMU<(2(L'#[<$4,-F9F:09F9FD&9F9I!F9I!(@^P(@'\.`74J#[=7#`^W1PB)
+M1"0$C00"#[=7"HD4))GW/"1(8])(BP]FB3119O]'".L02`^W5PA(BP=FB310
+M9O]'"$B#Q`C#9F9FD&9FD&:#?P@`#Y3`#[;`PY"0D)"X`````$@Y/W012(L'
+M2(M("$B+$$B)2@A(B1'SPV9FD+@`````2#D_=!)(BT<(2(M("$B+$$B)2@A(
+MB1'SPV:02(MW8$0/MD=8N0````"ZJ````$B)^(@(2/_`2/_*=?9(B7=@1(A'
+M6,-F9F:09F:02(/L"`^V1@&(1P$/MD8"B$<"BT8$B4<$2(M'"$@/ME<!2(T4
+M4DC!X@)(BW8(2(G'Z`````!(@\0(PV9FD&9FD+D`````.-%S(V9F9I!F9I`/
+MM@<Z!G0)N`````##9F:02/_'2/_&_\$XT7+DN`$```##9F9FD&9F9I!F9I!F
+M9I#&1P$`0(AW`L='!`````##08G12`^V1P%(C01`2(M7"$R-!(+^1P%$`4\$
+MN0````"Z#````$R)P(@(2/_`2/_*=?9)B3!%B$@(1(G(P>@(08A`"42)RL'J
+M$(/B/T$/MD`*@^#`"=!!B$`*PV9FD&:0#[9'`3H'#Y+`#[;`PV9FD+G_````
+MN@`"``!(B?AF9I"("$C_P$C_RG7V\\-F9F:0N``````/M\B`?(\"_W419HDT
+MCXA4CP+K#V9F9I!F9I#_P&:#^']VW0^WP,-F9F:008G1B?!$#[?`0H!\AP+_
+M=0]F1HD,AT*(3(<"#[?`PY`/MM%!#[?QZ``````/M\##N``````/M\@X5(\"
+M=1-F.32/=0W&1(\"_V;'!(___^L(_\!F@_A_=MP/M\##9F:0N0`````/M\$X
+M5(<"=09F.32'=`C_P6:#^7]VZ6:!^8``N(`!```/1,@/M\'#9F:0#[9/.(#Y
+M"`^5P(#Y*`^5P@^VP(7"=#Z`^:AT.8#YB'0T@/D*#Y7`@/DJ#Y7"#[;`A<)T
+M(8#YJG0<@/F*=!>`^2\/E<"`^8\/E<(/ML"%P@^%S0$```^V1SB#^"\/A*X`
+M``"#^"]_.8/X"G1[@_@*D'\.@_@(='#IA@$``&9F9I"#^"@/A(<```"#^"IF
+M9F:0#X1Z````Z6<!``!F9I!FD#V/````#X3=````/8\```!_'CV(````#X3+
+M````/8H````/A,````#I-0$``&9FD#VH````=&P]J@```&9F9I!T8>D;`0``
+M#[9'.8/@'\'@$`^V5SK!X@@)T`^V5SL)T(G"#[9//.D%`0``9F:09I`/ME<Z
+MP>(8#[9'.\'@$`G"#[9'/,'@"`G"#[9'/0G"B=(/MD\_P>$(#[9'0`G!Z<T`
+M```/ME<ZP>(8#[9'.\'@$`G"#[9'/,'@"`G"#[9'/0G"B=(/MD\^P>$8#[9'
+M/\'@$`G!#[9'0,'@"`G!#[9'00G!Z8@```!(#[97.DC!XCA(#[9'.TC!X#!(
+M"<)(#[9'/$C!X"A("<)(#[9'/4C!X"!("<)(#[9'/DC!X!A("<)(#[9'/TC!
+MX!!("<)(#[9'0$C!X`A("<)(#[9'04@)P@^V3T+!X1@/MD=#P>`0"<$/MD=$
+MP>`("<$/MD=%"<'K#KH`````N0````!F9F:02(F7B````(F/D````&:#3R(!
+M\\-F9F:09F9FD&9F9I!32(/L8$B)^T0/MD\[1`^V1SH/MD\Y#[97.`^V1T>)
+M1"18#[9'1HE$)%`/MD=%B40D2`^V1T2)1"1`#[9'0XE$)#@/MD="B40D,`^V
+M1T&)1"0H#[9'0(E$)"`/MD<_B40D&`^V1SZ)1"00#[9'/8E$)`@/MD<\B00D
+M2(G^2,?'`````+@`````Z``````/MW,@2,?'`````+@`````Z`````!(@\1@
+M6\-F9F:09F9FD+K_____N0````!F.?%S(4G'P``````/M\$/M@0X,=`/ML#!
+MZ@A!,Q2`_\%F.?%RYHG0PY"0D)"0D)"0D)"0D)!(BP>+D`0!``")%0````")
+MT8'A?O_^_TB+!XF(!`$``(G1@>%^__+_2(M'"(D(2(M'"(E(#$B+1PB)2!!(
+MBT<(B4@42(M'"(E(&$B+1PB)2`1(BP>+@%0!``")!0````")P8'A_@#__TB+
+M!XF(5`$``,-F9F:09F9FD&9FD&9FD%532(/L"(GS2(LO@_X#=AB-!-W@____
+MBX0HH`$``(D%`````(G!ZQB-!-T`````B<"+A"B``0``B04`````B<&#X?Z#
+M^P-V$(T$W>#___^)C"B@`0``ZQ"-!-T`````B<")C"B``0``A-(/A*````"#
+M^P-V&(T$G?#___^+A"C@`0``B04`````B<'K&(T$G0````")P(N$*-`!``")
+M!0````")P8/)`H/[`W80C02=\/___XF,*.`!``#K$(T$G0````")P(F,*-`!
+M``"-!)T`````C7#PB<)F9F:09F:0@_L#=A&+A"[@`0``B04`````B<'K#XN$
+M*M`!``")!0````")P?;!`G76Z94```"0@_L#=A2-!-W@____QX0H4`(`````
+M``#K%(T$W0````")P,>$*%`"````````OQ`G``#H`````(/[`W88C03=X/__
+M_XN$*%0"``")!0````")P>L8C03=`````(G`BX0H5`(``(D%`````(G!@\D!
+M@_L#=A"-!-W@____B8PH5`(``.L0C03=`````(G`B8PH5`(``$B#Q`A;7<-F
+M9I!FD$%6055!5%5328G\08GU08G62(LONP````"`?SX`#X1.`@``1(GJ#[;"
+MB=E(T_BH`0^$*P(``(/[`W88C03=X/___XN$**0!``")!0````")PNL8C03=
+M`````(G`BX0HA`$``(D%`````(G"@^+^@_L#=A"-!-W@____B90HI`$``.L0
+MC03=`````(G`B90HA`$``+\0)P``Z`````!%A/8/A)H```"#^P-V&(T$G?#_
+M__^+A"C@`0``B04`````B<+K&(T$G0````")P(N$*-`!``")!0````")PH/*
+M`H/[`W80C02=\/___XF4*.`!``#K$(T$G0````")P(F4*-`!``"-!)T`````
+MC7#PB<&0@_L#=A&+A"[@`0``B04`````B<+K#XN$*=`!``")!0````")PO;"
+M`G76Z94```"0@_L#=A2-!-W@____QX0H4`(```````#K%(T$W0````")P,>$
+M*%`"````````OQ`G``#H`````(/[`W88C03=X/___XN$*%0"``")!0````")
+MPNL8C03=`````(G`BX0H5`(``(D%`````(G"@\H!@_L#=A"-!-W@____B90H
+M5`(``.L0C03=`````(G`B90H5`(``(/[`W87C03=X/___\>$**`!```!````
+MZQ=F9I"-!-T`````B<#'A"B``0```0```(/[`W88C03=X/___XN$**0!``")
+M!0````")PNL8C03=`````(G`BX0HA`$``(D%`````(G"@\H!@_L#=A"-!-W@
+M____B90HI`$``.L0C03=`````(G`B90HA`$``/_#00^V1"0^.=@/A[+]__];
+M74%<05U!7L-F9I!F9I")\4B+!XN`!`$``(D%`````$&)P`^W1SQF/8!D#Y3"
+M9CV`D0^4P`G0J`%U"&:!?SR`E'42#[;)@\$(N`$```#3X$$)P.L10`^VSH/!
+M#+@!````T^!!"<!(BP=$B8`$`0``PV9F9I!F9F:09F:09F:0B?%(BP>+@`0!
+M``")!0````!!B<`/MT<\9CV`9`^4PF8]@)$/E,`)T*@!=0AF@7\\@)1U$@^V
+MR8/!"+C^____T\!!(<#K$4`/MLZ#P0RX_O___]/`02'`2(L'1(F`!`$``,-F
+M9F:09F9FD&9FD&9FD$B#[!A(B5PD"$R)9"0028G\0`^VWHG>Z`````"_$"<`
+M`.@`````B=Y,B>?H`````$B+7"0(3(MD)!!(@\08PY")\4"`_O]T>$"`_A]W
+M-HN7&`$``(D5`````+@!````T^")P??0(=")AQ@!``"+AU@!``")!0`````A
+MR'1#B8=8`0``PXN7'`$``(D5`````$`/MLZ#Z2"X`0```-/@B<'WT"'0B8<<
+M`0``BX=@`0``B04`````(<AT!HF'8`$``//#9F9FD&9F9I!F9I!F9I!!5%53
+M2(G5B?-,BR=`@/X#=AY(C03=`````"7X!P``0L>$(``"```,`0``ZQQF9I!(
+MC03=`````"7X!P``0L>$(``"```,`0``OQ`G``#H`````(#[`W8X2(T,W0``
+M``"!X?@'```/ME4#P>(8#[9%`L'@$`G"#[9%`<'@"`G"#[9%``G"0HF4(00"
+M``#K-I!(C0S=`````('A^`<```^V50/!XA@/MD4"P>`0"<(/MD4!P>`("<(/
+MMD4`"<)"B90A!`(``(#[`W8;2(T$W0`````E^`<``$+'A"```@``$`$``.L9
+M2(T$W0`````E^`<``$+'A"```@``$`$``+\0)P``Z`````"`^P-V-TB-#-T`
+M````@>'X!P``#[95!\'B&`^V10;!X!`)P@^V107!X`@)P@^V100)PD*)E"$$
+M`@``ZS5(C0S=`````('A^`<```^V50?!XA@/MD4&P>`0"<(/MD4%P>`("<(/
+MMD4$"<)"B90A!`(``%M=05S#D)!32(/L8$B)^P^W?SQ(C40D7DB)1"0X2(U$
+M)%Q(B40D,$B-1"1:2(E$)"A(C40D6$B)1"0@2(U$)%9(B40D&$B-1"152(E$
+M)!!(C40D5$B)1"0(2(U$)%)(B00D3(U,)%%,C40D3DB-3"1-2(U4)$Q(C70D
+M2^@`````#[94)$L/MG0D3$B-?"1$Z`````!(#[94)$M(:=*(`0``2(MS($B-
+MN_@(``"Y`0```.@`````2`^V5"1-2&G2T````$B+<R!(C;L@"0``N0$```#H
+M`````$@/ME0D3$AITL@/``!(BW,@2(V[2`D``+D!````Z`````!(#[=4)%9(
+MP>(#2(MS($B-NW`)``"Y`0```.@`````2`^W5"1.2&G2J````$B+<R!(C;M(
+M"@``N0$```#H`````$@/ME0D44@/MT0D3D@/K]!(C1122,'B`DB+<R!(C;O8
+M"0``N0$```#H`````$B+<R!(C;L`"@``N0$```"Z``(``.@`````#[9,)$M(
+MBW,@2(V[$`L``+H`"```Z`````!(#[94)%1(P>(%2(MS($B-NY@*``"Y`0``
+M`.@`````2`^V5"152(T4DDC!X@5(BW,@2(V[P`H``+D!````Z`````!(#[=4
+M)%)(C1222,'B`TB+<R!(C;OH"@``N0$```#H`````$@/MU0D5D@!TDB+<R!(
+MC;LP#P``N0$```#H`````$@/ME0D2T@!TDB+<R!(C;MH#P``N0$```#H````
+M`$@/ME0D34@!TDB+<R!(C;N@#P``N0$```#H`````$@/ME0D3$@!TDB+<R!(
+MC;O8#P``N0$```#H`````$@/ME,^2`'22(MS($B-NQ`0``"Y`0```.@`````
+M2`^W5"182(T44DC!X@1(BW,@2(V[<`H``+D!````Z`````"+5"1$2(MS($B-
+MNT@0``"Y`0```.@`````2`^W5"162,'B!DB+<R!(C;MP$```0;@!````N4``
+M``#H`````$B+<R!(C;N@$```0;@!````N0`!``"Z`!D``.@`````2`^W5"16
+M2&G2L`0``$B+<R!(C;O0$```0;@!````N8````#H`````$@/MU0D7$C!X@)(
+MBW,@2(V[`!$``$&X`0```+D$````Z`````!(#[=4)%Y(P>("2(MS($B-NS`1
+M``!!N`$```"Y!````.@`````#[94)%3!X@M(BW,@2(V[8!$``$&X`0```+D(
+M````Z`````!(#[=4)%)(:=*,`0``2(MS($B!PY`1``!!N`$```"Y"````$B)
+MW^@`````N`````!(@\1@6\-F9I!FD$%6055!5%532(/L8$F)_$&^`````,9'
+M40#&1U``QD=/`$C'A_@3````````QH?Q$P```+D`````NJ`!``!(C8=`$@``
+MB`A(_\!(_\IU]DF-A"3H````28F$).@```!)B80D\````$F-A"3X````28F$
+M)/@```!)B80D``$``$F-A"0(`0``28F$)`@!``!)B80D$`$``$F-A"08`0``
+M28F$)!@!``!)B80D(`$``$F-A"0H`0``28F$)"@!``!)B80D,`$``$F-A"1(
+M`0``28F$)$@!``!)B80D4`$``$F-A"18`0``28F$)%@!``!)B80D8`$``$F-
+MA"0X`0``28F$)#@!``!)B80D0`$``$$/MWPD/$B-1"1>2(E$)#A(C40D7$B)
+M1"0P2(U$)%I(B40D*$B-1"182(E$)"!(C40D5DB)1"082(U$)%5(B40D$$B-
+M1"142(E$)`A(C40D4DB)!"1,C4PD44R-1"1.2(U,)$U(C50D3$B-="1+Z```
+M```/MD0D2T&(1"1&#[9$)$Q!B$0D1P^V1"1-08B$).$````/MT0D5F9!B40D
+M6(M$)%QF08F$)#P2```/MT0D7O_(9D&)A"0^$@``00^W1"0\/8"1``!T"SV`
+ME```#X4C"0``0<9$)$T$0<9$)$,$0<9$)$Y`0<9$)$P`0<:$)-X````)0<9$
+M)$0`28V\)/@(``#H`````$F)A"08"0``N0````!(#[94)$M(:=*(`0``ZPB(
+M"$C_RDC_P$B%TG7S28V\)"`)``#H`````$F)A"1`"0``N0````!(#[94)$U(
+M:=+0````2(72=`J("$C_P$C_RG7V28V\)$@)``#H`````$F)A"1H"0``N0``
+M``!(#[94)$Q(:=+(#P``2(72=`J("$C_P$C_RG7V28V\)'`)``#H`````$F)
+MA"20"0``N0````!(#[=4)%9(P>(#=`J("$C_P$C_RG7V28V\)``*``#H````
+M`$F)A"0@"@``28V\)-@)``#H`````$F)A"3X"0``2(G#28V\)$@*``#H````
+M`$F)A"1H"@``2(G"O0````!F.VPD3G-$28V,)`@!``!(B5I@#[9$)%&(0EA(
+MBT$(2(E1"$B)"DB)0@A(B1!(#[9$)%%(C01`2(T<@TB!PJ@```#_Q68[;"1.
+M<L1)C;PD<`H``.@`````28F$))`*``!(B<*]`````&8[;"18<RM)C8PD&`$`
+M`,9"$`!(BT$(2(E1"$B)"DB)0@A(B1!(@\(P_\5F.VPD6'+=28V\))@*``#H
+M`````$F)A"2X"@``2(G"O0````"`?"14`'0K28V,)"@!``!(BT$(2(E1"$B)
+M"DB)0@A(B1!(@\(@_\5F#[9$)%1F.>AWW4F-O"3`"@``Z`````!)B80DX`H`
+M`$B)PKT`````@'PD50!T+DF-C"1(`0``2(M!"$B)40A(B0I(B4((2(D02('"
+MH````/_%9@^V1"159CGH=]I)C;PDZ`H``.@`````28F$)`@+``!(B<*]````
+M`&8[;"12<R=)C8PD.`$``$B+00A(B5$(2(D*2(E""$B)$$B#PBC_Q68[;"12
+M<N&]`````(!\)$L`=#]-C:PD6`$```^WW4F-O"00"P``Z`````!)B83<,`L`
+M`$F+50A)B44(3(DH2(E0"$B)`O_%9@^V1"1+9CGH=\E)C;PD,`\``.@`````
+M28F$)%`/``!)B80D6`\```^W1"169D&)A"1B#P``#[?P28V\)%@/``#H````
+M`$F-O"1H#P``Z`````!)B80DB`\``$F)A"20#P``9@^V1"1+9D&)A"2:#P``
+M#[?P28V\))`/``#H`````$F-O"2@#P``Z`````!)B80DP`\``$F)A"3(#P``
+M9@^V1"1-9D&)A"32#P``#[?P28V\),@/``#H`````$F-O"38#P``Z`````!)
+MB80D^`\``$F)A"0`$```9@^V1"1,9D&)A"0*$```#[?P28V\)``0``#H````
+M`$F-O"00$```Z`````!)B80D,!```$F)A"0X$```9D$/MD0D/F9!B80D0A``
+M`$$/MG0D/DF-O"0X$```Z`````!)C;PD2!```.@`````28F$)&@0``!(#[94
+M)$Q(C132B=;!Y@>!QF!7``"Y`````(GR2(72=`J("$C_P$C_RG7V28N$)&@0
+M``"),$F+E"1H$```#[9$)$R(0@0/ME0D3$F+O"1H$```Z`````"]`````$&`
+M?"0^`'1]#[?%2&G`J````$P!X$R-L*`!``!!B&X(0<9&"0!,B:"@`0``0<9&
+M#@!!QD98`$'&1B@`0<>&H`````````!(C9#0`0``28E6,$F)5CA(C9#H`0``
+M28E62$F)5E!(!0`"``!)B49@28E&:$'&1@H"_\5F00^V1"0^9CGH=X-!QD0D
+M3`"]``````^WQ4+&A"#&"```___%9H/]`W;LO0````"`?"1+``^$D`````^W
+MS4F+E"08"0``2&G!B`$``,9$$$,!28N4)!@)``#&1!!"`$F+E"08"0``QD00
+M>/])BY0D&`D``,9$$&K_28N4)!@)``!FQX00P```````2<>$S$`$````````
+M2(G!20.,)!@)``!(C5$@2(E1($D#A"08"0``2(/`($B)0`C_Q68/MD0D2V8Y
+MZ`^'</___V9!QX0DW```````O0````!F9I!F9I`/M\5"QH0@0`@``/__Q6:!
+M_84`=NN]`````(!\)$P`#X3"````#[?528N$)&@)``!(:=+(#P``QD0"6`!)
+MBX0D:`D``,9$`ED`28N$)&@)``!(QT0"$`````!(B=%)`XPD:`D``$B-01A(
+MB4$82(G020.$)&@)``!(@\`82(E`"$B)T4D#C"1H"0``2(U!*$B)02A(B=!)
+M`X0D:`D``$B#P"A(B4`(28N$)&@)``!,B70""$B)T4D#C"1H"0``2(U!2$B)
+M04A)`Y0D:`D``$B#PDA(B5((_\5F#[9$)$QF.>@/AS[___]!QH0DWP```("]
+M`````(!\)$T`#X2'````#[?528N$)$`)``!(:=+0````9L=$`DX$`$F+A"1`
+M"0``QD0"0@!)BX0D0`D``,9$`D3_28N$)$`)``#&1`)0_TB)T4D#C"1`"0``
+M2(U!*$B)02A(B=!)`X0D0`D``$B#P"A(B4`(28N$)$`)``!,B;0"B````/_%
+M9@^V1"1-9CGH#X=Y____0<:$).````""28VT))@0``!)C;PD<!```.@`````
+M28F$))`0``!)C;0DR!```$F-O"2@$```Z`````!)B80DP!```$F-M"3X$```
+M28V\)-`0``#H`````$F)A"3P$```28VT)"@1``!)C;PD`!$``.@`````28F$
+M)"`1``!)C;0D6!$``$F-O"0P$0``Z`````!)B80D4!$``$F-M"2($0``28V\
+M)&`1``#H`````$F)A"2`$0``38NT)(@1``!)B<6]`````(!\)%0`=$A)C9PD
+M*`$``$B)W^@`````2(G"3(EH$$R)<!A(BT,(2(E3"$B)&DB)0@A(B1!)@<4`
+M"```28'&``@``/_%9@^V1"149CGH=\!)C;0DN!$``$F-O"20$0``Z`````!)
+MB80DL!$``$V+M"2X$0``28G%O0````!F.VPD4G-$28V<)#@!``!(B=_H````
+M`$B)PDR):!!,B7`82(M#"$B)4PA(B1I(B4((2(D028'%C`$``$F!QHP!``#_
+MQ68[;"12<L1(@\1@6UU!7$%=05[#9F9FD&9F9I!F9I!F9I!!5T%6055!5%53
+M2(/L"$F)_,9$)`<`2`^V1"0'0@^VE"#&"```@/K_#X2;````#[;"2&G`J```
+M`$Z-M""@`0``0;T`````08!^#@!V?$F-;F!-B?=(B>_H`````$B)PTB+10A(
+MB5T(2(DK2(E#"$B)&$B#>S@`=!I(BU,X28NT)-`(``"_!0```.@`````@$M$
+M`DB)VKX"````3(GWZ`````"`>WL`=!A,B>?H`````+\!````Z`````"`>WL`
+M=>A!_\5%.&\.=XO^1"0'@'PD!P,/AC[___],B>?H`````$B#Q`A;74%<05U!
+M7D%?PY!(@^P(2#E^*'5F#[9..(#Y"`^5P(#Y*`^5P@^VP(7"=&B`^:AT8X#Y
+MB'1>@/D*#Y7`@/DJ#Y7"#[;`A<)T2X#YJG1&@/F*=$%(C9?H````2(N'Z```
+M`$B)<`A(B09(B58(2(FWZ````.L?9F:09F:02(V'Z````$B+4`A(B7`(2(D&
+M2(E6"$B),N@`````2(/$",-F9F:09F:09F:09F:02(/L".@`````2(/$",-F
+MD$%455-(B?-(B=5!O`````!F@7XXX0%U"P^V1CJ#Z!$\`78R2(L72(NR&`D`
+M`$R-IGB&`0!F@7L@A0!W&4@/MT,@2`^VA!!`"```2&G`B`$``$R-)`;&100%
+M@&4%_H!E`-^Z`````&:!>SCA`742#[9#.O_(/`&X`0````]&T&:0B=#!X`</
+MME4`@^)_"<*(50`/MH.6````@^`!P>`&@^*_"<*(50!F@7LXX0%U$@^V0SJ#
+MZ!$\`7<'9HE-".L<D/:#E@````%T#DR)Y^@`````9HE%".L$9HE-"`^W10B(
+M0R5F@7LXX0%U+@^V0SK_R#P!=PP/ME,[ZS%F9I!F9I!F@7LXX0%U$`^V0SJ#
+MZ!&Z#P```#P!=A.Z`````$F#?"18`'0&00^V5"1Y@^(/#[9%`(/@\`G0B$4`
+M6UU!7,.02(/L"$B+/^@`````2(/$",-F9F:09F9FD&9F9I!F9I!,BP</MX<X
+M$@``_\!FB8<X$@``9CN'/!(``'()9L>'.!(`````2`^WCS@2``!(BY<@$0``
+MBP:)!(H/MX<X$@``08F`+`$``,-F9F:09F9FD$&)T4&X`````+H$````2(G(
+M1(@`2/_`2/_*=?6)\H'B_P\``(L!)0#P__\)T(D!#[97#<'B#"7_#_#_"=")
+M`4@/MD<*2-'H@^`!@_@!&<"#X`+_P,'@'8L1@>+___\?"<*)$0^V00.#R!"#
+MX/>(00/V1PH!=!1$B<J#XG_!XA2+`27__P_X"=")`?/#9F9FD$B#[#A(B5PD
+M"$B);"003(ED)!A,B6PD($R)="0H3(E\)#!)B?Q(B?-)B==!O@`````/MD8X
+M/`@/E,(\*`^4P`G0J`%U#(!^.*AT!H!^.(AU#X.+E`````KK+69FD&9FD`^V
+M1C@\"@^4PCPJ#Y3`"="H`74,@'XXJG0&@'XXBG4'@XN4`````F:!>SCA`74A
+M#[9#.H/H$3P!=Q:#BY0````(N`````#I104``&9FD&:0BT,X)?___P`]X0$0
+M``^%(`$``&:!>R"%``^'H0```$@/MT,@0H"\($`(``#_#X2-````9H-[(']W
+M)$H/MH0@0`@``$F+E"08"0``2&G`B`$``$B+1!!(1`^V:`CK:&:!>R"!`'<I
+M2`^W0R!*#[:$($`(``!)BY0D:`D``$AIP,@/``!(BT00"$0/MF@(ZS=(#[=#
+M($H/MH0@0`@``$F+E"1`"0``2&G`T````$B+A!"(````1`^V:`CK"V9FD&:0
+M0;W_____1(GJ#[;"2@^VK"#&"```2&GMJ````$J-K"6@`0``28N4)&@)``!(
+MC8(XN`\`9H%[((4`=QE(#[=#($H/MH0@0`@``$AIP,@/``!(C00"]D!=$`^%
+M@@$``,9#)`1!QP<`````N`$```#I#00``&:!>R"%``^'H0```$@/MT,@0H"\
+M($`(``#_#X2-````9H-[(']W)DH/MH0@0`@``$F+E"08"0``2&G`B`$``$B+
+M1!!(1`^V:`CK:&:09H%[(($`=RE(#[=#($H/MH0@0`@``$F+E"1H"0``2&G`
+MR`\``$B+1!`(1`^V:`CK-4@/MT,@2@^VA"!`"```28N4)$`)``!(:<#0````
+M2(N$$(@```!$#[9H".L)9F:00;W_____NO\```!F@7L@A0!W#T@/MT,@9D(/
+MMI0@0`@``$2)Z0^VP4H/MJP@Q@@``$AI[:@```!*C:PEH`$```^WPDAIP(@!
+M``!)B<9-`[0D&`D``&:!>SCA`74*#[9#.O_(/`%V*6:!^O\`=`=!]D9#!'4;
+MQD,D!D''!P````"X`0```.G6`@``9F:09F:020^V1D"H`70GJ`1T(T$/MD0D
+M1$$Z1"1.<A9!QP<!````N`$```#II0(``&9FD&:0387V#X37````20^V1D"H
+M`0^$R@```*@$#X3"````2(G>3(GWZ`````"$P'45QD,D!$''!P````"X`0``
+M`.E>`@``08!^>Q]V$4''!P$```"X`0```.E&`@``]H.6`````70&]D4,`70;
+M]H.6`````74&]D4,`74,@'LD@70&]D4,"'0A00^V]4R)Y^@`````A,!T$4''
+M!P$```"X`0```.G[`0``]H.6`````0^$;@$``/9%#`$/A&0!``!,B??H````
+M`&:#^!\/AE(!``!!QP<!````N`$```#IP0$``)#V10H"="N+0S@E____`#WA
+M`1``=!Q!#[9&>T$Z1GIR$4''!P$```"X`0```.F/`0``BT,X)?___P`]X0$0
+M``^$_````$D/MT9B2(G"2-'J@^(!N0$```"`>SCA#X7?````@'LY`0^%U0``
+M``^V0SJ#Z`:#^`D/AZT```")P/\DQ0`````/MLFZ`0```$B)WDR)Y^@`````
+MA,`/A:$```!!QP<"````N`$```#I$`$```^VR;H`````2(G>3(GGZ`````"$
+MP'5Y0<<'`@```+@!````Z>@````/MM*Y`0```$B)WDR)Y^@`````A,!U44''
+M!P(```"X`0```.G`````#[;2N0````!(B=Y,B>?H`````(3`=2E!QP<"````
+MN`$```#IF````,9#)`1!QP<`````N`$```#I@P```&9FD$F-O"18#P``Z```
+M``"$P'0/0<<'`0```+@!````ZV&0@'LXX751@'LY`75+@'LZ#W5%@'L]`74_
+M9@^V<SS!Y@AF#[9#.P'&#[?V3(GGZ`````!(.4-H#Y7"2(7`#Y3`"="H`702
+MQD,D!$''!P````"X`0```.L)N`````!F9F:02(M<)`A(BVPD$$R+9"083(ML
+M)"!,BW0D*$R+?"0P2(/$.,-F9F:09F:09F:09F:0N0````"Z#0```$B)\&9F
+MD(@(2/_`2/_*=?8/MD<YB`8/MD<ZB$8!#[9'.XA&`@^V1SR(1@,/MD<]B$8$
+M#[9'/HA&!0^V1S^(1@;VAY8````$=",/MD=`B$8(#[9'08A&"0^V1T*(1@H/
+MMD=#B$8+#[9'1(A&#+@!````PV9F9I"Z`````$&Y`````&9FD&:0N0<```!)
+M8\%$#[8$,&9FD`'21(G`T_BH`705]\(````!=1V!\G<GVP#K%69FD&:0B=`U
+M=R?;`/?"`````0]%T/_)><Q!_\%!@_D'?K.)T,'H$(@'B=#!Z`B(1P&(5P+#
+M05=!5D%505154TB#[%A)B?Y(B?5(BX?P$```2(E$)"!(QT0D$`````!!O```
+M``!(QT0D"`````!!O0````!FQT8R_P](C50D/.@`````A,!T"8M$)#SID`P`
+M`(M%."7___\`/>$!$``/A1(!``"_B!,``.@`````9H%]((4`#X><````2`^W
+M12!"@+PP0`@``/\/A(@```!F@WT@?W<B2@^VA#!`"```28N6&`D``$AIP(@!
+M``!(BT002`^V0`CK9&:!?2"!`'<G2`^W12!*#[:$,$`(``!)BY9H"0``2&G`
+MR`\``$B+1!`(#[9`".LU2`^W12!*#[:$,$`(``!)BY9`"0``2&G`T````$B+
+MA!"(````#[9`".L+9F:09F:0N/____\/ML!*#[:$,,8(``!(:="H````2HV,
+M,J`!``!(B4PD&$F+EF@)``!,C:(XN`\`9H%]((4`#X>8`0``2`^W12!*#[:$
+M,$`(``!(:<#(#P``3(TD`NEZ`0``9F:0N?\```!F@7T@A0!W#T@/MT4@9D(/
+MMHPP0`@``&:!?3CA`74/#[9%.H/H$3P!#X;?````9H%]((4`#X>6````2`^W
+M12!"@+PP0`@``/\/A((```!F@WT@?W<B2@^VA#!`"```28N6&`D``$AIP(@!
+M``!(BT002`^V0`CK7F:!?2"!`'<G2`^W12!*#[:$,$`(``!)BY9H"0``2&G`
+MR`\``$B+1!`(#[9`".LO2`^W12!*#[:$,$`(``!)BY9`"0``2&G`T````$B+
+MA!"(````#[9`".L%N/____\/ML!*#[:$,,8(``!(:=BH````2HV$,Z`!``!(
+MB40D&`^WP4AIP(@!``!)`X88"0``2(E$)!#K(@^WP4AIP-````!)`X9`"0``
+M2(E$)`A(BY"(````2(E4)!AF@7TXX0%U&P^V13J-4.^`^@$/E\+_R#P!#Y?`
+M#[;2A=!T(&:!^?\`=`M(BTPD$/9!0P1U#L9%)`:X`````.GT"0``2(UT)#!,
+MB??H`````$&)QV:)13),B??H`````$B)P[@"````2(7;#X3'"0``2(F=@```
+M`$$/M\](:<FP!```2`-,)"!(B<A)*X;P$```2(G&20.V^!```$B#QB!(BT0D
+M,(EP($B)\DC!ZB!(BT0D,(E0)$B+<QA(BT0D,(EP*$B)\DC!ZB!(BT0D,(E0
+M+$B+1"0P9D2)>`B^`````+JP!```2(G(9F9FD$"(,$C_P$C_RG7U9H%]..$!
+M=6H/MD4Z@^@1/`%W7TB-3"1`2(M$)#`/ME`(2(GN2(M\)!#H`````$$/M\=(
+M:<"P!```2`-$)"!)*X;P$```2(G&20.V^!```$B!QB`$``!(BT0D,(EP$$B)
+M\DC!ZB!(BT0D,(E0%.F8`0``2(M$)!CV0`H!=2V+13@E____`#WA`1``#X0%
+M`0``2(M4)!!(#[9"0*@!#X3S````J`0/A.L```#VA98````@=`](C70D0$B)
+M[^@`````ZQM(C4PD0$B+1"0P#[90"$B)[DB+?"00Z`````!!#[?'2&G`L`0`
+M`$@#1"0@22N&\!```$B)QDD#MO@0``!(@<8@!```2(M$)#")<!!(B?)(P>H@
+M2(M$)#")4!1F@7TXX0%U#P^V13J#Z!$\`0^&UP```$B+3"002`^V04"H`@^$
+MQ0```*@$#X2]````J`$/A+4```!!#[?'2&G`L`0``$@#1"0@22N&\!```$B)
+MQDD#MO@0``!(BT0D,(EP&$B)\DC!ZB!(BT0D,(E0'.M[9F:09F:02(M$)!CV
+M0`H"=&I!#[?'2&G`L`0``$@#1"0@2(G"22N6\!```$B)UDD#MO@0``!(BU0D
+M,(ER&$B)\4C!Z2!(BU0D,(E*'$DKAO`0``!(B<9)`[;X$```2('&(`0``$B+
+M1"0PB7`02(GR2,'J($B+1"0PB5`42(M$)#"`2`$"9@^V55E(BT0D,&:)4`*_
+M`````(!]60!T+8GX2(T$0$C!X`)(B<9(`W,02(M-8$B+%`A(B1:+1`@(B48(
+M_\</MD59.?AWTXM5-$B+1"0PB5`,9H%]..$!=5$/MD4Z@^@1/`%W1D$/M\](
+MBU0D,$B)[DB+?"08Z`````!(C4PD0$$/M]=(:=*P!```2`-4)"!(B>Y(BWPD
+M&.@`````2(M4)!B`8@S^Z6,%``!(BTPD&/9!"@(/A-T$``!(BT0D,,9`!OY(
+MBT0D,(!@!_Y(@WPD$``/A.T```!(BUPD$$@/MD-`J`(/A-L```"H!`^$TP``
+M`*@!#X3+````00^WSTB+5"0P2(GN2(M\)!CH`````/:%E@````%T$$B+1"0P
+M#[=`",'@`XA$)$%(C4PD0$$/M]=(:=*P!```2`-4)"!(B>Y(BWPD&.@`````
+M]H66`````70+2(M$)!B`2`P!ZPE(BU0D&(!B#/Y!#[?/2&G)L`0``$B+7"0@
+MQ@09H4B+1"00#[:0X@```(/B#P^V1!D!@^#P"="(1!D!2(M4)!`/MT(P_\`/
+MMM#!X@@/ML0)T&:)1!D"3(ML)!!)@<7,````Z:X#``!F@7TXX0$/A7@"```/
+MMD4Z@_@/=`Z#^!`/A.(```#IBP,``&8/ME4\P>((9@^V13L!PDB+1"0PQD`$
+M#4B+1"0P@&`%_H!,)"\(2(MT)#`/MD4E00^VCMX```#3X&8)1@A(BTPD,`^V
+M00&#X!^#R""(00%!#[?/2&G)L`0``$B+7"0@2(TT&4B+13Y(B88X!```#[;"
+MP>`(#[;6"<)FB9091`0```^V13V(A!E"!```Q@:12(M4)!`/MT(P_\`/MM#!
+MX@@/ML0)T&:)1!D"2(M<)!`/MI/B````@^(/2(M<)"`/MD09`8/@\`G0B$09
+M`4R+;"0028'%S````.FN`@``2(M4)#`/MD4E00^VCMX```#3X&8)0@A!#[?7
+M2&G2L`0``$B+1"0@Q@0"@6;'1`("__]!#[:,)+L```"#X0](BUPD(`^V1!H!
+M@^#P"<B(1!H!2(-]2`!U#L9%)"&X`````.D#!```]D4[`70]2(-]4`!T-DR+
+M;5!!#[??2&G;L`0``$F+OF@0``!,B>[H`````(/@#TB+3"0@#[94"P&#XO`)
+MPHA4"P'K`TV)Y;X$````2(M52`^V0@$]DP```'=VB<#_),4`````@\8$ZVB#
+MQ@3K8X/&".M>@\8(9F:0ZU:#Q@CK48/&".M,@\8(D.M&@\8(ZT&#QACK/(/&
+M&)#K-H/&#.LQ@\8(ZRP/MG($C32U"````.L?@<:(````D.L6@\8DZQ&#QB3K
+M#(/&))#K!H'&B````(U6`\'J`DB+1"0PB%`$2(M,)#!FP>H(@^(!#[9!!8/@
+M_@G0B$$%00^W_TAI_[`$``!(BUPD($B-O!\@!```B?)(BW5(Z`````#I*@$`
+M``^V13B#Z`0]JP```'<_B<#_),4`````#[9%0,'@"`^V54&-#!"#^0UW&+@!
+M````2-/@J=@^``!T"4B+1"0P@$@!!$B+1"0P@$@!`>L)2(M$)#"`8`'[2(M$
+M)##&0`0-2(M$)#"`8`7^2(M4)#`/MD4E00^VCMX```#3X&8)0@A(BT0D,(!@
+M`1]!#[??2&G;L`0``$B+1"0@QH0#(`0```9,BVPD$$F!Q<P```!,C20#28V\
+M)"$$``!,B>[H`````$F-O"0E!```3(GNZ`````!(BT4X28F$)$0$``!(BT5`
+M28F$)$P$``!!Q@0DD4B+3"00#[:1X@```(/B#TB+3"0@#[9$"P&#X/`)T(A$
+M"P%(BU0D$`^W0C#_P`^VT,'B"`^VQ`G09HE$"P)-A>T/A)(```!!#[?'2&G`
+ML`0``$F+50!(BTPD($B)5`@$ZW=(BUPD&/9#"@%T;$$/M\](BU0D,$B)[DB)
+MW^@`````]H66`````7002(M$)#`/MT`(P>`#B$0D04B-3"1`00^WUTAITK`$
+M``!(`U0D($B)[DB+?"08Z`````#VA98````!=`M(BT0D&(!(#`'K"4B+5"08
+M@&(,_D$/M]=)BX:0"0``2(DLT$2)^F;!Z@4/M])$B?F#X1^X`0```$C3X$$)
+MA):8"0``BT4X)?___P`]X0$0`'4O00^W]TB-3"0LN@````!(BWPD&.@`````
+MBT0D+"7___\?#0```$")1"0LZ:$```!F@7TXX0%U-@^V13J#Z!$\`7<K2(MT
+M)`A,B??H`````$B+3"0(#[914$$/M_=(C4PD+$B+?"08Z`````#K8TB+="00
+M3(GWZ`````!(BUPD$`^V4VI!#[?W2(U,)"Q(BWPD&.@`````2`^V0T"H`G0Q
+MJ`1T+:@!9I!T)XM$)"PE____'PT```!@B40D+`^V4VJ#XG_!XA0E__\/^`G0
+MB40D+$B-="0L3(GWZ`````"X`P```$B#Q%A;74%<05U!7D%?PV9FD&9FD$B#
+M["!(B5PD"$B);"003(ED)!B)\DB+'XGP9L'H!0^WZ(M$JUQ!B=1!@^0?1(GA
+M2-/XJ`%U.@^W]DB-3"0$N@````#H`````(%,)`0```#@2(UT)`2`9@/W2(G?
+MZ`````"X`0```$2)X4C3X`E$JUQ(BUPD"$B+;"003(MD)!A(@\0@PV9F9I!F
+M9F:09F9FD$B#["A(B5PD"$B);"003(ED)!A,B6PD($F)_$B)]4B+1G!,BV@H
+M9H%^((4`#X>N````2`^W1B"`O#A`"```_P^$FP```&:#?B!_=RE(#[:$.$`(
+M``!(BY<8"0``2&G`B`$``$B+1!!(2`^V0`A(!<`(``#K<&:!?B"!`'<N2`^W
+M1B!(#[:$.$`(``!(BY=H"0``2&G`R`\``$B+1!`(2`^V0`A(!<`(``#K.D@/
+MMT8@2`^VA#A`"```2(N70`D``$AIP-````!(BX00B````$@/MD`(2`7`"```
+MZPEF9F:0N+\)``!)#[9<!`9(:=NH````2HV<(Z`!``!(@WUX`'0/2(MU>$R)
+MY^@`````9F:02(GN3(GGZ`````!,B>Y(B=]!_Y6@````2(M<)`A(BVPD$$R+
+M9"083(ML)"!(@\0HPV9F9I!F9F:09F9FD&9FD$B#[#A(B5PD"$B);"003(ED
+M)!A,B6PD($R)="0H3(E\)#!)B?9)B?U,BS](C5](2(G?Z`````!)B<1)@^PX
+M3(G_Z`````!(B<5)C40D.$B+4PA(B4,(28E<)#A(B5`(2(D"N`$```!(A>UT
+M>4B-?5C&13CAQD4Y`<9%.A"`33L!28N&H````$B)16A(BT5P3(EP*$F-AI``
+M``!(B450QD4ES&9!#[9$)%MFB44@28M%`$B)12C'1320````3(EU2$C'A:``
+M````````O@````#H`````$B)[DR)_^@`````N`````!(BUPD"$B+;"003(MD
+M)!A,BVPD($R+="0H3(M\)#!(@\0XPV9F9I!F9F:02(/L*$B)'"1(B6PD"$R)
+M9"003(EL)!A,B70D($B)\TB)_4R+;TA-BV4`#[=.,HG.9L'N!0^WQD&+1(1<
+M@^$?2-/XJ`$/A68#``!)BQ0D#[?&C02%``,``(F"<`$``$F+!"2+@'0!``")
+M!0````")PL9#)"&+0S@E____`#WA`0\`=2*^`````$B)W^@`````N@````!(
+MB=Y,B>?H`````.D+`P``B=`/MTLR@^$?2-/XJ`%T&[X!````2(G?Z`````!,
+MB>?H`````&9FD&9FD`^VA>````"#^`0/A]`"``")P/\DQ0````#&A>`````!
+MN@$```!(B=Y,B>_H`````.FK`@``QH7@`````KH(````2(G>3(GOZ`````#I
+MCP(``,:%X`````-(B>J^(0```$R)[^@`````2(-]4`!T(`^V57E(BW500;@`
+M````N0$```!,B>_H`````.E1`@``00^V=0VZ`````$R)Y^@`````Z3H"``#&
+MA>`````$2(-]4`!T,$B)ZKXA````3(GOZ``````/ME5Y2(MU4$&X`````+D"
+M````3(GOZ`````#I_`$``+H`````OB$```!,B>_H`````$$/MG4-N@$```!,
+MB>?H`````.G3`0``2(GJO@8```!,B>_H`````$B#?3@`=!9(BT4XBT@$C5$!
+MB5`$@_D%#X:F`0``QD5#`<9%0@"`?7L`=!A,B>?H`````+\!````Z`````"`
+M?7L`=>A(@WU0`'082(M5&$B+11!(B5`(2(D"2(M%4/Y(6.L92(-]6`!T$DB+
+M55A(#[9%>4C'1,)8`````$B+50A(BT4`2(E0"$B)`D'^30Y(@[T8`0```'08
+M#[:U!0$``$B+O1@!``"Z`0```.@`````2(-]4`!T$@^V=7E(BWU0N@$```#H
+M`````$B#?3@`#X2"````2(M%.$C'0&``````0?Z$).\3``!,B>?H`````$B+
+M13@/MG`!N@$```!,B>?H`````$B+13@/ME`"#[9P`4C'QP````"X`````.@`
+M````2(M5.$F+M"30"```OP$```#H`````$B+53A)B[0DT`@``+\&````Z```
+M``!(QT4X`````$B)[DR)Y^@`````08!]"?]T6T&^`````$&`?0X`=CE)C5U@
+M2(G?Z`````!(B<5(BT,(2(EK"$B)70!(B44(2(DH@'U"_W4+0?_&13AU#G?3
+MZP9%.'4.=Q5!QD4)_TR)[DR)Y^@`````9F:09I!(BQPD2(ML)`A,BV0D$$R+
+M;"083(MT)"!(@\0HPV9FD$B#[#A(B5PD"$B);"003(ED)!A,B6PD($R)="0H
+M3(E\)#!(B?-(B?U,BV=(38LL)$&_`````$'V1"0,$'0'QH?@````!@^VA>``
+M``"#^`$/A(L```"#^`%_"X7`=!YFD.G[`P``@_@$#X2B````@_@&#X3Y`0``
+MZ>0#``#&A>`````!2(GN3(GOZ`````#&0R2!08!,)`P(2(.[@`````!T#TB-
+MLX````!,B>_H`````$F-E>@```!)BX7H````2(E8"$B)`TB)4PA)B9WH````
+M3(GOZ`````#I@@,``&:008!D)`SW_H7C````QH7@`````,9#)`)(B=Y,B>_H
+M`````$R)[^@`````Z5$#``"0QH7C`````$B#?3@`#X1.`0``2(M%.(M(!(U1
+M`8E0!(/Y!0^'.`$``$&`9"0,]TB#NX``````=`](C;.`````3(GOZ`````!)
+MC97H````28N%Z````$B)6`A(B0-(B5,(28F=Z````$&`3"0,$$B#?5``="`/
+MME5Y2(MU4$&X`````+D"````3(GGZ`````#IO`(``,9$)`<`08!\)`X`#X:G
+M````38UT)&!F9I!F9I!,B??H`````$B)PTF+1@A)B5X(3(DS2(E#"$B)&$B#
+M>S@`=!Q(BU,X28NUT`@``+\%````Z`````"`2T0"9F:02(G:O@8```!,B>?H
+M`````(![>P!T,D2)^$'_QSU_EI@`=R5,B>_H`````+\!````Z`````"`>WL`
+M=`U$B?A!_\<]?Y:8`';;_D0D!P^V1"0'03A$)`X/AV3____&14(#2(GN3(GO
+MZ`````#I\`$``$F-E>@```!)BX7H````2(E8"$B)`TB)4PA)B9WH````2(-]
+M.`!T%DB+13B+2`2-40&)4`2#^04/AI8!``!(Q\<`````N`````#H`````$B)
+MZKX&````3(GGZ`````!!_DPD#DB+50A(BT4`2(E0"$B)`DB#?5``=!A(BT50
+M_DA82(M5&$B+11!(B5`(2(D"ZQ](@WU8`'082(M56$@/MD5Y2,=$PE@`````
+M9F:09F:0@'U[`'0R1(GX0?_'/7^6F`!W)4R)[^@`````OP$```#H`````(!]
+M>P!T#42)^$'_QSU_EI@`=MM(BU4(2(M%`$B)4`A(B0)(@[T8`0```'0?#[:U
+M!0$``$B+O1@!``"Z`0```.@`````9F9FD&9FD$B#?5``=!D/MG5Y2(M]4+H!
+M````Z`````!F9F:09F:02(-].`!T?TB+13A(QT!@`````$'^A>\3``!,B>_H
+M`````$B+13@/MG`!N@$```!,B>_H`````$B+13@/ME`"#[9P`4C'QP````"X
+M`````.@`````2(M5.$F+M=`(``"_`0```.@`````2(M5.$F+M=`(``"_!@``
+M`.@`````2,=%.`````!(B>Y,B>_H`````.L02(GJO@(```!,B>?H`````$R)
+M[^@`````9F:09I!(BUPD"$B+;"003(MD)!A,BVPD($R+="0H3(M\)#!(@\0X
+MPV9F9I!F9I!F9I!F9I!!5D%505154TB)\TF)_$R+KX@```!)BVT`0?9%#!!T
+M!,9'409!#[9$)%&#^`$/A(D```"#^`%_#87`="!F9F:0Z7L#``"#^`0/A)H`
+M``"#^`4/A)<!``#I9`,``$'&1"11`4R)YDB)[^@`````QD,D@4&`30P(2(.[
+M@`````!T#TB-LX````!(B>_H`````$B-E>@```!(BX7H````2(E8"$B)`TB)
+M4PA(B9WH````2(GOZ`````#I!`,``$&`90SW0?Y$)%)!QD0D40#&0R0"2(G>
+M2(GOZ`````!(B>_H`````.G8`@``08!E#/=(@[N``````'0/2(VS@````$B)
+M[^@`````2(V%Z````$B+E>@```!(B5H(2(D32(E#"$B)G>@```"Z`````+X&
+M````3(GOZ`````!!#[9U#;H!````2(GOZ`````!!O@````!!@'T.``^&?```
+M`$V-96"03(GGZ`````!(B<-)BT0D"$F)7"0(3(DC2(E#"$B)&$B#>S@`=!I(
+MBU,X2(NUT`@``+\%````Z`````"`2T0"D$B)VKX&````3(GOZ`````"`>WL`
+M=!A(B>_H`````+\!````Z`````"`>WL`=>A!_\9%.'4.=XE!QD4)`$&`30P0
+M3(GOZ`````#IT@$``$&`90SW2(.[@`````!T#TB-LX````!(B>_H`````$B-
+MA>@```!(BY7H````2(E:"$B)$TB)0PA(B9WH````28U%8$B)PDDY16`/A.$`
+M``!)B<9(B=?H`````$B)PTB#>#@`=!Y(BU`X2(NUT`@``+\%````Z`````"`
+M2T0"9F:09I!(B=J^!@```$R)[^@`````@'M[`'082(GOZ`````"_`0```.@`
+M````@'M[`'7H2(-[.`!T84B+0SA(QT!@`````/Z%[Q,``$B)[^@`````2(M#
+M.`^V<`&Z`0```$B)[^@`````2(M3.$B+M=`(``"_`0```.@`````2(M3.$B+
+MM=`(``"_!@```.@`````2,=#.`````!(B=Y(B>_H`````$R)\DTY=6`/A2+_
+M__^Z`````+X&````3(GOZ`````!,B>9(B>_H`````$G'14``````2(M%`(N0
+M6`$``(D5`````(72=`I(BT4`B9!8`0``0?9%"@%T6$&^`````(!]0P!V&TD/
+MME4-2(G01(GQ2-/XJ`%U"4'_QD0X=4-WZD$/MO9(B>_H`````$R)[DB)[^@`
+M````1(GR#[;"2&O`:$C'A"A($@```````&9F9I!;74%<05U!7L-F9F:09F:0
+M05=!5D%505154TB#[`A)B?Q,BW=(28L>2(G^2(G?Z`````!!@+PDXP````%V
+M"4'&A"3@````!$F-;"0@23EL)"`/A#D"``!(B>_H`````$F)QTF+1"0@3(EX
+M"$F)!TF);PA-B7PD($&]`````.G6`0``00^WU4B+@Y`)``!(BRS02(7M#X2[
+M`0``00^W1"0P9CM%(`^%JP$```^WBSH2``!(BX-0$0``.0AT5&9F9I#_P0^W
+M@SX2```YR+@`````#T;(C5$!2(N#4!$``(L$D*D```@`=1XE_P\``&9!.<5U
+M$TDY[W492(G?Z`````"0Z8L!``!(BX-0$0``.0AUL$&`?E@`#X4Z`0``9H%]
+M((4`#X<N`0``2`^W12"`O!A`"```_P^$&P$``$V%Y`^$``$``$D/MD0D0*@!
+M#X3R````J`0/A.H```!(BQ,/MT4R9L'H!0^WP(T$A0`#``")@G`!``!(BP,/
+MMTTR@^$?N@$```!(B=9(T^:)L'0!``!(#[=-,DB+@Y`)``!(QP3(``````^W
+M33*)R&;!Z`4/M\"#X1](B=9(T^9(B?'WT2&,@Y@)```/MTTRB<AFP>@%#[?`
+M@^$?2-/B]](A5(-<3#G]=$E(BU4(2(M%`$B)4`A(B0)(@[V``````'0/2(VU
+M@````$B)W^@`````2(V3Z````$B+@^@```!(B6@(2(E%`$B)50A(B:OH````
+M#[=U,DB-NU@/``#H`````$'^3"1[ZQ)!]D8*`G0+2(GN3(GGZ`````!!_\5F
+M1#EK6`^''_[__TV%Y'0H20^V1"1`J`%T'J@$=!I)BU<(28L'2(E0"$B)`DR)
+M_DR)Y^@`````D$B#Q`A;74%<05U!7D%?PY!!5D%505154TF)_$R+MX@```!)
+MBQY(B?Y(B=_H`````$&`?"12`78&0<9$)%$$28UL)"A).6PD*`^$\@$``$B)
+M[^@`````28G%28M$)"A,B6@(28E%`$F);0A-B6PD*+T`````Z9L!``!F9F:0
+M9F:0#[?52(N#D`D``$B+--!(A?8/A'L!``!!#[=$)$!F.T8@#X5K`0``#[>+
+M.A(``$B+@U`1```Y"'179F9FD&9FD/_!#[>#/A(``#G(N``````/1LB-40%(
+MBX-0$0``BP20J0``"`!U'B7_#P``9CG%=11).?5U&DB)W^@`````9I#I.P$`
+M`$B+@U`1```Y"'6P9H%^((4`#X?V````2`^W1B"`O!A`"```_P^$XP```$&`
+M?E@`#X78````0?9&"@$/A,T```!(BQ,/MT8R9L'H!0^WP(T$A0`#``")@G`!
+M``!(BP,/MTXR@^$?N@$```!(B==(T^>)N'0!``!(#[=.,DB+@Y`)``!(QP3(
+M``````^W3C*)R&;!Z`4/M\"#X1](B==(T^=(B?GWT2&,@Y@)```/MTXRB<AF
+MP>@%#[?`@^$?2-/B]](A5(-<3#GN="Y(BU8(2(L&2(E0"$B)`DB-D^@```!(
+MBX/H````2(EP"$B)!DB)5@A(B;/H````#[=V,DB-NU@/``#H`````$'^3"1%
+M_\5F.6M8#X=B_O__0?9&"@%T&TF+50A)BT4`2(E0"$B)`DR)[DR)Y^@`````
+MD%M=05Q!74%>PV9F9I!F9I!!5T%6055!5%532(/L"$B)_4&^`````$B-A^@`
+M``!(B<)(.8?H````#X33`0``28G'28G%28G42(G7Z`````!(B<-(@WAP`'4O
+M2(GOZ`````!(B4-P2(7`=1Y(BX7H````2(E8"$B)`TR)8PA(B9WH````Z8D!
+M``"+0S@E____`#WA`1``#X3L````9H%[((``#X3@````9@^V0R!FB4,@9H/X
+M?W8:9H%[..$!=2D/MD,Z@^@1/`%W'F9F9I!F9I!F@7L@A0!W#T@/MT,@@+PH
+M0`@``/]U&<9#)`9(B=Y(B>_H`````.D&`0``9F:09I!F@7LXX0%U"P^V0SJ#
+MZ!$\`78O2(N5&`D``$R-LGB&`0!F@7L@A0!W&4@/MT,@2`^VA"A`"```2&G`
+MB`$``$R--`)F@7LXX0%U"@^V0SK_R#P!=C-F@7L@@`!T*V:!>SCA`74+#[9#
+M.H/H$3P!=AA!]D9#!'41QD,D!DB)WDB)[^@`````ZWI(B=Y(B>_H`````(/X
+M`G<+@_@!<R9F9F:0ZQ"#^`-T3V9FD&9FD&9FD.M/2(G>2(GOZ`````!F9I#K
+M/TB#NX``````=`](C;.`````2(GOZ`````!(BX7H````2(E8"$B)`TR)>PA(
+MB9WH````ZQM(B=Y(B>_H`````$R)ZDPYK>@````/A3/^__](@\0(6UU!7$%=
+M05Y!7\-!5T%6055!5%532(/L2$F)_4"(="0P2`^V5"0P2&O2:$@!^DR+LD@2
+M``!(Q\#^____B?%(T\`B@FD2``"(1"0O3(L_QT0D*`````!`@/X#=@U!QX=P
+M`0``Q`$``.L+0<>'<`$``*@!``!!BX=T`0``B04`````#[9,)#"#X0.[!P``
+M`-/CB<4)W4&)KW0!``"_Z`,``.@`````]],AW4&)KW0!``"`?"0P`W8@#[9$
+M)#!(P>`")?P#``!"BX0XT`$``(D%`````(G%ZQX/MD0D,$C!X`(E_`,``$*+
+MA#C0`0``B04`````B<6#S0B`?"0P`W88#[9$)#!(P>`")?P#``!"B:PXT`$`
+M`.L6#[9$)#!(P>`")?P#``!"B:PXT`$``(!\)#`#=AP/MD0D,$C!X`,E^`<`
+M`$+'A#@``@``.````.L:#[9$)#!(P>`#)?@'``!"QX0X``(``#@```"_$"<`
+M`.@`````@'PD,`-V'`^V1"0P2,'@`R7X!P``0L>$.`0"````````ZQH/MD0D
+M,$C!X`,E^`<``$+'A#@$`@```````$V%]@^$[@<``$&\`````$&`?4,`=BUF
+M9F:020^V1@U!#[;,2-/XJ`%T$+H!````B<Y,B>_H`````)!!_\1%.&5#=]=!
+M]D8*`71B3(GV3(GOZ``````/MG0D,$R)[^@`````2`^V1"0P2&O`:$J-E"A@
+M$@``BT(,J0``$`!T""7__^__B4(,3(GV3(GOZ`````!(#[9$)#!(:\!H2L>$
+M*$@2````````Z4L'``!!@'Y8`'0328N]:!```$R)]N@`````0?Y.6(!\)"\`
+M#X2I`@``2,=$)"``````QD0D'P`/MG0D,$R)[^@`````2`^V1"0P2&O`:$J-
+ME"A@$@``BT(,J0``$`!T""7__^__B4(,#[9$)"]!B$8-0;P`````08!]0P`/
+MAI,!``!(#[94)"](B50D$`^VR(E,)`Q!#[;,2(M$)!!(T_BH`0^$8`$``$2)
+MX@^VPDAKP&@/ME0D+T*(E"AI$@``08#\`W87C03-`````$B80L>$.``"```X
+M````ZQE*C03E`````"7X!P``0L>$.``"```X````OQ`G``#H`````$&`_`-V
+M&TJ-!.4`````)?@'``"+3"0,0HF,.`0"``#K&4J-!.4`````)?@'``"+5"0,
+M0HF4.`0"``!!@/P#=@U!QX=P`0``Q`$``.L+0<>'<`$``*@!``!!BX=T`0``
+MB04`````1(GA@^$#NP<```#3XXG%"=U!B:]T`0``O^@#``#H`````/?3(=U!
+MB:]T`0``08#\`W8?2HT$I0`````E_`,``$*+A#C0`0``B04`````B<7K'4J-
+M!*4`````)?P#``!"BX0XT`$``(D%`````(G%@\T(08#\`W872HT$I0`````E
+M_`,``$*)K#C0`0``ZQ5*C02E`````"7\`P``0HFL.-`!``!!_\1%.&5##X=_
+M_O__28U&2$B)PDDY1DAT-DB)TTB)U^@`````2(U(R$B)3"0@2(M3"$B)0PA(
+MB1A(B5`(2(D"2(-XV`!T"4B)VDDY7DAURDB#?"0@`'1%2(M$)"#&0%H`0;P`
+M````08!]0P!V+TD/MD8-1(GA2-/XJ`%T%T@/MD0D'TB+5"0@1(AD$'#^0EK^
+M1"0?0?_$13AE0W?1N@````"^@0```$R)]^@`````2`^V1"0P2&O`:$K'A"A(
+M$@```````.EH`P``N@````"^!@```$R)]^@`````#[9T)#!,B>_H`````$@/
+MMD0D,$AKP&A*C90H8!(``(M"#*D``!``=`@E___O_XE"#$F-1DA(B<)).49(
+M#X3L`0``2(D$)$B)U^@`````3(U@R$B-4!!(.5`0#X2Q`0``28U\)$CH````
+M`$B-6/"`>T$-=1I(C;!(`0``2(M#2$B+`$B+>"CH`````&9FD$B+4PA(BP-(
+MB5`(2(D"@'M[`'083(GOZ`````"_`0```.@`````@'M[`'7H2(-[.``/A"@!
+M``!(BT,X2,=`8`````"`>WL`#X29````O0````!F08-]6``/A(@```!FD$AC
+MU4F+A9`)``!(BS302(7V=&0/MT8@9CM#,'5:9CV%`'=4#[?`0H"\*$`(``#_
+M=$9)BU4`#[=&,F;!Z`4/M\"-!(4``P``B8)P`0``28M%``^W3C*#X1^Z`0``
+M`$C3XHF0=`$``,9&)"&Z`````$R)[^@`````_\5!#[=%6#GH#X]Z____]D-$
+M!'4D0?Z%[Q,``$R)[^@`````2(M#.`^V<`&Z`0```$R)[^@`````2(M#.`^V
+M4`(/MG`!2,?'`````+@`````Z`````!(BU,X28NUT`@``+\!````Z`````!(
+MBU,X28NUT`@``+\&````Z`````!(QT,X`````$'^3@Y!_DPD6$B)WDR)[^@`
+M````28U$)$A).40D2`^%3_[__T'^3BA,B>9,B>_H`````$B+%"1).59(#X48
+M_O__28U&8$B)PDDY1F`/A/8```!(B<5(B=?H`````$B)PX!X>P!T-HM$)"C_
+M1"0H/7^6F`!W)TR)[^@`````OP$```#H`````(![>P!T#XM$)"C_1"0H/7^6
+MF`!VV4B#>S@`#X2%````2(M#.$C'0&``````]D-$!'4D0?Z%[Q,``$R)[^@`
+M````2(M#.`^V<`&Z`0```$R)[^@`````2(M#.`^V4`(/MG`!2,?'`````+@`
+M````Z`````!(BU,X28NUT`@``+\!````Z`````!(BU,X28NUT`@``+\&````
+MZ`````!(QT,X`````$'^3@Y(B=Y,B>_H`````$B)ZDDY;F`/A0W___],B?9,
+MB>_H`````$@/MD0D,$AKP&A*QX0H2!(```````!!O`````!!@'U#``^&!`$`
+M`$P/MG0D+Y!,B?)$B>%(T_I$.F0D,`^4P`G0J`$/A-4```!!@/P#=@U!QX=P
+M`0``Q`$``.L+0<>'<`$``*@!``!!BX=T`0``B04`````1(GA@^$#C0Q)NP<`
+M``#3XXG%"=U!B:]T`0``O^@#``#H`````/?3(=U!B:]T`0``08#\`W8?2HT$
+MI0`````E_`,``$*+A#C0`0``B04`````B<7K'4J-!*4`````)?P#``!"BX0X
+MT`$``(D%`````(G%@\T(08#\`W872HT$I0`````E_`,``$*)K#C0`0``ZQA*
+MC02E`````"7\`P``0HFL.-`!``!F9I!!_\1%.&5##X<#____2(/$2%M=05Q!
+M74%>05_#9F9FD$B#[`A,BP>Z`````$&`>$,`=AP/ML)(:\!H2HV$`$`2``!(
+M.?AT"/_"03A00W?D#[;"2&O`:$P!P$B+L$@2``!(A?9T:_9&"@)T94@%0!(`
+M`$@Y1B!U68!^6`!T*/Y&6.M._D9800^VB;L```!)B[AH$```2<?``````$R)
+MRN@`````ZRM(BU9(3(U*R$B-1DA(.<)T&DB)PDF#>1``=,))BT$X3(U(R$@Y
+MT'7L9F:02(/$",-F9F:09F9FD&9FD$%505154TB#[`A!B?1)B?V[`````(GR
+M#[;"2&O`:$B-%#A(BZI($@``2(7M#X2!`0``2,?`_O___XGQ2-/`A$4-#X5L
+M`0``2(U%2$@Y14AT$4B-ND`2``#H`````.G^`@``0;P`````@'T.``^&[@(`
+M`$B-76!(B=_H`````$B)P4B+0PA(B4L(2(D92(E!"$B)"(!Y00`/A00!``!(
+M#[=!,$F#O,5`!````'4+2(-Y.``/A-,```!(#[=!,$F+A,5`!```2(.X@```
+M```/A*$```#&@>``````2`^V04"H`G0MJ`1T*:@!="7&04(%QD%#!`^V47E(
+MBW%02(MY2.@`````Z9@```!F9F:09F:02`^V04"H`G4GJ`1F9I!FD'0>J`%T
+M&L9!0@/&04,$2(G.3(GOZ`````#K9F9FD&:02`^V04"H`G18J`1F9I!FD'1/
+MJ`%U2\9!0P;&04(%9L>!P```````2(G.3(GOZ`````#K+4B+43A)B[70"```
+MOP0```#H`````.L62`^W43!)B[70"```OP(```#H`````$'_Q$0X90X/A\C^
+M___IK0$``&:!^_,!=V=*C02E`````$B)Q8'E_`,``&9FD&:0OQ`G``#H````
+M`$&`_`-V($F+10"+A"C0`0``B04`````J0``$`!U*>L>9F:09F:028M%`(N$
+M*-`!``")!0````"I```0`'4)_\-F@?OS`7:O00^V]$R)[^@`````3(GOZ```
+M``!$B>(/ML)(:\!H2HNL*$@2``!(A>T/A!`!``"[`````$&`?4,`=BQF9F:0
+M2`^V10T/MLM(T_BH`701N@````")SDR)[^@`````9I#_PT$X74-WV$2)X0^V
+MP4AKP&A*C80H0!(``$B)12!(C45(2#E%2'4.2(U%8$@Y16`/A(8```"^````
+M`$&\`````$B-14A(B<)(.45(=#-FD$B)TTB)U^@`````2(UPR$B+4PA(B4,(
+M2(D82(E0"$B)`DB#>-@`=`E(B=I(.5U(=<](A?9T6L9&6@"Y`````$&`?4,`
+M=DI(#[9%#4C3^*@!=!!$B>(/ML*(3#!P_D9:0?_$_\%!.$U#=]SK)/9%"@%T
+M#4B)[DR)[^@`````ZQ&^`````$B)[^@`````9F9FD$B#Q`A;74%<05W#9F:0
+M9I!(@^P(2(GX2(L_9L=`3B``2(G&Z`````!(@\0(PV9FD%-(BP]$BT<PNP``
+M``"`>4,`=AL/ML-(:\!H2(V$"$`2``!(.?AT!__#.%E#=^6`^P-V+4B-!)T`
+M````)?P#``!(BQ&+A`+0`0``B04`````J0``$`!U+>L[9F9FD&9FD$B-!)T`
+M````)?P#``!(BQ&+A`+0`0``B04`````J0``$`!T$`^V\T2)PDB)S^@`````
+MZPL/MO-(B<_H`````%O#9F9FD&9F9I!F9F:09F:02(N'P!```(L`B04`````
+M2(N'P!```(M`!(D%`````$B+A\`0``"+0`B)!0````!(BX?`$```BT`,B04`
+M````PT%7059!54%455-(@^P8B70D%$F)_$&^`````(!_0P`/ADD(``"+="04
+M00^VUHU*"$B)\$C3^*@!=1&-2A!(B?!(T_BH`0^$%0@``$&`_@-V)TJ-!/4`
+M````)?@'``!)BQ0DBX0"@`$``(D%`````*D```@`=2?K0TJ-!/4`````)?@'
+M``!)BQ0DBX0"@`$``(D%`````*D```@`=!Y,B>?H`````$2)\@^VPDAKP&A"
+M@8P@<!(`````"`!)BS0D1(GQ08#^`W8H2HT$]0`````E^`<``(N$,(`!``")
+M!0````")PH'B```!`.LF9F9FD$B-!,T`````)?@'``"+A#"``0``B04`````
+MB<*!X@```0"%TG11@/D#=AI(C03-`````"7X!P``QX0P@`$``````0#K&$B-
+M!,T`````)?@'``#'A#"``0`````!`(72=!9$B?$/ML%(:\!H0H&,('`2````
+M``$`08!\)%$!#X5M!@``08#^`W8G2HT$]0`````E^`<``$F+%"2+A`*``0``
+MB04`````J`%U*^DJ`0``2HT$]0`````E^`<``$F+%"2+A`*``0``B04`````
+MJ`$/A`0!``!$B?(/ML)(:\!H2HT<($B-LW@2``!)BWPD*.@`````2(.[2!(`
+M```/A($```!,BZM($@``0;\`````08!]#@!V9DF-;6!F9I!FD$B)[^@`````
+M2(G#2(M%"$B)70A(B2M(B4,(2(D8]D-$`G4Q2(-[.`!T&DB+4SA)B[0DT`@`
+M`+\%````Z`````"`2T0"2(G:O@8```!,B>_H`````$'_QT4X?0YWH[H@H0<`
+MZR!!#[;VN@$```!,B>?H`````+^@A@$`Z`````"Z`"TQ`42)\0^VP4AKP&A,
+M`>!(C;!X$@``B9!X$@``2,=&$`````!(!4`2``!(B48828M\)"CH`````$&`
+M_@-V($J-!/4`````)?@'``!)BQ0DBX0"@`$``(D%`````.L>2HT$]0`````E
+M^`<``$F+%"2+A`*``0``B04`````08#^`W8L2HT$]0`````E^`<``$F+%"2+
+MA`*``0``B04`````J8````!U,.G"````9I!*C03U`````"7X!P``28L4)(N$
+M`H`!``")!0````"I@`````^$EP```$&`_@-V(DJ-!/4`````)?@'``!)BQ0D
+MBX0"A`$``(D%`````(G&ZR!*C03U`````"7X!P``28L4)(N$`H0!``")!0``
+M``")QD&`_@-V(DJ-!/4`````)?@'``!)BPPDB?*!R@```0")E`&$`0``ZR=*
+MC03U`````"7X!P``28L,)(GR@<H```$`B90!A`$``&9F9I!F9I!!@/X#=BI*
+MC03U`````"7X!P``28L4)(N$`H`!``")!0````"I```$`'4NZ48"``!*C03U
+M`````"7X!P``28L4)(N$`H`!``")!0````"I```$``^$'0(``$&`_@-V(DJ-
+M!/4`````)?@'``!)BQ0DBX0"@`$``(D%`````(G&ZR!*C03U`````"7X!P``
+M28L4)(N$`H`!``")!0````")QH'.```$`$&`_@-V&DJ-!/4`````)?@'``!)
+MBQ0DB;0"@`$``.L82HT$]0`````E^`<``$F+%"2)M`*``0``1(GR#[;"2&O`
+M:$J#O"!($@````^%B````$&`_@-V(DJ-!/4`````)?@'``!)BQ0DBX0"@`$`
+M`(D%`````(G!ZR!*C03U`````"7X!P``28L4)(N$`H`!``")!0````")P4&`
+M_@-V'4J-!/4`````)?@'``!)BQ0DB8P"@`$``.D+`P``2HT$]0`````E^`<`
+M`$F+%"2)C`*``0``Z>X"``!$B?$/ML%(:\!H3HNL($@2``!)@WU```^$V0``
+M`$F+14!(#[=03O;&`0^%QP```$B)Q?;"`@^$M0```$B-L)````!)BWPD*.@`
+M````0;X`````@'T[`'9I1(GR#[;"2(M<Q5A(A=MT4$B#>S@`=!I(BU,X28NT
+M)-`(``"_!0```.@`````@$M$`DB)VKX&````3(GOZ`````"`>WL`=!F03(GG
+MZ`````"_`0```.@`````@'M[`'7H0?_&1#AU.W>7QX60````(*$'`$C'A:``
+M````````2(FMJ````$B-M9````!)BWPD*.@`````ZP9F@4A.@`!!@/X#=BA*
+MC03U`````"7X!P``28L4)(N$`H`!``")!0````#VQ`%U+.D\`0``2HT$]0``
+M```E^`<``$F+%"2+A`*``0``B04`````]L0!#X05`0``08#^`W8G2HT$]0``
+M```E^`<``$F+%"2+A`*``0``B04`````J`%T*^GH````2HT$]0`````E^`<`
+M`$F+%"2+A`*``0``B04`````J`$/A<(```!$B?%$#[;I36OM:$^-K"5`$@``
+M28-]"``/A*0```!)BT4(2(E$)`A)C74X28M\)"CH`````$&_`````$B+5"0(
+M@'H.`'932(G52(/%8$B)[^@`````2(G#2(M%"$B)70A(B2M(B4,(2(D82(-[
+M.`!T&DB+4SA)B[0DT`@``+\%````Z`````"`2T0"0?_'2(M,)`A$.'D.=[1!
+MQT4X@(0>`$G'14@`````38EM4$F-=3A)BWPD*.@`````9F9FD&9FD$&`_@-V
+M(DJ-!/4`````)?@'``!)BQ0DBX0"@`$``(D%`````(G!ZR!*C03U`````"7X
+M!P``28L4)(N$`H`!``")!0````")P4&`_@-V&DJ-!/4`````)?@'``!)BQ0D
+MB8P"@`$``.L82HT$]0`````E^`<``$F+%"2)C`*``0``0?_&13AT)$,/A[?W
+M__](@\086UU!7$%=05Y!7\-F9I!!5T%6055!5%532(/L&$B)_4F)]4B+EQ@)
+M``!,C:)XA@$`9H%^((4`=QE(#[=&($@/MH0X0`@``$AIP(@!``!,C20"00^V
+M1"1JP>`(2)A(BY7`$```BX0"0`@``(D%`````$&)QD'![A!!B<=!P>\800^V
+M1"1JP>`(2)A(BY7`$```BX0"1`@``(D%`````(A$)!!(C70D$(G"P>H(B%8!
+MP>@0B$8"00^V1"1JP>`(2)A(BY7`$```BX0"2`@``(D%`````(A&`XG"P>H(
+MB%8$P>@0B$8%QD8&`,9&!P"+3"0000^VUT$/MMY$BT8$B=Y(Q\<`````N```
+M``#H`````$6$]@^5P(/S`878=!)!QD4D`+@`````Z;,"``!F9I!!@'TD@74I
+M00^VUT$/MO9(C4PD$$R)[^@`````0<9%)`*X`````.F%`@``9F:09I!!BT4X
+M)?___P`]X0$.`'400<9%)"&X`````.EA`@``D$'VA98````!=19!]L8!=!!!
+M@'PD0O\/A2<"``!F9F:03(GF2(GOZ`````!,B>9(B>_H`````$B+50!!#[=%
+M,F;!Z`4/M\"-!(4``P``B8)P`0``2(M%`$$/MTTR@^$?N@$```!(B=-(T^.)
+MF'0!``!)#[=-,DB+A9`)``!(QP3(`````$$/MTTRB<AFP>@%#[?`@^$?2(G3
+M2-/C2(G9]]$AC(68"0``00^W33*)R&;!Z`4/M\"#X1](T^+WTB%4A5Q)BU4(
+M28M%`$B)4`A(B0)!#[=U,DB-O5@/``#H`````$'^3"1[0<9%)(%)@[V`````
+M`'0/28VU@````$B)[^@`````28U$)"!(B<)).40D(`^$!@$``$&^`0```$B-
+MA>@```!(B40D"$F)UV9F9I!(B=?H`````$B)PTB+50`/MT`R9L'H!0^WP(T$
+MA0`#``")@G`!``!(BT4`#[=+,H/A'TR)\DC3XHF0=`$``$@/MU,R2(N%D`D`
+M`$C'!-``````#[=+,HG(9L'H!0^WP(/A'TR)\DC3XDB)T??1(8R%F`D```^W
+M2S*)R&;!Z`4/M\"#X1],B?)(T^)(B='WT2%,A5P/MW,R2(V]6`\``.@`````
+M0?Y,)'M(@[N``````'0/2(VS@````$B)[^@`````2(N%Z````$B)6`A(B0-(
+MBT0D"$B)0PA(B9WH````3(GZ33E\)"`/A1/___]!@:64````___^_T'&A"3@
+M````!$R)[DR)Y^@`````N`$```#K'4$/MM=!#[;V2(U,)!!,B>_H`````+@`
+M````9F:02(/$&%M=05Q!74%>05_#D$B#[$A(B5PD&$B);"0@3(ED)"A,B6PD
+M,$R)="0X3(E\)$!(B50D$(GU2(L?3(NS\!```$&]`````$B%T@^$!0,```^W
+MUDAIPK`$``!"]D0P(0)T$4B+@Y`)``!(BP30QD`D`NL2#[?&2(N3D`D``$B+
+M!,+&0"0A#[?%2(N3D`D``$B+%,*+0C@E____`#WA`1``#X2X`0``N/____]F
+M@7H@A0!W#4@/MT(@#[:$&$`(```\_W4:#[?%2(N3D`D``$B+!,+&0"0&Z3,)
+M``!F9I`/ML!(:<"(`0``28G%3`.K&`D``(!\)!,`>6])#[9%0*@"="RH!'0H
+MJ`%T)$B+`XN`6`$``(D%`````(G"A<!T#TB+`XF06`$``&9FD&9FD$B+`XN`
+M4`$``(D%`````(G"@\H"2(L#B9!0`0``2(L#BX`$`0``B04`````B<*`SO](
+MBP.)D`0!```/M\5(:<"P!```9D+W1#`@`@@/A-X```!!N`````"^`````(![
+M0P!V?$&Y`0```&9F9I!F9I!(#[9'#4`/MLY(T_BH`7170(#^`W8BC02-````
+M`$B82(L3BX0"T`$``(D%`````*D``!``=2;K+TB-!+4`````)?P#``!(BQ.+
+MA`+0`0``B04`````J0``$`!T"TR)R(GQ2-/@00G`_\9`.'-#=Y%%A,!T3$0X
+M1PUU1HGH9L'H!0^WP(M$@UR)Z8/A'TC3^*@!=2U!@+W@`````G<(0<:%X```
+M``,/M\5(BY.0"0``2(LTPDR)[^@`````Z;`'``#V1"03`0^$I0<```^WQ4B+
+MDY`)``!(BSS"QD<D(8M'."7___\`/>$!#@`/A(`'``!!#[9%:L'@"$B82(N3
+MP!```(N$`D`(``")!0````")QL'N$$&)P$'!Z!A!#[9%:L'@"$B82(N3P!``
+M`(N$`D0(``")!0````"(1"0(2(U,)`B)PL'J"(A1`<'H$(A!`D$/MD5JP>`(
+M2)A(BY/`$```BX0"2`@``(D%`````(A!`XG"P>H(B%$$P>@0B$$%QD$&`,9!
+M!P#VAY8````!=1A`#[;V0/;&`70.00^VT.@`````Z<D&``!(B?Y(B=_H````
+M`.FY!@``#[?62(N#D`D``$B+!-!F@7@XX0$/A2\!```/MD@Z@_D0#X>2!@``
+MN`$```!(T^"IP#````^%\@```*D`@```=0VI```!`'5?D.EK!@``#[?62(N#
+MD`D``$B+#-!,:<*P!```0P^V1#`SB$$D2(N#D`D``$B+!-#V0",$#X0X!@``
+M@'@D``^$+@8``$B#>%``#X0C!@``2(M04$,/MD0P,X@"Z1(&```/M]9(:=*P
+M!```1`^WYDB+@Y`)``!*BPS@0@^V1#(JB$$D2(N#D`D``$J+!.!(@WA(``^$
+MV@4``$(/MKPR(00``.@`````B<)(BX.0"0``2HL$X#M0-'8#BU`T#[?U2(N#
+MD`D``$B+!/!(BWA(B=)(:?:P!```2HUT-BCH`````.F-!0``#[?&2(N3D`D`
+M`$B+!,+&0"0`Z78%``!F9I!F9I`/M]9(BX.0"0``3(LDT$V+?"1HN/____]F
+M08%\)""%`'<.20^W1"0@#[:$&$`(```/ML!(:<"(`0``28G%3`.K&`D``$'&
+MA>``````20^V14"H`@^$EP$``*@$#X2/`0``J`$/A(<!``!!QD0D)`!!BY0D
+ME````$C!ZA5-A?\/E<`/ML"%P@^$Y`0``$'VAZD````"#X2=````28._H```
+M``!T&$F+OZ````!!BU0D-$F+="1(Z`````#K>TF#?"1(`'1S0;X`````28._
+ML`````!T$T'VAZD````!=0E-B[>P````ZR%(B[,@"@``N@$```!,B?]!_Y>X
+M````A<!T!TR+LR`*``!!@WPD-`!T)TF+;"1(28M^"$&+%DB)[N@`````08L&
+M2`'%28U&!$F#QA"#.`!TWD$/MD5JP>`(2)A(BY/`$```BX0"0`@``(D%````
+M`(G"P>H008B7FP```,'H&&9!B8>0````00^V16K!X`A(F$B+D\`0``"+E`)$
+M"```B14`````9@^VPF9!B8>4````#[;&9D&)AY8```")T,'H$&8/ML!F08F'
+MF````,'J&$&(EYH```!!#[9%:L'@"$B82(N3P!```(N$`DP(``")!0````!F
+M#[;`9D&)AY(```#IA0,``&9FD&:0#[?52&G*L`0``$(/MD0Q,X3`#X6_````
+M2(N#D`D``$B+!-#&0"0`08N4))0```!(P>H4387_#Y7`#[;`A<(/A#P#``!"
+M#[9$,3-!B(>2````00^VAZD```"H`@^$'P,``+T`````28._L`````!T#:@!
+M=0E)BZ^P````ZR%(B[,@"@``N@$```!,B?]!_Y>X````A<!T!TB+JR`*``!!
+M@WPD-``/A-8"``!)BUPD2)!(BWT(BU4`2(G>Z`````"+10!(`<-(C44$2(/%
+M$(,X`'3>Z:D"```\`@^%6`(```^W_4AI_[`$``!*C7PW0+Y_````0"(WQD0D
+M`P#&1"0"`,9$)`$`#[?%2&G`L`0``$*+1#`XB40D!$B-3"0$#[94)`3!XA@/
+MMD$!P>`0"<(/MD$"P>`("<(/MD$#08G500G%0(#^<78P08/]`78+#[9'`8/@
+M#XA$)`-!@_T"=@@/MD\"B$PD`D&#_0-V30^V?P-`B'PD`>M"08/]`G8+#[9'
+M`H/@#XA$)`-!@_T'=BL/MD<'@\`(03G%1`]'Z$&#_0QV"`^V3PR(3"0"08/]
+M#78)#[9_#4"(?"0!#[?U2(N#D`D``$B+#/"`>3``#Y7`187M#Y7"#[;`A<)T
+M2<9!)"!(BX.0"0``2(L$\$0X:#!S!40/MF@P#[?-2(N#D`D``$B+!,A(@WA0
+M`'0L2(MX4$2)ZDAI\;`$``!*C70V0.@`````ZQ(/M\5(BY.0"0``2(L$PL9`
+M)"*`?"0#!'42#[?%2(N3D`D``$B+!,+&0"0"23E<)"@/E<!-A?\/E<(/ML"%
+MP@^$&`$``$'VA"26````$'13#[?%2&G`L`0``$(/MD0P,T&(AY(```!!]H>I
+M`````G0R1(GH13AL)#!S!D$/MD0D,(3`=!Y)B[^@````#[;0#[?U2&GVL`0`
+M`$J-=#9`Z``````/MD0D`X/X"W==B<#_),4`````0<:'J@````'IF@```(!\
+M)`($#Y3`@'PD`0(/E,(/ML`AT(/X`1G`@^#Q@\`108B'J@```.MQ0<:'J@``
+M`!#K9T'&AZH````+ZUU!QH>J````!NM30<:'J@````WK23PH=1]!#[9%>__(
+M08A%>@^WU4B+@Y`)``!(BP30QD`D@>LF/`AU"K\0)P``Z``````/M\5(BY.0
+M"0``2(L$PL9`)"%F9I!F9I!(BUPD&$B+;"0@3(MD)"A,BVPD,$R+="0X3(M\
+M)$!(@\1(PV9F9I!F9I!F9I!F9I!54TB#[`A(B?M(B?U(BP>+@%`!``")!0``
+M``")QDB+!XFP4`$``/?&`/__`'0(2(GOZ#KI__](BP.+@%`!``")!0````")
+MQDB+`XFP4`$``/?&`/__`'7.N`````!(@\0(6UW#9F9FD&9F9I!F9F:005=!
+M5D%505154TB#[$A(B?U(B7PD.$0/MZ<Z$@``2(L'BX!``0``B04`````9B7_
+M#V:)ASH2``"X`````&9$.:<Z$@``#X0L!P``9H&_.A(``/\/#X2J!@``9D0Y
+MISH2```/A)P&``!(C8?H````2(E$)!A(C9?X````2(E4)!!(B50D"$B)%"1F
+M9F:09F:02(N-\!```$'_Q&9$.:4^$@``N`````!$#T;@00^WU$B+A5`1``"+
+M=)`$]\8```@`#X2A````2(M%`(N`4`$``(D%`````(G"2(M%`(F04`$``+L`
+M````]\(`__\`=%&^`````(!]0P!T1HG79D0/MD5##[?6C4H(2(GX2-/XJ`%U
+M#8U*$$B)^$C3^*@!=!0/M\9(:<"H````2(V<**`!``#K#?_&9D$Y\'?'9F:0
+M9I!(A=MU$$B+?"0XZ`````"0Z:$%``!(BWPD..@`````B$,/Z8\%``!!B?5F
+M08'E_P]!#[?%2&G0L`0``$B+?`H@2(N5D`D``$R+-,)-A?8/A&(%``#WQ@``
+M(``/A)$!``!!@'XD@0^%90$``$'&1B0A20^W5C)(BX60"0``2,<$T`````!!
+M#[=.,HG(9L'H!0^WP(/A'[H!````2-/B2(G1]]$AC(68"0``00^W3C*)R&;!
+MZ`4/M\"#X1^Z`0```$C3XDB)T??1(4R%7$$/MW8R2(V]6`\``.@`````28.^
+M@`````!T#TF-MH````!(B>_H`````&9!@7X@A0`/A\X```!)#[=&(("\*$`(
+M``#_#X2[````9D&#?B!_=R=(#[:$*$`(``!(BY48"0``2&G`B`$``$B+1!!(
+M@'@(_W5AZ8P```!F08%^(($`=RE)#[=&($@/MH0H0`@``$B+E6@)``!(:<#(
+M#P``2(M$$`B`>`C_=2SK6DD/MT8@2`^VA"A`"```2(N50`D``$AIP-````!(
+MBX00B````(!X"/]T,$R)]DB)[^@`````2(N%Z````$R)<`A)B09(BTPD&$F)
+M3@A,B;7H````Z>@#``!FD$F-1A!(BTPD$$B+40A(B4$(28E.$$B)4`A(B0+I
+MQ0,``$2)Z&;!Z`4/M\"+1(5<1(GI@^$?2-/XJ`$/A:8#``!!#[?52(N%D`D`
+M`$B+!-!F@7@@A0`/A[,```!(#[=0(("\*D`(``#_#X2@````9H-X(']W(D@/
+MMH0J0`@``$B+E1@)``!(:<"(`0``2(M$$$@/ME`(ZWQ!#[?52(N%D`D``$B+
+M!-!F@7@@@0!W)T@/MT`@2`^VA"A`"```2(N5:`D``$AIP,@/``!(BT00"`^V
+M4`CK/D$/M]5(BX60"0``2(L$T$@/MT`@2`^VA"A`"```2(N50`D``$AIP-``
+M``!(BX00B`````^V4`CK!;K_____@/K_=`T/ML*`O"C&"```_W5&1(GH9L'H
+M!0^WP(M$A5Q$B>F#X1](T_BH`0^%H@(``$'&1B0&O@````!,B??H`````+H`
+M````3(GV2(GOZ`````#I>P(```^VPD@/MIPHQ@@``$AIVZ@```!(C9PKH`$`
+M`$B%_W0(]\8```(`=06_`````/9#"@(/A($!``!!#[?U2(GZ2(G?Z`````!$
+MB>AFP>@%#[?`BT2%7$2)Z8/A'TC3^*@!#X46`@``08!^)($/A9$```!)#[=6
+M,DB+A9`)``!(QP30`````$$/MTXRB<AFP>@%#[?`@^$?N@$```!(T^)(B='W
+MT2&,A9@)``!!#[=V,DB-O5@/``#H`````$R)]DB)[^@`````28.^@`````!T
+M#TF-MH````!(B>_H`````$B+A>@```!,B7`(28D&2(M,)!A)B4X(3(FUZ```
+M`.EZ`0``0;\`````QD0D(`!(BX7X````2#E$)!!T$DB-E?@```!!_\=(BP!(
+M.<)U]46$_W0\2(M<)`A(B=_H`````$B-2/!(BU,(2(E#"$B)&$B)4`A(B0),
+M.?&X`0````^V5"0@#T30B%0D($'^SW7)@'PD(``/A0,!``!)C4802(M,)!!(
+MBU$(2(E!"$F)3A!(B5`(2(D"1(GH9L'H!0^WP$2)Z8/A'[H!````2-/B"92%
+MG````.G#````00^W]4B)^DB)W^@`````0;\`````QD0D(`!(BX7X````2#E$
+M)!!T$DB-E?@```!!_\=(BP!(.<)U]46$_W0[2(L<)$B)W^@`````2(U(\$B+
+M4PA(B4,(2(D82(E0"$B)`DPY\;@!````#[9,)"`/1,B(3"0@0?[/=<F`?"0@
+M`'5"08!^)(%T.TF-1A!(BTPD$$B+40A(B4$(28E.$$B)4`A(B0)$B>AFP>@%
+M#[?`1(GI@^$?N@$```!(T^()E(6<````9D0YI3H2```/A8SY__](C87X````
+M2(G"2#F%^````'130;P!````9F:02(G32(G7Z`````!(C7#P#[=.,HG(9L'H
+M!0^WP(/A'TR)XDC3XDB)T??1(8R%G````+H`````2(GOZ`````!(B=I(.9WX
+M````=;9(B>_H`````+@!````2(/$2%M=05Q!74%>05_#9F9FD&9FD&9FD$B#
+M["A(B5PD"$B);"003(ED)!A,B6PD(&;'1"0&``!(BZ_0"```0;P`````3(UL
+M)`9(BT4`BX!0`0``B04`````2(M5`(F"4`$``(7`="%(BT4`QX!0`0```0``
+M`$ECW$B)[^@`````08A$'0!F9I!(@<4`%```0?_$08/\`7ZQ@'PD!@!U#+@`
+M````@'PD!P!T!;@!````2(M<)`A(BVPD$$R+9"083(ML)"!(@\0HPV9F9I!F
+M9F:09F9FD&9FD$%7059!54%455-(@^P(2(G]28GUN0````!F#[9'0XG&9H/X
+M`'8;20^V50UF9I!FD$B)T$C3^*@!=0?_P68YSG?O28-]0`!T($F+=4!(@<:0
+M````2(M]*.@`````28MU0$B)[^@`````28U%8$B)PDDY16`/A&<!``!)B<9F
+M9F:02(G7Z`````!(B<-(@W@X``^$+@$``(!X>P`/A*````!!O`````!F@WU8
+M``^$CP```$&_`0```$ECU$B+A9`)``!(BS302(7V=&8/MT8@9CM#,'5<9CV%
+M`'=6#[?`@+PH0`@``/]T24B+50`/MT8R9L'H!0^WP(T$A0`#``")@G`!``!(
+MBT4`#[=.,H/A'TR)^DC3XHF0=`$``,9&)"&Z`````$B)[^@`````9F:09I!!
+M_\0/MT581#G@#X]W____2(M#.$C'0&``````]D-$!'4C_H7O$P``2(GOZ```
+M``!(BT,X#[9P`;H!````2(GOZ`````!(BT,X#[90`@^V<`%(Q\<`````N```
+M``#H`````$B+4SA(B[70"```OP$```#H`````$B+4SA(B[70"```OP8```#H
+M`````$C'0S@`````0?Y-#DB)WDB)[^@`````3(GR33EU8`^%H/[__TG'14``
+M````2(M%`(N(6`$``(D-`````(7)=`I(BT4`B8A8`0``2(/$"%M=05Q!74%>
+M05_#9F9FD&9F9I!F9I!!5%532(G]28GTNP````"`?T,`=AY(#[96#69FD&9F
+MD$B)T(G92-/XJ`%U!__#.%U#=^U!]D0D#`)U#$F-1"1@23E$)&!U:4R)Y^@`
+M````A,!T4$B)[^@`````2(G&2(7`=$U)C40D8$B+4`A(B7`(2(D&2(E6"$B)
+M,D'^1"0.3(EF2,9&0`7&1D$`QD9Y#[D!````N@$```!,B>?H`````.L-#[;S
+M2(GOZ`````!FD%M=05S#9F9FD&9F9I!F9I!(@^PH2(D<)$B);"0(3(ED)!!,
+MB6PD&$R)="0@28G]28GT3(NVB`````^V5D=(B?Y,B??H`````$B)Q69!@TPD
+M3A"[`````&9!#[9%0XG&9H/X`'8>20^V5@UF9I!F9I!(B=")V4C3^*@!=0?_
+MPV8YWG?M9H/[`W8G2(T$G0`````E_/\#`$F+50"+A`+0`0``B04`````J0``
+M$`!U-^LE2(T$G0`````E_/\#`$F+50"+A`+0`0``B04`````J0``$`!U$`^V
+M\TR)[^@`````Z9L!``!)C49@23E&8`^$C0$``$B%[0^$A`$``$@/MD5Y2<=$
+MQ%@`````2(M5"$B+10!(B5`(2(D"2(GJO@8```!,B??H`````(!]>P!T&9!,
+MB>_H`````+\!````Z`````"`?7L`=>A(@WTX`'132(M%.$C'0&``````]D5$
+M!'4/0?Z%[Q,``$R)[^@`````2(M5.$F+M=`(``"_`0```.@`````2(M5.$F+
+MM=`(``"_!@```.@`````2,=%.`````!!_DX.2(GN3(GOZ`````!)BT4`BY!8
+M`0``B14`````A=)T"DF+10")D%@!``!!QD0D0@!F08-D)$[ONP````!!@'PD
+M.P!T(69!#[94)#L/M\-)BVS$6$B%[70&@'U"_W5]_\-F.=IWYD'V1"1.@'0-
+M3(GF3(GOZ`````#K8;L`````08!\)#L`=$)F9F:0#[?#28MLQ%A(A>UT(_9%
+M1`)T'4B+53A)B[70"```OP8```#H`````(!E1/UF9F:0_\-F00^V1"0[9CG8
+M=\)F0<=$)$X"`$&`9"1)_69F9I!(BQPD2(ML)`A,BV0D$$R+;"083(MT)"!(
+M@\0HPV9FD$B#[`A(BX:(````N0````"`?T,`=AM(#[90#69FD&:02(G02-/X
+MJ`%U!__!.$]#=^_&1D(,Z`````!(@\0(PY!!54%455-(@^P(28G\B?6[````
+M`$B-!*T`````28G%08'E_`,``+\0)P``Z`````!`@/T#=AM)BP0D0HN$*-`!
+M``")!0````"I```0`'4DZQE)BP0D0HN$*-`!``")!0````"I```0`'4)_\-F
+M@?OS`7:S0`^V]4R)Y^@`````3(GGZ`````")Z@^VPDAKP&A,`>#V@&@2```!
+M=`](B[!($@``3(GGZ`````!(@\0(6UU!7$%=PV9F9I!F9I!F9I!(@^PH2(E<
+M)`A(B6PD$$R)9"083(EL)"!(B10D3(LG#[?V28N$))`)``!(BQSP0;T`````
+MO0````!F@7LXX0%U'P^V0SJ#Z!$\`7<42(MO0$B%TG5*QD51`.M$9F:09I!)
+MBY0D&`D``$R-JGB&`0!F@7L@A0!W&4@/MT,@2@^VA"!`"```2&G`B`$``$R-
+M+`)(@SPD`'4(0<:%X`````"`>R2!=0N`9PSW9F9FD&9FD$B#/"0`#X7[````
+MQD,D`/:#E@```"`/A!8"``!(BVMH2(7M#X0)`@``]H6I`````G0D2(.]H```
+M``!T&DB#>T@`=!-(B[V@````BU,T2(MS2.@`````00^V16K!X`A(F$F+E"3`
+M$```BX0"0`@``(D%`````(G"P>H0B)6;````P>@89HF%D````$$/MD5JP>`(
+M2)A)BY0DP!```(N4`D0(``")%0````!F#[;"9HF%E`````^VQF:)A98```")
+MT,'H$&8/ML!FB868````P>H8B)6:````00^V16K!X`A(F$F+E"3`$```BX0"
+M3`@``(D%`````&8/ML!FB862````Z2P!``"`>R2`=03&0R0A2(LT)$C'QP``
+M``"X`````.@`````9H%[..$!=1@/MD,Z@^@1/`%W#4B)[^@`````Z>T```#V
+M1"0#`71YBT,X)?___P`]X0$.`'1J00^V16K!X`A(F$F+E"3`$```BX0"0`@`
+M`(D%`````$$/MD5JP>`(2)A)BY0DP!```(N$`D0(``")!0````!!#[9%:L'@
+M"$B828N4),`0``"+A`)("```B04`````2(G>3(GGZ`````#K;8!\)`,`>21)
+MBP0DBX!8`0``B04`````B<&%P'1028L$)(F(6`$``.M$9I"`/"0`>#R`?"0'
+M`'DU28L4)`^W0S)FP>@%#[?`C02%``,``(F"<`$``$F+%"0/MTLR@^$?N`$`
+M``!(T^")@G0!``!(BUPD"$B+;"003(MD)!A,BVPD($B#Q"C#D)"0D)!(@^PH
+M2(E<)`A(B6PD$$R)9"083(EL)"!(B?-)B?Q$#[9N)$B+EQ@)``!(C:IXA@$`
+M9H%^((4`=QE(#[=&($@/MH0X0`@``$AIP(@!``!(C2P"183M=2!FQX7`````
+M``"`>S@<=1&`>SH"=0M(B=Y(B>_H`````$B#>W@`=!)(C7-X3(GGZ`````!F
+M9I!F9I!(B=Y,B>?H`````$&`_09T/4B-G5@!``!)BWPD*$B)WN@`````QX58
+M`0``@(0>`$C'A6@!````````2(FM<`$``$F+?"0H2(G>Z`````!(BUPD"$B+
+M;"003(MD)!A,BVPD($B#Q"C#9F:09F:09F:02(/L*$B)'"1(B6PD"$R)9"00
+M3(EL)!A,B70D($B)_4B%_P^$PP```$B+1TA,BRA,B>_H`````$B)PTR-<%A(
+MA<`/A*0```!,B>_H`````$F)Q$B%P'402(G>3(GOZ`````#IA````,9#):P/
+MMT4P9HE#($R):RC'@Y0````(````3(EC>$F+1"002(E#2,=#-``(``!(C87D
+M````2(E#4,9#,"!(QX.@`````````,9#.!S&0SD!QD,Z`L9#.PC&0SP`O@``
+M``!,B??H`````(M3-$F+="083(GWZ`````!(B=Y,B>_H`````$B+'"1(BVPD
+M"$R+9"003(ML)!A,BW0D($B#Q"C#9F9FD&9F9I!!5T%6055!5%532(/L"$F)
+M_TF)]4&)UDB+1TA(BRA!O`````!$B>(/ML(/MH0H0`@``#S_=$L/ML!(:=B(
+M`0``2(G?2`.]&`D``$B!Q\P```"Z"````$F-=0SH`````(3`=!Y(BX48"0``
+M1(BT`P8!``!(BX48"0``3(F\`Q@!``!!_L1YGDB#Q`A;74%<05U!7D%?PV9F
+M9I!F9F:09F:02(/L2$B)7"082(EL)"!,B60D*$R);"0P3(ET)#A,B7PD0$B)
+M?"003(MV2$$/MD8"08G%0<'E"&9!#[9&`T$!Q4$/M\6#P`0/MU8T.=`/C]L`
+M``!)C5X(0;\`````00^WQ4J-1#`$2#G8#X:P````D`^V`X3`#XB%````@^`/
+M/`9U?O9#`\!T!O9#!<!U<O8#$'0P2(UK"$&\`````(![!`!V70^V4P-(B>Y(
+MBWPD$.@`````2(/%'$'_Q$0X8P1WXNL]2(UK!$&\`````(![`@!V+4$/ML>)
+M1"0,9F:09I"+5"0,2(GN2(M\)!#H`````$B#Q1Q!_\1$.&,"=^)FD$'_QT@/
+MMD,!2(U<&`)!#[?%2HU$,`1(.=@/AU'___^^`0```$B+?"00Z`````!(BUPD
+M&$B+;"0@3(MD)"A,BVPD,$R+="0X3(M\)$!(@\1(PV9F9I!F9F:09F9FD&9F
+MD$&)RTB+1TA,BPBY`````$2-%!8/ML%"#[:$"$`(```\_W0]#[;`28N1&`D`
+M`$QIP(@!``!!.+00!@$``'4B23F\$!@!``!U&$6(E!`%`0``28N!&`D``$6(
+MG``$`0``D/[!>:_SPV9F9I!F9I!F9I!(BW]0@+_`````3W<W2`^VA\````!(
+MC01`2,'@!(T4%HB4.,D```!(#[:'P````$B-!$!(P>`$B(PXR````/Z'P```
+M`//#9F9FD&9FD&9FD$%7059!54%455-(@^P(28G_2(M.2`^V00+!X`AF#[91
+M`P'0#[?`@\`$#[=6-#G0#X\%`0``2(U1",9$)`<`0;X`````#[9)`0^V0@(`
+M1"0'2`^V0@-(C50"!$'_QD0X\7/F2(G50;T`````0;X`````1#IT)`</@Z8`
+M``!F9F:0#[9-`4$!S0^V10`\`0^4PCP7#Y3`"="H`70U1(GK*,M$..MS:T&-
+M1@%$#[;@9F:0#[9-``^V\T2)XDR)_^@`````_\-$..MRY^M%9F:09I!)BT=0
+M@+C!`````70S1(GK*ET!1#CK<RA!C48!1`^VX`^V30`/MO-$B>),B?_H````
+M`/_#1#CK<N=F9F:09F:02(/%!$'_QD0Z="0'#X)>____28M'4,:`P0````&^
+M!P```$R)_^@`````2(/$"%M=05Q!74%>05_#9F9FD&9FD$B#["A)B?E!N/__
+M__](B>?\N0(```"X`````/-(J\<'`````&8Y\7-59F9FD&9FD&:#^0YW"P^W
+MT4(/M@0*B`04#[?!0@^V!`B#Z#`\"7<A08#X_[@`````1`]$P$$/ML!KP`H/
+MM]%"`@0*1(U`T.L&08#X_W4'_\%F.?%RLD$/ML!(@\0HPV9FD&9FD&9FD$&)
+MT4B+1TA,BP"Z`````)`/ML)"#[:$`$`(```\_W0P#[;`28N(&`D``$AIP(@!
+M``!(.;P(&`$``'450#BT"`4!``!U"T2(C`@'`0``PV:0_L)YO//#9F9FD&9F
+MD&9FD$%505154TB#[`A)B?5!B=1(BV]0NP````!F9F:09F:02&/#2(T$0$C!
+MX`1(C8PHP`````^V40B`^@$/E\"`^A</E<(/ML"%PG0V1#AA"74P00^V50.`
+M^B&X(`````]#T$AC^TB-/'](P><$2(V\+]@````/MM))C74$Z`````"0_\.#
+M^T]^F4B#Q`A;74%<05W#9F9FD&9F9I!F9I!F9I!!5T%6055!5%532(/L*$B)
+M?"0@0;T`````2(M&2$B)1"08#[9``HG!P>$(2(M4)!AF#[9"`P'!#[?!@\`$
+M#[=6-#G0#X\7`0``3(MD)!A)@\0(QD0D%P`/M\%(BU0D&$B-1!`$3#G@#X;D
+M````#[?!2(U$$`1(B40D"`^WR4B)#"1!#[9$)`+!X`AF00^V5"0#1(TT`D$/
+MM_9)C7PD!.@`````//]U:4&)Q4$/M\9*C5P@!$@Y7"0(=FU(BP0D2(M4)!A,
+MC7P0!`^V0P+!X`AF#[93`XTL`@^W]4B->P3H`````#S_=0Y!@/W_=3I!O0``
+M``#K,D0XZ$0/0N@/M\5(C5P8!$DYWW>_ZQQF9I!FD(G"1"CJ#[;2#[9T)!=(
+MBWPD(.@`````#[94)!=,B>9(BWPD(.@`````_D0D%T$/M\9.C60@!$PY9"0(
+M#X<P____O@(```!(BWPD(.@`````2(/$*%M=05Q!74%>05_#D%-(B?M(BTY(
+M#[9!`L'@"&8/ME$#`=`/M\"-4`0/MT8T.<)_'TB+OR`!``!(8])(B<[H````
+M`+X`````2(G?Z`````!;PV9F9I!F9F:09F:02(/L.$B)7"0(2(EL)!!,B60D
+M&$R);"0@3(ET)"A,B7PD,$F)]4F)_@^V1B2(1"0'9H%^((4`#X>K````2`^W
+M1B"`O#A`"```_P^$F````&:#?B!_=RI(#[:$.$`(``!(BY<8"0``2&G`B`$`
+M`$B+1!!(2`^V0`A(!<`(``#K;9!F@7X@@0!W+D@/MT8@2`^VA#A`"```2(N7
+M:`D``$AIP,@/``!(BT00"$@/MD`(2`7`"```ZS9(#[=&($@/MH0X0`@``$B+
+MET`)``!(:<#0````2(N$$(@```!(#[9`"$@%P`@``.L%N+\)``!-#[9\!@9-
+M:?^H````3XV\-Z`!``!)BY88"0``2(VJ>(8!`&9!@7T@A0!W&4D/MT4@2@^V
+MA#!`"```2&G`B`$``$B-+`*`?"0'``^%-`(``&;'A<```````$&`?3@<#X4@
+M`@``00^V13J#^`)T48/X`G\*@_@!="?I!P(``(/X!V9F9I!T*8/X"@^%]0$`
+M`$R)[DB)[^@`````Z>4!``!,B>Y(B>_H`````.G5`0``3(GN2(GOZ`````#I
+MQ0$``$R)[DB)[^@`````2(V=6`$``$B+14A(BP!(BW@H2(G>Z`````#'A5@!
+M``"`A!X`2,>%:`$```````!(B:UP`0``2(M%2$B+`$B+>"A(B=[H`````)#&
+M14+_0;P`````08!_#@`/AJ\```!)C5]@9F9FD&9FD$B)W^@`````2(G%2(M#
+M"$B):PA(B5T`2(E%"$B)*(!]0O]T;(!]00!U;8"]X0`````/A!D!``!(#[9%
+M0*@"=`RH!'0(J`$/A=(```!(#[9%0*@"=0RH!'0(J`$/A=(```!(#[9%0*@"
+M#X3B````J`0/A-H```"H`0^%T@```$B)[DR)]^@`````Z<(```!FD,:%X0``
+M``!!_\1%.&<.#X=<____13AG#G570;P`````08!_#@!V2DF-7V!F9I!FD$B)
+MW^@`````2(G%2(M#"$B):PA(B5T`2(E%"$B)*(!]0O]T%`^V14$\(@^4PCP-
+M#Y3`"="H`75*0?_$13AG#G>_0<9'"?],B?Y,B??H`````(!\)`<`#X6%````
+MZS(/ME5Y2(MU4$B)Z4R)_^@`````ZQU(B>Y,B??H`````&:0ZPZ^"@```$B)
+M[^@`````D$F#?7@`=`Q)C75X3(GWZ`````!,B>Y,B??H`````(!\)`<`="QF
+M_X7`````9H.]P`````IV#F;'A<```````.E,_O__O@H```!(B>_H`````$B+
+M7"0(2(ML)!!,BV0D&$R+;"0@3(MT)"A,BWPD,$B#Q#C#9F9FD&9F9I!F9F:0
+M2(/L.$B)7"0(2(EL)!!,B60D&$R);"0@3(ET)"A,B7PD,$B)_4&)]TB+1TA,
+MBRA,B>_H`````$B)PTR-<%A(A<`/A*0```!,B>_H`````$F)Q$B%P'402(G>
+M3(GOZ`````#IA````,9#):P/MT4P9HE#($R):RC'@Y0````(````3(EC>$F+
+M1"002(E#2,=#-``(``!(C87D````2(E#4,9#,"!(QX.@`````````,9#.!S&
+M0SD!1(A[.L9#.PC&0SP`O@````!,B??H`````(M3-$F+="083(GWZ`````!(
+MB=Y,B>_H`````$B+7"0(2(ML)!!,BV0D&$R+;"0@3(MT)"A,BWPD,$B#Q#C#
+M9I!(@^PX2(E<)`A(B6PD$$R)9"083(EL)"!,B70D*$R)?"0P28G]2(M'2$R+
+M,$B+ER`!```/MD("B</!XPAF#[9"`P'##[?#@\`$/0`(```/C\X```!,B??H
+M`````$B)Q4B%P`^$N@```$R)]^@`````28G'2(7`=1!(B>Y,B??H`````.F:
+M````3(UE6$B+>!`/M]N#PP1(8]-)B[4@`0``Z`````#&126L00^W13!FB44@
+M3(EU*(E=-(.-E````!))BT<02(E%2$R)?7A)C87D````2(E%4,9%,"!(QX6@
+M`````````,9%.!W&13D0QD4Z`@^VQXA%.XA=/+X`````3(GGZ`````"+531)
+MBW<83(GGZ`````!(B>Y,B??H`````$B+7"0(2(ML)!!,BV0D&$R+;"0@3(MT
+M)"A,BWPD,$B#Q#C#9F9FD&9F9I!F9I!328G208G+2(M'2$R+`$R+3U"[````
+M``^VPT(/MI0`0`@``(#Z_W18#[;"28N(&`D``$AIP(@!``!(.;P(&`$``'4]
+M0#BT"`4!``!U,T6$VW0-2(N$"!`!``!)B0+K)0^VPDF+B!@)``!(:<"(`0``
+M28L22(F4"!`!``#K!V9FD/[#>9.[`````&9F9I!F9I`/ML-(C01`2,'@!$J-
+M/`A(C8_`````#[91"(#Z`0^7P(#Z%P^5P@^VP(7"=#-`.'$)=2U%A-MT#$B+
+MA]````!)B0+K(P^VPTB-!$!(P>`$28L22HF4"-````#K"V9F9I#_PX#[3W:9
+M6\-F9F:09F:02(/L*$B)7"0(2(EL)!!,B60D&$R);"0@28G\B?%(BY<@`0``
+M#[9"`HG'P><(9@^V0@,!QP^WQX/`!#T`"```?V1`A/9T#D$/MH0D"`$``(A"
+M`>L,#[9"`4&(A"0(`0``2(U""$B)!"2[``````^WQTB-1!`$2#L$)'8J1`^V
+MZ0^WQTB-;!`$#[;S1(GI2(GB3(GGZ`````#_PTB#!"0$2#LL)'?B2(M<)`A(
+MBVPD$$R+9"083(ML)"!(@\0HPV:02(/L&$B)7"0(2(EL)!!(B?N)U4C'!"0`
+M````@']#`70_0`^V]KD!````2(GBZ`````!(@SPD`'0G2(L$)(`(@$"$[70+
+M2(L$)(!(`R#K"9!(BP0D@&`#WTB)W^@`````2(M<)`A(BVPD$$B#Q!C#D$B#
+M[!A(B1PD2(EL)`A,B60D$$B)\TF)_$B+;FAF@7X@A0`/AY@```!(#[=&(("\
+M.$`(``#_#X2%````9H-^(']W(D@/MH0X0`@``$B+EQ@)``!(:<"(`0``2(M$
+M$$@/ME`(ZV%F@7X@@0!W)T@/MT8@2`^VA#A`"```2(N7:`D``$AIP,@/``!(
+MBT00"`^V4`CK,D@/MT8@2`^VA#A`"```2(N70`D``$AIP-````!(BX00B```
+M``^V4`CK"&9FD+K_____N?____]F@7L@A0!W#D@/MT,@0@^VC"!`"```@/K_
+M="$/ML)"@+P@Q@@``/\/E,*`^?\/E,`)T*@!=0:`>R0&=3I(@WMX`'032(US
+M>$R)Y^@`````9F9FD&9FD$B)WDR)Y^@`````QT50_____TB)[_]52.MV9F:0
+M9F:0@'LD`'4[]H.4````"&9FD'002(M],(M3-$B+<TCH`````,=%4`````!(
+M@WTX`'0)2(M5.(M%((D"2(GO_U5(ZP_'15#_____2(GO_U5(9I!(@WMX`'0,
+M2(US>$R)Y^@`````2(G>3(GGZ`````!FD$B+'"1(BVPD"$R+9"002(/$&,-F
+M9F:09F:09F:09F:02(/L2$B)7"082(EL)"!,B60D*$R);"0P3(ET)#A,B7PD
+M0$B)_4&)UT&)SDR)1"0(0(AT)!=(BT=(3(LH3(GOZ`````!(B<-(C4!82(D$
+M)$B%VP^$V````$R)[^@`````28G$2(7`=1!(B=Y,B>_H`````.FX````QD,E
+MK`^W13!FB4,@2(M4)`A(B5-H3(EK*,>#E`````@```!,B6-X28M$)!!(B4-(
+M1(ES-$B-A>0```!(B4-0QD,P($C'@Z``````````QD,X/,9#.0(/MD0D%XA#
+M.D2)^,'H$(A#.TR)^@^VQHA#/$2(>SU$B?#!Z!"(0SY,B?(/ML:(0S]$B'-`
+MQD-!`+X`````2(L\).@`````BU,T28MT)!A(BSPDZ`````!(B=Y,B>_H````
+M`$B+7"082(ML)"!,BV0D*$R+;"0P3(MT)#A,BWPD0$B#Q$C#9F9FD&9FD&9F
+MD&9FD$B#[$A(B5PD&$B);"0@3(ED)"A,B6PD,$R)="0X3(E\)$!)B?R)TT&)
+MSDR)1"0(0(AT)!=(BT=(3(LX3(G_Z`````!(B<5(A<`/A.X```!,B?_H````
+M`$F)Q4B%P'412(GN3(G_Z`````#IS@```)!(C4582(D$)$F+?1!$B?))B[0D
+M(`$``.@`````QD4EK$$/MT0D,&:)12!(BU0D"$B)56A,B7TH1(EU-(.-E```
+M`!))BT402(E%2$R);7A)C80DY````$B)15#&13`@2,>%H`````````#&13@[
+MQD4Y`@^V1"07B$4ZB=C!Z!"(13L/ML>(13R(73U$B?#!Z!"(13Y,B?(/ML:(
+M13]$B'5`QD5!`+X`````2(L\).@`````BU4T28MU&$B+/"3H`````$B)[DR)
+M_^@`````2(M<)!A(BVPD($R+9"0H3(ML)#!,BW0D.$R+?"1`2(/$2,-)B=%(
+MA?\/E,)(A?8/E,`)T*@!=1)-A<D/E,)(A<D/E,`)T*@!=`FX`````,-F9I!F
+M08'XA0!W#D$/M\"`O#A`"```_W4&N`````##0<9!..%!QD$Y`4'&03H39D6)
+M02!)B7$H28F)H````+@!````PV9F9I!F9F:09F9FD&9FD$B+1PB+0`2)!0``
+M``")PH'*```,`"7___/_0(3VB=$/1,A(BT<(B0A(BT<(B4@,2(M'"(E($$B+
+M1PB)2!1(BT<(B4@82(M'"(E(!,.0D)"03(M4)"!,BUPD,`^WQST1)P``?T`]
+M$"<```^-@0```#TB(0``='H](B$``&9FD&:0?Q`]("$``'1G9F9FD&9FD.MD
+M/4`A``!T5SU$(0``9I!T3NM2/8`G``!F9F:09F:0=#X]@"<``'\,+2`G``"#
+M^`)W,^LK/8"1``!T)#V`D0``?P\]@B<``'069F:09F:0ZQ0]@)0``'4-9F9F
+MD&9FD,8&0,8"`L8!!`^V%DB+1"08B!!F0<<"@`!F0<<#``!!Q@$@2(M$)`AF
+MQP```0^V%DB+1"00B!!F#[8&9D$#`F9!`P-(BU0D*&:)`F9!B0!!#[<22(M$
+M)#AFB1!!#[<2@\(+2(M$)$!FB1##9F:09I!!5T%6055!5%532(/L&$F)_TF)
+MUD"(="072(LONP````!F@WU8``^&AP(``&9F9I")V&;!Z`4/M\"+A(6<````
+MB=F#X1](T_BH`0^%5P(```^WTTB+A9`)``!(BPS02(7)#X1``@``O@````"+
+M03@E____`#WA`1``#X7!````387V#X4?`@``9H%Y((4`#X>>````2`^W02"`
+MO"A`"```_P^$BP```&:#>2!_=R5(#[:$*$`(``!(BY48"0``2&G`B`$``$B+
+M1!!(#[90".E5`0``9H%Y(($`=RI(#[=!($@/MH0H0`@``$B+E6@)``!(:<#(
+M#P``2(M$$`@/ME`(Z2,!``!(#[=!($@/MH0H0`@``$B+E4`)``!(:<#0````
+M2(N$$(@````/ME`(Z?8```"Z_____^GL````9F9FD&:!>2"%``^'E0```$@/
+MMT$@@+PH0`@``/\/A((```!F@WD@?W<B2`^VA"A`"```2(N5&`D``$AIP(@!
+M``!(BT002`^V4`CK7F:!>2"!`'<G2`^W02!(#[:$*$`(``!(BY5H"0``2&G`
+MR`\``$B+1!`(#[90".LO2`^W02!(#[:$*$`(``!(BY5`"0``2&G`T````$B+
+MA!"(````#[90".L%NO____]F@7D@A0!W.D@/MT$@@+PH0`@``/]T*TB+M1@)
+M``!F@7D@A0!W%4@/MH0H0`@``$AIP(@!``!(`<;K!TB!QGB&`0!!.%<(=7E-
+MA?9T"T$/MT8P9CM!('5I@'PD%P9T3XM1.('B____`('ZX0$0`'0^2`^V1D"H
+M`G0UJ`1T,:@!=2V`ON``````9I!U(H'ZX0$/`'0M#[9$)!>(022Z`0```$B)
+MSDR)_^@`````ZQ,/MD0D%XA!)`^W\TR)_^@`````_\-F.5U8#X=]_?__@'PD
+M%X$/A(<!``!!O`````!(BY7H````2(V%Z````$@YT'0+0?_$2(L22#G0=?5F
+M187D#X19`0``2(V%Z````$B)PD@YA>@````/A$(!``!)B<5(B40D"&9FD&:0
+M2(G32(G7Z`````!(B<%-A?9T)4$/MT8P9CM!('0:2(M#"$B)2PA(B1E(B4$(
+M2(D(0?_,Z>4```!F@7D@A0`/AY4```!(#[=!(("\*$`(``#_#X2"````9H-Y
+M(']W(D@/MH0H0`@``$B+E1@)``!(:<"(`0``2(M$$$@/ME`(ZUYF@7D@@0!W
+M)T@/MT$@2`^VA"A`"```2(N5:`D``$AIP,@/``!(BT00"`^V4`CK+T@/MT$@
+M2`^VA"A`"```2(N50`D``$AIP-````!(BX00B`````^V4`CK!;K_____03A7
+M"'4DBT$X)?___P`]X0$/`'05#[9$)!>(021(B<Y(B>_H`````.L228M%"$F)
+M30A,B2E(B4$(2(D(0?_,9D6%Y'022(M4)`A(.97H````#X7+_O__2(/$&%M=
+M05Q!74%>05_#9F9FD&9F9I!F9F:00;@`````9H-_6``/AAT!``!,BX^0"0``
+M00^WP$F+#,%(A<D/A/<```!F@7D@A0`/AYL```!(#[=!(("\.$`(``#_#X2(
+M````9H-Y(']W(D@/MH0X0`@``$B+EQ@)``!(:<"(`0``2(M$$$@/ME`(ZV1F
+M@7D@@0!W)T@/MT$@2`^VA#A`"```2(N7:`D``$AIP,@/``!(BT00"`^V4`CK
+M-4@/MT$@2`^VA#A`"```2(N70`D``$AIP-````!(BX00B`````^V4`CK"V9F
+MD&9FD+K_____N/\```!F@7D@A0!W#D@/MT$@9@^VA#A`"```#[?`2&G`B`$`
+M`$@#AQ@)``!`./)U&D@/MD!`J`%T$:@$=`VX`0```,-F9F:09F:00?_`9D0Y
+M1U@/A^K^__^X`````,-F9F:09F9FD&9F9I!(BT=(3(L`38N8D!```$&Z````
+M`+X`````9D&#>%@`=DA-BXB0"0``#[?628,\T0!T+DF+#-&+03@E____`#WA
+M`1``=!L/MT<P9CM!('412(G02,'@!F9&.508"'0+9I#_QF9!.7!8=[]F03EP
+M6'0*0?_"9D&#^A]VFD$/M\)FD,-F9F:09F9FD&9F9I!F9I!(@W]0`'0>2(M'
+M4,8`<$B+1U!`B'`"2(M'4,9`!P!(BT=0B%`,\\-F9I!F9I!F9I#SPV9F9I!F
+M9F:09F:09F:028GXB?)(B=&!X?\!``!(BX>0"0``2(,\R`!T+$B+/,@/MD<E
+M00^VL-X```")\=/@1`^WP`^WTKC__P``T^`APDB)^$$YT'0%N`````#SPY!5
+M4TB#[`A(B?5F@7XXX0$/A:T````/MD8Z@^@1/`$/AYX```"X_P```&:!?B"%
+M`'<-2`^W1B`/MH0X0`@``(G`2&G`T````$B)PT@#GT`)``"`>T3_=4RX%```
+M`("]F`````!T"0^VA9@````!P`^VP&G`0$(/`(F#D````$C'@Z``````````
+M2(F;J````$B-LY````!(BW\HZ`````#&0T0`2(U#*$B+4`A(B6@(2(E%`$B)
+M50A(B2K^0T7IJ````+C_````9H%]((4`=PU(#[=%(`^VA#A`"```B<!(:<"(
+M`0``2(G#2`.?&`D``(M%."7___\`/>$!$`!T;(![>/]U3+@4````@+V8````
+M`'0)#[:%F`````'`#[;`:<!`0@\`B8,H`0``2,>#.`$```````!(B9M``0``
+M2(VS*`$``$B+?RCH`````,9#>`!(C4,@2(M0"$B):`A(B44`2(E5"$B)*OY#
+M>TB#Q`A;7<-F9F:09F9FD&9F9I!F9I!32(GS@'YX_W042(VV*`$``$B+?RCH
+M`````,9#>/];PU-(B?.`?D3_=!1(C;:0````2(M_*.@`````QD-$_UO#2(/L
+M*$B)7"0(2(EL)!!,B60D&$R);"0@28G\2(GS9H%^..$!#X76````#[9&.H/H
+M$3P!#X?'````N?\```!F@7X@A0!W#4@/MT8@#[:,.$`(``")R$AIP-````!(
+MB<5)`ZPD0`D``('Y_P````^$8@$``/Y-14R-;2A,B>_H`````$B)P4@YV'5+
+M2(GN3(GGZ`````!,.6TH#X0V`0``QX60`````"TQ`4C'A:``````````2(FM
+MJ````$B-M9````!)BWPD*.@`````QD5$`.D``0``2(U5*$B+12A(B4@(2(D!
+M2(E1"$B)32A(BU,(2(L#2(E0"$B)`NG6````D+G_````9H%[((4`=PY(#[=#
+M($(/MHP@0`@``(G(2&G`B`$``$B)Q4D#K"08"0``BT,X)?___P`]X0$0``^5
+MP('Y_P````^5P@^VP(7"#X2"````_DU[3(UM($R)[^@`````2(G!2#G8=49(
+MB>Y,B>?H`````$PY;2!T6L>%*`$````M,0%(QX4X`0```````$B)K4`!``!(
+MC;4H`0``28M\)"CH`````,9%>`#K)V:02(U5($B+12!(B4@(2(D!2(E1"$B)
+M32!(BU,(2(L#2(E0"$B)`DB+7"0(2(ML)!!,BV0D&$R+;"0@2(/$*,-FD$B#
+M[!A(B1PD2(EL)`A,B60D$$B)^TB)]4@/MT8P9D0/MJ0X0`@``$$/M_1(:?:(
+M`0``2`.W&`D``$B!QB`!``#H`````$@/MU4P2(.\TT`$````=!Y(BX330`0`
+M`$B#N(``````=0Q(QX330`0```````!(#[=%,,:$&$`(``#_00^W]$B-NY`/
+M``#H`````$$/M\1(BY,8"0``2&G`B`$``(!\$&K_=`Q(C3002(G?Z`````!(
+MB>Y(B=_H`````$$/M\1(BY,8"0``2&G`B`$``,9$$$(`2(N3&`D``,9$$$,!
+M2(L<)$B+;"0(3(MD)!!(@\08PV9F9I!F9I!F9I!!5T%6055!5%532(/L"$F)
+M_4&)]T&^@````&9FD&9FD$$/M\9F0@^VA"A`"```9CW_``^$ZP```&9!@?Z!
+M``^'?`````^WP$AIP,@/``!)B<1-`Z5H"0``O0````!!@'PD6``/AK<```!)
+MC5PD2&:02(G?Z`````!(C4CP2(M3"$B)0PA(B1A(B5`(2(D"BT%`)0#__P`]
+M``#_`'45]D%#!'0/2(-Y.`!T"$B+03A$B'@!_\5!.&PD6'>UZV-F9I`/M\!(
+M:<#0````2(G"20.50`D``+T`````@'H[`'9!D(GI#[;!2(M,PEA(A<ET)(M!
+M0"4`__\`/0``_P!U%?9!0P1T#TB#>3@`=`A(BT$X1(AX`?_%0#AJ.W?%9F:0
+M9I!!_\=!_\9F08'^A0`/AN[^__]-.:W0"```=1))@<4`%```1(G^3(GOZ+/^
+M__](@\0(6UU!7$%=05Y!7\-F9F:04TB)^T@/MD9;9@^VM#A`"```QH0X0`@`
+M`/\/M_9(C;\`$```Z`````!(B[O0"```O@````#H9O[__UO#9F9FD%532(/L
+M"$B)_4@/MT9`9@^VG#A`"```QH0X0`@``/\/M_-(C;_(#P``Z``````/M]M(
+MBY5`"0``2&G#T````(!\$%#_=`Q(C3002(GOZ`````!(B[W0"```O@````#H
+M_?W__TB#Q`A;7<-F9I!F9I"Y`````+K0````2(GX9F:0B`A(_\!(_\IU]L9'
+M1/_&1U#_2(U'*$B)1RA(B4<PPY!(@^PH2(E<)`A(B6PD$$R)9"083(EL)"!(
+MB?U(C;_(#P``Z`````"Z`````(3`#X71````2(V]R`\``.@`````08G%NX+_
+M__\/ML.`O"A`"```_W40.)W@````<P^(G>````#K!__#@/N%=MRZ`````(#[
+MA@^$BP````^VPT2(K"A`"```00^WQ4QIX-````!,B>=(`[U`"0``Z`````!(
+MBY5`"0``9@^VPV9!B4040(!]40%U#TB+A4`)``!F0<=$!$S__T$/M]U(BX5`
+M"0``2&G;T````,9$`T(`2(N%0`D``&;'1`-.``!(B[W0"```O@````#HQ?S_
+M_TB)VD@#E4`)``!(B=!(BUPD"$B+;"003(MD)!A,BVPD($B#Q"C#9F9FD&9F
+M9I!F9F:09F:02(/L"$@/MD8(9@^VM#C&"```QH0XQ@@``/\/M_9(@<<X$```
+MZ`````!(@\0(PV:0N0````"ZB`$``$B)^&9FD(@(2/_`2/_*=?;&1WC_QD=J
+M_\9'>A](C4<@2(E'($B)1RC#9F9FD&9FD&9FD&9FD$%505154TB#[`A(B?U(
+MC;^0#P``Z`````"Z`````(3`#X4_`0``2(V]D`\``.@`````08G%NP````!F
+M9I!F9I`/ML.`O"A`"```_W469@^VPV8YA=P```!S#6:)A=P```#K!/[#>=FZ
+M`````(#[@`^$\`````^VPT2(K"A`"```00^WQ4QIX(@!``!,B>=(`[T8"0``
+MZ`````!(BY48"0``9@^VPV9!B404,$B+A1@)``!!QD0$0@!(BX48"0``0<9$
+M!&7_2(N%&`D``$'&1`1D_TB+A1@)``!!QD0$9O](BX48"0``0<9$!&C_2(N%
+M&`D``$'&1`1G_TB+A1@)``!!QD0$:?](BX48"0``0<:$!.(`````2(N%&`D`
+M`$'&A`0'`0``_TB)[^@`````2(N5&`D``$F)A!0@`0``@'U1`74-2(N%&`D`
+M`$&`3`1$`4$/M\5(:<"(`0``2(G"2`.5&`D``$B)T$B#Q`A;74%<05W#9F9F
+MD&9FD&9FD&9FD%532(/L"$B)_4B-OP`0``#H`````+H`````A,`/A1H!``!(
+MC;T`$```Z`````")Q[Z`____B?(/ML*`O"A`"```_W420#BUWP```',10(BU
+MWP```.L(_\9`@/Z!=M>Z`````$"`_H(/A,\```")\@^VPD"(O"A`"```#[?'
+M2&G`R`\``+D`````NL@/``!(`X5H"0``B`A(_\!(_\IU]@^WWTAIV\@/``!(
+MB=I(`Y5H"0``2(U"&$B)0AA(B=A(`X5H"0``2(/`&$B)0`A(B=I(`Y5H"0``
+M2(U"*$B)0BA(B=A(`X5H"0``2(/`*$B)0`A(B=I(`Y5H"0``2(U"2$B)0DA(
+MB=A(`X5H"0``2(/`2$B)0`A(BX5H"0``0(AT`UM(B[W0"```O@````#H;OG_
+M_TB)VD@#E6@)``!(B=!(@\0(6UW#9F9FD&9FD&9FD%-(B?M(C;\X$```Z```
+M``"Z`````(3`#X7+````2(V[.!```.@`````B<>^`````(GR#[;"@+P8Q@@`
+M`/]U$4`X<TQS$T"(<TSK#69FD&:0_\9`@/X#=MBZ`````$"`_@0/A($```")
+M\@^VPD"(O!C&"```#[?'2&G`J````+D`````NJ@```!(C808H`$``(@(2/_`
+M2/_*=?8/M]=(:=*H````2`':2(V"T`$``$B)@M`!``!(B4`(2(V"Z`$``$B)
+M@N@!``!(B4`(2(V"``(``$B)@@`"``!(B4`(2('"H`$``$"(<@A(B=!;PV9F
+MD$B#[!A(B5PD"$B);"002(G]2(V'"`$``+H`````2#F'"`$``'0F2(V_"`$`
+M`.@`````2(G#2(G'Z`````!(B>_H`````$B)0W!(B=I(B=!(BUPD"$B+;"00
+M2(/$&,-FD$B#[`A(C8<(`0``2(M0"$B)<`A(B09(B58(2(DR2(-^<`!T#$B#
+MQG#H`````&9FD$B#Q`C#9F9FD&9F9I!F9I!(@^P(2(V'&`$``+H`````2#F'
+M&`$``'032(''&`$``.@`````QD`0`$B)PDB)T$B#Q`C#9F9FD&9F9I!F9F:0
+M2(L&2(''&`$``$B+5PA(B4<(2(DX2(E0"$B)`DC'!@````##9F9FD&9F9I!F
+M9F:02(/L"$B-ER@!``"X`````$@YER@!``!T"$B)U^@`````2(/$",-F9F:0
+M9F:09F:02(L&2(''*`$``$B+5PA(B4<(2(DX2(E0"$B)`DC'!@````##9F9F
+MD&9F9I!F9F:02(/L"$B-ET@!``"X`````$@YET@!``!T(DB)U^@`````O@``
+M``"YH````$B)PF:00(@R2/_"2/_)=?5(@\0(PTB!QT@!``!(BT<(2(EW"$B)
+M/DB)1@A(B3##9F:09F:02(/L"$B-EU@!``"X`````$@YEU@!``!T"$B)U^@`
+M````2(/$",-F9F:09F:09F:02(L&2(''6`$``$B+5PA(B4<(2(DX2(E0"$B)
+M`DC'!@````##9F9FD&9F9I!F9F:02(/L"$B-AS@!``"Z`````$@YAS@!``!T
+M%TB!QS@!``#H`````$C'0"``````2(G"2(G02(/$",-F9F:09F9FD$B+!DB!
+MQS@!``!(BU<(2(E'"$B).$B)4`A(B0)(QP8`````PV9F9I!F9F:09F9FD$B#
+M[$A(B5PD&$B);"0@3(ED)"A,B6PD,$R)="0X3(E\)$!(B?U)B?1F@7X@A0`/
+MAYP```!(#[=&(("\.$`(``#_#X2)````9H-^(']W(D@/MH0X0`@``$B+EQ@)
+M``!(:<"(`0``2(M$$$@/MD`(ZV5F@7X@@0!W)T@/MT8@2`^VA#A`"```2(N7
+M:`D``$AIP,@/``!(BT00"`^V0`CK-D@/MT8@2`^VA#A`"```2(N70`D``$AI
+MP-````!(BX00B`````^V0`CK#&9F9I!F9I"X_____P^VP$P/MK0HQ@@``$UI
+M]J@```!-C;0NH`$``$B+E6@)``!,C;HXN`\`9D&!?"0@A0!W&DD/MT0D($@/
+MMH0H0`@``$AIP,@/``!,C3P"28M4)$@/MD(!@_@2=!`]D0````^$)0$``.F0
+M`0``28L&2(E$)`B]``````^V0@F(1"07#[92&HA4)!9!O0````!!@'X.`'8_
+M28U>8&:02(G?Z`````!(B<5(BT,(2(EK"$B)70!(B44(2(DH3#E]4'4,#[9%
+M>4$Z1"0E=`J00?_%13AN#G?'28-\)'@`=`])BW0D>$B+?"0(Z`````!,B>9(
+MBWPD".@`````#[:5P@```(U"`8B%P@```(#Z`W<F@'PD%@!U'T$/ME0D)4B+
+M=5!!N`````"Y`@```$R)]^@`````ZSH/MI7"````C4(!B(7"````@/H"=B6`
+M?"06`'4>QD5#`L9%0O^`943^2(GN2(M\)`CH`````.FN````#[9,)!8/ME0D
+M%TR)_DR)]^@`````Z90```!F9F:0N0````!!O0````!!@'X.`'8[28U>8$B)
+MW^@`````2(G!2(M#"$B)2PA(B1E(B4$(2(D(3#EY4'4+#[9!>4$Z1"0E=`E!
+M_\5%.&X.=\E(#[9!0*@"=!JH!'06J`%T$D$/ME0D)4B+<5!,B??H`````$F#
+M?"1X`'0-28MT)'A(B>_H`````$R)YDB)[^@`````2(M<)!A(BVPD($R+9"0H
+M3(ML)#!,BW0D.$R+?"1`2(/$2,-F9F:09F:09F:09F:02(/L*$B)7"0(2(EL
+M)!!,B60D&$R);"0@28G\28GU2(LO2(GOZ`````!(B<-(A<!T<4B)[^@`````
+M2(G"2(7`=&%(C7M8QD,XX<9#.0'&0SH0QD,ENV9!#[9%6V:)0R!)BP0D2(E#
+M*,=#-)````!(C4(02(E#2$B)4WC&0`$`QD(00$C'@Z``````````O@````#H
+M`````$B)WDB)[^@`````2(M<)`A(BVPD$$R+9"083(ML)"!(@\0HPV9FD&:0
+M2(/L*$B)'"1(B6PD"$R)9"003(EL)!A,B70D($F)_$F)]4&)UDB++TB)[^@`
+M````2(G#2(7`='5(B>_H`````$B)PDB%P'1E2(U[6,9#..'&0SD!QD,Z$,9#
+M);MF00^V15MFB4,@28L$)$B)0RC'0S20````2(U"$$B)0TA(B5-XQD`!$,9"
+M$$!$B'`)2,>#H`````````"^`````.@`````2(G>2(GOZ`````!(BQPD2(ML
+M)`A,BV0D$$R+;"083(MT)"!(@\0HPV9FD&9FD$B#[#A(B5PD"$B);"003(ED
+M)!A,B6PD($R)="0H3(E\)#!)B?Q)B?5!B=9!B<](BR](B>_H`````$B)PTB%
+MP`^$@P```$B)[^@`````2(G"2(7`='-(C7M8QD,XX<9#.0'&0SH01(AS)69!
+M#[9%6V:)0R!)BP0D2(E#*,=#-)````!(C4(02(E#2$B)4WC&0`&1QD(00$2(
+M<`E$B'@*2,>#H`````````"^`````.@`````2(G>2(GOZ`````"_H(8!`.@`
+M````2(M<)`A(BVPD$$R+9"083(ML)"!,BW0D*$R+?"0P2(/$.,-F9I!FD$B#
+M[#A(B5PD"$B);"003(ED)!A,B6PD($R)="0H3(E\)#!)B?Q)B?=)B<U!B=9(
+MBR](B>_H`````$B)PTB%P'4/0<:%X0````'IC````&:02(GOZ`````!(B<)(
+MA<!U%4B)WDB)[^@`````0<:%X0````'K94B->UC&0SCAQD,Y`<9#.A!$B',E
+M9D$/MD=;9HE#($F+!"1(B4,HQT,TD````$B-0A!(B4-(2(E3>,9``1+&0A!`
+M1(AP"4C'@Z``````````O@````#H`````$B)WDB)[^@`````2(M<)`A(BVPD
+M$$R+9"083(ML)"!,BW0D*$R+?"0P2(/$.,-F9I!54TB#[`A(B?U(B?-F@7X@
+MA0`/AY@```!(#[=&(("\.$`(``#_#X2%````9H-^(']W(T@/MH0X0`@``$B+
+MEQ@)``!(:<"(`0``2(M$$$AF#[9(".M@9H%^(($`=RA(#[=&($@/MH0X0`@`
+M`$B+EV@)``!(:<#(#P``2(M$$`AF#[9(".LP2`^W1B!(#[:$.$`(``!(BY=`
+M"0``2&G`T````$B+A!"(````9@^V2`CK!;G_````OO\```!F@7L@A0!W#D@/
+MMT,@9@^VM"A`"```9H'Y_P!T'`^WP8"\*,8(``#_#Y3"9H'^_P`/E,`)T*@!
+M=!!(B=Y(B>_H`````.F(````#[?!2`^VO"C&"```2&G_J````$B-O"^@`0``
+M9@^V4SMF#[9#/,'@"`'"9H'B_P$/MD,]@_@!=`6#^`AU0`^WTDB+A9`)``!(
+MBP302#M#:'4L#[=(,HG*9L'J!0^WTH/A'TC'P/[___](T\`A1)5<2(M#:`^W
+M<#+H`````)!(B=Y(B>_H`````$B#Q`A;7<-F9F:09F9FD&9FD&9FD$B#[#A(
+MB5PD"$B);"003(ED)!A,B6PD($R)="0H3(E\)#!)B?U)B?1!B==(BR](#[=&
+M($@/MH0H0`@``$AIP(@!``!)B<9,`[48"0``2(GOZ`````!(B<-!#[=4)#*)
+MT&;!Z`4/M\"+1(5<B=&#X1](T_BH`0^%J0```$B%VP^$H````$B->UA!#[9$
+M)"4/MHW>````T^`)T,9#..'&0SD!QD,Z#XA#.V;!Z`B(0SQ$B'L]28N&U```
+M`$B)0SY,B6-HQD,EJD$/MT8P9HE#($F+10!(B4,HQT,T`````$C'0T@`````
+M2,>#H`````````"^`````.@`````2(G>2(GOZ`````!!#[=,)#*)RF;!Z@4/
+MM]*#X1^X`0```$C3X`E$E5Q(BUPD"$B+;"003(MD)!A,BVPD($R+="0H3(M\
+M)#!(@\0XPV9FD&9FD&9FD$B#["A(B1PD2(EL)`A,B60D$$R);"083(ET)"!)
+MB?Q(BT=(3(LP3(GWZ`````!(B<5(A<!U#D'&A"3A`````>FC````3(GWZ```
+M``!)B<5(A<!U'$'&A"3A`````4B)[DR)]^@`````ZWUF9I!F9I!(C5U8QD4X
+M)<9%):M!#[=$)#!FB44@3(EU*,=%-`@```#'A90````(````28M%$$B)14A(
+MC4`(2(E%4,9%,"1,B6UX2,>%H`````````"^`````$B)W^@`````28MU&+H(
+M````2(G?Z`````!(B>Y,B??H`````$B+'"1(BVPD"$R+9"003(ML)!A,BW0D
+M($B#Q"C#9F9FD&9F9I!F9F:02(/L*$B)'"1(B6PD"$R)9"003(EL)!A,B70D
+M($F)_$B+1TA,BS!,B??H`````$B)Q4B%P'4.0<:$).$````!Z:L```!,B??H
+M`````$F)Q4B%P'4<0<:$).$````!2(GN3(GWZ`````#I@@```&9FD$B-75C&
+M13B>QD4Y$,9%12#&126K00^W1"0P9HE%($R)=2C'130@````QX64````"```
+M`$F+11!(B45(3(EM>$B-0"!(B450QD4P)$C'A:``````````O@````!(B=_H
+M`````$F+=1BZ(````$B)W^@`````2(GN3(GWZ`````!(BQPD2(ML)`A,BV0D
+M$$R+;"083(MT)"!(@\0HPV9F9I!(@^PX2(E<)`A(B6PD$$R)9"083(EL)"!,
+MB70D*$R)?"0P28G\08GV2(M'2$R+*$R)[^@`````2(G#2(7`=1%!QH0DX0``
+M``'IN@```&9FD$R)[^@`````2(G%2(7`=2!!QH0DX0````%(B=Y,B>_H````
+M`.F.````9F9FD&9FD$R->UC&0S@2183V=!/&0SD!QD,Z@,9#/$#K"69FD&:0
+MQD,\),9#):M!#[=$)#!FB4,@3(EK*,=#-&````#'@Y0````(````2(M%$$B)
+M0TA(B6MX2,>#H`````````"^`````$R)_^@`````2(MU&+I@````3(G_Z```
+M``!(B=Y,B>_H`````$B+7"0(2(ML)!!,BV0D&$R+;"0@3(MT)"A,BWPD,$B#
+MQ#C#9F:09F:02(/L*$B)'"1(B6PD"$R)9"003(EL)!A,B70D($B)^TB+1TA,
+MBS!,B??H`````$B)Q4&\``@``$B%P'4,QH/A`````>G!````3(GWZ`````!)
+MB<5(A<!U&,:#X0````%(B>Y,B??H`````.F:````D&9!@?P``;C_````1`]#
+MX,9%.!K&13D(QD4Z",9%.P!$B&4\QD4]`,9%):L/MT,P9HE%($R)=2A%#[?D
+M1(EE-,>%E`````@```!)BU402(E52$2)X$@!T$B)15#&13`D3(EM>$C'A:``
+M````````2(U=6+X`````2(G?Z`````!)BW481(GB2(G?Z`````!(B>Y,B??H
+M`````$B+'"1(BVPD"$R+9"003(ML)!A,BW0D($B#Q"C#9F9FD&9FD&9FD$B#
+M[!A(B1PD2(EL)`A,B60D$$F)_$B+1TA(BRA(B>_H`````$B)PTB%P'4+0<:$
+M).$````!ZU_&0#@5QD`EJT$/MT0D,&:)0R!(B6LHN0$```"Z`0```$B)WDB)
+M[^@`````A,!U&DB)WDB)[^@`````0<:$).$````!ZQIF9F:02,>#H```````
+M``!(B=Y(B>_H`````$B+'"1(BVPD"$R+9"002(/$&,-F9F:09F:0N@0```!`
+M#[;'@_@7=T>)P/\DQ0````"#PB3K.8/".)#K,X/"$.LN@\(<ZRF#PDB0ZR.#
+MPASK'H/"/.L9@\(DD.L3@\(8ZPZ#PA3K"8/"2)#K`X/",(G0PV9F9I!F9F:0
+M2(/L&$B)7"0(2(EL)!!(B?U(B?.`?FK_=!,/MG9J2(L_Z`````#&0VK__DU$
+M2(M<)`A(BVPD$$B#Q!C#9F9FD$@/MD9`J`)T#*@$=`BH`0^$ZP```(!^:O\/
+MA>$```!(BP>+@!@!``")!0````!!B<&Y`````+@!````9F:09I!!B<!!T^!%
+MA<AU.8A.:DB+%T2)R$0)P(F"&`$``$B+!XN`6`$``(D%`````$&)P44AP0^$
+M?P```$B+!T2)B%@!``#K<__!@/D?=K5(BP>+@!P!``")!0````!!B<&Y````
+M`+@!````08G`0=/@187(=3Z-02"(1FI(BQ=$B<A$"<")@AP!``!(BP>+@&`!
+M``")!0````!!B<%%(<%T&4B+!T2)B&`!``#K#69FD&9FD/_!@/D?=K#^1T1F
+M9I!F9I#SPV9F9I!F9F:09F:09F:02(/L&$B)7"0(2(EL)!!(B?U(B?.`?E#_
+M=!,/MG902(L_Z`````#&0U#__DU$2(M<)`A(BVPD$$B#Q!C#9F9FD(!^4/\/
+MA=8```!(BP>+@!@!``")!0````!!B<&Y`````+@!````08G`0=/@187(=36(
+M3E!(BQ=$B<A$"<")@A@!``!(BP>+@%@!``")!0````!!B<%%(<%T?4B+!T2)
+MB%@!``#K<?_!@/D?=KE(BP>+@!P!``")!0````!!B<&Y`````+@!````9F9F
+MD&9FD$&)P$'3X$6%R'4UB$Y02(L71(G(1`G`B8(<`0``2(L'BX!@`0``B04`
+M````08G!12'!=!-(BP=$B8A@`0``ZP?_P8#Y'W:Y_D=$9F:09F:0\\-F9F:0
+M9F9FD&9FD&9FD$%455-)B?Q(BQ^]`````&:#>U@`#X8B`0``9F:09F:0#[?5
+M2(N#D`D``$B#/-``#X3[````00^V3"0(2(L$T&:!>""%``^'Q0```$@/MU`@
+M@+P:0`@``/\/A+(```!F@W@@?W<M2`^VA!I`"```2(N3&`D``$AIP(@!``!(
+MBT002`^V0`@YR`^$BP```.F>````#[?52(N#D`D``$B+!-!F@7@@@0!W*T@/
+MMT`@2`^VA!A`"```2(N3:`D``$AIP,@/``!(BT00"`^V0`@YR'1'ZUT/M]5(
+MBX.0"0``2(L$T$@/MT`@2`^VA!A`"```2(N30`D``$AIP-````!(BX00B```
+M``^V0`@YR'0+ZR&0@?G_````=1@/M\5(BY.0"0``2(L\PKX`````Z`````#_
+MQ68Y:U@/A^3^__];74%<PV9F9I!F9F:09F9FD&9FD$B+5G!(A=)T'$B+1CA(
+MB4(82(M&0$B)0B!(BT9(2(E"*,9"$`'SPV9FD&9FD&9FD$B+5G!(A=)T&$B+
+M0AA(B48X2(M"($B)1D!(BT(H2(E&2//#9F9FD&9FD&9FD&9FD%532(/L"$B)
+M_4B)\T@Y?B@/A,H```"`?B0`#X6G````#[9&.(/X%70)@_A5#X65````2(M3
+M<$B%T@^$B````(!Z$`$/A7X```!F@7H8X0&0=75(BXT8"0``2(VQ>(8!`&:!
+M>R"%`'<92`^W0R!(#[:$*$`(``!(:<"(`0``2(TT`0^V0AJ#^`=T'X/X!W\'
+M@_@&=![K,8/X#&9F9I!F9I!T((/X#702ZQYF@V9B_6:0ZQ5F@TYB`NL.9H-F
+M8O=FD.L%9H-.8@A(@WMX`'022(US>$B)[^@`````9F:09F:09H%[..$!#X5F
+M`0``9H%[((4`#X><````2`^W0R"`O"A`"```_P^$B0```$B+E1@)``!(C;)X
+MA@$`9H%[((4`=Q1(#[:$*$`(``!(:<"(`0``2(TT`H![)`!U60^V0SJ#^`=T
+M((/X!W\)@_@&="1FD.M"@_@,=#B#^`UF9I!F9I!T%^LP9H-F8OUF9F:09F:0
+MZR)F@TYB`NL;9H-F8O=FD.L2#[?!ZV(/M\'IIP```&:#3F((9H%[..$!#X6R
+M````@'LZ"P^%J````$B)[@^W2R`/M]$/MD5&_\C_P3G"?20/MD5&C5#_9H'Y
+MA0!W#0^WP8"\,$`(``#_=:</M\'_P3G0?..X_P```&8]_P!T7TB)[@^W2R`/
+MM]$/MD5&_\C_P3G"?2P/MD5&C5#_9F9FD&:!^84`=Q$/M\&`O#!`"```_P^%
+M7____P^WP?_!.=!\W[C_````9HE#(,9#)(!(B=Y(B>_H`````.DR`0``QD,D
+M`$@Y:RAT)TB+0W!(A<"0=!V`>!`!=0M(B=Y(B>_H`````$B-<W!(B>_H````
+M`$B#NX``````=`](C;.`````2(GOZ`````!(BWLH2(G>_Y.@````9H%[..$!
+M=6,/MD,Z@^@1/`%W6+K_````9H%[((4`=PU(#[=#(`^VE"A`"```@?K_````
+M#X2B````B=!(:<#0````2(G&2`.U0`D``(!^10`/A84```"`?E#_='](B>_H
+M`````.MU9F:09I"Z_P```&:!>R"%`'<-2`^W0R`/MI0H0`@``(G02&G`B`$`
+M`$B)QD@#M1@)``"+0S@E____`#WA`1``#Y7`@?K_````#Y7"#[;`A<)T(V:!
+M>SCA`74+#[9#.H/H$3P!=A"`?GL`=0I(B>_H`````&:02(/$"%M=PV9FD&9F
+MD&9FD$B#[!A(B5PD"$B);"002(G[2(GU#[=6,HG09L'H!0^W\(G1@^$?2,?`
+M_O___TC3P"%$MUQF@?K_#W1%#[?Z2(N+D`D``$B#//D`=#1(QP3Y`````"&$
+MLY@)```/M_)(C;M8#P``Z`````!(B>Y(B=_H`````$B)[DB)W^@`````2(M<
+M)`A(BVPD$$B#Q!C#D$%44TB#[`A)B?1(BY^0$```2(''6`\``.@`````B<8/
+MM\!(P>`&2`'828D$)+D`````ND````"("$C_P$C_RG7V#[?&2(/$"%M!7,-F
+M9F:00;@`````N`````!(@W]``'1;ZPQ)B<#K,V9F9I!F9I!(BW=`N0````!F
+M9F:09F:0#[;!2(-\QE@`=`I(BT3&6#A0>73/_\&`^01VY$B+1T!F@7A`A0`/
+MEL!-A<`/E<(/ML"%PK@`````20]%P//#D$B#["!(B1PD2(EL)`A,B60D$$R)
+M;"0828G\28G-9@^V^L'F"(T\/KX`````08!\)#``#X3H````28-\)%``#X3<
+M````08N$))0```"H";@!````#T3PNP````!(Q\4`````#[;+B?AF(T3-`&8[
+M1,T`#X69````#[9$S04\`P^4PCP'#Y3`"="H`70'0#ATS01U?4'&1"0D(`^V
+MVP^V5-T&#[9TW05,B>?H`````$F+5"10#[9$W0>(0@U-A>UT.TF+30!)BT0D
+M4$B)RDC!ZB")4`-)BT0D4(`(@$'VA"26````!'052(72=!!)BT0D4(E("$F+
+M1"10@"!_28M4)%!!#[9$)#"#Z`>(0@?K$F:0_\.`^P\/AD?___]F9I!FD$B+
+M'"1(BVPD"$R+9"003(ML)!A(@\0@PV9F9I!F9F:02(/L*$B)7"0(2(EL)!!,
+MB60D&$R);"0@2(G]2(GS9H%^((4`#X>6````2`^W1B"`O#A`"```_P^$@P``
+M`&:#?B!_=R)(#[:$.$`(``!(BY<8"0``2&G`B`$``$B+1!!(#[90".M?9H%^
+M(($`=R=(#[=&($@/MH0X0`@``$B+EV@)``!(:<#(#P``2(M$$`@/ME`(ZS!(
+M#[=&($@/MH0X0`@``$B+ET`)``!(:<#0````2(N$$(@````/ME`(ZP:0NO__
+M__^^_P```&:!>R"%`'<.2`^W0R!F#[:T*$`(``"`^O\/A)<````/MLJ`O"G&
+M"```_P^4PF:!_O\`#Y3`"="H`75[@'LD!G1U3`^VI"G&"```36GDJ````$V-
+MI"R@`0``#[?&2&G`B`$``$F)Q4P#K1@)``"`>SH!=2>_"@```.@`````2(G>
+M2(GOZ`````"Z`@```$R)[DR)Y^@`````ZQR_]`$``.@`````2(G>2(GOZ```
+M``!F9F:09F:02(M<)`A(BVPD$$R+9"083(ML)"!(@\0HPV9F9I!F9I!(@^PH
+M2(E<)`A(B6PD$$R)9"083(EL)"!)B?2)U4B+'TB)W^@`````2(G"2(7`=%_&
+M0#CAQD`Y`4"(:#K&0#L/00^W1"0P9HE"($B)6BC'0C0`````2,="2`````!(
+MQX*@`````````$B)UDB)W^@`````0(#]`74,OP4```#H`````.L*OU##``#H
+M`````$B+7"0(2(ML)!!,BV0D&$R+;"0@2(/$*,-F9F:09F9FD%532(/L"$B)
+M_4B)\V:!?B"%``^'F````$@/MT8@@+PX0`@``/\/A(4```!F@WX@?W<B2`^V
+MA#A`"```2(N7&`D``$AIP(@!``!(BT002`^V2`CK86:!?B"!`'<G2`^W1B!(
+M#[:$.$`(``!(BY=H"0``2&G`R`\``$B+1!`(#[9(".LR2`^W1B!(#[:$.$`(
+M``!(BY=`"0``2&G`T````$B+A!"(````#[9(".L(9F:0N?____^^_____V:!
+M>R"%`'<-2`^W0R`/MK0H0`@``(#Y_W0A#[;!@+PHQ@@``/\/E,)`@/[_#Y3`
+M"="H`74&@'LD!G4@2(-[>`!T#$B-<WA(B>_H`````$B)WDB)[^@`````ZVL/
+MML%(#[:\*,8(``!(:?^H````2(V\+Z`!``")\@^VPDAIP(@!``!(B<9(`[48
+M"0``@'LD`'0*N@$```#H`````$B#>W@`=!-(C7-X2(GOZ`````!F9F:09F:0
+M2(G>2(GOZ`````!F9I!FD$B#Q`A;7<-F9I!F9I!F9I!(@^PX2(E<)`A(B6PD
+M$$R)9"083(EL)"!,B70D*$R)?"0P28G_28GT3(LW3(GWZ`````!(B<5(A<`/
+MA(X```!,B??H`````$F)Q4B%P'412(GN3(GWZ`````#K<69F9I!(C5U8QD4X
+MX<9%.0'&13H.00^W1"0P9HE%(&9!@V0D8/=)BP=(B44HQT4T``@``$F+11!(
+MB45(3(EM>$C'A:``````````O@````!(B=_H`````(M5-$F+=1A(B=_H````
+M`$B)[DR)]^@`````2(M<)`A(BVPD$$R+9"083(ML)"!,BW0D*$R+?"0P2(/$
+M.,-(@^P82(D<)$B);"0(3(ED)!!(B?U!B?1(BT=(2(L82(G?Z`````!(B<)(
+MA<!T1,9`.!O&0#D!1(A@/`^W13!FB4(@QH*8````#TB)6BC'0C0`````2,="
+M2`````!(QX*@`````````$B)UDB)W^@`````2(L<)$B+;"0(3(MD)!!(@\08
+MPV9F9I!F9I!F9I!(@^P82(D<)$B);"0(3(ED)!!(B?U(BT=(3(L@3(GGZ```
+M``!(B<-(A<!T<$R)Y^@`````2(G"2(7`=13&A>$````!2(G>3(GGZ`````#K
+M3,9#.``/MT4P9HE#(,:#F`````],B6,HQT,T`````$C'0T@`````2(M"$$B)
+M0U#&0S`D2(E3>$C'@Z``````````2(G>3(GGZ`````!(BQPD2(ML)`A,BV0D
+M$$B#Q!C#D$%6055!5%5328G^28GU2(G3QD)#`<9"0@"^!@```$R)[^@`````
+M2(-[4`!T%DB+4QA(BT,02(E0"$B)`DB+0U#^2%B`>WL`=!]F9F:09F:03(GW
+MZ`````"_`0```.@`````@'M[`'7H2(.[&`$```!T'@^VLP4!``!(B[L8`0``
+MN@$```#H`````&9FD&9FD$B#>U``=!D/MG-Y2(M[4+H!````Z`````!F9F:0
+M9F:02(-[.``/A)D```!(BVLX2(.]@`````!U>TB#O8@`````=7'V0T0$=21!
+M_H;O$P``3(GWZ`````!(BT,X#[9P`;H!````3(GWZ`````!(BT,X#[90`@^V
+M<`%(Q\<`````N`````#H`````$B+4SA)B[;0"```OP$```#H`````$B+4SA)
+MB[;0"```OP8```#H`````$C'0S@`````2,=%8`````!(@WM8`'022(M36$@/
+MMD-Y2,=$PE@`````2(M3"$B+`TB)4`A(B0)!_DT.2(G>3(GWZ`````!!@'T)
+M_W150;P`````08!]#@!V.$F-;6!(B>_H`````$B)PTB+10A(B5T(2(DK2(E#
+M"$B)&(![0O]U"T'_Q$4X90YWU.L&13AE#G<00<9%"?],B>Y,B??H`````%M=
+M05Q!74%>PY")\`^VP$B-!,!(P>`'!6!7``")!\-F9F:09F9FD&9FD$&)T$B)
+M^;\`````B?)(B<A(A=)T"T"(.$C_P$C_RG7UB3&)\DB!ZF!7``!(N(_C.([C
+M.([C2/?B2,'J"HA1!$0XPG8$1(A!!+H`````@'D$`'8?#[;"QD0!!_](C03`
+M2,'@!\:$",17``#]_\(X401WX<9!!@#&004`N@````"0#[;"2&G`L````$B-
+MA`@`0@``QD`+`8A0"O_"@/H?=N#SPV9F9I!F9F:09F:09F:005154TF)]$B)
+M^[T`````@'\$`'9#B>H/ML)(C03`2,'@!T@!V("XQ%<``/UT(DB-N+Q7``"Z
+M"````$R)YN@`````A,!T"D`/ML7K$69F9I#_Q4`X:P1WO;C_````6UU!7,-F
+M9F:09F9FD&9FD&9FD%-(B?OH`````+H)````//]T$P^VP$B-!,!(P>`'#[:4
+M&&97``")T%O#9F9FD&9FD$B#["A(B5PD"$B);"003(ED)!A,B6PD($F)_4B)
+M\TB-MI````!)B=Q(BZN8````@'T&``^$3@$``$B)[^@`````B<$\_P^$/`$`
+M``^V0P&#^`%T<(/X`7\,A<!T*&9FD.DB`0``@_@0#X21````/9`````/A-4`
+M``!F9F:09F:0Z0(!``"`O0M"````9F9FD`^%\0```,:%"T(```'^308/MM%!
+MN0````!!N`````"Y`````$R)[DB)[^@`````Z<,```"`O0M"````#X6V````
+MQH4+0@```?Y-!@^VT4&Y`````$&X`````+D!````3(GN2(GOZ`````#IB```
+M`+H!````#[;"2&G`L````$B-A"@`0@``.$@(=0L/MD`)03I$)`ET!__"@/H?
+M=M?^308/MM%-B>%%#[9$)`FY$````$R)[DB)[^@`````ZSE(#[:#J@```$AI
+MP+````#&A"@+0@```?Y-!@^VT4&Y`````$&X`````+F0````3(GN2(GOZ```
+M``!(BUPD"$B+;"003(MD)!A,BVPD($B#Q"C#055!5%532(GU28G538G,08G)
+MNP`````/ML-(:<!0$```2#EL."!U:+D`````#[;#2&GP4!````^WP4C!X`5(
+M`?!,C10X38U:0$$/MD,,A,`/E,(\\`^4P`G0J`%T(DF):C!-B6HX9D6)0P)%
+MB$I`28L$)$F)0D1!QD,,_^L29I#_P6:!^8$`=JYF9F:09F:0_\.`^P-V@%M=
+M05Q!7<-FD$B#[`A)B?.)T$B)_DR-EV!!``#&APM"````0;D`````0;B0````
+M3(G19F9FD&9FD$2("4C_P4G_R'7U0<9"`0!!Q@)`2,>&`$(```````!(B;[X
+M00``#[;`2(T$P$C!X`=(BX0PO%<``$B)AO!!``!(@<9@00``3(G?Z`````!(
+M@\0(PV9F9I!F9F:09F9FD$B#[`A)B?.)T$B)_DR-EV!!``#&APM"````0;D`
+M````0;B0````3(G19F9FD&9FD$2("4C_P4G_R'7U0<9"`0%!Q@)`2,>&`$(`
+M``````!(B;[X00``#[;`2(T$P$C!X`=(BX0PO%<``$B)AO!!``!(@<9@00``
+M3(G?Z`````!(@\0(PV9F9I!F9F:09F9FD%532(/L"$B)]8G328GYN@$````/
+MML-(C03`28G#2<'C!P^VPDAIP+````!*C80(`$(``(!X"P$/A;,```"(6`B(
+M2`G&0`L`2`^V0`I(:<"P````3HV4"&!!``!!N`````"^D````$R)T&9F9I!F
+M9I!$B`!(_\!(_\YU]4'&0@$00<8"0$&(2@D/MM)(:=*P````3`'*2(V*`$(`
+M`$@/MD$*2&G`L````$P!R$C'@`!"````````2(FX^$$``$N+A`N\5P``2(F"
+M\$$``$@/MG$*2&GVL````$J-M`Y@00``2(GOZ`````#K%F9FD&9FD/_"@/H?
+M#X8F____N`$```!(@\0(6UW#9F:09F:09F:0055!5%532(/L"$F)]4F)U$R)
+MS4&)R42)P4F)^KH!````#[;=#[;"2&G`L````$P!T$B-L`!"``"`?@L!#X62
+M````QD8+`$R)D/A!``!(#[9&"DAIP+````!.C9P08$$``$&X`````+Z0````
+M3(G8D$2(`$C_P$C_SG7U0<9#`9!!Q@-`08A;!D&(2P=%B$L)2(M%`$F)0Q`/
+MMO)(:?:P````3`'62,>&`$(```````!(B;[X00``28M$)%Q(B8;P00``2('&
+M8$$``$R)[^@`````ZQ#_PH#Z'P^&1?___[@!````2(/$"%M=05Q!7<.04TB)
+M\TF)TT2)PDB)_DR-EV!!``!!N0````!!N)````!,B=!$B`A(_\!)_\AU]4'&
+M0@$30<8"0`^VQD&(0@9!B%('08A*"4C'A@!"````````2(F^^$$``$F+0UQ(
+MB8;P00``2('&8$$``$B)W^@`````6\-F9F:09F9FD&9F9I`/MM(/MTQ6>/_!
+M9HE,5GAF#[9&`@'(#[?`PV9FD&9FD+H!````B=!(:<"P````@+PX"T(```%U
+M"(G0PV9FD&:0_\*#^A]VWKC__P``9F9FD,-F9F:09F9FD&9F9I!F9I"Y`0``
+M`(G(2&G`L````$B-A#@`0@``0#AP"'4*.%`)=07&0`L!P__!@_D?9F:09I!V
+MT_/#9F9FD&9F9I!F9F:02(/L6$B)7"0H2(EL)#!,B60D.$R);"1`3(ET)$A,
+MB7PD4$F)_TB)="0808G61(A$)!=)B?Q-B<T/ML)(C03`2,'@!X"\.,17``#]
+MN/W___\/1,@/ML&#^!`/A)$"``"#^!!_'(7`#X2D````@_@!D`^$/0$``.D%
+M"0``9F:09I`]X@````^$9@@``#WB````?Q,]D`````^$5P<``&9FD.G;"```
+M/?\```!F9I!F9I`/A<H(```/ML)(C03`2,'@!\:$.,17``#_@+\+0@```74?
+M00^VUDB+="08Z`````"%P`^%F`@``$'^1P;ICP@``$2)\0^VP<9$!P<!2(M4
+M)!A(B53'$.EU"```9F:09I!(C8]@00``@+\+0@```750#[;"2(T$P$C!X`=(
+M`?@/ME$)B)!B5P``2`7`5P``#[91"H/B`8A0!<9`!`!!#[;62(MT)!CH````
+M`(7`#X4>"```0?Y'!ND5"```9F:09I`/ML+&1`<'`4B+5"082(E4QQ#I^0<`
+M`$'&1`0'_P^VTDF+=,000;D`````0;@`````N?\```!,B?_H`````.G-!P``
+MNP````!(C9=@00``1(GQ#[;!2(T$P$C!X`=(C0PX#[9",HB!LE<```^W0C!F
+MB8&P5P``2(M"*$B)@:!7``!(BT(,2(F!<%<``$B+0A1(B8&`5P``2(M"'$B)
+M@8A7``"+0B2)@9A7``#&@<17```!@'\&'P^$5`<``("Y8E<```!T?4$/ML:)
+M1"001(GR#[;"2(T$P$B)Q4C!Y0=)B<U,C;0]L%<``&9F9I!F9I`/MLN+5"00
+M2(MT)!A,B?_H`````(7`=2#_PT'^1"0&03B=8E<``'4*0<:%LU<```#K#D&(
+M7@/K"$&(7@/K%&:008!\)`8?=`I".)PE8E<``'>N0<:$)`M"```!N@````!!
+M@'PD!``/AK0&``!F9F:0#[;"08!\!`<!#X2H_O___\)!.%0D!'?HZ9,&``!F
+M9I#&1"0/_TF+01A(B40D(`^VPDB-!,!(P>`'2(TL.$B-A<!7``#&0`000?9!
+M#'`/A(`#``!(@[W(5P```'1Y#[98!DB+O<A7``!(@\=<N@@```!(C70D(.@`
+M````A,!U5T'V10\/=%!(BZW(5P``2(7M=$2`?64`=#0/MMN)VDB)[DR)Y^@`
+M````38U-&$0/M\")V4B)ZDB+="083(G_Z``````/MEUF2(MM:.L%O0````!(
+MA>UUO$$/ME4/]L(-#X0<`0``1(GQ#[;!2(T,P$B)R$C!X`=,`>"`N&!7```?
+M#X?[````#[:88%<``/;""'06#[;#2(T$R$C!X`1"QH0@X%D```;K'D2)\@^V
+MP@^VTTB-!,!(C03"2,'@!$+&A"#@60``!T2)\`^VR`^VPTB-#,E(C13(2,'B
+M!$P!XDB-LN!9``#&1@$`00^V10^(1@-(BT0D($B)@NA9``!!#[9%"8A&`DC!
+MX0=!#[9%#8/@#T(/MI0A9E<``#C"#T?0@^(/#[9&!(/@\`G0B$8$1(GR#[;"
+M2(T$P$B)\4C!X`>^#P```$$B=2E"#[:4(&97``!`./(/1];!X@0/MD$$@^`/
+M"="(001$B?$/ML%(C03`2,'@!T+^A"!@5P``Z=,!``!!]D4/`@^$R`$``$B-
+M="0@3(GGZ`````!!B<`\_P^%4@$``,9$)`\`08!\)`0`=C=(#[9$)`](C03`
+M2,'@!T(/MH0@Q%<``#S_#Y3"//T/E,`)T*@!=1#^1"0/#[9$)`]!.$0D!'?)
+M2`^V1"0/2(T$P$C!X`>Y`````+ID````2HV$(&!7``"("$C_P$C_RG7V2`^V
+M5"0/2(T4TDC!X@=,`>)$B?$/ML%(C03`2,'@!TP!X$B-N&!7``!(B;K(5P``
+M2(N(O%<``$B)BK17``!(BTPD&$B)BMA9``!(BX#05P``2(F"T%<``,:"Q%<`
+M`/](C8I@5P``2`^V<0=!#[9%"8B$,FA7``#^00=!#[95#8/B#P^V1P8XT`]'
+MPHA!!D@/MD0D#TB-!,!(P>`'3`'@2(M4)"!(B9"\5P``00^V50^(D&-7```/
+MME0D%XB0QE<``$$/MD0D!4$Z1"0$=09!QD0D!0!!_D0D!>M+QD4#`.D[`P``
+M1(GQ#[;12(T4TDC!X@</ML!(C03`2,'@!TJ--"!(C8Y@5P``2CF,(LA7``!T
+M%$@/ME$'00^V10F(A!9H5P``_D$'08#X_W462`^V1"0/0<9$!`<!2(M4)!A)
+MB53$$$$/ME4)00^V]DR)Y^@`````1(GQ#[;!2(G"2(T$P$C!X`=*C0P@2(V!
+ML%<``(!X`P`/A+8```!!@'PD!A\/A)H"```/MD`#.H%B5P``#X.*`@``10^V
+M[DF)UF9FD$B-!-)(P>`'2HT<(,:#Q%<``!!(C:NP5P``#[9-`T2)ZDB+="08
+M3(G_Z`````"%P`^%2@(``$'^1"0&#[9%`__`#[:38E<``#G0#X3L_O__3(GR
+M2XT$]DC!X`=*C30@2(V&L%<```^V2`/_P8A(`T&`?"0&'P^$!0(``#J.8E<`
+M``^">?___^GT`0``9F9FD$&`?"0&``^%Y`$``$$/MM9!N0````!!N`````"Y
+MD````$B+="083(G_Z`````#IO0$``$'&1`0'_P^VTDF+=,000;D`````0;@`
+M````N?\```!,B?_H`````,9$)`<!Z<L```#&1"0'`,=$)`@`````BT0D"$AI
+MP%`0``!(BU0D&$HY5"`@=6>]`````(M$)`A,:>A0$```B>A(P>`%3`'H3`'@
+M2(U80(![#/]U-T&`?"0&'P^$-@$```^V2$!,C4A$1`^W0P)(BU`X2(MT)!A,
+MB?_H`````(7`=0E!_D0D!L9##/#_Q8']@0```':I_T0D"(-\)`@##X9S____
+M08!\)`8`#X7F````N@````!!@'PD!`!V&`^VPD&`?`0'`0^$#?_____"03A4
+M)`1WZ(!\)`<`#X6V````00^VUD&Y`````$&X`````+GB````2(MT)!A,B?_H
+M`````.F/````NP````"`?P0`=CMF9F:0#[;#2(T$P$C!X`=*C8P@P%<```^V
+M402`^OT/E<"`^O\/E<(/ML"%PG0$QD$$_O_#03A<)`1WR42)\0^VP4B-!,!(
+MP>`'2HNL(-!7``"[``````^VPTAIP%`0``!,`>!(C5`@@'H(`74-QD((`$B+
+M<"!,B?__U?_#@/L#=M5F9I!(BUPD*$B+;"0P3(MD)#A,BVPD0$R+="1(3(M\
+M)%!(@\18PV9F9I!F9I!F9I!F9I!!B='&`?ZZ`````$&X`````(!_!`!V,P^V
+MPDB-!,!(P>`'2`'X2#FPV%D``'4513C(=0T/MH#$5P``B`'#9F:00?_`_\(X
+M5P1WS?/#9F9FD%532(/L"$F)TTR)Q4&)R$B)^P^V1P4Z1P1U!,9'!0`/MDL%
+MN@`````/ML)(:<!0$```2`'83(U(($@Y<"!U04'&00@!N0````"`>P0`=E\/
+MML%(C03`2,'@!T@!V$@YL-A9``!U#@^V@,17``"#P`,\`78Z_\$X2P1WU.LQ
+M9F:0#[;"2&G`4!```$@!V$R-2"!(@W@@`'4+2(EP($'&00@!ZPO_PH#Z`P^&
+M>O___P^VPDAIP%`0``!!N@````!!N0(0``!(C408,&9F9I!F9I!$B!!(_\!)
+M_\EU]0^VP4B)=,,02(T$P$C!X`=!N@````!!N60```!(C8088%<``$2($$C_
+MP$G_R77U#[;!2(T$P$C!X`=!N@````!!N0`"``!(C808V%<``$2($$C_P$G_
+MR77U#[;!2(T$P$C!X`=(`=A(B;#860``2(FHT%<``,:`Q%<``/](QX#(5P``
+M`````$F+$TB)D+Q7``!$B(!F5P``#[;10;D`````0;@`````N?\```#H````
+M`/Y#!4B#Q`A;7<-F9F:09F:09F:04[L`````@'\$``^&D0````^VPTB-!,!(
+MP>`'2#FT.-A9``!U<;H!````#[;"2&G`L````$B-A#@`0@``.%@(=03&0`L!
+M_\*`^A]VW@^VPTB-!,!(P>`'2`'X2,>`V%D```````"Y`````+ID````2(V`
+M8%<``(@(2/_`2/_*=?8/ML-(C03`2,'@!\:$.,17``#]_D\%_\,X7P0/AV__
+M__^[``````^VPTAIP%`0``!(`?A(C5`@2#EP('4Q2,=`(`````#&0@@`N@``
+M```/ML-(:<A0$```#[;"2,'@!4@!R,9$.$P`_\*`^H%VZO_#@/L#=K%;PV9F
+MD&9FD&9FD%-)B?E!N@````"_`````(#Z`0^%*`$``$V%P`^$`P$``$&`>00`
+M=BA$B=(/ML)(C03`2,'@!THYM`C860``=0=`.,]T"__'0?_"13A1!'?81(G0
+M#[;(2(G/2(T,R4C!X0=,`<E(C9%@5P``2(N!8%<``$F)`$B+0@A)B4`(2(M"
+M$$F)0!!(BT(828E`&$B+0B!)B4`@2(M"*$F)0"A(BT(P28E`,$B+0CA)B4`X
+M2(M"0$F)0$!(BT)(28E`2$B+0E!)B4!02(M"6$F)0%B+0F!!B4!@NP````"`
+MN6!7````=D(/ML-(B<%(P>$$3`'!2(TT_TB-!/!(P>`$3`'(2(N0X%D``$B)
+M461(BX#H60``2(E!;/_#2,'F!T(XG`Y@5P``=[Y$B=(/ML)(C03`2,'@!T(/
+MMH0(8%<``.LZ9F:00;H`````NP````!!@'D$`'8A#[;#2(T$P$C!X`=*.;0(
+MV%D```^4P$$!PO_#03A9!'??00^VPEO#D)"0D)"0D$B+%TR+`KD`````@'I#
+M`'862`^V=PU(B?!(T_BH`74'_\$X2D-W[X#Y`W8D2(T$C0`````E_`,``$*+
+MA`#0`0``B04`````ZR)F9F:09F:02(T$C0`````E_`,``$*+A`#0`0``B04`
+M````J0``$``/E<`/ML##9F:09F:09F:005=!5D%505154TB#[`A(B3PD3(LO
+M38ME`,9&00#&1D`%QD9#!DB+!"1(B49(0;\`````0;X`````NP````!!@'U#
+M`'8?2(L,)$@/ME$-9I!(B=")V4C3^*@!=0C_PT$X74-W[(#[`W8;2(T$W0``
+M```E^`<``$+'A"```@``+````.L92(T$W0`````E^`<``$+'A"```@``+```
+M`+\0)P``Z`````"`^P-V)$B-!-T`````)?@'``!"BX0@!`(``(D%``````^V
+MZ.LB9F9FD$B-!-T`````)?@'``!"BX0@!`(``(D%``````^VZ$$)[H#[`W8;
+M2(T$W0`````E^`<``$+'A"```@``)````.L92(T$W0`````E^`<``$+'A"``
+M`@``)````+\0)P``Z`````"`^P-V)TB-!-T`````)?@'``!"BX0@!`(``(D%
+M`````(G%@>7___\`ZR5FD$B-!-T`````)?@'``!"BX0@!`(``(D%`````(G%
+M@>7___\`B>C!X`A!"<:`^P-V($B-!-T`````)?@'``!"QX0@``(``"````#K
+M'F9FD&:02(T$W0`````E^`<``$+'A"```@``(````+\0)P``Z`````"`^P-V
+M'TB-!-T`````)?@'``!"BX0@!`(``(D%`````(G%ZQU(C03=`````"7X!P``
+M0HN$(`0"``")!0````")Q4&!_@$!:99U%TB+!"2`2`P&B>C!Z!`\4`^4P`^V
+MP.M`08'^`0$``'43B>C!Z!`\4`^4P`^VP.LH9F9FD+^($P``Z`````!!_\=!
+M@/\$#X;,_?__B>C!Z!`\4`^4P`^VP$B#Q`A;74%<05U!7D%?PV9F9I!F9I!F
+M9I!F9I!54TB#[`A(B?U(BQ_H`````(3`=1'&10G_2(GN2(G?Z`````#K;+D`
+M````@'M#`'862`^V50U(B=!(T_BH`74'_\$X2T-W[TB)W^@`````2(G&2(7`
+M=#M(C45@2(M0"$B)<`A(B09(B58(2(DR_D4.2(EN2,9&0`7&1D$`QD9Y#[D!
+M````N@$```!(B>_H`````$B#Q`A;7<-F9F:09F:0055!5%532(/L"$F)_$B)
+M]4R++[L*````2(GN3(GGZ`````"$P'4.O^@#``#H`````/_+=>.Y`````$&`
+M?4,`=AA)#[94)`U(B=!(T_BH`74(_\%!.$U#=^Y(BU4(2(M%`$B)4`A(B0)!
+M_DPD#DB)[DR)[^@`````0?9$)`P"=%5)@WPD0`!U($R)[V9FD&:0Z`````!(
+MB<9(A<`/A(\!``!)B40D0.L%28MT)$!,B2Y,B::(````QD9&`,9&1P#&1D(`
+M9H-.3@1,B>_H`````.E;`0``28-\)$``#X3@````28MT)$!(@<:0````28M]
+M*.@`````28MT)$!,B>_H`````$F-1"1@2(G"23E$)&`/A*(```!(B<-F9F:0
+M9F:02(G7Z`````!(B<5(@W@X`'1H2(M`.$C'0&``````]D5$!'4D0?Z%[Q,`
+M`$R)[^@`````2(M%.`^V<`&Z`0```$R)[^@`````2(M5.$F+M=`(``"_`0``
+M`.@`````2(M5.$F+M=`(``"_!@```.@`````2,=%.`````!!_DPD#DB)[DR)
+M[^@`````2(G:23E<)&`/A6C___])QT0D0`````!!@'PD#@!T%$F-?"1@Z```
+M``!(B<5!_DPD#NL+3(GOZ`````!(B<5(A>UT0TF-1"1@2(M0"$B):`A(B44`
+M2(E5"$B)*D'^1"0.3(EE2,9%0`7&14$`QD5#!L9%0@-(B>Y,B>_H`````&9F
+M9I!F9I!(@\0(6UU!7$%=PV9FD&:02(/L.$B)7"0(2(EL)!!,B60D&$R);"0@
+M3(ET)"A,B7PD,$F)_$F)]4&)UD&)STB+!TB)!"2Z`````+T`````@'\.`'9$
+M2(U?8&9F9I!F9I!(B=_H`````$B)PDB+0PA(B5,(2(D:2(E""$B)$$PY:E!U
+M#40X<GET$&9F9I!F9I#_Q4$X;"0.=\=!.&PD#F:0="Y!@/]0=2C&0D,&QD)"
+M!<9"0`?&0D$`3(EJ4$R)8DA(B=9(BSPDZ`````!F9F:02(M<)`A(BVPD$$R+
+M9"083(ML)"!,BW0D*$R+?"0P2(/$.,-F9F:09F:09F:09F:02(/L.$B)7"0(
+M2(EL)!!,B60D&$R);"0@3(ET)"A,B7PD,$F)_4F)]DR+)T&______[N`____
+MO?____^`^X5W#`^VPT(/MJP@0`@``$"`_?]T-8GJ#[;"28N4)&@)``!(:<#(
+M#P``3#EL$`AU&DB-/!"Z"````$R)]N@`````A,!T!4&)[^L+_\.`^X%F9F:0
+M=J1!#[;'2(M<)`A(BVPD$$R+9"083(ML)"!,BW0D*$R+?"0P2(/$.,-F9F:0
+M9F:005=!5D%505154TB![$@"``!)B?Y(B70D.(A4)#=(BT<(2(E$)"A,BR@/
+MME=8B%0D)TB-1TA(B<)(.4=(#X1L`@``@'PD)P`/A&$"``!,C7PD0$B)1"0(
+M2(D$)&9FD&:02(G7Z`````!(C6CP#[9,)#=-B?BZ`0```$B+="0H2(M\)#CH
+M`````$&\`````(!\)$``#X;M````2(U5$$B)5"082(M,)`A(B4PD$&9F9I!$
+MB>(/ML)(P>`$2HT<.$B->VRZ"````$B-M<P```#H`````(3`#X2=````2(U3
+M8`^V0@B#X`^(A>(````/MTU@9H'AW_V)R(/($&:)16`/MD((P.@$/`EU"8G(
+M@\@P9HE%8$2)X0^VP4C!X`1"#[9$.&C`Z`0\"G4&9H%-8``"2(M4)!!(BT((
+M2(M,)!A(B4H(2(E5$$B)00A(B0@/MD5$J`)T,H/@_8A%1$B#?3@`="5(BU4X
+M28NUT`@``+\&````Z`````#K#D'_Q$4X)P^'+/___^L)13@G#X<&`0``2(GJ
+MO@8```!(BWPD*.@`````@'U[`'083(GOZ`````"_`0```.@`````@'U[`'7H
+M2(.]&`$```!T&`^VM04!``!(B[T8`0``N@$```#H`````$B#?5``=!@/MG5Y
+M2(M]4+H!````Z`````!F9I!F9I!(@WTX`'1H2(M%.$C'0&``````]D5$!'4D
+M0?Z%[Q,``$R)[^@`````2(M%.`^V<`&Z`0```$R)[^@`````2(M5.$F+M=`(
+M``"_!@```.@`````2(M5.$F+M=`(``"_`0```.@`````2,=%.`````!(BU4(
+M2(M%`$B)4`A(B0)(BT0D*/Y(#D'^3EA(B>Y,B>_H`````/Y,)"=(BQ0D23E6
+M2'0+@'PD)P`/A;+]__](@<1(`@``6UU!7$%=05Y!7\-!5T%6055!5%532('L
+M.`(``$B)?"0H28GU2(E4)"!(BP=(B40D&,9$)!<`2(U<)#!$#[;A28G81(GA
+MN@$```!(B?Y,B>_H`````$F)WD2)XDR)[DB+?"0@Z`````!(BTPD($B+44A,
+MC7KP2(G(2(/`2$@YPG0]2(G!9F9FD&9FD$$/MD=!/`T/E,(\(@^4P`G0J`%T
+M$<9$)!<!0<9'0@5!QD=#!.L-28M'$$R->/!(.<AUS;T`````08`^``^&#`(`
+M`$B+1"0@2(/`2$B)1"0(2(D$)$B+3"0@2(M!2$R-8/!(.T0D"'0YB>H/ML)(
+MB<-(P>,$3(LL)$F-O"3,````N@@```!*C70S;.@`````A,!U#DF+1"003(U@
+M\$PYZ'7728U$)!!(.T0D"`^%D@$``,9$)!<`2(M\)!CH`````$F)Q$B%P`^$
+ME@$``$B+3"0H_D$.QD!"!<:`X`````#&0$,$9L>`P```````QH#"`````$C'
+M0'````4`B>H/ML)(P>`$2HU$,&`/ME`$08A4)$`/ME`%08A4)$%)B4PD2`^V
+M4`B#X@]!B)0DX@```$$/MTPD8&:!X=_]B<J#RA!F08E4)&`/MD`(P.@$/`EU
+M"XG(@\@P9D&)1"1@B>D/ML%(P>`$0@^V1#!HP.@$/`IU"&9!@4PD8``"2(M$
+M)"!)B40D4(GJ#[;"2,'@!$P!\`^V4&9!B%0D>4B+0&Q)B80DS````$F)A"3$
+M````2(M,)"#^05A(BT0D*$B#P&!(BU`(3(E@"$F)!"1)B50D"$R)(DF-1"00
+M2(M,)`A(BU$(2(E!"$F)3"002(E0"$B)`DD/MD0D0*@"=">H!'0CJ`%T'T$/
+MME0D>4R)X4B+="0@2(M\)"CH`````.LH9F:09I!)#[9$)$"H`G09J`1F9F:0
+M=!&H`74-3(GF2(M\)!CH`````/_%03@N#X<&_O__@'PD%P!T#;X*````3(G_
+MZ`````!(@<0X`@``6UU!7$%=05Y!7\-F9F:09F9FD&9F9I!!5T%6055!5%53
+M2('L2`(``$F)_$B)="0X3(LO#[9'*(A$)#=(C4=(2(G"2#E'2`^$1@,``(!\
+M)#<`#X0[`P``2(E$)!!(B40D"$B)U^@`````2(UHR$&X`````+D`````N@``
+M``!,B>9(BWPD..@`````08G'0;X`````03C&#X/<`0``2(U4)$!(B50D*$B-
+M33A(B4PD($B+1"002(E$)!A!#[;>0;@`````B=FZ`0```$R)YDB+?"0XZ```
+M```/ML!(P>`$2(/`9$@]``(```^'7P$``$R+1"0HB=FZ`0```$R)YDB+?"0X
+MZ`````!(BUPD*$B->URZ"````$B)[N@`````A,`/A"@!``!(BU0D&$B+0@A(
+MBTPD($B)2@A(B54X2(E!"$B)"`^V1"1"B$592(US5$R)Y^@`````//]T%0^V
+MP$AIP,@/``!)`X5H"0``2(E%$$6$]G11#[9#`]'H@^`!P>`$#[9578/B[PG"
+MB%5=#[9#`\'H`X/@`<'@!8/BWPG"B%5=#[9#`\'H`H/@`<'@`X/B]PG"B%5=
+M#[9#!HB%NP```.F6````#[9#`HA%64R)90@/MD,&B(6[````#[=#!(E%8`^W
+M0U!FB86X````#[9#4HB%N@```$B+0T!(B86H````2(M#2$B)A;````!(BT,0
+M2(E%>$B+0QA(B86`````2(M#($B)A8@```!(BT,H2(F%D````$B+0S!(B868
+M````2(M#.$B)A:````#K#D'_QD4X_@^"8/[__^L=00^VSDB)ZDB+="0X3(GG
+MZ`````!%./X/@O\```!(C45(2(G"2#E%2`^$W@```$F)QDB)U^@`````2(U8
+M\$B)VKX&````3(GGZ`````"`>WL`=!A,B>_H`````+\!````Z`````"`>WL`
+M=>A(@WLX`'1L2(M#.$C'0&``````]D-$!'4H0?Z%[Q,``$R)[^@`````2(M#
+M.`^V<`&Z`0```$R)[^@`````9F9FD$B+4SA)B[70"```OP$```#H`````$B+
+M4SA)B[70"```OP8```#H`````$C'0S@`````2(M3"$B+`TB)4`A(B0)!_DPD
+M#OY-6$B)WDR)[^@`````3(GR3#EU2`^%)?___T'^3"0H2(GN3(GOZ`````#^
+M3"0W2(M4)`A).50D2'0+@'PD-P`/A<_\__](@<1(`@``6UU!7$%=05Y!7\-F
+M9I!!5T%6055!5%532('L*`(``$F)_DB)]4B+!DB)1"082(G^2(GOZ`````!!
+MN`````"Y`````+H`````2(GN3(GWZ`````"(1"070;P`````03C$#X-&`P``
+M2(U58$B)%"1!#[;<0;@`````B=FZ`0```$B)[DR)]^@`````#[;`2,'@!$B#
+MP&1(/0`"```/A_T"``!,C40D((G9N@$```!(B>Y,B??H`````$R-;"0@28UU
+M7$B)[^@`````//\/A<T"``!(BWPD&.@`````2(G#2(7`#X3<`@``_D4HQD!8
+M`$B+1"1\2(D#28UU5$B)[^@`````//]T&@^VP$AIP,@/``!(BU0D&$@#@F@)
+M``!(B4,000^V10*(0UE!#[9%`]'H@^`!P>`$#[9378/B[PG"B%-=00^V10/!
+MZ`.#X`'!X`6#XM\)PHA374$/MD4#P>@"@^`!P>`#@^+W"<*(4UU(B6L(00^V
+M10:(@[L```!)BT4(2(E#<$$/MD4'B$-:00^W102)0V!!#[=%4&:)@[@```!!
+M#[9%4HB#N@```$F+14!(B8.H````28M%2$B)@[````!)BT402(E#>$F+11A(
+MB8.`````28M%($B)@X@```!)BT4H2(F#D````$F+13!(B8.8````28M%.$B)
+M@Z````!(C5,X2(U%2$B+2`A(B5`(2(E#.$B)2@A(B1%FQT0D%```08!]```/
+MA'$!``!(BP0D2(E$)`A,C7M(9F9FD$B+?"08Z`````!(B<%(A<`/A&\!``#^
+M10[&0$(%QH#@`````,9`0P1(QT!P```%`&;'@,```````$@/MU0D%$C!X@1*
+MC50J8`^V0@2(04`/MD(%B$%!2(EI2$B)65`/MD(&B$%Y#[9""(/@#XB!X@``
+M``^W<6!F@>;?_8GP@\@09HE!8`^V0@C`Z`0\"74)B?"#R#!FB4%@2`^W1"04
+M2,'@!$(/MD0H:,#H!#P*=09F@4E@``)(#[=$)!1(P>`$2HM$*&Q(B8',````
+M2(F!Q````/Y#6$B+5"0(2(M""$B)2@A(B1%(B4$(2(D(2(U!$$F+5PA)B4<(
+M3(EY$$B)4`A(B0)(#[9!0*@"=!FH!'05J`%T$0^V47E(B=Y(B>_H`````.L>
+M2`^V04"H`G05J`1T$:@!=0U(B<Y(BWPD&.@`````9O]$)!1F00^V10!F.T0D
+M%`^'I_[__V9F9I!F9I!!_\1$.F0D%P^"POS__X!]#@!U$<9%"?](B>Y(BWPD
+M&.@`````2('$*`(``%M=05Q!74%>05_#9F:09F:09F:0055!5%532(/L"$F)
+M_4B)]4&X`````+D`````N@````#H`````$&)Q+L`````.,-S)0^VTTB-3"0'
+M2(GN3(GOZ`````"`?"0'_@^%D0```/_#1#CC<MO^35B`?5@`=&A,BV4`QD58
+M`$B+54A(C5K(2(U%2$@YPG1H2(G"9F:09I!(@WL0`'0/2(M#.$B-6,A(.=!U
+M[.M*_D582(GN3(GOZ``````/MHN[````28N\)&@0``!)Q\``````2(G:2(GN
+MZ`````#K&4B)[DR)[^@`````2(GN3(GOZ`````!F9I!(@\0(6UU!7$%=PV9F
+MD&:02(L7O@H```"Y`````(!Z0P!V-4@/MG\-2(GX2-/XJ`%T'P^VP4AKP&B+
+MA!!L$@``)0```P#!Z!"#P`A`./`/0O#_P3A*0W?00`^VQL-F9I!(BQ>^"```
+M`+D`````@'I#`'8U2`^V?PU(B?A(T_BH`70?#[;!2&O`:(N$$&P2```E```#
+M`,'H$(/`"$`X\`]'\/_!.$I#=]!`#[;&PV9FD$B#[%A(B5PD*$B);"0P3(ED
+M)#A,B6PD0$R)="1(3(E\)%!)B?U,BR=!OP````"`?PT`#X2=`P``O0`````/
+MMD<-B<*H`74,_\6)T(GIT_BH`73TB>H/ML)(:\!H2HV4(%`2``"+0@RI```"
+M`'0-#0``!``E___]_XE"#(GI#[;!2&O`:$+VA"!>$@``!`^$CP(``$V-M"0`
+M%```33FD)-`(``!T"$V+M"30"```B>H/ML)(:\!H3`'@1`^VB&(2``!$#[:`
+M81(```^VB&`2``!!#[94)$%`#[;U#[:X9Q(``(E\)"`/MKAF$@``B7PD&`^V
+MN&42``")?"00#[:X9!(``(E\)`@/MH!C$@``B00D2,?'`````+@`````Z```
+M``!!N(````")Z0^VP4AKP&A.C8P@8!(``/Q!#[?`9D(/MH0P0`@``&8]_P!T
+M+P^WP$AIP,@/``!(B<-)`YYH"0``2(G>3(G/N0@```#SI@^7P@^2P#C"#X14
+M`0``0?_`9D&!^($`=K),B>?H`````$B)PTB%P`^$.@(``(GJ#[;"2&O`:$+V
+MA"!=$@``!'0$@$M=`HGI#[;!2&O`:$+VA"!>$@``!'0$@$M=$(GJ#[;"2&O`
+M:$+VA"!=$@``"'0$@$M=!(GI#[;!2&O`:$+VA"!>$@``"'0$@$M=((GJ#[;"
+M2&O`:$+VA"!=$@```G0$@$M=`8GI#[;!2&O`:$+VA"!>$@```G0$@$M=",9#
+M6`")Z@^VPDAKP&A*BX0@8!(``$B)`TR):PA,B>_H`````(B#NP```$'^12BY
+M`````$&`?"1#`'8E20^V10U(T_BH`7001(GZ#[;"B$P8</Y#6D'_Q__!03A,
+M)$-WVTB-4SA)C45(2(M("$B)4`A(B4,X2(E*"$B)$4'^15@/MHN[````28N\
+M)&@0``!)Q\``````2(G:3(GNZ`````#I!0$``$0/MDL$1`^V0P,/MDL"#[93
+M`0^V,P^V0P>)1"00#[9#!HE$)`@/MD,%B00D2,?'`````+@`````Z`````!!
+MQD4)_TR)[DR)Y^@`````Z;,```")Z0^VP4AKP&A*C2P@]H5>$@``"`^$F0``
+M`$R)Y^@`````2(G#2(7`#X2%````QD!#!L9`0@5FQX#```````#&0$`&QD!!
+M`$C'0'````4`2(N%8!(``$B)@\P```!(B8/$````3(EK2$R)[^@`````B(/B
+M````9H-+8!!,B>_H`````#P)=@9F@4M@``)!QD4.`4F-16!(BU`(2(E8"$B)
+M`TB)4PA(B1I(B=Y,B>?H`````$B+7"0H2(ML)#!,BV0D.$R+;"1`3(MT)$A,
+MBWPD4$B#Q%C#9F9FD&9F9I!!5T%6055!5%532(/L"$B)^TF)];@`````2(7V
+M=`0/MD8)#[;`0;P`````A<!T$3W_````#X1L`0``Z=$%``"01(GB#[;"#[:$
+M&,8(```\_W02#[;`2&G`J````$R-K!B@`0``0?_$08#\`W;30;P`````1(GB
+M#[;"#[:$&,8(```\_W0S#[;`2&G`J````$R-K!B@`0``0?9%"@)T$KX`````
+M3(GOZ`````#K"V9FD$R)[^@`````0?_$08#\`Y!VL68/MD,^9CF#0!````^%
+M/`4``$V%[0^%M````(![40`/A2D%``#&0U$!O0`````/M]5(B[330`0``$B%
+M]G0X2(.^@`````!T+DB+AH````!(QX:``````````$C'A--`!````````$B+
+MOI````"Z_______0ZT@/M]5(@[S30`0```!T.DB+A--`!```2(.XB`````!T
+M*$B+AH@```!(QX:(`````````$C'A--`!````````$B+OI````#_T)#_Q6:#
+M_3\/AF3____I?P0``$'&10G_3(GN2(G?Z`````#I:@0``,9$)`<`9F:09I!(
+M#[9$)`</MH08Q@@``#S_#X3Q````#[;`2&G`J````$R-K!B@`0``08!]"?\/
+MA-0```!!O`````!!@'T.``^&N0```$V-=6!,B??H`````$B)Q4F+1@A)B6X(
+M3(EU`$B)10A(B2B`?4+_#X2`````@+WA`````'1H2`^V14"H`G0>J`1T&J@!
+M=!8/ME5Y2(MU4$B)Z4R)[^@`````ZT*02`^V14"H`G4:J`1F9I!FD'01J`%T
+M#4B)[DB)W^@`````ZQY(#[9%0*@"=!6H!&:0=`^H`74+2(GN2(G?Z`````"X
+M`0```.EZ`P``9F:09I!!_\1%.&4.#X=+____N`$```#I7@,``/Y$)`>`?"0'
+M`P^&ZO[__\9$)`<`@'M1``^%L````+T`````9F:09F:0#[?%2(NTPT`$``!F
+M#[:4&$`(``!(A?9T=TB#OH``````=&U(@WY@`'5F9H'Z_P"0="X/M\)(BXL8
+M"0``2&G`B`$``/9$"$,$=!:`?`A!`'4/#[?22(G?Z`````#K,F:02(N&@```
+M``^WU4C'A--`!````````$C'AH``````````2(N^D````+K______]"0_\5F
+M@_T_#X9D____QD-1`>F+`@``2`^V1"0'#[:$&,8(```\_P^$90(```^VP$AI
+MP*@```!,C:P8H`$``$&\`````$&`?0X`#X9"`@``38UU8$R)]^@`````2(G%
+M28M&"$F);@A,B74`2(E%"$B)*(!]0O\/A0D"```/MT4P9HE$)`0/M\!F#[:4
+M&$`(``!FB50D`DR+O,-`!```#[9%1*@$='%-A?]T;$F#OX``````=&))@W]@
+M`'5;@^#[B$5$]D5#!'02#[=4)`),B?Y(B=_H`````.L]28N'@````$@/MU0D
+M!$C'A--`!````````$G'AX``````````2,=%.`````!)B[^0````NO____],
+MB?[_T/9%0P0/A$4!``#&A>``````08!E#.?V140!#X3[````@&5$_DB#?3@`
+M=$V`?4$`=2WV14,$="</MU0D!`^V0T'!X`8!PDACTDB+L]`(``"_!P```.@`
+M````Z?$```!(BU4X2(NST`@``+\!````Z`````#IUP```$V%_W1J28._@```
+M``!T8(!]00!U&_9%0P1T%0^W5"0"3(G^2(G?Z`````#IIP```$F+AX````!(
+M#[=4)`1(QX330`0```````!)QX>``````````$C'13@`````28N_D````+K_
+M____3(G^_]#K:(!]00!U8O9%0P1T7`^W5"0$#[9#0<'@!@'"2&/22(NST`@`
+M`+\"````Z`````#K.&9F9I!(@WTX`'0M2(M5.$B#NH@`````=!](BX*(````
+M2,>"B`````````!(BU4X2(NZD````/_0]D5$`G092(M5.$B+L]`(``"_!@``
+M`.@`````@&5$_4'_Q$4X90X/A\+]___^1"0'@'PD!P,/AG;]__^0N`$```!(
+M@\0(6UU!7$%=05Y!7\-F9F:09F9FD&9F9I!(@^PX2(E<)`A(B6PD$$R)9"08
+M3(EL)"!,B70D*$R)?"0P28G^2(GS3(MN2$@/MT8PN@````"`O#A`"```_P^$
+ML0(```^V1D*#^`\/A`0!``"#^`]_2H/X#`^$R0```(/X#'\<@_@%=&R#^`MF
+M9F:0#X2E````Z74"``!F9I!FD(/X#0^$K````(/X#F9F9I`/A*\```#I50(`
+M`&9FD&:0@_@9?Q*#^!A]7X/X%&9FD'0XZ3D"``"#^!MF9I!F9I!T-3W_````
+M#X2,````9F:0Z1L"``"^`0```$B)WV9FD.@`````Z08"``!(B??H`````.GY
+M`0``O@````!(B=_H`````.GG`0``O@$```!(B=_H`````.G5`0``2(GWZ```
+M``#IR`$``$B)]^@`````Z;L!``!(B??H`````&9FD.FK`0``2(GWZ`````!F
+M9I#IFP$``,9&0O])B=]!O`````!!@'T.``^&QP```$F-;6!(B>_H`````$B)
+MPTB+10A(B5T(2(DK2(E#"$B)&(![0O\/A(@```"`>T$`#X6%````@+OA````
+M`'1F2`^V0T"H`G0=J`1T&:@!=!4/ME-Y2(MS4$B)V4R)[^@`````ZT!(#[9#
+M0*@"=1FH!&9F9I!T$:@!=`U(B=Y,B??H`````.L>2`^V0T"H`G05J`1FD'0/
+MJ`%U"TB)WDR)]^@`````N@$```#IV@```&9FD&:0QH/A`````$'_Q$4X90X/
+MASW___]%.&4.#X6B````00^V1T$\(@^4PCP-#Y3`"="H`70_O@H```!,B?_H
+M`````+H!````Z8L```!(B=Y(Q\<`````N`````#H`````+X*````2(G?Z```
+M``"Z`0```.MC0;P`````08!]#@!V04F-;6!(B>_H`````$B)PTB+10A(B5T(
+M2(DK2(E#"$B)&`^V0T$\(@^4PCP-#Y3`"="H`7660?_$13AE#G?&9F:00<9%
+M"?],B>Y,B??H`````+H!````B=!(BUPD"$B+;"003(MD)!A,BVPD($R+="0H
+M3(M\)#!(@\0XPV9FD&9FD$B#[%A(B5PD*$B);"0P3(ED)#A,B6PD0$R)="1(
+M3(E\)%!)B?U(B?-,BWY(2`^W1C"Z`````("\.$`(``#_#X2B!@``#[9&0H/X
+M"0^$=P,``(/X"7]*@_@%#X3[````@_@%?Q>#^`,/A)X```"#^`0/A,(```#I
+M9@8``(/X!V:0#X0T`P``@_@'9F9FD&9FD`^/%@,``.FI`@``9F:09I"#^!8/
+MA.<"``"#^!9F9F:0?R.#^!0/A"H#``"#^!1FD`^/I`(``(/X"@^$!P,``)#I
+M#`8``(/X&@^$2P(``(/X&G\2@_@7#X2R`@``9F9FD.GL!0``/?\```!F9I!F
+M9I`/A.,"``#IU@4``$F+1R"!8##___[_2(M^2+D`````N@$```#H`````+\%
+M````Z`````#IJ04``$B+?DBY`````+H`````Z`````"_4,,``.@`````Z8<%
+M``!!O@````"`?T,`=B!)#[97#69FD&:02(G01(GQ2-/XJ`%U"4'_QD4X=4-W
+MZD@/MD-`J`)T#*@$=`BH`0^%TP```$F+5R"+0C"I```!`'0-)?___O^)0C#I
+MN````+T0)P``1(AT)!!*C03U`````"7X!P``2(E$)`A$B?!(P>`#28G$08'D
+M^`<``$F+50!!@/X#=AE(BTPD"(N$$8`!``")!0`````E```!`.L308N$%(`!
+M``")!0`````E```!`(7`="6`?"00`W8.0<>$%(`!``````$`ZPQ!QX04@`$`
+M`````0"%P'40O^@#``#H`````/_-=9/K!(7M=1C&0T,"QD-"_TB)WDR)[^@`
+M````Z7,$``!!]D<*`70X2(G>3(G_9F:09I#H`````(3`=22]^@```&:02(G>
+M3(G_Z`````"$P'4.O^@#``#H`````/_-=>-!@/X#=B=*C03U`````"7X!P``
+M28M-`(N4`8`!``")%0````")E`&``0``ZT]*C03U`````$B)QH'F^`<``$F+
+M30!!@/X#=@^+A#&``0``B04`````ZQY*C03U`````"7X!P``28M5`(N$`H`!
+M``")!0````")A#&``0``2(M[2$B)WNBK*```OR!.``#H`````.F=`P``#[=V
+M,$C'QP````"X`````.@`````2(M[2$B)WN@[+P``Z7<#```/MW8P2,?'````
+M`+@`````Z`````!(BWM(2(G>Z*4O``#I40,``$B+?DCH1R@``.E#`P``2(M^
+M2.B9+```Z34#``!(BWY(Z.LK``#I)P,``$B+?DCH'2T``.D9`P``2(M^2.B?
+M+0``Z0L#``!(BWY(Z"$N``"0Z?P"``#&1D+_2`^V0T"H`G0(J`1T!*@!=19(
+M@WM8`)!U#DR)_^@`````B(/B````0?9'#`(/A(H!``!-BV=`00^V5"1&00^V
+M1"0[_\@YPGTR0?Y$)$9!_D0D1T'&1"1"`$$/MT0D3H/@_H/("&9!B40D3DR)
+MYDR)[^@`````Z7X"``!!O@````!!@'\.``^&P````$F-;V!(B>_H`````$B)
+MPTB+10A(B5T(2(DK2(E#"$B)&(![0O\/A($```"`N^$`````=&E(#[9#0*@"
+M=!^H!'0;J`%T%P^V4WE(BW-02(G93(G_Z`````#K0V:02`^V0T"H`G4:J`1F
+M9I!FD'01J`%T#4B)WDR)[^@`````ZQY(#[9#0*@"=!6H!&:0=`^H`74+2(G>
+M3(GOZ`````"Z`0```.G+`0``9F:09I#&@^$`````0?_&13AW#@^'1/___T'V
+M1"1.@'0>0?9$)$D#=!9!QD0D0@!,B>9,B>_H`````.F'`0``0<9'"?]!QD0D
+M0@!!#[=$)$Z#X/.#R`)F08E$)$Y!@&0D2?Y,B?Y,B>_H`````.E4`0``O@H`
+M``!(B=_H`````+H!````D.E!`0``0;X`````08!_#@`/AL8```!)C6]@9F:0
+M9F:02(GOZ`````!(B<-(BT4(2(E="$B)*TB)0PA(B1B`>T+_#X2(````@'M!
+M`'5[@+OA`````'1K2`^V0T"H`G0AJ`1T':@!=!D/ME-Y2(MS4$B)V4R)_^@`
+M````ZT5F9F:02`^V0T"H`G4:J`1F9I!FD'01J`%T#4B)WDR)[^@`````ZQY(
+M#[9#0*@"=!6H!&:0=`^H`74+2(G>3(GOZ`````"Z`0```.M^QH/A`````$'_
+MQD4X=PX/AT3___]%.'<.=4]!O@````!!@'\.`'9"28UO8$B)[^@`````2(G#
+M2(M%"$B)70A(B2M(B4,(2(D8#[9#03PB#Y3"/`T/E,`)T*@!#X7%_O__0?_&
+M13AW#G?"0<9'"?],B?Y,B>_H`````+H!````B=!(BUPD*$B+;"0P3(MD)#A,
+MBVPD0$R+="1(3(M\)%!(@\18PV9FD&:02(/L*$B)'"1(B6PD"$R)9"003(EL
+M)!A,B70D($F)_$B)\TB+%TB+KH@````/MD9"@_@9#X==!```B<#_),4`````
+M]D9.!'0,9L=&3@$`QD9"`>L\9H-^3B!U#&;'1DX(`,9&0@WK*?9&3H!T&?9&
+M20-T$P^W1DXD?X/("&:)1D[&1D(-ZPKV0TX(=`3&0T('2(G>3(GGZ`````#I
+M]@,``(N"!`$``(D%`````(/(4(F"!`$``+D!````N@(```"^`0```$B)W^@`
+M````Z<4#``"Y`0```+H`````O@$```!(B=_H`````.FI`P``N0$```"Z`0``
+M`+X!````2(G?Z`````#IC0,``+D!````NF````"^`0```$B)W^@`````Z7$#
+M```/MDY(0;@!````NF````"^`0```$B)W^@`````Z5`#``!!N`$```"Y```!
+M!+HA````O@$```!(B=_H`````.DN`P``0;@!````N0$```"Z`@```+X`````
+M2(G?Z`````#I#`,``$&X`0```+D`````N@(```"^`````$B)W^@`````Z>H"
+M``!(BT4@@6`P___W_T&X`0```+D!````N@(```"^`````$B)W^@`````Z;T"
+M``!!N`$```"Y`````+H"````O@````!(B=_H`````.F;`@``N0$```"Z`@``
+M`+X`````2(G?Z`````#I?P(``+D!````N@````"^`````$B)W^@`````Z6,"
+M``"Y`0```+H!````O@````!(B=_H`````.E'`@``2(M%((%@,/__]_]!N`$`
+M``"Y_____[H!````O@````!(B=_H`````.D:`@``N0$```"Z`````+X`````
+M2(G?Z`````#I_@$``$@/MD9'3(MTQEA)B6Y(28EV6`^V1D=!B$9Y0<9&0@-!
+MQD9!`$&`3D`%_D4.2(U%8$B+4`A,B7`(28D&28E6"$R),K^`&@8`Z`````!!
+MO0````!!@'PD0P!V'$@/ME4-2(G01(GI2-/XJ`%U"D'_Q44X;"1#=^E(BU4@
+MBT(PJ0``"`!T"B7___?_B4(PZV"[F#H``$J-!.T`````2(G%@>7X!P``9F9F
+MD$&`_0-V&DF+!"2+A"B``0``B04`````J0``"`!U*.L828L$)(N$*(`!``")
+M!0````"I```(`'4.O^@#``#H`````/_+=;I,B?9,B>?H`````.D``0``OT`-
+M`P#H`````+D`````NB````"^`0```$B)W^@`````OQ`G``#H`````.G0````
+MN0````"Z`0```+X`````2(G?Z`````"_$"<``.@`````Z:H```!(BT4@@6`P
+M___W_T&X`````+G_____N@$```"^`````$B)W^@`````OQ`G``#H`````.MV
+MN0````"Z`````+X`````2(G?Z`````"_$"<``.@`````ZU.Y`````+H@````
+MO@$```!(B=_H`````+\0)P``Z`````#K,.@`````9F:09I#K).@`````ZQU!
+MN`$```"Y\````+J;````O@$```!(B=_H`````+@!````2(L<)$B+;"0(3(MD
+M)!!,BVPD&$R+="0@2(/$*,-F9F:09F9FD$%7059!54%455-(@^PH28G\2(L'
+M2(E$)"!!OP````"`?T,`#X:F`@``9F9FD&9FD$2)^@^VPDAKP&A*C30@2(V6
+M8!(``/9"#A`/A'("``"X`0```$2)^4C3X`A""4B+MD@2``!(B70D&/9""`(/
+MA-T```!!C5\!03A<)$,/ALX````/ML%(:\!H3`'@2(E$)`@/ML-(:\!H3HTT
+M($F-KF`2``#V10X0#X24````3(ML)`A!]X5<$@`````.``^$?@```$F-A6`2
+M``!(B40D$+H(````2(GN2(G'Z`````"$P'1>28VV5!(``+H(````28V]5!(`
+M`.@`````A,!T0K@!````B=E(T^!(BU0D$`I""8A""8A%"4B#?"08`'4.38NV
+M2!(``$R)="08ZQ0/ML-(:\!H2(M,)!A*B8P@2!(``/_#03A<)$,/AT/___]F
+MD$B#?"08``^%I````$R)Y^@`````2(E$)!A(A<`/A%T!``!$B?H/ML)(:\!H
+M3`'@2(M,)!A(B8A($@``2(V00!(``$B)42`/MH!H$@``B$$*QD$)`$R)(<9!
+M#@#&05@`QD$H`$&-7P%!.%PD0W991(GZ#[;"2&O`:$H/MI0@:1(``$B)T(G9
+M2-/XJ`%T%`^VPTAKP&A(BTPD&$J)C"!($@``_\-!.%PD0W?7ZQMF9F:01(GZ
+M#[;"2&O`:$B+3"082HF,($@2``!$B?H/ML)(:\!H2HV$(&`2```/ME`)2(M,
+M)!B(40T/ME@)08#_`W8A2HT$_0`````E^`<``$B+5"0@QX00``(``#@```#K
+M'V:02HT$_0`````E^`<``$B+3"0@QX0(``(``#@```"_$"<``.@`````08#_
+M`W8;2HT$_0`````E^`<``$B+5"0@B9P0!`(``.L92HT$_0`````E^`<``$B+
+M3"0@B9P(!`(``$'_QT4X?"1##X=A_?__2(/$*%M=05Q!74%>05_#9I!(@^P8
+M2(D<)$B);"0(3(ED)!!)B?R)\TB++T"`_@-V($B-!-T`````)?@'``#'A"@P
+M`@``#````.L>9F:09F:02(T$W0`````E^`<``,>$*%`"```,````OQ`G``#H
+M`````(#[`W8<2(T$W0`````E^`<``(N$*#0"``")!0````#K&DB-!-T`````
+M)?@'``"+A"A4`@``B04`````B<*!X@``/P#!ZA`/ML-(:\!H2HV,(&`2```/
+MMD$(@^#\B$$(@_H0=0J#R`*(00CK$F:0#[;#2&O`:$*`C"!H$@```4B+'"1(
+MBVPD"$R+9"002(/$&,-F9F:09F:09F:09F:005=!5D%505154TB#["A!B?1)
+MB==(BR^[`````$*-!.4`````1(UPX$&)Q69FD&:008/\`W81C02=``$``$&)
+MA"X@`@``ZP^-!)T``0``08F$+0`"``"_$"<``.@`````B=I!@_P#=A!!BX0N
+M)`(``(D%`````.L.08N$+00"``")!0````")!)3_PX/[!G:@2(L$)$F)!TB+
+M1"0(28E'"$B+1"0028E'$(M$)!A!B4<82(/$*%M=05Q!74%>05_#05=!5D%5
+M05154TB#["A!B?1)B==(BR^[`````$*-!.4`````1(UPX$&)Q69FD&:008/\
+M`W81C02='`$``$&)A"X@`@``ZP^-!)T<`0``08F$+0`"``"_$"<``.@`````
+MB=I!@_P#=A!!BX0N)`(``(D%`````.L.08N$+00"``")!0````")!)3_PX/[
+M!G:@2(L$)$F)!TB+1"0(28E'"$B+1"0028E'$(M$)!A!B4<82(/$*%M=05Q!
+M74%>05_##[8'P.@$@^`'B<*`S@+V1P($#T7"B<*!R@```@#V1P,$#T7"B<*`
+MS@CV1P((#T7"B<*!R@``"`#V1P,(#T7"B<*`S@3V1P("#T7"B<*!R@``!`#V
+M1P,"#T7"#[97%,'B&`G0PV9F9I!F9F:09F9FD.@`````\\-F9I!F9I!F9I!!
+M5T%6055!5%532(/L*$F)_HGU3(L_B?(/ML)(:\!H2`'X2(FX0!(``,:`:1(`
+M``!`#[;VZ`````"Y`````+H@````2(G@B`A(_\!(_\IU]D0/MNU(B>)$B>Y,
+MB??H`````(GI#[;92&O;:$P!\TB)Y^@`````B8-0$@``2(M$)`Q(B8-4$@``
+M2(V38!(``$"`_0-V&D*-!*T`````2)A"BX0XT`$``(D%`````.L;2(T$K0``
+M```E_`,``$*+A#C0`0``B04`````B4(,B>H/ML)(:\!H2HV4,'`2``!`@/T#
+M=AU(C03M`````"7X!P``0HN$.(`!``")!0````#K&TB-!.T`````)?@'``!"
+MBX0X@`$``(D%`````(D"B>D/ML%(:\!H2HV$,&`2``#V0`X0#X11`0``]D`(
+M`G18N0````"Z(````$B)X&9F9I"("$C_P$C_RG7V0`^V]4B)XDR)]^@`````
+MB>@/MMA(:]MH3`'S3(VC4!(``$B)Y^@`````08E$)`Q(BT0D#$B)@V`2``#K
+M%8GJ#[;"2&O`:$+'A#!<$@```0`"`$"`_0-V&TB-!.T`````)?@'``!"QX0X
+M,`(``!@```#K&4B-!.T`````)?@'``!"QX0X4`(``!@```"_$"<``.@`````
+M0(#]`W8?2(T$[0`````E^`<``$*+A#@T`@``B04`````B<+K'4B-!.T`````
+M)?@'``!"BX0X5`(``(D%`````(G"B>D/ML%(:\!HB=&!X?___]^!R@```"!"
+M]X0P;!(``````P`/1-%`@/T#=A=(C03M`````"7X!P``0HF4.#0"``#K%4B-
+M!.T`````)?@'``!"B90X5`(``$B#Q"A;74%<05U!7D%?PV9F9I!F9I"+A_`(
+M```E____`#U0`9,`=1,/MH?S"```P.@$N@$````\#'0%N@````")T,-F9I!!
+M54%455-(@^P(28G]3(LGN`````"P4+0%2"7__P#_2`T```0`2+K___\`____
+M_T@AT$@-````,$BZ_____P#___]((=!(N@`````1````2`G02+K______P#_
+M_T@AT$BZ``````"K``!(B<5("=5(QX?X$P```````$@YO]`(```/A>D```!(
+MC9\`%```2(V7\`@``$&X`0```+D(````O@```@#H`````$&+A>@(``!!#[:5
+M\P@``(U$@OQ!B(7S"```3(GOZ`````"$P'4'28FM\`@``(L%`````$$/MI7S
+M"````<+_P(D%`````$&(E?,(``!!#[:%\`@``(B#\`@``$$/MH7Q"```B(/Q
+M"```00^VA?((``"(@_((``!!#[:%\P@``(/``HB#\P@``$$/MH7T"```B(/T
+M"```00^VA?4(``"(@_4(``!!#[:%]@@``(B#]@@``$$/MH7W"```B(/W"```
+M9F9FD&9FD$G'A?@3````````08N$)``!``")!0`````/M]#VPB!U&XG0@\@@
+M08F$)``!``!!BX0D``$``(D%`````$F+10#'@`0!````````28M%`,>`&`$`
+M``````!)BT4`QX`<`0```````+^`A!X`Z`````!!QX0D<`$``!@!``!!BX0D
+M=`$``(D%`````(#D_4''A"1P`0``&`$``(#,!$&)A"1T`0``0<>$)'`!```H
+M`0``0<>$)'0!``!_?P``0<>$)'`!```D`0``08N$)'0!``")!0````!FN```
+M0<>$)'`!```D`0``#?\_``!!B80D=`$``$''A"1P`0``/`$``$''A"1T`0``
+M``!Z`$''A"1P`0``I`$``$''A"1T`0``?;_O_T''A"1P`0``N`$``$&+A"1T
+M`0``B04`````#[?`0<>$)'`!``"X`0``#0``^@!!B80D=`$``$''A"2<````
+M_P```$''A"20`@``1`$``$''A"24`@``!A``"$''A"20`@``M`$``$''A"24
+M`@``7W```$''A"20`@``,````$&+A"24`@``B04`````,.2`S#-!B80DE`(`
+M`+T`````08!]0P`/AEL#``!F9F:00(#]`W8;2(T$[0`````E^`<``$+'A"`P
+M`@``"````.L92(T$[0`````E^`<``$+'A"!0`@``"````+\0)P``Z`````!`
+M@/T#=AU(C03M`````"7X!P``0HN$(#0"``")!0````#K&TB-!.T`````)?@'
+M``!"BX0@5`(``(D%`````(G"0(#]`W8=2(T$[0`````E^`<``('*``"``$*)
+ME"`T`@``ZQM(C03M`````"7X!P``@<H``(``0HF4(%0"``!`#[;=28V5\`@`
+M`(G>3(GOZ`````")WDR)[^@`````0(#]`W89C03=`````$B80L>$(#`"``!$
+M`0``ZQMFD$B-!.T`````)?@'``!"QX0@4`(``$0!``"_$"<``.@`````0(#]
+M`W8;2(T$[0`````E^`<``$+'A"`T`@``!A``".L92(T$[0`````E^`<``$+'
+MA"!4`@``!A``"$"`_0-V'4B-!.T`````)?@'``!"QX0@,`(``+0!``#K&V:0
+M2(T$[0`````E^`<``$+'A"!0`@``M`$``+\0)P``Z`````!`@/T#=AM(C03M
+M`````"7X!P``0L>$(#0"``!?<```ZQE(C03M`````"7X!P``0L>$(%0"``!?
+M<```0(#]`W8=2(T$[0`````E^`<``$+'A"`P`@``"````.L;9I!(C03M````
+M`"7X!P``0L>$(%`"```(````OQ`G``#H`````+K_5(``0(#]`W8B2(T$[0``
+M```E^`<``('B_U0``$*)E"`T`@``ZR!F9I!FD$B-!.T`````)?@'``"!XO__
+M?_U"B90@5`(``$`/MMVZ`0```(G>3(GOZ`````"_(*$'`.@`````0(#]`W89
+MC03=`````$B80HN$((`!``")!0````#K&TB-!.T`````)?@'``!"BX0@@`$`
+M`(D%`````(G"@>+___[_0(#]`W872(T$[0`````E^`<``$*)E""``0``ZQ5(
+MC03M`````"7X!P``0HF4((`!``"Z!0'(`$"`_0-V&4B-!.T`````)?@'``!"
+MB90@A`$``.L79I!(C03M`````"7X!P``0HF4((0!``"_H(8!`.@`````0`^V
+M]4R)[^@`````_\5!.&U##X>I_/__3(GOZ`````!!BX0D!`$``(D%`````(/(
+M`D&)A"0$`0``08N$)``!``")!0````"#X/V#R`U!B80D``$``$&+A"0``0``
+MB04`````28N%F!```$&)A"0(`0``08N%G!```$&)A"0,`0``28N%R!```$&)
+MA"00`0``08N%S!```$&)A"04`0``0<>$)"`!````````00^WA3P2```E_P\`
+M``T```$`08F$)"`!``!)BX4H$0``08F$)"0!``!!BX4L$0``08F$)"@!``!)
+MBX50$0``QP#_#P``0<>$)#0!````````00^WA3X2```E_P\```T```$`08F$
+M)#0!``!)BX58$0``08F$)#@!``!!BX5<$0``08F$)#P!``!!QX0D2`$`````
+M``!!QX0D3`$````!``!!BX0D!`$``(D%`````(/(64&)A"0$`0``0<>$)%0!
+M``#[_P`,0<>$)%P!``#__P``2(/$"%M=05Q!7<-F9I!F9I!F9I!32(G[Z.?W
+M__^Z`````&:0#[;"QX2#F`D```````#'1(-<`````/_"@/H/=N-FQX,X$@``
+M_P]FQX,Z$@``_P_&0U`!N`$```!;PV9FD&9FD+D`````.?%]+69F9I!F9I!(
+M8\$/MA0XA-(/E<"`^B`/E<(/ML"%PG0'N`````##D/_!.?%\VK@!````9F:0
+M9I##9F9FD&9F9I!F9F:09F:02(/L.$B)7"0(2(EL)!!,B60D&$R);"0@3(ET
+M)"A,B7PD,$F)_$B)]6:!?B"%``^'G````$@/MT8@@+PX0`@``/\/A(D```!F
+M@WX@?W<B2`^VA#A`"```2(N7&`D``$AIP(@!``!(BT002`^V2`CK96:!?B"!
+M`'<G2`^W1B!(#[:$.$`(``!(BY=H"0``2&G`R`\``$B+1!`(#[9(".LV2`^W
+M1B!(#[:$.$`(``!(BY=`"0``2&G`T````$B+A!"(````#[9(".L,9F9FD&9F
+MD+G_____N_____]F@7T@A0!W#D@/MT4@0@^VG"!`"```@/G_="$/ML%"@+P@
+MQ@@``/\/E,*`^_\/E,`)T*@!=0:`?20&=2I(@WUX`'032(UU>$R)Y^@`````
+M9F9FD&9FD$B)[DR)Y^@`````Z;`&```/ML%.#[:L(,8(``!-:>VH````3XVL
+M):`!```/ML-(:<"(`0``2(G#20.<)!@)``!F@;O`````JPUW!H!])`)U-DB#
+M?7@`=`Q(C75X3(GGZ`````!(B>Y,B>?H`````,9#0O_&0T,"2(G>3(GGZ```
+M``#I.08```^V13B#^!H/A%P%``"#^!I_+(/X$G1=@_@2?Q*%P`^$_P0``&9F
+MD&:0Z=\%``"#^!4/A,<%``!FD.G/!0``@_@E#X2S`@``@_@E?Q*#^!L/A,4$
+M``!F9F:0Z:\%```]G@```&9FD&9FD`^$>P,``.F9!0``@'TD`)`/A6$"``!(
+MBTU(@'TY`&:0=&F`>T(9#Y3`@\`+B$-"2(7)=$F`>0&`=4.`>0(`=3V`>0,\
+M=S</ME$#OR````"^%````$B-0WQ`B#A(_\!(_\YU]8/Z%+@4````#T/0B=)(
+MC7M\2(UQ!.@`````9L>#P```````Z1D%``#&0T(8]D$&0'4/#[8!@^`?@_@-
+M#X4[`0``#[8!@^`?@_@-N"(```"Z#0````]$PHA#00^V\$C'QP````"X````
+M`.@`````2(-]>`!T#$B-=7A,B>?H`````$B)[DR)Y^@`````0;X`````08!]
+M#@!V04F-;6!(B>_H`````$B)PTB+10A(B5T(2(DK2(E#"$B)&`^V4T&`^B(/
+ME<"`^@T/E<(/ML"%PG4)0?_&13AU#G?#13AU#@^%B00``&;'1"0&``!!OP``
+M``!!O@````!!@'T.`'9528UM8$B)[^@`````2(G#2(M%"$B)70A(B2M(B4,(
+M2(D8#[9#03PB#Y3"/`T/E,`)T*@!=!</MT0D!F8Y0S!R#$F)WP^W6S!FB5PD
+M!D'_QD4X=0YWKTV%_P^$$00``$&`?T+_#X0&!```0<9'0O],B?Y,B>?H````
+M`.GQ`P``#[8!@^`?@_@!=0W&0T$!QD-"_^FM`P``]D$%`70$QD-"&4B#?4@`
+M#X28`P``2(M-2+X`````NB@```!(C8.0````0(@P2/_`2/_*=?6^`````+H(
+M````2(V#N````$"(,$C_P$C_RG7U2(M!"$B)@Y````!(BT$02(F#F````$B+
+M01A(B8.@````BT$@B8.X````Z2T#``!F_X/`````OQ`G``#H`````,9#0@7I
+M$P,``$B+34A(BT50#[9``H/@#X!])`!U<P^V40</MD$&P>`(`<(/MD$%P>`0
+M`<(/MD$$P>`8`<*)D]P````/ME$##[9!`L'@"`'"#[9!`<'@$`'"#[8!P>`8
+M`<)(B5-P@[O<`````'4:9O^#P````+\0)P``Z`````#&0T(+Z90"``#&0T(-
+MZ8L"``"`?20@9F:0=2X\!@^4PCP"#Y3`"="H`70>9O^#P````+\0)P``Z```
+M``#&0T(%Z5@"``!F9F:02(-]>`!T#$B-=7A,B>?H`````$B)[DR)Y^@`````
+M2(G:3(GN3(GGZ`````#I3P(``$B+15`/MD`"@^`/2(M-2(!])``/A;$````/
+MME$+#[9!"L'@"`'"#[9!"<'@$`'"#[9!",'@&`'"B9/<````#[91!P^V00;!
+MX`@!P@^V007!X!`!P@^V003!X!@!PDACTD@/MD$#2,'@($@!PD@/MD$"2,'@
+M*$@!PD@/MD$!2,'@,$@!PD@/M@%(P>`X2`'"2(E3</9!#`%T!6:#2V($@[O<
+M`````'4:9O^#P````+\0)P``Z`````#&0T(9Z6(!``#&0T(-Z5D!``"`?20@
+MD'4N/`8/E,(\`@^4P`G0J`%T'F;_@\````"_$"<``.@`````QD-"&>DH`0``
+M9F9FD$B#?7@`=`Q(C75X3(GGZ`````!(B>Y,B>?H`````$B)VDR)[DR)Y^@`
+M````Z1\!``#&0T(4Z>H```"`?20@9I!U-4B+15`/MD`"@^`//`8/E,(\`@^4
+MP`G0J`%T&F;_@\````"_$"<``.@`````QD-"%.FM````QD-"&^FD````@'TD
+M`'5,2(M-2`^W0V!F@TMB`0R&9HE#8(!Y`P!U!8`Y%G<79O^#P````+\0)P``
+MZ`````#&0T(-ZVGV008$=`=F@TMB`NM'9H-C8OUF9I#K/8!])"!U,DB+15`/
+MMD`"@^`//`8/E,(\`@^4P`G0J`%T'&;_@\````"_$"<``.@`````QD-"!>L:
+M9H-C8/G&0T(.ZP^`?20`=05F@TMB`\9#0@](@WUX`'0,2(UU>$R)Y^@`````
+M2(GN3(GGZ`````!(B=Y,B>?H`````&9FD$B+7"0(2(ML)!!,BV0D&$R+;"0@
+M3(MT)"A,BWPD,$B#Q#C#9F9FD&9FD&9FD&9FD$B#["A(B5PD"$B);"003(ED
+M)!A,B6PD($B)_4B)\V:!?B"%``^'E@```$@/MT8@@+PX0`@``/\/A(,```!F
+M@WX@?W<B2`^VA#A`"```2(N7&`D``$AIP(@!``!(BT002`^V2`CK7V:!?B"!
+M`'<G2`^W1B!(#[:$.$`(``!(BY=H"0``2&G`R`\``$B+1!`(#[9(".LP2`^W
+M1B!(#[:$.$`(``!(BY=`"0``2&G`T````$B+A!"(````#[9(".L&D+G_____
+MOO____]F@7L@A0!W#4@/MT,@#[:T*$`(``"`^?]T(0^VP8"\*,8(``#_#Y3"
+M0(#^_P^4P`G0J`%U!H![)`9U(TB#>W@`=`Q(C7-X2(GOZ`````!(B=Y(B>_H
+M`````.EX`@``#[;!3`^VI"C&"```36GDJ````$V-I"R@`0``B?(/ML)(:<"(
+M`0``28G%3`.M&`D``$B+<TB`>R0`#X2I````@'LZ!@^$GP```(![.@P/A)4`
+M``!!#[>5P````(U"`69!B87`````9H/Z"78F08!]0@9T'T'&14,"0<9%0O]!
+M@&5$_DR)[DB)[^@`````Z>8!``"_Z`,``.@`````20^V14"H`G0IJ`1T):@!
+M="%!#[95>4F+=5!!N`````"Y`@```$R)Y^@`````Z:H!``!!QD5"`TR)[DB)
+M[^@`````Z94!``!F9I!FD(![.@%U#T'&14($9F:09I#I30$``(![.@)U"D'&
+M14(%Z3T!``"`>SH##X6:````08!]0@5U+&:!?@3(-V9F9I!U($$/MW4P2,?'
+M`````+@`````Z`````!!QD5"!ND``0``3(GOZ`````!)C;V0````OB@```#H
+M!?7__X3`=3A)C7U\OA0```#H\_3__X3`=29)C;VX````O@@```#HWO3__X3`
+M=1%)@WUP`'0*0<9%0A?IJP```$'&14(:9D'_A<````#IF0```(![.A=U"D'&
+M14(5Z8D```"`>SH89F:0=0=!QD5"%NMY@'LZ!&9FD'4'0<9%0@?K:8![.@5F
+M9I!U!T'&14((ZUF`>SH&9F:0=0=!QD5"">M)@'LZ#&9FD'4'0<9%0@KK.8![
+M.A9F9I!U!T'&14(4ZRF`>SH.9F:0=2!(@WMX`'0,2(US>$B)[^@`````2(G>
+M2(GOZ`````#K+DB#>W@`=`Q(C7-X2(GOZ`````!(B=Y(B>_H`````$R)[DB)
+M[^@`````9F:09I!(BUPD"$B+;"003(MD)!A,BVPD($B#Q"C#9F9FD&9FD$B#
+M["A(B5PD"$B);"003(ED)!A,B6PD($B)_4B)\V:!?B"%``^'E@```$@/MT8@
+M@+PX0`@``/\/A(,```!F@WX@?W<B2`^VA#A`"```2(N7&`D``$AIP(@!``!(
+MBT002`^V2`CK7V:!?B"!`'<G2`^W1B!(#[:$.$`(``!(BY=H"0``2&G`R`\`
+M`$B+1!`(#[9(".LP2`^W1B!(#[:$.$`(``!(BY=`"0``2&G`T````$B+A!"(
+M````#[9(".L&D+G_____OO\```!F@7L@A0!W#D@/MT,@9@^VM"A`"```@/G_
+M#Y3"9H'^_P`/E,`)T*@!="-(@WMX`'0,2(US>$B)[^@`````2(G>2(GOZ```
+M``#IRP````^VP4P/MJ0HQ@@``$UIY*@```!-C:0LH`$```^WQDAIP(@!``!)
+MB<5,`ZT8"0``@'LD`'1$#[;Q2,?'`````+@`````Z`````!)BU4(28M%`$B)
+M4`A(B0)!_DPD#DR)[DB)[^@`````0<9$)`G_3(GF2(GOZ`````"`>SH!=2R_
+M$"<``.@`````2(G>2(GOZ`````"Y`0```+H`````3(GN3(GGZ`````#K(+]0
+MPP``Z`````!(B=Y(B>_H`````$R)[DR)Y^@`````2(M<)`A(BVPD$$R+9"08
+M3(ML)"!(@\0HPV9FD&:02(/L*$B)7"0(2(EL)!!,B60D&$R);"0@2(GU08G4
+M08G-2(L?2(G?Z`````!(B<%(A<!U#<:%X0````'&14(#ZW7&0#CAQD`Y`4&`
+M_`$9P/?0@\`"B$$ZN`\```!%A.UU$+@`````2(-]6`!T!`^V17F(03L/MT4P
+M9HE!($B)62C'030`````2,=!2`````!%A.U(Q\``````2,?"`````$@/1<)(
+MB8&@````2(G.2(G?Z`````!(BUPD"$B+;"003(MD)!A,BVPD($B#Q"C#D$%7
+M059!54%455-(@^P(28G]2(GU3(LW3(GWZ`````!(B<-(A<!U#,:%X0````'I
+MGP```$R)]^@`````28G$2(7`=13&A>$````!2(G>3(GWZ`````#K>TR->UC&
+M0SCAQD,Y`<9#.@,/MT4P9HE#($F+10!(B4,HQT,T``(``$F+1"002(E#2+D`
+M````N@`"``"("$C_P$C_RG7V3(EC>$C'@Z``````````O@````!,B?_H````
+M`(M3-$F+="083(G_Z`````!(B=Y,B??H`````$B#Q`A;74%<05U!7D%?PV9F
+M9I!F9F:09F9FD&9FD$&)T+D`````.=%S'V9F9I`/MA</MD<!B`:(5@%(@\8"
+M2(/'`O_!1#G!<N7SPV9FD$%455-(B?M(B?5)B?1F@SX`>0X/MP8E`!\``,'X
+M"(A'04B+111(B4-\2(M%'$B)@X0```"+122)@XP```!(BT4N2(F#N````$B+
+M139(B8.0````2(M%/DB)@Y@```!(BT5&2(F#H````$B+14Y(B8.H````2(M%
+M5DB)@[````!(C7M\N@H```!(B?[H0/___TB-N[@```"Z!````$B)_N@L____
+M2(V[D````+H4````2(G^Z!C___]FQT-@``!FQT-B``!F08.\)+(!```!#Y3"
+MP>(##[9#1(/@]PG0B$-$]H6G````!'0&9L=#8`$`]H6D`````70H9H-+8`+V
+MA:H````!=`5F@TMB`?:%J`````%T#&:!2V```69FD&9FD/:%I````"!T%V:#
+M2V`$]H6J````('0)9H-+8@)F9F:0]H6D````0'079H%+8(``]H6J````0'0(
+M9H-+8@AF9I#&0WH"]H69`````70G]D-@`70*9H-+8`AF@TMB$`^VA98```"#
+MX!__P(A#>CP@=03&0WH?]H68````"'0&9H%+8``"]H68````!'0%9H-+8"#V
+MA9@````"=`5F@TM@$/:%J````"!T#O:%K@```"!T!6:#2V!`]D-@`7042(N%
+MR````$B)0W#K#F9F9I!F9I"+17A(B4-P2/]+</9%:@)T'_:%@`````]T%F:#
+MO8`````"&<"#P`2(0V3K"&9F9I#&0V0"QD-E__9%?@1T!L9#90+K'/9%?@)T
+M",9#90%FD.L.]D5^`70(QD-E`&9F9I#&0V;_]D5J!'0?N0````"02`^WA;``
+M``!(T_BH`70#B$MF_\&`^09VY[X``@``2(GOZ`````")@\0```"X`0```%M=
+M05S#9F9FD&9FD&9FD$B#[!A(B1PD2(EL)`A,B60D$$B)_4B)\TR+)TR)Y^@`
+M````2(G"#[9+9DB%P'4)QH/A`````>M'QD`XX<9`.0'&0#H$B$@[#[=#,&:)
+M0B!(BT4`2(E"*,="-`````!(QT)(`````$C'@J``````````B$MI2(G63(GG
+MZ`````!(BQPD2(ML)`A,BV0D$$B#Q!C#9F9FD&9F9I!F9I!F9I!(@^P82(D<
+M)$B);"0(3(ED)!!(B?U(B?-,BR=,B>?H`````$B)P@^V2V1(A<!U"<:#X0``
+M``'K1\9`..'&0#D!QD`Z!8A(.P^W0S!FB4(@2(M%`$B)0BC'0C0`````2,="
+M2`````!(QX*@`````````(A+9TB)UDR)Y^@`````2(L<)$B+;"0(3(MD)!!(
+M@\08PV9F9I!F9F:09F:09F:02(/L&$B)'"1(B6PD"$R)9"002(G[2(GU3(LG
+M3(GGZ`````!(B<)(A<!U"<:%X0````'K0,9`..'&0#D!QD`Z!@^W13!FB4(@
+M2(L#2(E"*,="-`````!(QT)(`````$C'@J``````````2(G63(GGZ`````!(
+MBQPD2(ML)`A,BV0D$$B#Q!C#9F:09F:09F:02(/L&$B)'"1(B6PD"$R)9"00
+M2(G[2(GU3(LG3(GGZ`````!(B<)(A<!U"<:%X0````'K0,9`..'&0#D!QD`Z
+M#`^W13!FB4(@2(L#2(E"*,="-`````!(QT)(`````$C'@J``````````2(G6
+M3(GGZ`````!(BQPD2(ML)`A,BV0D$$B#Q!C#9F:09F:09F:02(/L&$B)'"1(
+MB6PD"$R)9"002(G[2(GU3(LG3(GGZ`````!(B<)(A<!U"<:%X0````'K2\9`
+M..'&0#D!QD`Z%L9`/`$/MT4P9HE"(,:"F`````](BP-(B4(HQT(T`````$C'
+M0D@`````2,>"H`````````!(B=9,B>?H`````$B+'"1(BVPD"$R+9"002(/$
+M&,-F9F:09F9FD&9FD&9FD$B#[!A(B1PD2(EL)`A,B60D$$B)^TB)]4R+)TR)
+MY^@`````2(G"2(7`=0G&A>$````!ZT#&0#CAQD`Y`<9`.A</MT4P9HE"($B+
+M`TB)0BC'0C0`````2,="2`````!(QX*@`````````$B)UDR)Y^@`````2(L<
+M)$B+;"0(3(MD)!!(@\08PV9FD&9FD&9FD$B#[!A(B1PD2(EL)`A,B60D$$B)
+M^TB)]4R+)TR)Y^@`````2(G"2(7`=0G&A>$````!ZT#&0#CAQD`Y`<9`.A@/
+MMT4P9HE"($B+`TB)0BC'0C0`````2,="2`````!(QX*@`````````$B)UDR)
+MY^@`````2(L<)$B+;"0(3(MD)!!(@\08PV9FD&9FD&9FD$B#["A(B1PD2(EL
+M)`A,B60D$$R);"083(ET)"!(B?U!B?1!B=5!B<Y(BX>(````2(L82(G?Z```
+M``!(B<;&0#CAQD`Y`<9`.A&X#P```$6$Y'4$#[9%1XA&.T2(;CP/MT5`9HE&
+M($B)7BC'1C0`````2,=&2`````!%A/9(Q\``````2,?"`````$@/1<)(B8:@
+M````2(G?Z`````!(BQPD2(ML)`A,BV0D$$R+;"083(MT)"!(@\0HPV9FD&9F
+MD$B#[#A(B5PD"$B);"003(ED)!A,B6PD($R)="0H3(E\)#!)B?R)RT&)]4&)
+MUD6)QTB+AX@```!(BRA(B>_H`````$B)QL9`..'&0#D!QD`Z$K@/````183M
+M=09!#[9$)$>(1CM$B'8\#[;'B$8]B=C!Z!"(1CZ)V,'H&(A&/XA>0$$/MT0D
+M0&:)1B!(B6XHQT8T`````$C'1D@`````183_2,?``````$C'P@````!(#T7"
+M2(F&H````$B)[^@`````2(M<)`A(BVPD$$R+9"083(ML)"!,BW0D*$R+?"0P
+M2(/$.,-F9F:09F9FD&9FD$B#[#A(B5PD"$B);"003(ED)!A,B6PD($R)="0H
+M3(E\)#!)B?Q(B?5!O@````!F@7X@A0`/AY8```!(#[=&(("\.$`(``#_#X2#
+M````9H-^(']W(D@/MH0X0`@``$B+EQ@)``!(:<"(`0``2(M$$$@/ME`(ZU]F
+M@7X@@0!W)T@/MT8@2`^VA#A`"```2(N7:`D``$AIP,@/``!(BT00"`^V4`CK
+M,$@/MT8@2`^VA#A`"```2(N70`D``$AIP-````!(BX00B`````^V4`CK!I"Z
+M_____[G_____9H%]((4`=PY(#[=%($(/MHP@0`@```^VPDH/MIP@Q@@``$AI
+MVZ@```!*C9PCH`$```^VP4AIP-````!)B<5-`ZPD0`D``(!]/`(/A88````/
+MMD5`)?````"#^"`/E,*#^!`/E,`)T*@!=&L/ME5`B="#X`^#^`%U)8G1@>'P
+M````0;@!````N@(```"^`````$R)[^@`````Z;$&``!)#[9%1TV+=,58#[9%
+M0"7P````@_@@#Y3`@\`(08B&X@```$F+1EAF@6!.__[I?P8``&9FD&9FD(!]
+M)`!T/P^V721(@WUX`'0/2(UU>$R)Y^@`````9F:02(GN3(GGZ`````"`^P(/
+MA44&``!,B>Y,B>?H`````)#I-`8``$$/MD5"@_@9#X?]!0``B<#_),4`````
+M00^V15#!X`A(F$F+E"3`$```BX0"3`@``(D%`````(G"@_@%N`4````/1L)!
+MB$4[@'L/`'0.0<9%0@#&0P\`Z;`%``!!QD5"`NFF!0``00^V15#!X`A(F$F+
+ME"3`$```BX0"3`@``(D%`````&8/ML!F08E%/$$/MD50P>`(2)A)BY0DP!``
+M`(N$`D0(``")!0````")PL'H"&9!B44^#[;"P>`(9D$)13QF08%]/D!!N`,`
+M``"Z&0````]$PD&(14+I+04``$$/MD50P>`(2)A)BY0DP!```(N$`D0(``")
+M!0````!!B$4Y00^V15#!X`A(F$F+E"3`$```BX0"3`@``(D%`````(G"J`AT
+M!T'&13H,ZR>H!'0,0<9%.@MF9I!FD.L72(G02-'H@^`!@_@!&<#WT(/@"D&(
+M13I!QD5"!.FM!```00^V15#!X`A(F$F+E"3`$```BX0"3`@``(D%`````(/(
+M"$&(14A!QD5"!>E]!```0<9%0@;I<P0``$$/MD50P>`(2)A)BY0DP!```(N$
+M`DP(``")!0````!!@'U'`1G`@^`"@\`408A%0ND^!```00^V14?_P$&(14=!
+M.D4[<PI!QD5"%NDC!```0<9%1P!!QD5"%[\@H0<`Z`````#I"@0``$'&14(4
+MZ0`$``!!QD5"".GV`P``0<9%0A20Z>L#``!!QD5*`N@`````28F%P````$'&
+M14(5Z=`#``!!#[9%4,'@"$B828N4),`0``"+A`),"```B04`````1`^V^$$/
+MMD50P>`(2)A)BY0DP!```(N$`D0(``")!0`````/ML#!X`A!"<?H`````$F)
+MA<@```!$B?B#X`^#^`-U$4&`?4H`=`I!QD5""NE=`P``28N%R````$$KA<``
+M```M0`T#`'@'08!]2@!T&4'&14(508!]2@`/A#$#``!!_DU*Z2@#``!)#[9%
+M1TF#?,58``^$U0```,9$)`<`@'L.`'8[3(U[8$R)_^@`````28G&20^V14=-
+M.73%6'0@28M'"$V)=PA-B3Y)B48(3(DP_D0D!P^V1"0'.$,.=\G^2PY)@WXX
+M`'1L28M&.$C'0&``````0?9&1`1U)4'^A"3O$P``3(GGZ`````!)BT8X#[9P
+M`;H!````3(GGZ`````!)BU8X28NT)-`(``"_`0```.@`````28M6.$F+M"30
+M"```OP8```#H`````$G'1C@`````20^V14=)QT3%6`````!,B?9,B>?H````
+M`$'&14()Z3@"``!!#[9%4,'@"$B828N4),`0``"+A`),"```B04`````#[;(
+M00^V15#!X`A(F$F+E"3`$```BX0"1`@``(D%`````,'@"`G!08E-5$&`?4(*
+M=`CWP0```0!T$4'&14(+Z=4!``#^2PYFD.MF0<9%0@Q)#[9%1TF#?,58`'1)
+MQD0D!@"`>PX`=DE,C7M@2(U[8.@`````28G&20^V14=-.73%6'3`28M'"$V)
+M=PA-B3Y)B48(3(DP_D0D!@^V1"0&.$,.=\CK"TR)Y^@`````28G&387V#X2(
+M`0``20^V14=-B73%6$$/MD5+08B&X@```.E$`0``0;X_0@\`2(M#(/9`,@AU
+M)4R)Y^@`````OP$```#H`````$'_SD&#_O]T"DB+0R#V0#((=-M!QD5"">D%
+M`0``00^V15#!X`A(F$F+E"3`$```BX0"3`@``(D%`````$0/MOA!#[9%4,'@
+M"$B828N4),`0``"+A`)$"```B04`````#[;`P>`(00G'1(GY@>'_#P``@?D3
+M`0``#Y3"@?DC`0``#Y3`"="H`70M0<9%0AB!^1,!``!U"D'&14L(Z8(```!$
+MB?@E_P\``#TC`0``=7-!QD5+">ML00^V549!#[9%.__(.<)]#T'^149!_D5'
+M0<9%0@?K34'&14(`00^W14Z#X/>#R`)F08E%3DB#?7@`=`Q(C75X3(GGZ```
+M``!(B>Y,B>?H`````,9#"?](B=Y,B>?H`````.LR0<9%0@-F9F:02(-]>`!T
+M#$B-=7A,B>?H`````$B)[DR)Y^@`````3(GN3(GGZ`````!(BUPD"$B+;"00
+M3(MD)!A,BVPD($R+="0H3(M\)#!(@\0XPV9F9I!(@^PX2(E<)`A(B6PD$$R)
+M9"083(EL)"!,B70D*$R)?"0P2(G[28GT0;\`````O@````!F08%\)""%``^'
+MGP```$D/MT0D(("\.$`(``#_#X2+````9D&#?"0@?W<B2`^VA#A`"```2(N7
+M&`D``$AIP(@!``!(BT002`^V4`CK969!@7PD(($`=RA)#[=$)"!(#[:$.$`(
+M``!(BY=H"0``2&G`R`\``$B+1!`(#[90".LS20^W1"0@2`^VA#A`"```2(N7
+M0`D``$AIP-````!(BX00B`````^V4`CK"&9FD+K_____N?____]F08%\)""%
+M`'<.20^W1"0@#[:,&$`(```/ML%(:<#0````28G%3`.K0`D```^VPD@/MJP8
+MQ@@``$AI[:@```!(C:P=H`$``(#Z_W0?@+P8Q@@``/\/E,*`^?\/E,`)T*@!
+M=0A!@'PD)`9U*TF#?"1X`'0328UT)'A(B=_H`````&9FD&9FD$R)YDB)W^@`
+M````Z=`%``!!@'PD)`!T&$B)[DB)WV:0Z`````#IM@4``&9FD&9FD$$/MD5"
+M@^@-@_@$#X=O!0``B<#_),4`````00^V15#!X`A(F$B+D\`0``"+A`),"```
+MB04`````1`^VR$$/MD50P>`(2)A(BY/`$```BX0"1`@``(D%`````,'@"$$)
+MP;\`````0;@`````0;X`````08!].P!V,D2)RF9FD&:02(G01(GQ2-/XJ`%T
+M%/_&#[;!28-\Q5@`=`5!_\#K`O_'0?_&13AU.W?60(3_=`5!@$U)`46$P'0%
+M08!-20)`@/X!#X4]`0``0;X`````08!].P!V4$2)RD$/MLY(B=!(T_BH`70<
+MB<I(B=Y(B>_H`````$B%P'052(EH2$R):%CK"T'_QD4X=3MWS>L818AU1T4X
+M=3MV#D'&14(.9F9FD.E;!```13AU.P^%400```^V=0VZ`0```$B)W^@`````
+MQD0D`P"`?0X`#X:`````3(UU8$R)]^@`````28G'28M&"$V)?@A-B3=)B4<(
+M3(DX28-_.`!T&DF+5SA(B[/0"```OP4```#H`````$&`3T0"3(GZO@8```!(
+MB>_H`````$&`?WL`=!E(B=_H`````+\!````Z`````!!@'][`'7G_D0D`P^V
+M1"0#.$4.=X1)@WPD>`!T#4F-="1X2(G?Z`````!,B>9(B=_H`````$'&14D`
+MQD4)`$B)[^@`````Z:L#``!F08%-3H``0;X`````08!].P!V342)RD$/MLY(
+MB=!(T_BH`70<B<I(B=Y(B>_H`````$B%P'062(EH2$R):%CK#$'_QD4X=3MW
+MS9#K%$6(=4=%.'4[=@I!QD5"#^D:`P``13AU.P^%$`,```^V=0VZ`0```$B)
+MW^@`````QD0D`@"`?0X`#X:`````3(UU8$R)]^@`````28G'28M&"$V)?@A-
+MB3=)B4<(3(DX28-_.`!T&DF+5SA(B[/0"```OP4```#H`````$&`3T0"3(GZ
+MO@8```!(B>_H`````$&`?WL`=!E(B=_H`````+\!````Z`````!!@'][`'7G
+M_D0D`@^V3"0".$T.=X1)@WPD>`!T#4F-="1X2(G?Z`````!,B>9(B=_H````
+M`$'&14D`QD4)`$B)[^@`````Z6H"``!!#[9%4,'@"$B82(N3P!```(N$`DP(
+M``")!0````!$#[;(00^V15#!X`A(F$B+D\`0``"+A`)$"```B04`````P>`(
+M00G!0??!```$`'0'0?9%20%U$$'WP?__^_]T$4'V14D"=`I!QD5"#^G*`0``
+M0<9%20!F9I!FD.GK`0``0;X_0@\`2(M%(/9`,@AU)4B)W^@`````OP$```#H
+M`````$'_SD&#_O]T"DB+12#V0#((=-M!QD5"$.E\`0``00^V15#!X`A(F$B+
+MD\`0``"+A`),"```B04`````#[;`B40D!$$/MD50P>`(2)A(BY/`$```BX0"
+M1`@``(D%``````^VP,'@"`E$)`2+1"0$@^`/@_@##X7`````0?9%20%T#$'&
+M14(2ZPK^30[K9D'&14(220^V14=)@WS%6`!T2<9$)`$`@'T.`'9)3(UU8$B-
+M?6#H`````$F)QTD/MD5'33E\Q5ATPDF+1@A-B7X(38DW28E'"$R)./Y$)`$/
+MMD0D`3A%#G?(ZPM(B=_H`````$F)QTV%_P^$S0```$D/MD5'38E\Q5B+1"0$
+M)?\/```]$P$``'4*0<:'X@````CK>8M$)`0E_P\``#TC`0``=6E!QH?B````
+M">M?0<9%0A/K6$$/MD50P>`(2)A(BY/`$```BX0"3`@``(D%`````$$/MD50
+MP>`(2)A(BY/`$```BX0"1`@``(D%`````$D/MD5)@^`!@_@!&<#WT(/`$T&(
+M14)F9I!F9I!)@WPD>`!T#4F-="1X2(G?Z`````!,B>9(B=_H`````$R)[DB)
+MW^@`````9F:09I!(BUPD"$B+;"003(MD)!A,BVPD($R+="0H3(M\)#!(@\0X
+MPY"0D)"0D)"0D)"0D)!(BT<(2"T``@$`@^('P>((@,X@2,'F"('F`/\``(F4
+M!AS%```/MX0&',4``&:)!0`````/ML##9F:09F:09F:02(M'"$@M``(!`(/B
+M!\'B"(C*@,X02,'F"('F`/\``(F4!AS%``##9F:09F:09F:0055!5%53NP``
+M``!!NP````!!NO____]!N0````"]`0```$&XP.'D`$$/MLG_P8GNT^:Y````
+M``^VP?_`B<(/K]9$B<!!B=6Z`````$'W]8GZ*<(Y^+C_____#T;"1#G0<PE!
+MB<)$B<M!B<O_P8#Y#W;%0?_!08#Y!W:M00^VP\'@`PG8#[;`6UU!7$%=PV:0
+M2(/L&$B)'"1,B60D"$R);"0028G\3(VOP!$``$`/MMZY`````+H'````B=[H
+M#____T$/MDT!N@,```")WDR)Y^C[_O__2(L<)$R+9"0(3(ML)!!(@\08PV9F
+M9I!F9F:005154TF)_+L`````0`^V[KH"````B>Y,B>?H@?[__Z@(=`VX````
+M`.L?9F:09F:0OP$```#H`````/_#@?L/)P``=LRX_P```%M=05S#9I!3B?,/
+MMO*Z`P```.A`_O__.-@/E,`/ML!;PV9FD&9FD$B#["A(B1PD2(EL)`A,B60D
+M$$R);"083(ET)"!(B?U!B<Y!B?1!B=4/MLI`#[;>N@$```")WN@U_O__N4``
+M``"Z`@```(G>2(GOZ"'^__^)WDB)[^@W____NO\```"%P'5S187V=$E!]L4!
+M="-!#[;4OD````!(B>_H8O___[K_````A<!T3NM'9F9FD&9FD$$/MM2^&```
+M`$B)[^@_____NO\```"%P'0KZR1F9F:000^VU+XH````2(GOZ!____^Z_P``
+M`(7`=`MF9I!F9I"Z`````(G02(L<)$B+;"0(3(MD)!!,BVPD&$R+="0@2(/$
+M*,-F9F:09F9FD&9F9I!(@^PH2(E<)`A(B6PD$$R)9"083(EL)"!(B?U)B<V)
+M\T&)U$`/MO;H9/[__[K_____A<!U,0^VTT$/MO1(B>_HG/[__[K_____A<!T
+M&0^V\[H!````2(GOZ-/\__]!B$4`N@````")T$B+7"0(2(ML)!!,BV0D&$R+
+M;"0@2(/$*,-F9F:09F9FD&9F9I!F9I!!5T%6055!5%532(/L"$B)_4F)ST6)
+MQD&)]4&)U,=$)`0`````A-(/A/@```!`#[;>N60```"Z`@```(G>Z)[\__^)
+MWDB)[^BT_?__A<!U$+H#````B=Y(B>_H0?S__Y!!#[;400^V];D!````2(GO
+MZ/O]__^Z_____X3`#X6)`0``NP````!$.?,/C7<!``!!C4;_B00D10^VY69F
+MD&:0.1PD=3NY0````+H"````1(GF2(GOZ";\__](8\M,`?FZ6````$2)YDB)
+M[^B@_O__A<`/A2\!``#K.69FD&9FD+E$````N@(```!$B>9(B>_HZ_O__TAC
+MRTP!^;I0````1(GF2(GOZ&7^__^%P`^%]````/]$)`3_PT0Y\WR"9I#IX@``
+M`+^@A@$`Z.'[__\/MLA!#[;=N@,```")WDB)[^B;^___B=Y(B>_HL?S__X7`
+M="`/MHW!$0``N@,```")WDB)[^AW^___NO_____IF````$$/MMV)VKY@````
+M2(GOZ,K\__^%P'4=#[:-P1$``+H#````B=Y(B>_H0/O__[K_____ZV2[````
+M`$0Y\WT^10^VY;E$````N@(```!$B>9(B>_H%OO__TACRTP!^;J`````1(GF
+M2(GOZ)#]__^%P'4+_T0D!/_#1#GS?,8/MHW!$0``00^V];H#````2(GOZ-GZ
+M__^+5"0$B=!(@\0(6UU!7$%=05Y!7\-F9F:02(/L&$B)7"0(3(ED)!!)B?Q(
+MB=!`#[;608G(2(G!O@````#HN/W__XG#N50```"Z`@```+X`````3(GGZ'_Z
+M__^)V$B+7"0(3(MD)!!(@\08PV9F9I!F9F:09F:09F:02(/L&$B)7"0(3(ED
+M)!!)B?Q(B=!`#[;608G(2(G!O@$```#H6/W__XG#N50```"Z`@```+X!````
+M3(GGZ!_Z__^)V$B+7"0(3(MD)!!(@\08PV9F9I!F9F:09F:09F:02(/L.$B)
+M7"0(2(EL)!!,B60D&$R);"0@3(ET)"A,B7PD,$F)_$F)ST6)Q8GU08G60`^V
+MWKED````N@(```")WNB[^?__B=Y,B>?HT?K__X7`=0^Z`P```(G>3(GGZ%[Y
+M__]!#[;60`^V];D!````3(GGZ!G[__^Z_____X3`=4?K#KK_____ZSYF9F:0
+M9F:0NP````!$.>M]*$`/MNUFD$ACPT(/MA0XN0````")[DR)Y^C9^O__A,!U
+MQ__#1#GK?-ZZ`````(G02(M<)`A(BVPD$$R+9"083(ML)"!,BW0D*$R+?"0P
+M2(/$.,-F9F:02(/L&$B)7"0(3(ED)!!)B?Q(B=!`#[;608G(2(G!O@````#H
+MZ/[__XG#N50```"Z`@```+X`````3(GGZ,_X__^)V$B+7"0(3(MD)!!(@\08
+MPV9F9I!F9F:09F:09F:02(/L&$B)7"0(3(ED)!!)B?Q(B=!`#[;608G(2(G!
+MO@$```#HB/[__XG#N50```"Z`@```+X!````3(GGZ&_X__^)V$B+7"0(3(MD
+M)!!(@\08PV9F9I!F9F:09F:09F:005=!5D%505154TB#["A(B70D($R+=BA)
+M_\9%#[96`L9$)!\`2,=$)!``````0;@`````2(NWT`@``+F`____10^VR@^V
+MP68/MI0P0`@``&:!^O\`=$I$B<!!_\!$.<AU/X#Y@7<8#[?"2&G`R`\``$@#
+MAF@)``!(B40D$.LB2(M$)"#'0%#_____2(G'_U!(N`````#INP$``&9FD&9F
+MD/_!@/F%=IQ(B[?0"```2('&`!0``+F`____00^V^F:0#[;!9@^VE#!`"```
+M9H'Z_P!T0T2)P$'_P#GX=3F`^8%W&`^WPDAIP,@/``!(`X9H"0``2(E$)!#K
+M'$B+1"0@QT!0_____TB)Q_]02+@`````Z3\!``#_P8#YA7:C00^V5@1%#[9N
+M!4'!Y1!!#[9&!L'@"$$)Q4$/MD8'00G%10^V9@A!P>0000^V1@G!X`A!"<1!
+M#[9&"D$)Q$B#?"00``^$S````$&_`````$B+1"00@'A8``^&MP```$B)PTB#
+MPT@/MM*)5"0,9F9FD&9FD$B)W^@`````2(UH\$B+4PA(B4,(2(D82(E0"$B)
+M`@^V14$\#0^4PCPB#Y3`"="H`71>00^V1@.#^#MT(X/X/'5/QD0D'P%,BT0D
+M($2)Z42)XHMT)`Q(B>_H`````.LQ2(N](`$``$2)ZDF-=@OH`````$R+1"0@
+M1(GI1(GBBW0D#$B)[^@`````QD0D'P%FD$'_QTB+1"001#AX6`^'7O___[@!
+M````@'PD'P!U%TB+1"0@QT!0_____TB)Q_]02+@`````2(/$*%M=05Q!74%>
+M05_#9F9FD&9F9I!F9F:02(/L2$B)7"082(EL)"!,B60D*$R);"0P3(ET)#A,
+MB7PD0$F)_TF)]$R+;BA)_\6+1AS_R(E$)!3'1"00`````$B+5C!(B50D"$&`
+M?0$!=1#'1E``````Z3L"``!F9F:008!]`0)U64&`?0(!9F9FD'4^2(._V`@`
+M``!T!TR+O]@(``!)BX?0"```00^V50.(D.X3``!!#[95`XB0[B<``$''1"10
+M`````.GI`0``9I#'1E#^____Z=L!``!F9F:008!]`01U&4$/MD4#@^@[/`%W
+M#>BX_/__Z=4!``!F9I!!@'T!`W5N08!]`@%F9F:0=55!#[9-`T$/MD<^C30`
+MB<B9]_Z)T3G6?B]!#[95!`^VV8G>3(G_Z`````!!#[95!(G>3(G_Z`````!!
+MQT0D4`````#I7@$``$''1"10_O___^E0`0``0<=$)%#^____Z4(!``!)@[_8
+M"````'0'38N_V`@``$R)ZT&`?0$`#X2N````#[8K2/_##[8#2/_#B<$/MM#V
+MP@%T.T2+="0000'N13MT)"`/A]D```"+3"002`-,)`A!B>B^`````$R)_^A*
+M]___.>@/A;@```!$B70D$.M32&/%3(TT&$R)\$PIZ$B#P`)(8U0D%$@YT`^/
+MD@````^VT4&)Z$B)V;X`````3(G_Z.;Y__^%P'5X3(GS08`^`'4'08!^`0!T
+M%+\0)P``Z`````"`>P$`#X52____#[8KA>UT5[E4````N@(```"^`````$R)
+M_^B@\___08M$)"`K1"00.<4/1^B+3"002`-,)`A!B>BZ`````+X`````3(G_
+MZ)3V__^%P'@&`40D$.L*0<=$)%#_____D+E4````N@(```"^`````$R)_^A)
+M\___28-\)#@`=`M)BT0D.(M4)!")$$R)YT'_5"1(2(M<)!A(BVPD($R+9"0H
+M3(ML)#!,BW0D.$R+?"1`2(/$2,-F9F:09F9FD&9FD$B#[`A(@[_8"````'0'
+M2(N_V`@``("_[A,```!U(L8%``````&Y(````$C'P@````"^#@```.@`````
+M9F:09I!(@\0(PV9F9I!F9F:09F:02(/L"$B#O]@(````=`=(B[_8"```Q@4`
+M`````+D@````2,?"`````+X.````Z`````!(@\0(PV9FD&9FD&9FD$B#[!A(
+MB1PD3(ED)`A,B6PD$$F)_0^VVD0/MN9(B[_0"```B=I$B>;H`````(G:1(GF
+M3(GOZ`````!(BQPD3(MD)`A,BVPD$$B#Q!C#9F:02(M'"&;'@&S^___LF$B+
+M1PAFB;!H_O__PV9F9I!F9I!(@^P(B?&)UK@`````L`6T#T@E__\`_T@-```"
+M`$BZ____`/____]((=!(#0````-(NO____\`____2"'02+H`````!@```$@)
+MT$BZ______\`__]((=!(N@``````!P``2`G02+K_______\`_T@AT$BZ````
+M````"P!("=!(NO________\`2"'02+H`````````#$@)T$B)!"2`^0=W0$"$
+M]G0:#[;!#[8,!+C^____T\!F(8?L$P``ZQAF9I`/ML$/M@P$N`$```#3X&8)
+MA^P3```/M[?L$P``Z`````!(@\0(PV9F9I!F9I!F9I!!5%532(G]2(._V`@`
+M``!T!TB+K]@(``!!O`````!!#[;<N0````"Z!P```(G>2(GOZ-KP__^Y1```
+M`+H"````B=Y(B>_HQO#__[G0````N@````")WDB)[^BR\/__N0````"Z!```
+M`(G>2(GOZ)[P__]!_\1!@_P!=J._H(8!`.B[\/__B(7!$0``#[;(N@,```"^
+M`````$B)[^AP\/__6UU!7,.0D)"0D)"0D)"0D$B+1PA(+0`"`0")]HL$!HD%
+M`````,-F9F:09F:09F:02(M'"$@M``(!`(GVB10&PU-(B?M(BU<(QX*`_O__
+M`````(N"!/___XD%`````(#,`8F"!/___[H$````O@S"``#H`````+JX"P``
+MO@C"``!(B=_H`````+H!``P`O@#"``!(B=_H`````+H$````O@S#``!(B=_H
+M`````+JX"P``O@C#``!(B=_H`````+H!``P`O@##``!(B=_H`````+H`````
+MOE#"``!(B=_H`````+H`````OE##``!(B=_H`````$B+0PAFQX!,_O__``!(
+MBT,(9L>`;/[__^R82(M#"&;'@&C^___LF&;'@^P3``#__UO#9F9FD&9FD&9F
+MD$@YO]`(``!!#Y7`@^8#C31VN`<```")\=/@]]!!B<%$(T]41(E/5(32=`VX
+M!````-/@1`G(B4=4BU=400^V\,'F"('&4,(``$B+O]`(``#H`````//#9F9F
+MD&9FD&9FD$B#[!A(B1PD2(EL)`A,B60D$$B)_4B)\TB-CR@2``!(BY=H"0``
+M3(VB.+@/`&:!?B"%`'<92`^W1B!(#[:$.$`(``!(:<#(#P``3(TD`DB+4TB`
+M>@$"=0](BT($2(D!2(M"#$B)00A(@WMX`'022(MS>$B)[^@`````9F:09F:0
+M2(G>2(GOZ`````!!QD0D7`!(BQPD2(ML)`A,BV0D$$B#Q!C#9F9FD&9F9I!F
+M9F:02(/L.$B)7"0(2(EL)!!,B60D&$R);"0@3(ET)"A,B7PD,$B)_4&)]4&)
+MUD&)STB+1PA,BR!,B>?H`````$B)PTB%P'1\3(GGZ`````!(B<)(A<!T;,9%
+M7`%(C7M8QD,XX<9#.0'&0SH0QD,ENV8/MD5;9HE#($R)8RC'0S20````2(U"
+M$$B)0TA(B5-XQD`!`L9"$$!$B&@"1(AP`T2(>`1(QX.@`````````+X`````
+MZ`````!(B=Y,B>?H`````$B+7"0(2(ML)!!,BV0D&$R+;"0@3(MT)"A,BWPD
+M,$B#Q#C#9F9FD&9F9I!F9F:005=!5D%505154TB#[`A(B?U!B?9!B==!B<U(
+MBT<(3(L@3(GGZ`````!(B<-(A<`/A/````!,B>?H`````$B)PDB%P`^$W```
+M`,9%7`%(C4-82(D$),9#..'&0SD!QD,Z$,9#);MF#[9%6V:)0R!,B6,HQT,T
+MD````$B-0A!(B4-(2(E3>$B)QKD`````NI````"("$C_P$C_RG7VQD8!@L8&
+M0$2(=@)$B'X#1(AN!$&`_0)W(4J-%*T`````@>+\`P``2(U^"$F-M"0H$@``
+MZ`````#K*TF+A"0H$@``2(E&"$$/MM6-%)7X____2&/22(U^$$F-M"0P$@``
+MZ`````!(QX.@`````````+X`````2(L\).@`````2(G>3(GGZ`````!(@\0(
+M6UU!7$%=05Y!7\-F9F:09F9FD&9F9I!!5D%505154TB)^T&)UHGPP.@"08G$
+M0;T#````02'U2(M'"$B+*+D"````N@````"^`````.@`````@'M<`'082(GO
+MZ`````"_`0```.@`````@'M<`'7H2(M#"$B+$$B!PB@2```/MD("A,!X0H/(
+M@(A"`KD!````N@````"^`````$B)W^@`````@'M<`'0?2(GOZ`````"_`0``
+M`.@`````@'M<`'7H9F9FD&9FD$$/MM2Y`0```+X#````2(G?Z`````"`>UP`
+M=!QF9F:02(GOZ`````"_`0```.@`````@'M<`'7H2(M#"$B+,$B!QB@2``!!
+M#[;%N0,````IP4ACR46$]@^5P@^VTL'B`XL$#H/@YPG0B00.00^VU+D!````
+MO@,```!(B=_H`````%M=05Q!74%>PY"0D)"0D$R+AQ@)``!F@7X@A0!W(4@/
+MMT8@2`^VA#A`"```2&G`B`$``$F-/`#K#69FD&9FD$F-N'B&`0!,C8(@!```
+MQH(@!```)V:!?CCA`74K#[9&.O_(/`%W"0^V5COK*V9FD&:!?CCA`740#[9&
+M.H/H$;H/````/`%V$+H`````2(-_6`!T!`^V5WF#X@]!#[9``8/@\`G008A`
+M`;H`````9H%^..$!=0H/MD8Z_\@\`78%N@$```#!X@=!#[9``8/@?PG008A`
+M`0^V009!B$`"#[8!08A``P^V005!B$`'#[9!!T&(0`\/MD$"08A`!`^V00-!
+MB$`%#[9!!$&(0`8/MD$!08A`#`^V00I!B$`(#[9!"T&(0`D/MD$,08A`"@^V
+M00A!B$`+#[9!"4&(0`W#9I!32(GS2(M/2$R+`0^V1CB#^"\/A'T```"#^"]_
+M,X/X&P^$3@$``(/X&W\,@_@29I!T8^E9`0``@_@H9F:09F:0=%.#^"IT3NE$
+M`0``9F9FD#V*````=#X]B@```&9F9I!_%8/X-0^$"0$``#V(````="/I&0$`
+M`#V/````9F9FD'03/>$````/A(P```!F9I#I^P```/9'8`%F9F:09F:0=`J!
+MBY0```````0`]D=B$`^$Z@````^V0S@\*`^4PCPJ#Y3`"="H`746@'LXB'00
+M@'LXB@^%Q@```&9FD&9FD/9!#`%U&@^V<0A,B<?H`````(3`#X2F````9F:0
+M9F:0@'LD@0^$E@```(&+E````````0#IAP```+@`````@'XY`0^%?0````^V
+M3CJ#^1QW/+@!````2-/@J?8_P!UU&ZD(0`8`=0NI```@`'469I#K&X..E```
+M``CK18..E`````'K/(..E````"#K,[@`````ZS'V1V`!=`J!BY0```````0`
+M@XN4`````>L39F:0N`````#V@Y8````@=`=FD+@!````6\-F9I!F9I!F9I!`
+M#[;'PV9F9I!F9F:09F:0B?@/ML3#9F9FD&9FD&9FD,9')`)(BT=00(AP`DB+
+M1U#&0`<`2(M'4(A0#,-F9F:0#[9'/8A&`@^V1SR(1@,/MD<[B$8$#[9'.HA&
+M"L-F9I`/MD=!B$8"#[9'0(A&`P^V1S^(1@0/MD<^B$8*#[9'/8A&"P^V1SR(
+M1@S#9F:09I"Y`````#G1?1QF9F:09F:0B=`IR(/X`@^=P`^VP(U,`0$YT7SK
+M\\-F9I!F9I!F9I!(@^PH2(D<)$B);"0(3(ED)!!,B6PD&$R)="0@2(G[2(G5
+M08GV#[9'.(/X*G0I@_@J?PV#^"AT'^GS````9F:0/8@```!T*3V*````9F9F
+MD'0>Z=D```!$#[9C0$0/MFL_2(GN2(G?Z`````#K%V:01`^V8T5$#[9K1$B)
+M[DB)W^@`````QD4%0/:#E@````%T-42(90!$B&T(0HT$]0````"(10$/MD,X
+M/"@/E,(\B`^4P`G0@^`!@_@!&<#WT(/`88A%!NMI]H.6````!'0P1(AE`42(
+M;0D/MD,X/"@/E,(\B`^4P`G0@^`!@_@!&<"#X!"#P"6(10;K-69FD&:01(AE
+M`0^V0SJ#X`\(104/MD,X/"@/E,(\B`^4P`G0@^`!@_@!&<"#X`*#Z#B(10:0
+M2(L<)$B+;"0(3(MD)!!,BVPD&$R+="0@2(/$*,-F9I!54TB#["A(B?-(BW9(
+M2(GG_+D$````N`````#S2*OVAJ<````$=`Q(BY;(````2/_*ZP6+5GC_RH![
+M."5U8KT(````2(G02,'H&(@$)$B)T$C!Z!"(1"0!2(G02,'H"(A$)`*(5"0#
+M]H;5````$'4/QD0D!@+&1"0'`.FG````2('&Z@```$B-?"0$N@0```#H````
+M`.F,````9F:09F:0O2````!(B=!(P>@XB`0D2(G02,'H,(A$)`%(B=!(P>@H
+MB$0D`DB)T$C!Z""(1"0#2(G02,'H&(A$)`1(B=!(P>@0B$0D!4B)T$C!Z`B(
+M1"0&B%0D!_:&U0```!!U$L9$)`H"QD0D"P#K'&9FD&9FD$B!QNH```!(C7PD
+M"+H$````Z`````!(BWM(2&/52(GFZ`````!(@\0H6UW#9F9FD`^V1SH*1SL*
+M1SP*1ST/ML`/ME=`@^(!"=!T%;HD````O@4```#H`````//#9F9FD,9&!NQ(
+MQX>@`````````,-(@^P@2(D<)$B);"0(3(ED)!!,B6PD&$B)^TB)]0^V1SB#
+M^"]T"CV/````=!7K4Y!$#[9G0$0/MF\_Z`````"0ZP]$#[9G140/MF]$Z```
+M``#&105`]H.6````!'021(AE`42(;0G&109"ZQ9F9F:01(AE`0^V0SJ#X`\(
+M107&109`2(L<)$B+;"0(3(MD)!!,BVPD&$B#Q"##9F:09F:02(GQQD(%0`^V
+M1CB#^#5T$#V1````="'K)V9F9I!F9I!(#[='8(/@`8/X`1G`@^#]@^@6B$(&
+MZQS&0@;JZQ9FD+HD````O@4```!(B<_H`````//#]D$Y`G0$QD$D`//#]D<\
+M\'0/NB0```"^!0```.@`````\\-F9I!F9I!F9I!)B?)!N0````!!N`T```!(
+MB<A$B`A(_\!)_\AU]4$/MD(X@_@U#X2=````@_@U?RR#^"AT<(/X*'\1@_@;
+M9F:0#X22````Z;4"``"#^"IFD'13@_@O=&'II`(``#V/````=%4]CP```'\;
+M/8@```"0=#,]B@```'0L9F9FD&9FD.E[`@``/9$```!F9I!F9I!T-CWA````
+M=&AF9F:09F:0Z5L"```/MO)(B<I,B=?H`````.E.`@``2(G.3(G7Z`````#I
+M/@(``$B)RDR)UN@`````Z2X"``!!]D(\`709QD$&<,9!!`#&00,`QD$"`,9!
+M!4#I#@(``,9!!N#I!0(``+@`````08!Z.0$/A?H!``!!#[9".H/X'`^'U0$`
+M`(G`_R3%`````,9!!P3IU0$``,9!!P#IS`$``,9!!NQFD.G!`0``QD$&[\8!
+M`T$/MD([@\A`B$$!Z:H!``#&00;OQ@$'Z9X!``#&009`QD$!`<9!!4#IC0$`
+M`,9!!N_&`0-!#[9".X/("(A!`>EV`0``QD$&[\8!`NEJ`0``QD$&[\8!@NE>
+M`0``QD$&[\8!!NE2`0``QD$&[\8!ANE&`0``QD$&XT$/MD([B$$!Z34!``#&
+M00:PQ@'8QD$#3\9!!,+I(0$``,9!!K#&`=G&00-/QD$$PND-`0``QD$&L,8!
+MVL9!`T_&003"Z?D```!(#[='8(/@`8/X`1G`@^#]@^@6B$$&Z=X```#&00;O
+MQ@&JZ=(```#&00;OQ@%5Z<8```#&008OQD$!`<9!`A#IM0```,9!!N1!#[9"
+M/(@!00^V0CN(007IG0```$$/MD([B$$&00^V0CR(`4$/MD(]B$$"00^V0CZ(
+M00-!#[9"/XA!!$$/MD)!B$$*00^V0D"(00'K9,9!!NA!#[9"/(@!00^V0CN(
+M005!#[9"/8A!`D$/MD(^B$$#00^V0C^(001!#[9"0(A!`>LO0?9"/`%T*,9!
+M!G#&000`QD$#`,9!`@#&005`ZQ*X`````,-F9I!F9I"X`````,.X`0```//#
+MD)"005154XGU3(MG"$F![``"`0"[`````#GS<S9F9I!F9I!!BX0D`,@``(D%
+M`````*@!=0ZX`````.L<9F9FD&9FD+\*````Z`````#_PSGK<M"X_____UM=
+M05S#9F:09F:02(M_"$B![P`"`0`/MM+!X@A%#[;`0<'@!$0)PHG0@\@$A,D/
+M1=!!@_G_=!%$B<@E__\#`(F'!,@``(/*`HD6PTB+1PB#S@&)L`#&___#9I!(
+M@^PH2(E<)!!(B6PD&$R)9"0@2(G[28GT2(MO"$B+A_@3```/ME`"0;G_____
+M0;@!````N0$```!(C70D#.AM____BW0D#$B)W^BA____OA`G``!(B=_H]/[_
+M_[K_____A<!U&8N%#,;__XD%`````(E$)`Q!B`0DN@````")T$B+7"002(ML
+M)!A,BV0D($B#Q"C#9F9FD&9F9I!F9F:0059!54%455-(@^P028G\B<U!B?9!
+MB=6[`````#G+<S1(C70D#TR)Y^@S____A<!U$T2)\")$)`]$..AU![@`````
+MZQ6_"@```.@`````_\,YZW+,N/____](@\006UU!7$%=05[#9F9FD&9FD&9F
+MD%-(@^P02(G[2(N'^!,```^V$$&Y_____T&X`````+D`````2(UT)`SH<_[_
+M_XMT)`Q(B=_HI_[__[X0)P``2(G?Z/K]__^Z_____X7`=1ZYX),$`+H"````
+MO@,```!(B=_H*O___X/X`1G2]]*)T$B#Q!!;PV9F9I!F9F:09F:055-(@^P(
+M2(G[2(G52(N'^!,```^V4`M!B?%!N`$```"Y`0```$B-="0$Z/']__^+="0$
+M2(G?Z"7^__^^$"<``$B)W^AX_?__NO____^%P'482(M#"(N`#,;__XD%````
+M`(A%`+H`````B=!(@\0(6UW#9F9FD&9F9I!F9I!F9I!54TB#[`A(B?N)]<9$
+M)`?_2(U4)`?H`````+K_____A<!U?KH`````@'PD!P!T<DB)W^C)_O__B<*#
+M^/]T8TB+@_@3```/ME`*08GI0;@`````N0````!(B>9(B=_H/OW__XLT)$B)
+MW^AS_?__OA`G``!(B=_HQOS__[K_____A<!U'KG@DP0`N@````"^`P```$B)
+MW^CV_?__@_@!&=+WTHG02(/$"%M=PV9FD&9FD%532(/L"$B)^XGUZ$#^__^)
+MPH/X_W1F2(N#^!,```^V4`9!B>E!N`````"Y`````$B-="0$2(G?Z+/\__^+
+M="0$2(G?Z.?\__^^$"<``$B)W^@Z_/__NO____^%P'4>N>"3!`"Z`````+X#
+M````2(G?Z&K]__^#^`$9TO?2B=!(@\0(6UW#9F9FD&9FD&9FD$B#["A(B5PD
+M"$B);"003(ED)!A,B6PD($B)_4&)]4&)U$B+7PCHEOW__T2)HPC&__](BX7X
+M$P``#[90!46)Z4&X!````+D`````2(UT)`1(B>_H"?S__XMT)`1(B>_H/?S_
+M_[X0)P``2(GOZ)#[__^Z_____X7`=1ZYB!,``+H`````O@$```!(B>_HP/S_
+M_X/X`1G2]]*)T$B+7"0(2(ML)!!,BV0D&$R+;"0@2(/$*,-F9F:09F9FD&9F
+MD&9FD$B#["A(B1PD2(EL)`A,B60D$$R);"083(ET)"!)B?Y!B?5)B=2)S;L`
+M````.<MS'XG80HL4($&-=!T`3(GWZ/W^__^#^/]T#(/#!#GK<N&X`````$B+
+M'"1(BVPD"$R+9"003(ML)!A,BW0D($B#Q"C#9F9FD&9F9I!F9F:09F:02(/L
+M*$B)7"002(EL)!A,B60D($B)^TF)U$B+;PA(@>T``@$`@/D%N`0````/0\A(
+MBX?X$P``#[90!$&)\40/ML&Y`0```$B-="0,Z-#Z__^+="0,2(G?Z`3[__^^
+M$"<``$B)W^A7^O__NO____^%P'49BX4,R```B04`````B40D#$&)!"2Z````
+M`(G02(M<)!!(BVPD&$R+9"0@2(/$*,-F9F:09F9FD&9F9I!F9I!(@^PX2(E<
+M)`A(B6PD$$R)9"083(EL)"!,B70D*$R)?"0P28G^08GT2(G518T\#(GS@^/\
+M08GU08/E`W1)N00```!(C50D!(G>Z`+___^-0P2Y!````$0Y^'8)1(GY1"GA
+M1`'I1(GJ03G-<Q=(C70D!(G0#[8$!HA%`$C_Q?_".<IR[H/#!$6)_4&#Y?Q$
+M.>MS)[D$````2(U4)`2)WDR)]^BJ_O__BT0D!(E%`$B#Q02#PP1$.>MRV40Y
+M^W,YN00```!(C50D!(G>3(GWZ'[^__]$B?DIV;H`````.<IS%TB-="0$B=`/
+MM@0&B$4`2/_%_\(YRG+NN`````!(BUPD"$B+;"003(MD)!A,BVPD($R+="0H
+M3(M\)#!(@\0XPY!54TB#[`A(B?O'1"0$`````$B+;PC&A_`3````#[85````
+M`$&Y`````$&X`@```+D!````2(UT)`3H$OG__XMT)`1(B=_H1OG__[X0)P``
+M2(G?Z)GX__^%P'4[BX4,QO__B04`````B40D!#V_0P``=23'@^`3``"_0P``
+MQX/D$P`````@`,>#Z!,````0``!FN```ZP6X_____TB#Q`A;7<-F9F:09F9F
+MD&9FD&9FD%532(/L"$B)^\=$)`0`````2(MO",:'\!,````/MA4`````0;D`
+M````0;@"````N0$```!(C70D!.AB^/__BW0D!$B)W^B6^/__OA`G``!(B=_H
+MZ??__X7`=3N+A0S&__^)!0````")1"0$/1]C``!U),>#X!,``!]C``#'@^03
+M``````0`QX/H$P`````!`&:X``#K!;C_____2(/$"%M=PV9F9I!F9F:09F:0
+M9F:055-(@^P(2(G[QT0D!`````!(BV\(QH?P$P```0^V%0````!!N?____]!
+MN`(```"Y`0```$B-="0$Z++W__^+="0$2(G?Z.;W__^^$"<``$B)W^@Y]___
+MA<!U:HN%#,;__XD%`````(E$)`0]'T,``'0N/1]$``!U3,>#X!,``!]$``#'
+M@^03``````0`QX/H$P`````!`&:X``#K+69FD,>#X!,``!]#``#'@^03````
+M``0`QX/H$P`````!`+@`````ZP6X_____TB#Q`A;7<-F9F:09F9FD&9F9I!F
+M9I!54TB#[`A(B?O'1"0$`````$B+;PC&A_`3````#[85`````$&Y`````$&X
+M`@```+D!````2(UT)`3HTO;__XMT)`1(B=_H!O?__[X0)P``2(G?Z%GV__^%
+MP'5UBX4,QO__B04`````B40D!#WO$0``=`X][Q(``'0LZU5F9I!FD,>#X!,`
+M`.\1``#'@^03``````0`QX/H$P`````!`+@`````ZS#'@^`3``#O$@``QX/D
+M$P`````$`,>#Z!,``````0"X`````.L+9F:09F:0N/____](@\0(6UW#9F9F
+MD%-(B?OHA_W__X7`=1-(QX/X$P```````+H`````ZV&02(G?Z!C^__^%P'42
+M2,>#^!,```````"Z`````.M"2(G?Z)K\__^%P'422,>#^!,```````"Z````
+M`.LD2(G?Z+S^__^Z_____X7`=1-(QX/X$P```````+H`````9F:0B=!;PV9F
+M9I!F9F:09F9FD$B#["A(B5PD"$B);"003(ED)!A,B6PD($B)^XGU08G-28G4
+MN@````!(@[_X$P````^$N@```$6$P'0M@_[_=1$/MX?@$P``9D&)!"3IE@``
+M`$R)XNC7^O__N@````"%P`^%B@```.M_@_[_9F:09I!U$T&`/"0/#Y2'\1,`
+M`+H!````ZVNZ`````("_\1,```!T78GPN@````#WM^@3``"%TG4J@+_P$P``
+M`'0.Z`````"Z`````(7`=36)[DB)W^CK]___N@````"%P'4B1(GI3(GBB>Y(
+MB=_H(OG__[H`````A<!U";H!````9F9FD(G02(M<)`A(BVPD$$R+9"083(ML
+M)"!(@\0HPY"0D)"005154TB#[#!(B?VX`````+!MM/]()?__`/](#0``(P!(
+MNO___P#_____2"'02`T````42+K_____`/___T@AT$BZ`````#H```!("=!(
+MNO______`/__2"'02+H``````.\``$@)T$BZ________`/]((=!(N@``````
+M`!8`2`G02+K_________`$@AT$BZ`````````))("=!(B40D"+D`````NB``
+M``!(C40D$)"("$C_P$C_RG7VQD0D%`%!O`````!(C5PD$+D@````2(G:O@X`
+M``!(B>_H`````(7`=5N_@!H&`.@`````N2````!(B=J^#P```$B)[^@`````
+M@_@@=3=(C70D($B-?"0(N0@```#\\Z8/E\(/DL`XPG4;0;P!````#[9$)![!
+MX`@/ME0D'PG0B87L"```00^VQ$B#Q#!;74%<PV9FD&:0N0,1`">Z`````$B#
+M?Q``=#1(BT<0BP")!0````")QDB+1Q")"$B+1Q"+`(D%`````+H`````.<AU
+M"TB+1Q"),+H!````B=##9F9FD&9F9I!!5T%6055!5%532(/L"$B)^TB+!XN`
+M8`#__XD%`````(/@`X/X`70:@_@!<@>#^`)T;^MWQX?H"````0```&:0ZVGH
+M`````(3`="6+!0````!(8]!(B1S5`````/_`B04`````QX/H"````@```.L[
+M2(G?Z`````"$P'0OBP4`````2&/02(D<U0````#_P(D%`````,>#Z`@```0`
+M``#K"L>'Z`@```,```"+!0````!(8]!(B1S5`````/_`B04`````@#T`````
+M``^%J````$&]`````(7`#XZ@`@``2(,]``````!T-T2)Z`^VT$C'Q@````!(
+MBPT`````2#L,UG0=2(L$UDB)B-@(``!(BQ362(L%`````$B)@M@<``!(@ST`
+M`````'0W1(GH#[;02,?&`````$B+#0````!(.PS6=!U(BP362(F(X`@``$B+
+M%-9(BP4`````2(F"X!P``$'_Q4$/ML4[!0`````/C&O____I!@(``$&]````
+M`$R+%0````!-A=(/A.X```!!OP````!)Q\8`````0;@`````1#L]``````^-
+MN````$G'Q`````!$B<`/MM!)BP342(.XV`@````/A88```!,.=`/A'T```"[
+M``````^V#0````"$R71M1(G"1`^VRDC'Q0````!)Q\,`````9F9FD$J+=,T`
+M.$XY<C</ME8Y#[;!B<<#/0`````Y^G,D03A*.7(>00^V0CDY^',53(F6V`@`
+M`$J+1,T`3(F0V!P``.L3_\,/ML-(P>`%0@^V3!@-A,EUK$'_P$$/ML`[!0``
+M```/C$____]!_\5$B>H/ML)-BQ3&3872#X4?____0;T`````3(L5`````$V%
+MT@^$[````$&_`````$G'Q@````!!N`````!$.ST`````#XVV````2<?$````
+M`&9FD&9FD$2)P`^VT$F+!-1(@[C@"`````^%?@```$PYT'1YNP`````/M@T`
+M````A,ET:42)PD0/MLI(Q\4`````2<?#`````$J+=,T`.$XY<C</ME8Y#[;!
+MB<<#/0`````Y^G,D03A*.7(>00^V0CDY^',53(F6X`@``$J+1,T`3(F0X!P`
+M`.L3_\,/ML-(P>`%0@^V3!@-A,EUK$'_P$$/ML`[!0`````/C%?___]!_\5$
+MB>H/ML)-BQ3&3872#X4A____2(/$"%M=05Q!74%>05_#9I!3NP````"X`0``
+M`(`]``````!T:>L*N`$```#K8&9FD`^VPTC!X`7_PP^VB`````"$R71$1(L-
+M`````$G'P@`````X3SER'@^V5SD/ML%&C00(1#G"<PXX3CER"0^V1CE$.<!R
+ML0^VPTC!X`7_PT(/MDP0#83)=<JX`````%O#D(N'Z`@``+H!````.X;H"```
+M=PZ+A^@(```[AN@(```9THG0PV9F9I!F9F:09F9FD+@`````.ST`````?3=(
+M8\=(Q\$`````2(T$0$C!X`,/MQ0(9HD6#[=4"`)FB58"#[94"`B(5@@/MD0(
+M"8A&";@!````\\-F9F:09F:09F:0059!54%455-(@^P(B7PD!+T`````2<?&
+M`````$G'Q0````!(8\5(B<)(P>`%9D*#/#``#X2Q````0;H`````38GH0H!\
+M*`P`#X21````2,?#`````/Q!O`````!)B=.028G126/"2(T$T$B--(-(C7PD
+M!+D$````\Z8/E\(/DL`XPG4\3(G&3(G)2,'A!4(/MD0!#?_`0HA$`0U"@'P!
+M#`!T'4(Z1`$,=A9F#[;`9D(/MGP!#$2)XF;W]XA4,0V00?_"3(G:2<?`````
+M`$R)V$C!X`5"#[9$``Q$.=!_@?_%@_T##XXY____2(/$"%M=05Q!74%>PV9F
+MD&9FD&9FD$%7059!54%455-(@^P8QD0D%P#&1"06``^V1"07B40D#$&_````
+M``^V7"06B5PD$$$/MM>Y`````(MT)!"+?"0,Z`````!!B<9!N0````!$.PT`
+M````#XV*`0``2,?%`````$0/MF0D%T2)9"0(9I!)8\%(C01`2,'@`P^W5"@"
+MP>(0#[<$*`G"1#GR#X5$`0``NP````!)Q\(`````26/!2(T$0$B-/,4`````
+M2<?#`````(M$)`B)1"0$2;T```````````^VTTB)T4C!X05F0H,\$0!U:$B+
+MAP````!*B001BX<`````0HE$$0A(#[:!`````$C!X@-(C00"#[9<)!=!B%R"
+M#4@/MH$`````2(T$`@^V7"0608A<@@Y(#[:!`````$@!PD6(?)(/_H$`````
+MZ9(```!F9F:09F:0#[;S2<?``````$B)\4C!X05"#[9$`0RZ`````$+W=!\$
+MA=)T6TH/MD0!#$B-%/4`````2(TT`D$/MD2U#42+9"0$02G$08/\`7\U#[9$
+M)!=!B$2R#4H/MD0!#$B-!`(/MEPD%D&(7((.2@^V1`$,2(T$`D6(?((/0OY$
+M`0SK#)#_PX#[`P^&^_[__TECP4B-!$#_1,4,0?_!1#L-``````^,BO[__T'^
+MQP^$0?[___Y$)!:`?"06'P^&(_[___Y$)!>`?"07_P^%!O[__TB#Q!A;74%<
+M05U!7D%?PV9F9I!!5T%6055!5%532(/L"$B)\TF)U$&]`````(,]``````!U
+M#\<%``````$```#HKOW__TB%VW0#Q@,`0;H`````1#L5`````'T[2,?!````
+M`$C'Q@````!)8\)(C01`2(T4Q0````!$`VP*#$B%VW0(#[8#`@0RB`-!_\)$
+M.Q4`````?---A>0/A*L```!!N@````!)8\)(B<)(P>`%9H.X```````/A(T`
+M``!!N`````"`N```````='%(Q\4`````_$G'QP````!)B=9)P>8%28G328G1
+M26/`2(T$T$B-=(4`3(GGN00```#SI@^7P@^2P#C"=1Q(A=MT#TR)R$C!X`5"
+M#[9$.`V(`T</MFP^#.L90?_`3(G:3(G82,'@!0^V@`````!$.<!_J$'_PD&#
+M^@,/CEO___]!#[;%2(/$"%M=05Q!74%>05_#9F:09I"X`"@``,-F9F:09F:0
+M9F:0N-````##9F9FD&9FD&9FD+@(````PV9F9I!F9I!F9I!!5D%505154TF)
+M_$&)]4B)TTF)SDB-J@`4``"Y`````+H`*```2(G8B`A(_\!(_\IU]DR)<R"+
+M%0````"-0@&)!0````"(4T!$B6LXQD-!`$$/MP0D9HE#,$$/MT0D`F:)0S)!
+MBT0D!(E#-$R)=2"(54!$B6TXQD5!`4$/MP0D9HE%,$$/MT0D`F:)13)!BT0D
+M!(E%-`^W0S(](B<``']K/2`G```/C?4````]0"$```^$Z@```#U`(0``9F:0
+M9I!_&ST@(0``#X33````/2(A```/A,@```#IUP```#U$(0``#X2X````/40A
+M``!F9I`/C+X````M$"<``(/X`6:0#X>N````Z94````]8"<```^$B@```#U@
+M)P``9F:09I!_,#U`)P``='<]0"<``&:0?Q`],"<``'1G9F9FD&9FD.MR/40G
+M``!T5V9F9I!F9I#K8CV")P``=$<]@B<``&:0?Q`]@"<``'0W9F9FD&9FD.M"
+M/8"1``!T"SV`E```9I!T'NLP9L=#/("1QD,^!&;'13R`D<9%/@3K&F9FD&9F
+MD&;'0SR`E,9#/@1FQT4\@)3&13X$00^V1"0(B$-"00^V1"0(B$5"N0``!`"Z
+M`````+X"````3(GWZ`````!(B0.Y`"```+H`````O@````!,B??H`````$B)
+M0Q!(@SL`=`5(A<!U"K@`````Z?$```!(BP-(C8@``@$`2(E+"$B-D````@!(
+MB1-(!0!``@!(B44`2(E-"$B+0Q!(B4400;@`````1#L%`````'U62,?'````
+M`$2+#0````!)8\!(C01`2(T,Q0````!!BP0D.00Y=2A(Q\8`````BP0Q_\")
+M!#&#?#D,`'02.T0Y#'8,N@````#W=#D,B10Q0?_`13G(?+A(BT,(QX`@@O__
+M`?`#`$B+0PC'@"B"__\!``#H2(M[(+YX````Z`````")PB4`<```/0`@``!V
+M$0^V\DB+>R"Z>````.@`````1(GOZ&SX__](B=_HU//__[@!````6UU!7$%=
+M05[#9F:09F:04TB)^^@`````2('#`!0``$B)W^@`````N`$```!;PY!(@^P8
+M2(E<)`A(B6PD$$B)_4B+G]`(``!(@<,`%```Z`````"`?5$!=0:`>U$!=#M(
+MC9UP`0``2(M]*$B)WN@`````QX5P`0``Z`,``$C'A8`!````````2(FMB`$`
+M`$B+?2A(B=[H`````$B+7"0(2(ML)!!(@\08PV9FD&9FD%532(/L"$B)^TB-
+MKP`4``#H`````$B)0RA(B44H2(F;T`@``$B)G=`(``"+@^@(``")A>@(``!(
+MB=_H`````$B)[^@`````2(G?Z`````"Z`````(3`='Y(B>_H`````+H`````
+MA,!T;4B)W^@`````O]`'``#H`````$B)W^@`````2(G?Z`````#'@W`!``#H
+M`P``2,>#@`$```````!(B9N(`0``2(VS<`$``$B+>RCH`````+X`````2(G?
+MZ`````"^`````$B)[^@`````N@$```")T$B#Q`A;7<.005154TB#[#!(B?NX
+M`````+!MM/]()?__`/](#0``(P!(NO___P#_____2"'02`T````42+K_____
+M`/___T@AT$BZ`````#H```!("=!(NO______`/__2"'02+H``````.\``$@)
+MT$BZ________`/]((=!(N@```````!8`2`G02+K_________`$@AT$BZ````
+M`````))("=!(B40D"$B#O]@(````=`=(BY_8"```N0````"Z(````$B-1"00
+MB`A(_\!(_\IU]L9$)!0!0;P`````2(UL)!"Y(````$B)ZKX.````2(G?Z```
+M``"%P'5'OX`:!@#H`````+D@````2(GJO@\```!(B=_H`````(/X('4C2(UT
+M)"!(C7PD"+D(````_/.F#Y?`#Y+".-"X`0```$0/1.!%A.1U$4C'QP````"X
+M`````.@`````00^VQ$B#Q#!;74%<PV9FD//#9F9FD&9F9I!F9I!F9I!54TB#
+M[`A(B?U(B?.Y`````+J`````2(GP9F9FD&9FD(@(2/_`2/_*=?:#O>@(```!
+M#Y1#$XM%.(D#@$L1$`^W13!FB4,$#[=%,F:)0P:+A>@(``"(0W#&0Q(@#[=%
+M,F8]("$/E,)F/2(A#Y3`"="H`71$QD,7`L=#/%)O8VO'0T!E=%)!QT-$240@
+M4\=#2%-$(#+'0TPQ,G@@QT-00V]N=,=#5')O;&QFQT-897+&0UH`Z>(````/
+MMU4RC8+PV/__9H/X`0^6P6:!^D`A#Y3`"<BH`74+9H'Z1"$/A:0```#&0Q<$
+M#[=%,F8M$"=F@_@!=SW'0SQ2;V-KQT-`97120<=#1$E$(#+'0T@W,7@@QT-,
+M4T%3(,=#4$-O;G3'0U1R;VQL9L=#6&5RQD-:`.MI#[=%,F8]0"$/E,)F/40A
+M#Y3`"="H`711QT,\4F]C:\=#0&5T4D''0T1)1"!3QT-(4T0@,L=#3#$T>"#'
+M0U!#;VYTQT-4<F]L;&;'0UAE<L9#6@#K%,9#%PA(C7L\2,?&`````.@`````
+M#[9#%_9C$HA#$(3`=03&0Q"`QT,82&EG:,=#'%!O:6['0R!T(%1EQT,D8VAN
+M;\=#*&QO9VG'0RQE<RP@QT,P26YC+L9#-`!(@[W@"````'012(N%X`@``$B+
+M0!!(B4-HZPA(BT402(E#:,=#8``@``!(@\0(6UW#9F9FD&9F9I!F9F:09F:0
+MQH?+`````,-F9F:09F9FD$B#[%A(B5PD0$B);"1(3(ED)%!(B?U,BV=X28N$
+M)-`(``"`>#\`#X6K````2(N?@````$B+?V!$#[:/!P$``$0/MD4`#[9-`@^V
+M50&+=0@/MH?3````B40D.`^VA](```")1"0P#[:'T0```(E$)"@/MH?0````
+MB40D(`^VA\\```")1"08#[:'S@```(E$)!`/MH?-````B40D"`^VA\P```")
+M!"1!@^`!2,?'`````+@`````Z`````!(QX6``````````(M5"$B+O9````!(
+MB>[_T^L]2(V?F````$F+?"0H2(G>Z`````#'A9@```#T`0``2,>%J```````
+M``!(B:VP````28M\)"A(B=[H`````$B+7"1`2(ML)$A,BV0D4$B#Q%C#9F9F
+MD&9F9I!!5T%6055!5%532(/L"$F)_4F)]`^WTDAITH@!``!(B=5(`Z\8"0``
+M2(N_T`@``$B!QP`4``!(B6Y@2(EU.$B#?5``=0M(@WU8``^$HP,``+X`````
+M08`,)`%(BT5828E$)'!(BT5028E$)&BZ`````$&`?4,`=B5(BTU(9F9FD`^V
+MPDAKP&A*.XPH2!(```^$A`(``/_"03A50W?CNH#___])BXW0"```#[;"#[:$
+M"$`(```\_W0D2(-]4`!T&P^VP$AIP,@/``!(`X%H"0``2#M%4`^$-0(``/_&
+M_\*`^H%VQKJ"____28N-T`@``)`/ML(/MH0(0`@``#S_=!T/ML!(:<#0````
+M2`.!0`D``$@[15@/A.L!``#_QO_"@/J%=LVZ@/___P^VP@^VA#A`"```//]T
+M)$B#?5``=!L/ML!(:<#(#P``2`.':`D``$@[15`/A)\!``#_QO_"@/J!=L:Z
+M@O___P^VP@^VA#A`"```//]T'0^VP$AIP-````!(`X=`"0``2#M%6`^$70$`
+M`/_&_\*`^H5VS4&`?5$!=3](@WU0`'02#[9U>4B+?5"Z`````.@`````2(.]
+M&`$````/A`D"```/MK4%`0``2(N]&`$``+H`````Z`````!(@[T8`0````^$
+MXP$``$R+?5!!O@````!!@']8`'9*28U?2$B)W^@`````2(U(\$B+4PA(B4,(
+M2(D82(E0"$B)`H"Y!P$``/]U%H!Y00!U$$B#N1@!````=0]F9I!F9I!!_\9%
+M.'=8=[I%.'=8#X7;````#[:%!P$``$&(1"0"0;X`````08!_6``/AL`!``!)
+MC5](2(G?Z`````!(C4CP2(M3"$B)0PA(B1A(B5`(2(D"2(-Y.`!T1TB+43@/
+MMD(".H$'`0``=#=(@[J``````'4M2(.ZB`````!U(P^V@0<!``"(0@)(#[=1
+M,$F+M=`(``"_!P```.@`````9F:00?_&13AW6'>+Z4(!``!!B'0D`>FB_O__
+M08AT)`%F9I#IE?[__T&(="0!Z8O^__]!B'0D`>F!_O__00^V14&-!()!B(0D
+MS````.EO_?__#[9%>4&(1"0"QH4'`0``_T&^`````$&`?U@`#X;A````28U?
+M2$B)W^@`````2(U(\$B+4PA(B4,(2(D82(E0"$B)`H"Y!P$``/]T3,:!!P$`
+M`/](@WDX`'0^2(M1.`^V0@(Z07ET,4B#NH``````=2=(@[J(`````'4=#[9!
+M>8A"`D@/MU$P28NUT`@``+\'````Z`````!!_\9%.'=8=X3K7P^V17E!B$0D
+M`NM400^V14&-!()!B$0D`4&(A"3,````ZRFZ`````$&`?4,`=AU(BTU(#[;"
+M2&O`:$H[C"A($@``=,C_PD$X54-WYT$X54-U!D'&1"0!_T'&1"0"`&:02(N%
+MD````$F)1"0@2(N%F````$F)1"0H2(N%H````$F)1"0P2(N%J````$F)1"0X
+M2(N%L````$F)1"1`2(M%?$F)1"0,2(N%A````$F)1"04BX6,````08E$)!Q(
+MBX6X````28E$)$@/MT5@9D&)1"18#[=%8F9!B40D6DB+17!)B40D4`^V17I!
+MB$0D7/9%1`1U(T&`O>\3````=!%!_HWO$P``08"][Q,```!U"$R)[^@`````
+M2(M%.`^V<`&Z`````$R)[^@`````2`^V14"H`G0/J`1T"Z@!=0=!@`PD`NL%
+M08`D)/T/ME5$T.J#X@1!#[8$)(/@^PG008@$)$R)Y^B8^?__2(/$"%M=05Q!
+M74%>05_#9F:09F:09F:005=!5D%505154TB#[`A)B?V)]4F)U+X`````NM``
+M``!,B>!`B#!(_\!(_\IU]4&);"0(@_T_?@I)@<4`%```@^U`2&/%N@````!)
+M@[S%0`0````/A8,"``!(8\5-B:3%0`0``$V);"1X28F,)(````!-B80DD```
+M`+H!````08!]40$/A5,"``!FQT0D!O\`@?V%````?P]F0@^VA"A`"```9HE$
+M)`9F@7PD!O\`#X3^`0``2`^W1"0&28N-&`D``$AIT(@!``#V1`I#!`^$WP$`
+M`(M$"D`E`/__`#T``/\`#X7+`0``2(T<"O9#1`0/A$P!``#&@^``````2`^V
+M0T"H`G0RJ`1T+J@!="K&0T(%QD-#!`^V4WE(BW-02(M[2$B)V>@`````Z7T!
+M``#&@^$````!ZW)(#[9#0*@"9I`/A8````"H!'1\J`%T>$R+8TC&0T(#QD-#
+M!$&^`````$&`?"0.`'1!28UL)&!(B>_H`````$B+50A(B44(2(DH2(E0"$B)
+M`H!X0O\/E<)(.=@/E<`/MM*%T'630?_&00^V1"0.1#GP?\2`N^$````!#X3U
+M````2(G>3(GOZ`````#IY0```$@/MD-`J`(/A-@```"H!`^$T````*@!9F:0
+M#X7%````2(M#2`^V0`V]`````$&`?3X`=BE$#[;@0`^VS4R)X$C3^*@!=`^Z
+M`````(G.3(GOZ`````#_Q4$X;3YWV\9#0P;&0T(%9L>#P```````2(G>3(GO
+MZ`````#K:DR+>TC&1"0%`$&`?PX`=DI-C7=@3(GWZ`````!(B<-)BT8(28E>
+M"$R),TB)0PA(B1B`>T+_=!0/MD-!/"(/E,(\#0^4P`G0J`%U//Y$)`4/MD0D
+M!4$X1PYWN@^W5"0&3(GF3(GOZ`````"Z`0```.LJ2&/%2<>$Q4`$````````
+MN@````#K%$ACQ4G'A,5`!````````+H`````B=!(@\0(6UU!7$%=05Y!7\-F
+M9I!(@^PH2(D<)$B);"0(3(ED)!!,B6PD&$R)="0@2(G[28GU28G42(MO8$B%
+M[74*2(G7_];I"`$``$B#OX@`````=0I(@[^``````'0+3(GG0?_5Z>D```"`
+MO>``````9I`/A<X```!(BWU(2`^V1PRH$`^%O0```*@(#X6U````3(LW@'U[
+M`'0-2(GJO@8```#H`````$R)JX@```!,B:.0````2`^V14"H`G0FJ`1T(J@!
+M=![&14(%QD5#!`^V57E(BW502(M]2$B)Z>@`````ZVY(#[9%0*@"=26H!&9F
+MD'0>J`%T&L9%0@/&14,$2(GN3(GWZ`````#K169FD&:02`^V14"H`G0WJ`1F
+M9I!FD'0NJ`%U*L9%0@7&14,&9L>%P```````2(GN3(GWZ`````#K#$R)YT'_
+MU69FD&9FD$B+'"1(BVPD"$R+9"003(ML)!A,BW0D($B#Q"C#9F:02(/L&$B)
+M'"1(B6PD"$R)9"002(GS2(M'2$R+($B+;F@/MD8D@_@@=$^#^"!_$H7`="*#
+M^`9_.NLO9F9FD&9FD(/X(G0S@_@B?!Z#P("#^`%W'^L42(M'.,=`!`````#&
+MA:H````!ZQ#&A:H````-ZP>X`````.LQ2(-[>`!T$4B-<WA,B>?H`````&9F
+MD&:02(G>3(GGZ`````!(B>__E<````"X`0```$B+'"1(BVPD"$R+9"002(/$
+M&,-F9F:02(/L.$B)7"0(2(EL)!!,B60D&$R);"0@3(ET)"A,B7PD,$B)^TB)
+M]4R+;WA(BT9(2(DX2(-_8`!U%L:&J@````)(B??_EL````#I!P8``)!(BT=@
+M]D!$`G05QH:J`````DB)]_^6P````.GG!0``3(GOZ`````!)B<1(A<!U%<:%
+MJ@````)(B>__E<````#IP@4``,>`E`````````!(B6AH2(M#8$F)1"0H2(M#
+M8`^W0#!F08E$)"!!QD0D)(`/MH6H````@_@"#X2D`0``@_@"?PF%P'0CZ8,#
+M``"#^`,/A#0"``"#^`1F9F:09F:0#X3T`0``Z64#``!(BT-@]D!@`0^$Q```
+M`/:%J0````)T"$'&1"0XB.L9#[:%J0```(/@!#P!&<"#X`6#Z'9!B$0D.$B+
+ME9`````/MXV8````0<9$)#D`2(G02,'H.$&(1"0Z2(G02,'H,$&(1"0[2(G0
+M2,'H*$&(1"0\2(G02,'H($&(1"0]2(G02,'H&$&(1"0^2(G02,'H$$&(1"0_
+M2(G02,'H"$&(1"1`08A4)$%!QD0D0@!!QD0D0P")R&;!Z`A!B$0D1$&(3"1%
+M0<9$)$8`0<9$)$<`Z8,```#VA:D````"=`A!QD0D."CK&0^VA:D```"#X`0\
+M`1G`@^`%@\`J08A$)#A(BY60````#[>-F````$'&1"0Y`$B)T$C!Z!A!B$0D
+M.DB)T$C!Z!!!B$0D.TB)T$C!Z`A!B$0D/$&(5"0]0<9$)#X`B<AFP>@(08A$
+M)#]!B$PD0$'&1"1!`$B+0V!(!>0```!)B40D4$'&1"0P($&#C"24`````NGY
+M`0``@+V0````$'<%]@,"=0S&A:H````&Z;4#``!(#[:5D````$B+M9@```!)
+MC7PD..@`````2(M#8$@%Y````$F)1"100<9$)#`@08&,))0``````!``0<9$
+M)"6K]H6I````!@^$D@$``(N%E````$&)1"0TZ8(!```/MH6I````@^`P/"!U
+M%T'&1"0X&T'&1"0Y`4'&1"0\`.E=`0``0<9$)#@UZ5(!``!(BT-@2`^V0$"H
+M`70$J`1U#,:%J@````;I"P,``$&!C"24```````@``^WA9P```!F.X62````
+M=$L/MH6;````@_A"=#^#^$)_#H/X0'0U9F9FD&9FD.L@/;````!T"3WL````
+M9I!U$`^WA9P```!FB862````ZPS&A:H````&Z:0"``!!QD0D.+`/MX60````
+M08A$)#D/MX62````08A$)#H/MX64````08A$)#L/MX66````08A$)#P/MX68
+M````08A$)#T/MH6:````08A$)#X/MH6;````08A$)#]F#[:%D0```$&(1"1`
+M9@^VA9,```!!B$0D068/MH65````08A$)$)F#[:%EP```$&(1"1#9@^VA9D`
+M``!!B$0D1/:%J0````9T*@^WA9P```#!X`E!B40D-$&#C"24````!.L09F9F
+MD,:%J@````;IU@$``$V-="182<>$)*``````````#[:%J0```*@&#X2@`0``
+MNP````"H`G0+08.,))0````(ZPE!@XPDE````!!(@[VP`````'02]H6I````
+M`70)2(N=L````.LJ2(.]N`````!T($F+M2`*``"Z`````$B)[_^5N````(7`
+M=`=)BYT@"@``2(7;=#5,B>?H`````+X`````3(GWZ`````!(BW,(BQ-,B??H
+M`````$B-0P1(@\,0@S@`=.7I#`$``$R)[^@`````2(D$)$B%P'4,QH6J````
+M!NG\````2(L4)$B+0A!)B40D2$F)5"1XN0````"Z``(``(@(2/_`2/_*=?;V
+MA:D````$#X2/````0?:$))8````@=!A)BWPD2$&+5"0T2(NUH````.@`````
+MZVQ!]H0DE@```!!T84V+?"1(2(.]L`````!T$O:%J0````%U"4B+G;````#K
+M($F+M2`*``"Z`0```$B)[_^5N````(7`=`=)BYT@"@``2(MS"(L33(G_Z```
+M``"+`TD!QTB-0P1(@\,0@S@`=."^`````$R)]^@`````08M4)#1(BP0D2(MP
+M&$R)]^@`````ZPE!@XPDE`````%,B>9,B>_H`````.L43(GF3(GOZ`````!(
+MB>__E<````!(BUPD"$B+;"003(MD)!A,BVPD($R+="0H3(M\)#!(@\0XPV9F
+M9I!F9I!(@^QH2(E<)#A(B6PD0$R)9"1(3(EL)%!,B70D6$R)?"1@2(G[28GT
+M2(E,)#!!B=5$B$0D+\=$)!3_____B=#!X`EFB40D$DR+?V!-A?]T"8"_RP``
+M``!T"8M$)!3I#P,``$F+5TA(B50D"$R+=WAFQX?(````$"=,B??H`````$B)
+MQ8M$)!1(A>T/A.$"``!,B??H`````$B)1"0@2(7`=11(B>Y,B??H`````(M$
+M)!3INP(``$F+MM`(``#&1C\!2(G:OP4```#H`````$&`3T0"2(M38+XA````
+M2(M\)`CH`````$B-15A(B40D&(!\)"\`=!#'A90````*````QD4X*.LGQX64
+M````$@```,9%."I(BU0D($B+>A!(#[=4)!)(BW0D,.@`````2(M#8/9`8`%T
+M?H!\)"\!&<"#X`*#Z'B(13C&13D`3(G@2,'H.(A%.DR)X$C!Z#"(13M,B>!(
+MP>@HB$4\3(G@2,'H((A%/4R)X$C!Z!B(13Y,B>!(P>@0B$4_3(G@2,'H"(A%
+M0$2(94'&14(`QD5#`$2)Z&;!Z`B(141$B&U%QD5&`,9%1P#K3(!\)"\!&<"#
+MX`*#P"B(13C&13D`3(G@2,'H&(A%.DR)X$C!Z!"(13M,B>!(P>@(B$4\1(AE
+M/<9%/@!$B>AFP>@(B$4_1(AM0,9%00!(B>_H`````$B+0V`/MT`P9HE%(,9%
+M)(!(B5TH2(M4)"!(BT(02(E%2`^W1"02B44T2(E5>,9%,"!(BT-@2`7D````
+M2(E%4$C'A:``````````O@````!(BWPD&.@`````BU4T2(M$)"!(BW`82(M\
+M)!CH`````,:#RP````%(B>Y,B??H`````$B%VP^$GP```$B#>V``=%2`N\L`
+M````=$MF@;O(````E@!U$DB+4V!(BWI(OB$```#H`````&;_B\@```"_T`<`
+M`.@`````3(GWZ`````!(A=MT5$B#>V``=`F`N\L`````=;5(A=MT/TB#>V``
+M=#AF@[O(`````'0N@'TD`'4HQT0D%`````"`?"0O`'092`^W5"022(M$)"!(
+MBW`02(M\)##H`````$B#?7@`=`Q(C75X3(GWZ`````!(B>Y,B??H`````$F+
+MMM`(``#&1C\`2(G:OP8```#H`````$&`9T3]BT0D%$B+7"0X2(ML)$!,BV0D
+M2$R+;"103(MT)%A,BWPD8$B#Q&C#9F9FD&9F9I!F9F:02(/L&$B)7"0(3(ED
+M)!!)B?Q!B'0D3T`/MMZ)WN@`````28'$`!0``(G>3(GGZ`````"X`0```$B+
+M7"0(3(MD)!!(@\08PV9F9I!F9I!F9I!(@^P(Z``````/ML!(@\0(PV9F9I!F
+M9F:09F9FD&9FD+@`````PV9F9I!F9I!F9I"Y`````+J`````2(NWT`@```^W
+MPH"\,$`(``#_#Y7`#[;``<'_PF:!^H4`=N1(B[_0"```2(''`!0``+J`````
+M#[?"@+PX0`@``/\/E<`/ML`!P?_"9H'ZA0!VY(G(PY")\HGPP.@$/`EV!8/`
+M5^L(B?#`Z`2#P#"(!XG0@^`/@_@)?@R)T(/@#X/`5^L*9I")T(/@#X/`,(A'
+M`<-F9F:02(/L$$B)'"1,B60D"$B)^T&)]$R)X`^V].BB____00^V]$B#PP)(
+MB=_HDO___TB+'"1,BV0D"$B#Q!##9F9FD%532(G50;D`````N0````"Z``$`
+M`$B)Z(@(2/_`2/_*=?:Y@````$R+A]`(```/M\%F0@^VE`!`"```9H'Z_P`/
+MA&(!``!$B<A!_\$Y\`^%5`$``&:!^8$`#X?%````#[?"2&G`R`\``$B)PDD#
+MD&@)``!(@WH0`'1GN8````!,B<8/M\%F#[:$,$`(``!F/?\`=!</M\!(:<#(
+M#P``2`.&:`D``$@[0A!T,?_!9H'Y@0!VSKL`````@'I:`'8QO@$````/ML,/
+MMDP0<(GPT^`)12#_PSA:6G?JZQ2(30+KT\9%`O](BT((#[9`#8E%(,9%``$/
+MMD)9B$4!2(M">$B)101(BX*(````2(E%#$B+@I````!(B444BX*@````B44<
+MZWI(BX?0"```#[?22&G2T````$B)TT@#F$`)``#&10+_QD4``DB+A]`(``!(
+MBX!`"0``#[9$`CN(10%(BX.(````#[9`#8E%(,9%!'8/MW,\2(U]!>A$_O__
+MQD4,9`^W<SY(C7T-Z#/^___&11QR#[9S.4B-?1WHXOW__[@`````Z9H!``#_
+MP6:!^84`#X9R_O__2(N_T`@``$B!QP`4``"Y@`````^WP68/MI0X0`@``&:!
+M^O\`#X11`0``1(G(0?_!.?`/A4,!``!F@?F!``^'P@````^WPDAIP,@/``!(
+MB<)(`Y=H"0``2(-Z$`!T9+F`````#[?!9@^VA#A`"```9CW_`'07#[?`2&G`
+MR`\``$@#AV@)``!(.T(0=#'_P6:!^8$`=LZ[`````(!Z6@!V,;X!````#[;#
+M#[9,$'")\-/@"44@_\,X6EIWZNL4B$T"Z]/&10+_2(M""`^V0`V)12#&10`!
+M#[9"68A%`4B+0GA(B44$2(N"B````$B)10Q(BX*0````2(E%%(N"H````(E%
+M'.ML#[?22&G2T````$B)TT@#GT`)``#&10+_QD4``DB+AT`)```/MD0".XA%
+M`4B+@X@````/MD`-B44@QD4$=@^W<SQ(C7T%Z+S\___&10QD#[=S/DB-?0WH
+MJ_S__\9%''(/MG,Y2(U]'>A:_/__N`````#K%69FD/_!9H'YA0`/AHO^__^X
+M_____UM=PV9F9I!F9F:09F:055-(B=5!N0````"Y`````+JD#```2(GHB`A(
+M_\!(_\IU]KF`````3(N'T`@```^WP69"#[:4`$`(``!F@?K_``^$"@,``$2)
+MR$'_P3GP#X7\`@``9H'Y@0`/AVD"```/M\)(:<#(#P``20.`:`D``$F)P$B#
+M>!``=&ZZ@````$B+C]`(```/M\)F#[:$"$`(``!F/?\`=!</M\!(:<#(#P``
+M2`.!:`D``$D[0!!T-/_"9H'Z@0!VSKH`````08!X6@!V,[X!````#[;"0@^V
+M3`!PB?#3X`E%(/_"03A06G?HZQ2(50+KT,9%`O](BT`(#[9`#8E%(,9%``%!
+M#[9`68A%`4F+0'A(B44$28N`B````$B)10Q)BX"0````2(E%%$&+@*````")
+M11R[`````$&`N,``````#X8$`@``#[;#2(T,@$B-3,T`2(T$0$C!X`1,`<!(
+MC;#`````#[96"(A1)`^V5@F(425(BX#0````#[8`@^`/B$$F#[9!)(/X`W0R
+M@_@#?PZ#^`(/A.$```#IS0```(/X!&9F9I!F9I!T28/X$@^$BP```&9FD&:0
+MZ:X````/MLM(C01)2,'@!$J+A`#0````#[90`8/B!P^VTL'B"$B-#(D/MD`"
+M`=!KP`J)1,THZ8<````/MM-(C0122,'@!$J+A`#0````@'@"`'4.2(T$DL=$
+MQ2@`````ZV`/ML-(C12`2(T$0$C!X`1*BX0`T`````^V0`*#Z!2)1-4HZSP/
+MMLM(C01)2,'@!$J+A`#0````#[90`L'B"$B-#(D/MD`#`=!KP`J)1,THZP\/
+MML-(C02`QT3%*``````/ML-(C12`2(U4U0!(C7(L2(T$0$C!X`1,`<!(C8C8
+M````2(N`V````$B)0BQ(BT$(2(E&"$B+01!(B4802(M!&$B)1AC_PT$XF,``
+M```/AWC^___K>DB+A]`(```/M])(:=+0````2(G32`.80`D``,9%`O_&10`"
+M2(N'T`@``$B+@$`)```/MD0".XA%`4B+@X@````/MD`-B44@QD4$=@^W<SQ(
+MC7T%Z%#Y___&10QD#[=S/DB-?0WH/_G__\9%''(/MG,Y2(U]'>CN^/__N```
+M``#I/@,``&9F9I#_P6:!^84`#X;*_/__2(N_T`@``$B!QP`4``"Y@`````^W
+MP68/MI0X0`@``&:!^O\`#X3Q`@``1(G(0?_!.?`/A>,"``!F@?F!``^'90(`
+M``^WPDAIP,@/``!)B<!,`X=H"0``28-X$`!T9[J`````#[?"9@^VA#A`"```
+M9CW_`'07#[?`2&G`R`\``$@#AV@)``!).T`0=#3_PF:!^H$`=LZZ`````$&`
+M>%H`=C.^`0````^VPD(/MDP`<(GPT^`)12#_PD$X4%IWZ.L4B%4"Z]#&10+_
+M28M`"`^V0`V)12#&10`!00^V0%F(10%)BT!X2(E%!$F+@(@```!(B44,28N`
+MD````$B)111!BX"@````B44<NP````!!@+C```````^&^0$```^VPTB-#(!(
+MC4S-`$B-!$!(P>`$3`'`2(VPP`````^V5@B(420/ME8)B%$E2(N`T`````^V
+M`(/@#XA!)@^V022#^`-T,X/X`W\3@_@"#X3D````9F:09I#IRP```(/X!'1,
+M@_@29F:0#X2+````Z;4```!F9I!FD`^VRTB-!$E(P>`$2HN$`-`````/ME`!
+M@^('#[;2P>((2(T,B0^V0`(!T&O`"HE$S2CIB0````^VTTB-!%)(P>`$2HN$
+M`-````"`>`(`=0Y(C022QT3%*`````#K8@^VPTB-%(!(C01`2,'@!$J+A`#0
+M````#[9``H/H%(E$U2CK/@^VRTB-!$E(P>`$2HN$`-`````/ME`"P>((2(T,
+MB0^V0`,!T&O`"HE$S2CK$6:0#[;#2(T$@,=$Q2@`````#[;#2(T4@$B-5-4`
+M2(UR+$B-!$!(P>`$3`'`2(V(V````$B+@-@```!(B4(L2(M!"$B)1@A(BT$0
+M2(E&$$B+01A(B488_\-!.)C`````#X=U_O__ZVP/M])(:=+0````2(G32`.?
+M0`D``,9%`O_&10`"2(N'0`D```^V1`([B$4!2(N#B`````^V0`V)12#&101V
+M#[=S/$B-?07H(?;__\9%#&0/MW,^2(U]#>@0]O__QD4<<@^V<SE(C7T=Z+_U
+M__^X`````.L2_\%F@?F%``^&Z_S__[C_____6UW#9F:005154T&)]$B)U4&X
+M`````+D`````NJ0,``!(B>AF9I"("$C_P$C_RG7VN8````!(B[?0"```#[?!
+M9@^VE#!`"```9H'Z_P`/A"D#``!$B<!!_\!$.>`/A1H#``!F@?F!``^'AP(`
+M``^WPDAIP,@/``!)B<!,`X9H"0``28-X$`!T:KJ`````2(GQ#[?"9@^VA`A`
+M"```9CW_`'07#[?`2&G`R`\``$@#@6@)``!).T`0=#3_PF:!^H$`=LZZ````
+M`$&`>%H`=C.^`0````^VPD(/MDP`<(GPT^`)12#_PD$X4%IWZ.L4B%4"Z]#&
+M10+_28M`"`^V0`V)12#&10`!00^V0%F(10%)BT!X2(E%!$F+@(@```!(B44,
+M28N`D````$B)111!BX"@````B44<1(EE)+L`````08"XP``````/AB8"```/
+MML-(C0R`2(U,S0!(C01`2,'@!$P!P$B-L,`````/ME8(B)&H````#[96"8B1
+MJ0```$B+@-`````/M@"#X`^(@:H````/MH&H````@_@#="Z#^`-_#H/X`@^$
+M[0```.G6````@_@$9F:0=$R#^!(/A)0```!F9I!FD.F[````#[;+2(T$24C!
+MX`1*BX0`T`````^V4`&#X@</MM+!X@A(C0R)#[9``@'0:\`*B83-K````.F4
+M````#[;32(T$4DC!X`1*BX0`T````(!X`@!U$4B-!)+'A,6L`````````.MJ
+M#[;#2(T4@$B-!$!(P>`$2HN$`-`````/MD`"@^@4B835K````.M##[;+2(T$
+M24C!X`1*BX0`T`````^V4`+!X@A(C0R)#[9``P'0:\`*B83-K````.L3D`^V
+MPTB-!(#'A,6L``````````^VPTB-%(!(C535`$B-LK````!(C01`2,'@!$P!
+MP$B-B-@```!(BX#8````2(F"L````$B+00A(B48(2(M!$$B)1A!(BT$82(E&
+M&/_#03B8P`````^'6O[__^M^2(N'T`@```^WTDAITM````!(B=-(`YA`"0``
+MQD4"_\9%``)(BX?0"```2(N`0`D```^V1`([B$4!2(N#B`````^V0`V)12#&
+M101V#[=S/$B-?07HFO+__\9%#&0/MW,^2(U]#>B)\O__QD4<<@^V<SE(C7T=
+MZ#CR__]$B64DN`````#I80,``/_!9H'YA0`/AJS\__](B[_0"```2(''`!0`
+M`+F`````#[?!9@^VE#A`"```9H'Z_P`/A!@#``!$B<!!_\!$.>`/A0D#``!F
+M@?F!``^'AP(```^WPDAIP,@/``!)B<!,`X=H"0``28-X$`!T9[J`````#[?"
+M9@^VA#A`"```9CW_`'07#[?`2&G`R`\``$@#AV@)``!).T`0=#3_PF:!^H$`
+M=LZZ`````$&`>%H`=C.^`0````^VPD(/MDP`<(GPT^`)12#_PD$X4%IWZ.L4
+MB%4"Z]#&10+_28M`"`^V0`V)12#&10`!00^V0%F(10%)BT!X2(E%!$F+@(@`
+M``!(B44,28N`D````$B)111!BX"@````B44<1(EE)+L`````08"XP``````/
+MAAL"```/ML-(C0R`2(U,S0!(C01`2,'@!$P!P$B-L,`````/ME8(B)&H````
+M#[96"8B1J0```$B+@-`````/M@"#X`^(@:H````/MH&H````@_@#=#&#^`-_
+M#H/X`@^$\````.G9````@_@$9F:09F:0=$R#^!(/A)0```!F9I!FD.F[````
+M#[;+2(T$24C!X`1*BX0`T`````^V4`&#X@</MM+!X@A(C0R)#[9``@'0:\`*
+MB83-K````.F4````#[;32(T$4DC!X`1*BX0`T````(!X`@!U$4B-!)+'A,6L
+M`````````.MJ#[;#2(T4@$B-!$!(P>`$2HN$`-`````/MD`"@^@4B835K```
+M`.M##[;+2(T$24C!X`1*BX0`T`````^V4`+!X@A(C0R)#[9``P'0:\`*B83-
+MK````.L3D`^VPTB-!(#'A,6L``````````^VPTB-%(!(C535`$B-LK````!(
+MC01`2,'@!$P!P$B-B-@```!(BX#8````2(F"L````$B+00A(B48(2(M!$$B)
+M1A!(BT$82(E&&/_#03B8P`````^'5_[__^MP#[?22&G2T````$B)TT@#GT`)
+M``#&10+_QD4``DB+AT`)```/MD0".XA%`4B+@X@````/MD`-B44@QD4$=@^W
+M<SQ(C7T%Z$CO___&10QD#[=S/DB-?0WH-^___\9%''(/MG,Y2(U]'>CF[O__
+M1(EE)+@`````ZQ+_P6:!^84`#X;$_/__N/____];74%<PV9F9I!)B?!,BT]X
+MN0````"Z*````$B)\(@(2/_`2/_*=?9)B[$@"@``N0````"Z``(``$B)\(@(
+M2/_`2/_*=?9(C58VN0````"-00%(F`^V1#@@B`)(_\)(8\$/MD0X((@"2/_"
+M@\$"@_DG?MQ(C584N0````"-00%(F`^V1`<,B`)(_\)(8\$/MD0'#(@"2/_"
+M@\$"@_D3?MQ(C58NN0````"-00%(F`^V1#A(B`)(_\)(8\$/MD0X2(@"2/_"
+M@\$"@_D'?MQ)B7`82(M'4$C_P$F)`$B#?V``=5?V!P%T4DB#?V@`#Y7`387)
+M#Y7"#[;`A<)T%$B+1VA(#[9`6T*`O`A`"```_W4I2(-_<``/E<!-A<D/E<(/
+MML"%PG0>2(M'<$@/MT!`0H"\"$`(``#_=`H/MD<!08A`#.L%0<9`#/\/MD<"
+M08A`#0^V1UQ!B$`.0<9`$A!!QD`1$`^V!X/@`0'`OOW___]!(G`*"<9!B'`*
+M#[8'@^`!P>`%00^V2`B#X=\)P4&(2`A(#[='6$C!Z`>#X`'!X`:#X;\)P4&(
+M2`A(#[='6$C!Z`*#X`%!#[90"8/B_@G"08A0"4@/MT=:2,'H`X/@`<'@!X/A
+M?PG!08A("$@/MT=:2-'H@^`!`<"#XOT)PD&(4`E(#[='6$C!Z`.#X`'!X`:#
+MXK\)PD&(4`E(#[='6DC!Z`2#X`'!X`>#XG\)PD&(4`F#R1!!B$@(#[8'T.B#
+MX`&#YOX)QD&(<`H/M@>#X`2#YOL)QD&(<`IF0<=`%``0#[:'S````$&(0"##
+MQT($`````,<"`````+@`````PV9F9I!F9I!F9I!F9I!(@^PX2(E<)`A(B6PD
+M$$R)9"083(EL)"!,B70D*$R)?"0P2(G[08GU0;______2(MO8$R+=WA(A>UT
+M%8"_RP````!U#/8'`G0/9F9FD&9FD$2)^.D-`0``3(GW9F:09I#H`````$F)
+MQ$2)^$V%Y`^$\0```$'&1"0XX4'&1"0Y`4&`_0(/E<"#P!I!B$0D.D'&1"0D
+M@`^W13!F08E$)"!)B5PD*$''1"0T`````$G'1"1(`````$G'A"2@````````
+M`$R)YDR)]^@`````QH/+`````6;'@\@```#Z`$B%VW1<2(-[8`!T569F9I!F
+M9I!F@;O(````E@!U%4B+4V!(BWI(OB$```#H`````&9FD&;_B\@```"_T`<`
+M`.@`````3(GWZ`````!(A=MT$$B#>V``=`F`N\L`````=;)F@[O(`````'0/
+M08!\)"0`N`````!$#T3X3(GF3(GWZ`````!$B?A(BUPD"$B+;"003(MD)!A,
+MBVPD($R+="0H3(M\)#!(@\0XPV9F9I!F9F:02(/L2$B)7"082(EL)"!,B60D
+M*$R);"0P3(ET)#A,B7PD0$B)^T&)]D&______TR+9V!,BV]X387D=`F`O\L`
+M````=`Q$B?CI9`0``&9F9I!,B>_H`````$B)Q42)^$B%[0^$200``/8#`@^%
+M`0$``$&`_A1W#$$/MO9K]@QF9I#K&F9!#[;&9FG`B0!FP>@(P.@$#[;P@<;P
+M````QD4XX<9%.0'&13H<0(AU.\9%)(!!#[=$)#!FB44@2(E=*,=%-`````!(
+MQT5(`````$C'A:``````````2(GN3(GOZ`````#&@\L````!9L>#R````,0)
+M2(7;=%9(@WM@`'1/D&:!N\@```"6`'452(M38$B+>DB^(0```.@`````9F:0
+M9O^+R````+_0!P``Z`````!,B>_H`````$B%VW002(-[8`!T"8"[RP````!U
+MLF:#N\@`````#X1$`P``@'TD``^%.@,``$&_`````.DO`P``3(GOZ`````!(
+MB40D$$B%P`^$&0,``$B-15A(B40D"$B+1"002(M`$$B)!"3&13@:QD4Y",9%
+M.AK&13L`QD4\$,9%/0!(BT0D$$B)17C&122`00^W1"0P9HE%($B)72A(BT0D
+M$$B+0!!(B45(QT4T$````$B+0V!(!>0```!(B450QD4P($C'A:``````````
+MO@````!(BWPD".@`````BU4T2(M$)!!(BW`82(M\)`CH`````$B)[DR)[^@`
+M````QH/+`````6;'@\@```#Z`$B%VW122(-[8`!T2V:!N\@```"6`'422(M3
+M8$B+>DB^(0```.@`````9O^+R````+_0!P``Z`````!,B>_H`````$B%VW00
+M2(-[8`!T"8"[RP````!UM6:#N\@`````=`:`?20`=!)(C70D$$R)[^@`````
+MZ>8!``!(B>Y,B>_H`````$R)[^@`````2(G%2(7`=15(C70D$$R)[^@`````
+M1(GXZ<8!``!(C5!82(E4)`A(BSPD2(/'!$B+%"1(#[9"`P^V1!`$B$($QD<!
+M"L9'`@"Y`````+H$````2(L$)(@(2/_`2/_*=?9%A/9U!H!G`_SK-T$/MO9I
+M]E@"``"`3P,#B?'!Z1B(3P2)\L'J$(A7!8GPP>@(B$<&0(AW!XA/"(A7"8A'
+M"D"(=PM(BT0D$$B)17C&13@5#[8'P/@']]"#P!&(13G&13H`QD4[`,9%/!#&
+M13T`@"<_QD4D@$$/MT0D,&:)12!(B5TH2(M$)!!(BT`02(E%2,=%-!````!(
+MBT-@2`7D````2(E%4,9%,"!(QX6@`````````+X`````2(M\)`CH`````(M5
+M-$B+1"002(MP&$B+?"0(Z`````!(B>Y,B>_H`````,:#RP````%FQX/(````
+M^@!(A=MT4DB#>V``=$MF@;O(````E@!U$DB+4V!(BWI(OB$```#H`````&;_
+MB\@```"_T`<``.@`````3(GOZ`````!(A=MT$$B#>V``=`F`N\L`````=;5F
+M@[O(`````'0-@'TD`+@`````1`]$^$B-="003(GOZ`````!F9I!F9I!(B>Y,
+MB>_H`````$2)^&:02(M<)!A(BVPD($R+9"0H3(ML)#!,BW0D.$R+?"1`2(/$
+M2,-F9F:09F:09F:09F:02(/L*$B)7"0(2(EL)!!,B60D&$R);"0@2(G[08GU
+MN/____],BV=X2(MO8/9'6`@/A(,```!)B[0DT`@``$B)^K\%````Z`````"`
+M340"2(M]2$B)ZKXA````Z`````"`?7L`=!B_T`<``.@`````3(GGZ`````"`
+M?7L`=>A%A>UT#F:#2UH09H--8A#K#&:09H-C6N]F@V5B[TF+M"30"```2(G:
+MOP8```#H`````(!E1/VX`````$B+7"0(2(ML)!!,BV0D&$R+;"0@2(/$*,-F
+M9F:09F9FD&9F9I!F9I!(@^P82(E<)`A(B6PD$(GU2(M/>$B+7V#V!P%T.TB#
+M>U``=!%`#[;6#[9S>4B+>U#H`````$B#NQ@!````="U`#[;5#[:S!0$``$B+
+MNQ@!``#H`````.L40`^VUDB+0S@/MG`!2(G/Z`````!(BUPD"$B+;"002(/$
+M&,-F9I!FD$B#[#A(B5PD"$B);"003(ED)!A,B6PD($R)="0H3(E\)#!(B?M!
+MB?9!B=?'1"0$_____TR+9V!,BV]X387D=`F`O\L`````=`F+1"0$Z1,!``!,
+MB>_H`````$B)Q8M$)`1(A>T/A/L```#&13CAQD4Y`46$]G0-08#_`1G`]]"#
+MP`?K"T&`_P$9P/?0@\`-B$4ZQD4D@$$/MT0D,&:)12!(B5THQT4T`````$C'
+M14@`````2,>%H`````````!(B>Y,B>_H`````,:#RP````%FQX/(````]`%(
+MA=MT5$B#>V``=$UF@;O(````E@!U$DB+4V!(BWI(OB$```#H`````&;_B\@`
+M``"_T`<``.@`````3(GOZ`````!(A=MT$DB#>V``=`N`N\L`````9I!ULV:#
+MN\@`````=!J`?20`=11(BT-@#[=`8F:)0UK'1"0$`````$B)[DR)[^@`````
+MBT0D!$B+7"0(2(ML)!!,BV0D&$R+;"0@3(MT)"A,BWPD,$B#Q#C#9F9FD&9F
+M9I!(@^P(#[8&@_@)#X>"````B<#_),4`````9F9FD&9FD$B+?@C&A^\3````
+MZ`````"X`````.M@#[96"+X`````Z"O^___K4`^V5@B^`0```.@;_O__ZT`/
+MMG8(Z`````#K-0^V5@D/MG8(Z*'\__^0ZR4/MG8(Z`````!F9I!FD.L5#[9V
+M".@`````N`````#K!;C_____2(/$",-F9F:02(M'8$B%P'132,=`.`````"`
+M2$0$2,='8`````!(QT=P`````$C'1V@`````@W\(/W\52(M7>$AC1PA(QX3"
+M0`0```````##2(M7>$AC1PA(QX3"0`(```````#SPV:02(M'8$B%P'132,=`
+M.`````"`8$3[2,='8`````!(QT=P`````$C'1V@`````@W\(/W\52(M7>$AC
+M1PA(QX3"0`0```````##2(M7>$AC1PA(QX3"0`(```````#SPV:04TB)^^@`
+M````2(N[T`@``$B!QP`4``#H`````%O#9I!32(G[Z`````!(B[O0"```2(''
+M`!0``.@`````6\-FD$%505154TB#[%A)B?Q,BZ_0"```28'%`!0``$B#/P!T
+M%DB+-TB![@```@!(B3=(BW\@Z`````!)@WPD$`!T$4F+="0028M\)"#H````
+M`&:028-\)!@`=`])BW0D&$F+?"0@Z`````!!#[=\)#Q(C40D5DB)1"0X2(U$
+M)%1(B40D,$B-1"122(E$)"A(C40D4$B)1"0@2(U$)$Y(B40D&$B-1"1-2(E$
+M)!!(C40D3$B)1"0(2(U$)$I(B00D3(U,)$E,C40D1DB-3"1%2(U4)$1(C70D
+M0^@`````28.\)!@)````="M)B[0D&`D``$F-O"3X"```Z`````!)B[48"0``
+M28V]^`@``.@`````9F:028.\)$`)````="A)B[0D0`D``$F-O"0@"0``Z```
+M``!)B[5`"0``28V](`D``.@`````28.\)&@)````="A)B[0D:`D``$F-O"1(
+M"0``Z`````!)B[5H"0``28V]2`D``.@`````28.\).`*````="])B[0DX`H`
+M`$F-O"3`"@``Z`````!)B[7@"@``28V]P`H``.@`````9F9FD&9FD+T`````
+M0#IL)$-S.V9F9I")Z`^VV$F+M-PP"P``28V\)!`+``#H`````$F+M-TP"P``
+M28V]$`L``.@`````_\5`.FPD0W+)28.\),`/````="Y)B[0DP`\``$F-O"2@
+M#P``Z`````!)B[7`#P``28V]H`\``.@`````9F:09F:028.\)/@/````="A)
+MB[0D^`\``$F-O"38#P``Z`````!)B[7X#P``28V]V`\``.@`````28.\)&@0
+M````="A)B[0D:!```$F-O"1($```Z`````!)B[5H$```28V]2!```.@`````
+M28.\))`)````="])B[0DD`D``$F-O"1P"0``Z`````!)B[60"0``28V]<`D`
+M`.@`````9F9FD&9FD$F#O"1H"@```'0H28NT)&@*``!)C;PD2`H``.@`````
+M28NU:`H``$F-O4@*``#H`````$F#O"3X"0```'0H28NT)/@)``!)C;PDV`D`
+M`.@`````28NU^`D``$F-O=@)``#H`````$F#O"0@"@```'0O28NT)"`*``!)
+MC;PD``H``.@`````28NU(`H``$F-O0`*``#H`````&9F9I!F9I!)@[PDN`H`
+M``!T*$F+M"2X"@``28V\))@*``#H`````$F+M;@*``!)C;V8"@``Z`````!)
+M@[PD"`L```!T*$F+M"0("P``28V\).@*``#H`````$F+M0@+``!)C;WH"@``
+MZ`````!)@[PD4`\```!T+TF+M"10#P``28V\)#`/``#H`````$F+M5`/``!)
+MC;TP#P``Z`````!F9F:09F:028.\)(@/````="A)B[0DB`\``$F-O"1H#P``
+MZ`````!)B[6(#P``28V]:`\``.@`````28.\)#`0````="A)B[0D,!```$F-
+MO"00$```Z`````!)B[4P$```28V]$!```.@`````28.\))`*````="])B[0D
+MD`H``$F-O"1P"@``Z`````!)B[60"@``28V]<`H``.@`````9F9FD&9FD$F#
+MO"20$````'0W28N4))@0``!)B[0DD!```$F-O"1P$```Z`````!)BY68$```
+M28NUD!```$F-O7`0``#H`````$F#O"3`$````'0W28N4),@0``!)B[0DP!``
+M`$F-O"2@$```Z`````!)BY7($```28NUP!```$F-O:`0``#H`````$F#O"3P
+M$````'0W28N4)/@0``!)B[0D\!```$F-O"30$```Z`````!)BY7X$```28NU
+M\!```$F-O=`0``#H`````$F#O"10$0```'0W28N4)%@1``!)B[0D4!$``$F-
+MO"0P$0``Z`````!)BY58$0``28NU4!$``$F-O3`1``#H`````$F#O"0@$0``
+M`'0]28N4)"@1``!)B[0D(!$``$F-O"0`$0``Z`````!)BY4H$0``28NU(!$`
+M`$F-O0`1``#H`````&9FD&9FD$F#O"2`$0```'0W28N4)(@1``!)B[0D@!$`
+M`$F-O"1@$0``Z`````!)BY6($0``28NU@!$``$F-O6`1``#H`````$F#O"2P
+M$0```'0W28N4)+@1``!)B[0DL!$``$F-O"20$0``Z`````!)BY6X$0``28NU
+ML!$``$F-O9`1``#H`````$B#Q%A;74%<05W#D$B#[!A(B5PD"$R)9"002(G[
+MZ`````!,C:,`%```3(GGZ`````!(B=_H`````+_0!P``Z`````!(B=_H````
+M`$B)W^@`````O@$```!(B=_H`````+X!````3(GGZ`````!(BUPD"$R+9"00
+M2(/$&,-(@^P(2,?'`````.@`````N`````!(@\0(PY"0D)"0D,8'",9'`1)`
+M@/X!&<#WT(/@!(A'`L9'`P#&1P0`QD<%`,9'!@#&1P<`QD<(`,9'"0#&1PH`
+MQD<+`(#Z`1G`@^`@B$<,QD<-`,9'#@#&1P\`QD<0`,9'$0#&1Q(`QD<3`+@4
+M````PV9F9I!F9I!F9I!(@^PX2(E<)`A(B6PD$$R)9"083(EL)"!,B70D*$R)
+M?"0P28G_2(GU08G608G-Z`````!)B<2X`````$V%Y`^$HP```$F+7"0000^V
+MU4$/MO9(C7L$Z`````!!B<7&`P#&0P$`QD,"`,9#`P!(B>Y,B?_H`````+D`
+M````NA````!(C44XB`A(_\!(_\IU]D&-103&13@5QD4Y$8A%/,9%/0!(C5U8
+M1`^VZ$2);33'A90`````````28M$)!!(B45(3(EE>+X`````2(G?Z`````!)
+MBW0D&$2)ZDB)W^@`````N`$```!(BUPD"$B+;"003(MD)!A,BVPD($R+="0H
+M3(M\)#!(@\0XPY"0D)"0D$&)\&:)=PC&1PX`9L='#```O@````!F1#G&<QYF
+M9F:0#[?.2(L71(G`9BGP_\AFB01*_\9F1#G&<N;SPV9F9I!!B?!FB7<(QD<.
+M`6;'1PP``+D`````9CGQ<Q=F9I!FD`^WT4B+!V:)#%#_P69$.<%R[O/#9F9F
+MD&9F9I!F9F:0@'\.`74J#[='#`^WR$B+%__`9HE'#`^W%$IF.T<*<@9FQT<,
+M``!F_T\(#[?"PV:09O]/"$@/MU<(2(L'#[<$4,-F9F:09F9FD&9F9I!F9I!(
+M@^P(@'\.`74J#[=7#`^W1PB)1"0$C00"#[=7"HD4))GW/"1(8])(BP]FB311
+M9O]'".L02`^W5PA(BP=FB3109O]'"$B#Q`C#9F9FD&9FD&:#?P@`#Y3`#[;`
+MPY"0D)"X`````$@Y/W012(L'2(M("$B+$$B)2@A(B1'SPV9FD+@`````2#D_
+M=!)(BT<(2(M("$B+$$B)2@A(B1'SPV:02(MW8$0/MD=8N0````"ZJ````$B)
+M^(@(2/_`2/_*=?9(B7=@1(A'6,-F9F:09F:02(/L"`^V1@&(1P$/MD8"B$<"
+MBT8$B4<$2(M'"$@/ME<!2(T44DC!X@)(BW8(2(G'Z`````!(@\0(PV9FD&9F
+MD+D`````.-%S(V9F9I!F9I`/M@<Z!G0)N`````##9F:02/_'2/_&_\$XT7+D
+MN`$```##9F9FD&9F9I!F9I!F9I#&1P$`0(AW`L='!`````##08G12`^V1P%(
+MC01`2(M7"$R-!(+^1P%$`4\$N0````"Z#````$R)P(@(2/_`2/_*=?9)B3!%
+MB$@(1(G(P>@(08A`"42)RL'J$(/B/T$/MD`*@^#`"=!!B$`*PV9FD&:0#[9'
+M`3H'#Y+`#[;`PV9FD+G_````N@`"``!(B?AF9I"("$C_P$C_RG7V\\-F9F:0
+MN``````/M\B`?(\"_W419HDTCXA4CP+K#V9F9I!F9I#_P&:#^']VW0^WP,-F
+M9F:008G1B?!$#[?`0H!\AP+_=0]F1HD,AT*(3(<"#[?`PY`/MM%!#[?QZ```
+M```/M\##N``````/M\@X5(\"=1-F.32/=0W&1(\"_V;'!(___^L(_\!F@_A_
+M=MP/M\##9F:0N0`````/M\$X5(<"=09F.32'=`C_P6:#^7]VZ6:!^8``N(`!
+M```/1,@/M\'#9F:0#[9/.(#Y"`^5P(#Y*`^5P@^VP(7"=#Z`^:AT.8#YB'0T
+M@/D*#Y7`@/DJ#Y7"#[;`A<)T(8#YJG0<@/F*=!>`^2\/E<"`^8\/E<(/ML"%
+MP@^%S0$```^V1SB#^"\/A*X```"#^"]_.8/X"G1[@_@*D'\.@_@(='#IA@$`
+M`&9F9I"#^"@/A(<```"#^"IF9F:0#X1Z````Z6<!``!F9I!FD#V/````#X3=
+M````/8\```!_'CV(````#X3+````/8H````/A,````#I-0$``&9FD#VH````
+M=&P]J@```&9F9I!T8>D;`0``#[9'.8/@'\'@$`^V5SK!X@@)T`^V5SL)T(G"
+M#[9//.D%`0``9F:09I`/ME<ZP>(8#[9'.\'@$`G"#[9'/,'@"`G"#[9'/0G"
+MB=(/MD\_P>$(#[9'0`G!Z<T````/ME<ZP>(8#[9'.\'@$`G"#[9'/,'@"`G"
+M#[9'/0G"B=(/MD\^P>$8#[9'/\'@$`G!#[9'0,'@"`G!#[9'00G!Z8@```!(
+M#[97.DC!XCA(#[9'.TC!X#!("<)(#[9'/$C!X"A("<)(#[9'/4C!X"!("<)(
+M#[9'/DC!X!A("<)(#[9'/TC!X!!("<)(#[9'0$C!X`A("<)(#[9'04@)P@^V
+M3T+!X1@/MD=#P>`0"<$/MD=$P>`("<$/MD=%"<'K#KH`````N0````!F9F:0
+M2(F7B````(F/D````&:#3R(!\\-F9F:09F9FD&9F9I!32(/L8$B)^T0/MD\[
+M1`^V1SH/MD\Y#[97.`^V1T>)1"18#[9'1HE$)%`/MD=%B40D2`^V1T2)1"1`
+M#[9'0XE$)#@/MD="B40D,`^V1T&)1"0H#[9'0(E$)"`/MD<_B40D&`^V1SZ)
+M1"00#[9'/8E$)`@/MD<\B00D2(G^2,?'`````+@`````Z``````/MW,@2,?'
+M`````+@`````Z`````!(@\1@6\-F9F:09F9FD+K_____N0````!F.?%S(4G'
+MP``````/M\$/M@0X,=`/ML#!Z@A!,Q2`_\%F.?%RYHG0PY"0D)"0D)"0D)"0
+MD)!(BP>+D`0!``")%0````")T8'A?O_^_TB+!XF(!`$``(G1@>%^__+_2(M'
+M"(D(2(M'"(E(#$B+1PB)2!!(BT<(B4@42(M'"(E(&$B+1PB)2`1(BP>+@%0!
+M``")!0````")P8'A_@#__TB+!XF(5`$``,-F9F:09F9FD&9FD&9FD%532(/L
+M"(GS2(LO@_X#=AB-!-W@____BX0HH`$``(D%`````(G!ZQB-!-T`````B<"+
+MA"B``0``B04`````B<&#X?Z#^P-V$(T$W>#___^)C"B@`0``ZQ"-!-T`````
+MB<")C"B``0``A-(/A*````"#^P-V&(T$G?#___^+A"C@`0``B04`````B<'K
+M&(T$G0````")P(N$*-`!``")!0````")P8/)`H/[`W80C02=\/___XF,*.`!
+M``#K$(T$G0````")P(F,*-`!``"-!)T`````C7#PB<)F9F:09F:0@_L#=A&+
+MA"[@`0``B04`````B<'K#XN$*M`!``")!0````")P?;!`G76Z94```"0@_L#
+M=A2-!-W@____QX0H4`(```````#K%(T$W0````")P,>$*%`"````````OQ`G
+M``#H`````(/[`W88C03=X/___XN$*%0"``")!0````")P>L8C03=`````(G`
+MBX0H5`(``(D%`````(G!@\D!@_L#=A"-!-W@____B8PH5`(``.L0C03=````
+M`(G`B8PH5`(``$B#Q`A;7<-F9I!FD$%6055!5%5328G\08GU08G62(LONP``
+M``"`?SX`#X1.`@``1(GJ#[;"B=E(T_BH`0^$*P(``(/[`W88C03=X/___XN$
+M**0!``")!0````")PNL8C03=`````(G`BX0HA`$``(D%`````(G"@^+^@_L#
+M=A"-!-W@____B90HI`$``.L0C03=`````(G`B90HA`$``+\0)P``Z`````!%
+MA/8/A)H```"#^P-V&(T$G?#___^+A"C@`0``B04`````B<+K&(T$G0````")
+MP(N$*-`!``")!0````")PH/*`H/[`W80C02=\/___XF4*.`!``#K$(T$G0``
+M``")P(F4*-`!``"-!)T`````C7#PB<&0@_L#=A&+A"[@`0``B04`````B<+K
+M#XN$*=`!``")!0````")PO;"`G76Z94```"0@_L#=A2-!-W@____QX0H4`(`
+M``````#K%(T$W0````")P,>$*%`"````````OQ`G``#H`````(/[`W88C03=
+MX/___XN$*%0"``")!0````")PNL8C03=`````(G`BX0H5`(``(D%`````(G"
+M@\H!@_L#=A"-!-W@____B90H5`(``.L0C03=`````(G`B90H5`(``(/[`W87
+MC03=X/___\>$**`!```!````ZQ=F9I"-!-T`````B<#'A"B``0```0```(/[
+M`W88C03=X/___XN$**0!``")!0````")PNL8C03=`````(G`BX0HA`$``(D%
+M`````(G"@\H!@_L#=A"-!-W@____B90HI`$``.L0C03=`````(G`B90HA`$`
+M`/_#00^V1"0^.=@/A[+]__];74%<05U!7L-F9I!F9I")\4B+!XN`!`$``(D%
+M`````$&)P`^W1SQF/8!D#Y3"9CV`D0^4P`G0J`%U"&:!?SR`E'42#[;)@\$(
+MN`$```#3X$$)P.L10`^VSH/!#+@!````T^!!"<!(BP=$B8`$`0``PV9F9I!F
+M9F:09F:09F:0B?%(BP>+@`0!``")!0````!!B<`/MT<\9CV`9`^4PF8]@)$/
+ME,`)T*@!=0AF@7\\@)1U$@^VR8/!"+C^____T\!!(<#K$4`/MLZ#P0RX_O__
+M_]/`02'`2(L'1(F`!`$``,-F9F:09F9FD&9FD&9FD$B#[!A(B5PD"$R)9"00
+M28G\0`^VWHG>Z`````"_$"<``.@`````B=Y,B>?H`````$B+7"0(3(MD)!!(
+M@\08PY")\4"`_O]T>$"`_A]W-HN7&`$``(D5`````+@!````T^")P??0(=")
+MAQ@!``"+AU@!``")!0`````AR'1#B8=8`0``PXN7'`$``(D5`````$`/MLZ#
+MZ2"X`0```-/@B<'WT"'0B8<<`0``BX=@`0``B04`````(<AT!HF'8`$``//#
+M9F9FD&9F9I!F9I!F9I!!5%532(G5B?-,BR=`@/X#=AY(C03=`````"7X!P``
+M0L>$(``"```,`0``ZQQF9I!(C03=`````"7X!P``0L>$(``"```,`0``OQ`G
+M``#H`````(#[`W8X2(T,W0````"!X?@'```/ME4#P>(8#[9%`L'@$`G"#[9%
+M`<'@"`G"#[9%``G"0HF4(00"``#K-I!(C0S=`````('A^`<```^V50/!XA@/
+MMD4"P>`0"<(/MD4!P>`("<(/MD4`"<)"B90A!`(``(#[`W8;2(T$W0`````E
+M^`<``$+'A"```@``$`$``.L92(T$W0`````E^`<``$+'A"```@``$`$``+\0
+M)P``Z`````"`^P-V-TB-#-T`````@>'X!P``#[95!\'B&`^V10;!X!`)P@^V
+M107!X`@)P@^V100)PD*)E"$$`@``ZS5(C0S=`````('A^`<```^V50?!XA@/
+MMD4&P>`0"<(/MD4%P>`("<(/MD4$"<)"B90A!`(``%M=05S#D)!32(/L8$B)
+M^P^W?SQ(C40D7DB)1"0X2(U$)%Q(B40D,$B-1"1:2(E$)"A(C40D6$B)1"0@
+M2(U$)%9(B40D&$B-1"152(E$)!!(C40D5$B)1"0(2(U$)%)(B00D3(U,)%%,
+MC40D3DB-3"1-2(U4)$Q(C70D2^@`````#[94)$L/MG0D3$B-?"1$Z`````!(
+M#[94)$M(:=*(`0``2(MS($B-N_@(``"Y`0```.@`````2`^V5"1-2&G2T```
+M`$B+<R!(C;L@"0``N0$```#H`````$@/ME0D3$AITL@/``!(BW,@2(V[2`D`
+M`+D!````Z`````!(#[=4)%9(P>(#2(MS($B-NW`)``"Y`0```.@`````2`^W
+M5"1.2&G2J````$B+<R!(C;M("@``N0$```#H`````$@/ME0D44@/MT0D3D@/
+MK]!(C1122,'B`DB+<R!(C;O8"0``N0$```#H`````$B+<R!(C;L`"@``N0$`
+M``"Z``(``.@`````#[9,)$M(BW,@2(V[$`L``+H`"```Z`````!(#[94)%1(
+MP>(%2(MS($B-NY@*``"Y`0```.@`````2`^V5"152(T4DDC!X@5(BW,@2(V[
+MP`H``+D!````Z`````!(#[=4)%)(C1222,'B`TB+<R!(C;OH"@``N0$```#H
+M`````$@/MU0D5D@!TDB+<R!(C;LP#P``N0$```#H`````$@/ME0D2T@!TDB+
+M<R!(C;MH#P``N0$```#H`````$@/ME0D34@!TDB+<R!(C;N@#P``N0$```#H
+M`````$@/ME0D3$@!TDB+<R!(C;O8#P``N0$```#H`````$@/ME,^2`'22(MS
+M($B-NQ`0``"Y`0```.@`````2`^W5"182(T44DC!X@1(BW,@2(V[<`H``+D!
+M````Z`````"+5"1$2(MS($B-NT@0``"Y`0```.@`````2`^W5"162,'B!DB+
+M<R!(C;MP$```0;@!````N4````#H`````$B+<R!(C;N@$```0;@!````N0`!
+M``"Z`!D``.@`````2`^W5"162&G2L`0``$B+<R!(C;O0$```0;@!````N8``
+M``#H`````$@/MU0D7$C!X@)(BW,@2(V[`!$``$&X`0```+D$````Z`````!(
+M#[=4)%Y(P>("2(MS($B-NS`1``!!N`$```"Y!````.@`````#[94)%3!X@M(
+MBW,@2(V[8!$``$&X`0```+D(````Z`````!(#[=4)%)(:=*,`0``2(MS($B!
+MPY`1``!!N`$```"Y"````$B)W^@`````N`````!(@\1@6\-F9I!FD$%6055!
+M5%532(/L8$F)_$&^`````,9'40#&1U``QD=/`$C'A_@3````````QH?Q$P``
+M`+D`````NJ`!``!(C8=`$@``B`A(_\!(_\IU]DF-A"3H````28F$).@```!)
+MB80D\````$F-A"3X````28F$)/@```!)B80D``$``$F-A"0(`0``28F$)`@!
+M``!)B80D$`$``$F-A"08`0``28F$)!@!``!)B80D(`$``$F-A"0H`0``28F$
+M)"@!``!)B80D,`$``$F-A"1(`0``28F$)$@!``!)B80D4`$``$F-A"18`0``
+M28F$)%@!``!)B80D8`$``$F-A"0X`0``28F$)#@!``!)B80D0`$``$$/MWPD
+M/$B-1"1>2(E$)#A(C40D7$B)1"0P2(U$)%I(B40D*$B-1"182(E$)"!(C40D
+M5DB)1"082(U$)%5(B40D$$B-1"142(E$)`A(C40D4DB)!"1,C4PD44R-1"1.
+M2(U,)$U(C50D3$B-="1+Z``````/MD0D2T&(1"1&#[9$)$Q!B$0D1P^V1"1-
+M08B$).$````/MT0D5F9!B40D6(M$)%QF08F$)#P2```/MT0D7O_(9D&)A"0^
+M$@``00^W1"0\/8"1``!T"SV`E```#X4C"0``0<9$)$T$0<9$)$,$0<9$)$Y`
+M0<9$)$P`0<:$)-X````)0<9$)$0`28V\)/@(``#H`````$F)A"08"0``N0``
+M``!(#[94)$M(:=*(`0``ZPB("$C_RDC_P$B%TG7S28V\)"`)``#H`````$F)
+MA"1`"0``N0````!(#[94)$U(:=+0````2(72=`J("$C_P$C_RG7V28V\)$@)
+M``#H`````$F)A"1H"0``N0````!(#[94)$Q(:=+(#P``2(72=`J("$C_P$C_
+MRG7V28V\)'`)``#H`````$F)A"20"0``N0````!(#[=4)%9(P>(#=`J("$C_
+MP$C_RG7V28V\)``*``#H`````$F)A"0@"@``28V\)-@)``#H`````$F)A"3X
+M"0``2(G#28V\)$@*``#H`````$F)A"1H"@``2(G"O0````!F.VPD3G-$28V,
+M)`@!``!(B5I@#[9$)%&(0EA(BT$(2(E1"$B)"DB)0@A(B1!(#[9$)%%(C01`
+M2(T<@TB!PJ@```#_Q68[;"1.<L1)C;PD<`H``.@`````28F$))`*``!(B<*]
+M`````&8[;"18<RM)C8PD&`$``,9"$`!(BT$(2(E1"$B)"DB)0@A(B1!(@\(P
+M_\5F.VPD6'+=28V\))@*``#H`````$F)A"2X"@``2(G"O0````"`?"14`'0K
+M28V,)"@!``!(BT$(2(E1"$B)"DB)0@A(B1!(@\(@_\5F#[9$)%1F.>AWW4F-
+MO"3`"@``Z`````!)B80DX`H``$B)PKT`````@'PD50!T+DF-C"1(`0``2(M!
+M"$B)40A(B0I(B4((2(D02('"H````/_%9@^V1"159CGH=]I)C;PDZ`H``.@`
+M````28F$)`@+``!(B<*]`````&8[;"12<R=)C8PD.`$``$B+00A(B5$(2(D*
+M2(E""$B)$$B#PBC_Q68[;"12<N&]`````(!\)$L`=#]-C:PD6`$```^WW4F-
+MO"00"P``Z`````!)B83<,`L``$F+50A)B44(3(DH2(E0"$B)`O_%9@^V1"1+
+M9CGH=\E)C;PD,`\``.@`````28F$)%`/``!)B80D6`\```^W1"169D&)A"1B
+M#P``#[?P28V\)%@/``#H`````$F-O"1H#P``Z`````!)B80DB`\``$F)A"20
+M#P``9@^V1"1+9D&)A"2:#P``#[?P28V\))`/``#H`````$F-O"2@#P``Z```
+M``!)B80DP`\``$F)A"3(#P``9@^V1"1-9D&)A"32#P``#[?P28V\),@/``#H
+M`````$F-O"38#P``Z`````!)B80D^`\``$F)A"0`$```9@^V1"1,9D&)A"0*
+M$```#[?P28V\)``0``#H`````$F-O"00$```Z`````!)B80D,!```$F)A"0X
+M$```9D$/MD0D/F9!B80D0A```$$/MG0D/DF-O"0X$```Z`````!)C;PD2!``
+M`.@`````28F$)&@0``!(#[94)$Q(C132B=;!Y@>!QF!7``"Y`````(GR2(72
+M=`J("$C_P$C_RG7V28N$)&@0``"),$F+E"1H$```#[9$)$R(0@0/ME0D3$F+
+MO"1H$```Z`````"]`````$&`?"0^`'1]#[?%2&G`J````$P!X$R-L*`!``!!
+MB&X(0<9&"0!,B:"@`0``0<9&#@!!QD98`$'&1B@`0<>&H`````````!(C9#0
+M`0``28E6,$F)5CA(C9#H`0``28E62$F)5E!(!0`"``!)B49@28E&:$'&1@H"
+M_\5F00^V1"0^9CGH=X-!QD0D3`"]``````^WQ4+&A"#&"```___%9H/]`W;L
+MO0````"`?"1+``^$D`````^WS4F+E"08"0``2&G!B`$``,9$$$,!28N4)!@)
+M``#&1!!"`$F+E"08"0``QD00>/])BY0D&`D``,9$$&K_28N4)!@)``!FQX00
+MP```````2<>$S$`$````````2(G!20.,)!@)``!(C5$@2(E1($D#A"08"0``
+M2(/`($B)0`C_Q68/MD0D2V8YZ`^'</___V9!QX0DW```````O0````!F9I!F
+M9I`/M\5"QH0@0`@``/__Q6:!_84`=NN]`````(!\)$P`#X3"````#[?528N$
+M)&@)``!(:=+(#P``QD0"6`!)BX0D:`D``,9$`ED`28N$)&@)``!(QT0"$```
+M``!(B=%)`XPD:`D``$B-01A(B4$82(G020.$)&@)``!(@\`82(E`"$B)T4D#
+MC"1H"0``2(U!*$B)02A(B=!)`X0D:`D``$B#P"A(B4`(28N$)&@)``!,B70"
+M"$B)T4D#C"1H"0``2(U!2$B)04A)`Y0D:`D``$B#PDA(B5((_\5F#[9$)$QF
+M.>@/AS[___]!QH0DWP```("]`````(!\)$T`#X2'````#[?528N$)$`)``!(
+M:=+0````9L=$`DX$`$F+A"1`"0``QD0"0@!)BX0D0`D``,9$`D3_28N$)$`)
+M``#&1`)0_TB)T4D#C"1`"0``2(U!*$B)02A(B=!)`X0D0`D``$B#P"A(B4`(
+M28N$)$`)``!,B;0"B````/_%9@^V1"1-9CGH#X=Y____0<:$).````""28VT
+M))@0``!)C;PD<!```.@`````28F$))`0``!)C;0DR!```$F-O"2@$```Z```
+M``!)B80DP!```$F-M"3X$```28V\)-`0``#H`````$F)A"3P$```28VT)"@1
+M``!)C;PD`!$``.@`````28F$)"`1``!)C;0D6!$``$F-O"0P$0``Z`````!)
+MB80D4!$``$F-M"2($0``28V\)&`1``#H`````$F)A"2`$0``38NT)(@1``!)
+MB<6]`````(!\)%0`=$A)C9PD*`$``$B)W^@`````2(G"3(EH$$R)<!A(BT,(
+M2(E3"$B)&DB)0@A(B1!)@<4`"```28'&``@``/_%9@^V1"149CGH=\!)C;0D
+MN!$``$F-O"20$0``Z`````!)B80DL!$``$V+M"2X$0``28G%O0````!F.VPD
+M4G-$28V<)#@!``!(B=_H`````$B)PDR):!!,B7`82(M#"$B)4PA(B1I(B4((
+M2(D028'%C`$``$F!QHP!``#_Q68[;"12<L1(@\1@6UU!7$%=05[#9F9FD&9F
+M9I!F9I!F9I!!5T%6055!5%532(/L"$F)_,9$)`<`2`^V1"0'0@^VE"#&"```
+M@/K_#X2;````#[;"2&G`J````$Z-M""@`0``0;T`````08!^#@!V?$F-;F!-
+MB?=(B>_H`````$B)PTB+10A(B5T(2(DK2(E#"$B)&$B#>S@`=!I(BU,X28NT
+M)-`(``"_!0```.@`````@$M$`DB)VKX"````3(GWZ`````"`>WL`=!A,B>?H
+M`````+\!````Z`````"`>WL`=>A!_\5%.&\.=XO^1"0'@'PD!P,/AC[___],
+MB>?H`````$B#Q`A;74%<05U!7D%?PY!(@^P(2#E^*'5F#[9..(#Y"`^5P(#Y
+M*`^5P@^VP(7"=&B`^:AT8X#YB'1>@/D*#Y7`@/DJ#Y7"#[;`A<)T2X#YJG1&
+M@/F*=$%(C9?H````2(N'Z````$B)<`A(B09(B58(2(FWZ````.L?9F:09F:0
+M2(V'Z````$B+4`A(B7`(2(D&2(E6"$B),N@`````2(/$",-F9F:09F:09F:0
+M9F:02(/L".@`````2(/$",-FD$%455-(B?-(B=5!O`````!F@7XXX0%U"P^V
+M1CJ#Z!$\`78R2(L72(NR&`D``$R-IGB&`0!F@7L@A0!W&4@/MT,@2`^VA!!`
+M"```2&G`B`$``$R-)`;&100%@&4%_H!E`-^Z`````&:!>SCA`742#[9#.O_(
+M/`&X`0````]&T&:0B=#!X`</ME4`@^)_"<*(50`/MH.6````@^`!P>`&@^*_
+M"<*(50!F@7LXX0%U$@^V0SJ#Z!$\`7<'9HE-".L<D/:#E@````%T#DR)Y^@`
+M````9HE%".L$9HE-"`^W10B(0R5F@7LXX0%U+@^V0SK_R#P!=PP/ME,[ZS%F
+M9I!F9I!F@7LXX0%U$`^V0SJ#Z!&Z#P```#P!=A.Z`````$F#?"18`'0&00^V
+M5"1Y@^(/#[9%`(/@\`G0B$4`6UU!7,.02(/L"$B+/^@`````2(/$",-F9F:0
+M9F9FD&9F9I!F9I!,BP</MX<X$@``_\!FB8<X$@``9CN'/!(``'()9L>'.!(`
+M````2`^WCS@2``!(BY<@$0``BP:)!(H/MX<X$@``08F`+`$``,-F9F:09F9F
+MD$&)T4&X`````+H$````2(G(1(@`2/_`2/_*=?6)\H'B_P\``(L!)0#P__\)
+MT(D!#[97#<'B#"7_#_#_"=")`4@/MD<*2-'H@^`!@_@!&<"#X`+_P,'@'8L1
+M@>+___\?"<*)$0^V00.#R!"#X/>(00/V1PH!=!1$B<J#XG_!XA2+`27__P_X
+M"=")`?/#9F9FD$B#[#A(B5PD"$B);"003(ED)!A,B6PD($R)="0H3(E\)#!)
+MB?Q(B?-)B==!O@`````/MD8X/`@/E,(\*`^4P`G0J`%U#(!^.*AT!H!^.(AU
+M#X.+E`````KK+69FD&9FD`^V1C@\"@^4PCPJ#Y3`"="H`74,@'XXJG0&@'XX
+MBG4'@XN4`````F:!>SCA`74A#[9#.H/H$3P!=Q:#BY0````(N`````#I104`
+M`&9FD&:0BT,X)?___P`]X0$0``^%(`$``&:!>R"%``^'H0```$@/MT,@0H"\
+M($`(``#_#X2-````9H-[(']W)$H/MH0@0`@``$F+E"08"0``2&G`B`$``$B+
+M1!!(1`^V:`CK:&:!>R"!`'<I2`^W0R!*#[:$($`(``!)BY0D:`D``$AIP,@/
+M``!(BT00"$0/MF@(ZS=(#[=#($H/MH0@0`@``$F+E"1`"0``2&G`T````$B+
+MA!"(````1`^V:`CK"V9FD&:00;W_____1(GJ#[;"2@^VK"#&"```2&GMJ```
+M`$J-K"6@`0``28N4)&@)``!(C8(XN`\`9H%[((4`=QE(#[=#($H/MH0@0`@`
+M`$AIP,@/``!(C00"]D!=$`^%@@$``,9#)`1!QP<`````N`$```#I#00``&:!
+M>R"%``^'H0```$@/MT,@0H"\($`(``#_#X2-````9H-[(']W)DH/MH0@0`@`
+M`$F+E"08"0``2&G`B`$``$B+1!!(1`^V:`CK:&:09H%[(($`=RE(#[=#($H/
+MMH0@0`@``$F+E"1H"0``2&G`R`\``$B+1!`(1`^V:`CK-4@/MT,@2@^VA"!`
+M"```28N4)$`)``!(:<#0````2(N$$(@```!$#[9H".L)9F:00;W_____NO\`
+M``!F@7L@A0!W#T@/MT,@9D(/MI0@0`@``$2)Z0^VP4H/MJP@Q@@``$AI[:@`
+M``!*C:PEH`$```^WPDAIP(@!``!)B<9-`[0D&`D``&:!>SCA`74*#[9#.O_(
+M/`%V*6:!^O\`=`=!]D9#!'4;QD,D!D''!P````"X`0```.G6`@``9F:09F:0
+M20^V1D"H`70GJ`1T(T$/MD0D1$$Z1"1.<A9!QP<!````N`$```#II0(``&9F
+MD&:0387V#X37````20^V1D"H`0^$R@```*@$#X3"````2(G>3(GWZ`````"$
+MP'45QD,D!$''!P````"X`0```.E>`@``08!^>Q]V$4''!P$```"X`0```.E&
+M`@``]H.6`````70&]D4,`70;]H.6`````74&]D4,`74,@'LD@70&]D4,"'0A
+M00^V]4R)Y^@`````A,!T$4''!P$```"X`0```.G[`0``]H.6`````0^$;@$`
+M`/9%#`$/A&0!``!,B??H`````&:#^!\/AE(!``!!QP<!````N`$```#IP0$`
+M`)#V10H"="N+0S@E____`#WA`1``=!Q!#[9&>T$Z1GIR$4''!P$```"X`0``
+M`.F/`0``BT,X)?___P`]X0$0``^$_````$D/MT9B2(G"2-'J@^(!N0$```"`
+M>SCA#X7?````@'LY`0^%U0````^V0SJ#Z`:#^`D/AZT```")P/\DQ0`````/
+MMLFZ`0```$B)WDR)Y^@`````A,`/A:$```!!QP<"````N`$```#I$`$```^V
+MR;H`````2(G>3(GGZ`````"$P'5Y0<<'`@```+@!````Z>@````/MM*Y`0``
+M`$B)WDR)Y^@`````A,!U44''!P(```"X`0```.G`````#[;2N0````!(B=Y,
+MB>?H`````(3`=2E!QP<"````N`$```#IF````,9#)`1!QP<`````N`$```#I
+M@P```&9FD$F-O"18#P``Z`````"$P'0/0<<'`0```+@!````ZV&0@'LXX751
+M@'LY`75+@'LZ#W5%@'L]`74_9@^V<SS!Y@AF#[9#.P'&#[?V3(GGZ`````!(
+M.4-H#Y7"2(7`#Y3`"="H`702QD,D!$''!P````"X`0```.L)N`````!F9F:0
+M2(M<)`A(BVPD$$R+9"083(ML)"!,BW0D*$R+?"0P2(/$.,-F9F:09F:09F:0
+M9F:0N0````"Z#0```$B)\&9FD(@(2/_`2/_*=?8/MD<YB`8/MD<ZB$8!#[9'
+M.XA&`@^V1SR(1@,/MD<]B$8$#[9'/HA&!0^V1S^(1@;VAY8````$=",/MD=`
+MB$8(#[9'08A&"0^V1T*(1@H/MD=#B$8+#[9'1(A&#+@!````PV9F9I"Z````
+M`$&Y`````&9FD&:0N0<```!)8\%$#[8$,&9FD`'21(G`T_BH`705]\(````!
+M=1V!\G<GVP#K%69FD&:0B=`U=R?;`/?"`````0]%T/_)><Q!_\%!@_D'?K.)
+MT,'H$(@'B=#!Z`B(1P&(5P+#05=!5D%505154TB#[%A)B?Y(B?5(BX?P$```
+M2(E$)"!(QT0D$`````!!O`````!(QT0D"`````!!O0````!FQT8R_P](C50D
+M/.@`````A,!T"8M$)#SID`P``(M%."7___\`/>$!$``/A1(!``"_B!,``.@`
+M````9H%]((4`#X><````2`^W12!"@+PP0`@``/\/A(@```!F@WT@?W<B2@^V
+MA#!`"```28N6&`D``$AIP(@!``!(BT002`^V0`CK9&:!?2"!`'<G2`^W12!*
+M#[:$,$`(``!)BY9H"0``2&G`R`\``$B+1!`(#[9`".LU2`^W12!*#[:$,$`(
+M``!)BY9`"0``2&G`T````$B+A!"(````#[9`".L+9F:09F:0N/____\/ML!*
+M#[:$,,8(``!(:="H````2HV,,J`!``!(B4PD&$F+EF@)``!,C:(XN`\`9H%]
+M((4`#X>8`0``2`^W12!*#[:$,$`(``!(:<#(#P``3(TD`NEZ`0``9F:0N?\`
+M``!F@7T@A0!W#T@/MT4@9D(/MHPP0`@``&:!?3CA`74/#[9%.H/H$3P!#X;?
+M````9H%]((4`#X>6````2`^W12!"@+PP0`@``/\/A((```!F@WT@?W<B2@^V
+MA#!`"```28N6&`D``$AIP(@!``!(BT002`^V0`CK7F:!?2"!`'<G2`^W12!*
+M#[:$,$`(``!)BY9H"0``2&G`R`\``$B+1!`(#[9`".LO2`^W12!*#[:$,$`(
+M``!)BY9`"0``2&G`T````$B+A!"(````#[9`".L%N/____\/ML!*#[:$,,8(
+M``!(:=BH````2HV$,Z`!``!(B40D&`^WP4AIP(@!``!)`X88"0``2(E$)!#K
+M(@^WP4AIP-````!)`X9`"0``2(E$)`A(BY"(````2(E4)!AF@7TXX0%U&P^V
+M13J-4.^`^@$/E\+_R#P!#Y?`#[;2A=!T(&:!^?\`=`M(BTPD$/9!0P1U#L9%
+M)`:X`````.GT"0``2(UT)#!,B??H`````$&)QV:)13),B??H`````$B)P[@"
+M````2(7;#X3'"0``2(F=@````$$/M\](:<FP!```2`-,)"!(B<A)*X;P$```
+M2(G&20.V^!```$B#QB!(BT0D,(EP($B)\DC!ZB!(BT0D,(E0)$B+<QA(BT0D
+M,(EP*$B)\DC!ZB!(BT0D,(E0+$B+1"0P9D2)>`B^`````+JP!```2(G(9F9F
+MD$"(,$C_P$C_RG7U9H%]..$!=6H/MD4Z@^@1/`%W7TB-3"1`2(M$)#`/ME`(
+M2(GN2(M\)!#H`````$$/M\=(:<"P!```2`-$)"!)*X;P$```2(G&20.V^!``
+M`$B!QB`$``!(BT0D,(EP$$B)\DC!ZB!(BT0D,(E0%.F8`0``2(M$)!CV0`H!
+M=2V+13@E____`#WA`1``#X0%`0``2(M4)!!(#[9"0*@!#X3S````J`0/A.L`
+M``#VA98````@=`](C70D0$B)[^@`````ZQM(C4PD0$B+1"0P#[90"$B)[DB+
+M?"00Z`````!!#[?'2&G`L`0``$@#1"0@22N&\!```$B)QDD#MO@0``!(@<8@
+M!```2(M$)#")<!!(B?)(P>H@2(M$)#")4!1F@7TXX0%U#P^V13J#Z!$\`0^&
+MUP```$B+3"002`^V04"H`@^$Q0```*@$#X2]````J`$/A+4```!!#[?'2&G`
+ML`0``$@#1"0@22N&\!```$B)QDD#MO@0``!(BT0D,(EP&$B)\DC!ZB!(BT0D
+M,(E0'.M[9F:09F:02(M$)!CV0`H"=&I!#[?'2&G`L`0``$@#1"0@2(G"22N6
+M\!```$B)UDD#MO@0``!(BU0D,(ER&$B)\4C!Z2!(BU0D,(E*'$DKAO`0``!(
+MB<9)`[;X$```2('&(`0``$B+1"0PB7`02(GR2,'J($B+1"0PB5`42(M$)#"`
+M2`$"9@^V55E(BT0D,&:)4`*_`````(!]60!T+8GX2(T$0$C!X`)(B<9(`W,0
+M2(M-8$B+%`A(B1:+1`@(B48(_\</MD59.?AWTXM5-$B+1"0PB5`,9H%]..$!
+M=5$/MD4Z@^@1/`%W1D$/M\](BU0D,$B)[DB+?"08Z`````!(C4PD0$$/M]=(
+M:=*P!```2`-4)"!(B>Y(BWPD&.@`````2(M4)!B`8@S^Z6,%``!(BTPD&/9!
+M"@(/A-T$``!(BT0D,,9`!OY(BT0D,(!@!_Y(@WPD$``/A.T```!(BUPD$$@/
+MMD-`J`(/A-L```"H!`^$TP```*@!#X3+````00^WSTB+5"0P2(GN2(M\)!CH
+M`````/:%E@````%T$$B+1"0P#[=`",'@`XA$)$%(C4PD0$$/M]=(:=*P!```
+M2`-4)"!(B>Y(BWPD&.@`````]H66`````70+2(M$)!B`2`P!ZPE(BU0D&(!B
+M#/Y!#[?/2&G)L`0``$B+7"0@Q@09H4B+1"00#[:0X@```(/B#P^V1!D!@^#P
+M"="(1!D!2(M4)!`/MT(P_\`/MM#!X@@/ML0)T&:)1!D"3(ML)!!)@<7,````
+MZ:X#``!F@7TXX0$/A7@"```/MD4Z@_@/=`Z#^!`/A.(```#IBP,``&8/ME4\
+MP>((9@^V13L!PDB+1"0PQD`$#4B+1"0P@&`%_H!,)"\(2(MT)#`/MD4E00^V
+MCMX```#3X&8)1@A(BTPD,`^V00&#X!^#R""(00%!#[?/2&G)L`0``$B+7"0@
+M2(TT&4B+13Y(B88X!```#[;"P>`(#[;6"<)FB9091`0```^V13V(A!E"!```
+MQ@:12(M4)!`/MT(P_\`/MM#!X@@/ML0)T&:)1!D"2(M<)!`/MI/B````@^(/
+M2(M<)"`/MD09`8/@\`G0B$09`4R+;"0028'%S````.FN`@``2(M4)#`/MD4E
+M00^VCMX```#3X&8)0@A!#[?72&G2L`0``$B+1"0@Q@0"@6;'1`("__]!#[:,
+M)+L```"#X0](BUPD(`^V1!H!@^#P"<B(1!H!2(-]2`!U#L9%)"&X`````.D#
+M!```]D4[`70]2(-]4`!T-DR+;5!!#[??2&G;L`0``$F+OF@0``!,B>[H````
+M`(/@#TB+3"0@#[94"P&#XO`)PHA4"P'K`TV)Y;X$````2(M52`^V0@$]DP``
+M`'=VB<#_),4`````@\8$ZVB#Q@3K8X/&".M>@\8(9F:0ZU:#Q@CK48/&".M,
+M@\8(D.M&@\8(ZT&#QACK/(/&&)#K-H/&#.LQ@\8(ZRP/MG($C32U"````.L?
+M@<:(````D.L6@\8DZQ&#QB3K#(/&))#K!H'&B````(U6`\'J`DB+1"0PB%`$
+M2(M,)#!FP>H(@^(!#[9!!8/@_@G0B$$%00^W_TAI_[`$``!(BUPD($B-O!\@
+M!```B?)(BW5(Z`````#I*@$```^V13B#Z`0]JP```'<_B<#_),4`````#[9%
+M0,'@"`^V54&-#!"#^0UW&+@!````2-/@J=@^``!T"4B+1"0P@$@!!$B+1"0P
+M@$@!`>L)2(M$)#"`8`'[2(M$)##&0`0-2(M$)#"`8`7^2(M4)#`/MD4E00^V
+MCMX```#3X&8)0@A(BT0D,(!@`1]!#[??2&G;L`0``$B+1"0@QH0#(`0```9,
+MBVPD$$F!Q<P```!,C20#28V\)"$$``!,B>[H`````$F-O"0E!```3(GNZ```
+M``!(BT4X28F$)$0$``!(BT5`28F$)$P$``!!Q@0DD4B+3"00#[:1X@```(/B
+M#TB+3"0@#[9$"P&#X/`)T(A$"P%(BU0D$`^W0C#_P`^VT,'B"`^VQ`G09HE$
+M"P)-A>T/A)(```!!#[?'2&G`L`0``$F+50!(BTPD($B)5`@$ZW=(BUPD&/9#
+M"@%T;$$/M\](BU0D,$B)[DB)W^@`````]H66`````7002(M$)#`/MT`(P>`#
+MB$0D04B-3"1`00^WUTAITK`$``!(`U0D($B)[DB+?"08Z`````#VA98````!
+M=`M(BT0D&(!(#`'K"4B+5"08@&(,_D$/M]=)BX:0"0``2(DLT$2)^F;!Z@4/
+MM])$B?F#X1^X`0```$C3X$$)A):8"0``BT4X)?___P`]X0$0`'4O00^W]TB-
+M3"0LN@````!(BWPD&.@`````BT0D+"7___\?#0```$")1"0LZ:$```!F@7TX
+MX0%U-@^V13J#Z!$\`7<K2(MT)`A,B??H`````$B+3"0(#[914$$/M_=(C4PD
+M+$B+?"08Z`````#K8TB+="003(GWZ`````!(BUPD$`^V4VI!#[?W2(U,)"Q(
+MBWPD&.@`````2`^V0T"H`G0QJ`1T+:@!9I!T)XM$)"PE____'PT```!@B40D
+M+`^V4VJ#XG_!XA0E__\/^`G0B40D+$B-="0L3(GWZ`````"X`P```$B#Q%A;
+M74%<05U!7D%?PV9FD&9FD$B#["!(B5PD"$B);"003(ED)!B)\DB+'XGP9L'H
+M!0^WZ(M$JUQ!B=1!@^0?1(GA2-/XJ`%U.@^W]DB-3"0$N@````#H`````(%,
+M)`0```#@2(UT)`2`9@/W2(G?Z`````"X`0```$2)X4C3X`E$JUQ(BUPD"$B+
+M;"003(MD)!A(@\0@PV9F9I!F9F:09F9FD$B#["A(B5PD"$B);"003(ED)!A,
+MB6PD($F)_$B)]4B+1G!,BV@H9H%^((4`#X>N````2`^W1B"`O#A`"```_P^$
+MFP```&:#?B!_=RE(#[:$.$`(``!(BY<8"0``2&G`B`$``$B+1!!(2`^V0`A(
+M!<`(``#K<&:!?B"!`'<N2`^W1B!(#[:$.$`(``!(BY=H"0``2&G`R`\``$B+
+M1!`(2`^V0`A(!<`(``#K.D@/MT8@2`^VA#A`"```2(N70`D``$AIP-````!(
+MBX00B````$@/MD`(2`7`"```ZPEF9F:0N+\)``!)#[9<!`9(:=NH````2HV<
+M(Z`!``!(@WUX`'0/2(MU>$R)Y^@`````9F:02(GN3(GGZ`````!,B>Y(B=]!
+M_Y6@````2(M<)`A(BVPD$$R+9"083(ML)"!(@\0HPV9F9I!F9F:09F9FD&9F
+MD$B#[#A(B5PD"$B);"003(ED)!A,B6PD($R)="0H3(E\)#!)B?9)B?U,BS](
+MC5](2(G?Z`````!)B<1)@^PX3(G_Z`````!(B<5)C40D.$B+4PA(B4,(28E<
+M)#A(B5`(2(D"N`$```!(A>UT>4B-?5C&13CAQD4Y`<9%.A"`33L!28N&H```
+M`$B)16A(BT5P3(EP*$F-AI````!(B450QD4ES&9!#[9$)%MFB44@28M%`$B)
+M12C'1320````3(EU2$C'A:``````````O@````#H`````$B)[DR)_^@`````
+MN`````!(BUPD"$B+;"003(MD)!A,BVPD($R+="0H3(M\)#!(@\0XPV9F9I!F
+M9F:02(/L*$B)'"1(B6PD"$R)9"003(EL)!A,B70D($B)\TB)_4R+;TA-BV4`
+M#[=.,HG.9L'N!0^WQD&+1(1<@^$?2-/XJ`$/A68#``!)BQ0D#[?&C02%``,`
+M`(F"<`$``$F+!"2+@'0!``")!0````")PL9#)"&+0S@E____`#WA`0\`=2*^
+M`````$B)W^@`````N@````!(B=Y,B>?H`````.D+`P``B=`/MTLR@^$?2-/X
+MJ`%T&[X!````2(G?Z`````!,B>?H`````&9FD&9FD`^VA>````"#^`0/A]`"
+M``")P/\DQ0````#&A>`````!N@$```!(B=Y,B>_H`````.FK`@``QH7@````
+M`KH(````2(G>3(GOZ`````#ICP(``,:%X`````-(B>J^(0```$R)[^@`````
+M2(-]4`!T(`^V57E(BW500;@`````N0$```!,B>_H`````.E1`@``00^V=0VZ
+M`````$R)Y^@`````Z3H"``#&A>`````$2(-]4`!T,$B)ZKXA````3(GOZ```
+M```/ME5Y2(MU4$&X`````+D"````3(GOZ`````#I_`$``+H`````OB$```!,
+MB>_H`````$$/MG4-N@$```!,B>?H`````.G3`0``2(GJO@8```!,B>_H````
+M`$B#?3@`=!9(BT4XBT@$C5$!B5`$@_D%#X:F`0``QD5#`<9%0@"`?7L`=!A,
+MB>?H`````+\!````Z`````"`?7L`=>A(@WU0`'082(M5&$B+11!(B5`(2(D"
+M2(M%4/Y(6.L92(-]6`!T$DB+55A(#[9%>4C'1,)8`````$B+50A(BT4`2(E0
+M"$B)`D'^30Y(@[T8`0```'08#[:U!0$``$B+O1@!``"Z`0```.@`````2(-]
+M4`!T$@^V=7E(BWU0N@$```#H`````$B#?3@`#X2"````2(M%.$C'0&``````
+M0?Z$).\3``!,B>?H`````$B+13@/MG`!N@$```!,B>?H`````$B+13@/ME`"
+M#[9P`4C'QP````"X`````.@`````2(M5.$F+M"30"```OP$```#H`````$B+
+M53A)B[0DT`@``+\&````Z`````!(QT4X`````$B)[DR)Y^@`````08!]"?]T
+M6T&^`````$&`?0X`=CE)C5U@2(G?Z`````!(B<5(BT,(2(EK"$B)70!(B44(
+M2(DH@'U"_W4+0?_&13AU#G?3ZP9%.'4.=Q5!QD4)_TR)[DR)Y^@`````9F:0
+M9I!(BQPD2(ML)`A,BV0D$$R+;"083(MT)"!(@\0HPV9FD$B#[#A(B5PD"$B)
+M;"003(ED)!A,B6PD($R)="0H3(E\)#!(B?-(B?U,BV=(38LL)$&_`````$'V
+M1"0,$'0'QH?@````!@^VA>````"#^`$/A(L```"#^`%_"X7`=!YFD.G[`P``
+M@_@$#X2B````@_@&#X3Y`0``Z>0#``#&A>`````!2(GN3(GOZ`````#&0R2!
+M08!,)`P(2(.[@`````!T#TB-LX````!,B>_H`````$F-E>@```!)BX7H````
+M2(E8"$B)`TB)4PA)B9WH````3(GOZ`````#I@@,``&:008!D)`SW_H7C````
+MQH7@`````,9#)`)(B=Y,B>_H`````$R)[^@`````Z5$#``"0QH7C`````$B#
+M?3@`#X1.`0``2(M%.(M(!(U1`8E0!(/Y!0^'.`$``$&`9"0,]TB#NX``````
+M=`](C;.`````3(GOZ`````!)C97H````28N%Z````$B)6`A(B0-(B5,(28F=
+MZ````$&`3"0,$$B#?5``="`/ME5Y2(MU4$&X`````+D"````3(GGZ`````#I
+MO`(``,9$)`<`08!\)`X`#X:G````38UT)&!F9I!F9I!,B??H`````$B)PTF+
+M1@A)B5X(3(DS2(E#"$B)&$B#>S@`=!Q(BU,X28NUT`@``+\%````Z`````"`
+M2T0"9F:02(G:O@8```!,B>?H`````(![>P!T,D2)^$'_QSU_EI@`=R5,B>_H
+M`````+\!````Z`````"`>WL`=`U$B?A!_\<]?Y:8`';;_D0D!P^V1"0'03A$
+M)`X/AV3____&14(#2(GN3(GOZ`````#I\`$``$F-E>@```!)BX7H````2(E8
+M"$B)`TB)4PA)B9WH````2(-].`!T%DB+13B+2`2-40&)4`2#^04/AI8!``!(
+MQ\<`````N`````#H`````$B)ZKX&````3(GGZ`````!!_DPD#DB+50A(BT4`
+M2(E0"$B)`DB#?5``=!A(BT50_DA82(M5&$B+11!(B5`(2(D"ZQ](@WU8`'08
+M2(M56$@/MD5Y2,=$PE@`````9F:09F:0@'U[`'0R1(GX0?_'/7^6F`!W)4R)
+M[^@`````OP$```#H`````(!]>P!T#42)^$'_QSU_EI@`=MM(BU4(2(M%`$B)
+M4`A(B0)(@[T8`0```'0?#[:U!0$``$B+O1@!``"Z`0```.@`````9F9FD&9F
+MD$B#?5``=!D/MG5Y2(M]4+H!````Z`````!F9F:09F:02(-].`!T?TB+13A(
+MQT!@`````$'^A>\3``!,B>_H`````$B+13@/MG`!N@$```!,B>_H`````$B+
+M13@/ME`"#[9P`4C'QP````"X`````.@`````2(M5.$F+M=`(``"_`0```.@`
+M````2(M5.$F+M=`(``"_!@```.@`````2,=%.`````!(B>Y,B>_H`````.L0
+M2(GJO@(```!,B>?H`````$R)[^@`````9F:09I!(BUPD"$B+;"003(MD)!A,
+MBVPD($R+="0H3(M\)#!(@\0XPV9F9I!F9I!F9I!F9I!!5D%505154TB)\TF)
+M_$R+KX@```!)BVT`0?9%#!!T!,9'409!#[9$)%&#^`$/A(D```"#^`%_#87`
+M="!F9F:0Z7L#``"#^`0/A)H```"#^`4/A)<!``#I9`,``$'&1"11`4R)YDB)
+M[^@`````QD,D@4&`30P(2(.[@`````!T#TB-LX````!(B>_H`````$B-E>@`
+M``!(BX7H````2(E8"$B)`TB)4PA(B9WH````2(GOZ`````#I!`,``$&`90SW
+M0?Y$)%)!QD0D40#&0R0"2(G>2(GOZ`````!(B>_H`````.G8`@``08!E#/=(
+M@[N``````'0/2(VS@````$B)[^@`````2(V%Z````$B+E>@```!(B5H(2(D3
+M2(E#"$B)G>@```"Z`````+X&````3(GOZ`````!!#[9U#;H!````2(GOZ```
+M``!!O@````!!@'T.``^&?````$V-96"03(GGZ`````!(B<-)BT0D"$F)7"0(
+M3(DC2(E#"$B)&$B#>S@`=!I(BU,X2(NUT`@``+\%````Z`````"`2T0"D$B)
+MVKX&````3(GOZ`````"`>WL`=!A(B>_H`````+\!````Z`````"`>WL`=>A!
+M_\9%.'4.=XE!QD4)`$&`30P03(GOZ`````#IT@$``$&`90SW2(.[@`````!T
+M#TB-LX````!(B>_H`````$B-A>@```!(BY7H````2(E:"$B)$TB)0PA(B9WH
+M````28U%8$B)PDDY16`/A.$```!)B<9(B=?H`````$B)PTB#>#@`=!Y(BU`X
+M2(NUT`@``+\%````Z`````"`2T0"9F:09I!(B=J^!@```$R)[^@`````@'M[
+M`'082(GOZ`````"_`0```.@`````@'M[`'7H2(-[.`!T84B+0SA(QT!@````
+M`/Z%[Q,``$B)[^@`````2(M#.`^V<`&Z`0```$B)[^@`````2(M3.$B+M=`(
+M``"_`0```.@`````2(M3.$B+M=`(``"_!@```.@`````2,=#.`````!(B=Y(
+MB>_H`````$R)\DTY=6`/A2+___^Z`````+X&````3(GOZ`````!,B>9(B>_H
+M`````$G'14``````2(M%`(N06`$``(D5`````(72=`I(BT4`B9!8`0``0?9%
+M"@%T6$&^`````(!]0P!V&TD/ME4-2(G01(GQ2-/XJ`%U"4'_QD0X=4-WZD$/
+MMO9(B>_H`````$R)[DB)[^@`````1(GR#[;"2&O`:$C'A"A($@```````&9F
+M9I!;74%<05U!7L-F9F:09F:005=!5D%505154TB#[`A)B?Q,BW=(28L>2(G^
+M2(G?Z`````!!@+PDXP````%V"4'&A"3@````!$F-;"0@23EL)"`/A#D"``!(
+MB>_H`````$F)QTF+1"0@3(EX"$F)!TF);PA-B7PD($&]`````.G6`0``00^W
+MU4B+@Y`)``!(BRS02(7M#X2[`0``00^W1"0P9CM%(`^%JP$```^WBSH2``!(
+MBX-0$0``.0AT5&9F9I#_P0^W@SX2```YR+@`````#T;(C5$!2(N#4!$``(L$
+MD*D```@`=1XE_P\``&9!.<5U$TDY[W492(G?Z`````"0Z8L!``!(BX-0$0``
+M.0AUL$&`?E@`#X4Z`0``9H%]((4`#X<N`0``2`^W12"`O!A`"```_P^$&P$`
+M`$V%Y`^$``$``$D/MD0D0*@!#X3R````J`0/A.H```!(BQ,/MT4R9L'H!0^W
+MP(T$A0`#``")@G`!``!(BP,/MTTR@^$?N@$```!(B=9(T^:)L'0!``!(#[=-
+M,DB+@Y`)``!(QP3(``````^W33*)R&;!Z`4/M\"#X1](B=9(T^9(B?'WT2&,
+M@Y@)```/MTTRB<AFP>@%#[?`@^$?2-/B]](A5(-<3#G]=$E(BU4(2(M%`$B)
+M4`A(B0)(@[V``````'0/2(VU@````$B)W^@`````2(V3Z````$B+@^@```!(
+MB6@(2(E%`$B)50A(B:OH````#[=U,DB-NU@/``#H`````$'^3"1[ZQ)!]D8*
+M`G0+2(GN3(GGZ`````!!_\5F1#EK6`^''_[__TV%Y'0H20^V1"1`J`%T'J@$
+M=!I)BU<(28L'2(E0"$B)`DR)_DR)Y^@`````D$B#Q`A;74%<05U!7D%?PY!!
+M5D%505154TF)_$R+MX@```!)BQY(B?Y(B=_H`````$&`?"12`78&0<9$)%$$
+M28UL)"A).6PD*`^$\@$``$B)[^@`````28G%28M$)"A,B6@(28E%`$F);0A-
+MB6PD*+T`````Z9L!``!F9F:09F:0#[?52(N#D`D``$B+--!(A?8/A'L!``!!
+M#[=$)$!F.T8@#X5K`0``#[>+.A(``$B+@U`1```Y"'179F9FD&9FD/_!#[>#
+M/A(``#G(N``````/1LB-40%(BX-0$0``BP20J0``"`!U'B7_#P``9CG%=11)
+M.?5U&DB)W^@`````9I#I.P$``$B+@U`1```Y"'6P9H%^((4`#X?V````2`^W
+M1B"`O!A`"```_P^$XP```$&`?E@`#X78````0?9&"@$/A,T```!(BQ,/MT8R
+M9L'H!0^WP(T$A0`#``")@G`!``!(BP,/MTXR@^$?N@$```!(B==(T^>)N'0!
+M``!(#[=.,DB+@Y`)``!(QP3(``````^W3C*)R&;!Z`4/M\"#X1](B==(T^=(
+MB?GWT2&,@Y@)```/MTXRB<AFP>@%#[?`@^$?2-/B]](A5(-<3#GN="Y(BU8(
+M2(L&2(E0"$B)`DB-D^@```!(BX/H````2(EP"$B)!DB)5@A(B;/H````#[=V
+M,DB-NU@/``#H`````$'^3"1%_\5F.6M8#X=B_O__0?9&"@%T&TF+50A)BT4`
+M2(E0"$B)`DR)[DR)Y^@`````D%M=05Q!74%>PV9F9I!F9I!!5T%6055!5%53
+M2(/L"$B)_4&^`````$B-A^@```!(B<)(.8?H````#X33`0``28G'28G%28G4
+M2(G7Z`````!(B<-(@WAP`'4O2(GOZ`````!(B4-P2(7`=1Y(BX7H````2(E8
+M"$B)`TR)8PA(B9WH````Z8D!``"+0S@E____`#WA`1``#X3L````9H%[((``
+M#X3@````9@^V0R!FB4,@9H/X?W8:9H%[..$!=2D/MD,Z@^@1/`%W'F9F9I!F
+M9I!F@7L@A0!W#T@/MT,@@+PH0`@``/]U&<9#)`9(B=Y(B>_H`````.D&`0``
+M9F:09I!F@7LXX0%U"P^V0SJ#Z!$\`78O2(N5&`D``$R-LGB&`0!F@7L@A0!W
+M&4@/MT,@2`^VA"A`"```2&G`B`$``$R--`)F@7LXX0%U"@^V0SK_R#P!=C-F
+M@7L@@`!T*V:!>SCA`74+#[9#.H/H$3P!=AA!]D9#!'41QD,D!DB)WDB)[^@`
+M````ZWI(B=Y(B>_H`````(/X`G<+@_@!<R9F9F:0ZQ"#^`-T3V9FD&9FD&9F
+MD.M/2(G>2(GOZ`````!F9I#K/TB#NX``````=`](C;.`````2(GOZ`````!(
+MBX7H````2(E8"$B)`TR)>PA(B9WH````ZQM(B=Y(B>_H`````$R)ZDPYK>@`
+M```/A3/^__](@\0(6UU!7$%=05Y!7\-!5T%6055!5%532(/L2$F)_4"(="0P
+M2`^V5"0P2&O2:$@!^DR+LD@2``!(Q\#^____B?%(T\`B@FD2``"(1"0O3(L_
+MQT0D*`````!`@/X#=@U!QX=P`0``Q`$``.L+0<>'<`$``*@!``!!BX=T`0``
+MB04`````#[9,)#"#X0.[!P```-/CB<4)W4&)KW0!``"_Z`,``.@`````]],A
+MW4&)KW0!``"`?"0P`W8@#[9$)#!(P>`")?P#``!"BX0XT`$``(D%`````(G%
+MZQX/MD0D,$C!X`(E_`,``$*+A#C0`0``B04`````B<6#S0B`?"0P`W88#[9$
+M)#!(P>`")?P#``!"B:PXT`$``.L6#[9$)#!(P>`")?P#``!"B:PXT`$``(!\
+M)#`#=AP/MD0D,$C!X`,E^`<``$+'A#@``@``.````.L:#[9$)#!(P>`#)?@'
+M``!"QX0X``(``#@```"_$"<``.@`````@'PD,`-V'`^V1"0P2,'@`R7X!P``
+M0L>$.`0"````````ZQH/MD0D,$C!X`,E^`<``$+'A#@$`@```````$V%]@^$
+M[@<``$&\`````$&`?4,`=BUF9F:020^V1@U!#[;,2-/XJ`%T$+H!````B<Y,
+MB>_H`````)!!_\1%.&5#=]=!]D8*`71B3(GV3(GOZ``````/MG0D,$R)[^@`
+M````2`^V1"0P2&O`:$J-E"A@$@``BT(,J0``$`!T""7__^__B4(,3(GV3(GO
+MZ`````!(#[9$)#!(:\!H2L>$*$@2````````Z4L'``!!@'Y8`'0328N]:!``
+M`$R)]N@`````0?Y.6(!\)"\`#X2I`@``2,=$)"``````QD0D'P`/MG0D,$R)
+M[^@`````2`^V1"0P2&O`:$J-E"A@$@``BT(,J0``$`!T""7__^__B4(,#[9$
+M)"]!B$8-0;P`````08!]0P`/AI,!``!(#[94)"](B50D$`^VR(E,)`Q!#[;,
+M2(M$)!!(T_BH`0^$8`$``$2)X@^VPDAKP&@/ME0D+T*(E"AI$@``08#\`W87
+MC03-`````$B80L>$.``"```X````ZQE*C03E`````"7X!P``0L>$.``"```X
+M````OQ`G``#H`````$&`_`-V&TJ-!.4`````)?@'``"+3"0,0HF,.`0"``#K
+M&4J-!.4`````)?@'``"+5"0,0HF4.`0"``!!@/P#=@U!QX=P`0``Q`$``.L+
+M0<>'<`$``*@!``!!BX=T`0``B04`````1(GA@^$#NP<```#3XXG%"=U!B:]T
+M`0``O^@#``#H`````/?3(=U!B:]T`0``08#\`W8?2HT$I0`````E_`,``$*+
+MA#C0`0``B04`````B<7K'4J-!*4`````)?P#``!"BX0XT`$``(D%`````(G%
+M@\T(08#\`W872HT$I0`````E_`,``$*)K#C0`0``ZQ5*C02E`````"7\`P``
+M0HFL.-`!``!!_\1%.&5##X=__O__28U&2$B)PDDY1DAT-DB)TTB)U^@`````
+M2(U(R$B)3"0@2(M3"$B)0PA(B1A(B5`(2(D"2(-XV`!T"4B)VDDY7DAURDB#
+M?"0@`'1%2(M$)"#&0%H`0;P`````08!]0P!V+TD/MD8-1(GA2-/XJ`%T%T@/
+MMD0D'TB+5"0@1(AD$'#^0EK^1"0?0?_$13AE0W?1N@````"^@0```$R)]^@`
+M````2`^V1"0P2&O`:$K'A"A($@```````.EH`P``N@````"^!@```$R)]^@`
+M````#[9T)#!,B>_H`````$@/MD0D,$AKP&A*C90H8!(``(M"#*D``!``=`@E
+M___O_XE"#$F-1DA(B<)).49(#X3L`0``2(D$)$B)U^@`````3(U@R$B-4!!(
+M.5`0#X2Q`0``28U\)$CH`````$B-6/"`>T$-=1I(C;!(`0``2(M#2$B+`$B+
+M>"CH`````&9FD$B+4PA(BP-(B5`(2(D"@'M[`'083(GOZ`````"_`0```.@`
+M````@'M[`'7H2(-[.``/A"@!``!(BT,X2,=`8`````"`>WL`#X29````O0``
+M``!F08-]6``/A(@```!FD$ACU4F+A9`)``!(BS302(7V=&0/MT8@9CM#,'5:
+M9CV%`'=4#[?`0H"\*$`(``#_=$9)BU4`#[=&,F;!Z`4/M\"-!(4``P``B8)P
+M`0``28M%``^W3C*#X1^Z`0```$C3XHF0=`$``,9&)"&Z`````$R)[^@`````
+M_\5!#[=%6#GH#X]Z____]D-$!'4D0?Z%[Q,``$R)[^@`````2(M#.`^V<`&Z
+M`0```$R)[^@`````2(M#.`^V4`(/MG`!2,?'`````+@`````Z`````!(BU,X
+M28NUT`@``+\!````Z`````!(BU,X28NUT`@``+\&````Z`````!(QT,X````
+M`$'^3@Y!_DPD6$B)WDR)[^@`````28U$)$A).40D2`^%3_[__T'^3BA,B>9,
+MB>_H`````$B+%"1).59(#X48_O__28U&8$B)PDDY1F`/A/8```!(B<5(B=?H
+M`````$B)PX!X>P!T-HM$)"C_1"0H/7^6F`!W)TR)[^@`````OP$```#H````
+M`(![>P!T#XM$)"C_1"0H/7^6F`!VV4B#>S@`#X2%````2(M#.$C'0&``````
+M]D-$!'4D0?Z%[Q,``$R)[^@`````2(M#.`^V<`&Z`0```$R)[^@`````2(M#
+M.`^V4`(/MG`!2,?'`````+@`````Z`````!(BU,X28NUT`@``+\!````Z```
+M``!(BU,X28NUT`@``+\&````Z`````!(QT,X`````$'^3@Y(B=Y,B>_H````
+M`$B)ZDDY;F`/A0W___],B?9,B>_H`````$@/MD0D,$AKP&A*QX0H2!(`````
+M``!!O`````!!@'U#``^&!`$``$P/MG0D+Y!,B?)$B>%(T_I$.F0D,`^4P`G0
+MJ`$/A-4```!!@/P#=@U!QX=P`0``Q`$``.L+0<>'<`$``*@!``!!BX=T`0``
+MB04`````1(GA@^$#C0Q)NP<```#3XXG%"=U!B:]T`0``O^@#``#H`````/?3
+M(=U!B:]T`0``08#\`W8?2HT$I0`````E_`,``$*+A#C0`0``B04`````B<7K
+M'4J-!*4`````)?P#``!"BX0XT`$``(D%`````(G%@\T(08#\`W872HT$I0``
+M```E_`,``$*)K#C0`0``ZQA*C02E`````"7\`P``0HFL.-`!``!F9I!!_\1%
+M.&5##X<#____2(/$2%M=05Q!74%>05_#9F9FD$B#[`A,BP>Z`````$&`>$,`
+M=AP/ML)(:\!H2HV$`$`2``!(.?AT"/_"03A00W?D#[;"2&O`:$P!P$B+L$@2
+M``!(A?9T:_9&"@)T94@%0!(``$@Y1B!U68!^6`!T*/Y&6.M._D9800^VB;L`
+M``!)B[AH$```2<?``````$R)RN@`````ZRM(BU9(3(U*R$B-1DA(.<)T&DB)
+MPDF#>1``=,))BT$X3(U(R$@YT'7L9F:02(/$",-F9F:09F9FD&9FD$%50515
+M4TB#[`A!B?1)B?V[`````(GR#[;"2&O`:$B-%#A(BZI($@``2(7M#X2!`0``
+M2,?`_O___XGQ2-/`A$4-#X5L`0``2(U%2$@Y14AT$4B-ND`2``#H`````.G^
+M`@``0;P`````@'T.``^&[@(``$B-76!(B=_H`````$B)P4B+0PA(B4L(2(D9
+M2(E!"$B)"(!Y00`/A00!``!(#[=!,$F#O,5`!````'4+2(-Y.``/A-,```!(
+M#[=!,$F+A,5`!```2(.X@``````/A*$```#&@>``````2`^V04"H`G0MJ`1T
+M*:@!="7&04(%QD%#!`^V47E(BW%02(MY2.@`````Z9@```!F9F:09F:02`^V
+M04"H`G4GJ`1F9I!FD'0>J`%T&L9!0@/&04,$2(G.3(GOZ`````#K9F9FD&:0
+M2`^V04"H`G18J`1F9I!FD'1/J`%U2\9!0P;&04(%9L>!P```````2(G.3(GO
+MZ`````#K+4B+43A)B[70"```OP0```#H`````.L62`^W43!)B[70"```OP(`
+M``#H`````$'_Q$0X90X/A\C^___IK0$``&:!^_,!=V=*C02E`````$B)Q8'E
+M_`,``&9FD&:0OQ`G``#H`````$&`_`-V($F+10"+A"C0`0``B04`````J0``
+M$`!U*>L>9F:09F:028M%`(N$*-`!``")!0````"I```0`'4)_\-F@?OS`7:O
+M00^V]$R)[^@`````3(GOZ`````!$B>(/ML)(:\!H2HNL*$@2``!(A>T/A!`!
+M``"[`````$&`?4,`=BQF9F:02`^V10T/MLM(T_BH`701N@````")SDR)[^@`
+M````9I#_PT$X74-WV$2)X0^VP4AKP&A*C80H0!(``$B)12!(C45(2#E%2'4.
+M2(U%8$@Y16`/A(8```"^`````$&\`````$B-14A(B<)(.45(=#-FD$B)TTB)
+MU^@`````2(UPR$B+4PA(B4,(2(D82(E0"$B)`DB#>-@`=`E(B=I(.5U(=<](
+MA?9T6L9&6@"Y`````$&`?4,`=DI(#[9%#4C3^*@!=!!$B>(/ML*(3#!P_D9:
+M0?_$_\%!.$U#=]SK)/9%"@%T#4B)[DR)[^@`````ZQ&^`````$B)[^@`````
+M9F9FD$B#Q`A;74%<05W#9F:09I!(@^P(2(GX2(L_9L=`3B``2(G&Z`````!(
+M@\0(PV9FD%-(BP]$BT<PNP````"`>4,`=AL/ML-(:\!H2(V$"$`2``!(.?AT
+M!__#.%E#=^6`^P-V+4B-!)T`````)?P#``!(BQ&+A`+0`0``B04`````J0``
+M$`!U+>L[9F9FD&9FD$B-!)T`````)?P#``!(BQ&+A`+0`0``B04`````J0``
+M$`!T$`^V\T2)PDB)S^@`````ZPL/MO-(B<_H`````%O#9F9FD&9F9I!F9F:0
+M9F:02(N'P!```(L`B04`````2(N'P!```(M`!(D%`````$B+A\`0``"+0`B)
+M!0````!(BX?`$```BT`,B04`````PT%7059!54%455-(@^P8B70D%$F)_$&^
+M`````(!_0P`/ADD(``"+="0400^VUHU*"$B)\$C3^*@!=1&-2A!(B?!(T_BH
+M`0^$%0@``$&`_@-V)TJ-!/4`````)?@'``!)BQ0DBX0"@`$``(D%`````*D`
+M``@`=2?K0TJ-!/4`````)?@'``!)BQ0DBX0"@`$``(D%`````*D```@`=!Y,
+MB>?H`````$2)\@^VPDAKP&A"@8P@<!(`````"`!)BS0D1(GQ08#^`W8H2HT$
+M]0`````E^`<``(N$,(`!``")!0````")PH'B```!`.LF9F9FD$B-!,T`````
+M)?@'``"+A#"``0``B04`````B<*!X@```0"%TG11@/D#=AI(C03-`````"7X
+M!P``QX0P@`$``````0#K&$B-!,T`````)?@'``#'A#"``0`````!`(72=!9$
+MB?$/ML%(:\!H0H&,('`2``````$`08!\)%$!#X5M!@``08#^`W8G2HT$]0``
+M```E^`<``$F+%"2+A`*``0``B04`````J`%U*^DJ`0``2HT$]0`````E^`<`
+M`$F+%"2+A`*``0``B04`````J`$/A`0!``!$B?(/ML)(:\!H2HT<($B-LW@2
+M``!)BWPD*.@`````2(.[2!(````/A($```!,BZM($@``0;\`````08!]#@!V
+M9DF-;6!F9I!FD$B)[^@`````2(G#2(M%"$B)70A(B2M(B4,(2(D8]D-$`G4Q
+M2(-[.`!T&DB+4SA)B[0DT`@``+\%````Z`````"`2T0"2(G:O@8```!,B>_H
+M`````$'_QT4X?0YWH[H@H0<`ZR!!#[;VN@$```!,B>?H`````+^@A@$`Z```
+M``"Z`"TQ`42)\0^VP4AKP&A,`>!(C;!X$@``B9!X$@``2,=&$`````!(!4`2
+M``!(B48828M\)"CH`````$&`_@-V($J-!/4`````)?@'``!)BQ0DBX0"@`$`
+M`(D%`````.L>2HT$]0`````E^`<``$F+%"2+A`*``0``B04`````08#^`W8L
+M2HT$]0`````E^`<``$F+%"2+A`*``0``B04`````J8````!U,.G"````9I!*
+MC03U`````"7X!P``28L4)(N$`H`!``")!0````"I@`````^$EP```$&`_@-V
+M(DJ-!/4`````)?@'``!)BQ0DBX0"A`$``(D%`````(G&ZR!*C03U`````"7X
+M!P``28L4)(N$`H0!``")!0````")QD&`_@-V(DJ-!/4`````)?@'``!)BPPD
+MB?*!R@```0")E`&$`0``ZR=*C03U`````"7X!P``28L,)(GR@<H```$`B90!
+MA`$``&9F9I!F9I!!@/X#=BI*C03U`````"7X!P``28L4)(N$`H`!``")!0``
+M``"I```$`'4NZ48"``!*C03U`````"7X!P``28L4)(N$`H`!``")!0````"I
+M```$``^$'0(``$&`_@-V(DJ-!/4`````)?@'``!)BQ0DBX0"@`$``(D%````
+M`(G&ZR!*C03U`````"7X!P``28L4)(N$`H`!``")!0````")QH'.```$`$&`
+M_@-V&DJ-!/4`````)?@'``!)BQ0DB;0"@`$``.L82HT$]0`````E^`<``$F+
+M%"2)M`*``0``1(GR#[;"2&O`:$J#O"!($@````^%B````$&`_@-V(DJ-!/4`
+M````)?@'``!)BQ0DBX0"@`$``(D%`````(G!ZR!*C03U`````"7X!P``28L4
+M)(N$`H`!``")!0````")P4&`_@-V'4J-!/4`````)?@'``!)BQ0DB8P"@`$`
+M`.D+`P``2HT$]0`````E^`<``$F+%"2)C`*``0``Z>X"``!$B?$/ML%(:\!H
+M3HNL($@2``!)@WU```^$V0```$F+14!(#[=03O;&`0^%QP```$B)Q?;"`@^$
+MM0```$B-L)````!)BWPD*.@`````0;X`````@'T[`'9I1(GR#[;"2(M<Q5A(
+MA=MT4$B#>S@`=!I(BU,X28NT)-`(``"_!0```.@`````@$M$`DB)VKX&````
+M3(GOZ`````"`>WL`=!F03(GGZ`````"_`0```.@`````@'M[`'7H0?_&1#AU
+M.W>7QX60````(*$'`$C'A:``````````2(FMJ````$B-M9````!)BWPD*.@`
+M````ZP9F@4A.@`!!@/X#=BA*C03U`````"7X!P``28L4)(N$`H`!``")!0``
+M``#VQ`%U+.D\`0``2HT$]0`````E^`<``$F+%"2+A`*``0``B04`````]L0!
+M#X05`0``08#^`W8G2HT$]0`````E^`<``$F+%"2+A`*``0``B04`````J`%T
+M*^GH````2HT$]0`````E^`<``$F+%"2+A`*``0``B04`````J`$/A<(```!$
+MB?%$#[;I36OM:$^-K"5`$@``28-]"``/A*0```!)BT4(2(E$)`A)C74X28M\
+M)"CH`````$&_`````$B+5"0(@'H.`'932(G52(/%8$B)[^@`````2(G#2(M%
+M"$B)70A(B2M(B4,(2(D82(-[.`!T&DB+4SA)B[0DT`@``+\%````Z`````"`
+M2T0"0?_'2(M,)`A$.'D.=[1!QT4X@(0>`$G'14@`````38EM4$F-=3A)BWPD
+M*.@`````9F9FD&9FD$&`_@-V(DJ-!/4`````)?@'``!)BQ0DBX0"@`$``(D%
+M`````(G!ZR!*C03U`````"7X!P``28L4)(N$`H`!``")!0````")P4&`_@-V
+M&DJ-!/4`````)?@'``!)BQ0DB8P"@`$``.L82HT$]0`````E^`<``$F+%"2)
+MC`*``0``0?_&13AT)$,/A[?W__](@\086UU!7$%=05Y!7\-F9I!!5T%6055!
+M5%532(/L&$B)_4F)]4B+EQ@)``!,C:)XA@$`9H%^((4`=QE(#[=&($@/MH0X
+M0`@``$AIP(@!``!,C20"00^V1"1JP>`(2)A(BY7`$```BX0"0`@``(D%````
+M`$&)QD'![A!!B<=!P>\800^V1"1JP>`(2)A(BY7`$```BX0"1`@``(D%````
+M`(A$)!!(C70D$(G"P>H(B%8!P>@0B$8"00^V1"1JP>`(2)A(BY7`$```BX0"
+M2`@``(D%`````(A&`XG"P>H(B%8$P>@0B$8%QD8&`,9&!P"+3"0000^VUT$/
+MMMY$BT8$B=Y(Q\<`````N`````#H`````$6$]@^5P(/S`878=!)!QD4D`+@`
+M````Z;,"``!F9I!!@'TD@74I00^VUT$/MO9(C4PD$$R)[^@`````0<9%)`*X
+M`````.F%`@``9F:09I!!BT4X)?___P`]X0$.`'400<9%)"&X`````.EA`@``
+MD$'VA98````!=19!]L8!=!!!@'PD0O\/A2<"``!F9F:03(GF2(GOZ`````!,
+MB>9(B>_H`````$B+50!!#[=%,F;!Z`4/M\"-!(4``P``B8)P`0``2(M%`$$/
+MMTTR@^$?N@$```!(B=-(T^.)F'0!``!)#[=-,DB+A9`)``!(QP3(`````$$/
+MMTTRB<AFP>@%#[?`@^$?2(G32-/C2(G9]]$AC(68"0``00^W33*)R&;!Z`4/
+MM\"#X1](T^+WTB%4A5Q)BU4(28M%`$B)4`A(B0)!#[=U,DB-O5@/``#H````
+M`$'^3"1[0<9%)(%)@[V``````'0/28VU@````$B)[^@`````28U$)"!(B<))
+M.40D(`^$!@$``$&^`0```$B-A>@```!(B40D"$F)UV9F9I!(B=?H`````$B)
+MPTB+50`/MT`R9L'H!0^WP(T$A0`#``")@G`!``!(BT4`#[=+,H/A'TR)\DC3
+MXHF0=`$``$@/MU,R2(N%D`D``$C'!-``````#[=+,HG(9L'H!0^WP(/A'TR)
+M\DC3XDB)T??1(8R%F`D```^W2S*)R&;!Z`4/M\"#X1],B?)(T^)(B='WT2%,
+MA5P/MW,R2(V]6`\``.@`````0?Y,)'M(@[N``````'0/2(VS@````$B)[^@`
+M````2(N%Z````$B)6`A(B0-(BT0D"$B)0PA(B9WH````3(GZ33E\)"`/A1/_
+M__]!@:64````___^_T'&A"3@````!$R)[DR)Y^@`````N`$```#K'4$/MM=!
+M#[;V2(U,)!!,B>_H`````+@`````9F:02(/$&%M=05Q!74%>05_#D$B#[$A(
+MB5PD&$B);"0@3(ED)"A,B6PD,$R)="0X3(E\)$!(B50D$(GU2(L?3(NS\!``
+M`$&]`````$B%T@^$!0,```^WUDAIPK`$``!"]D0P(0)T$4B+@Y`)``!(BP30
+MQD`D`NL2#[?&2(N3D`D``$B+!,+&0"0A#[?%2(N3D`D``$B+%,*+0C@E____
+M`#WA`1``#X2X`0``N/____]F@7H@A0!W#4@/MT(@#[:$&$`(```\_W4:#[?%
+M2(N3D`D``$B+!,+&0"0&Z3,)``!F9I`/ML!(:<"(`0``28G%3`.K&`D``(!\
+M)!,`>6])#[9%0*@"="RH!'0HJ`%T)$B+`XN`6`$``(D%`````(G"A<!T#TB+
+M`XF06`$``&9FD&9FD$B+`XN`4`$``(D%`````(G"@\H"2(L#B9!0`0``2(L#
+MBX`$`0``B04`````B<*`SO](BP.)D`0!```/M\5(:<"P!```9D+W1#`@`@@/
+MA-X```!!N`````"^`````(![0P!V?$&Y`0```&9F9I!F9I!(#[9'#4`/MLY(
+MT_BH`7170(#^`W8BC02-`````$B82(L3BX0"T`$``(D%`````*D``!``=2;K
+M+TB-!+4`````)?P#``!(BQ.+A`+0`0``B04`````J0``$`!T"TR)R(GQ2-/@
+M00G`_\9`.'-#=Y%%A,!T3$0X1PUU1HGH9L'H!0^WP(M$@UR)Z8/A'TC3^*@!
+M=2U!@+W@`````G<(0<:%X`````,/M\5(BY.0"0``2(LTPDR)[^@`````Z;`'
+M``#V1"03`0^$I0<```^WQ4B+DY`)``!(BSS"QD<D(8M'."7___\`/>$!#@`/
+MA(`'``!!#[9%:L'@"$B82(N3P!```(N$`D`(``")!0````")QL'N$$&)P$'!
+MZ!A!#[9%:L'@"$B82(N3P!```(N$`D0(``")!0````"(1"0(2(U,)`B)PL'J
+M"(A1`<'H$(A!`D$/MD5JP>`(2)A(BY/`$```BX0"2`@``(D%`````(A!`XG"
+MP>H(B%$$P>@0B$$%QD$&`,9!!P#VAY8````!=1A`#[;V0/;&`70.00^VT.@`
+M````Z<D&``!(B?Y(B=_H`````.FY!@``#[?62(N#D`D``$B+!-!F@7@XX0$/
+MA2\!```/MD@Z@_D0#X>2!@``N`$```!(T^"IP#````^%\@```*D`@```=0VI
+M```!`'5?D.EK!@``#[?62(N#D`D``$B+#-!,:<*P!```0P^V1#`SB$$D2(N#
+MD`D``$B+!-#V0",$#X0X!@``@'@D``^$+@8``$B#>%``#X0C!@``2(M04$,/
+MMD0P,X@"Z1(&```/M]9(:=*P!```1`^WYDB+@Y`)``!*BPS@0@^V1#(JB$$D
+M2(N#D`D``$J+!.!(@WA(``^$V@4``$(/MKPR(00``.@`````B<)(BX.0"0``
+M2HL$X#M0-'8#BU`T#[?U2(N#D`D``$B+!/!(BWA(B=)(:?:P!```2HUT-BCH
+M`````.F-!0``#[?&2(N3D`D``$B+!,+&0"0`Z78%``!F9I!F9I`/M]9(BX.0
+M"0``3(LDT$V+?"1HN/____]F08%\)""%`'<.20^W1"0@#[:$&$`(```/ML!(
+M:<"(`0``28G%3`.K&`D``$'&A>``````20^V14"H`@^$EP$``*@$#X2/`0``
+MJ`$/A(<!``!!QD0D)`!!BY0DE````$C!ZA5-A?\/E<`/ML"%P@^$Y`0``$'V
+MAZD````"#X2=````28._H`````!T&$F+OZ````!!BU0D-$F+="1(Z`````#K
+M>TF#?"1(`'1S0;X`````28._L`````!T$T'VAZD````!=0E-B[>P````ZR%(
+MB[,@"@``N@$```!,B?]!_Y>X````A<!T!TR+LR`*``!!@WPD-`!T)TF+;"1(
+M28M^"$&+%DB)[N@`````08L&2`'%28U&!$F#QA"#.`!TWD$/MD5JP>`(2)A(
+MBY/`$```BX0"0`@``(D%`````(G"P>H008B7FP```,'H&&9!B8>0````00^V
+M16K!X`A(F$B+D\`0``"+E`)$"```B14`````9@^VPF9!B8>4````#[;&9D&)
+MAY8```")T,'H$&8/ML!F08F'F````,'J&$&(EYH```!!#[9%:L'@"$B82(N3
+MP!```(N$`DP(``")!0````!F#[;`9D&)AY(```#IA0,``&9FD&:0#[?52&G*
+ML`0``$(/MD0Q,X3`#X6_````2(N#D`D``$B+!-#&0"0`08N4))0```!(P>H4
+M387_#Y7`#[;`A<(/A#P#``!"#[9$,3-!B(>2````00^VAZD```"H`@^$'P,`
+M`+T`````28._L`````!T#:@!=0E)BZ^P````ZR%(B[,@"@``N@$```!,B?]!
+M_Y>X````A<!T!TB+JR`*``!!@WPD-``/A-8"``!)BUPD2)!(BWT(BU4`2(G>
+MZ`````"+10!(`<-(C44$2(/%$(,X`'3>Z:D"```\`@^%6`(```^W_4AI_[`$
+M``!*C7PW0+Y_````0"(WQD0D`P#&1"0"`,9$)`$`#[?%2&G`L`0``$*+1#`X
+MB40D!$B-3"0$#[94)`3!XA@/MD$!P>`0"<(/MD$"P>`("<(/MD$#08G500G%
+M0(#^<78P08/]`78+#[9'`8/@#XA$)`-!@_T"=@@/MD\"B$PD`D&#_0-V30^V
+M?P-`B'PD`>M"08/]`G8+#[9'`H/@#XA$)`-!@_T'=BL/MD<'@\`(03G%1`]'
+MZ$&#_0QV"`^V3PR(3"0"08/]#78)#[9_#4"(?"0!#[?U2(N#D`D``$B+#/"`
+M>3``#Y7`187M#Y7"#[;`A<)T2<9!)"!(BX.0"0``2(L$\$0X:#!S!40/MF@P
+M#[?-2(N#D`D``$B+!,A(@WA0`'0L2(MX4$2)ZDAI\;`$``!*C70V0.@`````
+MZQ(/M\5(BY.0"0``2(L$PL9`)"*`?"0#!'42#[?%2(N3D`D``$B+!,+&0"0"
+M23E<)"@/E<!-A?\/E<(/ML"%P@^$&`$``$'VA"26````$'13#[?%2&G`L`0`
+M`$(/MD0P,T&(AY(```!!]H>I`````G0R1(GH13AL)#!S!D$/MD0D,(3`=!Y)
+MB[^@````#[;0#[?U2&GVL`0``$J-=#9`Z``````/MD0D`X/X"W==B<#_),4`
+M````0<:'J@````'IF@```(!\)`($#Y3`@'PD`0(/E,(/ML`AT(/X`1G`@^#Q
+M@\`108B'J@```.MQ0<:'J@```!#K9T'&AZH````+ZUU!QH>J````!NM30<:'
+MJ@````WK23PH=1]!#[9%>__(08A%>@^WU4B+@Y`)``!(BP30QD`D@>LF/`AU
+M"K\0)P``Z``````/M\5(BY.0"0``2(L$PL9`)"%F9I!F9I!(BUPD&$B+;"0@
+M3(MD)"A,BVPD,$R+="0X3(M\)$!(@\1(PV9F9I!F9I!F9I!F9I!54TB#[`A(
+MB?M(B?U(BP>+@%`!``")!0````")QDB+!XFP4`$``/?&`/__`'0(2(GOZ#KI
+M__](BP.+@%`!``")!0````")QDB+`XFP4`$``/?&`/__`'7.N`````!(@\0(
+M6UW#9F9FD&9F9I!F9F:005=!5D%505154TB#[$A(B?U(B7PD.$0/MZ<Z$@``
+M2(L'BX!``0``B04`````9B7_#V:)ASH2``"X`````&9$.:<Z$@``#X0L!P``
+M9H&_.A(``/\/#X2J!@``9D0YISH2```/A)P&``!(C8?H````2(E$)!A(C9?X
+M````2(E4)!!(B50D"$B)%"1F9F:09F:02(N-\!```$'_Q&9$.:4^$@``N```
+M``!$#T;@00^WU$B+A5`1``"+=)`$]\8```@`#X2A````2(M%`(N`4`$``(D%
+M`````(G"2(M%`(F04`$``+L`````]\(`__\`=%&^`````(!]0P!T1HG79D0/
+MMD5##[?6C4H(2(GX2-/XJ`%U#8U*$$B)^$C3^*@!=!0/M\9(:<"H````2(V<
+M**`!``#K#?_&9D$Y\'?'9F:09I!(A=MU$$B+?"0XZ`````"0Z:$%``!(BWPD
+M..@`````B$,/Z8\%``!!B?5F08'E_P]!#[?%2&G0L`0``$B+?`H@2(N5D`D`
+M`$R+-,)-A?8/A&(%``#WQ@``(``/A)$!``!!@'XD@0^%90$``$'&1B0A20^W
+M5C)(BX60"0``2,<$T`````!!#[=.,HG(9L'H!0^WP(/A'[H!````2-/B2(G1
+M]]$AC(68"0``00^W3C*)R&;!Z`4/M\"#X1^Z`0```$C3XDB)T??1(4R%7$$/
+MMW8R2(V]6`\``.@`````28.^@`````!T#TF-MH````!(B>_H`````&9!@7X@
+MA0`/A\X```!)#[=&(("\*$`(``#_#X2[````9D&#?B!_=R=(#[:$*$`(``!(
+MBY48"0``2&G`B`$``$B+1!!(@'@(_W5AZ8P```!F08%^(($`=RE)#[=&($@/
+MMH0H0`@``$B+E6@)``!(:<#(#P``2(M$$`B`>`C_=2SK6DD/MT8@2`^VA"A`
+M"```2(N50`D``$AIP-````!(BX00B````(!X"/]T,$R)]DB)[^@`````2(N%
+MZ````$R)<`A)B09(BTPD&$F)3@A,B;7H````Z>@#``!FD$F-1A!(BTPD$$B+
+M40A(B4$(28E.$$B)4`A(B0+IQ0,``$2)Z&;!Z`4/M\"+1(5<1(GI@^$?2-/X
+MJ`$/A:8#``!!#[?52(N%D`D``$B+!-!F@7@@A0`/A[,```!(#[=0(("\*D`(
+M``#_#X2@````9H-X(']W(D@/MH0J0`@``$B+E1@)``!(:<"(`0``2(M$$$@/
+MME`(ZWQ!#[?52(N%D`D``$B+!-!F@7@@@0!W)T@/MT`@2`^VA"A`"```2(N5
+M:`D``$AIP,@/``!(BT00"`^V4`CK/D$/M]5(BX60"0``2(L$T$@/MT`@2`^V
+MA"A`"```2(N50`D``$AIP-````!(BX00B`````^V4`CK!;K_____@/K_=`T/
+MML*`O"C&"```_W5&1(GH9L'H!0^WP(M$A5Q$B>F#X1](T_BH`0^%H@(``$'&
+M1B0&O@````!,B??H`````+H`````3(GV2(GOZ`````#I>P(```^VPD@/MIPH
+MQ@@``$AIVZ@```!(C9PKH`$``$B%_W0(]\8```(`=06_`````/9#"@(/A($!
+M``!!#[?U2(GZ2(G?Z`````!$B>AFP>@%#[?`BT2%7$2)Z8/A'TC3^*@!#X46
+M`@``08!^)($/A9$```!)#[=6,DB+A9`)``!(QP30`````$$/MTXRB<AFP>@%
+M#[?`@^$?N@$```!(T^)(B='WT2&,A9@)``!!#[=V,DB-O5@/``#H`````$R)
+M]DB)[^@`````28.^@`````!T#TF-MH````!(B>_H`````$B+A>@```!,B7`(
+M28D&2(M,)!A)B4X(3(FUZ````.EZ`0``0;\`````QD0D(`!(BX7X````2#E$
+M)!!T$DB-E?@```!!_\=(BP!(.<)U]46$_W0\2(M<)`A(B=_H`````$B-2/!(
+MBU,(2(E#"$B)&$B)4`A(B0),.?&X`0````^V5"0@#T30B%0D($'^SW7)@'PD
+M(``/A0,!``!)C4802(M,)!!(BU$(2(E!"$F)3A!(B5`(2(D"1(GH9L'H!0^W
+MP$2)Z8/A'[H!````2-/B"92%G````.G#````00^W]4B)^DB)W^@`````0;\`
+M````QD0D(`!(BX7X````2#E$)!!T$DB-E?@```!!_\=(BP!(.<)U]46$_W0[
+M2(L<)$B)W^@`````2(U(\$B+4PA(B4,(2(D82(E0"$B)`DPY\;@!````#[9,
+M)"`/1,B(3"0@0?[/=<F`?"0@`'5"08!^)(%T.TF-1A!(BTPD$$B+40A(B4$(
+M28E.$$B)4`A(B0)$B>AFP>@%#[?`1(GI@^$?N@$```!(T^()E(6<````9D0Y
+MI3H2```/A8SY__](C87X````2(G"2#F%^````'130;P!````9F:02(G32(G7
+MZ`````!(C7#P#[=.,HG(9L'H!0^WP(/A'TR)XDC3XDB)T??1(8R%G````+H`
+M````2(GOZ`````!(B=I(.9WX````=;9(B>_H`````+@!````2(/$2%M=05Q!
+M74%>05_#9F9FD&9FD&9FD$B#["A(B5PD"$B);"003(ED)!A,B6PD(&;'1"0&
+M``!(BZ_0"```0;P`````3(UL)`9(BT4`BX!0`0``B04`````2(M5`(F"4`$`
+M`(7`="%(BT4`QX!0`0```0```$ECW$B)[^@`````08A$'0!F9I!(@<4`%```
+M0?_$08/\`7ZQ@'PD!@!U#+@`````@'PD!P!T!;@!````2(M<)`A(BVPD$$R+
+M9"083(ML)"!(@\0HPV9F9I!F9F:09F9FD&9FD$%7059!54%455-(@^P(2(G]
+M28GUN0````!F#[9'0XG&9H/X`'8;20^V50UF9I!FD$B)T$C3^*@!=0?_P68Y
+MSG?O28-]0`!T($F+=4!(@<:0````2(M]*.@`````28MU0$B)[^@`````28U%
+M8$B)PDDY16`/A&<!``!)B<9F9F:02(G7Z`````!(B<-(@W@X``^$+@$``(!X
+M>P`/A*````!!O`````!F@WU8``^$CP```$&_`0```$ECU$B+A9`)``!(BS30
+M2(7V=&8/MT8@9CM#,'5<9CV%`'=6#[?`@+PH0`@``/]T24B+50`/MT8R9L'H
+M!0^WP(T$A0`#``")@G`!``!(BT4`#[=.,H/A'TR)^DC3XHF0=`$``,9&)"&Z
+M`````$B)[^@`````9F:09I!!_\0/MT581#G@#X]W____2(M#.$C'0&``````
+M]D-$!'4C_H7O$P``2(GOZ`````!(BT,X#[9P`;H!````2(GOZ`````!(BT,X
+M#[90`@^V<`%(Q\<`````N`````#H`````$B+4SA(B[70"```OP$```#H````
+M`$B+4SA(B[70"```OP8```#H`````$C'0S@`````0?Y-#DB)WDB)[^@`````
+M3(GR33EU8`^%H/[__TG'14``````2(M%`(N(6`$``(D-`````(7)=`I(BT4`
+MB8A8`0``2(/$"%M=05Q!74%>05_#9F9FD&9F9I!F9I!!5%532(G]28GTNP``
+M``"`?T,`=AY(#[96#69FD&9FD$B)T(G92-/XJ`%U!__#.%U#=^U!]D0D#`)U
+M#$F-1"1@23E$)&!U:4R)Y^@`````A,!T4$B)[^@`````2(G&2(7`=$U)C40D
+M8$B+4`A(B7`(2(D&2(E6"$B),D'^1"0.3(EF2,9&0`7&1D$`QD9Y#[D!````
+MN@$```!,B>?H`````.L-#[;S2(GOZ`````!FD%M=05S#9F9FD&9F9I!F9I!(
+M@^PH2(D<)$B);"0(3(ED)!!,B6PD&$R)="0@28G]28GT3(NVB`````^V5D=(
+MB?Y,B??H`````$B)Q69!@TPD3A"[`````&9!#[9%0XG&9H/X`'8>20^V5@UF
+M9I!F9I!(B=")V4C3^*@!=0?_PV8YWG?M9H/[`W8G2(T$G0`````E_/\#`$F+
+M50"+A`+0`0``B04`````J0``$`!U-^LE2(T$G0`````E_/\#`$F+50"+A`+0
+M`0``B04`````J0``$`!U$`^V\TR)[^@`````Z9L!``!)C49@23E&8`^$C0$`
+M`$B%[0^$A`$``$@/MD5Y2<=$Q%@`````2(M5"$B+10!(B5`(2(D"2(GJO@8`
+M``!,B??H`````(!]>P!T&9!,B>_H`````+\!````Z`````"`?7L`=>A(@WTX
+M`'132(M%.$C'0&``````]D5$!'4/0?Z%[Q,``$R)[^@`````2(M5.$F+M=`(
+M``"_`0```.@`````2(M5.$F+M=`(``"_!@```.@`````2,=%.`````!!_DX.
+M2(GN3(GOZ`````!)BT4`BY!8`0``B14`````A=)T"DF+10")D%@!``!!QD0D
+M0@!F08-D)$[ONP````!!@'PD.P!T(69!#[94)#L/M\-)BVS$6$B%[70&@'U"
+M_W5]_\-F.=IWYD'V1"1.@'0-3(GF3(GOZ`````#K8;L`````08!\)#L`=$)F
+M9F:0#[?#28MLQ%A(A>UT(_9%1`)T'4B+53A)B[70"```OP8```#H`````(!E
+M1/UF9F:0_\-F00^V1"0[9CG8=\)F0<=$)$X"`$&`9"1)_69F9I!(BQPD2(ML
+M)`A,BV0D$$R+;"083(MT)"!(@\0HPV9FD$B#[`A(BX:(````N0````"`?T,`
+M=AM(#[90#69FD&:02(G02-/XJ`%U!__!.$]#=^_&1D(,Z`````!(@\0(PY!!
+M54%455-(@^P(28G\B?6[`````$B-!*T`````28G%08'E_`,``+\0)P``Z```
+M``!`@/T#=AM)BP0D0HN$*-`!``")!0````"I```0`'4DZQE)BP0D0HN$*-`!
+M``")!0````"I```0`'4)_\-F@?OS`7:S0`^V]4R)Y^@`````3(GGZ`````")
+MZ@^VPDAKP&A,`>#V@&@2```!=`](B[!($@``3(GGZ`````!(@\0(6UU!7$%=
+MPV9F9I!F9I!F9I!(@^PH2(E<)`A(B6PD$$R)9"083(EL)"!(B10D3(LG#[?V
+M28N$))`)``!(BQSP0;T`````O0````!F@7LXX0%U'P^V0SJ#Z!$\`7<42(MO
+M0$B%TG5*QD51`.M$9F:09I!)BY0D&`D``$R-JGB&`0!F@7L@A0!W&4@/MT,@
+M2@^VA"!`"```2&G`B`$``$R-+`)(@SPD`'4(0<:%X`````"`>R2!=0N`9PSW
+M9F9FD&9FD$B#/"0`#X7[````QD,D`/:#E@```"`/A!8"``!(BVMH2(7M#X0)
+M`@``]H6I`````G0D2(.]H`````!T&DB#>T@`=!-(B[V@````BU,T2(MS2.@`
+M````00^V16K!X`A(F$F+E"3`$```BX0"0`@``(D%`````(G"P>H0B)6;````
+MP>@89HF%D````$$/MD5JP>`(2)A)BY0DP!```(N4`D0(``")%0````!F#[;"
+M9HF%E`````^VQF:)A98```")T,'H$&8/ML!FB868````P>H8B)6:````00^V
+M16K!X`A(F$F+E"3`$```BX0"3`@``(D%`````&8/ML!FB862````Z2P!``"`
+M>R2`=03&0R0A2(LT)$C'QP````"X`````.@`````9H%[..$!=1@/MD,Z@^@1
+M/`%W#4B)[^@`````Z>T```#V1"0#`71YBT,X)?___P`]X0$.`'1J00^V16K!
+MX`A(F$F+E"3`$```BX0"0`@``(D%`````$$/MD5JP>`(2)A)BY0DP!```(N$
+M`D0(``")!0````!!#[9%:L'@"$B828N4),`0``"+A`)("```B04`````2(G>
+M3(GGZ`````#K;8!\)`,`>21)BP0DBX!8`0``B04`````B<&%P'1028L$)(F(
+M6`$``.M$9I"`/"0`>#R`?"0'`'DU28L4)`^W0S)FP>@%#[?`C02%``,``(F"
+M<`$``$F+%"0/MTLR@^$?N`$```!(T^")@G0!``!(BUPD"$B+;"003(MD)!A,
+MBVPD($B#Q"C#D)"0D)!(@^PH2(E<)`A(B6PD$$R)9"083(EL)"!(B?-)B?Q$
+M#[9N)$B+EQ@)``!(C:IXA@$`9H%^((4`=QE(#[=&($@/MH0X0`@``$AIP(@!
+M``!(C2P"183M=2!FQX7```````"`>S@<=1&`>SH"=0M(B=Y(B>_H`````$B#
+M>W@`=!)(C7-X3(GGZ`````!F9I!F9I!(B=Y,B>?H`````$&`_09T/4B-G5@!
+M``!)BWPD*$B)WN@`````QX58`0``@(0>`$C'A6@!````````2(FM<`$``$F+
+M?"0H2(G>Z`````!(BUPD"$B+;"003(MD)!A,BVPD($B#Q"C#9F:09F:09F:0
+M2(/L*$B)'"1(B6PD"$R)9"003(EL)!A,B70D($B)_4B%_P^$PP```$B+1TA,
+MBRA,B>_H`````$B)PTR-<%A(A<`/A*0```!,B>_H`````$F)Q$B%P'402(G>
+M3(GOZ`````#IA````,9#):P/MT4P9HE#($R):RC'@Y0````(````3(EC>$F+
+M1"002(E#2,=#-``(``!(C87D````2(E#4,9#,"!(QX.@`````````,9#.!S&
+M0SD!QD,Z`L9#.PC&0SP`O@````!,B??H`````(M3-$F+="083(GWZ`````!(
+MB=Y,B>_H`````$B+'"1(BVPD"$R+9"003(ML)!A,BW0D($B#Q"C#9F9FD&9F
+M9I!!5T%6055!5%532(/L"$F)_TF)]4&)UDB+1TA(BRA!O`````!$B>(/ML(/
+MMH0H0`@``#S_=$L/ML!(:=B(`0``2(G?2`.]&`D``$B!Q\P```"Z"````$F-
+M=0SH`````(3`=!Y(BX48"0``1(BT`P8!``!(BX48"0``3(F\`Q@!``!!_L1Y
+MGDB#Q`A;74%<05U!7D%?PV9F9I!F9F:09F:02(/L2$B)7"082(EL)"!,B60D
+M*$R);"0P3(ET)#A,B7PD0$B)?"003(MV2$$/MD8"08G%0<'E"&9!#[9&`T$!
+MQ4$/M\6#P`0/MU8T.=`/C]L```!)C5X(0;\`````00^WQ4J-1#`$2#G8#X:P
+M````D`^V`X3`#XB%````@^`//`9U?O9#`\!T!O9#!<!U<O8#$'0P2(UK"$&\
+M`````(![!`!V70^V4P-(B>Y(BWPD$.@`````2(/%'$'_Q$0X8P1WXNL]2(UK
+M!$&\`````(![`@!V+4$/ML>)1"0,9F:09I"+5"0,2(GN2(M\)!#H`````$B#
+MQ1Q!_\1$.&,"=^)FD$'_QT@/MD,!2(U<&`)!#[?%2HU$,`1(.=@/AU'___^^
+M`0```$B+?"00Z`````!(BUPD&$B+;"0@3(MD)"A,BVPD,$R+="0X3(M\)$!(
+M@\1(PV9F9I!F9F:09F9FD&9FD$&)RTB+1TA,BPBY`````$2-%!8/ML%"#[:$
+M"$`(```\_W0]#[;`28N1&`D``$QIP(@!``!!.+00!@$``'4B23F\$!@!``!U
+M&$6(E!`%`0``28N!&`D``$6(G``$`0``D/[!>:_SPV9F9I!F9I!F9I!(BW]0
+M@+_`````3W<W2`^VA\````!(C01`2,'@!(T4%HB4.,D```!(#[:'P````$B-
+M!$!(P>`$B(PXR````/Z'P````//#9F9FD&9FD&9FD$%7059!54%455-(@^P(
+M28G_2(M.2`^V00+!X`AF#[91`P'0#[?`@\`$#[=6-#G0#X\%`0``2(U1",9$
+M)`<`0;X`````#[9)`0^V0@(`1"0'2`^V0@-(C50"!$'_QD0X\7/F2(G50;T`
+M````0;X`````1#IT)`</@Z8```!F9F:0#[9-`4$!S0^V10`\`0^4PCP7#Y3`
+M"="H`70U1(GK*,M$..MS:T&-1@%$#[;@9F:0#[9-``^V\T2)XDR)_^@`````
+M_\-$..MRY^M%9F:09I!)BT=0@+C!`````70S1(GK*ET!1#CK<RA!C48!1`^V
+MX`^V30`/MO-$B>),B?_H`````/_#1#CK<N=F9F:09F:02(/%!$'_QD0Z="0'
+M#X)>____28M'4,:`P0````&^!P```$R)_^@`````2(/$"%M=05Q!74%>05_#
+M9F9FD&9FD$B#["A)B?E!N/____](B>?\N0(```"X`````/-(J\<'`````&8Y
+M\7-59F9FD&9FD&:#^0YW"P^WT4(/M@0*B`04#[?!0@^V!`B#Z#`\"7<A08#X
+M_[@`````1`]$P$$/ML!KP`H/M]%"`@0*1(U`T.L&08#X_W4'_\%F.?%RLD$/
+MML!(@\0HPV9FD&9FD&9FD$&)T4B+1TA,BP"Z`````)`/ML)"#[:$`$`(```\
+M_W0P#[;`28N(&`D``$AIP(@!``!(.;P(&`$``'450#BT"`4!``!U"T2(C`@'
+M`0``PV:0_L)YO//#9F9FD&9FD&9FD$%505154TB#[`A)B?5!B=1(BV]0NP``
+M``!F9F:09F:02&/#2(T$0$C!X`1(C8PHP`````^V40B`^@$/E\"`^A</E<(/
+MML"%PG0V1#AA"74P00^V50.`^B&X(`````]#T$AC^TB-/'](P><$2(V\+]@`
+M```/MM))C74$Z`````"0_\.#^T]^F4B#Q`A;74%<05W#9F9FD&9F9I!F9I!F
+M9I!!5T%6055!5%532(/L*$B)?"0@0;T`````2(M&2$B)1"08#[9``HG!P>$(
+M2(M4)!AF#[9"`P'!#[?!@\`$#[=6-#G0#X\7`0``3(MD)!A)@\0(QD0D%P`/
+MM\%(BU0D&$B-1!`$3#G@#X;D````#[?!2(U$$`1(B40D"`^WR4B)#"1!#[9$
+M)`+!X`AF00^V5"0#1(TT`D$/M_9)C7PD!.@`````//]U:4&)Q4$/M\9*C5P@
+M!$@Y7"0(=FU(BP0D2(M4)!A,C7P0!`^V0P+!X`AF#[93`XTL`@^W]4B->P3H
+M`````#S_=0Y!@/W_=3I!O0````#K,D0XZ$0/0N@/M\5(C5P8!$DYWW>_ZQQF
+M9I!FD(G"1"CJ#[;2#[9T)!=(BWPD(.@`````#[94)!=,B>9(BWPD(.@`````
+M_D0D%T$/M\9.C60@!$PY9"0(#X<P____O@(```!(BWPD(.@`````2(/$*%M=
+M05Q!74%>05_#D%-(B?M(BTY(#[9!`L'@"&8/ME$#`=`/M\"-4`0/MT8T.<)_
+M'TB+OR`!``!(8])(B<[H`````+X`````2(G?Z`````!;PV9F9I!F9F:09F:0
+M2(/L.$B)7"0(2(EL)!!,B60D&$R);"0@3(ET)"A,B7PD,$F)]4F)_@^V1B2(
+M1"0'9H%^((4`#X>K````2`^W1B"`O#A`"```_P^$F````&:#?B!_=RI(#[:$
+M.$`(``!(BY<8"0``2&G`B`$``$B+1!!(2`^V0`A(!<`(``#K;9!F@7X@@0!W
+M+D@/MT8@2`^VA#A`"```2(N7:`D``$AIP,@/``!(BT00"$@/MD`(2`7`"```
+MZS9(#[=&($@/MH0X0`@``$B+ET`)``!(:<#0````2(N$$(@```!(#[9`"$@%
+MP`@``.L%N+\)``!-#[9\!@9-:?^H````3XV\-Z`!``!)BY88"0``2(VJ>(8!
+M`&9!@7T@A0!W&4D/MT4@2@^VA#!`"```2&G`B`$``$B-+`*`?"0'``^%-`(`
+M`&;'A<```````$&`?3@<#X4@`@``00^V13J#^`)T48/X`G\*@_@!="?I!P(`
+M`(/X!V9F9I!T*8/X"@^%]0$``$R)[DB)[^@`````Z>4!``!,B>Y(B>_H````
+M`.G5`0``3(GN2(GOZ`````#IQ0$``$R)[DB)[^@`````2(V=6`$``$B+14A(
+MBP!(BW@H2(G>Z`````#'A5@!``"`A!X`2,>%:`$```````!(B:UP`0``2(M%
+M2$B+`$B+>"A(B=[H`````)#&14+_0;P`````08!_#@`/AJ\```!)C5]@9F9F
+MD&9FD$B)W^@`````2(G%2(M#"$B):PA(B5T`2(E%"$B)*(!]0O]T;(!]00!U
+M;8"]X0`````/A!D!``!(#[9%0*@"=`RH!'0(J`$/A=(```!(#[9%0*@"=0RH
+M!'0(J`$/A=(```!(#[9%0*@"#X3B````J`0/A-H```"H`0^%T@```$B)[DR)
+M]^@`````Z<(```!FD,:%X0````!!_\1%.&<.#X=<____13AG#G570;P`````
+M08!_#@!V2DF-7V!F9I!FD$B)W^@`````2(G%2(M#"$B):PA(B5T`2(E%"$B)
+M*(!]0O]T%`^V14$\(@^4PCP-#Y3`"="H`75*0?_$13AG#G>_0<9'"?],B?Y,
+MB??H`````(!\)`<`#X6%````ZS(/ME5Y2(MU4$B)Z4R)_^@`````ZQU(B>Y,
+MB??H`````&:0ZPZ^"@```$B)[^@`````D$F#?7@`=`Q)C75X3(GWZ`````!,
+MB>Y,B??H`````(!\)`<`="QF_X7`````9H.]P`````IV#F;'A<```````.E,
+M_O__O@H```!(B>_H`````$B+7"0(2(ML)!!,BV0D&$R+;"0@3(MT)"A,BWPD
+M,$B#Q#C#9F9FD&9F9I!F9F:02(/L.$B)7"0(2(EL)!!,B60D&$R);"0@3(ET
+M)"A,B7PD,$B)_4&)]TB+1TA,BRA,B>_H`````$B)PTR-<%A(A<`/A*0```!,
+MB>_H`````$F)Q$B%P'402(G>3(GOZ`````#IA````,9#):P/MT4P9HE#($R)
+M:RC'@Y0````(````3(EC>$F+1"002(E#2,=#-``(``!(C87D````2(E#4,9#
+M,"!(QX.@`````````,9#.!S&0SD!1(A[.L9#.PC&0SP`O@````!,B??H````
+M`(M3-$F+="083(GWZ`````!(B=Y,B>_H`````$B+7"0(2(ML)!!,BV0D&$R+
+M;"0@3(MT)"A,BWPD,$B#Q#C#9I!(@^PX2(E<)`A(B6PD$$R)9"083(EL)"!,
+MB70D*$R)?"0P28G]2(M'2$R+,$B+ER`!```/MD("B</!XPAF#[9"`P'##[?#
+M@\`$/0`(```/C\X```!,B??H`````$B)Q4B%P`^$N@```$R)]^@`````28G'
+M2(7`=1!(B>Y,B??H`````.F:````3(UE6$B+>!`/M]N#PP1(8]-)B[4@`0``
+MZ`````#&126L00^W13!FB44@3(EU*(E=-(.-E````!))BT<02(E%2$R)?7A)
+MC87D````2(E%4,9%,"!(QX6@`````````,9%.!W&13D0QD4Z`@^VQXA%.XA=
+M/+X`````3(GGZ`````"+531)BW<83(GGZ`````!(B>Y,B??H`````$B+7"0(
+M2(ML)!!,BV0D&$R+;"0@3(MT)"A,BWPD,$B#Q#C#9F9FD&9F9I!F9I!328G2
+M08G+2(M'2$R+`$R+3U"[``````^VPT(/MI0`0`@``(#Z_W18#[;"28N(&`D`
+M`$AIP(@!``!(.;P(&`$``'4]0#BT"`4!``!U,T6$VW0-2(N$"!`!``!)B0+K
+M)0^VPDF+B!@)``!(:<"(`0``28L22(F4"!`!``#K!V9FD/[#>9.[`````&9F
+M9I!F9I`/ML-(C01`2,'@!$J-/`A(C8_`````#[91"(#Z`0^7P(#Z%P^5P@^V
+MP(7"=#-`.'$)=2U%A-MT#$B+A]````!)B0+K(P^VPTB-!$!(P>`$28L22HF4
+M"-````#K"V9F9I#_PX#[3W:96\-F9F:09F:02(/L*$B)7"0(2(EL)!!,B60D
+M&$R);"0@28G\B?%(BY<@`0``#[9"`HG'P><(9@^V0@,!QP^WQX/`!#T`"```
+M?V1`A/9T#D$/MH0D"`$``(A"`>L,#[9"`4&(A"0(`0``2(U""$B)!"2[````
+M``^WQTB-1!`$2#L$)'8J1`^VZ0^WQTB-;!`$#[;S1(GI2(GB3(GGZ`````#_
+MPTB#!"0$2#LL)'?B2(M<)`A(BVPD$$R+9"083(ML)"!(@\0HPV:02(/L&$B)
+M7"0(2(EL)!!(B?N)U4C'!"0`````@']#`70_0`^V]KD!````2(GBZ`````!(
+M@SPD`'0G2(L$)(`(@$"$[70+2(L$)(!(`R#K"9!(BP0D@&`#WTB)W^@`````
+M2(M<)`A(BVPD$$B#Q!C#D$B#[!A(B1PD2(EL)`A,B60D$$B)\TF)_$B+;FAF
+M@7X@A0`/AY@```!(#[=&(("\.$`(``#_#X2%````9H-^(']W(D@/MH0X0`@`
+M`$B+EQ@)``!(:<"(`0``2(M$$$@/ME`(ZV%F@7X@@0!W)T@/MT8@2`^VA#A`
+M"```2(N7:`D``$AIP,@/``!(BT00"`^V4`CK,D@/MT8@2`^VA#A`"```2(N7
+M0`D``$AIP-````!(BX00B`````^V4`CK"&9FD+K_____N?____]F@7L@A0!W
+M#D@/MT,@0@^VC"!`"```@/K_="$/ML)"@+P@Q@@``/\/E,*`^?\/E,`)T*@!
+M=0:`>R0&=3I(@WMX`'032(US>$R)Y^@`````9F9FD&9FD$B)WDR)Y^@`````
+MQT50_____TB)[_]52.MV9F:09F:0@'LD`'4[]H.4````"&9FD'002(M],(M3
+M-$B+<TCH`````,=%4`````!(@WTX`'0)2(M5.(M%((D"2(GO_U5(ZP_'15#_
+M____2(GO_U5(9I!(@WMX`'0,2(US>$R)Y^@`````2(G>3(GGZ`````!FD$B+
+M'"1(BVPD"$R+9"002(/$&,-F9F:09F:09F:09F:02(/L2$B)7"082(EL)"!,
+MB60D*$R);"0P3(ET)#A,B7PD0$B)_4&)UT&)SDR)1"0(0(AT)!=(BT=(3(LH
+M3(GOZ`````!(B<-(C4!82(D$)$B%VP^$V````$R)[^@`````28G$2(7`=1!(
+MB=Y,B>_H`````.FX````QD,EK`^W13!FB4,@2(M4)`A(B5-H3(EK*,>#E```
+M``@```!,B6-X28M$)!!(B4-(1(ES-$B-A>0```!(B4-0QD,P($C'@Z``````
+M````QD,X/,9#.0(/MD0D%XA#.D2)^,'H$(A#.TR)^@^VQHA#/$2(>SU$B?#!
+MZ!"(0SY,B?(/ML:(0S]$B'-`QD-!`+X`````2(L\).@`````BU,T28MT)!A(
+MBSPDZ`````!(B=Y,B>_H`````$B+7"082(ML)"!,BV0D*$R+;"0P3(MT)#A,
+MBWPD0$B#Q$C#9F9FD&9FD&9FD&9FD$B#[$A(B5PD&$B);"0@3(ED)"A,B6PD
+M,$R)="0X3(E\)$!)B?R)TT&)SDR)1"0(0(AT)!=(BT=(3(LX3(G_Z`````!(
+MB<5(A<`/A.X```!,B?_H`````$F)Q4B%P'412(GN3(G_Z`````#IS@```)!(
+MC4582(D$)$F+?1!$B?))B[0D(`$``.@`````QD4EK$$/MT0D,&:)12!(BU0D
+M"$B)56A,B7TH1(EU-(.-E````!))BT402(E%2$R);7A)C80DY````$B)15#&
+M13`@2,>%H`````````#&13@[QD4Y`@^V1"07B$4ZB=C!Z!"(13L/ML>(13R(
+M73U$B?#!Z!"(13Y,B?(/ML:(13]$B'5`QD5!`+X`````2(L\).@`````BU4T
+M28MU&$B+/"3H`````$B)[DR)_^@`````2(M<)!A(BVPD($R+9"0H3(ML)#!,
+MBW0D.$R+?"1`2(/$2,-)B=%(A?\/E,)(A?8/E,`)T*@!=1)-A<D/E,)(A<D/
+ME,`)T*@!=`FX`````,-F9I!F08'XA0!W#D$/M\"`O#A`"```_W4&N`````##
+M0<9!..%!QD$Y`4'&03H39D6)02!)B7$H28F)H````+@!````PV9F9I!F9F:0
+M9F9FD&9FD$B+1PB+0`2)!0````")PH'*```,`"7___/_0(3VB=$/1,A(BT<(
+MB0A(BT<(B4@,2(M'"(E($$B+1PB)2!1(BT<(B4@82(M'"(E(!,.0D)"03(M4
+M)"!,BUPD,`^WQST1)P``?T`]$"<```^-@0```#TB(0``='H](B$``&9FD&:0
+M?Q`]("$``'1G9F9FD&9FD.MD/4`A``!T5SU$(0``9I!T3NM2/8`G``!F9F:0
+M9F:0=#X]@"<``'\,+2`G``"#^`)W,^LK/8"1``!T)#V`D0``?P\]@B<``'06
+M9F:09F:0ZQ0]@)0``'4-9F9FD&9FD,8&0,8"`L8!!`^V%DB+1"08B!!F0<<"
+M@`!F0<<#``!!Q@$@2(M$)`AFQP```0^V%DB+1"00B!!F#[8&9D$#`F9!`P-(
+MBU0D*&:)`F9!B0!!#[<22(M$)#AFB1!!#[<2@\(+2(M$)$!FB1##9F:09I!!
+M5T%6055!5%532(/L&$F)_TF)UD"(="072(LONP````!F@WU8``^&AP(``&9F
+M9I")V&;!Z`4/M\"+A(6<````B=F#X1](T_BH`0^%5P(```^WTTB+A9`)``!(
+MBPS02(7)#X1``@``O@````"+03@E____`#WA`1``#X7!````387V#X4?`@``
+M9H%Y((4`#X>>````2`^W02"`O"A`"```_P^$BP```&:#>2!_=R5(#[:$*$`(
+M``!(BY48"0``2&G`B`$``$B+1!!(#[90".E5`0``9H%Y(($`=RI(#[=!($@/
+MMH0H0`@``$B+E6@)``!(:<#(#P``2(M$$`@/ME`(Z2,!``!(#[=!($@/MH0H
+M0`@``$B+E4`)``!(:<#0````2(N$$(@````/ME`(Z?8```"Z_____^GL````
+M9F9FD&:!>2"%``^'E0```$@/MT$@@+PH0`@``/\/A((```!F@WD@?W<B2`^V
+MA"A`"```2(N5&`D``$AIP(@!``!(BT002`^V4`CK7F:!>2"!`'<G2`^W02!(
+M#[:$*$`(``!(BY5H"0``2&G`R`\``$B+1!`(#[90".LO2`^W02!(#[:$*$`(
+M``!(BY5`"0``2&G`T````$B+A!"(````#[90".L%NO____]F@7D@A0!W.D@/
+MMT$@@+PH0`@``/]T*TB+M1@)``!F@7D@A0!W%4@/MH0H0`@``$AIP(@!``!(
+M`<;K!TB!QGB&`0!!.%<(=7E-A?9T"T$/MT8P9CM!('5I@'PD%P9T3XM1.('B
+M____`('ZX0$0`'0^2`^V1D"H`G0UJ`1T,:@!=2V`ON``````9I!U(H'ZX0$/
+M`'0M#[9$)!>(022Z`0```$B)SDR)_^@`````ZQ,/MD0D%XA!)`^W\TR)_^@`
+M````_\-F.5U8#X=]_?__@'PD%X$/A(<!``!!O`````!(BY7H````2(V%Z```
+M`$@YT'0+0?_$2(L22#G0=?5F187D#X19`0``2(V%Z````$B)PD@YA>@````/
+MA$(!``!)B<5(B40D"&9FD&:02(G32(G7Z`````!(B<%-A?9T)4$/MT8P9CM!
+M('0:2(M#"$B)2PA(B1E(B4$(2(D(0?_,Z>4```!F@7D@A0`/AY4```!(#[=!
+M(("\*$`(``#_#X2"````9H-Y(']W(D@/MH0H0`@``$B+E1@)``!(:<"(`0``
+M2(M$$$@/ME`(ZUYF@7D@@0!W)T@/MT$@2`^VA"A`"```2(N5:`D``$AIP,@/
+M``!(BT00"`^V4`CK+T@/MT$@2`^VA"A`"```2(N50`D``$AIP-````!(BX00
+MB`````^V4`CK!;K_____03A7"'4DBT$X)?___P`]X0$/`'05#[9$)!>(021(
+MB<Y(B>_H`````.L228M%"$F)30A,B2E(B4$(2(D(0?_,9D6%Y'022(M4)`A(
+M.97H````#X7+_O__2(/$&%M=05Q!74%>05_#9F9FD&9F9I!F9F:00;@`````
+M9H-_6``/AAT!``!,BX^0"0``00^WP$F+#,%(A<D/A/<```!F@7D@A0`/AYL`
+M``!(#[=!(("\.$`(``#_#X2(````9H-Y(']W(D@/MH0X0`@``$B+EQ@)``!(
+M:<"(`0``2(M$$$@/ME`(ZV1F@7D@@0!W)T@/MT$@2`^VA#A`"```2(N7:`D`
+M`$AIP,@/``!(BT00"`^V4`CK-4@/MT$@2`^VA#A`"```2(N70`D``$AIP-``
+M``!(BX00B`````^V4`CK"V9FD&9FD+K_____N/\```!F@7D@A0!W#D@/MT$@
+M9@^VA#A`"```#[?`2&G`B`$``$@#AQ@)``!`./)U&D@/MD!`J`%T$:@$=`VX
+M`0```,-F9F:09F:00?_`9D0Y1U@/A^K^__^X`````,-F9F:09F9FD&9F9I!(
+MBT=(3(L`38N8D!```$&Z`````+X`````9D&#>%@`=DA-BXB0"0``#[?628,\
+MT0!T+DF+#-&+03@E____`#WA`1``=!L/MT<P9CM!('412(G02,'@!F9&.508
+M"'0+9I#_QF9!.7!8=[]F03EP6'0*0?_"9D&#^A]VFD$/M\)FD,-F9F:09F9F
+MD&9F9I!F9I!(@W]0`'0>2(M'4,8`<$B+1U!`B'`"2(M'4,9`!P!(BT=0B%`,
+M\\-F9I!F9I!F9I#SPV9F9I!F9F:09F:09F:028GXB?)(B=&!X?\!``!(BX>0
+M"0``2(,\R`!T+$B+/,@/MD<E00^VL-X```")\=/@1`^WP`^WTKC__P``T^`A
+MPDB)^$$YT'0%N`````#SPY!54TB#[`A(B?5F@7XXX0$/A:T````/MD8Z@^@1
+M/`$/AYX```"X_P```&:!?B"%`'<-2`^W1B`/MH0X0`@``(G`2&G`T````$B)
+MPT@#GT`)``"`>T3_=4RX%````("]F`````!T"0^VA9@````!P`^VP&G`0$(/
+M`(F#D````$C'@Z``````````2(F;J````$B-LY````!(BW\HZ`````#&0T0`
+M2(U#*$B+4`A(B6@(2(E%`$B)50A(B2K^0T7IJ````+C_````9H%]((4`=PU(
+M#[=%(`^VA#A`"```B<!(:<"(`0``2(G#2`.?&`D``(M%."7___\`/>$!$`!T
+M;(![>/]U3+@4````@+V8`````'0)#[:%F`````'`#[;`:<!`0@\`B8,H`0``
+M2,>#.`$```````!(B9M``0``2(VS*`$``$B+?RCH`````,9#>`!(C4,@2(M0
+M"$B):`A(B44`2(E5"$B)*OY#>TB#Q`A;7<-F9F:09F9FD&9F9I!F9I!32(GS
+M@'YX_W042(VV*`$``$B+?RCH`````,9#>/];PU-(B?.`?D3_=!1(C;:0````
+M2(M_*.@`````QD-$_UO#2(/L*$B)7"0(2(EL)!!,B60D&$R);"0@28G\2(GS
+M9H%^..$!#X76````#[9&.H/H$3P!#X?'````N?\```!F@7X@A0!W#4@/MT8@
+M#[:,.$`(``")R$AIP-````!(B<5)`ZPD0`D``('Y_P````^$8@$``/Y-14R-
+M;2A,B>_H`````$B)P4@YV'5+2(GN3(GGZ`````!,.6TH#X0V`0``QX60````
+M`"TQ`4C'A:``````````2(FMJ````$B-M9````!)BWPD*.@`````QD5$`.D`
+M`0``2(U5*$B+12A(B4@(2(D!2(E1"$B)32A(BU,(2(L#2(E0"$B)`NG6````
+MD+G_````9H%[((4`=PY(#[=#($(/MHP@0`@``(G(2&G`B`$``$B)Q4D#K"08
+M"0``BT,X)?___P`]X0$0``^5P('Y_P````^5P@^VP(7"#X2"````_DU[3(UM
+M($R)[^@`````2(G!2#G8=49(B>Y,B>?H`````$PY;2!T6L>%*`$````M,0%(
+MQX4X`0```````$B)K4`!``!(C;4H`0``28M\)"CH`````,9%>`#K)V:02(U5
+M($B+12!(B4@(2(D!2(E1"$B)32!(BU,(2(L#2(E0"$B)`DB+7"0(2(ML)!!,
+MBV0D&$R+;"0@2(/$*,-FD$B#[!A(B1PD2(EL)`A,B60D$$B)^TB)]4@/MT8P
+M9D0/MJ0X0`@``$$/M_1(:?:(`0``2`.W&`D``$B!QB`!``#H`````$@/MU4P
+M2(.\TT`$````=!Y(BX330`0``$B#N(``````=0Q(QX330`0```````!(#[=%
+M,,:$&$`(``#_00^W]$B-NY`/``#H`````$$/M\1(BY,8"0``2&G`B`$``(!\
+M$&K_=`Q(C3002(G?Z`````!(B>Y(B=_H`````$$/M\1(BY,8"0``2&G`B`$`
+M`,9$$$(`2(N3&`D``,9$$$,!2(L<)$B+;"0(3(MD)!!(@\08PV9F9I!F9I!F
+M9I!!5T%6055!5%532(/L"$F)_4&)]T&^@````&9FD&9FD$$/M\9F0@^VA"A`
+M"```9CW_``^$ZP```&9!@?Z!``^'?`````^WP$AIP,@/``!)B<1-`Z5H"0``
+MO0````!!@'PD6``/AK<```!)C5PD2&:02(G?Z`````!(C4CP2(M3"$B)0PA(
+MB1A(B5`(2(D"BT%`)0#__P`]``#_`'45]D%#!'0/2(-Y.`!T"$B+03A$B'@!
+M_\5!.&PD6'>UZV-F9I`/M\!(:<#0````2(G"20.50`D``+T`````@'H[`'9!
+MD(GI#[;!2(M,PEA(A<ET)(M!0"4`__\`/0``_P!U%?9!0P1T#TB#>3@`=`A(
+MBT$X1(AX`?_%0#AJ.W?%9F:09I!!_\=!_\9F08'^A0`/AN[^__]-.:W0"```
+M=1))@<4`%```1(G^3(GOZ+/^__](@\0(6UU!7$%=05Y!7\-F9F:04TB)^T@/
+MMD9;9@^VM#A`"```QH0X0`@``/\/M_9(C;\`$```Z`````!(B[O0"```O@``
+M``#H9O[__UO#9F9FD%532(/L"$B)_4@/MT9`9@^VG#A`"```QH0X0`@``/\/
+MM_-(C;_(#P``Z``````/M]M(BY5`"0``2&G#T````(!\$%#_=`Q(C3002(GO
+MZ`````!(B[W0"```O@````#H_?W__TB#Q`A;7<-F9I!F9I"Y`````+K0````
+M2(GX9F:0B`A(_\!(_\IU]L9'1/_&1U#_2(U'*$B)1RA(B4<PPY!(@^PH2(E<
+M)`A(B6PD$$R)9"083(EL)"!(B?U(C;_(#P``Z`````"Z`````(3`#X71````
+M2(V]R`\``.@`````08G%NX+___\/ML.`O"A`"```_W40.)W@````<P^(G>``
+M``#K!__#@/N%=MRZ`````(#[A@^$BP````^VPT2(K"A`"```00^WQ4QIX-``
+M``!,B>=(`[U`"0``Z`````!(BY5`"0``9@^VPV9!B4040(!]40%U#TB+A4`)
+M``!F0<=$!$S__T$/M]U(BX5`"0``2&G;T````,9$`T(`2(N%0`D``&;'1`-.
+M``!(B[W0"```O@````#HQ?S__TB)VD@#E4`)``!(B=!(BUPD"$B+;"003(MD
+M)!A,BVPD($B#Q"C#9F9FD&9F9I!F9F:09F:02(/L"$@/MD8(9@^VM#C&"```
+MQH0XQ@@``/\/M_9(@<<X$```Z`````!(@\0(PV:0N0````"ZB`$``$B)^&9F
+MD(@(2/_`2/_*=?;&1WC_QD=J_\9'>A](C4<@2(E'($B)1RC#9F9FD&9FD&9F
+MD&9FD$%505154TB#[`A(B?U(C;^0#P``Z`````"Z`````(3`#X4_`0``2(V]
+MD`\``.@`````08G%NP````!F9I!F9I`/ML.`O"A`"```_W469@^VPV8YA=P`
+M``!S#6:)A=P```#K!/[#>=FZ`````(#[@`^$\`````^VPT2(K"A`"```00^W
+MQ4QIX(@!``!,B>=(`[T8"0``Z`````!(BY48"0``9@^VPV9!B404,$B+A1@)
+M``!!QD0$0@!(BX48"0``0<9$!&7_2(N%&`D``$'&1`1D_TB+A1@)``!!QD0$
+M9O](BX48"0``0<9$!&C_2(N%&`D``$'&1`1G_TB+A1@)``!!QD0$:?](BX48
+M"0``0<:$!.(`````2(N%&`D``$'&A`0'`0``_TB)[^@`````2(N5&`D``$F)
+MA!0@`0``@'U1`74-2(N%&`D``$&`3`1$`4$/M\5(:<"(`0``2(G"2`.5&`D`
+M`$B)T$B#Q`A;74%<05W#9F9FD&9FD&9FD&9FD%532(/L"$B)_4B-OP`0``#H
+M`````+H`````A,`/A1H!``!(C;T`$```Z`````")Q[Z`____B?(/ML*`O"A`
+M"```_W420#BUWP```',10(BUWP```.L(_\9`@/Z!=M>Z`````$"`_H(/A,\`
+M``")\@^VPD"(O"A`"```#[?'2&G`R`\``+D`````NL@/``!(`X5H"0``B`A(
+M_\!(_\IU]@^WWTAIV\@/``!(B=I(`Y5H"0``2(U"&$B)0AA(B=A(`X5H"0``
+M2(/`&$B)0`A(B=I(`Y5H"0``2(U"*$B)0BA(B=A(`X5H"0``2(/`*$B)0`A(
+MB=I(`Y5H"0``2(U"2$B)0DA(B=A(`X5H"0``2(/`2$B)0`A(BX5H"0``0(AT
+M`UM(B[W0"```O@````#H;OG__TB)VD@#E6@)``!(B=!(@\0(6UW#9F9FD&9F
+MD&9FD%-(B?M(C;\X$```Z`````"Z`````(3`#X7+````2(V[.!```.@`````
+MB<>^`````(GR#[;"@+P8Q@@``/]U$4`X<TQS$T"(<TSK#69FD&:0_\9`@/X#
+M=MBZ`````$"`_@0/A($```")\@^VPD"(O!C&"```#[?'2&G`J````+D`````
+MNJ@```!(C808H`$``(@(2/_`2/_*=?8/M]=(:=*H````2`':2(V"T`$``$B)
+M@M`!``!(B4`(2(V"Z`$``$B)@N@!``!(B4`(2(V"``(``$B)@@`"``!(B4`(
+M2('"H`$``$"(<@A(B=!;PV9FD$B#[!A(B5PD"$B);"002(G]2(V'"`$``+H`
+M````2#F'"`$``'0F2(V_"`$``.@`````2(G#2(G'Z`````!(B>_H`````$B)
+M0W!(B=I(B=!(BUPD"$B+;"002(/$&,-FD$B#[`A(C8<(`0``2(M0"$B)<`A(
+MB09(B58(2(DR2(-^<`!T#$B#QG#H`````&9FD$B#Q`C#9F9FD&9F9I!F9I!(
+M@^P(2(V'&`$``+H`````2#F'&`$``'032(''&`$``.@`````QD`0`$B)PDB)
+MT$B#Q`C#9F9FD&9F9I!F9F:02(L&2(''&`$``$B+5PA(B4<(2(DX2(E0"$B)
+M`DC'!@````##9F9FD&9F9I!F9F:02(/L"$B-ER@!``"X`````$@YER@!``!T
+M"$B)U^@`````2(/$",-F9F:09F:09F:02(L&2(''*`$``$B+5PA(B4<(2(DX
+M2(E0"$B)`DC'!@````##9F9FD&9F9I!F9F:02(/L"$B-ET@!``"X`````$@Y
+MET@!``!T(DB)U^@`````O@````"YH````$B)PF:00(@R2/_"2/_)=?5(@\0(
+MPTB!QT@!``!(BT<(2(EW"$B)/DB)1@A(B3##9F:09F:02(/L"$B-EU@!``"X
+M`````$@YEU@!``!T"$B)U^@`````2(/$",-F9F:09F:09F:02(L&2(''6`$`
+M`$B+5PA(B4<(2(DX2(E0"$B)`DC'!@````##9F9FD&9F9I!F9F:02(/L"$B-
+MAS@!``"Z`````$@YAS@!``!T%TB!QS@!``#H`````$C'0"``````2(G"2(G0
+M2(/$",-F9F:09F9FD$B+!DB!QS@!``!(BU<(2(E'"$B).$B)4`A(B0)(QP8`
+M````PV9F9I!F9F:09F9FD$B#[$A(B5PD&$B);"0@3(ED)"A,B6PD,$R)="0X
+M3(E\)$!(B?U)B?1F@7X@A0`/AYP```!(#[=&(("\.$`(``#_#X2)````9H-^
+M(']W(D@/MH0X0`@``$B+EQ@)``!(:<"(`0``2(M$$$@/MD`(ZV5F@7X@@0!W
+M)T@/MT8@2`^VA#A`"```2(N7:`D``$AIP,@/``!(BT00"`^V0`CK-D@/MT8@
+M2`^VA#A`"```2(N70`D``$AIP-````!(BX00B`````^V0`CK#&9F9I!F9I"X
+M_____P^VP$P/MK0HQ@@``$UI]J@```!-C;0NH`$``$B+E6@)``!,C;HXN`\`
+M9D&!?"0@A0!W&DD/MT0D($@/MH0H0`@``$AIP,@/``!,C3P"28M4)$@/MD(!
+M@_@2=!`]D0````^$)0$``.F0`0``28L&2(E$)`B]``````^V0@F(1"07#[92
+M&HA4)!9!O0````!!@'X.`'8_28U>8&:02(G?Z`````!(B<5(BT,(2(EK"$B)
+M70!(B44(2(DH3#E]4'4,#[9%>4$Z1"0E=`J00?_%13AN#G?'28-\)'@`=`])
+MBW0D>$B+?"0(Z`````!,B>9(BWPD".@`````#[:5P@```(U"`8B%P@```(#Z
+M`W<F@'PD%@!U'T$/ME0D)4B+=5!!N`````"Y`@```$R)]^@`````ZSH/MI7"
+M````C4(!B(7"````@/H"=B6`?"06`'4>QD5#`L9%0O^`943^2(GN2(M\)`CH
+M`````.FN````#[9,)!8/ME0D%TR)_DR)]^@`````Z90```!F9F:0N0````!!
+MO0````!!@'X.`'8[28U>8$B)W^@`````2(G!2(M#"$B)2PA(B1E(B4$(2(D(
+M3#EY4'4+#[9!>4$Z1"0E=`E!_\5%.&X.=\E(#[9!0*@"=!JH!'06J`%T$D$/
+MME0D)4B+<5!,B??H`````$F#?"1X`'0-28MT)'A(B>_H`````$R)YDB)[^@`
+M````2(M<)!A(BVPD($R+9"0H3(ML)#!,BW0D.$R+?"1`2(/$2,-F9F:09F:0
+M9F:09F:02(/L*$B)7"0(2(EL)!!,B60D&$R);"0@28G\28GU2(LO2(GOZ```
+M``!(B<-(A<!T<4B)[^@`````2(G"2(7`=&%(C7M8QD,XX<9#.0'&0SH0QD,E
+MNV9!#[9%6V:)0R!)BP0D2(E#*,=#-)````!(C4(02(E#2$B)4WC&0`$`QD(0
+M0$C'@Z``````````O@````#H`````$B)WDB)[^@`````2(M<)`A(BVPD$$R+
+M9"083(ML)"!(@\0HPV9FD&:02(/L*$B)'"1(B6PD"$R)9"003(EL)!A,B70D
+M($F)_$F)]4&)UDB++TB)[^@`````2(G#2(7`='5(B>_H`````$B)PDB%P'1E
+M2(U[6,9#..'&0SD!QD,Z$,9#);MF00^V15MFB4,@28L$)$B)0RC'0S20````
+M2(U"$$B)0TA(B5-XQD`!$,9"$$!$B'`)2,>#H`````````"^`````.@`````
+M2(G>2(GOZ`````!(BQPD2(ML)`A,BV0D$$R+;"083(MT)"!(@\0HPV9FD&9F
+MD$B#[#A(B5PD"$B);"003(ED)!A,B6PD($R)="0H3(E\)#!)B?Q)B?5!B=9!
+MB<](BR](B>_H`````$B)PTB%P`^$@P```$B)[^@`````2(G"2(7`='-(C7M8
+MQD,XX<9#.0'&0SH01(AS)69!#[9%6V:)0R!)BP0D2(E#*,=#-)````!(C4(0
+M2(E#2$B)4WC&0`&1QD(00$2(<`E$B'@*2,>#H`````````"^`````.@`````
+M2(G>2(GOZ`````"_H(8!`.@`````2(M<)`A(BVPD$$R+9"083(ML)"!,BW0D
+M*$R+?"0P2(/$.,-F9I!FD$B#[#A(B5PD"$B);"003(ED)!A,B6PD($R)="0H
+M3(E\)#!)B?Q)B?=)B<U!B=9(BR](B>_H`````$B)PTB%P'4/0<:%X0````'I
+MC````&:02(GOZ`````!(B<)(A<!U%4B)WDB)[^@`````0<:%X0````'K94B-
+M>UC&0SCAQD,Y`<9#.A!$B',E9D$/MD=;9HE#($F+!"1(B4,HQT,TD````$B-
+M0A!(B4-(2(E3>,9``1+&0A!`1(AP"4C'@Z``````````O@````#H`````$B)
+MWDB)[^@`````2(M<)`A(BVPD$$R+9"083(ML)"!,BW0D*$R+?"0P2(/$.,-F
+M9I!54TB#[`A(B?U(B?-F@7X@A0`/AY@```!(#[=&(("\.$`(``#_#X2%````
+M9H-^(']W(T@/MH0X0`@``$B+EQ@)``!(:<"(`0``2(M$$$AF#[9(".M@9H%^
+M(($`=RA(#[=&($@/MH0X0`@``$B+EV@)``!(:<#(#P``2(M$$`AF#[9(".LP
+M2`^W1B!(#[:$.$`(``!(BY=`"0``2&G`T````$B+A!"(````9@^V2`CK!;G_
+M````OO\```!F@7L@A0!W#D@/MT,@9@^VM"A`"```9H'Y_P!T'`^WP8"\*,8(
+M``#_#Y3"9H'^_P`/E,`)T*@!=!!(B=Y(B>_H`````.F(````#[?!2`^VO"C&
+M"```2&G_J````$B-O"^@`0``9@^V4SMF#[9#/,'@"`'"9H'B_P$/MD,]@_@!
+M=`6#^`AU0`^WTDB+A9`)``!(BP302#M#:'4L#[=(,HG*9L'J!0^WTH/A'TC'
+MP/[___](T\`A1)5<2(M#:`^W<#+H`````)!(B=Y(B>_H`````$B#Q`A;7<-F
+M9F:09F9FD&9FD&9FD$B#[#A(B5PD"$B);"003(ED)!A,B6PD($R)="0H3(E\
+M)#!)B?U)B?1!B==(BR](#[=&($@/MH0H0`@``$AIP(@!``!)B<9,`[48"0``
+M2(GOZ`````!(B<-!#[=4)#*)T&;!Z`4/M\"+1(5<B=&#X1](T_BH`0^%J0``
+M`$B%VP^$H````$B->UA!#[9$)"4/MHW>````T^`)T,9#..'&0SD!QD,Z#XA#
+M.V;!Z`B(0SQ$B'L]28N&U````$B)0SY,B6-HQD,EJD$/MT8P9HE#($F+10!(
+MB4,HQT,T`````$C'0T@`````2,>#H`````````"^`````.@`````2(G>2(GO
+MZ`````!!#[=,)#*)RF;!Z@4/M]*#X1^X`0```$C3X`E$E5Q(BUPD"$B+;"00
+M3(MD)!A,BVPD($R+="0H3(M\)#!(@\0XPV9FD&9FD&9FD$B#["A(B1PD2(EL
+M)`A,B60D$$R);"083(ET)"!)B?Q(BT=(3(LP3(GWZ`````!(B<5(A<!U#D'&
+MA"3A`````>FC````3(GWZ`````!)B<5(A<!U'$'&A"3A`````4B)[DR)]^@`
+M````ZWUF9I!F9I!(C5U8QD4X)<9%):M!#[=$)#!FB44@3(EU*,=%-`@```#'
+MA90````(````28M%$$B)14A(C4`(2(E%4,9%,"1,B6UX2,>%H`````````"^
+M`````$B)W^@`````28MU&+H(````2(G?Z`````!(B>Y,B??H`````$B+'"1(
+MBVPD"$R+9"003(ML)!A,BW0D($B#Q"C#9F9FD&9F9I!F9F:02(/L*$B)'"1(
+MB6PD"$R)9"003(EL)!A,B70D($F)_$B+1TA,BS!,B??H`````$B)Q4B%P'4.
+M0<:$).$````!Z:L```!,B??H`````$F)Q4B%P'4<0<:$).$````!2(GN3(GW
+MZ`````#I@@```&9FD$B-75C&13B>QD4Y$,9%12#&126K00^W1"0P9HE%($R)
+M=2C'130@````QX64````"````$F+11!(B45(3(EM>$B-0"!(B450QD4P)$C'
+MA:``````````O@````!(B=_H`````$F+=1BZ(````$B)W^@`````2(GN3(GW
+MZ`````!(BQPD2(ML)`A,BV0D$$R+;"083(MT)"!(@\0HPV9F9I!(@^PX2(E<
+M)`A(B6PD$$R)9"083(EL)"!,B70D*$R)?"0P28G\08GV2(M'2$R+*$R)[^@`
+M````2(G#2(7`=1%!QH0DX0````'IN@```&9FD$R)[^@`````2(G%2(7`=2!!
+MQH0DX0````%(B=Y,B>_H`````.F.````9F9FD&9FD$R->UC&0S@2183V=!/&
+M0SD!QD,Z@,9#/$#K"69FD&:0QD,\),9#):M!#[=$)#!FB4,@3(EK*,=#-&``
+M``#'@Y0````(````2(M%$$B)0TA(B6MX2,>#H`````````"^`````$R)_^@`
+M````2(MU&+I@````3(G_Z`````!(B=Y,B>_H`````$B+7"0(2(ML)!!,BV0D
+M&$R+;"0@3(MT)"A,BWPD,$B#Q#C#9F:09F:02(/L*$B)'"1(B6PD"$R)9"00
+M3(EL)!A,B70D($B)^TB+1TA,BS!,B??H`````$B)Q4&\``@``$B%P'4,QH/A
+M`````>G!````3(GWZ`````!)B<5(A<!U&,:#X0````%(B>Y,B??H`````.F:
+M````D&9!@?P``;C_````1`]#X,9%.!K&13D(QD4Z",9%.P!$B&4\QD4]`,9%
+M):L/MT,P9HE%($R)=2A%#[?D1(EE-,>%E`````@```!)BU402(E52$2)X$@!
+MT$B)15#&13`D3(EM>$C'A:``````````2(U=6+X`````2(G?Z`````!)BW48
+M1(GB2(G?Z`````!(B>Y,B??H`````$B+'"1(BVPD"$R+9"003(ML)!A,BW0D
+M($B#Q"C#9F9FD&9FD&9FD$B#[!A(B1PD2(EL)`A,B60D$$F)_$B+1TA(BRA(
+MB>_H`````$B)PTB%P'4+0<:$).$````!ZU_&0#@5QD`EJT$/MT0D,&:)0R!(
+MB6LHN0$```"Z`0```$B)WDB)[^@`````A,!U&DB)WDB)[^@`````0<:$).$`
+M```!ZQIF9F:02,>#H`````````!(B=Y(B>_H`````$B+'"1(BVPD"$R+9"00
+M2(/$&,-F9F:09F:0N@0```!`#[;'@_@7=T>)P/\DQ0````"#PB3K.8/".)#K
+M,X/"$.LN@\(<ZRF#PDB0ZR.#PASK'H/"/.L9@\(DD.L3@\(8ZPZ#PA3K"8/"
+M2)#K`X/",(G0PV9F9I!F9F:02(/L&$B)7"0(2(EL)!!(B?U(B?.`?FK_=!,/
+MMG9J2(L_Z`````#&0VK__DU$2(M<)`A(BVPD$$B#Q!C#9F9FD$@/MD9`J`)T
+M#*@$=`BH`0^$ZP```(!^:O\/A>$```!(BP>+@!@!``")!0````!!B<&Y````
+M`+@!````9F:09I!!B<!!T^!%A<AU.8A.:DB+%T2)R$0)P(F"&`$``$B+!XN`
+M6`$``(D%`````$&)P44AP0^$?P```$B+!T2)B%@!``#K<__!@/D?=K5(BP>+
+M@!P!``")!0````!!B<&Y`````+@!````08G`0=/@187(=3Z-02"(1FI(BQ=$
+MB<A$"<")@AP!``!(BP>+@&`!``")!0````!!B<%%(<%T&4B+!T2)B&`!``#K
+M#69FD&9FD/_!@/D?=K#^1T1F9I!F9I#SPV9F9I!F9F:09F:09F:02(/L&$B)
+M7"0(2(EL)!!(B?U(B?.`?E#_=!,/MG902(L_Z`````#&0U#__DU$2(M<)`A(
+MBVPD$$B#Q!C#9F9FD(!^4/\/A=8```!(BP>+@!@!``")!0````!!B<&Y````
+M`+@!````08G`0=/@187(=36(3E!(BQ=$B<A$"<")@A@!``!(BP>+@%@!``")
+M!0````!!B<%%(<%T?4B+!T2)B%@!``#K<?_!@/D?=KE(BP>+@!P!``")!0``
+M``!!B<&Y`````+@!````9F9FD&9FD$&)P$'3X$6%R'4UB$Y02(L71(G(1`G`
+MB8(<`0``2(L'BX!@`0``B04`````08G!12'!=!-(BP=$B8A@`0``ZP?_P8#Y
+M'W:Y_D=$9F:09F:0\\-F9F:09F9FD&9FD&9FD$%455-)B?Q(BQ^]`````&:#
+M>U@`#X8B`0``9F:09F:0#[?52(N#D`D``$B#/-``#X3[````00^V3"0(2(L$
+MT&:!>""%``^'Q0```$@/MU`@@+P:0`@``/\/A+(```!F@W@@?W<M2`^VA!I`
+M"```2(N3&`D``$AIP(@!``!(BT002`^V0`@YR`^$BP```.F>````#[?52(N#
+MD`D``$B+!-!F@7@@@0!W*T@/MT`@2`^VA!A`"```2(N3:`D``$AIP,@/``!(
+MBT00"`^V0`@YR'1'ZUT/M]5(BX.0"0``2(L$T$@/MT`@2`^VA!A`"```2(N3
+M0`D``$AIP-````!(BX00B`````^V0`@YR'0+ZR&0@?G_````=1@/M\5(BY.0
+M"0``2(L\PKX`````Z`````#_Q68Y:U@/A^3^__];74%<PV9F9I!F9F:09F9F
+MD&9FD$B+5G!(A=)T'$B+1CA(B4(82(M&0$B)0B!(BT9(2(E"*,9"$`'SPV9F
+MD&9FD&9FD$B+5G!(A=)T&$B+0AA(B48X2(M"($B)1D!(BT(H2(E&2//#9F9F
+MD&9FD&9FD&9FD%532(/L"$B)_4B)\T@Y?B@/A,H```"`?B0`#X6G````#[9&
+M.(/X%70)@_A5#X65````2(M3<$B%T@^$B````(!Z$`$/A7X```!F@7H8X0&0
+M=75(BXT8"0``2(VQ>(8!`&:!>R"%`'<92`^W0R!(#[:$*$`(``!(:<"(`0``
+M2(TT`0^V0AJ#^`=T'X/X!W\'@_@&=![K,8/X#&9F9I!F9I!T((/X#702ZQYF
+M@V9B_6:0ZQ5F@TYB`NL.9H-F8O=FD.L%9H-.8@A(@WMX`'022(US>$B)[^@`
+M````9F:09F:09H%[..$!#X5F`0``9H%[((4`#X><````2`^W0R"`O"A`"```
+M_P^$B0```$B+E1@)``!(C;)XA@$`9H%[((4`=Q1(#[:$*$`(``!(:<"(`0``
+M2(TT`H![)`!U60^V0SJ#^`=T((/X!W\)@_@&="1FD.M"@_@,=#B#^`UF9I!F
+M9I!T%^LP9H-F8OUF9F:09F:0ZR)F@TYB`NL;9H-F8O=FD.L2#[?!ZV(/M\'I
+MIP```&:#3F((9H%[..$!#X6R````@'LZ"P^%J````$B)[@^W2R`/M]$/MD5&
+M_\C_P3G"?20/MD5&C5#_9H'YA0!W#0^WP8"\,$`(``#_=:</M\'_P3G0?..X
+M_P```&8]_P!T7TB)[@^W2R`/M]$/MD5&_\C_P3G"?2P/MD5&C5#_9F9FD&:!
+M^84`=Q$/M\&`O#!`"```_P^%7____P^WP?_!.=!\W[C_````9HE#(,9#)(!(
+MB=Y(B>_H`````.DR`0``QD,D`$@Y:RAT)TB+0W!(A<"0=!V`>!`!=0M(B=Y(
+MB>_H`````$B-<W!(B>_H`````$B#NX``````=`](C;.`````2(GOZ`````!(
+MBWLH2(G>_Y.@````9H%[..$!=6,/MD,Z@^@1/`%W6+K_````9H%[((4`=PU(
+M#[=#(`^VE"A`"```@?K_````#X2B````B=!(:<#0````2(G&2`.U0`D``(!^
+M10`/A84```"`?E#_='](B>_H`````.MU9F:09I"Z_P```&:!>R"%`'<-2`^W
+M0R`/MI0H0`@``(G02&G`B`$``$B)QD@#M1@)``"+0S@E____`#WA`1``#Y7`
+M@?K_````#Y7"#[;`A<)T(V:!>SCA`74+#[9#.H/H$3P!=A"`?GL`=0I(B>_H
+M`````&:02(/$"%M=PV9FD&9FD&9FD$B#[!A(B5PD"$B);"002(G[2(GU#[=6
+M,HG09L'H!0^W\(G1@^$?2,?`_O___TC3P"%$MUQF@?K_#W1%#[?Z2(N+D`D`
+M`$B#//D`=#1(QP3Y`````"&$LY@)```/M_)(C;M8#P``Z`````!(B>Y(B=_H
+M`````$B)[DB)W^@`````2(M<)`A(BVPD$$B#Q!C#D$%44TB#[`A)B?1(BY^0
+M$```2(''6`\``.@`````B<8/M\!(P>`&2`'828D$)+D`````ND````"("$C_
+MP$C_RG7V#[?&2(/$"%M!7,-F9F:00;@`````N`````!(@W]``'1;ZPQ)B<#K
+M,V9F9I!F9I!(BW=`N0````!F9F:09F:0#[;!2(-\QE@`=`I(BT3&6#A0>73/
+M_\&`^01VY$B+1T!F@7A`A0`/EL!-A<`/E<(/ML"%PK@`````20]%P//#D$B#
+M["!(B1PD2(EL)`A,B60D$$R);"0828G\28G-9@^V^L'F"(T\/KX`````08!\
+M)#``#X3H````28-\)%``#X3<````08N$))0```"H";@!````#T3PNP````!(
+MQ\4`````#[;+B?AF(T3-`&8[1,T`#X69````#[9$S04\`P^4PCP'#Y3`"="H
+M`70'0#ATS01U?4'&1"0D(`^VVP^V5-T&#[9TW05,B>?H`````$F+5"10#[9$
+MW0>(0@U-A>UT.TF+30!)BT0D4$B)RDC!ZB")4`-)BT0D4(`(@$'VA"26````
+M!'052(72=!!)BT0D4(E("$F+1"10@"!_28M4)%!!#[9$)#"#Z`>(0@?K$F:0
+M_\.`^P\/AD?___]F9I!FD$B+'"1(BVPD"$R+9"003(ML)!A(@\0@PV9F9I!F
+M9F:02(/L*$B)7"0(2(EL)!!,B60D&$R);"0@2(G]2(GS9H%^((4`#X>6````
+M2`^W1B"`O#A`"```_P^$@P```&:#?B!_=R)(#[:$.$`(``!(BY<8"0``2&G`
+MB`$``$B+1!!(#[90".M?9H%^(($`=R=(#[=&($@/MH0X0`@``$B+EV@)``!(
+M:<#(#P``2(M$$`@/ME`(ZS!(#[=&($@/MH0X0`@``$B+ET`)``!(:<#0````
+M2(N$$(@````/ME`(ZP:0NO____^^_P```&:!>R"%`'<.2`^W0R!F#[:T*$`(
+M``"`^O\/A)<````/MLJ`O"G&"```_P^4PF:!_O\`#Y3`"="H`75[@'LD!G1U
+M3`^VI"G&"```36GDJ````$V-I"R@`0``#[?&2&G`B`$``$F)Q4P#K1@)``"`
+M>SH!=2>_"@```.@`````2(G>2(GOZ`````"Z`@```$R)[DR)Y^@`````ZQR_
+M]`$``.@`````2(G>2(GOZ`````!F9F:09F:02(M<)`A(BVPD$$R+9"083(ML
+M)"!(@\0HPV9F9I!F9I!(@^PH2(E<)`A(B6PD$$R)9"083(EL)"!)B?2)U4B+
+M'TB)W^@`````2(G"2(7`=%_&0#CAQD`Y`4"(:#K&0#L/00^W1"0P9HE"($B)
+M6BC'0C0`````2,="2`````!(QX*@`````````$B)UDB)W^@`````0(#]`74,
+MOP4```#H`````.L*OU##``#H`````$B+7"0(2(ML)!!,BV0D&$R+;"0@2(/$
+M*,-F9F:09F9FD%532(/L"$B)_4B)\V:!?B"%``^'F````$@/MT8@@+PX0`@`
+M`/\/A(4```!F@WX@?W<B2`^VA#A`"```2(N7&`D``$AIP(@!``!(BT002`^V
+M2`CK86:!?B"!`'<G2`^W1B!(#[:$.$`(``!(BY=H"0``2&G`R`\``$B+1!`(
+M#[9(".LR2`^W1B!(#[:$.$`(``!(BY=`"0``2&G`T````$B+A!"(````#[9(
+M".L(9F:0N?____^^_____V:!>R"%`'<-2`^W0R`/MK0H0`@``(#Y_W0A#[;!
+M@+PHQ@@``/\/E,)`@/[_#Y3`"="H`74&@'LD!G4@2(-[>`!T#$B-<WA(B>_H
+M`````$B)WDB)[^@`````ZVL/ML%(#[:\*,8(``!(:?^H````2(V\+Z`!``")
+M\@^VPDAIP(@!``!(B<9(`[48"0``@'LD`'0*N@$```#H`````$B#>W@`=!-(
+MC7-X2(GOZ`````!F9F:09F:02(G>2(GOZ`````!F9I!FD$B#Q`A;7<-F9I!F
+M9I!F9I!(@^PX2(E<)`A(B6PD$$R)9"083(EL)"!,B70D*$R)?"0P28G_28GT
+M3(LW3(GWZ`````!(B<5(A<`/A(X```!,B??H`````$F)Q4B%P'412(GN3(GW
+MZ`````#K<69F9I!(C5U8QD4XX<9%.0'&13H.00^W1"0P9HE%(&9!@V0D8/=)
+MBP=(B44HQT4T``@``$F+11!(B45(3(EM>$C'A:``````````O@````!(B=_H
+M`````(M5-$F+=1A(B=_H`````$B)[DR)]^@`````2(M<)`A(BVPD$$R+9"08
+M3(ML)"!,BW0D*$R+?"0P2(/$.,-(@^P82(D<)$B);"0(3(ED)!!(B?U!B?1(
+MBT=(2(L82(G?Z`````!(B<)(A<!T1,9`.!O&0#D!1(A@/`^W13!FB4(@QH*8
+M````#TB)6BC'0C0`````2,="2`````!(QX*@`````````$B)UDB)W^@`````
+M2(L<)$B+;"0(3(MD)!!(@\08PV9F9I!F9I!F9I!(@^P82(D<)$B);"0(3(ED
+M)!!(B?U(BT=(3(L@3(GGZ`````!(B<-(A<!T<$R)Y^@`````2(G"2(7`=13&
+MA>$````!2(G>3(GGZ`````#K3,9#.``/MT4P9HE#(,:#F`````],B6,HQT,T
+M`````$C'0T@`````2(M"$$B)0U#&0S`D2(E3>$C'@Z``````````2(G>3(GG
+MZ`````!(BQPD2(ML)`A,BV0D$$B#Q!C#D$%6055!5%5328G^28GU2(G3QD)#
+M`<9"0@"^!@```$R)[^@`````2(-[4`!T%DB+4QA(BT,02(E0"$B)`DB+0U#^
+M2%B`>WL`=!]F9F:09F:03(GWZ`````"_`0```.@`````@'M[`'7H2(.[&`$`
+M``!T'@^VLP4!``!(B[L8`0``N@$```#H`````&9FD&9FD$B#>U``=!D/MG-Y
+M2(M[4+H!````Z`````!F9F:09F:02(-[.``/A)D```!(BVLX2(.]@`````!U
+M>TB#O8@`````=7'V0T0$=21!_H;O$P``3(GWZ`````!(BT,X#[9P`;H!````
+M3(GWZ`````!(BT,X#[90`@^V<`%(Q\<`````N`````#H`````$B+4SA)B[;0
+M"```OP$```#H`````$B+4SA)B[;0"```OP8```#H`````$C'0S@`````2,=%
+M8`````!(@WM8`'022(M36$@/MD-Y2,=$PE@`````2(M3"$B+`TB)4`A(B0)!
+M_DT.2(G>3(GWZ`````!!@'T)_W150;P`````08!]#@!V.$F-;6!(B>_H````
+M`$B)PTB+10A(B5T(2(DK2(E#"$B)&(![0O]U"T'_Q$4X90YWU.L&13AE#G<0
+M0<9%"?],B>Y,B??H`````%M=05Q!74%>PY")\`^VP$B-!,!(P>`'!6!7``")
+M!\-F9F:09F9FD&9FD$&)T$B)^;\`````B?)(B<A(A=)T"T"(.$C_P$C_RG7U
+MB3&)\DB!ZF!7``!(N(_C.([C.([C2/?B2,'J"HA1!$0XPG8$1(A!!+H`````
+M@'D$`'8?#[;"QD0!!_](C03`2,'@!\:$",17``#]_\(X401WX<9!!@#&004`
+MN@````"0#[;"2&G`L````$B-A`@`0@``QD`+`8A0"O_"@/H?=N#SPV9F9I!F
+M9F:09F:09F:005154TF)]$B)^[T`````@'\$`'9#B>H/ML)(C03`2,'@!T@!
+MV("XQ%<``/UT(DB-N+Q7``"Z"````$R)YN@`````A,!T"D`/ML7K$69F9I#_
+MQ4`X:P1WO;C_````6UU!7,-F9F:09F9FD&9FD&9FD%-(B?OH`````+H)````
+M//]T$P^VP$B-!,!(P>`'#[:4&&97``")T%O#9F9FD&9FD$B#["A(B5PD"$B)
+M;"003(ED)!A,B6PD($F)_4B)\TB-MI````!)B=Q(BZN8````@'T&``^$3@$`
+M`$B)[^@`````B<$\_P^$/`$```^V0P&#^`%T<(/X`7\,A<!T*&9FD.DB`0``
+M@_@0#X21````/9`````/A-4```!F9F:09F:0Z0(!``"`O0M"````9F9FD`^%
+M\0```,:%"T(```'^308/MM%!N0````!!N`````"Y`````$R)[DB)[^@`````
+MZ<,```"`O0M"````#X6V````QH4+0@```?Y-!@^VT4&Y`````$&X`````+D!
+M````3(GN2(GOZ`````#IB````+H!````#[;"2&G`L````$B-A"@`0@``.$@(
+M=0L/MD`)03I$)`ET!__"@/H?=M?^308/MM%-B>%%#[9$)`FY$````$R)[DB)
+M[^@`````ZSE(#[:#J@```$AIP+````#&A"@+0@```?Y-!@^VT4&Y`````$&X
+M`````+F0````3(GN2(GOZ`````!(BUPD"$B+;"003(MD)!A,BVPD($B#Q"C#
+M055!5%532(GU28G538G,08G)NP`````/ML-(:<!0$```2#EL."!U:+D`````
+M#[;#2&GP4!````^WP4C!X`5(`?!,C10X38U:0$$/MD,,A,`/E,(\\`^4P`G0
+MJ`%T(DF):C!-B6HX9D6)0P)%B$I`28L$)$F)0D1!QD,,_^L29I#_P6:!^8$`
+M=JYF9F:09F:0_\.`^P-V@%M=05Q!7<-FD$B#[`A)B?.)T$B)_DR-EV!!``#&
+MAPM"````0;D`````0;B0````3(G19F9FD&9FD$2("4C_P4G_R'7U0<9"`0!!
+MQ@)`2,>&`$(```````!(B;[X00``#[;`2(T$P$C!X`=(BX0PO%<``$B)AO!!
+M``!(@<9@00``3(G?Z`````!(@\0(PV9F9I!F9F:09F9FD$B#[`A)B?.)T$B)
+M_DR-EV!!``#&APM"````0;D`````0;B0````3(G19F9FD&9FD$2("4C_P4G_
+MR'7U0<9"`0%!Q@)`2,>&`$(```````!(B;[X00``#[;`2(T$P$C!X`=(BX0P
+MO%<``$B)AO!!``!(@<9@00``3(G?Z`````!(@\0(PV9F9I!F9F:09F9FD%53
+M2(/L"$B)]8G328GYN@$````/ML-(C03`28G#2<'C!P^VPDAIP+````!*C80(
+M`$(``(!X"P$/A;,```"(6`B(2`G&0`L`2`^V0`I(:<"P````3HV4"&!!``!!
+MN`````"^D````$R)T&9F9I!F9I!$B`!(_\!(_\YU]4'&0@$00<8"0$&(2@D/
+MMM)(:=*P````3`'*2(V*`$(``$@/MD$*2&G`L````$P!R$C'@`!"````````
+M2(FX^$$``$N+A`N\5P``2(F"\$$``$@/MG$*2&GVL````$J-M`Y@00``2(GO
+MZ`````#K%F9FD&9FD/_"@/H?#X8F____N`$```!(@\0(6UW#9F:09F:09F:0
+M055!5%532(/L"$F)]4F)U$R)S4&)R42)P4F)^KH!````#[;=#[;"2&G`L```
+M`$P!T$B-L`!"``"`?@L!#X62````QD8+`$R)D/A!``!(#[9&"DAIP+````!.
+MC9P08$$``$&X`````+Z0````3(G8D$2(`$C_P$C_SG7U0<9#`9!!Q@-`08A;
+M!D&(2P=%B$L)2(M%`$F)0Q`/MO)(:?:P````3`'62,>&`$(```````!(B;[X
+M00``28M$)%Q(B8;P00``2('&8$$``$R)[^@`````ZQ#_PH#Z'P^&1?___[@!
+M````2(/$"%M=05Q!7<.04TB)\TF)TT2)PDB)_DR-EV!!``!!N0````!!N)``
+M``!,B=!$B`A(_\!)_\AU]4'&0@$30<8"0`^VQD&(0@9!B%('08A*"4C'A@!"
+M````````2(F^^$$``$F+0UQ(B8;P00``2('&8$$``$B)W^@`````6\-F9F:0
+M9F9FD&9F9I`/MM(/MTQ6>/_!9HE,5GAF#[9&`@'(#[?`PV9FD&9FD+H!````
+MB=!(:<"P````@+PX"T(```%U"(G0PV9FD&:0_\*#^A]VWKC__P``9F9FD,-F
+M9F:09F9FD&9F9I!F9I"Y`0```(G(2&G`L````$B-A#@`0@``0#AP"'4*.%`)
+M=07&0`L!P__!@_D?9F:09I!VT_/#9F9FD&9F9I!F9F:02(/L6$B)7"0H2(EL
+M)#!,B60D.$R);"1`3(ET)$A,B7PD4$F)_TB)="0808G61(A$)!=)B?Q-B<T/
+MML)(C03`2,'@!X"\.,17``#]N/W___\/1,@/ML&#^!`/A)$"``"#^!!_'(7`
+M#X2D````@_@!D`^$/0$``.D%"0``9F:09I`]X@````^$9@@``#WB````?Q,]
+MD`````^$5P<``&9FD.G;"```/?\```!F9I!F9I`/A<H(```/ML)(C03`2,'@
+M!\:$.,17``#_@+\+0@```74?00^VUDB+="08Z`````"%P`^%F`@``$'^1P;I
+MCP@``$2)\0^VP<9$!P<!2(M4)!A(B53'$.EU"```9F:09I!(C8]@00``@+\+
+M0@```750#[;"2(T$P$C!X`=(`?@/ME$)B)!B5P``2`7`5P``#[91"H/B`8A0
+M!<9`!`!!#[;62(MT)!CH`````(7`#X4>"```0?Y'!ND5"```9F:09I`/ML+&
+M1`<'`4B+5"082(E4QQ#I^0<``$'&1`0'_P^VTDF+=,000;D`````0;@`````
+MN?\```!,B?_H`````.G-!P``NP````!(C9=@00``1(GQ#[;!2(T$P$C!X`=(
+MC0PX#[9",HB!LE<```^W0C!FB8&P5P``2(M"*$B)@:!7``!(BT(,2(F!<%<`
+M`$B+0A1(B8&`5P``2(M"'$B)@8A7``"+0B2)@9A7``#&@<17```!@'\&'P^$
+M5`<``("Y8E<```!T?4$/ML:)1"001(GR#[;"2(T$P$B)Q4C!Y0=)B<U,C;0]
+ML%<``&9F9I!F9I`/MLN+5"002(MT)!A,B?_H`````(7`=2#_PT'^1"0&03B=
+M8E<``'4*0<:%LU<```#K#D&(7@/K"$&(7@/K%&:008!\)`8?=`I".)PE8E<`
+M`'>N0<:$)`M"```!N@````!!@'PD!``/AK0&``!F9F:0#[;"08!\!`<!#X2H
+M_O___\)!.%0D!'?HZ9,&``!F9I#&1"0/_TF+01A(B40D(`^VPDB-!,!(P>`'
+M2(TL.$B-A<!7``#&0`000?9!#'`/A(`#``!(@[W(5P```'1Y#[98!DB+O<A7
+M``!(@\=<N@@```!(C70D(.@`````A,!U5T'V10\/=%!(BZW(5P``2(7M=$2`
+M?64`=#0/MMN)VDB)[DR)Y^@`````38U-&$0/M\")V4B)ZDB+="083(G_Z```
+M```/MEUF2(MM:.L%O0````!(A>UUO$$/ME4/]L(-#X0<`0``1(GQ#[;!2(T,
+MP$B)R$C!X`=,`>"`N&!7```?#X?[````#[:88%<``/;""'06#[;#2(T$R$C!
+MX`1"QH0@X%D```;K'D2)\@^VP@^VTTB-!,!(C03"2,'@!$+&A"#@60``!T2)
+M\`^VR`^VPTB-#,E(C13(2,'B!$P!XDB-LN!9``#&1@$`00^V10^(1@-(BT0D
+M($B)@NA9``!!#[9%"8A&`DC!X0=!#[9%#8/@#T(/MI0A9E<``#C"#T?0@^(/
+M#[9&!(/@\`G0B$8$1(GR#[;"2(T$P$B)\4C!X`>^#P```$$B=2E"#[:4(&97
+M``!`./(/1];!X@0/MD$$@^`/"="(001$B?$/ML%(C03`2,'@!T+^A"!@5P``
+MZ=,!``!!]D4/`@^$R`$``$B-="0@3(GGZ`````!!B<`\_P^%4@$``,9$)`\`
+M08!\)`0`=C=(#[9$)`](C03`2,'@!T(/MH0@Q%<``#S_#Y3"//T/E,`)T*@!
+M=1#^1"0/#[9$)`]!.$0D!'?)2`^V1"0/2(T$P$C!X`>Y`````+ID````2HV$
+M(&!7``"("$C_P$C_RG7V2`^V5"0/2(T4TDC!X@=,`>)$B?$/ML%(C03`2,'@
+M!TP!X$B-N&!7``!(B;K(5P``2(N(O%<``$B)BK17``!(BTPD&$B)BMA9``!(
+MBX#05P``2(F"T%<``,:"Q%<``/](C8I@5P``2`^V<0=!#[9%"8B$,FA7``#^
+M00=!#[95#8/B#P^V1P8XT`]'PHA!!D@/MD0D#TB-!,!(P>`'3`'@2(M4)"!(
+MB9"\5P``00^V50^(D&-7```/ME0D%XB0QE<``$$/MD0D!4$Z1"0$=09!QD0D
+M!0!!_D0D!>M+QD4#`.D[`P``1(GQ#[;12(T4TDC!X@</ML!(C03`2,'@!TJ-
+M-"!(C8Y@5P``2CF,(LA7``!T%$@/ME$'00^V10F(A!9H5P``_D$'08#X_W46
+M2`^V1"0/0<9$!`<!2(M4)!A)B53$$$$/ME4)00^V]DR)Y^@`````1(GQ#[;!
+M2(G"2(T$P$C!X`=*C0P@2(V!L%<``(!X`P`/A+8```!!@'PD!A\/A)H"```/
+MMD`#.H%B5P``#X.*`@``10^V[DF)UF9FD$B-!-)(P>`'2HT<(,:#Q%<``!!(
+MC:NP5P``#[9-`T2)ZDB+="083(G_Z`````"%P`^%2@(``$'^1"0&#[9%`__`
+M#[:38E<``#G0#X3L_O__3(GR2XT$]DC!X`=*C30@2(V&L%<```^V2`/_P8A(
+M`T&`?"0&'P^$!0(``#J.8E<```^">?___^GT`0``9F9FD$&`?"0&``^%Y`$`
+M`$$/MM9!N0````!!N`````"YD````$B+="083(G_Z`````#IO0$``$'&1`0'
+M_P^VTDF+=,000;D`````0;@`````N?\```!,B?_H`````,9$)`<!Z<L```#&
+M1"0'`,=$)`@`````BT0D"$AIP%`0``!(BU0D&$HY5"`@=6>]`````(M$)`A,
+M:>A0$```B>A(P>`%3`'H3`'@2(U80(![#/]U-T&`?"0&'P^$-@$```^V2$!,
+MC4A$1`^W0P)(BU`X2(MT)!A,B?_H`````(7`=0E!_D0D!L9##/#_Q8']@0``
+M`':I_T0D"(-\)`@##X9S____08!\)`8`#X7F````N@````!!@'PD!`!V&`^V
+MPD&`?`0'`0^$#?_____"03A4)`1WZ(!\)`<`#X6V````00^VUD&Y`````$&X
+M`````+GB````2(MT)!A,B?_H`````.F/````NP````"`?P0`=CMF9F:0#[;#
+M2(T$P$C!X`=*C8P@P%<```^V402`^OT/E<"`^O\/E<(/ML"%PG0$QD$$_O_#
+M03A<)`1WR42)\0^VP4B-!,!(P>`'2HNL(-!7``"[``````^VPTAIP%`0``!,
+M`>!(C5`@@'H(`74-QD((`$B+<"!,B?__U?_#@/L#=M5F9I!(BUPD*$B+;"0P
+M3(MD)#A,BVPD0$R+="1(3(M\)%!(@\18PV9F9I!F9I!F9I!F9I!!B='&`?ZZ
+M`````$&X`````(!_!`!V,P^VPDB-!,!(P>`'2`'X2#FPV%D``'4513C(=0T/
+MMH#$5P``B`'#9F:00?_`_\(X5P1WS?/#9F9FD%532(/L"$F)TTR)Q4&)R$B)
+M^P^V1P4Z1P1U!,9'!0`/MDL%N@`````/ML)(:<!0$```2`'83(U(($@Y<"!U
+M04'&00@!N0````"`>P0`=E\/ML%(C03`2,'@!T@!V$@YL-A9``!U#@^V@,17
+M``"#P`,\`78Z_\$X2P1WU.LQ9F:0#[;"2&G`4!```$@!V$R-2"!(@W@@`'4+
+M2(EP($'&00@!ZPO_PH#Z`P^&>O___P^VPDAIP%`0``!!N@````!!N0(0``!(
+MC408,&9F9I!F9I!$B!!(_\!)_\EU]0^VP4B)=,,02(T$P$C!X`=!N@````!!
+MN60```!(C8088%<``$2($$C_P$G_R77U#[;!2(T$P$C!X`=!N@````!!N0`"
+M``!(C808V%<``$2($$C_P$G_R77U#[;!2(T$P$C!X`=(`=A(B;#860``2(FH
+MT%<``,:`Q%<``/](QX#(5P```````$F+$TB)D+Q7``!$B(!F5P``#[;10;D`
+M````0;@`````N?\```#H`````/Y#!4B#Q`A;7<-F9F:09F:09F:04[L`````
+M@'\$``^&D0````^VPTB-!,!(P>`'2#FT.-A9``!U<;H!````#[;"2&G`L```
+M`$B-A#@`0@``.%@(=03&0`L!_\*`^A]VW@^VPTB-!,!(P>`'2`'X2,>`V%D`
+M``````"Y`````+ID````2(V`8%<``(@(2/_`2/_*=?8/ML-(C03`2,'@!\:$
+M.,17``#]_D\%_\,X7P0/AV____^[``````^VPTAIP%`0``!(`?A(C5`@2#EP
+M('4Q2,=`(`````#&0@@`N@`````/ML-(:<A0$```#[;"2,'@!4@!R,9$.$P`
+M_\*`^H%VZO_#@/L#=K%;PV9FD&9FD&9FD%-)B?E!N@````"_`````(#Z`0^%
+M*`$``$V%P`^$`P$``$&`>00`=BA$B=(/ML)(C03`2,'@!THYM`C860``=0=`
+M.,]T"__'0?_"13A1!'?81(G0#[;(2(G/2(T,R4C!X0=,`<E(C9%@5P``2(N!
+M8%<``$F)`$B+0@A)B4`(2(M"$$F)0!!(BT(828E`&$B+0B!)B4`@2(M"*$F)
+M0"A(BT(P28E`,$B+0CA)B4`X2(M"0$F)0$!(BT)(28E`2$B+0E!)B4!02(M"
+M6$F)0%B+0F!!B4!@NP````"`N6!7````=D(/ML-(B<%(P>$$3`'!2(TT_TB-
+M!/!(P>`$3`'(2(N0X%D``$B)461(BX#H60``2(E!;/_#2,'F!T(XG`Y@5P``
+M=[Y$B=(/ML)(C03`2,'@!T(/MH0(8%<``.LZ9F:00;H`````NP````!!@'D$
+M`'8A#[;#2(T$P$C!X`=*.;0(V%D```^4P$$!PO_#03A9!'??00^VPEO#D)"0
+MD)"0D$B+%TR+`KD`````@'I#`'862`^V=PU(B?!(T_BH`74'_\$X2D-W[X#Y
+M`W8D2(T$C0`````E_`,``$*+A`#0`0``B04`````ZR)F9F:09F:02(T$C0``
+M```E_`,``$*+A`#0`0``B04`````J0``$``/E<`/ML##9F:09F:09F:005=!
+M5D%505154TB#[`A(B3PD3(LO38ME`,9&00#&1D`%QD9#!DB+!"1(B49(0;\`
+M````0;X`````NP````!!@'U#`'8?2(L,)$@/ME$-9I!(B=")V4C3^*@!=0C_
+MPT$X74-W[(#[`W8;2(T$W0`````E^`<``$+'A"```@``+````.L92(T$W0``
+M```E^`<``$+'A"```@``+````+\0)P``Z`````"`^P-V)$B-!-T`````)?@'
+M``!"BX0@!`(``(D%``````^VZ.LB9F9FD$B-!-T`````)?@'``!"BX0@!`(`
+M`(D%``````^VZ$$)[H#[`W8;2(T$W0`````E^`<``$+'A"```@``)````.L9
+M2(T$W0`````E^`<``$+'A"```@``)````+\0)P``Z`````"`^P-V)TB-!-T`
+M````)?@'``!"BX0@!`(``(D%`````(G%@>7___\`ZR5FD$B-!-T`````)?@'
+M``!"BX0@!`(``(D%`````(G%@>7___\`B>C!X`A!"<:`^P-V($B-!-T`````
+M)?@'``!"QX0@``(``"````#K'F9FD&:02(T$W0`````E^`<``$+'A"```@``
+M(````+\0)P``Z`````"`^P-V'TB-!-T`````)?@'``!"BX0@!`(``(D%````
+M`(G%ZQU(C03=`````"7X!P``0HN$(`0"``")!0````")Q4&!_@$!:99U%TB+
+M!"2`2`P&B>C!Z!`\4`^4P`^VP.M`08'^`0$``'43B>C!Z!`\4`^4P`^VP.LH
+M9F9FD+^($P``Z`````!!_\=!@/\$#X;,_?__B>C!Z!`\4`^4P`^VP$B#Q`A;
+M74%<05U!7D%?PV9F9I!F9I!F9I!F9I!54TB#[`A(B?U(BQ_H`````(3`=1'&
+M10G_2(GN2(G?Z`````#K;+D`````@'M#`'862`^V50U(B=!(T_BH`74'_\$X
+M2T-W[TB)W^@`````2(G&2(7`=#M(C45@2(M0"$B)<`A(B09(B58(2(DR_D4.
+M2(EN2,9&0`7&1D$`QD9Y#[D!````N@$```!(B>_H`````$B#Q`A;7<-F9F:0
+M9F:0055!5%532(/L"$F)_$B)]4R++[L*````2(GN3(GGZ`````"$P'4.O^@#
+M``#H`````/_+=>.Y`````$&`?4,`=AA)#[94)`U(B=!(T_BH`74(_\%!.$U#
+M=^Y(BU4(2(M%`$B)4`A(B0)!_DPD#DB)[DR)[^@`````0?9$)`P"=%5)@WPD
+M0`!U($R)[V9FD&:0Z`````!(B<9(A<`/A(\!``!)B40D0.L%28MT)$!,B2Y,
+MB::(````QD9&`,9&1P#&1D(`9H-.3@1,B>_H`````.E;`0``28-\)$``#X3@
+M````28MT)$!(@<:0````28M]*.@`````28MT)$!,B>_H`````$F-1"1@2(G"
+M23E$)&`/A*(```!(B<-F9F:09F:02(G7Z`````!(B<5(@W@X`'1H2(M`.$C'
+M0&``````]D5$!'4D0?Z%[Q,``$R)[^@`````2(M%.`^V<`&Z`0```$R)[^@`
+M````2(M5.$F+M=`(``"_`0```.@`````2(M5.$F+M=`(``"_!@```.@`````
+M2,=%.`````!!_DPD#DB)[DR)[^@`````2(G:23E<)&`/A6C___])QT0D0```
+M``!!@'PD#@!T%$F-?"1@Z`````!(B<5!_DPD#NL+3(GOZ`````!(B<5(A>UT
+M0TF-1"1@2(M0"$B):`A(B44`2(E5"$B)*D'^1"0.3(EE2,9%0`7&14$`QD5#
+M!L9%0@-(B>Y,B>_H`````&9F9I!F9I!(@\0(6UU!7$%=PV9FD&:02(/L.$B)
+M7"0(2(EL)!!,B60D&$R);"0@3(ET)"A,B7PD,$F)_$F)]4&)UD&)STB+!TB)
+M!"2Z`````+T`````@'\.`'9$2(U?8&9F9I!F9I!(B=_H`````$B)PDB+0PA(
+MB5,(2(D:2(E""$B)$$PY:E!U#40X<GET$&9F9I!F9I#_Q4$X;"0.=\=!.&PD
+M#F:0="Y!@/]0=2C&0D,&QD)"!<9"0`?&0D$`3(EJ4$R)8DA(B=9(BSPDZ```
+M``!F9F:02(M<)`A(BVPD$$R+9"083(ML)"!,BW0D*$R+?"0P2(/$.,-F9F:0
+M9F:09F:09F:02(/L.$B)7"0(2(EL)!!,B60D&$R);"0@3(ET)"A,B7PD,$F)
+M_4F)]DR+)T&______[N`____O?____^`^X5W#`^VPT(/MJP@0`@``$"`_?]T
+M-8GJ#[;"28N4)&@)``!(:<#(#P``3#EL$`AU&DB-/!"Z"````$R)]N@`````
+MA,!T!4&)[^L+_\.`^X%F9F:0=J1!#[;'2(M<)`A(BVPD$$R+9"083(ML)"!,
+MBW0D*$R+?"0P2(/$.,-F9F:09F:005=!5D%505154TB![$@"``!)B?Y(B70D
+M.(A4)#=(BT<(2(E$)"A,BR@/ME=8B%0D)TB-1TA(B<)(.4=(#X1L`@``@'PD
+M)P`/A&$"``!,C7PD0$B)1"0(2(D$)&9FD&:02(G7Z`````!(C6CP#[9,)#=-
+MB?BZ`0```$B+="0H2(M\)#CH`````$&\`````(!\)$``#X;M````2(U5$$B)
+M5"082(M,)`A(B4PD$&9F9I!$B>(/ML)(P>`$2HT<.$B->VRZ"````$B-M<P`
+M``#H`````(3`#X2=````2(U38`^V0@B#X`^(A>(````/MTU@9H'AW_V)R(/(
+M$&:)16`/MD((P.@$/`EU"8G(@\@P9HE%8$2)X0^VP4C!X`1"#[9$.&C`Z`0\
+M"G4&9H%-8``"2(M4)!!(BT((2(M,)!A(B4H(2(E5$$B)00A(B0@/MD5$J`)T
+M,H/@_8A%1$B#?3@`="5(BU4X28NUT`@``+\&````Z`````#K#D'_Q$4X)P^'
+M+/___^L)13@G#X<&`0``2(GJO@8```!(BWPD*.@`````@'U[`'083(GOZ```
+M``"_`0```.@`````@'U[`'7H2(.]&`$```!T&`^VM04!``!(B[T8`0``N@$`
+M``#H`````$B#?5``=!@/MG5Y2(M]4+H!````Z`````!F9I!F9I!(@WTX`'1H
+M2(M%.$C'0&``````]D5$!'4D0?Z%[Q,``$R)[^@`````2(M%.`^V<`&Z`0``
+M`$R)[^@`````2(M5.$F+M=`(``"_!@```.@`````2(M5.$F+M=`(``"_`0``
+M`.@`````2,=%.`````!(BU4(2(M%`$B)4`A(B0)(BT0D*/Y(#D'^3EA(B>Y,
+MB>_H`````/Y,)"=(BQ0D23E62'0+@'PD)P`/A;+]__](@<1(`@``6UU!7$%=
+M05Y!7\-!5T%6055!5%532('L.`(``$B)?"0H28GU2(E4)"!(BP=(B40D&,9$
+M)!<`2(U<)#!$#[;A28G81(GAN@$```!(B?Y,B>_H`````$F)WD2)XDR)[DB+
+M?"0@Z`````!(BTPD($B+44A,C7KP2(G(2(/`2$@YPG0]2(G!9F9FD&9FD$$/
+MMD=!/`T/E,(\(@^4P`G0J`%T$<9$)!<!0<9'0@5!QD=#!.L-28M'$$R->/!(
+M.<AUS;T`````08`^``^&#`(``$B+1"0@2(/`2$B)1"0(2(D$)$B+3"0@2(M!
+M2$R-8/!(.T0D"'0YB>H/ML)(B<-(P>,$3(LL)$F-O"3,````N@@```!*C70S
+M;.@`````A,!U#DF+1"003(U@\$PYZ'7728U$)!!(.T0D"`^%D@$``,9$)!<`
+M2(M\)!CH`````$F)Q$B%P`^$E@$``$B+3"0H_D$.QD!"!<:`X`````#&0$,$
+M9L>`P```````QH#"`````$C'0'````4`B>H/ML)(P>`$2HU$,&`/ME`$08A4
+M)$`/ME`%08A4)$%)B4PD2`^V4`B#X@]!B)0DX@```$$/MTPD8&:!X=_]B<J#
+MRA!F08E4)&`/MD`(P.@$/`EU"XG(@\@P9D&)1"1@B>D/ML%(P>`$0@^V1#!H
+MP.@$/`IU"&9!@4PD8``"2(M$)"!)B40D4(GJ#[;"2,'@!$P!\`^V4&9!B%0D
+M>4B+0&Q)B80DS````$F)A"3$````2(M,)"#^05A(BT0D*$B#P&!(BU`(3(E@
+M"$F)!"1)B50D"$R)(DF-1"002(M,)`A(BU$(2(E!"$F)3"002(E0"$B)`DD/
+MMD0D0*@"=">H!'0CJ`%T'T$/ME0D>4R)X4B+="0@2(M\)"CH`````.LH9F:0
+M9I!)#[9$)$"H`G09J`1F9F:0=!&H`74-3(GF2(M\)!CH`````/_%03@N#X<&
+M_O__@'PD%P!T#;X*````3(G_Z`````!(@<0X`@``6UU!7$%=05Y!7\-F9F:0
+M9F9FD&9F9I!!5T%6055!5%532('L2`(``$F)_$B)="0X3(LO#[9'*(A$)#=(
+MC4=(2(G"2#E'2`^$1@,``(!\)#<`#X0[`P``2(E$)!!(B40D"$B)U^@`````
+M2(UHR$&X`````+D`````N@````!,B>9(BWPD..@`````08G'0;X`````03C&
+M#X/<`0``2(U4)$!(B50D*$B-33A(B4PD($B+1"002(E$)!A!#[;>0;@`````
+MB=FZ`0```$R)YDB+?"0XZ``````/ML!(P>`$2(/`9$@]``(```^'7P$``$R+
+M1"0HB=FZ`0```$R)YDB+?"0XZ`````!(BUPD*$B->URZ"````$B)[N@`````
+MA,`/A"@!``!(BU0D&$B+0@A(BTPD($B)2@A(B54X2(E!"$B)"`^V1"1"B$59
+M2(US5$R)Y^@`````//]T%0^VP$AIP,@/``!)`X5H"0``2(E%$$6$]G11#[9#
+M`]'H@^`!P>`$#[9578/B[PG"B%5=#[9#`\'H`X/@`<'@!8/BWPG"B%5=#[9#
+M`\'H`H/@`<'@`X/B]PG"B%5=#[9#!HB%NP```.F6````#[9#`HA%64R)90@/
+MMD,&B(6[````#[=#!(E%8`^W0U!FB86X````#[9#4HB%N@```$B+0T!(B86H
+M````2(M#2$B)A;````!(BT,02(E%>$B+0QA(B86`````2(M#($B)A8@```!(
+MBT,H2(F%D````$B+0S!(B868````2(M#.$B)A:````#K#D'_QD4X_@^"8/[_
+M_^L=00^VSDB)ZDB+="0X3(GGZ`````!%./X/@O\```!(C45(2(G"2#E%2`^$
+MW@```$F)QDB)U^@`````2(U8\$B)VKX&````3(GGZ`````"`>WL`=!A,B>_H
+M`````+\!````Z`````"`>WL`=>A(@WLX`'1L2(M#.$C'0&``````]D-$!'4H
+M0?Z%[Q,``$R)[^@`````2(M#.`^V<`&Z`0```$R)[^@`````9F9FD$B+4SA)
+MB[70"```OP$```#H`````$B+4SA)B[70"```OP8```#H`````$C'0S@`````
+M2(M3"$B+`TB)4`A(B0)!_DPD#OY-6$B)WDR)[^@`````3(GR3#EU2`^%)?__
+M_T'^3"0H2(GN3(GOZ`````#^3"0W2(M4)`A).50D2'0+@'PD-P`/A<_\__](
+M@<1(`@``6UU!7$%=05Y!7\-F9I!!5T%6055!5%532('L*`(``$F)_DB)]4B+
+M!DB)1"082(G^2(GOZ`````!!N`````"Y`````+H`````2(GN3(GWZ`````"(
+M1"070;P`````03C$#X-&`P``2(U58$B)%"1!#[;<0;@`````B=FZ`0```$B)
+M[DR)]^@`````#[;`2,'@!$B#P&1(/0`"```/A_T"``!,C40D((G9N@$```!(
+MB>Y,B??H`````$R-;"0@28UU7$B)[^@`````//\/A<T"``!(BWPD&.@`````
+M2(G#2(7`#X3<`@``_D4HQD!8`$B+1"1\2(D#28UU5$B)[^@`````//]T&@^V
+MP$AIP,@/``!(BU0D&$@#@F@)``!(B4,000^V10*(0UE!#[9%`]'H@^`!P>`$
+M#[9378/B[PG"B%-=00^V10/!Z`.#X`'!X`6#XM\)PHA374$/MD4#P>@"@^`!
+MP>`#@^+W"<*(4UU(B6L(00^V10:(@[L```!)BT4(2(E#<$$/MD4'B$-:00^W
+M102)0V!!#[=%4&:)@[@```!!#[9%4HB#N@```$F+14!(B8.H````28M%2$B)
+M@[````!)BT402(E#>$F+11A(B8.`````28M%($B)@X@```!)BT4H2(F#D```
+M`$F+13!(B8.8````28M%.$B)@Z````!(C5,X2(U%2$B+2`A(B5`(2(E#.$B)
+M2@A(B1%FQT0D%```08!]```/A'$!``!(BP0D2(E$)`A,C7M(9F9FD$B+?"08
+MZ`````!(B<%(A<`/A&\!``#^10[&0$(%QH#@`````,9`0P1(QT!P```%`&;'
+M@,```````$@/MU0D%$C!X@1*C50J8`^V0@2(04`/MD(%B$%!2(EI2$B)65`/
+MMD(&B$%Y#[9""(/@#XB!X@````^W<6!F@>;?_8GP@\@09HE!8`^V0@C`Z`0\
+M"74)B?"#R#!FB4%@2`^W1"042,'@!$(/MD0H:,#H!#P*=09F@4E@``)(#[=$
+M)!1(P>`$2HM$*&Q(B8',````2(F!Q````/Y#6$B+5"0(2(M""$B)2@A(B1%(
+MB4$(2(D(2(U!$$F+5PA)B4<(3(EY$$B)4`A(B0)(#[9!0*@"=!FH!'05J`%T
+M$0^V47E(B=Y(B>_H`````.L>2`^V04"H`G05J`1T$:@!=0U(B<Y(BWPD&.@`
+M````9O]$)!1F00^V10!F.T0D%`^'I_[__V9F9I!F9I!!_\1$.F0D%P^"POS_
+M_X!]#@!U$<9%"?](B>Y(BWPD&.@`````2('$*`(``%M=05Q!74%>05_#9F:0
+M9F:09F:0055!5%532(/L"$F)_4B)]4&X`````+D`````N@````#H`````$&)
+MQ+L`````.,-S)0^VTTB-3"0'2(GN3(GOZ`````"`?"0'_@^%D0```/_#1#CC
+M<MO^35B`?5@`=&A,BV4`QD58`$B+54A(C5K(2(U%2$@YPG1H2(G"9F:09I!(
+M@WL0`'0/2(M#.$B-6,A(.=!U[.M*_D582(GN3(GOZ``````/MHN[````28N\
+M)&@0``!)Q\``````2(G:2(GNZ`````#K&4B)[DR)[^@`````2(GN3(GOZ```
+M``!F9I!(@\0(6UU!7$%=PV9FD&:02(L7O@H```"Y`````(!Z0P!V-4@/MG\-
+M2(GX2-/XJ`%T'P^VP4AKP&B+A!!L$@``)0```P#!Z!"#P`A`./`/0O#_P3A*
+M0W?00`^VQL-F9I!(BQ>^"````+D`````@'I#`'8U2`^V?PU(B?A(T_BH`70?
+M#[;!2&O`:(N$$&P2```E```#`,'H$(/`"$`X\`]'\/_!.$I#=]!`#[;&PV9F
+MD$B#[%A(B5PD*$B);"0P3(ED)#A,B6PD0$R)="1(3(E\)%!)B?U,BR=!OP``
+M``"`?PT`#X2=`P``O0`````/MD<-B<*H`74,_\6)T(GIT_BH`73TB>H/ML)(
+M:\!H2HV4(%`2``"+0@RI```"`'0-#0``!``E___]_XE"#(GI#[;!2&O`:$+V
+MA"!>$@``!`^$CP(``$V-M"0`%```33FD)-`(``!T"$V+M"30"```B>H/ML)(
+M:\!H3`'@1`^VB&(2``!$#[:`81(```^VB&`2``!!#[94)$%`#[;U#[:X9Q(`
+M`(E\)"`/MKAF$@``B7PD&`^VN&42``")?"00#[:X9!(``(E\)`@/MH!C$@``
+MB00D2,?'`````+@`````Z`````!!N(````")Z0^VP4AKP&A.C8P@8!(``/Q!
+M#[?`9D(/MH0P0`@``&8]_P!T+P^WP$AIP,@/``!(B<-)`YYH"0``2(G>3(G/
+MN0@```#SI@^7P@^2P#C"#X14`0``0?_`9D&!^($`=K),B>?H`````$B)PTB%
+MP`^$.@(``(GJ#[;"2&O`:$+VA"!=$@``!'0$@$M=`HGI#[;!2&O`:$+VA"!>
+M$@``!'0$@$M=$(GJ#[;"2&O`:$+VA"!=$@``"'0$@$M=!(GI#[;!2&O`:$+V
+MA"!>$@``"'0$@$M=((GJ#[;"2&O`:$+VA"!=$@```G0$@$M=`8GI#[;!2&O`
+M:$+VA"!>$@```G0$@$M=",9#6`")Z@^VPDAKP&A*BX0@8!(``$B)`TR):PA,
+MB>_H`````(B#NP```$'^12BY`````$&`?"1#`'8E20^V10U(T_BH`7001(GZ
+M#[;"B$P8</Y#6D'_Q__!03A,)$-WVTB-4SA)C45(2(M("$B)4`A(B4,X2(E*
+M"$B)$4'^15@/MHN[````28N\)&@0``!)Q\``````2(G:3(GNZ`````#I!0$`
+M`$0/MDL$1`^V0P,/MDL"#[93`0^V,P^V0P>)1"00#[9#!HE$)`@/MD,%B00D
+M2,?'`````+@`````Z`````!!QD4)_TR)[DR)Y^@`````Z;,```")Z0^VP4AK
+MP&A*C2P@]H5>$@``"`^$F0```$R)Y^@`````2(G#2(7`#X2%````QD!#!L9`
+M0@5FQX#```````#&0$`&QD!!`$C'0'````4`2(N%8!(``$B)@\P```!(B8/$
+M````3(EK2$R)[^@`````B(/B````9H-+8!!,B>_H`````#P)=@9F@4M@``)!
+MQD4.`4F-16!(BU`(2(E8"$B)`TB)4PA(B1I(B=Y,B>?H`````$B+7"0H2(ML
+M)#!,BV0D.$R+;"1`3(MT)$A,BWPD4$B#Q%C#9F9FD&9F9I!!5T%6055!5%53
+M2(/L"$B)^TF)];@`````2(7V=`0/MD8)#[;`0;P`````A<!T$3W_````#X1L
+M`0``Z=$%``"01(GB#[;"#[:$&,8(```\_W02#[;`2&G`J````$R-K!B@`0``
+M0?_$08#\`W;30;P`````1(GB#[;"#[:$&,8(```\_W0S#[;`2&G`J````$R-
+MK!B@`0``0?9%"@)T$KX`````3(GOZ`````#K"V9FD$R)[^@`````0?_$08#\
+M`Y!VL68/MD,^9CF#0!````^%/`4``$V%[0^%M````(![40`/A2D%``#&0U$!
+MO0`````/M]5(B[330`0``$B%]G0X2(.^@`````!T+DB+AH````!(QX:`````
+M`````$C'A--`!````````$B+OI````"Z_______0ZT@/M]5(@[S30`0```!T
+M.DB+A--`!```2(.XB`````!T*$B+AH@```!(QX:(`````````$C'A--`!```
+M`````$B+OI````#_T)#_Q6:#_3\/AF3____I?P0``$'&10G_3(GN2(G?Z```
+M``#I:@0``,9$)`<`9F:09I!(#[9$)`</MH08Q@@``#S_#X3Q````#[;`2&G`
+MJ````$R-K!B@`0``08!]"?\/A-0```!!O`````!!@'T.``^&N0```$V-=6!,
+MB??H`````$B)Q4F+1@A)B6X(3(EU`$B)10A(B2B`?4+_#X2`````@+WA````
+M`'1H2`^V14"H`G0>J`1T&J@!=!8/ME5Y2(MU4$B)Z4R)[^@`````ZT*02`^V
+M14"H`G4:J`1F9I!FD'01J`%T#4B)[DB)W^@`````ZQY(#[9%0*@"=!6H!&:0
+M=`^H`74+2(GN2(G?Z`````"X`0```.EZ`P``9F:09I!!_\1%.&4.#X=+____
+MN`$```#I7@,``/Y$)`>`?"0'`P^&ZO[__\9$)`<`@'M1``^%L````+T`````
+M9F:09F:0#[?%2(NTPT`$``!F#[:4&$`(``!(A?9T=TB#OH``````=&U(@WY@
+M`'5F9H'Z_P"0="X/M\)(BXL8"0``2&G`B`$``/9$"$,$=!:`?`A!`'4/#[?2
+M2(G?Z`````#K,F:02(N&@`````^WU4C'A--`!````````$C'AH``````````
+M2(N^D````+K______]"0_\5F@_T_#X9D____QD-1`>F+`@``2`^V1"0'#[:$
+M&,8(```\_P^$90(```^VP$AIP*@```!,C:P8H`$``$&\`````$&`?0X`#X9"
+M`@``38UU8$R)]^@`````2(G%28M&"$F);@A,B74`2(E%"$B)*(!]0O\/A0D"
+M```/MT4P9HE$)`0/M\!F#[:4&$`(``!FB50D`DR+O,-`!```#[9%1*@$='%-
+MA?]T;$F#OX``````=&))@W]@`'5;@^#[B$5$]D5#!'02#[=4)`),B?Y(B=_H
+M`````.L]28N'@````$@/MU0D!$C'A--`!````````$G'AX``````````2,=%
+M.`````!)B[^0````NO____],B?[_T/9%0P0/A$4!``#&A>``````08!E#.?V
+M140!#X3[````@&5$_DB#?3@`=$V`?4$`=2WV14,$="</MU0D!`^V0T'!X`8!
+MPDACTDB+L]`(``"_!P```.@`````Z?$```!(BU4X2(NST`@``+\!````Z```
+M``#IUP```$V%_W1J28._@`````!T8(!]00!U&_9%0P1T%0^W5"0"3(G^2(G?
+MZ`````#IIP```$F+AX````!(#[=4)`1(QX330`0```````!)QX>`````````
+M`$C'13@`````28N_D````+K_____3(G^_]#K:(!]00!U8O9%0P1T7`^W5"0$
+M#[9#0<'@!@'"2&/22(NST`@``+\"````Z`````#K.&9F9I!(@WTX`'0M2(M5
+M.$B#NH@`````=!](BX*(````2,>"B`````````!(BU4X2(NZD````/_0]D5$
+M`G092(M5.$B+L]`(``"_!@```.@`````@&5$_4'_Q$4X90X/A\+]___^1"0'
+M@'PD!P,/AG;]__^0N`$```!(@\0(6UU!7$%=05Y!7\-F9F:09F9FD&9F9I!(
+M@^PX2(E<)`A(B6PD$$R)9"083(EL)"!,B70D*$R)?"0P28G^2(GS3(MN2$@/
+MMT8PN@````"`O#A`"```_P^$L0(```^V1D*#^`\/A`0!``"#^`]_2H/X#`^$
+MR0```(/X#'\<@_@%=&R#^`MF9F:0#X2E````Z74"``!F9I!FD(/X#0^$K```
+M`(/X#F9F9I`/A*\```#I50(``&9FD&:0@_@9?Q*#^!A]7X/X%&9FD'0XZ3D"
+M``"#^!MF9I!F9I!T-3W_````#X2,````9F:0Z1L"``"^`0```$B)WV9FD.@`
+M````Z08"``!(B??H`````.GY`0``O@````!(B=_H`````.GG`0``O@$```!(
+MB=_H`````.G5`0``2(GWZ`````#IR`$``$B)]^@`````Z;L!``!(B??H````
+M`&9FD.FK`0``2(GWZ`````!F9I#IFP$``,9&0O])B=]!O`````!!@'T.``^&
+MQP```$F-;6!(B>_H`````$B)PTB+10A(B5T(2(DK2(E#"$B)&(![0O\/A(@`
+M``"`>T$`#X6%````@+OA`````'1F2`^V0T"H`G0=J`1T&:@!=!4/ME-Y2(MS
+M4$B)V4R)[^@`````ZT!(#[9#0*@"=1FH!&9F9I!T$:@!=`U(B=Y,B??H````
+M`.L>2`^V0T"H`G05J`1FD'0/J`%U"TB)WDR)]^@`````N@$```#IV@```&9F
+MD&:0QH/A`````$'_Q$4X90X/ASW___]%.&4.#X6B````00^V1T$\(@^4PCP-
+M#Y3`"="H`70_O@H```!,B?_H`````+H!````Z8L```!(B=Y(Q\<`````N```
+M``#H`````+X*````2(G?Z`````"Z`0```.MC0;P`````08!]#@!V04F-;6!(
+MB>_H`````$B)PTB+10A(B5T(2(DK2(E#"$B)&`^V0T$\(@^4PCP-#Y3`"="H
+M`7660?_$13AE#G?&9F:00<9%"?],B>Y,B??H`````+H!````B=!(BUPD"$B+
+M;"003(MD)!A,BVPD($R+="0H3(M\)#!(@\0XPV9FD&9FD$B#[%A(B5PD*$B)
+M;"0P3(ED)#A,B6PD0$R)="1(3(E\)%!)B?U(B?-,BWY(2`^W1C"Z`````("\
+M.$`(``#_#X2B!@``#[9&0H/X"0^$=P,``(/X"7]*@_@%#X3[````@_@%?Q>#
+M^`,/A)X```"#^`0/A,(```#I9@8``(/X!V:0#X0T`P``@_@'9F9FD&9FD`^/
+M%@,``.FI`@``9F:09I"#^!8/A.<"``"#^!9F9F:0?R.#^!0/A"H#``"#^!1F
+MD`^/I`(``(/X"@^$!P,``)#I#`8``(/X&@^$2P(``(/X&G\2@_@7#X2R`@``
+M9F9FD.GL!0``/?\```!F9I!F9I`/A.,"``#IU@4``$F+1R"!8##___[_2(M^
+M2+D`````N@$```#H`````+\%````Z`````#IJ04``$B+?DBY`````+H`````
+MZ`````"_4,,``.@`````Z8<%``!!O@````"`?T,`=B!)#[97#69FD&:02(G0
+M1(GQ2-/XJ`%U"4'_QD4X=4-WZD@/MD-`J`)T#*@$=`BH`0^%TP```$F+5R"+
+M0C"I```!`'0-)?___O^)0C#IN````+T0)P``1(AT)!!*C03U`````"7X!P``
+M2(E$)`A$B?!(P>`#28G$08'D^`<``$F+50!!@/X#=AE(BTPD"(N$$8`!``")
+M!0`````E```!`.L308N$%(`!``")!0`````E```!`(7`="6`?"00`W8.0<>$
+M%(`!``````$`ZPQ!QX04@`$``````0"%P'40O^@#``#H`````/_-=9/K!(7M
+M=1C&0T,"QD-"_TB)WDR)[^@`````Z7,$``!!]D<*`70X2(G>3(G_9F:09I#H
+M`````(3`=22]^@```&:02(G>3(G_Z`````"$P'4.O^@#``#H`````/_-=>-!
+M@/X#=B=*C03U`````"7X!P``28M-`(N4`8`!``")%0````")E`&``0``ZT]*
+MC03U`````$B)QH'F^`<``$F+30!!@/X#=@^+A#&``0``B04`````ZQY*C03U
+M`````"7X!P``28M5`(N$`H`!``")!0````")A#&``0``2(M[2$B)WNBK*```
+MOR!.``#H`````.F=`P``#[=V,$C'QP````"X`````.@`````2(M[2$B)WN@[
+M+P``Z7<#```/MW8P2,?'`````+@`````Z`````!(BWM(2(G>Z*4O``#I40,`
+M`$B+?DCH1R@``.E#`P``2(M^2.B9+```Z34#``!(BWY(Z.LK``#I)P,``$B+
+M?DCH'2T``.D9`P``2(M^2.B?+0``Z0L#``!(BWY(Z"$N``"0Z?P"``#&1D+_
+M2`^V0T"H`G0(J`1T!*@!=19(@WM8`)!U#DR)_^@`````B(/B````0?9'#`(/
+MA(H!``!-BV=`00^V5"1&00^V1"0[_\@YPGTR0?Y$)$9!_D0D1T'&1"1"`$$/
+MMT0D3H/@_H/("&9!B40D3DR)YDR)[^@`````Z7X"``!!O@````!!@'\.``^&
+MP````$F-;V!(B>_H`````$B)PTB+10A(B5T(2(DK2(E#"$B)&(![0O\/A($`
+M``"`N^$`````=&E(#[9#0*@"=!^H!'0;J`%T%P^V4WE(BW-02(G93(G_Z```
+M``#K0V:02`^V0T"H`G4:J`1F9I!FD'01J`%T#4B)WDR)[^@`````ZQY(#[9#
+M0*@"=!6H!&:0=`^H`74+2(G>3(GOZ`````"Z`0```.G+`0``9F:09I#&@^$`
+M````0?_&13AW#@^'1/___T'V1"1.@'0>0?9$)$D#=!9!QD0D0@!,B>9,B>_H
+M`````.F'`0``0<9'"?]!QD0D0@!!#[=$)$Z#X/.#R`)F08E$)$Y!@&0D2?Y,
+MB?Y,B>_H`````.E4`0``O@H```!(B=_H`````+H!````D.E!`0``0;X`````
+M08!_#@`/AL8```!)C6]@9F:09F:02(GOZ`````!(B<-(BT4(2(E="$B)*TB)
+M0PA(B1B`>T+_#X2(````@'M!`'5[@+OA`````'1K2`^V0T"H`G0AJ`1T':@!
+M=!D/ME-Y2(MS4$B)V4R)_^@`````ZT5F9F:02`^V0T"H`G4:J`1F9I!FD'01
+MJ`%T#4B)WDR)[^@`````ZQY(#[9#0*@"=!6H!&:0=`^H`74+2(G>3(GOZ```
+M``"Z`0```.M^QH/A`````$'_QD4X=PX/AT3___]%.'<.=4]!O@````!!@'\.
+M`'9"28UO8$B)[^@`````2(G#2(M%"$B)70A(B2M(B4,(2(D8#[9#03PB#Y3"
+M/`T/E,`)T*@!#X7%_O__0?_&13AW#G?"0<9'"?],B?Y,B>_H`````+H!````
+MB=!(BUPD*$B+;"0P3(MD)#A,BVPD0$R+="1(3(M\)%!(@\18PV9FD&:02(/L
+M*$B)'"1(B6PD"$R)9"003(EL)!A,B70D($F)_$B)\TB+%TB+KH@````/MD9"
+M@_@9#X==!```B<#_),4`````]D9.!'0,9L=&3@$`QD9"`>L\9H-^3B!U#&;'
+M1DX(`,9&0@WK*?9&3H!T&?9&20-T$P^W1DXD?X/("&:)1D[&1D(-ZPKV0TX(
+M=`3&0T('2(G>3(GGZ`````#I]@,``(N"!`$``(D%`````(/(4(F"!`$``+D!
+M````N@(```"^`0```$B)W^@`````Z<4#``"Y`0```+H`````O@$```!(B=_H
+M`````.FI`P``N0$```"Z`0```+X!````2(G?Z`````#IC0,``+D!````NF``
+M``"^`0```$B)W^@`````Z7$#```/MDY(0;@!````NF````"^`0```$B)W^@`
+M````Z5`#``!!N`$```"Y```!!+HA````O@$```!(B=_H`````.DN`P``0;@!
+M````N0$```"Z`@```+X`````2(G?Z`````#I#`,``$&X`0```+D`````N@(`
+M``"^`````$B)W^@`````Z>H"``!(BT4@@6`P___W_T&X`0```+D!````N@(`
+M``"^`````$B)W^@`````Z;T"``!!N`$```"Y`````+H"````O@````!(B=_H
+M`````.F;`@``N0$```"Z`@```+X`````2(G?Z`````#I?P(``+D!````N@``
+M``"^`````$B)W^@`````Z6,"``"Y`0```+H!````O@````!(B=_H`````.E'
+M`@``2(M%((%@,/__]_]!N`$```"Y_____[H!````O@````!(B=_H`````.D:
+M`@``N0$```"Z`````+X`````2(G?Z`````#I_@$``$@/MD9'3(MTQEA)B6Y(
+M28EV6`^V1D=!B$9Y0<9&0@-!QD9!`$&`3D`%_D4.2(U%8$B+4`A,B7`(28D&
+M28E6"$R),K^`&@8`Z`````!!O0````!!@'PD0P!V'$@/ME4-2(G01(GI2-/X
+MJ`%U"D'_Q44X;"1#=^E(BU4@BT(PJ0``"`!T"B7___?_B4(PZV"[F#H``$J-
+M!.T`````2(G%@>7X!P``9F9FD$&`_0-V&DF+!"2+A"B``0``B04`````J0``
+M"`!U*.L828L$)(N$*(`!``")!0````"I```(`'4.O^@#``#H`````/_+=;I,
+MB?9,B>?H`````.D``0``OT`-`P#H`````+D`````NB````"^`0```$B)W^@`
+M````OQ`G``#H`````.G0````N0````"Z`0```+X`````2(G?Z`````"_$"<`
+M`.@`````Z:H```!(BT4@@6`P___W_T&X`````+G_____N@$```"^`````$B)
+MW^@`````OQ`G``#H`````.MVN0````"Z`````+X`````2(G?Z`````"_$"<`
+M`.@`````ZU.Y`````+H@````O@$```!(B=_H`````+\0)P``Z`````#K,.@`
+M````9F:09I#K).@`````ZQU!N`$```"Y\````+J;````O@$```!(B=_H````
+M`+@!````2(L<)$B+;"0(3(MD)!!,BVPD&$R+="0@2(/$*,-F9F:09F9FD$%7
+M059!54%455-(@^PH28G\2(L'2(E$)"!!OP````"`?T,`#X:F`@``9F9FD&9F
+MD$2)^@^VPDAKP&A*C30@2(V68!(``/9"#A`/A'("``"X`0```$2)^4C3X`A"
+M"4B+MD@2``!(B70D&/9""`(/A-T```!!C5\!03A<)$,/ALX````/ML%(:\!H
+M3`'@2(E$)`@/ML-(:\!H3HTT($F-KF`2``#V10X0#X24````3(ML)`A!]X5<
+M$@`````.``^$?@```$F-A6`2``!(B40D$+H(````2(GN2(G'Z`````"$P'1>
+M28VV5!(``+H(````28V]5!(``.@`````A,!T0K@!````B=E(T^!(BU0D$`I"
+M"8A""8A%"4B#?"08`'4.38NV2!(``$R)="08ZQ0/ML-(:\!H2(M,)!A*B8P@
+M2!(``/_#03A<)$,/AT/___]FD$B#?"08``^%I````$R)Y^@`````2(E$)!A(
+MA<`/A%T!``!$B?H/ML)(:\!H3`'@2(M,)!A(B8A($@``2(V00!(``$B)42`/
+MMH!H$@``B$$*QD$)`$R)(<9!#@#&05@`QD$H`$&-7P%!.%PD0W991(GZ#[;"
+M2&O`:$H/MI0@:1(``$B)T(G92-/XJ`%T%`^VPTAKP&A(BTPD&$J)C"!($@``
+M_\-!.%PD0W?7ZQMF9F:01(GZ#[;"2&O`:$B+3"082HF,($@2``!$B?H/ML)(
+M:\!H2HV$(&`2```/ME`)2(M,)!B(40T/ME@)08#_`W8A2HT$_0`````E^`<`
+M`$B+5"0@QX00``(``#@```#K'V:02HT$_0`````E^`<``$B+3"0@QX0(``(`
+M`#@```"_$"<``.@`````08#_`W8;2HT$_0`````E^`<``$B+5"0@B9P0!`(`
+M`.L92HT$_0`````E^`<``$B+3"0@B9P(!`(``$'_QT4X?"1##X=A_?__2(/$
+M*%M=05Q!74%>05_#9I!(@^P82(D<)$B);"0(3(ED)!!)B?R)\TB++T"`_@-V
+M($B-!-T`````)?@'``#'A"@P`@``#````.L>9F:09F:02(T$W0`````E^`<`
+M`,>$*%`"```,````OQ`G``#H`````(#[`W8<2(T$W0`````E^`<``(N$*#0"
+M``")!0````#K&DB-!-T`````)?@'``"+A"A4`@``B04`````B<*!X@``/P#!
+MZA`/ML-(:\!H2HV,(&`2```/MD$(@^#\B$$(@_H0=0J#R`*(00CK$F:0#[;#
+M2&O`:$*`C"!H$@```4B+'"1(BVPD"$R+9"002(/$&,-F9F:09F:09F:09F:0
+M05=!5D%505154TB#["A!B?1)B==(BR^[`````$*-!.4`````1(UPX$&)Q69F
+MD&:008/\`W81C02=``$``$&)A"X@`@``ZP^-!)T``0``08F$+0`"``"_$"<`
+M`.@`````B=I!@_P#=A!!BX0N)`(``(D%`````.L.08N$+00"``")!0````")
+M!)3_PX/[!G:@2(L$)$F)!TB+1"0(28E'"$B+1"0028E'$(M$)!A!B4<82(/$
+M*%M=05Q!74%>05_#05=!5D%505154TB#["A!B?1)B==(BR^[`````$*-!.4`
+M````1(UPX$&)Q69FD&:008/\`W81C02='`$``$&)A"X@`@``ZP^-!)T<`0``
+M08F$+0`"``"_$"<``.@`````B=I!@_P#=A!!BX0N)`(``(D%`````.L.08N$
+M+00"``")!0````")!)3_PX/[!G:@2(L$)$F)!TB+1"0(28E'"$B+1"0028E'
+M$(M$)!A!B4<82(/$*%M=05Q!74%>05_##[8'P.@$@^`'B<*`S@+V1P($#T7"
+MB<*!R@```@#V1P,$#T7"B<*`S@CV1P((#T7"B<*!R@``"`#V1P,(#T7"B<*`
+MS@3V1P("#T7"B<*!R@``!`#V1P,"#T7"#[97%,'B&`G0PV9F9I!F9F:09F9F
+MD.@`````\\-F9I!F9I!F9I!!5T%6055!5%532(/L*$F)_HGU3(L_B?(/ML)(
+M:\!H2`'X2(FX0!(``,:`:1(```!`#[;VZ`````"Y`````+H@````2(G@B`A(
+M_\!(_\IU]D0/MNU(B>)$B>Y,B??H`````(GI#[;92&O;:$P!\TB)Y^@`````
+MB8-0$@``2(M$)`Q(B8-4$@``2(V38!(``$"`_0-V&D*-!*T`````2)A"BX0X
+MT`$``(D%`````.L;2(T$K0`````E_`,``$*+A#C0`0``B04`````B4(,B>H/
+MML)(:\!H2HV4,'`2``!`@/T#=AU(C03M`````"7X!P``0HN$.(`!``")!0``
+M``#K&TB-!.T`````)?@'``!"BX0X@`$``(D%`````(D"B>D/ML%(:\!H2HV$
+M,&`2``#V0`X0#X11`0``]D`(`G18N0````"Z(````$B)X&9F9I"("$C_P$C_
+MRG7V0`^V]4B)XDR)]^@`````B>@/MMA(:]MH3`'S3(VC4!(``$B)Y^@`````
+M08E$)`Q(BT0D#$B)@V`2``#K%8GJ#[;"2&O`:$+'A#!<$@```0`"`$"`_0-V
+M&TB-!.T`````)?@'``!"QX0X,`(``!@```#K&4B-!.T`````)?@'``!"QX0X
+M4`(``!@```"_$"<``.@`````0(#]`W8?2(T$[0`````E^`<``$*+A#@T`@``
+MB04`````B<+K'4B-!.T`````)?@'``!"BX0X5`(``(D%`````(G"B>D/ML%(
+M:\!HB=&!X?___]^!R@```"!"]X0P;!(``````P`/1-%`@/T#=A=(C03M````
+M`"7X!P``0HF4.#0"``#K%4B-!.T`````)?@'``!"B90X5`(``$B#Q"A;74%<
+M05U!7D%?PV9F9I!F9I"+A_`(```E____`#U0`9,`=1,/MH?S"```P.@$N@$`
+M```\#'0%N@````")T,-F9I!!54%455-(@^P(28G]3(LGN`````"P4+0%2"7_
+M_P#_2`T```0`2+K___\`_____T@AT$@-````,$BZ_____P#___]((=!(N@``
+M```1````2`G02+K______P#__T@AT$BZ``````"K``!(B<5("=5(QX?X$P``
+M`````$@YO]`(```/A>D```!(C9\`%```2(V7\`@``$&X`0```+D(````O@``
+M`@#H`````$&+A>@(``!!#[:5\P@``(U$@OQ!B(7S"```3(GOZ`````"$P'4'
+M28FM\`@``(L%`````$$/MI7S"````<+_P(D%`````$&(E?,(``!!#[:%\`@`
+M`(B#\`@``$$/MH7Q"```B(/Q"```00^VA?((``"(@_((``!!#[:%\P@``(/`
+M`HB#\P@``$$/MH7T"```B(/T"```00^VA?4(``"(@_4(``!!#[:%]@@``(B#
+M]@@``$$/MH7W"```B(/W"```9F9FD&9FD$G'A?@3````````08N$)``!``")
+M!0`````/M]#VPB!U&XG0@\@@08F$)``!``!!BX0D``$``(D%`````$F+10#'
+M@`0!````````28M%`,>`&`$```````!)BT4`QX`<`0```````+^`A!X`Z```
+M``!!QX0D<`$``!@!``!!BX0D=`$``(D%`````(#D_4''A"1P`0``&`$``(#,
+M!$&)A"1T`0``0<>$)'`!```H`0``0<>$)'0!``!_?P``0<>$)'`!```D`0``
+M08N$)'0!``")!0````!FN```0<>$)'`!```D`0``#?\_``!!B80D=`$``$''
+MA"1P`0``/`$``$''A"1T`0````!Z`$''A"1P`0``I`$``$''A"1T`0``?;_O
+M_T''A"1P`0``N`$``$&+A"1T`0``B04`````#[?`0<>$)'`!``"X`0``#0``
+M^@!!B80D=`$``$''A"2<````_P```$''A"20`@``1`$``$''A"24`@``!A``
+M"$''A"20`@``M`$``$''A"24`@``7W```$''A"20`@``,````$&+A"24`@``
+MB04`````,.2`S#-!B80DE`(``+T`````08!]0P`/AEL#``!F9F:00(#]`W8;
+M2(T$[0`````E^`<``$+'A"`P`@``"````.L92(T$[0`````E^`<``$+'A"!0
+M`@``"````+\0)P``Z`````!`@/T#=AU(C03M`````"7X!P``0HN$(#0"``")
+M!0````#K&TB-!.T`````)?@'``!"BX0@5`(``(D%`````(G"0(#]`W8=2(T$
+M[0`````E^`<``('*``"``$*)E"`T`@``ZQM(C03M`````"7X!P``@<H``(``
+M0HF4(%0"``!`#[;=28V5\`@``(G>3(GOZ`````")WDR)[^@`````0(#]`W89
+MC03=`````$B80L>$(#`"``!$`0``ZQMFD$B-!.T`````)?@'``!"QX0@4`(`
+M`$0!``"_$"<``.@`````0(#]`W8;2(T$[0`````E^`<``$+'A"`T`@``!A``
+M".L92(T$[0`````E^`<``$+'A"!4`@``!A``"$"`_0-V'4B-!.T`````)?@'
+M``!"QX0@,`(``+0!``#K&V:02(T$[0`````E^`<``$+'A"!0`@``M`$``+\0
+M)P``Z`````!`@/T#=AM(C03M`````"7X!P``0L>$(#0"``!?<```ZQE(C03M
+M`````"7X!P``0L>$(%0"``!?<```0(#]`W8=2(T$[0`````E^`<``$+'A"`P
+M`@``"````.L;9I!(C03M`````"7X!P``0L>$(%`"```(````OQ`G``#H````
+M`+K_5(``0(#]`W8B2(T$[0`````E^`<``('B_U0``$*)E"`T`@``ZR!F9I!F
+MD$B-!.T`````)?@'``"!XO__?_U"B90@5`(``$`/MMVZ`0```(G>3(GOZ```
+M``"_(*$'`.@`````0(#]`W89C03=`````$B80HN$((`!``")!0````#K&TB-
+M!.T`````)?@'``!"BX0@@`$``(D%`````(G"@>+___[_0(#]`W872(T$[0``
+M```E^`<``$*)E""``0``ZQ5(C03M`````"7X!P``0HF4((`!``"Z!0'(`$"`
+M_0-V&4B-!.T`````)?@'``!"B90@A`$``.L79I!(C03M`````"7X!P``0HF4
+M((0!``"_H(8!`.@`````0`^V]4R)[^@`````_\5!.&U##X>I_/__3(GOZ```
+M``!!BX0D!`$``(D%`````(/(`D&)A"0$`0``08N$)``!``")!0````"#X/V#
+MR`U!B80D``$``$&+A"0``0``B04`````28N%F!```$&)A"0(`0``08N%G!``
+M`$&)A"0,`0``28N%R!```$&)A"00`0``08N%S!```$&)A"04`0``0<>$)"`!
+M````````00^WA3P2```E_P\```T```$`08F$)"`!``!)BX4H$0``08F$)"0!
+M``!!BX4L$0``08F$)"@!``!)BX50$0``QP#_#P``0<>$)#0!````````00^W
+MA3X2```E_P\```T```$`08F$)#0!``!)BX58$0``08F$)#@!``!!BX5<$0``
+M08F$)#P!``!!QX0D2`$```````!!QX0D3`$````!``!!BX0D!`$``(D%````
+M`(/(64&)A"0$`0``0<>$)%0!``#[_P`,0<>$)%P!``#__P``2(/$"%M=05Q!
+M7<-F9I!F9I!F9I!32(G[Z.?W__^Z`````&:0#[;"QX2#F`D```````#'1(-<
+M`````/_"@/H/=N-FQX,X$@``_P]FQX,Z$@``_P_&0U`!N`$```!;PV9FD&9F
+MD+D`````.?%]+69F9I!F9I!(8\$/MA0XA-(/E<"`^B`/E<(/ML"%PG0'N```
+M``##D/_!.?%\VK@!````9F:09I##9F9FD&9F9I!F9F:09F:02(/L.$B)7"0(
+M2(EL)!!,B60D&$R);"0@3(ET)"A,B7PD,$F)_$B)]6:!?B"%``^'G````$@/
+MMT8@@+PX0`@``/\/A(D```!F@WX@?W<B2`^VA#A`"```2(N7&`D``$AIP(@!
+M``!(BT002`^V2`CK96:!?B"!`'<G2`^W1B!(#[:$.$`(``!(BY=H"0``2&G`
+MR`\``$B+1!`(#[9(".LV2`^W1B!(#[:$.$`(``!(BY=`"0``2&G`T````$B+
+MA!"(````#[9(".L,9F9FD&9FD+G_____N_____]F@7T@A0!W#D@/MT4@0@^V
+MG"!`"```@/G_="$/ML%"@+P@Q@@``/\/E,*`^_\/E,`)T*@!=0:`?20&=2I(
+M@WUX`'032(UU>$R)Y^@`````9F9FD&9FD$B)[DR)Y^@`````Z;`&```/ML%.
+M#[:L(,8(``!-:>VH````3XVL):`!```/ML-(:<"(`0``2(G#20.<)!@)``!F
+M@;O`````JPUW!H!])`)U-DB#?7@`=`Q(C75X3(GGZ`````!(B>Y,B>?H````
+M`,9#0O_&0T,"2(G>3(GGZ`````#I.08```^V13B#^!H/A%P%``"#^!I_+(/X
+M$G1=@_@2?Q*%P`^$_P0``&9FD&:0Z=\%``"#^!4/A,<%``!FD.G/!0``@_@E
+M#X2S`@``@_@E?Q*#^!L/A,4$``!F9F:0Z:\%```]G@```&9FD&9FD`^$>P,`
+M`.F9!0``@'TD`)`/A6$"``!(BTU(@'TY`&:0=&F`>T(9#Y3`@\`+B$-"2(7)
+M=$F`>0&`=4.`>0(`=3V`>0,\=S</ME$#OR````"^%````$B-0WQ`B#A(_\!(
+M_\YU]8/Z%+@4````#T/0B=)(C7M\2(UQ!.@`````9L>#P```````Z1D%``#&
+M0T(8]D$&0'4/#[8!@^`?@_@-#X4[`0``#[8!@^`?@_@-N"(```"Z#0````]$
+MPHA#00^V\$C'QP````"X`````.@`````2(-]>`!T#$B-=7A,B>?H`````$B)
+M[DR)Y^@`````0;X`````08!]#@!V04F-;6!(B>_H`````$B)PTB+10A(B5T(
+M2(DK2(E#"$B)&`^V4T&`^B(/E<"`^@T/E<(/ML"%PG4)0?_&13AU#G?#13AU
+M#@^%B00``&;'1"0&``!!OP````!!O@````!!@'T.`'9528UM8$B)[^@`````
+M2(G#2(M%"$B)70A(B2M(B4,(2(D8#[9#03PB#Y3"/`T/E,`)T*@!=!</MT0D
+M!F8Y0S!R#$F)WP^W6S!FB5PD!D'_QD4X=0YWKTV%_P^$$00``$&`?T+_#X0&
+M!```0<9'0O],B?Y,B>?H`````.GQ`P``#[8!@^`?@_@!=0W&0T$!QD-"_^FM
+M`P``]D$%`70$QD-"&4B#?4@`#X28`P``2(M-2+X`````NB@```!(C8.0````
+M0(@P2/_`2/_*=?6^`````+H(````2(V#N````$"(,$C_P$C_RG7U2(M!"$B)
+M@Y````!(BT$02(F#F````$B+01A(B8.@````BT$@B8.X````Z2T#``!F_X/`
+M````OQ`G``#H`````,9#0@7I$P,``$B+34A(BT50#[9``H/@#X!])`!U<P^V
+M40</MD$&P>`(`<(/MD$%P>`0`<(/MD$$P>`8`<*)D]P````/ME$##[9!`L'@
+M"`'"#[9!`<'@$`'"#[8!P>`8`<)(B5-P@[O<`````'4:9O^#P````+\0)P``
+MZ`````#&0T(+Z90"``#&0T(-Z8L"``"`?20@9F:0=2X\!@^4PCP"#Y3`"="H
+M`70>9O^#P````+\0)P``Z`````#&0T(%Z5@"``!F9F:02(-]>`!T#$B-=7A,
+MB>?H`````$B)[DR)Y^@`````2(G:3(GN3(GGZ`````#I3P(``$B+15`/MD`"
+M@^`/2(M-2(!])``/A;$````/ME$+#[9!"L'@"`'"#[9!"<'@$`'"#[9!",'@
+M&`'"B9/<````#[91!P^V00;!X`@!P@^V007!X!`!P@^V003!X!@!PDACTD@/
+MMD$#2,'@($@!PD@/MD$"2,'@*$@!PD@/MD$!2,'@,$@!PD@/M@%(P>`X2`'"
+M2(E3</9!#`%T!6:#2V($@[O<`````'4:9O^#P````+\0)P``Z`````#&0T(9
+MZ6(!``#&0T(-Z5D!``"`?20@D'4N/`8/E,(\`@^4P`G0J`%T'F;_@\````"_
+M$"<``.@`````QD-"&>DH`0``9F9FD$B#?7@`=`Q(C75X3(GGZ`````!(B>Y,
+MB>?H`````$B)VDR)[DR)Y^@`````Z1\!``#&0T(4Z>H```"`?20@9I!U-4B+
+M15`/MD`"@^`//`8/E,(\`@^4P`G0J`%T&F;_@\````"_$"<``.@`````QD-"
+M%.FM````QD-"&^FD````@'TD`'5,2(M-2`^W0V!F@TMB`0R&9HE#8(!Y`P!U
+M!8`Y%G<79O^#P````+\0)P``Z`````#&0T(-ZVGV008$=`=F@TMB`NM'9H-C
+M8OUF9I#K/8!])"!U,DB+15`/MD`"@^`//`8/E,(\`@^4P`G0J`%T'&;_@\``
+M``"_$"<``.@`````QD-"!>L:9H-C8/G&0T(.ZP^`?20`=05F@TMB`\9#0@](
+M@WUX`'0,2(UU>$R)Y^@`````2(GN3(GGZ`````!(B=Y,B>?H`````&9FD$B+
+M7"0(2(ML)!!,BV0D&$R+;"0@3(MT)"A,BWPD,$B#Q#C#9F9FD&9FD&9FD&9F
+MD$B#["A(B5PD"$B);"003(ED)!A,B6PD($B)_4B)\V:!?B"%``^'E@```$@/
+MMT8@@+PX0`@``/\/A(,```!F@WX@?W<B2`^VA#A`"```2(N7&`D``$AIP(@!
+M``!(BT002`^V2`CK7V:!?B"!`'<G2`^W1B!(#[:$.$`(``!(BY=H"0``2&G`
+MR`\``$B+1!`(#[9(".LP2`^W1B!(#[:$.$`(``!(BY=`"0``2&G`T````$B+
+MA!"(````#[9(".L&D+G_____OO____]F@7L@A0!W#4@/MT,@#[:T*$`(``"`
+M^?]T(0^VP8"\*,8(``#_#Y3"0(#^_P^4P`G0J`%U!H![)`9U(TB#>W@`=`Q(
+MC7-X2(GOZ`````!(B=Y(B>_H`````.EX`@``#[;!3`^VI"C&"```36GDJ```
+M`$V-I"R@`0``B?(/ML)(:<"(`0``28G%3`.M&`D``$B+<TB`>R0`#X2I````
+M@'LZ!@^$GP```(![.@P/A)4```!!#[>5P````(U"`69!B87`````9H/Z"78F
+M08!]0@9T'T'&14,"0<9%0O]!@&5$_DR)[DB)[^@`````Z>8!``"_Z`,``.@`
+M````20^V14"H`G0IJ`1T):@!="%!#[95>4F+=5!!N`````"Y`@```$R)Y^@`
+M````Z:H!``!!QD5"`TR)[DB)[^@`````Z94!``!F9I!FD(![.@%U#T'&14($
+M9F:09I#I30$``(![.@)U"D'&14(%Z3T!``"`>SH##X6:````08!]0@5U+&:!
+M?@3(-V9F9I!U($$/MW4P2,?'`````+@`````Z`````!!QD5"!ND``0``3(GO
+MZ`````!)C;V0````OB@```#H!?7__X3`=3A)C7U\OA0```#H\_3__X3`=29)
+MC;VX````O@@```#HWO3__X3`=1%)@WUP`'0*0<9%0A?IJP```$'&14(:9D'_
+MA<````#IF0```(![.A=U"D'&14(5Z8D```"`>SH89F:0=0=!QD5"%NMY@'LZ
+M!&9FD'4'0<9%0@?K:8![.@5F9I!U!T'&14((ZUF`>SH&9F:0=0=!QD5"">M)
+M@'LZ#&9FD'4'0<9%0@KK.8![.A9F9I!U!T'&14(4ZRF`>SH.9F:0=2!(@WMX
+M`'0,2(US>$B)[^@`````2(G>2(GOZ`````#K+DB#>W@`=`Q(C7-X2(GOZ```
+M``!(B=Y(B>_H`````$R)[DB)[^@`````9F:09I!(BUPD"$B+;"003(MD)!A,
+MBVPD($B#Q"C#9F9FD&9FD$B#["A(B5PD"$B);"003(ED)!A,B6PD($B)_4B)
+M\V:!?B"%``^'E@```$@/MT8@@+PX0`@``/\/A(,```!F@WX@?W<B2`^VA#A`
+M"```2(N7&`D``$AIP(@!``!(BT002`^V2`CK7V:!?B"!`'<G2`^W1B!(#[:$
+M.$`(``!(BY=H"0``2&G`R`\``$B+1!`(#[9(".LP2`^W1B!(#[:$.$`(``!(
+MBY=`"0``2&G`T````$B+A!"(````#[9(".L&D+G_____OO\```!F@7L@A0!W
+M#D@/MT,@9@^VM"A`"```@/G_#Y3"9H'^_P`/E,`)T*@!="-(@WMX`'0,2(US
+M>$B)[^@`````2(G>2(GOZ`````#IRP````^VP4P/MJ0HQ@@``$UIY*@```!-
+MC:0LH`$```^WQDAIP(@!``!)B<5,`ZT8"0``@'LD`'1$#[;Q2,?'`````+@`
+M````Z`````!)BU4(28M%`$B)4`A(B0)!_DPD#DR)[DB)[^@`````0<9$)`G_
+M3(GF2(GOZ`````"`>SH!=2R_$"<``.@`````2(G>2(GOZ`````"Y`0```+H`
+M````3(GN3(GGZ`````#K(+]0PP``Z`````!(B=Y(B>_H`````$R)[DR)Y^@`
+M````2(M<)`A(BVPD$$R+9"083(ML)"!(@\0HPV9FD&:02(/L*$B)7"0(2(EL
+M)!!,B60D&$R);"0@2(GU08G408G-2(L?2(G?Z`````!(B<%(A<!U#<:%X0``
+M``'&14(#ZW7&0#CAQD`Y`4&`_`$9P/?0@\`"B$$ZN`\```!%A.UU$+@`````
+M2(-]6`!T!`^V17F(03L/MT4P9HE!($B)62C'030`````2,=!2`````!%A.U(
+MQ\``````2,?"`````$@/1<)(B8&@````2(G.2(G?Z`````!(BUPD"$B+;"00
+M3(MD)!A,BVPD($B#Q"C#D$%7059!54%455-(@^P(28G]2(GU3(LW3(GWZ```
+M``!(B<-(A<!U#,:%X0````'IGP```$R)]^@`````28G$2(7`=13&A>$````!
+M2(G>3(GWZ`````#K>TR->UC&0SCAQD,Y`<9#.@,/MT4P9HE#($F+10!(B4,H
+MQT,T``(``$F+1"002(E#2+D`````N@`"``"("$C_P$C_RG7V3(EC>$C'@Z``
+M````````O@````!,B?_H`````(M3-$F+="083(G_Z`````!(B=Y,B??H````
+M`$B#Q`A;74%<05U!7D%?PV9F9I!F9F:09F9FD&9FD$&)T+D`````.=%S'V9F
+M9I`/MA</MD<!B`:(5@%(@\8"2(/'`O_!1#G!<N7SPV9FD$%455-(B?M(B?5)
+MB?1F@SX`>0X/MP8E`!\``,'X"(A'04B+111(B4-\2(M%'$B)@X0```"+122)
+M@XP```!(BT4N2(F#N````$B+139(B8.0````2(M%/DB)@Y@```!(BT5&2(F#
+MH````$B+14Y(B8.H````2(M%5DB)@[````!(C7M\N@H```!(B?[H0/___TB-
+MN[@```"Z!````$B)_N@L____2(V[D````+H4````2(G^Z!C___]FQT-@``!F
+MQT-B``!F08.\)+(!```!#Y3"P>(##[9#1(/@]PG0B$-$]H6G````!'0&9L=#
+M8`$`]H6D`````70H9H-+8`+VA:H````!=`5F@TMB`?:%J`````%T#&:!2V``
+M`69FD&9FD/:%I````"!T%V:#2V`$]H6J````('0)9H-+8@)F9F:0]H6D````
+M0'079H%+8(``]H6J````0'0(9H-+8@AF9I#&0WH"]H69`````70G]D-@`70*
+M9H-+8`AF@TMB$`^VA98```"#X!__P(A#>CP@=03&0WH?]H68````"'0&9H%+
+M8``"]H68````!'0%9H-+8"#VA9@````"=`5F@TM@$/:%J````"!T#O:%K@``
+M`"!T!6:#2V!`]D-@`7042(N%R````$B)0W#K#F9F9I!F9I"+17A(B4-P2/]+
+M</9%:@)T'_:%@`````]T%F:#O8`````"&<"#P`2(0V3K"&9F9I#&0V0"QD-E
+M__9%?@1T!L9#90+K'/9%?@)T",9#90%FD.L.]D5^`70(QD-E`&9F9I#&0V;_
+M]D5J!'0?N0````"02`^WA;````!(T_BH`70#B$MF_\&`^09VY[X``@``2(GO
+MZ`````")@\0```"X`0```%M=05S#9F9FD&9FD&9FD$B#[!A(B1PD2(EL)`A,
+MB60D$$B)_4B)\TR+)TR)Y^@`````2(G"#[9+9DB%P'4)QH/A`````>M'QD`X
+MX<9`.0'&0#H$B$@[#[=#,&:)0B!(BT4`2(E"*,="-`````!(QT)(`````$C'
+M@J``````````B$MI2(G63(GGZ`````!(BQPD2(ML)`A,BV0D$$B#Q!C#9F9F
+MD&9F9I!F9I!F9I!(@^P82(D<)$B);"0(3(ED)!!(B?U(B?-,BR=,B>?H````
+M`$B)P@^V2V1(A<!U"<:#X0````'K1\9`..'&0#D!QD`Z!8A(.P^W0S!FB4(@
+M2(M%`$B)0BC'0C0`````2,="2`````!(QX*@`````````(A+9TB)UDR)Y^@`
+M````2(L<)$B+;"0(3(MD)!!(@\08PV9F9I!F9F:09F:09F:02(/L&$B)'"1(
+MB6PD"$R)9"002(G[2(GU3(LG3(GGZ`````!(B<)(A<!U"<:%X0````'K0,9`
+M..'&0#D!QD`Z!@^W13!FB4(@2(L#2(E"*,="-`````!(QT)(`````$C'@J``
+M````````2(G63(GGZ`````!(BQPD2(ML)`A,BV0D$$B#Q!C#9F:09F:09F:0
+M2(/L&$B)'"1(B6PD"$R)9"002(G[2(GU3(LG3(GGZ`````!(B<)(A<!U"<:%
+MX0````'K0,9`..'&0#D!QD`Z#`^W13!FB4(@2(L#2(E"*,="-`````!(QT)(
+M`````$C'@J``````````2(G63(GGZ`````!(BQPD2(ML)`A,BV0D$$B#Q!C#
+M9F:09F:09F:02(/L&$B)'"1(B6PD"$R)9"002(G[2(GU3(LG3(GGZ`````!(
+MB<)(A<!U"<:%X0````'K2\9`..'&0#D!QD`Z%L9`/`$/MT4P9HE"(,:"F```
+M``](BP-(B4(HQT(T`````$C'0D@`````2,>"H`````````!(B=9,B>?H````
+M`$B+'"1(BVPD"$R+9"002(/$&,-F9F:09F9FD&9FD&9FD$B#[!A(B1PD2(EL
+M)`A,B60D$$B)^TB)]4R+)TR)Y^@`````2(G"2(7`=0G&A>$````!ZT#&0#CA
+MQD`Y`<9`.A</MT4P9HE"($B+`TB)0BC'0C0`````2,="2`````!(QX*@````
+M`````$B)UDR)Y^@`````2(L<)$B+;"0(3(MD)!!(@\08PV9FD&9FD&9FD$B#
+M[!A(B1PD2(EL)`A,B60D$$B)^TB)]4R+)TR)Y^@`````2(G"2(7`=0G&A>$`
+M```!ZT#&0#CAQD`Y`<9`.A@/MT4P9HE"($B+`TB)0BC'0C0`````2,="2```
+M``!(QX*@`````````$B)UDR)Y^@`````2(L<)$B+;"0(3(MD)!!(@\08PV9F
+MD&9FD&9FD$B#["A(B1PD2(EL)`A,B60D$$R);"083(ET)"!(B?U!B?1!B=5!
+MB<Y(BX>(````2(L82(G?Z`````!(B<;&0#CAQD`Y`<9`.A&X#P```$6$Y'4$
+M#[9%1XA&.T2(;CP/MT5`9HE&($B)7BC'1C0`````2,=&2`````!%A/9(Q\``
+M````2,?"`````$@/1<)(B8:@````2(G?Z`````!(BQPD2(ML)`A,BV0D$$R+
+M;"083(MT)"!(@\0HPV9FD&9FD$B#[#A(B5PD"$B);"003(ED)!A,B6PD($R)
+M="0H3(E\)#!)B?R)RT&)]4&)UD6)QTB+AX@```!(BRA(B>_H`````$B)QL9`
+M..'&0#D!QD`Z$K@/````183M=09!#[9$)$>(1CM$B'8\#[;'B$8]B=C!Z!"(
+M1CZ)V,'H&(A&/XA>0$$/MT0D0&:)1B!(B6XHQT8T`````$C'1D@`````183_
+M2,?``````$C'P@````!(#T7"2(F&H````$B)[^@`````2(M<)`A(BVPD$$R+
+M9"083(ML)"!,BW0D*$R+?"0P2(/$.,-F9F:09F9FD&9FD$B#[#A(B5PD"$B)
+M;"003(ED)!A,B6PD($R)="0H3(E\)#!)B?Q(B?5!O@````!F@7X@A0`/AY8`
+M``!(#[=&(("\.$`(``#_#X2#````9H-^(']W(D@/MH0X0`@``$B+EQ@)``!(
+M:<"(`0``2(M$$$@/ME`(ZU]F@7X@@0!W)T@/MT8@2`^VA#A`"```2(N7:`D`
+M`$AIP,@/``!(BT00"`^V4`CK,$@/MT8@2`^VA#A`"```2(N70`D``$AIP-``
+M``!(BX00B`````^V4`CK!I"Z_____[G_____9H%]((4`=PY(#[=%($(/MHP@
+M0`@```^VPDH/MIP@Q@@``$AIVZ@```!*C9PCH`$```^VP4AIP-````!)B<5-
+M`ZPD0`D``(!]/`(/A88````/MD5`)?````"#^"`/E,*#^!`/E,`)T*@!=&L/
+MME5`B="#X`^#^`%U)8G1@>'P````0;@!````N@(```"^`````$R)[^@`````
+MZ;$&``!)#[9%1TV+=,58#[9%0"7P````@_@@#Y3`@\`(08B&X@```$F+1EAF
+M@6!.__[I?P8``&9FD&9FD(!])`!T/P^V721(@WUX`'0/2(UU>$R)Y^@`````
+M9F:02(GN3(GGZ`````"`^P(/A44&``!,B>Y,B>?H`````)#I-`8``$$/MD5"
+M@_@9#X?]!0``B<#_),4`````00^V15#!X`A(F$F+E"3`$```BX0"3`@``(D%
+M`````(G"@_@%N`4````/1L)!B$4[@'L/`'0.0<9%0@#&0P\`Z;`%``!!QD5"
+M`NFF!0``00^V15#!X`A(F$F+E"3`$```BX0"3`@``(D%`````&8/ML!F08E%
+M/$$/MD50P>`(2)A)BY0DP!```(N$`D0(``")!0````")PL'H"&9!B44^#[;"
+MP>`(9D$)13QF08%]/D!!N`,```"Z&0````]$PD&(14+I+04``$$/MD50P>`(
+M2)A)BY0DP!```(N$`D0(``")!0````!!B$4Y00^V15#!X`A(F$F+E"3`$```
+MBX0"3`@``(D%`````(G"J`AT!T'&13H,ZR>H!'0,0<9%.@MF9I!FD.L72(G0
+M2-'H@^`!@_@!&<#WT(/@"D&(13I!QD5"!.FM!```00^V15#!X`A(F$F+E"3`
+M$```BX0"3`@``(D%`````(/("$&(14A!QD5"!>E]!```0<9%0@;I<P0``$$/
+MMD50P>`(2)A)BY0DP!```(N$`DP(``")!0````!!@'U'`1G`@^`"@\`408A%
+M0ND^!```00^V14?_P$&(14=!.D4[<PI!QD5"%NDC!```0<9%1P!!QD5"%[\@
+MH0<`Z`````#I"@0``$'&14(4Z0`$``!!QD5"".GV`P``0<9%0A20Z>L#``!!
+MQD5*`N@`````28F%P````$'&14(5Z=`#``!!#[9%4,'@"$B828N4),`0``"+
+MA`),"```B04`````1`^V^$$/MD50P>`(2)A)BY0DP!```(N$`D0(``")!0``
+M```/ML#!X`A!"<?H`````$F)A<@```!$B?B#X`^#^`-U$4&`?4H`=`I!QD5"
+M"NE=`P``28N%R````$$KA<`````M0`T#`'@'08!]2@!T&4'&14(508!]2@`/
+MA#$#``!!_DU*Z2@#``!)#[9%1TF#?,58``^$U0```,9$)`<`@'L.`'8[3(U[
+M8$R)_^@`````28G&20^V14=-.73%6'0@28M'"$V)=PA-B3Y)B48(3(DP_D0D
+M!P^V1"0'.$,.=\G^2PY)@WXX`'1L28M&.$C'0&``````0?9&1`1U)4'^A"3O
+M$P``3(GGZ`````!)BT8X#[9P`;H!````3(GGZ`````!)BU8X28NT)-`(``"_
+M`0```.@`````28M6.$F+M"30"```OP8```#H`````$G'1C@`````20^V14=)
+MQT3%6`````!,B?9,B>?H`````$'&14()Z3@"``!!#[9%4,'@"$B828N4),`0
+M``"+A`),"```B04`````#[;(00^V15#!X`A(F$F+E"3`$```BX0"1`@``(D%
+M`````,'@"`G!08E-5$&`?4(*=`CWP0```0!T$4'&14(+Z=4!``#^2PYFD.MF
+M0<9%0@Q)#[9%1TF#?,58`'1)QD0D!@"`>PX`=DE,C7M@2(U[8.@`````28G&
+M20^V14=-.73%6'3`28M'"$V)=PA-B3Y)B48(3(DP_D0D!@^V1"0&.$,.=\CK
+M"TR)Y^@`````28G&387V#X2(`0``20^V14=-B73%6$$/MD5+08B&X@```.E$
+M`0``0;X_0@\`2(M#(/9`,@AU)4R)Y^@`````OP$```#H`````$'_SD&#_O]T
+M"DB+0R#V0#((=-M!QD5"">D%`0``00^V15#!X`A(F$F+E"3`$```BX0"3`@`
+M`(D%`````$0/MOA!#[9%4,'@"$B828N4),`0``"+A`)$"```B04`````#[;`
+MP>`(00G'1(GY@>'_#P``@?D3`0``#Y3"@?DC`0``#Y3`"="H`70M0<9%0AB!
+M^1,!``!U"D'&14L(Z8(```!$B?@E_P\``#TC`0``=7-!QD5+">ML00^V549!
+M#[9%.__(.<)]#T'^149!_D5'0<9%0@?K34'&14(`00^W14Z#X/>#R`)F08E%
+M3DB#?7@`=`Q(C75X3(GGZ`````!(B>Y,B>?H`````,9#"?](B=Y,B>?H````
+M`.LR0<9%0@-F9F:02(-]>`!T#$B-=7A,B>?H`````$B)[DR)Y^@`````3(GN
+M3(GGZ`````!(BUPD"$B+;"003(MD)!A,BVPD($R+="0H3(M\)#!(@\0XPV9F
+M9I!(@^PX2(E<)`A(B6PD$$R)9"083(EL)"!,B70D*$R)?"0P2(G[28GT0;\`
+M````O@````!F08%\)""%``^'GP```$D/MT0D(("\.$`(``#_#X2+````9D&#
+M?"0@?W<B2`^VA#A`"```2(N7&`D``$AIP(@!``!(BT002`^V4`CK969!@7PD
+M(($`=RA)#[=$)"!(#[:$.$`(``!(BY=H"0``2&G`R`\``$B+1!`(#[90".LS
+M20^W1"0@2`^VA#A`"```2(N70`D``$AIP-````!(BX00B`````^V4`CK"&9F
+MD+K_____N?____]F08%\)""%`'<.20^W1"0@#[:,&$`(```/ML%(:<#0````
+M28G%3`.K0`D```^VPD@/MJP8Q@@``$AI[:@```!(C:P=H`$``(#Z_W0?@+P8
+MQ@@``/\/E,*`^?\/E,`)T*@!=0A!@'PD)`9U*TF#?"1X`'0328UT)'A(B=_H
+M`````&9FD&9FD$R)YDB)W^@`````Z=`%``!!@'PD)`!T&$B)[DB)WV:0Z```
+M``#IM@4``&9FD&9FD$$/MD5"@^@-@_@$#X=O!0``B<#_),4`````00^V15#!
+MX`A(F$B+D\`0``"+A`),"```B04`````1`^VR$$/MD50P>`(2)A(BY/`$```
+MBX0"1`@``(D%`````,'@"$$)P;\`````0;@`````0;X`````08!].P!V,D2)
+MRF9FD&:02(G01(GQ2-/XJ`%T%/_&#[;!28-\Q5@`=`5!_\#K`O_'0?_&13AU
+M.W?60(3_=`5!@$U)`46$P'0%08!-20)`@/X!#X4]`0``0;X`````08!].P!V
+M4$2)RD$/MLY(B=!(T_BH`70<B<I(B=Y(B>_H`````$B%P'052(EH2$R):%CK
+M"T'_QD4X=3MWS>L818AU1T4X=3MV#D'&14(.9F9FD.E;!```13AU.P^%400`
+M``^V=0VZ`0```$B)W^@`````QD0D`P"`?0X`#X:`````3(UU8$R)]^@`````
+M28G'28M&"$V)?@A-B3=)B4<(3(DX28-_.`!T&DF+5SA(B[/0"```OP4```#H
+M`````$&`3T0"3(GZO@8```!(B>_H`````$&`?WL`=!E(B=_H`````+\!````
+MZ`````!!@'][`'7G_D0D`P^V1"0#.$4.=X1)@WPD>`!T#4F-="1X2(G?Z```
+M``!,B>9(B=_H`````$'&14D`QD4)`$B)[^@`````Z:L#``!F08%-3H``0;X`
+M````08!].P!V342)RD$/MLY(B=!(T_BH`70<B<I(B=Y(B>_H`````$B%P'06
+M2(EH2$R):%CK#$'_QD4X=3MWS9#K%$6(=4=%.'4[=@I!QD5"#^D:`P``13AU
+M.P^%$`,```^V=0VZ`0```$B)W^@`````QD0D`@"`?0X`#X:`````3(UU8$R)
+M]^@`````28G'28M&"$V)?@A-B3=)B4<(3(DX28-_.`!T&DF+5SA(B[/0"```
+MOP4```#H`````$&`3T0"3(GZO@8```!(B>_H`````$&`?WL`=!E(B=_H````
+M`+\!````Z`````!!@'][`'7G_D0D`@^V3"0".$T.=X1)@WPD>`!T#4F-="1X
+M2(G?Z`````!,B>9(B=_H`````$'&14D`QD4)`$B)[^@`````Z6H"``!!#[9%
+M4,'@"$B82(N3P!```(N$`DP(``")!0````!$#[;(00^V15#!X`A(F$B+D\`0
+M``"+A`)$"```B04`````P>`(00G!0??!```$`'0'0?9%20%U$$'WP?__^_]T
+M$4'V14D"=`I!QD5"#^G*`0``0<9%20!F9I!FD.GK`0``0;X_0@\`2(M%(/9`
+M,@AU)4B)W^@`````OP$```#H`````$'_SD&#_O]T"DB+12#V0#((=-M!QD5"
+M$.E\`0``00^V15#!X`A(F$B+D\`0``"+A`),"```B04`````#[;`B40D!$$/
+MMD50P>`(2)A(BY/`$```BX0"1`@``(D%``````^VP,'@"`E$)`2+1"0$@^`/
+M@_@##X7`````0?9%20%T#$'&14(2ZPK^30[K9D'&14(220^V14=)@WS%6`!T
+M2<9$)`$`@'T.`'9)3(UU8$B-?6#H`````$F)QTD/MD5'33E\Q5ATPDF+1@A-
+MB7X(38DW28E'"$R)./Y$)`$/MD0D`3A%#G?(ZPM(B=_H`````$F)QTV%_P^$
+MS0```$D/MD5'38E\Q5B+1"0$)?\/```]$P$``'4*0<:'X@````CK>8M$)`0E
+M_P\``#TC`0``=6E!QH?B````">M?0<9%0A/K6$$/MD50P>`(2)A(BY/`$```
+MBX0"3`@``(D%`````$$/MD50P>`(2)A(BY/`$```BX0"1`@``(D%`````$D/
+MMD5)@^`!@_@!&<#WT(/`$T&(14)F9I!F9I!)@WPD>`!T#4F-="1X2(G?Z```
+M``!,B>9(B=_H`````$R)[DB)W^@`````9F:09I!(BUPD"$B+;"003(MD)!A,
+MBVPD($R+="0H3(M\)#!(@\0XPY"0D)"0D)"0D)"0D)!(BT<(2"T``@$`@^('
+MP>((@,X@2,'F"('F`/\``(F4!AS%```/MX0&',4``&:)!0`````/ML##9F:0
+M9F:09F:02(M'"$@M``(!`(/B!\'B"(C*@,X02,'F"('F`/\``(F4!AS%``##
+M9F:09F:09F:0055!5%53NP````!!NP````!!NO____]!N0````"]`0```$&X
+MP.'D`$$/MLG_P8GNT^:Y``````^VP?_`B<(/K]9$B<!!B=6Z`````$'W]8GZ
+M*<(Y^+C_____#T;"1#G0<PE!B<)$B<M!B<O_P8#Y#W;%0?_!08#Y!W:M00^V
+MP\'@`PG8#[;`6UU!7$%=PV:02(/L&$B)'"1,B60D"$R);"0028G\3(VOP!$`
+M`$`/MMZY`````+H'````B=[H#____T$/MDT!N@,```")WDR)Y^C[_O__2(L<
+M)$R+9"0(3(ML)!!(@\08PV9F9I!F9F:005154TF)_+L`````0`^V[KH"````
+MB>Y,B>?H@?[__Z@(=`VX`````.L?9F:09F:0OP$```#H`````/_#@?L/)P``
+M=LRX_P```%M=05S#9I!3B?,/MO*Z`P```.A`_O__.-@/E,`/ML!;PV9FD&9F
+MD$B#["A(B1PD2(EL)`A,B60D$$R);"083(ET)"!(B?U!B<Y!B?1!B=4/MLI`
+M#[;>N@$```")WN@U_O__N4````"Z`@```(G>2(GOZ"'^__^)WDB)[^@W____
+MNO\```"%P'5S187V=$E!]L4!="-!#[;4OD````!(B>_H8O___[K_````A<!T
+M3NM'9F9FD&9FD$$/MM2^&````$B)[^@_____NO\```"%P'0KZR1F9F:000^V
+MU+XH````2(GOZ!____^Z_P```(7`=`MF9I!F9I"Z`````(G02(L<)$B+;"0(
+M3(MD)!!,BVPD&$R+="0@2(/$*,-F9F:09F9FD&9F9I!(@^PH2(E<)`A(B6PD
+M$$R)9"083(EL)"!(B?U)B<V)\T&)U$`/MO;H9/[__[K_____A<!U,0^VTT$/
+MMO1(B>_HG/[__[K_____A<!T&0^V\[H!````2(GOZ-/\__]!B$4`N@````")
+MT$B+7"0(2(ML)!!,BV0D&$R+;"0@2(/$*,-F9F:09F9FD&9F9I!F9I!!5T%6
+M055!5%532(/L"$B)_4F)ST6)QD&)]4&)U,=$)`0`````A-(/A/@```!`#[;>
+MN60```"Z`@```(G>Z)[\__^)WDB)[^BT_?__A<!U$+H#````B=Y(B>_H0?S_
+M_Y!!#[;400^V];D!````2(GOZ/O]__^Z_____X3`#X6)`0``NP````!$.?,/
+MC7<!``!!C4;_B00D10^VY69FD&:0.1PD=3NY0````+H"````1(GF2(GOZ";\
+M__](8\M,`?FZ6````$2)YDB)[^B@_O__A<`/A2\!``#K.69FD&9FD+E$````
+MN@(```!$B>9(B>_HZ_O__TACRTP!^;I0````1(GF2(GOZ&7^__^%P`^%]```
+M`/]$)`3_PT0Y\WR"9I#IX@```+^@A@$`Z.'[__\/MLA!#[;=N@,```")WDB)
+M[^B;^___B=Y(B>_HL?S__X7`="`/MHW!$0``N@,```")WDB)[^AW^___NO__
+M___IF````$$/MMV)VKY@````2(GOZ,K\__^%P'4=#[:-P1$``+H#````B=Y(
+MB>_H0/O__[K_____ZV2[`````$0Y\WT^10^VY;E$````N@(```!$B>9(B>_H
+M%OO__TACRTP!^;J`````1(GF2(GOZ)#]__^%P'4+_T0D!/_#1#GS?,8/MHW!
+M$0``00^V];H#````2(GOZ-GZ__^+5"0$B=!(@\0(6UU!7$%=05Y!7\-F9F:0
+M2(/L&$B)7"0(3(ED)!!)B?Q(B=!`#[;608G(2(G!O@````#HN/W__XG#N50`
+M``"Z`@```+X`````3(GGZ'_Z__^)V$B+7"0(3(MD)!!(@\08PV9F9I!F9F:0
+M9F:09F:02(/L&$B)7"0(3(ED)!!)B?Q(B=!`#[;608G(2(G!O@$```#H6/W_
+M_XG#N50```"Z`@```+X!````3(GGZ!_Z__^)V$B+7"0(3(MD)!!(@\08PV9F
+M9I!F9F:09F:09F:02(/L.$B)7"0(2(EL)!!,B60D&$R);"0@3(ET)"A,B7PD
+M,$F)_$F)ST6)Q8GU08G60`^VWKED````N@(```")WNB[^?__B=Y,B>?HT?K_
+M_X7`=0^Z`P```(G>3(GGZ%[Y__]!#[;60`^V];D!````3(GGZ!G[__^Z____
+M_X3`=4?K#KK_____ZSYF9F:09F:0NP````!$.>M]*$`/MNUFD$ACPT(/MA0X
+MN0````")[DR)Y^C9^O__A,!UQ__#1#GK?-ZZ`````(G02(M<)`A(BVPD$$R+
+M9"083(ML)"!,BW0D*$R+?"0P2(/$.,-F9F:02(/L&$B)7"0(3(ED)!!)B?Q(
+MB=!`#[;608G(2(G!O@````#HZ/[__XG#N50```"Z`@```+X`````3(GGZ,_X
+M__^)V$B+7"0(3(MD)!!(@\08PV9F9I!F9F:09F:09F:02(/L&$B)7"0(3(ED
+M)!!)B?Q(B=!`#[;608G(2(G!O@$```#HB/[__XG#N50```"Z`@```+X!````
+M3(GGZ&_X__^)V$B+7"0(3(MD)!!(@\08PV9F9I!F9F:09F:09F:005=!5D%5
+M05154TB#["A(B70D($R+=BA)_\9%#[96`L9$)!\`2,=$)!``````0;@`````
+M2(NWT`@``+F`____10^VR@^VP68/MI0P0`@``&:!^O\`=$I$B<!!_\!$.<AU
+M/X#Y@7<8#[?"2&G`R`\``$@#AF@)``!(B40D$.LB2(M$)"#'0%#_____2(G'
+M_U!(N`````#INP$``&9FD&9FD/_!@/F%=IQ(B[?0"```2('&`!0``+F`____
+M00^V^F:0#[;!9@^VE#!`"```9H'Z_P!T0T2)P$'_P#GX=3F`^8%W&`^WPDAI
+MP,@/``!(`X9H"0``2(E$)!#K'$B+1"0@QT!0_____TB)Q_]02+@`````Z3\!
+M``#_P8#YA7:C00^V5@1%#[9N!4'!Y1!!#[9&!L'@"$$)Q4$/MD8'00G%10^V
+M9@A!P>0000^V1@G!X`A!"<1!#[9&"D$)Q$B#?"00``^$S````$&_`````$B+
+M1"00@'A8``^&MP```$B)PTB#PT@/MM*)5"0,9F9FD&9FD$B)W^@`````2(UH
+M\$B+4PA(B4,(2(D82(E0"$B)`@^V14$\#0^4PCPB#Y3`"="H`71>00^V1@.#
+M^#MT(X/X/'5/QD0D'P%,BT0D($2)Z42)XHMT)`Q(B>_H`````.LQ2(N](`$`
+M`$2)ZDF-=@OH`````$R+1"0@1(GI1(GBBW0D#$B)[^@`````QD0D'P%FD$'_
+MQTB+1"001#AX6`^'7O___[@!````@'PD'P!U%TB+1"0@QT!0_____TB)Q_]0
+M2+@`````2(/$*%M=05Q!74%>05_#9F9FD&9F9I!F9F:02(/L2$B)7"082(EL
+M)"!,B60D*$R);"0P3(ET)#A,B7PD0$F)_TF)]$R+;BA)_\6+1AS_R(E$)!3'
+M1"00`````$B+5C!(B50D"$&`?0$!=1#'1E``````Z3L"``!F9F:008!]`0)U
+M64&`?0(!9F9FD'4^2(._V`@```!T!TR+O]@(``!)BX?0"```00^V50.(D.X3
+M``!!#[95`XB0[B<``$''1"10`````.GI`0``9I#'1E#^____Z=L!``!F9F:0
+M08!]`01U&4$/MD4#@^@[/`%W#>BX_/__Z=4!``!F9I!!@'T!`W5N08!]`@%F
+M9F:0=55!#[9-`T$/MD<^C30`B<B9]_Z)T3G6?B]!#[95!`^VV8G>3(G_Z```
+M``!!#[95!(G>3(G_Z`````!!QT0D4`````#I7@$``$''1"10_O___^E0`0``
+M0<=$)%#^____Z4(!``!)@[_8"````'0'38N_V`@``$R)ZT&`?0$`#X2N````
+M#[8K2/_##[8#2/_#B<$/MM#VP@%T.T2+="0000'N13MT)"`/A]D```"+3"00
+M2`-,)`A!B>B^`````$R)_^A*]___.>@/A;@```!$B70D$.M32&/%3(TT&$R)
+M\$PIZ$B#P`)(8U0D%$@YT`^/D@````^VT4&)Z$B)V;X`````3(G_Z.;Y__^%
+MP'5X3(GS08`^`'4'08!^`0!T%+\0)P``Z`````"`>P$`#X52____#[8KA>UT
+M5[E4````N@(```"^`````$R)_^B@\___08M$)"`K1"00.<4/1^B+3"002`-,
+M)`A!B>BZ`````+X`````3(G_Z)3V__^%P'@&`40D$.L*0<=$)%#_____D+E4
+M````N@(```"^`````$R)_^A)\___28-\)#@`=`M)BT0D.(M4)!")$$R)YT'_
+M5"1(2(M<)!A(BVPD($R+9"0H3(ML)#!,BW0D.$R+?"1`2(/$2,-F9F:09F9F
+MD&9FD$B#[`A(@[_8"````'0'2(N_V`@``("_[A,```!U(L8%``````&Y(```
+M`$C'P@````"^#@```.@`````9F:09I!(@\0(PV9F9I!F9F:09F:02(/L"$B#
+MO]@(````=`=(B[_8"```Q@4``````+D@````2,?"`````+X.````Z`````!(
+M@\0(PV9FD&9FD&9FD$B#[!A(B1PD3(ED)`A,B6PD$$F)_0^VVD0/MN9(B[_0
+M"```B=I$B>;H`````(G:1(GF3(GOZ`````!(BQPD3(MD)`A,BVPD$$B#Q!C#
+M9F:02(M'"&;'@&S^___LF$B+1PAFB;!H_O__PV9F9I!F9I!(@^P(B?&)UK@`
+M````L`6T#T@E__\`_T@-```"`$BZ____`/____]((=!(#0````-(NO____\`
+M____2"'02+H`````!@```$@)T$BZ______\`__]((=!(N@``````!P``2`G0
+M2+K_______\`_T@AT$BZ````````"P!("=!(NO________\`2"'02+H`````
+M````#$@)T$B)!"2`^0=W0$"$]G0:#[;!#[8,!+C^____T\!F(8?L$P``ZQAF
+M9I`/ML$/M@P$N`$```#3X&8)A^P3```/M[?L$P``Z`````!(@\0(PV9F9I!F
+M9I!F9I!!5%532(G]2(._V`@```!T!TB+K]@(``!!O`````!!#[;<N0````"Z
+M!P```(G>2(GOZ-KP__^Y1````+H"````B=Y(B>_HQO#__[G0````N@````")
+MWDB)[^BR\/__N0````"Z!````(G>2(GOZ)[P__]!_\1!@_P!=J._H(8!`.B[
+M\/__B(7!$0``#[;(N@,```"^`````$B)[^AP\/__6UU!7,.0D)"0D)"0D)"0
+MD$B+1PA(+0`"`0")]HL$!HD%`````,-F9F:09F:09F:02(M'"$@M``(!`(GV
+MB10&PU-(B?M(BU<(QX*`_O__`````(N"!/___XD%`````(#,`8F"!/___[H$
+M````O@S"``#H`````+JX"P``O@C"``!(B=_H`````+H!``P`O@#"``!(B=_H
+M`````+H$````O@S#``!(B=_H`````+JX"P``O@C#``!(B=_H`````+H!``P`
+MO@##``!(B=_H`````+H`````OE#"``!(B=_H`````+H`````OE##``!(B=_H
+M`````$B+0PAFQX!,_O__``!(BT,(9L>`;/[__^R82(M#"&;'@&C^___LF&;'
+M@^P3``#__UO#9F9FD&9FD&9FD$@YO]`(``!!#Y7`@^8#C31VN`<```")\=/@
+M]]!!B<%$(T]41(E/5(32=`VX!````-/@1`G(B4=4BU=400^V\,'F"('&4,(`
+M`$B+O]`(``#H`````//#9F9FD&9FD&9FD$B#[!A(B1PD2(EL)`A,B60D$$B)
+M_4B)\TB-CR@2``!(BY=H"0``3(VB.+@/`&:!?B"%`'<92`^W1B!(#[:$.$`(
+M``!(:<#(#P``3(TD`DB+4TB`>@$"=0](BT($2(D!2(M"#$B)00A(@WMX`'02
+M2(MS>$B)[^@`````9F:09F:02(G>2(GOZ`````!!QD0D7`!(BQPD2(ML)`A,
+MBV0D$$B#Q!C#9F9FD&9F9I!F9F:02(/L.$B)7"0(2(EL)!!,B60D&$R);"0@
+M3(ET)"A,B7PD,$B)_4&)]4&)UD&)STB+1PA,BR!,B>?H`````$B)PTB%P'1\
+M3(GGZ`````!(B<)(A<!T;,9%7`%(C7M8QD,XX<9#.0'&0SH0QD,ENV8/MD5;
+M9HE#($R)8RC'0S20````2(U"$$B)0TA(B5-XQD`!`L9"$$!$B&@"1(AP`T2(
+M>`1(QX.@`````````+X`````Z`````!(B=Y,B>?H`````$B+7"0(2(ML)!!,
+MBV0D&$R+;"0@3(MT)"A,BWPD,$B#Q#C#9F9FD&9F9I!F9F:005=!5D%50515
+M4TB#[`A(B?U!B?9!B==!B<U(BT<(3(L@3(GGZ`````!(B<-(A<`/A/````!,
+MB>?H`````$B)PDB%P`^$W````,9%7`%(C4-82(D$),9#..'&0SD!QD,Z$,9#
+M);MF#[9%6V:)0R!,B6,HQT,TD````$B-0A!(B4-(2(E3>$B)QKD`````NI``
+M``"("$C_P$C_RG7VQD8!@L8&0$2(=@)$B'X#1(AN!$&`_0)W(4J-%*T`````
+M@>+\`P``2(U^"$F-M"0H$@``Z`````#K*TF+A"0H$@``2(E&"$$/MM6-%)7X
+M____2&/22(U^$$F-M"0P$@``Z`````!(QX.@`````````+X`````2(L\).@`
+M````2(G>3(GGZ`````!(@\0(6UU!7$%=05Y!7\-F9F:09F9FD&9F9I!!5D%5
+M05154TB)^T&)UHGPP.@"08G$0;T#````02'U2(M'"$B+*+D"````N@````"^
+M`````.@`````@'M<`'082(GOZ`````"_`0```.@`````@'M<`'7H2(M#"$B+
+M$$B!PB@2```/MD("A,!X0H/(@(A"`KD!````N@````"^`````$B)W^@`````
+M@'M<`'0?2(GOZ`````"_`0```.@`````@'M<`'7H9F9FD&9FD$$/MM2Y`0``
+M`+X#````2(G?Z`````"`>UP`=!QF9F:02(GOZ`````"_`0```.@`````@'M<
+M`'7H2(M#"$B+,$B!QB@2``!!#[;%N0,````IP4ACR46$]@^5P@^VTL'B`XL$
+M#H/@YPG0B00.00^VU+D!````O@,```!(B=_H`````%M=05Q!74%>PY"0D)"0
+MD$R+AQ@)``!F@7X@A0!W(4@/MT8@2`^VA#A`"```2&G`B`$``$F-/`#K#69F
+MD&9FD$F-N'B&`0!,C8(@!```QH(@!```)V:!?CCA`74K#[9&.O_(/`%W"0^V
+M5COK*V9FD&:!?CCA`740#[9&.H/H$;H/````/`%V$+H`````2(-_6`!T!`^V
+M5WF#X@]!#[9``8/@\`G008A``;H`````9H%^..$!=0H/MD8Z_\@\`78%N@$`
+M``#!X@=!#[9``8/@?PG008A``0^V009!B$`"#[8!08A``P^V005!B$`'#[9!
+M!T&(0`\/MD$"08A`!`^V00-!B$`%#[9!!$&(0`8/MD$!08A`#`^V00I!B$`(
+M#[9!"T&(0`D/MD$,08A`"@^V00A!B$`+#[9!"4&(0`W#9I!32(GS2(M/2$R+
+M`0^V1CB#^"\/A'T```"#^"]_,X/X&P^$3@$``(/X&W\,@_@29I!T8^E9`0``
+M@_@H9F:09F:0=%.#^"IT3NE$`0``9F9FD#V*````=#X]B@```&9F9I!_%8/X
+M-0^$"0$``#V(````="/I&0$``#V/````9F9FD'03/>$````/A(P```!F9I#I
+M^P```/9'8`%F9F:09F:0=`J!BY0```````0`]D=B$`^$Z@````^V0S@\*`^4
+MPCPJ#Y3`"="H`746@'LXB'00@'LXB@^%Q@```&9FD&9FD/9!#`%U&@^V<0A,
+MB<?H`````(3`#X2F````9F:09F:0@'LD@0^$E@```(&+E````````0#IAP``
+M`+@`````@'XY`0^%?0````^V3CJ#^1QW/+@!````2-/@J?8_P!UU&ZD(0`8`
+M=0NI```@`'469I#K&X..E`````CK18..E`````'K/(..E````"#K,[@`````
+MZS'V1V`!=`J!BY0```````0`@XN4`````>L39F:0N`````#V@Y8````@=`=F
+MD+@!````6\-F9I!F9I!F9I!`#[;'PV9F9I!F9F:09F:0B?@/ML3#9F9FD&9F
+MD&9FD,9')`)(BT=00(AP`DB+1U#&0`<`2(M'4(A0#,-F9F:0#[9'/8A&`@^V
+M1SR(1@,/MD<[B$8$#[9'.HA&"L-F9I`/MD=!B$8"#[9'0(A&`P^V1S^(1@0/
+MMD<^B$8*#[9'/8A&"P^V1SR(1@S#9F:09I"Y`````#G1?1QF9F:09F:0B=`I
+MR(/X`@^=P`^VP(U,`0$YT7SK\\-F9I!F9I!F9I!(@^PH2(D<)$B);"0(3(ED
+M)!!,B6PD&$R)="0@2(G[2(G508GV#[9'.(/X*G0I@_@J?PV#^"AT'^GS````
+M9F:0/8@```!T*3V*````9F9FD'0>Z=D```!$#[9C0$0/MFL_2(GN2(G?Z```
+M``#K%V:01`^V8T5$#[9K1$B)[DB)W^@`````QD4%0/:#E@````%T-42(90!$
+MB&T(0HT$]0````"(10$/MD,X/"@/E,(\B`^4P`G0@^`!@_@!&<#WT(/`88A%
+M!NMI]H.6````!'0P1(AE`42(;0D/MD,X/"@/E,(\B`^4P`G0@^`!@_@!&<"#
+MX!"#P"6(10;K-69FD&:01(AE`0^V0SJ#X`\(104/MD,X/"@/E,(\B`^4P`G0
+M@^`!@_@!&<"#X`*#Z#B(10:02(L<)$B+;"0(3(MD)!!,BVPD&$R+="0@2(/$
+M*,-F9I!54TB#["A(B?-(BW9(2(GG_+D$````N`````#S2*OVAJ<````$=`Q(
+MBY;(````2/_*ZP6+5GC_RH![."5U8KT(````2(G02,'H&(@$)$B)T$C!Z!"(
+M1"0!2(G02,'H"(A$)`*(5"0#]H;5````$'4/QD0D!@+&1"0'`.FG````2('&
+MZ@```$B-?"0$N@0```#H`````.F,````9F:09F:0O2````!(B=!(P>@XB`0D
+M2(G02,'H,(A$)`%(B=!(P>@HB$0D`DB)T$C!Z""(1"0#2(G02,'H&(A$)`1(
+MB=!(P>@0B$0D!4B)T$C!Z`B(1"0&B%0D!_:&U0```!!U$L9$)`H"QD0D"P#K
+M'&9FD&9FD$B!QNH```!(C7PD"+H$````Z`````!(BWM(2&/52(GFZ`````!(
+M@\0H6UW#9F9FD`^V1SH*1SL*1SP*1ST/ML`/ME=`@^(!"=!T%;HD````O@4`
+M``#H`````//#9F9FD,9&!NQ(QX>@`````````,-(@^P@2(D<)$B);"0(3(ED
+M)!!,B6PD&$B)^TB)]0^V1SB#^"]T"CV/````=!7K4Y!$#[9G0$0/MF\_Z```
+M``"0ZP]$#[9G140/MF]$Z`````#&105`]H.6````!'021(AE`42(;0G&109"
+MZQ9F9F:01(AE`0^V0SJ#X`\(107&109`2(L<)$B+;"0(3(MD)!!,BVPD&$B#
+MQ"##9F:09F:02(GQQD(%0`^V1CB#^#5T$#V1````="'K)V9F9I!F9I!(#[='
+M8(/@`8/X`1G`@^#]@^@6B$(&ZQS&0@;JZQ9FD+HD````O@4```!(B<_H````
+M`//#]D$Y`G0$QD$D`//#]D<\\'0/NB0```"^!0```.@`````\\-F9I!F9I!F
+M9I!)B?)!N0````!!N`T```!(B<A$B`A(_\!)_\AU]4$/MD(X@_@U#X2=````
+M@_@U?RR#^"AT<(/X*'\1@_@;9F:0#X22````Z;4"``"#^"IFD'13@_@O=&'I
+MI`(``#V/````=%4]CP```'\;/8@```"0=#,]B@```'0L9F9FD&9FD.E[`@``
+M/9$```!F9I!F9I!T-CWA````=&AF9F:09F:0Z5L"```/MO)(B<I,B=?H````
+M`.E.`@``2(G.3(G7Z`````#I/@(``$B)RDR)UN@`````Z2X"``!!]D(\`709
+MQD$&<,9!!`#&00,`QD$"`,9!!4#I#@(``,9!!N#I!0(``+@`````08!Z.0$/
+MA?H!``!!#[9".H/X'`^'U0$``(G`_R3%`````,9!!P3IU0$``,9!!P#IS`$`
+M`,9!!NQFD.G!`0``QD$&[\8!`T$/MD([@\A`B$$!Z:H!``#&00;OQ@$'Z9X!
+M``#&009`QD$!`<9!!4#IC0$``,9!!N_&`0-!#[9".X/("(A!`>EV`0``QD$&
+M[\8!`NEJ`0``QD$&[\8!@NE>`0``QD$&[\8!!NE2`0``QD$&[\8!ANE&`0``
+MQD$&XT$/MD([B$$!Z34!``#&00:PQ@'8QD$#3\9!!,+I(0$``,9!!K#&`=G&
+M00-/QD$$PND-`0``QD$&L,8!VL9!`T_&003"Z?D```!(#[='8(/@`8/X`1G`
+M@^#]@^@6B$$&Z=X```#&00;OQ@&JZ=(```#&00;OQ@%5Z<8```#&008OQD$!
+M`<9!`A#IM0```,9!!N1!#[9"/(@!00^V0CN(007IG0```$$/MD([B$$&00^V
+M0CR(`4$/MD(]B$$"00^V0CZ(00-!#[9"/XA!!$$/MD)!B$$*00^V0D"(00'K
+M9,9!!NA!#[9"/(@!00^V0CN(005!#[9"/8A!`D$/MD(^B$$#00^V0C^(001!
+M#[9"0(A!`>LO0?9"/`%T*,9!!G#&000`QD$#`,9!`@#&005`ZQ*X`````,-F
+M9I!F9I"X`````,.X`0```//#D)"005154XGU3(MG"$F![``"`0"[`````#GS
+M<S9F9I!F9I!!BX0D`,@``(D%`````*@!=0ZX`````.L<9F9FD&9FD+\*````
+MZ`````#_PSGK<M"X_____UM=05S#9F:09F:02(M_"$B![P`"`0`/MM+!X@A%
+M#[;`0<'@!$0)PHG0@\@$A,D/1=!!@_G_=!%$B<@E__\#`(F'!,@``(/*`HD6
+MPTB+1PB#S@&)L`#&___#9I!(@^PH2(E<)!!(B6PD&$R)9"0@2(G[28GT2(MO
+M"$B+A_@3```/ME`"0;G_____0;@!````N0$```!(C70D#.AM____BW0D#$B)
+MW^BA____OA`G``!(B=_H]/[__[K_____A<!U&8N%#,;__XD%`````(E$)`Q!
+MB`0DN@````")T$B+7"002(ML)!A,BV0D($B#Q"C#9F9FD&9F9I!F9F:0059!
+M54%455-(@^P028G\B<U!B?9!B=6[`````#G+<S1(C70D#TR)Y^@S____A<!U
+M$T2)\")$)`]$..AU![@`````ZQ6_"@```.@`````_\,YZW+,N/____](@\00
+M6UU!7$%=05[#9F9FD&9FD&9FD%-(@^P02(G[2(N'^!,```^V$$&Y_____T&X
+M`````+D`````2(UT)`SH<_[__XMT)`Q(B=_HI_[__[X0)P``2(G?Z/K]__^Z
+M_____X7`=1ZYX),$`+H"````O@,```!(B=_H*O___X/X`1G2]]*)T$B#Q!!;
+MPV9F9I!F9F:09F:055-(@^P(2(G[2(G52(N'^!,```^V4`M!B?%!N`$```"Y
+M`0```$B-="0$Z/']__^+="0$2(G?Z"7^__^^$"<``$B)W^AX_?__NO____^%
+MP'482(M#"(N`#,;__XD%`````(A%`+H`````B=!(@\0(6UW#9F9FD&9F9I!F
+M9I!F9I!54TB#[`A(B?N)]<9$)`?_2(U4)`?H`````+K_____A<!U?KH`````
+M@'PD!P!T<DB)W^C)_O__B<*#^/]T8TB+@_@3```/ME`*08GI0;@`````N0``
+M``!(B>9(B=_H/OW__XLT)$B)W^AS_?__OA`G``!(B=_HQOS__[K_____A<!U
+M'KG@DP0`N@````"^`P```$B)W^CV_?__@_@!&=+WTHG02(/$"%M=PV9FD&9F
+MD%532(/L"$B)^XGUZ$#^__^)PH/X_W1F2(N#^!,```^V4`9!B>E!N`````"Y
+M`````$B-="0$2(G?Z+/\__^+="0$2(G?Z.?\__^^$"<``$B)W^@Z_/__NO__
+M__^%P'4>N>"3!`"Z`````+X#````2(G?Z&K]__^#^`$9TO?2B=!(@\0(6UW#
+M9F9FD&9FD&9FD$B#["A(B5PD"$B);"003(ED)!A,B6PD($B)_4&)]4&)U$B+
+M7PCHEOW__T2)HPC&__](BX7X$P``#[90!46)Z4&X!````+D`````2(UT)`1(
+MB>_H"?S__XMT)`1(B>_H/?S__[X0)P``2(GOZ)#[__^Z_____X7`=1ZYB!,`
+M`+H`````O@$```!(B>_HP/S__X/X`1G2]]*)T$B+7"0(2(ML)!!,BV0D&$R+
+M;"0@2(/$*,-F9F:09F9FD&9FD&9FD$B#["A(B1PD2(EL)`A,B60D$$R);"08
+M3(ET)"!)B?Y!B?5)B=2)S;L`````.<MS'XG80HL4($&-=!T`3(GWZ/W^__^#
+M^/]T#(/#!#GK<N&X`````$B+'"1(BVPD"$R+9"003(ML)!A,BW0D($B#Q"C#
+M9F9FD&9F9I!F9F:09F:02(/L*$B)7"002(EL)!A,B60D($B)^TF)U$B+;PA(
+M@>T``@$`@/D%N`0````/0\A(BX?X$P``#[90!$&)\40/ML&Y`0```$B-="0,
+MZ-#Z__^+="0,2(G?Z`3[__^^$"<``$B)W^A7^O__NO____^%P'49BX4,R```
+MB04`````B40D#$&)!"2Z`````(G02(M<)!!(BVPD&$R+9"0@2(/$*,-F9F:0
+M9F9FD&9F9I!F9I!(@^PX2(E<)`A(B6PD$$R)9"083(EL)"!,B70D*$R)?"0P
+M28G^08GT2(G518T\#(GS@^/\08GU08/E`W1)N00```!(C50D!(G>Z`+___^-
+M0P2Y!````$0Y^'8)1(GY1"GA1`'I1(GJ03G-<Q=(C70D!(G0#[8$!HA%`$C_
+MQ?_".<IR[H/#!$6)_4&#Y?Q$.>MS)[D$````2(U4)`2)WDR)]^BJ_O__BT0D
+M!(E%`$B#Q02#PP1$.>MRV40Y^W,YN00```!(C50D!(G>3(GWZ'[^__]$B?DI
+MV;H`````.<IS%TB-="0$B=`/M@0&B$4`2/_%_\(YRG+NN`````!(BUPD"$B+
+M;"003(MD)!A,BVPD($R+="0H3(M\)#!(@\0XPY!54TB#[`A(B?O'1"0$````
+M`$B+;PC&A_`3````#[85`````$&Y`````$&X`@```+D!````2(UT)`3H$OG_
+M_XMT)`1(B=_H1OG__[X0)P``2(G?Z)GX__^%P'4[BX4,QO__B04`````B40D
+M!#V_0P``=23'@^`3``"_0P``QX/D$P`````@`,>#Z!,````0``!FN```ZP6X
+M_____TB#Q`A;7<-F9F:09F9FD&9FD&9FD%532(/L"$B)^\=$)`0`````2(MO
+M",:'\!,````/MA4`````0;D`````0;@"````N0$```!(C70D!.AB^/__BW0D
+M!$B)W^B6^/__OA`G``!(B=_HZ??__X7`=3N+A0S&__^)!0````")1"0$/1]C
+M``!U),>#X!,``!]C``#'@^03``````0`QX/H$P`````!`&:X``#K!;C_____
+M2(/$"%M=PV9F9I!F9F:09F:09F:055-(@^P(2(G[QT0D!`````!(BV\(QH?P
+M$P```0^V%0````!!N?____]!N`(```"Y`0```$B-="0$Z++W__^+="0$2(G?
+MZ.;W__^^$"<``$B)W^@Y]___A<!U:HN%#,;__XD%`````(E$)`0]'T,``'0N
+M/1]$``!U3,>#X!,``!]$``#'@^03``````0`QX/H$P`````!`&:X``#K+69F
+MD,>#X!,``!]#``#'@^03``````0`QX/H$P`````!`+@`````ZP6X_____TB#
+MQ`A;7<-F9F:09F9FD&9F9I!F9I!54TB#[`A(B?O'1"0$`````$B+;PC&A_`3
+M````#[85`````$&Y`````$&X`@```+D!````2(UT)`3HTO;__XMT)`1(B=_H
+M!O?__[X0)P``2(G?Z%GV__^%P'5UBX4,QO__B04`````B40D!#WO$0``=`X]
+M[Q(``'0LZU5F9I!FD,>#X!,``.\1``#'@^03``````0`QX/H$P`````!`+@`
+M````ZS#'@^`3``#O$@``QX/D$P`````$`,>#Z!,``````0"X`````.L+9F:0
+M9F:0N/____](@\0(6UW#9F9FD%-(B?OHA_W__X7`=1-(QX/X$P```````+H`
+M````ZV&02(G?Z!C^__^%P'422,>#^!,```````"Z`````.M"2(G?Z)K\__^%
+MP'422,>#^!,```````"Z`````.LD2(G?Z+S^__^Z_____X7`=1-(QX/X$P``
+M`````+H`````9F:0B=!;PV9F9I!F9F:09F9FD$B#["A(B5PD"$B);"003(ED
+M)!A,B6PD($B)^XGU08G-28G4N@````!(@[_X$P````^$N@```$6$P'0M@_[_
+M=1$/MX?@$P``9D&)!"3IE@```$R)XNC7^O__N@````"%P`^%B@```.M_@_[_
+M9F:09I!U$T&`/"0/#Y2'\1,``+H!````ZVNZ`````("_\1,```!T78GPN@``
+M``#WM^@3``"%TG4J@+_P$P```'0.Z`````"Z`````(7`=36)[DB)W^CK]___
+MN@````"%P'4B1(GI3(GBB>Y(B=_H(OG__[H`````A<!U";H!````9F9FD(G0
+M2(M<)`A(BVPD$$R+9"083(ML)"!(@\0HPY"0D)"005154TB#[#!(B?VX````
+M`+!MM/]()?__`/](#0``(P!(NO___P#_____2"'02`T````42+K_____`/__
+M_T@AT$BZ`````#H```!("=!(NO______`/__2"'02+H``````.\``$@)T$BZ
+M________`/]((=!(N@```````!8`2`G02+K_________`$@AT$BZ````````
+M`))("=!(B40D"+D`````NB````!(C40D$)"("$C_P$C_RG7VQD0D%`%!O```
+M``!(C5PD$+D@````2(G:O@X```!(B>_H`````(7`=5N_@!H&`.@`````N2``
+M``!(B=J^#P```$B)[^@`````@_@@=3=(C70D($B-?"0(N0@```#\\Z8/E\(/
+MDL`XPG4;0;P!````#[9$)![!X`@/ME0D'PG0B87L"```00^VQ$B#Q#!;74%<
+MPV9FD&:0N0,1`">Z`````$B#?Q``=#1(BT<0BP")!0````")QDB+1Q")"$B+
+M1Q"+`(D%`````+H`````.<AU"TB+1Q"),+H!````B=##9F9FD&9F9I!!5T%6
+M055!5%532(/L"$B)^TB+!XN`8`#__XD%`````(/@`X/X`70:@_@!<@>#^`)T
+M;^MWQX?H"````0```&:0ZVGH`````(3`="6+!0````!(8]!(B1S5`````/_`
+MB04`````QX/H"````@```.L[2(G?Z`````"$P'0OBP4`````2&/02(D<U0``
+M``#_P(D%`````,>#Z`@```0```#K"L>'Z`@```,```"+!0````!(8]!(B1S5
+M`````/_`B04`````@#T```````^%J````$&]`````(7`#XZ@`@``2(,]````
+M``!T-T2)Z`^VT$C'Q@````!(BPT`````2#L,UG0=2(L$UDB)B-@(``!(BQ36
+M2(L%`````$B)@M@<``!(@ST``````'0W1(GH#[;02,?&`````$B+#0````!(
+M.PS6=!U(BP362(F(X`@``$B+%-9(BP4`````2(F"X!P``$'_Q4$/ML4[!0``
+M```/C&O____I!@(``$&]`````$R+%0````!-A=(/A.X```!!OP````!)Q\8`
+M````0;@`````1#L]``````^-N````$G'Q`````!$B<`/MM!)BP342(.XV`@`
+M```/A88```!,.=`/A'T```"[``````^V#0````"$R71M1(G"1`^VRDC'Q0``
+M``!)Q\,`````9F9FD$J+=,T`.$XY<C</ME8Y#[;!B<<#/0`````Y^G,D03A*
+M.7(>00^V0CDY^',53(F6V`@``$J+1,T`3(F0V!P``.L3_\,/ML-(P>`%0@^V
+M3!@-A,EUK$'_P$$/ML`[!0`````/C$____]!_\5$B>H/ML)-BQ3&3872#X4?
+M____0;T`````3(L5`````$V%T@^$[````$&_`````$G'Q@````!!N`````!$
+M.ST`````#XVV````2<?$`````&9FD&9FD$2)P`^VT$F+!-1(@[C@"`````^%
+M?@```$PYT'1YNP`````/M@T`````A,ET:42)PD0/MLI(Q\4`````2<?#````
+M`$J+=,T`.$XY<C</ME8Y#[;!B<<#/0`````Y^G,D03A*.7(>00^V0CDY^',5
+M3(F6X`@``$J+1,T`3(F0X!P``.L3_\,/ML-(P>`%0@^V3!@-A,EUK$'_P$$/
+MML`[!0`````/C%?___]!_\5$B>H/ML)-BQ3&3872#X4A____2(/$"%M=05Q!
+M74%>05_#9I!3NP````"X`0```(`]``````!T:>L*N`$```#K8&9FD`^VPTC!
+MX`7_PP^VB`````"$R71$1(L-`````$G'P@`````X3SER'@^V5SD/ML%&C00(
+M1#G"<PXX3CER"0^V1CE$.<!RL0^VPTC!X`7_PT(/MDP0#83)=<JX`````%O#
+MD(N'Z`@``+H!````.X;H"```=PZ+A^@(```[AN@(```9THG0PV9F9I!F9F:0
+M9F9FD+@`````.ST`````?3=(8\=(Q\$`````2(T$0$C!X`,/MQ0(9HD6#[=4
+M"`)FB58"#[94"`B(5@@/MD0("8A&";@!````\\-F9F:09F:09F:0059!54%4
+M55-(@^P(B7PD!+T`````2<?&`````$G'Q0````!(8\5(B<)(P>`%9D*#/#``
+M#X2Q````0;H`````38GH0H!\*`P`#X21````2,?#`````/Q!O`````!)B=.0
+M28G126/"2(T$T$B--(-(C7PD!+D$````\Z8/E\(/DL`XPG4\3(G&3(G)2,'A
+M!4(/MD0!#?_`0HA$`0U"@'P!#`!T'4(Z1`$,=A9F#[;`9D(/MGP!#$2)XF;W
+M]XA4,0V00?_"3(G:2<?``````$R)V$C!X`5"#[9$``Q$.=!_@?_%@_T##XXY
+M____2(/$"%M=05Q!74%>PV9FD&9FD&9FD$%7059!54%455-(@^P8QD0D%P!!
+MOP`````/MD0D%XE$)`Q!O@````!!#[;?B5PD$$$/MM:Y`````(MT)!"+?"0,
+MZ`````!!B<1!N0````!$.PT`````#XU*`0``2,?%`````$ECP4B-!$!(P>`#
+M#[=4*`+!XA`/MP0H"<)$.>(/A1$!``"[`````$G'PP````!)8\%(C01`2(TT
+MQ0````!)Q\4`````2<?"`````&:0#[;32(G12,'A!69"@SP9`'522(N&````
+M`$J)!!F+A@````!"B409"$H/MD0I#$C!X@-(C00"#[9<)!=!B%R##4H/MD0I
+M#$B-!`)%B'R##DH/MD0I#$@!PD6(=),/0OY$*0SK=P^V^TG'P`````!(B?E(
+MP>$%0@^V1`$,N@````!"]W06!(72=$=*#[9$`0Q(C13]`````$B-!`(/MEPD
+M%T&(7(,-2@^V1`$,2(T$`D6(?(,.2@^V1`$,2`'"18ATDP]"_D0!#.L29F9F
+MD&9FD/_#@/L##X8E____26/!2(T$0/]$Q0Q!_\%$.PT`````#XR]_O__0?[&
+M#X2!_O__0?_'08#_'P^&9O[___Y$)!>`?"07_P^%2/[__TB#Q!A;74%<05U!
+M7D%?PV9FD&9FD$%7059!54%455-(@^P(2(GS28G40;T`````@ST``````'4/
+MQP4``````0```.CN_?__2(7;=`/&`P!!N@````!$.Q4`````?3M(Q\$`````
+M2,?&`````$ECPDB-!$!(C13%`````$0#;`H,2(7;=`@/M@,"!#*(`T'_PD0[
+M%0````!\TTV%Y`^$JP```$&Z`````$ECPDB)PDC!X`5F@[@```````^$C0``
+M`$&X`````("X``````!T<4C'Q0````#\2<?'`````$F)UDG!Y@5)B=-)B=%)
+M8\!(C0302(UTA0!,B>>Y!````/.F#Y?"#Y+`.,)U'$B%VW0/3(G(2,'@!4(/
+MMD0X#8@#1P^V;#X,ZQE!_\!,B=I,B=A(P>`%#[:``````$0YP'^H0?_"08/Z
+M`P^.6____T$/ML5(@\0(6UU!7$%=05Y!7\-F9I!FD+@`*```PV9F9I!F9I!F
+M9I"XT````,-F9F:09F:09F:0N`@```##9F9FD&9FD&9FD$%6055!5%5328G\
+M08GU2(G328G.2(VJ`!0``+D`````N@`H``!(B=B("$C_P$C_RG7V3(ES((L5
+M`````(U"`8D%`````(A30$2):SC&0T$`00^W!"1FB4,P00^W1"0"9HE#,D&+
+M1"0$B4,T3(EU((A50$2);3C&14$!00^W!"1FB44P00^W1"0"9HE%,D&+1"0$
+MB44T#[=#,CTB)P``?VL]("<```^-]0```#U`(0``#X3J````/4`A``!F9I!F
+MD'\;/2`A```/A-,````](B$```^$R````.G7````/40A```/A+@````]1"$`
+M`&9FD`^,O@```"T0)P``@_@!9I`/AZX```#IE0```#U@)P``#X2*````/6`G
+M``!F9I!FD'\P/4`G``!T=SU`)P``9I!_$#TP)P``=&=F9F:09F:0ZW(]1"<`
+M`'179F9FD&9FD.MB/8(G``!T1SV")P``9I!_$#V`)P``=#=F9F:09F:0ZT(]
+M@)$``'0+/8"4``!FD'0>ZS!FQT,\@)'&0SX$9L=%/("1QD4^!.L:9F:09F:0
+M9L=#/("4QD,^!&;'13R`E,9%/@1!#[9$)`B(0T)!#[9$)`B(14*Y```$`+H`
+M````O@(```!,B??H`````$B)`[D`(```N@````"^`````$R)]^@`````2(E#
+M$$B#.P!T!4B%P'4*N`````#I\0```$B+`TB-B``"`0!(B4L(2(V0```"`$B)
+M$T@%`$`"`$B)10!(B4T(2(M#$$B)11!!N`````!$.P4`````?59(Q\<`````
+M1(L-`````$ECP$B-!$!(C0S%`````$&+!"0Y!#EU*$C'Q@````"+!#'_P(D$
+M,8-\.0P`=!([1#D,=@RZ`````/=T.0R)%#%!_\!%.<A\N$B+0PC'@"""__\!
+M\`,`2(M#",>`*(+__P$``.A(BWL@OG@```#H`````(G")0!P```]`"```'81
+M#[;R2(M[(+IX````Z`````!$B>_HK/C__TB)W^@4]/__N`$```!;74%<05U!
+M7L-F9I!F9I!32(G[Z`````!(@<,`%```2(G?Z`````"X`0```%O#D$B#[!A(
+MB5PD"$B);"002(G]2(N?T`@``$B!PP`4``#H`````(!]40%U!H![40%T.TB-
+MG7`!``!(BWTH2(G>Z`````#'A7`!``#H`P``2,>%@`$```````!(B:V(`0``
+M2(M]*$B)WN@`````2(M<)`A(BVPD$$B#Q!C#9F:09F:055-(@^P(2(G[2(VO
+M`!0``.@`````2(E#*$B)12A(B9O0"```2(F=T`@``(N#Z`@``(F%Z`@``$B)
+MW^@`````2(GOZ`````!(B=_H`````+H`````A,!T?DB)[^@`````N@````"$
+MP'1M2(G?Z`````"_T`<``.@`````2(G?Z`````!(B=_H`````,>#<`$``.@#
+M``!(QX.``0```````$B)FX@!``!(C;-P`0``2(M[*.@`````O@````!(B=_H
+M`````+X`````2(GOZ`````"Z`0```(G02(/$"%M=PY!!5%532(/L,$B)^[@`
+M````L&VT_T@E__\`_T@-```C`$BZ____`/____]((=!(#0```!1(NO____\`
+M____2"'02+H`````.@```$@)T$BZ______\`__]((=!(N@``````[P``2`G0
+M2+K_______\`_T@AT$BZ````````%@!("=!(NO________\`2"'02+H`````
+M````DD@)T$B)1"0(2(._V`@```!T!TB+G]@(``"Y`````+H@````2(U$)!"(
+M"$C_P$C_RG7VQD0D%`%!O`````!(C6PD$+D@````2(GJO@X```!(B=_H````
+M`(7`=4>_@!H&`.@`````N2````!(B>J^#P```$B)W^@`````@_@@=2-(C70D
+M($B-?"0(N0@```#\\Z8/E\`/DL(XT+@!````1`]$X$6$Y'412,?'`````+@`
+M````Z`````!!#[;$2(/$,%M=05S#9F:0\\-F9F:09F9FD&9FD&9FD%532(/L
+M"$B)_4B)\[D`````NH````!(B?!F9F:09F:0B`A(_\!(_\IU]H.]Z`@```$/
+ME$,3BT4XB0.`2Q$0#[=%,&:)0P0/MT4R9HE#!HN%Z`@``(A#<,9#$B`/MT4R
+M9CT@(0^4PF8](B$/E,`)T*@!=$3&0Q<"QT,\4F]C:\=#0&5T4D''0T1)1"!3
+MQT-(4T0@,L=#3#$R>"#'0U!#;VYTQT-4<F]L;&;'0UAE<L9#6@#IX@````^W
+M53*-@O#8__]F@_@!#Y;!9H'Z0"$/E,`)R*@!=0MF@?I$(0^%I````,9#%P0/
+MMT4R9BT0)V:#^`%W/<=#/%)O8VO'0T!E=%)!QT-$240@,L=#2#<Q>"#'0TQ3
+M05,@QT-00V]N=,=#5')O;&QFQT-897+&0UH`ZVD/MT4R9CU`(0^4PF8]1"$/
+ME,`)T*@!=%''0SQ2;V-KQT-`97120<=#1$E$(%/'0TA31"`RQT-,,31X(,=#
+M4$-O;G3'0U1R;VQL9L=#6&5RQD-:`.L4QD,7"$B->SQ(Q\8`````Z``````/
+MMD,7]F,2B$,0A,!U!,9#$(#'0QA(:6=HQT,<4&]I;L=#('0@5&7'0R1C:&YO
+MQT,H;&]G:<=#+&5S+"#'0S!);F,NQD,T`$B#O>`(````=!%(BX7@"```2(M`
+M$$B)0VCK"$B+11!(B4-HQT-@`"```$B#Q`A;7<-F9F:09F9FD&9F9I!F9I#&
+MA\L`````PV9F9I!F9F:02(/L6$B)7"1`2(EL)$A,B60D4$B)_4R+9WA)BX0D
+MT`@``(!X/P`/A:L```!(BY^`````2(M_8$0/MH\'`0``1`^V10`/MDT"#[95
+M`8MU"`^VA],```")1"0X#[:'T@```(E$)#`/MH?1````B40D*`^VA]````")
+M1"0@#[:'SP```(E$)!@/MH?.````B40D$`^VA\T```")1"0(#[:'S````(D$
+M)$&#X`%(Q\<`````N`````#H`````$C'A8``````````BU4(2(N]D````$B)
+M[O_3ZSU(C9^8````28M\)"A(B=[H`````,>%F````/0!``!(QX6H````````
+M`$B)K;````!)BWPD*$B)WN@`````2(M<)$!(BVPD2$R+9"102(/$6,-F9F:0
+M9F9FD$%7059!54%455-(@^P(28G]28GT#[?22&G2B`$``$B)U4@#KQ@)``!(
+MB[_0"```2(''`!0``$B);F!(B74X2(-]4`!U"TB#?5@`#X2C`P``O@````!!
+M@`PD`4B+15A)B40D<$B+15!)B40D:+H`````08!]0P!V)4B+34AF9F:0#[;"
+M2&O`:$H[C"A($@``#X2$`@``_\)!.%5#=^.Z@/___TF+C=`(```/ML(/MH0(
+M0`@``#S_="1(@WU0`'0;#[;`2&G`R`\``$@#@6@)``!(.T50#X0U`@``_\;_
+MPH#Z@7;&NH+___])BXW0"```D`^VP@^VA`A`"```//]T'0^VP$AIP-````!(
+M`X%`"0``2#M%6`^$ZP$``/_&_\*`^H5VS;J`____#[;"#[:$.$`(```\_W0D
+M2(-]4`!T&P^VP$AIP,@/``!(`X=H"0``2#M%4`^$GP$``/_&_\*`^H%VQKJ"
+M____#[;"#[:$.$`(```\_W0=#[;`2&G`T````$@#AT`)``!(.T58#X1=`0``
+M_\;_PH#ZA7;-08!]40%U/TB#?5``=!(/MG5Y2(M]4+H`````Z`````!(@[T8
+M`0````^$"0(```^VM04!``!(B[T8`0``N@````#H`````$B#O1@!````#X3C
+M`0``3(M]4$&^`````$&`?U@`=DI)C5](2(G?Z`````!(C4CP2(M3"$B)0PA(
+MB1A(B5`(2(D"@+D'`0``_W46@'E!`'402(.Y&`$```!U#V9FD&9FD$'_QD4X
+M=UAWND4X=U@/A=L````/MH4'`0``08A$)`)!O@````!!@']8``^&P`$``$F-
+M7TA(B=_H`````$B-2/!(BU,(2(E#"$B)&$B)4`A(B0)(@WDX`'1'2(M1.`^V
+M0@(Z@0<!``!T-TB#NH``````=2U(@[J(`````'4C#[:!!P$``(A"`D@/MU$P
+M28NUT`@``+\'````Z`````!F9I!!_\9%.'=8=XOI0@$``$&(="0!Z:+^__]!
+MB'0D`69FD.F5_O__08AT)`'IB_[__T&(="0!Z8'^__]!#[9%08T$@D&(A"3,
+M````Z6_]__\/MD5Y08A$)`+&A0<!``#_0;X`````08!_6``/AN$```!)C5](
+M2(G?Z`````!(C4CP2(M3"$B)0PA(B1A(B5`(2(D"@+D'`0``_W1,QH$'`0``
+M_TB#>3@`=#Y(BU$X#[9"`CI!>70Q2(.Z@`````!U)TB#NH@`````=1T/MD%Y
+MB$("2`^W43!)B[70"```OP<```#H`````$'_QD4X=UAWA.M?#[9%>4&(1"0"
+MZU1!#[9%08T$@D&(1"0!08B$),P```#K*;H`````08!]0P!V'4B+34@/ML)(
+M:\!H2CN,*$@2``!TR/_"03A50W?G03A50W4&0<9$)`'_0<9$)`(`9I!(BX60
+M````28E$)"!(BX68````28E$)"A(BX6@````28E$)#!(BX6H````28E$)#A(
+MBX6P````28E$)$!(BT5\28E$)`Q(BX6$````28E$)!2+A8P```!!B40D'$B+
+MA;@```!)B40D2`^W16!F08E$)%@/MT5B9D&)1"1:2(M%<$F)1"10#[9%>D&(
+M1"1<]D5$!'4C08"][Q,```!T$4'^C>\3``!!@+WO$P```'4(3(GOZ`````!(
+MBT4X#[9P`;H`````3(GOZ`````!(#[9%0*@"=`^H!'0+J`%U!T&`#"0"ZP5!
+M@"0D_0^V5430ZH/B!$$/M@0D@^#["=!!B`0D3(GGZ)CY__](@\0(6UU!7$%=
+M05Y!7\-F9I!F9I!F9I!!5T%6055!5%532(/L"$F)_8GU28G4O@````"ZT```
+M`$R)X$"(,$C_P$C_RG7U08EL)`B#_3]^"DF!Q0`4``"#[4!(8\6Z`````$F#
+MO,5`!`````^%@P(``$ACQ4V)I,5`!```38EL)'A)B8PD@````$V)A"20````
+MN@$```!!@'U1`0^%4P(``&;'1"0&_P"!_84```!_#V9"#[:$*$`(``!FB40D
+M!F:!?"0&_P`/A/X!``!(#[=$)`9)BXT8"0``2&G0B`$``/9$"D,$#X3?`0``
+MBT0*0"4`__\`/0``_P`/A<L!``!(C1P*]D-$!`^$3`$``,:#X`````!(#[9#
+M0*@"=#*H!'0NJ`%T*L9#0@7&0T,$#[93>4B+<U!(BWM(2(G9Z`````#I?0$`
+M`,:#X0````'K<D@/MD-`J`)FD`^%@````*@$='RH`71X3(MC2,9#0@/&0T,$
+M0;X`````08!\)`X`=$%)C6PD8$B)[^@`````2(M5"$B)10A(B2A(B5`(2(D"
+M@'A"_P^5PD@YV`^5P`^VTH70=9-!_\9!#[9$)`Y$.?!_Q("[X0````$/A/4`
+M``!(B=Y,B>_H`````.GE````2`^V0T"H`@^$V````*@$#X30````J`%F9I`/
+MA<4```!(BT-(#[9`#;T`````08!]/@!V*40/MN!`#[;-3(G@2-/XJ`%T#[H`
+M````B<Y,B>_H`````/_%03AM/G?;QD-#!L9#0@5FQX/```````!(B=Y,B>_H
+M`````.MJ3(M[2,9$)`4`08!_#@!V2DV-=V!,B??H`````$B)PTF+1@A)B5X(
+M3(DS2(E#"$B)&(![0O]T%`^V0T$\(@^4PCP-#Y3`"="H`74\_D0D!0^V1"0%
+M03A'#G>Z#[=4)`9,B>9,B>_H`````+H!````ZRI(8\5)QX3%0`0```````"Z
+M`````.L42&/%2<>$Q4`$````````N@````")T$B#Q`A;74%<05U!7D%?PV9F
+MD$B#["A(B1PD2(EL)`A,B60D$$R);"083(ET)"!(B?M)B?5)B=1(BV]@2(7M
+M=0I(B=?_UND(`0``2(._B`````!U"DB#OX``````=`M,B>=!_]7IZ0```("]
+MX`````!FD`^%S@```$B+?4A(#[9'#*@0#X6]````J`@/A;4```!,BS>`?7L`
+M=`U(B>J^!@```.@`````3(FKB````$R)HY````!(#[9%0*@"=":H!'0BJ`%T
+M'L9%0@7&14,$#[95>4B+=5!(BWU(2(GIZ`````#K;D@/MD5`J`)U):@$9F:0
+M=!ZH`70:QD5"`\9%0P1(B>Y,B??H`````.M%9F:09I!(#[9%0*@"=#>H!&9F
+MD&:0="ZH`74JQD5"!<9%0P9FQX7```````!(B>Y,B??H`````.L,3(GG0?_5
+M9F:09F:02(L<)$B+;"0(3(MD)!!,BVPD&$R+="0@2(/$*,-F9I!(@^P82(D<
+M)$B);"0(3(ED)!!(B?-(BT=(3(L@2(MN:`^V1B2#^"!T3X/X('\2A<!T(H/X
+M!G\ZZR]F9F:09F:0@_@B=#.#^")\'H/`@(/X`7<?ZQ1(BT<XQT`$`````,:%
+MJ@````'K$,:%J@````WK![@`````ZS%(@WMX`'012(US>$R)Y^@`````9F:0
+M9I!(B=Y,B>?H`````$B)[_^5P````+@!````2(L<)$B+;"0(3(MD)!!(@\08
+MPV9F9I!(@^PX2(E<)`A(B6PD$$R)9"083(EL)"!,B70D*$R)?"0P2(G[2(GU
+M3(MO>$B+1DA(B3A(@W]@`'46QH:J`````DB)]_^6P````.D'!@``D$B+1V#V
+M0$0"=!7&AJH````"2(GW_Y;`````Z><%``!,B>_H`````$F)Q$B%P'45QH6J
+M`````DB)[_^5P````.G"!0``QX"4`````````$B):&A(BT-@28E$)"A(BT-@
+M#[=`,&9!B40D($'&1"0D@`^VA:@```"#^`(/A*0!``"#^`)_"87`="/I@P,`
+M`(/X`P^$-`(``(/X!&9F9I!F9I`/A/0!``#I90,``$B+0V#V0&`!#X3$````
+M]H6I`````G0(0<9$)#B(ZQD/MH6I````@^`$/`$9P(/@!8/H=D&(1"0X2(N5
+MD`````^WC9@```!!QD0D.0!(B=!(P>@X08A$)#I(B=!(P>@P08A$)#M(B=!(
+MP>@H08A$)#Q(B=!(P>@@08A$)#U(B=!(P>@808A$)#Y(B=!(P>@008A$)#](
+MB=!(P>@(08A$)$!!B%0D04'&1"1"`$'&1"1#`(G(9L'H"$&(1"1$08A,)$5!
+MQD0D1@!!QD0D1P#I@P```/:%J0````)T"$'&1"0X*.L9#[:%J0```(/@!#P!
+M&<"#X`6#P"I!B$0D.$B+E9`````/MXV8````0<9$)#D`2(G02,'H&$&(1"0Z
+M2(G02,'H$$&(1"0[2(G02,'H"$&(1"0\08A4)#U!QD0D/@")R&;!Z`A!B$0D
+M/T&(3"1`0<9$)$$`2(M#8$@%Y````$F)1"100<9$)#`@08.,))0````"Z?D!
+M``"`O9`````0=P7V`P)U#,:%J@````;IM0,``$@/MI60````2(NUF````$F-
+M?"0XZ`````!(BT-@2`7D````28E$)%!!QD0D,"!!@8PDE```````$`!!QD0D
+M):OVA:D````&#X22`0``BX64````08E$)#3I@@$```^VA:D```"#X#`\('47
+M0<9$)#@;0<9$)#D!0<9$)#P`Z5T!``!!QD0D.#7I4@$``$B+0V!(#[9`0*@!
+M=`2H!'4,QH6J````!ND+`P``08&,))0``````"``#[>%G````&8[A9(```!T
+M2P^VA9L```"#^$)T/X/X0G\.@_A`=#5F9F:09F:0ZR`]L````'0)/>P```!F
+MD'40#[>%G````&:)A9(```#K#,:%J@````;II`(``$'&1"0XL`^WA9````!!
+MB$0D.0^WA9(```!!B$0D.@^WA90```!!B$0D.P^WA98```!!B$0D/`^WA9@`
+M``!!B$0D/0^VA9H```!!B$0D/@^VA9L```!!B$0D/V8/MH61````08A$)$!F
+M#[:%DP```$&(1"1!9@^VA94```!!B$0D0F8/MH67````08A$)$-F#[:%F0``
+M`$&(1"1$]H6I````!G0J#[>%G````,'@"4&)1"0T08.,))0````$ZQ!F9F:0
+MQH6J````!NG6`0``38UT)%A)QX0DH``````````/MH6I````J`8/A*`!``"[
+M`````*@"=`M!@XPDE`````CK"4&#C"24````$$B#O;``````=!+VA:D````!
+M=`E(BYVP````ZRI(@[VX`````'0@28NU(`H``+H`````2(GO_Y6X````A<!T
+M!TF+G2`*``!(A=MT-4R)Y^@`````O@````!,B??H`````$B+<PB+$TR)]^@`
+M````2(U#!$B#PQ"#.`!TY>D,`0``3(GOZ`````!(B00D2(7`=0S&A:H````&
+MZ?P```!(BQ0D2(M"$$F)1"1(28E4)'BY`````+H``@``B`A(_\!(_\IU]O:%
+MJ0````0/A(\```!!]H0DE@```"!T&$F+?"1(08M4)#1(B[6@````Z`````#K
+M;$'VA"26````$'1A38M\)$A(@[VP`````'02]H6I`````74)2(N=L````.L@
+M28NU(`H``+H!````2(GO_Y6X````A<!T!TF+G2`*``!(BW,(BQ-,B?_H````
+M`(L#20''2(U#!$B#PQ"#.`!TX+X`````3(GWZ`````!!BU0D-$B+!"1(BW`8
+M3(GWZ`````#K"4&#C"24`````4R)YDR)[^@`````ZQ1,B>9,B>_H`````$B)
+M[_^5P````$B+7"0(2(ML)!!,BV0D&$R+;"0@3(MT)"A,BWPD,$B#Q#C#9F9F
+MD&9FD$B#[&A(B5PD.$B);"1`3(ED)$A,B6PD4$R)="183(E\)&!(B?M)B?1(
+MB4PD,$&)U42(1"0OQT0D%/____^)T,'@"6:)1"023(M_8$V%_W0)@+_+````
+M`'0)BT0D%.D/`P``28M72$B)5"0(3(MW>&;'A\@````0)TR)]^@`````2(G%
+MBT0D%$B%[0^$X0(``$R)]^@`````2(E$)"!(A<!U%$B)[DR)]^@`````BT0D
+M%.F[`@``28NVT`@``,9&/P%(B=J_!0```.@`````08!/1`)(BU-@OB$```!(
+MBWPD".@`````2(U%6$B)1"08@'PD+P!T$,>%E`````H```#&13@HZR?'A90`
+M```2````QD4X*DB+5"0@2(MZ$$@/MU0D$DB+="0PZ`````!(BT-@]D!@`71^
+M@'PD+P$9P(/@`H/H>(A%.,9%.0!,B>!(P>@XB$4Z3(G@2,'H,(A%.TR)X$C!
+MZ"B(13Q,B>!(P>@@B$4]3(G@2,'H&(A%/DR)X$C!Z!"(13],B>!(P>@(B$5`
+M1(AE0<9%0@#&14,`1(GH9L'H"(A%1$2(;47&148`QD5'`.M,@'PD+P$9P(/@
+M`H/`*(A%.,9%.0!,B>!(P>@8B$4Z3(G@2,'H$(A%.TR)X$C!Z`B(13Q$B&4]
+MQD4^`$2)Z&;!Z`B(13]$B&U`QD5!`$B)[^@`````2(M#8`^W0#!FB44@QD4D
+M@$B)72A(BU0D($B+0A!(B45(#[=$)!*)131(B55XQD4P($B+0V!(!>0```!(
+MB4502,>%H`````````"^`````$B+?"08Z`````"+531(BT0D($B+<!A(BWPD
+M&.@`````QH/+`````4B)[DR)]^@`````2(7;#X2?````2(-[8`!T5("[RP``
+M``!T2V:!N\@```"6`'422(M38$B+>DB^(0```.@`````9O^+R````+_0!P``
+MZ`````!,B??H`````$B%VW142(-[8`!T"8"[RP````!UM4B%VW0_2(-[8`!T
+M.&:#N\@`````="Z`?20`=2C'1"04`````(!\)"\`=!E(#[=4)!)(BT0D($B+
+M<!!(BWPD,.@`````2(-]>`!T#$B-=7A,B??H`````$B)[DR)]^@`````28NV
+MT`@``,9&/P!(B=J_!@```.@`````08!G1/V+1"042(M<)#A(BVPD0$R+9"1(
+M3(ML)%!,BW0D6$R+?"1@2(/$:,-F9F:09F9FD&9F9I!(@^P82(E<)`A,B60D
+M$$F)_$&(="1/0`^VWHG>Z`````!)@<0`%```B=Y,B>?H`````+@!````2(M<
+M)`A,BV0D$$B#Q!C#9F9FD&9FD&9FD$B#[`CH``````^VP$B#Q`C#9F9FD&9F
+M9I!F9F:09F:0N`````##9F9FD&9FD&9FD+D`````NH````!(B[?0"```#[?"
+M@+PP0`@``/\/E<`/ML`!P?_"9H'ZA0!VY$B+O]`(``!(@<<`%```NH`````/
+MM\*`O#A`"```_P^5P`^VP`'!_\)F@?J%`';DB<C#D(GRB?#`Z`0\"78%@\!7
+MZPB)\,#H!(/`,(@'B="#X`^#^`E^#(G0@^`/@\!7ZPIFD(G0@^`/@\`PB$<!
+MPV9F9I!(@^P02(D<)$R)9"0(2(G[08GT3(G@#[;TZ*+___]!#[;T2(/#`DB)
+MW^B2____2(L<)$R+9"0(2(/$$,-F9F:055-(B=5!N0````"Y`````+H``0``
+M2(GHB`A(_\!(_\IU]KF`````3(N'T`@```^WP69"#[:4`$`(``!F@?K_``^$
+M8@$``$2)R$'_P3GP#X54`0``9H'Y@0`/A\4````/M\)(:<#(#P``2(G"20.0
+M:`D``$B#>A``=&>Y@````$R)Q@^WP68/MH0P0`@``&8]_P!T%P^WP$AIP,@/
+M``!(`X9H"0``2#M"$'0Q_\%F@?F!`';.NP````"`>EH`=C&^`0````^VPP^V
+M3!!PB?#3X`E%(/_#.%I:=^KK%(A-`NO3QD4"_TB+0@@/MD`-B44@QD4``0^V
+M0EF(10%(BT)X2(E%!$B+@H@```!(B44,2(N"D````$B)112+@J````")11SK
+M>DB+A]`(```/M])(:=+0````2(G32`.80`D``,9%`O_&10`"2(N'T`@``$B+
+M@$`)```/MD0".XA%`4B+@X@````/MD`-B44@QD4$=@^W<SQ(C7T%Z$3^___&
+M10QD#[=S/DB-?0WH,_[__\9%''(/MG,Y2(U]'>CB_?__N`````#IF@$``/_!
+M9H'YA0`/AG+^__](B[_0"```2(''`!0``+F`````#[?!9@^VE#A`"```9H'Z
+M_P`/A%$!``!$B<A!_\$Y\`^%0P$``&:!^8$`#X?"````#[?"2&G`R`\``$B)
+MPD@#EV@)``!(@WH0`'1DN8`````/M\%F#[:$.$`(``!F/?\`=!</M\!(:<#(
+M#P``2`.':`D``$@[0A!T,?_!9H'Y@0!VSKL`````@'I:`'8QO@$````/ML,/
+MMDP0<(GPT^`)12#_PSA:6G?JZQ2(30+KT\9%`O](BT((#[9`#8E%(,9%``$/
+MMD)9B$4!2(M">$B)101(BX*(````2(E%#$B+@I````!(B444BX*@````B44<
+MZVP/M])(:=+0````2(G32`.?0`D``,9%`O_&10`"2(N'0`D```^V1`([B$4!
+M2(N#B`````^V0`V)12#&101V#[=S/$B-?07HO/S__\9%#&0/MW,^2(U]#>BK
+M_/__QD4<<@^V<SE(C7T=Z%K\__^X`````.L59F:0_\%F@?F%``^&B_[__[C_
+M____6UW#9F9FD&9F9I!F9I!54TB)U4&Y`````+D`````NJ0,``!(B>B("$C_
+MP$C_RG7VN8````!,BX?0"```#[?!9D(/MI0`0`@``&:!^O\`#X0*`P``1(G(
+M0?_!.?`/A?P"``!F@?F!``^':0(```^WPDAIP,@/``!)`X!H"0``28G`2(-X
+M$`!T;KJ`````2(N/T`@```^WPF8/MH0(0`@``&8]_P!T%P^WP$AIP,@/``!(
+M`X%H"0``23M`$'0T_\)F@?J!`';.N@````!!@'A:`'8SO@$````/ML)"#[9,
+M`'")\-/@"44@_\)!.%!:=^CK%(A5`NO0QD4"_TB+0`@/MD`-B44@QD4``4$/
+MMD!9B$4!28M`>$B)101)BX"(````2(E%#$F+@)````!(B44408N`H````(E%
+M'+L`````08"XP``````/A@0"```/ML-(C0R`2(U,S0!(C01`2,'@!$P!P$B-
+ML,`````/ME8(B%$D#[96"8A1)4B+@-`````/M@"#X`^(028/MD$D@_@#=#*#
+M^`-_#H/X`@^$X0```.G-````@_@$9F9FD&9FD'1)@_@2#X2+````9F:09I#I
+MK@````^VRTB-!$E(P>`$2HN$`-`````/ME`!@^('#[;2P>((2(T,B0^V0`(!
+MT&O`"HE$S2CIAP````^VTTB-!%)(P>`$2HN$`-````"`>`(`=0Y(C022QT3%
+M*`````#K8`^VPTB-%(!(C01`2,'@!$J+A`#0````#[9``H/H%(E$U2CK/`^V
+MRTB-!$E(P>`$2HN$`-`````/ME`"P>((2(T,B0^V0`,!T&O`"HE$S2CK#P^V
+MPTB-!(#'1,4H``````^VPTB-%(!(C535`$B-<BQ(C01`2,'@!$P!P$B-B-@`
+M``!(BX#8````2(E"+$B+00A(B48(2(M!$$B)1A!(BT$82(E&&/_#03B8P```
+M``^'>/[__^MZ2(N'T`@```^WTDAITM````!(B=-(`YA`"0``QD4"_\9%``)(
+MBX?0"```2(N`0`D```^V1`([B$4!2(N#B`````^V0`V)12#&101V#[=S/$B-
+M?07H4/G__\9%#&0/MW,^2(U]#>@_^?__QD4<<@^V<SE(C7T=Z.[X__^X````
+M`.D^`P``9F9FD/_!9H'YA0`/ALK\__](B[_0"```2(''`!0``+F`````#[?!
+M9@^VE#A`"```9H'Z_P`/A/$"``!$B<A!_\$Y\`^%XP(``&:!^8$`#X=E`@``
+M#[?"2&G`R`\``$F)P$P#AV@)``!)@W@0`'1GNH`````/M\)F#[:$.$`(``!F
+M/?\`=!</M\!(:<#(#P``2`.':`D``$D[0!!T-/_"9H'Z@0!VSKH`````08!X
+M6@!V,[X!````#[;"0@^V3`!PB?#3X`E%(/_"03A06G?HZQ2(50+KT,9%`O])
+MBT`(#[9`#8E%(,9%``%!#[9`68A%`4F+0'A(B44$28N`B````$B)10Q)BX"0
+M````2(E%%$&+@*````")11R[`````$&`N,``````#X;Y`0``#[;#2(T,@$B-
+M3,T`2(T$0$C!X`1,`<!(C;#`````#[96"(A1)`^V5@F(425(BX#0````#[8`
+M@^`/B$$F#[9!)(/X`W0S@_@#?Q.#^`(/A.0```!F9I!FD.G+````@_@$=$R#
+M^!)F9I`/A(L```#IM0```&9FD&:0#[;+2(T$24C!X`1*BX0`T`````^V4`&#
+MX@</MM+!X@A(C0R)#[9``@'0:\`*B43-*.F)````#[;32(T$4DC!X`1*BX0`
+MT````(!X`@!U#DB-!)+'1,4H`````.MB#[;#2(T4@$B-!$!(P>`$2HN$`-``
+M```/MD`"@^@4B435*.L^#[;+2(T$24C!X`1*BX0`T`````^V4`+!X@A(C0R)
+M#[9``P'0:\`*B43-*.L19I`/ML-(C02`QT3%*``````/ML-(C12`2(U4U0!(
+MC7(L2(T$0$C!X`1,`<!(C8C8````2(N`V````$B)0BQ(BT$(2(E&"$B+01!(
+MB4802(M!&$B)1AC_PT$XF,`````/AW7^___K;`^WTDAITM````!(B=-(`Y]`
+M"0``QD4"_\9%``)(BX=`"0``#[9$`CN(10%(BX.(````#[9`#8E%(,9%!'8/
+MMW,\2(U]!>@A]O__QD4,9`^W<SY(C7T-Z!#V___&11QR#[9S.4B-?1WHO_7_
+M_[@`````ZQ+_P6:!^84`#X;K_/__N/____];7<-F9I!!5%5308GT2(G50;@`
+M````N0````"ZI`P``$B)Z&9FD(@(2/_`2/_*=?:Y@````$B+M]`(```/M\%F
+M#[:4,$`(``!F@?K_``^$*0,``$2)P$'_P$0YX`^%&@,``&:!^8$`#X>'`@``
+M#[?"2&G`R`\``$F)P$P#AF@)``!)@W@0`'1JNH````!(B?$/M\)F#[:$"$`(
+M``!F/?\`=!</M\!(:<#(#P``2`.!:`D``$D[0!!T-/_"9H'Z@0!VSKH`````
+M08!X6@!V,[X!````#[;"0@^V3`!PB?#3X`E%(/_"03A06G?HZQ2(50+KT,9%
+M`O])BT`(#[9`#8E%(,9%``%!#[9`68A%`4F+0'A(B44$28N`B````$B)10Q)
+MBX"0````2(E%%$&+@*````")11Q$B64DNP````!!@+C```````^&)@(```^V
+MPTB-#(!(C4S-`$B-!$!(P>`$3`'`2(VPP`````^V5@B(D:@````/ME8)B)&I
+M````2(N`T`````^V`(/@#XB!J@````^V@:@```"#^`-T+H/X`W\.@_@"#X3M
+M````Z=8```"#^`1F9I!T3(/X$@^$E````&9FD&:0Z;L````/MLM(C01)2,'@
+M!$J+A`#0````#[90`8/B!P^VTL'B"$B-#(D/MD`"`=!KP`J)A,VL````Z90`
+M```/MM-(C0122,'@!$J+A`#0````@'@"`'412(T$DL>$Q:P`````````ZVH/
+MML-(C12`2(T$0$C!X`1*BX0`T`````^V0`*#Z!2)A-6L````ZT,/MLM(C01)
+M2,'@!$J+A`#0````#[90`L'B"$B-#(D/MD`#`=!KP`J)A,VL````ZQ.0#[;#
+M2(T$@,>$Q:P`````````#[;#2(T4@$B-5-4`2(VRL````$B-!$!(P>`$3`'`
+M2(V(V````$B+@-@```!(B8*P````2(M!"$B)1@A(BT$02(E&$$B+01A(B488
+M_\-!.)C`````#X=:_O__ZWY(BX?0"```#[?22&G2T````$B)TT@#F$`)``#&
+M10+_QD4``DB+A]`(``!(BX!`"0``#[9$`CN(10%(BX.(````#[9`#8E%(,9%
+M!'8/MW,\2(U]!>B:\O__QD4,9`^W<SY(C7T-Z(GR___&11QR#[9S.4B-?1WH
+M./+__T2)922X`````.EA`P``_\%F@?F%``^&K/S__TB+O]`(``!(@<<`%```
+MN8`````/M\%F#[:4.$`(``!F@?K_``^$&`,``$2)P$'_P$0YX`^%"0,``&:!
+M^8$`#X>'`@``#[?"2&G`R`\``$F)P$P#AV@)``!)@W@0`'1GNH`````/M\)F
+M#[:$.$`(``!F/?\`=!</M\!(:<#(#P``2`.':`D``$D[0!!T-/_"9H'Z@0!V
+MSKH`````08!X6@!V,[X!````#[;"0@^V3`!PB?#3X`E%(/_"03A06G?HZQ2(
+M50+KT,9%`O])BT`(#[9`#8E%(,9%``%!#[9`68A%`4F+0'A(B44$28N`B```
+M`$B)10Q)BX"0````2(E%%$&+@*````")11Q$B64DNP````!!@+C```````^&
+M&P(```^VPTB-#(!(C4S-`$B-!$!(P>`$3`'`2(VPP`````^V5@B(D:@````/
+MME8)B)&I````2(N`T`````^V`(/@#XB!J@````^V@:@```"#^`-T,8/X`W\.
+M@_@"#X3P````Z=D```"#^`1F9I!F9I!T3(/X$@^$E````&9FD&:0Z;L````/
+MMLM(C01)2,'@!$J+A`#0````#[90`8/B!P^VTL'B"$B-#(D/MD`"`=!KP`J)
+MA,VL````Z90````/MM-(C0122,'@!$J+A`#0````@'@"`'412(T$DL>$Q:P`
+M````````ZVH/ML-(C12`2(T$0$C!X`1*BX0`T`````^V0`*#Z!2)A-6L````
+MZT,/MLM(C01)2,'@!$J+A`#0````#[90`L'B"$B-#(D/MD`#`=!KP`J)A,VL
+M````ZQ.0#[;#2(T$@,>$Q:P`````````#[;#2(T4@$B-5-4`2(VRL````$B-
+M!$!(P>`$3`'`2(V(V````$B+@-@```!(B8*P````2(M!"$B)1@A(BT$02(E&
+M$$B+01A(B488_\-!.)C`````#X=7_O__ZW`/M])(:=+0````2(G32`.?0`D`
+M`,9%`O_&10`"2(N'0`D```^V1`([B$4!2(N#B`````^V0`V)12#&101V#[=S
+M/$B-?07H2.___\9%#&0/MW,^2(U]#>@W[___QD4<<@^V<SE(C7T=Z.;N__]$
+MB64DN`````#K$O_!9H'YA0`/AL3\__^X_____UM=05S#9F9FD$F)\$R+3WBY
+M`````+HH````2(GPB`A(_\!(_\IU]DF+L2`*``"Y`````+H``@``2(GPB`A(
+M_\!(_\IU]DB-5C:Y`````(U!`4B8#[9$.""(`DC_PDACP0^V1#@@B`)(_\*#
+MP0*#^2=^W$B-5A2Y`````(U!`4B8#[9$!PR(`DC_PDACP0^V1`<,B`)(_\*#
+MP0*#^1-^W$B-5BZY`````(U!`4B8#[9$.$B(`DC_PDACP0^V1#A(B`)(_\*#
+MP0*#^0=^W$F)<!A(BT=02/_`28D`2(-_8`!U5_8'`7122(-_:``/E<!-A<D/
+ME<(/ML"%PG042(M':$@/MD!;0H"\"$`(``#_=2E(@W]P``^5P$V%R0^5P@^V
+MP(7"=!Y(BT=P2`^W0$!"@+P(0`@``/]T"@^V1P%!B$`,ZP5!QD`,_P^V1P)!
+MB$`-#[9'7$&(0`Y!QD`2$$'&0!$0#[8'@^`!`<"^_?___T$B<`H)QD&(<`H/
+MM@>#X`'!X`5!#[9("(/AWPG!08A("$@/MT=82,'H!X/@`<'@!H/AOPG!08A(
+M"$@/MT=82,'H`H/@`4$/ME`)@^+^"<)!B%`)2`^W1UI(P>@#@^`!P>`'@^%_
+M"<%!B$@(2`^W1UI(T>B#X`$!P(/B_0G"08A0"4@/MT=82,'H`X/@`<'@!H/B
+MOPG"08A0"4@/MT=:2,'H!(/@`<'@!X/B?PG"08A0"8/)$$&(2`@/M@?0Z(/@
+M`8/F_@G&08AP"@^V!X/@!(/F^PG&08AP"F9!QT`4`!`/MH?,````08A`(,/'
+M0@0`````QP(`````N`````##9F9FD&9FD&9FD&9FD$B#[#A(B5PD"$B);"00
+M3(ED)!A,B6PD($R)="0H3(E\)#!(B?M!B?5!O_____](BV]@3(MW>$B%[705
+M@+_+`````'4,]@<"=`]F9F:09F:01(GXZ0T!``!,B?=F9I!FD.@`````28G$
+M1(GX387D#X3Q````0<9$)#CA0<9$)#D!08#]`@^5P(/`&D&(1"0Z0<9$)"2`
+M#[=%,&9!B40D($F)7"0H0<=$)#0`````2<=$)$@`````2<>$)*``````````
+M3(GF3(GWZ`````#&@\L````!9L>#R````/H`2(7;=%Q(@WM@`'159F9FD&9F
+MD&:!N\@```"6`'452(M38$B+>DB^(0```.@`````9F:09O^+R````+_0!P``
+MZ`````!,B??H`````$B%VW002(-[8`!T"8"[RP````!ULF:#N\@`````=`]!
+M@'PD)`"X`````$0/1/A,B>9,B??H`````$2)^$B+7"0(2(ML)!!,BV0D&$R+
+M;"0@3(MT)"A,BWPD,$B#Q#C#9F9FD&9F9I!(@^Q(2(E<)!A(B6PD($R)9"0H
+M3(EL)#!,B70D.$R)?"1`2(G[08GV0;______3(MG8$R+;WA-A>1T"8"_RP``
+M``!T#$2)^.ED!```9F9FD$R)[^@`````2(G%1(GX2(7M#X1)!```]@,"#X4!
+M`0``08#^%'<,00^V]FOV#&9FD.L:9D$/ML9F:<")`&;!Z`C`Z`0/MO"!QO``
+M``#&13CAQD4Y`<9%.AQ`B'4[QD4D@$$/MT0D,&:)12!(B5THQT4T`````$C'
+M14@`````2,>%H`````````!(B>Y,B>_H`````,:#RP````%FQX/(````Q`E(
+MA=MT5DB#>V``=$^09H&[R````)8`=15(BU-@2(MZ2+XA````Z`````!F9I!F
+M_XO(````O]`'``#H`````$R)[^@`````2(7;=!!(@WM@`'0)@+O+`````'6R
+M9H.[R``````/A$0#``"`?20`#X4Z`P``0;\`````Z2\#``!,B>_H`````$B)
+M1"002(7`#X09`P``2(U%6$B)1"0(2(M$)!!(BT`02(D$),9%.!K&13D(QD4Z
+M&L9%.P#&13P0QD4]`$B+1"002(E%>,9%)(!!#[=$)#!FB44@2(E=*$B+1"00
+M2(M`$$B)14C'1300````2(M#8$@%Y````$B)15#&13`@2,>%H`````````"^
+M`````$B+?"0(Z`````"+531(BT0D$$B+<!A(BWPD".@`````2(GN3(GOZ```
+M``#&@\L````!9L>#R````/H`2(7;=%)(@WM@`'1+9H&[R````)8`=1)(BU-@
+M2(MZ2+XA````Z`````!F_XO(````O]`'``#H`````$R)[^@`````2(7;=!!(
+M@WM@`'0)@+O+`````'6U9H.[R`````!T!H!])`!T$DB-="003(GOZ`````#I
+MY@$``$B)[DR)[^@`````3(GOZ`````!(B<5(A<!U%4B-="003(GOZ`````!$
+MB?CIQ@$``$B-4%A(B50D"$B+/"1(@\<$2(L4)$@/MD(##[9$$`2(0@3&1P$*
+MQD<"`+D`````N@0```!(BP0DB`A(_\!(_\IU]D6$]G4&@&<#_.LW00^V]FGV
+M6`(``(!/`P.)\<'I&(A/!(GRP>H0B%<%B?#!Z`B(1P9`B'<'B$\(B%<)B$<*
+M0(AW"TB+1"002(E%>,9%.!4/M@?`^`?WT(/`$8A%.<9%.@#&13L`QD4\$,9%
+M/0"`)S_&122`00^W1"0P9HE%($B)72A(BT0D$$B+0!!(B45(QT4T$````$B+
+M0V!(!>0```!(B450QD4P($C'A:``````````O@````!(BWPD".@`````BU4T
+M2(M$)!!(BW`82(M\)`CH`````$B)[DR)[^@`````QH/+`````6;'@\@```#Z
+M`$B%VW122(-[8`!T2V:!N\@```"6`'422(M38$B+>DB^(0```.@`````9O^+
+MR````+_0!P``Z`````!,B>_H`````$B%VW002(-[8`!T"8"[RP````!UM6:#
+MN\@`````=`V`?20`N`````!$#T3X2(UT)!!,B>_H`````&9FD&9FD$B)[DR)
+M[^@`````1(GX9I!(BUPD&$B+;"0@3(MD)"A,BVPD,$R+="0X3(M\)$!(@\1(
+MPV9F9I!F9I!F9I!F9I!(@^PH2(E<)`A(B6PD$$R)9"083(EL)"!(B?M!B?6X
+M_____TR+9WA(BV]@]D=8"`^$@P```$F+M"30"```2(GZOP4```#H`````(!-
+M1`)(BWU(2(GJOB$```#H`````(!]>P!T&+_0!P``Z`````!,B>?H`````(!]
+M>P!UZ$6%[70.9H-+6A!F@TUB$.L,9I!F@V-:[V:#96+O28NT)-`(``!(B=J_
+M!@```.@`````@&5$_;@`````2(M<)`A(BVPD$$R+9"083(ML)"!(@\0HPV9F
+M9I!F9F:09F9FD&9FD$B#[!A(B5PD"$B);"00B?5(BT]X2(M?8/8'`70[2(-[
+M4`!T$4`/MM8/MG-Y2(M[4.@`````2(.[&`$```!T+4`/MM4/MK,%`0``2(N[
+M&`$``.@`````ZQ1`#[;62(M#.`^V<`%(B<_H`````$B+7"0(2(ML)!!(@\08
+MPV9FD&:02(/L.$B)7"0(2(EL)!!,B60D&$R);"0@3(ET)"A,B7PD,$B)^T&)
+M]D&)U\=$)`3_____3(MG8$R+;WA-A>1T"8"_RP````!T"8M$)`3I$P$``$R)
+M[^@`````2(G%BT0D!$B%[0^$^P```,9%..'&13D!183V=`U!@/\!&<#WT(/`
+M!^L+08#_`1G`]]"#P`V(13K&122`00^W1"0P9HE%($B)72C'130`````2,=%
+M2`````!(QX6@`````````$B)[DR)[^@`````QH/+`````6;'@\@```#T`4B%
+MVW142(-[8`!T36:!N\@```"6`'422(M38$B+>DB^(0```.@`````9O^+R```
+M`+_0!P``Z`````!,B>_H`````$B%VW022(-[8`!T"X"[RP````!FD'6S9H.[
+MR`````!T&H!])`!U%$B+0V`/MT!B9HE#6L=$)`0`````2(GN3(GOZ`````"+
+M1"0$2(M<)`A(BVPD$$R+9"083(ML)"!,BW0D*$R+?"0P2(/$.,-F9F:09F9F
+MD$B#[`@/M@:#^`D/AX(```")P/\DQ0````!F9F:09F:02(M^",:'[Q,```#H
+M`````+@`````ZV`/ME8(O@````#H*_[__^M0#[96"+X!````Z!O^___K0`^V
+M=@CH`````.LU#[96"0^V=@CHH?S__Y#K)0^V=@CH`````&9FD&:0ZQ4/MG8(
+MZ`````"X`````.L%N/____](@\0(PV9F9I!(BT=@2(7`=%-(QT`X`````(!(
+M1`1(QT=@`````$C'1W``````2,=':`````"#?P@_?Q5(BU=X2&-'"$C'A,)`
+M!````````,-(BU=X2&-'"$C'A,)``@```````//#9I!(BT=@2(7`=%-(QT`X
+M`````(!@1/M(QT=@`````$C'1W``````2,=':`````"#?P@_?Q5(BU=X2&-'
+M"$C'A,)`!````````,-(BU=X2&-'"$C'A,)``@```````//#9I!32(G[Z```
+M``!(B[O0"```2(''`!0``.@`````6\-FD%-(B?OH`````$B+N]`(``!(@<<`
+M%```Z`````!;PV:0055!5%532(/L6$F)_$R+K]`(``!)@<4`%```2(,_`'06
+M2(LW2('N```"`$B)-TB+?R#H`````$F#?"00`'0128MT)!!)BWPD(.@`````
+M9I!)@WPD&`!T#TF+="0828M\)"#H`````$$/MWPD/$B-1"162(E$)#A(C40D
+M5$B)1"0P2(U$)%)(B40D*$B-1"102(E$)"!(C40D3DB)1"082(U$)$U(B40D
+M$$B-1"1,2(E$)`A(C40D2DB)!"1,C4PD24R-1"1&2(U,)$5(C50D1$B-="1#
+MZ`````!)@[PD&`D```!T*TF+M"08"0``28V\)/@(``#H`````$F+M1@)``!)
+MC;WX"```Z`````!F9I!)@[PD0`D```!T*$F+M"1`"0``28V\)"`)``#H````
+M`$F+M4`)``!)C;T@"0``Z`````!)@[PD:`D```!T*$F+M"1H"0``28V\)$@)
+M``#H`````$F+M6@)``!)C;U("0``Z`````!)@[PDX`H```!T+TF+M"3@"@``
+M28V\),`*``#H`````$F+M>`*``!)C;W`"@``Z`````!F9F:09F:0O0````!`
+M.FPD0W,[9F9FD(GH#[;828NTW#`+``!)C;PD$`L``.@`````28NTW3`+``!)
+MC;T0"P``Z`````#_Q4`Z;"1#<LE)@[PDP`\```!T+DF+M"3`#P``28V\)*`/
+M``#H`````$F+M<`/``!)C;V@#P``Z`````!F9I!F9I!)@[PD^`\```!T*$F+
+MM"3X#P``28V\)-@/``#H`````$F+M?@/``!)C;W8#P``Z`````!)@[PD:!``
+M``!T*$F+M"1H$```28V\)$@0``#H`````$F+M6@0``!)C;U($```Z`````!)
+M@[PDD`D```!T+TF+M"20"0``28V\)'`)``#H`````$F+M9`)``!)C;UP"0``
+MZ`````!F9F:09F:028.\)&@*````="A)B[0D:`H``$F-O"1("@``Z`````!)
+MB[5H"@``28V]2`H``.@`````28.\)/@)````="A)B[0D^`D``$F-O"38"0``
+MZ`````!)B[7X"0``28V]V`D``.@`````28.\)"`*````="])B[0D(`H``$F-
+MO"0`"@``Z`````!)B[4@"@``28V]``H``.@`````9F9FD&9FD$F#O"2X"@``
+M`'0H28NT)+@*``!)C;PDF`H``.@`````28NUN`H``$F-O9@*``#H`````$F#
+MO"0("P```'0H28NT)`@+``!)C;PDZ`H``.@`````28NU"`L``$F-O>@*``#H
+M`````$F#O"10#P```'0O28NT)%`/``!)C;PD,`\``.@`````28NU4`\``$F-
+MO3`/``#H`````&9F9I!F9I!)@[PDB`\```!T*$F+M"2(#P``28V\)&@/``#H
+M`````$F+M8@/``!)C;UH#P``Z`````!)@[PD,!````!T*$F+M"0P$```28V\
+M)!`0``#H`````$F+M3`0``!)C;T0$```Z`````!)@[PDD`H```!T+TF+M"20
+M"@``28V\)'`*``#H`````$F+M9`*``!)C;UP"@``Z`````!F9F:09F:028.\
+M))`0````=#=)BY0DF!```$F+M"20$```28V\)'`0``#H`````$F+E9@0``!)
+MB[60$```28V]<!```.@`````28.\),`0````=#=)BY0DR!```$F+M"3`$```
+M28V\)*`0``#H`````$F+E<@0``!)B[7`$```28V]H!```.@`````28.\)/`0
+M````=#=)BY0D^!```$F+M"3P$```28V\)-`0``#H`````$F+E?@0``!)B[7P
+M$```28V]T!```.@`````28.\)%`1````=#=)BY0D6!$``$F+M"10$0``28V\
+M)#`1``#H`````$F+E5@1``!)B[50$0``28V],!$``.@`````28.\)"`1````
+M=#U)BY0D*!$``$F+M"0@$0``28V\)``1``#H`````$F+E2@1``!)B[4@$0``
+M28V]`!$``.@`````9F:09F:028.\)(`1````=#=)BY0DB!$``$F+M"2`$0``
+M28V\)&`1``#H`````$F+E8@1``!)B[6`$0``28V]8!$``.@`````28.\)+`1
+M````=#=)BY0DN!$``$F+M"2P$0``28V\))`1``#H`````$F+E;@1``!)B[6P
+M$0``28V]D!$``.@`````2(/$6%M=05Q!7<.02(/L&$B)7"0(3(ED)!!(B?OH
+M`````$R-HP`4``!,B>?H`````$B)W^@`````O]`'``#H`````$B)W^@`````
+M2(G?Z`````"^`0```$B)W^@`````O@$```!,B>?H`````$B+7"0(3(MD)!!(
+M@\08PTB#[`A(Q\<`````Z`````"X`````$B#Q`C#D)"0D)"0Q@<(QD<!$D"`
+M_@$9P/?0@^`$B$<"QD<#`,9'!`#&1P4`QD<&`,9'!P#&1P@`QD<)`,9'"@#&
+M1PL`@/H!&<"#X""(1PS&1PT`QD<.`,9'#P#&1Q``QD<1`,9'$@#&1Q,`N!0`
+M``##9F9FD&9FD&9FD$B#[#A(B5PD"$B);"003(ED)!A,B6PD($R)="0H3(E\
+M)#!)B?](B?5!B=9!B<WH`````$F)Q+@`````387D#X2C````28M<)!!!#[;5
+M00^V]DB->P3H`````$&)Q<8#`,9#`0#&0P(`QD,#`$B)[DR)_^@`````N0``
+M``"Z$````$B-13B("$C_P$C_RG7V08U%!,9%.!7&13D1B$4\QD4]`$B-75A$
+M#[;H1(EM-,>%E`````````!)BT0D$$B)14A,B65XO@````!(B=_H`````$F+
+M="081(GJ2(G?Z`````"X`0```$B+7"0(2(ML)!!,BV0D&$R+;"0@3(MT)"A,
+MBWPD,$B#Q#C#D)"0D)"008GP9HEW",9'#@!FQT<,``"^`````&9$.<9S'F9F
+M9I`/M\Y(BQ=$B<!F*?#_R&:)!$K_QF9$.<9RYO/#9F9FD$&)\&:)=PC&1PX!
+M9L='#```N0````!F.?%S%V9FD&:0#[?12(L'9HD,4/_!9D0YP7+N\\-F9F:0
+M9F9FD&9F9I"`?PX!=2H/MT<,#[?(2(L7_\!FB4<,#[<42F8[1PIR!F;'1PP`
+M`&;_3P@/M\+#9I!F_T\(2`^W5PA(BP</MP10PV9F9I!F9F:09F9FD&9FD$B#
+M[`B`?PX!=2H/MU<,#[='"(E$)`2-!`(/MU<*B10DF?<\)$ACTDB+#V:)-%%F
+M_T<(ZQ!(#[=7"$B+!V:)-%!F_T<(2(/$",-F9F:09F:09H-_"``/E,`/ML##
+MD)"0D+@`````2#D_=!%(BP=(BT@(2(L02(E*"$B)$?/#9F:0N`````!(.3]T
+M$DB+1PA(BT@(2(L02(E*"$B)$?/#9I!(BW=@1`^V1UBY`````+JH````2(GX
+MB`A(_\!(_\IU]DB)=V!$B$=8PV9F9I!F9I!(@^P(#[9&`8A'`0^V1@*(1P*+
+M1@2)1P1(BT<(2`^V5P%(C1122,'B`DB+=@A(B<?H`````$B#Q`C#9F:09F:0
+MN0`````XT7,C9F9FD&9FD`^V!SH&=`FX`````,-F9I!(_\=(_\;_P3C1<N2X
+M`0```,-F9F:09F9FD&9FD&9FD,9'`0!`B'<"QT<$`````,-!B=%(#[9'`4B-
+M!$!(BU<(3(T$@OY'`40!3P2Y`````+H,````3(G`B`A(_\!(_\IU]DF),$6(
+M2`A$B<C!Z`A!B$`)1(G*P>H0@^(_00^V0`J#X,`)T$&(0`K#9F:09I`/MD<!
+M.@</DL`/ML##9F:0N?\```"Z``(``$B)^&9FD(@(2/_`2/_*=?;SPV9F9I"X
+M``````^WR(!\CP+_=1%FB32/B%2/`NL/9F9FD&9FD/_`9H/X?W;=#[?`PV9F
+M9I!!B=&)\$0/M\!"@'R'`O]U#V9&B0R'0HA,AP(/M\##D`^VT4$/M_'H````
+M``^WP,.X``````^WR#A4CP)U$V8Y-(]U#<9$CP+_9L<$C___ZPC_P&:#^']V
+MW`^WP,-F9I"Y``````^WP3A4AP)U!F8Y-(=T"/_!9H/Y?W;I9H'Y@`"X@`$`
+M``]$R`^WP<-F9I`/MD\X@/D(#Y7`@/DH#Y7"#[;`A<)T/H#YJ'0Y@/F(=#2`
+M^0H/E<"`^2H/E<(/ML"%PG0A@/FJ=!R`^8IT%X#Y+P^5P(#YCP^5P@^VP(7"
+M#X7-`0``#[9'.(/X+P^$K@```(/X+W\Y@_@*='N#^`J0?PZ#^`AT<.F&`0``
+M9F9FD(/X*`^$AP```(/X*F9F9I`/A'H```#I9P$``&9FD&:0/8\````/A-T`
+M```]CP```'\>/8@````/A,L````]B@````^$P````.DU`0``9F:0/:@```!T
+M;#VJ````9F9FD'1AZ1L!```/MD<Y@^`?P>`0#[97.L'B"`G0#[97.PG0B<(/
+MMD\\Z04!``!F9I!FD`^V5SK!XA@/MD<[P>`0"<(/MD<\P>`("<(/MD<]"<*)
+MT@^V3S_!X0@/MD=`"<'IS0````^V5SK!XA@/MD<[P>`0"<(/MD<\P>`("<(/
+MMD<]"<*)T@^V3S[!X1@/MD<_P>`0"<$/MD=`P>`("<$/MD=!"<'IB````$@/
+MME<Z2,'B.$@/MD<[2,'@,$@)PD@/MD<\2,'@*$@)PD@/MD<]2,'@($@)PD@/
+MMD<^2,'@&$@)PD@/MD<_2,'@$$@)PD@/MD=`2,'@"$@)PD@/MD=!2`G"#[9/
+M0L'A&`^V1T/!X!`)P0^V1T3!X`@)P0^V1T4)P>L.N@````"Y`````&9F9I!(
+MB9>(````B8^0````9H-/(@'SPV9F9I!F9F:09F9FD%-(@^Q@2(G[1`^V3SM$
+M#[9'.@^V3SD/ME<X#[9'1XE$)%@/MD=&B40D4`^V1T6)1"1(#[9'1(E$)$`/
+MMD=#B40D.`^V1T*)1"0P#[9'08E$)"@/MD=`B40D(`^V1S^)1"08#[9'/HE$
+M)!`/MD<]B40D"`^V1SR)!"1(B?Y(Q\<`````N`````#H``````^W<R!(Q\<`
+M````N`````#H`````$B#Q&!;PV9F9I!F9F:0NO____^Y`````&8Y\7,A2<?`
+M``````^WP0^V!#@QT`^VP,'J"$$S%(#_P68Y\7+FB=##D)"0D)"0D)"0D)"0
+MD$B+!XN0!`$``(D5`````(G1@>%^__[_2(L'B8@$`0``B=&!X7[_\O](BT<(
+MB0A(BT<(B4@,2(M'"(E($$B+1PB)2!1(BT<(B4@82(M'"(E(!$B+!XN`5`$`
+M`(D%`````(G!@>'^`/__2(L'B8A4`0``PV9F9I!F9F:09F:09F:055-(@^P(
+MB?-(BR^#_@-V&(T$W>#___^+A"B@`0``B04`````B<'K&(T$W0````")P(N$
+M*(`!``")!0````")P8/A_H/[`W80C03=X/___XF,**`!``#K$(T$W0````")
+MP(F,*(`!``"$T@^$H````(/[`W88C02=\/___XN$*.`!``")!0````")P>L8
+MC02=`````(G`BX0HT`$``(D%`````(G!@\D"@_L#=A"-!)WP____B8PHX`$`
+M`.L0C02=`````(G`B8PHT`$``(T$G0````"-</")PF9F9I!F9I"#^P-V$8N$
+M+N`!``")!0````")P>L/BX0JT`$``(D%`````(G!]L$"==;IE0```)"#^P-V
+M%(T$W>#____'A"A0`@```````.L4C03=`````(G`QX0H4`(```````"_$"<`
+M`.@`````@_L#=AB-!-W@____BX0H5`(``(D%`````(G!ZQB-!-T`````B<"+
+MA"A4`@``B04`````B<&#R0&#^P-V$(T$W>#___^)C"A4`@``ZQ"-!-T`````
+MB<")C"A4`@``2(/$"%M=PV9FD&:0059!54%455-)B?Q!B?5!B=9(BR^[````
+M`(!_/@`/A$X"``!$B>H/ML*)V4C3^*@!#X0K`@``@_L#=AB-!-W@____BX0H
+MI`$``(D%`````(G"ZQB-!-T`````B<"+A"B$`0``B04`````B<*#XOZ#^P-V
+M$(T$W>#___^)E"BD`0``ZQ"-!-T`````B<")E"B$`0``OQ`G``#H`````$6$
+M]@^$F@```(/[`W88C02=\/___XN$*.`!``")!0````")PNL8C02=`````(G`
+MBX0HT`$``(D%`````(G"@\H"@_L#=A"-!)WP____B90HX`$``.L0C02=````
+M`(G`B90HT`$``(T$G0````"-</")P9"#^P-V$8N$+N`!``")!0````")PNL/
+MBX0IT`$``(D%`````(G"]L("==;IE0```)"#^P-V%(T$W>#____'A"A0`@``
+M`````.L4C03=`````(G`QX0H4`(```````"_$"<``.@`````@_L#=AB-!-W@
+M____BX0H5`(``(D%`````(G"ZQB-!-T`````B<"+A"A4`@``B04`````B<*#
+MR@&#^P-V$(T$W>#___^)E"A4`@``ZQ"-!-T`````B<")E"A4`@``@_L#=A>-
+M!-W@____QX0HH`$```$```#K%V9FD(T$W0````")P,>$*(`!```!````@_L#
+M=AB-!-W@____BX0HI`$``(D%`````(G"ZQB-!-T`````B<"+A"B$`0``B04`
+M````B<*#R@&#^P-V$(T$W>#___^)E"BD`0``ZQ"-!-T`````B<")E"B$`0``
+M_\-!#[9$)#XYV`^'LOW__UM=05Q!74%>PV9FD&9FD(GQ2(L'BX`$`0``B04`
+M````08G`#[='/&8]@&0/E,)F/8"1#Y3`"="H`74(9H%_/("4=1(/MLF#P0BX
+M`0```-/@00G`ZQ%`#[;.@\$,N`$```#3X$$)P$B+!T2)@`0!``##9F9FD&9F
+M9I!F9I!F9I")\4B+!XN`!`$``(D%`````$&)P`^W1SQF/8!D#Y3"9CV`D0^4
+MP`G0J`%U"&:!?SR`E'42#[;)@\$(N/[____3P$$AP.L10`^VSH/!#+C^____
+MT\!!(<!(BP=$B8`$`0``PV9F9I!F9F:09F:09F:02(/L&$B)7"0(3(ED)!!)
+MB?Q`#[;>B=[H`````+\0)P``Z`````")WDR)Y^@`````2(M<)`A,BV0D$$B#
+MQ!C#D(GQ0(#^_W1X0(#^'W<VBY<8`0``B14`````N`$```#3X(G!]]`AT(F'
+M&`$``(N'6`$``(D%`````"'(=$.)AU@!``##BY<<`0``B14`````0`^VSH/I
+M(+@!````T^")P??0(=")AQP!``"+AV`!``")!0`````AR'0&B8=@`0``\\-F
+M9F:09F9FD&9FD&9FD$%455-(B=6)\TR+)T"`_@-V'DB-!-T`````)?@'``!"
+MQX0@``(```P!``#K'&9FD$B-!-T`````)?@'``!"QX0@``(```P!``"_$"<`
+M`.@`````@/L#=CA(C0S=`````('A^`<```^V50/!XA@/MD4"P>`0"<(/MD4!
+MP>`("<(/MD4`"<)"B90A!`(``.LVD$B-#-T`````@>'X!P``#[95`\'B&`^V
+M10+!X!`)P@^V10'!X`@)P@^V10`)PD*)E"$$`@``@/L#=AM(C03=`````"7X
+M!P``0L>$(``"```0`0``ZQE(C03=`````"7X!P``0L>$(``"```0`0``OQ`G
+M``#H`````(#[`W8W2(T,W0````"!X?@'```/ME4'P>(8#[9%!L'@$`G"#[9%
+M!<'@"`G"#[9%!`G"0HF4(00"``#K-4B-#-T`````@>'X!P``#[95!\'B&`^V
+M10;!X!`)P@^V107!X`@)P@^V100)PD*)E"$$`@``6UU!7,.0D%-(@^Q@2(G[
+M#[=_/$B-1"1>2(E$)#A(C40D7$B)1"0P2(U$)%I(B40D*$B-1"182(E$)"!(
+MC40D5DB)1"082(U$)%5(B40D$$B-1"142(E$)`A(C40D4DB)!"1,C4PD44R-
+M1"1.2(U,)$U(C50D3$B-="1+Z``````/ME0D2P^V="1,2(U\)$3H`````$@/
+MME0D2TAITH@!``!(BW,@2(V[^`@``+D!````Z`````!(#[94)$U(:=+0````
+M2(MS($B-NR`)``"Y`0```.@`````2`^V5"1,2&G2R`\``$B+<R!(C;M("0``
+MN0$```#H`````$@/MU0D5DC!X@-(BW,@2(V[<`D``+D!````Z`````!(#[=4
+M)$Y(:=*H````2(MS($B-NT@*``"Y`0```.@`````2`^V5"112`^W1"1.2`^O
+MT$B-%%)(P>("2(MS($B-N]@)``"Y`0```.@`````2(MS($B-NP`*``"Y`0``
+M`+H``@``Z``````/MDPD2TB+<R!(C;L0"P``N@`(``#H`````$@/ME0D5$C!
+MX@5(BW,@2(V[F`H``+D!````Z`````!(#[94)%5(C1222,'B!4B+<R!(C;O`
+M"@``N0$```#H`````$@/MU0D4DB-%))(P>(#2(MS($B-N^@*``"Y`0```.@`
+M````2`^W5"162`'22(MS($B-NS`/``"Y`0```.@`````2`^V5"1+2`'22(MS
+M($B-NV@/``"Y`0```.@`````2`^V5"1-2`'22(MS($B-NZ`/``"Y`0```.@`
+M````2`^V5"1,2`'22(MS($B-N]@/``"Y`0```.@`````2`^V4SY(`=)(BW,@
+M2(V[$!```+D!````Z`````!(#[=4)%A(C1122,'B!$B+<R!(C;MP"@``N0$`
+M``#H`````(M4)$1(BW,@2(V[2!```+D!````Z`````!(#[=4)%9(P>(&2(MS
+M($B-NW`0``!!N`$```"Y0````.@`````2(MS($B-NZ`0``!!N`$```"Y``$`
+M`+H`&0``Z`````!(#[=4)%9(:=*P!```2(MS($B-N]`0``!!N`$```"Y@```
+M`.@`````2`^W5"1<2,'B`DB+<R!(C;L`$0``0;@!````N00```#H`````$@/
+MMU0D7DC!X@)(BW,@2(V[,!$``$&X`0```+D$````Z``````/ME0D5,'B"TB+
+M<R!(C;M@$0``0;@!````N0@```#H`````$@/MU0D4DAITHP!``!(BW,@2('#
+MD!$``$&X`0```+D(````2(G?Z`````"X`````$B#Q&!;PV9FD&:0059!54%4
+M55-(@^Q@28G\0;X`````QD=1`,9'4`#&1T\`2,>'^!,```````#&A_$3````
+MN0````"ZH`$``$B-AT`2``"("$C_P$C_RG7V28V$).@```!)B80DZ````$F)
+MA"3P````28V$)/@```!)B80D^````$F)A"0``0``28V$)`@!``!)B80D"`$`
+M`$F)A"00`0``28V$)!@!``!)B80D&`$``$F)A"0@`0``28V$)"@!``!)B80D
+M*`$``$F)A"0P`0``28V$)$@!``!)B80D2`$``$F)A"10`0``28V$)%@!``!)
+MB80D6`$``$F)A"1@`0``28V$)#@!``!)B80D.`$``$F)A"1``0``00^W?"0\
+M2(U$)%Y(B40D.$B-1"1<2(E$)#!(C40D6DB)1"0H2(U$)%A(B40D($B-1"16
+M2(E$)!A(C40D54B)1"002(U$)%1(B40D"$B-1"122(D$)$R-3"113(U$)$Y(
+MC4PD34B-5"1,2(UT)$OH``````^V1"1+08A$)$8/MD0D3$&(1"1'#[9$)$U!
+MB(0DX0````^W1"169D&)1"18BT0D7&9!B80D/!(```^W1"1>_\AF08F$)#X2
+M``!!#[=$)#P]@)$``'0+/8"4```/A2,)``!!QD0D301!QD0D0P1!QD0D3D!!
+MQD0D3`!!QH0DW@````E!QD0D1`!)C;PD^`@``.@`````28F$)!@)``"Y````
+M`$@/ME0D2TAITH@!``#K"(@(2/_*2/_`2(72=?-)C;PD(`D``.@`````28F$
+M)$`)``"Y`````$@/ME0D34AITM````!(A=)T"H@(2/_`2/_*=?9)C;PD2`D`
+M`.@`````28F$)&@)``"Y`````$@/ME0D3$AITL@/``!(A=)T"H@(2/_`2/_*
+M=?9)C;PD<`D``.@`````28F$))`)``"Y`````$@/MU0D5DC!X@-T"H@(2/_`
+M2/_*=?9)C;PD``H``.@`````28F$)"`*``!)C;PDV`D``.@`````28F$)/@)
+M``!(B<-)C;PD2`H``.@`````28F$)&@*``!(B<*]`````&8[;"1.<T1)C8PD
+M"`$``$B)6F`/MD0D48A"6$B+00A(B5$(2(D*2(E""$B)$$@/MD0D44B-!$!(
+MC1R#2('"J````/_%9CML)$YRQ$F-O"1P"@``Z`````!)B80DD`H``$B)PKT`
+M````9CML)%AS*TF-C"08`0``QD(0`$B+00A(B5$(2(D*2(E""$B)$$B#PC#_
+MQ68[;"18<MU)C;PDF`H``.@`````28F$)+@*``!(B<*]`````(!\)%0`="M)
+MC8PD*`$``$B+00A(B5$(2(D*2(E""$B)$$B#PB#_Q68/MD0D5&8YZ'?=28V\
+M),`*``#H`````$F)A"3@"@``2(G"O0````"`?"15`'0N28V,)$@!``!(BT$(
+M2(E1"$B)"DB)0@A(B1!(@<*@````_\5F#[9$)%5F.>AWVDF-O"3H"@``Z```
+M``!)B80D"`L``$B)PKT`````9CML)%)S)TF-C"0X`0``2(M!"$B)40A(B0I(
+MB4((2(D02(/"*/_%9CML)%)RX;T`````@'PD2P!T/TV-K"18`0``#[?=28V\
+M)!`+``#H`````$F)A-PP"P``28M5"$F)10A,B2A(B5`(2(D"_\5F#[9$)$MF
+M.>AWR4F-O"0P#P``Z`````!)B80D4`\``$F)A"18#P``#[=$)%9F08F$)&(/
+M```/M_!)C;PD6`\``.@`````28V\)&@/``#H`````$F)A"2(#P``28F$))`/
+M``!F#[9$)$MF08F$))H/```/M_!)C;PDD`\``.@`````28V\)*`/``#H````
+M`$F)A"3`#P``28F$),@/``!F#[9$)$UF08F$)-(/```/M_!)C;PDR`\``.@`
+M````28V\)-@/``#H`````$F)A"3X#P``28F$)``0``!F#[9$)$QF08F$)`H0
+M```/M_!)C;PD`!```.@`````28V\)!`0``#H`````$F)A"0P$```28F$)#@0
+M``!F00^V1"0^9D&)A"1"$```00^V="0^28V\)#@0``#H`````$F-O"1($```
+MZ`````!)B80D:!```$@/ME0D3$B-%-*)UL'F!X'&8%<``+D`````B?)(A=)T
+M"H@(2/_`2/_*=?9)BX0D:!```(DP28N4)&@0```/MD0D3(A"!`^V5"1,28N\
+M)&@0``#H`````+T`````08!\)#X`='T/M\5(:<"H````3`'@3(VPH`$``$&(
+M;@A!QD8)`$R)H*`!``!!QD8.`$'&1E@`0<9&*`!!QX:@`````````$B-D-`!
+M``!)B58P28E6.$B-D.@!``!)B59(28E64$@%``(``$F)1F!)B49H0<9&"@+_
+MQ69!#[9$)#YF.>AW@T'&1"1,`+T`````#[?%0L:$(,8(``#__\5F@_T#=NR]
+M`````(!\)$L`#X20````#[?-28N4)!@)``!(:<&(`0``QD000P%)BY0D&`D`
+M`,9$$$(`28N4)!@)``#&1!!X_TF+E"08"0``QD00:O])BY0D&`D``&;'A!#`
+M``````!)QX3,0`0```````!(B<%)`XPD&`D``$B-42!(B5$@20.$)!@)``!(
+M@\`@2(E`"/_%9@^V1"1+9CGH#X=P____9D''A"3<``````"]`````&9FD&9F
+MD`^WQ4+&A"!`"```___%9H']A0!VZ[T`````@'PD3``/A,(````/M]5)BX0D
+M:`D``$AITL@/``#&1`)8`$F+A"1H"0``QD0"60!)BX0D:`D``$C'1`(0````
+M`$B)T4D#C"1H"0``2(U!&$B)01A(B=!)`X0D:`D``$B#P!A(B4`(2(G120.,
+M)&@)``!(C4$H2(E!*$B)T$D#A"1H"0``2(/`*$B)0`A)BX0D:`D``$R)=`((
+M2(G120.,)&@)``!(C4%(2(E!2$D#E"1H"0``2(/"2$B)4@C_Q68/MD0D3&8Y
+MZ`^'/O___T'&A"3?````@+T`````@'PD30`/A(<````/M]5)BX0D0`D``$AI
+MTM````!FQT0"3@0`28N$)$`)``#&1`)"`$F+A"1`"0``QD0"1/])BX0D0`D`
+M`,9$`E#_2(G120.,)$`)``!(C4$H2(E!*$B)T$D#A"1`"0``2(/`*$B)0`A)
+MBX0D0`D``$R)M`*(````_\5F#[9$)$UF.>@/AWG___]!QH0DX````())C;0D
+MF!```$F-O"1P$```Z`````!)B80DD!```$F-M"3($```28V\)*`0``#H````
+M`$F)A"3`$```28VT)/@0``!)C;PDT!```.@`````28F$)/`0``!)C;0D*!$`
+M`$F-O"0`$0``Z`````!)B80D(!$``$F-M"18$0``28V\)#`1``#H`````$F)
+MA"10$0``28VT)(@1``!)C;PD8!$``.@`````28F$)(`1``!-B[0DB!$``$F)
+MQ;T`````@'PD5`!T2$F-G"0H`0``2(G?Z`````!(B<),B6@03(EP&$B+0PA(
+MB5,(2(D:2(E""$B)$$F!Q0`(``!)@<8`"```_\5F#[9$)%1F.>AWP$F-M"2X
+M$0``28V\))`1``#H`````$F)A"2P$0``38NT)+@1``!)B<6]`````&8[;"12
+M<T1)C9PD.`$``$B)W^@`````2(G"3(EH$$R)<!A(BT,(2(E3"$B)&DB)0@A(
+MB1!)@<6,`0``28'&C`$``/_%9CML)%)RQ$B#Q&!;74%<05U!7L-F9F:09F9F
+MD&9FD&9FD$%7059!54%455-(@^P(28G\QD0D!P!(#[9$)`="#[:4(,8(``"`
+M^O\/A)L````/ML)(:<"H````3HVT(*`!``!!O0````!!@'X.`'9\28UN8$V)
+M]TB)[^@`````2(G#2(M%"$B)70A(B2M(B4,(2(D82(-[.`!T&DB+4SA)B[0D
+MT`@``+\%````Z`````"`2T0"2(G:O@(```!,B??H`````(![>P!T&$R)Y^@`
+M````OP$```#H`````(![>P!UZ$'_Q44X;PYWB_Y$)`>`?"0'`P^&/O___TR)
+MY^@`````2(/$"%M=05Q!74%>05_#D$B#[`A(.7XH=68/MDXX@/D(#Y7`@/DH
+M#Y7"#[;`A<)T:(#YJ'1C@/F(=%Z`^0H/E<"`^2H/E<(/ML"%PG1+@/FJ=$:`
+M^8IT04B-E^@```!(BX?H````2(EP"$B)!DB)5@A(B;?H````ZQ]F9I!F9I!(
+MC8?H````2(M0"$B)<`A(B09(B58(2(DRZ`````!(@\0(PV9F9I!F9I!F9I!F
+M9I!(@^P(Z`````!(@\0(PV:005154TB)\TB)U4&\`````&:!?CCA`74+#[9&
+M.H/H$3P!=C)(BQ=(B[(8"0``3(VF>(8!`&:!>R"%`'<92`^W0R!(#[:$$$`(
+M``!(:<"(`0``3(TD!L9%!`6`907^@&4`W[H`````9H%[..$!=1(/MD,Z_\@\
+M`;@!````#T;09I")T,'@!P^V50"#XG\)PHA5``^V@Y8```"#X`'!X`:#XK\)
+MPHA5`&:!>SCA`742#[9#.H/H$3P!=P=FB4T(ZQR0]H.6`````70.3(GGZ```
+M``!FB44(ZP1FB4T(#[=%"(A#)6:!>SCA`74N#[9#.O_(/`%W#`^V4SOK,69F
+MD&9FD&:!>SCA`740#[9#.H/H$;H/````/`%V$[H`````28-\)%@`=`9!#[94
+M)'F#X@\/MD4`@^#P"="(10!;74%<PY!(@^P(2(L_Z`````!(@\0(PV9F9I!F
+M9F:09F9FD&9FD$R+!P^WAS@2``#_P&:)AS@2``!F.X<\$@``<@EFQX<X$@``
+M``!(#[>/.!(``$B+ER`1``"+!HD$B@^WAS@2``!!B8`L`0``PV9F9I!F9F:0
+M08G10;@`````N@0```!(B<A$B`!(_\!(_\IU]8GR@>+_#P``BP$E`/#__PG0
+MB0$/ME<-P>(,)?\/\/\)T(D!2`^V1PI(T>B#X`&#^`$9P(/@`O_`P>`=BQ&!
+MXO___Q\)PHD1#[9!`X/($(/@]XA!`_9'"@%T%$2)RH/B?\'B%(L!)?__#_@)
+MT(D!\\-F9F:02(/L.$B)7"0(2(EL)!!,B60D&$R);"0@3(ET)"A,B7PD,$F)
+M_$B)\TF)UT&^``````^V1C@\"`^4PCPH#Y3`"="H`74,@'XXJ'0&@'XXB'4/
+M@XN4````"NLM9F:09F:0#[9&.#P*#Y3"/"H/E,`)T*@!=0R`?CBJ=`:`?CB*
+M=0>#BY0````"9H%[..$!=2$/MD,Z@^@1/`%W%H.+E`````BX`````.E%!0``
+M9F:09I"+0S@E____`#WA`1``#X4@`0``9H%[((4`#X>A````2`^W0R!"@+P@
+M0`@``/\/A(T```!F@WL@?W<D2@^VA"!`"```28N4)!@)``!(:<"(`0``2(M$
+M$$A$#[9H".MH9H%[(($`=RE(#[=#($H/MH0@0`@``$F+E"1H"0``2&G`R`\`
+M`$B+1!`(1`^V:`CK-T@/MT,@2@^VA"!`"```28N4)$`)``!(:<#0````2(N$
+M$(@```!$#[9H".L+9F:09I!!O?____]$B>H/ML)*#[:L(,8(``!(:>VH````
+M2HVL):`!``!)BY0D:`D``$B-@CBX#P!F@7L@A0!W&4@/MT,@2@^VA"!`"```
+M2&G`R`\``$B-!`+V0%T0#X6"`0``QD,D!$''!P````"X`0```.D-!```9H%[
+M((4`#X>A````2`^W0R!"@+P@0`@``/\/A(T```!F@WL@?W<F2@^VA"!`"```
+M28N4)!@)``!(:<"(`0``2(M$$$A$#[9H".MH9I!F@7L@@0!W*4@/MT,@2@^V
+MA"!`"```28N4)&@)``!(:<#(#P``2(M$$`A$#[9H".LU2`^W0R!*#[:$($`(
+M``!)BY0D0`D``$AIP-````!(BX00B````$0/MF@(ZPEF9I!!O?____^Z_P``
+M`&:!>R"%`'</2`^W0R!F0@^VE"!`"```1(GI#[;!2@^VK"#&"```2&GMJ```
+M`$J-K"6@`0``#[?"2&G`B`$``$F)QDT#M"08"0``9H%[..$!=0H/MD,Z_\@\
+M`78I9H'Z_P!T!T'V1D,$=1O&0R0&0<<'`````+@!````Z=8"``!F9I!F9I!)
+M#[9&0*@!=">H!'0C00^V1"1$03I$)$YR%D''!P$```"X`0```.FE`@``9F:0
+M9I!-A?8/A-<```!)#[9&0*@!#X3*````J`0/A,(```!(B=Y,B??H`````(3`
+M=17&0R0$0<<'`````+@!````Z5X"``!!@'Y['W810<<'`0```+@!````Z48"
+M``#V@Y8````!=`;V10P!=!OV@Y8````!=0;V10P!=0R`>R2!=`;V10P(="%!
+M#[;U3(GGZ`````"$P'010<<'`0```+@!````Z?L!``#V@Y8````!#X1N`0``
+M]D4,`0^$9`$``$R)]^@`````9H/X'P^&4@$``$''!P$```"X`0```.G!`0``
+MD/9%"@)T*XM#."7___\`/>$!$`!T'$$/MD9[03I&>G(10<<'`0```+@!````
+MZ8\!``"+0S@E____`#WA`1``#X3\````20^W1F)(B<)(T>J#X@&Y`0```(![
+M..$/A=\```"`>SD!#X75````#[9#.H/H!H/X"0^'K0```(G`_R3%``````^V
+MR;H!````2(G>3(GGZ`````"$P`^%H0```$''!P(```"X`0```.D0`0``#[;)
+MN@````!(B=Y,B>?H`````(3`=7E!QP<"````N`$```#IZ`````^VTKD!````
+M2(G>3(GGZ`````"$P'510<<'`@```+@!````Z<`````/MM*Y`````$B)WDR)
+MY^@`````A,!U*4''!P(```"X`0```.F8````QD,D!$''!P````"X`0```.F#
+M````9F:028V\)%@/``#H`````(3`=`]!QP<!````N`$```#K89"`>SCA=5&`
+M>SD!=4N`>SH/=46`>ST!=3]F#[9S/,'F"&8/MD,[`<8/M_9,B>?H`````$@Y
+M0V@/E<)(A<`/E,`)T*@!=!+&0R0$0<<'`````+@!````ZPFX`````&9F9I!(
+MBUPD"$B+;"003(MD)!A,BVPD($R+="0H3(M\)#!(@\0XPV9F9I!F9I!F9I!F
+M9I"Y`````+H-````2(GP9F:0B`A(_\!(_\IU]@^V1SF(!@^V1SJ(1@$/MD<[
+MB$8"#[9'/(A&`P^V1SV(1@0/MD<^B$8%#[9'/XA&!O:'E@````1T(P^V1T"(
+M1@@/MD=!B$8)#[9'0HA&"@^V1T.(1@L/MD=$B$8,N`$```##9F9FD+H`````
+M0;D`````9F:09I"Y!P```$ECP40/M@0P9F:0`=)$B<#3^*@!=!7WP@````%U
+M'8'R=R?;`.L59F:09I")T#5W)]L`]\(````!#T70_\EYS$'_P4&#^0=^LXG0
+MP>@0B`>)T,'H"(A'`8A7`L-!5T%6055!5%532(/L6$F)_DB)]4B+A_`0``!(
+MB40D($C'1"00`````$&\`````$C'1"0(`````$&]`````&;'1C+_#TB-5"0\
+MZ`````"$P'0)BT0D/.F0#```BT4X)?___P`]X0$0``^%$@$``+^($P``Z```
+M``!F@7T@A0`/AYP```!(#[=%($*`O#!`"```_P^$B````&:#?2!_=R)*#[:$
+M,$`(``!)BY88"0``2&G`B`$``$B+1!!(#[9`".MD9H%](($`=R=(#[=%($H/
+MMH0P0`@``$F+EF@)``!(:<#(#P``2(M$$`@/MD`(ZS5(#[=%($H/MH0P0`@`
+M`$F+ED`)``!(:<#0````2(N$$(@````/MD`(ZPMF9I!F9I"X_____P^VP$H/
+MMH0PQ@@``$AIT*@```!*C8PRH`$``$B)3"0828N6:`D``$R-HCBX#P!F@7T@
+MA0`/AY@!``!(#[=%($H/MH0P0`@``$AIP,@/``!,C20"Z7H!``!F9I"Y_P``
+M`&:!?2"%`'</2`^W12!F0@^VC#!`"```9H%]..$!=0\/MD4Z@^@1/`$/AM\`
+M``!F@7T@A0`/AY8```!(#[=%($*`O#!`"```_P^$@@```&:#?2!_=R)*#[:$
+M,$`(``!)BY88"0``2&G`B`$``$B+1!!(#[9`".M>9H%](($`=R=(#[=%($H/
+MMH0P0`@``$F+EF@)``!(:<#(#P``2(M$$`@/MD`(ZR](#[=%($H/MH0P0`@`
+M`$F+ED`)``!(:<#0````2(N$$(@````/MD`(ZP6X_____P^VP$H/MH0PQ@@`
+M`$AIV*@```!*C80SH`$``$B)1"08#[?!2&G`B`$``$D#AA@)``!(B40D$.LB
+M#[?!2&G`T````$D#AD`)``!(B40D"$B+D(@```!(B50D&&:!?3CA`74;#[9%
+M.HU0[X#Z`0^7PO_(/`$/E\`/MM*%T'0@9H'Y_P!T"TB+3"00]D%#!'4.QD4D
+M!K@`````Z?0)``!(C70D,$R)]^@`````08G'9HE%,DR)]^@`````2(G#N`(`
+M``!(A=L/A,<)``!(B9V`````00^WSTAIR;`$``!(`TPD($B)R$DKAO`0``!(
+MB<9)`[;X$```2(/&($B+1"0PB7`@2(GR2,'J($B+1"0PB5`D2(MS&$B+1"0P
+MB7`H2(GR2,'J($B+1"0PB5`L2(M$)#!F1(EX"+X`````NK`$``!(B<AF9F:0
+M0(@P2/_`2/_*=?5F@7TXX0%U:@^V13J#Z!$\`7=?2(U,)$!(BT0D,`^V4`A(
+MB>Y(BWPD$.@`````00^WQTAIP+`$``!(`T0D($DKAO`0``!(B<9)`[;X$```
+M2('&(`0``$B+1"0PB7`02(GR2,'J($B+1"0PB5`4Z9@!``!(BT0D&/9`"@%U
+M+8M%."7___\`/>$!$``/A`4!``!(BU0D$$@/MD)`J`$/A/,```"H!`^$ZP``
+M`/:%E@```"!T#TB-="1`2(GOZ`````#K&TB-3"1`2(M$)#`/ME`(2(GN2(M\
+M)!#H`````$$/M\=(:<"P!```2`-$)"!)*X;P$```2(G&20.V^!```$B!QB`$
+M``!(BT0D,(EP$$B)\DC!ZB!(BT0D,(E0%&:!?3CA`74/#[9%.H/H$3P!#X;7
+M````2(M,)!!(#[9!0*@"#X3%````J`0/A+T```"H`0^$M0```$$/M\=(:<"P
+M!```2`-$)"!)*X;P$```2(G&20.V^!```$B+1"0PB7`82(GR2,'J($B+1"0P
+MB5`<ZWMF9I!F9I!(BT0D&/9`"@)T:D$/M\=(:<"P!```2`-$)"!(B<))*Y;P
+M$```2(G620.V^!```$B+5"0PB7(82(GQ2,'I($B+5"0PB4H<22N&\!```$B)
+MQDD#MO@0``!(@<8@!```2(M$)#")<!!(B?)(P>H@2(M$)#")4!1(BT0D,(!(
+M`0)F#[9564B+1"0P9HE0`K\`````@'U9`'0MB?A(C01`2,'@`DB)QD@#<Q!(
+MBTU@2(L4"$B)%HM$"`B)1@C_QP^V15DY^'?3BU4T2(M$)#")4`QF@7TXX0%U
+M40^V13J#Z!$\`7=&00^WSTB+5"0P2(GN2(M\)!CH`````$B-3"1`00^WUTAI
+MTK`$``!(`U0D($B)[DB+?"08Z`````!(BU0D&(!B#/[I8P4``$B+3"08]D$*
+M`@^$W00``$B+1"0PQD`&_DB+1"0P@&`'_DB#?"00``^$[0```$B+7"002`^V
+M0T"H`@^$VP```*@$#X33````J`$/A,L```!!#[?/2(M4)#!(B>Y(BWPD&.@`
+M````]H66`````7002(M$)#`/MT`(P>`#B$0D04B-3"1`00^WUTAITK`$``!(
+M`U0D($B)[DB+?"08Z`````#VA98````!=`M(BT0D&(!(#`'K"4B+5"08@&(,
+M_D$/M\](:<FP!```2(M<)"#&!!FA2(M$)!`/MI#B````@^(/#[9$&0&#X/`)
+MT(A$&0%(BU0D$`^W0C#_P`^VT,'B"`^VQ`G09HE$&0),BVPD$$F!Q<P```#I
+MK@,``&:!?3CA`0^%>`(```^V13J#^`]T#H/X$`^$X@```.F+`P``9@^V53S!
+MX@AF#[9%.P'"2(M$)##&0`0-2(M$)#"`8`7^@$PD+PA(BW0D,`^V125!#[:.
+MW@```-/@9@E&"$B+3"0P#[9!`8/@'X/(((A!`4$/M\](:<FP!```2(M<)"!(
+MC3092(M%/DB)AC@$```/ML+!X`@/MM8)PF:)E!E$!```#[9%/8B$&4($``#&
+M!I%(BU0D$`^W0C#_P`^VT,'B"`^VQ`G09HE$&0)(BUPD$`^VD^(```"#X@](
+MBUPD(`^V1!D!@^#P"="(1!D!3(ML)!!)@<7,````Z:X"``!(BU0D,`^V125!
+M#[:.W@```-/@9@E""$$/M]=(:=*P!```2(M$)"#&!`*!9L=$`@+__T$/MHPD
+MNP```(/A#TB+7"0@#[9$&@&#X/`)R(A$&@%(@WU(`'4.QD4D(;@`````Z0,$
+M``#V13L!=#U(@WU0`'0V3(MM4$$/M]](:=NP!```28N^:!```$R)[N@`````
+M@^`/2(M,)"`/ME0+`8/B\`G"B%0+`>L#38GEO@0```!(BU5(#[9"`3V3````
+M=W:)P/\DQ0````"#Q@3K:(/&!.MC@\8(ZUZ#Q@AF9I#K5H/&".M1@\8(ZTR#
+MQ@B0ZT:#Q@CK08/&&.L\@\88D.LV@\8,ZS&#Q@CK+`^V<@2--+4(````ZQ^!
+MQH@```"0ZQ:#QB3K$8/&).L,@\8DD.L&@<:(````C58#P>H"2(M$)#"(4`1(
+MBTPD,&;!Z@B#X@$/MD$%@^#^"="(005!#[?_2&G_L`0``$B+7"0@2(V\'R`$
+M``")\DB+=4CH`````.DJ`0``#[9%.(/H!#VK````=S^)P/\DQ0`````/MD5`
+MP>`(#[9508T,$(/Y#7<8N`$```!(T^"IV#X``'0)2(M$)#"`2`$$2(M$)#"`
+M2`$!ZPE(BT0D,(!@`?M(BT0D,,9`!`U(BT0D,(!@!?Y(BU0D,`^V125!#[:.
+MW@```-/@9@E""$B+1"0P@&`!'T$/M]](:=NP!```2(M$)"#&A`,@!```!DR+
+M;"0028'%S````$R-)`-)C;PD(00``$R)[N@`````28V\)"4$``!,B>[H````
+M`$B+13A)B80D1`0``$B+14!)B80D3`0``$'&!"212(M,)!`/MI'B````@^(/
+M2(M,)"`/MD0+`8/@\`G0B$0+`4B+5"00#[=",/_`#[;0P>((#[;$"=!FB40+
+M`DV%[0^$D@```$$/M\=(:<"P!```28M5`$B+3"0@2(E4"`3K=TB+7"08]D,*
+M`71L00^WSTB+5"0P2(GN2(G?Z`````#VA98````!=!!(BT0D,`^W0`C!X`.(
+M1"1!2(U,)$!!#[?72&G2L`0``$@#5"0@2(GN2(M\)!CH`````/:%E@````%T
+M"TB+1"08@$@,`>L)2(M4)!B`8@S^00^WUTF+AI`)``!(B2S01(GZ9L'J!0^W
+MTD2)^8/A'[@!````2-/@00F$EI@)``"+13@E____`#WA`1``=2]!#[?W2(U,
+M)"RZ`````$B+?"08Z`````"+1"0L)?___Q\-````0(E$)"SIH0```&:!?3CA
+M`74V#[9%.H/H$3P!=RM(BW0D"$R)]^@`````2(M,)`@/ME%000^W]TB-3"0L
+M2(M\)!CH`````.MC2(MT)!!,B??H`````$B+7"00#[93:D$/M_=(C4PD+$B+
+M?"08Z`````!(#[9#0*@"=#&H!'0MJ`%FD'0GBT0D+"7___\?#0```&")1"0L
+M#[93:H/B?\'B%"7__P_X"=")1"0L2(UT)"Q,B??H`````+@#````2(/$6%M=
+M05Q!74%>05_#9F:09F:02(/L($B)7"0(2(EL)!!,B60D&(GR2(L?B?!FP>@%
+M#[?HBT2K7$&)U$&#Y!]$B>%(T_BH`74Z#[?V2(U,)`2Z`````.@`````@4PD
+M!````.!(C70D!(!F`_=(B=_H`````+@!````1(GA2-/@"42K7$B+7"0(2(ML
+M)!!,BV0D&$B#Q"##9F9FD&9F9I!F9F:02(/L*$B)7"0(2(EL)!!,B60D&$R)
+M;"0@28G\2(GU2(M&<$R+:"AF@7X@A0`/AZX```!(#[=&(("\.$`(``#_#X2;
+M````9H-^(']W*4@/MH0X0`@``$B+EQ@)``!(:<"(`0``2(M$$$A(#[9`"$@%
+MP`@``.MP9H%^(($`=RY(#[=&($@/MH0X0`@``$B+EV@)``!(:<#(#P``2(M$
+M$`A(#[9`"$@%P`@``.LZ2`^W1B!(#[:$.$`(``!(BY=`"0``2&G`T````$B+
+MA!"(````2`^V0`A(!<`(``#K"69F9I"XOPD``$D/MEP$!DAIVZ@```!*C9PC
+MH`$``$B#?7@`=`](BW5X3(GGZ`````!F9I!(B>Y,B>?H`````$R)[DB)WT'_
+ME:````!(BUPD"$B+;"003(MD)!A,BVPD($B#Q"C#9F9FD&9F9I!F9F:09F:0
+M2(/L.$B)7"0(2(EL)!!,B60D&$R);"0@3(ET)"A,B7PD,$F)]DF)_4R+/TB-
+M7TA(B=_H`````$F)Q$F#[#A,B?_H`````$B)Q4F-1"0X2(M3"$B)0PA)B5PD
+M.$B)4`A(B0*X`0```$B%[71Y2(U]6,9%..'&13D!QD4Z$(!-.P%)BX:@````
+M2(E%:$B+17!,B7`H28V&D````$B)15#&127,9D$/MD0D6V:)12!)BT4`2(E%
+M*,=%-)````!,B75(2,>%H`````````"^`````.@`````2(GN3(G_Z`````"X
+M`````$B+7"0(2(ML)!!,BV0D&$R+;"0@3(MT)"A,BWPD,$B#Q#C#9F9FD&9F
+M9I!(@^PH2(D<)$B);"0(3(ED)!!,B6PD&$R)="0@2(GS2(G]3(MO2$V+90`/
+MMTXRB<YFP>X%#[?&08M$A%R#X1](T_BH`0^%9@,``$F+%"0/M\:-!(4``P``
+MB8)P`0``28L$)(N`=`$``(D%`````(G"QD,D(8M#."7___\`/>$!#P!U(KX`
+M````2(G?Z`````"Z`````$B)WDR)Y^@`````Z0L#``")T`^W2S*#X1](T_BH
+M`70;O@$```!(B=_H`````$R)Y^@`````9F:09F:0#[:%X````(/X!`^'T`(`
+M`(G`_R3%`````,:%X`````&Z`0```$B)WDR)[^@`````Z:L"``#&A>`````"
+MN@@```!(B=Y,B>_H`````.F/`@``QH7@`````TB)ZKXA````3(GOZ`````!(
+M@WU0`'0@#[95>4B+=5!!N`````"Y`0```$R)[^@`````Z5$"``!!#[9U#;H`
+M````3(GGZ`````#I.@(``,:%X`````1(@WU0`'0P2(GJOB$```!,B>_H````
+M``^V57E(BW500;@`````N0(```!,B>_H`````.G\`0``N@````"^(0```$R)
+M[^@`````00^V=0VZ`0```$R)Y^@`````Z=,!``!(B>J^!@```$R)[^@`````
+M2(-].`!T%DB+13B+2`2-40&)4`2#^04/AJ8!``#&14,!QD5"`(!]>P!T&$R)
+MY^@`````OP$```#H`````(!]>P!UZ$B#?5``=!A(BU482(M%$$B)4`A(B0)(
+MBT50_DA8ZQE(@WU8`'022(M56$@/MD5Y2,=$PE@`````2(M5"$B+10!(B5`(
+M2(D"0?Y-#DB#O1@!````=!@/MK4%`0``2(N]&`$``+H!````Z`````!(@WU0
+M`'02#[9U>4B+?5"Z`0```.@`````2(-].``/A((```!(BT4X2,=`8`````!!
+M_H0D[Q,``$R)Y^@`````2(M%.`^V<`&Z`0```$R)Y^@`````2(M%.`^V4`(/
+MMG`!2,?'`````+@`````Z`````!(BU4X28NT)-`(``"_`0```.@`````2(M5
+M.$F+M"30"```OP8```#H`````$C'13@`````2(GN3(GGZ`````!!@'T)_W1;
+M0;X`````08!]#@!V.4F-76!(B=_H`````$B)Q4B+0PA(B6L(2(E=`$B)10A(
+MB2B`?4+_=0M!_\9%.'4.=]/K!D4X=0YW%4'&10G_3(GN3(GGZ`````!F9I!F
+MD$B+'"1(BVPD"$R+9"003(ML)!A,BW0D($B#Q"C#9F:02(/L.$B)7"0(2(EL
+M)!!,B60D&$R);"0@3(ET)"A,B7PD,$B)\TB)_4R+9TA-BRPD0;\`````0?9$
+M)`P0=`?&A^`````&#[:%X````(/X`0^$BP```(/X`7\+A<!T'F:0Z?L#``"#
+M^`0/A*(```"#^`8/A/D!``#IY`,``,:%X`````%(B>Y,B>_H`````,9#)(%!
+M@$PD#`A(@[N``````'0/2(VS@````$R)[^@`````28V5Z````$F+A>@```!(
+MB5@(2(D#2(E3"$F)G>@```!,B>_H`````.F"`P``9I!!@&0D#/?^A>,```#&
+MA>``````QD,D`DB)WDR)[^@`````3(GOZ`````#I40,``)#&A>,`````2(-]
+M.``/A$X!``!(BT4XBT@$C5$!B5`$@_D%#X<X`0``08!D)`SW2(.[@`````!T
+M#TB-LX````!,B>_H`````$F-E>@```!)BX7H````2(E8"$B)`TB)4PA)B9WH
+M````08!,)`P02(-]4`!T(`^V57E(BW500;@`````N0(```!,B>?H`````.F\
+M`@``QD0D!P!!@'PD#@`/AJ<```!-C70D8&9FD&9FD$R)]^@`````2(G#28M&
+M"$F)7@A,B3-(B4,(2(D82(-[.`!T'$B+4SA)B[70"```OP4```#H`````(!+
+M1`)F9I!(B=J^!@```$R)Y^@`````@'M[`'0R1(GX0?_'/7^6F`!W)4R)[^@`
+M````OP$```#H`````(![>P!T#42)^$'_QSU_EI@`=MO^1"0'#[9$)`=!.$0D
+M#@^'9/___\9%0@-(B>Y,B>_H`````.GP`0``28V5Z````$F+A>@```!(B5@(
+M2(D#2(E3"$F)G>@```!(@WTX`'062(M%.(M(!(U1`8E0!(/Y!0^&E@$``$C'
+MQP````"X`````.@`````2(GJO@8```!,B>?H`````$'^3"0.2(M5"$B+10!(
+MB5`(2(D"2(-]4`!T&$B+15#^2%A(BU482(M%$$B)4`A(B0+K'TB#?5@`=!A(
+MBU582`^V17E(QT3"6`````!F9I!F9I"`?7L`=#)$B?A!_\<]?Y:8`'<E3(GO
+MZ`````"_`0```.@`````@'U[`'0-1(GX0?_'/7^6F`!VVTB+50A(BT4`2(E0
+M"$B)`DB#O1@!````=!\/MK4%`0``2(N]&`$``+H!````Z`````!F9F:09F:0
+M2(-]4`!T&0^V=7E(BWU0N@$```#H`````&9F9I!F9I!(@WTX`'1_2(M%.$C'
+M0&``````0?Z%[Q,``$R)[^@`````2(M%.`^V<`&Z`0```$R)[^@`````2(M%
+M.`^V4`(/MG`!2,?'`````+@`````Z`````!(BU4X28NUT`@``+\!````Z```
+M``!(BU4X28NUT`@``+\&````Z`````!(QT4X`````$B)[DR)[^@`````ZQ!(
+MB>J^`@```$R)Y^@`````3(GOZ`````!F9I!FD$B+7"0(2(ML)!!,BV0D&$R+
+M;"0@3(MT)"A,BWPD,$B#Q#C#9F9FD&9FD&9FD&9FD$%6055!5%532(GS28G\
+M3(NOB````$F+;0!!]D4,$'0$QD=1!D$/MD0D48/X`0^$B0```(/X`7\-A<!T
+M(&9F9I#I>P,``(/X!`^$F@```(/X!0^$EP$``.ED`P``0<9$)%$!3(GF2(GO
+MZ`````#&0R2!08!-#`A(@[N``````'0/2(VS@````$B)[^@`````2(V5Z```
+M`$B+A>@```!(B5@(2(D#2(E3"$B)G>@```!(B>_H`````.D$`P``08!E#/=!
+M_D0D4D'&1"11`,9#)`)(B=Y(B>_H`````$B)[^@`````Z=@"``!!@&4,]TB#
+MNX``````=`](C;.`````2(GOZ`````!(C87H````2(N5Z````$B)6@A(B1-(
+MB4,(2(F=Z````+H`````O@8```!,B>_H`````$$/MG4-N@$```!(B>_H````
+M`$&^`````$&`?0X`#X9\````38UE8)!,B>?H`````$B)PTF+1"0(28E<)`A,
+MB2-(B4,(2(D82(-[.`!T&DB+4SA(B[70"```OP4```#H`````(!+1`*02(G:
+MO@8```!,B>_H`````(![>P!T&$B)[^@`````OP$```#H`````(![>P!UZ$'_
+MQD4X=0YWB4'&10D`08!-#!!,B>_H`````.G2`0``08!E#/=(@[N``````'0/
+M2(VS@````$B)[^@`````2(V%Z````$B+E>@```!(B5H(2(D32(E#"$B)G>@`
+M``!)C45@2(G"23E%8`^$X0```$F)QDB)U^@`````2(G#2(-X.`!T'DB+4#A(
+MB[70"```OP4```#H`````(!+1`)F9I!FD$B)VKX&````3(GOZ`````"`>WL`
+M=!A(B>_H`````+\!````Z`````"`>WL`=>A(@WLX`'1A2(M#.$C'0&``````
+M_H7O$P``2(GOZ`````!(BT,X#[9P`;H!````2(GOZ`````!(BU,X2(NUT`@`
+M`+\!````Z`````!(BU,X2(NUT`@``+\&````Z`````!(QT,X`````$B)WDB)
+M[^@`````3(GR33EU8`^%(O___[H`````O@8```!,B>_H`````$R)YDB)[^@`
+M````2<=%0`````!(BT4`BY!8`0``B14`````A=)T"DB+10")D%@!``!!]D4*
+M`7180;X`````@'U#`'8;20^V50U(B=!$B?%(T_BH`74)0?_&1#AU0W?J00^V
+M]DB)[^@`````3(GN2(GOZ`````!$B?(/ML)(:\!H2,>$*$@2````````9F9F
+MD%M=05Q!74%>PV9F9I!F9I!!5T%6055!5%532(/L"$F)_$R+=TA)BQY(B?Y(
+MB=_H`````$&`O"3C`````78)0<:$).`````$28UL)"!).6PD(`^$.0(``$B)
+M[^@`````28G'28M$)"!,B7@(28D'28EO"$V)?"0@0;T`````Z=8!``!!#[?5
+M2(N#D`D``$B++-!(A>T/A+L!``!!#[=$)#!F.T4@#X6K`0``#[>+.A(``$B+
+M@U`1```Y"'149F9FD/_!#[>#/A(``#G(N``````/1LB-40%(BX-0$0``BP20
+MJ0``"`!U'B7_#P``9D$YQ74323GO=1E(B=_H`````)#IBP$``$B+@U`1```Y
+M"'6P08!^6``/A3H!``!F@7T@A0`/ARX!``!(#[=%(("\&$`(``#_#X0;`0``
+M387D#X0``0``20^V1"1`J`$/A/(```"H!`^$Z@```$B+$P^W13)FP>@%#[?`
+MC02%``,``(F"<`$``$B+`P^W33*#X1^Z`0```$B)UDC3YHFP=`$``$@/MTTR
+M2(N#D`D``$C'!,@`````#[=-,HG(9L'H!0^WP(/A'TB)UDC3YDB)\??1(8R#
+MF`D```^W33*)R&;!Z`4/M\"#X1](T^+WTB%4@UQ,.?UT24B+50A(BT4`2(E0
+M"$B)`DB#O8``````=`](C;6`````2(G?Z`````!(C9/H````2(N#Z````$B)
+M:`A(B44`2(E5"$B)J^@````/MW4R2(V[6`\``.@`````0?Y,)'OK$D'V1@H"
+M=`M(B>Y,B>?H`````$'_Q69$.6M8#X<?_O__387D="A)#[9$)$"H`70>J`1T
+M&DF+5PA)BP=(B5`(2(D"3(G^3(GGZ`````"02(/$"%M=05Q!74%>05_#D$%6
+M055!5%5328G\3(NWB````$F+'DB)_DB)W^@`````08!\)%(!=@9!QD0D401)
+MC6PD*$DY;"0H#X3R`0``2(GOZ`````!)B<5)BT0D*$R):`A)B44`28EM"$V)
+M;"0HO0````#IFP$``&9F9I!F9I`/M]5(BX.0"0``2(LTT$B%]@^$>P$``$$/
+MMT0D0&8[1B`/A6L!```/MXLZ$@``2(N#4!$``#D(=%=F9F:09F:0_\$/MX,^
+M$@``.<BX``````]&R(U1`4B+@U`1``"+!)"I```(`'4>)?\/``!F.<5U%$DY
+M]74:2(G?Z`````!FD.D[`0``2(N#4!$``#D(=;!F@7X@A0`/A_8```!(#[=&
+M(("\&$`(``#_#X3C````08!^6``/A=@```!!]D8*`0^$S0```$B+$P^W1C)F
+MP>@%#[?`C02%``,``(F"<`$``$B+`P^W3C*#X1^Z`0```$B)UTC3YXFX=`$`
+M`$@/MTXR2(N#D`D``$C'!,@`````#[=.,HG(9L'H!0^WP(/A'TB)UTC3YTB)
+M^??1(8R#F`D```^W3C*)R&;!Z`4/M\"#X1](T^+WTB%4@UQ,.>YT+DB+5@A(
+MBP9(B5`(2(D"2(V3Z````$B+@^@```!(B7`(2(D&2(E6"$B)L^@````/MW8R
+M2(V[6`\``.@`````0?Y,)$7_Q68Y:U@/AV+^__]!]D8*`70;28M5"$F+10!(
+MB5`(2(D"3(GN3(GGZ`````"06UU!7$%=05[#9F9FD&9FD$%7059!54%455-(
+M@^P(2(G]0;X`````2(V'Z````$B)PD@YA^@````/A-,!``!)B<=)B<5)B=1(
+MB=?H`````$B)PTB#>'``=2](B>_H`````$B)0W!(A<!U'DB+A>@```!(B5@(
+M2(D#3(EC"$B)G>@```#IB0$``(M#."7___\`/>$!$``/A.P```!F@7L@@``/
+MA.````!F#[9#(&:)0R!F@_A_=AIF@7LXX0%U*0^V0SJ#Z!$\`7<>9F9FD&9F
+MD&:!>R"%`'</2`^W0R"`O"A`"```_W49QD,D!DB)WDB)[^@`````Z08!``!F
+M9I!FD&:!>SCA`74+#[9#.H/H$3P!=B](BY48"0``3(VR>(8!`&:!>R"%`'<9
+M2`^W0R!(#[:$*$`(``!(:<"(`0``3(TT`F:!>SCA`74*#[9#.O_(/`%V,V:!
+M>R"``'0K9H%[..$!=0L/MD,Z@^@1/`%V&$'V1D,$=1'&0R0&2(G>2(GOZ```
+M``#K>DB)WDB)[^@`````@_@"=PN#^`%S)F9F9I#K$(/X`W1/9F:09F:09F:0
+MZT](B=Y(B>_H`````&9FD.L_2(.[@`````!T#TB-LX````!(B>_H`````$B+
+MA>@```!(B5@(2(D#3(E["$B)G>@```#K&TB)WDB)[^@`````3(GJ3#FMZ```
+M``^%,_[__TB#Q`A;74%<05U!7D%?PT%7059!54%455-(@^Q(28G]0(AT)#!(
+M#[94)#!(:])H2`'Z3(NR2!(``$C'P/[___^)\4C3P"*":1(``(A$)"],BS_'
+M1"0H`````$"`_@-V#4''AW`!``#$`0``ZPM!QX=P`0``J`$``$&+AW0!``")
+M!0`````/MDPD,(/A`[L'````T^.)Q0G=08FO=`$``+_H`P``Z`````#WTR'=
+M08FO=`$``(!\)#`#=B`/MD0D,$C!X`(E_`,``$*+A#C0`0``B04`````B<7K
+M'@^V1"0P2,'@`B7\`P``0HN$.-`!``")!0````")Q8/-"(!\)#`#=A@/MD0D
+M,$C!X`(E_`,``$*)K#C0`0``ZQ8/MD0D,$C!X`(E_`,``$*)K#C0`0``@'PD
+M,`-V'`^V1"0P2,'@`R7X!P``0L>$.``"```X````ZQH/MD0D,$C!X`,E^`<`
+M`$+'A#@``@``.````+\0)P``Z`````"`?"0P`W8<#[9$)#!(P>`#)?@'``!"
+MQX0X!`(```````#K&@^V1"0P2,'@`R7X!P``0L>$.`0"````````387V#X3N
+M!P``0;P`````08!]0P!V+69F9I!)#[9&#4$/MLQ(T_BH`700N@$```")SDR)
+M[^@`````D$'_Q$4X94-WUT'V1@H!=&),B?9,B>_H``````^V="0P3(GOZ```
+M``!(#[9$)#!(:\!H2HV4*&`2``"+0@RI```0`'0()?__[_^)0@Q,B?9,B>_H
+M`````$@/MD0D,$AKP&A*QX0H2!(```````#I2P<``$&`?E@`=!-)B[UH$```
+M3(GVZ`````!!_DY8@'PD+P`/A*D"``!(QT0D(`````#&1"0?``^V="0P3(GO
+MZ`````!(#[9$)#!(:\!H2HV4*&`2``"+0@RI```0`'0()?__[_^)0@P/MD0D
+M+T&(1@U!O`````!!@'U#``^&DP$``$@/ME0D+TB)5"00#[;(B4PD#$$/MLQ(
+MBT0D$$C3^*@!#X1@`0``1(GB#[;"2&O`:`^V5"0O0HB4*&D2``!!@/P#=A>-
+M!,T`````2)A"QX0X``(``#@```#K&4J-!.4`````)?@'``!"QX0X``(``#@`
+M``"_$"<``.@`````08#\`W8;2HT$Y0`````E^`<``(M,)`Q"B8PX!`(``.L9
+M2HT$Y0`````E^`<``(M4)`Q"B90X!`(``$&`_`-V#4''AW`!``#$`0``ZPM!
+MQX=P`0``J`$``$&+AW0!``")!0````!$B>&#X0.[!P```-/CB<4)W4&)KW0!
+M``"_Z`,``.@`````]],AW4&)KW0!``!!@/P#=A]*C02E`````"7\`P``0HN$
+M.-`!``")!0````")Q>L=2HT$I0`````E_`,``$*+A#C0`0``B04`````B<6#
+MS0A!@/P#=A=*C02E`````"7\`P``0HFL.-`!``#K%4J-!*4`````)?P#``!"
+MB:PXT`$``$'_Q$4X94,/AW_^__])C49(2(G"23E&2'0V2(G32(G7Z`````!(
+MC4C(2(E,)"!(BU,(2(E#"$B)&$B)4`A(B0)(@WC8`'0)2(G:23E>2'7*2(-\
+M)"``=$5(BT0D(,9`6@!!O`````!!@'U#`'8O20^V1@U$B>%(T_BH`7072`^V
+M1"0?2(M4)"!$B&00</Y"6OY$)!]!_\1%.&5#=]&Z`````+Z!````3(GWZ```
+M``!(#[9$)#!(:\!H2L>$*$@2````````Z6@#``"Z`````+X&````3(GWZ```
+M```/MG0D,$R)[^@`````2`^V1"0P2&O`:$J-E"A@$@``BT(,J0``$`!T""7_
+M_^__B4(,28U&2$B)PDDY1D@/A.P!``!(B00D2(G7Z`````!,C6#(2(U0$$@Y
+M4!`/A+$!``!)C7PD2.@`````2(U8\(![00UU&DB-L$@!``!(BT-(2(L`2(MX
+M*.@`````9F:02(M3"$B+`TB)4`A(B0*`>WL`=!A,B>_H`````+\!````Z```
+M``"`>WL`=>A(@WLX``^$*`$``$B+0SA(QT!@`````(![>P`/A)D```"]````
+M`&9!@WU8``^$B````&:02&/528N%D`D``$B+--!(A?9T9`^W1B!F.T,P=5IF
+M/84`=U0/M\!"@+PH0`@``/]T1DF+50`/MT8R9L'H!0^WP(T$A0`#``")@G`!
+M``!)BT4`#[=.,H/A'[H!````2-/BB9!T`0``QD8D(;H`````3(GOZ`````#_
+MQ4$/MT58.>@/CWK____V0T0$=21!_H7O$P``3(GOZ`````!(BT,X#[9P`;H!
+M````3(GOZ`````!(BT,X#[90`@^V<`%(Q\<`````N`````#H`````$B+4SA)
+MB[70"```OP$```#H`````$B+4SA)B[70"```OP8```#H`````$C'0S@`````
+M0?Y.#D'^3"182(G>3(GOZ`````!)C40D2$DY1"1(#X5/_O__0?Y.*$R)YDR)
+M[^@`````2(L4)$DY5D@/A1C^__])C49@2(G"23E&8`^$]@```$B)Q4B)U^@`
+M````2(G#@'A[`'0VBT0D*/]$)"@]?Y:8`'<G3(GOZ`````"_`0```.@`````
+M@'M[`'0/BT0D*/]$)"@]?Y:8`';92(-[.``/A(4```!(BT,X2,=`8`````#V
+M0T0$=21!_H7O$P``3(GOZ`````!(BT,X#[9P`;H!````3(GOZ`````!(BT,X
+M#[90`@^V<`%(Q\<`````N`````#H`````$B+4SA)B[70"```OP$```#H````
+M`$B+4SA)B[70"```OP8```#H`````$C'0S@`````0?Y.#DB)WDR)[^@`````
+M2(GJ23EN8`^%#?___TR)]DR)[^@`````2`^V1"0P2&O`:$K'A"A($@``````
+M`$&\`````$&`?4,`#X8$`0``3`^V="0OD$R)\D2)X4C3^D0Z9"0P#Y3`"="H
+M`0^$U0```$&`_`-V#4''AW`!``#$`0``ZPM!QX=P`0``J`$``$&+AW0!``")
+M!0````!$B>&#X0.-#$F[!P```-/CB<4)W4&)KW0!``"_Z`,``.@`````]],A
+MW4&)KW0!``!!@/P#=A]*C02E`````"7\`P``0HN$.-`!``")!0````")Q>L=
+M2HT$I0`````E_`,``$*+A#C0`0``B04`````B<6#S0A!@/P#=A=*C02E````
+M`"7\`P``0HFL.-`!``#K&$J-!*4`````)?P#``!"B:PXT`$``&9FD$'_Q$4X
+M94,/AP/___](@\1(6UU!7$%=05Y!7\-F9F:02(/L"$R+![H`````08!X0P!V
+M'`^VPDAKP&A*C80`0!(``$@Y^'0(_\)!.%!#=^0/ML)(:\!H3`'`2(NP2!(`
+M`$B%]G1K]D8*`G1E2`5`$@``2#E&('59@'Y8`'0H_D98ZT[^1EA!#[:)NP``
+M`$F+N&@0``!)Q\``````3(G*Z`````#K*TB+5DA,C4K(2(U&2$@YPG0:2(G"
+M28-Y$`!TPDF+03A,C4C(2#G0=>QF9I!(@\0(PV9F9I!F9F:09F:0055!5%53
+M2(/L"$&)]$F)_;L`````B?(/ML)(:\!H2(T4.$B+JD@2``!(A>T/A($!``!(
+MQ\#^____B?%(T\"$10T/A6P!``!(C45(2#E%2'012(VZ0!(``.@`````Z?X"
+M``!!O`````"`?0X`#X;N`@``2(U=8$B)W^@`````2(G!2(M#"$B)2PA(B1E(
+MB4$(2(D(@'E!``^%!`$``$@/MT$P28.\Q4`$````=0M(@WDX``^$TP```$@/
+MMT$P28N$Q4`$``!(@[B```````^$H0```,:!X`````!(#[9!0*@"="VH!'0I
+MJ`%T)<9!0@7&04,$#[91>4B+<5!(BWE(Z`````#IF````&9F9I!F9I!(#[9!
+M0*@"=2>H!&9FD&:0=!ZH`70:QD%"`\9!0P1(B<Y,B>_H`````.MF9F:09I!(
+M#[9!0*@"=%BH!&9FD&:0=$^H`75+QD%#!L9!0@5FQX'```````!(B<Y,B>_H
+M`````.LM2(M1.$F+M=`(``"_!````.@`````ZQ9(#[=1,$F+M=`(``"_`@``
+M`.@`````0?_$1#AE#@^'R/[__^FM`0``9H'[\P%W9TJ-!*4`````2(G%@>7\
+M`P``9F:09I"_$"<``.@`````08#\`W8@28M%`(N$*-`!``")!0````"I```0
+M`'4IZQYF9I!F9I!)BT4`BX0HT`$``(D%`````*D``!``=0G_PV:!^_,!=J]!
+M#[;T3(GOZ`````!,B>_H`````$2)X@^VPDAKP&A*BZPH2!(``$B%[0^$$`$`
+M`+L`````08!]0P!V+&9F9I!(#[9%#0^VRTC3^*@!=!&Z`````(G.3(GOZ```
+M``!FD/_#03A=0W?81(GA#[;!2&O`:$J-A"A`$@``2(E%($B-14A(.45(=0Y(
+MC45@2#E%8`^$A@```+X`````0;P`````2(U%2$B)PD@Y14AT,V:02(G32(G7
+MZ`````!(C7#(2(M3"$B)0PA(B1A(B5`(2(D"2(-XV`!T"4B)VD@Y74AUSTB%
+M]G1:QD9:`+D`````08!]0P!V2D@/MD4-2-/XJ`%T$$2)X@^VPHA,,'#^1EI!
+M_\3_P4$X34-WW.LD]D4*`70-2(GN3(GOZ`````#K$;X`````2(GOZ`````!F
+M9F:02(/$"%M=05Q!7<-F9I!FD$B#[`A(B?A(BS]FQT!.(`!(B<;H`````$B#
+MQ`C#9F:04TB+#T2+1S"[`````(!Y0P!V&P^VPTAKP&A(C80(0!(``$@Y^'0'
+M_\,X64-WY8#[`W8M2(T$G0`````E_`,``$B+$8N$`M`!``")!0````"I```0
+M`'4MZSMF9F:09F:02(T$G0`````E_`,``$B+$8N$`M`!``")!0````"I```0
+M`'00#[;S1(G"2(G/Z`````#K"P^V\TB)S^@`````6\-F9F:09F9FD&9F9I!F
+M9I!(BX?`$```BP")!0````!(BX?`$```BT`$B04`````2(N'P!```(M`"(D%
+M`````$B+A\`0``"+0`R)!0````##05=!5D%505154TB#[!B)="0428G\0;X`
+M````@']#``^&20@``(MT)!1!#[;6C4H(2(GP2-/XJ`%U$8U*$$B)\$C3^*@!
+M#X05"```08#^`W8G2HT$]0`````E^`<``$F+%"2+A`*``0``B04`````J0``
+M"`!U)^M#2HT$]0`````E^`<``$F+%"2+A`*``0``B04`````J0``"`!T'DR)
+MY^@`````1(GR#[;"2&O`:$*!C"!P$@`````(`$F+-"1$B?%!@/X#=BA*C03U
+M`````"7X!P``BX0P@`$``(D%`````(G"@>(```$`ZR9F9F:02(T$S0`````E
+M^`<``(N$,(`!``")!0````")PH'B```!`(72=%&`^0-V&DB-!,T`````)?@'
+M``#'A#"``0`````!`.L82(T$S0`````E^`<``,>$,(`!``````$`A=)T%D2)
+M\0^VP4AKP&A"@8P@<!(``````0!!@'PD40$/A6T&``!!@/X#=B=*C03U````
+M`"7X!P``28L4)(N$`H`!``")!0````"H`74KZ2H!``!*C03U`````"7X!P``
+M28L4)(N$`H`!``")!0````"H`0^$!`$``$2)\@^VPDAKP&A*C1P@2(VS>!(`
+M`$F+?"0HZ`````!(@[M($@````^$@0```$R+JT@2``!!OP````!!@'T.`'9F
+M28UM8&9FD&:02(GOZ`````!(B<-(BT4(2(E="$B)*TB)0PA(B1CV0T0"=3%(
+M@WLX`'0:2(M3.$F+M"30"```OP4```#H`````(!+1`)(B=J^!@```$R)[^@`
+M````0?_'13A]#G>CNB"A!P#K($$/MO:Z`0```$R)Y^@`````OZ"&`0#H````
+M`+H`+3$!1(GQ#[;!2&O`:$P!X$B-L'@2``")D'@2``!(QT80`````$@%0!(`
+M`$B)1AA)BWPD*.@`````08#^`W8@2HT$]0`````E^`<``$F+%"2+A`*``0``
+MB04`````ZQY*C03U`````"7X!P``28L4)(N$`H`!``")!0````!!@/X#=BQ*
+MC03U`````"7X!P``28L4)(N$`H`!``")!0````"I@````'4PZ<(```!FD$J-
+M!/4`````)?@'``!)BQ0DBX0"@`$``(D%`````*F`````#X27````08#^`W8B
+M2HT$]0`````E^`<``$F+%"2+A`*$`0``B04`````B<;K($J-!/4`````)?@'
+M``!)BQ0DBX0"A`$``(D%`````(G&08#^`W8B2HT$]0`````E^`<``$F+#"2)
+M\H'*```!`(F4`80!``#K)TJ-!/4`````)?@'``!)BPPDB?*!R@```0")E`&$
+M`0``9F9FD&9FD$&`_@-V*DJ-!/4`````)?@'``!)BQ0DBX0"@`$``(D%````
+M`*D```0`=2[I1@(``$J-!/4`````)?@'``!)BQ0DBX0"@`$``(D%`````*D`
+M``0`#X0=`@``08#^`W8B2HT$]0`````E^`<``$F+%"2+A`*``0``B04`````
+MB<;K($J-!/4`````)?@'``!)BQ0DBX0"@`$``(D%`````(G&@<X```0`08#^
+M`W8:2HT$]0`````E^`<``$F+%"2)M`*``0``ZQA*C03U`````"7X!P``28L4
+M)(FT`H`!``!$B?(/ML)(:\!H2H.\($@2````#X6(````08#^`W8B2HT$]0``
+M```E^`<``$F+%"2+A`*``0``B04`````B<'K($J-!/4`````)?@'``!)BQ0D
+MBX0"@`$``(D%`````(G!08#^`W8=2HT$]0`````E^`<``$F+%"2)C`*``0``
+MZ0L#``!*C03U`````"7X!P``28L4)(F,`H`!``#I[@(``$2)\0^VP4AKP&A.
+MBZP@2!(``$F#?4``#X39````28M%0$@/MU!.]L8!#X7'````2(G%]L("#X2U
+M````2(VPD````$F+?"0HZ`````!!O@````"`?3L`=FE$B?(/ML)(BUS%6$B%
+MVW102(-[.`!T&DB+4SA)B[0DT`@``+\%````Z`````"`2T0"2(G:O@8```!,
+MB>_H`````(![>P!T&9!,B>?H`````+\!````Z`````"`>WL`=>A!_\9$.'4[
+M=Y?'A9`````@H0<`2,>%H`````````!(B:VH````2(VUD````$F+?"0HZ```
+M``#K!F:!2$Z``$&`_@-V*$J-!/4`````)?@'``!)BQ0DBX0"@`$``(D%````
+M`/;$`74LZ3P!``!*C03U`````"7X!P``28L4)(N$`H`!``")!0````#VQ`$/
+MA!4!``!!@/X#=B=*C03U`````"7X!P``28L4)(N$`H`!``")!0````"H`70K
+MZ>@```!*C03U`````"7X!P``28L4)(N$`H`!``")!0````"H`0^%P@```$2)
+M\40/MNE-:^UH3XVL)4`2``!)@WT(``^$I````$F+10A(B40D"$F-=3A)BWPD
+M*.@`````0;\`````2(M4)`B`>@X`=E-(B=5(@\5@2(GOZ`````!(B<-(BT4(
+M2(E="$B)*TB)0PA(B1A(@WLX`'0:2(M3.$F+M"30"```OP4```#H`````(!+
+M1`)!_\=(BTPD"$0X>0YWM$''13B`A!X`2<=%2`````!-B6U028UU.$F+?"0H
+MZ`````!F9F:09F:008#^`W8B2HT$]0`````E^`<``$F+%"2+A`*``0``B04`
+M````B<'K($J-!/4`````)?@'``!)BQ0DBX0"@`$``(D%`````(G!08#^`W8:
+M2HT$]0`````E^`<``$F+%"2)C`*``0``ZQA*C03U`````"7X!P``28L4)(F,
+M`H`!``!!_\9%.'0D0P^'M_?__TB#Q!A;74%<05U!7D%?PV9FD$%7059!54%4
+M55-(@^P82(G]28GU2(N7&`D``$R-HGB&`0!F@7X@A0!W&4@/MT8@2`^VA#A`
+M"```2&G`B`$``$R-)`)!#[9$)&K!X`A(F$B+E<`0``"+A`)`"```B04`````
+M08G&0<'N$$&)QT'![QA!#[9$)&K!X`A(F$B+E<`0``"+A`)$"```B04`````
+MB$0D$$B-="00B<+!Z@B(5@'!Z!"(1@)!#[9$)&K!X`A(F$B+E<`0``"+A`)(
+M"```B04`````B$8#B<+!Z@B(5@3!Z!"(1@7&1@8`QD8'`(M,)!!!#[;700^V
+MWD2+1@2)WDC'QP````"X`````.@`````183V#Y7`@_,!A=AT$D'&120`N```
+M``#ILP(``&9FD$&`?22!=2E!#[;700^V]DB-3"003(GOZ`````!!QD4D`K@`
+M````Z84"``!F9I!FD$&+13@E____`#WA`0X`=1!!QD4D(;@`````Z6$"``"0
+M0?:%E@````%U%D'VQ@%T$$&`?"1"_P^%)P(``&9F9I!,B>9(B>_H`````$R)
+MYDB)[^@`````2(M5`$$/MT4R9L'H!0^WP(T$A0`#``")@G`!``!(BT4`00^W
+M33*#X1^Z`0```$B)TTC3XXF8=`$``$D/MTTR2(N%D`D``$C'!,@`````00^W
+M33*)R&;!Z`4/M\"#X1](B=-(T^-(B=GWT2&,A9@)``!!#[=-,HG(9L'H!0^W
+MP(/A'TC3XO?2(52%7$F+50A)BT4`2(E0"$B)`D$/MW4R2(V]6`\``.@`````
+M0?Y,)'M!QD4D@4F#O8``````=`])C;6`````2(GOZ`````!)C40D($B)PDDY
+M1"0@#X0&`0``0;X!````2(V%Z````$B)1"0(28G79F9FD$B)U^@`````2(G#
+M2(M5``^W0#)FP>@%#[?`C02%``,``(F"<`$``$B+10`/MTLR@^$?3(GR2-/B
+MB9!T`0``2`^W4S)(BX60"0``2,<$T``````/MTLRB<AFP>@%#[?`@^$?3(GR
+M2-/B2(G1]]$AC(68"0``#[=+,HG(9L'H!0^WP(/A'TR)\DC3XDB)T??1(4R%
+M7`^W<S)(C;U8#P``Z`````!!_DPD>TB#NX``````=`](C;.`````2(GOZ```
+M``!(BX7H````2(E8"$B)`TB+1"0(2(E#"$B)G>@```!,B?I-.7PD(`^%$___
+M_T&!I90```#___[_0<:$).`````$3(GN3(GGZ`````"X`0```.L=00^VUT$/
+MMO9(C4PD$$R)[^@`````N`````!F9I!(@\086UU!7$%=05Y!7\.02(/L2$B)
+M7"082(EL)"!,B60D*$R);"0P3(ET)#A,B7PD0$B)5"00B?5(BQ],B[/P$```
+M0;T`````2(72#X0%`P``#[?62&G"L`0``$+V1#`A`G012(N#D`D``$B+!-#&
+M0"0"ZQ(/M\9(BY.0"0``2(L$PL9`)"$/M\5(BY.0"0``2(L4PHM"."7___\`
+M/>$!$``/A+@!``"X_____V:!>B"%`'<-2`^W0B`/MH080`@``#S_=1H/M\5(
+MBY.0"0``2(L$PL9`)`;I,PD``&9FD`^VP$AIP(@!``!)B<5,`ZL8"0``@'PD
+M$P!Y;TD/MD5`J`)T+*@$="BH`70D2(L#BX!8`0``B04`````B<*%P'0/2(L#
+MB9!8`0``9F:09F:02(L#BX!0`0``B04`````B<*#R@)(BP.)D%`!``!(BP.+
+M@`0!``")!0````")PH#._TB+`XF0!`$```^WQ4AIP+`$``!F0O=$,"`""`^$
+MW@```$&X`````+X`````@'M#`'9\0;D!````9F9FD&9FD$@/MD<-0`^VSDC3
+M^*@!=%=`@/X#=B*-!(T`````2)A(BQ.+A`+0`0``B04`````J0``$`!U)NLO
+M2(T$M0`````E_`,``$B+$XN$`M`!``")!0````"I```0`'0+3(G(B?%(T^!!
+M"<#_QD`X<T-WD46$P'1,1#A'#75&B>AFP>@%#[?`BT2#7(GI@^$?2-/XJ`%U
+M+4&`O>`````"=PA!QH7@`````P^WQ4B+DY`)``!(BS3"3(GOZ`````#IL`<`
+M`/9$)!,!#X2E!P``#[?%2(N3D`D``$B+/,+&1R0ABT<X)?___P`]X0$.``^$
+M@`<``$$/MD5JP>`(2)A(BY/`$```BX0"0`@``(D%`````(G&P>X008G`0<'H
+M&$$/MD5JP>`(2)A(BY/`$```BX0"1`@``(D%`````(A$)`A(C4PD"(G"P>H(
+MB%$!P>@0B$$"00^V16K!X`A(F$B+D\`0``"+A`)("```B04`````B$$#B<+!
+MZ@B(403!Z!"(007&008`QD$'`/:'E@````%U&$`/MO9`]L8!=`Y!#[;0Z```
+M``#IR08``$B)_DB)W^@`````Z;D&```/M]9(BX.0"0``2(L$T&:!>#CA`0^%
+M+P$```^V2#J#^1`/AY(&``"X`0```$C3X*G`,```#X7R````J0"```!U#:D`
+M``$`=5^0Z6L&```/M]9(BX.0"0``2(L,T$QIPK`$``!##[9$,#.(021(BX.0
+M"0``2(L$T/9`(P0/A#@&``"`>"0`#X0N!@``2(-X4``/A",&``!(BU!00P^V
+M1#`SB`+I$@8```^WUDAITK`$``!$#[?F2(N#D`D``$J+#.!"#[9$,BJ(021(
+MBX.0"0``2HL$X$B#>$@`#X3:!0``0@^VO#(A!```Z`````")PDB+@Y`)``!*
+MBP3@.U`T=@.+4#0/M_5(BX.0"0``2(L$\$B+>$B)TDAI]K`$``!*C70V*.@`
+M````Z8T%```/M\9(BY.0"0``2(L$PL9`)`#I=@4``&9FD&9FD`^WUDB+@Y`)
+M``!,BR3038M\)&BX_____V9!@7PD((4`=PY)#[=$)"`/MH080`@```^VP$AI
+MP(@!``!)B<5,`ZL8"0``0<:%X`````!)#[9%0*@"#X27`0``J`0/A(\!``"H
+M`0^$AP$``$'&1"0D`$&+E"24````2,'J%4V%_P^5P`^VP(7"#X3D!```0?:'
+MJ0````(/A)T```!)@[^@`````'0828N_H````$&+5"0T28MT)$CH`````.M[
+M28-\)$@`='-!O@````!)@[^P`````'030?:'J0````%U"4V+M[````#K(4B+
+MLR`*``"Z`0```$R)_T'_E[@```"%P'0'3(NS(`H``$&#?"0T`'0G28ML)$A)
+MBWX(08L62(GNZ`````!!BP9(`<5)C48$28/&$(,X`'3>00^V16K!X`A(F$B+
+MD\`0``"+A`)`"```B04`````B<+!ZA!!B)>;````P>@89D&)AY````!!#[9%
+M:L'@"$B82(N3P!```(N4`D0(``")%0````!F#[;"9D&)AY0````/ML9F08F'
+ME@```(G0P>@09@^VP&9!B8>8````P>H808B7F@```$$/MD5JP>`(2)A(BY/`
+M$```BX0"3`@``(D%`````&8/ML!F08F'D@```.F%`P``9F:09I`/M]5(:<JP
+M!```0@^V1#$SA,`/A;\```!(BX.0"0``2(L$T,9`)`!!BY0DE````$C!ZA1-
+MA?\/E<`/ML"%P@^$/`,``$(/MD0Q,T&(AY(```!!#[:'J0```*@"#X0?`P``
+MO0````!)@[^P`````'0-J`%U"4F+K[````#K(4B+LR`*``"Z`0```$R)_T'_
+ME[@```"%P'0'2(NK(`H``$&#?"0T``^$U@(``$F+7"1(D$B+?0B+50!(B=[H
+M`````(M%`$@!PTB-101(@\40@S@`=-[IJ0(``#P"#X58`@``#[?]2&G_L`0`
+M`$J-?#=`OG\```!`(C?&1"0#`,9$)`(`QD0D`0`/M\5(:<"P!```0HM$,#B)
+M1"0$2(U,)`0/ME0D!,'B&`^V00'!X!`)P@^V00+!X`@)P@^V00-!B=5!"<5`
+M@/YQ=C!!@_T!=@L/MD<!@^`/B$0D`T&#_0)V"`^V3P*(3"0"08/]`W9-#[9_
+M`T"(?"0!ZT)!@_T"=@L/MD<"@^`/B$0D`T&#_0=V*P^V1P>#P`A!.<5$#T?H
+M08/]#'8(#[9/#(A,)`)!@_T-=@D/MG\-0(A\)`$/M_5(BX.0"0``2(L,\(!Y
+M,``/E<!%A>T/E<(/ML"%PG1)QD$D($B+@Y`)``!(BP3P1#AH,',%1`^V:#`/
+MM\U(BX.0"0``2(L$R$B#>%``="Q(BWA01(GJ2&GQL`0``$J-=#9`Z`````#K
+M$@^WQ4B+DY`)``!(BP3"QD`D(H!\)`,$=1(/M\5(BY.0"0``2(L$PL9`)`))
+M.5PD*`^5P$V%_P^5P@^VP(7"#X08`0``0?:$))8````0=%,/M\5(:<"P!```
+M0@^V1#`S08B'D@```$'VAZD````"=#)$B>A%.&PD,',&00^V1"0PA,!T'DF+
+MOZ`````/MM`/M_5(:?:P!```2HUT-D#H``````^V1"0#@_@+=UV)P/\DQ0``
+M``!!QH>J`````>F:````@'PD`@0/E,"`?"0!`@^4P@^VP"'0@_@!&<"#X/&#
+MP!%!B(>J````ZW%!QH>J````$.MG0<:'J@````OK74'&AZH````&ZU-!QH>J
+M````#>M)/"AU'T$/MD5[_\A!B$5Z#[?52(N#D`D``$B+!-#&0"2!ZR8\"'4*
+MOQ`G``#H``````^WQ4B+DY`)``!(BP3"QD`D(69FD&9FD$B+7"082(ML)"!,
+MBV0D*$R+;"0P3(MT)#A,BWPD0$B#Q$C#9F9FD&9FD&9FD&9FD%532(/L"$B)
+M^TB)_4B+!XN`4`$``(D%`````(G&2(L'B;!0`0``]\8`__\`=`A(B>_H.NG_
+M_TB+`XN`4`$``(D%`````(G&2(L#B;!0`0``]\8`__\`=<ZX`````$B#Q`A;
+M7<-F9F:09F9FD&9F9I!!5T%6055!5%532(/L2$B)_4B)?"0X1`^WISH2``!(
+MBP>+@$`!``")!0````!F)?\/9HF'.A(``+@`````9D0YISH2```/A"P'``!F
+M@;\Z$@``_P\/A*H&``!F1#FG.A(```^$G`8``$B-A^@```!(B40D&$B-E_@`
+M``!(B50D$$B)5"0(2(D4)&9F9I!F9I!(BXWP$```0?_$9D0YI3X2``"X````
+M`$0/1N!!#[?42(N%4!$``(MTD`3WQ@``"``/A*$```!(BT4`BX!0`0``B04`
+M````B<)(BT4`B9!0`0``NP````#WP@#__P!T4;X`````@'U#`'1&B==F1`^V
+M14,/M]:-2@A(B?A(T_BH`74-C4H02(GX2-/XJ`%T%`^WQDAIP*@```!(C9PH
+MH`$``.L-_\9F03GP=\=F9I!FD$B%VW402(M\)#CH`````)#IH04``$B+?"0X
+MZ`````"(0P_ICP4``$&)]69!@>7_#T$/M\5(:="P!```2(M\"B!(BY60"0``
+M3(LTPDV%]@^$8@4``/?&```@``^$D0$``$&`?B2!#X5E`0``0<9&)"%)#[=6
+M,DB+A9`)``!(QP30`````$$/MTXRB<AFP>@%#[?`@^$?N@$```!(T^)(B='W
+MT2&,A9@)``!!#[=.,HG(9L'H!0^WP(/A'[H!````2-/B2(G1]]$A3(5<00^W
+M=C)(C;U8#P``Z`````!)@[Z``````'0/28VV@````$B)[^@`````9D&!?B"%
+M``^'S@```$D/MT8@@+PH0`@``/\/A+L```!F08-^(']W)T@/MH0H0`@``$B+
+ME1@)``!(:<"(`0``2(M$$$B`>`C_=6'IC````&9!@7X@@0!W*4D/MT8@2`^V
+MA"A`"```2(N5:`D``$AIP,@/``!(BT00"(!X"/]U+.M:20^W1B!(#[:$*$`(
+M``!(BY5`"0``2&G`T````$B+A!"(````@'@(_W0P3(GV2(GOZ`````!(BX7H
+M````3(EP"$F)!DB+3"0828E."$R)M>@```#IZ`,``&:028U&$$B+3"002(M1
+M"$B)00A)B4X02(E0"$B)`NG%`P``1(GH9L'H!0^WP(M$A5Q$B>F#X1](T_BH
+M`0^%I@,``$$/M]5(BX60"0``2(L$T&:!>""%``^'LP```$@/MU`@@+PJ0`@`
+M`/\/A*````!F@W@@?W<B2`^VA"I`"```2(N5&`D``$AIP(@!``!(BT002`^V
+M4`CK?$$/M]5(BX60"0``2(L$T&:!>""!`'<G2`^W0"!(#[:$*$`(``!(BY5H
+M"0``2&G`R`\``$B+1!`(#[90".L^00^WU4B+A9`)``!(BP302`^W0"!(#[:$
+M*$`(``!(BY5`"0``2&G`T````$B+A!"(````#[90".L%NO____^`^O]T#0^V
+MPH"\*,8(``#_=49$B>AFP>@%#[?`BT2%7$2)Z8/A'TC3^*@!#X6B`@``0<9&
+M)`:^`````$R)]^@`````N@````!,B?9(B>_H`````.E[`@``#[;"2`^VG"C&
+M"```2&G;J````$B-G"N@`0``2(7_=`CWQ@```@!U!;\`````]D,*`@^$@0$`
+M`$$/M_5(B?I(B=_H`````$2)Z&;!Z`4/M\"+1(5<1(GI@^$?2-/XJ`$/A18"
+M``!!@'XD@0^%D0```$D/MU8R2(N%D`D``$C'!-``````00^W3C*)R&;!Z`4/
+MM\"#X1^Z`0```$C3XDB)T??1(8R%F`D``$$/MW8R2(V]6`\``.@`````3(GV
+M2(GOZ`````!)@[Z``````'0/28VV@````$B)[^@`````2(N%Z````$R)<`A)
+MB09(BTPD&$F)3@A,B;7H````Z7H!``!!OP````#&1"0@`$B+A?@```!(.40D
+M$'022(V5^````$'_QTB+`$@YPG7U183_=#Q(BUPD"$B)W^@`````2(U(\$B+
+M4PA(B4,(2(D82(E0"$B)`DPY\;@!````#[94)"`/1-"(5"0@0?[/=<F`?"0@
+M``^%`P$``$F-1A!(BTPD$$B+40A(B4$(28E.$$B)4`A(B0)$B>AFP>@%#[?`
+M1(GI@^$?N@$```!(T^()E(6<````Z<,```!!#[?U2(GZ2(G?Z`````!!OP``
+M``#&1"0@`$B+A?@```!(.40D$'022(V5^````$'_QTB+`$@YPG7U183_=#M(
+MBQPD2(G?Z`````!(C4CP2(M3"$B)0PA(B1A(B5`(2(D"3#GQN`$````/MDPD
+M(`]$R(A,)"!!_L]UR8!\)"``=4)!@'XD@70[28U&$$B+3"002(M1"$B)00A)
+MB4X02(E0"$B)`D2)Z&;!Z`4/M\!$B>F#X1^Z`0```$C3X@F4A9P```!F1#FE
+M.A(```^%C/G__TB-A?@```!(B<)(.87X````=%-!O`$```!F9I!(B=-(B=?H
+M`````$B-</`/MTXRB<AFP>@%#[?`@^$?3(GB2-/B2(G1]]$AC(6<````N@``
+M``!(B>_H`````$B)VD@YG?@```!UMDB)[^@`````N`$```!(@\1(6UU!7$%=
+M05Y!7\-F9F:09F:09F:02(/L*$B)7"0(2(EL)!!,B60D&$R);"0@9L=$)`8`
+M`$B+K]`(``!!O`````!,C6PD!DB+10"+@%`!``")!0````!(BU4`B8)0`0``
+MA<!T(4B+10#'@%`!```!````26/<2(GOZ`````!!B$0=`&9FD$B!Q0`4``!!
+M_\1!@_P!?K&`?"0&`'4,N`````"`?"0'`'0%N`$```!(BUPD"$B+;"003(MD
+M)!A,BVPD($B#Q"C#9F9FD&9F9I!F9F:09F:005=!5D%505154TB#[`A(B?U)
+MB?6Y`````&8/MD=#B<9F@_@`=AM)#[95#69FD&:02(G02-/XJ`%U!__!9CG.
+M=^])@WU``'0@28MU0$B!QI````!(BWTHZ`````!)BW5`2(GOZ`````!)C45@
+M2(G"23E%8`^$9P$``$F)QF9F9I!(B=?H`````$B)PTB#>#@`#X0N`0``@'A[
+M``^$H````$&\`````&:#?5@`#X2/````0;\!````26/42(N%D`D``$B+--!(
+MA?9T9@^W1B!F.T,P=5QF/84`=U8/M\"`O"A`"```_W1)2(M5``^W1C)FP>@%
+M#[?`C02%``,``(F"<`$``$B+10`/MTXR@^$?3(GZ2-/BB9!T`0``QD8D(;H`
+M````2(GOZ`````!F9I!FD$'_Q`^W15A$.>`/CW?___](BT,X2,=`8`````#V
+M0T0$=2/^A>\3``!(B>_H`````$B+0S@/MG`!N@$```!(B>_H`````$B+0S@/
+MME`"#[9P`4C'QP````"X`````.@`````2(M3.$B+M=`(``"_`0```.@`````
+M2(M3.$B+M=`(``"_!@```.@`````2,=#.`````!!_DT.2(G>2(GOZ`````!,
+MB?)-.75@#X6@_O__2<=%0`````!(BT4`BXA8`0``B0T`````A<ET"DB+10")
+MB%@!``!(@\0(6UU!7$%=05Y!7\-F9F:09F9FD&9FD$%455-(B?U)B?2[````
+M`(!_0P!V'D@/ME8-9F:09F:02(G0B=E(T_BH`74'_\,X74-W[4'V1"0,`G4,
+M28U$)&!).40D8'5I3(GGZ`````"$P'102(GOZ`````!(B<9(A<!T34F-1"1@
+M2(M0"$B)<`A(B09(B58(2(DR0?Y$)`Y,B69(QD9`!<9&00#&1GD/N0$```"Z
+M`0```$R)Y^@`````ZPT/MO-(B>_H`````&:06UU!7,-F9F:09F9FD&9FD$B#
+M["A(B1PD2(EL)`A,B60D$$R);"083(ET)"!)B?U)B?1,B[:(````#[961TB)
+M_DR)]^@`````2(G%9D&#3"1.$+L`````9D$/MD5#B<9F@_@`=AY)#[96#69F
+MD&9FD$B)T(G92-/XJ`%U!__#9CG>=^UF@_L#=B=(C02=`````"7\_P,`28M5
+M`(N$`M`!``")!0````"I```0`'4WZR5(C02=`````"7\_P,`28M5`(N$`M`!
+M``")!0````"I```0`'40#[;S3(GOZ`````#IFP$``$F-1F!).49@#X2-`0``
+M2(7M#X2$`0``2`^V17E)QT3$6`````!(BU4(2(M%`$B)4`A(B0)(B>J^!@``
+M`$R)]^@`````@'U[`'09D$R)[^@`````OP$```#H`````(!]>P!UZ$B#?3@`
+M=%-(BT4X2,=`8`````#V140$=0]!_H7O$P``3(GOZ`````!(BU4X28NUT`@`
+M`+\!````Z`````!(BU4X28NUT`@``+\&````Z`````!(QT4X`````$'^3@Y(
+MB>Y,B>_H`````$F+10"+D%@!``")%0````"%TG0*28M%`(F06`$``$'&1"1"
+M`&9!@V0D3N^[`````$&`?"0[`'0A9D$/ME0D.P^WPTF+;,182(7M=`:`?4+_
+M=7W_PV8YVG?F0?9$)$Z`=`U,B>9,B>_H`````.MANP````!!@'PD.P!T0F9F
+M9I`/M\-)BVS$6$B%[70C]D5$`G0=2(M5.$F+M=`(``"_!@```.@`````@&5$
+M_69F9I#_PV9!#[9$)#MF.=AWPF9!QT0D3@(`08!D)$G]9F9FD$B+'"1(BVPD
+M"$R+9"003(ML)!A,BW0D($B#Q"C#9F:02(/L"$B+AH@```"Y`````(!_0P!V
+M&T@/ME`-9F:09I!(B=!(T_BH`74'_\$X3T-W[\9&0@SH`````$B#Q`C#D$%5
+M05154TB#[`A)B?R)];L`````2(T$K0````!)B<5!@>7\`P``OQ`G``#H````
+M`$"`_0-V&TF+!"1"BX0HT`$``(D%`````*D``!``=23K&4F+!"1"BX0HT`$`
+M`(D%`````*D``!``=0G_PV:!^_,!=K-`#[;U3(GGZ`````!,B>?H`````(GJ
+M#[;"2&O`:$P!X/:`:!(```%T#TB+L$@2``!,B>?H`````$B#Q`A;74%<05W#
+M9F9FD&9FD&9FD$B#["A(B5PD"$B);"003(ED)!A,B6PD($B)%"1,BR</M_9)
+MBX0DD`D``$B+'/!!O0````"]`````&:!>SCA`74?#[9#.H/H$3P!=Q1(BV]`
+M2(72=4K&15$`ZT1F9I!FD$F+E"08"0``3(VJ>(8!`&:!>R"%`'<92`^W0R!*
+M#[:$($`(``!(:<"(`0``3(TL`DB#/"0`=0A!QH7@`````(![)(%U"X!G#/=F
+M9F:09F:02(,\)``/A?L```#&0R0`]H.6````(`^$%@(``$B+:VA(A>T/A`D"
+M``#VA:D````"="1(@[V@`````'0:2(-[2`!T$TB+O:````"+4S1(BW-(Z```
+M``!!#[9%:L'@"$B828N4),`0``"+A`)`"```B04`````B<+!ZA"(E9L```#!
+MZ!AFB860````00^V16K!X`A(F$F+E"3`$```BY0"1`@``(D5`````&8/ML)F
+MB864````#[;&9HF%E@```(G0P>@09@^VP&:)A9@```#!ZAB(E9H```!!#[9%
+M:L'@"$B828N4),`0``"+A`),"```B04`````9@^VP&:)A9(```#I+`$``(![
+M)(!U!,9#)"%(BS0D2,?'`````+@`````Z`````!F@7LXX0%U&`^V0SJ#Z!$\
+M`7<-2(GOZ`````#I[0```/9$)`,!='F+0S@E____`#WA`0X`=&I!#[9%:L'@
+M"$B828N4),`0``"+A`)`"```B04`````00^V16K!X`A(F$F+E"3`$```BX0"
+M1`@``(D%`````$$/MD5JP>`(2)A)BY0DP!```(N$`D@(``")!0````!(B=Y,
+MB>?H`````.MM@'PD`P!Y)$F+!"2+@%@!``")!0````")P87`=%!)BP0DB8A8
+M`0``ZT1FD(`\)`!X/(!\)`<`>35)BQ0D#[=#,F;!Z`4/M\"-!(4``P``B8)P
+M`0``28L4)`^W2S*#X1^X`0```$C3X(F"=`$``$B+7"0(2(ML)!!,BV0D&$R+
+M;"0@2(/$*,.0D)"0D$B#["A(B5PD"$B);"003(ED)!A,B6PD($B)\TF)_$0/
+MMFXD2(N7&`D``$B-JGB&`0!F@7X@A0!W&4@/MT8@2`^VA#A`"```2&G`B`$`
+M`$B-+`)%A.UU(&;'A<```````(![.!QU$8![.@)U"TB)WDB)[^@`````2(-[
+M>`!T$DB-<WA,B>?H`````&9FD&9FD$B)WDR)Y^@`````08#]!G0]2(V=6`$`
+M`$F+?"0H2(G>Z`````#'A5@!``"`A!X`2,>%:`$```````!(B:UP`0``28M\
+M)"A(B=[H`````$B+7"0(2(ML)!!,BV0D&$R+;"0@2(/$*,-F9I!F9I!F9I!(
+M@^PH2(D<)$B);"0(3(ED)!!,B6PD&$R)="0@2(G]2(7_#X3#````2(M'2$R+
+M*$R)[^@`````2(G#3(UP6$B%P`^$I````$R)[^@`````28G$2(7`=1!(B=Y,
+MB>_H`````.F$````QD,EK`^W13!FB4,@3(EK*,>#E`````@```!,B6-X28M$
+M)!!(B4-(QT,T``@``$B-A>0```!(B4-0QD,P($C'@Z``````````QD,X',9#
+M.0'&0SH"QD,[",9#/`"^`````$R)]^@`````BU,T28MT)!A,B??H`````$B)
+MWDR)[^@`````2(L<)$B+;"0(3(MD)!!,BVPD&$R+="0@2(/$*,-F9F:09F9F
+MD$%7059!54%455-(@^P(28G_28GU08G62(M'2$B+*$&\`````$2)X@^VP@^V
+MA"A`"```//]T2P^VP$AIV(@!``!(B=](`[T8"0``2(''S````+H(````28UU
+M#.@`````A,!T'DB+A1@)``!$B+0#!@$``$B+A1@)``!,B;P#&`$``$'^Q'F>
+M2(/$"%M=05Q!74%>05_#9F9FD&9F9I!F9I!(@^Q(2(E<)!A(B6PD($R)9"0H
+M3(EL)#!,B70D.$R)?"1`2(E\)!!,BW9(00^V1@)!B<5!P>4(9D$/MD8#00'%
+M00^WQ8/`!`^W5C0YT`^/VP```$F-7@A!OP````!!#[?%2HU$,`1(.=@/AK``
+M``"0#[8#A,`/B(4```"#X`\\!G5^]D,#P'0&]D,%P'5R]@,0=#!(C6L(0;P`
+M````@'L$`'9=#[93`TB)[DB+?"00Z`````!(@\4<0?_$1#AC!'?BZSU(C6L$
+M0;P`````@'L"`'8M00^VQXE$)`QF9I!FD(M4)`Q(B>Y(BWPD$.@`````2(/%
+M'$'_Q$0X8P)WXF:00?_'2`^V0P%(C5P8`D$/M\5*C40P!$@YV`^'4?___[X!
+M````2(M\)!#H`````$B+7"082(ML)"!,BV0D*$R+;"0P3(MT)#A,BWPD0$B#
+MQ$C#9F9FD&9F9I!F9F:09F:008G+2(M'2$R+"+D`````1(T4%@^VP4(/MH0(
+M0`@``#S_=#T/ML!)BY$8"0``3&G`B`$``$$XM!`&`0``=2)).;P0&`$``'48
+M18B4$`4!``!)BX$8"0``18B<``0!``"0_L%YK_/#9F9FD&9FD&9FD$B+?U"`
+MO\````!/=S=(#[:'P````$B-!$!(P>`$C106B)0XR0```$@/MH?`````2(T$
+M0$C!X`2(C#C(````_H?`````\\-F9F:09F:09F:005=!5D%505154TB#[`A)
+MB?](BTY(#[9!`L'@"&8/ME$#`=`/M\"#P`0/MU8T.=`/CP4!``!(C5$(QD0D
+M!P!!O@`````/MDD!#[9"`@!$)`=(#[9"`TB-5`($0?_&1#CQ<^9(B=5!O0``
+M``!!O@````!$.G0D!P^#I@```&9F9I`/MDT!00'-#[9%`#P!#Y3"/!</E,`)
+MT*@!=#5$B>LHRT0XZW-K08U&`40/MN!F9I`/MDT`#[;S1(GB3(G_Z`````#_
+MPT0XZW+GZT5F9I!FD$F+1U"`N,$````!=#-$B>LJ70%$..MS*$&-1@%$#[;@
+M#[9-``^V\T2)XDR)_^@`````_\-$..MRYV9F9I!F9I!(@\4$0?_&1#IT)`</
+M@E[___])BT=0QH#!`````;X'````3(G_Z`````!(@\0(6UU!7$%=05Y!7\-F
+M9F:09F:02(/L*$F)^4&X_____TB)Y_RY`@```+@`````\TBKQP<`````9CGQ
+M<U5F9F:09F:09H/Y#G<+#[?10@^V!`J(!!0/M\%"#[8$"(/H,#P)=R%!@/C_
+MN`````!$#T3`00^VP&O`"@^WT4("!`I$C4#0ZP9!@/C_=0?_P68Y\7*R00^V
+MP$B#Q"C#9F:09F:09F:008G12(M'2$R+`+H`````D`^VPD(/MH0`0`@``#S_
+M=#`/ML!)BX@8"0``2&G`B`$``$@YO`@8`0``=15`.+0(!0$``'4+1(B,"`<!
+M``##9I#^PGF\\\-F9F:09F:09F:0055!5%532(/L"$F)]4&)U$B+;U"[````
+M`&9F9I!F9I!(8\-(C01`2,'@!$B-C"C`````#[91"(#Z`0^7P(#Z%P^5P@^V
+MP(7"=#9$.&$)=3!!#[95`X#Z(;@@````#T/02&/[2(T\?TC!YP1(C;POV```
+M``^VTDF-=03H`````)#_PX/[3WZ92(/$"%M=05Q!7<-F9F:09F9FD&9FD&9F
+MD$%7059!54%455-(@^PH2(E\)"!!O0````!(BT9(2(E$)!@/MD`"B<'!X0A(
+MBU0D&&8/MD(#`<$/M\&#P`0/MU8T.=`/CQ<!``!,BV0D&$F#Q`C&1"07``^W
+MP4B+5"082(U$$`1,.>`/AN0````/M\%(C400!$B)1"0(#[?)2(D,)$$/MD0D
+M`L'@"&9!#[94)`-$C30"00^W]DF-?"0$Z``````\_W5I08G%00^WQDJ-7"`$
+M2#E<)`AV;4B+!"1(BU0D&$R-?!`$#[9#`L'@"&8/ME,#C2P"#[?U2(U[!.@`
+M````//]U#D&`_?]U.D&]`````.LR1#CH1`]"Z`^WQ4B-7!@$23G?=[_K'&9F
+MD&:0B<)$*.H/MM(/MG0D%TB+?"0@Z``````/ME0D%TR)YDB+?"0@Z`````#^
+M1"0700^WQDZ-9"`$3#ED)`@/AS#___^^`@```$B+?"0@Z`````!(@\0H6UU!
+M7$%=05Y!7\.04TB)^TB+3D@/MD$"P>`(9@^V40,!T`^WP(U0!`^W1C0YPG\?
+M2(N_(`$``$ACTDB)SN@`````O@````!(B=_H`````%O#9F9FD&9F9I!F9I!(
+M@^PX2(E<)`A(B6PD$$R)9"083(EL)"!,B70D*$R)?"0P28GU28G^#[9&)(A$
+M)`=F@7X@A0`/AZL```!(#[=&(("\.$`(``#_#X28````9H-^(']W*D@/MH0X
+M0`@``$B+EQ@)``!(:<"(`0``2(M$$$A(#[9`"$@%P`@``.MMD&:!?B"!`'<N
+M2`^W1B!(#[:$.$`(``!(BY=H"0``2&G`R`\``$B+1!`(2`^V0`A(!<`(``#K
+M-D@/MT8@2`^VA#A`"```2(N70`D``$AIP-````!(BX00B````$@/MD`(2`7`
+M"```ZP6XOPD``$T/MGP&!DUI_Z@```!/C;PWH`$``$F+EA@)``!(C:IXA@$`
+M9D&!?2"%`'<920^W12!*#[:$,$`(``!(:<"(`0``2(TL`H!\)`<`#X4T`@``
+M9L>%P```````08!].!P/A2`"``!!#[9%.H/X`G11@_@"?PJ#^`%T)^D'`@``
+M@_@'9F9FD'0I@_@*#X7U`0``3(GN2(GOZ`````#IY0$``$R)[DB)[^@`````
+MZ=4!``!,B>Y(B>_H`````.G%`0``3(GN2(GOZ`````!(C9U8`0``2(M%2$B+
+M`$B+>"A(B=[H`````,>%6`$``("$'@!(QX5H`0```````$B)K7`!``!(BT5(
+M2(L`2(MX*$B)WN@`````D,9%0O]!O`````!!@'\.``^&KP```$F-7V!F9F:0
+M9F:02(G?Z`````!(B<5(BT,(2(EK"$B)70!(B44(2(DH@'U"_W1L@'U!`'5M
+M@+WA``````^$&0$``$@/MD5`J`)T#*@$=`BH`0^%T@```$@/MD5`J`)U#*@$
+M=`BH`0^%T@```$@/MD5`J`(/A.(```"H!`^$V@```*@!#X72````2(GN3(GW
+MZ`````#IP@```&:0QH7A`````$'_Q$4X9PX/AUS___]%.&<.=5=!O`````!!
+M@'\.`'9*28U?8&9FD&:02(G?Z`````!(B<5(BT,(2(EK"$B)70!(B44(2(DH
+M@'U"_W04#[9%03PB#Y3"/`T/E,`)T*@!=4I!_\1%.&<.=[]!QD<)_TR)_DR)
+M]^@`````@'PD!P`/A84```#K,@^V57E(BW502(GI3(G_Z`````#K'4B)[DR)
+M]^@`````9I#K#KX*````2(GOZ`````"028-]>`!T#$F-=7A,B??H`````$R)
+M[DR)]^@`````@'PD!P!T+&;_A<````!F@[W`````"G8.9L>%P```````Z4S^
+M__^^"@```$B)[^@`````2(M<)`A(BVPD$$R+9"083(ML)"!,BW0D*$R+?"0P
+M2(/$.,-F9F:09F9FD&9F9I!(@^PX2(E<)`A(B6PD$$R)9"083(EL)"!,B70D
+M*$R)?"0P2(G]08GW2(M'2$R+*$R)[^@`````2(G#3(UP6$B%P`^$I````$R)
+M[^@`````28G$2(7`=1!(B=Y,B>_H`````.F$````QD,EK`^W13!FB4,@3(EK
+M*,>#E`````@```!,B6-X28M$)!!(B4-(QT,T``@``$B-A>0```!(B4-0QD,P
+M($C'@Z``````````QD,X',9#.0%$B'LZQD,[",9#/`"^`````$R)]^@`````
+MBU,T28MT)!A,B??H`````$B)WDR)[^@`````2(M<)`A(BVPD$$R+9"083(ML
+M)"!,BW0D*$R+?"0P2(/$.,-FD$B#[#A(B5PD"$B);"003(ED)!A,B6PD($R)
+M="0H3(E\)#!)B?U(BT=(3(LP2(N7(`$```^V0@*)P\'C"&8/MD(#`<,/M\.#
+MP`0]``@```^/S@```$R)]^@`````2(G%2(7`#X2Z````3(GWZ`````!)B<=(
+MA<!U$$B)[DR)]^@`````Z9H```!,C6582(MX$`^WVX/#!$ACTTF+M2`!``#H
+M`````,9%):Q!#[=%,&:)12!,B74HB5TT@XV4````$DF+1Q!(B45(3(E]>$F-
+MA>0```!(B450QD4P($C'A:``````````QD4X'<9%.1#&13H"#[;'B$4[B%T\
+MO@````!,B>?H`````(M5-$F+=QA,B>?H`````$B)[DR)]^@`````2(M<)`A(
+MBVPD$$R+9"083(ML)"!,BW0D*$R+?"0P2(/$.,-F9F:09F9FD&9FD%-)B=)!
+MB<M(BT=(3(L`3(M/4+L`````#[;#0@^VE`!`"```@/K_=%@/ML))BX@8"0``
+M2&G`B`$``$@YO`@8`0``=3U`.+0(!0$``'4S183;=`U(BX0($`$``$F)`NLE
+M#[;"28N(&`D``$AIP(@!``!)BQ)(B90($`$``.L'9F:0_L-YD[L`````9F9F
+MD&9FD`^VPTB-!$!(P>`$2HT\"$B-C\`````/ME$(@/H!#Y?`@/H7#Y7"#[;`
+MA<)T,T`X<0EU+46$VW0,2(N'T````$F)`NLC#[;#2(T$0$C!X`1)BQ)*B90(
+MT````.L+9F9FD/_#@/M/=IE;PV9F9I!F9I!(@^PH2(E<)`A(B6PD$$R)9"08
+M3(EL)"!)B?R)\4B+ER`!```/MD("B<?!YPAF#[9"`P''#[?'@\`$/0`(``!_
+M9$"$]G0.00^VA"0(`0``B$(!ZPP/MD(!08B$)`@!``!(C4((2(D$)+L`````
+M#[?'2(U$$`1(.P0D=BI$#[;I#[?'2(UL$`0/MO-$B>E(B>),B>?H`````/_#
+M2(,$)`1(.RPD=^)(BUPD"$B+;"003(MD)!A,BVPD($B#Q"C#9I!(@^P82(E<
+M)`A(B6PD$$B)^XG52,<$)`````"`?T,!=#]`#[;VN0$```!(B>+H`````$B#
+M/"0`="=(BP0D@`B`0(3M=`M(BP0D@$@#(.L)D$B+!"2`8`/?2(G?Z`````!(
+MBUPD"$B+;"002(/$&,.02(/L&$B)'"1(B6PD"$R)9"002(GS28G\2(MN:&:!
+M?B"%``^'F````$@/MT8@@+PX0`@``/\/A(4```!F@WX@?W<B2`^VA#A`"```
+M2(N7&`D``$AIP(@!``!(BT002`^V4`CK86:!?B"!`'<G2`^W1B!(#[:$.$`(
+M``!(BY=H"0``2&G`R`\``$B+1!`(#[90".LR2`^W1B!(#[:$.$`(``!(BY=`
+M"0``2&G`T````$B+A!"(````#[90".L(9F:0NO____^Y_____V:!>R"%`'<.
+M2`^W0R!"#[:,($`(``"`^O]T(0^VPD*`O"#&"```_P^4PH#Y_P^4P`G0J`%U
+M!H![)`9U.DB#>W@`=!-(C7-X3(GGZ`````!F9F:09F:02(G>3(GGZ`````#'
+M15#_____2(GO_U5(ZW9F9I!F9I"`>R0`=3OV@Y0````(9F:0=!!(BWTPBU,T
+M2(MS2.@`````QT50`````$B#?3@`=`E(BU4XBT4@B0)(B>__54CK#\=%4/__
+M__](B>__54AFD$B#>W@`=`Q(C7-X3(GGZ`````!(B=Y,B>?H`````&:02(L<
+M)$B+;"0(3(MD)!!(@\08PV9F9I!F9I!F9I!F9I!(@^Q(2(E<)!A(B6PD($R)
+M9"0H3(EL)#!,B70D.$R)?"1`2(G]08G708G.3(E$)`A`B'0D%TB+1TA,BRA,
+MB>_H`````$B)PTB-0%A(B00D2(7;#X38````3(GOZ`````!)B<1(A<!U$$B)
+MWDR)[^@`````Z;@```#&0R6L#[=%,&:)0R!(BU0D"$B)4VA,B6LHQX.4````
+M"````$R)8WA)BT0D$$B)0TA$B7,T2(V%Y````$B)0U#&0S`@2,>#H```````
+M``#&0S@\QD,Y`@^V1"07B$,Z1(GXP>@0B$,[3(GZ#[;&B$,\1(A[/42)\,'H
+M$(A#/DR)\@^VQHA#/T2(<T#&0T$`O@````!(BSPDZ`````"+4S1)BW0D&$B+
+M/"3H`````$B)WDR)[^@`````2(M<)!A(BVPD($R+9"0H3(ML)#!,BW0D.$R+
+M?"1`2(/$2,-F9F:09F:09F:09F:02(/L2$B)7"082(EL)"!,B60D*$R);"0P
+M3(ET)#A,B7PD0$F)_(G308G.3(E$)`A`B'0D%TB+1TA,BSA,B?_H`````$B)
+MQ4B%P`^$[@```$R)_^@`````28G%2(7`=1%(B>Y,B?_H`````.G.````D$B-
+M15A(B00D28M]$$2)\DF+M"0@`0``Z`````#&126L00^W1"0P9HE%($B+5"0(
+M2(E5:$R)?2A$B74T@XV4````$DF+11!(B45(3(EM>$F-A"3D````2(E%4,9%
+M,"!(QX6@`````````,9%.#O&13D"#[9$)!>(13J)V,'H$(A%.P^VQXA%/(A=
+M/42)\,'H$(A%/DR)\@^VQHA%/T2(=4#&14$`O@````!(BSPDZ`````"+531)
+MBW482(L\).@`````2(GN3(G_Z`````!(BUPD&$B+;"0@3(MD)"A,BVPD,$R+
+M="0X3(M\)$!(@\1(PTF)T4B%_P^4PDB%]@^4P`G0J`%U$DV%R0^4PDB%R0^4
+MP`G0J`%T";@`````PV9FD&9!@?B%`'<.00^WP("\.$`(``#_=0:X`````,-!
+MQD$XX4'&03D!0<9!.A-F18E!($F)<2A)B8F@````N`$```##9F9FD&9F9I!F
+M9F:09F:02(M'"(M`!(D%`````(G"@<H```P`)?__\_]`A/:)T0]$R$B+1PB)
+M"$B+1PB)2`Q(BT<(B4@02(M'"(E(%$B+1PB)2!A(BT<(B4@$PY"0D)!,BU0D
+M($R+7"0P#[?'/1$G``!_0#T0)P``#XV!````/2(A``!T>CTB(0``9F:09I!_
+M$#T@(0``=&=F9F:09F:0ZV0]0"$``'17/40A``!FD'1.ZU(]@"<``&9F9I!F
+M9I!T/CV`)P``?PPM("<``(/X`G<SZRL]@)$``'0D/8"1``!_#SV")P``=!9F
+M9I!F9I#K%#V`E```=0UF9F:09F:0Q@9`Q@("Q@$$#[862(M$)!B($&9!QP*`
+M`&9!QP,``$'&`2!(BT0D"&;'```!#[862(M$)!"($&8/M@9F00,"9D$#`TB+
+M5"0H9HD"9D&)`$$/MQ)(BT0D.&:)$$$/MQ*#P@M(BT0D0&:)$,-F9I!FD$%7
+M059!54%455-(@^P828G_28G60(AT)!=(BR^[`````&:#?5@`#X:'`@``9F9F
+MD(G89L'H!0^WP(N$A9P```")V8/A'TC3^*@!#X57`@``#[?32(N%D`D``$B+
+M#-!(A<D/A$`"``"^`````(M!."7___\`/>$!$``/A<$```!-A?8/A1\"``!F
+M@7D@A0`/AYX```!(#[=!(("\*$`(``#_#X2+````9H-Y(']W)4@/MH0H0`@`
+M`$B+E1@)``!(:<"(`0``2(M$$$@/ME`(Z54!``!F@7D@@0!W*D@/MT$@2`^V
+MA"A`"```2(N5:`D``$AIP,@/``!(BT00"`^V4`CI(P$``$@/MT$@2`^VA"A`
+M"```2(N50`D``$AIP-````!(BX00B`````^V4`CI]@```+K_____Z>P```!F
+M9F:09H%Y((4`#X>5````2`^W02"`O"A`"```_P^$@@```&:#>2!_=R)(#[:$
+M*$`(``!(BY48"0``2&G`B`$``$B+1!!(#[90".M>9H%Y(($`=R=(#[=!($@/
+MMH0H0`@``$B+E6@)``!(:<#(#P``2(M$$`@/ME`(ZR](#[=!($@/MH0H0`@`
+M`$B+E4`)``!(:<#0````2(N$$(@````/ME`(ZP6Z_____V:!>2"%`'<Z2`^W
+M02"`O"A`"```_W0K2(NU&`D``&:!>2"%`'<52`^VA"A`"```2&G`B`$``$@!
+MQNL'2('&>(8!`$$X5PAU>4V%]G0+00^W1C!F.T$@=6F`?"07!G1/BU$X@>+_
+M__\`@?KA`1``=#Y(#[9&0*@"=#6H!'0QJ`%U+8"^X`````!FD'4B@?KA`0\`
+M="T/MD0D%XA!)+H!````2(G.3(G_Z`````#K$P^V1"07B$$D#[?S3(G_Z```
+M``#_PV8Y75@/AWW]__^`?"07@0^$AP$``$&\`````$B+E>@```!(C87H````
+M2#G0=`M!_\1(BQ)(.=!U]69%A>0/A%D!``!(C87H````2(G"2#F%Z`````^$
+M0@$``$F)Q4B)1"0(9F:09I!(B=-(B=?H`````$B)P4V%]G0E00^W1C!F.T$@
+M=!I(BT,(2(E+"$B)&4B)00A(B0A!_\SIY0```&:!>2"%``^'E0```$@/MT$@
+M@+PH0`@``/\/A((```!F@WD@?W<B2`^VA"A`"```2(N5&`D``$AIP(@!``!(
+MBT002`^V4`CK7F:!>2"!`'<G2`^W02!(#[:$*$`(``!(BY5H"0``2&G`R`\`
+M`$B+1!`(#[90".LO2`^W02!(#[:$*$`(``!(BY5`"0``2&G`T````$B+A!"(
+M````#[90".L%NO____]!.%<(=22+03@E____`#WA`0\`=!4/MD0D%XA!)$B)
+MSDB)[^@`````ZQ))BT4(28E-"$R)*4B)00A(B0A!_\QF187D=!)(BU0D"$@Y
+ME>@````/A<O^__](@\086UU!7$%=05Y!7\-F9F:09F9FD&9F9I!!N`````!F
+M@W]8``^&'0$``$R+CY`)``!!#[?`28L,P4B%R0^$]P```&:!>2"%``^'FP``
+M`$@/MT$@@+PX0`@``/\/A(@```!F@WD@?W<B2`^VA#A`"```2(N7&`D``$AI
+MP(@!``!(BT002`^V4`CK9&:!>2"!`'<G2`^W02!(#[:$.$`(``!(BY=H"0``
+M2&G`R`\``$B+1!`(#[90".LU2`^W02!(#[:$.$`(``!(BY=`"0``2&G`T```
+M`$B+A!"(````#[90".L+9F:09F:0NO____^X_P```&:!>2"%`'<.2`^W02!F
+M#[:$.$`(```/M\!(:<"(`0``2`.'&`D``$`X\G4:2`^V0$"H`701J`1T#;@!
+M````PV9F9I!F9I!!_\!F1#E'6`^'ZO[__[@`````PV9F9I!F9F:09F9FD$B+
+M1TA,BP!-BYB0$```0;H`````O@````!F08-X6`!V2$V+B)`)```/M]9)@SS1
+M`'0N28L,T8M!."7___\`/>$!$`!T&P^W1S!F.T$@=1%(B=!(P>`&9D8Y5!@(
+M=`MFD/_&9D$Y<%AWOV9!.7!8=`I!_\)F08/Z'W::00^WPF:0PV9F9I!F9F:0
+M9F9FD&9FD$B#?U``=!Y(BT=0Q@!P2(M'4$"(<`)(BT=0QD`'`$B+1U"(4`SS
+MPV9FD&9FD&9FD//#9F9FD&9F9I!F9I!F9I!)B?B)\DB)T8'A_P$``$B+AY`)
+M``!(@SS(`'0L2(L\R`^V1R5!#[:PW@```(GQT^!$#[?`#[?2N/__``#3X"'"
+M2(GX03G0=`6X`````//#D%532(/L"$B)]6:!?CCA`0^%K0````^V1CJ#Z!$\
+M`0^'G@```+C_````9H%^((4`=PU(#[=&(`^VA#A`"```B<!(:<#0````2(G#
+M2`.?0`D``(![1/]U3+@4````@+V8`````'0)#[:%F`````'`#[;`:<!`0@\`
+MB8.0````2,>#H`````````!(B9NH````2(VSD````$B+?RCH`````,9#1`!(
+MC4,H2(M0"$B):`A(B44`2(E5"$B)*OY#1>FH````N/\```!F@7T@A0!W#4@/
+MMT4@#[:$.$`(``")P$AIP(@!``!(B<-(`Y\8"0``BT4X)?___P`]X0$0`'1L
+M@'MX_W5,N!0```"`O9@`````=`D/MH68`````<`/ML!IP$!"#P")@R@!``!(
+MQX,X`0```````$B)FT`!``!(C;,H`0``2(M_*.@`````QD-X`$B-0R!(BU`(
+M2(EH"$B)10!(B54(2(DJ_D-[2(/$"%M=PV9F9I!F9F:09F9FD&9FD%-(B?.`
+M?GC_=!1(C;8H`0``2(M_*.@`````QD-X_UO#4TB)\X!^1/]T%$B-MI````!(
+MBW\HZ`````#&0T3_6\-(@^PH2(E<)`A(B6PD$$R)9"083(EL)"!)B?Q(B?-F
+M@7XXX0$/A=8````/MD8Z@^@1/`$/A\<```"Y_P```&:!?B"%`'<-2`^W1B`/
+MMHPX0`@``(G(2&G`T````$B)Q4D#K"1`"0``@?G_````#X1B`0``_DU%3(UM
+M*$R)[^@`````2(G!2#G8=4M(B>Y,B>?H`````$PY;2@/A#8!``#'A9``````
+M+3$!2,>%H`````````!(B:VH````2(VUD````$F+?"0HZ`````#&140`Z0`!
+M``!(C54H2(M%*$B)2`A(B0%(B5$(2(E-*$B+4PA(BP-(B5`(2(D"Z=8```"0
+MN?\```!F@7L@A0!W#D@/MT,@0@^VC"!`"```B<A(:<"(`0``2(G%20.L)!@)
+M``"+0S@E____`#WA`1``#Y7`@?G_````#Y7"#[;`A<(/A((```#^37M,C6T@
+M3(GOZ`````!(B<%(.=AU1DB)[DR)Y^@`````3#EM('1:QX4H`0```"TQ`4C'
+MA3@!````````2(FM0`$``$B-M2@!``!)BWPD*.@`````QD5X`.LG9I!(C54@
+M2(M%($B)2`A(B0%(B5$(2(E-($B+4PA(BP-(B5`(2(D"2(M<)`A(BVPD$$R+
+M9"083(ML)"!(@\0HPV:02(/L&$B)'"1(B6PD"$R)9"002(G[2(GU2`^W1C!F
+M1`^VI#A`"```00^W]$AI]H@!``!(`[<8"0``2('&(`$``.@`````2`^W53!(
+M@[S30`0```!T'DB+A--`!```2(.X@`````!U#$C'A--`!````````$@/MT4P
+MQH080`@``/]!#[?T2(V[D`\``.@`````00^WQ$B+DQ@)``!(:<"(`0``@'P0
+M:O]T#$B--!!(B=_H`````$B)[DB)W^@`````00^WQ$B+DQ@)``!(:<"(`0``
+MQD000@!(BY,8"0``QD000P%(BQPD2(ML)`A,BV0D$$B#Q!C#9F9FD&9FD&9F
+MD$%7059!54%455-(@^P(28G]08GW0;Z`````9F:09F:000^WQF9"#[:$*$`(
+M``!F/?\`#X3K````9D&!_H$`#X=\````#[?`2&G`R`\``$F)Q$T#I6@)``"]
+M`````$&`?"18``^&MP```$F-7"1(9I!(B=_H`````$B-2/!(BU,(2(E#"$B)
+M&$B)4`A(B0*+04`E`/__`#T``/\`=17V04,$=`](@WDX`'0(2(M!.$2(>`'_
+MQ4$X;"18=[7K8V9FD`^WP$AIP-````!(B<))`Y5`"0``O0````"`>CL`=D&0
+MB>D/ML%(BTS"6$B%R70DBT%`)0#__P`]``#_`'45]D%#!'0/2(-Y.`!T"$B+
+M03A$B'@!_\5`.&H[=\5F9I!FD$'_QT'_QF9!@?Z%``^&[O[__TTYK=`(``!U
+M$DF!Q0`4``!$B?Y,B>_HL_[__TB#Q`A;74%<05U!7D%?PV9F9I!32(G[2`^V
+M1EMF#[:T.$`(``#&A#A`"```_P^W]DB-OP`0``#H`````$B+N]`(``"^````
+M`.AF_O__6\-F9F:055-(@^P(2(G]2`^W1D!F#[:<.$`(``#&A#A`"```_P^W
+M\TB-O\@/``#H``````^WVTB+E4`)``!(:</0````@'P04/]T#$B--!!(B>_H
+M`````$B+O=`(``"^`````.C]_?__2(/$"%M=PV9FD&9FD+D`````NM````!(
+MB?AF9I"("$C_P$C_RG7VQD=$_\9'4/](C4<H2(E'*$B)1S##D$B#["A(B5PD
+M"$B);"003(ED)!A,B6PD($B)_4B-O\@/``#H`````+H`````A,`/A=$```!(
+MC;W(#P``Z`````!!B<6[@O___P^VPX"\*$`(``#_=1`XG>````!S#XB=X```
+M`.L'_\.`^X5VW+H`````@/N&#X2+````#[;#1(BL*$`(``!!#[?%3&G@T```
+M`$R)YT@#O4`)``#H`````$B+E4`)``!F#[;#9D&)1!1`@'U1`74/2(N%0`D`
+M`&9!QT0$3/__00^WW4B+A4`)``!(:=O0````QD0#0@!(BX5`"0``9L=$`TX`
+M`$B+O=`(``"^`````.C%_/__2(G:2`.50`D``$B)T$B+7"0(2(ML)!!,BV0D
+M&$R+;"0@2(/$*,-F9F:09F9FD&9F9I!F9I!(@^P(2`^V1@AF#[:T.,8(``#&
+MA#C&"```_P^W]DB!QS@0``#H`````$B#Q`C#9I"Y`````+J(`0``2(GX9F:0
+MB`A(_\!(_\IU]L9'>/_&1VK_QD=Z'TB-1R!(B4<@2(E'*,-F9F:09F:09F:0
+M9F:0055!5%532(/L"$B)_4B-OY`/``#H`````+H`````A,`/A3\!``!(C;V0
+M#P``Z`````!!B<6[`````&9FD&9FD`^VPX"\*$`(``#_=19F#[;#9CF%W```
+M`',-9HF%W````.L$_L-YV;H`````@/N`#X3P````#[;#1(BL*$`(``!!#[?%
+M3&G@B`$``$R)YT@#O1@)``#H`````$B+E1@)``!F#[;#9D&)1!0P2(N%&`D`
+M`$'&1`1"`$B+A1@)``!!QD0$9?](BX48"0``0<9$!&3_2(N%&`D``$'&1`1F
+M_TB+A1@)``!!QD0$:/](BX48"0``0<9$!&?_2(N%&`D``$'&1`1I_TB+A1@)
+M``!!QH0$X@````!(BX48"0``0<:$!`<!``#_2(GOZ`````!(BY48"0``28F$
+M%"`!``"`?5$!=0U(BX48"0``08!,!$0!00^WQ4AIP(@!``!(B<)(`Y48"0``
+M2(G02(/$"%M=05Q!7<-F9F:09F:09F:09F:055-(@^P(2(G]2(V_`!```.@`
+M````N@````"$P`^%&@$``$B-O0`0``#H`````(G'OH#___^)\@^VPH"\*$`(
+M``#_=1)`.+7?````<Q%`B+7?````ZPC_QD"`_H%VU[H`````0(#^@@^$SP``
+M`(GR#[;"0(B\*$`(```/M\=(:<#(#P``N0````"ZR`\``$@#A6@)``"("$C_
+MP$C_RG7V#[??2&G;R`\``$B)VD@#E6@)``!(C4(82(E"&$B)V$@#A6@)``!(
+M@\`82(E`"$B)VD@#E6@)``!(C4(H2(E"*$B)V$@#A6@)``!(@\`H2(E`"$B)
+MVD@#E6@)``!(C4)(2(E"2$B)V$@#A6@)``!(@\!(2(E`"$B+A6@)``!`B'0#
+M6TB+O=`(``"^`````.AN^?__2(G:2`.5:`D``$B)T$B#Q`A;7<-F9F:09F:0
+M9F:04TB)^TB-OS@0``#H`````+H`````A,`/A<L```!(C;LX$```Z`````")
+MQ[X`````B?(/ML*`O!C&"```_W410#AS3',30(AS3.L-9F:09I#_QD"`_@-V
+MV+H`````0(#^!`^$@0```(GR#[;"0(B\&,8(```/M\=(:<"H````N0````"Z
+MJ````$B-A!B@`0``B`A(_\!(_\IU]@^WUTAITJ@```!(`=I(C8+0`0``2(F"
+MT`$``$B)0`A(C8+H`0``2(F"Z`$``$B)0`A(C8(``@``2(F"``(``$B)0`A(
+M@<*@`0``0(AR"$B)T%O#9F:02(/L&$B)7"0(2(EL)!!(B?U(C8<(`0``N@``
+M``!(.8<(`0``="9(C;\(`0``Z`````!(B<-(B<?H`````$B)[^@`````2(E#
+M<$B)VDB)T$B+7"0(2(ML)!!(@\08PV:02(/L"$B-AP@!``!(BU`(2(EP"$B)
+M!DB)5@A(B3)(@WYP`'0,2(/&<.@`````9F:02(/$",-F9F:09F9FD&9FD$B#
+M[`A(C8<8`0``N@````!(.8<8`0``=!-(@<<8`0``Z`````#&0!``2(G"2(G0
+M2(/$",-F9F:09F9FD&9F9I!(BP9(@<<8`0``2(M7"$B)1PA(B3A(B5`(2(D"
+M2,<&`````,-F9F:09F9FD&9F9I!(@^P(2(V7*`$``+@`````2#F7*`$``'0(
+M2(G7Z`````!(@\0(PV9F9I!F9I!F9I!(BP9(@<<H`0``2(M7"$B)1PA(B3A(
+MB5`(2(D"2,<&`````,-F9F:09F9FD&9F9I!(@^P(2(V72`$``+@`````2#F7
+M2`$``'0B2(G7Z`````"^`````+F@````2(G"9I!`B#)(_\)(_\EU]4B#Q`C#
+M2(''2`$``$B+1PA(B7<(2(D^2(E&"$B),,-F9I!F9I!(@^P(2(V76`$``+@`
+M````2#F76`$``'0(2(G7Z`````!(@\0(PV9F9I!F9I!F9I!(BP9(@<=8`0``
+M2(M7"$B)1PA(B3A(B5`(2(D"2,<&`````,-F9F:09F9FD&9F9I!(@^P(2(V'
+M.`$``+H`````2#F'.`$``'072(''.`$``.@`````2,=`(`````!(B<)(B=!(
+M@\0(PV9F9I!F9F:02(L&2(''.`$``$B+5PA(B4<(2(DX2(E0"$B)`DC'!@``
+M``##9F9FD&9F9I!F9F:02(/L2$B)7"082(EL)"!,B60D*$R);"0P3(ET)#A,
+MB7PD0$B)_4F)]&:!?B"%``^'G````$@/MT8@@+PX0`@``/\/A(D```!F@WX@
+M?W<B2`^VA#A`"```2(N7&`D``$AIP(@!``!(BT002`^V0`CK96:!?B"!`'<G
+M2`^W1B!(#[:$.$`(``!(BY=H"0``2&G`R`\``$B+1!`(#[9`".LV2`^W1B!(
+M#[:$.$`(``!(BY=`"0``2&G`T````$B+A!"(````#[9`".L,9F9FD&9FD+C_
+M____#[;`3`^VM"C&"```36GVJ````$V-M"Z@`0``2(N5:`D``$R-NCBX#P!F
+M08%\)""%`'<:20^W1"0@2`^VA"A`"```2&G`R`\``$R-/`))BU0D2`^V0@&#
+M^!)T$#V1````#X0E`0``Z9`!``!)BP9(B40D"+T`````#[9""8A$)!</ME(:
+MB%0D%D&]`````$&`?@X`=C])C5Y@9I!(B=_H`````$B)Q4B+0PA(B6L(2(E=
+M`$B)10A(B2A,.7U0=0P/MD5Y03I$)"5T"I!!_\5%.&X.=\=)@WPD>`!T#TF+
+M="1X2(M\)`CH`````$R)YDB+?"0(Z``````/MI7"````C4(!B(7"````@/H#
+M=R:`?"06`'4?00^V5"0E2(MU4$&X`````+D"````3(GWZ`````#K.@^VE<(`
+M``"-0@&(A<(```"`^@)V)8!\)!8`=1[&14,"QD5"_X!E1/Y(B>Y(BWPD".@`
+M````Z:X````/MDPD%@^V5"073(G^3(GWZ`````#IE````&9F9I"Y`````$&]
+M`````$&`?@X`=CM)C5Y@2(G?Z`````!(B<%(BT,(2(E+"$B)&4B)00A(B0A,
+M.7E0=0L/MD%Y03I$)"5T"4'_Q44X;@YWR4@/MD%`J`)T&J@$=!:H`70200^V
+M5"0E2(MQ4$R)]^@`````28-\)'@`=`U)BW0D>$B)[^@`````3(GF2(GOZ```
+M``!(BUPD&$B+;"0@3(MD)"A,BVPD,$R+="0X3(M\)$!(@\1(PV9F9I!F9I!F
+M9I!F9I!(@^PH2(E<)`A(B6PD$$R)9"083(EL)"!)B?Q)B?5(BR](B>_H````
+M`$B)PTB%P'1Q2(GOZ`````!(B<)(A<!T84B->UC&0SCAQD,Y`<9#.A#&0R6[
+M9D$/MD5;9HE#($F+!"1(B4,HQT,TD````$B-0A!(B4-(2(E3>,9``0#&0A!`
+M2,>#H`````````"^`````.@`````2(G>2(GOZ`````!(BUPD"$B+;"003(MD
+M)!A,BVPD($B#Q"C#9F:09I!(@^PH2(D<)$B);"0(3(ED)!!,B6PD&$R)="0@
+M28G\28GU08G62(LO2(GOZ`````!(B<-(A<!T=4B)[^@`````2(G"2(7`=&5(
+MC7M8QD,XX<9#.0'&0SH0QD,ENV9!#[9%6V:)0R!)BP0D2(E#*,=#-)````!(
+MC4(02(E#2$B)4WC&0`$0QD(00$2(<`E(QX.@`````````+X`````Z`````!(
+MB=Y(B>_H`````$B+'"1(BVPD"$R+9"003(ML)!A,BW0D($B#Q"C#9F:09F:0
+M2(/L.$B)7"0(2(EL)!!,B60D&$R);"0@3(ET)"A,B7PD,$F)_$F)]4&)UD&)
+MSTB++TB)[^@`````2(G#2(7`#X2#````2(GOZ`````!(B<)(A<!T<TB->UC&
+M0SCAQD,Y`<9#.A!$B',E9D$/MD5;9HE#($F+!"1(B4,HQT,TD````$B-0A!(
+MB4-(2(E3>,9``9'&0A!`1(AP"42(>`I(QX.@`````````+X`````Z`````!(
+MB=Y(B>_H`````+^@A@$`Z`````!(BUPD"$B+;"003(MD)!A,BVPD($R+="0H
+M3(M\)#!(@\0XPV9FD&:02(/L.$B)7"0(2(EL)!!,B60D&$R);"0@3(ET)"A,
+MB7PD,$F)_$F)]TF)S4&)UDB++TB)[^@`````2(G#2(7`=0]!QH7A`````>F,
+M````9I!(B>_H`````$B)PDB%P'452(G>2(GOZ`````!!QH7A`````>ME2(U[
+M6,9#..'&0SD!QD,Z$$2(<R5F00^V1UMFB4,@28L$)$B)0RC'0S20````2(U"
+M$$B)0TA(B5-XQD`!$L9"$$!$B'`)2,>#H`````````"^`````.@`````2(G>
+M2(GOZ`````!(BUPD"$B+;"003(MD)!A,BVPD($R+="0H3(M\)#!(@\0XPV9F
+MD%532(/L"$B)_4B)\V:!?B"%``^'F````$@/MT8@@+PX0`@``/\/A(4```!F
+M@WX@?W<C2`^VA#A`"```2(N7&`D``$AIP(@!``!(BT002&8/MD@(ZV!F@7X@
+M@0!W*$@/MT8@2`^VA#A`"```2(N7:`D``$AIP,@/``!(BT00"&8/MD@(ZS!(
+M#[=&($@/MH0X0`@``$B+ET`)``!(:<#0````2(N$$(@```!F#[9(".L%N?\`
+M``"^_P```&:!>R"%`'<.2`^W0R!F#[:T*$`(``!F@?G_`'0<#[?!@+PHQ@@`
+M`/\/E,)F@?[_``^4P`G0J`%T$$B)WDB)[^@`````Z8@````/M\%(#[:\*,8(
+M``!(:?^H````2(V\+Z`!``!F#[93.V8/MD,\P>`(`<)F@>+_`0^V0SV#^`%T
+M!8/X"'5`#[?22(N%D`D``$B+!-!(.T-H=2P/MT@RB<IFP>H%#[?2@^$?2,?`
+M_O___TC3P"%$E5Q(BT-H#[=P,N@`````D$B)WDB)[^@`````2(/$"%M=PV9F
+M9I!F9F:09F:09F:02(/L.$B)7"0(2(EL)!!,B60D&$R);"0@3(ET)"A,B7PD
+M,$F)_4F)]$&)UTB++T@/MT8@2`^VA"A`"```2&G`B`$``$F)QDP#M1@)``!(
+MB>_H`````$B)PT$/MU0D,HG09L'H!0^WP(M$A5R)T8/A'TC3^*@!#X6I````
+M2(7;#X2@````2(U[6$$/MD0D)0^VC=X```#3X`G0QD,XX<9#.0'&0SH/B$,[
+M9L'H"(A#/$2(>SU)BX;4````2(E#/DR)8VC&0R6J00^W1C!FB4,@28M%`$B)
+M0RC'0S0`````2,=#2`````!(QX.@`````````+X`````Z`````!(B=Y(B>_H
+M`````$$/MTPD,HG*9L'J!0^WTH/A'[@!````2-/@"4257$B+7"0(2(ML)!!,
+MBV0D&$R+;"0@3(MT)"A,BWPD,$B#Q#C#9F:09F:09F:02(/L*$B)'"1(B6PD
+M"$R)9"003(EL)!A,B70D($F)_$B+1TA,BS!,B??H`````$B)Q4B%P'4.0<:$
+M).$````!Z:,```!,B??H`````$F)Q4B%P'4<0<:$).$````!2(GN3(GWZ```
+M``#K?69FD&9FD$B-75C&13@EQD4EJT$/MT0D,&:)12!,B74HQT4T"````,>%
+ME`````@```!)BT402(E%2$B-0`A(B450QD4P)$R);7A(QX6@`````````+X`
+M````2(G?Z`````!)BW48N@@```!(B=_H`````$B)[DR)]^@`````2(L<)$B+
+M;"0(3(MD)!!,BVPD&$R+="0@2(/$*,-F9F:09F9FD&9F9I!(@^PH2(D<)$B)
+M;"0(3(ED)!!,B6PD&$R)="0@28G\2(M'2$R+,$R)]^@`````2(G%2(7`=0Y!
+MQH0DX0````'IJP```$R)]^@`````28G%2(7`=1Q!QH0DX0````%(B>Y,B??H
+M`````.F"````9F:02(U=6,9%.)[&13D0QD5%(,9%):M!#[=$)#!FB44@3(EU
+M*,=%-"````#'A90````(````28M%$$B)14A,B6UX2(U`($B)15#&13`D2,>%
+MH`````````"^`````$B)W^@`````28MU&+H@````2(G?Z`````!(B>Y,B??H
+M`````$B+'"1(BVPD"$R+9"003(ML)!A,BW0D($B#Q"C#9F9FD$B#[#A(B5PD
+M"$B);"003(ED)!A,B6PD($R)="0H3(E\)#!)B?Q!B?9(BT=(3(LH3(GOZ```
+M``!(B<-(A<!U$4'&A"3A`````>FZ````9F:03(GOZ`````!(B<5(A<!U($'&
+MA"3A`````4B)WDR)[^@`````Z8X```!F9F:09F:03(U[6,9#.!)%A/9T$\9#
+M.0'&0SJ`QD,\0.L)9F:09I#&0SPDQD,EJT$/MT0D,&:)0R!,B6LHQT,T8```
+M`,>#E`````@```!(BT402(E#2$B):WA(QX.@`````````+X`````3(G_Z```
+M``!(BW48NF````!,B?_H`````$B)WDR)[^@`````2(M<)`A(BVPD$$R+9"08
+M3(ML)"!,BW0D*$R+?"0P2(/$.,-F9I!F9I!(@^PH2(D<)$B);"0(3(ED)!!,
+MB6PD&$R)="0@2(G[2(M'2$R+,$R)]^@`````2(G%0;P`"```2(7`=0S&@^$`
+M```!Z<$```!,B??H`````$F)Q4B%P'48QH/A`````4B)[DR)]^@`````Z9H`
+M``"09D&!_``!N/\```!$#T/@QD4X&L9%.0C&13H(QD4[`$2(93S&13T`QD4E
+MJP^W0S!FB44@3(EU*$4/M^1$B64TQX64````"````$F+51!(B55(1(G@2`'0
+M2(E%4,9%,"1,B6UX2,>%H`````````!(C5U8O@````!(B=_H`````$F+=1A$
+MB>)(B=_H`````$B)[DR)]^@`````2(L<)$B+;"0(3(MD)!!,BVPD&$R+="0@
+M2(/$*,-F9F:09F:09F:02(/L&$B)'"1(B6PD"$R)9"0028G\2(M'2$B+*$B)
+M[^@`````2(G#2(7`=0M!QH0DX0````'K7\9`.!7&0"6K00^W1"0P9HE#($B)
+M:RBY`0```+H!````2(G>2(GOZ`````"$P'4:2(G>2(GOZ`````!!QH0DX0``
+M``'K&F9F9I!(QX.@`````````$B)WDB)[^@`````2(L<)$B+;"0(3(MD)!!(
+M@\08PV9F9I!F9I"Z!````$`/ML>#^!=W1XG`_R3%`````(/").LY@\(XD.LS
+M@\(0ZRZ#PASK*8/"2)#K(X/"'.L>@\(\ZQF#PB20ZQ.#PACK#H/"%.L)@\)(
+MD.L#@\(PB=##9F9FD&9F9I!(@^P82(E<)`A(B6PD$$B)_4B)\X!^:O]T$P^V
+M=FI(BS_H`````,9#:O_^341(BUPD"$B+;"002(/$&,-F9F:02`^V1D"H`G0,
+MJ`1T"*@!#X3K````@'YJ_P^%X0```$B+!XN`&`$``(D%`````$&)P;D`````
+MN`$```!F9I!FD$&)P$'3X$6%R'4YB$YJ2(L71(G(1`G`B8(8`0``2(L'BX!8
+M`0``B04`````08G!12'!#X1_````2(L'1(F(6`$``.MS_\&`^1]VM4B+!XN`
+M'`$``(D%`````$&)P;D`````N`$```!!B<!!T^!%A<AU/HU!((A&:DB+%T2)
+MR$0)P(F"'`$``$B+!XN`8`$``(D%`````$&)P44AP7092(L'1(F(8`$``.L-
+M9F:09F:0_\&`^1]VL/Y'1&9FD&9FD//#9F9FD&9F9I!F9I!F9I!(@^P82(E<
+M)`A(B6PD$$B)_4B)\X!^4/]T$P^V=E!(BS_H`````,9#4/_^341(BUPD"$B+
+M;"002(/$&,-F9F:0@'Y0_P^%U@```$B+!XN`&`$``(D%`````$&)P;D`````
+MN`$```!!B<!!T^!%A<AU-8A.4$B+%T2)R$0)P(F"&`$``$B+!XN`6`$``(D%
+M`````$&)P44AP71]2(L'1(F(6`$``.MQ_\&`^1]VN4B+!XN`'`$``(D%````
+M`$&)P;D`````N`$```!F9F:09F:008G`0=/@187(=36(3E!(BQ=$B<A$"<")
+M@AP!``!(BP>+@&`!``")!0````!!B<%%(<%T$TB+!T2)B&`!``#K!__!@/D?
+M=KG^1T1F9I!F9I#SPV9F9I!F9F:09F:09F:005154TF)_$B+'[T`````9H-[
+M6``/AB(!``!F9I!F9I`/M]5(BX.0"0``2(,\T``/A/L```!!#[9,)`A(BP30
+M9H%X((4`#X?%````2`^W4""`O!I`"```_P^$L@```&:#>"!_=RU(#[:$&D`(
+M``!(BY,8"0``2&G`B`$``$B+1!!(#[9`"#G(#X2+````Z9X````/M]5(BX.0
+M"0``2(L$T&:!>""!`'<K2`^W0"!(#[:$&$`(``!(BY-H"0``2&G`R`\``$B+
+M1!`(#[9`"#G(=$?K70^WU4B+@Y`)``!(BP302`^W0"!(#[:$&$`(``!(BY-`
+M"0``2&G`T````$B+A!"(````#[9`"#G(=`OK(9"!^?\```!U&`^WQ4B+DY`)
+M``!(BSS"O@````#H`````/_%9CEK6`^'Y/[__UM=05S#9F9FD&9F9I!F9F:0
+M9F:02(M6<$B%TG0<2(M&.$B)0AA(BT9`2(E"($B+1DA(B4(HQD(0`?/#9F:0
+M9F:09F:02(M6<$B%TG082(M"&$B)1CA(BT(@2(E&0$B+0BA(B49(\\-F9F:0
+M9F:09F:09F:055-(@^P(2(G]2(GS2#E^*`^$R@```(!^)``/A:<````/MD8X
+M@_@5=`F#^%4/A94```!(BU-P2(72#X2(````@'H0`0^%?@```&:!>ACA`9!U
+M=4B+C1@)``!(C;%XA@$`9H%[((4`=QE(#[=#($@/MH0H0`@``$AIP(@!``!(
+MC30!#[9"&H/X!W0?@_@'?P>#^`9T'NLQ@_@,9F9FD&9FD'0@@_@-=!+K'F:#
+M9F+]9I#K%6:#3F("ZPYF@V9B]V:0ZP5F@TYB"$B#>W@`=!)(C7-X2(GOZ```
+M``!F9I!F9I!F@7LXX0$/A68!``!F@7L@A0`/AYP```!(#[=#(("\*$`(``#_
+M#X2)````2(N5&`D``$B-LGB&`0!F@7L@A0!W%$@/MH0H0`@``$AIP(@!``!(
+MC30"@'LD`'59#[9#.H/X!W0@@_@'?PF#^`9T)&:0ZT*#^`QT.(/X#69FD&9F
+MD'07ZS!F@V9B_69F9I!F9I#K(F:#3F("ZQMF@V9B]V:0ZQ(/M\'K8@^WP>FG
+M````9H-.8@AF@7LXX0$/A;(```"`>SH+#X6H````2(GN#[=+(`^WT0^V14;_
+MR/_!.<)])`^V14:-4/]F@?F%`'<-#[?!@+PP0`@``/]UIP^WP?_!.=!\X[C_
+M````9CW_`'1?2(GN#[=+(`^WT0^V14;_R/_!.<)]+`^V14:-4/]F9F:09H'Y
+MA0!W$0^WP8"\,$`(``#_#X5?____#[?!_\$YT'S?N/\```!FB4,@QD,D@$B)
+MWDB)[^@`````Z3(!``#&0R0`2#EK*'0G2(M#<$B%P)!T'8!X$`%U"TB)WDB)
+M[^@`````2(US<$B)[^@`````2(.[@`````!T#TB-LX````!(B>_H`````$B+
+M>RA(B=[_DZ````!F@7LXX0%U8P^V0SJ#Z!$\`7=8NO\```!F@7L@A0!W#4@/
+MMT,@#[:4*$`(``"!^O\````/A*(```")T$AIP-````!(B<9(`[5`"0``@'Y%
+M``^%A0```(!^4/]T?TB)[^@`````ZW5F9I!FD+K_````9H%[((4`=PU(#[=#
+M(`^VE"A`"```B=!(:<"(`0``2(G&2`.U&`D``(M#."7___\`/>$!$``/E<"!
+M^O\````/E<(/ML"%PG0C9H%[..$!=0L/MD,Z@^@1/`%V$(!^>P!U"DB)[^@`
+M````9I!(@\0(6UW#9F:09F:09F:02(/L&$B)7"0(2(EL)!!(B?M(B?4/MU8R
+MB=!FP>@%#[?PB=&#X1](Q\#^____2-/`(42W7&:!^O\/=$4/M_I(BXN0"0``
+M2(,\^0!T-$C'!/D`````(82SF`D```^W\DB-NU@/``#H`````$B)[DB)W^@`
+M````2(GN2(G?Z`````!(BUPD"$B+;"002(/$&,.005132(/L"$F)]$B+GY`0
+M``!(@<=8#P``Z`````")Q@^WP$C!X`9(`=A)B00DN0````"Z0````(@(2/_`
+M2/_*=?8/M\9(@\0(6T%<PV9F9I!!N`````"X`````$B#?T``=%OK#$F)P.LS
+M9F9FD&9FD$B+=T"Y`````&9F9I!F9I`/ML%(@WS&6`!T"DB+1,98.%!Y=,__
+MP8#Y!';D2(M'0&:!>$"%``^6P$V%P`^5P@^VP(7"N`````!)#T7`\\.02(/L
+M($B)'"1(B6PD"$R)9"003(EL)!A)B?Q)B<UF#[;ZP>8(C3P^O@````!!@'PD
+M,``/A.@```!)@WPD4``/A-P```!!BX0DE````*@)N`$````/1/"[`````$C'
+MQ0`````/MLN)^&8C1,T`9CM$S0`/A9D````/MD3-!3P##Y3"/`</E,`)T*@!
+M=`=`.'3-!'5]0<9$)"0@#[;;#[94W08/MG3=!4R)Y^@`````28M4)%`/MD3=
+M!XA"#4V%[70[28M-`$F+1"102(G*2,'J((E0`TF+1"10@`B`0?:$))8````$
+M=!5(A=)T$$F+1"10B4@(28M$)%"`('])BU0D4$$/MD0D,(/H!XA"!^L29I#_
+MPX#[#P^&1____V9FD&:02(L<)$B+;"0(3(MD)!!,BVPD&$B#Q"##9F9FD&9F
+M9I!(@^PH2(E<)`A(B6PD$$R)9"083(EL)"!(B?U(B?-F@7X@A0`/AY8```!(
+M#[=&(("\.$`(``#_#X2#````9H-^(']W(D@/MH0X0`@``$B+EQ@)``!(:<"(
+M`0``2(M$$$@/ME`(ZU]F@7X@@0!W)T@/MT8@2`^VA#A`"```2(N7:`D``$AI
+MP,@/``!(BT00"`^V4`CK,$@/MT8@2`^VA#A`"```2(N70`D``$AIP-````!(
+MBX00B`````^V4`CK!I"Z_____[[_````9H%[((4`=PY(#[=#(&8/MK0H0`@`
+M`(#Z_P^$EP````^VRH"\*<8(``#_#Y3"9H'^_P`/E,`)T*@!=7N`>R0&='5,
+M#[:D*<8(``!-:>2H````38VD+*`!```/M\9(:<"(`0``28G%3`.M&`D``(![
+M.@%U)[\*````Z`````!(B=Y(B>_H`````+H"````3(GN3(GGZ`````#K'+_T
+M`0``Z`````!(B=Y(B>_H`````&9F9I!F9I!(BUPD"$B+;"003(MD)!A,BVPD
+M($B#Q"C#9F9FD&9FD$B#["A(B5PD"$B);"003(ED)!A,B6PD($F)](G52(L?
+M2(G?Z`````!(B<)(A<!T7\9`..'&0#D!0(AH.L9`.P]!#[=$)#!FB4(@2(E:
+M*,="-`````!(QT)(`````$C'@J``````````2(G62(G?Z`````!`@/T!=0R_
+M!0```.@`````ZPJ_4,,``.@`````2(M<)`A(BVPD$$R+9"083(ML)"!(@\0H
+MPV9F9I!F9F:055-(@^P(2(G]2(GS9H%^((4`#X>8````2`^W1B"`O#A`"```
+M_P^$A0```&:#?B!_=R)(#[:$.$`(``!(BY<8"0``2&G`B`$``$B+1!!(#[9(
+M".MA9H%^(($`=R=(#[=&($@/MH0X0`@``$B+EV@)``!(:<#(#P``2(M$$`@/
+MMD@(ZS)(#[=&($@/MH0X0`@``$B+ET`)``!(:<#0````2(N$$(@````/MD@(
+MZPAF9I"Y_____[[_____9H%[((4`=PU(#[=#(`^VM"A`"```@/G_="$/ML&`
+MO"C&"```_P^4PD"`_O\/E,`)T*@!=0:`>R0&=2!(@WMX`'0,2(US>$B)[^@`
+M````2(G>2(GOZ`````#K:P^VP4@/MKPHQ@@``$AI_Z@```!(C;POH`$``(GR
+M#[;"2&G`B`$``$B)QD@#M1@)``"`>R0`=`JZ`0```.@`````2(-[>`!T$TB-
+M<WA(B>_H`````&9F9I!F9I!(B=Y(B>_H`````&9FD&:02(/$"%M=PV9FD&9F
+MD&9FD$B#[#A(B5PD"$B);"003(ED)!A,B6PD($R)="0H3(E\)#!)B?])B?1,
+MBS=,B??H`````$B)Q4B%P`^$C@```$R)]^@`````28G%2(7`=1%(B>Y,B??H
+M`````.MQ9F9FD$B-75C&13CAQD4Y`<9%.@Y!#[=$)#!FB44@9D&#9"1@]TF+
+M!TB)12C'130`"```28M%$$B)14A,B6UX2,>%H`````````"^`````$B)W^@`
+M````BU4T28MU&$B)W^@`````2(GN3(GWZ`````!(BUPD"$B+;"003(MD)!A,
+MBVPD($R+="0H3(M\)#!(@\0XPTB#[!A(B1PD2(EL)`A,B60D$$B)_4&)]$B+
+M1TA(BQA(B=_H`````$B)PDB%P'1$QD`X&\9`.0%$B&`\#[=%,&:)0B#&@I@`
+M```/2(E:*,="-`````!(QT)(`````$C'@J``````````2(G62(G?Z`````!(
+MBQPD2(ML)`A,BV0D$$B#Q!C#9F9FD&9FD&9FD$B#[!A(B1PD2(EL)`A,B60D
+M$$B)_4B+1TA,BR!,B>?H`````$B)PTB%P'1P3(GGZ`````!(B<)(A<!U%,:%
+MX0````%(B=Y,B>?H`````.M,QD,X``^W13!FB4,@QH.8````#TR)8RC'0S0`
+M````2,=#2`````!(BT(02(E#4,9#,"1(B5-X2,>#H`````````!(B=Y,B>?H
+M`````$B+'"1(BVPD"$R+9"002(/$&,.0059!54%455-)B?Y)B?5(B=/&0D,!
+MQD)"`+X&````3(GOZ`````!(@WM0`'062(M3&$B+0Q!(B5`(2(D"2(M#4/Y(
+M6(![>P!T'V9F9I!F9I!,B??H`````+\!````Z`````"`>WL`=>A(@[L8`0``
+M`'0>#[:S!0$``$B+NQ@!``"Z`0```.@`````9F:09F:02(-[4`!T&0^V<WE(
+MBWM0N@$```#H`````&9F9I!F9I!(@WLX``^$F0```$B+:SA(@[V``````'5[
+M2(.]B`````!U<?9#1`1U)$'^AN\3``!,B??H`````$B+0S@/MG`!N@$```!,
+MB??H`````$B+0S@/ME`"#[9P`4C'QP````"X`````.@`````2(M3.$F+MM`(
+M``"_`0```.@`````2(M3.$F+MM`(``"_!@```.@`````2,=#.`````!(QT5@
+M`````$B#>U@`=!)(BU-82`^V0WE(QT3"6`````!(BU,(2(L#2(E0"$B)`D'^
+M30Y(B=Y,B??H`````$&`?0G_=%5!O`````!!@'T.`'8X28UM8$B)[^@`````
+M2(G#2(M%"$B)70A(B2M(B4,(2(D8@'M"_W4+0?_$13AE#G?4ZP9%.&4.=Q!!
+MQD4)_TR)[DR)]^@`````6UU!7$%=05[#D(GP#[;`2(T$P$C!X`<%8%<``(D'
+MPV9F9I!F9F:09F:008G02(GYOP````")\DB)R$B%TG0+0(@X2/_`2/_*=?6)
+M,8GR2('J8%<``$BXC^,XCN,XCN-(]^)(P>H*B%$$1#C"=@1$B$$$N@````"`
+M>00`=A\/ML+&1`$'_TB-!,!(P>`'QH0(Q%<``/W_PCA1!'?AQD$&`,9!!0"Z
+M`````)`/ML)(:<"P````2(V$"`!"``#&0`L!B%`*_\*`^A]VX//#9F9FD&9F
+M9I!F9I!F9I!!5%5328GT2(G[O0````"`?P0`=D.)Z@^VPDB-!,!(P>`'2`'8
+M@+C$5P``_70B2(VXO%<``+H(````3(GFZ`````"$P'0*0`^VQ>L19F9FD/_%
+M0#AK!'>]N/\```!;74%<PV9F9I!F9F:09F:09F:04TB)^^@`````N@D````\
+M_W03#[;`2(T$P$C!X`</MI089E<``(G06\-F9F:09F:02(/L*$B)7"0(2(EL
+M)!!,B60D&$R);"0@28G]2(GS2(VVD````$F)W$B+JY@```"`?08`#X1.`0``
+M2(GOZ`````")P3S_#X0\`0``#[9#`8/X`71P@_@!?PR%P'0H9F:0Z2(!``"#
+M^!`/A)$````]D`````^$U0```&9F9I!F9I#I`@$``("]"T(```!F9F:0#X7Q
+M````QH4+0@```?Y-!@^VT4&Y`````$&X`````+D`````3(GN2(GOZ`````#I
+MPP```("]"T(````/A;8```#&A0M"```!_DT&#[;10;D`````0;@`````N0$`
+M``!,B>Y(B>_H`````.F(````N@$````/ML)(:<"P````2(V$*`!"```X2`AU
+M"P^V0`E!.D0D"70'_\*`^A]VU_Y-!@^VT4V)X44/MD0D";D0````3(GN2(GO
+MZ`````#K.4@/MH.J````2&G`L````,:$*`M"```!_DT&#[;10;D`````0;@`
+M````N9````!,B>Y(B>_H`````$B+7"0(2(ML)!!,BV0D&$R+;"0@2(/$*,-!
+M54%455-(B?5)B=5-B<Q!B<F[``````^VPTAIP%`0``!(.6PX('5HN0`````/
+MML-(:?!0$```#[?!2,'@!4@!\$R-%#A-C5I`00^V0PR$P`^4PCSP#Y3`"="H
+M`70B28EJ,$V):CAF18E#`D6(2D!)BP0D28E"1$'&0PS_ZQ)FD/_!9H'Y@0!V
+MKF9F9I!F9I#_PX#[`W:`6UU!7$%=PV:02(/L"$F)\XG02(G^3(V78$$``,:'
+M"T(```!!N0````!!N)````!,B=%F9F:09F:01(@)2/_!2?_(=?5!QD(!`$'&
+M`D!(QX8`0@```````$B)OOA!```/ML!(C03`2,'@!TB+A#"\5P``2(F&\$$`
+M`$B!QF!!``!,B=_H`````$B#Q`C#9F9FD&9F9I!F9F:02(/L"$F)\XG02(G^
+M3(V78$$``,:'"T(```!!N0````!!N)````!,B=%F9F:09F:01(@)2/_!2?_(
+M=?5!QD(!`4'&`D!(QX8`0@```````$B)OOA!```/ML!(C03`2,'@!TB+A#"\
+M5P``2(F&\$$``$B!QF!!``!,B=_H`````$B#Q`C#9F9FD&9F9I!F9F:055-(
+M@^P(2(GUB=-)B?FZ`0````^VPTB-!,!)B<-)P>,'#[;"2&G`L````$J-A`@`
+M0@``@'@+`0^%LP```(A8"(A("<9`"P!(#[9`"DAIP+````!.C90(8$$``$&X
+M`````+Z0````3(G09F9FD&9FD$2(`$C_P$C_SG7U0<9"`1!!Q@)`08A*"0^V
+MTDAITK````!,`<I(C8H`0@``2`^V00I(:<"P````3`'(2,>``$(```````!(
+MB;CX00``2XN$"[Q7``!(B8+P00``2`^V<0I(:?:P````2HVT#F!!``!(B>_H
+M`````.L69F:09F:0_\*`^A\/AB;___^X`0```$B#Q`A;7<-F9I!F9I!F9I!!
+M54%455-(@^P(28GU28G43(G-08G)1(G!28GZN@$````/MMT/ML)(:<"P````
+M3`'02(VP`$(``(!^"P$/A9(```#&1@L`3(F0^$$``$@/MD8*2&G`L````$Z-
+MG!!@00``0;@`````OI````!,B=B01(@`2/_`2/_.=?5!QD,!D$'&`T!!B%L&
+M08A+!T6(2PE(BT4`28E#$`^V\DAI]K````!,`=9(QX8`0@```````$B)OOA!
+M``!)BT0D7$B)AO!!``!(@<9@00``3(GOZ`````#K$/_"@/H?#X9%____N`$`
+M``!(@\0(6UU!7$%=PY!32(GS28G31(G"2(G^3(V78$$``$&Y`````$&XD```
+M`$R)T$2("$C_P$G_R'7U0<9"`1-!Q@)`#[;&08A"!D&(4@=!B$H)2,>&`$(`
+M``````!(B;[X00``28M#7$B)AO!!``!(@<9@00``2(G?Z`````!;PV9F9I!F
+M9F:09F9FD`^VT@^W3%9X_\%FB4Q6>&8/MD8"`<@/M\##9F:09F:0N@$```")
+MT$AIP+````"`O#@+0@```74(B=##9F:09I#_PH/Z'W;>N/__``!F9F:0PV9F
+M9I!F9F:09F9FD&9FD+D!````B<A(:<"P````2(V$.`!"``!`.'`(=0HX4`EU
+M!<9`"P'#_\&#^1]F9I!FD';3\\-F9F:09F9FD&9F9I!(@^Q82(E<)"A(B6PD
+M,$R)9"0X3(EL)$!,B70D2$R)?"1028G_2(ET)!A!B=9$B$0D%TF)_$V)S0^V
+MPDB-!,!(P>`'@+PXQ%<``/VX_?___P]$R`^VP8/X$`^$D0(``(/X$'\<A<`/
+MA*0```"#^`&0#X0]`0``Z04)``!F9I!FD#WB````#X1F"```/>(```!_$SV0
+M````#X17!P``9F:0Z=L(```]_P```&9FD&9FD`^%R@@```^VPDB-!,!(P>`'
+MQH0XQ%<``/^`OPM"```!=1]!#[;62(MT)!CH`````(7`#X68"```0?Y'!NF/
+M"```1(GQ#[;!QD0'!P%(BU0D&$B)5,<0Z74(``!F9I!FD$B-CV!!``"`OPM"
+M```!=5`/ML)(C03`2,'@!T@!^`^V40F(D&)7``!(!<!7```/ME$*@^(!B%`%
+MQD`$`$$/MM9(BW0D&.@`````A<`/A1X(``!!_D<&Z14(``!F9I!FD`^VPL9$
+M!P<!2(M4)!A(B53'$.GY!P``0<9$!`?_#[;228MTQ!!!N0````!!N`````"Y
+M_P```$R)_^@`````Z<T'``"[`````$B-EV!!``!$B?$/ML%(C03`2,'@!TB-
+M##@/MD(RB(&R5P``#[=",&:)@;!7``!(BT(H2(F!H%<``$B+0@Q(B8%P5P``
+M2(M"%$B)@8!7``!(BT(<2(F!B%<``(M")(F!F%<``,:!Q%<```&`?P8?#X14
+M!P``@+EB5P```'1]00^VQHE$)!!$B?(/ML)(C03`2(G%2,'E!TF)S4R-M#VP
+M5P``9F9FD&9FD`^VRXM4)!!(BW0D&$R)_^@`````A<!U(/_#0?Y$)`9!.)UB
+M5P``=0I!QH6S5P```.L.08A>`^L(08A>`^L49I!!@'PD!A]T"D(XG"5B5P``
+M=ZY!QH0D"T(```&Z`````$&`?"0$``^&M`8``&9F9I`/ML)!@'P$!P$/A*C^
+M____PD$X5"0$=^CIDP8``&9FD,9$)`__28M!&$B)1"0@#[;"2(T$P$C!X`=(
+MC2PX2(V%P%<``,9`!!!!]D$,<`^$@`,``$B#O<A7````='D/ME@&2(N]R%<`
+M`$B#QURZ"````$B-="0@Z`````"$P'570?9%#P]T4$B+K<A7``!(A>UT1(!]
+M90!T-`^VVXG:2(GN3(GGZ`````!-C4T81`^WP(G92(GJ2(MT)!A,B?_H````
+M``^V769(BVUHZP6]`````$B%[76\00^V50_VP@T/A!P!``!$B?$/ML%(C0S`
+M2(G(2,'@!TP!X("X8%<``!\/A_L````/MIA@5P``]L((=!8/ML-(C03(2,'@
+M!$+&A"#@60``!NL>1(GR#[;"#[;32(T$P$B-!,)(P>`$0L:$(.!9```'1(GP
+M#[;(#[;#2(T,R4B-%,A(P>($3`'B2(VRX%D``,9&`0!!#[9%#XA&`TB+1"0@
+M2(F"Z%D``$$/MD4)B$8"2,'A!T$/MD4-@^`/0@^VE"%F5P``.,(/1]"#X@\/
+MMD8$@^#P"="(1@1$B?(/ML)(C03`2(GQ2,'@![X/````02)U*4(/MI0@9E<`
+M`$`X\@]'UL'B!`^V002#X`\)T(A!!$2)\0^VP4B-!,!(P>`'0OZ$(&!7``#I
+MTP$``$'V10\"#X3(`0``2(UT)"!,B>?H`````$&)P#S_#X52`0``QD0D#P!!
+M@'PD!`!V-T@/MD0D#TB-!,!(P>`'0@^VA"#$5P``//\/E,(\_0^4P`G0J`%U
+M$/Y$)`\/MD0D#T$X1"0$=\E(#[9$)`](C03`2,'@![D`````NF0```!*C80@
+M8%<``(@(2/_`2/_*=?9(#[94)`](C1322,'B!TP!XD2)\0^VP4B-!,!(P>`'
+M3`'@2(VX8%<``$B)NLA7``!(BXB\5P``2(F*M%<``$B+3"082(F*V%D``$B+
+M@-!7``!(B8+05P``QH+$5P``_TB-BF!7``!(#[9Q!T$/MD4)B(0R:%<``/Y!
+M!T$/ME4-@^(/#[9'!CC0#T?"B$$&2`^V1"0/2(T$P$C!X`=,`>!(BU0D($B)
+MD+Q7``!!#[95#XB08U<```^V5"07B)#&5P``00^V1"0%03I$)`1U!D'&1"0%
+M`$'^1"0%ZTO&10,`Z3L#``!$B?$/MM%(C1322,'B!P^VP$B-!,!(P>`'2HTT
+M($B-CF!7``!*.8PBR%<``'042`^V40=!#[9%"8B$%FA7``#^00=!@/C_=19(
+M#[9$)`]!QD0$!P%(BU0D&$F)5,0000^V50E!#[;V3(GGZ`````!$B?$/ML%(
+MB<)(C03`2,'@!TJ-#"!(C8&P5P``@'@#``^$M@```$&`?"0&'P^$F@(```^V
+M0`,Z@6)7```/@XH"``!%#[;N28G69F:02(T$TDC!X`=*C1P@QH/$5P``$$B-
+MJ[!7```/MDT#1(GJ2(MT)!A,B?_H`````(7`#X5*`@``0?Y$)`8/MD4#_\`/
+MMI-B5P``.=`/A.S^__],B?)+C03V2,'@!TJ--"!(C8:P5P``#[9(`__!B$@#
+M08!\)`8?#X0%`@``.HYB5P``#X)Y____Z?0!``!F9F:008!\)`8`#X7D`0``
+M00^VUD&Y`````$&X`````+F0````2(MT)!A,B?_H`````.F]`0``0<9$!`?_
+M#[;228MTQ!!!N0````!!N`````"Y_P```$R)_^@`````QD0D!P'IRP```,9$
+M)`<`QT0D"`````"+1"0(2&G`4!```$B+5"082CE4("!U9[T`````BT0D"$QI
+MZ%`0``")Z$C!X`5,`>A,`>!(C5A`@'L,_W4W08!\)`8?#X0V`0``#[9(0$R-
+M2$1$#[=#`DB+4#A(BW0D&$R)_^@`````A<!U"4'^1"0&QD,,\/_%@?V!````
+M=JG_1"0(@WPD"`,/AG/___]!@'PD!@`/A>8```"Z`````$&`?"0$`'88#[;"
+M08!\!`<!#X0-_____\)!.%0D!'?H@'PD!P`/A;8```!!#[;60;D`````0;@`
+M````N>(```!(BW0D&$R)_^@`````Z8\```"[`````(!_!`!V.V9F9I`/ML-(
+MC03`2,'@!TJ-C"#`5P``#[91!(#Z_0^5P(#Z_P^5P@^VP(7"=`3&003^_\-!
+M.%PD!'?)1(GQ#[;!2(T$P$C!X`=*BZP@T%<``+L`````#[;#2&G`4!```$P!
+MX$B-4""`>@@!=0W&0@@`2(MP($R)___5_\.`^P-VU69FD$B+7"0H2(ML)#!,
+MBV0D.$R+;"1`3(MT)$A,BWPD4$B#Q%C#9F9FD&9FD&9FD&9FD$&)T<8!_KH`
+M````0;@`````@'\$`'8S#[;"2(T$P$C!X`=(`?A(.;#860``=15%.,AU#0^V
+M@,17``"(`<-F9I!!_\#_PCA7!'?-\\-F9F:055-(@^P(28G33(G%08G(2(G[
+M#[9'!3I'!'4$QD<%``^V2P6Z``````^VPDAIP%`0``!(`=A,C4@@2#EP('5!
+M0<9!"`&Y`````(![!`!V7P^VP4B-!,!(P>`'2`'82#FPV%D``'4.#[:`Q%<`
+M`(/``SP!=CK_P3A+!'?4ZS%F9I`/ML)(:<!0$```2`'83(U(($B#>"``=0M(
+MB7`@0<9!"`'K"__"@/H##X9Z____#[;"2&G`4!```$&Z`````$&Y`A```$B-
+M1!@P9F9FD&9FD$2($$C_P$G_R77U#[;!2(ETPQ!(C03`2,'@!T&Z`````$&Y
+M9````$B-A!A@5P``1(@02/_`2?_)=?4/ML%(C03`2,'@!T&Z`````$&Y``(`
+M`$B-A!C85P``1(@02/_`2?_)=?4/ML%(C03`2,'@!T@!V$B)L-A9``!(B:C0
+M5P``QH#$5P``_TC'@,A7````````28L32(F0O%<``$2(@&97```/MM%!N0``
+M``!!N`````"Y_P```.@`````_D,%2(/$"%M=PV9F9I!F9I!F9I!3NP````"`
+M?P0`#X:1````#[;#2(T$P$C!X`=(.;0XV%D``'5QN@$````/ML)(:<"P````
+M2(V$.`!"```X6`AU!,9`"P'_PH#Z'W;>#[;#2(T$P$C!X`=(`?A(QX#860``
+M`````+D`````NF0```!(C8!@5P``B`A(_\!(_\IU]@^VPTB-!,!(P>`'QH0X
+MQ%<``/W^3P7_PSA?!`^';____[L`````#[;#2&G`4!```$@!^$B-4"!(.7`@
+M=3%(QT`@`````,9""`"Z``````^VPTAIR%`0```/ML)(P>`%2`'(QD0X3`#_
+MPH#Z@7;J_\.`^P-VL5O#9F:09F:09F:04TF)^4&Z`````+\`````@/H!#X4H
+M`0``387`#X0#`0``08!Y!`!V*$2)T@^VPDB-!,!(P>`'2CFT"-A9``!U!T`X
+MSW0+_\=!_\)%.%$$=]A$B=`/MLA(B<](C0S)2,'A!TP!R4B-D6!7``!(BX%@
+M5P``28D`2(M""$F)0`A(BT(028E`$$B+0AA)B4`82(M"($F)0"!(BT(H28E`
+M*$B+0C!)B4`P2(M".$F)0#A(BT)`28E`0$B+0DA)B4!(2(M"4$F)0%!(BT)8
+M28E`6(M"8$&)0&"[`````("Y8%<```!V0@^VPTB)P4C!X01,`<%(C33_2(T$
+M\$C!X`1,`<A(BY#@60``2(E19$B+@.A9``!(B4%L_\-(P>8'0CB<#F!7``!W
+MOD2)T@^VPDB-!,!(P>`'0@^VA`A@5P``ZSIF9I!!N@````"[`````$&`>00`
+M=B$/ML-(C03`2,'@!THYM`C860``#Y3`00'"_\-!.%D$=]]!#[;"6\.0D)"0
+MD)"02(L73(L"N0````"`>D,`=A9(#[9W#4B)\$C3^*@!=0?_P3A*0W?O@/D#
+M=B1(C02-`````"7\`P``0HN$`-`!``")!0````#K(F9F9I!F9I!(C02-````
+M`"7\`P``0HN$`-`!``")!0````"I```0``^5P`^VP,-F9I!F9I!F9I!!5T%6
+M055!5%532(/L"$B)/"1,BR]-BV4`QD9!`,9&0`7&1D,&2(L$)$B)1DA!OP``
+M``!!O@````"[`````$&`?4,`=A](BPPD2`^V40UFD$B)T(G92-/XJ`%U"/_#
+M03A=0W?L@/L#=AM(C03=`````"7X!P``0L>$(``"```L````ZQE(C03=````
+M`"7X!P``0L>$(``"```L````OQ`G``#H`````(#[`W8D2(T$W0`````E^`<`
+M`$*+A"`$`@``B04`````#[;HZR)F9F:02(T$W0`````E^`<``$*+A"`$`@``
+MB04`````#[;H00GN@/L#=AM(C03=`````"7X!P``0L>$(``"```D````ZQE(
+MC03=`````"7X!P``0L>$(``"```D````OQ`G``#H`````(#[`W8G2(T$W0``
+M```E^`<``$*+A"`$`@``B04`````B<6!Y?___P#K)6:02(T$W0`````E^`<`
+M`$*+A"`$`@``B04`````B<6!Y?___P")Z,'@"$$)QH#[`W8@2(T$W0`````E
+M^`<``$+'A"```@``(````.L>9F:09I!(C03=`````"7X!P``0L>$(``"```@
+M````OQ`G``#H`````(#[`W8?2(T$W0`````E^`<``$*+A"`$`@``B04`````
+MB<7K'4B-!-T`````)?@'``!"BX0@!`(``(D%`````(G%08'^`0%IEG472(L$
+M)(!(#`:)Z,'H$#Q0#Y3`#[;`ZT!!@?X!`0``=1.)Z,'H$#Q0#Y3`#[;`ZRAF
+M9F:0OX@3``#H`````$'_QT&`_P0/ALS]__^)Z,'H$#Q0#Y3`#[;`2(/$"%M=
+M05Q!74%>05_#9F9FD&9FD&9FD&9FD%532(/L"$B)_4B+'^@`````A,!U$<9%
+M"?](B>Y(B=_H`````.MLN0````"`>T,`=A9(#[95#4B)T$C3^*@!=0?_P3A+
+M0W?O2(G?Z`````!(B<9(A<!T.TB-16!(BU`(2(EP"$B)!DB)5@A(B3+^10Y(
+MB6Y(QD9`!<9&00#&1GD/N0$```"Z`0```$B)[^@`````2(/$"%M=PV9F9I!F
+M9I!!54%455-(@^P(28G\2(GU3(LONPH```!(B>Y,B>?H`````(3`=0Z_Z`,`
+M`.@`````_\MUX[D`````08!]0P!V&$D/ME0D#4B)T$C3^*@!=0C_P4$X34-W
+M[DB+50A(BT4`2(E0"$B)`D'^3"0.2(GN3(GOZ`````!!]D0D#`)T54F#?"1`
+M`'4@3(GO9F:09I#H`````$B)QDB%P`^$CP$``$F)1"1`ZP5)BW0D0$R)+DR)
+MIH@```#&1D8`QD9'`,9&0@!F@TY.!$R)[^@`````Z5L!``!)@WPD0``/A.``
+M``!)BW0D0$B!QI````!)BWTHZ`````!)BW0D0$R)[^@`````28U$)&!(B<))
+M.40D8`^$H@```$B)PV9F9I!F9I!(B=?H`````$B)Q4B#>#@`=&A(BT`X2,=`
+M8`````#V140$=21!_H7O$P``3(GOZ`````!(BT4X#[9P`;H!````3(GOZ```
+M``!(BU4X28NUT`@``+\!````Z`````!(BU4X28NUT`@``+\&````Z`````!(
+MQT4X`````$'^3"0.2(GN3(GOZ`````!(B=I).5PD8`^%:/___TG'1"1`````
+M`$&`?"0.`'0428U\)&#H`````$B)Q4'^3"0.ZPM,B>_H`````$B)Q4B%[71#
+M28U$)&!(BU`(2(EH"$B)10!(B54(2(DJ0?Y$)`Y,B65(QD5`!<9%00#&14,&
+MQD5"`TB)[DR)[^@`````9F9FD&9FD$B#Q`A;74%<05W#9F:09I!(@^PX2(E<
+M)`A(B6PD$$R)9"083(EL)"!,B70D*$R)?"0P28G\28GU08G608G/2(L'2(D$
+M)+H`````O0````"`?PX`=D1(C5]@9F9FD&9FD$B)W^@`````2(G"2(M#"$B)
+M4PA(B1I(B4((2(D03#EJ4'4-1#AR>7009F9FD&9FD/_%03AL)`YWQT$X;"0.
+M9I!T+D&`_U!U*,9"0P;&0D(%QD)`!\9"00!,B6I03(EB2$B)UDB+/"3H````
+M`&9F9I!(BUPD"$B+;"003(MD)!A,BVPD($R+="0H3(M\)#!(@\0XPV9F9I!F
+M9I!F9I!F9I!(@^PX2(E<)`A(B6PD$$R)9"083(EL)"!,B70D*$R)?"0P28G]
+M28GV3(LG0;______NX#___^]_____X#[A7<,#[;#0@^VK"!`"```0(#]_W0U
+MB>H/ML))BY0D:`D``$AIP,@/``!,.6P0"'4:2(T\$+H(````3(GVZ`````"$
+MP'0%08GOZPO_PX#[@69F9I!VI$$/ML=(BUPD"$B+;"003(MD)!A,BVPD($R+
+M="0H3(M\)#!(@\0XPV9F9I!F9I!!5T%6055!5%532('L2`(``$F)_DB)="0X
+MB%0D-TB+1PA(B40D*$R+*`^V5UB(5"0G2(U'2$B)PD@Y1T@/A&P"``"`?"0G
+M``^$80(``$R-?"1`2(E$)`A(B00D9F:09I!(B=?H`````$B-:/`/MDPD-TV)
+M^+H!````2(MT)"A(BWPD..@`````0;P`````@'PD0``/ANT```!(C5402(E4
+M)!A(BTPD"$B)3"009F9FD$2)X@^VPDC!X`1*C1PX2(U[;+H(````2(VUS```
+M`.@`````A,`/A)T```!(C5-@#[9""(/@#XB%X@````^W36!F@>'?_8G(@\@0
+M9HE%8`^V0@C`Z`0\"74)B<B#R#!FB45@1(GA#[;!2,'@!$(/MD0X:,#H!#P*
+M=09F@4U@``)(BU0D$$B+0@A(BTPD&$B)2@A(B5402(E!"$B)"`^V142H`G0R
+M@^#]B$5$2(-].`!T)4B+53A)B[70"```OP8```#H`````.L.0?_$13@G#X<L
+M____ZPE%."</AP8!``!(B>J^!@```$B+?"0HZ`````"`?7L`=!A,B>_H````
+M`+\!````Z`````"`?7L`=>A(@[T8`0```'08#[:U!0$``$B+O1@!``"Z`0``
+M`.@`````2(-]4`!T&`^V=7E(BWU0N@$```#H`````&9FD&9FD$B#?3@`=&A(
+MBT4X2,=`8`````#V140$=21!_H7O$P``3(GOZ`````!(BT4X#[9P`;H!````
+M3(GOZ`````!(BU4X28NUT`@``+\&````Z`````!(BU4X28NUT`@``+\!````
+MZ`````!(QT4X`````$B+50A(BT4`2(E0"$B)`DB+1"0H_D@.0?Y.6$B)[DR)
+M[^@`````_DPD)TB+%"1).59(=`N`?"0G``^%LOW__TB!Q$@"``!;74%<05U!
+M7D%?PT%7059!54%455-(@>PX`@``2(E\)"A)B?5(B50D($B+!TB)1"08QD0D
+M%P!(C5PD,$0/MN%)B=A$B>&Z`0```$B)_DR)[^@`````28G>1(GB3(GN2(M\
+M)"#H`````$B+3"0@2(M12$R->O!(B<A(@\!(2#G"=#U(B<%F9F:09F:000^V
+M1T$\#0^4PCPB#Y3`"="H`701QD0D%P%!QD="!4'&1T,$ZPU)BT<03(UX\$@Y
+MR'7-O0````!!@#X`#X8,`@``2(M$)"!(@\!(2(E$)`A(B00D2(M,)"!(BT%(
+M3(U@\$@[1"0(=#F)Z@^VPDB)PTC!XP1,BRPD28V\),P```"Z"````$J-=#-L
+MZ`````"$P'4.28M$)!!,C6#P3#GH===)C40D$$@[1"0(#X62`0``QD0D%P!(
+MBWPD&.@`````28G$2(7`#X26`0``2(M,)"C^00[&0$(%QH#@`````,9`0P1F
+MQX#```````#&@,(`````2,=`<```!0")Z@^VPDC!X`1*C40P8`^V4`1!B%0D
+M0`^V4`5!B%0D04F)3"1(#[90"(/B#T&(E"3B````00^W3"1@9H'AW_V)RH/*
+M$&9!B50D8`^V0`C`Z`0\"74+B<B#R#!F08E$)&")Z0^VP4C!X`1"#[9$,&C`
+MZ`0\"G4(9D&!3"1@``)(BT0D($F)1"10B>H/ML)(P>`$3`'P#[909D&(5"1Y
+M2(M`;$F)A"3,````28F$),0```!(BTPD(/Y!6$B+1"0H2(/`8$B+4`A,B6`(
+M28D$)$F)5"0(3(DB28U$)!!(BTPD"$B+40A(B4$(28E,)!!(B5`(2(D"20^V
+M1"1`J`)T)Z@$=".H`70?00^V5"1Y3(GA2(MT)"!(BWPD*.@`````ZRAF9I!F
+MD$D/MD0D0*@"=!FH!&9F9I!T$:@!=0U,B>9(BWPD&.@`````_\5!."X/AP;^
+M__^`?"07`'0-O@H```!,B?_H`````$B!Q#@"``!;74%<05U!7D%?PV9F9I!F
+M9F:09F9FD$%7059!54%455-(@>Q(`@``28G\2(ET)#A,BR\/MD<HB$0D-TB-
+M1TA(B<)(.4=(#X1&`P``@'PD-P`/A#L#``!(B40D$$B)1"0(2(G7Z`````!(
+MC6C(0;@`````N0````"Z`````$R)YDB+?"0XZ`````!!B<=!O@````!!.,8/
+M@]P!``!(C50D0$B)5"0H2(U-.$B)3"0@2(M$)!!(B40D&$$/MMY!N`````")
+MV;H!````3(GF2(M\)#CH``````^VP$C!X`1(@\!D2#T``@``#X=?`0``3(M$
+M)"B)V;H!````3(GF2(M\)#CH`````$B+7"0H2(U[7+H(````2(GNZ`````"$
+MP`^$*`$``$B+5"082(M""$B+3"0@2(E*"$B)53A(B4$(2(D(#[9$)$*(15E(
+MC7-43(GGZ``````\_W05#[;`2&G`R`\``$D#A6@)``!(B440183V=%$/MD,#
+MT>B#X`'!X`0/ME5=@^+O"<*(55T/MD,#P>@#@^`!P>`%@^+?"<*(55T/MD,#
+MP>@"@^`!P>`#@^+W"<*(55T/MD,&B(6[````Z98````/MD,"B$593(EE"`^V
+M0P:(A;L````/MT,$B45@#[=#4&:)A;@````/MD-2B(6Z````2(M#0$B)A:@`
+M``!(BT-(2(F%L````$B+0Q!(B45X2(M#&$B)A8````!(BT,@2(F%B````$B+
+M0RA(B860````2(M#,$B)A9@```!(BT,X2(F%H````.L.0?_&13C^#X)@_O__
+MZQU!#[;.2(GJ2(MT)#A,B>?H`````$4X_@^"_P```$B-14A(B<)(.45(#X3>
+M````28G&2(G7Z`````!(C5CP2(G:O@8```!,B>?H`````(![>P!T&$R)[^@`
+M````OP$```#H`````(![>P!UZ$B#>S@`=&Q(BT,X2,=`8`````#V0T0$=2A!
+M_H7O$P``3(GOZ`````!(BT,X#[9P`;H!````3(GOZ`````!F9F:02(M3.$F+
+MM=`(``"_`0```.@`````2(M3.$F+M=`(``"_!@```.@`````2,=#.`````!(
+MBU,(2(L#2(E0"$B)`D'^3"0._DU82(G>3(GOZ`````!,B?),.75(#X4E____
+M0?Y,)"A(B>Y,B>_H`````/Y,)#=(BU0D"$DY5"1(=`N`?"0W``^%S_S__TB!
+MQ$@"``!;74%<05U!7D%?PV9FD$%7059!54%455-(@>PH`@``28G^2(GU2(L&
+M2(E$)!A(B?Y(B>_H`````$&X`````+D`````N@````!(B>Y,B??H`````(A$
+M)!=!O`````!!.,0/@T8#``!(C55@2(D4)$$/MMQ!N`````")V;H!````2(GN
+M3(GWZ``````/ML!(P>`$2(/`9$@]``(```^'_0(``$R-1"0@B=FZ`0```$B)
+M[DR)]^@`````3(UL)"!)C75<2(GOZ``````\_P^%S0(``$B+?"08Z`````!(
+MB<-(A<`/A-P"``#^12C&0%@`2(M$)'Q(B0-)C7542(GOZ``````\_W0:#[;`
+M2&G`R`\``$B+5"082`.":`D``$B)0Q!!#[9%`HA#64$/MD4#T>B#X`'!X`0/
+MME-=@^+O"<*(4UU!#[9%`\'H`X/@`<'@!8/BWPG"B%-=00^V10/!Z`*#X`'!
+MX`.#XO<)PHA374B):PA!#[9%!HB#NP```$F+10A(B4-P00^V10>(0UI!#[=%
+M!(E#8$$/MT509HF#N````$$/MD52B(.Z````28M%0$B)@Z@```!)BT5(2(F#
+ML````$F+11!(B4-X28M%&$B)@X````!)BT4@2(F#B````$F+12A(B8.0````
+M28M%,$B)@Y@```!)BT4X2(F#H````$B-4SA(C45(2(M("$B)4`A(B4,X2(E*
+M"$B)$6;'1"04``!!@'T```^$<0$``$B+!"1(B40D"$R->TAF9F:02(M\)!CH
+M`````$B)P4B%P`^$;P$``/Y%#L9`0@7&@.``````QD!#!$C'0'````4`9L>`
+MP```````2`^W5"042,'B!$J-5"I@#[9"!(A!0`^V0@6(04%(B6E(2(E94`^V
+M0@:(07D/MD((@^`/B('B````#[=Q8&:!YM_]B?"#R!!FB4%@#[9"",#H!#P)
+M=0F)\(/(,&:)06!(#[=$)!1(P>`$0@^V1"AHP.@$/`IU!F:!26```D@/MT0D
+M%$C!X`1*BT0H;$B)@<P```!(B8'$````_D-82(M4)`A(BT((2(E*"$B)$4B)
+M00A(B0A(C4$028M7"$F)1PA,B7D02(E0"$B)`D@/MD%`J`)T&:@$=!6H`701
+M#[91>4B)WDB)[^@`````ZQY(#[9!0*@"=!6H!'01J`%U#4B)SDB+?"08Z```
+M``!F_T0D%&9!#[9%`&8[1"04#X>G_O__9F9FD&9FD$'_Q$0Z9"07#X+"_/__
+M@'T.`'41QD4)_TB)[DB+?"08Z`````!(@<0H`@``6UU!7$%=05Y!7\-F9I!F
+M9I!F9I!!54%455-(@^P(28G]2(GU0;@`````N0````"Z`````.@`````08G$
+MNP`````XPW,E#[;32(U,)`=(B>Y,B>_H`````(!\)`?^#X61````_\-$..-R
+MV_Y-6(!]6`!T:$R+90#&15@`2(M52$B-6LA(C45(2#G"=&A(B<)F9I!FD$B#
+M>Q``=`](BT,X2(U8R$@YT'7LZTK^15A(B>Y,B>_H``````^VB[L```!)B[PD
+M:!```$G'P`````!(B=I(B>[H`````.L92(GN3(GOZ`````!(B>Y,B>_H````
+M`&9FD$B#Q`A;74%<05W#9F:09I!(BQ>^"@```+D`````@'I#`'8U2`^V?PU(
+MB?A(T_BH`70?#[;!2&O`:(N$$&P2```E```#`,'H$(/`"$`X\`]"\/_!.$I#
+M=]!`#[;&PV9FD$B+%[X(````N0````"`>D,`=C5(#[9_#4B)^$C3^*@!=!\/
+MML%(:\!HBX00;!(``"4```,`P>@0@\`(0#CP#T?P_\$X2D-WT$`/ML;#9F:0
+M2(/L6$B)7"0H2(EL)#!,B60D.$R);"1`3(ET)$A,B7PD4$F)_4R+)T&_````
+M`(!_#0`/A)T#``"]``````^V1PV)PJ@!=0S_Q8G0B>G3^*@!=/2)Z@^VPDAK
+MP&A*C90@4!(``(M"#*D```(`=`T-```$`"7___W_B4(,B>D/ML%(:\!H0O:$
+M(%X2```$#X2/`@``38VT)``4``!-.:0DT`@``'0(38NT)-`(``")Z@^VPDAK
+MP&A,`>!$#[:(8A(``$0/MH!A$@``#[:(8!(``$$/ME0D04`/MO4/MKAG$@``
+MB7PD(`^VN&82``")?"08#[:X91(``(E\)!`/MKAD$@``B7PD"`^V@&,2``")
+M!"1(Q\<`````N`````#H`````$&X@````(GI#[;!2&O`:$Z-C"!@$@``_$$/
+MM\!F0@^VA#!`"```9CW_`'0O#[?`2&G`R`\``$B)PTD#GF@)``!(B=Y,B<^Y
+M"````/.F#Y?"#Y+`.,(/A%0!``!!_\!F08'X@0!VLDR)Y^@`````2(G#2(7`
+M#X0Z`@``B>H/ML)(:\!H0O:$(%T2```$=`2`2UT"B>D/ML%(:\!H0O:$(%X2
+M```$=`2`2UT0B>H/ML)(:\!H0O:$(%T2```(=`2`2UT$B>D/ML%(:\!H0O:$
+M(%X2```(=`2`2UT@B>H/ML)(:\!H0O:$(%T2```"=`2`2UT!B>D/ML%(:\!H
+M0O:$(%X2```"=`2`2UT(QD-8`(GJ#[;"2&O`:$J+A"!@$@``2(D#3(EK"$R)
+M[^@`````B(.[````0?Y%*+D`````08!\)$,`=B5)#[9%#4C3^*@!=!!$B?H/
+MML*(3!AP_D-:0?_'_\%!.$PD0W?;2(U3.$F-14A(BT@(2(E0"$B)0SA(B4H(
+M2(D10?Y%6`^VB[L```!)B[PD:!```$G'P`````!(B=I,B>[H`````.D%`0``
+M1`^V2P1$#[9#`P^V2P(/ME,!#[8S#[9#!XE$)!`/MD,&B40D"`^V0P6)!"1(
+MQ\<`````N`````#H`````$'&10G_3(GN3(GGZ`````#ILP```(GI#[;!2&O`
+M:$J-+"#VA5X2```(#X29````3(GGZ`````!(B<-(A<`/A(4```#&0$,&QD!"
+M!6;'@,```````,9`0`;&0$$`2,=`<```!0!(BX5@$@``2(F#S````$B)@\0`
+M``!,B6M(3(GOZ`````"(@^(```!F@TM@$$R)[^@`````/`EV!F:!2V```D'&
+M10X!28U%8$B+4`A(B5@(2(D#2(E3"$B)&DB)WDR)Y^@`````2(M<)"A(BVPD
+M,$R+9"0X3(ML)$!,BW0D2$R+?"102(/$6,-F9F:09F9FD$%7059!54%455-(
+M@^P(2(G[28GUN`````!(A?9T!`^V1@D/ML!!O`````"%P'01/?\````/A&P!
+M``#IT04``)!$B>(/ML(/MH08Q@@``#S_=!(/ML!(:<"H````3(VL&*`!``!!
+M_\1!@/P#=M-!O`````!$B>(/ML(/MH08Q@@``#S_=#,/ML!(:<"H````3(VL
+M&*`!``!!]D4*`G02O@````!,B>_H`````.L+9F:03(GOZ`````!!_\1!@/P#
+MD':Q9@^V0SYF.8-`$```#X4\!0``387M#X6T````@'M1``^%*04``,9#40&]
+M``````^WU4B+M--`!```2(7V=#A(@[Z``````'0N2(N&@````$C'AH``````
+M````2,>$TT`$````````2(N^D````+K______]#K2`^WU4B#O--`!````'0Z
+M2(N$TT`$``!(@[B(`````'0H2(N&B````$C'AH@`````````2,>$TT`$````
+M````2(N^D````/_0D/_%9H/]/P^&9/___^E_!```0<9%"?],B>Y(B=_H````
+M`.EJ!```QD0D!P!F9I!FD$@/MD0D!P^VA!C&"```//\/A/$````/ML!(:<"H
+M````3(VL&*`!``!!@'T)_P^$U````$&\`````$&`?0X`#X:Y````38UU8$R)
+M]^@`````2(G%28M&"$F);@A,B74`2(E%"$B)*(!]0O\/A(````"`O>$`````
+M=&A(#[9%0*@"=!ZH!'0:J`%T%@^V57E(BW502(GI3(GOZ`````#K0I!(#[9%
+M0*@"=1JH!&9FD&:0=!&H`70-2(GN2(G?Z`````#K'D@/MD5`J`)T%:@$9I!T
+M#Z@!=0M(B>Y(B=_H`````+@!````Z7H#``!F9I!FD$'_Q$4X90X/ATO___^X
+M`0```.E>`P``_D0D!X!\)`<##X;J_O__QD0D!P"`>U$`#X6P````O0````!F
+M9I!F9I`/M\5(B[3#0`0``&8/MI080`@``$B%]G1W2(.^@`````!T;4B#?F``
+M=69F@?K_`)!T+@^WPDB+BQ@)``!(:<"(`0``]D0(0P1T%H!\"$$`=0\/M])(
+MB=_H`````.LR9I!(BX:`````#[?52,>$TT`$````````2,>&@`````````!(
+MB[Z0````NO______T)#_Q6:#_3\/AF3____&0U$!Z8L"``!(#[9$)`</MH08
+MQ@@``#S_#X1E`@``#[;`2&G`J````$R-K!B@`0``0;P`````08!]#@`/AD("
+M``!-C75@3(GWZ`````!(B<5)BT8(28EN"$R)=0!(B44(2(DH@'U"_P^%"0(`
+M``^W13!FB40D!`^WP&8/MI080`@``&:)5"0"3(N\PT`$```/MD5$J`1T<4V%
+M_W1L28._@`````!T8DF#?V``=5N#X/N(143V14,$=!(/MU0D`DR)_DB)W^@`
+M````ZSU)BX>`````2`^W5"0$2,>$TT`$````````2<>'@`````````!(QT4X
+M`````$F+OY````"Z_____TR)_O_0]D5#!`^$10$``,:%X`````!!@&4,Y_9%
+M1`$/A/L```"`943^2(-].`!T38!]00!U+?9%0P1T)P^W5"0$#[9#0<'@!@'"
+M2&/22(NST`@``+\'````Z`````#I\0```$B+53A(B[/0"```OP$```#H````
+M`.G7````387_=&I)@[^``````'1@@'U!`'4;]D5#!'05#[=4)`),B?Y(B=_H
+M`````.FG````28N'@````$@/MU0D!$C'A--`!````````$G'AX``````````
+M2,=%.`````!)B[^0````NO____],B?[_T.MH@'U!`'5B]D5#!'1<#[=4)`0/
+MMD-!P>`&`<)(8])(B[/0"```OP(```#H`````.LX9F9FD$B#?3@`="U(BU4X
+M2(.ZB`````!T'TB+@H@```!(QX*(`````````$B+53A(B[J0````_]#V140"
+M=!E(BU4X2(NST`@``+\&````Z`````"`943]0?_$13AE#@^'POW___Y$)`>`
+M?"0'`P^&=OW__Y"X`0```$B#Q`A;74%<05U!7D%?PV9F9I!F9F:09F9FD$B#
+M[#A(B5PD"$B);"003(ED)!A,B6PD($R)="0H3(E\)#!)B?Y(B?-,BVY(2`^W
+M1C"Z`````("\.$`(``#_#X2Q`@``#[9&0H/X#P^$!`$``(/X#W]*@_@,#X3)
+M````@_@,?QR#^`5T;(/X"V9F9I`/A*4```#I=0(``&9FD&:0@_@-#X2L````
+M@_@.9F9FD`^$KP```.E5`@``9F:09I"#^!E_$H/X&'U?@_@49F:0=#CI.0(`
+M`(/X&V9FD&9FD'0U/?\````/A(P```!F9I#I&P(``+X!````2(G?9F:0Z```
+M``#I!@(``$B)]^@`````Z?D!``"^`````$B)W^@`````Z><!``"^`0```$B)
+MW^@`````Z=4!``!(B??H`````.G(`0``2(GWZ`````#INP$``$B)]^@`````
+M9F:0Z:L!``!(B??H`````&9FD.F;`0``QD9"_TF)WT&\`````$&`?0X`#X;'
+M````28UM8$B)[^@`````2(G#2(M%"$B)70A(B2M(B4,(2(D8@'M"_P^$B```
+M`(![00`/A84```"`N^$`````=&9(#[9#0*@"=!VH!'09J`%T%0^V4WE(BW-0
+M2(G93(GOZ`````#K0$@/MD-`J`)U&:@$9F9FD'01J`%T#4B)WDR)]^@`````
+MZQY(#[9#0*@"=!6H!&:0=`^H`74+2(G>3(GWZ`````"Z`0```.G:````9F:0
+M9I#&@^$`````0?_$13AE#@^'/?___T4X90X/A:(```!!#[9'03PB#Y3"/`T/
+ME,`)T*@!=#^^"@```$R)_^@`````N@$```#IBP```$B)WDC'QP````"X````
+M`.@`````O@H```!(B=_H`````+H!````ZV-!O`````!!@'T.`'9!28UM8$B)
+M[^@`````2(G#2(M%"$B)70A(B2M(B4,(2(D8#[9#03PB#Y3"/`T/E,`)T*@!
+M=99!_\1%.&4.=\9F9I!!QD4)_TR)[DR)]^@`````N@$```")T$B+7"0(2(ML
+M)!!,BV0D&$R+;"0@3(MT)"A,BWPD,$B#Q#C#9F:09F:02(/L6$B)7"0H2(EL
+M)#!,B60D.$R);"1`3(ET)$A,B7PD4$F)_4B)\TR+?DA(#[=&,+H`````@+PX
+M0`@``/\/A*(&```/MD9"@_@)#X1W`P``@_@)?TJ#^`4/A/L```"#^`5_%X/X
+M`P^$G@```(/X!`^$P@```.EF!@``@_@'9I`/A#0#``"#^`=F9F:09F:0#X\6
+M`P``Z:D"``!F9I!FD(/X%@^$YP(``(/X%F9F9I!_(X/X%`^$*@,``(/X%&:0
+M#X^D`@``@_@*#X0'`P``D.D,!@``@_@:#X1+`@``@_@:?Q*#^!</A+("``!F
+M9F:0Z>P%```]_P```&9FD&9FD`^$XP(``.G6!0``28M'((%@,/___O](BWY(
+MN0````"Z`0```.@`````OP4```#H`````.FI!0``2(M^2+D`````N@````#H
+M`````+]0PP``Z`````#IAP4``$&^`````(!_0P!V($D/ME<-9F:09I!(B=!$
+MB?%(T_BH`74)0?_&13AU0W?J2`^V0T"H`G0,J`1T"*@!#X73````28M7((M"
+M,*D```$`=`TE___^_XE",.FX````O1`G``!$B'0D$$J-!/4`````)?@'``!(
+MB40D"$2)\$C!X`-)B<1!@>3X!P``28M5`$&`_@-V&4B+3"0(BX01@`$``(D%
+M`````"4```$`ZQ-!BX04@`$``(D%`````"4```$`A<!T)8!\)!`#=@Y!QX04
+M@`$``````0#K#$''A!2``0`````!`(7`=1"_Z`,``.@`````_\UUD^L$A>UU
+M&,9#0P+&0T+_2(G>3(GOZ`````#I<P0``$'V1PH!=#A(B=Y,B?]F9I!FD.@`
+M````A,!U)+WZ````9I!(B=Y,B?_H`````(3`=0Z_Z`,``.@`````_\UUXT&`
+M_@-V)TJ-!/4`````)?@'``!)BTT`BY0!@`$``(D5`````(F4`8`!``#K3TJ-
+M!/4`````2(G&@>;X!P``28M-`$&`_@-V#XN$,8`!``")!0````#K'DJ-!/4`
+M````)?@'``!)BU4`BX0"@`$``(D%`````(F$,8`!``!(BWM(2(G>Z*LH``"_
+M($X``.@`````Z9T#```/MW8P2,?'`````+@`````Z`````!(BWM(2(G>Z#LO
+M``#I=P,```^W=C!(Q\<`````N`````#H`````$B+>TA(B=[HI2\``.E1`P``
+M2(M^2.A'*```Z4,#``!(BWY(Z)DL``#I-0,``$B+?DCHZRL``.DG`P``2(M^
+M2.@=+0``Z1D#``!(BWY(Z)\M``#I"P,``$B+?DCH(2X``)#I_`(``,9&0O](
+M#[9#0*@"=`BH!'0$J`%U%DB#>U@`D'4.3(G_Z`````"(@^(```!!]D<,`@^$
+MB@$``$V+9T!!#[94)$9!#[9$)#O_R#G"?3)!_D0D1D'^1"1'0<9$)$(`00^W
+M1"1.@^#^@\@(9D&)1"1.3(GF3(GOZ`````#I?@(``$&^`````$&`?PX`#X;`
+M````28UO8$B)[^@`````2(G#2(M%"$B)70A(B2M(B4,(2(D8@'M"_P^$@0``
+M`("[X0````!T:4@/MD-`J`)T'Z@$=!NH`707#[93>4B+<U!(B=E,B?_H````
+M`.M#9I!(#[9#0*@"=1JH!&9FD&:0=!&H`70-2(G>3(GOZ`````#K'D@/MD-`
+MJ`)T%:@$9I!T#Z@!=0M(B=Y,B>_H`````+H!````Z<L!``!F9I!FD,:#X0``
+M``!!_\9%.'<.#X=$____0?9$)$Z`=!Y!]D0D20-T%D'&1"1"`$R)YDR)[^@`
+M````Z8<!``!!QD<)_T'&1"1"`$$/MT0D3H/@\X/(`F9!B40D3D&`9"1)_DR)
+M_DR)[^@`````Z50!``"^"@```$B)W^@`````N@$```"0Z4$!``!!O@````!!
+M@'\.``^&Q@```$F-;V!F9I!F9I!(B>_H`````$B)PTB+10A(B5T(2(DK2(E#
+M"$B)&(![0O\/A(@```"`>T$`=7N`N^$`````=&M(#[9#0*@"="&H!'0=J`%T
+M&0^V4WE(BW-02(G93(G_Z`````#K169F9I!(#[9#0*@"=1JH!&9FD&:0=!&H
+M`70-2(G>3(GOZ`````#K'D@/MD-`J`)T%:@$9I!T#Z@!=0M(B=Y,B>_H````
+M`+H!````ZW[&@^$`````0?_&13AW#@^'1/___T4X=PYU3T&^`````$&`?PX`
+M=D))C6]@2(GOZ`````!(B<-(BT4(2(E="$B)*TB)0PA(B1@/MD-!/"(/E,(\
+M#0^4P`G0J`$/A<7^__]!_\9%.'<.=\)!QD<)_TR)_DR)[^@`````N@$```")
+MT$B+7"0H2(ML)#!,BV0D.$R+;"1`3(MT)$A,BWPD4$B#Q%C#9F:09I!(@^PH
+M2(D<)$B);"0(3(ED)!!,B6PD&$R)="0@28G\2(GS2(L72(NNB`````^V1D*#
+M^!D/AUT$``")P/\DQ0````#V1DX$=`QFQT9.`0#&1D(!ZSQF@WY.('4,9L=&
+M3@@`QD9"#>LI]D9.@'09]D9)`W03#[=&3B1_@\@(9HE&3L9&0@WK"O9#3@AT
+M!,9#0@=(B=Y,B>?H`````.GV`P``BX($`0``B04`````@\A0B8($`0``N0$`
+M``"Z`@```+X!````2(G?Z`````#IQ0,``+D!````N@````"^`0```$B)W^@`
+M````Z:D#``"Y`0```+H!````O@$```!(B=_H`````.F-`P``N0$```"Z8```
+M`+X!````2(G?Z`````#I<0,```^V3DA!N`$```"Z8````+X!````2(G?Z```
+M``#I4`,``$&X`0```+D```$$NB$```"^`0```$B)W^@`````Z2X#``!!N`$`
+M``"Y`0```+H"````O@````!(B=_H`````.D,`P``0;@!````N0````"Z`@``
+M`+X`````2(G?Z`````#IZ@(``$B+12"!8##___?_0;@!````N0$```"Z`@``
+M`+X`````2(G?Z`````#IO0(``$&X`0```+D`````N@(```"^`````$B)W^@`
+M````Z9L"``"Y`0```+H"````O@````!(B=_H`````.E_`@``N0$```"Z````
+M`+X`````2(G?Z`````#I8P(``+D!````N@$```"^`````$B)W^@`````Z4<"
+M``!(BT4@@6`P___W_T&X`0```+G_____N@$```"^`````$B)W^@`````Z1H"
+M``"Y`0```+H`````O@````!(B=_H`````.G^`0``2`^V1D=,BW3&6$F);DA)
+MB798#[9&1T&(1GE!QD9"`T'&1D$`08!.0`7^10Y(C45@2(M0"$R)<`A)B09)
+MB58(3(DROX`:!@#H`````$&]`````$&`?"1#`'8<2`^V50U(B=!$B>E(T_BH
+M`74*0?_%13AL)$-WZ4B+52"+0C"I```(`'0*)?__]_^)0C#K8+N8.@``2HT$
+M[0````!(B<6!Y?@'``!F9F:008#]`W8:28L$)(N$*(`!``")!0````"I```(
+M`'4HZQA)BP0DBX0H@`$``(D%`````*D```@`=0Z_Z`,``.@`````_\MUNDR)
+M]DR)Y^@`````Z0`!``"_0`T#`.@`````N0````"Z(````+X!````2(G?Z```
+M``"_$"<``.@`````Z=````"Y`````+H!````O@````!(B=_H`````+\0)P``
+MZ`````#IJ@```$B+12"!8##___?_0;@`````N?____^Z`0```+X`````2(G?
+MZ`````"_$"<``.@`````ZW:Y`````+H`````O@````!(B=_H`````+\0)P``
+MZ`````#K4[D`````NB````"^`0```$B)W^@`````OQ`G``#H`````.LPZ```
+M``!F9I!FD.LDZ`````#K'4&X`0```+GP````NIL```"^`0```$B)W^@`````
+MN`$```!(BQPD2(ML)`A,BV0D$$R+;"083(MT)"!(@\0HPV9F9I!F9F:005=!
+M5D%505154TB#["A)B?Q(BP=(B40D($&_`````(!_0P`/AJ8"``!F9F:09F:0
+M1(GZ#[;"2&O`:$J--"!(C99@$@``]D(.$`^$<@(``+@!````1(GY2-/@"$()
+M2(NV2!(``$B)="08]D((`@^$W0```$&-7P%!.%PD0P^&S@````^VP4AKP&A,
+M`>!(B40D"`^VPTAKP&A.C30@28VN8!(``/9%#A`/A)0```!,BVPD"$'WA5P2
+M``````X`#X1^````28V%8!(``$B)1"00N@@```!(B>Y(B<?H`````(3`=%Y)
+MC;94$@``N@@```!)C;U4$@``Z`````"$P'1"N`$```")V4C3X$B+5"00"D()
+MB$()B$4)2(-\)!@`=0Y-B[9($@``3(ET)!CK%`^VPTAKP&A(BTPD&$J)C"!(
+M$@``_\-!.%PD0P^'0____V:02(-\)!@`#X6D````3(GGZ`````!(B40D&$B%
+MP`^$70$``$2)^@^VPDAKP&A,`>!(BTPD&$B)B$@2``!(C9!`$@``2(E1(`^V
+M@&@2``"(00K&00D`3(DAQD$.`,9!6`#&02@`08U?`4$X7"1#=EE$B?H/ML)(
+M:\!H2@^VE"!I$@``2(G0B=E(T_BH`704#[;#2&O`:$B+3"082HF,($@2``#_
+MPT$X7"1#=]?K&V9F9I!$B?H/ML)(:\!H2(M,)!A*B8P@2!(``$2)^@^VPDAK
+MP&A*C80@8!(```^V4`E(BTPD&(A1#0^V6`E!@/\#=B%*C03]`````"7X!P``
+M2(M4)"#'A!```@``.````.L?9I!*C03]`````"7X!P``2(M,)"#'A`@``@``
+M.````+\0)P``Z`````!!@/\#=AM*C03]`````"7X!P``2(M4)"")G!`$`@``
+MZQE*C03]`````"7X!P``2(M,)"")G`@$`@``0?_'13A\)$,/AV']__](@\0H
+M6UU!7$%=05Y!7\-FD$B#[!A(B1PD2(EL)`A,B60D$$F)_(GS2(LO0(#^`W8@
+M2(T$W0`````E^`<``,>$*#`"```,````ZQYF9I!F9I!(C03=`````"7X!P``
+MQX0H4`(```P```"_$"<``.@`````@/L#=AQ(C03=`````"7X!P``BX0H-`(`
+M`(D%`````.L:2(T$W0`````E^`<``(N$*%0"``")!0````")PH'B```_`,'J
+M$`^VPTAKP&A*C8P@8!(```^V00B#X/R(00B#^A!U"H/(`HA!".L29I`/ML-(
+M:\!H0H",(&@2```!2(L<)$B+;"0(3(MD)!!(@\08PV9F9I!F9I!F9I!F9I!!
+M5T%6055!5%532(/L*$&)]$F)UTB++[L`````0HT$Y0````!$C7#@08G%9F:0
+M9I!!@_P#=A&-!)T``0``08F$+B`"``#K#XT$G0`!``!!B80M``(``+\0)P``
+MZ`````")VD&#_`-V$$&+A"XD`@``B04`````ZPY!BX0M!`(``(D%`````(D$
+ME/_#@_L&=J!(BP0D28D'2(M$)`A)B4<(2(M$)!!)B4<0BT0D&$&)1QA(@\0H
+M6UU!7$%=05Y!7\-!5T%6055!5%532(/L*$&)]$F)UTB++[L`````0HT$Y0``
+M``!$C7#@08G%9F:09I!!@_P#=A&-!)T<`0``08F$+B`"``#K#XT$G1P!``!!
+MB80M``(``+\0)P``Z`````")VD&#_`-V$$&+A"XD`@``B04`````ZPY!BX0M
+M!`(``(D%`````(D$E/_#@_L&=J!(BP0D28D'2(M$)`A)B4<(2(M$)!!)B4<0
+MBT0D&$&)1QA(@\0H6UU!7$%=05Y!7\,/M@?`Z`2#X`>)PH#.`O9'`@0/1<*)
+MPH'*```"`/9'`P0/1<*)PH#."/9'`@@/1<*)PH'*```(`/9'`P@/1<*)PH#.
+M!/9'`@(/1<*)PH'*```$`/9'`P(/1<(/ME<4P>(8"=##9F9FD&9F9I!F9F:0
+MZ`````#SPV9FD&9FD&9FD$%7059!54%455-(@^PH28G^B?5,BS^)\@^VPDAK
+MP&A(`?A(B;A`$@``QH!I$@```$`/MO;H`````+D`````NB````!(B>"("$C_
+MP$C_RG7V1`^V[4B)XD2)[DR)]^@`````B>D/MME(:]MH3`'S2(GGZ`````")
+M@U`2``!(BT0D#$B)@U02``!(C9-@$@``0(#]`W8:0HT$K0````!(F$*+A#C0
+M`0``B04`````ZQM(C02M`````"7\`P``0HN$.-`!``")!0````")0@R)Z@^V
+MPDAKP&A*C90P<!(``$"`_0-V'4B-!.T`````)?@'``!"BX0X@`$``(D%````
+M`.L;2(T$[0`````E^`<``$*+A#B``0``B04`````B0*)Z0^VP4AKP&A*C80P
+M8!(``/9`#A`/A%$!``#V0`@"=%BY`````+H@````2(G@9F9FD(@(2/_`2/_*
+M=?9`#[;U2(GB3(GWZ`````")Z`^VV$AKVVA,`?-,C:-0$@``2(GGZ`````!!
+MB40D#$B+1"0,2(F#8!(``.L5B>H/ML)(:\!H0L>$,%P2```!``(`0(#]`W8;
+M2(T$[0`````E^`<``$+'A#@P`@``&````.L92(T$[0`````E^`<``$+'A#A0
+M`@``&````+\0)P``Z`````!`@/T#=A](C03M`````"7X!P``0HN$.#0"``")
+M!0````")PNL=2(T$[0`````E^`<``$*+A#A4`@``B04`````B<*)Z0^VP4AK
+MP&B)T8'A____WX'*````($+WA#!L$@`````#``]$T4"`_0-V%TB-!.T`````
+M)?@'``!"B90X-`(``.L52(T$[0`````E^`<``$*)E#A4`@``2(/$*%M=05Q!
+M74%>05_#9F9FD&9FD(N'\`@``"7___\`/5`!DP!U$P^VA_,(``#`Z`2Z`0``
+M`#P,=`6Z`````(G0PV9FD$%505154TB#[`A)B?U,BR>X`````+!0M`5()?__
+M`/](#0``!`!(NO___P#_____2"'02`T````P2+K_____`/___T@AT$BZ````
+M`!$```!("=!(NO______`/__2"'02+H``````*L``$B)Q4@)U4C'A_@3````
+M````2#F_T`@```^%Z0```$B-GP`4``!(C9?P"```0;@!````N0@```"^```"
+M`.@`````08N%Z`@``$$/MI7S"```C42"_$&(A?,(``!,B>_H`````(3`=0=)
+MB:WP"```BP4`````00^VE?,(```!PO_`B04`````08B5\P@``$$/MH7P"```
+MB(/P"```00^VA?$(``"(@_$(``!!#[:%\@@``(B#\@@``$$/MH7S"```@\`"
+MB(/S"```00^VA?0(``"(@_0(``!!#[:%]0@``(B#]0@``$$/MH7V"```B(/V
+M"```00^VA?<(``"(@_<(``!F9F:09F:02<>%^!,```````!!BX0D``$``(D%
+M``````^WT/;"('4;B="#R"!!B80D``$``$&+A"0``0``B04`````28M%`,>`
+M!`$```````!)BT4`QX`8`0```````$F+10#'@!P!````````OX"$'@#H````
+M`$''A"1P`0``&`$``$&+A"1T`0``B04`````@.3]0<>$)'`!```8`0``@,P$
+M08F$)'0!``!!QX0D<`$``"@!``!!QX0D=`$``']_``!!QX0D<`$``"0!``!!
+MBX0D=`$``(D%`````&:X``!!QX0D<`$``"0!```-_S\``$&)A"1T`0``0<>$
+M)'`!```\`0``0<>$)'0!`````'H`0<>$)'`!``"D`0``0<>$)'0!``!]O^__
+M0<>$)'`!``"X`0``08N$)'0!``")!0`````/M\!!QX0D<`$``+@!```-``#Z
+M`$&)A"1T`0``0<>$))P```#_````0<>$))`"``!$`0``0<>$))0"```&$``(
+M0<>$))`"``"T`0``0<>$))0"``!?<```0<>$))`"```P````08N$))0"``")
+M!0`````PY(#,,T&)A"24`@``O0````!!@'U#``^&6P,``&9F9I!`@/T#=AM(
+MC03M`````"7X!P``0L>$(#`"```(````ZQE(C03M`````"7X!P``0L>$(%`"
+M```(````OQ`G``#H`````$"`_0-V'4B-!.T`````)?@'``!"BX0@-`(``(D%
+M`````.L;2(T$[0`````E^`<``$*+A"!4`@``B04`````B<)`@/T#=AU(C03M
+M`````"7X!P``@<H``(``0HF4(#0"``#K&TB-!.T`````)?@'``"!R@``@`!"
+MB90@5`(``$`/MMU)C97P"```B=Y,B>_H`````(G>3(GOZ`````!`@/T#=AF-
+M!-T`````2)A"QX0@,`(``$0!``#K&V:02(T$[0`````E^`<``$+'A"!0`@``
+M1`$``+\0)P``Z`````!`@/T#=AM(C03M`````"7X!P``0L>$(#0"```&$``(
+MZQE(C03M`````"7X!P``0L>$(%0"```&$``(0(#]`W8=2(T$[0`````E^`<`
+M`$+'A"`P`@``M`$``.L;9I!(C03M`````"7X!P``0L>$(%`"``"T`0``OQ`G
+M``#H`````$"`_0-V&TB-!.T`````)?@'``!"QX0@-`(``%]P``#K&4B-!.T`
+M````)?@'``!"QX0@5`(``%]P``!`@/T#=AU(C03M`````"7X!P``0L>$(#`"
+M```(````ZQMFD$B-!.T`````)?@'``!"QX0@4`(```@```"_$"<``.@`````
+MNO]4@`!`@/T#=B)(C03M`````"7X!P``@>+_5```0HF4(#0"``#K(&9FD&:0
+M2(T$[0`````E^`<``('B__]__4*)E"!4`@``0`^VW;H!````B=Y,B>_H````
+M`+\@H0<`Z`````!`@/T#=AF-!-T`````2)A"BX0@@`$``(D%`````.L;2(T$
+M[0`````E^`<``$*+A""``0``B04`````B<*!XO___O]`@/T#=A=(C03M````
+M`"7X!P``0HF4((`!``#K%4B-!.T`````)?@'``!"B90@@`$``+H%`<@`0(#]
+M`W892(T$[0`````E^`<``$*)E""$`0``ZQ=FD$B-!.T`````)?@'``!"B90@
+MA`$``+^@A@$`Z`````!`#[;U3(GOZ`````#_Q4$X;4,/AZG\__],B>_H````
+M`$&+A"0$`0``B04`````@\@"08F$)`0!``!!BX0D``$``(D%`````(/@_8/(
+M#4&)A"0``0``08N$)``!``")!0````!)BX68$```08F$)`@!``!!BX6<$```
+M08F$)`P!``!)BX7($```08F$)!`!``!!BX7,$```08F$)!0!``!!QX0D(`$`
+M``````!!#[>%/!(``"7_#P``#0```0!!B80D(`$``$F+A2@1``!!B80D)`$`
+M`$&+A2P1``!!B80D*`$``$F+A5`1``#'`/\/``!!QX0D-`$```````!!#[>%
+M/A(``"7_#P``#0```0!!B80D-`$``$F+A5@1``!!B80D.`$``$&+A5P1``!!
+MB80D/`$``$''A"1(`0```````$''A"1,`0````$``$&+A"0$`0``B04`````
+M@\A908F$)`0!``!!QX0D5`$``/O_``Q!QX0D7`$``/__``!(@\0(6UU!7$%=
+MPV9FD&9FD&9FD%-(B?OHY_?__[H`````9I`/ML+'A(.8"0```````,=$@UP`
+M````_\*`^@]VXV;'@S@2``#_#V;'@SH2``#_#\9#4`&X`0```%O#9F:09F:0
+MN0`````Y\7TM9F9FD&9FD$ACP0^V%#B$T@^5P(#Z(`^5P@^VP(7"=`>X````
+M`,.0_\$Y\7S:N`$```!F9I!FD,-F9F:09F9FD&9F9I!F9I!(@^PX2(E<)`A(
+MB6PD$$R)9"083(EL)"!,B70D*$R)?"0P28G\2(GU9H%^((4`#X><````2`^W
+M1B"`O#A`"```_P^$B0```&:#?B!_=R)(#[:$.$`(``!(BY<8"0``2&G`B`$`
+M`$B+1!!(#[9(".ME9H%^(($`=R=(#[=&($@/MH0X0`@``$B+EV@)``!(:<#(
+M#P``2(M$$`@/MD@(ZS9(#[=&($@/MH0X0`@``$B+ET`)``!(:<#0````2(N$
+M$(@````/MD@(ZPQF9F:09F:0N?____^[_____V:!?2"%`'<.2`^W12!"#[:<
+M($`(``"`^?]T(0^VP4*`O"#&"```_P^4PH#[_P^4P`G0J`%U!H!])`9U*DB#
+M?7@`=!-(C75X3(GGZ`````!F9F:09F:02(GN3(GGZ`````#IL`8```^VP4X/
+MMJP@Q@@``$UI[:@```!/C:PEH`$```^VPTAIP(@!``!(B<-)`YPD&`D``&:!
+MN\````"K#7<&@'TD`G4V2(-]>`!T#$B-=7A,B>?H`````$B)[DR)Y^@`````
+MQD-"_\9#0P)(B=Y,B>?H`````.DY!@``#[9%.(/X&@^$7`4``(/X&G\L@_@2
+M=%V#^!)_$H7`#X3_!```9F:09I#IWP4``(/X%0^$QP4``&:0Z<\%``"#^"4/
+MA+,"``"#^"5_$H/X&P^$Q00``&9F9I#IKP4``#V>````9F:09F:0#X1[`P``
+MZ9D%``"`?20`D`^%80(``$B+34B`?3D`9I!T:8![0AD/E,"#P`N(0T)(A<ET
+M28!Y`8!U0X!Y`@!U/8!Y`SQW-P^V40._(````+X4````2(U#?$"(.$C_P$C_
+MSG7U@_H4N!0````/0]")TDB->WQ(C7$$Z`````!FQX/```````#I&04``,9#
+M0ACV009`=0\/M@&#X!^#^`T/A3L!```/M@&#X!^#^`VX(@```+H-````#T3"
+MB$-!#[;P2,?'`````+@`````Z`````!(@WUX`'0,2(UU>$R)Y^@`````2(GN
+M3(GGZ`````!!O@````!!@'T.`'9!28UM8$B)[^@`````2(G#2(M%"$B)70A(
+MB2M(B4,(2(D8#[9308#Z(@^5P(#Z#0^5P@^VP(7"=0E!_\9%.'4.=\-%.'4.
+M#X6)!```9L=$)`8``$&_`````$&^`````$&`?0X`=E5)C6U@2(GOZ`````!(
+MB<-(BT4(2(E="$B)*TB)0PA(B1@/MD-!/"(/E,(\#0^4P`G0J`%T%P^W1"0&
+M9CE#,'(,28G?#[=;,&:)7"0&0?_&13AU#G>O387_#X01!```08!_0O\/A`8$
+M``!!QD="_TR)_DR)Y^@`````Z?$#```/M@&#X!^#^`%U#<9#00'&0T+_Z:T#
+M``#V004!=`3&0T(92(-]2``/A)@#``!(BTU(O@````"Z*````$B-@Y````!`
+MB#!(_\!(_\IU];X`````N@@```!(C8.X````0(@P2/_`2/_*=?5(BT$(2(F#
+MD````$B+01!(B8.8````2(M!&$B)@Z````"+02")@[@```#I+0,``&;_@\``
+M``"_$"<``.@`````QD-"!>D3`P``2(M-2$B+15`/MD`"@^`/@'TD`'5S#[91
+M!P^V00;!X`@!P@^V007!X!`!P@^V003!X!@!PHF3W`````^V40,/MD$"P>`(
+M`<(/MD$!P>`0`<(/M@'!X!@!PDB)4W"#N]P`````=1IF_X/`````OQ`G``#H
+M`````,9#0@OIE`(``,9#0@WIBP(``(!])"!F9I!U+CP&#Y3"/`(/E,`)T*@!
+M=!YF_X/`````OQ`G``#H`````,9#0@7I6`(``&9F9I!(@WUX`'0,2(UU>$R)
+MY^@`````2(GN3(GGZ`````!(B=I,B>Y,B>?H`````.E/`@``2(M%4`^V0`*#
+MX`](BTU(@'TD``^%L0````^V40L/MD$*P>`(`<(/MD$)P>`0`<(/MD$(P>`8
+M`<*)D]P````/ME$'#[9!!L'@"`'"#[9!!<'@$`'"#[9!!,'@&`'"2&/22`^V
+M00-(P>`@2`'"2`^V00)(P>`H2`'"2`^V00%(P>`P2`'"2`^V`4C!X#A(`<)(
+MB5-P]D$,`70%9H-+8@2#N]P`````=1IF_X/`````OQ`G``#H`````,9#0AGI
+M8@$``,9#0@WI60$``(!])""0=2X\!@^4PCP"#Y3`"="H`70>9O^#P````+\0
+M)P``Z`````#&0T(9Z2@!``!F9F:02(-]>`!T#$B-=7A,B>?H`````$B)[DR)
+MY^@`````2(G:3(GN3(GGZ`````#I'P$``,9#0A3IZ@```(!])"!FD'4U2(M%
+M4`^V0`*#X`\\!@^4PCP"#Y3`"="H`70:9O^#P````+\0)P``Z`````#&0T(4
+MZ:T```#&0T(;Z:0```"`?20`=4Q(BTU(#[=#8&:#2V(!#(9FB4-@@'D#`'4%
+M@#D6=Q=F_X/`````OQ`G``#H`````,9#0@WK:?9!!@1T!V:#2V("ZT=F@V-B
+M_69FD.L]@'TD('4R2(M%4`^V0`*#X`\\!@^4PCP"#Y3`"="H`70<9O^#P```
+M`+\0)P``Z`````#&0T(%ZQIF@V-@^<9#0@[K#X!])`!U!6:#2V(#QD-"#TB#
+M?7@`=`Q(C75X3(GGZ`````!(B>Y,B>?H`````$B)WDR)Y^@`````9F:02(M<
+M)`A(BVPD$$R+9"083(ML)"!,BW0D*$R+?"0P2(/$.,-F9F:09F:09F:09F:0
+M2(/L*$B)7"0(2(EL)!!,B60D&$R);"0@2(G]2(GS9H%^((4`#X>6````2`^W
+M1B"`O#A`"```_P^$@P```&:#?B!_=R)(#[:$.$`(``!(BY<8"0``2&G`B`$`
+M`$B+1!!(#[9(".M?9H%^(($`=R=(#[=&($@/MH0X0`@``$B+EV@)``!(:<#(
+M#P``2(M$$`@/MD@(ZS!(#[=&($@/MH0X0`@``$B+ET`)``!(:<#0````2(N$
+M$(@````/MD@(ZP:0N?____^^_____V:!>R"%`'<-2`^W0R`/MK0H0`@``(#Y
+M_W0A#[;!@+PHQ@@``/\/E,)`@/[_#Y3`"="H`74&@'LD!G4C2(-[>`!T#$B-
+M<WA(B>_H`````$B)WDB)[^@`````Z7@"```/ML%,#[:D*,8(``!-:>2H````
+M38VD+*`!``")\@^VPDAIP(@!``!)B<5,`ZT8"0``2(MS2(![)``/A*D```"`
+M>SH&#X2?````@'LZ#`^$E0```$$/MY7`````C4(!9D&)A<````!F@_H)=B9!
+M@'U"!G0?0<9%0P)!QD5"_T&`943^3(GN2(GOZ`````#IY@$``+_H`P``Z```
+M``!)#[9%0*@"="FH!'0EJ`%T(4$/ME5Y28MU4$&X`````+D"````3(GGZ```
+M``#IJ@$``$'&14(#3(GN2(GOZ`````#IE0$``&9FD&:0@'LZ`74/0<9%0@1F
+M9I!FD.E-`0``@'LZ`G4*0<9%0@7I/0$``(![.@,/A9H```!!@'U"!74L9H%^
+M!,@W9F9FD'4@00^W=3!(Q\<`````N`````#H`````$'&14(&Z0`!``!,B>_H
+M`````$F-O9````"^*````.@%]?__A,!U.$F-?7R^%````.CS]/__A,!U)DF-
+MO;@```"^"````.C>]/__A,!U$4F#?7``=`I!QD5"%^FK````0<9%0AIF0?^%
+MP````.F9````@'LZ%W4*0<9%0A7IB0```(![.AAF9I!U!T'&14(6ZWF`>SH$
+M9F:0=0=!QD5"!^MI@'LZ!69FD'4'0<9%0@CK68![.@9F9I!U!T'&14()ZTF`
+M>SH,9F:0=0=!QD5""NLY@'LZ%F9FD'4'0<9%0A3K*8![.@YF9I!U($B#>W@`
+M=`Q(C7-X2(GOZ`````!(B=Y(B>_H`````.LN2(-[>`!T#$B-<WA(B>_H````
+M`$B)WDB)[^@`````3(GN2(GOZ`````!F9I!FD$B+7"0(2(ML)!!,BV0D&$R+
+M;"0@2(/$*,-F9F:09F:02(/L*$B)7"0(2(EL)!!,B60D&$R);"0@2(G]2(GS
+M9H%^((4`#X>6````2`^W1B"`O#A`"```_P^$@P```&:#?B!_=R)(#[:$.$`(
+M``!(BY<8"0``2&G`B`$``$B+1!!(#[9(".M?9H%^(($`=R=(#[=&($@/MH0X
+M0`@``$B+EV@)``!(:<#(#P``2(M$$`@/MD@(ZS!(#[=&($@/MH0X0`@``$B+
+MET`)``!(:<#0````2(N$$(@````/MD@(ZP:0N?____^^_P```&:!>R"%`'<.
+M2`^W0R!F#[:T*$`(``"`^?\/E,)F@?[_``^4P`G0J`%T(TB#>W@`=`Q(C7-X
+M2(GOZ`````!(B=Y(B>_H`````.G+````#[;!3`^VI"C&"```36GDJ````$V-
+MI"R@`0``#[?&2&G`B`$``$F)Q4P#K1@)``"`>R0`=$0/MO%(Q\<`````N```
+M``#H`````$F+50A)BT4`2(E0"$B)`D'^3"0.3(GN2(GOZ`````!!QD0D"?],
+MB>9(B>_H`````(![.@%U++\0)P``Z`````!(B=Y(B>_H`````+D!````N@``
+M``!,B>Y,B>?H`````.L@OU##``#H`````$B)WDB)[^@`````3(GN3(GGZ```
+M``!(BUPD"$B+;"003(MD)!A,BVPD($B#Q"C#9F:09I!(@^PH2(E<)`A(B6PD
+M$$R)9"083(EL)"!(B?5!B=1!B<U(BQ](B=_H`````$B)P4B%P'4-QH7A````
+M`<9%0@/K=<9`..'&0#D!08#\`1G`]]"#P`*(03JX#P```$6$[740N`````!(
+M@WU8`'0$#[9%>8A!.P^W13!FB4$@2(E9*,=!-`````!(QT%(`````$6$[4C'
+MP`````!(Q\(`````2`]%PDB)@:````!(B<Y(B=_H`````$B+7"0(2(ML)!!,
+MBV0D&$R+;"0@2(/$*,.005=!5D%505154TB#[`A)B?U(B?5,BS=,B??H````
+M`$B)PTB%P'4,QH7A`````>F?````3(GWZ`````!)B<1(A<!U%,:%X0````%(
+MB=Y,B??H`````.M[3(U[6,9#..'&0SD!QD,Z`P^W13!FB4,@28M%`$B)0RC'
+M0S0``@``28M$)!!(B4-(N0````"Z``(``(@(2/_`2/_*=?9,B6-X2,>#H```
+M``````"^`````$R)_^@`````BU,T28MT)!A,B?_H`````$B)WDR)]^@`````
+M2(/$"%M=05Q!74%>05_#9F9FD&9F9I!F9F:09F:008G0N0`````YT7,?9F9F
+MD`^V%P^V1P&(!HA6`4B#Q@)(@\<"_\%$.<%RY?/#9F:005154TB)^TB)]4F)
+M]&:#/@!Y#@^W!B4`'P``P?@(B$=!2(M%%$B)0WQ(BT4<2(F#A````(M%)(F#
+MC````$B+12Y(B8.X````2(M%-DB)@Y````!(BT4^2(F#F````$B+149(B8.@
+M````2(M%3DB)@Z@```!(BT562(F#L````$B->WRZ"@```$B)_NA`____2(V[
+MN````+H$````2(G^Z"S___](C;N0````NA0```!(B?[H&/___V;'0V```&;'
+M0V(``&9!@[PDL@$```$/E,+!X@,/MD-$@^#W"="(0T3VA:<````$=`9FQT-@
+M`0#VA:0````!="AF@TM@`O:%J@````%T!6:#2V(!]H6H`````70,9H%+8``!
+M9F:09F:0]H6D````('079H-+8`3VA:H````@=`EF@TMB`F9F9I#VA:0```!`
+M=!=F@4M@@`#VA:H```!`=`AF@TMB"&9FD,9#>@+VA9D````!="?V0V`!=`IF
+M@TM@"&:#2V(0#[:%E@```(/@'__`B$-Z/"!U!,9#>A_VA9@````(=`9F@4M@
+M``+VA9@````$=`5F@TM@(/:%F`````)T!6:#2V`0]H6H````('0.]H6N````
+M('0%9H-+8$#V0V`!=!1(BX7(````2(E#<.L.9F9FD&9FD(M%>$B)0W!(_TMP
+M]D5J`G0?]H6`````#W069H.]@`````(9P(/`!(A#9.L(9F9FD,9#9`+&0V7_
+M]D5^!'0&QD-E`NL<]D5^`G0(QD-E`6:0ZP[V17X!=`C&0V4`9F9FD,9#9O_V
+M16H$=!^Y`````)!(#[>%L````$C3^*@!=`.(2V;_P8#Y!G;GO@`"``!(B>_H
+M`````(F#Q````+@!````6UU!7,-F9F:09F:09F:02(/L&$B)'"1(B6PD"$R)
+M9"002(G]2(GS3(LG3(GGZ`````!(B<(/MDMF2(7`=0G&@^$````!ZT?&0#CA
+MQD`Y`<9`.@2(2#L/MT,P9HE"($B+10!(B4(HQT(T`````$C'0D@`````2,>"
+MH`````````"(2VE(B=9,B>?H`````$B+'"1(BVPD"$R+9"002(/$&,-F9F:0
+M9F9FD&9FD&9FD$B#[!A(B1PD2(EL)`A,B60D$$B)_4B)\TR+)TR)Y^@`````
+M2(G"#[9+9$B%P'4)QH/A`````>M'QD`XX<9`.0'&0#H%B$@[#[=#,&:)0B!(
+MBT4`2(E"*,="-`````!(QT)(`````$C'@J``````````B$MG2(G63(GGZ```
+M``!(BQPD2(ML)`A,BV0D$$B#Q!C#9F9FD&9F9I!F9I!F9I!(@^P82(D<)$B)
+M;"0(3(ED)!!(B?M(B?5,BR=,B>?H`````$B)PDB%P'4)QH7A`````>M`QD`X
+MX<9`.0'&0#H&#[=%,&:)0B!(BP-(B4(HQT(T`````$C'0D@`````2,>"H```
+M``````!(B=9,B>?H`````$B+'"1(BVPD"$R+9"002(/$&,-F9I!F9I!F9I!(
+M@^P82(D<)$B);"0(3(ED)!!(B?M(B?5,BR=,B>?H`````$B)PDB%P'4)QH7A
+M`````>M`QD`XX<9`.0'&0#H,#[=%,&:)0B!(BP-(B4(HQT(T`````$C'0D@`
+M````2,>"H`````````!(B=9,B>?H`````$B+'"1(BVPD"$R+9"002(/$&,-F
+M9I!F9I!F9I!(@^P82(D<)$B);"0(3(ED)!!(B?M(B?5,BR=,B>?H`````$B)
+MPDB%P'4)QH7A`````>M+QD`XX<9`.0'&0#H6QD`\`0^W13!FB4(@QH*8````
+M#TB+`TB)0BC'0C0`````2,="2`````!(QX*@`````````$B)UDR)Y^@`````
+M2(L<)$B+;"0(3(MD)!!(@\08PV9F9I!F9F:09F:09F:02(/L&$B)'"1(B6PD
+M"$R)9"002(G[2(GU3(LG3(GGZ`````!(B<)(A<!U"<:%X0````'K0,9`..'&
+M0#D!QD`Z%P^W13!FB4(@2(L#2(E"*,="-`````!(QT)(`````$C'@J``````
+M````2(G63(GGZ`````!(BQPD2(ML)`A,BV0D$$B#Q!C#9F:09F:09F:02(/L
+M&$B)'"1(B6PD"$R)9"002(G[2(GU3(LG3(GGZ`````!(B<)(A<!U"<:%X0``
+M``'K0,9`..'&0#D!QD`Z&`^W13!FB4(@2(L#2(E"*,="-`````!(QT)(````
+M`$C'@J``````````2(G63(GGZ`````!(BQPD2(ML)`A,BV0D$$B#Q!C#9F:0
+M9F:09F:02(/L*$B)'"1(B6PD"$R)9"003(EL)!A,B70D($B)_4&)]$&)U4&)
+MSDB+AX@```!(BQA(B=_H`````$B)QL9`..'&0#D!QD`Z$;@/````183D=00/
+MMD5'B$8[1(AN/`^W14!FB48@2(E>*,=&-`````!(QT9(`````$6$]DC'P```
+M``!(Q\(`````2`]%PDB)AJ````!(B=_H`````$B+'"1(BVPD"$R+9"003(ML
+M)!A,BW0D($B#Q"C#9F:09F:02(/L.$B)7"0(2(EL)!!,B60D&$R);"0@3(ET
+M)"A,B7PD,$F)_(G+08GU08G618G'2(N'B````$B+*$B)[^@`````2(G&QD`X
+MX<9`.0'&0#H2N`\```!%A.UU!D$/MD0D1XA&.T2(=CP/ML>(1CV)V,'H$(A&
+M/HG8P>@8B$8_B%Y`00^W1"1`9HE&($B);BC'1C0`````2,=&2`````!%A/](
+MQ\``````2,?"`````$@/1<)(B8:@````2(GOZ`````!(BUPD"$B+;"003(MD
+M)!A,BVPD($R+="0H3(M\)#!(@\0XPV9F9I!F9F:09F:02(/L.$B)7"0(2(EL
+M)!!,B60D&$R);"0@3(ET)"A,B7PD,$F)_$B)]4&^`````&:!?B"%``^'E@``
+M`$@/MT8@@+PX0`@``/\/A(,```!F@WX@?W<B2`^VA#A`"```2(N7&`D``$AI
+MP(@!``!(BT002`^V4`CK7V:!?B"!`'<G2`^W1B!(#[:$.$`(``!(BY=H"0``
+M2&G`R`\``$B+1!`(#[90".LP2`^W1B!(#[:$.$`(``!(BY=`"0``2&G`T```
+M`$B+A!"(````#[90".L&D+K_____N?____]F@7T@A0!W#D@/MT4@0@^VC"!`
+M"```#[;"2@^VG"#&"```2&G;J````$J-G".@`0``#[;!2&G`T````$F)Q4T#
+MK"1`"0``@'T\`@^%A@````^V14`E\````(/X(`^4PH/X$`^4P`G0J`%T:P^V
+M54")T(/@#X/X`74EB=&!X?````!!N`$```"Z`@```+X`````3(GOZ`````#I
+ML08``$D/MD5'38MTQ5@/MD5`)?````"#^"`/E,"#P`A!B(;B````28M&6&:!
+M8$[__NE_!@``9F:09F:0@'TD`'0_#[9=)$B#?7@`=`](C75X3(GGZ`````!F
+M9I!(B>Y,B>?H`````(#[`@^%108``$R)[DR)Y^@`````D.DT!@``00^V14*#
+M^!D/A_T%``")P/\DQ0````!!#[9%4,'@"$B828N4),`0``"+A`),"```B04`
+M````B<*#^`6X!0````]&PD&(13N`>P\`=`Y!QD5"`,9##P#IL`4``$'&14("
+MZ:8%``!!#[9%4,'@"$B828N4),`0``"+A`),"```B04`````9@^VP&9!B44\
+M00^V15#!X`A(F$F+E"3`$```BX0"1`@``(D%`````(G"P>@(9D&)13X/ML+!
+MX`AF00E%/&9!@7T^0$&X`P```+H9````#T3"08A%0NDM!0``00^V15#!X`A(
+MF$F+E"3`$```BX0"1`@``(D%`````$&(13E!#[9%4,'@"$B828N4),`0``"+
+MA`),"```B04`````B<*H"'0'0<9%.@SK)Z@$=`Q!QD4Z"V9FD&:0ZQ=(B=!(
+MT>B#X`&#^`$9P/?0@^`*08A%.D'&14($Z:T$``!!#[9%4,'@"$B828N4),`0
+M``"+A`),"```B04`````@\@(08A%2$'&14(%Z7T$``!!QD5"!NES!```00^V
+M15#!X`A(F$F+E"3`$```BX0"3`@``(D%`````$&`?4<!&<"#X`*#P!1!B$5"
+MZ3X$``!!#[9%1__`08A%1T$Z13MS"D'&14(6Z2,$``!!QD5'`$'&14(7OR"A
+M!P#H`````.D*!```0<9%0A3I``0``$'&14((Z?8#``!!QD5"%)#IZP,``$'&
+M14H"Z`````!)B87`````0<9%0A7IT`,``$$/MD50P>`(2)A)BY0DP!```(N$
+M`DP(``")!0````!$#[;X00^V15#!X`A(F$F+E"3`$```BX0"1`@``(D%````
+M``^VP,'@"$$)Q^@`````28F%R````$2)^(/@#X/X`W4108!]2@!T"D'&14(*
+MZ5T#``!)BX7(````02N%P````"U`#0,`>`=!@'U*`'090<9%0A5!@'U*``^$
+M,0,``$'^34KI*`,``$D/MD5'28-\Q5@`#X35````QD0D!P"`>PX`=CM,C7M@
+M3(G_Z`````!)B<9)#[9%1TTY=,58="!)BT<(38EW"$V)/DF)1@A,B3#^1"0'
+M#[9$)`<X0PYWR?Y+#DF#?C@`=&Q)BT8X2,=`8`````!!]D9$!'4E0?Z$).\3
+M``!,B>?H`````$F+1C@/MG`!N@$```!,B>?H`````$F+5CA)B[0DT`@``+\!
+M````Z`````!)BU8X28NT)-`(``"_!@```.@`````2<=&.`````!)#[9%1TG'
+M1,58`````$R)]DR)Y^@`````0<9%0@GI.`(``$$/MD50P>`(2)A)BY0DP!``
+M`(N$`DP(``")!0`````/MLA!#[9%4,'@"$B828N4),`0``"+A`)$"```B04`
+M````P>`("<%!B4U408!]0@IT"/?!```!`'010<9%0@OIU0$``/Y+#F:0ZV9!
+MQD5"#$D/MD5'28-\Q5@`=$G&1"0&`(![#@!V24R->V!(C7M@Z`````!)B<9)
+M#[9%1TTY=,58=,!)BT<(38EW"$V)/DF)1@A,B3#^1"0&#[9$)`8X0PYWR.L+
+M3(GGZ`````!)B<9-A?8/A(@!``!)#[9%1TV)=,5800^V14M!B(;B````Z40!
+M``!!OC]"#P!(BT,@]D`R"'4E3(GGZ`````"_`0```.@`````0?_.08/^_W0*
+M2(M#(/9`,@ATVT'&14()Z04!``!!#[9%4,'@"$B828N4),`0``"+A`),"```
+MB04`````1`^V^$$/MD50P>`(2)A)BY0DP!```(N$`D0(``")!0`````/ML#!
+MX`A!"<=$B?F!X?\/``"!^1,!```/E,*!^2,!```/E,`)T*@!="U!QD5"&('Y
+M$P$``'4*0<9%2PCI@@```$2)^"7_#P``/2,!``!U<T'&14L)ZVQ!#[951D$/
+MMD4[_\@YPGT/0?Y%1D'^14=!QD5"!^M-0<9%0@!!#[=%3H/@]X/(`F9!B45.
+M2(-]>`!T#$B-=7A,B>?H`````$B)[DR)Y^@`````QD,)_TB)WDR)Y^@`````
+MZS)!QD5"`V9F9I!(@WUX`'0,2(UU>$R)Y^@`````2(GN3(GGZ`````!,B>Y,
+MB>?H`````$B+7"0(2(ML)!!,BV0D&$R+;"0@3(MT)"A,BWPD,$B#Q#C#9F9F
+MD$B#[#A(B5PD"$B);"003(ED)!A,B6PD($R)="0H3(E\)#!(B?M)B?1!OP``
+M``"^`````&9!@7PD((4`#X>?````20^W1"0@@+PX0`@``/\/A(L```!F08-\
+M)"!_=R)(#[:$.$`(``!(BY<8"0``2&G`B`$``$B+1!!(#[90".ME9D&!?"0@
+M@0!W*$D/MT0D($@/MH0X0`@``$B+EV@)``!(:<#(#P``2(M$$`@/ME`(ZS-)
+M#[=$)"!(#[:$.$`(``!(BY=`"0``2&G`T````$B+A!"(````#[90".L(9F:0
+MNO____^Y_____V9!@7PD((4`=PY)#[=$)"`/MHP80`@```^VP4AIP-````!)
+MB<5,`ZM`"0``#[;"2`^VK!C&"```2&GMJ````$B-K!V@`0``@/K_=!^`O!C&
+M"```_P^4PH#Y_P^4P`G0J`%U"$&`?"0D!G4K28-\)'@`=!-)C70D>$B)W^@`
+M````9F:09F:03(GF2(G?Z`````#IT`4``$&`?"0D`'082(GN2(G?9I#H````
+M`.FV!0``9F:09F:000^V14*#Z`V#^`0/AV\%``")P/\DQ0````!!#[9%4,'@
+M"$B82(N3P!```(N$`DP(``")!0````!$#[;(00^V15#!X`A(F$B+D\`0``"+
+MA`)$"```B04`````P>`(00G!OP````!!N`````!!O@````!!@'T[`'8R1(G*
+M9F:09I!(B=!$B?%(T_BH`704_\8/ML%)@WS%6`!T!4'_P.L"_\=!_\9%.'4[
+M=]9`A/]T!4&`34D!183`=`5!@$U)`D"`_@$/A3T!``!!O@````!!@'T[`'90
+M1(G*00^VSDB)T$C3^*@!=!R)RDB)WDB)[^@`````2(7`=!5(B6A(3(EH6.L+
+M0?_&13AU.W?-ZQA%B'5'13AU.W8.0<9%0@YF9F:0Z5L$``!%.'4[#X51!```
+M#[9U#;H!````2(G?Z`````#&1"0#`(!]#@`/AH````!,C75@3(GWZ`````!)
+MB<=)BT8(38E^"$V)-TF)1PA,B3A)@W\X`'0:28M7.$B+L]`(``"_!0```.@`
+M````08!/1`),B?J^!@```$B)[^@`````08!_>P!T&4B)W^@`````OP$```#H
+M`````$&`?WL`=>?^1"0##[9$)`,X10YWA$F#?"1X`'0-28UT)'A(B=_H````
+M`$R)YDB)W^@`````0<9%20#&10D`2(GOZ`````#IJP,``&9!@4U.@`!!O@``
+M``!!@'T[`'9-1(G*00^VSDB)T$C3^*@!=!R)RDB)WDB)[^@`````2(7`=!9(
+MB6A(3(EH6.L,0?_&13AU.W?-D.L418AU1T4X=3MV"D'&14(/Z1H#``!%.'4[
+M#X40`P``#[9U#;H!````2(G?Z`````#&1"0"`(!]#@`/AH````!,C75@3(GW
+MZ`````!)B<=)BT8(38E^"$V)-TF)1PA,B3A)@W\X`'0:28M7.$B+L]`(``"_
+M!0```.@`````08!/1`),B?J^!@```$B)[^@`````08!_>P!T&4B)W^@`````
+MOP$```#H`````$&`?WL`=>?^1"0"#[9,)`(X30YWA$F#?"1X`'0-28UT)'A(
+MB=_H`````$R)YDB)W^@`````0<9%20#&10D`2(GOZ`````#I:@(``$$/MD50
+MP>`(2)A(BY/`$```BX0"3`@``(D%`````$0/MLA!#[9%4,'@"$B82(N3P!``
+M`(N$`D0(``")!0````#!X`A!"<%!]\$```0`=`=!]D5)`7400??!___[_W01
+M0?9%20)T"D'&14(/Z<H!``!!QD5)`&9FD&:0Z>L!``!!OC]"#P!(BT4@]D`R
+M"'4E2(G?Z`````"_`0```.@`````0?_.08/^_W0*2(M%(/9`,@ATVT'&14(0
+MZ7P!``!!#[9%4,'@"$B82(N3P!```(N$`DP(``")!0`````/ML")1"0$00^V
+M15#!X`A(F$B+D\`0``"+A`)$"```B04`````#[;`P>`("40D!(M$)`2#X`^#
+M^`,/A<````!!]D5)`70,0<9%0A+K"OY-#NMF0<9%0A))#[9%1TF#?,58`'1)
+MQD0D`0"`?0X`=DE,C75@2(U]8.@`````28G'20^V14=-.7S%6'3"28M&"$V)
+M?@A-B3=)B4<(3(DX_D0D`0^V1"0!.$4.=\CK"TB)W^@`````28G'387_#X3-
+M````20^V14=-B7S%6(M$)`0E_P\``#T3`0``=0I!QH?B````".MYBT0D!"7_
+M#P``/2,!``!U:4'&A^(````)ZU]!QD5"$^M800^V15#!X`A(F$B+D\`0``"+
+MA`),"```B04`````00^V15#!X`A(F$B+D\`0``"+A`)$"```B04`````20^V
+M14F#X`&#^`$9P/?0@\`308A%0F9FD&9FD$F#?"1X`'0-28UT)'A(B=_H````
+M`$R)YDB)W^@`````3(GN2(G?Z`````!F9I!FD$B+7"0(2(ML)!!,BV0D&$R+
+M;"0@3(MT)"A,BWPD,$B#Q#C#D)"0D)"0D)"0D)"0D$B+1PA(+0`"`0"#X@?!
+MX@B`SB!(P>8(@>8`_P``B90&',4```^WA`8<Q0``9HD%``````^VP,-F9I!F
+M9I!F9I!(BT<(2"T``@$`@^('P>((B,J`SA!(P>8(@>8`_P``B90&',4``,-F
+M9I!F9I!F9I!!54%455.[`````$&[`````$&Z_____T&Y`````+T!````0;C`
+MX>0`00^VR?_!B>[3YKD`````#[;!_\")P@^OUD2)P$&)U;H`````0??UB?HI
+MPCGXN/____\/1L)$.=!S"4&)PD2)RT&)R__!@/D/=L5!_\%!@/D'=JU!#[;#
+MP>`#"=@/ML!;74%<05W#9I!(@^P82(D<)$R)9"0(3(EL)!!)B?Q,C:_`$0``
+M0`^VWKD`````N@<```")WN@/____00^V30&Z`P```(G>3(GGZ/O^__](BQPD
+M3(MD)`A,BVPD$$B#Q!C#9F9FD&9F9I!!5%5328G\NP````!`#[;NN@(```")
+M[DR)Y^B!_O__J`AT#;@`````ZQ]F9I!F9I"_`0```.@`````_\.!^P\G``!V
+MS+C_````6UU!7,-FD%.)\P^V\KH#````Z$#^__\XV`^4P`^VP%O#9F:09F:0
+M2(/L*$B)'"1(B6PD"$R)9"003(EL)!A,B70D($B)_4&)SD&)]$&)U0^VRD`/
+MMMZZ`0```(G>Z#7^__^Y0````+H"````B=Y(B>_H(?[__XG>2(GOZ#?___^Z
+M_P```(7`=7-%A?9T24'VQ0%T(T$/MM2^0````$B)[^AB____NO\```"%P'1.
+MZT=F9F:09F:000^VU+X8````2(GOZ#____^Z_P```(7`="OK)&9F9I!!#[;4
+MOB@```!(B>_H'____[K_````A<!T"V9FD&9FD+H`````B=!(BQPD2(ML)`A,
+MBV0D$$R+;"083(MT)"!(@\0HPV9F9I!F9F:09F9FD$B#["A(B5PD"$B);"00
+M3(ED)!A,B6PD($B)_4F)S8GS08G40`^V]NAD_O__NO____^%P'4Q#[;300^V
+M]$B)[^B<_O__NO____^%P'09#[;SN@$```!(B>_HT_S__T&(10"Z`````(G0
+M2(M<)`A(BVPD$$R+9"083(ML)"!(@\0HPV9F9I!F9F:09F9FD&9FD$%7059!
+M54%455-(@^P(2(G]28G/18G&08GU08G4QT0D!`````"$T@^$^````$`/MMZY
+M9````+H"````B=[HGOS__XG>2(GOZ+3]__^%P'40N@,```")WDB)[^A!_/__
+MD$$/MM1!#[;UN0$```!(B>_H^_W__[K_____A,`/A8D!``"[`````$0Y\P^-
+M=P$``$&-1O^)!"1%#[;E9F:09I`Y'"1U.[E`````N@(```!$B>9(B>_H)OS_
+M_TACRTP!^;I8````1(GF2(GOZ*#^__^%P`^%+P$``.LY9F:09F:0N40```"Z
+M`@```$2)YDB)[^CK^___2&/+3`'YNE````!$B>9(B>_H9?[__X7`#X7T````
+M_T0D!/_#1#GS?()FD.GB````OZ"&`0#HX?O__P^VR$$/MMVZ`P```(G>2(GO
+MZ)O[__^)WDB)[^BQ_/__A<!T(`^VC<$1``"Z`P```(G>2(GOZ'?[__^Z____
+M_^F8````00^VW8G:OF````!(B>_HROS__X7`=1T/MHW!$0``N@,```")WDB)
+M[^A`^___NO_____K9+L`````1#GS?3Y%#[;EN40```"Z`@```$2)YDB)[^@6
+M^___2&/+3`'YNH````!$B>9(B>_HD/W__X7`=0O_1"0$_\-$.?-\Q@^VC<$1
+M``!!#[;UN@,```!(B>_HV?K__XM4)`2)T$B#Q`A;74%<05U!7D%?PV9F9I!(
+M@^P82(E<)`A,B60D$$F)_$B)T$`/MM9!B<A(B<&^`````.BX_?__B<.Y5```
+M`+H"````O@````!,B>?H?_K__XG82(M<)`A,BV0D$$B#Q!C#9F9FD&9F9I!F
+M9I!F9I!(@^P82(E<)`A,B60D$$F)_$B)T$`/MM9!B<A(B<&^`0```.A8_?__
+MB<.Y5````+H"````O@$```!,B>?H'_K__XG82(M<)`A,BV0D$$B#Q!C#9F9F
+MD&9F9I!F9I!F9I!(@^PX2(E<)`A(B6PD$$R)9"083(EL)"!,B70D*$R)?"0P
+M28G\28G/18G%B?5!B=9`#[;>N60```"Z`@```(G>Z+OY__^)WDR)Y^C1^O__
+MA<!U#[H#````B=Y,B>?H7OG__T$/MM9`#[;UN0$```!,B>?H&?O__[K_____
+MA,!U1^L.NO_____K/F9F9I!F9I"[`````$0YZWTH0`^V[6:02&/#0@^V%#BY
+M`````(GN3(GGZ-GZ__^$P'7'_\-$.>M\WKH`````B=!(BUPD"$B+;"003(MD
+M)!A,BVPD($R+="0H3(M\)#!(@\0XPV9F9I!(@^P82(E<)`A,B60D$$F)_$B)
+MT$`/MM9!B<A(B<&^`````.CH_O__B<.Y5````+H"````O@````!,B>?HS_C_
+M_XG82(M<)`A,BV0D$$B#Q!C#9F9FD&9F9I!F9I!F9I!(@^P82(E<)`A,B60D
+M$$F)_$B)T$`/MM9!B<A(B<&^`0```.B(_O__B<.Y5````+H"````O@$```!,
+MB>?H;_C__XG82(M<)`A,BV0D$$B#Q!C#9F9FD&9F9I!F9I!F9I!!5T%6055!
+M5%532(/L*$B)="0@3(MV*$G_QD4/ME8"QD0D'P!(QT0D$`````!!N`````!(
+MB[?0"```N8#___]%#[;*#[;!9@^VE#!`"```9H'Z_P!T2D2)P$'_P$0YR'4_
+M@/F!=Q@/M\)(:<#(#P``2`.&:`D``$B)1"00ZR)(BT0D(,=`4/____](B<?_
+M4$BX`````.F[`0``9F:09F:0_\&`^85VG$B+M]`(``!(@<8`%```N8#___]!
+M#[;Z9I`/ML%F#[:4,$`(``!F@?K_`'1#1(G`0?_`.?AU.8#Y@7<8#[?"2&G`
+MR`\``$@#AF@)``!(B40D$.L<2(M$)"#'0%#_____2(G'_U!(N`````#I/P$`
+M`/_!@/F%=J-!#[96!$4/MFX%0<'E$$$/MD8&P>`(00G%00^V1@=!"<5%#[9F
+M"$'!Y!!!#[9&"<'@"$$)Q$$/MD8*00G$2(-\)!``#X3,````0;\`````2(M$
+M)!"`>%@`#X:W````2(G#2(/#2`^VTHE4)`QF9F:09F:02(G?Z`````!(C6CP
+M2(M3"$B)0PA(B1A(B5`(2(D"#[9%03P-#Y3"/"(/E,`)T*@!=%Y!#[9&`X/X
+M.W0C@_@\=4_&1"0?`4R+1"0@1(GI1(GBBW0D#$B)[^@`````ZS%(B[T@`0``
+M1(GJ28UV"^@`````3(M$)"!$B>E$B>*+="0,2(GOZ`````#&1"0?`6:00?_'
+M2(M$)!!$.'A8#X=>____N`$```"`?"0?`'472(M$)"#'0%#_____2(G'_U!(
+MN`````!(@\0H6UU!7$%=05Y!7\-F9F:09F9FD&9F9I!(@^Q(2(E<)!A(B6PD
+M($R)9"0H3(EL)#!,B70D.$R)?"1`28G_28GT3(MN*$G_Q8M&'/_(B40D%,=$
+M)!``````2(M6,$B)5"0(08!]`0%U$,=&4`````#I.P(``&9F9I!!@'T!`G59
+M08!]`@%F9F:0=3Y(@[_8"````'0'3(N_V`@``$F+A]`(``!!#[95`XB0[A,`
+M`$$/ME4#B)#N)P``0<=$)%``````Z>D!``!FD,=&4/[____IVP$``&9F9I!!
+M@'T!!'4900^V10.#Z#L\`7<-Z+C\___IU0$``&9FD$&`?0$#=6Y!@'T"`69F
+M9I!U54$/MDT#00^V1SZ--`")R)GW_HG1.=9^+T$/ME4$#[;9B=Y,B?_H````
+M`$$/ME4$B=Y,B?_H`````$''1"10`````.E>`0``0<=$)%#^____Z5`!``!!
+MQT0D4/[____I0@$``$F#O]@(````=`=-B[_8"```3(GK08!]`0`/A*X````/
+MMBM(_\,/M@-(_\.)P0^VT/;"`70[1(MT)!!!`>Y%.W0D(`^'V0```(M,)!!(
+M`TPD"$&)Z+X`````3(G_Z$KW__\YZ`^%N````$2)="00ZU-(8\5,C3083(GP
+M3"GH2(/``DAC5"042#G0#X^2````#[;108GH2(G9O@````!,B?_HYOG__X7`
+M=7A,B?-!@#X`=0=!@'X!`'04OQ`G``#H`````(![`0`/A5+___\/MBN%[717
+MN50```"Z`@```+X`````3(G_Z*#S__]!BT0D("M$)!`YQ0]'Z(M,)!!(`TPD
+M"$&)Z+H`````O@````!,B?_HE/;__X7`>`8!1"00ZPI!QT0D4/____^0N50`
+M``"Z`@```+X`````3(G_Z$GS__])@WPD.`!T"TF+1"0XBU0D$(D03(GG0?]4
+M)$A(BUPD&$B+;"0@3(MD)"A,BVPD,$R+="0X3(M\)$!(@\1(PV9F9I!F9F:0
+M9F:02(/L"$B#O]@(````=`=(B[_8"```@+_N$P```'4BQ@4``````;D@````
+M2,?"`````+X.````Z`````!F9I!FD$B#Q`C#9F9FD&9F9I!F9I!(@^P(2(._
+MV`@```!T!TB+O]@(``#&!0``````N2````!(Q\(`````O@X```#H`````$B#
+MQ`C#9F:09F:09F:02(/L&$B)'"1,B60D"$R);"0028G]#[;:1`^VYDB+O]`(
+M``")VD2)YN@`````B=I$B>9,B>_H`````$B+'"1,BV0D"$R+;"002(/$&,-F
+M9I!(BT<(9L>`;/[__^R82(M'"&:)L&C^___#9F9FD&9FD$B#[`B)\8G6N```
+M``"P`K0#2"7__P#_2`T```4`2+K___\`_____T@AT$@-````!DBZ_____P#_
+M__]((=!(N@`````'````2`G02+K______P#__T@AT$BZ```````+``!("=!(
+MNO_______P#_2"'02+H````````,`$@)T$BZ_________P!((=!(N@``````
+M```/2`G02(D$)(#Y!W=`0(3V=!H/ML$/M@P$N/[____3P&8AA^P3``#K&&9F
+MD`^VP0^V#`2X`0```-/@9@F'[!,```^WM^P3``#H`````$B#Q`C#9F9FD&9F
+MD&9FD$%455-(B?U(@[_8"````'0'2(NOV`@``$&\`````$$/MMRY`````+H'
+M````B=Y(B>_HVO#__[E$````N@(```")WDB)[^C&\/__N=````"Z`````(G>
+M2(GOZ++P__^Y`````+H$````B=Y(B>_HGO#__T'_Q$&#_`%VH[^@A@$`Z+OP
+M__^(A<$1```/MLBZ`P```+X`````2(GOZ'#P__];74%<PY"0D)"0D)"0D)"0
+M2(M'"$@M``(!`(GVBP0&B04`````PV9F9I!F9I!F9I!(BT<(2"T``@$`B?:)
+M%`;#4TB)^TB+5PC'@H#^__\`````BX($____B04`````@,P!B8($____N@0`
+M``"^#,(``.@`````NK@+``"^",(``$B)W^@`````N@$`#`"^`,(``$B)W^@`
+M````N@0```"^#,,``$B)W^@`````NK@+``"^",,``$B)W^@`````N@$`#`"^
+M`,,``$B)W^@`````N@````"^4,(``$B)W^@`````N@````"^4,,``$B)W^@`
+M````2(M#"&;'@$S^__\``$B+0PAFQX!L_O__[)A(BT,(9L>`:/[__^R89L>#
+M[!,``/__6\-F9F:09F:09F:02#F_T`@``$$/E<"#Y@.--':X!P```(GQT^#W
+MT$&)P40C3U1$B4]4A-)T#;@$````T^!$"<B)1U2+5U1!#[;PP>8(@<90P@``
+M2(N_T`@``.@`````\\-F9F:09F:09F:02(/L&$B)'"1(B6PD"$R)9"002(G]
+M2(GS2(V/*!(``$B+EV@)``!,C:(XN`\`9H%^((4`=QE(#[=&($@/MH0X0`@`
+M`$AIP,@/``!,C20"2(M32(!Z`0)U#TB+0@1(B0%(BT(,2(E!"$B#>W@`=!)(
+MBW-X2(GOZ`````!F9I!F9I!(B=Y(B>_H`````$'&1"1<`$B+'"1(BVPD"$R+
+M9"002(/$&,-F9F:09F9FD&9F9I!(@^PX2(E<)`A(B6PD$$R)9"083(EL)"!,
+MB70D*$R)?"0P2(G]08GU08G608G/2(M'"$R+($R)Y^@`````2(G#2(7`='Q,
+MB>?H`````$B)PDB%P'1LQD5<`4B->UC&0SCAQD,Y`<9#.A#&0R6[9@^V15MF
+MB4,@3(EC*,=#-)````!(C4(02(E#2$B)4WC&0`$"QD(00$2(:`)$B'`#1(AX
+M!$C'@Z``````````O@````#H`````$B)WDR)Y^@`````2(M<)`A(BVPD$$R+
+M9"083(ML)"!,BW0D*$R+?"0P2(/$.,-F9F:09F9FD&9F9I!!5T%6055!5%53
+M2(/L"$B)_4&)]D&)UT&)S4B+1PA,BR!,B>?H`````$B)PTB%P`^$\````$R)
+MY^@`````2(G"2(7`#X3<````QD5<`4B-0UA(B00DQD,XX<9#.0'&0SH0QD,E
+MNV8/MD5;9HE#($R)8RC'0S20````2(U"$$B)0TA(B5-X2(G&N0````"ZD```
+M`(@(2/_`2/_*=?;&1@&"Q@9`1(AV`D2(?@-$B&X$08#]`G<A2HT4K0````"!
+MXOP#``!(C7X(28VT)"@2``#H`````.LK28N$)"@2``!(B48(00^VU8T4E?C_
+M__](8])(C7X028VT)#`2``#H`````$C'@Z``````````O@````!(BSPDZ```
+M``!(B=Y,B>?H`````$B#Q`A;74%<05U!7D%?PV9F9I!F9F:09F9FD$%6055!
+M5%532(G[08G6B?#`Z`)!B<1!O0,```!!(?5(BT<(2(LHN0(```"Z`````+X`
+M````Z`````"`>UP`=!A(B>_H`````+\!````Z`````"`>UP`=>A(BT,(2(L0
+M2('"*!(```^V0@*$P'A"@\B`B$("N0$```"Z`````+X`````2(G?Z`````"`
+M>UP`=!](B>_H`````+\!````Z`````"`>UP`=>AF9F:09F:000^VU+D!````
+MO@,```!(B=_H`````(![7`!T'&9F9I!(B>_H`````+\!````Z`````"`>UP`
+M=>A(BT,(2(LP2('&*!(``$$/ML6Y`P```"G!2&/)183V#Y7"#[;2P>(#BP0.
+M@^#G"=")!`Y!#[;4N0$```"^`P```$B)W^@`````6UU!7$%=05[#D)"0D)"0
+M3(N'&`D``&:!?B"%`'<A2`^W1B!(#[:$.$`(``!(:<"(`0``28T\`.L-9F:0
+M9F:028VX>(8!`$R-@B`$``#&@B`$```G9H%^..$!=2L/MD8Z_\@\`7<)#[96
+M.^LK9F:09H%^..$!=1`/MD8Z@^@1N@\````\`780N@````!(@W]8`'0$#[97
+M>8/B#T$/MD`!@^#P"=!!B$`!N@````!F@7XXX0%U"@^V1CK_R#P!=@6Z`0``
+M`,'B!T$/MD`!@^!_"=!!B$`!#[9!!D&(0`(/M@%!B$`##[9!!4&(0`</MD$'
+M08A`#P^V00)!B$`$#[9!`T&(0`4/MD$$08A`!@^V00%!B$`,#[9!"D&(0`@/
+MMD$+08A`"0^V00Q!B$`*#[9!"$&(0`L/MD$)08A`#<-FD%-(B?-(BT](3(L!
+M#[9&.(/X+P^$?0```(/X+W\S@_@;#X1.`0``@_@;?PR#^!)FD'1CZ5D!``"#
+M^"AF9I!F9I!T4X/X*G1.Z40!``!F9F:0/8H```!T/CV*````9F9FD'\5@_@U
+M#X0)`0``/8@```!T(^D9`0``/8\```!F9F:0=!,]X0````^$C````&9FD.G[
+M````]D=@`69F9I!F9I!T"H&+E```````!`#V1V(0#X3J````#[9#.#PH#Y3"
+M/"H/E,`)T*@!=1:`>SB(=!"`>SB*#X7&````9F:09F:0]D$,`74:#[9Q"$R)
+MQ^@`````A,`/A*8```!F9I!F9I"`>R2!#X26````@8N4```````!`.F'````
+MN`````"`?CD!#X5]````#[9..H/Y''<\N`$```!(T^"I]C_`'74;J0A`!@!U
+M"ZD``"``=19FD.L;@XZ4````".M%@XZ4`````>L\@XZ4````(.LSN`````#K
+M,?9'8`%T"H&+E```````!`"#BY0````!ZQ-F9I"X`````/:#E@```"!T!V:0
+MN`$```!;PV9FD&9FD&9FD$`/ML?#9F9FD&9F9I!F9I")^`^VQ,-F9F:09F:0
+M9F:0QD<D`DB+1U!`B'`"2(M'4,9`!P!(BT=0B%`,PV9F9I`/MD<]B$8"#[9'
+M/(A&`P^V1SN(1@0/MD<ZB$8*PV9FD`^V1T&(1@(/MD=`B$8##[9'/XA&!`^V
+M1SZ(1@H/MD<]B$8+#[9'/(A&#,-F9I!FD+D`````.=%]'&9F9I!F9I")T"G(
+M@_@"#YW`#[;`C4P!`3G1?.OSPV9FD&9FD&9FD$B#["A(B1PD2(EL)`A,B60D
+M$$R);"083(ET)"!(B?M(B=5!B?8/MD<X@_@J="F#^"I_#8/X*'0?Z?,```!F
+M9I`]B````'0I/8H```!F9F:0=![IV0```$0/MF-`1`^V:S](B>Y(B=_H````
+M`.L79I!$#[9C140/MFM$2(GN2(G?Z`````#&105`]H.6`````70U1(AE`$2(
+M;0A"C03U`````(A%`0^V0S@\*`^4PCR(#Y3`"="#X`&#^`$9P/?0@\!AB$4&
+MZVGV@Y8````$=#!$B&4!1(AM"0^V0S@\*`^4PCR(#Y3`"="#X`&#^`$9P(/@
+M$(/`)8A%!NLU9F:09I!$B&4!#[9#.H/@#PA%!0^V0S@\*`^4PCR(#Y3`"="#
+MX`&#^`$9P(/@`H/H.(A%!I!(BQPD2(ML)`A,BV0D$$R+;"083(MT)"!(@\0H
+MPV9FD%532(/L*$B)\TB+=DA(B>?\N00```"X`````/-(J_:&IP````1T#$B+
+MEL@```!(_\KK!8M6>/_*@'LX)75BO0@```!(B=!(P>@8B`0D2(G02,'H$(A$
+M)`%(B=!(P>@(B$0D`HA4)`/VAM4````0=0_&1"0&`L9$)`<`Z:<```!(@<;J
+M````2(U\)`2Z!````.@`````Z8P```!F9I!F9I"](````$B)T$C!Z#B(!"1(
+MB=!(P>@PB$0D`4B)T$C!Z"B(1"0"2(G02,'H((A$)`-(B=!(P>@8B$0D!$B)
+MT$C!Z!"(1"0%2(G02,'H"(A$)`:(5"0']H;5````$'42QD0D"@+&1"0+`.L<
+M9F:09F:02('&Z@```$B-?"0(N@0```#H`````$B+>TA(8]5(B>;H`````$B#
+MQ"A;7<-F9F:0#[9'.@I'.PI'/`I'/0^VP`^V5T"#X@$)T'05NB0```"^!0``
+M`.@`````\\-F9F:0QD8&[$C'AZ``````````PTB#["!(B1PD2(EL)`A,B60D
+M$$R);"082(G[2(GU#[9'.(/X+W0*/8\```!T%>M3D$0/MF=`1`^V;S_H````
+M`)#K#T0/MF=%1`^V;T3H`````,9%!4#V@Y8````$=!)$B&4!1(AM"<9%!D+K
+M%F9F9I!$B&4!#[9#.H/@#PA%!<9%!D!(BQPD2(ML)`A,BV0D$$R+;"082(/$
+M(,-F9I!F9I!(B?'&0@5`#[9&.(/X-700/9$```!T(>LG9F9FD&9FD$@/MT=@
+M@^`!@_@!&<"#X/V#Z!:(0@;K',9"!NKK%F:0NB0```"^!0```$B)S^@`````
+M\\/V03D"=`3&020`\\/V1SSP=`^Z)````+X%````Z`````#SPV9FD&9FD&9F
+MD$F)\D&Y`````$&X#0```$B)R$2("$C_P$G_R'7U00^V0CB#^#4/A)T```"#
+M^#5_+(/X*'1P@_@H?Q&#^!MF9I`/A)(```#IM0(``(/X*F:0=%.#^"]T8>FD
+M`@``/8\```!T53V/````?QL]B````)!T,SV*````="QF9F:09F:0Z7L"```]
+MD0```&9FD&9FD'0V/>$```!T:&9F9I!F9I#I6P(```^V\DB)RDR)U^@`````
+MZ4X"``!(B<Y,B=?H`````.D^`@``2(G*3(G6Z`````#I+@(``$'V0CP!=!G&
+M009PQD$$`,9!`P#&00(`QD$%0.D.`@``QD$&X.D%`@``N`````!!@'HY`0^%
+M^@$``$$/MD(Z@_@<#X?5`0``B<#_),4`````QD$'!.G5`0``QD$'`.G,`0``
+MQD$&[&:0Z<$!``#&00;OQ@$#00^V0CN#R$"(00'IJ@$``,9!!N_&`0?IG@$`
+M`,9!!D#&00$!QD$%0.F-`0``QD$&[\8!`T$/MD([@\@(B$$!Z78!``#&00;O
+MQ@$"Z6H!``#&00;OQ@&"Z5X!``#&00;OQ@$&Z5(!``#&00;OQ@&&Z48!``#&
+M00;C00^V0CN(00'I-0$``,9!!K#&`=C&00-/QD$$PNDA`0``QD$&L,8!V<9!
+M`T_&003"Z0T!``#&00:PQ@':QD$#3\9!!,+I^0```$@/MT=@@^`!@_@!&<"#
+MX/V#Z!:(00;IW@```,9!!N_&`:KIT@```,9!!N_&`57IQ@```,9!!B_&00$!
+MQD$"$.FU````QD$&Y$$/MD(\B`%!#[9".XA!!>F=````00^V0CN(009!#[9"
+M/(@!00^V0CV(00)!#[9"/HA!`T$/MD(_B$$$00^V0D&(00I!#[9"0(A!`>MD
+MQD$&Z$$/MD(\B`%!#[9".XA!!4$/MD(]B$$"00^V0CZ(00-!#[9"/XA!!$$/
+MMD)`B$$!ZR]!]D(\`70HQD$&<,9!!`#&00,`QD$"`,9!!4#K$K@`````PV9F
+MD&9FD+@`````P[@!````\\.0D)!!5%53B?5,BV<(28'L``(!`+L`````.?-S
+M-F9FD&9FD$&+A"0`R```B04`````J`%U#K@`````ZQQF9F:09F:0OPH```#H
+M`````/_#.>MRT+C_____6UU!7,-F9I!F9I!(BW\(2('O``(!``^VTL'B"$4/
+MML!!P>`$1`G"B="#R`2$R0]%T$&#^?]T$42)R"7__P,`B8<$R```@\H"B1;#
+M2(M'"(/.`8FP`,;__\-FD$B#["A(B5PD$$B);"083(ED)"!(B?M)B?1(BV\(
+M2(N'^!,```^V4`)!N?____]!N`$```"Y`0```$B-="0,Z&W___^+="0,2(G?
+MZ*'___^^$"<``$B)W^CT_O__NO____^%P'49BX4,QO__B04`````B40D#$&(
+M!"2Z`````(G02(M<)!!(BVPD&$R+9"0@2(/$*,-F9F:09F9FD&9F9I!!5D%5
+M05154TB#[!!)B?R)S4&)]D&)U;L`````.<MS-$B-="0/3(GGZ#/___^%P'43
+M1(GP(D0D#T0XZ'4'N`````#K%;\*````Z`````#_PSGK<LRX_____TB#Q!!;
+M74%<05U!7L-F9F:09F:09F:04TB#[!!(B?M(BX?X$P``#[800;G_____0;@`
+M````N0````!(C70D#.AS_O__BW0D#$B)W^BG_O__OA`G``!(B=_H^OW__[K_
+M____A<!U'KG@DP0`N@(```"^`P```$B)W^@J____@_@!&=+WTHG02(/$$%O#
+M9F9FD&9F9I!F9I!54TB#[`A(B?M(B=5(BX?X$P``#[90"T&)\4&X`0```+D!
+M````2(UT)`3H\?W__XMT)`1(B=_H)?[__[X0)P``2(G?Z'C]__^Z_____X7`
+M=1A(BT,(BX`,QO__B04`````B$4`N@````")T$B#Q`A;7<-F9F:09F9FD&9F
+MD&9FD%532(/L"$B)^XGUQD0D!_](C50D!^@`````NO____^%P'5^N@````"`
+M?"0'`'1R2(G?Z,G^__^)PH/X_W1C2(N#^!,```^V4`I!B>E!N`````"Y````
+M`$B)YDB)W^@^_?__BS0D2(G?Z'/]__^^$"<``$B)W^C&_/__NO____^%P'4>
+MN>"3!`"Z`````+X#````2(G?Z/;]__^#^`$9TO?2B=!(@\0(6UW#9F:09F:0
+M55-(@^P(2(G[B?7H0/[__XG"@_C_=&9(BX/X$P``#[90!D&)Z4&X`````+D`
+M````2(UT)`1(B=_HL_S__XMT)`1(B=_HY_S__[X0)P``2(G?Z#K\__^Z____
+M_X7`=1ZYX),$`+H`````O@,```!(B=_H:OW__X/X`1G2]]*)T$B#Q`A;7<-F
+M9F:09F:09F:02(/L*$B)7"0(2(EL)!!,B60D&$R);"0@2(G]08GU08G42(M?
+M".B6_?__1(FC",;__TB+A?@3```/ME`%18GI0;@$````N0````!(C70D!$B)
+M[^@)_/__BW0D!$B)[^@]_/__OA`G``!(B>_HD/O__[K_____A<!U'KF($P``
+MN@````"^`0```$B)[^C`_/__@_@!&=+WTHG02(M<)`A(BVPD$$R+9"083(ML
+M)"!(@\0HPV9F9I!F9F:09F:09F:02(/L*$B)'"1(B6PD"$R)9"003(EL)!A,
+MB70D($F)_D&)]4F)U(G-NP`````YRW,?B=A"BQ0@08UT'0!,B??H_?[__X/X
+M_W0,@\,$.>MRX;@`````2(L<)$B+;"0(3(MD)!!,BVPD&$R+="0@2(/$*,-F
+M9F:09F9FD&9F9I!F9I!(@^PH2(E<)!!(B6PD&$R)9"0@2(G[28G42(MO"$B!
+M[0`"`0"`^06X!`````]#R$B+A_@3```/ME`$08GQ1`^VP;D!````2(UT)`SH
+MT/K__XMT)`Q(B=_H!/O__[X0)P``2(G?Z%?Z__^Z_____X7`=1F+A0S(``")
+M!0````")1"0,08D$)+H`````B=!(BUPD$$B+;"083(MD)"!(@\0HPV9F9I!F
+M9F:09F9FD&9FD$B#[#A(B5PD"$B);"003(ED)!A,B6PD($R)="0H3(E\)#!)
+MB?Y!B?1(B=5%C3P,B?.#X_Q!B?5!@^4#=$FY!````$B-5"0$B=[H`O___XU#
+M!+D$````1#GX=@E$B?E$*>%$`>E$B>I!.<US%TB-="0$B=`/M@0&B$4`2/_%
+M_\(YRG+N@\,$18G]08/E_$0YZW,GN00```!(C50D!(G>3(GWZ*K^__^+1"0$
+MB44`2(/%!(/#!$0YZW+91#G[<SFY!````$B-5"0$B=Y,B??H?O[__T2)^2G9
+MN@`````YRG,72(UT)`2)T`^V!`:(10!(_\7_PCG*<NZX`````$B+7"0(2(ML
+M)!!,BV0D&$R+;"0@3(MT)"A,BWPD,$B#Q#C#D%532(/L"$B)^\=$)`0`````
+M2(MO",:'\!,````/MA4`````0;D`````0;@"````N0$```!(C70D!.@2^?__
+MBW0D!$B)W^A&^?__OA`G``!(B=_HF?C__X7`=3N+A0S&__^)!0````")1"0$
+M/;]#``!U),>#X!,``+]#``#'@^03`````"``QX/H$P```!```&:X``#K!;C_
+M____2(/$"%M=PV9F9I!F9F:09F:09F:055-(@^P(2(G[QT0D!`````!(BV\(
+MQH?P$P````^V%0````!!N0````!!N`(```"Y`0```$B-="0$Z&+X__^+="0$
+M2(G?Z);X__^^$"<``$B)W^CI]___A<!U.XN%#,;__XD%`````(E$)`0]'V,`
+M`'4DQX/@$P``'V,``,>#Y!,`````!`#'@^@3``````$`9K@``.L%N/____](
+M@\0(6UW#9F9FD&9F9I!F9I!F9I!54TB#[`A(B?O'1"0$`````$B+;PC&A_`3
+M```!#[85`````$&Y_____T&X`@```+D!````2(UT)`3HLO?__XMT)`1(B=_H
+MYO?__[X0)P``2(G?Z#GW__^%P'5JBX4,QO__B04`````B40D!#T?0P``="X]
+M'T0``'5,QX/@$P``'T0``,>#Y!,`````!`#'@^@3``````$`9K@``.LM9F:0
+MQX/@$P``'T,``,>#Y!,`````!`#'@^@3``````$`N`````#K!;C_____2(/$
+M"%M=PV9F9I!F9F:09F9FD&9FD%532(/L"$B)^\=$)`0`````2(MO",:'\!,`
+M```/MA4`````0;D`````0;@"````N0$```!(C70D!.C2]O__BW0D!$B)W^@&
+M]___OA`G``!(B=_H6?;__X7`=76+A0S&__^)!0````")1"0$/>\1``!T#CWO
+M$@``="SK569FD&:0QX/@$P``[Q$``,>#Y!,`````!`#'@^@3``````$`N```
+M``#K,,>#X!,``.\2``#'@^03``````0`QX/H$P`````!`+@`````ZPMF9I!F
+M9I"X_____TB#Q`A;7<-F9F:04TB)^^B'_?__A<!U$TC'@_@3````````N@``
+M``#K89!(B=_H&/[__X7`=1)(QX/X$P```````+H`````ZT)(B=_HFOS__X7`
+M=1)(QX/X$P```````+H`````ZR1(B=_HO/[__[K_____A<!U$TC'@_@3````
+M````N@````!F9I")T%O#9F9FD&9F9I!F9F:02(/L*$B)7"0(2(EL)!!,B60D
+M&$R);"0@2(G[B?5!B<U)B=2Z`````$B#O_@3````#X2Z````183`="V#_O]U
+M$0^WA^`3``!F08D$).F6````3(GBZ-?Z__^Z`````(7`#X6*````ZW^#_O]F
+M9I!FD'4308`\)`\/E(?Q$P``N@$```#K:[H`````@+_Q$P```'1=B?"Z````
+M`/>WZ!,``(72=2J`O_`3````=`[H`````+H`````A<!U-8GN2(G?Z.OW__^Z
+M`````(7`=2)$B>E,B>*)[DB)W^@B^?__N@````"%P'4)N@$```!F9F:0B=!(
+MBUPD"$B+;"003(MD)!A,BVPD($B#Q"C#D)"0D)!!5T%6055!5%532(L'BX!@
+M`/__B04`````@^`#=`>#^`%T#^M)QX?H"````@```)#K/(L%`````$ACT$B)
+M/-4`````_\")!0````"+!0````!(8]!(B3S5`````/_`B04`````QX?H"```
+M`0```(L%`````$ACT$B)/-4`````_\")!0````"`/0``````#X6H````0;T`
+M````A<`/CIT"``!(@ST``````'0W1(GH#[;02,?&`````$B+#0````!(.PS6
+M=!U(BP362(F(V`@``$B+%-9(BP4`````2(F"V!P``$B#/0``````=#=$B>@/
+MMM!(Q\8`````2(L-`````$@[#-9T'4B+!-9(B8C@"```2(L4UDB+!0````!(
+MB8+@'```0?_%00^VQ3L%``````^,:____^D#`@``0;T`````3(L5`````$V%
+MT@^$[0```$&_`````$G'Q@````!!N`````!$.ST`````#XVW````2<?$````
+M`&9F9I!F9I!$B<`/MM!)BP342(.XV`@````/A7X```!,.=!T>;L`````#[8-
+M`````(3)=&E$B<)$#[;*2,?%`````$G'PP````!*BW3-`#A..7(W#[96.0^V
+MP8G'`ST`````.?IS)$$X2CER'D$/MD(Y.?AS%4R)EM@(``!*BT3-`$R)D-@<
+M``#K$__##[;#2,'@!4(/MDP8#83)=:Q!_\!!#[;`.P4`````#XQ7____0?_%
+M1(GJ#[;"38L4QDV%T@^%(/___T&]`````$R+%0````!-A=(/A.H```!!OP``
+M``!)Q\8`````0;@`````1#L]``````^-M````$G'Q`````!F9F:01(G`#[;0
+M28L$U$B#N.`(````#X5^````3#G0='F[``````^V#0````"$R71I1(G"1`^V
+MRDC'Q0````!)Q\,`````2HMTS0`X3CER-P^V5CD/ML&)QP,]`````#GZ<R1!
+M.$HY<AY!#[9".3GX<Q5,B9;@"```2HM$S0!,B9#@'```ZQ/_PP^VPTC!X`5"
+M#[9,&`V$R76L0?_`00^VP#L%``````^,5____T'_Q42)Z@^VPDV+%,9-A=(/
+MA2/___];74%<05U!7D%?PV9FD&9FD%.[`````+@!````@#T``````'1IZPJX
+M`0```.M@9F:0#[;#2,'@!?_##[:(`````(3)=$1$BPT`````2<?"`````#A/
+M.7(>#[97.0^VP4:-!`A$.<)S#CA..7()#[9&.40YP'*Q#[;#2,'@!?_#0@^V
+M3!`-A,EURK@`````6\.0BX?H"```N@$````[AN@(``!W#HN'Z`@``#N&Z`@`
+M`!G2B=##9F9FD&9F9I!F9F:0N``````[/0````!]-TACQTC'P0````!(C01`
+M2,'@`P^W%`AFB18/MU0(`F:)5@(/ME0("(A6"`^V1`@)B$8)N`$```#SPV9F
+M9I!F9I!F9I!!5D%505154TB#[`B)?"0$O0````!)Q\8`````2<?%`````$AC
+MQ4B)PDC!X`5F0H,\,``/A+$```!!N@````!-B>A"@'PH#``/A)$```!(Q\,`
+M````_$&\`````$F)TY!)B=%)8\)(C0302(TT@TB-?"0$N00```#SI@^7P@^2
+MP#C"=3Q,B<9,B<E(P>$%0@^V1`$-_\!"B$0!#4*`?`$,`'0=0CI$`0QV%F8/
+MML!F0@^V?`$,1(GB9O?WB%0Q#9!!_\),B=I)Q\``````3(G82,'@!4(/MD0`
+M#$0YT'^!_\6#_0,/CCG___](@\0(6UU!7$%=05[#9F:09F:09F:005=!5D%5
+M05154TB#[!C&1"07`$&_``````^V1"07B40D#$&^`````$$/MM^)7"0000^V
+MUKD`````BW0D$(M\)`SH`````$&)Q$&Y`````$0[#0`````/C4H!``!(Q\4`
+M````26/!2(T$0$C!X`,/MU0H`L'B$`^W!"@)PD0YX@^%$0$``+L`````2<?#
+M`````$ECP4B-!$!(C33%`````$G'Q0````!)Q\(`````9I`/MM-(B=%(P>$%
+M9D*#/!D`=5)(BX8`````2HD$&8N&`````$*)1!D(2@^V1"D,2,'B`TB-!`(/
+MMEPD%T&(7(,-2@^V1"D,2(T$`D6(?(,.2@^V1"D,2`'"18ATDP]"_D0I#.MW
+M#[;[2<?``````$B)^4C!X05"#[9$`0RZ`````$+W=!8$A=)T1TH/MD0!#$B-
+M%/T`````2(T$`@^V7"0708A<@PU*#[9$`0Q(C00"18A\@PY*#[9$`0Q(`<)%
+MB'23#T+^1`$,ZQ)F9F:09F:0_\.`^P,/AB7___])8\%(C01`_T3%#$'_P40[
+M#0`````/C+W^__]!_L8/A('^__]!_\=!@/\?#X9F_O___D0D%X!\)!?_#X5(
+M_O__2(/$&%M=05Q!74%>05_#9F:09F:005=!5D%505154TB#[`A(B?-)B=1!
+MO0````"#/0``````=0_'!0`````!````Z.[]__](A=MT`\8#`$&Z`````$0[
+M%0````!].TC'P0````!(Q\8`````26/"2(T$0$B-%,4`````1`-L"@Q(A=MT
+M"`^V`P($,H@#0?_"1#L5`````'S3387D#X2K````0;H`````26/"2(G"2,'@
+M!6:#N```````#X2-````0;@`````@+@``````'1Q2,?%`````/Q)Q\<`````
+M28G62<'F!4F)TTF)T4ECP$B-!-!(C72%`$R)Y[D$````\Z8/E\(/DL`XPG4<
+M2(7;=`],B<A(P>`%0@^V1#@-B`-'#[9L/@SK&4'_P$R)VDR)V$C!X`4/MH``
+M````1#G`?ZA!_\)!@_H##XY;____00^VQ4B#Q`A;74%<05U!7D%?PV9FD&:0
+MN``H``##9F9FD&9FD&9FD+C0````PV9F9I!F9I!F9I"X"````,-F9F:09F:0
+M9F:0059!54%455-)B?Q!B?5(B=-)B<Y(C:H`%```N0````"Z`"@``$B)V(@(
+M2/_`2/_*=?9,B7,@BQ4`````C4(!B04`````B%-`1(EK.,9#00!!#[<$)&:)
+M0S!!#[=$)`)FB4,R08M$)`2)0S1,B74@B%5`1(EM.,9%00%!#[<$)&:)13!!
+M#[=$)`)FB44R08M$)`2)130/MT,R/2(G``!_:ST@)P``#XWU````/4`A```/
+MA.H````]0"$``&9FD&:0?QL]("$```^$TP```#TB(0``#X3(````Z=<````]
+M1"$```^$N````#U$(0``9F:0#XR^````+1`G``"#^`%FD`^'K@```.F5````
+M/6`G```/A(H````]8"<``&9FD&:0?S`]0"<``'1W/4`G``!FD'\0/3`G``!T
+M9V9F9I!F9I#K<CU$)P``=%=F9F:09F:0ZV(]@B<``'1'/8(G``!FD'\0/8`G
+M``!T-V9F9I!F9I#K0CV`D0``=`L]@)0``&:0=![K,&;'0SR`D<9#/@1FQT4\
+M@)'&13X$ZQIF9I!F9I!FQT,\@)3&0SX$9L=%/("4QD4^!$$/MD0D"(A#0D$/
+MMD0D"(A%0KD```0`N@````"^`@```$R)]^@`````2(D#N0`@``"Z`````+X`
+M````3(GWZ`````!(B4,02(,[`'0%2(7`=0JX`````.GQ````2(L#2(V(``(!
+M`$B)2PA(C9````(`2(D32`4`0`(`2(E%`$B)30A(BT,02(E%$$&X`````$0[
+M!0````!]5DC'QP````!$BPT`````26/`2(T$0$B-#,4`````08L$)#D$.74H
+M2,?&`````(L$,?_`B00Q@WPY#`!T$CM$.0QV#+H`````]W0Y#(D4,4'_P$4Y
+MR'RX2(M#",>`((+__P'P`P!(BT,(QX`H@O__`0``Z$B+>R"^>````.@`````
+MB<(E`'```#T`(```=A$/MO)(BWL@NG@```#H`````$2)[^BL^/__2(G?Z%3T
+M__^X`0```%M=05Q!74%>PV9FD&9FD%-(B?OH`````$B!PP`4``!(B=_H````
+M`+@!````6\.02(/L&$B)7"0(2(EL)!!(B?U(BY_0"```2('#`!0``.@`````
+M@'U1`74&@'M1`70[2(V=<`$``$B+?2A(B=[H`````,>%<`$``.@#``!(QX6`
+M`0```````$B)K8@!``!(BWTH2(G>Z`````!(BUPD"$B+;"002(/$&,-F9I!F
+M9I!54TB#[`A(B?M(C:\`%```Z`````!(B4,H2(E%*$B)F]`(``!(B9W0"```
+MBX/H"```B87H"```2(G?Z`````!(B>_H`````$B)W^@`````N@````"$P'1^
+M2(GOZ`````"Z`````(3`=&U(B=_H`````+_0!P``Z`````!(B=_H`````$B)
+MW^@`````QX-P`0``Z`,``$C'@X`!````````2(F;B`$``$B-LW`!``!(BWLH
+MZ`````"^`````$B)W^@`````O@````!(B>_H`````+H!````B=!(@\0(6UW#
+MD$%455-(@^PP2(G[N`````"P;;3_2"7__P#_2`T``",`2+K___\`_____T@A
+MT$@-````%$BZ_____P#___]((=!(N@`````Z````2`G02+K______P#__T@A
+MT$BZ``````#O``!("=!(NO_______P#_2"'02+H````````6`$@)T$BZ____
+M_____P!((=!(N@````````"22`G02(E$)`A(@[_8"````'0'2(N?V`@``+D`
+M````NB````!(C40D$(@(2/_`2/_*=?;&1"04`4&\`````$B-;"00N2````!(
+MB>J^#@```$B)W^@`````A<!U1[^`&@8`Z`````"Y(````$B)ZKX/````2(G?
+MZ`````"#^"!U(TB-="0@2(U\)`BY"````/SSI@^7P`^2PCC0N`$```!$#T3@
+M183D=1%(Q\<`````N`````#H`````$$/ML1(@\0P6UU!7,-F9I#SPV9F9I!F
+M9F:09F:09F:055-(@^P(2(G]2(GSN0````"Z@````$B)\&9F9I!F9I"("$C_
+MP$C_RG7V@[WH"````0^40Q.+13B)`X!+$1`/MT4P9HE#!`^W13)FB4,&BX7H
+M"```B$-PQD,2(`^W13)F/2`A#Y3"9CTB(0^4P`G0J`%T1,9#%P+'0SQ2;V-K
+MQT-`97120<=#1$E$(%/'0TA31"`RQT-,,3)X(,=#4$-O;G3'0U1R;VQL9L=#
+M6&5RQD-:`.GB````#[=5,HV"\-C__V:#^`$/EL%F@?I`(0^4P`G(J`%U"V:!
+M^D0A#X6D````QD,7!`^W13)F+1`G9H/X`7<]QT,\4F]C:\=#0&5T4D''0T1)
+M1"`RQT-(-S%X(,=#3%-!4R#'0U!#;VYTQT-4<F]L;&;'0UAE<L9#6@#K:0^W
+M13)F/4`A#Y3"9CU$(0^4P`G0J`%T4<=#/%)O8VO'0T!E=%)!QT-$240@4\=#
+M2%-$(#+'0TPQ-'@@QT-00V]N=,=#5')O;&QFQT-897+&0UH`ZQ3&0Q<(2(U[
+M/$C'Q@````#H``````^V0Q?V8Q*(0Q"$P'4$QD,0@,=#&$AI9VC'0QQ0;VEN
+MQT,@="!49<=#)&-H;F_'0RAL;V=IQT,L97,L(,=#,$EN8R[&0S0`2(.]X`@`
+M``!T$4B+A>`(``!(BT`02(E#:.L(2(M%$$B)0VC'0V``(```2(/$"%M=PV9F
+M9I!F9F:09F9FD&9FD,:'RP````##9F9FD&9F9I!(@^Q82(E<)$!(B6PD2$R)
+M9"102(G]3(MG>$F+A"30"```@'@_``^%JP```$B+GX````!(BW]@1`^VCP<!
+M``!$#[9%``^V30(/ME4!BW4(#[:'TP```(E$)#@/MH?2````B40D,`^VA]$`
+M``")1"0H#[:'T````(E$)"`/MH?/````B40D&`^VA\X```")1"00#[:'S0``
+M`(E$)`@/MH?,````B00D08/@`4C'QP````"X`````.@`````2,>%@```````
+M``"+50A(B[V0````2(GN_]/K/4B-GY@```!)BWPD*$B)WN@`````QX68````
+M]`$``$C'A:@`````````2(FML````$F+?"0H2(G>Z`````!(BUPD0$B+;"1(
+M3(MD)%!(@\18PV9F9I!F9F:005=!5D%505154TB#[`A)B?U)B?0/M])(:=*(
+M`0``2(G52`.O&`D``$B+O]`(``!(@<<`%```2(EN8$B)=3A(@WU0`'4+2(-]
+M6``/A*,#``"^`````$&`#"0!2(M%6$F)1"1P2(M%4$F)1"1HN@````!!@'U#
+M`'8E2(M-2&9F9I`/ML)(:\!H2CN,*$@2```/A(0"``#_PD$X54-WX[J`____
+M28N-T`@```^VP@^VA`A`"```//]T)$B#?5``=!L/ML!(:<#(#P``2`.!:`D`
+M`$@[15`/A#4"``#_QO_"@/J!=L:Z@O___TF+C=`(``"0#[;"#[:$"$`(```\
+M_W0=#[;`2&G`T````$@#@4`)``!(.T58#X3K`0``_\;_PH#ZA7;-NH#___\/
+MML(/MH0X0`@``#S_="1(@WU0`'0;#[;`2&G`R`\``$@#AV@)``!(.T50#X2?
+M`0``_\;_PH#Z@7;&NH+___\/ML(/MH0X0`@``#S_=!T/ML!(:<#0````2`.'
+M0`D``$@[15@/A%T!``#_QO_"@/J%=LU!@'U1`74_2(-]4`!T$@^V=7E(BWU0
+MN@````#H`````$B#O1@!````#X0)`@``#[:U!0$``$B+O1@!``"Z`````.@`
+M````2(.]&`$````/A.,!``!,BWU00;X`````08!_6`!V2DF-7TA(B=_H````
+M`$B-2/!(BU,(2(E#"$B)&$B)4`A(B0*`N0<!``#_=1:`>4$`=1!(@[D8`0``
+M`'4/9F:09F:00?_&13AW6'>Z13AW6`^%VP````^VA0<!``!!B$0D`D&^````
+M`$&`?U@`#X;``0``28U?2$B)W^@`````2(U(\$B+4PA(B4,(2(D82(E0"$B)
+M`DB#>3@`=$=(BU$X#[9"`CJ!!P$``'0W2(.Z@`````!U+4B#NH@`````=2,/
+MMH$'`0``B$("2`^W43!)B[70"```OP<```#H`````&9FD$'_QD4X=UAWB^E"
+M`0``08AT)`'IHO[__T&(="0!9F:0Z97^__]!B'0D`>F+_O__08AT)`'I@?[_
+M_T$/MD5!C02"08B$),P```#I;_W__P^V17E!B$0D`L:%!P$``/]!O@````!!
+M@']8``^&X0```$F-7TA(B=_H`````$B-2/!(BU,(2(E#"$B)&$B)4`A(B0*`
+MN0<!``#_=$S&@0<!``#_2(-Y.`!T/DB+43@/MD(".D%Y=#%(@[J``````'4G
+M2(.ZB`````!U'0^V07F(0@)(#[=1,$F+M=`(``"_!P```.@`````0?_&13AW
+M6'>$ZU\/MD5Y08A$)`+K5$$/MD5!C02"08A$)`%!B(0DS````.LIN@````!!
+M@'U#`'8=2(M-2`^VPDAKP&A*.XPH2!(``'3(_\)!.%5#=^=!.%5#=09!QD0D
+M`?]!QD0D`@!FD$B+A9````!)B40D($B+A9@```!)B40D*$B+A:````!)B40D
+M,$B+A:@```!)B40D.$B+A;````!)B40D0$B+17Q)B40D#$B+A80```!)B40D
+M%(N%C````$&)1"0<2(N%N````$F)1"1(#[=%8&9!B40D6`^W16)F08E$)%I(
+MBT5P28E$)%`/MD5Z08A$)%SV140$=2-!@+WO$P```'010?Z-[Q,``$&`O>\3
+M````=0A,B>_H`````$B+13@/MG`!N@````!,B>_H`````$@/MD5`J`)T#Z@$
+M=`NH`74'08`,)`+K!4&`)"3]#[951-#J@^($00^V!"2#X/L)T$&(!"1,B>?H
+MF/G__TB#Q`A;74%<05U!7D%?PV9FD&9FD&9FD$%7059!54%455-(@^P(28G]
+MB?5)B=2^`````+K0````3(G@0(@P2/_`2/_*=?5!B6PD"(/]/WX*28'%`!0`
+M`(/M0$ACQ;H`````28.\Q4`$````#X6#`@``2&/%38FDQ4`$``!-B6PD>$F)
+MC"2`````38F$))````"Z`0```$&`?5$!#X53`@``9L=$)`;_`(']A0```'\/
+M9D(/MH0H0`@``&:)1"0&9H%\)`;_``^$_@$``$@/MT0D!DF+C1@)``!(:="(
+M`0``]D0*0P0/A-\!``"+1`I`)0#__P`]``#_``^%RP$``$B-'`KV0T0$#X1,
+M`0``QH/@`````$@/MD-`J`)T,J@$="ZH`70JQD-"!<9#0P0/ME-Y2(MS4$B+
+M>TA(B=GH`````.E]`0``QH/A`````>MR2`^V0T"H`F:0#X6`````J`1T?*@!
+M='A,BV-(QD-"`\9#0P1!O@````!!@'PD#@!T04F-;"1@2(GOZ`````!(BU4(
+M2(E%"$B)*$B)4`A(B0*`>$+_#Y7"2#G8#Y7`#[;2A=!UDT'_QD$/MD0D#D0Y
+M\'_$@+OA`````0^$]0```$B)WDR)[^@`````Z>4```!(#[9#0*@"#X38````
+MJ`0/A-````"H`69FD`^%Q0```$B+0T@/MD`-O0````!!@'T^`'8I1`^VX$`/
+MMLU,B>!(T_BH`70/N@````")SDR)[^@`````_\5!.&T^=]O&0T,&QD-"!6;'
+M@\```````$B)WDR)[^@`````ZVI,BWM(QD0D!0!!@'\.`'9*38UW8$R)]^@`
+M````2(G#28M&"$F)7@A,B3-(B4,(2(D8@'M"_W04#[9#03PB#Y3"/`T/E,`)
+MT*@!=3S^1"0%#[9$)`5!.$<.=[H/MU0D!DR)YDR)[^@`````N@$```#K*DAC
+MQ4G'A,5`!````````+H`````ZQ1(8\5)QX3%0`0```````"Z`````(G02(/$
+M"%M=05Q!74%>05_#9F:02(/L*$B)'"1(B6PD"$R)9"003(EL)!A,B70D($B)
+M^TF)]4F)U$B+;V!(A>UU"DB)U__6Z0@!``!(@[^(`````'4*2(._@`````!T
+M"TR)YT'_U>GI````@+W@`````&:0#X7.````2(M]2$@/MD<,J!`/A;T```"H
+M"`^%M0```$R+-X!]>P!T#4B)ZKX&````Z`````!,B:N(````3(FCD````$@/
+MMD5`J`)T)J@$="*H`70>QD5"!<9%0P0/ME5Y2(MU4$B+?4A(B>GH`````.MN
+M2`^V14"H`G4EJ`1F9I!T'J@!=!K&14(#QD5#!$B)[DR)]^@`````ZT5F9I!F
+MD$@/MD5`J`)T-Z@$9F:09I!T+J@!=2K&14(%QD5#!F;'A<```````$B)[DR)
+M]^@`````ZPQ,B>=!_]5F9I!F9I!(BQPD2(ML)`A,BV0D$$R+;"083(MT)"!(
+M@\0HPV9FD$B#[!A(B1PD2(EL)`A,B60D$$B)\TB+1TA,BR!(BVYH#[9&)(/X
+M('1/@_@@?Q*%P'0B@_@&?SKK+V9F9I!F9I"#^")T,X/X(GP>@\"`@_@!=Q_K
+M%$B+1SC'0`0`````QH6J`````>L0QH6J````#>L'N`````#K,4B#>W@`=!%(
+MC7-X3(GGZ`````!F9I!FD$B)WDR)Y^@`````2(GO_Y7`````N`$```!(BQPD
+M2(ML)`A,BV0D$$B#Q!C#9F9FD$B#[#A(B5PD"$B);"003(ED)!A,B6PD($R)
+M="0H3(E\)#!(B?M(B?5,BV]X2(M&2$B).$B#?V``=1;&AJH````"2(GW_Y;`
+M````Z0<&``"02(M'8/9`1`)T%<:&J@````)(B??_EL````#IYP4``$R)[^@`
+M````28G$2(7`=17&A:H````"2(GO_Y7`````Z<(%``#'@)0`````````2(EH
+M:$B+0V!)B40D*$B+0V`/MT`P9D&)1"0@0<9$)"2`#[:%J````(/X`@^$I`$`
+M`(/X`G\)A<!T(^F#`P``@_@##X0T`@``@_@$9F9FD&9FD`^$]`$``.EE`P``
+M2(M#8/9`8`$/A,0```#VA:D````"=`A!QD0D.(CK&0^VA:D```"#X`0\`1G`
+M@^`%@^AV08A$)#A(BY60````#[>-F````$'&1"0Y`$B)T$C!Z#A!B$0D.DB)
+MT$C!Z#!!B$0D.TB)T$C!Z"A!B$0D/$B)T$C!Z"!!B$0D/4B)T$C!Z!A!B$0D
+M/DB)T$C!Z!!!B$0D/TB)T$C!Z`A!B$0D0$&(5"1!0<9$)$(`0<9$)$,`B<AF
+MP>@(08A$)$1!B$PD14'&1"1&`$'&1"1'`.F#````]H6I`````G0(0<9$)#@H
+MZQD/MH6I````@^`$/`$9P(/@!8/`*D&(1"0X2(N5D`````^WC9@```!!QD0D
+M.0!(B=!(P>@808A$)#I(B=!(P>@008A$)#M(B=!(P>@(08A$)#Q!B%0D/4'&
+M1"0^`(G(9L'H"$&(1"0_08A,)$!!QD0D00!(BT-@2`7D````28E$)%!!QD0D
+M,"!!@XPDE`````+I^0$``("]D````!!W!?8#`G4,QH6J````!NFU`P``2`^V
+ME9````!(B[68````28U\)#CH`````$B+0V!(!>0```!)B40D4$'&1"0P($&!
+MC"24```````0`$'&1"0EJ_:%J0````8/A)(!``"+A90```!!B40D-.F"`0``
+M#[:%J0```(/@,#P@=1=!QD0D.!M!QD0D.0%!QD0D/`#I70$``$'&1"0X->E2
+M`0``2(M#8$@/MD!`J`%T!*@$=0S&A:H````&Z0L#``!!@8PDE```````(``/
+MMX6<````9CN%D@```'1+#[:%FP```(/X0G0_@_A"?PZ#^$!T-69F9I!F9I#K
+M(#VP````=`D][````&:0=1`/MX6<````9HF%D@```.L,QH6J````!NFD`@``
+M0<9$)#BP#[>%D````$&(1"0Y#[>%D@```$&(1"0Z#[>%E````$&(1"0[#[>%
+ME@```$&(1"0\#[>%F````$&(1"0]#[:%F@```$&(1"0^#[:%FP```$&(1"0_
+M9@^VA9$```!!B$0D0&8/MH63````08A$)$%F#[:%E0```$&(1"1"9@^VA9<`
+M``!!B$0D0V8/MH69````08A$)$3VA:D````&="H/MX6<````P>`)08E$)#1!
+M@XPDE`````3K$&9F9I#&A:H````&Z=8!``!-C70D6$G'A"2@``````````^V
+MA:D```"H!@^$H`$``+L`````J`)T"T&#C"24````".L)08.,))0````02(.]
+ML`````!T$O:%J0````%T"4B+G;````#K*DB#O;@`````="!)B[4@"@``N@``
+M``!(B>__E;@```"%P'0'28N=(`H``$B%VW0U3(GGZ`````"^`````$R)]^@`
+M````2(MS"(L33(GWZ`````!(C4,$2(/#$(,X`'3EZ0P!``!,B>_H`````$B)
+M!"1(A<!U#,:%J@````;I_````$B+%"1(BT(028E$)$A)B50D>+D`````N@`"
+M``"("$C_P$C_RG7V]H6I````!`^$CP```$'VA"26````('0828M\)$A!BU0D
+M-$B+M:````#H`````.ML0?:$))8````0=&%-BWPD2$B#O;``````=!+VA:D`
+M```!=0E(BYVP````ZR!)B[4@"@``N@$```!(B>__E;@```"%P'0'28N=(`H`
+M`$B+<PB+$TR)_^@`````BP-)`<=(C4,$2(/#$(,X`'3@O@````!,B??H````
+M`$&+5"0T2(L$)$B+<!A,B??H`````.L)08.,))0````!3(GF3(GOZ`````#K
+M%$R)YDR)[^@`````2(GO_Y7`````2(M<)`A(BVPD$$R+9"083(ML)"!,BW0D
+M*$R+?"0P2(/$.,-F9F:09F:02(/L:$B)7"0X2(EL)$!,B60D2$R);"103(ET
+M)%A,B7PD8$B)^TF)]$B)3"0P08G51(A$)"_'1"04_____XG0P>`)9HE$)!),
+MBW]@387_=`F`O\L`````=`F+1"04Z0\#``!)BU=(2(E4)`A,BW=X9L>'R```
+M`!`G3(GWZ`````!(B<6+1"042(7M#X3A`@``3(GWZ`````!(B40D($B%P'44
+M2(GN3(GWZ`````"+1"04Z;L"``!)B[;0"```QD8_`4B)VK\%````Z`````!!
+M@$]$`DB+4V"^(0```$B+?"0(Z`````!(C4582(E$)!B`?"0O`'00QX64````
+M"@```,9%."CK)\>%E````!(```#&13@J2(M4)"!(BWH02`^W5"022(MT)##H
+M`````$B+0V#V0&`!='Z`?"0O`1G`@^`"@^AXB$4XQD4Y`$R)X$C!Z#B(13I,
+MB>!(P>@PB$4[3(G@2,'H*(A%/$R)X$C!Z""(13U,B>!(P>@8B$4^3(G@2,'H
+M$(A%/TR)X$C!Z`B(14!$B&5!QD5"`,9%0P!$B>AFP>@(B$5$1(AM1<9%1@#&
+M14<`ZTR`?"0O`1G`@^`"@\`HB$4XQD4Y`$R)X$C!Z!B(13I,B>!(P>@0B$4[
+M3(G@2,'H"(A%/$2(93W&13X`1(GH9L'H"(A%/T2(;4#&14$`2(GOZ`````!(
+MBT-@#[=`,&:)12#&122`2(E=*$B+5"0@2(M"$$B)14@/MT0D$HE%-$B)57C&
+M13`@2(M#8$@%Y````$B)15!(QX6@`````````+X`````2(M\)!CH`````(M5
+M-$B+1"0@2(MP&$B+?"08Z`````#&@\L````!2(GN3(GWZ`````!(A=L/A)\`
+M``!(@WM@`'14@+O+`````'1+9H&[R````)8`=1)(BU-@2(MZ2+XA````Z```
+M``!F_XO(````O]`'``#H`````$R)]^@`````2(7;=%1(@WM@`'0)@+O+````
+M`'6U2(7;=#](@WM@`'0X9H.[R`````!T+H!])`!U*,=$)!0`````@'PD+P!T
+M&4@/MU0D$DB+1"0@2(MP$$B+?"0PZ`````!(@WUX`'0,2(UU>$R)]^@`````
+M2(GN3(GWZ`````!)B[;0"```QD8_`$B)VK\&````Z`````!!@&=$_8M$)!1(
+MBUPD.$B+;"1`3(MD)$A,BVPD4$R+="183(M\)&!(@\1HPV9F9I!F9F:09F9F
+MD$B#[!A(B5PD"$R)9"0028G\08AT)$]`#[;>B=[H`````$F!Q``4``")WDR)
+MY^@`````N`$```!(BUPD"$R+9"002(/$&,-F9F:09F:09F:02(/L".@`````
+M#[;`2(/$",-F9F:09F9FD&9F9I!F9I"X`````,-F9F:09F:09F:0N0````"Z
+M@````$B+M]`(```/M\*`O#!`"```_P^5P`^VP`'!_\)F@?J%`';D2(N_T`@`
+M`$B!QP`4``"Z@`````^WPH"\.$`(``#_#Y7`#[;``<'_PF:!^H4`=N2)R,.0
+MB?*)\,#H!#P)=@6#P%?K"(GPP.@$@\`PB`>)T(/@#X/X"7X,B="#X`^#P%?K
+M"F:0B="#X`^#P#"(1P'#9F9FD$B#[!!(B1PD3(ED)`A(B?M!B?1,B>`/MO3H
+MHO___T$/MO1(@\,"2(G?Z)+___](BQPD3(MD)`A(@\00PV9F9I!54TB)U4&Y
+M`````+D`````N@`!``!(B>B("$C_P$C_RG7VN8````!,BX?0"```#[?!9D(/
+MMI0`0`@``&:!^O\`#X1B`0``1(G(0?_!.?`/A50!``!F@?F!``^'Q0````^W
+MPDAIP,@/``!(B<))`Y!H"0``2(-Z$`!T9[F`````3(G&#[?!9@^VA#!`"```
+M9CW_`'07#[?`2&G`R`\``$@#AF@)``!(.T(0=#'_P6:!^8$`=LZ[`````(!Z
+M6@!V,;X!````#[;##[9,$'")\-/@"44@_\,X6EIWZNL4B$T"Z]/&10+_2(M"
+M"`^V0`V)12#&10`!#[9"68A%`4B+0GA(B44$2(N"B````$B)10Q(BX*0````
+M2(E%%(N"H````(E%'.MZ2(N'T`@```^WTDAITM````!(B=-(`YA`"0``QD4"
+M_\9%``)(BX?0"```2(N`0`D```^V1`([B$4!2(N#B`````^V0`V)12#&101V
+M#[=S/$B-?07H1/[__\9%#&0/MW,^2(U]#>@S_O__QD4<<@^V<SE(C7T=Z.+]
+M__^X`````.F:`0``_\%F@?F%``^&<O[__TB+O]`(``!(@<<`%```N8`````/
+MM\%F#[:4.$`(``!F@?K_``^$40$``$2)R$'_P3GP#X5#`0``9H'Y@0`/A\(`
+M```/M\)(:<#(#P``2(G"2`.7:`D``$B#>A``=&2Y@`````^WP68/MH0X0`@`
+M`&8]_P!T%P^WP$AIP,@/``!(`X=H"0``2#M"$'0Q_\%F@?F!`';.NP````"`
+M>EH`=C&^`0````^VPP^V3!!PB?#3X`E%(/_#.%I:=^KK%(A-`NO3QD4"_TB+
+M0@@/MD`-B44@QD4``0^V0EF(10%(BT)X2(E%!$B+@H@```!(B44,2(N"D```
+M`$B)112+@J````")11SK;`^WTDAITM````!(B=-(`Y]`"0``QD4"_\9%``)(
+MBX=`"0``#[9$`CN(10%(BX.(````#[9`#8E%(,9%!'8/MW,\2(U]!>B\_/__
+MQD4,9`^W<SY(C7T-Z*O\___&11QR#[9S.4B-?1WH6OS__[@`````ZQ5F9I#_
+MP6:!^84`#X:+_O__N/____];7<-F9F:09F9FD&9FD%532(G50;D`````N0``
+M``"ZI`P``$B)Z(@(2/_`2/_*=?:Y@````$R+A]`(```/M\%F0@^VE`!`"```
+M9H'Z_P`/A`H#``!$B<A!_\$Y\`^%_`(``&:!^8$`#X=I`@``#[?"2&G`R`\`
+M`$D#@&@)``!)B<!(@W@0`'1NNH````!(BX_0"```#[?"9@^VA`A`"```9CW_
+M`'07#[?`2&G`R`\``$@#@6@)``!).T`0=#3_PF:!^H$`=LZZ`````$&`>%H`
+M=C.^`0````^VPD(/MDP`<(GPT^`)12#_PD$X4%IWZ.L4B%4"Z]#&10+_2(M`
+M"`^V0`V)12#&10`!00^V0%F(10%)BT!X2(E%!$F+@(@```!(B44,28N`D```
+M`$B)111!BX"@````B44<NP````!!@+C```````^&!`(```^VPTB-#(!(C4S-
+M`$B-!$!(P>`$3`'`2(VPP`````^V5@B(420/ME8)B%$E2(N`T`````^V`(/@
+M#XA!)@^V022#^`-T,H/X`W\.@_@"#X3A````Z<T```"#^`1F9F:09F:0=$F#
+M^!(/A(L```!F9I!FD.FN````#[;+2(T$24C!X`1*BX0`T`````^V4`&#X@</
+MMM+!X@A(C0R)#[9``@'0:\`*B43-*.F'````#[;32(T$4DC!X`1*BX0`T```
+M`(!X`@!U#DB-!)+'1,4H`````.M@#[;#2(T4@$B-!$!(P>`$2HN$`-`````/
+MMD`"@^@4B435*.L\#[;+2(T$24C!X`1*BX0`T`````^V4`+!X@A(C0R)#[9`
+M`P'0:\`*B43-*.L/#[;#2(T$@,=$Q2@`````#[;#2(T4@$B-5-4`2(UR+$B-
+M!$!(P>`$3`'`2(V(V````$B+@-@```!(B4(L2(M!"$B)1@A(BT$02(E&$$B+
+M01A(B488_\-!.)C`````#X=X_O__ZWI(BX?0"```#[?22&G2T````$B)TT@#
+MF$`)``#&10+_QD4``DB+A]`(``!(BX!`"0``#[9$`CN(10%(BX.(````#[9`
+M#8E%(,9%!'8/MW,\2(U]!>A0^?__QD4,9`^W<SY(C7T-Z#_Y___&11QR#[9S
+M.4B-?1WH[OC__[@`````Z3X#``!F9F:0_\%F@?F%``^&ROS__TB+O]`(``!(
+M@<<`%```N8`````/M\%F#[:4.$`(``!F@?K_``^$\0(``$2)R$'_P3GP#X7C
+M`@``9H'Y@0`/AV4"```/M\)(:<#(#P``28G`3`.':`D``$F#>!``=&>Z@```
+M``^WPF8/MH0X0`@``&8]_P!T%P^WP$AIP,@/``!(`X=H"0``23M`$'0T_\)F
+M@?J!`';.N@````!!@'A:`'8SO@$````/ML)"#[9,`'")\-/@"44@_\)!.%!:
+M=^CK%(A5`NO0QD4"_TF+0`@/MD`-B44@QD4``4$/MD!9B$4!28M`>$B)101)
+MBX"(````2(E%#$F+@)````!(B44408N`H````(E%'+L`````08"XP``````/
+MAOD!```/ML-(C0R`2(U,S0!(C01`2,'@!$P!P$B-L,`````/ME8(B%$D#[96
+M"8A1)4B+@-`````/M@"#X`^(028/MD$D@_@#=#.#^`-_$X/X`@^$Y````&9F
+MD&:0Z<L```"#^`1T3(/X$F9FD`^$BP```.FU````9F:09I`/MLM(C01)2,'@
+M!$J+A`#0````#[90`8/B!P^VTL'B"$B-#(D/MD`"`=!KP`J)1,THZ8D````/
+MMM-(C0122,'@!$J+A`#0````@'@"`'4.2(T$DL=$Q2@`````ZV(/ML-(C12`
+M2(T$0$C!X`1*BX0`T`````^V0`*#Z!2)1-4HZSX/MLM(C01)2,'@!$J+A`#0
+M````#[90`L'B"$B-#(D/MD`#`=!KP`J)1,THZQ%FD`^VPTB-!(#'1,4H````
+M``^VPTB-%(!(C535`$B-<BQ(C01`2,'@!$P!P$B-B-@```!(BX#8````2(E"
+M+$B+00A(B48(2(M!$$B)1A!(BT$82(E&&/_#03B8P`````^'=?[__^ML#[?2
+M2&G2T````$B)TT@#GT`)``#&10+_QD4``DB+AT`)```/MD0".XA%`4B+@X@`
+M```/MD`-B44@QD4$=@^W<SQ(C7T%Z"'V___&10QD#[=S/DB-?0WH$/;__\9%
+M''(/MG,Y2(U]'>B_]?__N`````#K$O_!9H'YA0`/ANO\__^X_____UM=PV9F
+MD$%455-!B?1(B=5!N`````"Y`````+JD#```2(GH9F:0B`A(_\!(_\IU]KF`
+M````2(NWT`@```^WP68/MI0P0`@``&:!^O\`#X0I`P``1(G`0?_`1#G@#X4:
+M`P``9H'Y@0`/AX<"```/M\)(:<#(#P``28G`3`.&:`D``$F#>!``=&JZ@```
+M`$B)\0^WPF8/MH0(0`@``&8]_P!T%P^WP$AIP,@/``!(`X%H"0``23M`$'0T
+M_\)F@?J!`';.N@````!!@'A:`'8SO@$````/ML)"#[9,`'")\-/@"44@_\)!
+M.%!:=^CK%(A5`NO0QD4"_TF+0`@/MD`-B44@QD4``4$/MD!9B$4!28M`>$B)
+M101)BX"(````2(E%#$F+@)````!(B44408N`H````(E%'$2)922[`````$&`
+MN,``````#X8F`@``#[;#2(T,@$B-3,T`2(T$0$C!X`1,`<!(C;#`````#[96
+M"(B1J`````^V5@F(D:D```!(BX#0````#[8`@^`/B(&J````#[:!J````(/X
+M`W0N@_@#?PZ#^`(/A.T```#IU@```(/X!&9FD'1,@_@2#X24````9F:09I#I
+MNP````^VRTB-!$E(P>`$2HN$`-`````/ME`!@^('#[;2P>((2(T,B0^V0`(!
+MT&O`"HF$S:P```#IE`````^VTTB-!%)(P>`$2HN$`-````"`>`(`=1%(C022
+MQX3%K`````````#K:@^VPTB-%(!(C01`2,'@!$J+A`#0````#[9``H/H%(F$
+MU:P```#K0P^VRTB-!$E(P>`$2HN$`-`````/ME`"P>((2(T,B0^V0`,!T&O`
+M"HF$S:P```#K$Y`/ML-(C02`QX3%K``````````/ML-(C12`2(U4U0!(C;*P
+M````2(T$0$C!X`1,`<!(C8C8````2(N`V````$B)@K````!(BT$(2(E&"$B+
+M01!(B4802(M!&$B)1AC_PT$XF,`````/AUK^___K?DB+A]`(```/M])(:=+0
+M````2(G32`.80`D``,9%`O_&10`"2(N'T`@``$B+@$`)```/MD0".XA%`4B+
+M@X@````/MD`-B44@QD4$=@^W<SQ(C7T%Z)KR___&10QD#[=S/DB-?0WHB?+_
+M_\9%''(/MG,Y2(U]'>@X\O__1(EE)+@`````Z6$#``#_P6:!^84`#X:L_/__
+M2(N_T`@``$B!QP`4``"Y@`````^WP68/MI0X0`@``&:!^O\`#X08`P``1(G`
+M0?_`1#G@#X4)`P``9H'Y@0`/AX<"```/M\)(:<#(#P``28G`3`.':`D``$F#
+M>!``=&>Z@`````^WPF8/MH0X0`@``&8]_P!T%P^WP$AIP,@/``!(`X=H"0``
+M23M`$'0T_\)F@?J!`';.N@````!!@'A:`'8SO@$````/ML)"#[9,`'")\-/@
+M"44@_\)!.%!:=^CK%(A5`NO0QD4"_TF+0`@/MD`-B44@QD4``4$/MD!9B$4!
+M28M`>$B)101)BX"(````2(E%#$F+@)````!(B44408N`H````(E%'$2)922[
+M`````$&`N,``````#X8;`@``#[;#2(T,@$B-3,T`2(T$0$C!X`1,`<!(C;#`
+M````#[96"(B1J`````^V5@F(D:D```!(BX#0````#[8`@^`/B(&J````#[:!
+MJ````(/X`W0Q@_@#?PZ#^`(/A/````#IV0```(/X!&9FD&9FD'1,@_@2#X24
+M````9F:09I#INP````^VRTB-!$E(P>`$2HN$`-`````/ME`!@^('#[;2P>((
+M2(T,B0^V0`(!T&O`"HF$S:P```#IE`````^VTTB-!%)(P>`$2HN$`-````"`
+M>`(`=1%(C022QX3%K`````````#K:@^VPTB-%(!(C01`2,'@!$J+A`#0````
+M#[9``H/H%(F$U:P```#K0P^VRTB-!$E(P>`$2HN$`-`````/ME`"P>((2(T,
+MB0^V0`,!T&O`"HF$S:P```#K$Y`/ML-(C02`QX3%K``````````/ML-(C12`
+M2(U4U0!(C;*P````2(T$0$C!X`1,`<!(C8C8````2(N`V````$B)@K````!(
+MBT$(2(E&"$B+01!(B4802(M!&$B)1AC_PT$XF,`````/AU?^___K<`^WTDAI
+MTM````!(B=-(`Y]`"0``QD4"_\9%``)(BX=`"0``#[9$`CN(10%(BX.(````
+M#[9`#8E%(,9%!'8/MW,\2(U]!>A([___QD4,9`^W<SY(C7T-Z#?O___&11QR
+M#[9S.4B-?1WHYN[__T2)922X`````.L2_\%F@?F%``^&Q/S__[C_____6UU!
+M7,-F9F:028GP3(M/>+D`````NB@```!(B?"("$C_P$C_RG7V28NQ(`H``+D`
+M````N@`"``!(B?"("$C_P$C_RG7V2(U6-KD`````C4$!2)@/MD0X((@"2/_"
+M2&/!#[9$.""(`DC_PH/!`H/Y)W[<2(U6%+D`````C4$!2)@/MD0'#(@"2/_"
+M2&/!#[9$!PR(`DC_PH/!`H/Y$W[<2(U6+KD`````C4$!2)@/MD0X2(@"2/_"
+M2&/!#[9$.$B(`DC_PH/!`H/Y!W[<28EP&$B+1U!(_\!)B0!(@W]@`'57]@<!
+M=%)(@W]H``^5P$V%R0^5P@^VP(7"=!1(BT=H2`^V0%M"@+P(0`@``/]U*4B#
+M?W``#Y7`387)#Y7"#[;`A<)T'DB+1W!(#[=`0$*`O`A`"```_W0*#[9'`4&(
+M0`SK!4'&0`S_#[9'`D&(0`T/MD=<08A`#D'&0!(00<9`$1`/M@>#X`$!P+[]
+M____02)P"@G&08AP"@^V!X/@`<'@!4$/MD@(@^'?"<%!B$@(2`^W1UA(P>@'
+M@^`!P>`&@^&_"<%!B$@(2`^W1UA(P>@"@^`!00^V4`F#XOX)PD&(4`E(#[='
+M6DC!Z`.#X`'!X`>#X7\)P4&(2`A(#[='6DC1Z(/@`0'`@^+]"<)!B%`)2`^W
+M1UA(P>@#@^`!P>`&@^*_"<)!B%`)2`^W1UI(P>@$@^`!P>`'@^)_"<)!B%`)
+M@\D008A("`^V!]#H@^`!@^;^"<9!B'`*#[8'@^`$@^;["<9!B'`*9D''0!0`
+M$`^VA\P```!!B$`@P\="!`````#'`@````"X`````,-F9F:09F:09F:09F:0
+M2(/L.$B)7"0(2(EL)!!,B60D&$R);"0@3(ET)"A,B7PD,$B)^T&)]4&_____
+M_TB+;V!,BW=X2(7M=!6`O\L`````=0SV!P)T#V9F9I!F9I!$B?CI#0$``$R)
+M]V9FD&:0Z`````!)B<1$B?A-A>0/A/$```!!QD0D..%!QD0D.0%!@/T"#Y7`
+M@\`:08A$)#I!QD0D)(`/MT4P9D&)1"0@28E<)"A!QT0D-`````!)QT0D2```
+M``!)QX0DH`````````!,B>9,B??H`````,:#RP````%FQX/(````^@!(A=MT
+M7$B#>V``=%5F9F:09F:09H&[R````)8`=15(BU-@2(MZ2+XA````Z`````!F
+M9I!F_XO(````O]`'``#H`````$R)]^@`````2(7;=!!(@WM@`'0)@+O+````
+M`'6R9H.[R`````!T#T&`?"0D`+@`````1`]$^$R)YDR)]^@`````1(GX2(M<
+M)`A(BVPD$$R+9"083(ML)"!,BW0D*$R+?"0P2(/$.,-F9F:09F9FD$B#[$A(
+MB5PD&$B);"0@3(ED)"A,B6PD,$R)="0X3(E\)$!(B?M!B?9!O_____],BV=@
+M3(MO>$V%Y'0)@+_+`````'0,1(GXZ60$``!F9F:03(GOZ`````!(B<5$B?A(
+MA>T/A$D$``#V`P(/A0$!``!!@/X4=PQ!#[;V:_8,9F:0ZQIF00^VQF9IP(D`
+M9L'H",#H!`^V\('&\````,9%..'&13D!QD4Z'$"(=3O&122`00^W1"0P9HE%
+M($B)72C'130`````2,=%2`````!(QX6@`````````$B)[DR)[^@`````QH/+
+M`````6;'@\@```#$"4B%VW162(-[8`!T3Y!F@;O(````E@!U%4B+4V!(BWI(
+MOB$```#H`````&9FD&;_B\@```"_T`<``.@`````3(GOZ`````!(A=MT$$B#
+M>V``=`F`N\L`````=;)F@[O(``````^$1`,``(!])``/A3H#``!!OP````#I
+M+P,``$R)[^@`````2(E$)!!(A<`/A!D#``!(C4582(E$)`A(BT0D$$B+0!!(
+MB00DQD4X&L9%.0C&13H:QD4[`,9%/!#&13T`2(M$)!!(B45XQD4D@$$/MT0D
+M,&:)12!(B5TH2(M$)!!(BT`02(E%2,=%-!````!(BT-@2`7D````2(E%4,9%
+M,"!(QX6@`````````+X`````2(M\)`CH`````(M5-$B+1"002(MP&$B+?"0(
+MZ`````!(B>Y,B>_H`````,:#RP````%FQX/(````^@!(A=MT4DB#>V``=$MF
+M@;O(````E@!U$DB+4V!(BWI(OB$```#H`````&;_B\@```"_T`<``.@`````
+M3(GOZ`````!(A=MT$$B#>V``=`F`N\L`````=;5F@[O(`````'0&@'TD`'02
+M2(UT)!!,B>_H`````.GF`0``2(GN3(GOZ`````!,B>_H`````$B)Q4B%P'45
+M2(UT)!!,B>_H`````$2)^.G&`0``2(U06$B)5"0(2(L\)$B#QP1(BQ0D2`^V
+M0@,/MD00!(A"!,9'`0K&1P(`N0````"Z!````$B+!"2("$C_P$C_RG7V183V
+M=0:`9P/\ZS=!#[;V:?98`@``@$\#`XGQP>D8B$\$B?+!ZA"(5P6)\,'H"(A'
+M!D"(=P>(3PB(5PF(1PI`B'<+2(M$)!!(B45XQD4X%0^V!\#X!_?0@\`1B$4Y
+MQD4Z`,9%.P#&13P0QD4]`(`G/\9%)(!!#[=$)#!FB44@2(E=*$B+1"002(M`
+M$$B)14C'1300````2(M#8$@%Y````$B)15#&13`@2,>%H`````````"^````
+M`$B+?"0(Z`````"+531(BT0D$$B+<!A(BWPD".@`````2(GN3(GOZ`````#&
+M@\L````!9L>#R````/H`2(7;=%)(@WM@`'1+9H&[R````)8`=1)(BU-@2(MZ
+M2+XA````Z`````!F_XO(````O]`'``#H`````$R)[^@`````2(7;=!!(@WM@
+M`'0)@+O+`````'6U9H.[R`````!T#8!])`"X`````$0/1/A(C70D$$R)[^@`
+M````9F:09F:02(GN3(GOZ`````!$B?AFD$B+7"082(ML)"!,BV0D*$R+;"0P
+M3(MT)#A,BWPD0$B#Q$C#9F9FD&9FD&9FD&9FD$B#["A(B5PD"$B);"003(ED
+M)!A,B6PD($B)^T&)];C_____3(MG>$B+;V#V1U@(#X2#````28NT)-`(``!(
+MB?J_!0```.@`````@$U$`DB+?4A(B>J^(0```.@`````@'U[`'08O]`'``#H
+M`````$R)Y^@`````@'U[`'7H187M=`YF@TM:$&:#36(0ZPQFD&:#8UKO9H-E
+M8N])B[0DT`@``$B)VK\&````Z`````"`943]N`````!(BUPD"$B+;"003(MD
+M)!A,BVPD($B#Q"C#9F9FD&9F9I!F9F:09F:02(/L&$B)7"0(2(EL)!")]4B+
+M3WA(BU]@]@<!=#M(@WM0`'010`^VU@^V<WE(BWM0Z`````!(@[L8`0```'0M
+M0`^VU0^VLP4!``!(B[L8`0``Z`````#K%$`/MM9(BT,X#[9P`4B)S^@`````
+M2(M<)`A(BVPD$$B#Q!C#9F:09I!(@^PX2(E<)`A(B6PD$$R)9"083(EL)"!,
+MB70D*$R)?"0P2(G[08GV08G7QT0D!/____],BV=@3(MO>$V%Y'0)@+_+````
+M`'0)BT0D!.D3`0``3(GOZ`````!(B<6+1"0$2(7M#X3[````QD4XX<9%.0%%
+MA/9T#4&`_P$9P/?0@\`'ZPM!@/\!&<#WT(/`#8A%.L9%)(!!#[=$)#!FB44@
+M2(E=*,=%-`````!(QT5(`````$C'A:``````````2(GN3(GOZ`````#&@\L`
+M```!9L>#R````/0!2(7;=%1(@WM@`'1-9H&[R````)8`=1)(BU-@2(MZ2+XA
+M````Z`````!F_XO(````O]`'``#H`````$R)[^@`````2(7;=!)(@WM@`'0+
+M@+O+`````&:0=;-F@[O(`````'0:@'TD`'442(M#8`^W0&)FB4-:QT0D!```
+M``!(B>Y,B>_H`````(M$)`1(BUPD"$B+;"003(MD)!A,BVPD($R+="0H3(M\
+M)#!(@\0XPV9F9I!F9F:02(/L"`^V!H/X"0^'@@```(G`_R3%`````&9F9I!F
+M9I!(BWX(QH?O$P```.@`````N`````#K8`^V5@B^`````.@K_O__ZU`/ME8(
+MO@$```#H&_[__^M`#[9V".@`````ZS4/ME8)#[9V".BA_/__D.LE#[9V".@`
+M````9F:09I#K%0^V=@CH`````+@`````ZP6X_____TB#Q`C#9F9FD$B+1V!(
+MA<!T4TC'0#@`````@$A$!$C'1V``````2,='<`````!(QT=H`````(-_"#]_
+M%4B+5WA(8T<(2,>$PD`$````````PTB+5WA(8T<(2,>$PD`"````````\\-F
+MD$B+1V!(A<!T4TC'0#@`````@&!$^TC'1V``````2,='<`````!(QT=H````
+M`(-_"#]_%4B+5WA(8T<(2,>$PD`$````````PTB+5WA(8T<(2,>$PD`"````
+M````\\-FD%-(B?OH`````$B+N]`(``!(@<<`%```Z`````!;PV:04TB)^^@`
+M````2(N[T`@``$B!QP`4``#H`````%O#9I!!54%455-(@^Q828G\3(NOT`@`
+M`$F!Q0`4``!(@S\`=!9(BS=(@>X```(`2(DW2(M_(.@`````28-\)!``=!%)
+MBW0D$$F+?"0@Z`````!FD$F#?"08`'0/28MT)!A)BWPD(.@`````00^W?"0\
+M2(U$)%9(B40D.$B-1"142(E$)#!(C40D4DB)1"0H2(U$)%!(B40D($B-1"1.
+M2(E$)!A(C40D34B)1"002(U$)$Q(B40D"$B-1"1*2(D$)$R-3"1)3(U$)$9(
+MC4PD14B-5"1$2(UT)$/H`````$F#O"08"0```'0K28NT)!@)``!)C;PD^`@`
+M`.@`````28NU&`D``$F-O?@(``#H`````&9FD$F#O"1`"0```'0H28NT)$`)
+M``!)C;PD(`D``.@`````28NU0`D``$F-O2`)``#H`````$F#O"1H"0```'0H
+M28NT)&@)``!)C;PD2`D``.@`````28NU:`D``$F-O4@)``#H`````$F#O"3@
+M"@```'0O28NT).`*``!)C;PDP`H``.@`````28NUX`H``$F-O<`*``#H````
+M`&9F9I!F9I"]`````$`Z;"1#<SMF9F:0B>@/MMA)B[3<,`L``$F-O"00"P``
+MZ`````!)B[3=,`L``$F-O1`+``#H`````/_%0#IL)$-RR4F#O"3`#P```'0N
+M28NT),`/``!)C;PDH`\``.@`````28NUP`\``$F-O:`/``#H`````&9FD&9F
+MD$F#O"3X#P```'0H28NT)/@/``!)C;PDV`\``.@`````28NU^`\``$F-O=@/
+M``#H`````$F#O"1H$````'0H28NT)&@0``!)C;PD2!```.@`````28NU:!``
+M`$F-O4@0``#H`````$F#O"20"0```'0O28NT))`)``!)C;PD<`D``.@`````
+M28NUD`D``$F-O7`)``#H`````&9F9I!F9I!)@[PD:`H```!T*$F+M"1H"@``
+M28V\)$@*``#H`````$F+M6@*``!)C;U("@``Z`````!)@[PD^`D```!T*$F+
+MM"3X"0``28V\)-@)``#H`````$F+M?@)``!)C;W8"0``Z`````!)@[PD(`H`
+M``!T+TF+M"0@"@``28V\)``*``#H`````$F+M2`*``!)C;T`"@``Z`````!F
+M9F:09F:028.\)+@*````="A)B[0DN`H``$F-O"28"@``Z`````!)B[6X"@``
+M28V]F`H``.@`````28.\)`@+````="A)B[0D"`L``$F-O"3H"@``Z`````!)
+MB[4("P``28V]Z`H``.@`````28.\)%`/````="])B[0D4`\``$F-O"0P#P``
+MZ`````!)B[50#P``28V],`\``.@`````9F9FD&9FD$F#O"2(#P```'0H28NT
+M)(@/``!)C;PD:`\``.@`````28NUB`\``$F-O6@/``#H`````$F#O"0P$```
+M`'0H28NT)#`0``!)C;PD$!```.@`````28NU,!```$F-O1`0``#H`````$F#
+MO"20"@```'0O28NT))`*``!)C;PD<`H``.@`````28NUD`H``$F-O7`*``#H
+M`````&9F9I!F9I!)@[PDD!````!T-TF+E"28$```28NT))`0``!)C;PD<!``
+M`.@`````28N5F!```$F+M9`0``!)C;UP$```Z`````!)@[PDP!````!T-TF+
+ME"3($```28NT),`0``!)C;PDH!```.@`````28N5R!```$F+M<`0``!)C;V@
+M$```Z`````!)@[PD\!````!T-TF+E"3X$```28NT)/`0``!)C;PDT!```.@`
+M````28N5^!```$F+M?`0``!)C;W0$```Z`````!)@[PD4!$```!T-TF+E"18
+M$0``28NT)%`1``!)C;PD,!$``.@`````28N56!$``$F+M5`1``!)C;TP$0``
+MZ`````!)@[PD(!$```!T/4F+E"0H$0``28NT)"`1``!)C;PD`!$``.@`````
+M28N5*!$``$F+M2`1``!)C;T`$0``Z`````!F9I!F9I!)@[PD@!$```!T-TF+
+ME"2($0``28NT)(`1``!)C;PD8!$``.@`````28N5B!$``$F+M8`1``!)C;U@
+M$0``Z`````!)@[PDL!$```!T-TF+E"2X$0``28NT)+`1``!)C;PDD!$``.@`
+M````28N5N!$``$F+M;`1``!)C;V0$0``Z`````!(@\186UU!7$%=PY!(@^P8
+M2(E<)`A,B60D$$B)^^@`````3(VC`!0``$R)Y^@`````2(G?Z`````"_T`<`
+M`.@`````2(G?Z`````!(B=_H`````+X!````2(G?Z`````"^`0```$R)Y^@`
+M````2(M<)`A,BV0D$$B#Q!C#2(/L"$C'QP````#H`````+@`````2(/$",.0
+MD)"0D)!(BP4`````2(E'"$B)/0````##9F9FD&9FD&9FD&9FD(L%``````6H
+M`@0`PV9F9I!!54%455-(B?M)B?5(BRT`````0;P`````Z`````")P$B)VDB%
+MP'0+1(@B2/_"2/_(=?5(@ST``````'4)2(D=`````.L92(-]``!T#F9FD$B+
+M;0!(@WT``'7U2(E=`$R):PA(C4,82(E#&$B)0R!(C4,H2(E#*$B)0S!(C4,X
+M2(E#.$B)0T!(C8,0`@``2(F#$`(``$B)@Q@"``!(C8-0`@``2(F#4`($`,>#
+M6`($```0``!;74%<05W#9F:09I!(A?]T"TB+/^L-9F:09F:02(L]`````$B%
+M_P^5P$B%]@^5P@^VP(7"=`=(BT<(2(D&2(GXPV9F9I!F9F:09F:0BT842(V$
+M.*@"!`##9F9FD%-(@>P``0``2(GS2(M'"$B-M"2`````2(M_$/]0.$B+0PA(
+MB>9(BWL0_U`XN@$````/MH0D@0```#I$)`%W8;K_____#[:$)($````Z1"0!
+M<DZZ`0````^VA"2"````.D0D`G<[NO____\/MH0D@@```#I$)`)R*+H!````
+M#[:$)(,````Z1"0#=Q4/MH0D@P```#I$)`,9TF9F9I!F9I")T$B!Q``!``!;
+MPV9FD&:005154TB)_4B+'0````!(A=L/A+4```!(@WL0`'4:2(E=&$C'10``
+M````2(EK$+@!````Z9D```!(BT,02(M5"$@[4`AU>DB+<!!(BWT0_U)(A,!T
+M:TR-8Q!(@WL0`'1#2(M%"$B#N``!````=!I)BQ0D2#M""'402(MR$$B+?1#_
+MD``!``#K#$F+-"1(B>_H`````(7`>`M-BR0D28,\)`!UO4B)71A)BP0D2(E%
+M`$F)+"2X`0```.L79F:09F:02(L;2(7;#X5+____N`````!;74%<PV9F9I!F
+M9I!F9I!(BP4`````2(D'2(D]`````(-_$`!T$HL%`````(E'%(M'$`$%````
+M`//#9F:09I!!5%53B?U(BQT`````2(7;=#!$#[;G0#AK"'062(-[:`!T%$2)
+MY_]3:(7`9F:09I!T!4B)V.L02(L;2(7;9F:0==2X`````%M=05S#9F9FD%-(
+M@^PP2(GSN0````"`/0`````"=2N#OZ0"!``@=R)(BT9H2(GF2(N[@````/]0
+M>$B+4W@/MD0D#`-"0(E#,.L_3(U'&$V)P;X`````2(M'&$DYP'0C3(G*9F9F
+MD&9FD#F(H/S__W4)_\&^`0```.L(2(L`2#G"=>>%]G7+B4LP2(/$,%O#9F9F
+MD&9FD&9FD+@`````2(L5`````$B%TG00.4(<=@.+0AQ(BQ)(A=)U\`7(````
+MPV9FD&9FD&9FD$%455-(@\2`2(G]28GT2(7V=01,BV<(2(M=$$B%VW1>BX6D
+M`@0`B4-`2(M#"$B+>Q!(B>;_4#@/MD0D$`&%I`($`$B+0PA(BWL0_U!@#[9,
+M)!!(C7L@B<),B>;H``````^V3"002(U[2+HH````3(GFZ`````!(BQM(A=MU
+MHKH`````2(L=`````$B%VW01D#E3&'8#BU,82(L;2(7;=?"!PO@#``"+C:0"
+M!`"-#,E(C7UP3(GFZ`````"+C:0"!`!(C;V0````N@`"``!,B>;H`````$B-
+MO?````"Y`0```+I(````3(GFZ`````"+C:0"!`!(C;T0`0``NB@```!,B>;H
+M`````(N-I`($`(T,R4B-O=````"ZL````$R)YN@`````QX5H`0```0```,>%
+M=`$````0``#'A6P!````$```Z`````")PDB-O;````"Y0B$``$R)YN@`````
+M2(L=`````$B%VW0D9F:09F:02(-[(`!T#XN5I`($`$R)YDB)[_]3($B+&TB%
+MVW7B2(/L@%M=05S#9F:09F:09F:0055!5%532(/L"$F)_8GU@#T``````@^4
+MP$"`_@$/E<(/ML"Y`````(7"#X4D`0``0`^V_N@`````28G$N0````!(A<`/
+MA`H!``!)C7UPZ`````!(B<.Y`````+KX`P``B`A(_\!(_\IU]HL%`````/_`
+MB04`````B8/H`P``2(V#R`,``$B)@\@#``!(B8/0`P``@(N``P```4R)8PA`
+MB&L03(DK08-\)!@`="1(C8/X`P``2(E#(+D`````08M4)!A(A=)T"H@(2/_`
+M2/_*=?9(C8.@`P``2(F#H`,``$B)@Z@#``!(C8.P`P``2(F#L`,``$B)@[@#
+M``#'0S0"`0``QT,P_____TF#?"1(`'0?2(G?0?]4)$B%P'0328U]<$B)WN@`
+M````N0````#K)$B-@Y`#``!)C5482(M*"$B)0@A(B9.0`P``2(E("$B)`4B)
+MV4B)R$B#Q`A;74%<05W#9F9FD&9F9I!F9I!F9I!!54%455-(@^P(2(G]3(LO
+M28M=.$F-13A(.=AT/$F)Q$B->^A(BQM(.6]0=2=(C4<82(M("$B+5QA(B4H(
+M2(D12(E'&$B)0`C&AZH````"Z`````!).=QUQTB+10A(@WA0`'0,2(GO_U!0
+M9F:09F:02(N%F`,``$B+E9`#``!(B4((2(D028U]<$B)[N@`````2(/$"%M=
+M05Q!7<-F9F:005154TF)_$B+7QA(C4<82#G8#X2Y````2(VK</S___9#\`$/
+MA)<```!(@[N(_/__``^%B0```("[@/S__P1V%TB#N_#^__\`=!E(BX/P_O__
+M2#EH"'0,@'T0`75C]D5D`G1=@WTP`'D+2(GN3(GGZ!S[___VA8`#```"=$.^
+M`````$R)Y^@`````2(G!2(7`#Y7`2#GI#Y7"#[;`A<)T(/:!@`,```)T"8"E
+M@`,``/WK#HM%,(E!,,=%,`````"02(L;28U$)!A(.=@/A4?___];74%<PV9F
+M9I!F9I!F9I!(@^P82(D<)$B);"0(3(ED)!!(B?M)B?1(BV\8_XV@`@0`A=)X
+M*N@`````2(7`=3!(BT,(3(GG_Y"`````2(U[($R)YN@`````ZQ5F9I!FD$B-
+M?R#H`````&9F9I!F9I"#O:`"!```=0A(B>_H'P```$B+'"1(BVPD"$R+9"00
+M2(/$&,-F9F:09F9FD&9F9I!!5D%505154TF)_4&^`````$B+7QA(C4<82#G8
+M=%U)B<1(C:MP_/__@+N`_/__`75"]H/4_/__0'0*2(GOZ`````#K+X`]````
+M``!T)O9%9`)U(/9%9`%T#$B)[V9F9I#H``````^V162H!'4&@\@DB$5D2(L;
+M23G<=:9)BUTH28U%*$@YV'092(G%9F:09I!(C7OHZ`````!(BQM(.=UU[TF+
+M71A)C4482#G8="U)B<1(C:MP_/__@+N`_/__!'822(.[B/S__P!U"$B)[^@`
+M````2(L;23G<==9)BUT828U%&$@YV'1V28G$9F:09I!(C:MP_/__@+N`_/__
+M`756#[:#U/S__Z@@=$N#X-N(@]3\__](BX.H_/__2(7`=!A(@W@8`'0)0;X!
+M````ZPF02(L`2(7`=>A%A/9U&8`]``````%U$$B)[^@`````2(GOZ`````!(
+MBQM).=QUDDR)[^@J_?__28.]F`($``!T$$F+?0A!_Y68`@0`9F:09I!;74%<
+M05U!7L-F9F:09F:005=!5D%505154TB![)@```!(B?M,BV<80;\`````2(7_
+M#X0!`0``2(M#"$B+>Q!(C70D$/]0.`^V1"0@.P4`````#X[*````2(U#($B)
+M1"0(]D0D(0%U2`^V!0````!$.?AU/`^V!0````!IP$!"#P")!0````!(QP4`
+M`````````$B)'0````!(Q\8`````3(GGZ`````#II@```&9FD$2+<RA!_X0D
+MH`($`$R+;"0(3(GOZ`````!(B<5(BT,(BS4`````2(M[$$F)V$C'P0````!(
+MB>K_4&B$P'452(GN3(GOZ`````!!_XPDH`($`.L(1#ES*$&#UP#_!0`````/
+MMD0D(#L%``````^//____\<%``````````!(BQM(A=L/A?_^__]!_XPDH`($
+M`$&#O"2@`@0``'4(3(GGZ"W]__](@<28````6UU!7$%=05Y!7\-F9F:09F9F
+MD&9FD$%505154TB#[`A(B?U)B?1)B=5(B968`@0`2(M?$$B%VW0:2(M#"$B+
+M>Q#_D/````"$P'1]2(L;2(7;=>9(BQT`````2(7;=!]F9F:09F:02(-[.`!T
+M"4B)[_]3.&9FD$B+&TB%VW7H387D=!A)BT0D"$F+?"00O@$```#_4%!!QD0D
+M:`''A:`"!``!````2(M]$.@`````@[V@`@0``'0_387M=!5(B>_H`````&:0
+MZR[&A9`"!``!ZR6#O:`"!```=!R_H(8!`.@`````2(GOZ`````"#O:`"!```
+M=>602(/$"%M=05Q!7<-F9I!FD%532(/L"$B)_4@Y/0````!U#DB+!TB)!0``
+M``#K+&:02(L5`````$B%TG0>2#DZ=`U(BQ)(A=)T$4@Y*G7S2(72=`=(BT4`
+M2(D"2(U%&$@Y11AT&4B)PTB+?1A(@>^0`P``Z`````!(.5T8=>I(C44H2#E%
+M*'0Q2(G#9F:09F:02(M%*$B-<.A(BU`(2(L`2(E0"$B)`DB-O=````#H````
+M`$@Y72AUV("]D`($``!U)TB+'0````!(A=MT&V9FD$B#>T``=`E(B>__4T!F
+M9I!(BQM(A=MUZ$B+71!(A=MT%DB+0PA(BWL0_Y#H````2(L;2(7;=>I(@\0(
+M6UW#9I!(BU<82(U'&$@YT'0:2(G!2(V"</S__SFRH/S__W0-2(L22#G1=>FX
+M`````//#9I!32(G[Z`````!(B<;'0!``````2(V`R````$B)1DB+0PPMR```
+M`(E&0$B-1AA(B4882(E&(+D`````NG@```!(C490B`A(_\!(_\IU]DB)\%O#
+M9F9FD&9F9I!F9I!F9I!(@^P82(D<)$B);"0(3(ED)!!)B?Q(B?.)U;@`````
+M.58(<AQ(B??H`````$R)($B)6`B):!"+4P@IZO_"B5,(2(L<)$B+;"0(3(MD
+M)!!(@\08PV9F9I!F9I!F9I!F9I!(@^P(BT<(`T80_\B)1PCH`````$B#Q`C#
+M9F9FD&9FD$B#[`B)\$B-M[````")PN@`````2(/$",-F9F:09F:02(/L"$B)
+M^$B+/TB!Q[````!(B<;H`````$B#Q`C#9I!!5%5328G\O0````"X`````("_
+MD`($``!U,DB+7Q!(A=MT&$B+0PA(BWL0_Y"H````"<5(BQM(A=MUZ$"$[70(
+M3(GGZ`````!`#[;%6UU!7,-F9F:09F9FD&9F9I!F9I!32(M?$$B%VW0<9F:0
+M9F:02(M#"$B+>Q#_D-@```!(BQM(A=MUZEO#9F9FD&9F9I!54TB#[`A(B?U(
+MBU\02(7;="Q(BT,(2(M[$/^0X````(![:`!T$$B+0PA(BWL0O@$```#_4%!(
+MBQM(A=MUU$B+71A(C4482#G8="Y(B<5FD$B-NW#\__^`NX#\__\!=1%(BX-X
+M_/__2(-X6`!T`_]06$B+&T@YW7772(/$"%M=D,-F9F:09F9FD&9F9I!F9I!3
+M2(M?$$B%VW0R9F:09F:0@'MH`'002(M#"$B+>Q"^`````/]04$B+0PA(BWL0
+M_Y#0````2(L;2(7;==1;PV:02(M'&$B+4!A(@\`82#G0="Q(B<%(C8)P_/__
+M@+J`_/__`741.;+@_/__=0E(.;KH_/__=`U(BQ)(.=%UU[@`````\\-F9F:0
+M9F9FD&9F9I!(@^PH2(D<)$B);"0(3(ED)!!,B6PD&$R)="0@2(G]08GT28G6
+M28G-Z(/___](B<-(A<`/A(P```"Z`````/:`@`,```$/A;P```"#N.@`````
+M=0F#N,@`````=`JZ`````.F@````2(M#.$B%P'1*2(MX&$B%_W0Y2(M/&$B%
+MR70HN@````"`>40`=!T/MG%$2&/"2#E\P6!U"4C'1,%@`````/_".=9_Y^@`
+M````D.NU2(L`2(7`=;9(B=]F9I#H`````$B-?2#H`````$B)PTB%P'0L2(M%
+M"$B+?1!-B>A,B?%(B=I$B>;_4&BZ`0```(3`=1%(C7T@2(G>Z`````"Z````
+M`(G02(L<)$B+;"0(3(MD)!!,BVPD&$R+="0@2(/$*,-F9F:09F:09F:00515
+M4TB)_>@`````2(M=&$B-11A(.=AT+TF)Q&9F9I!(C;MP_/__@WOX`'032(N#
+M>/S__TB#>%@`=`7_4%AFD$B+&TDYW'782(GO9F:09I#H`````$B+71A(C448
+M2#G8=!:#>_0`=`BX`0```.L.D$B+&T@YV'7JN`````!;74%<PV9F9I!F9F:0
+M9F:09F:02(/L"$B)^$B+/TB)QNAN\/__2(/$",-F9I!F9I!F9I"#?S``>`?'
+M1S#_____\\.0N@````#_SH/^_W039F9FD`^V!P'"2/_'_\Z#_O]U\0^VPL-F
+M9F:09F:09F:09F:02(L%`````$B%P'0?2(M0$$B%TG0.2#EZ$'052(L22(72
+M=?)(BP!(A<!UX;@`````\\-F9F:09F9FD&9FD&9FD$B#[!A(B5PD"$B);"00
+M2(G[2(-^(`!T:$B+CS`!``!(@WXH`'0,2(M6*$B+1B!(B4(@2(M6($B+1BA(
+MB0)(QT8@`````$C'1B@`````2(.[,`$```!T*4@YBS`!``!T($B+@S`!``!(
+MBV@(Z`````")[BG&2(M[".@`````9F:02(M<)`A(BVPD$$B#Q!C#D%532(/L
+M"$B)_4B)\^@`````2(G!2(-[(`!T)DB#>R@`=`Q(BU,H2(M#($B)0B!(BU,@
+M2(M#*$B)`DC'0R``````BP-(`<A(B4,(2(N5,`$``$B-C3`!``!(A=)T&DB)
+MQDB+0@@I\(7`?PU(C4HH2(M2*$B%TG7I2(E3*$B)2R!(A=)T"$B-0RA(B4(@
+M2(D92#F=,`$``'4+2(M]"(LSZ`````!(@\0(6UW#9F:09F:0055!5%532(/L
+M"$B)^^@`````28G$2(NK,`$``$B)ZDB%[7173(VK,`$``&9FD&:02(M""$0I
+MX(7`?T!(@WHH`'0(2(M"*$R):"!(BT(H2(F#,`$``$B)Q4C'0B``````2,="
+M*`````!(BWH8_U(02(N3,`$``$B%TG6U2(G?Z`````!(A>UT&4@YJS`!``!U
+M$$B+=0A$*>9(BWL(Z`````!(@\0(6UU!7$%=PV9F9I!(BT\82(U'&$@YR'15
+M3&/*2(G'3(V!</S__X"Y@/S__P1V,SFQJ/S__W4KA=)X'$B#N8C\__\`=`Y(
+MBX&(_/__3CE$R&!T"X72>0M)@W@8`'4$3(G`PTB+"4@YSV9F9I!UL;@`````
+MPY"0D)"0D)"02(MW(+D`````NE````!(B?"("$C_P$C_RG7V2(U&$$B)1A!(
+MB4882(DV2(EV"$C'1B@`````2(E^,$C'1C@`````N`````##9F9FD&9F9I!!
+M5%532(G]2(L_2,?&`````.@`````28G$]D5D"'4<2(MU.$B%]G032(L>3(GG
+MZ`````!(B=Y(A=MU[4B+16A(B[V`````_Y"`````2(NU@````$B+?7A(@\<@
+MZ`````!;74%<PV9F9I!F9F:09F:055-(@^P(2(G]2(U'./9`+`)T#>@`````
+MZR=F9I!F9I!(BQA(A=MT&4B+>QA(A?^0=`=(BT<(_U`P2(L;2(7;=>?'A>@`
+M````````2(/$"%M=PV9F9I!F9F:09F:09F:04TB)^$B+7R!(BSM(@<<0`0``
+M2(G&Z`````!(QX/0`````````$B)F]@```!(QX/@`````````$B-L]````!(
+MBSM(@\=(Z`````!;PV9F9I!!5%5328G\@*>``P``_DB+7SA(A=MT&DB#>Q@`
+M=`M(BT,8@*"``P``_DB+&TB%VW7F3(GFOP$```#H`````$''A"3H`````0``
+M`$F+/"1(@<<0`0``Z`````!(B<5(A<!T:L<``0```$C'0`@`````2(E%$$C'
+M0!@`````3(E@($F+7"0X2(7;=#%F9I!F9I!(BWL82(7_=!I(@W\8`'0+2(M_
+M&$B#?Q@`=?5(B>[H`````$B+&TB%VW75_TT`@WT``'4(2(GOZ.3^__];74%<
+MPV9F9I!F9F:09F9FD&9FD$B#[!A(B1PD2(EL)`A,B60D$$B)^TF)](72#XC0
+M````Z`````!(B<5(A<`/A+````!(BUL80;P`````]D!D`G0/2(G'Z`````#K
+M.69FD&:0@#T``````'0K]D!D`69FD'0.2(G'Z`````!F9I!F9I`/MD5DJ$1U
+M!H/()(A%9$&\`0```(.[V`$````/E,!%A>0/E<(/ML"%PG0WQX/8`0```0``
+M`$C'@\`!````````2(F;R`$``$C'@]`!````````2(VSP`$``$B->TCH````
+M`$B)[K\"````Z`````#K'TB+0PA,B>?_D(````!FD$B->R!,B>;H`````&9F
+M9I!(BQPD2(ML)`A,BV0D$$B#Q!C#9F9FD&9FD&9FD&9FD$B#[!A(B5PD"$R)
+M9"002(GX2(M?&$2+9R!(C7M(2(G&Z`````!(B=E(Q\(`````1(GF2(G?Z```
+M``!(BUPD"$R+9"002(/$&,-F9F:09F:0BP4`````2`-'2$B#Z"C#D$B#["A(
+MB1PD2(EL)`A,B60D$$R);"083(ET)"!(B?WHS/___TF)QDR+;5!-BV4@0?],
+M)"`/MH6J````@_@-="6#^`U_$(/X"W1L9F:09F:0Z;P```"#^!%T?&9FD&9F
+MD.FL````#[>%J````&8E_P)F/0`"#X67````@+VK`````'4JQH6K`````<:%
+MJ@````!)C40D$$B+4`A,B7`(28D&28E6"$R),NF9````QH6J````$.M;QH6J
+M`````$F-1"002(M0"$R)<`A)B09)B58(3(DRZW!,B>_H0A\``(7`=2^`O:L`
+M```!=R;^A:L```#&A:H`````28U$)!!(BU`(3(EP"$F)!DF)5@A,B3+K-8"]
+MJ@```!!U&4F+72!)B6T@3(GNOP,```#H`````$F)72!)BT802(F%P````$B)
+M[^@`````08-\)$``=2)!QT0D0`$```!)C70D*$F+?0!(@\=8Z`````!F9F:0
+M9F:02(L<)$B+;"0(3(MD)!!,BVPD&$R+="0@2(/$*,-F9I!(BT<@2(L(N@``
+M``!(.<%T&4B+40A(BP%(B5`(2(D"2(D)2(E)"$B+41A(B=##9I!(@^P(2(M7
+M(("^J`````!U$T@/MX:8````2`.&D````$B)1UC_0B!(BT=H2(N_@````/^0
+MF````$B#Q`C#9F:02(/L&$B)7"0(2(EL)!!(B?U(BU\@QT-``````/:'@`,`
+M`!@/A>L```"#O\@`````#X7>````#[9#2*@"#X72````J`1T(4B-0Q!(.4,0
+M=05(.1MT$DB)[^C#'0``]D-(`@^%K0```$B-0Q!(.4,0=#&#>R``#X69````
+M2(M#$$B+2`A(BQ!(B4H(2(D12(D`2(E`"$B+<!A(B>_H(/___^MR#[9%8CE#
+M('-I9F:09I!(B>_HV/[__TB)PDB%P'14#[>`J````&8E_S!F/00@=2](.1MT
+M',:"J@````%(B=?H`````$B)[^BC_O__2(G"ZP[V0T@!=`B`2T@$9F9FD$B)
+MUDB)[^BU_O__#[9%8CE#('*<2(M<)`A(BVPD$$B#Q!C#9F9FD&9FD&9FD&9F
+MD$B#[!A(B1PD2(EL)`A,B60D$$B)^TR+9U!)BVPD(.B=_/__2(G"@+NH````
+M!'4A]H.I````,'0&]D5(!'02QH.J`````4B)W^@`````ZV20QT5$`````,="
+M(`````!(B5H82(N#P````$B)0A!(QX/``````````$B+10A(B54(2(DJ2(E"
+M"$B)$$$/MD0D8CE%(',>@WU``'48QT5``0```$B-=2A)BSPD2(/'6.@`````
+M2(L<)$B+;"0(3(MD)!!(@\08PV9F9I!F9I!F9I!(@^P(2(M'(("G@`,``/?'
+MA\@`````````@WA``'47QT!``0```$B-<"A(BS](@\=8Z`````!(@\0(PV9F
+MD&:02(/L"$B)^@^VAX`#``"H"'4A@\@(B(>``P``2(M':$B+OX````!(Q\8`
+M````_Y"(````2(/$",-F9F:09F9FD%-(B?M(BT,X2(7`=$UF9I!(BW@82(7_
+M=#E(BT\82(7)="BZ`````(!Y1`!T'0^V<41(8\)(.7S!8'4)2,=$P6``````
+M_\(YUG_GZ`````"0Z[)(BP!(A<!UMDB)WV9FD.@`````2(M#:$B+NX````#_
+MD,@```!(B=_H`````%O#2(/L"+C_____]H>``P```7082(M':`^WTDB+OX``
+M``!%#[;`_Y"@````2(/$",.00;@`````2(MW4$B![@```@!(@>8``/[_2/_&
+M2(M7.$B%TG0JOP$```!F9F:09F:02(M"&$B%P'0-2(M(0"GQB?C3X$$)P$B+
+M$DB%TG7BN0````"Z`0```(G0T^!!A<!U!TACP4@!\,/_P8/Y`W[IN`````##
+M9F9FD&9F9I!F9I"^`````+D`````2,='2`````#V1V1`=`E(QT=``````,-(
+MBU<X2(72=#1F9I!F9I!(@WH8`'0)_\'K&V9FD&:02(M'2$@#0A!(B4=(2#ER
+M$'8$2(MR$$B+$DB%TG72@_D$N`````!(#TS&2(E'0,.005=!5D%505154TB#
+M[`A)B?U(B?5)B==(BU\XN`````!(A=MT$$B#>Q@!@]C_2(L;2(7;=?"Z````
+M`(/X`P^/4@,``.M`2(G:Z4@#``!,BR-)BT0D"$B)0PA)BP0D2(D#2,?&````
+M`$F+?0#H`````$B)QTR)YN@`````N@````#I$`,``$F+73A(A=L/A/X"``!.
+MC70]`$B#>Q@`#X5^`0``2#EK"`^'9`$``$B+0PA(`T,023G&#X=3`0``2#EK
+M"'5Q3#E[$`^$>/___T@Y:PAU84C'Q@````!)BWT`Z`````!(B<?H`````$F)
+MQ+H`````2(7`#X29`@``N0````"R((@(2/_`2/_*=?9(BT,03"GX28E$)!!-
+MB70D"$B+`TF)!"1,B2-,B7L02(G:Z6$"``!(.6L(#X/2````2,?&`````$F+
+M?0#H`````$B)Q^@`````28G$N@````!(A<`/A"X"``"Y`````+(@B`A(_\!(
+M_\IU]DB+0PA)B40D"$B)ZD@K4PA)B50D$$B+`TF)!"1,B2-(B6L(2"E3$$PY
+M>Q!V7DC'Q@````!)BWT`Z`````!(B<?H`````$F)Q$B%P`^$A/[__[D`````
+MNB````"("$C_P$C_RG7V3(GX2`-#"$F)1"0(2(M#$$PI^$F)1"002(L#28D$
+M)$R)(TR)>Q!(B=KIB@$``&9FD&:02(-[&``/A&D!``!F9I!FD$@Y:P@/A5H!
+M``"X`0```$R+(TV%Y'0G28-\)!@`=!9).6PD"'4/2(M3$$DY5"0020]'W/_`
+M38LD)$V%Y'79N@````"#^`$/CRD!``!,.7L0<E9(Q\8`````28M]`.@`````
+M2(G'Z`````!)B<2Z`````$B%P`^$^@```+D`````LB"("$C_P$C_RG7V28EL
+M)`A-B7PD$$B+`TF)!"1,B2-,B>+IS0```$V+93A-A>0/A*@```!)@WPD&``/
+MA8\```!(BU,02(M#"$@!T$DY1"0(=7U)BT0D$$@!T+H`````3#GX#X*,````
+M2,?&`````$F+?0#H`````$B)Q^@`````2(G&N0````"Z(````(@(2/_`2/_*
+M=?9,B?A(`T,(28E$)`A)BT0D$$@#0Q!,*?A)B40D$$B);@A,B7X02(L#2(D&
+M2(DS2(GRZRIF9I!FD$V+)"1-A>0/A5C___^Z`````.L12(L;2(7;#X4'_?__
+MN@````!(B=!(@\0(6UU!7$%=05Y!7\-F9I!F9I!F9I!54TB#[`A(B?M(B?5(
+MQ\8`````2(L_Z`````!(B<%(C5,X2(-[.`!T,&9F9I!F9I!(.2IU&TB+10!(
+MB0)(B>Y(B<_H`````.L09F9FD&9FD$B+$DB#.@!UUTB#Q`A;79##9F9FD&9F
+M9I!F9F:09F:005154TB)_4B)\[X`````2(M/.$B%R7092#G9=`Q(BT,(2#E!
+M"$@/1/%(BPE(A<EUYTB%]@^$E````$B+0Q!(.480<A!(B=Y(B>_H`````.D,
+M`0``2(M-.$B%R7119F:02(-Y&`!U#DB+0PA(`T,02#E!"'0*2(L)2(7)=>/K
+M+TB%R70J2(M6$$B+1@A(`=!(B4$(2(M#$$@IT$@!01!(B=Y(B>_H`````.FR
+M````2,=#&`````!(BU802(M&"$@!T$B)0PA(*5,0Z9(```"^`````$&\````
+M`$B+33A(A<ET,DB#>1@`=2-(BT,(2`-#$$@Y00AU!4F)S.L02(M!"$@#01!(
+M.T,(2`]$\4B+"4B%R77.2,=#&`````!(A?9T'$B+1@A(B4,(2(M#$$@#1A!(
+MB4,02(GOZ`````!-A>1T'DB+0Q!)`T0D$$B)0Q!,B>9(B>_H`````&9FD&9F
+MD(!-9!!;74%<PV9F9I!F9I!!54%455-(@^P(2(G]28GU2(G70;P`````0;@`
+M````O@````!(A=)T!$B+<DA(A?9U#[@`````3#EM0`^"^0```$B+33A(A<ET
+M8V9FD&9FD$B#>1@`=`E(.7D8=2-F9I!,.6D0<AI-A>1T"TF+1"002#E!$',*
+M28G,9F9FD&9FD$B#>1@`#Y3`2(7V#Y7"#[;`A<)T$$B+1@A(`T802#E!"$P/
+M1,%(BPE(A<EUHTV%P'0/28M`$$@#1A!,.>A,#T/FN`````!-A>1T;[X$````
+M2(M]`.@`````2(G#N`````!(A=MT5$B):SA(B>_HCOC__TB)0T!(A<!T&4R)
+M:RA)BW0D"$R)ZDB)[^AA^?__2(7`=0](B=_H`````+@`````ZQ=(B5@82(E#
+M2(!-9!!(B>_H`````$B)V$B#Q`A;74%<05W#9F9FD&9F9I!F9I!(@^P82(E<
+M)`A,B60D$$B)^TR+9SA(BW=(3(GGZ!_]__](B=_H`````$R)Y^@`````2(M<
+M)`A,BV0D$$B#Q!C#4TB)^TC'Q@````!(BS_H`````$B)Q^@`````2(G&2(7`
+M=0U(B=_H`````.LU9F:0N0````"Z(````&9FD&9FD(@(2/_`2/_*=?9(BT,H
+M2(E&$$B)<SA(BT,H2(E#2$B)0T!;PV9F9I!F9F:09F9FD$%455-(@>P``@``
+M28G\2(U?.`^V4RR)T(/@`SP!#X1V`0``B="#X.^(0RRY`````+H``@``2(G@
+MB`A(_\!(_\IU]@^V0RRH`@^%2P$``$B)Y8G"@^+WB%,LQP0D7W=A4DF+1"0H
+M2(E$)`2$TGD-@$PD#!`/MD,KB$0D#?9#+0%T&H!-#P$/ME,MP>("@^((#[9%
+M#(/@]PG0B$4,#[9#+:@$=!>`30\"B<+0ZH/B!`^V10R#X/L)T(A%#`^V0RVH
+M$'08@$T/"(G"P.H$@^("#[9%#(/@_0G0B$4,#[9#+:A`=!6`30\$B<+`Z@</
+MMD4,@^#^"="(10Q(@7L(__\?`'<$@&,L^P^V0RRH('4)P.@"@^`!B$4.O@``
+M``!(BPM(A<ET.4B#>1@`="I(8\9(C01`2(U$Q0!(BU$(2(E0$$B+41!(B5`8
+M2(M1&$B+4D!(B5`@_\9(BPE(A<EUQ[X``@``2(GOZ`````#WV(B%``$``$B+
+M<QA(@>X```(`2('F``#^_T&X`````$B)Z;H!````3(GGZ`````!(@<0``@``
+M6UU!7,-F9F:09F9FD&9FD%-(B?N`?Q`!=0F`/0`````"=0VX_____^LW9F:0
+M9F:02(M'4$@M```"`$@E``#^_TB)1RCHI_W__X!C9/3'0S#_____2(G?Z```
+M``"X`````%O#9F9FD&9FD&9FD&9FD$%455-(B?M)B?1(B?6`/0``````=!*`
+M/0``````=0F`3V0"Z<$````/MH.``P``J`$/A+(```"#X/N(@X`#``"Y````
+M`+H``@``3(G@9F:0B`A(_\!(_\IU]D&X`0```$R)X;H!````O@````!(B=_H
+M`````(!]`$5U/8!]`5)U-T&X`0```$B)Z;H!````O@$```!(B=_H`````(!]
+M`%!U%H!]`4UU$(!+9`)F9F:0ZS>`2V0"ZS&`O?X!``!5D'4G@+W_`0``JG4>
+MN@````!(8\)(P>`$0H.\(,H!````==#_PH/Z`W[G6UU!7,-FD%532(/L"$B)
+M_8!G9+](BU\X2(7;=$9(@WL8`'0)2(M[&.@`````2(L;2(7;=>A(BUTX2(7;
+M="5(@WL8`'062(M[&$B#?Q@`=0OH`````$B+73CK`TB+&TB%VW7;2(GOZ```
+M``!(@\0(6UW#9F:09I!(@>Q(`@``2(F<)!@"``!(B:PD(`(``$R)I"0H`@``
+M3(FL)#`"``!,B;0D.`(``$R)O"1``@``2(G]3(UD)!!(C5\X38GE@#T`````
+M`@^$$0(``$B+=U!(@>X```(`2('F``#^_T&X`0```$R)X;H!````Z`````"%
+MP'0D@*6``P``_DB)[K\!````Z`````"`2RP!Z?<#``!F9F:09F:008$\)%]W
+M85(/A;(!``"^``(``$R)Y^@`````A,`/A9T!``!!@'PD#@`/E<#!X`(/ME,L
+M@^+["<*(4RQ(BT502"T```(`2"4``/[_2(E%*$B)[^@I^___0?9$)`P0=`V`
+M2RR`00^V1"0-B$,K0?9$)`\!=!L/ME,M@\H!00^V1"0,P.@"@^`"@^+]"<*(
+M4RU!]D0D#P)T&@^V4RV#R@1!#[9$)`P!P(/@"(/B]PG"B%,M0?9$)`\(=!L/
+MME,M@\H000^V1"0,P>`$@^`@@^+?"<*(4RU!]D0D#P1T'@^V4RV#RD!!#[9$
+M)`R#X`$/ML#!X`>#XG\)PHA3+4C'!"0`````QT0D#`````!(8T0D#$B-!$!-
+MC3S$38UW$$F#?@@`=&&^!````$B+?0#H`````$B)!"1(A<`/A+,"``!)BU8(
+M28MW$$B)[^@3\___2(G"2(7`=%M(BP0D2(EH.$AC1"0,2(T$0$F+1,0@2(L,
+M)$B)04!(B5%(2(M"$$B)02A(B4H8_T0D#(-\)`P##XYX____2(,\)`!U!O9#
+M+`1T)8!++$!(B>_H`````.EI`0``2(L\).@`````Z3("``!FD(!++`%(C70D
+M$$B)[^@O_/__]D5D`@^$"`$``(!++`&`963[0;@!````2(U,)!"Z`0```+X)
+M````2(GOZ`````"%P`^%U/W__X%\)!!Y8V=L#X7-````O@`"``!(C7PD$.@`
+M````A,`/A;8````/MDPD%(G*P.H$@^("#[:%@`,``(/@_0G0B(6``P``]L$0
+M=`R`2RR`#[9$)!6(0ROV1"07`70:#[93+8/*`0^V1"04P.@"@^`"@^+]"<*(
+M4RWV1"07`G09#[93+8/*!`^V1"04`<"#X`B#XO<)PHA3+?9$)!<(=!H/ME,M
+M@\H0#[9$)!3!X`2#X""#XM\)PHA3+?9$)!<$=!T/ME,M@\I`#[9$)!2#X`$/
+MML#!X`>#XG\)PHA3+?9#+`%T,$B#.P!T(DC'Q@````!(BWT`Z`````!(B<=(
+MBS/H`````$C'`P````!(BT,82(E%*(![+`!Y(4'&10``#[9#*T&(10A(BT,P
+M2(M[2$R)[O^0P````&9FD/9#+0%T*D'&10`"#[9#+=#H@^`!08A%"$B+0S!(
+MBWM(3(GN_Y#`````9F9FD&9FD`^V0RVH!'0@0<9%``/`Z`.#X`%!B$4(2(M#
+M,$B+>TA,B>[_D,`````/MD,MJ!!T)4'&10`$P.@%@^`!08A%"$'&10D`2(M#
+M,$B+>TA,B>[_D,`````/MD,MJ$!T(T'&10`%P.@'08A%"$'&10D`2(M#,$B+
+M>TA,B>[_D,````"02(N<)!@"``!(BZPD(`(``$R+I"0H`@``3(NL)#`"``!,
+MB[0D.`(``$R+O"1``@``2('$2`(``,-F9F:09F9FD$B![!@"``!(B9PD``(`
+M`$B)K"0(`@``3(FD)!`"``!(B?M(C6\X28GD@#T```````^$7@$``(!/9`*`
+M32P!@&=D^T&X`0```$B)X;H!````O@D```#H`````(7`#X4:`0``@3PD>6-G
+M;`^%TP```+X``@``2(GGZ`````"$P`^%O@````^V3"0$B<K`Z@2#X@(/MH.`
+M`P``@^#]"="(@X`#``#VP1!T#(!-+(`/MD0D!8A%*T'V1"0'`70;#[95+8/*
+M`4$/MD0D!,#H`H/@`H/B_0G"B%4M0?9$)`<"=!H/ME4M@\H$00^V1"0$`<"#
+MX`B#XO<)PHA5+4'V1"0'"'0;#[95+8/*$$$/MD0D!,'@!(/@((/BWPG"B%4M
+M0?9$)`<$=!X/ME4M@\I`00^V1"0$@^`!#[;`P>`'@^)_"<*(52WV12P!=$Q(
+M@WT``'0C2,?&`````$B+.^@`````2(G'2(MU`.@`````2,=%``````!(BT48
+M2(E#*.L8@*.``P``_DB)WK\!````Z`````"`32P!2(N<)``"``!(BZPD"`(`
+M`$R+I"00`@``2('$&`(``,-F9F:09F9FD&9F9I!(8_9(`?Y(B?%(.?YV%V:0
+M2(/I`@^V$0^V00&(`8A1`4@Y^7?K2(GY2#GW=&:`/R!U$$C_QT@Y]W1)@#\@
+M9F:0=/!(.?=T/(`_`'0W9F9FD`^V!TC_QSP@=19(.?=T)(`_`'05@#\@=!!F
+M9F:09F:0#[9'_X@!2/_!2#GW=`6`/P!US4@Y\70+Q@$`2/_!2#GQ=?7SPV9F
+M9I!F9F:09F:0#[97"M#J@^(!#[9&"M#H@^`!N0$````YPG]5#[97"M#J@^(!
+M#[9&"M#H@^`!N?____\YPGPZ#[9'#+D!````.D8,=RP/MD<,N?____\Z1@QR
+M'@^V1PVY`0```#I&#7<0#[9'#3I&#1G)9F9FD&9FD(G(PV9F9I!F9I!F9I!F
+M9I!!5T%6055!5%532(/L:$F)_$F)]D&)UTB+?QB^`0```.@`````2(G%28M$
+M)`A(C70D,$R)]_]0>$B+E9@#``!(BX60`P``2(E0"$B)`DB+10!(BU@82(/`
+M&$@YV`^$D@```$R-JW#\__^`NX#\__\!=6Y(BY/H_/__28M$)`A(.T((=1Q(
+M@[@``0```'022(MR$$F+?"00_Y```0``ZPV028MU>$R)Y^@`````A<!FD'A"
+MA<!U*DF+1"0(28N]@````$B-="0`_U!X2(UT)`!(C7PD,.BG_O__A<!^%V9F
+MD$B+&TB+10!(@\`82#G8#X5N____2(V%D`,``$B+4PA(B4,(2(F=D`,``$B)
+M4`A(B0+'130!````@(V``P```4F+1"0(2(E%:$R)M8````!,B65X1(E]<$B+
+M1"0P2(E%4$B)12@/MD0D/HA%8HM$)$1FB45@2(M-(`^V5"0Z@^(!#[9!2(/@
+M_@G0B$%(2(V]B````+XH````Z`````!(B>A(@\1H6UU!7$%=05Y!7\.04TB#
+M[##H9O[__TB)PTB+0&A(B>9(B[N`````_U!X2(M$)!CV1"0*`74)]H```0``
+M!'4(2(G?Z`````!(B=A(@\0P6\-F9F:09F9FD&9F9I!(@^P82(E<)`A,B60D
+M$$F)](G32,?&`````.@`````2(G'C0S;NB````!,B>;H`````$B+7"0(3(MD
+M)!!(@\08PV9F9I!F9F:09F9FD&9FD$B#[%A(B5PD.$B);"1`3(ED)$A,B6PD
+M4(G[2(GU28G5@_\'#X>G`0``B?C_),4`````2(GWZ`````!)B<1(BU`82(U`
+M&$@YT`^$@@$``&:02(VJ</S__X"Z@/S__P%U$$PYJO#\__]T%&9F9I!F9I!(
+MBQ)(.=!UV.E3`0``@_L'#X=*`0``B=C_),4`````2(M%"$B)[_]0,.DR`0``
+M@[W(``````^%)0$``,>%R`````$```!(BT4(2(M`6$B)A;````!(B:VX````
+M2,>%P`````````!(C;6P````28U\)%CH`````.GD````@(V``P``$.G8````
+M@*6``P``[TB+12"#>$``#X7#````QT!``0```$B+=2!(@\8H28U\)%CH````
+M`.FE````2(M%>$B+0`A(B>9(B[V`````_U!X#[9$)`Z(16+I@P```&9FD$B)
+M]^@`````28G$2(M8$$B%VW0.2#EK$'0(2(L;2(7;=?)(C7M(Z`````!(A<!T
+M4$B)6!A$B6@@2,<``````$B)0`A(QT`0`````$F-?"1(2(G&Z`````#K)F9F
+MD&9FD$B+7B!(QT8@`````+\#````Z`````!(B5T@9F:09F:02(M<)#A(BVPD
+M0$R+9"1(3(ML)%!(@\18PV9F9I!F9I!3QP4``````````$B+'0````!(A=MT
+M(_^3D````#D%`````',,_Y.0````B04`````2(M;"$B%VW7=@P4`````*$C'
+MQP````#H`````+@`````6\-F9F:09F9FD&9F9I!(@^P(Z`````!(@\0(PV:0
+M4TB)^TB+5R`/MD)(@^`%/`%U73ER1')8O@$```!(BS_H`````$B)PDB%P'1&
+M#[:`J0```(/@SX/(((B"J0```$B)6E!(B5I8QH*H````!,:"J@````!(QX+`
+M`````````$B)U^@`````ZPAF9I!FD/]"1%O#9F9FD&9F9I!F9I!(BT<@QT!$
+M`0```,-F9F:02(/L&$B)7"0(2(EL)!!(BU]82(LOZ`````#_"X,[`'4/2(US
+M"$B)[^@`````9F:02(M<)`A(BVPD$$B#Q!C#D%532(/L"$B)^TB+;R"^`0``
+M`$B+/^@`````N@````!(A<`/A)4```#V14@!=#+&@*@````"2,>`F```````
+M``#&@)`````&QX"4`````````,:`D0````#K7&9FD&9FD,:`J`````-(QX"@
+M`````````,:`FP```$!FQX"4``````!FQX"6``````!FQX"8``````#&@)H`
+M``!`9L>`D```````9L>`D@````$`9L>`G```````2(E84$B)PDB)T$B#Q`A;
+M7<-F9I!F9I!F9I!32(GSZ"?___](A<!T&4B)6%A(QX#``````````/\#2(G'
+MZ`````!;PV9F9I!F9I!!5%532(G[28GT@'\0!'9`O0````"`?T0`=%EF9I!F
+MD$ACQ4B+?,-@2(7_=!/VAX`#```!=`I,B>;H`````&:0_\4/MD-$.>A_UNLH
+M9F9FD(!_$`1U"DB+7SAF9I!F9I#V@X`#```!=`M,B>9(B=_H7/___UM=05S#
+M9F9FD&9FD$B#[!A(B5PD"$B);"002(MO4$B+72`/ME-(B="#X/V(0TB`OZH`
+M```!=0B)T(/@^8A#2.@`````@WM``'48QT-``0```$B-<RA(BWT`2(/'6.@`
+M````2(M<)`A(BVPD$$B#Q!C#9F9FD&9F9I!F9I!(@^P82(E<)`A(B6PD$$B)
+M^TB+;R#H]OW__TB)PKC_____2(72="A(QX+``````````(!-2`)(BT-H2(N[
+M@````$B)UO^0F````+@`````2(M<)`A(BVPD$$B#Q!C#D)!(BPT`````2(7)
+M=#-(BU$82(U!&$@YT'0>2(G&9F9FD$B-@G#\__\YN.@#``!T%4B+$D@YUG7I
+M2(L)2(7)=<VX`````//#9F9FD&9FD&9FD(!_!`!U#[@`````@3][`0``=A3K
+M#;@`````@3][`0``=@6X`0```//#9F9FD&9FD(!_!`!U#[@`````@3_#`0``
+M=A3K#;@`````@3_#`0``=@6X`0```//#9F9FD&9FD$B)^DB)\0^V!SH&=15F
+M9I"`.@!T#4C_PDC_P0^V`CH!=.X/O@(/OA$IT,-F9I!FD$%505154TB#[`A(
+MB?U!B?6)M5P"!`!!O`````!!.?1S*$2)XTC!XP1(`>M(C;-8`@``2(GOZ```
+M``!(B8-0`@``0?_$13GL<MC'A6`"!``2````2(L5`````$B%TG0>D(N%8`($
+M`#M"$'8)BT(0B85@`@0`2(M2"$B%TG7C2(/$"%M=05Q!7<-F9F:09F9FD%53
+M2(/L"$B)^[T`````@[]<`@0``'8IB>A(P>`$2`'82(N06`(``$B+L%`"``!(
+MB=_H`````/_%.:M<`@0`=]?'@UP"!```````2(G?Z`````!(@\0(6UW#9F9F
+MD&9FD$%6055!5%532(/$@$&)_4F)]D&\`````$B++0````!(A>T/A)````!(
+MBUT02(7;='I(BT,(2(M[$$B)YO]0.(!\)!,`=%U$B>!!_\1$.>AU4DV%]G1(
+M#[9$)!=!.09\/DB+&TB%VW4(N`````#K3I`/MD0D%T$I!DB+0PA(BWL02(GF
+M_U`X@'PD$P!T![@`````ZRD/MD0D%T$Y!GW"2(G8ZQI(BQM(A=MUADB+;0!(
+MA>T/A7#___^X`````$B#[(!;74%<05U!7L-F9I!F9I!!5D%505154TB#Q(!!
+MB?U)B?9!O`````!(BRT`````2(7M#X2-````2(M=$$B%VW1W2(M#"$B+>Q!(
+MB>;_4#B`?"03`'1:1(G@0?_$1#GH=4]-A?9T0$&#/@!T.DB+&TB%VW4,N```
+M``#K3V9FD&:00?\.2(M#"$B+>Q!(B>;_4#B`?"03`'0(N`````#K*Y!!@SX`
+M=<9(B=CK'V9FD&:02(L;2(7;=8E(BVT`2(7M#X5S____N`````!(@^R`6UU!
+M7$%=05[#9F:09F:09F:005=!5D%505154TB![)@```!)B?](B70D"$F)U$B)
+MS4&^_____\=$)`0`````QP(`````QP$`````3(LM`````$V%[0^$I````&9F
+M9I!F9I!)BUT02(7;#X2#````9F:02(M#"$B+>Q!(C70D$/]0.$B+2PA(@[D(
+M`0````^5P$B%[0^5P@^VP(7"=!1(BWL0_Y$(`0``B40D!&9FD&9FD(!\)",`
+M=!)!_\9!QP0D`````,=%``````!,.?MU"DB+1"0(1(DPZR4/MD0D)T$!!"2+
+M1"0$`44`2(L;2(7;=8!-BVT`387M#X5C____2('$F````%M=05Q!74%>05_#
+MD$%455-(@\2`O0````!,BR4`````387D=#YF9F:09F:028M<)!!(A=MT)&9F
+MD&9FD$B+0PA(BWL02(GF_U`X@'PD$P&#W?](BQM(A=MUXDV+)"1-A>1UR8GH
+M2(/L@%M=05S#9F9FD&9F9I!F9I!F9I!54TB![(@```!(B?.^`````.C:_/__
+M2(G%N/____](A>T/A.T```"Y`````+I,````2(G8B`A(_\!(_\IU]KD`````
+MNH````!(B>!F9I!FD(@(2/_`2/_*=?9(BT4(2(GF2(M]$/]0.`^V1"06B$,#
+M#[9$)!2(`P^V1"05B$,!2(M$)#Q(B4,$2(M$)$1(B4,,2(M$)$Q(B4,42(M$
+M)%1(B4,<BT0D7(E#)$B+1"082(E#*$B+1"0@2(E#,$B+1"0H2(E#.$B+1"0P
+M2(E#0(M$)#B)0T@/MD0D%XA#`DB#?0``="M(BVT`2(M%"$B+?1!(B>;_4#B`
+M?"03`'42#[9#`@)$)!>(0P)(@WT``'75N`````!(@<2(````6UW#9I!54TB!
+M[(@```!(B?.^`````.BZ^___2(G%N/____](A>T/A"$!``"Y`````+I8````
+M2(G8B`A(_\!(_\IU]KD`````NH````!(B>!F9I!FD(@(2/_`2/_*=?9(BT4(
+M2(GF2(M]$/]0.`^V5"06B%,##[9$)!2(`P^V1"05B$,!2(M$)#Q(B4,$2(M$
+M)$1(B4,,2(M$)$Q(B4,42(M$)%1(B4,<BT0D7(E#)$B+1"082(E#*$B+1"0@
+M2(E#,$B+1"0H2(E#.$B+1"0P2(E#0(M$)#B)0T@/M@0DB$-0#[9$)`&(0U$/
+MMD0D`HA#4@^V1"0#B$-32(M%&(E#3(!]:`!T"(G0@\@$B$,##[9$)!>(0P)(
+M@WT``'0K2(MM`$B+10A(BWT02(GF_U`X@'PD$P!U$@^V0P("1"07B$,"2(-]
+M``!UU;@`````2('$B````%M=PV9F9I!F9F:09F:09F:005=!5D%505154TB!
+M[,@```")="0,28G62(UT)`SH3OK__TF)Q$&_`````+C_____387D#X3X````
+M28ML)!BY`````+I$````3(GP9F:09I"("$C_P$C_RG7V28M$)`A(C70D0$F+
+M?"00_U`X@'PD4A`/MD0D4KH/````#T/"B$0D4DF+1"0(BW0D#$F+?"002(GB
+M_Y"X````A<!U#HM$)`1!B48$BP0D08D&2(M=&$B-11A(.=AT=$F)Q69FD&:0
+M2(VK</S__X"[@/S__P%U5$PYH^C\__]U2TB+@]C\__](B[OP_/__2(UT)!#_
+M4'CV1"0:`G4N#[9$)!P[1"0,=2,/MD0D'3I$)%)S&`^VT(N%Z`,``$&)1)8(
+M0?_'1#A\)%)T"$B+&TDYW764N`````!(@<3(````6UU!7$%=05Y!7\-F9F:0
+M9F:09F:09F:00;H`````N`````"%]@^.L````.L$1(G0PTR+#0````!-A<D/
+MA)<```!F9F:09F:028M)&$F-01A(.<AT=TF)PTR-@7#\__](@[F(_/__`'5;
+M@+F`_/__!'8K2(N!\/[__TB%P'0-2(-X"`!T!DPY0!!T.4ECTD&+@.@#``")
+M!)=!_\+K'D&`>!`!=1=!]D!D`G0026/208N`Z`,``(D$ET'_PD$Y\@^$:?__
+M_TB+"4DYRW6,38L)387)#X5P____1(G0\\-F9F:09F9FD&9FD$&Z`````+@`
+M````A?9^6NL$1(G0PTR+!0````!-A<"0=$1)BT@828U`&$@YR'0O28G!2(V!
+M</S__X"Y@/S__P%U%$ECTHN`Z`,``(D$ET'_PD$Y\G2[2(L)23G)==1-BP!-
+MA<!UO$2)T//#9F:09I"-1_NZ`````(/X!W=#B<#_),4`````N@$```#K,[H"
+M````ZRRZ!P```.LEN@4```#K'KH&````ZQ>Z`P```&:0ZPZZ!````.L'N@@`
+M``!FD(G0PV9F9I!F9I!F9I!F9I!54TB#[`A(B?V[`````/:'@`,```%U&;,!
+M]H=A`@``!+@!"```#T3#Z9L!``!F9I#VAV`"```"=1!(BU=02(G02#-'6$B%
+MPG0#@\L"B=B`S!#VA6`"```!#T78B=B#R`3VA6`"```0#T78B=B`S`'VA6`"
+M```@#T78B=B`S`+VA6`"``!`#T782(-]6`!T(8/+"$B+?5CH`````$B+50@/
+MME(*B=F`S2`YT`],V69FD(G8@\@0]H6``P``!`]%V(G8@\A`]H6``P```@]%
+MV(G8#(#VA6`"```(#T78B=B`S`CVA6$"```$#T78B=B`S`3VA6$"```(#T78
+MO@````"`?40`#X2D````#[9]1&9FD$ACQDB+3,5@2(7)#X2"````]H&``P``
+M`71Y@'D0!'9S]H%@`@```G402(M14$B)T$@S05A(A<)T`X/+`HG8@,P0]H%@
+M`@```0]%V(G8@\@$]H%@`@``$`]%V(G8@,P!]H%@`@``(`]%V(G8@,P"]H%@
+M`@``0`]%V(G8@\@(2(-Y6``/1=B)V`R`]H%@`@``"`]%V/_&.?</CV/____V
+MPP)T%/;'$'4,B=@E""```(/X"'4#@^/]B=A(@\0(6UW#D+@`````]H>``P``
+M`;H!````#T3"B<*#RB#V1@@@#T7"B<*#R@+VAX`#```$#T7"B<*#R@3VAX`#
+M```"#T7"B<*#RA#V1@@0#T7"B<*#RD#V1@H!#T7"B<*`RH#V1@H"#T7"B<*!
+MR@```(#V1V0$#T7"B<*!R@```@#V1V0"#T7"B<*!R@```0#V1V0!#T7"PU-(
+MBX=H`@``2,'H"TAIT.@#``!(BT<H2(G!2,'I"TB)T+H`````2/?Q2(G!#[97
+M1$B+1P@/MD`*B=,IPXG82)A(#Z_!2(T$@$2-!`"^`````(/Z``^.A````$&)
+MT69FD$ACQDB+3,=@2(7)=&KV@8`#```!=&&`>1`$=EOV@6`"``!P=%)(BX%H
+M`@``2,'H"VG0Z`,``$B+02A)B<))P>H+B="Z`````$'W\D&)P@^V041(BU$(
+M#[92"BG000^OPFO("D6%P`^4PD$YR`^7P`G0J`%$#T7!_\9!.?%_@D&!^!$G
+M``"X$"<``$0/0\!$B<!;PV9F9I!F9I!F9I!F9I!32(N/@`(``("YJ@````(/
+MA;$```!(BT$02(M1"$B+0"A(*T(H2,'H"[H0)P``2(7`#X1\`0``@'DH`'1`
+M2(M!$$B+4"A(B=!(*X&@````2,'H"TAIP.@#``!(BTD(2"M1*$C!Z@M(B=&Z
+M`````$CW\4B-!("-%`#I-@$``$B+00A(BU`H2(N!H````$@IT$C!Z`M(:?#H
+M`P``2(M!$$B+0"A(*=!(B<)(P>H+2(GP2(G3N@````!(]_-(C02`C10`Z>T`
+M``"`N:H````#=7:`>2@`=#M(BT$(2(M0*$B)T$@K@:````!(P>@+2&G`Z`,`
+M`$C!Z@M(B=&Z`````$CW\4B-!("-%`#II@```&9FD$B+@:````!(P>@+2&G0
+MZ`,``$B+00A(BT`H2(G!2,'I"TB)T+H`````2/?Q2(T$@(T4`.MN@'DH`'0U
+M2(M!$$B+4"A(B=!(*X&@````2,'H"TAIP.@#``!(P>H+2(G1N@````!(]_%(
+MC02`C10`ZS-(BX&@````2,'H"TAIT.@#``!(BT$02(M`*$B)P4C!Z0M(B="Z
+M`````$CW\4B-!("-%`"!^A$G``"X$"<```]#T(G06\-F9F:09F9FD&9FD$%5
+M05154TB#[`A)B?U(B?-(BX=P`@``2(D&2(N'>`(``$B)1@@/MG\0Z$+Z__^(
+M0V1!#[9%18A#94F+A6@"``")@Y````!,B>_H@OK__XE#:$R)[^@`````B8.,
+M````QD-F`$&\`````$&`?40`=&5)8\1)BVS%8$B%[71+@'MG`'4,#[9]$.CD
+M^?__B$-G@'T0!'4;2`^V0V9(BU4XBY+H`P``B52#;.L59F:09F:02`^V4V:+
+MA>@#``")1)-L_D-F@'MF!W<-0?_$00^V141$.>!_FT0/MF-F08/\!W\426/$
+MQT2#;/____]!_\1!@_P'?NQ(@\0(6UU!7$%=PY!!54%455-(@^P(28G]2(GS
+M2(N'<`(``$B)!DB+AW@"``!(B48(#[9_$.A"^?__B$-D00^V146(0V5)BX5H
+M`@``2(F#L````$R)[^B!^?__B4-H3(GOZ`````")@ZP```#&0V8`0;P`````
+M08!]1`!T9$ECQ$F+;,5@2(7M=$J`>V<`=0P/MGT0Z./X__^(0V>`?1`$=1I(
+M#[9#9DB+53B+DN@#``")5(-LZQ1F9I!FD$@/ME-FBX7H`P``B423;/Y#9H![
+M9@]W#4'_Q$$/MD5$1#G@?YQ$#[9C9D&#_`]_%$ECQ,=$@VS_____0?_$08/\
+M#W[L2(/$"%M=05Q!7<.02(M/&$B%R74,BT<XPXG0`T$X_\##N@````"`>40`
+M9I!T$P^V<42)T$@Y?,%@=-[_PCG6=_&X`````,-F9I!FD$%505154TB#[`A)
+MB?U)B?1(BT=09HF&R````.B@____08F$),0```!)BX5P`@``28D$)$F+A7@"
+M``!)B40D"$$/MGT0Z.?W__]!B$0D9$$/MD5%08A$)&5)BX5H`@``28F$)+``
+M``!,B>_H(?C__T&)1"1H3(GOZ`````!!B80DK````$'&1"1F`+T`````08!]
+M1`!T>$ACQ4F+7,5@2(7;=$!!@'PD9P!U#@^V>Q#H?/?__T&(1"1G@'L0!'44
+M2&/%2(M3.(N2Z`,``$&)5(1LZQU(8]6+@^@#``!!B424;.L-2&/%0<=$A&P`
+M````D$'^1"1F_\5!#[9%1#GH#Y_`@_T/#Y["#[;`A<)UB$$/MFPD9H/]#W\:
+M9F9FD&9FD$ACQ4''1(1L_______%@_T/?NU)@[V``@```'1C28N5@`(``+C_
+M____2(-Z"`!T"DB+0@B+@.@#``!!B80DN````+C_____2(-Z$`!T"DB+0A"+
+M@.@#``!!B80DO````$B#>@@`=!E(@WH0`'023(GOZ`````!!B80DP````&:0
+M2(/$"%M=05Q!7<-F9I!FD$%505154TB#[`A)B?U)B?1(BT=02(F&D````.CP
+M_?__08F$)(0```!)BX5P`@``28D$)$F+A7@"``!)B40D"$$/MGT0Z#?V__]!
+MB$0D9$$/MD5%08A$)&5!#[9%2$&(A"2(````28N%:`(``$F)1"1P3(GOZ&?V
+M__]!B40D:$R)[^@`````08E$)&Q!QD0D9@"]`````$&`?40`#X2`````2&/%
+M28M<Q6!(A=MT1D&`?"1G`'4.#[9[$.C!]?__08A$)&>`>Q`$=1=(8\5(BU,X
+MBY+H`P``08F4A)@```#K(DACU8N#Z`,``$&)A)28````ZP](8\5!QX2$F```
+M``````!!_D0D9O_%00^V140YZ`^?P(/]/P^>P@^VP(7"=8!!#[9L)&:#_3]_
+M&F9F9I!(8\5!QX2$F````/______Q8/]/W[J28.]@`(```!T8$F+E8`"``"X
+M_____TB#>@@`=`I(BT((BX#H`P``08E$)'BX_____TB#>A``=`I(BT(0BX#H
+M`P``08E$)'Q(@WH(`'0<2(-Z$`!T%4R)[^@`````08F$)(````!F9I!FD$B#
+MQ`A;74%<05W#9F:09I!!5%532('LP````$F)_$B)\TB+;WBX_____X!_$`$/
+MA98!``!(BT=H2(VT))````!(B[^`````_U!X2(M%"$B-="002(M]$/]0.$B-
+M3"0,2(U4)`A(C70D!$B)[^C?[?__#[:$))T```"(0P(/MH0DG````/:$))H`
+M```"=`8#1"0,ZP0#1"0(B$,!BT0D!(@#08!\)&0`>0M!#[9$)&.(0P/K"P^V
+MA"2B````B$,##[:4))@```")T<#I!H/A`0^V0P:#X/S`Z@<!T@G("=`/MHPD
+MF0```(/A`<'A`H/@\P^VM"29````C12U`````(/B"`G("=")\8/A$(/@SXGR
+M@^(@"<@)T(GQ@^%`@^`_B?+`Z@</MM+!X@<)R`G0B$,&#[:4))\```"#X@,/
+MMD,'@^#\"="(0P</MH0DHP```(A#!4#VQ@1T!\9#!`+K'9`/MH0DF0```,#H
+M`X/@`8/X`1G`@^#^@\`#B$,$2(VT))````!,B>?H=/7__XE#"$B#O"2H````
+M`'0K2(NT)*@```!(C7L,NI8```#H`````$B#PT*^*````$B)W^@`````QD,G
+M`+@`````2('$P````%M=05S#9F9FD&9FD&9FD$%455-(@>S`````28G\2(GU
+M2(M?>+C_____@'\0`0^%^`$``$B+1VA(C;0DD````$B+OX````#_4'A(BT,(
+M2(UT)!!(BWL0_U`X2(U,)`Q(C50D"$B-="0$2(G?Z`_L__\/MH0DG0```(A%
+M`@^VA"2<````]H0DF@````)T!@-$)`SK!`-$)`B(10&+1"0$B$4`08!\)&0`
+M>0M!#[9$)&.(10/K"P^VA"2B````B$4##[:$)*,```"(104/MI0DF````(G1
+MP.D&@^$!#[9%!H/@_,#J!P'2"<@)T`^VC"29````@^$!P>$"@^#S#[:T))D`
+M``"-%+4`````@^(("<@)T(GQ@^$0@^#/B?*#XB`)R`G0B?&#X4"#X#^)\L#J
+M!P^VTL'B!PG("="(108/MI0DGP```(/B`P^V10>#X/P)T(A%!T#VQ@1T!L9%
+M!`+K'`^VA"29````P.@#@^`!@_@!&<"#X/Z#P`.(101(C;0DD````$R)Y^BD
+M\___B44(2(.\)*@`````="M(B[0DJ````$B-?0RZE@```.@`````2(U=0KXH
+M````2(G?Z`````#&0R<`0?9$)&1!=1A)BT0D2$B)A:(```!)BT0D0$B)A:H`
+M``!)BTPD.+X`````2(7)=#-(@WD8`'0?2(M!&$B+0!A(A<!T$DACUHN`Z`,`
+M`(F$E;H```#_QH/^!W\(2(L)2(7)=<VX`````$B!Q,````!;74%<PV9F9I!F
+M9F:055-(@^P(B?U(B?/H`````$B)Q[D`````NJX```!(B=B("$C_P$C_RG7V
+MA>T/E,)(A?\/E,`)T+K_____J`%U4DB+1RB)0P2X_____TB#?Q@`=`I(BT<8
+MBX#H`P``B4,(@'\0!'83Q@,!2(US#.C>]?__N@````#K&;K_____@'\0`74.
+MQ@,"2(US#.AP^___B<*)T$B#Q`A;7<-F9I!FD%532(/L"(G]2(GSZ`````!(
+MB<>Y`````+K8````2(G8B`A(_\!(_\IU]H7M#Y3"2(7_#Y3`"="Z_____Z@!
+M=5-(BT<H2(E#!+C_____2(-_&`!T"DB+1QB+@.@#``")0PR`?Q`$=A/&`P%(
+MC7,0Z#WV__^Z`````.L9NO____^`?Q`!=0[&`P)(C7,0Z,_Z__^)PHG02(/$
+M"%M=PV9F9I!!5%5308G\2(GUZ`````!(B<.Y`````+KZ````2(GHD(@(2/_`
+M2/_*=?9%A>0/E,)(A=L/E,`)T+K_____J`$/A88```!(BT,H2(E%!+C_____
+M2(-[&`!T"DB+0QB+@.@#``")10RX_____X-[,`!X!`^V0S"(10-(BP-(BW@(
+MZ`````"(10(/MH.!`P``B$4!@'L0!'87QD4``4B-=2!(B=_HJ?;__[H`````
+MZQVZ_____X![$`%U$L9%``)(C74@2(G?Z,?[__^)PHG06UU!7,-F9F:09F9F
+MD&9FD&9FD$%455-!B?Q(B?7H`````$B)P[D`````BU4`@^H%2(U%!4B%TG0*
+MB`A(_\!(_\IU]D6%Y`^4PDB%VP^4P`G0NO____^H`0^%D0```$B+0RA(B440
+MN/____](@WL8`'0*2(M#&(N`Z`,``(E%&+C_____@WLP`'@$#[9#,(A%#TB+
+M`TB+>`CH`````(A%#@^V@X$#``"(10V`>Q`$=B+&10P!NO____^`>T1`=S!(
+MC74L2(G?Z&CW__^Z`````.L=NO____^`>Q`!=1+&10P"2(UU+$B)W^C6^O__
+MB<*)T%M=05S#9F9FD&9FD&9FD&9FD$%7059!54%455-(@>PH`@``2(G]28GV
+MB%0D'TC'1"00_____\9$)`\`@'X/`'@,@'\0!G4+]D8/`G0%QD0D#P&Y````
+M`+H``@``2(U$)""0B`A(_\!(_\IU]D$/MD8+B$5(00^V1@Z(145!#[9.#K@!
+M````T^!FB45&#[:58`(``(G0@\@$B(5@`@``0?9&#P-T18G0@\@%B(5@`@``
+M2,>%:`(```````!(BT4(@'@+`'0PB="#R`>(A6`"``"`?1`*=1\/MDU$_\FX
+M`0```$C3X$B)15#K"TC'A6@"``#_____28M&$$B)A7`"``!)BT882(F%>`(`
+M`$&\`````(!]1``/A"(!``!)8\1(BUS%8$B):QA(BT0D$$@Y0RAS"4B+0RA(
+MB40D$(![$`0/A>@```!,BWLX@'PD'P`/E<`/ME0D#X/R`0^VP(7"=#=!O0``
+M``!(BT-(26/U2`-P"$&X`````$B-3"0@N@$```!,B?_H`````$'_Q4&#_0%^
+MU.F6````@'PD#P`/A(L```!(BT-(2(MP"$&X`0```$B-3"0@N@$```!,B?_H
+M`````(7`=6>`O"0>`@``JG4<@+PD'P(``%5U$L:$)!X"``!5QH0D'P(``*JP
+M`8!\)"!2=1:`?"0A174/QD0D($7&1"0A4K@!````A<!T($B+0TA(BW`(0;@`
+M````2(U,)""Z`0```$R)_^@`````0?_$#[9%1$0YX`^/WO[__X!]$`=U+T&\
+M``````^V142)P8/X`'Y/26/$2(M4Q6!(BT4H2`-"*$B)12A!_\1$.>%_Y.LQ
+M2(M%"(!X"0!T#0^W14;WV$B82"%$)!`/MD5$2(M5"`^V4@HIT$B82`^O1"00
+M2(E%*$$/MD8/@^`<P?@"B(6!`P``2('$*`(``%M=05Q!74%>05_#9F9FD&9F
+M9I!F9F:00;D`````@']$`'1M1`^V5T1)8\%(BU3'8$B%TG13]H*``P```71*
+M@'H0!'8XN0````"`>D0`=#E$#[9"1&9FD$ACP4B+1,)@2(7`=`_V@(`#```!
+M=`9(.7`X="+_P4$YR'_=ZPQ(.7(X=09(B=!FD,-!_\%%.<I_F+@`````\\-!
+MN0````!!N`````!(A?9T!$R+1DBY`````$B+5SA(A=)T$4B#>A@!2(/9_TB+
+M$DB%TG7ON`````!(@_D##X>*````N0````!(A?9T!$B+3BA(BU<X2(72=$YF
+M9I!F9I!(A?9T!D@Y<AAT-4V%P&:0=!=(@WH8`'4G28M`"$D#0!!(.4((3`]$
+MRDB#>A@`=1!(.4H0=@I(BTH09F:09F:02(L22(72=;A-A<`/E<!-A<D/E<(/
+MML"%PG0/28M!$$D#0!!(.<A(#T?(2(G(\\.005=!5D%505154TB#[!!)B?Q!
+MB=5)B<]`B'0D#T2(3"0-2<?&_____TC'!"0`````1(G`@^`/B$0D#DB%_P^$
+MH@$``(!_$`</E,)`@/X'#Y3`"="H`0^$A0$``(!_$`=U#X!_1`$/A-D!``!F
+M9I!FD$&`?"00!P^4P(!\)`\'#Y3"#[;`A<(/A%D!``"]`````$&`?"1$``^5
+MP$0Y[0^2P@^VP(7"#X0Z`0``9F:09I")Z$F+7,1@2(7;#X0A`P``08L\A^@`
+M````2#E#.'0?_\5!#[9$)$0YZ`^7P$0Y[0^2P@^VP(7"=<?I]P```$$/MD0D
+M1+D`````1#GH#X<%`P``ZPI(BU$02`$4).M^O0````!!@'PD1`!T+XGH28M<
+MQ&!(A=L/A+T"``!!BSR'Z`````!(.4,X#X6Q`@``_\5!#[9$)$0YZ'?120^V
+M1"1$28MTQ%A(BT8X28M,)"A(B0PD2(M(.$B%R70A2(-Y&`!U$DB+5DA(BT((
+M2`-"$$@Y00AT@$B+"4B%R77?00^V;"1$1#GM<SV)Z$&+/(?H`````$B)PTB%
+MP'0/28L$)$@Y`W4&@'L0`70,N0````!FD.E"`@``2(M30$@!%"3_Q40Y[7+#
+M2(L,).DJ`@``9F:02(7_=5^]`````$0Y[69FD`^#L@```(GH08L\A^@`````
+M2(G#2(7`=`:`>!`!=!&Y`````.GN`0``9F9FD&9FD$B#>$``#X3+`0``2(M`
+M0$@!!"1,.7-`3`]"\/_%1#GM<K3K9+T`````1#GM<UIFD(GH08L\A^@`````
+M2(G#2(7`=`])BPPD2#D(=0:`>!`!=`ZY`````.F+`0``9F9FD$B)QDR)Y^@E
+M_/__2(G&2(G?Z)K\__](`00D3#GP3`]"\/_%1#GM<J@/MD0D#X/X!P^'3`$`
+M`(G`_R3%`````$B+#"3I/P$``(!\)`T!9F:0=R!$B>JX_____P^V3"0.T^!(
+MF$PA\$B)T4@/K\CI%0$``(!\)`T"=EE$#[9,)`U$B>BZ`````$'W\8G&A=(/
+ME,"#_@$/G\(/ML"Y`````(7"#X3@````N/____\/MDPD#M/@2)A,(?!!C5'_
+M2&/22`^OPDACUDB)P4@/K\KIM0```+D`````08/]`0^&I@```$R)\4&#_0(/
+MAID```"X_____P^V3"0.T^!(F$PA\$2)ZM'JB=)(B<%(#Z_*ZWBY`````$&#
+M_0)V;4&-5?^X_____P^V3"0.T^!(F$PA\$B)T4@/K\CK3[D`````08/]`W9$
+M08U5_KC_____#[9,)`[3X$B83"'P2(G12`^OR.LFN0````#K'[D`````ZQBY
+M`````.L1N0````!F9I!FD.L%N0````!(B<A(@\006UU!7$%=05Y!7\-F9F:0
+M9F:005=!5D%505154TB![!@"``!(B?U!B=9!B?=!O`````"`?T0`#X94`0``
+M0`^VQHE$)`Q)8\1(BUS%8$B%VP^$+@$``(![$`1V%T2)\HMT)`Q(B=_HJ/__
+M_^D4`0``9F:008U&_X/X`7<N28G=@'L0!'4.3(MK.$B)W^@`````9I!!@_X"
+M#X7G````3(GOZ`````#IV@```$R+:SB`>U``#Y7"183_#Y7`"="H`0^$G@``
+M`$'VA8`#```!#X20````2(M#2$B+<`A!N`$```!(C4PD$+H!````3(GOZ```
+M``"%P'5L@+PD#@(``%5U'("\)`\"``"J=1+&A"0.`@``JL:$)`\"``!5L`&`
+M?"001746@'PD$5)U#\9$)!!2QD0D$46X`0```(7`="5(BT-(2(MP"$&X````
+M`$B-3"00N@$```!,B>_H`````&9FD&:02(G?Z`````!!]D5D$'020?:%@`,`
+M``%T"$R)[^@`````0?_$1#AE1`^'M/[__TB)[^@`````2('$&`(``%M=05Q!
+M74%>05_#9F9FD&9F9I!!54%455-(@^P(3(MO6$B+7U!,BR=)BZPDX`$``.@`
+M````BT,P08E%,$F+5"0X28U$)#A(.=!T($B)P69FD&:02(U"Z$@Y6%!U!DR)
+M:%!FD$B+$D@YT77HN@````"^`````$B)W^CV_?__08MU,$F+?"0(Z`````!,
+MB>_H`````$B+53!!BX7H`P``B0)(QT58`````$B);6!(QT5H`````$B-=5A(
+MBWT0Z`````!(@\0(6UU!7$%=PV9F9I!F9I!32(G[@+^J`````71S_H>K````
+M@+^K`````G=DQH>J`````$B+1WA(QT`0`````$B+1WA(QT`H`````$B+1WA(
+MQT`P`````$B+1WA(QT`X`````$B+5WA(C4(82(E"&$B+5WA(C4(82(E"($B+
+M1WC'0$``````Z`````#K.F9FD$B+<WA(BSM(@<?P````Z`````!(QT,H````
+M`$B)6S!(QT,X`````$B-<RA(BSM(@\=(Z`````!;PV9F9I!F9I!32(M_"$B+
+M'^@`````2(N#X`$``$C'0%@`````2(E`8$C'0&@`````2(UP6$B+>!#H````
+M`%O#9F:09F:09F:02(/L.$B)7"0(2(EL)!!,B60D&$R);"0@3(ET)"A,B7PD
+M,$B)^TB+;UA,BS=-B[[@`0``3(MM"$R+91"`OZH````!='/^AZL```"`OZL`
+M```"=V3&AZH`````2(M'>$C'0!``````2(M'>$C'0"@`````2(M'>$C'0#``
+M````2(M'>$C'0#@`````2(M7>$B-0AA(B4(82(M7>$B-0AA(B4(@2(M'>,=`
+M0`````#H`````.F>````2(MS>$F-OO````#H`````$B)W^@`````28M7,+C_
+M____387D=`A!BX0DZ`,``(D"@_C_=01!B4=008"-80(```1!@(PD80(```1!
+M@*0D8`(``/U)B:PD@`(``$F)K8`"``!(C54828U&*$B+2`A(B5`(2(E%&$B)
+M2@A(B1%(QT4P`````$B);3A(QT5``````$B-=3!)C7Y(Z`````!(BUPD"$B+
+M;"003(MD)!A,BVPD($R+="0H3(M\)#!(@\0XPV9F9I!F9F:005=!5D%50515
+M4TB#[!A)B?U)B?9!O`````"`?T0`=#J`?@T`=#1)8\1)BVS%8$B%[71'08M\
+MAGSH`````$@Y13AT(4'_Q$$/MD5$1#G@?@I!#[9&#40YX'_,N@$```#IK@(`
+M`$$/MD5$NO____]!.D8-#X>:`@``ZV:Z_____Y#IC0(``+K_____9F:09F:0
+MZ7T"``"Z_____^ES`@``2(M$)!!(`<A(B4(02(E'*$B+1"002`%&"$@I1A!(
+MQT0D$`````!(BT0D"(!(9!!(B<?H`````.GM````9F:09I!!O`````!!@'U$
+M`'0M9F:026/$28MLQ6!(A>UTB$&+?(9\Z`````!(.44X=8A!_\1!#[9%1$0Y
+MX'_628M&=$DK12A(B40D$`^$J0$``$D/MD5$28M\Q5A(BT<X2(E$)`A(QP0D
+M`````$B+<#A(A?9T=TB#?A@`=6A(BU=(2(M*$$B+0@A(`<A(.48(=5-(BT<H
+M2(D$)$B+1"002#E&$`^'&____TB+1A!(*40D$$B+5TA(`T(02(E"$$B)1RA(
+MBWPD".@`````2(M$)`B`2&002(G'Z`````#K#F9FD&9FD$B+-DB%]G6)2(-\
+M)!``9I`/A``!``!%#[9E1$$/MD8-1#G@#X[*````26/$08M\AGSH`````$R+
+M>$!,.WPD$$P/1WPD$$ECW+H`````3(G^2(G'Z`````!)B43=8$B%P'5D2(,\
+M)`!T+$D/MD5$28M\Q5CH`````$D/MEU$N@````!(BS0D2(M\)`CH`````$F)
+M1-U800^V;41$.>5]'4ACW4F+?-U@Z`````!)QT3=8`````#_Q40YY7SCNO__
+M___IC````$ECQ$F+1,5@3(EH&$'_Q$$/MD8-1#G@#Y_`3"E\)!`/E<(/ML"%
+MP@^%-O___T$/MD8-1#G@#Y3`2(-\)!``#Y7"#[;`A<(/A5#___]%B&5$28M&
+M=$F)12A)BT8028F%<`(``$F+1AA)B85X`@``3(GOZ`````!!BW4P28M%`$B+
+M>`CH`````+H`````B=!(@\086UU!7$%=05Y!7\-F9F:09F:09F:09F:0\\-F
+M9F:09F9FD&9FD&9FD$B#[`B)\DB-M_@"``!(BP=(B480QT88#_\``$B-AV@#
+M``!(B48HQT8<"````,=&(`````!(QT8X`````(N'Z`,``(F':`,``$B+1BB)
+M4`1(QT9(`````$B+?A#H((@``$B#Q`C#9F9FD&9F9I!F9I!(@^P82(E<)`A(
+MB6PD$$B)^TB)_4B#?Q@`=`1(BV\8#[:%80(``*@$='FH"`^%T@```$B+E8`"
+M``!(A=(/A,(```!(@WH(``^$MP```$B#>A``#X2L````2(M""("(80(```A(
+MBT(0@(AA`@``"$C'A>@"````````2(FM\`(``$B-M>`"``!(BT4`2(MX".@`
+M````2(GNOQ(```#H`````.MA]H-@`@``$'582(7MD'0)]H5A`@``"'5)#[:#
+M8`(``*A@=3Z#X/>#R!"(@V`"``!(QX/H`@```````$B)F_`"``!(C;/@`@``
+M2(L#2(MX".@`````2(G>OP0```#H`````$B+7"0(2(ML)!!(@\08PV9F9I!F
+M9I!F9I!F9I!(@^P(2(M'0$C'@.@"````````2(F`\`(``$B-L.`"``!(BP!(
+MBW@(Z`````!(@\0(PV9F9I!F9F:09F:09F:02(/L"$B)O@@#``#'AA`#```/
+M_P``2(V6:`,``$B)EB`#``#'AA0#```(````BX;H`P``B89H`P``QT($#```
+M`$B-AGH#``!(B88H`P``QX88`P```````$C'AC`#````````2(FV.`,``$C'
+MAD`#````````2('&^`(``.@`````2(/$",-F9F:09F:09F:04TB+7T"#?U#]
+M=16`NWL#```"?PS^@WL#``#IN`(``)#&@WL#````]H-A`@``"'1@@W]0_74B
+M@#T``````'09QT=0`````$B)WK\<````Z`````#I"`(``(-_4``/A/X!``"`
+MHV$"``#W2(N#@`(``$B+0!"`H&$"``#W2(G>OQ0```#H`````.EO`@``9F:0
+M]H-@`@``$`^$AP```(-_4/UU+H`]``````!T)<='4`````!(B=Z_'````.@`
+M````2`^W@W0#``!(`8-H`@``ZQ^#?U``=!F`HV`"``#O2(G>OP@```#H````
+M`.D,`@``#[9#1$B+4P@/ME(**=!(F$@/KX-H`@``2#M#*`^"3@$``+X#````
+M2(G?Z('\___IV`$```^V@V`"``"H(`^$K0```(-_4`!U*(3`>!X/MD-$2(M3
+M"`^V4@HIT$B82`^O@V@"``!(.T,H<E:#?U``=`>X"P```.L8#[:#8`(``,#H
+M!P^VP(/X`1G`@^`"@\`*@*-@`@``7P^V^$B)WN@`````]H-@`@``"`^$70$`
+M`+X!````2(G?Z/3[___I2P$``$B+@R@#``"`.``/A)\```"`HV`"``#?O@$`
+M``!(B=_HR_O__^DB`0``9F:09F:0#[:#8`(``*A`#X0-`0``J`%U&X/@OXB#
+M8`(``$B)WK\.````Z`````#I[@```(-_4`!T&8"C8`(``+](B=Z_#P```.@`
+M````Z<\````/MD-$2(M3"`^V4@HIT$B82`^O@V@"``!(.T,H<A6^"0```$B)
+MW^A(^___Z9\```!F9I#V@V$"```(="%(BX.``@``2(N0H````('B__\/`$@/
+MMX"H````2#G"<AOV@V`"``!0=$1(BX-H`@``)?__/P!(@_A_=S)(QX/H`@``
+M`````$B)F_`"``!(QX/@`@```````$B-L^`"``!(BP-(BW@(Z`````#K)4C'
+M@^@"````````2(F;\`(``$B-L^`"``!(BP-(BW@(Z`````!;PV:02(/L"$B)
+MO@@#``!(C89H`P``2(F&(`,``$B-AGH#``!(B88H`P``QX88`P```````$C'
+MAC`#````````2(FV.`,``$C'AD`#````````BX;H`P``B89H`P``]H9A`@``
+M"'0=QX80`P``*O\``,>&%`,```0```#I]P```&9F9I`/MH9@`@``J'`/A`D!
+M``"#X*`\H'0>#[9&1$B+5@@/ME(**=!(F$@/KX9H`@``2#M&*'(<QX9(`P``
+M`````$B-OO@"``#H-OS__^G)````D`^VAF`"``"Z(_\``*@0=1/`Z`6#X`&#
+M^`$9TO?2@<(E_P``B980`P``2(N&(`,``$B+EF@"``!(B5`$2(M&"(!X"0!T
+M$4B+EB`#```/MT9&9HE"#.LF2(N&(`,``$B+5BA(*Y9H`@``2('Z@0```+F`
+M````2`]#T6:)4`S'AA0#```.````]H9@`@``('042(N&*`,``,8``,>&&`,`
+M``$```#_AMP"``"#OMP"``!D?@K'AMP"````````2('&^`(``.@`````2(/$
+M",-F9I!32(G[2(M'*(LXZ`````!(B<?H`````$C'0U@`````2(E;8$C'0V@`
+M````2(US6$B+>Q#H`````%O#9F:09F:02(/L*$B)'"1(B6PD"$R)9"003(EL
+M)!A,B70D($B)^TR+)TB+;UA(BT4H1(LP1(GWZ`````!)B<6`NZH````!=';^
+M@ZL```"`NZL````"=V?&@ZH`````2(M#>$C'0!``````2(M#>$C'0"@`````
+M2(M#>$C'0#``````2(M#>$C'0#@`````2(M3>$B-0AA(B4(82(M3>$B-0AA(
+MB4(@2(M#>,=`0`````!(B=_H`````.FQ````2(MS>$F-O"3P````Z`````!(
+MB=_H`````(M%&#TK_P``="8]*_\``'<//2G_``!T#^L69F:09F:0/3G_``!U
+M"4B+13!$B3!FD$V%[70[33EE`'4U2<>$)"`"````````28FL)"@"``!)QX0D
+M,`(```````!)C;0D(`(``$F-?"1(Z`````#K*9#'15#^____2,=%6`````!(
+MB6U@2,=%:`````!(C7582(M]$.@`````2(L<)$B+;"0(3(MD)!!,BVPD&$R+
+M="0@2(/$*,-F9F:09F9FD&9FD$B#["A(B1PD2(EL)`A,B60D$$R);"083(ET
+M)"!)B?Q)B?5)B=9(BR^+=S1(B>_H`````$B)PTB-O?````#H`````$C'0!``
+M````2,<``````$F+5"0H2(E0"$C'0"@`````2,=`,`````!(QT`X`````$B-
+M4!A(B5`82(E0(,=`0`````!(B4-X3(EC4,:#J`````1,B6M83(FSP````,:#
+MJ@````!(B=_H`````$B+'"1(BVPD"$R+9"003(ML)!A,BW0D($B#Q"C#9F:0
+M9I!!5T%6055!5%532(/L:$B)?"182(ET)%!)B=7H`````(E$)$Q-BW5TQD0D
+M,`!(QT0D(`````#'1"04`0```,=$)!``````00^V10[`Z`1!B<=U$44/MGT*
+M183_N`$```!$#T3X08!E#@]!@'T-0'<.08!]#0%W$4&`?0P'=`JX_____^D;
+M#```0;P`````08!]#0!T.$ECQ$&+?(5\Z`````"`>!`!=0GV@(`#```!=0^X
+M_____^GH"P``9F:09I!!_\1!#[9%#40YX'_(00^V10R#^`AW=(G`_R3%````
+M`+L'````ZVZ[!0```$&`_P,9P(/@_H/`"(A$)##K5[L*````N/____]!@'T.
+M!P^%D`L``.M`NP@```#K.;L)````ZS*[!@```$&`?0T"9F:0=B.[!0```,9$
+M)#`&0;\"````ZQ&[#````.L*N/_____I3@L```^V^^@`````2(E$)"BX____
+M_TB#?"0H``^$,`L``$&`_P%V069!#[9%#69!#[;/N@````!F]_&X_____V:%
+MT@^%"0L```^V?"0PZ`````!(B40D(+C_____2(-\)"``#X3I"@``387V#X63
+M````@/L'=4I!O`````!!@'T-``^$WP```$ECQ$&+?(5\Z`````!(B<5(@WA`
+M``^$7`H``$F+171(`T5`28E%=$'_Q$$/MD4-1#G@?\SII@```$G'QO____]!
+MO`````!!@'T-``^$C@```&9FD&9FD$ECQ$&+?(5\Z`````!,.7!`<P1,BW!`
+M0?_$00^V10U$.>!_W.MB2(M4)"B`>@D`="9F00^V10U!]O</ML`/ME(**=!(
+M8]!,B?!(B=&Z`````$CW\4F)QDB#?"0@`'0I2(MT)""`?@D`=!Y!#[;'#[96
+M"BG02&/03(GP2(G1N@````!(]_%)B<9(BW0D*(!^"0!U$TB#?"0@`'1U2(M$
+M)""`>`D`=&I!#[9-#KC_____T^!(F$DAQDV)=71(BU0D*(!Z"0!T'69!#[9%
+M#4'V]P^VP`^V4@HIT$B820^O171)B45T2(-\)"``="5(BTPD((!Y"0!T&D$/
+MML</ME$**=!(F$D/KT5T28E%=&9FD&:02(-\)%``#X0K`0``2(MT)%"`?A`$
+M=BE(BT0D6$@Y!G4?]H:``P```7062(.^@`(```!U#&;WAF`"``!0`G0+D+C_
+M____Z1D)``"X_____TF+371(BU0D4$@Y2B@/AP$)``!!@&4/_$B+="10@'X0
+M!W0508!]#`</A;H```"`?A`'#X6H````08!]#`=F9F:0#X6(````3(GN2(M\
+M)%#H/>___T&)Q(7`=69!#[9%#X/@','X`HG!2(M4)%"`NH$#```"=34X@H$#
+M``!T+8B"@0,``$B+3"182(NQX`$``$C'P@````!(BWPD4.@`^___N`````#I
+M:0@``$B+7"10B(N!`P``BX/H`P``Z5,(``"X_____T6%Y`^(10@``$B+="10
+M@'X0!W4&@'Y$`70(QT0D$`$````/MO-(BWPD6.@`````2(E$)!BX_____TB#
+M?"08``^$"0@``(#[!P^%YP```$F+171(B40D"$&\`````$&`?0T`#Y7`2(-\
+M)`@`#Y7"#[;`A<(/A)8```!)8\1!BWR%?.@`````3(MP0$P[="0(3`]'="0(
+M26/<N@````!,B?9(B<?H`````$B+5"082(E$VF!(A<!U-[L`````1#GC?1E(
+M8\-(BTPD&$B+?,%@Z`````#_PT0YXWSG2(M\)!CH`````+C_____Z6`'``!!
+M_\1!#[9%#40YX`^?P$PI="0(#Y7"#[;`A<(/A6K___]!#[9%#40YX`^4P$B#
+M?"0(``^5P@^VP(7"=8U(BUPD&$2(8T3K?$&\`````$&`?0T`=&))8\1!BWR%
+M?.@`````2(G%N@````"#?"00`'482(-\)%``=!!(B<9(BWPD4.@(X___2(G"
+M26/<3(GV2(GOZ`````!(BW0D&$B)1-Y@2(7`#X0@____0?_$00^V10U$.>!_
+MGD$/MD4-2(M4)!B(0D2+7"1,2(M,)!B)63B)64!!@/\!#X;%`0``0;P`````
+M10^V]T2)="0$#[9T)#!(BWPD6.@`````2(G%2(7`#X6'````NP````!$B>"9
+M0??^@_@`?BR+;"0$2&/#2(M4)!A(BWS"8+H!````O@````#HQN?____#1(G@
+MF??].=A_V$2)XTB+5"08#[9"1$0YX'XA2&/#2(M,)!A(BWS!8.@`````_\-(
+MBW0D&`^V1D0YV'_?2(M\)!CH`````+C_____Z=<%``!F9F:0NP````!$B?%!
+M@_X`?B%FD$ACPT&-%!Q(8])(BW0D&$B+5-9@2(E4Q6#_PSG9?^%$B'U$2(M4
+M)!B+0CB)13A(@WPD4``/E,(/MM),B>Y(B>_HZ][__T2)X)E!]_Y(F$B+5"08
+M2(ELPF!%`?1$.&)$#X?I_O__9@^V0D1!]O>(0D1$#[;@08#\/W<:26/$2(M,
+M)!A(QT3!8`````!!_\1!@/P_=N9(@WPD4``/E,(/MM),B>Y(BWPD&.B#WO__
+M0;P`````2(M<)!@/MD-$B<*#^`!^6DECQ$B+3"082(MTP6")T4B+7"0H#[9#
+M"BG"2&/22(M<)!A(BT,H2(G3N@````!(]_-(B48H0?_$B<I$.>%_P>L92(-\
+M)%``#Y3"#[;23(GN2(M\)!CH$][__TB#?"10``^$M`(``$B+="10BT9`2(M4
+M)!B)0D!(B=9(BWPD4.@`````A,`/A34!``!(BTPD4`^VD8`#``"#X@1(BUPD
+M&`^V@X`#``"#X/L)T(B#@`,```^VD8`#``"#X@*#X/T)T(B#@`,```^V04B(
+M0TA(BW,H2#EQ*'=)2(M#"(!X"@!U#DB+0V!(BT`(@'@*`'0Q2(M\)%#HA,O_
+M_R4"$```B40D%`^%N````$B+1"082(M0*$B+1"102#E0*`^"H````$B+3"10
+M@+F!`P```G4>2,?"`````$B+="082(G/Z$OV__^X`````.FT`P``2(M<)%"+
+M0S!(BW0D&(E&,$B+1"182(M0.$B#P#A(.=!T(TB)P4B-0NA(BUPD4$@Y6%!U
+M"4B+="082(EP4$B+$D@YT77@N@````"^`````$B+?"10Z/CD__](BT0D&(MP
+M,$B+5"182(MZ".@`````Z5H!``!(BWPD6$B!Q]````#H`````$B)P[D`````
+MNK````"("$C_P$C_RG7VZ`````")`TB+3"102(E+"$B+="082(ES$$B)W^@`
+M````2(M4)!A(BT((@'@*`'4.2(M"8$B+0`B`>`H`=!NX`@```(-\)!0`=`>`
+M>R@`#Y7`B(.J````ZP?&@ZH````#@'LH`'0F@+NJ`````W4+2(M,)%!(BT$H
+MZPE(BW0D&$B+1BA(B8.@````ZQRX`````(-\)!0`=0E(BU0D4$B+0BA(B8.@
+M````@+NJ`````G0.2(M,)%"`N8$#```"=1Y(Q\(`````2(G>2(M\)%#HTO3_
+M_[@`````Z3L"``!(BW0D4(".80(```1(BT0D&("(80(```2`H&`"``#]2(F8
+M@`(``$B)GH`"``!(C4,82(M4)%A(@\(H2(M*"$B)0@A(B5,82(E("$B)`4B)
+M]^@`````2(M\)!CH`````$B#?"10`'410?9%#P%U"DB+?"08Z`````!!]D4/
+M`0^$U@```$&`_P$/AH8```!(BU0D((!Z"@!FD'1Y0;P`````2(M,)!B`>40`
+M=%=)8\1(BW0D&$B+7,9@@(M@`@``0$C'@^@"````````2(F;\`(``$B-L^`"
+M``!(BP-(BW@(Z`````!(B=Z_#0```.@`````0?_$2(M4)!@/MD)$1#G@?ZE(
+MBTPD&("A8`(``+_I'0$``$B+7"08@(M@`@``0$C'@^@"````````2(F;\`(`
+M`$B)WDB!QN`"``!(BP-(BW@(Z`````!(B=Z_#0```.@`````Z=<```!!]D4/
+M`@^$S````$&`_P$/AH$```!(BW0D((!^"@"0='5!O`````!(BT0D&(!X1``/
+MA*$```!)8\1(BU0D&$B+7,)@@(M@`@``$$C'@^@"````````2(F;\`(``$B-
+ML^`"``!(BP-(BW@(Z`````!(B=Z_!````.@`````0?_$2(M,)!@/MD%$1#G@
+M?ZGK2+C_____ZTQ(BUPD&("+8`(``!!(QX/H`@```````$B)F_`"``!(B=Y(
+M@<;@`@``2(L#2(MX".@`````2(G>OP0```#H`````$B+="08BX;H`P``2(/$
+M:%M=05Q!74%>05_#9F9FD&9F9I!F9I!F9I"+!0````"Z_____SL%`````'1=
+M2)A(Q\$`````2&O`+$B+%`A(B1=(BU0("$B)5PA(BU0($$B)5Q!(BU0(&$B)
+M5QA(BU0(($B)5R"+1`@HB4<HBP4`````C5`0_\`/2="#XO`IT(D%`````+H`
+M````B=##9F9FD&9FD&9FD&9FD(L%`````(U0$(G&_\8/2=:#XO`IUKC_____
+M.S4`````=$](8Q4`````2,?!`````$AKTBQ(BP=(B00*2(M'"$B)1`H(2(M'
+M$$B)1`H02(M'&$B)1`H82(M'($B)1`H@BT<HB40**(DU`````+@`````\\-F
+M9F:09F:09F:09F:02(/L.$F)T(!_$`%U$XN'Z`,``(E$)`1(B50D#.LF9I"`
+M?Q`$=1Y(BT<X2(M72(N`Z`,``(E$)`1,B<!(`T((2(E$)`R#_@$9P(/`&8A$
+M)`AFB4PD%$B)Y^@`````2(/$.,-F9F:09F9FD&9FD&9FD$B#["A(B1PD2(EL
+M)`A,B60D$$R);"083(ET)"!)B?Q(BT<HBSB+6`3H`````$B)Q4&]`````(/[
+M#@^'4P<``(G8_R3%`````$&]`P```.ES!P``2(N-@`(``&;WA6`"``!P"`^5
+MPDB%R0^4P`G0J`$/A1P'``"`N:L`````#X4/!P``2(M!"$B+41#V@(`#```!
+M#X3Z!@``]H*``P```0^$[08``("@80(``.^`HF$"``#O@(AA`@``"("*80(`
+M``A(QX7H`@```````$B)K?`"``!(C;7@`@``2(M%`$B+>`CH`````$B)[K\2
+M````Z`````#IS08``&9F9I!F9I!(BXV``@``#[>%8`(``&8E<`AF/0`(#Y7"
+M2(7)#Y3`"="H`0^%:08``$B+00A(BU$0@*!A`@``]X"B80(``/=!O0$```!(
+MB>Z_$P```.@`````Z6\&``!(BT482(7`=`WV@&$"```,#X4E!@``9O>%8`(`
+M`'`,#X46!@``]H6``P```0^$"08``(!]$`4/A9X```"[`````(!]1``/A.(`
+M``!(8\-,BVS%8$V%[71R08!]$`1V:T'VA6`"```0=6%)BWU8Z`````!)BU4(
+M#[92"CG0#XVY!0``00^VA6`"``"#X/>#R!!!B(5@`@``2<>%Z`(```````!-
+MB:WP`@``28VUX`(``$F+10!(BW@(Z`````!,B>Z_!````.@`````_\,/MD5$
+M.=@/CW/____K4TB+?5CH`````$B+50@/ME(*.=`/C4@%``"`C6`"```02,>%
+MZ`(```````!(B:WP`@``2(VUX`(``$B+10!(BW@(Z`````!(B>Z_!````.@`
+M````@*5@`@``]TB#?5@`=`CH`````(E%/$&]`0```.DA!0``@'T0!75(NP``
+M``"`?40`=%%(8\-(BW3%8$B%]G0D@'X0!'8>#[:&8`(``*@0=!.#X.>(AF`"
+M``"_!0```.@`````_\,/MD5$.=A_Q>L4@*5@`@``YTB)[K\%````Z`````!!
+MO0$```#IM`0```^VA6`"``"H$`^$<00``/:%@`,```$/A&0$``"#X.6(A6`"
+M``!(BT582(E%4$C'A6@"``#_____2(GNOP8```#H`````("E8`(``/Y(@WT8
+M`'152(M-&+L`````@'E$`'1&#[9Q1$ACPTB+1,%@2(7`="_V@(`#```!=":`
+M>!`$=B`/MI!@`@``@^(!#[:!8`(``(/@_@G0B(%@`@``J`%U!O_#.=Y_ODB#
+M?5@!11GM08/%`NG[`P``2(M%&$B%P'0-]H!A`@``#`^%L0,``&;WA6`"``!P
+M#`^%H@,``/:%@`,```$/A)4#``"`?1`%#X6B````NP````"`?40`#X2P`P``
+M2&/#3(MTQ6!-A?9T<T&`?A`$=FQ!]H9@`@``('5B2(M]4$@+?5CH`````$B+
+M50@/ME(*.=`/C4$#``!!@(Y@`@``($G'AF@"````````2<>&Z`(```````!-
+MB;;P`@``28VVX`(``$F+!DB+>`CH`````$R)]K\)````Z`````#_PP^V140Y
+MV`^/<O___^D=`P``2(M]4$@+?5CH`````$B+50@/ME(*.=`/C<P"``"`C6`"
+M```@2,>%:`(```````!(QX7H`@```````$B)K?`"``!(C;7@`@``2(M%`$B+
+M>`CH`````$B)[K\)````Z`````#IM@(``("E8`(``-](B>Z_"@```.@`````
+MZ9T"``"`I6`"``#?2(GNOPL```#H`````.F$`@``@*5@`@``W^EX`@``]H6`
+M`P```0^$-P(``$B#?5@`#X4L`@``#[>%8`(``&8E<0QF@_@!#X47`@``@'T0
+M!0^%C````+L`````@'U$``^$P@```$ACPTR+=,5@387V=&1!@'X0!'9=00^V
+MEF`"``")T(/@03P!=4R)T(/(0(/@]T&(AF`"``!)QX9H`@```````$G'AN@"
+M````````38FV\`(``$F-MN`"``!)BP9(BW@(Z`````!,B?:_#0```.@`````
+M_\,/MD5$.=A_A>M%@(U@`@``0$C'A6@"````````2,>%Z`(```````!(B:WP
+M`@``2(VUX`(``$B+10!(BW@(Z`````!(B>Z_#0```.@`````@*5@`@``]^ED
+M`0``2(-]&`!T$F9F9I!F9I!(BVT82(-]&`!U]8!]$`60=4N[`````(!]1`!T
+M5&9FD$ACPTB+=,5@2(7V="2`?A`$=AX/MH9@`@``J$!T$X/@OXB&8`(``+\.
+M````Z`````#_PP^V140YV'_%ZQ2`I6`"``"_2(GNOPX```#H`````(-],`!Y
+M"$B)[^@`````0;T!````Z<P```"`I6`"``"T2,>%:`(``/____](QT50````
+M`$B)[K\0````Z`````!(@WT8`'1.2(MM&+L`````@'U$`'0_#[951&9FD&:0
+M2&/#2(M$Q6!(A<!T(_:`@`,```%T&H!X$`1V%/:`8`(```&X`0```$0/1>AF
+M9F:0_\,YVG_*187M=0^`I6`"``#^2(GOZ`````!!O0$```#K-$''1"10_O__
+M_TG'1"18`````$V)9"1@2<=$)&@`````28UT)%A)BWPD$.@`````Z;````!%
+MA>T/A($```!(@WT8``^5P$&#_0,/E<(/ML"%PG0:2(MM&$B#?1@`#Y7`08/]
+M`P^5P@^VP(7"=>:`C6`"```$08/]`G4*2(GOZ`````#K.DB#O8`"````="A(
+MBX6``@``2(MX"$B+6!!(A?]T!>@`````2(7;=!)(B=_H`````.L(2(GOZ```
+M``!)QT0D6`````!-B60D8$G'1"1H`````$F-="1828M\)!#H`````$B+'"1(
+MBVPD"$R+9"003(ML)!A,BW0D($B#Q"C#9F9FD&9FD&9FD&9FD$%6055!5%53
+M28G\0;X`````0;T`````N0````"Z+````$B)^(@(2/_`2/_*=?9!QP0D+```
+M`.@UM___08A$)`1(BP4`````2(,X`$$/E$0D!4B+/0````#H`````,'@##W_
+M__\!=@Y!QD0D!@5!QD0D!POK#$'&1"0&!T'&1"0'!T'&1"0(`$'&1"0)`4'&
+M1"0*#T$/MD0D"X/@_H/(&$&(1"0+NP4```!F9F:09F:0#[;[Z`````!(A<!T
+M/T2)Z`^VZ(G?Z":\__]!B$0L#(/[!G4,0<9$+!P"08/.0.L91(GJ#[;"0<9$
+M!!Q`1(GP@\@@@_L%1`]$\$'_Q?_#@_L,?JU!@/Y@=2)(BP4`````@[BD`@0`
+M`W821(GJ#[;"0<9$!`P20<9$!!Q`2(L%`````(.XI`($``5V%4'_Q42)Z@^V
+MPD'&1`0,$T'&1`0<0+@`````6UU!7$%=05[#9I!!54%455-(@^P(28G]2(MO
+M*$&\`````(-]``!V:69FD$&-1"0!BWR%`.@`````2(G#@'@0`70K0<=%4/[_
+M__])QT58`````$V);6!)QT5H`````$F+?1!)C758Z`````#K1?9`9`)T#4B)
+MQV9FD&:0Z`````!(B=_H`````$'_Q$0Y90!WFDG'15@`````38EM8$G'16@`
+M````28UU6$F+?1#H`````$B#Q`A;74%<05W#9F9FD&9F9I!F9I!F9I!54TB#
+M[`A(B?U(BU]8BT,8/23_```/E,(]&?\```^4P`G0J`%T,8"_J@````QU(4B+
+M0S#&``%(BW=0OQ$```#H`````,:%J@````'K"F9FD$B+0S#&```/MHVJ````
+M@_D0=RVX`0```$C3X*D@*0$`=0ZH`G0:QT-0`````.L8D,=#4/W____K#F9F
+M9I!F9I#'0U#_____2(MU>$B+?0!(@<?P````Z`````!(BWT`Z)RQ__](B>_H
+M`````$C'0U@`````2(E;8$C'0V@`````2(US6$B+>Q#H`````$B#Q`A;7<-F
+M9F:09F9FD&9F9I!32(G[2(M_$$B+4RB^`````.@*YO__B<)(BT,PB1"#^O]U
+M`XE34$C'0U@`````2(E;8$C'0V@`````2(US6$B+>Q#H`````%O#9F9FD&9F
+MD$%455-(@>S`````2(G[3(MG$$B+=RA(B>6Y`````+H,````2(G@B`A(_\!(
+M_\IU]L=%`'P!``!(C7T,NK````#H`````$B)ZKX`````3(GGZ'OE__^)PDB+
+M0S")$(/Z_W4#B5-02,=#6`````!(B5M@2,=#:`````!(C7-82(M[$.@`````
+M2('$P````%M=05S#9F9FD&9F9I!F9I!F9I!32('LH````$B)^TB+?Q!(BW,H
+M2(GB0;@`````N0P```!(B>!$B`!(_\!(_\EU]<<"?`$``$B+!DB)0@Q(BT8(
+M2(E"%$B+1A!(B4(<2(M&&$B)0B1(BT8@2(E"+$B+1BA(B4(T2(M&,$B)0CQ(
+MBT8X2(E"1$B+1D!(B4),2(M&2$B)0E1(BT902(E"7$B+1EA(B4)D2(M&8$B)
+M0FQ(QT)T`````$B+1FA(B4)\2(M&<$B)@H0```!(BT9X2(F"C````$B+AH``
+M``!(B8*4````O@````#H5N3__XG"2(M#,(D0@_K_=0.)4U!(QT-8`````$B)
+M6V!(QT-H`````$B-<UA(BWL0Z`````!(@<2@````6\-F9F:09F9FD&9F9I!!
+M54%455-(@>S(````2(G[2(M'*(LX3(U@!.@`````28G%2(GEN0````"Z#```
+M`$B)X(@(2/_`2/_*=?;'10!\`0``2(U]#+JP````3(GFZ`````!(BWL02(GJ
+M3(GNZ*WC__^)PH7`="^#^/]U`XE#4$B+0S")$$C'0U@`````2(E;8$C'0V@`
+M````2(US6$B+>Q#H`````$B!Q,@```!;74%<05W#9F9FD&9FD&9FD%532(/L
+M"$B)^TB+1RB+.$B-:`3H`````$B)QDB+>Q!(B>KH.>/__XG"A<!T+X/X_W4#
+MB4-02(M#,(D02,=#6`````!(B5M@2,=#:`````!(C7-82(M[$.@`````2(/$
+M"%M=PV9F9I!F9I!F9I!F9I!(@^PH2(D<)$B);"0(3(ED)!!,B6PD&$R)="0@
+M2(G]2(M'*(LXBU@$3(MU$.@`````2(G!]L,#00^4Q4&\`````$B+F(`"``!(
+MA=MT4TB#>P@`=!Q(BT,(@[B$`P```'4R2(.XX`,```!U*&9FD&:02(7;="M(
+M@WL0`'0D2(M#$(.XA`,```!U"DB#N.`#````=`U!O/_____IP@```&:0]H%@
+M`@``<'0,0;S_____D.FK````N@````"`>40`="8/MG%$2&/"2(M$P6!(A<!T
+M#X!X$`1V"?:`8`(``'!U8/_".=9_WDB%VW1=2(-["`!T$D$/MO5(BWL(N@``
+M``#H+-#__TB#>Q``=!5!#[;U2(M[$+H`````Z!/0__]F9I!(BT,@2(M3&$B)
+M0@A(B1!)C;[0````2(G>Z`````#K($&\_____^L800^V];H`````2(G/Z-?/
+M__]F9F:09F:02(M%,$2)($&#_/]U!$2)95!(QT58`````$B);6!(QT5H````
+M`$B-=5A(BWT0Z`````!(BQPD2(ML)`A,BV0D$$R+;"083(MT)"!(@\0HPY!3
+M2(G[2(M'*(LXZ`````!(B<&!>Q@,_P``#Y3"#[9P9(GPP.@"@^`!#[;2.=!T
+M&,'B`HGP@^#["="#R!"(061(B<_H`````$C'0U@`````2(E;8$C'0V@`````
+M2(US6$B+>Q#H`````%O#9F:09F:02(/L&$B)'"1,B60D"$R);"002(G[2(M'
+M*(LX1(M@!.@`````28G%1(GGZ`````!(B<9,B>_H`````(/X`1G`]]")0U!(
+MQT-8`````$B)6V!(QT-H`````$B-<UA(BWL0Z`````!(BQPD3(MD)`A,BVPD
+M$$B#Q!C#9F9FD&9F9I!!5%5328G\2(M?*(L[2(UK!.@`````2(G&]D,$`70X
+MN0````"Z$````$B-@'`"``"("$C_P$C_RG7V2(M%!$B)AG`"``!(BT4,2(F&
+M>`(``(".8`(```3V10`"='RY`````+I`````2(V&C`(``&:0B`A(_\!(_\IU
+M]DB+111(B8:,`@``2(M%'$B)AI0"``!(BT4D2(F&G`(``$B+12Q(B8:D`@``
+M2(M%-$B)AJP"``!(BT4\2(F&M`(``$B+141(B8:\`@``2(M%3$B)AL0"``"`
+MCF`"```$]H9@`@``!'0(2(GWZ`````!)QT0D6`````!-B60D8$G'1"1H````
+M`$F-="1828M\)!#H`````%M=05S#9F9FD&9F9I!F9I!32(/L$,8$)`9(BU\0
+M2(7;="-(BT,02(E$)`A(BT,(2(GFOP````#_D,````!(BQM(A=MUW4B#Q!!;
+MPV9FD&:02(/L*$B)7"002(EL)!A,B60D($B)^TB+1RB+.$R-8`2%_W4\2(M[
+M$.B3____QT-0_/___TC'0U@`````2(E;8$C'0V@`````2(US6$B+>Q#H````
+M`.F)````9F:09F:0Z`````!(B<5!]@0D`69FD'1"Q@0D`$$/MD0D!(A$)`A(
+MBT5H2(GF2(N]@````/^0P````(E#4(7`=1D/MD5D@\B`B$5D00^V5"0$B%5C
+M@\@0B$5D]D5D$'0(2(GOZ`````!(QT-8`````$B)6V!(QT-H`````$B-<UA(
+MBWL0Z`````!(BUPD$$B+;"083(MD)"!(@\0HPV9FD&9FD&9FD$%455-(@^Q`
+M2(G[2(M'*(LX3(U@!(7_=3=(BWL0Z)[^___'0U#\____2,=#6`````!(B5M@
+M2,=#:`````!(C7-82(M[$.@`````Z3D"``"0Z`````!(B<5!]@0D`69FD'1%
+MQD0D,`!!#[9$)`2(1"0X2(M%:$B-="0P2(N]@````/^0P````(E#4(7`=1D/
+MMD5D@\B`B$5D00^V5"0$B%5C@\@0B$5D0?8$)`)T4\9$)#`$00^V1"0%B$0D
+M.,9$)#D`2(M%:$B-="0P2(N]@````/^0P````(E#4(7`=2(/ME5E@\H0B%5E
+M08!\)`4`#Y7`P>`%@^+?"<*(566`36000?8$)`1T6,9$)#`%00^V1"0&B$0D
+M.,9$)#D`2(M%:$B-="0P2(N]@````/^0P````(E#4(7`=2</ME5E@\I`B%5E
+M08!\)`8`#Y7`#[;`P>`'@^)_"<*(566`36009I!!]@0D"'1.QD0D,`-!#[9$
+M)`>(1"0X2(M%:$B-="0P2(N]@````/^0P````(E#4(7`=2(/ME5E@\H$B%5E
+M08!\)`<`#Y7`P>`#@^+W"<*(566`36000?8$)!!T5,9$)#`"00^V1"0(B$0D
+M.$B+16A(C70D,$B+O8````#_D,````")0U"%P'4H#[9598/*`8A594&`?"0(
+M``^5P`'`@^+]"<*(566`36009F9FD&9FD$'V!"0@="G&1"0P!T$/MD0D"8A$
+M)#A(BT5H2(UT)#!(B[V`````_Y#`````B4-0D/9%9!!T(4B+16A(B>9(B[V`
+M````_U!X#[9$)`Z(16)(B>_H`````$C'0U@`````2(E;8$C'0V@`````2(US
+M6$B+>Q#H`````$B#Q$!;74%<PV9F9I!F9F:09F9FD&9FD$%455-(@^Q`28G\
+M2(M'*(LX2(U8!(7_=5S&1"0P!DB++0````!(A>T/A.`#``!FD$B+71!(A=MT
+M+&9F9I!F9I!(BT,02(E$)#A(BT,(2(UT)#"_`````/^0P````$B+&TB%VW7;
+M2(MM`$B%[77"9I#IF0,``.@`````2(G%#[8#A<!T$8/X`0^$T`$``&9FD.EP
+M`P``@'T0`69F9I!F9I`/A7X!```/MD,!@_@%9F:0#X=N`0``B<#_),4`````
+M08-\)!P)#X59`0``@$UD@,9$)#``#[9#!(A$)#A(BT5H2(UT)#!(B[V`````
+M_Y#`````08E$)%"`3600Z2T!``!!@WPD'`D/A1@!``#&1"0P`@^V0P2(1"0X
+M2(M%:$B-="0P2(N]@````/^0P````$&)1"10@$UD$.GP````08-\)!P)#X7;
+M````QD0D,`,/MD,$B$0D.$B+16A(C70D,$B+O8````#_D,````!!B40D4(!-
+M9!#ILP```$&#?"0<"0^%G@```,9$)#`$#[9#!(A$)#C&1"0Y`$B+16A(C70D
+M,$B+O8````#_D,````!!B40D4(!-9!#K=$&#?"0<"75CQD0D,`4/MD,$B$0D
+M.,9$)#D`2(M%:$B-="0P2(N]@````/^0P````$&)1"10@$UD$.LY08-\)!P)
+M=2C&1"0P"0^V0P2(1"0X2(M%:$B-="0P2(N]@````/^0P````$&)1"100<=$
+M)%#^____]D5D$`^$UP$``$B+16A(B>9(B[V`````_U!X#[9$)`Z(16)(B>_H
+M`````.FQ`0``@'T0!';!#[9#`8/X`71D@_@!D'\)A<!T%>EN`0``@_@"9I`/
+MA-4```#I7@$``$&#?"0<&'61N0````"Z$````$B-A7`"``"("$C_P$C_RG7V
+M2(M#!$B)A7`"``!(BT,,2(F%>`(``("-8`(```3I(@$``$&#?"0<2`^%2/__
+M_[D`````N@0```!(C86,`@``B`A(_\!(_\IU]DB+0P1(B86,`@``2(M##$B)
+MA90"``!(BT,42(F%G`(``$B+0QQ(B86D`@``2(M#)$B)A:P"``!(BT,L2(F%
+MM`(``$B+0S1(B86\`@``2(M#/$B)A<0"``"`C6`"```$Z9<````/MK6!`P``
+M08-\)!P)#X6V_O__#[9#!#GP=$4/MD,$B(6!`P``@'T0!'8UN0````"`?40`
+M="H/MGU$2&/!2(M4Q6!(A=)T$X!Z$`1V#0^VA8$#``"(@H$#``#_P3G/?]J#
+M_@)U((![!`)T&DC'P@````!,B>9(B>_HJ-;__^M:9F:09F:0@(U@`@``!.L)
+M0<=$)%#^____]H5@`@``!'032(GOZ`````#K"4''1"10_O___TG'1"18````
+M`$V)9"1@2<=$)&@`````28UT)%A)BWPD$.@`````2(/$0%M=05S#9F:02(/L
+M*$B)7"0(2(EL)!!,B60D&$R);"0@28G\28GU2(MO&/^-H`($`(72>&;H````
+M`$B)PTB%P'4=28M$)`A,B>__D(````!)C7PD($R)[N@`````ZTJ`/0``````
+M="3V0&0"=1[V0&0!=`I(B<=FD.@`````#[9#9*@$=0:#R"2(0V1(B=Z_`@``
+M`.@`````ZPY(C7\@Z`````!F9I!FD(.]H`($``!U+4C'A3@"````````2(FM
+M0`(``$C'A4@"````````2(VU.`(``$B-?4CH`````$B+7"0(2(ML)!!,BV0D
+M&$R+;"0@2(/$*,.0055!5%532('LB````$F)_4R+9Q!,B>?HU/;__T&#O"2@
+M`@0``'0N0<=%4/S___])QT58`````$V);6!)QT5H`````$F-=5A)BWT0Z```
+M``#IXP```$''A"2@`@0``0```$F+7"002(7;=%]F9I!FD$B+0PA(BWL02(GF
+M_U`X#[9$)!!!`80DH`($`+T`````@'PD$`!T*TB)V4C'P@````")[DB)W^@`
+M````A,!U"$'_C"2@`@0`_\4/MD0D$#GH?]5(BQM(A=MUID'_C"2@`@0`08.\
+M)*`"!```=3))QX0D.`(```````!-B:0D0`(``$G'A"1(`@```````$F-M"0X
+M`@``28U\)$CH`````$''15#\____2<=%6`````!-B6U@2<=%:`````!)C758
+M28M]$.@`````2('$B````%M=05Q!7<-F9F:09F:09F:0059!54%455-(B?A,
+MBV\@0;X`````28V]$`$``$B)QN@`````0<>%V`$```````!)BUT828U%&$@Y
+MV'0S28G$D$B-JW#\__^`NX#\__\!=1?V@]3\__]`=`[V0_`!=`A(B>_H````
+M`$B+&TDYW'7128M=*$F-12A(.=AT%4B)Q9!(C7OHZ`````!(BQM(.=UU[TF+
+M71A)C4482#G8="U)B<1(C:MP_/__@+N`_/__!'822(.[B/S__P!U"$B)[^@`
+M````2(L;23G<==9)BUT828U%&$@YV'1P28G$9F:09I!(C:MP_/__@+N`_/__
+M`750#[:#U/S__Z@@=$6#X-N(@]3\__](BX.H_/__2(7`=!A(@W@8`'0)0;X!
+M````ZPF02(L`2(7`=>A%A/9U$TB)[^@`````2(GOZ`````!F9I!(BQM).=QU
+MF$F+71A)C4482#G8#X3H````9F9FD&9FD$B-JW#\__^#NZ#\__\`#XFL````
+M]D/P`0^$LP```("[@/S__P1V?4B#NXC\__\`#X6<````]H/0_O__0`^%CP``
+M`$B#N_#^__\`=`U(BX/P_O__2#EH"'5XO@````"Z`````(!]1`!T)@^V341(
+M8\)(BT3%8$B%P'0/@'@0!'8)]H!@`@``0'44_\(YT7_>A?9U/DB)[^@`````
+MZS2^`0```.OK@'T0`74G]D5D`F:0=!](B>_H`````.L59F9FD/:%@`,```%U
+M"$B)[^@`````2(L;28U%&$@YV`^%'____UM=05Q!74%>PV9FD&9FD$%455-)
+MB?Q(C;\0`0``Z`````!(B<5(A<!T9L<``0```$C'0`@`````2(E%$$C'0!@`
+M````3(E@($F+7"0828U$)!A(.=AT*$F)Q&9FD&:02(V[</S__X"[@/S__P%U
+M"$B)[N@`````2(L;23G<=>#_30"#?0``=0A(B>_H+_W__UM=05S#9F9FD&9F
+MD&9FD$B#[`CH`````$B#Q`C#9I!!5D%505154TB)_4R+9Q!(BT<H1(LP1(GW
+MZ`````!)B<5)BUPD&$F-1"082#G8#X2B````2(V[</S__[X`````2(.[B/S_
+M_P!U>T6%]G43#[9#\*@"=`N#X/V(0_!`M@'K2$PY[W4;#[:'@`,``*@"=1"#
+MR`*(AX`#``"^`0```.LH#[:/@`,``(G*T.I,.>\/E<`/ML"%PG00B<B#X/V(
+MAX`#``"^`0```(7V=!>`?Q`!=0SH`````.L*9F:09I#H`````$B+&TF-1"08
+M2#G8#X5>____2,=%6`````!(B6U@2,=%:`````!(C7582(M]$.@`````6UU!
+M7$%=05[#4TB)^TB+/XNW:`($`.A^F___2(L#2(-X2`!U"DB)W^@`````ZQY(
+MC4,82(L32(/".$B+2@A(B4((2(E3&$B)2`A(B0%;PV9F9I!F9I!F9I!(@^Q(
+M2(E<)!A(B6PD($R)9"0H3(EL)#!,B70D.$R)?"1`B7PD%$F)]4B)5"0(3(G%
+M08G/38M@$`^WV<'C"4$#G"18`@0`_\N)V+H`````0?>T)%@"!`")PTB%]G03
+M]H9A`@``!'4*2(M&"(!X"@!U+\=%4/[___](QT58`````$B);6!(QT5H````
+M`$B-=5A(BWT0Z`````#I&`,``&:0#[?)2`-,)`@/ME9$2(M&"`^V0`HIPDAC
+MTDB+1BA(B=:Z`````$CW]D@YP7>D28V\)/````#H`````$F)QDB%P'4MQT50
+M_?___TC'15@`````2(EM8$C'16@`````2(UU6$B+?1#H`````.FG`@``08MU
+M-$R)Y^@`````2(D$)$B%P'4228V\)/````!,B?;H`````.NL2<=&$`````!(
+MBT0D"$F)!D$/M\=(`T0D"$F)1@A)QT8H`````$G'1C``````2<=&.`````!)
+MC48828E&&$F)1B!!QT9``0```$B+%"1,B7)X2(EJ6,:"J`````&+!0````"%
+MP'X308N%W`(``#L%``````^<P`^VP$B+-"2)1FA)BT4(@'@)``^$?````(M,
+M)!2!Z0O_``"#^1IW3[@!````2-/@J0$```%U$*D`0``"=1FI`(``!'4BZS!(
+MBP0DQH":`````>E%`0``2(L4),:"F@````+I-0$``$B+'"3&@YH````#Z24!
+M``!)C;PD\````$R)]N@`````2(L\).@`````Z3'^__^+3"04@>D+_P``@_D:
+M=TRX`0```$C3X*D!```!=12I`$```G4GJ0"```1U$V9F9I#K*4B+-"3&AIH`
+M```!ZSI(BP0DQH":`````^LM`=M(BQ0DQH*:`````NL>28V\)/````!,B?;H
+M`````$B+/"3H`````.FX_?__28V$)%`"!`!(BS0D2(F&H````$B+1"0(2(F&
+MD````&9$B;Z8````2,>&N`````````#&AJH`````3(EN4$C'AL``````````
+M08F<)&@"!`!)QX0DB`($``````!)QX0D<`($``````!)B;0D>`($`$G'A"2`
+M`@0``````$F-M"1H`@0`3(GGZ`````#K;T$/MDU%2(M$)`A(T^A(BQ0D2(F"
+MD````$C'@K@`````````QH*J`````$R):E!(QX+``````````$F#?"1(`'4*
+M2(G7Z`````#K)$B+!"1(@\`828U4)#A(BTH(2(E""$B+'"1(B5,82(E("$B)
+M`4B+7"082(ML)"!,BV0D*$R+;"0P3(MT)#A,BWPD0$B#Q$C#9F9FD&9FD$&)
+MTTB+1U!(BY"``@``3(V2D````$R+"$F!P5`"!`!$#[>'F````$'!X`F`>B@`
+M="/VAZD````$=!I!#[=*"$$/MT(**<$/MX>8````*<'!X0GK"$$/MTH*P>$)
+MB<BZ`````$'W<0B)P$C!X`1(B<=)`SF)T46%P'1(9F:09F:0187;=`N)R$@#
+M!TB)1@CK"HG(2`-'"$B)1@A!BT$(*<A$.<!!#T?`B0;'1@0`````N0````!(
+M@\802(/'$$$IP'6^QT;T`0```+@!````PY!!5%5328G\2(GSO0````"`?D0`
+M=%I(8\5(BW3#8$B%]G1#@'X0!'883(GGZ-#___^$P'0QN`$```#K.69FD&:0
+M2(M62$F+1"1(2(M("$@Y2@AU$DF+1"0X2#E&.'4'N`$```#K#__%#[9#1#GH
+M?Z:X`````%M=05S#9F9FD&9FD$%505154TB)_4F)]4&\`````(!_1`!T/4EC
+MQ$B+7,5@2(7;="2`>Q`$=@U,B>Y(B=_HRO___^L13(GN2(G?Z#W___^$P`^4
+M0U!!_\0/MD5$1#G@?\-;74%<05W#9F9FD$B#[!A(B5PD"$R)9"002(GX3(MG
+M"$B+7Q!(BSM(@<?0````2(G&Z`````"Z`````+X`````3(GGZ`.Y__^`BV`"
+M```$2(G?Z`````!(BUPD"$R+9"002(/$&,-F9I!FD$B#[`A(QT<P`````$B)
+M?SA(QT=``````$B-=S!(BT<(2(LX2(/'2.@`````2(/$",-F9F:09F9FD&9F
+M9I!F9I!(@^PH2(E<)`A,B60D$$R);"083(ET)"!)B?Q,BW<(2(M?$$F+!DR+
+MJ.`!``!(B=Y,B??HR/[__TC'@X`"````````2<>&@`(```````!!#[:6@`,`
+M`(/B!`^V@X`#``"#X/L)T(B#@`,``$$/MI:``P``@^("@^#]"="(@X`#``!!
+M#[9&2(A#2$G'15@`````38EM8$G'16@`````28UU6$F+?1#H`````$B)WK\5
+M````Z`````!)BU0D($F+1"082(E0"$B)`DG'1"0P`````$V)9"0X2<=$)$``
+M````28UT)#!)BS[H`````$B+7"0(3(MD)!!,BVPD&$R+="0@2(/$*,-F9F:0
+M9F9FD&9FD$B#[!A(B5PD"$B);"002(M?6$B+0PA(BRCH`````$C'0S``````
+M2(E;.$C'0T``````2(US,$B-?4CH`````$B+7"0(2(ML)!!(@\08PV:02(/L
+M&$B)'"1,B60D"$R);"0028G\2(M?"$B+5Q!,BRN+0S")0C#'0S#_____@*-A
+M`@``\X"B80(``/.+<C!)BWT(Z`````"+<S1,B>_H`````$B)QTB)6%#&@*@`
+M```$3(E@6$C'@,``````````Z`````!(BQPD3(MD)`A,BVPD$$B#Q!C#9F:0
+M9F:09F:02(/L*$B)7"0(2(EL)!!,B60D&$R);"0@28G]2(MO6$B+1U!(BYB`
+M`@``2(V#D````$B+2PA(BU,01`^VHZH```"`>R@`=$Y(#[=0"$B+@Z````!(
+M*=!(B8.@````08#\`74-2#M!*'4'QH.J`````("[J@````)U#4B+02A(.8.@
+M````=&I(@[N@`````'1@Z9L```!(#[=`"$@#@Z````!(B8.@````@+NJ````
+M`'4/2#M!*'4)QH.J`````6:0@+NJ`````W472(M#"$B+<"A(.;.@````=!9F
+M9I!F9I!(BT(H2#F#H````'5#9F:02(LYZ+B2__]%A.0/E,)!@/P##Y3`"="H
+M`70-2(US2$B+>PCH`````$R)[^@`````2(G?Z$C^___K5V9FD&9FD$B+.>AX
+MDO__183D#Y3"08#\`P^4P`G0J`%T#4B-<TA(BWL(Z`````!,B>_H`````$C'
+M15@`````2(EM8$C'16@`````2(UU6$B+?1#H`````$B+7"0(2(ML)!!,BV0D
+M&$R+;"0@2(/$*,-F9I!F9I!(@^P(2(L7QH>J`````/:'J0````)T*4B#>D@`
+M=")(C4<82(/".$B+2@A(B4((2(E7&$B)2`A(B0'K"F9FD&:0Z`````!(@\0(
+MPV9FD&9FD$B#[!A(B1PD2(EL)`A,B60D$$B)^TR+9UA(BT=02(NH@`(``$B+
+M/TB-M9````"`NZH````!#X35````@+NJ`````G0MQH.J`````$C'13``````
+M2(E=.$C'14``````2(UU,$B#QTCH`````.G!`0``QH6K`````4B+10B`H(`#
+M``#^2(M%$("@@`,``/Y(BT4(@*!A`@``]TB+11"`H&$"``#W2(M%"$B+..@0
+MD?__#[:%J@```(3`#Y3"/`,/E,`)T*@!=`U(C75(2(M]".@`````2(G?Z```
+M``!!QT0D4/____])QT0D6`````!-B60D8$G'1"1H`````$F-="1828M\)!#H
+M`````.DB`0``#[=&"F8#@Y@```!FB48*2(M5"$@Y4U!U#&8[1@AR/V;'1@H`
+M``^W1@IF.T8(#X/G````#[:#J0```(/@_8/(!(B#J0```$B+11!(B4-02,=#
+M>`````!(QT-P`````,:#J@````"+CV`"!`#_R8N'6`($`,'H"0^OR`^W1@@/
+MMU8**=`YP0]'R&:)BY@```!F@?D``78)9L>#F``````!@'TH`'0M]H.I````
+M!'0D2`^W1@A(`P9(#[=6"D@IT$@/MY.8````2"G02(F#D````.L/2`^W1@I(
+M`P9(B8.0````]H.I`````G0F2(-_2`!T'TB-0QA(C5<X2(M*"$B)0@A(B5,8
+M2(E("$B)`>L49I!(B=_H`````.L(2(G?Z-[[__](BQPD2(ML)`A,BV0D$$B#
+MQ!C#9F9FD&9F9I!F9I!!54%455-(@^P(2(G]3(VGD````$B+1PA(BQA,BZO@
+M`0``B[-H`@0`2(G?Z+".__](BT402(M5"(MP-#MR-',#BW(T2(M%"$B+..@`
+M````2(G&2(7`=5X/MH6J````A,`/E,(\`P^4P`G0J`%T#4B-=4A(BWT(Z```
+M``!(BT4(2(LXZ.F.__]!QT50_____TG'15@`````38EM8$G'16@`````28UU
+M6$F+?1#H`````.F"`0``BP4`````A<!^%DB+10B+@-P"```[!0`````/G,`/
+MML")1FC&AJH`````#[:%J@```(3`#Y3"/`,/E,`)T*@!=!E(C45(2(E&<$B+
+M10A(B490@(ZI`````NM62(M%$$B)1E"`CJD````$OP````"#NUP"!```=CE!
+MN`````")^$B+DU`"!`!(P>`$BXM8`@0`2(L$$$B%R70-9I!$B`!(_\!(_\EU
+M]?_'.;M<`@0`=\V+BV`"!`#_R8N#6`($`,'H"0^OR$$/MT0D"$$/MU0D"BG0
+M.<$/1\AFB8Z8````9H'Y``%V"6;'AI@``````8!]*`!T,/:&J0````1T)TD/
+MMT0D"$D#!"1)#[=4)`I(*=!(#[>6F````$@IT$B)AI````#K$4D/MT0D"DD#
+M!"1(B8:0````@(ZI````"$R);EA(QX;``````````$C'AK@`````````2(-[
+M2`!U"DB)]^@`````ZQM(C4882(U3.$B+2@A(B4((2(E6&$B)2`A(B0%(@\0(
+M6UU!7$%=PV9F9I!F9F:09F:09F:02(/L"$B)_DB+1PA(BS@/MX:8````P>`)
+M`X=8`@0`_\BZ`````/>W6`($`(F':`($`$C'AX@"!```````2,>'<`($````
+M``!(B;=X`@0`2,>'@`($``````!(C;=H`@0`Z`````!(@\0(PV9FD&9FD$F)
+M\+@`````@'\0`0^%@````$B%]G0N2(N&@`(``$B%P'0B2#EP"'482(MP$.L6
+MN`````##N`````!F9I!F9I##2(MP"$B+3SA(A<ET/V:02(-Y&`!T+DV%P'33
+M2(M1&$B#>A@`=`M(BU(82(-Z&`!U]4PYP@^5P$@Y\@^5P@^VP(7"=;!(BPE(
+MA<EUP[@!````\\-F9F:09F9FD&9F9I!(@^P82(D<)$B);"0(3(ED)!!(B?M)
+MB?2#OX0#````=0I(@[_@`P```'0*N@````#IFP```(-_,/]T'(MW,$B+!TB+
+M>`CH`````+H`````A<`/A7D```"`>Q`$=D"Z`````&;W@V`"``!P"'5CO0``
+M``"`>T0`=%-(8\5(BWS#8$B%_W0,3(GFZ'/___^$P'0S_\4/MD-$.>A_W>LN
+M@'L0!'412(M[.$R)YNBQ_O__#[;0ZQQ,B>9(B=_HH?[__P^VT.L,N@````#K
+M!;H!````B=!(BQPD2(ML)`A,BV0D$$B#Q!C#9F9FD&9F9I!F9I!(@^P(@'\0
+M!'8/N`````!(@[^``@```'4(Z/+^__\/ML!(@\0(PV9F9I!F9I!F9I!(@^PX
+M2(E<)`A(B6PD$$R)9"083(EL)"!,B70D*$R)?"0P2(M?6$R+,TV+IN`!``!)
+MBT0D*$2+.$2+;V#H`````(![$`1V?4B+JX`"``!(A>UT74B#?0@`=!9(BWT(
+MN@(```"^`````.B#K?__9F:02(-]$`!T&4B+?1"Z`@```+X`````Z&:M__]F
+M9I!F9I!(BT4@2(M5&$B)0@A(B1!)C;[0````2(GNZ`````#K(+H"````O@``
+M``!(B=_H+JW__^L,2(G?Z`````!F9F:00?_%13G]=2A)QT0D6`````!-B60D
+M8$G'1"1H`````$F-="1828M\)!#H`````.L<1(GH28M4)"B+?(($Z`````!$
+MB>Y(B<?H5````$B+7"0(2(ML)!!,BV0D&$R+;"0@3(MT)"A,BWPD,$B#Q#C#
+MD$B#[`A(QT<H`````$B)?S!(QT<X`````$B-=RA(BS](@\=(Z`````!(@\0(
+MPV9FD$B#[!A(B5PD"$R)9"002(G[08GTBW<T2(L_Z`````!(B<</MH"I````
+M@^#/@\@@B(>I````2(E?4,:'J`````1(B5]818GD3(EG8,:'J@````!(QX?`
+M`````````.@`````2(M<)`A,BV0D$$B#Q!C#9F9FD&9F9I!F9F:09F:0055!
+M5%532(/L"$B)_4B+1RB+$/;&_P^4P$0/MNA$#[;B2(M',,<``````+L`````
+M1#GC#Y+`187M#Y7"#[;`A<)T/8G:2(M%*(M\D`3H`````$B)QX!X$`6^````
+M`$@/0_#H>?W__X3`=%'_PT0YXP^2P$6%[0^5P@^VP(7"=<.[`````$0YXW,D
+M9F:09F:0B=A(BU4HBWR"!.@`````2(G'Z`````#_PT0YXW+B187M=3W'15``
+M````ZS['15#_____2(M5,(U#`8D"ZRR)V$B+52B+?(($Z`````!(B<>)WNB9
+M_O__ZS)F9F:09F:0NP````!$.>-RU$C'15@`````2(EM8$C'16@`````2(UU
+M6$B+?1#H`````$B#Q`A;74%<05W#9F9FD&9FD&9FD$B#[!A(B1PD2(EL)`A,
+MB60D$$B)_8`]``````!T9TB+7QA(C4<82#G8="])B<1FD$B-NW#\__^`NX#\
+M__\!=1+V0_`!=`P/MC4`````Z`````!(BQM).=QUUL>%.`$```"'DP-(QX5(
+M`0```````$B)K5`!``!(C;4X`0``2(GOZ`````!(BQPD2(ML)`A,BV0D$$B#
+MQ!C#9F9FD&9F9I!!5T%6055!5%532('LF````$B)_4R+;Q!,BW<H0;\`````
+M28M=&$F-11A(.=AT64F)Q$B-NW#\___V0_`!=$&`NX#\__\!=3CH`````,:$
+M)(`````(00^V1B"(A"2(````2(N#V/S__TB+N_#\__](C;0D@````/^0P```
+M`&9FD$B+&TDYW'6J00^V1B"(!0````!)BUT02(7;="QF9F:02(M#"$B+>Q!(
+MB>;_4#CV1"01$'0+0;\!````ZPMF9I!(BQM(A=MUV$6%_W0Z28V=.`$``$B)
+MWDR)[^@`````0<>%.`$```"'DP-)QX5(`0```````$V)K5`!``!(B=Y,B>_H
+M`````,=%4`````!(QT58`````$B);6!(QT5H`````$B-=5A(BWT0Z`````!(
+M@<28````6UU!7$%=05Y!7\-F9F:09F9FD&9F9I!F9I!!5%532(/L0$B)_4B+
+M5Q!(BT<HQD0D,`>`>"`!&<"#P`*(1"0X2(M:&$B-0AA(.=AT5DF)Q/9#\`%T
+M18"[@/S__P%U/$B+@]C\__](B[OP_/__2(GF_U!X#[9$)`\Z1"0X=!U(BX/8
+M_/__2(N[\/S__TB-="0P_Y#`````9F9FD$B+&TDYW'6MQT50`````$C'15@`
+M````2(EM8$C'16@`````2(UU6$B+?1#H`````$B#Q$!;74%<PV9F9I!F9I!(
+M@^P(2(LW2('&Z`$``.@`````2(/$",-F9F:09F9FD(-_'`!X!H-_(`-W!\='
+M4/[____SPV9F9I!F9F:09F:02(/L"$B+1S#'`````0)(QT=8`````$B)?V!(
+MQT=H`````$B-=UA(BW\0Z`````!(@\0(PV9F9I!F9F:09F9FD(%_',<```!V
+M"8%_(,<```!W!\='4/[____SPV9FD&:005154TF)_$B+;RA(BU\PQT=0````
+M`(`]``````%W5$C'Q@````!(B>_HDH/__X7`=4%(BT4`2(D#2(M%"$B)0PA(
+MBT402(E#$$B+11A(B4,8QD-$`,9#00#&0T`"#[9%18A#10^V!0````"(0R#I
+M#P$``$C'Q@````!(B>_H/H/__X7`=5%(BT4`2(D#2(M%"$B)0PA(BT402(E#
+M$$B+11A(B4,8QD-$`,9#00`/MD5%B$-%QD-``8L%`````(V0EP$```60`0``
+M#TC"P?@#B$,@Z:L```!(Q\8`````2(GOZ-J"__^%P'4^2(M%`$B)`TB+10A(
+MB4,(2(M%$$B)0Q!(BT482(E#&,9#1`#&0T$`#[9%18A#1<9#0`(/M@4`````
+MB$,@ZUI(Q\8`````2(GOZ(F"__^%P'4^2(M%`$B)`TB+10A(B4,(2(M%$$B)
+M0Q!(BT482(E#&,9#1`#&0T$`#[9%18A#1<9#0`$/M@4`````B$,@ZPE!QT0D
+M4/____])QT0D6`````!-B60D8$G'1"1H`````$F-="1828M\)!#H`````%M=
+M05S#9F:0@7\<QP```'8'@W\@`'D(D,='4/[____SPV9F9I!F9I!54TB#[`A(
+MB?U(BW\H2,?&`````.C7@?__A<!U0TB+11!(BU@82(/`&$@YV'0R9I!(C;MP
+M_/__]D/P`703@+N`_/__`74*Z$7]__]F9I!FD$B+&TB+11!(@\`82#G8==!(
+M@\0(6UW#9F:09F:09F:055-(@^P(2(G[2(MO*$C'Q@````!(B>_H9('__X7`
+M=3`/MD4@B`4`````2,=#6`````!(B5M@2,=#:`````!(C7-82(M[$.@`````
+MZ4<!``!(Q\8`````2(GOZ"&!__^%P'4]#[9%((T$Q7#^__^)!0````!(QT-8
+M`````$B)6V!(QT-H`````$B-<UA(BWL0Z`````#I_0```&9FD&9FD$C'Q@``
+M``!(B>_HT8#__X7`=3`/MD4@B`4`````2,=#6`````!(B5M@2,=#:`````!(
+MC7-82(M[$.@`````Z;0```!(Q\8`````2(GOZ(Z`__^%P'4S2(M[$$C'AR`"
+M````````2(F?*`(``$C'AS`"````````2(VW(`(``$B#QTCH`````.MN2,?&
+M`````$B)[^A(@/__A<!U,TB+>Q!(QX<@`@```````$B)GR@"``!(QX<P`@``
+M`````$B-MR`"``!(@\=(Z`````#K*,=#4/____](QT-8`````$B)6V!(QT-H
+M`````$B-<UA(BWL0Z`````!(@\0(6UW#9I"#?QP`>`:#?R`#=P?'1U#^____
+M\\-F9F:09F9FD&9FD$B#[!A(B5PD"$R)9"002(G[3(MG,.AF@___08D$)$C'
+M0U@`````2(E;8$C'0V@`````2(US6$B+>Q#H`````$B+7"0(3(MD)!!(@\08
+MPV:0@W\<`W8&@W\@2W<'QT=0_O____/#9F9FD&9F9I!F9I!32(G[2(M'*(LX
+M2(MS,.AM@___A<!T!\=#4/____](QT-8`````$B)6V!(QT-H`````$B-<UA(
+MBWL0Z`````!;PV9F9I!F9F:09F9FD&9FD(-_'`-V!H-_(%=W!\='4/[____S
+MPV9F9I!F9F:09F:04TB)^TB+1RB+.$B+<S#H'83__X7`=`?'0U#_____2,=#
+M6`````!(B5M@2,=#:`````!(C7-82(M[$.@`````6\-F9F:09F9FD&9F9I!F
+M9I"#?QP'=@:#?R`/=P?'1U#^____\\-F9F:09F9FD&9FD%532(/L6$B)^TB+
+M1RB+.(MP!$B+:S!(B>+H`H7__X7`=`['0U#_____ZQ9F9I!FD$B+!"1(B44`
+M2(M$)`A(B44(2,=#6`````!(B5M@2,=#:`````!(C7-82(M[$.@`````2(/$
+M6%M=PV9F9I!F9I"#?QP'=@:#?R!#=P?'1U#^____\\-F9F:09F9FD&9FD%-(
+MB?M(BT<HBSB+<`1(BU,PZ'J$__^%P'0'QT-0_____TC'0U@`````2(E;8$C'
+M0V@`````2(US6$B+>Q#H`````%O#9F9FD&9F9I!F9F:0@W\<`W8&@W\@`W<'
+MQT=0_O____/#9F9FD&9F9I!F9I!!5%532(/$@$B)_4B+1RB+.+X`````Z'5^
+M__](B<-!O`````!(A<!T1&9F9I!F9I!(BT,(2(.X"`$```!T$DB+>Q#_D`@!
+M``!!`<1F9I!FD$B+&TB%VW052(M#"$B+>Q!(B>;_4#B`?"03`'3#2(M%,$2)
+M($C'15@`````2(EM8$C'16@`````2(UU6$B+?1#H`````$B#[(!;74%<PV:0
+M@W\<!W8)@7\@_P```'<'QT=0_O____/#9F9FD&9F9I!!5D%505154TB#Q(!)
+MB?Q(BT<HBSB+:`1-BW0D,+X`````Z*E]__](B<-!O0````!!QT0D4/____](
+MA<!T=&:02(M#"$B#N`@!````=$=(BWL0_Y`(`0``.>A^-$B+0PA(BWL03(GR
+MB>[_D!`!``"%P'4_08!^`O]T!$4`;@)!QT0D4`````#K*69F9I!F9I`IQ4$!
+MQ4B+&TB%VW052(M#"$B+>Q!(B>;_4#B`?"03`'2.2<=$)%@`````38ED)&!)
+MQT0D:`````!)C70D6$F+?"00Z`````!(@^R`6UU!7$%=05[#9F9FD&9F9I!F
+M9I"#?QP'=@F!?R"C#```=P?'1U#^____\\-F9F:09F9FD$%6055!5%532(/$
+M@$F)_$B+1RB+.(MH!$V+="0PO@````#HF7S__TB)PT&]`````$''1"10____
+M_TB%P'1T9I!(BT,(2(.X"`$```!T1TB+>Q#_D`@!```YZ'XT2(M#"$B+>Q!,
+MB?*)[O^0&`$``(7`=3]!@'X"_W0$10!N`D''1"10`````.LI9F9FD&9FD"G%
+M00'%2(L;2(7;=!5(BT,(2(M[$$B)YO]0.(!\)!,`=(Y)QT0D6`````!-B60D
+M8$G'1"1H`````$F-="1828M\)!#H`````$B#[(!;74%<05U!7L-F9F:09F9F
+MD&9FD(-_'`=V"8%_("<-``!W!\='4/[____SPV9F9I!F9F:0059!54%455-(
+M@\2`28G\2(M'*(LXBV@$38MT)#"^`````.B)>___2(G#0;T`````0<=$)%#_
+M____2(7`='1FD$B+0PA(@[@(`0```'1'2(M[$/^0"`$``#GH?C1(BT,(2(M[
+M$$R)\HGN_Y`@`0``A<!U/T&`?@+_=`1%`&X"0<=$)%``````ZREF9F:09F:0
+M*<5!`<5(BQM(A=MT%4B+0PA(BWL02(GF_U`X@'PD$P!TCDG'1"18`````$V)
+M9"1@2<=$)&@`````28UT)%A)BWPD$.@`````2(/L@%M=05Q!74%>PV9F9I!F
+M9F:09F:02(M'*(L`@W\<`W832&-7((G`2(T$A00```!(.<)S!\='4/[____S
+MPV9F9I!F9F:02(/L&$B)7"0(3(ED)!!(B?M(BT<HBS!,BV<P28U\)`3H2X'_
+M_T&)!"1(QT-8`````$B)6V!(QT-H`````$B-<UA(BWL0Z`````!(BUPD"$R+
+M9"002(/$&,-F9F:09F:02(M'*(L`@W\<`W832&-7((G`2(T$A00```!(.<)S
+M!\='4/[____SPV9F9I!F9F:02(/L&$B)7"0(3(ED)!!(B?M(BT<HBS!,BV<P
+M28U\)`3HBX'__T&)!"1(QT-8`````$B)6V!(QT-H`````$B-<UA(BWL0Z```
+M``!(BUPD"$R+9"002(/$&,-F9F:09F:04TB)^TB+1RB+.(-['`-V"8%[(*T`
+M``!W"<=#4/[____K$>@`````2(7`=0?'0U#^____6\-F9F:09F9FD&9FD%-(
+MB?M(BT<HBSA(BW,PN0````"ZK@```$B)\&9FD&:0B`A(_\!(_\IU]NB1D/__
+MA<!T!\=#4/____](QT-8`````$B)6V!(QT-H`````$B-<UA(BWL0Z`````!;
+MPV9FD%-(B?M(BT<HBSB#>QP#=@F!>R#7````=PG'0U#^____ZQ'H`````$B%
+MP'4'QT-0_O___UO#9F9FD&9F9I!F9I!32(G[2(M'*(LX2(MS,+D`````NM@`
+M``!(B?!F9I!FD(@(2/_`2/_*=?;HD9#__X7`=`?'0U#_____2,=#6`````!(
+MB5M@2,=#:`````!(C7-82(M[$.@`````6\-F9I!32(G[2(M'*(LX@WL<`W8)
+M@7L@^0```'<)QT-0_O___^L1Z`````!(A<!U!\=#4/[___];PV9F9I!F9F:0
+M9F:04TB)^TB+1RB+.$B+<S"Y`````+KZ````2(GP9F:09I"("$C_P$C_RG7V
+MZ)&0__^%P'0'QT-0_____TC'0U@`````2(E;8$C'0V@`````2(US6$B+>Q#H
+M`````%O#9F:02(/L$$B)'"1(B6PD"$B)^TB+1RB+*$B+?S"#>QP(=@:#>R`$
+M?PK'0U#^____ZS:02(M#*(M0!`^V0`B)%XA'!.@K=O__/`%T"<=#4/[____K
+M$XGOZ`````!(A<!U!\=#4/[___](BQPD2(ML)`A(@\00PV9F9I!F9I!F9I!F
+M9I!32(G[2(M'*(LX2(MS,.BMD/__A<!T!\=#4/____](QT-8`````$B)6V!(
+MQT-H`````$B-<UA(BWL0Z`````!;PV9F9I!F9F:09F9FD&9FD$B#[!!(B1PD
+M2(EL)`A(B?V!?QRS````=@:#?R`'=PG'15#^____ZSY(BT<HBQB)W^@`````
+M2(G!A=L/E<"#^_\/E<(/ML"%PG0<2(7)=!"`>1`$=@I(@[F``@```'0'QT50
+M_O___TB+'"1(BVPD"$B#Q!##9F9FD&9F9I!F9F:02(/L*$B)7"0(3(ED)!!,
+MB6PD&$R)="0@28G]2(M?*$2+(TB#PP1,BW<P1(GGZ`````!(B<=%A>0/E,)!
+M@_S_#Y3`"="H`;@`````2`]%^$0/MD,"2(U+<`^V4P$/MC-!N0````!!@^`/
+MZ(*4__])B09)QT58`````$V);6!)QT5H`````$F-=5A)BWT0Z`````!(BUPD
+M"$R+9"003(ML)!A,BW0D($B#Q"C#9F:09I!(@^P82(D<)$B);"0(3(ED)!!(
+MB?V#?QP(=@:#?R`'=P_'15#^____ZUMF9I!F9I!(BT<HBQA,C6`$B=_H````
+M`$B)P87;#Y7`@_O_#Y7"#[;`A<)T'$B%R700@'D0!'8*2(.Y@`(```!T!\=%
+M4/[___],B>?HQG/__SP!=`?'15#^____2(L<)$B+;"0(3(MD)!!(@\08PV9F
+M9I!F9F:02(/L*$B)7"0(2(EL)!!,B60D&$R);"0@28G\2(M'*(L82(UH!$R+
+M;S")W^@`````2(G'A=L/E,*#^_\/E,`)T*@!N`````!(#T7X@'T*`'0&#[9%
+M"NL*#[9%#L#H!`^VP$0/MD4.2(U-?`^V50T/MG4,08G!08/@#^@BD___28E%
+M`$G'1"18`````$V)9"1@2<=$)&@`````28UT)%A)BWPD$.@`````2(M<)`A(
+MBVPD$$R+9"083(ML)"!(@\0HPV9F9I!F9F:09F9FD&9FD$B#["!(B1PD2(EL
+M)`A,B60D$$R);"082(G[2(M'*$2+($AC5QQ$B>!(C02%!````$@YPG(+@W\@
+M`'D59F:09I#'0U#^____ZWQF9F:09F:0@#T``````G4IQT=0_O___^MCQT-0
+M_O___^M:QT-0_/___^M1QT-0_O___V9FD&:0ZT-!O0````!%.>5S.&9FD$2)
+MZ$B+4RB+;(($B>_H`````$B%P'2[B>_H`````$B+4Q!(.1!UM/9`9`%TMT'_
+MQ44YY7++2(L<)$B+;"0(3(MD)!!,BVPD&$B#Q"##9F:055-(@^P(2(MO*+@`
+M````@WT``'8=C5@!B=B+?(4`Z`````!(B<?HQ>W__XG8.5T`=^-(@\0(6UW#
+M9F9FD&9FD$B#[`A(BT<02,>`(`(```````!(B;@H`@``2,>`,`(```````!(
+MC;`@`@``2(UX2.@`````2(/$",-F9I!F9I!(@^P@2(D<)$B);"0(3(ED)!!,
+MB6PD&$B)^TB+;RB!?QR'````=@:#?R`#=PG'0U#^____ZVR`?0$(=B3'1U#^
+M____ZUW'0U#^____9F9FD.M0QT-0_/___^M'9F:09I!!O0````"`?0$`=C9F
+M9F:01(GJ#[;"1(MDA6A$B>?H`````$B%P'2]1(GGZ`````!(BU,02#D0=;E!
+M_\5$.&T!=\Y(BQPD2(ML)`A,BV0D$$R+;"082(/$(,-F9I!F9I!54TB#[`A(
+MBU\HO0````"`>P$`=!V)Z(M\@VCH`````$B)Q^B([/___\4/MD,!.>AWXTB#
+MQ`A;7<-F9F:09F:02(/L"$B+1Q!(QX`@`@```````$B)N"@"``!(QX`P`@``
+M`````$B-L"`"``!(C7A(Z`````!(@\0(PV9FD&9FD(-_'`-V!H-_(`-_!\='
+M4/[____SPV9F9I!F9F:09F:055-(@>R(````2(G[2(M'*(LXO@````#H=''_
+M_TB)PDB+:S!(A<!T*$B+0`A(B>9(BWH0_U`XBT0D!&:)10`/MT0D!F:)10+K
+M#F9F9I!F9I#'0U#^____2,=#6`````!(B5M@2,=#:`````!(C7-82(M[$.@`
+M````2('$B````%M=PV9F9I!F9F:09F:09F:02(M'*(M("(MP#$AC5QR%R70.
+MB?!(@\`02#G"<A7K!Y!(@_H/=@R%R74/.7<@9F:0<P?'1U#^____\\-F9I!F
+MD$B#["A(B5PD"$B);"003(ED)!A,B6PD($B)^TB+1RB+.$2+:`2+:`A$BV`,
+MO@````#HBG#__TB)P4B%P'4)QT-0_O___^M+A>UU)4B+0`A(BU,P2(MY$$&X
+M`0```$2)X42)[O^0*`$``.LG9F:09I!(BU,H2(/"$$B+0`A(BWD00;@`````
+M1(GA1(GN_Y`H`0``2,=#6`````!(B5M@2,=#:`````!(C7-82(M[$.@`````
+M2(M<)`A(BVPD$$R+9"083(ML)"!(@\0HPV9F9I!(@^P@2(D<)$B);"0(3(ED
+M)!!,B6PD&$B)^TB+;RB!?QRO````=@:#?R`#=PG'0U#^____ZVR`?0$0=B3'
+M1U#^____ZUW'0U#^____9F9FD.M0QT-0_/___^M'9F:09I!!O0````"`?0$`
+M=C9F9F:01(GJ#[;"1(MDA7!$B>?H`````$B%P'2]1(GGZ`````!(BU,02#D0
+M=;E!_\5$.&T!=\Y(BQPD2(ML)`A,BV0D$$R+;"082(/$(,-F9I!F9I!54TB#
+M[`A(BU\HO0````"`>P$`=!V)Z(M\@W#H`````$B)Q^B(Z?___\4/MD,!.>AW
+MXTB#Q`A;7<-F9F:09F:02(/L"$B+1Q!(QX`@`@```````$B)N"@"``!(QX`P
+M`@```````$B-L"`"``!(C7A(Z`````!(@\0(PV9FD&9FD$B#["!(B1PD2(EL
+M)`A,B60D$$R);"082(G[2(MO*(-_'`1^!H-_(`-W"<=#4/[____K?4B)[^CU
+M;/__/`%T"<=#4/[____K:(!]#4!F9F:0=B#'0U#^____ZU7'0U#^____ZTS'
+M0U#\____9F:09I#K/D&]`````(!]#0!V,D2)Z@^VPD2+9(5\1(GGZ`````!(
+MA<!TQ42)Y^@`````2(M3$$@Y$'6]0?_%1#AM#7?.2(L<)$B+;"0(3(MD)!!,
+MBVPD&$B#Q"##9F9FD&9F9I!54TB#[`A(BU\HO0````"`>PT`=!V)Z(M\@WSH
+M`````$B)Q^@XZ/___\4/MD,-.>AWXTB#Q`A;7<-F9F:09F:02(/L"$B+1Q!(
+MQX`@`@```````$B)N"@"``!(QX`P`@```````$B-L"`"``!(C7A(Z`````!(
+M@\0(PV9FD&9FD$B#["!(B1PD2(EL)`A,B60D$$R);"082(G[2(M'*(LH3(U@
+M!(%_'+,```!V!H-_(`-W#<=#4/[____IE````)")[^@`````2(7`=0G'0U#^
+M____ZWZ)[^@`````2(M3$$@Y$'0)QT-0_/___^ME08!\)`$0=A['0U#^____
+M9F:0ZU''0U#^____ZTC'0U#\____ZS]!O0````!!@'PD`0!V,42)Z@^VPD&+
+M;(1PB>_H`````$B%P'3)B>_H`````$B+4Q!(.1!UPD'_Q44X;"0!=\](BQPD
+M2(ML)`A,BV0D$$R+;"082(/$(,-F9I!FD%532(/L"$B+7RA(@\,$O0````"`
+M>P$`="1F9F:09F:0B>B+?(-PZ`````!(B<?HO>;____%#[9#`3GH=^-(@\0(
+M6UW#9F9FD&9F9I!F9F:02(/L"$B+1Q!(QX`@`@```````$B)N"@"``!(QX`P
+M`@```````$B-L"`"``!(C7A(Z`````!(@\0(PV9FD&9FD$B#["!(B1PD2(EL
+M)`A,B60D$$R);"082(G[2(M'*(LH3(U@!(-_'`AV!H-_(`-W$,=#4/[____I
+MMP```&9F9I")[^@`````2(7`=0S'0U#^____Z9L```")[^@`````2(M3$$@Y
+M$'0,QT-0_/___^E_````3(GGZ.1I__\\`6:0=`G'0U#^____ZVA!@'PD#4!V
+M'\=#4/[____K5\=#4/[____K3L=#4/S___]F9F:0ZT%!O0````!!@'PD#0!F
+MD'8Q1(GJ#[;"08MLA'R)[^@`````2(7`=,.)[^@`````2(M3$$@Y$'6\0?_%
+M13AL)`UWSTB+'"1(BVPD"$R+9"003(ML)!A(@\0@PV9FD&:055-(@^P(2(M?
+M*$B#PP2]`````(![#0!T)&9F9I!F9I")Z(M\@WSH`````$B)Q^@=Y?___\4/
+MMD,-.>AWXTB#Q`A;7<-F9F:09F9FD&9F9I!(@^P(2(M'$$C'@"`"````````
+M2(FX*`(``$C'@#`"````````2(VP(`(``$B->$CH`````$B#Q`C#9F:09F:0
+M2(/L&$B)7"0(2(EL)!!(B?M(BT<HBRB#?QP'=@:#?R`#=PW'0U#^____ZVAF
+M9F:0B>_H`````$B%P'4)QT-0_O___^M/B>_H`````$B+4Q!(.1!T"<=#4/S_
+M___K-DB#>!@`=0:`>!`$=PG'0U#^____ZR"#>##_=!J+<#!(BP!(BW@(Z```
+M``"%P'0'QT-0_____TB+7"0(2(ML)!!(@\08PV9F9I!F9I!F9I!F9I!32(M'
+M*(LXZ`````!(B<-(A<!T/$B#N(`"````=#)(BX"``@``2(-X"`!T"4B+>`CH
+MV^/__TB+@X`"``!(@W@0`'052(MX$.C$X___ZPIFD$B)W^BXX___6\-F9I!F
+M9I!(@^P(2(M'$$C'@"`"````````2(FX*`(``$C'@#`"````````2(VP(`(`
+M`$B->$CH`````$B#Q`C#9F:09F:0@W\<`'@&@W\@*W<'QT=0_O____/#9F9F
+MD&9F9I!F9I!32(G[2(M_,.CCJ?__A<!T!\=#4/____](QT-8`````$B)6V!(
+MQT-H`````$B-<UA(BWL0Z`````!;PV9FD&:02(/L$$B)'"1(B6PD"$B)^TB+
+M1RB+*(-_'`AV!H-_(`!Y#L=#4/[____K-69FD&:0B>_H`````$B%P'4)QT-0
+M_O___^L;B>_H`````$B+4Q!(.1!T"\=#4/S___]F9F:02(L<)$B+;"0(2(/$
+M$,-FD$B#[!A(B1PD2(EL)`A,B60D$$B)^TB+1RB+.$2+8`0/MF@(Z`````!(
+MB<9`#[;-1(GBBWL828G8Z+/+__](BQPD2(ML)`A,BV0D$$B#Q!C#2(/L$$B)
+M'"1(B6PD"$B)^TB+1RB+*(-_'`AV!H-_(`!_#L=#4/[____K-69FD&:0B>_H
+M`````$B%P'4)QT-0_O___^L;B>_H`````$B+4Q!(.1!T"\=#4/S___]F9F:0
+M2(L<)$B+;"0(2(/$$,-FD$B#[!A(B1PD2(EL)`A,B60D$$B)^TB+1RB+.$2+
+M8`0/MF@(Z`````!(B<9`#[;-1(GBBWL828G8Z//*__](BQPD2(ML)`A,BV0D
+M$$B#Q!C#2(/L$$B)'"1(B6PD"$B)^TB+1RB+*(-_'`AV!H-_(`!Y#L=#4/[_
+M___K-69FD&:0B>_H`````$B%P'4)QT-0_O___^L;B>_H`````$B+4Q!(.1!T
+M"\=#4/S___]F9F:02(L<)$B+;"0(2(/$$,-FD$B#[!A(B1PD2(EL)`A,B60D
+M$$B)^TB+1RB+.$2+8`0/MF@(Z`````!(B<9`#[;-1(GBBWL828G8Z#/*__](
+MBQPD2(ML)`A,BV0D$$B#Q!C#2(/L$$B)'"1(B6PD"$B)^TB+1RB+*(-_'`UV
+M!H-_(`!Y#L=#4/[____K-69FD&:0B>_H`````$B%P'4)QT-0_O___^L;B>_H
+M`````$B+4Q!(.1!T"\=#4/S___]F9F:02(L<)$B+;"0(2(/$$,-FD$B#[!A(
+MB1PD2(EL)`A,B60D$$B)^TB+1RB+.$R+8`0/MV@,Z`````!(B<8/M\V+>QA)
+MB=A,B>+H=,G__TB+'"1(BVPD"$R+9"002(/$&,.02(/L$$B)'"1(B6PD"$B)
+M^TB+1RB+*(-_'`UV!H-_(`!_#L=#4/[____K-69FD&:0B>_H`````$B%P'4)
+MQT-0_O___^L;B>_H`````$B+4Q!(.1!T"\=#4/S___]F9F:02(L<)$B+;"0(
+M2(/$$,-FD$B#[!A(B1PD2(EL)`A,B60D$$B)^TB+1RB+.$R+8`0/MV@,Z```
+M``!(B<8/M\V+>QA)B=A,B>+HM,C__TB+'"1(BVPD"$R+9"002(/$&,.02(/L
+M$$B)'"1(B6PD"$B)^TB+1RB+*(-_'`UV!H-_(`!Y#L=#4/[____K-69FD&:0
+MB>_H`````$B%P'4)QT-0_O___^L;B>_H`````$B+4Q!(.1!T"\=#4/S___]F
+M9F:02(L<)$B+;"0(2(/$$,-FD$B#[!A(B1PD2(EL)`A,B60D$$B)^TB+1RB+
+M.$R+8`0/MV@,Z`````!(B<8/M\V+>QA)B=A,B>+H],?__TB+'"1(BVPD"$R+
+M9"002(/$&,.02(/L$$B)'"1(B6PD"$B)^TB+1RB+*(-_'`-V!H-_(`!Y#L=#
+M4/[____K;&9FD&:0B>_H`````$B%P'4)QT-0_O___^M2B>_H`````$B)PDB+
+M0Q!(.0)T"<=#4/S____K-H!Z$`1V*4B#NH`"````D'0>2(N"@`(``("XJP``
+M``!U#@^V@F$"``"#X!@\"'0'QT-0_O___TB+'"1(BVPD"$B#Q!##9F9FD&9F
+M9I!F9I!32(M'*(LXZ`````!(BYB``@``2(VSD````(![*``/A/$```!(BT,(
+M2(M0*$@YDZ````!U*X"[J@````)U$DB)W^AZSO__Z>$!``!F9I!FD("[J@``
+M``%U!\:#J@````!(BU,(2(MZ*$@YNZ````!V,$@/MX.H````2`'X2#F#H```
+M`'8+#[>+J````.MR9I`/MXN@````2(M#"&8K2"CK7TB+0PA(BXN@````2#M(
+M*'4F2`^WDZ@```!(B<A(B=>Z`````$CW]XG19H72=3$/MXNH````ZRA(#[>#
+MJ````$@Y@Z````!R"0^WBZ@```#K#@^WBZ````!F9F:09F:0#[?12(N#H```
+M`$B)QT@IU^F2````2(M#"$B+4"A(.9.@````=2J`NZH````#=1%(B=_HB<W_
+M_^GP````9F9FD("[J@````!U!\:#J@````%(B[N@````#[:#J@```(3`#Y3"
+M/`,/E,`)T*@!=`I(BT,(2(M0*.L(2(M#$$B+4"A(#[>#J````$B+BZ````!(
+M`<A(.=!V"68IRHG1ZPEFD`^WBZ@```!FQT8*``!(B3YFB4X(#[:#J@```(3`
+M#Y3"/`,/E,`)T*@!=%E(QT-8`````$B+!DB)0TA(#[=&"$@#!DB)0U!(QT-P
+M`````$B)6WA(QX.``````````$B-0V!(B4-@2(E#:,>#B`````$```!(C7-(
+M2(M[".@`````A<!U"$B)W^BTT___6V9FD,-F9F:09F9FD&9F9I!F9I!(@^P0
+M2(D<)$B);"0(2(G[2(M'*(LH@W\<`W8&@W\@`'D.QT-0_O___^M%9F:09I")
+M[^@`````2(7`=0G'0U#^____ZRN)[^@`````2(M3$$@Y$'0)QT-0_/___^L2
+M@'@0`70,QT-0_O___V9FD&:02(L<)$B+;"0(2(/$$,-FD$B#[`A(BT<HBSCH
+M`````$B)Q^@)V___2(/$",-F9F:02(/L"$B+1Q!(QX`@`@```````$B)N"@"
+M``!(QX`P`@```````$B-L"`"``!(C7A(Z`````!(@\0(PV9FD&9FD$B#[!!(
+MB1PD2(EL)`A(B?M(BT<HBRB#?QP#=@:#?R``>0['0U#^____ZT5F9I!FD(GO
+MZ`````!(A<!U"<=#4/[____K*XGOZ`````!(BU,02#D0=`G'0U#\____ZQ*`
+M>!`!=`S'0U#^____9F:09I!(BQPD2(ML)`A(@\00PV:02(/L"$B+1RB+..@`
+M````2(G'Z"G:__](@\0(PV9F9I!(@^P(2(M'$$C'@"`"````````2(FX*`(`
+M`$C'@#`"````````2(VP(`(``$B->$CH`````$B#Q`C#9F:09F:02(/L&$B)
+M'"1(B6PD"$R)9"002(G[2(M'*(LH1(M@!(-_'`=V"X-_(`!Y%69FD&:0QT-0
+M_O___^FI````9F9FD(GOZ`````!(A<!U#,=#4/[____IC0```$2)YV9FD&:0
+MZ`````!(A<!U"<=#4/[____K<HGOZ`````!(B<5$B>?H`````$B)PDB+0Q!(
+M.44`=`G'0U#\____ZTI(BT,02#D"=`G'0U#\____ZSA(BT4(@'@*`'0G@'H0
+M`74A2(-]6`!T&DB#O8`"````=!=(BX6``@``@+BK`````'0'QT-0_O___TB+
+M'"1(BVPD"$R+9"002(/$&,-F9F:09F9FD$B#[!A(B5PD"$R)9"002(M'*(LX
+MBU@$Z`````!)B<2)W^@`````2(G#3(GGZ*_8__](B=_HI]C__TB+7"0(3(MD
+M)!!(@\08PV9F9I!F9F:02(/L"$B+1Q!(QX`@`@```````$B)N"@"``!(QX`P
+M`@```````$B-L"`"``!(C7A(Z`````!(@\0(PV9FD&9FD$B#[!!(B1PD2(EL
+M)`A(B?M(BT<HBRB#?QP'=@:#?R``>0['0U#^____ZT5F9I!FD(GOZ`````!(
+MA<!U"<=#4/[____K*XGOZ`````!(BU,02#D0=`G'0U#\____ZQ*`>!`$=PS'
+M0U#^____9F:09I!(BQPD2(ML)`A(@\00PV:02(/L&$B)7"0(2(EL)!!(BT<H
+MBSB+6`3H`````$B)Q8/[#75,2(7`=&9(@[B``@```'1<2(N`@`(``$B#>`@`
+M=`](BW@(Z(;7__]F9I!F9I!(BX6``@``2(-X$`!T,4B+>!#H:=?__^LF9F9F
+MD&9FD(/[`0^4PH/[!`^4P`G0J`%U!8/[!W4(2(GOZ$'7__](BUPD"$B+;"00
+M2(/$&,-FD$B#[`A(BT<02,>`(`(```````!(B;@H`@``2,>`,`(```````!(
+MC;`@`@``2(UX2.@`````2(/$",-F9I!F9I!(@^P02(D<)$B);"0(2(G[2(M'
+M*(LH@W\<5W8&@W\@`'D.QT-0_O___^M'9F:09I")[^@`````2(7`=0G'0U#^
+M____ZRV)[^@`````2(M3$$@Y$'0)QT-0_/___^L4@'@0!'8'2(-X&`!T!\=#
+M4/[___](BQPD2(ML)`A(@\00PTB#[`A(BT<HBSCH`````$B)Q^A9UO__2(/$
+M",-F9F:02(/L"$B+1Q!(QX`@`@```````$B)N"@"``!(QX`P`@```````$B-
+ML"`"``!(C7A(Z`````!(@\0(PV9FD&9FD$B#[!!(B1PD2(EL)`A(B?M(BT<H
+MBRB#?QQ#=@:#?R``>0['0U#^____ZTEF9I!FD(7M=$")[^@`````2(7`9I!U
+M"<=#4/[____K*8GO9F:0Z`````!(BU,02#D0=`G'0U#\____ZPV`>!`!=`?'
+M0U#^____2(L<)$B+;"0(2(/$$,-F9F:09F9FD&9FD&9FD$B#[`A(BT<02,>`
+M(`(```````!(B;@H`@``2,>`,`(```````!(C;`@`@``2(UX2.@`````2(/$
+M",-F9I!F9I!(@^P02(D<)$B);"0(2(G[2(M'*(LH@W\<"'8&@W\@`'D.QT-0
+M_O___^M)9F:09I"%[71`B>_H`````$B%P&:0=0G'0U#^____ZRF)[V9FD.@`
+M````2(M3$$@Y$'0)QT-0_/___^L-@'@0`70'QT-0_O___TB+'"1(BVPD"$B#
+MQ!##9F9FD&9F9I!F9I!F9I!(@^P(2(M'$$C'@"`"````````2(FX*`(``$C'
+M@#`"````````2(VP(`(``$B->$CH`````$B#Q`C#9F:09F:0@W\<`'@&@W\@
+M`'D'QT=0_O____/#9F9FD&9F9I!F9I!(@^P(2(M'$$C'@"`"````````2(FX
+M*`(``$C'@#`"````````2(VP(`(``$B->$CH`````$B#Q`C#9F:09F:0@W\<
+M`'@&@W\@*W<'QT=0_O____/#9F9FD&9F9I!F9I!32(G[2(M_,.B3I/__A<!T
+M!\=#4/____](QT-8`````$B)6V!(QT-H`````$B-<UA(BWL0Z`````!;PV9F
+MD&:0@W\<`'@&@W\@?W<'QT=0_O____/#9F9FD&9F9I!F9I!54TB#[`A(B?U(
+MBU\P2(G?Z"ND__^%P'0'QT50_____\<#@````+D`````NE0```!(C4,LB`A(
+M_\!(_\IU]KD`````2&/1#[9$$PR#X`\/ML"#Z`.#^`)W!<9$$RP&_\&#^0]^
+MWDC'15@`````2(EM8$C'16@`````2(UU6$B+?1#H`````$B#Q`A;7<-F9I!(
+M@^P02(D<)$B);"0(2(G[2(MO*`^V50O!X@E(8T\<@'T,`G4-B=!(@\`02#G!
+M<B;K!DB#^0]V'DAC2R"`?0P!=0Z)T$B#P!!(.<%R">L3D$B#^0]W#,=#4/[_
+M__]F9I#K0HM]`.@`````2(7`=0G'0U#^____ZRR+?0!F9I!FD.@`````2(M3
+M$$@Y$'0)QT-0_/___^L-@'@0`70'QT-0_O___TB+'"1(BVPD"$B#Q!##9F9F
+MD&9F9I!F9I!F9I!32(G[2(M'*(LXZ`````!(B<=(B=[H%A```%O#9F9FD$B#
+M[!!(B1PD2(EL)`A(B?M(BV\H#[=5$,'B"4AC3QR`?1("=0V)T$B#P!1(.<%R
+M)NL&2(/Y$W8>2&-+((!]$@%U#HG02(/`%$@YP7()ZQ.02(/Y$W<,QT-0_O__
+M_V9FD.M"BWT`Z`````!(A<!U"<=#4/[____K+(M]`&9FD&:0Z`````!(BU,0
+M2#D0=`G'0U#\____ZPV`>!`!=`?'0U#^____2(L<)$B+;"0(2(/$$,-F9F:0
+M9F9FD&9FD&9FD%-(B?M(BT<HBSCH`````$B)QTB)WN@V#P``6\-F9F:02(/L
+M$$B)'"1(B6PD"$B)^TB+1RB+*(-_'`-V!H-_(`!Y#L=#4/[____K-69FD&:0
+MB>_H`````$B%P'4)QT-0_O___^L;B>_H`````$B+4Q!(.1!T"\=#4/S___]F
+M9F:02(L<)$B+;"0(2(/$$,-FD$B#[`A(BT<02,>`(`(```````!(B;@H`@``
+M2,>`,`(```````!(C;`@`@``2(UX2.@`````2(/$",-F9I!F9I!(@^P@2(D<
+M)$B);"0(3(ED)!!,B6PD&$B)^TB+1RA$#[8@2&-7'$2)X$B-!(4$````2#G"
+M<@:#?R`#=R3'0U#^____ZUO'0U#^____9F9FD.M.QT-0_/___^M%9F:09I!!
+MO0````!%.>5S-69FD&:01(GH2(M3*(ML@@2)[^@`````2(7`=+Z)[^@`````
+M2(M3$$@Y$'6[0?_%13GE<M&02(L<)$B+;"0(3(MD)!!,BVPD&$B#Q"##9F9F
+MD&9F9I!!5D%505154TB)_4B+1RA$BRA%B>Y!@>8``0``08'E_P```$B+1S#'
+M``````!!O`````!%.>P/@Y@```!F9F:01(G@2(M5*(M\@@3H`````$B)PT6%
+M]G0X2(-X&`!U&8!X$`6^`````$@/0_!(B<?H7,G__X3`=0U(BU4P08U$)`&)
+M`NM/187V=3YF9I!F9I!(@WL8`'4D9O>#8`(``'`(=1F#>S#_=""+<S!(BP-(
+MBW@(Z`````"%P'0-2(M5,$&-1"0!B0+K#$'_Q$4Y[`^";/___TC'15@`````
+M2(EM8$C'16@`````2(UU6$B+?1#H`````%M=05Q!74%>PV:02(/L($B)'"1(
+MB6PD"$R)9"003(EL)!A(B?M(BT<H1`^V($AC5QQ$B>!(C02%!````$@YPG(&
+M@W\@`W<DQT-0_O___^M;QT-0_O___V9F9I#K3L=#4/S____K169FD&:00;T`
+M````13GE<S5F9I!FD$2)Z$B+4RB+;(($B>_H`````$B%P'2^B>_H`````$B+
+M4Q!(.1!UNT'_Q44YY7+1D$B+'"1(BVPD"$R+9"003(ML)!A(@\0@PV9F9I!F
+M9F:02(/L&$B)'"1(B6PD"$R)9"0028G\2(M'*(L`]L3_#Y3"#[;HA-)T/KL`
+M````.>M]-4ACPTF+5"0HBWR"!.@`````2(7`=!F`>!`$=A-(@[B``@```'4)
+M2(G'Z+'-__^0_\,YZWS+2(L<)$B+;"0(3(MD)!!(@\08PV9F9I!F9I!(@^P(
+M2(M'$$C'@"`"````````2(FX*`(``$C'@#`"````````2(VP(`(``$B->$CH
+M`````$B#Q`C#9F:09F:02(/L$$B)'"1(B6PD"$B)^TB+1RB+*(-_'`=W"<='
+M4/[____K,(GOZ`````!(A<"0=0G'0U#^____ZQJ)[V9FD.@`````2(M3$$@Y
+M$'0'QT-0_/___TB+'"1(BVPD"$B#Q!##9F9FD&9FD&9FD&9FD$B#[`A(BT<H
+MBSB`>`0!=1#H`````$B)Q^C#S/__9F:02(/$",-F9F:09F9FD&9FD$B#[`A(
+MBT<02,>`(`(```````!(B;@H`@``2,>`,`(```````!(C;`@`@``2(UX2.@`
+M````2(/$",-F9I!F9I!(BT<HBP"#?QP#=A-(8U<@B<!(C02%!````$@YPG,'
+MQT=0_O____/#9F9FD&9F9I!!5T%6055!5%532('LF````$F)_$B+1RB+`(E$
+M)`Q!OP````!!O0````!,BW<P28/&!$B++0````!(A>UT5F:02(M=$$B%VW1"
+M9F9FD&9FD$B+0PA(BWL02(UT)!#_4#B`?"0C`'0<23EL)!!U$D6)+DF#Q@1!
+M_\=$.WPD#',5D$'_Q4B+&TB%VW7%2(MM`$B%[76L28M$)#!$B3A)QT0D6```
+M``!-B60D8$G'1"1H`````$F-="1828M\)!#H`````$B!Q)@```!;74%<05U!
+M7D%?PV9F9I!F9F:09F9FD%-(B?M(BT<H#[8`@W\<`G8&@W\@`'D)QT-0_O__
+M_^M!#[;XO@````#HLU#__TB)PDB%P'0.2(M`"$B#N/@`````=0W'0U#^____
+MZQ5F9F:02(M#$$@Y0AAT!\=#4/S___];PV9F9I!F9I!F9I!F9I!(@^P(2(M7
+M$$B+@B`"``!(B4=(2,='6`````!(B7]@2,=':`````!(C7=82(G7Z`````!(
+M@\0(PV9F9I!F9F:04TB#[!!(B?M(BT<H#[80@'@"`W4;#[9`!(E$)`P/MOI(
+MC70D#.@&4/__2(G!ZS&0@'@"!'4:#[9``8E$)`@/MOI(C70D".BU4/__2(G!
+MZQ`/MOJ^`````.C33___2(G!2(M3$$B+0TA(B8(@`@``2(M#$$B)F"@"``!(
+MBT,02,>`,`(```````!(QT-(`````$B+00A(BWD02(G>_Y#X````2(/$$%O#
+M9F9FD&9F9I!(@^P02(D<)$B);"0(2(G[2(MO*$AC5QR`?00"=1*+11A(@\`<
+M2#G"<BSK"F9F9I!(@_H;=B!(8U,@@'T$`6:0=0Z+11A(@\`(2#G"<@CK$DB#
+M^@=W#,=#4/[___]F9I#K0HM]`.@`````2(7`=0G'0U#^____ZRR+?0!F9I!F
+MD.@`````2(M3$$@Y$'0)QT-0_/___^L-@'@0`70'QT-0_O___TB+'"1(BVPD
+M"$B#Q!##9F9FD&9F9I!F9I!F9I!(BT]82(MY*+@`````A=)T,8!_!`%U#DB+
+M03!(@\`(2(E&".L,2(M!*$B#P!Q(B48(BT<8B0;'1@0!````N`$```#SPV9F
+M9I!F9F:09F9FD%-(BU]82(M+,("_J@````%T"8"_D@````!T1<=#4``````/
+MMH>2````B`&$P'01#[:'D0```(E!!.L.9F:09I"+AY0```")001(@WLX`'07
+M2(M3.(M!!(/`"(D"ZPEFD,=#4/_____H`````$C'0U@`````2(E;8$C'0V@`
+M````2(US6$B+>Q#H`````%O#D$B#[!A(B1PD2(EL)`A,B60D$$F)_$B+;RB+
+M?0#H`````$B)PTB+.(MP-.@`````2(G"2(7`=3E!QT0D4/W___])QT0D6```
+M``!-B60D8$G'1"1H`````$F-="1828M\)!#H`````.F4````9F:09I!,B6!8
+M2(E84,:`J`````*`?00!=0N`B*D````"ZQ)FD(!]!`)U"H"(J0````1F9I!(
+MC44(2(F"F`````^V10>(@I````"+11B)@I0```!!#[9$)""#Z`B(@I$```"$
+MP'0028M$)#!(@\`(2(F"H````$C'@K@`````````2,>"P`````````!(B=?H
+M`````$B+'"1(BVPD"$R+9"002(/$&,-F9F:09F9FD&9FD&9FD$%455-)B?Q(
+MB?-(Q\4`````@ST`````_W0CBP4`````.T88=!)(@\4H@WT`_W0.BT4`.T,8
+M=>Z#?0#_=1+'0U#^____2(G?_U-(Z;0```#'0U``````2(G?_U4(@WM0`'0+
+M2(G?_U-(Z98```!!@+PDD`($``!UQ8-](`!F9F:0=7M)@[PDX`$```!T'$F-
+MA"00`@``2(M0"$B)6`A(B0-(B5,(2(D:ZUI)B9PDX`$``$B#?1``=$5!QX0D
+MZ`$```$```!(BT4828F$)/`!``!)B9PD^`$``$G'A"0``@```````$B)W_]5
+M$$'_C"3H`0``08.\).@!````=09(B=__51A;74%<PV9F9I!F9F:04TB)^TB+
+M?Q!(.9_@`0``=3](QX?@`0```````$B-AQ`"``!(.8<0`@``="1(B[<0`@``
+M2(M6"$B+!DB)4`A(B0)(B39(B78(Z*/^__]F9I!(B=__4TA;PV9F9I!F9F:0
+M4TB)^TB)?A!(@WXX`'0)2(M6.(M&((D"2(G?Z'#^__](B=_H`````%O#9F:0
+M9F:0BX?H`P``PV9FD&9FD&9FD$B#[#BY`````+HL````2(G@B`A(_\!(_\IU
+M]D"(?"0(0(#_!W492(-^&`!T#DB+1AB+@.@#``")1"0,2(MV.$"`_P8/E,)`
+M@/\$#Y3`"="H`7440(#_!0^4PD"`_P@/E,`)T*@!=!CVAF`"```!#[9$)`RZ
+M`0````]%PHA$)`Q`@/\<=1A(BX9H`@``2(E$)`P/MX9T`P``9HE$)!1`@/\#
+M=49(@WX@`'0_2(M6(`^V@J@```"(1"0,@+JH`````'4G2(N"D````$B)1"00
+M#[>"F````(E$)!@/MH*I````T.B#X`&(1"0-BX;H`P``B40D!$B)Y^@`````
+M2(/$.,-(@^Q(2(E<)#!(B6PD.$R)9"1`2(G[2(MO6$R+9U"!?1A"_P``=5Q(
+MBU4P#[:'FP```(A"#P^WAY0```!FB4((#[>'E@```&:)0@H/MX>8````9HE"
+M#`^VAYH```"(0@X/MX>0````9HE"!`^WAY(```!FB4(&#[>'G````&:)0A#K
+M5$B+53`/MH>;````B$(*#[>'E````(A"!@^WAY8```"(0@</MX>8````B$((
+M#[:'F@```(A""0^WAY````"(0@0/MX>2````B$(%#[>'G````(A""X"[J@``
+M``%U9<=%4`````"!?1A"_P``=1!(BT4H@'@/\G099F:09F:0@7T8&/\``'5#
+M2(M%*(!X"O)U.4F+1"1H2(GF28N\)(````#_4'A(BT0D&/:```$```1T&("@
+M``$``/M,B>?H`````.L'QT50_____TB)W^@`````2,=%6`````!(B6U@2,=%
+M:`````!(C7582(M]$.@`````2(M<)#!(BVPD.$R+9"1`2(/$2,-F9F:09F:0
+M05154TB![,````!)B?Q(BV]02(M=>$B+16A(C;0DD````$B+O8````#_4'A(
+MBT,(2(UT)!!(BWL0_U`X2(U,)`Q(C50D"$B-="0$2(G?Z,U)__\/MH0DG```
+M`/:$))H````"=`N)P@-4)`SK"69FD(G"`U0D"$&`O"2J`````74DBW0D!$C'
+MQP````"X`````.@`````2(GNOQL```#H`````.LBBW0D!$C'QP````"X````
+M`.@`````2(GNOQH```#H`````$F+="182(M]`$B!QY````#H`````$R)Y^@`
+M````2('$P````%M=05S#2(/L*$B)7"0(2(EL)!!,B60D&$R);"0@2(G]28GT
+M2(L_BW4TZ`````!(B<-(A<!U-$''1"10_?___TG'1"18`````$V)9"1@2<=$
+M)&@`````28UT)%A)BWPD$.@`````Z7X"``!(B6A0QH"H`````T&!?"080O\`
+M``^4P$0/MNA%A>UT$4F+1"0H@'@/]`^4P`^VP.L/28M$)"B`>`KT#Y3`#[;`
+MA<`/A.,```!(BWT`2(''D````.@`````2(G%2(7`=!M%A>UT"TF+="0H2(/&
+M%.M+28MT)"A(@\80ZT!!QT0D4/____])QT0D6`````!-B60D8$G'1"1H````
+M`$F-="1828M\)!#H`````$B)W^@`````Z<<!``!F9F:0N@`"``!(B>_H````
+M`$B):UB`BZD````$2(FKH````,:#FP```/1FQX.<`````0!(QX/`````````
+M`$''1"10`````$G'1"18`````$V)9"1@2<=$)&@`````28UT)%A)BWPD$.@`
+M````Z4T!``!FD$6%[0^$F@```$F+5"0H@'H2`74<@(NI`````DF+1"0P2(/`
+M%$B)@Z````#K&V9FD(!Z$@)U$H"+J0````1(C4(42(F#H`````^V0@^(@YL`
+M```/MT((9HF#E`````^W0@IFB8.6````#[="#&:)@Y@````/MD(.B(.:````
+M#[="!&:)@Y`````/MT(&9HF#D@````^W0A!FB8.<````Z9D```!)BU0D*(!Z
+M#`%U&8"+J0````))BT0D,$B#P!!(B8.@````ZQF`>@P"=1.`BZD````$2(U"
+M$$B)@Z````"0#[9""HB#FP```&8/MD(&9HF#E````&8/MD('9HF#E@```&8/
+MMD((9HF#F`````^V0@F(@YH```!F#[9"!&:)@Y````!F#[9"!6:)@Y(```!F
+M#[9""V:)@YP```!,B6-82,>#P`````````!(B=_H`````$B+7"0(2(ML)!!,
+MBV0D&$R+;"0@2(/$*,-F9F:00(@U`````,-F9F:09F9FD$B+5QA(C4<82#G0
+M="M(B<%(C8)P_/__@+J`_/__`740]D+P`70*A?9T$__.9F9FD$B+$D@YT778
+MN`````#SPY!(@^P82(E<)`A,B60D$$F)_$B+7UA(BWL0_U,(28L\)$B!QQ`!
+M``!(B=[H`````$R)Y^@`````2(M<)`A,BV0D$$B#Q!C#9F9FD&9FD&9FD$B#
+M[`A(BT=8_PB#.`!U)DC'1R@`````2(E_,$C'1S@`````2(UW*$B+/TB#QUCH
+M`````.L%Z`````!(@\0(9I##9F9FD&9F9I!F9F:09F:02(/L&$B)'"1(B6PD
+M"$R)9"002(M'4$B+D(`"``!(.4((=0U(BVH0ZPMF9F:09F:02(MJ"$B%[71K
+M]H6``P```71B3(MG6`^VGZD```#`ZP2#XP/H`````(MU-$B+?0#H`````$B)
+MQ\'C!`^V@*D```"#X,\)V(B'J0```$B);U#&AZ@````$3(EG6,:'J@````!(
+MQX?``````````.@`````ZP7H!____TB+'"1(BVPD"$R+9"002(/$&,-F9F:0
+M2(/L&$B)'"1(B6PD"$R)9"002(G]08GT2(G3_P*+=S1(BS_H`````$B)QT&#
+M_`$9P(/``H/@`\'@!`^VEZD```"#XL\)PHB7J0```$B);U#&AZ@````$2(E?
+M6,:'J@````"`?1`$=AA(@[V``@```'0.2,>'P`````````#K#)!(QX?`````
+M`````.@`````2(M]`.@`````2(L<)$B+;"0(3(MD)!!(@\08PV9F9I!(@^PX
+M2(E<)`A(B6PD$$R)9"083(EL)"!,B70D*$R)?"0P28G]28GW28G62(V_$`$`
+M`.@`````2(G%2(7`=1E(Q\<`````N`````#H`````$R)]T'_U^MMQP`!````
+M3(EX"$R)<!!(QT`8`````$R):"!)BUT828U%&$@YV'0H28G$2(V[</S__X.[
+MH/S___]T#4B)ZKX`````Z+'^__](BQM).=QUV_]-`(-]``!U%4F-O1`!``!(
+MB>[H`````$R)]T'_UTB+7"0(2(ML)!!,BV0D&$R+;"0@3(MT)"A,BWPD,$B#
+MQ#C#9F9FD&9F9I!(@^PX2(E<)`A(B6PD$$R)9"083(EL)"!,B70D*$R)?"0P
+M28G]28GW28G62(V_$`$``.@`````2(G%2(7`=1E(Q\<`````N`````#H````
+M`$R)]T'_U^MXQP`!````3(EX"$R)<!!(QT`8`````$R):"!)BUT828U%&$@Y
+MV'0N28G$2(V[</S__X"[@/S__P%U$_9#\`%T#4B)ZKX!````Z+O]__](BQM)
+M.=QUU?]-`(-]``!U&DF-O1`!``!(B>[H`````$R)]T'_UV9FD&:02(M<)`A(
+MBVPD$$R+9"083(ML)"!,BW0D*$R+?"0P2(/$.,.0D)"0D)"0D)"0D)"02(N'
+MV`,``$B%P'0F9F9FD$B+5@A(.1!S#TB+%D@Y4`AV!K@!````PTB+0!!(A<"0
+M==Y,BX>@`P``2(V'H`,``$PYP'1#2(G"28U(Z("YJ`````!U*T@/MX&8````
+M2`.!D````$@Y!G,72(N!D````$@Y1@AV"K@!````PV9F9I!-BP!,.<)UP$R+
+MA[`#``!(C8>P`P``3#G`=$](B<=FD$F-2.@/MH&H````A,`/E,(\@`^4P`G0
+MJ`%T)T@/MX&8````2`.!D````$@Y!G,32(N1D````$@Y5@AV!K@!````PTV+
+M`$PYQW6VN`````"0PV9F9I!F9F:09F9FD&9FD$B#[!!(B1PD2(EL)`A(B?U(
+MB?/HZ/[__X7`=#1(@WLH`'0E2(G92(V5X`,``$B#O>`#````=`Y(BP)(C5`0
+M2(-X$`!U\DB)"KC_____ZQB02(N%V`,``$B)0Q!(B9W8`P``N`````!(BQPD
+M2(ML)`A(@\00PV9F9I!F9F:09F:02(V7V`,``$@YM]@#``!T#4B+`DB-4!!(
+M.7`0=?-(BT802(D"2,=&$`````!,C4X83(N'T`,``$PY3AAT(4B+1AA)BTD(
+M28L03(E`"$F)`$B)$4B)2@A,B4X838E)"$B+!\=`:`$```##9F9FD&9FD%-(
+MBT=0_X"$`P``2(G[2(-_>`!T.4B+1WA(QT`H`````$B+1WA(B7@P2(M'>$C'
+M0#@`````2(MW>$B+?U#H`````(7`=1!(BT-X2(E#<$B)W^@`````6\-F9F:0
+M9F9FD$B+CI````!(#[>6F````$@!RDB+A]@#``!(A<!T2TR-1ACVAJD```!`
+M=`:#>$``="](.49P="E(.1!S)$@Y2`AV'DB#P!A(BU`(3(E`"$B)1AA)B5`(
+M3(D"N`$```##D$B+0!!(A<!UN4B#?G``=5'VAJD```!`=4A(BX?@`P``2(7`
+M=#Q(C7X89F9FD&9FD$@Y$',C2#E("'8=2(/`&$B+4`A(B7@(2(E&&$B)5PA(
+MB3JX`0```,-(BT`02(7`=<^X`````,-F9I!F9I!F9I!(@^P82(E<)`A(B6PD
+M$$B)^TB+;U"`OZ@`````#X6?````2(G^2(GOZ`/___^%P`^%:P$``(!]$`0/
+MAH(```!(@[V``@```'0M2(N%@`(``("XJP````!U'?:#J0````AU%$B)W^@&
+M"```A<`/A2X!``!(BVM0@'T0!'9%]H.I````!'0\#[:%80(``*@@=#&#X-^(
+MA6$"``#H`````(E%/("-8`(```1(BP/'@)0"!``!````2(M%4$@+15A(B450
+M2(V-H`,``$@YC:`#``!U+TB+`\=`:`$```!(C4,82(N5H`,``$B)0@A(B5,8
+M2(E("$B)A:`#``#IH@```&:0@WMH`'5-2(N-J`,``$B-<>B#?F@`>1Q(C4,8
+M2(M1"$B)00A(B4L82(E0"$B)`O]&:.MM2(U#&$B-E:`#``!(BTH(2(E""$B)
+M4QA(B4@(2(D!ZTV#>V@`?B=(C4,82(V-H`,``$B+E:`#``!(B4((2(E3&$B)
+M2`A(B86@`P``ZR!(C4,82(V5H`,``$B+2@A(B4((2(E3&$B)2`A(B0%FD$B+
+M7"0(2(ML)!!(@\08PY!(@^P(]H>``P```74ZQH:J`````O^'B`,``$B-1AA(
+MC9>P`P``2(M*"$B)0@A(B5882(E("$B)`4B)]^@`````N`````#K8(._B`,`
+M``!T"XN'Q`,``#M&:']']H>``P``&'4^BT9HB8?$`P``_X>(`P``2(U6&$B-
+MA[`#``!(BT@(2(E0"$B)1AA(B4H(2(D12(M'"$B)]_]0*+@`````ZP6X`0``
+M`$B#Q`C#9F9FD$B#/P!U"DB)=PA(B3?#9I!(BT<(2(EP$$B)=PC#9F:02(/'
+M6.@`````\\-F9I!FD$%7059!54%455-(@^PH28G_2(U'6$B)1"082(U/2$B)
+M3"002(U'.$B)1"0(0<=':`````#K!DB+>`C_$$B+3"082(L12#M1"'462,=!
+M"`````!(QP$`````ZQ%F9I!FD$B+0A!(BTPD&$B)`4B%TG0(2,="$`````!(
+MB=!(A=)UM<=$)"0`````38MW&$F-1QA,.?`/A),!``!)C:YP_/__2+@@````
+M_____TF%1O"X`0````]$1"0DB40D)$R-I:`#``#K+TB)WDB)[^A/_O__A<!T
+M($B-0QA(BY6@`P``2(E""$B)4QA,B6`(2(F%H`,``.LSN`````!,.:6@`P``
+M=!U)BP0D2(M("$B+$$B)2@A(B1%(B0!(B4`(2(/H&$B)PTB%P'6>3(VMR`,`
+M`.M+28G<2(-[>`!T.4B+0WA(QT`H`````$B+0WA(B5@P2(M#>$C'0#@`````
+M2(MS>$B+>U#H`````(7`=1!(BT-X2(E#<$R)Y^@`````N`````!,.:W(`P``
+M=!U)BT4`2(M("$B+$$B)2@A(B1%(B0!(B4`(2(/H&$B)PTB%P'6"2(.]X`,`
+M``!T9$R-I>`#``!(BYW@`P``2(7;=%%F9F:02(G>2(GOZ'7X__^%P'0&3(UC
+M$.LO2(M#$$F)!"1(BX78`P``2(E#$$B)G=@#``!(C7,H28U_6.@`````0<='
+M:`$```!)BQPD2(7;=;--BS9)C4<83#GP#X5M_O__@WPD)``/A9\```!!@[^4
+M`@0``'030<>'E`($``````!,B?_H`````$B+7"00ZP9(BW@(_Q!(BQ-(.U,(
+M=1%(QT,(`````$C'`P````#K!TB+0A!(B0-(A=)T"$C'0A``````2(G02(72
+M=<1(BVPD".L(2(G?Z`````"X`````$DY;SAT'4B+10!(BT@(2(L02(E*"$B)
+M$4B)`$B)0`A(@^@82(G#2(7`=<A)@W]8``^%2OW__T&#?V@`#X4__?__2(/$
+M*%M=05Q!74%>05_#9F9FD%-(BQ](@WM(`'4'Z`````#K&TB-1QA(C5,X2(M*
+M"$B)0@A(B5<82(E("$B)`4B)W^@`````6\-F9I!F9I!F9I!32(G[2(N'@```
+M`$B%P'042,>'@`````````!(B[>(````_]!(BX/`````2(E#*$B)6S!(QT,X
+M`````$B-<RA(BSM(@\=8Z`````!;PV9FD$B#[!A(B5PD"$B);"002(G[2(MO
+M4.@`````2(U#&$B+2`A(BU,82(E*"$B)$4B)0QA(B4`(_XV(`P``_XV$`P``
+M2(-[>`!T#$B+<WA(B>_H`````$B+7"0(2(ML)!!(@\08PV9F9I!F9I!F9I!F
+M9I!!54%455-(@^P(2(GU2(M/6$B+F;````!$BZ>0````1"NAD````$'!Y`E$
+M#[>OF````$'!Y0E(A=MT$P^V@:D```"#X`%F#[;`9CG0=21(B>M(@[FX````
+M`'002(GN2(G/_Y&X````A<!U![@`````ZW^Y`````(L#B<)$.>!W$`'12(/#
+M$(L3C0011#G@=O!!*<Q$B>&^`````&9FD&:02&/&2(G"2,'B!(G(2`-#"$B)
+M1"H(BP,IR(D$*D0YZ',82(/#$+D`````QT0J!`````!!*<7_QNO'2&/&2,'@
+M!$2)+"C'1"@$`0```+@!````2(/$"%M=05Q!7<-F9F:055-(@^P(2(GZ2(M?
+M6$B+=U!(BZZ``@``#[>#F````$&)P&9$*X>8````@+^J`````75M2(N#D```
+M`$@YAY````!U7;\`````BTI`2(M"2$B%R70+0(@X2/_`2/_)=?5(.74(=0M(
+MBT40ZPEF9I!FD$B+10A(B4)02(N%H````$B)@I````!F1(F"F````,:"J@``
+M``!(B=?H`````.LZD,:#J``````/MH*J````B(.J````2(M["$B)UN@`````
+M2(M#"/]("$B+10C_@(@#``!(B=_H`````$B#Q`A;7<-(@^PH2(E<)`A(B6PD
+M$$R)9"083(EL)"!(B?M(BT]02(NI@`(``$R+IY````!(#[>7F````$P!XD&]
+M`````+@`````2(&_P``````````/A$P!``"X`````$@Y30@/A3T!``"`?2@`
+M=!1,.:6@````=BU(.96@````<D;K&$@YE:````!S&4&]`0```$PYI:````!W
+M++@`````Z0$!``!(BT402(E#4/^)A`,``$B+11#_@(0#``"X`````.G?````
+M2(M#"/]`"$B+>PCH`````$B)QTB+`TB)!TB+0PA(B4<(BT-HB4=H187M=`9(
+MBT40ZP1(BT4(2(E'4$B)7UA(QX>X`````````$C'A\``````````3(FGD```
+M`$B+A:````!F1"G@9HF'F````$C'A[``````````QH>J``````^V@ZD```"(
+MAZD```!(@WMP`'0*2(M#<$B)1W#K"$C'1W`!````2(U#&$B+50A(@<*P`P``
+M2(M*"$B)0@A(B5,82(E("$B)`<:#J````(#H`````+@!````9F9FD&9FD$B+
+M7"0(2(ML)!!,BV0D&$R+;"0@2(/$*,.0D)"0D)"0N@````!(A?]T$69FD&9F
+MD/_"2(U'_T@AQW7UB=##9I!(@^P82(D<)$B);"0(3(ED)!!(B?M,BV<82(-_
+M4`!U(/:'8`(```)T%TB+1PB`>`L!=0T/MF@*ZPQF9F:09F:0O0````!(BT-8
+M2(G'2`M[4.@``````<5(BT,(#[9`"CGH?0V`HX`#``#^ZU1F9F:0@(N``P``
+M`4B#>U``=$)(BT-02(G'2#-[6'4B@*-@`@``_>LL2,?`_O___TC3P$DA1"18
+M3(GGZ`````#K1DB%>U!T#8"+8`(```)F9I!F9I!-A>0/E<(/MH.``P``A<)T
+M(KD`````08!\)$0`=A5FD`^VP4DY7,1@=*K_P4$X3"1$=^U(BQPD2(ML)`A,
+MBV0D$$B#Q!C#9F9FD&9FD&9FD%532(/L"$B)_4B+7QBY`````$@/MD-$2(G"
+M2(/X`'8/2#ELRV!T"$C_P4@YRG?QN`$```!(T^!("4-82(G?Z`````#V@X`#
+M```!#X7S````2(-[&`!T$$B+0QA(BT`(2(G?_U`PZPA(B=_H`````+D`````
+M@'M$`'1S9F:09F:02(M4RV!(A=)T5O:"@`,```%T38!Z$`1V1P^VLF`"``")
+M\(/@CXB"8`(``$@YZG40B?"#X(R(@F`"``#K(V9FD/:"8`(```%T%P^V@F`"
+M``"#X/Z#R`*(@F`"``!F9F:02/_!2`^V0T1(.<AWDTB#NX`"````#X1Q`0``
+M2(N#@`(``$B#>`@`#X1?`0``2(-X$``/A%0!``!(.5@(=09(BU@0ZPM(BX.`
+M`@``2(M8"("C@`,``/Y(B=_H`````.DI`0``O0`````/MH-@`@``@^"_B(-@
+M`@``J"!T%(/(@(B#8`(``$C'@V@"````````#[:38`(``(G0@^#^B(-@`@``
+M2(M#6$CWT$B%0U!U"XG0@^#LB(-@`@``2(-[&`!T7TB+<QB`IF`"``#^N0``
+M``"`?D0`=$E(BU3.8$B%TG0P]H*``P```70G@'H0!'8A]H)@`@```708#[:"
+M8`(``(/(`H/@KHB"8`(``+T!````2/_!2`^V1D1(.<AWN6:02(.[@`(```!U
+M.4B#>Q@`=`Y(BT,82(.X@`(```!U)(-[,`!Y$4B#>Q@`=!=(BT,8@W@P`'@-
+MO@````!(B=_H`````/:#8`(```1T"DB)W^@`````ZP^%[70+2(G?9F:0Z```
+M``"`BV$"```@2(/$"%M=PV9F9I!F9I!F9I!F9I!54TB#[`A(B?.)U8G02(T$
+M0`^V=,8AZ`````!)B<&X`````$V%R0^$7@$``$&`H8`#``#^#[9#%T&(@8$#
+M``!-C4$XBT,$08E!.(N#Q@```$&)0`@/MH/%````08A`$(GI2(TT24B--/-(
+MC7X0#[97%<#J`H/B`4$/MH`H`@``@^#^"=!!B(`H`@``2(M&*4F)@#`"``"+
+MA(N]````08E`!`^V1B1!B$`-#[;(N`$```#3X&9!B4`.2(M'"4F)02@/MD8B
+M08A`#$C'P/____]!@'@,/W<000^V2`RX`0```$C3X$C_R$F)0"!(BT-)28F`
+M.`(``$B+0U%)B8!``@``BT-908F`4`(``$B+@YT```!)B8"4`@``2(N#I0``
+M`$F)@)P"``!(BT-=28F`5`(``$B+0V5)B8!<`@``2(M#;4F)@&0"``!(BT-U
+M28F`;`(``$B+0WU)B8!T`@``2(N#A0```$F)@'P"``!(BX.-````28F`A`(`
+M`$B+@Y4```!)B8",`@``3(G(2(/$"%M=PV9F9I!F9F:09F9FD&9FD$B![%@"
+M``!(B9PD*`(``$B)K"0P`@``3(FD)#@"``!,B:PD0`(``$R)M"1(`@``3(F\
+M)%`"``!)B?U(C6PD($R+-TB+=T!(BW\X0;@!````2(GIN@$```#H`````(%\
+M)"#T%GA:=1&^``(``$B)[^@`````A,!T"KK_____Z>X%``!(B>_H`````+K_
+M____@'TA!`^&UP4``(!](D!W!H!].D!V"[K_____Z<$%``"02`^W12=("X6M
+M````2(E$)`A)BUX828U&&$@YV`^$T@```$R-NW#\__^`NX#\__\$#X:N````
+M2(.[B/S__P`/A:````"+@ZC\__\[100/A9$```#&1"00`/9#\`%T)TB+?"0(
+M2`N[P/S__^@`````2(N3>/S__P^V4@HYT'X'QD0D$`'K3H!]&`%V2$@/MD4C
+M28M<QV!(A=MT.?:#@`,```%T,$@/MWT_2`N]M0```$@+>U#H`````$B+4P@/
+MME(*.="X`0````^V5"00#T_0B%0D$(!\)!``=#M,B?_H`````.L02(L;28U&
+M&$@YV`^%+O___[H`````2(GN3(GWZ*S\__])B<>Z_____TB%P`^$JP0``$V-
+M9SA!#[:$)"@"``")P=#I#[95)8/B`0G*@^(!`=*#X/T)T$&(A"0H`@``28M4
+M)!A!@'PD##]W*$$/MDPD#+@!````2-/@2/_(2"-$)`A("=#K%4F)M"1(`@``
+MZ9X```!(BT0D"$@)T$F)1"0800^VE"0H`@``@^(!#[9%)<#H`H/@`3G"="M!
+M#[:4)"@"``"#XOY!B)0D*`(``$F+1PB`>`H`=`V)T(/(`D&(A"0H`@``@WT(
+M``^$5`$``$&`C"0I`@``!$F+M"1(`@``2(7V#X7%````28M>*$F-1BA(.=AT
+M&TB)PDB-<^B+0^@[10@/A%W___](BQM(.=IUZ$F#O"1(`@````^%C@```$F-
+MOM````#H`````$F)A"1(`@``2(G&NO____](A<`/A'@#``"Y`````+JP````
+M28N$)$@"``!F9I!F9I"("$C_P$C_RG7V2(U6&$F-1BA(BT@(2(E0"$B)1AA(
+MB4H(2(D1BT4(B09(BT4,2(F&H`````^V112(AJH```#V118"=`Q)BX0D2`(`
+M`,9`*`&`?B@`=!-(BTT,2#F.H````'<3@'XH`'4B2(M%#$@YAJ````!S%4B+
+M10Q(B8:@````#[9%%(B&J@```/9%%@1T#4B#?A``=1%,B7X0ZPM(@WX(`'4$
+M3(E^"$B+5A!(.58(=1)(QT8(`````+K_____Z9H"``!!BT0D!#N%O0```'07
+M08",)"@"```"2<>$)#`"````````ZQ9(BTTI23F,)#`"``!V"$F)C"0P`@``
+M]D46`70(08"/@`,```(/MD4CB$0D$(!]&`$/AHD!```/ML!)BUS$*$B%VW4P
+MN@$```!(B>Y,B??H$_K__TB)P[K_____2(7`#X02`@``3(EX&$@/MD0D$$F)
+M7,=@]D46`70'@(N``P```@^VDV`"``")T=#I#[9%/8/@`0G(@^`!`<"#XOT)
+MPHB38`(``$@/MT4_2(G"2`N5M0```(![1#]W$@^V2T2X`0```$C3X$C_R$@A
+MPD@)4U`/MI-@`@``@^(!#[9%/<#H`H/@`3G"="4/MI-@`@``@^+^B)-@`@``
+M2(M#"(!X"@!T"XG0@\@"B(-@`@``#[95.XA4)!`/ML*Z_____TB#?,-@``^%
+M3@$``$@/MD0D$$R);,-@28E=&(M#/#N%P0```'04@(M@`@```DC'@V@"````
+M````ZQ1(BTU!2#F+:`(``'8'2(F+:`(``$C'P/[___\/MDPD$$C3P$@A0UA(
+MB=_H`````/:#8`(``!!T$$C'@V@"````````Z8@````/MH-@`@``J"!T?8/(
+M@(B#8`(``$C'@V@"````````ZV=(#[9$)!!-B6S'8$V)?1A(Q\#^____#[9,
+M)!!(T\!)(4=83(G_Z`````!!]H=@`@``$'0-2<>':`(```````#K)D$/MH=@
+M`@``J"!T&H/(@$&(AV`"``!)QX=H`@```````&9FD&:00?:'@`,```%T/DF#
+MOX`"````=#1)BX>``@``2(-X"`!T)DB#>!``=!],.7@(=09,BW@0ZPM)BX>`
+M`@``3(MX"$R)_^@`````N@````!F9I")T$B+G"0H`@``2(NL)#`"``!,BZ0D
+M.`(``$R+K"1``@``3(NT)$@"``!,B[PD4`(``$B!Q%@"``##9F:09F:02(M7
+M&+D`````@'I$`'88D`^VP4@Y?,)@=08/ML'#9I#_P3A*1'?IN/\```!F9F:0
+MPV9F9I!F9F:09F9FD&9FD$%505154TB![`@"``!)B?Q!O0````!(B>5(BT<X
+M]H"``P```0^$P0(``$B+7QA(A=MT#DB#>Q@`=`=)B=U(BUL8N0````"Z``(`
+M`$B)Z&:0B`A(_\!(_\IU]L=%`/06>%JX`````$B%VW0#BT,XB44$N`````!(
+MA=MT`XM#0(F%Q@```$'VA"2``P```G0$@$T6`;@`````2(7;=`E)@_T!&<"#
+MP`*(11A(A=L/A'X!``!(@[N``@```'1$2(N+@`(``(L!B44(2(N!H````$B)
+M10P/MD$H@^`!`<`/ME46@^+]"<*(519(.5D0=0B)T(/(!(A%%@^V@:H```"(
+M110/MD-(B(7%````#[:#@0,``(A%%TB+0RA(B449#[9#$(A%(0^V0T2(12)-
+MA>U,B>=)#T7]Z(?^__^(12,/MD-%B$4D#[:#8`(``(/@`<'@`@^V526#XOL)
+MPHA5)?:#8`(```)T"(G0@\@!B$4E2(M#4$B)A:T```!(BT-09HE%)TB+@V@"
+M``!(B44IBT,\B86]````2(N#<`(``$B)14E(BX-X`@``2(E%48N#B`(``(E%
+M64B+@\P"``!(B86=````2(N#U`(``$B)A:4```!(BX.,`@``2(E%74B+@Y0"
+M``!(B45E2(N#G`(``$B)16U(BX.D`@``2(E%=4B+@ZP"``!(B45]2(N#M`(`
+M`$B)A84```!(BX.\`@``2(F%C0```$B+@\0"``!(B865````387M='])BT4H
+M2(E%,4$/MD40B$4Y00^V142(13I,B>?H:_W__XA%.T$/MD5%B$4\00^VA6`"
+M``"#X`'!X`(/ME4]@^+["<*(53U!]H5@`@```G0(B="#R`&(13U)BT502(F%
+MM0```$F+15!FB44_28N%:`(``$B)14%!BT4\B87!````2(GOZ`````"^``(`
+M`$B)[^@`````]]B(115)BW0D0$F+?"0X0;@`````2(GIN@$```#H`````$B!
+MQ`@"``!;74%<05W#9F9FD&9FD%-(B?OH]_S__TB+>SCV1V00=`7H`````%O#
+M9F:09F:055-(@^P(2(G[@'\0!'8'@*=@`@``^_:#@`,```%T<8![$`1V8KT`
+M````@'M$`'1@2&/U2(-\\V``=$!(BTSS8`^VDX`#``"#X@(/MH&``P``@^#]
+M"="(@8`#``!(BU3S8(!Z$`1V!P^V0TB(0DA(8\5(BWS#8.@`````_\4/MD-$
+M.>A_J^L)2(G?Z%'___^02(/$"%M=PV9FD&9FD&9FD$%455-(B?M(@W\8`'0-
+M9I!(BUL82(-[&`!U]>@`````B4,X3(NC@`(``$V%Y'0Y23E<)`AU"DF+;"00
+MZPAF9I!)BVPD".@`````08D$)$B%[705Z`````")13@[0SAT\TB)[^@`````
+M2(G?Z`````!(BT,(2(-X8`!T!DB)W_]08%M=05S#9F9FD&9FD&9FD$R+1CA-
+MA<!T<4F+0!A(A<!T8$B)P4B#>!@`=%9F9F:02(M)&$@Y^74'N`$```##D+H`
+M````@'E$`'0L#[9Q1)!(8\)(BT3!8$B%P'04@'@0!'8.2#GX=0FX`0```&9F
+MD,/_PCG6?]E(@WD8`&9F9I!UKDV+`$V%P'6/N`````"0PV9F9I!F9F:09F9F
+MD&9FD$%7059!54%455-(@^P(2(G]#[971$B+1P@/MD`**<)(8])(BT<H2(G1
+MN@````!(]_%)B<9)Q\?_____0;T`````2(L'2(M8&$B#P!A(.=AT7TR-HW#\
+M___V0_`!=$*`NX#\__\!=3GV@]3\__\$=#!,B>9(B>_H]?[__X3`=2%,.;.P
+M_/__<AA,.;NP_/__<P],B[NP_/__38GE9F:09I!(BQM(BT4`2(/`&$@YV'6A
+MN`````!-A>UT1O:%80(```)U$KH`````3(GV3(GOZ`````#K*TF+13A(A<!T
+M$6:02(-X&`!U#4B+`$B%P'7Q3(GHZPRX`````&9F9I!F9I!(@\0(6UU!7$%=
+M05Y!7\.005154TB)^TF)]+T`````@']$``^$U0```&9F9I!F9I!(8\5(@WS#
+M8`!T$DB+1,-@]H"``P```0^%HP```$R)YDV%Y'4;2(G?Z*/^__](B<9(A<`/
+MA((```!F9F:09F:02(E>&$ACQ4B#?,-@`'0-2(M$PV!(QT`8`````$ACQ4B)
+M=,-@#[:38`(``(G0@\@*B(-@`@``2,>#:`(```````"H('0+B="#R(J(@V`"
+M``"X`0```(GI2-/@2`E#4$CWT$@A0UA-A>1U"K\'````Z`````"`BV`"```$
+M387D=0[_Q0^V0T0YZ`^/,O____:#8`(```AT"4B)W^@`````D%M=05S#9F9F
+MD&9F9I!F9I!54TB#[`A(B?M(B?7H/_W__[K_____A,!U:P^V4T1(BT,(#[9`
+M"BG"2&/22(M#*$B)T;H`````2/?Q]H-A`@```G4EN@````!(B<9(B>_H````
+M`+K_____2(7`="A(B<9(B=_H`````/:#8`(```1T#TB)W^@`````9F9FD&9F
+MD+H`````B=!(@\0(6UW#9I!(@^PH2(E<)`A(B6PD$$R)9"083(EL)"!(B?T/
+MMD<0@^@%@_@%#X?'`0``B<#_),4`````0;T`````0;P`````@']$`'1,26/$
+M2(M<Q6!(A=MT,X![$`1V+4B)W^@`````]H-@`@``!'0'@(U@`@``!`^V@V`"
+M``"#X`,\`K@!````1`]$Z$'_Q`^V141$.>!_M$6%[0^$5P$``("E8`(``/Y!
+MO`````"`?40`#X1``0``26/$2(M<Q6!(A=MT,8![$`1V*_:#8`(```%T(@^V
+M@V`"``"#X+Z#R`*(@V`"``!(B=_H`````&9F9I!F9I!!_\0/MD5$1#G@?[;I
+M\0```$@/MT=&2/?82"&':`(``/:'@`,```%T%TB+1UA(]]!(A4=0=`J`CV`"
+M```"9F:02(-]6`!U!TB#?5``="&`?1`*=10/MDU$_\FX`0```$C3X$@Y15!T
+M!X"E8`(``/Y(@WU8`'0Z@(UA`@``($B#?5@`="SVA8`#```!="-(@WT8`'0-
+M2(M%&/:`@`,```%T#[X`````2(GOZ`````!FD/:%@`,```%T2?:%80(```1U
+M0/:%8`(```-T-TB#?5``=`U(BT582/?02(5%4'0C2(-]&`!T#4B+11CV@(`#
+M```!=`^`C6`"```(2(GOZ`````!(@WT8`'47]H5@`@``!'0.2(GOZ`````!F
+M9I!F9I!(BUPD"$B+;"003(MD)!A,BVPD($B#Q"C#9F9FD&9FD$B#["!(B5PD
+M"$B);"003(ED)!A(B?M(B?5)B=2`?Q`$#X:*````QP0D`````,=$)`0!````
+MN@````"`?T0`=!</MD]$2&/"2(M\PV!(A?]U2__".=%_[4B+4PB`>@D`="$/
+MMD-$#[92"BG0#Z]$)`2)1"0$#[=#1CL$)`]&!"2)!"1(A>UT!HL$)(E%`$V%
+MY'0XBT0D!$&)!"3K+DB-5"0$2(GFZ`````#KK&9FD&:02(7V=`;'!@````!-
+MA>1FD'0(0<<$)`$```!(BUPD"$B+;"003(MD)!A(@\0@PV:04TB#[!!(B?M(
+MBW\(2(U4)`Q(C70D".@`````2(M[$$B-5"0$2(GFZ`````"+1"0,.T0D!`^7
+M0RB+1"0(.P0D#T($)`^O1"0,9HF#J````&:%P'4)9L>#J````(``2(/$$%O#
+M9F9FD&9FD&9FD&9FD%-(BU\(2(M/$$B%VP^4PDB%R0^4P`G0J`%T)4B%VW0'
+M@*.``P``_DB%R70'@*&``P``_L:'JP````'K5F9F9I#V@X`#```!=`GV@8`#
+M```!=1Z`H8`#``#^@*.``P``_L=#,/_____&AZL````!ZR+&AZL`````@(MA
+M`@``!(")80(```3H`````$B)W^@`````6\-F9F:09F9FD&9F9I!(@^P82(D<
+M)$B);"0(3(ED)!!(B?M(B?4/MD<0.D80=0\/MT9$9CE'1'0/9F:09I"X`0``
+M`.F]````0;P`````@']$``^$J````$ECQ$B+?,-@2(MTQ6!(A?\/E<!(A?8/
+ME<(/ML"%PG1O@'\0!'8F@'X0!'8:Z`````"$P&9FD'1@N`$```#K;F9F9I!F
+M9I"`?Q`$=SR`?A`$=S9(BT8X2#E'.'4E2(M72$B+1DA(BT@(2#E*"'432(M(
+M$$@Y2A!W"?:#8`(```-T%[@!````ZR6X`0```.L>N`$```!FD.L50?_$#[9#
+M1$0YX`^/6/___[@`````2(L<)$B+;"0(3(MD)!!(@\08PV9FD&9FD%532(/L
+M"$B+7QA(C4<82#G8=$5(B<5(C;MP_/__@+N`_/__!'8J]H/0_O__!'0A2(.[
+MB/S__P!T$F9F9I!F9I!(BW\82(-_&`!U]>@`````2(L;2#G==;Y(@\0(6UW#
+MD(L%`````(V0_P\``(/X_P].PL'X#,-F9F:09F:09F:0\\-F9F:09F9FD&9F
+MD&9FD$B+AX@!``!(B4882(FWB`$``,-F9F:09F:09F:09F:02(/L"$B#OY`!
+M````=2B+AW`!```[!G(.2(M^$/]6"+@`````ZRQ(B;>8`0``2(FWD`$``.L2
+M2(N'F`$``$B)<"!(B;>8`0``Z`````"X`0```$B#Q`C#9F:09F:09F:02(/L
+M"$B!QV@!``#H`````$B#Q`C#9F9FD&9F9I!F9I"X`````,-F9F:09F:09F:0
+M2(/L"$B!QV@!``#H`````$B#Q`C#9F9FD&9F9I!F9I!!5%5328G\QX>X`0``
+M`````$B+KY`!``!(A>T/A(\```!!BX0D<`$``#M%`')"23FL))@!``!U&DG'
+MA"28`0```````$G'A"20`0```````.L,2(M%($F)A"20`0``2,=%(`````!(
+MBWT0_U4(ZS"028N<)(@!``!(A=MT%69FD(MU`$B+._]3"$B+6QA(A=MU[D&+
+MA"1P`0``.T4`<D5)BZPDD`$``$B%[0^%<?___T&!O"1P`0``?P$``'<F28N<
+M)(@!``!(A=MT&69FD&:0O@````!(BSO_4PA(BUL82(7;=>Q;74%<PV9F9I!F
+M9I!32(G[@[^X`0```'4W2,>'H`$```````!(B;NH`0``2,>'L`$```````!(
+MC;>@`0``2(U_6.@`````QX.X`0```0```%O#9F9FD&9FD&9FD%532(/L"$B)
+M_4B+GX@!``!(A=MT%+[_____2(L[_U,(2(M;&$B%VW7L2(-]6``/E<`/ML!(
+M@\0(6UW#D)"0D)#V1Q4$=`2`3Q0$]D<5`70$@$\4`?9')01T!(!/)`3V1R4!
+M=`2`3R0!\\-F9I!F9I#V1R8$=`2`3R4$]D<F`70$@$\E`?9'/@1T!(!//03V
+M1SX!=`2`3ST!\\.0D)"0D)!(@^P(@*>``P``_DB#?Q@`=`Y(BT<82(M`"/]0
+M,&9FD$B#Q`C#9F9FD&9F9I!F9I!32(GZ2(M?6`^VAZH```"(@ZH```!(BWL(
+M2(G6Z`````!(BT,(_T@(2(G?Z`````!;PV9F9I!F9F:09F:09F:02(/L"$B+
+M3UBX`````$B#N;@`````=`E(B<__D;@```!(@\0(PV9F9I!F9F:09F:055-(
+M@^P(2(G[2(MO4$B+1PC_0`A(BW\(Z`````!(B<=(BP-(B0=(BT,(2(E'"(M#
+M:(E':`^V@ZD```"(AZD```!(QX?``````````$B)7UA(BT4X2(E'4`^V@Z@`
+M``"(AZ@```"`NZ@`````=3U(BU5(2(N#D````$@#0@A(B8>0````#[>#F```
+M`&:)AY@```!(BX.P````2(F'L````$C'A[@`````````Z`````!(@\0(6UW#
+M9F:09F:09F:02(/L"$C'QP````#H`````+@`````2(/$",.0D)"0D)!32(GS
+M2,?&`````.@`````2(G'N0$```"Z(`$``$B)WN@`````6\-F9I!F9I!F9I!3
+M2,?&`````.@`````2(G#2(G'Z`````!(B4,@6\-FD$B#[`A(Q\8`````Z```
+M``!(B<=(BW`@Z`````!(@\0(PV9F9I!F9F:09F9FD&9FD$%7059!54%455-(
+M@^P(2(GS08G72(M'4$R+:!A,BW=828M&2$B)!"1)BZZP````1`^V9V!(Q\8`
+M````2(L_Z`````!(BU`@2(7M=!5!#[:&J0```(/@`68/ML!F1#GX=2A(B=5)
+M@[ZX`````'041(GZ2(GN3(GW0?^6N````(7`=0>X`````.MV2(L$)`^W2`S!
+MX0D/MG@(3(M%"(MU`)`Y\8GR#T;11#CG=12)$\=#!`````!,B4,(2(/#$&9F
+MD"G6B=!)`<`IT748_\=!.GU$N``````/1/A!#[=%1HG!P>$)A?9UN8-]!`!U
+M!DB#Q1#KI<=#]`$```"X`0```$B#Q`A;74%<05U!7D%?PV:055-(@^P(2(GZ
+M2(M?6$B+:T@/MD]@2,?`_O___TC3P$@A11B`OZH````!=`T/MH>J````B(.J
+M````2(M["$B)UN@`````2(M#"/]("$B#?1@`=1B`NZH`````=0?&@ZH````!
+M2(G?Z`````!(@\0(6UW#9F9FD&9F9I!F9I!F9I!,BTY02(M.2$R+`0^W<1!`
+M.'D(=0M(#[=!#DD!P.L/D$`X>0AV"$D/MT%&20'`0#AY"'4$9@-Q#$`X>0EU
+M!&8#<0J`>2``=`Y`.'D(<RE`.'D)=Q[K(4`X>0AF9I!F9I!S!69!`W%&0#AY
+M"69FD&:0=@5F00-Q1F:)LI@```!,B8*0````PV9F9I!F9I!F9I!328GY2(N^
+MD````$0/MY:8````3(M&2$&[`````$$/MDE%2(G^2-/N9D''0!```$'&0"`!
+M20^V441(B?!(B=&Z`````$CW\4$/MDE%2-/@28D`20^V441(B?!(B=&Z````
+M`$CW\4&(4`B)T4$/MT%&_\@A^&9!B4`.00^W449F*<))QT`8`````&9$.=)R
+M#69%B5`,0;H`````ZU9F08E0#&9!*=)!NP$```"Z`0```$B)T$C3X$D)0!C_
+MP4$X241U(KD`````08!X(`!T!T'&0"``ZP]!#[=`$&9!`T%&9D&)0!!F13E1
+M1G,'9D4K44;KOK@!````2-/@20E`&$&(2`EF18E0"D2)V%O#9F9FD$B#[$A(
+MB5PD&$B);"0@3(ED)"A,B6PD,$R)="0X3(E\)$!)B?Q,BW]02(M'2$B)1"00
+M@+^H````!`^%TP```$C'0!@`````0;X`````08!_1``/AL@!``!$B?(/MMI-
+MBVS?8$V%[0^$E````$'VA8`#```!#X2&````N`$```!$B?%(T^!(BU0D$$@)
+M0AA)BT0D"/]`"$F+?"0(Z`````!(B<5)BP0D2(E%`$F+1"0(2(E%"$&+1"1H
+MB45H3(EM4,:%J`````1!#[:4)*D```"#XC`/MH6I````@^#/"="(A:D```!(
+MQX7``````````$R)95A(B5U@2(GOZ`````!!_\9%.'=$#X=+____Z0X!``!(
+MB?Y,B?_HT_W__XE$)`Q(BTPD$$B#>1@`=19!QH0DJ@````),B>?H`````.G=
+M````0;X`````08!_1``/ALP```!!#[;&B40D"+@!````#[9,)`A(T^!(BU0D
+M$$B%0A@/A)@```!$B?$/MME-BVS?8$F+1"0(_T`(28M\)`CH`````$B)Q4F+
+M!"1(B44`28M$)`A(B44(08M$)&B)16A,B6U000^VA"2I````B(6I````2,>%
+MP`````````!(QX6X`````````$R)95A(B5U@2(GJ3(GFBWPD".AO_/__@WPD
+M#`!U#TF+A"2P````2(F%L````$B)[^@`````D$'_QD4X=T0/AS?___]F9I!(
+MBUPD&$B+;"0@3(MD)"A,BVPD,$R+="0X3(M\)$!(@\1(PV9F9I!F9I!F9I!F
+M9I!(@^P(2,?'`````.@`````N`````!(@\0(PY"0D)"0D$B#[`A,BT=828N(
+ML````$B%R70200^V@*D```"#X`$/ML`YT'4J28.XN`````!T$TR)QT'_D+@`
+M``"Z`0```(7`=3&Z`````.LJ9F:09F:02(L!2(D&2(M!"$B)1@A(@\802(U!
+M!$B#P1"#.`!TX;H!````B=!(@\0(PV9FD&:02(/L"+D`````O@````"`?T0`
+M=#!!N`$````/ME=$9I")R$B+1,=@2(7`=`GV@(`#```!=0E,B<!(T^!("<;_
+MP3G*=]Q(.7=8=`E(B7=8Z`````!(@\0(PV9F9I!F9F:055-(@^P(2(G[2(MO
+M6`^WCY@```!(BY>0````@+^J`````4`/E,9`#[;V2(M_4.@`````@+VH````
+M`'4)QH6J`````>L-#[:#J@```(B%J@```$B+?0A(B=[H`````$B+10C_2`A(
+MB>_H`````$B#Q`A;7<-F9F:09F9FD&9F9I!(@^P82(D<)$B);"0(3(ED)!!(
+MB?U(BU]82(M[4$R+8TB`O:@````$=2:`O:H````!#X2.`0``#[:%J@```(B#
+MJ@```.E\`0``9F9FD&9FD("]J@````$/A-L```#V@ZD````"='N`NZL`````
+M#X5%`0``2(-_4``/A3H!``!(@W]8``^%+P$``,:#JP````%(@WU@``^4P`^V
+MR$B)36!(BT3/8$B%P'0D2(E%4+@!````2-/@28D$),:%J@````!(B>_H````
+M`.D\`0``2(-]8``/E,`/ML!(B45@Z=<```#V@ZD````$#X3*````@+VJ````
+M`G04QH6J`````$B)[^@`````Z?X```#H$/[__X"[J@````$/A*@````/MDU@
+MN`$```!(T^!).00D#X2%````Z8T```"`NZL`````='</MI6I````]L("=&M(
+M@WU@``^4P`^VR$B)36!(BT3/8$B%P'1#]H"``P```70Z2(E%4(G0@^#]@\@$
+MB(6I````N`$```!(T^!)B00D2,>%P`````````#&A:H`````2(GOZ`````#K
+M8$B#?6``#Y3`#[;`2(E%8`^VA:H```"(@ZH````/MDU@2,?`_O___TC3P$DA
+M!"1(BWL(2(GNZ`````!(BT,(_T@(28,\)`!U&("[J@````!U!\:#J@````%(
+MB=_H`````$B+'"1(BVPD"$R+9"002(/$&,-F9F:02(/L.$B)7"0(2(EL)!!,
+MB60D&$R);"0@3(ET)"A,B7PD,$F)_4R+9U!,BW](2<='"`````"`OZ@````!
+M=0KHW0<``.DD`P``@+^H````!)`/A;\```!)QP<`````O0````!!@'PD1``/
+MAOX"``!FD(GH1`^V\$N+7/1@2(7;#X1_````]H.``P```71VN`$```")Z4C3
+MX$D)!TF+10C_0`A)BWT(Z`````!(B<=)BT4`2(D'28M%"$B)1PA!BT5HB4=H
+M2(E?4,:'J`````1!#[:5J0```(/B,`^VAZD```"#X,\)T(B'J0```$C'A\``
+M````````3(EO6$R)=V#H`````/_%03AL)$0/AV#____I5P(``$F#?"18`&9F
+MD&:0#X7>````28-\)%``9F9FD`^%S@```/:'J0````(/A,$```!)BT0D8/:`
+M@`,```$/A*\```!)BU0D:/:"@`,```$/A)T```!(B<%(B=:`>!`$=01(BT@X
+M@'X0!'4$2(MV.(!Y$`%U:8!^$`%U8TF+A9````!(B<)(*U%82"M&6(NYA`,`
+M`(NVA`,``$B)T4C!^3](,<I(*<I(B<%(P?D_2#'(2"G(2#G"?1&%]D$/E,"#
+M_P4/E\!!(<#K<H7_00^5P(/^!0^6P$$)P.MA9F9FD$F+5"0@@SH`00^4P$$/
+MML")`NM)0;@`````08!\)$0`=CN^`0```$F+1"102(G"20M4)%B)\$2)P=/@
+M2)A(A<)U$0^VP4F+1,1@]H"``P```74*0?_`13A$)$1WUTG'!P````"]````
+M`+X!````B>H/ML))BUS$8$B%VW0K]H.``P```70B00^VE:D```#`Z@)!..@/
+ME,`)T*@!=`M(B?")Z4C3X$D)!__%0(#]`7:^28,_`W4*2<='"`````!FD+T`
+M````B>A$#[;P2XM<]&!(A=L/A)<```#V@X`#```!#X2*````28L'B>E(T^BH
+M`71^28M%"/]`"$F+?0CH`````$B)QTF+10!(B0=)BT4(2(E'"$&+16B)1VA(
+MB5]000^VA:D```"(AZD```!(QX?``````````$C'A[@`````````3(EO6$R)
+M=V!)BX60````2(F'D````$$/MX68````9HF'F````.@`````9F:0_\5`@/T!
+M#X9)____2(M<)`A(BVPD$$R+9"083(ML)"!,BW0D*$R+?"0P2(/$.,.02(/L
+M"$C'QP````#H`````+@`````2(/$",-F9I!F9I!(BT=83(N(H````$V+`0^W
+MCY@```#!X0ET/&9FD&9FD(72=`Q)BP!(B48(ZPMF9I!)BT`(2(E&"$&+00@Y
+MR`]'P8D&QT8$`````$B#QA!)@\`0*<%URL=&]`$```"X`0```,-F9F:09F:0
+M9F:09F:02(/L&$B)'"1(B6PD"$R)9"002(GZ2(M?6$R+8U!(BVM(#[9/8$C'
+MP/[___](T\!((44`@+^J`````70-#[:'J@```(B#J@```$B+>PA(B=;H````
+M`$B+0PC_2`A(@WT``'4O@+NJ`````'4>QH.J`````4@/MX.8````2`.#D```
+M`$F)A"1H`@``2(G?Z`````!(BQPD2(ML)`A,BV0D$$B#Q!C#9F9FD&9F9I!F
+M9I!32(GZ2(M?6$B+<U"`OZH````!=`\/MH>J````B(.J````ZVT/MH>I````
+MJ`)T.8/@_8/(!(B'J0```,:'JP````#&AZH`````2(-_8``/E,`/ML!(B4=@
+M2(M$QF!(B4=0Z`````#K1,:#J@````%(BXYH`@``2#N+D````'422`^W@Y@`
+M``!(`<A(B89H`@``2(M["$B)UN@`````2(M#"/]("$B)W^@`````6\-FD$B+
+M1UA,BXB@````38L!#[>/F````,'A"4B#?V``=`]!BT$,T>B)P$C!X`1)`<"%
+MR70TA=)T"DF+`$B)1@CK"9!)BT`(2(E&"$&+00@YR`]'P8D&QT8$`````$B#
+MQA!)@\`0*<%US,=&]`$```"X`0```,-F9F:09F:09F:09F:005154TB)_DB+
+M;UA,BV502(M=2`^V3V!(Q\#^____2-/`2"$#2(M78`^VAZH```"(1!H02(M]
+M".@`````2(M%"/]("$B#.P`/A<L!``"`>Q`!=`T/MD,0B(6J````ZQ&0@'L1
+M`70*#[9#$8B%J@```("]J@```!`/A>4```"`>Q`!=`J`>Q$!#X75````2(M%
+M"/]`"$B+?0CH`````$B)QDB+10!(B09(BT4(2(E&"(M%:(E&:$B+A9````!(
+MB8:0````#[>%F````&:)AI@```"`CJD````$2(EN6(![$`$/E<`/ML!(B49@
+M2,>&P`````````!(QX:X`````````$B#^`%(&<"#X`A*BT0@8$B)1E!(B??H
+M`````.GX````QH6J````#$$/MH0D8`(``(G"@\H*08B4)&`"``!(BY60````
+M28F4)&@"``!)QT0D4`(```"#R`Y!B(0D8`(``.M[@+VJ``````^%H0```$0/
+MMXV8````3(N=H````+L`````QH6J`````4'!X0ET3?Q%BT,(13G(10]'P4AC
+MRTF+,TC!X01!BT,,T>@!V$C!X`1$B<),BQ0Q2(L\,$B)T4@YTDR)UO.F#Y?"
+M#Y+`.,(/A4K_____PT4IP76T@+VJ`````74J28N4)&@"``!(.Y60````=1E(
+M#[>%F````$@!T$F)A"1H`@``9F:09F:02(GOZ`````!;74%<PV9FD$%455-(
+MB?M,BV=03(M'2$B+MZ````!)@WPD6``/A14"```/MH>:````@_@"#X1L`0``
+M@_@"?PZ#^`$/A-<```#I\@$``(/X`P^%Z0$``+T`````@WX,`'8NOP````!F
+MD(GH2(L62,'@!(M."$B+!!!(A<ET"T"(.$C_P$C_R77U_\4Y;@QWV4G'``,`
+M``"]`````$B+0PC_0`A(BWL(Z`````!(B<=(BP-(B0=(BT,(2(E'"(M#:(E'
+M:$B+@Y````!(B8>0````#[>#F````&:)AY@```"`CZD````$2(E?6(GH2(E'
+M8$C'A\``````````2,>'N`````````!)BT3$8$B)1U#H`````/_%@_T!=H'I
+M+P$``$B+1PC_0`A(BW\(Z`````!(B<=(BP-(B0=(BT,(2(E'"(M#:(E':$B+
+M@Y````!(B8>0````#[>#F````&:)AY@```"`CZD````"2(E?6$C'A\``````
+M````2,>'N`````````!)@WPD4`$/E,`/ML!(B4=@28M$Q&!(B4=0Z`````#I
+MJ````$F#?"10``^%C0```$G'``,```"]`````$B+0PC_0`A(BWL(Z`````!(
+MB<=(BP-(B0=(BT,(2(E'"(M#:(E':$B+@Y````!(B8>0````#[>#F````&:)
+MAY@```"`CZD````"2(E?6(GH2(E'8$C'A\``````````2,>'N`````````!)
+MBT3$8$B)1U#H`````/_%@_T!=H'K#\:#J@````9(B=_H`````%M=05S#D)"0
+MD)!!N`````#!Z0-!B<F#^0!V'4B+!D@S`DB#P@A(@\8(2(D'2(/'"$'_P$4Y
+MP7?C\\-(B?&^`````,'J`T&)T(/Z`'8;2(GZ2(/'"$B+`D@S`4B#P0A(B0+_
+MQD$Y\'?E\\-!54%455-(@^P(28G]B?5(C7](Z`````!)B<2)*/_-@_W_=!^)
+MZTF-M-R(````28M]`.@`````28E$W`C_S8/]_W7A3(G@2(/$"%M=05Q!7<-F
+M9F:09F9FD&9F9I!F9I!!5%5328G\2(GUBQ[_RX/[_W0?B=A(BY3%B````$B+
+M=,4(28L\).@`````_\N#^_]UX4F-?"1(2(GNZ`````!;74%<PV9F9I!F9F:0
+M9F9FD(LW_\Z#_O]T*+D`````B?"Z`!```$B+1,<(9F:09F:0B`A(_\!(_\IU
+M]O_.@_[_==W#9F9FD&9F9I!F9I!F9I!$BP]!_\E!@_G_=%Z%]G1:1(G(2(M4
+MQPA!N``0``!!.?!$#T?&N0````!$B<#!Z`.#^`!V)42)P,'H`V9FD&:02(,Z
+M`'0*N`````##9F9FD/_!2(/""#G(=^9$*<9!_\E!@_G_=`2%]G6FN`$```"0
+MPV9F9I!F9F:09F9FD&9FD`^W]L'F"4&)T4'!X0F)\"7_#P``P>X,0;L`$```
+M9F:018G802G`13G(10]'P4ACUHG`0;H`````1(G!2`-$UPA(A<ET"T2($$C_
+MP$C_R77U13G(=`S_QD4IP;@`````Z[_SPV9F9I!F9I!F9I!F9I!328GQ2(GY
+M0;H`````0;@`````9H-_&"&X_____T0/0]!F@W\8040/0\"[`````(!_&@!V
+M1#A9&W0X#[;#2,'@!$@!R$B-D!`'``"#N!`'``#_=1)$.5($=0Q$.4((=09$
+M.4(,=`RX`````&9FD&:0ZPS_PSA9&G>\N`$```"%P'1,28M1"$PYRG1#2(V/
+M$`L``$B+!T@Y@O#T__]U)TB+1Q!(.8(`]?__<Q=(BP)(B4@(2(F'$`L``$B)
+M40A(B0KK*4B)UDB+4@A,.<IUQ$B-AQ`+``!(BU8(2(E&"$B)MQ`+``!(B5`(
+M2(D"6\-F9I`/MI=1"P``#[;"2(T$0$C!X`5(C80X6`L``/_"B)=1"P``2(DX
+MQD`)`,9`"@#&0`L`PV9F9I!F9F:09F:09F:005154TF)_$B)\[T`````ZQ)(
+M8\5(BW3#($R)Y^@O_?___\4/ME,:@'L:!'83C4+]T?B-!`(YZ'_8ZPQF9I!F
+MD(U"`3GH?\K'0P@`````28U\)&A(B=[H`````%M=05S#05=!5D%505154TB#
+M[!A(B7PD$$&)]4F)UD&)S$&)]XG+2(/':.@`````2(G%2(V`$`L``$B)A1`+
+M``!(B848"P``2(M4)!!(BP)(B85("P``3(EU$&9$B6481(AM&L:%5*````!(
+MQX5`GP```````$C'A4B?````````QD4=`&;!ZP-$#[?K187MN`$```!$#T3H
+MQX58H````````$&\`````$6$_W1:O@````!!#[;_26/$2,'@!+H0````2(V$
+M*!`#``!`B#!(_\!(_\IU]4ECQ$C!X`2Y`````+H0````2(V$*!`'``!F9F:0
+M9F:0B`A(_\!(_\IU]D'_Q$0YYW^O0;P`````00^VUXU"_='XC00"B40D#$2-
+M<@'K(6:026/<1(GN2(M\)!#H8/O__TB)1-T@1`&M6*```$'_Q$&`_P1V"40Y
+M9"0,?]3K!44YYG_-2(GH2(/$&%M=05Q!74%>05_#9F9FD&9F9I!F9I!!5%53
+M2(GS2(G5B<Y(BU,@#[9+18GHT^@E_P$``$B+$DR-),)-BP0D387`#X2?````
+M23EH$`^%A0```$&`N%2@```!=2Y!QH!4H````$F-@!`+``!(BT@(28N0$`L`
+M`$B)2@A(B1%)B8`0"P``2(E`".L\08"X5*````-U,D'&@%2@````_X\L`0``
+M28V`$`L``$B+2`A)BY`0"P``2(E*"$B)$4F)@!`+``!(B4`(0?Z`5:```$R)
+MP.GM````9I!-BX`H"P``387`#X5A____#[?.#[9S1$B)ZNBQ_?__28G`2(D8
+M2,>`@*````````"+0SA!B4`(2(-[&`!T-4'&0!P`2(M#&$B)P8!X1`!T*$D/
+MOD`<2#E<P6!T'$'^0!Q!#[Y0'$B+2Q@/MD%$.<)\W^L%0<9`'/])BP0D28F`
+M*`L``$B%P'0228L4)$F-@"@+``!(B8(@"P``38F@(`L``$V)!"0/MD-$08A`
+M&HUP_T&(<!N`>Q`(=28/MDM%2(GH2-/H2`^V4T1(B=&Z`````$CW\8GP*-!!
+MB$`;9F9FD$'&@%6@```!3(G`6UU!7,-!5T%6055!5%532(/L>$B)?"1H2(ET
+M)&!(B50D6$B+1DA(B40D4`^VEJD```")T-#H@_`!B<&#X0&)3"1,2,=$)$``
+M````2(.^L`````!T!?;"`70N2(M\)&A(@<>H````Z`````!(B40D0$F)Q[H!
+M````2(G&2(M\)&#_E[@```#K#$B+1"1@3(NXL````$6++T&^`````,9$)#X`
+M2(M4)%"`NNX`````#X9)`0``2`^V5"0^2(M,)%!(#[:$4?````!(P>`%2(M$
+M"$A(B40D,`^VE%'Q````B%0D/P^VPDB+3"0P#[>4@5"?```/MX2!4I\``&:)
+M1"0@B=!FP>@##[?`B40D#(/B!P^WPHG&P>8)N`@```!F*=!FB40D$(M$)"!F
+M.40D$(M4)!`/1L)FB40D$`^WP(G%P>4)2`^V1"0_2(M4)#!(BTS"((M4)`R)
+M\$F)Q$P#9-$(9F:09F:013GN=0U)@\<018LO0;X`````1(GK1"GS.>L/1]U)
+MBT<(@WPD3`!T&(G:1(GV2`'&3(GGZ`````#K%F9FD&9FD$2)]XG:2`''3(GF
+MZ`````!!`=XIW70'B=A)`<3KHHM,)!!F*4PD('05_T0D#+X`````9L=$)!`(
+M`.E!_____D0D/@^V1"0^2(M4)%`X@NX````/A[?^__](@WPD0`!T%DB+?"1H
+M2(''J````$B+="1`Z`````"Z`````$B+="1@2(M,)&A(BSG_5"182(/$>%M=
+M05Q!74%>05_#9F:09I!(@^P82(D<)$B);"0(3(ED)!!(B?I(BV]82(M=2("_
+MJ@````%T#0^VAZH```"(A:H```!(BWT(2(G6Z`````!(BT4(_T@(#[:#[0``
+M`/_`B(/M````.H/L````=4.`O:H`````=0?&A:H````!1`^VI:H```!(A>UT
+M)F9FD&9FD$B+14A(BU@H1(BEJ@```$B)[^@`````2(G=2(7;=>&02(L<)$B+
+M;"0(3(MD)!!(@\08PV9F9I!F9I!F9I!F9I!!5D%505154TF)_$B+1R!(BV@0
+M2,=`$`````!,BW5(0<:&[0````!!QH;L`````$&]`````(!_1``/A),```"0
+M1(GH28M<Q&!(A=MT<_:#@`,```%T:DB+10C_0`A(BWT(Z`````!(B<=(BT4`
+M2(D'2(M%"$B)1PB+16B)1VA(B5]0QH>H````!`^VE:D```"#XC`/MH>I````
+M@^#/"="(AZD```!(QX?``````````$B);UA!_H;L````Z`````!!_\5!#[9$
+M)$1$.>@/AV[___];74%<05U!7L-F9I!FD$B#[!A(B1PD2(EL)`A,B60D$$F)
+M_$B)\TB#ODB?````=&!(B?6_`````'0_2(N#2)\``$B+0$A(BT@H2#F+2)\`
+M`'4-2,>#2)\```````#K%TB+A4B?``!(BU!(2(M!2$B+0"A(B4(H2(G/Z$!M
+M``"%P`^$*`$``$B#NTB?````=:J`NU6@````#X41`0``2(.[@*````!T"TC'
+M@X"@````````2(G?N0````"`>QH`=D$/ML%(P>`$2`'X2(V0$`,``+X`````
+M@[@0`P```'42@WH$`'4,@WH(`'4&@WH,`'0%O@$```"%]G5#_\$X3QIWO[@`
+M````A<!T.L:#5*````-(BY,8"P``2(N#$`L``$B)4`A(B0))C70D&$B)W^A+
+M]O__0?^$)"P!``#K0K@!````Z\+&@U2@```!2(V3$`L``$B+2@A(BX,0"P``
+M2(E("$B)`4F-1"0(2(M("$B)4`A(B8,0"P``2(E*"$B)$4B+.TB+1R!(@W@0
+M`'0AZ+Q2``"%P'0-2(LS3(GGZ"U*``#K"TB+.^B#_?__9F:02(L<)$B+;"0(
+M3(MD)!!(@\08PV9F9I!F9I!F9I!F9I!(@^P(QH94H````$B-AA`+``!(BT@(
+M2(N6$`L``$B)2@A(B1%(B880"P``2(E`"$C'AD"?````````_HY5H```Z/O]
+M__](@\0(PV9FD&9FD$%505154TB#[`A)B?6)TTC'Q@````#H`````$F)Q$F+
+M;4B%VW0(0<:%J@````N[`````("]Z@````!T)69F9I!(8\-(P>`%2(MT*$A,
+MB>?H7/_____##[:%Z@```#G8?]],B>_H-U,``$B#Q`A;74%<05W#9F9FD&9F
+M9I!F9F:02(/L",9''0!(QX=@H````````$B)OVB@``!(QX=PH````````$B-
+MMV"@``!(B[]("P``Z`````!(@\0(PV9FD$%7059!54%455-(@^P(2(G[3(NW
+M2`L``$C'Q@````!,B??H`````$F)QTB+*TB+12!,BZ-`GP``_T@(@W@(`'4'
+M@*6``P``WTB#NWB@````=!:`NU*@```!=0U(B=_H[1@``.G0`P``387D#X1:
+M`P``38ML)$B`NU,+````=&2`NU*@```!=3U(B=^^`````(![&@!V0+D`````
+MB?(/ML)(P>`$NA````!(C80X$`,``(@(2/_`2/_*=?;_QD`X=QIWV.L1@+M2
+MH````G4(2(GOZ*IN``!(B=_H<A@``.E5`P``@+M2H```$'5+08"\)*@`````
+M=!I!@+PDJ`````$/A8\!``!!@+PDF@````)U)D$/MI0DJP```(U"`4&(A"2K
+M````@/H"=PU(B=_H'A@``.D!`P``08"\)*@````!#X5/`0``2`^W0QA(`T,0
+M2(D$)$&`O"2:`````G5L@+M2H````75L#[=S&,'F"4@/MD,;2(M\PR#H,_+_
+M_X7`=4G&@U*@```,@(U@`@```H!]$`IU$@^V343_R;@!````2-/@2`E%4("-
+M8`(```@/MT5&]]A(F$@C0Q!(.85H`@``=@=(B85H`@``@+M2H````70G#[:#
+M4J```$&(A"2J````2(G>3(G_Z`/]__],B>?HZU```.D^`@``2(M#$$@YA6@"
+M``!U"TB+%"1(B95H`@``2(G>3(G_Z-/\__](#[=%1DF+E"20````2/_"2`^O
+MPD@[!"1V34G'14@`````2(L$)$F)15!,B>E,B>)(B>Y,B?_HN&0``(7`#X38
+M`0``2<=%"`````!-B6402<=%&`````!,B>Y,B??H`````.FT`0``3(GGZ%10
+M``!F9F:0Z:,!``!!#[:%ZP```/_`08B%ZP```$$ZA>H````/A84!``!!]H0D
+MJ0````0/A)4```"]`````$&`O>H`````=GF)Z@^VPDC!X`5*BUPH2("[4J``
+M``%U/4B)W[X`````@'L:`'8^N0````")\@^VPDC!X`2Z$````$B-A#@0`P``
+MB`A(_\!(_\IU]O_&0#AW&G?8ZP\/MH-2H```08B$)*H```!(B=Y,B?_HL?O_
+M___%03BMZ@```'>'3(GGZ(Y/``#IX0```+T`````08"]Z@````!V,8GJ#[;"
+M2,'@!4J+7"A(@+M2H````70/#[:#4J```$&(A"2J````_\5!.*WJ````=\]!
+M@+PDJ@````!U%TC'P@````!,B>9,B?_HG/7__^E_````N@````!,B>9,B??H
+M=_O__^MM@+M2H````75`2(G?O@````"`>QH`=D.Y`````(GR#[;"2,'@!+H0
+M````2(V$.!`#``!F9I"("$C_P$C_RG7V_\9`.'<:=]7K$8"[4J````)U"$B)
+M[^A;:P``2(G>3(G_Z,#Z__],B??H`````$B#Q`A;74%<05U!7D%?PV9FD&9F
+MD&9FD$B#[`A(BP:`N%(+````=##&@%(+````2,>`,`L```````!(B8`X"P``
+M2,>`0`L```````!(C;`P"P``Z`````!(@\0(PV9F9I!F9F:09F:0059!54%4
+M55-)B?Y(B<M%B<5!B=1(BVX@2(M-&$B-11A(.<AT9T0/MMI$B<!(C3P83(U5
+M&$0Y61QU2HM!&$F)P4P#21!(.5D0#Y;`3#G/#Y;"#[;`A<)T"$B)R.MK9F:0
+M2#E9$`^3P$PYSP^3P@^VP(7"=!!(B5D0B?@IV(E!&$B)R.M$2(L)23G*=:A)
+MC;X(`0``Z`````!(B<9(A<!T)4$/ML2)1AQ(B5X01(EN&$B-11A(BU`(2(EP
+M"$B)!DB)5@A(B3)(B?!;74%<05U!7L-F9F:09F9FD&9F9I!F9I!!5T%6055!
+M5%532(/L&$B)?"0028GW2(G-1(E$)`Q!B=9(BT8@3(UH&$B+6!A,BR-,.>L/
+MA!X!``!$B<!(`<A(B00D2(G>00^VQCE#'`^%]````(M#&$B)P4@#2Q!(BSPD
+M2#EK$`^3P$@YSP^3P@^VP(7"=$M(BU,(2(L#2(E0"$B)`DB)&TB)6PA(BT0D
+M$$B-N`@!``#H``````^W2QA(BU,0BT,<28M\QV"^`0```.@`````Z8T```!F
+M9I!F9I!(.6L0#Y+`2#G-#Y+"#[;`A<)T+$@YSW(G2(EK$&8IZ0^WR8M#'$F+
+M?,=@2(GJO@$```#H`````.M-9F:09F:02#EN$`^3P$@YSP^2P@^VP(7"=#-(
+M.7X0<RV+1"0,`>A(BU80*=")1AB+3"0,`>EF*=$/M\F+1AQ)BWS'8+X!````
+MZ`````!,B>--BR0D3#GK#X7L_O__2(/$&%M=05Q!74%>05_#9F9FD&9FD&9F
+MD$%505154TB#[`A(B?M!B?1(Q\8`````2(L_Z`````!)B<5(BT,@2(UH&$B+
+M<!A(BQY(.>YT-40Y9AQU)$B+5@A(BP9(B5`(2(D"2(DV2(EV"$F-O0@!``#H
+M`````&9FD$B)WDB+&T@Y[G7+2(/$"%M=05Q!7<-F9F:09F:09F:04T&)TTB+
+M1UA(BQ!(#[9`$4R+5,(@BX>0````*T(0P>`)#[>_F````,'G"4&)P$&!X/\/
+M``!!B<%!P>D,NP`0``")V40IP3GY#T?/187;=!%)8]%$B<!)`T32"$B)1@CK
+M$DECT42)P$D#A-*(````2(E&"(D..?ET&,=&!`````!(@\800?_!*<]!N```
+M``#KL,=&!`$```"X`0```%O#D`^V1Q("1Q.(1Q)(C5<4O@$```#K#X!_$@!Y
+M!K@`````P_Y'$@^V3Q*#^1]W$XGPT^"%1Q0/E<`/ML#K5&9F9I"#^3]W$H/I
+M((GPT^"%0@0/E<`/ML#K.8/Y7W<4@^E`B?#3X(5""`^5P`^VP.LB9I"X````
+M`(/Y?W<6@^E@B?#3X(5"#`^5P`^VP&9FD&9FD(7`=('&1Q,!3(U'%`^V5Q*^
+M`0```.L#_D<3#[9'$XT,`H/Y'W</B?#3X(5'%`^5P`^VP.M.@_D_=Q:#Z2")
+M\-/@085`!`^5P`^VP.LV9F:0@_E?=Q.#Z4")\-/@085`"`^5P`^VP.L;N```
+M``"#^7]W$8/I8(GPT^!!A4`,#Y7`#[;`A<!UD+`!PV9FD&9FD$B#[#A(B5PD
+M"$B);"003(ED)!A,B6PD($R)="0H3(E\)#!(B?M,BS=(Q\8`````3(GWZ```
+M``!)B<5(BVM83(ME`$B+@Y````!(B00D1`^WNY@````/MH.J````B$4*BT4(
+M)?\`_P`]`0`0`'47#[95$$6)^$B+#"1)BS0D3(GOZ.OZ__])@[PD0)\```!T
+M)4F+A"1`GP``2(MX"$B)WN@`````28N$)$"?``!(BT`(_T@(ZR%)BX5(`0``
+M2(MX"$B)WN@`````28N%2`$``$B+0`C_2`B`?0H!#X6'````2(GOZ/C]__^%
+MP'04QD4*`$B)[DR)[^CE````ZWEF9I"`?0@!=4H/MD40.$419F:0=54/MOA(
+MB?A(P>`$2HV\(!`'``!(C4T4BP<+112)!XM'!`M!!(E'!(M'"`M!"(E'"(M'
+M#`M!#(E'#.L;9F9FD`^V51!%B?A(BPPD28LT)$R)[^CI^O__QD4)`DB)[DR)
+M]^BJ^?__2(M<)`A(BVPD$$R+9"083(ML)"!,BW0D*$R+?"0P2(/$.,-F9F:0
+M9F:02(/L&$B)7"0(3(ED)!!)B?Q(B?/&1A,`QD82`$B)]^@<_?__2(G>3(GG
+MZ!$```!(BUPD"$R+9"002(/$&,-FD$B#["A(B5PD"$B);"003(ED)!A,B6PD
+M($B)_4F)]$B+'DB+$T@/MD803(MLPF!(@[M`GP```'1,2(N#0)\``$B+0`C_
+M0`A(BX-`GP``2(MX".@`````2(G'2(N#0)\``$B+`$B)!TB+@T"?``!(BT`(
+M2(E'"$B+@T"?``"+0&B)1VCK2DB+AT@!``!(BT`(_T`(2(N'2`$``$B+>`CH
+M`````$B)QTB+A4@!``!(BP!(B0=(BX5(`0``2(M`"$B)1PA(BX5(`0``BT!H
+MB4=H3(EO4$&`?"0(`74)@(^I`````NL'@(^I````!$D/MD0D$D@#0Q!(B8>0
+M````9D$/MD0D$V:)AY@```!(QX>X`````````$R)9UA(QX?``````````.@`
+M````2(M<)`A(BVPD$$R+9"083(ML)"!(@\0HPV9F9I!F9F:09F9FD&9FD$%4
+M55-!N0````!!NP````!(B?U!O`$```#K&$&#^W]V#T2)R.E>`0``9F9FD&9F
+MD$'_PT2)VD&#^Q]W$D2)X$2)V=/@A0</E<`/ML#K4D&#^S]W$XU*X$2)X]/C
+MA5T$#Y7`#[;`ZSE!@_M?=Q.-2L!$B>#3X(5%"`^5P`^VP.L@N`````!!@_M_
+M=Q6-2J!$B>/3XX5=#`^5P`^VP&9F9I"%P`^$<____T&X`0```$B)^D&Z`0``
+M`.L*9F9FD&9FD$'_P$.-#`.#^1]W%$2)T-/@A0(/E<`/ML#K569FD&:0@_D_
+M=Q.#Z2!$B=#3X(5"!`^5P`^VP.LX@_E?=Q.#Z4!$B=/3XX5:"`^5P`^VP.L@
+MN`````"#^7]W%H/I8$2)T-/@A4(,#Y7`#[;`9F:09I"%P'6,1(G910'#0;H(
+M````1(G*B<C!Z`.(!):)R(/@!XA$E@%$B=,HPXA<E@(/ML-$.<!S"D$IP`'!
+M0?_!Z]%$B<A$B$2&`D'_P4&#^W\/AJ_^__]$B<A;74%<PV9F9I!!5T%6055!
+M5%532('L2`$``$B)?"0H2(ET)"!(BRY(BUX0@'L9``^$.0$``$B#>Q``=0E(
+MB7,0Z38"``#&0QD`2(UT)$!(B=_H(_[__XE$)`1(#[9#&$B+1,4@2(E$)!A(
+MBT,02`^V0!A(BT3%($B)1"002(M4)"!(#[9"&$B+1,4@2(E$)`A!O0````!$
+M.VPD!`^-Q@$``$R-="0P0;\"````26/%#[94A$%!B=!!P>`)#[9TA$)(#[9,
+MA$!$B<)(B=!(BUPD$$@#1,L(2(E$)#!(B=!(BUPD"$@#1,L(2(E$)#A(B=5(
+MBT0D&$@#;,@(08GT0<'D"4DY+G4328MV"$2)XDB)[^B4X___ZQ1FD$F+5@A$
+MB>%)BS9(B>_H3N/__T&#_P)V*+L"````1#G[<QZ)V$F+-,9$B>)(B>_H7>/_
+M___#1#G[<NAF9I!F9I!!_\5$.VPD!`^,1?___V:0Z?D```!(C70D0$B)W^C^
+M_/__B40D!$@/MD,82(M$Q2!(B40D&$B+5"0@2`^V0AA(BT3%($B)1"000;T`
+M````1#ML)`0/C;0```!,C70D,$&_`@```$ECQ0^V5(1!08G00<'@"0^V=(1"
+M2`^V5(1`1(G`2(G!2(M<)!A(`TS3"$B)3"0P2(M<)!!(`T33"$B)1"0X2(G-
+M08GT0<'D"4DY#G4128MV"$2)XDB)S^B/XO__ZQ))BU8(1(GA28LV2(GOZ$OB
+M__]!@_\"=B6[`@```$0Y^W,;B=A)BS3&1(GB2(GOZ%KB____PT0Y^W+H9F:0
+M0?_%1#ML)`0/C%?___^Z`````$B+="0@2(M\)"CH+@,``$B!Q$@!``!;74%<
+M05U!7D%?PV9F9I!F9F:09F9FD$%7059!54%455-(@>Q(`0``2(E\)"A(B70D
+M($B+'DB-="1`2(M\)"!(@\<0Z*_[__^)1"0,2(M4)"!(#[9"($B+1,,@2(E$
+M)!A(#[9"(4B+1,,@2(E$)!!!O@````!$.W0D#`^-M0```$R-;"0P0;\"````
+M26/6#[9$E$'!X`D/MG240D@/ME240(G`2(G!2(M<)!A(`TS3"$B)3"0P2(M<
+M)!!(`T33"$B)1"0X2(G-08GT0<'D"4DY30!U$TF+=0A$B>)(B<_H1.'__^L5
+M9I!)BU4(1(GA28MU`$B)[^C]X/__08/_`G8GNP(```!$.?MS'8G828MTQ0!$
+MB>)(B>_H"^'____#1#G[<N=F9F:00?_&1#MT)`P/C%;___^Z`````$B+="0@
+M2(M\)"CHW@$``$B!Q$@!``!;74%<05U!7D%?PV9F9I!F9F:09F9FD$%7059!
+M54%455-(@>PH!0``2(E\)!A)B?=(BRY(BUX02(VT)"`$``!(B=_H8/K__XE$
+M)`A(#[9#&$B+1,4@2(E$)!"[`````$&`?U@`=B%!#[9/6`^VPTH/ME0X&$B+
+M5-4@2(F4Q"`"``#_PSC9=^3'1"0,`````(M$)`@Y1"0,#XT,`0``2&-$)`P/
+MMI2$(00``$&)T4'!X0D/MI2$(@0``$&)TD'!X@D/MHR$(`0``+L`````08!_
+M6`!V,T0/ML%$B<]!#[9W6&9F9I!F9I`/ML-(BY3$(`(``$J+;,((2(T4+TB)
+M5,0@_\-`.-YWX`^VT42)R$F)Q4B+3"003`-LT0A,C60D($$/MF]818G6@_T!
+M=1)$B=)(BW0D($R)[^@`````ZUE-.2PD=1-)BW0D"$2)TDR)[^B#W___ZQ60
+M28M4)`A$B=%)BS0D3(GOZ#S?__^#_0)V)[L"````.>MS'HG828LTQ$2)\DR)
+M[^A-W____\,YZW+I9F9FD&9FD/]$)`R+;"0(.6PD#`^,]/[__[H`````3(G^
+M2(M\)!CH'````$B!Q"@%``!;74%<05U!7D%?PV9F9I!F9I!F9I!(@^P82(D<
+M)$B);"0(3(ED)!!)B?Q(B?.)U<9&"0*#^@$9P(/@]8/`#(A&"NB/\/__@'L(
+M`W4O2(M#$$B+<!!(A?9T(DC'0!``````QD8)`H/]`1G`@^#U@\`,B$8*3(GG
+MZ%KP__](BQPD2(ML)`A,BV0D$$B#Q!C#9F9FD&9FD$B#[!A(B5PD"$R)9"00
+M2(G[28GT2(NW.`$``$B)][H`````Z`````"Z`````$R)YDB+.^A(____2(M<
+M)`A,BV0D$$B#Q!C#9F:09F:09F:0#[96"X72=$V)T$@/MH1'&)D``$B-!$!(
+MP>`%2(V$.%@+``"`>`D"=`>X`````,.0@'@*`701QD8)`@^V0`J(1@JX````
+M`,.)T`^VE$<9F0``A=)UL[@!````PV9FD&:005=!5D%505154TB#[`A(B?W&
+MAU(+````@+]3H`````^$D@```$&\`````$B-G5@+``"`O5$+````=%EF9I!F
+MD(!["0%U.X!["`-U*4B+0Q"`>!D`=!](@W@0`'082,=`$`````#&0PD"#[:%
+M4J```(A#"NL,QH52"P```>GS`P``0?_$2(/#8`^VA5$+``!$.>!_K$B)[^AD
+MZO__Z=,#```/MD,*B(52H```QH53H````>EN____QT0D!`````#'!"0!````
+M0;P`````2(V=6`L``("]40L````/A&L#``"`>PD`#X66`0``2(G>2(GOZ*O^
+M__^%P`^$<P$``,9#"0%)B=U,B[U("P``2,?&`````$R)_^@`````2(G"#[9#
+M"(/X"`^'1@$``(G`_R3%`````$B)WDB)U^C2]/__9I#I*P$``$B)WDR)_^C@
+M]___Z1L!``!(B=Y,B?_H8/K__^D+`0``2(G>3(G_Z*#[___I^P```,9%'0%(
+M#[95&TC!X@1(`>I(C8H0`P``2(US$(N"$`,```M#$(F"$`,``(M!!`M&!(E!
+M!(M!"`M&"(E!"(M!#`M&#(E!#$@/MD4;2,'@!$@!Z$B-B!`'``"+D!`'```+
+M4Q")D!`'``"+000+1@2)002+00@+1@B)00B+00P+1@R)00Q(@[V`H````'4+
+M2,>%@*````````!!QD4)`D'&10H!3(GN3(G_Z&_M___K34B)WDB)U^@B_?__
+M9I#K/D@/MD4;2,'@!+D`````NA````!(C80H$`<``(@(2/_`2/_*=?9!QD4)
+M`D'&10H!3(GN3(G_Z"3M__]F9F:0@'L)`G40_T0D!&9FD&9FD(!["0)T#,<$
+M)`````#IH@$``(!["@$/A)@!``"`?1T`#X3[_?__2(M%`$@/ME,02(M$T&#V
+M@(`#```!#X1O`0``QP0D`````,9#"0'&0PH`28G>3(N]2`L``$C'Q@````!,
+MB?_H`````$B)P@^V0PB#^`@/ASL!``")P/\DQ0````!(B=Y(B=?H`_/__^DB
+M`0``2(G>3(G_Z!/V__]F9I#I#P$``$B)WDR)_^B0^/__Z?\```!(B=Y,B?_H
+MT/G__^GO````QD4=`4@/MG4;2(GP2,'@!$B-M"@0`P``2(U+$(L&"T,0B0:+
+M1@0+002)1@2+1@@+00B)1@B+1@P+00R)1@Q(#[9U&TB)\$C!X`1(C;0H$`<`
+M`(L&"T,0B0:+1@0+002)1@2+1@@+00B)1@B+1@P+00R)1@Q(@[V`H````'4+
+M2,>%@*````````!!QD8)`D'&1@H!3(GV3(G_Z*WK___K3TB)WDB)U^A@^___
+MZT)(#[9%&TC!X`2Y`````+H0````2(V$*!`'``"("$C_P$C_RG7V0<9&"0)!
+MQD8*`4R)]DR)_^ADZ___ZP9FD,9#"@%!_\1(@\-@#[:%40L``$0YX`^/E?S_
+M_X-\)`0`#X5A_/__@SPD`'01QH52H````4B)[^B5YO__ZP?&A5(+```!2(/$
+M"%M=05Q!74%>05_#9F9FD&9FD&9FD&9FD$%7059!54%455-(@^QX28G^2(L?
+M3(NG0)\``$B+OT@+``!(Q\8`````Z`````!,BUL@3(VH\`,``$@%\`<``$B)
+M1"1(QD0D)@!!N`````!!_T,(@(N``P``($B+4UA)BT802#F#:`(``'<=2(-[
+M4`!T!D@+4U#K$/:#8`(```*X`0```$0/1<!(A=)T-;T`````]L(!=1B^`0``
+M`&9F9I#_Q4B)\(GI2-/@2(7"=/%!B*Y0"P``ZQ*X`0```.F@````0<:&4`L`
+M`$!!QH91"P```$'&AAB9````0<:&4J````!!QH93H````$G'AGB@````````
+M0<:&4PL```!!@'X=``^$#P$``$R)][D`````08!^&@!V1@^VP4C!X`1(`?A(
+MC9`0`P``O@````"#N!`#````=1*#>@0`=0R#>@@`=0:#>@P`=`6^`0```(7V
+MD`^%8O_____!.$\:=[JX`````(7`#X2F!@``0;\`````08!^&@`/A@<N``!F
+M9I!FD$2)^P^VPTC!X`1,`?!(BY`0`P``2(E4)&!(BX`8`P``2(E$)&A%.+Y0
+M"P``=%*X`````(-\)&``=1:#?"1D`'4/@WPD:`!U"(-\)&P`=`:0N`$```"%
+MP'0G3(GWZ%_:___&0`@"1(AX$$2(>!%(BU0D8$B)4!1(BU0D:$B)4!R00?_'
+M13A^&@^'<____^EP+0``2(G0ZUA!@+Y0"P``0)`/A0H$``!)BW8000^W?AA(
+MBTL@2(M1&$B-01A(.=!T*HGX2(T\,$B#P1AF9I!F9I"+0AA(`T(02#GP=@9(
+M.WH0=[!(BQ)(.=%UYK@`````28F&>*```$B%P`^$L0,``+D`````NA````!(
+MC40D8&:0B`A(_\!(_\IU]DR-5"1@28N&>*```(M0$$$K5A"+>!B[`````$&Y
+M(````$&[`0```(/Z'W<_#[;#28TT@D2)R2G1.?D/1\^#^2!U",<&_____^L-
+M1(G8T^#_R(G1T^`)!D2)R"G0.?AS%8U\%^"Z`````.L#@^H@_\.`^P-VLD4/
+MMF8;18BF&)\``$'&AAF?````2(M$)&!)B88`GP``2(M$)&A)B88(GP``2<>&
+M$)\```````!)C9X`GP``3(GWZ.O8___&0`@#2(E8$$2(8!A(B40D,$&_````
+M`$&`?AH`#X8U`@``2;RKJJJJJJJJJDB)7"0800^VUTF+AGB@```[4!P/A`4"
+M``!$B?@/MOA(P><$2HT$-TB-L!`'``!(C8@0`P``BY`0`P``]](CD!`'``")
+M5"10BT$$]]`C1@2)1"14BT$(]]`C1@B)1"18BT$,]]`C1@R)1"1<2(M<)$A(
+MC0P?]](C5"1@B1&+1"14]]`C1"1DB4$$BT0D6/?0(T0D:(E!"(M$)%SWT"-$
+M)&R)00RX`````(,Y`'44@WD$`'4.@WD(`'4(@WD,`&:0=`6X`0```(7`#X3E
+M````00^V7AI$B?@/MNA(B>A(P>`$2(M4)$A(C2P03(GWZ,[7___&0`@!1(AX
+M$(A8$4B+50!(B5`42(M5"$B)4!Q)B<5(BQ#^@AB9```/MK(8F0``B?%(BT0D
+M,$@IT$@M6`L``$C!^`5)#Z_$B(1*&)D``$$/MD4+B(1*&9D``$&(=0M!#[9>
+M&DR)]^ADU___QD`(`TB+3"082(E($(A8&$B)1"1`2(L0_H(8F0``#[:R&)D`
+M`(GQ3(GH2"G02"U8"P``2,'X!4D/K\2(A$H8F0``2(M<)$`/MD,+B(1*&9D`
+M`$"(<POK84R)]^@$U___QD`(`TB+="082(EP$$2(>!A(B40D0$B+$/Z"&)D`
+M``^VLAB9``")\4B+1"0P2"G02"U8"P``2,'X!4D/K\2(A$H8F0``2(M\)$`/
+MMD<+B(1*&9D``$"(=PM(BT0D0$B)1"0P0?_'13A^&@^'VOW__TF+AGB@``"+
+M6!Q%#[9F&TR)]^A]UO__QD`(`HA8$$2(8!%(BU0D8$B)4!1(BU0D:$B)4!Q(
+MB<5(BPC^@1B9```/MKD8F0``B?Y(BT0D,$@IR$@M6`L``$C!^`5(NJNJJJJJ
+MJJJJ2`^OPHB$<1B9```/MD4+B(1Q&9D``$"(?0OI4BD``$V%Y`^$)Q4``$&`
+MO"2H`````0^%RP@``$$/MH0DF@```(/X`@^$X`0``(/X`G\.@_@!#X0]`0``
+MZ14I``"#^`,/A0PI``"Y`````+H0````2(U$)&"("$C_P$C_RG7V3(U4)&"_
+M`````$$/MW88NP````!!N2````!!NP$```"#_Q]W/P^VPTF-%()$B<DI^3GQ
+M#T?.@_D@=0C'`O_____K#42)V-/@_\B)^=/@"0)$B<@I^#GP<Q6-=#[@OP``
+M``#K`X/O(/_#@/L#=K))BWX@Z!K3__]!OP````!!@'X:``^&:R@``+L`````
+M1(GZ#[;"2,'@!+H0````2HV$,!`#``"(&$C_P$C_RG7V1(GY#[;!2,'@!+D`
+M````NA````!*C80P$`<``&9F9I!F9I"("$C_P$C_RG7V3(GWZ,[4___&0`@"
+M1(AX$,9`$0!(BU0D8$B)4!1(BU0D:$B)4!Q!_\=%.'X:=X/IY"<``+@!````
+MZU5,B?>Y`````$&`?AH`=D$/ML%(P>`$2`'X2(V0$`,``+X`````@[@0`P``
+M`'42@WH$`'4,@WH(`'4&@WH,`'0%O@$```"%]G6P_\$X3QIWO[@`````A<!T
+M$D'&AE,+```!Z543``!F9I!FD+D`````NA````!(C40D8)"("$C_P$C_RG7V
+M3(U4)&"_`````$$/MW88NP````!!N2````!!NP$```!F9I!F9I"#_Q]W/P^V
+MPTF-%()$B<DI^3GQ#T?.@_D@=0C'`O_____K#42)V-/@_\B)^=/@"0)$B<@I
+M^#GP<Q6-=#[@OP````#K`X/O(/_#@/L#=K)!@+Y0"P``0'4,00^V1AM!B(90
+M"P``00^VGE`+``!!B)X8GP``0<:&&9\```%(BT0D8$F)A@"?``!(BT0D:$F)
+MA@B?``!)QX80GP```````$R)]^A*T___QD`(`HA8$(A8$4B+5"1@2(E0%$B+
+M5"1H2(E0'$B)Q4&`?AH"#X<2`0``28V>`)\``$R)]^@1T___QD`(!4B)6!#&
+M0%@`2(E$)$!(BTT`_H$8F0``#[:Y&)D``(G^2(M$)$!(*<A(+5@+``!(P?@%
+M2+JKJJJJJJJJJD@/K\*(A'$8F0``#[9%"XB$<1F9``!`B'T+0;\`````08!^
+M&@`/AN@E``!(B=-%.+Y0"P``='I,B??HDM+__\9`"`%$B'@01(AX$4B+5"1@
+M2(E0%$B+5"1H2(E0'$B+="1`#[966`^VRD2(?#$8_\*(5EA(BQ;^@AB9```/
+MMK(8F0``B?%(*=!(+5@+``!(P?@%2`^OPXB$2AB9``!(BWPD0`^V1PN(A$H9
+MF0``0(AW"T'_QT4X?AH/AW#____I4"4``$&_`````$&`?AH`#X8_)0``28V>
+M`)\``$F\JZJJJJJJJJI%.+Y0"P``#X3`````3(GWZ-?1___&0`@!1(AX$$2(
+M>!%(BU0D8$B)4!1(BU0D:$B)4!Q)B<5,B??HKM'__\9`"`-(B5@01(AX&$B)
+M1"1`2(L0_H(8F0``#[:R&)D``(GQ3(GH2"G02"U8"P``2,'X!4D/K\2(A$H8
+MF0``2(M\)$`/MD<+B(1*&9D``$"(=PM(BU4`_H(8F0``#[:R&)D``(GQ2(GX
+M2"G02"U8"P``2,'X!4D/K\2(A$H8F0``#[9%"XB$2AF9``!`B'4+0?_'13A^
+M&@^')O___^E/)```N`$```#K54R)][D`````08!^&@!V00^VP4C!X`1(`?A(
+MC9`0`P``O@````"#N!`#````=1*#>@0`=0R#>@@`=0:#>@P`=`6^`0```(7V
+M=;#_P3A/&G>_N`````"%P'0-0<:&4PL```'IP`\``$R)]^B8T/__2(E$)"C&
+M0`@'N0````"Z$````$B-1"1@B`A(_\!(_\IU]DR-5"1@OP````!!#[=V&+L`
+M````0;D@````0;L!````@_\?=S\/ML-)C12"1(G)*?DY\0]'SH/Y('4(QP+_
+M____ZPU$B=C3X/_(B?G3X`D"1(G(*?@Y\',5C70^X+\`````ZP.#[R#_PX#[
+M`W:R00^V1AM!B(88GP``0<:&&9\```!(BT0D8$F)A@"?``!(BT0D:$F)A@B?
+M``!)QX80GP```````$&`?AH"#X<I`0``28V>`)\``$R)]^BWS___QD`(!4B)
+M6!#&0%@`2(E$)$!(BPC^@1B9```/MK$8F0``B?=(BT0D*$@IR$@M6`L``$C!
+M^`5(NJNJJJJJJJJJ2`^OPHB$>1B9``!(BUPD0`^V0PN(A'D9F0``0(AS"T$/
+MMD8;B$,8QD-8`4&_`````$&`?AH`#X9^(@``2(G33(GWZ#'/___&0`@!1(AX
+M$$2(>!%(BU0D8$B)4!1(BU0D:$B)4!Q(BW0D*$B+%OZ"&)D```^VLAB9``")
+M\4@IT$@M6`L``$C!^`5(#Z_#B(1*&)D``$B+?"0H#[9'"XB$2AF9``!`B'<+
+M13A^&W0;2(M4)$`/MD)8#[;02(M,)$!$B'P*&/_`B$%80?_'13A^&@^':?__
+M_^G?(0``00^V7AM,B??HD,[__\9`"`&(6!"(6!%(BU0D8$B)4!1(BU0D:$B)
+M4!Q(BUPD*$B+"_Z!&)D```^VL1B9``")]T@IR$@M6`L``$C!^`5(NJNJJJJJ
+MJJJJ2`^OPHB$>1B9```/MD,+B(1Y&9D``$"(<PM!OP````!!@'X:``^&72$`
+M`$F-G@"?``!(B=5%.'X;#X3!````3(GWZ/_-___&0`@!1(AX$$2(>!%(BU0D
+M8$B)4!1(BU0D:$B)4!Q)B<5,B??HULW__\9`"`-(B5@01(AX&$B)1"1`2(L0
+M_H(8F0``#[:R&)D``(GQ3(GH2"G02"U8"P``2,'X!4@/K\6(A$H8F0``2(M\
+M)$`/MD<+B(1*&9D``$"(=PM(BQ?^@AB9```/MK(8F0``B?%(BT0D*$@IT$@M
+M6`L``$C!^`5(#Z_%B(1*&)D```^V1PN(A$H9F0``0(AW"T'_QT4X?AH/ARC_
+M___I=B```+@!````ZW1-A>0/A$0,``!!#[:$)*D```"H`@^$,PP``*@(=&=,
+MB?>Y`````$&`?AH`=D(/ML%(P>`$2`'X2(V0$`,``+X`````@[@0`P```'43
+M@WH$`'4-@WH(`'4'@WH,`)!T!;X!````A?9UD?_!.$\:=[ZX`````(7`=`U!
+MQH93"P```>G("P``10^VOE"@``!%.+Y1H```#X(G`@``13A^&P^$#0(``$2)
+M^@^VPDC!X`2Y`````+H0````2HT$*)"("$C_P$C_RG7V1(GY#[;!2(G"2,'B
+M!$P!ZD$/M[2&4)\``$4/MX2&4I\``+L`````0;H@````O0$```!F9F:0@_X?
+M=T(/ML-(C3R"1(G1*?%$.<%!#T?(@_D@=0C'!______K#(GHT^#_R(GQT^`)
+M!T2)T"GP1#G`<Q9%C40PX+X`````ZP.#[B#_PX#[`W:O1(G[#[;S2(GP2,'@
+M!$B+?"1(2(TT.$B)QTJ-#"A*C90P$`<``(L"]]`C`8D&BT($]]`C002)1@2+
+M0@CWT"-!"(E&"(M"#/?0(T$,B48,13B^4`L```^%"`$``$B+5"1(2(T$%[H`
+M````@S@`=1.#>`0`=0V#>`@`=0>#>`P`D'0%N@$```"%T@^$U0```,9$)"8!
+M08-[,$`/AL4```!$B?E$#[;)3(G(2,'@!$B+7"1(3(T,&+\`````00^W=AB[
+M`````$&Z(````+T!````@_\?=SX/ML-)C12!1(G1*?DY\0]'SH/Y('4(QP+_
+M____ZPR)Z-/@_\B)^=/@"0)$B=`I^#GP<Q6-=#[@OP````#K`X/O(/_#@/L#
+M=K-$B?L/MO-(B?!(P>`$2(M\)$A(C30X2HV4,!`'``"+`O?0(P:)!HM"!/?0
+M(T8$B48$BT((]]`C1@B)1@B+0@SWT"-&#(E&#$'_QT4XOE&@```/@]G]__^`
+M?"0F``^$9P<``+D`````NA````!(C40D8&:0B`A(_\!(_\IU]D&_`````$&`
+M?AH`=EM%.+Y0"P``=$E%.'X;=$-$B?@/MM!(P>($3`'R2(V*$`,``(M$)&`+
+M@A`#``")1"1@BT0D9`M!!(E$)&2+1"1H"T$(B40D:(M$)&P+00R)1"1L0?_'
+M13A^&G>E30^VAE`+``!,B<!(P>`$2(M4)$A,C000BT0D8$$C`(E$)%"+5"1D
+M02-0!(E4)%2+3"1H02-("(E,)%B+="1L02-P#(ET)%SWT$$C`(E$)&#WTD$C
+M4`2)5"1D]]%!(T@(B4PD:/?602-P#(ET)&Q,B??H:,G__\9`"`!(B40D*+@`
+M````@WPD8`!U%8-\)&0`=0Z#?"1H`'4'@WPD;`!T!;@!````A<`/A/X"``!!
+M#[:&4`L``$&(AAB?``!(BT0D8$F)A@"?``!(BT0D:$F)A@B?``!!QH89GP``
+M`4G'AA"?````````08!^&@)W;4F-G@"?``!,B??HX<C__\9`"`5(B5@0QD!8
+M`$B)1"1`2(M<)"A(BPO^@1B9```/MK$8F0``B?=(BT0D0$@IR$@M6`L``$C!
+M^`5(NJNJJJJJJJJJ2`^OPHB$>1B9```/MD,+B(1Y&9D``$"(<PM!OP````!!
+M@'X:``^&[`(``$F-K@"?``!)O*NJJJJJJJJJ13B^4`L```^$#P(``$4XOE"@
+M``!W#T4XOE&@``!R!D4X?AMU442)^@^VPDC!X`1(BUPD2$B-#!A,`?!(C9`0
+M!P``BX`0!P``]]`C1"1@B0&+0@3WT"-$)&2)002+0@CWT"-$)&B)00B+0@SW
+MT"-$)&R)00SK=42)^@^VPDC!X`1(BTPD2$B-%`B+3"1@"PJ)"HM\)&0+>@2)
+M>@1$BT0D:$0+0@A$B4((1(M,)&Q$"TH,1(E*#$P!\$B-L!`'``"+@!`'``#W
+MT"'(B0*+1@3WT"'XB4($BT8(]]!$(<")0@B+1@SWT$0AR(E"#$&`?AH"=QA(
+MBUPD0`^V0U@/MM!$B'P:&/_`B$-8ZV=,B??H3\?__\9`"`-(B6@01(AX&$B)
+M1"1`13A^&W5(2(MT)"A(BQ;^@AB9```/MK(8F0``B?%(BT0D0$@IT$@M6`L`
+M`$C!^`5)#Z_$B(1*&)D``$B+?"0H#[9'"XB$2AF9``!`B'<+1(GZ#[;"2,'@
+M!$@#1"1(N@````"#.`!U$H-X!`!U#(-X"`!U!H-X#`!T!;H!````A=)T=T2)
+M^0^VV4B)V$C!X`1(BW0D2$B-'#!,B??HGL;__\9`"`%$B'@01(AX$4B+$TB)
+M4!1(BU,(2(E0'$B+?"1`2(L7_H(8F0``#[:R&)D``(GQ2"G02"U8"P``2,'X
+M!4D/K\2(A$H8F0``#[9'"XB$2AF9``!`B'<+0?_'13A^&@^'U_W__^FM````
+M0;\`````08!^&@`/AIP```!%.+Y0H```#X>"````13B^4:```')Y13A^&W1S
+M13B^4`L``'1J1(GZ#[;"2,'@!$@#1"1(N@````"#.`!U%H-X!`!U$(-X"`!U
+M"H-X#`!F9F:0=`6Z`0```(72=#)$B?D/MME(P>,$2`-<)$A,B??HKL7__\9`
+M"`%$B'@01(AX$4B+$TB)4!1(BU,(2(E0'$'_QT4X?AH/AV3___^X`````(-\
+M)%``=16#?"14`'4.@WPD6`!U!X-\)%P`=`6X`0```(7`#X2:&```10^VIE`+
+M``!%B*8XGP``2(M$)%!)B88@GP``2(M$)%A)B88HGP``0<:&.9\```!)QX8P
+MGP```````$$/MEX;3(GWZ!'%___&0`@!B%@01(A@$4B+5"102(E0%$B+5"18
+M2(E0'$B)1"0X2,=$)#``````0;\`````08!^&@`/AI0!``!)C:X@GP``2;RK
+MJJJJJJJJJD4XOE`+```/A&D!``!%.'X;#X1?`0``00^V7AM,B??HH,3__\9`
+M"`%$B'@0B%@12(M4)%!(B5`42(M4)%A(B5`<28G%2(L0_H(8F0``#[:R&)D`
+M`(GQ2(M$)"A(*=!(+5@+``!(P?@%2+^KJJJJJJJJJD@/K\>(A$H8F0``00^V
+M10N(A$H9F0``08AU"TB#?"0P`'1`28M5`/Z"&)D```^VLAB9``")\4B+1"0P
+M2"G02"U8"P``2,'X!4@/K\>(A$H8F0``00^V10N(A$H9F0``08AU"T$/MEX;
+M3(GWZ.+#___&0`@#2(EH$(A8&$B)1"1`2(E$)#!(BQ#^@AB9```/MK(8F0``
+MB?%,B>A(*=!(+5@+``!(P?@%20^OQ(B$2AB9``!(BUPD0`^V0PN(A$H9F0``
+M0(AS"TB+$_Z"&)D```^VLAB9``")\4B+1"0X2"G02"U8"P``2,'X!4D/K\2(
+MA$H8F0``#[9#"XB$2AF9``!`B',+0?_'13A^&@^'??[__TD/MDX;2(G(2,'@
+M!$J-C#`0!P``BT0D4/?0(P&)`8M$)%3WT"-!!(E!!(M$)%CWT"-!"(E!"(M$
+M)%SWT"-!#(E!#.D\%@``08-[,$`/AGP!``!!OP````!!@'X:``^&(!8``$4X
+MOE`+```/A$P!``!$B?H/ML)(P>`$N0````"Z$````$B+7"1(2(T$&&9F9I"(
+M"$C_P$C_RG7V1(GZ#[;"2,'@!$B+3"1(3(T,"+\`````00^W=AB[`````$&Z
+M(````$&[`0```(/_'W<_#[;#28T4@42)T2GY.?$/1\Z#^2!U",<"_____^L-
+M1(G8T^#_R(GYT^`)`D2)T"GX.?!S%8UT/N"_`````.L#@^\@_\.`^P-VLD2)
+M^P^VRTB)R$C!X`1(BW0D2$B-##!*C90P$`<``(L"]]`C`8D!BT($]]`C002)
+M002+0@CWT"-!"(E!"(M"#/?0(T$,B4$,N`````"#.0!U$H-Y!`!U#(-Y"`!U
+M!H-Y#`!T!;@!````A<!T.42)^`^VV$B)V$C!X`1(BU0D2$B-'!!,B??HH,'_
+M_\9`"`%$B'@01(AX$4B+$TB)4!1(BU,(2(E0'$'_QT4X?AH/AYK^___IM10`
+M`$4/MKY0H```13B^4:````^"H!0``$4X?AMT9D2)^0^VP4C!X`1(`T0D2+H`
+M````@S@`=1*#>`0`=0R#>`@`=0:#>`P`=`6Z`0```(72=#)$B?@/MMA(P>,$
+M2`-<)$A,B??H#<'__\9`"`%$B'@01(AX$4B+$TB)4!1(BU,(2(E0'$'_QT4X
+MOE&@``!SB.DC%```D$&`OE`+```_#X:D"@``N0````"Z$````$B-1"1@9F:0
+MB`A(_\!(_\IU]L9$)"<`0;\`````08!^&@`/AI\```!%.'X;#X2(````1(GZ
+M#[;"2,'@!$P!\$B-D!`#``"Y`````(.X$`,```!U%H-Z!`!U$(-Z"`!U"H-Z
+M#`!F9F:0=`6Y`0```(7)=$=$B?D/MM%(P>($3`'R2(V*$`,``(M$)&`+@A`#
+M``")1"1@BT0D9`M!!(E$)&2+1"1H"T$(B40D:(M$)&P+00R)1"1L_D0D)T'_
+MQT4X?AH/AV'___\/ME0D)T$/MD8:@^@#T?@YP@^?PD6$P`^5P`G0J`$/A%,%
+M``!!#[9>&T&(GAB?``!(BT0D8$F)A@"?``!(BT0D:$F)A@B?``!!QH89GP``
+M`4G'AA"?````````3(GWZ)Z____&0`@"B%@0B%@12(M4)&!(B5`42(M4)&A(
+MB5`<2(G%3(GWZ'>____&0`@&2(M4)&!(B5`02(M4)&A(B5`82(E$)"A(BU4`
+M_H(8F0``#[:R&)D``(GQ2(M$)"A(*=!(+5@+``!(P?@%2;RKJJJJJJJJJDD/
+MK\2(A$H8F0``#[9%"XB$2AF9``!`B'4+08!^&@(/AT$"``!)C9X`GP``3(GW
+MZ/F^___&0`@%2(E8$,9`6`!(B40D0$B+7"0H2(L3_H(8F0``#[:R&)D``(GQ
+M2(M$)$!(*=!(+5@+``!(P?@%20^OQ(B$2AB9```/MD,+B(1*&9D``$"(<PM!
+MOP````!!@'X:``^&UA$``$4X?AL/A+$!``!(BW0D0`^V1E@/MM!$B'PR&/_`
+MB$981(GZ#[;"2,'@!$B+7"1(2(T,&$P!\$B-D!`'``"+@!`'``#WT"-$)&")
+M`8M"!/?0(T0D9(E!!(M""/?0(T0D:(E!"(M"#/?0(T0D;(E!#+@`````@SD`
+M=1*#>00`=0R#>0@`=0:#>0P`=`6X`0```(7`9I!T=42)^`^VV$C!XP1(`UPD
+M2$R)]^CGO?__QD`(`42(>!!$B'@12(L32(E0%$B+4PA(B5`<2(M,)$!(BQ'^
+M@AB9```/MK(8F0``B?%(*=!(+5@+``!(P?@%20^OQ(B$2AB9``!(BUPD0`^V
+M0PN(A$H9F0``0(AS"T2)^@^VPDC!X`1*C80P$`,``+H`````@S@`=1*#>`0`
+M=0R#>`@`=0:#>`P`=`6Z`0```(72='E$B?D/MME(B=A(P>`$2HV<,!`#``!,
+MB??H-;W__\9`"`)$B'@01(AX$4B+$TB)4!1(BU,(2(E0'$B)Q4B+$/Z"&)D`
+M``^VLAB9``")\4B+1"0H2"G02"U8"P``2,'X!4D/K\2(A$H8F0``#[9%"XB$
+M2AF9``!`B'4+0?_'13A^&@^'./[__^D)$```0;\`````08!^&@`/AO@/``!-
+MC:X`GP``2;RKJJJJJJJJJD4X?AL/A/\!``!$B?L/ML-(P>`$2(MT)$A(C1PP
+M3`'P2(V0$`<``(N`$`<``/?0(T0D8(D#BT($]]`C1"1DB4,$BT((]]`C1"1H
+MB4,(BT(,]]`C1"1LB4,,3(GWZ$2\___&0`@#3(EH$$2(>!A(B40D0$B+?"0H
+M2(L7_H(8F0``#[:R&)D``(GQ2(M$)$!(*=!(+5@+``!(P?@%20^OQ(B$2AB9
+M```/MD<+B(1*&9D``$"(=PNX`````(,[`'42@WL$`'4,@WL(`'4&@WL,`'0%
+MN`$```"%P'1\1(GX#[;82(G82,'@!$B+5"1(2(T<$$R)]^BMN___QD`(`42(
+M>!!$B'@12(L32(E0%$B+4PA(B5`<2(M,)$!(BQ'^@AB9```/MK(8F0``B?%(
+M*=!(+5@+``!(P?@%20^OQ(B$2AB9``!(BUPD0`^V0PN(A$H9F0``0(AS"T2)
+M^@^VPDC!X`1*C80P$`,``+H`````@S@`=16#>`0`=0^#>`@`=0F#>`P`9F:0
+M=`6Z`0```(72='E$B?D/MME(B=A(P>`$2HV<,!`#``!,B??H^+K__\9`"`)$
+MB'@01(AX$4B+$TB)4!1(BU,(2(E0'$B)Q4B+$/Z"&)D```^VLAB9``")\4B+
+M1"0H2"G02"U8"P``2,'X!4D/K\2(A$H8F0``#[9%"XB$2AF9``!`B'4+0?_'
+M13A^&@^'ZOW__^G,#0``20^V5AM(B=!(P>`$2HV4,!`'``"+`O?0(T0D8(E$
+M)%"+0@3WT"-$)&2)1"14BT((]]`C1"1HB40D6(M"#/?0(T0D;(E$)%RX````
+M`(-\)%``=16#?"14`'4.@WPD6`!U!X-\)%P`=`6X`0```(7`=#!!#[9>&TR)
+M]^@,NO__QD`(`8A8$(A8$4B+5"102(E0%$B+5"182(E0'$B)1"0XZQ%,B??H
+MX;G__\9`"`!(B40D.$$/MEX;3(GWZ,NY___&0`@"B%@0B%@12(M4)&!(B5`4
+M2(M4)&A(B5`<2(G%3(GWZ*2Y___&0`@&2(M4)&!(B5`02(M4)&A(B5`82(E$
+M)"A(BTT`_H$8F0``#[:Y&)D``(G^2(M$)"A(*<A(+5@+``!(P?@%2+JKJJJJ
+MJJJJJD@/K\*(A'$8F0``#[9%"XB$<1F9``!`B'T+0;\`````08!^&@`/AG$,
+M``!%.'X;#X3E`@``1(G[#[;#2,'@!$P!\$B-D!`#``"Y`````(.X$`,```!U
+M%8-Z!`!U#X-Z"`!U"8-Z#`!F9I!T!;D!````A<D/A*$"``#^3"0G#[9$)"=!
+M`D8:B<5$B?I$#[;B2<'D!$T!]$F-C"00`P``2(E,)!!,B??HK[C__\9`"`%$
+MB'@00(AH$4F+E"00`P``2(E0%$B+7"002(M3"$B)4!Q)B<5!#[9>&TR)]^AZ
+MN/__QD`(!(A8($"(:"%)BY0D$`,``$B)4!!(BW0D$$B+5@A(B5`82(E$)$!(
+MBQ#^@AB9```/MK(8F0``B?%(BT0D.$@IT$@M6`L``$C!^`5(OZNJJJJJJJJJ
+M2`^OQXB$2AB9``!(BUPD0`^V0PN(A$H9F0``0(AS"TB+$_Z"&)D```^VLAB9
+M``")\4R)Z$@IT$@M6`L``$C!^`5(#Z_'B(1*&)D```^V0PN(A$H9F0``0(AS
+M"TB+="0H2(L6_H(8F0``#[:R&)D``(GQ2(G82"G02"U8"P``2,'X!4@/K\>(
+MA$H8F0``2(M\)"@/MD<+B(1*&9D``$"(=PM!#[9>&TR)]^AUM___QD`(!(A8
+M($2(>"%)BY0D$`,``$B)4!!(BTPD$$B+40A(B5`82(E$)$!(BQ#^@AB9```/
+MMK(8F0``B?%(BT0D.$@IT$@M6`L``$C!^`5(NZNJJJJJJJJJ2`^OPXB$2AB9
+M``!(BWPD0`^V1PN(A$H9F0``0(AW"TB+1"0H2(L0_H(8F0``#[:R&)D``(GQ
+M2(GX2"G02"U8"P``2,'X!4@/K\.(A$H8F0``2(M<)"@/MD,+B(1*&9D``$"(
+M<PM,B??HL;;__\9`"`)$B'@01(AX$4F+E"00`P``2(E0%$B+="002(M6"$B)
+M4!Q(B<5(BQ#^@AB9```/MK(8F0``B?%(B=A(*=!(+5@+``!(P?@%2+^KJJJJ
+MJJJJJD@/K\>(A$H8F0``#[9%"XB$2AF9``!`B'4+9F:00?_'13A^&@^'!/W_
+M_^EP"0``00^VAE`+``!!.D8;#X4&`0``3(GWZ!2V__](B40D0,9`"`!!OP``
+M``!!@'X:``^&/`D``$4X?AL/A,@```!$B?H/ML)(P>`$3`'P2(V0$`,``+D`
+M````@[@0`P```'42@WH$`'4,@WH(`'4&@WH,`'0%N0$```"%R0^$AP```$2)
+M^0^VV4C!XP1,`?-,C:,0`P``3(GWZ).U___&0`@"1(AX$$2(>!%(BY,0`P``
+M2(E0%$F+5"0(2(E0'$B)Q4B+"/Z!&)D```^VN1B9``")_DB+1"1`2"G(2"U8
+M"P``2,'X!4BZJZJJJJJJJJI(#Z_"B(1Q&)D```^V10N(A'$9F0``0(A]"T'_
+MQT4X?AH/AR'____I6`@``+D`````NA````!(C40D8&9F9I!F9I"("$C_P$C_
+MRG7V3(GWZ.ZT___&0`@&O@````"Y$````$B-4!!`B#)(_\)(_\EU]4B)1"0H
+M0;\`````08!^&@`/AA@!``!%.'X;#X0!`0``1(G[#[;#2,'@!$P!\$B-D!`#
+M``"Y`````(.X$`,```!U$H-Z!`!U#(-Z"`!U!H-Z#`!T!;D!````A<D/A,``
+M``!$B?H/ML)(P>`$2HTL,$B-G1`#``"+1"1@"X40`P``B40D8(M$)&0+0P2)
+M1"1DBT0D:`M#"(E$)&B+1"1L"T,,B40D;$4XOE`+``!T<TR)]^@;M/__QD`(
+M`D2(>!!$B'@12(N5$`,``$B)4!1(BU,(2(E0'$B)Q4B+"/Z!&)D```^VN1B9
+M``")_DB+1"0H2"G(2"U8"P``2,'X!4BZJZJJJJJJJJI(#Z_"B(1Q&)D```^V
+M10N(A'$9F0``0(A]"Y!!_\=%.'X:#X?H_O__00^V7AM,B??HEK/__\9`"`*(
+M6!"(6!%(BU0D8$B)4!1(BU0D:$B)4!Q(B<5(BPC^@1B9```/MKD8F0``B?Y(
+MBT0D*$@IR$@M6`L``$C!^`5(NJNJJJJJJJJJ2`^OPHB$<1B9```/MD4+B(1Q
+M&9D``$"(?0M(BT0D8$B+3"0H2(E!$$B+1"1H2(E!&$D/MHY0"P``2(G*2(G(
+M2,'@!$J-C#`0!P``BP'WT$2+1"1@1"'`B40D4(M!!/?0BWPD9"'XB40D5(M!
+M"/?0BW0D:"'PB40D6(M!#/?0BTPD;"'(B40D7$C!X@1*C90R$`<``$0C`D2)
+M1"1@(WH$B7PD9"-R"(ET)&@C2@R)3"1LN`````!%A<!U$(7_=0R%]G4(A<EF
+M9F:0=`6X`0```(7`#X0E`@``00^V1AM!B(88GP``2(M$)&!)B88`GP``2(M$
+M)&A)B88(GP``0<:&&9\```%)QX80GP```````$&_`````$&`?AH`#X;=`0``
+M28VN`)\``$F\JZJJJJJJJJI%.+Y0"P``=5=,B??H![+__\9`"`-(B6@01(AX
+M&$B+7"0H2(L3_H(8F0``#[:R&)D``(GQ2"G02"U8"P``2,'X!4D/K\2(A$H8
+MF0``#[9#"XB$2AF9``!`B',+Z5\!``!%.'X;#X15`0``1(GZ#[;"2,'@!$B+
+M3"1(2(T<"$P!\$B-D!`'``"+@!`'``#WT"-$)&")`XM"!/?0(T0D9(E#!(M"
+M"/?0(T0D:(E#"(M"#/?0(T0D;(E##$R)]^A7L?__QD`(`TB):!!$B'@82(E$
+M)$!(BW0D*$B+%OZ"&)D```^VLAB9``")\4B+1"1`2"G02"U8"P``2,'X!4D/
+MK\2(A$H8F0``2(M\)"@/MD<+B(1*&9D``$"(=PNX`````(,[`'46@WL$`'40
+M@WL(`'4*@WL,`&9F9I!T!;@!````A<!T?$2)^`^VV$B)V$C!X`1(BU0D2$B-
+M'!!,B??HM[#__\9`"`%$B'@01(AX$4B+$TB)4!1(BU,(2(E0'$B+3"1`2(L1
+M_H(8F0``#[:R&)D``(GQ2"G02"U8"P``2,'X!4D/K\2(A$H8F0``2(M<)$`/
+MMD,+B(1*&9D``$"(<PM!_\=%.'X:#X<T_O__N`````"#?"10`'45@WPD5`!U
+M#H-\)%@`=0>#?"1<`'0%N`$```"%P`^$8`,``$$/MEX;3(GWZ!&P___&0`@!
+MB%@0B%@12(M4)%!(B5`42(M4)%A(B5`<2(E$)#A(QT0D,`````!!OP````!!
+M@'X:``^&&`,``$4XOE`+```/A/X"``!%.'X;#X3T`@``1(GZ#[;"2,'@!$B+
+M3"1(2(TT"$P!\$B-B!`#``"+5"10(Y`0`P``B1:+1"14(T$$B48$BT0D6"-!
+M"(E&"(M$)%PC00R)1@RX`````(,^`'42@WX$`'4,@WX(`'4&@WX,`'0%N`$`
+M``"%P`^$A`(``$4/MJ90"P``1(GX#[;82,'C!$@#7"1(3(GWZ#"O___&0`@!
+M1(AX$$2(8!%(BQ-(B5`42(M3"$B)4!Q)B<5(@WPD,`!T24B+$/Z"&)D```^V
+MLAB9``")\4B+1"0P2"G02"U8"P``2,'X!4B[JZJJJJJJJJI(#Z_#B(1*&)D`
+M`$$/MD4+B(1*&9D``$&(=0M!#[9>&T4/MJ90"P``1(GX#[;H2(EL)`A(B>A(
+MP>`$2(M4)$A(C2P03(GWZ)&N___&0`@$B%@@1(A@(4B+50!(B5`02(M5"$B)
+M4!A(B40D0$B)1"0P2(L0_H(8F0``#[:R&)D``(GQ2(M$)#A(*=!(+5@+``!(
+MP?@%2+NKJJJJJJJJJD@/K\.(A$H8F0``2(M\)$`/MD<+B(1*&9D``$"(=PM(
+MBQ?^@AB9```/MK(8F0``B?%,B>A(*=!(+5@+``!(P?@%2`^OPXB$2AB9```/
+MMD<+B(1*&9D``$"(=PM(BT0D*$B+$/Z"&)D```^VLAB9``")\4B)^$@IT$@M
+M6`L``$C!^`5(#Z_#B(1*&)D``$B+7"0H#[9#"XB$2AF9``!`B',+00^V7AM(
+MBT0D"$C!X`1(BW0D2$B-+#!,B??H?JW__\9`"`2(6"!$B'@A2(M5`$B)4!!(
+MBU4(2(E0&$B)1"1`2(L0_H(8F0``#[:R&)D``(GQ2(M$)#A(*=!(+5@+``!(
+MP?@%2+^KJJJJJJJJJD@/K\>(A$H8F0``2(M<)$`/MD,+B(1*&9D``$"(<PM(
+MBW0D*$B+%OZ"&)D```^VLAB9``")\4B)V$@IT$@M6`L``$C!^`5(#Z_'B(1*
+M&)D``$B+?"0H#[9'"XB$2AF9``!`B'<+0?_'13A^&@^'Z/S__TR)]^CFR___
+M2(/$>%M=05Q!74%>05_#9F9FD&9FD$%6055!5%532(G]28GV2(U'&$@Y1Q@/
+MA*T"``!)B<5,BV<8#X2@`@``9F9FD&9FD$F-M"3P]/__38LD)$B+#@^V1AK_
+MR$B828G`3`^O1A!(@WD8`'1P2(M)&$B+N8`"``!!N0````!(A?\/A)(```!(
+M.4\(#X6(````@'\H`'0B3`^V441,BY^@````3(G8N@````!)]_),.<!V(H!_
+M*`!U8$@/MDE$2(N_H````$B)^+H`````2/?Q3#G`=D1!N0$```#K/$B+N8`"
+M``!!N0````!(A?]T*D@Y3PAU)(!_*`!T#TPYAZ````!V#X!_*`!U#TPYAZ``
+M``!V!D&Y`0```$6%R0^$A0```,:&5*````#_C2P!``!(C880"P``2(M("$B+
+MEA`+``!(B4H(2(D12(F&$`L``$B)0`A(@[X@"P```'0[2(.^*`L```!T%4B+
+MEB@+``!(BX8@"P``2(F"(`L``$B+EB`+``!(BX8H"P``2(D"2,>&(`L`````
+M``!(B>_H5ZO__^DR`0``9I!-A?9T"4PY-@^%(@$``$B+%DB+6B"+0P@[A3`!
+M```/@Q4!``#V@H`#```!#X6J````QH94H````/^-+`$``$B-AA`+``!(BT@(
+M2(N6$`L``$B)2@A(B1%(B880"P``2(E`"$B#OB`+````=#M(@[XH"P```'05
+M2(N6*`L``$B+AB`+``!(B8(@"P``2(N6(`L``$B+AB@+``!(B0)(QX8@"P``
+M`````$B)[^BAJO__2(-[$`!T>DB+>Q!(BT=(2(M`*$B)0Q#&AZH````"Z```
+M``!(@WL0`'7=ZU7&AE2@```"_XTL`0``2(V6$`L``$B+2@A(BX80"P``2(E(
+M"$B)`4B-12A(BT@(2(E0"$B)AA`+``!(B4H(2(D1_H95H```2(GWZ*?-___K
+M#F9FD&:033GL#X5G_?__6UU!7$%=05[#9F9FD&9F9I!F9I!F9I!!5T%6055!
+M5%532(/L"$F)_(ET)`1!O@````!(BU\(2(U'"$@YV`^$@P$``&9F9I!(C:OP
+M]/__2(N+\/3__P^V@PKU____R$B82(G'2`^ONP#U__](@WD8`'1U2(M)&$B+
+ML8`"``!!N`````!(A?8/A)L```!(.4X(#X61````@'XH`'0B3`^V241,BY:@
+M````3(G0N@````!)]_%(.?AV(H!^*`!U:4@/MDE$2(NVH````$B)\+H`````
+M2/?Q2#GX=DU!N`$```#K169FD&:02(NQ@`(``$&X`````$B%]G0N2#E."'4H
+M@'XH`'0/2#F^H````'8/@'XH`'432#F^H````'8*0;@!````9F9FD$6%P`^$
+MA0```$B+&\:%5*````!(C840"P``2(M("$B+E1`+``!(B4H(2(D12(F%$`L`
+M`$B)0`A$`[58H```2(.](`L```!T.TB#O2@+````=!5(BY4H"P``2(N%(`L`
+M`$B)@B`+``!(BY4@"P``2(N%*`L``$B)`DC'A2`+````````2(GN3(GGZ&*H
+M__](BQM)C40D"$@YV`^%@?[__TF+7"0828U$)!A(.=@/A(4!``!(C:OP]/__
+M2(N+\/3__P^V@PKU____R$B82(G'2`^ONP#U__](@WD8`'1S2(M)&$B+L8`"
+M``!!N`````!(A?8/A)D```!(.4X(#X6/````@'XH`'0B3`^V241,BY:@````
+M3(G0N@````!)]_%(.?AV(H!^*`!U9T@/MDE$2(NVH````$B)\+H`````2/?Q
+M2#GX=DM!N`$```#K0V9FD$B+L8`"``!!N`````!(A?9T+D@Y3@AU*(!^*`!T
+M#T@YOJ````!V#X!^*`!U$T@YOJ````!V"D&X`0```&9F9I!%A<`/A(T```!(
+MBQO&A52@````0?^,)"P!``!(C840"P``2(M("$B+E1`+``!(B4H(2(D12(F%
+M$`L``$B)0`A$`[58H```2(.](`L```!T.TB#O2@+````=!5(BY4H"P``2(N%
+M(`L``$B)@B`+``!(BY4@"P``2(N%*`L``$B)`DC'A2`+````````2(GN3(GG
+MZ,JF__](BQM)C40D&$@YV`^%>_[__X-\)`0`=1M!BX0D*`$``-'H1(GR03F$
+M)"P!```/@AT"``"#?"0$_P^$I0```$0[="0$#X.:````38UL)`A-.6PD"`^$
+MB@```$F+7"0(2(VK\/3__\:%5*````!(BU,(2(L#2(E0"$B)`DB)&TB)6PA$
+M`[58H```2(.](`L```!T.TB#O2@+````=!5(BY4H"P``2(N%(`L``$B)@B`+
+M``!(BY4@"P``2(N%*`L``$B)`DC'A2`+````````2(GN3(GGZ/*E__]$.W0D
+M!`^":____TV-?"0828M<)!A,.?L/A!(!``!-C6PD*$B-J_#T__](BQM(BT4`
+M]H"``P```0^$\@```$B+0""+0`A!.X0D,`$```^#W0```$B)Z4&X`````+\`
+M````9H-]&"&X_____T0/0\!F@WT800]#^+X`````@'T:`'9(0#AQ&W0ZB?(/
+MML)(P>`$2`'(2(V0$`<``(.X$`<``/]U$$0Y0@1U"CEZ"'4%.7H,=`ZX````
+M`.L49F9FD&9FD/_&0#AQ&G>XN`$```"%P)!T7,:%5*````)!_XPD+`$``$B-
+ME1`+``!(BTH(2(N%$`L``$B)2`A(B0%)BT4(28E5"$R)K1`+``!(B4((2(D0
+M_H55H```2(GOZ%+(__]$`[58H```3#G[#X7S_O__1#MT)`1S/D&+G"0P`0``
+M@_L##Y?`@WPD!/\/E,(/ML"%PG0,0<>$)#`!```#````O@````!,B>?HI??_
+M_T&)G"0P`0``1(GRB=!(@\0(6UU!7$%=05Y!7\-F9I!F9I!F9I!54TB#[`A(
+MB?U(BS](Q\8`````Z`````!)B<!(BU`82(U`&$@YT`^$D````$F)P9!(C8+P
+M]/__2#FJ\/3__W5P2(G'NP````"`N@KU__\`=D$/ML-(P>`$2`'X2(V($`,`
+M`+X`````@[@0`P```'42@WD$`'4,@WD(`'4&@WD,`'0%O@$```"%]G4:_\,X
+M7QIWO[@`````A<!T%;@!````Z;P```"X`0```.OK9F9FD$B+$DDYT0^%=/__
+M_TF+4"A)C4`H2#G0#X2/````28G`2(V"\/3__T@YJO#T__]U<$B)Q[L`````
+M@+H*]?__`'9!#[;#2,'@!$@!^$B-B!`#``"^`````(.X$`,```!U$H-Y!`!U
+M#(-Y"`!U!H-Y#`!T!;X!````A?9U%__#.%\:=[^X`````(7`=!6X`0```.L?
+MN`$```#K[F9F9I!F9I!(BQ)).=`/A73___^X`````$B#Q`A;7<-F9F:09F9F
+MD$B#[!A(B5PD"$B);"002(G[2(LO@+^J`````'4'QH>J`````8"[J@````%T
+M0X"[J`````!U.H"[J@````9T,8"[J@````-T*("[J@```!!T'X"[J@````)U
+M"4B+>U#H/1P``,:#J@````MF9I!F9I!(B=_H`````$B)[^@`````2(M<)`A(
+MBVPD$$B#Q!C#D$%7059!54%455-(@^P828G^2(GU08G72,?&`````$B+/^@`
+M````2(E$)!!-BV9838ML)$A(QT0D"`````!)@[PDL`````!T%$$/MH0DJ0``
+M`(/@`0^VP$0Y^'5LN`````!)@[PDN``````/A)<"``!(BT0D$$@%J````$B)
+M!"1(B<?H`````$B)1"0(2(G#1(GZ2(G&3(GG0?^4)+@```"%P'4L2(MT)`A(
+MBSPDZ`````"X`````.E+`@``B4T`2(/%$.D5`@``28N<)+````"^`````$4/
+MMEY@38N&D````$&Z`````$&`O>X`````#X:``0``1(G2#[;"00^VC$7Q````
+M20^VA$7P````2,'@!4J-5"A(.$H0=1)(#[="$DF)P4P#2@@/MWH4ZRPX2A%U
+M&T@/MT(628G!3`-*"`^W>ACK%8E-`$B#Q1#K;$R+2@A!#[>]Z````$0XV0^%
+MW````$2)R$0IP(G!P>$)=$J0187_=!)(BU0D$$B+@C@!``!(B44(ZQ!(BU0D
+M$$B+@D`!``!(B44(QT4$`````('Y`!```':>QT4``!```$B#Q1"!Z0`0``!U
+MMP^WQXG!P>$)BQ.)T"GP.<AR*8GP2`-#"$B)10B)30#'100`````2(/%$`'.
+M.=9U-+X`````2(/#$.LIB?!(`T,(2(E%"(G0*?")10#'100`````2(/%$"G!
+M2(/#$+X`````ZZ1$#[?'30'(20^WAI@```!)`X:0````3#G`=#WK*P'.ZR</
+MM\_!X0F+$XG0*?`YR'?LB=`I\"G!@WL$`'4+2(/#$+X`````Z]]!_\)%.)7N
+M````#X>`_O__00^WAI@```!!BXZ0`````<%$*<'!X0ET3V:0187_=!)(BU0D
+M$$B+@C@!``!(B44(ZQ!(BU0D$$B+@D`!``!(B44(QT4$`````('Y`!````^&
+M\OW__\=%```0``!(@\40@>D`$```=;/'1?0!````2(-\)`@`=!9(BWPD$$B!
+MQZ@```!(BW0D".@`````N`$```!(@\086UU!7$%=05Y!7\-F9F:09F:09F:0
+M2(/L&$B)'"1(B6PD"$R)9"002(G[2(MO6$R+94B`OZH````!=$>`OZH````0
+M=3%(Q\8`````2(M]`.@`````2(G'2(N+D`````^V4V!(BW501`^W@Y@```#H
+MLJW__V:0#[:#J@```(B%J@```$B+?0A(B=[H`````$B+10C_2`A!#[:$).T`
+M``#_P$&(A"3M````03J$).P```!U4X"]J@````!U!\:%J@````$/MH6J````
+M/`$/E<(\!@^5P`^VTH70="*`O:H````#=!F`O:H````"=0E(BWU0Z!`8``#&
+MA:H````+2(GOZ`````"02(L<)$B+;"0(3(MD)!!(@\08PV9F9I!F9I!F9I!F
+M9I!!5T%6055!5%532(/L&$F)]4R+9E!-BU0D($R+=DA)@WPD4`!U$DF#?"18
+M`'4*28U"&$DY0AAT#;@`````9F:0Z1L#``!(C8=P`0``2(E$)!!,C;]P`P``
+MN0````"Z@````$R)^(@(2/_`2/_*=?9!NP````!!@+[J``````^&$@(``$2)
+MV@^VPDC!X`5.BT0P2$R)Q[D`````08!X&@!V00^VP4C!X`1(`?A(C9`0`P``
+MO@````"#N!`#````=1*#>@0`=0R#>@@`=0:#>@P`=`6^`0```(7V=1K_P3A/
+M&G>_N`````"%P'01N`````#I:P(``+@!````Z^M!#[:84*```$$XF%&@```/
+M@M,```!!.%@;=%\/ML-(BTPD$$B-/,%)C31'20^WE(!0GP``20-0$$4/MXR`
+M4I\``&:#/@!T*D@/MP9(B<%(`P]!#[?!2`'02#G(2`]'R$@Y%W8#2(D7B<AF
+M*P=FB0;K:$B)%V9$B0[K7T&`?"00"'5708-Z,$!V4`^VPTB+5"002(T\PDF-
+M#$=)BW`010^W2!AF@SD`="I(#[<!2(G"2`,700^WP4@!\$@YT$@/1]!(.3=V
+M`TB)-XG09BL'9HD!ZP=(B3=F1(D)_\-!.)A1H```#X,M____08!\)!`(#X65
+M````08-Z,$`/AHH```!)#[:04:```$$/MX204)\``$$/MY204I\```'000^W
+M4!@YT'5E03A8&K@`````#T;803A8&W53#[;32(G02(M,)!!(C13128T\1TF+
+M<!!%#[=`&&:#/P!T*D@/MP=(B<%(`PI!#[?`2`'P2#G(2`]'R$@Y,G8#2(DR
+MB<AF*P)FB0?K!TB),F9$B0=!_\-%.)[J````#X?N_?__0<:&[`````!!QH;M
+M`````+L`````08!\)$0`#X:E````#[;K9D&#/&\`#X2)````28M$[&!(B40D
+M"$F+10C_0`A)BWT(Z`````!(B<=)BT4`2(D'28M%"$B)1PA!BT5HB4=H0?Z&
+M[````$$/MP1O9HF'F````$B+5"002(L$ZDB)AY````"`CZD````"2,>'N```
+M``````!(QX?``````````$B+3"0(2(E/4$R);UA(B6]@Z`````#_PT$X7"1$
+M#X=;____N`$```!(@\086UU!7$%=05Y!7\.005=!5D%505154TB#[!A)B?](
+MBS](Q\8`````Z`````!(B40D$$V+;TA)BT=02(E$)`A!]H>I````!`^$9P<`
+M`$&^`````$&`O>H`````#X3M!@``26/&2,'@!4J+;"A(1`^VI5"@``!$.*51
+MH```#X(I`0``1#AE&P^$#P$``$2)X@^VPDB)PDC!X@1,C8PJ$`,```^WE(50
+MGP``#[>\A5*?``"[`````$&Z(````$&[`0```(/Z'W=&#[;#28TT@42)T2G1
+M.?D/1\^#^2!U",<&_____^L-1(G8T^#_R(G1T^`)!D2)T"G0.?AS'(U\%^"Z
+M`````.L*9F9FD&9FD(/J(/_#@/L#=JM$B>(/ML)(B<)(P>($3(V,*A`'```/
+MMY2%4)\```^WO(52GP``NP````!!NB````!!NP$```"#^A]W/P^VPTF--(%$
+MB=$IT3GY#T?/@_D@=0C'!O_____K#42)V-/@_\B)T=/@"09$B=`IT#GX<Q6-
+M?!?@N@````#K`X/J(/_#@/L#=K)!_\1$.*51H```#X/7_O__0?:'J0````@/
+MA($%``!(BU0D"$B+@H`"``!(A<!U"TB+0AA(BX"``@``@'@H``^$LP(``$0/
+MMJ50H```1(GA#[;!#[>TA5"?``!FA?8/A!`!``!(P>`$3(V4*!`#``!!N```
+M```/M_Z[`````$&[(````$&#^!]W1@^VPTF-%()$B=E$*<$Y^0]'SX/Y('4(
+MQP+_____ZQ"X`0```-/@_\A$B<'3X`D"1(G81"G`.?AS&$*-?`?@0;@`````
+MZP1!@^@@_\.`^P-VJ42)X$0/MM!,B=!(P>`$3(V4*!`'``!!N``````/M_Z[
+M`````$&[(````$&#^!]W1@^VPTF-%()$B=E$*<$Y^0]'SX/Y('4(QP+_____
+MZQ"X`0```-/@_\A$B<'3X`D"1(G81"G`.?AS&$*-?`?@0;@`````ZP1!@^@@
+M_\.`^P-VJ0^WUD2)X0^VP4B+?,4@O@````#H'Y;__T&\`````("]4*`````/
+MAAD$``!$.&4;#X12`0``1(GB#[;"2,'@!$@!Z$B-D!`'``"Y`````(.X$`<`
+M``!U$H-Z!`!U#(-Z"`!U!H-Z#`!T!;D!````A<D/A1$!``!$B>$/ML%(P>`$
+M3(V,*!`#``"_``````^W=1B[`````$&Z(````$&[`0```&9FD&:0@_\?=S\/
+MML-)C12!1(G1*?DY\0]'SH/Y('4(QP+_____ZPU$B=C3X/_(B?G3X`D"1(G0
+M*?@Y\',5C70^X+\`````ZP.#[R#_PX#[`W:R1(G@1`^VR$R)R$C!X`1,C8PH
+M$`<``+\`````#[=U&+L`````0;H@````0;L!````9I"#_Q]W/P^VPTF-%(%$
+MB=$I^3GQ#T?.@_D@=0C'`O_____K#42)V-/@_\B)^=/@"0)$B=`I^#GP<Q6-
+M=#[@OP````#K`X/O(/_#@/L#=K)$B>(/ML)(BWS%(.CRD___9I!!_\1$.*50
+MH```#X>4_O__Z:@"``!$#[:E4:```$2)X`^VR`^WA(U0GP``B<9F`[2-4I\`
+M`&8Y=1@/A@H!``!(B<A(P>`$3(V4*!`#```/M]8/MWT8*=>[`````$&[(```
+M`(/Z'W=##[;#38T$@D2)V2G1.?D/1\^#^2!U"4''`/_____K$+@!````T^#_
+MR(G1T^!!"0!$B=@IT#GX<Q6-?!?@N@````#K`X/J(/_#@/L#=JY$B>!$#[;0
+M3(G02,'@!$R-E"@0!P``#[?6#[=]&"G7NP````!!NR````"#^A]W0P^VPTV-
+M!()$B=DIT3GY#T?/@_D@=0E!QP#_____ZQ"X`0```-/@_\B)T=/@00D`1(G8
+M*=`Y^',5C7P7X+H`````ZP.#ZB#_PX#[`W:N#[=5&`^W]BGR1(GA#[;!2(M\
+MQ2#H9Y/__T'_Q$0X91H/AF<!``!$.&4;#X10`0``1(GB#[;"2,'@!$@!Z$B-
+MD!`'``"Y`````(.X$`<```!U$H-Z!`!U#(-Z"`!U!H-Z#`!T!;D!````A<D/
+MA0\!``!$B>$/ML%(P>`$3(V,*!`#``"_``````^W=1B[`````$&Z(````$&[
+M`0```&9FD(/_'W<_#[;#28T4@42)T2GY.?$/1\Z#^2!U",<"_____^L-1(G8
+MT^#_R(GYT^`)`D2)T"GX.?!S%8UT/N"_`````.L#@^\@_\.`^P-VLD2)X$0/
+MMLA,B<A(P>`$3(V,*!`'``"_``````^W=1B[`````$&Z(````$&[`0```&:0
+M@_\?=S\/ML-)C12!1(G1*?DY\0]'SH/Y('4(QP+_____ZPU$B=C3X/_(B?G3
+MX`D"1(G0*?@Y\',5C70^X+\`````ZP.#[R#_PX#[`W:R1(GB#[;"2(M\Q2#H
+M0I'__V:00?_$1#AE&@^'F?[__T'_QD$/MH7J````1#GP#X\3^?__2(M,)`B`
+MN8$#```"=`I!]H>I````"'1.0;X`````08"]Z@````!T-$ECQDC!X`5*BVPH
+M2$C'A4"?````````2(GN2(M\)!#H4YS__T'_QD$/MH7J````1#GP?\Q,B?_H
+M*_#__^LQ0;X`````08"]Z@````!T(4ECQDC!X`5*BWPH2.AXMO__0?_&00^V
+MA>H```!$.?!_WTB#Q!A;74%<05U!7D%?PV9FD&9FD&9FD$%7059!54%455-(
+M@^P02(G52(M^2$R+=E!!N0````!%#[=F1F9!@?R!`+B`````1`]#X&9$B:?H
+M````1(G@9L'H`P^WT(72N`$````/1-!!#[9.1$&`?D0$=A:-0?W1^`'!B4PD
+M"`^O5"0(B50D".L/_\&)3"0(#Z]4)`B)5"0(@+ZH`````74@QH?J`````4C'
+M1T@`````2(M%$$B)1U"+1"0(Z3\"``!(#[9-(DB+=0!(B?"Z`````$CW\4&)
+MT@^V12*(1"0/08!^$`AU&$D/MDY$2(MU"$B)\+H`````2/?Q*%0D#T0Z5"0/
+M08#:_T$/MU9&C4+_#[=-&"'!B=9F*<YF.74@<P0/MW4@QH?J`````,:'ZP``
+M``#&A^X`````QT0D!`````!!O0$```!!C40D_V:)1"0"00^WQ/?83&/X#[?!
+M28G#3`-=$&9FD`^W1"0"1"'81(GA9BG!9CGQ#T?.38GX32'8187M='5!O0``
+M``!F13EF1G8LN@`````/MH?J````B<.#^`!^&9!(8\)(P>`%3(U,.$A-.4$(
+M=$+_PCG3?^@/MH?J````C5`!B)?J````#[;`2,'@!4@!^$R-2$A(QT!(````
+M`$V)00A!QD$00$'&01$`BU0D"`%4)`1%.%$0=A5%B%$01(G89D0IP&9!B4$2
+M9D&)211%.%$1<Q5%B%$11(G89D0IP&9!B4$69D&)21A(#[:'[@```$R)RD@I
+M^DB#ZDA(P?H%B)1'\````$@/MH?N````1(B41_$```#^A^X```!F*4T@9BG.
+M=!$/M\%)`<-!O0$```#IZ?[__V:#?2``=':Y`````$'_PD0Z5"0/#Y3`00'"
+M13A61'4V08!^$`AU%8!\)`\`=`;^3"0/ZP@/MD4BB$0D#X!\)`\`00^4PDD/
+MMT9&2`%%$$&]`0```.L.9D4Y9D:X`0```$0/1^@/MW4@9D$[=D8/AFG^__]!
+M#[=V1NE?_O__BT0D!$B#Q!!;74%<05U!7D%?PV9FD&9FD&9FD$B#[`A(B?"%
+MTG05QH:J````"TB)]^C&[/__ZRAF9F:02(MV2$C'1C``````2(E&.$C'1D``
+M````2(/&,$B+..@`````2(/$",-F9F:09F:0059!54%455-)B?U(BS](Q\8`
+M````Z`````!)B<9)BVU(0;P`````@+WJ`````'0T26/<2,'C!4@!ZP^WC>@`
+M``!)BW502(M34$R)]^C_D/__2(E#2$'_Q`^VA>H```!$.>!_S$R)[^@D!```
+M@_@"=3]!O`````"`O>H`````="-)8\1(P>`%2(MT*$A,B??H3);__T'_Q`^V
+MA>H```!$.>!_W4F+/N@`````9F:09I!;74%<05U!7L-F9F:09F:005154TF)
+M_$F)T4B)S;L`````@+GJ``````^$A@```$ACPTC!X`5,C40H2$B+5B!)BT`(
+M#[9.1=/H)?\!``!(BQ)(BSS"2(7_="9F9I!F9I!)BT`(2#E'$'0.2(N_*`L`
+M`$B%_W7JZPA)B3A(A?]U)(7;?A;_RTACPTC!X`5(QT0H2`````"%VW_JN/__
+M___I#0$``/_##[:%Z@```#G8#X]Z____NP````"`O>H`````#X2@````2&/#
+M2,'@!4B+?"A(@+]4H````74TQH=4H````$B-AQ`+``!(BT@(2(N7$`L``$B)
+M2@A(B1%(B8<0"P``2(E`".M'9F9FD&9FD("_5*````-U-\:'5*````!!_XPD
+M+`$``$B-AQ`+``!(BT@(2(N7$`L``$B)2@A(B1%(B8<0"P``2(E`"&9F9I#^
+MAU6@``#_PP^VA>H````YV`^/8/___TR)S^AQ`@``@_@"=3B[`````("]Z@``
+M``!T(4ACPTC!X`5(BW0H2$R)Y^B:E/___\,/MH7J````.=A_WTF+/"3H````
+M`+@`````6UU!7,-F9F:09F:09F:02(/L6$B)7"0P2(EL)#A,B60D0$R);"1(
+M3(ET)%!(B?M,BR](Q\8`````3(GOZ`````!)B<9,BV-028ML)""`NZ@````$
+M=3Y(BT-(2(M5$$B)4"A(B5T03(GGZ%'H__^%P'023(GF3(GWZ,+?__]FD.E_
+M`0``3(GGZ!.3__]F9I#I;P$``("[J``````/A>0```#V@ZD````&=17&@ZH`
+M```!2(G?Z`````#I10$``)#V@ZD````$=#?'13``````2(-]$`!T54B+?1!(
+MBT=(2(M`*$B)11#&AZH````!Z`````!(@WT0`'7=ZS!F9F:02(N#D````$@Y
+M12AU!?]%,.L'QT4P`````$@/MX.8````2`.#D````$B)12A(BY.0````2(E4
+M)!@/MX.8````9HE$)"!!#[9$)$3_R(A$)")!#[9,)$5(T^I(B=%(B10D#[;0
+M2(G(2(G7N@````!(]_=(B40D"$$/MDPD14C3X$B)1"00ZRU)@WPD6`!T$L:#
+MJ@````9(B=_H`````.MED$D/MT0D1D@/KX.0````2(E$)!!(BVM(2(GB2(G>
+M3(GOZ(OX__^)10!(QT4@`````$B)Z4B)VDR)YDR)]^A__/__A<!T'TC'10@`
+M````2(E=$$C'11@`````2(GN3(GOZ`````!(BUPD,$B+;"0X3(MD)$!,BVPD
+M2$R+="102(/$6,-F9F:09F9FD&9FD&9FD$%455-(B?U(BS](Q\8`````Z```
+M``!)B<1(BUU(0;@`````@+OJ`````'1Y9F9FD$ECP$C!X`5(BW082("^5*``
+M``)U44B)]TB)Z4B#ODB?````="A(BU5(2(N&2)\``$B+0$A(BT`H2(E"*$B+
+MADB?``!(BT!(2(EH*.L(2(M%2$B):"A(B8](GP``N`$```#I"0(``$'_P`^V
+M@^H```!$.<!_BT&X`````("[Z@`````/A-L```!)8\!(P>`%2`'82(UX2$B+
+M<$B`O:@`````#X6I````#[9'$(B&4*````^V1Q&(AE&@```/MHY0H```#[;`
+M.<@/C(,```!F9I`/MH90H```.<AU'4ACP0^W5Q)FB92&4)\```^W5Q1FB92&
+M4I\``.M)#[:&4:```#G(=1U(8\$/MU<69HF4AE"?```/MU<89HF4AE*?``#K
+M(0^V1ALYR'092&/19L>$EE"?``````^W1AAFB8264I\``/_!#[:&4:```#G(
+M?8)FD$'_P`^V@^H```!$.<`/CR7____VA:D````"=$E(B>Y,B>?H&>O__X3`
+M=#I!N`````"`N^H`````="%)8\!(P>`%2(M$&$C^B%6@``!!_\`/MH/J````
+M1#G`?]^X`@```.FZ````0;@`````@+OJ`````'1D28U\)"AF9F:09F:026/`
+M2,'@!4B+=!A(QH94H````DB-EA`+``!(BTH(2(N&$`L``$B)2`A(B0%(BT<(
+M2(E7"$B)OA`+``!(B4((2(D02(FN0)\``$'_P`^V@^H```!$.<!_J/:%J0``
+M``1T%$C'P@````!(B>Y,B>?H_8O__^LE2(MU2$C'1C``````2(EN.$C'1D``
+M````2(/&,$B+?0#H`````+@`````6UU!7,-F9F:09F9FD&9F9I!32(M?($B#
+M>Q``="=F9F:02(M[$$B+1TA(BT`H2(E#$,:'J@````WH`````$B#>Q``==U;
+MPV9F9I!F9F:09F:04TB)^TC'Q@````!(BS_H`````$B+6R!(C;B(````Z```
+M``!(B0.X_____TB#.P!T*KD`````N@`0``!(BP-FD(@(2/_`2/_*=?9(C4,8
+M2(E#&$B)0R"X`````%O#9F:0055!5%532(/L"$B)^TB+/TC'Q@````#H````
+M`$B)Q4R+:R!)@WT```^$#@$``$&\`````$ECU$F+10!(BS302(7V#X2-````
+M@+Y4H````W4SQH94H````/^-+`$``$B-AA`+``!(BT@(2(N6$`L``$B)2@A(
+MB1%(B880"P``2(E`".LKQH94H````$B-AA`+``!(BT@(2(N6$`L``$B)2@A(
+MB1%(B880"P``2(E`"$C'AB`+````````2(N>*`L``$B)[^C7AO__2(G>2(7;
+M#X5S____0?_$08'\_P$```^&3____TB-O8@```!)BW4`Z`````!)QT4`````
+M`$F+=1A(BQY)C4482#GP="])B<1(BU8(2(L&2(E0"$B)`DB)-DB)=@A(C;T(
+M`0``Z`````!(B=Y(BQM).?1UU$B#Q`A;74%<05W#9F:09F:09F:02(/L"+D`
+M````O@````"`?T0`=#!!N`$````/ME=$9I")R$B+1,=@2(7`=`GV@(`#```!
+M=0E,B<!(T^!("<;_P3G*=]Q(.7=8=`E(B7=8Z`````!(@\0(PV9F9I!F9F:0
+M55-(@^P(2(G]2(M?&.@`````O@````"`>T0`="!F9I")\$@Y;,-@=0I(B=_H
+MWY;__^L*_\8/MD-$.?!WX_:#@`,```%T*O:#8`(```1U(4B)W^@YX?__A<!T
+M%>@`````B4,\2(G?Z`````!F9I!FD$B#Q`A;7<-F9I!F9I!F9I!!54%44TF)
+M_$F)]4C'Q@````#H`````$B)PTR)Y^@`````B8,H`0``P>`,08G$0<'L$$B-
+M>VA$B>&ZB*```$R)[N@`````06O,7DB->TBZ"`$``$R)[N@`````2(V[B```
+M`+D0````N@`0``!,B>[H`````$B-NZ@```"Y`0```+H@`0``3(GNZ`````#'
+M@S`!```#````Z`````!IBS`!```0"```2(V[Z````(G"3(GNZ`````!(C;O(
+M````0;@!````N0`0``"Z`!```$R)[N@`````2(V["`$``+D0````NB````!,
+MB>[H`````%M!7$%=PV9F9I!F9F:09F:005132(/L"$F)_$C'Q@````#H````
+M`$B)PTR)($B-0`A(B4,(2(E#$$B-0QA(B4,82(E#($B-0RA(B4,H2(E#,$B-
+M0SA(B4,X2(E#0(N3\````$B-L^@```!,B>?H`````$B)@T@!``!(C;-``0``
+M2(V[R````.@`````2(F#.`$``$B)FU`!``!(QX-8`0```````$C'@V`!````
+M````2(VS4`$``$R)Y^@`````2(/$"%M!7,-F9F:09F:09F:04TC'Q@````#H
+M`````$B)PTB+L$@!``!(C;CH````Z`````!(BY-``0``2(NS.`$``$B-N\@`
+M``#H`````%O#D%-(B?M(Q\8`````2(L_Z`````!(B<9!N/____](@WL8`'0Q
+MN0````!(BT,82(G"@'A$`'0?2(G'2&/!2#E<PF!U!4&)R.L-_\%(B?H/MD=$
+M.<A_Y$B+5AA(C4882#G0="=(B<%(.9KP]/__=1.+0SB)@OCT__]$B((,]?__
+M9F:02(L22#G1==Q(BU8H2(U&*$@YT'0D2(G!2#F:\/3__W40BT,XB8+X]/__
+M1(B"#/7__TB+$D@YT77?2(M6"$B-1@A(.=!T,DB)P69F9I!F9I!(.9KP]/__
+M=1>+0SB)@OCT__]$B((,]?__9F9FD&9FD$B+$D@YT7786\-F9I!F9I!(@^P(
+MQ@4``````4C'QP````#H`````+@`````2(/$",.0D)"0D)"0D)"0D)"0D)!3
+M2(GS2,?&`````.@`````2(G'N0$```"Z(`$``$B)WN@`````6\-F9I!F9I!F
+M9I!32,?&`````.@`````2(G#2(G'Z`````!(B4,@6\-FD$B#[`A(Q\8`````
+MZ`````!(B<=(BW`@Z`````!(@\0(PV9F9I!F9F:09F9FD&9FD$B#[#A(B5PD
+M"$B);"003(ED)!A,B6PD($R)="0H3(E\)#!)B?U(B?5!B==,BV=838MT)$A)
+MBYPDL````$C'Q@````!(BS_H`````$B+4"!(A=MT%$$/MH0DJ0```(/@`0^V
+MP$0Y^'4M2(G328.\)+@`````=!5$B?I(B=Y,B>=!_Y0DN````(7`=0JX````
+M`.G(````08!^"?\/A)@```!!#[=6"L'B"8L+.<IV+F:020^V1@A).45@=15(
+MBP-(B44`2(M#"$B)10A(@\409I`IRDB#PQ"+"SG*=]1)#[9&"$DY16!U&4B+
+M0PA(B44(B54`QT4$`0```+@!````ZUTYRG,PB=!(`T,(2(E%"(G(*=")10"#
+M>P0`=`['100!````N`$```#K-,=%!`````!(@\402(/#$$B+`TB)10!(BT,(
+M2(E%"$B#Q1!(C4,$2(/#$(,X`'3@N`$```!(BUPD"$B+;"003(MD)!A,BVPD
+M($R+="0H3(M\)#!(@\0XPU532(/L"$B)^DB+7UA(BVM(#[9/8$C'P/[___](
+MT\!((440@+^J`````70-#[:'J@```(B#J@```$B+>PA(B=;H`````$B+0PC_
+M2`A(@WT0`'48@+NJ`````'4'QH.J`````4B)W^@`````2(/$"%M=PV9F9I!F
+M9F:09F:09F:02(M.2$`X>0AU%@^W00IFB8*8````2(L!2(F"D````,,/MT$,
+M9HF"F````$C'@I``````````PV9FD&9FD&9FD%-,BT9(3(N.D````$0/MY:8
+M````NP````"Y`````(!_1`!T?D4/M]J)R$B+5,=@3#E**'9?38D(08A("+\!
+M````2(G^2-/F28EP$$N-!`M(.T(H=C.[`0```(U!`4&(0`G_P4C3YTB)^4@)
+M\4F)2!!(BT(H9D0IR&9!B4`*9D$IPF9%B5`,ZQI!QD`)_V9%B5`*ZPY,*THH
+M_\$/MD=$.<AWAHG86\-F9F:09F:09F:02(/L2$B)7"082(EL)"!,B60D*$R)
+M;"0P3(ET)#A,B7PD0$F)_$R+?U!(BT=(2(E$)!"`OZ@````$#X73````2,=`
+M$`````!!O@````!!@']$``^&JP$``$2)\@^VVDV+;-]@387M#X24````0?:%
+M@`,```$/A(8```"X`0```$2)\4C3X$B+5"002`E"$$F+1"0(_T`(28M\)`CH
+M`````$B)Q4F+!"1(B44`28M$)`A(B44(08M$)&B)16A,B6U0QH6H````!$$/
+MMI0DJ0```(/B,`^VA:D```"#X,\)T(B%J0```$C'A<``````````3(EE6$B)
+M76!(B>_H`````$'_QD4X=T0/ATO____I\0```$B)_DR)_^@S_O__2(M,)!!(
+M@WD0`'470<:$)*H````"3(GGZ`````#IQ````)!!O@````!!@']$``^&L@``
+M`$$/ML:)1"0,N`$````/MDPD#$C3X$B+5"002(5"$`^$@0```$2)\0^VV4V+
+M;-]@28M$)`C_0`A)BWPD".@`````2(G%28L$)$B)10!)BT0D"$B)10A!BT0D
+M:(E%:$R);5!!#[:$)*D```"(A:D```!(QX7``````````$C'A;@`````````
+M3(EE6$B)76!(B>I,B>:+?"0,Z"+]__](B>_H`````$'_QD4X=T0/AT[___](
+MBUPD&$B+;"0@3(MD)"A,BVPD,$R+="0X3(M\)$!(@\1(PV9F9I!F9I!F9I!(
+M@^P(2,?'`````.@`````N`````!(@\0(PP``````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````4F]C:V5T4D%)1"`R-S)X7S%X(%-!4R!#
+M;VYT<F]L;&5R````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````4F]C:V5T4D%)1"`R
+M-S9X(%-!4R!#;VYT<F]L;&5R````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````````````````````!2;V-K971204E$(#(W.'@@
+M4T%3($-O;G1R;VQL97(`````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````````````````````````````````````!2;V-K
+M971204E$(#(W-'A?,W@@4T%3($-O;G1R;VQL97(`````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````````!L````!````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M``!-5E]297%U97-T("5P.B!#9&);)3)X+"4R>"PE,G@L)3)X+"`E,G@L)3)X
+M+"4R>"PE,G@L("4R>"PE,G@L)3)X+"4R>"P@)3)X+"4R>"PE,G@L)3)X72X`
+M-2!2971R>6EN9R!F86EL960L(&1I<VL@9&]W;B$A(0!487-K(&9I;&4@97)R
+M;W(L(%-T871U<U)E9STP>"5X+"!%<G)296<],'@E>"P@3$)!6S`M,UT],'@E
+M>"Q,0D%;-"TW73TP>"5X+@```````$1E=FEC92!E<G)O<B!I;F9O<FUA=&EO
+M;B`P>"5L;%@`071T1&5V4T%3061D<ELE>%T@(%M5;FET260@)7A=('-A<R!A
+M9&1R("4P,G@M)3`R>"TE,#)X+24P,G@M)3`R>"TE,#)X+24P,G@M)3`R>`!S
+M86UE('-A<R!A9&1R("4P,G@M)3`R>"TE,#)X+24P,G@M)3`R>"TE,#)X+24P
+M,G@M)3`R>````$1E=FEC92`E>"!I;B!S=&%N9&)Y(&UO9&4L('-T87)T('1O
+M('!O=V5R(&ET('5P+@``````````4W1A<G0@=&\@<&]W97(@=7`@9&5V:6-E
+M("5X+BXN``!P;W)T(')E<V5T(&YO="!C;VUP;&5T92!S=6-C97-S+"!I9VYO
+M<F4@=&AE('!O<G0@*"5X*0```$%T=&%C:&5D(&1E=FEC92!I;F1E>"`E,#)X
+M("A0871H("4P,G@@?"!487)G970@)3`R>"!\($4E>"]3)3`R>"D@("5X)7@E
+M>"5X)7@E>"5X)7@```````!-5E]297%U97-T("5P.B!#9&);)3)X+"4R>"PE
+M,G@L)3)X+"`E,G@L)3)X+"4R>"PE,G@L("4R>"PE,G@L)3)X+"4R>"P@)3)X
+M+"4R>"PE,G@L)3)X72X`-2!2971R>6EN9R!F86EL960L(&1I<VL@9&]W;B$A
+M(0!487-K(&9I;&4@97)R;W(L(%-T871U<U)E9STP>"5X+"!%<G)296<],'@E
+M>"P@3$)!6S`M,UT],'@E>"Q,0D%;-"TW73TP>"5X+@```````$1E=FEC92!E
+M<G)O<B!I;F9O<FUA=&EO;B`P>"5L;%@`071T1&5V4T%3061D<ELE>%T@(%M5
+M;FET260@)7A=('-A<R!A9&1R("4P,G@M)3`R>"TE,#)X+24P,G@M)3`R>"TE
+M,#)X+24P,G@M)3`R>`!S86UE('-A<R!A9&1R("4P,G@M)3`R>"TE,#)X+24P
+M,G@M)3`R>"TE,#)X+24P,G@M)3`R>````$1E=FEC92`E>"!I;B!S=&%N9&)Y
+M(&UO9&4L('-T87)T('1O('!O=V5R(&ET('5P+@``````````4W1A<G0@=&\@
+M<&]W97(@=7`@9&5V:6-E("5X+BXN``!P;W)T(')E<V5T(&YO="!C;VUP;&5T
+M92!S=6-C97-S+"!I9VYO<F4@=&AE('!O<G0@*"5X*0```$%T=&%C:&5D(&1E
+M=FEC92!I;F1E>"`E,#)X("A0871H("4P,G@@?"!487)G970@)3`R>"!\($4E
+M>"]3)3`R>"D@("5X)7@E>"5X)7@E>"5X)7@```````!-5E]297%U97-T("5P
+M.B!#9&);)3)X+"4R>"PE,G@L)3)X+"`E,G@L)3)X+"4R>"PE,G@L("4R>"PE
+M,G@L)3)X+"4R>"P@)3)X+"4R>"PE,G@L)3)X72X`-2!2971R>6EN9R!F86EL
+M960L(&1I<VL@9&]W;B$A(0!487-K(&9I;&4@97)R;W(L(%-T871U<U)E9STP
+M>"5X+"!%<G)296<],'@E>"P@3$)!6S`M,UT],'@E>"Q,0D%;-"TW73TP>"5X
+M+@```````$1E=FEC92!E<G)O<B!I;F9O<FUA=&EO;B`P>"5L;%@`071T1&5V
+M4T%3061D<ELE>%T@(%M5;FET260@)7A=('-A<R!A9&1R("4P,G@M)3`R>"TE
+M,#)X+24P,G@M)3`R>"TE,#)X+24P,G@M)3`R>`!S86UE('-A<R!A9&1R("4P
+M,G@M)3`R>"TE,#)X+24P,G@M)3`R>"TE,#)X+24P,G@M)3`R>````$1E=FEC
+M92`E>"!I;B!S=&%N9&)Y(&UO9&4L('-T87)T('1O('!O=V5R(&ET('5P+@``
+M````````4W1A<G0@=&\@<&]W97(@=7`@9&5V:6-E("5X+BXN``!P;W)T(')E
+M<V5T(&YO="!C;VUP;&5T92!S=6-C97-S+"!I9VYO<F4@=&AE('!O<G0@*"5X
+M*0```$%T=&%C:&5D(&1E=FEC92!I;F1E>"`E,#)X("A0871H("4P,G@@?"!4
+M87)G970@)3`R>"!\($4E>"]3)3`R>"D@("5X)7@E>"5X)7@E>"5X)7@`````
+M``!-5E]297%U97-T("5P.B!#9&);)3)X+"4R>"PE,G@L)3)X+"`E,G@L)3)X
+M+"4R>"PE,G@L("4R>"PE,G@L)3)X+"4R>"P@)3)X+"4R>"PE,G@L)3)X72X`
+M-2!2971R>6EN9R!F86EL960L(&1I<VL@9&]W;B$A(0!487-K(&9I;&4@97)R
+M;W(L(%-T871U<U)E9STP>"5X+"!%<G)296<],'@E>"P@3$)!6S`M,UT],'@E
+M>"Q,0D%;-"TW73TP>"5X+@```````$1E=FEC92!E<G)O<B!I;F9O<FUA=&EO
+M;B`P>"5L;%@`071T1&5V4T%3061D<ELE>%T@(%M5;FET260@)7A=('-A<R!A
+M9&1R("4P,G@M)3`R>"TE,#)X+24P,G@M)3`R>"TE,#)X+24P,G@M)3`R>`!S
+M86UE('-A<R!A9&1R("4P,G@M)3`R>"TE,#)X+24P,G@M)3`R>"TE,#)X+24P
+M,G@M)3`R>````$1E=FEC92`E>"!I;B!S=&%N9&)Y(&UO9&4L('-T87)T('1O
+M('!O=V5R(&ET('5P+@``````````4W1A<G0@=&\@<&]W97(@=7`@9&5V:6-E
+M("5X+BXN``!P;W)T(')E<V5T(&YO="!C;VUP;&5T92!S=6-C97-S+"!I9VYO
+M<F4@=&AE('!O<G0@*"5X*0```$%T=&%C:&5D(&1E=FEC92!I;F1E>"`E,#)X
+M("A0871H("4P,G@@?"!487)G970@)3`R>"!\($4E>"]3)3`R>"D@("5X)7@E
+M>"5X)7@E>"5X)7@```````!;)60@)61=(&1E=FEC92!E<F%S92!U;FET('-U
+M8V-E<W-F=6QL>2X`6R5D("5D72!D979I8V4@97)A<V4@=6YI="!F86EL960@
+M;W(@86)O<G1E9"X`1&5V:6-E7TED/25D`$1E=FEC92`E>"\E>"!R96UO=F5D
+M+@!$979I8V4@)7@O)7@@<F5M;W9E9"X`<W1A<G0@4T53(&1E=FEC92`E<`!$
+M979I8V4@)7@@<&]W97)E9"!U<"X`1F]U;F0@4T53($1E=FEC92`E>`!&86EL
+M960@=&\@=F5R:69Y(&-O;G1R;VQL97(`;V1I;@!$979I8V5?260])60`1&5V
+M:6-E("5X+R5X(')E;6]V960N`$1E=FEC92`E>"\E>"!R96UO=F5D+@!S=&%R
+M="!315,@9&5V:6-E("5P`$1E=FEC92`E>"!P;W=E<F5D('5P+@!&;W5N9"!3
+M15,@1&5V:6-E("5X`$9A:6QE9"!T;R!V97)I9GD@8V]N=')O;&QE<@!O9&EN
+M`$1E=FEC95])9#TE9`!$979I8V4@)7@O)7@@<F5M;W9E9"X`1&5V:6-E("5X
+M+R5X(')E;6]V960N`'-T87)T(%-%4R!D979I8V4@)7``1&5V:6-E("5X('!O
+M=V5R960@=7`N`$9O=6YD(%-%4R!$979I8V4@)7@`1F%I;&5D('1O('9E<FEF
+M>2!C;VYT<F]L;&5R`&]D:6X`1&5V:6-E7TED/25D`$1E=FEC92`E>"\E>"!R
+M96UO=F5D+@!$979I8V4@)7@O)7@@<F5M;W9E9"X`<W1A<G0@4T53(&1E=FEC
+M92`E<`!$979I8V4@)7@@<&]W97)E9"!U<"X`1F]U;F0@4T53($1E=FEC92`E
+M>`!&86EL960@=&\@=F5R:69Y(&-O;G1R;VQL97(`;V1I;@!!=71O(%)E8G5I
+M;&0`4F5B=6EL9"!0<FEO<FET>0!#;VYT:6YU92!296)U:6QD:6YG(&]N($5R
+M<F]R`%-P:6YD;W=N($ED;&4@1&ES:R`H;6EN=71E<RD`4W1A9V=E<F5D('-P
+M:6YU<`!&86EL960@=&\@9FQU<V@@=&%R9V5T<P!&86EL960@=&\@<W!I;F1O
+M=VX@9&5V:6-E<P``````````````````````````````````````````````
+M`)8P!W<L80[NNE$)F1G$;0>/]&IP-:5CZ:.59)XRB-L.I+C<>1[IU>"(V=*7
+M*TRV";U\L7X'+;CGD1V_D&00MQWR(+!J2'&Y\]Y!OH1]U-H:Z^3=;5&UU/3'
+MA=.#5IAL$\"H:V1Z^6+][,EEBD]<`139;`9C8ST/^O4-"(W((&X[7A!I3.1!
+M8-5R<6>BT>0#/$?4!$O]A0W2:[4*I?JHM35LF+)"ULF[VT#YO*SC;-@R=5S?
+M1<\-UMQ9/=&KK##9)CH`WE&`4=?(%F'0O[7TM"$CQ+-6F96ZSP^EO;B>N`(H
+M"(@%7[+9#,8DZ0NQAWQO+Q%,:%BK'6'!/2UFMI!!W'8&<=L!O"#2F"H0U>^)
+MA;%Q'[6V!J7DOY\SU+CHHLD'>#3Y``^.J`F6&)@.X;L-:G\M/6T(EVQDD0%<
+M8^;T46MK8F%L'-@P985.`&+R[94&;'NE`1O!]`B"5\0/]<;9L&50Z;<2ZKB^
+MBWR(N?S?'=UB22W:%?-\TXQE3-3[6&&R3<Y1M3IT`+RCXC"[U$&EWTK7E=@]
+M;<31I/OTUM-JZ6E#_-EN-$:(9ZW0N&#:<RT$1.4=`S-?3`JJR7P-W3QQ!5"J
+M00(G$!`+OH8@#,DEM6A7LX5O(`G49KF?Y&'.#OG>7IC)V2DBF-"PM*C7QQ<]
+MLUF!#;0N.UR]MZULNL`@@[CMMK._F@SBM@.:TK%T.4?5ZJ]WTIT5)ML$@Q;<
+M<Q(+8^.$.V24/FIM#:A::GH+SP[DG?\)DR>N``JQG@=]1),/\-*C"(=H\@$>
+M_L(&:5U78O?+9V6`<39L&><&:VYV&]3^X"O3B5IZVA#,2MUG;]^Y^?GOOHY#
+MOK<7U8ZP8.BCUM9^D]&AQ,+8.%+RWT_Q9[O19U>\IMT&M3]+-K)(VBL-V$P;
+M"J_V2@,V8'H$0</O8-]5WV>H[XYN,7F^:4:,LV'+&H-FO*#2;R4VXFA2E7<,
+MS`-'"[NY%@(B+R8%5;X[NL4H"[VRDEJT*P1JLURG_]?",<_0M8N>V2P=KMY;
+ML,)DFR;R8^R<HVIU"I-M`JD&"9P_-@[KA6<'<A-7``6"2K^5%'JXXJXKL7LX
+M&[8,FX[2D@V^U>6W[]Q\(=_;"]32TX9"XM3Q^+/=:&Z#VA_-%KZ!6R:Y]N%W
+ML&]W1[<8YEH(B'!J#__*.P9F7`L!$?^>98]IKF+XT_]K847/;!9XX@J@[M(-
+MUU2#!$["LP,Y829GI_<68-!-1VE)VW=N/DIJT:[<6M;99@O?0/`[V#=3KKRI
+MQ9Z[WG_/LD?I_[4P'/*]O8K"NLHPD[-3IJ.T)`4VT+J3!M?-*5?>5+]GV2,N
+M>F:SN$IAQ`(;:%V4*V\J-[X+M*&.#,,;WP5:C>\"+0`@```$1````"`!``1$
+M```"`0```CH```(!`0`".@``!`$```L````$`0$`"P````@!```&6@$`"`$!
+M``9:`0`0`0```Q0!`!`!`0`#%`$`(`$```8H```@`0$`!B@``$`!```#$0``
+M0`$!``<G``"``0``"T<#`(`!`0`+1P,`!@0%`0,"(&"04%(```````8$!0$#
+M`E)B%0`````````&!`4!`P+88)\V.3P`````!@0%`0,"V&"0``````````0%
+M!@<``0(#````````````````````````````````JQ&`D0```````@``````
+M```````!````JQ&`E````````@`````````````!````2QN`E````````@``
+M```````````!`````Q$@)P```````@`````````````!`````Q$A)P``````
+M`@`````````````!`````Q$B)P```````@`````````````!`````Q$0)P``
+M`````@`````````````!`````Q$1)P```````@`````````````!````"```
+M````````````````````````````````````````````````````````````
+M(0``````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````````````````````````````````"6,`=W+&$.
+M[KI1"9D9Q&T'C_1J<#6E8^FCE62>,HC;#J2XW'D>Z=7@B-G2ERM,M@F]?+%^
+M!RVXYY$=OY!D$+<=\B"P:DAQN?/>0;Z$?=3:&NODW6U1M=3TQX73@U:8;!/`
+MJ&MD>OEB_>S)98I/7`$4V6P&8V,]#_KU#0B-R"!N.UX0:4SD06#5<G%GHM'D
+M`SQ'U`1+_84-TFNU"J7ZJ+4U;)BR0M;)N]M`^;RLXVS8,G5<WT7/#=;<63W1
+MJZPPV28Z`-Y1@%'7R!9AT+^U]+0A(\2S5IF5NL\/I;VXGK@"*`B(!5^RV0S&
+M).D+L8=\;R\13&A8JQUAP3TM9K:00=QV!G';`;P@TI@J$-7OB86Q<1^UM@:E
+MY+^?,]2XZ*+)!W@T^0`/CJ@)EAB8#N&[#6I_+3UM")=L9)$!7&/F]%%K:V)A
+M;!S8,&6%3@!B\NV5!FQ[I0$;P?0(@E?$#_7&V;!E4.FW$NJXOHM\B+G\WQW=
+M8DDMVA7S?-.,94S4^UAALDW.4;4Z=`"\H^(PN]1!I=]*UY78/6W$T:3[]-;3
+M:NEI0_S9;C1&B&>MT+A@VG,M!$3E'0,S7TP*JLE\#=T\<050JD$")Q`0"[Z&
+M(`S));5H5[.%;R`)U&:YG^1AS@[YWEZ8R=DI(IC0L+2HU\<7/;-9@0VT+CM<
+MO;>M;+K`((.X[;:SOYH,XK8#FM*Q=#E'U>JO=]*=%2;;!(,6W',2"V/CA#MD
+ME#YJ;0VH6FIZ"\\.Y)W_"9,GK@`*L9X'?423#_#2HPB':/(!'O["!FE=5V+W
+MRV=E@'$V;!GG!FMN=AO4_N`KTXE:>MH0S$K=9V_?N?GY[[Z.0[ZW%]6.L&#H
+MH];6?I/1H<3"V#A2\M]/\6>[T6=7O*;=!K4_2S:R2-HK#=A,&PJO]DH#-F!Z
+M!$'#[V#?5=]GJ.^.;C%YOFE&C+-ARQJ#9KR@TF\E-N)H4I5W#,P#1PN[N18"
+M(B\F!56^.[K%*`N]LI):M"L$:K-<I__7PC'/T+6+GMDL':[>6[#"9)LF\F/L
+MG*-J=0J3;0*I!@F</S8.ZX5G!W(35P`%@DJ_E11ZN.*N*[%[.!NV#)N.TI(-
+MOM7EM^_<?"'?VPO4TM.&0N+4\?BSW6AN@]H?S1:^@5LFN?;A=[!O=T>W&.9:
+M"(AP:@__RCL&9EP+`1'_GF6/::YB^-/_:V%%SVP6>.(*H.[2#==4@P1.PK,#
+M.6$F9Z?W%F#034=I2=MW;CY*:M&NW%K6V68+WT#P.]@W4ZZ\J<6>N]Y_S[)'
+MZ?^U,!SRO;V*PKK*,).S4Z:CM"0%-M"ZDP;7S2E7WE2_9]DC+GIFL[A*8<0"
+M&VA=E"MO*C>^"[2AC@S#&]\%6HWO`BT`(```!$0````@`0`$1````@$```(Z
+M```"`0$``CH```0!```+````!`$!``L````(`0``!EH!``@!`0`&6@$`$`$`
+M``,4`0`0`0$``Q0!`"`!```&*```(`$!``8H``!``0```Q$``$`!`0`')P``
+M@`$```M'`P"``0$`"T<#``8$!0$#`B!@D%!2```````&!`4!`P)28A4`````
+M````!@0%`0,"V&"?-CD\``````8$!0$#`MA@D`````````"K$8"1```````"
+M``````````````0```"K$8"4```````"``````````````0```!+&X"4````
+M```"``````````````0````#$6`G```````"``````````````0````$````
+M```````````````````````````````````````````````````````````A
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````````````````````````````````)8P!W<L80[N
+MNE$)F1G$;0>/]&IP-:5CZ:.59)XRB-L.I+C<>1[IU>"(V=*7*TRV";U\L7X'
+M+;CGD1V_D&00MQWR(+!J2'&Y\]Y!OH1]U-H:Z^3=;5&UU/3'A=.#5IAL$\"H
+M:V1Z^6+][,EEBD]<`139;`9C8ST/^O4-"(W((&X[7A!I3.1!8-5R<6>BT>0#
+M/$?4!$O]A0W2:[4*I?JHM35LF+)"ULF[VT#YO*SC;-@R=5S?1<\-UMQ9/=&K
+MK##9)CH`WE&`4=?(%F'0O[7TM"$CQ+-6F96ZSP^EO;B>N`(H"(@%7[+9#,8D
+MZ0NQAWQO+Q%,:%BK'6'!/2UFMI!!W'8&<=L!O"#2F"H0U>^)A;%Q'[6V!J7D
+MOY\SU+CHHLD'>#3Y``^.J`F6&)@.X;L-:G\M/6T(EVQDD0%<8^;T46MK8F%L
+M'-@P985.`&+R[94&;'NE`1O!]`B"5\0/]<;9L&50Z;<2ZKB^BWR(N?S?'=UB
+M22W:%?-\TXQE3-3[6&&R3<Y1M3IT`+RCXC"[U$&EWTK7E=@];<31I/OTUM-J
+MZ6E#_-EN-$:(9ZW0N&#:<RT$1.4=`S-?3`JJR7P-W3QQ!5"J00(G$!`+OH8@
+M#,DEM6A7LX5O(`G49KF?Y&'.#OG>7IC)V2DBF-"PM*C7QQ<]LUF!#;0N.UR]
+MMZULNL`@@[CMMK._F@SBM@.:TK%T.4?5ZJ]WTIT5)ML$@Q;<<Q(+8^.$.V24
+M/FIM#:A::GH+SP[DG?\)DR>N``JQG@=]1),/\-*C"(=H\@$>_L(&:5U78O?+
+M9V6`<39L&><&:VYV&]3^X"O3B5IZVA#,2MUG;]^Y^?GOOHY#OK<7U8ZP8.BC
+MUM9^D]&AQ,+8.%+RWT_Q9[O19U>\IMT&M3]+-K)(VBL-V$P;"J_V2@,V8'H$
+M0</O8-]5WV>H[XYN,7F^:4:,LV'+&H-FO*#2;R4VXFA2E7<,S`-'"[NY%@(B
+M+R8%5;X[NL4H"[VRDEJT*P1JLURG_]?",<_0M8N>V2P=KMY;L,)DFR;R8^R<
+MHVIU"I-M`JD&"9P_-@[KA6<'<A-7``6"2K^5%'JXXJXKL7LX&[8,FX[2D@V^
+MU>6W[]Q\(=_;"]32TX9"XM3Q^+/=:&Z#VA_-%KZ!6R:Y]N%WL&]W1[<8YEH(
+MB'!J#__*.P9F7`L!$?^>98]IKF+XT_]K847/;!9XX@J@[M(-UU2#!$["LP,Y
+M829GI_<68-!-1VE)VW=N/DIJT:[<6M;99@O?0/`[V#=3KKRIQ9Z[WG_/LD?I
+M_[4P'/*]O8K"NLHPD[-3IJ.T)`4VT+J3!M?-*5?>5+]GV2,N>F:SN$IAQ`(;
+M:%V4*V\J-[X+M*&.#,,;WP5:C>\"+0`@```$1````"`!``1$```"`0```CH`
+M``(!`0`".@``!`$```L````$`0$`"P````@!```&6@$`"`$!``9:`0`0`0``
+M`Q0!`!`!`0`#%`$`(`$```8H```@`0$`!B@``$`!```#$0``0`$!``<G``"`
+M`0``"T<#`(`!`0`+1P,`!@0%`0,"(&"04%(```````8$!0$#`E)B%0``````
+M```&!`4!`P+88)\V.3P`````!@0%`0,"V&"0`````````*L1@)$```````(`
+M````````````!````*L1@)0```````(`````````````!````$L;@)0`````
+M``(`````````````!`````,1@B<```````(`````````````!`````0`````
+M`````````````````````````````````````````````````````````"$`
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````EC`'=RQA#NZZ
+M40F9&<1M!X_T:G`UI6/IHY5DGC*(VPZDN-QY'NG5X(C9TI<K3+8)O7RQ?@<M
+MN.>1';^09!"W'?(@L&I(<;GSWD&^A'W4VAKKY-UM4;74],>%TX-6F&P3P*AK
+M9'KY8OWLR66*3UP!%-EL!F-C/0_Z]0T(C<@@;CM>$&E,Y$%@U7)Q9Z+1Y`,\
+M1]0$2_V%#=)KM0JE^JBU-6R8LD+6R;O;0/F\K.-LV#)U7-]%SPW6W%D]T:NL
+M,-DF.@#>48!1U\@68="_M?2T(2/$LU:9E;K/#Z6]N)ZX`B@(B`5?LMD,QB3I
+M"[&'?&\O$4QH6*L=8<$]+6:VD$'<=@9QVP&\(-*8*A#5[XF%L7$?M;8&I>2_
+MGS/4N.BBR0=X-/D`#XZH"988F`[ANPUJ?RT];0B7;&21`5QCYO11:VMB86P<
+MV#!EA4X`8O+ME09L>Z4!&\'T"()7Q`_UQMFP95#IMQ+JN+Z+?(BY_-\=W6))
+M+=H5\WS3C&5,U/M88;)-SE&U.G0`O*/B,+O40:7?2M>5V#UMQ-&D^_36TVKI
+M:4/\V6XT1HAGK="X8-IS+01$Y1T#,U],"JK)?`W=/'$%4*I!`B<0$`N^AB`,
+MR26U:%>SA6\@"=1FN9_D8<X.^=Y>F,G9*2*8T+"TJ-?'%SVS68$-M"X[7+VW
+MK6RZP""#N.VVL[^:#.*V`YK2L70Y1]7JKW?2G14FVP2#%MQS$@MCXX0[9)0^
+M:FT-J%IJ>@O/#N2=_PF3)ZX`"K&>!WU$DP_PTJ,(AVCR`1[^P@9I75=B]\MG
+M98!Q-FP9YP9K;G8;U/[@*].)6GK:$,Q*W6=OW[GY^>^^CD.^MQ?5CK!@Z*/6
+MUGZ3T:'$PM@X4O+?3_%GN]%G5[RFW0:U/TLVLDC:*PW83!L*K_9*`S9@>@1!
+MP^]@WU7?9ZCOCFXQ>;YI1HRS8<L:@V:\H-)O)3;B:%*5=PS,`T<+N[D6`B(O
+M)@55OCNZQ2@+O;*26K0K!&JS7*?_U\(QS]"UBY[9+!VNWENPPF2;)O)C[)RC
+M:G4*DVT"J08)G#\V#NN%9P=R$U<`!8)*OY44>KCBKBNQ>S@;M@R;CM*2#;[5
+MY;?OW'PAW]L+U-+3AD+BU/'XL]UH;H/:'\T6OH%;)KGVX7>P;W='MQCF6@B(
+M<&H/_\H[!F9<"P$1_YYECVFN8OC3_VMA1<]L%GCB"J#NT@W75(,$3L*S`SEA
+M)F>G]Q9@T$U':4G;=VX^2FK1KMQ:UMEF"]]`\#O8-U.NO*G%GKO>?\^R1^G_
+MM3`<\KV]BL*ZRC"3LU.FH[0D!3;0NI,&U\TI5]Y4OV?9(RYZ9K.X2F'$`AMH
+M790K;RHWO@NTH8X,PQO?!5J-[P(M`"````1$````(`$`!$0```(!```".@``
+M`@$!``(Z```$`0``"P````0!`0`+````"`$```9:`0`(`0$`!EH!`!`!```#
+M%`$`$`$!``,4`0`@`0``!B@``"`!`0`&*```0`$```,1``!``0$`!R<``(`!
+M```+1P,`@`$!``M'`P`&!`4!`P(@8)!04@``````!@0%`0,"4F(5````````
+M``8$!0$#`MA@GS8Y/``````&!`4!`P+88)``````````JQ&`D0```````@``
+M```````````"````JQ&`E````````@`````````````"````2QN`E```````
+M`@`````````````"`````Q$P)P```````@`````````````"`````Q%`)P``
+M`````@`````````````"`````Q%$)P```````@`````````````"````!@``
+M```````````````````````````````````````A````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````_P$`````````````````````````````````
+M``````````````````$`````````(`````````!0````*```````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````````````````````````````````````````#_
+M`````````````````````````````````````````0`````````!_P``````
+M``````````````````````````````````$``````````O\`````````````
+M```````````````````````````!``````````/_````````````````````
+M`````````````````````0`````````U_P``````````````````````````
+M``````````````$`````````!/\`````````````````````````````````
+M```````!``````````7_````````````````````````````````````````
+M`0`````````&_P``````````````````````````````````````````````
+M````!_\```````````````````````````````````````````````````K_
+M`````````````````````````````````````````0`````````+_P``````
+M````````````````````````````````````````````#/\`````````````
+M``````````````````````````````````````W_````````````````````
+M```````````````````````````````._P``````````````````````````
+M````````````````````````#_\`````````````````````````````````
+M`````````````````!#_````````````````````````````````````````
+M```````````1_P``````````````````````````````````````````````
+M````$O\``````````````````````````````````````````````````!/_
+M`````````````````````````````````````````0`````````T_P``````
+M``````````````````````````````````$`````````&/\`````````````
+M`````````````````````````````````````$+_````````````````````
+M```````````````````````````````9_P``````````````````````````
+M````````````````````````&O\`````````````````````````````````
+M`````````````````!W_````````````````````````````````````````
+M```````````>_P````````````````````````````````````````$`````
+M````'_\``````````````````````````````````````````````````"#_
+M```````````````````````````````````````````````````A_P``````
+M``````````````````````````````````$`````````(O\`````````````
+M`````````````````````````````````````"/_````````````````````
+M```````````````````````````````D_P``````````````````````````
+M````````````````````````)?\`````````````````````````````````
+M`````````````````"G_````````````````````````````````````````
+M```````````J_P``````````````````````````````````````````````
+M````*_\``````````````````````````````````````````````````"S_
+M`````````````````````````````````````````0`````````M_P``````
+M````````````````````````````````````````````+O\`````````````
+M```````````````````````````!`````````"__````````````````````
+M`````````````````````0`````````W_P``````````````````````````
+M``````````````$`````````./\`````````````````````````````````
+M`````````````````#G_````````````````````````````````````````
+M```````````Z_P````````````````````````````````````````$`````
+M````._\````````````````````````````````````````!`````````#S_
+M`````````````````````````````````````````0`````````]_P``````
+M``````````````````````````````````$`````````/O\`````````````
+M```````````````````````````!`````````$/_````````````````````
+M`````````````````````0````````!$_P``````````````````````````
+M``````````````$`````````,O\`````````````````````````````````
+M```````!`````````#/_````````````````````````````````````````
+M``````````!D_P````````````````````````````````````````$`````
+M````,/\````````````````````````````````````````!`````````&;_
+M`````````````````````````````````````````0````````!G_P``````
+M``````````````````````````````````$`````````_____P``````````
+M````````````````````````````````````````````````````````````
+M````````````````````!```````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M```````````%`0```````"@``````````````"@`````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M``8``0`````````````````$````&```````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````"`$!`@``
+M``#P"P```````#@````(`0``````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M```````````````````````````````````````````'`````````"@`````
+M`````````!@`````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`!0``````````0`!>!`,!PB0`0```````!0````<``````````````!F````
+M`````"0````T```````````````*`0```````$0.0%Z/`HX#C02,!88&@P<4
+M``````````$``7@0#`<(D`$````````4````'```````````````/```````
+M```4````-```````````````-``````````4````3```````````````00``
+M```````<````9```````````````20````````!$#A```````!0```"$````
+M```````````,`````````!0``````````0`!>!`,!PB0`0```````!0````<
+M```````````````=`````````!0````T```````````````>`````````!0`
+M``!,```````````````I`````````!P```!D```````````````Z````````
+M`$0.$```````%````(0``````````````#(`````````%````)P`````````
+M`````!``````````%````+0``````````````%L`````````%````,P`````
+M``````````T`````````%````.0``````````````!P`````````%````/P`
+M`````````````"P`````````%````!0!`````````````#``````````%```
+M`"P!`````````````"T`````````%````$0!`````````````"T`````````
+M%````%P!`````````````"0"````````'````'0!`````````````*@`````
+M````00X01`YP@P(4````E`$`````````````,P`````````4``````````$`
+M`7@0#`<(D`$````````4````'```````````````<@`````````D````-```
+M````````````JP$```````!!#A!!#AA$#B"#`X8"````-````%P`````````
+M`````'H"````````0@X00@X80@X@00XH00XP@P:&!8P$C0..`@`````````4
+M````E```````````````8@`````````4````K```````````````8@``````
+M```<````Q```````````````/P````````!$#B!*C`*#`Q0```#D````````
+M``````""`````````"0```#\``````````````!^`0```````$(.$$$.&$$.
+M((,$A@.,`@`4``````````$``7@0#`<(D`$````````<````'```````````
+M````VP,```````!!#A!$#G"#`C0````\```````````````2"P```````$(.
+M$$(.&$(.($$.*$$.,$0.D`&#!H8%C`2-`XX"````/````'0`````````````
+M`.\`````````0@X00@X80@X@0@XH00XP00XX1`Y`@P>&!HP%C02.`X\"````
+M`````!P```"T``````````````"3`````````$0.$```````'````-0`````
+M``````````X`````````1`X0```````D````]```````````````/P$`````
+M``!"#A!!#AA!#B"#!(8#C`(`'````!P!`````````````!$`````````1`X0
+M```````4````/`$`````````````2``````````4````5`$`````````````
+MC``````````D````;`$`````````````$P8```````!$#D!>CP*.`XT$C`6&
+M!H,'%````)0!`````````````'P`````````%````*P!`````````````'``
+M````````/````,0!`````````````/H,````````0@X00@X80@X@0@XH00XP
+M00XX1`Z0`8,'A@:,!8T$C@./`@```````"0````$`@````````````"$````
+M`````$0.*$^,`H8#@P0````````D````+`(`````````````00$```````!$
+M#C!4C0*,`X8$@P4`````)````%0"``````````````@!````````1`Y`7H\"
+MC@.-!(P%A@:#!R0```!\`@````````````#-`P```````$0.,%B.`HT#C`2&
+M!8,&```D````I`(`````````````@P0```````!$#D!>CP*.`XT$C`6&!H,'
+M-````,P"`````````````,D#````````0@X00@X80@X@00XH00XP@P:&!8P$
+MC0..`@`````````\````!`,`````````````CP(```````!"#A!"#AA"#B!"
+M#BA!#C!!#CA$#D"#!X8&C`6-!(X#CP(`````````-````$0#````````````
+M`#D"````````0@X00@X80@X@00XH00XP@P:&!8P$C0..`@`````````\````
+M?`,`````````````$`(```````!"#A!"#AA"#B!"#BA!#C!!#CA$#D"#!X8&
+MC`6-!(X#CP(`````````/````+P#`````````````*P)````````0@X00@X8
+M0@X@0@XH00XP00XX1`Z``8,'A@:,!8T$C@./`@```````!P```#\`P``````
+M``````"U`````````$0.$```````+````!P$`````````````&L#````````
+M0@X00@X800X@00XH1`XP@P6&!(P#C0(`'````$P$`````````````!T`````
+M````1`X0```````<````;`0`````````````H0````````!!#A"#`@```!0`
+M``",!`````````````!``````````#P```"D!`````````````!]"```````
+M`$(.$$(.&$(.($(.*$$.,$$..$0.4(,'A@:,!8T$C@./`@`````````\````
+MY`0`````````````WP,```````!"#A!"#AA"#B!"#BA!#C!!#CA$#E"#!X8&
+MC`6-!(X#CP(`````````)````"0%`````````````",*````````1`Y07H\"
+MC@.-!(P%A@:#!R0```!,!0````````````!D`````````$$.$$$.&$0.((,#
+MA@(````\````=`4`````````````A@<```````!"#A!"#AA"#B!"#BA!#C!!
+M#CA$#H`!@P>&!HP%C02.`X\"````````)````+0%`````````````+$`````
+M````1`XP5(T"C`.&!(,%`````#P```#<!0`````````````5`@```````$(.
+M$$(.&$(.($(.*$$.,$$..$0.0(,'A@:,!8T$C@./`@`````````D````'`8`
+M````````````M0````````!"#A!!#AA!#B"#!(8#C`(`)````$0&````````
+M`````(T"````````1`XP6(X"C0.,!(8%@P8``!P```!L!@`````````````_
+M`````````$0.$```````+````(P&`````````````+8`````````0@X00@X8
+M00X@00XH1`XP@P6&!(P#C0(`)````+P&`````````````/L"````````1`XP
+M5(T"C`.&!(,%`````!0``````````0`!>!`,!PB0`0```````"0````<````
+M``````````#W`````````$0.,%2-`HP#A@2#!0`````D````1```````````
+M````"`$```````!$#C!8C@*-`XP$A@6#!@``/````&P``````````````)4`
+M````````0@X00@X80@X@0@XH00XP00XX1`Y`@P>&!HP%C02.`X\"````````
+M`"0```"L``````````````!1`0```````$0.4%Z/`HX#C02,!88&@P<4````
+MU```````````````9@`````````4````[```````````````1@`````````\
+M````!`$`````````````20$```````!"#A!"#AA"#B!"#BA!#C!!#CA$#D"#
+M!X8&C`6-!(X#CP(`````````'````$0!`````````````(<`````````1`XP
+M```````4````9`$`````````````5@`````````L````?`$`````````````
+MD@````````!"#A!"#AA!#B!!#BA$#C"#!88$C`.-`@`\````K`$`````````
+M````;P$```````!"#A!"#AA"#B!"#BA!#C!!#CA$#F"#!X8&C`6-!(X#CP(`
+M````````'````.P!`````````````$4`````````00X0@P(````D````#`(`
+M````````````Y`,```````!$#D!>CP*.`XT$C`6&!H,')````#0"````````
+M``````X!````````1`Y`7H\"C@.-!(P%A@:#!R0```!<`@````````````!%
+M`0```````$0.0%Z/`HX#C02,!88&@P<<````A`(`````````````^0``````
+M``!!#A"#`@```"0```"D`@````````````"^`````````$0.,%2-`HP#A@2#
+M!0`````<````S`(`````````````;P````````!$#B!*A@*#`R0```#L`@``
+M``````````##`0```````$0.($Z,`H8#@P0````````D````%`,`````````
+M````4P$```````!$#E!>CP*.`XT$C`6&!H,')````#P#`````````````&`!
+M````````1`Y07H\"C@.-!(P%A@:#!Q0``````````0`!>!`,!PB0`0``````
+M`!0````<``````````````!Q`````````!0````T``````````````!,````
+M`````!0``````````0`!>!`,!PB0`0```````!0````<```````````````+
+M`0```````#P````T``````````````!4!````````$(.$$(.&$(.($(.*$$.
+M,$$..$0.4(,'A@:,!8T$C@./`@`````````4````=```````````````-`$`
+M```````4````C```````````````@0`````````4````I```````````````
+M)P`````````4````O````````````````@`````````4````U```````````
+M````3P`````````D````[```````````````<0$```````!!#A!!#AA$#B"#
+M`X8"````'````!0!`````````````"``````````00X0@P(````<````-`$`
+M````````````(`````````!!#A"#`@```"0```!4`0````````````#N`0``
+M`````$0.,%2-`HP#A@2#!0`````D````?`$`````````````]@````````!$
+M#B!.C`*&`X,$````````/````*0!`````````````%P!````````0@X00@X8
+M0@X@0@XH00XP00XX1`Y`@P>&!HP%C02.`X\"`````````!P```#D`0``````
+M```````\`````````$$.$(,"````)`````0"`````````````&H`````````
+M00X000X81`X@@P.&`@```!0````L`@`````````````O`````````"0```!$
+M`@`````````````A`0```````$0.,%2-`HP#A@2#!0`````<````;`(`````
+M````````+@````````!$#A```````!0```",`@`````````````S````````
+M`"P```"D`@````````````!S`0```````$(.$$(.&$$.($$.*$0.,(,%A@2,
+M`XT"`"0```#4`@````````````!&`0```````$$.$$$.&$0.((,#A@(````<
+M````_`(`````````````[0````````!!#A"#`@```!P````<`P``````````
+M``!>`````````$0.($J&`H,#'````#P#`````````````#4`````````1`X0
+M```````<````7`,`````````````-`````````!$#A```````!0```!\`P``
+M```````````D`````````!P```"4`P`````````````F`````````$0.$```
+M````%````+0#`````````````"0`````````'````,P#`````````````$``
+M````````1`X0```````4````[`,`````````````&@`````````<````!`0`
+M````````````)@````````!$#A```````!0````D!``````````````D````
+M`````!P````\!``````````````X`````````$0.$```````%````%P$````
+M`````````"0`````````)````'0$`````````````!,#````````1`Y07H\"
+MC@.-!(P%A@:#!R0```"<!`````````````"[`````````$0.,%2-`HP#A@2#
+M!0`````D````Q`0`````````````R@````````!$#C!8C@*-`XP$A@6#!@``
+M)````.P$`````````````.L`````````1`Y`7H\"C@.-!(P%A@:#!R0````4
+M!0````````````#]`````````$0.0%Z/`HX#C02,!88&@P<D````/`4`````
+M````````D@$```````!!#A!!#AA$#B"#`X8"````)````&0%````````````
+M`$<!````````1`Y`7H\"C@.-!(P%A@:#!R0```",!0`````````````$`0``
+M`````$0.,%B.`HT#C`2&!8,&```D````M`4`````````````#`$```````!$
+M#C!8C@*-`XP$A@6#!@``)````-P%`````````````"H!````````1`Y`7H\"
+MC@.-!(P%A@:#!R0````$!@`````````````F`0```````$0.,%B.`HT#C`2&
+M!8,&```D````+`8`````````````J0````````!$#B!.C`*&`X,$````````
+M%````%0&`````````````%@`````````'````&P&`````````````#P`````
+M````1`X@2H8"@P,4````C`8``````````````@$````````<````I`8`````
+M````````/`````````!$#B!*A@*#`Q0```#$!@````````````#B````````
+M`"0```#<!@````````````!!`0```````$(.$$$.&$$.((,$A@.,`@`4````
+M!`<`````````````)P`````````4````'`<`````````````(P`````````D
+M````-`<`````````````AP,```````!!#A!!#AA$#B"#`X8"````'````%P'
+M`````````````(\`````````1`X@2H8"@P,D````?`<`````````````3```
+M``````!"#A!!#AA$#B"#`XP"````%````*0'`````````````&\`````````
+M)````+P'`````````````#@!````````1`XH4XT"C`.&!(,%`````"0```#D
+M!P````````````"9`0```````$0.,%2-`HP#A@2#!0`````D````#`@`````
+M````````J`````````!$#C!4C0*,`X8$@P4`````)````#0(````````````
+M`(<!````````00X000X81`X@@P.&`@```"0```!<"`````````````#P````
+M`````$0.0%Z/`HX#C02,!88&@P<D````A`@`````````````A@````````!$
+M#B!.C`*&`X,$````````)````*P(`````````````*\`````````1`X@3HP"
+MA@.#!````````#0```#4"`````````````#O`0```````$(.$$(.&$(.($$.
+M*$$.,(,&A@6,!(T#C@(`````````%``````````!``%X$`P'")`!````````
+M%````!P``````````````!4`````````%````#0``````````````*(`````
+M````)````$P``````````````&(`````````0@X000X800X@@P2&`XP"`!P`
+M``!T```````````````I`````````$$.$(,"````)````)0`````````````
+M`*`!````````1`XP5(T"C`.&!(,%`````"P```"\``````````````">````
+M`````$(.$$(.&$$.($$.*(,%A@2,`XT"`````!P```#L``````````````"$
+M`````````$0.$```````'`````P!`````````````(0`````````1`X0````
+M```D````+`$`````````````!P$```````!!#A!!#AA$#B"#`X8"````+```
+M`%0!`````````````.\`````````0@X00@X800X@00XH1`XP@P6&!(P#C0(`
+M'````(0!`````````````'0`````````00X0@P(````4````I`$`````````
+M````&@`````````4````O`$`````````````,0`````````4````U`$`````
+M````````-``````````D````[`$`````````````HPD```````!$#F!>CP*.
+M`XT$C`6&!H,'%````!0"`````````````$P`````````)````"P"````````
+M`````)8!````````00X000X81`X@@P.&`@```!P```!4`@````````````#W
+M`````````$$.$(,"````'````'0"`````````````'D!````````00X0@P(`
+M```4``````````$``7@0#`<(D`$````````4````'```````````````=P``
+M```````\````-```````````````@P(```````!"#A!"#AA"#B!"#BA!#C!!
+M#CA$#D"#!X8&C`6-!(X#CP(`````````)````'0``````````````)D`````
+M````00X000X81`X@@P.&`@```"P```"<```````````````[`@```````$(.
+M$$(.&$$.($$.*$0.,(,%A@2,`XT"`"0```#,``````````````#C````````
+M`$0.0%Z/`HX#C02,!88&@P<D````]```````````````N0````````!$#D!>
+MCP*.`XT$C`6&!H,'/````!P!`````````````,`"````````0@X00@X80@X@
+M0@XH00XP00XX1PZ`!8,'A@:,!8T$C@./`@```````#P```!<`0``````````
+M``#T`@```````$(.$$(.&$(.($(.*$$.,$$..$<.\`2#!X8&C`6-!(X#CP(`
+M```````\````G`$`````````````C0,```````!"#A!"#AA"#B!"#BA!#C!!
+M#CA'#H`%@P>&!HP%C02.`X\"````````/````-P!`````````````,<#````
+M````0@X00@X80@X@0@XH00XP00XX1P[@!(,'A@:,!8T$C@./`@```````"P`
+M```<`@````````````#K`````````$(.$$(.&$$.($$.*$0.,(,%A@2,`XT"
+M`!0```!,`@````````````!-`````````!0```!D`@````````````!-````
+M`````"0```!\`@````````````#X`P```````$0.8%Z/`HX#C02,!88&@P<\
+M````I`(`````````````)`8```````!"#A!"#AA"#B!"#BA!#C!!#CA$#D"#
+M!X8&C`6-!(X#CP(`````````)````.0"`````````````!H#````````1`Y`
+M7H\"C@.-!(P%A@:#!R0````,`P`````````````+!P```````$0.8%Z/`HX#
+MC02,!88&@P<D````-`,`````````````N`0```````!$#C!8C@*-`XP$A@6#
+M!@``/````%P#`````````````-X"````````0@X00@X80@X@0@XH00XP00XX
+M1`Y@@P>&!HP%C02.`X\"`````````"0```"<`P````````````#S````````
+M`$0.($Z,`H8#@P0````````\````Q`,`````````````P`````````!"#A!"
+M#AA"#B!"#BA!#C!!#CA$#F"#!X8&C`6-!(X#CP(`````````/`````0$````
+M`````````,``````````0@X00@X80@X@0@XH00XP00XX1`Y@@P>&!HP%C02.
+M`X\"`````````!0```!$!`````````````!D`````````!0```!<!```````
+M```````'`````````#P```!T!`````````````"9`@```````$(.$$(.&$(.
+M($(.*$$.,$$..$0.8(,'A@:,!8T$C@./`@`````````4````M`0`````````
+M````+0`````````L````S`0`````````````!P@```````!"#A!"#AA!#B!!
+M#BA$#C"#!88$C`.-`@`<````_`0`````````````2@````````!!#A"#`@``
+M`!0````<!0````````````!!`````````"0````T!0`````````````3"```
+M`````$0.0%Z/`HX#C02,!88&@P<D````7`4`````````````N0,```````!$
+M#C!4C0*,`X8$@P4`````)````(0%`````````````/L!````````1`XP5(T"
+MC`.&!(,%`````"0```"L!0````````````#/`````````$0.,%2-`HP#A@2#
+M!0`````\````U`4`````````````X0````````!"#A!"#AA"#B!"#BA!#C!!
+M#CA$#D"#!X8&C`6-!(X#CP(`````````%````!0&`````````````"T`````
+M````)````"P&`````````````)8"````````0@X000X800X@@P2&`XP"`"0`
+M``!4!@````````````"2`````````$0.($Z,`H8#@P0````````D````?`8`
+M````````````D@````````!$#B!.C`*&`X,$````````)````*0&````````
+M`````(<`````````1`X@3HP"A@.#!````````"0```#,!@````````````"'
+M`````````$0.($Z,`H8#@P0````````D````]`8`````````````D@``````
+M``!$#B!.C`*&`X,$````````)````!P'`````````````(<`````````1`X@
+M3HP"A@.#!````````"0```!$!P````````````"'`````````$0.($Z,`H8#
+M@P0````````D````;`<`````````````N@````````!$#C!8C@*-`XP$A@6#
+M!@``)````)0'`````````````.4`````````1`Y`7H\"C@.-!(P%A@:#!R0`
+M``"\!P````````````!,"````````$0.0%Z/`HX#C02,!88&@P<D````Y`<`
+M````````````<P<```````!$#D!>CP*.`XT$C`6&!H,'%``````````!``%X
+M$`P'")`!````````%````!P``````````````#<`````````%````#0`````
+M`````````"<`````````+````$P``````````````(X`````````0@X00@X8
+M00X@00XH@P6&!(P#C0(`````)````'P``````````````%@`````````1`X@
+M3HT"C`.#!````````"0```"D``````````````!.`````````$(.$$$.&$$.
+M((,$A@.,`@`<````S```````````````&@````````!!#A"#`@```"0```#L
+M``````````````#T`````````$0.,%B.`HT#C`2&!8,&```D````%`$`````
+M````````@0````````!$#C!4C0*,`X8$@P4`````/````#P!````````````
+M`!P"````````0@X00@X80@X@0@XH00XP00XX1`Y`@P>&!HP%C02.`X\"````
+M`````!P```!\`0````````````!2`````````$0.($J,`H,#'````)P!````
+M`````````%(`````````1`X@2HP"@P,D````O`$`````````````[```````
+M``!$#D!>CP*.`XT$C`6&!H,''````.0!`````````````%(`````````1`X@
+M2HP"@P,<````!`(`````````````4@````````!$#B!*C`*#`SP````D`@``
+M``````````!D`@```````$(.$$(.&$(.($(.*$$.,$$..$0.8(,'A@:,!8T$
+MC@./`@`````````D````9`(`````````````U0(```````!$#E!>CP*.`XT$
+MC`6&!H,''````(P"`````````````$4`````````1`X0```````<````K`(`
+M````````````-P````````!$#A```````!P```#,`@`````````````<````
+M`````$0.$```````'````.P"`````````````#@`````````1`X0```````<
+M````#`,`````````````/P````````!$#A```````"0````L`P``````````
+M``"E`````````$(.$$$.&$$.((,$A@.,`@`4``````````$``7@0#`<(D`$`
+M```````4````'```````````````%@`````````4````-```````````````
+M$``````````<````3```````````````M@````````!!#A"#`@```!0```!L
+M``````````````!6`````````"0```"$``````````````"D`````````$0.
+M($Z,`H8#@P0````````D````K```````````````Y`````````!$#D!>CP*.
+M`XT$C`6&!H,'/````-0``````````````#0!````````0@X00@X80@X@0@XH
+M00XP00XX1`Y`@P>&!HP%C02.`X\"`````````#0````4`0`````````````Z
+M`0```````$(.$$(.&$(.($$.*$$.,(,&A@6,!(T#C@(`````````%```````
+M```!``%X$`P'")`!````````%````!P``````````````"X!````````'```
+M`#0``````````````*<!````````00X0@P(````4````5```````````````
+M!0`````````4````;```````````````!@`````````4````A```````````
+M````'``````````4````G```````````````'0`````````4````M```````
+M````````*P`````````4````S```````````````)P`````````D````Y```
+M````````````30$```````!$#C!8C@*-`XP$A@6#!@``)`````P!````````
+M`````#P!````````00X000X81`Y`@P.&`@```!0````T`0````````````!`
+M`````````"0```!,`0````````````":`````````$0.*%.-`HP#A@2#!0``
+M```4````=`$`````````````8``````````4````C`$`````````````%P``
+M```````4````I`$`````````````#0,````````4``````````$``7@0#`<(
+MD`$````````D````'```````````````6@````````!"#A!!#AA!#B"#!(8#
+MC`(`%````$0``````````````$``````````%````%P```````````````X`
+M````````)````'0``````````````)0`````````1`XP3XP"A@.#!```````
+M`#0```"<``````````````!F`````````$(.$$(.&$(.($$.*$$.,$0.0(,&
+MA@6,!(T#C@(`````'````-0``````````````'4`````````00X01`X@@P(D
+M````]```````````````<@````````!!#A!!#AA$#B"#`X8"````)````!P!
+M`````````````*H`````````00X000X81`X@@P.&`@```"0```!$`0``````
+M``````"&`````````$$.$$$.&$0.((,#A@(````D````;`$`````````````
+ML@````````!$#C!4C0*,`X8$@P4`````)````)0!`````````````'$`````
+M````1`XP6(X"C0.,!(8%@P8``"0```"\`0````````````"A`````````$0.
+M,$^,`H8#@P0````````D````Y`$`````````````'P$```````!$#D!>CP*.
+M`XT$C`6&!H,')`````P"`````````````*(`````````00X000X81`X@@P.&
+M`@```"0````T`@````````````"B`````````$$.$$$.&$0.((,#A@(````D
+M````7`(`````````````T0````````!!#A!!#AA$#B"#`X8"````)````(0"
+M`````````````-P`````````00X000X81`X@@P.&`@```!P```"L`@``````
+M``````"$`````````$$.$(,"````)````,P"``````````````L!````````
+M1`XP5(T"C`.&!(,%`````!0``````````0`!>!`,!PB0`0```````!0````<
+M```````````````+`````````!0````T```````````````&`````````!0`
+M``!,``````````````!&`````````#0```!D``````````````#W````````
+M`$(.$$(.&$(.($$.*$$.,$0..(,&A@6,!(T#C@(`````/````)P`````````
+M`````-H!````````0@X00@X80@X@0@XH00XP00XX1`Y0@P>&!HP%C02.`X\"
+M`````````#P```#<``````````````!+`0```````$(.$$(.&$(.($(.*$$.
+M,$$..$0.0(,'A@:,!8T$C@./`@`````````4````'`$`````````````!@``
+M```````4````-`$`````````````!@`````````4````3`$`````````````
+M!@`````````T````9`$`````````````"@,```````!"#A!"#AA"#B!!#BA!
+M#C"#!H8%C`2-`XX"`````````!P```"<`0`````````````?`````````$$.
+M$(,"````'````+P!`````````````'H`````````1`X@2H8"@P,D````W`$`
+M````````````WP````````!!#A!!#AA$#B"#`X8"````+`````0"````````
+M`````%T!````````0@X000X800X@1`Y0@P2&`XP"````````%````#0"````
+M``````````(`````````)````$P"`````````````!$"````````00X000X8
+M1`X@@P.&`@```!0```!T`@`````````````(`````````"0```",`@``````
+M```````H`0```````$0.8$^,`H8#@P0````````\````M`(`````````````
+M1P4```````!"#A!"#AA"#B!"#BA!#C!!#CA$#D"#!X8&C`6-!(X#CP(`````
+M````/````/0"`````````````.T"````````0@X00@X80@X@0@XH00XP00XX
+M1`Y`@P>&!HP%C02.`X\"`````````"0````T`P````````````!=`0``````
+M`$0.,%B.`HT#C`2&!8,&```D````7`,`````````````O`````````!$#B!.
+MC`*&`X,$````````)````(0#`````````````'D&````````1`Y`7H\"C@.-
+M!(P%A@:#!R0```"L`P````````````"4`P```````$0.<%Z/`HX#C02,!88&
+M@P<<````U`,`````````````1@````````!$#B!*C`*#`QP```#T`P``````
+M```````1`````````$0.$```````%````!0$``````````````8`````````
+M%````"P$`````````````%\`````````%````$0$`````````````#P`````
+M````'````%P$`````````````#P`````````1`X828P"@P,D````?`0`````
+M````````10,```````!!#A!!#AB#`X8"````````)````*0$````````````
+M`(T&````````00X000X8@P.&`@```````"0```#,!`````````````#<!@``
+M`````$(.$$$.&$$.((,$A@.,`@`4````]`0`````````````<P(````````4
+M````#`4`````````````$P`````````D````)`4`````````````B`$`````
+M``!$#D!>CP*.`XT$C`6&!H,')````$P%`````````````-,$````````1`Y0
+M7H\"C@.-!(P%A@:#!R0```!T!0````````````#1`````````$0.,%2-`HP#
+MA@2#!0`````<````G`4`````````````>P````````!$#B!*A@*#`R0```"\
+M!0````````````"(`0```````$0.0%Z/`HX#C02,!88&@P<<````Y`4`````
+M````````G`````````!$#A```````!0````$!@````````````!>````````
+M`!0````<!@````````````!>`````````!P````T!@`````````````>````
+M`````$$.$(,"````'````%0&`````````````!X`````````00X0@P(````L
+M````=`8`````````````CP8```````!"#A!"#AA!#B!!#BA$#H`!@P6&!(P#
+MC0(<````I`8`````````````<`````````!$#B!*C`*#`QP```#$!@``````
+M```````:`````````$0.$```````%``````````!``%X$`P'")`!````````
+M%````!P``````````````&8`````````)````#0```````````````H!````
+M````1`Y`7H\"C@.-!(P%A@:#!Q0``````````0`!>!`,!PB0`0```````!0`
+M```<```````````````\`````````!0````T```````````````T````````
+M`!0```!,``````````````!!`````````!P```!D``````````````!)````
+M`````$0.$```````%````(0```````````````P`````````%``````````!
+M``%X$`P'")`!````````%````!P``````````````!T`````````%````#0`
+M`````````````!X`````````%````$P``````````````"D`````````'```
+M`&0``````````````#H`````````1`X0```````4````A```````````````
+M,@`````````4````G```````````````$``````````4````M```````````
+M````6P`````````4````S```````````````#0`````````4````Y```````
+M````````'``````````4````_```````````````+``````````4````%`$`
+M````````````,``````````4````+`$`````````````+0`````````4````
+M1`$`````````````+0`````````4````7`$`````````````)`(````````<
+M````=`$`````````````J`````````!!#A!$#G"#`A0```"4`0``````````
+M```S`````````!0``````````0`!>!`,!PB0`0```````!0````<````````
+M``````!R`````````"0````T``````````````"K`0```````$$.$$$.&$0.
+M((,#A@(````T````7```````````````>@(```````!"#A!"#AA"#B!!#BA!
+M#C"#!H8%C`2-`XX"`````````!0```"4``````````````!B`````````!0`
+M``"L``````````````!B`````````!P```#$```````````````_````````
+M`$0.($J,`H,#%````.0``````````````((`````````)````/P`````````
+M`````'X!````````0@X000X800X@@P2&`XP"`!0``````````0`!>!`,!PB0
+M`0```````!P````<``````````````#;`P```````$$.$$0.<(,"-````#P`
+M`````````````!(+````````0@X00@X80@X@00XH00XP1`Z0`8,&A@6,!(T#
+MC@(````\````=```````````````[P````````!"#A!"#AA"#B!"#BA!#C!!
+M#CA$#D"#!X8&C`6-!(X#CP(`````````'````+0``````````````),`````
+M````1`X0```````<````U```````````````#@````````!$#A```````"0`
+M``#T```````````````_`0```````$(.$$$.&$$.((,$A@.,`@`<````'`$`
+M````````````$0````````!$#A```````!0````\`0````````````!(````
+M`````!0```!4`0````````````",`````````"0```!L`0`````````````3
+M!@```````$0.0%Z/`HX#C02,!88&@P<4````E`$`````````````?```````
+M```4````K`$`````````````<``````````\````Q`$`````````````^@P`
+M``````!"#A!"#AA"#B!"#BA!#C!!#CA$#I`!@P>&!HP%C02.`X\"````````
+M)`````0"`````````````(0`````````1`XH3XP"A@.#!````````"0````L
+M`@````````````!!`0```````$0.,%2-`HP#A@2#!0`````D````5`(`````
+M````````"`$```````!$#D!>CP*.`XT$C`6&!H,')````'P"````````````
+M`,T#````````1`XP6(X"C0.,!(8%@P8``"0```"D`@````````````"#!```
+M`````$0.0%Z/`HX#C02,!88&@P<T````S`(`````````````R0,```````!"
+M#A!"#AA"#B!!#BA!#C"#!H8%C`2-`XX"`````````#P````$`P``````````
+M``"/`@```````$(.$$(.&$(.($(.*$$.,$$..$0.0(,'A@:,!8T$C@./`@``
+M```````T````1`,`````````````.0(```````!"#A!"#AA"#B!!#BA!#C"#
+M!H8%C`2-`XX"`````````#P```!\`P`````````````0`@```````$(.$$(.
+M&$(.($(.*$$.,$$..$0.0(,'A@:,!8T$C@./`@`````````\````O`,`````
+M````````K`D```````!"#A!"#AA"#B!"#BA!#C!!#CA$#H`!@P>&!HP%C02.
+M`X\"````````'````/P#`````````````+4`````````1`X0```````L````
+M'`0`````````````:P,```````!"#A!"#AA!#B!!#BA$#C"#!88$C`.-`@`<
+M````3`0`````````````'0````````!$#A```````!P```!L!```````````
+M``"A`````````$$.$(,"````%````(P$`````````````$``````````/```
+M`*0$`````````````'T(````````0@X00@X80@X@0@XH00XP00XX1`Y0@P>&
+M!HP%C02.`X\"`````````#P```#D!`````````````#?`P```````$(.$$(.
+M&$(.($(.*$$.,$$..$0.4(,'A@:,!8T$C@./`@`````````D````)`4`````
+M````````(PH```````!$#E!>CP*.`XT$C`6&!H,')````$P%````````````
+M`&0`````````00X000X81`X@@P.&`@```#P```!T!0````````````"&!P``
+M`````$(.$$(.&$(.($(.*$$.,$$..$0.@`&#!X8&C`6-!(X#CP(````````D
+M````M`4`````````````L0````````!$#C!4C0*,`X8$@P4`````/````-P%
+M`````````````!4"````````0@X00@X80@X@0@XH00XP00XX1`Y`@P>&!HP%
+MC02.`X\"`````````"0````<!@````````````"U`````````$(.$$$.&$$.
+M((,$A@.,`@`D````1`8`````````````C0(```````!$#C!8C@*-`XP$A@6#
+M!@``'````&P&`````````````#\`````````1`X0```````L````C`8`````
+M````````M@````````!"#A!"#AA!#B!!#BA$#C"#!88$C`.-`@`D````O`8`
+M````````````^P(```````!$#C!4C0*,`X8$@P4`````%``````````!``%X
+M$`P'")`!````````)````!P``````````````/<`````````1`XP5(T"C`.&
+M!(,%`````"0```!$```````````````(`0```````$0.,%B.`HT#C`2&!8,&
+M```\````;```````````````E0````````!"#A!"#AA"#B!"#BA!#C!!#CA$
+M#D"#!X8&C`6-!(X#CP(`````````)````*P``````````````%$!````````
+M1`Y07H\"C@.-!(P%A@:#!Q0```#4``````````````!F`````````!0```#L
+M``````````````!&`````````#P````$`0````````````!)`0```````$(.
+M$$(.&$(.($(.*$$.,$$..$0.0(,'A@:,!8T$C@./`@`````````<````1`$`
+M````````````AP````````!$#C```````!0```!D`0````````````!6````
+M`````"P```!\`0````````````"2`````````$(.$$(.&$$.($$.*$0.,(,%
+MA@2,`XT"`#P```"L`0````````````!O`0```````$(.$$(.&$(.($(.*$$.
+M,$$..$0.8(,'A@:,!8T$C@./`@`````````<````[`$`````````````10``
+M``````!!#A"#`@```"0````,`@````````````#D`P```````$0.0%Z/`HX#
+MC02,!88&@P<D````-`(`````````````#@$```````!$#D!>CP*.`XT$C`6&
+M!H,')````%P"`````````````$4!````````1`Y`7H\"C@.-!(P%A@:#!QP`
+M``"$`@````````````#Y`````````$$.$(,"````)````*0"````````````
+M`+X`````````1`XP5(T"C`.&!(,%`````!P```#,`@````````````!O````
+M`````$0.($J&`H,#)````.P"`````````````,,!````````1`X@3HP"A@.#
+M!````````"0````4`P````````````!3`0```````$0.4%Z/`HX#C02,!88&
+M@P<D````/`,`````````````8`$```````!$#E!>CP*.`XT$C`6&!H,'%```
+M```````!``%X$`P'")`!````````%````!P``````````````'$`````````
+M%````#0``````````````$P`````````%``````````!``%X$`P'")`!````
+M````%````!P```````````````L!````````/````#0``````````````%0$
+M````````0@X00@X80@X@0@XH00XP00XX1`Y0@P>&!HP%C02.`X\"````````
+M`!0```!T```````````````T`0```````!0```",``````````````"!````
+M`````!0```"D```````````````G`````````!0```"\```````````````"
+M`````````!0```#4``````````````!/`````````"0```#L````````````
+M``!Q`0```````$$.$$$.&$0.((,#A@(````<````%`$`````````````(```
+M``````!!#A"#`@```!P````T`0`````````````@`````````$$.$(,"````
+M)````%0!`````````````.X!````````1`XP5(T"C`.&!(,%`````"0```!\
+M`0````````````#V`````````$0.($Z,`H8#@P0````````\````I`$`````
+M````````7`$```````!"#A!"#AA"#B!"#BA!#C!!#CA$#D"#!X8&C`6-!(X#
+MCP(`````````'````.0!`````````````#P`````````00X0@P(````D````
+M!`(`````````````:@````````!!#A!!#AA$#B"#`X8"````%````"P"````
+M`````````"\`````````)````$0"`````````````"$!````````1`XP5(T"
+MC`.&!(,%`````!P```!L`@`````````````N`````````$0.$```````%```
+M`(P"`````````````#,`````````+````*0"`````````````',!````````
+M0@X00@X800X@00XH1`XP@P6&!(P#C0(`)````-0"`````````````$8!````
+M````00X000X81`X@@P.&`@```!P```#\`@````````````#M`````````$$.
+M$(,"````'````!P#`````````````%X`````````1`X@2H8"@P,<````/`,`
+M````````````-0````````!$#A```````!P```!<`P`````````````T````
+M`````$0.$```````%````'P#`````````````"0`````````'````)0#````
+M`````````"8`````````1`X0```````4````M`,`````````````)```````
+M```<````S`,`````````````0`````````!$#A```````!0```#L`P``````
+M```````:`````````!P````$!``````````````F`````````$0.$```````
+M%````"0$`````````````"0`````````'````#P$`````````````#@`````
+M````1`X0```````4````7`0`````````````)``````````D````=`0`````
+M````````$P,```````!$#E!>CP*.`XT$C`6&!H,')````)P$````````````
+M`+L`````````1`XP5(T"C`.&!(,%`````"0```#$!`````````````#*````
+M`````$0.,%B.`HT#C`2&!8,&```D````[`0`````````````ZP````````!$
+M#D!>CP*.`XT$C`6&!H,')````!0%`````````````/T`````````1`Y`7H\"
+MC@.-!(P%A@:#!R0````\!0````````````"2`0```````$$.$$$.&$0.((,#
+MA@(````D````9`4`````````````1P$```````!$#D!>CP*.`XT$C`6&!H,'
+M)````(P%``````````````0!````````1`XP6(X"C0.,!(8%@P8``"0```"T
+M!0`````````````,`0```````$0.,%B.`HT#C`2&!8,&```D````W`4`````
+M````````*@$```````!$#D!>CP*.`XT$C`6&!H,')`````0&````````````
+M`"8!````````1`XP6(X"C0.,!(8%@P8``"0````L!@````````````"I````
+M`````$0.($Z,`H8#@P0````````4````5`8`````````````6``````````<
+M````;`8`````````````/`````````!$#B!*A@*#`Q0```",!@``````````
+M```"`0```````!P```"D!@`````````````\`````````$0.($J&`H,#%```
+M`,0&`````````````.(`````````)````-P&`````````````$$!````````
+M0@X000X800X@@P2&`XP"`!0````$!P`````````````G`````````!0````<
+M!P`````````````C`````````"0````T!P````````````"'`P```````$$.
+M$$$.&$0.((,#A@(````<````7`<`````````````CP````````!$#B!*A@*#
+M`R0```!\!P````````````!,`````````$(.$$$.&$0.((,#C`(````4````
+MI`<`````````````;P`````````D````O`<`````````````.`$```````!$
+M#BA3C0*,`X8$@P4`````)````.0'`````````````)D!````````1`XP5(T"
+MC`.&!(,%`````"0````,"`````````````"H`````````$0.,%2-`HP#A@2#
+M!0`````D````-`@`````````````AP$```````!!#A!!#AA$#B"#`X8"````
+M)````%P(`````````````/``````````1`Y`7H\"C@.-!(P%A@:#!R0```"$
+M"`````````````"&`````````$0.($Z,`H8#@P0````````D````K`@`````
+M````````KP````````!$#B!.C`*&`X,$````````-````-0(````````````
+M`.\!````````0@X00@X80@X@00XH00XP@P:&!8P$C0..`@`````````4````
+M``````$``7@0#`<(D`$````````4````'```````````````%0`````````4
+M````-```````````````H@`````````D````3```````````````8@``````
+M``!"#A!!#AA!#B"#!(8#C`(`'````'0``````````````"D`````````00X0
+M@P(````D````E```````````````H`$```````!$#C!4C0*,`X8$@P4`````
+M+````+P``````````````)X`````````0@X00@X800X@00XH@P6&!(P#C0(`
+M````'````.P``````````````(0`````````1`X0```````<````#`$`````
+M````````A`````````!$#A```````"0````L`0`````````````'`0``````
+M`$$.$$$.&$0.((,#A@(````L````5`$`````````````[P````````!"#A!"
+M#AA!#B!!#BA$#C"#!88$C`.-`@`<````A`$`````````````=`````````!!
+M#A"#`@```!0```"D`0`````````````:`````````!0```"\`0``````````
+M```Q`````````!0```#4`0`````````````T`````````"0```#L`0``````
+M``````"C"0```````$0.8%Z/`HX#C02,!88&@P<4````%`(`````````````
+M3``````````D````+`(`````````````E@$```````!!#A!!#AA$#B"#`X8"
+M````'````%0"`````````````/<`````````00X0@P(````<````=`(`````
+M````````>0$```````!!#A"#`@```!0``````````0`!>!`,!PB0`0``````
+M`!0````<``````````````!W`````````#P````T``````````````"#`@``
+M`````$(.$$(.&$(.($(.*$$.,$$..$0.0(,'A@:,!8T$C@./`@`````````D
+M````=```````````````F0````````!!#A!!#AA$#B"#`X8"````+````)P`
+M`````````````#L"````````0@X00@X800X@00XH1`XP@P6&!(P#C0(`)```
+M`,P``````````````.,`````````1`Y`7H\"C@.-!(P%A@:#!R0```#T````
+M``````````"Y`````````$0.0%Z/`HX#C02,!88&@P<\````'`$`````````
+M````P`(```````!"#A!"#AA"#B!"#BA!#C!!#CA'#H`%@P>&!HP%C02.`X\"
+M````````/````%P!`````````````/0"````````0@X00@X80@X@0@XH00XP
+M00XX1P[P!(,'A@:,!8T$C@./`@```````#P```"<`0````````````"-`P``
+M`````$(.$$(.&$(.($(.*$$.,$$..$<.@`6#!X8&C`6-!(X#CP(````````\
+M````W`$`````````````QP,```````!"#A!"#AA"#B!"#BA!#C!!#CA'#N`$
+M@P>&!HP%C02.`X\"````````+````!P"`````````````.L`````````0@X0
+M0@X800X@00XH1`XP@P6&!(P#C0(`%````$P"`````````````$T`````````
+M%````&0"`````````````$T`````````)````'P"`````````````/@#````
+M````1`Y@7H\"C@.-!(P%A@:#!SP```"D`@`````````````D!@```````$(.
+M$$(.&$(.($(.*$$.,$$..$0.0(,'A@:,!8T$C@./`@`````````D````Y`(`
+M````````````&@,```````!$#D!>CP*.`XT$C`6&!H,')`````P#````````
+M``````L'````````1`Y@7H\"C@.-!(P%A@:#!R0````T`P````````````"X
+M!````````$0.,%B.`HT#C`2&!8,&```\````7`,`````````````W@(`````
+M``!"#A!"#AA"#B!"#BA!#C!!#CA$#F"#!X8&C`6-!(X#CP(`````````)```
+M`)P#`````````````/,`````````1`X@3HP"A@.#!````````#P```#$`P``
+M``````````#``````````$(.$$(.&$(.($(.*$$.,$$..$0.8(,'A@:,!8T$
+MC@./`@`````````\````!`0`````````````P`````````!"#A!"#AA"#B!"
+M#BA!#C!!#CA$#F"#!X8&C`6-!(X#CP(`````````%````$0$````````````
+M`&0`````````%````%P$``````````````<`````````/````'0$````````
+M`````)D"````````0@X00@X80@X@0@XH00XP00XX1`Y@@P>&!HP%C02.`X\"
+M`````````!0```"T!``````````````M`````````"P```#,!```````````
+M```'"````````$(.$$(.&$$.($$.*$0.,(,%A@2,`XT"`!P```#\!```````
+M``````!*`````````$$.$(,"````%````!P%`````````````$$`````````
+M)````#0%`````````````!,(````````1`Y`7H\"C@.-!(P%A@:#!R0```!<
+M!0````````````"Y`P```````$0.,%2-`HP#A@2#!0`````D````A`4`````
+M````````^P$```````!$#C!4C0*,`X8$@P4`````)````*P%````````````
+M`,\`````````1`XP5(T"C`.&!(,%`````#P```#4!0````````````#A````
+M`````$(.$$(.&$(.($(.*$$.,$$..$0.0(,'A@:,!8T$C@./`@`````````4
+M````%`8`````````````+0`````````D````+`8`````````````E@(`````
+M``!"#A!!#AA!#B"#!(8#C`(`)````%0&`````````````)(`````````1`X@
+M3HP"A@.#!````````"0```!\!@````````````"2`````````$0.($Z,`H8#
+M@P0````````D````I`8`````````````AP````````!$#B!.C`*&`X,$````
+M````)````,P&`````````````(<`````````1`X@3HP"A@.#!````````"0`
+M``#T!@````````````"2`````````$0.($Z,`H8#@P0````````D````'`<`
+M````````````AP````````!$#B!.C`*&`X,$````````)````$0'````````
+M`````(<`````````1`X@3HP"A@.#!````````"0```!L!P````````````"Z
+M`````````$0.,%B.`HT#C`2&!8,&```D````E`<`````````````Y0``````
+M``!$#D!>CP*.`XT$C`6&!H,')````+P'`````````````$P(````````1`Y`
+M7H\"C@.-!(P%A@:#!R0```#D!P````````````!S!P```````$0.0%Z/`HX#
+MC02,!88&@P<4``````````$``7@0#`<(D`$````````4````'```````````
+M````-P`````````4````-```````````````)P`````````L````3```````
+M````````C@````````!"#A!"#AA!#B!!#BB#!88$C`.-`@`````D````?```
+M````````````6`````````!$#B!.C0*,`X,$````````)````*0`````````
+M`````$X`````````0@X000X800X@@P2&`XP"`!P```#,```````````````:
+M`````````$$.$(,"````)````.P``````````````/0`````````1`XP6(X"
+MC0.,!(8%@P8``"0````4`0````````````"!`````````$0.,%2-`HP#A@2#
+M!0`````\````/`$`````````````'`(```````!"#A!"#AA"#B!"#BA!#C!!
+M#CA$#D"#!X8&C`6-!(X#CP(`````````'````'P!`````````````%(`````
+M````1`X@2HP"@P,<````G`$`````````````4@````````!$#B!*C`*#`R0`
+M``"\`0````````````#L`````````$0.0%Z/`HX#C02,!88&@P<<````Y`$`
+M````````````4@````````!$#B!*C`*#`QP````$`@````````````!2````
+M`````$0.($J,`H,#/````"0"`````````````&0"````````0@X00@X80@X@
+M0@XH00XP00XX1`Y@@P>&!HP%C02.`X\"`````````"0```!D`@``````````
+M``#5`@```````$0.4%Z/`HX#C02,!88&@P<<````C`(`````````````10``
+M``````!$#A```````!P```"L`@`````````````W`````````$0.$```````
+M)````,P"`````````````$T`````````1`X@3HT"C`.#!````````!0```#T
+M`@`````````````9`````````!P````,`P````````````#F`````````$0.
+M$```````)````"P#`````````````*4`````````0@X000X800X@@P2&`XP"
+M`!0``````````0`!>!`,!PB0`0```````!0````<```````````````6````
+M`````!0````T```````````````0`````````!P```!,``````````````#F
+M`````````$$.$(,"````%````&P``````````````%8`````````)````(0`
+M`````````````*0`````````1`X@3HP"A@.#!````````"0```"L````````
+M``````#D`````````$0.0%Z/`HX#C02,!88&@P<\````U```````````````
+M-`$```````!"#A!"#AA"#B!"#BA!#C!!#CA$#D"#!X8&C`6-!(X#CP(`````
+M````-````!0!`````````````#H!````````0@X00@X80@X@00XH00XP@P:&
+M!8P$C0..`@`````````4``````````$``7@0#`<(D`$````````4````'```
+M````````````+@$````````<````-```````````````IP$```````!!#A"#
+M`@```!0```!4```````````````%`````````!0```!L```````````````&
+M`````````!0```"$```````````````<`````````!0```"<````````````
+M```=`````````!0```"T```````````````K`````````!0```#,````````
+M```````G`````````"0```#D``````````````!-`0```````$0.,%B.`HT#
+MC`2&!8,&```D````#`$`````````````/`$```````!!#A!!#AA$#D"#`X8"
+M````%````#0!`````````````$``````````)````$P!`````````````)H`
+M````````1`XH4XT"C`.&!(,%`````!0```!T`0````````````!@````````
+M`!0```",`0`````````````7`````````!0```"D`0`````````````-`P``
+M`````!0``````````0`!>!`,!PB0`0```````"0````<``````````````!:
+M`````````$(.$$$.&$$.((,$A@.,`@`4````1```````````````0```````
+M```4````7```````````````#@`````````D````=```````````````E```
+M``````!$#C!/C`*&`X,$````````-````)P``````````````&8`````````
+M0@X00@X80@X@00XH00XP1`Y`@P:&!8P$C0..`@`````<````U```````````
+M````=0````````!!#A!$#B"#`B0```#T``````````````!R`````````$$.
+M$$$.&$0.((,#A@(````D````'`$`````````````J@````````!!#A!!#AA$
+M#B"#`X8"````)````$0!`````````````(8`````````00X000X81`X@@P.&
+M`@```"0```!L`0````````````"R`````````$0.,%2-`HP#A@2#!0`````D
+M````E`$`````````````<0````````!$#C!8C@*-`XP$A@6#!@``)````+P!
+M`````````````*$`````````1`XP3XP"A@.#!````````"0```#D`0``````
+M```````?`0```````$0.0%Z/`HX#C02,!88&@P<D````#`(`````````````
+MH@````````!!#A!!#AA$#B"#`X8"````)````#0"`````````````*(`````
+M````00X000X81`X@@P.&`@```"0```!<`@````````````#1`````````$$.
+M$$$.&$0.((,#A@(````D````A`(`````````````W`````````!!#A!!#AA$
+M#B"#`X8"````'````*P"`````````````(0`````````00X0@P(````D````
+MS`(`````````````"P$```````!$#C!4C0*,`X8$@P4`````%``````````!
+M``%X$`P'")`!````````+````!P``````````````$L!````````0@X000X8
+M00X@1`Y0@P2&`XP"````````%````$P``````````````$@`````````/```
+M`&0``````````````(X#````````0@X00@X80@X@0@XH00XP00XX1`Y`@P>&
+M!HP%C02.`X\"`````````!P```"D``````````````!_`````````$$.$(,"
+M````%````,0``````````````"0`````````%````-P``````````````$8`
+M````````-````/0``````````````/<`````````0@X00@X80@X@00XH00XP
+M1`XX@P:&!8P$C0..`@`````\````+`$`````````````'`(```````!"#A!"
+M#AA"#B!"#BA!#C!!#CA$#E"#!X8&C`6-!(X#CP(`````````/````&P!````
+M`````````$L!````````0@X00@X80@X@0@XH00XP00XX1`Y`@P>&!HP%C02.
+M`X\"`````````!0```"L`0`````````````&`````````!0```#$`0``````
+M```````&`````````!0```#<`0`````````````&`````````#0```#T`0``
+M```````````*`P```````$(.$$(.&$(.($$.*$$.,(,&A@6,!(T#C@(`````
+M````'````"P"`````````````!\`````````00X0@P(````<````3`(`````
+M````````>@````````!$#B!*A@*#`R0```!L`@````````````#?````````
+M`$$.$$$.&$0.((,#A@(````L````E`(`````````````70$```````!"#A!!
+M#AA!#B!$#E"#!(8#C`(````````4````Q`(``````````````@`````````D
+M````W`(`````````````$0(```````!!#A!!#AA$#B"#`X8"````%`````0#
+M``````````````@`````````)````!P#`````````````"@!````````1`Y@
+M3XP"A@.#!````````#P```!$`P````````````!'!0```````$(.$$(.&$(.
+M($(.*$$.,$$..$0.0(,'A@:,!8T$C@./`@`````````\````A`,`````````
+M````[0(```````!"#A!"#AA"#B!"#BA!#C!!#CA$#D"#!X8&C`6-!(X#CP(`
+M````````)````,0#`````````````%T!````````1`XP6(X"C0.,!(8%@P8`
+M`"0```#L`P````````````"\`````````$0.($Z,`H8#@P0````````D````
+M%`0`````````````>08```````!$#D!>CP*.`XT$C`6&!H,')````#P$````
+M`````````)0#````````1`YP7H\"C@.-!(P%A@:#!QP```!D!```````````
+M``!&`````````$0.($J,`H,#'````(0$`````````````!$`````````1`X0
+M```````4````I`0`````````````!@`````````4````O`0`````````````
+M7P`````````4````U`0`````````````/``````````<````[`0`````````
+M````/`````````!$#AA)C`*#`R0````,!0````````````!%`P```````$$.
+M$$$.&(,#A@(````````D````-`4`````````````C08```````!!#A!!#AB#
+M`X8"````````)````%P%`````````````-P&````````0@X000X800X@@P2&
+M`XP"`!0```"$!0````````````!0`@```````!0```"<!0`````````````3
+M`````````"0```"T!0````````````"(`0```````$0.0%Z/`HX#C02,!88&
+M@P<D````W`4`````````````TP0```````!$#E!>CP*.`XT$C`6&!H,')```
+M``0&`````````````-$`````````1`XP5(T"C`.&!(,%`````!P````L!@``
+M``````````![`````````$0.($J&`H,#)````$P&`````````````(@!````
+M````1`Y`7H\"C@.-!(P%A@:#!QP```!T!@````````````"<`````````$0.
+M$```````%````)0&`````````````%X`````````%````*P&````````````
+M`%X`````````'````,0&`````````````!X`````````00X0@P(````<````
+MY`8`````````````'@````````!!#A"#`@```"P````$!P````````````"/
+M!@```````$(.$$(.&$$.($$.*$0.@`&#!88$C`.-`AP````T!P``````````
+M``!P`````````$0.($J,`H,#'````%0'`````````````!H`````````1`X0
+M```````4``````````$``7@0#`<(D`$````````4````'```````````````
+M9@`````````D````-```````````````"@$```````!$#D!>CP*.`XT$C`6&
+M!H,'%``````````!``%X$`P'")`!````````%````!P``````````````#P`
+M````````%````#0``````````````#0`````````%````$P`````````````
+M`$$`````````'````&0``````````````$D`````````1`X0```````4````
+MA```````````````#``````````4``````````$``7@0#`<(D`$````````4
+M````'```````````````'0`````````4````-```````````````'@``````
+M```4````3```````````````*0`````````<````9```````````````.@``
+M``````!$#A```````!0```"$```````````````R`````````!0```"<````
+M```````````0`````````!0```"T``````````````!;`````````!0```#,
+M```````````````-`````````!0```#D```````````````<`````````!0`
+M``#\```````````````L`````````!0````4`0`````````````P````````
+M`!0````L`0`````````````M`````````!0```!$`0`````````````M````
+M`````!0```!<`0`````````````D`@```````!P```!T`0````````````"H
+M`````````$$.$$0.<(,"%````)0!`````````````#,`````````%```````
+M```!``%X$`P'")`!````````%````!P``````````````'(`````````)```
+M`#0``````````````*L!````````00X000X81`X@@P.&`@```#0```!<````
+M``````````!Z`@```````$(.$$(.&$(.($$.*$$.,(,&A@6,!(T#C@(`````
+M````%````)0``````````````&(`````````%````*P``````````````&(`
+M````````'````,0``````````````#\`````````1`X@2HP"@P,4````Y```
+M````````````@@`````````D````_```````````````?@$```````!"#A!!
+M#AA!#B"#!(8#C`(`%``````````!``%X$`P'")`!````````'````!P`````
+M`````````-L#````````00X01`YP@P(T````/```````````````$@L`````
+M``!"#A!"#AA"#B!!#BA!#C!$#I`!@P:&!8P$C0..`@```#P```!T````````
+M``````#O`````````$(.$$(.&$(.($(.*$$.,$$..$0.0(,'A@:,!8T$C@./
+M`@`````````<````M```````````````DP````````!$#A```````!P```#4
+M```````````````.`````````$0.$```````)````/0``````````````#\!
+M````````0@X000X800X@@P2&`XP"`!P````<`0`````````````1````````
+M`$0.$```````%````#P!`````````````$@`````````%````%0!````````
+M`````(P`````````)````&P!`````````````!,&````````1`Y`7H\"C@.-
+M!(P%A@:#!Q0```"4`0````````````!\`````````!0```"L`0``````````
+M``!P`````````#P```#$`0````````````#Z#````````$(.$$(.&$(.($(.
+M*$$.,$$..$0.D`&#!X8&C`6-!(X#CP(````````D````!`(`````````````
+MA`````````!$#BA/C`*&`X,$````````)````"P"`````````````$$!````
+M````1`XP5(T"C`.&!(,%`````"0```!4`@`````````````(`0```````$0.
+M0%Z/`HX#C02,!88&@P<D````?`(`````````````S0,```````!$#C!8C@*-
+M`XP$A@6#!@``)````*0"`````````````(,$````````1`Y`7H\"C@.-!(P%
+MA@:#!S0```#,`@````````````#)`P```````$(.$$(.&$(.($$.*$$.,(,&
+MA@6,!(T#C@(`````````/`````0#`````````````(\"````````0@X00@X8
+M0@X@0@XH00XP00XX1`Y`@P>&!HP%C02.`X\"`````````#0```!$`P``````
+M```````Y`@```````$(.$$(.&$(.($$.*$$.,(,&A@6,!(T#C@(`````````
+M/````'P#`````````````!`"````````0@X00@X80@X@0@XH00XP00XX1`Y`
+M@P>&!HP%C02.`X\"`````````#P```"\`P````````````"L"0```````$(.
+M$$(.&$(.($(.*$$.,$$..$0.@`&#!X8&C`6-!(X#CP(````````<````_`,`
+M````````````M0````````!$#A```````"P````<!`````````````!K`P``
+M`````$(.$$(.&$$.($$.*$0.,(,%A@2,`XT"`!P```!,!``````````````=
+M`````````$0.$```````'````&P$`````````````*$`````````00X0@P(`
+M```4````C`0`````````````0``````````\````I`0`````````````?0@`
+M``````!"#A!"#AA"#B!"#BA!#C!!#CA$#E"#!X8&C`6-!(X#CP(`````````
+M/````.0$`````````````-\#````````0@X00@X80@X@0@XH00XP00XX1`Y0
+M@P>&!HP%C02.`X\"`````````"0````D!0`````````````C"@```````$0.
+M4%Z/`HX#C02,!88&@P<D````3`4`````````````9`````````!!#A!!#AA$
+M#B"#`X8"````/````'0%`````````````(8'````````0@X00@X80@X@0@XH
+M00XP00XX1`Z``8,'A@:,!8T$C@./`@```````"0```"T!0````````````"Q
+M`````````$0.,%2-`HP#A@2#!0`````\````W`4`````````````%0(`````
+M``!"#A!"#AA"#B!"#BA!#C!!#CA$#D"#!X8&C`6-!(X#CP(`````````)```
+M`!P&`````````````+4`````````0@X000X800X@@P2&`XP"`"0```!$!@``
+M``````````"-`@```````$0.,%B.`HT#C`2&!8,&```<````;`8`````````
+M````/P````````!$#A```````"P```",!@````````````"V`````````$(.
+M$$(.&$$.($$.*$0.,(,%A@2,`XT"`"0```"\!@````````````#[`@``````
+M`$0.,%2-`HP#A@2#!0`````4``````````$``7@0#`<(D`$````````D````
+M'```````````````]P````````!$#C!4C0*,`X8$@P4`````)````$0`````
+M``````````@!````````1`XP6(X"C0.,!(8%@P8``#P```!L````````````
+M``"5`````````$(.$$(.&$(.($(.*$$.,$$..$0.0(,'A@:,!8T$C@./`@``
+M```````D````K```````````````40$```````!$#E!>CP*.`XT$C`6&!H,'
+M%````-0``````````````&8`````````%````.P``````````````$8`````
+M````/`````0!`````````````$D!````````0@X00@X80@X@0@XH00XP00XX
+M1`Y`@P>&!HP%C02.`X\"`````````!P```!$`0````````````"'````````
+M`$0.,```````%````&0!`````````````%8`````````+````'P!````````
+M`````)(`````````0@X00@X800X@00XH1`XP@P6&!(P#C0(`/````*P!````
+M`````````&\!````````0@X00@X80@X@0@XH00XP00XX1`Y@@P>&!HP%C02.
+M`X\"`````````!P```#L`0````````````!%`````````$$.$(,"````)```
+M``P"`````````````.0#````````1`Y`7H\"C@.-!(P%A@:#!R0````T`@``
+M```````````.`0```````$0.0%Z/`HX#C02,!88&@P<D````7`(`````````
+M````10$```````!$#D!>CP*.`XT$C`6&!H,''````(0"`````````````/D`
+M````````00X0@P(````D````I`(`````````````O@````````!$#C!4C0*,
+M`X8$@P4`````'````,P"`````````````&\`````````1`X@2H8"@P,D````
+M[`(`````````````PP$```````!$#B!.C`*&`X,$````````)````!0#````
+M`````````%,!````````1`Y07H\"C@.-!(P%A@:#!R0````\`P``````````
+M``!@`0```````$0.4%Z/`HX#C02,!88&@P<4``````````$``7@0#`<(D`$`
+M```````4````'```````````````<0`````````4````-```````````````
+M3``````````4``````````$``7@0#`<(D`$````````4````'```````````
+M````"P$````````\````-```````````````5`0```````!"#A!"#AA"#B!"
+M#BA!#C!!#CA$#E"#!X8&C`6-!(X#CP(`````````%````'0`````````````
+M`#0!````````%````(P``````````````($`````````%````*0`````````
+M`````"<`````````%````+P```````````````(`````````%````-0`````
+M`````````$\`````````)````.P``````````````'$!````````00X000X8
+M1`X@@P.&`@```!P````4`0`````````````@`````````$$.$(,"````'```
+M`#0!`````````````"``````````00X0@P(````D````5`$`````````````
+M[@$```````!$#C!4C0*,`X8$@P4`````)````'P!`````````````/8`````
+M````1`X@3HP"A@.#!````````#P```"D`0````````````!<`0```````$(.
+M$$(.&$(.($(.*$$.,$$..$0.0(,'A@:,!8T$C@./`@`````````<````Y`$`
+M````````````/`````````!!#A"#`@```"0````$`@````````````!J````
+M`````$$.$$$.&$0.((,#A@(````4````+`(`````````````+P`````````D
+M````1`(`````````````(0$```````!$#C!4C0*,`X8$@P4`````'````&P"
+M`````````````"X`````````1`X0```````4````C`(`````````````,P``
+M```````L````I`(`````````````<P$```````!"#A!"#AA!#B!!#BA$#C"#
+M!88$C`.-`@`D````U`(`````````````1@$```````!!#A!!#AA$#B"#`X8"
+M````'````/P"`````````````.T`````````00X0@P(````<````'`,`````
+M````````7@````````!$#B!*A@*#`QP````\`P`````````````U````````
+M`$0.$```````'````%P#`````````````#0`````````1`X0```````4````
+M?`,`````````````)``````````<````E`,`````````````)@````````!$
+M#A```````!0```"T`P`````````````D`````````!P```#,`P``````````
+M``!``````````$0.$```````%````.P#`````````````!H`````````'```
+M``0$`````````````"8`````````1`X0```````4````)`0`````````````
+M)``````````<````/`0`````````````.`````````!$#A```````!0```!<
+M!``````````````D`````````"0```!T!``````````````3`P```````$0.
+M4%Z/`HX#C02,!88&@P<D````G`0`````````````NP````````!$#C!4C0*,
+M`X8$@P4`````)````,0$`````````````,H`````````1`XP6(X"C0.,!(8%
+M@P8``"0```#L!`````````````#K`````````$0.0%Z/`HX#C02,!88&@P<D
+M````%`4`````````````_0````````!$#D!>CP*.`XT$C`6&!H,')````#P%
+M`````````````)(!````````00X000X81`X@@P.&`@```"0```!D!0``````
+M``````!'`0```````$0.0%Z/`HX#C02,!88&@P<D````C`4`````````````
+M!`$```````!$#C!8C@*-`XP$A@6#!@``)````+0%``````````````P!````
+M````1`XP6(X"C0.,!(8%@P8``"0```#<!0`````````````J`0```````$0.
+M0%Z/`HX#C02,!88&@P<D````!`8`````````````)@$```````!$#C!8C@*-
+M`XP$A@6#!@``)````"P&`````````````*D`````````1`X@3HP"A@.#!```
+M`````!0```!4!@````````````!8`````````!P```!L!@`````````````\
+M`````````$0.($J&`H,#%````(P&``````````````(!````````'````*0&
+M`````````````#P`````````1`X@2H8"@P,4````Q`8`````````````X@``
+M```````D````W`8`````````````00$```````!"#A!!#AA!#B"#!(8#C`(`
+M%`````0'`````````````"<`````````%````!P'`````````````",`````
+M````)````#0'`````````````(<#````````00X000X81`X@@P.&`@```!P`
+M``!<!P````````````"/`````````$0.($J&`H,#)````'P'````````````
+M`$P`````````0@X000X81`X@@P.,`@```!0```"D!P````````````!O````
+M`````"0```"\!P`````````````X`0```````$0.*%.-`HP#A@2#!0`````D
+M````Y`<`````````````F0$```````!$#C!4C0*,`X8$@P4`````)`````P(
+M`````````````*@`````````1`XP5(T"C`.&!(,%`````"0````T"```````
+M``````"'`0```````$$.$$$.&$0.((,#A@(````D````7`@`````````````
+M\`````````!$#D!>CP*.`XT$C`6&!H,')````(0(`````````````(8`````
+M````1`X@3HP"A@.#!````````"0```"L"`````````````"O`````````$0.
+M($Z,`H8#@P0````````T````U`@`````````````[P$```````!"#A!"#AA"
+M#B!!#BA!#C"#!H8%C`2-`XX"`````````!0``````````0`!>!`,!PB0`0``
+M`````!0````<```````````````5`````````!0````T``````````````"B
+M`````````"0```!,``````````````!B`````````$(.$$$.&$$.((,$A@.,
+M`@`<````=```````````````*0````````!!#A"#`@```"0```"4````````
+M``````"@`0```````$0.,%2-`HP#A@2#!0`````L````O```````````````
+MG@````````!"#A!"#AA!#B!!#BB#!88$C`.-`@`````<````[```````````
+M````A`````````!$#A```````!P````,`0````````````"$`````````$0.
+M$```````)````"P!``````````````<!````````00X000X81`X@@P.&`@``
+M`"P```!4`0````````````#O`````````$(.$$(.&$$.($$.*$0.,(,%A@2,
+M`XT"`!P```"$`0````````````!T`````````$$.$(,"````%````*0!````
+M`````````!H`````````%````+P!`````````````#$`````````%````-0!
+M`````````````#0`````````)````.P!`````````````*,)````````1`Y@
+M7H\"C@.-!(P%A@:#!Q0````4`@````````````!,`````````"0````L`@``
+M``````````"6`0```````$$.$$$.&$0.((,#A@(````<````5`(`````````
+M````]P````````!!#A"#`@```!P```!T`@````````````!Y`0```````$$.
+M$(,"````%``````````!``%X$`P'")`!````````%````!P`````````````
+M`'<`````````/````#0``````````````(,"````````0@X00@X80@X@0@XH
+M00XP00XX1`Y`@P>&!HP%C02.`X\"`````````"0```!T``````````````"9
+M`````````$$.$$$.&$0.((,#A@(````L````G```````````````.P(`````
+M``!"#A!"#AA!#B!!#BA$#C"#!88$C`.-`@`D````S```````````````XP``
+M``````!$#D!>CP*.`XT$C`6&!H,')````/0``````````````+D`````````
+M1`Y`7H\"C@.-!(P%A@:#!SP````<`0````````````#``@```````$(.$$(.
+M&$(.($(.*$$.,$$..$<.@`6#!X8&C`6-!(X#CP(````````\````7`$`````
+M````````]`(```````!"#A!"#AA"#B!"#BA!#C!!#CA'#O`$@P>&!HP%C02.
+M`X\"````````/````)P!`````````````(T#````````0@X00@X80@X@0@XH
+M00XP00XX1PZ`!8,'A@:,!8T$C@./`@```````#P```#<`0````````````#'
+M`P```````$(.$$(.&$(.($(.*$$.,$$..$<.X`2#!X8&C`6-!(X#CP(`````
+M```L````'`(`````````````ZP````````!"#A!"#AA!#B!!#BA$#C"#!88$
+MC`.-`@`4````3`(`````````````30`````````4````9`(`````````````
+M30`````````D````?`(`````````````^`,```````!$#F!>CP*.`XT$C`6&
+M!H,'/````*0"`````````````"0&````````0@X00@X80@X@0@XH00XP00XX
+M1`Y`@P>&!HP%C02.`X\"`````````"0```#D`@`````````````:`P``````
+M`$0.0%Z/`HX#C02,!88&@P<D````#`,`````````````"P<```````!$#F!>
+MCP*.`XT$C`6&!H,')````#0#`````````````+@$````````1`XP6(X"C0.,
+M!(8%@P8``#P```!<`P````````````#>`@```````$(.$$(.&$(.($(.*$$.
+M,$$..$0.8(,'A@:,!8T$C@./`@`````````D````G`,`````````````\P``
+M``````!$#B!.C`*&`X,$````````/````,0#`````````````,``````````
+M0@X00@X80@X@0@XH00XP00XX1`Y@@P>&!HP%C02.`X\"`````````#P````$
+M!`````````````#``````````$(.$$(.&$(.($(.*$$.,$$..$0.8(,'A@:,
+M!8T$C@./`@`````````4````1`0`````````````9``````````4````7`0`
+M````````````!P`````````\````=`0`````````````F0(```````!"#A!"
+M#AA"#B!"#BA!#C!!#CA$#F"#!X8&C`6-!(X#CP(`````````%````+0$````
+M`````````"T`````````+````,P$``````````````<(````````0@X00@X8
+M00X@00XH1`XP@P6&!(P#C0(`'````/P$`````````````$H`````````00X0
+M@P(````4````'`4`````````````00`````````D````-`4`````````````
+M$P@```````!$#D!>CP*.`XT$C`6&!H,')````%P%`````````````+D#````
+M````1`XP5(T"C`.&!(,%`````"0```"$!0````````````#[`0```````$0.
+M,%2-`HP#A@2#!0`````D````K`4`````````````SP````````!$#C!4C0*,
+M`X8$@P4`````/````-0%`````````````.$`````````0@X00@X80@X@0@XH
+M00XP00XX1`Y`@P>&!HP%C02.`X\"`````````!0````4!@`````````````M
+M`````````"0````L!@````````````"6`@```````$(.$$$.&$$.((,$A@.,
+M`@`D````5`8`````````````D@````````!$#B!.C`*&`X,$````````)```
+M`'P&`````````````)(`````````1`X@3HP"A@.#!````````"0```"D!@``
+M``````````"'`````````$0.($Z,`H8#@P0````````D````S`8`````````
+M````AP````````!$#B!.C`*&`X,$````````)````/0&`````````````)(`
+M````````1`X@3HP"A@.#!````````"0````<!P````````````"'````````
+M`$0.($Z,`H8#@P0````````D````1`<`````````````AP````````!$#B!.
+MC`*&`X,$````````)````&P'`````````````+H`````````1`XP6(X"C0.,
+M!(8%@P8``"0```"4!P````````````#E`````````$0.0%Z/`HX#C02,!88&
+M@P<D````O`<`````````````3`@```````!$#D!>CP*.`XT$C`6&!H,')```
+M`.0'`````````````','````````1`Y`7H\"C@.-!(P%A@:#!Q0`````````
+M`0`!>!`,!PB0`0```````!0````<```````````````W`````````!0````T
+M```````````````G`````````"P```!,``````````````".`````````$(.
+M$$(.&$$.($$.*(,%A@2,`XT"`````"0```!\``````````````!8````````
+M`$0.($Z-`HP#@P0````````D````I```````````````3@````````!"#A!!
+M#AA!#B"#!(8#C`(`'````,P``````````````!H`````````00X0@P(````D
+M````[```````````````]`````````!$#C!8C@*-`XP$A@6#!@``)````!0!
+M`````````````($`````````1`XP5(T"C`.&!(,%`````#P````\`0``````
+M```````<`@```````$(.$$(.&$(.($(.*$$.,$$..$0.0(,'A@:,!8T$C@./
+M`@`````````<````?`$`````````````4@````````!$#B!*C`*#`QP```"<
+M`0````````````!2`````````$0.($J,`H,#)````+P!`````````````.P`
+M````````1`Y`7H\"C@.-!(P%A@:#!QP```#D`0````````````!2````````
+M`$0.($J,`H,#'`````0"`````````````%(`````````1`X@2HP"@P,\````
+M)`(`````````````9`(```````!"#A!"#AA"#B!"#BA!#C!!#CA$#F"#!X8&
+MC`6-!(X#CP(`````````)````&0"`````````````-4"````````1`Y07H\"
+MC@.-!(P%A@:#!QP```",`@````````````!%`````````$0.$```````'```
+M`*P"`````````````#<`````````1`X0```````D````S`(`````````````
+M30````````!$#B!.C0*,`X,$````````%````/0"`````````````!D`````
+M````'`````P#`````````````.8`````````1`X0```````D````+`,`````
+M````````I0````````!"#A!!#AA!#B"#!(8#C`(`%``````````!``%X$`P'
+M")`!````````%````!P``````````````!8`````````%````#0`````````
+M`````!``````````'````$P``````````````.8`````````00X0@P(````4
+M````;```````````````5@`````````D````A```````````````I```````
+M``!$#B!.C`*&`X,$````````)````*P``````````````.0`````````1`Y`
+M7H\"C@.-!(P%A@:#!SP```#4```````````````T`0```````$(.$$(.&$(.
+M($(.*$$.,$$..$0.0(,'A@:,!8T$C@./`@`````````T````%`$`````````
+M````.@$```````!"#A!"#AA"#B!!#BA!#C"#!H8%C`2-`XX"`````````!0`
+M`````````0`!>!`,!PB0`0```````!0````<```````````````N`0``````
+M`!P````T``````````````"G`0```````$$.$(,"````%````%0`````````
+M``````4`````````%````&P```````````````8`````````%````(0`````
+M`````````!P`````````%````)P``````````````!T`````````%````+0`
+M`````````````"L`````````%````,P``````````````"<`````````)```
+M`.0``````````````$T!````````1`XP6(X"C0.,!(8%@P8``"0````,`0``
+M```````````\`0```````$$.$$$.&$0.0(,#A@(````4````-`$`````````
+M````0``````````D````3`$`````````````F@````````!$#BA3C0*,`X8$
+M@P4`````%````'0!`````````````&``````````%````(P!````````````
+M`!<`````````%````*0!``````````````T#````````%``````````!``%X
+M$`P'")`!````````)````!P``````````````%H`````````0@X000X800X@
+M@P2&`XP"`!0```!$``````````````!``````````!0```!<````````````
+M```.`````````"0```!T``````````````"4`````````$0.,$^,`H8#@P0`
+M```````T````G```````````````9@````````!"#A!"#AA"#B!!#BA!#C!$
+M#D"#!H8%C`2-`XX"`````!P```#4``````````````!U`````````$$.$$0.
+M((,")````/0``````````````'(`````````00X000X81`X@@P.&`@```"0`
+M```<`0````````````"J`````````$$.$$$.&$0.((,#A@(````D````1`$`
+M````````````A@````````!!#A!!#AA$#B"#`X8"````)````&P!````````
+M`````+(`````````1`XP5(T"C`.&!(,%`````"0```"4`0````````````!Q
+M`````````$0.,%B.`HT#C`2&!8,&```D````O`$`````````````H0``````
+M``!$#C!/C`*&`X,$````````)````.0!`````````````!\!````````1`Y`
+M7H\"C@.-!(P%A@:#!R0````,`@````````````"B`````````$$.$$$.&$0.
+M((,#A@(````D````-`(`````````````H@````````!!#A!!#AA$#B"#`X8"
+M````)````%P"`````````````-$`````````00X000X81`X@@P.&`@```"0`
+M``"$`@````````````#<`````````$$.$$$.&$0.((,#A@(````<````K`(`
+M````````````A`````````!!#A"#`@```"0```#,`@`````````````+`0``
+M`````$0.,%2-`HP#A@2#!0`````4``````````$``7@0#`<(D`$````````L
+M````'```````````````2P$```````!"#A!!#AA!#B!$#E"#!(8#C`(`````
+M```4````3```````````````2``````````\````9```````````````C@,`
+M``````!"#A!"#AA"#B!"#BA!#C!!#CA$#D"#!X8&C`6-!(X#CP(`````````
+M'````*0``````````````'\`````````00X0@P(````4````Q```````````
+M````)``````````4````W```````````````1@`````````T````]```````
+M````````]P````````!"#A!"#AA"#B!!#BA!#C!$#CB#!H8%C`2-`XX"````
+M`#P````L`0````````````#:`0```````$(.$$(.&$(.($(.*$$.,$$..$0.
+M4(,'A@:,!8T$C@./`@`````````\````;`$`````````````2P$```````!"
+M#A!"#AA"#B!"#BA!#C!!#CA$#D"#!X8&C`6-!(X#CP(`````````%````*P!
+M``````````````8`````````%````,0!``````````````8`````````%```
+M`-P!``````````````8`````````-````/0!``````````````H#````````
+M0@X00@X80@X@00XH00XP@P:&!8P$C0..`@`````````<````+`(`````````
+M````'P````````!!#A"#`@```!P```!,`@````````````!Z`````````$0.
+M($J&`H,#)````&P"`````````````-\`````````00X000X81`X@@P.&`@``
+M`"P```"4`@````````````!=`0```````$(.$$$.&$$.($0.4(,$A@.,`@``
+M`````!0```#$`@`````````````"`````````"0```#<`@`````````````1
+M`@```````$$.$$$.&$0.((,#A@(````4````!`,`````````````"```````
+M```D````'`,`````````````*`$```````!$#F!/C`*&`X,$````````/```
+M`$0#`````````````$<%````````0@X00@X80@X@0@XH00XP00XX1`Y`@P>&
+M!HP%C02.`X\"`````````#P```"$`P````````````#M`@```````$(.$$(.
+M&$(.($(.*$$.,$$..$0.0(,'A@:,!8T$C@./`@`````````D````Q`,`````
+M````````70$```````!$#C!8C@*-`XP$A@6#!@``)````.P#````````````
+M`+P`````````1`X@3HP"A@.#!````````"0````4!`````````````!Y!@``
+M`````$0.0%Z/`HX#C02,!88&@P<D````/`0`````````````E`,```````!$
+M#G!>CP*.`XT$C`6&!H,''````&0$`````````````$8`````````1`X@2HP"
+M@P,<````A`0`````````````$0````````!$#A```````!0```"D!```````
+M```````&`````````!0```"\!`````````````!?`````````!0```#4!```
+M```````````\`````````!P```#L!``````````````\`````````$0.&$F,
+M`H,#)`````P%`````````````$4#````````00X000X8@P.&`@```````"0`
+M```T!0````````````"-!@```````$$.$$$.&(,#A@(````````D````7`4`
+M````````````W`8```````!"#A!!#AA!#B"#!(8#C`(`%````(0%````````
+M`````%`"````````%````)P%`````````````!,`````````)````+0%````
+M`````````(@!````````1`Y`7H\"C@.-!(P%A@:#!R0```#<!0``````````
+M``#3!````````$0.4%Z/`HX#C02,!88&@P<D````!`8`````````````T0``
+M``````!$#C!4C0*,`X8$@P4`````'````"P&`````````````'L`````````
+M1`X@2H8"@P,D````3`8`````````````B`$```````!$#D!>CP*.`XT$C`6&
+M!H,''````'0&`````````````)P`````````1`X0```````4````E`8`````
+M````````7@`````````4````K`8`````````````7@`````````<````Q`8`
+M````````````'@````````!!#A"#`@```!P```#D!@`````````````>````
+M`````$$.$(,"````+`````0'`````````````(\&````````0@X00@X800X@
+M00XH1`Z``8,%A@2,`XT"'````#0'`````````````'``````````1`X@2HP"
+M@P,<````5`<`````````````&@````````!$#A```````!0``````````0`!
+M>!`,!PB0`0```````!0````<``````````````!F`````````"0````T````
+M```````````*`0```````$0.0%Z/`HX#C02,!88&@P<4``````````$``7@0
+M#`<(D`$````````4````'```````````````/``````````4````-```````
+M````````-``````````4````3```````````````00`````````<````9```
+M````````````20````````!$#A```````!0```"$```````````````,````
+M`````!0``````````0`!>!`,!PB0`0```````!0````<```````````````=
+M`````````!0````T```````````````>`````````!0```!,````````````
+M```I`````````!P```!D```````````````Z`````````$0.$```````%```
+M`(0``````````````#(`````````%````)P``````````````!``````````
+M%````+0``````````````%L`````````%````,P```````````````T`````
+M````%````.0``````````````!P`````````%````/P``````````````"P`
+M````````%````!0!`````````````#``````````%````"P!````````````
+M`"T`````````%````$0!`````````````"T`````````%````%P!````````
+M`````"0"````````'````'0!`````````````*@`````````00X01`YP@P(4
+M````E`$`````````````,P`````````4``````````$``7@0#`<(D`$`````
+M```4````'```````````````<@`````````D````-```````````````JP$`
+M``````!!#A!!#AA$#B"#`X8"````-````%P``````````````'H"````````
+M0@X00@X80@X@00XH00XP@P:&!8P$C0..`@`````````4````E```````````
+M````8@`````````4````K```````````````8@`````````<````Q```````
+M````````/P````````!$#B!*C`*#`Q0```#D``````````````""````````
+M`"0```#\``````````````!^`0```````$(.$$$.&$$.((,$A@.,`@`4````
+M``````$``7@0#`<(D`$````````<````'```````````````VP,```````!!
+M#A!$#G"#`C0````\```````````````2"P```````$(.$$(.&$(.($$.*$$.
+M,$0.D`&#!H8%C`2-`XX"````/````'0``````````````.\`````````0@X0
+M0@X80@X@0@XH00XP00XX1`Y`@P>&!HP%C02.`X\"`````````!P```"T````
+M``````````"3`````````$0.$```````'````-0```````````````X`````
+M````1`X0```````D````]```````````````/P$```````!"#A!!#AA!#B"#
+M!(8#C`(`'````!P!`````````````!$`````````1`X0```````4````/`$`
+M````````````2``````````4````5`$`````````````C``````````D````
+M;`$`````````````$P8```````!$#D!>CP*.`XT$C`6&!H,'%````)0!````
+M`````````'P`````````%````*P!`````````````'``````````/````,0!
+M`````````````/H,````````0@X00@X80@X@0@XH00XP00XX1`Z0`8,'A@:,
+M!8T$C@./`@```````"0````$`@````````````"$`````````$0.*$^,`H8#
+M@P0````````D````+`(`````````````00$```````!$#C!4C0*,`X8$@P4`
+M````)````%0"``````````````@!````````1`Y`7H\"C@.-!(P%A@:#!R0`
+M``!\`@````````````#-`P```````$0.,%B.`HT#C`2&!8,&```D````I`(`
+M````````````@P0```````!$#D!>CP*.`XT$C`6&!H,'-````,P"````````
+M`````,D#````````0@X00@X80@X@00XH00XP@P:&!8P$C0..`@`````````\
+M````!`,`````````````CP(```````!"#A!"#AA"#B!"#BA!#C!!#CA$#D"#
+M!X8&C`6-!(X#CP(`````````-````$0#`````````````#D"````````0@X0
+M0@X80@X@00XH00XP@P:&!8P$C0..`@`````````\````?`,`````````````
+M$`(```````!"#A!"#AA"#B!"#BA!#C!!#CA$#D"#!X8&C`6-!(X#CP(`````
+M````/````+P#`````````````*P)````````0@X00@X80@X@0@XH00XP00XX
+M1`Z``8,'A@:,!8T$C@./`@```````!P```#\`P````````````"U````````
+M`$0.$```````+````!P$`````````````&L#````````0@X00@X800X@00XH
+M1`XP@P6&!(P#C0(`'````$P$`````````````!T`````````1`X0```````<
+M````;`0`````````````H0````````!!#A"#`@```!0```",!```````````
+M``!``````````#P```"D!`````````````!]"````````$(.$$(.&$(.($(.
+M*$$.,$$..$0.4(,'A@:,!8T$C@./`@`````````\````Y`0`````````````
+MWP,```````!"#A!"#AA"#B!"#BA!#C!!#CA$#E"#!X8&C`6-!(X#CP(`````
+M````)````"0%`````````````",*````````1`Y07H\"C@.-!(P%A@:#!R0`
+M``!,!0````````````!D`````````$$.$$$.&$0.((,#A@(````\````=`4`
+M````````````A@<```````!"#A!"#AA"#B!"#BA!#C!!#CA$#H`!@P>&!HP%
+MC02.`X\"````````)````+0%`````````````+$`````````1`XP5(T"C`.&
+M!(,%`````#P```#<!0`````````````5`@```````$(.$$(.&$(.($(.*$$.
+M,$$..$0.0(,'A@:,!8T$C@./`@`````````D````'`8`````````````M0``
+M``````!"#A!!#AA!#B"#!(8#C`(`)````$0&`````````````(T"````````
+M1`XP6(X"C0.,!(8%@P8``!P```!L!@`````````````_`````````$0.$```
+M````+````(P&`````````````+8`````````0@X00@X800X@00XH1`XP@P6&
+M!(P#C0(`)````+P&`````````````/L"````````1`XP5(T"C`.&!(,%````
+M`!0``````````0`!>!`,!PB0`0```````"0````<``````````````#W````
+M`````$0.,%2-`HP#A@2#!0`````D````1```````````````"`$```````!$
+M#C!8C@*-`XP$A@6#!@``/````&P``````````````)4`````````0@X00@X8
+M0@X@0@XH00XP00XX1`Y`@P>&!HP%C02.`X\"`````````"0```"L````````
+M``````!1`0```````$0.4%Z/`HX#C02,!88&@P<4````U```````````````
+M9@`````````4````[```````````````1@`````````\````!`$`````````
+M````20$```````!"#A!"#AA"#B!"#BA!#C!!#CA$#D"#!X8&C`6-!(X#CP(`
+M````````'````$0!`````````````(<`````````1`XP```````4````9`$`
+M````````````5@`````````L````?`$`````````````D@````````!"#A!"
+M#AA!#B!!#BA$#C"#!88$C`.-`@`\````K`$`````````````;P$```````!"
+M#A!"#AA"#B!"#BA!#C!!#CA$#F"#!X8&C`6-!(X#CP(`````````'````.P!
+M`````````````$4`````````00X0@P(````D````#`(`````````````Y`,`
+M``````!$#D!>CP*.`XT$C`6&!H,')````#0"``````````````X!````````
+M1`Y`7H\"C@.-!(P%A@:#!R0```!<`@````````````!%`0```````$0.0%Z/
+M`HX#C02,!88&@P<<````A`(`````````````^0````````!!#A"#`@```"0`
+M``"D`@````````````"^`````````$0.,%2-`HP#A@2#!0`````<````S`(`
+M````````````;P````````!$#B!*A@*#`R0```#L`@````````````##`0``
+M`````$0.($Z,`H8#@P0````````D````%`,`````````````4P$```````!$
+M#E!>CP*.`XT$C`6&!H,')````#P#`````````````&`!````````1`Y07H\"
+MC@.-!(P%A@:#!Q0``````````0`!>!`,!PB0`0```````!0````<````````
+M``````!Q`````````!0````T``````````````!,`````````!0`````````
+M`0`!>!`,!PB0`0```````!0````<```````````````+`0```````#P````T
+M``````````````!4!````````$(.$$(.&$(.($(.*$$.,$$..$0.4(,'A@:,
+M!8T$C@./`@`````````4````=```````````````-`$````````4````C```
+M````````````@0`````````4````I```````````````)P`````````4````
+MO````````````````@`````````4````U```````````````3P`````````D
+M````[```````````````<0$```````!!#A!!#AA$#B"#`X8"````'````!0!
+M`````````````"``````````00X0@P(````<````-`$`````````````(```
+M``````!!#A"#`@```"0```!4`0````````````#N`0```````$0.,%2-`HP#
+MA@2#!0`````D````?`$`````````````]@````````!$#B!.C`*&`X,$````
+M````/````*0!`````````````%P!````````0@X00@X80@X@0@XH00XP00XX
+M1`Y`@P>&!HP%C02.`X\"`````````!P```#D`0`````````````\````````
+M`$$.$(,"````)`````0"`````````````&H`````````00X000X81`X@@P.&
+M`@```!0````L`@`````````````O`````````"0```!$`@`````````````A
+M`0```````$0.,%2-`HP#A@2#!0`````<````;`(`````````````+@``````
+M``!$#A```````!0```",`@`````````````S`````````"P```"D`@``````
+M``````!S`0```````$(.$$(.&$$.($$.*$0.,(,%A@2,`XT"`"0```#4`@``
+M``````````!&`0```````$$.$$$.&$0.((,#A@(````<````_`(`````````
+M````[0````````!!#A"#`@```!P````<`P````````````!>`````````$0.
+M($J&`H,#'````#P#`````````````#4`````````1`X0```````<````7`,`
+M````````````-`````````!$#A```````!0```!\`P`````````````D````
+M`````!P```"4`P`````````````F`````````$0.$```````%````+0#````
+M`````````"0`````````'````,P#`````````````$``````````1`X0````
+M```4````[`,`````````````&@`````````<````!`0`````````````)@``
+M``````!$#A```````!0````D!``````````````D`````````!P````\!```
+M```````````X`````````$0.$```````%````%P$`````````````"0`````
+M````)````'0$`````````````!,#````````1`Y07H\"C@.-!(P%A@:#!R0`
+M``"<!`````````````"[`````````$0.,%2-`HP#A@2#!0`````D````Q`0`
+M````````````R@````````!$#C!8C@*-`XP$A@6#!@``)````.P$````````
+M`````.L`````````1`Y`7H\"C@.-!(P%A@:#!R0````4!0````````````#]
+M`````````$0.0%Z/`HX#C02,!88&@P<D````/`4`````````````D@$`````
+M``!!#A!!#AA$#B"#`X8"````)````&0%`````````````$<!````````1`Y`
+M7H\"C@.-!(P%A@:#!R0```",!0`````````````$`0```````$0.,%B.`HT#
+MC`2&!8,&```D````M`4`````````````#`$```````!$#C!8C@*-`XP$A@6#
+M!@``)````-P%`````````````"H!````````1`Y`7H\"C@.-!(P%A@:#!R0`
+M```$!@`````````````F`0```````$0.,%B.`HT#C`2&!8,&```D````+`8`
+M````````````J0````````!$#B!.C`*&`X,$````````%````%0&````````
+M`````%@`````````'````&P&`````````````#P`````````1`X@2H8"@P,4
+M````C`8``````````````@$````````<````I`8`````````````/```````
+M``!$#B!*A@*#`Q0```#$!@````````````#B`````````"0```#<!@``````
+M``````!!`0```````$(.$$$.&$$.((,$A@.,`@`4````!`<`````````````
+M)P`````````4````'`<`````````````(P`````````D````-`<`````````
+M````AP,```````!!#A!!#AA$#B"#`X8"````'````%P'`````````````(\`
+M````````1`X@2H8"@P,D````?`<`````````````3`````````!"#A!!#AA$
+M#B"#`XP"````%````*0'`````````````&\`````````)````+P'````````
+M`````#@!````````1`XH4XT"C`.&!(,%`````"0```#D!P````````````"9
+M`0```````$0.,%2-`HP#A@2#!0`````D````#`@`````````````J```````
+M``!$#C!4C0*,`X8$@P4`````)````#0(`````````````(<!````````00X0
+M00X81`X@@P.&`@```"0```!<"`````````````#P`````````$0.0%Z/`HX#
+MC02,!88&@P<D````A`@`````````````A@````````!$#B!.C`*&`X,$````
+M````)````*P(`````````````*\`````````1`X@3HP"A@.#!````````#0`
+M``#4"`````````````#O`0```````$(.$$(.&$(.($$.*$$.,(,&A@6,!(T#
+MC@(`````````%``````````!``%X$`P'")`!````````%````!P`````````
+M`````!4`````````%````#0``````````````*(`````````)````$P`````
+M`````````&(`````````0@X000X800X@@P2&`XP"`!P```!T````````````
+M```I`````````$$.$(,"````)````)0``````````````*`!````````1`XP
+M5(T"C`.&!(,%`````"P```"\``````````````">`````````$(.$$(.&$$.
+M($$.*(,%A@2,`XT"`````!P```#L``````````````"$`````````$0.$```
+M````'`````P!`````````````(0`````````1`X0```````D````+`$`````
+M````````!P$```````!!#A!!#AA$#B"#`X8"````+````%0!````````````
+M`.\`````````0@X00@X800X@00XH1`XP@P6&!(P#C0(`'````(0!````````
+M`````'0`````````00X0@P(````4````I`$`````````````&@`````````4
+M````O`$`````````````,0`````````4````U`$`````````````-```````
+M```D````[`$`````````````HPD```````!$#F!>CP*.`XT$C`6&!H,'%```
+M`!0"`````````````$P`````````)````"P"`````````````)8!````````
+M00X000X81`X@@P.&`@```!P```!4`@````````````#W`````````$$.$(,"
+M````'````'0"`````````````'D!````````00X0@P(````4``````````$`
+M`7@0#`<(D`$````````4````'```````````````=P`````````\````-```
+M````````````@P(```````!"#A!"#AA"#B!"#BA!#C!!#CA$#D"#!X8&C`6-
+M!(X#CP(`````````)````'0``````````````)D`````````00X000X81`X@
+M@P.&`@```"P```"<```````````````[`@```````$(.$$(.&$$.($$.*$0.
+M,(,%A@2,`XT"`"0```#,``````````````#C`````````$0.0%Z/`HX#C02,
+M!88&@P<D````]```````````````N0````````!$#D!>CP*.`XT$C`6&!H,'
+M/````!P!`````````````,`"````````0@X00@X80@X@0@XH00XP00XX1PZ`
+M!8,'A@:,!8T$C@./`@```````#P```!<`0````````````#T`@```````$(.
+M$$(.&$(.($(.*$$.,$$..$<.\`2#!X8&C`6-!(X#CP(````````\````G`$`
+M````````````C0,```````!"#A!"#AA"#B!"#BA!#C!!#CA'#H`%@P>&!HP%
+MC02.`X\"````````/````-P!`````````````,<#````````0@X00@X80@X@
+M0@XH00XP00XX1P[@!(,'A@:,!8T$C@./`@```````"P````<`@``````````
+M``#K`````````$(.$$(.&$$.($$.*$0.,(,%A@2,`XT"`!0```!,`@``````
+M``````!-`````````!0```!D`@````````````!-`````````"0```!\`@``
+M``````````#X`P```````$0.8%Z/`HX#C02,!88&@P<\````I`(`````````
+M````)`8```````!"#A!"#AA"#B!"#BA!#C!!#CA$#D"#!X8&C`6-!(X#CP(`
+M````````)````.0"`````````````!H#````````1`Y`7H\"C@.-!(P%A@:#
+M!R0````,`P`````````````+!P```````$0.8%Z/`HX#C02,!88&@P<D````
+M-`,`````````````N`0```````!$#C!8C@*-`XP$A@6#!@``/````%P#````
+M`````````-X"````````0@X00@X80@X@0@XH00XP00XX1`Y@@P>&!HP%C02.
+M`X\"`````````"0```"<`P````````````#S`````````$0.($Z,`H8#@P0`
+M```````\````Q`,`````````````P`````````!"#A!"#AA"#B!"#BA!#C!!
+M#CA$#F"#!X8&C`6-!(X#CP(`````````/`````0$`````````````,``````
+M````0@X00@X80@X@0@XH00XP00XX1`Y@@P>&!HP%C02.`X\"`````````!0`
+M``!$!`````````````!D`````````!0```!<!``````````````'````````
+M`#P```!T!`````````````"9`@```````$(.$$(.&$(.($(.*$$.,$$..$0.
+M8(,'A@:,!8T$C@./`@`````````4````M`0`````````````+0`````````L
+M````S`0`````````````!P@```````!"#A!"#AA!#B!!#BA$#C"#!88$C`.-
+M`@`<````_`0`````````````2@````````!!#A"#`@```!0````<!0``````
+M``````!!`````````"0````T!0`````````````3"````````$0.0%Z/`HX#
+MC02,!88&@P<D````7`4`````````````N0,```````!$#C!4C0*,`X8$@P4`
+M````)````(0%`````````````/L!````````1`XP5(T"C`.&!(,%`````"0`
+M``"L!0````````````#/`````````$0.,%2-`HP#A@2#!0`````\````U`4`
+M````````````X0````````!"#A!"#AA"#B!"#BA!#C!!#CA$#D"#!X8&C`6-
+M!(X#CP(`````````%````!0&`````````````"T`````````)````"P&````
+M`````````)8"````````0@X000X800X@@P2&`XP"`"0```!4!@``````````
+M``"2`````````$0.($Z,`H8#@P0````````D````?`8`````````````D@``
+M``````!$#B!.C`*&`X,$````````)````*0&`````````````(<`````````
+M1`X@3HP"A@.#!````````"0```#,!@````````````"'`````````$0.($Z,
+M`H8#@P0````````D````]`8`````````````D@````````!$#B!.C`*&`X,$
+M````````)````!P'`````````````(<`````````1`X@3HP"A@.#!```````
+M`"0```!$!P````````````"'`````````$0.($Z,`H8#@P0````````D````
+M;`<`````````````N@````````!$#C!8C@*-`XP$A@6#!@``)````)0'````
+M`````````.4`````````1`Y`7H\"C@.-!(P%A@:#!R0```"\!P``````````
+M``!,"````````$0.0%Z/`HX#C02,!88&@P<D````Y`<`````````````<P<`
+M``````!$#D!>CP*.`XT$C`6&!H,'%``````````!``%X$`P'")`!````````
+M%````!P``````````````#<`````````%````#0``````````````"<`````
+M````+````$P``````````````(X`````````0@X00@X800X@00XH@P6&!(P#
+MC0(`````)````'P``````````````%@`````````1`X@3HT"C`.#!```````
+M`"0```"D``````````````!.`````````$(.$$$.&$$.((,$A@.,`@`<````
+MS```````````````&@````````!!#A"#`@```"0```#L``````````````#T
+M`````````$0.,%B.`HT#C`2&!8,&```D````%`$`````````````@0``````
+M``!$#C!4C0*,`X8$@P4`````/````#P!`````````````!P"````````0@X0
+M0@X80@X@0@XH00XP00XX1`Y`@P>&!HP%C02.`X\"`````````!P```!\`0``
+M``````````!2`````````$0.($J,`H,#'````)P!`````````````%(`````
+M````1`X@2HP"@P,D````O`$`````````````[`````````!$#D!>CP*.`XT$
+MC`6&!H,''````.0!`````````````%(`````````1`X@2HP"@P,<````!`(`
+M````````````4@````````!$#B!*C`*#`SP````D`@````````````!D`@``
+M`````$(.$$(.&$(.($(.*$$.,$$..$0.8(,'A@:,!8T$C@./`@`````````D
+M````9`(`````````````U0(```````!$#E!>CP*.`XT$C`6&!H,''````(P"
+M`````````````$4`````````1`X0```````<````K`(`````````````-P``
+M``````!$#A```````"0```#,`@````````````!-`````````$0.($Z-`HP#
+M@P0````````4````]`(`````````````&0`````````<````#`,`````````
+M````Y@````````!$#A```````"0````L`P````````````"E`````````$(.
+M$$$.&$$.((,$A@.,`@`4``````````$``7@0#`<(D`$````````4````'```
+M````````````%@`````````4````-```````````````$``````````<````
+M3```````````````Y@````````!!#A"#`@```!0```!L``````````````!6
+M`````````"0```"$``````````````"D`````````$0.($Z,`H8#@P0`````
+M```D````K```````````````Y`````````!$#D!>CP*.`XT$C`6&!H,'/```
+M`-0``````````````#0!````````0@X00@X80@X@0@XH00XP00XX1`Y`@P>&
+M!HP%C02.`X\"`````````#0````4`0`````````````Z`0```````$(.$$(.
+M&$(.($$.*$$.,(,&A@6,!(T#C@(`````````%``````````!``%X$`P'")`!
+M````````%````!P``````````````"X!````````'````#0`````````````
+M`*<!````````00X0@P(````4````5```````````````!0`````````4````
+M;```````````````!@`````````4````A```````````````'``````````4
+M````G```````````````'0`````````4````M```````````````*P``````
+M```4````S```````````````)P`````````D````Y```````````````30$`
+M``````!$#C!8C@*-`XP$A@6#!@``)`````P!`````````````#P!````````
+M00X000X81`Y`@P.&`@```!0````T`0````````````!``````````"0```!,
+M`0````````````":`````````$0.*%.-`HP#A@2#!0`````4````=`$`````
+M````````8``````````4````C`$`````````````%P`````````4````I`$`
+M````````````#0,````````4``````````$``7@0#`<(D`$````````D````
+M'```````````````6@````````!"#A!!#AA!#B"#!(8#C`(`%````$0`````
+M`````````$``````````%````%P```````````````X`````````)````'0`
+M`````````````)0`````````1`XP3XP"A@.#!````````#0```"<````````
+M``````!F`````````$(.$$(.&$(.($$.*$$.,$0.0(,&A@6,!(T#C@(`````
+M'````-0``````````````'4`````````00X01`X@@P(D````]```````````
+M````<@````````!!#A!!#AA$#B"#`X8"````)````!P!`````````````*H`
+M````````00X000X81`X@@P.&`@```"0```!$`0````````````"&````````
+M`$$.$$$.&$0.((,#A@(````D````;`$`````````````L@````````!$#C!4
+MC0*,`X8$@P4`````)````)0!`````````````'$`````````1`XP6(X"C0.,
+M!(8%@P8``"0```"\`0````````````"A`````````$0.,$^,`H8#@P0`````
+M```D````Y`$`````````````'P$```````!$#D!>CP*.`XT$C`6&!H,')```
+M``P"`````````````*(`````````00X000X81`X@@P.&`@```"0````T`@``
+M``````````"B`````````$$.$$$.&$0.((,#A@(````D````7`(`````````
+M````T0````````!!#A!!#AA$#B"#`X8"````)````(0"`````````````-P`
+M````````00X000X81`X@@P.&`@```!P```"L`@````````````"$````````
+M`$$.$(,"````)````,P"``````````````L!````````1`XP5(T"C`.&!(,%
+M`````!0``````````0`!>!`,!PB0`0```````#0````<``````````````!*
+M`P```````$(.$$(.&$(.($(.*$$.,$$..(,'A@:,!8T$C@./`@``'````%0`
+M`````````````'\`````````00X0@P(````4````=```````````````)```
+M```````4````C```````````````1@`````````T````I```````````````
+M]P````````!"#A!"#AA"#B!!#BA!#C!$#CB#!H8%C`2-`XX"`````#P```#<
+M``````````````#:`0```````$(.$$(.&$(.($(.*$$.,$$..$0.4(,'A@:,
+M!8T$C@./`@`````````\````'`$`````````````2P$```````!"#A!"#AA"
+M#B!"#BA!#C!!#CA$#D"#!X8&C`6-!(X#CP(`````````%````%P!````````
+M``````8`````````%````'0!``````````````8`````````%````(P!````
+M``````````8`````````-````*0!``````````````H#````````0@X00@X8
+M0@X@00XH00XP@P:&!8P$C0..`@`````````<````W`$`````````````'P``
+M``````!!#A"#`@```!P```#\`0````````````!Z`````````$0.($J&`H,#
+M)````!P"`````````````-\`````````00X000X81`X@@P.&`@```"P```!$
+M`@````````````!=`0```````$(.$$$.&$$.($0.4(,$A@.,`@```````!0`
+M``!T`@`````````````"`````````"0```",`@`````````````1`@``````
+M`$$.$$$.&$0.((,#A@(````4````M`(`````````````"``````````D````
+MS`(`````````````*`$```````!$#F!/C`*&`X,$````````/````/0"````
+M`````````$<%````````0@X00@X80@X@0@XH00XP00XX1`Y`@P>&!HP%C02.
+M`X\"`````````#P````T`P````````````#M`@```````$(.$$(.&$(.($(.
+M*$$.,$$..$0.0(,'A@:,!8T$C@./`@`````````D````=`,`````````````
+M70$```````!$#C!8C@*-`XP$A@6#!@``)````)P#`````````````+P`````
+M````1`X@3HP"A@.#!````````"0```#$`P````````````!Y!@```````$0.
+M0%Z/`HX#C02,!88&@P<D````[`,`````````````E`,```````!$#G!>CP*.
+M`XT$C`6&!H,''````!0$`````````````$8`````````1`X@2HP"@P,<````
+M-`0`````````````$0````````!$#A```````!0```!4!``````````````&
+M`````````!0```!L!`````````````!?`````````!0```"$!```````````
+M```\`````````!P```"<!``````````````\`````````$0.&$F,`H,#)```
+M`+P$`````````````$4#````````00X000X8@P.&`@```````"0```#D!```
+M``````````"-!@```````$$.$$$.&(,#A@(````````D````#`4`````````
+M````W`8```````!"#A!!#AA!#B"#!(8#C`(`%````#0%`````````````%`"
+M````````%````$P%`````````````!,`````````)````&0%````````````
+M`(@!````````1`Y`7H\"C@.-!(P%A@:#!R0```",!0````````````#3!```
+M`````$0.4%Z/`HX#C02,!88&@P<D````M`4`````````````T0````````!$
+M#C!4C0*,`X8$@P4`````'````-P%`````````````'L`````````1`X@2H8"
+M@P,D````_`4`````````````B`$```````!$#D!>CP*.`XT$C`6&!H,''```
+M`"0&`````````````)P`````````1`X0```````4````1`8`````````````
+M7@`````````4````7`8`````````````7@`````````<````=`8`````````
+M````'@````````!!#A"#`@```!P```"4!@`````````````>`````````$$.
+M$(,"````+````+0&`````````````(\&````````0@X00@X800X@00XH1`Z`
+M`8,%A@2,`XT"'````.0&`````````````'``````````1`X@2HP"@P,<````
+M!`<`````````````&@````````!$#A```````!0``````````0`!>!`,!PB0
+M`0```````!0````<```````````````3`````````!0````T````````````
+M```,`````````"P```!,``````````````"[`````````$(.$$(.&$$.($$.
+M*(,%A@2,`XT"`````!0```!\```````````````U`````````!0```"4````
+M```````````,`````````"0```"L``````````````"K`````````$$.$$<.
+MD`*#`@`````````D````U```````````````U@````````!"#A!!#AA!#B"#
+M!(8#C`(`%````/P``````````````"L`````````)````!0!````````````
+M`$P`````````0@X000X800X@@P2&`XP"`!P````\`0````````````"&````
+M`````$$.$$0.0(,"%````%P!`````````````"<`````````+````'0!````
+M`````````)<!````````0@X000X800X@1`Z@`8,$A@.,`@``````+````*0!
+M`````````````&(!````````0@X00@X800X@00XH1`XP@P6&!(P#C0(`+```
+M`-0!`````````````)P`````````0@X00@X800X@00XH1`XP@P6&!(P#C0(`
+M)`````0"`````````````-8`````````0@X000X800X@@P2&`XP"`"0````L
+M`@````````````"$`````````$0.($Z,`H8#@P0````````T````5`(`````
+M````````B0$```````!"#A!"#AA"#B!!#BA!#C"#!H8%C`2-`XX"````````
+M`#P```",`@````````````!5`0```````$(.$$(.&$(.($(.*$$.,$$..$<.
+MT`&#!X8&C`6-!(X#CP(````````L````S`(`````````````ZP````````!"
+M#A!"#AA!#B!!#BA$#C"#!88$C`.-`@`D````_`(`````````````_@``````
+M``!!#A!!#AA$#B"#`X8"````%````"0#`````````````"X`````````'```
+M`#P#`````````````%(`````````00X0@P(````D````7`,`````````````
+M4P````````!$#B!.C`*&`X,$````````'````(0#`````````````!D`````
+M````1`X0```````<````I`,`````````````&0````````!$#A```````!P`
+M``#$`P`````````````>`````````$0.$```````)````.0#````````````
+M`%$`````````0@X000X800X@@P2&`XP"`!P````,!``````````````H````
+M`````$$.$(,"````)````"P$`````````````($`````````00X000X81`X@
+M@P.&`@```!P```!4!``````````````^`````````$$.$(,"````%````'0$
+M`````````````$0`````````)````(P$`````````````"8!````````1`XP
+M6(X"C0.,!(8%@P8``"0```"T!`````````````""`````````$(.$$$.&$$.
+M((,$A@.,`@`<````W`0`````````````%P````````!$#A```````!0```#\
+M!``````````````/`````````!0````4!0`````````````C`````````!0`
+M```L!0`````````````R`````````!P```!$!0````````````"/````````
+M`$0.($J&`H,#)````&0%`````````````*H`````````00X000X81`X@@P.&
+M`@```"P```",!0````````````"L`````````$(.$$(.&$$.($$.*$0.,(,%
+MA@2,`XT"`!0```"\!0````````````!H`````````!0``````````0`!>!`,
+M!PB0`0```````!0````<``````````````!(`````````"0````T````````
+M``````!E`````````$(.$$$.&$$.((,$A@.,`@`D````7```````````````
+M4@````````!!#A!!#AA$#B"#`X8"````'````(0``````````````$P`````
+M````00X0@P(````D````I```````````````T0````````!"#A!!#AA!#B"#
+M!(8#C`(`)````,P``````````````!,!````````1`X@3HP"A@.#!```````
+M`!P```#T``````````````!)`````````$0.($J,`H,#%````!0!````````
+M``````\`````````)````"P!`````````````(T!````````1`XP6(X"C0.,
+M!(8%@P8``!0```!4`0`````````````N`````````!P```!L`0``````````
+M```]`````````$0.$```````'````(P!`````````````",!````````1`X@
+M2H8"@P,D````K`$`````````````Q@````````!$#B!.C`*&`X,$````````
+M'````-0!`````````````#L`````````1`X0```````<````]`$`````````
+M````.`````````!$#A```````!P````4`@````````````"``````````$$.
+M$(,"````'````#0"`````````````"\`````````1`X0```````4````5`(`
+M````````````=0`````````4````;`(`````````````;P`````````\````
+MA`(`````````````IP,```````!"#A!"#AA"#B!"#BA!#C!!#CA$#D"#!X8&
+MC`6-!(X#CP(`````````)````,0"`````````````&$`````````00X000X8
+M1`X@@P.&`@```"0```#L`@````````````!I`0```````$(.$$$.&$$.((,$
+MA@.,`@`L````%`,`````````````10$```````!"#A!"#AA!#B!!#BA$#C"#
+M!88$C`.-`@`<````1`,`````````````0`````````!$#B!*C`*#`QP```!D
+M`P````````````!D`````````$$.$(,"````+````(0#`````````````*4!
+M````````0@X000X800X@1PZ@!(,$A@.,`@``````'````+0#````````````
+M`%,`````````00X0@P(````D````U`,`````````````[@````````!"#A!!
+M#AA!#B"#!(8#C`(`)````/P#`````````````&L`````````00X000X81`X@
+M@P.&`@```"P````D!`````````````#(!````````$<.T`1PCP*.`XT$C`6&
+M!H,'`````````"0```!4!`````````````"T`0```````$<.H`18C`*&`X,$
+M```````4````?`0`````````````E0`````````4````E`0`````````````
+M<P`````````\````K`0`````````````CP$```````!"#A!"#AA"#B!"#BA!
+M#C!!#CA$#J`!@P>&!HP%C02.`X\"````````'````.P$`````````````$0`
+M````````00X01`Y`@P(<````#`4`````````````00````````!$#B!*C`*#
+M`R0````L!0````````````#I`0```````$0.8%2-`HP#A@2#!0`````<````
+M5`4`````````````5`````````!!#A"#`@```!P```!T!0`````````````.
+M`````````$0.$```````'````)0%`````````````'4`````````00X0@P(`
+M```4````M`4`````````````#``````````<````S`4`````````````/P``
+M``````!$#B!*A@*#`R0```#L!0````````````#'`````````$$.$$$.&$0.
+M((,#A@(````<````%`8`````````````*0````````!!#A"#`@```"0````T
+M!@````````````!Y`````````$(.$$$.&$$.((,$A@.,`@`<````7`8`````
+M````````90````````!$#B!*A@*#`QP```!\!@````````````!>````````
+M`$0.($J&`H,#%``````````!``%X$`P'")`!````````%````!P`````````
+M`````$8`````````%````#0``````````````"D`````````%````$P`````
+M`````````"D`````````%````&0``````````````"L`````````+````'P`
+M`````````````(@`````````0@X00@X800X@00XH1`XP@P6&!(P#C0(`)```
+M`*P``````````````%D`````````00X000X81`X@@P.&`@```#0```#4````
+M``````````#*`````````$(.$$(.&$(.($$.*$$.,$0.L`&#!H8%C`2-`XX"
+M````-`````P!`````````````,<`````````0@X00@X80@X@00XH00XP1`ZP
+M`8,&A@6,!(T#C@(````\````1`$`````````````_P````````!"#A!"#AA"
+M#B!"#BA!#C!!#CA'#M`!@P>&!HP%C02.`X\"````````+````(0!````````
+M`````&(`````````0@X000X800X@1`Z@`8,$A@.,`@``````)````+0!````
+M`````````!X!````````00X000X81PZ@`8,#A@(``"0```#<`0``````````
+M``!2`0```````$$.$$$.&$<.H`&#`X8"```\````!`(`````````````0P$`
+M``````!"#A!"#AA"#B!"#BA!#C!!#CA'#H`"@P>&!HP%C02.`X\"````````
+M%````$0"`````````````,4`````````%````%P"`````````````&L`````
+M````%````'0"`````````````%,`````````)````(P"`````````````,\!
+M````````00X000X81`X@@P.&`@```!0```"T`@````````````"0````````
+M`!P```#,`@````````````#S`````````$$.$(,"````'````.P"````````
+M`````,4!````````00X0@P(````L````#`,`````````````_P````````!"
+M#A!"#AA!#B!!#BA$#C"#!88$C`.-`@`L````/`,`````````````_P``````
+M``!"#A!"#AA!#B!!#BA$#C"#!88$C`.-`@`4````;`,`````````````.P``
+M```````L````A`,`````````````JP$```````!"#A!"#AA!#B!!#BA$#C"#
+M!88$C`.-`@`L````M`,`````````````NP$```````!"#A!"#AA!#B!!#BA$
+M#C"#!88$C`.-`@`L````Y`,`````````````Q@$```````!"#A!!#AA!#B!'
+M#N`!@P2&`XP"```````L````%`0`````````````*`(```````!"#A!!#AA!
+M#B!'#N`!@P2&`XP"```````D````1`0`````````````FP````````!!#A!!
+M#AA$#B"#`X8"````)````&P$`````````````)P`````````00X000X81`X@
+M@P.&`@```"0```"4!`````````````#2`````````$(.$$$.&$$.((,$A@.,
+M`@`D````O`0`````````````XP````````!"#A!!#AA!#B"#!(8#C`(`/```
+M`.0$`````````````+0"````````0@X00@X80@X@0@XH00XP00XX1P[@!(,'
+MA@:,!8T$C@./`@```````!0````D!0````````````"``````````!0````\
+M!0````````````#/`````````#P```!4!0`````````````9!````````$(.
+M$$(.&$(.($(.*$$.,$$..$0.2(,'A@:,!8T$C@./`@`````````\````E`4`
+M````````````F`$```````!"#A!"#AA"#B!"#BA!#C!!#CA'#M`$@P>&!HP%
+MC02.`X\"````````+````-0%`````````````+D`````````0@X00@X800X@
+M00XH1`XP@P6&!(P#C0(`'`````0&`````````````+D`````````00X0@P(`
+M```<````)`8`````````````-P````````!!#A"#`@```"0```!$!@``````
+M``````!X`0```````$0.0%Z/`HX#C02,!88&@P<\````;`8`````````````
+M(P,```````!"#A!"#AA"#B!"#BA!#C!!#CA$#E"#!X8&C`6-!(X#CP(`````
+M````%````*P&``````````````(`````````'````,0&`````````````&4`
+M````````1`X0```````<````Y`8`````````````$P$```````!$#B!*A@*#
+M`QP````$!P`````````````R`````````$0.$```````'````"0'````````
+M`````(8`````````1`X0```````<````1`<`````````````_@(```````!!
+M#A"#`@```!P```!D!P````````````"=`0```````$0.$```````'````(0'
+M`````````````#H`````````00X0@P(````D````I`<`````````````A0$`
+M``````!$#C!8C@*-`XP$A@6#!@``)````,P'`````````````,L`````````
+M1`XP6(X"C0.,!(8%@P8``#P```#T!P````````````"R#````````$(.$$(.
+M&$(.($(.*$$.,$$..$0.H`&#!X8&C`6-!(X#CP(````````4````-`@`````
+M````````<P`````````4````3`@`````````````<P`````````<````9`@`
+M````````````8@````````!$#D```````"0```"$"`````````````"3"```
+M`````$0.,%B.`HT#C`2&!8,&```T````K`@`````````````7@$```````!"
+M#A!"#AA"#B!!#BA!#C"#!H8%C`2-`XX"`````````"P```#D"```````````
+M``"R`````````$(.$$(.&$$.($$.*$0.,(,%A@2,`XT"`"0````4"0``````
+M``````#D`````````$$.$$$.&$0.((,#A@(````<````/`D`````````````
+M20````````!!#A"#`@```"P```!<"0````````````"2`````````$(.$$$.
+M&$$.($<.X`&#!(8#C`(``````"0```","0`````````````4`0```````$$.
+M$$<.L`&#`@`````````L````M`D`````````````I@````````!"#A!"#AA!
+M#B!!#BA'#O`!@P6&!(P#C0(D````Y`D`````````````8P````````!!#A!!
+M#AA$#B"#`X8"````)`````P*`````````````*\!````````1`XP6(X"C0.,
+M!(8%@P8``!P````T"@````````````!J`````````$$.$(,"````)````%0*
+M`````````````'@`````````1`X@3HT"C`.#!````````"0```!\"@``````
+M```````5`0```````$(.$$$.&$$.((,$A@.,`@`<````I`H`````````````
+M.P````````!!#A!$#B"#`B0```#$"@````````````#W`````````$0.,$^,
+M`H8#@P0````````L````[`H`````````````D0(```````!"#A!!#AA!#B!$
+M#F"#!(8#C`(````````L````'`L`````````````/00```````!"#A!!#AA!
+M#B!$#F"#!(8#C`(````````D````3`L`````````````[P````````!$#C!4
+MC0*,`X8$@P4`````+````'0+`````````````$8!````````0@X00@X800X@
+M00XH1PZP`8,%A@2,`XT"-````*0+`````````````$H"````````0@X00@X8
+M0@X@00XH00XP@P:&!8P$C0..`@`````````D````W`L`````````````A@``
+M``````!"#A!!#AA!#B"#!(8#C`(`'`````0,``````````````X`````````
+M1`X0```````T````)`P```````````````$```````!"#A!"#AA"#B!!#BA!
+M#C"#!H8%C`2-`XX"`````````!P```!<#`````````````!&`````````$$.
+M$(,"````)````'P,`````````````-D#````````1`Y07H\"C@.-!(P%A@:#
+M!Q0```"D#`````````````#/`````````"0```"\#`````````````!Y````
+M`````$(.$$$.&$$.((,$A@.,`@`L````Y`P`````````````7`````````!"
+M#A!"#AA!#B!!#BB#!88$C`.-`@`````<````%`T`````````````6P``````
+M``!$#B!*C`*#`QP````T#0`````````````Q`````````$0.$```````)```
+M`%0-``````````````4!````````1`XP5(X"C0.,!(,%`````!P```!\#0``
+M``````````!.`````````$0.($J&`H,#)````)P-`````````````(<`````
+M````1`X@3HT"C`.#!````````"0```#$#0````````````":`0```````$0.
+M,%2-`HP#A@2#!0`````<````[`T`````````````2@````````!$#A``````
+M`"0````,#@````````````!%`@```````$0.($Z,`H8#@P0````````L````
+M-`X`````````````0@(```````!"#A!"#AA!#B!!#BA$#C"#!88$C`.-`@`<
+M````9`X`````````````:@````````!$#A```````!0```"$#@``````````
+M``"4`````````"0```"<#@````````````#E`````````$0.($Z,`H8#@P0`
+M```````<````Q`X`````````````)@````````!$#A```````"0```#D#@``
+M```````````_`0```````$0.0%Z/`HX#C02,!88&@P<<````#`\`````````
+M````+0````````!$#A```````!P````L#P````````````!Q`````````$0.
+M($J,`H,#+````$P/`````````````"8!````````0@X00@X800X@00XH1`XP
+M@P6&!(P#C0(`)````'P/`````````````)@`````````1`X@3HP"A@.#!```
+M`````#P```"D#P````````````!!`0```````$(.$$(.&$(.($(.*$$.,$$.
+M.$<.T`&#!X8&C`6-!(X#CP(````````L````Y`\`````````````N0``````
+M``!"#A!!#AA!#B!$#F"#!(8#C`(````````<````%!``````````````&```
+M``````!$#A```````!0````T$``````````````5`````````!P```!,$```
+M```````````T`````````$0.$```````%````&P0`````````````!L`````
+M````)````(00`````````````*T!````````0@X000X800X@@P2&`XP"`!0`
+M``"L$``````````````9`````````"0```#$$`````````````!G````````
+M`$$.$$$.&$0.((,#A@(````D````[!``````````````G@$```````!!#A!!
+M#AA$#B"#`X8"````%````!01`````````````!4`````````'````"P1````
+M`````````$X`````````1`X@2HP"@P,4````3!$`````````````%0``````
+M```<````9!$`````````````00````````!!#A"#`@```!0```"$$0``````
+M```````5`````````!P```"<$0````````````!!`````````$$.$(,"````
+M%````+P1`````````````!4`````````)````-01`````````````&D`````
+M````00X000X81`YP@P.&`@```!0```#\$0`````````````5`````````!P`
+M```4$@````````````!$`````````$$.$(,"````%````#02````````````
+M`!4`````````+````$P2`````````````)X`````````0@X000X800X@1`Z@
+M`8,$A@.,`@``````%````'P2`````````````!@`````````-````)02````
+M`````````.4`````````0@X00@X80@X@00XH00XP1`ZP`8,&A@6,!(T#C@(`
+M```4````S!(`````````````&``````````T````Y!(`````````````Y0``
+M``````!"#A!"#AA"#B!!#BA!#C!$#K`!@P:&!8P$C0..`@```!0````<$P``
+M```````````8`````````#0````T$P````````````#E`````````$(.$$(.
+M&$(.($$.*$$.,$0.L`&#!H8%C`2-`XX"````%````&P3`````````````"@`
+M````````'````(03`````````````%D`````````1`X@2HP"@P,4````I!,`
+M````````````*``````````<````O!,`````````````60````````!$#B!*
+MC`*#`QP```#<$P`````````````U`````````$$.$(,"````'````/P3````
+M`````````%T`````````00X0@P(````<````'!0`````````````-0``````
+M``!!#A"#`@```!P````\%`````````````!=`````````$$.$(,"````'```
+M`%P4`````````````#4`````````00X0@P(````<````?!0`````````````
+M70````````!!#A"#`@```!P```"<%`````````````!S`````````$0.&$F&
+M`H,#'````+P4`````````````$$`````````00X0@P(````<````W!0`````
+M````````=`````````!$#AA)A@*#`R0```#\%`````````````"K````````
+M`$0.,%2.`HT#C`2#!0`````D````)!4`````````````F`````````!$#B!.
+MC`*&`X,$````````)````$P5`````````````,$`````````1`XP5(T"C`.&
+M!(,%`````"0```!T%0````````````#=`````````$0.*%.-`HP#A@2#!0``
+M```D````G!4`````````````.0````````!!#A!!#AA$#B"#`X8"````'```
+M`,05`````````````#H`````````1`X0```````D````Y!4`````````````
+MN@````````!$#BA3C0*,`X8$@P4`````)`````P6`````````````#D`````
+M````00X000X81`X@@P.&`@```!P````T%@`````````````Z`````````$0.
+M$```````%````%06`````````````!4`````````)````&P6````````````
+M`((`````````00X000X81PZ@`8,#A@(``!0```"4%@`````````````[````
+M`````"0```"L%@````````````#,`````````$0.,%2-`HP#A@2#!0`````D
+M````U!8`````````````N@````````!$#BA3C0*,`X8$@P4`````)````/P6
+M`````````````#D`````````00X000X81`X@@P.&`@```!P````D%P``````
+M```````Z`````````$0.$```````)````$07`````````````,@`````````
+M1`XH4XT"C`.&!(,%`````"0```!L%P`````````````Y`````````$$.$$$.
+M&$0.((,#A@(````<````E!<`````````````.@````````!$#A```````"0`
+M``"T%P````````````#K`````````$0.*%.-`HP#A@2#!0`````D````W!<`
+M````````````1`````````!!#A!!#AA$#B"#`X8"````'`````08````````
+M`````#H`````````1`X0```````D````)!@`````````````"P$```````!$
+M#BA3C0*,`X8$@P4`````)````$P8`````````````$0`````````00X000X8
+M1`X@@P.&`@```!P```!T&``````````````Z`````````$0.$```````'```
+M`)08`````````````*,`````````1`X@2H8"@P,<````M!@`````````````
+M6@````````!!#A"#`@```!P```#4&``````````````Z`````````$0.$```
+M````%````/08`````````````!4`````````'`````P9`````````````#L`
+M````````00X0@P(````<````+!D`````````````;@````````!$#AA)A@*#
+M`R0```!,&0````````````!0`````````$0.($Z,`H8#@P0````````<````
+M=!D`````````````;@````````!$#AA)A@*#`R0```"4&0````````````!0
+M`````````$0.($Z,`H8#@P0````````<````O!D`````````````;@``````
+M``!$#AA)A@*#`R0```#<&0````````````!0`````````$0.($Z,`H8#@P0`
+M```````<````!!H`````````````;@````````!$#AA)A@*#`R0````D&@``
+M``````````!/`````````$0.($Z,`H8#@P0````````<````3!H`````````
+M````;@````````!$#AA)A@*#`R0```!L&@````````````!/`````````$0.
+M($Z,`H8#@P0````````<````E!H`````````````;@````````!$#AA)A@*#
+M`R0```"T&@````````````!/`````````$0.($Z,`H8#@P0````````<````
+MW!H`````````````I0````````!$#AA)A@*#`QP```#\&@`````````````Q
+M`@```````$$.$(,"````'````!P;`````````````'X`````````1`X8288"
+M@P,<````/!L`````````````'`````````!$#A```````!P```!<&P``````
+M```````Z`````````$0.$```````'````'P;`````````````'X`````````
+M1`X8288"@P,<````G!L`````````````'`````````!$#A```````!P```"\
+M&P`````````````Z`````````$0.$```````)````-P;`````````````/@`
+M````````1`X@3HP"A@.#!````````!P````$'`````````````!(````````
+M`$0.($J,`H,#'````"0<`````````````#H`````````1`X0```````<````
+M1!P`````````````?@````````!$#AA)A@*#`QP```!D'`````````````">
+M`````````$0.($J&`H,#'````(0<`````````````#H`````````1`X0````
+M```<````I!P`````````````@`````````!$#AA)A@*#`QP```#$'```````
+M```````<`````````$0.$```````'````.0<`````````````#H`````````
+M1`X0```````<````!!T`````````````@@````````!$#AA)A@*#`QP````D
+M'0`````````````Z`````````$0.$```````'````$0=`````````````((`
+M````````1`X8288"@P,<````9!T`````````````.@````````!$#A``````
+M`!0```"$'0`````````````5`````````!P```"<'0`````````````Z````
+M`````$0.$```````%````+P=`````````````!4`````````'````-0=````
+M`````````#L`````````00X0@P(````4````]!T`````````````%0``````
+M```D````#!X`````````````C0````````!!#A!!#AA$#B"#`X8"````'```
+M`#0>`````````````+(`````````1`X8288"@P,<````5!X`````````````
+M'`````````!!#A"#`@```!P```!T'@````````````"R`````````$0.&$F&
+M`H,#'````)0>`````````````!P`````````00X0@P(````<````M!X`````
+M````````;@````````!$#AA)A@*#`QP```#4'@`````````````Z````````
+M`$0.$```````)````/0>`````````````+@`````````1`XH4XT"C`.&!(,%
+M`````#0````<'P````````````#^`````````$(.$$(.&$(.($$.*$$.,(,&
+MA@6,!(T#C@(`````````)````%0?`````````````+@`````````1`XH4XT"
+MC`.&!(,%`````"0```!\'P````````````!Y`````````$0.($Z,`H8#@P0`
+M```````<````I!\`````````````.@````````!$#A```````!P```#$'P``
+M``````````!C`````````$0.&$F&`H,#'````.0?`````````````"4`````
+M````1`X0```````<````!"``````````````.@````````!$#A```````!0`
+M```D(``````````````H`````````#P````\(`````````````#4````````
+M`$(.$$(.&$(.($(.*$$.,$$..$<.T`&#!X8&C`6-!(X#CP(````````<````
+M?"``````````````8P````````!!#A"#`@```!P```"<(``````````````X
+M`````````$0.$```````'````+P@`````````````*@`````````00X01`X@
+M@P(<````W"``````````````L@````````!$#AA)A@*#`Q0```#\(```````
+M``````!$`````````!P````4(0````````````"/`````````$$.$(,"````
+M)````#0A`````````````!(!````````1`X@3HP"A@.#!````````"0```!<
+M(0`````````````(`0```````$(.$$$.&$$.((,$A@.,`@`<````A"$`````
+M````````6`````````!!#A"#`@```!P```"D(0`````````````J````````
+M`$$.$(,"````%````,0A``````````````<`````````'````-PA````````
+M```````!````````1`Y````````D````_"$`````````````B0$```````!$
+M#E!/C`*&`X,$````````+````"0B`````````````/``````````0@X000X8
+M00X@1P[@`8,$A@.,`@``````)````%0B`````````````/P"````````1`XP
+M5(T"C`.&!(,%`````!0```!\(@`````````````(`````````!0```"4(@``
+M```````````_`````````!P```"L(@````````````!&`````````$0.($J,
+M`H,#'````,PB`````````````$$`````````1`X0```````D````["(`````
+M````````O`````````!$#B!.C`*&`X,$````````)````!0C````````````
+M`*P`````````1`X@3HP"A@.#!````````"0````\(P````````````#H````
+M`````$0.0%Z/`HX#C02,!88&@P<D````9",`````````````\P````````!$
+M#D!>CP*.`XT$C`6&!H,'%``````````!``%X$`P'")`!````````%````!P`
+M`````````````/$`````````'````#0``````````````'4`````````1`X8
+M288"@P,4````5```````````````:0`````````<````;```````````````
+M6`````````!!#A"#`@```!0```",``````````````#'`````````!P```"D
+M``````````````"O`0```````$0.($J&`H,#'````,0``````````````*P`
+M````````1`X0```````4````Y```````````````'0`````````4````_```
+M````````````"P`````````\````%`$`````````````_`(```````!"#A!"
+M#AA"#B!"#BA!#C!!#CA$#F"#!X8&C`6-!(X#CP(`````````'````%0!````
+M`````````#<`````````00X0@P(````<````=`$`````````````30``````
+M``!!#A"#`@```!P```"4`0````````````!C`````````$0.($J&`H,#+```
+M`+0!`````````````/P`````````0@X00@X800X@00XH1`XP@P6&!(P#C0(`
+M)````.0!`````````````.``````````00X000X81`X@@P.&`@```"0````,
+M`@````````````"Y`0```````$0.,%2-`HP#A@2#!0`````4``````````$`
+M`7@0#`<(D`$````````4````'```````````````'@`````````D````-```
+M````````````!@$```````!$#B!.C`*&`X,$````````)````%P`````````
+M`````',"````````00X000X81`X@@P.&`@```"0```"$``````````````"1
+M`0```````$$.$$$.&$0.((,#A@(````L````K```````````````J@8`````
+M``!'#N`$<(\"C@.-!(P%A@:#!P`````````4````W```````````````,0``
+M```````L````]```````````````^0(```````!"#A!"#AA!#B!!#BA'#K`$
+M@P6&!(P#C0(<````)`$`````````````&@````````!!#A"#`@```"0```!$
+M`0````````````"7`````````$$.$$$.&$0.((,#A@(````D````;`$`````
+M````````A@````````!"#A!!#AA!#B"#!(8#C`(`%````)0!````````````
+M`($`````````/````*P!``````````````\!````````0@X00@X80@X@0@XH
+M00XP00XX1`Y`@P>&!HP%C02.`X\"`````````"0```#L`0`````````````%
+M`0```````$(.$$$.&$$.((,$A@.,`@`D````%`(`````````````C@``````
+M``!!#A!!#AA$#B"#`X8"````)````#P"`````````````"D"````````1`XP
+M5(T"C`.&!(,%`````"0```!D`@````````````#>`````````$0.*$^,`H8#
+M@P0````````<````C`(`````````````8P````````!!#A!$#B"#`AP```"L
+M`@````````````"4`````````$$.$(,"````)````,P"``````````````H!
+M````````1`X@3HP"A@.#!````````"0```#T`@````````````!?````````
+M`$$.$$$.&$0.((,#A@(````4``````````$``7@0#`<(D`$````````4````
+M'```````````````%@`````````4````-````````````````@`````````4
+M````3```````````````$P`````````<````9```````````````5P``````
+M``!$#A```````!P```"$```````````````5`````````$0.$```````%```
+M`*0```````````````8`````````'````+P``````````````!4`````````
+M1`X0```````D````W```````````````Z0````````!"#A!!#AA!#B"#!(8#
+MC`(`'`````0!`````````````$8`````````00X0@P(````D````)`$`````
+M````````.P````````!!#A!!#AA$#B"#`X8"````%``````````!``%X$`P'
+M")`!````````%````!P``````````````"H`````````%````#0`````````
+M`````"H`````````%``````````!``%X$`P'")`!````````'````!P`````
+M`````````"4`````````1`X0```````<````/```````````````,@``````
+M``!!#A"#`@```!P```!<```````````````E`````````$0.$```````)```
+M`'P``````````````+<`````````00X000X81`X@@P.&`@```!P```"D````
+M```````````:`````````$0.$```````%``````````!``%X$`P'")`!````
+M````'````!P``````````````"<`````````00X0@P(````<````/```````
+M````````'@````````!!#A"#`@```!P```!<```````````````A````````
+M`$0.$```````/````'P```````````````X!````````0@X00@X80@X@0@XH
+M00XP00XX1`Y`@P>&!HP%C02.`X\"`````````"0```"\``````````````!R
+M`````````$$.$$$.&$0.((,#A@(````4````Y```````````````A@``````
+M```<````_```````````````#`$```````!!#A"#`@```"0````<`0``````
+M``````!#`@```````$0.4%Z/`HX#C02,!88&@P<<````1`$`````````````
+M&@````````!$#A```````!0``````````0`!>!`,!PB0`0```````!P````<
+M``````````````![`````````$0.$```````'````#P``````````````%@`
+M````````1`X0```````D````7```````````````=`````````!!#A!!#AA$
+M#B"#`X8"````)````(0``````````````!P"````````1`X@3HP"A@.#!```
+M`````"0```"L``````````````"/`P```````$0.0%Z/`HX#C02,!88&@P<<
+M````U```````````````&@````````!$#A```````!0```#T````````````
+M``!C`````````"0````,`0````````````"E`````````$0.($Z,`H8#@P0`
+M```````<````-`$`````````````K@````````!!#A"#`@```!0```!4`0``
+M``````````!S`````````"0```!L`0`````````````=`@```````$(.$$$.
+M&$$.((,$A@.,`@`D````E`$`````````````2P(```````!"#A!!#AA!#B"#
+M!(8#C`(`%``````````!``%X$`P'")`!````````%````!P`````````````
+M`#``````````%````#0``````````````#``````````+````$P`````````
+M`````%$`````````0@X00@X800X@00XH1`XP@P6&!(P#C0(`)````'P`````
+M`````````$0`````````0@X000X800X@@P2&`XP"`!0```"D````````````
+M```R`````````!0```"\``````````````!Q`````````!0```#4````````
+M``````!C`````````!P```#L``````````````#M`````````$$.$(,"````
+M%`````P!`````````````#(`````````)````"0!`````````````&``````
+M````0@X000X800X@@P2&`XP"`#P```!,`0````````````!E`0```````$(.
+M$$(.&$(.($(.*$$.,$$..$0.4(,'A@:,!8T$C@./`@`````````D````C`$`
+M````````````L`$```````!"#A!!#AA!#B"#!(8#C`(`/````+0!````````
+M`````#L"````````0@X00@X80@X@0@XH00XP00XX1`ZP`8,'A@:,!8T$C@./
+M`@```````"0```#T`0````````````"S`````````$0.($Z,`H8#@P0`````
+M```T````'`(`````````````VP````````!"#A!"#AA"#B!!#BA!#C"#!H8%
+MC`2-`XX"`````````"0```!4`@````````````"S`0```````$0.($Z,`H8#
+M@P0````````<````?`(`````````````2@````````!$#A```````"P```"<
+M`@````````````!T`````````$(.$$(.&$$.($$.*$0.,(,%A@2,`XT"`!P`
+M``#,`@`````````````]`````````$0.$```````/````.P"````````````
+M`$<$````````0@X00@X80@X@0@XH00XP00XX1`Y`@P>&!HP%C02.`X\"````
+M`````!P````L`P````````````!%`````````$0.$```````-````$P#````
+M`````````-$`````````0@X00@X80@X@00XH00XP@P:&!8P$C0..`@``````
+M```\````A`,`````````````9@$```````!"#A!"#AA"#B!"#BA!#C!!#CA$
+M#E"#!X8&C`6-!(X#CP(`````````+````,0#`````````````'8`````````
+M0@X00@X800X@00XH1`XP@P6&!(P#C0(`'````/0#`````````````)\`````
+M````00X0@P(````4````%`0`````````````&@$````````D````+`0`````
+M````````F0$```````!$#D!>CP*.`XT$C`6&!H,''````%0$````````````
+M`#X`````````1`X@2HP"@P,D````=`0`````````````00$```````!$#C!4
+MC0*,`X8$@P4`````)````)P$`````````````(P!````````0@X000X800X@
+M@P2&`XP"`#P```#$!`````````````"$`@```````$(.$$(.&$(.($(.*$$.
+M,$$..$<.@`.#!X8&C`6-!(X#CP(````````\````!`4`````````````1`$`
+M``````!"#A!"#AA"#B!"#BA!#C!!#CA'#H`#@P>&!HP%C02.`X\"````````
+M/````$0%`````````````+8!````````0@X00@X80@X@0@XH00XP00XX1P[@
+M"H,'A@:,!8T$C@./`@```````"0```"$!0````````````!Y`````````$0.
+M($Z,`H8#@P0````````<````K`4`````````````1P````````!$#B!*C`*#
+M`Q0```#,!0````````````!;`````````#P```#D!0````````````"#!```
+M`````$(.$$(.&$(.($(.*$$.,$$..$0.0(,'A@:,!8T$C@./`@`````````\
+M````)`8`````````````F2\```````!"#A!"#AA"#B!"#BA!#C!!#CA$#K`!
+M@P>&!HP%C02.`X\"````````-````&0&`````````````-("````````0@X0
+M0@X80@X@00XH00XP@P:&!8P$C0..`@`````````\````G`8`````````````
+MEP4```````!"#A!"#AA"#B!"#BA!#C!!#CA$#D"#!X8&C`6-!(X#CP(`````
+M````)````-P&`````````````&@!````````00X000X81`X@@P.&`@```!P`
+M```$!P````````````"/`````````$0.($J&`H,#/````"0'````````````
+M`!8#````````0@X00@X80@X@0@XH00XP00XX1`Y0@P>&!HP%C02.`X\"````
+M`````"0```!D!P`````````````#`0```````$0.($Z,`H8#@P0````````\
+M````C`<`````````````;P,```````!"#A!"#AA"#B!"#BA!#C!!#CA$#E"#
+M!X8&C`6-!(X#CP(`````````/````,P'`````````````.<'````````0@X0
+M0@X80@X@0@XH00XP00XX1`Y0@P>&!HP%C02.`X\"`````````#P````,"```
+M``````````#W`@```````$(.$$(.&$(.($(.*$$.,$$..$0.2(,'A@:,!8T$
+MC@./`@`````````<````3`@`````````````20````````!$#A```````#0`
+M``!L"`````````````"Y`````````$(.$$(.&$(.($$.*$$.,(,&A@6,!(T#
+MC@(`````````)````*0(`````````````*8!````````0@X000X800X@@P2&
+M`XP"`"0```#,"``````````````2`@```````$0.8%F.`HT#C`2&!8,&```D
+M````]`@`````````````I`(```````!"#A!!#AA!#B"#!(8#C`(`'````!P)
+M`````````````#4`````````00X0@P(````<````/`D`````````````70``
+M``````!!#A"#`@```"P```!<"0````````````!'`0```````$(.$$(.&$$.
+M($$.*$0.,(,%A@2,`XT"`!P```","0````````````!8`````````$0.$```
+M````)````*P)`````````````'<`````````00X000X81`X@@P.&`@```"0`
+M``#4"0````````````#U`````````$(.$$(.&$$.((,$C`.-`@`D````_`D`
+M````````````M@````````!"#A!!#AA$#B"#`XP"````'````"0*````````
+M`````#\`````````00X0@P(````<````1`H`````````````^@````````!!
+M#A"#`@```!P```!D"@`````````````A`````````$0.$```````%```````
+M```!``%X$`P'")`!````````'````!P``````````````"<`````````00X0
+M@P(````<````/```````````````'@````````!!#A"#`@```!P```!<````
+M```````````A`````````$0.$```````)````'P``````````````(`!````
+M````1`Y`7H\"C@.-!(P%A@:#!R0```"D``````````````!R`````````$$.
+M$$$.&$0.((,#A@(````4````S```````````````-P`````````<````Y```
+M````````````I@````````!!#A"#`@```"0````$`0`````````````F`@``
+M`````$0.4%Z/`HX#C02,!88&@P<<````+`$`````````````&@````````!$
+M#A```````````````````$=#0SH@*$=.52D@,RXT+C(@6T9R965"4T1=(#(P
+M,#0P-S(X``!'0T,Z("A'3E4I(#,N-"XR(%M&<F5E0E-$72`R,#`T,#<R.```
+M1T-#.B`H1TY5*2`S+C0N,B!;1G)E94)31%T@,C`P-#`W,C@``$=#0SH@*$=.
+M52D@,RXT+C(@6T9R965"4T1=(#(P,#0P-S(X``!'0T,Z("A'3E4I(#,N-"XR
+M(%M&<F5E0E-$72`R,#`T,#<R.```1T-#.B`H1TY5*2`S+C0N,B!;1G)E94)3
+M1%T@,C`P-#`W,C@``$=#0SH@*$=.52D@,RXT+C(@6T9R965"4T1=(#(P,#0P
+M-S(X``!'0T,Z("A'3E4I(#,N-"XR(%M&<F5E0E-$72`R,#`T,#<R.```1T-#
+M.B`H1TY5*2`S+C0N,B!;1G)E94)31%T@,C`P-#`W,C@``$=#0SH@*$=.52D@
+M,RXT+C(@6T9R965"4T1=(#(P,#0P-S(X``!'0T,Z("A'3E4I(#,N-"XR(%M&
+M<F5E0E-$72`R,#`T,#<R.```1T-#.B`H1TY5*2`S+C0N,B!;1G)E94)31%T@
+M,C`P-#`W,C@``$=#0SH@*$=.52D@,RXT+C(@6T9R965"4T1=(#(P,#0P-S(X
+M``!'0T,Z("A'3E4I(#,N-"XR(%M&<F5E0E-$72`R,#`T,#<R.```1T-#.B`H
+M1TY5*2`S+C0N,B!;1G)E94)31%T@,C`P-#`W,C@``$=#0SH@*$=.52D@,RXT
+M+C(@6T9R965"4T1=(#(P,#0P-S(X``!'0T,Z("A'3E4I(#,N-"XR(%M&<F5E
+M0E-$72`R,#`T,#<R.```1T-#.B`H1TY5*2`S+C0N,B!;1G)E94)31%T@,C`P
+M-#`W,C@``$=#0SH@*$=.52D@,RXT+C(@6T9R965"4T1=(#(P,#0P-S(X``!'
+M0T,Z("A'3E4I(#,N-"XR(%M&<F5E0E-$72`R,#`T,#<R.```1T-#.B`H1TY5
+M*2`S+C0N,B!;1G)E94)31%T@,C`P-#`W,C@``$=#0SH@*$=.52D@,RXT+C(@
+M6T9R965"4T1=(#(P,#0P-S(X``!'0T,Z("A'3E4I(#,N-"XR(%M&<F5E0E-$
+M72`R,#`T,#<R.```1T-#.B`H1TY5*2`S+C0N,B!;1G)E94)31%T@,C`P-#`W
+M,C@``$=#0SH@*$=.52D@,RXT+C(@6T9R965"4T1=(#(P,#0P-S(X``!'0T,Z
+M("A'3E4I(#,N-"XR(%M&<F5E0E-$72`R,#`T,#<R.```1T-#.B`H1TY5*2`S
+M+C0N,B!;1G)E94)31%T@,C`P-#`W,C@``$=#0SH@*$=.52D@,RXT+C(@6T9R
+M965"4T1=(#(P,#0P-S(X``!'0T,Z("A'3E4I(#,N-"XR(%M&<F5E0E-$72`R
+M,#`T,#<R.```1T-#.B`H1TY5*2`S+C0N,B!;1G)E94)31%T@,C`P-#`W,C@`
+M`$=#0SH@*$=.52D@,RXT+C(@6T9R965"4T1=(#(P,#0P-S(X``!'0T,Z("A'
+M3E4I(#,N-"XR(%M&<F5E0E-$72`R,#`T,#<R.```1T-#.B`H1TY5*2`S+C0N
+M,B!;1G)E94)31%T@,C`P-#`W,C@``$=#0SH@*$=.52D@,RXT+C(@6T9R965"
+M4T1=(#(P,#0P-S(X``!'0T,Z("A'3E4I(#,N-"XR(%M&<F5E0E-$72`R,#`T
+M,#<R.```1T-#.B`H1TY5*2`S+C0N,B!;1G)E94)31%T@,C`P-#`W,C@``$=#
+M0SH@*$=.52D@,RXT+C(@6T9R965"4T1=(#(P,#0P-S(X``!'0T,Z("A'3E4I
+M(#,N-"XR(%M&<F5E0E-$72`R,#`T,#<R.```1T-#.B`H1TY5*2`S+C0N,B!;
+M1G)E94)31%T@,C`P-#`W,C@``$=#0SH@*$=.52D@,RXT+C(@6T9R965"4T1=
+M(#(P,#0P-S(X``!'0T,Z("A'3E4I(#,N-"XR(%M&<F5E0E-$72`R,#`T,#<R
+M.```1T-#.B`H1TY5*2`S+C0N,B!;1G)E94)31%T@,C`P-#`W,C@``$=#0SH@
+M*$=.52D@,RXT+C(@6T9R965"4T1=(#(P,#0P-S(X``!'0T,Z("A'3E4I(#,N
+M-"XR(%M&<F5E0E-$72`R,#`T,#<R.```1T-#.B`H1TY5*2`S+C0N,B!;1G)E
+M94)31%T@,C`P-#`W,C@``$=#0SH@*$=.52D@,RXT+C(@6T9R965"4T1=(#(P
+M,#0P-S(X``!'0T,Z("A'3E4I(#,N-"XR(%M&<F5E0E-$72`R,#`T,#<R.```
+M1T-#.B`H1TY5*2`S+C0N,B!;1G)E94)31%T@,C`P-#`W,C@``$=#0SH@*$=.
+M52D@,RXT+C(@6T9R965"4T1=(#(P,#0P-S(X``!'0T,Z("A'3E4I(#,N-"XR
+M(%M&<F5E0E-$72`R,#`T,#<R.```1T-#.B`H1TY5*2`S+C0N,B!;1G)E94)3
+M1%T@,C`P-#`W,C@``$=#0SH@*$=.52D@,RXT+C(@6T9R965"4T1=(#(P,#0P
+M-S(X``!'0T,Z("A'3E4I(#,N-"XR(%M&<F5E0E-$72`R,#`T,#<R.```1T-#
+M.B`H1TY5*2`S+C0N,B!;1G)E94)31%T@,C`P-#`W,C@``$=#0SH@*$=.52D@
+M,RXT+C(@6T9R965"4T1=(#(P,#0P-S(X``!'0T,Z("A'3E4I(#,N-"XR(%M&
+M<F5E0E-$72`R,#`T,#<R.```1T-#.B`H1TY5*2`S+C0N,B!;1G)E94)31%T@
+M,C`P-#`W,C@``$=#0SH@*$=.52D@,RXT+C(@6T9R965"4T1=(#(P,#0P-S(X
+M``!'0T,Z("A'3E4I(#,N-"XR(%M&<F5E0E-$72`R,#`T,#<R.```1T-#.B`H
+M1TY5*2`S+C0N,B!;1G)E94)31%T@,C`P-#`W,C@``$=#0SH@*$=.52D@,RXT
+M+C(@6T9R965"4T1=(#(P,#0P-S(X``!'0T,Z("A'3E4I(#,N-"XR(%M&<F5E
+M0E-$72`R,#`T,#<R.```1T-#.B`H1TY5*2`S+C0N,B!;1G)E94)31%T@,C`P
+M-#`W,C@``$=#0SH@*$=.52D@,RXT+C(@6T9R965"4T1=(#(P,#0P-S(X``!'
+M0T,Z("A'3E4I(#,N-"XR(%M&<F5E0E-$72`R,#`T,#<R.```1T-#.B`H1TY5
+M*2`S+C0N,B!;1G)E94)31%T@,C`P-#`W,C@``$=#0SH@*$=.52D@,RXT+C(@
+M6T9R965"4T1=(#(P,#0P-S(X``!'0T,Z("A'3E4I(#,N-"XR(%M&<F5E0E-$
+M72`R,#`T,#<R.```1T-#.B`H1TY5*2`S+C0N,B!;1G)E94)31%T@,C`P-#`W
+M,C@``$=#0SH@*$=.52D@,RXT+C(@6T9R965"4T1=(#(P,#0P-S(X``!'0T,Z
+M("A'3E4I(#,N-"XR(%M&<F5E0E-$72`R,#`T,#<R.```1T-#.B`H1TY5*2`S
+M+C0N,B!;1G)E94)31%T@,C`P-#`W,C@``"YS>6UT86(`+G-T<G1A8@`N<VAS
+M=')T86(`+G)E;&$N=&5X=``N<F5L82YR;V1A=&$`+G)O9&%T82YS='(Q+C@`
+M+G)O9&%T82YS='(Q+C$`+G)E;&$N9&%T80`N<F5L82YE:%]F<F%M90`N8G-S
+M`"YC;VUM96YT````````````````````````````````````````````````
+M````````````````````````````````````````````````(`````$````&
+M````````````````````0``````````:\@@`````````````````$```````
+M`````````````!L````$`````````````````````````,AF"P``````V-`"
+M```````.`````0````@`````````&``````````K`````0````(`````````
+M``````````!@\@@``````/`]```````````````````@````````````````
+M````)@````0`````````````````````````H#<.```````PMP````````X`
+M```#````"``````````8`````````#,````!````,@``````````````````
+M`%`P"0``````M0D```````````````````@``````````0````````!"````
+M`0```#(````````````````````%.@D``````/P"```````````````````!
+M``````````$`````````5@````$````#````````````````````(#T)````
+M``"P)@``````````````````(````````````````````%$````$````````
+M`````````````````-#N#@``````"!P````````.````!P````@`````````
+M&`````````!A`````0````(```````````````````#08PD``````,@/`0``
+M```````````````(````````````````````7`````0`````````````````
+M````````V`H/``````"PK`````````X````)````"``````````8````````
+M`&L````(`````P```````````````````*!S"@````````H`````````````
+M`````"````````````````````!P`````0````````````````````````"@
+M<PH``````&@*```````````````````!````````````````````$0````,`
+M````````````````````````"'X*``````!Y`````````````````````0``
+M``````````````````$````"`````````````````````````(B""@``````
+M0'$````````/````3P0```@`````````&``````````)`````P``````````
+M``````````````#(\PH``````/QR```````````````````!````````````
+M``````````````````````````````````````````````,``0``````````
+M``````````````````,``@````````````````````````````,``P``````
+M``````````````````````,`!`````````````````````````````,`!0``
+M``````````````````````````,`!@````````````````````````````,`
+M!P````````````````````````````,`"```````````````````````````
+M``,`"0````````````````````````````,`"@``````````````````````
+M``````,`"P````````````````````````````,`#```````````````````
+M``````````,`#0````````````````````````````,`#@``````````````
+M``````````````,`#P```````````````````````0````(``0!`:```````
+M`",*````````(P````(``0`@PP```````#P`````````/0````(``0!@*@$`
+M`````$H`````````50````(``0"@FP```````$P`````````>`````(``0"`
+M*0```````'``````````A@````(``0!P'P$```````<`````````E0````(`
+M`0#0:`$``````*<!````````K@````(``0"0VP```````#$`````````R```
+M``(``0!`#0```````&(`````````W@````(``0`@S````````)D!````````
+M`P$```(``0`@U````````!4`````````&P$```(``0`PUP```````)X`````
+M````.`$```(``0!@E0```````+X`````````7@$```$`!P"@!````````!``
+M````````=`$```(``0!PVP```````!H`````````CP$```(``0!08@$`````
+M`!``````````J@$```(``0!@`P```````#(`````````NP$```(``0!`6@$`
+M`````%(`````````S`$```(``0#@2@```````!`"````````Z@$```(``0`0
+MMP$``````-,$````````!P(```(``0!`!````````"P`````````'0(```(`
+M`0"PYP```````/<`````````.`(```(``0!PB0```````$D!````````7P(`
+M``(``0`P8@$``````!8`````````>0(```(``0`0DP```````$4!````````
+MFP(```(``0"`8P$``````*0`````````N`(```(``0"`=`$``````'(`````
+M````Q0(```(``0!@E````````/D`````````YP(```(``0"0M@```````,H`
+M````````"P,```(``0``$````````-L#````````+@,```(``0"@`@``````
+M``P`````````00,```(``0"P#0```````#\`````````50,```(``0#@@```
+M`````+8`````````=`,```(``0"@2````````#D"````````C@,```(``0`P
+M;P$```````T#````````I@,```(``0!`I0```````"``````````O`,```(`
+M`0#P'P```````),`````````W`,```(``0!PIP```````/8`````````]`,`
+M``(``0#P-@```````(0`````````#00```(``0!@9@$``````#H!````````
+M*@0```(``0!P?`$``````(0`````````/@0```(``0#`F0```````&`!````
+M````7P0```(``0"PZ````````'D!````````>`0```(``0"PBP```````)(`
+M````````DP0```(``0#@[0```````#L"````````J@0```(``0"@A0``````
+M``@!````````T@0```(``0#@L0```````"8`````````Z@0```(``0!PP0``
+M`````%@`````````_P0```(``0"P"@$``````!H#````````'04```(``0!0
+ML0```````"0`````````.@4```(``0#`HP```````'$!````````304```(`
+M`0#0.`````````@!````````:04```(``0#0#0$```````L'````````B`4`
+M``(``0!`0P$``````$P(````````I@4```(``0``G0```````%0$````````
+MP`4```(``0``(@```````$@`````````V04```$``P!@#@```````"(`````
+M````Y`4```(``0#`Y0```````$P``````````P8```(``0``'P```````.\`
+M````````'@8```$`!P"`!````````!``````````,08```(``0!0(@``````
+M`(P`````````4@8```(``0"@6@$``````%(`````````8P8```(``0!`U```
+M`````*(`````````>P8```(``0"@H@```````($`````````C`8```(``0#0
+M#````````&(`````````H08```(``0`0C@```````.0#````````P`8```(`
+M`0```@```````$$`````````T@8```(``0#``0```````#0`````````YP8`
+M``(``0"`#@```````'X!````````_08```(``0!PHP```````$\`````````
+M&`<```(``0#@_P```````$T`````````.`<```(``0`PZ@```````'<`````
+M````5P<```(``0#@.`$``````,\`````````=`<```(``0`0\0```````+D`
+M````````B@<```(``0!@O@```````"H!````````KP<```(``0!PL```````
+M`#4`````````S`<```(``0`0K````````#,`````````X@<```(``0"0R0``
+M`````(\```````````@```(``0`0L````````%X`````````'@@```(``0"0
+M6`$``````%(`````````+@@```$`"P!@`````````(``````````-`@```(`
+M`0`0A@$``````'H`````````1`@```(``0"@@````````#\`````````9@@`
+M``$`!P"P!````````!``````````=@@```(``0"0]````````/0"````````
+MD0@```(``0!0"@```````'H"````````I0@```(``0"``0```````#P`````
+M````M0@```(``0"@9P$``````"X!````````R`@```(``0``!0```````"0"
+M````````YP@```(``0`0P@````````(!``````````D```$`"P!`````````
+M`!P`````````$PD```(``0`0;P$``````!<`````````.`D```(``0"@8`$`
+M`````#<`````````1PD```(``0"`'P$``````)D"````````7`D```(``0`@
+ML0```````"8`````````>@D```(``0#@R@```````#@!````````C@D```(`
+M`0"@"````````*L!````````FPD```(``0`P``$``````$T`````````NPD`
+M``(``0#0M0```````+L`````````Y`D```(``0`PT@```````.\!````````
+M^`D```(``0"`:@$```````4`````````$@H```(``0!`80$``````#\`````
+M````)@H```(``0#@!P```````#,`````````-`H```(``0#0Q0```````",`
+M````````4@H```(``0#PL````````"0`````````;PH```(``0#@(@``````
+M`!,&````````D0H```(``0#0P0```````#P`````````J`H```(``0#0`@``
+M`````!X`````````O`H```(``0``V@```````.\`````````V0H```(``0"@
+M@0```````/L"````````^0H```(``0#PFP````````L!````````&`L```(`
+M`0!0`@```````$D`````````+@L```(``0"02P$``````','````````3PL`
+M``(``0!P!````````#``````````;PL```(``0!0BP```````%8`````````
+MC@L```(``0"0E@```````,,!````````I0L```(``0!@V````````(0`````
+M````T`L```(``0#`B@```````(<`````````YPL```(``0#P_@```````.L`
+M``````````P```(``0!P``````````H!````````'0P```(``0"0]P``````
+M`(T#````````-@P```(``0#0!````````"T`````````3`P```(``0#@%`$`
+M`````+@$````````9PP```(``0#0\0```````,`"````````@`P```(``0`@
+M90$``````#0!````````G@P```(``0"@:@$``````!P`````````O0P```(`
+M`0"P;@$``````&``````````X@P```(``0`@KP```````.T`````````^0P`
+M``(``0"PB````````&8`````````(0T```(``0`@B0```````$8`````````
+M2PT```(``0#@<@```````(8'````````90T```(``0``80$``````#@`````
+M````>@T```(``0!`0@```````,D#````````EPT```(``0`0J@```````&H`
+M````````JPT```(``0#0VP```````#0`````````P0T```(``0!@9```````
+M`-\#````````XPT```(``0#`C0```````$4`````````#`X```(``0!0K```
+M`````',!````````)0X```(``0#@8`$``````!P`````````-PX```(``0!0
+M0@$``````.4`````````3PX```(``0"@Q0```````"<`````````:@X```(`
+M`0"`L0```````$``````````APX```(``0`@E@```````&\`````````G0X`
+M``$`!P#`!`````````@`````````K`X```(``0#0J0```````#P`````````
+MQ@X```(``0#PT````````(8`````````[0X```(``0!@U0```````"D`````
+M````#P\```(``0!0AP```````%$!````````-@\```(``0#PV`````````<!
+M````````3`\```(``0#@:@$``````"L`````````:0\```(``0#`:@$`````
+M`!T`````````A@\```(``0`@!````````!P`````````J`\```(``0"000$`
+M`````+H`````````OP\```(``0!`[0```````)D`````````U0\```(``0!@
+MPP```````.(`````````\0\```(``0"`I0```````.X!````````!A````(`
+M`0#P*0```````/H,````````(Q````(``0#`L0```````!H`````````/Q``
+M``(``0!@H0```````#0!````````7!````(``0"`'`$``````/,`````````
+M<A````(``0"0:@$```````8`````````C!````(``0"P/0```````(,$````
+M````IA````(``0!@HP````````(`````````O1````(``0#@.0```````,T#
+M````````UA````(``0#0.@$``````)8"````````]A````(``0#P`@``````
+M`"D`````````#A$```(``0#PV@```````'0`````````*Q$```(``0`@^P``
+M`````,<#````````0A$```(``0#@OP$``````%X`````````7!$```(``0"P
+MZ@```````(,"````````>!$```(``0"P`@```````!T`````````C1$```(`
+M`0#@JP```````"X`````````HQ$```(``0`@R@```````$P`````````O!$`
+M``(``0!PR@```````&\`````````SQ$```(``0!0N````````/T`````````
+M^!$```(``0!0O0````````P!````````)!(```(``0`0W````````*,)````
+M````-Q(```(``0"@6P```````$``````````5!(```(``0``'P$``````&0`
+M````````8!(```(``0"@5@```````+4`````````>!(```(``0`0L@``````
+M`"0`````````CQ(```(``0!@F````````%,!````````L!(```(``0"```$`
+M`````/@#````````Q1(```(``0`0?@```````(T"````````YQ(```(``0"`
+ML@```````"0``````````1,```(``0!@8@$``````+8`````````&1,```(`
+M`0`@(@$``````"T`````````)Q,```(``0`P!P```````*@`````````/1,`
+M``(``0#0K0```````$8!````````6!,```(``0#@(0```````!$`````````
+M>!,```(``0!08`$``````$4`````````AA,```(``0"P`P```````%L`````
+M````G!,```(``0!P>@```````+$`````````P!,```(``0"`T0```````*\`
+M````````W!,```(``0!`:P$``````$T!`````````10```(``0"0(```````
+M``X`````````'Q0```(``0!0?0```````+4`````````/A0```(``0!`L@``
+M`````#@`````````610```(``0`PHP```````"<`````````<Q0```$`!P"0
+M!````````!``````````B!0```(``0"0OP```````"8!````````JQ0```(`
+M`0"PJ@```````"$!````````P!0```(``0``=0$``````*H`````````V!0`
+M``(``0#PN@```````$<!````````_10```(``0"0;`$``````#P!````````
+M+14```(``0#`P````````*D`````````414```(``0"`J@```````"\`````
+M````8Q4```(``0!`'@$``````,``````````=Q4```(``0"@A````````/<`
+M````````E!4```(``0`@\````````.,`````````JQ4```(``0`0:P$`````
+M`"<`````````R14```(``0"PL````````#0`````````YQ4```(``0``````
+M`````&8`````````!Q8```(``0"`M0$``````(@!````````)!8```(``0"@
+M`P```````!``````````.!8```(``0#`S0```````*@`````````518```(`
+M`0#0O`$``````'L`````````<18```(``0!@5P```````&L#````````BA8`
+M``(``0``?0$```````L!````````HQ8```(``0!`C`$``````$<%````````
+MO!8```(``0"`'0$``````,``````````T!8```(``0!0C````````&\!````
+M````^Q8```(``0!0Q````````$$!````````#Q<```(``0#P6`$``````%(`
+M````````'Q<```(``0!`O`````````0!````````21<```$`"P``````````
+M``0`````````6Q<```(``0!P<@```````&0`````````<Q<```(``0`P>P``
+M`````!4"````````DA<```(``0`0!`````````T`````````JQ<```(``0``
+M*P$``````!,(````````RA<```(``0!@I0```````"``````````XQ<```(`
+M`0`@`P```````#H`````````^1<```(``0`@FP```````'$`````````&!@`
+M``(``0#P#0```````((`````````-Q@```(``0``Q@```````(<#````````
+M3A@```(``0`P9`$``````.0`````````:Q@```(``0#0;0$``````$``````
+M````DQ@```(``0"PL@```````!,#````````LQ@```(``0`0Y@```````)8!
+M````````RA@```(``0`@8P$``````%8`````````XQ@```(``0#@-@$`````
+M`/L!`````````1D```(``0#P3````````*P)````````&AD```(``0`01@``
+M`````(\"````````,1D```(``0"PA@```````)4`````````4AD```(``0!@
+MMP```````.L`````````>!D```(``0"@(````````#\!````````F1D```(`
+M`0`05`$``````%@`````````JAD```(``0``T````````/``````````R!D`
+M``(``0"`!`$``````"0&````````Y1D```(``0!P70$``````-4"````````
+M]QD```(``0#@$P```````!(+````````%!H```(``0"@!````````"T`````
+M````+1H```(``0``*0```````'P`````````41H```(``0#0UP```````(0`
+M````````;!H```(``0"`80$``````*4`````````B!H```(``0`0;@$`````
+M`)H`````````JAH```(``0#PU````````&(`````````NQH```(``0``D@``
+M``````X!````````WQH```(``0"@&0$``````-X"````````^QH```(``0`@
+M"````````'(`````````$1L```(``0"0\0$``````/H,````````+AL```(`
+M`0"@UP$``````-L#````````41L```(``0``?P(``````.L`````````>```
+M``(``0`@\0$``````'``````````A@````(``0`0YP(```````<`````````
+M=QL```(``0!0U0$``````#\`````````BQL```(``0"@9`(``````%0$````
+M````I1L```(``0"`_@(``````/L!````````PQL```(``0"P>0(``````"0`
+M````````VAL```(``0"@\`$``````'P`````````_AL```(``0!`-P,`````
+M`&``````````(QP```(``0"@H0(``````.\`````````0!P```(``0#P+@,`
+M`````#H!````````71P```(``0"``0(``````,T#````````=AP```(``0``
+M:0(``````#0!````````DQP```(``0#`FP(``````!4`````````7@$```$`
+M!P"@"P```````!``````````NP$```(``0#@(0,``````%(`````````JQP`
+M``(``0"08P(```````L!````````RAP```(``0``:P(```````(`````````
+MX1P```(``0`P,P,``````!P`````````N`(```(``0`0/0,``````'(`````
+M`````!T```(``0!`'@(``````+4`````````&!T```(``0"@EP(``````/``
+M````````-AT```(``0!0T@(``````!H#````````5!T```(``0"```,`````
+M`,\`````````<1T```$`!P"0"P```````!``````````AAT```(``0"0%`(`
+M`````*P)````````/@0```(``0!@80(``````&`!````````GQT```(``0#0
+M,P,``````$T!````````Q!T```(``0`0HP(``````!H`````````>`0```(`
+M`0!04P(``````)(`````````WQT```(``0`@>@(``````"0`````````J@0`
+M``(``0!`30(```````@!````````^1T```(``0!`(P(``````$``````````
+M%AX```(``0`@R0$``````#P`````````)AX```(``0!@B`(``````*D`````
+M````2AX```(``0#P"0,``````.4`````````8AX```(``0!0,P,``````!T`
+M````````?QX```(``0#`+`,``````.0`````````V04```$``P`P'0``````
+M`!\`````````G!X```(``0``10,``````(0`````````L!X```(``0!PB0(`
+M`````#P`````````QQX```(``0#PR0$``````$D`````````W1X```(``0!0
+M4`(``````&8`````````4@8```(``0!`(@,``````%(`````````!1\```(`
+M`0#@@P,``````(@!````````(A\```(``0`0;P(``````/8`````````.A\`
+M``(``0!PU`$``````&(`````````3Q\```(``0`@-0,``````#P!````````
+M?Q\```(``0!P`@,``````)8"````````GQ\```(``0"PRP$```````T`````
+M````N!\```(``0"P*@,``````!``````````TQ\```(``0"`SP$``````#,`
+M````````X1\```(``0``A@(``````"H!````````!B````(``0"P*P,`````
+M`%8`````````'R````(``0`@YP(``````)D"````````-"````(``0!`Z`$`
+M`````#\!````````52````(``0"P<0(``````&H`````````:2````(``0`0
+M)0,``````-4"````````>R````(``0!PN0(``````,`"````````'@@```(`
+M`0`P(`,``````%(`````````E"````(``0!@50(``````$4`````````+@@`
+M``$`"P!@`0```````(``````````O2````(``0`PO`(``````/0"````````
+MV"````(``0#06@,``````$<%````````-`@```(``0"@5`,``````'H`````
+M````9@@```$`!P"P"P```````!``````````\2````(``0"P#0(``````(\"
+M````````""$```(``0"@60(```````X!````````+"$```(``0!`*`,`````
+M`#<`````````.R$```(``0#P<P(``````',!````````5"$```(``0!`R@$`
+M``````P`````````9R$```(``0!`X0(``````-X"````````@R$```(``0!P
+MA0,``````-,$````````H"$```(``0"0>`(``````"0`````````O2$```(`
+M`0"`VP$``````!(+````````VB$```(``0``70(``````+X``````````"(`
+M``(``0#PBP(``````$$!````````%"(```(``0"@\@(``````!,(````````
+M,R(```(``0`0R`$```````H!````````4"(```$`!P"`"P```````!``````
+M````8R(```(``0!`$`(``````#D"````````?2(```(``0#P1P,``````$@`
+M````````CR(```(``0#PA`(```````P!````````NR(```(``0"P6@(`````
+M`$4!````````W2(```(``0`0:P(``````$\`````````^"(```(``0#0S@$`
+M`````*@`````````#B,```(``0!`2`(``````#\`````````,",```(``0``
+M+`(``````-\#````````4B,```(``0`P,`,``````"X!````````92,```(`
+M`0`0D@(``````&\`````````>",```(``0"`Z0$``````!$`````````F",`
+M``(``0`0S`$``````#``````````N",```(``0"0@@(``````$<!````````
+MC@D```(``0!`T`$``````*L!````````W2,```(``0"@,P,``````"<`````
+M````^R,```(``0#@>0(``````#@`````````%B0```(``0"@-@,``````)H`
+M````````."0```(``0"P<P(``````#,`````````3B0```(``0#0QP(`````
+M`$T`````````;B0```(``0#`=@(``````.T`````````A20```(``0"010,`
+M``````L!````````GB0```(``0!P=0(``````$8!````````N20```(``0"`
+MM0(``````#L"````````T"0```(``0#@RP$``````"P`````````YB0```(`
+M`0#`D0(``````$P`````````_R0```(``0#`P@(``````,<#````````%B4`
+M``(``0!@R0$``````#0`````````*R4```(``0#P?P(``````/T`````````
+M5"4```(``0#@*0,``````*4`````````<"4```(``0#PT0$``````'H"````
+M````A"4```(``0"0F`(``````(8`````````C@L```(``0`P7@(``````,,!
+M````````JR4```(``0#P)P,``````$4`````````N24```(``0#P>`(`````
+M`"0`````````UB4```(``0#@M`(``````)D`````````["4```(``0`@U@$`
+M`````'X!`````````B8```(``0#00@(``````!4"````````(28```(``0!`
+MRP$``````!``````````-28```(``0"`$@(``````!`"````````4R8```(`
+M`0!@>0(``````!H`````````;R8```(``0`0+`,``````*0`````````(0T`
+M``(``0#`4`(``````$8`````````C"8```(``0!0>`(``````#0`````````
+MJB8```(``0"0Q@(``````.L`````````PR8```(``0"@R0$``````$$`````
+M````U28```(``0!P,P,``````"L`````````\B8```(``0"`Z@$``````!,&
+M````````)0X```(``0"`*`,``````$T`````````%"<```(``0"`.@(`````
+M`(8'````````+B<```(``0#@"0(``````,D#````````2R<```(``0!PR@$`
+M`````!X`````````7R<```(``0#`RP$``````!P`````````@2<```(``0#P
+M3@(``````%$!````````J"<```(``0`PHP(``````#$`````````PB<```(`
+M`0#@FP(``````*(`````````VB<```(``0`@>0(``````$``````````]R<`
+M``(``0"0_@$``````(0`````````$"@```(``0#P4P(``````&\!````````
+M.R@```(``0"0YP$``````),`````````6R@```(``0#@;`(``````"``````
+M````<2@```(``0!P?0(``````+L`````````FB@```(``0!0>@(``````!,#
+M````````NB@```(``0!@:P(``````'$!````````S2@```(``0!PGP(`````
+M`(0`````````Z"@```(``0"0R@$``````"D``````````"D```(``0#`-P,`
+M``````T#````````&"D```(``0``G0(``````"D`````````.BD```(``0!`
+M20(``````/L"````````6BD```(``0"PHP(``````*,)````````;2D```(`
+M`0``BP(``````.(`````````B2D```(``0"P10(``````(T"````````JRD`
+M``(``0#@U`$``````&(`````````P2D```(``0`0B0(``````%@`````````
+MUBD```(``0!`:@(``````($`````````YRD```(``0``RP$``````#(`````
+M````^"D```(``0#`B@(``````#P`````````$BH```(``0`P?@(``````,H`
+M````````-BH```(``0`@Y`(``````/,`````````5!(```(``0"@Y@(`````
+M`&0`````````3"H```(``0!PC0(``````",`````````:BH```(``0#`70(`
+M`````&\`````````@"H```(``0!@E0(``````*@`````````G2H```(``0`P
+M$P,``````','````````CQ(```(``0``8`(``````%,!````````OBH```(`
+M`0"`QP(``````$T`````````WBH```(``0#`DP(``````)D!`````````RL`
+M``(``0!0<@(``````"$!````````&"L```(``0#PZ0$``````(P`````````
+M&1,```(``0#`Z0(``````"T`````````.2L```(``0#0G@(``````)X`````
+M````5BL```(``0`00@(``````+$`````````>BL```(``0"`<P(``````"X`
+M````````P!,```(``0`@F0(``````*\`````````D"L```(``0`PZ`$`````
+M``X`````````KBL```(``0`PD0(``````(\`````````S"L```(``0#P4@(`
+M`````%8`````````ZRL```(``0"PB0(```````(!````````!"P```(``0!`
+MS`$``````"T`````````'2P```(``0#@@P(```````0!````````1RP```(`
+M`0#`MP(``````.,`````````P!0```(``0"0/0,``````*H`````````7BP`
+M``(``0"@Y@$``````.\`````````>2P```(``0"@S`$``````"0"````````
+MF"P```(``0#P1`(``````+4`````````MRP```(``0#0F0(``````.\!````
+M````RRP```(``0#0*`,``````!D`````````X"P```(``0!03@(``````)4`
+M`````````2T```(``0#@+P(``````",*````````(RT```(``0!0R@$`````
+M`!T`````````."T```(``0``H`(``````(0`````````8RT```(``0#@"@,`
+M`````$P(````````@2T```(``0"@Z0$``````$@`````````8Q4```(``0#@
+MY0(``````,``````````=Q4```(``0!`3`(``````/<`````````FBT```(`
+M`0!PHP(``````#0`````````L"T```(``0"PK0(``````)8!````````QRT`
+M``(``0``;0(``````"``````````X"T```(``0!`C@,``````%X`````````
+M^BT```(``0`@<@(``````"\`````````#"X```(``0"P=P(``````%X`````
+M````*BX```(``0#P*`,``````.8`````````/BX```(``0#`*@,``````.8`
+M````````5BX```(``0`@,P,```````8`````````<"X```(``0`0>`(`````
+M`#4`````````C2X```(``0``\@(``````$H`````````I2X```(``0!0KP(`
+M`````/<`````````P"X```(``0!0!0(``````(,$````````VBX```(``0#`
+M8@(``````'$`````````^2X```(``0`@R`(``````/@#````````#B\```(`
+M`0`PAP(``````"8!````````,2\```(``0"P50(``````.0#````````4"\`
+M``(``0"@1@,``````$L!````````518```(``0`PBP,``````'L`````````
+M8"\```(``0"`D@(``````#@!````````="\```(``0#`R@$``````#H`````
+M````BB\```(``0!@4@(``````(<`````````H2\```(``0"0H`(```````<!
+M````````MR\```(``0`0.@(``````&0`````````O!8```(``0`@Y0(`````
+M`,``````````SR\```(``0"`W`(``````+@$````````ZB\```(``0!PU0(`
+M``````L'````````#Q<```(``0"0(`,``````%(`````````21<```$`"P``
+M`0````````0`````````"3````(``0!0L@(``````(,"````````)3````(`
+M`0`@;0(``````.X!````````.C````(``0"@C0(``````(<#````````43``
+M``(``0`040(``````$D!````````>#````(``0!P<0(``````#P`````````
+MDC````(``0!0L`(``````'D!````````JS````(``0`0,P,```````4`````
+M````Q3````(``0"PN`(``````+D`````````VS````(``0!@K0(``````$P`
+M````````^C````(``0"0G`(``````&(`````````"S$```(``0#0:@(`````
+M`"<`````````)3$```(``0"`2`(``````+8`````````1#$```(``0"`>0(`
+M`````"8`````````7#$```(``0!`8P(``````$P`````````?S$```(``0!`
+MC0(``````"<`````````FC$```(``0"0H@(``````'0`````````MS$```(`
+M`0"P+0,``````#0!````````U3$```(``0#`SP$``````'(`````````ZS$`
+M``(``0!0RP$``````%L``````````3(```$`"P!``0```````!P`````````
+M%#(```(``0"0*@,``````!8`````````+C(```(``0"0U0$``````((`````
+M````33(```(``0``'P(``````&L#````````9C(```(``0#`>`(``````"8`
+M````````A#(```(``0!PS`$``````"T`````````FC(```(``0`@S`(`````
+M`"0&````````MS(```(``0`POP(``````(T#````````T#(```(``0"P&P,`
+M`````%@`````````X3(```(``0!@-@,``````$``````````"3,```(``0!P
+M``(```````@!````````)3,```(``0#0L0(``````'<`````````1#,```(`
+M`0"@-P,``````!<`````````:3,```(``0`P"0,``````+H`````````@#,`
+M``(``0``7`(``````/D`````````HC,```(``0"@QP$``````&8`````````
+MPC,```(``0!@,0,``````*<!````````VS,```(``0#PM0,``````),`````
+M````^S,```(``0"`E@0``````/@#````````$#0```(``0`0<@0``````*,)
+M````````(S0```(``0"@%P0``````/L"````````0S0```(``0#0S@,`````
+M``@!````````>`````(``0"`OP,``````'``````````7S0```(``0"@!04`
+M`````&``````````A@````(``0!PM00```````<`````````A#0```(``0`P
+M;00``````)X`````````H30```(``0#PF`,``````"D`````````N30```(`
+M`0#P,00```````L!````````V#0```(``0`@100``````.T`````````[S0`
+M``(``0`0F@,```````T`````````"#4```(``0#00P0``````$8!````````
+M(S4```(``0`02`0``````"0`````````.C4```(``0!0(@0``````&\!````
+M````934```(``0#PE`0``````.L`````````?C4```(``0"@W@,``````#D"
+M````````F#4```(``0"0B@0``````/0"````````LS4```(``0#0T`0`````
+M`)8"````````7@$```$`!P`@$@```````!``````````NP$```(``0!`\`0`
+M`````%(`````````TS4```(``0#0`04``````"L`````````\#4```(``0"P
+M0`0``````"$!````````!38```(``0#P<`0``````'0`````````(C8```(`
+M`0#0;00``````(0`````````/38```(``0"`M00``````)D"````````4C8`
+M``$`!P`0$@```````!``````````9S8```(``0```@4``````"<`````````
+MN`(```(``0!P"P4``````'(`````````A38```(``0`@!@4```````T#````
+M````G38```(``0!P/00``````/8`````````M38```(``0"`1P0``````$``
+M````````TC8```(``0!@600``````.(`````````[C8```(``0``E@,`````
+M`&8`````````#C<```(``0``*`0```````X!````````,C<```(``0"@6P0`
+M`````"<`````````33<```(``0#06P0``````",`````````:S<```(``0!`
+M:@0``````*(`````````@S<```(``0!03@0``````/T`````````K#<```(`
+M`0!0N`,``````(P`````````/@0```(``0#`+P0``````&`!````````S3<`
+M``(``0"`2`0``````"0`````````>`0```(``0"P(00``````)(`````````
+MYS<```(``0"P@`0``````(,"````````J@0```(``0"@&P0```````@!````
+M`````S@```(``0!`^`0``````*4`````````'S@```(``0!@^@,``````-\#
+M````````03@```(``0`00@0``````#,`````````5S@```(``0`@^P0`````
+M`.0`````````V04```$``P#P*P```````!\`````````=#@```(``0!01P0`
+M`````"0`````````D3@```(``0!`_@,``````",*````````4@8```(``0"@
+M\`0``````%(`````````LS@```(``0!@.00```````(`````````RC@```(`
+M`0!P8`0``````&\`````````W3@```(``0!@$P4``````(0`````````\3@`
+M``(``0``FP,``````"0"````````$#D```(``0``N`,``````$@`````````
+M*3D```(``0#@000``````"X`````````/SD```(``0!@[0,``````&L#````
+M````6#D```(``0`0_`0``````#0!````````=CD```(``0#@"`0``````(8'
+M````````D#D```(``0"PH`0``````!H#````````KCD```(``0"@,00`````
+M`$P`````````T3D```(``0``9@0``````/``````````'@@```(``0"0[@0`
+M`````%(`````````+@@```$`"P!``P```````(``````````[SD```(``0!@
+M*@0``````/D`````````$3H```(``0!P`04```````4`````````-`@```(`
+M`0#`(@4``````'H`````````9@@```$`!P`P$@```````!``````````*SH`
+M``(``0"@%@0``````#\`````````33H```(``0"07P0``````(\`````````
+M:SH```(``0!0V`0``````.4`````````@SH```(``0`P@`0``````'<`````
+M````HCH```(``0!P'P0``````$D!````````?2(```(``0!0%@4``````$@`
+M````````R3H```(``0!`4@0```````0!````````\SH```(``0``M0,`````
+M`.\`````````#CL```(``0#`(P0``````$4`````````-SL```(``0"P?00`
+M`````/<`````````4CL```(``0"PF0,``````%L`````````:#L```(``0#P
+MOP,``````/H,````````A3L```(``0`@,00``````'$`````````I#L```(`
+M`0!PF@,``````#``````````Q#L```(``0``P00``````!,(````````XSL`
+M``(``0"P'`0``````)4`````````!#P```(``0#@J@0``````+@$````````
+M'SP```(``0"@F0,``````!``````````,SP```(``0!06@0``````$$!````
+M````C@D```(``0"@G@,``````*L!````````1SP```(``0#`>P0``````$P`
+M````````9CP```(``0#P1@0``````"0`````````@SP```(``0#05P0`````
+M`#P`````````FCP```(``0#`EP,``````#0`````````KSP```(``0`@D00`
+M`````,<#````````QCP```(``0!@:P0``````"D`````````Z#P```(``0`0
+M^@0``````%8``````````3T```(``0`0AP0``````+D`````````%ST```(`
+M`0`@600``````#P`````````,3T```(``0"@F@,``````"T`````````2CT`
+M``(``0!`2`0``````#@`````````93T```(``0"0`04``````!P`````````
+MA#T```(``0``I@,``````-L#````````IST```(``0#PX@,``````*P)````
+M````P#T```(``0"`EP,``````#P`````````T#T```(``0"@F`,```````P`
+M````````XST```(``0"@.`0``````($`````````]#T```(``0"PHP,`````
+M`#\`````````"#X```(``0#0<00``````#0`````````C@L```(``0"0+`0`
+M`````,,!````````'CX```(``0#`_P0``````*<!````````-SX```(``0!P
+M5P0``````%@`````````3#X```(``0"P?@0``````'D!````````93X```(`
+M`0`@^00``````.8`````````?3X```(``0#@X`,``````!`"````````FSX`
+M``(``0`P:`0``````.\!````````KSX```(``0!0$P0``````+4`````````
+MSCX```(``0`PE@0``````$T`````````[CX```(``0#P4`0``````$<!````
+M````$S\```(``0#@E00``````$T`````````,S\```(``0`0%`0``````(T"
+M````````53\```(``0`01@0``````%X`````````<S\```(``0!@5`0`````
+M`"H!````````F#\```(``0!0(00``````%8`````````MS\```(``0!P1@0`
+M`````#4`````````U#\```(``0!@.P0``````"``````````[3\```(``0``
+M<`0``````.\`````````"D````(``0!0F`,``````$D`````````($````(`
+M`0`@G@,``````'(`````````-D````(``0`@F0,``````#H`````````(0T`
+M``(``0`@'P0``````$8`````````3$````(``0#0H@,``````&(`````````
+M84````(``0"0_@0``````"X!````````=$````(``0#`5@0``````*D`````
+M````F$````(``0!@7`4``````%X`````````LD````(``0#P:@0``````&(`
+M````````PT````(``0#P;@0```````<!````````V4````(``0!`F@,`````
+M`"P`````````[T````(``0"@KP0``````-X"````````)0X```(``0#@]@0`
+M`````$T`````````"T$```(``0!`.P0``````"``````````(4$```(``0#@
+M8`0``````#@!````````-4$```(``0#P*`4``````$<%````````3D$```(`
+M`0#0/P0``````#P`````````:$$```(``0!`HP,``````&(`````````?D$`
+M``(``0"`F@0``````"0&````````FT$```(``0#`(`0``````(<`````````
+MLD$```(``0"0UP0``````+H`````````R4$```(``0!0H`,``````'H"````
+M````W4$```(``0"P`04``````!T`````````^D$```(``0!0]P0``````.8`
+M````````#D(```(``0`06`0```````(!````````)T(```(``0#`1P0`````
+M`!H`````````0T(```(``0`@F@,``````!P`````````94(```(``0``!@4`
+M`````!<`````````BD(```(``0!P.00``````$\`````````I4(```(``0#0
+MHP0```````L'````````Q$(```(``0!@P`0``````$H`````````W$(```(`
+M`0"`.P0``````.X!````````\4(```(``0#@%@0``````+8`````````$$,`
+M``(``0`@+`0``````&\`````````)D,```(``0`@:@0``````!4`````````
+M/D,```(``0"0X00``````','````````7T,```(``0"`I`,``````'X!````
+M````=4,```(``0`@8@0``````)D!````````FD,```(``0!@-P0``````#0!
+M````````MT,```(``0"``04```````8`````````T4,```(``0!@300`````
+M`.L`````````]T,```(``0#@S@0``````,\`````````5!(```(``0``M00`
+M`````&0`````````%$0```(``0!`V`,``````,D#````````CQ(```(``0!@
+M+@0``````%,!````````,40```(``0"@]@0``````#<`````````&1,```(`
+M`0`@N`0``````"T`````````0$0```(``0`0?`0``````)8!````````5T0`
+M``(``0`0*00``````$4!````````P!,```(``0"`9P0``````*\`````````
+M>40```(``0!04P0```````P!````````I40```(``0``!04``````)H`````
+M````QT0```(``0`@1P0``````"8`````````Y40```(``0"@[`,``````+4`
+M````````_40```(``0!P\P0``````-4"````````#T4```(``0!P<00`````
+M`!H`````````*D4```(``0!@;@0``````(0`````````544```(``0`0W`,`
+M`````(\"````````;$4```(``0#P$P4```````L!````````P!0```(``0#P
+M"P4``````*H`````````A44```(``0#@1P0``````"8`````````G44```(`
+M`0#P9@0``````(8`````````Q$4```(``0#`.00``````'$!````````UT4`
+M``(``0#@SP,``````,T#````````\$4```(``0!P"`0``````&0`````````
+M"$8```(``0!`V00``````$P(````````)D8```(``0#@S`0``````/L!````
+M````1$8```(``0#0AP0``````,`"````````748```(``0`@8`0``````$P`
+M````````=D8```(``0!0'00``````%$!````````G48```(``0#`8P0`````
+M`*@`````````ND8```(``0`P`@4``````$T!````````WT8```(``0#@N`,`
+M`````!,&`````````4<```(``0`0Z@0``````%@`````````$D<```(``0"`
+M`P4``````#P!````````0D<```(``0``F`,``````$$`````````8Q4```(`
+M`0!`M`0``````,``````````=Q4```(``0"@&@0``````/<`````````5$<`
+M``(``0#@@P0``````#L"````````:T<```(``0"P'@0``````&8`````````
+MDT<```(``0"PTP,``````(,$````````K4<```(``0#`!`4``````$``````
+M````U4<```(``0`@A@0``````.,`````````[$<```$`"P`@`P```````!P`
+M````````_T<```(``0#0F`,``````!X`````````$T@```(``0!00@0`````
+M`',!````````+$@```(``0``,P0``````%0$````````1D@```(``0`P.00`
+M`````"<`````````4"\```(``0``%04``````$L!````````8$@```(``0``
+M4@4``````(@!````````518```(``0!0604``````'L`````````?4@```(`
+M`0#02P0``````+L`````````ID@```(``0"@\0,``````$``````````PT@`
+M``(``0!P$`0``````+$`````````YT@```(``0!PE@,```````H!````````
+M!$D```(``0``OP,``````'P`````````O!8```(``0"`LP0``````,``````
+M````*$D```(``0"0M@,```````X`````````1DD```(``0!`@P0``````)D`
+M````````7$D```(``0#@J0,``````!(+````````#Q<```(``0#P[@0`````
+M`%(`````````>4D```(``0"P2`0``````!,#````````21<```$`"P#@`@``
+M``````0`````````F4D```(``0"`0`0``````"\`````````JTD```(``0"0
+M3`0``````,H`````````STD```(``0!0_00``````#H!````````[$D```(`
+M`0"`L@0``````/,``````````DH```(``0#P^`0``````!8`````````'$H`
+M``(``0`0)`0``````.0#````````.TH```(``0`PG0,``````*@`````````
+M44H```(``0"0C00``````(T#````````:DH```(``0`P]P0``````!D`````
+M````?TH```(``0!0]@0``````$4`````````C4H```(``0#0F@,``````"T`
+M````````HTH```(``0`00`0``````&H`````````MTH```(``0`0^00`````
+M`!``````````TDH```(``0!@*P0``````+X`````````^$H```(``0"P1@0`
+M`````#0`````````%DL```(``0!P^@0``````*0`````````,TL```(``0"0
+M500``````"8!````````5DL```$`!P``$@```````!``````````:4L```(`
+M`0`P$00``````!4"````````B$L```(``0#PHP,``````((`````````ITL`
+M``(``0#PS`,``````(0`````````P$L```(``0#@MP,``````!$`````````
+MX$L```(``0"@M@,``````#\!`````````4P```(``0"0<00``````#$`````
+M````&TP```(``0#@G0,``````#,`````````*4P```(``0!@F0,``````#(`
+M````````.DP```(``0``7`0``````(<#````````44P```(``0"PF`,`````
+M`!T`````````9DP```(``0"04P4``````-,$````````@TP```(``0!`9P4`
+M`````#H`````````F4P```$`"P``!0```````!P`````````>`````(``0"@
+MC04``````'``````````K$P```(``0``KP4``````!`"````````A@````(`
+M`0"0@P8```````<`````````RDP```(``0#0%@8``````!,#````````ZDP`
+M``(``0"0R`8``````*0`````````!TT```(``0``UP4``````(8'````````
+M(4T```(``0#`Y`4``````#\`````````0TT```(``0"P&@8``````,H`````
+M````9TT```(``0!`U`8```````T#````````?TT```(``0!@I@4``````,D#
+M````````G$T```(``0#`N@4``````+4`````````7@$```$`!P"@&```````
+M`!``````````M$T```(``0#0H04``````(,$````````SDT```(``0!0T`8`
+M`````$T!````````NP$```(``0!@O@8``````%(`````````\TT```(``0#P
+M9@4``````!X`````````!TX```(``0``+P8``````#@!````````&TX```(`
+M`0#P/P8``````#0`````````,4X```(``0#02P8``````/<`````````3$X`
+M``(``0"`!08``````#0!````````:4X```$`!P"0&````````!``````````
+MN`(```(``0"0V08``````'(`````````?DX```(``0"0W@4``````+$`````
+M````HDX```(``0"`(@8``````"H!````````QTX```(``0`08P8``````.L`
+M````````X$X```(``0#0Z@4``````)4``````````4\```(``0!PA@4`````
+M`(P`````````(D\```(``0"0SP8```````4`````````/$\```(``0``$`8`
+M`````"X`````````4D\```(``0`@:04``````"0"````````<4\```(``0`0
+M<@4``````((`````````D$\```(``0"@904``````#P`````````H$\```(`
+M`0"`.08``````"D`````````PD\```(``0`@U`8``````!<`````````YT\`
+M``(``0`0/08```````<!````````_4\```(``0"@SP8```````8`````````
+M%U````(``0`@9@4``````$$`````````/@0```(``0#@_04``````&`!````
+M````>`0```(``0#0[P4``````)(`````````*5````(``0#P508``````,`"
+M````````0E````(``0`0%08``````"0`````````J@0```(``0#`Z04`````
+M``@!````````7U````(``0!09`8``````$T`````````?U````(``0!PQ08`
+M`````.8`````````DU````(``0"`"08``````"``````````K%````(``0"P
+MI08``````+H`````````PU````(``0"0/P8``````!H`````````WE````(`
+M`0!P'`8``````/T`````````!U$```(``0`@9`4``````&8`````````)U$`
+M``(``0"0+@8``````&\`````````.E$```(``0"@<@4``````'X!````````
+M4%$```(``0!@408``````)D`````````V04```$``P#`.@```````"(`````
+M````9E$```(``0!`.`8``````!4`````````?E$```(``0`0X@8```````L!
+M````````4@8```(``0#`O@8``````%(`````````EU$```(``0!@S`4`````
+M`",*````````N5$```(``0#PG@8``````)8"````````V5$```(``0"@#@8`
+M`````"\`````````ZU$```(``0"P(P8``````"8!````````#E(```(``0`P
+M:`4```````T`````````)U(```(``0"0[04``````$D!````````3E(```(`
+M`0`@=`4``````-L#````````<5(```(``0!@Q@8``````*4`````````C5(`
+M``(``0!0Q08``````!D`````````HE(```(``0!P$`8``````',!````````
+MNU(```(``0!P%08``````"0`````````'@@```(``0"PO`8``````%(`````
+M````+@@```$`"P`@!0```````(``````````V%(```(``0!0-@8``````.\!
+M````````[%(```(``0"@:`8``````"0&````````-`@```(``0``[P8`````
+M`'H`````````9@@```$`!P"P&````````!``````````"5,```(``0"0)08`
+M`````%@`````````'E,```(``0!@IP8``````$P(````````/%,```(``0!P
+MI@8``````.4`````````5%,```(``0!`$P8``````.T`````````:U,```(`
+M`0`P)@8```````(!````````A%,```(``0``>08``````+@$````````GU,`
+M``(``0"P+08``````(\`````````O5,```(``0#03`8``````'D!````````
+MUE,```(``0`P%@8``````"0`````````[5,```(``0`0.08``````&(`````
+M````_E,```(``0"09`4```````H!````````&U0```(``0#0<04``````#\`
+M````````+U0```(``0!P9@4``````$D`````````C@D```(``0#`;`4`````
+M`*L!````````150```(``0#PG`4```````@!````````850```(``0"0P08`
+M`````-4"````````<U0```(``0`09P4``````"D`````````BU0```(``0`P
+M2@8``````)8!````````HE0```(``0#PSP8``````"L`````````OU0```(`
+M`0"@%08``````$``````````W%0```(``0#@%08``````!H`````````^%0`
+M``(``0#P)08``````#P`````````#U4```(``0#`!@8``````($`````````
+M(%4```(``0"0U@4``````&0`````````.%4```(``0`@]@4```````X!````
+M````7%4```(``0!`:`4``````!P`````````?E4```(``0"`9P4``````#(`
+M````````CU4```(``0!`)P8``````#P`````````J54```(``0`PX@4`````
+M`(T"````````RU4```(``0#`K`4``````#D"````````Y54```(``0#`?08`
+M`````-X"````````C@L```(``0"P^@4``````,,!`````````58```(``0!`
+M'@<``````(@!````````'E8```(``0`P]P4``````$4!````````0%8```(`
+M`0!0.P8``````)X`````````758```(``0``AP4``````!,&````````?U8`
+M``(``0"@@`8``````/,`````````E58```(``0!0:P4``````*@`````````
+MJU8```(``0!0WP4``````!4"````````RE8```(``0`0QP8``````!8`````
+M````Y%8```(``0#03@8``````(,"`````````%<```(``0!PZP4``````%$!
+M````````)U<```(``0`@@P4``````.\`````````(0T```(``0!`[04`````
+M`$8`````````0E<```(``0`0A`4``````),`````````8E<```(``0`@TP8`
+M`````)H`````````A%<```(``0`@CP8``````!,(````````HU<```(``0!P
+M[P4``````%8`````````PE<```(``0"@9`8``````/@#````````UU<```(`
+M`0!`^@4``````&\`````````[5<```$`!P"`&````````!```````````%@`
+M``(``0!@<04``````&(`````````%E@```(``0!PX04``````+4`````````
+M-5@```(``0`P508``````+D`````````2U@```(``0"`!P8```````(`````
+M````)0X```(``0``Q08``````$T`````````8E@```(``0#P<`4``````&(`
+M````````=U@```(``0"PKP8``````','````````F%@```(``0#@,08`````
+M`*@`````````M5@```(``0#`OP4``````$``````````TE@```(``0`0L04`
+M`````*P)````````ZU@```(``0!PRP8``````#H!````````"%D```(``0!`
+MQP8``````.8`````````(%D```(``0`0C@4``````/H,````````/5D```(`
+M`0#@T@8``````$``````````95D```(``0!P;@4``````'H"````````>5D`
+M``(``0#@S08``````*<!````````DED```(``0#`9P4``````!``````````
+MIED```(``0#P:`4``````"T`````````O%D```(``0"@T08``````#P!````
+M````[%D```(``0"0!P8``````$\`````````!UH```(``0!`5`8``````.,`
+M````````'EH```(``0#0%`8``````#0`````````/%H```(``0`@*@8`````
+M`(<#````````4UH```(``0#@904``````#0`````````:%H```(``0``FP8`
+M`````/L!````````AEH```(``0"`C@8``````$H`````````GEH```(``0!`
+M7P8``````,<#````````M5H```(``0"P/P8``````#$`````````SUH```(`
+M`0#0#@8``````"$!````````Y%H```(``0"@*`<``````%X`````````_EH`
+M``(``0``;`4``````#,`````````#%L```(``0``4@8``````#L"````````
+M(UL```(``0`@-`8``````/``````````05L```(``0#@[@4``````(<`````
+M````6%L```(``0`0``8```````L!````````=UL```(``0#0'P<``````-,$
+M````````E%L```(``0`P#@8``````&H`````````J%L```(``0!`;`4`````
+M`'(`````````OEL```(``0#@208``````$P`````````5!(```(``0`@@P8`
+M`````&0`````````W5L```(``0`P$`8``````#,`````````\UL```(``0"0
+M%`8``````#4`````````CQ(```(``0"`_`4``````%,!````````$%P```(`
+M`0!P*`8``````$$!````````)%P```(``0`PR`8``````%8`````````/5P`
+M``(``0"`&P8``````.L`````````&1,```(``0!`A@8``````"T`````````
+M8UP```(``0"`NP4``````&L#````````?%P```(``0"PS`8``````"X!````
+M````P!,```(``0"@-08``````*\`````````CUP```(``0"P6P8``````(T#
+M````````J%P```(``0``%@8``````"8`````````P%P```(``0#0[`4`````
+M`&8`````````Z%P```(``0`PR@8``````#0!````````!ET```(``0``9`8`
+M`````$T`````````)ET```(``0`@C04``````'P`````````2ET```(``0!P
+MQ`8``````$4`````````6%T```(``0#`*08``````"<`````````<UT```(`
+M`0``G@4``````,T#````````C%T```(``0"`X08``````(0`````````H%T`
+M``(``0#P#08``````#P`````````NET```(``0!@.`8``````*(`````````
+MP!0```(``0`0V@8``````*H`````````TET```(``0#09P4``````%L`````
+M````Z%T```(``0!@(`8```````0!````````$EX```(``0#P<08```````L'
+M````````,5X```(``0"`^04``````+X`````````5UX```(``0!@:`4`````
+M`"P`````````;5X```(``0#@)`8``````*D`````````D5X```(``0#`TP8`
+M`````&``````````8Q4```(``0!@@@8``````,``````````MEX```(``0#P
+M&08``````+L`````````WUX```(``0`0'P8``````$<!````````=Q4```(`
+M`0#`Z`4``````/<`````````!%\```(``0"0"P8``````/8`````````'%\`
+M``(``0!@%@8``````#@`````````-U\```(``0"P6`8``````/0"````````
+M4E\```(``0#`9@4```````P`````````95\```(``0"`)P8``````.(`````
+M````@5\```(``0``A@4``````!$`````````H5\```(``0#`Y04``````/L"
+M````````P5\```(``0!`R08``````.0`````````WE\```(``0!@"08`````
+M`"``````````]%\```(``0`P]08``````$<%````````#6````(``0!`_P4`
+M`````'$`````````518```(``0"0)0<``````'L`````````+&````(``0"@
+M@P8``````)D"````````06````(``0#`:`4``````"T`````````6F````(`
+M`0!`%08``````"8`````````>&````(``0!03@8``````'<`````````EV``
+M``(``0!`,`8``````)D!````````O&````(``0#@\04``````$4`````````
+MO!8```(``0"@@08``````,``````````Y6````(``0#`Q`8``````#<`````
+M````#Q<```(``0`0O08``````%(`````````21<```$`"P#`!`````````0`
+M````````]&````(``0``>`4``````!(+````````$6$```(``0`@A@4`````
+M`$@`````````*F$```(``0`P0`8``````*,)````````/6$```(``0#`A`4`
+M`````#\!````````7F$```(``0!P(08```````P!````````BF$```(``0"P
+MA`4```````X`````````J&$```(``0`@`08``````%0$````````PF$```(`
+M`0#`_P4``````$P`````````Y6$```(``0"`^`4``````/D`````````!V(`
+M``(``0!P\`4``````&\!````````,F(```(``0"`R`4``````-\#````````
+M5&(```(``0"0:`4``````#``````````=&(```(``0`@/@8``````.\`````
+M````D6(```(``0#09@4``````!T`````````IF(```(``0`P%`8``````%X`
+M````````Q&(```(``0``G08``````,\`````````X6(```(``0"@"08`````
+M`.X!````````]F(```(``0!`+@8``````$P`````````#V,```(``0`0/P8`
+M`````'0`````````+&,```(``0#0;@8``````!H#````````2F,```(``0"`
+M/`8``````(0`````````=6,```(``0#0SP8``````!T`````````DF,```(`
+M`0`PN`8``````%@`````````HV,```(``0!0!P8``````"<`````````O6,`
+M``(``0"@%@8``````"0`````````UV,```(``0`0-08``````(8`````````
+M_F,```(``0`PJ@4``````(\"````````%60```(``0``Y04``````+8`````
+M````-&0```(``0`P\@4``````.0#````````4V0```(``0`PQP8``````!``
+M````````;F0```(``0#P$08``````$8!````````B60```(``0#P.P8`````
+M`(0`````````I&0```(``0#@!P8``````'$!````````MV0```(``0`0FP4`
+M`````(0`````````T&0```(``0"PSP8``````!P`````````[V0```(``0`@
+MT`8``````"<`````````#64```(``0#P*08``````",`````````*V4```(`
+M`0!`50@``````"H`````````.64```(``0`P:0<``````'D`````````264`
+M``(``0`@6P<``````,@$````````8V4```(``0"P/@@``````*H&````````
+M<V4```(``0`PS@<``````(8`````````@V4```$`"P"P!@````````@`````
+M````DV4```(``0#@9P<```````P`````````J&4```(``0``5P<``````$``
+M````````O64```(``0!@4@@``````%\`````````U64```$`"P#!!@``````
+M``$`````````Y64```(``0#PK0<``````',`````````]64```(``0!040@`
+M``````H!````````!F8```(``0"P4`@``````)0`````````&F8```(``0`P
+M30@``````"D"````````,&8```(``0`P=P<``````/,`````````1F8```$`
+M"P"X!@````````0`````````5&8```(``0!`4`@``````&,`````````;&8`
+M``(``0#0)P@``````#\`````````?F8```(``0!P00<``````"8!````````
+MD68```(``0`P>`<``````,4!````````J68```(``0!@,P<``````$P`````
+M````O68```(``0"P50<``````$4!````````T68```(``0!@60<``````%,`
+M````````WV8```(``0"P3P<``````&\`````````]&8```(``0#04P<`````
+M`&$`````````!6<```(``0``3P<``````"\`````````'&<```$`"P#"!@``
+M``````$`````````,&<```(``0"P6@<``````&L`````````2V<```(``0!@
+M9`<``````$0`````````7V<```(``0"`3@<``````(``````````;V<```(`
+M`0!@0P<``````",`````````>&<```(``0"@,0<``````*L`````````E&<`
+M``(``0"@3`@``````(X`````````JF<```(``0"P5P<``````*4!````````
+MO6<```(``0!@.0@``````!X`````````QF<```(``0!P50@``````"H`````
+M````U&<```(``0#P7P<``````+0!````````\&<```(``0!`(0@````````!
+M````````^V<```(``0`@*@@``````.@`````````$6@```(``0"`EP<`````
+M`!,!````````(V@```(``0`0*P@``````/,`````````/&@```(``0``-0@`
+M`````$T`````````36@```(``0"`:@<``````$8`````````6&@```(``0`P
+M+P@``````*\!````````:6@```(``0!@9P<``````'4`````````?F@```(`
+M`0!@3P@``````-X`````````C6@``!(``0!@,`<``````!,`````````MF@`
+M`!$`"P#&!@````````$`````````S6@``!``````````````````````````
+MYF@``!``````````````````````````[6@``!(``0``\@@``````!H`````
+M````!FD``!(``0!P4P@``````!4`````````'VD``!``````````````````
+M````````-&D``!(``0`@0`<``````"@`````````2&D``!(``0``50@`````
+M`#L`````````66D``!(``0!P-`<``````)<!````````<FD``!(``0#00P<`
+M`````(\`````````BVD``!``````````````````````````I6D``!(``0`0
+M4P@``````%<`````````P&D``!(``0"0,0<```````P`````````V6D``!(`
+M`0"`-P<``````)P`````````\FD``!``````````````````````````#VH`
+M`!(``0#`/P<``````%$`````````(&H``!``````````````````````````
+M)VH``!(``0`010<``````*P`````````/&H``!(``0!`-`<``````"<`````
+M````56H``!(``0"@/P<``````!X`````````:VH``!(``0`0-@<``````&(!
+M````````@VH``!(``0"02P@```````4!````````HFH``!$`"P"\!@``````
+M``0`````````NVH``!(``0#`2`@``````)<`````````UVH``!``````````
+M````````````````[FH``!(``0"@/@<``````%(`````````!FL``!(``0#P
+M9@<``````%0`````````(VL``!(``0#`)P@```````@`````````/VL``!(`
+M`0!`,`<``````!H`````````7FL``!``````````````````````````<FL`
+M`!(``0"P5`@``````$8`````````B6L``!$`"P"@!@````````@`````````
+MFVL``!(``0"P,0@```````L`````````MFL``!(``0"@0@<``````((`````
+M````S6L``!(``0`P[`@``````"$`````````YVL``!$`"P#'!@````````$`
+M`````````6P``!(``0"0+0@``````&D`````````&FP``!``````````````
+M````````````,VP``!(``0#@0`<``````#X`````````2&P``!$`"P"H!@``
+M``````@`````````66P``!(``0!@1`<``````*H`````````<VP``!(``0!0
+M0`<``````($`````````AFP``!(``0!09`@``````!H`````````H&P``!(`
+M`0`P(0@```````<`````````NFP``!``````````````````````````TVP`
+M`!(``0``(0@``````"H`````````Y6P``!$`"P#%!@````````$`````````
+M`VT``!``````````````````````````&&T``!``````````````````````
+M````+6T``!$`!P"A&@````````$`````````0VT``!(``0"`/P<``````!D`
+M````````:FT``!(``0#`,0@``````/P"````````>FT``!(``0!@/P<`````
+M`!D`````````F&T``!(``0``5P@``````!H`````````MFT``!``````````
+M````````````````T&T``!(``0``+@@``````%@`````````YVT``!(``0"`
+MQP$``````!H`````````!FX``!``````````````````````````'FX``!(`
+M`0!@20@``````(8`````````.VX``!(``0#`-`@``````#<`````````46X`
+M`!``````````````````````````8VX``!``````````````````````````
+M?&X``!(``0"@4P@``````!4`````````E6X``!``````````````````````
+M````JFX``!(``0!00P<```````\`````````R&X``!(``0!0,@<``````-8`
+M````````Y6X``!$`"P#`!@````````$`````````^FX``!(``0"`,`<`````
+M``P`````````%&\``!$`"P##!@````````$`````````,6\``!(``0"0.@@`
+M`````',"````````4V\``!(``0"04P@```````8`````````;V\``!(``0``
+M90<``````.D!````````B&\``!(``0"0,`<``````+L`````````H&\``!(`
+M`0"00P<``````#(`````````NV\``!``````````````````````````U&\`
+M`!(``0!0,0<``````#4`````````[F\``!``````````````````````````
+M!'```!(``0!P/@<``````"X`````````''```!(``0#P4@@``````!,`````
+M````/'```!(``0"`/`<``````.L`````````7G```!``````````````````
+M````````='```!``````````````````````````DW```!(``0`P0P<`````
+M`!<`````````KW```!(``0`@70@``````!H`````````R7```!``````````
+M````````````````WG```!(``0`0+0@``````'4`````````]W```!``````
+M````````````````````%'$``!(``0#@4@@```````(`````````*7$``!(`
+M`0!0-0@``````&,`````````0'$``!(``0#@E0,``````!H`````````7W$`
+M`!(``0"P80<``````)4`````````>7$``!(``0#`4@@``````!8`````````
+MF7$``!(``0`P,P<``````"L`````````R7$``!$`!P"@&@````````$`````
+M````YW$``!(``0!P/0<``````/X``````````'(``!(``0"0,0@``````!T`
+M````````%W(``!(``0``/P<``````%,`````````.'(``!``````````````
+M````````````47(``!(``0`@.P<``````%4!````````<'(``!(``0#`10<`
+M`````&@`````````AW(``!(``0``9`4``````!H`````````IG(``!(``0"`
+M.0@```````8!````````Q7(``!$`"P#$!@````````$`````````XG(``!(`
+M`0!PK@<``````&(``````````')R,C<R,%]305-?2&%N9&QE0V]M<&QE=&5D
+M0V]M;6%N9`!R<C(W,C!?4$U?1G)E95)E9VES=&5R4V5T`')R,C<R,%]#;W)E
+M7TUO9'5L95-T87)T`')R,C<R,%]#;W)E7TUO9'5L945N86)L941I<V%B;&5)
+M4E$`<V%S7VAA<VA?861D<@!-86ME071T1&5V26YF;P!R<C(W,C!?0V%T96=O
+M<GE?0T1"7U1Y<&4`<G(R-S(P7T9I;F1&<F5E4TU00V]N=&5X=`!R<C(W,C!?
+M;79?9&ES86)L95]X;70`<G(R-S(P7U)U;G1I;65)<W-U95-O9G1297-E=$-A
+M;&QB86-K`')R,C<R,%]$25-#7T=E=%)E<V]U<F-E`')R,C<R,%]3=&]R95]#
+M;VYF:6=2;W5T94EN9F\`<G(R-S(P7U5P9&%T95-T871U<U9S4V5S0V]N=')O
+M;$)U9F9E<@!!5$U%3%]34$E?0TU$7S0Q85\P,C$`<G(R-S(P7T-A;&-U;&%T
+M95)O=71E26YD97@`<G(R-S(P7U-'4$E/7U=R:71E4F5G:7-T97(`<G(R-S(P
+M7TU67T5Q=6%L<P!I,F-!7W=R:71E7V)Y=&5S`')R,C<R,%]#;W)E7TAA;F1L
+M95=A:71I;F=,:7-T`')R,C<R,%]O9&EN7W-E=%]I9&QE7W-T86YD8GD`<G(R
+M-S(P7TU67TUA<%1A<F=E=$E$`')R,C<R,%]$25-#7T-A;F-E;$1I<V-O=F5R
+M`')R,C<R,%]0;W-T36%K95-E<T-O;F9I9W5R871I;VY297%U97-T`')R,C<R
+M,%]31U!)3U]296%D4F5G:7-T97(`<G(R-S(P7T1E=FEC95]7<FET95-E<T-O
+M;G1R;VQ$:6%G`')R,C<R,%]31U!)3U]335!297%?0V%L;&)A8VL`3V1I;E-0
+M25]29'!T`')R,C<R,%]&:6QL16YC;&]S=7)E16QE;65N=%-T871U<P!R<C(W
+M,C!?17AP86YD97)?4TU04F5Q=65S=%]$:7-C;W9E<@!R<C(W,C!?0V]R95]-
+M;V1U;&5'971297-O=7)C95%U;W1A`')R,C<R,%]486=?27-%;7!T>0!R<C(W
+M,C!?;79?<F5S971?>&UT`')R,C<R,%]0;W)T7TAA;F1L941E=FEC95!L=6=I
+M;@!R<C(W,C!?4$U?0V]R95]297%4:6UE;W5T`')R,C<R,%]!5$%?0T1",E1A
+M<VM&:6QE`')R,C<R,%]?7V-A;F-E;%]T:6UE<@!R<C(W,C!?0V]R95]);G1E
+M<FYA;%-E;F1297%U97-T`')R,C<R,%]&<F5E1&5V:6-E5&]0;V]L`')R,C<R
+M,%]#;W)E7U)E<V5T0VUD4VQO=`!R<C(W,C!?4TU07U-'4$E/7U-E=%]&86EL
+M;&5D`')R,C<R,%]/9&EN4U!)7TEN:70`1&5V:6-E7TUA:V50<FEV871E4V5N
+M9%-E<U)E<75E<W0`<G(R-S(P7T1)4T-?1V5T5&=T1&5V36%P`$%S<VEG;D5L
+M96UE;D1E<V-R:7!T;W).86UE`')R,C<R,%]3051!7U!O<G1$971E8W0`1&5V
+M:6-E7TUA:V5397-%;&5M96YT4W1A='5S4F5Q=65S=%1I;65R`')R,C<R,%]'
+M971315-30D9R;VU0;V]L`')R,C<R,%]335!297-P3&5N9W1H`')R,C<R,%]3
+M05-?1&5V:6-E4W1A=&5-86-H:6YE`')R,C<R,%]&<F5E4T%405-C<F%T8VA4
+M;U!O;VP`<G(R-S(P7U]?861D7W1I;65R`')R,C<R,%]#3U)%7TES<W5E4TU0
+M4F5Q=65S=`!R<C(W,C!?4T%405]$979I8V53=&%T94UA8VAI;F4`<G(R-S(P
+M7U-!5$%?4$U);FET4F5Q0V%L;&)A8VL`<G(R-S(P7U!O<G1?06)O<G1297%U
+M97-T<P!R<C(W,C!?5W)I=&5$14Q67U%?16YT<GD`<')O9'5C=%]I9`!R<C(W
+M,C!?1$E30U]#:&5C:T1I<V-O=F5R4W1A=&4`<G(R-S(P7T-O<F5?36]D=6QE
+M4VAU=&1O=VX`<G(R-S(P7U-35%]34$E?0TU$`')R,C<R,%]0<F5P87)E1&5L
+M:79E<GE1=65U945N=')Y`&DR8T)?=W)I=&5?8GET97,`<G(R-S(P7T1)4T-?
+M4V5T4F5S;W5R8V4`<G(R-S(P7T=E=$Y#451A9P!R<C(W,C!?;79?96YA8FQE
+M7WAM=`!R<C(W,C!?4T537TEN=&5R;F%L4F5Q0V%L;&)A8VL`<G(R-S(P7U1A
+M9U]'971/;F4`<G(R-S(P7U1A9U]);FET7T9)1D\`<G(R-S(P7VUV7W-E=%]3
+M05-!9&1R`')R,C<R,%]&:6YD4G5N;FEN9U)E<4)Y5&%G`')R,C<R,%]'971-
+M:6Y.96=O=&EA=&5D3&EN:U)A=&4`<G(R-S(P7U-!5$%?4&]R=$1E=FEC941E
+M=&5C=&5D`')R,C<R,%]$979I8V5?27-S=653;V9T4F5S970`<G(R-S(P7U!O
+M<G1?1FEN9%1G=$YO`')R,C<R,%]$979I8V5?36%K94EN<75I<GE487-K4F5Q
+M=65S=`!R<C(W,C!?1G)E94EN=&5R;F%L4F5Q5&]0;V]L`')R,C<R,%]0<F5%
+M;7!T>41E=FEC90!R<C(W,C!?0V]M<&QE=&5297%U97-T06YD4VQO=`!R<C(W
+M,C!?1V5T26YT97)N86Q297%&<F]M4&]O;`!I,F-!7W)E861?8GET97,`86EN
+M9F\`;V1I;E]C;W)E7W1I;65R`')R,C<R,%]3051!7U!-7TAA;F1L941E=FEC
+M95!L=6=I;@!724Y"3TY$7U-025]#340`<G(R-S(P7U5P9&%T951A<F=E=$1E
+M=FEC97,`<G(R-S(P7VUV7W)E<V5T7W!H>0!R<C(W,C!?5&%G7TEN:70`<G(R
+M-S(P7U-#4TE?5&]?1DE3`')R,C<R,%]-5E]3971,0D%A;F1396-T;W)#;W5N
+M=`!R<C(W,C!?07-S:6=N4F5G:7-T97)3970`<G(R-S(P7VUO9&5086=E0G5F
+M`')R,C<R,%]30U-)7T%405]3=&%R=%-T;W!4<F%N<VQA=&EO;@!R<C(W,C!?
+M0F5E<$]F9@!R<C(W,C!?57!D871E4&AY26YF;P!R<C(W,C!?1V5T4T%405-C
+M<F%T8VA&<F]M4&]O;`!R<C(W,C!?4T%44V5N<V5$871A`&UV7W!H>5]R97-E
+M=`!R<C(W,C!?1V5T36%X3F5G;W1I871E9$QI;FM2871E`')R,C<R,%]%>'!A
+M;F1E<E]335!297%U97-T7U)E<&]R=$=E;F5R86P`<G(R-S(P7U)E;6]V941E
+M=FEC90!R<C(W,C!?4T-325]!5$%?3&]W97)7;W)D`')R,C<R,%]S971?9F%I
+M;%]L960`<G(R-S(P7TU67T-20P!R<C(W,C!?0V]R95)E<W1O<F5/<FEG:6YA
+M;$-$0@!R<C(W,C!?1G)E94-O<F5#;VYT97AT5&]0;V]L`')R,C<R,%]697)I
+M9GE#;VUM86YD0F5F;W)E4V5N9&EN9P!R<C(W,C!?1G)E95)E9VES=&5R4V5T
+M`')R,C<R,%],:7-T7T=E=$QA<W0`<G(R-S(P7TES<W5E7T-O;F9I9U)O=71E
+M26YF;P!R<C(W,C!?4T%405]0;W)T2&%N9&QE26YT97)R=7!T`')R,C<R,%]#
+M;W)E7T=E=%-U<'!O<G1E9$-O=6YT<P!R<C(W,C!?5&%G7U)E;&5A<V5/;F4`
+M<G(R-S(P7U-!5$%?4$U(;W1P;'5G4F5Q0V%L;&)A8VL`<G(R-S(P7TU67TUA
+M<%1O4W!E8VEF:6-487)G971)1`!R<C(W,C!?07-S:6=N16QE;65N=%-L;W1.
+M=6UB97(`4T537U!R:79A=&5297%#86QL8F%C:P!R<C(W,C!?27-S=65?4F5P
+M;W)T36%N=69A8W1U<F5R26YF;W)M871I;VX`<G(R-S(P7T9I;F1!<V-I:4YU
+M;6)E<@!R<C(W,C!?1&ES8V]V97)Y0V%L;$)A8VL`<G(R-S(P7U-#4TE?36%K
+M94-A8VAE0V]M;6%N9`!R<C(W,C!?0VAE8VM487)G971#:&%N9V4`<G(R-S(P
+M7TU67T=E=$UA<'!E9$E$`')R,C<R,%]3051!7U!-4W1A=&5-86-H:6YE`')R
+M,C<R,%]#:&5C:T1E=FEC94-H86YG90!R<C(W,C!?4T=024]?4TU04F5Q=65S
+M=%]7<FET90!R<C(W,C!?4T-325]!5$%?0VAE8VM#;VYD:71I;VX`<G(R-S(P
+M7U-#4TE?051!7U-Y;F-#86-H951R86YS;&%T:6]N`')R,C<R,%]'9710;W)T
+M1G)O;5!O;VP`<G(R-S(P7T%S<VEG;D1E=FEC94]V97)A;&Q%;&5M96YT3G5M
+M8F5R`$%S<VEG;E-E<T]T:&5R16QE;65N=$]V97)A;&Q%;&5M96YT3G5M8F5R
+M`')R,C<R,%](86YD;&5#;VUM86YD475E=64`<G(R-S(P7W-E=%]F86EL7VQE
+M9',`<G(R-S(P7U-!5$%?4$U?17)R;W)(86YD;&EN9P!R<C(W,C!?1G)E95!-
+M5&]0;V]L`')R,C<R,%]&<F5E4TU00V]N=&5X=`!R<C(W,C!?8V]R95]H86YD
+M;&5?=&%S:V9I;&5?97)R;W(`<G(R-S(P7U!O<W1-86ME4V5S16YC;&]S=7)E
+M4W1A='5S4F5Q=65S=`!R<C(W,C!?1V5T1&5V:6-E1G)O;5!O;VP`<&]R=%]S
+M971?9F%I;%]L960`<G(R-S(P7U!-7TES<W5E5W)I=&5296<`<G(R-S(P7T-O
+M<F53879E3W)I9VEN86Q#1$(`<G(R-S(P7T=E=%--4%-C<F%T8VA&<F]M4&]O
+M;`!R<C(W,C!?4T537U-E=$9A:6Q,960`4&]R=$UA<%]24C(W,3$`<G(R-S(P
+M7T9R965%>'!A;F1E<E1O4&]O;`!R<C(W,C!?1&5V:6-E7TUA:V53=&%R=%-T
+M;W!5;FET4F5Q=65S=`!R<C(W,C!?1$E30U]'971.96=O=&EA=&5D3&EN:U)A
+M=&4`<G(R-S(P7U!O<W1-86ME4V5S16QE;65N=%-T871U<U)E<75E<W0`<G(R
+M-S(P7TES<W5E7T1I<V-O=F5R`')R,C<R,%]30U-)7T%405]&:6QL3$)!0V1B
+M,38`<G(R-S(P7U-#4TE?051!7T9I;&Q,0D%#9&(Q,`!R<C(W,C!?359?26YI
+M=&EA;&EZ951A<F=E=$E$5&%B;&4`<G(R-S(P7U!-7TES<W5E4F5A9%)E9P!R
+M<C(W,C!?4T%405]0;W)T4F5S970`<G(R-S(P7U!-7T%S<VEG;E)E9VES=&5R
+M4V5T`')R,C<R,%]?7W)E;F5W7W1I;65R`')R,C<R,%]0<F5P87)E06YD4V5N
+M9$-O;6UA;F0`<G(R-S(P7T9R965335!38W)A=&-H5&]0;V]L`')R,C<R,%]0
+M;W)T7TES4F5Q=65S=%)U;FYI;F<`<G(R-S(P7T1E=&5C=%!O<G14>7!E`')R
+M,C<R,%]30U-)7T%405]5<'!E<E=O<F0`<G(R-S(P7U-!5$%?17)R;W)(86YD
+M;&EN9P!R<C(W,C!?359?1'5M<%)E9VES=&5R`')R,C<R,%]305-?17)R;W)(
+M86YD;&EN9P!R<C(W,C!?1&5V:6-E7U!A<G-E261E;G1I9GE$871A`')R,C<R
+M,%]-5E]:97)O379297%U97-T`')R,C<R,%])<W-U95]297!O<G12;W5T94EN
+M9F\`<G(R-S(P7U5P9&%T951G=$1E=DUA<`!R<C(W,C!?;V1I;E]R96UO=F5?
+M9&5V:6-E`')R,C<R,%]3051!7U!O<G1$979I8V5296%D>0!R<C(W,C!?3&ES
+M=%]'971&:7)S=`!R<C(W,C!?1G)E95!O<G14;U!O;VP`<G(R-S(P7T=E=$]N
+M94-O;6UA;F13;&]T`')R,C<R,%]'9710341E=FEC90!R<C(W,C!?17AP86YD
+M97)?4TU04F5Q=65S=%]297!O<G102%E3051!`')R,C<R,%]$979I8V5?36%K
+M95)E861#87!A8VET>3$V5&%S:U)E<75E<W0`<G(R-S(P7T1I<V-O=F5R>5--
+M`')R,C<R,%]D=6UP7W5N87-S;V-I871E9%]F:7,`36%K941E=DEN9F\`<G(R
+M-S(P7U-!4U](86YD;&5"4D1#4U0`<G(R-S(P7T9R965315-30E1O4&]O;`!$
+M979I8V5?36%K95!R:79A=&5296-V4V5S4F5Q=65S=`!R<C(W,C!?4T%37U!O
+M<G1297-E=`!R<C(W,C!?4T%405]035](86YD;&5$979I8V55;G!L=6<`<G(R
+M-S(P7T9R96531T)U9F9E<E1O4&]O;`!R<C(W,C!?4T=024]?26YI=&EA;&EZ
+M90!C:&5C:U]387-!9&1R`')R,C<R,%]-5E]$=6UP4F5Q=65S=`!R<C(W,C!?
+M1V5T17AP86YD97)&<F]M4&]O;`!R<C(W,C!?4T%405]0<F5P87)E0V]M;6%N
+M9%1A8FQE`')R,C<R,%]"965P3VX`<G(R-S(P7U-'5&%B;&5?07!P96YD`')R
+M,C<R,%]#;W)E7TEN=&5R<G5P=%-E<G9I8V52;W5T:6YE`$1E=FEC95]497-T
+M56YI=%)E861Y4F5Q=65S=`!R<C(W,C!?4T-325]!5$%?4F5A9%=R:71E5')A
+M;G-L871I;VX`<G(R-S(P7T-O<F5?36]D=6QE4V5N9%)E<75E<W0`<G(R-S(P
+M7U-!5$%?2&%N9&QE1&5V:6-E4&QU9VEN`')R,C<R,%]'97131T)U9F9E<D9R
+M;VU0;V]L`')R,C<R,%]#;W)E7T9I;&Q396YS941A=&$`<G(R-S(P7T%4345,
+M7U-025]#340`<G(R-S(P7T1E=FEC95]-86ME36]D95-E;G-E4F5Q=65S=`!R
+M<C(W,C!?1V5T4$U&<F]M4&]O;`!/9&EN4U!)7U-E8W1O<E5N<')O=&5C=`!R
+M<C(W,C!?1&5V:6-E7TUA:V5297%U97-T5&%S:U)E<75E<W0`<G(R-S(P7U-#
+M4TE?051!7U)E861#87!A8VET>51R86YS;&%T:6]N0V%L;&)A8VL`<G(R-S(P
+M7T1E=FEC95]-86ME36]D95-E;&5C=%)E<75E<W0`<G(R-S(P7U!R945M<'1Y
+M4$T`1V5T071T261E;G1I9GE&<F%M90!315-4:6UE<E]);G1E<FYA;%)E<4-A
+M;&QB86-K`')R,C<R,%]35%!?1&5V:6-E4F5S970`<G(R-S(P7U-#4TE?051!
+M7T9I;&Q$871A1FEE;&0`<G(R-S(P7T=E=$-O<F5#;VYT97AT1G)O;5!O;VP`
+M<G(R-S(P7U-#4TE?36%K94UO9&5086=E0V%C:&EN9P!R<C(W,C!?;V1I;E]S
+M971?<W!I;E]U<%]M;V1E`')R,C<R,%]31U1A8FQE7TEN:70`<G(R-S(P7U)U
+M;G1I;65)<W-U95-O9G1297-E=`!O9&EN7W-E=%]H87)D7V1I<VM?:61E;G1I
+M9GD`<G(R-S(P7U!O<G1?2&%N9&QE4&QU9VEN`')R,C<R,%]O9&EN7V9L87-H
+M7V%C8V5S<P!R<C(W,C!?9&5V:6-E7W!R;V)E7V1O;F4`1V5T1&5V261E;G1I
+M9GE&<F%M90!R<C(W,C!?4&]S=$UA:V5397-%;&5M96YT1&5S8W)I<'1O<E)E
+M<75E<W0`<G(R-S(P7U!O<G1?36]N:71O<@!I,F-"7W)E861?8GET97,`<G(R
+M-S(P7T1E=FEC95]-86ME4F5A9$-A<&%C:71Y5&%S:U)E<75E<W0`<V%S7V%D
+M9')E<W-?8V]U;G0`<G(R-S(P7U-E<G9I8V5);G1E<G)U<'0`<G(R-S(P7U-!
+M5$%?2&%N9&QE1&5V:6-E56YP;'5G`')R,C<R,%]31U1A8FQE7T%V86EL86)L
+M90!R<C(W,C!?4T%37TEN=&5R;F%L4F5Q0V%L;&)A8VL`<G(R-S(P7U]?4$U?
+M8V%N8V5L7W1I;65R`')R,C<R,%]-5E]#;W!Y4T=486)L90!R<C(W,C!?0V]R
+M95]-86ME1&5V:6-E4F5S971297$`<G(R-S(P7VUV7V1I<V%B;&5?<F5G:7-T
+M97)?<V5T`')R,C<R,%]#;VUP;&5T95)E<75E<W0`<G(R-S(P7U-'4$E/7U--
+M4%)E<75E<W1?4F5A9`!R<C(W,C!?4T-325]!5$%?4F5A9$-A<&%C:71Y5')A
+M;G-L871I;VX`<G(R-S(P7T5X<&%N9&5R7U--4%)E<5]#86QL8F%C:P!R<C(W
+M,C!?1$E30U]$;T1I<V-O=F5R`')R,C<R,%]31U!)3U]3971?1F%I;&QE9`!R
+M<C(W,C!?4&]R=%]3;V9T4F5S971#86QL8F%C:P!R<C(W,C!?4&]R=%](86YD
+M;&55;G!L=6<`<G(R-S(P7T-O<F5?4F5Q5&EM96]U=`!R<C(W,C!?07-S:6=N
+M1&5V:6-E16QE;65N=$YU;6)E<@!R<C(W,C!?17AP86YD97)?4TU04F5Q=65S
+M=%]0:'E#;VYT<F]L`')R,C<R,%]3051!7U!R97!A<F5#;VUM86YD2&5A9&5R
+M`')R,C<R,%]I,F-?<F5S970`<G(R-S(P7U)U;G1I;65)<W-U95)E861,;V=%
+M>'0`<G(R-S(P7VUV0VAA;FYE;%-T871E36%C:&EN90!R<C(W,C!?;V1I;E]I
+M;V-T;`!R<C(W,C!?0V]R95]-;V1U;&5);FET:6%L:7IE`')R,C<R,%]-5E]2
+M96UO=F5487)G971)1`!R<C(W,C!?0V]R95]P87-S7W1H<G5?9FEL;%]T87-K
+M9FEL90!R<C(W,C!?27-S=65?4F5P;W)T1V5N97)A;`!R<C(W,C!?23)#7TUO
+M9'5L94EN:71I86QI>F4`<G(R-S(P7U-#4TE?051!7U9E<FEF>51R86YS;&%T
+M:6]N`')R,C<R,%]&:6YD5&=T3F\`<G(R-S(P7T1E=FEC95]-86ME4V5S4F-V
+M1&EA9U)E<75E<W0`<G(R-S(P7U5P9&%T95=I9&50;W)T4&AY36%P`')R,C<R
+M,%]M=E]D:7-A8FQE7VAB80!R<C(W-GA?4')E<&%R94%N9%-E;F1#;VUM86YD
+M`')R,C<V>%]#;W)E7TUO9'5L94=E=%)E<V]U<F-E475O=&$`<G(R-S9X7T5X
+M<&%N9&5R7U--4%)E<75E<W1?4&AY0V]N=')O;`!R<C(W-GA?;79?<F5S971?
+M>&UT`')R,C<V>%]0;W)T7T%B;W)T4F5Q=65S=',`<G(R-S9X7U!O<G1?4V]F
+M=%)E<V5T0V%L;&)A8VL`<G(R-S9X7T9R965315-30E1O4&]O;`!R<C(W-GA?
+M0V]R95]P87-S7W1H<G5?9FEL;%]T87-K9FEL90!R<C(W-GA?4T-325]!5$%?
+M4WEN8T-A8VAE5')A;G-L871I;VX`<G(R-S9X7TES<W5E7T-O;F9I9U)O=71E
+M26YF;P!R<C(W-GA?4TU07U-'4$E/7U-E=%]&86EL;&5D`')R,C<V>%]305-?
+M17)R;W)(86YD;&EN9P!R<C(W-GA?4&]R=%])<U)E<75E<W12=6YN:6YG`')R
+M,C<V>%]$25-#7T=E=%)E<V]U<F-E`')R,C<V>%]#;W)E7T=E=%-U<'!O<G1E
+M9$-O=6YT<P!R<C(W-GA?359?1'5M<%)E9VES=&5R`')R,C<V>%]30U-)7T%4
+M05]#:&5C:T-O;F1I=&EO;@!R<C(W-GA?4T%37TAA;F1L94)21$-35`!R<C(W
+M-GA?4G5N=&EM94ES<W5E4F5A9$QO9T5X=`!R<C(W-GA?4T%37T1E=FEC95-T
+M871E36%C:&EN90!R<C(W-GA?1&5V:6-E7TES<W5E4V]F=%)E<V5T`')R,C<V
+M>%]!5$U%3%]34$E?0TU$`')R,C<V>%]0;W)T7TAA;F1L955N<&QU9P!R<C(W
+M-GA?4T-325]!5$%?4F5A9%=R:71E5')A;G-L871I;VX`<G(R-S9X7T-A;&-U
+M;&%T95)O=71E26YD97@`<G(R-S9X7T9R96531T)U9F9E<E1O4&]O;`!R<C(W
+M-GA?9'5M<%]U;F%S<V]C:6%T961?9FES`')R,C<V>%]486=?26YI=`!R<C(W
+M-GA?1&5V:6-E7TUA:V5-;V1E4V5L96-T4F5Q=65S=`!R<C(W-GA?4$U?27-S
+M=657<FET95)E9P!R<C(W-GA?4T-325]!5$%?1FEL;$Q"04-D8C$P`')R,C<V
+M>%]31U!)3U]335!297%U97-T7U)E860`<G(R-S9X7T]D:6Y34$E?26YI=`!R
+M<C(W-GA?1G)E95)E9VES=&5R4V5T`')R,C<V>%]486=?4F5L96%S94]N90!R
+M<C(W-GA?07-S:6=N1&5V:6-E3W9E<F%L;$5L96UE;G1.=6UB97(`<G(R-S9X
+M7V]D:6Y?<V5T7W-P:6Y?=7!?;6]D90!R<C(W-GA?1G)E941E=FEC951O4&]O
+M;`!R<C(W-GA?;79?96YA8FQE7WAM=`!R<C(W-GA?4T-325]!5$%?4F5A9$-A
+M<&%C:71Y5')A;G-L871I;VY#86QL8F%C:P!R<C(W-GA?1&5V:6-E7U!A<G-E
+M261E;G1I9GE$871A`')R,C<V>%]31U1A8FQE7T%V86EL86)L90!R<C(W-GA?
+M4T=024]?5W)I=&5296=I<W1E<@!R<C(W-GA?359?0U)#`')R,C<V>%]$979I
+M8V5?36%K94EN<75I<GE487-K4F5Q=65S=`!R<C(W-GA?4T=024]?4V5T7T9A
+M:6QL960`<G(R-S9X7U5P9&%T95!H>4EN9F\`<G(R-S9X7U-!5$%?4')E<&%R
+M94-O;6UA;F1(96%D97(`<G(R-S9X7T9R9650351O4&]O;`!R<C(W-GA?;V1I
+M;E]I;V-T;`!R<C(W-GA?0VAE8VM$979I8V5#:&%N9V4`<G(R-S9X7U!O<W1-
+M86ME4V5S16YC;&]S=7)E4W1A='5S4F5Q=65S=`!R<C(W-GA?57!D871E5&%R
+M9V5T1&5V:6-E<P!R<C(W-GA?9&5V:6-E7W!R;V)E7V1O;F4`<G(R-S9X7T-O
+M<F5?4F5Q5&EM96]U=`!R<C(W-GA?1&5V:6-E7TUA:V5397-28W9$:6%G4F5Q
+M=65S=`!R<C(W-GA?0F5E<$]F9@!R<C(W-GA?1V5T1&5V:6-E1G)O;5!O;VP`
+M<G(R-S9X7U1A9U])<T5M<'1Y`')R,C<V>%]5<&1A=&57:61E4&]R=%!H>4UA
+M<`!R<C(W-GA?;V1I;E]S971?:61L95]S=&%N9&)Y`')R,C<V>%]&<F5E0V]R
+M94-O;G1E>'14;U!O;VP`<G(R-S9X7T-O<F5?36]D=6QE26YI=&EA;&EZ90!R
+M<C(W-GA?57!D871E4W1A='5S5G-397-#;VYT<F]L0G5F9F5R`')R,C<V>%]0
+M;W)T7TUO;FET;W(`<G(R-S9X7U-!4U]);G1E<FYA;%)E<4-A;&QB86-K`')R
+M,C<V>%]30U-)7TUA:V5#86-H94-O;6UA;F0`<G(R-S9X7U-35%]34$E?0TU$
+M`')R,C<V>%]035]#;W)E7U)E<51I;65O=70`7V]D:6Y?8VAE8VM?;G9R86T`
+M<G(R-S9X7T1E=FEC95]-86ME4F5A9$-A<&%C:71Y,39487-K4F5Q=65S=`!R
+M<C(W-GA?1&5V:6-E7U=R:71E4V5S0V]N=')O;$1I86<`<G(R-S9X7T9I;F12
+M=6YN:6YG4F5Q0GE486<`<G(R-S9X7TU67T1U;7!297%U97-T`')R,C<V>%]3
+M051!7U!-7TAA;F1L941E=FEC95!L=6=I;@!R<C(W-GA?8V]R95]H86YD;&5?
+M=&%S:V9I;&5?97)R;W(`<G(R-S9X7U-#4TE?5&]?1DE3`')R,C<V>%]'9710
+M341E=FEC90!R<C(W-GA?4T%405]0<F5P87)E0V]M;6%N9%1A8FQE`')R,C<V
+M>%]-5E]-87!4;U-P96-I9FEC5&%R9V5T240`<G(R-S9X7T1E=FEC95]-86ME
+M4F5Q=65S=%1A<VM297%U97-T`')R,C<V>%]30U-)7T%405]&:6QL1&%T849I
+M96QD`')R,C<V>%]'97131T)U9F9E<D9R;VU0;V]L`')R,C<V>%]30U-)7T%4
+M05]697)I9GE4<F%N<VQA=&EO;@!R<C(W-GA?4')E16UP='E$979I8V4`<G(R
+M-S9X7T=E=$UA>$YE9V]T:6%T961,:6YK4F%T90!R<C(W-GA?1V5T4&]R=$9R
+M;VU0;V]L`')R,C<V>%]O9&EN7V9L87-H7V%C8V5S<P!R<C(W-GA?1V5T17AP
+M86YD97)&<F]M4&]O;`!R<C(W-GA?4T%405]0;W)T1&5T96-T`')R,C<V>%]-
+M5E]-87!487)G971)1`!R<C(W-GA?1V5T3VYE0V]M;6%N9%-L;W0`<G(R-S9X
+M7U5P9&%T951G=$1E=DUA<`!R<C(W-GA?5&%G7TEN:71?1DE&3P!R<C(W-GA?
+M17AP86YD97)?4TU04F5Q=65S=%]297!O<G102%E3051!`')R,C<V>%]),D-?
+M36]D=6QE26YI=&EA;&EZ90!R<C(W-GA?;79?<F5S971?<&AY`')R,C<V>%]$
+M979I8V5?36%K95-T87)T4W1O<%5N:71297%U97-T`')R,C<V>%]"965P3VX`
+M<G(R-S9X7T9R9653051!4V-R871C:%1O4&]O;`!R<C(W-GA?4T%405]0;W)T
+M4F5S970`<G(R-S9X7VUV7W-E=%]305-!9&1R`')R,C<V>%]3051!7TAA;F1L
+M941E=FEC955N<&QU9P!R<C(W-GA?4T=486)L95]);FET`')R,C<V>%]#;W)E
+M7TAA;F1L95=A:71I;F=,:7-T`')R,C<V>%]&<F5E4TU04V-R871C:%1O4&]O
+M;`!R<C(W-GA?4T=024]?4TU04F5Q7T-A;&QB86-K`')R,C<V>%]'971#;W)E
+M0V]N=&5X=$9R;VU0;V]L`')R,C<V>%]$:7-C;W9E<GE#86QL0F%C:P!R<C(W
+M-GA?5&%G7T=E=$]N90!R<C(W-GA?4T-325]!5$%?1FEL;$Q"04-D8C$V`')R
+M,C<V>%]697)I9GE#;VUM86YD0F5F;W)E4V5N9&EN9P!R<C(W-GA?2&%N9&QE
+M0V]M;6%N9%%U975E`')R,C<V>%]3051!7U!-7T5R<F]R2&%N9&QI;F<`<G(R
+M-S9X7TQI<W1?1V5T3&%S=`!R<C(W-GA?359?26YI=&EA;&EZ951A<F=E=$E$
+M5&%B;&4`<G(R-S9X7U!O<W1-86ME4V5S16QE;65N=%-T871U<U)E<75E<W0`
+M<G(R-S9X7T9I;F1&<F5E4TU00V]N=&5X=`!R<C(W-GA?1$E30U]3971297-O
+M=7)C90!R<C(W-GA?1V5T4TU04V-R871C:$9R;VU0;V]L`')R,C<V>%]#;W)E
+M7U)E<V5T0VUD4VQO=`!R<C(W-GA?4&]S=$UA:V5397-%;&5M96YT1&5S8W)I
+M<'1O<E)E<75E<W0`<G(R-S9X7T-O<F5?26YT97)N86Q396YD4F5Q=65S=`!R
+M<C(W-GA?7U]C86YC96Q?=&EM97(`<G(R-S9X7T5X<&%N9&5R7U--4%)E<75E
+M<W1?4F5P;W)T1V5N97)A;`!R<C(W-GA?17AP86YD97)?4TU04F5Q7T-A;&QB
+M86-K`')R,C<V>%]?7V%D9%]T:6UE<@!R<C(W-GA?27-S=65?4F5P;W)T1V5N
+M97)A;`!R<C(W-GA?359?6F5R;TUV4F5Q=65S=`!R<C(W-GA?051!7T-$0C)4
+M87-K1FEL90!R<C(W-GA?1$E30U]'971.96=O=&EA=&5D3&EN:U)A=&4`<G(R
+M-S9X7U-!5$%?4&]R=$AA;F1L94EN=&5R<G5P=`!R<C(W-GA?1&ES8V]V97)Y
+M4TT`<G(R-S9X7U!-7T%S<VEG;E)E9VES=&5R4V5T`')R,C<V>%]3051!7U!-
+M7TAA;F1L941E=FEC955N<&QU9P!R<C(W-GA?;79?9&ES86)L95]X;70`<G(R
+M-S9X7U--4%)E<W!,96YG=&@`<G(R-S9X7T=E=$Y#451A9P!R<C(W-GA?359?
+M17%U86QS`')R,C<V>%]035]&<F5E4F5G:7-T97)3970`<G(R-S9X7T5X<&%N
+M9&5R7U--4%)E<75E<W1?1&ES8V]V97(`<G(R-S9X7T1E=&5C=%!O<G14>7!E
+M`')R,C<V>%]#;W)E4F5S=&]R94]R:6=I;F%L0T1"`')R,C<V>%]315-?4V5T
+M1F%I;$QE9`!R<C(W-GA?4G5N=&EM94ES<W5E4V]F=%)E<V5T`')R,C<V>%]3
+M051!7U!-2&]T<&QU9U)E<4-A;&QB86-K`')R,C<V>%]'971-:6Y.96=O=&EA
+M=&5D3&EN:U)A=&4`<G(R-S9X7U)U;G1I;65)<W-U95-O9G1297-E=$-A;&QB
+M86-K`')R,C<V>%]'9710349R;VU0;V]L`')R,C<V>%]0<F5P87)E1&5L:79E
+M<GE1=65U945N=')Y`')R,C<V>%]3=&]R95]#;VYF:6=2;W5T94EN9F\`<G(R
+M-S9X7T-O<F5?26YT97)R=7!T4V5R=FEC95)O=71I;F4`<G(R-S9X7T9R9650
+M;W)T5&]0;V]L`')R,C<V>%]#;W)E7TUO9'5L95-E;F1297%U97-T`')R,C<V
+M>%]#;VUP;&5T95)E<75E<W1!;F13;&]T`')R,C<V>%]!<W-I9VY%;&5M96YT
+M4VQO=$YU;6)E<@!R<C(W-GA?07-S:6=N4F5G:7-T97)3970`<G(R-S9X7TU6
+M7U)E;6]V951A<F=E=$E$`')R,C<V>%]$979I8V5?36%K95)E861#87!A8VET
+M>51A<VM297%U97-T`')R,C<V>%]35%!?1&5V:6-E4F5S970`<G(R-S9X7T-O
+M<F5?36]D=6QE4VAU=&1O=VX`<G(R-S9X7TU67U-E=$Q"06%N9%-E8W1O<D-O
+M=6YT`')R,C<V>%]3051!7TAA;F1L941E=FEC95!L=6=I;@!R<C(W-GA?4F5M
+M;W9E1&5V:6-E`')R,C<V>%]S971?9F%I;%]L961S`')R,C<V>%]!<W-I9VY$
+M979I8V5%;&5M96YT3G5M8F5R`')R,C<V>%]305-?2&%N9&QE0V]M<&QE=&5D
+M0V]M;6%N9`!R<C(W-GA?3&ES=%]'971&:7)S=`!R<C(W-GA?27-S=65?4F5P
+M;W)T36%N=69A8W1U<F5R26YF;W)M871I;VX`<G(R-S9X7U-!5$%?4$U);FET
+M4F5Q0V%L;&)A8VL`<G(R-S9X7U=R:71E1$5,5E]17T5N=')Y`')R,C<V>%]&
+M<F5E4TU00V]N=&5X=`!R<C(W-GA?1$E30U]$;T1I<V-O=F5R`')R,C<V>%]?
+M7U!-7V-A;F-E;%]T:6UE<@!R<C(W-GA?;V1I;E]R96UO=F5?9&5V:6-E`')R
+M,C<V>%]0<F5%;7!T>5!-`')R,C<V>%]'971);G1E<FYA;%)E<49R;VU0;V]L
+M`')R,C<V>%]S971?9F%I;%]L960`<G(R-S9X7U-'4$E/7TEN:71I86QI>F4`
+M<G(R-S9X7U-#4TE?051!7U5P<&5R5V]R9`!R<C(W-GA?1G)E94EN=&5R;F%L
+M4F5Q5&]0;V]L`')R,C<V>%]#;W)E7TUO9'5L95-T87)T`')R,C<V>%]$25-#
+M7T-A;F-E;$1I<V-O=F5R`')R,C<V>%]3051!7T5R<F]R2&%N9&QI;F<`<G(R
+M-S9X7T-O<F5?36%K941E=FEC95)E<V5T4F5Q`')R,C<V>%]305-?4&]R=%)E
+M<V5T`')R,C<V>%]$979I8V5?36%K94UO9&5396YS95)E<75E<W0`<G(R-S9X
+M7U-%4U]);G1E<FYA;%)E<4-A;&QB86-K`%]O9&EN7V-H96-K7VQP8P!R<C(W
+M-GA?4T%44V5N<V5$871A`')R,C<V>%]-5E]#;W!Y4T=486)L90!R<C(W-GA?
+M1FEN9$%S8VEI3G5M8F5R`')R,C<V>%])<W-U95]$:7-C;W9E<@!R<C(W-GA?
+M4V5R=FEC94EN=&5R<G5P=`!R<C(W-GA?4T%405]035-T871E36%C:&EN90!R
+M<C(W-GA?4T%405]$979I8V53=&%T94UA8VAI;F4`<G(R-S9X7U-!5$%?4&]R
+M=$1E=FEC95)E861Y`')R,C<V>%]?7W)E;F5W7W1I;65R`')R,C<V>%]#;VUP
+M;&5T95)E<75E<W0`<G(R-S9X7U!O<W1-86ME4V5S0V]N9FEG=7)A=&EO;E)E
+M<75E<W0`<G(R-S9X7T9R965%>'!A;F1E<E1O4&]O;`!R<C(W-GA?1$E30U]'
+M97149W1$979-87``<G(R-S9X7U-#4TE?051!7TQO=V5R5V]R9`!R<C(W-GA?
+M4&]R=%]&:6YD5&=T3F\`<G(R-S9X7T1)4T-?0VAE8VM$:7-C;W9E<E-T871E
+M`')R,C<V>%]&:6YD5&=T3F\`<G(R-S9X7T-O<F5?1FEL;%-E;G-E1&%T80!R
+M<C(W-GA?4&]R=%](86YD;&5$979I8V50;'5G:6X`<G(R-S9X7T=E=%-%4U-"
+M1G)O;5!O;VP`<G(R-S9X7T-O<F5?36]D=6QE16YA8FQE1&ES86)L94E240!R
+M<C(W-GA?0V]R95-A=F5/<FEG:6YA;$-$0@!R<C(W-GA?27-S=65?4F5P;W)T
+M4F]U=&5);F9O`')R,C<V>%]31U!)3U]335!297%U97-T7U=R:71E`')R,C<V
+M>%]M=E]D:7-A8FQE7VAB80!R<C(W-GA?4T=486)L95]!<'!E;F0`<G(R-S9X
+M7VUO9&5086=E0G5F`')R,C<V>%]31U!)3U]296%D4F5G:7-T97(`<G(R-S9X
+M7VUV7V1I<V%B;&5?<F5G:7-T97)?<V5T`')R,C<V>%]0;W)T7TAA;F1L95!L
+M=6=I;@!R<C(W-GA?1V5T4T%405-C<F%T8VA&<F]M4&]O;`!R<C(W-GA?359?
+M1V5T36%P<&5D240`<G(R-S9X7VUV0VAA;FYE;%-T871E36%C:&EN90!R<C(W
+M-GA?0VAE8VM487)G971#:&%N9V4`<G(R-S9X7VDR8U]R97-E=`!R<C(W-GA?
+M4T-325]!5$%?4F5A9$-A<&%C:71Y5')A;G-L871I;VX`<G(R-S9X7T-/4D5?
+M27-S=65335!297%U97-T`')R,C<V>%]3051!7U!O<G1$979I8V5$971E8W1E
+M9`!R<C(W-GA?4T-325]!5$%?4W1A<G13=&]P5')A;G-L871I;VX`<G(R-S9X
+M7U!-7TES<W5E4F5A9%)E9P!R<C(W-GA?1FEL;$5N8VQO<W5R945L96UE;G13
+M=&%T=7,`<G(R-S9X7U-#4TE?36%K94UO9&5086=E0V%C:&EN9P!R<C(W-GA?
+M0V%T96=O<GE?0T1"7U1Y<&4`<G(R-SAX7T-O<F5?26YT97)N86Q396YD4F5Q
+M=65S=`!R<C(W.'A?4T%37U!O<G1297-E=`!R<C(W.'A?1&ES8V]V97)Y4TT`
+M<G(R-SAX7U-!5$%?4&]R=$AA;F1L94EN=&5R<G5P=`!R<C(W.'A?0T]215])
+M<W-U95--4%)E<75E<W0`<G(R-SAX7U-#4TE?051!7U-Y;F-#86-H951R86YS
+M;&%T:6]N`')R,C<X>%]3=&]R95]#;VYF:6=2;W5T94EN9F\`<G(R-SAX7TU6
+M7UIE<F]-=E)E<75E<W0`<G(R-SAX7T-O<F5?1V5T4W5P<&]R=&5D0V]U;G1S
+M`')R,C<X>%]'9710;W)T1G)O;5!O;VP`<G(R-SAX7U-'5&%B;&5?079A:6QA
+M8FQE`')R,C<X>%]'971%>'!A;F1E<D9R;VU0;V]L`')R,C<X>%]&<F5E4T53
+M4T)4;U!O;VP`<G(R-SAX7U!O<W1-86ME4V5S16QE;65N=$1E<V-R:7!T;W)2
+M97%U97-T`')R,C<X>%]$:7-C;W9E<GE#86QL0F%C:P!R<C(W.'A?4$U?0V]R
+M95]297%4:6UE;W5T`')R,C<X>%]5<&1A=&5487)G971$979I8V5S`')R,C<X
+M>%]$979I8V5?4&%R<V5)9&5N=&EF>41A=&$`<G(R-SAX7U-#4TE?051!7T9I
+M;&Q,0D%#9&(Q-@!R<C(W.'A?1V5T4$U&<F]M4&]O;`!R<C(W.'A?27-S=65?
+M4F5P;W)T4F]U=&5);F9O`')R,C<X>%])<W-U95]297!O<G1'96YE<F%L`')R
+M,C<X>%]5<&1A=&50:'E);F9O`')R,C<X>%]!5$U%3%]34$E?0TU$`')R,C<X
+M>%]30U-)7T%405]&:6QL1&%T849I96QD`')R,C<X>%]!5$%?0T1",E1A<VM&
+M:6QE`')R,C<X>%]&<F5E1&5V:6-E5&]0;V]L`')R,C<X>%]'971335!38W)A
+M=&-H1G)O;5!O;VP`<G(R-SAX7U!-7T%S<VEG;E)E9VES=&5R4V5T`')R,C<X
+M>%]30U-)7TUA:V5-;V1E4&%G94-A8VAI;F<`<G(R-SAX7T1E=FEC95]-86ME
+M4V5S4F-V1&EA9U)E<75E<W0`<G(R-SAX7T-O<F53879E3W)I9VEN86Q#1$(`
+M<G(R-SAX7T-O<F5297-T;W)E3W)I9VEN86Q#1$(`<G(R-SAX7T1)4T-?4V5T
+M4F5S;W5R8V4`<G(R-SAX7T5X<&%N9&5R7U--4%)E<75E<W1?4F5P;W)T4$A9
+M4T%400!R<C(W.'A?4')E<&%R941E;&EV97)Y475E=65%;G1R>0!R<C(W.'A?
+M1G)E95-'0G5F9F5R5&]0;V]L`')R,C<X>%]3051!7U!O<G1$979I8V5296%D
+M>0!R<C(W.'A?23)#7TUO9'5L94EN:71I86QI>F4`<G(R-SAX7V-O<F5?:&%N
+M9&QE7W1A<VMF:6QE7V5R<F]R`')R,C<X>%]0<F5%;7!T>41E=FEC90!R<C(W
+M.'A?4T=024]?4TU04F5Q=65S=%]296%D`')R,C<X>%]&<F5E4T%405-C<F%T
+M8VA4;U!O;VP`<G(R-SAX7U-!4U](86YD;&5#;VUP;&5T961#;VUM86YD`')R
+M,C<X>%]-5E]$=6UP4F5G:7-T97(`<G(R-SAX7T=E=%!-1&5V:6-E`')R,C<X
+M>%]/9&EN4U!)7TEN:70`<G(R-SAX7TU67U-E=$Q"06%N9%-E8W1O<D-O=6YT
+M`')R,C<X>%]7<FET941%3%9?45]%;G1R>0!R<C(W.'A?1G)E95!O<G14;U!O
+M;VP`<G(R-SAX7U!O<G1?2&%N9&QE4&QU9VEN`')R,C<X>%]31U!)3U]335!2
+M97%U97-T7U=R:71E`')R,C<X>%](86YD;&5#;VUM86YD475E=64`<G(R-SAX
+M7U-!4U]$979I8V53=&%T94UA8VAI;F4`<G(R-SAX7T-O<F5?36]D=6QE16YA
+M8FQE1&ES86)L94E240!R<C(W.'A?4G5N=&EM94ES<W5E4F5A9$QO9T5X=`!R
+M<C(W.'A?1FEL;$5N8VQO<W5R945L96UE;G13=&%T=7,`<G(R-SAX7U-#4TE?
+M051!7TQO=V5R5V]R9`!R<C(W.'A?4T%405]035](86YD;&5$979I8V50;'5G
+M:6X`<G(R-SAX7T-O;7!L971E4F5Q=65S=$%N9%-L;W0`<G(R-SAX7U!-7TES
+M<W5E5W)I=&5296<`<G(R-SAX7U-!5$%?4&]R=$1E=FEC941E=&5C=&5D`')R
+M,C<X>%]0;W-T36%K95-E<T-O;F9I9W5R871I;VY297%U97-T`')R,C<X>%]$
+M979I8V5?36%K95)E861#87!A8VET>51A<VM297%U97-T`')R,C<X>%]#;W)E
+M7TUO9'5L95-H=71D;W=N`')R,C<X>%]0;W-T36%K95-E<T5N8VQO<W5R95-T
+M871U<U)E<75E<W0`<G(R-SAX7T1)4T-?0V%N8V5L1&ES8V]V97(`<G(R-SAX
+M7U-'5&%B;&5?07!P96YD`')R,C<X>%]0<F5P87)E06YD4V5N9$-O;6UA;F0`
+M<G(R-SAX7T-O<F5?36%K941E=FEC95)E<V5T4F5Q`')R,C<X>%]-5E]-87!4
+M;U-P96-I9FEC5&%R9V5T240`<G(R-SAX7U-!4U]);G1E<FYA;%)E<4-A;&QB
+M86-K`')R,C<X>%]!<W-I9VY$979I8V5%;&5M96YT3G5M8F5R`')R,C<X>%]3
+M051!7U!-4W1A=&5-86-H:6YE`')R,C<X>%]31U1A8FQE7TEN:70`<G(R-SAX
+M7U!O<G1?36]N:71O<@!R<C(W.'A?1$E30U]#:&5C:T1I<V-O=F5R4W1A=&4`
+M<G(R-SAX7T9R965#;W)E0V]N=&5X=%1O4&]O;`!R<C(W.'A?1G)E95)E9VES
+M=&5R4V5T`')R,C<X>%]486=?26YI=%]&249/`')R,C<X>%]5<&1A=&549W1$
+M979-87``<G(R-SAX7T1)4T-?1V5T3F5G;W1I871E9$QI;FM2871E`')R,C<X
+M>%]31U!)3U]3971?1F%I;&QE9`!R<C(W.'A?4&]R=%]&:6YD5&=T3F\`<G(R
+M-SAX7U!-7T9R965296=I<W1E<E-E=`!R<C(W.'A?359?4F5M;W9E5&%R9V5T
+M240`<G(R-SAX7T=E=%-'0G5F9F5R1G)O;5!O;VP`<G(R-SAX7U-#4TE?051!
+M7T-H96-K0V]N9&ET:6]N`')R,C<X>%]#;W)E7TUO9'5L94=E=%)E<V]U<F-E
+M475O=&$`<G(R-SAX7U!O<G1?2&%N9&QE56YP;'5G`')R,C<X>%]486=?26YI
+M=`!R<C(W.'A?5&%G7TES16UP='D`<G(R-SAX7T=E=$Y#451A9P!R<C(W.'A?
+M;79?<F5S971?>&UT`')R,C<X>%]&<F5E4TU00V]N=&5X=`!R<C(W.'A?0V%T
+M96=O<GE?0T1"7U1Y<&4`<G(R-SAX7U--4%)E<W!,96YG=&@`<G(R-SAX7T1)
+M4T-?1V5T5&=T1&5V36%P`')R,C<X>%]31U!)3U]);FET:6%L:7IE`')R,C<X
+M>%]#;W)E7TAA;F1L95=A:71I;F=,:7-T`')R,C<X>%]296UO=F5$979I8V4`
+M<G(R-SAX7U-!5$%?2&%N9&QE1&5V:6-E4&QU9VEN`')R,C<X>%]'971-87A.
+M96=O=&EA=&5D3&EN:U)A=&4`<G(R-SAX7T1E=FEC95]-86ME4F5Q=65S=%1A
+M<VM297%U97-T`')R,C<X>%]'971-:6Y.96=O=&EA=&5D3&EN:U)A=&4`<G(R
+M-SAX7U-!5$%?4$U?2&%N9&QE1&5V:6-E56YP;'5G`')R,C<X>%]'971);G1E
+M<FYA;%)E<49R;VU0;V]L`')R,C<X>%]$979I8V5?36%K94EN<75I<GE487-K
+M4F5Q=65S=`!R<C(W.'A?07-S:6=N16QE;65N=%-L;W1.=6UB97(`<G(R-SAX
+M7T9R965);G1E<FYA;%)E<51O4&]O;`!R<C(W.'A?7U]035]C86YC96Q?=&EM
+M97(`<G(R-SAX7TES<W5E7T-O;F9I9U)O=71E26YF;P!R<C(W.'A?5&%G7U)E
+M;&5A<V5/;F4`<G(R-SAX7VUV7V1I<V%B;&5?:&)A`')R,C<X>%]-5E]#;W!Y
+M4T=486)L90!R<C(W.'A?;79?96YA8FQE7WAM=`!R<C(W.'A?4T-325]4;U]&
+M25,`<G(R-SAX7T1E=FEC95]-86ME36]D95-E;&5C=%)E<75E<W0`<G(R-SAX
+M7V]D:6Y?<F5M;W9E7V1E=FEC90!R<C(W.'A?1FEN9%1G=$YO`')R,C<X>%])
+M<W-U95]$:7-C;W9E<@!R<C(W.'A?359?36%P5&%R9V5T240`<G(R-SAX7U5P
+M9&%T95=I9&50;W)T4&AY36%P`')R,C<X>%]?7V-A;F-E;%]T:6UE<@!R<C(W
+M.'A?4T%44V5N<V5$871A`')R,C<X>%]D979I8V5?<')O8F5?9&]N90!R<C(W
+M.'A?1G)E945X<&%N9&5R5&]0;V]L`')R,C<X>%]M=E]D:7-A8FQE7WAM=`!R
+M<C(W.'A?;79#:&%N;F5L4W1A=&5-86-H:6YE`')R,C<X>%]&:6YD07-C:6E.
+M=6UB97(`<G(R-SAX7U!-7TES<W5E4F5A9%)E9P!R<C(W.'A?;79?<F5S971?
+M<&AY`')R,C<X>%]30U-)7T%405]&:6QL3$)!0V1B,3``<G(R-SAX7W-E=%]F
+M86EL7VQE9`!R<C(W.'A?07-S:6=N4F5G:7-T97)3970`<G(R-SAX7T9R9653
+M35!38W)A=&-H5&]0;V]L`')R,C<X>%]-5E]);FET:6%L:7IE5&%R9V5T2414
+M86)L90!R<C(W.'A?4T-325]!5$%?4W1A<G13=&]P5')A;G-L871I;VX`<G(R
+M-SAX7T9I;F12=6YN:6YG4F5Q0GE486<`<G(R-SAX7U-!5$%?1&5V:6-E4W1A
+M=&5-86-H:6YE`')R,C<X>%]#;W)E7TUO9'5L95-T87)T`')R,C<X>%]?7W)E
+M;F5W7W1I;65R`')R,C<X>%]0;W)T7TAA;F1L941E=FEC95!L=6=I;@!R<C(W
+M.'A?4T537U-E=$9A:6Q,960`<G(R-SAX7T1)4T-?1V5T4F5S;W5R8V4`<G(R
+M-SAX7U-!5$%?4$U(;W1P;'5G4F5Q0V%L;&)A8VL`<G(R-SAX7VUV7W-E=%]3
+M05-!9&1R`')R,C<X>%]2=6YT:6UE27-S=653;V9T4F5S971#86QL8F%C:P!R
+M<C(W.'A?4&]R=%])<U)E<75E<W12=6YN:6YG`')R,C<X>%]30U-)7T%405]5
+M<'!E<E=O<F0`<G(R-SAX7T5X<&%N9&5R7U--4%)E<75E<W1?4&AY0V]N=')O
+M;`!R<C(W.'A?1&5V:6-E7TES<W5E4V]F=%)E<V5T`')R,C<X>%]3051!7U!-
+M7T5R<F]R2&%N9&QI;F<`<G(R-SAX7T)E97!/9F8`<G(R-SAX7T1)4T-?1&]$
+M:7-C;W9E<@!R<C(W.'A?1&5V:6-E7U=R:71E4V5S0V]N=')O;$1I86<`<G(R
+M-SAX7T1E=FEC95]-86ME4F5A9$-A<&%C:71Y,39487-K4F5Q=65S=`!R<C(W
+M.'A?4T-325]!5$%?5F5R:69Y5')A;G-L871I;VX`<G(R-SAX7T=E=%-!5$%3
+M8W)A=&-H1G)O;5!O;VP`<G(R-SAX7U-!4U](86YD;&5"4D1#4U0`<G(R-SAX
+M7V]D:6Y?:6]C=&P`<G(R-SAX7T-A;&-U;&%T95)O=71E26YD97@`<G(R-SAX
+M7TES<W5E7U)E<&]R=$UA;G5F86-T=7)E<DEN9F]R;6%T:6]N`')R,C<X>%]#
+M;W)E7U)E<51I;65O=70`<G(R-SAX7V]D:6Y?9FQA<VA?86-C97-S`')R,C<X
+M>%]'971315-30D9R;VU0;V]L`')R,C<X>%]$979I8V5?36%K95-T87)T4W1O
+M<%5N:71297%U97-T`')R,C<X>%]?7V%D9%]T:6UE<@!R<C(W.'A?4T%37T5R
+M<F]R2&%N9&QI;F<`<G(R-SAX7U-E<G9I8V5);G1E<G)U<'0`<G(R-SAX7U-!
+M5$%?4$U);FET4F5Q0V%L;&)A8VL`<G(R-SAX7U!O<G1?4V]F=%)E<V5T0V%L
+M;&)A8VL`<G(R-SAX7T-H96-K1&5V:6-E0VAA;F=E`')R,C<X>%]'971/;F5#
+M;VUM86YD4VQO=`!R<C(W.'A?4&]S=$UA:V5397-%;&5M96YT4W1A='5S4F5Q
+M=65S=`!R<C(W.'A?4G5N=&EM94ES<W5E4V]F=%)E<V5T`')R,C<X>%]30U-)
+M7T%405]296%D5W)I=&54<F%N<VQA=&EO;@!R<C(W.'A?5F5R:69Y0V]M;6%N
+M9$)E9F]R95-E;F1I;F<`<G(R-SAX7VDR8U]R97-E=`!R<C(W.'A?4T-325]!
+M5$%?4F5A9$-A<&%C:71Y5')A;G-L871I;VY#86QL8F%C:P!R<C(W.'A?5&%G
+M7T=E=$]N90!R<C(W.'A?4T%405]0;W)T1&5T96-T`')R,C<X>%]!<W-I9VY$
+M979I8V5/=F5R86QL16QE;65N=$YU;6)E<@!R<C(W.'A?4T%405]%<G)O<DAA
+M;F1L:6YG`')R,C<X>%]30U-)7T%405]296%D0V%P86-I='E4<F%N<VQA=&EO
+M;@!R<C(W.'A?4U107T1E=FEC95)E<V5T`')R,C<X>%]M;V1E4&%G94)U9@!R
+M<C(W.'A?3&ES=%]'971,87-T`')R,C<X>%]'971$979I8V5&<F]M4&]O;`!R
+M<C(W.'A?4&]R=%]!8F]R=%)E<75E<W1S`')R,C<X>%]#;W)E7T9I;&Q396YS
+M941A=&$`<G(R-SAX7V]D:6Y?<V5T7W-P:6Y?=7!?;6]D90!R<C(W.'A?17AP
+M86YD97)?4TU04F5Q=65S=%]297!O<G1'96YE<F%L`')R,C<X>%]D=6UP7W5N
+M87-S;V-I871E9%]F:7,`<G(R-SAX7T-O<F5?26YT97)R=7!T4V5R=FEC95)O
+M=71I;F4`<G(R-SAX7U-#4TE?36%K94-A8VAE0V]M;6%N9`!R<C(W.'A?0V]R
+M95]P87-S7W1H<G5?9FEL;%]T87-K9FEL90!R<C(W.'A?0V]R95]-;V1U;&53
+M96YD4F5Q=65S=`!R<C(W.'A?4T%405]0;W)T4F5S970`<G(R-SAX7T-O<F5?
+M36]D=6QE26YI=&EA;&EZ90!R<C(W.'A?17AP86YD97)?4TU04F5Q7T-A;&QB
+M86-K`')R,C<X>%]0<F5%;7!T>5!-`')R,C<X>%]%>'!A;F1E<E]335!297%U
+M97-T7T1I<V-O=F5R`')R,C<X>%]335!?4T=024]?4V5T7T9A:6QL960`<G(R
+M-SAX7T1E=&5C=%!O<G14>7!E`')R,C<X>%]31U!)3U]296%D4F5G:7-T97(`
+M<G(R-SAX7U-%4U]);G1E<FYA;%)E<4-A;&QB86-K`')R,C<X>%]-5E]$=6UP
+M4F5Q=65S=`!R<C(W.'A?0VAE8VM487)G971#:&%N9V4`<G(R-SAX7W-E=%]F
+M86EL7VQE9',`<G(R-SAX7T)E97!/;@!R<C(W.'A?359?1V5T36%P<&5D240`
+M<G(R-SAX7T9R9650351O4&]O;`!R<C(W.'A?4T=024]?5W)I=&5296=I<W1E
+M<@!R<C(W.'A?57!D871E4W1A='5S5G-397-#;VYT<F]L0G5F9F5R`')R,C<X
+M>%]'971#;W)E0V]N=&5X=$9R;VU0;V]L`')R,C<X>%]31U!)3U]335!297%?
+M0V%L;&)A8VL`<G(R-SAX7T1E=FEC95]-86ME36]D95-E;G-E4F5Q=65S=`!R
+M<C(W.'A?4U-47U-025]#340`<G(R-SAX7U-!5$%?2&%N9&QE1&5V:6-E56YP
+M;'5G`')R,C<X>%]M=E]D:7-A8FQE7W)E9VES=&5R7W-E=`!R<C(W.'A?0V]R
+M95]297-E=$-M9%-L;W0`<G(R-SAX7U-!5$%?4')E<&%R94-O;6UA;F1486)L
+M90!R<C(W.'A?4T%405]0<F5P87)E0V]M;6%N9$AE861E<@!R<C(W.'A?1FEN
+M9$9R965335!#;VYT97AT`')R,C<X>%]-5E]#4D,`<G(R-SAX7TU67T5Q=6%L
+M<P!R<C(W.'A?0V]M<&QE=&5297%U97-T`')R,C<X>%],:7-T7T=E=$9I<G-T
+M`')R,C<X>%]O9&EN7W-E=%]I9&QE7W-T86YD8GD`<G(R-S-X7TU67T-O<'E3
+M1U1A8FQE`')R,C<S>%]M;V1E4&%G94)U9@!R<C(W,WA?0V]R95](86YD;&57
+M86ET:6YG3&ES=`!R<C(W,WA?17AP86YD97)?4TU04F5Q7T-A;&QB86-K`')R
+M,C<S>%]31U!)3U]335!297%?0V%L;&)A8VL`<G(R-S-X7TAA;F1L94-O;6UA
+M;F11=65U90!R<C(W,WA?4T%405]035](86YD;&5$979I8V50;'5G:6X`<G(R
+M-S-X7T5X<&%N9&5R7U--4%)E<75E<W1?1&ES8V]V97(`<G(R-S-X7T%405]#
+M1$(R5&%S:T9I;&4`<G(R-S-X7U-!5$%?4$U?17)R;W)(86YD;&EN9P!R<C(W
+M,WA?4T%37TAA;F1L94)21$-35`!R<C(W,WA?4T%405]%<G)O<DAA;F1L:6YG
+M`')R,C<S>%]30U-)7T%405]296%D5W)I=&54<F%N<VQA=&EO;@!R<C(W,WA?
+M3&ES=%]'971,87-T`')R,C<S>%]3051396YS941A=&$`<G(R-S-X7T9R9653
+M35!#;VYT97AT`')R,C<S>%]$25-#7T-A;F-E;$1I<V-O=F5R`')R,C<S>%]0
+M;W)T7TES4F5Q=65S=%)U;FYI;F<`<G(R-S-X7T%4345,7U-025]#340`<G(R
+M-S-X7T-O<F5?26YT97)R=7!T4V5R=FEC95)O=71I;F4`<G(R-S-X7T1E=FEC
+M95]-86ME26YQ=6ER>51A<VM297%U97-T`')R,C<S>%]$:7-C;W9E<GE#86QL
+M0F%C:P!R<C(W,WA?07-S:6=N1&5V:6-E16QE;65N=$YU;6)E<@!R<C(W,WA?
+M4')E<&%R941E;&EV97)Y475E=65%;G1R>0!R<C(W,WA?4T-325]!5$%?3&]W
+M97)7;W)D`')R,C<S>%]&<F5E4&]R=%1O4&]O;`!R<C(W,WA?359?4V5T3$)!
+M86YD4V5C=&]R0V]U;G0`<G(R-S-X7VUV7V1I<V%B;&5?<F5G:7-T97)?<V5T
+M`')R,C<S>%]486=?26YI=`!R<C(W,WA?1$E30U]'971.96=O=&EA=&5D3&EN
+M:U)A=&4`<G(R-S-X7U-#4TE?051!7U-T87)T4W1O<%1R86YS;&%T:6]N`')R
+M,C<S>%])<W-U95]$:7-C;W9E<@!R<C(W,WA?4T-325]!5$%?57!P97)7;W)D
+M`')R,C<S>%]486=?1V5T3VYE`')R,C<S>%]#:&5C:T1E=FEC94-H86YG90!R
+M<C(W,WA?1G)E94-O<F5#;VYT97AT5&]0;V]L`')R,C<S>%]'971-87A.96=O
+M=&EA=&5D3&EN:U)A=&4`<G(R-S-X7W-E=%]F86EL7VQE9`!R<C(W,WA?7U]0
+M35]C86YC96Q?=&EM97(`<G(R-S-X7U!-7TES<W5E4F5A9%)E9P!R<C(W,WA?
+M0V%L8W5L871E4F]U=&5);F1E>`!R<C(W,WA?17AP86YD97)?4TU04F5Q=65S
+M=%]297!O<G102%E3051!`')R,C<S>%]30U-)7TUA:V5-;V1E4&%G94-A8VAI
+M;F<`<G(R-S-X7T=E=%!-1&5V:6-E`')R,C<S>%]M=E]S971?4T%3061D<@!R
+M<C(W,WA?4T%405]0;W)T4F5S970`<G(R-S-X7T1)4T-?1V5T4F5S;W5R8V4`
+M<G(R-S-X7V]D:6Y?9FQA<VA?86-C97-S`')R,C<S>%]305-?2&%N9&QE0V]M
+M<&QE=&5D0V]M;6%N9`!R<C(W,WA?1&5V:6-E7U!A<G-E261E;G1I9GE$871A
+M`')R,C<S>%]0<F5%;7!T>5!-`')R,C<S>%]$979I8V5?36%K94UO9&5396YS
+M95)E<75E<W0`<G(R-S-X7U-'5&%B;&5?079A:6QA8FQE`')R,C<S>%]0;W-T
+M36%K95-E<T-O;F9I9W5R871I;VY297%U97-T`')R,C<S>%]#;W)E7TUO9'5L
+M94=E=%)E<V]U<F-E475O=&$`<G(R-S-X7TDR0U]-;V1U;&5);FET:6%L:7IE
+M`')R,C<S>%]S971?9F%I;%]L961S`')R,C<S>%]'971$979I8V5&<F]M4&]O
+M;`!R<C(W,WA?1G)E95-!5$%38W)A=&-H5&]0;V]L`')R,C<S>%]296UO=F5$
+M979I8V4`<G(R-S-X7VUV0VAA;FYE;%-T871E36%C:&EN90!R<C(W,WA?4TU0
+M4F5S<$QE;F=T:`!R<C(W,WA?4T%405]034EN:71297%#86QL8F%C:P!R<C(W
+M,WA?4$U?27-S=657<FET95)E9P!R<C(W,WA?1V5T4&]R=$9R;VU0;V]L`')R
+M,C<S>%]!<W-I9VY296=I<W1E<E-E=`!R<C(W,WA?4T%405]035-T871E36%C
+M:&EN90!R<C(W,WA?0V]M<&QE=&5297%U97-T06YD4VQO=`!R<C(W,WA?1$E3
+M0U]'97149W1$979-87``<G(R-S-X7T9R965315-30E1O4&]O;`!R<C(W,WA?
+M1FEN9%1G=$YO`')R,C<S>%]30U-)7TUA:V5#86-H94-O;6UA;F0`<G(R-S-X
+M7VUV7W)E<V5T7WAM=`!R<C(W,WA?5&%G7U)E;&5A<V5/;F4`<G(R-S-X7T-/
+M4D5?27-S=65335!297%U97-T`')R,C<S>%]O9&EN7VEO8W1L`')R,C<S>%]-
+M5E]:97)O379297%U97-T`')R,C<S>%]$25-#7T1O1&ES8V]V97(`<G(R-S-X
+M7U-#4TE?051!7T9I;&Q,0D%#9&(Q-@!R<C(W,WA?1V5T4TU04V-R871C:$9R
+M;VU0;V]L`')R,C<S>%]&<F5E4TU04V-R871C:%1O4&]O;`!R<C(W,WA?1G)E
+M95)E9VES=&5R4V5T`')R,C<S>%]'971.0U%486<`<G(R-S-X7U-E<G9I8V5)
+M;G1E<G)U<'0`<G(R-S-X7T1E=FEC95]-86ME4V5S4F-V1&EA9U)E<75E<W0`
+M<G(R-S-X7TU67TEN:71I86QI>F5487)G971)1%1A8FQE`')R,C<S>%]-5E]%
+M<75A;',`<G(R-S-X7U!-7T9R965296=I<W1E<E-E=`!R<C(W,WA?4T%405]0
+M35](86YD;&5$979I8V55;G!L=6<`<G(R-S-X7U!-7T-O<F5?4F5Q5&EM96]U
+M=`!R<C(W,WA?57!D871E5VED95!O<G10:'E-87``<G(R-S-X7V]D:6Y?<V5T
+M7W-P:6Y?=7!?;6]D90!R<C(W,WA?1&5V:6-E7U=R:71E4V5S0V]N=')O;$1I
+M86<`<G(R-S-X7U-T;W)E7T-O;F9I9U)O=71E26YF;P!R<C(W,WA?5F5R:69Y
+M0V]M;6%N9$)E9F]R95-E;F1I;F<`<G(R-S-X7T1E=&5C=%!O<G14>7!E`')R
+M,C<S>%]-5E]$=6UP4F5Q=65S=`!R<C(W,WA?4T%405](86YD;&5$979I8V55
+M;G!L=6<`<G(R-S-X7U-'4$E/7U)E861296=I<W1E<@!R<C(W,WA?4T%405]0
+M;W)T1&5V:6-E4F5A9'D`<G(R-S-X7U!O<W1-86ME4V5S16QE;65N=%-T871U
+M<U)E<75E<W0`<G(R-S-X7T-O<F5?36]D=6QE4VAU=&1O=VX`<G(R-S-X7T-O
+M<F5?26YT97)N86Q396YD4F5Q=65S=`!R<C(W,WA?4T-325]!5$%?5F5R:69Y
+M5')A;G-L871I;VX`<G(R-S-X7U-!4U]);G1E<FYA;%)E<4-A;&QB86-K`')R
+M,C<S>%]!<W-I9VY%;&5M96YT4VQO=$YU;6)E<@!R<C(W,WA?4T%37U!O<G12
+M97-E=`!R<C(W,WA?4T537U-E=$9A:6Q,960`<G(R-S-X7U-35%]34$E?0TU$
+M`')R,C<S>%]M=E]D:7-A8FQE7WAM=`!R<C(W,WA?4T%405](86YD;&5$979I
+M8V50;'5G:6X`<G(R-S-X7U!O<G1?1FEN9%1G=$YO`')R,C<S>%]-5E]$=6UP
+M4F5G:7-T97(`<G(R-S-X7VUV7V5N86)L95]X;70`<G(R-S-X7U-!5$%?4$U(
+M;W1P;'5G4F5Q0V%L;&)A8VL`<G(R-S-X7U)U;G1I;65)<W-U95-O9G1297-E
+M=`!R<C(W,WA?9'5M<%]U;F%S<V]C:6%T961?9FES`')R,C<S>%]0;W)T7TAA
+M;F1L955N<&QU9P!R<C(W,WA?4TU07U-'4$E/7U-E=%]&86EL;&5D`')R,C<S
+M>%]31U!)3U]);FET:6%L:7IE`')R,C<S>%]0<F5P87)E06YD4V5N9$-O;6UA
+M;F0`<G(R-S-X7U-#4TE?051!7U)E861#87!A8VET>51R86YS;&%T:6]N`')R
+M,C<S>%]M=E]R97-E=%]P:'D`<G(R-S-X7T-A=&5G;W)Y7T-$0E]4>7!E`')R
+M,C<S>%]31U1A8FQE7TEN:70`<G(R-S-X7TU67T=E=$UA<'!E9$E$`')R,C<S
+M>%]30U-)7T%405]296%D0V%P86-I='E4<F%N<VQA=&EO;D-A;&QB86-K`')R
+M,C<S>%]&:6YD4G5N;FEN9U)E<4)Y5&%G`')R,C<S>%]35%!?1&5V:6-E4F5S
+M970`<G(R-S-X7T=E=$-O<F5#;VYT97AT1G)O;5!O;VP`<G(R-S-X7T-O;7!L
+M971E4F5Q=65S=`!R<C(W,WA?5&%G7TEN:71?1DE&3P!R<C(W,WA?4&]R=%]3
+M;V9T4F5S971#86QL8F%C:P!R<C(W,WA?0V]R95]-;V1U;&53=&%R=`!R<C(W
+M,WA?57!D871E5&=T1&5V36%P`')R,C<S>%]&:6YD1G)E95--4$-O;G1E>'0`
+M<G(R-S-X7T=E=%!-1G)O;5!O;VP`<G(R-S-X7V]D:6Y?<F5M;W9E7V1E=FEC
+M90!R<C(W,WA?359?0U)#`')R,C<S>%]3051!7U!O<G1$971E8W0`<G(R-S-X
+M7U)U;G1I;65)<W-U95)E861,;V=%>'0`<G(R-S-X7T9I;F1!<V-I:4YU;6)E
+M<@!R<C(W,WA?0V]R95]'9713=7!P;W)T961#;W5N=',`<G(R-S-X7V]D:6Y?
+M<V5T7VED;&5?<W1A;F1B>0!R<C(W,WA?1G)E95!-5&]0;V]L`')R,C<S>%]M
+M=E]D:7-A8FQE7VAB80!R<C(W,WA?1$E30U]#:&5C:T1I<V-O=F5R4W1A=&4`
+M<G(R-S-X7U!R945M<'1Y1&5V:6-E`')R,C<S>%]&<F5E26YT97)N86Q297%4
+M;U!O;VP`<G(R-S-X7U!O<G1?36]N:71O<@!R<C(W,WA?4T=024]?4V5T7T9A
+M:6QL960`<G(R-S-X7T5X<&%N9&5R7U--4%)E<75E<W1?4&AY0V]N=')O;`!R
+M<C(W,WA?4&]R=%](86YD;&50;'5G:6X`<G(R-S-X7U-#4TE?5&]?1DE3`')R
+M,C<S>%]#:&5C:U1A<F=E=$-H86YG90!R<C(W,WA?1V5T4T534T)&<F]M4&]O
+M;`!R<C(W,WA?07-S:6=N1&5V:6-E3W9E<F%L;$5L96UE;G1.=6UB97(`<G(R
+M-S-X7U-'4$E/7U--4%)E<75E<W1?5W)I=&4`<G(R-S-X7T=E=$UI;DYE9V]T
+M:6%T961,:6YK4F%T90!R<C(W,WA?0V]R95]P87-S7W1H<G5?9FEL;%]T87-K
+M9FEL90!R<C(W,WA?0F5E<$]N`')R,C<S>%]#;W)E4V%V94]R:6=I;F%L0T1"
+M`')R,C<S>%]305-?17)R;W)(86YD;&EN9P!R<C(W,WA?3V1I;E-025]);FET
+M`')R,C<S>%]&<F5E17AP86YD97)4;U!O;VP`<G(R-S-X7T1)4T-?4V5T4F5S
+M;W5R8V4`<G(R-S-X7U-'5&%B;&5?07!P96YD`')R,C<S>%]$979I8V5?36%K
+M95)E861#87!A8VET>51A<VM297%U97-T`')R,C<S>%]3051!7T1E=FEC95-T
+M871E36%C:&EN90!R<C(W,WA?57!D871E4W1A='5S5G-397-#;VYT<F]L0G5F
+M9F5R`')R,C<S>%]-5E]-87!487)G971)1`!R<C(W,WA?1&5V:6-E7TUA:V5-
+M;V1E4V5L96-T4F5Q=65S=`!R<C(W,WA?4T-325]!5$%?4WEN8T-A8VAE5')A
+M;G-L871I;VX`<G(R-S-X7T5X<&%N9&5R7U--4%)E<75E<W1?4F5P;W)T1V5N
+M97)A;`!R<C(W,WA?1&5V:6-E7TUA:V5297%U97-T5&%S:U)E<75E<W0`<G(R
+M-S-X7T9R965$979I8V54;U!O;VP`<G(R-S-X7T=E=%-'0G5F9F5R1G)O;5!O
+M;VP`<G(R-S-X7U5P9&%T951A<F=E=$1E=FEC97,`<G(R-S-X7U1A9U])<T5M
+M<'1Y`')R,C<S>%]035]!<W-I9VY296=I<W1E<E-E=`!R<C(W,WA?4T%405]0
+M<F5P87)E0V]M;6%N9%1A8FQE`')R,C<S>%]3051!7U!O<G1(86YD;&5);G1E
+M<G)U<'0`<G(R-S-X7U-'4$E/7U--4%)E<75E<W1?4F5A9`!R<C(W,WA?7U]C
+M86YC96Q?=&EM97(`<G(R-S-X7V1E=FEC95]P<F]B95]D;VYE`')R,C<S>%]#
+M;W)E7TUA:V5$979I8V5297-E=%)E<0!R<C(W,WA?57!D871E4&AY26YF;P!R
+M<C(W,WA?359?4F5M;W9E5&%R9V5T240`<G(R-S-X7T=E=%-!5$%38W)A=&-H
+M1G)O;5!O;VP`<G(R-S-X7U-!5$%?4&]R=$1E=FEC941E=&5C=&5D`')R,C<S
+M>%]2=6YT:6UE27-S=653;V9T4F5S971#86QL8F%C:P!R<C(W,WA?4&]S=$UA
+M:V5397-%;F-L;W-U<F53=&%T=7-297%U97-T`')R,C<S>%]"965P3V9F`')R
+M,C<S>%]#;W)E7TUO9'5L94EN:71I86QI>F4`<G(R-S-X7U=R:71E1$5,5E]1
+M7T5N=')Y`')R,C<S>%]$:7-C;W9E<GE330!R<C(W,WA?4T%405]0<F5P87)E
+M0V]M;6%N9$AE861E<@!R<C(W,WA?1&5V:6-E7TUA:V5296%D0V%P86-I='DQ
+M-E1A<VM297%U97-T`')R,C<S>%]#;W)E7TUO9'5L95-E;F1297%U97-T`')R
+M,C<S>%]0;W)T7T%B;W)T4F5Q=65S=',`<G(R-S-X7T-O<F5?36]D=6QE16YA
+M8FQE1&ES86)L94E240!R<C(W,WA?1FEL;$5N8VQO<W5R945L96UE;G13=&%T
+M=7,`<G(R-S-X7U!O<W1-86ME4V5S16QE;65N=$1E<V-R:7!T;W)297%U97-T
+M`')R,C<S>%]C;W)E7VAA;F1L95]T87-K9FEL95]E<G)O<@!R<C(W,WA?359?
+M36%P5&]3<&5C:69I8U1A<F=E=$E$`')R,C<S>%])<W-U95]#;VYF:6=2;W5T
+M94EN9F\`<G(R-S-X7TQI<W1?1V5T1FER<W0`<G(R-S-X7T=E=$EN=&5R;F%L
+M4F5Q1G)O;5!O;VP`<G(R-S-X7T1E=FEC95])<W-U95-O9G1297-E=`!R<C(W
+M,WA?7U]R96YE=U]T:6UE<@!R<C(W,WA?1V5T3VYE0V]M;6%N9%-L;W0`<G(R
+M-S-X7TES<W5E7U)E<&]R=%)O=71E26YF;P!R<C(W,WA?4T%37T1E=FEC95-T
+M871E36%C:&EN90!R<C(W,WA?27-S=65?4F5P;W)T36%N=69A8W1U<F5R26YF
+M;W)M871I;VX`<G(R-S-X7U-#4TE?051!7T9I;&Q,0D%#9&(Q,`!R<C(W,WA?
+M:3)C7W)E<V5T`')R,C<S>%]#;W)E7T9I;&Q396YS941A=&$`<G(R-S-X7T9R
+M96531T)U9F9E<E1O4&]O;`!R<C(W,WA?1&5V:6-E7TUA:V53=&%R=%-T;W!5
+M;FET4F5Q=65S=`!R<C(W,WA?0V]R95]297%4:6UE;W5T`')R,C<S>%]0;W)T
+M7TAA;F1L941E=FEC95!L=6=I;@!R<C(W,WA?4T537TEN=&5R;F%L4F5Q0V%L
+M;&)A8VL`<G(R-S-X7U-'4$E/7U=R:71E4F5G:7-T97(`<G(R-S-X7T=E=$5X
+M<&%N9&5R1G)O;5!O;VP`<G(R-S-X7TES<W5E7U)E<&]R=$=E;F5R86P`<G(R
+M-S-X7U]?861D7W1I;65R`')R,C<S>%]#;W)E7U)E<V5T0VUD4VQO=`!R<C(W
+M,WA?4T-325]!5$%?0VAE8VM#;VYD:71I;VX`<G(R-S-X7U-#4TE?051!7T9I
+M;&Q$871A1FEE;&0`<G(R-S-X7T-O<F5297-T;W)E3W)I9VEN86Q#1$(`4W=A
+M<$AP=$UE=&%6,P!L9&U?<W!I;G5P7W9D978`<F%W7V-H96-K7V1I<VM?9&5S
+M8W)I<'1O<@!L9&U?8VAE8VM?87)R87D`;&1M7W)E8VAE8VM?86QL`'9D979?
+M8VQA<W-?;&ES=`!R87=?:61L95]T:6UE<E]R97-E=`!L9&U?9&5L971E7W!A
+M<G1I=&EO;@!L9&U?<WEN8U]C:&%N9V5D7V%R<F%Y<P!G<F5B=6EL9&]N97)R
+M;W(`;&1M7W%U975E7V5V96YT`'1R86YS9F]R;5]N965D960`;&1M7V-H96-K
+M7W1R86YS9F]R;0!L9&U?9FEX=7!?87)R87E?<W1A=&4`8V%L8U]R96)U:6QD
+M7W!R;V=R97-S`'9B=7-?97AT7W-I>F4`<V5T7W1R86YS9F]R;5]S=&5P7VEN
+M9F\`;&1M7V9I;F1?=F1E=E]R87<`;&1M7W)E<')O8F5?9&5V:6-E`&-A;&-?
+M=')A;G-F;W)M7W!R;V=R97-S`&QD;5]F:6YD7W9D979?8VQA<W,`;&1M7V%L
+M;&]C7W!A<G1I=&EO;@!L9&U?:6YI=%]D:7-K`')E9G)E<VA?<F%W7V1E=E]I
+M;F9O`%]D96QE=&5?<F%W7W!A<G0`<F%W7W)E861?=W)I=&5?<V5C=&]R<P!G
+M:61L97-T86YD8GET:6UE;W5T`')A=U]C:&5C:U]A<G)A>5]D97-C<FEP=&]R
+M`&QD;5]C<F5A=&5?=F1E=E]R87<`=6YP;'5G7W)A=U]V9&5V`$-H96-K4W5M
+M`&-O;7!A<F5?<VQO=%]S97%?8GE?<&-I861D<@!L9&U?861D7V1I<VM?=&]?
+M87)R87D`;&1M7W-Y;F-?9&ES:U]I;F9O`&=E=%]B:71S`%-W87!(<'1-971A
+M5C0`<F%W7V-O;G9E<G1?<W!A<F5?=&]?;&5G86-Y`&9.;W1I9GE'54D`;&1M
+M7V9L=7-H7V%L;%]T87)G971S`&QD;5]S=&%R=%]R96)U:6QD`&QD;5]S<&EN
+M9&]W;E]A;&Q?<F%W9&5V<P!?7VQD;5]F:6YI<VA?8VUD`$E$7U1/7U9$158`
+M7U]V9&5V7W%U975E7V-M9`!R87=?:61L95]T:6UE<E]C:&5C:P!G971?<W1R
+M:7!?:6YF;P!H<'0R-WAX7VQD;5]R96=I<W1E<E]H:6U?4E\V7S4U7S<U7S0V
+M7S8T`&AP=#(W>'A?9T=L;V)A;$YC<49L86<`:'!T,C=X>%]O<U]R97%U97-T
+M7W1I;65R`'-T<F-P>0!H<'0R-WAX7VEN:71?;6]D=6QE7VIB;V0`:'!T,C=X
+M>%]D;6%P;V]L7V=E=%]P86=E`&AP=#(W>'A?;W-?9V5T7W-T86UP`&AP=#(W
+M>'A?;&1M7W-U<W!E;F0`:'!T,C=X>%]L9&U?:61L90!H<'0R-WAX7VQD;5]G
+M971?;65M7VEN9F\`:'!T,C=X>%]L9&U?<F5M;W9E7W1I;65R`&AP=#(W>'A?
+M<&-I8V9G7W)E861?9'=O<F0`:'!T,C=X>%]D;6%P;V]L7VUA:V5?;W)D97(`
+M:'!T,C=X>%]L9&U?9V5T7W9B=7-?97AT`&AP=#(W>'A?;&1M7W)E;&5A<V5?
+M=F1E=@!H<'0R-WAX7V9R965L:7-T7W)E<V5R=F5?9&UA`&AP=#(W>'A?;&1M
+M7VEN='(`;65M8W!Y`&AP=#(W>'A?;&1M7V]N7W1I;65R`&AP=#(W>'A?;&1M
+M7V=E=%]C;61?<VEZ90!H<'0R-WAX7VQD;5]F<F5E7V-M9',`:'!T,C=X>%]L
+M9&U?8W)E871E7W9D978`:'!T,C=X>%]L9&U?861D7W-P87)E7W1O7V%R<F%Y
+M`&AP=#(W>'A?9W)E8G5I;&1P<FEO<FET>0!H<'0R-WAX7VQD;5]S>6YC7V%R
+M<F%Y7VEN9F\`:'!T,C=X>%]O<U]M87!?<&-I7V)A<@!H<'0R-WAX7U]?;&1M
+M7V%L;&]C7V-M9`!H<'0R-WAX7VEN:71?;6]D=6QE7W9D979?<F%W`&AP=#(W
+M>'A?;&1M7W-E=%]A=71O<F5B=6EL9`!H<'0R-WAX7VEN:71?;6]D=6QE7VAI
+M;5]R<C(W,W@`:'!T,C=X>%]?7V1U;6UY7W)E9P!H<'0R-WAX7V1M87!O;VQ?
+M86-T:79E`&AP=#(W>'A?=F)U<U]L:7-T`&AP=#(W>'A?;&1M7W%U975E7W9B
+M=7-?9'!C`&AP=#(W>'A?;&1M7W)E<V5T7W9B=7,`:'!T,C=X>%]I;FET7VUO
+M9'5L95]R86ED-0!H<'0R-WAX7V=31U!)3U!A<G13=7!P;W)T`&AP=#(W>'A?
+M;&1M7W)E;&5A<V5?;&]C:P!H<'0R-WAX7V]S7W5N;6%P7W!C:5]B87(`:'!T
+M,C=X>%]L9&U?<VAU=&1O=VX`:'!T,C=X>%]H:6U?;&ES=`!H<'0R-WAX7VQD
+M;5]R97%U97-T7W1I;65R`&AP=#(W>'A?;&1M7W)E<W5M90!H<'0R-WAX7VEN
+M:71?;6]D=6QE7W)A:60Q`&AP=#(W>'A?;&1M7V=E=%]D979I8V5?:60`:'!T
+M,C=X>%]O<U]S8VAE9'5L95]T87-K`&AP=#(W>'A?;&1M7VEO8W1L`&AP=#(W
+M>'A?9U-P:6YU<$]N941E=D5A8VA4:6UE`&AP=#(W>'A?9G)E96QI<W1?<'5T
+M`&AP=#(W>'A?;W-?<W1A;&QE>&5C`&AP=#(W>'A?9U]L96=A8WE?;6]D90!H
+M<'0R-WAX7VQD;5]A;&QO8U]C;61S7U)?-E\U-5\W-5\T-E\V-`!H<'0R-WAX
+M7VQD;5]R=6X`:'!T,C=X>%]L9&U?9G)E95]C;61S7W1O7VQI<W0`:'!T,C=X
+M>%]I;FET7VUO9'5L95]P87)T:71I;VX`:'!T,C=X>%]O<U]M87A?8V%C:&5?
+M<VEZ90!H<'0R-WAX7W9D979?<75E=65?8VUD`&AP=#(W>'A?:6YI=%]M;V1U
+M;&5?:&EM7W)R,C<R,`!H<'0R-WAX7V]S7V=E=%]V8G5S7W-E<0!H<'0R-WAX
+M7VQD;5]S>6YC7V%R<F%Y7W-T86UP`&AP=#(W>'A?;&1M7W%U975E7V-M9`!H
+M<'0R-WAX7V]S7W!R:6YT:P!H<'0R-WAX7V9R965L:7-T7W)E<V5R=F4`:'!T
+M,C=X>%]D;6%P;V]L7W!U=%]P86=E`&AP=#(W>'A?9G)E96QI<W1?9V5T`&AP
+M=#(W>'A?;&1M7W5N<F5G:7-T97)?9&5V:6-E`&AP=#(W>'A?;&1M7W)E9VES
+M=&5R7V%D87!T97(`:'!T,C=X>%]G875T;W)E8G5I;&0`:'!T,C=X>%]L9&U?
+M9V5T7W9B=7-?<VEZ90!H<'0R-WAX7V1E;&%Y7V)E='=E96Y?<W!I;G5P`&AP
+M=#(W>'A?;&1M7V=E;F5R:6-?;65M8F5R7V9A:6QE9`!H<'0R-WAX7V1M87!O
+M;VQ?9V5T7W!A9V5?870`:'!T,C=X>%]L9&U?979E;G1?;F]T:69Y`&AP=#(W
+M>'A?;&1M7V-R96%T95]V8G5S`&AP=#(W>'A?:&EM7VAA;F1L95]T;U]V8G5S
+M`&AP=#(W>'A?9G)E96QI<W1?9V5T7V1M80!H<'0R-WAX7VQD;5]G971?;F5X
+M=%]V8G5S`&AP=#(W>'A?;W-?<&-I7W=R:71E;`!H<'0R-WAX7VQD;5]F:6YD
+M7W1A<F=E=`!H<'0R-WAX7V1M87!O;VQ?<F5G:7-T97)?8VQI96YT`&AP=#(W
+M>'A?;&1M7VEN:71I86QI>F5?=F)U<U]A<WEN8P!H<'0R-WAX7V]S7W%U97)Y
+M7W1I;64`:'!T,C=X>%]O<U]Q=65R>5]R96UO=F5?9&5V:6-E`&AP=#(W>'A?
+M;&1M7W)E9VES=&5R7V1E=FEC90!H<'0R-WAX7VEN:71?;6]D=6QE7W)A:60P
+M`&AP=#(W>'A?;W-?<&-I7W)E861L`&AP=#(W>'A?;&1M7V%C<75I<F5?;&]C
+M:P!H<'0R-WAX7V]S7W)E=F%L:61A=&5?9&5V:6-E`&AP=#(W>'A?9&UA<&]O
+M;%]I;FET`&AP=#(W>'A?;&1M7V9I;FES:%]C;60`:'!T,C=X>%]I;FET7VUO
+M9'5L95]H:6U?<G(R-S9X`&AP=#(W>'A?;&1M7VED95]F:7AS=')I;F<`:'!T
+M,C=X>%]D;6%P;V]L7VUA>%]C;&%S<U]P86=E<P!H<'0R-WAX7VQD;5]R96=I
+M<W1E<E]V9&5V7V-L87-S7U)?-E\U-5\W-5\T-E\V-`!H<'0R-WAX7VYU;5]D
+M<FEV97-?<&5R7W-P:6YU<`!H<'0R-WAX7VQD;5]R96QE87-E7W9B=7,`:'!T
+M,C=X>%]L9&U?<75E=65?=&%S:P!H<'0R-WAX7VQD;5]A;&QO8U]C;61S7V9R
+M;VU?;&ES=`!H<'0R-WAX7V9R965L:7-T7W!U=%]D;6$`:'!T,C=X>%]L9&U?
+M=&EM97)?<')O8F5?9&5V:6-E`&AP=#(W>'A?;&1M7V9I;F1?<W1A;7``:'!T
+M,C=X>%]I;FET7VUO9'5L95]H:6U?<G(R-SAX`&AP=#(W>'A?;&1M7V-H96-K
+M7V%R<F%Y7V]N;&EN90!H<'0R-WAX7V=0<F]B94EN26YI=&EA;&EZ:6YG`&AP
+M=#(W>'A?;&]G7W-E8W1O<E]R97!A:7(``````)\``````````@```&X```#\
+M_________\8``````````@```.0```#\_________^,``````````@```)P`
+M``#\_________SX!`````````@```.8```#\_________TX!`````````@``
+M`,\```#\_________U$#`````````@```&`$``#\_________Y@$````````
+M`@```"0```#\_________Z\'````````"P````4``````````````+D'````
+M`````@```(P$``#\_________\0'````````"P````8``````````````,X'
+M`````````@```(P$``#\__________('````````"P````<`````````````
+M`"L(`````````@```&T$``#\_________WP(`````````@```&T$``#\____
+M_____\`(`````````@```&T$``#\_________]H(`````````@```&T$``#\
+M_________R4)`````````@```&T$``#\_________S\)`````````@```&T$
+M``#\_________XX)`````````@```&T$``#\_________Y\)`````````@``
+M`&T$``#\_________^,)`````````@```(`$``#\__________P)````````
+M`@```&T$``#\_________Q8*`````````@```&T$``#\_________YL*````
+M`````@```&T$``#\_________[4*`````````@```&T$``#\_________^D*
+M`````````@```(`$``#\_________PL+`````````@```&T$``#\________
+M_R4+`````````@```&T$``#\_________VX+`````````@```&T$``#\____
+M_____W\+`````````@```&T$``#\_________\,+`````````@```(`$``#\
+M_________]P+`````````@```&T$``#\__________8+`````````@```&T$
+M``#\_________VD,`````````@```&T$``#\_________X,,`````````@``
+M`&T$``#\_________]T,`````````@```&T$``#\_________TT-````````
+M`@```&T$``#\_________\@-`````````@```!@```#\_________](-````
+M`````@```(`$``#\_________]P-`````````@```%````#\_________P8.
+M`````````@```&T$``#\_________R4.`````````@```&T$``#\________
+M_SP.`````````@```&T$``#\_________V(.`````````@```&T$``#\____
+M_____\\.`````````@```(`$``#\_________X0/`````````@```(`$``#\
+M_________W40`````````@```'X```#\_________XD0`````````@```!H`
+M``#\_________ZL0`````````@```(T$``#\_________\T0`````````@``
+M`(T$``#\_________^\0`````````@```(T$``#\_________PX1````````
+M`@```(T$``#\_________S`1`````````@```(T$``#\_________UT1````
+M`````@```(T$``#\_________W<1`````````@```(T$``#\_________Y$1
+M`````````@```(T$``#\_________[`1`````````@```(T$``#\________
+M_],1`````````@```(T$``#\__________81`````````@```(T$``#\____
+M_____Q02`````````@```(T$``#\_________S(2`````````@```(T$``#\
+M_________U`2`````````@```(T$``#\_________VX2`````````@```(T$
+M``#\_________XL2`````````@```(T$``#\_________ZX2`````````@``
+M`(T$``#\_________\<2`````````@```(T$``#\_________^P2````````
+M`@```%X$``#\_________PP3`````````@```%X$``#\_________S03````
+M`````@```%X$``#\_________UD3`````````@```%X$``#\_________WX3
+M`````````@```%X$``#\_________Z$3`````````@```%X$``#\________
+M_\P3`````````@```%X$``#\_________UT5`````````@```'X```#\____
+M______(5`````````@```(\$``#\_________R@6`````````@```(\$``#\
+M_________UX6`````````@```(\$``#\_________Y06`````````@```(\$
+M``#\_________\06`````````@```(\$``#\_________]D6`````````@``
+M`(\$``#\__________$6`````````@```(\$``#\_________UD7````````
+M`@```(\$``#\_________Z@7`````````@```(\$``#\__________<7````
+M`````@```(\$``#\_________TD8`````````@```(\$``#\_________ZL8
+M`````````@```(\$``#\_________]\8`````````@```(\$``#\________
+M_PT9`````````@```%,```#\_________QH9`````````@```(\$``#\____
+M_____TD9`````````@```&8```#\_________U89`````````@```(\$``#\
+M_________X49`````````@```&8```#\_________Y(9`````````@```(\$
+M``#\_________\$9`````````@```&8```#\_________\X9`````````@``
+M`(\$``#\_________P$:`````````@```&8```#\_________PX:````````
+M`@```(\$``#\_________VT:`````````@```$X```#\_________W$=````
+M`````@```)H$``#\_________XX=`````````@```)H$``#\_________ZL=
+M`````````@```)H$``#\_________\@=`````````@```)H$``#\________
+M_^4=`````````@```)H$``#\_________P(>`````````@```)H$``#\____
+M_____S$>`````````@```+H```#\_________WX>`````````@```)H$``#\
+M_________ZT>`````````@```+H```#\_________U@?`````````@```+H`
+M``#\_________XH?`````````@```)<$``#\_________YX?`````````@``
+M`$8```#\_________ZP?`````````@```-````#\_________[8?````````
+M`@```(`$``#\_________]P?`````````@```!,!``#\_________WH@````
+M`````@```"(```#\_________Y4@`````````@```#0```#\_________VTA
+M`````````@```$\```#\_________^@A`````````@```&<```#\________
+M_U4F`````````@```!8```#\_________[PF`````````@```*X```#\____
+M______`F`````````@```$\```#\_________Y`G````````"P````,`````
+M`````````*,G`````````@```(<```#\_________\\G`````````@```(<`
+M``#\__________<G`````````@```(<```#\_________Q\H`````````@``
+M`(<```#\_________UDH`````````@```"X```#\_________YXH````````
+M`@```%4```#\_________SHJ`````````@```'D```#\_________V0J````
+M`````@```(`$``#\__________`L`````````@```+P```#\__________\L
+M`````````@```-4```#\_________\4M`````````@```#(```#\________
+M_U<N`````````@````P!``#\_________W0N`````````@```#(```#\____
+M_____R0P`````````@````4!``#\_________T8P`````````@```,T```#\
+M_________[DP`````````@````4!``#\__________0P`````````@```,T`
+M``#\__________\R`````````@```*(```#\_________S<S````````"P``
+M``,```!0`````````.TS`````````@```&`$``#\_________PDT````````
+M"P````,```#P!````````+(T`````````@```!0```#\_________\(T````
+M`````@```!0```#\_________U\U`````````@````4!``#\_________YHU
+M`````````@```,T```#\_________PTV`````````@```$P```#\________
+M_T0V`````````@```*H```#\_________V`V`````````@```$P```#\____
+M_____V\V`````````@```&D```#\_________XLV`````````@```$P```#\
+M_________](V`````````@```$<```#\_________S0W`````````@```$P`
+M``#\_________TTW`````````@```$<```#\_________XDX`````````@``
+M`*T```#\_________Y<X`````````@```%L```#\_________P,Y````````
+M`@```+H```#\_________Q(Y`````````@```%X```#\_________Y<Y````
+M````"P````$```"`-P```````*$Y`````````@```.8```#\_________ZPY
+M`````````@```-,```#\_________THZ`````````@```&T$``#\________
+M_VPZ`````````@```,L```#\_________WPZ`````````@```%T```#\____
+M_____YXZ`````````@```,L```#\_________Z8Z`````````@```+(```#\
+M_________\4Z````````"P````,```!0"@```````-PZ`````````@```-L`
+M``#\__________@Z`````````@```-L```#\_________Q0[`````````@``
+M`$8```#\_________S8[`````````@````0!``#\_________TT[````````
+M`@```&4```#\_________W`[`````````@```$8```#\_________XL[````
+M`````@````0!``#\_________Z([`````````@```$8```#\_________[0[
+M`````````@```&4```#\_________\D[`````````@```$8```#\________
+M__P[`````````@```-````#\_________P8\`````````@```(`$``#\____
+M_____WD\`````````@```)X```#\_________Y(\`````````@```#<```#\
+M_________[D\`````````@```,X```#\_________\X\`````````@```)H`
+M``#\_________^$\````````"P````8````-`````````.L\`````````@``
+M`(P$``#\_________P$]`````````@```)<$``#\_________Q<]````````
+M`@```)<$``#\_________RH]`````````@```#4```#\_________TH]````
+M`````@```+H```#\_________X<]`````````@````@!``#\_________SH^
+M`````````@```'H```#\_________UT^`````````@```,@```#\________
+M_X4^`````````@```"(```#\_________ZX^`````````@```/H```#\____
+M_____[8^`````````@```"(```#\_________P,_`````````@```,@```#\
+M_________TL_`````````@````0!``#\_________W0_`````````@```+H`
+M``#\_________Z4_`````````@```)<$``#\_________[P_`````````@``
+M`$8```#\_________]<_`````````@```-````#\_________^$_````````
+M`@```(`$``#\_________Q=``````````@```$0```#\_________V!`````
+M````"P````4```!8`````````&I``````````@```(P$``#\_________WI`
+M`````````@```$8```#\_________^=``````````@```-````#\________
+M__%``````````@```(`$``#\_________S5!`````````@```)X```#\____
+M_____U5!`````````@```#<```#\_________WY!`````````@```,X```#\
+M_________Y-!`````````@```)H```#\_________Z9!````````"P````8`
+M```-`````````+!!`````````@```(P$``#\_________\5!`````````@``
+M`)<$``#\_________]I!`````````@```)<$``#\_________^U!````````
+M`@```#4```#\__________]!`````````@```$8```#\_________P="````
+M`````@```"(```#\_________ZE"`````````@```!$```#\_________\M"
+M`````````@```,@```#\__________-"`````````@```"(```#\________
+M_Q=#`````````@```/H```#\_________Q]#`````````@```"(```#\____
+M_____T)#`````````@```,@```#\_________W1#`````````@```$8```#\
+M_________X9#`````````@```&4```#\_________Z1#`````````@```+H`
+M``#\_________]=#`````````@```)<$``#\_________^Q#`````````@``
+M`$8```#\__________I#`````````@```-````#\_________P1$````````
+M`@```(`$``#\_________R5$`````````@```*D```#\_________TA$````
+M`````@```,@```#\_________X1$`````````@```+H```#\_________Z-$
+M`````````@```)<$``#\_________[Q$`````````@```$8```#\________
+M_\I$`````````@```-````#\_________]1$`````````@```(`$``#\____
+M______M$`````````@```,X```#\_________Q!%`````````@```)H```#\
+M_________R5%`````````@```)<$``#\_________SI%`````````@```)<$
+M``#\_________TU%`````````@```#4```#\_________VQ%`````````@``
+M`$8```#\_________W=%`````````@```)4```#\_________X]%````````
+M`@```&T$``#\_________]=%`````````@```&T```#\_________^)%````
+M`````@```+L```#\_________R]&`````````@```#,```#\_________UM&
+M`````````@```+H```#\__________M&`````````@```)(```#\________
+M_P=(`````````@```,@```#\_________SA(`````````@```'\```#\____
+M_____U%(`````````@```+,```#\_________XM(`````````@```+$```#\
+M_________[Q(`````````@```/8```#\_________^)(`````````@```+H`
+M``#\_________XI)`````````@```)(```#\_________YE*`````````@``
+M`'\```#\_________\M*`````````@```)0```#\_________QM+````````
+M`@```+H```#\_________RU+`````````@```.,```#\_________\)+````
+M`````@```/H```#\_________U%,`````````@```/H```#\_________UY,
+M`````````@```*P```#\_________XE,`````````@```/H```#\________
+M_Z=,`````````@```,@```#\_________\U,`````````@```$(```#\____
+M_____V)-`````````@```&T$``#\_________X9-`````````@```(`$``#\
+M_________[1-`````````@```&T$``#\_________]1-`````````@```&T$
+M``#\_________U5.`````````@```(`$``#\_________\M.`````````@``
+M`/\```#\_________^=.`````````@```/,```#\__________1.````````
+M`@```&T```#\_________R-/`````````@```+L```#\_________U1/````
+M`````@```"4```#\_________WY/`````````@```&T```#\_________SE0
+M`````````@```(`$``#\_________YY0`````````@```&T$``#\________
+M_\!0`````````@```(`$``#\_________^Q0`````````@```&T$``#\____
+M_____PM1`````````@```&T$``#\_________V=1`````````@```+H```#\
+M__________%1`````````@```$8```#\_________QY2`````````@```$8`
+M``#\_________RM2`````````@```&T```#\_________VQ2`````````@``
+M`+H```#\_________XA2`````````@```+H```#\_________ZE2````````
+M`@```%D$``#\_________\A2`````````@```-````#\_________])2````
+M`````@```(`$``#\_________X-3`````````@```%T```#\_________Z=3
+M`````````@```,X```#\_________[Q3`````````@```)H```#\________
+M_\]3````````"P````8````-`````````-E3`````````@```(P$``#\____
+M_____^Y3`````````@```)<$``#\_________P-4`````````@```)<$``#\
+M_________Q]4`````````@```#4```#\_________SY4`````````@```*``
+M``#\_________VA4`````````@```+H```#\_________XA4`````````@``
+M`-````#\_________Y)4`````````@```(`$``#\_________]-4````````
+M`@```,X```#\_________^A4`````````@```)H```#\__________M4````
+M````"P````8````-``````````55`````````@```(P$``#\_________QI5
+M`````````@```)<$``#\_________R]5`````````@```)<$``#\________
+M_T95`````````@```#4```#\_________UY5`````````@```+L```#\____
+M_____])5`````````@```&T$``#\__________=5`````````@```(`$``#\
+M_________R-6`````````@```&T$``#\_________T)6`````````@```&T$
+M``#\_________Q=7````````"P```(8``````````````!]7`````````@``
+M`/X```#\_________[E7`````````@```,,```#\_________]I7````````
+M`@```+H```#\_________V!8`````````@```+X```#\_________Y58````
+M`````@```$0```#\_________\Y8`````````@```$````#\_________^58
+M`````````@```)<$``#\__________U8`````````@```)<$``#\________
+M_S99`````````@```(`$``#\_________TU9`````````@```&T$``#\____
+M_____VU9`````````@```&T$``#\_________XE9`````````@```&T```#\
+M_________Y%9`````````@```!(!``#\_________]I9`````````@```/\`
+M``#\_________S=:`````````@```+H```#\_________ZE:`````````@``
+M`-0```#\_________[A:`````````@```,8```#\_________^1:````````
+M`@```(H```#\_________SQ;`````````@```&T$``#\_________VE;````
+M`````@```&T$``#\_________WY;`````````@```.D```#\_________XM;
+M`````````@````$!``#\_________ZM;`````````@```&T$``#\________
+M_[M;`````````@```&T$``#\_________\M;`````````@```&T$``#\____
+M_____]M;`````````@```&T$``#\_________TM<`````````@```&T$``#\
+M_________W)<`````````@```&T$``#\_________X%<`````````@```,$`
+M``#\_________[Y<`````````@```&T$``#\_________^9<`````````@``
+M`&T$``#\_________W-=`````````@```&T$``#\_________YI=````````
+M`@```&T$``#\_________\%=`````````@```%D$``#\__________1=````
+M`````@```+H```#\_________RQ>`````````@```)<$``#\_________T!>
+M`````````@```$8```#\_________V%>`````````@```'````#\________
+M_VM>`````````@```(`$``#\_________Y)>````````"P````$```#P6@``
+M`````*9>`````````@```'@$``#\_________\I>`````````@```&T$``#\
+M_________^I>`````````@```&T$``#\_________PY?`````````@```&T$
+M``#\_________SI?`````````@```&T$``#\_________VE?`````````@``
+M`&T$``#\_________XM?`````````@```&T$``#\_________P!@````````
+M`@```&T$``#\_________RI@`````````@```&T$``#\_________UE@````
+M`````@```&T$``#\_________WM@`````````@```&T$``#\__________A@
+M`````````@```&T$``#\_________QIA`````````@```&T$``#\________
+M_ZAA`````````@```%D$``#\_________^%A`````````@```)<$``#\____
+M______5A`````````@```$8```#\_________P1B`````````@```-````#\
+M_________PYB`````````@```(`$``#\_________S)B````````"P````$`
+M``#06@```````$IB`````````@```'@$``#\_________W9B`````````@``
+M`&T$``#\_________YYB`````````@```&T$``#\_________\MB````````
+M`@```&T$``#\__________)B`````````@```&T$``#\_________R]C````
+M`````@```%D$``#\_________T]C`````````@```+H```#\_________X%C
+M`````````@```)<$``#\_________Z-C````````"P```,,`````````````
+M`+5C`````````@```'@$``#\_________^!C`````````@```&T$``#\____
+M_____P)D`````````@```&T$``#\_________[YD`````````@```&T$``#\
+M_________^MD`````````@```&T$``#\_________R%E`````````@```&T$
+M``#\_________U-E````````"P````4```!X`````````%UE`````````@``
+M`(P$``#\_________YAE`````````@```&\```#\__________=E````````
+M`@```#,```#\_________P)F`````````@```'H```#\_________ZUF````
+M`````@```'\```#\_________]!F`````````@```,@```#\_________P1G
+M`````````@```+H```#\_________Y]G`````````@```'\```#\________
+M_[UG`````````@```,@```#\_________PAH`````````@```+$```#\____
+M_____R1H`````````@```&\```#\_________T=I`````````@```&T$``#\
+M_________VMI`````````@```&T$``#\_________XAI`````````@```&T$
+M``#\__________MI`````````@```&T$``#\_________R%J`````````@``
+M`&T$``#\_________X=J`````````@```+,```#\_________]IJ````````
+M`@```&T$``#\_________P1K`````````@```&T$``#\_________SEK````
+M`````@```&T$``#\_________VYK`````````@```&\```#\_________WYK
+M`````````@```)<```#\_________W!L`````````@```#\```#\________
+M_ZIL`````````@```&`$``#\_________X9M`````````@```&`$``#\____
+M______!M`````````@```&`$``#\_________R%N`````````@```&T$``#\
+M_________U9N`````````@```&T$``#\_________Z9N`````````@```&T$
+M``#\_________WMO`````````@```&`$``#\_________]YP`````````@``
+M`&`$``#\_________X)Q`````````@```&`$``#\_________Y5Q````````
+M"P````,```!X"@```````"1R`````````@```(`$``#\_________X=R````
+M`````@```&T$``#\_________[%R`````````@```&T$``#\_________PES
+M`````````@```&T$``#\_________[)S`````````@```&T$``#\________
+M_RMT`````````@```/(```#\_________SMT`````````@```/(```#\____
+M______AT`````````@```'\```#\_________Q%U`````````@```,@```#\
+M_________\=U`````````@```*L```#\_________T)W`````````@```,L`
+M``#\_________U)W`````````@```%T```#\_________YUW`````````@``
+M`!````#\_________Q%X`````````@```'\```#\_________QQX````````
+M`@```*L```#\_________S5X`````````@```,@```#\_________Y5X````
+M`````@```+H```#\_________QYY`````````@```'T```#\_________UIY
+M`````````@```+H```#\_________P=Z`````````@```+H```#\________
+M_SIZ`````````@```%T```#\_________TYZ`````````@```"(```#\____
+M_____ZUZ`````````@```&T$``#\_________]1Z`````````@```)(```#\
+M_________XA[`````````@```%D$``#\_________Y1[`````````@```)4`
+M``#\_________[1[`````````@```+H```#\_________U=\`````````@``
+M`%T```#\_________XQ\`````````@```,X```#\_________Z%\````````
+M`@```)H```#\_________[1\````````"P````8````-`````````+Y\````
+M`````@```(P$``#\_________]-\`````````@```)<$``#\_________^A\
+M`````````@```)<$``#\__________]\`````````@```#4```#\________
+M_R1]`````````@```&T$``#\_________YM]`````````@```%<```#\____
+M_____Z=]`````````@```)D```#\_________^U]`````````@```%@```#\
+M__________I]`````````@````$!``#\_________T1^`````````@```+T`
+M``#\_________Z-^`````````@```&T$``#\_________\I^`````````@``
+M`&T$``#\_________]Q^`````````@````$!``#\_________R5_````````
+M`@```$8```#\_________S1_`````````@```-````#\_________SY_````
+M`````@```(`$``#\_________VQ_`````````@```,X```#\_________X%_
+M`````````@```)<$``#\_________Y9_`````````@```)<$``#\________
+M_ZU_`````````@```#4```#\_________[U_`````````@```&T$``#\____
+M_____QF``````````@```(H```#\_________U2``````````@```)<$``#\
+M_________]:``````````@```(H```#\_________PR!`````````@```(`$
+M``#\_________R2!`````````@```&T$``#\_________S^!`````````@``
+M`&T$``#\_________UN!`````````@```&T```#\_________V.!````````
+M`@```!(!``#\_________X>!`````````@```-0```#\_________Z*"````
+M`````@```&`$``#\_________\&"`````````@```&T$``#\__________6"
+M`````````@```&T$``#\_________T*#`````````@```&T$``#\________
+M_V>#````````"P````4```#(`````````'&#`````````@```(P$``#\____
+M_____XR#`````````@```#$```#\_________\:#`````````@```&T$``#\
+M_________^6#`````````@```&T$``#\_________P2$`````````@```&T$
+M``#\_________P^$`````````@```)<```#\_________RB$`````````@``
+M`&T$``#\_________Q.%`````````@```)@```#\_________R:%````````
+M`@```$$```#\_________S>%`````````@```%L```#\_________U&%````
+M`````@```%D$``#\_________V:%````````"P```#T``````````````'J%
+M`````````@```'@$``#\_________].%`````````@```%X```#\________
+M_^N%`````````@```&X```#\__________Z%`````````@```%L```#\____
+M_____TN&````````"P```.```````````````&R&`````````@```.8```#\
+M_________WR&`````````@```,\```#\_________X>&`````````@```-,`
+M``#\_________PN'`````````@```"````#\_________P"(`````````@``
+M``,!``#\_________SV(`````````@````,!``#\_________WJ(````````
+M`@```!$!``#\_________RZ*`````````@```)````#\_________VZ*````
+M`````@```)$```#\_________Z:*`````````@```!$!``#\_________RN,
+M`````````@```&`$``#\_________^^,`````````@```(4```#\________
+M_R^-`````````@```(4```#\_________W.-`````````@```((```#\____
+M_____X6-`````````@```#L```#\_________ZR-`````````@```!$!``#\
+M__________*-`````````@```&`$``#\__________^-`````````@```!P`
+M``#\_________Y*/`````````@```*,```#\_________Z*/`````````@``
+M`"8```#\_________[*/`````````@```.T```#\_________\*/````````
+M`@```)@```#\_________]R/`````````@```%D$``#\__________&/````
+M````"P```#T```````````````N0`````````@```'@$``#\_________S20
+M`````````@```+H```#\_________[60`````````@```$````#\________
+M__20`````````@```+H```#\_________SV1`````````@````@!``#\____
+M_____UV1`````````@```+X```#\_________VJ1`````````@```$0```#\
+M_________WN1`````````@```!$!``#\_________X^1`````````@```$$`
+M``#\_________YJ1`````````@```%L```#\_________\V1`````````@``
+M`!$!``#\_________S.2`````````@```%X```#\_________TN2````````
+M`@```&X```#\_________UZ2`````````@```%L```#\_________ZN2````
+M````"P```%$``````````````,R2`````````@```.8```#\_________]R2
+M`````````@```,\```#\_________^>2`````````@```-,```#\________
+M_VB3`````````@```%X```#\_________WR3`````````@```&X```#\____
+M_____X^3`````````@```%L```#\_________[&3`````````@```&`$``#\
+M__________*3````````"P```%$``````````````!24`````````@```.8`
+M``#\_________R.4`````````@```,\```#\_________RZ4`````````@``
+M`-,```#\__________25`````````@```"L```#\_________TZ6````````
+M`@```"L```#\_________WR6`````````@```"@```#\_________Z67````
+M`````@```$$```#\_________[>7`````````@```%L```#\_________^Z7
+M`````````@```&`$``#\_________R^8`````````@```$$```#\________
+M_SJ8`````````@```%L```#\_________Z"8`````````@```%X```#\____
+M_____[R8`````````@```&X```#\_________\^8`````````@```%L```#\
+M_________R*9````````"P```(,``````````````'"9`````````@```.8`
+M``#\_________X&9`````````@```,\```#\_________XR9`````````@``
+M`-,```#\__________^9`````````@```%X```#\_________Q.:````````
+M`@```&X```#\_________R::`````````@```%L```#\_________TB:````
+M`````@```&`$``#\_________Y6:````````"P```(,``````````````-Z:
+M`````````@```.8```#\_________^Z:`````````@```,\```#\________
+M__F:`````````@```-,```#\_________ZF;`````````@```&T$``#\____
+M_____XZ?`````````@```-L```#\_________Z.?`````````@```#8```#\
+M_________Q>@`````````@```+H```#\_________Q*A`````````@```/H`
+M``#\_________T2D````````"P```#$``````````````%ND`````````@``
+M`'@$``#\__________&D````````"P````(!``````````````BE````````
+M`@```'@$``#\_________U:E`````````@```%D$``#\_________W:E````
+M`````@```%D$``#\__________ZE`````````@```+H```#\_________Q&F
+M`````````@```/8```#\_________S"F````````"P```#$`````````````
+M`$BF`````````@```'@$``#\_________]ZF`````````@```+H```#\____
+M______&F`````````@```#,```#\_________PRG````````"P````(!````
+M`````````"2G`````````@```'@$``#\_________[&G`````````@```,0`
+M``#\__________RG`````````@```'\```#\_________R&H`````````@``
+M`'H```#\_________RRH`````````@```#,```#\_________^2H````````
+M`@```+H```#\__________6I`````````@```'\```#\_________SJJ````
+M`````@```'\```#\_________UZJ`````````@```!$```#\_________].J
+M`````````@```"X```#\_________^RJ`````````@```%(```#\________
+M_TNK`````````@```-X```#\_________P6L`````````@```'\```#\____
+M_____V6L`````````@```"X```#\_________WZL`````````@```%(```#\
+M_________^:L`````````@```%P```#\_________WJM`````````@```#X`
+M``#\_________^&M`````````@```"X```#\__________JM`````````@``
+M`%(```#\_________RRO`````````@```"X```#\_________T6O````````
+M`@```%(```#\_________SZP`````````@```+H```#\_________TFP````
+M`````@```+4```#\_________U&P`````````@```.,```#\_________YFP
+M`````````@```'@```#\_________]&P`````````@```+H```#\________
+M_SVQ`````````@```+H```#\_________YVQ`````````@```+H```#\____
+M______VQ`````````@```+H```#\_________V&R`````````@```+H```#\
+M_________R2T`````````@```+H```#\_________VRT`````````@```*T`
+M``#\_________WFT`````````@```%L```#\_________[*T`````````@``
+M``0!``#\_________^FT`````````@```$0```#\_________P.U````````
+M`@```.$```#\_________RJU`````````@```+H```#\_________WRU````
+M`````@```+X```#\_________Y&U`````````@```*T```#\_________YRU
+M`````````@```%L```#\__________6U`````````@```%X```#\________
+M_P6V`````````@```)T```#\_________UFV````````"P```/T`````````
+M`````&.V`````````@```.8```#\_________VZV`````````@```-,```#\
+M_________[RV`````````@```%X```#\_________\RV`````````@```)T`
+M``#\_________R2W````````"P```/T``````````````"ZW`````````@``
+M`.8```#\_________SFW`````````@```-,```#\_________Y6W````````
+M`@```%X```#\_________ZFW`````````@```)T```#\_________P6X````
+M````"P```/T```````````````^X`````````@```.8```#\_________QJX
+M`````````@```-,```#\_________R2X`````````@```(`$``#\________
+M_X6X`````````@```%X```#\_________Z2X`````````@```)T```#\____
+M_____[>X`````````@```%L```#\_________Q&Y````````"P```/T`````
+M`````````!NY`````````@```.8```#\_________R:Y`````````@```-,`
+M``#\_________TJZ`````````@```%L```#\_________\NZ`````````@``
+M`#8```#\_________]>Z`````````@```%L```#\_________T&[````````
+M`@```%X```#\_________]V[````````"P````$```!0N0```````.>[````
+M`````@```.8```#\__________*[`````````@```-,```#\_________VJ\
+M`````````@```%X```#\_________XB\`````````@```&X```#\________
+M_Z2\`````````@```%L```#\__________J\````````"P```/4`````````
+M``````>]`````````@```.8```#\_________QB]`````````@```,\```#\
+M_________R.]`````````@```-,```#\_________WJ]`````````@```%X`
+M``#\_________YB]`````````@```&X```#\_________[2]`````````@``
+M`%L```#\_________Q*^````````"P```/4``````````````!^^````````
+M`@```.8```#\_________S"^`````````@```,\```#\_________SN^````
+M`````@```-,```#\_________Y.^`````````@```%X```#\_________[2^
+M`````````@```&X```#\_________]"^`````````@```%L```#\________
+M_SJ_````````"P```/4``````````````$>_`````````@```.8```#\____
+M_____UB_`````````@```,\```#\_________V._`````````@```-,```#\
+M_________[J_`````````@```%X```#\_________]R_`````````@```&X`
+M``#\__________:_`````````@```%L```#\_________VK`````````"P``
+M`/4``````````````'O``````````@```.8```#\_________XK`````````
+M`@```,\```#\_________Y7``````````@```-,```#\_________^#`````
+M`````@```%X```#\_________Q[!`````````@```(<```#\_________RW!
+M`````````@```%L```#\_________T?!````````"P```/4`````````````
+M`%+!`````````@```-,```#\_________X/!````````"P````,```#8"@``
+M`````/+!`````````@```/D```#\_________SK"`````````@```&T$``#\
+M_________WC"`````````@```&T$``#\_________Z;"`````````@```&T$
+M``#\_________^+"`````````@```&T$``#\_________T+#`````````@``
+M`/D```#\_________W7#`````````@```&T$``#\_________Z[#````````
+M`@```&T$``#\_________]C#`````````@```&T$``#\_________QC$````
+M`````@```&T$``#\_________WS%`````````@```,L```#\_________];&
+M`````````@```$$```#\_________T7(`````````@```-,```#\________
+M_V_(`````````@```'<```#\_________WO(`````````@```'@```#\____
+M_____Y3(`````````@```,@```#\_________P7)`````````@```!$```#\
+M_________WK)`````````@```'H```#\__________;)`````````@```'\`
+M``#\_________P'*`````````@```*L```#\_________PS*`````````@``
+M`/H```#\_________SG*`````````@```%(```#\_________S[+````````
+M"P````<`````!````````(K+`````````@```-8```#\_________V/-````
+M`````@```(`$``#\_________V[-`````````@```%L```#\_________W[-
+M`````````@```.<```#\_________XK-`````````@```(`$``#\________
+M_Y7-`````````@```%L```#\_________^3-`````````@```%X```#\____
+M_____R3.````````"P```!D``````````````"_.`````````@```-,```#\
+M_________S_.`````````@```(`$``#\_________TO.`````````@```(`$
+M``#\_________W3/`````````@```$$```#\_________W_/`````````@``
+M`%L```#\_________\+/`````````@```.<```#\_________]7/````````
+M`@```$$```#\_________^?/`````````@```%L```#\_________R_0````
+M`````@```%X```#\_________T/0`````````@```&X```#\_________U;0
+M`````````@```%L```#\_________Z+0````````"P````$```!PS@``````
+M`*_0`````````@```.8```#\_________[[0`````````@```,\```#\____
+M_____\G0`````````@```-,```#\_________Q/1`````````@```%X```#\
+M_________U31````````"P```/4``````````````%_1`````````@```-,`
+M``#\_________Z#1`````````@```%X```#\_________[#1`````````@``
+M`&X```#\_________\K1`````````@```%L```#\_________PW2````````
+M"P```/4``````````````!C2`````````@```-,```#\_________U+2````
+M`````@```$8```#\_________X32`````````@```-````#\_________X[2
+M`````````@```(`$``#\_________[;2`````````@```)X```#\________
+M_]72`````````@```#<```#\_________Q33`````````@```,X```#\____
+M_____RG3`````````@```)H```#\_________SS3````````"P````8````C
+M`````````$;3`````````@```(P$``#\_________UO3`````````@```)<$
+M``#\_________W#3`````````@```)<$``#\_________[;3`````````@``
+M`#4```#\_________];3`````````@```+H```#\_________Q+4````````
+M`@````@!``#\_________R[5`````````@```"````#\_________V75````
+M`````@```!`!``#\_________\W5`````````@```!`!``#\_________TO6
+M`````````@```,````#\_________X;6`````````@```,````#\________
+M_]C6`````````@```,````#\_________Q/7`````````@```,````#\____
+M_____QO8````````"P````$```"0U0```````$O8`````````@```$,```#\
+M_________ZO8````````"P````$```"0U0```````-O8`````````@```$,`
+M``#\_________Z+9````````"P````$```"0U0```````-39`````````@``
+M`$,```#\_________ZS:````````"P````$```"0U0```````,[:````````
+M`@```$,```#\_________SW;````````"P````$```"0U0```````%[;````
+M`````@```$,```#\_________^S<`````````@````T!``#\_________V;=
+M`````````@```(0```#\_________[K=`````````@```,````#\________
+M_X#>`````````@```*0```#\_________U??`````````@```"````#\____
+M_____X3?`````````@```!X```#\_________Y[?`````````@```!L```#\
+M__________3@`````````@```!`!``#\_________\#B`````````@```)8`
+M``#\_________SKC`````````@```*0```#\_________\KC`````````@``
+M`,````#\__________;C`````````@```,````#\_________W3D````````
+M`@```'P```#\__________CD`````````@```,````#\_________YCG````
+M`````@```,````#\_________W/J`````````@```&T$``#\_________Y?J
+M`````````@```&T$``#\_________U/K`````````@```(`$``#\________
+M_W/K`````````@```&T$``#\_________Y?K`````````@```&T$``#\____
+M_____^#K`````````@```(`$``#\_________P#L`````````@```&T$``#\
+M_________R?L`````````@```&T$``#\_________W_L`````````@```(`$
+M``#\_________Y_L`````````@```&T$``#\_________[[L`````````@``
+M`&T$``#\_________P;M`````````@```(`$``#\_________TWM````````
+M`@```%<```#\_________V#M`````````@````@!``#\_________XOM````
+M`````@```)D```#\_________\[M`````````@```%@```#\___________M
+M`````````@```+D```#\_________PWN`````````@```(`$``#\________
+M_U3N`````````@```#4```#\_________W'N`````````@```-D```#\____
+M_____ZSN`````````@```(H```#\_________]+N`````````@```%D$``#\
+M_________]_N`````````@```)4```#\_________P3O`````````@```+H`
+M``#\_________R_O`````````@```,X```#\_________T3O`````````@``
+M`)H```#\_________UGO`````````@```)<$``#\_________V[O````````
+M`@```)<$``#\_________X;O`````````@```#4```#\_________Z_O````
+M`````@```+H```#\_________\'O`````````@```)D```#\_________P7P
+M`````````@```$0```#\_________W3P`````````@```+H```#\________
+M_]CP`````````@```$0```#\_________XKQ`````````@```"````#\____
+M_____S3R`````````@```+H```#\_________U3R`````````@```#H```#\
+M_________Y_R`````````@```"````#\_________T+S`````````@```)<$
+M``#\_________VWS`````````@```$8```#\_________WOS`````````@``
+M`-````#\_________X7S`````````@```(`$``#\_________ZWS````````
+M`@```)X```#\_________\;S`````````@```#<```#\__________3S````
+M`````@```,X```#\_________PGT`````````@```)H```#\_________Q[T
+M`````````@```)<$``#\_________S/T`````````@```)<$``#\________
+M_V'T`````````@```#4```#\_________];T`````````@```#H```#\____
+M_____^GT`````````@```(L```#\_________YOU`````````@```"````#\
+M_________\SU`````````@```)D```#\_________R7W`````````@```+X`
+M``#\_________T_W`````````@```$````#\_________V[W`````````@``
+M`!$!``#\_________][W`````````@```+H```#\___________W````````
+M`@```#H```#\_________TSX`````````@```#H```#\_________WSX````
+M`````@```#H```#\_________Y+X`````````@```"````#\_________\OX
+M`````````@```%D```#\_________^3Y`````````@```&0```#\________
+M_PGZ`````````@```+H```#\_________QWZ`````````@```$8```#\____
+M_____ROZ`````````@```-````#\_________S7Z`````````@```(`$``#\
+M_________V/Z`````````@```,X```#\_________WCZ`````````@```)H`
+M``#\_________Y'Z`````````@```)<$``#\_________Z;Z`````````@``
+M`)<$``#\_________\_Z`````````@```#4```#\_________^SZ````````
+M`@```*````#\_________T;[`````````@```(@```#\_________V'[````
+M`````@```#H```#\_________YC[`````````@```#H```#\_________\;[
+M`````````@```#H```#\_________]?[`````````@```%D```#\________
+M_^G[`````````@```,P```#\_________Q#\`````````@```%D```#\____
+M_____U;]`````````@```)D```#\_________V_^`````````@```+X```#\
+M_________X_^`````````@```$````#\_________]'^`````````@````@!
+M``#\_________Q'_`````````@```#H```#\_________S#_`````````@``
+M`$D```#\_________Y#_`````````@```"4```#\_________Z;_````````
+M"P```(8``````````````+'_`````````@```/X```#\_________[[_````
+M`````@```+<```#\_________\G_`````````@```"4```#\_________Y,!
+M`0``````"P````4```#H`````````)T!`0```````@```(P$``#\________
+M_PL"`0```````@```,P```#\_________\L"`0```````@```%8```#\____
+M_____SP#`0``````"P```(8``````````````$<#`0```````@```/X```#\
+M_________W\#`0``````"P````4````X`0```````(D#`0```````@```(P$
+M``#\_________YD#`0```````@````@!``#\_________\`#`0```````@``
+M`)D```#\_________PX$`0```````@```%8```#\_________R$$`0``````
+M`@```'$```#\_________U$$`0```````@```$````#\_________R<%`0``
+M`````@```,8```#\_________S0%`0```````@```*D```#\_________QT&
+M`0```````@````@!``#\_________WP&`0```````@```+H```#\________
+M_\D&`0```````@```+X```#\_________^T&`0```````@```$0```#\____
+M_____PT'`0```````@```$````#\_________[@'`0```````@```.L```#\
+M_________T8(`0```````@```+H```#\_________\((`0```````@```.L`
+M``#\_________UH)`0```````@```)<$``#\_________W0)`0```````@``
+M`)<$``#\_________Z0)`0```````@```.L```#\_________Q8*`0``````
+M`@```)<$``#\_________VL*`0```````@```)<$``#\_________Y$+`0``
+M`````@```*$```#\_________YX+`0```````@```-$```#\_________[`+
+M`0```````@```%H```#\_________\(+`0```````@```%H```#\________
+M_\\+`0```````@```/````#\_________]P+`0```````@```+\```#\____
+M_____^D+`0```````@```-@```#\__________D+`0```````@```-T```#\
+M_________R4,`0```````@```+H```#\_________WL,`0```````@```+X`
+M``#\_________YT,`0```````@```$0```#\_________[T,`0```````@``
+M`$````#\_________PP-`0```````@```!$!``#\_________R`-`0``````
+M"P````8````Y`````````"H-`0```````@```(P$``#\_________S<-`0``
+M`````@```!$!``#\_________U<-`0```````@```+H```#\_________YP-
+M`0```````@````@!``#\__________4.`0```````@```%@```#\________
+M__\.`0```````@```(`$``#\_________Q</`0```````@```%@```#\____
+M_____R$/`0```````@```(`$``#\_________\L/`0```````@```&T$``#\
+M_________^`/`0```````@```&T$``#\_________Q@0`0```````@```(`$
+M``#\_________S40`0```````@```$0```#\_________U$0`0```````@``
+M`+D```#\_________V<0`0```````@```+D```#\_________W40`0``````
+M`@```(`$``#\_________YT0`0```````@```&T$``#\_________\X0`0``
+M`````@```&T$``#\_________^X0`0```````@```&T$``#\_________PL1
+M`0```````@```(`$``#\_________QL1`0``````"P````4```!P`0``````
+M`"41`0```````@```(P$``#\_________T$1`0``````"P````8```!-````
+M`````$L1`0```````@```(P$``#\_________]81`0```````@```%8```#\
+M_________RH2`0```````@```(H```#\_________TP2`0```````@```+H`
+M``#\_________Y@2`0```````@```+X```#\_________[T2`0```````@``
+M`$0```#\_________]T2`0```````@```$````#\_________R$3`0``````
+M`@```(H```#\_________U03`0```````@````@!``#\_________V83`0``
+M`````@```!$!``#\_________Y03`0```````@```+H```#\_________^83
+M`0```````@```+X```#\_________PT4`0```````@```$0```#\________
+M_RT4`0```````@```$````#\_________V<4`0```````@```+H```#\____
+M_____ZT4`0```````@````@!``#\_________QX5`0``````"P````,```"8
+M"P```````'<5`0```````@```(H```#\_________X@5`0```````@```&T$
+M``#\_________Z@5`0```````@```*@```#\_________\05`0```````@``
+M`*@```#\_________^`5`0```````@```*@```#\__________P5`0``````
+M`@```*@```#\_________QT6`0```````@```)L```#\_________S\6`0``
+M`````@```)L```#\_________V$6`0```````@```)L```#\_________X,6
+M`0```````@```)L```#\_________[`6`0```````@```)L```#\________
+M_](6`0```````@```)L```#\_________^X6`0```````@```*@```#\____
+M_____PH7`0```````@```*@```#\_________R87`0```````@```*@```#\
+M_________U,7`0```````@```)L```#\_________V\7`0```````@```*@`
+M``#\_________\`7`0```````@```(`$``#\_________S,8`0```````@``
+M`&T$``#\_________TT8`0```````@```&T$``#\_________UX8`0``````
+M`@```(`$``#\_________VT8`0```````@```$0```#\_________WP8`0``
+M`````@```(`$``#\_________Y,8`0```````@```*@```#\_________YT8
+M`0```````@```(`$``#\_________[D8`0```````@```*@```#\________
+M_\,8`0```````@```(`$``#\__________`8`0```````@```)L```#\____
+M______H8`0```````@```(`$``#\_________Q,9`0```````@```*@```#\
+M_________QT9`0```````@```(`$``#\_________S89`0```````@```*@`
+M``#\_________T`9`0```````@```(`$``#\_________T<9`0```````@``
+M`&(```#\_________U,9`0```````@```,<```#\_________W(9`0``````
+M`@```)L```#\_________WL:`0```````@```"````#\_________Y<:`0``
+M`````@```"````#\_________P`;`0```````@```(\```#\_________R,<
+M`0```````@```(`$``#\_________]X<`0```````@```(`$``#\________
+M__T<`0```````@```&T$``#\_________QD=`0```````@```&T$``#\____
+M_____]P=`0```````@```(`$``#\__________(=`0```````@```&T$``#\
+M_________P(>`0```````@```&T$``#\_________YP>`0```````@```(`$
+M``#\_________[(>`0```````@```&T$``#\_________\(>`0```````@``
+M`&T$``#\_________W$?`0```````@```,(```#\_________[4?`0``````
+M`@```*\```#\_________]X?`0```````@```.P```#\__________(?`0``
+M`````@```,(```#\_________RD@`0```````@```&T$``#\_________T8@
+M`0```````@```&T$``#\_________WL@`0```````@```&T$``#\________
+M_Y@@`0```````@```&T$``#\_________^4@`0```````@```-\```#\____
+M_____P`A`0```````@```!4```#\_________VPA`0```````@```(`$``#\
+M_________XTA`0```````@```&T$``#\_________ZPA`0```````@```&T$
+M``#\_________\8B`0``````"P```!T``````````````/8B`0```````@``
+M`.H```#\_________Q@C`0```````@```,H```#\_________RDC`0``````
+M`@```/$```#\_________SLC`0```````@```/$```#\_________]4C`0``
+M`````@```&T$``#\__________@C`0```````@```&T$``#\_________RPD
+M`0```````@```(`$``#\_________T8D`0```````@```&T$``#\________
+M_Y(D`0```````@```&T$``#\__________DD`0```````@```&T$``#\____
+M_____VLE`0```````@```&T$``#\_________]`E`0```````@```(`$``#\
+M__________$E`0```````@```&T$``#\_________PXF`0```````@```&T$
+M``#\_________V,F`0```````@```%0```#\_________VTF`0```````@``
+M`%````#\_________Z\F`0```````@```(`$``#\_________R\G`0``````
+M`@```(`$``#\_________Z\G`0```````@```(`$``#\_________PHH`0``
+M`````@```'````#\_________Q0H`0```````@```(`$``#\_________S$H
+M`0```````@```&T$``#\_________TXH`0```````@```&T$``#\________
+M_\LH`0```````@```(`$``#\_________]<H`0```````@```&T```#\____
+M_____^LH`0```````@```!(!``#\__________DH`0```````@```&T$``#\
+M_________Q(I`0```````@```&T$``#\_________RXI`0```````@```&T$
+M``#\_________R4J`0```````@```&T$``#\_________R4L`0```````@``
+M`$$```#\_________S<L`0```````@```%L```#\_________Y`L`0``````
+M`@```$$```#\_________YLL`0```````@```%L```#\_________ZXL`0``
+M`````@```$````#\_________YDM`0```````@```&`$``#\_________^,M
+M`0``````"P````8```!C`````````.TM`0```````@```(P$``#\________
+M_P`N`0```````@```$$```#\_________PLN`0```````@```%L```#\____
+M_____R0N`0```````@```+H```#\_________XDN`0```````@```+H```#\
+M__________8N`0```````@```$````#\_________Z0O`0```````@```(`$
+M``#\_________R,P`0```````@```(`$``#\_________U\P`0```````@``
+M`(`$``#\_________W\P`0```````@```$$```#\_________XHP`0``````
+M`@```%L```#\_________Y@P`0```````@```',```#\_________U4Q`0``
+M`````@```(`$``#\_________X\Q`0```````@```(`$``#\_________Z\Q
+M`0```````@```$$```#\_________[HQ`0```````@```%L```#\________
+M_\@Q`0```````@```',```#\_________PHR`0```````@```(`$``#\____
+M_____U$R`0```````@```(`$``#\_________Z`R`0```````@```(`$``#\
+M_________],R`0```````@```$$```#\_________]XR`0```````@```%L`
+M``#\_________^DR`0```````@```$````#\_________S0T`0```````@``
+M`$$```#\_________S\T`0```````@```%L```#\_________]$T`0``````
+M`@```$0```#\_________^`T`0```````@```(`$``#\_________PTU`0``
+M`````@````0!``#\_________R(U`0```````@```$0```#\_________WHU
+M`0``````"P````4```"H`0```````(0U`0```````@```(P$``#\________
+M_Y8U`0```````@```+0```#\_________X$V`0```````@```$$```#\____
+M_____XPV`0```````@```%L```#\_________Z$V`0```````@```$$```#\
+M_________ZPV`0```````@```%L```#\_________[<V`0```````@```$0`
+M``#\_________^,W`0```````@```$$```#\_________^XW`0```````@``
+M`%L```#\_________S(X`0``````"P````4```#(`0```````#PX`0``````
+M`@```(P$``#\_________ULX`0```````@```#4```#\_________VPX`0``
+M`````@````@!``#\_________WPX`0```````@```(`$``#\_________X<X
+M`0```````@```%L```#\_________YPX`0```````@```%@```#\________
+M_Z@X`0```````@```(`$``#\_________[,X`0```````@```%L```#\____
+M_____[XX`0```````@```#P```#\_________P@Y`0```````@```%X```#\
+M_________W4Y`0``````"P````$````@,P$``````'PY`0``````"P`````!
+M`````````````)(Y`0```````@```-,```#\_________\LY`0```````@``
+M`%X```#\_________^<Y`0```````@```&X```#\_________P$Z`0``````
+M`@```%L```#\_________U8Z`0``````"P````$````@,P$``````&,Z`0``
+M`````@```.8```#\_________W,Z`0```````@```,\```#\_________WXZ
+M`0```````@```-,```#\_________U(]`0```````@```'8```#\________
+M_X\]`0```````@```%X```#\_________]T]`0``````"P````$````@,P$`
+M`````.L]`0```````@```-,```#\_________R\^`0```````@```%X```#\
+M_________WT^`0``````"P````$````@,P$``````(L^`0```````@```-,`
+M``#\_________\\^`0```````@```%X```#\_________Q4_`0``````"P``
+M``$````@,P$``````"`_`0```````@```-,```#\_________U\_`0``````
+M`@```%X```#\_________Z4_`0``````"P````$````@,P$``````+`_`0``
+M`````@```-,```#\_________^\_`0```````@```%X```#\_________T!`
+M`0``````"P````$````@,P$``````$M``0```````@```-,```#\________
+M_X]``0```````@```%X```#\_________]5``0``````"P````$````@,P$`
+M`````.!``0```````@```-,```#\_________Q]!`0```````@```%X```#\
+M_________V5!`0``````"P````$````@,P$``````'!!`0```````@```-,`
+M``#\_________\9!`0```````@```%X```#\_________P]"`0``````"P``
+M`(```````````````!9"`0``````"P```$4``````````````"E"`0``````
+M`@```-,```#\_________XY"`0```````@```%X```#\__________1"`0``
+M````"P```(```````````````/M"`0``````"P```$4```````````````Y#
+M`0```````@```-,```#\_________Z]$`0```````@```)L```#\________
+M_PE%`0```````@```$$```#\_________Q=%`0```````@```%L```#\____
+M_____RM%`0```````@```(H```#\_________TA%`0``````"P````,```!H
+M#````````&=%`0```````@```&T$``#\_________[5%`0```````@```&T$
+M``#\_________]U%`0```````@```&T$``#\_________RY&`0```````@``
+M`&T$``#\_________U%&`0```````@```&T$``#\_________ZY&`0``````
+M`@```&T$``#\_________^A&`0```````@```&T$``#\_________RU'`0``
+M`````@```(`$``#\_________UM'`0```````@```*`$``#\_________XM'
+M`0```````@```&T$``#\_________ZY'`0```````@```&T$``#\________
+M_[Q'`0```````@```*`$``#\_________SQ(`0```````@```+H```#\____
+M_____YA(`0```````@```,X```#\_________ZU(`0```````@```)H```#\
+M_________\-(`0```````@```)<$``#\_________]E(`0```````@```)<$
+M``#\__________I(`0```````@```#4```#\_________R-)`0```````@``
+M`&T$``#\_________T5)`0```````@```&T$``#\_________YA)`0``````
+M`@```+H```#\_________]%)`0```````@```)D```#\_________Q!*`0``
+M`````@```-````#\_________QI*`0```````@```(`$``#\_________U9*
+M`0```````@```&T$``#\_________WE*`0```````@```&T$``#\________
+M_Q=+`0```````@```$$```#\_________R)+`0```````@```%L```#\____
+M_____S%+`0```````@````@!``#\_________T]+`0```````@```$$```#\
+M_________UI+`0```````@```%L```#\_________V5+`0```````@```(H`
+M``#\__________9,`0```````@```$$```#\_________P=-`0```````@``
+M`%L```#\_________R%-`0```````@```/,```#\_________T9-`0``````
+M"P````,````X#0```````&1-`0```````@```&T$``#\_________X9-`0``
+M`````@```&T$``#\_________Q].`0```````@```+T```#\_________VQ.
+M`0```````@```&4```#\_________X=.`0```````@```+H```#\________
+M_[A.`0```````@```)<$``#\_________\U.`0```````@```$8```#\____
+M_____]Q.`0```````@```-````#\_________^9.`0```````@```(`$``#\
+M_________Q!/`0```````@```$$```#\_________QM/`0```````@```%L`
+M``#\_________RQ/`0```````@```*D```#\_________V-/`0```````@``
+M`+T```#\_________ZU/`0```````@```&4```#\_________\A/`0``````
+M`@```+H```#\__________E/`0```````@```)<$``#\_________PY0`0``
+M`````@```$8```#\_________QU0`0```````@```-````#\_________R=0
+M`0```````@```(`$``#\_________U%0`0```````@```$$```#\________
+M_UQ0`0```````@```%L```#\_________VU0`0```````@```*D```#\____
+M_____Y!0`0```````@```&T$``#\_________[)0`0```````@```&T$``#\
+M_________PE1`0```````@```-````#\_________Q-1`0```````@```(`$
+M``#\_________TY1`0```````@```&T$``#\_________W-1`0```````@``
+M`&T$``#\_________\I1`0```````@```+H```#\_________P-2`0``````
+M`@```)D```#\_________W)2`0```````@```&T$``#\_________Y!2`0``
+M`````@```&T$``#\_________\%2`0```````@```$$```#\_________\Q2
+M`0```````@```%L```#\_________]=2`0```````@```(H```#\________
+M_S]3`0```````@```&T$``#\_________Z94`0```````@```(`$``#\____
+M_____Y1<`0```````@```+H```#\_________^E<`0```````@```,4```#\
+M__________Y<`0```````@```&`$``#\_________Q5=`0```````@```#D`
+M``#\_________XA>`0```````@```'4```#\_________Y=>`0```````@``
+M`/\```#\_________X1?`0```````@```(`$``#\_________W!@`0``````
+M`@````L````>`````````'U@`0``````"P````L````@`````````(=@`0``
+M`````@```$T```#\_________[=@`0```````@````L````>`````````,1@
+M`0``````"P````L````@`````````,Y@`0```````@```$T```#\________
+M__-@`0```````@```'4```#\_________QEA`0```````@````L````<````
+M`````"5A`0``````"P````L````@`````````"]A`0```````@```$T```#\
+M_________W9A`0```````@```),```#\_________T%B`0```````@```&T$
+M``#\_________WIB`0```````@```&T$``#\_________Y)B`0```````@``
+M`!\```#\_________Z1B`0```````@```!\```#\_________[9B`0``````
+M`@```!\```#\_________\AB`0```````@```!\```#\_________]IB`0``
+M`````@```!\```#\_________^QB`0```````@```!\```#\__________YB
+M`0```````@```!\```#\_________Q!C`0```````@```!\```#\________
+M_W!C`0```````@```!\```#\__________9C`0```````@```*T```#\____
+M_____P=D`0```````@```%L```#\_________VED`0```````@```%X```#\
+M_________WED`0```````@```)T```#\_________]AD`0``````"P```"D`
+M`````````````.)D`0```````@```.8```#\_________^UD`0```````@``
+M`-,```#\_________T5E`0```````@```%X```#\_________UEE`0``````
+M`@```)T```#\__________!E`0```````@```&`$``#\_________QUF`0``
+M`````@```&`$``#\_________RAF`0``````"P```"D``````````````#9F
+M`0```````@```.8```#\_________T%F`0```````@```-,```#\________
+M_Y9F`0```````@```/L```#\_________Z1F`0```````@```-````#\____
+M_____ZYF`0```````@```(`$``#\_________^=F`0```````@```(P```#\
+M__________5F`0```````@```-````#\__________]F`0```````@```(`$
+M``#\_________R)G`0```````@```/L```#\_________S1G`0```````@``
+M`-````#\_________SYG`0```````@```(`$``#\_________XUG`0``````
+M`@```(P```#\_________[YI`0```````@```*X```#\_________ZAK`0``
+M`````@```*8```#\_________\%K`0```````@```*4```#\_________R%M
+M`0```````@```.(```#\_________[)M`0```````@```.(```#\________
+M_\%M`0```````@```&`$``#\__________9M`0```````@```(T```#\____
+M_____PMN`0``````"P```-P``````````````$MN`0```````@```*8```#\
+M_________UUN`0```````@```*4```#\__________YN`0```````@```(T`
+M``#\_________R%O`0```````@```(T```#\_________]]O`0```````@``
+M`-(```#\_________^]O`0```````@````\!``#\__________]O`0``````
+M`@```(X```#\_________U1P`0``````"P````,```!@#0```````&IR`0``
+M`````@```&T$``#\_________X9R`0```````@```(`$``#\_________UUS
+M`0```````@```&T$``#\_________]IS`0```````@```(`$``#\________
+M_]UT`0```````@```&T$``#\_________Q9U`0```````@```"H```#\____
+M______IW`0```````@```&T$``#\_________V]Y`0```````@```$L````$
+M`````````+-Y`0```````@```&T$``#\_________Q]Z`0```````@```-<`
+M```$`````````&-Z`0```````@```&T$``#\_________\]Z`0```````@``
+M`!T````$`````````!-[`0```````@```&T$``#\_________Z][`0``````
+M`@```&,````$`````````/-[`0```````@```&T$``#\_________X1\`0``
+M````"P```-<``````````````*-\`0``````"P```!T``````````````,%\
+M`0``````"P```$L``````````````.1\`0``````"P```&,`````````````
+M`*Y]`0```````@```-H```#\_________S=^`0```````@````<```"<!0``
+M`````$-^`0``````"P````<```#@!````````)A^`0``````"P```&``````
+M`````````)]^`0``````"P```&`````0`````````-%^`0``````"P```&``
+M```,`````````$E_`0``````"P```&`````0`````````,)_`0```````@``
+M`%H$``#\_________])_`0```````@````<```"<!0```````-]_`0``````
+M"P````<```#@!`````````V``0``````"P```&```````````````".``0``
+M````"P```&`````0`````````"J``0``````"P````<```#P!````````$6`
+M`0``````"P````<```#@!````````$^``0``````"P````<```#H!```````
+M`)J``0``````"P```&`````0`````````!R!`0```````@````<```"<!0``
+M`````'R!`0```````@````L```#?`````````(6!`0```````@````L```#<
+M`````````*.!`0```````@````<```"<!0```````*R!`0``````"P````<`
+M``#@!````````+.!`0``````"P````<```#P!````````-Z!`0```````@``
+M``<```"<!0````````""`0``````"P```&```````````````!."`0``````
+M"P```&`````<`````````!V"`0``````"P```&`````,`````````"6"`0``
+M````"P```&`````0`````````(*"`0``````"P```&`````<`````````!B#
+M`0```````@````L```#<`````````"&#`0```````@````L```#<````````
+M`+F$`0```````@```&@$``#\_________].$`0```````@```&@$``#\____
+M_____R>%`0```````@````<```"<!0```````#"%`0``````"P````<```#@
+M!````````#>%`0```````@````<```"<!0```````%:%`0``````"P````<`
+M``#P!````````*F%`0```````@```*0$``#\_________\B%`0```````@``
+M`)P$``#\__________6%`0```````@```"T```#\_________P2&`0``````
+M`@```"T```#\_________S"&`0```````@```-````#\_________T^&`0``
+M`````@```%D$``#\_________V2&`0``````"P```&$``````````````'>&
+M`0```````@```'@$``#\_________Z&&`0```````@```)D$``#\________
+M_\N&`0```````@````H!``#\_________].&`0```````@````H!``#\____
+M_____]N&`0```````@```!(```#\_________^R&`0```````@```!(```#\
+M__________V&`0```````@````X!``#\_________P>'`0```````@```(`$
+M``#\_________P^'`0```````@```,D```#\_________Q>'`0```````@``
+M`#@```#\_________RR'`0``````"P```&$``````````````$.'`0``````
+M`@```'@$``#\_________U"'`0```````@````@!``#\_________UV'`0``
+M`````@````@!``#\_________UN(`0```````@```$T```#\_________VF(
+M`0```````@```(`$``#\_________WZ(`0```````@```.\```#\________
+M_[*(`0``````"P````8```!W`````````+R(`0```````@```(P$``#\____
+M_____W"*`0``````"P```$@``````````````'6*`0```````@```%($``#\
+M_________[V+`0``````"P````4``````@```````,>+`0```````@```(P$
+M``#\__________>+`0```````@```%D$``#\_________PR,`0``````"P``
+M``$````0BP$``````"",`0```````@```'@$``#\__________:-`0``````
+M`@```#<```#\_________QR.`0```````@```)X```#\_________T>.`0``
+M`````@```+H```#\_________[B.`0```````@```+H```#\_________QF/
+M`0```````@```)<$``#\_________Y>/`0```````@```+H```#\________
+M_P*0`0```````@```)<$``#\_________R.1`0```````@```&P```#\____
+M_____SB1`0```````@```)H```#\_________[62`0```````@```+X```#\
+M_________P&3`0```````@```+H```#\_________TV3`0```````@```$0`
+M``#\_________Z>3`0```````@```'````#\_________\N3`0```````@``
+M`$````#\_________^F3`0```````@```+H```#\_________S>4`0``````
+M`@```.L```#\_________Q&5`0```````@```$8```#\_________TR5`0``
+M`````@```+X```#\_________W65`0```````@```$0```#\_________ZZ5
+M`0```````@```$````#\_________V>6`0```````@```$$```#\________
+M_W>6`0```````@```%L```#\_________Q.7`0```````@```%X```#\____
+M_____T*9`0```````@```&`$``#\_________QF;`0``````"P````$```#@
+ME0$``````)B;`0```````@```&@```#\_________Z6;`0```````@```.8`
+M``#\_________[.;`0```````@```,\```#\_________\V;`0```````@``
+M`&X```#\_________S:<`0```````@```&`$``#\_________Y*<`0``````
+M`@```&`$``#\_________[&<`0```````@```.8```#\_________\:<`0``
+M`````@```,\```#\_________]R<`0```````@```-,```#\_________^F<
+M`0```````@```%L```#\_________YR=`0```````@```%X```#\________
+M_[2=`0```````@```&X```#\_________\F=`0```````@```%L```#\____
+M_____^J=`0```````@```)<$``#\_________P*>`0```````@```$8```#\
+M_________TF>`0```````@```&`$``#\_________R6?`0```````@```&@`
+M``#\_________V^?`0``````"P````$`````BP$``````'Z?`0```````@``
+M`.8```#\_________Y2?`0```````@```,\```#\_________Z:?`0``````
+M`@```-,```#\_________]R?`0```````@```$8```#\_________^V?`0``
+M`````@```(`$``#\__________6?`0```````@```-````#\_________TZ@
+M`0```````@```&`$``#\_________V&@`0```````@```$$```#\________
+M_VR@`0```````@```%L```#\_________X2@`0```````@```)<$``#\____
+M_____]V@`0```````@```!,```#\_________^Z@`0```````@```!,```#\
+M_________Q6A`0```````@```-````#\_________RBT`0``````"P```)\`
+M`````````````.&U`0```````@```%X```#\_________SZV`0``````"P``
+M``$`````BP$``````$FV`0```````@```-,```#\_________XFV`0``````
+M`@```$8```#\_________YVV`0```````@```(`$``#\_________Z6V`0``
+M`````@```-````#\_________]ZV`0```````@```%L```#\_________V2W
+M`0```````@```%X```#\_________^2W`0``````"P````$`````BP$`````
+M`.^W`0```````@```-,```#\_________RFX`0```````@```$8```#\____
+M_____SVX`0```````@```(`$``#\_________T6X`0```````@```-````#\
+M_________X6X`0```````@```&X```#\_________PVY`0``````"P````$`
+M````BP$``````!RY`0```````@```.8```#\_________S*Y`0```````@``
+M`,\```#\_________SVY`0```````@```-,```#\_________W:Y`0``````
+M`@```$8```#\_________X>Y`0```````@```(`$``#\_________X^Y`0``
+M`````@```-````#\_________\&Y`0```````@```$$```#\_________]&Y
+M`0```````@```%L```#\_________]FY`0```````@```%X```#\________
+M_^ZY`0```````@```$$```#\_________^NZ`0``````"P````$`````BP$`
+M`````/JZ`0```````@```.8```#\_________Q"[`0```````@```,\```#\
+M_________QN[`0```````@```-,```#\_________U2[`0```````@```$8`
+M``#\_________V6[`0```````@```(`$``#\_________VV[`0```````@``
+M`-````#\_________Z:[`0```````@```$$```#\_________[>[`0``````
+M`@```%L```#\_________S:\`0```````@```)<$``#\_________TN\`0``
+M`````@```$8```#\_________UN\`0```````@```(`$``#\_________V.\
+M`0```````@```-````#\_________YN\`0```````@```)<$``#\________
+M_P&]`0```````@```#<```#\_________R*]`0```````@```)X```#\____
+M_____SB]`0```````@```)H```#\_________Z:]`0```````@```%X```#\
+M_________PJ^`0``````"P````$`````BP$``````!6^`0```````@```-,`
+M``#\_________TZ^`0```````@```$8```#\_________U^^`0```````@``
+M`(`$``#\_________V>^`0```````@```-````#\_________ZV^`0``````
+M`@```%L```#\__________6^`0``````"P````,```"(#@````````R_`0``
+M`````@```&P```#\_________SR_`0```````@```.4```#\_________U>_
+M`0```````@```",```#\_________V>_`0```````@```.@```#\________
+M_T7``0```````@```$H```#\_________UC``0```````@```$H```#\____
+M_____V7``0```````@```$H```#\_________WC``0```````@```$H```#\
+M_________[/``0```````@```'4$``#\_________\K``0```````@```'4$
+M``#\_________^/``0```````@```'4$``#\_________U;!`0```````@``
+M`'X```#\_________W;!`0```````@```'\$``#\_________XG!`0``````
+M`@```'\$``#\_________ZS!`0```````@```'\$``#\_________[_!`0``
+M`````@```'\$``#\_________]_!`0```````@```'\$``#\__________+!
+M`0```````@```'\$``#\_________Q+"`0```````@```'\$``#\________
+M_R7"`0```````@```'\$``#\_________U;"`0```````@```'\$``#\____
+M_____VK"`0```````@```'\$``#\_________Y/"`0```````@```'\$``#\
+M_________Z;"`0```````@```'\$``#\_________\S"`0```````@```'\$
+M``#\_________]_"`0```````@```'\$``#\___________"`0```````@``
+M`'\$``#\_________Q+#`0```````@```'\$``#\_________S+#`0``````
+M`@```'\$``#\_________T7#`0```````@```'\$``#\_________VS#`0``
+M`````@```'\$``#\_________W_#`0```````@```'\$``#\_________Y_#
+M`0```````@```'\$``#\_________[+#`0```````@```'\$``#\________
+M_]+#`0```````@```'\$``#\_________^7#`0```````@```'\$``#\____
+M_____PS$`0```````@```'\$``#\_________Q_$`0```````@```'\$``#\
+M_________S_$`0```````@```'\$``#\_________U+$`0```````@```'\$
+M``#\_________W+$`0```````@```'\$``#\_________X7$`0```````@``
+M`'\$``#\_________ZS$`0```````@```'\$``#\_________[_$`0``````
+M`@```'\$``#\_________]_$`0```````@```'\$``#\__________+$`0``
+M`````@```'\$``#\_________Q+%`0```````@```'\$``#\_________R7%
+M`0```````@```'\$``#\_________U3%`0```````@```+$$``#\________
+M_V[%`0```````@```+$$``#\_________Y;%`0```````@```+$$``#\____
+M_____[#%`0```````@```+$$``#\_________]C%`0```````@```+$$``#\
+M__________+%`0```````@```+$$``#\_________QK&`0```````@```+$$
+M``#\_________S3&`0```````@```+$$``#\_________US&`0```````@``
+M`+$$``#\_________W;&`0```````@```+$$``#\_________Z3&`0``````
+M`@```+$$``#\_________[[&`0```````@```+$$``#\_________^;&`0``
+M`````@```+$$``#\_________P#'`0```````@```+$$``#\_________R+'
+M`0```````@```!(```#\_________S''`0```````@```!(```#\________
+M_SG'`0```````@````X!``#\_________T/'`0```````@```(`$``#\____
+M_____TO'`0```````@```,D```#\_________U/'`0```````@```#@```#\
+M_________V#'`0```````@```!,```#\_________VW'`0```````@```!,`
+M``#\_________X?'`0``````"P````<```#`!0```````(S'`0```````@``
+M`$\$``#\_________S_(`0```````@````P"``#\_________V;(`0``````
+M`@```!<"``#\_________X/(`0```````@````,"``#\_________][(`0``
+M`````@```(L!``#\_________^[(`0```````@````<"``#\__________'*
+M`0```````@```&`$``#\_________SC,`0```````@```'T!``#\________
+M_T_/`0``````"P````4```!8`@```````%G/`0```````@```(P$``#\____
+M_____V3/`0``````"P````8```"8`````````&[/`0```````@```(P$``#\
+M_________Y+/`0``````"P````<`````!P```````,O/`0```````@```&T$
+M``#\_________QS0`0```````@```&T$``#\_________V#0`0```````@``
+M`&T$``#\_________WK0`0```````@```&T$``#\_________\70`0``````
+M`@```&T$``#\_________]_0`0```````@```&T$``#\_________R[1`0``
+M`````@```&T$``#\_________S_1`0```````@```&T$``#\_________X/1
+M`0```````@```(`$``#\_________YS1`0```````@```&T$``#\________
+M_[;1`0```````@```&T$``#\_________SO2`0```````@```&T$``#\____
+M_____U72`0```````@```&T$``#\_________XG2`0```````@```(`$``#\
+M_________ZO2`0```````@```&T$``#\_________\72`0```````@```&T$
+M``#\_________P[3`0```````@```&T$``#\_________Q_3`0```````@``
+M`&T$``#\_________V/3`0```````@```(`$``#\_________WS3`0``````
+M`@```&T$``#\_________Y;3`0```````@```&T$``#\_________PG4`0``
+M`````@```&T$``#\_________R/4`0```````@```&T$``#\_________WW4
+M`0```````@```&T$``#\_________^W4`0```````@```&T$``#\________
+M_VC5`0```````@```*T!``#\_________W+5`0```````@```(`$``#\____
+M_____WS5`0```````@```$0!``#\_________Z;5`0```````@```&T$``#\
+M_________\75`0```````@```&T$``#\_________]S5`0```````@```&T$
+M``#\_________P+6`0```````@```&T$``#\_________V_6`0```````@``
+M`(`$``#\_________R37`0```````@```(`$``#\_________Q78`0``````
+M`@```"8!``#\_________RG8`0```````@```",!``#\_________TO8`0``
+M`````@```(T$``#\_________VW8`0```````@```(T$``#\_________X_8
+M`0```````@```(T$``#\_________Z[8`0```````@```(T$``#\________
+M_]#8`0```````@```(T$``#\__________W8`0```````@```(T$``#\____
+M_____Q?9`0```````@```(T$``#\_________S'9`0```````@```(T$``#\
+M_________U#9`0```````@```(T$``#\_________W/9`0```````@```(T$
+M``#\_________Y;9`0```````@```(T$``#\_________[39`0```````@``
+M`(T$``#\_________]+9`0```````@```(T$``#\__________#9`0``````
+M`@```(T$``#\_________P[:`0```````@```(T$``#\_________RO:`0``
+M`````@```(T$``#\_________T[:`0```````@```(T$``#\_________V?:
+M`0```````@```(T$``#\_________XS:`0```````@```%X$``#\________
+M_ZS:`0```````@```%X$``#\_________]3:`0```````@```%X$``#\____
+M______G:`0```````@```%X$``#\_________Q[;`0```````@```%X$``#\
+M_________T';`0```````@```%X$``#\_________VS;`0```````@```%X$
+M``#\__________W<`0```````@```"8!``#\_________Y+=`0```````@``
+M`(\$``#\_________\C=`0```````@```(\$``#\__________[=`0``````
+M`@```(\$``#\_________S3>`0```````@```(\$``#\_________V3>`0``
+M`````@```(\$``#\_________WG>`0```````@```(\$``#\_________Y'>
+M`0```````@```(\$``#\__________G>`0```````@```(\$``#\________
+M_TC?`0```````@```(\$``#\_________Y??`0```````@```(\$``#\____
+M_____^G?`0```````@```(\$``#\_________TO@`0```````@```(\$``#\
+M_________W_@`0```````@```(\$``#\_________ZW@`0```````@```(`!
+M``#\_________[K@`0```````@```(\$``#\_________^G@`0```````@``
+M`#<!``#\__________;@`0```````@```(\$``#\_________R7A`0``````
+M`@```#<!``#\_________S+A`0```````@```(\$``#\_________V'A`0``
+M`````@```#<!``#\_________V[A`0```````@```(\$``#\_________Z'A
+M`0```````@```#<!``#\_________Z[A`0```````@```(\$``#\________
+M_PWB`0```````@```)P!``#\_________Q'E`0```````@```)H$``#\____
+M_____R[E`0```````@```)H$``#\_________TOE`0```````@```)H$``#\
+M_________VCE`0```````@```)H$``#\_________X7E`0```````@```)H$
+M``#\_________Z+E`0```````@```)H$``#\_________]'E`0```````@``
+M`-(!``#\_________Q[F`0```````@```)H$``#\_________TWF`0``````
+M`@```-(!``#\__________CF`0```````@```-(!``#\_________RKG`0``
+M`````@```)<$``#\_________S[G`0```````@```!H!``#\_________TSG
+M`0```````@```,`!``#\_________U;G`0```````@```(`$``#\________
+M_WSG`0```````@````8"``#\_________QKH`0```````@```(P!``#\____
+M_____S7H`0```````@```*`!``#\_________PWI`0```````@```*\!``#\
+M_________XCI`0```````@```&X!``#\__________7M`0```````@```!@"
+M``#\_________USN`0```````@```"(!``#\_________Y#N`0```````@``
+M`*\!``#\_________S#O`0``````"P````,```#@#@```````$/O`0``````
+M`@```&0!``#\_________V_O`0```````@```&0!``#\_________Y?O`0``
+M`````@```&0!``#\_________[_O`0```````@```&0!``#\__________GO
+M`0```````@```%P!``#\_________S[P`0```````@```&H!``#\________
+M_]KQ`0```````@```)0!``#\_________P3R`0```````@```(`$``#\____
+M_____Y#T`0```````@```'X!``#\_________Y_T`0```````@```'4!``#\
+M_________V7U`0```````@```*<!``#\__________?U`0```````@```!T!
+M``#\_________Q3V`0```````@```*<!``#\_________\3W`0```````@``
+M`$T!``#\_________^;W`0```````@```'`!``#\_________UGX`0``````
+M`@```$T!``#\_________Y3X`0```````@```'`!``#\_________Y_Z`0``
+M`````@```*@!``#\_________]?Z`0``````"P````,````P#P```````(W[
+M`0```````@```&`$``#\_________ZG[`0``````"P````,```#0$P``````
+M`%+\`0```````@```!<!``#\_________V+\`0```````@```!<!``#\____
+M_______\`0```````@```$T!``#\_________SK]`0```````@```'`!``#\
+M_________ZW]`0```````@```+T!``#\_________^3]`0```````@```*L!
+M``#\_________P#^`0```````@```+T!``#\_________P_^`0```````@``
+M`,8!``#\_________RO^`0```````@```+T!``#\_________W+^`0``````
+M`@```-4!``#\_________]3^`0```````@```+T!``#\_________^W^`0``
+M`````@```-4!``#\_________RD``@```````@```(T!``#\_________S<`
+M`@```````@```.$!``#\_________Z,``@```````@```-(!``#\________
+M_[(``@```````@```-T!``#\_________S<!`@``````"P````$````@_P$`
+M`````$$!`@```````@```(L!``#\_________TP!`@```````@```,,!``#\
+M_________^H!`@```````@```&T$``#\_________PP"`@```````@```&L!
+M``#\_________QP"`@```````@```,0!``#\_________SX"`@```````@``
+M`&L!``#\_________T8"`@```````@```"<!``#\_________V4"`@``````
+M"P````,````P&0```````'P"`@```````@```'(!``#\_________Y@"`@``
+M`````@```'(!``#\_________[0"`@```````@```!H!``#\_________]8"
+M`@```````@```!8!``#\_________^T"`@```````@```(,!``#\________
+M_Q`#`@```````@```!H!``#\_________RL#`@```````@```!8!``#\____
+M_____T(#`@```````@```!H!``#\_________U0#`@```````@```(,!``#\
+M_________VD#`@```````@```!H!``#\_________YP#`@```````@```,`!
+M``#\_________Z8#`@```````@```(`$``#\_________QD$`@```````@``
+M`+8!``#\_________S($`@```````@```"`!``#\_________UD$`@``````
+M`@```(8!``#\_________VX$`@```````@```)4!``#\_________X$$`@``
+M````"P````8```"E`````````(L$`@```````@```(P$``#\_________Z$$
+M`@```````@```)<$``#\_________[<$`@```````@```)<$``#\________
+M_\H$`@```````@```$,!``#\_________^H$`@```````@```-(!``#\____
+M_____R<%`@```````@````X"``#\_________]H%`@```````@```#X!``#\
+M__________T%`@```````@```#0!``#\_________R4&`@```````@```(P!
+M``#\_________TX&`@```````@```/<!``#\_________U8&`@```````@``
+M`(P!``#\_________Z,&`@```````@```#0!``#\_________^L&`@``````
+M`@```!8!``#\_________Q0'`@```````@```-(!``#\_________T4'`@``
+M`````@```)<$``#\_________UP'`@```````@```!H!``#\_________W<'
+M`@```````@```,`!``#\_________X$'`@```````@```(`$``#\________
+M_[<'`@```````@```/(!``#\_________P`(`@``````"P````4```"P`@``
+M``````H(`@```````@```(P$``#\_________QH(`@```````@```!H!``#\
+M_________X<(`@```````@```,`!``#\_________Y$(`@```````@```(`$
+M``#\_________]4(`@```````@```+8!``#\__________4(`@```````@``
+M`"`!``#\_________QX)`@```````@```(8!``#\_________S,)`@``````
+M`@```)4!``#\_________T8)`@``````"P````8```"E`````````%`)`@``
+M`````@```(P$``#\_________V4)`@```````@```)<$``#\_________WH)
+M`@```````@```)<$``#\_________XT)`@```````@```$,!``#\________
+M_Y\)`@```````@```!H!``#\_________Z<)`@```````@```(P!``#\____
+M_____TD*`@```````@```+$!``#\_________VL*`@```````@```#0!``#\
+M_________Y,*`@```````@```(P!``#\_________[<*`@```````@```/<!
+M``#\_________[\*`@```````@```(P!``#\_________^(*`@```````@``
+M`#0!``#\_________Q0+`@```````@```!H!``#\_________R8+`@``````
+M`@```(,!``#\_________T0+`@```````@```-(!``#\_________W<+`@``
+M`````@```)<$``#\_________XP+`@```````@```!H!``#\_________YH+
+M`@```````@```,`!``#\_________Z0+`@```````@```(`$``#\________
+M_\4+`@```````@```(@!``#\_________^@+`@```````@```#0!``#\____
+M_____R0,`@```````@```-(!``#\_________T,,`@```````@```)<$``#\
+M_________UP,`@```````@```!H!``#\_________VH,`@```````@```,`!
+M``#\_________W0,`@```````@```(`$``#\_________YL,`@```````@``
+M`(8!``#\_________[`,`@```````@```)4!``#\_________\4,`@``````
+M`@```)<$``#\_________]H,`@```````@```)<$``#\_________^T,`@``
+M`````@```$,!``#\_________PP-`@```````@```!H!``#\_________Q<-
+M`@```````@```$X!``#\_________R\-`@```````@```&T$``#\________
+M_W<-`@```````@```$P!``#\_________X(-`@```````@```,$!``#\____
+M_____\\-`@```````@```*$!``#\__________L-`@```````@```-(!``#\
+M_________YL.`@```````@```)8!``#\_________Z</`@```````@```#0!
+M``#\_________]@/`@```````@```#\!``#\__________$/`@```````@``
+M`"$!``#\_________RL0`@```````@```.0!``#\_________UP0`@``````
+M`@```-H!``#\_________X(0`@```````@```-(!``#\_________RH1`@``
+M`````@```)8!``#\_________SD2`@```````@```#\!``#\_________VL2
+M`@```````@```)<!``#\_________[L2`@```````@```-(!``#\________
+M_\T2`@```````@```)`!``#\_________V(3`@```````@```/<!``#\____
+M______$3`@```````@```/<!``#\__________X3`@```````@```!0!``#\
+M_________RD4`@```````@```/<!``#\_________T<4`@```````@```#0!
+M``#\_________VT4`@```````@```*0!``#\_________P(5`@```````@``
+M`&T$``#\_________R85`@```````@```(`$``#\_________U05`@``````
+M`@```&T$``#\_________W05`@```````@```&T$``#\__________45`@``
+M`````@```(`$``#\_________VL6`@```````@```$L!``#\_________X<6
+M`@```````@```(H!``#\_________Y06`@```````@```$P!``#\________
+M_\,6`@```````@```,$!``#\__________06`@```````@```.,!``#\____
+M_____QX7`@```````@```$P!``#\_________]D7`@```````@```(`$``#\
+M_________SX8`@```````@```&T$``#\_________V`8`@```````@```(`$
+M``#\_________XP8`@```````@```&T$``#\_________ZL8`@```````@``
+M`&T$``#\_________P<9`@```````@```-(!``#\_________Y$9`@``````
+M`@```!H!``#\_________[X9`@```````@```!H!``#\_________\L9`@``
+M`````@```$P!``#\_________PP:`@```````@```-(!``#\_________R@:
+M`@```````@```-(!``#\_________TD:`@```````@```%D$``#\________
+M_V@:`@```````@```,`!``#\_________W(:`@```````@```(`$``#\____
+M_____R,;`@```````@```,0!``#\_________T<;`@```````@```(8!``#\
+M_________UP;`@```````@```)4!``#\_________V\;`@``````"P````8`
+M``"E`````````'D;`@```````@```(P$``#\_________XX;`@```````@``
+M`)<$``#\_________Z,;`@```````@```)<$``#\_________[\;`@``````
+M`@```$,!``#\_________]X;`@```````@```/D!``#\_________P@<`@``
+M`````@```-(!``#\_________R@<`@```````@```,`!``#\_________S(<
+M`@```````@```(`$``#\_________W,<`@```````@```(8!``#\________
+M_X@<`@```````@```)4!``#\_________YL<`@``````"P````8```"E````
+M`````*4<`@```````@```(P$``#\_________[H<`@```````@```)<$``#\
+M_________\\<`@```````@```)<$``#\_________^8<`@```````@```$,!
+M``#\__________X<`@```````@```,$!``#\_________W(=`@```````@``
+M`&T$``#\_________Y<=`@```````@```(`$``#\_________\,=`@``````
+M`@```&T$``#\_________^(=`@```````@```&T$``#\_________[<>`@``
+M````"P```)$!`````````````+\>`@```````@```-D!``#\_________UD?
+M`@```````@```"H!``#\_________WH?`@```````@```-(!``#\________
+M_P`@`@```````@```($!``#\_________S4@`@```````@```/(!``#\____
+M_____VX@`@```````@```"P!``#\_________X4@`@```````@```)<$``#\
+M_________YT@`@```````@```)<$``#\_________]8@`@```````@```(`$
+M``#\_________^T@`@```````@```&T$``#\_________PTA`@```````@``
+M`&T$``#\_________RDA`@```````@```$P!``#\_________S$A`@``````
+M`@```%T!``#\_________WHA`@```````@```$L!``#\_________]<A`@``
+M`````@```-(!``#\_________TDB`@```````@```,T!``#\_________U@B
+M`@```````@```.8!``#\_________X0B`@```````@```/$!``#\________
+M_]PB`@```````@```&T$``#\_________PDC`@```````@```&T$``#\____
+M_____QXC`@```````@````L"``#\_________RLC`@```````@```"\!``#\
+M_________TLC`@```````@```&T$``#\_________ULC`@```````@```&T$
+M``#\_________VLC`@```````@```&T$``#\_________WLC`@```````@``
+M`&T$``#\_________^LC`@```````@```&T$``#\_________Q(D`@``````
+M`@```&T$``#\_________R$D`@```````@```#8!``#\_________UXD`@``
+M`````@```&T$``#\_________X8D`@```````@```&T$``#\_________Q,E
+M`@```````@```&T$``#\_________SHE`@```````@```&T$``#\________
+M_V$E`@```````@```%D$``#\_________Y0E`@```````@```-(!``#\____
+M_____\PE`@```````@```)<$``#\_________^`E`@```````@```!H!``#\
+M_________P$F`@```````@```',!``#\_________PLF`@```````@```(`$
+M``#\_________S(F`@``````"P````$```"0(@(``````$8F`@```````@``
+M`'@$``#\_________VHF`@```````@```&T$``#\_________XHF`@``````
+M`@```&T$``#\_________ZXF`@```````@```&T$``#\_________]HF`@``
+M`````@```&T$``#\_________PDG`@```````@```&T$``#\_________RLG
+M`@```````@```&T$``#\_________Z`G`@```````@```&T$``#\________
+M_\HG`@```````@```&T$``#\__________DG`@```````@```&T$``#\____
+M_____QLH`@```````@```&T$``#\_________Y@H`@```````@```&T$``#\
+M_________[HH`@```````@```&T$``#\_________T@I`@```````@```%D$
+M``#\_________X$I`@```````@```)<$``#\_________Y4I`@```````@``
+M`!H!``#\_________Z0I`@```````@```,`!``#\_________ZXI`@``````
+M`@```(`$``#\_________](I`@``````"P````$```!P(@(``````.HI`@``
+M`````@```'@$``#\_________Q8J`@```````@```&T$``#\_________SXJ
+M`@```````@```&T$``#\_________VLJ`@```````@```&T$``#\________
+M_Y(J`@```````@```&T$``#\_________\\J`@```````@```%D$``#\____
+M_____^\J`@```````@```-(!``#\_________R$K`@```````@```)<$``#\
+M_________T,K`@``````"P```"H!`````````````%4K`@```````@```'@$
+M``#\_________X`K`@```````@```&T$``#\_________Z(K`@```````@``
+M`&T$``#\_________UXL`@```````@```&T$``#\_________XLL`@``````
+M`@```&T$``#\_________\$L`@```````@```&T$``#\__________,L`@``
+M````"P````4```#0`@```````/TL`@```````@```(P$``#\_________S@M
+M`@```````@```.L!``#\_________Y<M`@```````@```*$!``#\________
+M_Z(M`@```````@```#X!``#\_________TTN`@```````@```#\!``#\____
+M_____W`N`@```````@```#0!``#\_________Z0N`@```````@```-(!``#\
+M_________S\O`@```````@```#\!``#\_________UTO`@```````@```#0!
+M``#\_________Z@O`@```````@```.0!``#\_________\0O`@```````@``
+M`.L!``#\_________^<P`@```````@```&T$``#\_________PLQ`@``````
+M`@```&T$``#\_________R@Q`@```````@```&T$``#\_________YLQ`@``
+M`````@```&T$``#\_________\$Q`@```````@```&T$``#\_________R<R
+M`@```````@```"$!``#\_________WHR`@```````@```&T$``#\________
+M_Z0R`@```````@```&T$``#\_________]DR`@```````@```&T$``#\____
+M_____PXS`@```````@```.L!``#\_________QXS`@```````@```&T!``#\
+M_________Q`T`@```````@```*X!``#\_________THT`@```````@```&`$
+M``#\_________R8U`@```````@```&`$``#\_________Y`U`@```````@``
+M`&`$``#\_________\$U`@```````@```&T$``#\__________8U`@``````
+M`@```&T$``#\_________T8V`@```````@```&T$``#\_________QLW`@``
+M`````@```&`$``#\_________WXX`@```````@```&`$``#\_________R(Y
+M`@```````@```&`$``#\_________S4Y`@``````"P````,```!8&0``````
+M`,0Y`@```````@```(`$``#\_________R<Z`@```````@```&T$``#\____
+M_____U$Z`@```````@```&T$``#\_________ZDZ`@```````@```&T$``#\
+M_________U([`@```````@```&T$``#\_________\L[`@```````@```.\!
+M``#\_________]L[`@```````@```.\!``#\_________Y@\`@```````@``
+M`#\!``#\_________[$\`@```````@```#0!``#\_________V<]`@``````
+M`@```/8!``#\_________^(^`@```````@```&L!``#\__________(^`@``
+M`````@```,0!``#\_________ST_`@```````@```-$!``#\_________[$_
+M`@```````@```#\!``#\_________[P_`@```````@```/8!``#\________
+M_]4_`@```````@```#0!``#\_________S5``@```````@```-(!``#\____
+M_____[Y``@```````@```*D!``#\__________I``@```````@```-(!``#\
+M_________Z=!`@```````@```-(!``#\_________]I!`@```````@```,0!
+M``#\_________^Y!`@```````@```(P!``#\_________TU"`@```````@``
+M`&T$``#\_________W1"`@```````@```)8!``#\_________RA#`@``````
+M`@```%D$``#\_________S1#`@```````@```$X!``#\_________U1#`@``
+M`````@```-(!``#\__________=#`@```````@```,0!``#\_________RQ$
+M`@```````@```(8!``#\_________T%$`@```````@```)4!``#\________
+M_U1$`@``````"P````8```"E`````````%Y$`@```````@```(P$``#\____
+M_____W-$`@```````@```)<$``#\_________XA$`@```````@```)<$``#\
+M_________Y]$`@```````@```$,!``#\_________\1$`@```````@```&T$
+M``#\_________SM%`@```````@```!,"``#\_________T=%`@```````@``
+M`%L!``#\_________XU%`@```````@```"T!``#\_________YI%`@``````
+M`@```"\!``#\_________^1%`@```````@```&\!``#\_________T-&`@``
+M`````@```&T$``#\_________VI&`@```````@```&T$``#\_________WQ&
+M`@```````@```"\!``#\_________\5&`@```````@```!H!``#\________
+M_]1&`@```````@```,`!``#\_________]Y&`@```````@```(`$``#\____
+M_____PQ'`@```````@```(8!``#\_________R%'`@```````@```)<$``#\
+M_________S9'`@```````@```)<$``#\_________TU'`@```````@```$,!
+M``#\_________UU'`@```````@```&T$``#\_________[E'`@```````@``
+M`/$!``#\__________1'`@```````@```)<$``#\_________W9(`@``````
+M`@```/$!``#\_________ZQ(`@```````@```(`$``#\_________\1(`@``
+M`````@```&T$``#\_________]](`@```````@```&T$``#\__________M(
+M`@```````@```$P!``#\_________P-)`@```````@```%T!``#\________
+M_R=)`@```````@```,T!``#\_________T)*`@```````@```&`$``#\____
+M_____V%*`@```````@```&T$``#\_________Y5*`@```````@```&T$``#\
+M_________^)*`@```````@```&T$``#\_________P=+`@``````"P````4`
+M```@`P```````!%+`@```````@```(P$``#\_________RQ+`@```````@``
+M`&8!``#\_________V9+`@```````@```&T$``#\_________X5+`@``````
+M`@```&T$``#\_________Z1+`@```````@```&T$``#\_________Z]+`@``
+M`````@```&T!``#\_________\A+`@```````@```&T$``#\_________[-,
+M`@```````@```%(!``#\_________\9,`@```````@```(<!``#\________
+M_]=,`@```````@```.$!``#\__________%,`@```````@```%D$``#\____
+M_____P9-`@``````"P```#4!`````````````!I-`@```````@```'@$``#\
+M_________W--`@```````@```-T!``#\_________XM-`@```````@````P"
+M``#\_________YY-`@```````@```.$!``#\_________^M-`@``````"P``
+M`-<!``````````````Q.`@```````@```(L!``#\_________QQ.`@``````
+M`@````<"``#\_________R=.`@```````@```,,!``#\_________ZM.`@``
+M`````@```+`!``#\_________Z!/`@```````@```-`!``#\_________]U/
+M`@```````@```-`!``#\_________QI0`@```````@```%D!``#\________
+M_\Y1`@```````@```$`!``#\_________PY2`@```````@```(\!``#\____
+M_____T92`@```````@```%D!``#\_________\M3`@```````@```&`$``#\
+M_________X]4`@```````@```.T!``#\_________\]4`@```````@```.T!
+M``#\_________Q-5`@```````@```,4!``#\_________R55`@```````@``
+M`#,!``#\_________TQ5`@```````@```%D!``#\_________Y)5`@``````
+M`@```&`$``#\_________Y]5`@```````@```&$!``#\_________S)7`@``
+M`````@```)H!``#\_________T)7`@```````@```/@!``#\_________U)7
+M`@```````@```)\!``#\_________V)7`@```````@```%(!``#\________
+M_WQ7`@```````@```%D$``#\_________Y%7`@``````"P```#4!````````
+M`````*M7`@```````@```'@$``#\_________]17`@```````@```-(!``#\
+M_________U58`@```````@```"P!``#\_________Y18`@```````@```-(!
+M``#\_________]U8`@```````@````X"``#\__________U8`@```````@``
+M`($!``#\_________PI9`@```````@```/(!``#\_________QM9`@``````
+M`@```%D!``#\_________R]9`@```````@```(<!``#\_________SI9`@``
+M`````@```.$!``#\_________VU9`@```````@```%D!``#\_________]-9
+M`@```````@```-T!``#\_________^M9`@```````@````P"``#\________
+M__Y9`@```````@```.$!``#\_________TM:`@``````"P```.@!````````
+M`````&Q:`@```````@```(L!``#\_________WQ:`@```````@````<"``#\
+M_________X=:`@```````@```,,!``#\_________PA;`@```````@```-T!
+M``#\_________QQ;`@```````@````P"``#\_________R];`@```````@``
+M`.$!``#\_________U%;`@```````@```&`$``#\_________Y);`@``````
+M"P```.@!`````````````+1;`@```````@```(L!``#\_________\-;`@``
+M`````@````<"``#\_________\Y;`@```````@```,,!``#\_________Y1=
+M`@```````@```!8"``#\_________^Y=`@```````@```!8"``#\________
+M_QQ>`@```````@```&D!``#\_________T5?`@```````@```(<!``#\____
+M_____U=?`@```````@```.$!``#\_________XY?`@```````@```&`$``#\
+M_________\]?`@```````@```(<!``#\_________]I?`@```````@```.$!
+M``#\_________T!@`@```````@```-T!``#\_________UQ@`@```````@``
+M``P"``#\_________V]@`@```````@```.$!``#\_________\)@`@``````
+M"P```(4!`````````````!!A`@```````@```(L!``#\_________R%A`@``
+M`````@````<"``#\_________RQA`@```````@```,,!``#\_________Y]A
+M`@```````@```-T!``#\_________[-A`@```````@````P"``#\________
+M_\9A`@```````@```.$!``#\_________^AA`@```````@```&`$``#\____
+M_____S5B`@``````"P```(4!`````````````'YB`@```````@```(L!``#\
+M_________XYB`@```````@````<"``#\_________YEB`@```````@```,,!
+M``#\_________TEC`@```````@```&T$``#\_________RYG`@```````@``
+M`'(!``#\_________T-G`@```````@```)X!``#\_________[=G`@``````
+M`@```-(!``#\_________[)H`@```````@```/<!``#\_________^1K`@``
+M````"P```&8!`````````````/MK`@```````@```'@$``#\_________Y%L
+M`@``````"P```%@!`````````````*AL`@```````@```'@$``#\________
+M__9L`@```````@```%D$``#\_________Q9M`@```````@```%D$``#\____
+M_____YYM`@```````@```-(!``#\_________[%M`@```````@```-H!``#\
+M_________]!M`@``````"P```&8!`````````````.AM`@```````@```'@$
+M``#\_________WYN`@```````@```-(!``#\_________Y%N`@```````@``
+M`*$!``#\_________ZQN`@``````"P```%@!`````````````,1N`@``````
+M`@```'@$``#\_________U%O`@```````@```!P!``#\_________YQO`@``
+M`````@```#\!``#\_________\%O`@```````@```#X!``#\_________\QO
+M`@```````@```*$!``#\_________X1P`@```````@```-(!``#\________
+M_Y5Q`@```````@```#\!``#\_________]IQ`@```````@```#\!``#\____
+M______YQ`@```````@```+$!``#\_________W-R`@```````@```%P!``#\
+M_________XQR`@```````@```)(!``#\_________^MR`@```````@```-P!
+M``#\_________Z5S`@```````@```#\!``#\_________P5T`@```````@``
+M`%P!``#\_________QYT`@```````@```)(!``#\_________X9T`@``````
+M`@```'<!``#\_________QIU`@```````@````$"``#\_________X%U`@``
+M`````@```%P!``#\_________YIU`@```````@```)(!``#\_________\QV
+M`@```````@```%P!``#\_________^5V`@```````@```)(!``#\________
+M_]YW`@```````@```-(!``#\_________^EW`@```````@```*8!``#\____
+M______%W`@```````@```)`!``#\_________SEX`@```````@```%\!``#\
+M_________W%X`@```````@```-(!``#\_________]UX`@```````@```-(!
+M``#\_________SUY`@```````@```-(!``#\_________YUY`@```````@``
+M`-(!``#\_________P%Z`@```````@```-(!``#\_________\1[`@``````
+M`@```-(!``#\_________PQ\`@```````@```(T!``#\_________QE\`@``
+M`````@```.$!``#\_________U)\`@```````@```!8!``#\_________XE\
+M`@```````@```/(!``#\_________Z-\`@```````@```,D!``#\________
+M_\I\`@```````@```-(!``#\_________QQ]`@```````@```($!``#\____
+M_____S%]`@```````@```(T!``#\_________SQ]`@```````@```.$!``#\
+M_________Y5]`@```````@```-T!``#\_________Z5]`@```````@```)T!
+M``#\__________E]`@``````"P```*,!``````````````-^`@```````@``
+M`(L!``#\_________PY^`@```````@```,,!``#\_________UQ^`@``````
+M`@```-T!``#\_________VQ^`@```````@```)T!``#\_________\1^`@``
+M````"P```*,!`````````````,Y^`@```````@```(L!``#\_________]E^
+M`@```````@```,,!``#\_________S5_`@```````@```-T!``#\________
+M_TE_`@```````@```)T!``#\_________Z5_`@``````"P```*,!````````
+M`````*]_`@```````@```(L!``#\_________[I_`@```````@```,,!``#\
+M_________\1_`@```````@```(`$``#\_________R6``@```````@```-T!
+M``#\_________T2``@```````@```)T!``#\_________U>``@```````@``
+M`.$!``#\_________[&``@``````"P```*,!`````````````+N``@``````
+M`@```(L!``#\_________\:``@```````@```,,!``#\_________^J!`@``
+M`````@```.$!``#\_________VN"`@```````@```)X!``#\_________W>"
+M`@```````@```.$!``#\_________^&"`@```````@```-T!``#\________
+M_WV#`@``````"P````$```#P@`(``````(>#`@```````@```(L!``#\____
+M_____Y*#`@```````@```,,!``#\_________PJ$`@```````@```-T!``#\
+M_________RB$`@```````@````P"``#\_________T2$`@```````@```.$!
+M``#\_________YJ$`@``````"P```&,!`````````````*>$`@```````@``
+M`(L!``#\_________[B$`@```````@````<"``#\_________\.$`@``````
+M`@```,,!``#\_________QJ%`@```````@```-T!``#\_________SB%`@``
+M`````@````P"``#\_________U2%`@```````@```.$!``#\_________[*%
+M`@``````"P```&,!`````````````+^%`@```````@```(L!``#\________
+M_]"%`@```````@````<"``#\_________]N%`@```````@```,,!``#\____
+M_____S.&`@```````@```-T!``#\_________U2&`@```````@````P"``#\
+M_________W"&`@```````@```.$!``#\_________]J&`@``````"P```&,!
+M`````````````.>&`@```````@```(L!``#\__________B&`@```````@``
+M``<"``#\_________P.'`@```````@```,,!``#\_________UJ'`@``````
+M`@```-T!``#\_________WR'`@```````@````P"``#\_________Y:'`@``
+M`````@```.$!``#\_________PJ(`@``````"P```&,!`````````````!N(
+M`@```````@```(L!``#\_________RJ(`@```````@````<"``#\________
+M_S6(`@```````@```,,!``#\_________X"(`@```````@```-T!``#\____
+M_____[Z(`@```````@```&0!``#\_________\V(`@```````@```.$!``#\
+M_________^>(`@``````"P```&,!`````````````/*(`@```````@```,,!
+M``#\_________R.)`@``````"P````,```"X&0```````)*)`@```````@``
+M``H"``#\_________]J)`@```````@```&T$``#\_________QB*`@``````
+M`@```&T$``#\_________T:*`@```````@```&T$``#\_________X**`@``
+M`````@```&T$``#\_________^**`@```````@````H"``#\_________Q6+
+M`@```````@```&T$``#\_________TZ+`@```````@```&T$``#\________
+M_WB+`@```````@```&T$``#\_________[B+`@```````@```&T$``#\____
+M_____QR-`@```````@```&L!``#\_________W:.`@```````@```(<!``#\
+M_________^6/`@```````@```,,!``#\_________P^0`@```````@```+4!
+M``#\_________QN0`@```````@```%\!``#\_________S20`@```````@``
+M`#0!``#\_________Z60`@```````@```+$!``#\_________QJ1`@``````
+M`@```#X!``#\_________Y:1`@```````@```#\!``#\_________Z&1`@``
+M`````@```/8!``#\_________ZR1`@```````@```/<!``#\_________]F1
+M`@```````@```)(!``#\_________]Z2`@``````"P````<`````"P``````
+M`"J3`@```````@```/\!``#\_________P.5`@```````@```(`$``#\____
+M_____PZ5`@```````@```.$!``#\_________QZ5`@```````@```+<!``#\
+M_________RJ5`@```````@```(`$``#\_________S65`@```````@```.$!
+M``#\_________X25`@```````@```-T!``#\_________\25`@``````"P``
+M`+L!`````````````,^5`@```````@```,,!``#\_________]^5`@``````
+M`@```(`$``#\_________^N5`@```````@```(`$``#\_________Q27`@``
+M`````@```(<!``#\_________Q^7`@```````@```.$!``#\_________V*7
+M`@```````@```+<!``#\_________W67`@```````@```(<!``#\________
+M_X>7`@```````@```.$!``#\_________\^7`@```````@```-T!``#\____
+M_____^.7`@```````@````P"``#\__________:7`@```````@```.$!``#\
+M_________T*8`@``````"P````$````0E@(``````$^8`@```````@```(L!
+M``#\_________UZ8`@```````@````<"``#\_________VF8`@```````@``
+M`,,!``#\_________[.8`@```````@```-T!``#\__________28`@``````
+M"P```&,!`````````````/^8`@```````@```,,!``#\_________T"9`@``
+M`````@```-T!``#\_________U"9`@```````@````P"``#\_________VJ9
+M`@```````@```.$!``#\_________ZV9`@``````"P```&,!````````````
+M`+B9`@```````@```,,!``#\__________*9`@```````@```!H!``#\____
+M_____R2:`@```````@```,`!``#\_________RZ:`@```````@```(`$``#\
+M_________U::`@```````@```+8!``#\_________W6:`@```````@```"`!
+M``#\_________[2:`@```````@```(8!``#\_________\F:`@```````@``
+M`)4!``#\_________]R:`@``````"P````8```"[`````````.::`@``````
+M`@```(P$``#\__________N:`@```````@```)<$``#\_________Q";`@``
+M`````@```)<$``#\_________U:;`@```````@```$,!``#\_________W:;
+M`@```````@```-(!``#\_________[*;`@```````@````X"``#\________
+M_\Z<`@```````@```+`!``#\_________P6=`@```````@```/X!``#\____
+M_____VV=`@```````@```/X!``#\_________^N=`@```````@```*H!``#\
+M_________R:>`@```````@```*H!``#\_________WB>`@```````@```*H!
+M``#\_________[.>`@```````@```*H!``#\_________[N?`@``````"P``
+M``$````PG0(``````.N?`@```````@```!("``#\_________TN@`@``````
+M"P````$````PG0(``````'N@`@```````@```!("``#\_________T*A`@``
+M````"P````$````PG0(``````'2A`@```````@```!("``#\_________TRB
+M`@``````"P````$````PG0(``````&ZB`@```````@```!("``#\________
+M_]VB`@``````"P````$````PG0(``````/ZB`@```````@```!("``#\____
+M_____XRD`@```````@```*4!``#\_________P:E`@```````@```-,!``#\
+M_________UJE`@```````@```*H!``#\_________R"F`@```````@```.X!
+M``#\__________>F`@```````@```+`!``#\_________R2G`@```````@``
+M`#(!``#\_________SZG`@```````@```+\!``#\_________Y2H`@``````
+M`@```/X!``#\_________V"J`@```````@```-@!``#\_________]JJ`@``
+M`````@```.X!``#\_________VJK`@```````@```*H!``#\_________Y:K
+M`@```````@```*H!``#\_________Q2L`@```````@```!\!``#\________
+M_YBL`@```````@```*H!``#\_________SBO`@```````@```*H!``#\____
+M_____Q.R`@```````@```&T$``#\_________S>R`@```````@```&T$``#\
+M__________.R`@```````@```(`$``#\_________Q.S`@```````@```&T$
+M``#\_________S>S`@```````@```&T$``#\_________X"S`@```````@``
+M`(`$``#\_________Z"S`@```````@```&T$``#\_________\>S`@``````
+M`@```&T$``#\_________Q^T`@```````@```(`$``#\_________S^T`@``
+M`````@```&T$``#\_________UZT`@```````@```&T$``#\_________Z:T
+M`@```````@```(`$``#\_________^VT`@```````@```!,"``#\________
+M_P"U`@```````@````X"``#\_________RNU`@```````@```%L!``#\____
+M_____VZU`@```````@```"T!``#\_________Y^U`@```````@```/4!``#\
+M_________ZVU`@```````@```(`$``#\__________2U`@```````@```$,!
+M``#\_________Q&V`@```````@```+P!``#\_________TRV`@```````@``
+M`/$!``#\_________W*V`@```````@```%D$``#\_________W^V`@``````
+M`@```$X!``#\_________Z2V`@```````@```-(!``#\_________\^V`@``
+M`````@```(8!``#\_________^2V`@```````@```)4!``#\__________FV
+M`@```````@```)<$``#\_________PZW`@```````@```)<$``#\________
+M_R:W`@```````@```$,!``#\_________T^W`@```````@```-(!``#\____
+M_____V&W`@```````@```%L!``#\_________Z6W`@```````@```/(!``#\
+M_________Q2X`@```````@```-(!``#\_________WBX`@```````@```/(!
+M``#\_________RJY`@```````@```+`!``#\_________]2Y`@```````@``
+M`-(!``#\__________2Y`@```````@```/H!``#\_________S^Z`@``````
+M`@```+`!``#\_________^*Z`@```````@```)<$``#\_________PV[`@``
+M`````@```!H!``#\_________QN[`@```````@```,`!``#\_________R6[
+M`@```````@```(`$``#\_________TV[`@```````@```+8!``#\________
+M_V:[`@```````@```"`!``#\_________Y2[`@```````@```(8!``#\____
+M_____ZF[`@```````@```)4!``#\_________[Z[`@```````@```)<$``#\
+M_________].[`@```````@```)<$``#\_________P&\`@```````@```$,!
+M``#\_________W:\`@```````@```/H!``#\_________XF\`@```````@``
+M`%`!``#\_________SN]`@```````@```+`!``#\_________VR]`@``````
+M`@```%L!``#\_________\6^`@```````@```($!``#\_________^^^`@``
+M`````@```"P!``#\_________PZ_`@```````@```%D!``#\_________WZ_
+M`@```````@```-(!``#\_________Y^_`@```````@```/H!``#\________
+M_^R_`@```````@```/H!``#\_________QS``@```````@```/H!``#\____
+M_____S+``@```````@```+`!``#\_________VO``@```````@```/P!``#\
+M_________X3!`@```````@```%0!``#\_________ZG!`@```````@```-(!
+M``#\_________[W!`@```````@```!H!``#\_________\O!`@```````@``
+M`,`!``#\_________]7!`@```````@```(`$``#\_________P/"`@``````
+M`@```(8!``#\_________QC"`@```````@```)4!``#\_________S'"`@``
+M`````@```)<$``#\_________T;"`@```````@```)<$``#\_________V_"
+M`@```````@```$,!``#\_________XS"`@```````@```/D!``#\________
+M_^;"`@```````@````\"``#\_________P'#`@```````@```/H!``#\____
+M_____SC#`@```````@```/H!``#\_________V;#`@```````@```/H!``#\
+M_________W?#`@```````@```/P!``#\_________XG#`@```````@```'L!
+M``#\_________[##`@```````@```/P!``#\__________;$`@```````@``
+M`%L!``#\_________P_&`@```````@```($!``#\_________R_&`@``````
+M`@```"P!``#\_________W'&`@```````@````X"``#\_________['&`@``
+M`````@```/H!``#\_________]#&`@```````@```/T!``#\_________S#'
+M`@```````@```.,!``#\_________T;'`@``````"P```)$!````````````
+M`%''`@```````@```-D!``#\_________U['`@```````@```'\!``#\____
+M_____VG'`@```````@```.,!``#\_________S/)`@``````"P````4```!`
+M`P```````#W)`@```````@```(P$``#\_________ZO)`@```````@```'L!
+M``#\_________VO*`@```````@```+H!``#\_________]S*`@``````"P``
+M`)$!`````````````.?*`@```````@```-D!``#\_________Q_+`@``````
+M"P````4```"0`P```````"G+`@```````@```(P$``#\_________SG+`@``
+M`````@````X"``#\_________V#+`@```````@```%L!``#\_________Z[+
+M`@```````@```+H!``#\_________\'+`@```````@```'@!``#\________
+M__'+`@```````@```"P!``#\_________\?,`@```````@```.8!``#\____
+M_____]3,`@```````@```(@!``#\_________[W-`@```````@````X"``#\
+M_________QS.`@```````@```-(!``#\_________VG.`@```````@```($!
+M``#\_________XW.`@```````@```/(!``#\_________ZW.`@```````@``
+M`"P!``#\_________UC/`@```````@```%4!``#\_________^;/`@``````
+M`@```-(!``#\_________V+0`@```````@```%4!``#\__________K0`@``
+M`````@```)<$``#\_________Q31`@```````@```)<$``#\_________T31
+M`@```````@```%4!``#\_________[;1`@```````@```)<$``#\________
+M_PO2`@```````@```)<$``#\_________S'3`@```````@```(0!``#\____
+M_____S[3`@```````@```,(!``#\_________U#3`@```````@```$H!``#\
+M_________V+3`@```````@```$H!``#\_________V_3`@```````@```,@!
+M``#\_________WS3`@```````@```&@!``#\_________XG3`@```````@``
+M`.<!``#\_________YG3`@```````@```#@!``#\_________\73`@``````
+M`@```-(!``#\_________QO4`@```````@```($!``#\_________SW4`@``
+M`````@```/(!``#\_________UW4`@```````@```"P!``#\_________ZS4
+M`@```````@```%D!``#\_________\#4`@``````"P````8```#1````````
+M`,K4`@```````@```(P$``#\_________]?4`@```````@```%D!``#\____
+M______?4`@```````@```-(!``#\_________SS5`@```````@````X"``#\
+M_________Y76`@```````@```"T!``#\_________Y_6`@```````@```(`$
+M``#\_________[?6`@```````@```"T!``#\_________\'6`@```````@``
+M`(`$``#\_________VO7`@```````@```&T$``#\_________X#7`@``````
+M`@```&T$``#\_________[C7`@```````@```(`$``#\_________]77`@``
+M`````@```/(!``#\__________'7`@```````@```/4!``#\_________P?8
+M`@```````@```/4!``#\_________Q78`@```````@```(`$``#\________
+M_SW8`@```````@```&T$``#\_________V[8`@```````@```&T$``#\____
+M_____X[8`@```````@```&T$``#\_________ZO8`@```````@```(`$``#\
+M_________[O8`@``````"P````4```#(`P```````,78`@```````@```(P$
+M``#\_________^'8`@``````"P````8```#E`````````.O8`@```````@``
+M`(P$``#\_________W;9`@```````@```+H!``#\_________\K9`@``````
+M`@```/$!``#\_________^S9`@```````@```-(!``#\_________SC:`@``
+M`````@```($!``#\_________UW:`@```````@```/(!``#\_________WW:
+M`@```````@```"P!``#\_________\':`@```````@```/$!``#\________
+M__3:`@```````@````X"``#\_________P;;`@```````@```%D!``#\____
+M_____S3;`@```````@```-(!``#\_________X;;`@```````@```($!``#\
+M_________ZW;`@```````@```/(!``#\_________\W;`@```````@```"P!
+M``#\_________P?<`@```````@```-(!``#\_________TW<`@```````@``
+M``X"``#\_________[[<`@``````"P````,```!X&@```````!?=`@``````
+M`@```/$!``#\_________RC=`@```````@```&T$``#\_________TC=`@``
+M`````@```!4"``#\_________V3=`@```````@```!4"``#\_________X#=
+M`@```````@```!4"``#\_________YS=`@```````@```!4"``#\________
+M_[W=`@```````@```#D!``#\_________]_=`@```````@```#D!``#\____
+M_____P'>`@```````@```#D!``#\_________R/>`@```````@```#D!``#\
+M_________U#>`@```````@```#D!``#\_________W+>`@```````@```#D!
+M``#\_________X[>`@```````@```!4"``#\_________ZK>`@```````@``
+M`!4"``#\_________\;>`@```````@```!4"``#\__________/>`@``````
+M`@```#D!``#\_________P_?`@```````@```!4"``#\_________V#?`@``
+M`````@```(`$``#\_________]/?`@```````@```&T$``#\_________^W?
+M`@```````@```&T$``#\__________[?`@```````@```(`$``#\________
+M_PW@`@```````@```/(!``#\_________QS@`@```````@```(`$``#\____
+M_____S/@`@```````@```!4"``#\_________SW@`@```````@```(`$``#\
+M_________UG@`@```````@```!4"``#\_________V/@`@```````@```(`$
+M``#\_________Y#@`@```````@```#D!``#\_________YK@`@```````@``
+M`(`$``#\_________[/@`@```````@```!4"``#\_________[W@`@``````
+M`@```(`$``#\_________];@`@```````@```!4"``#\_________^#@`@``
+M`````@```(`$``#\_________^?@`@```````@```&P!``#\__________/@
+M`@```````@```*P!``#\_________Q+A`@```````@```#D!``#\________
+M_QOB`@```````@```+`!``#\_________S?B`@```````@```+`!``#\____
+M_____Z#B`@```````@```'D!``#\_________\/C`@```````@```(`$``#\
+M_________W[D`@```````@```(`$``#\_________YWD`@```````@```&T$
+M``#\_________[GD`@```````@```&T$``#\_________WSE`@```````@``
+M`(`$``#\_________Y+E`@```````@```&T$``#\_________Z+E`@``````
+M`@```&T$``#\_________SSF`@```````@```(`$``#\_________U+F`@``
+M`````@```&T$``#\_________V+F`@```````@```&T$``#\_________Q'G
+M`@```````@```+0!``#\_________U7G`@```````@```+,!``#\________
+M_W[G`@```````@```/`!``#\_________Y+G`@```````@```+0!``#\____
+M_____\GG`@```````@```&T$``#\_________^;G`@```````@```&T$``#\
+M_________QOH`@```````@```&T$``#\_________SCH`@```````@```&T$
+M``#\_________X7H`@```````@```-8!``#\_________Z#H`@```````@``
+M`!@!``#\_________PSI`@```````@```(`$``#\_________RWI`@``````
+M`@```&T$``#\_________TSI`@```````@```&T$``#\_________V;J`@``
+M````"P```"0!`````````````);J`@```````@```'H!``#\_________[CJ
+M`@```````@```+X!``#\_________\GJ`@```````@```/0!``#\________
+M_]OJ`@```````@```/0!``#\_________W7K`@```````@```&T$``#\____
+M_____YCK`@```````@```&T$``#\_________\SK`@```````@```(`$``#\
+M_________^;K`@```````@```&T$``#\_________S+L`@```````@```&T$
+M``#\_________YGL`@```````@```&T$``#\_________POM`@```````@``
+M`&T$``#\_________W#M`@```````@```(`$``#\_________Y'M`@``````
+M`@```&T$``#\_________Z[M`@```````@```&T$``#\_________P/N`@``
+M`````@```(D!``#\_________PWN`@```````@```$0!``#\_________T_N
+M`@```````@```(`$``#\_________\_N`@```````@```(`$``#\________
+M_T_O`@```````@```(`$``#\_________ZKO`@```````@```',!``#\____
+M_____[3O`@```````@```(`$``#\_________]'O`@```````@```&T$``#\
+M_________^[O`@```````@```&T$``#\_________VOP`@```````@```(`$
+M``#\_________W?P`@```````@```$P!``#\_________XOP`@```````@``
+M`%T!``#\_________YGP`@```````@```&T$``#\_________[+P`@``````
+M`@```&T$``#\_________\[P`@```````@```&T$``#\_________\7Q`@``
+M`````@```&T$``#\_________\7S`@```````@```(<!``#\_________]?S
+M`@```````@```.$!``#\_________S#T`@```````@```(<!``#\________
+M_SOT`@```````@```.$!``#\_________T[T`@```````@```"P!``#\____
+M_____SGU`@```````@```&`$``#\_________X/U`@``````"P````8```#[
+M`````````(WU`@```````@```(P$``#\_________Z#U`@```````@```(<!
+M``#\_________ZOU`@```````@```.$!``#\_________\3U`@```````@``
+M`-(!``#\_________RGV`@```````@```-(!``#\_________Y;V`@``````
+M`@```"P!``#\_________T3W`@```````@```(`$``#\_________\/W`@``
+M`````@```(`$``#\___________W`@```````@```(`$``#\_________Q_X
+M`@```````@```(<!``#\_________RKX`@```````@```.$!``#\________
+M_SCX`@```````@```,X!``#\__________7X`@```````@```(`$``#\____
+M_____R_Y`@```````@```(`$``#\_________T_Y`@```````@```(<!``#\
+M_________UKY`@```````@```.$!``#\_________VCY`@```````@```,X!
+M``#\_________ZKY`@```````@```(`$``#\__________'Y`@```````@``
+M`(`$``#\_________T#Z`@```````@```(`$``#\_________W/Z`@``````
+M`@```(<!``#\_________W[Z`@```````@```.$!``#\_________XGZ`@``
+M`````@```"P!``#\_________]3[`@```````@```(<!``#\_________]_[
+M`@```````@```.$!``#\_________W'\`@```````@```/(!``#\________
+M_X#\`@```````@```(`$``#\_________ZW\`@```````@```!8!``#\____
+M_____\+\`@```````@```/(!``#\_________QK]`@``````"P````4`````
+M!````````"3]`@```````@```(P$``#\_________S;]`@```````@```$8!
+M``#\_________R'^`@```````@```(<!``#\_________RS^`@```````@``
+M`.$!``#\_________T'^`@```````@```(<!``#\_________TS^`@``````
+M`@```.$!``#\_________U?^`@```````@```/(!``#\_________X/_`@``
+M`````@```(<!``#\_________X[_`@```````@```.$!``#\_________]+_
+M`@``````"P````4````@!````````-S_`@```````@```(P$``#\________
+M__O_`@```````@```$,!``#\_________PP``P```````@````X"``#\____
+M_____QP``P```````@```(`$``#\_________R<``P```````@```.$!``#\
+M_________SP``P```````@```"T!``#\_________T@``P```````@```(`$
+M``#\_________U,``P```````@```.$!``#\_________UX``P```````@``
+M`'P!``#\_________Z@``P```````@```-T!``#\_________Q4!`P``````
+M"P````$```#`^@(``````!P!`P``````"P```!L!`````````````#(!`P``
+M`````@```,,!``#\_________VL!`P```````@```-T!``#\_________X<!
+M`P```````@````P"``#\_________Z$!`P```````@```.$!``#\________
+M__8!`P``````"P````$```#`^@(```````,"`P```````@```(L!``#\____
+M_____Q,"`P```````@````<"``#\_________QX"`P```````@```,,!``#\
+M__________($`P```````@```$D!``#\_________R\%`P```````@```-T!
+M``#\_________WT%`P``````"P````$```#`^@(``````(L%`P```````@``
+M`,,!``#\_________\\%`P```````@```-T!``#\_________QT&`P``````
+M"P````$```#`^@(``````"L&`P```````@```,,!``#\_________V\&`P``
+M`````@```-T!``#\_________[4&`P``````"P````$```#`^@(``````,`&
+M`P```````@```,,!``#\__________\&`P```````@```-T!``#\________
+M_T4'`P``````"P````$```#`^@(``````%`'`P```````@```,,!``#\____
+M_____X\'`P```````@```-T!``#\_________^`'`P``````"P````$```#`
+M^@(``````.L'`P```````@```,,!``#\_________R\(`P```````@```-T!
+M``#\_________W4(`P``````"P````$```#`^@(``````(`(`P```````@``
+M`,,!``#\_________[\(`P```````@```-T!``#\_________P4)`P``````
+M"P````$```#`^@(``````!`)`P```````@```,,!``#\_________V8)`P``
+M`````@```-T!``#\_________Z\)`P``````"P```+@!`````````````+8)
+M`P``````"P```-0!`````````````,D)`P```````@```,,!``#\________
+M_RX*`P```````@```-T!``#\_________Y0*`P``````"P```+@!````````
+M`````)L*`P``````"P```-0!`````````````*X*`P```````@```,,!``#\
+M_________T\,`P```````@```#D!``#\_________ZD,`P```````@```(<!
+M``#\_________[<,`P```````@```.$!``#\_________\L,`P```````@``
+M`/$!``#\_________^@,`P``````"P````,```!(&P````````<-`P``````
+M`@```&T$``#\_________U4-`P```````@```&T$``#\_________WT-`P``
+M`````@```&T$``#\_________\X-`P```````@```&T$``#\__________$-
+M`P```````@```&T$``#\_________TX.`P```````@```&T$``#\________
+M_X@.`P```````@```&T$``#\_________\T.`P```````@```(`$``#\____
+M______L.`P```````@```*`$``#\_________RL/`P```````@```&T$``#\
+M_________TX/`P```````@```&T$``#\_________UP/`P```````@```*`$
+M``#\_________]P/`P```````@```-(!``#\_________S@0`P```````@``
+M`(8!``#\_________TT0`P```````@```)4!``#\_________V,0`P``````
+M`@```)<$``#\_________WD0`P```````@```)<$``#\_________YH0`P``
+M`````@```$,!``#\_________\,0`P```````@```&T$``#\_________^40
+M`P```````@```&T$``#\_________S@1`P```````@```-(!``#\________
+M_W$1`P```````@```%L!``#\_________[`1`P```````@```,`!``#\____
+M_____[H1`P```````@```(`$``#\__________81`P```````@```&T$``#\
+M_________QD2`P```````@```&T$``#\_________[<2`P```````@```(<!
+M``#\_________\(2`P```````@```.$!``#\_________]$2`P```````@``
+M``X"``#\_________^\2`P```````@```(<!``#\__________H2`P``````
+M`@```.$!``#\_________P43`P```````@```/$!``#\_________Y84`P``
+M`````@```(<!``#\_________Z<4`P```````@```.$!``#\_________\$4
+M`P```````@```(H!``#\_________^84`P``````"P````,````8'```````
+M``05`P```````@```&T$``#\_________R85`P```````@```&T$``#\____
+M_____[\5`P```````@```&\!``#\_________PP6`P```````@```(,!``#\
+M_________R<6`P```````@```-(!``#\_________U@6`P```````@```)<$
+M``#\_________VT6`P```````@```!H!``#\_________WP6`P```````@``
+M`,`!``#\_________X86`P```````@```(`$``#\_________[`6`P``````
+M`@```(<!``#\_________[L6`P```````@```.$!``#\_________\P6`P``
+M`````@```(@!``#\_________P,7`P```````@```&\!``#\_________TT7
+M`P```````@```(,!``#\_________V@7`P```````@```-(!``#\________
+M_YD7`P```````@```)<$``#\_________ZX7`P```````@```!H!``#\____
+M_____[T7`P```````@```,`!``#\_________\<7`P```````@```(`$``#\
+M__________$7`P```````@```(<!``#\__________P7`P```````@```.$!
+M``#\_________PT8`P```````@```(@!``#\_________S`8`P```````@``
+M`&T$``#\_________U(8`P```````@```&T$``#\_________ZD8`P``````
+M`@```,`!``#\_________[,8`P```````@```(`$``#\_________^X8`P``
+M`````@```&T$``#\_________Q,9`P```````@```&T$``#\_________VH9
+M`P```````@```-(!``#\_________Z,9`P```````@```%L!``#\________
+M_Q(:`P```````@```&T$``#\_________S`:`P```````@```&T$``#\____
+M_____V$:`P```````@```(<!``#\_________VP:`P```````@```.$!``#\
+M_________W<:`P```````@```/$!``#\_________]\:`P```````@```&T$
+M``#\_________T8<`P```````@```(`$``#\_________S0D`P```````@``
+M`-(!``#\_________XDD`P```````@```+D!``#\_________YXD`P``````
+M`@```&`$``#\_________[4D`P```````@```#`!``#\_________R@F`P``
+M`````@```-X!``#\_________S<F`P```````@```$L!``#\_________R0G
+M`P```````@```(`$``#\_________Q`H`P```````@````L````>`0``````
+M`!TH`P``````"P````L````@`0```````"<H`P```````@```$$!``#\____
+M_____U<H`P```````@````L````>`0```````&0H`P``````"P````L````@
+M`0```````&XH`P```````@```$$!``#\_________ZDH`P```````@```-X!
+M``#\_________[8H`P```````@```$L!``#\_________\TI`P```````@``
+M`,\!``#\_________Z$J`P```````@```&T$``#\_________]HJ`P``````
+M`@```&T$``#\__________(J`P```````@```$@!``#\_________P0K`P``
+M`````@```$@!``#\_________Q8K`P```````@```$@!``#\_________R@K
+M`P```````@```$@!``#\_________SHK`P```````@```$@!``#\________
+M_TPK`P```````@```$@!``#\_________UXK`P```````@```$@!``#\____
+M_____W`K`P```````@```$@!``#\_________P`L`P```````@```$@!``#\
+M_________X8L`P```````@```(T!``#\_________Y<L`P```````@```.$!
+M``#\__________DL`P```````@```-T!``#\_________PDM`P```````@``
+M`)T!``#\_________V@M`P``````"P```(X!`````````````'(M`P``````
+M`@```(L!``#\_________WTM`P```````@```,,!``#\_________]4M`P``
+M`````@```-T!``#\_________^DM`P```````@```)T!``#\_________X`N
+M`P```````@```&`$``#\_________ZTN`P```````@```&`$``#\________
+M_[@N`P``````"P```(X!`````````````,8N`P```````@```(L!``#\____
+M_____]$N`P```````@```,,!``#\_________R8O`P```````@```#L!``#\
+M_________S0O`P```````@```,`!``#\_________SXO`P```````@```(`$
+M``#\_________W<O`P```````@````4"``#\_________X4O`P```````@``
+M`,`!``#\_________X\O`P```````@```(`$``#\_________[(O`P``````
+M`@```#L!``#\_________\0O`P```````@```,`!``#\_________\XO`P``
+M`````@```(`$``#\_________QTP`P```````@````4"``#\_________TXR
+M`P```````@```"(!``#\_________S@T`P```````@```#H!``#\________
+M_U$T`P```````@```),!``#\_________[$U`P```````@```'0!``#\____
+M_____T(V`P```````@```'0!``#\_________U$V`P```````@```&`$``#\
+M_________X8V`P```````@```"@!``#\_________YLV`P``````"P```$4!
+M`````````````-LV`P```````@```#H!``#\_________^TV`P```````@``
+M`),!``#\_________XXW`P```````@```"@!``#\_________[$W`P``````
+M`@```"@!``#\_________V\X`P```````@```#$!``#\_________W\X`P``
+M`````@```'8!``#\_________X\X`P```````@```!X!``#\_________^0X
+M`P``````"P````,```!`'````````/HZ`P```````@```&T$``#\________
+M_Q8[`P```````@```(`$``#\_________^T[`P```````@```&T$``#\____
+M_____VH\`P```````@```(`$``#\_________VT]`P```````@```&T$``#\
+M_________Z8]`P```````@```"D!``#\_________XI``P```````@```&T$
+M``#\__________]!`P```````@```&4!```$`````````$-"`P```````@``
+M`&T$``#\_________Z]"`P```````@```"X!```$`````````/-"`P``````
+M`@```&T$``#\_________U]#`P```````@```"0!```$`````````*-#`P``
+M`````@```&T$``#\_________S]$`P```````@```%<!```$`````````(-$
+M`P```````@```&T$``#\_________Q1%`P``````"P```"X!````````````
+M`#-%`P``````"P```"0!`````````````%%%`P``````"P```&4!````````
+M`````'1%`P``````"P```%<!`````````````#Y&`P```````@```,H!``#\
+M_________WM'`P```````@```$$!``#\_________XE'`P```````@```(`$
+M``#\_________YY'`P```````@```/,!``#\_________PE(`P```````@``
+M`&T$``#\_________QU(`P```````@```&T$``#\_________UQ(`P``````
+M`@```&T$``#\_________X-(`P```````@```.D!``#\_________XU(`P``
+M`````@````L```#``@```````)A(`P``````"P````L```"``@```````*!(
+M`P```````@````L```#``@```````+1(`P```````@```&<!``#\________
+M_[Y(`P```````@````L```#$`@```````,E(`P``````"P````L```"@`@``
+M`````-%(`P```````@````L```#$`@```````.U(`P```````@````L```"\
+M`@```````/A(`P``````"P````L``````@````````!)`P```````@````L`
+M``"\`@````````9)`P```````@```%,!```(`````````"))`P```````@``
+M``L```![`@```````#))`P``````"P````L``````@```````#E)`P``````
+M`@````L```!\`@```````%5)`P```````@````L```!\`@```````&-)`P``
+M`````@````L```";`@```````'-)`P``````"P````L``````@```````'I)
+M`P```````@````L```"<`@```````)9)`P```````@````L```"<`@``````
+M`*I)`P```````@````L```"\`@```````,))`P```````@````L```!\`@``
+M`````-A)`P``````"P````L```"``@```````.5)`P```````@````L```"\
+M`@```````/))`P``````"P````L``````@```````!]*`P```````@```%,!
+M```)`````````#%*`P``````"P````L``````@```````#A*`P``````"P``
+M`%,!`````````````%5*`P```````@````<```#0"P```````)U*`P``````
+M`@````L```"\`@```````,9*`P```````@````L```"<`@```````-Q*`P``
+M````"P````L```"@`@```````.E*`P```````@````L```"\`@```````/9*
+M`P``````"P````L``````@```````"5+`P```````@```%,!```)````````
+M`#=+`P``````"P````L``````@```````#Y+`P``````"P```%,!````````
+M`````%=+`P```````@````<```#0"P```````)]+`P```````@````L```"\
+M`@```````-U+`P```````@```%,!```(`````````/Q+`P``````"P```%,!
+M```-``````````=,`P```````@````<```#0"P````````Y,`P``````"P``
+M`%,!`````````````(=,`P```````@````<````<#````````)-,`P``````
+M"P````<```#`"P```````.A,`P``````"P```%,!`````````````.],`P``
+M````"P```%,!```0`````````"%-`P``````"P```%,!```,`````````)E-
+M`P``````"P```%,!```0`````````!).`P```````@```%H$``#\________
+M_R).`P```````@````<````<#````````"].`P``````"P````<```#`"P``
+M`````&I.`P``````"P```%,!`````````````(!.`P``````"P````<```#0
+M"P```````(Y.`P```````0```%,!``#\_________ZM.`P``````"P````<`
+M``#`"P```````+5.`P``````"P````<```#("P```````,).`P``````"P``
+M`%,!```<`````````-Q.`P``````"P```%,!```<`````````/).`P``````
+M"P```%,!```<``````````!/`P``````"P```%,!```<`````````!9/`P``
+M````"P```%,!```0`````````*Q/`P```````@````<````<#`````````Q0
+M`P```````@````L```#'`@```````!50`P```````@````L```#$`@``````
+M`#-0`P```````@````<````<#````````#Q0`P``````"P````<```#`"P``
+M`````$-0`P``````"P````<```#0"P```````&Y0`P```````@````<````<
+M#````````)!0`P``````"P```%,!`````````````*-0`P``````"P```%,!
+M```<`````````*U0`P``````"P```%,!```,`````````+50`P``````"P``
+M`%,!```0`````````!)1`P``````"P```%,!```<`````````*A1`P``````
+M`@````L```#<`0```````+%1`P```````@````L```#<`0```````$E3`P``
+M`````@```&@$``#\_________V-3`P```````@```&@$``#\_________[=3
+M`P```````@````<````<#````````,!3`P``````"P````<```#`"P``````
+M`,=3`P```````@````<````<#````````.93`P``````"P````<```#0"P``
+M`````#E4`P```````@```*0$``#\_________UA4`P```````@```)P$``#\
+M_________X54`P```````@```!4!``#\_________Y14`P```````@```!4!
+M``#\_________\!4`P```````@```,`!``#\_________]]4`P```````@``
+M`%D$``#\__________14`P``````"P```%8!``````````````=5`P``````
+M`@```'@$``#\_________S%5`P```````@```)D$``#\_________UM5`P``
+M`````@```&`!``#\_________V-5`P```````@```&`!``#\_________VM5
+M`P```````@```.(!``#\_________WQ5`P```````@```.(!``#\________
+M_XU5`P```````@```((!``#\_________Y=5`P```````@```(`$``#\____
+M_____Y]5`P```````@```-\!``#\_________Z=5`P```````@```#T!``#\
+M_________[Q5`P``````"P```%8!`````````````--5`P```````@```'@$
+M``#\_________^!5`P```````@````X"``#\_________^U5`P```````@``
+M``X"``#\_________^M6`P```````@```$$!``#\__________E6`P``````
+M`@```(`$``#\_________PY7`P```````@```/,!``#\_________T)7`P``
+M````"P````8````/`0```````$Q7`P```````@```(P$``#\_________P!9
+M`P``````"P```#P!``````````````59`P```````@```%($``#\________
+M_TU:`P``````"P````4```!8!````````%=:`P```````@```(P$``#\____
+M_____X=:`P```````@```%D$``#\_________YQ:`P``````"P````$```"@
+M60,``````+!:`P```````@```'@$``#\_________X9<`P```````@```"`!
+M``#\_________ZQ<`P```````@```+8!``#\_________]=<`P```````@``
+M`-(!``#\_________TA=`P```````@```-(!``#\_________ZE=`P``````
+M`@```)<$``#\_________R=>`P```````@```-(!``#\_________Y)>`P``
+M`````@```)<$``#\_________[-?`P```````@```%H!``#\_________\A?
+M`P```````@```)4!``#\_________T5A`P```````@```($!``#\________
+M_Y%A`P```````@```-(!``#\_________]UA`P```````@```/(!``#\____
+M_____S=B`P```````@```',!``#\_________UMB`P```````@```"P!``#\
+M_________WEB`P```````@```-(!``#\_________\=B`P```````@```%4!
+M``#\_________Z%C`P```````@```!H!``#\_________]QC`P```````@``
+M`($!``#\_________P5D`P```````@```/(!``#\_________SYD`P``````
+M`@```"P!``#\__________=D`P```````@```(<!``#\_________P=E`P``
+M`````@```.$!``#\_________Z-E`P```````@```-T!``#\_________])G
+M`P```````@```&`$``#\_________ZEI`P``````"P````$```!P9`,`````
+M`"AJ`P```````@```,P!``#\_________S5J`P```````@```(L!``#\____
+M_____T-J`P```````@````<"``#\_________UUJ`P```````@````P"``#\
+M_________\9J`P```````@```&`$``#\_________R)K`P```````@```&`$
+M``#\_________T%K`P```````@```(L!``#\_________U9K`P```````@``
+M``<"``#\_________VQK`P```````@```,,!``#\_________WEK`P``````
+M`@```.$!``#\_________RQL`P```````@```-T!``#\_________T1L`P``
+M`````@````P"``#\_________UEL`P```````@```.$!``#\_________WIL
+M`P```````@```)<$``#\_________Y)L`P```````@```!H!``#\________
+M_]EL`P```````@```&`$``#\_________[5M`P```````@```,P!``#\____
+M______]M`P``````"P````$```"060,```````YN`P```````@```(L!``#\
+M_________R1N`P```````@````<"``#\_________S9N`P```````@```,,!
+M``#\_________VQN`P```````@```!H!``#\_________WUN`P```````@``
+M`(`$``#\_________X5N`P```````@```,`!``#\_________]YN`P``````
+M`@```&`$``#\__________%N`P```````@```(<!``#\__________QN`P``
+M`````@```.$!``#\_________Q1O`P```````@```)<$``#\_________VUO
+M`P```````@````("``#\_________WYO`P```````@````("``#\________
+M_Z5O`P```````@```,`!``#\_________T&$`P```````@```-T!``#\____
+M_____YZ$`P``````"P````$```"060,``````*F$`P```````@```,,!``#\
+M_________^F$`P```````@```!H!``#\__________V$`P```````@```(`$
+M``#\_________P6%`P```````@```,`!``#\_________SZ%`P```````@``
+M`.$!``#\_________\2%`P```````@```-T!``#\_________T2&`P``````
+M"P````$```"060,``````$^&`P```````@```,,!``#\_________XF&`P``
+M`````@```!H!``#\_________YV&`P```````@```(`$``#\_________Z6&
+M`P```````@```,`!``#\_________^6&`P```````@````P"``#\________
+M_VV'`P``````"P````$```"060,``````'R'`P```````@```(L!``#\____
+M_____Y*'`P```````@````<"``#\_________YV'`P```````@```,,!``#\
+M_________]:'`P```````@```!H!``#\_________^>'`P```````@```(`$
+M``#\_________^^'`P```````@```,`!``#\_________R&(`P```````@``
+M`(<!``#\_________S&(`P```````@```.$!``#\_________SF(`P``````
+M`@```-T!``#\_________TZ(`P```````@```(<!``#\_________TN)`P``
+M````"P````$```"060,``````%J)`P```````@```(L!``#\_________W")
+M`P```````@````<"``#\_________WN)`P```````@```,,!``#\________
+M_[2)`P```````@```!H!``#\_________\6)`P```````@```(`$``#\____
+M_____\V)`P```````@```,`!``#\_________P:*`P```````@```(<!``#\
+M_________Q>*`P```````@```.$!``#\_________Y:*`P```````@```)<$
+M``#\_________ZN*`P```````@```!H!``#\_________[N*`P```````@``
+M`(`$``#\_________\.*`P```````@```,`!``#\__________N*`P``````
+M`@```)<$``#\_________V&+`P```````@```"`!``#\_________X*+`P``
+M`````@```+8!``#\_________YB+`P```````@```)4!``#\_________P:,
+M`P```````@```-T!``#\_________VJ,`P``````"P````$```"060,`````
+M`'6,`P```````@```,,!``#\_________ZZ,`P```````@```!H!``#\____
+M_____[^,`P```````@```(`$``#\_________\>,`P```````@```,`!``#\
+M_________PV-`P```````@```.$!``#\_________U6-`P``````"P````,`
+M``!0'0```````&R-`P```````@```%H!``#\_________YR-`P```````@``
+M`$(!``#\_________[>-`P```````@```%X!``#\_________\>-`P``````
+M`@```.H!``#\_________Z6.`P```````@```,L!``#\_________[B.`P``
+M`````@```,L!``#\_________\6.`P```````@```,L!``#\_________]B.
+M`P```````@```,L!``#\_________Q./`P```````@```'4$``#\________
+M_RJ/`P```````@```'4$``#\_________T./`P```````@```'4$``#\____
+M_____[:/`P```````@```"8!``#\_________]:/`P```````@```'\$``#\
+M_________^F/`P```````@```'\$``#\_________PR0`P```````@```'\$
+M``#\_________Q^0`P```````@```'\$``#\_________S^0`P```````@``
+M`'\$``#\_________U*0`P```````@```'\$``#\_________W*0`P``````
+M`@```'\$``#\_________X60`P```````@```'\$``#\_________[:0`P``
+M`````@```'\$``#\_________\J0`P```````@```'\$``#\__________.0
+M`P```````@```'\$``#\_________P:1`P```````@```'\$``#\________
+M_RR1`P```````@```'\$``#\_________S^1`P```````@```'\$``#\____
+M_____U^1`P```````@```'\$``#\_________W*1`P```````@```'\$``#\
+M_________Y*1`P```````@```'\$``#\_________Z61`P```````@```'\$
+M``#\_________\R1`P```````@```'\$``#\_________]^1`P```````@``
+M`'\$``#\__________^1`P```````@```'\$``#\_________Q*2`P``````
+M`@```'\$``#\_________S*2`P```````@```'\$``#\_________T62`P``
+M`````@```'\$``#\_________VR2`P```````@```'\$``#\_________W^2
+M`P```````@```'\$``#\_________Y^2`P```````@```'\$``#\________
+M_[*2`P```````@```'\$``#\_________]*2`P```````@```'\$``#\____
+M_____^62`P```````@```'\$``#\_________PR3`P```````@```'\$``#\
+M_________Q^3`P```````@```'\$``#\_________S^3`P```````@```'\$
+M``#\_________U*3`P```````@```'\$``#\_________W*3`P```````@``
+M`'\$``#\_________X63`P```````@```'\$``#\_________[23`P``````
+M`@```+$$``#\_________\Z3`P```````@```+$$``#\__________:3`P``
+M`````@```+$$``#\_________Q"4`P```````@```+$$``#\_________SB4
+M`P```````@```+$$``#\_________U*4`P```````@```+$$``#\________
+M_WJ4`P```````@```+$$``#\_________Y24`P```````@```+$$``#\____
+M_____[R4`P```````@```+$$``#\_________]:4`P```````@```+$$``#\
+M_________P25`P```````@```+$$``#\_________QZ5`P```````@```+$$
+M``#\_________T:5`P```````@```+$$``#\_________V"5`P```````@``
+M`+$$``#\_________X*5`P```````@```.(!``#\_________Y&5`P``````
+M`@```.(!``#\_________YF5`P```````@```((!``#\_________Z.5`P``
+M`````@```(`$``#\_________ZN5`P```````@```-\!``#\_________[.5
+M`P```````@```#T!``#\_________\"5`P```````@````("``#\________
+M_\V5`P```````@````("``#\_________^>5`P``````"P````<```!`#```
+M`````.R5`P```````@```$\$``#\_________Y^6`P```````@```,X"``#\
+M_________\:6`P```````@```#L"``#\_________^.6`P```````@```#T"
+M``#\_________SZ7`P```````@```'("``#\_________TZ7`P```````@``
+M`&L"``#\_________U&9`P```````@```&`$``#\_________YB:`P``````
+M`@```*0"``#\_________Z^=`P``````"P````4```"P!````````+F=`P``
+M`````@```(P$``#\_________\2=`P``````"P````8````P`0```````,Z=
+M`P```````@```(P$``#\__________*=`P``````"P````<```"`#0``````
+M`"N>`P```````@```&T$``#\_________WR>`P```````@```&T$``#\____
+M_____\">`P```````@```&T$``#\_________]J>`P```````@```&T$``#\
+M_________R6?`P```````@```&T$``#\_________S^?`P```````@```&T$
+M``#\_________XZ?`P```````@```&T$``#\_________Y^?`P```````@``
+M`&T$``#\_________^.?`P```````@```(`$``#\__________R?`P``````
+M`@```&T$``#\_________Q:@`P```````@```&T$``#\_________YN@`P``
+M`````@```&T$``#\_________[6@`P```````@```&T$``#\_________^F@
+M`P```````@```(`$``#\_________PNA`P```````@```&T$``#\________
+M_R6A`P```````@```&T$``#\_________VZA`P```````@```&T$``#\____
+M_____W^A`P```````@```&T$``#\_________\.A`P```````@```(`$``#\
+M_________]RA`P```````@```&T$``#\__________:A`P```````@```&T$
+M``#\_________VFB`P```````@```&T$``#\_________X.B`P```````@``
+M`&T$``#\_________]VB`P```````@```&T$``#\_________TVC`P``````
+M`@```&T$``#\_________\BC`P```````@```*L"``#\_________]*C`P``
+M`````@```(`$``#\_________]RC`P```````@```)X"``#\_________P:D
+M`P```````@```&T$``#\_________R6D`P```````@```&T$``#\________
+M_SRD`P```````@```&T$``#\_________V*D`P```````@```&T$``#\____
+M_____\^D`P```````@```(`$``#\_________X2E`P```````@```(`$``#\
+M_________W6F`P```````@```","``#\_________XFF`P```````@```+P"
+M``#\_________ZNF`P```````@```(T$``#\_________\VF`P```````@``
+M`(T$``#\_________^^F`P```````@```(T$``#\_________PZG`P``````
+M`@```(T$``#\_________S"G`P```````@```(T$``#\_________UVG`P``
+M`````@```(T$``#\_________W>G`P```````@```(T$``#\_________Y&G
+M`P```````@```(T$``#\_________["G`P```````@```(T$``#\________
+M_].G`P```````@```(T$``#\__________:G`P```````@```(T$``#\____
+M_____Q2H`P```````@```(T$``#\_________S*H`P```````@```(T$``#\
+M_________U"H`P```````@```(T$``#\_________VZH`P```````@```(T$
+M``#\_________XNH`P```````@```(T$``#\_________ZZH`P```````@``
+M`(T$``#\_________\>H`P```````@```(T$``#\_________^RH`P``````
+M`@```%X$``#\_________PRI`P```````@```%X$``#\_________S2I`P``
+M`````@```%X$``#\_________UFI`P```````@```%X$``#\_________WZI
+M`P```````@```%X$``#\_________Z&I`P```````@```%X$``#\________
+M_\RI`P```````@```%X$``#\_________UVK`P```````@```","``#\____
+M______*K`P```````@```(\$``#\_________RBL`P```````@```(\$``#\
+M_________UZL`P```````@```(\$``#\_________Y2L`P```````@```(\$
+M``#\_________\2L`P```````@```(\$``#\_________]FL`P```````@``
+M`(\$``#\__________&L`P```````@```(\$``#\_________UFM`P``````
+M`@```(\$``#\_________ZBM`P```````@```(\$``#\__________>M`P``
+M`````@```(\$``#\_________TFN`P```````@```(\$``#\_________ZNN
+M`P```````@```(\$``#\_________]^N`P```````@```(\$``#\________
+M_PVO`P```````@```'@"``#\_________QJO`P```````@```(\$``#\____
+M_____TFO`P```````@```(,"``#\_________U:O`P```````@```(\$``#\
+M_________X6O`P```````@```(,"``#\_________Y*O`P```````@```(\$
+M``#\_________\&O`P```````@```(,"``#\_________\ZO`P```````@``
+M`(\$``#\_________P&P`P```````@```(,"``#\_________PZP`P``````
+M`@```(\$``#\_________VVP`P```````@```#\"``#\_________W&S`P``
+M`````@```)H$``#\_________XZS`P```````@```)H$``#\_________ZNS
+M`P```````@```)H$``#\_________\BS`P```````@```)H$``#\________
+M_^6S`P```````@```)H$``#\_________P*T`P```````@```)H$``#\____
+M_____S&T`P```````@```!P#``#\_________WZT`P```````@```)H$``#\
+M_________ZVT`P```````@```!P#``#\_________UBU`P```````@```!P#
+M``#\_________XJU`P```````@```)<$``#\_________YZU`P```````@``
+M`/`"``#\_________ZRU`P```````@```/<"``#\_________[:U`P``````
+M`@```(`$``#\_________]RU`P```````@```)L"``#\_________WJV`P``
+M`````@```(T"``#\_________Y6V`P```````@```!D"``#\_________VVW
+M`P```````@```(4"``#\_________^BW`P```````@```)\"``#\________
+M_U6\`P```````@```(D"``#\_________[R\`P```````@```,`"``#\____
+M______"\`P```````@```(4"``#\_________Y"]`P``````"P````,```"@
+M'0```````*.]`P```````@```/@"``#\_________\^]`P```````@```/@"
+M``#\__________>]`P```````@```/@"``#\_________Q^^`P```````@``
+M`/@"``#\_________UF^`P```````@```(0"``#\_________YZ^`P``````
+M`@```+8"``#\_________SK``P```````@```.("``#\_________V3``P``
+M`````@```(`$``#\__________#"`P```````@```-X"``#\___________"
+M`P```````@```'\"``#\_________\7#`P```````@```#<"``#\________
+M_U?$`P```````@```/D"``#\_________W3$`P```````@```#<"``#\____
+M_____R3&`P```````@```!<#``#\_________T;&`P```````@```!8#``#\
+M_________[G&`P```````@```!<#``#\__________3&`P```````@```!8#
+M``#\___________(`P```````@```'H"``#\_________S?)`P``````"P``
+M``,```#P'0```````.W)`P```````@```&`$``#\_________PG*`P``````
+M"P````,```"0(@```````++*`P```````@```!X"``#\_________\+*`P``
+M`````@```!X"``#\_________U_+`P```````@```!<#``#\_________YK+
+M`P```````@```!8#``#\_________PW,`P```````@```$$"``#\________
+M_T3,`P```````@```#H"``#\_________V#,`P```````@```$$"``#\____
+M_____V_,`P```````@```+("``#\_________XO,`P```````@```$$"``#\
+M_________]+,`P```````@```%,"``#\_________S3-`P```````@```$$"
+M``#\_________TW-`P```````@```%,"``#\_________XG.`P```````@``
+M`+,"``#\_________Y?.`P```````@```)<"``#\_________P//`P``````
+M`@```!P#``#\_________Q+/`P```````@```)0"``#\_________Y?/`P``
+M````"P````$```"`S0,``````*'/`P```````@```'("``#\_________ZS/
+M`P```````@```/L"``#\_________TK0`P```````@```&T$``#\________
+M_VS0`P```````@````<#``#\_________WS0`P```````@```&("``#\____
+M_____Y[0`P```````@````<#``#\_________Z;0`P```````@```$\"``#\
+M_________\70`P``````"P````,```#P)P```````-S0`P```````@```)$"
+M``#\__________C0`P```````@```)$"``#\_________Q31`P```````@``
+M`/`"``#\_________S;1`P```````@```,("``#\_________TW1`P``````
+M`@```*\"``#\_________W#1`P```````@```/`"``#\_________XO1`P``
+M`````@```,("``#\_________Z+1`P```````@```/`"``#\_________[31
+M`P```````@```*\"``#\_________\G1`P```````@```/`"``#\________
+M__S1`P```````@```/<"``#\_________P;2`P```````@```(`$``#\____
+M_____WG2`P```````@```+L"``#\_________Y+2`P```````@````,#``#\
+M_________[G2`P```````@````H#``#\_________\[2`P```````@```*8"
+M``#\_________^'2`P``````"P````8````]`0```````.O2`P```````@``
+M`(P$``#\_________P'3`P```````@```)<$``#\_________Q?3`P``````
+M`@```)<$``#\_________RK3`P```````@```#@"``#\_________TK3`P``
+M`````@```!P#``#\_________X?3`P```````@```*P"``#\_________SK4
+M`P```````@```'<"``#\_________UW4`P```````@```$,"``#\________
+M_X74`P```````@```(T"``#\_________Z[4`P```````@```!L#``#\____
+M_____[;4`P```````@```(T"``#\_________P/5`P```````@```$,"``#\
+M_________TO5`P```````@```,("``#\_________W35`P```````@```!P#
+M``#\_________Z75`P```````@```)<$``#\_________[S5`P```````@``
+M`/`"``#\_________]?5`P```````@```/<"``#\_________^'5`P``````
+M`@```(`$``#\_________Q?6`P```````@```+<"``#\_________V#6`P``
+M````"P````4````(!0```````&K6`P```````@```(P$``#\_________WK6
+M`P```````@```/`"``#\_________^?6`P```````@```/<"``#\________
+M__'6`P```````@```(`$``#\_________S77`P```````@```+L"``#\____
+M_____U77`P```````@````,#``#\_________W[7`P```````@````H#``#\
+M_________Y/7`P```````@```*8"``#\_________Z;7`P``````"P````8`
+M```]`0```````+#7`P```````@```(P$``#\_________\77`P```````@``
+M`)<$``#\_________]K7`P```````@```)<$``#\_________^W7`P``````
+M`@```#@"``#\___________7`P```````@```/`"``#\_________P?8`P``
+M`````@```(T"``#\_________ZG8`P```````@```'T"``#\_________\O8
+M`P```````@```$,"``#\__________/8`P```````@```(T"``#\________
+M_Q?9`P```````@```!L#``#\_________Q_9`P```````@```(T"``#\____
+M_____T+9`P```````@```$,"``#\_________W39`P```````@```/`"``#\
+M_________X;9`P```````@```*\"``#\_________Z39`P```````@```!P#
+M``#\_________]?9`P```````@```)<$``#\_________^S9`P```````@``
+M`/`"``#\__________K9`P```````@```/<"``#\_________P3:`P``````
+M`@```(`$``#\_________R7:`P```````@```/P"``#\_________TC:`P``
+M`````@```$,"``#\_________X3:`P```````@```!P#``#\_________Z/:
+M`P```````@```)<$``#\_________[S:`P```````@```/`"``#\________
+M_\K:`P```````@```/<"``#\_________]3:`P```````@```(`$``#\____
+M______O:`P```````@````H#``#\_________Q#;`P```````@```*8"``#\
+M_________R7;`P```````@```)<$``#\_________SK;`P```````@```)<$
+M``#\_________TW;`P```````@```#@"``#\_________VS;`P```````@``
+M`/`"``#\_________W?;`P```````@````P#``#\_________X_;`P``````
+M`@```&T$``#\_________]?;`P```````@```#,"``#\_________^+;`P``
+M`````@```%0"``#\_________R_<`P```````@```*<"``#\_________UO<
+M`P```````@```!P#``#\__________O<`P```````@```%<"``#\________
+M_P?>`P```````@```$,"``#\_________SC>`P```````@```)H"``#\____
+M_____U'>`P```````@```-D"``#\_________XO>`P```````@```.H"``#\
+M_________[S>`P```````@```)@"``#\_________^+>`P```````@```!P#
+M``#\_________XK?`P```````@```%<"``#\_________YG@`P```````@``
+M`)H"``#\_________\O@`P```````@```,4"``#\_________QOA`P``````
+M`@```!P#``#\_________RWA`P```````@````\#``#\_________\+A`P``
+M`````@```!L#``#\_________U'B`P```````@```!L#``#\_________U[B
+M`P```````@```&P"``#\_________XGB`P```````@```!L#``#\________
+M_Z?B`P```````@```$,"``#\_________\WB`P```````@```-@"``#\____
+M_____V+C`P```````@```&T$``#\_________X;C`P```````@```(`$``#\
+M_________[3C`P```````@```&T$``#\_________]3C`P```````@```&T$
+M``#\_________U7D`P```````@```(`$``#\_________\OD`P```````@``
+M`'L"``#\_________^?D`P```````@```!,#``#\__________3D`P``````
+M`@```#,"``#\_________R/E`P```````@```%0"``#\_________U3E`P``
+M`````@```&H"``#\_________W[E`P```````@```#,"``#\_________SGF
+M`P```````@```(`$``#\_________Y[F`P```````@```&T$``#\________
+M_\#F`P```````@```(`$``#\_________^SF`P```````@```&T$``#\____
+M_____POG`P```````@```&T$``#\_________V?G`P```````@```!P#``#\
+M__________'G`P```````@```/`"``#\_________Q[H`P```````@```/`"
+M``#\_________ROH`P```````@```#,"``#\_________VSH`P```````@``
+M`!P#``#\_________XCH`P```````@```!P#``#\_________ZGH`P``````
+M`@```%D$``#\_________\CH`P```````@```/<"``#\_________]+H`P``
+M`````@```(`$``#\_________X/I`P```````@```&("``#\_________Z?I
+M`P```````@````H#``#\_________[SI`P```````@```*8"``#\________
+M_\_I`P``````"P````8````]`0```````-GI`P```````@```(P$``#\____
+M_____^[I`P```````@```)<$``#\_________P/J`P```````@```)<$``#\
+M_________Q_J`P```````@```#@"``#\_________S[J`P```````@```*H"
+M``#\_________VCJ`P```````@```!P#``#\_________XCJ`P```````@``
+M`/<"``#\_________Y+J`P```````@```(`$``#\_________]/J`P``````
+M`@````H#``#\_________^CJ`P```````@```*8"``#\__________OJ`P``
+M````"P````8````]`0````````7K`P```````@```(P$``#\_________QKK
+M`P```````@```)<$``#\_________R_K`P```````@```)<$``#\________
+M_T;K`P```````@```#@"``#\_________U[K`P```````@```%0"``#\____
+M_____]+K`P```````@```&T$``#\__________?K`P```````@```(`$``#\
+M_________R/L`P```````@```&T$``#\_________T+L`P```````@```&T$
+M``#\_________Q?M`P``````"P```"D"`````````````!_M`P```````@``
+M`,D"``#\_________[GM`P```````@```,\"``#\_________]KM`P``````
+M`@```!P#``#\_________V#N`P```````@```$`"``#\_________Y7N`P``
+M`````@```+<"``#\_________\[N`P```````@```%@"``#\_________^7N
+M`P```````@```)<$``#\__________WN`P```````@```)<$``#\________
+M_S;O`P```````@```(`$``#\_________TWO`P```````@```&T$``#\____
+M_____VWO`P```````@```&T$``#\_________XGO`P```````@```#,"``#\
+M_________Y'O`P```````@```*4"``#\_________]KO`P```````@```'L"
+M``#\_________S?P`P```````@```!P#``#\_________ZGP`P```````@``
+M`(\"``#\_________[CP`P```````@```!H"``#\_________^3P`P``````
+M`@```'$"``#\_________SSQ`P```````@```&T$``#\_________VGQ`P``
+M`````@```&T$``#\_________W[Q`P```````@```%4"``#\_________XOQ
+M`P```````@```(("``#\_________ZOQ`P```````@```&T$``#\________
+M_[OQ`P```````@```&T$``#\_________\OQ`P```````@```&T$``#\____
+M_____]OQ`P```````@```&T$``#\_________TOR`P```````@```&T$``#\
+M_________W+R`P```````@```&T$``#\_________X'R`P```````@```/8"
+M``#\_________[[R`P```````@```&T$``#\_________^;R`P```````@``
+M`&T$``#\_________W/S`P```````@```&T$``#\_________YKS`P``````
+M`@```&T$``#\_________\'S`P```````@```%D$``#\__________3S`P``
+M`````@```!P#``#\_________RST`P```````@```)<$``#\_________T#T
+M`P```````@```/`"``#\_________V'T`P```````@```'0"``#\________
+M_VOT`P```````@```(`$``#\_________Y+T`P``````"P````$```#P\`,`
+M`````*;T`P```````@```'@$``#\_________\KT`P```````@```&T$``#\
+M_________^KT`P```````@```&T$``#\_________P[U`P```````@```&T$
+M``#\_________SKU`P```````@```&T$``#\_________VGU`P```````@``
+M`&T$``#\_________XOU`P```````@```&T$``#\_________P#V`P``````
+M`@```&T$``#\_________RKV`P```````@```&T$``#\_________UGV`P``
+M`````@```&T$``#\_________WOV`P```````@```&T$``#\__________CV
+M`P```````@```&T$``#\_________QKW`P```````@```&T$``#\________
+M_ZCW`P```````@```%D$``#\_________^'W`P```````@```)<$``#\____
+M______7W`P```````@```/`"``#\_________P3X`P```````@```/<"``#\
+M_________P[X`P```````@```(`$``#\_________S+X`P``````"P````$`
+M``#0\`,``````$KX`P```````@```'@$``#\_________W;X`P```````@``
+M`&T$``#\_________Y[X`P```````@```&T$``#\_________\OX`P``````
+M`@```&T$``#\__________+X`P```````@```&T$``#\_________R_Y`P``
+M`````@```%D$``#\_________T_Y`P```````@```!P#``#\_________X'Y
+M`P```````@```)<$``#\_________Z/Y`P``````"P```,\"````````````
+M`+7Y`P```````@```'@$``#\_________^#Y`P```````@```&T$``#\____
+M_____P+Z`P```````@```&T$``#\_________[[Z`P```````@```&T$``#\
+M_________^OZ`P```````@```&T$``#\_________R'[`P```````@```&T$
+M``#\_________U/[`P``````"P````4````H!0```````%W[`P```````@``
+M`(P$``#\_________YC[`P```````@```*@"``#\__________?[`P``````
+M`@```*<"``#\_________P+\`P```````@```'<"``#\_________ZW\`P``
+M`````@```)H"``#\_________]#\`P```````@```$,"``#\_________P3]
+M`P```````@```!P#``#\_________Y_]`P```````@```)H"``#\________
+M_[W]`P```````@```$,"``#\_________PC^`P```````@```.H"``#\____
+M_____R3^`P```````@```*@"``#\_________T?_`P```````@```&T$``#\
+M_________VO_`P```````@```&T$``#\_________XC_`P```````@```&T$
+M``#\__________O_`P```````@```&T$``#\_________R$`!````````@``
+M`&T$``#\_________X<`!````````@```-D"``#\_________]H`!```````
+M`@```&T$``#\_________P0!!````````@```&T$``#\_________SD!!```
+M`````@```&T$``#\_________VX!!````````@```*@"``#\_________WX!
+M!````````@```$@"``#\_________W`"!````````@```(H"``#\________
+M_ZH"!````````@```&`$``#\_________X8#!````````@```&`$``#\____
+M______`#!````````@```&`$``#\_________R$$!````````@```&T$``#\
+M_________U8$!````````@```&T$``#\_________Z8$!````````@```&T$
+M``#\_________WL%!````````@```&`$``#\_________]X&!````````@``
+M`&`$``#\_________X('!````````@```&`$``#\_________Y4'!```````
+M"P````,````8*````````"0(!````````@```(`$``#\_________X<(!```
+M`````@```&T$``#\_________[$(!````````@```&T$``#\_________PD)
+M!````````@```&T$``#\_________[()!````````@```&T$``#\________
+M_RL*!````````@```-H"``#\_________SL*!````````@```-H"``#\____
+M______@*!````````@```)H"``#\_________Q$+!````````@```$,"``#\
+M_________\<+!````````@```+D"``#\_________T(-!````````@````<#
+M``#\_________U(-!````````@```&("``#\_________YT-!````````@``
+M`$T"``#\_________Q$.!````````@```)H"``#\_________QP.!```````
+M`@```+D"``#\_________S4.!````````@```$,"``#\_________Y4.!```
+M`````@```!P#``#\_________QX/!````````@```!P"``#\_________UH/
+M!````````@```!P#``#\_________P<0!````````@```!P#``#\________
+M_SH0!````````@```&("``#\_________TX0!````````@```(T"``#\____
+M_____ZT0!````````@```&T$``#\_________]00!````````@```%<"``#\
+M_________X@1!````````@```%D$``#\_________Y01!````````@````P#
+M``#\_________[01!````````@```!P#``#\_________U<2!````````@``
+M`&("``#\_________XP2!````````@````H#``#\_________Z$2!```````
+M`@```*8"``#\_________[02!```````"P````8````]`0```````+X2!```
+M`````@```(P$``#\_________],2!````````@```)<$``#\_________^@2
+M!````````@```)<$``#\__________\2!````````@```#@"``#\________
+M_R03!````````@```&T$``#\_________YL3!````````@```&0"``#\____
+M_____Z<3!````````@```.\"``#\_________^T3!````````@```,,"``#\
+M__________H3!````````@```(("``#\_________T04!````````@```%`"
+M``#\_________Z,4!````````@```&T$``#\_________\H4!````````@``
+M`&T$``#\_________]P4!````````@```(("``#\_________R45!```````
+M`@```/`"``#\_________S05!````````@```/<"``#\_________SX5!```
+M`````@```(`$``#\_________VP5!````````@````H#``#\_________X$5
+M!````````@```)<$``#\_________Y85!````````@```)<$``#\________
+M_ZT5!````````@```#@"``#\_________[T5!````````@```&T$``#\____
+M_____QD6!````````@```'$"``#\_________U06!````````@```)<$``#\
+M_________]86!````````@```'$"``#\_________PP7!````````@```(`$
+M``#\_________R07!````````@```&T$``#\_________S\7!````````@``
+M`&T$``#\_________UL7!````````@```#,"``#\_________V,7!```````
+M`@```*4"``#\_________X<7!````````@```(\"``#\_________Z(8!```
+M`````@```&`$``#\_________\$8!````````@```&T$``#\__________48
+M!````````@```&T$``#\_________T(9!````````@```&T$``#\________
+M_V<9!```````"P````4```!X!0```````'$9!````````@```(P$``#\____
+M_____XP9!````````@```"H"``#\_________\89!````````@```&T$``#\
+M_________^49!````````@```&T$``#\_________P0:!````````@```&T$
+M``#\_________P\:!````````@```$@"``#\_________R@:!````````@``
+M`&T$``#\_________Q,;!````````@```&D"``#\_________R8;!```````
+M`@```$P"``#\_________S<;!````````@```)<"``#\_________U$;!```
+M`````@```%D$``#\_________V8;!```````"P```$8"`````````````'H;
+M!````````@```'@$``#\_________],;!````````@```)0"``#\________
+M_^L;!````````@```,X"``#\__________X;!````````@```)<"``#\____
+M_____TL<!```````"P```.<"`````````````&P<!````````@```'("``#\
+M_________WP<!````````@```&L"``#\_________X<<!````````@```/L"
+M``#\_________PL=!````````@```!H#``#\_________P`>!````````@``
+M`'`"``#\_________ST>!````````@```'`"``#\_________WH>!```````
+M`@```#P"``#\_________RX@!````````@```.D"``#\_________VX@!```
+M`````@```)T"``#\_________Z8@!````````@```#P"``#\_________RLB
+M!````````@```&`$``#\_________^\B!````````@```*T"``#\________
+M_R\C!````````@```*T"``#\_________W,C!````````@```)8"``#\____
+M_____X4C!````````@```$0"``#\_________ZPC!````````@```#P"``#\
+M__________(C!````````@```&`$``#\__________\C!````````@````X#
+M``#\_________Y(E!````````@```-\"``#\_________Z(E!````````@``
+M`&4"``#\_________[(E!````````@```"@"``#\_________\(E!```````
+M`@```&D"``#\_________]PE!````````@```%D$``#\__________$E!```
+M````"P```$8"``````````````LF!````````@```'@$``#\_________S0F
+M!````````@```!P#``#\_________[4F!````````@```%@"``#\________
+M__0F!````````@```!P#``#\_________STG!````````@```*P"``#\____
+M_____UTG!````````@```$`"``#\_________VHG!````````@```+<"``#\
+M_________WLG!````````@```#P"``#\_________X\G!````````@```$P"
+M``#\_________YHG!````````@```)<"``#\_________\TG!````````@``
+M`#P"``#\_________S,H!````````@```)0"``#\_________TLH!```````
+M`@```,X"``#\_________UXH!````````@```)<"``#\_________ZLH!```
+M````"P````8#`````````````,PH!````````@```'("``#\_________]PH
+M!````````@```&L"``#\_________^<H!````````@```/L"``#\________
+M_V@I!````````@```)0"``#\_________WPI!````````@```,X"``#\____
+M_____X\I!````````@```)<"``#\_________[$I!````````@```&`$``#\
+M__________(I!```````"P````8#`````````````!0J!````````@```'("
+M``#\_________R,J!````````@```&L"``#\_________RXJ!````````@``
+M`/L"``#\__________0K!````````@```%T"``#\_________TXL!```````
+M`@```%T"``#\_________WPL!````````@```,H"``#\_________Z4M!```
+M`````@```$P"``#\_________[<M!````````@```)<"``#\_________^XM
+M!````````@```&`$``#\_________R\N!````````@```$P"``#\________
+M_SHN!````````@```)<"``#\_________Z`N!````````@```)0"``#\____
+M_____[PN!````````@```,X"``#\_________\\N!````````@```)<"``#\
+M_________R(O!```````"P```(@"`````````````'`O!````````@```'("
+M``#\_________X$O!````````@```&L"``#\_________XPO!````````@``
+M`/L"``#\__________\O!````````@```)0"``#\_________Q,P!```````
+M`@```,X"``#\_________R8P!````````@```)<"``#\_________T@P!```
+M`````@```&`$``#\_________Y4P!```````"P```(@"`````````````-XP
+M!````````@```'("``#\_________^XP!````````@```&L"``#\________
+M__DP!````````@```/L"``#\_________ZDQ!````````@```&T$``#\____
+M_____XXU!````````@```)$"``#\_________Z,U!````````@```!4#``#\
+M_________Q<V!````````@```!P#``#\_________Q(W!````````@```!L#
+M``#\_________T0Z!```````"P```"H"`````````````%LZ!````````@``
+M`'@$``#\__________$Z!```````"P```-,"``````````````@[!```````
+M`@```'@$``#\_________U8[!````````@```%D$``#\_________W8[!```
+M`````@```%D$``#\__________X[!````````@```!P#``#\_________Q$\
+M!````````@```)@"``#\_________S`\!```````"P```"H"````````````
+M`$@\!````````@```'@$``#\_________]X\!````````@```!P#``#\____
+M______$\!````````@```*<"``#\_________PP]!```````"P```-,"````
+M`````````"0]!````````@```'@$``#\_________[$]!````````@```"<"
+M``#\__________P]!````````@```)H"``#\_________R$^!````````@``
+M`'<"``#\_________RP^!````````@```*<"``#\_________^0^!```````
+M`@```!P#``#\__________4_!````````@```)H"``#\_________SI`!```
+M`````@```)H"``#\_________UY`!````````@```'T"``#\_________]-`
+M!````````@```(0"``#\_________^Q`!````````@```.4"``#\________
+M_TM!!````````@````$#``#\_________P5"!````````@```)H"``#\____
+M_____V5"!````````@```(0"``#\_________WY"!````````@```.4"``#\
+M_________^9"!````````@```$D"``#\_________WI#!````````@```-8"
+M``#\_________^%#!````````@```(0"``#\__________I#!````````@``
+M`.4"``#\_________RQ%!````````@```(0"``#\_________T5%!```````
+M`@```.4"``#\_________SY&!````````@```!P#``#\_________TE&!```
+M`````@```"("``#\_________U%&!````````@````\#``#\_________YE&
+M!````````@```'8"``#\_________]%&!````````@```!P#``#\________
+M_SU'!````````@```!P#``#\_________YU'!````````@```!P#``#\____
+M______U'!````````@```!P#``#\_________V%(!````````@```!P#``#\
+M_________R1*!````````@```!P#``#\_________VQ*!````````@```+,"
+M``#\_________WE*!````````@```)<"``#\_________[)*!````````@``
+M`,("``#\_________^E*!````````@```+<"``#\_________P-+!```````
+M`@```.P"``#\_________RI+!````````@```!P#``#\_________WQ+!```
+M`````@```$`"``#\_________Y%+!````````@```+,"``#\_________YQ+
+M!````````@```)<"``#\__________5+!````````@```)0"``#\________
+M_P5,!````````@```#D"``#\_________UE,!```````"P```/\"````````
+M`````&-,!````````@```'("``#\_________VY,!````````@```/L"``#\
+M_________[Q,!````````@```)0"``#\_________\Q,!````````@```#D"
+M``#\_________R1-!```````"P```/\"`````````````"Y-!````````@``
+M`'("``#\_________SE-!````````@```/L"``#\_________Y5-!```````
+M`@```)0"``#\_________ZE-!````````@```#D"``#\_________P5.!```
+M````"P```/\"``````````````].!````````@```'("``#\_________QI.
+M!````````@```/L"``#\_________R1.!````````@```(`$``#\________
+M_X5.!````````@```)0"``#\_________Z1.!````````@```#D"``#\____
+M_____[=.!````````@```)<"``#\_________Q%/!```````"P```/\"````
+M`````````!M/!````````@```'("``#\_________R9/!````````@```/L"
+M``#\_________TI0!````````@```)<"``#\_________\M0!````````@``
+M`!4#``#\_________]=0!````````@```)<"``#\_________T%1!```````
+M`@```)0"``#\_________]U1!```````"P````$```!03P0``````.=1!```
+M`````@```'("``#\__________)1!````````@```/L"``#\_________VI2
+M!````````@```)0"``#\_________XA2!````````@```,X"``#\________
+M_Z12!````````@```)<"``#\__________I2!```````"P```&\"````````
+M``````=3!````````@```'("``#\_________QA3!````````@```&L"``#\
+M_________R-3!````````@```/L"``#\_________WI3!````````@```)0"
+M``#\_________YA3!````````@```,X"``#\_________[13!````````@``
+M`)<"``#\_________Q)4!```````"P```&\"`````````````!]4!```````
+M`@```'("``#\_________S!4!````````@```&L"``#\_________SM4!```
+M`````@```/L"``#\_________Y-4!````````@```)0"``#\_________[14
+M!````````@```,X"``#\_________]!4!````````@```)<"``#\________
+M_SI5!```````"P```&\"`````````````$=5!````````@```'("``#\____
+M_____UA5!````````@```&L"``#\_________V-5!````````@```/L"``#\
+M_________[I5!````````@```)0"``#\_________]Q5!````````@```,X"
+M``#\__________95!````````@```)<"``#\_________VI6!```````"P``
+M`&\"`````````````'M6!````````@```'("``#\_________XI6!```````
+M`@```&L"``#\_________Y56!````````@```/L"``#\_________^!6!```
+M`````@```)0"``#\_________QY7!````````@```/@"``#\_________RU7
+M!````````@```)<"``#\_________T=7!```````"P```&\"````````````
+M`%)7!````````@```/L"``#\_________X-7!```````"P````,```!X*```
+M`````/)7!````````@```!0#``#\_________SI8!````````@```&T$``#\
+M_________WA8!````````@```&T$``#\_________Z98!````````@```&T$
+M``#\_________^)8!````````@```&T$``#\_________T)9!````````@``
+M`!0#``#\_________W59!````````@```&T$``#\_________ZY9!```````
+M`@```&T$``#\_________]A9!````````@```&T$``#\_________QA:!```
+M`````@```&T$``#\_________WQ;!````````@````<#``#\_________]9<
+M!````````@```$P"``#\_________T5>!````````@```/L"``#\________
+M_V]>!````````@```#X"``#\_________WM>!````````@```'8"``#\____
+M_____Y1>!````````@```$,"``#\_________P5?!````````@```'T"``#\
+M_________WI?!````````@```'<"``#\__________9?!````````@```)H"
+M``#\_________P%@!````````@```+D"``#\_________PQ@!````````@``
+M`!L#``#\_________SE@!````````@```.4"``#\_________SYA!```````
+M"P````<```"`$0```````(IA!````````@```/$"``#\_________V-C!```
+M`````@```(`$``#\_________VYC!````````@```)<"``#\_________WYC
+M!````````@```.`"``#\_________XIC!````````@```(`$``#\________
+M_Y5C!````````@```)<"``#\_________^1C!````````@```)0"``#\____
+M_____R1D!```````"P```+\"`````````````"]D!````````@```/L"``#\
+M_________S]D!````````@```(`$``#\_________TMD!````````@```(`$
+M``#\_________W1E!````````@```$P"``#\_________W]E!````````@``
+M`)<"``#\_________\)E!````````@```.`"``#\_________]5E!```````
+M`@```$P"``#\_________^=E!````````@```)<"``#\_________R]F!```
+M`````@```)0"``#\_________T-F!````````@```,X"``#\_________U9F
+M!````````@```)<"``#\_________Z)F!```````"P````$```!P9`0`````
+M`*]F!````````@```'("``#\_________[YF!````````@```&L"``#\____
+M_____\EF!````````@```/L"``#\_________Q-G!````````@```)0"``#\
+M_________U1G!```````"P```&\"`````````````%]G!````````@```/L"
+M``#\_________Z!G!````````@```)0"``#\_________[!G!````````@``
+M`,X"``#\_________\IG!````````@```)<"``#\_________PUH!```````
+M"P```&\"`````````````!AH!````````@```/L"``#\_________U)H!```
+M`````@```/`"``#\_________X1H!````````@```/<"``#\_________XYH
+M!````````@```(`$``#\_________[9H!````````@```+L"``#\________
+M_]5H!````````@````,#``#\_________Q1I!````````@````H#``#\____
+M_____REI!````````@```*8"``#\_________SQI!```````"P````8```!3
+M`0```````$9I!````````@```(P$``#\_________UMI!````````@```)<$
+M``#\_________W!I!````````@```)<$``#\_________[9I!````````@``
+M`#@"``#\_________]9I!````````@```!P#``#\_________Q)J!```````
+M`@```*P"``#\_________RYK!````````@```!H#``#\_________V5K!```
+M`````@```*("``#\_________\UK!````````@```*("``#\_________TML
+M!````````@```!L"``#\_________X9L!````````@```!L"``#\________
+M_]AL!````````@```!L"``#\_________Q-M!````````@```!L"``#\____
+M_____QMN!```````"P````$```"0:P0``````$MN!````````@```!T"``#\
+M_________ZMN!```````"P````$```"0:P0``````-MN!````````@```!T"
+M``#\_________Z)O!```````"P````$```"0:P0``````-1O!````````@``
+M`!T"``#\_________ZQP!```````"P````$```"0:P0``````,YP!```````
+M`@```!T"``#\_________SUQ!```````"P````$```"0:P0``````%YQ!```
+M`````@```!T"``#\_________^QR!````````@```#("``#\_________V9S
+M!````````@```-("``#\_________[IS!````````@```!L"``#\________
+M_X!T!````````@```*,"``#\_________U=U!````````@```!H#``#\____
+M_____X1U!````````@```-$"``#\_________YYU!````````@```"$"``#\
+M__________1V!````````@```*("``#\_________\!X!````````@```(<"
+M``#\_________SIY!````````@```*,"``#\_________\IY!````````@``
+M`!L"``#\__________9Y!````````@```!L"``#\_________W1Z!```````
+M`@```)D"``#\__________AZ!````````@```!L"``#\_________YA]!```
+M`````@```!L"``#\_________W.`!````````@```&T$``#\_________Y>`
+M!````````@```&T$``#\_________U.!!````````@```(`$``#\________
+M_W.!!````````@```&T$``#\_________Y>!!````````@```&T$``#\____
+M_____^"!!````````@```(`$``#\_________P""!````````@```&T$``#\
+M_________R>"!````````@```&T$``#\_________W^"!````````@```(`$
+M``#\_________Y^"!````````@```&T$``#\_________[Z"!````````@``
+M`&T$``#\_________P:#!````````@```(`$``#\_________TV#!```````
+M`@```&0"``#\_________V"#!````````@```*P"``#\_________XN#!```
+M`````@```.\"``#\_________\Z#!````````@```,,"``#\__________^#
+M!````````@```$4"``#\_________PV$!````````@```(`$``#\________
+M_U2$!````````@```#@"``#\_________W&$!````````@```#`"``#\____
+M_____ZR$!````````@```'$"``#\_________]*$!````````@```%D$``#\
+M_________]^$!````````@````P#``#\_________P2%!````````@```!P#
+M``#\_________R^%!````````@````H#``#\_________T2%!````````@``
+M`*8"``#\_________UF%!````````@```)<$``#\_________VZ%!```````
+M`@```)<$``#\_________X:%!````````@```#@"``#\_________Z^%!```
+M`````@```!P#``#\_________\&%!````````@```.\"``#\_________P6&
+M!````````@```+<"``#\_________W2&!````````@```!P#``#\________
+M_]B&!````````@```+<"``#\_________XJ'!````````@```!H#``#\____
+M_____S2(!````````@```!P#``#\_________U2(!````````@```(L"``#\
+M_________Y^(!````````@```!H#``#\_________T*)!````````@```)<$
+M``#\_________VV)!````````@```/`"``#\_________WN)!````````@``
+M`/<"``#\_________X6)!````````@```(`$``#\_________ZV)!```````
+M`@```+L"``#\_________\:)!````````@````,#``#\__________2)!```
+M`````@````H#``#\_________PF*!````````@```*8"``#\_________QZ*
+M!````````@```)<$``#\_________S.*!````````@```)<$``#\________
+M_V&*!````````@```#@"``#\_________]:*!````````@```(L"``#\____
+M_____^F*!````````@```-T"``#\_________YN+!````````@```!H#``#\
+M_________\R+!````````@```.\"``#\_________R6-!````````@```$`"
+M``#\_________T^-!````````@```%@"``#\_________VZ-!````````@``
+M`#P"``#\_________]Z-!````````@```!P#``#\__________^-!```````
+M`@```(L"``#\_________TR.!````````@```(L"``#\_________WR.!```
+M`````@```(L"``#\_________Y*.!````````@```!H#``#\_________\N.
+M!````````@```'P"``#\_________^2/!````````@```"L"``#\________
+M_PF0!````````@```!P#``#\_________QV0!````````@```/`"``#\____
+M_____RN0!````````@```/<"``#\_________S60!````````@```(`$``#\
+M_________V.0!````````@````H#``#\_________WB0!````````@```*8"
+M``#\_________Y&0!````````@```)<$``#\_________Z:0!````````@``
+M`)<$``#\_________\^0!````````@```#@"``#\_________^R0!```````
+M`@```*H"``#\_________T:1!````````@````@#``#\_________V&1!```
+M`````@```(L"``#\_________YB1!````````@```(L"``#\_________\:1
+M!````````@```(L"``#\_________]>1!````````@```'P"``#\________
+M_^F1!````````@```"8"``#\_________Q"2!````````@```'P"``#\____
+M_____U:3!````````@```.\"``#\_________V^4!````````@```$`"``#\
+M_________X^4!````````@```%@"``#\_________]&4!````````@```*P"
+M``#\_________Q&5!````````@```(L"``#\_________S"5!````````@``
+M`'4"``#\_________Y"5!````````@```&H"``#\_________Z:5!```````
+M"P```"D"`````````````+&5!````````@```,D"``#\_________[Z5!```
+M`````@```'D"``#\_________\F5!````````@```&H"``#\_________Y.7
+M!```````"P````4```"8!0```````)V7!````````@```(P$``#\________
+M_PN8!````````@```"8"``#\_________\N8!````````@```)("``#\____
+M_____SR9!```````"P```"D"`````````````$>9!````````@```,D"``#\
+M_________W^9!```````"P````4```#H!0```````(F9!````````@```(P$
+M``#\_________YF9!````````@```*P"``#\_________\"9!````````@``
+M`.\"``#\_________PZ:!````````@```)("``#\_________R&:!```````
+M`@```)`"``#\_________U&:!````````@```%@"``#\_________R>;!```
+M`````@```!H"``#\_________S2;!````````@```/P"``#\_________QV<
+M!````````@```*P"``#\_________WR<!````````@```!P#``#\________
+M_\F<!````````@```$`"``#\_________^V<!````````@```+<"``#\____
+M_____PV=!````````@```%@"``#\_________[B=!````````@```*D"``#\
+M_________T:>!````````@```!P#``#\_________\*>!````````@```*D"
+M``#\_________UJ?!````````@```)<$``#\_________W2?!````````@``
+M`)<$``#\_________Z2?!````````@```*D"``#\_________Q:@!```````
+M`@```)<$``#\_________VN@!````````@```)<$``#\_________Y&A!```
+M`````@```-<"``#\_________YZA!````````@```,L"``#\_________["A
+M!````````@```)4"``#\_________\*A!````````@```)4"``#\________
+M_\^A!````````@```&<"``#\_________]RA!````````@```,P"``#\____
+M_____^FA!````````@```!$#``#\__________FA!````````@```*`"``#\
+M_________R6B!````````@```!P#``#\_________WNB!````````@```$`"
+M``#\_________YVB!````````@```+<"``#\_________[VB!````````@``
+M`%@"``#\_________PRC!````````@```#P"``#\_________R"C!```````
+M"P````8```!I`0```````"JC!````````@```(P$``#\_________S>C!```
+M`````@```#P"``#\_________U>C!````````@```!P#``#\_________YRC
+M!````````@```*P"``#\__________6D!````````@```,,"``#\________
+M__^D!````````@```(`$``#\_________Q>E!````````@```,,"``#\____
+M_____R&E!````````@```(`$``#\_________\NE!````````@```&T$``#\
+M_________^"E!````````@```&T$``#\_________QBF!````````@```(`$
+M``#\_________S6F!````````@```+<"``#\_________U&F!````````@``
+M`$4"``#\_________V>F!````````@```$4"``#\_________W6F!```````
+M`@```(`$``#\_________YVF!````````@```&T$``#\_________\ZF!```
+M`````@```&T$``#\_________^ZF!````````@```&T$``#\_________PNG
+M!````````@```(`$``#\_________QNG!```````"P````4````@!@``````
+M`"6G!````````@```(P$``#\_________T&G!```````"P````8```!]`0``
+M`````$NG!````````@```(P$``#\_________]:G!````````@```)("``#\
+M_________RJH!````````@```'$"``#\_________TRH!````````@```!P#
+M``#\_________YBH!````````@```$`"``#\_________[VH!````````@``
+M`+<"``#\_________]VH!````````@```%@"``#\_________R&I!```````
+M`@```'$"``#\_________U2I!````````@```*P"``#\_________V:I!```
+M`````@```#P"``#\_________Y2I!````````@```!P#``#\_________^:I
+M!````````@```$`"``#\_________PVJ!````````@```+<"``#\________
+M_RVJ!````````@```%@"``#\_________V>J!````````@```!P#``#\____
+M_____ZVJ!````````@```*P"``#\_________QZK!```````"P````,````X
+M*0```````'>K!````````@```'$"``#\_________XBK!````````@```&T$
+M``#\_________ZBK!````````@```*X"``#\_________\2K!````````@``
+M`*X"``#\_________^"K!````````@```*X"``#\__________RK!```````
+M`@```*X"``#\_________QVL!````````@```&,"``#\_________S^L!```
+M`````@```&,"``#\_________V&L!````````@```&,"``#\_________X.L
+M!````````@```&,"``#\_________["L!````````@```&,"``#\________
+M_]*L!````````@```&,"``#\_________^ZL!````````@```*X"``#\____
+M_____PJM!````````@```*X"``#\_________R:M!````````@```*X"``#\
+M_________U.M!````````@```&,"``#\_________V^M!````````@```*X"
+M``#\_________\"M!````````@```(`$``#\_________S.N!````````@``
+M`&T$``#\_________TVN!````````@```&T$``#\_________UZN!```````
+M`@```(`$``#\_________VVN!````````@```+<"``#\_________WRN!```
+M`````@```(`$``#\_________Y.N!````````@```*X"``#\_________YVN
+M!````````@```(`$``#\_________[FN!````````@```*X"``#\________
+M_\.N!````````@```(`$``#\__________"N!````````@```&,"``#\____
+M______JN!````````@```(`$``#\_________Q.O!````````@```*X"``#\
+M_________QVO!````````@```(`$``#\_________S:O!````````@```*X"
+M``#\_________T"O!````````@```(`$``#\_________T>O!````````@``
+M`&$"``#\_________U.O!````````@```),"``#\_________W*O!```````
+M`@```&,"``#\_________WNP!````````@```!H#``#\_________Y>P!```
+M`````@```!H#``#\_________P"Q!````````@```"0"``#\_________R.R
+M!````````@```(`$``#\_________]ZR!````````@```(`$``#\________
+M__VR!````````@```&T$``#\_________QFS!````````@```&T$``#\____
+M_____]RS!````````@```(`$``#\__________*S!````````@```&T$``#\
+M_________P*T!````````@```&T$``#\_________YRT!````````@```(`$
+M``#\_________[*T!````````@```&T$``#\_________\*T!````````@``
+M`&T$``#\_________W&U!````````@```,0"``#\_________[6U!```````
+M`@````0#``#\_________]ZU!````````@```/H"``#\__________*U!```
+M`````@```,0"``#\_________RFV!````````@```&T$``#\_________T:V
+M!````````@```&T$``#\_________WNV!````````@```&T$``#\________
+M_YBV!````````@```&T$``#\_________^6V!````````@```.8"``#\____
+M_____P"W!````````@```"`"``#\_________VRW!````````@```(`$``#\
+M_________XVW!````````@```&T$``#\_________ZRW!````````@```&T$
+M``#\_________\:X!```````"P```"T"`````````````/:X!````````@``
+M`-0"``#\_________QBY!````````@```,@"``#\_________RFY!```````
+M`@`````#``#\_________SNY!````````@`````#``#\_________]6Y!```
+M`````@```&T$``#\__________BY!````````@```&T$``#\_________RRZ
+M!````````@```(`$``#\_________T:Z!````````@```&T$``#\________
+M_Y*Z!````````@```&T$``#\__________FZ!````````@```&T$``#\____
+M_____VN[!````````@```&T$``#\_________]"[!````````@```(`$``#\
+M__________&[!````````@```&T$``#\_________PZ\!````````@```&T$
+M``#\_________V.\!````````@```+X"``#\_________VV\!````````@``
+M`)X"``#\_________Z^\!````````@```(`$``#\_________R^]!```````
+M`@```(`$``#\_________Z^]!````````@```(`$``#\_________PJ^!```
+M`````@```'0"``#\_________Q2^!````````@```(`$``#\_________S&^
+M!````````@```&T$``#\_________TZ^!````````@```&T$``#\________
+M_\N^!````````@```(`$``#\_________]>^!````````@```#,"``#\____
+M_____^N^!````````@```*4"``#\__________F^!````````@```&T$``#\
+M_________Q*_!````````@```&T$``#\_________RZ_!````````@```&T$
+M``#\_________R7`!````````@```&T$``#\_________R7"!````````@``
+M`$P"``#\_________S?"!````````@```)<"``#\_________Y#"!```````
+M`@```$P"``#\_________YO"!````````@```)<"``#\_________Z["!```
+M`````@```%@"``#\_________YG#!````````@```&`$``#\_________^/#
+M!```````"P````8```"3`0```````.W#!````````@```(P$``#\________
+M_P#$!````````@```$P"``#\_________PO$!````````@```)<"``#\____
+M_____R3$!````````@```!P#``#\_________XG$!````````@```!P#``#\
+M__________;$!````````@```%@"``#\_________Z3%!````````@```(`$
+M``#\_________R/&!````````@```(`$``#\_________U_&!````````@``
+M`(`$``#\_________W_&!````````@```$P"``#\_________XK&!```````
+M`@```)<"``#\_________YC&!````````@```(X"``#\_________U7'!```
+M`````@```(`$``#\_________X_'!````````@```(`$``#\_________Z_'
+M!````````@```$P"``#\_________[K'!````````@```)<"``#\________
+M_\C'!````````@```(X"``#\_________PK(!````````@```(`$``#\____
+M_____U'(!````````@```(`$``#\_________Z#(!````````@```(`$``#\
+M_________]/(!````````@```$P"``#\_________][(!````````@```)<"
+M``#\_________^G(!````````@```%@"``#\_________S3*!````````@``
+M`$P"``#\_________S_*!````````@```)<"``#\_________]'*!```````
+M`@```+<"``#\_________^#*!````````@```(`$``#\_________PW+!```
+M`````@```,("``#\_________R++!````````@```+<"``#\_________WK+
+M!```````"P````4```!8!@```````(3+!````````@```(P$``#\________
+M_Y;+!````````@```"P"``#\_________X',!````````@```$P"``#\____
+M_____XS,!````````@```)<"``#\_________Z',!````````@```$P"``#\
+M_________ZS,!````````@```)<"``#\_________[?,!````````@```+<"
+M``#\_________^/-!````````@```$P"``#\_________^[-!````````@``
+M`)<"``#\_________S+.!```````"P````4```!X!@```````#S.!```````
+M`@```(P$``#\_________UO.!````````@```#@"``#\_________VS.!```
+M`````@```*P"``#\_________WS.!````````@```(`$``#\_________X?.
+M!````````@```)<"``#\_________YS.!````````@```,,"``#\________
+M_ZC.!````````@```(`$``#\_________[/.!````````@```)<"``#\____
+M_____[[.!````````@```.@"``#\_________PC/!````````@```)0"``#\
+M_________W7/!```````"P````$````@R00``````'S/!```````"P```-P"
+M`````````````)+/!````````@```/L"``#\_________\O/!````````@``
+M`)0"``#\_________^?/!````````@```,X"``#\_________P'0!```````
+M`@```)<"``#\_________U;0!```````"P````$````@R00``````&/0!```
+M`````@```'("``#\_________W/0!````````@```&L"``#\_________W[0
+M!````````@```/L"``#\_________U+3!````````@```!D#``#\________
+M_X_3!````````@```)0"``#\_________]W3!```````"P````$````@R00`
+M`````.O3!````````@```/L"``#\_________R_4!````````@```)0"``#\
+M_________WW4!```````"P````$````@R00``````(O4!````````@```/L"
+M``#\_________\_4!````````@```)0"``#\_________Q75!```````"P``
+M``$````@R00``````"#5!````````@```/L"``#\_________U_5!```````
+M`@```)0"``#\_________Z75!```````"P````$````@R00``````+#5!```
+M`````@```/L"``#\_________^_5!````````@```)0"``#\_________T#6
+M!```````"P````$````@R00``````$O6!````````@```/L"``#\________
+M_X_6!````````@```)0"``#\_________]76!```````"P````$````@R00`
+M`````.#6!````````@```/L"``#\_________Q_7!````````@```)0"``#\
+M_________V77!```````"P````$````@R00``````'#7!````````@```/L"
+M``#\_________\;7!````````@```)0"``#\_________P_8!```````"P``
+M`+T"`````````````!;8!```````"P```-L"`````````````"G8!```````
+M`@```/L"``#\_________X[8!````````@```)0"``#\__________38!```
+M````"P```+T"`````````````/O8!```````"P```-L"``````````````[9
+M!````````@```/L"``#\_________Z_:!````````@```&,"``#\________
+M_PG;!````````@```$P"``#\_________Q?;!````````@```)<"``#\____
+M_____RO;!````````@```'$"``#\_________TC;!```````"P````,````(
+M*@```````&?;!````````@```&T$``#\_________[7;!````````@```&T$
+M``#\_________]W;!````````@```&T$``#\_________R[<!````````@``
+M`&T$``#\_________U'<!````````@```&T$``#\_________Z[<!```````
+M`@```&T$``#\_________^C<!````````@```&T$``#\_________RW=!```
+M`````@```(`$``#\_________UO=!````````@```*`$``#\_________XO=
+M!````````@```&T$``#\_________Z[=!````````@```&T$``#\________
+M_[S=!````````@```*`$``#\_________SS>!````````@```!P#``#\____
+M_____YC>!````````@````H#``#\_________ZW>!````````@```*8"``#\
+M_________\/>!````````@```)<$``#\_________]G>!````````@```)<$
+M``#\__________K>!````````@```#@"``#\_________R/?!````````@``
+M`&T$``#\_________T7?!````````@```&T$``#\_________YC?!```````
+M`@```!P#``#\_________]'?!````````@```.\"``#\_________Q#@!```
+M`````@```/<"``#\_________QK@!````````@```(`$``#\_________U;@
+M!````````@```&T$``#\_________WG@!````````@```&T$``#\________
+M_Q?A!````````@```$P"``#\_________R+A!````````@```)<"``#\____
+M_____S'A!````````@```*P"``#\_________T_A!````````@```$P"``#\
+M_________UKA!````````@```)<"``#\_________V7A!````````@```'$"
+M``#\__________;B!````````@```$P"``#\_________P?C!````````@``
+M`)<"``#\_________R'C!````````@```!,#``#\_________T;C!```````
+M"P````,```#8*@```````&3C!````````@```&T$``#\_________X;C!```
+M`````@```&T$``#\_________Q_D!````````@```%`"``#\_________VSD
+M!````````@```*\"``#\_________X?D!````````@```!P#``#\________
+M_[CD!````````@```)<$``#\_________\WD!````````@```/`"``#\____
+M_____]SD!````````@```/<"``#\_________^;D!````````@```(`$``#\
+M_________Q#E!````````@```$P"``#\_________QOE!````````@```)<"
+M``#\_________RSE!````````@```/P"``#\_________V/E!````````@``
+M`%`"``#\_________ZWE!````````@```*\"``#\_________\CE!```````
+M`@```!P#``#\__________GE!````````@```)<$``#\_________P[F!```
+M`````@```/`"``#\_________QWF!````````@```/<"``#\_________R?F
+M!````````@```(`$``#\_________U'F!````````@```$P"``#\________
+M_USF!````````@```)<"``#\_________VWF!````````@```/P"``#\____
+M_____Y#F!````````@```&T$``#\_________[+F!````````@```&T$``#\
+M_________PGG!````````@```/<"``#\_________Q/G!````````@```(`$
+M``#\_________T[G!````````@```&T$``#\_________W/G!````````@``
+M`&T$``#\_________\KG!````````@```!P#``#\_________P/H!```````
+M`@```.\"``#\_________W+H!````````@```&T$``#\_________Y#H!```
+M`````@```&T$``#\_________\'H!````````@```$P"``#\_________\SH
+M!````````@```)<"``#\_________]?H!````````@```'$"``#\________
+M_S_I!````````@```&T$``#\_________Z;J!````````@```(`$``#\____
+M_____Y3R!````````@```!P#``#\_________^GR!````````@```,8"``#\
+M__________[R!````````@```&`$``#\_________Q7S!````````@```$("
+M``#\_________XCT!````````@```+$"``#\_________Y?T!````````@``
+M`'L"``#\_________X3U!````````@```(`$``#\_________W#V!```````
+M`@````L```#^`@```````'WV!```````"P````L``````P```````(?V!```
+M`````@```$X"``#\_________[?V!````````@````L```#^`@```````,3V
+M!```````"P````L``````P```````,[V!````````@```$X"``#\________
+M_PGW!````````@```+$"``#\_________Q;W!````````@```'L"``#\____
+M_____RWX!````````@````D#``#\_________P'Y!````````@```&T$``#\
+M_________SKY!````````@```&T$``#\_________U+Y!````````@````T#
+M``#\_________V3Y!````````@````T#``#\_________W;Y!````````@``
+M``T#``#\_________XCY!````````@````T#``#\_________YKY!```````
+M`@````T#``#\_________ZSY!````````@````T#``#\_________[[Y!```
+M`````@````T#``#\_________]#Y!````````@````T#``#\_________V#Z
+M!````````@````T#``#\_________^;Z!````````@```+,"``#\________
+M__?Z!````````@```)<"``#\_________UG[!````````@```)0"``#\____
+M_____VG[!````````@```#D"``#\_________\C[!```````"P```!`#````
+M`````````-+[!````````@```'("``#\_________]W[!````````@```/L"
+M``#\_________S7\!````````@```)0"``#\_________TG\!````````@``
+M`#D"``#\_________^#\!````````@```&`$``#\_________PW]!```````
+M`@```&`$``#\_________QC]!```````"P```!`#`````````````";]!```
+M`````@```'("``#\_________S']!````````@```/L"``#\_________X;]
+M!````````@```$H"``#\_________Y3]!````````@```/<"``#\________
+M_Y[]!````````@```(`$``#\_________]?]!````````@```%8"``#\____
+M_____^7]!````````@```/<"``#\_________^_]!````````@```(`$``#\
+M_________Q+^!````````@```$H"``#\_________R3^!````````@```/<"
+M``#\_________R[^!````````@```(`$``#\_________WW^!````````@``
+M`%8"``#\_________ZX`!0```````@```,`"``#\_________Y@"!0``````
+M`@```+`"``#\_________[$"!0```````@```"\"``#\_________Q$$!0``
+M`````@```#4"``#\_________Z($!0```````@```#4"``#\_________[$$
+M!0```````@```&`$``#\_________^8$!0```````@```(`"``#\________
+M__L$!0``````"P```.0"`````````````#L%!0```````@```+`"``#\____
+M_____TT%!0```````@```"\"``#\_________^X%!0```````@```(`"``#\
+M_________Q$&!0```````@```(`"``#\_________\\&!0```````@```.$"
+M``#\_________]\&!0```````@```,T"``#\_________^\&!0```````@``
+M`!\"``#\_________T0'!0``````"P````,`````*P```````%H)!0``````
+M`@```&T$``#\_________W8)!0```````@```(`$``#\_________TT*!0``
+M`````@```&T$``#\_________\H*!0```````@```(`$``#\_________\T+
+M!0```````@```&T$``#\_________P8,!0```````@```#8"``#\________
+M_^H.!0```````@```&T$``#\_________U\0!0```````@```!(#```$````
+M`````*,0!0```````@```&T$``#\_________P\1!0```````@```#0"```$
+M`````````%,1!0```````@```&T$``#\_________[\1!0```````@```"T"
+M```$``````````,2!0```````@```&T$``#\_________Y\2!0```````@``
+M`&`"```$`````````.,2!0```````@```&T$``#\_________W03!0``````
+M"P```#0"`````````````),3!0``````"P```"T"`````````````+$3!0``
+M````"P```!(#`````````````-03!0``````"P```&`"`````````````)X4
+M!0```````@```-4"``#\_________]L5!0```````@```$X"``#\________
+M_^D5!0```````@```(`$``#\__________X5!0```````@```/X"``#\____
+M_____VD6!0```````@```&T$``#\_________WT6!0```````@```&T$``#\
+M_________[P6!0```````@```&T$``#\_________^,6!0```````@```/("
+M``#\_________^T6!0```````@````L```"@!````````/@6!0``````"P``
+M``L```!@!``````````7!0```````@````L```"@!````````!07!0``````
+M`@```&8"``#\_________QX7!0```````@````L```"D!````````"D7!0``
+M````"P````L```"`!````````#$7!0```````@````L```"D!````````$T7
+M!0```````@````L```"<!````````%@7!0``````"P````L```#@`P``````
+M`&`7!0```````@````L```"<!````````&87!0```````@```%P"```(````
+M`````((7!0```````@````L```!;!````````)(7!0``````"P````L```#@
+M`P```````)D7!0```````@````L```!<!````````+47!0```````@````L`
+M``!<!````````,,7!0```````@````L```![!````````-,7!0``````"P``
+M``L```#@`P```````-H7!0```````@````L```!\!````````/87!0``````
+M`@````L```!\!`````````H8!0```````@````L```"<!````````"(8!0``
+M`````@````L```!<!````````#@8!0``````"P````L```!@!````````$48
+M!0```````@````L```"<!````````%(8!0``````"P````L```#@`P``````
+M`'\8!0```````@```%P"```)`````````)$8!0``````"P````L```#@`P``
+M`````)@8!0``````"P```%P"`````````````+48!0```````@````<```!0
+M$@```````/T8!0```````@````L```"<!````````"89!0```````@````L`
+M``!\!````````#P9!0``````"P````L```"`!````````$D9!0```````@``
+M``L```"<!````````%89!0``````"P````L```#@`P```````(49!0``````
+M`@```%P"```)`````````)<9!0``````"P````L```#@`P```````)X9!0``
+M````"P```%P"`````````````+<9!0```````@````<```!0$@```````/\9
+M!0```````@````L```"<!````````#T:!0```````@```%P"```(````````
+M`%P:!0``````"P```%P"```-`````````&<:!0```````@````<```!0$@``
+M`````&X:!0``````"P```%P"`````````````.<:!0```````@````<```"<
+M$@```````/,:!0``````"P````<```!`$@```````$@;!0``````"P```%P"
+M`````````````$\;!0``````"P```%P"```0`````````($;!0``````"P``
+M`%P"```,`````````/D;!0``````"P```%P"```0`````````'(<!0``````
+M`@```%H$``#\_________X(<!0```````@````<```"<$@```````(\<!0``
+M````"P````<```!`$@```````+T<!0``````"P```%P"`````````````-,<
+M!0``````"P```%P"```0`````````-H<!0``````"P````<```!0$@``````
+M`/4<!0``````"P````<```!`$@```````/\<!0``````"P````<```!($@``
+M`````$H=!0``````"P```%P"```0`````````,P=!0```````@````<```"<
+M$@```````"P>!0```````@````L```"G!````````#4>!0```````@````L`
+M``"D!````````%,>!0```````@````<```"<$@```````%P>!0``````"P``
+M``<```!`$@```````&,>!0``````"P````<```!0$@```````(X>!0``````
+M`@````<```"<$@```````+`>!0``````"P```%P"`````````````,,>!0``
+M````"P```%P"```<`````````,T>!0``````"P```%P"```,`````````-4>
+M!0``````"P```%P"```0`````````#(?!0``````"P```%P"```<````````
+M`,@?!0```````@````L```"\`P```````-$?!0```````@````L```"\`P``
+M`````&DA!0```````@```&@$``#\_________X,A!0```````@```&@$``#\
+M_________]<A!0```````@````<```"<$@```````.`A!0``````"P````<`
+M``!`$@```````.<A!0```````@````<```"<$@````````8B!0``````"P``
+M``<```!0$@```````%DB!0```````@```*0$``#\_________W@B!0``````
+M`@```)P$``#\_________Z4B!0```````@```($"``#\_________[0B!0``
+M`````@```($"``#\_________^`B!0```````@```/<"``#\__________\B
+M!0```````@```%D$``#\_________Q0C!0``````"P```%\"````````````
+M`"<C!0```````@```'@$``#\_________U$C!0```````@```)D$``#\____
+M_____WLC!0```````@```/T"``#\_________X,C!0```````@```/T"``#\
+M_________XLC!0```````@```+@"``#\_________YPC!0```````@```+@"
+M``#\_________ZTC!0```````@```$<"``#\_________[<C!0```````@``
+M`(`$``#\_________[\C!0```````@```(P"``#\_________\<C!0``````
+M`@```%$"``#\_________]PC!0``````"P```%\"`````````````/,C!0``
+M`````@```'@$``#\_________P`D!0```````@```*P"``#\_________PTD
+M!0```````@```*P"``#\_________PLE!0```````@```$X"``#\________
+M_QDE!0```````@```(`$``#\_________RXE!0```````@```/X"``#\____
+M_____V(E!0``````"P````8```"G`0```````&PE!0```````@```(P$``#\
+M_________R`G!0``````"P```$L"`````````````"4G!0```````@```%($
+M``#\_________VTH!0``````"P````4```"P!@```````'<H!0```````@``
+M`(P$``#\_________Z<H!0```````@```%D$``#\_________[PH!0``````
+M"P````$```#`)P4``````-`H!0```````@```'@$``#\_________Z8J!0``
+M`````@````,#``#\_________\PJ!0```````@```+L"``#\__________<J
+M!0```````@```!P#``#\_________V@K!0```````@```!P#``#\________
+M_\DK!0```````@```)<$``#\_________T<L!0```````@```!P#``#\____
+M_____[(L!0```````@```)<$``#\_________],M!0```````@```,<"``#\
+M_________^@M!0```````@```*8"``#\_________V4O!0```````@```$`"
+M``#\_________[$O!0```````@```!P#``#\__________TO!0```````@``
+M`+<"``#\_________U<P!0```````@```'0"``#\_________WLP!0``````
+M`@```%@"``#\_________YDP!0```````@```!P#``#\_________^<P!0``
+M`````@```*D"``#\_________\$Q!0```````@```/`"``#\__________PQ
+M!0```````@```$`"``#\_________R4R!0```````@```+<"``#\________
+M_UXR!0```````@```%@"``#\_________Q<S!0```````@```$P"``#\____
+M_____R<S!0```````@```)<"``#\_________\,S!0```````@```)0"``#\
+M__________(U!0```````@```&`$``#\_________\DW!0``````"P````$`
+M``"0,@4``````$@X!0```````@```%("``#\_________U4X!0```````@``
+M`'("``#\_________V,X!0```````@```&L"``#\_________WTX!0``````
+M`@```,X"``#\_________^8X!0```````@```&`$``#\_________T(Y!0``
+M`````@```&`$``#\_________V$Y!0```````@```'("``#\_________W8Y
+M!0```````@```&L"``#\_________XPY!0```````@```/L"``#\________
+M_YDY!0```````@```)<"``#\_________TPZ!0```````@```)0"``#\____
+M_____V0Z!0```````@```,X"``#\_________WDZ!0```````@```)<"``#\
+M_________YHZ!0```````@```)<$``#\_________[(Z!0```````@```/`"
+M``#\__________DZ!0```````@```&`$``#\_________]4[!0```````@``
+M`%("``#\_________Q\\!0``````"P````$```"P)P4``````"X\!0``````
+M`@```'("``#\_________T0\!0```````@```&L"``#\_________U8\!0``
+M`````@```/L"``#\_________XP\!0```````@```/`"``#\_________YT\
+M!0```````@```(`$``#\_________Z4\!0```````@```/<"``#\________
+M__X\!0```````@```&`$``#\_________Q$]!0```````@```$P"``#\____
+M_____QP]!0```````@```)<"``#\_________S0]!0```````@```)<$``#\
+M_________XT]!0```````@```%D"``#\_________YX]!0```````@```%D"
+M``#\_________\4]!0```````@```/<"``#\_________V%2!0```````@``
+M`)0"``#\_________[Y2!0``````"P````$```"P)P4``````,E2!0``````
+M`@```/L"``#\_________PE3!0```````@```/`"``#\_________QU3!0``
+M`````@```(`$``#\_________R53!0```````@```/<"``#\_________UY3
+M!0```````@```)<"``#\_________^13!0```````@```)0"``#\________
+M_V14!0``````"P````$```"P)P4``````&]4!0```````@```/L"``#\____
+M_____ZE4!0```````@```/`"``#\_________[U4!0```````@```(`$``#\
+M_________\54!0```````@```/<"``#\_________P55!0```````@```,X"
+M``#\_________XU5!0``````"P````$```"P)P4``````)Q5!0```````@``
+M`'("``#\_________[)5!0```````@```&L"``#\_________[U5!0``````
+M`@```/L"``#\__________95!0```````@```/`"``#\_________P=6!0``
+M`````@```(`$``#\_________P]6!0```````@```/<"``#\_________T%6
+M!0```````@```$P"``#\_________U%6!0```````@```)<"``#\________
+M_UE6!0```````@```)0"``#\_________VY6!0```````@```$P"``#\____
+M_____VM7!0``````"P````$```"P)P4``````'I7!0```````@```'("``#\
+M_________Y!7!0```````@```&L"``#\_________YM7!0```````@```/L"
+M``#\_________]17!0```````@```/`"``#\_________^57!0```````@``
+M`(`$``#\_________^U7!0```````@```/<"``#\_________R98!0``````
+M`@```$P"``#\_________S=8!0```````@```)<"``#\_________[98!0``
+M`````@```)<$``#\_________\M8!0```````@```/`"``#\_________]M8
+M!0```````@```(`$``#\_________^-8!0```````@```/<"``#\________
+M_QM9!0```````@```)<$``#\_________X%9!0```````@````,#``#\____
+M_____Z)9!0```````@```+L"``#\_________[A9!0```````@```*8"``#\
+M_________R9:!0```````@```)0"``#\_________XI:!0``````"P````$`
+M``"P)P4``````)5:!0```````@```/L"``#\_________\Y:!0```````@``
+M`/`"``#\_________]]:!0```````@```(`$``#\_________^=:!0``````
+M`@```/<"``#\_________RU;!0```````@```)<"``#\_________W5;!0``
+M````"P````,````0+````````(Q;!0```````@```,<"``#\_________[Q;
+M!0```````@```/,"``#\_________]=;!0```````@```!T#``#\________
+M_^=;!0```````@```/0"``#\_________\5<!0```````@```&@"``#\____
+M_____]A<!0```````@```&@"``#\_________^5<!0```````@```&@"``#\
+M__________A<!0```````@```&@"``#\_________S-=!0```````@```'4$
+M``#\_________TI=!0```````@```'4$``#\_________V-=!0```````@``
+M`'4$``#\_________]9=!0```````@```","``#\__________9=!0``````
+M`@```'\$``#\_________PE>!0```````@```'\$``#\_________RQ>!0``
+M`````@```'\$``#\_________S]>!0```````@```'\$``#\_________U]>
+M!0```````@```'\$``#\_________W)>!0```````@```'\$``#\________
+M_Y)>!0```````@```'\$``#\_________Z5>!0```````@```'\$``#\____
+M_____]9>!0```````@```'\$``#\_________^I>!0```````@```'\$``#\
+M_________Q-?!0```````@```'\$``#\_________R9?!0```````@```'\$
+M``#\_________TQ?!0```````@```'\$``#\_________U]?!0```````@``
+M`'\$``#\_________W]?!0```````@```'\$``#\_________Y)?!0``````
+M`@```'\$``#\_________[)?!0```````@```'\$``#\_________\5?!0``
+M`````@```'\$``#\_________^Q?!0```````@```'\$``#\__________]?
+M!0```````@```'\$``#\_________Q]@!0```````@```'\$``#\________
+M_S)@!0```````@```'\$``#\_________U)@!0```````@```'\$``#\____
+M_____V5@!0```````@```'\$``#\_________XQ@!0```````@```'\$``#\
+M_________Y]@!0```````@```'\$``#\_________[]@!0```````@```'\$
+M``#\_________])@!0```````@```'\$``#\__________)@!0```````@``
+M`'\$``#\_________P5A!0```````@```'\$``#\_________RQA!0``````
+M`@```'\$``#\_________S]A!0```````@```'\$``#\_________U]A!0``
+M`````@```'\$``#\_________W)A!0```````@```'\$``#\_________Y)A
+M!0```````@```'\$``#\_________Z5A!0```````@```'\$``#\________
+M_]1A!0```````@```+$$``#\_________^YA!0```````@```+$$``#\____
+M_____Q9B!0```````@```+$$``#\_________S!B!0```````@```+$$``#\
+M_________UAB!0```````@```+$$``#\_________W)B!0```````@```+$$
+M``#\_________YIB!0```````@```+$$``#\_________[1B!0```````@``
+M`+$$``#\_________]QB!0```````@```+$$``#\__________9B!0``````
+M`@```+$$``#\_________R1C!0```````@```+$$``#\_________SYC!0``
+M`````@```+$$``#\_________V9C!0```````@```+$$``#\_________X!C
+M!0```````@```+$$``#\_________Z)C!0```````@```+@"``#\________
+M_[%C!0```````@```+@"``#\_________[EC!0```````@```$<"``#\____
+M_____\-C!0```````@```(`$``#\_________\MC!0```````@```(P"``#\
+M_________]-C!0```````@```%$"``#\_________^!C!0```````@```%D"
+M``#\_________^UC!0```````@```%D"``#\_________P=D!0``````"P``
+M``<```#`$@````````QD!0```````@```$\$``#\_________[]D!0``````
+M`@```/0#``#\_________^9D!0```````@```%`#``#\_________P-E!0``
+M`````@```-4#``#\_________UYE!0```````@```*P#``#\_________VYE
+M!0```````@```-L#``#\_________W%G!0```````@```&`$``#\________
+M_[AH!0```````@```-\#``#\_________\]K!0``````"P````4````(!P``
+M`````-EK!0```````@```(P$``#\_________^1K!0``````"P````8```#(
+M`0```````.YK!0```````@```(P$``#\_________Q)L!0``````"P````<`
+M````%````````$ML!0```````@```&T$``#\_________YQL!0```````@``
+M`&T$``#\_________^!L!0```````@```&T$``#\__________IL!0``````
+M`@```&T$``#\_________T5M!0```````@```&T$``#\_________U]M!0``
+M`````@```&T$``#\_________ZYM!0```````@```&T$``#\_________[]M
+M!0```````@```&T$``#\_________P-N!0```````@```(`$``#\________
+M_QQN!0```````@```&T$``#\_________S9N!0```````@```&T$``#\____
+M_____[MN!0```````@```&T$``#\_________]5N!0```````@```&T$``#\
+M_________PEO!0```````@```(`$``#\_________RMO!0```````@```&T$
+M``#\_________T5O!0```````@```&T$``#\_________XYO!0```````@``
+M`&T$``#\_________Y]O!0```````@```&T$``#\_________^-O!0``````
+M`@```(`$``#\__________QO!0```````@```&T$``#\_________Q9P!0``
+M`````@```&T$``#\_________XEP!0```````@```&T$``#\_________Z-P
+M!0```````@```&T$``#\__________UP!0```````@```&T$``#\________
+M_VUQ!0```````@```&T$``#\_________^AQ!0```````@```)P#``#\____
+M______)Q!0```````@```(`$``#\__________QQ!0```````@```*$#``#\
+M_________R9R!0```````@```&T$``#\_________T5R!0```````@```&T$
+M``#\_________UQR!0```````@```&T$``#\_________X)R!0```````@``
+M`&T$``#\_________^]R!0```````@```(`$``#\_________Z1S!0``````
+M`@```(`$``#\_________Y5T!0```````@```+X#``#\_________ZET!0``
+M`````@```%4#``#\_________\MT!0```````@```(T$``#\_________^UT
+M!0```````@```(T$``#\_________P]U!0```````@```(T$``#\________
+M_RYU!0```````@```(T$``#\_________U!U!0```````@```(T$``#\____
+M_____WUU!0```````@```(T$``#\_________Y=U!0```````@```(T$``#\
+M_________[%U!0```````@```(T$``#\_________]!U!0```````@```(T$
+M``#\__________-U!0```````@```(T$``#\_________Q9V!0```````@``
+M`(T$``#\_________S1V!0```````@```(T$``#\_________U)V!0``````
+M`@```(T$``#\_________W!V!0```````@```(T$``#\_________XYV!0``
+M`````@```(T$``#\_________ZMV!0```````@```(T$``#\_________\YV
+M!0```````@```(T$``#\_________^=V!0```````@```(T$``#\________
+M_PQW!0```````@```%X$``#\_________RQW!0```````@```%X$``#\____
+M_____U1W!0```````@```%X$``#\_________WEW!0```````@```%X$``#\
+M_________YYW!0```````@```%X$``#\_________\%W!0```````@```%X$
+M``#\_________^QW!0```````@```%X$``#\_________WUY!0```````@``
+M`+X#``#\_________Q)Z!0```````@```(\$``#\_________TAZ!0``````
+M`@```(\$``#\_________WYZ!0```````@```(\$``#\_________[1Z!0``
+M`````@```(\$``#\_________^1Z!0```````@```(\$``#\__________EZ
+M!0```````@```(\$``#\_________Q%[!0```````@```(\$``#\________
+M_WE[!0```````@```(\$``#\_________\A[!0```````@```(\$``#\____
+M_____Q=\!0```````@```(\$``#\_________VE\!0```````@```(\$``#\
+M_________\M\!0```````@```(\$``#\__________]\!0```````@```(\$
+M``#\_________RU]!0```````@```+,#``#\_________SI]!0```````@``
+M`(\$``#\_________VE]!0```````@```#\#``#\_________W9]!0``````
+M`@```(\$``#\_________Z5]!0```````@```#\#``#\_________[)]!0``
+M`````@```(\$``#\_________^%]!0```````@```#\#``#\_________^Y]
+M!0```````@```(\$``#\_________R%^!0```````@```#\#``#\________
+M_RY^!0```````@```(\$``#\_________XU^!0```````@```-D#``#\____
+M_____Y&!!0```````@```)H$``#\_________ZZ!!0```````@```)H$``#\
+M_________\N!!0```````@```)H$``#\_________^B!!0```````@```)H$
+M``#\_________P6"!0```````@```)H$``#\_________R*"!0```````@``
+M`)H$``#\_________U&"!0```````@````D$``#\_________YZ"!0``````
+M`@```)H$``#\_________\V"!0```````@````D$``#\_________WB#!0``
+M`````@````D$``#\_________ZJ#!0```````@```)<$``#\_________[Z#
+M!0```````@````($``#\_________\R#!0```````@```#8#``#\________
+M_]:#!0```````@```(`$``#\__________R#!0```````@```,$#``#\____
+M_____YJ$!0```````@```"$#``#\_________[6$!0```````@```)4#``#\
+M_________XV%!0```````@```'\#``#\_________PB&!0```````@```,P#
+M``#\_________W6*!0```````@```*L#``#\_________]R*!0```````@``
+M`#,#``#\_________Q"+!0```````@```'\#``#\_________["+!0``````
+M"P````,```!@+````````,.+!0```````@```',#``#\_________^^+!0``
+M`````@```',#``#\_________Q>,!0```````@```',#``#\_________S^,
+M!0```````@```',#``#\_________WF,!0```````@```.D#``#\________
+M_[Z,!0```````@```*\#``#\_________UJ.!0```````@```(P#``#\____
+M_____X2.!0```````@```(`$``#\_________Q"1!0```````@````T$``#\
+M_________Q^1!0```````@```.<#``#\_________^61!0```````@```"@#
+M``#\_________W>2!0```````@```-,#``#\_________Y22!0```````@``
+M`"@#``#\_________T24!0```````@```/\#``#\_________V:4!0``````
+M`@```.L#``#\_________]F4!0```````@```/\#``#\_________Q25!0``
+M`````@```.L#``#\_________Q^7!0```````@```$`#``#\_________U>7
+M!0``````"P````,```"P+`````````V8!0```````@```&`$``#\________
+M_RF8!0``````"P````,```!0,0```````-*8!0```````@```"`#``#\____
+M_____^*8!0```````@```"`#``#\_________W^9!0```````@```/\#``#\
+M_________[J9!0```````@```.L#``#\_________RV:!0```````@```#H#
+M``#\_________V2:!0```````@```.H#``#\_________X":!0```````@``
+M`#H#``#\_________X^:!0```````@```&T#``#\_________ZN:!0``````
+M`@```#H#``#\__________*:!0```````@```/T#``#\_________U2;!0``
+M`````@```#H#``#\_________VV;!0```````@```/T#``#\_________ZF<
+M!0```````@```'T#``#\_________[><!0```````@```,4#``#\________
+M_R.=!0```````@````D$``#\_________S*=!0```````@````H$``#\____
+M_____[>=!0``````"P````$```"@FP4``````,&=!0```````@```*P#``#\
+M_________\R=!0```````@````$$``#\_________VJ>!0```````@```&T$
+M``#\_________XR>!0```````@```(X#``#\_________YR>!0```````@``
+M`&\#``#\_________[Z>!0```````@```(X#``#\_________\:>!0``````
+M`@```)\#``#\_________^6>!0``````"P````,```"P-@```````/R>!0``
+M`````@```.0#``#\_________QB?!0```````@```.0#``#\_________S2?
+M!0```````@````($``#\_________U:?!0```````@```,D#``#\________
+M_VV?!0```````@```*H#``#\_________Y"?!0```````@````($``#\____
+M_____ZN?!0```````@```,D#``#\_________\*?!0```````@````($``#\
+M_________]2?!0```````@```*H#``#\_________^F?!0```````@````($
+M``#\_________QR@!0```````@```#8#``#\_________R:@!0```````@``
+M`(`$``#\_________YF@!0```````@```)H#``#\_________[*@!0``````
+M`@```*8#``#\_________]F@!0```````@```-0#``#\_________^Z@!0``
+M`````@```*`#``#\_________P&A!0``````"P````8```#5`0````````NA
+M!0```````@```(P$``#\_________R&A!0```````@```)<$``#\________
+M_S>A!0```````@```)<$``#\_________TJA!0```````@```.8#``#\____
+M_____VJA!0```````@````D$``#\_________Z>A!0```````@```&8#``#\
+M_________UJB!0```````@```'X#``#\_________WVB!0```````@```!0$
+M``#\_________Z6B!0```````@```"$#``#\_________\ZB!0```````@``
+M`+(#``#\_________]:B!0```````@```"$#``#\_________R.C!0``````
+M`@```!0$``#\_________VNC!0```````@```,D#``#\_________Y2C!0``
+M`````@````D$``#\_________\6C!0```````@```)<$``#\_________]RC
+M!0```````@````($``#\__________>C!0```````@```#8#``#\________
+M_P&D!0```````@```(`$``#\_________S>D!0```````@```-T#``#\____
+M_____X"D!0``````"P````4```!@!P```````(JD!0```````@```(P$``#\
+M_________YJD!0```````@````($``#\_________P>E!0```````@```#8#
+M``#\_________Q&E!0```````@```(`$``#\_________U6E!0```````@``
+M`)H#``#\_________W6E!0```````@```*8#``#\_________YZE!0``````
+M`@```-0#``#\_________[.E!0```````@```*`#``#\_________\:E!0``
+M````"P````8```#5`0```````-"E!0```````@```(P$``#\_________^6E
+M!0```````@```)<$``#\__________JE!0```````@```)<$``#\________
+M_PVF!0```````@```.8#``#\_________Q^F!0```````@````($``#\____
+M_____R>F!0```````@```"$#``#\_________\FF!0```````@```(0#``#\
+M_________^NF!0```````@```!0$``#\_________Q.G!0```````@```"$#
+M``#\_________S>G!0```````@```+(#``#\_________S^G!0```````@``
+M`"$#``#\_________V*G!0```````@```!0$``#\_________Y2G!0``````
+M`@````($``#\_________Z:G!0```````@```*H#``#\_________\2G!0``
+M`````@````D$``#\__________>G!0```````@```)<$``#\_________PRH
+M!0```````@````($``#\_________QJH!0```````@```#8#``#\________
+M_R2H!0```````@```(`$``#\_________T6H!0```````@```%,#``#\____
+M_____VBH!0```````@```!0$``#\_________Z2H!0```````@````D$``#\
+M_________\.H!0```````@```)<$``#\_________]RH!0```````@````($
+M``#\_________^JH!0```````@```#8#``#\__________2H!0```````@``
+M`(`$``#\_________QNI!0```````@```-0#``#\_________S"I!0``````
+M`@```*`#``#\_________T6I!0```````@```)<$``#\_________UJI!0``
+M`````@```)<$``#\_________VVI!0```````@```.8#``#\_________XRI
+M!0```````@````($``#\_________Y>I!0```````@```,`#``#\________
+M_Z^I!0```````@```&T$``#\__________>I!0```````@```/(#``#\____
+M_____P*J!0```````@```#P#``#\_________T^J!0```````@```.X#``#\
+M_________WNJ!0```````@````D$``#\_________QNK!0```````@```"4#
+M``#\_________R>L!0```````@```!0$``#\_________UBL!0```````@``
+M`'4#``#\_________W&L!0```````@```-8#``#\_________ZNL!0``````
+M`@```"P#``#\_________]RL!0```````@```$P#``#\_________P*M!0``
+M`````@````D$``#\_________ZJM!0```````@```"4#``#\_________[FN
+M!0```````@```'4#``#\_________^NN!0```````@```"D#``#\________
+M_SNO!0```````@````D$``#\_________TVO!0```````@```+$#``#\____
+M_____^*O!0```````@```+(#``#\_________W&P!0```````@```+(#``#\
+M_________WZP!0```````@```*@#``#\_________ZFP!0```````@```+(#
+M``#\_________\>P!0```````@```!0$``#\_________^VP!0```````@``
+M`!P$``#\_________X*Q!0```````@```&T$``#\_________Z:Q!0``````
+M`@```(`$``#\_________]2Q!0```````@```&T$``#\__________2Q!0``
+M`````@```&T$``#\_________W6R!0```````@```(`$``#\_________^NR
+M!0```````@```,@#``#\_________P>S!0```````@```(\#``#\________
+M_Q2S!0```````@```/(#``#\_________T.S!0```````@```#P#``#\____
+M_____W2S!0```````@```#(#``#\_________YZS!0```````@```/(#``#\
+M_________UFT!0```````@```(`$``#\_________[ZT!0```````@```&T$
+M``#\_________^"T!0```````@```(`$``#\_________PRU!0```````@``
+M`&T$``#\_________RNU!0```````@```&T$``#\_________X>U!0``````
+M`@````D$``#\_________Q&V!0```````@````($``#\_________SZV!0``
+M`````@````($``#\_________TNV!0```````@```/(#``#\_________XRV
+M!0```````@````D$``#\_________ZBV!0```````@````D$``#\________
+M_\FV!0```````@```%D$``#\_________^BV!0```````@```#8#``#\____
+M______*V!0```````@```(`$``#\_________Z.W!0```````@```&\#``#\
+M_________\>W!0```````@```-0#``#\_________]RW!0```````@```*`#
+M``#\_________^^W!0``````"P````8```#5`0```````/FW!0```````@``
+M`(P$``#\_________PZX!0```````@```)<$``#\_________R.X!0``````
+M`@```)<$``#\_________S^X!0```````@```.8#``#\_________UZX!0``
+M`````@```-@#``#\_________XBX!0```````@````D$``#\_________ZBX
+M!0```````@```#8#``#\_________[*X!0```````@```(`$``#\________
+M__.X!0```````@```-0#``#\_________PBY!0```````@```*`#``#\____
+M_____QNY!0``````"P````8```#5`0```````"6Y!0```````@```(P$``#\
+M_________SJY!0```````@```)<$``#\_________T^Y!0```````@```)<$
+M``#\_________V:Y!0```````@```.8#``#\_________WZY!0```````@``
+M`#P#``#\__________*Y!0```````@```&T$``#\_________Q>Z!0``````
+M`@```(`$``#\_________T.Z!0```````@```&T$``#\_________V*Z!0``
+M`````@```&T$``#\_________S>[!0``````"P```#@#`````````````#^[
+M!0```````@```'H#``#\_________]F[!0```````@```"H#``#\________
+M__J[!0```````@````D$``#\_________X"\!0```````@```$\#``#\____
+M_____[6\!0```````@```-T#``#\_________^Z\!0```````@````\$``#\
+M_________P6]!0```````@```)<$``#\_________QV]!0```````@```)<$
+M``#\_________U:]!0```````@```(`$``#\_________VV]!0```````@``
+M`&T$``#\_________XV]!0```````@```&T$``#\_________ZF]!0``````
+M`@```/(#``#\_________[&]!0```````@```(<#``#\__________J]!0``
+M`````@```,@#``#\_________U>^!0```````@````D$``#\_________\F^
+M!0```````@```)T#``#\_________]B^!0```````@```)D#``#\________
+M_P2_!0```````@```&X#``#\_________UR_!0```````@```&T$``#\____
+M_____XF_!0```````@```&T$``#\_________YZ_!0```````@```,L#``#\
+M_________ZN_!0```````@```*4#``#\_________\N_!0```````@```&T$
+M``#\_________]N_!0```````@```&T$``#\_________^N_!0```````@``
+M`&T$``#\__________N_!0```````@```&T$``#\_________VO`!0``````
+M`@```&T$``#\_________Y+`!0```````@```&T$``#\_________Z'`!0``
+M`````@```*0#``#\_________][`!0```````@```&T$``#\_________P;!
+M!0```````@```&T$``#\_________Y/!!0```````@```&T$``#\________
+M_[K!!0```````@```&T$``#\_________^'!!0```````@```%D$``#\____
+M_____Q3"!0```````@````D$``#\_________TS"!0```````@```)<$``#\
+M_________V#"!0```````@````($``#\_________X'"!0```````@```'8#
+M``#\_________XO"!0```````@```(`$``#\_________[+"!0``````"P``
+M``$````0OP4``````,;"!0```````@```'@$``#\_________^K"!0``````
+M`@```&T$``#\_________PK#!0```````@```&T$``#\_________R[#!0``
+M`````@```&T$``#\_________UK#!0```````@```&T$``#\_________XG#
+M!0```````@```&T$``#\_________ZO#!0```````@```&T$``#\________
+M_R#$!0```````@```&T$``#\_________TK$!0```````@```&T$``#\____
+M_____WG$!0```````@```&T$``#\_________YO$!0```````@```&T$``#\
+M_________QC%!0```````@```&T$``#\_________SK%!0```````@```&T$
+M``#\_________\C%!0```````@```%D$``#\_________P'&!0```````@``
+M`)<$``#\_________Q7&!0```````@````($``#\_________R3&!0``````
+M`@```#8#``#\_________R[&!0```````@```(`$``#\_________U+&!0``
+M````"P````$```#PO@4``````&K&!0```````@```'@$``#\_________Y;&
+M!0```````@```&T$``#\_________[[&!0```````@```&T$``#\________
+M_^O&!0```````@```&T$``#\_________Q+'!0```````@```&T$``#\____
+M_____T_'!0```````@```%D$``#\_________V_'!0```````@````D$``#\
+M_________Z''!0```````@```)<$``#\_________\/'!0``````"P```"H#
+M`````````````-7'!0```````@```'@$``#\_________P#(!0```````@``
+M`&T$``#\_________R+(!0```````@```&T$``#\_________][(!0``````
+M`@```&T$``#\_________PO)!0```````@```&T$``#\_________T')!0``
+M`````@```&T$``#\_________W/)!0``````"P````4```"`!P```````'W)
+M!0```````@```(P$``#\_________[C)!0```````@```#`#``#\________
+M_Q?*!0```````@```.X#``#\_________R+*!0```````@```'X#``#\____
+M_____\W*!0```````@```'4#``#\__________#*!0```````@```!0$``#\
+M_________R3+!0```````@````D$``#\_________[_+!0```````@```'4#
+M``#\_________]W+!0```````@```!0$``#\_________RC,!0```````@``
+M`"P#``#\_________T3,!0```````@```#`#``#\_________V?-!0``````
+M`@```&T$``#\_________XO-!0```````@```&T$``#\_________ZC-!0``
+M`````@```&T$``#\_________QO.!0```````@```&T$``#\_________T'.
+M!0```````@```&T$``#\_________Z?.!0```````@```-8#``#\________
+M__K.!0```````@```&T$``#\_________R3/!0```````@```&T$``#\____
+M_____UG/!0```````@```&T$``#\_________X[/!0```````@```#`#``#\
+M_________Y[/!0```````@````8$``#\_________Y#0!0```````@```&D#
+M``#\_________\K0!0```````@```&`$``#\_________Z;1!0```````@``
+M`&`$``#\_________Q#2!0```````@```&`$``#\_________T'2!0``````
+M`@```&T$``#\_________W;2!0```````@```&T$``#\_________\;2!0``
+M`````@```&T$``#\_________YO3!0```````@```&`$``#\__________[4
+M!0```````@```&`$``#\_________Z+5!0```````@```&`$``#\________
+M_[75!0``````"P````,```#8-@```````$36!0```````@```(`$``#\____
+M_____Z?6!0```````@```&T$``#\_________]'6!0```````@```&T$``#\
+M_________RG7!0```````@```&T$``#\_________]+7!0```````@```&T$
+M``#\_________TO8!0```````@```(`#``#\_________UO8!0```````@``
+M`(`#``#\_________QC9!0```````@```'4#``#\_________S'9!0``````
+M`@```!0$``#\_________^?9!0```````@````P$``#\_________V+;!0``
+M`````@```(X#``#\_________W+;!0```````@```&\#``#\_________[W;
+M!0```````@```%@#``#\_________S'<!0```````@```'4#``#\________
+M_SS<!0```````@````P$``#\_________U7<!0```````@```!0$``#\____
+M_____[7<!0```````@````D$``#\_________S[=!0```````@```.P#``#\
+M_________WK=!0```````@````D$``#\_________R?>!0```````@````D$
+M``#\_________UK>!0```````@```&\#``#\_________V[>!0```````@``
+M`"$#``#\_________\W>!0```````@```&T$``#\__________3>!0``````
+M`@```"4#``#\_________ZC?!0```````@```%D$``#\_________[3?!0``
+M`````@```,`#``#\_________]3?!0```````@````D$``#\_________W?@
+M!0```````@```&\#``#\_________ZS@!0```````@```-0#``#\________
+M_\'@!0```````@```*`#``#\_________]3@!0``````"P````8```#5`0``
+M`````-[@!0```````@```(P$``#\__________/@!0```````@```)<$``#\
+M_________PCA!0```````@```)<$``#\_________Q_A!0```````@```.8#
+M``#\_________T3A!0```````@```&T$``#\_________[OA!0```````@``
+M`/4#``#\_________\?A!0```````@```&$#``#\_________PWB!0``````
+M`@````L$``#\_________QKB!0```````@```*4#``#\_________V3B!0``
+M`````@```%$#``#\_________\/B!0```````@```&T$``#\_________^KB
+M!0```````@```&T$``#\__________SB!0```````@```*4#``#\________
+M_T7C!0```````@````($``#\_________U3C!0```````@```#8#``#\____
+M_____U[C!0```````@```(`$``#\_________XSC!0```````@```-0#``#\
+M_________Z'C!0```````@```)<$``#\_________[;C!0```````@```)<$
+M``#\_________\WC!0```````@```.8#``#\_________]WC!0```````@``
+M`&T$``#\_________SGD!0```````@```&X#``#\_________W3D!0``````
+M`@```)<$``#\__________;D!0```````@```&X#``#\_________RSE!0``
+M`````@```(`$``#\_________T3E!0```````@```&T$``#\_________U_E
+M!0```````@```&T$``#\_________WOE!0```````@```/(#``#\________
+M_X/E!0```````@```(<#``#\_________Z?E!0```````@```)T#``#\____
+M_____\+F!0```````@```&`$``#\_________^'F!0```````@```&T$``#\
+M_________Q7G!0```````@```&T$``#\_________V+G!0```````@```&T$
+M``#\_________X?G!0``````"P````4```#0!P```````)'G!0```````@``
+M`(P$``#\_________ZSG!0```````@```(8#``#\_________^;G!0``````
+M`@```&T$``#\_________P7H!0```````@```&T$``#\_________R3H!0``
+M`````@```&T$``#\_________R_H!0```````@````8$``#\_________TCH
+M!0```````@```&T$``#\_________S/I!0```````@```/<#``#\________
+M_T;I!0```````@```&(#``#\_________U?I!0```````@```,4#``#\____
+M_____W'I!0```````@```%D$``#\_________X;I!0``````"P```$D#````
+M`````````)KI!0```````@```'@$``#\__________/I!0```````@````H$
+M``#\_________POJ!0```````@```/0#``#\_________Q[J!0```````@``
+M`,4#``#\_________VOJ!0``````"P```.4#`````````````(SJ!0``````
+M`@```*P#``#\_________YSJ!0```````@```-L#``#\_________Z?J!0``
+M`````@````$$``#\_________ROK!0```````@```(,#``#\_________R#L
+M!0```````@```#D#``#\_________UWL!0```````@```#D#``#\________
+M_YKL!0```````@```($#``#\_________T[N!0```````@```-`#``#\____
+M_____X[N!0```````@```)0#``#\_________\;N!0```````@```($#``#\
+M_________TOP!0```````@```&`$``#\_________P_Q!0```````@```+T#
+M``#\_________T_Q!0```````@```+T#``#\_________Y/Q!0```````@``
+M`)@#``#\_________Z7Q!0```````@```$8#``#\_________\SQ!0``````
+M`@```($#``#\_________Q+R!0```````@```&`$``#\_________Q_R!0``
+M`````@```-X#``#\_________[+S!0```````@```)(#``#\_________\+S
+M!0```````@```%T#``#\_________]+S!0```````@````4$``#\________
+M_^+S!0```````@```/<#``#\__________SS!0```````@```%D$``#\____
+M_____Q'T!0``````"P```$D#`````````````"OT!0```````@```'@$``#\
+M_________U3T!0```````@````D$``#\_________]7T!0```````@````\$
+M``#\_________Q3U!0```````@````D$``#\_________UWU!0```````@``
+M`&8#``#\_________WWU!0```````@```$\#``#\_________XKU!0``````
+M`@```-T#``#\_________YOU!0```````@```($#``#\_________Z_U!0``
+M`````@```&(#``#\_________[KU!0```````@```,4#``#\_________^WU
+M!0```````@```($#``#\_________U/V!0```````@````H$``#\________
+M_VOV!0```````@```/0#``#\_________W[V!0```````@```,4#``#\____
+M_____\OV!0``````"P```!@$`````````````.SV!0```````@```*P#``#\
+M__________SV!0```````@```-L#``#\_________P?W!0```````@````$$
+M``#\_________XCW!0```````@````H$``#\_________YSW!0```````@``
+M`/0#``#\_________Z_W!0```````@```,4#``#\_________]'W!0``````
+M`@```&`$``#\_________Q+X!0``````"P```!@$`````````````#3X!0``
+M`````@```*P#``#\_________T/X!0```````@```-L#``#\_________T[X
+M!0```````@````$$``#\_________Q3Z!0```````@````0$``#\________
+M_V[Z!0```````@````0$``#\_________YSZ!0```````@```(H#``#\____
+M_____\7[!0```````@```&(#``#\_________]?[!0```````@```,4#``#\
+M_________P[\!0```````@```&`$``#\_________T_\!0```````@```&(#
+M``#\_________UK\!0```````@```,4#``#\_________\#\!0```````@``
+M``H$``#\_________]S\!0```````@```/0#``#\_________^_\!0``````
+M`@```,4#``#\_________T+]!0``````"P```(@#`````````````)#]!0``
+M`````@```*P#``#\_________Z']!0```````@```-L#``#\_________ZS]
+M!0```````@````$$``#\_________Q_^!0```````@````H$``#\________
+M_S/^!0```````@```/0#``#\_________T;^!0```````@```,4#``#\____
+M_____VC^!0```````@```&`$``#\_________[7^!0``````"P```(@#````
+M`````````/[^!0```````@```*P#``#\_________P[_!0```````@```-L#
+M``#\_________QG_!0```````@````$$``#\_________\G_!0```````@``
+M`&T$``#\_________ZX#!@```````@```.0#``#\_________\,#!@``````
+M`@```!T$``#\_________S<$!@```````@````D$``#\_________S(%!@``
+M`````@```+(#``#\_________V0(!@``````"P```(8#`````````````'L(
+M!@```````@```'@$``#\_________Q$)!@``````"P```!8$````````````
+M`"@)!@```````@```'@$``#\_________W8)!@```````@```%D$``#\____
+M_____Y8)!@```````@```%D$``#\_________QX*!@```````@````D$``#\
+M_________S$*!@```````@```$P#``#\_________U`*!@``````"P```(8#
+M`````````````&@*!@```````@```'@$``#\__________X*!@```````@``
+M``D$``#\_________Q$+!@```````@```.X#``#\_________RP+!@``````
+M"P```!8$`````````````$0+!@```````@```'@$``#\_________]$+!@``
+M`````@```'$#``#\_________QP,!@```````@```'4#``#\_________T$,
+M!@```````@```'X#``#\_________TP,!@```````@```.X#``#\________
+M_P0-!@```````@````D$``#\_________Q4.!@```````@```'4#``#\____
+M_____UH.!@```````@```'4#``#\_________WX.!@```````@```(0#``#\
+M__________,.!@```````@```.D#``#\_________PP/!@```````@```$0#
+M``#\_________VL/!@```````@```%H#``#\_________R40!@```````@``
+M`'4#``#\_________X40!@```````@```.D#``#\_________YX0!@``````
+M`@```$0#``#\_________P81!@```````@```,0#``#\_________YH1!@``
+M`````@```,\#``#\_________P$2!@```````@```.D#``#\_________QH2
+M!@```````@```$0#``#\_________TP3!@```````@```.D#``#\________
+M_V43!@```````@```$0#``#\_________UX4!@```````@````D$``#\____
+M_____VD4!@```````@```'D#``#\_________W$4!@```````@```+$#``#\
+M_________[D4!@```````@```$@#``#\__________$4!@```````@````D$
+M``#\_________UT5!@```````@````D$``#\_________[T5!@```````@``
+M``D$``#\_________QT6!@```````@````D$``#\_________X$6!@``````
+M`@````D$``#\_________T08!@```````@````D$``#\_________XP8!@``
+M`````@```'T#``#\_________YD8!@```````@```,4#``#\_________](8
+M!@```````@```,D#``#\_________PD9!@```````@```-T#``#\________
+M_R,9!@```````@```+`#``#\_________TH9!@```````@````D$``#\____
+M_____YP9!@```````@```$\#``#\_________[$9!@```````@```'T#``#\
+M_________[P9!@```````@```,4#``#\_________Q4:!@```````@````H$
+M``#\_________R4:!@```````@```'P#``#\_________WD:!@``````"P``
+M`",#`````````````(,:!@```````@```*P#``#\_________XX:!@``````
+M`@````$$``#\_________]P:!@```````@````H$``#\_________^P:!@``
+M`````@```'P#``#\_________T0;!@``````"P```",#`````````````$X;
+M!@```````@```*P#``#\_________UD;!@```````@````$$``#\________
+M_[4;!@```````@````H$``#\_________\D;!@```````@```'P#``#\____
+M_____R4<!@``````"P```",#`````````````"\<!@```````@```*P#``#\
+M_________SH<!@```````@````$$``#\_________T0<!@```````@```(`$
+M``#\_________Z4<!@```````@````H$``#\_________\0<!@```````@``
+M`'P#``#\_________]<<!@```````@```,4#``#\_________S$=!@``````
+M"P```",#`````````````#L=!@```````@```*P#``#\_________T8=!@``
+M`````@````$$``#\_________VH>!@```````@```,4#``#\_________^L>
+M!@```````@```!T$``#\__________<>!@```````@```,4#``#\________
+M_V$?!@```````@````H$``#\__________T?!@``````"P````$```!P'08`
+M``````<@!@```````@```*P#``#\_________Q(@!@```````@````$$``#\
+M_________XH@!@```````@````H$``#\_________Z@@!@```````@```/0#
+M``#\_________\0@!@```````@```,4#``#\_________QHA!@``````"P``
+M`)<#`````````````"<A!@```````@```*P#``#\_________S@A!@``````
+M`@```-L#``#\_________T,A!@```````@````$$``#\_________YHA!@``
+M`````@````H$``#\_________[@A!@```````@```/0#``#\_________]0A
+M!@```````@```,4#``#\_________S(B!@``````"P```)<#````````````
+M`#\B!@```````@```*P#``#\_________U`B!@```````@```-L#``#\____
+M_____ULB!@```````@````$$``#\_________[,B!@```````@````H$``#\
+M_________]0B!@```````@```/0#``#\__________`B!@```````@```,4#
+M``#\_________UHC!@``````"P```)<#`````````````&<C!@```````@``
+M`*P#``#\_________W@C!@```````@```-L#``#\_________X,C!@``````
+M`@````$$``#\_________]HC!@```````@````H$``#\__________PC!@``
+M`````@```/0#``#\_________Q8D!@```````@```,4#``#\_________XHD
+M!@``````"P```)<#`````````````)LD!@```````@```*P#``#\________
+M_ZHD!@```````@```-L#``#\_________[4D!@```````@````$$``#\____
+M_____P`E!@```````@````H$``#\_________SXE!@```````@```',#``#\
+M_________TTE!@```````@```,4#``#\_________V<E!@``````"P```)<#
+M`````````````'(E!@```````@````$$``#\_________Z,E!@``````"P``
+M``,````X-P```````!(F!@```````@```#X#``#\_________UHF!@``````
+M`@```&T$``#\_________Y@F!@```````@```&T$``#\_________\8F!@``
+M`````@```&T$``#\_________P(G!@```````@```&T$``#\_________V(G
+M!@```````@```#X#``#\_________Y4G!@```````@```&T$``#\________
+M_\XG!@```````@```&T$``#\__________@G!@```````@```&T$``#\____
+M_____S@H!@```````@```&T$``#\_________YPI!@```````@```(X#``#\
+M__________8J!@```````@```&(#``#\_________V4L!@```````@````$$
+M``#\_________X\L!@```````@```"`$``#\_________YLL!@```````@``
+M`$@#``#\_________[0L!@```````@```!0$``#\_________R4M!@``````
+M`@```(0#``#\_________YHM!@```````@```'X#``#\_________Q8N!@``
+M`````@```'4#``#\_________R$N!@```````@````P$``#\_________RPN
+M!@```````@```+(#``#\_________UDN!@```````@```$0#``#\________
+M_UXO!@``````"P````<`````&````````*HO!@```````@```!,$``#\____
+M_____X,Q!@```````@```(`$``#\_________XXQ!@```````@```,4#``#\
+M_________YXQ!@```````@```*,#``#\_________ZHQ!@```````@```(`$
+M``#\_________[4Q!@```````@```,4#``#\_________P0R!@```````@``
+M``H$``#\_________T0R!@``````"P```/8#`````````````$\R!@``````
+M`@````$$``#\_________U\R!@```````@```(`$``#\_________VLR!@``
+M`````@```(`$``#\_________Y0S!@```````@```&(#``#\_________Y\S
+M!@```````@```,4#``#\_________^(S!@```````@```*,#``#\________
+M__4S!@```````@```&(#``#\_________P<T!@```````@```,4#``#\____
+M_____T\T!@```````@````H$``#\_________V,T!@```````@```/0#``#\
+M_________W8T!@```````@```,4#``#\_________\(T!@``````"P````$`
+M``"0,@8``````,\T!@```````@```*P#``#\_________]XT!@```````@``
+M`-L#``#\_________^DT!@```````@````$$``#\_________S,U!@``````
+M`@````H$``#\_________W0U!@``````"P```)<#`````````````'\U!@``
+M`````@````$$``#\_________\`U!@```````@````H$``#\_________]`U
+M!@```````@```/0#``#\_________^HU!@```````@```,4#``#\________
+M_RTV!@``````"P```)<#`````````````#@V!@```````@````$$``#\____
+M_____W(V!@```````@````($``#\_________Z0V!@```````@```#8#``#\
+M_________ZXV!@```````@```(`$``#\_________]8V!@```````@```)H#
+M``#\__________4V!@```````@```*8#``#\_________S0W!@```````@``
+M`-0#``#\_________TDW!@```````@```*`#``#\_________UPW!@``````
+M"P````8```#K`0```````&8W!@```````@```(P$``#\_________WLW!@``
+M`````@```)<$``#\_________Y`W!@```````@```)<$``#\_________]8W
+M!@```````@```.8#``#\__________8W!@```````@````D$``#\________
+M_S(X!@```````@```&8#``#\_________TXY!@```````@```(,#``#\____
+M_____X4Y!@```````@```'(#``#\_________^TY!@```````@```'(#``#\
+M_________VLZ!@```````@```/X#``#\_________Z8Z!@```````@```/X#
+M``#\__________@Z!@```````@```/X#``#\_________S,[!@```````@``
+M`/X#``#\_________SL\!@``````"P````$```"P.08``````&L\!@``````
+M`@```'<#``#\_________\L\!@``````"P````$```"P.08``````/L\!@``
+M`````@```'<#``#\_________\(]!@``````"P````$```"P.08``````/0]
+M!@```````@```'<#``#\_________\P^!@``````"P````$```"P.08`````
+M`.X^!@```````@```'<#``#\_________UT_!@``````"P````$```"P.08`
+M`````'X_!@```````@```'<#``#\_________PQ!!@```````@```!L$``#\
+M_________X9!!@```````@```!`$``#\_________]I!!@```````@```/X#
+M``#\_________Z!"!@```````@```$(#``#\_________W=#!@```````@``
+M`(,#``#\_________Z1#!@```````@```$X#``#\_________[Y#!@``````
+M`@```(L#``#\_________Q1%!@```````@```'(#``#\_________^!&!@``
+M`````@```#$#``#\_________UI'!@```````@```$(#``#\_________^I'
+M!@```````@```/X#``#\_________Q9(!@```````@```/X#``#\________
+M_Y1(!@```````@````@$``#\_________QA)!@```````@```/X#``#\____
+M_____[A+!@```````@```/X#``#\_________Y-.!@```````@```&T$``#\
+M_________[=.!@```````@```&T$``#\_________W-/!@```````@```(`$
+M``#\_________Y-/!@```````@```&T$``#\_________[=/!@```````@``
+M`&T$``#\_________P!0!@```````@```(`$``#\_________R!0!@``````
+M`@```&T$``#\_________T=0!@```````@```&T$``#\_________Y]0!@``
+M`````@```(`$``#\_________[]0!@```````@```&T$``#\_________]Y0
+M!@```````@```&T$``#\_________R91!@```````@```(`$``#\________
+M_VU1!@```````@```/4#``#\_________X!1!@```````@```&8#``#\____
+M_____ZM1!@```````@```&$#``#\_________^Y1!@```````@````L$``#\
+M_________Q]2!@```````@```)$#``#\_________RU2!@```````@```(`$
+M``#\_________W12!@```````@```.8#``#\_________Y%2!@```````@``
+M`+@#``#\_________\Q2!@```````@```&X#``#\__________)2!@``````
+M`@```%D$``#\__________]2!@```````@```,`#``#\_________R13!@``
+M`````@````D$``#\_________T]3!@```````@```-0#``#\_________V13
+M!@```````@```*`#``#\_________WE3!@```````@```)<$``#\________
+M_XY3!@```````@```)<$``#\_________Z93!@```````@```.8#``#\____
+M_____\]3!@```````@````D$``#\_________^%3!@```````@```&$#``#\
+M_________R54!@```````@```-T#``#\_________Y14!@```````@````D$
+M``#\__________A4!@```````@```-T#``#\_________ZI5!@```````@``
+M`(,#``#\_________U16!@```````@````D$``#\_________W16!@``````
+M`@```'`#``#\_________[]6!@```````@```(,#``#\_________V)7!@``
+M`````@```)<$``#\_________XU7!@```````@````($``#\_________YM7
+M!@```````@```#8#``#\_________Z57!@```````@```(`$``#\________
+M_\U7!@```````@```)H#``#\_________^97!@```````@```*8#``#\____
+M_____Q18!@```````@```-0#``#\_________RE8!@```````@```*`#``#\
+M_________SY8!@```````@```)<$``#\_________U-8!@```````@```)<$
+M``#\_________X%8!@```````@```.8#``#\__________98!@```````@``
+M`'`#``#\_________PE9!@```````@```$<#``#\_________[M9!@``````
+M`@```(,#``#\_________^Q9!@```````@```&$#``#\_________T5;!@``
+M`````@```$\#``#\_________V];!@```````@````\$``#\_________XY;
+M!@```````@```($#``#\__________Y;!@```````@````D$``#\________
+M_Q]<!@```````@```'`#``#\_________VQ<!@```````@```'`#``#\____
+M_____YQ<!@```````@```'`#``#\_________[)<!@```````@```(,#``#\
+M_________^M<!@```````@```)X#``#\_________P1>!@```````@```.@#
+M``#\_________RE>!@```````@````D$``#\_________SU>!@```````@``
+M``($``#\_________TM>!@```````@```#8#``#\_________U5>!@``````
+M`@```(`$``#\_________X->!@```````@```-0#``#\_________YA>!@``
+M`````@```*`#``#\_________[%>!@```````@```)<$``#\_________\9>
+M!@```````@```)<$``#\_________^]>!@```````@```.8#``#\________
+M_PQ?!@```````@```-@#``#\_________V9?!@```````@```,X#``#\____
+M_____X%?!@```````@```'`#``#\_________[A?!@```````@```'`#``#\
+M_________^9?!@```````@```'`#``#\__________=?!@```````@```)X#
+M``#\_________PE@!@```````@```!H$``#\_________S!@!@```````@``
+M`)X#``#\_________W9A!@```````@```&$#``#\_________X]B!@``````
+M`@```$\#``#\_________Z]B!@```````@````\$``#\__________%B!@``
+M`````@```&8#``#\_________S%C!@```````@```'`#``#\_________U!C
+M!@```````@```,(#``#\_________[!C!@```````@```#(#``#\________
+M_\9C!@``````"P```#@#`````````````-%C!@```````@```'H#``#\____
+M_____]YC!@```````@```+8#``#\_________^EC!@```````@```#(#``#\
+M_________[-E!@``````"P````4```#P!P```````+UE!@```````@```(P$
+M``#\_________RMF!@```````@```!H$``#\_________^MF!@```````@``
+M`-(#``#\_________UQG!@``````"P```#@#`````````````&=G!@``````
+M`@```'H#``#\_________Y]G!@``````"P````4```!`"````````*EG!@``
+M`````@```(P$``#\_________[EG!@```````@```&8#``#\_________^!G
+M!@```````@```&$#``#\_________RYH!@```````@```-(#``#\________
+M_T%H!@```````@```$H#``#\_________W%H!@```````@````\$``#\____
+M_____T=I!@```````@```)D#``#\_________U1I!@```````@```%,#``#\
+M_________SUJ!@```````@```&8#``#\_________YQJ!@```````@````D$
+M``#\_________^EJ!@```````@```$\#``#\_________PUK!@```````@``
+M`-T#``#\_________RUK!@```````@````\$``#\_________]AK!@``````
+M`@```.\#``#\_________V9L!@```````@````D$``#\_________^)L!@``
+M`````@```.\#``#\_________WIM!@```````@```)<$``#\_________Y1M
+M!@```````@```)<$``#\_________\1M!@```````@```.\#``#\________
+M_S9N!@```````@```)<$``#\_________XMN!@```````@```)<$``#\____
+M_____[%O!@```````@```!4$``#\_________[YO!@```````@```,T#``#\
+M_________]!O!@```````@```#<#``#\_________^)O!@```````@```#<#
+M``#\_________^]O!@```````@```-P#``#\__________QO!@```````@``
+M```$``#\_________PEP!@```````@```%L#``#\_________QEP!@``````
+M`@```.`#``#\_________T5P!@```````@````D$``#\_________YMP!@``
+M`````@```$\#``#\_________[UP!@```````@```-T#``#\_________]UP
+M!@```````@````\$``#\_________RQQ!@```````@```($#``#\________
+M_T!Q!@``````"P````8````!`@```````$IQ!@```````@```(P$``#\____
+M_____U=Q!@```````@```($#``#\_________W=Q!@```````@````D$``#\
+M_________[QQ!@```````@```&8#``#\_________Q5S!@```````@````L$
+M``#\_________Q]S!@```````@```(`$``#\_________S=S!@```````@``
+M``L$``#\_________T%S!@```````@```(`$``#\_________^MS!@``````
+M`@```&T$``#\_________P!T!@```````@```&T$``#\_________SAT!@``
+M`````@```(`$``#\_________U5T!@```````@```-T#``#\_________W%T
+M!@```````@```)$#``#\_________X=T!@```````@```)$#``#\________
+M_Y5T!@```````@```(`$``#\_________[UT!@```````@```&T$``#\____
+M_____^YT!@```````@```&T$``#\_________PYU!@```````@```&T$``#\
+M_________RMU!@```````@```(`$``#\_________SMU!@``````"P````4`
+M``!X"````````$5U!@```````@```(P$``#\_________V%U!@``````"P``
+M``8````5`@```````&MU!@```````@```(P$``#\__________9U!@``````
+M`@```-(#``#\_________TIV!@```````@```&X#``#\_________VQV!@``
+M`````@````D$``#\_________[AV!@```````@```$\#``#\_________]UV
+M!@```````@```-T#``#\__________UV!@```````@````\$``#\________
+M_T%W!@```````@```&X#``#\_________W1W!@```````@```&8#``#\____
+M_____X9W!@```````@```($#``#\_________[1W!@```````@````D$``#\
+M_________P9X!@```````@```$\#``#\_________RUX!@```````@```-T#
+M``#\_________TUX!@```````@````\$``#\_________X=X!@```````@``
+M``D$``#\_________\UX!@```````@```&8#``#\_________SYY!@``````
+M"P````,```#X-P```````)=Y!@```````@```&X#``#\_________ZAY!@``
+M`````@```&T$``#\_________\AY!@```````@```$T#``#\_________^1Y
+M!@```````@```$T#``#\_________P!Z!@```````@```$T#``#\________
+M_QQZ!@```````@```$T#``#\_________SUZ!@```````@```&L#``#\____
+M_____U]Z!@```````@```&L#``#\_________X%Z!@```````@```&L#``#\
+M_________Z-Z!@```````@```&L#``#\_________]!Z!@```````@```&L#
+M``#\__________)Z!@```````@```&L#``#\_________PY[!@```````@``
+M`$T#``#\_________RI[!@```````@```$T#``#\_________T9[!@``````
+M`@```$T#``#\_________W-[!@```````@```&L#``#\_________X][!@``
+M`````@```$T#``#\_________^![!@```````@```(`$``#\_________U-\
+M!@```````@```&T$``#\_________VU\!@```````@```&T$``#\________
+M_WY\!@```````@```(`$``#\_________XU\!@```````@```-T#``#\____
+M_____YQ\!@```````@```(`$``#\_________[-\!@```````@```$T#``#\
+M_________[U\!@```````@```(`$``#\_________]E\!@```````@```$T#
+M``#\_________^-\!@```````@```(`$``#\_________Q!]!@```````@``
+M`&L#``#\_________QI]!@```````@```(`$``#\_________S-]!@``````
+M`@```$T#``#\_________SU]!@```````@```(`$``#\_________U9]!@``
+M`````@```$T#``#\_________V!]!@```````@```(`$``#\_________V=]
+M!@```````@```"8#``#\_________W-]!@```````@```(4#``#\________
+M_Y)]!@```````@```&L#``#\_________YM^!@```````@```(,#``#\____
+M_____[=^!@```````@```(,#``#\_________R!_!@```````@```&P#``#\
+M_________T.`!@```````@```(`$``#\__________Z`!@```````@```(`$
+M``#\_________QV!!@```````@```&T$``#\_________SF!!@```````@``
+M`&T$``#\__________R!!@```````@```(`$``#\_________Q*"!@``````
+M`@```&T$``#\_________R*"!@```````@```&T$``#\_________[R"!@``
+M`````@```(`$``#\_________]*"!@```````@```&T$``#\_________^*"
+M!@```````@```&T$``#\_________Y&#!@```````@```,,#``#\________
+M_]6#!@```````@```(T#``#\__________Z#!@```````@```/@#``#\____
+M_____Q*$!@```````@```,,#``#\_________TF$!@```````@```&T$``#\
+M_________V:$!@```````@```&T$``#\_________YN$!@```````@```&T$
+M``#\_________[B$!@```````@```&T$``#\_________P6%!@```````@``
+M`.(#``#\_________R"%!@```````@```"(#``#\_________XR%!@``````
+M`@```(`$``#\_________ZV%!@```````@```&T$``#\_________\R%!@``
+M`````@```&T$``#\_________^:&!@``````"P```"L#`````````````!:'
+M!@```````@```%8#``#\_________SB'!@```````@```,H#``#\________
+M_TF'!@```````@```/L#``#\_________UN'!@```````@```/L#``#\____
+M______6'!@```````@```&T$``#\_________QB(!@```````@```&T$``#\
+M_________TR(!@```````@```(`$``#\_________V:(!@```````@```&T$
+M``#\_________[*(!@```````@```&T$``#\_________QF)!@```````@``
+M`&T$``#\_________XN)!@```````@```&T$``#\__________")!@``````
+M`@```(`$``#\_________Q&*!@```````@```&T$``#\_________RZ*!@``
+M`````@```&T$``#\_________X.*!@```````@```%(#``#\_________XV*
+M!@```````@```*$#``#\_________\^*!@```````@```(`$``#\________
+M_T^+!@```````@```(`$``#\_________\^+!@```````@```(`$``#\____
+M_____RJ,!@```````@```'8#``#\_________S2,!@```````@```(`$``#\
+M_________U&,!@```````@```&T$``#\_________VZ,!@```````@```&T$
+M``#\_________^N,!@```````@```(`$``#\__________>,!@```````@``
+M`/(#``#\_________PN-!@```````@```(<#``#\_________QF-!@``````
+M`@```&T$``#\_________S*-!@```````@```&T$``#\_________TZ-!@``
+M`````@```&T$``#\_________T6.!@```````@```&T$``#\_________T60
+M!@```````@```&(#``#\_________U>0!@```````@```,4#``#\________
+M_["0!@```````@```&(#``#\_________[N0!@```````@```,4#``#\____
+M_____\Z0!@```````@````\$``#\_________[F1!@```````@```&`$``#\
+M_________P.2!@``````"P````8````K`@````````V2!@```````@```(P$
+M``#\_________R"2!@```````@```&(#``#\_________RN2!@```````@``
+M`,4#``#\_________T22!@```````@````D$``#\_________ZF2!@``````
+M`@````D$``#\_________Q:3!@```````@````\$``#\_________\23!@``
+M`````@```(`$``#\_________T.4!@```````@```(`$``#\_________W^4
+M!@```````@```(`$``#\_________Y^4!@```````@```&(#``#\________
+M_ZJ4!@```````@```,4#``#\_________[B4!@```````@```&4#``#\____
+M_____W65!@```````@```(`$``#\_________Z^5!@```````@```(`$``#\
+M_________\^5!@```````@```&(#``#\_________]J5!@```````@```,4#
+M``#\_________^B5!@```````@```&4#``#\_________RJ6!@```````@``
+M`(`$``#\_________W&6!@```````@```(`$``#\_________\"6!@``````
+M`@```(`$``#\__________.6!@```````@```&(#``#\__________Z6!@``
+M`````@```,4#``#\_________PF7!@```````@````\$``#\_________U28
+M!@```````@```&(#``#\_________U^8!@```````@```,4#``#\________
+M__&8!@```````@```-T#``#\_________P"9!@```````@```(`$``#\____
+M_____RV9!@```````@```,D#``#\_________T*9!@```````@```-T#``#\
+M_________YJ9!@``````"P````4```"P"````````*29!@```````@```(P$
+M``#\_________[:9!@```````@```%D#``#\_________Z&:!@```````@``
+M`&(#``#\_________ZR:!@```````@```,4#``#\_________\&:!@``````
+M`@```&(#``#\_________\R:!@```````@```,4#``#\_________]>:!@``
+M`````@```-T#``#\_________P.<!@```````@```&(#``#\_________PZ<
+M!@```````@```,4#``#\_________U*<!@``````"P````4```#0"```````
+M`%R<!@```````@```(P$``#\_________WN<!@```````@```.8#``#\____
+M_____XR<!@```````@```&8#``#\_________YR<!@```````@```(`$``#\
+M_________Z><!@```````@```,4#``#\_________[R<!@```````@````L$
+M``#\_________\B<!@```````@```(`$``#\_________].<!@```````@``
+M`,4#``#\_________]Z<!@```````@```+L#``#\_________RB=!@``````
+M`@````H$``#\_________Y6=!@``````"P````$```!`EP8``````)R=!@``
+M````"P```+0#`````````````+*=!@```````@````$$``#\_________^N=
+M!@```````@````H$``#\_________P>>!@```````@```/0#``#\________
+M_R&>!@```````@```,4#``#\_________W:>!@``````"P````$```!`EP8`
+M`````(.>!@```````@```*P#``#\_________Y.>!@```````@```-L#``#\
+M_________YZ>!@```````@````$$``#\_________W*A!@```````@```+H#
+M``#\_________Z^A!@```````@````H$``#\__________VA!@``````"P``
+M``$```!`EP8```````NB!@```````@````$$``#\_________T^B!@``````
+M`@````H$``#\_________YVB!@``````"P````$```!`EP8``````*NB!@``
+M`````@````$$``#\_________^^B!@```````@````H$``#\_________S6C
+M!@``````"P````$```!`EP8``````$"C!@```````@````$$``#\________
+M_W^C!@```````@````H$``#\_________\6C!@``````"P````$```!`EP8`
+M`````-"C!@```````@````$$``#\_________P^D!@```````@````H$``#\
+M_________V"D!@``````"P````$```!`EP8``````&ND!@```````@````$$
+M``#\_________Z^D!@```````@````H$``#\__________6D!@``````"P``
+M``$```!`EP8```````"E!@```````@````$$``#\_________S^E!@``````
+M`@````H$``#\_________X6E!@``````"P````$```!`EP8``````)"E!@``
+M`````@````$$``#\_________^:E!@```````@````H$``#\_________R^F
+M!@``````"P```*(#`````````````#:F!@``````"P```&H#````````````
+M`$FF!@```````@````$$``#\_________ZZF!@```````@````H$``#\____
+M_____Q2G!@``````"P```*(#`````````````!NG!@``````"P```&H#````
+M`````````"ZG!@```````@````$$``#\_________\^H!@```````@```&L#
+M``#\_________RFI!@```````@```&(#``#\_________S>I!@```````@``
+M`,4#``#\_________TNI!@```````@```&X#``#\_________VBI!@``````
+M"P````,```#(.````````(>I!@```````@```&T$``#\_________]6I!@``
+M`````@```&T$``#\__________VI!@```````@```&T$``#\_________TZJ
+M!@```````@```&T$``#\_________W&J!@```````@```&T$``#\________
+M_\ZJ!@```````@```&T$``#\_________PBK!@```````@```&T$``#\____
+M_____TVK!@```````@```(`$``#\_________WNK!@```````@```*`$``#\
+M_________ZNK!@```````@```&T$``#\_________\ZK!@```````@```&T$
+M``#\_________]RK!@```````@```*`$``#\_________URL!@```````@``
+M``D$``#\_________[BL!@```````@```-0#``#\_________\VL!@``````
+M`@```*`#``#\_________^.L!@```````@```)<$``#\__________FL!@``
+M`````@```)<$``#\_________QJM!@```````@```.8#``#\_________T.M
+M!@```````@```&T$``#\_________V6M!@```````@```&T$``#\________
+M_[BM!@```````@````D$``#\__________&M!@```````@```&$#``#\____
+M_____S"N!@```````@```#8#``#\_________SJN!@```````@```(`$``#\
+M_________W:N!@```````@```&T$``#\_________YFN!@```````@```&T$
+M``#\_________S>O!@```````@```&(#``#\_________T*O!@```````@``
+M`,4#``#\_________U&O!@```````@```&8#``#\_________V^O!@``````
+M`@```&(#``#\_________WJO!@```````@```,4#``#\_________X6O!@``
+M`````@```&X#``#\_________Q:Q!@```````@```&(#``#\_________R>Q
+M!@```````@```,4#``#\_________T&Q!@```````@```(\#``#\________
+M_V:Q!@``````"P````,```"8.0```````(2Q!@```````@```&T$``#\____
+M_____Z:Q!@```````@```&T$``#\_________S^R!@```````@```%$#``#\
+M_________XRR!@```````@```*H#``#\_________Z>R!@```````@````D$
+M``#\_________]BR!@```````@```)<$``#\_________^VR!@```````@``
+M``($``#\__________RR!@```````@```#8#``#\_________P:S!@``````
+M`@```(`$``#\_________S"S!@```````@```&(#``#\_________SNS!@``
+M`````@```,4#``#\_________TRS!@```````@```%,#``#\_________X.S
+M!@```````@```%$#``#\_________\VS!@```````@```*H#``#\________
+M_^BS!@```````@````D$``#\_________QFT!@```````@```)<$``#\____
+M_____RZT!@```````@````($``#\_________SVT!@```````@```#8#``#\
+M_________T>T!@```````@```(`$``#\_________W&T!@```````@```&(#
+M``#\_________WRT!@```````@```,4#``#\_________XVT!@```````@``
+M`%,#``#\_________["T!@```````@```&T$``#\_________]*T!@``````
+M`@```&T$``#\_________RFU!@```````@```#8#``#\_________S.U!@``
+M`````@```(`$``#\_________VZU!@```````@```&T$``#\_________Y.U
+M!@```````@```&T$``#\_________^JU!@```````@````D$``#\________
+M_R.V!@```````@```&$#``#\_________Y*V!@```````@```&T$``#\____
+M_____["V!@```````@```&T$``#\_________^&V!@```````@```&(#``#\
+M_________^RV!@```````@```,4#``#\__________>V!@```````@```&X#
+M``#\_________U^W!@```````@```&T$``#\_________\:X!@```````@``
+M`(`$``#\_________[3`!@```````@````D$``#\_________PG!!@``````
+M`@```,8#``#\_________Q[!!@```````@```&`$``#\_________S7!!@``
+M`````@```$4#``#\_________ZC"!@```````@```$L#``#\_________[?"
+M!@```````@```,@#``#\_________Z3#!@```````@```(`$``#\________
+M_Y#$!@```````@````L```#>!````````)W$!@``````"P````L```#@!```
+M`````*?$!@```````@```%<#``#\_________]?$!@```````@````L```#>
+M!````````.3$!@``````"P````L```#@!````````.[$!@```````@```%<#
+M``#\_________RG%!@```````@```$L#``#\_________S;%!@```````@``
+M`,@#``#\_________TW&!@```````@```&`#``#\_________R''!@``````
+M`@```&T$``#\_________UK'!@```````@```&T$``#\_________W+'!@``
+M`````@```!D$``#\_________X3'!@```````@```!D$``#\_________Y;'
+M!@```````@```!D$``#\_________ZC'!@```````@```!D$``#\________
+M_[K'!@```````@```!D$``#\_________\S'!@```````@```!D$``#\____
+M_____]['!@```````@```!D$``#\__________#'!@```````@```!D$``#\
+M_________X#(!@```````@```!D$``#\_________P;)!@```````@```'T#
+M``#\_________Q?)!@```````@```,4#``#\_________WG)!@```````@``
+M``H$``#\_________XG)!@```````@```'P#``#\_________^C)!@``````
+M"P```"0#`````````````/+)!@```````@```*P#``#\__________W)!@``
+M`````@````$$``#\_________U7*!@```````@````H$``#\_________VG*
+M!@```````@```'P#``#\_________P#+!@```````@```&`$``#\________
+M_RW+!@```````@```&`$``#\_________SC+!@``````"P```"0#````````
+M`````$;+!@```````@```*P#``#\_________U'+!@```````@````$$``#\
+M_________Z;+!@```````@```.T#``#\_________[3+!@```````@```#8#
+M``#\_________[[+!@```````@```(`$``#\__________?+!@```````@``
+M`-$#``#\_________P7,!@```````@```#8#``#\_________P_,!@``````
+M`@```(`$``#\_________S+,!@```````@```.T#``#\_________T3,!@``
+M`````@```#8#``#\_________T[,!@```````@```(`$``#\_________YW,
+M!@```````@```-$#``#\_________\[.!@```````@```#,#``#\________
+M_[C0!@```````@```!$$``#\_________]'0!@```````@```'L#``#\____
+M_____S'2!@```````@```!\$``#\_________\+2!@```````@```!\$``#\
+M_________]'2!@```````@```&`$``#\_________P;3!@```````@```!X$
+M``#\_________QO3!@``````"P```*X#`````````````%O3!@```````@``
+M`!$$``#\_________VW3!@```````@```'L#``#\_________P[4!@``````
+M`@```!X$``#\_________S'4!@```````@```!X$``#\_________^_4!@``
+M`````@```"T#``#\___________4!@```````@```)8#``#\_________P_5
+M!@```````@```.$#``#\_________V35!@``````"P````,```#`.0``````
+M`'K7!@```````@```&T$``#\_________Y;7!@```````@```(`$``#\____
+M_____VW8!@```````@```&T$``#\_________^K8!@```````@```(`$``#\
+M_________^W9!@```````@```&T$``#\_________R;:!@```````@```#4#
+M``#\_________PK=!@```````@```&T$``#\_________W_>!@```````@``
+M`)L#```$`````````,/>!@```````@```&T$``#\_________R_?!@``````
+M`@```#0#```$`````````'/?!@```````@```&T$``#\_________]_?!@``
+M`````@```"L#```$`````````"/@!@```````@```&T$``#\_________[_@
+M!@```````@```&@#```$``````````/A!@```````@```&T$``#\________
+M_Y3A!@``````"P```#0#`````````````+/A!@``````"P```"L#````````
+M`````-'A!@``````"P```)L#`````````````/3A!@``````"P```&@#````
+M`````````+[B!@```````@```-H#``#\_________S7C!@```````@```&T$
+M``#\_________U3C!@```````@````L```"`!@```````%_C!@``````"P``
+M``L```!`!@```````&?C!@```````@````L```"`!@```````&WC!@``````
+M`@````L```"$!@```````'CC!@``````"P````L```!@!@```````(#C!@``
+M`````@````L```"$!@```````)#C!@```````@````L```!\!@```````)OC
+M!@``````"P````L```#`!0```````*/C!@```````@````L```!\!@``````
+M`*GC!@```````@```&0#```(`````````,7C!@```````@````L````[!@``
+M`````-7C!@``````"P````L```#`!0```````-SC!@```````@````L````\
+M!@```````/CC!@```````@````L````\!@````````;D!@```````@````L`
+M``!;!@```````!;D!@``````"P````L```#`!0```````!WD!@```````@``
+M``L```!<!@```````#GD!@```````@````L```!<!@```````$WD!@``````
+M`@````L```!\!@```````&7D!@```````@````L````\!@```````'OD!@``
+M````"P````L```!`!@```````(CD!@```````@````L```!\!@```````)7D
+M!@``````"P````L```#`!0```````,7D!@```````@```&0#```)````````
+M`-?D!@``````"P````L```#`!0```````-[D!@``````"P```&0#````````
+M`````/?D!@```````@````<```#0&````````#_E!@```````@````L```!\
+M!@```````&CE!@```````@````L```!<!@```````'[E!@``````"P````L`
+M``!@!@```````(OE!@```````@````L```!\!@```````)CE!@``````"P``
+M``L```#`!0```````,7E!@```````@```&0#```)`````````-?E!@``````
+M"P````L```#`!0```````-[E!@``````"P```&0#`````````````/?E!@``
+M`````@````<```#0&````````#_F!@```````@````L```!\!@```````'WF
+M!@```````@```&0#```(`````````)SF!@``````"P```&0#```-````````
+M`*?F!@```````@````<```#0&````````*[F!@``````"P```&0#````````
+M`````"?G!@```````@````<```!,&0```````#/G!@``````"P````<```#`
+M&````````(CG!@``````"P```&0#`````````````(_G!@``````"P```&0#
+M```0`````````,'G!@``````"P```&0#```,`````````#GH!@``````"P``
+M`&0#```0`````````++H!@```````@```%H$``#\_________\+H!@``````
+M`@````<```!,&0```````,_H!@``````"P````<```#`&````````/WH!@``
+M````"P```&0#`````````````!/I!@``````"P```&0#```0`````````!KI
+M!@``````"P````<```#0&````````#7I!@``````"P````<```#`&```````
+M`#_I!@``````"P````<```#(&````````(KI!@``````"P```&0#```0````
+M``````SJ!@```````@````<```!,&0```````&SJ!@```````@````L```"'
+M!@```````'7J!@```````@````L```"$!@```````)/J!@```````@````<`
+M``!,&0```````)SJ!@``````"P````<```#`&````````*/J!@``````"P``
+M``<```#0&````````,[J!@```````@````<```!,&0```````/#J!@``````
+M"P```&0#``````````````/K!@``````"P```&0#```<``````````WK!@``
+M````"P```&0#```,`````````!7K!@``````"P```&0#```0`````````'+K
+M!@``````"P```&0#```<``````````CL!@```````@````L```"<!0``````
+M`!'L!@```````@````L```"<!0```````*GM!@```````@```&@$``#\____
+M_____\/M!@```````@```&@$``#\_________Q?N!@```````@````<```!,
+M&0```````"#N!@``````"P````<```#`&````````"?N!@```````@````<`
+M``!,&0```````$;N!@``````"P````<```#0&````````)GN!@```````@``
+M`*0$``#\_________[CN!@```````@```)P$``#\_________^7N!@``````
+M`@```%X#``#\__________3N!@```````@```%X#``#\_________R#O!@``
+M`````@```#8#``#\_________S_O!@```````@```%D$``#\_________U3O
+M!@``````"P```&<#`````````````&?O!@```````@```'@$``#\________
+M_Y'O!@```````@```)D$``#\_________[OO!@```````@```/P#``#\____
+M_____\/O!@```````@```/P#``#\_________\OO!@```````@```+4#``#\
+M_________]SO!@```````@```+4#``#\_________^WO!@```````@```%\#
+M``#\__________?O!@```````@```(`$``#\___________O!@```````@``
+M`*<#``#\_________P?P!@```````@```-<#``#\_________QSP!@``````
+M"P```&<#`````````````#/P!@```````@```'@$``#\_________T#P!@``
+M`````@```&8#``#\_________TWP!@```````@```&8#``#\_________TOQ
+M!@```````@```%<#``#\_________UGQ!@```````@```(`$``#\________
+M_V[Q!@```````@```/H#``#\_________Z+Q!@``````"P````8````_`@``
+M`````*SQ!@```````@```(P$``#\_________V#S!@``````"P```%0#````
+M`````````&7S!@```````@```%($``#\_________ZWT!@``````"P````4`
+M```("0```````+?T!@```````@```(P$``#\_________^?T!@```````@``
+M`%D$``#\__________ST!@``````"P````$`````]`8``````!#U!@``````
+M`@```'@$``#\_________^;V!@```````@```*8#``#\_________PSW!@``
+M`````@```)H#``#\_________S?W!@```````@````D$``#\_________ZCW
+M!@```````@````D$``#\_________PGX!@```````@```)<$``#\________
+M_X?X!@```````@````D$``#\__________+X!@```````@```)<$``#\____
+M_____Q/Z!@```````@```/D#``#\_________RCZ!@```````@```*`#``#\
+M_________Z7[!@```````@```$\#``#\__________'[!@```````@````D$
+M``#\_________SW\!@```````@```-T#``#\_________Y?\!@```````@``
+M`'8#``#\_________[O\!@```````@````\$``#\_________]G\!@``````
+M`@````D$``#\_________R?]!@```````@```.\#``#\_________P'^!@``
+M`````@````($``#\_________SS^!@```````@```$\#``#\_________V7^
+M!@```````@```-T#``#\_________Y[^!@```````@````\$``#\________
+M_U?_!@```````@```&(#``#\_________V?_!@```````@```,4#``#\____
+M_____P,`!P```````@````H$``#\_________S("!P```````@```&`$``#\
+M_________PD$!P``````"P````$```#0_@8``````(@$!P```````@```#T#
+M``#\_________Y4$!P```````@```*P#``#\_________Z,$!P```````@``
+M`-L#``#\_________[T$!P```````@```/0#``#\_________R8%!P``````
+M`@```&`$``#\_________X(%!P```````@```&`$``#\_________Z$%!P``
+M`````@```*P#``#\_________[8%!P```````@```-L#``#\_________\P%
+M!P```````@````$$``#\_________]D%!P```````@```,4#``#\________
+M_XP&!P```````@````H$``#\_________Z0&!P```````@```/0#``#\____
+M_____[D&!P```````@```,4#``#\_________]H&!P```````@```)<$``#\
+M__________(&!P```````@````($``#\_________SD'!P```````@```&`$
+M``#\_________Q4(!P```````@```#T#``#\_________U\(!P``````"P``
+M``$```#P\P8``````&X(!P```````@```*P#``#\_________X0(!P``````
+M`@```-L#``#\_________Y8(!P```````@````$$``#\_________\P(!P``
+M`````@````($``#\_________]T(!P```````@```(`$``#\_________^4(
+M!P```````@```#8#``#\_________SX)!P```````@```&`$``#\________
+M_U$)!P```````@```&(#``#\_________UP)!P```````@```,4#``#\____
+M_____W0)!P```````@```)<$``#\_________\T)!P```````@````,$``#\
+M_________]X)!P```````@````,$``#\_________P4*!P```````@```#8#
+M``#\_________Z$>!P```````@````H$``#\__________X>!P``````"P``
+M``$```#P\P8```````D?!P```````@````$$``#\_________TD?!P``````
+M`@````($``#\_________UT?!P```````@```(`$``#\_________V4?!P``
+M`````@```#8#``#\_________YX?!P```````@```,4#``#\_________R0@
+M!P```````@````H$``#\_________Z0@!P``````"P````$```#P\P8`````
+M`*\@!P```````@````$$``#\_________^D@!P```````@````($``#\____
+M______T@!P```````@```(`$``#\_________P4A!P```````@```#8#``#\
+M_________T4A!P```````@```/0#``#\_________\TA!P``````"P````$`
+M``#P\P8``````-PA!P```````@```*P#``#\__________(A!P```````@``
+M`-L#``#\__________TA!P```````@````$$``#\_________S8B!P``````
+M`@````($``#\_________T<B!P```````@```(`$``#\_________T\B!P``
+M`````@```#8#``#\_________X$B!P```````@```&(#``#\_________Y$B
+M!P```````@```,4#``#\_________YDB!P```````@````H$``#\________
+M_ZXB!P```````@```&(#``#\_________ZLC!P``````"P````$```#P\P8`
+M`````+HC!P```````@```*P#``#\_________]`C!P```````@```-L#``#\
+M_________]LC!P```````@````$$``#\_________Q0D!P```````@````($
+M``#\_________R4D!P```````@```(`$``#\_________RTD!P```````@``
+M`#8#``#\_________V8D!P```````@```&(#``#\_________W<D!P``````
+M`@```,4#``#\__________8D!P```````@```)<$``#\_________PLE!P``
+M`````@````($``#\_________QLE!P```````@```(`$``#\_________R,E
+M!P```````@```#8#``#\_________ULE!P```````@```)<$``#\________
+M_\$E!P```````@```*8#``#\_________^(E!P```````@```)H#``#\____
+M______@E!P```````@```*`#``#\_________V8F!P```````@````H$``#\
+M_________\HF!P``````"P````$```#P\P8``````-4F!P```````@````$$
+M``#\_________PXG!P```````@````($``#\_________Q\G!P```````@``
+M`(`$``#\_________R<G!P```````@```#8#``#\_________VTG!P``````
+M`@```,4#``#\_________[4G!P``````"P````,```#H.@```````,PG!P``
+M`````@```/D#``#\__________PG!P```````@```(D#``#\_________Q<H
+M!P```````@```+\#``#\_________R<H!P```````@```/$#``#\________
+M_P4I!P```````@```),#``#\_________Q@I!P```````@```),#``#\____
+M_____R4I!P```````@```),#``#\_________S@I!P```````@```),#``#\
+M_________W,I!P```````@```'4$``#\_________XHI!P```````@```'4$
+M``#\_________Z,I!P```````@```'4$``#\_________Q8J!P```````@``
+M`+X#``#\_________S8J!P```````@```'\$``#\_________TDJ!P``````
+M`@```'\$``#\_________VPJ!P```````@```'\$``#\_________W\J!P``
+M`````@```'\$``#\_________Y\J!P```````@```'\$``#\_________[(J
+M!P```````@```'\$``#\_________](J!P```````@```'\$``#\________
+M_^4J!P```````@```'\$``#\_________Q8K!P```````@```'\$``#\____
+M_____RHK!P```````@```'\$``#\_________U,K!P```````@```'\$``#\
+M_________V8K!P```````@```'\$``#\_________XPK!P```````@```'\$
+M``#\_________Y\K!P```````@```'\$``#\_________[\K!P```````@``
+M`'\$``#\_________](K!P```````@```'\$``#\__________(K!P``````
+M`@```'\$``#\_________P4L!P```````@```'\$``#\_________RPL!P``
+M`````@```'\$``#\_________S\L!P```````@```'\$``#\_________U\L
+M!P```````@```'\$``#\_________W(L!P```````@```'\$``#\________
+M_Y(L!P```````@```'\$``#\_________Z4L!P```````@```'\$``#\____
+M_____\PL!P```````@```'\$``#\_________]\L!P```````@```'\$``#\
+M__________\L!P```````@```'\$``#\_________Q(M!P```````@```'\$
+M``#\_________S(M!P```````@```'\$``#\_________T4M!P```````@``
+M`'\$``#\_________VPM!P```````@```'\$``#\_________W\M!P``````
+M`@```'\$``#\_________Y\M!P```````@```'\$``#\_________[(M!P``
+M`````@```'\$``#\_________](M!P```````@```'\$``#\_________^4M
+M!P```````@```'\$``#\_________Q0N!P```````@```+$$``#\________
+M_RXN!P```````@```+$$``#\_________U8N!P```````@```+$$``#\____
+M_____W`N!P```````@```+$$``#\_________Y@N!P```````@```+$$``#\
+M_________[(N!P```````@```+$$``#\_________]HN!P```````@```+$$
+M``#\__________0N!P```````@```+$$``#\_________QPO!P```````@``
+M`+$$``#\_________S8O!P```````@```+$$``#\_________V0O!P``````
+M`@```+$$``#\_________WXO!P```````@```+$$``#\_________Z8O!P``
+M`````@```+$$``#\_________\`O!P```````@```+$$``#\_________^(O
+M!P```````@```+4#``#\__________$O!P```````@```+4#``#\________
+M__DO!P```````@```%\#``#\_________P,P!P```````@```(`$``#\____
+M_____PLP!P```````@```*<#``#\_________Q,P!P```````@```-<#``#\
+M_________R`P!P```````@````,$``#\_________RTP!P```````@````,$
+M``#\_________T<P!P``````"P````<```!@&0```````$PP!P```````@``
+M`$\$``#\_________V,P!P```````@```'<$``#\_________VXP!P``````
+M`@```'<$``#\_________X(P!P```````@```#`$``#\_________Y\P!P``
+M`````@```&\$``#\_________ZHP!P```````@```),$``#\_________\8P
+M!P```````@```&\$``#[_________]`P!P```````@```&\$``#\________
+M_V,Q!P```````@```&\$``#\_________UHR!P```````@```&\$``#\____
+M_____^`R!P```````@```$`$``#\_________S,S!P```````@```"8$``#\
+M_________STS!P```````@```"8$``#\_________TDS!P```````@```#`$
+M``#\_________U4S!P```````@```#`$``#\_________VDS!P```````@``
+M`"8$``#\_________[\S!P```````@```($$``#[_________T@T!P``````
+M`@```"8$``#\_________\PT!P```````@```(T$``#\_________^(T!P``
+M`````@```(T$``#\__________8T!P```````@```"8$``#\_________R<U
+M!P```````@```(T$``#\_________T$U!P```````@```(T$``#\________
+M_UHU!P```````@```(T$``#\_________W0U!P```````@```(T$``#\____
+M_____Y$U!P```````@```(T$``#\_________[0U!P```````@```&($``#\
+M_________\HU!P```````@```(T$``#\_________]$U!P```````@```"8$
+M``#\_________R$V!P```````@```($$``#[_________T4V!P```````@``
+M`#4$``#\_________U\V!P```````@```(\$``#\_________WPV!P``````
+M`@````L```#$!@```````(0V!P```````@````L```#$!@```````#4W!P``
+M`````@```'\$``#\_________]`W!P```````@```$H$``#\_________PTX
+M!P```````@```'\$``#\_________Z8X!P```````@```)T$``#\________
+M_R<Y!P```````@```#T$``#\_________T4Y!P```````@```'\$``#\____
+M_____U4Y!P```````@```'\$``#\_________\XY!P```````@```#P$``#\
+M_________]8Y!P```````@```)($``#[__________$Y!P```````@```#<$
+M``#\_________R4Z!P```````@```"T$``#\_________U\Z!P```````@``
+M`"X$``#\_________\\Z!P```````@```($$``#[_________]HZ!P``````
+M`@```$4$``#\_________^(Z!P```````@```*($``#\_________UX[!P``
+M`````@````L```#(!@```````'L[!P```````@```*T$``#\_________X<[
+M!P```````@```)0$``#\_________Y,[!P```````@````L```#<!@``````
+M`)H[!P```````@````L```#H!@```````)X[!P``````"P```+($````````
+M`````*4[!P```````@````L```#T!@```````*P[!P``````"P````L```#@
+M!@```````+0[!P```````@```'@$``#\_________]4[!P```````@```(\$
+M``#\_________^([!P```````@````L```#(!@```````/`[!P``````"P``
+M``$`````.0<```````4\!P```````@```'\$``#\_________QT\!P``````
+M`@````L```#(!@```````"@\!P```````@````L```#(!@```````#0\!P``
+M`````@````L```#$!@```````,`\!P```````@```"8$``#\_________Q0]
+M!P```````@```+($``#\_________RH]!P```````@```(,$``#\________
+M_TH]!P```````@```(`$``#\_________U(]!P```````@```&$$``#\____
+M_____WP]!P```````@```&\$``#\_________X@]!P```````@```&\$``#\
+M_________Y,]!P```````@```&\$``#\_________],]!P```````@```%T$
+M``#\_________PX^!P```````@```'\$``#\_________R0^!P```````@``
+M`"8$``#\_________Z4^!P```````@```(\$``#\_________R@_!P``````
+M`@```&D$``#\_________W`_!P```````@```'\$``#\_________Y`_!P``
+M`````@```+`$``#\_________[4_!P```````@```(0$``#\_________P1`
+M!P```````@```(,$``#\_________QM"!P```````@```"@$``#\________
+M_S%"!P```````@```%T$``#\_________SI"!P```````@```(\$``#\____
+M_____VY"!P```````@```'\$``#\_________ZA"!P```````@```(,$``#\
+M__________%"!P```````@```(,$``#\_________Y-#!P```````@```&\$
+M``#\_________SQ$!P```````@```*`$``#\_________TE$!P```````@``
+M`%$$``#\_________VU$!P```````@```*`$``#\__________]$!P``````
+M`@```%$$``#\_________QY%!P```````@```*`$``#\_________X]%!P``
+M`````@```(,$``#\_________ZU%!P```````@```%$$``#\_________V)&
+M!P``````"P````$`````3`<``````(U&!P``````"P````<```#`&@``````
+M`))&!P```````@```%P$``#\_________Z]&!P```````@```'\$``#\____
+M_____]Q&!P```````@```'\$``#\_________P1'!P```````@```)`$``#\
+M_________V9'!P```````@```'\$``#\_________W%'!P``````"P````$`
+M``#P1@<``````)9'!P```````@```*\$``#\_________]I'!P```````@``
+M`$8$``#\__________9'!P```````@```(\$``#\_________PQ(!P``````
+M"P````$```!01P<``````$](!P```````@```"($``#\_________Z%(!P``
+M`````@```#T$``#\_________\5(!P```````@```*($``#\_________])(
+M!P```````@```)($``#[_________^9(!P```````@```#<$``#\________
+M_RQ)!P``````"P```"4$`````````````$Y)!P```````@```*\$``#\____
+M_____UM)!P```````@```$8$``#\_________WA)!P```````@```'\$``#\
+M_________\%)!P```````@```'\$``#\_________\M)!P``````"P````$`
+M``"`2`<``````-9)!P```````@```#,$``#\__________))!P```````@``
+M``<```#8&@```````"M+!P```````@```$8$``#\_________T)+!P``````
+M`@```*@$``#\_________V5+!P```````@```*\$``#\_________^%,!P``
+M`````@```*@$``#\_________WE-!P```````@```*@$``#\_________Z1-
+M!P``````"P````$`````2@<``````-]-!P```````@```*\$``#\________
+M_S).!P```````@```*\$``#\_________VE.!P``````"P````$`````3@<`
+M`````,M.!P```````@```"@$``#\_________^%.!P```````@```)`$``#\
+M__________I.!P```````@```%T$``#\_________X-0!P``````"P````<`
+M``#`&@```````(Q0!P```````@```%P$``#\_________Y=0!P```````@``
+M`'\$``#\__________90!P``````"P````<```#`&@```````/]0!P``````
+M`@```%P$``#\_________P=1!P```````@```(\$``#\_________V%1!P``
+M````"P````<```#`&@```````&I1!P```````@```%P$``#\_________W)1
+M!P```````@```(\$``#\_________\A1!P``````"P````<```#`&@``````
+M`-%1!P```````@```%P$``#\_________]E1!P```````@```(\$``#\____
+M_____Y52!P``````"P````<```#`&@```````)Y2!P```````@```%P$``#\
+M_________Z92!P```````@```(\$``#\_________RQ3!P``````"P````<`
+M``#`&@```````#53!P```````@```%P$``#\_________SU3!P```````@``
+M`(\$``#\_________]]3!P``````"P````<```#`&@```````.=3!P``````
+M`@```%P$``#\_________Q-4!P```````@```'\$``#\_________XM4!P``
+M`````@```#D$``#\_________^54!P```````@```#D$``#\_________WE5
+M!P```````@```#D$``#\_________Y95!P```````@```#D$``#\________
+M_X56!P```````@```&0$``#\_________\A6!P```````@```%T$``#\____
+M_____^-6!P```````@```#@$``#\_________R57!P```````@```%T$``#\
+M_________RU7!P```````@```#@$``#\_________T=7!P``````"P````<`
+M``#`&@```````$]7!P```````@```%P$``#\_________U=7!P```````@``
+M`(\$``#\_________V=7!P```````@```%T$``#\_________Q59!P``````
+M`@```#\$``#\_________T59!P```````@```#H$``#\_________VQ9!P``
+M`````@```($$``#[_________ZA9!P```````@```$($``#\_________\]9
+M!P```````@```($$``#[_________]A9!P```````@```)($``#[________
+M_S%:!P```````@```#H$``#\_________UA:!P```````@```#H$``#\____
+M_____]):!P```````@```"0$``#\__________I:!P```````@```"@$``#\
+M_________Q!;!P```````@```#@$``#\_________VA;!P```````@```($$
+M``#[_________Y1;!P```````@```#H$``#\_________ZQ;!P```````@``
+M`$8$``#\_________]=;!P```````@```#\$``#\_________^Q<!P``````
+M`@```&0$``#\_________V==!P```````@```#@$``#\_________W5=!P``
+M`````@```%T$``#\_________[Q=!P```````@```#H$``#\_________^%=
+M!P```````@```#\$``#\_________[)>!P``````"P````<```#`&@``````
+M`+M>!P```````@```%P$``#\_________\9>!P```````@```'\$``#\____
+M_____QM@!P```````@```($$``#[_________T9@!P```````@```#H$``#\
+M_________VA@!P```````@```#\$``#\_________T)A!P``````"P````<`
+M``#`&@```````$IA!P```````@```%P$``#\_________U9A!P```````@``
+M`'\$``#\_________WQA!P```````@```$8$``#\__________%B!P``````
+M`@```&0$``#\_________WAC!P```````@```$`$``#\_________TED!P``
+M`````@```*H$``#\_________Y=D!P```````@```",$``#\_________\9D
+M!P``````"P````<```#`&@```````,MD!P```````@```%P$``#\________
+M_]YD!P```````@```(T$``#\_________RYE!P``````"P````,````X.P``
+M`````#9E!P```````@```)D$``#\_________XME!P``````"P````,```!X
+M.P```````.-E!P```````@```*\$``#\_________R)F!P```````@```*\$
+M``#\_________U1F!P```````@```)D$``#\_________W=F!P```````@``
+M`(\$``#\_________XMF!P``````"P````$```"@20<``````*1F!P``````
+M`@```*\$``#\_________\)F!P```````@```$8$``#\__________-F!P``
+M`````@````<```#4&@```````/YF!P```````@```'<$``#\_________P]G
+M!P```````@````<```#8&@```````!UG!P```````@````<```#8&@``````
+M`"QG!P```````@````<```#7&@```````#1G!P``````"P````<```#`&@``
+M`````#EG!P```````@```*P$``#\_________U5G!P```````@```&,$``#\
+M_________X%G!P```````@```(($``#\_________[UG!P``````"P````$`
+M``!09P<``````,5G!P```````@```(<$``#\_________P9H!P```````@``
+M`&,$``#\_________QEH!P```````@```'`$``#\_________T9H!P``````
+M`@```(($``#\_________VQH!P``````"P````,```"X.P```````!EI!P``
+M````"P````$```#P9P<``````"-I!P```````@```(<$``#\_________VII
+M!P```````@```"($``#\_________^1I!P```````@```&,$``#\________
+M_P)J!P```````@```*\$``#\_________TYJ!P``````"P````$```"P:0<`
+M`````(-J!P```````@```&\$``#\_________Y9K!P```````@```%0$``#\
+M_________[9K!P```````@```'<$``#\_________R)L!P```````@```(X$
+M``#\_________SYL!P```````@```&X$``#\_________VML!P```````@``
+M`&\$``#\_________SMM!P```````@```&\$``#\_________RQN!P``````
+M`@```&\$``#\_________P!O!P```````@```&\$``#\_________TQS!P``
+M`````@```&\$``#\_________QAT!P```````@```&\$``#\_________X)T
+M!P``````"P````,```#`.P```````&=U!P```````@```$,$``#\________
+M_U5Z!P```````@```"\$``#\_________U9[!P```````@```"\$``#\____
+M_____[A\!P```````@```"\$``#\_________])]!P```````@```#0$``#\
+M_________W)^!P```````@```"\$``#\_________X]_!P```````@```#0$
+M``#\_________TR!!P```````@```&`$``#\_________UV!!P```````@``
+M`*H$``#\_________QR#!P```````@```&`$``#\_________RV#!P``````
+M`@```*H$``#\_________[R#!P```````@```$L$``#\_________UR$!P``
+M`````@```$L$``#\__________N$!P```````@```$L$``#\_________W"%
+M!P```````@```(D$``#\_________]N%!P```````@```$L$``#\________
+M_U:&!P```````@```(D$``#\_________S.(!P```````@```#H$``#\____
+M_____VR(!P```````@```#H$``#\_________]>(!P```````@```#H$``#\
+M_________Y6+!P```````@```$L$``#\_________P",!P```````@```$L$
+M``#\_________VZ,!P```````@```$L$``#\_________\V,!P```````@``
+M`$L$``#\_________R>-!P```````@```$L$``#\_________XN-!P``````
+M"P````,`````/````````&J/!P```````@```"@$``#\_________WZ/!P``
+M`````@```#X$``#\_________\R/!P```````@```#H$``#\_________S>0
+M!P```````@```#H$``#\_________T20!P```````@```"@$``#\________
+M_UV0!P```````@```$($``#\_________W*0!P```````@```%T$``#\____
+M_____ZZ0!P```````@```&,$``#\_________P21!P```````@```*8$``#\
+M_________PR1!P```````@```&<$``#\_________R&1!P``````"P````$`
+M``"@(`@``````#J1!P```````@```'`$``#\_________\>1!P```````@``
+M`(<$``#\_________]^1!P```````@```'\$``#\_________^>1!P``````
+M"P````$```"0D`<```````.2!P```````@```*\$``#\_________QF2!P``
+M`````@```(H$``#\_________RB2!P``````"P````$```"@(`@``````$&2
+M!P```````@```'`$``#\__________Z2!P```````@```(<$``#\________
+M_Q.3!P```````@```'\$``#\_________QN3!P```````@```&,$``#\____
+M_____XB3!P``````"P````$````0D@<``````*&3!P```````@```*\$``#\
+M_________PF4!P```````@```$L$``#\_________Z*4!P```````@```#@$
+M``#\_________].4!P```````@```$L$``#\_________W.5!P```````@``
+M`#D$``#\_________X25!P```````@```#@$``#\_________\*5!P``````
+M`@```$L$``#\_________^25!P```````@```#8$``#\_________P26!P``
+M`````@```"@$``#\_________QR6!P```````@```#8$``#\_________SB6
+M!P```````@```"@$``#\_________\B6!P```````@```&<$``#\________
+M_]F6!P```````@```*8$``#\_________V.7!P``````"P````$`````EP<`
+M`````/67!P``````"P````$```!PG`<``````!"8!P```````@```'P$``#\
+M_________QV8!P```````@```$8$``#\_________UF8!P``````"P````$`
+M``!PG`<``````'.8!P```````@```'P$``#\_________X"8!P```````@``
+M`$8$``#\_________Z^8!P``````"P````$```!PG`<``````,F8!P``````
+M`@```'P$``#\_________U&9!P``````"P````$```"@F`<``````%V9!P``
+M`````@```'T$``#\_________ZB9!P```````@```"H$``#[_________[^9
+M!P```````@```$8$``#\__________29!P```````@```$8$``#\________
+M_Q6:!P```````@```"H$``#[_________RR:!P```````@```$8$``#\____
+M_____U>:!P```````@```$8$``#\__________Z:!P```````@```$8$``#\
+M_________W6;!P```````@```$8$``#\_________Y2;!P```````@```$8$
+M``#\_________QR<!P``````"P````$```#@F`<``````$&<!P```````@``
+M`'P$``#\_________TZ<!P``````"P````$```!PG`<``````&B<!P``````
+M`@```'P$``#\_________[J<!P``````"P````$```!PF0<```````2>!P``
+M`````@```'T$``#\_________QN>!P```````@```$L$``#\_________R.>
+M!P```````@```(H$``#\_________RN>!P``````"P````$```"@(`@`````
+M`$2>!P```````@```'`$``#\_________X&>!P```````@```$L$``#\____
+M______Z>!P```````@```(<$``#\_________Q2?!P```````@```'\$``#\
+M_________QR?!P```````@```&,$``#\_________V.?!P``````"P````$`
+M```0G@<``````(F?!P```````@```*\$``#\_________YN?!P``````"P``
+M``$```"@(`@``````+2?!P```````@```'`$``#\_________P^@!P``````
+M`@```(($``#\_________QZ@!P```````@```(\$``#\_________XJ@!P``
+M`````@```(<$``#\_________\R@!P```````@```%4$``#\_________TZA
+M!P```````@```$L$``#\_________XRA!P``````"P````,```!`/```````
+M``FB!P```````@```#4$``#\_________U"B!P```````@```#4$``#\____
+M_____Y*B!P```````@```$L$``#\_________^FB!P```````@```$L$``#\
+M_________]*D!P``````"P````$```!0G@<``````#"E!P```````@```&0$
+M``#\_________X>E!P```````@```$L$``#\_________ZFE!P```````@``
+M`#8$``#\_________]2E!P```````@```"@$``#\_________^6E!P``````
+M`@```%T$``#\_________U"F!P```````@```$L$``#\_________X6F!P``
+M`````@```#8$``#\_________^FF!P```````@```&0$``#\_________U6G
+M!P```````@```"@$``#\_________VZG!P```````@```%T$``#\________
+M_]*H!P```````@```"P$``#\_________X2I!P``````"P````$```!0D0<`
+M``````JJ!P```````@```*8$``#\_________R"J!P```````@```(\$``#\
+M_________SRJ!P```````@```%4$``#\_________UBJ!P```````@```#$$
+M``#\__________VJ!P``````"P````$```!0D@<``````&FK!P```````@``
+M`(H$``#\_________W.K!P```````@```&<$``#\_________XRK!P``````
+M`@```*($``#\_________]ZK!P``````"P````$```!PG`<``````/BK!P``
+M`````@```'P$``#\_________P6L!P```````@```$8$``#\_________SZL
+M!P``````"P````$```!PG`<``````%NL!P```````@```'P$``#\________
+M_VBL!P```````@```$8$``#\_________\*L!P``````"P````$```!PG`<`
+M`````-RL!P```````@```'P$``#\_________^FL!P```````@```$8$``#\
+M_________QJM!P``````"P````$```!PG`<``````#>M!P```````@```'P$
+M``#\_________T2M!P```````@```$8$``#\_________W*M!P```````@``
+M``L````<!P```````'VM!P```````@````L````@!P```````(BM!P``````
+M"P````L```!`!P```````,2M!P```````@````L````<!P```````->M!P``
+M`````@````L````<!P```````/*M!P```````@````L````@!P````````RN
+M!P```````@````L````<!P```````!6N!P```````@````L````@!P``````
+M`!RN!P``````"P````L```!`!P```````%BN!P```````@````L````@!P``
+M`````,FN!P```````@```"L$``#\_________PFO!P```````@```$L$``#\
+M_________R2O!P``````"P````,```"(/````````*BO!P``````"P````$`
+M``!PG`<``````,.O!P```````@```'P$``#\_________]"O!P```````@``
+M`$8$``#\_________RZP!P```````@```$8$``#\_________Z6P!P``````
+M`@```$,$``#\_________]6P!P``````"P````$```!PG`<``````/"P!P``
+M`````@```'P$``#\__________VP!P```````@```$8$``#\_________Q:Q
+M!P```````@```$,$``#\_________SBQ!P``````"P````$```!PG`<`````
+M`%.Q!P```````@```'P$``#\_________V"Q!P```````@```$8$``#\____
+M_____W.Q!P```````@```%4$``#\_________\.Q!P```````@```$8$``#\
+M_________^.Q!P```````@```$8$``#\_________S.R!P```````@```$8$
+M``#\_________QVS!P```````@```$,$``#\_________TNS!P``````"P``
+M``$```!PG`<``````&6S!P```````@```'P$``#\_________W*S!P``````
+M`@```$8$``#\_________Y*S!P```````@```$,$``#\_________[^S!P``
+M````"P````$```!PG`<``````-JS!P```````@```'P$``#\_________^>S
+M!P```````@```$8$``#\_________P"T!P```````@```$8$``#\________
+M_QFT!P```````@```$8$``#\_________[JT!P``````"P````$```!PG`<`
+M`````-2T!P```````@```'P$``#\_________^&T!P```````@```$8$``#\
+M_________PJU!P``````"P````$```!PG`<``````"6U!P```````@```'P$
+M``#\_________S*U!P```````@```$8$``#\_________YVU!P```````@``
+M`$8$``#\_________[VU!P```````@```$8$``#\_________\NU!P``````
+M`@```*($``#\__________VU!P```````@```$8$``#\_________V:V!P``
+M`````@```*($``#\_________X"V!P``````"P````$```"@(`@``````)VV
+M!P```````@```'`$``#\__________"V!P```````@```(H$``#\________
+M_Q6W!P```````@```&<$``#\_________R*W!P```````@```&<$``#\____
+M_____RRW!P```````@```&<$``#\_________S6W!P``````"P````$```"@
+M(`@``````%*W!P```````@```'`$``#\_________\.W!P```````@```&\$
+M``#\_________]2W!P```````@```&\$``#\_________]FW!P```````@``
+M`*L$``#\_________S2X!P```````@```#4$``#\_________XRX!P``````
+M`@```&\$``#\_________ZZX!P```````@```&\$``#\_________PJY!P``
+M`````@```$L$``#\_________R.Y!P``````"P````$```"@(`@``````#RY
+M!P```````@```'`$``#\_________U&Y!P```````@```)`$``#\________
+M_UFY!P```````@```#<$``#\_________VJY!P``````"P````$```"@(`@`
+M`````(.Y!P```````@```'`$``#\_________^"Y!P```````@```$8$``#\
+M_________T>Z!P```````@```'\$``#\_________UBZ!P```````@```&,$
+M``#\_________V"Z!P``````"P````$```"@(`@``````'FZ!P```````@``
+M`'`$``#\_________[JZ!P``````"P````$```"@(`@``````-.Z!P``````
+M`@```'`$``#\_________R&[!P```````@```&`$``#\_________TF[!P``
+M````"P````$```"@(`@``````&*[!P```````@```'`$``#\_________VZ\
+M!P``````"P````$```"@(`@``````(>\!P```````@```'`$``#\________
+M_[N\!P```````@```$L$``#\__________"\!P```````@```&`$``#\____
+M_____QN]!P``````"P````$```"@(`@``````#2]!P```````@```'`$``#\
+M_________V2]!P```````@```$L$``#\_________X^]!P``````"P````$`
+M``"@(`@``````*B]!P```````@```'`$``#\_________^V]!P```````@``
+M`$L$``#\__________J^!P```````@```'\$``#\_________S6_!P``````
+M"P````$```"@(`@``````$Z_!P```````@```'`$``#\_________WN_!P``
+M`````@```$L$``#\_________[._!P```````@```$($``#\_________[N_
+M!P``````"P````$```"@(`@``````-2_!P```````@```'`$``#\________
+M_P#`!P```````@```$L$``#\_________PO`!P```````@```$L$``#\____
+M_____Q;`!P```````@```$$$``#\_________RC`!P``````"P````$```"@
+M(`@``````$'`!P```````@```'`$``#\_________W+`!P```````@```$L$
+M``#\_________T;!!P```````@```&<$``#\_________T_!!P``````"P``
+M``$```"@(`@``````&S!!P```````@```'`$``#\__________C!!P``````
+M"P````$```"@(`@``````!'"!P```````@```'`$``#\_________R'"!P``
+M`````@```$L$``#\_________W["!P```````@```$($``#\_________X;"
+M!P``````"P````$```"@(`@``````)_"!P```````@```'`$``#\________
+M_^W"!P``````"P````$```"@(`@```````;#!P```````@```'`$``#\____
+M_____Q'#!P```````@```$L$``#\_________R/%!P```````@```$($``#\
+M_________RO%!P``````"P````$```"@(`@``````$3%!P```````@```'`$
+M``#\_________X'%!P```````@```&\$``#\_________];%!P```````@``
+M`$L$``#\_________QO&!P``````"P````,`````/0```````+3'!P``````
+M`@```$($``#\_________RG)!P``````"P````$```!0G@<``````%_)!P``
+M`````@```&<$``#\_________W/)!P``````"P````$```"@(`@``````)#)
+M!P```````@```'`$``#\_________\W)!P```````@```#T$``#\________
+M__#)!P```````@```'\$``#\__________C)!P```````@```)($``#[____
+M_____Q'*!P```````@```#<$``#\_________RS*!P```````@```$8$``#\
+M_________S?*!P```````@```'\$``#\_________U#*!P``````"P````$`
+M``#`S@<``````'+*!P```````@```*\$``#\_________\/*!P``````"P``
+M``$```"@(`@``````-S*!P```````@```'`$``#\_________RW+!P``````
+M"P````$```"@R0<``````#?+!P```````@```#,$``#\_________W7+!P``
+M````"P````$```#`S@<``````)O+!P```````@```*\$``#\_________ZO+
+M!P``````"P````$```"@(`@``````,3+!P```````@```'`$``#\________
+M_P#,!P```````@```'\$``#\_________T/,!P```````@```#P$``#\____
+M_____V7,!P```````@```"T$``#\_________Y_,!P```````@```"X$``#\
+M_________Q'-!P```````@```$4$``#\_________QG-!P```````@```*($
+M``#\_________]?-!P```````@```*($``#\__________;-!P```````@``
+M`*($``#\_________PW.!P```````@```)`$``#\_________S_.!P``````
+M`@```(\$``#\_________U7.!P``````"P````$```#@RP<``````)3.!P``
+M`````@```"($``#\_________\7.!P```````@```"4$``#\_________^K.
+M!P```````@```$L$``#\_________X7/!P```````@```$($``#\________
+M_Y'/!P```````@```(H$``#\_________ZK/!P``````"P````$```"@(`@`
+M`````,//!P```````@```'`$``#\__________#/!P```````@```(<$``#\
+M_________YS0!P``````"P````$```"@(`@``````+70!P```````@```'`$
+M``#\__________;0!P```````@```(\$``#\_________PW1!P``````"P``
+M``$```"@(`@``````";1!P```````@```'`$``#\_________S?1!P``````
+M`@```(($``#\_________U#1!P```````@```'\$``#\_________[31!P``
+M`````@```&8$``#\_________\71!P```````@```&8$``#\_________T[2
+M!P```````@```'\$``#\_________U?2!P```````@```&,$``#\________
+M_\?2!P```````@```'\$``#\_________]#2!P```````@```&,$``#\____
+M_____QW3!P``````"P````$```"@N0<``````#W3!P``````"P````$```#0
+MSP<``````&'3!P```````@```%L$``#\_________YS3!P``````"P````$`
+M``"@N0<``````*S3!P```````@```(<$``#\_________]?5!P```````@``
+M`'\$``#\__________C5!P```````@```"X$``#\_________QC6!P``````
+M"P````$```"PU0<``````#C6!P```````@```*\$``#\_________]W6!P``
+M````"P````$```"@(`@``````/;6!P```````@```'`$``#\_________P/7
+M!P```````@```$8$``#\_________QW7!P``````"P````$````0U@<`````
+M`#C7!P```````@```'`$``#\_________WK7!P```````@```&,$``#\____
+M_____X+7!P``````"P````$```!0U@<``````)O7!P```````@```*\$``#\
+M__________/7!P```````@```*8$``#\__________[7!P```````@```(($
+M``#\_________QO8!P``````"P````$```!@UP<``````"#8!P```````@``
+M`(<$``#\_________U39!P```````@```'0$``#\_________US9!P``````
+M`@```&,$``#\_________Y39!P```````@```'0$``#\_________YS9!P``
+M`````@```&,$``#\_________Z39!P``````"P````$```"@(`@``````+W9
+M!P```````@```'`$``#\_________R':!P```````@```(<$``#\________
+M_W_:!P``````"P````$```#@V0<``````)C:!P```````@```*\$``#\____
+M_____P#;!P```````@```'0$``#\_________PC;!P```````@```&,$``#\
+M_________QK;!P``````"P````$```"@(`@``````#?;!P```````@```'`$
+M``#\_________U3<!P```````@```(<$``#\_________\O<!P```````@``
+M`(($``#\__________?<!P```````@```'0$``#\_________Q/=!P``````
+M"P````$```"@(`@``````"S=!P```````@```'`$``#\_________S?=!P``
+M`````@```&8$``#\_________TO=!P```````@```&8$``#\_________WS>
+M!P``````"P````$````PV@<``````(?>!P``````"P````$`````U`<`````
+M`);>!P```````@```(<$``#\_________Q/?!P``````"P````$```"`W`<`
+M`````#'?!P```````@```%L$``#\_________R;@!P```````@```*$$``#\
+M_________SWA!P```````@```&,$``#\_________ZKA!P```````@```'\$
+M``#\_________\CA!P```````@```#X$``#\_________]WA!P``````"P``
+M``$```"@(`@``````/KA!P```````@```'`$``#\_________PWB!P``````
+M`@```$L$``#\_________TCB!P``````"P````$`````X0<``````&3B!P``
+M`````@```*\$``#\_________XOB!P```````@```(($``#\_________\GB
+M!P``````"P````$```!`X@<``````,[B!P```````@```(<$``#\________
+M_S[C!P```````@```$L$``#\_________XOC!P```````@```$L$``#\____
+M_____Y/C!P```````@```)`$``#\_________\GC!P```````@```$L$``#\
+M_________^[C!P``````"P````$```"@(`@```````?D!P```````@```'`$
+M``#\_________S?D!P```````@```#L$``#[_________VGD!P```````@``
+M`#L$``#\_________V[D!P```````@```$T$``#\_________XOD!P``````
+M"P````$````@Y`<``````*'D!P```````@```'@$``#\_________PGE!P``
+M`````@```"<$``#\_________T_E!P```````@```#L$``#\_________YOE
+M!P```````@```%D$``#\_________['E!P``````"P````$````@Y`<`````
+M`,/E!P```````@```'@$``#\_________]+E!P``````"P````$```"@(`@`
+M`````.OE!P```````@```'`$``#\_________Z/F!P``````"P````$```"@
+M(`@``````+SF!P```````@```'`$``#\_________]_F!P```````@```"($
+M``#\_________R+G!P``````"P````$```"@(`@``````#OG!P```````@``
+M`'`$``#\_________XCG!P```````@```($$``#[_________Y+G!P``````
+M"P````8```!@`@```````-?G!P```````@```)($``#\_________^;G!P``
+M````"P````8```!M`@```````"KH!P```````@```&8$``#\_________TKH
+M!P``````"P````8```!^`@```````(_H!P```````@```"H$``#\________
+M_YOH!P``````"P````8```";`@```````.#H!P```````@```#L$``#\____
+M______?H!P``````"P````$```"@(`@``````!3I!P```````@```'`$``#\
+M_________U#I!P``````"P````8```";`@```````,#I!P``````"P````8`
+M``!@`@```````-;I!P```````@```)($``#\_________][I!P``````"P``
+M``$```"@(`@``````/?I!P```````@```'`$``#\_________P/J!P``````
+M"P````8```!M`@```````"#J!P```````@```&8$``#\_________RCJ!P``
+M````"P````$```"@(`@``````$'J!P```````@```'`$``#\_________U/J
+M!P``````"P````8```!^`@```````&GJ!P```````@```"H$``#\________
+M_W'J!P``````"P````$```"@(`@``````(KJ!P```````@```'`$``#\____
+M_____Y;J!P``````"P````8```";`@```````+'J!P``````"P````$```#`
+MY`<``````-/J!P```````@```*\$``#\_________]SJ!P``````"P````8`
+M``"X`@```````/?J!P``````"P````$````0Y@<``````!GK!P```````@``
+M`*\$``#\_________RKK!P``````"P````$```"@(`@``````$/K!P``````
+M`@```'`$``#\_________Y+K!P``````"P````$```"@(`@``````*OK!P``
+M`````@```'`$``#\_________P+L!P``````"P````$```"@(`@``````!OL
+M!P```````@```'`$``#\_________W+L!P``````"P````$```"@(`@`````
+M`(OL!P```````@```'`$``#\_________P7M!P``````"P````$```"@(`@`
+M`````![M!P```````@```'`$``#\_________W7M!P``````"P````$```"@
+M(`@``````([M!P```````@```'`$``#\_________SCN!P``````"P````$`
+M``"@(`@``````%'N!P```````@```'`$``#\_________S?O!P``````"P``
+M``$```"@(`@``````%3O!P```````@```'`$``#\_________T?P!P``````
+M"P````$```"@(`@``````&3P!P```````@```'`$``#\_________U?Q!P``
+M````"P````$```"@(`@``````'3Q!P```````@```'`$``#\_________^WQ
+M!P``````"P````$```"@(`@```````;R!P```````@```'`$``#\________
+M_WWR!P``````"P````$```"@(`@``````);R!P```````@```'`$``#\____
+M_____]/R!P```````@```$L$``#\_________R[S!P``````"P````$```"@
+M(`@``````$?S!P```````@```'`$``#\_________W/S!P```````@```$L$
+M``#\_________\[S!P``````"P````$```"@(`@``````.?S!P```````@``
+M`'`$``#\_________Q/T!P```````@```$L$``#\_________V[T!P``````
+M"P````$```"@(`@``````(?T!P```````@```'`$``#\_________^7T!P``
+M`````@```$L$``#\_________S+U!P``````"P````$```"@(`@``````$OU
+M!P```````@```'`$``#\_________Y'U!P```````@```$L$``#\________
+M_P[V!P```````@```$L$``#\_________U7V!P``````"P````$```"@(`@`
+M`````&[V!P```````@```'`$``#\_________\WV!P```````@```$L$``#\
+M_________USW!P```````@```$L$``#\_________[?W!P``````"P````$`
+M``"@(`@``````-3W!P```````@```'`$``#\_________U+X!P```````@``
+M`($$``#[_________Y[X!P```````@```$L$``#\_________ZKX!P``````
+M`@```$L$``#\___________X!P```````@```$L$``#\_________R_Y!P``
+M````"P````$```#@N`<``````%'Y!P```````@```*\$``#\_________]_Y
+M!P```````@```$L$``#\_________^SY!P```````@```$L$``#\________
+M_SSZ!P```````@```$L$``#\_________V_Z!P``````"P````$```"`NP<`
+M`````)'Z!P```````@```*\$``#\_________QO[!P``````"P````$```"@
+M(`@``````#3[!P```````@```'`$``#\_________R;\!P``````"P````$`
+M``"@(`@``````#_\!P```````@```'`$``#\_________]_\!P```````@``
+M`$L$``#\_________^S\!P```````@```$L$``#\_________SS]!P``````
+M`@```$L$``#\_________V_]!P``````"P````$```#@N@<``````)']!P``
+M`````@```*\$``#\_________RW^!P```````@```$L$``#\_________SK^
+M!P```````@```$L$``#\_________XS^!P```````@```$L$``#\________
+M_[_^!P``````"P````$```"0N@<``````.'^!P```````@```*\$``#\____
+M_____S/_!P```````@```$L$``#\_________TC_!P```````@```$L$``#\
+M_________Z#_!P```````@```$L$``#\_________ZS_!P```````@```$L$
+M``#\_________P<`"````````@```$L$``#\_________S\`"```````"P``
+M``$```"@O`<``````&$`"````````@```*\$``#\_________[,`"```````
+M`@```$L$``#\_________\L`"````````@```$L$``#\_________T`!"```
+M`````@```$L$``#\_________TP!"````````@```$L$``#\_________Z<!
+M"````````@```$L$``#\_________]\!"```````"P````$```!0O0<`````
+M``$""````````@```*\$``#\_________T,""````````@```$L$``#\____
+M_____U@""````````@```$L$``#\_________Y4""````````@```*$$``#\
+M_________\@""````````@```$L$``#\_________R\#"```````"P````$`
+M``#`O0<``````%$#"````````@```*\$``#\_________YP#"```````"P``
+M``$```"@(`@``````+4#"````````@```'`$``#\__________,#"```````
+M`@```$L$``#\_________P@$"````````@```$L$``#\_________U0$"```
+M`````@```$L$``#\_________[,$"````````@```$L$``#\_________\@$
+M"````````@```$L$``#\_________Q0%"````````@```$L$``#\________
+M_W,%"````````@```$L$``#\_________X@%"````````@```$L$``#\____
+M_____]0%"````````@```$L$``#\_________S,&"````````@```$L$``#\
+M_________T@&"````````@```$L$``#\_________Y0&"````````@```$L$
+M``#\__________,&"````````@```$L$``#\_________P@'"````````@``
+M`$L$``#\_________U0'"````````@```$L$``#\_________[,'"```````
+M`@```$L$``#\_________\@'"````````@```$L$``#\_________Q0("```
+M`````@```$L$``#\_________W,("````````@```$L$``#\_________X@(
+M"````````@```$L$``#\__________@("````````@```$L$``#\________
+M_]H*"```````"P````$```#0W@<```````P+"````````@```*4$``#\____
+M_____V,+"````````@```$L$``#\_________W@+"````````@```$L$``#\
+M_________[L+"````````@```$L$``#\_________]\+"```````"P````$`
+M``!POP<```````$,"````````@```*\$``#\_________T,,"````````@``
+M`$L$``#\_________U@,"````````@```$L$``#\_________YL,"```````
+M`@```$L$``#\_________[\,"```````"P````$```!POP<``````.$,"```
+M`````@```*\$``#\_________S,-"````````@```$L$``#\_________U$-
+M"````````@```$L$``#\_________V8-"````````@```$L$``#\________
+M_W$-"````````@```$L$``#\_________P@."````````@```$L$``#\____
+M_____Q(."````````@```$L$``#\_________T\."```````"P````$```#@
+MOP<``````'$."````````@```*\$``#\_________[,."````````@```$L$
+M``#\_________\@."````````@```$L$``#\_________Q@/"````````@``
+M`$L$``#\_________Z\/"```````"P````$```#@K@<``````-$/"```````
+M`@```*\$``#\_________Q,0"````````@```$L$``#\_________R@0"```
+M`````@```$L$``#\_________VL0"````````@```$L$``#\_________X\0
+M"```````"P````$```!@P`<``````+$0"````````@```*\$``#\________
+M__<0"````````@```$L$``#\_________Q$1"````````@```$L$``#\____
+M_____U\1"```````"P````$```#`P@<``````($1"````````@```*\$``#\
+M_________\<1"````````@```$L$``#\_________^$1"````````@```$L$
+M``#\_________R\2"```````"P````$```#`P0<``````%$2"````````@``
+M`*\$``#\_________X\2"```````"P````$```"0R@<``````+$2"```````
+M`@```*\$``#\__________P2"```````"P````$```"@(`@``````!43"```
+M`````@```'`$``#\_________ZD3"```````"P````$```"@(`@``````,(3
+M"````````@```'`$``#\_________S84"````````@```$L$``#\________
+M_U$4"````````@```$L$``#\_________YL4"````````@```$L$``#\____
+M_____Q85"````````@```$L$``#\_________S$5"````````@```$L$``#\
+M_________WL5"````````@```$L$``#\_________\,5"````````@```$L$
+M``#\_________]@5"````````@```$L$``#\_________P\6"```````"P``
+M``$```#0S@<``````#$6"````````@```*\$``#\_________[X6"```````
+M`@```$L$``#\_________\H6"````````@```$L$``#\_________TP7"```
+M`````@```$L$``#\_________[,7"````````@```*$$``#\_________]@7
+M"```````"P````$```"@(`@``````/$7"````````@```'`$``#\________
+M_WX8"````````@```$L$``#\_________XH8"````````@```$L$``#\____
+M______X8"````````@```$L$``#\_________T\9"```````"P````$```#P
+MX@<``````'$9"````````@```*\$``#\_________Z@9"````````@```$L$
+M``#\_________\$9"````````@```$L$``#\_________P$:"````````@``
+M`$L$``#\_________R\:"```````"P````$```!@Q0<``````%$:"```````
+M`@```*\$``#\_________\4:"````````@```&\$``#\_________S$;"```
+M````"P````$```"@(`@``````$X;"````````@```'`$``#\__________<;
+M"```````"P````$```"@(`@```````\<"````````@```'`$``#\________
+M_ZT<"```````"P````$```#@&P@``````#8="````````@```$L$``#\____
+M_____U$="````````@```$L$``#\_________T@>"````````@```&,$``#\
+M_________U`>"```````"P````$```"@(`@``````&D>"````````@```'`$
+M``#\_________XT>"````````@```$L$``#\_________YL>"````````@``
+M`(($``#\_________[4>"```````"P````$```"@(`@``````-(>"```````
+M`@```'`$``#\_________U@?"```````"P````$```"0'0@``````&,?"```
+M````"P````$```#@'0@``````&L?"````````@```(<$``#\_________YT?
+M"```````"P````<```!`&P```````*,?"````````@````<````[&P``````
+M`*P?"````````@````<````\&P```````"0A"````````@```(,$``#\____
+M_____S<B"````````@```"L$``#\_________W\C"````````@```",$``#\
+M_________Y`C"````````@```&,$``#\_________Y@C"```````"P````$`
+M``"@(`@``````+$C"````````@```'`$``#\_________U@D"```````"P``
+M``4```!@"0```````&(D"````````@```(P$``#\_________V\D"```````
+M`@```$8$``#\_________WPD"```````"P````4```"("0```````(8D"```
+M`````@```(P$``#\_________Y,D"````````@```$8$``#\_________Z@D
+M"````````@```'\$``#\_________[`D"````````@```&,$``#\________
+M_^4D"````````@```(($``#\__________\D"```````"P````$```"@(`@`
+M`````!PE"````````@```'`$``#\_________WDE"````````@```(\$``#\
+M_________ZXE"```````"P````$```"@(`@``````,LE"````````@```'`$
+M``#\_________],E"````````@```&,$``#\_________^DE"````````@``
+M`&`$``#\_________Q8F"```````"P````$```#0(P@``````"@F"```````
+M"P````$```"@(`@``````$4F"````````@```'`$``#\_________Y<G"```
+M````"P````$```!`(@@``````)\G"````````@```(<$``#\_________\,G
+M"````````@```)($``#\_________SLH"````````@```'\$``#\________
+M_T,H"````````@```&,$``#\_________W,H"```````"P````$````0*`@`
+M`````(\H"````````@```*\$``#\_________Y8H"````````@```&,$``#\
+M_________P0I"````````@```&,$``#\_________Q`I"````````@```(($
+M``#\_________TDI"```````"P````$```!@*`@``````$XI"````````@``
+M`(<$``#\_________Y0I"````````@```(($``#\_________^DI"```````
+M"P````$```"P*`@``````/<I"```````"P````$```!@*`@``````/PI"```
+M`````@```(<$``#\_________P4J"````````@```(,$``#\_________U,J
+M"````````@```(\$``#\_________V(J"```````"P````8```#)`@``````
+M`&PJ"````````@```(P$``#\_________]LJ"````````@```'\$``#\____
+M_____T,K"````````@```(\$``#\_________U(K"```````"P````8```#A
+M`@```````%PK"````````@```(P$``#\_________]$K"````````@```'\$
+M``#\_________QTN"```````"P```$P$`````````````#XN"````````@``
+M`*4$``#\_________U(N"````````@```$P$``#\_________\HO"```````
+M`@```%4$``#\_________QPQ"````````@```*@$``#\_________[4Q"```
+M`````@```*\$``#\_________P,S"```````"P```$P$`````````````"0S
+M"````````@```*4$``#\_________S@S"````````@```$P$``#\________
+M_\@S"````````@```*\$``#\_________Q$T"````````@```"D$``#\____
+M_____V,T"````````@```(<$``#\_________\PT"````````@```(<$``#\
+M__________$T"````````@```(,$``#\_________T<U"````````@```*\$
+M``#\_________V8U"````````@```$H$``#\_________Z`U"````````@``
+M`'0$``#\_________UDW"````````@```(<$``#\_________WPW"```````
+M`@```'\$``#\_________Y4W"````````@```*@$``#\_________^HW"```
+M````"P````$```#`-@@``````&TX"````````@```&D$``#\_________Z8X
+M"```````"P````$```#`-0@``````+$X"```````"P````$```#`-@@`````
+M`#`Y"````````@```(<$``#\_________]$Y"````````@```$,$``#\____
+M_____R<Z"````````@```+4$``#\_________\\Z"````````@```+4$``#\
+M__________LZ"````````@```)`$``#\_________\H["````````@```)`$
+M``#\_________\\\"````````@```&4$``#\_________^`\"````````@``
+M`(H$``#\__________$\"````````@```&<$``#\_________R<]"```````
+M`@```&0$``#\_________PD_"````````@```#H$``#\_________R`_"```
+M`````@```#\$``#\_________S8_"````````@```$0$``#\_________\L_
+M"````````@```$,$``#\_________Q1`"````````@```$,$``#\________
+M_SY`"````````@```(H$``#\_________XM!"````````@```(\$``#\____
+M_____RM$"````````@```+4$``#\_________X]$"````````@```+4$``#\
+M_________Q1%"````````@```+4$``#\_________UA("````````@```$0$
+M``#\_________V5("````````@```#\$``#\_________X=("````````@``
+M`#H$``#\_________[1("````````@```$($``#\_________S=)"```````
+M`@```&<$``#\_________WQ)"````````@```%4$``#\_________Z9)"```
+M`````@```%4$``#\_________[1)"````````@```%4$``#\_________\1)
+M"````````@```&<$``#\_________\Q)"````````@```&<$``#\________
+M_T]+"````````@```#8$``#\_________V!,"````````@```$8$``#\____
+M_____XM,"````````@```$@$``#\_________^],"````````@```#8$``#\
+M_________P1-"````````@```&4$``#\_________Q5-"````````@```(H$
+M``#\_________V!-"```````"P````,````P/0```````(U-"````````@``
+M`"X$``#\_________Q5."````````@```&<$``#\_________\I."```````
+M`@```&4$``#\_________QY/"````````@```$@$``#\_________S9/"```
+M`````@```(H$``#\_________P50"````````@```$X$``#\_________U=0
+M"````````@```$X$``#\_________VA0"````````@```$X$``#\________
+M_S91"````````@```#$$``#\_________SY1"````````@```$@$``#\____
+M_____\=1"````````@```"P$``#\_________ZQ2"````````@```&<$``#\
+M_________\)2"````````@```(8$``#\_________UE3"````````@```&X$
+M``#\_________WQ3"````````@```)H$``#\_________ZQ3"````````@``
+M`+$$``#\_________\14"```````"P````$```#`4P@``````.94"```````
+M`@```*\$``#\_________^U5"````````@```'\$``#\__________Q5"```
+M`````@```*@$``#\_________UE6"````````@```&D$``#\_________XA6
+M"```````"P````$```#050@``````.=6"```````"P````$````05@@`````
+M`.Q6"````````@```(<$``#\_________P=7"```````"P````<```!`)```
+M``````Q7"````````@```*P$``#\_________R=7"```````"P````<```#`
+M)````````"Q7"````````@```%P$``#\_________T%7"````````@```(T$
+M``#\_________U17"```````"P````<```#`)````````%E7"````````@``
+M`%P$``#\_________V17"````````@```(\$``#\_________W=7"```````
+M"P````<```#`)````````'Q7"````````@```%P$``#\_________XA7"```
+M`````@```'\$``#\_________]=7"```````"P````<```#`)````````-]7
+M"````````@```%P$``#\__________%8"````````@```'\$``#\________
+M_Q=9"````````@```*@$``#\_________VQ;"````````@```&D$``#\____
+M_____[Q;"```````"P````$```"P6`@``````,Q;"````````@```(<$``#\
+M_________PI<"````````@```*@$``#\_________V%<"````````@```&D$
+M``#\_________YM<"```````"P````$```"P6`@``````*9<"```````"P``
+M``$```"@5P@``````-M<"````````@```(<$``#\_________R=="```````
+M"P````<```#`)````````"Q="````````@```*P$``#\_________P]>"```
+M`````@```+4$``#\_________T]>"````````@```+<$``#\_________WI>
+M"````````@```'\$``#\_________XE>"````````@```*@$``#\________
+M_V1?"````````@```(<$``#\_________Z)?"````````@```(<$``#\____
+M_____S1@"```````"P````$````@7@@``````$-@"````````@```(<$``#\
+M_________W]@"````````@```'\$``#\_________Z5@"````````@```*@$
+M``#\_________V9A"````````@```&D$``#\_________[)A"```````"P``
+M``$```"@7@@``````+]A"````````@```(<$``#\_________ZYC"```````
+M`@```&D$``#\_________^1C"```````"P````$```"@7@@``````.]C"```
+M````"P````$```!`70@``````!ED"````````@```(<$``#\_________U=D
+M"```````"P````<```!`)0```````%QD"````````@```*P$``#\________
+M_S%E"````````@```'\$``#\_________VYE"````````@```*@$``#\____
+M______)E"````````@```(<$``#\_________REF"````````@```'\$``#\
+M_________SAF"````````@```*@$``#\__________AF"````````@```'\$
+M``#\_________UEG"````````@```&D$``#\_________[%G"```````"P``
+M``$````@7@@``````+QG"```````"P````$```!`9@@``````-=G"```````
+M`@```(<$``#\_________]1H"````````@```*@$``#\_________W]I"```
+M`````@```&D$``#\_________\YI"```````"P````$```#@9`@``````-EI
+M"```````"P````$```!P9`@``````.=I"````````@```(<$``#\________
+M_P-J"````````@```&D$``#\_________TQJ"```````"P````$```"090@`
+M`````%=J"```````"P````$```!P9`@``````'5J"````````@```(<$``#\
+M_________Z)J"````````@```&D$``#\__________%J"```````"P````$`
+M``#`9@@``````/QJ"```````"P````$```!`9@@```````IK"````````@``
+M`(<$``#\_________R)K"````````@```*@$``#\_________Z1K"```````
+M`@```(\$``#\_________\-K"````````@```%0$``#\_________Q=L"```
+M`````@```(X$``#\_________RML"````````@```'\$``#\__________=N
+M"````````@```'\$``#\_________R9O"````````@```(\$``#\________
+M_X)R"````````@```(\$``#\_________[1S"````````@```&`$``#\____
+M_____\QS"````````@```&`$``#\_________S)T"````````@```'\$``#\
+M_________YMT"````````@```'\$``#\__________-T"````````@```*@$
+M``#\_________X)U"````````@```&D$``#\_________\QU"```````"P``
+M``$```!@=`@``````-QU"````````@```(<$``#\_________R)X"```````
+M"P````<```#`)0```````"=X"````````@```%P$``#\_________Y]X"```
+M````"P````$```#0>`@``````,1X"````````@```'`$``#\_________^MX
+M"```````"P````<```#`)0```````/-X"````````@```%P$``#\________
+M_S1["```````"P````$````@WP@``````$M["````````@```%L$``#\____
+M_____W5\"```````"P````$````0>`@```````1]"````````@```&X$``#\
+M_________SY]"```````"P````$```"0C0@``````%Q]"````````@```'`$
+M``#\_________P1^"````````@```(\$``#\_________^=^"````````@``
+M`'\$``#\_________P%_"````````@```+<$``#\_________T1_"```````
+M`@```+<$``#\_________Y-_"````````@```+<$``#\_________]-_"```
+M````"P````<```#`)0```````-M_"````````@```%P$``#\_________QF`
+M"````````@```'\$``#\_________RN""```````"P````<```#`)0``````
+M`#.""````````@```%P$``#\_________Z"""````````@```'\$``#\____
+M_____\2""````````@```'\$``#\_________S*$"````````@```&D$``#\
+M_________WZ$"````````@```&D$``#\__________"$"```````"P````$`
+M``!`@`@``````/^$"```````"P````$`````@@@```````2%"````````@``
+M`(<$``#\_________\&+"````````@```&`$``#\_________P2-"```````
+M`@```&`$``#\_________YZ."```````"P````<```#`)0```````*:."```
+M`````@```%P$``#\_________[^."```````"P````,```!@/0```````&V0
+M"```````"P````<```#`)0```````'60"````````@```%P$``#\________
+M_XZ0"```````"P````,```"H/0```````$62"```````"P````<```#`)0``
+M`````$J2"````````@```%P$``#\_________Q[$"````````@```*@$``#\
+M_________T_*"```````"P````<```#`)0```````%3*"````````@```%P$
+M``#\_________R3,"````````@```*@$``#\_________RS,"````````@``
+M`&X$``#\_________UK,"```````"P````<```#`)0```````&+,"```````
+M`@```%P$``#\_________\/,"````````@```(\$``#\_________^[,"```
+M`````@```'\$``#\_________S[/"````````@```'\$``#\_________Y+/
+M"```````"P````<```#`)0```````)O/"````````@```%P$``#\________
+M_]7/"````````@```'\$``#\_________TO0"````````@```*@$``#\____
+M_____TO3"````````@```&D$``#\_________YG3"```````"P````$```!`
+MS`@``````*33"```````"P````$```!@SP@``````+K3"````````@```(<$
+M``#\__________?3"```````"P````<```#`)0```````/S3"````````@``
+M`%P$``#\__________C>"```````"P````$```#@TP@``````!#?"```````
+M`@```'`$``#\_________S'?"```````"P````<```#`)0```````#;?"```
+M`````@```%P$``#\_________\??"````````@```&X$``#\_________WCA
+M"````````@```&X$``#\_________[;A"```````"P````<```#`)0``````
+M`+[A"````````@```%P$``#\_________S;B"````````@```*@$``#\____
+M_____V_B"````````@```*@$``#\_________QGC"````````@```*@$``#\
+M_________VGC"```````"P````$````@WP@``````(#C"````````@```%L$
+M``#\_________[WC"```````"P````<```#`)0```````,+C"````````@``
+M`%P$``#\_________Q3F"```````"P````$```#0W@@``````"WF"```````
+M"P````$```#@TP@``````$;F"````````@```'`$``#\_________XCF"```
+M`````@```*@$``#\_________Z?F"```````"P````<```#`)0```````*_F
+M"````````@```%P$``#\_________[_F"````````@```(\$``#\________
+M_Q/G"```````"P````<```#`)0```````!CG"````````@```%P$``#\____
+M______'G"````````@```'\$``#\_________RWH"````````@```'\$``#\
+M_________Y_H"````````@```+4$``#\_________[[H"````````@```)4$
+M``#\_________PSI"````````@```%4$``#\_________Q?I"````````@``
+M`&<$``#\_________S[I"```````"P````<```#`)0```````$/I"```````
+M`@```%P$``#\_________T[I"````````@```*L$``#\_________W+I"```
+M`````@```(T$``#\_________X?I"````````@```(T$``#\_________Z#I
+M"````````@```(T$``#\_________[GI"````````@```(T$``#\________
+M_\CI"````````@```&($``#\_________^/I"````````@```(T$``#\____
+M_____P+J"````````@```%X$``#\_________QOJ"````````@```(T$``#\
+M_________SWJ"```````"P````<```#`)0```````$+J"````````@```%P$
+M``#\_________XWJ"````````@```+`$``#\_________Z?J"````````@``
+M`)H$``#\_________\#J"```````"P````$```"@Q`@``````-KJ"```````
+M`@```)X$``#\__________3J"```````"P````<```#`)0```````/GJ"```
+M`````@```%P$``#\_________P_K"````````@```(0$``#\_________RGK
+M"````````@```+$$``#\_________S?K"```````"P````<```#`)0``````
+M`#_K"````````@```%P$``#\_________S;L"````````@````<```#')0``
+M`````#[L"```````"P````<```#`)0```````$/L"````````@```*P$``#\
+M_________V?L"```````"P````<```!`)@```````&SL"````````@```%P$
+M``#\_________X'L"````````@```(T$``#\_________Y3L"```````"P``
+M``<```!`)@```````)GL"````````@```%P$``#\_________Z3L"```````
+M`@```(\$``#\_________[?L"```````"P````<```!`)@```````+SL"```
+M`````@```%P$``#\_________\CL"````````@```'\$``#\_________Q_M
+M"```````"P````<```!`)@```````"?M"````````@```%P$``#\________
+M_Z'N"````````@```'\$``#\_________\?N"````````@```*@$``#\____
+M_____VSP"````````@```&D$``#\_________[SP"```````"P````$```!@
+M[@@``````,SP"````````@```(<$``#\_________P;Q"````````@```*@$
+M``#\_________U[Q"````````@```&D$``#\_________YCQ"```````"P``
+M``$```!@[@@``````*/Q"```````"P````$```#@[`@``````,+Q"```````
+M`@```(<$``#\_________P?R"```````"P````<```!`)@````````SR"```
+M`````@```*P$``#\_________P```````````0````$```"4)P````````@`
+M`````````0````$```#`)P```````!```````````0````$````X*```````
+M`!@``````````0````$````X*````````"```````````0````$````X*```
+M`````"@``````````0````$````X*````````#```````````0````$```#H
+M)P```````#@``````````0````$````0*````````$```````````0````$`
+M```X*````````$@``````````0````$```!0*````````%```````````0``
+M``$```"H,P```````%@``````````0````$```"H,P```````&``````````
+M`0````$````[,P```````&@``````````0````$```!`,P```````'``````
+M`````0````$```"H,P```````'@``````````0````$```"H,P```````(``
+M`````````0````$```"H,P```````(@``````````0````$```"H,P``````
+M`)```````````0````$```"H,P```````)@``````````0````$```"H,P``
+M`````*```````````0````$```"H,P```````*@``````````0````$```"H
+M,P```````+```````````0````$```"H,P```````+@``````````0````$`
+M``"H,P```````,```````````0````$```"H,P```````,@``````````0``
+M``$```"H,P```````-```````````0````$```!%,P```````-@`````````
+M`0````$```!*,P```````.```````````0````$```!2,P```````.@`````
+M`````0````$```!7,P```````/```````````0````$```!<,P```````/@`
+M`````````0````$```!B,P`````````!`````````0````$```!G,P``````
+M``@!`````````0````$```!L,P```````!`!`````````0````$```"H,P``
+M`````!@!`````````0````$```"H,P```````"`!`````````0````$```"H
+M,P```````"@!`````````0````$```"H,P```````#`!`````````0````$`
+M``"H,P```````#@!`````````0````$```"H,P```````$`!`````````0``
+M``$```"H,P```````$@!`````````0````$```"H,P```````%`!````````
+M`0````$```"H,P```````%@!`````````0````$```"H,P```````&`!````
+M`````0````$```"H,P```````&@!`````````0````$```"H,P```````'`!
+M`````````0````$```"H,P```````'@!`````````0````$```"H,P``````
+M`(`!`````````0````$```"H,P```````(@!`````````0````$```"H,P``
+M`````)`!`````````0````$```"H,P```````)@!`````````0````$```"H
+M,P```````*`!`````````0````$```"H,P```````*@!`````````0````$`
+M``"H,P```````+`!`````````0````$```"H,P```````+@!`````````0``
+M``$```"H,P```````,`!`````````0````$```"H,P```````,@!````````
+M`0````$```"H,P```````-`!`````````0````$```"H,P```````-@!````
+M`````0````$```"H,P```````.`!`````````0````$```"H,P```````.@!
+M`````````0````$```"H,P```````/`!`````````0````$```"H,P``````
+M`/@!`````````0````$```"H,P`````````"`````````0````$```"H,P``
+M``````@"`````````0````$```"H,P```````!`"`````````0````$```"H
+M,P```````!@"`````````0````$```"H,P```````"`"`````````0````$`
+M``"H,P```````"@"`````````0````$```"H,P```````#`"`````````0``
+M``$```"H,P```````#@"`````````0````$```"H,P```````$`"````````
+M`0````$```"H,P```````$@"`````````0````$```"H,P```````%`"````
+M`````0````$```"H,P```````%@"`````````0````$```"H,P```````&`"
+M`````````0````$```"H,P```````&@"`````````0````$```"H,P``````
+M`'`"`````````0````$```"H,P```````'@"`````````0````$```"H,P``
+M`````(`"`````````0````$```"H,P```````(@"`````````0````$```"H
+M,P```````)`"`````````0````$```"H,P```````)@"`````````0````$`
+M``"H,P```````*`"`````````0````$```"H,P```````*@"`````````0``
+M``$```"H,P```````+`"`````````0````$```"H,P```````+@"````````
+M`0````$```"H,P```````,`"`````````0````$```"H,P```````,@"````
+M`````0````$```"H,P```````-`"`````````0````$```"H,P```````-@"
+M`````````0````$```"H,P```````.`"`````````0````$```"H,P``````
+M`.@"`````````0````$```"H,P```````/`"`````````0````$```"H,P``
+M`````/@"`````````0````$```"H,P`````````#`````````0````$```"H
+M,P````````@#`````````0````$```"H,P```````!`#`````````0````$`
+M``"H,P```````!@#`````````0````$```"H,P```````"`#`````````0``
+M``$```"H,P```````"@#`````````0````$```"H,P```````#`#````````
+M`0````$```"H,P```````#@#`````````0````$```"H,P```````$`#````
+M`````0````$```"H,P```````$@#`````````0````$```"H,P```````%`#
+M`````````0````$```"H,P```````%@#`````````0````$```"H,P``````
+M`&`#`````````0````$```"H,P```````&@#`````````0````$```"H,P``
+M`````'`#`````````0````$```"H,P```````'@#`````````0````$```"H
+M,P```````(`#`````````0````$```"H,P```````(@#`````````0````$`
+M``"H,P```````)`#`````````0````$```"H,P```````)@#`````````0``
+M``$```"H,P```````*`#`````````0````$```"H,P```````*@#````````
+M`0````$```"H,P```````+`#`````````0````$```"H,P```````+@#````
+M`````0````$```"H,P```````,`#`````````0````$```"H,P```````,@#
+M`````````0````$```"H,P```````-`#`````````0````$```"H,P``````
+M`-@#`````````0````$```"H,P```````.`#`````````0````$```"H,P``
+M`````.@#`````````0````$```"H,P```````/`#`````````0````$```"H
+M,P```````/@#`````````0````$```"H,P`````````$`````````0````$`
+M``"H,P````````@$`````````0````$```"H,P```````!`$`````````0``
+M``$```"H,P```````!@$`````````0````$```"H,P```````"`$````````
+M`0````$```"H,P```````"@$`````````0````$```"H,P```````#`$````
+M`````0````$```"H,P```````#@$`````````0````$```"H,P```````$`$
+M`````````0````$```"H,P```````$@$`````````0````$```"H,P``````
+M`%`$`````````0````$```!R,P```````%@$`````````0````$```!W,P``
+M`````&`$`````````0````$```!\,P```````&@$`````````0````$```"H
+M,P```````'`$`````````0````$```"H,P```````'@$`````````0````$`
+M``"),P```````(`$`````````0````$```"H,P```````(@$`````````0``
+M``$```"H,P```````)`$`````````0````$```"H,P```````)@$````````
+M`0````$```"H,P```````*`$`````````0````$```"H,P```````*@$````
+M`````0````$```"H,P```````+`$`````````0````$```"H,P```````+@$
+M`````````0````$```"H,P```````,`$`````````0````$```"H,P``````
+M`,@$`````````0````$```"H,P```````-`$`````````0````$```"2,P``
+M`````-@$`````````0````$```"7,P```````.`$`````````0````$```"<
+M,P```````.@$`````````0````$```"B,P```````/`$`````````0````$`
+M```X-````````/@$`````````0````$```!#-``````````%`````````0``
+M``$```!#-`````````@%`````````0````$```!#-````````!`%````````
+M`0````$```!#-````````!@%`````````0````$```!#-````````"`%````
+M`````0````$```!#-````````"@%`````````0````$```!#-````````#`%
+M`````````0````$```!#-````````#@%`````````0````$```!#-```````
+M`$`%`````````0````$```!#-````````$@%`````````0````$```!#-```
+M`````%`%`````````0````$```!#-````````%@%`````````0````$```!#
+M-````````&`%`````````0````$```!#-````````&@%`````````0````$`
+M``!#-````````'`%`````````0````$```!#-````````'@%`````````0``
+M``$```!#-````````(`%`````````0````$```!#-````````(@%````````
+M`0````$```!#-````````)`%`````````0````$```!#-````````)@%````
+M`````0````$```!#-````````*`%`````````0````$```!#-````````*@%
+M`````````0````$```!#-````````+`%`````````0````$```!#-```````
+M`+@%`````````0````$```!#-````````,`%`````````0````$```!#-```
+M`````,@%`````````0````$```!#-````````-`%`````````0````$```!#
+M-````````-@%`````````0````$```!#-````````.`%`````````0````$`
+M``!#-````````.@%`````````0````$```!#-````````/`%`````````0``
+M``$```!#-````````/@%`````````0````$```!#-``````````&````````
+M`0````$```!#-`````````@&`````````0````$```!#-````````!`&````
+M`````0````$````--````````!@&`````````0````$```!#-````````"`&
+M`````````0````$````--````````"@&`````````0````$```!#-```````
+M`#`&`````````0````$```!#-````````#@&`````````0````$```!#-```
+M`````$`&`````````0````$````--````````$@&`````````0````$````-
+M-````````%`&`````````0````$```!#-````````%@&`````````0````$`
+M``!#-````````&`&`````````0````$```!#-````````&@&`````````0``
+M``$```!#-````````'`&`````````0````$```!#-````````'@&````````
+M`0````$```!#-````````(`&`````````0````$```!#-````````(@&````
+M`````0````$```!#-````````)`&`````````0````$```!#-````````)@&
+M`````````0````$```!#-````````*`&`````````0````$```!#-```````
+M`*@&`````````0````$```!#-````````+`&`````````0````$```!#-```
+M`````+@&`````````0````$```!#-````````,`&`````````0````$```!#
+M-````````,@&`````````0````$```!#-````````-`&`````````0````$`
+M``!#-````````-@&`````````0````$````--````````.`&`````````0``
+M``$```!#-````````.@&`````````0````$```!#-````````/`&````````
+M`0````$```!#-````````/@&`````````0````$```!#-``````````'````
+M`````0````$```!#-`````````@'`````````0````$```!#-````````!`'
+M`````````0````$```!#-````````!@'`````````0````$```!#-```````
+M`"`'`````````0````$```!#-````````"@'`````````0````$```!#-```
+M`````#`'`````````0````$```!#-````````#@'`````````0````$```!#
+M-````````$`'`````````0````$```!#-````````$@'`````````0````$`
+M``!#-````````%`'`````````0````$````--````````%@'`````````0``
+M``$````--````````&`'`````````0````$````--````````&@'````````
+M`0````$````--````````'`'`````````0````$```!#-````````'@'````
+M`````0````$```!#-````````(`'`````````0````$```!#-````````(@'
+M`````````0````$```!#-````````)`'`````````0````$```!#-```````
+M`)@'`````````0````$```!#-````````*`'`````````0````$```!#-```
+M`````*@'`````````0````$```!#-````````+`'`````````0````$```!#
+M-````````+@'`````````0````$```!#-````````,`'`````````0````$`
+M``!#-````````,@'`````````0````$```!#-````````-`'`````````0``
+M``$```!#-````````-@'`````````0````$```!#-````````.`'````````
+M`0````$```!#-````````.@'`````````0````$```!#-````````/`'````
+M`````0````$```!#-````````/@'`````````0````$```!#-``````````(
+M`````````0````$```!#-`````````@(`````````0````$```!#-```````
+M`!`(`````````0````$```!#-````````!@(`````````0````$```!#-```
+M`````"`(`````````0````$```!#-````````"@(`````````0````$```!#
+M-````````#`(`````````0````$```!#-````````#@(`````````0````$`
+M``!#-````````$`(`````````0````$```!#-````````$@(`````````0``
+M``$```!#-````````%`(`````````0````$```!#-````````%@(````````
+M`0````$```!#-````````&`(`````````0````$```!#-````````&@(````
+M`````0````$```!#-````````'`(`````````0````$```!#-````````'@(
+M`````````0````$```!#-````````(`(`````````0````$```!#-```````
+M`(@(`````````0````$```!#-````````)`(`````````0````$```!#-```
+M`````)@(`````````0````$```!#-````````*`(`````````0````$```!#
+M-````````*@(`````````0````$```!#-````````+`(`````````0````$`
+M``!#-````````+@(`````````0````$```!#-````````,`(`````````0``
+M``$```!#-````````,@(`````````0````$````--````````-`(````````
+M`0````$```!#-````````-@(`````````0````$```!#-````````.`(````
+M`````0````$```!#-````````.@(`````````0````$```!#-````````/`(
+M`````````0````$```!#-````````/@(`````````0````$```!#-```````
+M```)`````````0````$```!#-`````````@)`````````0````$```!#-```
+M`````!`)`````````0````$````--````````!@)`````````0````$```!#
+M-````````"`)`````````0````$````--````````"@)`````````0````$`
+M``!#-````````#`)`````````0````$```!#-````````#@)`````````0``
+M``$```!#-````````$`)`````````0````$````--````````$@)````````
+M`0````$````--````````%`)`````````0````$```!#-````````%@)````
+M`````0````$```!#-````````&`)`````````0````$```!#-````````&@)
+M`````````0````$````--````````'`)`````````0````$```!#-```````
+M`'@)`````````0````$```!#-````````(`)`````````0````$```!#-```
+M`````(@)`````````0````$```!#-````````)`)`````````0````$```!#
+M-````````)@)`````````0````$```!#-````````*`)`````````0````$`
+M``!#-````````*@)`````````0````$```!#-````````+`)`````````0``
+M``$```!#-````````+@)`````````0````$```!#-````````,`)````````
+M`0````$```!#-````````,@)`````````0````$```!#-````````-`)````
+M`````0````$```!#-````````-@)`````````0````$```!#-````````.`)
+M`````````0````$```!#-````````.@)`````````0````$```!#-```````
+M`/`)`````````0````$```!#-````````/@)`````````0````$```!#-```
+M```````*`````````0````$```!#-`````````@*`````````0````$```!#
+M-````````!`*`````````0````$````--````````!@*`````````0````$`
+M``!#-````````"`*`````````0````$````--````````"@*`````````0``
+M``$```!#-````````#`*`````````0````$```!#-````````#@*````````
+M`0````$```!#-````````$`*`````````0````$````--````````$@*````
+M`````0````$````--````````%`*`````````0````$```#).@```````%@*
+M`````````0````$```#E.@```````&`*`````````0````$````!.P``````
+M`&@*`````````0````$```!6.P```````'`*`````````0````$```"].P``
+M`````'@*`````````0````$```#M<0```````(`*`````````0````$```"9
+M<0```````(@*`````````0````$```"F<0```````)`*`````````0````$`
+M``#/<0```````)@*`````````0````$```#M<0```````*`*`````````0``
+M``$```#C<0```````*@*`````````0````$```#9<0```````+`*````````
+M`0````$```#M<0```````+@*`````````0````$```#M<0```````,`*````
+M`````0````$```#M<0```````,@*`````````0````$```#M<0```````-`*
+M`````````0````$```#9<0```````-@*`````````0````$```"'P0``````
+M`.`*`````````0````$```",P0```````.@*`````````0````$```"2P0``
+M`````/`*`````````0````$```"7P0```````/@*`````````0````$```#%
+MP0`````````+`````````0````$```#%P0````````@+`````````0````$`
+M``#%P0```````!`+`````````0````$```#%P0```````!@+`````````0``
+M``$```#%P0```````"`+`````````0````$```#%P0```````"@+````````
+M`0````$```#%P0```````#`+`````````0````$```#%P0```````#@+````
+M`````0````$```#%P0```````$`+`````````0````$```#%P0```````$@+
+M`````````0````$```#%P0```````%`+`````````0````$```#%P0``````
+M`%@+`````````0````$```"<P0```````&`+`````````0````$```"BP0``
+M`````&@+`````````0````$```"GP0```````'`+`````````0````$```"L
+MP0```````'@+`````````0````$```"RP0```````(`+`````````0````$`
+M``"WP0```````(@+`````````0````$```"\P0```````)`+`````````0``
+M``$```#"P0```````)@+`````````0````$````B%0$``````*`+````````
+M`0````$```"`%0$``````*@+`````````0````$```"Q%0$``````+`+````
+M`````0````$```#-%0$``````+@+`````````0````$```#I%0$``````,`+
+M`````````0````$````%%@$``````,@+`````````0````$````F%@$`````
+M`-`+`````````0````$```",%@$``````-@+`````````0````$```"Y%@$`
+M`````.`+`````````0````$```!<%P$``````.@+`````````0````$````3
+M%P$``````/`+`````````0````$````O%P$``````/@+`````````0````$`
+M``!X%P$````````,`````````0````$```!V&`$```````@,`````````0``
+M``$```"F&`$``````!`,`````````0````$```#,&`$``````!@,````````
+M`0````$`````&0$``````"`,`````````0````$````C&0$``````"@,````
+M`````0````$```!&&0$``````#`,`````````0````$```!2&0$``````#@,
+M`````````0````$```#;%@$``````$`,`````````0````$```#W%@$`````
+M`$@,`````````0````$```!(%@$``````%`,`````````0````$```!J%@$`
+M`````%@,`````````0````$````3%P$``````&`,`````````0````$```!9
+M&0$``````&@,`````````0````$```!`2P$``````'`,`````````0````$`
+M``!,10$``````'@,`````````0````$```":10$``````(`,`````````0``
+M``$````31@$``````(@,`````````0````$```"31@$``````)`,````````
+M`0````$```##1@$``````)@,`````````0````$```#-1@$``````*`,````
+M`````0````$```!`1P$``````*@,`````````0````$```!*1P$``````+`,
+M`````````0````$````[2@$``````+@,`````````0````$````(20$`````
+M`,`,`````````0````$```#\20$``````,@,`````````0````$```!`2P$`
+M`````-`,`````````0````$```!`2P$``````-@,`````````0````$```!`
+M2P$``````.`,`````````0````$```!`2P$``````.@,`````````0````$`
+M``!`2P$``````/`,`````````0````$```!`2P$``````/@,`````````0``
+M``$```!`2P$````````-`````````0````$```!`2P$```````@-````````
+M`0````$```!51P$``````!`-`````````0````$```!P1P$``````!@-````
+M`````0````$````"1P$``````"`-`````````0````$````V1P$``````"@-
+M`````````0````$````(20$``````#`-`````````0````$````W2P$`````
+M`#@-`````````0````$```!*30$``````$`-`````````0````$```!V4`$`
+M`````$@-`````````0````$```#U4`$``````%`-`````````0````$````T
+M40$``````%@-`````````0````$```!84@$``````&`-`````````0````$`
+M```D<@$``````&@-`````````0````$```!8<`$``````'`-`````````0``
+M``$```!A<`$``````'@-`````````0````$```!J<`$``````(`-````````
+M`0````$```!U<`$``````(@-`````````0````$```"I<`$``````)`-````
+M`````0````$```#`<`$``````)@-`````````0````$```#,<`$``````*`-
+M`````````0````$````!<0$``````*@-`````````0````$````5<0$`````
+M`+`-`````````0````$````I<0$``````+@-`````````0````$````]<0$`
+M`````,`-`````````0````$```!8<0$``````,@-`````````0````$```!D
+M<0$``````-`-`````````0````$```!P<0$``````-@-`````````0````$`
+M```D<@$``````.`-`````````0````$````D<@$``````.@-`````````0``
+M``$```"!<0$``````/`-`````````0````$```#2<0$``````/@-````````
+M`0````$````D<@$````````.`````````0````$````D<@$```````@.````
+M`````0````$```"9<0$``````!`.`````````0````$````'<@$``````!@.
+M`````````0````$```",<`$``````"`.`````````0````$```"8<`$`````
+M`"@.`````````0````$````D<@$``````#`.`````````0````$```#8<`$`
+M`````#@.`````````0````$```#D<`$``````$`.`````````0````$```#P
+M<`$``````(@.`````````0````$```!ROP$``````)`.`````````0````$`
+M``!ROP$``````)@.`````````0````$````7OP$``````*`.`````````0``
+M``$````GOP$``````*@.`````````0````$```!ROP$``````+`.````````
+M`0````$```!"OP$``````+@.`````````0````$`````OP$``````,`.````
+M`````0````$````WOP$``````,@.`````````0````$```!2OP$``````-`.
+M`````````0````$```!BOP$``````.`.`````````0````$````T[P$`````
+M`.@.`````````0````$```!@[P$``````/`.`````````0````$```#8[P$`
+M`````/@.`````````0````$```#8[P$````````/`````````0````$```#8
+M[P$```````@/`````````0````$```#8[P$``````!`/`````````0````$`
+M``"([P$``````!@/`````````0````$```"P[P$``````"`/`````````0``
+M``$```#8[P$``````"@/`````````0````$```#P[P$``````#`/````````
+M`0````$```!(^P$``````#@/`````````0````$```!(^P$``````$`/````
+M`````0````$```#;^@$``````$@/`````````0````$```#@^@$``````%`/
+M`````````0````$```!(^P$``````%@/`````````0````$```!(^P$`````
+M`&`/`````````0````$```!(^P$``````&@/`````````0````$```!(^P$`
+M`````'`/`````````0````$```!(^P$``````'@/`````````0````$```!(
+M^P$``````(`/`````````0````$```!(^P$``````(@/`````````0````$`
+M``!(^P$``````)`/`````````0````$```!(^P$``````)@/`````````0``
+M``$```!(^P$``````*`/`````````0````$```!(^P$``````*@/````````
+M`0````$```!(^P$``````+`/`````````0````$```#E^@$``````+@/````
+M`````0````$```#J^@$``````,`/`````````0````$```#R^@$``````,@/
+M`````````0````$```#W^@$``````-`/`````````0````$```#\^@$`````
+M`-@/`````````0````$````"^P$``````.`/`````````0````$````'^P$`
+M`````.@/`````````0````$````,^P$``````/`/`````````0````$```!(
+M^P$``````/@/`````````0````$```!(^P$````````0`````````0````$`
+M``!(^P$```````@0`````````0````$```!(^P$``````!`0`````````0``
+M``$```!(^P$``````!@0`````````0````$```!(^P$``````"`0````````
+M`0````$```!(^P$``````"@0`````````0````$```!(^P$``````#`0````
+M`````0````$```!(^P$``````#@0`````````0````$```!(^P$``````$`0
+M`````````0````$```!(^P$``````$@0`````````0````$```!(^P$`````
+M`%`0`````````0````$```!(^P$``````%@0`````````0````$```!(^P$`
+M`````&`0`````````0````$```!(^P$``````&@0`````````0````$```!(
+M^P$``````'`0`````````0````$```!(^P$``````'@0`````````0````$`
+M``!(^P$``````(`0`````````0````$```!(^P$``````(@0`````````0``
+M``$```!(^P$``````)`0`````````0````$```!(^P$``````)@0````````
+M`0````$```!(^P$``````*`0`````````0````$```!(^P$``````*@0````
+M`````0````$```!(^P$``````+`0`````````0````$```!(^P$``````+@0
+M`````````0````$```!(^P$``````,`0`````````0````$```!(^P$`````
+M`,@0`````````0````$```!(^P$``````-`0`````````0````$```!(^P$`
+M`````-@0`````````0````$```!(^P$``````.`0`````````0````$```!(
+M^P$``````.@0`````````0````$```!(^P$``````/`0`````````0````$`
+M``!(^P$``````/@0`````````0````$```!(^P$````````1`````````0``
+M``$```!(^P$```````@1`````````0````$```!(^P$``````!`1````````
+M`0````$```!(^P$``````!@1`````````0````$```!(^P$``````"`1````
+M`````0````$```!(^P$``````"@1`````````0````$```!(^P$``````#`1
+M`````````0````$```!(^P$``````#@1`````````0````$```!(^P$`````
+M`$`1`````````0````$```!(^P$``````$@1`````````0````$```!(^P$`
+M`````%`1`````````0````$```!(^P$``````%@1`````````0````$```!(
+M^P$``````&`1`````````0````$```!(^P$``````&@1`````````0````$`
+M``!(^P$``````'`1`````````0````$```!(^P$``````'@1`````````0``
+M``$```!(^P$``````(`1`````````0````$```!(^P$``````(@1````````
+M`0````$```!(^P$``````)`1`````````0````$```!(^P$``````)@1````
+M`````0````$```!(^P$``````*`1`````````0````$```!(^P$``````*@1
+M`````````0````$```!(^P$``````+`1`````````0````$```!(^P$`````
+M`+@1`````````0````$```!(^P$``````,`1`````````0````$```!(^P$`
+M`````,@1`````````0````$```!(^P$``````-`1`````````0````$```!(
+M^P$``````-@1`````````0````$```!(^P$``````.`1`````````0````$`
+M``!(^P$``````.@1`````````0````$```!(^P$``````/`1`````````0``
+M``$```!(^P$``````/@1`````````0````$```!(^P$````````2````````
+M`0````$```!(^P$```````@2`````````0````$```!(^P$``````!`2````
+M`````0````$```!(^P$``````!@2`````````0````$```!(^P$``````"`2
+M`````````0````$```!(^P$``````"@2`````````0````$```!(^P$`````
+M`#`2`````````0````$```!(^P$``````#@2`````````0````$```!(^P$`
+M`````$`2`````````0````$```!(^P$``````$@2`````````0````$```!(
+M^P$``````%`2`````````0````$```!(^P$``````%@2`````````0````$`
+M``!(^P$``````&`2`````````0````$```!(^P$``````&@2`````````0``
+M``$```!(^P$``````'`2`````````0````$```!(^P$``````'@2````````
+M`0````$```!(^P$``````(`2`````````0````$```!(^P$``````(@2````
+M`````0````$```!(^P$``````)`2`````````0````$```!(^P$``````)@2
+M`````````0````$```!(^P$``````*`2`````````0````$```!(^P$`````
+M`*@2`````````0````$```!(^P$``````+`2`````````0````$```!(^P$`
+M`````+@2`````````0````$```!(^P$``````,`2`````````0````$```!(
+M^P$``````,@2`````````0````$```!(^P$``````-`2`````````0````$`
+M``!(^P$``````-@2`````````0````$```!(^P$``````.`2`````````0``
+M``$```!(^P$``````.@2`````````0````$```!(^P$``````/`2````````
+M`0````$```!(^P$``````/@2`````````0````$```!(^P$````````3````
+M`````0````$```!(^P$```````@3`````````0````$```!(^P$``````!`3
+M`````````0````$```!(^P$``````!@3`````````0````$```!(^P$`````
+M`"`3`````````0````$```!(^P$``````"@3`````````0````$```!(^P$`
+M`````#`3`````````0````$````2^P$``````#@3`````````0````$````7
+M^P$``````$`3`````````0````$````<^P$``````$@3`````````0````$`
+M``!(^P$``````%`3`````````0````$```!(^P$``````%@3`````````0``
+M``$````I^P$``````&`3`````````0````$```!(^P$``````&@3````````
+M`0````$```!(^P$``````'`3`````````0````$```!(^P$``````'@3````
+M`````0````$```!(^P$``````(`3`````````0````$```!(^P$``````(@3
+M`````````0````$```!(^P$``````)`3`````````0````$```!(^P$`````
+M`)@3`````````0````$```!(^P$``````*`3`````````0````$```!(^P$`
+M`````*@3`````````0````$```!(^P$``````+`3`````````0````$````R
+M^P$``````+@3`````````0````$````W^P$``````,`3`````````0````$`
+M```\^P$``````,@3`````````0````$```!"^P$``````-`3`````````0``
+M``$```#8^P$``````-@3`````````0````$```#C^P$``````.`3````````
+M`0````$```#C^P$``````.@3`````````0````$```#C^P$``````/`3````
+M`````0````$```#C^P$``````/@3`````````0````$```#C^P$````````4
+M`````````0````$```#C^P$```````@4`````````0````$```#C^P$`````
+M`!`4`````````0````$```#C^P$``````!@4`````````0````$```#C^P$`
+M`````"`4`````````0````$```#C^P$``````"@4`````````0````$```#C
+M^P$``````#`4`````````0````$```#C^P$``````#@4`````````0````$`
+M``#C^P$``````$`4`````````0````$```#C^P$``````$@4`````````0``
+M``$```#C^P$``````%`4`````````0````$```#C^P$``````%@4````````
+M`0````$```#C^P$``````&`4`````````0````$```#C^P$``````&@4````
+M`````0````$```#C^P$``````'`4`````````0````$```#C^P$``````'@4
+M`````````0````$```#C^P$``````(`4`````````0````$```#C^P$`````
+M`(@4`````````0````$```#C^P$``````)`4`````````0````$```#C^P$`
+M`````)@4`````````0````$```#C^P$``````*`4`````````0````$```#C
+M^P$``````*@4`````````0````$```#C^P$``````+`4`````````0````$`
+M``#C^P$``````+@4`````````0````$```#C^P$``````,`4`````````0``
+M``$```#C^P$``````,@4`````````0````$```#C^P$``````-`4````````
+M`0````$```#C^P$``````-@4`````````0````$```#C^P$``````.`4````
+M`````0````$```#C^P$``````.@4`````````0````$```#C^P$``````/`4
+M`````````0````$```"M^P$``````/@4`````````0````$```#C^P$`````
+M```5`````````0````$```"M^P$```````@5`````````0````$```#C^P$`
+M`````!`5`````````0````$```#C^P$``````!@5`````````0````$```#C
+M^P$``````"`5`````````0````$```"M^P$``````"@5`````````0````$`
+M``"M^P$``````#`5`````````0````$```#C^P$``````#@5`````````0``
+M``$```#C^P$``````$`5`````````0````$```#C^P$``````$@5````````
+M`0````$```#C^P$``````%`5`````````0````$```#C^P$``````%@5````
+M`````0````$```#C^P$``````&`5`````````0````$```#C^P$``````&@5
+M`````````0````$```#C^P$``````'`5`````````0````$```#C^P$`````
+M`'@5`````````0````$```#C^P$``````(`5`````````0````$```#C^P$`
+M`````(@5`````````0````$```#C^P$``````)`5`````````0````$```#C
+M^P$``````)@5`````````0````$```#C^P$``````*`5`````````0````$`
+M``#C^P$``````*@5`````````0````$```#C^P$``````+`5`````````0``
+M``$```#C^P$``````+@5`````````0````$```"M^P$``````,`5````````
+M`0````$```#C^P$``````,@5`````````0````$```#C^P$``````-`5````
+M`````0````$```#C^P$``````-@5`````````0````$```#C^P$``````.`5
+M`````````0````$```#C^P$``````.@5`````````0````$```#C^P$`````
+M`/`5`````````0````$```#C^P$``````/@5`````````0````$```#C^P$`
+M```````6`````````0````$```#C^P$```````@6`````````0````$```#C
+M^P$``````!`6`````````0````$```#C^P$``````!@6`````````0````$`
+M``#C^P$``````"`6`````````0````$```#C^P$``````"@6`````````0``
+M``$```#C^P$``````#`6`````````0````$```"M^P$``````#@6````````
+M`0````$```"M^P$``````$`6`````````0````$```"M^P$``````$@6````
+M`````0````$```"M^P$``````%`6`````````0````$```#C^P$``````%@6
+M`````````0````$```#C^P$``````&`6`````````0````$```#C^P$`````
+M`&@6`````````0````$```#C^P$``````'`6`````````0````$```#C^P$`
+M`````'@6`````````0````$```#C^P$``````(`6`````````0````$```#C
+M^P$``````(@6`````````0````$```#C^P$``````)`6`````````0````$`
+M``#C^P$``````)@6`````````0````$```#C^P$``````*`6`````````0``
+M``$```#C^P$``````*@6`````````0````$```#C^P$``````+`6````````
+M`0````$```#C^P$``````+@6`````````0````$```#C^P$``````,`6````
+M`````0````$```#C^P$``````,@6`````````0````$```#C^P$``````-`6
+M`````````0````$```#C^P$``````-@6`````````0````$```#C^P$`````
+M`.`6`````````0````$```#C^P$``````.@6`````````0````$```#C^P$`
+M`````/`6`````````0````$```#C^P$``````/@6`````````0````$```#C
+M^P$````````7`````````0````$```#C^P$```````@7`````````0````$`
+M``#C^P$``````!`7`````````0````$```#C^P$``````!@7`````````0``
+M``$```#C^P$``````"`7`````````0````$```#C^P$``````"@7````````
+M`0````$```#C^P$``````#`7`````````0````$```#C^P$``````#@7````
+M`````0````$```#C^P$``````$`7`````````0````$```#C^P$``````$@7
+M`````````0````$```#C^P$``````%`7`````````0````$```#C^P$`````
+M`%@7`````````0````$```#C^P$``````&`7`````````0````$```#C^P$`
+M`````&@7`````````0````$```#C^P$``````'`7`````````0````$```#C
+M^P$``````'@7`````````0````$```#C^P$``````(`7`````````0````$`
+M``#C^P$``````(@7`````````0````$```#C^P$``````)`7`````````0``
+M``$```#C^P$``````)@7`````````0````$```#C^P$``````*`7````````
+M`0````$```#C^P$``````*@7`````````0````$```"M^P$``````+`7````
+M`````0````$```#C^P$``````+@7`````````0````$```#C^P$``````,`7
+M`````````0````$```#C^P$``````,@7`````````0````$```#C^P$`````
+M`-`7`````````0````$```#C^P$``````-@7`````````0````$```#C^P$`
+M`````.`7`````````0````$```#C^P$``````.@7`````````0````$```#C
+M^P$``````/`7`````````0````$```"M^P$``````/@7`````````0````$`
+M``#C^P$````````8`````````0````$```"M^P$```````@8`````````0``
+M``$```#C^P$``````!`8`````````0````$```#C^P$``````!@8````````
+M`0````$```#C^P$``````"`8`````````0````$```"M^P$``````"@8````
+M`````0````$```"M^P$``````#`8`````````0````$```#C^P$``````#@8
+M`````````0````$```#C^P$``````$`8`````````0````$```#C^P$`````
+M`$@8`````````0````$```"M^P$``````%`8`````````0````$```#C^P$`
+M`````%@8`````````0````$```#C^P$``````&`8`````````0````$```#C
+M^P$``````&@8`````````0````$```#C^P$``````'`8`````````0````$`
+M``#C^P$``````'@8`````````0````$```#C^P$``````(`8`````````0``
+M``$```#C^P$``````(@8`````````0````$```#C^P$``````)`8````````
+M`0````$```#C^P$``````)@8`````````0````$```#C^P$``````*`8````
+M`````0````$```#C^P$``````*@8`````````0````$```#C^P$``````+`8
+M`````````0````$```#C^P$``````+@8`````````0````$```#C^P$`````
+M`,`8`````````0````$```#C^P$``````,@8`````````0````$```#C^P$`
+M`````-`8`````````0````$```#C^P$``````-@8`````````0````$```#C
+M^P$``````.`8`````````0````$```#C^P$``````.@8`````````0````$`
+M``#C^P$``````/`8`````````0````$```"M^P$``````/@8`````````0``
+M``$```#C^P$````````9`````````0````$```"M^P$```````@9````````
+M`0````$```#C^P$``````!`9`````````0````$```#C^P$``````!@9````
+M`````0````$```#C^P$``````"`9`````````0````$```"M^P$``````"@9
+M`````````0````$```"M^P$``````#`9`````````0````$```!I`@(`````
+M`#@9`````````0````$```"%`@(``````$`9`````````0````$```"A`@(`
+M`````$@9`````````0````$```#V`@(``````%`9`````````0````$```!=
+M`P(``````%@9`````````0````$```"-.0(``````&`9`````````0````$`
+M```Y.0(``````&@9`````````0````$```!&.0(``````'`9`````````0``
+M``$```!O.0(``````'@9`````````0````$```"-.0(``````(`9````````
+M`0````$```"#.0(``````(@9`````````0````$```!Y.0(``````)`9````
+M`````0````$```"-.0(``````)@9`````````0````$```"-.0(``````*`9
+M`````````0````$```"-.0(``````*@9`````````0````$```"-.0(`````
+M`+`9`````````0````$```!Y.0(``````+@9`````````0````$````GB0(`
+M`````,`9`````````0````$````LB0(``````,@9`````````0````$````R
+MB0(``````-`9`````````0````$````WB0(``````-@9`````````0````$`
+M``!EB0(``````.`9`````````0````$```!EB0(``````.@9`````````0``
+M``$```!EB0(``````/`9`````````0````$```!EB0(``````/@9````````
+M`0````$```!EB0(````````:`````````0````$```!EB0(```````@:````
+M`````0````$```!EB0(``````!`:`````````0````$```!EB0(``````!@:
+M`````````0````$```!EB0(``````"`:`````````0````$```!EB0(`````
+M`"@:`````````0````$```!EB0(``````#`:`````````0````$```!EB0(`
+M`````#@:`````````0````$````\B0(``````$`:`````````0````$```!"
+MB0(``````$@:`````````0````$```!'B0(``````%`:`````````0````$`
+M``!,B0(``````%@:`````````0````$```!2B0(``````&`:`````````0``
+M``$```!7B0(``````&@:`````````0````$```!<B0(``````'`:````````
+M`0````$```!BB0(``````'@:`````````0````$```#"W`(``````(`:````
+M`````0````$````@W0(``````(@:`````````0````$```!1W0(``````)`:
+M`````````0````$```!MW0(``````)@:`````````0````$```")W0(`````
+M`*`:`````````0````$```"EW0(``````*@:`````````0````$```#&W0(`
+M`````+`:`````````0````$````LW@(``````+@:`````````0````$```!9
+MW@(``````,`:`````````0````$```#\W@(``````,@:`````````0````$`
+M``"SW@(``````-`:`````````0````$```#/W@(``````-@:`````````0``
+M``$````8WP(``````.`:`````````0````$````6X`(``````.@:````````
+M`0````$```!&X`(``````/`:`````````0````$```!LX`(``````/@:````
+M`````0````$```"@X`(````````;`````````0````$```##X`(```````@;
+M`````````0````$```#FX`(``````!`;`````````0````$```#RX`(`````
+M`!@;`````````0````$```![W@(``````"`;`````````0````$```"7W@(`
+M`````"@;`````````0````$```#HW0(``````#`;`````````0````$````*
+MW@(``````#@;`````````0````$```"SW@(``````$`;`````````0````$`
+M``#YX`(``````$@;`````````0````$```#@$@,``````%`;`````````0``
+M``$```#L#`,``````%@;`````````0````$````Z#0,``````&`;````````
+M`0````$```"S#0,``````&@;`````````0````$````S#@,``````'`;````
+M`````0````$```!C#@,``````'@;`````````0````$```!M#@,``````(`;
+M`````````0````$```#@#@,``````(@;`````````0````$```#J#@,`````
+M`)`;`````````0````$```#;$0,``````)@;`````````0````$```"H$`,`
+M`````*`;`````````0````$```"<$0,``````*@;`````````0````$```#@
+M$@,``````+`;`````````0````$```#@$@,``````+@;`````````0````$`
+M``#@$@,``````,`;`````````0````$```#@$@,``````,@;`````````0``
+M``$```#@$@,``````-`;`````````0````$```#@$@,``````-@;````````
+M`0````$```#@$@,``````.`;`````````0````$```#@$@,``````.@;````
+M`````0````$```#U#@,``````/`;`````````0````$````0#P,``````/@;
+M`````````0````$```"B#@,````````<`````````0````$```#6#@,`````
+M``@<`````````0````$```"H$`,``````!`<`````````0````$```#7$@,`
+M`````!@<`````````0````$```#J%`,``````"`<`````````0````$````6
+M&`,``````"@<`````````0````$```"5&`,``````#`<`````````0````$`
+M``#4&`,``````#@<`````````0````$```#X&0,``````$`<`````````0``
+M``$```"T.@,``````$@<`````````0````$```#H.`,``````%`<````````
+M`0````$```#Q.`,``````%@<`````````0````$```#Z.`,``````&`<````
+M`````0````$````%.0,``````&@<`````````0````$````Y.0,``````'`<
+M`````````0````$```!0.0,``````'@<`````````0````$```!<.0,`````
+M`(`<`````````0````$```"1.0,``````(@<`````````0````$```"E.0,`
+M`````)`<`````````0````$```"Y.0,``````)@<`````````0````$```#-
+M.0,``````*`<`````````0````$```#H.0,``````*@<`````````0````$`
+M``#T.0,``````+`<`````````0````$`````.@,``````+@<`````````0``
+M``$```"T.@,``````,`<`````````0````$```"T.@,``````,@<````````
+M`0````$````1.@,``````-`<`````````0````$```!B.@,``````-@<````
+M`````0````$```"T.@,``````.`<`````````0````$```"T.@,``````.@<
+M`````````0````$````I.@,``````/`<`````````0````$```"7.@,`````
+M`/@<`````````0````$````<.0,````````=`````````0````$````H.0,`
+M``````@=`````````0````$```"T.@,``````!`=`````````0````$```!H
+M.0,``````!@=`````````0````$```!T.0,``````"`=`````````0````$`
+M``"`.0,``````%`=`````````0````$```#2C0,``````%@=`````````0``
+M``$```#2C0,``````&`=`````````0````$```!WC0,``````&@=````````
+M`0````$```"'C0,``````'`=`````````0````$```#2C0,``````'@=````
+M`````0````$```"BC0,``````(`=`````````0````$```!@C0,``````(@=
+M`````````0````$```"7C0,``````)`=`````````0````$```"RC0,`````
+M`)@=`````````0````$```#"C0,``````*`=`````````0````$```"4O0,`
+M`````*@=`````````0````$```#`O0,``````+`=`````````0````$````X
+MO@,``````+@=`````````0````$````XO@,``````,`=`````````0````$`
+M```XO@,``````,@=`````````0````$````XO@,``````-`=`````````0``
+M``$```#HO0,``````-@=`````````0````$````0O@,``````.`=````````
+M`0````$````XO@,``````.@=`````````0````$```!0O@,``````/`=````
+M`````0````$```"HR0,``````/@=`````````0````$```"HR0,````````>
+M`````````0````$````[R0,```````@>`````````0````$```!`R0,`````
+M`!`>`````````0````$```"HR0,``````!@>`````````0````$```"HR0,`
+M`````"`>`````````0````$```"HR0,``````"@>`````````0````$```"H
+MR0,``````#`>`````````0````$```"HR0,``````#@>`````````0````$`
+M``"HR0,``````$`>`````````0````$```"HR0,``````$@>`````````0``
+M``$```"HR0,``````%`>`````````0````$```"HR0,``````%@>````````
+M`0````$```"HR0,``````&`>`````````0````$```"HR0,``````&@>````
+M`````0````$```"HR0,``````'`>`````````0````$```!%R0,``````'@>
+M`````````0````$```!*R0,``````(`>`````````0````$```!2R0,`````
+M`(@>`````````0````$```!7R0,``````)`>`````````0````$```!<R0,`
+M`````)@>`````````0````$```!BR0,``````*`>`````````0````$```!G
+MR0,``````*@>`````````0````$```!LR0,``````+`>`````````0````$`
+M``"HR0,``````+@>`````````0````$```"HR0,``````,`>`````````0``
+M``$```"HR0,``````,@>`````````0````$```"HR0,``````-`>````````
+M`0````$```"HR0,``````-@>`````````0````$```"HR0,``````.`>````
+M`````0````$```"HR0,``````.@>`````````0````$```"HR0,``````/`>
+M`````````0````$```"HR0,``````/@>`````````0````$```"HR0,`````
+M```?`````````0````$```"HR0,```````@?`````````0````$```"HR0,`
+M`````!`?`````````0````$```"HR0,``````!@?`````````0````$```"H
+MR0,``````"`?`````````0````$```"HR0,``````"@?`````````0````$`
+M``"HR0,``````#`?`````````0````$```"HR0,``````#@?`````````0``
+M``$```"HR0,``````$`?`````````0````$```"HR0,``````$@?````````
+M`0````$```"HR0,``````%`?`````````0````$```"HR0,``````%@?````
+M`````0````$```"HR0,``````&`?`````````0````$```"HR0,``````&@?
+M`````````0````$```"HR0,``````'`?`````````0````$```"HR0,`````
+M`'@?`````````0````$```"HR0,``````(`?`````````0````$```"HR0,`
+M`````(@?`````````0````$```"HR0,``````)`?`````````0````$```"H
+MR0,``````)@?`````````0````$```"HR0,``````*`?`````````0````$`
+M``"HR0,``````*@?`````````0````$```"HR0,``````+`?`````````0``
+M``$```"HR0,``````+@?`````````0````$```"HR0,``````,`?````````
+M`0````$```"HR0,``````,@?`````````0````$```"HR0,``````-`?````
+M`````0````$```"HR0,``````-@?`````````0````$```"HR0,``````.`?
+M`````````0````$```"HR0,``````.@?`````````0````$```"HR0,`````
+M`/`?`````````0````$```"HR0,``````/@?`````````0````$```"HR0,`
+M```````@`````````0````$```"HR0,```````@@`````````0````$```"H
+MR0,``````!`@`````````0````$```"HR0,``````!@@`````````0````$`
+M``"HR0,``````"`@`````````0````$```"HR0,``````"@@`````````0``
+M``$```"HR0,``````#`@`````````0````$```"HR0,``````#@@````````
+M`0````$```"HR0,``````$`@`````````0````$```"HR0,``````$@@````
+M`````0````$```"HR0,``````%`@`````````0````$```"HR0,``````%@@
+M`````````0````$```"HR0,``````&`@`````````0````$```"HR0,`````
+M`&@@`````````0````$```"HR0,``````'`@`````````0````$```"HR0,`
+M`````'@@`````````0````$```"HR0,``````(`@`````````0````$```"H
+MR0,``````(@@`````````0````$```"HR0,``````)`@`````````0````$`
+M``"HR0,``````)@@`````````0````$```"HR0,``````*`@`````````0``
+M``$```"HR0,``````*@@`````````0````$```"HR0,``````+`@````````
+M`0````$```"HR0,``````+@@`````````0````$```"HR0,``````,`@````
+M`````0````$```"HR0,``````,@@`````````0````$```"HR0,``````-`@
+M`````````0````$```"HR0,``````-@@`````````0````$```"HR0,`````
+M`.`@`````````0````$```"HR0,``````.@@`````````0````$```"HR0,`
+M`````/`@`````````0````$```"HR0,``````/@@`````````0````$```"H
+MR0,````````A`````````0````$```"HR0,```````@A`````````0````$`
+M``"HR0,``````!`A`````````0````$```"HR0,``````!@A`````````0``
+M``$```"HR0,``````"`A`````````0````$```"HR0,``````"@A````````
+M`0````$```"HR0,``````#`A`````````0````$```"HR0,``````#@A````
+M`````0````$```"HR0,``````$`A`````````0````$```"HR0,``````$@A
+M`````````0````$```"HR0,``````%`A`````````0````$```"HR0,`````
+M`%@A`````````0````$```"HR0,``````&`A`````````0````$```"HR0,`
+M`````&@A`````````0````$```"HR0,``````'`A`````````0````$```"H
+MR0,``````'@A`````````0````$```"HR0,``````(`A`````````0````$`
+M``"HR0,``````(@A`````````0````$```"HR0,``````)`A`````````0``
+M``$```"HR0,``````)@A`````````0````$```"HR0,``````*`A````````
+M`0````$```"HR0,``````*@A`````````0````$```"HR0,``````+`A````
+M`````0````$```"HR0,``````+@A`````````0````$```"HR0,``````,`A
+M`````````0````$```"HR0,``````,@A`````````0````$```"HR0,`````
+M`-`A`````````0````$```"HR0,``````-@A`````````0````$```"HR0,`
+M`````.`A`````````0````$```"HR0,``````.@A`````````0````$```"H
+MR0,``````/`A`````````0````$```!RR0,``````/@A`````````0````$`
+M``!WR0,````````B`````````0````$```!\R0,```````@B`````````0``
+M``$```"HR0,``````!`B`````````0````$```"HR0,``````!@B````````
+M`0````$```")R0,``````"`B`````````0````$```"HR0,``````"@B````
+M`````0````$```"HR0,``````#`B`````````0````$```"HR0,``````#@B
+M`````````0````$```"HR0,``````$`B`````````0````$```"HR0,`````
+M`$@B`````````0````$```"HR0,``````%`B`````````0````$```"HR0,`
+M`````%@B`````````0````$```"HR0,``````&`B`````````0````$```"H
+MR0,``````&@B`````````0````$```"HR0,``````'`B`````````0````$`
+M``"2R0,``````'@B`````````0````$```"7R0,``````(`B`````````0``
+M``$```"<R0,``````(@B`````````0````$```"BR0,``````)`B````````
+M`0````$````XR@,``````)@B`````````0````$```!#R@,``````*`B````
+M`````0````$```!#R@,``````*@B`````````0````$```!#R@,``````+`B
+M`````````0````$```!#R@,``````+@B`````````0````$```!#R@,`````
+M`,`B`````````0````$```!#R@,``````,@B`````````0````$```!#R@,`
+M`````-`B`````````0````$```!#R@,``````-@B`````````0````$```!#
+MR@,``````.`B`````````0````$```!#R@,``````.@B`````````0````$`
+M``!#R@,``````/`B`````````0````$```!#R@,``````/@B`````````0``
+M``$```!#R@,````````C`````````0````$```!#R@,```````@C````````
+M`0````$```!#R@,``````!`C`````````0````$```!#R@,``````!@C````
+M`````0````$```!#R@,``````"`C`````````0````$```!#R@,``````"@C
+M`````````0````$```!#R@,``````#`C`````````0````$```!#R@,`````
+M`#@C`````````0````$```!#R@,``````$`C`````````0````$```!#R@,`
+M`````$@C`````````0````$```!#R@,``````%`C`````````0````$```!#
+MR@,``````%@C`````````0````$```!#R@,``````&`C`````````0````$`
+M``!#R@,``````&@C`````````0````$```!#R@,``````'`C`````````0``
+M``$```!#R@,``````'@C`````````0````$```!#R@,``````(`C````````
+M`0````$```!#R@,``````(@C`````````0````$```!#R@,``````)`C````
+M`````0````$```!#R@,``````)@C`````````0````$```!#R@,``````*`C
+M`````````0````$```!#R@,``````*@C`````````0````$```!#R@,`````
+M`+`C`````````0````$````-R@,``````+@C`````````0````$```!#R@,`
+M`````,`C`````````0````$````-R@,``````,@C`````````0````$```!#
+MR@,``````-`C`````````0````$```!#R@,``````-@C`````````0````$`
+M``!#R@,``````.`C`````````0````$````-R@,``````.@C`````````0``
+M``$````-R@,``````/`C`````````0````$```!#R@,``````/@C````````
+M`0````$```!#R@,````````D`````````0````$```!#R@,```````@D````
+M`````0````$```!#R@,``````!`D`````````0````$```!#R@,``````!@D
+M`````````0````$```!#R@,``````"`D`````````0````$```!#R@,`````
+M`"@D`````````0````$```!#R@,``````#`D`````````0````$```!#R@,`
+M`````#@D`````````0````$```!#R@,``````$`D`````````0````$```!#
+MR@,``````$@D`````````0````$```!#R@,``````%`D`````````0````$`
+M``!#R@,``````%@D`````````0````$```!#R@,``````&`D`````````0``
+M``$```!#R@,``````&@D`````````0````$```!#R@,``````'`D````````
+M`0````$```!#R@,``````'@D`````````0````$````-R@,``````(`D````
+M`````0````$```!#R@,``````(@D`````````0````$```!#R@,``````)`D
+M`````````0````$```!#R@,``````)@D`````````0````$```!#R@,`````
+M`*`D`````````0````$```!#R@,``````*@D`````````0````$```!#R@,`
+M`````+`D`````````0````$```!#R@,``````+@D`````````0````$```!#
+MR@,``````,`D`````````0````$```!#R@,``````,@D`````````0````$`
+M``!#R@,``````-`D`````````0````$```!#R@,``````-@D`````````0``
+M``$```!#R@,``````.`D`````````0````$```!#R@,``````.@D````````
+M`0````$```!#R@,``````/`D`````````0````$````-R@,``````/@D````
+M`````0````$````-R@,````````E`````````0````$````-R@,```````@E
+M`````````0````$````-R@,``````!`E`````````0````$```!#R@,`````
+M`!@E`````````0````$```!#R@,``````"`E`````````0````$```!#R@,`
+M`````"@E`````````0````$```!#R@,``````#`E`````````0````$```!#
+MR@,``````#@E`````````0````$```!#R@,``````$`E`````````0````$`
+M``!#R@,``````$@E`````````0````$```!#R@,``````%`E`````````0``
+M``$```!#R@,``````%@E`````````0````$```!#R@,``````&`E````````
+M`0````$```!#R@,``````&@E`````````0````$```!#R@,``````'`E````
+M`````0````$```!#R@,``````'@E`````````0````$```!#R@,``````(`E
+M`````````0````$```!#R@,``````(@E`````````0````$```!#R@,`````
+M`)`E`````````0````$```!#R@,``````)@E`````````0````$```!#R@,`
+M`````*`E`````````0````$```!#R@,``````*@E`````````0````$```!#
+MR@,``````+`E`````````0````$```!#R@,``````+@E`````````0````$`
+M``!#R@,``````,`E`````````0````$```!#R@,``````,@E`````````0``
+M``$```!#R@,``````-`E`````````0````$```!#R@,``````-@E````````
+M`0````$```!#R@,``````.`E`````````0````$```!#R@,``````.@E````
+M`````0````$```!#R@,``````/`E`````````0````$```!#R@,``````/@E
+M`````````0````$```!#R@,````````F`````````0````$```!#R@,`````
+M``@F`````````0````$```!#R@,``````!`F`````````0````$```!#R@,`
+M`````!@F`````````0````$```!#R@,``````"`F`````````0````$```!#
+MR@,``````"@F`````````0````$```!#R@,``````#`F`````````0````$`
+M``!#R@,``````#@F`````````0````$```!#R@,``````$`F`````````0``
+M``$```!#R@,``````$@F`````````0````$```!#R@,``````%`F````````
+M`0````$```!#R@,``````%@F`````````0````$```!#R@,``````&`F````
+M`````0````$```!#R@,``````&@F`````````0````$````-R@,``````'`F
+M`````````0````$```!#R@,``````'@F`````````0````$```!#R@,`````
+M`(`F`````````0````$```!#R@,``````(@F`````````0````$```!#R@,`
+M`````)`F`````````0````$```!#R@,``````)@F`````````0````$```!#
+MR@,``````*`F`````````0````$```!#R@,``````*@F`````````0````$`
+M``!#R@,``````+`F`````````0````$````-R@,``````+@F`````````0``
+M``$```!#R@,``````,`F`````````0````$````-R@,``````,@F````````
+M`0````$```!#R@,``````-`F`````````0````$```!#R@,``````-@F````
+M`````0````$```!#R@,``````.`F`````````0````$````-R@,``````.@F
+M`````````0````$````-R@,``````/`F`````````0````$```!#R@,`````
+M`/@F`````````0````$```!#R@,````````G`````````0````$```!#R@,`
+M``````@G`````````0````$````-R@,``````!`G`````````0````$```!#
+MR@,``````!@G`````````0````$```!#R@,``````"`G`````````0````$`
+M``!#R@,``````"@G`````````0````$```!#R@,``````#`G`````````0``
+M``$```!#R@,``````#@G`````````0````$```!#R@,``````$`G````````
+M`0````$```!#R@,``````$@G`````````0````$```!#R@,``````%`G````
+M`````0````$```!#R@,``````%@G`````````0````$```!#R@,``````&`G
+M`````````0````$```!#R@,``````&@G`````````0````$```!#R@,`````
+M`'`G`````````0````$```!#R@,``````'@G`````````0````$```!#R@,`
+M`````(`G`````````0````$```!#R@,``````(@G`````````0````$```!#
+MR@,``````)`G`````````0````$```!#R@,``````)@G`````````0````$`
+M``!#R@,``````*`G`````````0````$```!#R@,``````*@G`````````0``
+M``$```!#R@,``````+`G`````````0````$````-R@,``````+@G````````
+M`0````$```!#R@,``````,`G`````````0````$````-R@,``````,@G````
+M`````0````$```!#R@,``````-`G`````````0````$```!#R@,``````-@G
+M`````````0````$```!#R@,``````.`G`````````0````$````-R@,`````
+M`.@G`````````0````$````-R@,``````/`G`````````0````$```#)T`,`
+M`````/@G`````````0````$```#ET`,````````H`````````0````$````!
+MT0,```````@H`````````0````$```!6T0,``````!`H`````````0````$`
+M``"]T0,``````!@H`````````0````$```#M!P0``````"`H`````````0``
+M``$```"9!P0``````"@H`````````0````$```"F!P0``````#`H````````
+M`0````$```#/!P0``````#@H`````````0````$```#M!P0``````$`H````
+M`````0````$```#C!P0``````$@H`````````0````$```#9!P0``````%`H
+M`````````0````$```#M!P0``````%@H`````````0````$```#M!P0`````
+M`&`H`````````0````$```#M!P0``````&@H`````````0````$```#M!P0`
+M`````'`H`````````0````$```#9!P0``````'@H`````````0````$```"'
+M5P0``````(`H`````````0````$```",5P0``````(@H`````````0````$`
+M``"25P0``````)`H`````````0````$```"75P0``````)@H`````````0``
+M``$```#%5P0``````*`H`````````0````$```#%5P0``````*@H````````
+M`0````$```#%5P0``````+`H`````````0````$```#%5P0``````+@H````
+M`````0````$```#%5P0``````,`H`````````0````$```#%5P0``````,@H
+M`````````0````$```#%5P0``````-`H`````````0````$```#%5P0`````
+M`-@H`````````0````$```#%5P0``````.`H`````````0````$```#%5P0`
+M`````.@H`````````0````$```#%5P0``````/`H`````````0````$```#%
+M5P0``````/@H`````````0````$```"<5P0````````I`````````0````$`
+M``"B5P0```````@I`````````0````$```"G5P0``````!`I`````````0``
+M``$```"L5P0``````!@I`````````0````$```"R5P0``````"`I````````
+M`0````$```"W5P0``````"@I`````````0````$```"\5P0``````#`I````
+M`````0````$```#"5P0``````#@I`````````0````$````BJP0``````$`I
+M`````````0````$```"`JP0``````$@I`````````0````$```"QJP0`````
+M`%`I`````````0````$```#-JP0``````%@I`````````0````$```#IJP0`
+M`````&`I`````````0````$````%K`0``````&@I`````````0````$````F
+MK`0``````'`I`````````0````$```",K`0``````'@I`````````0````$`
+M``"YK`0``````(`I`````````0````$```!<K00``````(@I`````````0``
+M``$````3K00``````)`I`````````0````$````OK00``````)@I````````
+M`0````$```!XK00``````*`I`````````0````$```!VK@0``````*@I````
+M`````0````$```"FK@0``````+`I`````````0````$```#,K@0``````+@I
+M`````````0````$`````KP0``````,`I`````````0````$````CKP0`````
+M`,@I`````````0````$```!&KP0``````-`I`````````0````$```!2KP0`
+M`````-@I`````````0````$```#;K`0``````.`I`````````0````$```#W
+MK`0``````.@I`````````0````$```!(K`0``````/`I`````````0````$`
+M``!JK`0``````/@I`````````0````$````3K00````````J`````````0``
+M``$```!9KP0```````@J`````````0````$```!`X00``````!`J````````
+M`0````$```!,VP0``````!@J`````````0````$```":VP0``````"`J````
+M`````0````$````3W`0``````"@J`````````0````$```"3W`0``````#`J
+M`````````0````$```##W`0``````#@J`````````0````$```#-W`0`````
+M`$`J`````````0````$```!`W00``````$@J`````````0````$```!*W00`
+M`````%`J`````````0````$````[X`0``````%@J`````````0````$````(
+MWP0``````&`J`````````0````$```#\WP0``````&@J`````````0````$`
+M``!`X00``````'`J`````````0````$```!`X00``````'@J`````````0``
+M``$```!`X00``````(`J`````````0````$```!`X00``````(@J````````
+M`0````$```!`X00``````)`J`````````0````$```!`X00``````)@J````
+M`````0````$```!`X00``````*`J`````````0````$```!`X00``````*@J
+M`````````0````$```!5W00``````+`J`````````0````$```!PW00`````
+M`+@J`````````0````$````"W00``````,`J`````````0````$````VW00`
+M`````,@J`````````0````$````(WP0``````-`J`````````0````$````W
+MX00``````-@J`````````0````$```!*XP0``````.`J`````````0````$`
+M``!VY@0``````.@J`````````0````$```#UY@0``````/`J`````````0``
+M``$````TYP0``````/@J`````````0````$```!8Z`0````````K````````
+M`0````$````4"04```````@K`````````0````$```!(!P4``````!`K````
+M`````0````$```!1!P4``````!@K`````````0````$```!:!P4``````"`K
+M`````````0````$```!E!P4``````"@K`````````0````$```"9!P4`````
+M`#`K`````````0````$```"P!P4``````#@K`````````0````$```"\!P4`
+M`````$`K`````````0````$```#Q!P4``````$@K`````````0````$````%
+M"`4``````%`K`````````0````$````9"`4``````%@K`````````0````$`
+M```M"`4``````&`K`````````0````$```!("`4``````&@K`````````0``
+M``$```!4"`4``````'`K`````````0````$```!@"`4``````'@K````````
+M`0````$````4"04``````(`K`````````0````$````4"04``````(@K````
+M`````0````$```!Q"`4``````)`K`````````0````$```#""`4``````)@K
+M`````````0````$````4"04``````*`K`````````0````$````4"04`````
+M`*@K`````````0````$```")"`4``````+`K`````````0````$```#W"`4`
+M`````+@K`````````0````$```!\!P4``````,`K`````````0````$```"(
+M!P4``````,@K`````````0````$````4"04``````-`K`````````0````$`
+M``#(!P4``````-@K`````````0````$```#4!P4``````.`K`````````0``
+M``$```#@!P4``````!`L`````````0````$```#R6P4``````!@L````````
+M`0````$```#R6P4``````"`L`````````0````$```"76P4``````"@L````
+M`````0````$```"G6P4``````#`L`````````0````$```#R6P4``````#@L
+M`````````0````$```#"6P4``````$`L`````````0````$```"`6P4`````
+M`$@L`````````0````$```"W6P4``````%`L`````````0````$```#26P4`
+M`````%@L`````````0````$```#B6P4``````&`L`````````0````$```"T
+MBP4``````&@L`````````0````$```#@BP4``````'`L`````````0````$`
+M``!8C`4``````'@L`````````0````$```!8C`4``````(`L`````````0``
+M``$```!8C`4``````(@L`````````0````$```!8C`4``````)`L````````
+M`0````$````(C`4``````)@L`````````0````$````PC`4``````*`L````
+M`````0````$```!8C`4``````*@L`````````0````$```!PC`4``````+`L
+M`````````0````$```#(EP4``````+@L`````````0````$```#(EP4`````
+M`,`L`````````0````$```!;EP4``````,@L`````````0````$```!@EP4`
+M`````-`L`````````0````$```#(EP4``````-@L`````````0````$```#(
+MEP4``````.`L`````````0````$```#(EP4``````.@L`````````0````$`
+M``#(EP4``````/`L`````````0````$```#(EP4``````/@L`````````0``
+M``$```#(EP4````````M`````````0````$```#(EP4```````@M````````
+M`0````$```#(EP4``````!`M`````````0````$```#(EP4``````!@M````
+M`````0````$```#(EP4``````"`M`````````0````$```#(EP4``````"@M
+M`````````0````$```#(EP4``````#`M`````````0````$```!EEP4`````
+M`#@M`````````0````$```!JEP4``````$`M`````````0````$```!REP4`
+M`````$@M`````````0````$```!WEP4``````%`M`````````0````$```!\
+MEP4``````%@M`````````0````$```""EP4``````&`M`````````0````$`
+M``"'EP4``````&@M`````````0````$```",EP4``````'`M`````````0``
+M``$```#(EP4``````'@M`````````0````$```#(EP4``````(`M````````
+M`0````$```#(EP4``````(@M`````````0````$```#(EP4``````)`M````
+M`````0````$```#(EP4``````)@M`````````0````$```#(EP4``````*`M
+M`````````0````$```#(EP4``````*@M`````````0````$```#(EP4`````
+M`+`M`````````0````$```#(EP4``````+@M`````````0````$```#(EP4`
+M`````,`M`````````0````$```#(EP4``````,@M`````````0````$```#(
+MEP4``````-`M`````````0````$```#(EP4``````-@M`````````0````$`
+M``#(EP4``````.`M`````````0````$```#(EP4``````.@M`````````0``
+M``$```#(EP4``````/`M`````````0````$```#(EP4``````/@M````````
+M`0````$```#(EP4````````N`````````0````$```#(EP4```````@N````
+M`````0````$```#(EP4``````!`N`````````0````$```#(EP4``````!@N
+M`````````0````$```#(EP4``````"`N`````````0````$```#(EP4`````
+M`"@N`````````0````$```#(EP4``````#`N`````````0````$```#(EP4`
+M`````#@N`````````0````$```#(EP4``````$`N`````````0````$```#(
+MEP4``````$@N`````````0````$```#(EP4``````%`N`````````0````$`
+M``#(EP4``````%@N`````````0````$```#(EP4``````&`N`````````0``
+M``$```#(EP4``````&@N`````````0````$```#(EP4``````'`N````````
+M`0````$```#(EP4``````'@N`````````0````$```#(EP4``````(`N````
+M`````0````$```#(EP4``````(@N`````````0````$```#(EP4``````)`N
+M`````````0````$```#(EP4``````)@N`````````0````$```#(EP4`````
+M`*`N`````````0````$```#(EP4``````*@N`````````0````$```#(EP4`
+M`````+`N`````````0````$```#(EP4``````+@N`````````0````$```#(
+MEP4``````,`N`````````0````$```#(EP4``````,@N`````````0````$`
+M``#(EP4``````-`N`````````0````$```#(EP4``````-@N`````````0``
+M``$```#(EP4``````.`N`````````0````$```#(EP4``````.@N````````
+M`0````$```#(EP4``````/`N`````````0````$```#(EP4``````/@N````
+M`````0````$```#(EP4````````O`````````0````$```#(EP4```````@O
+M`````````0````$```#(EP4``````!`O`````````0````$```#(EP4`````
+M`!@O`````````0````$```#(EP4``````"`O`````````0````$```#(EP4`
+M`````"@O`````````0````$```#(EP4``````#`O`````````0````$```#(
+MEP4``````#@O`````````0````$```#(EP4``````$`O`````````0````$`
+M``#(EP4``````$@O`````````0````$```#(EP4``````%`O`````````0``
+M``$```#(EP4``````%@O`````````0````$```#(EP4``````&`O````````
+M`0````$```#(EP4``````&@O`````````0````$```#(EP4``````'`O````
+M`````0````$```#(EP4``````'@O`````````0````$```#(EP4``````(`O
+M`````````0````$```#(EP4``````(@O`````````0````$```#(EP4`````
+M`)`O`````````0````$```#(EP4``````)@O`````````0````$```#(EP4`
+M`````*`O`````````0````$```#(EP4``````*@O`````````0````$```#(
+MEP4``````+`O`````````0````$```#(EP4``````+@O`````````0````$`
+M``#(EP4``````,`O`````````0````$```#(EP4``````,@O`````````0``
+M``$```#(EP4``````-`O`````````0````$```#(EP4``````-@O````````
+M`0````$```#(EP4``````.`O`````````0````$```#(EP4``````.@O````
+M`````0````$```#(EP4``````/`O`````````0````$```#(EP4``````/@O
+M`````````0````$```#(EP4````````P`````````0````$```#(EP4`````
+M``@P`````````0````$```#(EP4``````!`P`````````0````$```#(EP4`
+M`````!@P`````````0````$```#(EP4``````"`P`````````0````$```#(
+MEP4``````"@P`````````0````$```#(EP4``````#`P`````````0````$`
+M``#(EP4``````#@P`````````0````$```#(EP4``````$`P`````````0``
+M``$```#(EP4``````$@P`````````0````$```#(EP4``````%`P````````
+M`0````$```#(EP4``````%@P`````````0````$```#(EP4``````&`P````
+M`````0````$```#(EP4``````&@P`````````0````$```#(EP4``````'`P
+M`````````0````$```#(EP4``````'@P`````````0````$```#(EP4`````
+M`(`P`````````0````$```#(EP4``````(@P`````````0````$```#(EP4`
+M`````)`P`````````0````$```#(EP4``````)@P`````````0````$```#(
+MEP4``````*`P`````````0````$```#(EP4``````*@P`````````0````$`
+M``#(EP4``````+`P`````````0````$```"2EP4``````+@P`````````0``
+M``$```"7EP4``````,`P`````````0````$```"<EP4``````,@P````````
+M`0````$```#(EP4``````-`P`````````0````$```#(EP4``````-@P````
+M`````0````$```"IEP4``````.`P`````````0````$```#(EP4``````.@P
+M`````````0````$```#(EP4``````/`P`````````0````$```#(EP4`````
+M`/@P`````````0````$```#(EP4````````Q`````````0````$```#(EP4`
+M``````@Q`````````0````$```#(EP4``````!`Q`````````0````$```#(
+MEP4``````!@Q`````````0````$```#(EP4``````"`Q`````````0````$`
+M``#(EP4``````"@Q`````````0````$```#(EP4``````#`Q`````````0``
+M``$```"REP4``````#@Q`````````0````$```"WEP4``````$`Q````````
+M`0````$```"\EP4``````$@Q`````````0````$```#"EP4``````%`Q````
+M`````0````$```!8F`4``````%@Q`````````0````$```!CF`4``````&`Q
+M`````````0````$```!CF`4``````&@Q`````````0````$```!CF`4`````
+M`'`Q`````````0````$```!CF`4``````'@Q`````````0````$```!CF`4`
+M`````(`Q`````````0````$```!CF`4``````(@Q`````````0````$```!C
+MF`4``````)`Q`````````0````$```!CF`4``````)@Q`````````0````$`
+M``!CF`4``````*`Q`````````0````$```!CF`4``````*@Q`````````0``
+M``$```!CF`4``````+`Q`````````0````$```!CF`4``````+@Q````````
+M`0````$```!CF`4``````,`Q`````````0````$```!CF`4``````,@Q````
+M`````0````$```!CF`4``````-`Q`````````0````$```!CF`4``````-@Q
+M`````````0````$```!CF`4``````.`Q`````````0````$```!CF`4`````
+M`.@Q`````````0````$```!CF`4``````/`Q`````````0````$```!CF`4`
+M`````/@Q`````````0````$```!CF`4````````R`````````0````$```!C
+MF`4```````@R`````````0````$```!CF`4``````!`R`````````0````$`
+M``!CF`4``````!@R`````````0````$```!CF`4``````"`R`````````0``
+M``$```!CF`4``````"@R`````````0````$```!CF`4``````#`R````````
+M`0````$```!CF`4``````#@R`````````0````$```!CF`4``````$`R````
+M`````0````$```!CF`4``````$@R`````````0````$```!CF`4``````%`R
+M`````````0````$```!CF`4``````%@R`````````0````$```!CF`4`````
+M`&`R`````````0````$```!CF`4``````&@R`````````0````$```!CF`4`
+M`````'`R`````````0````$````MF`4``````'@R`````````0````$```!C
+MF`4``````(`R`````````0````$````MF`4``````(@R`````````0````$`
+M``!CF`4``````)`R`````````0````$```!CF`4``````)@R`````````0``
+M``$```!CF`4``````*`R`````````0````$````MF`4``````*@R````````
+M`0````$````MF`4``````+`R`````````0````$```!CF`4``````+@R````
+M`````0````$```!CF`4``````,`R`````````0````$```!CF`4``````,@R
+M`````````0````$```!CF`4``````-`R`````````0````$```!CF`4`````
+M`-@R`````````0````$```!CF`4``````.`R`````````0````$```!CF`4`
+M`````.@R`````````0````$```!CF`4``````/`R`````````0````$```!C
+MF`4``````/@R`````````0````$```!CF`4````````S`````````0````$`
+M``!CF`4```````@S`````````0````$```!CF`4``````!`S`````````0``
+M``$```!CF`4``````!@S`````````0````$```!CF`4``````"`S````````
+M`0````$```!CF`4``````"@S`````````0````$```!CF`4``````#`S````
+M`````0````$```!CF`4``````#@S`````````0````$````MF`4``````$`S
+M`````````0````$```!CF`4``````$@S`````````0````$```!CF`4`````
+M`%`S`````````0````$```!CF`4``````%@S`````````0````$```!CF`4`
+M`````&`S`````````0````$```!CF`4``````&@S`````````0````$```!C
+MF`4``````'`S`````````0````$```!CF`4``````'@S`````````0````$`
+M``!CF`4``````(`S`````````0````$```!CF`4``````(@S`````````0``
+M``$```!CF`4``````)`S`````````0````$```!CF`4``````)@S````````
+M`0````$```!CF`4``````*`S`````````0````$```!CF`4``````*@S````
+M`````0````$```!CF`4``````+`S`````````0````$````MF`4``````+@S
+M`````````0````$````MF`4``````,`S`````````0````$````MF`4`````
+M`,@S`````````0````$````MF`4``````-`S`````````0````$```!CF`4`
+M`````-@S`````````0````$```!CF`4``````.`S`````````0````$```!C
+MF`4``````.@S`````````0````$```!CF`4``````/`S`````````0````$`
+M``!CF`4``````/@S`````````0````$```!CF`4````````T`````````0``
+M``$```!CF`4```````@T`````````0````$```!CF`4``````!`T````````
+M`0````$```!CF`4``````!@T`````````0````$```!CF`4``````"`T````
+M`````0````$```!CF`4``````"@T`````````0````$```!CF`4``````#`T
+M`````````0````$```!CF`4``````#@T`````````0````$```!CF`4`````
+M`$`T`````````0````$```!CF`4``````$@T`````````0````$```!CF`4`
+M`````%`T`````````0````$```!CF`4``````%@T`````````0````$```!C
+MF`4``````&`T`````````0````$```!CF`4``````&@T`````````0````$`
+M``!CF`4``````'`T`````````0````$```!CF`4``````'@T`````````0``
+M``$```!CF`4``````(`T`````````0````$```!CF`4``````(@T````````
+M`0````$```!CF`4``````)`T`````````0````$```!CF`4``````)@T````
+M`````0````$```!CF`4``````*`T`````````0````$```!CF`4``````*@T
+M`````````0````$```!CF`4``````+`T`````````0````$```!CF`4`````
+M`+@T`````````0````$```!CF`4``````,`T`````````0````$```!CF`4`
+M`````,@T`````````0````$```!CF`4``````-`T`````````0````$```!C
+MF`4``````-@T`````````0````$```!CF`4``````.`T`````````0````$`
+M``!CF`4``````.@T`````````0````$```!CF`4``````/`T`````````0``
+M``$```!CF`4``````/@T`````````0````$```!CF`4````````U````````
+M`0````$```!CF`4```````@U`````````0````$```!CF`4``````!`U````
+M`````0````$```!CF`4``````!@U`````````0````$```!CF`4``````"`U
+M`````````0````$```!CF`4``````"@U`````````0````$````MF`4`````
+M`#`U`````````0````$```!CF`4``````#@U`````````0````$```!CF`4`
+M`````$`U`````````0````$```!CF`4``````$@U`````````0````$```!C
+MF`4``````%`U`````````0````$```!CF`4``````%@U`````````0````$`
+M``!CF`4``````&`U`````````0````$```!CF`4``````&@U`````````0``
+M``$```!CF`4``````'`U`````````0````$````MF`4``````'@U````````
+M`0````$```!CF`4``````(`U`````````0````$````MF`4``````(@U````
+M`````0````$```!CF`4``````)`U`````````0````$```!CF`4``````)@U
+M`````````0````$```!CF`4``````*`U`````````0````$````MF`4`````
+M`*@U`````````0````$````MF`4``````+`U`````````0````$```!CF`4`
+M`````+@U`````````0````$```!CF`4``````,`U`````````0````$```!C
+MF`4``````,@U`````````0````$````MF`4``````-`U`````````0````$`
+M``!CF`4``````-@U`````````0````$```!CF`4``````.`U`````````0``
+M``$```!CF`4``````.@U`````````0````$```!CF`4``````/`U````````
+M`0````$```!CF`4``````/@U`````````0````$```!CF`4````````V````
+M`````0````$```!CF`4```````@V`````````0````$```!CF`4``````!`V
+M`````````0````$```!CF`4``````!@V`````````0````$```!CF`4`````
+M`"`V`````````0````$```!CF`4``````"@V`````````0````$```!CF`4`
+M`````#`V`````````0````$```!CF`4``````#@V`````````0````$```!C
+MF`4``````$`V`````````0````$```!CF`4``````$@V`````````0````$`
+M``!CF`4``````%`V`````````0````$```!CF`4``````%@V`````````0``
+M``$```!CF`4``````&`V`````````0````$```!CF`4``````&@V````````
+M`0````$```!CF`4``````'`V`````````0````$````MF`4``````'@V````
+M`````0````$```!CF`4``````(`V`````````0````$````MF`4``````(@V
+M`````````0````$```!CF`4``````)`V`````````0````$```!CF`4`````
+M`)@V`````````0````$```!CF`4``````*`V`````````0````$````MF`4`
+M`````*@V`````````0````$````MF`4``````+`V`````````0````$```#I
+MG@4``````+@V`````````0````$````%GP4``````,`V`````````0````$`
+M```AGP4``````,@V`````````0````$```!VGP4``````-`V`````````0``
+M``$```#=GP4``````-@V`````````0````$````-U@4``````.`V````````
+M`0````$```"YU04``````.@V`````````0````$```#&U04``````/`V````
+M`````0````$```#OU04``````/@V`````````0````$````-U@4````````W
+M`````````0````$````#U@4```````@W`````````0````$```#YU04`````
+M`!`W`````````0````$````-U@4``````!@W`````````0````$````-U@4`
+M`````"`W`````````0````$````-U@4``````"@W`````````0````$````-
+MU@4``````#`W`````````0````$```#YU04``````#@W`````````0````$`
+M``"G)08``````$`W`````````0````$```"L)08``````$@W`````````0``
+M``$```"R)08``````%`W`````````0````$```"W)08``````%@W````````
+M`0````$```#E)08``````&`W`````````0````$```#E)08``````&@W````
+M`````0````$```#E)08``````'`W`````````0````$```#E)08``````'@W
+M`````````0````$```#E)08``````(`W`````````0````$```#E)08`````
+M`(@W`````````0````$```#E)08``````)`W`````````0````$```#E)08`
+M`````)@W`````````0````$```#E)08``````*`W`````````0````$```#E
+M)08``````*@W`````````0````$```#E)08``````+`W`````````0````$`
+M``#E)08``````+@W`````````0````$```"\)08``````,`W`````````0``
+M``$```#")08``````,@W`````````0````$```#')08``````-`W````````
+M`0````$```#,)08``````-@W`````````0````$```#2)08``````.`W````
+M`````0````$```#7)08``````.@W`````````0````$```#<)08``````/`W
+M`````````0````$```#B)08``````/@W`````````0````$```!">08`````
+M```X`````````0````$```"@>08```````@X`````````0````$```#1>08`
+M`````!`X`````````0````$```#M>08``````!@X`````````0````$````)
+M>@8``````"`X`````````0````$````E>@8``````"@X`````````0````$`
+M``!&>@8``````#`X`````````0````$```"L>@8``````#@X`````````0``
+M``$```#9>@8``````$`X`````````0````$```!\>P8``````$@X````````
+M`0````$````S>P8``````%`X`````````0````$```!/>P8``````%@X````
+M`````0````$```"8>P8``````&`X`````````0````$```"6?`8``````&@X
+M`````````0````$```#&?`8``````'`X`````````0````$```#L?`8`````
+M`'@X`````````0````$````@?08``````(`X`````````0````$```!#?08`
+M`````(@X`````````0````$```!F?08``````)`X`````````0````$```!R
+M?08``````)@X`````````0````$```#[>@8``````*`X`````````0````$`
+M```7>P8``````*@X`````````0````$```!H>@8``````+`X`````````0``
+M``$```"*>@8``````+@X`````````0````$````S>P8``````,`X````````
+M`0````$```!Y?08``````,@X`````````0````$```!@KP8``````-`X````
+M`````0````$```!LJ08``````-@X`````````0````$```"ZJ08``````.`X
+M`````````0````$````SJ@8``````.@X`````````0````$```"SJ@8`````
+M`/`X`````````0````$```#CJ@8``````/@X`````````0````$```#MJ@8`
+M```````Y`````````0````$```!@JP8```````@Y`````````0````$```!J
+MJP8``````!`Y`````````0````$```!;K@8``````!@Y`````````0````$`
+M```HK08``````"`Y`````````0````$````<K@8``````"@Y`````````0``
+M``$```!@KP8``````#`Y`````````0````$```!@KP8``````#@Y````````
+M`0````$```!@KP8``````$`Y`````````0````$```!@KP8``````$@Y````
+M`````0````$```!@KP8``````%`Y`````````0````$```!@KP8``````%@Y
+M`````````0````$```!@KP8``````&`Y`````````0````$```!@KP8`````
+M`&@Y`````````0````$```!UJP8``````'`Y`````````0````$```"0JP8`
+M`````'@Y`````````0````$````BJP8``````(`Y`````````0````$```!6
+MJP8``````(@Y`````````0````$````HK08``````)`Y`````````0````$`
+M``!7KP8``````)@Y`````````0````$```!JL08``````*`Y`````````0``
+M``$```"6M`8``````*@Y`````````0````$````5M08``````+`Y````````
+M`0````$```!4M08``````+@Y`````````0````$```!XM@8``````,`Y````
+M`````0````$````TUP8``````,@Y`````````0````$```!HU08``````-`Y
+M`````````0````$```!QU08``````-@Y`````````0````$```!ZU08`````
+M`.`Y`````````0````$```"%U08``````.@Y`````````0````$```"YU08`
+M`````/`Y`````````0````$```#0U08``````/@Y`````````0````$```#<
+MU08````````Z`````````0````$````1U@8```````@Z`````````0````$`
+M```EU@8``````!`Z`````````0````$````YU@8``````!@Z`````````0``
+M``$```!-U@8``````"`Z`````````0````$```!HU@8``````"@Z````````
+M`0````$```!TU@8``````#`Z`````````0````$```"`U@8``````#@Z````
+M`````0````$````TUP8``````$`Z`````````0````$````TUP8``````$@Z
+M`````````0````$```"1U@8``````%`Z`````````0````$```#BU@8`````
+M`%@Z`````````0````$````TUP8``````&`Z`````````0````$````TUP8`
+M`````&@Z`````````0````$```"IU@8``````'`Z`````````0````$````7
+MUP8``````'@Z`````````0````$```"<U08``````(`Z`````````0````$`
+M``"HU08``````(@Z`````````0````$````TUP8``````)`Z`````````0``
+M``$```#HU08``````)@Z`````````0````$```#TU08``````*`Z````````
+M`0````$`````U@8``````.@Z`````````0````$````R*`<``````/`Z````
+M`````0````$````R*`<``````/@Z`````````0````$```#7)P<````````[
+M`````````0````$```#G)P<```````@[`````````0````$````R*`<`````
+M`!`[`````````0````$````"*`<``````!@[`````````0````$```#`)P<`
+M`````"`[`````````0````$```#W)P<``````"@[`````````0````$````2
+M*`<``````#`[`````````0````$````B*`<``````#@[`````````0````$`
+M``#09@<``````$`[`````````0````$````R90<``````$@[`````````0``
+M``$```!09@<``````%`[`````````0````$```"P9@<``````%@[````````
+M`0````$````R90<``````&`[`````````0````$````R90<``````&@[````
+M`````0````$````R90<``````'`[`````````0````$````R90<``````'@[
+M`````````0````$```#09@<``````(`[`````````0````$```"/90<`````
+M`(@[`````````0````$```#09@<``````)`[`````````0````$```#09@<`
+M`````)@[`````````0````$```">90<``````*`[`````````0````$```#L
+M90<``````*@[`````````0````$```#X90<``````+`[`````````0````$`
+M```K9@<``````,`[`````````0````$```"&=`<``````,@[`````````0``
+M``$```"-=`<``````-`[`````````0````$```"4=`<``````-@[````````
+M`0````$```"I=`<``````.`[`````````0````$```"R=`<``````.@[````
+M`````0````$```";=`<``````/`[`````````0````$```"B=`<``````/@[
+M`````````0````$```"Y=`<````````\`````````0````$```#2C@<`````
+M``@\`````````0````$```"8C0<``````!`\`````````0````$````BC@<`
+M`````!@\`````````0````$```!?C@<``````"`\`````````0````$```"(
+MC@<``````"@\`````````0````$```!?C@<``````#`\`````````0````$`
+M``#2C@<``````#@\`````````0````$```"/C0<``````$`\`````````0``
+M``$```#[H0<``````$@\`````````0````$```"7H0<``````%`\````````
+M`0````$```#3H0<``````%@\`````````0````$```#%H0<``````&`\````
+M`````0````$```#,H0<``````&@\`````````0````$```"NH0<``````'`\
+M`````````0````$```#[H0<``````'@\`````````0````$```"0H0<`````
+M`(`\`````````0````$```#TH0<``````(@\`````````0````$```!RM@<`
+M`````)`\`````````0````$````WL`<``````)@\`````````0````$```"%
+ML0<``````*`\`````````0````$```#RL0<``````*@\`````````0````$`
+M``"KL@<``````+`\`````````0````$```#PLP<``````+@\`````````0``
+M``$````BM`<``````,`\`````````0````$````NM`<``````,@\````````
+M`0````$```!"M0<``````-`\`````````0````$```#:M0<``````-@\````
+M`````0````$````)M`<``````.`\`````````0````$```!RM@<``````.@\
+M`````````0````$````HKP<``````/`\`````````0````$````SKP<`````
+M`/@\`````````0````$```#@KP<````````]`````````0````$````?Q@<`
+M``````@]`````````0````$```!@Q@<``````!`]`````````0````$```"=
+MQ@<``````!@]`````````0````$```#:Q@<``````"`]`````````0````$`
+M```9QP<``````"@]`````````0````$```!4QP<``````#`]`````````0``
+M``$```!D30@``````#@]`````````0````$```!@3@@``````$`]````````
+M`0````$```!D30@``````$@]`````````0````$````Q3@@``````%`]````
+M`````0````$````Q3@@``````%@]`````````0````$````Q3@@``````&`]
+M`````````0````$```"<CP@``````&@]`````````0````$```##C@@`````
+M`'`]`````````0````$```##C@@``````'@]`````````0````$```#5C@@`
+M`````(`]`````````0````$```#EC@@``````(@]`````````0````$```#U
+MC@@``````)`]`````````0````$````%CP@``````)@]`````````0````$`
+M``#"CP@``````*`]`````````0````$```"SCP@``````*@]`````````0``
+M``$```!>D0@``````+`]`````````0````$```"2D`@``````+@]````````
+M`0````$```"2D`@``````,`]`````````0````$```"BD`@``````,@]````
+M`````0````$```"UD`@``````-`]`````````0````$```#%D`@``````-@]
+M`````````0````$```#5D`@``````.`]`````````0````$```""D0@`````
+M`.@]`````````0````$```!UD0@``````,`%`````````0````8```"3````
+M`````-@%`````````0````$````P?@$``````.`%`````````0````$```!@
+M@0$``````.@%`````````0````$```"P@@$``````/`%`````````0````$`
+M``#@@@$``````/@%`````````0````$```#@B`$````````&`````````0``
+M``$```#PA0$```````@&`````````0````$````@?@$``````!`&````````
+M`0````$```#0B`$``````!@&`````````0````$```"0A@$``````"`&````
+M`````0````$```#`@@$``````"@&`````````0````$```"0D0$``````#`&
+M`````````0````$````PH0$``````#@&`````````0````$```#@L@$`````
+M`$`&`````````0```+@``````````````$@&`````````0````$```"`E`$`
+M`````%`&`````````0````$```#0@@$``````%@&`````````0````$```"@
+ME@$``````&`&`````````0````$````@G0$``````&@&`````````0````$`
+M```0H0$``````'`&`````````0````$```#`H`$``````'@&`````````0``
+M``$```!@M0$``````(`&`````````0````$```#@O@$``````(@&````````
+M`0````$```"`OP$``````)`&`````````0````$```!`P`$``````)@&````
+M`````0````$```!@P`$``````*`&`````````0````$````0QP$``````*@&
+M`````````0````$```"`P`$``````+`&`````````0````$```!PAP$`````
+M`+@&`````````0````D!`````````````,@&`````````0````$```!`H0$`
+M`````-`&`````````0````$````@H@$``````-@&`````````0````$```!P
+MI0$``````.`&`````````0````$`````K`$``````.@&`````````0```.H`
+M`````````````$`,`````````0````8````K`0```````%@,`````````0``
+M``$```"`3`,``````&`,`````````0````$```#P3P,``````&@,````````
+M`0````$```!`40,``````'`,`````````0````$```!P40,``````'@,````
+M`````0````$```!P5P,``````(`,`````````0````$```"`5`,``````(@,
+M`````````0````$```#02P,``````)`,`````````0````$```!@5P,`````
+M`)@,`````````0````$````@50,``````*`,`````````0````$```!040,`
+M`````*@,`````````0````$````@8`,``````+`,`````````0````$```#`
+M;P,``````+@,`````````0````$```!P@0,``````,`,`````````0```-L!
+M`````````````,@,`````````0````$````08P,``````-`,`````````0``
+M``$```!@40,``````-@,`````````0````$````P90,``````.`,````````
+M`0````$```"P:P,``````.@,`````````0````$```"@;P,``````/`,````
+M`````0````$```!0;P,``````/@,`````````0````$```#`@P,````````-
+M`````````0````$```!`C0,```````@-`````````0````$```#@C0,`````
+M`!`-`````````0````$```"@C@,``````!@-`````````0````$```#`C@,`
+M`````"`-`````````0````$```!PE0,``````"@-`````````0````$```#@
+MC@,``````#`-`````````0````$`````5@,``````#@-`````````0```$\!
+M`````````````$`-`````````0````$```!03`,``````$@-`````````0``
+M``$```#0;P,``````%`-`````````0````$```"P<`,``````%@-````````
+M`0````$`````=`,``````&`-`````````0````$```"0>@,``````&@-````
+M`````0```'H!`````````````,`2`````````0````8```##`0```````-@2
+M`````````0````$```#@&@4``````.`2`````````0````$````0'@4`````
+M`.@2`````````0````$```!@'P4``````/`2`````````0````$```"0'P4`
+M`````/@2`````````0````$```"0)04````````3`````````0````$```"@
+M(@4```````@3`````````0````$````P&@4``````!`3`````````0````$`
+M``"`)04``````!@3`````````0````$```!`(P4``````"`3`````````0``
+M``$```!P'P4``````"@3`````````0````$```!`+@4``````#`3````````
+M`0````$```#@/04``````#@3`````````0````$```"03P4``````$`3````
+M`````0```*$"`````````````$@3`````````0````$````P,04``````%`3
+M`````````0````$```"`'P4``````%@3`````````0````$```!0,P4`````
+M`&`3`````````0````$```#0.04``````&@3`````````0````$```#`/04`
+M`````'`3`````````0````$```!P/04``````'@3`````````0````$```#@
+M404``````(`3`````````0````$```!@6P4``````(@3`````````0````$`
+M````7`4``````)`3`````````0````$```#`7`4``````)@3`````````0``
+M``$```#@7`4``````*`3`````````0````$```"08P4``````*@3````````
+M`0````$`````704``````+`3`````````0````$````@)`4``````+@3````
+M`````0```-`"`````````````,`3`````````0````$```"P&@4``````,@3
+M`````````0````$```#P/04``````-`3`````````0````$```#0/@4`````
+M`-@3`````````0````$````@0@4``````.`3`````````0````$```"P2`4`
+M`````.@3`````````0```-0"`````````````&`9`````````0````8```!;
+M`@```````'@9`````````0````$````@YP8``````(`9`````````0````$`
+M``!0Z@8``````(@9`````````0````$```"@ZP8``````)`9`````````0``
+M``$```#0ZP8``````)@9`````````0````$```#0\08``````*`9````````
+M`0````$```#@[@8``````*@9`````````0````$```!PY@8``````+`9````
+M`````0````$```#`\08``````+@9`````````0````$```"`[P8``````,`9
+M`````````0````$```"PZP8``````,@9`````````0````$```"`^@8`````
+M`-`9`````````0````$````@"@<``````-@9`````````0````$```#0&P<`
+M`````.`9`````````0```+D#`````````````.@9`````````0````$```!P
+M_08``````/`9`````````0````$```#`ZP8``````/@9`````````0````$`
+M``"0_P8````````:`````````0````$````0!@<```````@:`````````0``
+M``$`````"@<``````!`:`````````0````$```"P"0<``````!@:````````
+M`0````$````@'@<``````"`:`````````0````$```"@)P<``````"@:````
+M`````0````$```!`*`<``````#`:`````````0````$`````*0<``````#@:
+M`````````0````$````@*0<``````$`:`````````0````$```#0+P<`````
+M`$@:`````````0````$```!`*0<``````%`:`````````0````$```!@\`8`
+M`````%@:`````````0```'@#`````````````&`:`````````0````$```#P
+MY@8``````&@:`````````0````$````P"@<``````'`:`````````0````$`
+M```0"P<``````'@:`````````0````$```!@#@<``````(`:`````````0``
+M``$```#P%`<``````(@:`````````0```%8#`````````````.`:````````
+M`0````$```"P9`<``````.@:`````````0````$````P30<``````/`:````
+M`````0````$```"@1P<```````@;`````````0````$````P1@<``````!`;
+M`````````0````$```"`1@<``````!@;`````````0````$```!`3@<`````
+M`$@;`````````0````$```#PY@<``````%@;`````````0````$````0YP<`
+M`````'`;`````````0````$```!0ZP<``````(`;`````````0````$```!P
+MZP<``````)@;`````````0````$```#`ZP<``````*@;`````````0````$`
+M``#@ZP<``````,`;`````````0````$```"@[`<``````-`;`````````0``
+M``$```#`[`<``````.@;`````````0````$````P[0<``````/@;````````
+M`0````$```!0[0<``````!`<`````````0````$```"0\0<``````"`<````
+M`````0````$```#`\0<``````#@<`````````0````$```"P\@<``````$@<
+M`````````0````$```#P\@<``````&`<`````````0````$```!@^0<`````
+M`&@<`````````0````$````@^@<``````'`<`````````0````$```!@^@<`
+M`````(@<`````````0````$````0`@@``````)`<`````````0````$```#`
+M`@@``````)@<`````````0````$````@`P@``````+`<`````````0````$`
+M``!@`P@``````,`<`````````0````$```"``P@``````-@<`````````0``
+M``$```#``P@``````.@<`````````0````$````P!`@````````=````````
+M`0````$````P"P@```````@=`````````0````$```"P"P@``````!`=````
+M`````0````$```#0"P@``````"@=`````````0````$````0#`@``````#`=
+M`````````0````$```"0#`@``````#@=`````````0````$```"P#`@`````
+M`%`=`````````0````$```#P#`@``````%@=`````````0````$```#P#0@`
+M`````&`=`````````0````$```!`#@@``````'@=`````````0````$```"`
+M#@@``````(`=`````````0````$`````#P@``````(@=`````````0````$`
+M``"@#P@``````*`=`````````0````$```#@#P@``````*@=`````````0``
+M``$```!@$`@``````+`=`````````0````$```"`$`@``````,@=````````
+M`0````$```"0$0@``````-@=`````````0````$````@$@@``````/`=````
+M`````0````$```!@$@@````````>`````````0````$```"`$@@``````!@>
+M`````````0````$```#`$@@``````"@>`````````0````$```#@$@@`````
+M`$`>`````````0````$````@$P@``````%`>`````````0````$```!`$P@`
+M`````&@>`````````0````$```#0$P@``````'@>`````````0````$```"0
+M%`@``````)`>`````````0````$```"P%`@``````*`>`````````0````$`
+M``!P%0@``````+@>`````````0````$```"`!`@``````,@>`````````0``
+M``$```#P!`@``````.`>`````````0````$```!`!0@``````/`>````````
+M`0````$```"P!0@```````@?`````````0````$```"0%0@``````!@?````
+M`````0````$`````%@@``````#`?`````````0````$```!`%@@``````$`?
+M`````````0````$`````%P@``````%@?`````````0````$`````&`@`````
+M`&`?`````````0````$```#`&`@``````&@?`````````0````$```!`&0@`
+M`````(`?`````````0````$```!@_`<``````(@?`````````0````$````@
+M_0<``````)`?`````````0````$```!@_0<``````*@?`````````0````$`
+M``!0\P<``````+@?`````````0````$```"0\P<``````-`?`````````0``
+M``$```#`$`@``````.`?`````````0````$```!0$0@``````/@?````````
+M`0````$`````!@@```````@@`````````0````$```!P!@@``````"`@````
+M`````0````$```#`!@@``````#`@`````````0````$````P!P@``````$@@
+M`````````0````$```"`!P@``````%@@`````````0````$```#P!P@`````
+M`'`@`````````0````$```#P_@<``````'@@`````````0````$```#@_P<`
+M`````(`@`````````0````$````P``@``````)@@`````````0````$```!`
+M"`@``````*@@`````````0````$```#P"`@``````,`@`````````0````$`
+M``"`&0@``````,@@`````````0````$```#P&0@``````-`@`````````0``
+M``$````@&@@``````.@@`````````0````$```!@]0<``````/@@````````
+M`0````$```#@]0<``````!`A`````````0````$`````^`<``````!@A````
+M`````0````$```#@^`<``````"`A`````````0````$````@^0<``````#@A
+M`````````0````$```#P\P<``````$@A`````````0````$````P]`<`````
+M`&`A`````````0````$````P[`<``````'`A`````````0````$```!0[`<`
+M`````(@A`````````0````$```"0]`<``````)@A`````````0````$````0
+M]0<``````+`A`````````0````$```"@_0<``````+@A`````````0````$`
+M``!P_@<``````,`A`````````0````$```"P_@<``````-@A`````````0``
+M``$```!P``@``````.`A`````````0````$```"``0@``````.@A````````
+M`0````$```#0`0@````````B`````````0````$```"0]@<``````!`B````
+M`````0````$````P]P<``````"@B`````````0````$```#0'`@``````#@B
+M`````````0````$```!P'@@``````%`B`````````0````$````@\@<`````
+M`&`B`````````0````$```!0\@<``````'@B`````````0````$```"@[0<`
+M`````(@B`````````0````$```#`[0<``````*`B`````````0````$```!@
+M[@<``````+`B`````````0````$```"`[@<``````,@B`````````0````$`
+M``!P[P<``````-@B`````````0````$```"0[P<``````/`B`````````0``
+M``$```"`\`<````````C`````````0````$```"@\`<``````!@C````````
+M`0````$```!0YP<``````"@C`````````0````$```!PYP<``````$`C````
+M`````0````$````@Z0<``````$@C`````````0````$```!`Z0<``````%`C
+M`````````0````$```"PZ0<``````&@C`````````0````$```!@&@@`````
+M`'@C`````````0````$```"0&@@``````)`C`````````0````$```!P&P@`
+M`````*`C`````````0````$````@'`@``````+@C`````````0````$```!0
+M^P<``````,@C`````````0````$```"0^P<``````.`C`````````0````$`
+M``"@^@<``````/`C`````````0````$```#`^@<``````&@D`````````0``
+M``$```!`5@@``````'`D`````````0````$```"@50@``````.`D````````
+M`0````$````@5P@``````.@D`````````0````$```#06@@``````/`D````
+M`````0```)4$`````````````/@D`````````0````$```!05P@````````E
+M`````````0````$```!P5P@``````&@E`````````0````$```#`8`@`````
+M`'`E`````````0```)4$`````````````.`E`````````0````$````PZ0@`
+M`````.@E`````````0````$```"0X0@``````/`E`````````0````$```"P
+MZ`@``````/@E`````````0````$````PZ@@````````F`````````0````$`
+M``#PZ@@```````@F`````````0````$```"@Y@@``````!`F`````````0``
+M``$`````YP@``````!@F`````````0````$```!@Y@@``````"`F````````
+M`0````$````PZP@``````&`F`````````0````$```!@[`@``````&@F````
+M`````0````$```#0[P@``````'`F`````````0```)4$`````````````'@F
+M`````````0````$```"0[`@``````(`F`````````0````$```"P[`@`````
+M`"```````````0````$``````````````#@``````````0````$```!P````
+M`````'@``````````0````$```"``0```````)```````````0````$```#`
+M`0```````*@``````````0````$``````@```````,```````````0````$`
+M``!0`@```````.```````````0````$```"@`@```````!`!`````````0``
+M``$```"P`@```````"@!`````````0````$```#0`@```````$`!````````
+M`0````$```#P`@```````%@!`````````0````$````@`P```````'@!````
+M`````0````$```!@`P```````)`!`````````0````$```"@`P```````*@!
+M`````````0````$```"P`P```````,`!`````````0````$````0!```````
+M`-@!`````````0````$````@!````````/`!`````````0````$```!`!```
+M``````@"`````````0````$```!P!````````"`"`````````0````$```"@
+M!````````#@"`````````0````$```#0!````````%`"`````````0````$`
+M````!0```````&@"`````````0````$````P!P```````(@"`````````0``
+M``$```#@!P```````+@"`````````0````$````@"````````-`"````````
+M`0````$```"@"````````/@"`````````0````$```!0"@```````#`#````
+M`````0````$```#0#````````$@#`````````0````$```!`#0```````&`#
+M`````````0````$```"P#0```````(`#`````````0````$```#P#0``````
+M`)@#`````````0````$```"`#@```````-@#`````````0````$`````$```
+M`````/@#`````````0````$```#@$P```````#`$`````````0````$`````
+M'P```````'`$`````````0````$```#P'P```````)`$`````````0````$`
+M``"0(````````+`$`````````0````$```"@(````````-@$`````````0``
+M``$```#@(0```````/@$`````````0````$`````(@```````!`%````````
+M`0````$```!0(@```````"@%`````````0````$```#@(@```````%`%````
+M`````0````$`````*0```````&@%`````````0````$```"`*0```````(`%
+M`````````0````$```#P*0```````,`%`````````0````$```#P-@``````
+M`.@%`````````0````$```"`-P```````!`&`````````0````$```#0.```
+M`````#@&`````````0````$```#@.0```````&`&`````````0````$```"P
+M/0```````(@&`````````0````$```!`0@```````,`&`````````0````$`
+M```01@`````````'`````````0````$```"@2````````#@'`````````0``
+M``$```#@2@```````'@'`````````0````$```#P3````````+@'````````
+M`0````$```"@5@```````-@'`````````0````$```!@5P````````@(````
+M`````0````$```#06@```````"@(`````````0````$```#P6@```````$@(
+M`````````0````$```"@6P```````&`(`````````0````$```#@6P``````
+M`*`(`````````0````$```!@9````````.`(`````````0````$```!`:```
+M``````@)`````````0````$```!P<@```````#`)`````````0````$```#@
+M<@```````'`)`````````0````$```!P>@```````)@)`````````0````$`
+M```P>P```````-@)`````````0````$```!0?0`````````*`````````0``
+M``$````0?@```````"@*`````````0````$```"@@````````$@*````````
+M`0````$```#@@````````'@*`````````0````$```"@@0```````+@*````
+M`````0````$```"@A````````.`*`````````0````$```"@A0````````@+
+M`````````0````$```"PA@```````$@+`````````0````$```!0AP``````
+M`'`+`````````0````$```"PB````````(@+`````````0````$````@B0``
+M`````*`+`````````0````$```!PB0```````.`+`````````0````$```#`
+MB@`````````,`````````0````$```!0BP```````!@,`````````0````$`
+M``"PBP```````$@,`````````0````$```!0C````````(@,`````````0``
+M``$```#`C0```````*@,`````````0````$````0C@```````-`,````````
+M`0````$`````D@```````/@,`````````0````$````0DP```````"`-````
+M`````0````$```!@E````````$`-`````````0````$```!@E0```````&@-
+M`````````0````$````@E@```````(@-`````````0````$```"0E@``````
+M`+`-`````````0````$```!@F````````-@-`````````0````$```#`F0``
+M`````!@.`````````0````$````@FP```````#`.`````````0````$```"@
+MFP```````&`.`````````0````$```#PFP```````'@.`````````0````$`
+M````G0```````+@.`````````0````$```!@H0```````-`.`````````0``
+M``$```"@H@```````.@.`````````0````$````PHP`````````/````````
+M`0````$```!@HP```````!@/`````````0````$```!PHP```````#`/````
+M`````0````$```#`HP```````%@/`````````0````$```!`I0```````'@/
+M`````````0````$```!@I0```````)@/`````````0````$```"`I0``````
+M`,`/`````````0````$```!PIP```````.@/`````````0````$```!PJ```
+M`````"@0`````````0````$```#0J0```````$@0`````````0````$````0
+MJ@```````'`0`````````0````$```"`J@```````(@0`````````0````$`
+M``"PJ@```````+`0`````````0````$```#@JP```````-`0`````````0``
+M``$````0K````````.@0`````````0````$```!0K````````!@1````````
+M`0````$```#0K0```````$`1`````````0````$````@KP```````&`1````
+M`````0````$````0L````````(`1`````````0````$```!PL````````*`1
+M`````````0````$```"PL````````,`1`````````0````$```#PL```````
+M`-@1`````````0````$````@L0```````/@1`````````0````$```!0L0``
+M`````!`2`````````0````$```"`L0```````#`2`````````0````$```#`
+ML0```````$@2`````````0````$```#@L0```````&@2`````````0````$`
+M```0L@```````(`2`````````0````$```!`L@```````*`2`````````0``
+M``$```"`L@```````+@2`````````0````$```"PL@```````.`2````````
+M`0````$```#0M0````````@3`````````0````$```"0M@```````#`3````
+M`````0````$```!@MP```````%@3`````````0````$```!0N````````(`3
+M`````````0````$```!0N0```````*@3`````````0````$```#PN@``````
+M`-`3`````````0````$```!`O````````/@3`````````0````$```!0O0``
+M`````"`4`````````0````$```!@O@```````$@4`````````0````$```"0
+MOP```````'`4`````````0````$```#`P````````)@4`````````0````$`
+M``!PP0```````+`4`````````0````$```#0P0```````-`4`````````0``
+M``$````0P@```````.@4`````````0````$````@PP````````@5````````
+M`0````$```!@PP```````"`5`````````0````$```!0Q````````$@5````
+M`````0````$```"@Q0```````&`5`````````0````$```#0Q0```````'@5
+M`````````0````$`````Q@```````*`5`````````0````$```"0R0``````
+M`,`5`````````0````$````@R@```````.@5`````````0````$```!PR@``
+M```````6`````````0````$```#@R@```````"@6`````````0````$````@
+MS````````%`6`````````0````$```#`S0```````'@6`````````0````$`
+M``!PS@```````*`6`````````0````$`````T````````,@6`````````0``
+M``$```#PT````````/`6`````````0````$```"`T0```````!@7````````
+M`0````$````PT@```````&@7`````````0````$````@U````````(`7````
+M`````0````$```!`U````````)@7`````````0````$```#PU````````,`7
+M`````````0````$```!@U0```````.`7`````````0````$```"0U0``````
+M``@8`````````0````$````PUP```````#@8`````````0````$```#0UP``
+M`````%@8`````````0````$```!@V````````'@8`````````0````$```#P
+MV````````*`8`````````0````$`````V@```````-`8`````````0````$`
+M``#PV@```````/`8`````````0````$```!PVP````````@9`````````0``
+M``$```"0VP```````"`9`````````0````$```#0VP```````#@9````````
+M`0````$````0W````````&`9`````````0````$```#`Y0```````'@9````
+M`````0````$````0Y@```````*`9`````````0````$```"PYP```````,`9
+M`````````0````$```"PZ````````/@9`````````0````$````PZ@``````
+M`!`:`````````0````$```"PZ@```````%`:`````````0````$```!`[0``
+M`````'@:`````````0````$```#@[0```````*@:`````````0````$````@
+M\````````-`:`````````0````$````0\0```````/@:`````````0````$`
+M``#0\0```````#@;`````````0````$```"0]````````'@;`````````0``
+M``$```"0]P```````+@;`````````0````$````@^P```````/@;````````
+M`0````$```#P_@```````"@<`````````0````$```#@_P```````$`<````
+M`````0````$````P``$``````%@<`````````0````$```"```$``````(`<
+M`````````0````$```"`!`$``````,`<`````````0````$```"P"@$`````
+M`.@<`````````0````$```#0#0$``````!`=`````````0````$```#@%`$`
+M`````#@=`````````0````$```"@&0$``````'@=`````````0````$```"`
+M'`$``````*`=`````````0````$```"`'0$``````.`=`````````0````$`
+M``!`'@$``````"`>`````````0````$`````'P$``````#@>`````````0``
+M``$```!P'P$``````%`>`````````0````$```"`'P$``````)`>````````
+M`0````$````@(@$``````*@>`````````0````$```!0(@$``````-@>````
+M`````0````$```!@*@$``````/@>`````````0````$```"P*@$``````!`?
+M`````````0````$`````*P$``````#@?`````````0````$````@,P$`````
+M`&`?`````````0````$```#@-@$``````(@?`````````0````$```#@.`$`
+M`````+`?`````````0````$```"P.0$``````/`?`````````0````$```"@
+M.@$```````@@`````````0````$```#0.@$``````#`@`````````0````$`
+M``!P/0$``````%@@`````````0````$````0/@$``````(`@`````````0``
+M``$```"P/@$``````*@@`````````0````$```!`/P$``````-`@````````
+M`0````$```#0/P$``````/@@`````````0````$```!P0`$``````"`A````
+M`````0````$`````00$``````$@A`````````0````$```"000$``````'`A
+M`````````0````$```!00@$``````)@A`````````0````$```!`0P$`````
+M`,`A`````````0````$```"02P$````````B`````````0````$````04P$`
+M`````!@B`````````0````$```!04P$``````#`B`````````0````$```"`
+M4P$``````&`B`````````0````$````05`$``````(@B`````````0````$`
+M``!P5`$``````+`B`````````0````$```#`5`$``````-`B`````````0``
+M``$```#@5`$``````/@B`````````0````$```#@50$``````"`C````````
+M`0````$```!P5@$``````&`C`````````0````$```"06`$``````(`C````
+M`````0````$```#P6`$``````*`C`````````0````$```!060$``````,@C
+M`````````0````$```!`6@$``````.@C`````````0````$```"@6@$`````
+M``@D`````````0````$`````6P$``````$@D`````````0````$```!P70$`
+M`````'`D`````````0````$```!08`$``````)`D`````````0````$```"@
+M8`$``````+`D`````````0````$```#@8`$``````-`D`````````0````$`
+M````80$``````/`D`````````0````$```!`80$``````!`E`````````0``
+M``$```"`80$``````%`E`````````0````$````P8@$``````&@E````````
+M`0````$```!08@$``````(`E`````````0````$```!@8@$``````*`E````
+M`````0````$````@8P$``````+@E`````````0````$```"`8P$``````.`E
+M`````````0````$````P9`$```````@F`````````0````$````@90$`````
+M`$@F`````````0````$```!@9@$``````)@F`````````0````$```"@9P$`
+M`````+`F`````````0````$```#0:`$``````-`F`````````0````$```"`
+M:@$``````.@F`````````0````$```"0:@$````````G`````````0````$`
+M``"@:@$``````!@G`````````0````$```#`:@$``````#`G`````````0``
+M``$```#@:@$``````$@G`````````0````$````0:P$``````&`G````````
+M`0````$```!`:P$``````(@G`````````0````$```"0;`$``````+`G````
+M`````0````$```#0;0$``````,@G`````````0````$````0;@$``````/`G
+M`````````0````$```"P;@$```````@H`````````0````$````0;P$`````
+M`"`H`````````0````$````P;P$``````%`H`````````0````$```!`<@$`
+M`````'@H`````````0````$```"@<@$``````)`H`````````0````$```#@
+M<@$``````*@H`````````0````$```#P<@$``````-`H`````````0````$`
+M``"0<P$```````@I`````````0````$`````=`$``````"@I`````````0``
+M``$```"`=`$``````%`I`````````0````$`````=0$``````'@I````````
+M`0````$```"P=0$``````*`I`````````0````$```!`=@$``````,@I````
+M`````0````$`````=P$``````/`I`````````0````$```"`=P$``````!@J
+M`````````0````$````P>`$``````$`J`````````0````$```!0>0$`````
+M`&@J`````````0````$`````>@$``````)`J`````````0````$```"P>@$`
+M`````+@J`````````0````$```"0>P$``````.`J`````````0````$```!P
+M?`$````````K`````````0````$`````?0$``````$`K`````````0````$`
+M```0?@$``````%@K`````````0````$````@?@$``````'`K`````````0``
+M``$````P?@$``````(@K`````````0````$```"`?@$``````,`K````````
+M`0````$```"`?P$````````L`````````0````$```!@@0$``````$`L````
+M`````0````$```"P@@$``````%@L`````````0````$```#`@@$``````'`L
+M`````````0````$```#0@@$``````(@L`````````0````$```#@@@$`````
+M`,`L`````````0````$```#PA0$``````.`L`````````0````$````0A@$`
+M```````M`````````0````$```"0A@$``````"@M`````````0````$```!P
+MAP$``````%@M`````````0````$```#0B`$``````'`M`````````0````$`
+M``#@B`$``````)@M`````````0````$`````BP$``````+`M`````````0``
+M``$````0BP$``````-@M`````````0````$```!`C`$``````!@N````````
+M`0````$```"0D0$``````%@N`````````0````$```"`E`$``````(`N````
+M`````0````$```#@E0$``````*@N`````````0````$```"@E@$``````-`N
+M`````````0````$````@G0$``````/@N`````````0````$```#`H`$`````
+M`!@O`````````0````$````0H0$``````#@O`````````0````$````PH0$`
+M`````%`O`````````0````$```!`H0$``````&@O`````````0````$```"@
+MH0$``````(`O`````````0````$```#@H0$``````*`O`````````0````$`
+M```@H@$``````,@O`````````0````$```!PI0$``````/`O`````````0``
+M``$`````K`$``````!@P`````````0````$```#@L@$``````#`P````````
+M`0````$```!@M0$``````$@P`````````0````$```"`M0$``````'`P````
+M`````0````$````0MP$``````)@P`````````0````$```#PNP$``````,`P
+M`````````0````$```#0O`$``````.`P`````````0````$```!0O0$`````
+M``@Q`````````0````$```#@O@$``````"@Q`````````0````$```"`OP$`
+M`````$`Q`````````0````$```#@OP$``````%@Q`````````0````$```!`
+MP`$``````'@Q`````````0````$```!@P`$``````)@Q`````````0````$`
+M``"`P`$``````,@Q`````````0````$````0QP$``````.@Q`````````0``
+M``$```"`QP$``````"`R`````````0````$```"@QP$``````#@R````````
+M`0````$````0R`$``````'@R`````````0````$````@R0$``````)`R````
+M`````0````$```!@R0$``````*@R`````````0````$```"@R0$``````,`R
+M`````````0````$```#PR0$``````.`R`````````0````$```!`R@$`````
+M`!`S`````````0````$```!0R@$``````"@S`````````0````$```!PR@$`
+M`````$`S`````````0````$```"0R@$``````%@S`````````0````$```#`
+MR@$``````'@S`````````0````$`````RP$``````)`S`````````0````$`
+M``!`RP$``````*@S`````````0````$```!0RP$``````,`S`````````0``
+M``$```"PRP$``````-@S`````````0````$```#`RP$``````/`S````````
+M`0````$```#@RP$```````@T`````````0````$````0S`$``````"`T````
+M`````0````$```!`S`$``````#@T`````````0````$```!PS`$``````%`T
+M`````````0````$```"@S`$``````&@T`````````0````$```#0S@$`````
+M`(@T`````````0````$```"`SP$``````+@T`````````0````$```#`SP$`
+M`````-`T`````````0````$```!`T`$``````/@T`````````0````$```#P
+MT0$``````#`U`````````0````$```!PU`$``````$@U`````````0````$`
+M``#@U`$``````&`U`````````0````$```!0U0$``````(`U`````````0``
+M``$```"0U0$``````)@U`````````0````$````@U@$``````-@U````````
+M`0````$```"@UP$``````/@U`````````0````$```"`VP$``````#`V````
+M`````0````$```"@Y@$``````'`V`````````0````$```"0YP$``````)`V
+M`````````0````$````PZ`$``````+`V`````````0````$```!`Z`$`````
+M`-@V`````````0````$```"`Z0$``````/@V`````````0````$```"@Z0$`
+M`````!`W`````````0````$```#PZ0$``````"@W`````````0````$```"`
+MZ@$``````%`W`````````0````$```"@\`$``````&@W`````````0````$`
+M```@\0$``````(`W`````````0````$```"0\0$``````,`W`````````0``
+M``$```"0_@$``````.@W`````````0````$````@_P$``````!`X````````
+M`0````$```!P``(``````#@X`````````0````$```"``0(``````&`X````
+M`````0````$```!0!0(``````(@X`````````0````$```#@"0(``````,`X
+M`````````0````$```"P#0(````````Y`````````0````$```!`$`(`````
+M`#@Y`````````0````$```"`$@(``````'@Y`````````0````$```"0%`(`
+M`````+@Y`````````0````$```!`'@(``````-@Y`````````0````$`````
+M'P(```````@Z`````````0````$```!P(@(``````"@Z`````````0````$`
+M``"0(@(``````$@Z`````````0````$```!`(P(``````&`Z`````````0``
+M``$```"`(P(``````*`Z`````````0````$`````+`(``````.`Z````````
+M`0````$```#@+P(```````@[`````````0````$````0.@(``````#`[````
+M`````0````$```"`.@(``````'`[`````````0````$````00@(``````)@[
+M`````````0````$```#00@(``````-@[`````````0````$```#P1`(`````
+M```\`````````0````$```"P10(``````"@\`````````0````$```!`2`(`
+M`````$@\`````````0````$```"`2`(``````'@\`````````0````$```!`
+M20(``````+@\`````````0````$```!`3`(``````.`\`````````0````$`
+M``!`30(```````@]`````````0````$```!03@(``````$@]`````````0``
+M``$```#P3@(``````'`]`````````0````$```!04`(``````(@]````````
+M`0````$```#`4`(``````*`]`````````0````$````040(``````.`]````
+M`````0````$```!@4@(````````^`````````0````$```#P4@(``````!@^
+M`````````0````$```!04P(``````$@^`````````0````$```#P4P(`````
+M`(@^`````````0````$```!@50(``````*@^`````````0````$```"P50(`
+M`````-`^`````````0````$```"@60(``````/@^`````````0````$```"P
+M6@(``````"`_`````````0````$`````7`(``````$`_`````````0````$`
+M````70(``````&@_`````````0````$```#`70(``````(@_`````````0``
+M``$````P7@(``````+`_`````````0````$`````8`(``````-@_````````
+M`0````$```!@80(``````!A``````````0````$```#`8@(``````#!`````
+M`````0````$```!`8P(``````&!``````````0````$```"08P(``````'A`
+M`````````0````$```"@9`(``````+A``````````0````$`````:0(`````
+M`-!``````````0````$```!`:@(``````.A``````````0````$```#0:@(`
+M``````!!`````````0````$`````:P(``````!A!`````````0````$````0
+M:P(``````#!!`````````0````$```!@:P(``````%A!`````````0````$`
+M``#@;`(``````'A!`````````0````$`````;0(``````)A!`````````0``
+M``$````@;0(``````,!!`````````0````$````0;P(``````.A!````````
+M`0````$````0<`(``````"A"`````````0````$```!P<0(``````$A"````
+M`````0````$```"P<0(``````'!"`````````0````$````@<@(``````(A"
+M`````````0````$```!0<@(``````+!"`````````0````$```"`<P(`````
+M`-!"`````````0````$```"P<P(``````.A"`````````0````$```#P<P(`
+M`````!A#`````````0````$```!P=0(``````$!#`````````0````$```#`
+M=@(``````&!#`````````0````$```"P=P(``````(!#`````````0````$`
+M```0>`(``````*!#`````````0````$```!0>`(``````,!#`````````0``
+M``$```"0>`(``````-A#`````````0````$```#`>`(``````/A#````````
+M`0````$```#P>`(``````!!$`````````0````$````@>0(``````#!$````
+M`````0````$```!@>0(``````$A$`````````0````$```"`>0(``````&A$
+M`````````0````$```"P>0(``````(!$`````````0````$```#@>0(`````
+M`*!$`````````0````$````@>@(``````+A$`````````0````$```!0>@(`
+M`````.!$`````````0````$```!P?0(```````A%`````````0````$````P
+M?@(``````#!%`````````0````$`````?P(``````%A%`````````0````$`
+M``#P?P(``````(!%`````````0````$```#P@`(``````*A%`````````0``
+M``$```"0@@(``````-!%`````````0````$```#@@P(``````/A%````````
+M`0````$```#PA`(``````"!&`````````0````$`````A@(``````$A&````
+M`````0````$````PAP(``````'!&`````````0````$```!@B`(``````)A&
+M`````````0````$````0B0(``````+!&`````````0````$```!PB0(`````
+M`-!&`````````0````$```"PB0(``````.A&`````````0````$```#`B@(`
+M``````A'`````````0````$`````BP(``````"!'`````````0````$```#P
+MBP(``````$A'`````````0````$```!`C0(``````&!'`````````0````$`
+M``!PC0(``````'A'`````````0````$```"@C0(``````*!'`````````0``
+M``$````PD0(``````,!'`````````0````$```#`D0(``````.A'````````
+M`0````$````0D@(```````!(`````````0````$```"`D@(``````"A(````
+M`````0````$```#`DP(``````%!(`````````0````$```!@E0(``````'A(
+M`````````0````$````0E@(``````*!(`````````0````$```"@EP(`````
+M`,A(`````````0````$```"0F`(``````/!(`````````0````$````@F0(`
+M`````!A)`````````0````$```#0F0(``````&A)`````````0````$```#`
+MFP(``````(!)`````````0````$```#@FP(``````)A)`````````0````$`
+M``"0G`(``````,!)`````````0````$`````G0(``````.!)`````````0``
+M``$````PG0(```````A*`````````0````$```#0G@(``````#A*````````
+M`0````$```!PGP(``````%A*`````````0````$`````H`(``````'A*````
+M`````0````$```"0H`(``````*!*`````````0````$```"@H0(``````-!*
+M`````````0````$```"0H@(``````/!*`````````0````$````0HP(`````
+M``A+`````````0````$````PHP(``````"!+`````````0````$```!PHP(`
+M`````#A+`````````0````$```"PHP(``````&!+`````````0````$```!@
+MK0(``````'A+`````````0````$```"PK0(``````*!+`````````0````$`
+M``!0KP(``````,!+`````````0````$```!0L`(``````/A+`````````0``
+M``$```#0L0(``````!!,`````````0````$```!0L@(``````%!,````````
+M`0````$```#@M`(``````'A,`````````0````$```"`M0(``````*A,````
+M`````0````$```#`MP(``````-!,`````````0````$```"PN`(``````/A,
+M`````````0````$```!PN0(``````#A-`````````0````$````PO`(`````
+M`'A-`````````0````$````POP(``````+A-`````````0````$```#`P@(`
+M`````/A-`````````0````$```"0Q@(``````"A.`````````0````$```"`
+MQP(``````$!.`````````0````$```#0QP(``````%A.`````````0````$`
+M```@R`(``````(!.`````````0````$````@S`(``````,!.`````````0``
+M``$```!0T@(``````.A.`````````0````$```!PU0(``````!!/````````
+M`0````$```"`W`(``````#A/`````````0````$```!`X0(``````'A/````
+M`````0````$````@Y`(``````*!/`````````0````$````@Y0(``````.!/
+M`````````0````$```#@Y0(``````"!0`````````0````$```"@Y@(`````
+M`#A0`````````0````$````0YP(``````%!0`````````0````$````@YP(`
+M`````)!0`````````0````$```#`Z0(``````*A0`````````0````$```#P
+MZ0(``````-A0`````````0````$`````\@(``````/A0`````````0````$`
+M``!0\@(``````!!1`````````0````$```"@\@(``````#A1`````````0``
+M``$```#`^@(``````&!1`````````0````$```"`_@(``````(A1````````
+M`0````$```"```,``````+!1`````````0````$```!0`0,``````/!1````
+M`````0````$```!``@,```````A2`````````0````$```!P`@,``````#!2
+M`````````0````$````0!0,``````%A2`````````0````$```"P!0,`````
+M`(!2`````````0````$```!0!@,``````*A2`````````0````$```#@!@,`
+M`````-!2`````````0````$```!P!P,``````/A2`````````0````$````0
+M"`,``````"!3`````````0````$```"@"`,``````$A3`````````0````$`
+M```P"0,``````'!3`````````0````$```#P"0,``````)A3`````````0``
+M``$```#@"@,``````,!3`````````0````$````P$P,```````!4````````
+M`0````$```"P&@,``````!A4`````````0````$```#P&@,``````#!4````
+M`````0````$````@&P,``````&!4`````````0````$```"P&P,``````(A4
+M`````````0````$````0'`,``````+!4`````````0````$```!@'`,`````
+M`-!4`````````0````$```"`'`,``````/A4`````````0````$```"`'0,`
+M`````"!5`````````0````$````0'@,``````&!5`````````0````$````P
+M(`,``````(!5`````````0````$```"0(`,``````*!5`````````0````$`
+M``#P(`,``````,A5`````````0````$```#@(0,``````.A5`````````0``
+M``$```!`(@,```````A6`````````0````$```"@(@,``````$A6````````
+M`0````$````0)0,``````'!6`````````0````$```#P)P,``````)!6````
+M`````0````$```!`*`,``````+!6`````````0````$```"`*`,``````-A6
+M`````````0````$```#0*`,``````/!6`````````0````$```#P*`,`````
+M`!!7`````````0````$```#@*0,``````%!7`````````0````$```"0*@,`
+M`````&A7`````````0````$```"P*@,``````(!7`````````0````$```#`
+M*@,``````*!7`````````0````$```"P*P,``````+A7`````````0````$`
+M```0+`,``````.!7`````````0````$```#`+`,```````A8`````````0``
+M``$```"P+0,``````$A8`````````0````$```#P+@,``````)A8````````
+M`0````$````P,`,``````+!8`````````0````$```!@,0,``````-!8````
+M`````0````$````0,P,``````.A8`````````0````$````@,P,```````!9
+M`````````0````$````P,P,``````!A9`````````0````$```!0,P,`````
+M`#!9`````````0````$```!P,P,``````$A9`````````0````$```"@,P,`
+M`````&!9`````````0````$```#0,P,``````(A9`````````0````$````@
+M-0,``````+!9`````````0````$```!@-@,``````,A9`````````0````$`
+M``"@-@,``````/!9`````````0````$```!`-P,```````A:`````````0``
+M``$```"@-P,``````"!:`````````0````$```#`-P,``````%!:````````
+M`0````$```#0.@,``````'A:`````````0````$````P.P,``````)!:````
+M`````0````$```!P.P,``````*A:`````````0````$```"`.P,``````-!:
+M`````````0````$````@/`,```````A;`````````0````$```"0/`,`````
+M`"A;`````````0````$````0/0,``````%!;`````````0````$```"0/0,`
+M`````'A;`````````0````$```!`/@,``````*!;`````````0````$```#0
+M/@,``````,A;`````````0````$```"0/P,``````/!;`````````0````$`
+M```00`,``````!A<`````````0````$```#`0`,``````$!<`````````0``
+M``$```#@00,``````&A<`````````0````$```"00@,``````)!<````````
+M`0````$```!`0P,``````+A<`````````0````$````@1`,``````.!<````
+M`````0````$`````10,```````!=`````````0````$```"010,``````$!=
+M`````````0````$```"@1@,``````'!=`````````0````$```#P1P,`````
+M`(A=`````````0````$```!`2`,``````,A=`````````0````$```#02P,`
+M`````.A=`````````0````$```!03`,```````!>`````````0````$```"`
+M3`,``````!A>`````````0````$```#03`,``````%!>`````````0````$`
+M``#030,``````)!>`````````0````$```#P3P,``````-!>`````````0``
+M``$```!`40,``````.A>`````````0````$```!040,```````!?````````
+M`0````$```!@40,``````!A?`````````0````$```!P40,``````%!?````
+M`````0````$```"`5`,``````'!?`````````0````$```"@5`,``````)!?
+M`````````0````$````@50,``````+A?`````````0````$`````5@,`````
+M`.A?`````````0````$```!@5P,```````!@`````````0````$```!P5P,`
+M`````"A@`````````0````$```"060,``````$!@`````````0````$```"@
+M60,``````&A@`````````0````$```#06@,``````*A@`````````0````$`
+M```@8`,``````.A@`````````0````$````08P,``````!!A`````````0``
+M``$```!P9`,``````#AA`````````0````$````P90,``````&!A````````
+M`0````$```"P:P,``````(AA`````````0````$```!0;P,``````*AA````
+M`````0````$```"@;P,``````,AA`````````0````$```#`;P,``````.!A
+M`````````0````$```#0;P,``````/AA`````````0````$````P<`,`````
+M`!!B`````````0````$```!P<`,``````#!B`````````0````$```"P<`,`
+M`````%AB`````````0````$`````=`,``````(!B`````````0````$```"0
+M>@,``````*AB`````````0````$```!P@0,``````,!B`````````0````$`
+M``#`@P,``````-AB`````````0````$```#@@P,```````!C`````````0``
+M``$```!PA0,``````"AC`````````0````$```!0B@,``````%!C````````
+M`0````$````PBP,``````'!C`````````0````$```"PBP,``````)AC````
+M`````0````$```!`C0,``````+AC`````````0````$```#@C0,``````-!C
+M`````````0````$```!`C@,``````.AC`````````0````$```"@C@,`````
+M``AD`````````0````$```#`C@,``````"AD`````````0````$```#@C@,`
+M`````%AD`````````0````$```!PE0,``````'AD`````````0````$```#@
+ME0,``````+!D`````````0````$`````E@,``````,AD`````````0````$`
+M``!PE@,```````AE`````````0````$```"`EP,``````"!E`````````0``
+M``$```#`EP,``````#AE`````````0````$`````F`,``````%!E````````
+M`0````$```!0F`,``````'!E`````````0````$```"@F`,``````*!E````
+M`````0````$```"PF`,``````+AE`````````0````$```#0F`,``````-!E
+M`````````0````$```#PF`,``````.AE`````````0````$````@F0,`````
+M``AF`````````0````$```!@F0,``````"!F`````````0````$```"@F0,`
+M`````#AF`````````0````$```"PF0,``````%!F`````````0````$````0
+MF@,``````&AF`````````0````$````@F@,``````(!F`````````0````$`
+M``!`F@,``````)AF`````````0````$```!PF@,``````+!F`````````0``
+M``$```"@F@,``````,AF`````````0````$```#0F@,``````.!F````````
+M`0````$`````FP,``````/AF`````````0````$````PG0,``````!AG````
+M`````0````$```#@G0,``````$AG`````````0````$````@G@,``````&!G
+M`````````0````$```"@G@,``````(AG`````````0````$```!0H`,`````
+M`,!G`````````0````$```#0H@,``````-AG`````````0````$```!`HP,`
+M`````/!G`````````0````$```"PHP,``````!!H`````````0````$```#P
+MHP,``````"AH`````````0````$```"`I`,``````&AH`````````0````$`
+M````I@,``````(AH`````````0````$```#@J0,``````,!H`````````0``
+M``$`````M0,```````!I`````````0````$```#PM0,``````"!I````````
+M`0````$```"0M@,``````$!I`````````0````$```"@M@,``````&AI````
+M`````0````$```#@MP,``````(AI`````````0````$`````N`,``````*!I
+M`````````0````$```!0N`,``````+AI`````````0````$```#@N`,`````
+M`.!I`````````0````$`````OP,``````/AI`````````0````$```"`OP,`
+M`````!!J`````````0````$```#POP,``````%!J`````````0````$```#P
+MS`,``````'AJ`````````0````$```"`S0,``````*!J`````````0````$`
+M``#0S@,``````,AJ`````````0````$```#@SP,``````/!J`````````0``
+M``$```"PTP,``````!AK`````````0````$```!`V`,``````%!K````````
+M`0````$````0W`,``````)!K`````````0````$```"@W@,``````,AK````
+M`````0````$```#@X`,```````AL`````````0````$```#PX@,``````$AL
+M`````````0````$```"@[`,``````&AL`````````0````$```!@[0,`````
+M`)AL`````````0````$```#0\`,``````+AL`````````0````$```#P\`,`
+M`````-AL`````````0````$```"@\0,``````/!L`````````0````$```#@
+M\0,``````#!M`````````0````$```!@^@,``````'!M`````````0````$`
+M``!`_@,``````)AM`````````0````$```!P"`0``````,!M`````````0``
+M``$```#@"`0```````!N`````````0````$```!P$`0``````"AN````````
+M`0````$````P$00``````&AN`````````0````$```!0$P0``````)!N````
+M`````0````$````0%`0``````+AN`````````0````$```"@%@0``````-AN
+M`````````0````$```#@%@0```````AO`````````0````$```"@%P0`````
+M`$AO`````````0````$```"@&@0``````'!O`````````0````$```"@&P0`
+M`````)AO`````````0````$```"P'`0``````-AO`````````0````$```!0
+M'00```````!P`````````0````$```"P'@0``````!AP`````````0````$`
+M```@'P0``````#!P`````````0````$```!P'P0``````'!P`````````0``
+M``$```#`(`0``````)!P`````````0````$```!0(00``````*AP````````
+M`0````$```"P(00``````-AP`````````0````$```!0(@0``````!AQ````
+M`````0````$```#`(P0``````#AQ`````````0````$````0)`0``````&!Q
+M`````````0````$`````*`0``````(AQ`````````0````$````0*00`````
+M`+!Q`````````0````$```!@*@0``````-!Q`````````0````$```!@*P0`
+M`````/AQ`````````0````$````@+`0``````!AR`````````0````$```"0
+M+`0``````$!R`````````0````$```!@+@0``````&AR`````````0````$`
+M``#`+P0``````*AR`````````0````$````@,00``````,!R`````````0``
+M``$```"@,00``````/!R`````````0````$```#P,00```````AS````````
+M`0````$`````,P0``````$AS`````````0````$```!@-P0``````&!S````
+M`````0````$```"@.`0``````'AS`````````0````$````P.00``````)!S
+M`````````0````$```!@.00``````*AS`````````0````$```!P.00`````
+M`,!S`````````0````$```#`.00``````.AS`````````0````$```!`.P0`
+M``````AT`````````0````$```!@.P0``````"AT`````````0````$```"`
+M.P0``````%!T`````````0````$```!P/00``````'AT`````````0````$`
+M``!P/@0``````+AT`````````0````$```#0/P0``````-AT`````````0``
+M``$````00`0```````!U`````````0````$```"`0`0``````!AU````````
+M`0````$```"P0`0``````$!U`````````0````$```#@000``````&!U````
+M`````0````$````00@0``````'AU`````````0````$```!00@0``````*AU
+M`````````0````$```#00P0``````-!U`````````0````$````@100`````
+M`/!U`````````0````$````01@0``````!!V`````````0````$```!P1@0`
+M`````#!V`````````0````$```"P1@0``````%!V`````````0````$```#P
+M1@0``````&AV`````````0````$````@1P0``````(AV`````````0````$`
+M``!01P0``````*!V`````````0````$```"`1P0``````,!V`````````0``
+M``$```#`1P0``````-AV`````````0````$```#@1P0``````/AV````````
+M`0````$````02`0``````!!W`````````0````$```!`2`0``````#!W````
+M`````0````$```"`2`0``````$AW`````````0````$```"P2`0``````'!W
+M`````````0````$```#02P0``````)AW`````````0````$```"03`0`````
+M`,!W`````````0````$```!@300``````.AW`````````0````$```!03@0`
+M`````!!X`````````0````$```!03P0``````#AX`````````0````$```#P
+M4`0``````&!X`````````0````$```!`4@0``````(AX`````````0````$`
+M``!04P0``````+!X`````````0````$```!@5`0``````-AX`````````0``
+M``$```"0500```````!Y`````````0````$```#`5@0``````"AY````````
+M`0````$```!P5P0``````$!Y`````````0````$```#05P0``````&!Y````
+M`````0````$````06`0``````'AY`````````0````$````@600``````)AY
+M`````````0````$```!@600``````+!Y`````````0````$```!06@0`````
+M`-AY`````````0````$```"@6P0``````/!Y`````````0````$```#06P0`
+M``````AZ`````````0````$`````7`0``````#!Z`````````0````$```"0
+M7P0``````%!Z`````````0````$````@8`0``````'AZ`````````0````$`
+M``!P8`0``````)!Z`````````0````$```#@8`0``````+AZ`````````0``
+M``$````@8@0``````.!Z`````````0````$```#`8P0```````A[````````
+M`0````$```!P9`0``````#![`````````0````$`````9@0``````%A[````
+M`````0````$```#P9@0``````(![`````````0````$```"`9P0``````*A[
+M`````````0````$````P:`0``````/A[`````````0````$````@:@0`````
+M`!!\`````````0````$```!`:@0``````"A\`````````0````$```#P:@0`
+M`````%!\`````````0````$```!@:P0``````'!\`````````0````$```"0
+M:P0``````)A\`````````0````$````P;00``````,A\`````````0````$`
+M``#0;00``````.A\`````````0````$```!@;@0```````A]`````````0``
+M``$```#P;@0``````#!]`````````0````$`````<`0``````&!]````````
+M`0````$```#P<`0``````(!]`````````0````$```!P<00``````)A]````
+M`````0````$```"0<00``````+!]`````````0````$```#0<00``````,A]
+M`````````0````$````0<@0``````/!]`````````0````$```#`>P0`````
+M``A^`````````0````$````0?`0``````#!^`````````0````$```"P?00`
+M`````%!^`````````0````$```"P?@0``````(A^`````````0````$````P
+M@`0``````*!^`````````0````$```"P@`0``````.!^`````````0````$`
+M``!`@P0```````A_`````````0````$```#@@P0``````#A_`````````0``
+M``$````@A@0``````&!_`````````0````$````0AP0``````(A_````````
+M`0````$```#0AP0``````,A_`````````0````$```"0B@0```````B`````
+M`````0````$```"0C00``````$B``````````0````$````@D00``````(B`
+M`````````0````$```#PE`0``````+B``````````0````$```#@E00`````
+M`-"``````````0````$````PE@0``````.B``````````0````$```"`E@0`
+M`````!"!`````````0````$```"`F@0``````%"!`````````0````$```"P
+MH`0``````'B!`````````0````$```#0HP0``````*"!`````````0````$`
+M``#@J@0``````,B!`````````0````$```"@KP0```````B"`````````0``
+M``$```"`L@0``````#""`````````0````$```"`LP0``````'""````````
+M`0````$```!`M`0``````+""`````````0````$`````M00``````,B"````
+M`````0````$```!PM00``````.""`````````0````$```"`M00``````""#
+M`````````0````$````@N`0``````#B#`````````0````$```!0N`0`````
+M`&B#`````````0````$```!@P`0``````(B#`````````0````$```"PP`0`
+M`````*"#`````````0````$`````P00``````,B#`````````0````$````@
+MR00``````/"#`````````0````$```#@S`0``````!B$`````````0````$`
+M``#@S@0``````$"$`````````0````$```"PSP0``````("$`````````0``
+M``$```"@T`0``````)B$`````````0````$```#0T`0``````,"$````````
+M`0````$```!PTP0``````.B$`````````0````$````0U`0``````!"%````
+M`````0````$```"PU`0``````#B%`````````0````$```!`U00``````&"%
+M`````````0````$```#0U00``````(B%`````````0````$```!PU@0`````
+M`+"%`````````0````$`````UP0``````-B%`````````0````$```"0UP0`
+M``````"&`````````0````$```!0V`0``````"B&`````````0````$```!`
+MV00``````%"&`````````0````$```"0X00``````)"&`````````0````$`
+M```0Z00``````*B&`````````0````$```!0Z00``````,"&`````````0``
+M``$```"`Z00``````/"&`````````0````$````0Z@0``````!B'````````
+M`0````$```!PZ@0``````$"'`````````0````$```#`Z@0``````&"'````
+M`````0````$```#@Z@0``````(B'`````````0````$```#@ZP0``````+"'
+M`````````0````$```!P[`0``````/"'`````````0````$```"0[@0`````
+M`!"(`````````0````$```#P[@0``````#"(`````````0````$```!0[P0`
+M`````%B(`````````0````$```!`\`0``````'B(`````````0````$```"@
+M\`0``````)B(`````````0````$`````\00``````-B(`````````0````$`
+M``!P\P0```````")`````````0````$```!0]@0``````"")`````````0``
+M``$```"@]@0``````$")`````````0````$```#@]@0``````&B)````````
+M`0````$````P]P0``````(")`````````0````$```!0]P0``````*")````
+M`````0````$```!`^`0``````.")`````````0````$```#P^`0``````/B)
+M`````````0````$````0^00``````!"*`````````0````$````@^00`````
+M`#"*`````````0````$````0^@0``````$B*`````````0````$```!P^@0`
+M`````'"*`````````0````$````@^P0``````)B*`````````0````$````0
+M_`0``````-B*`````````0````$```!0_00``````"B+`````````0````$`
+M``"0_@0``````$"+`````````0````$```#`_P0``````&"+`````````0``
+M``$```!P`04``````'B+`````````0````$```"``04``````)"+````````
+M`0````$```"0`04``````*B+`````````0````$```"P`04``````,"+````
+M`````0````$```#0`04``````-B+`````````0````$``````@4``````/"+
+M`````````0````$````P`@4``````!B,`````````0````$```"``P4`````
+M`$",`````````0````$```#`!`4``````%B,`````````0````$`````!04`
+M`````(",`````````0````$```"@!04``````)B,`````````0````$`````
+M!@4``````+",`````````0````$````@!@4``````.",`````````0````$`
+M```P"04```````B-`````````0````$```"0"04``````""-`````````0``
+M``$```#0"04``````#B-`````````0````$```#@"04``````&"-````````
+M`0````$```"`"@4``````)B-`````````0````$```#P"@4``````+B-````
+M`````0````$```!P"P4``````."-`````````0````$```#P"P4```````B.
+M`````````0````$```"@#`4``````#".`````````0````$````P#04`````
+M`%B.`````````0````$```#P#04``````(".`````````0````$```!P#@4`
+M`````*B.`````````0````$````@#P4``````-".`````````0````$```!`
+M$`4``````/B.`````````0````$```#P$`4``````""/`````````0````$`
+M``"@$04``````$B/`````````0````$```"`$@4``````'"/`````````0``
+M``$```!@$P4``````)"/`````````0````$```#P$P4``````-"/````````
+M`0````$`````%04```````"0`````````0````$```!0%@4``````!B0````
+M`````0````$```"@%@4``````%B0`````````0````$````P&@4``````'B0
+M`````````0````$```"P&@4``````)"0`````````0````$```#@&@4`````
+M`*B0`````````0````$````P&P4``````."0`````````0````$````P'`4`
+M`````""1`````````0````$````0'@4``````&"1`````````0````$```!@
+M'P4``````'B1`````````0````$```!P'P4``````)"1`````````0````$`
+M``"`'P4``````*B1`````````0````$```"0'P4``````."1`````````0``
+M``$```"@(@4```````"2`````````0````$```#`(@4``````""2````````
+M`0````$```!`(P4``````$B2`````````0````$````@)`4``````'B2````
+M`````0````$```"`)04``````)"2`````````0````$```"0)04``````+B2
+M`````````0````$```"P)P4``````-"2`````````0````$```#`)P4`````
+M`/B2`````````0````$```#P*`4``````#B3`````````0````$```!`+@4`
+M`````'B3`````````0````$````P,04``````*"3`````````0````$```"0
+M,@4``````,B3`````````0````$```!0,P4``````/"3`````````0````$`
+M``#0.04``````!B4`````````0````$```!P/04``````#B4`````````0``
+M``$```#`/04``````%B4`````````0````$```#@/04``````'"4````````
+M`0````$```#P/04``````(B4`````````0````$```!0/@4``````*"4````
+M`````0````$```"0/@4``````,"4`````````0````$```#0/@4``````.B4
+M`````````0````$````@0@4``````!"5`````````0````$```"P2`4`````
+M`#B5`````````0````$```"03P4``````%"5`````````0````$```#@404`
+M`````&B5`````````0````$`````4@4``````)"5`````````0````$```"0
+M4P4``````+B5`````````0````$```!P6`4``````."5`````````0````$`
+M``!0604```````"6`````````0````$```#0604``````"B6`````````0``
+M``$```!@6P4``````$B6`````````0````$`````7`4``````&"6````````
+M`0````$```!@7`4``````'B6`````````0````$```#`7`4``````)B6````
+M`````0````$```#@7`4``````+B6`````````0````$`````704``````.B6
+M`````````0````$```"08P4```````B7`````````0````$`````9`4`````
+M`$"7`````````0````$````@9`4``````%B7`````````0````$```"09`4`
+M`````)B7`````````0````$```"@904``````+"7`````````0````$```#@
+M904``````,B7`````````0````$````@9@4``````."7`````````0````$`
+M``!P9@4```````"8`````````0````$```#`9@4``````#"8`````````0``
+M``$```#09@4``````$B8`````````0````$```#P9@4``````&"8````````
+M`0````$````09P4``````'B8`````````0````$```!`9P4``````)B8````
+M`````0````$```"`9P4``````+"8`````````0````$```#`9P4``````,B8
+M`````````0````$```#09P4``````."8`````````0````$````P:`4`````
+M`/B8`````````0````$```!`:`4``````!"9`````````0````$```!@:`4`
+M`````"B9`````````0````$```"0:`4``````$"9`````````0````$```#`
+M:`4``````%B9`````````0````$```#P:`4``````'"9`````````0````$`
+M```@:04``````(B9`````````0````$```!0:P4``````*B9`````````0``
+M``$`````;`4``````-B9`````````0````$```!`;`4``````/"9````````
+M`0````$```#`;`4``````!B:`````````0````$```!P;@4``````%":````
+M`````0````$```#P<`4``````&B:`````````0````$```!@<04``````(":
+M`````````0````$```#0<04``````*":`````````0````$````0<@4`````
+M`+B:`````````0````$```"@<@4``````/B:`````````0````$````@=`4`
+M`````!B;`````````0````$`````>`4``````%";`````````0````$````@
+M@P4``````)";`````````0````$````0A`4``````+";`````````0````$`
+M``"PA`4``````-";`````````0````$```#`A`4``````/B;`````````0``
+M``$`````A@4``````!B<`````````0````$````@A@4``````#"<````````
+M`0````$```!PA@4``````$B<`````````0````$`````AP4``````'"<````
+M`````0````$````@C04``````(B<`````````0````$```"@C04``````*"<
+M`````````0````$````0C@4``````."<`````````0````$````0FP4`````
+M``B=`````````0````$```"@FP4``````#"=`````````0````$```#PG`4`
+M`````%B=`````````0````$`````G@4``````("=`````````0````$```#0
+MH04``````*B=`````````0````$```!@I@4``````."=`````````0````$`
+M```PJ@4``````"">`````````0````$```#`K`4``````%B>`````````0``
+M``$`````KP4``````)B>`````````0````$````0L04``````-B>````````
+M`0````$```#`N@4``````/B>`````````0````$```"`NP4``````"B?````
+M`````0````$```#PO@4``````$B?`````````0````$````0OP4``````&B?
+M`````````0````$```#`OP4``````("?`````````0````$`````P`4`````
+M`,"?`````````0````$```"`R`4```````"@`````````0````$```!@S`4`
+M`````"B@`````````0````$```"0U@4``````%"@`````````0````$`````
+MUP4``````)"@`````````0````$```"0W@4``````+B@`````````0````$`
+M``!0WP4``````/B@`````````0````$```!PX04``````""A`````````0``
+M``$````PX@4``````$BA`````````0````$```#`Y`4``````&BA````````
+M`0````$`````Y04``````)BA`````````0````$```#`Y04``````-BA````
+M`````0````$```#`Z`4```````"B`````````0````$```#`Z04``````"BB
+M`````````0````$```#0Z@4``````&BB`````````0````$```!PZP4`````
+M`)"B`````````0````$```#0[`4``````*BB`````````0````$```!`[04`
+M`````,"B`````````0````$```"0[04```````"C`````````0````$```#@
+M[@4``````""C`````````0````$```!P[P4``````#BC`````````0````$`
+M``#0[P4``````&BC`````````0````$```!P\`4``````*BC`````````0``
+M``$```#@\04``````,BC`````````0````$````P\@4``````/"C````````
+M`0````$````@]@4``````!BD`````````0````$````P]P4``````$"D````
+M`````0````$```"`^`4``````&"D`````````0````$```"`^04``````(BD
+M`````````0````$```!`^@4``````*BD`````````0````$```"P^@4`````
+M`-"D`````````0````$```"`_`4``````/BD`````````0````$```#@_04`
+M`````#BE`````````0````$```!`_P4``````%"E`````````0````$```#`
+M_P4``````("E`````````0````$````0``8``````)BE`````````0````$`
+M```@`08``````-BE`````````0````$```"`!08``````/"E`````````0``
+M``$```#`!@8```````BF`````````0````$```!0!P8``````""F````````
+M`0````$```"`!P8``````#BF`````````0````$```"0!P8``````%"F````
+M`````0````$```#@!P8``````'BF`````````0````$```!@"08``````)BF
+M`````````0````$```"`"08``````+BF`````````0````$```"@"08`````
+M`."F`````````0````$```"0"P8```````BG`````````0````$```"0#`8`
+M`````$BG`````````0````$```#P#08``````&BG`````````0````$````P
+M#@8``````)"G`````````0````$```"@#@8``````*BG`````````0````$`
+M``#0#@8``````-"G`````````0````$`````$`8``````/"G`````````0``
+M``$````P$`8```````BH`````````0````$```!P$`8``````#BH````````
+M`0````$```#P$08``````&"H`````````0````$```!`$P8``````("H````
+M`````0````$````P%`8``````*"H`````````0````$```"0%`8``````,"H
+M`````````0````$```#0%`8``````."H`````````0````$````0%08`````
+M`/BH`````````0````$```!`%08``````!BI`````````0````$```!P%08`
+M`````#"I`````````0````$```"@%08``````%"I`````````0````$```#@
+M%08``````&BI`````````0````$`````%@8``````(BI`````````0````$`
+M```P%@8``````*"I`````````0````$```!@%@8``````,"I`````````0``
+M``$```"@%@8``````-BI`````````0````$```#0%@8```````"J````````
+M`0````$```#P&08``````"BJ`````````0````$```"P&@8``````%"J````
+M`````0````$```"`&P8``````'BJ`````````0````$```!P'`8``````*"J
+M`````````0````$```!P'08``````,BJ`````````0````$````0'P8`````
+M`/"J`````````0````$```!@(`8``````!BK`````````0````$```!P(08`
+M`````$"K`````````0````$```"`(@8``````&BK`````````0````$```"P
+M(P8``````)"K`````````0````$```#@)`8``````+BK`````````0````$`
+M``"0)08``````-"K`````````0````$```#P)08``````/"K`````````0``
+M``$````P)@8```````BL`````````0````$```!`)P8``````"BL````````
+M`0````$```"`)P8``````$"L`````````0````$```!P*`8``````&BL````
+M`````0````$```#`*08``````("L`````````0````$```#P*08``````)BL
+M`````````0````$````@*@8``````,"L`````````0````$```"P+08`````
+M`."L`````````0````$```!`+@8```````BM`````````0````$```"0+@8`
+M`````""M`````````0````$`````+P8``````$BM`````````0````$```!`
+M,`8``````'"M`````````0````$```#@,08``````)BM`````````0````$`
+M``"0,@8``````,"M`````````0````$````@-`8``````.BM`````````0``
+M``$````0-08``````!"N`````````0````$```"@-08``````#BN````````
+M`0````$```!0-@8``````(BN`````````0````$```!`.`8``````*"N````
+M`````0````$```!@.`8``````+BN`````````0````$````0.08``````."N
+M`````````0````$```"`.08```````"O`````````0````$```"P.08`````
+M`"BO`````````0````$```!0.P8``````%BO`````````0````$```#P.P8`
+M`````'BO`````````0````$```"`/`8``````)BO`````````0````$````0
+M/08``````,"O`````````0````$````@/@8``````/"O`````````0````$`
+M```0/P8``````!"P`````````0````$```"0/P8``````"BP`````````0``
+M``$```"P/P8``````$"P`````````0````$```#P/P8``````%BP````````
+M`0````$````P0`8``````("P`````````0````$```#@208``````)BP````
+M`````0````$````P2@8``````,"P`````````0````$```#02P8``````."P
+M`````````0````$```#03`8``````!BQ`````````0````$```!03@8`````
+M`#"Q`````````0````$```#03@8``````'"Q`````````0````$```!@408`
+M`````)BQ`````````0````$`````4@8``````,BQ`````````0````$```!`
+M5`8``````/"Q`````````0````$````P508``````!BR`````````0````$`
+M``#P508``````%BR`````````0````$```"P6`8``````)BR`````````0``
+M``$```"P6P8``````-BR`````````0````$```!`7P8``````!BS````````
+M`0````$````08P8``````$BS`````````0````$`````9`8``````&"S````
+M`````0````$```!09`8``````'BS`````````0````$```"@9`8``````*"S
+M`````````0````$```"@:`8``````."S`````````0````$```#0;@8`````
+M``BT`````````0````$```#P<08``````#"T`````````0````$`````>08`
+M`````%BT`````````0````$```#`?08``````)BT`````````0````$```"@
+M@`8``````,"T`````````0````$```"@@08```````"U`````````0````$`
+M``!@@@8``````$"U`````````0````$````@@P8``````%BU`````````0``
+M``$```"0@P8``````'"U`````````0````$```"@@P8``````+"U````````
+M`0````$```!`A@8``````,BU`````````0````$```!PA@8``````/BU````
+M`````0````$```"`C@8``````!BV`````````0````$```#0C@8``````#"V
+M`````````0````$````@CP8``````%BV`````````0````$```!`EP8`````
+M`("V`````````0````$`````FP8``````*BV`````````0````$`````G08`
+M`````-"V`````````0````$```#0G08``````!"W`````````0````$```#`
+MG@8``````"BW`````````0````$```#PG@8``````%"W`````````0````$`
+M``"0H08``````'BW`````````0````$````PH@8``````*"W`````````0``
+M``$```#0H@8``````,BW`````````0````$```!@HP8``````/"W````````
+M`0````$```#PHP8``````!BX`````````0````$```"0I`8``````$"X````
+M`````0````$````@I08``````&BX`````````0````$```"PI08``````)"X
+M`````````0````$```!PI@8``````+BX`````````0````$```!@IP8`````
+M`."X`````````0````$```"PKP8``````""Y`````````0````$````PMP8`
+M`````#BY`````````0````$```!PMP8``````%"Y`````````0````$```"@
+MMP8``````("Y`````````0````$````PN`8``````*BY`````````0````$`
+M``"0N`8``````-"Y`````````0````$```#@N`8``````/"Y`````````0``
+M``$`````N08``````!BZ`````````0````$`````N@8``````$"Z````````
+M`0````$```"0N@8``````("Z`````````0````$```"PO`8``````*"Z````
+M`````0````$````0O08``````,"Z`````````0````$```!PO08``````.BZ
+M`````````0````$```!@O@8```````B[`````````0````$```#`O@8`````
+M`"B[`````````0````$````@OP8``````&B[`````````0````$```"0P08`
+M`````)"[`````````0````$```!PQ`8``````+"[`````````0````$```#`
+MQ`8``````-"[`````````0````$`````Q08``````/B[`````````0````$`
+M``!0Q08``````!"\`````````0````$```!PQ08``````#"\`````````0``
+M``$```!@Q@8``````'"\`````````0````$````0QP8``````(B\````````
+M`0````$````PQP8``````*"\`````````0````$```!`QP8``````,"\````
+M`````0````$````PR`8``````-B\`````````0````$```"0R`8```````"]
+M`````````0````$```!`R08``````"B]`````````0````$````PR@8`````
+M`&B]`````````0````$```!PRP8``````+B]`````````0````$```"PS`8`
+M`````-"]`````````0````$```#@S08``````/"]`````````0````$```"0
+MSP8```````B^`````````0````$```"@SP8``````""^`````````0````$`
+M``"PSP8``````#B^`````````0````$```#0SP8``````%"^`````````0``
+M``$```#PSP8``````&B^`````````0````$````@T`8``````("^````````
+M`0````$```!0T`8``````*B^`````````0````$```"@T08``````-"^````
+M`````0````$```#@T@8``````.B^`````````0````$````@TP8``````!"_
+M`````````0````$```#`TP8``````"B_`````````0````$````@U`8`````
+M`$"_`````````0````$```!`U`8``````'"_`````````0````$```!0UP8`
+M`````)B_`````````0````$```"PUP8``````+"_`````````0````$```#P
+MUP8``````,B_`````````0````$`````V`8``````/"_`````````0````$`
+M``"@V`8``````"C``````````0````$````0V08``````$C``````````0``
+M``$```"0V08``````'#``````````0````$````0V@8``````)C`````````
+M`0````$```#`V@8``````,#``````````0````$```!0VP8``````.C`````
+M`````0````$````0W`8``````!#!`````````0````$```"0W`8``````#C!
+M`````````0````$```!`W08``````&#!`````````0````$```!@W@8`````
+M`(C!`````````0````$````0WP8``````+#!`````````0````$```#`WP8`
+M`````-C!`````````0````$```"@X`8```````#"`````````0````$```"`
+MX08``````"#"`````````0````$````0X@8``````&#"`````````0````$`
+M```@XP8``````)C"`````````0````$```!PY@8``````+C"`````````0``
+M``$```#PY@8``````-#"`````````0````$````@YP8``````.C"````````
+M`0````$```!PYP8``````"##`````````0````$```!PZ`8``````&##````
+M`````0````$```!0Z@8``````*##`````````0````$```"@ZP8``````+C#
+M`````````0````$```"PZP8``````-##`````````0````$```#`ZP8`````
+M`.C#`````````0````$```#0ZP8``````"#$`````````0````$```#@[@8`
+M`````$#$`````````0````$`````[P8``````&#$`````````0````$```"`
+M[P8``````(C$`````````0````$```!@\`8``````+C$`````````0````$`
+M``#`\08``````-#$`````````0````$```#0\08``````/C$`````````0``
+M``$```#P\P8``````!#%`````````0````$`````]`8``````#C%````````
+M`0````$````P]08``````'C%`````````0````$```"`^@8``````+C%````
+M`````0````$```!P_08``````.#%`````````0````$```#0_@8```````C&
+M`````````0````$```"0_P8``````##&`````````0````$````0!@<`````
+M`%C&`````````0````$```"P"0<``````'C&`````````0````$`````"@<`
+M`````)C&`````````0````$````@"@<``````+#&`````````0````$````P
+M"@<``````,C&`````````0````$```"0"@<``````.#&`````````0````$`
+M``#0"@<```````#'`````````0````$````0"P<``````"C'`````````0``
+M``$```!@#@<``````%#'`````````0````$```#P%`<``````'C'````````
+M`0````$```#0&P<``````)#'`````````0````$````@'@<``````*C'````
+M`````0````$```!`'@<``````-#'`````````0````$```#0'P<``````/C'
+M`````````0````$```"P)`<``````"#(`````````0````$```"0)0<`````
+M`$#(`````````0````$````0)@<``````&C(`````````0````$```"@)P<`
+M`````(C(`````````0````$```!`*`<``````*#(`````````0````$```"@
+M*`<``````+C(`````````0````$`````*0<``````-C(`````````0````$`
+M```@*0<``````/C(`````````0````$```!`*0<``````"C)`````````0``
+M``$```#0+P<``````$C)`````````0````$```!`,`<``````(#)````````
+M`0````$```!@,`<``````)C)`````````0````$```"`,`<``````+#)````
+M`````0````$```"0,`<``````.#)`````````0````$```!0,0<``````/C)
+M`````````0````$```"0,0<``````!#*`````````0````$```"@,0<`````
+M`#C*`````````0````$```!0,@<``````&#*`````````0````$````P,P<`
+M`````'C*`````````0````$```!@,P<``````*#*`````````0````$```"P
+M,P<``````,#*`````````0````$```!`-`<``````-C*`````````0````$`
+M``!P-`<```````C+`````````0````$````0-@<``````#C+`````````0``
+M``$```"`-P<``````&C+`````````0````$````@.`<``````)#+````````
+M`0````$`````.0<``````+C+`````````0````$```"0.0<``````/#+````
+M`````0````$````@.P<``````##,`````````0````$```"`/`<``````&#,
+M`````````0````$```!P/0<``````(C,`````````0````$```!P/@<`````
+M`*#,`````````0````$```"@/@<``````,#,`````````0````$`````/P<`
+M`````.C,`````````0````$```!@/P<```````C-`````````0````$```"`
+M/P<``````"C-`````````0````$```"@/P<``````$C-`````````0````$`
+M``#`/P<``````'#-`````````0````$````@0`<``````)#-`````````0``
+M``$```!00`<``````+C-`````````0````$```#@0`<``````-C-````````
+M`0````$````@00<``````/#-`````````0````$```!P00<``````!C.````
+M`````0````$```"@0@<``````$#.`````````0````$````P0P<``````&#.
+M`````````0````$```!00P<``````'C.`````````0````$```!@0P<`````
+M`)#.`````````0````$```"00P<``````*C.`````````0````$```#00P<`
+M`````,C.`````````0````$```!@1`<``````/#.`````````0````$````0
+M10<``````"#/`````````0````$```#`10<``````%#/`````````0````$`
+M```P1@<``````&C/`````````0````$```"`1@<``````)#/`````````0``
+M``$```#P1@<``````+C/`````````0````$```!01P<``````-C/````````
+M`0````$```"@1P<```````#0`````````0````$```"`2`<``````"C0````
+M`````0````$```"@20<``````$C0`````````0````$```#P20<``````&#0
+M`````````0````$`````2@<``````(C0`````````0````$```"02P<`````
+M`*#0`````````0````$```#`2P<``````,#0`````````0````$`````3`<`
+M`````.#0`````````0````$````P30<```````C1`````````0````$`````
+M3@<``````"C1`````````0````$```!`3@<``````$C1`````````0````$`
+M``"`3@<``````&C1`````````0````$`````3P<``````(C1`````````0``
+M``$````P3P<``````*#1`````````0````$```"P3P<``````+C1````````
+M`0````$````@4`<``````/C1`````````0````$```#04P<``````"#2````
+M`````0````$```!`5`<``````$C2`````````0````$```"P50<``````'C2
+M`````````0````$`````5P<``````)C2`````````0````$```!`5P<`````
+M`+C2`````````0````$```"P5P<``````.C2`````````0````$```!@60<`
+M``````C3`````````0````$```#`60<``````##3`````````0````$```"P
+M6@<``````%C3`````````0````$````@6P<``````(C3`````````0````$`
+M``#P7P<``````+#3`````````0````$```"P80<``````,C3`````````0``
+M``$```!08@<``````.#3`````````0````$```#08@<``````"#4````````
+M`0````$```!@9`<``````$#4`````````0````$```"P9`<``````&#4````
+M`````0````$`````90<``````(C4`````````0````$```#P9@<``````*C4
+M`````````0````$```!09P<``````,C4`````````0````$```!@9P<`````
+M`.C4`````````0````$```#@9P<```````#5`````````0````$```#P9P<`
+M`````"#5`````````0````$````P:`<``````$C5`````````0````$`````
+M:0<``````&C5`````````0````$````P:0<``````)#5`````````0````$`
+M``"P:0<``````+#5`````````0````$````@:@<``````.C5`````````0``
+M``$```"`:@<```````#6`````````0````$```#0:@<``````!C6````````
+M`0````$`````:P<``````##6`````````0````$````P:P<``````$C6````
+M`````0````$```!@:P<``````'C6`````````0````$```#P:P<``````*#6
+M`````````0````$```!0;`<``````-C6`````````0````$````@;0<`````
+M`!#7`````````0````$```#P;0<``````%#7`````````0````$```#P;@<`
+M`````(#7`````````0````$```!@;P<``````*C7`````````0````$```"`
+M<`<``````-#7`````````0````$```#@<0<``````!#8`````````0````$`
+M```P<P<``````"C8`````````0````$`````=`<``````$#8`````````0``
+M``$```!P=`<``````%C8`````````0````$```#0=`<``````(#8````````
+M`0````$```"@=@<``````)C8`````````0````$````P=P<``````+C8````
+M`````0````$````P>`<``````-C8`````````0````$`````>@<```````C9
+M`````````0````$`````>P<``````#C9`````````0````$`````?`<`````
+M`%#9`````````0````$```!`?`<``````(#9`````````0````$```#P?0<`
+M`````+#9`````````0````$```"P?P<``````.#9`````````0````$```"`
+M@0<``````!#:`````````0````$```"P@P<``````#C:`````````0````$`
+M``!0A`<``````&#:`````````0````$```#PA`<``````(C:`````````0``
+M``$```#0A0<``````+#:`````````0````$```#`A@<``````/#:````````
+M`0````$```"`B0<```````C;`````````0````$`````B@<``````"#;````
+M`````0````$```#0B@<``````&#;`````````0````$```#PC@<``````*#;
+M`````````0````$```"0D`<``````-#;`````````0````$```!0D0<`````
+M`/#;`````````0````$````0D@<``````!#<`````````0````$```!0D@<`
+M`````#C<`````````0````$```#0DP<``````'C<`````````0````$`````
+MEP<``````)#<`````````0````$````0EP<``````+#<`````````0````$`
+M``"`EP<``````-#<`````````0````$```"@F`<``````/#<`````````0``
+M``$```#@F`<``````!#=`````````0````$```!PF0<``````##=````````
+M`0````$```!PG`<``````%#=`````````0````$````0G@<``````'#=````
+M`````0````$```!0G@<``````)C=`````````0````$```#@GP<``````,#=
+M`````````0````$```"PH`<```````#>`````````0````$```!PK0<`````
+M`!C>`````````0````$```#PK0<``````##>`````````0````$```!PK@<`
+M`````%#>`````````0````$```#@K@<``````'C>`````````0````$```"`
+MMP<``````+#>`````````0````$```#@N`<``````.#>`````````0````$`
+M``"@N0<```````C?`````````0````$```"0N@<``````"C?`````````0``
+M``$```#@N@<``````%C?`````````0````$```"`NP<``````(#?````````
+M`0````$```"@O`<``````+#?`````````0````$```!0O0<``````-C?````
+M`````0````$```#`O0<```````#@`````````0````$```!POP<``````"#@
+M`````````0````$```#@OP<``````$C@`````````0````$```!@P`<`````
+M`'#@`````````0````$```"`P0<``````)#@`````````0````$```#`P0<`
+M`````+C@`````````0````$```#`P@<``````.C@`````````0````$```!@
+MQ0<``````!CA`````````0````$```"@R0<``````$#A`````````0````$`
+M``"0R@<``````'#A`````````0````$```#@RP<``````*CA`````````0``
+M``$````PS@<``````-#A`````````0````$```#`S@<``````/#A````````
+M`0````$```#0S@<``````"CB`````````0````$```#0SP<``````$CB````
+M`````0````$````@T`<``````'#B`````````0````$`````U`<``````(CB
+M`````````0````$```#0U`<``````+#B`````````0````$```!0U0<`````
+M`.#B`````````0````$```"PU0<```````#C`````````0````$````0U@<`
+M`````"#C`````````0````$```!0U@<``````$CC`````````0````$```!@
+MUP<``````&CC`````````0````$```"PUP<``````)#C`````````0````$`
+M``!`V`<``````+CC`````````0````$```#@V0<``````-CC`````````0``
+M``$````PV@<```````#D`````````0````$```"`W`<``````##D````````
+M`0````$```#0W@<``````%#D`````````0````$```!`WP<``````&CD````
+M`````0````$```#@WP<``````)#D`````````0````$```#0X`<``````+#D
+M`````````0````$`````X0<``````-CD`````````0````$```!`X@<`````
+M`/CD`````````0````$```!PX@<``````!CE`````````0````$```#PX@<`
+M`````$CE`````````0````$````@Y`<``````'#E`````````0````$```#`
+MY`<``````+#E`````````0````$````0Y@<``````.#E`````````0````$`
+M``#0Y@<```````#F`````````0````$```#PY@<``````!CF`````````0``
+M``$````0YP<``````#CF`````````0````$```!0YP<``````%#F````````
+M`0````$```!PYP<``````'CF`````````0````$````@Z0<``````)#F````
+M`````0````$```!`Z0<``````+CF`````````0````$```"PZ0<``````.#F
+M`````````0````$```!0ZP<``````/CF`````````0````$```!PZP<`````
+M`!CG`````````0````$```#`ZP<``````##G`````````0````$```#@ZP<`
+M`````%#G`````````0````$````P[`<``````&CG`````````0````$```!0
+M[`<``````(CG`````````0````$```"@[`<``````*#G`````````0````$`
+M``#`[`<``````,CG`````````0````$````P[0<``````.#G`````````0``
+M``$```!0[0<```````#H`````````0````$```"@[0<``````!CH````````
+M`0````$```#`[0<``````$CH`````````0````$```!@[@<``````&#H````
+M`````0````$```"`[@<``````)CH`````````0````$```!P[P<``````+#H
+M`````````0````$```"0[P<``````.CH`````````0````$```"`\`<`````
+M``#I`````````0````$```"@\`<``````#CI`````````0````$```"0\0<`
+M`````%#I`````````0````$```#`\0<``````'#I`````````0````$````@
+M\@<``````(CI`````````0````$```!0\@<``````*CI`````````0````$`
+M``"P\@<``````,CI`````````0````$```#P\@<``````.CI`````````0``
+M``$```!0\P<```````CJ`````````0````$```"0\P<``````"CJ````````
+M`0````$```#P\P<``````$CJ`````````0````$````P]`<``````&CJ````
+M`````0````$```"0]`<``````(CJ`````````0````$````0]0<``````*CJ
+M`````````0````$```!@]0<``````,CJ`````````0````$```#@]0<`````
+M`/#J`````````0````$```"0]@<``````!CK`````````0````$````P]P<`
+M`````$#K`````````0````$`````^`<``````&CK`````````0````$```#@
+M^`<``````)#K`````````0````$````@^0<``````+#K`````````0````$`
+M``!@^0<``````-CK`````````0````$````@^@<```````#L`````````0``
+M``$```!@^@<``````"#L`````````0````$```"@^@<``````#CL````````
+M`0````$```#`^@<``````&#L`````````0````$```!0^P<``````'CL````
+M`````0````$```"0^P<``````*#L`````````0````$```!@_`<``````,CL
+M`````````0````$````@_0<``````/#L`````````0````$```!@_0<`````
+M`!#M`````````0````$```"@_0<``````#CM`````````0````$```!P_@<`
+M`````&#M`````````0````$```"P_@<``````(#M`````````0````$```#P
+M_@<``````*CM`````````0````$```#@_P<``````-#M`````````0````$`
+M```P``@``````/#M`````````0````$```!P``@``````!CN`````````0``
+M``$```"``0@``````$#N`````````0````$```#0`0@``````&#N````````
+M`0````$````0`@@``````(#N`````````0````$```#``@@``````*#N````
+M`````0````$````@`P@``````,#N`````````0````$```!@`P@``````-CN
+M`````````0````$```"``P@``````/CN`````````0````$```#``P@`````
+M`!CO`````````0````$````P!`@``````$#O`````````0````$```"`!`@`
+M`````&#O`````````0````$```#P!`@``````(CO`````````0````$```!`
+M!0@``````*CO`````````0````$```"P!0@``````-#O`````````0````$`
+M````!@@``````/#O`````````0````$```!P!@@``````!CP`````````0``
+M``$```#`!@@``````#CP`````````0````$````P!P@``````&#P````````
+M`0````$```"`!P@``````(#P`````````0````$```#P!P@``````*CP````
+M`````0````$```!`"`@``````,CP`````````0````$```#P"`@``````.CP
+M`````````0````$````P"P@```````CQ`````````0````$```"P"P@`````
+M`"CQ`````````0````$```#0"P@``````$CQ`````````0````$````0#`@`
+M`````&CQ`````````0````$```"0#`@``````(CQ`````````0````$```"P
+M#`@``````*CQ`````````0````$```#P#`@``````-#Q`````````0````$`
+M``#P#0@``````/#Q`````````0````$```!`#@@``````!#R`````````0``
+M``$```"`#@@``````##R`````````0````$`````#P@``````%#R````````
+M`0````$```"@#P@``````'#R`````````0````$```#@#P@``````)#R````
+M`````0````$```!@$`@``````+#R`````````0````$```"`$`@``````-#R
+M`````````0````$```#`$`@``````/#R`````````0````$```!0$0@`````
+M`!#S`````````0````$```"0$0@``````##S`````````0````$````@$@@`
+M`````%#S`````````0````$```!@$@@``````&CS`````````0````$```"`
+M$@@``````(CS`````````0````$```#`$@@``````*#S`````````0````$`
+M``#@$@@``````,#S`````````0````$````@$P@``````-CS`````````0``
+M``$```!`$P@```````#T`````````0````$```#0$P@``````"#T````````
+M`0````$```"0%`@``````$#T`````````0````$```"P%`@``````&#T````
+M`````0````$```!P%0@``````(#T`````````0````$```"0%0@``````*#T
+M`````````0````$`````%@@``````,#T`````````0````$```!`%@@`````
+M`.CT`````````0````$`````%P@``````"#U`````````0````$`````&`@`
+M`````$CU`````````0````$```#`&`@``````'#U`````````0````$```!`
+M&0@``````)#U`````````0````$```"`&0@``````+#U`````````0````$`
+M``#P&0@``````-#U`````````0````$````@&@@``````/#U`````````0``
+M``$```!@&@@```````CV`````````0````$```"0&@@``````$CV````````
+M`0````$```!P&P@``````&CV`````````0````$```#@&P@``````(CV````
+M`````0````$````@'`@``````*CV`````````0````$```#0'`@``````,CV
+M`````````0````$```"0'0@``````.#V`````````0````$```#@'0@`````
+M``#W`````````0````$```!P'@@``````"CW`````````0````$```"0'P@`
+M`````%#W`````````0````$```"@(`@``````'#W`````````0````$`````
+M(0@``````)#W`````````0````$````P(0@``````*CW`````````0````$`
+M``!`(0@``````,CW`````````0````$```!`(@@``````/#W`````````0``
+M``$```#0(P@``````"#X`````````0````$```#`)`@``````$CX````````
+M`0````$```#`)P@``````&#X`````````0````$```#0)P@``````'CX````
+M`````0````$````0*`@``````)CX`````````0````$```!@*`@``````+CX
+M`````````0````$```"P*`@``````.#X`````````0````$```!P*0@`````
+M``CY`````````0````$````@*@@``````##Y`````````0````$````0*P@`
+M`````'#Y`````````0````$````0+`@``````(CY`````````0````$````0
+M+0@``````*CY`````````0````$```"0+0@``````,#Y`````````0````$`
+M````+@@``````.#Y`````````0````$```!@+@@``````/CY`````````0``
+M``$````P+P@``````!CZ`````````0````$```#@,`@``````#CZ````````
+M`0````$```"0,0@``````%#Z`````````0````$```"P,0@``````&CZ````
+M`````0````$```#`,0@``````*CZ`````````0````$```#`-`@``````,CZ
+M`````````0````$`````-0@``````.CZ`````````0````$```!0-0@`````
+M``C[`````````0````$```#`-0@``````#C[`````````0````$```#`-@@`
+M`````&#[`````````0````$```"@-P@``````*#[`````````0````$```!@
+M.0@``````+C[`````````0````$```"`.0@``````.#[`````````0````$`
+M``"0.@@```````C\`````````0````$````0/0@``````##\`````````0``
+M``$```"P/@@``````&#\`````````0````$```!@10@``````'C\````````
+M`0````$```"@10@``````*C\`````````0````$```"@2`@``````,C\````
+M`````0````$```#`2`@``````/#\`````````0````$```!@20@``````!C]
+M`````````0````$```#P20@``````##]`````````0````$```"`2@@`````
+M`'#]`````````0````$```"02P@``````)C]`````````0````$```"@3`@`
+M`````,#]`````````0````$````P30@``````.C]`````````0````$```!@
+M3P@``````!#^`````````0````$```!`4`@``````##^`````````0````$`
+M``"P4`@``````%#^`````````0````$```!040@``````'C^`````````0``
+M``$```!@4@@``````+C^`````````0````$```#`4@@``````-#^````````
+M`0````$```#@4@@``````.C^`````````0````$```#P4@@```````#_````
+M`````0````$````04P@``````"#_`````````0````$```!P4P@``````$#_
+M`````````0````$```"04P@``````%C_`````````0````$```"@4P@`````
+M`'C_`````````0````$```#`4P@``````*#_`````````0````$```"P5`@`
+M`````,#_`````````0````$`````50@``````````0```````0````$```!`
+M50@``````!@``0```````0````$```!P50@``````$@``0```````0````$`
+M``"@50@``````&@``0```````0````$```#050@``````(@``0```````0``
+M``$````05@@``````*@``0```````0````$```!`5@@``````-```0``````
+M`0````$`````5P@```````@!`0```````0````$````@5P@``````"@!`0``
+M`````0````$```!05P@``````$@!`0```````0````$```!P5P@``````&@!
+M`0```````0````$```"@5P@``````*@!`0```````0````$```"P6`@`````
+M`-`!`0```````0````$````P60@``````.@!`0```````0````$```#`60@`
+M``````@"`0```````0````$```#06@@``````#`"`0```````0````$````@
+M70@``````&@"`0```````0````$```!`70@``````(@"`0```````0````$`
+M``#`70@``````*@"`0```````0````$````@7@@``````-`"`0```````0``
+M``$```"@7@@``````/@"`0```````0````$```#`8`@``````"`#`0``````
+M`0````$```!09`@``````$`#`0```````0````$```!P9`@``````%@#`0``
+M`````0````$```#@9`@``````(`#`0```````0````$```"090@``````*`#
+M`0```````0````$```!`9@@``````+@#`0```````0````$```#`9@@`````
+M`.`#`0```````0````$```#@:`@``````"`$`0```````0````$````P:P@`
+M`````#@$`0```````0````$```!@:P@``````%`$`0```````0````$```"0
+M:P@``````(`$`0```````0````$```#P:P@``````*@$`0```````0````$`
+M``!`;`@``````,`$`0```````0````$```"`;`@``````-@$`0```````0``
+M``$`````;0@``````/`$`0```````0````$```!P;0@``````!`%`0``````
+M`0````$```!@;@@``````"@%`0```````0````$```"@;@@``````%`%`0``
+M`````0````$`````;P@``````)`%`0```````0````$```!P<`@``````+@%
+M`0```````0````$````@<@@``````/@%`0```````0````$```!@=`@`````
+M`"`&`0```````0````$````@=0@``````%@&`0```````0````$`````=@@`
+M`````(`&`0```````0````$```#`=P@``````*`&`0```````0````$````0
+M>`@``````-`&`0```````0````$```"0>`@``````/`&`0```````0````$`
+M``#0>`@``````#`'`0```````0````$````@?0@``````%`'`0```````0``
+M``$```!P?0@``````(@'`0```````0````$```!0?@@``````,@'`0``````
+M`0````$```#`?P@``````/@'`0```````0````$```!`@`@``````!@(`0``
+M`````0````$```#@@`@``````#`(`0```````0````$`````@@@``````%@(
+M`0```````0````$```"@@P@``````'@(`0```````0````$```#@@P@`````
+M`*`(`0```````0````$````PA0@``````,@(`0```````0````$```#`A@@`
+M``````@)`0```````0````$```!0B0@``````$@)`0```````0````$```"@
+MB@@``````(@)`0```````0````$```!@C`@``````+`)`0```````0````$`
+M``#@C`@``````-`)`0```````0````$````PC0@``````.@)`0```````0``
+M``$```"0C0@``````"@*`0```````0````$````@D@@``````&@*`0``````
+M`0````$```#`P0@``````*`*`0```````0````$```"@Q`@``````.`*`0``
+M`````0````$```!`R@@```````@+`0```````0````$```"PRP@``````"@+
+M`0```````0````$```!`S`@``````&@+`0```````0````$```!@SP@`````
+M`)`+`0```````0````$```!PT`@``````-`+`0```````0````$```#@TP@`
+M`````!`,`0```````0````$```#0VP@``````%`,`0```````0````$```#0
+MW@@``````'`,`0```````0````$````@WP@``````*@,`0```````0````$`
+M``#@WP@``````-`,`0```````0````$```"0X0@``````/@,`0```````0``
+M``$```"PXP@``````"`-`0```````0````$```!@Y@@``````$`-`0``````
+M`0````$```"@Y@@``````&`-`0```````0````$`````YP@``````)`-`0``
+M`````0````$```!0Z`@``````+`-`0```````0````$```"PZ`@``````-@-
+M`0```````0````$````PZ0@````````.`0```````0````$````PZ@@`````
+M`"@.`0```````0````$```#PZ@@``````$@.`0```````0````$````PZP@`
+M`````&@.`0```````0````$````P[`@``````*`.`0```````0````$```!@
+M[`@``````,`.`0```````0````$```"0[`@``````.`.`0```````0````$`
+M``"P[`@````````/`0```````0````$```#@[`@``````"@/`0```````0``
+M``$```!@[@@``````%`/`0```````0````$```#@[@@``````&@/`0``````
+M`0````$````@[P@``````(@/`0```````0````$```#0[P@``````+`/`0``
+3`````0````$`````\@@`````````
+`
+end
diff --git a/sys/dev/hpt27xx/array.h b/sys/dev/hpt27xx/array.h
new file mode 100644
index 0000000..e22464c
--- /dev/null
+++ b/sys/dev/hpt27xx/array.h
@@ -0,0 +1,187 @@
+/*-
+ * Copyright (c) 2011 HighPoint Technologies, Inc.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ */
+
+#include <dev/hpt27xx/hpt27xx_config.h>
+
+#ifndef _HPT_ARRAY_H_
+#define _HPT_ARRAY_H_
+
+#define VERMAGIC_ARRAY 46
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+#define MAX_ARRAY_NAME 16
+
+#ifndef MAX_MEMBERS
+#define MAX_MEMBERS 16
+#endif
+
+#if MAX_MEMBERS<=16
+typedef HPT_U16 HPT_MMASK;
+#elif MAX_MEMBERS<=32
+typedef HPT_U32 HPT_MMASK;
+#elif MAX_MEMBERS<=64
+typedef HPT_U64 HPT_MMASK;
+#else
+#error "MAX_MEMBERS too large"
+#endif
+
+#define HPT_MMASK_VALUE(x) (HPT_MMASK)((HPT_MMASK)1<<(x))
+
+#if MAX_MEMBERS<32
+#define HPT_MMASK_VALUE_SAFE(x) HPT_MMASK_VALUE(x)
+#else
+#define HPT_MMASK_VALUE_SAFE(x) ((x)>=MAX_MEMBERS? (HPT_MMASK)0 : HPT_MMASK_VALUE(x))
+#endif
+
+#define MAX_REBUILD_SECTORS 128
+
+typedef struct _RAID_FLAGS {
+ HPT_UINT rf_need_initialize : 1;
+ HPT_UINT rf_need_rebuild: 1;
+ HPT_UINT rf_need_sync: 1;
+ /* ioctl flags */
+ HPT_UINT rf_auto_rebuild: 1;
+ HPT_UINT rf_rebuilding: 1;
+ HPT_UINT rf_verifying: 1;
+ HPT_UINT rf_initializing: 1;
+ HPT_UINT rf_abort_verifying: 1;
+ HPT_UINT rf_raid15: 1;
+ HPT_UINT rf_v3_format : 1;
+ HPT_UINT rf_need_transform : 1;
+ HPT_UINT rf_transforming : 1;
+ HPT_UINT rf_abort_transform : 1;
+ HPT_UINT rf_log_write: 1;
+} RAID_FLAGS;
+
+typedef struct transform_cmd_ext
+{
+ HPT_LBA lba;
+ HPT_U16 total_sectors;
+ HPT_U16 finished_sectors;
+} TRANSFORM_CMD_EXT , *PTRANSFORM_CMD_EXT;
+
+
+#define TO_MOVE_DATA 0
+#define TO_INITIALIZE 1
+#define TO_INITIALIZE_ONLY 2
+#define TO_MOVE_DATA_ONLY 3
+typedef struct hpt_transform
+{
+ HPT_U32 stamp;
+ PVDEV source;
+ PVDEV target;
+ struct list_head link;
+ HPT_U8 transform_from_tail;
+ struct tq_item task;
+
+ struct lock_request lock;
+ TRANSFORM_CMD_EXT cmdext;
+
+ HPT_U64 transform_point;
+ HPT_U16 transform_sectors_per_step;
+ HPT_U8 operation;
+ HPT_U8 disabled;
+} HPT_TRANSFORM, *PHPT_TRANSFORM;
+
+typedef struct hpt_array
+{
+ HPT_U32 array_stamp;
+ HPT_U32 data_stamp;
+ HPT_U32 array_sn;
+
+ HPT_U8 ndisk;
+ HPT_U8 block_size_shift;
+ HPT_U16 strip_width;
+ HPT_U8 sector_size_shift; /*sector size = 512B<<sector_size_shift*/
+ HPT_U8 jid;
+ HPT_U8 reserved[2];
+
+
+ HPT_MMASK outdated_members;
+ HPT_MMASK offline_members;
+
+ PVDEV member[MAX_MEMBERS];
+
+ RAID_FLAGS flags;
+
+ HPT_U64 rebuilt_sectors;
+
+
+ HPT_U8 name[MAX_ARRAY_NAME];
+ PHPT_TRANSFORM transform;
+
+ TIME_RECORD create_time;
+ HPT_U8 description[64];
+ HPT_U8 create_manager[16];
+
+#ifdef OS_SUPPORT_TASK
+ int floating_priority;
+ OSM_TASK ioctl_task;
+ IOCTL_ARG ioctl_arg;
+
+ char ioctl_inbuf[sizeof(PVDEV)+sizeof(HPT_U64)+sizeof(HPT_U16)];
+ char ioctl_outbuf[sizeof(HPT_UINT)];
+#endif
+
+} HPT_ARRAY, *PHPT_ARRAY;
+
+#ifdef OS_SUPPORT_TASK
+void ldm_start_rebuild(struct _VDEV *pArray);
+#else
+#define ldm_start_rebuild(pArray)
+#endif
+
+typedef struct _raw_partition{
+ struct _raw_partition * next;
+ __HPT_RAW_LBA start;
+ __HPT_RAW_LBA capacity;
+ PVDEV vd_part;
+} RAW_PARTITION, *PRAW_PARTITION;
+
+typedef struct hpt_partiton
+{
+ PVDEV raw_disk;
+ __HPT_RAW_LBA des_location;
+ PRAW_PARTITION raw_part;
+ HPT_U8 del_mbr;
+ HPT_U8 reserved[3];
+} HPT_PARTITION, *PHPT_PARTITION;
+
+void ldm_check_array_online(PVDEV pArray);
+void ldm_generic_member_failed(PVDEV member);
+void ldm_sync_array_info(PVDEV pArray);
+void ldm_sync_array_stamp(PVDEV pArray);
+void ldm_add_spare_to_array(PVDEV pArray, PVDEV spare_partition);
+
+#if defined(__cplusplus)
+}
+#endif
+#endif
diff --git a/sys/dev/hpt27xx/him.h b/sys/dev/hpt27xx/him.h
new file mode 100644
index 0000000..58d4217
--- /dev/null
+++ b/sys/dev/hpt27xx/him.h
@@ -0,0 +1,496 @@
+/*-
+ * Copyright (c) 2011 HighPoint Technologies, Inc.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ */
+
+#include <dev/hpt27xx/hpt27xx_config.h>
+
+#ifndef _HPT_HIM_H_
+#define _HPT_HIM_H_
+
+#define VERMAGIC_HIM 55
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+#include <dev/hpt27xx/list.h>
+
+#define SECTOR_TO_BYTE_SHIFT 9
+#define SECTOR_TO_BYTE(x) ((HPT_U32)(x) << SECTOR_TO_BYTE_SHIFT)
+#define BYTE_TO_SECTOR(x) ((x)>>SECTOR_TO_BYTE_SHIFT)
+
+typedef struct _PCI_ID
+{
+ HPT_U16 vid;
+ HPT_U16 did;
+ HPT_U32 subsys;
+ HPT_U8 rev;
+ HPT_U8 nbase;
+ HPT_U16 reserve;
+}
+PCI_ID;
+
+typedef struct _PCI_ADDRESS
+{
+ HPT_U8 tree;
+ HPT_U8 bus;
+ HPT_U8 device;
+ HPT_U8 function;
+}
+PCI_ADDRESS;
+
+typedef struct _HIM_ADAPTER_CONFIG
+{
+ PCI_ADDRESS pci_addr;
+ PCI_ID pci_id;
+
+ HPT_U8 max_devices;
+
+ HPT_U8 bProbeInInitializing:1;
+
+ HPT_U8 bSpinupOneDevEachTime:1;
+
+ HPT_U8 bGlobalNcq:1;
+ HPT_U8 bSGPIOPartSupport:1;
+
+ HPT_U8 bNeedSASIdleTimer:1;
+ HPT_U8 reserved:3;
+
+ HPT_U8 bDevsPerBus;
+ HPT_U8 first_on_slot;
+
+ HPT_U8 bChipType;
+ HPT_U8 bChipIntrNum;
+ HPT_U8 bChipFlags;
+ HPT_U8 bNumBuses;
+
+ HPT_U8 szVendorID[36];
+ HPT_U8 szProductID[36];
+ HPT_U32 nvramSize;
+ HPT_U64 nvramAddress;
+ HPT_U8 slot_index;
+ HPT_U8 reserved2[11];
+}
+HIM_ADAPTER_CONFIG, *PHIM_ADAPTER_CONFIG;
+
+typedef struct _HIM_CHANNEL_CONFIG
+{
+ HPT_U32 io_port;
+ HPT_U32 ctl_port;
+} HIM_CHANNEL_CONFIG, *PHIM_CHANNEL_CONFIG;
+
+typedef struct _HIM_DEVICE_FLAGS
+{
+ HPT_UINT df_atapi :1;
+ HPT_UINT df_removable_drive :1;
+ HPT_UINT df_on_line :1;
+ HPT_UINT df_reduce_mode :1;
+ HPT_UINT df_sata :1;
+ HPT_UINT df_on_pm_port :1;
+ HPT_UINT df_support_read_ahead :1;
+ HPT_UINT df_read_ahead_enabled :1;
+ HPT_UINT df_support_write_cache :1;
+ HPT_UINT df_write_cache_enabled :1;
+ HPT_UINT df_cdrom_device :1;
+ HPT_UINT df_tape_device :1;
+ HPT_UINT df_support_tcq :1;
+ HPT_UINT df_tcq_enabled :1;
+ HPT_UINT df_support_ncq :1;
+ HPT_UINT df_ncq_enabled :1;
+ HPT_UINT df_sas :1;
+ HPT_UINT df_in_enclosure :1;
+ HPT_UINT df_ssd :1;
+} DEVICE_FLAGS, *PDEVICE_FLAGS;
+
+#pragma pack(1)
+typedef struct _IDENTIFY_DATA {
+ HPT_U16 GeneralConfiguration;
+ HPT_U16 NumberOfCylinders;
+ HPT_U16 Reserved1;
+ HPT_U16 NumberOfHeads;
+ HPT_U16 UnformattedBytesPerTrack;
+ HPT_U16 UnformattedBytesPerSector;
+ HPT_U8 SasAddress[8];
+ HPT_U16 SerialNumber[10];
+ HPT_U16 BufferType;
+ HPT_U16 BufferSectorSize;
+ HPT_U16 NumberOfEccBytes;
+ HPT_U16 FirmwareRevision[4];
+ HPT_U16 ModelNumber[20];
+ HPT_U8 MaximumBlockTransfer;
+ HPT_U8 VendorUnique2;
+ HPT_U16 DoubleWordIo;
+ HPT_U16 Capabilities;
+ HPT_U16 Reserved2;
+ HPT_U8 VendorUnique3;
+ HPT_U8 PioCycleTimingMode;
+ HPT_U8 VendorUnique4;
+ HPT_U8 DmaCycleTimingMode;
+ HPT_U16 TranslationFieldsValid;
+ HPT_U16 NumberOfCurrentCylinders;
+ HPT_U16 NumberOfCurrentHeads;
+ HPT_U16 CurrentSectorsPerTrack;
+ HPT_U32 CurrentSectorCapacity;
+ HPT_U16 CurrentMultiSectorSetting;
+ HPT_U32 UserAddressableSectors;
+ HPT_U8 SingleWordDMASupport;
+ HPT_U8 SingleWordDMAActive;
+ HPT_U8 MultiWordDMASupport;
+ HPT_U8 MultiWordDMAActive;
+ HPT_U8 AdvancedPIOModes;
+ HPT_U8 Reserved4;
+ HPT_U16 MinimumMWXferCycleTime;
+ HPT_U16 RecommendedMWXferCycleTime;
+ HPT_U16 MinimumPIOCycleTime;
+ HPT_U16 MinimumPIOCycleTimeIORDY;
+ HPT_U16 Reserved5[2];
+ HPT_U16 ReleaseTimeOverlapped;
+ HPT_U16 ReleaseTimeServiceCommand;
+ HPT_U16 MajorRevision;
+ HPT_U16 MinorRevision;
+ HPT_U16 MaxQueueDepth;
+ HPT_U16 SataCapability;
+ HPT_U16 Reserved6[9];
+ HPT_U16 CommandSupport;
+ HPT_U16 CommandEnable;
+ HPT_U16 UtralDmaMode;
+ HPT_U16 Reserved7[11];
+ HPT_U32 Lba48BitLow;
+ HPT_U32 Lba48BitHigh;
+ HPT_U16 Reserved8[23];
+ HPT_U16 SpecialFunctionsEnabled;
+ HPT_U16 Reserved9[128];
+}
+#ifdef __GNUC__
+__attribute__((packed))
+#endif
+IDENTIFY_DATA, *PIDENTIFY_DATA;
+#pragma pack()
+
+typedef struct _HIM_DEVICE_CONFIG
+{
+ HPT_U64 capacity;
+
+ DEVICE_FLAGS flags;
+
+ HPT_U8 path_id;
+ HPT_U8 target_id;
+ HPT_U8 max_queue_depth;
+ HPT_U8 spin_up_mode;
+
+ HPT_U8 reserved;
+ HPT_U8 transfer_mode;
+ HPT_U8 bMaxShowMode;
+ HPT_U8 bDeUsable_Mode;
+
+ HPT_U16 max_sectors_per_cmd;
+
+ PIDENTIFY_DATA pIdentifyData;
+
+
+ HPT_U8 fixed_path_id; /*equals to phy id */
+}
+HIM_DEVICE_CONFIG, *PHIM_DEVICE_CONFIG;
+
+
+#define _DIT_MODE 0
+#define _DIT_601 1
+#define _DIT_READ_AHEAD 2
+#define _DIT_WRITE_CACHE 3
+#define _DIT_TCQ 4
+#define _DIT_NCQ 5
+#define _DIT_BEEP_OFF 6
+#define _DIT_SPIN_UP_MODE 7
+#define _DIT_IDLE_STANDBY 8
+#define _DIT_IDENTIFY 9
+
+#define SPIN_UP_MODE_NOSUPPORT 0
+#define SPIN_UP_MODE_FULL 1
+#define SPIN_UP_MODE_STANDBY 2
+
+struct tcq_control {
+ HPT_U8 enable;
+ HPT_U8 depth;
+};
+
+struct ncq_control {
+ HPT_U8 enable;
+ HPT_U8 depth;
+};
+
+typedef struct _HIM_ALTERABLE_DEV_INFO{
+ HPT_U8 type;
+ union {
+ HPT_U8 mode;
+ HPT_U8 enable_read_ahead;
+ HPT_U8 enable_read_cache;
+ HPT_U8 enable_write_cache;
+ struct tcq_control tcq;
+ struct ncq_control ncq;
+ void * adapter;
+ HPT_U8 spin_up_mode;
+ HPT_U8 idle_standby_timeout;
+ HPT_U8 identify_indicator;
+ }u;
+} HIM_ALTERABLE_DEV_INFO, *PHIM_ALTERABLE_DEV_INFO;
+
+struct _COMMAND;
+struct _IOCTL_ARG;
+
+typedef void (*PROBE_CALLBACK)(void *arg, void *dev, int index);
+
+typedef struct _HIM {
+ char *name;
+ struct _HIM *next;
+ HPT_UINT max_sg_descriptors;
+ #define _HIM_INTERFACE(_type, _fn, _args) _type (* _fn) _args;
+ #include <dev/hpt27xx/himfuncs.h>
+}
+HIM, *PHIM;
+
+
+#pragma pack(1)
+#ifdef SG_FLAG_EOT
+#error "don't use SG_FLAG_EOT with _SG.eot. clean the code!"
+#endif
+
+typedef struct _SG {
+ HPT_U32 size;
+ HPT_UINT eot;
+ union {
+ HPT_U8 FAR * _logical;
+ BUS_ADDRESS bus;
+ }
+ addr;
+}
+SG, *PSG;
+#pragma pack()
+
+typedef struct _AtaCommand
+{
+ HPT_U64 Lba;
+ HPT_U16 nSectors;
+ HPT_U16 pad;
+} AtaComm, *PAtaComm;
+
+#define ATA_CMD_NOP 0x0
+
+#define ATA_CMD_SET_FEATURES 0xef
+#define ATA_CMD_FLUSH 0xE7
+#define ATA_CMD_VERIFY 0x40
+#define ATA_CMD_STANDBY 0xe2
+#define ATA_CMD_READ_MULTI 0xC4
+#define ATA_CMD_READ_MULTI_EXT 0x29
+#define ATA_CMD_WRITE_MULTI 0xC5
+#define ATA_CMD_WRITE_MULTI_EXT 0x39
+#define ATA_CMD_WRITE_MULTI_FUA_EXT 0xCE
+
+#define ATA_CMD_READ_DMA 0xc8 /* IDE DMA read command */
+#define ATA_CMD_WRITE_DMA 0xca /* IDE DMA write command */
+#define ATA_CMD_READ_DMA_EXT 0x25
+#define ATA_CMD_READ_QUEUE_EXT 0x26
+#define ATA_CMD_READ_MAX_ADDR 0x27
+#define ATA_CMD_READ_EXT 0x24
+#define ATA_CMD_VERIFY_EXT 0x42
+#define ATA_CMD_WRITE_DMA_EXT 0x35
+#define ATA_CMD_WRITE_QUEUE_EXT 0x36
+#define ATA_CMD_WRITE_EXT 0x34
+
+#define ATA_SET_FEATURES_XFER 0x3
+#define ATA_SECTOR_SIZE 512
+
+typedef struct _PassthroughCmd {
+ HPT_U16 bFeaturesReg;
+ HPT_U16 bSectorCountReg;
+ HPT_U16 bLbaLowReg;
+ HPT_U16 bLbaMidReg;
+ HPT_U16 bLbaHighReg;
+ HPT_U8 bDriveHeadReg;
+ HPT_U8 bCommandReg;
+ HPT_U16 nSectors;
+ HPT_U8 *pDataBuffer;
+}
+PassthroughCmd;
+
+typedef struct _ScsiComm {
+ HPT_U8 cdbLength;
+ HPT_U8 senseLength;
+ HPT_U8 scsiStatus;
+ HPT_U8 reserve1;
+ HPT_U32 dataLength;
+ HPT_U8 *cdb;
+ HPT_U8 *senseBuffer;
+}
+ScsiComm;
+
+
+#define CTRL_CMD_REBUILD 1
+#define CTRL_CMD_VERIFY 2
+#define CTRL_CMD_INIT 3
+
+
+typedef struct _R5ControlCmd {
+ HPT_U64 StripeLine;
+ HPT_U16 Offset;
+ HPT_U8 Command;
+ HPT_U8 reserve1;
+}
+R5ControlCmd, *PR5ControlCmd;
+
+typedef struct _HPT_ADDRESS
+{
+ HPT_U8 * logical;
+ BUS_ADDRESS bus;
+}
+HPT_ADDRESS;
+
+
+typedef struct ctl_pages {
+ HPT_ADDRESS *pages;
+ HPT_UINT page_size;
+ HPT_UINT npages;
+ HPT_UINT min_sg_descriptors;
+} CONTROL_PAGES, *PCONTROL_PAGES;
+
+typedef struct _R1ControlCmd {
+ HPT_U64 Lba;
+ HPT_U16 nSectors;
+ HPT_U8 Command; /* CTRL_CMD_XXX */
+ HPT_U8 reserve1;
+ PCONTROL_PAGES ctl_pages;
+}
+R1ControlCmd, *PR1ControlCmd;
+
+typedef void (*TQ_PROC)(void *arg);
+
+struct tq_item {
+ TQ_PROC proc;
+ void *arg;
+ struct tq_item *next;
+};
+
+#define INIT_TQ_ITEM(t, p, a) \
+ do { (t)->proc = p; (t)->arg = a; (t)->next = 0; } while (0)
+
+typedef struct _COMMAND
+{
+
+ struct _VBUS * vbus;
+
+ struct freelist *grplist;
+ HPT_UINT grpcnt;
+
+
+ struct list_head q_link;
+ struct tq_item done_dpc;
+
+ HPT_UINT extsize;
+ void *ext;
+
+
+
+ void *target;
+ void *priv;
+ HPT_UPTR priv2;
+
+ int priority;
+ struct lock_request *owned_lock;
+ struct lock_request *lock_req;
+ void (*dtor)(struct _COMMAND *, void *);
+ void *dtor_arg;
+
+ union{
+ AtaComm Ide;
+ PassthroughCmd Passthrough;
+ ScsiComm Scsi;
+ R5ControlCmd R5Control;
+ R1ControlCmd R1Control;
+ } uCmd;
+
+ HPT_U8 type; /* CMD_TYPE_* */
+
+ struct {
+ HPT_U8 physical_sg: 1;
+ HPT_U8 data_in: 1;
+ HPT_U8 data_out: 1;
+ HPT_U8 transform : 1;
+ HPT_U8 hard_flush: 2;
+ HPT_U8 from_cc: 1;
+ HPT_U8 force_cc: 1;
+ } flags;
+
+ /* return status */
+ HPT_U8 Result;
+ /* retry count */
+ HPT_U8 RetryCount;
+
+
+ PSG psg;
+
+
+ int (*buildsgl)(struct _COMMAND *cmd, PSG psg, int logical);
+ void (*done)(struct _COMMAND *cmd);
+}
+COMMAND, *PCOMMAND;
+
+/* command types */
+#define CMD_TYPE_IO 0
+#define CMD_TYPE_CONTROL 1
+#define CMD_TYPE_ATAPI 2
+#define CMD_TYPE_SCSI CMD_TYPE_ATAPI
+#define CMD_TYPE_PASSTHROUGH 3
+#define CMD_TYPE_FLUSH 4
+#define CMD_TYPE_IO_INDIRECT 0x80
+
+/* flush command flags */
+#define CF_HARD_FLUSH_CACHE 1
+#define CF_HARD_FLUSH_STANDBY 2
+
+/* command return values */
+#define RETURN_PENDING 0
+#define RETURN_SUCCESS 1
+#define RETURN_BAD_DEVICE 2
+#define RETURN_BAD_PARAMETER 3
+#define RETURN_WRITE_NO_DRQ 4
+#define RETURN_DEVICE_BUSY 5
+#define RETURN_INVALID_REQUEST 6
+#define RETURN_SELECTION_TIMEOUT 7
+#define RETURN_IDE_ERROR 8
+#define RETURN_NEED_LOGICAL_SG 9
+#define RETURN_NEED_PHYSICAL_SG 10
+#define RETURN_RETRY 11
+#define RETURN_DATA_ERROR 12
+#define RETURN_BUS_RESET 13
+#define RETURN_BAD_TRANSFER_LENGTH 14
+#define RETURN_INSUFFICIENT_MEMORY 15
+#define RETURN_SECTOR_ERROR 16
+#define RETURN_NEED_SPINUP 17
+
+#if defined(__cplusplus)
+}
+#endif
+#endif
diff --git a/sys/dev/hpt27xx/himfuncs.h b/sys/dev/hpt27xx/himfuncs.h
new file mode 100644
index 0000000..a14ff77
--- /dev/null
+++ b/sys/dev/hpt27xx/himfuncs.h
@@ -0,0 +1,107 @@
+/*-
+ * Copyright (c) 2011 HighPoint Technologies, Inc.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ */
+
+#include <dev/hpt27xx/hpt27xx_config.h>
+/*
+ * define _HIM_INTERFACE before include this file, and
+ * undef it after include this file.
+ */
+
+
+#ifndef _HIM_INTERFACE
+#error "you must define _HIM_INTERFACE before this file"
+#endif
+
+_HIM_INTERFACE(HPT_BOOL, get_supported_device_id, (int index, PCI_ID *id))
+
+_HIM_INTERFACE(HPT_U8, get_controller_count, (PCI_ID *id, HPT_U8 *reached, PCI_ADDRESS *addr))
+
+
+_HIM_INTERFACE(HPT_UINT, get_adapter_size, (const PCI_ID *id))
+
+
+_HIM_INTERFACE(HPT_BOOL, create_adapter, (const PCI_ID *id, PCI_ADDRESS pciAddress, void *adapter, void *osext))
+
+_HIM_INTERFACE(void, get_adapter_config, (void *adapter, HIM_ADAPTER_CONFIG *config))
+
+_HIM_INTERFACE(HPT_BOOL, get_meminfo, (void *adapter))
+
+
+_HIM_INTERFACE(HPT_BOOL, adapter_on_same_vbus, (void *adapter1, void *adapter2))
+_HIM_INTERFACE(void, route_irq, (void *adapter, HPT_BOOL enable))
+
+
+_HIM_INTERFACE(HPT_BOOL, initialize, (void *adapter))
+
+
+_HIM_INTERFACE(HPT_UINT, get_device_size, (void *adapter))
+
+
+_HIM_INTERFACE(HPT_BOOL, probe_device, (void *adapter, int index, void *devhandle, PROBE_CALLBACK done, void *arg))
+_HIM_INTERFACE(void *, get_device, (void *adapter, int index))
+_HIM_INTERFACE(void, get_device_config, (void *dev, HIM_DEVICE_CONFIG *config))
+_HIM_INTERFACE(void, remove_device, (void *dev))
+
+_HIM_INTERFACE(void, reset_device, (void * dev, void (*done)(void *arg), void *arg))
+
+
+_HIM_INTERFACE(HPT_U32, get_cmdext_size, (void))
+
+_HIM_INTERFACE(void, queue_cmd, (void *dev, struct _COMMAND *cmd))
+
+
+_HIM_INTERFACE(int, read_write, (void *dev,HPT_LBA lba, HPT_U16 nsector, HPT_U8 *buffer, HPT_BOOL read))
+
+_HIM_INTERFACE(HPT_BOOL, intr_handler, (void *adapter))
+_HIM_INTERFACE(HPT_BOOL, intr_control, (void * adapter, HPT_BOOL enable))
+
+
+_HIM_INTERFACE(int, get_channel_config, (void * adapter, int index, PHIM_CHANNEL_CONFIG pInfo))
+_HIM_INTERFACE(int, set_device_info, (void * dev, PHIM_ALTERABLE_DEV_INFO pInfo))
+_HIM_INTERFACE(void, unplug_device, (void * dev))
+
+
+_HIM_INTERFACE(void, shutdown, (void *adapter))
+_HIM_INTERFACE(void, suspend, (void *adapter))
+_HIM_INTERFACE(void, resume, (void *adapter))
+_HIM_INTERFACE(void, release_adapter, (void *adapter))
+
+/*called after ldm_register_adapter*/
+_HIM_INTERFACE(HPT_BOOL, verify_adapter, (void *adapter))
+
+/* (optional) */
+_HIM_INTERFACE(void, ioctl, (void * adapter, struct _IOCTL_ARG *arg))
+_HIM_INTERFACE(int, compare_slot_seq, (void *adapter1, void *adapter2))
+_HIM_INTERFACE(int, get_enclosure_count, (void *adapter))
+_HIM_INTERFACE(int, get_enclosure_info, (void *adapter, int id, void *pinfo))
+_HIM_INTERFACE(int, get_enclosure_info_v2, (void *adapter, int id, void *pinfo))
+_HIM_INTERFACE(int, get_enclosure_info_v3, (void *adapter, int id, void *pinfo))
+
+_HIM_INTERFACE(HPT_BOOL, flash_access, (void *adapter, HPT_U32 offset, void *value, int size, HPT_BOOL reading))
+
+#undef _HIM_INTERFACE
diff --git a/sys/dev/hpt27xx/hpt27xx_config.c b/sys/dev/hpt27xx/hpt27xx_config.c
new file mode 100644
index 0000000..f87c7ee
--- /dev/null
+++ b/sys/dev/hpt27xx/hpt27xx_config.c
@@ -0,0 +1,67 @@
+/*-
+ * Copyright (c) 2011 HighPoint Technologies, Inc.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ */
+
+#include <dev/hpt27xx/hpt27xx_config.h>
+/****************************************************************************
+ * config.c - auto-generated file
+ ****************************************************************************/
+#include <dev/hpt27xx/os_bsd.h>
+
+extern int init_module_him_rr2720(void);
+extern int init_module_him_rr273x(void);
+extern int init_module_him_rr276x(void);
+extern int init_module_him_rr278x(void);
+extern int init_module_vdev_raw(void);
+extern int init_module_partition(void);
+extern int init_module_raid0(void);
+extern int init_module_raid1(void);
+extern int init_module_raid5(void);
+extern int init_module_jbod(void);
+
+int init_config(void)
+{
+ init_module_him_rr2720();
+ init_module_him_rr273x();
+ init_module_him_rr276x();
+ init_module_him_rr278x();
+ init_module_vdev_raw();
+ init_module_partition();
+ init_module_raid0();
+ init_module_raid1();
+ init_module_raid5();
+ init_module_jbod();
+ return 0;
+}
+
+char driver_name[] = "hpt27xx";
+char driver_name_long[] = "RocketRAID 27xx controller driver";
+char driver_ver[] = "v1.0 (" __DATE__ " " __TIME__ ")";
+int osm_max_targets = 0xff;
+
+
+int os_max_cache_size = 0x1000000;
diff --git a/sys/dev/hpt27xx/hpt27xx_config.h b/sys/dev/hpt27xx/hpt27xx_config.h
new file mode 100644
index 0000000..dad8760
--- /dev/null
+++ b/sys/dev/hpt27xx/hpt27xx_config.h
@@ -0,0 +1,155 @@
+/*-
+ * Copyright (c) 2011 HighPoint Technologies, Inc.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef hpt27xx_CONFIG_H
+#define hpt27xx_CONFIG_H
+#define SUPPORT_ARRAY
+#define __KERNEL__ 1
+#define DRIVER_MINOR 16
+#define TARGETNAME hpt27xx
+#define __dummy_reg hpt27xx___dummy_reg
+#define __ldm_alloc_cmd hpt27xx___ldm_alloc_cmd
+#define delay_between_spinup hpt27xx_delay_between_spinup
+#define dmapool_active hpt27xx_dmapool_active
+#define dmapool_get_page hpt27xx_dmapool_get_page
+#define dmapool_get_page_at hpt27xx_dmapool_get_page_at
+#define dmapool_init hpt27xx_dmapool_init
+#define dmapool_make_order hpt27xx_dmapool_make_order
+#define dmapool_max_class_pages hpt27xx_dmapool_max_class_pages
+#define dmapool_put_page hpt27xx_dmapool_put_page
+#define dmapool_register_client hpt27xx_dmapool_register_client
+#define driver_name hpt27xx_driver_name
+#define driver_name_long hpt27xx_driver_name_long
+#define driver_ver hpt27xx_driver_ver
+#define freelist_get hpt27xx_freelist_get
+#define freelist_get_dma hpt27xx_freelist_get_dma
+#define freelist_put hpt27xx_freelist_put
+#define freelist_put_dma hpt27xx_freelist_put_dma
+#define freelist_reserve hpt27xx_freelist_reserve
+#define freelist_reserve_dma hpt27xx_freelist_reserve_dma
+#define gGlobalNcqFlag hpt27xx_gGlobalNcqFlag
+#define gProbeInInitializing hpt27xx_gProbeInInitializing
+#define gSGPIOPartSupport hpt27xx_gSGPIOPartSupport
+#define gSpinupOneDevEachTime hpt27xx_gSpinupOneDevEachTime
+#define g_legacy_mode hpt27xx_g_legacy_mode
+#define gautorebuild hpt27xx_gautorebuild
+#define grebuildpriority hpt27xx_grebuildpriority
+#define him_handle_to_vbus hpt27xx_him_handle_to_vbus
+#define him_list hpt27xx_him_list
+#define init_config hpt27xx_init_config
+#define init_module_him_rr2720 hpt27xx_init_module_him_rr2720
+#define init_module_him_rr273x hpt27xx_init_module_him_rr273x
+#define init_module_him_rr276x hpt27xx_init_module_him_rr276x
+#define init_module_him_rr278x hpt27xx_init_module_him_rr278x
+#define init_module_jbod hpt27xx_init_module_jbod
+#define init_module_partition hpt27xx_init_module_partition
+#define init_module_raid0 hpt27xx_init_module_raid0
+#define init_module_raid1 hpt27xx_init_module_raid1
+#define init_module_raid5 hpt27xx_init_module_raid5
+#define init_module_vdev_raw hpt27xx_init_module_vdev_raw
+#define ldm_acquire_lock hpt27xx_ldm_acquire_lock
+#define ldm_add_spare_to_array hpt27xx_ldm_add_spare_to_array
+#define ldm_alloc_cmds_R_6_55_75_46_64 hpt27xx_ldm_alloc_cmds_R_6_55_75_46_64
+#define ldm_alloc_cmds_from_list hpt27xx_ldm_alloc_cmds_from_list
+#define ldm_check_array_online hpt27xx_ldm_check_array_online
+#define ldm_create_vbus hpt27xx_ldm_create_vbus
+#define ldm_create_vdev hpt27xx_ldm_create_vdev
+#define ldm_event_notify hpt27xx_ldm_event_notify
+#define ldm_find_stamp hpt27xx_ldm_find_stamp
+#define ldm_find_target hpt27xx_ldm_find_target
+#define ldm_finish_cmd hpt27xx_ldm_finish_cmd
+#define ldm_free_cmds hpt27xx_ldm_free_cmds
+#define ldm_free_cmds_to_list hpt27xx_ldm_free_cmds_to_list
+#define ldm_generic_member_failed hpt27xx_ldm_generic_member_failed
+#define ldm_get_cmd_size hpt27xx_ldm_get_cmd_size
+#define ldm_get_device_id hpt27xx_ldm_get_device_id
+#define ldm_get_mem_info hpt27xx_ldm_get_mem_info
+#define ldm_get_next_vbus hpt27xx_ldm_get_next_vbus
+#define ldm_get_vbus_ext hpt27xx_ldm_get_vbus_ext
+#define ldm_get_vbus_size hpt27xx_ldm_get_vbus_size
+#define ldm_ide_fixstring hpt27xx_ldm_ide_fixstring
+#define ldm_idle hpt27xx_ldm_idle
+#define ldm_initialize_vbus_async hpt27xx_ldm_initialize_vbus_async
+#define ldm_intr hpt27xx_ldm_intr
+#define ldm_ioctl hpt27xx_ldm_ioctl
+#define ldm_on_timer hpt27xx_ldm_on_timer
+#define ldm_queue_cmd hpt27xx_ldm_queue_cmd
+#define ldm_queue_task hpt27xx_ldm_queue_task
+#define ldm_queue_vbus_dpc hpt27xx_ldm_queue_vbus_dpc
+#define ldm_register_adapter hpt27xx_ldm_register_adapter
+#define ldm_register_device hpt27xx_ldm_register_device
+#define ldm_register_him_R_6_55_75_46_64 hpt27xx_ldm_register_him_R_6_55_75_46_64
+#define ldm_register_vdev_class_R_6_55_75_46_64 hpt27xx_ldm_register_vdev_class_R_6_55_75_46_64
+#define ldm_release_lock hpt27xx_ldm_release_lock
+#define ldm_release_vbus hpt27xx_ldm_release_vbus
+#define ldm_release_vdev hpt27xx_ldm_release_vdev
+#define ldm_remove_timer hpt27xx_ldm_remove_timer
+#define ldm_request_timer hpt27xx_ldm_request_timer
+#define ldm_reset_vbus hpt27xx_ldm_reset_vbus
+#define ldm_resume hpt27xx_ldm_resume
+#define ldm_run hpt27xx_ldm_run
+#define ldm_set_autorebuild hpt27xx_ldm_set_autorebuild
+#define ldm_shutdown hpt27xx_ldm_shutdown
+#define ldm_suspend hpt27xx_ldm_suspend
+#define ldm_sync_array_info hpt27xx_ldm_sync_array_info
+#define ldm_sync_array_stamp hpt27xx_ldm_sync_array_stamp
+#define ldm_timer_probe_device hpt27xx_ldm_timer_probe_device
+#define ldm_unregister_device hpt27xx_ldm_unregister_device
+#define log_sector_repair hpt27xx_log_sector_repair
+#define num_drives_per_spinup hpt27xx_num_drives_per_spinup
+#define os_get_stamp hpt27xx_os_get_stamp
+#define os_get_vbus_seq hpt27xx_os_get_vbus_seq
+#define os_inb hpt27xx_os_inb
+#define os_inl hpt27xx_os_inl
+#define os_insw hpt27xx_os_insw
+#define os_inw hpt27xx_os_inw
+#define os_map_pci_bar hpt27xx_os_map_pci_bar
+#define os_max_cache_size hpt27xx_os_max_cache_size
+#define os_outb hpt27xx_os_outb
+#define os_outl hpt27xx_os_outl
+#define os_outsw hpt27xx_os_outsw
+#define os_outw hpt27xx_os_outw
+#define os_pci_readb hpt27xx_os_pci_readb
+#define os_pci_readl hpt27xx_os_pci_readl
+#define os_pci_readw hpt27xx_os_pci_readw
+#define os_pci_writeb hpt27xx_os_pci_writeb
+#define os_pci_writel hpt27xx_os_pci_writel
+#define os_pci_writew hpt27xx_os_pci_writew
+#define os_printk hpt27xx_os_printk
+#define os_query_remove_device hpt27xx_os_query_remove_device
+#define os_query_time hpt27xx_os_query_time
+#define os_request_timer hpt27xx_os_request_timer
+#define os_revalidate_device hpt27xx_os_revalidate_device
+#define os_schedule_task hpt27xx_os_schedule_task
+#define os_stallexec hpt27xx_os_stallexec
+#define os_unmap_pci_bar hpt27xx_os_unmap_pci_bar
+#define osm_max_targets hpt27xx_osm_max_targets
+#define pcicfg_read_dword hpt27xx_pcicfg_read_dword
+#define vbus_list hpt27xx_vbus_list
+#define vdev_queue_cmd hpt27xx_vdev_queue_cmd
+#endif
diff --git a/sys/dev/hpt27xx/hptintf.h b/sys/dev/hpt27xx/hptintf.h
new file mode 100644
index 0000000..c2a7b7f
--- /dev/null
+++ b/sys/dev/hpt27xx/hptintf.h
@@ -0,0 +1,2112 @@
+/*-
+ * Copyright (c) 2011 HighPoint Technologies, Inc.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ */
+
+#include <dev/hpt27xx/hpt27xx_config.h>
+
+#ifndef HPT_INTF_H
+#define HPT_INTF_H
+
+#if defined(__BIG_ENDIAN__)&&!defined(__BIG_ENDIAN_BITFIELD)
+#define __BIG_ENDIAN_BITFIELD
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef __GNUC__
+#define __attribute__(x)
+#endif
+
+#pragma pack(1)
+
+/*
+ * Version of this interface.
+ * The user mode application must first issue a hpt_get_version() call to
+ * check HPT_INTERFACE_VERSION. When an utility using newer version interface
+ * is used with old version drivers, it must call only the functions that
+ * driver supported.
+ * A new version interface should only add ioctl functions; it should implement
+ * all old version functions without change their definition.
+ */
+#define __this_HPT_INTERFACE_VERSION 0x02010000
+
+#ifndef HPT_INTERFACE_VERSION
+#error "You must define HPT_INTERFACE_VERSION you implemented"
+#endif
+
+#if HPT_INTERFACE_VERSION > __this_HPT_INTERFACE_VERSION
+#error "HPT_INTERFACE_VERSION is invalid"
+#endif
+
+/*
+ * DEFINITION
+ * Logical device --- a device that can be accessed by OS.
+ * Physical device --- device attached to the controller.
+ * A logical device can be simply a physical device.
+ *
+ * Each logical and physical device has a 32bit ID. GUI will use this ID
+ * to identify devices.
+ * 1. The ID must be unique.
+ * 2. The ID must be immutable. Once an ID is assigned to a device, it
+ * must not change when system is running and the device exists.
+ * 3. The ID of logical device must be NOT reusable. If a device is
+ * removed, other newly created logical device must not use the same ID.
+ * 4. The ID must not be zero or 0xFFFFFFFF.
+ */
+typedef HPT_U32 DEVICEID;
+
+/*
+ * logical device type.
+ * Identify array (logical device) and physical device.
+ */
+#define LDT_ARRAY 1
+#define LDT_DEVICE 2
+
+/*
+ * Array types
+ * GUI will treat all array as 1-level RAID. No RAID0/1 or RAID1/0.
+ * A RAID0/1 device is type AT_RAID1. A RAID1/0 device is type AT_RAID0.
+ * Their members may be another array of type RAID0 or RAID1.
+ */
+#define AT_UNKNOWN 0
+#define AT_RAID0 1
+#define AT_RAID1 2
+#define AT_RAID5 3
+#define AT_RAID6 4
+#define AT_RAID3 5
+#define AT_RAID4 6
+#define AT_JBOD 7
+#define AT_RAID1E 8
+
+/*
+ * physical device type
+ */
+#define PDT_UNKNOWN 0
+#define PDT_HARDDISK 1
+#define PDT_CDROM 2
+#define PDT_TAPE 3
+
+/*
+ * Some constants.
+ */
+#define MAX_NAME_LENGTH 36
+#define MAX_ARRAYNAME_LEN 16
+
+#define MAX_ARRAY_MEMBERS_V1 8
+
+#ifndef MAX_ARRAY_MEMBERS_V2
+#define MAX_ARRAY_MEMBERS_V2 16
+#endif
+
+#ifndef MAX_ARRAY_MEMBERS_V3
+#define MAX_ARRAY_MEMBERS_V3 64
+#endif
+
+/* keep definition for source code compatiblity */
+#define MAX_ARRAY_MEMBERS MAX_ARRAY_MEMBERS_V1
+
+/*
+ * io commands
+ * GUI use these commands to do IO on logical/physical devices.
+ */
+#define IO_COMMAND_READ 1
+#define IO_COMMAND_WRITE 2
+
+
+
+/*
+ * array flags
+ */
+#define ARRAY_FLAG_DISABLED 0x00000001 /* The array is disabled */
+#define ARRAY_FLAG_NEEDBUILDING 0x00000002 /* array data need to be rebuilt */
+#define ARRAY_FLAG_REBUILDING 0x00000004 /* array is in rebuilding process */
+#define ARRAY_FLAG_BROKEN 0x00000008 /* broken but may still working */
+#define ARRAY_FLAG_BOOTDISK 0x00000010 /* array has a active partition */
+
+#define ARRAY_FLAG_BOOTMARK 0x00000040 /* array has boot mark set */
+#define ARRAY_FLAG_NEED_AUTOREBUILD 0x00000080 /* auto-rebuild should start */
+#define ARRAY_FLAG_VERIFYING 0x00000100 /* is being verified */
+#define ARRAY_FLAG_INITIALIZING 0x00000200 /* is being initialized */
+#define ARRAY_FLAG_TRANSFORMING 0x00000400 /* tranform in progress */
+#define ARRAY_FLAG_NEEDTRANSFORM 0x00000800 /* array need tranform */
+#define ARRAY_FLAG_NEEDINITIALIZING 0x00001000 /* the array's initialization hasn't finished*/
+#define ARRAY_FLAG_BROKEN_REDUNDANT 0x00002000 /* broken but redundant (raid6) */
+#define ARRAY_FLAG_RAID15PLUS 0x80000000 /* display this RAID 1 as RAID 1.5 */
+/*
+ * device flags
+ */
+#define DEVICE_FLAG_DISABLED 0x00000001 /* device is disabled */
+#define DEVICE_FLAG_BOOTDISK 0x00000002 /* disk has a active partition */
+#define DEVICE_FLAG_BOOTMARK 0x00000004 /* disk has boot mark set */
+#define DEVICE_FLAG_WITH_601 0x00000008 /* has HPT601 connected */
+#define DEVICE_FLAG_SATA 0x00000010 /* SATA or SAS device */
+#define DEVICE_FLAG_ON_PM_PORT 0x00000020 /* PM port */
+#define DEVICE_FLAG_SAS 0x00000040 /* SAS device */
+#define DEVICE_FLAG_IN_ENCLOSURE 0x00000080 /* PathId is enclosure# */
+#define DEVICE_FLAG_UNINITIALIZED 0x00010000 /* device is not initialized, can't be used to create array */
+#define DEVICE_FLAG_LEGACY 0x00020000 /* single disk & mbr contains at least one partition */
+
+#define DEVICE_FLAG_IS_SPARE 0x80000000 /* is a spare disk */
+
+/*
+ * array states used by hpt_set_array_state()
+ */
+/* old defines */
+#define MIRROR_REBUILD_START 1
+#define MIRROR_REBUILD_ABORT 2
+#define MIRROR_REBUILD_COMPLETE 3
+/* new defines */
+#define AS_REBUILD_START 1
+#define AS_REBUILD_ABORT 2
+#define AS_REBUILD_PAUSE AS_REBUILD_ABORT
+#define AS_REBUILD_COMPLETE 3
+#define AS_VERIFY_START 4
+#define AS_VERIFY_ABORT 5
+#define AS_VERIFY_COMPLETE 6
+#define AS_INITIALIZE_START 7
+#define AS_INITIALIZE_ABORT 8
+#define AS_INITIALIZE_COMPLETE 9
+#define AS_VERIFY_FAILED 10
+#define AS_REBUILD_STOP 11
+#define AS_SAVE_STATE 12
+#define AS_TRANSFORM_START 13
+#define AS_TRANSFORM_ABORT 14
+
+/************************************************************************
+ * ioctl code
+ * It would be better if ioctl code are the same on different platforms,
+ * but we must not conflict with system defined ioctl code.
+ ************************************************************************/
+#if defined(LINUX) || defined(__FreeBSD_version) || defined(linux)
+#define HPT_CTL_CODE(x) (x+0xFF00)
+#define HPT_CTL_CODE_LINUX_TO_IOP(x) ((x)-0xff00)
+#elif defined(_MS_WIN32_) || defined(WIN32)
+
+#ifndef CTL_CODE
+#define CTL_CODE( DeviceType, Function, Method, Access ) \
+ (((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method))
+#endif
+#define HPT_CTL_CODE(x) CTL_CODE(0x370, 0x900+(x), 0, 0)
+#define HPT_CTL_CODE_WIN32_TO_IOP(x) ((((x) & 0xffff)>>2)-0x900)
+
+#else
+#define HPT_CTL_CODE(x) (x)
+#endif
+
+#define HPT_IOCTL_GET_VERSION HPT_CTL_CODE(0)
+#define HPT_IOCTL_GET_CONTROLLER_COUNT HPT_CTL_CODE(1)
+#define HPT_IOCTL_GET_CONTROLLER_INFO HPT_CTL_CODE(2)
+#define HPT_IOCTL_GET_CHANNEL_INFO HPT_CTL_CODE(3)
+#define HPT_IOCTL_GET_LOGICAL_DEVICES HPT_CTL_CODE(4)
+#define HPT_IOCTL_GET_DEVICE_INFO HPT_CTL_CODE(5)
+#define HPT_IOCTL_CREATE_ARRAY HPT_CTL_CODE(6)
+#define HPT_IOCTL_DELETE_ARRAY HPT_CTL_CODE(7)
+#define HPT_IOCTL_ARRAY_IO HPT_CTL_CODE(8)
+#define HPT_IOCTL_DEVICE_IO HPT_CTL_CODE(9)
+#define HPT_IOCTL_GET_EVENT HPT_CTL_CODE(10)
+#define HPT_IOCTL_REBUILD_MIRROR HPT_CTL_CODE(11)
+/* use HPT_IOCTL_REBUILD_DATA_BLOCK from now on */
+#define HPT_IOCTL_REBUILD_DATA_BLOCK HPT_IOCTL_REBUILD_MIRROR
+#define HPT_IOCTL_ADD_SPARE_DISK HPT_CTL_CODE(12)
+#define HPT_IOCTL_REMOVE_SPARE_DISK HPT_CTL_CODE(13)
+#define HPT_IOCTL_ADD_DISK_TO_ARRAY HPT_CTL_CODE(14)
+#define HPT_IOCTL_SET_ARRAY_STATE HPT_CTL_CODE(15)
+#define HPT_IOCTL_SET_ARRAY_INFO HPT_CTL_CODE(16)
+#define HPT_IOCTL_SET_DEVICE_INFO HPT_CTL_CODE(17)
+#define HPT_IOCTL_RESCAN_DEVICES HPT_CTL_CODE(18)
+#define HPT_IOCTL_GET_DRIVER_CAPABILITIES HPT_CTL_CODE(19)
+#define HPT_IOCTL_GET_601_INFO HPT_CTL_CODE(20)
+#define HPT_IOCTL_SET_601_INFO HPT_CTL_CODE(21)
+#define HPT_IOCTL_LOCK_DEVICE HPT_CTL_CODE(22)
+#define HPT_IOCTL_UNLOCK_DEVICE HPT_CTL_CODE(23)
+#define HPT_IOCTL_IDE_PASS_THROUGH HPT_CTL_CODE(24)
+#define HPT_IOCTL_VERIFY_DATA_BLOCK HPT_CTL_CODE(25)
+#define HPT_IOCTL_INITIALIZE_DATA_BLOCK HPT_CTL_CODE(26)
+#define HPT_IOCTL_ADD_DEDICATED_SPARE HPT_CTL_CODE(27)
+#define HPT_IOCTL_DEVICE_IO_EX HPT_CTL_CODE(28)
+#define HPT_IOCTL_SET_BOOT_MARK HPT_CTL_CODE(29)
+#define HPT_IOCTL_QUERY_REMOVE HPT_CTL_CODE(30)
+#define HPT_IOCTL_REMOVE_DEVICES HPT_CTL_CODE(31)
+#define HPT_IOCTL_CREATE_ARRAY_V2 HPT_CTL_CODE(32)
+#define HPT_IOCTL_GET_DEVICE_INFO_V2 HPT_CTL_CODE(33)
+#define HPT_IOCTL_SET_DEVICE_INFO_V2 HPT_CTL_CODE(34)
+#define HPT_IOCTL_REBUILD_DATA_BLOCK_V2 HPT_CTL_CODE(35)
+#define HPT_IOCTL_VERIFY_DATA_BLOCK_V2 HPT_CTL_CODE(36)
+#define HPT_IOCTL_INITIALIZE_DATA_BLOCK_V2 HPT_CTL_CODE(37)
+#define HPT_IOCTL_LOCK_DEVICE_V2 HPT_CTL_CODE(38)
+#define HPT_IOCTL_DEVICE_IO_V2 HPT_CTL_CODE(39)
+#define HPT_IOCTL_DEVICE_IO_EX_V2 HPT_CTL_CODE(40)
+#define HPT_IOCTL_CREATE_TRANSFORM HPT_CTL_CODE(41)
+#define HPT_IOCTL_STEP_TRANSFORM HPT_CTL_CODE(42)
+#define HPT_IOCTL_SET_VDEV_INFO HPT_CTL_CODE(43)
+#define HPT_IOCTL_CALC_MAX_CAPACITY HPT_CTL_CODE(44)
+#define HPT_IOCTL_INIT_DISKS HPT_CTL_CODE(45)
+#define HPT_IOCTL_GET_DEVICE_INFO_V3 HPT_CTL_CODE(46)
+#define HPT_IOCTL_GET_CONTROLLER_INFO_V2 HPT_CTL_CODE(47)
+#define HPT_IOCTL_I2C_TRANSACTION HPT_CTL_CODE(48)
+#define HPT_IOCTL_GET_PARAMETER_LIST HPT_CTL_CODE(49)
+#define HPT_IOCTL_GET_PARAMETER HPT_CTL_CODE(50)
+#define HPT_IOCTL_SET_PARAMETER HPT_CTL_CODE(51)
+#define HPT_IOCTL_GET_DRIVER_CAPABILITIES_V2 HPT_CTL_CODE(52)
+#define HPT_IOCTL_GET_CHANNEL_INFO_V2 HPT_CTL_CODE(53)
+#define HPT_IOCTL_GET_CONTROLLER_INFO_V3 HPT_CTL_CODE(54)
+#define HPT_IOCTL_GET_DEVICE_INFO_V4 HPT_CTL_CODE(55)
+#define HPT_IOCTL_CREATE_ARRAY_V3 HPT_CTL_CODE(56)
+#define HPT_IOCTL_CREATE_TRANSFORM_V2 HPT_CTL_CODE(57)
+#define HPT_IOCTL_CALC_MAX_CAPACITY_V2 HPT_CTL_CODE(58)
+#define HPT_IOCTL_SCSI_PASSTHROUGH HPT_CTL_CODE(59)
+#define HPT_IOCTL_GET_PHYSICAL_DEVICES HPT_CTL_CODE(60)
+#define HPT_IOCTL_GET_ENCLOSURE_COUNT HPT_CTL_CODE(61)
+#define HPT_IOCTL_GET_ENCLOSURE_INFO HPT_CTL_CODE(62)
+#define HPT_IOCTL_GET_PERFMON_STATUS HPT_CTL_CODE(63)
+#define HPT_IOCTL_SET_PERFMON_STATUS HPT_CTL_CODE(64)
+#define HPT_IOCTL_GET_PERFMON_DATA HPT_CTL_CODE(65)
+#define HPT_IOCTL_IDE_PASS_THROUGH_V2 HPT_CTL_CODE(66)
+#define HPT_IOCTL_GET_ENCLOSURE_INFO_V2 HPT_CTL_CODE(67)
+#define HPT_IOCTL_GET_ENCLOSURE_INFO_V3 HPT_CTL_CODE(68)
+
+#define HPT_IOCTL_GET_CONTROLLER_IDS HPT_CTL_CODE(100)
+#define HPT_IOCTL_GET_DCB HPT_CTL_CODE(101)
+
+#define HPT_IOCTL_EPROM_IO HPT_CTL_CODE(102)
+#define HPT_IOCTL_GET_CONTROLLER_VENID HPT_CTL_CODE(103)
+
+/************************************************************************
+ * shared data structures
+ ************************************************************************/
+
+/*
+ * Chip Type
+ */
+#define CHIP_TYPE_HPT366 1
+#define CHIP_TYPE_HPT368 2
+#define CHIP_TYPE_HPT370 3
+#define CHIP_TYPE_HPT370A 4
+#define CHIP_TYPE_HPT370B 5
+#define CHIP_TYPE_HPT374 6
+#define CHIP_TYPE_HPT372 7
+#define CHIP_TYPE_HPT372A 8
+#define CHIP_TYPE_HPT302 9
+#define CHIP_TYPE_HPT371 10
+#define CHIP_TYPE_HPT372N 11
+#define CHIP_TYPE_HPT302N 12
+#define CHIP_TYPE_HPT371N 13
+#define CHIP_TYPE_SI3112A 14
+#define CHIP_TYPE_ICH5 15
+#define CHIP_TYPE_ICH5R 16
+#define CHIP_TYPE_MV50XX 20
+#define CHIP_TYPE_MV60X1 21
+#define CHIP_TYPE_MV60X2 22
+#define CHIP_TYPE_MV70X2 23
+#define CHIP_TYPE_MV5182 24
+#define CHIP_TYPE_IOP331 31
+#define CHIP_TYPE_IOP333 32
+#define CHIP_TYPE_IOP341 33
+#define CHIP_TYPE_IOP348 34
+
+/*
+ * Chip Flags
+ */
+#define CHIP_SUPPORT_ULTRA_66 0x20
+#define CHIP_SUPPORT_ULTRA_100 0x40
+#define CHIP_HPT3XX_DPLL_MODE 0x80
+#define CHIP_SUPPORT_ULTRA_133 0x01
+#define CHIP_SUPPORT_ULTRA_150 0x02
+#define CHIP_MASTER 0x04
+#define CHIP_SUPPORT_SATA_300 0x08
+
+#define HPT_SPIN_UP_MODE_NOSUPPORT 0
+#define HPT_SPIN_UP_MODE_FULL 1
+#define HPT_SPIN_UP_MODE_STANDBY 2
+
+typedef struct _DRIVER_CAPABILITIES {
+ HPT_U32 dwSize;
+
+ HPT_U8 MaximumControllers; /* maximum controllers the driver can support */
+ HPT_U8 SupportCrossControllerRAID; /* 1-support, 0-not support */
+ HPT_U8 MinimumBlockSizeShift; /* minimum block size shift */
+ HPT_U8 MaximumBlockSizeShift; /* maximum block size shift */
+
+ HPT_U8 SupportDiskModeSetting;
+ HPT_U8 SupportSparePool;
+ HPT_U8 MaximumArrayNameLength;
+ /* only one HPT_U8 left here! */
+#ifdef __BIG_ENDIAN_BITFIELD
+ HPT_U8 reserved: 2;
+ HPT_U8 SupportPerformanceMonitor: 1;
+ HPT_U8 SupportVariableSectorSize: 1;
+ HPT_U8 SupportHotSwap: 1;
+ HPT_U8 HighPerformanceRAID1: 1;
+ HPT_U8 RebuildProcessInDriver: 1;
+ HPT_U8 SupportDedicatedSpare: 1;
+#else
+ HPT_U8 SupportDedicatedSpare: 1; /* call hpt_add_dedicated_spare() for dedicated spare. */
+ HPT_U8 RebuildProcessInDriver: 1; /* Windows only. used by mid layer for rebuild control. */
+ HPT_U8 HighPerformanceRAID1: 1;
+ HPT_U8 SupportHotSwap: 1;
+ HPT_U8 SupportVariableSectorSize: 1;
+ HPT_U8 SupportPerformanceMonitor: 1;
+ HPT_U8 reserved: 2;
+#endif
+
+
+ HPT_U8 SupportedRAIDTypes[16];
+ /* maximum members in an array corresponding to SupportedRAIDTypes */
+ HPT_U8 MaximumArrayMembers[16];
+}
+DRIVER_CAPABILITIES, *PDRIVER_CAPABILITIES;
+
+typedef struct _DRIVER_CAPABILITIES_V2 {
+ DRIVER_CAPABILITIES v1;
+ HPT_U8 SupportedCachePolicies[16];
+ HPT_U32 reserved[17];
+}
+DRIVER_CAPABILITIES_V2, *PDRIVER_CAPABILITIES_V2;
+
+/*
+ * Controller information.
+ */
+typedef struct _CONTROLLER_INFO {
+ HPT_U8 ChipType; /* chip type */
+ HPT_U8 InterruptLevel; /* IRQ level */
+ HPT_U8 NumBuses; /* bus count */
+ HPT_U8 ChipFlags;
+
+ HPT_U8 szProductID[MAX_NAME_LENGTH];/* product name */
+ HPT_U8 szVendorID[MAX_NAME_LENGTH]; /* vender name */
+
+} CONTROLLER_INFO, *PCONTROLLER_INFO;
+
+#if HPT_INTERFACE_VERSION>=0x01020000
+typedef struct _CONTROLLER_INFO_V2 {
+ HPT_U8 ChipType; /* chip type */
+ HPT_U8 InterruptLevel; /* IRQ level */
+ HPT_U8 NumBuses; /* bus count */
+ HPT_U8 ChipFlags;
+
+ HPT_U8 szProductID[MAX_NAME_LENGTH];/* product name */
+ HPT_U8 szVendorID[MAX_NAME_LENGTH]; /* vender name */
+
+ HPT_U32 GroupId; /* low 32bit of vbus pointer the controller belongs
+ * the master controller has CHIP_MASTER flag set*/
+ HPT_U8 pci_tree;
+ HPT_U8 pci_bus;
+ HPT_U8 pci_device;
+ HPT_U8 pci_function;
+
+ HPT_U32 ExFlags;
+} CONTROLLER_INFO_V2, *PCONTROLLER_INFO_V2;
+
+
+#define CEXF_IOPModel 1
+#define CEXF_SDRAMSize 2
+#define CEXF_BatteryInstalled 4
+#define CEXF_BatteryStatus 8
+#define CEXF_BatteryVoltage 0x10
+#define CEXF_BatteryBackupTime 0x20
+#define CEXF_FirmwareVersion 0x40
+#define CEXF_SerialNumber 0x80
+#define CEXF_BatteryTemperature 0x100
+#define CEXF_Power12v 0x200
+#define CEXF_Power5v 0x400
+#define CEXF_Power3p3v 0x800
+#define CEXF_Power2p5v 0x1000
+#define CEXF_Power1p8v 0x2000
+#define CEXF_Core1p8v 0x4000
+#define CEXF_Core1p2v 0x8000
+#define CEXF_DDR1p8v 0x10000
+#define CEXF_DDR1p8vRef 0x20000
+#define CEXF_CPUTemperature 0x40000
+#define CEXF_BoardTemperature 0x80000
+#define CEXF_FanSpeed 0x100000
+#define CEXF_Core1p0v 0x200000
+#define CEXF_Fan2Speed 0x400000
+
+typedef struct _CONTROLLER_INFO_V3 {
+ HPT_U8 ChipType;
+ HPT_U8 InterruptLevel;
+ HPT_U8 NumBuses;
+ HPT_U8 ChipFlags;
+ HPT_U8 szProductID[MAX_NAME_LENGTH];
+ HPT_U8 szVendorID[MAX_NAME_LENGTH];
+ HPT_U32 GroupId;
+ HPT_U8 pci_tree;
+ HPT_U8 pci_bus;
+ HPT_U8 pci_device;
+ HPT_U8 pci_function;
+ HPT_U32 ExFlags;
+ HPT_U8 IOPModel[32];
+ HPT_U32 SDRAMSize;
+ HPT_U8 BatteryInstalled;
+ HPT_U8 BatteryStatus;
+ HPT_U16 BatteryVoltage;
+ HPT_U32 BatteryBackupTime;
+ HPT_U32 FirmwareVersion;
+ HPT_U8 SerialNumber[32];
+ HPT_U8 BatteryMBInstalled;
+ HPT_U8 BatteryTemperature;
+ signed char CPUTemperature;
+ signed char BoardTemperature;
+ HPT_U16 FanSpeed;
+ HPT_U16 Power12v;
+ HPT_U16 Power5v;
+ HPT_U16 Power3p3v;
+ HPT_U16 Power2p5v;
+ HPT_U16 Power1p8v;
+ HPT_U16 Core1p8v;
+ HPT_U16 Core1p2v;
+ HPT_U16 DDR1p8v;
+ HPT_U16 DDR1p8vRef;
+ HPT_U16 Core1p0v;
+ HPT_U16 Fan2Speed;
+ HPT_U8 reserve[60];
+}
+CONTROLLER_INFO_V3, *PCONTROLLER_INFO_V3;
+typedef char check_CONTROLLER_INFO_V3[sizeof(CONTROLLER_INFO_V3)==256? 1:-1];
+#endif
+/*
+ * Channel information.
+ */
+typedef struct _CHANNEL_INFO {
+ HPT_U32 IoPort; /* IDE Base Port Address */
+ HPT_U32 ControlPort; /* IDE Control Port Address */
+
+ DEVICEID Devices[2]; /* device connected to this channel */
+
+} CHANNEL_INFO, *PCHANNEL_INFO;
+
+typedef struct _CHANNEL_INFO_V2 {
+ HPT_U32 IoPort; /* IDE Base Port Address */
+ HPT_U32 ControlPort; /* IDE Control Port Address */
+
+ DEVICEID Devices[2+13]; /* device connected to this channel, PMPort max=15 */
+} CHANNEL_INFO_V2, *PCHANNEL_INFO_V2;
+
+typedef struct _ENCLOSURE_INFO {
+ HPT_U8 EnclosureType;
+ HPT_U8 NumberOfPhys;
+ HPT_U8 AttachedTo;
+ HPT_U8 Status;
+ HPT_U8 VendorId[8];
+ HPT_U8 ProductId[16];
+ HPT_U8 ProductRevisionLevel[4];
+ HPT_U32 PortPhyMap;
+ HPT_U32 reserve[55];
+} ENCLOSURE_INFO, *PENCLOSURE_INFO;
+
+
+typedef struct _SES_ELEMENT_STATUS {
+ HPT_U8 ElementType;
+ HPT_U8 ElementOverallIndex;
+ HPT_U8 ElementStatus;
+ HPT_U8 Reserved;
+ HPT_U32 ElementValue;
+ HPT_U8 ElementDescriptor[32];
+}SES_ELEMENT_STATUS,*PSES_ELEMENT_STATUS;
+
+#define MAX_ELEMENT_COUNT 80
+/* Element Type */
+#define SES_TYPE_UNSPECIFIED 0x00
+#define SES_TYPE_DEVICE 0x01
+#define SES_TYPE_POWER_SUPPLY 0x02
+#define SES_TYPE_FAN 0x03
+#define SES_TYPE_TEMPERATURE_SENSOR 0x04
+#define SES_TYPE_DOOR_LOCK 0x05
+#define SES_TYPE_SPEAKER 0x06
+#define SES_TYPE_ES_CONTROLLER 0x07
+#define SES_TYPE_SCC_CONTROLLER 0x08
+#define SES_TYPE_NONVOLATILE_CACHE 0x09
+#define SES_TYPE_UPS 0x0B
+#define SES_TYPE_DISPLAY 0x0C
+#define SES_TYPE_KEYPAD 0x0D
+#define SES_TYPE_ENCLOSURE 0x0E
+#define SES_TYPE_SCSI_TRANSCEIVER 0x0F
+#define SES_TYPE_LANGUAGE 0x10
+#define SES_TYPE_COMM_PORT 0x11
+#define SES_TYPE_VOLTAGE_SENSOR 0x12
+#define SES_TYPE_CURRENT_SENSOR 0x13
+#define SES_TYPE_SCSI_TARGET_PORT 0x14
+#define SES_TYPE_SCSI_INITIATOR_PORT 0x15
+#define SES_TYPE_SIMPLE_SUBENCLOSURE 0x16
+#define SES_TYPE_ARRAY_DEVICE 0x17
+#define SES_TYPE_VENDOR_SPECIFIC 0x80
+
+/* Element Status */
+
+#define SES_STATUS_UNSUPPORTED 0x00
+#define SES_STATUS_OK 0x01
+#define SES_STATUS_CRITICAL 0x02
+#define SES_STATUS_NONCRITICAL 0x03
+#define SES_STATUS_UNRECOVERABLE 0x04
+#define SES_STATUS_NOTINSTALLED 0x05
+#define SES_STATUS_UNKNOWN 0x06
+#define SES_STATUS_NOTAVAILABLE 0x06
+#define SES_STATUS_RESERVED 0x07
+
+
+typedef struct _ENCLOSURE_INFO_V2 {
+ HPT_U8 EnclosureType;
+ HPT_U8 NumberOfPhys;
+ HPT_U8 AttachedTo;
+ HPT_U8 Status;
+ HPT_U8 VendorId[8];
+ HPT_U8 ProductId[16];
+ HPT_U8 ProductRevisionLevel[4];
+ HPT_U32 PortPhyMap;
+ SES_ELEMENT_STATUS ElementStatus[MAX_ELEMENT_COUNT];
+} ENCLOSURE_INFO_V2, *PENCLOSURE_INFO_V2;
+
+typedef struct _ENCLOSURE_INFO_V3 {
+ HPT_U8 EnclosureType;
+ HPT_U8 NumberOfPhys;
+ HPT_U8 AttachedTo;
+ HPT_U8 Status;
+ HPT_U8 VendorId[8];
+ HPT_U8 ProductId[16];
+ HPT_U8 ProductRevisionLevel[4];
+ HPT_U32 PortPhyMap;
+ HPT_U32 UnitId; /*272x card has two Cores, unitId is used to distinguish them */
+ HPT_U32 reserved[32];
+ SES_ELEMENT_STATUS ElementStatus[MAX_ELEMENT_COUNT];
+} ENCLOSURE_INFO_V3, *PENCLOSURE_INFO_V3;
+
+#define ENCLOSURE_STATUS_OFFLINE 1
+
+#define ENCLOSURE_TYPE_INTERNAL 0
+#define ENCLOSURE_TYPE_SMP 1
+#define ENCLOSURE_TYPE_PM 2
+
+#ifndef __KERNEL__
+/*
+ * time represented in HPT_U32 format
+ */
+typedef struct _TIME_RECORD {
+ HPT_U32 seconds:6; /* 0 - 59 */
+ HPT_U32 minutes:6; /* 0 - 59 */
+ HPT_U32 month:4; /* 1 - 12 */
+ HPT_U32 hours:6; /* 0 - 59 */
+ HPT_U32 day:5; /* 1 - 31 */
+ HPT_U32 year:5; /* 0=2000, 31=2031 */
+} TIME_RECORD;
+#endif
+
+/*
+ * Array information.
+ */
+typedef struct _HPT_ARRAY_INFO {
+ HPT_U8 Name[MAX_ARRAYNAME_LEN];/* array name */
+ HPT_U8 Description[64]; /* array description */
+ HPT_U8 CreateManager[16]; /* who created it */
+ TIME_RECORD CreateTime; /* when created it */
+
+ HPT_U8 ArrayType; /* array type */
+ HPT_U8 BlockSizeShift; /* stripe size */
+ HPT_U8 nDisk; /* member count: Number of ID in Members[] */
+ HPT_U8 SubArrayType;
+
+ HPT_U32 Flags; /* working flags, see ARRAY_FLAG_XXX */
+ HPT_U32 Members[MAX_ARRAY_MEMBERS_V1]; /* member array/disks */
+
+ /*
+ * rebuilding progress, xx.xx% = sprintf(s, "%.2f%%", RebuildingProgress/100.0);
+ * only valid if rebuilding is done by driver code.
+ * Member Flags will have ARRAY_FLAG_REBUILDING set at this case.
+ * Verify operation use same fields below, the only difference is
+ * ARRAY_FLAG_VERIFYING is set.
+ */
+ HPT_U32 RebuildingProgress;
+ HPT_U32 RebuiltSectors; /* rebuilding point (LBA) for single member */
+
+} HPT_ARRAY_INFO, *PHPT_ARRAY_INFO;
+
+#if HPT_INTERFACE_VERSION>=0x01010000
+typedef struct _HPT_ARRAY_INFO_V2 {
+ HPT_U8 Name[MAX_ARRAYNAME_LEN];/* array name */
+ HPT_U8 Description[64]; /* array description */
+ HPT_U8 CreateManager[16]; /* who created it */
+ TIME_RECORD CreateTime; /* when created it */
+
+ HPT_U8 ArrayType; /* array type */
+ HPT_U8 BlockSizeShift; /* stripe size */
+ HPT_U8 nDisk; /* member count: Number of ID in Members[] */
+ HPT_U8 SubArrayType;
+
+ HPT_U32 Flags; /* working flags, see ARRAY_FLAG_XXX */
+ HPT_U32 Members[MAX_ARRAY_MEMBERS_V2]; /* member array/disks */
+
+ HPT_U32 RebuildingProgress;
+ HPT_U64 RebuiltSectors; /* rebuilding point (LBA) for single member */
+
+ HPT_U32 reserve4[4];
+} HPT_ARRAY_INFO_V2, *PHPT_ARRAY_INFO_V2;
+#endif
+
+#if HPT_INTERFACE_VERSION>=0x01020000
+typedef struct _HPT_ARRAY_INFO_V3 {
+ HPT_U8 Name[MAX_ARRAYNAME_LEN];/* array name */
+ HPT_U8 Description[64]; /* array description */
+ HPT_U8 CreateManager[16]; /* who created it */
+ TIME_RECORD CreateTime; /* when created it */
+
+ HPT_U8 ArrayType; /* array type */
+ HPT_U8 BlockSizeShift; /* stripe size */
+ HPT_U8 nDisk; /* member count: Number of ID in Members[] */
+ HPT_U8 SubArrayType;
+
+ HPT_U32 Flags; /* working flags, see ARRAY_FLAG_XXX */
+ HPT_U32 Members[MAX_ARRAY_MEMBERS_V2]; /* member array/disks */
+
+ HPT_U32 RebuildingProgress;
+ HPT_U64 RebuiltSectors; /* rebuilding point (LBA) for single member */
+
+ DEVICEID TransformSource;
+ DEVICEID TransformTarget; /* destination device ID */
+ HPT_U32 TransformingProgress;
+ HPT_U32 Signature; /* persistent identification*/
+#if MAX_ARRAY_MEMBERS_V2==16
+ HPT_U16 Critical_Members; /* bit mask of critical members */
+ HPT_U16 reserve2;
+ HPT_U32 reserve;
+#else
+ HPT_U32 Critical_Members;
+ HPT_U32 reserve;
+#endif
+} HPT_ARRAY_INFO_V3, *PHPT_ARRAY_INFO_V3;
+#endif
+
+#if HPT_INTERFACE_VERSION>=0x02000001
+typedef struct _HPT_ARRAY_INFO_V4 {
+ HPT_U8 Name[MAX_ARRAYNAME_LEN];/* array name */
+ HPT_U8 Description[64]; /* array description */
+ HPT_U8 CreateManager[16]; /* who created it */
+ TIME_RECORD CreateTime; /* when created it */
+
+ HPT_U8 ArrayType; /* array type */
+ HPT_U8 BlockSizeShift; /* stripe size */
+ HPT_U8 nDisk; /* member count: Number of ID in Members[] */
+ HPT_U8 SubArrayType;
+
+ HPT_U32 Flags; /* working flags, see ARRAY_FLAG_XXX */
+
+ HPT_U32 RebuildingProgress;
+ HPT_U64 RebuiltSectors; /* rebuilding point (LBA) for single member */
+
+ DEVICEID TransformSource;
+ DEVICEID TransformTarget; /* destination device ID */
+ HPT_U32 TransformingProgress;
+ HPT_U32 Signature; /* persistent identification*/
+ HPT_U8 SectorSizeShift; /*sector size = 512B<<SectorSizeShift*/
+ HPT_U8 reserved2[7];
+ HPT_U64 Critical_Members;
+ HPT_U32 Members[MAX_ARRAY_MEMBERS_V3]; /* member array/disks */
+} HPT_ARRAY_INFO_V4, *PHPT_ARRAY_INFO_V4;
+#endif
+
+
+/*
+ * ATA/ATAPI Device identify data without the Reserved4.
+ */
+typedef struct _IDENTIFY_DATA2 {
+ HPT_U16 GeneralConfiguration;
+ HPT_U16 NumberOfCylinders;
+ HPT_U16 Reserved1;
+ HPT_U16 NumberOfHeads;
+ HPT_U16 UnformattedBytesPerTrack;
+ HPT_U16 UnformattedBytesPerSector;
+ HPT_U8 SasAddress[8];
+ HPT_U16 SerialNumber[10];
+ HPT_U16 BufferType;
+ HPT_U16 BufferSectorSize;
+ HPT_U16 NumberOfEccBytes;
+ HPT_U16 FirmwareRevision[4];
+ HPT_U16 ModelNumber[20];
+ HPT_U8 MaximumBlockTransfer;
+ HPT_U8 VendorUnique2;
+ HPT_U16 DoubleWordIo;
+ HPT_U16 Capabilities;
+ HPT_U16 Reserved2;
+ HPT_U8 VendorUnique3;
+ HPT_U8 PioCycleTimingMode;
+ HPT_U8 VendorUnique4;
+ HPT_U8 DmaCycleTimingMode;
+ HPT_U16 TranslationFieldsValid;
+ HPT_U16 NumberOfCurrentCylinders;
+ HPT_U16 NumberOfCurrentHeads;
+ HPT_U16 CurrentSectorsPerTrack;
+ HPT_U32 CurrentSectorCapacity;
+ HPT_U16 CurrentMultiSectorSetting;
+ HPT_U32 UserAddressableSectors;
+ HPT_U8 SingleWordDMASupport;
+ HPT_U8 SingleWordDMAActive;
+ HPT_U8 MultiWordDMASupport;
+ HPT_U8 MultiWordDMAActive;
+ HPT_U8 AdvancedPIOModes;
+ HPT_U8 Reserved4;
+ HPT_U16 MinimumMWXferCycleTime;
+ HPT_U16 RecommendedMWXferCycleTime;
+ HPT_U16 MinimumPIOCycleTime;
+ HPT_U16 MinimumPIOCycleTimeIORDY;
+ HPT_U16 Reserved5[2];
+ HPT_U16 ReleaseTimeOverlapped;
+ HPT_U16 ReleaseTimeServiceCommand;
+ HPT_U16 MajorRevision;
+ HPT_U16 MinorRevision;
+} __attribute__((packed)) IDENTIFY_DATA2, *PIDENTIFY_DATA2;
+
+/*
+ * physical device information.
+ * IdentifyData.ModelNumber[] is HPT_U8-swapped from the original identify data.
+ */
+typedef struct _DEVICE_INFO {
+ HPT_U8 ControllerId; /* controller id */
+ HPT_U8 PathId; /* bus */
+ HPT_U8 TargetId; /* id */
+ HPT_U8 DeviceModeSetting; /* Current Data Transfer mode: 0-4 PIO 0-4 */
+ /* 5-7 MW DMA0-2, 8-13 UDMA0-5 */
+ HPT_U8 DeviceType; /* device type */
+ HPT_U8 UsableMode; /* highest usable mode */
+
+#ifdef __BIG_ENDIAN_BITFIELD
+ HPT_U8 NCQEnabled: 1;
+ HPT_U8 NCQSupported: 1;
+ HPT_U8 TCQEnabled: 1;
+ HPT_U8 TCQSupported: 1;
+ HPT_U8 WriteCacheEnabled: 1;
+ HPT_U8 WriteCacheSupported: 1;
+ HPT_U8 ReadAheadEnabled: 1;
+ HPT_U8 ReadAheadSupported: 1;
+ HPT_U8 reserved6: 6;
+ HPT_U8 SpinUpMode: 2;
+#else
+ HPT_U8 ReadAheadSupported: 1;
+ HPT_U8 ReadAheadEnabled: 1;
+ HPT_U8 WriteCacheSupported: 1;
+ HPT_U8 WriteCacheEnabled: 1;
+ HPT_U8 TCQSupported: 1;
+ HPT_U8 TCQEnabled: 1;
+ HPT_U8 NCQSupported: 1;
+ HPT_U8 NCQEnabled: 1;
+ HPT_U8 SpinUpMode: 2;
+ HPT_U8 reserved6: 6;
+#endif
+
+ HPT_U32 Flags; /* working flags, see DEVICE_FLAG_XXX */
+
+ IDENTIFY_DATA2 IdentifyData; /* Identify Data of this device */
+
+}
+__attribute__((packed)) DEVICE_INFO, *PDEVICE_INFO;
+
+#if HPT_INTERFACE_VERSION>=0x01020000
+#define MAX_PARENTS_PER_DISK 8
+/*
+ * physical device information.
+ * IdentifyData.ModelNumber[] is HPT_U8-swapped from the original identify data.
+ */
+typedef struct _DEVICE_INFO_V2 {
+ HPT_U8 ControllerId; /* controller id */
+ HPT_U8 PathId; /* bus */
+ HPT_U8 TargetId; /* id */
+ HPT_U8 DeviceModeSetting; /* Current Data Transfer mode: 0-4 PIO 0-4 */
+ /* 5-7 MW DMA0-2, 8-13 UDMA0-5 */
+ HPT_U8 DeviceType; /* device type */
+ HPT_U8 UsableMode; /* highest usable mode */
+
+#ifdef __BIG_ENDIAN_BITFIELD
+ HPT_U8 NCQEnabled: 1;
+ HPT_U8 NCQSupported: 1;
+ HPT_U8 TCQEnabled: 1;
+ HPT_U8 TCQSupported: 1;
+ HPT_U8 WriteCacheEnabled: 1;
+ HPT_U8 WriteCacheSupported: 1;
+ HPT_U8 ReadAheadEnabled: 1;
+ HPT_U8 ReadAheadSupported: 1;
+ HPT_U8 reserved6: 6;
+ HPT_U8 SpinUpMode: 2;
+#else
+ HPT_U8 ReadAheadSupported: 1;
+ HPT_U8 ReadAheadEnabled: 1;
+ HPT_U8 WriteCacheSupported: 1;
+ HPT_U8 WriteCacheEnabled: 1;
+ HPT_U8 TCQSupported: 1;
+ HPT_U8 TCQEnabled: 1;
+ HPT_U8 NCQSupported: 1;
+ HPT_U8 NCQEnabled: 1;
+ HPT_U8 SpinUpMode: 2;
+ HPT_U8 reserved6: 6;
+#endif
+
+ HPT_U32 Flags; /* working flags, see DEVICE_FLAG_XXX */
+
+ IDENTIFY_DATA2 IdentifyData; /* Identify Data of this device */
+
+ HPT_U64 TotalFree;
+ HPT_U64 MaxFree;
+ HPT_U64 BadSectors;
+ DEVICEID ParentArrays[MAX_PARENTS_PER_DISK];
+
+}
+__attribute__((packed)) DEVICE_INFO_V2, *PDEVICE_INFO_V2, DEVICE_INFO_V3, *PDEVICE_INFO_V3;
+
+/*
+ * HPT601 information
+ */
+#endif
+/*
+ * HPT601 information
+ */
+#define HPT601_INFO_DEVICEID 1
+#define HPT601_INFO_TEMPERATURE 2
+#define HPT601_INFO_FANSTATUS 4
+#define HPT601_INFO_BEEPERCONTROL 8
+#define HPT601_INFO_LED1CONTROL 0x10
+#define HPT601_INFO_LED2CONTROL 0x20
+#define HPT601_INFO_POWERSTATUS 0x40
+
+typedef struct _HPT601_INFO_ {
+ HPT_U16 ValidFields; /* mark valid fields below */
+ HPT_U16 DeviceId; /* 0x5A3E */
+ HPT_U16 Temperature; /* Read: temperature sensor value. Write: temperature limit */
+ HPT_U16 FanStatus; /* Fan status */
+ HPT_U16 BeeperControl; /* bit4: beeper control bit. bit0-3: frequency bits */
+ HPT_U16 LED1Control; /* bit4: twinkling control bit. bit0-3: frequency bits */
+ HPT_U16 LED2Control; /* bit4: twinkling control bit. bit0-3: frequency bits */
+ HPT_U16 PowerStatus; /* 1: has power 2: no power */
+} HPT601_INFO, *PHPT601_INFO;
+
+#if HPT_INTERFACE_VERSION>=0x01010000
+#ifndef __KERNEL__
+/* cache policy for each vdev, copied from ldm.h */
+#define CACHE_POLICY_NONE 0
+#define CACHE_POLICY_WRITE_THROUGH 1
+#define CACHE_POLICY_WRITE_BACK 2
+
+#endif
+#endif
+/*
+ * Logical device information.
+ * Union of ArrayInfo and DeviceInfo.
+ * Common properties will be put in logical device information.
+ */
+typedef struct _LOGICAL_DEVICE_INFO {
+ HPT_U8 Type; /* LDT_ARRAY or LDT_DEVICE */
+ HPT_U8 reserved[3];
+
+ HPT_U32 Capacity; /* array capacity */
+ DEVICEID ParentArray;
+
+ union {
+ HPT_ARRAY_INFO array;
+ DEVICE_INFO device;
+ } __attribute__((packed)) u;
+
+} __attribute__((packed)) LOGICAL_DEVICE_INFO, *PLOGICAL_DEVICE_INFO;
+
+#if HPT_INTERFACE_VERSION>=0x01010000
+typedef struct _LOGICAL_DEVICE_INFO_V2 {
+ HPT_U8 Type; /* LDT_ARRAY or LDT_DEVICE */
+ HPT_U8 reserved[3];
+
+ HPT_U64 Capacity; /* array capacity */
+ DEVICEID ParentArray; /* for physical device, Please don't use this field.
+ * use ParentArrays field in DEVICE_INFO_V2
+ */
+
+ union {
+ HPT_ARRAY_INFO_V2 array;
+ DEVICE_INFO device;
+ } __attribute__((packed)) u;
+
+} __attribute__((packed)) LOGICAL_DEVICE_INFO_V2, *PLOGICAL_DEVICE_INFO_V2;
+#endif
+
+#if HPT_INTERFACE_VERSION>=0x01020000
+#define INVALID_TARGET_ID 0xFF
+#define INVALID_BUS_ID 0xFF
+typedef struct _LOGICAL_DEVICE_INFO_V3 {
+ HPT_U8 Type; /* LDT_ARRAY or LDT_DEVICE */
+ HPT_U8 CachePolicy; /* refer to CACHE_POLICY_xxx */
+ HPT_U8 VBusId; /* vbus sequence in vbus_list */
+ HPT_U8 TargetId; /* OS target id. Value 0xFF is invalid */
+ /* OS disk name: HPT DISK $VBusId_$TargetId */
+ HPT_U64 Capacity; /* array capacity */
+ DEVICEID ParentArray; /* for physical device, don't use this field.
+ * use ParentArrays field in DEVICE_INFO_V2 instead.
+ */
+ HPT_U32 TotalIOs;
+ HPT_U32 TobalMBs;
+ HPT_U32 IOPerSec;
+ HPT_U32 MBPerSec;
+
+ union {
+ HPT_ARRAY_INFO_V3 array;
+ DEVICE_INFO_V2 device;
+ } __attribute__((packed)) u;
+
+}
+__attribute__((packed)) LOGICAL_DEVICE_INFO_V3, *PLOGICAL_DEVICE_INFO_V3;
+#endif
+
+#if HPT_INTERFACE_VERSION>=0x02000001
+typedef struct _LOGICAL_DEVICE_INFO_V4 {
+ HPT_U32 dwSize;
+ HPT_U8 revision;
+ HPT_U8 reserved[7];
+
+ HPT_U8 Type; /* LDT_ARRAY or LDT_DEVICE */
+ HPT_U8 CachePolicy; /* refer to CACHE_POLICY_xxx */
+ HPT_U8 VBusId; /* vbus sequence in vbus_list */
+ HPT_U8 TargetId; /* OS target id. Value 0xFF is invalid */
+ /* OS disk name: HPT DISK $VBusId_$TargetId */
+ HPT_U64 Capacity; /* array capacity */
+ DEVICEID ParentArray; /* for physical device, don't use this field.
+ * use ParentArrays field in DEVICE_INFO_V2 instead.
+ */
+ HPT_U32 TotalIOs;
+ HPT_U32 TobalMBs;
+ HPT_U32 IOPerSec;
+ HPT_U32 MBPerSec;
+
+ union {
+ HPT_ARRAY_INFO_V4 array;
+ DEVICE_INFO_V3 device;
+ } __attribute__((packed)) u;
+}
+__attribute__((packed)) LOGICAL_DEVICE_INFO_V4, *PLOGICAL_DEVICE_INFO_V4;
+
+/*LOGICAL_DEVICE_INFO_V4 max revision number*/
+#define LOGICAL_DEVICE_INFO_V4_REVISION 0
+/*If new revision was defined please check evey revision size*/
+#define LOGICAL_DEVICE_INFO_V4_R0_SIZE (sizeof(LOGICAL_DEVICE_INFO_V4))
+#endif
+
+/*
+ * ALTERABLE_ARRAY_INFO and ALTERABLE_DEVICE_INFO, used in set_array_info()
+ * and set_device_info().
+ * When set_xxx_info() is called, the ValidFields member indicates which
+ * fields in the structure are valid.
+ */
+/* field masks */
+#define AAIF_NAME 1
+#define AAIF_DESCRIPTION 2
+
+#define ADIF_MODE 1
+#define ADIF_TCQ 2
+#define ADIF_NCQ 4
+#define ADIF_WRITE_CACHE 8
+#define ADIF_READ_AHEAD 0x10
+#define ADIF_SPIN_UP_MODE 0x20
+
+typedef struct _ALTERABLE_ARRAY_INFO {
+ HPT_U32 ValidFields; /* mark valid fields below */
+ HPT_U8 Name[MAX_ARRAYNAME_LEN]; /* array name */
+ HPT_U8 Description[64]; /* array description */
+}__attribute__((packed))ALTERABLE_ARRAY_INFO, *PALTERABLE_ARRAY_INFO;
+
+typedef struct _ALTERABLE_DEVICE_INFO {
+ HPT_U32 ValidFields; /* mark valid fields below */
+ HPT_U8 DeviceModeSetting; /* 0-4 PIO 0-4, 5-7 MW DMA0-2, 8-13 UDMA0-5 */
+}__attribute__((packed))ALTERABLE_DEVICE_INFO, *PALTERABLE_DEVICE_INFO;
+
+typedef struct _ALTERABLE_DEVICE_INFO_V2 {
+ HPT_U32 ValidFields; /* mark valid fields below */
+ HPT_U8 DeviceModeSetting; /* 0-4 PIO 0-4, 5-7 MW DMA0-2, 8-13 UDMA0-5 */
+ HPT_U8 TCQEnabled;
+ HPT_U8 NCQEnabled;
+ HPT_U8 WriteCacheEnabled;
+ HPT_U8 ReadAheadEnabled;
+ HPT_U8 SpinUpMode;
+ HPT_U8 reserve[2];
+ HPT_U32 reserve2[13]; /* pad to 64 bytes */
+}__attribute__((packed))ALTERABLE_DEVICE_INFO_V2, *PALTERABLE_DEVICE_INFO_V2;
+
+#if HPT_INTERFACE_VERSION>=0x01020000
+
+#define TARGET_TYPE_DEVICE 0
+#define TARGET_TYPE_ARRAY 1
+
+
+#define AIT_NAME 0
+#define AIT_DESCRIPTION 1
+#define AIT_CACHE_POLICY 2
+
+
+#define DIT_MODE 0
+#define DIT_READ_AHEAD 1
+#define DIT_WRITE_CACHE 2
+#define DIT_TCQ 3
+#define DIT_NCQ 4
+#define DIT_IDENTIFY 5
+
+/* param type is determined by target_type and info_type*/
+typedef struct _SET_DEV_INFO
+{
+ HPT_U8 target_type;
+ HPT_U8 infor_type;
+ HPT_U16 param_length;
+ #define SET_VDEV_INFO_param(p) ((HPT_U8 *)(p)+sizeof(SET_VDEV_INFO))
+ /* HPT_U8 param[0]; */
+} SET_VDEV_INFO, * PSET_VDEV_INFO;
+
+typedef HPT_U8 PARAM_ARRAY_NAME[MAX_ARRAYNAME_LEN] ;
+typedef HPT_U8 PARAM_ARRAY_DES[64];
+typedef HPT_U8 PARAM_DEVICE_MODE, PARAM_TCQ, PARAM_NCQ, PARAM_READ_AHEAD, PARAM_WRITE_CACHE, PARAM_CACHE_POLICY;
+
+#endif
+
+/*
+ * CREATE_ARRAY_PARAMS
+ * Param structure used to create an array.
+ */
+typedef struct _CREATE_ARRAY_PARAMS {
+ HPT_U8 ArrayType; /* 1-level array type */
+ HPT_U8 nDisk; /* number of elements in Members[] array */
+ HPT_U8 BlockSizeShift; /* Stripe size if ArrayType==AT_RAID0 / AT_RAID5 */
+ HPT_U8 CreateFlags; /* See CAF_xxx */
+
+ HPT_U8 ArrayName[MAX_ARRAYNAME_LEN];/* Array name */
+ HPT_U8 Description[64]; /* array description */
+ HPT_U8 CreateManager[16]; /* who created it */
+ TIME_RECORD CreateTime; /* when created it */
+
+ HPT_U32 Members[MAX_ARRAY_MEMBERS_V1];/* ID of array members, a member can be an array */
+
+} CREATE_ARRAY_PARAMS, *PCREATE_ARRAY_PARAMS;
+
+#if HPT_INTERFACE_VERSION>=0x01010000
+typedef struct _CREATE_ARRAY_PARAMS_V2 {
+ HPT_U8 ArrayType; /* 1-level array type */
+ HPT_U8 nDisk; /* number of elements in Members[] array */
+ HPT_U8 BlockSizeShift; /* Stripe size if ArrayType==AT_RAID0 / AT_RAID5 */
+ HPT_U8 CreateFlags; /* See CAF_xxx */
+
+ HPT_U8 ArrayName[MAX_ARRAYNAME_LEN];/* Array name */
+ HPT_U8 Description[64]; /* array description */
+ HPT_U8 CreateManager[16]; /* who created it */
+ TIME_RECORD CreateTime; /* when created it */
+ HPT_U64 Capacity;
+
+ HPT_U32 Members[MAX_ARRAY_MEMBERS_V2];/* ID of array members, a member can be an array */
+
+} CREATE_ARRAY_PARAMS_V2, *PCREATE_ARRAY_PARAMS_V2;
+#endif
+
+#if HPT_INTERFACE_VERSION>=0x02000001
+typedef struct _CREATE_ARRAY_PARAMS_V3 {
+ HPT_U32 dwSize;
+ HPT_U8 revision; /*CREATE_ARRAY_PARAMS_V3_REVISION*/
+ HPT_U8 reserved[5];
+ HPT_U8 subDisks; /* RAIDn0 sub array */
+ HPT_U8 SectorSizeShift; /*sector size = 512B<<SectorSizeShift*/
+ HPT_U8 ArrayType; /* 1-level array type */
+ HPT_U8 nDisk; /* number of elements in Members[] array */
+ HPT_U8 BlockSizeShift; /* Stripe size if ArrayType==AT_RAID0 / AT_RAID5 */
+ HPT_U8 CreateFlags; /* See CAF_xxx */
+
+ HPT_U8 ArrayName[MAX_ARRAYNAME_LEN];/* Array name */
+ HPT_U8 Description[64]; /* array description */
+ HPT_U8 CreateManager[16]; /* who created it */
+ TIME_RECORD CreateTime; /* when created it */
+ HPT_U64 Capacity;
+
+ HPT_U32 Members[MAX_ARRAY_MEMBERS_V3];/* ID of array members, a member can be an array */
+} CREATE_ARRAY_PARAMS_V3, *PCREATE_ARRAY_PARAMS_V3;
+
+/*CREATE_ARRAY_PARAMS_V3 current max revision*/
+#define CREATE_ARRAY_PARAMS_V3_REVISION 0
+/*If new revision defined please check evey revision size*/
+#define CREATE_ARRAY_PARAMS_V3_R0_SIZE (sizeof(CREATE_ARRAY_PARAMS_V3))
+#endif
+
+#if HPT_INTERFACE_VERSION < 0x01020000
+/*
+ * Flags used for creating an RAID 1 array
+ *
+ * CAF_CREATE_AND_DUPLICATE
+ * Copy source disk contents to target for RAID 1. If user choose "create and duplicate"
+ * to create an array, GUI will call CreateArray() with this flag set. Then GUI should
+ * call hpt_get_device_info() with the returned array ID and check returned flags to
+ * see if ARRAY_FLAG_REBUILDING is set. If not set, driver does not support rebuilding
+ * and GUI must do duplication itself.
+ * CAF_DUPLICATE_MUST_DONE
+ * If the duplication is aborted or fails, do not create the array.
+ */
+#define CAF_CREATE_AND_DUPLICATE 1
+#define CAF_DUPLICATE_MUST_DONE 2
+#define CAF_CREATE_AS_RAID15 4
+/*
+ * Flags used for creating an RAID 5 array
+ */
+#define CAF_CREATE_R5_NO_BUILD 1
+#define CAF_CREATE_R5_ZERO_INIT 2
+#define CAF_CREATE_R5_BUILD_PARITY 4
+
+#else
+/*
+ * Flags used for creating
+ */
+#define CAF_FOREGROUND_INITIALIZE 1
+#define CAF_BACKGROUND_INITIALIZE 2
+#define CAF_CREATE_R5_WRITE_BACK (CACHE_POLICY_WRITE_BACK<<CAF_CACHE_POLICY_SHIFT)
+
+
+#define CAF_CACHE_POLICY_MASK 0x1C
+#define CAF_CACHE_POLICY_SHIFT 2
+
+#endif
+
+#define CAF_KEEP_DATA_ALWAYS 0x80
+
+/* Flags used for deleting an array
+ *
+ * DAF_KEEP_DATA_IF_POSSIBLE
+ * If this flag is set, deleting a RAID 1 array will not destroy the data on both disks.
+ * Deleting a JBOD should keep partitions on first disk ( not implement now ).
+ * Deleting a RAID 0/1 should result as two RAID 0 array ( not implement now ).
+ */
+#define DAF_KEEP_DATA_IF_POSSIBLE 1
+#define DAF_KEEP_DATA_ALWAYS 2
+
+/*
+ * event types
+ */
+#define ET_DEVICE_REMOVED 1 /* device removed */
+#define ET_DEVICE_PLUGGED 2 /* device plugged */
+#define ET_DEVICE_ERROR 3 /* device I/O error */
+#define ET_REBUILD_STARTED 4
+#define ET_REBUILD_ABORTED 5
+#define ET_REBUILD_FINISHED 6
+#define ET_SPARE_TOOK_OVER 7
+#define ET_REBUILD_FAILED 8
+#define ET_VERIFY_STARTED 9
+#define ET_VERIFY_ABORTED 10
+#define ET_VERIFY_FAILED 11
+#define ET_VERIFY_FINISHED 12
+#define ET_INITIALIZE_STARTED 13
+#define ET_INITIALIZE_ABORTED 14
+#define ET_INITIALIZE_FAILED 15
+#define ET_INITIALIZE_FINISHED 16
+#define ET_VERIFY_DATA_ERROR 17
+#define ET_TRANSFORM_STARTED 18
+#define ET_TRANSFORM_ABORTED 19
+#define ET_TRANSFORM_FAILED 20
+#define ET_TRANSFORM_FINISHED 21
+#define ET_SMART_FAILED 22
+#define ET_SMART_PASSED 23
+#define ET_SECTOR_REPAIR_FAIL 24
+#define ET_SECTOR_REPAIR_SUCCESS 25
+#define ET_ERASE_FAIL 26
+#define ET_ERASE_SUCCESS 27
+#define ET_CONTINUE_REBUILD_ON_ERROR 28
+
+
+/*
+ * event structure
+ */
+typedef struct _HPT_EVENT {
+ TIME_RECORD Time;
+ DEVICEID DeviceID;
+ HPT_U8 EventType;
+ HPT_U8 reserved[3];
+
+ HPT_U8 Data[32]; /* various data depend on EventType */
+} HPT_EVENT, *PHPT_EVENT;
+
+/*
+ * IDE pass-through command. Use it at your own risk!
+ */
+typedef struct _IDE_PASS_THROUGH_HEADER {
+ DEVICEID idDisk; /* disk ID */
+ HPT_U8 bFeaturesReg; /* feature register */
+ HPT_U8 bSectorCountReg; /* IDE sector count register. */
+ HPT_U8 bLbaLowReg; /* IDE LBA low value. */
+ HPT_U8 bLbaMidReg; /* IDE LBA mid register. */
+ HPT_U8 bLbaHighReg; /* IDE LBA high value. */
+ HPT_U8 bDriveHeadReg; /* IDE drive/head register. */
+ HPT_U8 bCommandReg; /* Actual IDE command. Checked for validity by driver. */
+ HPT_U8 nSectors; /* data size in sectors, if the command has data transfer */
+ HPT_U8 protocol; /* IO_COMMAND_(READ,WRITE) or zero for non-DATA */
+ HPT_U8 reserve[3];
+ #define IDE_PASS_THROUGH_buffer(p) ((HPT_U8 *)(p) + sizeof(IDE_PASS_THROUGH_HEADER))
+ /* HPT_U8 DataBuffer[0]; */
+}
+IDE_PASS_THROUGH_HEADER, *PIDE_PASS_THROUGH_HEADER;
+
+typedef struct _IDE_PASS_THROUGH_HEADER_V2 {
+ DEVICEID idDisk; /* disk ID */
+ HPT_U16 bFeaturesReg; /* feature register */
+ HPT_U16 bSectorCountReg; /* IDE sector count register. */
+ HPT_U16 bLbaLowReg; /* IDE LBA low value. */
+ HPT_U16 bLbaMidReg; /* IDE LBA mid register. */
+ HPT_U16 bLbaHighReg; /* IDE LBA high value. */
+ HPT_U8 bDriveHeadReg; /* IDE drive/head register. */
+ HPT_U8 bCommandReg; /* Actual IDE command. Checked for validity by driver. */
+ HPT_U16 nSectors; /* data size in sectors, if the command has data transfer */
+ HPT_U8 protocol; /* IO_COMMAND_(READ,WRITE) or zero for non-DATA */
+ HPT_U8 reserve;
+ #define IDE_PASS_THROUGH_V2_buffer(p) ((HPT_U8 *)(p) + sizeof(IDE_PASS_THROUGH_HEADER_V2))
+ /* HPT_U8 DataBuffer[0]; */
+}
+IDE_PASS_THROUGH_HEADER_V2, *PIDE_PASS_THROUGH_HEADER_V2;
+
+typedef struct _HPT_SCSI_PASSTHROUGH_IN {
+ DEVICEID idDisk;
+ HPT_U8 protocol;
+ HPT_U8 reserve1;
+ HPT_U8 reserve2;
+ HPT_U8 cdbLength;
+ HPT_U8 cdb[16];
+ HPT_U32 dataLength;
+ /* data follows, if any */
+}
+HPT_SCSI_PASSTHROUGH_IN, *PHPT_SCSI_PASSTHROUGH_IN;
+
+typedef struct _HPT_SCSI_PASSTHROUGH_OUT {
+ HPT_U8 scsiStatus;
+ HPT_U8 reserve1;
+ HPT_U8 reserve2;
+ HPT_U8 reserve3;
+ HPT_U32 dataLength;
+ /* data/sense follows if any */
+}
+HPT_SCSI_PASSTHROUGH_OUT, *PHPT_SCSI_PASSTHROUGH_OUT;
+
+/*
+ * device io packet format
+ */
+typedef struct _DEVICE_IO_EX_PARAMS {
+ DEVICEID idDisk;
+ HPT_U32 Lba;
+ HPT_U16 nSectors;
+ HPT_U8 Command; /* IO_COMMAD_xxx */
+ HPT_U8 BufferType; /* BUFFER_TYPE_xxx, see below */
+ HPT_U32 BufferPtr;
+}
+DEVICE_IO_EX_PARAMS, *PDEVICE_IO_EX_PARAMS;
+
+#define BUFFER_TYPE_LOGICAL 1 /* logical pointer to buffer */
+#define BUFFER_TYPE_PHYSICAL 2 /* physical address of buffer */
+#define BUFFER_TYPE_LOGICAL_LOGICAL_SG 3 /* logical pointer to logical S/G table */
+#define BUFFER_TYPE_LOGICAL_PHYSICAL_SG 4 /* logical pointer to physical S/G table */
+#define BUFFER_TYPE_PHYSICAL_LOGICAL_SG 5 /* physical address to logical S/G table */
+#define BUFFER_TYPE_PHYSICAL_PHYSICAL_SG 6 /* physical address of physical S/G table */
+#define BUFFER_TYPE_PHYSICAL_PHYSICAL_SG_PIO 7 /* non DMA capable physical address of physical S/G table */
+
+typedef struct _HPT_DRIVER_PARAMETER {
+ char name[32];
+ HPT_U8 value[32];
+ HPT_U8 type; /* HPT_DRIVER_PARAMETER_TYPE_* */
+ HPT_U8 persistent;
+ HPT_U8 reserve2[2];
+ HPT_U8 location; /* 0 - system */
+ HPT_U8 controller;
+ HPT_U8 bus;
+ HPT_U8 reserve1;
+ char desc[128];
+}
+HPT_DRIVER_PARAMETER, *PHPT_DRIVER_PARAMETER;
+
+#define HPT_DRIVER_PARAMETER_TYPE_INT 1
+#define HPT_DRIVER_PARAMETER_TYPE_BOOL 2
+
+typedef struct _HPT_PM_CMDSTAT {
+ HPT_U64 timeStamp;
+ HPT_U64 lba;
+ HPT_U16 sectors;
+ HPT_U16 reserved;
+ HPT_U32 rspTime;
+}
+HPT_PM_CMDSTAT, *PHPT_PM_CMDSTAT;
+
+#define HIGHEST_RSPTIME_CMD_SAVE 10
+#define RSPTIME_HISTOGRAM_SEGMENT_COUNT 38
+
+typedef struct _HPT_PM_IOSTAT {
+ HPT_PM_CMDSTAT highestRspCmdStatData[HIGHEST_RSPTIME_CMD_SAVE];
+ HPT_U32 rspTimeHistogram[RSPTIME_HISTOGRAM_SEGMENT_COUNT];
+ HPT_U16 pendingIo;
+ HPT_U16 activeIo;
+ HPT_U32 instantKBPs;
+ HPT_U32 averageKBPs;
+ HPT_U32 instantIOPs;
+ HPT_U32 averageIOPs;
+}
+HPT_PM_IOSTAT, *PHPT_PM_IOSTAT;
+
+
+
+/*
+ * ioctl structure
+ */
+#define HPT_IOCTL_MAGIC32 0x1A2B3C4D
+#define HPT_IOCTL_MAGIC 0xA1B2C3D4
+
+typedef struct _HPT_IOCTL_PARAM {
+ HPT_U32 Magic; /* used to check if it's a valid ioctl packet */
+ HPT_U32 dwIoControlCode; /* operation control code */
+ HPT_PTR lpInBuffer; /* input data buffer */
+ HPT_U32 nInBufferSize; /* size of input data buffer */
+ HPT_PTR lpOutBuffer; /* output data buffer */
+ HPT_U32 nOutBufferSize; /* size of output data buffer */
+ HPT_PTR lpBytesReturned; /* count of HPT_U8s returned */
+}
+HPT_IOCTL_PARAM, *PHPT_IOCTL_PARAM;
+
+/* for 32-bit app running on 64-bit system */
+typedef struct _HPT_IOCTL_PARAM32 {
+ HPT_U32 Magic;
+ HPT_U32 dwIoControlCode;
+ HPT_U32 lpInBuffer;
+ HPT_U32 nInBufferSize;
+ HPT_U32 lpOutBuffer;
+ HPT_U32 nOutBufferSize;
+ HPT_U32 lpBytesReturned;
+}
+HPT_IOCTL_PARAM32, *PHPT_IOCTL_PARAM32;
+
+#if !defined(__KERNEL__) || defined(SIMULATE)
+/*
+ * User-mode ioctl parameter passing conventions:
+ * The ioctl function implementation is platform specific, so we don't
+ * have forced rules for it. However, it's suggested to use a parameter
+ * passing method as below
+ * 1) Put all input data continuously in an input buffer.
+ * 2) Prepare an output buffer with enough size if needed.
+ * 3) Fill a HPT_IOCTL_PARAM structure.
+ * 4) Pass the structure to driver through a platform-specific method.
+ * This is implemented in the mid-layer user-mode library. The UI
+ * programmer needn't care about it.
+ */
+
+/************************************************************************
+ * User mode functions
+ ************************************************************************/
+/*
+ * hpt_get_version
+ * Version compatibility: all versions
+ * Parameters:
+ * None
+ * Returns:
+ * interface version. 0 when fail.
+ */
+HPT_U32 hpt_get_version(void);
+
+/*
+ * hpt_get_driver_capabilities
+ * Version compatibility: v1.0.0.2 or later
+ * Parameters:
+ * Pointer to receive a DRIVE_CAPABILITIES structure. The caller must set
+ * dwSize member to sizeof(DRIVER_CAPABILITIES). The callee must check this
+ * member to see if it's correct.
+ * Returns:
+ * 0 - Success
+ */
+int hpt_get_driver_capabilities(PDRIVER_CAPABILITIES cap);
+int hpt_get_driver_capabilities_v2(PDRIVER_CAPABILITIES_V2 cap);
+
+/*
+ * hpt_get_controller_count
+ * Version compatibility: v1.0.0.1 or later
+ * Parameters:
+ * None
+ * Returns:
+ * number of controllers
+ */
+int hpt_get_controller_count(void);
+
+/* hpt_get_controller_info
+ * Version compatibility: v1.0.0.1 or later
+ * Parameters:
+ * id Controller id
+ * pInfo pointer to CONTROLLER_INFO buffer
+ * Returns:
+ * 0 Success, controller info is put into (*pInfo ).
+ */
+int hpt_get_controller_info(int id, PCONTROLLER_INFO pInfo);
+
+#if HPT_INTERFACE_VERSION>=0x01020000
+/* hpt_get_controller_info_v2
+ * Version compatibility: v2.0.0.0 or later
+ * Parameters:
+ * id Controller id
+ * pInfo pointer to CONTROLLER_INFO_V2 buffer
+ * Returns:
+ * 0 Success, controller info is put into (*pInfo ).
+ */
+int hpt_get_controller_info_v2(int id, PCONTROLLER_INFO_V2 pInfo);
+
+/* hpt_get_controller_info_v3
+ * Version compatibility: v2.0.0.0 or later
+ * Parameters:
+ * id Controller id
+ * pInfo pointer to CONTROLLER_INFO_V3 buffer
+ * Returns:
+ * 0 Success, controller info is put into (*pInfo ).
+ */
+int hpt_get_controller_info_v3(int id, PCONTROLLER_INFO_V3 pInfo);
+#endif
+
+/* hpt_get_channel_info
+ * Version compatibility: v1.0.0.1 or later
+ * Parameters:
+ * id Controller id
+ * bus bus number
+ * pInfo pointer to CHANNEL_INFO buffer
+ * Returns:
+ * 0 Success, channel info is put into (*pInfo ).
+ */
+int hpt_get_channel_info(int id, int bus, PCHANNEL_INFO pInfo);
+
+/* hpt_get_channel_info_v2
+ * Version compatibility: v1.0.0.1 or later
+ * Parameters:
+ * id Controller id
+ * bus bus number
+ * pInfo pointer to CHANNEL_INFO buffer
+ * Returns:
+ * 0 Success, channel info is put into (*pInfo ).
+ */
+int hpt_get_channel_info_v2(int id, int bus, PCHANNEL_INFO_V2 pInfo);
+
+/* hpt_get_logical_devices
+ * Version compatibility: v1.0.0.1 or later
+ * Parameters:
+ * pIds pointer to a DEVICEID array
+ * nMaxCount array size
+ * Returns:
+ * Number of ID returned. All logical device IDs are put into pIds array.
+ * Note: A spare disk is not a logical device.
+ */
+int hpt_get_logical_devices(DEVICEID * pIds, int nMaxCount);
+
+/* hpt_get_physical_devices
+ * Version compatibility: v2.1.0.0 or later
+ * Parameters:
+ * pIds pointer to a DEVICEID array
+ * nMaxCount array size
+ * Returns:
+ * Number of ID returned. All physical device IDs are put into pIds array.
+ */
+int hpt_get_physical_devices(DEVICEID * pIds, int nMaxCount);
+
+/* hpt_get_device_info
+ * Version compatibility: v1.0.0.1 or later
+ * Parameters:
+ * id logical device id
+ * pInfo pointer to LOGICAL_DEVICE_INFO structure
+ * Returns:
+ * 0 - Success
+ */
+int hpt_get_device_info(DEVICEID id, PLOGICAL_DEVICE_INFO pInfo);
+
+/* hpt_create_array
+ * Version compatibility: v1.0.0.1 or later
+ * Parameters:
+ * pParam pointer to CREATE_ARRAY_PARAMS structure
+ * Returns:
+ * 0 failed
+ * else return array id
+ */
+DEVICEID hpt_create_array(PCREATE_ARRAY_PARAMS pParam);
+
+/* hpt_delete_array
+ * Version compatibility: v1.0.0.1 or later
+ * Parameters:
+ * id array id
+ * Returns:
+ * 0 Success
+ */
+int hpt_delete_array(DEVICEID id, HPT_U32 options);
+
+/* hpt_device_io
+ * Read/write data on array and physcal device.
+ * Version compatibility: v1.0.0.1 or later
+ * Parameters:
+ * id device id. If it's an array ID, IO will be performed on the array.
+ * If it's a physical device ID, IO will be performed on the device.
+ * cmd IO_COMMAND_READ or IO_COMMAND_WRITE
+ * buffer data buffer
+ * length data size
+ * Returns:
+ * 0 Success
+ */
+int hpt_device_io(DEVICEID id, int cmd, HPT_U32 lba, HPT_U32 nSector, void * buffer);
+
+/* hpt_add_disk_to_array
+ * Used to dynamicly add a disk to an RAID1, RAID0/1, RAID1/0 or RAID5 array.
+ * Auto-rebuild will start.
+ * Version compatibility: v1.0.0.1 or later
+ * Parameters:
+ * idArray array id
+ * idDisk disk id
+ * Returns:
+ * 0 Success
+ */
+int hpt_add_disk_to_array(DEVICEID idArray, DEVICEID idDisk);
+
+/* hpt_add_spare_disk
+ * Version compatibility: v1.0.0.1 or later
+ * Add a disk to spare pool.
+ * Parameters:
+ * idDisk disk id
+ * Returns:
+ * 0 Success
+ */
+int hpt_add_spare_disk(DEVICEID idDisk);
+
+/* hpt_add_dedicated_spare
+ * Version compatibility: v1.0.0.3 or later
+ * Add a spare disk to an array
+ * Parameters:
+ * idDisk disk id
+ * idArray array id
+ * Returns:
+ * 0 Success
+ */
+int hpt_add_dedicated_spare(DEVICEID idDisk, DEVICEID idArray);
+
+/* hpt_remove_spare_disk
+ * remove a disk from spare pool.
+ * Version compatibility: v1.0.0.1 or later
+ * Parameters:
+ * idDisk disk id
+ * Returns:
+ * 0 Success
+ */
+int hpt_remove_spare_disk(DEVICEID idDisk);
+
+/* hpt_get_event
+ * Used to poll events from driver.
+ * Version compatibility: v1.0.0.1 or later
+ * Parameters:
+ * pEvent pointer to HPT_EVENT structure
+ * Returns:
+ * 0 Success, event info is filled in *pEvent
+ */
+int hpt_get_event(PHPT_EVENT pEvent);
+
+/* hpt_rebuild_data_block
+ * Used to copy data from source disk and mirror disk.
+ * Version compatibility: v1.0.0.1 or later
+ * Parameters:
+ * idArray Array ID (RAID1, 0/1 or RAID5)
+ * Lba Start LBA for each array member
+ * nSector Number of sectors for each array member (RAID 5 will ignore this parameter)
+ *
+ * Returns:
+ * 0 Success, event info is filled in *pEvent
+ */
+int hpt_rebuild_data_block(DEVICEID idMirror, HPT_U32 Lba, HPT_U8 nSector);
+#define hpt_rebuild_mirror(p1, p2, p3) hpt_rebuild_data_block(p1, p2, p3)
+
+/* hpt_set_array_state
+ * set array state.
+ * Version compatibility: v1.0.0.1 or later
+ * Parameters:
+ * idArray Array ID
+ * state See above 'array states' constants, possible values are:
+ * MIRROR_REBUILD_START
+ * Indicate that GUI wants to rebuild a mirror array
+ * MIRROR_REBUILD_ABORT
+ * GUI wants to abort rebuilding an array
+ * MIRROR_REBUILD_COMPLETE
+ * GUI finished to rebuild an array. If rebuild is done by driver this
+ * state has no use
+ *
+ * Returns:
+ * 0 Success
+ */
+int hpt_set_array_state(DEVICEID idArray, HPT_U32 state);
+
+/* hpt_set_array_info
+ * set array info.
+ * Version compatibility: v1.0.0.1 or later
+ * Parameters:
+ * idArray Array ID
+ * pInfo pointer to new info
+ *
+ * Returns:
+ * 0 Success
+ */
+int hpt_set_array_info(DEVICEID idArray, PALTERABLE_ARRAY_INFO pInfo);
+
+/* hpt_set_device_info
+ * set device info.
+ * Version compatibility: v1.0.0.1 or later
+ * Parameters:
+ * idDisk device ID
+ * pInfo pointer to new info
+ *
+ * Returns:
+ * 0 Success
+ * Additional notes:
+ * If idDisk==0, call to this function will stop buzzer on the adapter
+ * (if supported by driver).
+ */
+int hpt_set_device_info(DEVICEID idDisk, PALTERABLE_DEVICE_INFO pInfo);
+
+#if HPT_INTERFACE_VERSION >= 0x01000004
+int hpt_set_device_info_v2(DEVICEID idDisk, PALTERABLE_DEVICE_INFO_V2 pInfo);
+#endif
+
+/* hpt_rescan_devices
+ * rescan devices
+ * Version compatibility: v1.0.0.1 or later
+ * Parameters:
+ * None
+ * Returns:
+ * 0 Success
+ */
+int hpt_rescan_devices(void);
+
+/* hpt_get_601_info
+ * Get HPT601 status
+ * Version compatibiilty: v1.0.0.3 or later
+ * Parameters:
+ * idDisk - Disk handle
+ * PHPT601_INFO - pointer to HPT601 info buffer
+ * Returns:
+ * 0 Success
+ */
+int hpt_get_601_info(DEVICEID idDisk, PHPT601_INFO pInfo);
+
+/* hpt_set_601_info
+ * HPT601 function control
+ * Version compatibiilty: v1.0.0.3 or later
+ * Parameters:
+ * idDisk - Disk handle
+ * PHPT601_INFO - pointer to HPT601 info buffer
+ * Returns:
+ * 0 Success
+ */
+int hpt_set_601_info(DEVICEID idDisk, PHPT601_INFO pInfo);
+
+/* hpt_lock_device
+ * Lock a block on a device (prevent OS accessing it)
+ * Version compatibiilty: v1.0.0.3 or later
+ * Parameters:
+ * idDisk - Disk handle
+ * Lba - Start LBA
+ * nSectors - number of sectors
+ * Returns:
+ * 0 Success
+ */
+int hpt_lock_device(DEVICEID idDisk, HPT_U32 Lba, HPT_U8 nSectors);
+
+/* hpt_lock_device
+ * Unlock a device
+ * Version compatibiilty: v1.0.0.3 or later
+ * Parameters:
+ * idDisk - Disk handle
+ * Returns:
+ * 0 Success
+ */
+int hpt_unlock_device(DEVICEID idDisk);
+
+/* hpt_ide_pass_through
+ * send a ATA passthrough command to a device.
+ * Version compatibility: v1.0.0.3 or later
+ * Parameters:
+ * p - IDE_PASS_THROUGH header pointer
+ * Returns:
+ * 0 Success
+ */
+int hpt_ide_pass_through(PIDE_PASS_THROUGH_HEADER p);
+int hpt_ide_pass_through_v2(PIDE_PASS_THROUGH_HEADER_V2 p);
+
+/* hpt_scsi_passthrough
+ * send a SCSI passthrough command to a device.
+ * Version compatibility: v2.0.0.0 or later
+ * Parameters:
+ * in - HPT_SCSI_PASSTHROUGH_IN header pointer
+ * out - PHPT_SCSI_PASSTHROUGH_OUT header pointer
+ * insize, outsize - in/out buffer size
+ * Returns:
+ * 0 Success
+ */
+int hpt_scsi_passthrough(PHPT_SCSI_PASSTHROUGH_IN in, HPT_U32 insize,
+ PHPT_SCSI_PASSTHROUGH_OUT out, HPT_U32 outsize);
+
+/* hpt_verify_data_block
+ * verify data block on RAID1 or RAID5.
+ * Version compatibility: v1.0.0.3 or later
+ * Parameters:
+ * idArray - Array ID
+ * Lba - block number (on each array member, not logical block!)
+ * nSectors - Sectors for each member (RAID 5 will ignore this parameter)
+ * Returns:
+ * 0 Success
+ * 1 Data compare error
+ * 2 I/O error
+ */
+int hpt_verify_data_block(DEVICEID idArray, HPT_U32 Lba, HPT_U8 nSectors);
+
+/* hpt_initialize_data_block
+ * initialize data block (fill with zero) on RAID5
+ * Version compatibility: v1.0.0.3 or later
+ * Parameters:
+ * idArray - Array ID
+ * Lba - block number (on each array member, not logical block!)
+ * nSectors - Sectors for each member (RAID 5 will ignore this parameter)
+ * Returns:
+ * 0 Success
+ */
+int hpt_initialize_data_block(DEVICEID idArray, HPT_U32 Lba, HPT_U8 nSectors);
+
+/* hpt_device_io_ex
+ * extended device I/O function
+ * Version compatibility: v1.0.0.3 or later
+ * Parameters:
+ * idArray - Array ID
+ * Lba - block number (on each array member, not logical block!)
+ * nSectors - Sectors for each member
+ * buffer - I/O buffer or s/g address
+ * Returns:
+ * 0 Success
+ */
+int hpt_device_io_ex(PDEVICE_IO_EX_PARAMS param);
+
+/* hpt_set_boot_mark
+ * select boot device
+ * Version compatibility: v1.0.0.3 or later
+ * Parameters:
+ * id - logical device ID. If id is 0 the boot mark will be removed.
+ * Returns:
+ * 0 Success
+ */
+int hpt_set_boot_mark(DEVICEID id);
+
+/* hpt_query_remove
+ * check if device can be removed safely
+ * Version compatibility: v1.0.0.4 or later
+ * Parameters:
+ * ndev - number of devices
+ * pIds - device ID list
+ * Returns:
+ * 0 - Success
+ * -1 - unknown error
+ * n - the n-th device that can't be removed
+ */
+int hpt_query_remove(HPT_U32 ndev, DEVICEID *pIds);
+
+/* hpt_remove_devices
+ * remove a list of devices
+ * Version compatibility: v1.0.0.4 or later
+ * Parameters:
+ * ndev - number of devices
+ * pIds - device ID list
+ * Returns:
+ * 0 - Success
+ * -1 - unknown error
+ * n - the n-th device that can't be removed
+ */
+int hpt_remove_devices(HPT_U32 ndev, DEVICEID *pIds);
+
+/* hpt_create_array_v2
+ * Version compatibility: v1.1.0.0 or later
+ * Parameters:
+ * pParam pointer to CREATE_ARRAY_PARAMS_V2 structure
+ * Returns:
+ * 0 failed
+ * else return array id
+ */
+#if HPT_INTERFACE_VERSION>=0x01010000
+DEVICEID hpt_create_array_v2(PCREATE_ARRAY_PARAMS_V2 pParam);
+#endif
+
+/* hpt_create_array_v3
+ * Version compatibility: v2.0.0.1 or later
+ * Parameters:
+ * pParam pointer to CREATE_ARRAY_PARAMS_V3 structure
+ * Returns:
+ * 0 failed
+ * else return array id
+ */
+#if HPT_INTERFACE_VERSION>=0x02000001
+DEVICEID hpt_create_array_v3(PCREATE_ARRAY_PARAMS_V3 pParam);
+#endif
+
+/* hpt_get_device_info_v2
+ * Version compatibility: v1.1.0.0 or later
+ * Parameters:
+ * id logical device id
+ * pInfo pointer to LOGICAL_DEVICE_INFO_V2 structure
+ * Returns:
+ * 0 - Success
+ */
+#if HPT_INTERFACE_VERSION>=0x01010000
+int hpt_get_device_info_v2(DEVICEID id, PLOGICAL_DEVICE_INFO_V2 pInfo);
+#endif
+
+/* hpt_get_device_info_v3
+ * Version compatibility: v1.2.0.0 or later
+ * Parameters:
+ * id logical device id
+ * pInfo pointer to LOGICAL_DEVICE_INFO_V3 structure
+ * Returns:
+ * 0 - Success
+ */
+#if HPT_INTERFACE_VERSION>=0x01020000
+int hpt_get_device_info_v3(DEVICEID id, PLOGICAL_DEVICE_INFO_V3 pInfo);
+#endif
+
+/* hpt_get_device_info_v4
+ * Version compatibility: v2.0.0.1 or later
+ * Parameters:
+ * id logical device id
+ * pInfo pointer to LOGICAL_DEVICE_INFO_V4 structure
+ * Returns:
+ * 0 - Success
+ */
+#if HPT_INTERFACE_VERSION>=0x02000001
+int hpt_get_device_info_v4(DEVICEID id, PLOGICAL_DEVICE_INFO_V4 pInfo);
+#endif
+
+/* hpt_create_transform
+ * create a transform instance.
+ * Version compatibility: v2.0.0.0 or later
+ * Parameters:
+ * idArray - source array
+ * destInfo - destination array info
+ * Returns:
+ * destination array id
+ */
+#if HPT_INTERFACE_VERSION>=0x02000000
+DEVICEID hpt_create_transform(DEVICEID idArray, PCREATE_ARRAY_PARAMS_V2 destInfo);
+#endif
+
+/* hpt_create_transform_v2
+ * create a transform instance.
+ * Version compatibility: v2.0.0.1 or later
+ * Parameters:
+ * idArray - source array
+ * destInfo - destination array info
+ * Returns:
+ * destination array id
+ */
+#if HPT_INTERFACE_VERSION>=0x02000001
+DEVICEID hpt_create_transform_v2(DEVICEID idArray, PCREATE_ARRAY_PARAMS_V3 destInfo);
+#endif
+
+/* hpt_step_transform
+ * move a block in a tranform progress.
+ * This function is called by mid-layer, not GUI (which uses set_array_state instead).
+ * Version compatibility: v2.0.0.0 or later
+ * Parameters:
+ * idArray - destination array ID
+ * the source ID will be invalid when transform complete.
+ * Returns:
+ * 0 - Success
+ */
+#if HPT_INTERFACE_VERSION>=0x02000000
+int hpt_step_transform(DEVICEID idArray);
+#endif
+
+/* hpt_set_vdev_info
+ * set information for disk or array
+ * Version compatibility: v1.2.0.0 or later
+ * Parameters:
+ * dev - destination device
+ *
+ * Returns:
+ * 0 - Success
+ */
+#if HPT_INTERFACE_VERSION>=0x01020000
+int hpt_set_vdev_info(DEVICEID dev, PSET_VDEV_INFO pInfo);
+#endif
+
+/* hpt_init_disks
+ * initialize disks for use
+ * Version compatibility: v2.0.0.0 or later
+ * Parameters:
+ * ndev - number of disks to initialize
+ * pIds - array of DEVICEID
+ *
+ * Returns:
+ * 0 - Success
+ */
+#if HPT_INTERFACE_VERSION>=0x02000000
+int hpt_init_disks(HPT_U32 ndev, DEVICEID * pIds);
+#endif
+
+/* hpt_calc_max_array_capacity
+ * cap max capacity of the array user want to create or transform
+ * Version compatibility: v1.2.0.0 or later
+ * Parameters:
+ * source - if transform, this is the source array, otherwise, it should be zero
+ * destInfo - target array params
+ * Returns:
+ * 0 - Success
+ * cap - max capacity of the target array
+ */
+#if HPT_INTERFACE_VERSION>=0x01020000
+int hpt_calc_max_array_capacity(DEVICEID source, PCREATE_ARRAY_PARAMS_V2 destInfo, HPT_U64 * cap);
+#endif
+
+/* hpt_calc_max_array_capacity_v2
+ * cap max capacity of the array user want to create or transform
+ * Version compatibility: v2.0.0.1 or later
+ * Parameters:
+ * source - if transform, this is the source array, otherwise, it should be zero
+ * destInfo - target array params
+ * Returns:
+ * 0 - Success
+ * cap - max capacity of the target array
+ */
+#if HPT_INTERFACE_VERSION>=0x02000001
+int hpt_calc_max_array_capacity_v2(DEVICEID source, PCREATE_ARRAY_PARAMS_V3 destInfo, HPT_U64 * cap);
+#endif
+
+/* hpt_rebuild_data_block2
+ * Used to copy data from source disk and mirror disk.
+ * Version compatibility: v1.1.0.0 or later
+ * Parameters:
+ * idArray Array ID (RAID1, 0/1 or RAID5)
+ * Lba Start LBA for each array member
+ * nSector Number of sectors for each array member (RAID 5 will ignore this parameter)
+ *
+ * Returns:
+ * 0 Success, event info is filled in *pEvent
+ */
+#if HPT_INTERFACE_VERSION>=0x01010000
+int hpt_rebuild_data_block_v2(DEVICEID idMirror, HPT_U64 Lba, HPT_U16 nSector);
+#endif
+
+/* hpt_verify_data_block2
+ * verify data block on RAID1 or RAID5.
+ * Version compatibility: v1.1.0.0 or later
+ * Parameters:
+ * idArray - Array ID
+ * Lba - block number (on each array member, not logical block!)
+ * nSectors - Sectors for each member (RAID 5 will ignore this parameter)
+ * Returns:
+ * 0 Success
+ * 1 Data compare error
+ * 2 I/O error
+ */
+#if HPT_INTERFACE_VERSION>=0x01010000
+int hpt_verify_data_block_v2(DEVICEID idArray, HPT_U64 Lba, HPT_U16 nSectors);
+#endif
+
+/* hpt_initialize_data_block2
+ * initialize data block (fill with zero) on RAID5
+ * Version compatibility: v1.1.0.0 or later
+ * Parameters:
+ * idArray - Array ID
+ * Lba - block number (on each array member, not logical block!)
+ * nSectors - Sectors for each member (RAID 5 will ignore this parameter)
+ * Returns:
+ * 0 Success
+ */
+#if HPT_INTERFACE_VERSION>=0x01010000
+int hpt_initialize_data_block_v2(DEVICEID idArray, HPT_U64 Lba, HPT_U16 nSectors);
+#endif
+
+/* hpt_i2c_transaction
+ * perform an transaction on i2c bus
+ * Version compatibility: v2.0.0.0 or later
+ * Parameters:
+ * indata[0] - controller ID
+ * Returns:
+ * 0 Success
+ */
+#if HPT_INTERFACE_VERSION>=0x01020000
+int hpt_i2c_transaction(HPT_U8 *indata, HPT_U32 inlen, HPT_U8 *outdata, HPT_U32 outlen, HPT_U32 *poutlen);
+#endif
+
+/* hpt_get_parameter_list
+ * get a list of driver parameters.
+ * Version compatibility: v1.0.0.0 or later
+ * Parameters:
+ * location - parameter location
+ * outBuffer - a buffer to hold the output
+ * outBufferSize - size of outBuffer
+ * Returns:
+ * 0 Success
+ * put in outBuffer a list of zero terminated parameter names. the whole list
+ * is terminated with an additional zero byte.
+ */
+int hpt_get_parameter_list(HPT_U32 location, char *outBuffer, HPT_U32 outBufferSize);
+
+/* hpt_{get,set}_parameter
+ * get/set a parameter value.
+ * Version compatibility: v1.0.0.0 or later
+ * Parameters:
+ * pParam - a pointer to HPT_DRIVER_PARAMETER.
+ * Returns:
+ * 0 Success
+ */
+int hpt_get_parameter(PHPT_DRIVER_PARAMETER pParam);
+int hpt_set_parameter(PHPT_DRIVER_PARAMETER pParam);
+int hpt_reenumerate_device(DEVICEID id);
+
+/*
+ * hpt_get_enclosure_count
+ * Version compatibility: v2.1.0.0 or later
+ * Parameters:
+ * controller_id
+ * Returns:
+ * number of enclosurers
+ */
+int hpt_get_enclosure_count(int ctlr_id);
+
+/* hpt_get_enclosure_info
+ * Version compatibility: v2.1.0.0 or later
+ * Parameters:
+ * id enclosure id
+ * pInfo pointer to ENCLOSURE_INFO buffer
+ * Returns:
+ * 0 Success, enclosure info is put into (*pInfo ).
+ */
+int hpt_get_enclosure_info(int ctlr_id, int enc_id, PENCLOSURE_INFO pInfo);
+
+int hpt_get_enclosure_info_v2(int ctlr_id, int enc_id, PENCLOSURE_INFO_V2 pInfo);
+
+int hpt_get_enclosure_info_v3(int ctlr_id, int enc_id, PENCLOSURE_INFO_V3 pInfo);
+
+/* performance monitor interface
+ * Version compatibility: v2.1.0.0 or later
+ */
+int hpt_get_perfmon_status(int ctlr_id, int *p_status);
+int hpt_set_perfmon_status(int ctlr_id, int enable);
+int hpt_get_perfmon_data(DEVICEID id, PHPT_PM_IOSTAT iostat);
+
+/* hpt_get_controller_venid
+ * Version compatibility: v1.0.0.0 or later
+ */
+int hpt_get_controller_venid(int ctlr_id, HPT_U32 *venid);
+
+#endif
+
+#pragma pack()
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/sys/dev/hpt27xx/i386-elf.hpt27xx_lib.o.uu b/sys/dev/hpt27xx/i386-elf.hpt27xx_lib.o.uu
new file mode 100644
index 0000000..ce5aafe
--- /dev/null
+++ b/sys/dev/hpt27xx/i386-elf.hpt27xx_lib.o.uu
@@ -0,0 +1,15583 @@
+begin 644 hpt27xx_lib.o
+M?T5,1@$!`0D```````````$``P`!```````````````PK0@``````#0`````
+M`"@`#@`+`(M$)`3&``C&0`$2@'PD"`$9TO?2@^($B%`"QD`#`,9`!`#&0`4`
+MQD`&`,9`!P#&0`@`QD`)`,9`"@#&0`L`@'PD#`$9TH/B((A0#,9`#0#&0`X`
+MQD`/`,9`$`#&0!$`QD`2`,9`$P"X%````,.-=@!55U93@^P8BWPD,(I$)#2(
+M1"07#[9T)#C_="0LZ/S___^)Q8/$$+@`````A>T/A)8```"+70B)\@^VPE`/
+MMD0D#U"-0P10Z/S___^)QL8#`,9#`0#&0P(`QD,#`(D\)/]T)"SH_/___X/$
+M$+D`````NA````"-1R2("$!*=?J-7@3&1R05QD<E$8A?*,9'*0"-=SP/MMN)
+M7R#'1V0`````BT4(B4<TB6]0@^P(:@!6Z/S___]3_W40_W4,5NC\____N`$`
+M``"#Q""#Q`Q;7E]=PY"0D%=64XM\)!"+1"04B<9FB4<$QD<*`&;'1P@``+L`
+M````9CG#<QB-=@`/M\N+%XGP9BG82&:)!$I#9CGS<NM;7E_#C78`5E.+7"0,
+MBT0D$(G&9HE#!,9#"@%FQT,(``"Y`````&8YP7,/#[?1BP-FB0Q0068Y\7+Q
+M6U[#B?93BUPD"(!["@%U*6:+0P@/M\B+$T!FB4,(9HL42F8[0P9R!F;'0P@`
+M`&;_2P0/M\+K$(GV9O]+!`^W4P2+`P^W!%!;PU93@^P(BTPD%(MT)!B`>0H!
+M=2D/MU$(#[=!!(E$)`2-!`(/MU$&B10DF?<\)(L99HDT4V;_003K$8UV``^W
+M402+`6:)-%!F_T$$@\0(6U[#BT0D!&:#>`0`#Y3`#[;`PXM$)`2Z`````#D`
+M=`Z+`(M(!(L0B4H$B1&)PHG0PXGVBU0D!+@`````.1)T#8M"!(M(!(L0B4H$
+MB1'#D%93@^P$BUPD$(MS1(I#/(A$)`.Y`````+IP````B=B0B`A`2G7ZB7-$
+MBD0D`XA#/(/$!%M>PXGV@^P0BU0D%(M,)!B*00&(0@&*00*(0@*+002)0@0/
+MMD(!C01`P>`"4/]Q"/]R".C\____@\0<PY!3@^P$BTPD#(M4)!"*1"04B$0D
+M`[,`.,-S&XGVB@$Z`G0*N`````#K$8UV`$%"0SI<)`-RY[@!````@\0$6\.0
+MBT0D!,9``0"+5"0(B%`"QT`$`````,.05E.+1"0,BW0D&`^V4`&-%%*+2`B-
+M')'^0`$!<`2Y`````+H,````B=B-=@"("$!*=?J+1"00BU0D%(D#B5,$B?"(
+M0PB)\@^VQHA#"<'J$(/B/XI#"H/@P`G0B$,*6U[#BU0D!(I"`3H"#Y+`#[;`
+MP[G_````N@`"``"+1"0$B?:("$!*=?K#D%.#[`2+3"0,BUPD$(I$)!2(1"0#
+MN`````"-=@`/M]"`?)$"_W4.9HD<D8I<)`.(7)$"ZP=`9H/X?W;A#[?`@\0$
+M6\.05U93BW0D$(M4)!B+3"0<#[=$)!2`?(8"_W4-9HD4AHA,A@+K%XUV``^V
+MP5`/M\)05NC\____#[?`@\0,6UY?PU93BUPD#(MT)!"*3"04N`````"0#[?0
+M.$R3`G439CDTDW4-QD23`O]FQP23___K!T!F@_A_=MT/M\!;7L.-=@!64XM<
+M)`R+="00BDPD%+@`````D`^WT#A,DP)U!V8Y-)-T")!`9H/X?W;I9CV``'4%
+MN(`!```/M\!;7L-55U93BVPD%(!])`AT.H!])"AT-(!])*AT+H!])(AT*(!]
+M)`IT(H!])"IT'(!])*IT%H!])(IT$(!])"]T"H!])(\/A18"```/MD4D@_@O
+M#X2;````@_@O?R:#^`IT98/X"G\,@_@(=%OIT@$``(GV@_@H='N#^"IT=NG!
+M`0``D#V/````#X3I````/8\```!_'CV(````#X37````/8H````/A,P```#I
+MDP$``(UV`#VH````='$]J@```'1JZ7T!``"0#[9%)8/@'\'@$`^V52;!X@@)
+MT`^V52<)T(G&OP`````/ME4HZ6,!``"-=@`/ME4FP>(8#[9%)\'@$`G"#[9%
+M*,'@"`G"#[9%*0G"B=:_``````^V52O!X@@/MD4L"<+I*`$```^V52;!XA@/
+MMD4GP>`0"<(/MD4HP>`("<(/MD4I"<*)UK\`````#[95*L'B&`^V12O!X!`)
+MP@^V12S!X`@)P@^V12T)PNG>````B?8/MG4FB?>^`````,'G&`^V32>)R[D`
+M````P>,0B?`)R(GZ"=H/MDTHB<NY`````,'C"(G&"<Z)UPG?#[9%*8G"N```
+M``")\0G!B?L)TP^V12JZ``````^DPAC!X!B)S@G&B=\)UP^V12NZ``````^D
+MPA#!X!")\0G!B?L)TP^V12RZ``````^DP@C!X`B)S@G&B=\)UP^V32V[````
+M`(GP"<B)^@G:B<:)UP^V52[!XA@/MD4OP>`0"<(/MD4PP>`("<(/MD4Q"<+K
+M$9"^`````+\`````N@````"0B758B7U<B55@9H--$@%;7E]=PY!3@^P0BUPD
+M&`^V0S-0#[9#,E`/MD,Q4`^V0S!0#[9#+U`/MD,N4`^V0RU0#[9#+%`/MD,K
+M4`^V0RI0#[9#*5`/MD,H4`^V0R=0#[9#)E`/MD,E4`^V0R104V@`````Z/S_
+M__^#Q$@/MT,04&@`````Z/S___^#Q!A;PXGV5U93BWPD$(M<)!2Z_____[D`
+M````9CG9<QV^`````)`/M\&*!#@QT`^VP,'J"#,4AD%F.=ERZ8G06UY?PY"0
+MD%.+3"0(BP&+D`0!``")%0````")TX'C?O_^_XL!B9@$`0``B=.!XW[_\O^+
+M002)&(M!!(E8#(M!!(E8$(M!!(E8%(M!!(E8&(M!!(E8!(L!BX!4`0``HP``
+M``")PX'C_@#__XL!B9A4`0``6\.-=@!64X/L!(MT)!2*5"08BT0D$(L8@_X#
+M=A"+A/.``0``HP````#K#HGVBX3S@`$``*,`````@^#^@_X#=@R)A/.``0``
+MZPJ-=@")A/.``0``A-)T88/^`W8.BX2ST`$``*,`````ZPR+A+/0`0``HP``
+M``"#R`*#_@-V"8F$L]`!``#K"8F$L]`!``")]H/^`W8/BX2ST`$``*,`````
+MZPV0BX2ST`$``*,`````J`)UW.MFB?:#_@-V#<>$\S`"````````ZPO'A/-0
+M`@```````(/L#&@0)P``Z/S___^#Q!"#_@-V#HN$\S0"``"C`````.L,BX3S
+M5`(``*,`````@\@!@_X#=@F)A/,T`@``ZP>)A/-4`@``@\0$6U[#B?975E.#
+M[!"+?"0@BD0D)(A$)`^*3"0HB$PD#HLWNP````"`?R8`#X22`0``D`^V1"0/
+MB-G3^*@!#X1S`0``@_L#=@Z+A-Z$`0``HP````#K#(N$WH0!``"C`````(/@
+M_H/[`W8,B83>A`$``.L*C78`B83>A`$``(/L#&@0)P``Z/S___^#Q!"`?"0.
+M`'1B@_L#=@Z+A)[0`0``HP````#K#(N$GM`!``"C`````(/(`H/[`W8)B82>
+MT`$``.L*B82>T`$``(UV`(/[`W8/BX2>T`$``*,`````ZPV0BX2>T`$``*,`
+M````J`)UW.MFB?:#^P-V#<>$WC`"````````ZPO'A-Y0`@```````(/L#&@0
+M)P``Z/S___^#Q!"#^P-V#HN$WC0"``"C`````.L,BX3>5`(``*,`````@\@!
+M@_L#=@F)A-XT`@``ZP>)A-Y4`@``@_L#=@_'A-Z``0```0```.L-B?;'A-Z`
+M`0```0```(/[`W80BX3>A`$``*,`````ZPZ)]HN$WH0!``"C`````(/(`8/[
+M`W8,B83>A`$``.L+C78`B83>A`$``)!##[9')CG8#X=O_O__@\006UY?PU.+
+M7"0(BDPD#(L#BX`$`0``HP````")PF:!>R2`9'009H%[)("1=`AF@7LD@)1U
+M%`^VR8/!"+@!````T^`)PNL2C78`#[;)@\$,N`$```#3X`G"BP.)D`0!``!;
+MPXUV`%.+7"0(BDPD#(L#BX`$`0``HP````")PF:!>R2`9'009H%[)("1=`AF
+M@7LD@)1U%`^VR8/!"+C^____T\`APNL2C78`#[;)@\$,N/[____3P"'"BP.)
+MD`0!``!;PXUV`%93@^P$BW0D$`^V7"044U;H_/___X/L!&@0)P``Z/S___]3
+M5NC\____@\0<6U[#D%.+7"0(BDPD#(#Y_W1Z@/D?=SF+DQ@!``")%0````"X
+M`0```-/@B<'WT"'0B8,8`0``BX-8`0``HP`````AR'1'B8-8`0``ZS^-=@"+
+MDQP!``")%0`````/MLF#Z2"X`0```-/@B<'WT"'0B8,<`0``BX-@`0``HP``
+M```AR'0(B8-@`0``B?9;PXGV5U93BW0D&(I<)!2+1"00BSB`^P-V$@^VP\>$
+MQP`"```,`0``ZQ")]@^VP\>$QP`"```,`0``@^P,:!`G``#H_/___X/$$(#[
+M`W8M#[;+#[96`\'B&`^V1@+!X!`)P@^V1@'!X`@)P@^V!@G"B93/!`(``.LK
+MC78`#[;+#[96`\'B&`^V1@+!X!`)P@^V1@'!X`@)P@^V!@G"B93/!`(``(#[
+M`W83#[;#QX3'``(``!`!``#K$8UV``^VP\>$QP`"```0`0``@^P,:!`G``#H
+M_/___X/$$(#[`W8M#[;+#[96!\'B&`^V1@;!X!`)P@^V1@7!X`@)P@^V1@0)
+MPHF4SP0"``#K*XGV#[;+#[96!\'B&`^V1@;!X!`)P@^V1@7!X`@)P@^V1@0)
+MPHF4SP0"``!;7E_#D)"04X/L,(M<)#B-1"0N4(U$)#!0C40D,E"-1"0T4(U$
+M)#90C40D.5"-1"0\4(U$)#Y0C40D05"-1"1"4(U$)$50C40D2%"-1"1+4`^W
+M0R10Z/S___^#Q#P/MD0D%U`/MD0D'%"-1"084.C\____:@$/ME0D)XT$TL'@
+M`BG0P>`#4/]S$(V#0`4``%#H_/___X/$(&H!#[9$)!F-!$"-!(#!X`-0_W,0
+MC8-<!0``4.C\____@\00:@$/MD0D&(T$0(T$P(G"P>(%*<+!X@)2_W,0C8-X
+M!0``4.C\____@\00:@$/MT0D(L'@`E#_<Q"-@Y0%``!0Z/S___^#Q!!J`0^W
+M5"0:C035`````"G0P>`$4/]S$(V#0`8``%#H_/___X/$$&H!#[9$)!T/MU0D
+M&@^OPHT$0,'@`E#_<Q"-@_`%``!0Z/S___^#Q!!J`6@``@``_W,0C8,,!@``
+M4.C\____@\00#[9$)!-0:``(``#_<Q"-@\P&``!0Z/S___^#Q!!J`0^V1"0@
+MC02`P>`"4/]S$(V#>`8``%#H_/___X/$$&H!#[9$)"&-%,"-%%#!X@-2_W,0
+MC8.4!@``4.C\____@\00:@$/MT0D'HT$0,'@`U#_<Q"-@[`&``!0Z/S___^#
+MQ!!J`0^W1"0BT>!0_W,0C8/D"```4.C\____@\00:@$/MD0D%]'@4/]S$(V#
+M#`D``%#H_/___X/$$&H!#[9$)!G1X%#_<Q"-@S0)``!0Z/S___^#Q!!J`0^V
+M1"08T>!0_W,0C8-<"0``4.C\____@\00:@$/MD,FT>!0_W,0C8.$"0``4.C\
+M____@\00:@$/MT0D),'@!5#_<Q"-@UP&``!0Z/S___^#Q!!J`?]T)!#_<Q"-
+M@ZP)``!0Z/S____'!"0!````:D`/MT0D,L'@!E#_<Q"-@\@)``!0Z/S___^#
+MQ!1J`6@``0``:``9``#_<Q"-@^P)``!0Z/S___^#Q!1J`6B`````#[=4)#*-
+M!-*-!(*-!$+!X`10_W,0C8,0"@``4.C\____@\04:@%J!`^W1"0XP>`"4/]S
+M$(V#-`H``%#H_/___X/$%&H!:@0/MT0D.L'@`E#_<Q"-@U@*``!0Z/S___^#
+MQ!1J`6H(#[9$)##!X`M0_W,0C8-\"@``4.C\____@\04:@%J"`^W5"0NC022
+MC02`P>`"*=#!X`)0_W,0@<.@"@``4^C\____N`````"#Q$A;PXGV55=64X/L
+M'+T`````BT0D,,9`.0#&0#@`QD`W`,>`7`P```````#&@%D,````N0````"Z
+M$`$``(M<)#"-@S@+``"-=@"("$!*=?J+1"0P!<P```"+5"0PB8+,````B8+0
+M````B=`%U````(F"U````(F"V````(U`"(F"W````(F"X````(U`"(F"Y```
+M`(F"Z````(U`"(F"[````(F"\````(U`$(F"_````(F"``$``(U`"(F"!`$`
+M`(F""`$``(U`\(F"]````(F"^````(/L"(U$)")0C40D)%"-1"0F4(U$)"A0
+MC40D*E"-1"0M4(U$)#!0C40D,E"-1"0U4(U$)#90C40D.5"-1"0\4(U$)#]0
+M#[=")%#H_/___XI$)$>+3"1PB$$NBD0D2(A!+XI$)$F(@<D```!FBT0D4F:)
+M04"+1"189HF!-`L``&:+1"1:2&:)@38+``"#Q$`/MT$D/8"1``!T"SV`E```
+M#X5$"0``BUPD,,9#-03&0RL$QD,V0,9#-`#&@\8````)QD,L`(/L#(G8!4`%
+M``!0Z/S___^)@U@%``"#Q!"[``````^V3"0'C13)P>("*<J-#-4`````ZP2(
+M&$E`A<EU^(/L#(M$)#P%7`4``%#H_/___XM4)$")@G0%``"#Q!"Y``````^V
+M5"0)C112C122P>(#=`:("$!*=?J#[`R+1"0\!7@%``!0Z/S___^+3"1`B8&0
+M!0``@\00NP`````/ME0D"(T44HT4THG1P>$%*=&)RL'B`G0&B!A`2G7Z@^P,
+MBT0D/`64!0``4.C\____BUPD0(F#K`4``(/$$+D`````#[=4)!+!X@)T!H@(
+M0$IU^H/L#(M$)#P%#`8``%#H_/___XM4)$")@B0&``")T`7P!0``B00DZ/S_
+M__^+3"1`B8$(!@``B<.)R`5`!@``B00DZ/S___^+5"1`B8)8!@``B<*^````
+M`(/$$&8[="0*<S>+3"0P@<'<````B5I$BD0D#8A"/(M!!(E1!(D*B4($B1`/
+MMD0D#8T$0(T<@X/"<$9F.W0D"G+3@^P,BT0D/`5<!@``4.C\____BTPD0(F!
+M=`8``(G"O@````"#Q!!F.W0D%',FBTPD,('!Y````,9""`"+002)402)"HE"
+M!(D0@\(@1F8[="04<N2#[`R+1"0\!7@&``!0Z/S___^+7"1`B8.0!@``B<*^
+M`````(/$$(!\)!``="2)V8'![````(M!!(E1!(D*B4($B1"#PA1&9@^V1"00
+M9CGP=^2#[`R+1"0\!90&``!0Z/S___^+5"1`B8*L!@``B<*^`````(/$$(!\
+M)!$`="F+3"0P@<'\````BT$$B5$$B0J)0@2)$('"F````$9F#[9$)!%F.?!W
+MX8/L#(M$)#P%L`8``%#H_/___XM,)$")@<@&``")PKX`````@\009CMT)`YS
+M(HM,)#"!P?0```"+002)402)"HE"!(D0@\(81F8[="0.<NB^`````(!\)`<`
+M=$:+?"0P@<<$`0``#[?>@^P,BT0D/`7,!@``4.C\____BU0D0(F$FN0&``"#
+MQ!"+5P2)1P2).(E0!(D"1F8/MD0D!V8Y\'?$@^P,BT0D/`7D"```4.C\____
+MBTPD0(F!_`@``(F!``D``&:+1"0B9HF!!@D``(/$"`^WP%")R`4`"0``4.C\
+M____@\0$BT0D/`4,"0``4.C\____BUPD0(F#)`D``(F#*`D``&8/MD0D%V:)
+M@RX)``"#Q`@/M\!0B=@%*`D``%#H_/___XG8!30)``")!"3H_/___XF#3`D`
+M`(F#4`D``&8/MD0D&6:)@U8)``"#Q`@/M\!0B=@%4`D``%#H_/___XG8!5P)
+M``")!"3H_/___XF#=`D``(F#>`D``&8/MD0D&&:)@WX)``"#Q`@/M\!0B=@%
+M>`D``%#H_/___XG8!80)``")!"3H_/___XF#G`D``(F#H`D``&8/MD,F9HF#
+MI@D``(/$"`^V0R90B=@%H`D``%#H_/___XG8!:P)``")!"3H_/___XF#Q`D`
+M``^V3"08C13)P>(#*<J-%)&-#)5T10``@\00NP````")RH7)=`:(&$!*=?J+
+M5"0PBX+$"0``B0B+7"0PBY/$"0``BD0D"(A"!(/L!`^V1"0,4%'_L\0)``#H
+M_/___[X`````@\00@'LF`'1Q#[?&C11`P>(#*<*+1"0PC120C:HH`0``B?&(
+M303&104`B8(H`0``QD4*`,9%-`#&11P`QT58`````(V"2`$``(E%((E%)(V"
+M5`$``(E%+(E%,('"8`$``(E5.(E5/,9%!@)&BUPD,&8/MD,F9CGP=X^+1"0P
+MQD`T`+X`````#[?&BU0D,,:$$!X%``#_1F:#_@-VZKX`````@'PD!P!T?P^W
+MSHM<)#"+DU@%``"-!,G!X`(IR,'@`\9$$",!BY-8!0``QD00(@"+DU@%``#&
+M1!!(_XN36`4``,9$$#[_BY-8!0``9L>$$)```````,>$BY@"````````B<$#
+MBU@%``"-41")41`#@U@%``"#P!")0`1&9@^V1"0'9CGP=X&+1"0P9L>`Q```
+M````O@````"-=@`/M\:+5"0PQH00F`0``/]&9H'^A0!VZ;X`````@'PD"``/
+MA*<````/M\:+7"0PBXN0!0``C01`C03`B<+!X@4IPL'B`L9$"C``BX.0!0``
+MQD0",0"+@Y`%``#'1`(,`````(G1`XN0!0``C4$0B4$0B=`#@Y`%``"#P!")
+M0`2)T0.+D`4``(U!&(E!&(G0`X.0!0``@\`8B4`$BX.0!0``B6P""(G1`XN0
+M!0``C4$HB4$H`Y.0!0``@\(HB5($1F8/MD0D"&8Y\`^'6?___XM$)##&@,<`
+M``"`O@````"`?"0)`'1T#[?6BTPD,(N!=`4``(T44HT4DL'B`V;'1`(R!`"+
+M@70%``#&1`(F`(N!=`4``,9$`BC_BX%T!0``QD0"-/^)T8M<)#`#BW0%``"-
+M012)012)T`.#=`4``(/`%(E`!(N#=`4``(EL`E1&9@^V1"0)9CGP=XR+1"0P
+MQH#(````@H/L"(M$)#@%Y`D``%"+1"0\!<@)``!0Z/S___^+5"1`B8+@"0``
+M@\0(B=`%"`H``%"-0.10Z/S___^+3"1`B8$$"@``@\0(B<@%+`H``%"-0.10
+MZ/S___^+7"1`B8,H"@``@\0(B=@%4`H``%"-0.10Z/S___^)@TP*``"#Q`B)
+MV`5T"@``4(U`Y%#H_/___XF#<`H``(/$"(G8!9@*``!0C4#D4.C\____B8.4
+M"@``BU0D0(NZF`H``(NJG`H``(E$)!"^`````(/$$(!\)!``=$Z)TX'#[```
+M`(/L#%/H_/___XG"BTPD$(E("(EX#(EH$(/$$(M#!(E3!(D:B4($B1"!P0`(
+M``")#"2!QP`(``"#U0!&9@^V1"009CGP=[J#[`B+1"0X!;P*``!0BT0D/`6@
+M"@``4.C\____BUPD0(F#N`H``(M4)$"+NKP*``"+JL`*``")1"00O@````"#
+MQ!!F.W0D#G-*B=.!P_0```"#[`Q3Z/S___^)PHM,)!")2`B)>`R):!"#Q!"+
+M0P2)4P2)&HE"!(D0@<&,`0``B0PD@<>,`0``@]4`1F8[="0.<KZ#Q!Q;7E]=
+MPU575E.#[`R+?"0@QD0D"P`/MD0D"XJ,.!X%``"`^?\/A,@````/MM&-!%+!
+MX`,IT(T$AXV0*`$``(E4)`2]`````("X,@$````/A)X```")UH/&.`^VT8T$
+M4L'@`RG0P>`"B00DC78`@^P,5NC\____B<.#Q!"+1@2)7@2),XE#!(D8@WL<
+M`'0;@^P$_W,<_[<D!0``:@7H_/___X!+)`*#Q!"0@^P$4VH"_W0D$.C\____
+M@\00@'M+`'0>@^P,5^C\____QP0D`0```.C\____@\00@'M+`'7B18GHBQ0D
+M.(0Z,@$```^'>_____Y$)`N`?"0+`P^&%/___X/L#%?H_/___X/$'%M>7UW#
+MC78`4X/L"(M,)!2+7"00.5D8=4^`>20(=%R`>20H=%:`>22H=%"`>22(=$J`
+M>20*=$2`>20J=#Z`>22J=#B`>22*=#*-D\P```"+@\P```")2`2)`8E1!(F+
+MS````.L6C78`C8/,````BU`$B4@$B0&)402)"H/L#%/H_/___X/$&%O#C78`
+M@^P4_W0D'/]T)!SH_/___X/$',-55U93@^P,BUPD)(MT)"B+;"0LOP````!F
+M@7LDX0%U#(I#)H/H$3P!=C.)]HM$)""+$(N*6`4``(VYZ!8!`&:!>Q"%`'<7
+M#[=#$`^VE!"8!```C032P>`"*="-/,'&1@0%@&8%_H`FW[(`9H%[).$!=0J*
+M0R9(/`%W`K(!B-#!X`>*%H/B?PG"B!:*0V:#X`'!X`:#XK\)PH@69H%[).$!
+M=1**0R:#Z!$\`7<(9HEN".L>B?;V0V8!=!*#[`Q7Z/S___]FB48(@\00ZP1F
+MB6X(9HM&"(A#%6:!>R3A`74ABD,F2#P!=P6*4R?K'V:!>R3A`74,BD,F@^@1
+ML@\\`78+L@"#?S``=`.*5TF#X@^*!H/@\`G0B`:#Q`Q;7E]=PY"#[`S_="0<
+M_W0D'/]T)!R+1"0<_S#H_/___X/$',.)]E93BUPD#(LS9HN#,`L``$!FB8,P
+M"P``9CN#-`L``'()9L>#,`L`````#[>+,`L``(N33`H``(M$)!"+`(D$B@^W
+M@S`+``")ABP!``!;7L.055=64XM<)""+?"08#[9L)!R+="04N@````"Y!```
+M`(G8C78`B!!`277ZB?J!XO\/``"+`R4`\/__"=")`P^V5@G!X@PE_P_P_PG0
+MB0,/MD8&T>B#X`&#^`$9P(/@`D#!X!V+$X'B____'PG"B1.*0P.#R!"#X/>(
+M0P/V1@8!=!.)ZH/B?\'B%(L#)?__#_@)T(D#6UY?7<-55U93@^P,BVPD((MT
+M)"3'1"0(`````(!^)`AT$X!^)"AT#8!^)*AT!X!^)(AU"9"#3F0*ZQZ)]H!^
+M)`IT$H!^)"IT#(!^)*IT!H!^)(IU!(-.9`)F@7XDX0%U&(I&)H/H$3P!=PZ#
+M3F0(N`````#I.`4``(M&)"7___\`/>$!$``/A0D!``!F@7X0A0`/AXD````/
+MMT80@+PHF`0``/]T>V:#?A!_=R`/MI0HF`0``(N-6`4``(T$TL'@`BG0BT3!
+M*`^V>`3K66:!?A"!`'<I#[=&$`^VA"B8!```BXV0!0``C01`C03`B<+!X@4I
+MPHM$D0@/MG@$ZR@/MT80#[:$*)@$``"+E70%``"-!$"-!("+1,)4#[9X!.L&
+MD+______B?H/ML(/MIPH'@4``(T$6\'@`RG8C9R%*`$``(N-D`4``(V![`8-
+M`&:!?A"%`'<<#[=&$`^VA"B8!```C01`C03`B<+!X@4IPHT$D?9`-1`/A6T!
+M``#&1A0$BT0D*,<``````+@!````Z1T$``"09H%^$(4`#X>,````#[=&$("\
+M*)@$``#_='YF@WX0?W<C#[:4*)@$``"+C5@%``"-!-+!X`(IT(M$P2@/MG@$
+MZUR-=@!F@7X0@0!W*0^W1A`/MH0HF`0``(N-D`4``(T$0(T$P(G"P>(%*<*+
+M1)$(#[9X!.LH#[=&$`^VA"B8!```BY5T!0``C01`C02`BT3"5`^V>`3K!I"_
+M_____[G_````9H%^$(4`=PT/MT809@^VC"B8!```B?H/ML(/MIPH'@4``(T$
+M6\'@`RG8C9R%*`$```^WT8T$TL'@`BG0BY58!0``C03"B40D"&:!?B3A`74)
+MBD8F2#P!=BV09H'Y_P!T"HM$)`CV0",$=1O&1A0&BU0D*,<"`````+@!````
+MZ?<"``"-=@"+5"0(#[9"(*@!=""H!'0<BD4L.D4V<A2+1"0HQP`!````N`$`
+M``#IR`(``(-\)`@`#X3Q````BU0D"`^V0B"H`0^$X0```*@$#X39````@^P(
+M5E+H_/___X/$$(3`=1C&1A0$BT0D*,<``````+@!````Z7P"``"+5"0(@'I+
+M'W84BT0D*,<``0```+@!````Z5X"``#V1F8!=`;V0P@!=!CV1F8!=0;V0P@!
+M=0R`?A2!=`;V0P@(="J#[`B)^@^VPE!5Z/S___^#Q!"$P'04BT0D*,<``0``
+M`+@!````Z1`"``#V1F8!#X1^`0``]D,(`0^$=`$``(/L#/]T)!3H_/___X/$
+M$&:#^!\/AEL!``"+5"0HQP(!````N`$```#ISP$``(UV`/9#!@)T,HM&)"7_
+M__\`/>$!$`!T(XM4)`B*0DLZ0DIR%XM$)"C'``$```"X`0```.F7`0``C78`
+MBT8D)?___P`]X0$0``^$^0```(M4)`@/MT(VB<+1ZH/B`;$!@'XDX0^%W@``
+M`(!^)0$/A=0````/MD8F@^@&@_@)#X>L````_R2%``````^VP5!J`595Z/S_
+M__^#Q!"$P`^%I0```(M$)"C'``(```"X`0```.D9`0``#[;!4&H`5E7H_/__
+M_X/$$(3`=7V+5"0HQP("````N`$```#I\0```&H!#[;"4%95Z/S___^#Q!"$
+MP'55BT0D*,<``@```+@!````Z<D```!J``^VPE!65>C\____@\00A,!U+8M4
+M)"C'`@(```"X`0```.FA````D,9&%`2+1"0HQP``````N`$```#IB````(/L
+M#(V%``D``%#H_/___X/$$(3`=!*+5"0HQP(!````N`$```#K89"`?B3A=5*`
+M?B4!=4R`?B8/=4:`?BD!=4!F#[9&*,'@"&8/ME8G`="#[`@/M\!05>C\____
+M@\00.49(=02%P'48QD84!(M$)"C'``````"X`0```.L+C78`N`````"-=@"#
+MQ`Q;7E]=PU93BUPD#(MT)!"Y`````+H-````B?")]H@(0$IU^HI#)8@&BD,F
+MB$8!BD,GB$8"BD,HB$8#BD,IB$8$BD,JB$8%BD,KB$8&]D-F!'0>BD,LB$8(
+MBD,MB$8)BD,NB$8*BD,OB$8+BD,PB$8,N`$```!;7L.055=64XML)!2+?"08
+MN@````"^`````(GVN0<````/MAPWC78`T>*)V-/XJ`%T$O?"`````74:@?)W
+M)]L`ZQ*)]O?"`````70(@?)W)]L`B?9)>=%&@_X'?K^)T,'H$(A%`(G0P>@(
+MB$4!B%4"6UY?7<.-=@!55U93@^Q@BVPD>(M$)'2+@"@*``")1"0@QT0D&```
+M``#'1"04`````,=$)!``````QT0D#`````!FQT4>_P^-1"1`4%7_="1\Z/S_
+M__^#Q!"$P'0)BT0D/.G?#```BT4D)?___P`]X0$0``^%(P$``(/L#&B($P``
+MZ/S___^#Q!!F@7T0A0`/AYL````/MT40BU0D<("\$)@$``#_#X2%````9H-]
+M$']W(P^VE!"8!```BUPD<(N+6`4``(T$TL'@`BG0BT3!*(I`!.M=9H%]$($`
+M=RP/MT40BW0D<`^VA#"8!```BXZ0!0``C01`C03`B<+!X@4IPHM$D0B*0`3K
+M*0^W11"+5"1P#[:$$)@$``"+DG0%``"-!$"-!("+1,)4BD`$ZP2)]K#_#[;`
+MBUPD<`^VA!@>!0``B40D&(T$0,'@`RM$)!B-A(,H`0``B40D&(N+D`4``&:!
+M?1"%`'<E#[=%$`^VA!B8!```C01`C03`B<+!X@4IPHT4D8E4)!#IA0$``('!
+M[`8-`(E,)!#I=@$``+O_````9H%]$(4`=Q$/MT40BW0D<&8/MIPPF`0``&:!
+M?23A`74.BD4F@^@1/`$/AND```!F@7T0A0`/AYD````/MT40BU0D<("\$)@$
+M``#_#X2#````9H-]$']W(P^VE!"8!```BW0D<(N.6`4``(T$TL'@`BG0BT3!
+M*(I`!.M;9H%]$($`=RP/MT40BU0D<`^VA!"8!```BXJ0!0``C01`C03`B<+!
+MX@4IPHM$D0B*0`3K)P^W11"+3"1P#[:$")@$``"+D70%``"-!$"-!("+1,)4
+MBD`$ZP*P_P^VP(MT)'`/MH0P'@4``(E$)!B-!$#!X`,K1"08C82&*`$``(E$
+M)!@/M].-!-+!X`(IT(N66`4``(T$PHE$)!3K(0^WPXT$0(T$@(M,)'"+D70%
+M``"-!,*)1"0,BW!4B70D&&:!?23A`741BE4FC4+O/`%V)HU"_SP!=A]F@?O_
+M`'0*BT0D%/9`(P1U#L9%%`:X`````.DS"@``@^P(C40D0%#_="1\Z/S___]F
+MB40D,&:)11Z#Q`3_="1\Z/S___^)1"04@\00N`(```"#?"0$``^$]@D``(M4
+M)`2)550/MT0D((T<P(T<F(T<6,'C!`-<)!R)V(M,)'`K@2@*``"#P""9B<:)
+MUP.Q+`H``!.Y,`H``(M$)#B)<""+3"0XB7DDBT0D!(MP#(MX$(M$)#B)<"B+
+M3"0XB7DLBT0D.(M4)"!FB5`(N0````"ZL`0``(G8C78`B`A`2G7Z9H%]).$!
+M=6V*12:#Z!$\`7=CC40D0%"+1"0\#[9`"%!5_W0D(.C\____@\00#[=4)""-
+M!-*-!(*-!$+!X`0#1"0<BTPD<"N!*`H```4@!```F8G&B=<#L2P*```3N3`*
+M``"+1"0XB7`0BTPD.(EY%.FL`0``BW0D&/9&!@%U*XM%)"7___\`/>$!$``/
+MA`P!``"+5"04#[9"(*@!#X3\````J`0/A/0```#V168@=!"-1"1`4%7H_/__
+M_X/$".L;C40D0%"+1"0\#[9`"%!5_W0D(.C\____@\00#[=4)""-!-*-!(*-
+M!$+!X`0#1"0<BTPD<"N!*`H```4@!```F8G&B=<#L2P*```3N3`*``"+1"0X
+MB7`0BTPD.(EY%&:!?23A`74.BD4F@^@1/`$/ANT```"+="04#[9&(*@"#X3=
+M````J`0/A-4```"H`0^$S0````^W5"0@C032C02"C01"P>`$`T0D'(M4)'`K
+M@B@*``"9B<:)UXM,)'`#L2P*```3N3`*``"+1"0XB7`8BTPD.(EY'.F&````
+MC78`BUPD&/9#!@)T>0^W1"0@C0S`C0R(C0Q(P>$$`TPD'(G(BW0D<"N&*`H`
+M`)F)QHG7BUPD<`.S+`H``!.[,`H``(M$)#B)<!B+7"0XB7L<BW0D<"N.*`H`
+M`('!(`0``(G(F8G.B=>+3"1P`[$L"@``$[DP"@``BT0D.(EP$(M,)#B)>12+
+M1"0X@$@!`F8/ME4]BT0D.&:)4`*^`````(!]/0!T+HT4=L'B`HG3BT0D!`-8
+M"(M-1(L$"HD#BT0*!(E#!(M$"@B)0PA&#[9%/3GP=]*+52"+1"0XB5`,9H%]
+M).$!=4Z*12:#Z!$\`7=$#[=<)"!3_W0D/%7_="0DZ/S___^-1"104(T$VXT$
+M@XT$0\'@!`-$)#!05?]T)#3H_/___XM4)#B`8@C^@\0@Z7,%``"+3"08]D$&
+M`@^$\@0``(M$)#C&0`;^BT0D.(!@!_Z#?"04``^$Y@```(M<)!0/MD,@J`(/
+MA-8```"H!`^$S@```*@!#X3&````#[=$)"!0_W0D/%51Z/S___^#Q!#V168!
+M=`^+1"0X9HM`",'@`XA$)$&-1"1`4`^W5"0DC032C02"C01"P>`$`T0D(%!5
+M_W0D).C\____@\00]D5F`70*BW0D&(!."`'K"(M$)!B`8`C^#[=$)""-#,"-
+M#(B-#$C!X02+5"0<Q@01H8M<)!2*D[(```"#X@^+="0<BD0Q`8/@\`G0B$0Q
+M`6:+0QA`#[;0P>((#[;$"=!FB40Q`H'#G````(E<)`CIP@,``(GV9H%]).$!
+M#X60`@``#[9%)H/X#W0.@_@0#X3B````Z9T#``!F#[95*,'B"&8/MD4G`<*+
+M1"0XQD`$#8M$)#B`8`7^@$PD-PB+7"0X#[9%%8MT)'`/MH[&````T^!F"4,(
+MBTPD.(I!`8/@'X/(((A!`0^W1"0@C0S`C0R(C0Q(P>$$BT0D'(T<`8M%*HF#
+M.`0``(M%+HF#/`0```^VPL'@"`^VU@G"BW0D'&:)E#%$!```BD4IB(0Q0@0`
+M`,8#D8M4)!1FBT(80`^VT,'B"`^VQ`G09HE$,0*+7"04BI.R````@^(/BD0Q
+M`8/@\`G0B$0Q`8'#G````(E<)`CIP`(``(M4)#@/MD45BW0D<`^VCL8```#3
+MX&8)0@@/MT0D((T4P(T4D(T44,'B!(M$)!S&!`*!9L=$`@+__XM<)!"*BXL`
+M``"#X0^+="0<BD0R`8/@\`G(B$0R`8-]-`!U#L9%%"&X`````.DJ!```]D4G
+M`71-@WTX`'1'BT4XB40D"`^W1"0@C1S`C1R8C1Q8P>,$@^P(_W0D$(M4)'S_
+MLL0)``#H_/___X/@#XM,)"R*5`L!@^+P"<*(5`L!@\00ZPB+7"00B5PD"+L$
+M````BU4T#[9"`3V3````=VW_)(4H````@\,$ZV&#PP3K7(/#".M7@\,(ZU*#
+MPPCK38/#".M(@\,(ZT.#PPCK/H/#&.LY@\,8ZS2#PPSK+X/#".LJ#[9:!(T<
+MG0@```#K'8'#B````.L5@\,DZQ"#PR3K"X/#).L&@<.(````C5,#P>H"BT0D
+M.(A0!(M,)#AFP>H(@^(!BD$%@^#^"="(004/MU0D((T$THT$@HT$0L'@!(MT
+M)!R-A#`@!```@^P$4_]U-%#H_/___X/$$.DF`0``B?8/MD4D@^@$/:L```!W
+M-/\DA7@"```/MD4LP>`(#[95+8U$$/V#^`IW#_\DA2@%``"+1"0X@$@!!(M$
+M)#B`2`$!ZPB+1"0X@&`!^XM$)#C&0`0-BT0D.(!@!?Z+5"0X#[9%%8M<)'`/
+MMHO&````T^!F"4((BT0D.(!@`1\/MT0D((T<P(T<F(T<6,'C!(MT)!S&A#,@
+M!```!HM\)!2!QYP```!7B=X#="0@C88A!```4.C\____5XV&)00``%#H_/__
+M_XV61`0``(M%)(F&1`0``(M%*(E"!(M%+(E""(M%,(E"#,8&D8M$)"2*D+(`
+M``"#X@^+3"0LBD0+`8/@\`G0B$0+`8/$$(MT)!1FBT880`^VT,'B"`^VQ`G0
+M9HE$"P*)?"0(@WPD"``/A)D````/MU0D((T$THT$@HT$0L'@!`-$)!R+3"0(
+MBQ&)4`2+402)4`CK<XM<)!CV0P8!=&D/MT0D(%#_="0\55/H_/___X/$$/9%
+M9@%T#XM$)#AFBT`(P>`#B$0D08U$)$!0#[=4)"2-!-*-!(*-!$+!X`0#1"0@
+M4%7_="0DZ/S___^#Q!#V168!=`J+="08@$X(`>L(BT0D&(!@"/X/MUPD((M4
+M)'"+@JP%``")+)B+5"0@9L'J!0^WTHM,)""#X1^X`0```-/@BTPD<`F$D;`%
+M``"+120E____`#WA`1``=2N-1"0T4&H`4_]T)"3H_/___XM$)$0E____'PT`
+M``!`B40D1(/$$.FK````9H%]).$!=3R*12:#Z!$\`7<R@^P(_W0D%/]T)'SH
+M_/___XU$)$10BUPD(`^V0S10#[=$)#A0_W0D-.C\____@\0@ZV>#[`C_="0<
+M_W0D?.C\____C40D1%"+="0H#[9&/E`/MT0D.%#_="0TZ/S___\/MD8@@\0@
+MJ`)T+Z@$="NH`70GBT0D-"7___\?#0```&")1"0T#[96/H/B?\'B%"7__P_X
+M"=")1"0TC40D-%#_="1TZ/S___^#Q`BX`P```(/$7%M>7UW#C78`55=64X/L
+M!(ML)!B+5"0<BUT`B=!FP>@%#[?PB=&#X1^X`0```(G'T^>%?+-$=2V)X%!J
+M``^WPE!5Z/S___^!3"00````X(U$)!"`8`/W4%/H_/___PE\LT2#Q!B#Q`1;
+M7E]=PU575E.#[`R+?"0@BW0D)(M&3(MH'&:!?A"%``^'GP````^W1A"`O#B8
+M!```_P^$C0```&:#?A!_=R8/MI0XF`0``(N/6`4``(T$TL'@`BG0BT3!*`^V
+M0`0%$`4``.MFD&:!?A"!`'<N#[=&$`^VA#B8!```BX^0!0``C01`C03`B<+!
+MX@4IPHM$D0@/MD`$!1`%``#K+P^W1A`/MH0XF`0``(N7=`4``(T$0(T$@(M$
+MPE0/MD`$!1`%``#K"(UV`+@/!@``#[9<!PZ-!%O!X`,IV(V<AR@!``"#?E``
+M=!&#[`C_=E!7Z/S___^#Q!")]H/L"%97Z/S___^#Q`A54_^5G````(/$'%M>
+M7UW#C78`55=64X/L&(ML)"R+10")1"04C5TL4^C\____B<>#[R"#Q`3_="04
+MZ/S___^)QH/$$(U'((M3!(E#!(E?((E0!(D"N`$```"%]G1TC58\QD8DX<9&
+M)0'&1B80@$XG`8M,)"2+@9P```")1DB+1DR)2!R)R`60````B48XQD85S&8/
+MMD<S9HE&$(M%`(E&&,=&()````")3C3'1FR,-```@^P(:@!2Z/S___^#Q`A6
+M_W0D%.C\____N`````"#Q!"#Q`Q;7E]=PY!55U93@^P,BWPD)(MT)""+1BB)
+M1"0(BRAFBT\>B<AFP>@%#[?8@^$?N`$```#3X(5$G40/A6,#``"+50"-!)T`
+M`P``B8)P`0``BT4`BX!T`0``HP````")PL9'%"&+1R0E____`#WA`0\`=2"#
+M[`AJ`%?H_/___X/$#&H`5U7H_/___X/$$.D1`P``D&:+3QZ#X1^X`0```-/@
+MA<)T%H/L"&H!5^C\____B2PDZ/S___^#Q!`/MH:P````@_@$#X?8`@``_R2%
+M5`4``,:&L`````&#[`1J`5?_="04Z/S___^#Q!#ILP(``,:&L`````*#[`1J
+M"%?_="04Z/S___^#Q!#IE0(``,:&L`````.#[`16:B'_="04Z/S___^#Q!"#
+M?BP`=""#[`QJ`&H!#[9&25#_=BS_="0DZ/S___^#Q"#I5@(``(/L!&H`BU0D
+M$`^V0@E05>C\____@\00Z3H"``#&AK`````$@WXL`'0Q@^P$5FHA_W0D%.C\
+M____QP0D`````&H"#[9&25#_=BS_="0DZ/S___^#Q"#I_`$``(/L!&H`:B'_
+M="04Z/S___^#Q`QJ`8M4)!`/MD()4%7H_/___X/$$.G0`0``@^P$5FH&_W0D
+M%.C\____@\00@WX<`'05BT8<BT@$C5$!B5`$@_D%#X:C`0``QD8C`<9&(@"`
+M?DL`=!^0@^P,5>C\____QP0D`0```.C\____@\00@'Y+`'7B@WXL`'03BU8,
+MBT8(B5`$B0*+1BS^2##K%8-^,`!T#XM6,`^V1DG'1((\`````(M6!(L&B5`$
+MB0*+1"0(_D@*@[[@`````'0;@^P$:@$/MH;5````4/^VX````.C\____@\00
+M@WXL`'05@^P$:@$/MD9)4/]V+.C\____@\00@WX<`'1YBT8<QT!@`````/Z%
+M5PP``(/L#%7H_/___X/$#&H!BT8<#[9``5!5Z/S___^#Q`R+1AP/MD`"4(M&
+M'`^V0`%0:`T```#H_/___X/$#/]V'/^U)`4``&H!Z/S___^#Q`S_=AS_M20%
+M``!J!NC\____QT8<`````(/$$(/L"%95Z/S___^#Q!"+5"0(@'H%_W1BOP``
+M``"`>@H`=D&)TX/#.(GV@^P,4^C\____B<:#Q!"+0P2)<P2)'HE&!(DP@'XB
+M_W4.1XGXBU0D"#A""G?3ZPN)^(M4)`@X0@IW%HM$)`C&0`7_@^P(4%7H_/__
+M_X/$$)"#Q`Q;7E]=PU575E.#[`R+7"0DBW0D((M^*(LOQT0D"`````#V1P@0
+M=`?&AK`````&#[:&L````(/X`0^$@P```(/X`7\*A<!T'>G)`P``D(/X!`^$
+MFP```(/X!@^$Z@$``.FQ`P``QH:P`````8/L"%95Z/S____&0Q2!@$\("(/$
+M$(-[5`!T$(/L"(U#5%!5Z/S___^#Q!"-E<P```"+A<P```")6`2)`XE3!(F=
+MS````(/L#%7H_/___X/$$.E4`P``@&<(]_Z&LP```,:&L`````#&0Q0"@^P(
+M4U7H_/___XDL).C\____@\00Z24#``"0QH:S`````(-^'``/A$<!``"+1AR+
+M2`2-40&)4`2#^04/AS(!``"`9PCW@WM4`'00@^P(C4-44%7H_/___X/$$(V5
+MS````(N%S````(E8!(D#B5,$B9W,````@$\($(-^+`!T'8/L#&H`:@(/MD9)
+M4/]V+%?H_/___X/$(.FC`@``QD0D!P"`?PH`#X:Q````C4<XB00DB?:#[`S_
+M="0,Z/S___^)PX/$$(L4)(M"!(E:!(D3B4,$B1B#>QP`=!V#[`3_<QS_M20%
+M``!J!>C\____@$LD`H/$$(UV`(/L!%-J!E?H_/___X/$$(![2P!T/XM$)`C_
+M1"0(/7^6F`!W,(/L#%7H_/___\<$)`$```#H_/___X/$$(![2P!T$HM$)`C_
+M1"0(/7^6F`!VTXUV`/Y$)`>*1"0'.$<*#X=7____QD8B`X/L"%95Z/S___^#
+MQ!#IS0$``)"-E<P```"+A<P```")6`2)`XE3!(F=S````(-^'`!T%8M&'(M(
+M!(U1`8E0!(/Y!0^&>@$``(/L#&A8````Z/S___^#Q`Q6:@97Z/S____^3PJ#
+MQ!"+5@2+!HE0!(D"@WXL`'04BT8L_D@PBU8,BT8(B5`$B0+K&9"#?C``=!*+
+M5C`/MD9)QT2"/`````"-=@"`?DL`=$*+1"0(_T0D"#U_EI@`=S.-=@"#[`Q5
+MZ/S____'!"0!````Z/S___^#Q!"`?DL`=!*+1"0(_T0D"#U_EI@`=M.-=@"+
+M5@2+!HE0!(D"@[[@`````'0=@^P$:@$/MH;5````4/^VX````.C\____@\00
+MB?:#?BP`=!:#[`1J`0^V1DE0_W8LZ/S___^#Q!"0@WX<`'1VBT8<QT!@````
+M`/Z%5PP``(/L#%7H_/___X/$#&H!BT8<#[9``5!5Z/S___^#Q`R+5AP/MD("
+M4`^V0@%0:`T```#H_/___X/$#/]V'/^U)`4``&H!Z/S___^#Q`S_=AS_M20%
+M``!J!NC\____QT8<`````(/$$(/L"%95Z/S___^#Q!#K$8/L!%9J`E?H_/__
+M_X/$$(GV@^P,5>C\____@\00@\0,6UY?7<-55U93@^P,BUPD)(M\)""+;U2+
+M=0#V10@0=`3&1S4&#[9'-8/X`0^$@0```(/X`7\+A<!T'NE:`P``B?:#^`0/
+MA)$```"#^`4/A(8!``#I00,``,9'-0&#[`A75NC\____QD,4@8!-"`B#Q!"#
+M>U0`=!"#[`B-0U105NC\____@\00C9;,````BX;,````B5@$B0.)4P2)GLP`
+M``"#[`Q6Z/S___^#Q!#IYP(``(!E"/?^1S;&1S4`QD,4`H/L"%-6Z/S___^)
+M-"3H_/___X/$$.F^`@``@&4(]X-[5`!T$(/L"(U#5%!6Z/S___^#Q!"-ELP`
+M``"+ALP```")6`2)`XE3!(F>S````(/L!&H`:@95Z/S___^#Q`QJ`0^V10E0
+M5NC\____QD0D&P"#Q!"`?0H`#X:"````C7TX@^P,5^C\____B<.#Q!"+1P2)
+M7P2).XE#!(D8@WL<`'0;@^P$_W,<_[8D!0``:@7H_/___X!+)`*#Q!"0@^P$
+M4VH&5>C\____@\00@'M+`'0AC78`@^P,5NC\____QP0D`0```.C\____@\00
+M@'M+`'7B_D0D"XI$)`LX10IW@<9%!0"`30@0@^P,5>C\____@\00Z<`!``"`
+M90CW@WM4`'00@^P(C4-44%;H_/___X/$$(V&S````(N6S````(E:!(D3B4,$
+MB9[,````C44XB<(Y13@/A.@```")1"0$B?:#[`Q2Z/S___^)PX/$$(-X'`!T
+M'(/L!/]P'/^V)`4``&H%Z/S___^`2R0"@\00B?:#[`13:@95Z/S___^#Q!"`
+M>TL`="&-=@"#[`Q6Z/S____'!"0!````Z/S___^#Q!"`>TL`=>*#>QP`=%R+
+M0QS'0&``````_H97#```@^P,5NC\____@\0,:@&+0QP/MD`!4%;H_/___X/$
+M#/]S'/^V)`4``&H!Z/S___^#Q`S_<QS_MB0%``!J!NC\____QT,<`````(/$
+M$(/L"%-6Z/S___^#Q!"+5"0$.54X#X4>____@^P$:@!J!E7H_/___X/$"%=6
+MZ/S____'12@`````BP:+D%@!``")%0````"#Q!"%TG0(BP:)D%@!``#V108!
+M=%7&1"0+`(!^*P!V&@^V50F)T(I,)`O3^*@!=0I!B$PD"SA.*W?J@^P(#[9<
+M)!-35NC\____@\0(55;H_/___XG8P>`$`=C'A(8\"P```````(/$$(GV@\0,
+M6UY?7<-55U93@^P4BWPD*(M'*(E$)`R+&%=3Z/S___^#Q!"`O[,````!=@?&
+MA[`````$C7<0.7<0#X0F`@``@^P,5NC\____B40D&(/$$(M'$(M4)`B)4`2)
+M`HER!(E7$+T`````Z<,!``")]@^WU8N#K`4``(LTD(7V#X2L`0``9HM'&&8[
+M1A`/A9X!```/MY,R"P``BX-P"@``.1!T3Y!"#[>#-@L``#G0=P6Z`````(N#
+M<`H``(M$D`2I```(`'4B)?\/``!F.<5U&#ET)`AU'(/L#%/H_/___X/$$.F!
+M`0``D(N#<`H``#D0=;*+3"0$@'DT``^%,`$``&:!?A"%``^')`$```^W1A"`
+MO!B8!```_P^$$@$``(7_#X3R````#[9'(*@!#X3F````J`0/A-X```"+$V:+
+M1AYFP>@%#[?`C02%``,``(F"<`$``&:+3AZ#X1^Z`0```(G0T^")P8L#B8AT
+M`0``#[=.'HN#K`4``,<$B`````!FBTX>B<AFP>@%#[?`B00D@^$?B=#3X(G!
+M]]&+!"0AC(.P!0``9HM.'HG(9L'H!0^WP(/A']/B]](A5(-$.W0D"'0ZBU8$
+MBP:)4`2)`H-^5`!T$(/L"(U&5%!3Z/S___^#Q!"-D\P```"+@\P```")<`2)
+M!HE6!(FSS````(/L"`^W1AY0C8,`"0``4.C\_____D]+@\00ZQB+5"0$]D(&
+M`G0.@^P(5E?H_/___X/$$)!%9CEK0`^'-?[__X7_="D/MD<@J`%T(:@$=!V+
+M3"0(BU$$BP&)4`2)`H/L"%%7Z/S___^#Q!")]H/$#%M>7UW#55=64X/L%(M\
+M)"B+1U2)1"0,BQA74^C\____@\00@'\V`78$QD<U!(UW%#EW%`^$W`$``(/L
+M#%;H_/___XE$)!B#Q!"+1Q2+5"0(B5`$B0*)<@2)5Q2]`````.F!`0``#[?5
+MBX.L!0``BS20A?8/A&P!``!FBT<D9CM&$`^%7@$```^WDS(+``"+@W`*```Y
+M$'1/D$(/MX,V"P``.=!W!;H`````BX-P"@``BT20!*D```@`=2(E_P\``&8Y
+MQ748.70D"'4<@^P,4^C\____@\00Z3D!``"0BX-P"@``.1!ULF:!?A"%``^'
+M\@````^W1A"`O!B8!```_P^$X````(M,)`2`>30`#X72````]D$&`0^$R```
+M`(L39HM&'F;!Z`4/M\"-!(4``P``B8)P`0``9HM.'H/A'[H!````B=#3X(G!
+MBP.)B'0!```/MTX>BX.L!0``QP2(`````&:+3AZ)R&;!Z`4/M\")!"2#X1^)
+MT-/@B<'WT8L$)"&,@[`%``!FBTX>B<AFP>@%#[?`@^$?T^+WTB%4@T0[="0(
+M="2+5@2+!HE0!(D"C9/,````BX/,````B7`$B0:)5@2)L\P```"#[`@/MT8>
+M4(V#``D``%#H_/____Y/*8/$$(GV168Y:T`/AW7^__^+5"0$]D(&`70;BTPD
+M"(M1!(L!B5`$B0*#[`A15^C\____@\00@\0,6UY?7<-55U93@^P,BWPD(,=$
+M)`@`````C8?,````B<(YA\P````/A,\!``")Q8UV`(/L#(G64NC\____B<.#
+MQ!"#>$P`=2Z#[`Q7Z/S___^)0TR#Q!"%P'4;BX?,````B5@$B0.)<P2)G\P`
+M``#IB`$``(GVBT,D)?___P`]X0$0``^$\0```&:!>Q"```^$Y0```&8/MD,0
+M9HE#$&:#^']V$F:!>R3A`74BBD,F@^@1/`%W&&:!>Q"%`'<0#[=#$("\.)@$
+M``#_=1J)]L9#%`:#[`A35^C\____@\00Z0H!``")]F:!>R3A`74,BD,F@^@1
+M/`%V-XGVBX]8!0``9H%[$(4`=QT/MT,0#[:4.)@$``"-!-+!X`(IT(T$P8E$
+M)`CK"H'!Z!8!`(E,)`AF@7LDX0%U"XI#)D@\`78[C78`9H%[$(``=#!F@7LD
+MX0%U"HI#)H/H$3P!=AZ+1"0(]D`C!'44QD,4!H/L"%-7Z/S___^#Q!#K=9"#
+M[`A35^C\____@\00@_@"=PJ#^`%S'.L+C78`@_@#=$3K49"#[`A35^C\____
+M@\00ZT&#>U0`=!"#[`B-0U105^C\____@\00C9?,````BX?,````B5@$B0.)
+M4P2)G\P```#K'8/L"%-7Z/S___^#Q!")]HGJ.:_,````#X4V_O__@\0,6UY?
+M7<.)]E575E.#[#R*1"14B$0D(`^VR(G*P>($`<J+7"10C123BX(\"P``B40D
+M'+C^____T\`B@ED+``"(1"0;BQ.)5"04QT0D$`````"`?"0@`W8,QX)P`0``
+MQ`$``.L.BTPD%,>!<`$``*@!``"+7"04BX-T`0``HP````"*3"0@@^$#NP<`
+M``#3XXG&"=Z+1"04B;!T`0``@^P,:.@#``#H_/____?3(=Z+5"0DB;)T`0``
+M@\00@'PD(`-V%0^V1"0@BX2"T`$``*,`````B<;K%P^V1"0@BTPD%(N$@=`!
+M``"C`````(G&@\X(@'PD(`-V$@^V1"0@BUPD%(FT@]`!``#K$`^V1"0@BU0D
+M%(FT@M`!``"`?"0@`W86#[9$)""+3"04QX3!``(``#@```#K%`^V1"0@BUPD
+M%,>$PP`"```X````@^P,:!`G``#H_/___X/$$(!\)"`#=A8/MD0D((M4)!3'
+MA,($`@```````.L4#[9$)""+3"04QX3!!`(```````"#?"0<``^$;0@``+\`
+M````BUPD4(![*P!V-HGVBU0D'`^V0@F)^P^VR]/XJ`%T%8/L!&H!4?]T)%SH
+M_/___X/$$(UV`$>)^(M4)%`X0BMWS(M,)!SV008!='N#[`A1_W0D7.C\____
+M@\0(#[9<)"A3_W0D7.C\____B=C!X`0!V(M<)&"-%(.+@EP+``"#Q!"I```0
+M`'0+)?__[_^)@EP+``"#[`C_="0D_W0D7.C\____#[94)#")T,'@!`'0BU0D
+M8,>$@CP+````````@\00Z:,'``"+3"0<@'DT`'0=@^P(48M<)%S_L\0)``#H
+M_/___XM$)"S^2#2#Q!"`?"0;``^$E`(``,=$)`P`````QD0D"P"#[`@/MEPD
+M*%/_="1<Z/S___^)V,'@!`'8BTPD8(T4@8N"7`L``(/$$*D``!``=`LE___O
+M_XF"7`L``(I<)!N+1"0<B%@)OP````"+5"10@'HK``^&80$```^VZXG[#[;+
+MB>C3^*@!#X0]`0``B<C!X`0!R(I4)!N+7"10B)2#60L``(GX/`-V$8M4)!3'
+MA,H``@``.````.L4B?D/ML&+7"04QX3#``(``#@```"#[`QH$"<``.C\____
+M@\00B?@\`W80#[;`BU0D%(FLP@0"``#K$(GY#[;!BUPD%(FLPP0"``")^#P#
+M=A"+5"04QX)P`0``Q`$``.L.BTPD%,>!<`$``*@!``"+7"04BX-T`0``HP``
+M``")^8/A`[L'````T^.)Q@G>BT0D%(FP=`$``(/L#&CH`P``Z/S____WTR'>
+MBU0D)(FR=`$``(/$$(GY@/D#=A,/ML&+A(+0`0``HP````")QNL7B?L/ML.+
+M5"04BX2"T`$``*,`````B<:#S@B)^8#Y`W80#[;!BUPD%(FT@]`!``#K$(GZ
+M#[;"BTPD%(FT@=`!``!'B?N+1"10.%@K#X>B_O__BT0D'(/`+(G"BTPD'#E!
+M+'0W@^P,B=-2Z/S___^-4.")5"0<@\00BU,$B4,$B1B)4`2)`HM,)`R#>0P`
+M=`N)VHM$)!PY6"QUR8-\)`P`=$>+5"0,QD(R`+\`````BTPD4(!Y*P!V,(M<
+M)!P/MD,)B?G3^*@!=!0/MD0D"XM<)`R(3!A`_D,R_D0D"T>)^(M4)%`X0BMW
+MT(/L!&H`:($```#_="0HZ/S___\/ME0D,(G0P>`$`="+3"1@QX2!/`L`````
+M``"#Q!#IU`,``(/L!&H`:@;_="0HZ/S___^#Q`@/MEPD*%/_="1<Z/S___^)
+MV,'@!`'8BUPD8(T4@XN"7`L``(/$$*D``!``=`LE___O_XF"7`L``(M$)!R#
+MP"R)PHM,)!PY02P/A!<"``")1"0$@^P,4NC\____C6C@@\00C5`(.5`(#X30
+M`0``D(/L#(U%*%#H_/___XUP^(/$$(!^(0UU'(/L"`7X````4(M&*(L`_W`4
+MZ/S___^#Q!"-=@"+5@2+!HE0!(D"@'Y+`'0A@^P,_W0D7.C\____QP0D`0``
+M`.C\____@\00@'Y+`'7?@WX<``^$.@$``(M&',=`8`````"`?DL`#X2>````
+MOP````"+7"109H-[0``/A(H```"0BU0D4(N"K`4``(L<N(7;=&=FBT,09CM&
+M&'5=9CV%`'=7#[?`@+P0F`0``/]T2HG1BQ)FBT,>9L'H!0^WP(T$A0`#``")
+M@G`!``"+$6:+2QZ#X1^X`0```-/@B8)T`0``QD,4(8/L!&H`4_]T)%SH_/__
+M_X/$$(GV1XM<)%`/MT-`.?@/CW?____V1B0$=2V+1"10_H!7#```@^P,4.C\
+M____@\0,:@&+1AP/MD`!4/]T)%SH_/___X/$$)"#[`2+1AP/MD`"4(M&'`^V
+M0`%0:`T```#H_/___X/$#/]V'(M4)%C_LB0%``!J`>C\____@\0,_W8<BTPD
+M6/^Q)`4``&H&Z/S____'1AP`````@\00BUPD'/Y+"OY-,(/L"%;_="1<Z/S_
+M__^#Q!"-12@Y12@/A3'^__^+1"0<_D@<@^P(5?]T)%SH_/___X/$$(M4)`2+
+M3"0<.5$L#X7M_?__BT0D'(/`.(G"BUPD'#E#.`^$&`$``(G#@^P,4NC\____
+MB<:#Q!"`>$L`=$&+1"00_T0D$#U_EI@`=S*)]H/L#/]T)%SH_/___\<$)`$`
+M``#H_/___X/$$(!^2P!T#XM$)!#_1"00/7^6F`!VT(-^'``/A)$```"+1AS'
+M0&``````]D8D!'4LBT0D4/Z`5PP``(/L#%#H_/___X/$#&H!BT8<#[9``5#_
+M="1<Z/S___^#Q!"#[`2+1AP/MD`"4(M&'`^V0`%0:`T```#H_/___X/$#/]V
+M'(M4)%C_LB0%``!J`>C\____@\0,_W8<BTPD6/^Q)`4``&H&Z/S____'1AP`
+M````@\00BT0D'/Y("H/L"%;_="1<Z/S___^#Q!")VHM,)!PY63@/A>K^__^#
+M[`C_="0D_W0D7.C\____#[94)#")T,'@!`'0BUPD8,>$@SP+````````@\00
+MOP````"+1"10@'@K``^&]@```(GV#[9$)!N)^=/XJ`%U"CI,)"`/A<T```")
+M^X#[`W80BT0D%,>`<`$``,0!``#K#HM4)!3'@G`!``"H`0``BTPD%(N!=`$`
+M`*,`````B?F#X0.-#$F[!P```-/CB<8)WHM$)!2)L'0!``"#[`QHZ`,``.C\
+M____]],AWHM4)"2)LG0!``"#Q!")^8#Y`W83#[;!BX2"T`$``*,`````B<;K
+M%XG[#[;#BU0D%(N$@M`!``"C`````(G&@\X(B?F`^0-V$`^VP8M<)!2)M(/0
+M`0``ZQ.)^@^VPHM,)!2)M('0`0``C78`1XG[BT0D4#A8*P^'#/___X/$/%M>
+M7UW#5E.#[`2+="00BQZQ`(![*P!V')`/MM&)T,'@!`'0C82#.`L``#GP=`9!
+M.$LK=^4/MM&)T,'@!`'0C02#BX@\"P``A<ET8O9!!@)T7`4X"P``.4$8=5*`
+M>30`="K^033K1_Y!-(/L#&@`````#[:&BP```%!64?^SQ`D``.C\____@\0@
+MZR*+42R-<N"-02PYPG05B<*#?@P`=,:+1B"-<.`YT'7PC78`@\0$6U[#B?95
+M5U93@^P,BD0D)(A$)`N+?"0@NP`````/MLB)R,'@!`'(C12'B[(\"P``A?8/
+MA&T!``"X_O___]/`A$8)#X5=`0``C48L.48L=!F#[`R-@C@+``!0Z/S___^#
+MQ!#IL@(``(GVO0````"`?@H`#X:A`@``C5XXB?:#[`Q3Z/S___^)PH/$$(M#
+M!(E3!(D:B4($B1"`>B$`#X7O````#[="&(.\AY@"````=0J#>AP`#X2_````
+M#[="&(N$AY@"``"#>'``#X22````QH*P``````^V0B"H`G0KJ`1T)Z@!="/&
+M0B(%QD(C!%(/MD))4/]R+/]R*.C\____@\00Z8H```")]@^V0B"H`G4@J`1T
+M'*@!=!C&0B(#QD(C!(/L"%)7Z/S___^#Q!#K89`/MD(@J`)T6*@$=%2H`750
+MQD(C!L9"(@5FQX*0``````"#[`A25^C\____@\00ZS"#[`3_<AS_MR0%``!J
+M!.C\____@\00ZQB#[`0/MT(84/^W)`4``&H"Z/S___^#Q!!%B>@X1@H/A^#^
+M___I=P$``(UV`&:!^_,!=U(/MG0D"X/L#&@0)P``Z/S___^#Q!"`?"0+`W89
+MBP>+A+#0`0``HP````"I```0`'4AZQ>)]HL'BX2PT`$``*,`````J0``$`!U
+M"$-F@?OS`7:S@^P(#[9<)!-35^C\____B3PDZ/S___^)V,'@!`'8B[2'/`L`
+M`(/$$(7V#X3K````LP"`?RL`=B6-=@`/MD8)#[;+T_BH`70/@^P$:@!15^C\
+M____@\000SA?*W?>#[9$)`N)PL'B!`'"C927.`L``(E6&(U&+#E&+'4(C48X
+M.48X='*]`````,9$)`H`C48LB<(Y1BQT+(/L#(G34NC\____C6C@@\00BU,$
+MB4,$B1B)4`2)`H-]#`!T"(G:.5XL==60A>UT5,9%,@"Q`(!_*P!V2`^V1@G3
+M^*@!=!`/MD0D"HA,*$#^13+^1"0*03A/*W?@ZR;V1@8!=`^#[`A65^C\____
+M@\00ZQ&#[`AJ`%;H_/___X/$$(UV`(/$#%M>7UW#@^P4BT0D&(L09L=`,B``
+M4%+H_/___X/$',.)]E=64XMT)!"+#HM^*+,`@'DK`'8;#[;3B=#!X`0!T(V$
+M@3@+```Y\'0&0SA9*W?E@/L#=AP/ML.+$8N$@M`!``"C`````*D``!``=1SK
+M+HGV#[;#BQ&+A(+0`0``HP````"I```0`'04@^P$5P^VPU!1Z/S___^#Q!#K
+M$9"#[`@/ML-04>C\____@\006UY?PXM4)`2+@@0*``"+`*,`````BX($"@``
+MBT`$HP````"+@@0*``"+0`BC`````(N"!`H``(M`#*,`````PU575E.#[`R+
+M?"0@QD0D"P"`?RL`#X;=!@``B?8/MD0D"XU("+H!````B=/3XX5<)"1U#XU(
+M$-/BA50D)`^$I`8``(!\)`L#=A\/MD0D"XL7BX3"@`$``*,`````J0``"`!U
+M'^L]C78`#[9$)`N+%XN$PH`!``"C`````*D```@`="!7Z/S___\/ME0D#XG0
+MP>`$`="!C(=@"P`````(`(/$!(L?BDPD"X#Y`W8;#[;!BX3#@`$``*,`````
+MB<*!X@```0#K&8GV#[;!BX3#@`$``*,`````B<*!X@```0"%TG1!@/D#=A`/
+MML''A,.``0`````!`.L.#[;!QX3#@`$``````0"%TG0:#[94)`N)T,'@!`'0
+M@8R'8`L``````0"-=@"`?SD!#X5>!0``@'PD"P-V'P^V1"0+BQ>+A,*``0``
+MHP````"H`74CZ24!``"-=@`/MD0D"XL7BX3"@`$``*,`````J`$/A`<!``"#
+M[`@/MD0D$XG"P>($`<*-')>-@V0+``!0_W<4Z/S___^#Q!"#NSP+````='N+
+MJSP+``#&1"0*`(!]"@!V8XUU.(/L#%;H_/___XG#@\00BT8$B5X$B3.)0P2)
+M&/9#)`)U,H-['`!T'8/L!/]S'/^W)`4``&H%Z/S___^`2R0"@\00C78`@^P$
+M4VH&5>C\____@\00_D0D"HI$)`HX10IWH+D@H0<`ZR6#[`1J`0^V1"034%?H
+M_/___\<$)*"&`0#H_/___[D`+3$!@\00#[9$)`N)PL'B!`'"C127C8)D"P``
+MB8ID"P``QT`(*%8``('".`L``(E0#(/L"%#_=Q3H_/___X/$$(!\)`L#=A</
+MMD0D"XL7BX3"@`$``*,`````ZQ6)]@^V1"0+BQ>+A,*``0``HP````"`?"0+
+M`W8B#[9$)`N+%XN$PH`!``"C`````*F`````=2+I@P```(UV``^V1"0+BQ>+
+MA,*``0``HP````"I@````'1F@'PD"P-V%P^V1"0+BQ>+A,*$`0``HP````")
+MP^L5#[9$)`N+%XN$PH0!``"C`````(G#@'PD"P-V%P^V3"0+BQ>)V`T```$`
+MB83*A`$``.L5#[9,)`N+%XG8#0```0")A,J$`0``@'PD"P-V(0^V1"0+BQ>+
+MA,*``0``HP````"I```$`'4EZ>(!``")]@^V1"0+BQ>+A,*``0``HP````"I
+M```$``^$P@$``(!\)`L#=A</MD0D"XL7BX3"@`$``*,`````B</K%0^V1"0+
+MBQ>+A,*``0``HP````")PX'+```$`(!\)`L#=A`/ME0D"XL'B9S0@`$``.L.
+M#[94)`N+!XF<T(`!```/ME0D"XG0P>`$`="#O(<\"P```'5>@'PD"P-V$HL'
+MBX30@`$``*,`````B</K%0^V1"0+BQ>+A,*``0``HP````")PX!\)`L#=A,/
+MME0D"XL'B9S0@`$``.FE`@``#[94)`N+!XF<T(`!``#ID@(``(UV``^V5"0+
+MB=#!X`0!T(NLASP+``"#?2@`#X33````BT4H#[=0,O;&`0^%PP```(G&]L("
+M#X2P````@^P(C4!84/]W%.C\____QD0D&P"#Q!"`?A\`=FX/MD0D"XM<ACR%
+MVW14@WL<`'0:@^P$_W,<_[<D!0``:@7H_/___X!+)`*#Q!"#[`13:@95Z/S_
+M__^#Q!"`>TL`=!^0@^P,5^C\____QP0D`0```.C\____@\00@'M+`'7B_D0D
+M"XI4)`LX5A]WDL=&6""A!P#'1F`,5@``B79D@^P(C4984/]W%.C\____@\00
+MZPAF@4@R@`")]H!\)`L#=AT/MD0D"XL7BX3"@`$``*,`````]L0!=2'I$`$`
+M``^V1"0+BQ>+A,*``0``HP````#VQ`$/A/0```"`?"0+`W8<#[9$)`N+%XN$
+MPH`!``"C`````*@!="#IT0````^V1"0+BQ>+A,*``0``HP````"H`0^%M@``
+M``^V;"0+B>C!X`0!Z(VLAS@+``"#?00`#X29````BUT$B5PD!(/L"(U%+%#_
+M=Q3H_/___\9$)!,`@\00@'L*`'91B=Z#QCB#[`Q6Z/S___^)PX/$$(M&!(E>
+M!(DSB4,$B1B#>QP`=!J#[`3_<QS_MR0%``!J!>C\____@$LD`H/$$/Y$)`.*
+M1"0#BU0D!#A""G>TQT4L@(0>`,=%-`````");3B#[`B-12Q0_W<4Z/S___^#
+MQ!"0@'PD"P-V&0^V1"0+BQ>+A,*``0``HP````")P>L7B?8/MD0D"XL7BX3"
+M@`$``*,`````B<&`?"0+`W80#[94)`N+!XF,T(`!``#K#@^V5"0+BP>)C-"`
+M`0``_D0D"XI<)`LX7RL/AR7Y__^#Q`Q;7E]=PY!55U93@^P\BW0D4(N.6`4`
+M`(M$)%2-N>@6`0!F@7@0A0!W%P^W0!`/MI0PF`0``(T$TL'@`BG0C3S!#[9'
+M/L'@"`.&!`H``(N`0`@``*,`````B<7![1#!Z!B(1"00#[9'/L'@"`.&!`H`
+M`(N`1`@``*,`````B$0D*(U,)"B)PL'J"(A1`<'H$(A!`@^V1S[!X`@#A@0*
+M``"+@$@(``"C`````(A!`XG"P>H(B%$$P>@0B$$%QD$&`,9!!P"#[`S_<03_
+M="0X#[9$)"10B>H/MMI3:'@```#H_/___X/$(/;#`74;B>F$R705BUPD5,9#
+M%`"X`````.FG`@``C78`BT0D5(!X%(%U,HU$)"A0#[9$)!10B>H/ML)0_W0D
+M8.C\____BTPD9,9!%`*X`````(/$$.EK`@``C78`BUPD5(M#)"7___\`/>$!
+M#@!U$<9#%"&X`````.E'`@``C78`BT0D5/9`9@%U$O?%`0```'0*@'\B_P^%
+M!0(``(/L"%=6Z/S___^#Q`A75NC\____BQ:+3"1D9HM!'F;!Z`4/M\"-!(4`
+M`P``B8)P`0``BP:+7"1D9HM+'H/A'[H!````B=/3XXF8=`$``(M$)&0/MT@>
+MBX:L!0``QP2(`````(M<)&1FBTL>B<AFP>@%#[?`@^$?B=/3XXG9]]$AC(:P
+M!0``BT0D9&:+2!Z)R&;!Z`4/M\"#X1_3XO?2(52&1(/$"(M,)%R+402+`8E0
+M!(D"#[=!'E"-A@`)``!0Z/S____^3TN+7"1DQD,4@8/$$(-[5`!T%(/L"(G8
+M@\!44%;H_/___X/$$(GVC4<0B<(Y1Q`/A.4```"]`0```(E$)`R0@^P,4NC\
+M____B<.+%F:+0!YFP>@%#[?`C02%``,``(F"<`$``(L&9HM+'H/A'XGJT^*)
+MD'0!```/MU,>BX:L!0``QP20`````&:+2QZ)R&;!Z`4/M\"#X1^)ZM/BB='W
+MT2&,AK`%``!FBTL>B<AFP>@%#[?`@^$?B>K3XHG1]]$A3(9$@\0(#[=#'E"-
+MA@`)``!0Z/S____^3TN#Q!"#>U0`=!"#[`B-0U105NC\____@\00C9;,````
+MBX;,````B5@$B0.)4P2)GLP```"+5"0,.5<0#X4E____BTPD5(%A9/___O_&
+MA[`````$@^P(45?H_/___[@!````@\00ZR.-1"0H4`^V1"044(GK#[;#4/]T
+M)&#H_/___X/$$+@`````D(/$/%M>7UW#55=64X/L+(M\)$2+;"1`BW4`BX8H
+M"@``B40D&,=$)!0`````BT0D3`M$)$@/A.H"```/M]>-!-*-!(*-!$+!X`2+
+M3"08]D0((0)T$(N&K`4``(L$D,9`%`+K$9`/M\>+EJP%``"+!(+&0!0A#[?'
+MBY:L!0``BQ2"BT(D)?___P`]X0$0``^$G0$``+#_9H%Z$(4`=PL/MT(0BH0P
+MF`0``#S_=1@/M\>+EJP%``"+!(+&0!0&Z=,(``"-=@`/ML"-%,#!X@(IPHN&
+M6`4``(T4T(E4)!2`?"1+`'EA#[9"(*@"="6H!'0AJ`%T'8L&BX!8`0``HP``
+M``")PH7`=`J+!HF06`$``(GVBP:+@%`!``"C`````(G"@\H"BP:)D%`!``"+
+M!HN`!`$``*,`````B<*`SO^+!HF0!`$```^WUXT$THT$@HT$0L'@!(M<)!AF
+M]T08(`((#X3,````QD0D$P"S`(!^*P!V78UV``^V10D/MLO3^*@!=$>`^P-V
+M&HL&BX2(T`$``*,`````J0``$`!U'>LKC78`#[;#BQ:+A(+0`0``HP````"I
+M```0`'00N`$```"(V=/@"$0D$XUV`$,X7BMWIH!\)!,`=%N*7"03.%T)=5*)
+M^&;!Z`4/M\")^8/A'[H!````T^*%5(9$=3>+1"04@+BP`````G<'QH"P````
+M`X/L"`^WUXN&K`4``/\TD/]T)"#H_/___X/$$.EG!P``C78`]D0D2P$/A%D'
+M```/M\>+EJP%``"+#(+&010ABT$D)?___P`]X0$.``^$-@<``(M4)!0/MD(^
+MP>`(`X8$"@``BX!`"```HP````")Q\'O$(G%P>T8#[9"/L'@"`.&!`H``(N`
+M1`@``*,`````B$0D((U<)"")PL'J"(A3`<'H$(A#`HM4)!0/MD(^P>`(`X8$
+M"@``BX!("```HP````"(0P.)PL'J"(A3!,'H$(A#!<9#!@#&0P<`]D%F`74C
+MB?@/MM#VP@%T&5.)ZP^VPU!24>C\____@\00Z8<&``"-=@"#[`A15NC\____
+M@\00Z7(&``")]@^WUXN&K`4``(L$D&:!>"3A`0^%*`$```^V0":#Z`:#^`H/
+MAT@&``#_)(5H!0``#[?7BX:L!0``BPR0C032C02"C01"B</!XP2+?"08BD0[
+M,XA!%(N&K`4``(L$D/9`$P0/A`D&``"`>!0`#X3_!0``@W@X``^$]04``(M0
+M.(I$.S.(`NGG!0``#[?7C032C02"C01"P>`$B=.+EJP%``"+%)J+3"08BD0(
+M*HA"%(N&K`4``(L$F(-X-``/A*\%``"#[`R-!-N-!(.-!$/!X`0/MH0((00`
+M`%#H_/___XG%BX:L!0``BP28@\00.V@@=@.+:"`/M]>+AJP%``"+#)"-!-*-
+M!(*-!$+!X`2+7"08C408*(/L!%50_W$TZ/S___^#Q!#I1P4```^WQXN6K`4`
+M`(L$@L9`%`#I,@4``(GV#[?7BX:L!0``BRR0BT5(B40D#+#_9H%]$(4`=PL/
+MMT40BH0PF`0```^VP(T4P,'B`BG"BX98!0``C130B50D%,:"L``````/MD(@
+MJ`(/A$T!``"H!`^$10$``*@!#X0]`0``QD44`/9%9B`/A+\$``"#?"0,``^$
+MM`0``(M4)`SV0ET"#X2&````@WI8`'06@^P$_W4@_W4T_W)8Z/S___^#Q!#K
+M:H-]-`!T9+\`````BTPD#(-Y8`!T"_9!70%U!8MY8.LC@^P$:@'_MB0&``#_
+M="08BUPD'/]39(/$$(7`=`:+OB0&``"#?2``="&+732#[`3_-U/_=PCH_/__
+M_P,?@\00C4<$@\<0@S@`=.*+?"04#[9'/L'@"`.&!`H``(N`0`@``*,`````
+MB<+!ZA"+3"0,B%%3P>@89HE!2`^V1S[!X`@#A@0*``"+D$0(``")%0````!F
+M#[;"9HE!3`^VQF:)04Z)T,'H$&8/ML!FB4%0P>H8B%%2#[9'/L'@"`.&!`H`
+M`(N`3`@``*,`````9@^VP&:)04KID0,``)`/M]>-!-*-!(*-!$*)P<'A!(M<
+M)!B*1!DSA,`/A:<```"+AJP%``"+!)#&0!0`]D5F$`^$6`,``(-\)`P`#X1-
+M`P``BD09,XM\)`R(1TJ*1UVH`@^$-P,``+\`````BU0D#(-Z8`!T":@!=06+
+M>F#K(X/L!&H!_[8D!@``_W0D&(M,)!S_462#Q!"%P'0&B[XD!@``@WT@``^$
+M\@(``(M=-(UV`(/L!/\W4_]W".C\____`Q^#Q!"-1P2#QQ"#.`!TXNG)`@``
+MD#P"#X5X`@``#[??C03;C02#C01#P>`$BU0D&(U$$$")1"0(BAB#XW_&1"0'
+M`,9$)`8`QD0D!0`/M]>-!-*-!(*-!$+!X`2+3"08BT0(.(E$)!R-3"0<#[94
+M)!S!XA@/MD$!P>`0"<(/MD$"P>`("<(/MD$#"<*)%"2`^W%V-X/Z`78.BT0D
+M"(I8`8/C#XA<)`>#/"0"=@N+5"0(BE("B%0D!H,\)`-V7(M,)`B*20.(3"0%
+MZT^#/"0"=@Z+1"0(BE@"@^,/B%PD!X,\)`=V-8M4)`@/MD('@\`(.00D=@.)
+M!"2#/"0,=@N+3"0(BDD,B$PD!H,\)`UV"XM<)`B*6PV(7"0%#[?7BX:L!0``
+MBP20@'@<`'1=@SPD`'17QD`4((N&K`4``(L$D(H4)#A0'','#[9`'(D$)`^W
+MUXN&K`4``(L,D(-Y.`!T.8T$THT$@HT$0L'@!(M<)!B-1!A`@^P$_W0D!%#_
+M<3CH_/___X/$$.L0#[?'BY:L!0``BP2"QD`4(H!\)`<$=1`/M\>+EJP%``"+
+M!(+&0!0".748#X0E`0``@WPD#``/A!H!``#V1680=&$/M\>-%,"-%)"-%%#!
+MX@2+3"08BD0*,XM<)`R(0TKV0UT"=#V*!"0X11QS`XI%'(3`="X/ML@/M]>-
+M!-*-!(*-!$+!X`2+7"08C4080(/L!%%0BWPD&/]W5.C\____@\00#[9$)`>#
+M^`MW5?\DA90%``"+1"0,QD!>`>F5````@'PD!@1U$H!\)`4"=0N+5"0,QD)>
+M$>M]D(M,)`S&05X"ZW*+7"0,QD->$.MHBWPD#,9'7@OK7HM$)`S&0%X&ZU2+
+M5"0,QD)>#>M*B?8\*'4=BTPD%(I!2TB(04H/M]>+AJP%``"+!)#&0!2!ZR<\
+M"'40@^P,:!`G``#H_/___X/$$`^WQXN6K`4``(L$@L9`%"&-=@"#Q"Q;7E]=
+MPU93@^P$BW0D$(GSBP:+@%`!``"C`````(G"BP:)D%`!``")]O?"`/__`'00
+M@^P(4E;HBNO__X/$$(UV`(L#BX!0`0``HP````")PHL#B9!0`0``]\(`__\`
+M=<FX`````(/$!%M>PXGV55=64X/L+(M\)$!FBX<R"P``9HE$)"*+!XN`0`$`
+M`*,`````)?\/``!FB8<R"P``N`````!FBU0D(F8YES(+```/A/,&``!F@;\R
+M"P``_P\/A'P&``!FBTPD(F8YCS(+```/A&H&``"-M]0```")="04B?:+KR@*
+M``!F_T0D(F:+1"0B9CF'-@L``'<'9L=$)"(```^W5"0BBX=P"@``BUR0!/?#
+M```(``^$M0```(L'BX!0`0``HP````")PXL'B9A0`0``QT0D)`````#WPP#_
+M_P!T5KH`````@'\K`'1+O0$```!F#[9/*V:)3"0.#[?"C4@(B>[3YH7S=0N-
+M2!")Z-/@A<-T&P^WTHT$4L'@`RG0C82'*`$``(E$)"3K"XUV`$)F.50D#G?$
+M@WPD)`!U%8/L#/]T)$SH_/___X/$$.EY!0``D(/L#/]T)$SH_/___XM4)#2(
+M0@N#Q!#I704``)")WH'F_P\```^WQHT4P(T4D(T44,'B!(G1BU0J((M,*22)
+M5"08B4PD'(N7K`4``(LL@H7M#X0B!0``]\,``"``#X1V`0``@'T4@0^%4`$`
+M`,9%%"$/MU4>BX>L!0``QP20`````&:+31Z)R&;!Z`4/M\"#X1^^`0```-/F
+MB?'WT2&,A[`%``!FBTT>B<AFP>@%#[?`@^$?N@$```#3XHG1]]$A3(=$@^P(
+M#[=%'E"-AP`)``!0Z/S___^#Q!"#?50`=!"#[`B-15105^C\____@\009H%]
+M$(4`#X?!````#[=%$("\.)@$``#_#X2O````9H-]$']W)0^VE#B8!```BX]8
+M!0``C032P>`"*="+1,$H@'@$_W5:Z8,```!F@7T0@0!W*P^W11`/MH0XF`0`
+M`(N/D`4``(T$0(T$P(G"P>(%*<*+1)$(@'@$_W4DZU`/MT40#[:$.)@$``"+
+MEW0%``"-!$"-!("+1,)4@'@$_W0N@^P(55?H_/___X/$$(V7S````(N'S```
+M`(EH!(E%`(E5!(FOS````.F]`P``D(U%"(M,)!2+402)002)30B)4`2)`NFB
+M`P``B?:)\&;!Z`4/M\")\8/A'[H!````T^*%5(=$#X6!`P``#[?6BX>L!0``
+MBP209H%X$(4`#X>A````#[=0$("\.I@$``#_#X2/````9H-X$']W'P^VE#J8
+M!```BX]8!0``C032P>`"*="+1,$HBE`$ZVL/M]:+AZP%``"+!)!F@7@0@0!W
+M*`^W0!`/MH0XF`0``(N/D`4``(T$0(T$P(G"P>(%*<*+1)$(BE`$ZR\/M]:+
+MAZP%``"+!)`/MT`0#[:$.)@$``"+EW0%``"-!$"-!("+1,)4BE`$ZP*R_X#Z
+M_W0-#[;"@+PX'@4``/]U0HGP9L'H!0^WP(GQ@^$?O@$```#3YH5TAT0/A94"
+M``#&110&@^P(:@!5Z/S___^#Q`QJ`%57Z/S___^#Q!#I<@(```^VP@^VA#@>
+M!0``B40D)(T$0,'@`RM$)"2-A(<H`0``B40D)(M$)!P+1"08=`CWPP```@!U
+M$,=$)!@`````QT0D'`````"+5"0D]D(&`@^$9`$``/]T)!S_="0<#[?&4%+H
+M_/___XGP9L'H!0^WP(GQ@^$?NP$```")VM/B@\00A52'1`^%Z`$``(!]%($/
+MA84````/MU4>BX>L!0``QP20`````&:+31Z)R&;!Z`4/M\"#X1_3XXG9]]$A
+MC(>P!0``@^P(#[=%'E"-AP`)``!0Z/S___^#Q`A55^C\____@\00@WU4`'00
+M@^P(C4544%?H_/___X/$$(V7S````(N'S````(EH!(E%`(E5!(FOS````.E9
+M`0``QD0D(0#&1"0@`(N'U````#E$)!1T$(V7U````/Y$)"&+`#G"=?:`?"0A
+M`'0QC9_4````@^P,4^C\____C4CX@\00BU,$B4,$B1B)4`2)`CGI=07&1"0@
+M`?Y,)"%UU8!\)"``#X7P````C44(BTPD%(M1!(E!!(E-"(E0!(D"B?!FP>@%
+M#[?`B?&#X1^^`0```-/F";2'A````.FZ````_W0D'/]T)!P/M\90_W0D,.C\
+M____QD0D,0#&1"0P`(N'U````(/$$#E$)!1T$HV7U````(GV_D0D(8L`.<)U
+M]H!\)"$`=#6-G]0```"0@^P,4^C\____C4CX@\00BU,$B4,$B1B)4`2)`CGI
+M=0C&1"0@`8UV`/Y,)"%UTH!\)"``=3>`?12!=#&-10B+3"04BU$$B4$$B4T(
+MB5`$B0*)\&;!Z`4/M\")\8/A'[X!````T^8)M(>$````9HM$)")F.8<R"P``
+M#X6B^?__C8?4````B<(YA]0```!T1XGV@^P,B=92Z/S___^#Z`AFBT@>B<MF
+MP>L%#[?;@^$?NO[____3PB&4GX0```"#Q`QJ`%!7Z/S___^#Q!")\CFWU```
+M`'6[@^P,5^C\____N`$```"#Q!"#Q"Q;7E]=PXGV5U93@^P0BUPD(&;'1"0.
+M``"+FR0%``"^`````(U\)`Z+`XN`4`$``*,`````BQ.)@E`!``"%P'0;BP/'
+M@%`!```!````@^P,4^C\____B`0W@\00@<-@#```1H/^`7[`@'PD#@!U#+@`
+M````@'PD#P!T!;@!````@\006UY?PY!55U93@^P,BVPD(+D`````9@^V12N)
+MPV:#^`!V&8M$)"0/ME`)C78`B=#3^*@!=09!9CG+=_*+5"0D@WHH`'0E@^P(
+MBT(H@\!84/]U%.C\____@\0(BTPD+/]Q*%7H_/___X/$$(M$)"2#P#B)PHM,
+M)"0Y03@/A%<!``")1"0(D(/L#%+H_/___XG&@\00@W@<``^$%0$``(!X2P`/
+MA(<```"_`````&:#?4``='N)]HN%K`4``(L<N(7;=&-FBT,09CM&&'599CV%
+M`'=3#[?`@+PHF`0``/]T1HM5`&:+0QYFP>@%#[?`C02%``,``(F"<`$``(M5
+M`&:+2QZ#X1^X`0```-/@B8)T`0``QD,4(8/L!&H`4U7H_/___X/$$)!'#[=%
+M0#GX?X>+1AS'0&``````]D8D!'4G_H57#```@^P,5>C\____@\0,:@&+1AP/
+MMD`!4%7H_/___X/$$(GV@^P$BT8<#[9``E"+1AP/MD`!4&@-````Z/S___^#
+MQ`S_=AS_M20%``!J`>C\____@\0,_W8<_[4D!0``:@;H_/___\=&'`````"#
+MQ!"+1"0D_D@*@^P(5E7H_/___X/$$(M4)`B+3"0D.5$X#X6N_O__BT0D),=`
+M*`````"+10"+B%@!``")#0````"%R70)BT4`B8A8`0``@\0,6UY?7<.-=@!7
+M5E.+="00BWPD%+,`@'XK`'85#[97"9")T(C9T_BH`74&0SA>*W?P]D<(`G4(
+MC4<X.4<X=6:#[`Q7Z/S___^#Q!"$P'1$@^P,5NC\____B<&#Q!"%P'1$C4<X
+MBU`$B4@$B0&)402)"OY'"HEY*,9!(`7&02$`QD%)#VH!:@%15^C\____@\00
+MZQ*#[`@/ML-05NC\____@\00B?9;7E_#55=64X/L$(ML)"B+?50/MD4K4/]T
+M)"A7Z/S___^)QF:#33(0NP````"#Q!"+5"0@9@^V0BMFB40D"F:#^`!V%@^V
+M5PF)T(C9T_BH`74(0V8Y7"0*=^YF@_L#=B`/M\.+3"0@BQ&+A(+0`0``HP``
+M``"I```0`'4XZQZ)]@^WPXM,)""+$8N$@M`!``"C`````*D``!``=1B#[`@/
+MML-0_W0D+.C\____@\00Z9@!``"-1S@Y1S@/A(P!``"%]@^$A`$```^V1DG'
+M1(4\`````(M6!(L&B5`$B0*#[`16:@97Z/S___^#Q!"`?DL`="*0@^P,_W0D
+M+.C\____QP0D`0```.C\____@\00@'Y+`'7?@WX<`'1>BT8<QT!@`````/9&
+M)`1U%HM$)"#^@%<,``"#[`Q0Z/S___^#Q!"#[`3_=AR+5"0H_[(D!0``:@'H
+M_/___X/$#/]V'(M,)"C_L20%``!J!NC\____QT8<`````(/$$/Y/"H/L"%;_
+M="0LZ/S___^+5"0PBP*+D%@!``")%0````"#Q!"%TG0,BTPD((L!B9!8`0``
+MQD4F`&:#93+ONP````"`?1\`=!UF#[95'Y`/M\.+=(4\A?9T!H!^(O]U<T-F
+M.=IWZ?9%,H!T$H/L"%7_="0LZ/S___^#Q!#K5;L`````@'T?`'0]B?8/M\.+
+M=(4\A?9T)?9&)`)T'X/L!/]V'(M$)"C_L"0%``!J!NC\____@&8D_8/$$)!#
+M9@^V11]F.=AWQ6;'13("`(!E+?V-=@"#Q`Q;7E]=PU93@^P$BUPD$(MT)!2+
+M1E2Q`(![*P!V$@^V4`F)T-/XJ`%U!D$X2RMW\L9&)@R#[`A64^C\____@\04
+M6U[#B?975E.#[!"+?"0@BD0D)(A$)`^[``````^V\(GV@^P,:!`G``#H_/__
+M_X/$$(!\)`\#=AF+!XN$L-`!``"C`````*D``!``=2'K%XGVBP>+A+#0`0``
+MHP````"I```0`'4(0V:!^_,!=K.#[`@/MEPD%U-7Z/S___^)/"3H_/___XG8
+MP>`$`=B-!(>#Q!#V@%@+```!=!*#[`C_L#P+``!7Z/S___^#Q!"#Q!!;7E_#
+MD%575E.#[`R+="0@BSX/MU0D)(N'K`4``(L<D+T`````QT0D"`````!F@7LD
+MX0%U*(I#)H/H$3P!=QZ+1BB)1"0(BT0D+`M$)"AU28M$)`C&0#4`ZS^-=@"+
+MCU@%``"-J>@6`0!F@7L0A0!W%P^W0Q`/MI0XF`0``(T$TL'@`BG0C2S!BT0D
+M+`M$)"AU!\:%L`````"`>Q2!=0:`9@CWB?:+1"0L"T0D*`^%R@```,9#%`#V
+M0V8@#X3<`0``BW-(A?8/A-$!``#V1ET"=".#?E@`=!V#>S0`=!>#[`3_<R#_
+M<S3_=ECH_/___X/$$(UV``^V13[!X`@#AP0*``"+@$`(``"C`````(G"P>H0
+MB%93P>@89HE&2`^V13[!X`@#AP0*``"+D$0(``")%0````!F#[;"9HE&3`^V
+MQF:)1DZ)T,'H$&8/ML!FB490P>H8B%92#[9%/L'@"`.'!`H``(N`3`@``*,`
+M````9@^VP&:)1DKI(0$``)"`>Q2`=0;&0Q0AB?:#[`3_="0P_W0D,&C$````
+MZ/S___^#Q!!F@7LDX0%U((I#)H/H$3P!=Q:#[`S_="04Z/S___^#Q!#IU@``
+M`(GV]D0D*P%T:8M#)"7___\`/>$!#@!T6@^V13[!X`@#AP0*``"+@$`(``"C
+M``````^V13[!X`@#AP0*``"+@$0(``"C``````^V13[!X`@#AP0*``"+@$@(
+M``"C`````(/L"%-7Z/S___^#Q!#K9XUV`(!\)"L`>1V+!XN`6`$``*,`````
+MB<&%P'1*BP>)B%@!``#K0(!\)"@`>#F`?"0O`'DRBQ=FBT,>9L'H!0^WP(T$
+MA0`#``")@G`!``"+%V:+2QZ#X1^X`0```-/@B8)T`0``B?:#Q`Q;7E]=PU=6
+M4X/L$(M<)"2+?"0@BD,4B$0D#XN/6`4``(VQZ!8!`&:!>Q"%`'<7#[=#$`^V
+ME#B8!```C032P>`"*="--,&`?"0/`'4E9L>&D```````@'LD''46@'LF`G40
+M@^P(4U;H_/___X/$$(UV`(-[4`!T$H/L"(U#4%!7Z/S___^#Q!")]H/L"%-7
+MZ/S___^#Q!"`?"0/!G0[@^P(C9X``0``4_]W%.C\____QX8``0``@(0>`,>&
+M"`$```````")M@P!``"#Q`A3_W<4Z/S___^#Q!"#Q!!;7E_#B?955U93@^P,
+MBWPD((7_#X3`````BT<HBRB#[`Q5Z/S___^)PXU`/(E$)!B#Q!"%VP^$G@``
+M`(/L#%7H_/___XG&@\00A<!U$8/L"%-5Z/S___^#Q!#K?8GVQD,5K&:+1QAF
+MB4,0B6L8QT-D"````(ES4(M&"(E#-,=#(``(``"-A[0```")0SC&0QP@QT-L
+M`````,9#)!S&0R4!QD,F`L9#)PC&0R@`@^P(:@#_="04Z/S_____<R#_=A#_
+M=@S_="0DZ/S___^#Q!A35>C\____@\00@\0,6UY?7<.055=64X/L#(ML)""+
+M?"0DBD0D*(A$)`N+12B+,,9$)`H`C78`#[9$)`J*E#"8!```@/K_=%.#[`1J
+M"(U'#%`/MM*-!-+!X`(IT(T<Q0````")V`.&6`4```6<````4.C\____@\00
+MA,!T'HN&6`4``(I4)`N(E`/6````BX98!0``B:P#X````/Y$)`IYEH/$#%M>
+M7UW#B?955U93@^P,BTPD)(M!-(E$)`@/MD`"B<7!Y0B+5"0(9@^V0@,!Q0^W
+M]8U6!`^W02`YP@^/T````(M<)`B#PPC&1"0'`(M4)`B-1!8$.=@/AJ,```"*
+M`X3`>'Z#X`\\!G5W]D,#P'0&]D,%P'5K]@,0=#"-<PB_`````(![!`!V6(/L
+M!`^V0P-05O]T)"SH_/___X/&'(/$$$>)^#A#!'?@ZS:-<P2_`````(![`@!V
+M*`^V5"0'B10D@^P$_W0D!%;_="0LZ/S___^#QAR#Q!!'B?@X0P)WX9#^1"0'
+M#[9#`8U<`P(/M\6+5"0(C400!#G8#X==____@^P(:@'_="0LZ/S___^#Q!"#
+MQ`Q;7E]=PU575E.#[`2+;"08#[9\)!R*1"0DB$0D`XM%*(LPLP")^0-,)""(
+M3"0"C78`#[;#BH0PF`0``#S_=$H/MM"+CE@%``"-!-+!X`(IT(T4Q0````")
+M^#B$"M8```!U)SFL"N````!U'HI$)`*(A`K5````BX98!0``BDPD`XB,`M0`
+M``")]O[#>:2#Q`1;7E]=PU93BW0D&(I<)!"*5"04BT0D#(M(+("YD````$]W
+M+0^V@9````"-!("-%!.(E,&5````#[:!D````(T$@(GRB)3!E````/Z!D```
+M`%M>PXGV55=64X/L#(M,)"2+630/MD,"P>`(9@^V4P,!T`^WP(/`!`^W42`Y
+MT`^/\@```(U3",9$)`L`O0````"*2P&)]HI"`@!$)`L/MD(#C50"!$6)Z#C!
+M<^J)UL9$)`H`O0````")ZCI4)`L/@Y8```")]HI&`0!$)`J`/@%T!8`^%W4S
+MBEPD"BI>`3I<)`IS9HU%`0^V^`^V!E!7#[;#4/]T)"SH_/___X/$$$,Z7"0*
+M<N3K0HGVBU0D((M"+("XD0````%T,(I<)`HJ7@$Z7"0*<R.-10$/MOB0#[8&
+M4%</ML-0_W0D+.C\____@\000SI<)`IRY(/&!$6)Z#I$)`L/@FS___^+5"0@
+MBT(LQH"1`````8/L"&H'4NC\____@\00@\0,6UY?7<-55U93@^PLBW0D0(ML
+M)$2S_XGG_+D%````N`````#SJV8YZ7-&C78`9H/Y#G<)#[?1B@0RB`04#[?!
+MB@0P@^@P/`EW'(#[_W4#LP"0#[;#C02`#[?1BA0RC5Q"T.L'B?:`^_]U!D%F
+M.>ERO0^VPX/$+%M>7UW#B?975E.#[`2+?"04BD0D&(A$)`.*5"0<B%0D`HM'
+M*(LPLP"-=@`/ML.*A#"8!```//]T.@^VT(N.6`4``(T$TL'@`BG0P>`#.;P(
+MX````'4=BE0D`SB4"-4```!U$(I4)`*(E`C7````ZP>-=@#^PWFT@\0$6UY?
+MPY!55U93@^P,BVPD)(I$)"B(1"0+BT0D((MP++L`````C7T$B?:-!)N-A,:0
+M````@'@$`78T@'@$%W0NBE0D"SA0!74EBE4#@/H@=@*R((T$FXV$QIP````/
+MMM*#[`125U#H_/___X/$$$.#^T]^MH/$#%M>7UW#B?955U93@^P,BTPD),9$
+M)`8`BVDT#[9%`L'@"&:)1"0*9@^V10-F`40D"@^W7"0*C5,$#[=!(#G"#X\*
+M`0``C74(QD0D!P"-1"L$.?`/AN4```"-=@`/MD8"P>`(9@^V5@,!PF:)5"0(
+M#[?:4XU&!%#H_/___X/$"#S_=6W&1"0&_XU<,P0/MT0D"HU$*`0YV'9QC78`
+M#[9#`L'@"&8/ME,#C3P"#[?'4(U#!%#H_/___X/$"#S_=1&`?"0&_W5$QD0D
+M!@#K/8UV`#I$)`9S!(A$)`8/M\>-7`,$#[=$)`J-1"@$.=AWKNL:*D0D!@^V
+MP%`/MD0D"U#_="0HZ/S___^#Q`R#[`0/MD0D"U!6_W0D+.C\_____D0D%P^W
+M1"08C70&!(/$$`^W1"0*C40H!#GP#X<>____@^P(:@+_="0LZ/S___^#Q!"#
+MQ`Q;7E]=PY!64X/L!(MT)!"+3"04BUDT#[9#`L'@"&8/ME,#`=`/M\"-4`0/
+MMT$@.<)_((/L!%)3_[;D````Z/S___^#Q`AJ`%;H_/___X/$$(GV@\0$6U[#
+MB?955U93@^P,BVPD((M$)"2*0!2(1"0'BU0D)&:!>A"%``^'I@````^W0A"`
+MO"B8!```_P^$E````&:#>A!_=R4/MI0HF`0``(N-6`4``(T$TL'@`BG0BT3!
+M*`^V0`0%$`4``.MMBT0D)&:!>!"!`'<N#[=`$`^VA"B8!```BXV0!0``C01`
+MC03`B<+!X@4IPHM$D0@/MD`$!1`%``#K,XM4)"0/MT(0#[:$*)@$``"+E70%
+M``"-!$"-!("+1,)4#[9`!`40!0``ZPB-=@"X#P8```^V1`4.B40D"(T$0,'@
+M`RM$)`B-A(4H`0``B40D"(N-6`4``(M$)"2-L>@6`0!F@7@0A0!W%P^W0!`/
+MMI0HF`0``(T$TL'@`BG0C33!@'PD!P`/A3\"``!FQX:0``````"+5"0D@'HD
+M'`^%*`(```^V0B:#^`)T7(/X`G\*@_@!="CI$`(``(/X!W0S@_@*#X4"`@``
+M@^P(_W0D+%;H_/___X/$$.GM`0``@^P(_W0D+%;H_/___X/$$.G8`0``@^P(
+M_W0D+%;H_/___X/$$.G#`0``@^P(_W0D+%;H_/___X/$"(V>``$``%.+1BB+
+M`/]P%.C\____QX8``0``@(0>`,>&"`$```````")M@P!``"#Q`A3BT8HBP#_
+M<!3H_/___X/$$)#&1B+_OP````"+1"0(@'@*``^&J0```(G#@\,X@^P,4^C\
+M____B<:#Q!"+0P2)<P2)'HE&!(DP@'XB_W1K@'XA`'5M@+ZQ``````^$(`$`
+M``^V1B"H`G0,J`1T"*@!#X7F````#[9&(*@"=0RH!'0(J`$/A>D````/MD8@
+MJ`(/A.P```"H!`^$Y````*@!#X7<````@^P(5E7H_/___X/$$.G*````B?;&
+MAK$`````D$>)^HM$)`@X4`H/AUS___^)^HM$)`@X4`IU7;\`````@'@*`'92
+MB<.#PSB0@^P,4^C\____B<:#Q!"+0P2)<P2)'HE&!(DP@'XB_W0?@'XA(G0&
+M@'XA#743@^P(:@I6Z/S___^#Q!#K5XUV`$>)^HM$)`@X4`IWM(M4)`C&0@7_
+M@^P(4E7H_/___X/$$(!\)`<`#X60````ZR96#[9&25#_=BS_="04Z/S___^#
+MQ!#K#X/L"%95Z/S___^#Q!")]HM$)"2#>%``=!:#[`B+1"0L@\!04%7H_/__
+M_X/$$(GV@^P(_W0D+%7H_/___X/$$(!\)`<`=#%F_X:0````9H.^D`````IV
+M$&;'AI```````.DZ_O__B?:#[`AJ"E;H_/___X/$$(GV@\0,6UY?7<-55U93
+M@^P8BVPD+(I$)#"(1"07BT4HBSA7Z/S___^)PXU`/(E$)!2#Q!"%VP^$H```
+M`(/L#%?H_/___XG&@\00A<!U$(/L"%-7Z/S___^#Q!#K?Y#&0Q6L9HM%&&:)
+M0Q")>QC'0V0(````B7-0BT8(B4,TQT,@``@``(V%M````(E#.,9#'"#'0VP`
+M````QD,D',9#)0&*1"0+B$,FQD,G",9#*`"#[`AJ`/]T)!#H_/____]S(/]V
+M$/]V#/]T)"#H_/___X/$&%-7Z/S___^#Q!"#Q`Q;7E]=PXGV55=64X/L#(ML
+M)""+12B+,(N5Y`````^V0@*)P\'C"&8/MD(#`<,/M\.#P`0]``@```^/W0``
+M`(/L#%;H_/___XG'@\00A<`/A,<```"#[`Q6Z/S___^)1"08@\00A<!U$X/L
+M"%=6Z/S___^#Q!#IH0```)"-1SR)1"0$#[?;@\,$@^P$4_^UY````(M4)!3_
+M<@CH_/___\9'%:QFBT489HE'$(EW&(E?((-/9!*+5"08BT((B4<TB5=0C86T
+M````B4<XQD<<(,=';`````#&1R0=QD<E$,9')@(/ML>(1R>(7RB#Q`AJ`/]T
+M)!#H_/____]W((M$)!S_<!#_<`S_="0@Z/S___^#Q!A75NC\____@\00@\0,
+M6UY?7<-55U93@^P$BWPD&(I$)!R(1"0#BE0D)(A4)`*+1RB+,(MO+,9$)`$`
+M#[9$)`&*C#"8!```@/G_=&,/MM&+GE@%``"-!-+!X`(IT,'@`SF\&.````!U
+M1HI4)`,XE!C5````=3F`?"0"`'0/BX08W````(M,)"")`>LI#[;1BXY8!0``
+MC032P>`"*="+7"0@BQ.)E,'<````ZPF-=@#^1"0!>8;&1"0!`)`/MD0D`8T$
+M@(U4Q0"-@I````"`>`0!=CR`>`07=#:*3"0#.$@%=2V`?"0"`'0.BX*8````
+MBUPD((D#ZR,/MD0D`8T$@(M,)""+$8F4Q9@```#K#)#^1"0!@'PD`4]VH8/$
+M!%M>7UW#D%575E.#[`B+;"0<BD0D((A$)`.+G>0````/MD,"B<;!Y@AF#[9#
+M`P'&#[?&@\`$/0`(``!_9H!\)`,`=`N*A=@```"(0P'K"8I#`8B%V````(U#
+M"(E$)`2_``````^WQHU$&`0[1"0$=C*)]@^V1"0#4(U$)`A0B?H/ML)05>C\
+M____1X-$)!0$@\00#[?&C408!#M$)`1WTXUV`(/$"%M>7UW#4X/L"(M<)!"*
+M5"04BD0D&(A$)`/'1"0$`````(![(P%T2FH!C40D"%`/ML)04^C\____@\00
+M@WPD!`!T+XM$)`2`"("`?"0#`'0-BT0D!(!(`R#K"XUV`(M$)`2`8`/?@^P,
+M4^C\____@\00@\0(6\.-=@!75E.+7"04BWPD$(MS2&:!>Q"%``^'B@````^W
+M0Q"`O#B8!```_W1\9H-[$']W(0^VE#B8!```BX]8!0``C032P>`"*="+1,$H
+MBE`$ZUB)]F:!>Q"!`'<H#[=#$`^VA#B8!```BX^0!0``C01`C03`B<+!X@4I
+MPHM$D0B*4`3K)@^W0Q`/MH0XF`0``(N7=`4``(T$0(T$@(M$PE2*4`3K!8UV
+M`++_L?]F@7L0A0!W"P^W0Q"*C#B8!```@/K_=!@/ML*`O#@>!0``_W0+@/G_
+M=`:`>Q0&=32#>U``=!*#[`B-0U!05^C\____@\00B?:#[`A35^C\____QT8L
+M_____XDT)/]6*(/$$.M\@'L4`'4[]D-D"'04@^P$_W,@_W,T_W8<Z/S___^#
+MQ!#'1BP`````@WX@`'0(BU8@BT84B0*#[`Q6_U8H@\00ZQ/'1BS_____@^P,
+M5O]6*(/$$(GV@WM0`'02@^P(C4-04%?H_/___X/$$(GV@^P(4U?H_/___X/$
+M$(UV`%M>7\-55U93@^P8BVPD+(I$)#"(1"07BT4HBSA7Z/S___^)PXU0/(E4
+M)!2#Q!"%P`^$U0```(/L#%?H_/___XG&@\00A<!U%(/L"%-7Z/S___^#Q!#I
+ML0```(GVQD,5K&:+11AFB4,0BT0D,(E#2(E[&,=#9`@```")<U"+1@B)0S2+
+M1"0LB4,@C86T````B4,XQD,<(,=#;`````#&0R0\QD,E`HI4)`N(4R:+1"0H
+MP>@0B$,GBU0D*`^VQHA#*(A3*8M$)"S!Z!"(0RJ+5"0L#[;&B$,KB%,LQD,M
+M`(/L"&H`_W0D$.C\_____W,@_W80_W8,_W0D(.C\____@\084U?H_/___X/$
+M$(/$#%M>7UW#D%575E.#[!B+7"0LBD0D,(A$)!>+0RB+*%7H_/___XG&@\00
+MA<`/A.T```"#[`Q5Z/S___^)QX/$$(7`=1.#[`A65>C\____@\00Z<D```"0
+MC58\B50D!(/L!/]T)##_L^0```#_<`CH_/___\9&%:QFBT,89HE&$(M$)$")
+M1DB);AB+1"0\B48@@TYD$HM'"(E&-(E^4(V#M````(E&.,9&'"#'1FP`````
+MQD8D.\9&)0**5"0;B%8FBT0D.,'H$(A&)XM4)#@/ML:(1BB(5BF+1"0\P>@0
+MB$8JBU0D/`^VQHA&*XA6+,9&+0"#Q`AJ`/]T)!#H_/____]V(/]W$/]W#/]T
+M)"#H_/___X/$&%95Z/S___^#Q!"#Q`Q;7E]=PU=64XM<)!"+="04BTPD&(M\
+M)!R+5"0@A=MT#87V=`F%R70%A?]U"9"X`````.LYD&:!^H4`=PT/M\*`O!B8
+M!```_W4(N`````#K'9#&023AQD$E`<9!)A-FB5$0B7$8B7ELN`$```"06UY?
+MPXM,)`2+002+0`2C`````(G"@'PD"`!T"('*```,`.L&@>+___/_BT$$B1"+
+M002)4`R+002)4!"+002)4!2+002)4!B+002)4`3#D)!64XM<)!"+3"0PBW0D
+M.`^W1"0,/1$G``!_+CT0)P``?6,](B$``'1</2(A``!_"3T@(0``=$[K5CU`
+M(0``=$4]1"$``'0^ZT8]@"<``'0U/8`G``!_#BT@)P``@_@"=R[K(HGV/8"1
+M``!T&3V`D0``?PD]@B<``'0+ZQ,]@)0``'4,B?;&`T"+1"04Q@`"BT0D&,8`
+M!(H3BT0D+(@09L<!@`!FQP8``(M$)"#&`""+1"0D9L<```&*$XM$)"B($&8/
+MM@-F`P%F`P:+5"0T9HD"BU0D'&:)`F:+$8M$)#QFB1!FBQ&#P@N+1"1`9HD0
+M6U[#C78`55=64X/L#(I$)"2(1"0+BU0D((LZNP````!F@W]```^&>@(``(UV
+M`(G89L'H!0^WP(G9@^$?N@$```#3XH64AX0````/A4H"```/M].+AZP%``"+
+M-)"%]@^$-@(``+T`````BT8D)?___P`]X0$0``^%L@```(-\)"@`#X43`@``
+M9H%^$(4`#X>2````#[=&$("\.)@$``#_#X2`````9H-^$']W(@^VE#B8!```
+MBX]8!0``C032P>`"*="+1,$HBD@$Z3@!``!F@7X0@0!W*P^W1A`/MH0XF`0`
+M`(N/D`4``(T$0(T$P(G"P>(%*<*+1)$(BD@$Z04!```/MT80#[:$.)@$``"+
+MEW0%``"-!$"-!("+1,)4BD@$Z>$```"Q_^G:````B?9F@7X0A0`/AX@````/
+MMT80@+PXF`0``/]T>F:#?A!_=Q\/MI0XF`0``(N/6`4``(T$TL'@`BG0BT3!
+M*(I(!.M69H%^$($`=R@/MT80#[:$.)@$``"+CY`%``"-!$"-!,")PL'B!2G"
+MBT21"(I(!.LF#[=&$`^VA#B8!```BY=T!0``C01`C02`BT3"5(I(!.L%C78`
+ML?]F@7X0A0!W.@^W1A"`O#B8!```_W0LBZ]8!0``9H%^$(4`=Q8/MI0XF`0`
+M`(T$TL'@`BG0C6S%`.L(@<7H%@$`B?:+1"0@.$@$#X6'````@WPD*`!T#HM4
+M)"AFBT(89CM&$'5R@'PD"P9T3XM6)('B____`('ZX0$0`'0^#[9%(*@"=#:H
+M!'0RJ`%U+H"]L`````!U)8'ZX0$/`'0YBD0D"XA&%(/L!&H!5O]T)"SH_/__
+M_X/$$.L>B?:*5"0+B%84@^P(#[?#4/]T)"SH_/___X/$$(GV0V8Y7T`/AXG]
+M__^`?"0+@0^$8@$``+T`````BY?,````C8?,````.=!T")!%BQ(YT'7Y9H7M
+M#X0\`0``C8?,````B<(YA\P````/A"@!``")1"0$@^P,B=-2Z/S___^)QH/$
+M$(-\)"@`="&+5"0H9HM"&&8[1A!T$XM#!(ES!(D>B48$B3!-Z=4```!F@7X0
+MA0`/AX4````/MT80@+PXF`0``/]T=V:#?A!_=Q\/MI0XF`0``(N/6`4``(T$
+MTL'@`BG0BT3!*(I(!.M39H%^$($`=R@/MT80#[:$.)@$``"+CY`%``"-!$"-
+M!,")PL'B!2G"BT21"(I(!.LC#[=&$`^VA#B8!```BY=T!0``C01`C02`BT3"
+M5(I(!.L"L?^+1"0@.$@$=26+1B0E____`#WA`0\`=!:*5"0+B%84@^P(5E?H
+M_/___X/$$.L3C8?,````BU`$B7`$B0:)5@2),DUFA>UT$HM4)`0YE\P````/
+MA=[^__^)]H/$#%M>7UW#5U93@^P$BW0D%(I$)!B(1"0#OP````!F@WY```^&
+M`0$``(GV#[?7BX:L!0``BQR0A=L/A.````!F@7L0A0`/AX@````/MT,0@+PP
+MF`0``/]T>F:#>Q!_=Q\/MI0PF`0``(N.6`4``(T$TL'@`BG0BT3!*(I(!.M6
+M9H%[$($`=R@/MT,0#[:$,)@$``"+CI`%``"-!$"-!,")PL'B!2G"BT21"(I(
+M!.LF#[=#$`^VA#"8!```BY9T!0``C01`C02`BT3"5(I(!.L%C78`L?^X_P``
+M`&:!>Q"%`'<-#[=#$&8/MH0PF`0```^WP(T4P,'B`BG"BX98!0``C030.DPD
+M`W46#[9`(*@!=`ZH!'0*N`$```#K$XUV`$=F.7Y`#X<!____N`````"#Q`1;
+M7E_#D%575E.#[`B+5"0<BT(HBS"+CN`)``")3"0$9L=$)`(``(UV`+L`````
+M9H-^0`!V3XN^K`4``(GV#[?3@SR7`'0WBPR7BT$D)?___P`]X0$0`'0EBVPD
+M'&:+11AF.T$0=1>)T,'@!F:+3"0"BU0D!&8Y3!`(=`F)]D-F.5Y`=[EF.5Y`
+M=`UF_T0D`F:#?"0"'W:2#[=$)`*#Q`A;7E]=PY!3BU0D"(M,)`R+7"00@WHX
+M`'09BT(XQ@!PBT(XB$@"BT(XQD`'`(M".(A8#%O#B?;#C78`5U93BUPD$(M4
+M)!2)T8'A_P$``(N#K`4``(,\B`!T)XLTB`^V1A4/MIO&````B-G3X`^W^`^W
+MTKC__P``T^`APHGP.==T!;@`````6UY?PY!64X/L!(M,)!"+="049H%^).$!
+M#X6?````BD8F@^@1/`$/AY$```"Z_P```&:!?A"%`'<,#[=&$`^VE`B8!```
+MC012C02`BY%T!0``C1S"@'LH_W5+L!2`?F@`=`8/MD9HT>`/ML"-!("-!("-
+M!("-!("-!("-!(#!X`:)0UC'0V``````B5MD@^P(C4-84/]Q%.C\____QD,H
+M`(/$$(GVC4,4BU`$B7`$B0:)5@2),OY#*>FG````NO\```!F@7X0A0!W#`^W
+M1A`/MI0(F`0``(T$TL'@`BG0BY%8!0``C1S"BT8D)?___P`]X0$0`'1N@'M(
+M_W55L!2`?F@`=`8/MD9HT>`/ML"-!("-!("-!("-!("-!("-!(#!X`:)@^@`
+M``#'@_``````````B9OT````@^P(C8/H````4/]Q%.C\____QD-(`(/$$(U#
+M$(M0!(EP!(D&B58$B3+^0TN#Q`1;7L.-=@!3@^P(BUPD%(![2/]T'8/L"(V#
+MZ````%"+1"0<_W`4Z/S____&0TC_@\00@\0(6\-3@^P(BUPD%(![*/]T&H/L
+M"(U#6%"+1"0<_W`4Z/S____&0RC_@\00@\0(6\.-=@!55U93@^P,BVPD((MT
+M)"1F@7XDX0$/A;T```"*1B:#Z!$\`0^'KP```+G_````9H%^$(4`=PP/MT80
+M#[:,*)@$``"-!$F-!("+E70%``"-',*!^?\````/A#L!``#^2RF#[`R->Q17
+MZ/S___^)P8/$$#GP=4.#[`A35>C\____@\00.7L4#X0-`0``QT-8`"TQ`<=#
+M8`````")6V2#[`B-0UA0_W44Z/S____&0R@`@\00Z>$```"0C5,4BT,4B4@$
+MB0&)402)2Q2+5@2+!HE0!(D"Z<````"Y_P```&:!?A"%`'<,#[=&$`^VC"B8
+M!```C03)P>`"*<B+E5@%``"-',*+1B0E____`#WA`1``#X2#````@?G_````
+M='O^2TN#[`R->Q!7Z/S___^)P8/$$#GP=4>#[`A35>C\____@\00.7L0=%''
+M@^@`````+3$!QX/P`````````(F;]````(/L"(V#Z````%#_=13H_/___\9#
+M2`"#Q!#K'(U3$(M#$(E(!(D!B5$$B4L0BU8$BP:)4`2)`I"#Q`Q;7E]=PU57
+M5E.#[!2+="0HBVPD+`^W11AF#[:\,)@$```/M]>-!-+!X`(IT(N66`4``(V$
+MPN0```!05NC\____#[=5&(/$$(.\EI@"````=!B+A):8`@``@WAP`'4+QX26
+MF`(````````/MT48QH0PF`0``/^#[`@/M]]3C88H"0``4.C\____BY98!0``
+MC03;P>`"*=C!X`.#Q!"`?!`^_W0/@^P(`=!05NC\____@\00@^P(55;H_/__
+M_P^WUXN.6`4``(T$TL'@`BG0P>`#QD0((@"+EE@%``#&1!`C`8/$'%M>7UW#
+MD%575E.#[`R+;"0@9L=$)`J``(GV#[=$)`IF#[:$*)@$``!F/?\`#X3D````
+M9H%\)`J!`'=[#[?`C01`C03`B<+!X@4IPHN%D`4``(T\D+X`````@'\P``^&
+MKP```(U?*(/L#%/H_/___XU(^(/$$(M3!(E#!(D8B5`$B0*+02`E`/__`#T`
+M`/\`=1GV02,$=!.#>1P`=`V+01R*5"0DB%`!C78`1HGQ.$\P=[3K7HGV#[?`
+MC01`C02`BY5T!0``C13"O@````"`>A\`=C^-=@")\0^VP8M,@CR%R70GBT$@
+M)0#__P`]``#_`'48]D$C!'02@WD<`'0,BT$<BDPD)(A(`8GV1HGP.$(?=\3_
+M1"0D9O]$)`IF@7PD"H4`#X;R_O__.:TD!0``=1:#[`C_="0L@<5@#```5>C#
+M_O__@\00@\0,6UY?7<-3@^P0BUPD&(M$)!P/ME`S9@^VA!J8!```QH0:F`0`
+M`/\/M\!0C8-X"0``4.C\____@\0(:@#_LR0%``#H=_[__X/$&%O#B?964X/L
+M#(MT)!B+1"0<#[=`)&8/MIPPF`0``,:$,)@$``#_#[?;4XV&4`D``%#H_/__
+M_XN6=`4``(T<6XT<FXT$W0````"#Q!"`?!`T_W0/@^P(`=!05NC\____@\00
+M@^P(:@#_MB0%``#H`O[__X/$%%M>PU.+7"0(N0````"Z>````(G8C78`B`A`
+M2G7ZQD,H_\9#-/^-0Q2)0Q2)0QA;PXUV`%575E.#[!B+?"0LC8=0"0``4.C\
+M____@\00N@````"$P`^%W````(/L#(V'4`D``%#H_/___XG%LX*#Q!"-=@`/
+MML.`O#B8!```_W43.)_(````<Q&(G\@```#K"8UV`$.`^X5VVKH`````@/N&
+M#X2/````#[;#B>J(E#B8!```#[?%C01`C02`C33%`````(GP`X=T!0``4.C\
+M____BY=T!0``9@^VPV:)1!8D@\0$@'\Y`74.BX=T!0``9L=$!C#__Y`/M]V+
+MAW0%``"-'%N-')O!XP/&1`,F`(N'=`4``&;'1`,R``"#[`AJ`/^W)`4``.C4
+M_/__B=H#EW0%``"#Q!")T(/$#%M>7UW#C78`@^P4BTPD&(M$)!P/ME`$9@^V
+MA`H>!0``QH0*'@4``/\/M\!0@<&@"0``4>C\____@\0<PU.+7"0(N0````"Z
+M&`$``(G8C78`B`A`2G7ZQD-(_\9#/O_&0TH?C4,0B4,0B4,46\.-=@!55U93
+M@^P8BWPD+(V'*`D``%#H_/___X/$$+H`````A,`/A3$!``"#[`R-AR@)``!0
+MZ/S___^)Q;,`@\00C78`#[;#@+PXF`0``/]U%V8/ML-F.8?$````<PYFB8?$
+M````ZP60_L-YV+H`````@/N`#X3B````#[;#B>J(E#B8!```#[?5C032P>`"
+M*="--,4`````B?`#AU@%``!0Z/S___^+EU@%``!F#[;#9HE$%AB+AU@%``#&
+M1`8B`(N'6`4``,9$!CG_BX=8!0``QD0&./^+AU@%``#&1`8Z_XN'6`4``,9$
+M!CS_BX=8!0``QD0&._^+AU@%``#&1`8]_XN'6`4``,:$!K(`````BX=8!0``
+MQH0&UP```/^#[`A7Z/S___^+EU@%``")A!;D````@\00@'\Y`74+BX=8!0``
+M@$P&)`$/M\6-%,#!X@(IPHN'6`4``(T4T(G0@\0,6UY?7<.)]E=64X/L'(MT
+M)"R-AG@)``!0Z/S___^#Q!"Z`````(3`#X4@`0``@^P,C89X"0``4.C\____
+MB<?&1"0?@(/$$`^V1"0/@+PPF`0``/]U%HI$)`\XAL<```!S%8B&QP```.L-
+MB?;^1"0/@'PD#X%VT+H`````@'PD#X(/A,<````/MD0D#XGZB)0PF`0```^W
+MQXT$0(T$P(G"P>(%*<*+AI`%``"[`````+D4#0``C020B!A`277Z#[?'C01`
+MC03`B</!XP4IP\'C`HG:`Y:0!0``C4(0B4(0B=@#AI`%``"#P!")0`2)V@.6
+MD`4``(U"&(E"&(G8`X:0!0``@\`8B4`$B=H#EI`%``"-0BB)0BB)V`.&D`4`
+M`(/`*(E`!(N&D`4``(I4)`^(5`,S@^P(:@#_MB0%``#HM?G__XG:`Y:0!0``
+M@\00B="#Q!!;7E_#D%=64X/L'(MT)"R-AJ`)``!0Z/S___^#Q!"Z`````(3`
+M#X7+````@^P,C8:@"0``4.C\____B<?&1"0?`(/$$`^V1"0/@+PP'@4``/]U
+M#HI$)`\X1C1S$(A&-.L+_D0D#X!\)`\#=MBZ`````(!\)`\$='X/MD0D#XGZ
+MB)0P'@4```^WQXT40,'B`RG"NP````"Y7````(V$EB@!``"-=@"(&$!)=?H/
+MM\>-%$#!X@,IPHT4EHV"2`$``(F"2`$``(E`!(V"5`$``(F"5`$``(E`!(V"
+M8`$``(F"8`$``(E`!(I$)`^(@BP!``"!PB@!``")T(/$$%M>7\.)]E93@^P$
+MBW0D$(V&W````+H`````.8;<````="F#[`R-AMP```!0Z/S___^)PXD$).C\
+M____B30DZ/S___^)0TR)VH/$$(G0@\0$6U[#C78`4X/L"(M<)!"+3"04C8/<
+M````BU`$B4@$B0&)402)"H-Y3`!T$X/L"(U!3%!3Z/S___^#Q!"-=@"#Q`A;
+MPXUV`(/L#(M4)!"-@N0```"Y`````#F"Y````'08@^P,C8+D````4.C\____
+MQD`(`(G!@\00B<B#Q`S#4XM<)`R+$XM$)`@%Y````(M(!(E0!(D"B4H$B1''
+M`P````!;PXUV`(/L#(M$)!"-D.P```"Y`````#F0[````'0.@^P,4NC\____
+MB<&#Q!")R(/$#,.)]E.+7"0,BQ.+1"0(!>P```"+2`2)4`2)`HE*!(D1QP,`
+M````6\.-=@!3@^P(BT0D$(V0_````+D`````.9#\````="6#[`Q2Z/S___^)
+MPX/$$+@`````N9@```")VHUV`(@"0DEU^HG9B<B#Q`A;PY"+1"0(BU0D!('"
+M_````(M*!(E"!(D0B4@$B0'#@^P,BT0D$(V0!`$``+D`````.9`$`0``=`Z#
+M[`Q2Z/S___^)P8/$$(G(@\0,PXGV4XM<)`R+$XM$)`@%!`$``(M(!(E0!(D"
+MB4H$B1''`P````!;PXUV`(/L#(M4)!"-@O0```"Y`````#F"]````'0;@^P,
+MC8+T````4.C\____QT`4`````(G!@\00B<B#Q`S#D%.+7"0,BQ.+1"0(!?0`
+M``"+2`2)4`2)`HE*!(D1QP,`````6\.-=@!55U93@^P,BVPD((M$)"1F@7@0
+MA0`/AYD````/MT`0@+PHF`0``/\/A(<```"+5"0D9H-Z$']W(`^VE"B8!```
+MBXU8!0``C032P>`"*="+1,$HBD`$ZU^0BTPD)&:!>1"!`'<H#[=!$`^VA"B8
+M!```BXV0!0``C01`C03`B<+!X@4IPHM$D0B*0`3K*HM4)"0/MT(0#[:$*)@$
+M``"+E70%``"-!$"-!("+1,)4BD`$ZP6-=@"P_P^VP`^VO"@>!0``C01_P>`#
+M*?B-O(4H`0``BXV0!0``BT0D)&:!>!"%`'<B#[=`$`^VA"B8!```C01`C03`
+MB<+!X@4IPHT4D8E4)`CK"H'![`8-`(E,)`B+5"0DBT(T#[90`8/Z$G02@?J1
+M````#X0J`0``Z9D!``"0BP^)#"2^`````(I0"8A4)`>*0!J(1"0&O0````"`
+M?PH`=CV-7SB)]H/L#%/H_/___XG&@\00BT,$B7,$B1Z)1@2),(M,)`@Y3BQU
+M#(I&28M4)"0Z0A5T"$6)Z3A/"G?(BT0D)(-X4`!T$O]P4/]T)`3H_/___X/$
+M"(UV`(/L"/]T)"S_="0,Z/S___^*EI(```"-0@&(AI(```"#Q!"`^@-W)8!\
+M)`8`=1Z#[`QJ`&H"BU0D.`^V0A50_W8L5^C\____@\0@ZSR*EI(```"-0@&(
+MAI(```"`^@)V*(!\)`8`=2'&1B,"QD8B_X!F)/Z#[`A6_W0D#.C\____@\00
+MZ;P````/MD0D!E`/MD0D"U#_="005^C\____@\00Z9X```")]KH`````O@``
+M``"`?PH`=CR-7SB0@^P,4^C\____B<*#Q!"+0P2)4P2)&HE"!(D0BTPD"#E*
+M+'4,BD))BTPD)#I!%70(1HGP.$<*=\@/MD(@J`)T(*@$=!RH`7084HM,)"@/
+MMD$54/]R+%?H_/___X/$$(GVBT0D)(-X4`!T#O]P4%7H_/___X/$"(GV@^P(
+M_W0D+%7H_/___X/$$(/$#%M>7UW#5U93BWPD$(LW@^P,5NC\____B<.#Q!"%
+MP'1N@^P,5NC\____B<&#Q!"%P'1<C5,\QD,DX<9#)0'&0R80QD,5NXM$)!1F
+M#[9`,V:)0Q"+!XE#&,=#()````"-00B)0S2)2U#&0`$`QD$(0,=#;`````"#
+M[`AJ`%+H_/___X/$"%-6Z/S___^#Q!!;7E_#C78`55=64X/L&(M\)"R+;"0T
+MBS=6Z/S___^)PX/$$(7`='.#[`Q6Z/S___^)P8/$$(7`=&&-4SS&0R3AQD,E
+M`<9#)A#&0Q6[BT0D)&8/MD`S9HE#$(L'B4,8QT,@D````(U!"(E#-(E+4,9`
+M`1#&00A`B>F(2`G'0VP`````@^P(:@!2Z/S___^#Q`A35NC\____@\00@\0,
+M6UY?7<.055=64X/L&(ML)"R+?"0TBT0D.(E$)!2+=0!6Z/S___^)PX/$$(7`
+M#X2(````@^P,5NC\____B<&#Q!"%P'1VC5,\QD,DX<9#)0'&0R80B?B(0Q6+
+M1"0D9@^V0#-FB4,0BT4`B4,8QT,@D````(U!"(E#-(E+4,9``9'&00A`B?F(
+M2`F*3"0(B$@*QT-L`````(/L"&H`4NC\____@\0(4U;H_/___\<$)*"&`0#H
+M_/___X/$$(/$#%M>7UW#C78`55=64X/L&(M\)"R+;"0XBD0D-(A$)!>+-U;H
+M_/___XG#@\00A<!U#,:%L0````'IC@```(/L#%;H_/___XG!@\00A<!U%H/L
+M"%-6Z/S____&A;$````!@\00ZV:-4SS&0R3AQD,E`<9#)A"*1"0+B$,5BT0D
+M)&8/MD`S9HE#$(L'B4,8QT,@D````(U!"(E#-(E+4,9``1+&00A`BDPD"XA(
+M"<=#;`````"#[`AJ`%+H_/___X/$"%-6Z/S___^#Q!"#Q`Q;7E]=PXGV5U93
+MBWPD$(M<)!1F@7L0A0`/AY4````/MT,0@+PXF`0``/\/A(,```!F@WL0?W<D
+M#[:4.)@$``"+CU@%``"-!-+!X`(IT(M$P2AF#[90!.M@C78`9H%[$($`=RH/
+MMT,0#[:$.)@$``"+CY`%``"-!$"-!,")PL'B!2G"BT21"&8/ME`$ZRL/MT,0
+M#[:$.)@$``"+EW0%``"-!$"-!("+1,)49@^V4`3K"(UV`+K_````N?\```!F
+M@7L0A0!W#0^W0Q!F#[:,.)@$``!F@?K_`'06#[?"@+PX'@4``/]T"6:!^?\`
+M=1:)]H/L"%-7Z/S___^#Q!#ICP```(GV#[?"#[:T.!X%``"-!';!X`,I\(VT
+MAR@!``!F#[93)V8/MD,HP>`(`<*!XO\!```/MD,I@_@!=`6#^`AU0P^WTHN'
+MK`4``(L$D#M#2'4R9HM('HG*9L'J!0^WTH/A'[C^____T\`A1)=$@^P(BT-(
+M#[=`'E!6Z/S___^#Q!"-=@"#[`A35^C\____@\006UY?PXUV`%575E.#[!B+
+M1"0TB40D%(M4)"R+.HM,)#`/MT$0#[:4.)@$``"-!-+!X`(IT(N76`4``(TL
+MPE?H_/___XG#BT0D-&:+<!Z)\&;!Z`4/M\")\8/A'[H!````T^*#Q!"%5(=$
+M#X6X````A=L/A+````"-4SR+3"0D#[9!%0^VC\8```#3X`GPQD,DX<9#)0'&
+M0R8/B$,G9L'H"(A#*(I$)`B(0RF+A:0```")0RJ+A:@```")0RZ+3"0DB4M(
+MQD,5JF:+11AFB4,0BTPD((L!B4,8QT,@`````,=#-`````#'0VS@JP``@^P(
+M:@!2Z/S___^#Q`A35^C\____BT0D-&:+2!Z)R&;!Z`4/M\"#X1^Z`0```-/B
+M"52'1(/$$(UV`(/$#%M>7UW#55=64X/L&(M4)"R+0BB+*%7H_/___XG&@\00
+MA<!U$8M$)"#&@+$````!Z94```"0@^P,5>C\____B<>#Q!"%P'4:BU0D(,:"
+ML0````&#[`A65>C\____@\00ZVB-7CS&1B0EQD85JXM4)"!FBT(89HE&$(EN
+M&,=&(`@```#'1F0(````BT<(B48T@\`(B48XQD8<)(E^4,=&;`````"#[`AJ
+M`%/H_/___VH(_W<0_W<,4^C\____@\085E7H_/___X/$$(/$#%M>7UW#55=6
+M4X/L&(M4)"R+0BB+*%7H_/___XG&@\00A<!U$8M$)"#&@+$````!Z9T```"0
+M@^P,5>C\____B<>#Q!"%P'4:BU0D(,:"L0````&#[`A65>C\____@\00ZW"-
+M7CS&1B2>QD8E$,9&,2#&1A6KBU0D(&:+0AAFB480B6X8QT8@(````,=&9`@`
+M``"+1PB)1C2)?E"#P"")1CC&1APDQT9L`````(/L"&H`4^C\____:B#_=Q#_
+M=PQ3Z/S___^#Q!A65>C\____@\00@\0,6UY?7<-55U93@^P8BVPD+(I$)#"(
+M1"07BT4HBSA7Z/S___^)PX/$$(7`=0W&A;$````!Z:8```"0@^P,5^C\____
+MB<:#Q!"%P'46QH6Q`````8/L"%-7Z/S___^#Q!#K?8U#/(E$)`3&0R02@'PD
+M"P!T#L9#)0'&0R:`QD,H0.L$QD,H),9#%:MFBT489HE#$(E[&,=#(&````#'
+M0V0(````BT8(B4,TB7-0QT-L`````(/L"&H`_W0D$.C\____:F#_=A#_=@S_
+M="0@Z/S___^#Q!A35^C\____@\00@\0,6UY?7<.-=@!55U93@^P8BW0D+(M&
+M*(L`B40D%%#H_/___XG'NP`(``"#Q!"%P'4,QH:Q`````>F[````@^P,_W0D
+M%.C\____B<6#Q!"%P'4?QH:Q`````8/L"%?_="04Z/S___^#Q!#IB@```(UV
+M`&:!^_\`=@6[_P```,9')!K&1R4(QD<F",9')P"(7RC&1RD`QD<5JV:+1AAF
+MB4<0BT0D"(E'&`^WVXE?(,='9`@```"+10B)1S0!V(E'.,9''"2);U#'1VP`
+M````C7<\@^P(:@!6Z/S___]3_W40_W4,5NC\____@\085_]T)!3H_/___X/$
+M$(/$#%M>7UW#D%=64XM\)!"+1RB+,(/L#%;H_/___XG#@\00A<!U"L:'L0``
+M``'K49#&0"05QD`5JV:+1QAFB4,0B7,8:@%J`5-6Z/S___^#Q!"$P'47@^P(
+M4U;H_/___\:'L0````&#Q!#K%9#'0VP`````@^P(4U;H_/___X/$$%M>7\.X
+M!`````^V5"0$@_H7=SG_))7$!0``@\`DPX/`.,.#P!##@\`<PX/`2,.#P!S#
+M@\`\PX/`),.#P!C#@\`4PX/`2,.#P#"-=@##C78`5E.#[`2+="00BUPD%(![
+M/O]T&8/L"`^V0SY0_S;H_/___\9#/O_^3BR#Q!"#Q`1;7L.)]E=64XM\)!"+
+M5"04#[9"(*@"=`VH!'0)J`$/A+4```"0@'H^_P^%J@```(L'BX`8`0``HP``
+M``")QK$`N`$```")P]/CA?-U+(A*/HL7B?`)V(F"&`$``(L'BX!8`0``HP``
+M``")QB'>=&2+!XFP6`$``.M:08#Y'W;&BP>+@!P!``"C`````(G&L0"X`0``
+M`(G#T^.%\W4PC4$@B$(^BQ>)\`G8B8(<`0``BP>+@&`!``"C`````(G&(=YT
+M$8L'B;!@`0``ZP>008#Y'W;"_D<LC78`6UY?PU93@^P$BW0D$(M<)!2`>S3_
+M=!F#[`@/MD,T4/\VZ/S____&0S3__DXL@\00@\0$6U[#B?975E.+?"00BU0D
+M%(!Z-/\/A:<```"+!XN`&`$``*,`````B<:Q`+@!````D(G#T^.%\W4LB$HT
+MBQ>)\`G8B8(8`0``BP>+@%@!``"C`````(G&(=YT8(L'B;!8`0``ZU9!@/D?
+M=L:+!XN`'`$``*,`````B<:Q`+@!````B</3XX7S=2R(2C2+%XGP"=B)@AP!
+M``"+!XN`8`$``*,`````B<8AWG00BP>)L&`!``#K!D&`^1]VQOY'+(UV`%M>
+M7\-55U93@^P,BVPD((M=`+X`````9H-[0``/AA$!``")]@^WUHN#K`4``(,\
+MD``/A/$````/MGT$BP209H%X$(4`#X>Z````#[=0$("\&I@$``#_#X2H````
+M9H-X$']W*P^VE!J8!```BXM8!0``C032P>`"*="+1,$H#[9`!#GX#X2#````
+MZ9H````/M]:+@ZP%``"+!)!F@7@0@0!W+0^W0!`/MH08F`0``(N+D`4``(T$
+M0(T$P(G"P>(%*<*+1)$(#[9`!#GX=#_K60^WUHN#K`4``(L$D`^W0!`/MH08
+MF`0``(N3=`4``(T$0(T$@(M$PE0/MD`$.?AT#>LGC78`@?__````=1R#[`AJ
+M``^WUHN#K`4``/\TD.C\____@\00C78`1F8Y<T`/A_'^__^#Q`Q;7E]=PY"+
+M3"0(BU%,A=)T(HM!)(E"#(M!*(E"$(M!+(E"%(M!,(E"&(M!-(E"',9""`'#
+MB?:+3"0(BU%,A=)T'HM"#(E!)(M"$(E!*(M"%(E!+(M"&(E!,(M"'(E!-,.)
+M]E=64XMT)!"+7"04.7,8#X2H````@'L4``^%B@````^V0R2#^!5T!8/X575\
+MBTM,A<ET=8!Y"`%U;V:!>0SA`75GB[Y8!0``C9?H%@$`9H%[$(4`=Q</MT,0
+M#[:4,)@$``"-!-+!X`(IT(T4QP^V00Z#^`=T&(/X!W\'@_@&=!7K)X/X#'0<
+M@_@-=!#K&V:#8C;]ZQ1F@THV`NL-9H-B-O?K!F:#2C8(D(-[4`!T#HU#4%!6
+MZ/S___^#Q`B09H%[).$!#X4T`0``9H%[$(4`=W@/MT,0@+PPF`0``/]T:HN.
+M6`4``(V1Z!8!`&:!>Q"%`'<3#[:4,)@$``"-!-+!X`(IT(T4P8![%`!U/0^V
+M0R:#^`=T&(/X!W\'@_@&=!7K*(/X#'0<@_@-=!#K'&:#8C;]ZQ5F@THV`NL.
+M9H-B-O?K!V:#2C8(B?9F@7LDX0$/A:@```"`>R8+#X6>````B?=FBTL0#[?1
+M#[9&+DA!.<)](P^V1BZ-4/]F@?F%`'<-#[?!@+PXF`0``/]U#0^WP4$YT'SD
+MN/\```!F/?\`=%B)]V:+2Q`/M]$/MD8N2$$YPGTF#[9&+HU0_XUV`&:!^84`
+M=PT/M\&`O#B8!```_W4-#[?!03G0?.2X_P```&:)0Q#&0Q2`@^P(4U;H_/__
+M_X/$$.D9`0``QD,4`)`Y<QAT)(M#3(7`=!V`>`@!=0I35NC\____@\0(C4-,
+M4%;H_/___X/$"(-[5`!T#8U#5%!6Z/S___^#Q`B#[`A3_W,8_U-L@\009H%[
+M).$!=5N*0R:#Z!$\`7=1N?\```!F@7L0A0!W#`^W0Q`/MHPPF`0``('Y_P``
+M``^$E````(T$28T$@(N6=`4``(T$PH!X*0!U?X!X-/]T>8/L"%!6Z/S___^#
+MQ!#K:HGVN?\```!F@7L0A0!W#`^W0Q`/MHPPF`0``(T$R<'@`BG(BY98!0``
+MC13"BT,D)?___P`]X0$0`'0O@?G_````="=F@7LDX0%U"XI#)H/H$3P!=A60
+M@'I+`'4.@^P(4E;H_/___X/$$)!;7E_#5U93BW0D$(M\)!1FBU<>B=!FP>@%
+M#[?8B=&#X1^X_O___]/`B<$A1)Y$9H'Z_P]T1P^WPHN6K`4``(,\@@!T.,<$
+M@@`````AC)ZP!0``@^P(4(V&``D``%#H_/___X/$"%=6Z/S___^#Q`A75NC\
+M____@\00C78`6UY?PU93@^P0BT0D'(N8X`D```4`"0``4.C\____B<8/M]#!
+MX@8!VHM$)"2)$(/$$+L`````N4````")T(UV`(@80$EU^@^WQH/$!%M>PY!7
+M5E.#[`2+?"04BD0D'(A$)`.^`````+@`````@W\H`'1"ZP2)QNLEBT\HL@"-
+M=@`/ML*#?($\`'0-BT2!/(I<)`,X6$ETW4*`^@1VXXM'*&:!>"2%`'<&B?"%
+M]G4&N`````"0@\0$6UY?PY!55U93BWPD%&8/MEPD'`^V1"08P>`(`<.]````
+M`(!_'``/A+T```"#?S@`#X2S````]D=D"74%O0$```"Q`+X`!```D`^VT8G8
+M9B,$UF8[!-8/A8$```"`?-8%`W0'@'S6!0=U"P^VP8GJ.%3&!'5HQD<4(`^V
+MV0^V1-X&4`^V1-X%4%?H_/___XM7.(I$W@>(0@V#Q`R#?"0@`'0KBT0D((L8
+MBW`$BT<XB7`#BT<X@`B`]D=F!'00A?9T#(M'.(E8"(M'.(`@?XM7.(I''(/H
+M!XA"!^L.B?9!@/D/#X9B____B?9;7E]=PXUV`%575E.#[`R+?"0@BW0D)&:!
+M?A"%``^'B0````^W1A"`O#B8!```_W1[9H-^$']W(`^VE#B8!```BX]8!0``
+MC032P>`"*="+1,$HBD@$ZU>09H%^$($`=R@/MT80#[:$.)@$``"+CY`%``"-
+M!$"-!,")PL'B!2G"BT21"(I(!.LF#[=&$`^VA#B8!```BY=T!0``C01`C02`
+MBT3"5(I(!.L%C78`L?^Z_P```&:!?A"%`'<-#[=&$&8/MI0XF`0``(#Y_P^$
+MDP````^VP8"\.!X%``#_#X2"````9H'Z_P!T>X!^%`9T=0^VG#@>!0``C01;
+MP>`#*=B-G(<H`0``#[?2C032P>`"*="+EU@%``"-+,*`?B8!=2B#[`QJ"NC\
+M____@\0(5E?H_/___X/$#&H"55/H_/___X/$$.L?C78`@^P,:/0!``#H_/__
+M_X/$"%97Z/S___^#Q!")]H/$#%M>7UW#5U93BW0D&(M$)!"+&(/L#%/H_/__
+M_XG"@\00A<!T:<9`).'&0"4!B?"(0B;&0B</BT0D%&:+0!AFB4(0B5H8QT(@
+M`````,="-`````#'0FP`````@^P(4E/H_/___X/$$(GP/`%U$8/L#&H%Z/S_
+M__^#Q!#K$HGV@^P,:%##``#H_/___X/$$%M>7\-64X/L!(MT)!"+7"049H%[
+M$(4`#X>+````#[=#$("\,)@$``#_='UF@WL0?W<B#[:4,)@$``"+CE@%``"-
+M!-+!X`(IT(M$P2B*2`3K68UV`&:!>Q"!`'<H#[=#$`^VA#"8!```BXZ0!0``
+MC01`C03`B<+!X@4IPHM$D0B*2`3K)@^W0Q`/MH0PF`0``(N6=`4``(T$0(T$
+M@(M$PE2*2`3K!8UV`+'_LO]F@7L0A0!W"P^W0Q"*E#"8!```@/G_=!@/ML&`
+MO#`>!0``_W0+@/K_=`:`>Q0&=22#>U``=`Z-0U!05NC\____@\0(D(/L"%-6
+MZ/S___^#Q!#K:9`/ML$/MHPP'@4``(T$2<'@`RG(C8R&*`$```^VTHT$TL'@
+M`BG0BY98!0``C03"@'L4`'00@^P$:@%04>C\____@\00D(-[4`!T#HU#4%!6
+MZ/S___^#Q`B0@^P(4U;H_/___X/$$(UV`(/$!%M>PXGV55=64X/L&(M$)"R+
+M*%7H_/___XG&@\00A<`/A(L```"#[`Q5Z/S___^)QX/$$(7`=1*#[`A65>C\
+M____@\00ZVJ-=@"-7CS&1B3AQD8E`<9&)@Z+5"0D9HM"&&:)1A!F@V(T]XM4
+M)""+`HE&&,=&(``(``"+1PB)1C2)?E#'1FR4O0``@^P(:@!3Z/S_____=B#_
+M=Q#_=PQ3Z/S___^#Q!A65>C\____@\00@\0,6UY?7<.05U93BWPD$(MT)!2+
+M1RB+&(/L#%/H_/___XG"@\00A<!T/L9`)!O&0"4!B?"(0BAFBT<89HE"$,9"
+M:`^)6AC'0B``````QT(T`````,=";`````"#[`A24^C\____@\006UY?PU=6
+M4XM\)!"+1RB+,(/L#%;H_/___XG#@\00A<!T;(/L#%;H_/___XG"@\00A<!U
+M&,:'L0````&#[`A35NC\____@\00ZT2)]L9#)`!FBT<89HE#$,9#:`^)<QC'
+M0R``````QT,T`````(M""(E#.,9#'"2)4U#'0VP`````@^P(4U;H_/___X/$
+M$%M>7\.)]E575E.#[!"+;"0HBUPD+,9#(P'&0R(`4VH&5>C\____@\00@WLL
+M`'01BU,,BT,(B5`$B0*+0RS^2#"`>TL`="&#[`S_="0LZ/S____'!"0!````
+MZ/S___^#Q!"`>TL`==^#N^``````=!Z#[`1J`0^V@]4```!0_[/@````Z/S_
+M__^#Q!"-=@"#>RP`=!:#[`1J`0^V0TE0_W,LZ/S___^#Q!"0@WL<``^$J```
+M`(MS'(-^<``/A8T```"#?G0`#X6#````]D,D!'4LBT0D(/Z`5PP``(/L#%#H
+M_/___X/$#&H!BT,<#[9``5#_="0LZ/S___^#Q!"#[`2+0QP/MD`"4(M#'`^V
+M0`%0:",```#H_/___X/$#/]S'(M$)"C_L"0%``!J`>C\____@\0,_W,<BT0D
+M*/^P)`4``&H&Z/S___^#Q!"-=@#'0QP`````QT9@`````(-[,`!T#XM3,`^V
+M0TG'1((\`````(M3!(L#B5`$B0+^30J#[`A3_W0D+.C\____@\00@'T%_W16
+MOP````"`?0H`=C>-=3B#[`Q6Z/S___^)PX/$$(M&!(E>!(DSB4,$B1B`>R+_
+M=0I'B?@X10IWU^L)B?@X10IW%HGVQD4%_X/L"%7_="0LZ/S___^#Q!"#Q`Q;
+M7E]=PP^V1"0(C13`P>(#*<*-%)"-%)5T10``BT0D!(D0PXGV5E.#[`2+="04
+MBD0D&(A$)`.+7"00N`````")\8G:A?9T"(GVB`)"277ZB3.-AHRZ___!Z`*Z
+M6;;Y<O?BB=#!Z`>(0P2*1"0#.$,$=@.(0P2Q`(![!`!V(0^VT<9$$P?_C032
+MP>`#*="-!(+&A(/810``_4$X2P1WW\9#!@#&0P4`L0"0#[;!C12`C130C923
+MD#$``,9"!P&(2@9!@/D?=N.#Q`1;7L.055=64X/L#(ML)"2+="0@OP````"`
+M?@0`=CZ)]HGX#[;8C03;P>`#*=B-!(.-A(;010``@'@(_707@^P$:@A54.C\
+M____@\00A,!T!(G8ZPU'B?@X1@1WQ+C_````@\0,6UY?7<.-=@!3@^P0BUPD
+M&/]T)!Q3Z/S___^#Q!"Z"0```#S_=!8/MM"-!-+!X`,IT(T$@@^VE(-Z10``
+MB="#Q`A;PY!55U93@^P,BUPD)(V#D````(G?B[.8````@'X&``^$00$``(/L
+M"%!6Z/S___^)Q8/$$#S_#X0J`0``#[9#`8/X`71E@_@!?PR%P'0AZ1,!``"-
+M=@"#^!`/A(,````]D`````^$Q0```.GW````@+Z7,0````^%Z@```,:&ES$`
+M``'^3@:#[`AJ`&H`:@")Z@^VPE#_="0X5NC\____@\0@Z;\```"-=@"`OI<Q
+M````#X6O````QH:7,0```?Y.!H/L"&H`:@!J`8GJ#[;"4/]T)#A6Z/S___^#
+MQ"#IA````+$!B?8/ML&-%("-%-"-A):0,0``B>HX4`1U"8I`!3I'"70'D$&`
+M^1]VVOY.!H/L"%</MD<)4&H0B>H/ML)0_W0D.%;H_/___X/$(.LW#[:#H@``
+M`(T4@(T4T,:$EI<Q```!_DX&@^P(:@!J`&B0````B>H/ML)0_W0D.%;H_/__
+M_X/$((/$#%M>7UW#55=64X/L!(ML)!R*1"0DB$0D`XM4)"AFB10DBUPD&+\`
+M````B?D/ML&-%$")T<'A!@'*C110.6S3%`^%C````+D`````B?@/MO"-!':)
+MPL'B!@'0C01&C13%`````(GV#[?!C01`C03"C408((!X$`!T!H!X$/!U2P^W
+MT8T44HT$=HG!P>$&`<B-!$:-%`*-%-.):AR+3"0@B4H@C4(0BPPD9HE(%HI,
+M)`.(2!2+3"0LBP&)0BB+002)0BS&0C#_ZPJ)]D%F@?F!`':41XGX/`,/ADW_
+M__^#Q`1;7E]=PY!55U93@^P,BVPD(`^V?"0HB>N-M?0P``#&A9<Q````N@``
+M``"YD````(GPD(@00$EU^L9&`0#&!D#'@Y`Q````Q```B:N,,0``B?@/MM"-
+M!-+!X`,IT(T$@HT$@XN0T$4``(F3A#$``(N`U$4``(F#B#$``(/L"(V#]#``
+M`%#_="0PZ/S___^#Q!Q;7E]=PY!55U93@^P,BVPD(`^V?"0HB>N-M?0P``#&
+MA9<Q````N@````"YD````(GPD(@00$EU^L9&`0'&!D#'@Y`Q````Q```B:N,
+M,0``B?@/MM"-!-+!X`,IT(T$@HT$@XN0T$4``(F3A#$``(N`U$4``(F#B#$`
+M`(/L"(V#]#```%#_="0PZ/S___^#Q!Q;7E]=PY!55U93@^P,BDPD*(I$)"R(
+M1"0+BWPD(+,!#[;!C13`C2S5`````"G%C2RHD`^VPXT4@(T4T(V$EY`Q``"`
+M>`<!#X6V````B$@$BE0D"XA0!<9`!P`/MG`&C02VC03&C;2']#```+D`````
+MNI````")\(UV`(@(0$IU^L9&`1#&!D"*1"0+B$8)#[;#C0R`C0S(C0R/C9F0
+M,0``#[9#!HT4@(T4T(T4E\>"D#$```#$``"+1"0@B8*,,0``C12OBX+010``
+MB8&$,0``BX+410``B8&(,0``@^P(#[9#!HT4@(T4T(V4E_0P``!2_W0D,.C\
+M____@\00ZQ*-=@!#@/L?#X8F____N`$```"#Q`Q;7E]=PY!55U93@^P,BD0D
+M+(A$)`N+;"0PBWPD(+,!B>H/MM:)5"0$B?8/ML.-%("-%-"-%)>-@I`Q``"`
+M>`<!#X6H````QD`'`(FZC#$```^V0`:-%("-%-"-M)?T,```N0````"ZD```
+M`(GPD(@(0$IU^L9&`9#&!D"*3"0$B$X&B>B(1@>*5"0+B%8)BTPD-(L!B480
+MBT$$B484#[;#C12`C130C127QX*0,0```,0``(M$)"")@HPQ``"+3"0HBT%<
+MB8*$,0``BT%@B8*(,0``@^P(@<+T,```4O]T)##H_/___X/$$.L2C78`0X#[
+M'P^&,O___[@!````@\0,6UY?7<.055=64X/L#(ML)""*1"0LB$0D"XM\)#")
+M[HV=]#```+D`````NI````")V)"("$!*=?K&0P$3Q@-`B?H/ML:(0P:(4P>*
+M5"0+B%,)QX:0,0```,0``(FNC#$``(M4)"B+0ER)AH0Q``"+0F")AH@Q``"#
+M[`B-AO0P``!0_W0D,.C\____@\0<6UY?7<.+1"0(#[94)`QFBTQ0<$%FB4Q0
+M<&8/MD`"`<@/M\##D(M,)`2Z`0```(UV`(T$DHT$PH"\@9<Q```!=02)T,.0
+M0H/Z'W;FN/__``##4X/L"(M<)!"*1"04B$0D`XI,)!B(3"0'N@$```"-=@"-
+M!)*-!,*-A(.0,0``BDPD`SA(!'42BDPD!SA(!74)QD`'`>L)C78`0H/Z'W;2
+M@\0(6\.055=64X/L/(I$)%B(1"0OBDPD7(I4)&"(5"0NBVPD4(M\)&0/MM"-
+M!-+!X`,IT(T$@H"\A=A%``#]=06Q_8UV``^VP8/X$`^$M`(``(/X$'\7A<`/
+MA)L```"#^`$/A#0!``#I00D``)`]X@````^$L0@``#WB````?Q(]D`````^$
+MCP<``.D>"0``B?8]_P````^%$0D```^V5"0OC032P>`#*="-!(+&A(7810``
+M_X"]ES$```%U)(/L!%+_="1<_W0D7.C\____@\00A<`/A=0(``#^10;IS`@`
+M``^V1"0OQD0%!P&+5"14B52%#.FU"```D(V=]#```("]ES$```%U50^V3"0O
+MC03)P>`#*<B-!(&-1(4`BE,)B)!V10``!=!%``"*4PJ#X@&(4`G&0`@`@^P$
+M4?]T)%S_="1<Z/S___^#Q!"%P`^%6@@``/Y%!NE2"```B?8/MD0D+\9$!0<!
+MBU0D5(E4A0SI.0@``,9$!0?_@^P(:@!J`&C_````4/]TA0S_="1LZ/S___^#
+MQ"#I$@@``+\`````C8WT,```#[94)"^)UHT$TL'@`RG0C02"C5R%`(I!,HB#
+MQD4``&:+03!FB8/$10``BT$HB8.T10``BT$LB8.X10``BT$,B8.$10``BT$0
+MB8.(10``C9.410``BT$4B8.410``BT$8B4($BT$<B4((BT$@B4(,BT$DB8.L
+M10``QH/810```8!]!A\/A'X'``"`NW9%````#X29````#[9$)"^-%,"-'-4`
+M````*<.-')B)7"0HB40D#)")^@^VPE!6_W0D7/]T)%SH_/___X/$$(7`=2]'
+M_D4&C03VP>`#*?"-!(:-1(4`B?HXD'9%``!U"<:`QT4```#K&XB4G<=%``#K
+M$HGZBT0D*(B4A<=%``#K(XUV`(!]!A]T&HMT)`R-!/;!X`,I\(T$AHGZ.)2%
+M=D4``'>$QH67,0```;(`@'T$``^&Q08``)`/ML*`?`4'`0^$??[__T(X501W
+M[.FK!@``C78`QD0D)_^+1QB)1"0PC4PD,(M''(E!!`^V5"0OC032P>`#*="-
+M!(*-=(4`C8;010``QD`($/9'#'`/A)8#``"#OMQ%````=&V*6`J#[`1J"%&+
+MAMQ%``"#P%Q0Z/S___^#Q!"$P'5.]D</#W1(B[;<10``A?9T/H!^90!T+0^V
+MVU-65>C\____C5<84@^WP%!35O]T)'#_="1PZ/S___^*7F:+=FB#Q"3K!;X`
+M````A?9UQ(GV#[9/#_;!#0^$.P$```^V5"0OC032P>`#*="-!(*-%(4`````
+MC80J<$4``(!X!!\/AQ,!``"*0`2(1"0E]L$(=!(/ML#!X`0!T,:$*.A'```&
+MZR,/MDPD)0^V5"0OP>$$C032P>`#*="-!(*-!('&A"CH1P``!P^V5"0E#[9$
+M)"_!X@2-#,#!X0,IP8T,B,'A`@'*`>J-FN!'``#&0PD`BD</B$,+BT0D,(F"
+M\$<``(M$)#2)@O1'``"*1PF(0PJ*5PV#X@^*A"EZ10``.-!V`HC0B,*#X@^*
+M0PR#X/`)T(A##`^V3"0E#[94)"_!X02-!-+!X`,IT(T$@L'@`@'!C8PIX$<`
+M`(I7*8/B#XJ$*'I%```XT'8"B-"(PL'B!(I!#(/@#PG0B$$,#[94)"^-!-+!
+MX`,IT(T$@OZ$A71%``#IVP$``(UV`/9'#P(/A,X!``"#[`B-1"0X4%7H_/__
+M_XA$)#:#Q!`\_P^%30$``,9$)"<`@'T$`'8P#[94)">-!-+!X`,IT(T$@HV$
+MA=!%``"`>`C_=!.`>`C]=`W^1"0GBD0D)SA%!'?0#[94)">-!-+!X`,IT(T$
+M@KD`````NF0```"-A(5T10``D(@(0$IU^@^V5"0GC032P>`#*="-!(*-1(4`
+M#[94)"^-'-+!XP,ITXT<FHU<G0"-DW1%``")D-Q%``"+D]!%``")D,A%``"+
+MD]1%``")D,Q%``"+5"14B9#D1P``BY/@10``B9#@10``QH#810``_XV0<$4`
+M``^V<@N*3PF(C#!\10``_D(+BD\-@^$/BH-Z10``.,AV`HC(B$(*#[94)">-
+M!-+!X`,IT(T$@HU$A0"-B-!%``"+5"0PB9#010``BU0D-(E1!(I7#XB0=T4`
+M`(I$)"Z(00J*104Z101U!,9%!0#^107K4\9'!P#I.`,```^V1"0OC0S`P>$#
+M*<&-#(@/ME0D)HT$TL'@`RG0C02"C5R%`(V#=$4``#F$C=Q%``!T%XV#<$4`
+M``^V2`N*5PF(E`M\10``_D`+@'PD)O]U$P^V1"0GQD0%!P&+5"14B52%#)`/
+MMD<)4`^V7"0S4U7H_/___XT$V\'@`RG8C02#@\0,@+R%QT4````/A+,```"`
+M?08?#X2=`@``#[9<)"^-!-O!X`,IV(T$@\'@`HT4*(E4)""!PG!%``")5"0<
+M`>B)1"00ZV.0BW0D$,:&V$4``!"-OL!%```/MD<'4%/_="1<_W0D7.C\____
+M@\00A<`/A4$"``#^108/MD<'0`^VEG9%```YT`^$Z?[__XT$V\'@`RG8C02#
+M_H2%QT4``(!]!A\/A`X"``"+5"0@BH+'10``BU0D'#I"!G*+Z?8!``")]H!]
+M!@`/A>H!``"#[`AJ`&H`:)`````/MD0D0U#_="1L_W0D;.C\____@\0@Z<,!
+M``#&1`4'_X/L"&H`:@!H_P```%#_=(4,_W0D;.C\____QD0D-P&#Q"#IX0``
+M`(UV`,9$)!<`QT0D&`````"+5"08C012B<+!X@8!T(M4)!B-!$*+5"14.53%
+M%'5]NP````"+5"08C012B<+!X@8!T(M4)!B-!$*-/,4`````C78`C01;C03'
+MC0PHC7$@@'X0_W4^@'T&'P^$*`$``(/L"(U!*%"-41`/MT(64`^V0A10_W$@
+M_W0D;/]T)&SH_/___X/$((7`=0G^10;&1A#PB?9#@?N!````=J?_1"08@WPD
+M&`,/AE7___^`?08`#X72````L@"`?00`=A0/ML*`?`4'`0^$^?[__T(X501W
+M[(!\)!<`#X6K````@^P(:@!J`&CB````#[9$)$-0_W0D;/]T)&SH_/___X/$
+M(.F$````LP"`?00`=BL/MM.-!-+!X`,IT(T$@HV$A=!%``"`>`C]=`J`>`C_
+M=`3&0`C^0SA=!'?5#[94)"^-!-+!X`,IT(T$@HNTA>!%``"S``^VPXT40(G1
+MP>$&`<J-%%"-5-4`C4(0@'@(`743QD`(`(/L"/]R%/]T)%S_UH/$$$.`^P-V
+MRHGV@\0\6UY?7<-55U93@^P$BWPD'(ML)"2*1"0@B$0D`XM,)!C&10#^LP"^
+M`````(!Y!`!V-@^VTXT$TL'@`RG0C02"C02!.;CD1P``=1>)\CI4)`-U"XJ`
+MV$4``(A%`.L*1HUV`$,X601WRH/$!%M>7UW#B?955U93@^P,BVPD((I$)"R(
+M1"0+B>Z*104Z101U!,9%!0`/MGX%LP`/ML.-%$")T<'A!@'*C110C036BU0D
+M)#E0%'5%QD`8`;\`````@'X$`'9HB?@/MM"-!-+!X`,IT(T$@HT$AHM4)"0Y
+MD.1'``!U#8J`V$4``(/``SP!=CQ'B?@X1@1WS.LR#[;#C11`B='!X08!RHT4
+M4(T$UH-X%`!U#XM4)"2)4!3&0!@!ZPR)]D.`^P,/AFW___\/ML.-%$")T<'A
+M!@'*C110NP````"Y`@P``(U$UAR(&$!)=?J)^`^VT(M$)"2)1)8,C032P>`#
+M*="-!(*Y`````+ID````C82&=$4``(@(0$IU^HGX#[;0C032P>`#*="-!(*Y
+M`````+H``@``C82&Y$4``(GVB`A`2G7ZB?H/MLJ-!,G!X`,IR(T$@8T$AHM\
+M)"2)N.1'``"+5"0PB9#@10``C9C010``QD,(_\>`W$4```````"+?"0HBQ>)
+MD-!%``"+5P2)4P2*5"0+B)!Z10``@^P(:@!J`&C_````4?]T)#Q5Z/S____^
+M1@6#Q"Q;7E]=PY!55U93BVPD&(MT)!2_`````(!^!``/AI8```")^`^VT(T$
+MTL'@`RG0C02".:R&Y$<``'5QLP$/ML.-%("-%-"-A):0,0``B?HX4`1U!,9`
+M!P%#@/L?=M^)^`^VT(T$TL'@`RG0C02"C02&QX#D1P```````+D`````NF0`
+M``"-@'1%``"("$!*=?J)^`^VT(T$TL'@`RG0C02"QH2&V$4``/W^3@5'B?HX
+M5@0/AVK___^_`````(GZ#[;"C11`B='!X08!RHT44(T$UCEH%'4XQT`4````
+M`,9`&`"S`(GZ#[;"C11`B='!X08!RHT44,'B`XGV#[;#C01`C03"QD0P,`!#
+M@/N!=NQ'B?@\`W:G6UY?7<-55U93@^P<BTPD-(M$)$"*5"0\B%0D&XM\)#"]
+M`````+,`@'PD.`$/A?<```"%P`^$U````(E$)!2`?P0`=BF0B>@/MM"-!-+!
+MX`,IT(T$@CF,A^1'``!U!SI<)!MT"4-%B>HX5P1WV(GJ#[;"C1S`P>,#*<.-
+M')B-')^-@W1%``"#[`1J9%#_="0@Z/S___^^`````(/$$("[=$4```!T:(GH
+M#[;0C032P>`#*="-!(+!X`*)1"0,C90X<$4``(E4)!"0B?(/ML+!X`2+5"04
+MC1P0C4MD`T0D#`'XC9#H1P``BX#H1P``B4-DBT($B4$$BT((B4$(BT(,B4$,
+M1HGPBU0D$#A"!'>[B>@/MM"-!-+!X`,IT(T$@@^VA(=T10``ZSJ0O0````"^
+M`````(!_!`!V)(GP#[;0C032P>`#*="-!((YC(?D1P``=0-%B?9&B?(X5P1W
+MW(GJ#[;"@\0<6UY?7<.0D)!64XM$)`R+$(LRL0"`>BL`=A0/ME@)B?:)V-/X
+MJ`%U!D$X2BMW\H#Y`W81#[;!BX2&T`$``*,`````ZP\/ML&+A(;0`0``HP``
+M``"I```0``^5P`^VP%M>PXUV`%575E.#[`R+1"0DBU0D((LJBWT`QD`A`,9`
+M(`7&0",&B5`HQD0D!P#'1"0(`````+,`@'TK`'88BTPD(`^V40F)T(C9T_BH
+M`74&0SA=*W?P@/L#=A,/ML/'A,<``@``+````.L1C78`#[;#QX3'``(``"P`
+M``"#[`QH$"<``.C\____@\00@/L#=A4/ML.+A,<$`@``HP`````/MO#K$Y`/
+MML.+A,<$`@``HP`````/MO`)="0(@/L#=A$/ML/'A,<``@``)````.L/D`^V
+MP\>$QP`"```D````@^P,:!`G``#H_/___X/$$(#[`W89#[;#BX3'!`(``*,`
+M````B<:!YO___P#K%P^VPXN$QP0"``"C`````(G&@>;___\`B?#!X`@)1"0(
+M@/L#=A,/ML/'A,<``@``(````.L1C78`#[;#QX3'``(``"````"#[`QH$"<`
+M`.C\____@\00@/L#=A4/ML.+A,<$`@``HP````")QNL3B?8/ML.+A,<$`@``
+MHP````")QH%\)`@!`6F6=1F+1"0@@$@(!HGPP>@0/%`/E,`/ML#K2HGV@7PD
+M"`$!``!U$HGPP>@0/%`/E,`/ML#K+XUV`(/L#&B($P``Z/S___^#Q!#^1"0'
+M@'PD!P0/AD'^__^)\,'H$#Q0#Y3`#[;`@\0,6UY?7<-64X/L!(MT)!"+'E;H
+M_/___X/$!(3`=13&1@7_@^P(5E/H_/___X/$$.M=D+$`@'LK`'82#[96"8G0
+MT_BH`74&03A+*W?R@^P,4^C\____B<&#Q!"%P'0PC48XBU`$B4@$B0&)402)
+M"OY&"HEQ*,9!(`7&02$`QD%)#VH!:@%15NC\____@\00@\0$6U[#B?955U93
+M@^P,BVPD((MT)"2+?0"["@```)"#[`A65>C\____@\00A,!U$X/L#&CH`P``
+MZ/S___^#Q!!+==RQ`(!_*P!V$@^V50F)T-/XJ`%U!D$X3RMW\HM6!(L&B5`$
+MB0+^30J#[`A65^C\____@\00]D4(`G1*@WTH`'49@^P,5^C\____@\00A<`/
+MA&@!``")12CK`XM%*(DXB6A4QD`J`,9`*P#&0"8`9H-(,@2#[`A05^C\____
+M@\00Z3@!``"#?2@`#X3-````@^P(BT4H@\!84/]W%.C\____@\0(_W4H5^C\
+M____@\00C44XB<(Y13@/A)<```")PY"#[`Q2Z/S___^)QH/$$(-X'`!T98M`
+M',=`8`````#V1B0$=27^AU<,``"#[`Q7Z/S___^#Q`QJ`8M&'`^V0`%05^C\
+M____@\00@^P$_W8<_[<D!0``:@'H_/___X/$#/]V'/^W)`4``&H&Z/S____'
+M1AP`````@\00_DT*@^P(5E?H_/___X/$$(G:.5TX#X5L____QT4H`````(!]
+M"@!T%H/L#(U%.%#H_/___XG&_DT*@\00ZPZ#[`Q7Z/S___^)QH/$$(7V=#.-
+M13B+4`2)<`2)!HE6!(DR_D4*B6XHQD8@!<9&(0#&1B,&QD8B`X/L"%97Z/S_
+M__^#Q!"#Q`Q;7E]=PU575E.#[`R+?"0@BVPD)(I$)"B(1"0+BD0D+(A$)`J+
+M!XE$)`2Z`````+X`````@'\*`'8WC5\X@^P,4^C\____B<*#Q!"+0P2)4P2)
+M&HE"!(D0.6HL=0R*1"0+.$))=`N-=@!&B?`X1PIWS(GP.$<*="V`?"0*4'4F
+MQD(C!L9"(@7&0B`'QD(A`(EJ+(EZ*(/L"%+_="00Z/S___^#Q!"#Q`Q;7E]=
+MPU575E.#[`R+;"0@BWT`QD0D"_^S@+[_____@/N%=PL/ML,/MK0XF`0``(GP
+M//]T2`^VP(N/D`4``(T$0(T$P(G"P>(%*<*-!)4`````.6P("'4E@^P$:@C_
+M="0L`X>0!0``4.C\____@\00A,!T"8GPB$0D"^L'D$.`^X%VEP^V1"0+@\0,
+M6UY?7<.055=64X'L+`(``(J$)$@"``"(1"0?BY0D0`(``(M2"(E4)!B+*HN,
+M)$`"``"*23"(3"07BX0D0`(``(/`*(G"BXPD0`(``#E!*`^$9P(``(!\)!<`
+M#X1<`@``B40D#(GV@^P,4NC\____C7#X@\0$C40D+%`/MD0D+U!J`?]T)##_
+MM"1@`@``Z/S___^_`````(/$((!\)"``#X;A````C58(B50D$(GV@^P$:@B-
+MAIP```!0B?D/ML'!X`2-5"0LC1P0C4-L4.C\____@\00A,`/A)D```"-4V"*
+M0@B#X`^(AK(```!FBTXT@>'?_?__B<B#R!!FB48TBD((P.@$/`EU"8G(@\@P
+M9HE&-(GY#[;!P>`$BH0$B````,#H!#P*=09F@4XT``*+A"1``@``@\`HBU`$
+MBTPD$(E(!(E&"(E1!(D*BD8DJ`)T-8/@_8A&)(-^'`!T*8/L!/]V'/^U)`4`
+M`&H&Z/S___^#Q!#K$9!'B?@X1"0@#X<K____ZPV0B?HX5"0@#X<+`0``@^P$
+M5FH&_W0D).C\____@\00@'Y+`'0>@^P,5>C\____QP0D`0```.C\____@\00
+M@'Y+`'7B@[[@`````'0=@^P$:@$/MH;5````4/^VX````.C\____@\00B?:#
+M?BP`=!:#[`1J`0^V1DE0_W8LZ/S___^#Q!"0@WX<`'1EBT8<QT!@`````/9&
+M)`1U)?Z%5PP``(/L#%7H_/___X/$#&H!BT8<#[9``5!5Z/S___^#Q!"#[`3_
+M=AS_M20%``!J!NC\____@\0,_W8<_[4D!0``:@'H_/___\=&'`````"#Q!"+
+M5@2+!HE0!(D"BTPD&/Y)"HN$)$`"``#^2#"#[`A65>C\____@\00_DPD%XM4
+M)`R+C"1``@``.5$H=`N`?"07``^%JOW__X'$+`(``%M>7UW#C78`55=64X'L
+M*`(``(N\)$`"``"+A"0\`@``BP")1"08QD0D%P"-7"0<4P^VM"1,`@``5FH!
+M_[0D2`(``%?H_/___X/$'%97_[0D1`(``.C\____BX0D2`(``(M0*(UJ^(/$
+M$(N$)#@"``"#P"@YPG0KB<*-=@"`?2$-=`:`?2$B=1#&1"0+`<9%(@7&12,$
+MZPN0BT4(C6CX.=!UVL9$)`H`@'PD$``/ANP!``"+G"0X`@``@\,HBY0D.`(`
+M`(M"*(UP^#G8=#4/MD0D"HG'P><$D(/L!&H(C80\A````%"-AIP```!0Z/S_
+M__^#Q!"$P'4*BT8(C7#X.=AUUHU&"#G8#X5_`0``QD0D"P"#[`S_="08Z/S_
+M__^)QH/$$(7`#X2(`0``BX0D,`(``/Y`"L9&(@7&AK``````QD8C!&;'AI``
+M`````,:&D@````#'1D````4`QT9$``````^V1"0*P>`$C40$<(I0!(A6((I0
+M!8A6(8N4)#`"``")5BB*4`B#X@^(EK(```!FBTXT@>'?_?__B<J#RA!FB58T
+MBD`(P.@$/`EU"8G(@\@P9HE&-`^V1"0*P>`$BD0$>,#H!#P*=09F@4XT``*+
+MA"0X`@``B48L#[9$)`K!X`2-5"00`="*4&:(5DF+4&R)EIP```"+0'")AJ``
+M``")EI0```")AI@```"+A"0X`@``_D`PBX0D,`(``(/`.(M0!(EP!(D&B58$
+MB3*-1@B+4P2)0P2)7@B)4`2)`@^V1B"H`G0GJ`1T(Z@!=!]6#[9&25#_M"1`
+M`@``_[0D/`(``.C\____@\00ZR&0#[9&(*@"=!BH!'04J`%U$(/L"%;_="08
+MZ/S___^#Q!#^1"0*BE0D"CA4)!`/AQ[^__^`?"0+`'0.@^P(:@I5Z/S___^#
+MQ!"!Q!P"``!;7E]=PXGV55=64X'L+`(``(N$)$`"``"+`(E$)`R+C"1``@``
+MBDD<B$PD'XN$)$`"``"#P"R)PHNT)$`"```Y1BP/A'H#``"$R0^$<@,``(E$
+M)!B#[`Q2Z/S___^-:.#'!"0`````:@!J`/^T)%@"``#_M"1@`@``Z/S___^(
+M1"0]QD0D/@"#Q"`X1"0>#X/R`0``C78`@^P,:@`/MGPD+E=J`?^T)%@"``#_
+MM"1@`@``Z/S___\/ML#!X`2#P&2#Q"`]``(```^'>0$``(/L#(U<)"Q35VH!
+M_[0D6`(``/^T)&`"``#H_/___X/$'&H(58V$)(@```!0Z/S___^#Q!"$P`^$
+M/0$``(U5((N$)$`"``"#P"R+2`2)4`2)12")2@2)$8I$)"*(13&#[`B-1"1\
+M4/^T)$P"``#H_/___X/$$#S_="`/ML"-!$"-!,")PL'B!2G"BTPD#(N!D`4`
+M`(T4D(E5#(!\)!X`=$\/MD,#T>B#X`'!X`2*536#XN\)PHA5-0^V0P/!Z`.#
+MX`'!X`6#XM\)PHA5-0^V0P/!Z`*#X`'!X`.#XO<)PHA5-8I#!HB%BP```.F>
+M````BD,"B$4QB[0D0`(``(EU"(I#!HB%BP````^W0P2)13AFBT-09HF%B```
+M`(I#4HB%B@```(M#0(E%>(M#1(E%?(M#2(F%@````(M#3(F%A````(M#$(E%
+M2(M#%(E%3(M#&(E%4(M#'(E%5(U]6(U#(/RY!@```(G&\Z6+0SB)17"+0SR)
+M173K%HGV_D0D'HI$)!TX1"0>#X(^_O__ZRL/MD0D'E!5_[0D3`(``/^T)$P"
+M``#H_/___X/$$(I,)!TX3"0>#X(=`0``C44HB<(Y12@/A/4```")QY"#[`Q2
+MZ/S___^-6/B#Q`Q3:@;_M"1,`@``Z/S___^#Q!"`>TL`="*0@^P,_W0D&.C\
+M____QP0D`0```.C\____@\00@'M+`'7?@WL<`'1QBT,<QT!@`````/9#)`1U
+M*8MT)`S^AE<,``"#[`Q6Z/S___^#Q`QJ`8M#'`^V0`%05NC\____@\00@^P$
+M_W,<BT0D%/^P)`4``&H!Z/S___^#Q`S_<QR+3"04_[$D!0``:@;H_/___\=#
+M'`````"#Q!"+4P2+`XE0!(D"B[0D0`(``/Y."OY-,(/L"%/_="08Z/S___^#
+MQ!")^CE]*`^%#O___XN$)$`"``#^2!R#[`A5_W0D&.C\____@\00_DPD'XM4
+M)!B+C"1``@``.5$L=`N`?"0?``^%DOS__X'$+`(``%M>7UW#B?955U93@>PD
+M`@``BZPD/`(``(M%`(E$)!3_M"0X`@``5>C\____QP0D`````&H`:@!5_[0D
+M3`(``.C\____B$0D*L9$)"L`@\0@.$0D"P^#,P,``)"#[`QJ``^V?"0;5VH!
+M5?^T)$P"``#H_/___P^VP,'@!(/`9(/$(#T``@``#X?O`@``@^P,C5PD'%-7
+M:@%5_[0D3`(``.C\____@\08C40D=%!5Z/S___^#Q!`\_P^%O@(``(/L#/]T
+M)!CH_/___XG#@\00A<`/A-$"``#^11S&0#``BT0D;(D#BT0D<(E#!(/L"(U$
+M)&Q05>C\____@\00//]T(`^VP(T$0(T$P(G"P>(%*<*+3"0,BX&0!0``C120
+MB5,,BD0D$HA#,0^V1"03T>B#X`'!X`2*4S6#XN\)PHA3-0^V1"03P>@#@^`!
+MP>`%@^+?"<*(4S4/MD0D$\'H`H/@`<'@`X/B]PG"B%,UB6L(BD0D%HB#BP``
+M`(M$)!B)0T"+1"0<B4-$BD0D%XA#,@^W1"04B4,XBT0D8&:)@X@```"*1"1B
+MB(.*````BT0D4(E#>(M$)%2)0WR+1"18B8.`````BT0D7(F#A````(M$)"")
+M0TB+1"0DB4-,BT0D*(E#4(M$)"R)0U2->UB-="00@\8@_+D&````\Z6+1"1(
+MB4-PBT0D3(E#=(U3((U%+(M(!(E0!(E#((E*!(D1OP````"`?"00``^$4`$`
+M`(/L#/]T)!CH_/___XG&@\00A<`/A&,!``#^10K&0"(%QH"P`````,9`(P3'
+M0$````4`QT!$`````&;'@)````````^WU\'B!(U4%'"*0@2(1B"*0@6(1B&)
+M;BB)7BR*0@:(1DF*0@B#X`^(AK(```!FBTXT@>'?_?__B<B#R!!FB48TBD((
+MP.@$/`EU"8G(@\@P9HE&-`^WQ\'@!(I$!'C`Z`0\"G4&9H%.-``"#[?'P>`$
+MC50D$`'0BU!LB9:<````BT!PB8:@````B9:4````B8:8````_D,PC44XBU`$
+MB7`$B0:)5@2),HU6"(U#*(M(!(E0!(E&"(E*!(D1#[9&(*@"=!JH!'06J`%T
+M$E8/MD9)4%-5Z/S___^#Q!#K(`^V1B"H`G08J`1T%*@!=1"#[`A6_W0D&.C\
+M____@\001V8/MD0D$&8Y^`^'L/[___Y$)`N*3"0*.$PD"P^"SOS__X!]"@!U
+M%,9%!?^#[`A5_W0D&.C\____@\00@<0<`@``6UY?7<.055=64X/L&(ML)"R+
+M="0P:@!J`&H`5E7H_/___XA$)"JS`(/$(#I<)`IS(HU\)`N05P^VPU!65>C\
+M____@\00@'PD"_YU?D,Z7"0*<N/^3C2`?C0`=%:+/L9&-`"+5BR-6N"-1BPY
+MPG1;B<*0@WL,`'0,BT,@C5C@.=!U\.M&_D8T@^P(5E7H_/___\<$)``````/
+MMH.+````4%-6_[?$"0``Z/S___^#Q"#K&(/L"%95Z/S___^#Q`A65>C\____
+M@\00D(/$#%M>7UW#5U93BT0D$(L8OPH```"R`(![*P!V.`^V<`F)]@^VRHGP
+MT_BH`70AB<C!X`0!R(N$@UP+```E```#`,'H$(/`"(GY.,AS`HG'0CA3*W?.
+MB?H/ML);7E_#D%=64XM$)!"+&+\(````L@"`>RL`=C@/MG`)B?8/MLJ)\-/X
+MJ`%T(8G(P>`$`<B+A(-<"P``)0```P#!Z!"#P`B)^3C(=@*)QT(X4RMWSHGZ
+M#[;"6UY?PY!55U93@^P<BT0D,(LHQD0D%P"`>`D`#X3T`P``QD0D#P`/MD`)
+MB<*H`741D/Y$)`^)T(I,)`_3^*@!=/`/ME0D#XG0P>`$`="-5(4`BX),"P``
+MJ0```@!T$`T```0`)?___?^)@DP+```/ME0D#XG0P>`$`=#VA(5."P``!`^$
+MN0(``#FM)`4``'4,C;5@#```B70D&.L*BX4D!0``B40D&(/L!`^V3"03B<C!
+MX`0!R(U$A0`/MI!7"P``4@^VD%8+``!2#[:050L``%(/MI!4"P``4@^VD%,+
+M``!2#[:04@L``%(/MI!1"P``4@^V@%`+``!0#[9%*5!1:.0```#H_/___X/$
+M,&;'1"04@``/ME0D#XG0P>`$`="-A(50"P``B40D$`^W1"04BU0D&&8/MH00
+MF`0``&8]_P!T.0^WP(T$0(T$P(G"P>(%*<*+3"08BX&0!0``C1R0BWPD$+D(
+M````_(G>\Z8/E\(/DL`XP@^$=0$``&;_1"049H%\)!2!`':A@^P,5>C\____
+MB<.#Q!"%P`^$=@(```^V5"0/B=#!X`0!T/:$A4T+```$=`2`2S4"#[94)`^)
+MT,'@!`'0]H2%3@L```1T!(!+-1`/ME0D#XG0P>`$`=#VA(5-"P``"'0$@$LU
+M!`^V5"0/B=#!X`0!T/:$A4X+```(=`2`2S4@#[94)`^)T,'@!`'0]H2%30L`
+M``)T!(!+-0$/ME0D#XG0P>`$`=#VA(5."P```G0$@$LU",9#,``/ME0D#XG0
+MP>`$`="-1(4`BY!0"P``B1.+@%0+``")0P2+1"0PB4,(4.C\____B(.+````
+MBU0D-/Y"'+$`@\0$@'TK`'8DBW0D,`^V1@G3^*@!=!`/MD0D%XA,&$#^0S+^
+M1"0703A-*W?<C5,@BT0D,(/`+(M(!(E0!(E#((E*!(D1BT0D,/Y`-(/L#&@`
+M````#[:#BP```%!3_W0D2/^UQ`D``.C\____@\0@Z24!``"#[`P/MD,'4`^V
+M0P90#[9#!5`/MD,$4`^V0P-0#[9#`E`/MD,!4`^V`U!H-`$``.C\____@\0H
+MBU0D.,9"!?]25>C\____@\00Z=<```"-=@`/ME0D#XG0P>`$`="-=(4`]H9.
+M"P``"`^$MP```(/L#%7H_/___XG#@\00A<`/A*$```#&0",&QD`B!6;'@)``
+M`````,9`(`;&0"$`QT!````%`,=`1`````"+EE`+``")D)P```"+AE0+``")
+M@Z````")DY0```")@Y@```"+3"0PB4LH4>C\____B(.R````9H-+-!#_="0T
+MZ/S___^#Q`@\"78&9H%+-``"BW0D,,9&"@&)\(/`.(M0!(E8!(D#B5,$B1J#
+M[`A35>C\____@\00D(/$'%M>7UW#55=64X/L#(MT)""+?"0DL`"%_W0#BD<%
+M#[;`O0````"%P'00/?\````/A$L!``#IC`4``(GJ#[;"BH0P'@4``#S_=!(/
+MMM"-!%+!X`,IT(V\AB@!``!%B>F`^0-VUKT`````D(GJ#[;"BH0P'@4``#S_
+M=#0/MM"-!%+!X`,IT(V\AB@!``#V1P8"=!"#[`AJ`%?H_/___X/$$.L,@^P,
+M5^C\____@\0018GI@/D#=K1F#[9&)F8YAJ0)```/A?X$``"%_P^%F@```(!^
+M.0`/A>P$``#&1CD!NP````"-=@`/M].+C):8`@``A<ET+H-Y<`!T*(M!<,=!
+M<`````#'A):8`@```````(/L!&K_4?]Q>/_0@\00ZS^-=@`/M].#O):8`@``
+M`'0OBX26F`(``(-X=`!T(HM!=,=!=`````#'A):8`@```````(/L#/]Q>/_0
+M@\00B?9#9H/[/W:!Z5P$``#&1P7_@^P(5U;H_/___X/$$.E&!```QD0D"P"0
+M#[9$)`N*A#`>!0``//\/A.P````/MM"-!%+!X`,IT(V\AB@!``"`?P7_#X30
+M````O0````"`?PH`#X:U````C5\X@^P,4^C\____B40D%(/$$(M#!(M4)`2)
+M4P2)&HE"!(D0@'HB_W1_@+JQ`````'1K#[9"(*@"=!ZH!'0:J`%T%E(/MD))
+M4/]R+%?H_/___X/$$.M'B?:+3"0$#[9!(*@"=1BH!'04J`%T$(/L"%%6Z/S_
+M__^#Q!#K(I"+5"0$#[9"(*@"=!6H!'01J`%U#8/L"%)6Z/S___^#Q!"X`0``
+M`.E>`P``D$6)Z3A/"@^'3O___[@!````Z4<#``")]OY$)`N`?"0+`P^&\?[_
+M_\9$)`L`@'XY``^%G@```+L`````D`^WPXN,AI@"``!F#[:4,)@$``"%R71M
+M@WEP`'1G@WE@`'5A9H'Z_P!T,@^WTHN^6`4``(T$TL'@`BG0P>`#]D0X(P1T
+M%X!\."$`=1"#[`1245;H_/___X/$$.LHBU%P#[?#QX2&F`(```````#'07``
+M````@^P$:O]1_W%X_]*#Q!")]D-F@_L_#X9Q____QD8Y`>F$`@``#[9$)`N*
+MA#`>!0``//\/A&`"```/MM"-!%+!X`,IT(V\AB@!``"]`````(!_"@`/AC\"
+M``"-=@"#[`R-7SA3Z/S___^)1"04@\00BT,$BU0D!(E3!(D:B4($B1"`>B+_
+M#X4"`@``9HM*&&:)3"0"#[?!9@^VE#"8!```9HD4)(N<AI@"``"+3"0$BD$D
+MJ`1T8H7;=%Z#>W``=%B#>V``=5*#X/N(023V02,$=!.#[`0/M\)04U;H_/__
+M_X/$$.LSBU-P#[=$)`+'A(:8`@```````,=#<`````"+1"0$QT`<`````(/L
+M!&K_4_]S>/_2@\00BU0D!/9"(P0/A#X!``#&@K``````@&<(Y_9")`$/A/H`
+M``"`8B3^@WH<`'12@'HA`'4M]D(C!'0G@^P$#[=4)`8/MD8IP>`&`<)2_[8D
+M!0``:@?H_/___X/$$.GL````@^P$BTPD"/]Q'/^V)`4``&H!Z/S___^#Q!#I
+MS0```(7;=&.#>W``=%V+1"0$@'@A`'4>]D`C!'08@^P$#[=$)`104U;H_/__
+M_X/$$.F;````BU-P#[=$)`+'A(:8`@```````,=#<`````"+3"0$QT$<````
+M`(/L!&K_4_]S>/_2@\00ZV:+1"0$@'@A`'5<]D`C!'16@^P$#[=4)`8/MD8I
+MP>`&`<)2_[8D!0``:@+H_/___X/$$.LRC78`BU0D!(-Z'`!T)8M"'(-X=`!T
+M'(M0=,=`=`````"#[`R+3"00BT$<_W!X_]*#Q!"+1"0$]D`D`G0?@^P$_W`<
+M_[8D!0``:@;H_/___XM4)!2`8B3]@\00D$6)Z3A/"@^'Q/W___Y$)`N`?"0+
+M`P^&??W__Y"X`0```(/$#%M>7UW#C78`55=64X/L#(M<)"2+:R@/MT,8N@``
+M``"+3"0@@+P(F`0``/\/A)`"```/MD,B@_@/#X3V````@_@/?SF#^`P/A+0`
+M``"#^`Q_$X/X!71/@_@+#X20````Z5@"``"#^`T/A*0```"#^`X/A*P```#I
+M00(``)"#^!E_#X/X&'U6@_@4="WI+`(``(/X&W0T/?\````/A)@```#I%P(`
+M`(/L"&H!4^C\____@\00Z00"``"#[`Q3Z/S___^#Q!#I\P$``(/L"&H`4^C\
+M____@\00Z>`!``"#[`AJ`5/H_/___X/$$.G-`0``@^P,4^C\____@\00Z;P!
+M``"#[`Q3Z/S___^#Q!#IJP$``(/L#%/H_/___X/$$.F:`0``@^P,4^C\____
+M@\00Z8D!``"0QD,B_XE<)`B_`````(!]"@`/AL4```"-=3B)]H/L#%;H_/__
+M_XG#@\00BT8$B5X$B3.)0P2)&(![(O\/A(<```"`>R$`#X6%````@+NQ````
+M`'1H#[9#(*@"=!RH!'08J`%T%%,/MD-)4/]S+%7H_/___X/$$.M$#[9#(*@"
+M=1RH!'08J`%T%(/L"%/_="0LZ/S___^#Q!#K(HGV#[9#(*@"=!BH!'04J`%U
+M$(/L"%/_="0LZ/S___^#Q!"Z`0```.G'````B?;&@[$`````D$>)^#A%"@^'
+M0/___XGY.$T*#X6-````BT0D"(!X(2)T!H!X(0UU&(/L"&H*_W0D%.C\____
+MN@$```"#Q!#K?K\`````@'T*`'9:C74XC78`@^P,5NC\____B<.#Q!"+1@2)
+M7@2),XE#!(D8@'LA(G0&@'LA#74E@^P(4V@Y````Z/S___^#Q`AJ"E/H_/__
+M_[H!````@\00ZR.)]D>)^3A-"G>LQD4%_X/L"%7_="0LZ/S___^#Q!"Z`0``
+M`(G0@\0,6UY?7<.055=64X/L#(M<)"2+:R@/MT,8N@````"+3"0@@+P(F`0`
+M`/\/A&P&```/MD,B@_@)#X13`P``@_@)?SV#^`4/A-P```"#^`5_%X/X`P^$
+M@@```(/X!`^$I````.DP!@``@_@'#X0,`P``@_@'#X_O`@``Z78"``"0@_@6
+M#X2X`@``@_@6?R*#^!0/A"(#``"#^!0/CWL"``"#^`H/A/P"``#IZ@4``(GV
+M@_@:#X0<`@``@_@:?PZ#^!</A(X"``#IS`4``#W_````#X3F`@``Z;P%``"+
+M11B!8"C___[_:@!J`5/_<RCH_/___\<$)`4```#H_/___X/$$.F1!0``:@!J
+M`%/_<RCH_/___\<$)%##``#H_/___X/$$.EP!0``QD0D"P"+?"0@@'\K`'8?
+M#[95"9")T(I,)`O3^*@!=0Y!B$PD"XM\)"`X3RMWY@^V0R"H`G0,J`1T"*@!
+M#X7#````BU48BT(HJ0```0!T#27___[_B4(HZ:D```"^$"<``(I$)`N(1"0*
+M#[;XBTPD((L1@'PD"P-V&P^V1"0+BX3"@`$``*,`````)0```0#K%(UV`(N$
+M^H`!``"C`````"4```$`A<!T)H!\)`H#=A#'A/J``0`````!`.L.C78`QX3Z
+M@`$``````0"%P'45@^P,:.@#``#H_/___X/$$$YUBNL$A?9U'<9#(P+&0R+_
+M@^P(4_]T)"SH_/___X/$$.EK!```]D4&`70]@^P(4U7H_/___X/$$(3`=2R^
+M^@```(UV`(/L"%-5Z/S___^#Q!"$P'43@^P,:.@#``#H_/___X/$$$YUW(!\
+M)`L#=B`/MDPD"XM\)""+%XN$RH`!``"C`````(F$RH`!``#K/@^V="0+BT0D
+M((L(@'PD"P-V#HN$\8`!``"C`````.L7#[9$)`N+?"0@BQ>+A,*``0``HP``
+M``")A/&``0``@^P(4_]S*.B')```QP0D($X``.C\____@\00Z:,#``"#[`@/
+MMT,84&AL`0``Z/S___^#Q`A3_W,HZ.4I``"#Q!#I?0,``(/L"`^W0QA0:$T`
+M``#H_/___X/$"%/_<RCH)RH``(/$$.E7`P``@^P(4_]S*.@;)```@\00Z4,#
+M``"#[`A3_W,HZ.,G``"#Q!#I+P,``(/L"%/_<RCH6R<``(/$$.D;`P``@^P(
+M4_]S*.@O*```@\00Z0<#``"#[`A3_W,HZ(,H``"#Q!#I\P(``(/L"%/_<RCH
+MUR@``(/$$.G?`@``QD,B_P^V0R"H`G0(J`1T!*@!=16#>S``=0]5Z/S___^(
+M@[(```"#Q`3V10@"#X1@`0``BWTH#[97*@^V1Q](.<)]+?Y'*OY'*\9')@!F
+MBT<R@^#^@\@(9HE',H/L"%?_="0LZ/S___^#Q!#I;P(``,9$)`L`@'T*``^&
+MP````(UU.(/L#%;H_/___XG#@\00BT8$B5X$B3.)0P2)&(![(O\/A(````"`
+MN[$`````=&L/MD,@J`)T'Z@$=!NH`7074P^V0TE0_W,L5>C\____@\00ZT>-
+M=@`/MD,@J`)U'*@$=!BH`704@^P(4_]T)"SH_/___X/$$.LBB?8/MD,@J`)T
+M&*@$=!2H`740@^P(4_]T)"SH_/___X/$$+H!````Z;\!``")]L:#L0````#^
+M1"0+BD0D"SA%"@^'0_____9',H!T'_9'+0-T&<9')@"#[`A7_W0D+.C\____
+M@\00Z7L!``#&107_QD<F`&:+1S*#X/.#R`)FB4<R@&<M_H/L"%7_="0LZ/S_
+M__^#Q!#I3`$``,9$)`L`@'T*``^&Q0```(UU.(GV@^P,5NC\____B<.#Q!"+
+M1@2)7@2),XE#!(D8@'LB_P^$B@```(![(0!U?8"[L0````!T:`^V0R"H`G0<
+MJ`1T&*@!=!13#[9#25#_<RQ5Z/S___^#Q!#K1`^V0R"H`G4<J`1T&*@!=!2#
+M[`A3_W0D+.C\____@\00ZR*)]@^V0R"H`G08J`1T%*@!=1"#[`A3_W0D+.C\
+M____@\00N@$```#IEP```(GVQH.Q`````/Y$)`N*3"0+.$T*#X=`____BD0D
+M"SA%"G58QD0D"P"`?0H`=DV-=3B#[`Q6Z/S___^)PX/$$(M&!(E>!(DSB4,$
+MB1B`>R$B=`:`>R$-=1:#[`AJ"E/H_/___[H!````@\00ZRJ0_D0D"XI,)`LX
+M30IWML9%!?^#[`A5_W0D+.C\____@\00C78`N@$```")T(/$#%M>7UW#D%57
+M5E.#[`R+?"0@BW0D)(L7BUY4#[9&)H/X&0^'MP,``/\DA20&``#V1C($=`QF
+MQT8R`0#&1B8!ZSQF@WXR('4,9L=&,@@`QD8F#>LI]D8R@'09]D8M`W039HM&
+M,B1_@\@(9HE&,L9&)@WK"O9&,@AT!,9&)@>#[`A65^C\____@\00Z5`#``"+
+M@@0!``"C`````(/(4(F"!`$``&H!:@)J`5;H_/___X/$$.DH`P``:@%J`&H!
+M5NC\____@\00Z10#``!J`6H!:@%6Z/S___^#Q!#I``,``&H!:F!J`5;H_/__
+M_X/$$.GL`@``@^P,:@$/MD8L4&I@:@%6Z/S___^#Q"#IT`(``(/L#&H!:```
+M`01J(6H!5NC\____@\0@Z;0"``"#[`QJ`6H!:@)J`%;H_/___X/$(.F;`@``
+M@^P,:@%J`&H":@!6Z/S___^#Q"#I@@(``(M#&(%@*/__]_^#[`QJ`6H!:@)J
+M`%;H_/___X/$(.E?`@``@^P,:@%J`&H":@!6Z/S___^#Q"#I1@(``&H!:@)J
+M`%;H_/___X/$$.DR`@``:@%J`&H`5NC\____@\00Z1X"``!J`6H!:@!6Z/S_
+M__^#Q!#I"@(``(M#&(%@*/__]_^#[`QJ`6K_:@%J`%;H_/___X/$(.GG`0``
+M:@%J`&H`5NC\____@\00Z=,!```/MD8KBVR&/(E=*(EU,(I&*XA%2<9%(@/&
+M12$`@$T@!?Y#"HU#.(M0!(EH!(E%`(E5!(DJ@^P,:(`:!@#H_/___\9$)!L`
+M@\00@'\K`'8:#[93"8G0BDPD"]/XJ`%U"D&(3"0+.$\K=^J+4QB+0BBI```(
+M`'0*)?__]_^)0BCK4[N8.@``#[9T)`N0@'PD"P-V&8L'BX3P@`$``*,`````
+MJ0``"`!U+.L7B?:+!XN$\(`!``"C`````*D```@`=1.#[`QHZ`,``.C\____
+M@\002W6X@^P(55?H_/___X/$$.GN````@^P,:$`-`P#H_/___VH`:B!J`5;H
+M_/___X/$%&@0)P``Z/S___^#Q!#IP````&H`:@%J`%;H_/___\<$)!`G``#H
+M_/___X/$$.F@````BT,8@6`H___W_X/L#&H`:O]J`6H`5NC\____@\04:!`G
+M``#H_/___X/$$.MS:@!J`&H`5NC\____QP0D$"<``.C\____@\00ZU9J`&H@
+M:@%6Z/S____'!"00)P``Z/S___^#Q!#K.8/L"%97Z/S___^#Q!#K*H/L"%97
+MZ/S___^#Q!#K&X/L#&H!:/````!HFP```&H!5NC\____@\0@D+@!````@\0,
+M6UY?7<.-=@!55U93@^P<BT0D,(L`B40D&,9$)!,`BU0D,(!Z*P`/AK4"```/
+MMDPD$XG(P>`$`<B+="0PC1R&]H->"P``$`^$@`(``(V34`L``+@!````T^`(
+M0@F+FSP+``")7"04]D((`@^$]````(I<)!-#.%XK#X;F````#[94)!.)T,'@
+M!`'0C02&B40D!(UV``^V\XGPP>`$`?"+5"0PC3R"]H=>"P``$`^$H@```(ML
+M)`3WA4P+``````X`#X2.````@^P$:@B-CU`+``")3"0448V%4`L``(E$)!10
+MZ/S___^#Q!"$P'1G@^P$:@B-AT0+``!0C85$"P``4.C\____@\00A,!T2+@!
+M````B?'3X(MT)`@*1@F(1@F+5"0,B$()@WPD%`!U#(N_/`L``(E\)!3K&P^V
+MTXG0P>`$`="+="04BTPD,(FT@3P+``")]D.+1"0P.%@K#X<R____B?:#?"04
+M``^%M0```(/L#/]T)#SH_/___XE$)"2#Q!"%P`^$5P$```^V5"03B=#!X`0!
+MT(M4)#"-!(*+3"04B8@\"P``C9`X"P``B5$8BH!8"P``B$$&QD$%`(M<)#")
+M&<9!"@#&030`QD$<`(I<)!-#BW0D,#A>*W9B#[94)!.)T,'@!`'0#[:4AED+
+M``"-=@`/MLN)T-/XJ`%T%HG(P>`$`<B+="04BTPD,(FT@3P+``!#BT0D,#A8
+M*W?5ZQZ-=@`/ME0D$XG0P>`$`="+3"04BU0D,(F,@CP+```/MDPD$XG(P>`$
+M`<B+7"0PC82#4`L``(I0"8MT)!2(5@D/ME@)@'PD$P-V$8M$)!C'A,@``@``
+M.````.L4#[9$)!.+5"08QX3"``(``#@```"#[`QH$"<``.C\____@\00@'PD
+M$P-V%0^V1"03BTPD&(F<P00"``#K$XUV``^V1"03BW0D&(F<Q@0"``#^1"03
+MBD0D$XM4)#`X0BL/ATO]__^#Q!Q;7E]=PXUV`%=64XM\)!"*7"04BS>`^P-V
+M$@^VP\>$QC`"```,````ZQ")]@^VP\>$QE`"```,````@^P,:!`G``#H_/__
+M_X/$$(#[`W81#[;#BX3&-`(``*,`````ZP\/ML.+A,94`@``HP````")P8'A
+M```_`,'I$`^VTXG0P>`$`="-E(=0"P``BD((@^#\B$((@_D0=0N#R`*(0@CK
+M%8UV``^VTXG0P>`$`="`C(=8"P```5M>7\.)]E=64X/L((M<)#2+1"0PBSB^
+M`````(UV`(/[`W83C02U``$``(F$WP`"``#K$8UV`(T$M0`!``")A-\``@``
+M@^P,:!`G``#H_/___X/$$(/[`W81BX3?!`(``*,`````ZP^-=@"+A-\$`@``
+MHP````")!+1&@_X&=I^)YORY!P```(M\)#CSI8/$(%M>7\.)]E=64X/L((M<
+M)#2+1"0PBSB^`````(UV`(/[`W83C02U'`$``(F$WP`"``#K$8UV`(T$M1P!
+M``")A-\``@``@^P,:!`G``#H_/___X/$$(/[`W81BX3?!`(``*,`````ZP^-
+M=@"+A-\$`@``HP````")!+1&@_X&=I^)YORY!P```(M\)#CSI8/$(%M>7\.)
+M]HM,)`2*`<#H!(G"@^(']D$"!'0#@,X"]D$#!'0&@<H```(`]D$""'0#@,X(
+M]D$#"'0&@<H```@`]D$"`G0#@,X$]D$#`G0&@<H```0`#[9!%,'@&`G"B=##
+MC78`_W0D!.C\____@\0$PXUV`%575E.#[$2+;"18BD0D7(A$)!>+50")5"00
+M#[;0B=#!X`0!T(U$A0")J#@+``#&@%D+````4E7H_/___X/$$+D`````NB``
+M``"-1"00C78`B`A`2G7Z@^P$C70D%%8/MGPD%U=5Z/S___^)^\'C!`'[C5R=
+M`%;H_/___XF#0`L``(M$)#")@T0+``"+1"0TB8-("P``C9-<"P``@\04@'PD
+M#P-V$HM,)`B+A+G0`0``HP````#K%0^V1"0/BUPD"(N$@]`!``"C`````(D"
+M#[94)`^)T,'@!`'0C8R%8`L``(!\)`\#=A*+7"0(BX33@`$``*,`````ZQ4/
+MMD0D#XM4)`B+A,*``0``HP````")`0^V5"0/B=#!X`0!T(U$A0#V@%X+```0
+M#X1#`0``]H!8"P```G1;N0````"Z(````(U$)!"-=@"("$!*=?J#[`2-?"04
+M5P^V="075E7H_/___XGSP>,$`?.-7)T`5^C\____B8-,"P``BT0D,(F#4`L`
+M`(M$)#2)@U0+``"#Q!3K%P^V5"0/B=#!X`0!T,>$A4P+```!``(`@'PD#P-V
+M%@^V1"0/BTPD",>$P3`"```8````ZQ0/MD0D#XM<)`C'A,-0`@``&````(/L
+M#&@0)P``Z/S___^#Q!"`?"0/`W89#[9$)`^+5"0(BX3"-`(``*,`````B<'K
+M%P^V1"0/BTPD"(N$P50"``"C`````(G!#[94)`^)T,'@!`'0]X2%7`L`````
+M`P!U"('A____W^L&@<D````@@'PD#P-V$@^V1"0/BUPD"(F,PS0"``#K$`^V
+M1"0/BU0D"(F,PE0"``"#Q#Q;7E]=PXUV`(M4)`2+@C@%```E____`#U0`9,`
+M=1**@CL%``#`Z`2Z`0```#P,=`6Z`````(G0PU575E.#[!R+?"0PBS?&1"00
+M4(U<)!#&0P$%QD,"!,9#`S#&0P01QD,%J\9#!@#&0P<`QX=<#````````#F_
+M)`4```^%U````(VO8`P``(/L#&H!:@B-AS@%``!0:````@!7Z/S___^+AS`%
+M``"*ESL%``"-1(+\B(<[!0``@\0@5^C\____@\0$A,!U$XM$)!")AS@%``"+
+M0P2)ASP%``"A`````(J7.P4```'"0*,`````B)<[!0``BH<X!0``B(4X!0``
+MBH<Y!0``B(4Y!0``BH<Z!0``B(4Z!0``BH<[!0``@\`"B(4[!0``BH<\!0``
+MB(4\!0``BH<]!0``B(4]!0``BH<^!0``B(4^!0``BH<_!0``B(4_!0``QX=<
+M#````````(N&``$``*,`````)?__``"H('44@\@@B88``0``BX8``0``HP``
+M``"+!\>`!`$```````"+!\>`&`$```````"+!\>`'`$```````"#[`QH@(0>
+M`.C\____QX9P`0``&`$``(N&=`$``*,`````@.3]QX9P`0``&`$``(#,!(F&
+M=`$``,>&<`$``"@!``#'AG0!``!_?P``QX9P`0``)`$``(N&=`$``*,`````
+M)0``___'AG`!```D`0``#?\_``")AG0!``#'AG`!```\`0``QX9T`0````!Z
+M`,>&<`$``*0!``#'AG0!``!]O^__QX9P`0``N`$``(N&=`$``*,`````#[?`
+MQX9P`0``N`$```T``/H`B89T`0``QX:<````_P```,>&D`(``$0!``#'AI0"
+M```&$``(QX:0`@``M`$``,>&E`(``%]P``#'AI`"```P````BX:4`@``HP``
+M```PY(#,,XF&E`(``,9$)!\`@\00@'\K``^&M@(``(GV@'PD#P-V%0^V1"0/
+MQX3&,`(```@```#K$XUV``^V1"0/QX3&4`(```@```"#[`QH$"<``.C\____
+M@\00@'PD#P-V%0^V1"0/BX3&-`(``*,`````ZQ.)]@^V1"0/BX3&5`(``*,`
+M````@'PD#P-V%`^V5"0/#0``@`")A-8T`@``ZQ*0#[94)`\-``"``(F$UE0"
+M``"#[`2-AS@%``!0#[9<)!=35^C\____@\0(4U?H_/___X/$$(!\)`\#=@W'
+MA-XP`@``1`$``.L0#[9$)`_'A,90`@``1`$``(/L#&@0)P``Z/S___^#Q!"`
+M?"0/`W85#[9$)`_'A,8T`@``!A``".L3C78`#[9$)`_'A,94`@``!A``"(!\
+M)`\#=A4/MD0D#\>$QC`"``"T`0``ZQ.-=@`/MD0D#\>$QE`"``"T`0``@^P,
+M:!`G``#H_/___X/$$(!\)`\#=A4/MD0D#\>$QC0"``!?<```ZQ.-=@`/MD0D
+M#\>$QE0"``!?<```@'PD#P-V%0^V1"0/QX3&,`(```@```#K$XUV``^V1"0/
+MQX3&4`(```@```"#[`QH$"<``.C\____N/]4@`"#Q!"`?"0/`W84#[94)`\E
+M_U0``(F$UC0"``#K$I`/ME0D#R7__W_]B8365`(``(/L!&H!#[9<)!=35^C\
+M____QP0D(*$'`.C\____@\00@'PD#P-V$(N$WH`!``"C`````.L3B?8/MD0D
+M#XN$QH`!``"C`````"7___[_@'PD#P-V#P^V5"0/B836@`$``.L-D`^V5"0/
+MB836@`$``+@%`<@`@'PD#P-V$`^V5"0/B836A`$``.L.B?8/ME0D#XF$UH0!
+M``"#[`QHH(8!`.C\____@\0(#[9$)!=05^C\____@\00_D0D#XI$)`\X1RL/
+MATS]__^#[`Q7Z/S___^+A@0!``"C`````(/(`HF&!`$``(N&``$``*,`````
+M@^#]@\@-B88``0``BX8``0``HP````"+A^0)``")A@@!``"+A^@)``")A@P!
+M``"+AP@*``")AA`!``"+APP*``")AA0!``#'AB`!````````#[>'-`L``"7_
+M#P``#0```0")AB`!``"+AU`*``")AB0!``"+AU0*``")AB@!``"+AW`*``#'
+M`/\/``#'AC0!````````#[>'-@L``"7_#P``#0```0")AC0!``"+AW0*``")
+MAC@!``"+AW@*``")ACP!``#'AD@!````````QX9,`0````$``(N&!`$``*,`
+M````@\A9B88$`0``QX94`0``^_\`#,>&7`$``/__``"#Q"Q;7E]=PXUV`%.#
+M[!2+7"0<4^AB^?__L@"#Q!"0#[;"QX2#L`4```````#'1(-$`````$*`^@]V
+MY&;'@S`+``#_#V;'@S(+``#_#\9#.`&X`0```(/$"%O#BU0D!(M,)`BX````
+M`#G(?1R-=@"`/`(`=`Z`/`(@=`BX`````,.)]D`YR'SGN`$```##D%575E.#
+M[#R+;"149H%]$(4`#X>=````#[=%$(M4)%"`O!"8!```_P^$AP```&:#?1!_
+M=R0/MI00F`0``(M<)%"+BU@%``"-!-+!X`(IT(M$P2B*2`3K7Y!F@7T0@0!W
+M+`^W11"+?"10#[:$.)@$``"+CY`%``"-!$"-!,")PL'B!2G"BT21"(I(!.LJ
+M#[=%$(M4)%`/MH00F`0``(N2=`4``(T$0(T$@(M$PE2*2`3K!8UV`+'_LO]F
+M@7T0A0!W#P^W11"+7"10BI08F`0``(#Y_W0<#[;!BWPD4("\.!X%``#_=`N`
+M^O]T!H!]%`9U-(-]4`!T%H/L"(U%4%#_="1<Z/S___^#Q!"-=@"#[`A5_W0D
+M7.C\____@\00Z0L'``"-=@`/ML&+3"10#[:T"!X%``"-!';!X`,I\(VT@2@!
+M```/MM*-!-+!X`(IT(N16`4``(T<PF:!NY````"K#7<'@'T4`G5'D(-]4`!T
+M%H/L"(U%4%#_="1<Z/S___^#Q!"-=@"#[`A5_W0D7.C\____QD,B_\9#(P*#
+MQ`A3_W0D7.C\____@\00Z7X&```/MD4D@_@:#X2.!0``@_@:?R6#^!)T3(/X
+M$G\-A<`/A#<%``#I'`8``(/X%0^$!`8``.D.!@``@_@E#X2/`@``@_@E?PZ#
+M^!L/A`0%``#I\@4``#V>````#X1P`P``Z>(%``"`?10`#X5"`@``BTTT@'TE
+M`'1B@'LB&0^4P(/`"XA#(H7)=$.`>0&`=3V`>0(`=3>`>0,\=S$/MG$#NA0`
+M``"-0TS&`"!`2G7Y@_X3=@6^%````(U33(U!!(/L!%904NC\____@\009L>#
+MD```````Z6T%``#&0R(8]D$&0'4/#[8!@^`?@_@-#X4\`0``#[8!@^`?@_@-
+M=0;&0R$-ZP3&0R$B@^P(#[9#(5!H8P```.C\____@\00@WU0`'03@^P(C450
+M4/]T)%SH_/___X/$$(/L"%7_="1<Z/S____&1"0_`(/$$(!^"@!V-XUN.(/L
+M#%7H_/___XG#@\00BT4$B5T$B2N)0P2)&(![(2)T!H![(0UU#?Y$)"^*7"0O
+M.%X*=\R*1"0O.$8*#X7K!```9L=$)"P``,=$)"@`````QD0D+P"`?@H`=DZ-
+M;CB#[`Q5Z/S___^)PX/$$(M%!(E=!(DKB4,$B1B`>R$B=`:`>R$-=1>+5"0L
+M9CE3&'(-B5PD*&:+6QAFB5PD+/Y$)"^*3"0O.$X*=[6#?"0H``^$>`0``(M<
+M)"B`>R+_#X1J!```QD,B_X/L"%/_="1<Z/S___^#Q!#I400```^V`8/@'X/X
+M`74-QD,A`<9#(O_I``0``/9!!0%T!,9#(AF#?30`#X3L`P``BWTTB7PD,+D`
+M````NB@```"-0V"("$!*=?JY`````+H(````C8.(````B`A`2G7ZC4-@BW0D
+M,(/&"/RY!@```(G'\Z6+5"0PBT(@B8.(````Z98#``!F_X.0````@^P,:!`G
+M``#H_/___\9#(@6#Q!#I=@,``(M--(E,)#2+13B*0`*#X`^`?10`=7\/ME$'
+M#[9!!L'@"`'"#[9!!<'@$`'"#[9!!,'@&`'"B9.L````#[91`P^V00+!X`@!
+MP@^V00'!X!`!P@^V`<'@&`'"B5-`QT-$`````(.[K`````!U(&;_@Y````"#
+M[`QH$"<``.C\____QD,B"X/$$.GJ`@``QD,B#>GA`@``@'T4('4H/`9T!#P"
+M=2!F_X.0````@^P,:!`G``#H_/___\9#(@6#Q!#ILP(``(-]4`!T$X/L"(U%
+M4%#_="1<Z/S___^#Q!"#[`A5_W0D7.C\____@\0,4U;_="1<Z/S___^#Q!#I
+ML`(``(M%.(I``H/@#XM]-(E\)#2`?10`#X4``0``#[97"P^V1PK!X`@!P@^V
+M1PG!X!`!P@^V1PC!X!@!PHF3K`````^V5P</MD<&P>`(`<(/MD<%P>`0`<(/
+MMD<$P>`8`<*)5"0@B=#!^!^)1"0D#[9'`XG"N``````#1"0@$U0D)(E$)!B)
+M5"0<#[9'`HG"N`````#!X@@#1"08$U0D'(E$)!")5"04#[9'`8G"N`````#!
+MXA`#1"00$U0D%(E$)`B)5"0,#[8'B<*X`````,'B&`-$)`@35"0,B4-`B5-$
+M]D<,`70%9H-+-@2#NZP`````=2!F_X.0````@^P,:!`G``#H_/___\9#(AF#
+MQ!#I9@$``,9#(@WI70$``(!]%"!U*#P&=`0\`G4@9O^#D````(/L#&@0)P``
+MZ/S____&0R(9@\00Z2\!``"#?5``=!.#[`B-15!0_W0D7.C\____@\00@^P(
+M5?]T)%SH_/___X/$#%-6_W0D7.C\____@\00Z2P!``#&0R(4Z>H```"`?10@
+M=3&+13B*0`*#X`\\!G0$/`)U(&;_@Y````"#[`QH$"<``.C\____QD,B%(/$
+M$.FS````QD,B&^FJ````@'T4`'56BU4TB50D,&:+0S1F@TLV`0R&9HE#-(!Z
+M`P!U!8`Z%G<=9O^#D````(/L#&@0)P``Z/S____&0R(-@\00ZV:+3"0P]D$&
+M!'0'9H-+-@+K0&:#8S;]ZSF`?10@=2Z+13B*0`*#X`\\!G0$/`)U(F;_@Y``
+M``"#[`QH$"<``.C\____QD,B!8/$$.L:9H-C-/G&0R(.ZP^`?10`=05F@TLV
+M`\9#(@^#?5``=!.#[`B-15!0_W0D7.C\____@\00@^P(5?]T)%SH_/___X/$
+M"%/_="1<Z/S___^#Q!"-=@"#Q#Q;7E]=PU575E.#[`R+?"0@BUPD)&:!>Q"%
+M``^'B0````^W0Q"`O#B8!```_W1[9H-[$']W(`^VE#B8!```BX]8!0``C032
+MP>`"*="+1,$HBD@$ZU>09H%[$($`=R@/MT,0#[:$.)@$``"+CY`%``"-!$"-
+M!,")PL'B!2G"BT21"(I(!.LF#[=#$`^VA#B8!```BY=T!0``C01`C02`BT3"
+M5(I(!.L%C78`L?^R_V:!>Q"%`'<+#[=#$(J4.)@$``"`^?]T&`^VP8"\.!X%
+M``#_=`N`^O]T!H![%`9U+(-[4`!T$H/L"(U#4%!7Z/S___^#Q!")]H/L"%-7
+MZ/S___^#Q!#I2@(``(GV#[;!#[:T.!X%``"-!';!X`,I\(VTAR@!```/MM*-
+M!-+!X`(IT(N76`4``(TLPHM#-(![%``/A*4```"`>R8&#X2;````@'LF#`^$
+MD0```&:+E9````"-0@%FB860````9H/Z"78D@'TB!G0>QD4C`L9%(O^`923^
+M@^P(55?H_/___X/$$.F^`0``@^P,:.@#``#H_/___P^V12"#Q!"H`G0EJ`1T
+M(:@!=!V#[`QJ`&H"#[9%25#_=2Q6Z/S___^#Q"#I@0$``,9%(@.#[`A55^C\
+M____@\00Z6L!``"-=@"`>R8!=0K&12($Z2D!``"0@'LF`G4)QD4B!>D9`0``
+M@'LF`P^%D````(!](@5U*6:!>`3(-W4A@^P(#[=%&%!HH`$``.C\____@\00
+MQD4B!NGC````C78`@^P(4%7H_/___VHHC45@4.A']?__@\08A,!U.&H4C45,
+M4.@U]?__@\0(A,!U)FH(C86(````4.@@]?__@\0(A,!U$8M%1`M%0'0)QD4B
+M%^F,````QD4B&F;_A9````#K?X![)A=U!L9%(A7K<X![)AAU!L9%(A;K9X![
+M)@1U!L9%(@?K6X![)@5U!L9%(@CK3X![)@9U!L9%(@GK0X![)@QU!L9%(@KK
+M-X![)A9U!L9%(A3K*X![)@YU)8-[4`!T$(/L"(U#4%!7Z/S___^#Q!"#[`A3
+M5^C\____@\00ZS"#>U``=!*#[`B-0U!05^C\____@\00B?:#[`A35^C\____
+M@\0(55?H_/___X/$$)"#Q`Q;7E]=PU575E.#[`R+?"0@BW0D)&:!?A"%``^'
+MB0````^W1A"`O#B8!```_W1[9H-^$']W(`^VE#B8!```BX]8!0``C032P>`"
+M*="+1,$HBD@$ZU>09H%^$($`=R@/MT80#[:$.)@$``"+CY`%``"-!$"-!,")
+MPL'B!2G"BT21"(I(!.LF#[=&$`^VA#B8!```BY=T!0``C01`C02`BT3"5(I(
+M!.L%C78`L?^Z_P```&:!?A"%`'<-#[=&$&8/MI0XF`0``(#Y_W0'9H'Z_P!U
+M+(-^4`!T$H/L"(U&4%!7Z/S___^#Q!")]H/L"%97Z/S___^#Q!#IP@```(GV
+M#[;)#[:<.1X%``"-!%O!X`,IV(V<AR@!```/M]*-!-+!X`(IT(N76`4``(TL
+MPH!^%`!T.(/L"%%HP`$``.C\____@\0(BU4$BT4`B5`$B0+^2PI55^C\____
+MQD,%_X/$"%-7Z/S___^#Q!"0@'XF`74J@^P,:!`G``#H_/___X/$"%97Z/S_
+M__]J`6H`55/H_/___X/$(.LGC78`@^P,:%##``#H_/___X/$"%97Z/S___^#
+MQ`A54^C\____@\00@\0,6UY?7<-64X/L$(MT)""*1"0DB$0D#XI$)"B(1"0.
+MBT0D'(L84^C\____B<*#Q!"%P'4.QH:Q`````<9&(@/K:I#&0"3AQD`E`8!\
+M)`,!&<#WT(/``HA")K`/@'PD`@!U#+``@WXP`'0$BD9)D(A")V:+1AAFB4(0
+MB5H8QT(@`````,="-`````"X`````(!\)`(`=06XR!L!`(E";(/L"%)3Z/S_
+M__^#Q!"#Q`1;7L.055=64X/L&(ML)#"+1"0LBSA7Z/S___^)PX/$$(7`=0S&
+MA;$````!Z:$```"#[`Q7Z/S___^)QH/$$(7`=1;&A;$````!@^P(4U?H_/__
+M_X/$$.MYC5,\B50D",9#).'&0R4!QD,F`V:+11AFB4,0BU0D((L"B4,8QT,@
+M``(``(M&"(E#-+D`````N@`"``"0B`A`2G7ZB7-0QT-LR!L!`(/L"&H`_W0D
+M%.C\_____W,@_W80_W8,_W0D).C\____@\084U?H_/___X/$$(/$#%M>7UW#
+MC78`5U93BUPD$(M,)!2+?"08O@`````Y_G,5BA.*0P&(`8A1`8/!`H/#`D8Y
+M_G+K6UY?PXUV`%575E.#[`R+7"0@BVPD)(EL)`AF@WT``'D2#[=%`"4`'P``
+MP?@(B$,AC78`C7M,C744_+D%````\Z6+12Z)@X@```"+13*)@XP```"->V"-
+M=3:Q"O.E:@J-0TQ04.AJ____:@2-@X@```!04.A;____:A2-0V!04.A/____
+M9L=#-```9L=#-@``@\0DBT0D"&:#N+(!```!#Y3"P>(#BD,D@^#W"="(0R3V
+MA:<````$=`9FQT,T`0#VA:0````!="-F@TLT`O:%J@````%T!6:#2S8!]H6H
+M`````70'9H%+-``!D/:%I````"!T$V:#2S0$]H6J````('0%9H-+-@+VA:0`
+M``!`=!=F@4LT@`#VA:H```!`=`AF@TLV"(UV`,9#2@+VA9D````!="?V0S0!
+M=`IF@TLT"&:#2S80BH66````@^`?0(A#2CP@=0;&0TH?B?;VA9@````(=`9F
+M@4LT``+VA9@````$=`5F@TLT(/:%F`````)T!6:#2S00]H6H````('00]H6N
+M````('0'9H-+-$")]O9#-`%T%HN%R````(N5S````(E#0(E31.L/B?:+17B)
+M0T#'0T0`````@T-`_X-31/_V16H"=!WVA8`````/=!1F@[V``````AG`@\`$
+MB$,XZP:)]L9#.`+&0SG_]D5^!'0&QD,Y`NL8]D5^`G0&QD,Y`>L,]D5^`70&
+MQD,Y`(GVQD,Z__9%:@1T&+$`#[>%L````-/XJ`%T`XA+.D&`^09VZH/L"&@`
+M`@``5>C\____B8.4````N`$```"#Q!Q;7E]=PY!75E.+?"00BUPD%(LW@^P,
+M5NC\____B<**2SJ#Q!"%P'4*QH.Q`````>M"D,9`).'&0"4!QD`F!(A()V:+
+M0QAFB4(0BP>)0AC'0B``````QT(T`````,=";,@;`0"(2SV#[`A25NC\____
+M@\006UY?PXUV`%=64XM\)!"+7"04BS>#[`Q6Z/S___^)PHI+.(/$$(7`=0K&
+M@[$````!ZT*0QD`DX<9`)0'&0"8%B$@G9HM#&&:)0A"+!XE"&,="(`````#'
+M0C0`````QT)LR!L!`(A+.X/L"%)6Z/S___^#Q!!;7E_#C78`5U93BW0D$(M\
+M)!2+'H/L#%/H_/___XG"@\00A<!U"<:'L0````'K.\9`).'&0"4!QD`F!F:+
+M1QAFB4(0BP:)0AC'0B``````QT(T`````,=";,@;`0"#[`A24^C\____@\00
+M6UY?PY!75E.+="00BWPD%(L>@^P,4^C\____B<*#Q!"%P'4)QH>Q`````>L[
+MQD`DX<9`)0'&0"8,9HM'&&:)0A"+!HE"&,="(`````#'0C0`````QT)LR!L!
+M`(/L"%)3Z/S___^#Q!!;7E_#D%=64XMT)!"+?"04BQZ#[`Q3Z/S___^)PH/$
+M$(7`=0G&A[$````!ZT/&0"3AQD`E`<9`)A;&0"@!9HM'&&:)0A#&0F@/BP:)
+M0AC'0B``````QT(T`````,=";,@;`0"#[`A24^C\____@\006UY?PY!75E.+
+M="00BWPD%(L>@^P,4^C\____B<*#Q!"%P'4)QH>Q`````>L[QD`DX<9`)0'&
+M0"879HM'&&:)0A"+!HE"&,="(`````#'0C0`````QT)LR!L!`(/L"%)3Z/S_
+M__^#Q!!;7E_#D%=64XMT)!"+?"04BQZ#[`Q3Z/S___^)PH/$$(7`=0G&A[$`
+M```!ZSO&0"3AQD`E`<9`)AAFBT<89HE"$(L&B4(8QT(@`````,="-`````#'
+M0FS(&P$`@^P(4E/H_/___X/$$%M>7\.05U93@^P<BWPD+(I<)#"*1"0TB$0D
+M&XI$)#B(1"0:BT=4BS!6Z/S___^)PL9`).'&0"4!QD`F$8/$$+`/A-MU`XI'
+M*XA")XI$)`^(0BAFBT<D9HE"$(ER&,="(`````#'0C0`````N`````"`?"0.
+M`'4%N`````")0FR#[`A25NC\____@\0@6UY?PY!75E.#[!R+?"0LBEPD,(I$
+M)#2(1"0;BDPD/(A,)!J+1U2+,%;H_/___XG"QD`DX<9`)0'&0"82@\00L`^$
+MVW4#BD<KB$(GBD0D#XA"*(M,)"P/ML6(0BF)R,'H$(A"*HG(P>@8B$(KB$HL
+M9HM')&:)0A")<AC'0B``````QT(T`````+@`````@'PD#@!U!;@`````B4)L
+M@^P(4E;H_/___X/$(%M>7\-55U93@^P<BVPD,(M\)#3'1"08`````&:!?Q"%
+M``^'B0````^W1Q"`O"B8!```_W1[9H-_$']W(`^VE"B8!```BXU8!0``C032
+MP>`"*="+1,$HBE`$ZU>09H%_$($`=R@/MT<0#[:$*)@$``"+C9`%``"-!$"-
+M!,")PL'B!2G"BT21"(I0!.LF#[='$`^VA"B8!```BY5T!0``C01`C02`BT3"
+M5(I0!.L%C78`LO^Q_V:!?Q"%`'<+#[='$(J,*)@$```/ML(/MIPH'@4``(T$
+M6\'@`RG8C9R%*`$```^VP8T$0(T$@(N5=`4``(TTPH!_*`)U>P^V1RPE\```
+M`(/X('0%@_@0=6@/ME<LB="#X`^#^`%U(H/L#&H!B=`E\````%!J`FH`5NC\
+M____@\0@Z3X&``"-=@`/MD8KBT2&/(E$)!@/MD<L)?````"#^"`/E,"#P`B+
+M5"08B(*R````BT(P9H%@,O_^Z04&``")]H!_%`!T0HI?%(-_4`!T$8/L"(U'
+M4%!5Z/S___^#Q!"0@^P(5U7H_/___X/$$(#[`@^%S04``(/L"%95Z/S___^#
+MQ!#INP4```^V1B:#^!D/AW\%``#_)(6,!@``#[9&-,'@"`.%!`H``(N`3`@`
+M`*,`````@_@%=P6(1A_K!,9&'P6`>PL`=`W&1B8`QD,+`.D_!0``QD8F`NDV
+M!0``#[9&-,'@"`.%!`H``(N`3`@``*,`````9@^VP&:)1B`/MD8TP>`(`X4$
+M"@``BX!$"```HP````")PL'H"&:)1B(/ML+!X`AF"48@9H%^(D!!=0G&1B89
+MZ=H$``#&1B8#Z=$$```/MD8TP>`(`X4$"@``BX!$"```HP````"(1AT/MD8T
+MP>`(`X4$"@``BX!,"```HP````"H"'0&QD8>#.L<J`1T!L9&'@OK$M'H@^`!
+M@_@!&<#WT(/@"HA&'L9&)@3I;P0```^V1C3!X`@#A00*``"+@$P(``"C````
+M`(/("(A&+,9&)@7I2`0``,9&)@;I/P0```^V1C3!X`@#A00*``"+@$P(``"C
+M`````(!^*P$9P(/@`H/`%(A&)ND3!```BD8K0(A&*SI&'W,)QD8F%NG^`P``
+MQD8K`,9&)A>#[`QH(*$'`.C\____@\00Z>$#``#&1B84Z=@#``#&1B8(Z<\#
+M``#&1B84Z<8#``#&1BX"Z/S___^)1G#&1B85Z;$#```/MD8TP>`(`X4$"@``
+MBX!,"```HP`````/ML")1"04#[9&-,'@"`.%!`H``(N`1`@``*,`````#[;`
+MP>`("40D%.C\____B49TBT0D%(/@#X/X`W4/@'XN`'0)QD8F"NE-`P``BT9T
+M*T9P+4`-`P!X!H!^+@!T%L9&)A6`?BX`#X0L`P``_DXNZ20#```/MD8K@WR&
+M/``/A.\```#&1"03`(!["@!V1HU+.(E,)`R#[`S_="08Z/S___^)1"0H#[9&
+M*X/$$(M4)!@Y5(8\=!Z+3"0,BT$$B5$$B0J)0@2)$/Y$)!.*1"03.$,*=\'^
+M2PJ+5"08@WH<`'1UBT(<QT!@`````/9")`1U*?Z%5PP``(/L#%7H_/___X/$
+M#&H!BTPD((M!'`^V0`%05>C\____@\00@^P$BT0D'/]P'/^U)`4``&H!Z/S_
+M__^#Q`R+5"0<_W(<_[4D!0``:@;H_/___XM,)"C'01P`````@\00#[9&*\=$
+MACP`````@^P(_W0D(%7H_/___X/$$,9&)@GI'0(```^V1C3!X`@#A00*``"+
+M@$P(``"C``````^VT`^V1C3!X`@#A00*``"+@$0(``"C`````,'@"`G"B58X
+M@'XF"G0(]\(```$`=`[&1B8+Z<L!``#^2PKK<L9&)@P/MD8K@WR&/`!T4\9$
+M)`L`@'L*`'98C4,XB40D!(/L#/]T)!#H_/___XE$)"@/MD8K@\00BU0D&#E4
+MACQTN8M,)`2+002)402)"HE"!(D0_D0D"XI$)`LX0PIWP>L0@^P,5>C\____
+MB40D*(/$$(-\)!@`#X1X`0``#[9&*XM4)!B)5(8\BD8OB(*R````Z2\!``#'
+M!"0_0@\`BT,8]D`J"'4J@^P,5>C\____QP0D`0```.C\____@\00_PPD@SPD
+M_W0)BT,8]D`J"'36QD8F">GL````#[9&-,'@"`.%!`H``(N`3`@``*,`````
+M#[;`B40D%`^V1C3!X`@#A00*``"+@$0(``"C``````^VP,'@"`E$)!2+1"04
+M)?\/```]$P$``'0'/2,!``!U,,9&)AB+1"04)?\/```]$P$``'4&QD8O".MZ
+MBT0D%"7_#P``/2,!``!U:L9&+PGK9`^V5BH/MD8?2#G"?0S^1BK^1BO&1B8'
+MZTO&1B8`9HM&,H/@]X/(`F:)1C*#?U``=!"#[`B-1U!05>C\____@\00@^P(
+M5U7H_/___\9#!?^#Q`A35>C\____@\00ZS7&1B8#B?:#?U``=!*#[`B-1U!0
+M5>C\____@\00B?:#[`A75>C\____@\0(5E7H_/___X/$$(/$'%M>7UW#D%57
+M5E.#[!R+?"0PBVPD-,=$)!@`````QD0D$P!F@7T0A0`/AX@````/MT40@+PX
+MF`0``/]T>F:#?1!_=Q\/MI0XF`0``(N/6`4``(T$TL'@`BG0BT3!*(I(!.M6
+M9H%]$($`=R@/MT40#[:$.)@$``"+CY`%``"-!$"-!,")PL'B!2G"BT21"(I(
+M!.LF#[=%$`^VA#B8!```BY=T!0``C01`C02`BT3"5(I(!.L%C78`L?^S_V:!
+M?1"%`'<+#[=%$(J<.)@$```/ML.-!$"-!("+EW0%``"-!,*)1"04#[;1#[:T
+M.AX%``"-!';!X`,I\(VTAR@!``"`^?]T&("\.AX%``#_=`Z`^_]T"8!]%`9U
+M+XUV`(-]4`!T$H/L"(U%4%!7Z/S___^#Q!")]H/L"%57Z/S___^#Q!#I%@8`
+M`(GV@'T4`'02@^P(5E?H_/___X/$$.G\!0``BU0D%`^V0B:#Z`V#^`0/A[0%
+M``#_)(7T!@``BTPD%`^V033!X`@#AP0*``"+@$P(``"C``````^VT`^V033!
+MX`@#AP0*``"+@$0(``"C`````,'@"`G"QD0D$@#&1"01`+,`@'D?`'8UC78`
+M#[;+N`$```#3X(7"=!K^1"03BT0D%(-\B#P`=`;^1"01ZP7^1"02D$.+3"04
+M.%D?=\Z`?"02`'0(BT0D%(!(+0&`?"01`'0(BTPD%(!)+0*`?"03`0^%80$`
+M`+,`BT0D%(!X'P!V4@^VR[@!````T^"%PG0C@^P$45=6Z/S___^)1"0H@\00
+MA<!T&8EP*(M4)!2)4##K#9!#BTPD%#A9'W?%ZQ6+1"04B%@K.%@?=@G&0"8.
+MZ:,$``"+5"04.%H?#X66!```@^P$:@$/MD8)4%?H_/___\9$)!L`@\00@'X*
+M``^&EP```(U>.(/L#%/H_/___XE$)"B#Q!"+0P2+3"08B4L$B1F)002)"(-Y
+M'`!T'H/L!/]Q'/^W)`4``&H%Z/S___^+1"0H@$@D`H/$$(/L!/]T)!QJ!E;H
+M_/___X/$$(M4)!B`>DL`="*#[`Q7Z/S____'!"0!````Z/S___^#Q!"+3"08
+M@'E+`'7>_D0D"XI$)`LX1@H/AVS___^#?5``=!"#[`B-15!05^C\____@\00
+M@^P(55?H_/___XM4)"3&0BT`QD8%`(DT).C\____@\00Z=4#``"0BTPD%&:!
+M23*``+,`@'D?`'93#[;+N`$```#3X(7"="2#[`115U;H_/___XE$)"B#Q!"%
+MP'0:B7`HBU0D%(E0,.L.B?9#BTPD%#A9'W?$ZQ6+1"04B%@K.%@?=@G&0"8/
+MZ3L#``"+5"04.%H?#X4N`P``@^P$:@$/MD8)4%?H_/___\9$)!H`@\00@'X*
+M``^&EP```(U>.(/L#%/H_/___XE$)"B#Q!"+0P2+3"08B4L$B1F)002)"(-Y
+M'`!T'H/L!/]Q'/^W)`4``&H%Z/S___^+1"0H@$@D`H/$$(/L!/]T)!QJ!E;H
+M_/___X/$$(M4)!B`>DL`="*#[`Q7Z/S____'!"0!````Z/S___^#Q!"+3"08
+M@'E+`'7>_D0D"HI$)`HX1@H/AVS___^#?5``=!"#[`B-15!05^C\____@\00
+M@^P(55?H_/___XM4)"3&0BT`QD8%`(DT).C\____@\00Z6T"``"0BTPD%`^V
+M033!X`@#AP0*``"+@$P(``"C``````^VT`^V033!X`@#AP0*``"+@$0(``"C
+M`````,'@"`G"]\(```0`=`;V02T!=1+WPO__^_]T%XM$)!3V0"T"=`V+5"04
+MQD(F#^G/`0``BTPD%,9!+0#I]@$``+L_0@\`BT88]D`J"'4G@^P,5^C\____
+MQP0D`0```.C\____@\002X/[_W0)BT88]D`J"'39BT0D%,9`)A#I@`$``(M4
+M)!0/MD(TP>`(`X<$"@``BX!,"```HP`````/ML")1"0,#[9"-,'@"`.'!`H`
+M`(N`1`@``*,`````#[;`P>`("40D#(M$)`R#X`^#^`,/A=<```#V0BT!=`O&
+M0B82ZPW^3@KK<XM,)!3&0282BU0D%`^V0BN#?((\`'1,QD0D"0"`?@H`=E&-
+M7CB#[`Q3Z/S___^)1"0HBTPD)`^V02N#Q!"+5"08.52!/'2TBT,$B5,$B1J)
+M0@2)$/Y$)`F*3"0).$X*=\3K$(/L#%?H_/___XE$)"B#Q!"#?"08``^$T```
+M`(M4)!0/MD(KBTPD&(E,@CR+1"0,)?\/```]$P$``'4)QH&R````".MSBT0D
+M#"7_#P``/2,!``!U8XM$)!C&@+(````)ZU:)]HM4)!3&0B83ZTJ+3"04#[9!
+M-,'@"`.'!`H``(N`3`@``*,`````#[9!-,'@"`.'!`H``(N`1`@``*,`````
+M#[9!+8/@`8/X`1G`]]"#P!.(02:)]H-]4`!T$H/L"(U%4%!7Z/S___^#Q!")
+M]H/L"%57Z/S___^#Q`C_="0<5^C\____@\00B?:#Q!Q;7E]=PXM$)`2+2`2!
+MZ0`"`0`/ME0D#(/B!\'B"(#.(`^V1"0(P>`(`<B)D!S%``!FBX`<Q0``9J,`
+M````#[;`PXM$)`2+2`2!Z0`"`0`/ME0D#(/B!\'B"(I4)!"`SA`/MD0D",'@
+M"`'(B9`<Q0``PU575E.#[`S&1"0+`,9$)`H`O?_____&1"0#`+[`X>0`#[9,
+M)`-!NP$```#3X[$`D`^VP4")P@^OTXGPB=>Z`````/?WB40D!+K_____BWPD
+M(#GX=P2)^BG".>IS#HG5BD0D`XA$)`N(3"0*08#Y#W:__D0D`X!\)`,'=J0/
+MMD0D"L'@`PI$)`L/ML"#Q`Q;7E]=PY!75E.+7"00C;O$"@``:@!J!P^V="0<
+M5E/H'____P^V1P%0:@-64^@1____@\0@6UY?PXGV5E.#[`2+="00BD0D%(A$
+M)`.[`````(GV:@(/MD0D!U!6Z*;^__^#Q`RH"'0'N`````#K&X/L#&H!Z/S_
+M__^#Q!!#@?L/)P``=LZX_P```(/$!%M>PXUV`%.*7"0,:@,/MD0D%%#_="00
+MZ%[^__^#Q`PXV`^4P`^VP%O#D%93@^P$BW0D$(I$)!2(1"0#BD0D&(A$)`(/
+MML!0:@$/MEPD"U-6Z&'^__]J0&H"4U;H5O[__X/$&%-6Z$3___^#Q!"Z_P``
+M`(7`=6F#?"0<`'1!]D0D`@%T'@^V1"0#4&I`5NAT____@\0,NO\```"%P'1!
+MZSJ)]@^V1"0#4&H85NA6____@\0,NO\```"%P'0CZQP/MD0D`U!J*%;H.O__
+M_X/$#+K_````A<!T!XGVN@````")T(/$!%M>PXUV`%=64XM\)!"*7"04#[9T
+M)!B#[`@/ML-05^BG_O__@\00NO____^%P'4V#[;#4(GR#[;"4%?HX_[__X/$
+M#+K_____A<!T&FH!#[;#4%?H/_W__XM4)"B(`KH`````@\0,B=!;7E_#C78`
+M55=64X/L#(M\)""*1"0DB$0D"P^V="0HO0````")\H32#X3-````:F1J`@^V
+MV%-7Z"_]__^#Q`A35^@=_O__@\00A<!U#FH#4U?HV?S__X/$#(GV:@&)\@^V
+MPE`/MD0D$U!7Z'#^__^#Q!"Z_____X3`#X54`0``NP`````[7"0P#XU#`0``
+M#[9T)`N+1"0P2#G8=2MJ0&H"5E?HQ/S__XM$)#P!V%!J6%97Z.C^__^#Q""%
+MP`^%#P$``.LIC78`:D1J`E97Z)G\__^+1"0\`=A0:E!65^B]_O__@\0@A<`/
+MA>0```!%0SM<)#!\GNG7````D&B@A@$`Z);\__\/ML")!"1J`P^V7"034U?H
+M4OS__X/$"%-7Z$#]__^#Q!"%P'0A#[:'Q0H``%!J`U-7Z##\__^Z_____X/$
+M$.F+````C78`#[9<)`M3:F!7Z&+]__^#Q`R%P'4;#[:'Q0H``%!J`U-7Z/K[
+M__^Z_____X/$$.M8NP`````[7"0P?3(/MG0D"VI$:@)65^C5^___BT0D/`'8
+M4&B`````5E?H]OW__X/$((7`=0A%0SM<)#!\TP^VA\4*``!0:@,/MD0D$U!7
+MZ)W[__^#Q!")ZHG0@\0,6UY?7<.)]E93@^P0BUPD'/]T)"C_="0H#[9$)"A0
+M:@!3Z`G^__^)QH/$(&I4:@)J`%/H7/O__XGP@\046U[#5E.#[!"+7"0<_W0D
+M*/]T)"@/MD0D*%!J`5/HT?W__XG&@\0@:E1J`FH!4^@D^___B?"#Q!1;7L-5
+M5U93@^P,BWPD((ML)#"*1"0DB$0D"P^V="0H:F1J`@^VV%-7Z/+Z__^#Q`A3
+M5^C@^___@\00A<!U#6H#4U?HG/K__X/$#)!J`8GR#[;"4`^V1"034%?H-/S_
+M_X/$$+K_____A,!U/^L*NO_____K-HUV`+L`````.>M])0^V="0+B?9J`(M4
+M)#`/M@0:4%97Z/K[__^#Q!"$P'7-0SGK?.*Z`````(G0@\0,6UY?7<.-=@!6
+M4X/L$(M<)!S_="0H_W0D*`^V1"0H4&H`4^@M____B<:#Q"!J5&H":@!3Z#CZ
+M__^)\(/$%%M>PU93@^P0BUPD'/]T)"C_="0H#[9$)"A0:@%3Z/7^__^)QH/$
+M(&I4:@)J`5/H`/K__XGP@\046U[#55=64X/L'(ML)#"+1"0TBU`80HE4)!B*
+M2@*(3"07QD0D%0#'1"00`````+X`````BYTD!0``L8`/MGPD%XUV``^VP68/
+MMI08F`0``&:!^O\`=$V)\$8Y^'5&@/F!=Q\/M\*-!$"-!,")PL'B!2G"BX.0
+M!0``C120B50D$.LBBT0D-,=`+/____^#[`Q0_U`HN`````"#Q!#IJP$``(UV
+M`$&`^85VFHN=)`4``('#8`P``+&`#[9\)!>-=@`/ML%F#[:4&)@$``!F@?K_
+M`'1-B?!&.?AU1H#Y@7<?#[?"C01`C03`B<+!X@4IPHN#D`4``(T4D(E4)!#K
+M(HM4)#3'0BS_____@^P,4O]2*+@`````@\00Z2\!``"-=@!!@/F%=IJ+3"08
+MBE$$#[9I!<'E$`^V00;!X`@)Q0^V00<)Q0^V>0C!YQ`/MD$)P>`("<</MD$*
+M"<>#?"00``^$P0```,9$)!8`BT0D$(!X,``/AJX```")QH/&*`^VTHE4)`R0
+M@^P,5NC\____C5CX@\00BU8$B48$B3")4`2)`H![(0UT!H![(2)U9(M4)!@/
+MMD(#@_@[="*#^#QU4L9$)!4!@^P,_W0D0%57_W0D)%/H_/___X/$(.LUBT0D
+M&(/`"X/L!%50_[/D````Z/S___^#Q`3_="1`55?_="0D4^C\____QD0D-0&#
+MQ""-=@#^1"06BDPD%HM$)!`X2#`/AU____^X`0```(!\)!4`=1N+5"0TQT(L
+M_____X/L#%+_4BBX`````(/$$)"#Q!Q;7E]=PU575E.#[!R+1"0TBW@81XM0
+M$$J)5"08QT0D%`````"+2!R)3"00@'\!`74,QT`L`````.E"`@``@'\!`G5:
+M@'\"`75$BT0D,(.X*`4```!T"HN0*`4``(E4)#"+3"0PBX$D!0``BE<#B)!6
+M#```BE<#B)"V&```BT0D-,=`+`````#I\P$``)"+5"0TQT(L_O___^GB`0``
+M@'\!!'4BBD<#@^@[/`%W&(/L"/]T)#S_="0\Z/C\__^#Q!#IW@$``(!_`0-U
+M>H!_`@%U8@^V5P.+3"0P#[9!)HT,`(G0F??Y.=%^.H/L!`^V1P10#[;:4_]T
+M)#SH_/___X/$#`^V1P104_]T)#SH_/___XM4)$3'0BP`````@\00Z5P!``"+
+M3"0TQT$L_O___^E,`0``BT0D-,=`+/[____I/`$``(GVBU0D,(.Z*`4```!T
+M"HN**`4``(E,)#")^X!_`0`/A*@```"0#[8S0XH#0XC!#[;0]L(!=#^+;"04
+M`?6+1"0T.V@4#X?4````@^P,5HM$)"`#1"0D4%)J`/]T)$SHH_C__X/$(#GP
+M#X6P````B6PD%.M/B?:-+#.)Z"GX@\`".T0D&`^/E````(/L#%93#[;!4&H`
+M_W0D3.BP^O__@\0@A<!U>8GK@'T``'4&@'T!`'0:@^P,:!`G``#H_/___X/$
+M$(![`0`/A5G___\/MC.%]G16:E1J`FH`_W0D/.B']?__@\00BU0D-(M"%"M$
+M)!0YQG8"B<:#[`Q6BT0D(`-$)"10:@!J`/]T)$SH]??__X/$((7`>`8!1"04
+MZPR+3"0TQT$L_____Y!J5&H":@#_="0\Z#'U__^#Q!"+1"0T@W@@`'0)BT`@
+MBTPD%(D(@^P,_W0D0(M$)$3_4"B#Q!"#Q!Q;7E]=PXGV@^P,BT0D$(.X*`4`
+M``!T!HN`*`4``("X5@P```!U&<8%(P````%J(&@@````:@Y0Z/S___^#Q!"#
+MQ`S#@^P,BT0D$(.X*`4```!T!HN`*`4``,8%(P````!J(&@@````:@Y0Z/S_
+M__^#Q!S#@^P0#[9$)!Q0#[9$)!Q0BT0D'/^P)`4``.C\____@\0<PXGV@^P,
+MBT0D$(I4)!2#N"@%````=`:+@"@%``"(%2````!J(&@@````:@Y0Z/S___^#
+MQ!S#D(/L#(M4)!"*3"04@'PD&`!T$K@!````T^!F"8)4#```ZQ")]KC^____
+MT\!F(8)4#```@^P(#[:"5`P``%!2Z/S___^#Q!S#D%=64XMT)!"#OB@%````
+M=`:+MB@%``"_`````&H`:@>)^`^VV%-6Z,GS__]J1&H"4U;HOO/__X/$(&C0
+M````:@!35NBM\___:@!J!%-6Z*+S__^#Q"!'@_\!=L!HH(8!`.B_\___B(;%
+M"@``#[;`4&H#:@!6Z'OS__^#Q!1;7E_#BT0D!(M0!('J``(!`(M$)`B+!`*C
+M`````,.)]HM$)`2+2`2!Z0`"`0"+5"0,BT0D"(D4`<.-=@!3BUPD"(M3!('J
+M``(!`,>"@``!``````"+@@0!`0"C`````(#,`8F"!`$!`&H$:`S"``!3Z/S_
+M__]HN`L``&@(P@``4^C\____:`$`#`!H`,(``%/H_/___X/$)&H$:`S#``!3
+MZ/S___]HN`L``&@(PP``4^C\____:`$`#`!H`,,``%/H_/___X/$)&H`:%#"
+M``!3Z/S___]J`&A0PP``4^C\____@\086\.05E.#[`2+5"00.9(D!0``#Y5$
+M)`.*1"04@^`##[;`C1Q`N`<```"(V=/@]]")QB-R/(ER/(!\)!@`=`RX!```
+M`-/@"?")0CS_<CP/MD0D!\'@"`50P@``4/^R)`4``.C\____@\006U[#C78`
+M55=64X/L#(M\)""+="0DC9\@"P``BX^0!0``C:GL!@T`9H%^$(4`=QP/MT80
+M#[:$.)@$``"-!$"-!,")PL'B!2G"C2R1BU8T@'H!`G4:BT($B0.+0@B)0P2+
+M0@R)0PB+0A")0PR-=@"#?E``=!*#[`C_=E!7Z/S___^#Q!"-=@"#[`A65^C\
+M____QD4T`(/$'%M>7UW#B?955U93@^P8BWPD+(ML)#"+1"0TB40D%(M,)#B)
+M3"00BT<(BS!6Z/S___^)PX/$$(7`='^#[`Q6Z/S___^)P8/$$(7`=&W&1S0!
+MC4,\QD,DX<9#)0'&0R80QD,5NV8/ME<S9HE3$(ES&,=#()````"-40B)4S2)
+M2U#&0@$"QD$(0(GIB$H"BDPD"(A*`XI,)`2(2@3'0VP`````@^P(:@!0Z/S_
+M__^#Q`A35NC\____@\00@\0,6UY?7<.)]E575E.#[!B+7"0LBD0D,(A$)!>*
+M3"0TB$PD%HI$)#B(1"05BT,(BRA5Z/S___^)1"00@\00A<`/A#4!``"#[`Q5
+MZ/S___^)PH/$$(7`#X0?`0``QD,T`8L,)(/!/(E,)`2+-"3&1B3AQD8E`<9&
+M)A#&1A6[9@^V0S-FB480B6X8QT8@D````(U""(E&-(E64(G#N0````"ZD```
+M`(@(0$IU^L9#`8+&`T"*1"0+B$,"BDPD"HA+`XI$)`F(0P0\`G<\#[9$)`F-
+M>PB-E2`+``#\C1R%`````(G9P>D"B=;SI8GRB=B#X`*%P'0$9J6)\HG8@^`!
+MA<!T48G6I.M,BX4@"P``B4,(BX4D"P``B4,,#[9$)`F->Q"-E2@+``#\C1R%
+M^/___XG9P>D"B=;SI8GRB=B#X`*%P'0$9J6)\HG8@^`!A<!T`XG6I(L$),=`
+M;`````"#[`AJ`/]T)!#H_/___X/$"/]T)`A5Z/S___^#Q!"#Q`Q;7E]=PXGV
+M5U93@^P0BW0D((I$)"2*5"0HB%0D#XC"P.H"B%0D#H/@`XG'BT8(BQAJ`FH`
+M:@!6Z/S___^#Q!"`?C0`="")]H/L#%/H_/___\<$)`$```#H_/___X/$$(!^
+M-`!UXHM&"(L0@<(@"P``BD("A,!X/(/(@(A"`FH!:@!J`%;H_/___X/$$(!^
+M-`!T(9"#[`Q3Z/S____'!"0!````Z/S___^#Q!"`?C0`=>*)]FH!#[9$)!)0
+M:@-6Z/S___^#Q!"`?C0`="&-=@"#[`Q3Z/S____'!"0!````Z/S___^#Q!"`
+M?C0`=>*+1@B+&('#(`L``(GZ#[;"N0,````IP8!\)`\`#Y7"#[;2P>(#BP0+
+M@^#G"=")!`MJ`0^V1"024&H#5NC\____@\0@6UY?PY"0D%575E.+5"04BWPD
+M&(ML)!R+7"0@BXI8!0``C;'H%@$`9H%_$(4`=Q</MT<0#[:4$)@$``"-!-+!
+MX`(IT(TTP8V-(`0``,:%(`0``"=F@7\DX0%U)(I')D@\`7<(BE<GZR*-=@!F
+M@7\DX0%U#(I')H/H$;(//`%V"[(`@WXP`'0#BE9)@^(/BD$!@^#P"="(00&R
+M`&:!?R3A`74)BD<F2#P!=@.0L@'!X@>*00&#X'\)T(A!`8I#!HA!`HH#B$$#
+MBD,%B$$'BD,'B$$/BD,"B$$$BD,#B$$%BD,$B$$&BD,!B$$,BD,*B$$(BD,+
+MB$$)BD,,B$$*BD,(B$$+BD,)B$$-6UY?7<.)]E93@^P$BTPD$(M<)!2+42B+
+M,@^V0R2#^"]T98/X+W\H@_@;#X3K````@_@;?PJ#^!)T3>GP````@_@H=$.#
+M^"IT/NGA````D#V*````=#$]B@```'\6@_@U#X2U````/8@```!T&NF]````
+MD#V/````=`T]X0```'1EZ:D```"0]D$T`70'@4MD```$`/9!-A`/A)T```"`
+M>R0H=!>`>R0J=!&`>R2(=`N`>R2*#X6!````D/9""`%U%H/L"`^V0@105NC\
+M____@\00A,!T99"`>Q2!=%Z!2V0```$`ZU6X`````(![)0%U3P^V0R:#^!QW
+M&?\DA0@'``"#2V0(ZS2#2V0!ZRZ#2V0@ZRBX`````.LFD/9!-`%T!X%+9```
+M!`"#2V0!ZPV0N`````#V0V8@=`:0N`$```"#Q`1;7L.0#[9$)`3#B?8/MD0D
+M!<.)]E.+5"0(BUPD$,9"%`*+2CB+1"0,B$$"BT(XQD`'`(M".(A8#%O#B?:+
+M5"0$BTPD"(I"*8A!`HI"*(A!`XI")XA!!(I")HA!"L.-=@"+5"0$BTPD"(I"
+M+8A!`HI"+(A!`XI"*XA!!(I"*HA!"HI"*8A!"XI"*(A!#,.-=@"+3"0,N@``
+M```YRGT2C78`B<@IT(/X`7X!0D(YRGSQPU=64X/L!(M<)!2+="0<#[9\)!@/
+MMD,D@_@J="2#^"I_"X/X*'0:Z=D```"0/8@```!T*3V*````="+IQ0```)"*
+M0RR(1"0#BD,KB$0D`E93Z/S___^#Q`CK&HGVBD,QB$0D`XI#,(A$)`)64^C\
+M____@\0(QD8%0/9#9@%T,HI$)`.(!HI$)`*(1@B-!/T`````B$8!@'LD*'0&
+M@'LDB'4'QD8&8.M=D,9&!F'K5HGV]D-F!'0FBD0D`XA&`8I$)`*(1@F`>R0H
+M=`:`>R2(=0;&1@8EZR[&1@8UZRB*1"0#B$8!BD,F@^`/"$8%@'LD*'0&@'LD
+MB'4&QD8&R.L&QD8&RHGV@\0$6UY?PY!55U93@^PLBVPD1(MU-(GG_+D(````
+MN`````#SJ_:&IP````1T%HN.R````(N>S````(/!_X/3_^L-B?:+1GA(B<&[
+M`````(!])"5U5[\(````B<@/K-@8B`0DB<@/K-@0B$0D`8G(#ZS8"(A$)`*(
+M3"0#]H;5````$'4/QD0D!@+&1"0'`.F-````:@2-ANH```!0C40D#%#H_/__
+M_X/$#.MUD+\@````B=C!Z!B(!"2)V,'H$(A$)`&)V,'H"(A$)`*(7"0#B<@/
+MK-@8B$0D!(G(#ZS8$(A$)`6)R`^LV`B(1"0&B$PD!_:&U0```!!U#L9$)`H"
+MQD0D"P#K&HGV:@2-ANH```!0C40D$%#H_/___X/$#(GVB>"#[`174/]U-.C\
+M____@\0\6UY?7<.0BTPD!(I!)@I!)PI!*`I!*0^VP`^V42R#X@$)T'0.:B1J
+M!5'H_/___X/$#,.+1"0(QD`&[,=!;`````##5E.#[`2+7"00BW0D%`^V0R2#
+M^"]T"CV/````=!_K:9"*0RR(1"0#BD,KB$0D`E93Z/S___^#Q`CK&HGVBD,Q
+MB$0D`XI#,(A$)`)64^C\____@\0(QD8%0/9#9@1T%HI$)`.(1@&*1"0"B$8)
+MQD8&0NL6B?:*1"0#B$8!BD,F@^`/"$8%QD8&0(/$!%M>PXGVBTPD"(M4)`S&
+M0@5`#[9!)(/X-70+/9$```!T(.LFB?:+1"0$#[=`-(/@`8/X`1G`@^#]@^@6
+MB$(&ZQF0QD(&ZNL2B?9J)&H%4>C\____@\0,PXGV]D$E`G0$QD$4`,.0BT0D
+M!/9`*/!T#FHD:@50Z/S___^#Q`R0PXUV`%575E.+;"04BW0D&(M<)"`/MGPD
+M'+@`````N0T```")VHUV`(@"0DEU^@^V5B2#^C4/A(H```"#^C5_)X/Z*'1<
+M@_HH?PZ#^AL/A((```#I=`(``(/Z*G1$@_HO=%3I90(``('ZCP```'1'@?J/
+M````?Q6!^H@```!T(H'ZB@```'0:Z4`"``"!^I$```!T,8'ZX0```'1AZ2L"
+M``!3B?H/ML)05NC\____@\0,Z1T"``!35NC\____@\0(Z0X"``!35E7H_/__
+M_X/$#.G^`0``]D8H`709QD,&<,9#!`#&0P,`QD,"`,9#!4#IWP$``,9#!N#I
+MU@$``+@`````@'XE`0^%S`$```^V1B:#^!P/AZL!``#_)(5\!P``QD,'!.FJ
+M`0``QD,'`.FA`0``QD,&[.F8`0``QD,&[\8#`XI&)X/(0(A#`>F#`0``QD,&
+M[\8#!^EW`0``QD,&0,9#`0'&0P5`Z68!``#&0P;OQ@,#BD8G@\@(B$,!Z5$!
+M``#&0P;OQ@,"Z44!``#&0P;OQ@."Z3D!``#&0P;OQ@,&Z2T!``#&0P;OQ@.&
+MZ2$!``#&0P;CBD8GB$,!Z1(!``#&0P:PQ@/8QD,#3\9#!,+I_@```,9#!K#&
+M`]G&0P-/QD,$PNGJ````QD,&L,8#VL9#`T_&0P3"Z=8````/MT4T@^`!@_@!
+M&<"#X/V#Z!:(0P;IO````,9#!N_&`ZKIL````,9#!N_&`U7II````,9#!B_&
+M0P$!QD,"$.F3````QD,&Y(I&*(@#BD8GB$,%Z7\```"*1B>(0P:*1BB(`XI&
+M*8A#`HI&*HA#`XI&*XA#!(I&+8A#"HI&+(A#`>M4QD,&Z(I&*(@#BD8GB$,%
+MBD8IB$,"BD8JB$,#BD8KB$,$BD8LB$,!ZROV1B@!="7&0P9PQD,$`,9#`P#&
+M0P(`QD,%0.L/N`````#K#9"X`````.L%N`$```!;7E]=PY"0D%=64XM\)!2+
+M1"00BW`$@>X``@$`NP`````Y^W,MC78`BX8`R```HP````"H`74)N`````#K
+M&8GV@^P,:@KH_/___X/$$$,Y^W+6N/____];7E_#D%.+7"0<BT0D"(M(!('I
+M``(!``^V5"00P>((#[9$)!C!X`0)PH!\)!0`=`.#R@2#^_]T$(G8)?__`P")
+M@03(``"#R@*+1"0,B1!;PY"+1"0$BU`$@>H``@$`BT0D"(/(`8F"`,@``,.0
+M5E.#[`2+7"00BW,$@>X``@$`:O]J`6H!BX-<#```#[9``E"-1"004%/H:O__
+M__]T)!A3Z*S___^#Q!AH$"<``%/H_O[__X/$$+K_____A<!U&XN&#,@``*,`
+M````B00DB<*+1"04B!"Z`````(G0@\0$6U[#C78`55=64X/L#(ML)""+?"0L
+M#[9T)"2*1"0HB$0D"KL`````.?MS/8UV`(/L"(U$)!-05>A2____@\00A<!U
+M$XGP(D0D"SI$)`IU![@`````ZQ>#[`QJ"NC\____@\000SG[<L:X_____X/$
+M#%M>7UW#D%.#[`B+7"00:O]J`&H`BX-<#```#[8`4(U$)!104^B-_O___W0D
+M'%/HS_[__X/$&&@0)P``4^@A_O__@\00NO____^%P'49:."3!`!J`FH#4^@Z
+M____@\00@_@!&=+WTHG0@\0(6\.04X/L"(M<)!#_="04:@%J`8N#7`P```^V
+M0`M0C40D%%!3Z"+^____="0<4^AD_O__@\08:!`G``!3Z+;]__^#Q!"Z____
+M_X7`=1J+0P2+D`S&__^)%0````"+1"08B!"Z`````(G0@\0(6\.05E.#[!B+
+M7"0DBW0D*,9$)!?_C40D%U!64^C\____@\00NO____^%P'5ZN@````"`?"03
+M`'1N@^P,4^CM_O__@\00NO____^#^/]T6%9J`&H`BX-<#```#[9`"E"-1"0<
+M4%/H=?W___]T)"13Z+?]__^#Q!AH$"<``%/H"?W__X/$$+K_____A<!U&6C@
+MDP0`:@!J`U/H(O[__X/$$(/X`1G2]]*)T(/$%%M>PU.#[!2+7"0<4^AR_O__
+M@\00NO____^#^/]T6_]T)!1J`&H`BX-<#```#[9`!E"-1"044%/H]_S___]T
+M)!Q3Z#G]__^#Q!AH$"<``%/HB_S__X/$$+K_____A<!U&6C@DP0`:@!J`U/H
+MI/W__X/$$(/X`1G2]]*)T(/$"%O#C78`5E.#[!"+="0<BUX$@>L``@$`5NCH
+M_?__BT0D*(F#",@``/]T)"1J!&H`BX9<#```#[9`!5"-1"0@4%;H</S__X/$
+M*/\T)%;HL/S__V@0)P``5N@%_/__@\00NO____^%P'49:(@3``!J`&H!5N@>
+M_?__@\00@_@!&=+WTHG0@\0$6U[#55=64X/L#(ML)"2+?"0HBW0D++L`````
+M.?-S(X/L!/\T'XU$'0!0_W0D+.A,____@\00@_C_=`R#PP0Y\W+=N`````"#
+MQ`Q;7E]=PU93@^P$BUPD$(I$)!R+<P2![@`"`0`\!'8"L`3_="04#[;`4&H!
+MBX-<#```#[9`!%"-1"004%/HI/O___]T)!A3Z.;[__^#Q!AH$"<``%/H./O_
+M_X/$$+K_____A<!U&XN&#,@``*,`````B00DB<*+1"08B1"Z`````(G0@\0$
+M6U[#D%575E.#[`R+;"0DBW0D*(M$)"P!Z(E$)`2)ZX/C_(GO@^<#=$=J!(U$
+M)`Q04_]T)"SH1O___XU#!(/$$+D$````.T0D!'8(BTPD!"GI`?F)^CG/<Q*-
+M?"0(C78`B@07B`9&0CG*<O6#PP2)]HM\)`2#Y_PY^W,EC6PD")!J!%53_W0D
+M+.CS_O__BT0D&(D&@\8$@\00@\,$.?MRX#M<)`1S-FH$C40D#%!3_W0D+.C)
+M_O__BTPD%"G9N@````"#Q!`YRG,3C5PD"(UV`(H$$X@&1D(YRG+UD+@`````
+M@\0,6UY?7<.-=@!64X/L!(M<)!#'!"0`````BW,$@>X``@$`QH-8#````&H`
+M:@)J`0^V!0@```!0C40D$%!3Z#OZ____="084^A]^O__@\08:!`G``!3Z,_Y
+M__^#Q!"%P'4\BX8,R```HP````")!"0]OT,``'4GQX-(#```OT,``,>#3`P`
+M````(`#'@U`,````$```9K@``.L(C78`N/____^#Q`1;7L.05E.#[`2+7"00
+MQP0D`````(MS!('N``(!`,:#6`P```!J`&H":@$/M@4(````4(U$)!!04^B;
+M^?___W0D&%/HW?G__X/$&&@0)P``4^@O^?__@\00A<!U/(N&#,@``*,`````
+MB00D/1]C``!U)\>#2`P``!]C``#'@TP,``````0`QX-0#``````!`&:X``#K
+M"(UV`+C_____@\0$6U[#D%93@^P$BUPD$,<$)`````"+<P2![@`"`0#&@U@,
+M```!:O]J`FH!#[8%"````%"-1"004%/H^_C___]T)!A3Z#WY__^#Q!AH$"<`
+M`%/HC_C__X/$$(7`=6B+A@S(``"C`````(D$)#T?0P``="L]'T0``'5,QX-(
+M#```'T0``,>#3`P`````!`#'@U`,``````$`9K@``.LMQX-(#```'T,``,>#
+M3`P`````!`#'@U`,``````$`N`````#K"(UV`+C_____@\0$6U[#D%93@^P$
+MBUPD$,<$)`````"+<P2![@`"`0#&@U@,````:@!J`FH!#[8%"````%"-1"00
+M4%/H+_C___]T)!A3Z''X__^#Q!AH$"<``%/HP_?__X/$$(7`=7"+A@S(``"C
+M`````(D$)#WO$0``=`L][Q(``'0LZU*)]L>#2`P``.\1``#'@TP,``````0`
+MQX-0#``````!`+@`````ZS"-=@#'@T@,``#O$@``QX-,#``````$`,>#4`P`
+M`````0"X`````.L(C78`N/____^#Q`1;7L.04X/L%(M<)!Q3Z++]__^#Q!"%
+MP'43QX-<#````````+H`````ZVJ)]H/L#%/H+_[__X/$$(7`=1''@UP,````
+M````N@````#K1X/L#%/HSOS__X/$$(7`=1''@UP,````````N@````#K)H/L
+M#%/HN?[__X/$$+K_____A<!U$<>#7`P```````"Z`````(GVB="#Q`A;PY!7
+M5E.+7"00BWPD'(I$)""+="08N@````"#NUP,````#X33````A,!T.X-\)!3_
+M=1!FBX-(#```9HD&Z;$```"05U;_="0<4^A4^___@\00N@````"%P`^%G```
+M`.F/````C78`@WPD%/]U$8`^#P^4@UD,``"Z`0```.M\N@````"`NUD,````
+M=&Z+1"04N@````#WLU`,``"%TG4[@+M8#````'09@^P(_W0D'%/H_/___X/$
+M$+H`````A<!U.8/L"/]T)!Q3Z`#Y__^#Q!"Z`````(7`=2!75O]T)!Q3Z.SY
+M__^#Q!"Z`````(7`=0BZ`0```(UV`(G06UY?PY"0BT0D!,>`,`4```$```##
+MD+@`````PXGVBU0D!(M,)`BX`````#L5H`4``'TRC112P>(#9HN"X`0``&:)
+M`6:+@N($``!FB4$"BH+H!```B$$(BH+I!```B$$)N`$```##55=64X/L",=$
+M)`0`````D(M$)`3!X`6)PV:#N```````#X2'````O0````"`N!P`````=&J)
+M!"2+5"0$C435`(TTA0P```"-?"0<N00```#\\Z8/E\(/DL`XPG4SOQ````"*
+M1#L-0(A$.PV`?#L,`'0>.D0[#'889@^VP&8/MDP[#+H`````9O?QB%0[#8GV
+M18L<)`^V@QP````YZ'^9_T0D!(-\)`0##XYB____@\0(6UY?7<.)]E575E.#
+M[`S&1"0+`,9$)`H`C78`QD0D"0!J``^V1"0-4`^V1"024`^V1"074.C\____
+MB40D%+\`````@\00.SV@!0``#XU/`0``B?:-!'_!X`,/MY#B!```P>(0#[>`
+MX`0```G".U0D!`^%'0$``,9$)`@`C01_P>`#B00DC2Q_#[94)`B)T<'A!6:#
+MN0``````=7"+'"2+@^`$``")@0````"+@^0$``")@00```"+@^@$``")@0@`
+M```/MH$<````P>(#C00"BEPD"X@<A0T````/MH$<````C00"BEPD"H@<A0X`
+M```/MH$<`````<**1"0)B`25#P```/Z!'````.M[#[9T)`B)\\'C!0^VBQP`
+M``")R+H`````]S3M]`0``(72=$F-%/4`````C00*BDPD"X@,A0T````/MH,<
+M````C00"BDPD"H@,A0X````/MH,<`````<**1"0)B`25#P```/Z#'````.L2
+MC78`_D0D"(!\)`@##X8!____C01__P3%[`0``(UV`$<[/:`%```/C+/^___^
+M1"0)#X1V_O___D0D"H!\)`H?#X9B_O___D0D"X!\)`O_#X5+_O__@\0,6UY?
+M7<.-=@!55U93@^P<QT0D%`````"#/>0`````=0_'!>0````!````Z`W^__^#
+M?"0T`'0'BT0D-,8``,=$)!@`````N@`````[%:`%``!]/XGVBTPD&(T$28T4
+MQ0````"+@NP$```!1"04@WPD-`!T#HM,)#2*`0*"\`0``(@!_T0D&(M$)!@[
+M!:`%``!\PX-\)#@`#X2G````QT0D&`````"+1"08P>`%B<5F@[@```````^$
+MB````+L`````@+@<`````'1KBU0D&,'B`XE4)!")1"0,BT0D$`'8C32%#```
+M`(M\)#BY!````/SSI@^7P@^2P#C"=2F#?"0T`'0,BH4=````BU0D-(@"BT0D
+M&,'@!0^V@!P```")1"04ZQ*)]D.+;"0,#[:%'````#G8?Z3_1"08@WPD&`,/
+MCF'___\/MD0D%(/$'%M>7UW#N,`8``##B?:XG````,.)]K@$````PXGV55=6
+M4X/L#(M\)""+="0HBVPD+(V>8`P``+D`````NL`8``")\(UV`(@(0$IU^HEN
+M$(L5X````(U"`:/@````B%8HBT0D)(E&(,9&*0!FBP=FB4889HM'`F:)1AJ+
+M1P2)1AR):Q"(4RB+1"0DB4,@QD,I`6:+!V:)0QAFBT<"9HE#&HM'!(E#'`^W
+M1AH](B<``']A/2`G```/C<(````]0"$```^$MP```#U`(0``?QL]("$```^$
+MI0```#TB(0``#X2:````Z:D````]1"$```^$B@```#U$(0``#XR3````+1`G
+M``"#^`$/AX4```#K;XUV`#U@)P``=&4]8"<``'\@/4`G``!T5SU`)P``?PD]
+M,"<``'1)ZUL]1"<``'1`ZU(]@B<``'0W/8(G``!_"3V`)P``="GK.SV`D0``
+M=`D]@)0``'09ZRMFQT8D@)'&1B8$9L=#)("1QD,F!.L5D&;'1B2`E,9&)@1F
+MQT,D@)3&0R8$BD<(B$8JBD<(B$,J:```!`!J`&H"5>C\____B09H`"```&H`
+M:@!5Z/S___^)1@B#Q""#/@!T!(7`=0JX`````.GA````BP:-B``"`0")3@2-
+MD````@")%@4`0`(`B0.)2P2+1@B)0PB[`````#L=H`4``'U.BRV@!0``C01;
+MC0S%`````(L'.8'@!```=2^+@?`$``!`B8'P!```@[GL!````'09.X'L!```
+M=A&Z`````/>Q[`0``(F1\`0``$,YZWRXBT8$QX`@@O__`?`#`(M&!,>`*(+_
+M_P$``.B#[`AJ>/]V$.C\____B<(E`'```(/$$#T`(```=A2#[`1J>`^VPE#_
+M=A#H_/___X/$$/]T)"3HD/G__U;H*OG__[@!````@\0(@\0,6UY?7<.)]E.#
+M[!2+7"0<4^C\____@<-@#```B1PDZ/S___^X`0```(/$&%O#B?964X/L$(MT
+M)!R+GB0%``"!PV`,``!6Z/S___^#Q!"`?CD!=0:`>SD!=#N#[`B-GA`!``!3
+M_W84Z/S____'AA`!``#H`P``QX88`0```````(FV'`$``(/$"%/_=A3H_/__
+M_X/$$(/$!%M>PY!64X/L$(M<)!R-LV`,``!3Z/S___^)0Q2)1A2)FR0%``")
+MGB0%``"+@S`%``")AC`%``")'"3H_/___XDT).C\____B1PDZ/S___^#Q!"Z
+M`````(3`#X2%````@^P,5NC\____@\00N@````"$P'1P@^P,4^C\____QP0D
+MT`<``.C\____B1PDZ/S___^)'"3H_/___\>#$`$``.@#``#'@Q@!````````
+MB9L<`0``@\0(C8,0`0``4/]S%.C\____@\0(:@!3Z/S___^#Q`AJ`%;H_/__
+M_[H!````@\00D(G0@\0$6U[#55=64X/L/(M<)%#&1"0(;8U$)`C&0`'_QD`"
+M(\9``Q3&0`0ZQD`%[\9`!A;&0`>2@[LH!0```'0&BYLH!0``N0````"Z(```
+M`(U$)!"-=@"("$!*=?K&1"04`;T`````:B"-="045FH.4^C\____@\00A<!U
+M08/L#&B`&@8`Z/S___]J(%9J#U/H_/___X/$((/X('4AC70D((U$)`BY"```
+M`/R)Q_.F#Y?"#Y+`.,)U!;T!````B>B$P'40@^P,:'<```#H_/___X/$$(GJ
+M#[;"@\0\6UY?7<.)]L.-=@!55U93@^P,BVPD((M<)"2Y`````+IX````B=B0
+MB`A`2G7Z@[TP!0```0^40Q.+12")`X!+$1!FBT489HE#!&:+11IFB4,&BX4P
+M!0``B$-LQD,2(&:!?1H@(70(9H%]&B(A=1S&0Q<"OO@!``"->SS\N0<```#S
+MI6:EI.F$````9HM%&BT0)P``9H/X`7809H%]&D`A=`AF@7T:1"%U3<9#%P1F
+MBT4:+1`G``!F@_@!=Q6^&`(``(U[//RY!P```/.E9J6DZSUF@7T:0"%T"&:!
+M?1I$(74MOC@"``"->SS\N0<```#SI6:EI.L8QD,7"(/L"&@`````C4,\4.C\
+M____@\00BD,7]F,2B$,0A,!U!,9#$("^DP```(U[&/RY!P```/.EI(.]+`4`
+M``!T$HN%+`4``(M`"(E#9)F)4VCK"HM%"(E#9)F)4VC'0V``(```@\0,6UY?
+M7<.-=@"+1"0$QH"7`````,-75E.+="00BWYLBX<D!0``@'@G``^%B@```(M>
+M<(/L"(M68`^V@J,```!0#[:"H@```%`/MH*A````4`^V@J````!0#[:"GP``
+M`%`/MH*>````4`^V@IT```!0#[:"G````%`/MH+7````4`^V!H/@`5`/MD8"
+M4`^V1@%0_W8(:%@"``#H_/___X/$/,=&<`````#_=@A6_W9X_].#Q!#K.(UV
+M`(/L"(U>?%/_=Q3H_/___\=&?/0!``#'AH0```!D:`$`B;:(````@\0(4_]W
+M%.C\____@\006UY?PXUV`%575E.#[`R+;"0D#[=$)"B-%,#!X@(IPHM,)""+
+M@5@%``"-'-"+L20%``"!QF`,``")="0(B5U@B6L<@WLL`'4*@WLP``^$FP,`
+M`+\`````@$T``8M#,(E%:(M#+(E%9+$`BT0D((!X*P!V)8MS*)`/MM&)T,'@
+M!`'0BU0D(#NT@CP+```/A(8"``!!.$HK=]^Q@(M$)""+L"0%```/ML&*A#"8
+M!```//]T*8-[+`!T(@^VP(T$0(T$P(G"P>(%*<*+AI`%``"-%)`[4RP/A#0"
+M``!'08#Y@7;#L8*+5"0@B[(D!0``B?8/ML&*A#"8!```//]T'`^VP(T$0(T$
+M@(N6=`4``(T$PCM#,`^$[`$``$=!@/F%=M"Q@`^VP8MT)`B*A#"8!```//]T
+M*8-[+`!T(@^VP(T$0(T$P(G"P>(%*<*+AI`%``"-%)`[4RP/A)\!``!'08#Y
+M@7:_L8*-=@`/ML&+5"0(BH00F`0``#S_=!P/ML"-!$"-!("+DG0%``"-!,([
+M0S`/A%P!``!'08#YA7;,BT0D((!X.0%U1H-[+`!T%8/L!&H`#[9#25#_<RSH
+M_/___X/$$(.[X``````/A`("``"#[`1J``^V@]4```!0_[/@````Z/S___^#
+MQ!"-=@"#N^``````#X37`0``BU,LB50D!+\`````@'HP`'9%B=:#QBB#[`Q6
+MZ/S___^-2/B#Q!"+5@2)1@2),(E0!(D"@+G7````_W4/@'DA`'4)@[G@````
+M`'4,1XGYBT0D!#A(,'?`B?J+3"0$.%$P#X70````BH/7````B$4"OP````"`
+M>3``#X:Y`0``B<Z#QBB#[`Q6Z/S___^-2/B#Q!"+5@2)1@2),(E0!(D"@WD<
+M`'1"BU$<BD(".H'7````=#2#>G``=2Z#>G0`=2B*@=<```"(0@*#[`0/MT$8
+M4(M$)"C_L"0%``!J!^C\____@\00C78`1XGZBTPD!#A1,'>0Z3\!``")^(A%
+M`>FA_O__B?J(50'IE_[__XGYB$T!Z8W^__^)^(A%`>F#_O__BU0D(`^V0BF-
+M!(&(A9@```#I:OW__XI#28A%`L:#UP```/^_`````(M,)`2`>3``#X;A````
+MB<Z#QBB#[`Q6Z/S___^-2/B#Q!"+5@2)1@2),(E0!(D"@+G7````_W1'QH'7
+M````_X-Y'`!T.HM1'(I"`CI!270O@WIP`'4I@WIT`'4CBD%)B$("@^P$#[=!
+M&%"+1"0H_[`D!0``:@?H_/___X/$$)!'B?J+3"0$.%$P=XCK8HGVBD-)B$4"
+MZUB+="0@#[9&*8T$@8A%`8B%F````.LOL0"+1"0@@'@K`'8CBW,HC78`#[;1
+MB=#!X`0!T(M4)"`[M((\"P``=,%!.$HK=^.+="0@.$XK=03&10'_QD4"`(GV
+MC7T@C7-@_+D*````\Z6-?0R-<TRQ!?.EBX.(````B45(BX.,````B45,9HM#
+M-&:)15AFBT,V9HE%6HM#0(M31(E%4(E55(I#2HA%7/9#)`1U+HM$)""`N%<,
+M````=`_^B%<,``"`N%<,````=1*#[`S_="0LZ/S___^#Q!"-=@"#[`1J`(M#
+M'`^V0`%0_W0D+.C\____#[9#((/$$*@"=`^H!'0+J`%U!X!-``+K!9"`90#]
+MBE,DT.J#X@2*10"#X/L)T(A%`(/L#%7H*/K__X/$'%M>7UW#55=64X/L'(M\
+M)#"+="0TBVPD.+D`````NIP```")Z)"("$!*=?J)=0B#_C]^"8''8`P``(/N
+M0+@`````@[RWF`(````/A6D"``")K+>8`@``B7ULBT0D/(E%<(M$)$")17BX
+M`0```(!_.0$/A4("``!FQT0D&O\`@?Z%````?PYF#[:$/I@$``!FB40D&F:!
+M?"0:_P`/A`@"```/MU0D&HN/6`4``(T$TL'@`BG0C13%`````/9$"B,$#X3C
+M`0``BT0*("4`__\`/0``_P`/A<\!``"-'`KV0R0$#X0V`0``QH.P``````^V
+M0R"H`G0RJ`1T+J@!="K&0R(%QD,C!%,/MD-)4/]S+/]S*.C\____@\00Z8,!
+M``#&@[$````!ZU\/MD,@J`)U=J@$='*H`71NBVLHQD,B`\9#(P3'1"04````
+M`(!]"@!T-HUU.(/L#%;H_/___XG"@\00BT8$B58$B3*)0@2)$(!Z(O]T!#G:
+M=:;_1"04#[9%"CM$)!1_S8"[L0````$/A`X!``"#[`A35^C\____@\00Z?P`
+M```/MD,@J`(/A/````"H!`^$Z````*@!#X7@````BT,HBD`)O@````"`?R8`
+M=B</MNB)\@^VRHGHT_BH`70/@^P$:@!15^C\____@\001HGP.$<F=]S&0R,&
+MQD,B!6;'@Y```````(/L"%-7Z/S___^#Q!#IA0```(M;*(E<)!#&1"0/`(![
+M"@!V8(G:@\(XB50D"(/L#/]T)!3H_/___XG#@\00BU0D"(M"!(E:!(D3B4,$
+MB1B`>R+_=!Z`>R$B=`:`>R$-=1+'A+>8`@```````+@`````ZSO^1"0/BD0D
+M#XM4)!`X0@IWJ8/L!`^W1"0>4%57Z/S___^#Q!"X`0```.L0QX2WF`(`````
+M``"X`````(/$'%M>7UW#D%575E.#[`R+="0@BVPD)(M\)"B+7F"%VW4.@^P,
+M5__5@\00Z0`!``"#?G0`=0:#?G``=!"#[`Q7_]6#Q!#IY@```(GV@+NP````
+M``^%RP```(M3*`^V0@BH$`^%O````*@(#X6T````BQ*)5"0(@'M+`'01@^P$
+M4VH&_W,HZ/S___^#Q!");G2)?G@/MD,@J`)T*:@$="6H`70AQD,B!<9#(P13
+M#[9#25#_<RS_<RCH_/___X/$$.MOC78`#[9#(*@"=22H!'0@J`%T',9#(@/&
+M0R,$@^P(4_]T)!3H_/___X/$$.M"B?8/MD,@J`)T.*@$=#2H`74PQD,B!<9#
+M(P9FQX.0``````"#[`A3_W0D%.C\____@\00ZPV0@^P,5__5@\00C78`@\0,
+M6UY?7<-75E.+5"00BW0D%(M"*(LXBUY(#[9&%(/X('1$@_@@?PN%P'0;@_@&
+M?R[K)(/X(G0O@_@B?!J#P("#^`%W&NL0BT(<QT`$`````,9#7@'K$,9#7@WK
+M"HGVN`````#K,9"#?E``=!*#[`B-1E!05^C\____@\00B?:#[`A65^C\____
+MB1PD_U-HN`$```"#Q!!;7E_#55=64X/L'(M\)#"+;"0TBT=LB40D&(M%)(DX
+M@W]@`'43QD5>`H/L#%7_56B#Q!#IR`0``(M'8/9`)`)T$\9%7@*#[`Q5_U5H
+M@\00Z:P$``"#[`S_="0DZ/S___^)QH/$$(7`=1/&15X"@^P,5?]5:(/$$.F$
+M!```QT!D`````(EH2(M'8(E&&(M'8&:+0!AFB480QD84@`^V15R#^`(/A$4!
+M``"#^`)_"87`=!SIA@(``(/X`P^$K`$``(/X!`^$?P$``.EO`@``BT=@]D`T
+M`0^$D````/9%70)T!L9&)(CK$XI%78/@!#P!&<"#X`6#Z':(1B2+34B+74QF
+MBU509HE4)!;&1B4`B=C!Z!B(1B:)V,'H$(A&)XG8P>@(B$8HB%XIB<@/K-@8
+MB$8JB<@/K-@0B$8KB<@/K-@(B$8LB$XMQD8N`,9&+P!FBT0D%F;!Z`B(1C"*
+M1"06B$8QQD8R`,9&,P#K:_9%70)T!L9&)"CK$XI%78/@!#P!&<"#X`6#P"J(
+M1B2+34B+74QFBU509HE4)!;&1B4`B<@/K-@8B$8FB<@/K-@0B$8GB<@/K-@(
+MB$8HB$XIQD8J`&:+1"069L'H"(A&*XI$)!:(1BS&1BT`BT=@!;0```")1CC&
+M1AP@@TYD`NE8`0``@'U($'<%]@<"=0G&15X&Z><"```/MD5(C58D@^P$4/]U
+M4%+H_/___XM'8`6T````B48XQD8<((%.9```$`#&1A6K@\00]D5=!@^$"0$`
+M`(M%3(E&(.G^````BD5=@^`P/"!U$<9&)!O&1B4!QD8H`.GC````QD8D->G:
+M````BT=@#[9`(*@!=`2H!'4)QD5>!NEE`@``@4YD```@`&:+151F.T5*=#8/
+MMD53@_A"="V#^$)_!X/X0'0CZQ@]L````'0'/>P```!U"F:+151FB45*ZPG&
+M15X&Z1X"``#&1B2P9HM%2(A&)6:+14J(1B9FBT5,B$8G9HM%3HA&*&:+15"(
+M1BF*15*(1BJ*15.(1BMF#[9%28A&+&8/MD5+B$8M9@^V14V(1BYF#[9%3XA&
+M+V8/MD51B$8P]D5=!G0:#[=%5,'@"8E&((-.9`3K"I#&15X&Z:,!``"-?CS'
+M1FPP<@$`BD5=J`8/A'@!``"[`````*@"=`:#3F0(ZP2#3F00@WU@`'0+]D5=
+M`70%BUU@ZRJ#?60`="2#[`1J`(M4)"#_LB0&``!5_U5D@\00A<!T"HM$)!B+
+MF"0&``"%VW0X@^P,5NC\____@\0(:@!7Z/S___^#Q!#_,_]S#/]S"%?H_/__
+M_X/$$(U#!(/#$(,X`'3DZ?(```"#[`S_="0DZ/S___^)1"0@@\00A<!U"<9%
+M7@;IY````(M4)!"+0@B)1C2)5E"Y`````+H``@``D(@(0$IU^O9%700/A(,`
+M``#V1F8@=!:#[`3_=B#_=5C_=C3H_/___X/$$.MG]D9F$'1ABT8TB40D#(-]
+M8`!T"_9%70%U!8M=8.LD@^P$:@&+5"0@_[(D!@``5?]59(/$$(7`=`J+1"08
+MBY@D!@``@^P$_S/_<PC_="08Z/S___^+$P%4)!R#Q!"-0P2#PQ"#.`!TVX/L
+M"&H`5^C\_____W8@BT0D)/]P$/]P#%?H_/___X/$(.L$@TYD`8/L"%;_="0D
+MZ/S___^#Q!#K&(/L"%;_="0DZ/S___^)+"3_56B#Q!")]H/$'%M>7UW#55=6
+M4X/L'(MT)#"+?"0\BD0D1(A$)!O'1"0,_____XGZP>()9HE4)`J+1F")1"0$
+M@WY@`'0)@+Z7`````'0)BT0D#.E0`P``BU0D!(M2*(D4)(MN;&;'AI0````0
+M)X/L#%7H_/___XG#@\00BT0D#(7;#X0@`P``@^P,5>C\____B40D)(/$$(7`
+M=1:#[`A35>C\____BT0D'(/$$.GV`@``BX4D!0``QD`G`8/L!%;_M20%``!J
+M!>C\____BT0D%(!()`*#Q`S_=F!J(?]T)`SH_/___XU3/(E4)""#Q!"`?"0;
+M`'0-QT-D"@```,9#)"CK)\=#9!(```#&0R0J#[=$)`J#[`10_W0D2(M$)"#_
+M<`CH_/___X/$$(M&8/9`-`$/A),```"`?"0;`1G`@^`"@^AXB$,DQD,E`(M4
+M)#B)T,'H&(A#)HM4)#B)T,'H$(A#)XM4)#B)T,'H"(A#*(M4)#B(4RF+1"0T
+MBU0D.`^LT!B(0RJ+1"0TBU0D.`^LT!"(0RN+1"0TBU0D.`^LT`B(0RR*5"0T
+MB%,MQD,N`,9#+P")^&;!Z`B(0S")^(A#,<9#,@#&0S,`ZUZ`?"0;`1G`@^`"
+M@\`HB$,DQD,E`(M$)#2+5"0X#ZS0&(A#)HM$)#2+5"0X#ZS0$(A#)XM$)#2+
+M5"0X#ZS0"(A#*(I4)#2(4RG&0RH`B?AFP>@(B$,KB?B(0RS&0RT`@^P,4^C\
+M____BT9@9HM`&&:)0Q#&0Q2`B7,8BU0D)(M""(E#-`^W1"0:B4,@B5-0QD,<
+M((M&8`6T````B4,XQT-L6&@!`(/$"&H`_W0D'.C\_____W,@BT0D*/]P$/]P
+M#/]T)"SH_/___\:&EP````&#Q!A35>C\____@\00A?8/A*P```"#?F``=&&`
+MOI<`````=%B)]F:!OI0```"6`'49@^P$_W9@:B&+1F#_<"CH_/___X/$$(UV
+M`&;_CI0```"#[`QHT`<``.C\____B2PDZ/S___^#Q!"%]G14@WY@`'0)@+Z7
+M`````'6JA?9T08-^8`!T.V:#OI0`````=#&`>Q0`=2O'1"0,`````(!\)!L`
+M=!P/MT0D"H/L!%"+5"0<_W((_W0D3.C\____@\00@WM0`'00@^P(C4-04%7H
+M_/___X/$$(/L"%-5Z/S___^+A20%``#&0"<`@\0,5O^U)`4``&H&Z/S___^+
+M1"04@&`D_8M$)!R#Q!"-=@"#Q!Q;7E]=PU93@^P,BW0D&(M<)!R(7C</MMM3
+M5NC\____@\0(4X'&8`P``%;H_/___[@!````@\046U[#C78`@^P8_W0D'.C\
+M____#[;`@\0<PY"X`````,.)]E93BTPD#+X`````NH````"+F20%``")]@^W
+MPH"\&)@$``#_=`%&0F:!^H4`=NJ+B20%``"!P6`,``"Z@````)`/M\*`O`B8
+M!```_W0!1D)F@?J%`';JB?!;7L.0BTPD!(I4)`B(T,#H!#P)=@>#P%?K"HGV
+MB-#`Z`2#P#"(`8G0@^`/@_@)?@R(T(/@#X/`5^L*B?:(T(/@#X/`,(A!`<-6
+M4XMT)`R+7"00#[;'4%;HJ/___P^VVU.#Q@)6Z)O___^#Q!!;7L.055=64XM\
+M)!2+;"0<O@````"Y`````+H``0``B>B-=@"("$!*=?JZ@````(N?)`4```^W
+MPF8/MHP8F`0``&:!^?\`#X1L`0``B?!&.T0D&`^%7P$``&:!^H$`#X?0````
+M#[?!C01`C03`B<+!X@4IPHN#D`4``(T<D(-[#`!T;;F`````B[<D!0``#[?!
+M9@^VA#"8!```9CW_`'0>#[?`C01`C03`B<+!X@4IPHN&D`4``(T4D#M3#'0L
+M06:!^8$`=LBR`(![,@!V,+X!````#[;"#[9,&$")\-/@"44@0CA3,G?KZQ2(
+M30+KUY#&10+_BT,(#[9`"8E%(,9%``&*0S&(10&+0TB)102+0TR)10B+0UB)
+M10R+0UR)11"+0V")112+0V2)11B+0W")11SK>(N7)`4```^WP8T$0(T$@,'@
+M`XG#`YIT!0``QD4"_\9%``*+ER0%``"+DG0%``"*1!`?B$4!BT-4#[9`"8E%
+M(,9%!'8/MT,@4(U%!5#H5_[__\9%#&0/MT,B4(U%#5#H1?[__\9%''(/MD,=
+M4(U%'5#H[_W__X/$&+@`````Z9\!``")]D)F@?J%``^&:_[__XN_)`4``(''
+M8`P``+J`````#[?"9@^VC#B8!```9H'Y_P`/A%@!``")\$8[1"08#X5+`0``
+M9H'Z@0`/A\P````/M\&-!$"-!,")PL'B!2G"BX>0!0``C1R0@WL,`'1IN8``
+M```/M\%F#[:$.)@$``!F/?\`=!X/M\"-!$"-!,")PL'B!2G"BX>0!0``C120
+M.U,,="Q!9H'Y@0!VR+(`@'LR`'8RO@$````/ML(/MDP80(GPT^`)12!".%,R
+M=^OK%HA-`NO7C78`QD4"_XM#"`^V0`F)12#&10`!BD,QB$4!BT-(B44$BT-,
+MB44(BT-8B44,BT-<B440BT-@B444BT-DB448BT-PB44<ZVP/M\&-!$"-!(#!
+MX`.)PP.?=`4``,9%`O_&10`"BY=T!0``BD00'XA%`8M#5`^V0`F)12#&101V
+M#[=#(%"-1050Z,?\___&10QD#[=#(E"-10U0Z+7\___&11QR#[9#'5"-11U0
+MZ%_\__^#Q!BX`````.L2D$)F@?J%``^&A?[__[C_____6UY?7<.)]E575E.#
+M[`2+="08BVPD'+L`````N0````"ZI`P``(M$)"")]H@(0$IU^KJ`````B[XD
+M!0``#[?"9@^VC#B8!```9H'Y_P`/A`0#``")V$,YZ`^%^0(``&:!^H$`#X=9
+M`@``#[?!C01`C03`B<+!X@4IPHN'D`4``(TLD(-]#`!T<KF`````B?L/M\%F
+M#[:$&)@$``!F/?\`=!X/M\"-!$"-!,")PL'B!2G"BX.0!0``C120.U4,=#)!
+M9H'Y@0!VR+(`@'TR`'8]NP$````/ML(/MDPH0(G8T^")P8M$)"`)2"!".%4R
+M=^7K&XM4)""(2@+KS8M,)"#&00+_BT4(#[9`"8E!((M$)"#&``&*13&+5"0@
+MB$(!BT5(B4($BT5,B4((BT58B4(,BT5<B4(0BT5@B4(4BT5DB4(8BT5PB4(<
+MQD0D`P"`O9``````#X;T`0``#[9$)`.-!(#!X`.+5"0@C0P0`>B-F)````"*
+M4P2(422*4P6(426+@)@```"*`(/@#XA!)@^V022#^`-T*8/X`W\.@_@"#X3C
+M````Z<H```"#^`1T1X/X$@^$BP```.FW````C78`#[9,)`.-#(G!X0.+A"F8
+M````BE`!@^('#[;2P>((#[9``@'0C02`T>"+5"0@B401*.F2````#[9$)`.-
+M!("-%,4`````BX0JF````(!X`@!U#HM,)"#'1`HH`````.MH#[9$)`.-!(#!
+MX`.+E"B8````#[92`H/J%(M,)"")5`@HZT4/MDPD`XT,B<'A`XN$*9@````/
+MME`"P>((#[9``P'0C02`T>"+5"0@B401*.L7C78`#[9$)`.-!("+3"0@QT3!
+M*``````/MG0D`XTTML'F`XM$)""-?`8LC;0NG````/RY"````/.E_D0D`XI4
+M)`,XE9`````/AYS^___IBP```(N6)`4```^WP8T$0(T$@,'@`XG#`YIT!0``
+MBTPD(,9!`O_&`0*+EB0%``"+DG0%``"*1!`?B$$!BT-4#[9`"8E!(,9!!'8/
+MMT,@4(G(@\`%4.AO^?__BT0D*,9`#&0/MT,B4(M$)"R#P`U0Z%7Y__^+5"0P
+MQD(<<@^V0QU0B="#P!U0Z/GX__^#Q!BX`````.DU`P``0F:!^H4`#X;3_/__
+MB[8D!0``@<9@#```NH`````/M\)F#[:,,)@$``!F@?G_``^$\`(``(G80SGH
+M#X7E`@``9H'Z@0`/AU("```/M\&-!$"-!,")PL'B!2G"BX:0!0``C2R0@WT,
+M`'1PN8`````/M\%F#[:$,)@$``!F/?\`=!X/M\"-!$"-!,")PL'B!2G"BX:0
+M!0``C120.U4,=#)!9H'Y@0!VR+(`@'TR`'8]NP$````/ML(/MDPH0(G8T^")
+MP8M$)"`)2"!".%4R=^7K&XM4)""(2@+KS8M,)"#&00+_BT4(#[9`"8E!((M$
+M)"#&``&*13&+5"0@B$(!BT5(B4($BT5,B4((BT58B4(,BT5<B4(0BT5@B4(4
+MBT5DB4(8BT5PB4(<QD0D`@"`O9``````#X;C`0``#[9$)`*-!(#!X`.+5"0@
+MC0P0`>B-F)````"*4P2(422*4P6(426+@)@```"*`(/@#XA!)@^V022#^`-T
+M)X/X`W\.@_@"#X3A````Z<@```"#^`1T18/X$@^$B0```.FU````D`^V3"0"
+MC0R)P>$#BX0IF````(I0`8/B!P^VTL'B"`^V0`(!T(T$@-'@BU0D((E$$2CI
+MD@````^V1"0"C02`C13%`````(N$*I@```"`>`(`=0Z+3"0@QT0**`````#K
+M:`^V1"0"C02`P>`#BY0HF`````^V4@*#ZA2+3"0@B50(*.M%#[9,)`*-#(G!
+MX0.+A"F8````#[90`L'B"`^V0`,!T(T$@-'@BU0D((E$$2CK%XUV``^V1"0"
+MC02`BTPD(,=$P2@`````#[9T)`*--+;!Y@.+1"0@C7P&+(VT+IP```#\N0@`
+M``#SI?Y$)`**5"0".)60````#X>>_O__ZW\/M\&-!$"-!(#!X`.)PP.>=`4`
+M`(M,)"#&00+_Q@$"BY9T!0``BD00'XA!`8M#5`^V0`F)02#&001V#[=#(%")
+MR(/`!5#H2O;__XM$)"C&0`QD#[=#(E"+1"0L@\`-4.@P]O__BU0D,,9"''(/
+MMD,=4(G0@\`=4.C4]?__@\08N`````#K$XGV0F:!^H4`#X;M_/__N/____^#
+MQ`1;7E]=PXUV`%575E.#[`2+="08NP````"Y`````+JD#```BT0D((GVB`A`
+M2G7ZNH````"+OB0%```/M\)F#[:,.)@$``!F@?G_``^$.`,``(G80SM$)!P/
+MA2L#``!F@?J!``^'?0(```^WP8T$0(T$P(G"P>(%*<*+AY`%``"-+)"#?0P`
+M='*Y@````(G[#[?!9@^VA!B8!```9CW_`'0>#[?`C01`C03`B<+!X@4IPHN#
+MD`4``(T4D#M5#'0R06:!^8$`=LBR`(!],@!V/;L!````#[;"#[9,*$")V-/@
+MB<&+1"0@"4@@0CA5,G?EZQN+5"0@B$H"Z\V+3"0@QD$"_XM%"`^V0`F)02"+
+M1"0@Q@`!BD4QBU0D((A"`8M%2(E"!(M%3(E""(M%6(E"#(M%7(E"$(M%8(E"
+M%(M%9(E"&(M%<(E"'(M,)!R)2B3&1"0#`("]D``````/AAP"```/MD0D`XT$
+M@,'@`XM4)""-#!`!Z(V8D````(I3!(B1J````(I3!8B1J0```(N`F````(H`
+M@^`/B(&J````#[:!J````(/X`W0H@_@#?PZ#^`(/A/$```#IU0```(/X!'1)
+M@_@2#X23````Z<(```")]@^V3"0#C0R)P>$#BX0IF````(I0`8/B!P^VTL'B
+M"`^V0`(!T(T$@-'@BU0D((F$$:P```#IG@````^V1"0#C02`C13%`````(N$
+M*I@```"`>`(`=1&+3"0@QX0*K`````````#K<0^V1"0#C02`P>`#BY0HF```
+M``^V4@*#ZA2+3"0@B90(K````.M+#[9,)`.-#(G!X0.+A"F8````#[90`L'B
+M"`^V0`,!T(T$@-'@BU0D((F$$:P```#K&HUV``^V1"0#C02`BTPD(,>$P:P`
+M````````#[9T)`.--+;!Y@.+1"0@C;P&L````(VT+IP```#\N0@```#SI?Y$
+M)`.*5"0#.)60````#X=__O__Z98```"+EB0%```/M\&-!$"-!(#!X`.)PP.:
+M=`4``(M,)"#&00+_Q@$"BY8D!0``BY)T!0``BD00'XA!`8M#5`^V0`F)02#&
+M001V#[=#(%")R(/`!5#HO?+__XM$)"C&0`QD#[=#(E"+1"0L@\`-4.BC\O__
+MBU0D,,9"''(/MD,=4(G0@\`=4.A'\O__BT0D-(M,)#B)022#Q!BX`````.EP
+M`P``C78`0F:!^H4`#X:?_/__B[8D!0``@<9@#```NH`````/M\)F#[:,,)@$
+M``!F@?G_``^$*`,``(G80SM$)!P/A1L#``!F@?J!``^'?0(```^WP8T$0(T$
+MP(G"P>(%*<*+AI`%``"-+)"#?0P`='"Y@`````^WP68/MH0PF`0``&8]_P!T
+M'@^WP(T$0(T$P(G"P>(%*<*+AI`%``"-%)`[50QT,D%F@?F!`';(L@"`?3(`
+M=CV[`0````^VP@^V3"A`B=C3X(G!BT0D(`E(($(X53)WY>L;BU0D((A*`NO-
+MBTPD(,9!`O^+10@/MD`)B4$@BT0D(,8``8I%,8M4)""(0@&+14B)0@2+14R)
+M0@B+15B)0@R+15R)0A"+16")0A2+162)0AB+17")0AR+3"0<B4HDQD0D`@"`
+MO9``````#X82`@``#[9$)`*-!(#!X`.+5"0@C0P0`>B-F)````"*4P2(D:@`
+M``"*4P6(D:D```"+@)@```"*`(/@#XB!J@````^V@:@```"#^`-T*H/X`W\1
+M@_@"#X3S````Z=<```"-=@"#^`1T2(/X$@^$D@```.G!````D`^V3"0"C0R)
+MP>$#BX0IF````(I0`8/B!P^VTL'B"`^V0`(!T(T$@-'@BU0D((F$$:P```#I
+MG@````^V1"0"C02`C13%`````(N$*I@```"`>`(`=1&+3"0@QX0*K```````
+M``#K<0^V1"0"C02`P>`#BY0HF`````^V4@*#ZA2+3"0@B90(K````.M+#[9,
+M)`*-#(G!X0.+A"F8````#[90`L'B"`^V0`,!T(T$@-'@BU0D((F$$:P```#K
+M&HUV``^V1"0"C02`BTPD(,>$P:P`````````#[9T)`*--+;!Y@.+1"0@C;P&
+ML````(VT+IP```#\N0@```#SI?Y$)`**5"0".)60````#X=]_O__Z8H````/
+MM\&-!$"-!(#!X`.)PP.>=`4``(M,)"#&00+_Q@$"BY9T!0``BD00'XA!`8M#
+M5`^V0`F)02#&001V#[=#(%")R(/`!5#H7>___XM$)"C&0`QD#[=#(E"+1"0L
+M@\`-4.A#[___BU0D,,9"''(/MD,=4(G0@\`=4.CG[O__BT0D-(M,)#B)022#
+MQ!BX`````.L3B?9"9H'ZA0`/AK7\__^X_____X/$!%M>7UW#C78`55=64XMT
+M)!2+?"08BVYLN0````"Z(````(GXB`A`2G7ZBYTD!@``N0````"Z``(``(G8
+MD(@(0$IU^HU3-KD`````BD0Q(8@"0HI$,2"(`D*#P0*#^2=^ZHU3%+D`````
+MBD0Q#8@"0HI$#@R(`D*#P0*#^1-^ZHU3+KD`````BD0Q28@"0HI$,4B(`D*#
+MP0*#^0=^ZHE?&(M&4(M65(/``8/2`(D'B5<$@WY@`'4[]@8!=#:#?F0`=!6%
+M[701BT9D#[9`,X"\*)@$``#_=1N#?F@`=#R%[70XBT9H#[=`)("\*)@$``#_
+M=">+1FQF@7@:$2=U%/8&`74/#[9&`8J``````(A'#.L,BD8!B$<,ZP3&1PS_
+MBD8"B$<-BD9<B$<.QD<2$,9'$1`/M@:#X`'1X(I?"H/C_0G#B%\*#[8&@^`!
+MP>`%BD\(@^'?"<&(3P@/MT98P>@'@^`!P>`&@^&_"<&(3P@/MT98P>@"@^`!
+MBE<)@^+^"<*(5PD/MT9:P>@#@^`!P>`'@^%_"<&(3P@/MT9:T>B#X`'1X(/B
+M_0G"B%<)#[=&6,'H`X/@`<'@!H/BOPG"B%<)#[=&6L'H!(/@`<'@!X/B?PG"
+MB%<)@\D0B$\(B@;0Z(/@`8/C_@G#B%\*B@:#X`2#X_L)PXA?"F;'1Q0`$(J&
+MF````(A''%M>7UW#C78`BT0D#,=`!`````#'``````"X`````,.055=64X/L
+M#(M<)""*1"0DB$0D"\=$)`3_____BW-@BVMLA?9T#X"[EP````!U!O8#`G0-
+MD(M$)`3I_P```(UV`(/L#%7H_/___XG'@\00BT0D!(7_#X3B````QD<DX<9'
+M)0&`?"0+`@^5P(/`&HA')L9'%(!FBT889HE'$(E?&,='(`````#'1S0`````
+MQT=L6&@!`(/L"%=5Z/S____&@Y<````!9L>#E````/H`@\00A=MT78-[8`!T
+M5Y!F@;N4````E@!U&8/L!/]S8&HABT-@_W`HZ/S___^#Q!"-=@!F_XN4````
+M@^P,:-`'``#H_/___XDL).C\____@\00A=MT#X-[8`!T"8"[EP````!UJF:#
+MNY0`````=`Z`?Q0`=0C'1"0$`````(/L"%=5Z/S___^+1"04@\00D(/$#%M>
+M7UW#55=64X/L'(MT)#"*7"0TQT0D%/____^+;F"+1FR)1"00A>UT"8"^EP``
+M``!T"HM$)!3IF00``)"#[`S_="0<Z/S___^)QX/$$(M$)!2%_P^$>P0``/8&
+M`@^%$0$``(#[%'</#[;;C01;C1R%`````.L>9@^VTXG0P>`$`="-!,)FP>@(
+MP.@$#[;8@</P````QD<DX<9')0'&1R8<B%\GQD<4@&:+11AFB4<0B7<8QT<@
+M`````,='-`````#'1VQ8:`$`@^P(5_]T)!SH_/___\:&EP````%FQX:4````
+MQ`F#Q!"%]G1C@WY@`'1=C78`9H&^E````)8`=1F#[`3_=F!J(8M&8/]P*.C\
+M____@\00C78`9O^.E````(/L#&C0!P``Z/S___^#Q`3_="0<Z/S___^#Q!"%
+M]G0/@WY@`'0)@+Z7`````'6F9H.^E``````/A&0#``"`?Q0`#X5:`P``QT0D
+M%`````#I30,``(/L#/]T)!SH_/___XE$)"B#Q!"#?"08``^$+P,``(U7/(E4
+M)`R+1"08BT`(B40D",9')!K&1R4(QD<F&L9')P#&1R@0QD<I`(M$)!B)1U#&
+M1Q2`9HM%&&:)1Q")=QB+1"08BT`(B4<TQT<@$````(M&8`6T````B4<XQD<<
+M(,=';%AH`0"#[`AJ`%+H_/____]W((M$)"S_<!#_<`S_="0HZ/S___^#Q!A7
+M_W0D'.C\____QH:7`````6;'AI0```#Z`(/$$(7V=%V#?F``=%=F@;Z4````
+ME@!U%H/L!/]V8&HABT9@_W`HZ/S___^#Q!!F_XZ4````@^P,:-`'``#H_/__
+M_X/$!/]T)!SH_/___X/$$(7V=`^#?F``=`F`OI<`````=:EF@[Z4`````'0&
+M@'\4`'09@^P(C40D(%#_="0<Z/S___^#Q!#I_0$``(/L"%?_="0<Z/S___^#
+MQ`3_="0<Z/S___^)QX/$$(7`=1V#[`B-1"0@4/]T)!SH_/___XM$)"2#Q!#I
+MT@$``(U`/(E$)`R+3"0(@\$$BU0D"`^V0@.*1!`$B$($QD$!"L9!`@"Z!```
+M`(M$)`C&``!`2G7YA-MU!H!A`_SK3`^VVXT$VXT$@XT$0XT<Q0````"`20,#
+MB=C!Z!B)1"0$B$$$B=K!ZA"(406)V,'H"(D$)(A!!HA9!XI$)`2(00B(40F*
+M%"2(40J(60N+1"08B4=0QD<D%8H!P/@']]"#P!&(1R7&1R8`QD<G`,9'*!#&
+M1RD`@"$_QD<4@&:+11AFB4<0B7<8BT0D&(M`"(E'-,='(!````"+1F`%M```
+M`(E'.,9''"#'1VQ8:`$`@^P(:@#_="08Z/S_____=R"+1"0L_W`0_W`,_W0D
+M*.C\____@\085_]T)!SH_/___\:&EP````%FQX:4````^@"#Q!"%]G1=@WY@
+M`'179H&^E````)8`=1:#[`3_=F!J(8M&8/]P*.C\____@\009O^.E````(/L
+M#&C0!P``Z/S___^#Q`3_="0<Z/S___^#Q!"%]G0/@WY@`'0)@+Z7`````'6I
+M9H.^E`````!T#H!_%`!U",=$)!0`````@^P(C40D(%#_="0<Z/S___^#Q!"0
+M@^P(5_]T)!SH_/___XM$)"2#Q!"#Q!Q;7E]=PU=64XMT)!"X_____XM^;(M>
+M8/9&6`@/A(@```"#[`16_[<D!0``:@7H_/___X!+)`*#Q`Q3:B'_<RCH_/__
+M_X/$$(![2P!T'H/L#&C0!P``Z/S___^)/"3H_/___X/$$(![2P!UXH-\)!0`
+M=`]F@TY:$&:#2S80ZPV-=@!F@V9:[V:#8S;O@^P$5O^W)`4``&H&Z/S___^`
+M8R3]N`````"#Q!"06UY?PU93@^P$BT0D$`^V="04BU!LBUA@]@`!=$N#>RP`
+M=!F#[`2)\@^VPE`/MD-)4/]S+.C\____@\00@[O@`````'0]@^P$B?$/ML%0
+M#[:#U0```%#_L^````#H_/___X/$$.L<B?:#[`2)\0^VP5"+0QP/MD`!4%+H
+M_/___X/$$(/$!%M>PU575E.#[`R+7"0@BD0D)(A$)`N*1"0HB$0D"L=$)`3_
+M____BWM@BVMLA?]T"8"[EP````!T"HM$)`3I)0$``)"#[`Q5Z/S___^)QH/$
+M$(M$)`2%]@^$"@$``,9&).'&1B4!@'PD"P!T#H!\)`H!&<#WT(/`!^L,@'PD
+M"@$9P/?0@\`-B$8FQD84@&:+1QAFB480B5X8QT8@`````,=&-`````#'1FQ8
+M:`$`@^P(5E7H_/___\:#EP````%FQX.4````]`&#Q!"%VW1?@WM@`'19C78`
+M9H&[E````)8`=1F#[`3_<V!J(8M#8/]P*.C\____@\00C78`9O^+E````(/L
+M#&C0!P``Z/S___^)+"3H_/___X/$$(7;=`^#>V``=`F`NY<`````=:IF@[N4
+M`````'0<@'X4`'46BT-@9HM`-F:)0UK'1"0$`````(UV`(/L"%95Z/S___^+
+M1"04@\00C78`@\0,6UY?7<.#[`R+3"00BU0D%`^V`H/X"0^'L0```/\DA20(
+M``")]HM"!,:`5PP```"#[`Q0Z/S___^X`````(/$$.F0````@^P$#[9"!%!J
+M`%'H1/[__X/$$.M[C78`@^P$#[9"!%!J`5'H+/[__X/$$.MCC78`@^P(#[9"
+M!%!1Z/S___^#Q!#K39"#[`0/MD(%4`^V0@104>C1_/__@\00ZS2#[`@/MD($
+M4%'H_/___X/$$.LAD(/L"`^V0@104>C\____N`````"#Q!#K"+C_____C78`
+M@\0,PXM,)`2+06"%P'1*QT`<`````(!()`3'06``````QT%H`````,=!9```
+M``"#>0@_?Q.+46R+00C'A(*8`@```````,.0BU%LBT$(QX2"F`$```````##
+MB?:+3"0$BT%@A<!T2L=`'`````"`8"3[QT%@`````,=!:`````#'060`````
+M@WD(/W\3BU%LBT$(QX2"F`(```````##D(M1;(M!",>$@I@!````````PXGV
+M4X/L%(M<)!Q3Z/S___^+@R0%```%8`P``(D$).C\____@\086\.)]E.#[!2+
+M7"0<4^C\____BX,D!0``!6`,``")!"3H_/___X/$&%O#B?955U93@^P<BWPD
+M,(N')`4```5@#```B00D@S\`=!J+!RT```(`B0>#[`A0_W<0Z/S___^#Q!")
+M]H-_"`!T$H/L"/]W"/]W$.C\____@\00D(-_#`!T$H/L"/]W#/]W$.C\____
+M@\00D(/L"(U$)")0C40D)%"-1"0F4(U$)"A0C40D*E"-1"0M4(U$)#!0C40D
+M,E"-1"0U4(U$)#90C40D.5"-1"0\4(U$)#]0#[=')%#H_/___X/$0(._6`4`
+M``!T-H/L"/^W6`4``(V'0`4``%#H_/___X/$"(M$)`C_L%@%``"+1"0,!4`%
+M``!0Z/S___^#Q!")]H._=`4```!T-X/L"/^W=`4``(V'7`4``%#H_/___X/$
+M"(M$)`C_L'0%``"+1"0,!5P%``!0Z/S___^#Q!"-=@"#OY`%````=#>#[`C_
+MMY`%``"-AW@%``!0Z/S___^#Q`B+1"0(_["0!0``BT0D#`5X!0``4.C\____
+M@\00C78`@[^L!@```'0W@^P(_[>L!@``C8>4!@``4.C\____@\0(BT0D"/^P
+MK`8``(M$)`P%E`8``%#H_/___X/$$(UV`+X`````B?`Z1"0'<T6-K\P&``"0
+M@^P(B?`/MMC_M)_D!@``5>C\____@\0(BT0D"/^TF.0&``"+1"0,!<P&``!0
+MZ/S___^#Q!!&B?`Z1"0'<L*#OTP)````=#6#[`C_MTP)``"-AS0)``!0Z/S_
+M__^#Q`B+1"0(_[!,"0``BT0D#`4T"0``4.C\____@\00D(._=`D```!T-X/L
+M"/^W=`D``(V'7`D``%#H_/___X/$"(M$)`C_L'0)``"+1"0,!5P)``!0Z/S_
+M__^#Q!"-=@"#O\0)````=#>#[`C_M\0)``"-AZP)``!0Z/S___^#Q`B+1"0(
+M_[#$"0``BT0D#`6L"0``4.C\____@\00C78`@[^L!0```'0W@^P(_[>L!0``
+MC8>4!0``4.C\____@\0(BT0D"/^PK`4``(M$)`P%E`4``%#H_/___X/$$(UV
+M`(._6`8```!T-X/L"/^W6`8``(V'0`8``%#H_/___X/$"(M$)`C_L%@&``"+
+M1"0,!4`&``!0Z/S___^#Q!"-=@"#OP@&````=#>#[`C_MP@&``"-A_`%``!0
+MZ/S___^#Q`B+1"0(_[`(!@``BT0D#`7P!0``4.C\____@\00C78`@[\D!@``
+M`'0W@^P(_[<D!@``C8<,!@``4.C\____@\0(BT0D"/^P)`8``(M$)`P%#`8`
+M`%#H_/___X/$$(UV`(._D`8```!T-X/L"/^WD`8``(V'>`8``%#H_/___X/$
+M"(M$)`C_L)`&``"+1"0,!7@&``!0Z/S___^#Q!"-=@"#O\@&````=#>#[`C_
+MM\@&``"-A[`&``!0Z/S___^#Q`B+1"0(_[#(!@``BT0D#`6P!@``4.C\____
+M@\00C78`@[_\"````'0W@^P(_[?\"```C8?D"```4.C\____@\0(BT0D"/^P
+M_`@``(M$)`P%Y`@``%#H_/___X/$$(UV`(._)`D```!T-X/L"/^W)`D``(V'
+M#`D``%#H_/___X/$"(M$)`C_L"0)``"+1"0,!0P)``!0Z/S___^#Q!"-=@"#
+MOYP)````=#>#[`C_MYP)``"-AX0)``!0Z/S___^#Q`B+1"0(_["<"0``BT0D
+M#`6$"0``4.C\____@\00C78`@[]T!@```'0W@^P(_[=T!@``C8=<!@``4.C\
+M____@\0(BT0D"/^P=`8``(M$)`P%7`8``%#H_/___X/$$(UV`(._X`D```!T
+M1_^WZ`D``/^WY`D``/^WX`D``(V'R`D``%#H_/___XM$)!#_L.@)``#_L.0)
+M``#_L.`)``"+1"0<!<@)``!0Z/S___^#Q""0@[\$"@```'1'_[<,"@``_[<(
+M"@``_[<$"@``C8?L"0``4.C\____BT0D$/^P#`H``/^P"`H``/^P!`H``(M$
+M)!P%[`D``%#H_/___X/$()"#OR@*````=$?_MS`*``#_MRP*``#_MR@*``"-
+MAQ`*``!0Z/S___^+1"00_[`P"@``_[`L"@``_[`H"@``BT0D'`40"@``4.C\
+M____@\0@D(._<`H```!T1_^W>`H``/^W=`H``/^W<`H``(V'6`H``%#H_/__
+M_XM$)!#_L'@*``#_L'0*``#_L'`*``"+1"0<!5@*``!0Z/S___^#Q""0@[],
+M"@```'1'_[=4"@``_[=0"@``_[=,"@``C8<T"@``4.C\____BT0D$/^P5`H`
+M`/^P4`H``/^P3`H``(M$)!P%-`H``%#H_/___X/$()"#OY0*````=$?_MYP*
+M``#_MY@*``#_MY0*``"-AWP*``!0Z/S___^+1"00_["<"@``_["8"@``_["4
+M"@``BT0D'`5\"@``4.C\____@\0@D(._N`H```!T1_^WP`H``/^WO`H``/^W
+MN`H``(V'H`H``%#H_/___XM$)!#_L,`*``#_L+P*``#_L+@*``"+1"0<!:`*
+M``!0Z/S___^#Q""0@\0<6UY?7<-64X/L$(M<)!Q3Z/S___^-LV`,``")-"3H
+M_/___XD<).C\____QP0DT`<``.C\____B1PDZ/S___^)'"3H_/___X/$"&H!
+M4^C\____@\0(:@%6Z/S___^#Q!1;7L.-=@"#[!AHP`4``.C\____N`````"#
+MQ!S#D)"+1"0$Q@`(QD`!$H!\)`@!&=+WTH/B!(A0`L9``P#&0`0`QD`%`,9`
+M!@#&0`<`QD`(`,9`"0#&0`H`QD`+`(!\)`P!&=*#XB"(4`S&0`T`QD`.`,9`
+M#P#&0!``QD`1`,9`$@#&0!,`N!0```##C78`55=64X/L&(M\)#"*1"0TB$0D
+M%P^V="0X_W0D+.C\____B<6#Q!"X`````(7M#X26````BUT(B?(/ML)0#[9$
+M)`]0C4,$4.C\____B<;&`P#&0P$`QD,"`,9#`P")/"3_="0LZ/S___^#Q!"Y
+M`````+H0````C4<DB`A`2G7ZC5X$QD<D%<9')1&(7RC&1RD`C7<\#[;;B5\@
+MQT=D`````(M%"(E'-(EO4(/L"&H`5NC\____4_]U$/]U#%;H_/___[@!````
+M@\0@@\0,6UY?7<.0D)!75E.+?"00BT0D%(G&9HE'!,9'"@!FQT<(``"[````
+M`&8YPW,8C78`#[?+BQ>)\&8IV$AFB01*0V8Y\W+K6UY?PXUV`%93BUPD#(M$
+M)!")QF:)0P3&0PH!9L=#"```N0````!F.<%S#P^WT8L#9HD,4$%F.?%R\5M>
+MPXGV4XM<)`B`>PH!=2EFBT,(#[?(BQ-`9HE#"&:+%$IF.T,&<@9FQT,(``!F
+M_TL$#[?"ZQ")]F;_2P0/MU,$BP,/MP106\-64X/L"(M,)!2+="08@'D*`74I
+M#[=1"`^W002)1"0$C00"#[=1!HD4))GW/"2+&6:)-%-F_T$$ZQ&-=@`/MU$$
+MBP%FB3109O]!!(/$"%M>PXM$)`1F@W@$``^4P`^VP,.+1"0$N@`````Y`'0.
+MBP"+2`2+$(E*!(D1B<*)T,.)]HM4)`2X`````#D2=`V+0@2+2`2+$(E*!(D1
+MPY!64X/L!(M<)!"+<T2*0SR(1"0#N0````"Z<````(G8D(@(0$IU^HES1(I$
+M)`.(0SR#Q`1;7L.)]H/L$(M4)!2+3"08BD$!B$(!BD$"B$("BT$$B4($#[9"
+M`8T$0,'@`E#_<0C_<@CH_/___X/$',.04X/L!(M,)`R+5"00BD0D%(A$)`.S
+M`#C#<QN)]HH!.@)T"K@`````ZQ&-=@!!0D,Z7"0#<N>X`0```(/$!%O#D(M$
+M)`3&0`$`BU0D"(A0`L=`!`````##D%93BT0D#(MT)!@/ME`!C112BT@(C1R1
+M_D`!`7`$N0````"Z#````(G8C78`B`A`2G7ZBT0D$(M4)!2)`XE3!(GPB$,(
+MB?(/ML:(0PG!ZA"#XC^*0PJ#X,`)T(A#"EM>PXM4)`2*0@$Z`@^2P`^VP,.Y
+M_P```+H``@``BT0D!(GVB`A`2G7ZPY!3@^P$BTPD#(M<)!"*1"04B$0D`[@`
+M````C78`#[?0@'R1`O]U#F:)')&*7"0#B%R1`NL'0&:#^']VX0^WP(/$!%O#
+MD%=64XMT)!"+5"08BTPD'`^W1"04@'R&`O]U#6:)%(:(3(8"ZQ>-=@`/ML%0
+M#[?"4%;H_/___P^WP(/$#%M>7\-64XM<)`R+="00BDPD%+@`````D`^WT#A,
+MDP)U$V8Y-)-U#<9$DP+_9L<$D___ZP=`9H/X?W;=#[?`6U[#C78`5E.+7"0,
+MBW0D$(I,)!2X`````)`/M]`X3),"=0=F.323=`B00&:#^']VZ68]@`!U!;B`
+M`0``#[?`6U[#55=64XML)!2`?20(=#J`?20H=#2`?22H="Z`?22(="B`?20*
+M="*`?20J=!R`?22J=!:`?22*=!"`?20O=`J`?22/#X46`@``#[9%)(/X+P^$
+MFP```(/X+W\F@_@*=&6#^`I_#(/X"'1;Z=(!``")]H/X*'1[@_@J=';IP0$`
+M`)`]CP````^$Z0```#V/````?QX]B`````^$UP```#V*````#X3,````Z9,!
+M``"-=@`]J````'1Q/:H```!T:NE]`0``D`^V126#X!_!X!`/ME4FP>(("=`/
+MME4G"=")QK\`````#[95*.EC`0``C78`#[95)L'B&`^V12?!X!`)P@^V12C!
+MX`@)P@^V12D)PHG6OP`````/ME4KP>((#[9%+`G"Z2@!```/ME4FP>(8#[9%
+M)\'@$`G"#[9%*,'@"`G"#[9%*0G"B=:_``````^V52K!XA@/MD4KP>`0"<(/
+MMD4LP>`("<(/MD4M"<+IW@```(GV#[9U)HGWO@````#!YQ@/MDTGB<NY````
+M`,'C$(GP"<B)^@G:#[9-*(G+N0````#!XPB)Q@G.B=<)WP^V12F)PK@`````
+MB?$)P8G["=,/MD4JN@`````/I,(8P>`8B<X)QHG?"=</MD4KN@`````/I,(0
+MP>`0B?$)P8G["=,/MD4LN@`````/I,((P>`(B<X)QHG?"=</MDTMNP````")
+M\`G(B?H)VHG&B=</ME4NP>(8#[9%+\'@$`G"#[9%,,'@"`G"#[9%,0G"ZQ&0
+MO@````"_`````+H`````D(EU6(E]7(E58&:#31(!6UY?7<.04X/L$(M<)!@/
+MMD,S4`^V0S)0#[9#,5`/MD,P4`^V0R]0#[9#+E`/MD,M4`^V0RQ0#[9#*U`/
+MMD,J4`^V0RE0#[9#*%`/MD,G4`^V0R90#[9#)5`/MD,D4%-HK`(``.C\____
+M@\1(#[=#$%!HM0```.C\____@\086\.)]E=64XM\)!"+7"04NO____^Y````
+M`&8YV7,=OF`&``"0#[?!B@0X,=`/ML#!Z@@S%(9!9CG9<NF)T%M>7\.0D)!3
+MBTPD"(L!BY`$`0``B14`````B=.!XW[__O^+`8F8!`$``(G3@>-^__+_BT$$
+MB1B+002)6`R+002)6!"+002)6!2+002)6!B+002)6`2+`8N`5`$``*,`````
+MB<.!X_X`__^+`8F85`$``%O#C78`5E.#[`2+="04BE0D&(M$)!"+&(/^`W80
+MBX3S@`$``*,`````ZPZ)]HN$\X`!``"C`````(/@_H/^`W8,B83S@`$``.L*
+MC78`B83S@`$``(32=&&#_@-V#HN$L]`!``"C`````.L,BX2ST`$``*,`````
+M@\@"@_X#=@F)A+/0`0``ZPF)A+/0`0``B?:#_@-V#XN$L]`!``"C`````.L-
+MD(N$L]`!``"C`````*@"==SK9HGV@_X#=@W'A/,P`@```````.L+QX3S4`(`
+M``````"#[`QH$"<``.C\____@\00@_X#=@Z+A/,T`@``HP````#K#(N$\U0"
+M``"C`````(/(`8/^`W8)B83S-`(``.L'B83S5`(``(/$!%M>PXGV5U93@^P0
+MBWPD((I$)"2(1"0/BDPD*(A,)`Z+-[L`````@'\F``^$D@$``)`/MD0D#XC9
+MT_BH`0^$<P$``(/[`W8.BX3>A`$``*,`````ZPR+A-Z$`0``HP````"#X/Z#
+M^P-V#(F$WH0!``#K"HUV`(F$WH0!``"#[`QH$"<``.C\____@\00@'PD#@!T
+M8H/[`W8.BX2>T`$``*,`````ZPR+A)[0`0``HP````"#R`*#^P-V"8F$GM`!
+M``#K"HF$GM`!``"-=@"#^P-V#XN$GM`!``"C`````.L-D(N$GM`!``"C````
+M`*@"==SK9HGV@_L#=@W'A-XP`@```````.L+QX3>4`(```````"#[`QH$"<`
+M`.C\____@\00@_L#=@Z+A-XT`@``HP````#K#(N$WE0"``"C`````(/(`8/[
+M`W8)B83>-`(``.L'B83>5`(``(/[`W8/QX3>@`$```$```#K#8GVQX3>@`$`
+M``$```"#^P-V$(N$WH0!``"C`````.L.B?:+A-Z$`0``HP````"#R`&#^P-V
+M#(F$WH0!``#K"XUV`(F$WH0!``"00P^V1R8YV`^';_[__X/$$%M>7\-3BUPD
+M"(I,)`R+`XN`!`$``*,`````B<)F@7LD@&1T$&:!>R2`D70(9H%[)("4=10/
+MMLF#P0BX`0```-/@"<+K$HUV``^VR8/!#+@!````T^`)PHL#B9`$`0``6\.-
+M=@!3BUPD"(I,)`R+`XN`!`$``*,`````B<)F@7LD@&1T$&:!>R2`D70(9H%[
+M)("4=10/MLF#P0BX_O___]/`(<+K$HUV``^VR8/!#+C^____T\`APHL#B9`$
+M`0``6\.-=@!64X/L!(MT)!`/MEPD%%-6Z/S___^#[`1H$"<``.C\____4U;H
+M_/___X/$'%M>PY!3BUPD"(I,)`R`^?]T>H#Y'W<YBY,8`0``B14`````N`$`
+M``#3X(G!]]`AT(F#&`$``(N#6`$``*,`````(<AT1XF#6`$``.L_C78`BY,<
+M`0``B14`````#[;)@^D@N`$```#3X(G!]]`AT(F#'`$``(N#8`$``*,`````
+M(<AT"(F#8`$``(GV6\.)]E=64XMT)!B*7"04BT0D$(LX@/L#=A(/ML/'A,<`
+M`@``#`$``.L0B?8/ML/'A,<``@``#`$``(/L#&@0)P``Z/S___^#Q!"`^P-V
+M+0^VRP^V5@/!XA@/MD8"P>`0"<(/MD8!P>`("<(/M@8)PHF4SP0"``#K*XUV
+M``^VRP^V5@/!XA@/MD8"P>`0"<(/MD8!P>`("<(/M@8)PHF4SP0"``"`^P-V
+M$P^VP\>$QP`"```0`0``ZQ&-=@`/ML/'A,<``@``$`$``(/L#&@0)P``Z/S_
+M__^#Q!"`^P-V+0^VRP^V5@?!XA@/MD8&P>`0"<(/MD8%P>`("<(/MD8$"<*)
+ME,\$`@``ZRN)]@^VRP^V5@?!XA@/MD8&P>`0"<(/MD8%P>`("<(/MD8$"<*)
+ME,\$`@``6UY?PY"0D%.#[#"+7"0XC40D+E"-1"0P4(U$)#)0C40D-%"-1"0V
+M4(U$)#E0C40D/%"-1"0^4(U$)$%0C40D0E"-1"1%4(U$)$A0C40D2U`/MT,D
+M4.C\____@\0\#[9$)!=0#[9$)!Q0C40D&%#H_/___VH!#[94)">-!-+!X`(I
+MT,'@`U#_<Q"-@T`%``!0Z/S___^#Q"!J`0^V1"09C01`C02`P>`#4/]S$(V#
+M7`4``%#H_/___X/$$&H!#[9$)!B-!$"-!,")PL'B!2G"P>("4O]S$(V#>`4`
+M`%#H_/___X/$$&H!#[=$)"+!X`)0_W,0C8.4!0``4.C\____@\00:@$/MU0D
+M&HT$U0`````IT,'@!%#_<Q"-@T`&``!0Z/S___^#Q!!J`0^V1"0=#[=4)!H/
+MK\*-!$#!X`)0_W,0C8/P!0``4.C\____@\00:@%H``(``/]S$(V##`8``%#H
+M_/___X/$$`^V1"034&@`"```_W,0C8/,!@``4.C\____@\00:@$/MD0D((T$
+M@,'@`E#_<Q"-@W@&``!0Z/S___^#Q!!J`0^V1"0AC13`C110P>(#4O]S$(V#
+ME`8``%#H_/___X/$$&H!#[=$)!Z-!$#!X`-0_W,0C8.P!@``4.C\____@\00
+M:@$/MT0D(M'@4/]S$(V#Y`@``%#H_/___X/$$&H!#[9$)!?1X%#_<Q"-@PP)
+M``!0Z/S___^#Q!!J`0^V1"09T>!0_W,0C8,T"0``4.C\____@\00:@$/MD0D
+M&-'@4/]S$(V#7`D``%#H_/___X/$$&H!#[9#)M'@4/]S$(V#A`D``%#H_/__
+M_X/$$&H!#[=$)"3!X`50_W,0C8-<!@``4.C\____@\00:@'_="00_W,0C8.L
+M"0``4.C\____QP0D`0```&I`#[=$)#+!X`90_W,0C8/("0``4.C\____@\04
+M:@%H``$``&@`&0``_W,0C8/L"0``4.C\____@\04:@%H@`````^W5"0RC032
+MC02"C01"P>`$4/]S$(V#$`H``%#H_/___X/$%&H!:@0/MT0D.,'@`E#_<Q"-
+M@S0*``!0Z/S___^#Q!1J`6H$#[=$)#K!X`)0_W,0C8-8"@``4.C\____@\04
+M:@%J"`^V1"0PP>`+4/]S$(V#?`H``%#H_/___X/$%&H!:@@/MU0D+HT$DHT$
+M@,'@`BG0P>`"4/]S$('#H`H``%/H_/___[@`````@\1(6\.)]E575E.#[!R]
+M`````(M$)##&0#D`QD`X`,9`-P#'@%P,````````QH!9#````+D`````NA`!
+M``"+7"0PC8,X"P``C78`B`A`2G7ZBT0D,`7,````BU0D,(F"S````(F"T```
+M`(G0!=0```")@M0```")@M@```"-0`B)@MP```")@N````"-0`B)@N0```")
+M@N@```"-0`B)@NP```")@O````"-0!")@OP```")@@`!``"-0`B)@@0!``")
+M@@@!``"-0/")@O0```")@O@```"#[`B-1"0B4(U$)"10C40D)E"-1"0H4(U$
+M)"I0C40D+5"-1"0P4(U$)#)0C40D-5"-1"0V4(U$)#E0C40D/%"-1"0_4`^W
+M0B10Z/S___^*1"1'BTPD<(A!+HI$)$B(02^*1"1)B(')````9HM$)%)FB4%`
+MBT0D6&:)@30+``!FBT0D6DAFB8$V"P``@\1`#[=!)#V`D0``=`L]@)0```^%
+M1`D``(M<)##&0S4$QD,K!,9#-D#&0S0`QH/&````"<9#+`"#[`R)V`5`!0``
+M4.C\____B8-8!0``@\00NP`````/MDPD!XT4R<'B`BG*C0S5`````.L$B!A)
+M0(7)=?B#[`R+1"0\!5P%``!0Z/S___^+5"1`B8)T!0``@\00N0`````/ME0D
+M"8T44HT4DL'B`W0&B`A`2G7Z@^P,BT0D/`5X!0``4.C\____BTPD0(F!D`4`
+M`(/$$+L`````#[94)`B-%%*-%-*)T<'A!2G1B<K!X@)T!H@80$IU^H/L#(M$
+M)#P%E`4``%#H_/___XM<)$")@ZP%``"#Q!"Y``````^W5"02P>("=`:("$!*
+M=?J#[`R+1"0\!0P&``!0Z/S___^+5"1`B8(D!@``B=`%\`4``(D$).C\____
+MBTPD0(F!"`8``(G#B<@%0`8``(D$).C\____BU0D0(F"6`8``(G"O@````"#
+MQ!!F.W0D"G,WBTPD,('!W````(E:1(I$)`V(0CR+002)402)"HE"!(D0#[9$
+M)`V-!$"-'(.#PG!&9CMT)`IRTX/L#(M$)#P%7`8``%#H_/___XM,)$")@70&
+M``")PKX`````@\009CMT)!1S)HM,)#"!P>0```#&0@@`BT$$B5$$B0J)0@2)
+M$(/"($9F.W0D%'+D@^P,BT0D/`5X!@``4.C\____BUPD0(F#D`8``(G"O@``
+M``"#Q!"`?"00`'0DB=F!P>P```"+002)402)"HE"!(D0@\(41F8/MD0D$&8Y
+M\'?D@^P,BT0D/`64!@``4.C\____BU0D0(F"K`8``(G"O@````"#Q!"`?"01
+M`'0IBTPD,('!_````(M!!(E1!(D*B4($B1"!PI@```!&9@^V1"019CGP=^&#
+M[`R+1"0\!;`&``!0Z/S___^+3"1`B8'(!@``B<*^`````(/$$&8[="0.<R*+
+M3"0P@<'T````BT$$B5$$B0J)0@2)$(/"&$9F.W0D#G+HO@````"`?"0'`'1&
+MBWPD,(''!`$```^WWH/L#(M$)#P%S`8``%#H_/___XM4)$")A)KD!@``@\00
+MBU<$B4<$B3B)4`2)`D9F#[9$)`=F.?!WQ(/L#(M$)#P%Y`@``%#H_/___XM,
+M)$")@?P(``")@0`)``!FBT0D(F:)@08)``"#Q`@/M\!0B<@%``D``%#H_/__
+M_X/$!(M$)#P%#`D``%#H_/___XM<)$")@R0)``")@R@)``!F#[9$)!=FB8,N
+M"0``@\0(#[?`4(G8!2@)``!0Z/S___^)V`4T"0``B00DZ/S___^)@TP)``")
+M@U`)``!F#[9$)!EFB8-6"0``@\0(#[?`4(G8!5`)``!0Z/S___^)V`5<"0``
+MB00DZ/S___^)@W0)``")@W@)``!F#[9$)!AFB8-^"0``@\0(#[?`4(G8!7@)
+M``!0Z/S___^)V`6$"0``B00DZ/S___^)@YP)``")@Z`)``!F#[9#)F:)@Z8)
+M``"#Q`@/MD,F4(G8!:`)``!0Z/S___^)V`6L"0``B00DZ/S___^)@\0)```/
+MMDPD&(T4R<'B`RG*C121C0R5=$4``(/$$+L`````B<J%R70&B!A`2G7ZBU0D
+M,(N"Q`D``(D(BUPD,(N3Q`D``(I$)`B(0@2#[`0/MD0D#%!1_[/$"0``Z/S_
+M__^^`````(/$$(![)@!T<0^WQHT40,'B`RG"BT0D,(T4D(VJ*`$``(GQB$T$
+MQD4%`(F"*`$``,9%"@#&130`QD4<`,=%6`````"-@D@!``")12")122-@E0!
+M``")12R)13"!PF`!``")53B)53S&108"1HM<)#!F#[9#)F8Y\'>/BT0D,,9`
+M-`"^``````^WQHM4)##&A!`>!0``_T9F@_X#=NJ^`````(!\)`<`='\/M\Z+
+M7"0PBY-8!0``C03)P>`"*<C!X`/&1!`C`8N36`4``,9$$"(`BY-8!0``QD00
+M2/^+DU@%``#&1!`^_XN36`4``&;'A!"0``````#'A(N8`@```````(G!`XM8
+M!0``C5$0B5$0`X-8!0``@\`0B4`$1F8/MD0D!V8Y\'>!BT0D,&;'@,0`````
+M`+X`````C78`#[?&BU0D,,:$$)@$``#_1F:!_H4`=NF^`````(!\)`@`#X2G
+M````#[?&BUPD,(N+D`4``(T$0(T$P(G"P>(%*<+!X@+&1`HP`(N#D`4``,9$
+M`C$`BX.0!0``QT0"#`````")T0.+D`4``(U!$(E!$(G0`X.0!0``@\`0B4`$
+MB=$#BY`%``"-01B)01B)T`.#D`4``(/`&(E`!(N#D`4``(EL`@B)T0.+D`4`
+M`(U!*(E!*`.3D`4``(/"*(E2!$9F#[9$)`AF.?`/AUG___^+1"0PQH#'````
+M@+X`````@'PD"0!T=`^WUHM,)#"+@70%``"-%%*-%)+!X@-FQT0",@0`BX%T
+M!0``QD0")@"+@70%``#&1`(H_XN!=`4``,9$`C3_B=&+7"0P`XMT!0``C4$4
+MB4$4B=`#@W0%``"#P!2)0`2+@W0%``");`)41F8/MD0D"68Y\'>,BT0D,,:`
+MR````(*#[`B+1"0X!>0)``!0BT0D/`7("0``4.C\____BU0D0(F"X`D``(/$
+M"(G0!0@*``!0C4#D4.C\____BTPD0(F!!`H``(/$"(G(!2P*``!0C4#D4.C\
+M____BUPD0(F#*`H``(/$"(G8!5`*``!0C4#D4.C\____B8-,"@``@\0(B=@%
+M=`H``%"-0.10Z/S___^)@W`*``"#Q`B)V`68"@``4(U`Y%#H_/___XF#E`H`
+M`(M4)$"+NI@*``"+JIP*``")1"00O@````"#Q!"`?"00`'1.B=.!P^P```"#
+M[`Q3Z/S___^)PHM,)!")2`B)>`R):!"#Q!"+0P2)4P2)&HE"!(D0@<$`"```
+MB0PD@<<`"```@]4`1F8/MD0D$&8Y\'>Z@^P(BT0D.`6\"@``4(M$)#P%H`H`
+M`%#H_/___XM<)$")@[@*``"+5"1`B[J\"@``BZK`"@``B40D$+X`````@\00
+M9CMT)`YS2HG3@</T````@^P,4^C\____B<*+3"00B4@(B7@,B6@0@\00BT,$
+MB5,$B1J)0@2)$('!C`$``(D,)(''C`$``(/5`$9F.W0D#G*^@\0<6UY?7<-5
+M5U93@^P,BWPD(,9$)`L`#[9$)`N*C#@>!0``@/G_#X3(````#[;1C012P>`#
+M*="-!(>-D"@!``")5"0$O0````"`N#(!````#X2>````B=:#QC@/MM&-!%+!
+MX`,IT,'@`HD$)(UV`(/L#%;H_/___XG#@\00BT8$B5X$B3.)0P2)&(-['`!T
+M&X/L!/]S'/^W)`4``&H%Z/S___^`2R0"@\00D(/L!%-J`O]T)!#H_/___X/$
+M$(![2P!T'H/L#%?H_/___\<$)`$```#H_/___X/$$(![2P!UXD6)Z(L4)#B$
+M.C(!```/AWO____^1"0+@'PD"P,/AA3___^#[`Q7Z/S___^#Q!Q;7E]=PXUV
+M`%.#[`B+3"04BUPD$#E9&'5/@'DD"'1<@'DD*'16@'DDJ'10@'DDB'1*@'DD
+M"G1$@'DD*G0^@'DDJG0X@'DDBG0RC9/,````BX/,````B4@$B0&)402)B\P`
+M``#K%HUV`(V#S````(M0!(E(!(D!B5$$B0J#[`Q3Z/S___^#Q!A;PXUV`(/L
+M%/]T)!S_="0<Z/S___^#Q!S#55=64X/L#(M<)"2+="0HBVPD++\`````9H%[
+M).$!=0R*0R:#Z!$\`78SB?:+1"0@BQ"+BE@%``"-N>@6`0!F@7L0A0!W%P^W
+M0Q`/MI00F`0``(T$TL'@`BG0C3S!QD8$!8!F!?Z`)M^R`&:!>R3A`74*BD,F
+M2#P!=P*R`8C0P>`'BA:#XG\)PH@6BD-F@^`!P>`&@^*_"<*(%F:!>R3A`742
+MBD,F@^@1/`%W"&:);@CK'HGV]D-F`702@^P,5^C\____9HE&"(/$$.L$9HEN
+M"&:+1@B(0Q5F@7LDX0%U(8I#)D@\`7<%BE,GZQ]F@7LDX0%U#(I#)H/H$;(/
+M/`%V"[(`@W\P`'0#BE=)@^(/B@:#X/`)T(@&@\0,6UY?7<.0@^P,_W0D'/]T
+M)!S_="0<BT0D'/\PZ/S___^#Q!S#B?964XM<)`R+,V:+@S`+``!`9HF#,`L`
+M`&8[@S0+``!R"6;'@S`+``````^WBS`+``"+DTP*``"+1"00BP")!(H/MX,P
+M"P``B88L`0``6U[#D%575E.+7"0@BWPD&`^V;"0<BW0D%+H`````N00```")
+MV(UV`(@00$EU^HGZ@>+_#P``BP,E`/#__PG0B0,/ME8)P>(,)?\/\/\)T(D#
+M#[9&!M'H@^`!@_@!&<"#X`)`P>`=BQ.!XO___Q\)PHD3BD,#@\@0@^#WB$,#
+M]D8&`703B>J#XG_!XA2+`R7__P_X"=")`UM>7UW#55=64X/L#(ML)""+="0D
+MQT0D"`````"`?B0(=!.`?B0H=`V`?B2H=`>`?B2(=0F0@TYD"NL>B?:`?B0*
+M=!*`?B0J=`R`?B2J=`:`?B2*=02#3F0"9H%^).$!=1B*1B:#Z!$\`7<.@TYD
+M"+@`````Z3@%``"+1B0E____`#WA`1``#X4)`0``9H%^$(4`#X>)````#[=&
+M$("\*)@$``#_='MF@WX0?W<@#[:4*)@$``"+C5@%``"-!-+!X`(IT(M$P2@/
+MMG@$ZUEF@7X0@0!W*0^W1A`/MH0HF`0``(N-D`4``(T$0(T$P(G"P>(%*<*+
+M1)$(#[9X!.LH#[=&$`^VA"B8!```BY5T!0``C01`C02`BT3"5`^V>`3K!I"_
+M_____XGZ#[;"#[:<*!X%``"-!%O!X`,IV(V<A2@!``"+C9`%``"-@>P&#0!F
+M@7X0A0!W'`^W1A`/MH0HF`0``(T$0(T$P(G"P>(%*<*-!)'V0#40#X5M`0``
+MQD84!(M$)"C'``````"X`0```.D=!```D&:!?A"%``^'C`````^W1A"`O"B8
+M!```_W1^9H-^$']W(P^VE"B8!```BXU8!0``C032P>`"*="+1,$H#[9X!.M<
+MC78`9H%^$($`=RD/MT80#[:$*)@$``"+C9`%``"-!$"-!,")PL'B!2G"BT21
+M"`^V>`3K*`^W1A`/MH0HF`0``(N5=`4``(T$0(T$@(M$PE0/MG@$ZP:0O___
+M__^Y_P```&:!?A"%`'<-#[=&$&8/MHPHF`0``(GZ#[;"#[:<*!X%``"-!%O!
+MX`,IV(V<A2@!```/M]&-!-+!X`(IT(N56`4``(T$PHE$)`AF@7XDX0%U"8I&
+M)D@\`78MD&:!^?\`=`J+1"0(]D`C!'4;QD84!HM4)"C'`@````"X`0```.GW
+M`@``C78`BU0D"`^V0B"H`70@J`1T'(I%+#I%-G(4BT0D*,<``0```+@!````
+MZ<@"``"#?"0(``^$\0```(M4)`@/MD(@J`$/A.$```"H!`^$V0```(/L"%92
+MZ/S___^#Q!"$P'48QD84!(M$)"C'``````"X`0```.E\`@``BU0D"(!Z2Q]V
+M%(M$)"C'``$```"X`0```.E>`@``]D9F`70&]D,(`708]D9F`74&]D,(`74,
+M@'X4@70&]D,("'0J@^P(B?H/ML)05>C\____@\00A,!T%(M$)"C'``$```"X
+M`0```.D0`@``]D9F`0^$?@$``/9#"`$/A'0!``"#[`S_="04Z/S___^#Q!!F
+M@_@?#X9;`0``BU0D*,<"`0```+@!````Z<\!``"-=@#V0P8"=#*+1B0E____
+M`#WA`1``=".+5"0(BD)+.D)*<A>+1"0HQP`!````N`$```#IEP$``(UV`(M&
+M)"7___\`/>$!$``/A/D```"+5"0(#[="-HG"T>J#X@&Q`8!^).$/A=X```"`
+M?B4!#X74````#[9&)H/H!H/X"0^'K````/\DA4P(```/ML%0:@%65>C\____
+M@\00A,`/A:4```"+1"0HQP`"````N`$```#I&0$```^VP5!J`%95Z/S___^#
+MQ!"$P'5]BU0D*,<"`@```+@!````Z?$```!J`0^VPE!65>C\____@\00A,!U
+M58M$)"C'``(```"X`0```.G)````:@`/ML)05E7H_/___X/$$(3`=2V+5"0H
+MQP("````N`$```#IH0```)#&1A0$BT0D*,<``````+@!````Z8@```"#[`R-
+MA0`)``!0Z/S___^#Q!"$P'02BU0D*,<"`0```+@!````ZV&0@'XDX752@'XE
+M`75,@'XF#W5&@'XI`75`9@^V1BC!X`AF#[96)P'0@^P(#[?`4%7H_/___X/$
+M$#E&2'4$A<!U&,9&%`2+1"0HQP``````N`$```#K"XUV`+@`````C78`@\0,
+M6UY?7<-64XM<)`R+="00N0````"Z#0```(GPB?:("$!*=?J*0R6(!HI#)HA&
+M`8I#)XA&`HI#*(A&`XI#*8A&!(I#*HA&!8I#*XA&!O9#9@1T'HI#+(A&"(I#
+M+8A&"8I#+HA&"HI#+XA&"XI#,(A&#+@!````6U[#D%575E.+;"04BWPD&+H`
+M````O@````")]KD'````#[8<-XUV`-'BB=C3^*@!=!+WP@````%U&H'R=R?;
+M`.L2B?;WP@````%T"('R=R?;`(GV27G11H/^!WZ_B=#!Z!"(10")T,'H"(A%
+M`8A5`EM>7UW#C78`55=64X/L8(ML)'B+1"1TBX`H"@``B40D(,=$)!@`````
+MQT0D%`````#'1"00`````,=$)`P`````9L=%'O\/C40D0%!5_W0D?.C\____
+M@\00A,!T"8M$)#SIWPP``(M%)"7___\`/>$!$``/A2,!``"#[`QHB!,``.C\
+M____@\009H%]$(4`#X>;````#[=%$(M4)'"`O!"8!```_P^$A0```&:#?1!_
+M=R,/MI00F`0``(M<)'"+BU@%``"-!-+!X`(IT(M$P2B*0`3K76:!?1"!`'<L
+M#[=%$(MT)'`/MH0PF`0``(N.D`4``(T$0(T$P(G"P>(%*<*+1)$(BD`$ZRD/
+MMT40BU0D<`^VA!"8!```BY)T!0``C01`C02`BT3"5(I`!.L$B?:P_P^VP(M<
+M)'`/MH08'@4``(E$)!B-!$#!X`,K1"08C82#*`$``(E$)!B+BY`%``!F@7T0
+MA0!W)0^W11`/MH08F`0``(T$0(T$P(G"P>(%*<*-%)&)5"00Z84!``"!P>P&
+M#0")3"00Z78!``"[_P```&:!?1"%`'<1#[=%$(MT)'!F#[:<,)@$``!F@7TD
+MX0%U#HI%)H/H$3P!#X;I````9H%]$(4`#X>9````#[=%$(M4)'"`O!"8!```
+M_P^$@P```&:#?1!_=R,/MI00F`0``(MT)'"+CE@%``"-!-+!X`(IT(M$P2B*
+M0`3K6V:!?1"!`'<L#[=%$(M4)'`/MH00F`0``(N*D`4``(T$0(T$P(G"P>(%
+M*<*+1)$(BD`$ZR</MT40BTPD<`^VA`B8!```BY%T!0``C01`C02`BT3"5(I`
+M!.L"L/\/ML"+="1P#[:$,!X%``")1"08C01`P>`#*T0D&(V$AB@!``")1"08
+M#[?3C032P>`"*="+EE@%``"-!,*)1"04ZR$/M\.-!$"-!("+3"1PBY%T!0``
+MC03"B40D#(MP5(ET)!AF@7TDX0%U$8I5)HU"[SP!=B:-0O\\`78?9H'[_P!T
+M"HM$)!3V0",$=0[&110&N`````#I,PH``(/L"(U$)$!0_W0D?.C\____9HE$
+M)#!FB44>@\0$_W0D?.C\____B40D%(/$$+@"````@WPD!``/A/8)``"+5"0$
+MB554#[=$)""-',"-')B-'%C!XP0#7"0<B=B+3"1P*X$H"@``@\`@F8G&B=<#
+ML2P*```3N3`*``"+1"0XB7`@BTPD.(EY)(M$)`2+<`R+>!"+1"0XB7`HBTPD
+M.(EY+(M$)#B+5"0@9HE0"+D`````NK`$``")V(UV`(@(0$IU^F:!?23A`75M
+MBD4F@^@1/`%W8XU$)$!0BT0D/`^V0`A05?]T)"#H_/___X/$$`^W5"0@C032
+MC02"C01"P>`$`T0D'(M,)'`K@2@*```%(`0``)F)QHG7`[$L"@``$[DP"@``
+MBT0D.(EP$(M,)#B)>13IK`$``(MT)!CV1@8!=2N+120E____`#WA`1``#X0,
+M`0``BU0D%`^V0B"H`0^$_````*@$#X3T````]D5F('00C40D0%!5Z/S___^#
+MQ`CK&XU$)$!0BT0D/`^V0`A05?]T)"#H_/___X/$$`^W5"0@C032C02"C01"
+MP>`$`T0D'(M,)'`K@2@*```%(`0``)F)QHG7`[$L"@``$[DP"@``BT0D.(EP
+M$(M,)#B)>11F@7TDX0%U#HI%)H/H$3P!#X;M````BW0D%`^V1B"H`@^$W0``
+M`*@$#X35````J`$/A,T````/MU0D((T$THT$@HT$0L'@!`-$)!R+5"1P*X(H
+M"@``F8G&B=>+3"1P`[$L"@``$[DP"@``BT0D.(EP&(M,)#B)>1SIA@```(UV
+M`(M<)!CV0P8"='D/MT0D((T,P(T,B(T,2,'A!`-,)!R)R(MT)'`KAB@*``"9
+MB<:)UXM<)'`#LRP*```3NS`*``"+1"0XB7`8BUPD.(E['(MT)'`KCB@*``"!
+MP2`$``")R)F)SHG7BTPD<`.Q+`H``!.Y,`H``(M$)#B)<!"+3"0XB7D4BT0D
+M.(!(`0)F#[95/8M$)#AFB5`"O@````"`?3T`="Z-%';!X@*)TXM$)`0#6`B+
+M342+!`J)`XM$"@2)0P2+1`H(B4,(1@^V13TY\'?2BU4@BT0D.(E0#&:!?23A
+M`75.BD4F@^@1/`%W1`^W7"0@4_]T)#Q5_W0D).C\____C40D4%"-!-N-!(.-
+M!$/!X`0#1"0P4%7_="0TZ/S___^+5"0X@&((_H/$(.ES!0``BTPD&/9!!@(/
+MA/($``"+1"0XQD`&_HM$)#B`8`?^@WPD%``/A.8```"+7"04#[9#(*@"#X36
+M````J`0/A,X```"H`0^$Q@````^W1"0@4/]T)#Q54>C\____@\00]D5F`70/
+MBT0D.&:+0`C!X`.(1"1!C40D0%`/MU0D)(T$THT$@HT$0L'@!`-$)"!05?]T
+M)"3H_/___X/$$/9%9@%T"HMT)!B`3@@!ZPB+1"08@&`(_@^W1"0@C0S`C0R(
+MC0Q(P>$$BU0D',8$$:&+7"04BI.R````@^(/BW0D'(I$,0&#X/`)T(A$,0%F
+MBT,80`^VT,'B"`^VQ`G09HE$,0*!PYP```")7"0(Z<(#``")]F:!?23A`0^%
+MD`(```^V12:#^`]T#H/X$`^$X@```.F=`P``9@^V52C!X@AF#[9%)P'"BT0D
+M.,9`!`V+1"0X@&`%_H!,)#<(BUPD.`^V116+="1P#[:.Q@```-/@9@E#"(M,
+M)#B*00&#X!^#R""(00$/MT0D((T,P(T,B(T,2,'A!(M$)!R-'`&+12J)@S@$
+M``"+12Z)@SP$```/ML+!X`@/MM8)PHMT)!QFB90Q1`0``(I%*8B$,4($``#&
+M`Y&+5"049HM"&$`/MM#!X@@/ML0)T&:)1#$"BUPD%(J3L@```(/B#XI$,0&#
+MX/`)T(A$,0&!PYP```")7"0(Z<`"``"+5"0X#[9%%8MT)'`/MH[&````T^!F
+M"4((#[=$)""-%,"-%)"-%%#!X@2+1"0<Q@0"@6;'1`("__^+7"00BHN+````
+M@^$/BW0D'(I$,@&#X/`)R(A$,@&#?30`=0[&110AN`````#I*@0``/9%)P%T
+M38-].`!T1XM%.(E$)`@/MT0D((T<P(T<F(T<6,'C!(/L"/]T)!"+5"1\_[+$
+M"0``Z/S___^#X`^+3"0LBE0+`8/B\`G"B%0+`8/$$.L(BUPD$(E<)`B[!```
+M`(M5-`^V0@$]DP```'=M_R2%=`@``(/#!.MA@\,$ZUR#PPCK5X/#".M2@\,(
+MZTV#PPCK2(/#".M#@\,(ZSZ#PQCK.8/#&.LT@\,,ZR^#PPCK*@^V6@2-')T(
+M````ZQV!PX@```#K%8/#).L0@\,DZPN#PR3K!H'#B````(U3`\'J`HM$)#B(
+M4`2+3"0X9L'J"(/B`8I!!8/@_@G0B$$%#[=4)""-!-*-!(*-!$+!X`2+="0<
+MC80P(`0``(/L!%/_=310Z/S___^#Q!#I)@$``(GV#[9%)(/H!#VK````=S3_
+M)(7$"@``#[9%+,'@"`^V52V-1!#]@_@*=P__)(5T#0``BT0D.(!(`02+1"0X
+M@$@!`>L(BT0D.(!@`?N+1"0XQD`$#8M$)#B`8`7^BU0D.`^V116+7"1P#[:+
+MQ@```-/@9@E""(M$)#B`8`$?#[=$)""-',"-')B-'%C!XP2+="0<QH0S(`0`
+M``:+?"04@<><````5XG>`W0D((V&(00``%#H_/___U>-AB4$``!0Z/S___^-
+MED0$``"+122)AD0$``"+12B)0@2+12R)0@B+13")0@S&!I&+1"0DBI"R````
+M@^(/BTPD+(I$"P&#X/`)T(A$"P&#Q!"+="049HM&&$`/MM#!X@@/ML0)T&:)
+M1`L"B7PD"(-\)`@`#X29````#[=4)""-!-*-!(*-!$+!X`0#1"0<BTPD"(L1
+MB5`$BU$$B5`(ZW.+7"08]D,&`71I#[=$)"!0_W0D/%53Z/S___^#Q!#V168!
+M=`^+1"0X9HM`",'@`XA$)$&-1"1`4`^W5"0DC032C02"C01"P>`$`T0D(%!5
+M_W0D).C\____@\00]D5F`70*BW0D&(!."`'K"(M$)!B`8`C^#[=<)""+5"1P
+MBX*L!0``B2R8BU0D(&;!Z@4/M]*+3"0@@^$?N`$```#3X(M,)'`)A)&P!0``
+MBT4D)?___P`]X0$0`'4KC40D-%!J`%/_="0DZ/S___^+1"1$)?___Q\-````
+M0(E$)$2#Q!#IJP```&:!?23A`74\BD4F@^@1/`%W,H/L"/]T)!3_="1\Z/S_
+M__^-1"1$4(M<)"`/MD,T4`^W1"0X4/]T)#3H_/___X/$(.MG@^P(_W0D'/]T
+M)'SH_/___XU$)$10BW0D*`^V1CY0#[=$)#A0_W0D-.C\____#[9&((/$(*@"
+M="^H!'0KJ`%T)XM$)#0E____'PT```!@B40D-`^V5CZ#XG_!XA0E__\/^`G0
+MB40D-(U$)#10_W0D=.C\____@\0(N`,```"#Q%Q;7E]=PXUV`%575E.#[`2+
+M;"08BU0D'(M=`(G09L'H!0^W\(G1@^$?N`$```")Q]/GA7RS1'4MB>!0:@`/
+MM\)05>C\____@4PD$````."-1"00@&`#]U!3Z/S___\)?+-$@\08@\0$6UY?
+M7<-55U93@^P,BWPD((MT)"2+1DR+:!QF@7X0A0`/AY\````/MT80@+PXF`0`
+M`/\/A(T```!F@WX0?W<F#[:4.)@$``"+CU@%``"-!-+!X`(IT(M$P2@/MD`$
+M!1`%``#K9I!F@7X0@0!W+@^W1A`/MH0XF`0``(N/D`4``(T$0(T$P(G"P>(%
+M*<*+1)$(#[9`!`40!0``ZR\/MT80#[:$.)@$``"+EW0%``"-!$"-!("+1,)4
+M#[9`!`40!0``ZPB-=@"X#P8```^V7`<.C01;P>`#*=B-G(<H`0``@WY0`'01
+M@^P(_W905^C\____@\00B?:#[`A65^C\____@\0(55/_E9P```"#Q!Q;7E]=
+MPXUV`%575E.#[!B+;"0LBT4`B40D%(U=+%/H_/___XG'@^\@@\0$_W0D%.C\
+M____B<:#Q!"-1R"+4P2)0P2)7R")4`2)`K@!````A?9T=(U6/,9&).'&1B4!
+MQD8F$(!.)P&+3"0DBX&<````B49(BT9,B4@<B<@%D````(E&.,9&%<QF#[9'
+M,V:)1A"+10")1AC'1B"0````B4XTQT9LC-8!`(/L"&H`4NC\____@\0(5O]T
+M)!3H_/___[@`````@\00@\0,6UY?7<.055=64X/L#(M\)"2+="0@BT8HB40D
+M"(LH9HM/'HG(9L'H!0^WV(/A'[@!````T^"%1)U$#X5C`P``BU4`C02=``,`
+M`(F"<`$``(M%`(N`=`$``*,`````B<+&1Q0ABT<D)?___P`]X0$/`'4@@^P(
+M:@!7Z/S___^#Q`QJ`%=5Z/S___^#Q!#I$0,``)!FBT\>@^$?N`$```#3X(7"
+M=!:#[`AJ`5?H_/___XDL).C\____@\00#[:&L````(/X!`^'V`(``/\DA:`-
+M``#&AK`````!@^P$:@%7_W0D%.C\____@\00Z;,"``#&AK`````"@^P$:@A7
+M_W0D%.C\____@\00Z94"``#&AK`````#@^P$5FHA_W0D%.C\____@\00@WXL
+M`'0@@^P,:@!J`0^V1DE0_W8L_W0D).C\____@\0@Z58"``"#[`1J`(M4)!`/
+MMD()4%7H_/___X/$$.DZ`@``QH:P````!(-^+`!T,8/L!%9J(?]T)!3H_/__
+M_\<$)`````!J`@^V1DE0_W8L_W0D).C\____@\0@Z?P!``"#[`1J`&HA_W0D
+M%.C\____@\0,:@&+5"00#[9""5!5Z/S___^#Q!#IT`$``(/L!%9J!O]T)!3H
+M_/___X/$$(-^'`!T%8M&'(M(!(U1`8E0!(/Y!0^&HP$``,9&(P'&1B(`@'Y+
+M`'0?D(/L#%7H_/___\<$)`$```#H_/___X/$$(!^2P!UXH-^+`!T$XM6#(M&
+M"(E0!(D"BT8L_D@PZQ6#?C``=`^+5C`/MD9)QT2"/`````"+5@2+!HE0!(D"
+MBT0D"/Y("H.^X`````!T&X/L!&H!#[:&U0```%#_MN````#H_/___X/$$(-^
+M+`!T%8/L!&H!#[9&25#_=BSH_/___X/$$(-^'`!T>8M&',=`8`````#^A5<,
+M``"#[`Q5Z/S___^#Q`QJ`8M&'`^V0`%05>C\____@\0,BT8<#[9``E"+1AP/
+MMD`!4&C"````Z/S___^#Q`S_=AS_M20%``!J`>C\____@\0,_W8<_[4D!0``
+M:@;H_/___\=&'`````"#Q!"#[`A65>C\____@\00BU0D"(!Z!?]T8K\`````
+M@'H*`'9!B=.#PSB)]H/L#%/H_/___XG&@\00BT,$B7,$B1Z)1@2),(!^(O]U
+M#D>)^(M4)`@X0@IWT^L+B?B+5"0(.$(*=Q:+1"0(QD`%_X/L"%!5Z/S___^#
+MQ!"0@\0,6UY?7<-55U93@^P,BUPD)(MT)""+?BB++\=$)`@`````]D<($'0'
+MQH:P````!@^VAK````"#^`$/A(,```"#^`%_"H7`=!WIR0,``)"#^`0/A)L`
+M``"#^`8/A.H!``#IL0,``,:&L`````&#[`A65>C\____QD,4@8!/"`B#Q!"#
+M>U0`=!"#[`B-0U105>C\____@\00C97,````BX7,````B5@$B0.)4P2)G<P`
+M``"#[`Q5Z/S___^#Q!#I5`,``(!G"/?^AK,```#&AK``````QD,4`H/L"%-5
+MZ/S___^)+"3H_/___X/$$.DE`P``D,:&LP````"#?AP`#X1'`0``BT8<BT@$
+MC5$!B5`$@_D%#X<R`0``@&<(]X-[5`!T$(/L"(U#5%!5Z/S___^#Q!"-E<P`
+M``"+A<P```")6`2)`XE3!(F=S````(!/"!"#?BP`=!V#[`QJ`&H"#[9&25#_
+M=BQ7Z/S___^#Q"#IHP(``,9$)`<`@'\*``^&L0```(U'.(D$)(GV@^P,_W0D
+M#.C\____B<.#Q!"+%"2+0@2)6@2)$XE#!(D8@WL<`'0=@^P$_W,<_[4D!0``
+M:@7H_/___X!+)`*#Q!"-=@"#[`13:@97Z/S___^#Q!"`>TL`=#^+1"0(_T0D
+M"#U_EI@`=S"#[`Q5Z/S____'!"0!````Z/S___^#Q!"`>TL`=!*+1"0(_T0D
+M"#U_EI@`=M.-=@#^1"0'BD0D!SA'"@^'5____\9&(@.#[`A65>C\____@\00
+MZ<T!``"0C97,````BX7,````B5@$B0.)4P2)G<P```"#?AP`=!6+1AR+2`2-
+M40&)4`2#^04/AGH!``"#[`QH!`,``.C\____@\0,5FH&5^C\_____D\*@\00
+MBU8$BP:)4`2)`H-^+`!T%(M&+/Y(,(M6#(M&"(E0!(D"ZQF0@WXP`'02BU8P
+M#[9&2<=$@CP`````C78`@'Y+`'1"BT0D"/]$)`@]?Y:8`'<SC78`@^P,5>C\
+M____QP0D`0```.C\____@\00@'Y+`'02BT0D"/]$)`@]?Y:8`';3C78`BU8$
+MBP:)4`2)`H.^X`````!T'8/L!&H!#[:&U0```%#_MN````#H_/___X/$$(GV
+M@WXL`'06@^P$:@$/MD9)4/]V+.C\____@\00D(-^'`!T=HM&',=`8`````#^
+MA5<,``"#[`Q5Z/S___^#Q`QJ`8M&'`^V0`%05>C\____@\0,BU8<#[9"`E`/
+MMD(!4&C"````Z/S___^#Q`S_=AS_M20%``!J`>C\____@\0,_W8<_[4D!0``
+M:@;H_/___\=&'`````"#Q!"#[`A65>C\____@\00ZQ&#[`16:@)7Z/S___^#
+MQ!")]H/L#%7H_/___X/$$(/$#%M>7UW#55=64X/L#(M<)"2+?"0@BV]4BW4`
+M]D4($'0$QD<U!@^V1S6#^`$/A($```"#^`%_"X7`=![I6@,``(GV@_@$#X21
+M````@_@%#X2&`0``Z4$#``#&1S4!@^P(5U;H_/___\9#%(&`30@(@\00@WM4
+M`'00@^P(C4-44%;H_/___X/$$(V6S````(N&S````(E8!(D#B5,$B9[,````
+M@^P,5NC\____@\00Z><"``"`90CW_D<VQD<U`,9#%`*#[`A35NC\____B30D
+MZ/S___^#Q!#IO@(``(!E"/>#>U0`=!"#[`B-0U105NC\____@\00C9;,````
+MBX;,````B5@$B0.)4P2)GLP```"#[`1J`&H&5>C\____@\0,:@$/MD4)4%;H
+M_/___\9$)!L`@\00@'T*``^&@@```(U].(/L#%?H_/___XG#@\00BT<$B5\$
+MB3N)0P2)&(-['`!T&X/L!/]S'/^V)`4``&H%Z/S___^`2R0"@\00D(/L!%-J
+M!E7H_/___X/$$(![2P!T(8UV`(/L#%;H_/___\<$)`$```#H_/___X/$$(![
+M2P!UXOY$)`N*1"0+.$4*=X'&104`@$T($(/L#%7H_/___X/$$.G``0``@&4(
+M]X-[5`!T$(/L"(U#5%!6Z/S___^#Q!"-ALP```"+ELP```")6@2)$XE#!(F>
+MS````(U%.(G".44X#X3H````B40D!(GV@^P,4NC\____B<.#Q!"#>!P`=!R#
+M[`3_<!S_MB0%``!J!>C\____@$LD`H/$$(GV@^P$4VH&5>C\____@\00@'M+
+M`'0AC78`@^P,5NC\____QP0D`0```.C\____@\00@'M+`'7B@WL<`'1<BT,<
+MQT!@`````/Z&5PP``(/L#%;H_/___X/$#&H!BT,<#[9``5!6Z/S___^#Q`S_
+M<QS_MB0%``!J`>C\____@\0,_W,<_[8D!0``:@;H_/___\=#'`````"#Q!"#
+M[`A35NC\____@\00BU0D!#E5.`^%'O___X/L!&H`:@95Z/S___^#Q`A75NC\
+M____QT4H`````(L&BY!8`0``B14`````@\00A=)T"(L&B9!8`0``]D4&`715
+MQD0D"P"`?BL`=AH/ME4)B="*3"0+T_BH`74*08A,)`LX3BMWZH/L"`^V7"03
+M4U;H_/___X/$"%56Z/S___^)V,'@!`'8QX2&/`L```````"#Q!")]H/$#%M>
+M7UW#55=64X/L%(M\)"B+1RB)1"0,BQA74^C\____@\00@+^S`````78'QH>P
+M````!(UW$#EW$`^$)@(``(/L#%;H_/___XE$)!B#Q!"+1Q"+5"0(B5`$B0*)
+M<@2)5Q"]`````.G#`0``B?8/M]6+@ZP%``"+-)"%]@^$K`$``&:+1QAF.T80
+M#X6>`0``#[>3,@L``(N#<`H``#D0=$^00@^W@S8+```YT'<%N@````"+@W`*
+M``"+1)`$J0``"`!U(B7_#P``9CG%=1@Y="0(=1R#[`Q3Z/S___^#Q!#I@0$`
+M`)"+@W`*```Y$'6RBTPD!(!Y-``/A3`!``!F@7X0A0`/AR0!```/MT80@+P8
+MF`0``/\/A!(!``"%_P^$\@````^V1R"H`0^$Y@```*@$#X3>````BQ-FBT8>
+M9L'H!0^WP(T$A0`#``")@G`!``!FBTX>@^$?N@$```")T-/@B<&+`XF(=`$`
+M``^W3AZ+@ZP%``#'!(@`````9HM.'HG(9L'H!0^WP(D$)(/A'XG0T^")P??1
+MBP0D(8R#L`4``&:+3AZ)R&;!Z`4/M\"#X1_3XO?2(52#1#MT)`AT.HM6!(L&
+MB5`$B0*#?E0`=!"#[`B-1E104^C\____@\00C9/,````BX/,````B7`$B0:)
+M5@2)L\P```"#[`@/MT8>4(V#``D``%#H_/____Y/2X/$$.L8BU0D!/9"!@)T
+M#H/L"%97Z/S___^#Q!"0168Y:T`/AS7^__^%_W0I#[9'(*@!="&H!'0=BTPD
+M"(M1!(L!B5`$B0*#[`A15^C\____@\00B?:#Q`Q;7E]=PU575E.#[!2+?"0H
+MBT=4B40D#(L85U/H_/___X/$$(!_-@%V!,9'-02-=Q0Y=Q0/A-P!``"#[`Q6
+MZ/S___^)1"08@\00BT<4BU0D"(E0!(D"B7($B5<4O0````#I@0$```^WU8N#
+MK`4``(LTD(7V#X1L`0``9HM')&8[1A`/A5X!```/MY,R"P``BX-P"@``.1!T
+M3Y!"#[>#-@L``#G0=P6Z`````(N#<`H``(M$D`2I```(`'4B)?\/``!F.<5U
+M&#ET)`AU'(/L#%/H_/___X/$$.DY`0``D(N#<`H``#D0=;)F@7X0A0`/A_(`
+M```/MT80@+P8F`0``/\/A.````"+3"0$@'DT``^%T@```/9!!@$/A,@```"+
+M$V:+1AYFP>@%#[?`C02%``,``(F"<`$``&:+3AZ#X1^Z`0```(G0T^")P8L#
+MB8AT`0``#[=.'HN#K`4``,<$B`````!FBTX>B<AFP>@%#[?`B00D@^$?B=#3
+MX(G!]]&+!"0AC(.P!0``9HM.'HG(9L'H!0^WP(/A']/B]](A5(-$.W0D"'0D
+MBU8$BP:)4`2)`HV3S````(N#S````(EP!(D&B58$B;/,````@^P(#[=&'E"-
+M@P`)``!0Z/S____^3RF#Q!")]D5F.6M`#X=U_O__BU0D!/9"!@%T&XM,)`B+
+M402+`8E0!(D"@^P(45?H_/___X/$$(/$#%M>7UW#55=64X/L#(M\)"#'1"0(
+M`````(V'S````(G".8?,````#X3/`0``B<6-=@"#[`R)UE+H_/___XG#@\00
+M@WA,`'4N@^P,5^C\____B4-,@\00A<!U&XN'S````(E8!(D#B7,$B9_,````
+MZ8@!``")]HM#)"7___\`/>$!$``/A/$```!F@7L0@``/A.4```!F#[9#$&:)
+M0Q!F@_A_=A)F@7LDX0%U(HI#)H/H$3P!=QAF@7L0A0!W$`^W0Q"`O#B8!```
+M_W4:B?;&0Q0&@^P(4U?H_/___X/$$.D*`0``B?9F@7LDX0%U#(I#)H/H$3P!
+M=C>)]HN/6`4``&:!>Q"%`'<=#[=#$`^VE#B8!```C032P>`"*="-!,&)1"0(
+MZPJ!P>@6`0")3"0(9H%[).$!=0N*0R9(/`%V.XUV`&:!>Q"``'0P9H%[).$!
+M=0J*0R:#Z!$\`78>BT0D"/9`(P1U%,9#%`:#[`A35^C\____@\00ZW60@^P(
+M4U?H_/___X/$$(/X`G<*@_@!<QSK"XUV`(/X`W1$ZU&0@^P(4U?H_/___X/$
+M$.M!@WM4`'00@^P(C4-44%?H_/___X/$$(V7S````(N'S````(E8!(D#B5,$
+MB9_,````ZQV#[`A35^C\____@\00B?:)ZCFOS`````^%-O[__X/$#%M>7UW#
+MB?955U93@^P\BD0D5(A$)"`/MLB)RL'B!`'*BUPD4(T4DXN"/`L``(E$)!RX
+M_O___]/`(H)9"P``B$0D&XL3B50D%,=$)!``````@'PD(`-V#,>"<`$``,0!
+M``#K#HM,)!3'@7`!``"H`0``BUPD%(N#=`$``*,`````BDPD((/A`[L'````
+MT^.)Q@G>BT0D%(FP=`$``(/L#&CH`P``Z/S____WTR'>BU0D)(FR=`$``(/$
+M$(!\)"`#=A4/MD0D((N$@M`!``"C`````(G&ZQ</MD0D((M,)!2+A('0`0``
+MHP````")QH/."(!\)"`#=A(/MD0D((M<)!2)M(/0`0``ZQ`/MD0D((M4)!2)
+MM(+0`0``@'PD(`-V%@^V1"0@BTPD%,>$P0`"```X````ZQ0/MD0D((M<)!3'
+MA,,``@``.````(/L#&@0)P``Z/S___^#Q!"`?"0@`W86#[9$)""+5"04QX3"
+M!`(```````#K%`^V1"0@BTPD%,>$P00"````````@WPD'``/A&T(``"_````
+M`(M<)%"`>RL`=C:)]HM4)!P/MD()B?L/MLO3^*@!=!6#[`1J`5'_="1<Z/S_
+M__^#Q!"-=@!'B?B+5"10.$(K=\R+3"0<]D$&`71[@^P(4?]T)%SH_/___X/$
+M"`^V7"0H4_]T)%SH_/___XG8P>`$`=B+7"1@C12#BX)<"P``@\00J0``$`!T
+M"R7__^__B8)<"P``@^P(_W0D)/]T)%SH_/___P^V5"0PB=#!X`0!T(M4)&#'
+MA((\"P```````(/$$.FC!P``BTPD'(!Y-`!T'8/L"%&+7"1<_[/$"0``Z/S_
+M__^+1"0L_D@T@\00@'PD&P`/A)0"``#'1"0,`````,9$)`L`@^P(#[9<)"A3
+M_W0D7.C\____B=C!X`0!V(M,)&"-%(&+@EP+``"#Q!"I```0`'0+)?__[_^)
+M@EP+``"*7"0;BT0D'(A8";\`````BU0D4(!Z*P`/AF$!```/MNN)^P^VRXGH
+MT_BH`0^$/0$``(G(P>`$`<B*5"0;BUPD4(B4@UD+``")^#P#=A&+5"04QX3*
+M``(``#@```#K%(GY#[;!BUPD%,>$PP`"```X````@^P,:!`G``#H_/___X/$
+M$(GX/`-V$`^VP(M4)!2)K,($`@``ZQ")^0^VP8M<)!2)K,,$`@``B?@\`W80
+MBU0D%,>"<`$``,0!``#K#HM,)!3'@7`!``"H`0``BUPD%(N#=`$``*,`````
+MB?F#X0.[!P```-/CB<8)WHM$)!2)L'0!``"#[`QHZ`,``.C\____]],AWHM4
+M)"2)LG0!``"#Q!")^8#Y`W83#[;!BX2"T`$``*,`````B<;K%XG[#[;#BU0D
+M%(N$@M`!``"C`````(G&@\X(B?F`^0-V$`^VP8M<)!2)M(/0`0``ZQ")^@^V
+MPHM,)!2)M('0`0``1XG[BT0D4#A8*P^'HO[__XM$)!R#P"R)PHM,)!PY02QT
+M-X/L#(G34NC\____C5#@B50D'(/$$(M3!(E#!(D8B5`$B0*+3"0,@WD,`'0+
+MB=J+1"0<.5@L=<F#?"0,`'1'BU0D#,9",@"_`````(M,)%"`>2L`=C"+7"0<
+M#[9#"8GYT_BH`704#[9$)`N+7"0,B$P80/Y#,OY$)`M'B?B+5"10.$(K=]"#
+M[`1J`&B!````_W0D*.C\____#[94)#")T,'@!`'0BTPD8,>$@3P+````````
+M@\00Z=0#``"#[`1J`&H&_W0D*.C\____@\0(#[9<)"A3_W0D7.C\____B=C!
+MX`0!V(M<)&"-%(.+@EP+``"#Q!"I```0`'0+)?__[_^)@EP+``"+1"0<@\`L
+MB<*+3"0<.4$L#X07`@``B40D!(/L#%+H_/___XUHX(/$$(U0"#E0"`^$T`$`
+M`)"#[`R-12A0Z/S___^-</B#Q!"`?B$-=1R#[`@%^````%"+1BB+`/]P%.C\
+M____@\00C78`BU8$BP:)4`2)`H!^2P!T(8/L#/]T)%SH_/___\<$)`$```#H
+M_/___X/$$(!^2P!UWX-^'``/A#H!``"+1AS'0&``````@'Y+``^$G@```+\`
+M````BUPD4&:#>T``#X2*````D(M4)%"+@JP%``"+'+B%VW1G9HM#$&8[1AAU
+M768]A0!W5P^WP("\$)@$``#_=$J)T8L29HM#'F;!Z`4/M\"-!(4``P``B8)P
+M`0``BQ%FBTL>@^$?N`$```#3X(F"=`$``,9#%"&#[`1J`%/_="1<Z/S___^#
+MQ!")]D>+7"10#[=#0#GX#X]W____]D8D!'4MBT0D4/Z`5PP``(/L#%#H_/__
+M_X/$#&H!BT8<#[9``5#_="1<Z/S___^#Q!"0@^P$BT8<#[9``E"+1AP/MD`!
+M4&C"````Z/S___^#Q`S_=AR+5"18_[(D!0``:@'H_/___X/$#/]V'(M,)%C_
+ML20%``!J!NC\____QT8<`````(/$$(M<)!S^2PK^33"#[`A6_W0D7.C\____
+M@\00C44H.44H#X4Q_O__BT0D'/Y('(/L"%7_="1<Z/S___^#Q!"+5"0$BTPD
+M'#E1+`^%[?W__XM$)!R#P#B)PHM<)!PY0S@/A!@!``")PX/L#%+H_/___XG&
+M@\00@'A+`'1!BT0D$/]$)!`]?Y:8`'<RB?:#[`S_="1<Z/S____'!"0!````
+MZ/S___^#Q!"`?DL`=`^+1"00_T0D$#U_EI@`=M"#?AP`#X21````BT8<QT!@
+M`````/9&)`1U+(M$)%#^@%<,``"#[`Q0Z/S___^#Q`QJ`8M&'`^V0`%0_W0D
+M7.C\____@\00@^P$BT8<#[9``E"+1AP/MD`!4&C"````Z/S___^#Q`S_=AR+
+M5"18_[(D!0``:@'H_/___X/$#/]V'(M,)%C_L20%``!J!NC\____QT8<````
+M`(/$$(M$)!S^2`J#[`A6_W0D7.C\____@\00B=J+3"0<.5DX#X7J_O__@^P(
+M_W0D)/]T)%SH_/___P^V5"0PB=#!X`0!T(M<)&#'A(,\"P```````(/$$+\`
+M````BT0D4(!X*P`/AO8```")]@^V1"0;B?G3^*@!=0HZ3"0@#X7-````B?N`
+M^P-V$(M$)!3'@'`!``#$`0``ZPZ+5"04QX)P`0``J`$``(M,)!2+@70!``"C
+M`````(GY@^$#C0Q)NP<```#3XXG&"=Z+1"04B;!T`0``@^P,:.@#``#H_/__
+M__?3(=Z+5"0DB;)T`0``@\00B?F`^0-V$P^VP8N$@M`!``"C`````(G&ZQ>)
+M^P^VPXM4)!2+A(+0`0``HP````")QH/."(GY@/D#=A`/ML&+7"04B;2#T`$`
+M`.L3B?H/ML*+3"04B;2!T`$``(UV`$>)^XM$)%`X6"L/APS___^#Q#Q;7E]=
+MPU93@^P$BW0D$(L>L0"`>RL`=AR0#[;1B=#!X`0!T(V$@S@+```Y\'0&03A+
+M*W?E#[;1B=#!X`0!T(T$@XN(/`L``(7)=&+V008"=%P%.`L``#E!&'52@'DT
+M`'0J_D$TZT?^032#[`QH``````^VAHL```!05E'_L\0)``#H_/___X/$(.LB
+MBU$LC7+@C4$L.<)T%8G"@WX,`'3&BT8@C7#@.=!U\(UV`(/$!%M>PXGV55=6
+M4X/L#(I$)"2(1"0+BWPD(+L`````#[;(B<C!X`0!R(T4AXNR/`L``(7V#X1M
+M`0``N/[____3P(1&"0^%70$``(U&+#E&+'09@^P,C8(X"P``4.C\____@\00
+MZ;("``")]KT`````@'X*``^&H0(``(U>.(GV@^P,4^C\____B<*#Q!"+0P2)
+M4P2)&HE"!(D0@'HA``^%[P````^W0AB#O(>8`@```'4*@WH<``^$OP````^W
+M0AB+A(>8`@``@WAP``^$D@```,:"L``````/MD(@J`)T*Z@$=">H`70CQD(B
+M!<9"(P12#[9"25#_<BS_<BCH_/___X/$$.F*````B?8/MD(@J`)U(*@$=!RH
+M`708QD(B`\9"(P2#[`A25^C\____@\00ZV&0#[9"(*@"=%BH!'14J`%U4,9"
+M(P;&0B(%9L>"D```````@^P(4E?H_/___X/$$.LP@^P$_W(<_[<D!0``:@3H
+M_/___X/$$.L8@^P$#[="&%#_MR0%``!J`NC\____@\0018GH.$8*#X?@_O__
+MZ7<!``"-=@!F@?OS`7=2#[9T)`N#[`QH$"<``.C\____@\00@'PD"P-V&8L'
+MBX2PT`$``*,`````J0``$`!U(>L7B?:+!XN$L-`!``"C`````*D``!``=0A#
+M9H'[\P%VLX/L"`^V7"034U?H_/___XD\).C\____B=C!X`0!V(NTASP+``"#
+MQ!"%]@^$ZP```+,`@'\K`'8EC78`#[9&"0^VR]/XJ`%T#X/L!&H`45?H_/__
+M_X/$$$,X7RMWW@^V1"0+B<+!X@0!PHV4ES@+``")5AB-1BPY1BQU"(U&.#E&
+M.'1RO0````#&1"0*`(U&+(G".48L="R#[`R)TU+H_/___XUHX(/$$(M3!(E#
+M!(D8B5`$B0*#?0P`=`B)VCE>+'75D(7M=%3&13(`L0"`?RL`=D@/MD8)T_BH
+M`700#[9$)`J(3"A`_D4R_D0D"D$X3RMWX.LF]D8&`70/@^P(5E?H_/___X/$
+M$.L1@^P(:@!6Z/S___^#Q!"-=@"#Q`Q;7E]=PX/L%(M$)!B+$&;'0#(@`%!2
+MZ/S___^#Q!S#B?975E.+="00BPZ+?BBS`(!Y*P!V&P^VTXG0P>`$`="-A($X
+M"P``.?!T!D,X62MWY8#[`W8<#[;#BQ&+A(+0`0``HP````"I```0`'4<ZRZ)
+M]@^VPXL1BX2"T`$``*,`````J0``$`!T%(/L!%</ML-04>C\____@\00ZQ&0
+M@^P(#[;#4%'H_/___X/$$%M>7\.+5"0$BX($"@``BP"C`````(N"!`H``(M`
+M!*,`````BX($"@``BT`(HP````"+@@0*``"+0`RC`````,-55U93@^P,BWPD
+M(,9$)`L`@'\K``^&W08``(GV#[9$)`N-2`BZ`0```(G3T^.%7"0D=0^-2!#3
+MXH54)"0/A*0&``"`?"0+`W8?#[9$)`N+%XN$PH`!``"C`````*D```@`=1_K
+M/8UV``^V1"0+BQ>+A,*``0``HP````"I```(`'0@5^C\____#[94)`^)T,'@
+M!`'0@8R'8`L`````"`"#Q`2+'XI,)`N`^0-V&P^VP8N$PX`!``"C`````(G"
+M@>(```$`ZQF)]@^VP8N$PX`!``"C`````(G"@>(```$`A=)T08#Y`W80#[;!
+MQX3#@`$``````0#K#@^VP<>$PX`!``````$`A=)T&@^V5"0+B=#!X`0!T(&,
+MAV`+``````$`C78`@'\Y`0^%7@4``(!\)`L#=A\/MD0D"XL7BX3"@`$``*,`
+M````J`%U(^DE`0``C78`#[9$)`N+%XN$PH`!``"C`````*@!#X0'`0``@^P(
+M#[9$)!.)PL'B!`'"C1R7C8-D"P``4/]W%.C\____@\00@[L\"P```'1[BZL\
+M"P``QD0D"@"`?0H`=F.-=3B#[`Q6Z/S___^)PX/$$(M&!(E>!(DSB4,$B1CV
+M0R0"=3*#>QP`=!V#[`3_<QS_MR0%``!J!>C\____@$LD`H/$$(UV`(/L!%-J
+M!E7H_/___X/$$/Y$)`J*1"0*.$4*=Z"Y(*$'`.LE@^P$:@$/MD0D$U!7Z/S_
+M___'!"2@A@$`Z/S___^Y`"TQ`8/$$`^V1"0+B<+!X@0!PHT4EXV"9`L``(F*
+M9`L``,=`""CX`0"!PC@+``")4`R#[`A0_W<4Z/S___^#Q!"`?"0+`W87#[9$
+M)`N+%XN$PH`!``"C`````.L5B?8/MD0D"XL7BX3"@`$``*,`````@'PD"P-V
+M(@^V1"0+BQ>+A,*``0``HP````"I@````'4BZ8,```"-=@`/MD0D"XL7BX3"
+M@`$``*,`````J8````!T9H!\)`L#=A</MD0D"XL7BX3"A`$``*,`````B</K
+M%0^V1"0+BQ>+A,*$`0``HP````")PX!\)`L#=A</MDPD"XL7B=@-```!`(F$
+MRH0!``#K%0^V3"0+BQ>)V`T```$`B83*A`$``(!\)`L#=B$/MD0D"XL7BX3"
+M@`$``*,`````J0``!`!U)>GB`0``B?8/MD0D"XL7BX3"@`$``*,`````J0``
+M!``/A,(!``"`?"0+`W87#[9$)`N+%XN$PH`!``"C`````(G#ZQ4/MD0D"XL7
+MBX3"@`$``*,`````B<.!RP``!`"`?"0+`W80#[94)`N+!XF<T(`!``#K#@^V
+M5"0+BP>)G-"``0``#[94)`N)T,'@!`'0@[R'/`L```!U7H!\)`L#=A*+!XN$
+MT(`!``"C`````(G#ZQ4/MD0D"XL7BX3"@`$``*,`````B<.`?"0+`W83#[94
+M)`N+!XF<T(`!``#II0(```^V5"0+BP>)G-"``0``Z9("``"-=@`/ME0D"XG0
+MP>`$`="+K(<\"P``@WTH``^$TP```(M%*`^W4#+VQ@$/A<,```")QO;"`@^$
+ML````(/L"(U`6%#_=Q3H_/___\9$)!L`@\00@'X?`'9N#[9$)`N+7(8\A=MT
+M5(-['`!T&H/L!/]S'/^W)`4``&H%Z/S___^`2R0"@\00@^P$4VH&5>C\____
+M@\00@'M+`'0?D(/L#%?H_/___\<$)`$```#H_/___X/$$(![2P!UXOY$)`N*
+M5"0+.%8?=Y+'1E@@H0<`QT9@#/@!`(EV9(/L"(U&6%#_=Q3H_/___X/$$.L(
+M9H%(,H``B?:`?"0+`W8=#[9$)`N+%XN$PH`!``"C`````/;$`74AZ1`!```/
+MMD0D"XL7BX3"@`$``*,`````]L0!#X3T````@'PD"P-V'`^V1"0+BQ>+A,*`
+M`0``HP````"H`70@Z=$````/MD0D"XL7BX3"@`$``*,`````J`$/A;8````/
+MMFPD"XGHP>`$`>B-K(<X"P``@WT$``^$F0```(M=!(E<)`2#[`B-12Q0_W<4
+MZ/S____&1"03`(/$$(!["@!V48G>@\8X@^P,5NC\____B<.#Q!"+1@2)7@2)
+M,XE#!(D8@WL<`'0:@^P$_W,<_[<D!0``:@7H_/___X!+)`*#Q!#^1"0#BD0D
+M`XM4)`0X0@IWM,=%+("$'@#'130`````B6TX@^P(C44L4/]W%.C\____@\00
+MD(!\)`L#=AD/MD0D"XL7BX3"@`$``*,`````B<'K%XGV#[9$)`N+%XN$PH`!
+M``"C`````(G!@'PD"P-V$`^V5"0+BP>)C-"``0``ZPX/ME0D"XL'B8S0@`$`
+M`/Y$)`N*7"0+.%\K#X<E^?__@\0,6UY?7<.055=64X/L/(MT)%"+CE@%``"+
+M1"14C;GH%@$`9H%X$(4`=Q</MT`0#[:4,)@$``"-!-+!X`(IT(T\P0^V1S[!
+MX`@#A@0*``"+@$`(``"C`````(G%P>T0P>@8B$0D$`^V1S[!X`@#A@0*``"+
+M@$0(``"C`````(A$)"B-3"0HB<+!Z@B(40'!Z!"(00(/MD<^P>`(`X8$"@``
+MBX!("```HP````"(00.)PL'J"(A1!,'H$(A!!<9!!@#&00<`@^P,_W$$_W0D
+M.`^V1"0D4(GJ#[;:4V@D`P``Z/S___^#Q"#VPP%U&XGIA,ET%8M<)%3&0Q0`
+MN`````#IIP(``(UV`(M$)%2`>!2!=3*-1"0H4`^V1"044(GJ#[;"4/]T)&#H
+M_/___XM,)&3&010"N`````"#Q!#I:P(``(UV`(M<)%2+0R0E____`#WA`0X`
+M=1'&0Q0AN`````#I1P(``(UV`(M$)%3V0&8!=1+WQ0$```!T"H!_(O\/A04"
+M``"#[`A75NC\____@\0(5U;H_/___XL6BTPD9&:+01YFP>@%#[?`C02%``,`
+M`(F"<`$``(L&BUPD9&:+2QZ#X1^Z`0```(G3T^.)F'0!``"+1"1D#[=('HN&
+MK`4``,<$B`````"+7"1D9HM+'HG(9L'H!0^WP(/A'XG3T^.)V??1(8R&L`4`
+M`(M$)&1FBT@>B<AFP>@%#[?`@^$?T^+WTB%4AD2#Q`B+3"1<BU$$BP&)4`2)
+M`@^W01Y0C88`"0``4.C\_____D]+BUPD9,9#%(&#Q!"#>U0`=!2#[`B)V(/`
+M5%!6Z/S___^#Q!")]HU'$(G".4<0#X3E````O0$```")1"0,D(/L#%+H_/__
+M_XG#BQ9FBT`>9L'H!0^WP(T$A0`#``")@G`!``"+!F:+2QZ#X1^)ZM/BB9!T
+M`0``#[=3'HN&K`4``,<$D`````!FBTL>B<AFP>@%#[?`@^$?B>K3XHG1]]$A
+MC(:P!0``9HM+'HG(9L'H!0^WP(/A'XGJT^*)T??1(4R&1(/$"`^W0QY0C88`
+M"0``4.C\_____D]+@\00@WM4`'00@^P(C4-44%;H_/___X/$$(V6S````(N&
+MS````(E8!(D#B5,$B9[,````BU0D##E7$`^%)?___XM,)%2!863___[_QH>P
+M````!(/L"%%7Z/S___^X`0```(/$$.LCC40D*%`/MD0D%%")ZP^VPU#_="1@
+MZ/S___^#Q!"X`````)"#Q#Q;7E]=PU575E.#["R+?"1$BVPD0(MU`(N&*`H`
+M`(E$)!C'1"04`````(M$)$P+1"1(#X3J`@``#[?7C032C02"C01"P>`$BTPD
+M&/9$""$"=!"+AJP%``"+!)#&0!0"ZQ&0#[?'BY:L!0``BP2"QD`4(0^WQXN6
+MK`4``(L4@HM")"7___\`/>$!$``/A)T!``"P_V:!>A"%`'<+#[="$(J$,)@$
+M```\_W48#[?'BY:L!0``BP2"QD`4!NG3"```C78`#[;`C13`P>("*<*+AE@%
+M``"-%-")5"04@'PD2P!Y80^V0B"H`G0EJ`1T(:@!=!V+!HN`6`$``*,`````
+MB<*%P'0*BP:)D%@!``")]HL&BX!0`0``HP````")PH/*`HL&B9!0`0``BP:+
+M@`0!``"C`````(G"@,[_BP:)D`0!```/M]>-!-*-!(*-!$+!X`2+7"089O=$
+M&"`""`^$S````,9$)!,`LP"`?BL`=EV-=@`/MD4)#[;+T_BH`71'@/L#=AJ+
+M!HN$B-`!``"C`````*D``!``=1WK*XUV``^VPXL6BX2"T`$``*,`````J0``
+M$`!T$+@!````B-G3X`A$)!.-=@!#.%XK=Z:`?"03`'1;BEPD$SA="752B?AF
+MP>@%#[?`B?F#X1^Z`0```-/BA52&1'4WBT0D%("XL`````)W!\:`L`````.#
+M[`@/M]>+AJP%``#_-)#_="0@Z/S___^#Q!#I9P<``(UV`/9$)$L!#X19!P``
+M#[?'BY:L!0``BPR"QD$4(8M!)"7___\`/>$!#@`/A#8'``"+5"04#[9"/L'@
+M"`.&!`H``(N`0`@``*,`````B<?![Q")Q<'M&`^V0C[!X`@#A@0*``"+@$0(
+M``"C`````(A$)""-7"0@B<+!Z@B(4P'!Z!"(0P*+5"04#[9"/L'@"`.&!`H`
+M`(N`2`@``*,`````B$,#B<+!Z@B(4P3!Z!"(0P7&0P8`QD,'`/9!9@%U(XGX
+M#[;0]L(!=!E3B>L/ML-04E'H_/___X/$$.F'!@``C78`@^P(45;H_/___X/$
+M$.ER!@``B?8/M]>+AJP%``"+!)!F@7@DX0$/A2@!```/MD`F@^@&@_@*#X=(
+M!@``_R2%M`T```^WUXN&K`4``(L,D(T$THT$@HT$0HG#P>,$BWPD&(I$.S.(
+M012+AJP%``"+!)#V0!,$#X0)!@``@'@4``^$_P4``(-X.``/A/4%``"+4#B*
+M1#LSB`+IYP4```^WUXT$THT$@HT$0L'@!(G3BY:L!0``BQ2:BTPD&(I$""J(
+M0A2+AJP%``"+!)B#>#0`#X2O!0``@^P,C03;C02#C01#P>`$#[:$""$$``!0
+MZ/S___^)Q8N&K`4``(L$F(/$$#MH('8#BV@@#[?7BX:L!0``BPR0C032C02"
+MC01"P>`$BUPD&(U$&"B#[`154/]Q-.C\____@\00Z4<%```/M\>+EJP%``"+
+M!(+&0!0`Z3(%``")]@^WUXN&K`4``(LLD(M%2(E$)`RP_V:!?1"%`'<+#[=%
+M$(J$,)@$```/ML"-%,#!X@(IPHN&6`4``(T4T(E4)!3&@K``````#[9"(*@"
+M#X1-`0``J`0/A$4!``"H`0^$/0$``,9%%`#V168@#X2_!```@WPD#``/A+0$
+M``"+5"0,]D)=`@^$A@```(-Z6`!T%H/L!/]U(/]U-/]R6.C\____@\00ZVJ#
+M?30`=&2_`````(M,)`R#>6``=`OV05T!=06+>6#K(X/L!&H!_[8D!@``_W0D
+M&(M<)!S_4V2#Q!"%P'0&B[XD!@``@WT@`'0ABUTT@^P$_S=3_W<(Z/S___\#
+M'X/$$(U'!(/'$(,X`'3BBWPD%`^V1S[!X`@#A@0*``"+@$`(``"C`````(G"
+MP>H0BTPD#(A14\'H&&:)04@/MD<^P>`(`X8$"@``BY!$"```B14`````9@^V
+MPF:)04P/ML9FB4%.B=#!Z!!F#[;`9HE!4,'J&(A14@^V1S[!X`@#A@0*``"+
+M@$P(``"C`````&8/ML!FB4%*Z9$#``"0#[?7C032C02"C01"B<'!X02+7"08
+MBD09,X3`#X6G````BX:L!0``BP20QD`4`/9%9A`/A%@#``"#?"0,``^$30,`
+M`(I$&3.+?"0,B$=*BD==J`(/A#<#``"_`````(M4)`R#>F``=`FH`74%BWI@
+MZR.#[`1J`?^V)`8``/]T)!B+3"0<_U%D@\00A<!T!HN^)`8``(-](``/A/("
+M``"+732-=@"#[`3_-U/_=PCH_/___P,?@\00C4<$@\<0@S@`=.+IR0(``)`\
+M`@^%>`(```^WWXT$VXT$@XT$0\'@!(M4)!B-1!!`B40D"(H8@^-_QD0D!P#&
+M1"0&`,9$)`4`#[?7C032C02"C01"P>`$BTPD&(M$"#B)1"0<C4PD'`^V5"0<
+MP>(8#[9!`<'@$`G"#[9!`L'@"`G"#[9!`PG"B10D@/MQ=C>#^@%V#HM$)`B*
+M6`&#XP^(7"0'@SPD`G8+BU0D"(I2`HA4)`:#/"0#=ER+3"0(BDD#B$PD!>M/
+M@SPD`G8.BT0D"(I8`H/C#XA<)`>#/"0'=C6+5"0(#[9"!X/`"#D$)'8#B00D
+M@SPD#'8+BTPD"(I)#(A,)`:#/"0-=@N+7"0(BEL-B%PD!0^WUXN&K`4``(L$
+MD(!X'`!T78,\)`!T5\9`%""+AJP%``"+!)"*%"0X4!QS!P^V0!R)!"0/M]>+
+MAJP%``"+#)"#>3@`=#F-!-*-!(*-!$+!X`2+7"08C4080(/L!/]T)`10_W$X
+MZ/S___^#Q!#K$`^WQXN6K`4``(L$@L9`%"*`?"0'!'40#[?'BY:L!0``BP2"
+MQD`4`CEU&`^$)0$``(-\)`P`#X0:`0``]D5F$'1A#[?'C13`C120C110P>($
+MBTPD&(I$"C.+7"0,B$-*]D-=`G0]B@0D.$4<<P.*11R$P'0N#[;(#[?7C032
+MC02"C01"P>`$BUPD&(U$&$"#[`114(M\)!C_=U3H_/___X/$$`^V1"0'@_@+
+M=U7_)(7@#0``BT0D#,9`7@'IE0```(!\)`8$=1*`?"0%`G4+BU0D#,9"7A'K
+M?9"+3"0,QD%>`NMRBUPD#,9#7A#K:(M\)`S&1UX+ZUZ+1"0,QD!>!NM4BU0D
+M#,9"7@WK2HGV/"AU'8M,)!2*04M(B$%*#[?7BX:L!0``BP20QD`4@>LG/`AU
+M$(/L#&@0)P``Z/S___^#Q!`/M\>+EJP%``"+!(+&0!0AC78`@\0L6UY?7<-6
+M4X/L!(MT)!")\XL&BX!0`0``HP````")PHL&B9!0`0``B?;WP@#__P!T$(/L
+M"%)6Z(KK__^#Q!"-=@"+`XN`4`$``*,`````B<*+`XF04`$``/?"`/__`'7)
+MN`````"#Q`1;7L.)]E575E.#["R+?"1`9HN',@L``&:)1"0BBP>+@$`!``"C
+M`````"7_#P``9HF',@L``+@`````9HM4)")F.9<R"P``#X3S!@``9H&_,@L`
+M`/\/#X1\!@``9HM,)")F.8\R"P``#X1J!@``C;?4````B70D%(GVBZ\H"@``
+M9O]$)")FBT0D(F8YAS8+``!W!V;'1"0B```/MU0D(HN'<`H``(M<D`3WPP``
+M"``/A+4```"+!XN`4`$``*,`````B<.+!XF84`$``,=$)"0`````]\,`__\`
+M=%:Z`````(!_*P!T2[T!````9@^V3RMFB4PD#@^WPHU("(GNT^:%\W4+C4@0
+MB>C3X(7#=!L/M]*-!%+!X`,IT(V$AR@!``")1"0DZPN-=@!"9CE4)`YWQ(-\
+M)"0`=16#[`S_="1,Z/S___^#Q!#I>04``)"#[`S_="1,Z/S___^+5"0TB$(+
+M@\00Z5T%``"0B=Z!YO\/```/M\:-%,"-%)"-%%#!X@2)T8M4*B"+3"DDB50D
+M&(E,)!R+EZP%``"++(*%[0^$(@4``/?#```@``^$=@$``(!]%($/A5`!``#&
+M110A#[=5'HN'K`4``,<$D`````!FBTT>B<AFP>@%#[?`@^$?O@$```#3YHGQ
+M]]$AC(>P!0``9HM-'HG(9L'H!0^WP(/A'[H!````T^*)T??1(4R'1(/L"`^W
+M11Y0C8<`"0``4.C\____@\00@WU4`'00@^P(C4544%?H_/___X/$$&:!?1"%
+M``^'P0````^W11"`O#B8!```_P^$KP```&:#?1!_=R4/MI0XF`0``(N/6`4`
+M`(T$TL'@`BG0BT3!*(!X!/]U6NF#````9H%]$($`=RL/MT40#[:$.)@$``"+
+MCY`%``"-!$"-!,")PL'B!2G"BT21"(!X!/]U).M0#[=%$`^VA#B8!```BY=T
+M!0``C01`C02`BT3"5(!X!/]T+H/L"%57Z/S___^#Q!"-E\P```"+A\P```")
+M:`2)10")502)K\P```#IO0,``)"-10B+3"04BU$$B4$$B4T(B5`$B0+IH@,`
+M`(GVB?!FP>@%#[?`B?&#X1^Z`0```-/BA52'1`^%@0,```^WUHN'K`4``(L$
+MD&:!>!"%``^'H0````^W4!"`O#J8!```_P^$CP```&:#>!!_=Q\/MI0ZF`0`
+M`(N/6`4``(T$TL'@`BG0BT3!*(I0!.MK#[?6BX>L!0``BP209H%X$($`=R@/
+MMT`0#[:$.)@$``"+CY`%``"-!$"-!,")PL'B!2G"BT21"(I0!.LO#[?6BX>L
+M!0``BP20#[=`$`^VA#B8!```BY=T!0``C01`C02`BT3"5(I0!.L"LO^`^O]T
+M#0^VPH"\.!X%``#_=4*)\&;!Z`4/M\")\8/A'[X!````T^:%=(=$#X65`@``
+MQD44!H/L"&H`5>C\____@\0,:@!55^C\____@\00Z7("```/ML(/MH0X'@4`
+M`(E$)"2-!$#!X`,K1"0DC82'*`$``(E$)"2+1"0<"T0D&'0(]\,```(`=1#'
+M1"08`````,=$)!P`````BU0D)/9"!@(/A&0!``#_="0<_W0D'`^WQE!2Z/S_
+M__^)\&;!Z`4/M\")\8/A'[L!````B=K3XH/$$(54AT0/A>@!``"`?12!#X6%
+M````#[=5'HN'K`4``,<$D`````!FBTT>B<AFP>@%#[?`@^$?T^.)V??1(8R'
+ML`4``(/L"`^W11Y0C8<`"0``4.C\____@\0(55?H_/___X/$$(-]5`!T$(/L
+M"(U%5%!7Z/S___^#Q!"-E\P```"+A\P```"):`2)10")502)K\P```#I60$`
+M`,9$)"$`QD0D(`"+A]0````Y1"04=!"-E]0```#^1"0ABP`YPG7V@'PD(0!T
+M,8V?U````(/L#%/H_/___XU(^(/$$(M3!(E#!(D8B5`$B0(YZ74%QD0D(`'^
+M3"0A==6`?"0@``^%\````(U%"(M,)!2+402)002)30B)4`2)`HGP9L'H!0^W
+MP(GQ@^$?O@$```#3Y@FTAX0```#IN@```/]T)!S_="0<#[?&4/]T)##H_/__
+M_\9$)#$`QD0D,`"+A]0```"#Q!`Y1"04=!*-E]0```")]OY$)"&+`#G"=?:`
+M?"0A`'0UC9_4````D(/L#%/H_/___XU(^(/$$(M3!(E#!(D8B5`$B0(YZ74(
+MQD0D(`&-=@#^3"0A==*`?"0@`'4W@'T4@70QC44(BTPD%(M1!(E!!(E-"(E0
+M!(D"B?!FP>@%#[?`B?&#X1^^`0```-/F";2'A````&:+1"0B9CF',@L```^%
+MHOG__XV'U````(G".8?4````=$>)]H/L#(G64NC\____@^@(9HM('HG+9L'K
+M!0^WVX/A'[K^____T\(AE)^$````@\0,:@!05^C\____@\00B?(YM]0```!U
+MNX/L#%?H_/___[@!````@\00@\0L6UY?7<.)]E=64X/L$(M<)"!FQT0D#@``
+MBYLD!0``O@````"-?"0.BP.+@%`!``"C`````(L3B8)0`0``A<!T&XL#QX!0
+M`0```0```(/L#%/H_/___X@$-X/$$('#8`P``$:#_@%^P(!\)`X`=0RX````
+M`(!\)`\`=`6X`0```(/$$%M>7\.055=64X/L#(ML)""Y`````&8/MD4KB<-F
+M@_@`=AF+1"0D#[90"8UV`(G0T_BH`74&068YRW?RBU0D)(-Z*`!T)8/L"(M"
+M*(/`6%#_=13H_/___X/$"(M,)"S_<2A5Z/S___^#Q!"+1"0D@\`XB<*+3"0D
+M.4$X#X17`0``B40D")"#[`Q2Z/S___^)QH/$$(-X'``/A!4!``"`>$L`#X2'
+M````OP````!F@WU``'1[B?:+A:P%``"+'+B%VW1C9HM#$&8[1AAU668]A0!W
+M4P^WP("\*)@$``#_=$:+50!FBT,>9L'H!0^WP(T$A0`#``")@G`!``"+50!F
+MBTL>@^$?N`$```#3X(F"=`$``,9#%"&#[`1J`%-5Z/S___^#Q!"01P^W14`Y
+M^'^'BT8<QT!@`````/9&)`1U)_Z%5PP``(/L#%7H_/___X/$#&H!BT8<#[9`
+M`5!5Z/S___^#Q!")]H/L!(M&'`^V0`)0BT8<#[9``5!HP@```.C\____@\0,
+M_W8<_[4D!0``:@'H_/___X/$#/]V'/^U)`4``&H&Z/S____'1AP`````@\00
+MBT0D)/Y("H/L"%95Z/S___^#Q!"+5"0(BTPD)#E1.`^%KO[__XM$)"3'0"@`
+M````BT4`BXA8`0``B0T`````A<ET"8M%`(F(6`$``(/$#%M>7UW#C78`5U93
+MBW0D$(M\)!2S`(!^*P!V%0^V5PF0B="(V=/XJ`%U!D,X7BMW\/9'"`)U"(U'
+M.#E'.'5F@^P,5^C\____@\00A,!T1(/L#%;H_/___XG!@\00A<!T1(U'.(M0
+M!(E(!(D!B5$$B0K^1PJ)>2C&02`%QD$A`,9!20]J`6H!45?H_/___X/$$.L2
+M@^P(#[;#4%;H_/___X/$$(GV6UY?PU575E.#[!"+;"0HBWU4#[9%*U#_="0H
+M5^C\____B<9F@TTR$+L`````@\00BU0D(&8/MD(K9HE$)`IF@_@`=A8/ME<)
+MB="(V=/XJ`%U"$-F.5PD"G?N9H/[`W8@#[?#BTPD((L1BX2"T`$``*,`````
+MJ0``$`!U..L>B?8/M\.+3"0@BQ&+A(+0`0``HP````"I```0`'48@^P(#[;#
+M4/]T)"SH_/___X/$$.F8`0``C4<X.4<X#X2,`0``A?8/A(0!```/MD9)QT2%
+M/`````"+5@2+!HE0!(D"@^P$5FH&5^C\____@\00@'Y+`'0BD(/L#/]T)"SH
+M_/___\<$)`$```#H_/___X/$$(!^2P!UWX-^'`!T7HM&',=`8`````#V1B0$
+M=1:+1"0@_H!7#```@^P,4.C\____@\00@^P$_W8<BU0D*/^R)`4``&H!Z/S_
+M__^#Q`S_=AR+3"0H_[$D!0``:@;H_/___\=&'`````"#Q!#^3PJ#[`A6_W0D
+M+.C\____BU0D,(L"BY!8`0``B14`````@\00A=)T#(M,)""+`8F06`$``,9%
+M)@!F@V4R[[L`````@'T?`'0=9@^V51^0#[?#BW2%/(7V=`:`?B+_=7-#9CG:
+M=^GV13*`=!*#[`A5_W0D+.C\____@\00ZU6[`````(!]'P!T/8GV#[?#BW2%
+M/(7V="7V1B0"=!^#[`3_=AR+1"0H_[`D!0``:@;H_/___X!F)/V#Q!"00V8/
+MMD4?9CG8=\5FQT4R`@"`92W]C78`@\0,6UY?7<-64X/L!(M<)!"+="04BT94
+ML0"`>RL`=A(/ME`)B=#3^*@!=09!.$LK=_+&1B8,@^P(5E/H_/___X/$%%M>
+MPXGV5U93@^P0BWPD((I$)"2(1"0/NP`````/MO")]H/L#&@0)P``Z/S___^#
+MQ!"`?"0/`W89BP>+A+#0`0``HP````"I```0`'4AZQ>)]HL'BX2PT`$``*,`
+M````J0``$`!U"$-F@?OS`7:S@^P(#[9<)!=35^C\____B3PDZ/S___^)V,'@
+M!`'8C02'@\00]H!8"P```702@^P(_[`\"P``5^C\____@\00@\006UY?PY!5
+M5U93@^P,BW0D((L^#[=4)"2+AZP%``"+')"]`````,=$)`@`````9H%[).$!
+M=2B*0R:#Z!$\`7<>BT8HB40D"(M$)"P+1"0H=4F+1"0(QD`U`.L_C78`BX]8
+M!0``C:GH%@$`9H%[$(4`=Q</MT,0#[:4.)@$``"-!-+!X`(IT(TLP8M$)"P+
+M1"0H=0?&A;``````@'L4@74&@&8(]XGVBT0D+`M$)"@/A<H```#&0Q0`]D-F
+M(`^$W`$``(MS2(7V#X31`0``]D9=`G0C@WY8`'0=@WLT`'07@^P$_W,@_W,T
+M_W98Z/S___^#Q!"-=@`/MD4^P>`(`X<$"@``BX!`"```HP````")PL'J$(A6
+M4\'H&&:)1D@/MD4^P>`(`X<$"@``BY!$"```B14`````9@^VPF:)1DP/ML9F
+MB49.B=#!Z!!F#[;`9HE&4,'J&(A64@^V13[!X`@#AP0*``"+@$P(``"C````
+M`&8/ML!FB49*Z2$!``"0@'L4@'4&QD,4(8GV@^P$_W0D,/]T)#!H<`,``.C\
+M____@\009H%[).$!=2"*0R:#Z!$\`7<6@^P,_W0D%.C\____@\00Z=8```")
+M]O9$)"L!=&F+0R0E____`#WA`0X`=%H/MD4^P>`(`X<$"@``BX!`"```HP``
+M```/MD4^P>`(`X<$"@``BX!$"```HP`````/MD4^P>`(`X<$"@``BX!("```
+MHP````"#[`A35^C\____@\00ZV>-=@"`?"0K`'D=BP>+@%@!``"C`````(G!
+MA<!T2HL'B8A8`0``ZT"`?"0H`'@Y@'PD+P!Y,HL79HM#'F;!Z`4/M\"-!(4`
+M`P``B8)P`0``BQ=FBTL>@^$?N`$```#3X(F"=`$``(GV@\0,6UY?7<-75E.#
+M[!"+7"0DBWPD((I#%(A$)`^+CU@%``"-L>@6`0!F@7L0A0!W%P^W0Q`/MI0X
+MF`0``(T$TL'@`BG0C33!@'PD#P!U)6;'AI```````(![)!QU%H![)@)U$(/L
+M"%-6Z/S___^#Q!"-=@"#>U``=!*#[`B-0U!05^C\____@\00B?:#[`A35^C\
+M____@\00@'PD#P9T.X/L"(V>``$``%/_=Q3H_/___\>&``$``("$'@#'A@@!
+M````````B;8,`0``@\0(4_]W%.C\____@\00@\006UY?PXGV55=64X/L#(M\
+M)""%_P^$P````(M'*(LH@^P,5>C\____B<.-0#R)1"08@\00A=L/A)X```"#
+M[`Q5Z/S___^)QH/$$(7`=1&#[`A35>C\____@\00ZWV)]L9#%:QFBT<89HE#
+M$(EK&,=#9`@```")<U"+1@B)0S3'0R``"```C8>T````B4,XQD,<(,=#;```
+M``#&0R0<QD,E`<9#)@+&0R<(QD,H`(/L"&H`_W0D%.C\_____W,@_W80_W8,
+M_W0D).C\____@\084U7H_/___X/$$(/$#%M>7UW#D%575E.#[`R+;"0@BWPD
+M)(I$)"B(1"0+BT4HBS#&1"0*`(UV``^V1"0*BI0PF`0``(#Z_W13@^P$:@B-
+M1PQ0#[;2C032P>`"*="-',4`````B=@#AE@%```%G````%#H_/___X/$$(3`
+M=!Z+AE@%``"*5"0+B)0#U@```(N&6`4``(FL`^````#^1"0*>9:#Q`Q;7E]=
+MPXGV55=64X/L#(M,)"2+032)1"0(#[9``HG%P>4(BU0D"&8/MD(#`<4/M_6-
+M5@0/MT$@.<(/C]````"+7"0(@\,(QD0D!P"+5"0(C406!#G8#X:C````B@.$
+MP'A^@^`//`9U=_9#`\!T!O9#!<!U:_8#$'0PC7,(OP````"`>P0`=EB#[`0/
+MMD,#4%;_="0LZ/S___^#QAR#Q!!'B?@X0P1WX.LVC7,$OP````"`>P(`=B@/
+MME0D!XD4)(/L!/]T)`16_W0D+.C\____@\8<@\001XGX.$,"=^&0_D0D!P^V
+M0P&-7`,"#[?%BU0D"(U$$`0YV`^'7?___X/L"&H!_W0D+.C\____@\00@\0,
+M6UY?7<-55U93@^P$BVPD&`^V?"0<BD0D)(A$)`.+12B+,+,`B?D#3"0@B$PD
+M`HUV``^VPXJ$,)@$```\_W1*#[;0BXY8!0``C032P>`"*="-%,4`````B?@X
+MA`K6````=2<YK`K@````=1Z*1"0"B(0*U0```(N&6`4``(I,)`.(C`+4````
+MB?;^PWFD@\0$6UY?7<-64XMT)!B*7"00BE0D%(M$)`R+2"R`N9````!/=RT/
+MMH&0````C02`C103B)3!E0````^V@9````"-!(")\HB4P90```#^@9````!;
+M7L.)]E575E.#[`R+3"0DBUDT#[9#`L'@"&8/ME,#`=`/M\"#P`0/MU$@.=`/
+MC_(```"-4PC&1"0+`+T`````BDL!B?:*0@(`1"0+#[9"`XU4`@1%B>@XP7/J
+MB=;&1"0*`+T`````B>HZ5"0+#X.6````B?:*1@$`1"0*@#X!=`6`/A=U,XI<
+M)`HJ7@$Z7"0*<V:-10$/MO@/M@905P^VPU#_="0LZ/S___^#Q!!#.EPD"G+D
+MZT*)]HM4)""+0BR`N)$````!=#"*7"0**EX!.EPD"G,CC44!#[;XD`^V!E!7
+M#[;#4/]T)"SH_/___X/$$$,Z7"0*<N2#Q@1%B>@Z1"0+#X)L____BU0D((M"
+M+,:`D0````&#[`AJ!U+H_/___X/$$(/$#%M>7UW#55=64X/L+(MT)$"+;"1$
+ML_^)Y_RY!0```+@`````\ZMF.>ES1HUV`&:#^0YW"0^WT8H$,H@$%`^WP8H$
+M,(/H,#P)=QR`^_]U`[,`D`^VPXT$@`^WT8H4,HU<0M#K!XGV@/O_=09!9CGI
+M<KT/ML.#Q"Q;7E]=PXGV5U93@^P$BWPD%(I$)!B(1"0#BE0D'(A4)`*+1RB+
+M,+,`C78`#[;#BH0PF`0``#S_=#H/MM"+CE@%``"-!-+!X`(IT,'@`SF\".``
+M``!U'8I4)`,XE`C5````=1"*5"0"B)0(UP```.L'C78`_L-YM(/$!%M>7\.0
+M55=64X/L#(ML)"2*1"0HB$0D"XM$)""+<"R[`````(U]!(GVC02;C83&D```
+M`(!X!`%V-(!X!!=T+HI4)`LX4`5U)8I5`X#Z('8"LB"-!)N-A,:<````#[;2
+M@^P$4E=0Z/S___^#Q!!#@_M/?K:#Q`Q;7E]=PXGV55=64X/L#(M,)"3&1"0&
+M`(MI-`^V10+!X`AFB40D"F8/MD4#9@%$)`H/MUPD"HU3!`^W02`YP@^/"@$`
+M`(UU",9$)`<`C40K!#GP#X;E````C78`#[9&`L'@"&8/ME8#`<)FB50D"`^W
+MVE.-1@10Z/S___^#Q`@\_W5MQD0D!O^-7#,$#[=$)`J-1"@$.=AV<8UV``^V
+M0P+!X`AF#[93`XT\`@^WQU"-0P10Z/S___^#Q`@\_W41@'PD!O]U1,9$)`8`
+MZSV-=@`Z1"0&<P2(1"0&#[?'C5P#!`^W1"0*C40H!#G8=Z[K&BI$)`8/ML!0
+M#[9$)`M0_W0D*.C\____@\0,@^P$#[9$)`M05O]T)"SH_/____Y$)!</MT0D
+M&(UT!@2#Q!`/MT0D"HU$*`0Y\`^''O___X/L"&H"_W0D+.C\____@\00@\0,
+M6UY?7<.05E.#[`2+="00BTPD%(M9-`^V0P+!X`AF#[93`P'0#[?`C5`$#[=!
+M(#G"?R"#[`124_^VY````.C\____@\0(:@!6Z/S___^#Q!")]H/$!%M>PXGV
+M55=64X/L#(ML)""+1"0DBD`4B$0D!XM4)"1F@7H0A0`/AZ8````/MT(0@+PH
+MF`0``/\/A)0```!F@WH0?W<E#[:4*)@$``"+C5@%``"-!-+!X`(IT(M$P2@/
+MMD`$!1`%``#K;8M$)"1F@7@0@0!W+@^W0!`/MH0HF`0``(N-D`4``(T$0(T$
+MP(G"P>(%*<*+1)$(#[9`!`40!0``ZS.+5"0D#[="$`^VA"B8!```BY5T!0``
+MC01`C02`BT3"5`^V0`0%$`4``.L(C78`N`\&```/MD0%#HE$)`B-!$#!X`,K
+M1"0(C82%*`$``(E$)`B+C5@%``"+1"0DC;'H%@$`9H%X$(4`=Q</MT`0#[:4
+M*)@$``"-!-+!X`(IT(TTP8!\)`<`#X4_`@``9L>&D```````BU0D)(!Z)!P/
+MA2@"```/MD(F@_@"=%R#^`)_"H/X`70HZ1`"``"#^`=T,X/X"@^%`@(``(/L
+M"/]T)"Q6Z/S___^#Q!#I[0$``(/L"/]T)"Q6Z/S___^#Q!#IV`$``(/L"/]T
+M)"Q6Z/S___^#Q!#IPP$``(/L"/]T)"Q6Z/S___^#Q`B-G@`!``!3BT8HBP#_
+M<!3H_/___\>&``$``("$'@#'A@@!````````B;8,`0``@\0(4XM&*(L`_W`4
+MZ/S___^#Q!"0QD8B_[\`````BT0D"(!X"@`/AJD```")PX/#.(/L#%/H_/__
+M_XG&@\00BT,$B7,$B1Z)1@2),(!^(O]T:X!^(0!U;8"^L0`````/A"`!```/
+MMD8@J`)T#*@$=`BH`0^%Y@````^V1B"H`G4,J`1T"*@!#X7I````#[9&(*@"
+M#X3L````J`0/A.0```"H`0^%W````(/L"%95Z/S___^#Q!#IR@```(GVQH:Q
+M`````)!'B?J+1"0(.%`*#X=<____B?J+1"0(.%`*=5V_`````(!X"@!V4HG#
+M@\,XD(/L#%/H_/___XG&@\00BT,$B7,$B1Z)1@2),(!^(O]T'X!^(2)T!H!^
+M(0UU$X/L"&H*5NC\____@\00ZU>-=@!'B?J+1"0(.%`*=[2+5"0(QD(%_X/L
+M"%)5Z/S___^#Q!"`?"0'``^%D````.LF5@^V1DE0_W8L_W0D%.C\____@\00
+MZP^#[`A65>C\____@\00B?:+1"0D@WA0`'06@^P(BT0D+(/`4%!5Z/S___^#
+MQ!")]H/L"/]T)"Q5Z/S___^#Q!"`?"0'`'0Q9O^&D````&:#OI`````*=A!F
+MQX:0``````#I.O[__XGV@^P(:@I6Z/S___^#Q!")]H/$#%M>7UW#55=64X/L
+M&(ML)"R*1"0PB$0D%XM%*(LX5^C\____B<.-0#R)1"04@\00A=L/A*````"#
+M[`Q7Z/S___^)QH/$$(7`=1"#[`A35^C\____@\00ZW^0QD,5K&:+11AFB4,0
+MB7L8QT-D"````(ES4(M&"(E#-,=#(``(``"-A;0```")0SC&0QP@QT-L````
+M`,9#)!S&0R4!BD0D"XA#)L9#)PC&0R@`@^P(:@#_="00Z/S_____<R#_=A#_
+M=@S_="0@Z/S___^#Q!A35^C\____@\00@\0,6UY?7<.)]E575E.#[`R+;"0@
+MBT4HBS"+E>0````/MD("B</!XPAF#[9"`P'##[?#@\`$/0`(```/C]T```"#
+M[`Q6Z/S___^)QX/$$(7`#X3'````@^P,5NC\____B40D&(/$$(7`=1.#[`A7
+M5NC\____@\00Z:$```"0C4<\B40D!`^WVX/#!(/L!%/_M>0```"+5"04_W((
+MZ/S____&1Q6L9HM%&&:)1Q")=QB)7R"#3V02BU0D&(M""(E'-(E74(V%M```
+M`(E'.,9''"#'1VP`````QD<D'<9')1#&1R8"#[;'B$<GB%\H@\0(:@#_="00
+MZ/S_____=R"+1"0<_W`0_W`,_W0D(.C\____@\085U;H_/___X/$$(/$#%M>
+M7UW#55=64X/L!(M\)!B*1"0<B$0D`XI4)"2(5"0"BT<HBS"+;RS&1"0!``^V
+M1"0!BHPPF`0``(#Y_W1C#[;1BYY8!0``C032P>`"*=#!X`,YO!C@````=4:*
+M5"0#.)08U0```'4Y@'PD`@!T#XN$&-P```"+3"0@B0'K*0^VT8N.6`4``(T$
+MTL'@`BG0BUPD((L3B93!W````.L)C78`_D0D`7F&QD0D`0"0#[9$)`&-!("-
+M5,4`C8*0````@'@$`78\@'@$%W0VBDPD`SA(!74M@'PD`@!T#HN"F````(M<
+M)"")`^LC#[9$)`&-!("+3"0@BQ&)E,68````ZPR0_D0D`8!\)`%/=J&#Q`1;
+M7E]=PY!55U93@^P(BVPD'(I$)""(1"0#BYWD````#[9#`HG&P>8(9@^V0P,!
+MQ@^WQH/`!#T`"```?V:`?"0#`'0+BH78````B$,!ZPF*0P&(A=@```"-0PB)
+M1"0$OP`````/M\:-1!@$.T0D!'8RB?8/MD0D`U"-1"0(4(GZ#[;"4%7H_/__
+M_T>#1"04!(/$$`^WQHU$&`0[1"0$=].-=@"#Q`A;7E]=PU.#[`B+7"00BE0D
+M%(I$)!B(1"0#QT0D!`````"`>R,!=$IJ`8U$)`A0#[;"4%/H_/___X/$$(-\
+M)`0`="^+1"0$@`B`@'PD`P!T#8M$)`2`2`,@ZPN-=@"+1"0$@&`#WX/L#%/H
+M_/___X/$$(/$"%O#C78`5U93BUPD%(M\)!"+<TAF@7L0A0`/AXH````/MT,0
+M@+PXF`0``/]T?&:#>Q!_=R$/MI0XF`0``(N/6`4``(T$TL'@`BG0BT3!*(I0
+M!.M8B?9F@7L0@0!W*`^W0Q`/MH0XF`0``(N/D`4``(T$0(T$P(G"P>(%*<*+
+M1)$(BE`$ZR8/MT,0#[:$.)@$``"+EW0%``"-!$"-!("+1,)4BE`$ZP6-=@"R
+M_['_9H%[$(4`=PL/MT,0BHPXF`0``(#Z_W08#[;"@+PX'@4``/]T"X#Y_W0&
+M@'L4!G4T@WM0`'02@^P(C4-04%?H_/___X/$$(GV@^P(4U?H_/___\=&+/__
+M__^)-"3_5BB#Q!#K?(![%`!U._9#9`AT%(/L!/]S(/]S-/]V'.C\____@\00
+MQT8L`````(-^(`!T"(M6((M&%(D"@^P,5O]6*(/$$.L3QT8L_____X/L#%;_
+M5BB#Q!")]H-[4`!T$H/L"(U#4%!7Z/S___^#Q!")]H/L"%-7Z/S___^#Q!"-
+M=@!;7E_#55=64X/L&(ML)"R*1"0PB$0D%XM%*(LX5^C\____B<.-4#R)5"04
+M@\00A<`/A-4```"#[`Q7Z/S___^)QH/$$(7`=12#[`A35^C\____@\00Z;$`
+M``")]L9#%:QFBT489HE#$(M$)#")0TB)>QC'0V0(````B7-0BT8(B4,TBT0D
+M+(E#((V%M````(E#.,9#'"#'0VP`````QD,D/,9#)0**5"0+B%,FBT0D*,'H
+M$(A#)XM4)"@/ML:(0RB(4RF+1"0LP>@0B$,JBU0D+`^VQHA#*XA3+,9#+0"#
+M[`AJ`/]T)!#H_/____]S(/]V$/]V#/]T)"#H_/___X/$&%-7Z/S___^#Q!"#
+MQ`Q;7E]=PY!55U93@^P8BUPD+(I$)#"(1"07BT,HBRA5Z/S___^)QH/$$(7`
+M#X3M````@^P,5>C\____B<>#Q!"%P'43@^P(5E7H_/___X/$$.G)````D(U6
+M/(E4)`2#[`3_="0P_[/D````_W`(Z/S____&1A6L9HM#&&:)1A"+1"1`B49(
+MB6X8BT0D/(E&((-.9!*+1PB)1C2)?E"-@[0```")1CC&1AP@QT9L`````,9&
+M)#O&1B4"BE0D&XA6)HM$)#C!Z!"(1B>+5"0X#[;&B$8HB%8IBT0D/,'H$(A&
+M*HM4)#P/ML:(1BN(5BS&1BT`@\0(:@#_="00Z/S_____=B#_=Q#_=PS_="0@
+MZ/S___^#Q!A65>C\____@\00@\0,6UY?7<-75E.+7"00BW0D%(M,)!B+?"0<
+MBU0D((7;=`V%]G0)A<ET!87_=0F0N`````#K.9!F@?J%`'<-#[?"@+P8F`0`
+M`/]U"+@`````ZQV0QD$DX<9!)0'&02839HE1$(EQ&(EY;+@!````D%M>7\.+
+M3"0$BT$$BT`$HP````")PH!\)`@`=`B!R@``#`#K!H'B___S_XM!!(D0BT$$
+MB5`,BT$$B5`0BT$$B5`4BT$$B5`8BT$$B5`$PY"05E.+7"00BTPD,(MT)#@/
+MMT0D##T1)P``?RX]$"<``'UC/2(A``!T7#TB(0``?PD]("$``'1.ZU8]0"$`
+M`'1%/40A``!T/NM&/8`G``!T-3V`)P``?PXM("<``(/X`G<NZR*)]CV`D0``
+M=!D]@)$``'\)/8(G``!T"^L3/8"4``!U#(GVQ@-`BT0D%,8``HM$)!C&``2*
+M$XM$)"R($&;'`8``9L<&``"+1"0@Q@`@BT0D)&;'```!BA.+1"0HB!!F#[8#
+M9@,!9@,&BU0D-&:)`HM4)!QFB0)FBQ&+1"0\9HD09HL1@\(+BT0D0&:)$%M>
+MPXUV`%575E.#[`R*1"0DB$0D"XM4)""+.KL`````9H-_0``/AGH"``"-=@")
+MV&;!Z`4/M\")V8/A'[H!````T^*%E(>$````#X5*`@``#[?3BX>L!0``BS20
+MA?8/A#8"``"]`````(M&)"7___\`/>$!$``/A;(```"#?"0H``^%$P(``&:!
+M?A"%``^'D@````^W1A"`O#B8!```_P^$@````&:#?A!_=R(/MI0XF`0``(N/
+M6`4``(T$TL'@`BG0BT3!*(I(!.DX`0``9H%^$($`=RL/MT80#[:$.)@$``"+
+MCY`%``"-!$"-!,")PL'B!2G"BT21"(I(!.D%`0``#[=&$`^VA#B8!```BY=T
+M!0``C01`C02`BT3"5(I(!.GA````L?_IV@```(GV9H%^$(4`#X>(````#[=&
+M$("\.)@$``#_='IF@WX0?W<?#[:4.)@$``"+CU@%``"-!-+!X`(IT(M$P2B*
+M2`3K5F:!?A"!`'<H#[=&$`^VA#B8!```BX^0!0``C01`C03`B<+!X@4IPHM$
+MD0B*2`3K)@^W1A`/MH0XF`0``(N7=`4``(T$0(T$@(M$PE2*2`3K!8UV`+'_
+M9H%^$(4`=SH/MT80@+PXF`0``/]T+(NO6`4``&:!?A"%`'<6#[:4.)@$``"-
+M!-+!X`(IT(ULQ0#K"('%Z!8!`(GVBT0D(#A(!`^%AP```(-\)"@`=`Z+5"0H
+M9HM"&&8[1A!U<H!\)`L&=$^+5B2!XO___P"!^N$!$`!T/@^V12"H`G0VJ`1T
+M,J@!=2Z`O;``````=26!^N$!#P!T.8I$)`N(1A2#[`1J`5;_="0LZ/S___^#
+MQ!#K'HGVBE0D"XA6%(/L"`^WPU#_="0LZ/S___^#Q!")]D-F.5]`#X>)_?__
+M@'PD"X$/A&(!``"]`````(N7S````(V'S````#G0=`B018L2.=!U^6:%[0^$
+M/`$``(V'S````(G".8?,````#X0H`0``B40D!(/L#(G34NC\____B<:#Q!"#
+M?"0H`'0ABU0D*&:+0AAF.T80=!.+0P2)<P2)'HE&!(DP3>G5````9H%^$(4`
+M#X>%````#[=&$("\.)@$``#_='=F@WX0?W<?#[:4.)@$``"+CU@%``"-!-+!
+MX`(IT(M$P2B*2`3K4V:!?A"!`'<H#[=&$`^VA#B8!```BX^0!0``C01`C03`
+MB<+!X@4IPHM$D0B*2`3K(P^W1A`/MH0XF`0``(N7=`4``(T$0(T$@(M$PE2*
+M2`3K`K'_BT0D(#A(!'4EBT8D)?___P`]X0$/`'06BE0D"XA6%(/L"%97Z/S_
+M__^#Q!#K$XV'S````(M0!(EP!(D&B58$B3)-9H7M=!*+5"0$.9?,````#X7>
+M_O__B?:#Q`Q;7E]=PU=64X/L!(MT)!2*1"08B$0D`[\`````9H-^0``/A@$!
+M``")]@^WUXN&K`4``(L<D(7;#X3@````9H%[$(4`#X>(````#[=#$("\,)@$
+M``#_='IF@WL0?W<?#[:4,)@$``"+CE@%``"-!-+!X`(IT(M$P2B*2`3K5F:!
+M>Q"!`'<H#[=#$`^VA#"8!```BXZ0!0``C01`C03`B<+!X@4IPHM$D0B*2`3K
+M)@^W0Q`/MH0PF`0``(N6=`4``(T$0(T$@(M$PE2*2`3K!8UV`+'_N/\```!F
+M@7L0A0!W#0^W0Q!F#[:$,)@$```/M\"-%,#!X@(IPHN&6`4``(T$T#I,)`-U
+M%@^V0""H`70.J`1T"K@!````ZQ.-=@!'9CE^0`^'`?___[@`````@\0$6UY?
+MPY!55U93@^P(BU0D'(M"*(LPBX[@"0``B4PD!&;'1"0"``"-=@"[`````&:#
+M?D``=D^+OJP%``")]@^WTX,\EP!T-XL,EXM!)"7___\`/>$!$`!T)8ML)!QF
+MBT489CM!$'47B=#!X`9FBTPD`HM4)`1F.4P0"'0)B?9#9CE>0'>Y9CE>0'0-
+M9O]$)`)F@WPD`A]VD@^W1"0"@\0(6UY?7<.04XM4)`B+3"0,BUPD$(-Z.`!T
+M&8M".,8`<(M".(A(`HM".,9`!P"+0CB(6`Q;PXGVPXUV`%=64XM<)!"+5"04
+MB=&!X?\!``"+@ZP%``"#/(@`=">+-(@/MD85#[:;Q@```(C9T^`/M_@/M]*X
+M__\``-/@(<*)\#G7=`6X`````%M>7\.05E.#[`2+3"00BW0D%&:!?B3A`0^%
+MGP```(I&)H/H$3P!#X>1````NO\```!F@7X0A0!W#`^W1A`/MI0(F`0``(T$
+M4HT$@(N1=`4``(T<PH![*/]U2[`4@'YH`'0&#[9&:-'@#[;`C02`C02`C02`
+MC02`C02`C02`P>`&B4-8QT-@`````(E;9(/L"(U#6%#_<13H_/___\9#*`"#
+MQ!")]HU#%(M0!(EP!(D&B58$B3+^0RGIIP```+K_````9H%^$(4`=PP/MT80
+M#[:4")@$``"-!-+!X`(IT(N16`4``(T<PHM&)"7___\`/>$!$`!T;H![2/]U
+M5;`4@'YH`'0&#[9&:-'@#[;`C02`C02`C02`C02`C02`C02`P>`&B8/H````
+MQX/P`````````(F;]````(/L"(V#Z````%#_<13H_/___\9#2`"#Q!"-0Q"+
+M4`2)<`2)!HE6!(DR_D-+@\0$6U[#C78`4X/L"(M<)!2`>TC_=!V#[`B-@^@`
+M``!0BT0D'/]P%.C\____QD-(_X/$$(/$"%O#4X/L"(M<)!2`>RC_=!J#[`B-
+M0UA0BT0D'/]P%.C\____QD,H_X/$$(/$"%O#C78`55=64X/L#(ML)""+="0D
+M9H%^).$!#X6]````BD8F@^@1/`$/AZ\```"Y_P```&:!?A"%`'<,#[=&$`^V
+MC"B8!```C01)C02`BY5T!0``C1S"@?G_````#X0[`0``_DLI@^P,C7L45^C\
+M____B<&#Q!`Y\'5#@^P(4U7H_/___X/$$#E[%`^$#0$``,=#6``M,0''0V``
+M````B5MD@^P(C4-84/]U%.C\____QD,H`(/$$.GA````D(U3%(M#%(E(!(D!
+MB5$$B4L4BU8$BP:)4`2)`NG`````N?\```!F@7X0A0!W#`^W1A`/MHPHF`0`
+M`(T$R<'@`BG(BY58!0``C1S"BT8D)?___P`]X0$0``^$@P```('Y_P```'1[
+M_DM+@^P,C7L05^C\____B<&#Q!`Y\'5'@^P(4U7H_/___X/$$#E[$'11QX/H
+M`````"TQ`<>#\`````````")F_0```"#[`B-@^@```!0_W44Z/S____&0T@`
+M@\00ZQR-4Q"+0Q")2`2)`8E1!(E+$(M6!(L&B5`$B0*0@\0,6UY?7<-55U93
+M@^P4BW0D*(ML)"P/MT489@^VO#"8!```#[?7C032P>`"*="+EE@%``"-A,+D
+M````4%;H_/___P^W51B#Q!"#O):8`@```'08BX26F`(``(-X<`!U"\>$EI@"
+M````````#[=%&,:$,)@$``#_@^P(#[??4XV&*`D``%#H_/___XN66`4``(T$
+MV\'@`BG8P>`#@\00@'P0/O]T#X/L"`'04%;H_/___X/$$(/L"%56Z/S___\/
+MM]>+CE@%``"-!-+!X`(IT,'@`\9$""(`BY98!0``QD00(P&#Q!Q;7E]=PY!5
+M5U93@^P,BVPD(&;'1"0*@`")]@^W1"0*9@^VA"B8!```9CW_``^$Y````&:!
+M?"0*@0!W>P^WP(T$0(T$P(G"P>(%*<*+A9`%``"-/)"^`````(!_,``/AJ\`
+M``"-7RB#[`Q3Z/S___^-2/B#Q!"+4P2)0P2)&(E0!(D"BT$@)0#__P`]``#_
+M`'49]D$C!'03@WD<`'0-BT$<BE0D)(A0`8UV`$:)\3A/,'>TZUZ)]@^WP(T$
+M0(T$@(N5=`4``(T4PKX`````@'H?`'8_C78`B?$/ML&+3((\A<ET)XM!("4`
+M__\`/0``_P!U&/9!(P1T$H-Y'`!T#(M!'(I,)"2(2`&)]D:)\#A"'W?$_T0D
+M)&;_1"0*9H%\)`J%``^&\O[__SFM)`4``'46@^P(_W0D+('%8`P``%7HP_[_
+M_X/$$(/$#%M>7UW#4X/L$(M<)!B+1"0<#[90,V8/MH0:F`0``,:$&I@$``#_
+M#[?`4(V#>`D``%#H_/___X/$"&H`_[,D!0``Z'?^__^#Q!A;PXGV5E.#[`R+
+M="08BT0D'`^W0"1F#[:<,)@$``#&A#"8!```_P^WVU.-AE`)``!0Z/S___^+
+MEG0%``"-'%N-')N-!-T`````@\00@'P0-/]T#X/L"`'04%;H_/___X/$$(/L
+M"&H`_[8D!0``Z`+^__^#Q!1;7L-3BUPD"+D`````NG@```")V(UV`(@(0$IU
+M^L9#*/_&0S3_C4,4B4,4B4,86\.-=@!55U93@^P8BWPD+(V'4`D``%#H_/__
+M_X/$$+H`````A,`/A=P```"#[`R-AU`)``!0Z/S___^)Q;."@\00C78`#[;#
+M@+PXF`0``/]U$SB?R````',1B)_(````ZPF-=@!#@/N%=MJZ`````(#[A@^$
+MCP````^VPXGJB)0XF`0```^WQ8T$0(T$@(TTQ0````")\`.'=`4``%#H_/__
+M_XN7=`4``&8/ML-FB406)(/$!(!_.0%U#HN'=`4``&;'1`8P__^0#[?=BX=T
+M!0``C1Q;C1R;P>,#QD0#)@"+AW0%``!FQT0#,@``@^P(:@#_MR0%``#HU/S_
+M_XG:`Y=T!0``@\00B="#Q`Q;7E]=PXUV`(/L%(M,)!B+1"0<#[90!&8/MH0*
+M'@4``,:$"AX%``#_#[?`4('!H`D``%'H_/___X/$',-3BUPD"+D`````NA@!
+M``")V(UV`(@(0$IU^L9#2/_&0S[_QD-*'XU#$(E#$(E#%%O#C78`55=64X/L
+M&(M\)"R-AR@)``!0Z/S___^#Q!"Z`````(3`#X4Q`0``@^P,C8<H"0``4.C\
+M____B<6S`(/$$(UV``^VPX"\.)@$``#_=1=F#[;#9CF'Q````',.9HF'Q```
+M`.L%D/[#>=BZ`````(#[@`^$X@````^VPXGJB)0XF`0```^WU8T$TL'@`BG0
+MC33%`````(GP`X=8!0``4.C\____BY=8!0``9@^VPV:)1!88BX=8!0``QD0&
+M(@"+AU@%``#&1`8Y_XN'6`4``,9$!CC_BX=8!0``QD0&.O^+AU@%``#&1`8\
+M_XN'6`4``,9$!CO_BX=8!0``QD0&/?^+AU@%``#&A`:R`````(N'6`4``,:$
+M!M<```#_@^P(5^C\____BY=8!0``B806Y````(/$$(!_.0%U"XN'6`4``(!,
+M!B0!#[?%C13`P>("*<*+AU@%``"-%-")T(/$#%M>7UW#B?975E.#[!R+="0L
+MC89X"0``4.C\____@\00N@````"$P`^%(`$``(/L#(V&>`D``%#H_/___XG'
+MQD0D'X"#Q!`/MD0D#X"\,)@$``#_=1:*1"0/.(;'````<Q6(AL<```#K#8GV
+M_D0D#X!\)`^!=M"Z`````(!\)`^"#X3'````#[9$)`^)^HB4,)@$```/M\>-
+M!$"-!,")PL'B!2G"BX:0!0``NP````"Y%`T``(T$D(@80$EU^@^WQXT$0(T$
+MP(G#P>,%*</!XP*)V@.6D`4``(U"$(E"$(G8`X:0!0``@\`0B4`$B=H#EI`%
+M``"-0AB)0AB)V`.&D`4``(/`&(E`!(G:`Y:0!0``C4(HB4(HB=@#AI`%``"#
+MP"B)0`2+AI`%``"*5"0/B%0#,X/L"&H`_[8D!0``Z+7Y__^)V@.6D`4``(/$
+M$(G0@\006UY?PY!75E.#[!R+="0LC8:@"0``4.C\____@\00N@````"$P`^%
+MRP```(/L#(V&H`D``%#H_/___XG'QD0D'P"#Q!`/MD0D#X"\,!X%``#_=0Z*
+M1"0/.$8T<Q"(1C3K"_Y$)`^`?"0/`W;8N@````"`?"0/!'1^#[9$)`^)^HB4
+M,!X%```/M\>-%$#!X@,IPKL`````N5P```"-A)8H`0``C78`B!A`277Z#[?'
+MC11`P>(#*<*-%):-@D@!``")@D@!``")0`2-@E0!``")@E0!``")0`2-@F`!
+M``")@F`!``")0`2*1"0/B((L`0``@<(H`0``B="#Q!!;7E_#B?964X/L!(MT
+M)!"-AMP```"Z`````#F&W````'0I@^P,C8;<````4.C\____B<.)!"3H_/__
+M_XDT).C\____B4-,B=J#Q!")T(/$!%M>PXUV`%.#[`B+7"00BTPD%(V#W```
+M`(M0!(E(!(D!B5$$B0J#>4P`=!.#[`B-04Q04^C\____@\00C78`@\0(6\.-
+M=@"#[`R+5"00C8+D````N0`````Y@N0```!T&(/L#(V"Y````%#H_/___\9`
+M"`")P8/$$(G(@\0,PU.+7"0,BQ.+1"0(!>0```"+2`2)4`2)`HE*!(D1QP,`
+M````6\.-=@"#[`R+1"00C9#L````N0`````YD.P```!T#H/L#%+H_/___XG!
+M@\00B<B#Q`S#B?93BUPD#(L3BT0D"`7L````BT@$B5`$B0*)2@2)$<<#````
+M`%O#C78`4X/L"(M$)!"-D/P```"Y`````#F0_````'0E@^P,4NC\____B<.#
+MQ!"X`````+F8````B=J-=@"(`D))=?J)V8G(@\0(6\.0BT0D"(M4)`2!POP`
+M``"+2@2)0@2)$(E(!(D!PX/L#(M$)!"-D`0!``"Y`````#F0!`$``'0.@^P,
+M4NC\____B<&#Q!")R(/$#,.)]E.+7"0,BQ.+1"0(!00!``"+2`2)4`2)`HE*
+M!(D1QP,`````6\.-=@"#[`R+5"00C8+T````N0`````Y@O0```!T&X/L#(V"
+M]````%#H_/___\=`%`````")P8/$$(G(@\0,PY!3BUPD#(L3BT0D"`7T````
+MBT@$B5`$B0*)2@2)$<<#`````%O#C78`55=64X/L#(ML)""+1"0D9H%X$(4`
+M#X>9````#[=`$("\*)@$``#_#X2'````BU0D)&:#>A!_=R`/MI0HF`0``(N-
+M6`4``(T$TL'@`BG0BT3!*(I`!.M?D(M,)"1F@7D0@0!W*`^W01`/MH0HF`0`
+M`(N-D`4``(T$0(T$P(G"P>(%*<*+1)$(BD`$ZRJ+5"0D#[="$`^VA"B8!```
+MBY5T!0``C01`C02`BT3"5(I`!.L%C78`L/\/ML`/MKPH'@4``(T$?\'@`RGX
+MC;R%*`$``(N-D`4``(M$)"1F@7@0A0!W(@^W0!`/MH0HF`0``(T$0(T$P(G"
+MP>(%*<*-%)&)5"0(ZPJ!P>P&#0")3"0(BU0D)(M"-`^V4`&#^A)T$H'ZD0``
+M``^$*@$``.F9`0``D(L/B0PDO@````"*4`F(5"0'BD`:B$0D!KT`````@'\*
+M`'8]C5\XB?:#[`Q3Z/S___^)QH/$$(M#!(ES!(D>B48$B3"+3"0(.4XL=0R*
+M1DF+5"0D.D(5=`A%B>DX3PIWR(M$)"2#>%``=!+_<%#_="0$Z/S___^#Q`B-
+M=@"#[`C_="0L_W0D#.C\____BI:2````C4(!B(:2````@\00@/H#=R6`?"0&
+M`'4>@^P,:@!J`HM4)#@/MD(54/]V+%?H_/___X/$(.L\BI:2````C4(!B(:2
+M````@/H"=BB`?"0&`'4AQD8C`L9&(O^`9B3^@^P(5O]T)`SH_/___X/$$.F\
+M````#[9$)`90#[9$)`M0_W0D$%?H_/___X/$$.F>````B?:Z`````+X`````
+M@'\*`'8\C5\XD(/L#%/H_/___XG"@\00BT,$B5,$B1J)0@2)$(M,)`@Y2BQU
+M#(I"28M,)"0Z015T"$:)\#A'"G?(#[9"(*@"=""H!'0<J`%T&%*+3"0H#[9!
+M%5#_<BQ7Z/S___^#Q!")]HM$)"2#>%``=`[_<%!5Z/S___^#Q`B)]H/L"/]T
+M)"Q5Z/S___^#Q!"#Q`Q;7E]=PU=64XM\)!"+-X/L#%;H_/___XG#@\00A<!T
+M;H/L#%;H_/___XG!@\00A<!T7(U3/,9#).'&0R4!QD,F$,9#%;N+1"049@^V
+M0#-FB4,0BP>)0QC'0R"0````C4$(B4,TB4M0QD`!`,9!"$#'0VP`````@^P(
+M:@!2Z/S___^#Q`A35NC\____@\006UY?PXUV`%575E.#[!B+?"0LBVPD-(LW
+M5NC\____B<.#Q!"%P'1S@^P,5NC\____B<&#Q!"%P'1AC5,\QD,DX<9#)0'&
+M0R80QD,5NXM$)"1F#[9`,V:)0Q"+!XE#&,=#()````"-00B)0S2)2U#&0`$0
+MQD$(0(GIB$@)QT-L`````(/L"&H`4NC\____@\0(4U;H_/___X/$$(/$#%M>
+M7UW#D%575E.#[!B+;"0LBWPD-(M$)#B)1"04BW4`5NC\____B<.#Q!"%P`^$
+MB````(/L#%;H_/___XG!@\00A<!T=HU3/,9#).'&0R4!QD,F$(GXB$,5BT0D
+M)&8/MD`S9HE#$(M%`(E#&,=#()````"-00B)0S2)2U#&0`&1QD$(0(GYB$@)
+MBDPD"(A("L=#;`````"#[`AJ`%+H_/___X/$"%-6Z/S____'!"2@A@$`Z/S_
+M__^#Q!"#Q`Q;7E]=PXUV`%575E.#[!B+?"0LBVPD.(I$)#2(1"07BS=6Z/S_
+M__^)PX/$$(7`=0S&A;$````!Z8X```"#[`Q6Z/S___^)P8/$$(7`=1:#[`A3
+M5NC\____QH6Q`````8/$$.MFC5,\QD,DX<9#)0'&0R80BD0D"XA#%8M$)"1F
+M#[9`,V:)0Q"+!XE#&,=#()````"-00B)0S2)2U#&0`$2QD$(0(I,)`N(2`G'
+M0VP`````@^P(:@!2Z/S___^#Q`A35NC\____@\00@\0,6UY?7<.)]E=64XM\
+M)!"+7"049H%[$(4`#X>5````#[=#$("\.)@$``#_#X2#````9H-[$']W)`^V
+ME#B8!```BX]8!0``C032P>`"*="+1,$H9@^V4`3K8(UV`&:!>Q"!`'<J#[=#
+M$`^VA#B8!```BX^0!0``C01`C03`B<+!X@4IPHM$D0AF#[90!.LK#[=#$`^V
+MA#B8!```BY=T!0``C01`C02`BT3"5&8/ME`$ZPB-=@"Z_P```+G_````9H%[
+M$(4`=PT/MT,09@^VC#B8!```9H'Z_P!T%@^WPH"\.!X%``#_=`EF@?G_`'46
+MB?:#[`A35^C\____@\00Z8\```")]@^WP@^VM#@>!0``C01VP>`#*?"-M(<H
+M`0``9@^V4R=F#[9#*,'@"`'"@>+_`0``#[9#*8/X`70%@_@(=4,/M]*+AZP%
+M``"+!)`[0TAU,F:+2!Z)RF;!Z@4/M]*#X1^X_O___]/`(4271(/L"(M#2`^W
+M0!Y05NC\____@\00C78`@^P(4U?H_/___X/$$%M>7\.-=@!55U93@^P8BT0D
+M-(E$)!2+5"0LBSJ+3"0P#[=!$`^VE#B8!```C032P>`"*="+EU@%``"-+,)7
+MZ/S___^)PXM$)#1FBW`>B?!FP>@%#[?`B?&#X1^Z`0```-/B@\00A52'1`^%
+MN````(7;#X2P````C5,\BTPD)`^V014/MH_&````T^`)\,9#).'&0R4!QD,F
+M#XA#)V;!Z`B(0RB*1"0(B$,IBX6D````B4,JBX6H````B4,NBTPD)(E+2,9#
+M%:IFBT489HE#$(M,)""+`8E#&,=#(`````#'0S0`````QT-LX$T"`(/L"&H`
+M4NC\____@\0(4U?H_/___XM$)#1FBT@>B<AFP>@%#[?`@^$?N@$```#3X@E4
+MAT2#Q!"-=@"#Q`Q;7E]=PU575E.#[!B+5"0LBT(HBRA5Z/S___^)QH/$$(7`
+M=1&+1"0@QH"Q`````>F5````D(/L#%7H_/___XG'@\00A<!U&HM4)"#&@K$`
+M```!@^P(5E7H_/___X/$$.MHC5X\QD8D)<9&%:N+5"0@9HM"&&:)1A");AC'
+M1B`(````QT9D"````(M'"(E&-(/`"(E&.,9&'"2)?E#'1FP`````@^P(:@!3
+MZ/S___]J"/]W$/]W#%/H_/___X/$&%95Z/S___^#Q!"#Q`Q;7E]=PU575E.#
+M[!B+5"0LBT(HBRA5Z/S___^)QH/$$(7`=1&+1"0@QH"Q`````>F=````D(/L
+M#%7H_/___XG'@\00A<!U&HM4)"#&@K$````!@^P(5E7H_/___X/$$.MPC5X\
+MQD8DGL9&)1#&1C$@QD85JXM4)"!FBT(89HE&$(EN&,=&("````#'1F0(````
+MBT<(B48TB7Y0@\`@B48XQD8<),=&;`````"#[`AJ`%/H_/___VH@_W<0_W<,
+M4^C\____@\085E7H_/___X/$$(/$#%M>7UW#55=64X/L&(ML)"R*1"0PB$0D
+M%XM%*(LX5^C\____B<.#Q!"%P'4-QH6Q`````>FF````D(/L#%?H_/___XG&
+M@\00A<!U%L:%L0````&#[`A35^C\____@\00ZWV-0SR)1"0$QD,D$H!\)`L`
+M=`[&0R4!QD,F@,9#*$#K!,9#*"3&0Q6K9HM%&&:)0Q")>QC'0R!@````QT-D
+M"````(M&"(E#-(ES4,=#;`````"#[`AJ`/]T)!#H_/___VI@_W80_W8,_W0D
+M(.C\____@\084U?H_/___X/$$(/$#%M>7UW#C78`55=64X/L&(MT)"R+1BB+
+M`(E$)!10Z/S___^)Q[L`"```@\00A<!U#,:&L0````'INP```(/L#/]T)!3H
+M_/___XG%@\00A<!U'\:&L0````&#[`A7_W0D%.C\____@\00Z8H```"-=@!F
+M@?O_`'8%N_\```#&1R0:QD<E",9')@C&1R<`B%\HQD<I`,9'%:MFBT889HE'
+M$(M$)`B)1Q@/M]N)7R#'1V0(````BT4(B4<T`=B)1SC&1QPDB6]0QT=L````
+M`(UW/(/L"&H`5NC\____4_]U$/]U#%;H_/___X/$&%?_="04Z/S___^#Q!"#
+MQ`Q;7E]=PY!75E.+?"00BT<HBS"#[`Q6Z/S___^)PX/$$(7`=0K&A[$````!
+MZU&0QD`D%<9`%:MFBT<89HE#$(ES&&H!:@%35NC\____@\00A,!U%X/L"%-6
+MZ/S____&A[$````!@\00ZQ60QT-L`````(/L"%-6Z/S___^#Q!!;7E_#N`0`
+M```/ME0D!(/Z%W<Y_R25$`X``(/`),.#P#C#@\`0PX/`',.#P$C#@\`<PX/`
+M/,.#P"3#@\`8PX/`%,.#P$C#@\`PC78`PXUV`%93@^P$BW0D$(M<)!2`>S[_
+M=!F#[`@/MD,^4/\VZ/S____&0S[__DXL@\00@\0$6U[#B?975E.+?"00BU0D
+M%`^V0B"H`G0-J`1T":@!#X2U````D(!Z/O\/A:H```"+!XN`&`$``*,`````
+MB<:Q`+@!````B</3XX7S=2R(2CZ+%XGP"=B)@A@!``"+!XN`6`$``*,`````
+MB<8AWG1DBP>)L%@!``#K6D&`^1]VQHL'BX`<`0``HP````")QK$`N`$```")
+MP]/CA?-U,(U!((A"/HL7B?`)V(F"'`$``(L'BX!@`0``HP````")QB'>=!&+
+M!XFP8`$``.L'D$&`^1]VPOY'+(UV`%M>7\-64X/L!(MT)!"+7"04@'LT_W09
+M@^P(#[9#-%#_-NC\____QD,T__Y.+(/$$(/$!%M>PXGV5U93BWPD$(M4)!2`
+M>C3_#X6G````BP>+@!@!``"C`````(G&L0"X`0```)")P]/CA?-U+(A*-(L7
+MB?`)V(F"&`$``(L'BX!8`0``HP````")QB'>=&"+!XFP6`$``.M608#Y'W;&
+MBP>+@!P!``"C`````(G&L0"X`0```(G#T^.%\W4LB$HTBQ>)\`G8B8(<`0``
+MBP>+@&`!``"C`````(G&(=YT$(L'B;!@`0``ZP9!@/D?=L;^1RR-=@!;7E_#
+M55=64X/L#(ML)""+70"^`````&:#>T``#X81`0``B?8/M]:+@ZP%``"#/)``
+M#X3Q````#[9]!(L$D&:!>!"%``^'N@````^W4!"`O!J8!```_P^$J````&:#
+M>!!_=RL/MI0:F`0``(N+6`4``(T$TL'@`BG0BT3!*`^V0`0Y^`^$@P```.F:
+M````#[?6BX.L!0``BP209H%X$($`=RT/MT`0#[:$&)@$``"+BY`%``"-!$"-
+M!,")PL'B!2G"BT21"`^V0`0Y^'0_ZUD/M]:+@ZP%``"+!)`/MT`0#[:$&)@$
+M``"+DW0%``"-!$"-!("+1,)4#[9`!#GX=`WK)XUV`('__P```'4<@^P(:@`/
+MM]:+@ZP%``#_-)#H_/___X/$$(UV`$9F.7-`#X?Q_O__@\0,6UY?7<.0BTPD
+M"(M13(72="*+022)0@R+02B)0A"+02R)0A2+03")0AB+032)0AS&0@@!PXGV
+MBTPD"(M13(72=!Z+0@R)022+0A")02B+0A2)02R+0AB)03"+0AR)033#B?97
+M5E.+="00BUPD%#ES&`^$J````(![%``/A8H````/MD,D@_@5=`6#^%5U?(M+
+M3(7)='6`>0@!=6]F@7D,X0%U9XN^6`4``(V7Z!8!`&:!>Q"%`'<7#[=#$`^V
+ME#"8!```C032P>`"*="-%,</MD$.@_@'=!B#^`=_!X/X!G05ZR>#^`QT'(/X
+M#700ZQMF@V(V_>L49H-*-@+K#6:#8C;WZP9F@THV")"#>U``=`Z-0U!05NC\
+M____@\0(D&:!>R3A`0^%-`$``&:!>Q"%`'=X#[=#$("\,)@$``#_=&J+CE@%
+M``"-D>@6`0!F@7L0A0!W$P^VE#"8!```C032P>`"*="-%,&`>Q0`=3T/MD,F
+M@_@'=!B#^`=_!X/X!G05ZRB#^`QT'(/X#700ZQQF@V(V_>L59H-*-@+K#F:#
+M8C;WZP=F@THV"(GV9H%[).$!#X6H````@'LF"P^%G@```(GW9HM+$`^WT0^V
+M1BY(03G"?2,/MD8NC5#_9H'YA0!W#0^WP8"\.)@$``#_=0T/M\%!.=!\Y+C_
+M````9CW_`'18B?=FBTL0#[?1#[9&+DA!.<)])@^V1BZ-4/^-=@!F@?F%`'<-
+M#[?!@+PXF`0``/]U#0^WP4$YT'SDN/\```!FB4,0QD,4@(/L"%-6Z/S___^#
+MQ!#I&0$``,9#%`"0.7,8="2+0TR%P'0=@'@(`74*4U;H_/___X/$"(U#3%!6
+MZ/S___^#Q`B#>U0`=`V-0U105NC\____@\0(@^P(4_]S&/]3;(/$$&:!>R3A
+M`75;BD,F@^@1/`%W4;G_````9H%[$(4`=PP/MT,0#[:,,)@$``"!^?\````/
+MA)0```"-!$F-!("+EG0%``"-!,*`>"D`=7^`>#3_='F#[`A05NC\____@\00
+MZVJ)]KG_````9H%[$(4`=PP/MT,0#[:,,)@$``"-!,G!X`(IR(N66`4``(T4
+MPHM#)"7___\`/>$!$`!T+X'Y_P```'0G9H%[).$!=0N*0R:#Z!$\`785D(!Z
+M2P!U#H/L"%)6Z/S___^#Q!"06UY?PU=64XMT)!"+?"049HM7'HG09L'H!0^W
+MV(G1@^$?N/[____3P(G!(42>1&:!^O\/=$</M\*+EJP%``"#/((`=#C'!((`
+M````(8R>L`4``(/L"%"-A@`)``!0Z/S___^#Q`A75NC\____@\0(5U;H_/__
+M_X/$$(UV`%M>7\-64X/L$(M$)!R+F.`)```%``D``%#H_/___XG&#[?0P>(&
+M`=J+1"0DB1"#Q!"[`````+E`````B="-=@"(&$!)=?H/M\:#Q`1;7L.05U93
+M@^P$BWPD%(I$)!R(1"0#O@````"X`````(-_*`!T0NL$B<;K)8M/*+(`C78`
+M#[;"@WR!/`!T#8M$@3R*7"0#.%A)=-U"@/H$=N.+1RAF@7@DA0!W!HGPA?9U
+M!K@`````D(/$!%M>7\.055=64XM\)!1F#[9<)!P/MD0D&,'@"`'#O0````"`
+M?QP`#X2]````@W\X``^$LP```/9'9`EU!;T!````L0"^8`H``)`/MM&)V&8C
+M!-9F.P36#X6!````@'S6!0-T!X!\U@4'=0L/ML&)ZCA4Q@1U:,9'%"`/MMD/
+MMD3>!E`/MD3>!5!7Z/S___^+5SB*1-X'B$(-@\0,@WPD(`!T*XM$)""+&(MP
+M!(M'.(EP`XM'.(`(@/9'9@1T$(7V=`R+1SB)6`B+1SB`('^+5SB*1QR#Z`>(
+M0@?K#HGV08#Y#P^&8O___XGV6UY?7<.-=@!55U93@^P,BWPD((MT)"1F@7X0
+MA0`/AXD````/MT80@+PXF`0``/]T>V:#?A!_=R`/MI0XF`0``(N/6`4``(T$
+MTL'@`BG0BT3!*(I(!.M7D&:!?A"!`'<H#[=&$`^VA#B8!```BX^0!0``C01`
+MC03`B<+!X@4IPHM$D0B*2`3K)@^W1A`/MH0XF`0``(N7=`4``(T$0(T$@(M$
+MPE2*2`3K!8UV`+'_NO\```!F@7X0A0!W#0^W1A!F#[:4.)@$``"`^?\/A),`
+M```/ML&`O#@>!0``_P^$@@```&:!^O\`='N`?A0&='4/MIPX'@4``(T$6\'@
+M`RG8C9R'*`$```^WTHT$TL'@`BG0BY=8!0``C2S"@'XF`74H@^P,:@KH_/__
+M_X/$"%97Z/S___^#Q`QJ`E53Z/S___^#Q!#K'XUV`(/L#&CT`0``Z/S___^#
+MQ`A65^C\____@\00B?:#Q`Q;7E]=PU=64XMT)!B+1"00BQB#[`Q3Z/S___^)
+MPH/$$(7`=&G&0"3AQD`E`8GPB$(FQD(G#XM$)!1FBT`89HE"$(E:&,="(```
+M``#'0C0`````QT)L`````(/L"%)3Z/S___^#Q!")\#P!=1&#[`QJ!>C\____
+M@\00ZQ*)]H/L#&A0PP``Z/S___^#Q!!;7E_#5E.#[`2+="00BUPD%&:!>Q"%
+M``^'BP````^W0Q"`O#"8!```_W1]9H-[$']W(@^VE#"8!```BXY8!0``C032
+MP>`"*="+1,$HBD@$ZUF-=@!F@7L0@0!W*`^W0Q`/MH0PF`0``(N.D`4``(T$
+M0(T$P(G"P>(%*<*+1)$(BD@$ZR8/MT,0#[:$,)@$``"+EG0%``"-!$"-!("+
+M1,)4BD@$ZP6-=@"Q_[+_9H%[$(4`=PL/MT,0BI0PF`0``(#Y_W08#[;!@+PP
+M'@4``/]T"X#Z_W0&@'L4!G4D@WM0`'0.C4-04%;H_/___X/$")"#[`A35NC\
+M____@\00ZVF0#[;!#[:,,!X%``"-!$G!X`,IR(V,AB@!```/MM*-!-+!X`(I
+MT(N66`4``(T$PH![%`!T$(/L!&H!4%'H_/___X/$$)"#>U``=`Z-0U!05NC\
+M____@\0(D(/L"%-6Z/S___^#Q!"-=@"#Q`1;7L.)]E575E.#[!B+1"0LBRA5
+MZ/S___^)QH/$$(7`#X2+````@^P,5>C\____B<>#Q!"%P'42@^P(5E7H_/__
+M_X/$$.MJC78`C5X\QD8DX<9&)0'&1B8.BU0D)&:+0AAFB4809H-B-/>+5"0@
+MBP*)1AC'1B``"```BT<(B48TB7Y0QT9LE%\"`(/L"&H`4^C\_____W8@_W<0
+M_W<,4^C\____@\085E7H_/___X/$$(/$#%M>7UW#D%=64XM\)!"+="04BT<H
+MBQB#[`Q3Z/S___^)PH/$$(7`=#[&0"0;QD`E`8GPB$(H9HM'&&:)0A#&0F@/
+MB5H8QT(@`````,="-`````#'0FP`````@^P(4E/H_/___X/$$%M>7\-75E.+
+M?"00BT<HBS"#[`Q6Z/S___^)PX/$$(7`=&R#[`Q6Z/S___^)PH/$$(7`=1C&
+MA[$````!@^P(4U;H_/___X/$$.M$B?;&0R0`9HM'&&:)0Q#&0V@/B7,8QT,@
+M`````,=#-`````"+0@B)0SC&0QPDB5-0QT-L`````(/L"%-6Z/S___^#Q!!;
+M7E_#B?955U93@^P0BVPD*(M<)"S&0R,!QD,B`%-J!E7H_/___X/$$(-[+`!T
+M$8M3#(M#"(E0!(D"BT,L_D@P@'M+`'0A@^P,_W0D+.C\____QP0D`0```.C\
+M____@\00@'M+`'7?@[O@`````'0>@^P$:@$/MH/5````4/^SX````.C\____
+M@\00C78`@WLL`'06@^P$:@$/MD-)4/]S+.C\____@\00D(-['``/A*@```"+
+M<QR#?G``#X6-````@WYT``^%@P```/9#)`1U+(M$)"#^@%<,``"#[`Q0Z/S_
+M__^#Q`QJ`8M#'`^V0`%0_W0D+.C\____@\00@^P$BT,<#[9``E"+0QP/MD`!
+M4&C8````Z/S___^#Q`S_<QR+1"0H_[`D!0``:@'H_/___X/$#/]S'(M$)"C_
+ML"0%``!J!NC\____@\00C78`QT,<`````,=&8`````"#>S``=`^+4S`/MD-)
+MQT2"/`````"+4P2+`XE0!(D"_DT*@^P(4_]T)"SH_/___X/$$(!]!?]T5K\`
+M````@'T*`'8WC74X@^P,5NC\____B<.#Q!"+1@2)7@2),XE#!(D8@'LB_W4*
+M1XGX.$4*=]?K"8GX.$4*=Q:)]L9%!?^#[`A5_W0D+.C\____@\00@\0,6UY?
+M7<,/MD0D"(T4P,'B`RG"C120C125=$4``(M$)`2)$,.)]E93@^P$BW0D%(I$
+M)!B(1"0#BUPD$+@`````B?&)VH7V=`B)]H@"0DEU^HDSC8:,NO__P>@"NEFV
+M^7+WXHG0P>@'B$,$BD0D`SA#!'8#B$,$L0"`>P0`=B$/MM'&1!,'_XT$TL'@
+M`RG0C02"QH2#V$4``/U!.$L$=]_&0P8`QD,%`+$`D`^VP8T4@(T4T(V4DY`Q
+M``#&0@<!B$H&08#Y'W;C@\0$6U[#D%575E.#[`R+;"0DBW0D(+\`````@'X$
+M`'8^B?:)^`^VV(T$V\'@`RG8C02#C82&T$4``(!X"/UT%X/L!&H(55#H_/__
+M_X/$$(3`=`2)V.L-1XGX.$8$=\2X_P```(/$#%M>7UW#C78`4X/L$(M<)!C_
+M="0<4^C\____@\00N@D````\_W06#[;0C032P>`#*="-!((/MI2#>D4``(G0
+M@\0(6\.055=64X/L#(M<)"2-@Y````")WXNSF````(!^!@`/A$$!``"#[`A0
+M5NC\____B<6#Q!`\_P^$*@$```^V0P&#^`%T98/X`7\,A<!T(>D3`0``C78`
+M@_@0#X2#````/9`````/A,4```#I]P```("^ES$````/A>H```#&AI<Q```!
+M_DX&@^P(:@!J`&H`B>H/ML)0_W0D.%;H_/___X/$(.F_````C78`@+Z7,0``
+M``^%KP```,:&ES$```'^3@:#[`AJ`&H`:@&)Z@^VPE#_="0X5NC\____@\0@
+MZ80```"Q`8GV#[;!C12`C130C826D#$``(GJ.%`$=0F*0`4Z1PET!Y!!@/D?
+M=MK^3@:#[`A7#[9'"5!J$(GJ#[;"4/]T)#A6Z/S___^#Q"#K-P^V@Z(```"-
+M%("-%-#&A):7,0```?Y.!H/L"&H`:@!HD````(GJ#[;"4/]T)#A6Z/S___^#
+MQ""#Q`Q;7E]=PU575E.#[`2+;"0<BD0D)(A$)`.+5"0H9HD4)(M<)!B_````
+M`(GY#[;!C11`B='!X08!RHT44#ELTQ0/A8P```"Y`````(GX#[;PC01VB<+!
+MX@8!T(T$1HT4Q0````")]@^WP8T$0(T$PHU$&""`>!``=`:`>!#P=4L/M]&-
+M%%*-!':)P<'A!@'(C01&C10"C133B6H<BTPD((E*((U"$(L,)&:)2!:*3"0#
+MB$@4BTPD+(L!B4(HBT$$B4(LQD(P_^L*B?9!9H'Y@0!VE$>)^#P##X9-____
+M@\0$6UY?7<.055=64X/L#(ML)"`/MGPD*(GKC;7T,```QH67,0```+H`````
+MN9````")\)"($$!)=?K&1@$`Q@9`QX.0,0```&8"`(FKC#$``(GX#[;0C032
+MP>`#*="-!(*-!(.+D-!%``")DX0Q``"+@-1%``")@X@Q``"#[`B-@_0P``!0
+M_W0D,.C\____@\0<6UY?7<.055=64X/L#(ML)"`/MGPD*(GKC;7T,```QH67
+M,0```+H`````N9````")\)"($$!)=?K&1@$!Q@9`QX.0,0```&8"`(FKC#$`
+M`(GX#[;0C032P>`#*="-!(*-!(.+D-!%``")DX0Q``"+@-1%``")@X@Q``"#
+M[`B-@_0P``!0_W0D,.C\____@\0<6UY?7<.055=64X/L#(I,)"B*1"0LB$0D
+M"XM\)""S`0^VP8T4P(TLU0`````IQ8TLJ)`/ML.-%("-%-"-A)>0,0``@'@'
+M`0^%M@```(A(!(I4)`N(4`7&0`<`#[9P!HT$MHT$QHVTA_0P``"Y`````+J0
+M````B?"-=@"("$!*=?K&1@$0Q@9`BD0D"XA&"0^VPXT,@(T,R(T,CXV9D#$`
+M``^V0P:-%("-%-"-%)?'@I`Q````9@(`BT0D((F"C#$``(T4KXN"T$4``(F!
+MA#$``(N"U$4``(F!B#$``(/L"`^V0P:-%("-%-"-E)?T,```4O]T)##H_/__
+M_X/$$.L2C78`0X#['P^&)O___[@!````@\0,6UY?7<.055=64X/L#(I$)"R(
+M1"0+BVPD,(M\)""S`8GJ#[;6B50D!(GV#[;#C12`C130C127C8*0,0``@'@'
+M`0^%J````,9`!P")NHPQ```/MD`&C12`C130C;27]#```+D`````NI````")
+M\)"("$!*=?K&1@&0Q@9`BDPD!(A.!HGHB$8'BE0D"XA6"8M,)#2+`8E&$(M!
+M!(E&%`^VPXT4@(T4T(T4E\>"D#$```!F`@"+1"0@B8*,,0``BTPD*(M!7(F"
+MA#$``(M!8(F"B#$``(/L"('"]#```%+_="0PZ/S___^#Q!#K$HUV`$.`^Q\/
+MAC+___^X`0```(/$#%M>7UW#D%575E.#[`R+;"0@BD0D+(A$)`N+?"0PB>Z-
+MG?0P``"Y`````+J0````B=B0B`A`2G7ZQD,!$\8#0(GZ#[;&B$,&B%,'BE0D
+M"XA3"<>&D#$```!F`@")KHPQ``"+5"0HBT)<B8:$,0``BT)@B8:(,0``@^P(
+MC8;T,```4/]T)##H_/___X/$'%M>7UW#BT0D"`^V5"0,9HM,4'!!9HE,4'!F
+M#[9``@'(#[?`PY"+3"0$N@$```"-=@"-!)*-!,*`O(&7,0```74$B=##D$*#
+M^A]VYKC__P``PU.#[`B+7"00BD0D%(A$)`.*3"08B$PD![H!````C78`C022
+MC03"C82#D#$``(I,)`,X2`1U$HI,)`<X2`5U"<9`!P'K"8UV`$*#^A]VTH/$
+M"%O#D%575E.#[#R*1"18B$0D+XI,)%R*5"1@B%0D+HML)%"+?"1D#[;0C032
+MP>`#*="-!(*`O(7810``_74%L?V-=@`/ML&#^!`/A+0"``"#^!!_%X7`#X2;
+M````@_@!#X0T`0``Z4$)``"0/>(````/A+$(```]X@```'\2/9`````/A(\'
+M``#I'@D``(GV/?\````/A1$)```/ME0D+XT$TL'@`RG0C02"QH2%V$4``/^`
+MO9<Q```!=22#[`12_W0D7/]T)%SH_/___X/$$(7`#X74"```_D4&Z<P(```/
+MMD0D+\9$!0<!BU0D5(E4A0SIM0@``)"-G?0P``"`O9<Q```!=54/MDPD+XT$
+MR<'@`RG(C02!C42%`(I3"8B0=D4```7010``BE,*@^(!B%`)QD`(`(/L!%'_
+M="1<_W0D7.C\____@\00A<`/A5H(``#^10;I4@@``(GV#[9$)"_&1`4'`8M4
+M)%2)5(4,Z3D(``#&1`4'_X/L"&H`:@!H_P```%#_=(4,_W0D;.C\____@\0@
+MZ1((``"_`````(V-]#````^V5"0OB=:-!-+!X`,IT(T$@HU<A0"*03*(@\9%
+M``!FBT$P9HF#Q$4``(M!*(F#M$4``(M!+(F#N$4``(M!#(F#A$4``(M!$(F#
+MB$4``(V3E$4``(M!%(F#E$4``(M!&(E"!(M!'(E""(M!((E"#(M!)(F#K$4`
+M`,:#V$4```&`?08?#X1^!P``@+MV10````^$F0````^V1"0OC13`C1S5````
+M`"G#C1R8B5PD*(E$)`R0B?H/ML)05O]T)%S_="1<Z/S___^#Q!"%P'4O1_Y%
+M!HT$]L'@`RGPC02&C42%`(GZ.)!V10``=0G&@,=%````ZQN(E)W'10``ZQ*)
+M^HM$)"B(E(7'10``ZR.-=@"`?08?=!J+="0,C03VP>`#*?"-!(:)^CB4A79%
+M``!WA,:%ES$```&R`(!]!``/AL4&``"0#[;"@'P%!P$/A'W^__]".%4$=^SI
+MJP8``(UV`,9$)"?_BT<8B40D,(U,)#"+1QR)000/ME0D+XT$TL'@`RG0C02"
+MC72%`(V&T$4``,9`"!#V1PQP#X26`P``@[[<10```'1MBE@*@^P$:@A1BX;<
+M10``@\!<4.C\____@\00A,!U3O9'#P]T2(NVW$4``(7V=#Z`?F4`="T/MMM3
+M5E7H_/___XU7&%(/M\!04U;_="1P_W0D<.C\____BEYFBW9H@\0DZP6^````
+M`(7V=<2)]@^V3P_VP0T/A#L!```/ME0D+XT$TL'@`RG0C02"C12%`````(V$
+M*G!%``"`>`0?#X<3`0``BD`$B$0D)?;!"'02#[;`P>`$`=#&A"CH1P``!NLC
+M#[9,)"4/ME0D+\'A!(T$TL'@`RG0C02"C02!QH0HZ$<```</ME0D)0^V1"0O
+MP>($C0S`P>$#*<&-#(C!X0(!R@'JC9K@1P``QD,)`(I'#XA#"XM$)#")@O!'
+M``"+1"0TB8+T1P``BD<)B$,*BE<-@^(/BH0I>D4``#C0=@*(T(C"@^(/BD,,
+M@^#P"="(0PP/MDPD)0^V5"0OP>$$C032P>`#*="-!(+!X`(!P8V,*>!'``"*
+M5RF#X@^*A"AZ10``.-!V`HC0B,+!X@2*00R#X`\)T(A!#`^V5"0OC032P>`#
+M*="-!(+^A(5T10``Z=L!``"-=@#V1P\"#X3.`0``@^P(C40D.%!5Z/S___^(
+M1"0V@\00//\/A4T!``#&1"0G`(!]!`!V,`^V5"0GC032P>`#*="-!(*-A(70
+M10``@'@(_W03@'@(_70-_D0D)XI$)"<X101WT`^V5"0GC032P>`#*="-!(*Y
+M`````+ID````C82%=$4``)"("$!*=?H/ME0D)XT$TL'@`RG0C02"C42%``^V
+M5"0OC1S2P>,#*=.-')J-7)T`C9-T10``B9#<10``BY/010``B9#(10``BY/4
+M10``B9#,10``BU0D5(F0Y$<``(N3X$4``(F0X$4``,:`V$4``/^-D'!%```/
+MMG(+BD\)B(PP?$4``/Y""XI/#8/A#XJ#>D4``#C(=@*(R(A""@^V5"0GC032
+MP>`#*="-!(*-1(4`C8C010``BU0D,(F0T$4``(M4)#2)402*5P^(D'=%``"*
+M1"0NB$$*BD4%.D4$=03&104`_D4%ZU/&1P<`Z3@#```/MD0D+XT,P,'A`RG!
+MC0R(#[94)":-!-+!X`,IT(T$@HU<A0"-@W1%```YA(W<10``=!>-@W!%```/
+MMD@+BE<)B)0+?$4``/Y`"X!\)";_=1,/MD0D)\9$!0<!BU0D5(E4A0R0#[9'
+M"5`/MEPD,U-5Z/S___^-!-O!X`,IV(T$@X/$#("\A<=%````#X2S````@'T&
+M'P^$G0(```^V7"0OC03;P>`#*=B-!(/!X`*-%"B)5"0@@<)P10``B50D'`'H
+MB40D$.MCD(MT)!#&AMA%```0C;[`10``#[9'!U!3_W0D7/]T)%SH_/___X/$
+M$(7`#X5!`@``_D4&#[9'!T`/MI9V10``.=`/A.G^__^-!-O!X`,IV(T$@_Z$
+MA<=%``"`?08?#X0.`@``BU0D((J"QT4``(M4)!PZ0@9RB^GV`0``B?:`?08`
+M#X7J`0``@^P(:@!J`&B0````#[9$)$-0_W0D;/]T)&SH_/___X/$(.G#`0``
+MQD0%!_^#[`AJ`&H`:/\```!0_W2%#/]T)&SH_/___\9$)#<!@\0@Z>$```"-
+M=@#&1"07`,=$)!@`````BU0D&(T$4HG"P>(&`="+5"08C01"BU0D5#E4Q11U
+M?;L`````BU0D&(T$4HG"P>(&`="+5"08C01"C3S%`````(UV`(T$6XT$QXT,
+M*(UQ((!^$/]U/H!]!A\/A"@!``"#[`B-02A0C5$0#[="%E`/MD(44/]Q(/]T
+M)&S_="1LZ/S___^#Q""%P'4)_D4&QD80\(GV0X'[@0```':G_T0D&(-\)!@#
+M#X95____@'T&``^%T@```+(`@'T$`'84#[;"@'P%!P$/A/G^__]".%4$=^R`
+M?"07``^%JP```(/L"&H`:@!HX@````^V1"1#4/]T)&S_="1LZ/S___^#Q"#I
+MA````+,`@'T$`'8K#[;3C032P>`#*="-!(*-A(7010``@'@(_70*@'@(_W0$
+MQD`(_D,X701WU0^V5"0OC032P>`#*="-!(*+M(7@10``LP`/ML.-%$")T<'A
+M!@'*C110C535`(U"$(!X"`%U$\9`"`"#[`C_<A3_="1<_]:#Q!!#@/L#=LJ)
+M]H/$/%M>7UW#55=64X/L!(M\)!R+;"0DBD0D((A$)`.+3"08QD4`_K,`O@``
+M``"`>00`=C8/MM.-!-+!X`,IT(T$@HT$@3FXY$<``'47B?(Z5"0#=0N*@-A%
+M``"(10#K"D:-=@!#.%D$=\J#Q`1;7E]=PXGV55=64X/L#(ML)""*1"0LB$0D
+M"XGNBD4%.D4$=03&104`#[9^!;,`#[;#C11`B='!X08!RHT44(T$UHM4)"0Y
+M4!1U1<9`&`&_`````(!^!`!V:(GX#[;0C032P>`#*="-!(*-!(:+5"0D.9#D
+M1P``=0V*@-A%``"#P`,\`78\1XGX.$8$=\SK,@^VPXT40(G1P>$&`<J-%%"-
+M!-:#>!0`=0^+5"0DB5`4QD`8`>L,B?9#@/L##X9M____#[;#C11`B='!X08!
+MRHT44+L`````N0(,``"-1-8<B!A`277ZB?@/MM"+1"0DB426#(T$TL'@`RG0
+MC02"N0````"Z9````(V$AG1%``"("$!*=?J)^`^VT(T$TL'@`RG0C02"N0``
+M``"Z``(``(V$AN1%``")]H@(0$IU^HGZ#[;*C03)P>`#*<B-!(&-!(:+?"0D
+MB;CD1P``BU0D,(F0X$4``(V8T$4``,9#"/_'@-Q%````````BWPD*(L7B9#0
+M10``BU<$B5,$BE0D"XB0>D4``(/L"&H`:@!H_P```%'_="0\5>C\_____D8%
+M@\0L6UY?7<.055=64XML)!B+="04OP````"`?@0`#X:6````B?@/MM"-!-+!
+MX`,IT(T$@CFLAN1'``!U<;,!#[;#C12`C130C826D#$``(GZ.%`$=03&0`<!
+M0X#['W;?B?@/MM"-!-+!X`,IT(T$@HT$AL>`Y$<```````"Y`````+ID````
+MC8!T10``B`A`2G7ZB?@/MM"-!-+!X`,IT(T$@L:$AMA%``#]_DX%1XGZ.%8$
+M#X=J____OP````")^@^VPHT40(G1P>$&`<J-%%"-!-8Y:!1U.,=`%`````#&
+M0!@`LP")^@^VPHT40(G1P>$&`<J-%%#!X@.)]@^VPXT$0(T$PL9$,#``0X#[
+M@7;L1XGX/`-VIUM>7UW#55=64X/L'(M,)#2+1"1`BE0D/(A4)!N+?"0PO0``
+M``"S`(!\)#@!#X7W````A<`/A-0```")1"04@'\$`'8ID(GH#[;0C032P>`#
+M*="-!((YC(?D1P``=0<Z7"0;=`E#18GJ.%<$=]B)Z@^VPHT<P,'C`RG#C1R8
+MC1R?C8-T10``@^P$:F10_W0D(.C\____O@````"#Q!"`NW1%````=&B)Z`^V
+MT(T$TL'@`RG0C02"P>`"B40D#(V4.'!%``")5"00D(GR#[;"P>`$BU0D%(T<
+M$(U+9`-$)`P!^(V0Z$<``(N`Z$<``(E#9(M"!(E!!(M""(E!"(M"#(E!#$:)
+M\(M4)!`X0@1WNXGH#[;0C032P>`#*="-!((/MH2'=$4``.LZD+T`````O@``
+M``"`?P0`=B2)\`^VT(T$TL'@`RG0C02".8R'Y$<``'4#18GV1HGR.%<$=]R)
+MZ@^VPH/$'%M>7UW#D)"05E.+1"0,BQ"+,K$`@'HK`'84#[98"8GVB=C3^*@!
+M=09!.$HK=_*`^0-V$0^VP8N$AM`!``"C`````.L/#[;!BX2&T`$``*,`````
+MJ0``$``/E<`/ML!;7L.-=@!55U93@^P,BT0D)(M4)""+*HM]`,9`(0#&0"`%
+MQD`C!HE0*,9$)`<`QT0D"`````"S`(!]*P!V&(M,)"`/ME$)B="(V=/XJ`%U
+M!D,X72MW\(#[`W83#[;#QX3'``(``"P```#K$8UV``^VP\>$QP`"```L````
+M@^P,:!`G``#H_/___X/$$(#[`W85#[;#BX3'!`(``*,`````#[;PZQ.0#[;#
+MBX3'!`(``*,`````#[;P"70D"(#[`W81#[;#QX3'``(``"0```#K#Y`/ML/'
+MA,<``@``)````(/L#&@0)P``Z/S___^#Q!"`^P-V&0^VPXN$QP0"``"C````
+M`(G&@>;___\`ZQ</ML.+A,<$`@``HP````")QH'F____`(GPP>`("40D"(#[
+M`W83#[;#QX3'``(``"````#K$8UV``^VP\>$QP`"```@````@^P,:!`G``#H
+M_/___X/$$(#[`W85#[;#BX3'!`(``*,`````B<;K$XGV#[;#BX3'!`(``*,`
+M````B<:!?"0(`0%IEG49BT0D((!("`:)\,'H$#Q0#Y3`#[;`ZTJ)]H%\)`@!
+M`0``=1*)\,'H$#Q0#Y3`#[;`ZR^-=@"#[`QHB!,``.C\____@\00_D0D!X!\
+M)`<$#X9!_O__B?#!Z!`\4`^4P`^VP(/$#%M>7UW#5E.#[`2+="00BQY6Z/S_
+M__^#Q`2$P'44QD8%_X/L"%93Z/S___^#Q!#K79"Q`(![*P!V$@^V5@F)T-/X
+MJ`%U!D$X2RMW\H/L#%/H_/___XG!@\00A<!T,(U&.(M0!(E(!(D!B5$$B0K^
+M1@J)<2C&02`%QD$A`,9!20]J`6H!45;H_/___X/$$(/$!%M>PXGV55=64X/L
+M#(ML)""+="0DBWT`NPH```"0@^P(5E7H_/___X/$$(3`=1.#[`QHZ`,``.C\
+M____@\002W7<L0"`?RL`=A(/ME4)B=#3^*@!=09!.$\K=_*+5@2+!HE0!(D"
+M_DT*@^P(5E?H_/___X/$$/9%"`)T2H-]*`!U&8/L#%?H_/___X/$$(7`#X1H
+M`0``B44HZP.+12B).(EH5,9`*@#&0"L`QD`F`&:#2#($@^P(4%?H_/___X/$
+M$.DX`0``@WTH``^$S0```(/L"(M%*(/`6%#_=Q3H_/___X/$"/]U*%?H_/__
+M_X/$$(U%.(G".44X#X27````B<.0@^P,4NC\____B<:#Q!"#>!P`=&6+0!S'
+M0&``````]D8D!'4E_H=7#```@^P,5^C\____@\0,:@&+1AP/MD`!4%?H_/__
+M_X/$$(/L!/]V'/^W)`4``&H!Z/S___^#Q`S_=AS_MR0%``!J!NC\____QT8<
+M`````(/$$/Y-"H/L"%97Z/S___^#Q!")VCE=.`^%;/___\=%*`````"`?0H`
+M=!:#[`R-13A0Z/S___^)QOY-"H/$$.L.@^P,5^C\____B<:#Q!"%]G0SC44X
+MBU`$B7`$B0:)5@2),OY%"HEN*,9&(`7&1B$`QD8C!L9&(@.#[`A65^C\____
+M@\00@\0,6UY?7<-55U93@^P,BWPD((ML)"2*1"0HB$0D"XI$)"R(1"0*BP>)
+M1"0$N@````"^`````(!_"@!V-XU?.(/L#%/H_/___XG"@\00BT,$B5,$B1J)
+M0@2)$#EJ+'4,BD0D"SA"270+C78`1HGP.$<*=\R)\#A'"G0M@'PD"E!U)L9"
+M(P;&0B(%QD(@!\9"(0"):BR)>BB#[`A2_W0D$.C\____@\00@\0,6UY?7<-5
+M5U93@^P,BVPD((M]`,9$)`O_LX"^_____X#[A7<+#[;##[:T.)@$``")\#S_
+M=$@/ML"+CY`%``"-!$"-!,")PL'B!2G"C025`````#EL"`AU)8/L!&H(_W0D
+M+`.'D`4``%#H_/___X/$$(3`=`F)\(A$)`OK!Y!#@/N!=I</MD0D"X/$#%M>
+M7UW#D%575E.!["P"``"*A"1(`@``B$0D'XN4)$`"``"+4@B)5"08BRJ+C"1`
+M`@``BDDPB$PD%XN$)$`"``"#P"B)PHN,)$`"```Y02@/A&<"``"`?"07``^$
+M7`(``(E$)`R)]H/L#%+H_/___XUP^(/$!(U$)"Q0#[9$)"]0:@'_="0P_[0D
+M8`(``.C\____OP````"#Q""`?"0@``^&X0```(U6"(E4)!")]H/L!&H(C8:<
+M````4(GY#[;!P>`$C50D+(T<$(U#;%#H_/___X/$$(3`#X29````C5-@BD((
+M@^`/B(:R````9HM.-('AW_W__XG(@\@09HE&-(I"",#H!#P)=0F)R(/(,&:)
+M1C2)^0^VP<'@!(J$!(@```#`Z`0\"G4&9H%.-``"BX0D0`(``(/`*(M0!(M,
+M)!")2`2)1@B)402)"HI&)*@"=#6#X/V(1B2#?AP`="F#[`3_=AS_M20%``!J
+M!NC\____@\00ZQ&01XGX.$0D(`^'*____^L-D(GZ.%0D(`^'"P$``(/L!%9J
+M!O]T)"3H_/___X/$$(!^2P!T'H/L#%7H_/___\<$)`$```#H_/___X/$$(!^
+M2P!UXH.^X`````!T'8/L!&H!#[:&U0```%#_MN````#H_/___X/$$(GV@WXL
+M`'06@^P$:@$/MD9)4/]V+.C\____@\00D(-^'`!T98M&',=`8`````#V1B0$
+M=27^A5<,``"#[`Q5Z/S___^#Q`QJ`8M&'`^V0`%05>C\____@\00@^P$_W8<
+M_[4D!0``:@;H_/___X/$#/]V'/^U)`4``&H!Z/S____'1AP`````@\00BU8$
+MBP:)4`2)`HM,)!C^20J+A"1``@``_D@P@^P(5E7H_/___X/$$/Y,)!>+5"0,
+MBXPD0`(``#E1*'0+@'PD%P`/A:K]__^!Q"P"``!;7E]=PXUV`%575E.!["@"
+M``"+O"1``@``BX0D/`(``(L`B40D&,9$)!<`C5PD'%,/MK0D3`(``%9J`?^T
+M)$@"``!7Z/S___^#Q!Q65_^T)$0"``#H_/___XN$)$@"``"+4"B-:OB#Q!"+
+MA"0X`@``@\`H.<)T*XG"C78`@'TA#70&@'TA(G40QD0D"P'&12(%QD4C!.L+
+MD(M%"(UH^#G0==K&1"0*`(!\)!``#X;L`0``BYPD.`(``(/#*(N4)#@"``"+
+M0BB-</@YV'0U#[9$)`J)Q\'G!)"#[`1J"(V$/(0```!0C8:<````4.C\____
+M@\00A,!U"HM&"(UP^#G8==:-1@@YV`^%?P$``,9$)`L`@^P,_W0D&.C\____
+MB<:#Q!"%P`^$B`$``(N$)#`"``#^0`K&1B(%QH:P`````,9&(P1FQX:0````
+M``#&AI(`````QT9````%`,=&1``````/MD0D"L'@!(U$!'"*4`2(5B"*4`6(
+M5B&+E"0P`@``B58HBE`(@^(/B):R````9HM.-('AW_W__XG*@\H09HE6-(I`
+M",#H!#P)=0F)R(/(,&:)1C0/MD0D"L'@!(I$!'C`Z`0\"G4&9H%.-``"BX0D
+M.`(``(E&+`^V1"0*P>`$C50D$`'0BE!FB%9)BU!LB9:<````BT!PB8:@````
+MB9:4````B8:8````BX0D.`(``/Y`,(N$)#`"``"#P#B+4`2)<`2)!HE6!(DR
+MC48(BU,$B4,$B5X(B5`$B0(/MD8@J`)T)Z@$=".H`70?5@^V1DE0_[0D0`(`
+M`/^T)#P"``#H_/___X/$$.LAD`^V1B"H`G08J`1T%*@!=1"#[`A6_W0D&.C\
+M____@\00_D0D"HI4)`HX5"00#X<>_O__@'PD"P!T#H/L"&H*5>C\____@\00
+M@<0<`@``6UY?7<.)]E575E.!["P"``"+A"1``@``BP")1"0,BXPD0`(``(I)
+M'(A,)!^+A"1``@``@\`LB<*+M"1``@``.48L#X1Z`P``A,D/A'(#``")1"08
+M@^P,4NC\____C6C@QP0D`````&H`:@#_M"18`@``_[0D8`(``.C\____B$0D
+M/<9$)#X`@\0@.$0D'@^#\@$``(UV`(/L#&H`#[9\)"Y7:@'_M"18`@``_[0D
+M8`(``.C\____#[;`P>`$@\!D@\0@/0`"```/AWD!``"#[`R-7"0L4U=J`?^T
+M)%@"``#_M"1@`@``Z/S___^#Q!QJ"%6-A"2(````4.C\____@\00A,`/A#T!
+M``"-52"+A"1``@``@\`LBT@$B5`$B44@B4H$B1&*1"0BB$4Q@^P(C40D?%#_
+MM"1,`@``Z/S___^#Q!`\_W0@#[;`C01`C03`B<+!X@4IPHM,)`R+@9`%``"-
+M%)")50R`?"0>`'1/#[9#`]'H@^`!P>`$BE4U@^+O"<*(534/MD,#P>@#@^`!
+MP>`%@^+?"<*(534/MD,#P>@"@^`!P>`#@^+W"<*(536*0P:(A8L```#IG@``
+M`(I#`HA%,8NT)$`"``")=0B*0P:(A8L````/MT,$B44X9HM#4&:)A8@```"*
+M0U*(A8H```"+0T")17B+0T2)17R+0TB)A8````"+0TR)A80```"+0Q")14B+
+M0Q2)14R+0QB)15"+0QR)152-?5B-0R#\N08```")QO.EBT,XB45PBT,\B45T
+MZQ:)]OY$)!Z*1"0=.$0D'@^"/O[__^LK#[9$)!Y05?^T)$P"``#_M"1,`@``
+MZ/S___^#Q!"*3"0=.$PD'@^"'0$``(U%*(G".44H#X3U````B<>0@^P,4NC\
+M____C5CX@\0,4VH&_[0D3`(``.C\____@\00@'M+`'0BD(/L#/]T)!CH_/__
+M_\<$)`$```#H_/___X/$$(![2P!UWX-['`!T<8M#',=`8`````#V0R0$=2F+
+M="0,_H97#```@^P,5NC\____@\0,:@&+0QP/MD`!4%;H_/___X/$$(/L!/]S
+M'(M$)!3_L"0%``!J`>C\____@\0,_W,<BTPD%/^Q)`4``&H&Z/S____'0QP`
+M````@\00BU,$BP.)4`2)`HNT)$`"``#^3@K^33"#[`A3_W0D&.C\____@\00
+MB?HY?2@/A0[___^+A"1``@``_D@<@^P(5?]T)!CH_/___X/$$/Y,)!^+5"08
+MBXPD0`(``#E1+'0+@'PD'P`/A9+\__^!Q"P"``!;7E]=PXGV55=64X'L)`(`
+M`(NL)#P"``"+10")1"04_[0D.`(``%7H_/___\<$)`````!J`&H`5?^T)$P"
+M``#H_/___XA$)"K&1"0K`(/$(#A$)`L/@S,#``"0@^P,:@`/MGPD&U=J`57_
+MM"1,`@``Z/S___\/ML#!X`2#P&2#Q"`]``(```^'[P(``(/L#(U<)!Q35VH!
+M5?^T)$P"``#H_/___X/$&(U$)'105>C\____@\00//\/A;X"``"#[`S_="08
+MZ/S___^)PX/$$(7`#X31`@``_D4<QD`P`(M$)&R)`XM$)'")0P2#[`B-1"1L
+M4%7H_/___X/$$#S_="`/ML"-!$"-!,")PL'B!2G"BTPD#(N!D`4``(T4D(E3
+M#(I$)!*(0S$/MD0D$]'H@^`!P>`$BE,U@^+O"<*(4S4/MD0D$\'H`X/@`<'@
+M!8/BWPG"B%,U#[9$)!/!Z`*#X`'!X`.#XO<)PHA3-8EK"(I$)!:(@XL```"+
+M1"08B4-`BT0D'(E#1(I$)!>(0S(/MT0D%(E#.(M$)&!FB8.(````BD0D8HB#
+MB@```(M$)%")0WB+1"14B4-\BT0D6(F#@````(M$)%R)@X0```"+1"0@B4-(
+MBT0D)(E#3(M$)"B)0U"+1"0LB4-4C7M8C70D$(/&(/RY!@```/.EBT0D2(E#
+M<(M$)$R)0W2-4R"-12R+2`2)4`2)0R")2@2)$;\`````@'PD$``/A%`!``"#
+M[`S_="08Z/S___^)QH/$$(7`#X1C`0``_D4*QD`B!<:`L`````#&0",$QT!`
+M```%`,=`1`````!FQX"0```````/M]?!X@2-5!1PBD($B$8@BD(%B$8AB6XH
+MB5XLBD(&B$9)BD((@^`/B(:R````9HM.-('AW_W__XG(@\@09HE&-(I"",#H
+M!#P)=0F)R(/(,&:)1C0/M\?!X`2*1`1XP.@$/`IU!F:!3C0``@^WQ\'@!(U4
+M)!`!T(M0;(F6G````(M`<(F&H````(F6E````(F&F````/Y#,(U%.(M0!(EP
+M!(D&B58$B3*-5@B-0RB+2`2)4`2)1@B)2@2)$0^V1B"H`G0:J`1T%J@!=!)6
+M#[9&25!35>C\____@\00ZR`/MD8@J`)T&*@$=!2H`740@^P(5O]T)!CH_/__
+M_X/$$$=F#[9$)!!F.?@/A[#^___^1"0+BDPD"CA,)`L/@L[\__^`?0H`=13&
+M107_@^P(5?]T)!CH_/___X/$$('$'`(``%M>7UW#D%575E.#[!B+;"0LBW0D
+M,&H`:@!J`%95Z/S___^(1"0JLP"#Q"`Z7"0*<R*-?"0+D%</ML-05E7H_/__
+M_X/$$(!\)`O^=7Y#.EPD"G+C_DXT@'XT`'16BS[&1C0`BU8LC5K@C48L.<)T
+M6XG"D(-[#`!T#(M#((U8X#G0=?#K1OY&-(/L"%95Z/S____'!"0`````#[:#
+MBP```%!35O^WQ`D``.C\____@\0@ZQB#[`A65>C\____@\0(5E7H_/___X/$
+M$)"#Q`Q;7E]=PU=64XM$)!"+&+\*````L@"`>RL`=C@/MG`)B?8/MLJ)\-/X
+MJ`%T(8G(P>`$`<B+A(-<"P``)0```P#!Z!"#P`B)^3C(<P*)QT(X4RMWSHGZ
+M#[;"6UY?PY!75E.+1"00BQB_"````+(`@'LK`'8X#[9P"8GV#[;*B?#3^*@!
+M="&)R,'@!`'(BX2#7`L``"4```,`P>@0@\`(B?DXR'8"B<=".%,K=\Z)^@^V
+MPEM>7\.055=64X/L'(M$)#"+*,9$)!<`@'@)``^$]`,``,9$)`\`#[9`"8G"
+MJ`%U$9#^1"0/B="*3"0/T_BH`73P#[94)`^)T,'@!`'0C52%`(N"3`L``*D`
+M``(`=!`-```$`"7___W_B8),"P``#[94)`^)T,'@!`'0]H2%3@L```0/A+D"
+M```YK20%``!U#(VU8`P``(ET)!CK"HN%)`4``(E$)!B#[`0/MDPD$XG(P>`$
+M`<B-1(4`#[:05PL``%(/MI!6"P``4@^VD%4+``!2#[:05`L``%(/MI!3"P``
+M4@^VD%(+``!2#[:040L``%(/MH!0"P``4`^V12E046B0`P``Z/S___^#Q#!F
+MQT0D%(``#[94)`^)T,'@!`'0C82%4`L``(E$)!`/MT0D%(M4)!AF#[:$$)@$
+M``!F/?\`=#D/M\"-!$"-!,")PL'B!2G"BTPD&(N!D`4``(T<D(M\)!"Y"```
+M`/R)WO.F#Y?"#Y+`.,(/A'4!``!F_T0D%&:!?"04@0!VH8/L#%7H_/___XG#
+M@\00A<`/A'8"```/ME0D#XG0P>`$`=#VA(5-"P``!'0$@$LU`@^V5"0/B=#!
+MX`0!T/:$A4X+```$=`2`2S40#[94)`^)T,'@!`'0]H2%30L```AT!(!+-00/
+MME0D#XG0P>`$`=#VA(5."P``"'0$@$LU(`^V5"0/B=#!X`0!T/:$A4T+```"
+M=`2`2S4!#[94)`^)T,'@!`'0]H2%3@L```)T!(!+-0C&0S``#[94)`^)T,'@
+M!`'0C42%`(N04`L``(D3BX!4"P``B4,$BT0D,(E#"%#H_/___XB#BP```(M4
+M)#3^0ARQ`(/$!(!]*P!V)(MT)#`/MD8)T_BH`700#[9$)!>(3!A`_D,R_D0D
+M%T$X32MWW(U3((M$)#"#P"R+2`2)4`2)0R")2@2)$8M$)##^0#2#[`QH````
+M``^V@XL```!04_]T)$C_M<0)``#H_/___X/$(.DE`0``@^P,#[9#!U`/MD,&
+M4`^V0P50#[9#!%`/MD,#4`^V0P)0#[9#`5`/M@-0:.`#``#H_/___X/$*(M4
+M)#C&0@7_4E7H_/___X/$$.G7````C78`#[94)`^)T,'@!`'0C72%`/:&3@L`
+M``@/A+<```"#[`Q5Z/S___^)PX/$$(7`#X2A````QD`C!L9`(@5FQX"0````
+M``#&0"`&QD`A`,=`0```!0#'0$0`````BY90"P``B9"<````BX94"P``B8.@
+M````B9.4````B8.8````BTPD,(E+*%'H_/___XB#L@```&:#2S00_W0D-.C\
+M____@\0(/`EV!F:!2S0``HMT)##&1@H!B?"#P#B+4`2)6`2)`XE3!(D:@^P(
+M4U7H_/___X/$$)"#Q!Q;7E]=PU575E.#[`R+="0@BWPD)+``A?]T`XI'!0^V
+MP+T`````A<!T$#W_````#X1+`0``Z8P%``")Z@^VPHJ$,!X%```\_W02#[;0
+MC012P>`#*="-O(8H`0``18GI@/D#=M:]`````)")Z@^VPHJ$,!X%```\_W0T
+M#[;0C012P>`#*="-O(8H`0``]D<&`G00@^P(:@!7Z/S___^#Q!#K#(/L#%?H
+M_/___X/$$$6)Z8#Y`W:T9@^V1B9F.8:D"0``#X7^!```A?\/A9H```"`?CD`
+M#X7L!```QD8Y`;L`````C78`#[?3BXR6F`(``(7)="Z#>7``="B+07#'07``
+M````QX26F`(```````"#[`1J_U'_<7C_T(/$$.L_C78`#[?3@[R6F`(```!T
+M+XN$EI@"``"#>'0`="*+073'070`````QX26F`(```````"#[`S_<7C_T(/$
+M$(GV0V:#^S]V@>E<!```QD<%_X/L"%=6Z/S___^#Q!#I1@0``,9$)`L`D`^V
+M1"0+BH0P'@4``#S_#X3L````#[;0C012P>`#*="-O(8H`0``@'\%_P^$T```
+M`+T`````@'\*``^&M0```(U?.(/L#%/H_/___XE$)!2#Q!"+0P2+5"0$B5,$
+MB1J)0@2)$(!Z(O]T?X"ZL0````!T:P^V0B"H`G0>J`1T&J@!=!92#[9"25#_
+M<BQ7Z/S___^#Q!#K1XGVBTPD!`^V02"H`G48J`1T%*@!=!"#[`A15NC\____
+M@\00ZR*0BU0D!`^V0B"H`G05J`1T$:@!=0V#[`A25NC\____@\00N`$```#I
+M7@,``)!%B>DX3PH/AT[___^X`0```.E'`P``B?;^1"0+@'PD"P,/AO'^___&
+M1"0+`(!^.0`/A9X```"[`````)`/M\.+C(:8`@``9@^VE#"8!```A<ET;8-Y
+M<`!T9X-Y8`!U86:!^O\`=#(/M]*+OE@%``"-!-+!X`(IT,'@`_9$.",$=!>`
+M?#@A`'40@^P$4E%6Z/S___^#Q!#K*(M1<`^WP\>$AI@"````````QT%P````
+M`(/L!&K_4?]Q>/_2@\00B?9#9H/[/P^&<?___\9&.0'IA`(```^V1"0+BH0P
+M'@4``#S_#X1@`@``#[;0C012P>`#*="-O(8H`0``O0````"`?PH`#X8_`@``
+MC78`@^P,C5\X4^C\____B40D%(/$$(M#!(M4)`2)4P2)&HE"!(D0@'HB_P^%
+M`@(``&:+2AAFB4PD`@^WP68/MI0PF`0``&:)%"2+G(:8`@``BTPD!(I!)*@$
+M=&*%VW1>@WMP`'18@WM@`'52@^#[B$$D]D$C!'03@^P$#[?"4%-6Z/S___^#
+MQ!#K,XM3<`^W1"0"QX2&F`(```````#'0W``````BT0D!,=`'`````"#[`1J
+M_U/_<WC_TH/$$(M4)`3V0B,$#X0^`0``QH*P`````(!G".?V0B0!#X3Z````
+M@&(D_H-Z'`!T4H!Z(0!U+?9"(P1T)X/L!`^W5"0&#[9&*<'@!@'"4O^V)`4`
+M`&H'Z/S___^#Q!#I[````(/L!(M,)`C_<1S_MB0%``!J`>C\____@\00Z<T`
+M``"%VW1C@WMP`'1=BT0D!(!X(0!U'O9`(P1T&(/L!`^W1"0$4%-6Z/S___^#
+MQ!#IFP```(M3<`^W1"0"QX2&F`(```````#'0W``````BTPD!,=!'`````"#
+M[`1J_U/_<WC_TH/$$.MFBT0D!(!X(0!U7/9`(P1T5H/L!`^W5"0&#[9&*<'@
+M!@'"4O^V)`4``&H"Z/S___^#Q!#K,HUV`(M4)`2#>AP`="6+0AR#>'0`=!R+
+M4'3'0'0`````@^P,BTPD$(M!'/]P>/_2@\00BT0D!/9`)`)T'X/L!/]P'/^V
+M)`4``&H&Z/S___^+5"04@&(D_8/$$)!%B>DX3PH/A\3]___^1"0+@'PD"P,/
+MAGW]__^0N`$```"#Q`Q;7E]=PXUV`%575E.#[`R+7"0DBVLH#[=#&+H`````
+MBTPD(("\")@$``#_#X20`@``#[9#(H/X#P^$]@```(/X#W\Y@_@,#X2T````
+M@_@,?Q.#^`5T3X/X"P^$D````.E8`@``@_@-#X2D````@_@.#X2L````Z4$"
+M``"0@_@9?P^#^!A]5H/X%'0MZ2P"``"#^!MT-#W_````#X28````Z1<"``"#
+M[`AJ`5/H_/___X/$$.D$`@``@^P,4^C\____@\00Z?,!``"#[`AJ`%/H_/__
+M_X/$$.G@`0``@^P(:@%3Z/S___^#Q!#IS0$``(/L#%/H_/___X/$$.F\`0``
+M@^P,4^C\____@\00Z:L!``"#[`Q3Z/S___^#Q!#IF@$``(/L#%/H_/___X/$
+M$.F)`0``D,9#(O^)7"0(OP````"`?0H`#X;%````C74XB?:#[`Q6Z/S___^)
+MPX/$$(M&!(E>!(DSB4,$B1B`>R+_#X2'````@'LA``^%A0```("[L0````!T
+M:`^V0R"H`G0<J`1T&*@!=!13#[9#25#_<RQ5Z/S___^#Q!#K1`^V0R"H`G4<
+MJ`1T&*@!=!2#[`A3_W0D+.C\____@\00ZR*)]@^V0R"H`G08J`1T%*@!=1"#
+M[`A3_W0D+.C\____@\00N@$```#IQP```(GVQH.Q`````)!'B?@X10H/AT#_
+M__^)^3A-"@^%C0```(M$)`B`>"$B=`:`>"$-=1B#[`AJ"O]T)!3H_/___[H!
+M````@\00ZWZ_`````(!]"@!V6HUU.(UV`(/L#%;H_/___XG#@\00BT8$B5X$
+MB3.)0P2)&(![(2)T!H![(0UU)8/L"%-H[@```.C\____@\0(:@I3Z/S___^Z
+M`0```(/$$.LCB?9'B?DX30IWK,9%!?^#[`A5_W0D+.C\____@\00N@$```")
+MT(/$#%M>7UW#D%575E.#[`R+7"0DBVLH#[=#&+H`````BTPD(("\")@$``#_
+M#X1L!@``#[9#(H/X"0^$4P,``(/X"7\]@_@%#X3<````@_@%?Q>#^`,/A((`
+M``"#^`0/A*0```#I,`8``(/X!P^$#`,``(/X!P^/[P(``.EV`@``D(/X%@^$
+MN`(``(/X%G\B@_@4#X0B`P``@_@4#X][`@``@_@*#X3\`@``Z>H%``")]H/X
+M&@^$'`(``(/X&G\.@_@7#X2.`@``Z<P%```]_P````^$Y@(``.F\!0``BT48
+M@6`H___^_VH`:@%3_W,HZ/S____'!"0%````Z/S___^#Q!#ID04``&H`:@!3
+M_W,HZ/S____'!"10PP``Z/S___^#Q!#I<`4``,9$)`L`BWPD((!_*P!V'P^V
+M50F0B="*3"0+T_BH`74.08A,)`N+?"0@.$\K=^8/MD,@J`)T#*@$=`BH`0^%
+MPP```(M5&(M"**D```$`=`TE___^_XE"*.FI````OA`G``"*1"0+B$0D"@^V
+M^(M,)""+$8!\)`L#=AL/MD0D"XN$PH`!``"C`````"4```$`ZQ2-=@"+A/J`
+M`0``HP`````E```!`(7`=":`?"0*`W80QX3Z@`$``````0#K#HUV`,>$^H`!
+M``````$`A<!U%8/L#&CH`P``Z/S___^#Q!!.=8KK!(7V=1W&0R,"QD,B_X/L
+M"%/_="0LZ/S___^#Q!#I:P0``/9%!@%T/8/L"%-5Z/S___^#Q!"$P'4LOOH`
+M``"-=@"#[`A35>C\____@\00A,!U$X/L#&CH`P``Z/S___^#Q!!.==R`?"0+
+M`W8@#[9,)`N+?"0@BQ>+A,J``0``HP````")A,J``0``ZSX/MG0D"XM$)""+
+M"(!\)`L#=@Z+A/&``0``HP````#K%P^V1"0+BWPD((L7BX3"@`$``*,`````
+MB83Q@`$``(/L"%/_<RCHAR0``,<$)"!.``#H_/___X/$$.FC`P``@^P(#[=#
+M&%!H&`0``.C\____@\0(4_]S*.CE*0``@\00Z7T#``"#[`@/MT,84&@"`0``
+MZ/S___^#Q`A3_W,HZ"<J``"#Q!#I5P,``(/L"%/_<RCH&R0``(/$$.E#`P``
+M@^P(4_]S*.CC)P``@\00Z2\#``"#[`A3_W,HZ%LG``"#Q!#I&P,``(/L"%/_
+M<RCH+R@``(/$$.D'`P``@^P(4_]S*.B#*```@\00Z?,"``"#[`A3_W,HZ-<H
+M``"#Q!#IWP(``,9#(O\/MD,@J`)T"*@$=`2H`745@WLP`'4/5>C\____B(.R
+M````@\0$]D4(`@^$8`$``(M]*`^V5RH/MD<?2#G"?2W^1RK^1RO&1R8`9HM'
+M,H/@_H/("&:)1S*#[`A7_W0D+.C\____@\00Z6\"``#&1"0+`(!]"@`/AL``
+M``"-=3B#[`Q6Z/S___^)PX/$$(M&!(E>!(DSB4,$B1B`>R+_#X2`````@+NQ
+M`````'1K#[9#(*@"=!^H!'0;J`%T%U,/MD-)4/]S+%7H_/___X/$$.M'C78`
+M#[9#(*@"=1RH!'08J`%T%(/L"%/_="0LZ/S___^#Q!#K(HGV#[9#(*@"=!BH
+M!'04J`%U$(/L"%/_="0LZ/S___^#Q!"Z`0```.F_`0``B?;&@[$`````_D0D
+M"XI$)`LX10H/AT/____V1S*`=!_V1RT#=!G&1R8`@^P(5_]T)"SH_/___X/$
+M$.E[`0``QD4%_\9')@!FBT<R@^#S@\@"9HE',H!G+?Z#[`A5_W0D+.C\____
+M@\00Z4P!``#&1"0+`(!]"@`/AL4```"-=3B)]H/L#%;H_/___XG#@\00BT8$
+MB5X$B3.)0P2)&(![(O\/A(H```"`>R$`=7V`N[$`````=&@/MD,@J`)T'*@$
+M=!BH`7044P^V0TE0_W,L5>C\____@\00ZT0/MD,@J`)U'*@$=!BH`704@^P(
+M4_]T)"SH_/___X/$$.LBB?8/MD,@J`)T&*@$=!2H`740@^P(4_]T)"SH_/__
+M_X/$$+H!````Z9<```")]L:#L0````#^1"0+BDPD"SA-"@^'0/___XI$)`LX
+M10IU6,9$)`L`@'T*`'9-C74X@^P,5NC\____B<.#Q!"+1@2)7@2),XE#!(D8
+M@'LA(G0&@'LA#746@^P(:@I3Z/S___^Z`0```(/$$.LJD/Y$)`N*3"0+.$T*
+M=[;&107_@^P(5?]T)"SH_/___X/$$(UV`+H!````B="#Q`Q;7E]=PY!55U93
+M@^P,BWPD((MT)"2+%XM>5`^V1B:#^!D/A[<#``#_)(5P#@``]D8R!'0,9L=&
+M,@$`QD8F`>L\9H-^,B!U#&;'1C((`,9&)@WK*?9&,H!T&?9&+0-T$V:+1C(D
+M?X/("&:)1C+&1B8-ZPKV1C((=`3&1B8'@^P(5E?H_/___X/$$.E0`P``BX($
+M`0``HP````"#R%")@@0!``!J`6H":@%6Z/S___^#Q!#I*`,``&H!:@!J`5;H
+M_/___X/$$.D4`P``:@%J`6H!5NC\____@\00Z0`#``!J`6I@:@%6Z/S___^#
+MQ!#I[`(``(/L#&H!#[9&+%!J8&H!5NC\____@\0@Z=`"``"#[`QJ`6@```$$
+M:B%J`5;H_/___X/$(.FT`@``@^P,:@%J`6H":@!6Z/S___^#Q"#IFP(``(/L
+M#&H!:@!J`FH`5NC\____@\0@Z8("``"+0QB!8"C___?_@^P,:@%J`6H":@!6
+MZ/S___^#Q"#I7P(``(/L#&H!:@!J`FH`5NC\____@\0@Z48"``!J`6H":@!6
+MZ/S___^#Q!#I,@(``&H!:@!J`%;H_/___X/$$.D>`@``:@%J`6H`5NC\____
+M@\00Z0H"``"+0QB!8"C___?_@^P,:@%J_VH!:@!6Z/S___^#Q"#IYP$``&H!
+M:@!J`%;H_/___X/$$.G3`0``#[9&*XMLACR)72B)=3"*1BN(14G&12(#QD4A
+M`(!-(`7^0PJ-0SB+4`2):`2)10")502)*H/L#&B`&@8`Z/S____&1"0;`(/$
+M$(!_*P!V&@^V4PF)T(I,)`O3^*@!=0I!B$PD"SA/*W?JBU,8BT(HJ0``"`!T
+M"B7___?_B4(HZU.[F#H```^V="0+D(!\)`L#=AF+!XN$\(`!``"C`````*D`
+M``@`=2SK%XGVBP>+A/"``0``HP````"I```(`'43@^P,:.@#``#H_/___X/$
+M$$MUN(/L"%57Z/S___^#Q!#I[@```(/L#&A`#0,`Z/S___]J`&H@:@%6Z/S_
+M__^#Q!1H$"<``.C\____@\00Z<````!J`&H!:@!6Z/S____'!"00)P``Z/S_
+M__^#Q!#IH````(M#&(%@*/__]_^#[`QJ`&K_:@%J`%;H_/___X/$%&@0)P``
+MZ/S___^#Q!#K<VH`:@!J`%;H_/___\<$)!`G``#H_/___X/$$.M6:@!J(&H!
+M5NC\____QP0D$"<``.C\____@\00ZSF#[`A65^C\____@\00ZRJ#[`A65^C\
+M____@\00ZQN#[`QJ`6CP````:)L```!J`5;H_/___X/$()"X`0```(/$#%M>
+M7UW#C78`55=64X/L'(M$)#"+`(E$)!C&1"03`(M4)#"`>BL`#X:U`@``#[9,
+M)!.)R,'@!`'(BW0D,(T<AO:#7@L``!`/A(`"``"-DU`+``"X`0```-/@"$()
+MBYL\"P``B5PD%/9""`(/A/0```"*7"030SA>*P^&Y@````^V5"03B=#!X`0!
+MT(T$AHE$)`2-=@`/MO.)\,'@!`'PBU0D,(T\@O:'7@L``!`/A*(```"+;"0$
+M]X5,"P`````.``^$C@```(/L!&H(C8]0"P``B4PD%%&-A5`+``")1"044.C\
+M____@\00A,!T9X/L!&H(C8=$"P``4(V%1`L``%#H_/___X/$$(3`=$BX`0``
+M`(GQT^"+="0("D8)B$8)BU0D#(A""8-\)!0`=0R+OSP+``")?"04ZQL/MM.)
+MT,'@!`'0BW0D%(M,)#")M($\"P``B?9#BT0D,#A8*P^',O___XGV@WPD%``/
+MA;4```"#[`S_="0\Z/S___^)1"0D@\00A<`/A%<!```/ME0D$XG0P>`$`="+
+M5"0PC02"BTPD%(F(/`L``(V0.`L``(E1&(J`6`L``(A!!L9!!0"+7"0PB1G&
+M00H`QD$T`,9!'`"*7"030XMT)#`X7BMV8@^V5"03B=#!X`0!T`^VE(99"P``
+MC78`#[;+B=#3^*@!=!:)R,'@!`'(BW0D%(M,)#")M($\"P``0XM$)#`X6"MW
+MU>L>C78`#[94)!.)T,'@!`'0BTPD%(M4)#")C((\"P``#[9,)!.)R,'@!`'(
+MBUPD,(V$@U`+``"*4`F+="04B%8)#[98"8!\)!,#=A&+1"08QX3(``(``#@`
+M``#K%`^V1"03BU0D&,>$P@`"```X````@^P,:!`G``#H_/___X/$$(!\)!,#
+M=A4/MD0D$XM,)!B)G,$$`@``ZQ.-=@`/MD0D$XMT)!B)G,8$`@``_D0D$XI$
+M)!.+5"0P.$(K#X=+_?__@\0<6UY?7<.-=@!75E.+?"00BEPD%(LW@/L#=A(/
+MML/'A,8P`@``#````.L0B?8/ML/'A,90`@``#````(/L#&@0)P``Z/S___^#
+MQ!"`^P-V$0^VPXN$QC0"``"C`````.L/#[;#BX3&5`(``*,`````B<&!X0``
+M/P#!Z1`/MM.)T,'@!`'0C92'4`L``(I""(/@_(A""(/Y$'4+@\@"B$((ZQ6-
+M=@`/MM.)T,'@!`'0@(R'6`L```%;7E_#B?975E.#[""+7"0TBT0D,(LXO@``
+M``"-=@"#^P-V$XT$M0`!``")A-\``@``ZQ&-=@"-!+4``0``B83?``(``(/L
+M#&@0)P``Z/S___^#Q!"#^P-V$8N$WP0"``"C`````.L/C78`BX3?!`(``*,`
+M````B02T1H/^!G:?B>;\N0<```"+?"0X\Z6#Q"!;7E_#B?975E.#[""+7"0T
+MBT0D,(LXO@````"-=@"#^P-V$XT$M1P!``")A-\``@``ZQ&-=@"-!+4<`0``
+MB83?``(``(/L#&@0)P``Z/S___^#Q!"#^P-V$8N$WP0"``"C`````.L/C78`
+MBX3?!`(``*,`````B02T1H/^!G:?B>;\N0<```"+?"0X\Z6#Q"!;7E_#B?:+
+M3"0$B@'`Z`2)PH/B!_9!`@1T`X#.`O9!`P1T!H'*```"`/9!`@AT`X#."/9!
+M`PAT!H'*```(`/9!`@)T`X#.!/9!`P)T!H'*```$``^V013!X!@)PHG0PXUV
+M`/]T)`3H_/___X/$!,.-=@!55U93@^Q$BVPD6(I$)%R(1"07BU4`B50D$`^V
+MT(G0P>`$`="-1(4`B:@X"P``QH!9"P```%)5Z/S___^#Q!"Y`````+H@````
+MC40D$(UV`(@(0$IU^H/L!(UT)!16#[9\)!=75>C\____B?O!XP0!^XU<G0!6
+MZ/S___^)@T`+``"+1"0PB8-$"P``BT0D-(F#2`L``(V37`L``(/$%(!\)`\#
+M=A*+3"0(BX2YT`$``*,`````ZQ4/MD0D#XM<)`B+A(/0`0``HP````")`@^V
+M5"0/B=#!X`0!T(V,A6`+``"`?"0/`W82BUPD"(N$TX`!``"C`````.L5#[9$
+M)`^+5"0(BX3"@`$``*,`````B0$/ME0D#XG0P>`$`="-1(4`]H!>"P``$`^$
+M0P$``/:`6`L```)T6[D`````NB````"-1"00C78`B`A`2G7Z@^P$C7PD%%</
+MMG0D%U95Z/S___^)\\'C!`'SC5R=`%?H_/___XF#3`L``(M$)#")@U`+``"+
+M1"0TB8-4"P``@\04ZQ</ME0D#XG0P>`$`=#'A(5,"P```0`"`(!\)`\#=A8/
+MMD0D#XM,)`C'A,$P`@``&````.L4#[9$)`^+7"0(QX3#4`(``!@```"#[`QH
+M$"<``.C\____@\00@'PD#P-V&0^V1"0/BU0D"(N$PC0"``"C`````(G!ZQ</
+MMD0D#XM,)`B+A,%4`@``HP````")P0^V5"0/B=#!X`0!T/>$A5P+``````,`
+M=0B!X?___]_K!H')````((!\)`\#=A(/MD0D#XM<)`B)C,,T`@``ZQ`/MD0D
+M#XM4)`B)C,)4`@``@\0\6UY?7<.-=@"+5"0$BX(X!0``)?___P`]4`&3`'42
+MBH([!0``P.@$N@$````\#'0%N@````")T,-55U93@^P<BWPD,(LWQD0D$%"-
+M7"00QD,!!<9#`@3&0P,PQD,$$<9#!:O&0P8`QD,'`,>'7`P````````YOR0%
+M```/A=0```"-KV`,``"#[`QJ`6H(C8<X!0``4&@```(`5^C\____BX<P!0``
+MBI<[!0``C42"_(B'.P4``(/$(%?H_/___X/$!(3`=1.+1"00B8<X!0``BT,$
+MB8<\!0``H0````"*ESL%```!PD"C`````(B7.P4``(J'.`4``(B%.`4``(J'
+M.04``(B%.04``(J'.@4``(B%.@4``(J'.P4``(/``HB%.P4``(J'/`4``(B%
+M/`4``(J'/04``(B%/04``(J'/@4``(B%/@4``(J'/P4``(B%/P4``,>'7`P`
+M``````"+A@`!``"C`````"7__P``J"!U%(/(((F&``$``(N&``$``*,`````
+MBP?'@`0!````````BP?'@!@!````````BP?'@!P!````````@^P,:("$'@#H
+M_/___\>&<`$``!@!``"+AG0!``"C`````(#D_<>&<`$``!@!``"`S`2)AG0!
+M``#'AG`!```H`0``QX9T`0``?W\``,>&<`$``"0!``"+AG0!``"C`````"4`
+M`/__QX9P`0``)`$```W_/P``B89T`0``QX9P`0``/`$``,>&=`$`````>@#'
+MAG`!``"D`0``QX9T`0``?;_O_\>&<`$``+@!``"+AG0!``"C``````^WP,>&
+M<`$``+@!```-``#Z`(F&=`$``,>&G````/\```#'AI`"``!$`0``QX:4`@``
+M!A``",>&D`(``+0!``#'AI0"``!?<```QX:0`@``,````(N&E`(``*,`````
+M,.2`S#.)AI0"``#&1"0?`(/$$(!_*P`/AK8"``")]H!\)`\#=A4/MD0D#\>$
+MQC`"```(````ZQ.-=@`/MD0D#\>$QE`"```(````@^P,:!`G``#H_/___X/$
+M$(!\)`\#=A4/MD0D#XN$QC0"``"C`````.L3B?8/MD0D#XN$QE0"``"C````
+M`(!\)`\#=A0/ME0D#PT``(``B836-`(``.L2D`^V5"0/#0``@`")A-94`@``
+M@^P$C8<X!0``4`^V7"074U?H_/___X/$"%-7Z/S___^#Q!"`?"0/`W8-QX3>
+M,`(``$0!``#K$`^V1"0/QX3&4`(``$0!``"#[`QH$"<``.C\____@\00@'PD
+M#P-V%0^V1"0/QX3&-`(```80``CK$XUV``^V1"0/QX3&5`(```80``B`?"0/
+M`W85#[9$)`_'A,8P`@``M`$``.L3C78`#[9$)`_'A,90`@``M`$``(/L#&@0
+M)P``Z/S___^#Q!"`?"0/`W85#[9$)`_'A,8T`@``7W```.L3C78`#[9$)`_'
+MA,94`@``7W```(!\)`\#=A4/MD0D#\>$QC`"```(````ZQ.-=@`/MD0D#\>$
+MQE`"```(````@^P,:!`G``#H_/___[C_5(``@\00@'PD#P-V%`^V5"0/)?]4
+M``")A-8T`@``ZQ*0#[94)`\E__]__8F$UE0"``"#[`1J`0^V7"074U?H_/__
+M_\<$)""A!P#H_/___X/$$(!\)`\#=A"+A-Z``0``HP````#K$XGV#[9$)`^+
+MA,:``0``HP`````E___^_X!\)`\#=@\/ME0D#XF$UH`!``#K#9`/ME0D#XF$
+MUH`!``"X!0'(`(!\)`\#=A`/ME0D#XF$UH0!``#K#HGV#[94)`^)A-:$`0``
+M@^P,:*"&`0#H_/___X/$"`^V1"074%?H_/___X/$$/Y$)`^*1"0/.$<K#X=,
+M_?__@^P,5^C\____BX8$`0``HP````"#R`*)A@0!``"+A@`!``"C`````(/@
+M_8/(#8F&``$``(N&``$``*,`````BX?D"0``B88(`0``BX?H"0``B88,`0``
+MBX<("@``B880`0``BX<,"@``B884`0``QX8@`0````````^WAS0+```E_P\`
+M``T```$`B88@`0``BX=0"@``B88D`0``BX=4"@``B88H`0``BX=P"@``QP#_
+M#P``QX8T`0````````^WAS8+```E_P\```T```$`B88T`0``BX=T"@``B88X
+M`0``BX=X"@``B88\`0``QX9(`0```````,>&3`$````!``"+A@0!``"C````
+M`(/(68F&!`$``,>&5`$``/O_``S'AEP!``#__P``@\0L6UY?7<.-=@!3@^P4
+MBUPD'%/H8OG__[(`@\00D`^VPL>$@[`%````````QT2#1`````!"@/H/=N1F
+MQX,P"P``_P]FQX,R"P``_P_&0S@!N`$```"#Q`A;PXM4)`2+3"0(N``````Y
+MR'T<C78`@#P"`'0.@#P"('0(N`````##B?9`.<A\Y[@!````PY!55U93@^P\
+MBVPD5&:!?1"%``^'G0````^W11"+5"10@+P0F`0``/\/A(<```!F@WT0?W<D
+M#[:4$)@$``"+7"10BXM8!0``C032P>`"*="+1,$HBD@$ZU^09H%]$($`=RP/
+MMT40BWPD4`^VA#B8!```BX^0!0``C01`C03`B<+!X@4IPHM$D0B*2`3K*@^W
+M11"+5"10#[:$$)@$``"+DG0%``"-!$"-!("+1,)4BD@$ZP6-=@"Q_[+_9H%]
+M$(4`=P\/MT40BUPD4(J4&)@$``"`^?]T'`^VP8M\)%"`O#@>!0``_W0+@/K_
+M=`:`?10&=32#?5``=!:#[`B-15!0_W0D7.C\____@\00C78`@^P(5?]T)%SH
+M_/___X/$$.D+!P``C78`#[;!BTPD4`^VM`@>!0``C01VP>`#*?"-M($H`0``
+M#[;2C032P>`"*="+D5@%``"-',)F@;N0````JPUW!X!]%`)U1Y"#?5``=!:#
+M[`B-15!0_W0D7.C\____@\00C78`@^P(5?]T)%SH_/___\9#(O_&0R,"@\0(
+M4_]T)%SH_/___X/$$.E^!@``#[9%)(/X&@^$C@4``(/X&G\E@_@2=$R#^!)_
+M#87`#X0W!0``Z1P&``"#^!4/A`0&``#I#@8``(/X)0^$CP(``(/X)7\.@_@;
+M#X0$!0``Z?(%```]G@````^$<`,``.GB!0``@'T4``^%0@(``(M--(!])0!T
+M8H![(AD/E,"#P`N(0R*%R71#@'D!@'4]@'D"`'4W@'D#/'<Q#[9Q`[H4````
+MC4-,Q@`@0$IU^8/^$W8%OA0```"-4TR-002#[`164%+H_/___X/$$&;'@Y``
+M`````.EM!0``QD,B&/9!!D!U#P^V`8/@'X/X#0^%/`$```^V`8/@'X/X#74&
+MQD,A#>L$QD,A(H/L"`^V0R%0:!@!``#H_/___X/$$(-]4`!T$X/L"(U%4%#_
+M="1<Z/S___^#Q!"#[`A5_W0D7.C\____QD0D/P"#Q!"`?@H`=C>-;CB#[`Q5
+MZ/S___^)PX/$$(M%!(E=!(DKB4,$B1B`>R$B=`:`>R$-=0W^1"0OBEPD+SA>
+M"G?,BD0D+SA&"@^%ZP0``&;'1"0L``#'1"0H`````,9$)"\`@'X*`'9.C6XX
+M@^P,5>C\____B<.#Q!"+102)702)*XE#!(D8@'LA(G0&@'LA#747BU0D+&8Y
+M4QAR#8E<)"AFBUL89HE<)"S^1"0OBDPD+SA."G>U@WPD*``/A'@$``"+7"0H
+M@'LB_P^$:@0``,9#(O^#[`A3_W0D7.C\____@\00Z5$$```/M@&#X!^#^`%U
+M#<9#(0'&0R+_Z0`$``#V004!=`3&0R(9@WTT``^$[`,``(M]-(E\)#"Y````
+M`+HH````C4-@B`A`2G7ZN0````"Z"````(V#B````(@(0$IU^HU#8(MT)#"#
+MQ@C\N08```")Q_.EBU0D,(M"((F#B````.F6`P``9O^#D````(/L#&@0)P``
+MZ/S____&0R(%@\00Z78#``"+332)3"0TBT4XBD`"@^`/@'T4`'5_#[91!P^V
+M00;!X`@!P@^V007!X!`!P@^V003!X!@!PHF3K`````^V40,/MD$"P>`(`<(/
+MMD$!P>`0`<(/M@'!X!@!PHE30,=#1`````"#NZP`````=2!F_X.0````@^P,
+M:!`G``#H_/___\9#(@N#Q!#IZ@(``,9#(@WIX0(``(!]%"!U*#P&=`0\`G4@
+M9O^#D````(/L#&@0)P``Z/S____&0R(%@\00Z;,"``"#?5``=!.#[`B-15!0
+M_W0D7.C\____@\00@^P(5?]T)%SH_/___X/$#%-6_W0D7.C\____@\00Z;`"
+M``"+13B*0`*#X`^+?32)?"0T@'T4``^%``$```^V5PL/MD<*P>`(`<(/MD<)
+MP>`0`<(/MD<(P>`8`<*)DZP````/ME<'#[9'!L'@"`'"#[9'!<'@$`'"#[9'
+M!,'@&`'"B50D((G0P?@?B40D)`^V1P.)PK@``````T0D(!-4)"2)1"08B50D
+M'`^V1P*)PK@`````P>((`T0D&!-4)!R)1"00B50D%`^V1P&)PK@`````P>(0
+M`T0D$!-4)!2)1"0(B50D#`^V!XG"N`````#!XA@#1"0($U0D#(E#0(E31/9'
+M#`%T!6:#2S8$@[NL`````'4@9O^#D````(/L#&@0)P``Z/S____&0R(9@\00
+MZ68!``#&0R(-Z5T!``"`?10@=2@\!G0$/`)U(&;_@Y````"#[`QH$"<``.C\
+M____QD,B&8/$$.DO`0``@WU0`'03@^P(C4504/]T)%SH_/___X/$$(/L"%7_
+M="1<Z/S___^#Q`Q35O]T)%SH_/___X/$$.DL`0``QD,B%.GJ````@'T4('4Q
+MBT4XBD`"@^`//`9T!#P"=2!F_X.0````@^P,:!`G``#H_/___\9#(A2#Q!#I
+MLP```,9#(AOIJ@```(!]%`!U5HM5-(E4)#!FBT,T9H-+-@$,AF:)0S2`>@,`
+M=06`.A9W'6;_@Y````"#[`QH$"<``.C\____QD,B#8/$$.MFBTPD,/9!!@1T
+M!V:#2S8"ZT!F@V,V_>LY@'T4('4NBT4XBD`"@^`//`9T!#P"=2)F_X.0````
+M@^P,:!`G``#H_/___\9#(@6#Q!#K&F:#8S3YQD,B#NL/@'T4`'4%9H-+-@/&
+M0R(/@WU0`'03@^P(C4504/]T)%SH_/___X/$$(/L"%7_="1<Z/S___^#Q`A3
+M_W0D7.C\____@\00C78`@\0\6UY?7<-55U93@^P,BWPD((M<)"1F@7L0A0`/
+MAXD````/MT,0@+PXF`0``/]T>V:#>Q!_=R`/MI0XF`0``(N/6`4``(T$TL'@
+M`BG0BT3!*(I(!.M7D&:!>Q"!`'<H#[=#$`^VA#B8!```BX^0!0``C01`C03`
+MB<+!X@4IPHM$D0B*2`3K)@^W0Q`/MH0XF`0``(N7=`4``(T$0(T$@(M$PE2*
+M2`3K!8UV`+'_LO]F@7L0A0!W"P^W0Q"*E#B8!```@/G_=!@/ML&`O#@>!0``
+M_W0+@/K_=`:`>Q0&=2R#>U``=!*#[`B-0U!05^C\____@\00B?:#[`A35^C\
+M____@\00Z4H"``")]@^VP0^VM#@>!0``C01VP>`#*?"-M(<H`0``#[;2C032
+MP>`"*="+EU@%``"-+,*+0S2`>Q0`#X2E````@'LF!@^$FP```(![)@P/A)$`
+M``!FBY60````C4(!9HF%D````&:#^@EV)(!](@9T'L9%(P+&12+_@&4D_H/L
+M"%57Z/S___^#Q!#IO@$``(/L#&CH`P``Z/S___\/MD4@@\00J`)T):@$="&H
+M`70=@^P,:@!J`@^V14E0_W4L5NC\____@\0@Z8$!``#&12(#@^P(55?H_/__
+M_X/$$.EK`0``C78`@'LF`74*QD4B!.DI`0``D(![)@)U"<9%(@7I&0$``(![
+M)@,/A9````"`?2(%=2EF@7@$R#=U(8/L"`^W11A0:$P$``#H_/___X/$$,9%
+M(@;IXP```(UV`(/L"%!5Z/S___]J*(U%8%#H1_7__X/$&(3`=3AJ%(U%3%#H
+M-?7__X/$"(3`=29J"(V%B````%#H(/7__X/$"(3`=1&+140+14!T"<9%(A?I
+MC````,9%(AIF_X60````ZW^`>R87=0;&12(5ZW.`>R88=0;&12(6ZV>`>R8$
+M=0;&12('ZUN`>R8%=0;&12((ZT^`>R8&=0;&12()ZT.`>R8,=0;&12(*ZS>`
+M>R86=0;&12(4ZRN`>R8.=26#>U``=!"#[`B-0U!05^C\____@\00@^P(4U?H
+M_/___X/$$.LP@WM0`'02@^P(C4-04%?H_/___X/$$(GV@^P(4U?H_/___X/$
+M"%57Z/S___^#Q!"0@\0,6UY?7<-55U93@^P,BWPD((MT)"1F@7X0A0`/AXD`
+M```/MT80@+PXF`0``/]T>V:#?A!_=R`/MI0XF`0``(N/6`4``(T$TL'@`BG0
+MBT3!*(I(!.M7D&:!?A"!`'<H#[=&$`^VA#B8!```BX^0!0``C01`C03`B<+!
+MX@4IPHM$D0B*2`3K)@^W1A`/MH0XF`0``(N7=`4``(T$0(T$@(M$PE2*2`3K
+M!8UV`+'_NO\```!F@7X0A0!W#0^W1A!F#[:4.)@$``"`^?]T!V:!^O\`=2R#
+M?E``=!*#[`B-1E!05^C\____@\00B?:#[`A65^C\____@\00Z<(```")]@^V
+MR0^VG#D>!0``C01;P>`#*=B-G(<H`0``#[?2C032P>`"*="+EU@%``"-+,*`
+M?A0`=#B#[`A1:&P$``#H_/___X/$"(M5!(M%`(E0!(D"_DL*55?H_/___\9#
+M!?^#Q`A35^C\____@\00D(!^)@%U*H/L#&@0)P``Z/S___^#Q`A65^C\____
+M:@%J`%53Z/S___^#Q"#K)XUV`(/L#&A0PP``Z/S___^#Q`A65^C\____@\0(
+M55/H_/___X/$$(/$#%M>7UW#5E.#[!"+="0@BD0D)(A$)`^*1"0HB$0D#HM$
+M)!R+&%/H_/___XG"@\00A<!U#L:&L0````'&1B(#ZVJ0QD`DX<9`)0&`?"0#
+M`1G`]]"#P`*(0B:P#X!\)`(`=0RP`(-^,`!T!(I&29"(0B=FBT889HE"$(E:
+M&,="(`````#'0C0`````N`````"`?"0"`'4%N,B]`@")0FR#[`A24^C\____
+M@\00@\0$6U[#D%575E.#[!B+;"0PBT0D+(LX5^C\____B<.#Q!"%P'4,QH6Q
+M`````>FA````@^P,5^C\____B<:#Q!"%P'46QH6Q`````8/L"%-7Z/S___^#
+MQ!#K>8U3/(E4)`C&0R3AQD,E`<9#)@-FBT489HE#$(M4)""+`HE#&,=#(``"
+M``"+1@B)0S2Y`````+H``@``D(@(0$IU^HES4,=#;,B]`@"#[`AJ`/]T)!3H
+M_/____]S(/]V$/]V#/]T)"3H_/___X/$&%-7Z/S___^#Q!"#Q`Q;7E]=PXUV
+M`%=64XM<)!"+3"04BWPD&+X`````.?YS%8H3BD,!B`&(40&#P0*#PP)&.?YR
+MZUM>7\.-=@!55U93@^P,BUPD((ML)"2);"0(9H-]``!Y$@^W10`E`!\``,'X
+M"(A#(8UV`(U[3(UU%/RY!0```/.EBT4NB8.(````BT4RB8.,````C7M@C74V
+ML0KSI6H*C4-,4%#H:O___VH$C8.(````4%#H6____VH4C4-@4%#H3____V;'
+M0S0``&;'0S8``(/$)(M$)`AF@[BR`0```0^4PL'B`XI#)(/@]PG0B$,D]H6G
+M````!'0&9L=#-`$`]H6D`````70C9H-+-`+VA:H````!=`5F@TLV`?:%J```
+M``%T!V:!2S0``9#VA:0````@=!-F@TLT!/:%J@```"!T!6:#2S8"]H6D````
+M0'079H%+-(``]H6J````0'0(9H-+-@B-=@#&0TH"]H69`````70G]D,T`70*
+M9H-+-`AF@TLV$(J%E@```(/@'T"(0TH\('4&QD-*'XGV]H68````"'0&9H%+
+M-``"]H68````!'0%9H-+-"#VA9@````"=`5F@TLT$/:%J````"!T$/:%K@``
+M`"!T!V:#2S1`B?;V0S0!=!:+A<@```"+E<P```")0T")4T3K#XGVBT5XB4-`
+MQT-$`````(-#0/^#4T3_]D5J`G0=]H6`````#W049H.]@`````(9P(/`!(A#
+M..L&B?;&0S@"QD,Y__9%?@1T!L9#.0+K&/9%?@)T!L9#.0'K#/9%?@%T!L9#
+M.0")]L9#.O_V16H$=!BQ``^WA;````#3^*@!=`.(2SI!@/D&=NJ#[`AH``(`
+M`%7H_/___XF#E````+@!````@\0<6UY?7<.05U93BWPD$(M<)!2+-X/L#%;H
+M_/___XG"BDLZ@\00A<!U"L:#L0````'K0I#&0"3AQD`E`<9`)@2(2"=FBT,8
+M9HE"$(L'B4(8QT(@`````,="-`````#'0FS(O0(`B$L]@^P(4E;H_/___X/$
+M$%M>7\.-=@!75E.+?"00BUPD%(LW@^P,5NC\____B<**2SB#Q!"%P'4*QH.Q
+M`````>M"D,9`).'&0"4!QD`F!8A()V:+0QAFB4(0BP>)0AC'0B``````QT(T
+M`````,=";,B]`@"(2SN#[`A25NC\____@\006UY?PXUV`%=64XMT)!"+?"04
+MBQZ#[`Q3Z/S___^)PH/$$(7`=0G&A[$````!ZSO&0"3AQD`E`<9`)@9FBT<8
+M9HE"$(L&B4(8QT(@`````,="-`````#'0FS(O0(`@^P(4E/H_/___X/$$%M>
+M7\.05U93BW0D$(M\)!2+'H/L#%/H_/___XG"@\00A<!U"<:'L0````'K.\9`
+M).'&0"4!QD`F#&:+1QAFB4(0BP:)0AC'0B``````QT(T`````,=";,B]`@"#
+M[`A24^C\____@\006UY?PY!75E.+="00BWPD%(L>@^P,4^C\____B<*#Q!"%
+MP'4)QH>Q`````>M#QD`DX<9`)0'&0"86QD`H`6:+1QAFB4(0QD)H#XL&B4(8
+MQT(@`````,="-`````#'0FS(O0(`@^P(4E/H_/___X/$$%M>7\.05U93BW0D
+M$(M\)!2+'H/L#%/H_/___XG"@\00A<!U"<:'L0````'K.\9`).'&0"4!QD`F
+M%V:+1QAFB4(0BP:)0AC'0B``````QT(T`````,=";,B]`@"#[`A24^C\____
+M@\006UY?PY!75E.+="00BWPD%(L>@^P,4^C\____B<*#Q!"%P'4)QH>Q````
+M`>L[QD`DX<9`)0'&0"889HM'&&:)0A"+!HE"&,="(`````#'0C0`````QT)L
+MR+T"`(/L"%)3Z/S___^#Q!!;7E_#D%=64X/L'(M\)"R*7"0PBD0D-(A$)!N*
+M1"0XB$0D&HM'5(LP5NC\____B<+&0"3AQD`E`<9`)A&#Q!"P#X3;=0.*1RN(
+M0B>*1"0/B$(H9HM')&:)0A")<AC'0B``````QT(T`````+@`````@'PD#@!U
+M!;@`````B4)L@^P(4E;H_/___X/$(%M>7\.05U93@^P<BWPD+(I<)#"*1"0T
+MB$0D&XI,)#R(3"0:BT=4BS!6Z/S___^)PL9`).'&0"4!QD`F$H/$$+`/A-MU
+M`XI'*XA")XI$)`^(0BB+3"0L#[;%B$(IB<C!Z!"(0BJ)R,'H&(A"*XA*+&:+
+M1R1FB4(0B7(8QT(@`````,="-`````"X`````(!\)`X`=06X`````(E";(/L
+M"%)6Z/S___^#Q"!;7E_#55=64X/L'(ML)#"+?"0TQT0D&`````!F@7\0A0`/
+MAXD````/MT<0@+PHF`0``/]T>V:#?Q!_=R`/MI0HF`0``(N-6`4``(T$TL'@
+M`BG0BT3!*(I0!.M7D&:!?Q"!`'<H#[='$`^VA"B8!```BXV0!0``C01`C03`
+MB<+!X@4IPHM$D0B*4`3K)@^W1Q`/MH0HF`0``(N5=`4``(T$0(T$@(M$PE2*
+M4`3K!8UV`++_L?]F@7\0A0!W"P^W1Q"*C"B8!```#[;"#[:<*!X%``"-!%O!
+MX`,IV(V<A2@!```/ML&-!$"-!("+E70%``"--,*`?R@"=7L/MD<L)?````"#
+M^"!T!8/X$'5H#[97+(G0@^`/@_@!=2*#[`QJ`8G0)?````!0:@)J`%;H_/__
+M_X/$(.D^!@``C78`#[9&*XM$ACR)1"08#[9'+"7P````@_@@#Y3`@\`(BU0D
+M&(B"L@```(M",&:!8#+__ND%!@``B?:`?Q0`=$**7Q2#?U``=!&#[`B-1U!0
+M5>C\____@\00D(/L"%=5Z/S___^#Q!"`^P(/A<T%``"#[`A65>C\____@\00
+MZ;L%```/MD8F@_@9#X=_!0``_R2%V`X```^V1C3!X`@#A00*``"+@$P(``"C
+M`````(/X!7<%B$8?ZP3&1A\%@'L+`'0-QD8F`,9#"P#I/P4``,9&)@+I-@4`
+M``^V1C3!X`@#A00*``"+@$P(``"C`````&8/ML!FB48@#[9&-,'@"`.%!`H`
+M`(N`1`@``*,`````B<+!Z`AFB48B#[;"P>`(9@E&(&:!?B)`074)QD8F&>G:
+M!```QD8F`^G1!```#[9&-,'@"`.%!`H``(N`1`@``*,`````B$8=#[9&-,'@
+M"`.%!`H``(N`3`@``*,`````J`AT!L9&'@SK'*@$=`;&1AX+ZQ+1Z(/@`8/X
+M`1G`]]"#X`J(1A[&1B8$Z6\$```/MD8TP>`(`X4$"@``BX!,"```HP````"#
+MR`B(1BS&1B8%Z4@$``#&1B8&Z3\$```/MD8TP>`(`X4$"@``BX!,"```HP``
+M``"`?BL!&<"#X`*#P!2(1B;I$P0``(I&*T"(1BLZ1A]S"<9&)A;I_@,``,9&
+M*P#&1B87@^P,:""A!P#H_/___X/$$.GA`P``QD8F%.G8`P``QD8F".G/`P``
+MQD8F%.G&`P``QD8N`NC\____B49PQD8F%>FQ`P``#[9&-,'@"`.%!`H``(N`
+M3`@``*,`````#[;`B40D%`^V1C3!X`@#A00*``"+@$0(``"C``````^VP,'@
+M"`E$)!3H_/___XE&=(M$)!2#X`^#^`-U#X!^+@!T"<9&)@KI30,``(M&="M&
+M<"U`#0,`>`:`?BX`=!;&1B85@'XN``^$+`,``/Y.+NDD`P``#[9&*X-\ACP`
+M#X3O````QD0D$P"`>PH`=D:-2SB)3"0,@^P,_W0D&.C\____B40D*`^V1BN#
+MQ!"+5"08.52&/'0>BTPD#(M!!(E1!(D*B4($B1#^1"03BD0D$SA#"G?!_DL*
+MBU0D&(-Z'`!T=8M"',=`8`````#V0B0$=2G^A5<,``"#[`Q5Z/S___^#Q`QJ
+M`8M,)""+01P/MD`!4%7H_/___X/$$(/L!(M$)!S_<!S_M20%``!J`>C\____
+M@\0,BU0D'/]R'/^U)`4``&H&Z/S___^+3"0HQT$<`````(/$$`^V1BO'1(8\
+M`````(/L"/]T)"!5Z/S___^#Q!#&1B8)Z1T"```/MD8TP>`(`X4$"@``BX!,
+M"```HP`````/MM`/MD8TP>`(`X4$"@``BX!$"```HP````#!X`@)PHE6.(!^
+M)@IT"/?"```!`'0.QD8F"^G+`0``_DL*ZW+&1B8,#[9&*X-\ACP`=%/&1"0+
+M`(!["@!V6(U#.(E$)`2#[`S_="00Z/S___^)1"0H#[9&*X/$$(M4)!@Y5(8\
+M=+F+3"0$BT$$B5$$B0J)0@2)$/Y$)`N*1"0+.$,*=\'K$(/L#%7H_/___XE$
+M)"B#Q!"#?"08``^$>`$```^V1BN+5"08B52&/(I&+XB"L@```.DO`0``QP0D
+M/T(/`(M#&/9`*@AU*H/L#%7H_/___\<$)`$```#H_/___X/$$/\,)(,\)/]T
+M"8M#&/9`*@ATUL9&)@GI[`````^V1C3!X`@#A00*``"+@$P(``"C``````^V
+MP(E$)!0/MD8TP>`(`X4$"@``BX!$"```HP`````/ML#!X`@)1"04BT0D%"7_
+M#P``/1,!``!T!STC`0``=3#&1B88BT0D%"7_#P``/1,!``!U!L9&+PCK>HM$
+M)!0E_P\``#TC`0``=6K&1B\)ZV0/ME8J#[9&'T@YPGT,_D8J_D8KQD8F!^M+
+MQD8F`&:+1C*#X/>#R`)FB48R@W]0`'00@^P(C4=04%7H_/___X/$$(/L"%=5
+MZ/S____&0P7_@\0(4U7H_/___X/$$.LUQD8F`XGV@W]0`'02@^P(C4=04%7H
+M_/___X/$$(GV@^P(5U7H_/___X/$"%95Z/S___^#Q!"#Q!Q;7E]=PY!55U93
+M@^P<BWPD,(ML)#3'1"08`````,9$)!,`9H%]$(4`#X>(````#[=%$("\.)@$
+M``#_='IF@WT0?W<?#[:4.)@$``"+CU@%``"-!-+!X`(IT(M$P2B*2`3K5F:!
+M?1"!`'<H#[=%$`^VA#B8!```BX^0!0``C01`C03`B<+!X@4IPHM$D0B*2`3K
+M)@^W11`/MH0XF`0``(N7=`4``(T$0(T$@(M$PE2*2`3K!8UV`+'_L_]F@7T0
+MA0!W"P^W11"*G#B8!```#[;#C01`C02`BY=T!0``C03"B40D%`^VT0^VM#H>
+M!0``C01VP>`#*?"-M(<H`0``@/G_=!B`O#H>!0``_W0.@/O_=`F`?10&=2^-
+M=@"#?5``=!*#[`B-15!05^C\____@\00B?:#[`A55^C\____@\00Z18&``")
+M]H!]%`!T$H/L"%97Z/S___^#Q!#I_`4``(M4)!0/MD(F@^@-@_@$#X>T!0``
+M_R2%0`\``(M,)!0/MD$TP>`(`X<$"@``BX!,"```HP`````/MM`/MD$TP>`(
+M`X<$"@``BX!$"```HP````#!X`@)PL9$)!(`QD0D$0"S`(!Y'P!V-8UV``^V
+MR[@!````T^"%PG0:_D0D$XM$)!2#?(@\`'0&_D0D$>L%_D0D$I!#BTPD%#A9
+M'W?.@'PD$@!T"(M$)!2`2"T!@'PD$0!T"(M,)!2`22T"@'PD$P$/A6$!``"S
+M`(M$)!2`>!\`=E(/MLNX`0```-/@A<)T(X/L!%%75NC\____B40D*(/$$(7`
+M=!F)<"B+5"04B5`PZPV00XM,)!0X61]WQ>L5BT0D%(A8*SA8'W8)QD`F#NFC
+M!```BU0D%#A:'P^%E@0``(/L!&H!#[9&"5!7Z/S____&1"0;`(/$$(!^"@`/
+MAI<```"-7CB#[`Q3Z/S___^)1"0H@\00BT,$BTPD&(E+!(D9B4$$B0B#>1P`
+M=!Z#[`3_<1S_MR0%``!J!>C\____BT0D*(!()`*#Q!"#[`3_="0<:@96Z/S_
+M__^#Q!"+5"08@'I+`'0B@^P,5^C\____QP0D`0```.C\____@\00BTPD&(!Y
+M2P!UWOY$)`N*1"0+.$8*#X=L____@WU0`'00@^P(C4504%?H_/___X/$$(/L
+M"%57Z/S___^+5"0DQD(M`,9&!0")-"3H_/___X/$$.G5`P``D(M,)!1F@4DR
+M@`"S`(!Y'P!V4P^VR[@!````T^"%PG0D@^P$45=6Z/S___^)1"0H@\00A<!T
+M&HEP*(M4)!2)4##K#HGV0XM,)!0X61]WQ.L5BT0D%(A8*SA8'W8)QD`F#^D[
+M`P``BU0D%#A:'P^%+@,``(/L!&H!#[9&"5!7Z/S____&1"0:`(/$$(!^"@`/
+MAI<```"-7CB#[`Q3Z/S___^)1"0H@\00BT,$BTPD&(E+!(D9B4$$B0B#>1P`
+M=!Z#[`3_<1S_MR0%``!J!>C\____BT0D*(!()`*#Q!"#[`3_="0<:@96Z/S_
+M__^#Q!"+5"08@'I+`'0B@^P,5^C\____QP0D`0```.C\____@\00BTPD&(!Y
+M2P!UWOY$)`J*1"0*.$8*#X=L____@WU0`'00@^P(C4504%?H_/___X/$$(/L
+M"%57Z/S___^+5"0DQD(M`,9&!0")-"3H_/___X/$$.EM`@``D(M,)!0/MD$T
+MP>`(`X<$"@``BX!,"```HP`````/MM`/MD$TP>`(`X<$"@``BX!$"```HP``
+M``#!X`@)PO?"```$`'0&]D$M`742]\+___O_=!>+1"04]D`M`G0-BU0D%,9"
+M)@_ISP$``(M,)!3&02T`Z?8!``"[/T(/`(M&&/9`*@AU)X/L#%?H_/___\<$
+M)`$```#H_/___X/$$$N#^_]T"8M&&/9`*@ATV8M$)!3&0"80Z8`!``"+5"04
+M#[9"-,'@"`.'!`H``(N`3`@``*,`````#[;`B40D#`^V0C3!X`@#AP0*``"+
+M@$0(``"C``````^VP,'@"`E$)`R+1"0,@^`/@_@##X77````]D(M`70+QD(F
+M$NL-_DX*ZW.+3"04QD$F$HM4)!0/MD(K@WR"/`!T3,9$)`D`@'X*`'91C5XX
+M@^P,4^C\____B40D*(M,)"0/MD$K@\00BU0D&#E4@3QTM(M#!(E3!(D:B4($
+MB1#^1"0)BDPD"3A."G?$ZQ"#[`Q7Z/S___^)1"0H@\00@WPD&``/A-````"+
+M5"04#[9"*XM,)!B)3((\BT0D#"7_#P``/1,!``!U"<:!L@````CK<XM$)`PE
+M_P\``#TC`0``=6.+1"08QH"R````">M6B?:+5"04QD(F$^M*BTPD%`^V033!
+MX`@#AP0*``"+@$P(``"C``````^V033!X`@#AP0*``"+@$0(``"C``````^V
+M02V#X`&#^`$9P/?0@\`3B$$FB?:#?5``=!*#[`B-15!05^C\____@\00B?:#
+M[`A55^C\____@\0(_W0D'%?H_/___X/$$(GV@\0<6UY?7<.+1"0$BT@$@>D`
+M`@$`#[94)`R#X@?!X@B`SB`/MD0D",'@"`'(B9`<Q0``9HN`',4``&:C````
+M``^VP,.+1"0$BT@$@>D``@$`#[94)`R#X@?!X@B*5"00@,X0#[9$)`C!X`@!
+MR(F0',4``,-55U93@^P,QD0D"P#&1"0*`+W_____QD0D`P"^P.'D``^V3"0#
+M0;L!````T^.Q`)`/ML%`B<(/K].)\(G7N@````#W]XE$)`2Z_____XM\)"`Y
+M^'<$B?HIPCGJ<PZ)U8I$)`.(1"0+B$PD"D&`^0]VO_Y$)`.`?"0#!W:D#[9$
+M)`K!X`,*1"0+#[;`@\0,6UY?7<.05U93BUPD$(V[Q`H``&H`:@</MG0D'%93
+MZ!____\/MD<!4&H#5E/H$?___X/$(%M>7\.)]E93@^P$BW0D$(I$)!2(1"0#
+MNP````")]FH"#[9$)`=05NBF_O__@\0,J`AT![@`````ZQN#[`QJ`>C\____
+M@\000X'[#R<``';.N/\```"#Q`1;7L.-=@!3BEPD#&H##[9$)!10_W0D$.A>
+M_O__@\0,.-@/E,`/ML!;PY!64X/L!(MT)!"*1"04B$0D`XI$)!B(1"0"#[;`
+M4&H!#[9<)`M35NAA_O__:D!J`E-6Z%;^__^#Q!A35NA$____@\00NO\```"%
+MP'5I@WPD'`!T0?9$)`(!=!X/MD0D`U!J0%;H=/___X/$#+K_````A<!T0>LZ
+MB?8/MD0D`U!J&%;H5O___X/$#+K_````A<!T(^L<#[9$)`-0:BA6Z#K___^#
+MQ`RZ_P```(7`=`>)]KH`````B="#Q`1;7L.-=@!75E.+?"00BEPD%`^V="08
+M@^P(#[;#4%?HI_[__X/$$+K_____A<!U-@^VPU")\@^VPE!7Z./^__^#Q`RZ
+M_____X7`=!IJ`0^VPU!7Z#_]__^+5"0HB`*Z`````(/$#(G06UY?PXUV`%57
+M5E.#[`R+?"0@BD0D)(A$)`L/MG0D*+T`````B?*$T@^$S0```&ID:@(/MMA3
+M5^@O_?__@\0(4U?H'?[__X/$$(7`=0YJ`U-7Z-G\__^#Q`R)]FH!B?(/ML)0
+M#[9$)!-05^AP_O__@\00NO____^$P`^%5`$``+L`````.UPD,`^-0P$```^V
+M="0+BT0D,$@YV'4K:D!J`E97Z,3\__^+1"0\`=A0:EA65^CH_O__@\0@A<`/
+MA0\!``#K*8UV`&I$:@)65^B9_/__BT0D/`'84&I05E?HO?[__X/$((7`#X7D
+M````14,[7"0P?)[IUP```)!HH(8!`.B6_/__#[;`B00D:@,/MEPD$U-7Z%+\
+M__^#Q`A35^A`_?__@\00A<!T(0^VA\4*``!0:@-35^@P_/__NO____^#Q!#I
+MBP```(UV``^V7"0+4VI@5^AB_?__@\0,A<!U&P^VA\4*``!0:@-35^CZ^___
+MNO____^#Q!#K6+L`````.UPD,'TR#[9T)`MJ1&H"5E?HU?O__XM$)#P!V%!H
+M@````%97Z/;]__^#Q""%P'4(14,[7"0P?-,/MH?%"@``4&H##[9$)!-05^B=
+M^___@\00B>J)T(/$#%M>7UW#B?964X/L$(M<)!S_="0H_W0D*`^V1"0H4&H`
+M4^@)_O__B<:#Q"!J5&H":@!3Z%S[__^)\(/$%%M>PU93@^P0BUPD'/]T)"C_
+M="0H#[9$)"A0:@%3Z-']__^)QH/$(&I4:@)J`5/H)/O__XGP@\046U[#55=6
+M4X/L#(M\)""+;"0PBD0D)(A$)`L/MG0D*&ID:@(/MMA35^CR^O__@\0(4U?H
+MX/O__X/$$(7`=0UJ`U-7Z)SZ__^#Q`R0:@&)\@^VPE`/MD0D$U!7Z#3\__^#
+MQ!"Z_____X3`=3_K"KK_____ZS:-=@"[`````#GK?24/MG0D"XGV:@"+5"0P
+M#[8$&E!65^CZ^___@\00A,!US4,YZWSBN@````")T(/$#%M>7UW#C78`5E.#
+M[!"+7"0<_W0D*/]T)"@/MD0D*%!J`%/H+?___XG&@\0@:E1J`FH`4^@X^O__
+MB?"#Q!1;7L-64X/L$(M<)!S_="0H_W0D*`^V1"0H4&H!4^CU_O__B<:#Q"!J
+M5&H":@%3Z`#Z__^)\(/$%%M>PU575E.#[!R+;"0PBT0D-(M0&$*)5"08BDH"
+MB$PD%\9$)!4`QT0D$`````"^`````(N=)`4``+&`#[9\)!>-=@`/ML%F#[:4
+M&)@$``!F@?K_`'1-B?!&.?AU1H#Y@7<?#[?"C01`C03`B<+!X@4IPHN#D`4`
+M`(T4D(E4)!#K(HM$)#3'0"S_____@^P,4/]0*+@`````@\00Z:L!``"-=@!!
+M@/F%=IJ+G20%``"!PV`,``"Q@`^V?"07C78`#[;!9@^VE!B8!```9H'Z_P!T
+M38GP1CGX=4:`^8%W'P^WPHT$0(T$P(G"P>(%*<*+@Y`%``"-%)")5"00ZR*+
+M5"0TQT(L_____X/L#%+_4BBX`````(/$$.DO`0``C78`08#YA7::BTPD&(I1
+M!`^V:07!Y1`/MD$&P>`("<4/MD$'"<4/MGD(P><0#[9!"<'@"`G'#[9!"@G'
+M@WPD$``/A,$```#&1"06`(M$)!"`>#``#X:N````B<:#QB@/MM*)5"0,D(/L
+M#%;H_/___XU8^(/$$(M6!(E&!(DPB5`$B0*`>R$-=`:`>R$B=62+5"08#[9"
+M`X/X.W0B@_@\=5+&1"05`8/L#/]T)$!55_]T)"13Z/S___^#Q"#K-8M$)!B#
+MP`N#[`154/^SY````.C\____@\0$_W0D0%57_W0D)%/H_/___\9$)#4!@\0@
+MC78`_D0D%HI,)!:+1"00.$@P#X=?____N`$```"`?"05`'4;BU0D-,="+/__
+M__^#[`Q2_U(HN`````"#Q!"0@\0<6UY?7<-55U93@^P<BT0D-(MX&$>+4!!*
+MB50D&,=$)!0`````BT@<B4PD$(!_`0%U#,=`+`````#I0@(``(!_`0)U6H!_
+M`@%U1(M$)#"#N"@%````=`J+D"@%``")5"0PBTPD,(N!)`4``(I7`XB05@P`
+M`(I7`XB0MA@``(M$)#3'0"P`````Z?,!``"0BU0D-,="+/[____IX@$``(!_
+M`01U(HI'`X/H.SP!=QB#[`C_="0\_W0D/.CX_/__@\00Z=X!``"`?P$#=7J`
+M?P(!=6(/ME<#BTPD,`^V02:-#`")T)GW^3G1?CJ#[`0/MD<$4`^VVE/_="0\
+MZ/S___^#Q`P/MD<$4%/_="0\Z/S___^+5"1$QT(L`````(/$$.E<`0``BTPD
+M-,=!+/[____I3`$``(M$)#3'0"S^____Z3P!``")]HM4)#"#NB@%````=`J+
+MBB@%``")3"0PB?N`?P$`#X2H````D`^V,T.*`T.(P0^VT/;"`70_BVPD%`'U
+MBT0D-#MH%`^'U````(/L#%:+1"0@`T0D)%!2:@#_="1,Z*/X__^#Q"`Y\`^%
+ML````(EL)!3K3XGVC2PSB>@I^(/``CM$)!@/CY0```"#[`Q64P^VP5!J`/]T
+M)$SHL/K__X/$((7`=7F)ZX!]``!U!H!]`0!T&H/L#&@0)P``Z/S___^#Q!"`
+M>P$`#X59____#[8SA?9T5FI4:@)J`/]T)#SHA_7__X/$$(M4)#2+0A0K1"04
+M.<9V`HG&@^P,5HM$)"`#1"0D4&H`:@#_="1,Z/7W__^#Q""%P'@&`40D%.L,
+MBTPD-,=!+/____^0:E1J`FH`_W0D/.@Q]?__@\00BT0D-(-X(`!T"8M`((M,
+M)!2)"(/L#/]T)$"+1"1$_U`H@\00@\0<6UY?7<.)]H/L#(M$)!"#N"@%````
+M=`:+@"@%``"`N%8,````=1G&!2,!```!:B!H(`$``&H.4.C\____@\00@\0,
+MPX/L#(M$)!"#N"@%````=`:+@"@%``#&!2,!````:B!H(`$``&H.4.C\____
+M@\0<PU=64XM\)!"#[`0/MG0D'%8/MEPD'%/_MR0%``#H_/___X/$#%935^C\
+M____@\006UY?PY"+5"0$BTPD"(M"!&;'@&S^___LF(M"!&:)B&C^___#D%.#
+M[`B+7"00BD0D%(I,)!C&!"0%B>+&1"0!#\9$)`("QD0D`P/&1"0$!L9$)`4'
+MQD0D!@O&1"0'##P'=T&$R707#[;`#[8,`KC^____T\!F(8-4#```ZQ4/ML`/
+MM@P$N`$```#3X&8)@U0,```/MX-4#```4%/H_/___X/$"(/$"%O#D%=64XMT
+M)!"#OB@%````=`:+MB@%``"_`````&H`:@>)^`^VV%-6Z)'S__]J1&H"4U;H
+MAO/__X/$(&C0````:@!35NAU\___:@!J!%-6Z&KS__^#Q"!'@_\!=L!HH(8!
+M`.B'\___B(;%"@``#[;`4&H#:@!6Z$/S__^#Q!1;7E_#BT0D!(M0!('J``(!
+M`(M$)`B+!`*C`````,.)]HM$)`2+2`2!Z0`"`0"+5"0,BT0D"(D4`<.-=@!3
+MBUPD"(M3!('J``(!`,>"@``!``````"+@@0!`0"C`````(#,`8F"!`$!`&H$
+M:`S"``!3Z/S___]HN`L``&@(P@``4^C\____:`$`#`!H`,(``%/H_/___X/$
+M)&H$:`S#``!3Z/S___]HN`L``&@(PP``4^C\____:`$`#`!H`,,``%/H_/__
+M_X/$)&H`:%#"``!3Z/S___]J`&A0PP``4^C\____BT,$9L>`3/[__P``BT,$
+M9L>`;/[__^R8BT,$9L>`:/[__^R89L>#5`P``/__@\086\-64X/L!(M4)!`Y
+MDB0%```/E40D`XI$)!2#X`,/ML"-'$"X!P```(C9T^#WT(G&(W(\B7(\@'PD
+M&`!T#+@$````T^`)\(E"//]R/`^V1"0'P>`(!5#"``!0_[(D!0``Z/S___^#
+MQ!!;7L.-=@!55U93@^P,BWPD((MT)"2-GR`+``"+CY`%``"-J>P&#0!F@7X0
+MA0!W'`^W1A`/MH0XF`0``(T$0(T$P(G"P>(%*<*-+)&+5C2`>@$"=1J+0@2)
+M`XM""(E#!(M"#(E#"(M"$(E##(UV`(-^4`!T$H/L"/]V4%?H_/___X/$$(UV
+M`(/L"%97Z/S____&130`@\0<6UY?7<.)]E575E.#[!B+?"0LBVPD,(M$)#2)
+M1"04BTPD.(E,)!"+1PB+,%;H_/___XG#@\00A<!T?X/L#%;H_/___XG!@\00
+MA<!T;<9'-`&-0SS&0R3AQD,E`<9#)A#&0Q6[9@^V5S-FB5,0B7,8QT,@D```
+M`(U1"(E3-(E+4,9"`0+&00A`B>F(2@**3"0(B$H#BDPD!(A*!,=#;`````"#
+M[`AJ`%#H_/___X/$"%-6Z/S___^#Q!"#Q`Q;7E]=PXGV55=64X/L&(M<)"R*
+M1"0PB$0D%XI,)#2(3"06BD0D.(A$)!6+0PB+*%7H_/___XE$)!"#Q!"%P`^$
+M-0$``(/L#%7H_/___XG"@\00A<`/A!\!``#&0S0!BPPD@\$\B4PD!(LT),9&
+M).'&1B4!QD8F$,9&%;MF#[9#,V:)1A");AC'1B"0````C4((B48TB590B<.Y
+M`````+J0````B`A`2G7ZQD,!@L8#0(I$)`N(0P**3"0*B$L#BD0D"8A#!#P"
+M=SP/MD0D"8U["(V5(`L``/R-'(4`````B=G!Z0*)UO.EB?*)V(/@`H7`=`1F
+MI8GRB=B#X`&%P'11B=:DZTR+A2`+``")0PB+A20+``")0PP/MD0D"8U[$(V5
+M*`L``/R-'(7X____B=G!Z0*)UO.EB?*)V(/@`H7`=`1FI8GRB=B#X`&%P'0#
+MB=:DBP0DQT!L`````(/L"&H`_W0D$.C\____@\0(_W0D"%7H_/___X/$$(/$
+M#%M>7UW#B?975E.#[!"+="0@BD0D)(I4)"B(5"0/B,+`Z@*(5"0.@^`#B<>+
+M1@B+&&H":@!J`%;H_/___X/$$(!^-`!T((GV@^P,4^C\____QP0D`0```.C\
+M____@\00@'XT`'7BBT8(BQ"!PB`+``"*0@*$P'@\@\B`B$(":@%J`&H`5NC\
+M____@\00@'XT`'0AD(/L#%/H_/___\<$)`$```#H_/___X/$$(!^-`!UXHGV
+M:@$/MD0D$E!J`U;H_/___X/$$(!^-`!T(8UV`(/L#%/H_/___\<$)`$```#H
+M_/___X/$$(!^-`!UXHM&"(L8@<,@"P``B?H/ML*Y`P```"G!@'PD#P`/E<(/
+MMM+!X@.+!`N#X.<)T(D$"VH!#[9$)!)0:@-6Z/S___^#Q"!;7E_#D)"055=6
+M4XM4)!2+?"08BVPD'(M<)""+BE@%``"-L>@6`0!F@7\0A0!W%P^W1Q`/MI00
+MF`0``(T$TL'@`BG0C33!C8T@!```QH4@!```)V:!?R3A`74DBD<F2#P!=PB*
+M5R?K(HUV`&:!?R3A`74,BD<F@^@1L@\\`78+L@"#?C``=`.*5DF#X@^*00&#
+MX/`)T(A!`;(`9H%_).$!=0F*1R9(/`%V`Y"R`<'B!XI!`8/@?PG0B$$!BD,&
+MB$$"B@.(00.*0P6(00>*0P>(00^*0P*(002*0P.(006*0P2(00:*0P&(00R*
+M0PJ(00B*0PN(00F*0PR(00J*0PB(00N*0PF(00U;7E]=PXGV5E.#[`2+3"00
+MBUPD%(M1*(LR#[9#)(/X+W1E@_@O?RB#^!L/A.L```"#^!M_"H/X$G1-Z?``
+M``"#^"AT0X/X*G0^Z>$```"0/8H```!T,3V*````?Q:#^#4/A+4````]B```
+M`'0:Z;T```"0/8\```!T#3WA````=&7IJ0```)#V030!=`>!2V0```0`]D$V
+M$`^$G0```(![)"AT%X![)"IT$8![)(AT"X![)(H/A8$```"0]D((`746@^P(
+M#[9"!%!6Z/S___^#Q!"$P'1ED(![%(%T7H%+9````0#K5;@`````@'LE`75/
+M#[9#)H/X''<9_R2%5`\``(-+9`CK-(-+9`'K+H-+9"#K*+@`````ZR:0]D$T
+M`70'@4MD```$`(-+9`'K#9"X`````/9#9B!T!I"X`0```(/$!%M>PY`/MD0D
+M!,.)]@^V1"0%PXGV4XM4)`B+7"00QD(4`HM*.(M$)`R(00*+0CC&0`<`BT(X
+MB%@,6\.)]HM4)`2+3"0(BD(IB$$"BD(HB$$#BD(GB$$$BD(FB$$*PXUV`(M4
+M)`2+3"0(BD(MB$$"BD(LB$$#BD(KB$$$BD(JB$$*BD(IB$$+BD(HB$$,PXUV
+M`(M,)`RZ`````#G*?1*-=@")R"G0@_@!?@%"0CG*?/'#5U93@^P$BUPD%(MT
+M)!P/MGPD&`^V0R2#^"IT)(/X*G\+@_@H=!KIV0```)`]B````'0I/8H```!T
+M(NG%````D(I#+(A$)`.*0RN(1"0"5E/H_/___X/$".L:B?:*0S&(1"0#BD,P
+MB$0D`E93Z/S___^#Q`C&1@5`]D-F`70RBD0D`X@&BD0D`HA&"(T$_0````"(
+M1@&`>R0H=`:`>R2(=0?&1@9@ZUV0QD8&8>M6B?;V0V8$=":*1"0#B$8!BD0D
+M`HA&"8![)"AT!H![)(AU!L9&!B7K+L9&!C7K*(I$)`.(1@&*0R:#X`\(1@6`
+M>R0H=`:`>R2(=0;&1@;(ZP;&1@;*B?:#Q`1;7E_#D%575E.#["R+;"1$BW4T
+MB>?\N0@```"X`````/.K]H:G````!'06BX[(````BY[,````@\'_@]/_ZPV)
+M]HM&>$B)P;L`````@'TD)757OP@```")R`^LV!B(!"2)R`^LV!"(1"0!B<@/
+MK-@(B$0D`HA,)`/VAM4````0=0_&1"0&`L9$)`<`Z8T```!J!(V&Z@```%"-
+M1"0,4.C\____@\0,ZW60OR````")V,'H&(@$)(G8P>@0B$0D`8G8P>@(B$0D
+M`HA<)`.)R`^LV!B(1"0$B<@/K-@0B$0D!8G(#ZS8"(A$)`:(3"0']H;5````
+M$'4.QD0D"@+&1"0+`.L:B?9J!(V&Z@```%"-1"004.C\____@\0,B?:)X(/L
+M!%=0_W4TZ/S___^#Q#Q;7E]=PY"+3"0$BD$F"D$G"D$H"D$I#[;`#[91+(/B
+M`0G0=`YJ)&H%4>C\____@\0,PXM$)`C&0`;LQT%L`````,-64X/L!(M<)!"+
+M="04#[9#)(/X+W0*/8\```!T'^MID(I#+(A$)`.*0RN(1"0"5E/H_/___X/$
+M".L:B?:*0S&(1"0#BD,PB$0D`E93Z/S___^#Q`C&1@5`]D-F!'06BD0D`XA&
+M`8I$)`*(1@G&1@9"ZQ:)]HI$)`.(1@&*0R:#X`\(1@7&1@9`@\0$6U[#B?:+
+M3"0(BU0D#,9"!4`/MD$D@_@U=`L]D0```'0@ZR:)]HM$)`0/MT`T@^`!@_@!
+M&<"#X/V#Z!:(0@;K&9#&0@;JZQ*)]FHD:@51Z/S___^#Q`S#B?;V024"=`3&
+M010`PY"+1"0$]D`H\'0.:B1J!5#H_/___X/$#)##C78`55=64XML)!2+="08
+MBUPD(`^V?"0<N`````"Y#0```(G:C78`B`)"277Z#[96)(/Z-0^$B@```(/Z
+M-7\G@_HH=%R#^BA_#H/Z&P^$@@```.ET`@``@_HJ=$2#^B]T5.EE`@``@?J/
+M````=$>!^H\```!_%8'ZB````'0B@?J*````=!KI0`(``('ZD0```'0Q@?KA
+M````=&'I*P(``%.)^@^VPE!6Z/S___^#Q`SI'0(``%-6Z/S___^#Q`CI#@(`
+M`%-65>C\____@\0,Z?X!``#V1B@!=!G&0P9PQD,$`,9#`P#&0P(`QD,%0.G?
+M`0``QD,&X.G6`0``N`````"`?B4!#X7,`0``#[9&)H/X'`^'JP$``/\DA<@/
+M``#&0P<$Z:H!``#&0P<`Z:$!``#&0P;LZ9@!``#&0P;OQ@,#BD8G@\A`B$,!
+MZ8,!``#&0P;OQ@,'Z7<!``#&0P9`QD,!`<9#!4#I9@$``,9#!N_&`P.*1B>#
+MR`B(0P'I40$``,9#!N_&`P+I10$``,9#!N_&`X+I.0$``,9#!N_&`P;I+0$`
+M`,9#!N_&`X;I(0$``,9#!N.*1B>(0P'I$@$``,9#!K#&`]C&0P-/QD,$PNG^
+M````QD,&L,8#V<9#`T_&0P3"Z>H```#&0P:PQ@/:QD,#3\9#!,+IU@````^W
+M132#X`&#^`$9P(/@_8/H%HA#!NF\````QD,&[\8#JNFP````QD,&[\8#5>FD
+M````QD,&+\9#`0'&0P(0Z9,```#&0P;DBD8HB`.*1B>(0P7I?P```(I&)XA#
+M!HI&*(@#BD8IB$,"BD8JB$,#BD8KB$,$BD8MB$,*BD8LB$,!ZU3&0P;HBD8H
+MB`.*1B>(0P6*1BF(0P**1BJ(0P.*1BN(0P2*1BR(0P'K*_9&*`%T)<9#!G#&
+M0P0`QD,#`,9#`@#&0P5`ZP^X`````.L-D+@`````ZP6X`0```%M>7UW#D)"0
+M5U93BWPD%(M$)!"+<`2![@`"`0"[`````#G[<RV-=@"+A@#(``"C`````*@!
+M=0FX`````.L9B?:#[`QJ"NC\____@\000SG[<M:X_____UM>7\.04XM<)!R+
+M1"0(BT@$@>D``@$`#[94)!#!X@@/MD0D&,'@!`G"@'PD%`!T`X/*!(/[_W00
+MB=@E__\#`(F!!,@``(/*`HM$)`R)$%O#D(M$)`2+4`2!Z@`"`0"+1"0(@\@!
+MB8(`R```PY!64X/L!(M<)!"+<P2![@`"`0!J_VH!:@&+@UP,```/MD`"4(U$
+M)!!04^AJ_____W0D&%/HK/___X/$&&@0)P``4^C^_O__@\00NO____^%P'4;
+MBX8,R```HP````")!"2)PHM$)!2($+H`````B="#Q`1;7L.-=@!55U93@^P,
+MBVPD((M\)"P/MG0D)(I$)"B(1"0*NP`````Y^W,]C78`@^P(C40D$U!5Z%+_
+M__^#Q!"%P'43B?`B1"0+.D0D"G4'N`````#K%X/L#&H*Z/S___^#Q!!#.?MR
+MQKC_____@\0,6UY?7<.04X/L"(M<)!!J_VH`:@"+@UP,```/M@!0C40D%%!3
+MZ(W^____="0<4^C/_O__@\08:!`G``!3Z"'^__^#Q!"Z_____X7`=1EHX),$
+M`&H":@-3Z#K___^#Q!"#^`$9TO?2B="#Q`A;PY!3@^P(BUPD$/]T)!1J`6H!
+MBX-<#```#[9`"U"-1"044%/H(O[___]T)!Q3Z&3^__^#Q!AH$"<``%/HMOW_
+M_X/$$+K_____A<!U&HM#!(N0#,;__XD5`````(M$)!B($+H`````B="#Q`A;
+MPY!64X/L&(M<)"2+="0HQD0D%_^-1"074%93Z/S___^#Q!"Z_____X7`=7JZ
+M`````(!\)!,`=&Z#[`Q3Z.W^__^#Q!"Z_____X/X_W185FH`:@"+@UP,```/
+MMD`*4(U$)!Q04^AU_?___W0D)%/HM_W__X/$&&@0)P``4^@)_?__@\00NO__
+M__^%P'49:."3!`!J`&H#4^@B_O__@\00@_@!&=+WTHG0@\046U[#4X/L%(M<
+M)!Q3Z'+^__^#Q!"Z_____X/X_W1;_W0D%&H`:@"+@UP,```/MD`&4(U$)!10
+M4^CW_/___W0D'%/H.?W__X/$&&@0)P``4^B+_/__@\00NO____^%P'49:."3
+M!`!J`&H#4^BD_?__@\00@_@!&=+WTHG0@\0(6\.-=@!64X/L$(MT)!R+7@2!
+MZP`"`0!6Z.C]__^+1"0HB8,(R```_W0D)&H$:@"+AEP,```/MD`%4(U$)"!0
+M5NAP_/__@\0H_S0D5NBP_/__:!`G``!6Z`7\__^#Q!"Z_____X7`=1EHB!,`
+M`&H`:@%6Z![]__^#Q!"#^`$9TO?2B="#Q`1;7L-55U93@^P,BVPD)(M\)"B+
+M="0LNP`````Y\W,C@^P$_S0?C40=`%#_="0LZ$S___^#Q!"#^/]T#(/#!#GS
+M<MVX`````(/$#%M>7UW#5E.#[`2+7"00BD0D'(MS!('N``(!`#P$=@*P!/]T
+M)!0/ML!0:@&+@UP,```/MD`$4(U$)!!04^BD^____W0D&%/HYOO__X/$&&@0
+M)P``4^@X^___@\00NO____^%P'4;BX8,R```HP````")!"2)PHM$)!B)$+H`
+M````B="#Q`1;7L.055=64X/L#(ML)"2+="0HBT0D+`'HB40D!(GK@^/\B>^#
+MYP-T1VH$C40D#%!3_W0D+.A&____C4,$@\00N00````[1"0$=@B+3"0$*>D!
+M^8GZ.<]S$HU\)`B-=@"*!!>(!D9".<IR]8/#!(GVBWPD!(/G_#G[<R6-;"0(
+MD&H$55/_="0LZ//^__^+1"08B0:#Q@2#Q!"#PP0Y^W+@.UPD!',V:@2-1"0,
+M4%/_="0LZ,G^__^+3"04*=FZ`````(/$$#G*<Q.-7"0(C78`B@03B`9&0CG*
+M<O60N`````"#Q`Q;7E]=PXUV`%93@^P$BUPD$,<$)`````"+<P2![@`"`0#&
+M@U@,````:@!J`FH!#[8%"````%"-1"004%/H._K___]T)!A3Z'WZ__^#Q!AH
+M$"<``%/HS_G__X/$$(7`=3R+A@S(``"C`````(D$)#V_0P``=2?'@T@,``"_
+M0P``QX-,#``````@`,>#4`P````0``!FN```ZPB-=@"X_____X/$!%M>PY!6
+M4X/L!(M<)!#'!"0`````BW,$@>X``@$`QH-8#````&H`:@)J`0^V!0@```!0
+MC40D$%!3Z)OY____="084^C=^?__@\08:!`G``!3Z"_Y__^#Q!"%P'4\BX8,
+MR```HP````")!"0]'V,``'4GQX-(#```'V,``,>#3`P`````!`#'@U`,````
+M``$`9K@``.L(C78`N/____^#Q`1;7L.05E.#[`2+7"00QP0D`````(MS!('N
+M``(!`,:#6`P```%J_VH":@$/M@4(````4(U$)!!04^C[^/___W0D&%/H/?G_
+M_X/$&&@0)P``4^B/^/__@\00A<!U:(N&#,@``*,`````B00D/1]#``!T*ST?
+M1```=4S'@T@,```?1```QX-,#``````$`,>#4`P``````0!FN```ZRW'@T@,
+M```?0P``QX-,#``````$`,>#4`P``````0"X`````.L(C78`N/____^#Q`1;
+M7L.05E.#[`2+7"00QP0D`````(MS!('N``(!`,:#6`P```!J`&H":@$/M@4(
+M````4(U$)!!04^@O^/___W0D&%/H<?C__X/$&&@0)P``4^C#]___@\00A<!U
+M<(N&#,@``*,`````B00D/>\1``!T"SWO$@``="SK4HGVQX-(#```[Q$``,>#
+M3`P`````!`#'@U`,``````$`N`````#K,(UV`,>#2`P``.\2``#'@TP,````
+M``0`QX-0#``````!`+@`````ZPB-=@"X_____X/$!%M>PY!3@^P4BUPD'%/H
+MLOW__X/$$(7`=1/'@UP,````````N@````#K:HGV@^P,4^@O_O__@\00A<!U
+M$<>#7`P```````"Z`````.M'@^P,4^C._/__@\00A<!U$<>#7`P```````"Z
+M`````.LF@^P,4^BY_O__@\00NO____^%P'41QX-<#````````+H`````B?:)
+MT(/$"%O#D%=64XM<)!"+?"0<BD0D((MT)!BZ`````(.[7`P````/A-,```"$
+MP'0[@WPD%/]U$&:+@T@,``!FB0;IL0```)!75O]T)!Q3Z%3[__^#Q!"Z````
+M`(7`#X6<````Z8\```"-=@"#?"04_W41@#X/#Y2#60P``+H!````ZWRZ````
+M`("[60P```!T;HM$)!2Z`````/>S4`P``(72=3N`NU@,````=!F#[`C_="0<
+M4^C\____@\00N@````"%P'4Y@^P(_W0D'%/H`/G__X/$$+H`````A<!U(%=6
+M_W0D'%/H[/G__X/$$+H`````A<!U"+H!````C78`B=!;7E_#D)!55U93@^Q,
+MBVPD8,9$)!AMC40D&,9``?_&0`(CQD`#%,9`!#K&0`7OQD`&%L9`!Y*Y````
+M`+H@````C40D((GVB`A`2G7ZQD0D)`'&1"0/`&H@C5PD)%-J#E7H_/___X/$
+M$(7`=5B#[`QH@!H&`.C\____:B!3:@]5Z/S___^#Q""#^"!U.(U4)#"-1"08
+MN0@```#\B=:)Q_.F#Y?"#Y+`.,)U&L9$)`\!#[9$)"[!X`@/ME0D+PG0B84T
+M!0``#[9$)`^#Q$Q;7E]=PY!64XM4)`R[`Q$`)[D`````@WH(`'0NBT((BP"C
+M`````(G&BT((B1B+0@B+`*,`````N0`````YV'4*BT((B3"Y`0```(G(6U[#
+MC78`55=64X/L'(M<)#"+`XN`8`#__Z,`````@^`#@_@!=!B#^`%R!X/X`G1G
+MZV_'@S`%```!````ZV.#[`Q3Z/S___^#Q!"$P'0>H60"``")'(5``@``0*-D
+M`@``QX,P!0```@```.LU4^C\____@\0$A,!T**%H`@``B1R%4`(``$"C:`(`
+M`,>#,`4```0```#K"L>#,`4```,```"A8`(``(D<A0`"``!`HV`"``"`/0T`
+M````#X6-````QD0D$P"%P`^.9P(``(,]0`(```!T+`^V5"03NP`"``"+#4`"
+M```[#)-T%XL$DXF(*`4``(L4DZ%``@``B8*($0``@SU0`@```'0L#[94)!.[
+M``(``(L-4`(``#L,DW07BP23B8@L!0``BQ23H5`"``")@HP1``#^1"03#[9$
+M)!,[!6`"``!\A>GG`0``QD0D$P"A0`(``(E$)!B%P`^$W0```+T`````@SU@
+M`@````^.KP```)")Z0^VT8L$E0`"``"#N"@%````#X6#````BTPD&#G(='N^
+M`````(H-#0```(3)=&R)5"0,BU0D#+@``@``BQR0.$LA<D,/ME,A#[;!B<<#
+M/30+```Y^G,PBU0D&#A*(7(G#[9"(3GX<Q^)DR@%``"+3"0,N@`"``"+!(J+
+M3"08B8B($0``ZQ601HGR#[;"P>`%BH@-````A,EUF9!%B>D/ML$[!6`"```/
+MC%+____^1"03#[9$)!.+!(5``@``B40D&(7`#X4C____QD0D$P"A4`(``(E$
+M)!2%P`^$W@```+T`````@SU@`@````^.L````(GVB>D/MM&+!)4``@``@[@L
+M!0````^%@P```(M,)!0YR'1[O@````"*#0T```"$R71LB50D"(M4)`BX``(`
+M`(L<D#A+(7)##[93(0^VP8G'`STT"P``.?IS,(M4)!0X2B%R)P^V0B$Y^',?
+MB9,L!0``BTPD"+H``@``BP2*BTPD%(F(C!$``.L5D$:)\@^VPL'@!8J(#0``
+M`(3)=9F018GI#[;!.P5@`@``#XQ2_____D0D$P^V1"03BP2%4`(``(E$)!2%
+MP`^%(O___X/$'%M>7UW#B?955U93BVPD%+X`````N`$```"`/0T`````=&'K
+M![@!````ZUB)\@^VPL'@!4:*B`T```"$R71`BSTT"P``C78`.$TA<A\/ME4A
+M#[;!C1PX.=IS$8M$)!@X2"%R"`^V0"$YV'*YB?(/ML+!X`5&BH@-````A,EU
+MR;@`````6UY?7<.-=@!3BTPD"(M<)`R+@3`%``"Z`0```#N#,`4``'<.BX$P
+M!0``.X,P!0``&=*)T%O#B?:+5"0$BTPD"+@`````.Q6`"P``?3*-%%+!X@-F
+MBX(@"P``9HD!9HN"(@L``&:)00**@B@+``"(00B*@BD+``"(00FX`0```,-5
+M5U93@^P(QT0D!`````"0BT0D!,'@!8G#9H.X```````/A(<```"]`````("X
+M'`````!T:HD$)(M4)`2-1-4`C32%#````(U\)!RY!````/SSI@^7P@^2P#C"
+M=3._$````(I$.PU`B$0[#8!\.PP`=!XZ1#L,=AAF#[;`9@^V3#L,N@````!F
+M]_&(5#L-B?9%BQPD#[:#'````#GH?YG_1"0$@WPD!`,/CF+___^#Q`A;7E]=
+MPXGV55=64X/L+,9$)"L`QD0D*@"-=@#&1"0I``^V1"0KB40D%&H`#[9$)"U0
+M#[9$)#)0#[9$)#=0Z/S___^)1"0TOP````"#Q!`[/8`+```/C88!``"+5"04
+MB50D&)"-!'_!X`,/MY`B"P``P>(0#[>`(`L```G".U0D)`^%30$``,9$)"@`
+MC01_P>`#B40D((T,?XE,)!P/ME0D*(G1P>$%9H.Y``````!U=XM<)""+@R`+
+M``")@0````"+@R0+``")@00```"+@R@+``")@0@````/MH$<````P>(#C00"
+MBEPD*X@<A0T````/MH$<````C00"BEPD*H@<A0X````/MH$<`````<**1"0I
+MB`25#P```/Z!'````.FB````C78`#[9<)"B)VL'B!8E4)!"^$`````^V3#(,
+MB<B+="0<O3`+``"Z`````/=T]02%TG1@P>,#C10+#[8$E0D```"+3"08*<&#
+M^0%_1XI$)"N(!)4-````BU0D$+D0````#[9$"@R-!`.*5"0JB!2%#@```(MT
+M)!`/MD0.#(T$`XI4)"F(%(4/````_D0.#.L2C78`_D0D*(!\)"@##X;6_O__
+MC01__P3%+`L``(UV`$<[/8`+```/C(/^___^1"0I#X0__O___D0D*H!\)"H?
+M#X8B_O___D0D*X!\)"O_#X4+_O__@\0L6UY?7<.-=@!55U93@^P<QT0D%```
+M``"#/6P"````=0_'!6P"```!````Z,W]__^#?"0T`'0'BT0D-,8``,=$)!@`
+M````N@`````[%8`+``!]/XGVBTPD&(T$28T4Q0````"+@BP+```!1"04@WPD
+M-`!T#HM,)#2*`0*",`L``(@!_T0D&(M$)!@[!8`+``!\PX-\)#@`#X2G````
+MQT0D&`````"+1"08P>`%B<5F@[@```````^$B````+L`````@+@<`````'1K
+MBU0D&,'B`XE4)!")1"0,BT0D$`'8C32%#````(M\)#BY!````/SSI@^7P@^2
+MP#C"=2F#?"0T`'0,BH4=````BU0D-(@"BT0D&,'@!0^V@!P```")1"04ZQ*)
+M]D.+;"0,#[:%'````#G8?Z3_1"08@WPD&`,/CF'___\/MD0D%(/$'%M>7UW#
+MN,`8``##B?:XG````,.)]K@$````PXGV55=64X/L#(M\)""+="0HBVPD+(V>
+M8`P``+D`````NL`8``")\(UV`(@(0$IU^HEN$(L5X`$``(U"`:/@`0``B%8H
+MBT0D)(E&(,9&*0!FBP=FB4889HM'`F:)1AJ+1P2)1AR):Q"(4RB+1"0DB4,@
+MQD,I`6:+!V:)0QAFBT<"9HE#&HM'!(E#'`^W1AH](B<``']A/2`G```/C<(`
+M```]0"$```^$MP```#U`(0``?QL]("$```^$I0```#TB(0``#X2:````Z:D`
+M```]1"$```^$B@```#U$(0``#XR3````+1`G``"#^`$/AX4```#K;XUV`#U@
+M)P``=&4]8"<``'\@/4`G``!T5SU`)P``?PD],"<``'1)ZUL]1"<``'1`ZU(]
+M@B<``'0W/8(G``!_"3V`)P``="GK.SV`D0``=`D]@)0``'09ZRMFQT8D@)'&
+M1B8$9L=#)("1QD,F!.L5D&;'1B2`E,9&)@1FQT,D@)3&0R8$BD<(B$8JBD<(
+MB$,J:```!`!J`&H"5>C\____B09H`"```&H`:@!5Z/S___^)1@B#Q""#/@!T
+M!(7`=0JX`````.GD````BP:-B``"`0")3@2-D````@")%@4`0`(`B0.)2P2+
+M1@B)0PB[`````#L=@`L``'U.BRV`"P``C01;C0S%`````(L'.8$@"P``=2^+
+M@3`+``!`B8$P"P``@[DL"P```'09.X$L"P``=A&Z`````/>Q+`L``(F1,`L`
+M`$,YZWRXBT8$QX`@@O__`?`#`(M&!,>`*(+__P$``.B#[`AJ>/]V$.C\____
+MB<(E`'```(/$$#T`(```=A2#[`1J>`^VPE#_=A#H_/___X/$$/]T)"3H4/G_
+M_X/L"%;H$_7__[@!````@\00@\0,6UY?7<.-=@!3@^P4BUPD'%/H_/___X'#
+M8`P``(D<).C\____N`$```"#Q!A;PXGV5E.#[!"+="0<BYXD!0``@<-@#```
+M5NC\____@\00@'XY`74&@'LY`70[@^P(C9X0`0``4_]V%.C\____QX80`0``
+MZ`,``,>&&`$```````")MAP!``"#Q`A3_W84Z/S___^#Q!"#Q`1;7L.05E.#
+M[!"+7"0<C;-@#```4^C\____B4,4B484B9LD!0``B9XD!0``BX,P!0``B88P
+M!0``B1PDZ/S___^)-"3H_/___XD<).C\____@\00N@````"$P`^$A0```(/L
+M#%;H_/___X/$$+H`````A,!T<(/L#%/H_/___\<$)-`'``#H_/___XD<).C\
+M____B1PDZ/S____'@Q`!``#H`P``QX,8`0```````(F;'`$``(/$"(V#$`$`
+M`%#_<Q3H_/___X/$"&H`4^C\____@\0(:@!6Z/S___^Z`0```(/$$)")T(/$
+M!%M>PU575E.#[#R+7"10QD0D"&V-1"0(QD`!_\9``B/&0`,4QD`$.L9`!>_&
+M0`86QD`'DH.[*`4```!T!HN;*`4``+D`````NB````"-1"00C78`B`A`2G7Z
+MQD0D%`&]`````&H@C70D%%9J#E/H_/___X/$$(7`=4&#[`QH@!H&`.C\____
+M:B!6:@]3Z/S___^#Q""#^"!U(8UT)""-1"0(N0@```#\B<?SI@^7P@^2P#C"
+M=06]`0```(GHA,!U$(/L#&@L`0``Z/S___^#Q!")Z@^VPH/$/%M>7UW#B?;#
+MC78`55=64X/L#(ML)""+7"0DN0````"Z>````(G8D(@(0$IU^H.],`4```$/
+ME$,3BT4@B0.`2Q$09HM%&&:)0P1FBT4:9HE#!HN%,`4``(A#;,9#$B!F@7T:
+M("%T"&:!?1HB(74<QD,7`KZD!```C7L\_+D'````\Z5FI:3IA````&:+11HM
+M$"<``&:#^`%V$&:!?1I`(70(9H%]&D0A=4W&0Q<$9HM%&BT0)P``9H/X`7<5
+MOL0$``"->SS\N0<```#SI6:EI.L]9H%]&D`A=`AF@7T:1"%U+;[D!```C7L\
+M_+D'````\Z5FI:3K&,9#%PB#[`AH`````(U#/%#H_/___X/$$(I#%_9C$HA#
+M$(3`=03&0Q"`OD@!``"->QC\N0<```#SI:2#O2P%````=!*+A2P%``"+0`B)
+M0V29B5-HZPJ+10B)0V29B5-HQT-@`"```(/$#%M>7UW#C78`BT0D!,:`EP``
+M``##5U93BW0D$(M^;(N')`4``(!X)P`/A8H```"+7G"#[`B+5F`/MH*C````
+M4`^V@J(```!0#[:"H0```%`/MH*@````4`^V@I\```!0#[:"G@```%`/MH*=
+M````4`^V@IP```!0#[:"UP```%`/M@:#X`%0#[9&`E`/MD8!4/]V"&@$!0``
+MZ/S___^#Q#S'1G``````_W8(5O]V>/_3@\00ZSB-=@"#[`B-7GQ3_W<4Z/S_
+M___'1GST`0``QX:$````^`\#`(FVB````(/$"%/_=Q3H_/___X/$$%M>7\.-
+M=@!55U93@^P,BVPD)`^W1"0HC13`P>("*<*+3"0@BX%8!0``C1S0B[$D!0``
+M@<9@#```B70D"(E=8(EK'(-[+`!U"H-[,``/A)L#``"_`````(!-``&+0S")
+M16B+0RR)162Q`(M$)""`>"L`=B6+<RB0#[;1B=#!X`0!T(M4)"`[M((\"P``
+M#X2&`@``03A**W??L8"+1"0@B[`D!0``#[;!BH0PF`0``#S_="F#>RP`="(/
+MML"-!$"-!,")PL'B!2G"BX:0!0``C120.U,L#X0T`@``1T&`^8%VP[&"BU0D
+M((NR)`4``(GV#[;!BH0PF`0``#S_=!P/ML"-!$"-!("+EG0%``"-!,([0S`/
+MA.P!``!'08#YA7;0L8`/ML&+="0(BH0PF`0``#S_="F#>RP`="(/ML"-!$"-
+M!,")PL'B!2G"BX:0!0``C120.U,L#X2?`0``1T&`^8%VO[&"C78`#[;!BU0D
+M"(J$$)@$```\_W0<#[;`C01`C02`BY)T!0``C03".T,P#X1<`0``1T&`^85V
+MS(M$)""`>#D!=4:#>RP`=!6#[`1J``^V0TE0_W,LZ/S___^#Q!"#N^``````
+M#X0"`@``@^P$:@`/MH/5````4/^SX````.C\____@\00C78`@[O@``````^$
+MUP$``(M3+(E4)`2_`````(!Z,`!V18G6@\8H@^P,5NC\____C4CX@\00BU8$
+MB48$B3")4`2)`H"YUP```/]U#X!Y(0!U"8.YX`````!U#$>)^8M$)`0X2#!W
+MP(GZBTPD!#A1,`^%T````(J#UP```(A%`K\`````@'DP``^&N0$``(G.@\8H
+M@^P,5NC\____C4CX@\00BU8$B48$B3")4`2)`H-Y'`!T0HM1'(I"`CJ!UP``
+M`'0T@WIP`'4N@WIT`'4HBH'7````B$("@^P$#[=!&%"+1"0H_[`D!0``:@?H
+M_/___X/$$(UV`$>)^HM,)`0X43!WD.D_`0``B?B(10'IH?[__XGZB%4!Z9?^
+M__^)^8A-`>F-_O__B?B(10'I@_[__XM4)"`/MD(IC02!B(68````Z6K]__^*
+M0TF(10+&@]<```#_OP````"+3"0$@'DP``^&X0```(G.@\8H@^P,5NC\____
+MC4CX@\00BU8$B48$B3")4`2)`H"YUP```/]T1\:!UP```/^#>1P`=#J+41R*
+M0@(Z04ET+X-Z<`!U*8-Z=`!U(XI!28A"`H/L!`^W01A0BT0D*/^P)`4``&H'
+MZ/S___^#Q!"01XGZBTPD!#A1,'>(ZV*)]HI#28A%`NM8BW0D(`^V1BF-!(&(
+M10&(A9@```#K+[$`BT0D((!X*P!V(XMS*(UV``^VT8G0P>`$`="+5"0@.[2"
+M/`L``'3!03A**W?CBW0D(#A.*W4$QD4!_\9%`@")]HU]((US8/RY"@```/.E
+MC7T,C7-,L07SI8N#B````(E%2(N#C````(E%3&:+0S1FB4589HM#-F:)15J+
+M0T"+4T2)15")552*0TJ(15SV0R0$=2Z+1"0@@+A7#````'0/_HA7#```@+A7
+M#````'42@^P,_W0D+.C\____@\00C78`@^P$:@"+0QP/MD`!4/]T)"SH_/__
+M_P^V0R"#Q!"H`G0/J`1T"Z@!=0>`30`"ZP60@&4`_8I3)-#J@^($BD4`@^#[
+M"="(10"#[`Q5Z"CZ__^#Q!Q;7E]=PU575E.#[!R+?"0PBW0D-(ML)#BY````
+M`+J<````B>B0B`A`2G7ZB74(@_X_?@F!QV`,``"#[D"X`````(.\MY@"````
+M#X5I`@``B:RWF`(``(E];(M$)#R)17"+1"1`B45XN`$```"`?SD!#X5"`@``
+M9L=$)!K_`('^A0```'\.9@^VA#Z8!```9HE$)!IF@7PD&O\`#X0(`@``#[=4
+M)!J+CU@%``"-!-+!X`(IT(T4Q0````#V1`HC!`^$XP$``(M$"B`E`/__`#T`
+M`/\`#X7/`0``C1P*]D,D!`^$-@$``,:#L``````/MD,@J`)T,J@$="ZH`70J
+MQD,B!<9#(P13#[9#25#_<RS_<RCH_/___X/$$.F#`0``QH.Q`````>M?#[9#
+M(*@"=7:H!'1RJ`%T;HMK*,9#(@/&0R,$QT0D%`````"`?0H`=#:-=3B#[`Q6
+MZ/S___^)PH/$$(M&!(E6!(DRB4($B1"`>B+_=`0YVG6F_T0D%`^V10H[1"04
+M?\V`N[$````!#X0.`0``@^P(4U?H_/___X/$$.G\````#[9#(*@"#X3P````
+MJ`0/A.@```"H`0^%X````(M#*(I`";X`````@'\F`'8G#[;HB?(/MLJ)Z-/X
+MJ`%T#X/L!&H`45?H_/___X/$$$:)\#A')G?<QD,C!L9#(@5FQX.0``````"#
+M[`A35^C\____@\00Z84```"+6RB)7"00QD0D#P"`>PH`=F")VH/".(E4)`B#
+M[`S_="04Z/S___^)PX/$$(M4)`B+0@2)6@2)$XE#!(D8@'LB_W0>@'LA(G0&
+M@'LA#742QX2WF`(```````"X`````.L[_D0D#XI$)`^+5"00.$(*=ZF#[`0/
+MMT0D'E!55^C\____@\00N`$```#K$,>$MY@"````````N`````"#Q!Q;7E]=
+MPY!55U93@^P,BW0D((ML)"2+?"0HBUY@A=MU#H/L#%?_U8/$$.D``0``@WYT
+M`'4&@WYP`'00@^P,5__5@\00Z>8```")]H"[L``````/A<L```"+4R@/MD((
+MJ!`/A;P```"H"`^%M````(L2B50D"(![2P!T$8/L!%-J!O]S*.C\____@\00
+MB6YTB7YX#[9#(*@"="FH!'0EJ`%T(<9#(@7&0R,$4P^V0TE0_W,L_W,HZ/S_
+M__^#Q!#K;XUV``^V0R"H`G4DJ`1T(*@!=!S&0R(#QD,C!(/L"%/_="04Z/S_
+M__^#Q!#K0HGV#[9#(*@"=#BH!'0TJ`%U,,9#(@7&0R,&9L>#D```````@^P(
+M4_]T)!3H_/___X/$$.L-D(/L#%?_U8/$$(UV`(/$#%M>7UW#5U93BU0D$(MT
+M)!2+0BB+.(M>2`^V1A2#^"!T1(/X('\+A<!T&X/X!G\NZR2#^")T+X/X(GP:
+M@\"`@_@!=QKK$(M"',=`!`````#&0UX!ZQ#&0UX-ZPJ)]K@`````ZS&0@WY0
+M`'02@^P(C4904%?H_/___X/$$(GV@^P(5E?H_/___XD<)/]3:+@!````@\00
+M6UY?PU575E.#[!R+?"0PBVPD-(M';(E$)!B+122).(-_8`!U$\9%7@*#[`Q5
+M_U5H@\00Z<@$``"+1V#V0"0"=!/&15X"@^P,5?]5:(/$$.FL!```@^P,_W0D
+M).C\____B<:#Q!"%P'43QD5>`H/L#%7_56B#Q!#IA`0``,=`9`````"):$B+
+M1V")1AB+1V!FBT`89HE&$,9&%(`/MD5<@_@"#X1%`0``@_@"?PF%P'0<Z88"
+M``"#^`,/A*P!``"#^`0/A'\!``#I;P(``(M'8/9`-`$/A)````#V15T"=`;&
+M1B2(ZQ.*15V#X`0\`1G`@^`%@^AVB$8DBTU(BUU,9HM54&:)5"06QD8E`(G8
+MP>@8B$8FB=C!Z!"(1B>)V,'H"(A&*(A>*8G(#ZS8&(A&*HG(#ZS8$(A&*XG(
+M#ZS8"(A&+(A.+<9&+@#&1B\`9HM$)!9FP>@(B$8PBD0D%HA&,<9&,@#&1C,`
+MZVOV15T"=`;&1B0HZQ.*15V#X`0\`1G`@^`%@\`JB$8DBTU(BUU,9HM54&:)
+M5"06QD8E`(G(#ZS8&(A&)HG(#ZS8$(A&)XG(#ZS8"(A&*(A.*<9&*@!FBT0D
+M%F;!Z`B(1BN*1"06B$8LQD8M`(M'8`6T````B48XQD8<((-.9`+I6`$``(!]
+M2!!W!?8'`G4)QD5>!NGG`@``#[9%2(U6)(/L!%#_=5!2Z/S___^+1V`%M```
+M`(E&.,9&'""!3F0``!``QD85JX/$$/9%708/A`D!``"+14R)1B#I_@```(I%
+M78/@,#P@=1'&1B0;QD8E`<9&*`#IXP```,9&)#7IV@```(M'8`^V0""H`70$
+MJ`1U"<9%7@;I90(``(%.9```(`!FBT549CM%2G0V#[9%4X/X0G0M@_A"?P>#
+M^$!T(^L8/;````!T!SWL````=0IFBT549HE%2NL)QD5>!ND>`@``QD8DL&:+
+M14B(1B5FBT5*B$8F9HM%3(A&)V:+14Z(1BAFBT50B$8IBD52B$8JBD53B$8K
+M9@^V14F(1BQF#[9%2XA&+68/MD5-B$8N9@^V14^(1B]F#[9%48A&,/9%709T
+M&@^W153!X`F)1B"#3F0$ZPJ0QD5>!NFC`0``C7X\QT9LQ!D#`(I%7:@&#X1X
+M`0``NP````"H`G0&@TYD".L$@TYD$(-]8`!T"_9%70%T!8M=8.LJ@WUD`'0D
+M@^P$:@"+5"0@_[(D!@``5?]59(/$$(7`=`J+1"08BY@D!@``A=MT.(/L#%;H
+M_/___X/$"&H`5^C\____@\00_S/_<PS_<PA7Z/S___^#Q!"-0P2#PQ"#.`!T
+MY.GR````@^P,_W0D).C\____B40D((/$$(7`=0G&15X&Z>0```"+5"00BT((
+MB48TB590N0````"Z``(``)"("$!*=?KV15T$#X2#````]D9F('06@^P$_W8@
+M_W58_W8TZ/S___^#Q!#K9_9&9A!T88M&-(E$)`R#?6``=`OV15T!=06+76#K
+M)(/L!&H!BU0D(/^R)`8``%7_562#Q!"%P'0*BT0D&(N8)`8``(/L!/\S_W,(
+M_W0D&.C\____BQ,!5"0<@\00C4,$@\,0@S@`=-N#[`AJ`%?H_/____]V((M$
+M)"3_<!#_<`Q7Z/S___^#Q"#K!(-.9`&#[`A6_W0D).C\____@\00ZQB#[`A6
+M_W0D).C\____B2PD_U5H@\00B?:#Q!Q;7E]=PU575E.#[!R+="0PBWPD/(I$
+M)$2(1"0;QT0D#/____^)^L'B"6:)5"0*BT9@B40D!(-^8`!T"8"^EP````!T
+M"8M$)`SI4`,``(M4)`2+4BB)%"2+;FQFQX:4````$">#[`Q5Z/S___^)PX/$
+M$(M$)`R%VP^$(`,``(/L#%7H_/___XE$)"2#Q!"%P'46@^P(4U7H_/___XM$
+M)!R#Q!#I]@(``(N%)`4``,9`)P&#[`16_[4D!0``:@7H_/___XM$)!2`2"0"
+M@\0,_W9@:B'_="0,Z/S___^-4SR)5"0@@\00@'PD&P!T#<=#9`H```#&0R0H
+MZR?'0V02````QD,D*@^W1"0*@^P$4/]T)$B+1"0@_W`(Z/S___^#Q!"+1F#V
+M0#0!#X23````@'PD&P$9P(/@`H/H>(A#),9#)0"+5"0XB=#!Z!B(0R:+5"0X
+MB=#!Z!"(0R>+5"0XB=#!Z`B(0RB+5"0XB%,IBT0D-(M4)#@/K-`8B$,JBT0D
+M-(M4)#@/K-`0B$,KBT0D-(M4)#@/K-`(B$,LBE0D-(A3+<9#+@#&0R\`B?AF
+MP>@(B$,PB?B(0S'&0S(`QD,S`.M>@'PD&P$9P(/@`H/`*(A#),9#)0"+1"0T
+MBU0D.`^LT!B(0R:+1"0TBU0D.`^LT!"(0R>+1"0TBU0D.`^LT`B(0RB*5"0T
+MB%,IQD,J`(GX9L'H"(A#*XGXB$,LQD,M`(/L#%/H_/___XM&8&:+0!AFB4,0
+MQD,4@(ES&(M4)"2+0@B)0S0/MT0D&HE#((E34,9#'""+1F`%M````(E#.,=#
+M;.P/`P"#Q`AJ`/]T)!SH_/____]S((M$)"C_<!#_<`S_="0LZ/S____&AI<`
+M```!@\084U7H_/___X/$$(7V#X2L````@WY@`'1A@+Z7`````'18B?9F@;Z4
+M````E@!U&8/L!/]V8&HABT9@_W`HZ/S___^#Q!"-=@!F_XZ4````@^P,:-`'
+M``#H_/___XDL).C\____@\00A?9T5(-^8`!T"8"^EP````!UJH7V=$&#?F``
+M=#MF@[Z4`````'0Q@'L4`'4KQT0D#`````"`?"0;`'0<#[=$)`J#[`10BU0D
+M'/]R"/]T)$SH_/___X/$$(-[4`!T$(/L"(U#4%!5Z/S___^#Q!"#[`A35>C\
+M____BX4D!0``QD`G`(/$#%;_M20%``!J!NC\____BT0D%(!@)/V+1"0<@\00
+MC78`@\0<6UY?7<-64X/L#(MT)!B+7"0<B%XW#[;;4U;H_/___X/$"%.!QF`,
+M``!6Z/S___^X`0```(/$%%M>PXUV`(/L&/]T)!SH_/___P^VP(/$',.0N```
+M``##B?964XM,)`R^`````+J`````BYDD!0``B?8/M\*`O!B8!```_W0!1D)F
+M@?J%`';JBXDD!0``@<%@#```NH````"0#[?"@+P(F`0``/]T`49"9H'ZA0!V
+MZHGP6U[#D(M,)`2*5"0(B-#`Z`0\"78'@\!7ZPJ)]HC0P.@$@\`PB`&)T(/@
+M#X/X"7X,B-"#X`^#P%?K"HGVB-"#X`^#P#"(00'#5E.+="0,BUPD$`^VQU!6
+MZ*C___\/MMM3@\8"5NB;____@\006U[#D%575E.+?"04BVPD'+X`````N0``
+M``"Z``$``(GHC78`B`A`2G7ZNH````"+GR0%```/M\)F#[:,&)@$``!F@?G_
+M``^$;`$``(GP1CM$)!@/A5\!``!F@?J!``^'T`````^WP8T$0(T$P(G"P>(%
+M*<*+@Y`%``"-')"#>PP`=&VY@````(NW)`4```^WP68/MH0PF`0``&8]_P!T
+M'@^WP(T$0(T$P(G"P>(%*<*+AI`%``"-%)`[4PQT+$%F@?F!`';(L@"`>S(`
+M=C"^`0````^VP@^V3!A`B?#3X`E%($(X4S)WZ^L4B$T"Z]>0QD4"_XM#"`^V
+M0`F)12#&10`!BD,QB$4!BT-(B44$BT-,B44(BT-8B44,BT-<B440BT-@B444
+MBT-DB448BT-PB44<ZWB+ER0%```/M\&-!$"-!(#!X`.)PP.:=`4``,9%`O_&
+M10`"BY<D!0``BY)T!0``BD00'XA%`8M#5`^V0`F)12#&101V#[=#(%"-1050
+MZ%?^___&10QD#[=#(E"-10U0Z$7^___&11QR#[9#'5"-11U0Z._]__^#Q!BX
+M`````.F?`0``B?9"9H'ZA0`/AFO^__^+OR0%``"!QV`,``"Z@`````^WPF8/
+MMHPXF`0``&:!^?\`#X18`0``B?!&.T0D&`^%2P$``&:!^H$`#X?,````#[?!
+MC01`C03`B<+!X@4IPHN'D`4``(T<D(-[#`!T:;F`````#[?!9@^VA#B8!```
+M9CW_`'0>#[?`C01`C03`B<+!X@4IPHN'D`4``(T4D#M3#'0L06:!^8$`=LBR
+M`(![,@!V,KX!````#[;"#[9,&$")\-/@"44@0CA3,G?KZQ:(30+KUXUV`,9%
+M`O^+0P@/MD`)B44@QD4``8I#,8A%`8M#2(E%!(M#3(E%"(M#6(E%#(M#7(E%
+M$(M#8(E%%(M#9(E%&(M#<(E%'.ML#[?!C01`C02`P>`#B<,#GW0%``#&10+_
+MQD4``HN7=`4``(I$$!^(10&+0U0/MD`)B44@QD4$=@^W0R!0C44%4.C'_/__
+MQD4,9`^W0R)0C44-4.BU_/__QD4<<@^V0QU0C44=4.A?_/__@\08N`````#K
+M$I!"9H'ZA0`/AH7^__^X_____UM>7UW#B?955U93@^P$BW0D&(ML)!R[````
+M`+D`````NJ0,``"+1"0@B?:("$!*=?JZ@````(N^)`4```^WPF8/MHPXF`0`
+M`&:!^?\`#X0$`P``B=A#.>@/A?D"``!F@?J!``^'60(```^WP8T$0(T$P(G"
+MP>(%*<*+AY`%``"-+)"#?0P`='*Y@````(G[#[?!9@^VA!B8!```9CW_`'0>
+M#[?`C01`C03`B<+!X@4IPHN#D`4``(T4D#M5#'0R06:!^8$`=LBR`(!],@!V
+M/;L!````#[;"#[9,*$")V-/@B<&+1"0@"4@@0CA5,G?EZQN+5"0@B$H"Z\V+
+M3"0@QD$"_XM%"`^V0`F)02"+1"0@Q@`!BD4QBU0D((A"`8M%2(E"!(M%3(E"
+M"(M%6(E"#(M%7(E"$(M%8(E"%(M%9(E"&(M%<(E"',9$)`,`@+V0``````^&
+M]`$```^V1"0#C02`P>`#BU0D((T,$`'HC9B0````BE,$B%$DBE,%B%$EBX"8
+M````B@"#X`^(028/MD$D@_@#="F#^`-_#H/X`@^$XP```.G*````@_@$=$>#
+M^!(/A(L```#IMP```(UV``^V3"0#C0R)P>$#BX0IF````(I0`8/B!P^VTL'B
+M"`^V0`(!T(T$@-'@BU0D((E$$2CID@````^V1"0#C02`C13%`````(N$*I@`
+M``"`>`(`=0Z+3"0@QT0**`````#K:`^V1"0#C02`P>`#BY0HF`````^V4@*#
+MZA2+3"0@B50(*.M%#[9,)`.-#(G!X0.+A"F8````#[90`L'B"`^V0`,!T(T$
+M@-'@BU0D((E$$2CK%XUV``^V1"0#C02`BTPD(,=$P2@`````#[9T)`.--+;!
+MY@.+1"0@C7P&+(VT+IP```#\N0@```#SI?Y$)`.*5"0#.)60````#X><_O__
+MZ8L```"+EB0%```/M\&-!$"-!(#!X`.)PP.:=`4``(M,)"#&00+_Q@$"BY8D
+M!0``BY)T!0``BD00'XA!`8M#5`^V0`F)02#&001V#[=#(%")R(/`!5#H;_G_
+M_XM$)"C&0`QD#[=#(E"+1"0L@\`-4.A5^?__BU0D,,9"''(/MD,=4(G0@\`=
+M4.CY^/__@\08N`````#I-0,``$)F@?J%``^&T_S__XNV)`4``('&8`P``+J`
+M````#[?"9@^VC#"8!```9H'Y_P`/A/`"``")V$,YZ`^%Y0(``&:!^H$`#X=2
+M`@``#[?!C01`C03`B<+!X@4IPHN&D`4``(TLD(-]#`!T<+F`````#[?!9@^V
+MA#"8!```9CW_`'0>#[?`C01`C03`B<+!X@4IPHN&D`4``(T4D#M5#'0R06:!
+M^8$`=LBR`(!],@!V/;L!````#[;"#[9,*$")V-/@B<&+1"0@"4@@0CA5,G?E
+MZQN+5"0@B$H"Z\V+3"0@QD$"_XM%"`^V0`F)02"+1"0@Q@`!BD4QBU0D((A"
+M`8M%2(E"!(M%3(E""(M%6(E"#(M%7(E"$(M%8(E"%(M%9(E"&(M%<(E"',9$
+M)`(`@+V0``````^&XP$```^V1"0"C02`P>`#BU0D((T,$`'HC9B0````BE,$
+MB%$DBE,%B%$EBX"8````B@"#X`^(028/MD$D@_@#=">#^`-_#H/X`@^$X0``
+M`.G(````@_@$=$6#^!(/A(D```#IM0```)`/MDPD`HT,B<'A`XN$*9@```"*
+M4`&#X@</MM+!X@@/MD`"`="-!(#1X(M4)"")1!$HZ9(````/MD0D`HT$@(T4
+MQ0````"+A"J8````@'@"`'4.BTPD(,=$"B@`````ZV@/MD0D`HT$@,'@`XN4
+M*)@````/ME("@^H4BTPD((E4""CK10^V3"0"C0R)P>$#BX0IF`````^V4`+!
+MX@@/MD`#`="-!(#1X(M4)"")1!$HZQ>-=@`/MD0D`HT$@(M,)"#'1,$H````
+M``^V="0"C32VP>8#BT0D((U\!BR-M"Z<````_+D(````\Z7^1"0"BE0D`CB5
+MD`````^'GO[__^M_#[?!C01`C02`P>`#B<,#GG0%``"+3"0@QD$"_\8!`HN6
+M=`4``(I$$!^(00&+0U0/MD`)B4$@QD$$=@^W0R!0B<B#P`50Z$KV__^+1"0H
+MQD`,9`^W0R)0BT0D+(/`#5#H,/;__XM4)##&0AQR#[9#'5")T(/`'5#HU/7_
+M_X/$&+@`````ZQ.)]D)F@?J%``^&[?S__[C_____@\0$6UY?7<.-=@!55U93
+M@^P$BW0D&+L`````N0````"ZI`P``(M$)"")]H@(0$IU^KJ`````B[XD!0``
+M#[?"9@^VC#B8!```9H'Y_P`/A#@#``")V$,[1"0<#X4K`P``9H'Z@0`/AWT"
+M```/M\&-!$"-!,")PL'B!2G"BX>0!0``C2R0@WT,`'1RN8````")^P^WP68/
+MMH08F`0``&8]_P!T'@^WP(T$0(T$P(G"P>(%*<*+@Y`%``"-%)`[50QT,D%F
+M@?F!`';(L@"`?3(`=CV[`0````^VP@^V3"A`B=C3X(G!BT0D(`E(($(X53)W
+MY>L;BU0D((A*`NO-BTPD(,9!`O^+10@/MD`)B4$@BT0D(,8``8I%,8M4)""(
+M0@&+14B)0@2+14R)0@B+15B)0@R+15R)0A"+16")0A2+162)0AB+17")0AR+
+M3"0<B4HDQD0D`P"`O9``````#X8<`@``#[9$)`.-!(#!X`.+5"0@C0P0`>B-
+MF)````"*4P2(D:@```"*4P6(D:D```"+@)@```"*`(/@#XB!J@````^V@:@`
+M``"#^`-T*(/X`W\.@_@"#X3Q````Z=4```"#^`1T28/X$@^$DP```.G"````
+MB?8/MDPD`XT,B<'A`XN$*9@```"*4`&#X@</MM+!X@@/MD`"`="-!(#1X(M4
+M)"")A!&L````Z9X````/MD0D`XT$@(T4Q0````"+A"J8````@'@"`'41BTPD
+M(,>$"JP`````````ZW$/MD0D`XT$@,'@`XN4*)@````/ME("@^H4BTPD((F4
+M"*P```#K2P^V3"0#C0R)P>$#BX0IF`````^V4`+!X@@/MD`#`="-!(#1X(M4
+M)"")A!&L````ZQJ-=@`/MD0D`XT$@(M,)"#'A,&L``````````^V="0#C32V
+MP>8#BT0D((V\!K````"-M"Z<````_+D(````\Z7^1"0#BE0D`SB5D`````^'
+M?_[__^F6````BY8D!0``#[?!C01`C02`P>`#B<,#FG0%``"+3"0@QD$"_\8!
+M`HN6)`4``(N2=`4``(I$$!^(00&+0U0/MD`)B4$@QD$$=@^W0R!0B<B#P`50
+MZ+WR__^+1"0HQD`,9`^W0R)0BT0D+(/`#5#HH_+__XM4)##&0AQR#[9#'5")
+MT(/`'5#H1_+__XM$)#2+3"0XB4$D@\08N`````#I<`,``(UV`$)F@?J%``^&
+MG_S__XNV)`4``('&8`P``+J`````#[?"9@^VC#"8!```9H'Y_P`/A"@#``")
+MV$,[1"0<#X4;`P``9H'Z@0`/AWT"```/M\&-!$"-!,")PL'B!2G"BX:0!0``
+MC2R0@WT,`'1PN8`````/M\%F#[:$,)@$``!F/?\`=!X/M\"-!$"-!,")PL'B
+M!2G"BX:0!0``C120.U4,=#)!9H'Y@0!VR+(`@'TR`'8]NP$````/ML(/MDPH
+M0(G8T^")P8M$)"`)2"!".%4R=^7K&XM4)""(2@+KS8M,)"#&00+_BT4(#[9`
+M"8E!((M$)"#&``&*13&+5"0@B$(!BT5(B4($BT5,B4((BT58B4(,BT5<B4(0
+MBT5@B4(4BT5DB4(8BT5PB4(<BTPD'(E*),9$)`(`@+V0``````^&$@(```^V
+M1"0"C02`P>`#BU0D((T,$`'HC9B0````BE,$B)&H````BE,%B)&I````BX"8
+M````B@"#X`^(@:H````/MH&H````@_@#="J#^`-_$8/X`@^$\P```.G7````
+MC78`@_@$=$B#^!(/A)(```#IP0```)`/MDPD`HT,B<'A`XN$*9@```"*4`&#
+MX@</MM+!X@@/MD`"`="-!(#1X(M4)"")A!&L````Z9X````/MD0D`HT$@(T4
+MQ0````"+A"J8````@'@"`'41BTPD(,>$"JP`````````ZW$/MD0D`HT$@,'@
+M`XN4*)@````/ME("@^H4BTPD((F4"*P```#K2P^V3"0"C0R)P>$#BX0IF```
+M``^V4`+!X@@/MD`#`="-!(#1X(M4)"")A!&L````ZQJ-=@`/MD0D`HT$@(M,
+M)"#'A,&L``````````^V="0"C32VP>8#BT0D((V\!K````"-M"Z<````_+D(
+M````\Z7^1"0"BE0D`CB5D`````^'??[__^F*````#[?!C01`C02`P>`#B<,#
+MGG0%``"+3"0@QD$"_\8!`HN6=`4``(I$$!^(00&+0U0/MD`)B4$@QD$$=@^W
+M0R!0B<B#P`50Z%WO__^+1"0HQD`,9`^W0R)0BT0D+(/`#5#H0^___XM4)##&
+M0AQR#[9#'5")T(/`'5#HY^[__XM$)#2+3"0XB4$D@\08N`````#K$XGV0F:!
+M^H4`#X:U_/__N/____^#Q`1;7E]=PXUV`%575E.+="04BWPD&(MN;+D`````
+MNB````")^(@(0$IU^HN=)`8``+D`````N@`"``")V)"("$!*=?J-4S:Y````
+M`(I$,2&(`D**1#$@B`)"@\$"@_DG?NJ-4Q2Y`````(I$,0V(`D**1`X,B`)"
+M@\$"@_D3?NJ-4RZY`````(I$,4F(`D**1#%(B`)"@\$"@_D'?NJ)7QB+1E"+
+M5E2#P`&#T@")!XE7!(-^8`!U._8&`70V@WYD`'05A>UT$8M&9`^V0#.`O"B8
+M!```_W4;@WYH`'0=A>UT&8M&:`^W0"2`O"B8!```_W0(BD8!B$<,ZP3&1PS_
+MBD8"B$<-BD9<B$<.QD<2$,9'$1`/M@:#X`'1X(I?"H/C_0G#B%\*#[8&@^`!
+MP>`%BD\(@^'?"<&(3P@/MT98P>@'@^`!P>`&@^&_"<&(3P@/MT98P>@"@^`!
+MBE<)@^+^"<*(5PD/MT9:P>@#@^`!P>`'@^%_"<&(3P@/MT9:T>B#X`'1X(/B
+M_0G"B%<)#[=&6,'H`X/@`<'@!H/BOPG"B%<)#[=&6L'H!(/@`<'@!X/B?PG"
+MB%<)@\D0B$\(B@;0Z(/@`8/C_@G#B%\*B@:#X`2#X_L)PXA?"F;'1Q0`$(J&
+MF````(A''%M>7UW#B?:+1"0,QT`$`````,<``````+@`````PY!55U93@^P,
+MBUPD((I$)"2(1"0+QT0D!/____^+<V"+:VR%]G0/@+N7`````'4&]@,"=`V0
+MBT0D!.G_````C78`@^P,5>C\____B<>#Q!"+1"0$A?\/A.(```#&1R3AQD<E
+M`8!\)`L"#Y7`@\`:B$<FQD<4@&:+1AAFB4<0B5\8QT<@`````,='-`````#'
+M1VSL#P,`@^P(5U7H_/___\:#EP````%FQX.4````^@"#Q!"%VW1=@WM@`'17
+MD&:!NY0```"6`'49@^P$_W-@:B&+0V#_<"CH_/___X/$$(UV`&;_BY0```"#
+M[`QHT`<``.C\____B2PDZ/S___^#Q!"%VW0/@WM@`'0)@+N7`````'6J9H.[
+ME`````!T#H!_%`!U",=$)`0`````@^P(5U7H_/___XM$)!2#Q!"0@\0,6UY?
+M7<-55U93@^P<BW0D,(I<)#3'1"04_____XMN8(M&;(E$)!"%[70)@+Z7````
+M`'0*BT0D%.F9!```D(/L#/]T)!SH_/___XG'@\00BT0D%(7_#X1[!```]@8"
+M#X41`0``@/L4=P\/MMN-!%N-'(4`````ZQYF#[;3B=#!X`0!T(T$PF;!Z`C`
+MZ`0/MMB!P_````#&1R3AQD<E`<9')AR(7R?&1Q2`9HM%&&:)1Q")=QC'1R``
+M````QT<T`````,=';.P/`P"#[`A7_W0D'.C\____QH:7`````6;'AI0```#$
+M"8/$$(7V=&.#?F``=%V-=@!F@;Z4````E@!U&8/L!/]V8&HABT9@_W`HZ/S_
+M__^#Q!"-=@!F_XZ4````@^P,:-`'``#H_/___X/$!/]T)!SH_/___X/$$(7V
+M=`^#?F``=`F`OI<`````=:9F@[Z4``````^$9`,``(!_%``/A5H#``#'1"04
+M`````.E-`P``@^P,_W0D'.C\____B40D*(/$$(-\)!@`#X0O`P``C5<\B50D
+M#(M$)!B+0`B)1"0(QD<D&L9')0C&1R8:QD<G`,9'*!#&1RD`BT0D&(E'4,9'
+M%(!FBT489HE'$(EW&(M$)!B+0`B)1S3'1R`0````BT9@!;0```")1SC&1QP@
+MQT=L[`\#`(/L"&H`4NC\_____W<@BT0D+/]P$/]P#/]T)"CH_/___X/$&%?_
+M="0<Z/S____&AI<````!9L>&E````/H`@\00A?9T78-^8`!T5V:!OI0```"6
+M`'46@^P$_W9@:B&+1F#_<"CH_/___X/$$&;_CI0```"#[`QHT`<``.C\____
+M@\0$_W0D'.C\____@\00A?9T#X-^8`!T"8"^EP````!UJ6:#OI0`````=`:`
+M?Q0`=!F#[`B-1"0@4/]T)!SH_/___X/$$.G]`0``@^P(5_]T)!SH_/___X/$
+M!/]T)!SH_/___XG'@\00A<!U'8/L"(U$)"!0_W0D'.C\____BT0D)(/$$.G2
+M`0``C4`\B40D#(M,)`B#P02+5"0(#[9"`XI$$`2(0@3&00$*QD$"`+H$````
+MBT0D",8``$!*=?F$VW4&@&$#_.M,#[;;C03;C02#C01#C1S%`````(!)`P.)
+MV,'H&(E$)`2(002)VL'J$(A1!8G8P>@(B00DB$$&B%D'BD0D!(A!"(A1"8H4
+M)(A1"HA9"XM$)!B)1U#&1R05B@'`^`?WT(/`$8A')<9')@#&1R<`QD<H$,9'
+M*0"`(3_&1Q2`9HM%&&:)1Q")=QB+1"08BT`(B4<TQT<@$````(M&8`6T````
+MB4<XQD<<(,=';.P/`P"#[`AJ`/]T)!CH_/____]W((M$)"S_<!#_<`S_="0H
+MZ/S___^#Q!A7_W0D'.C\____QH:7`````6;'AI0```#Z`(/$$(7V=%V#?F``
+M=%=F@;Z4````E@!U%H/L!/]V8&HABT9@_W`HZ/S___^#Q!!F_XZ4````@^P,
+M:-`'``#H_/___X/$!/]T)!SH_/___X/$$(7V=`^#?F``=`F`OI<`````=:EF
+M@[Z4`````'0.@'\4`'4(QT0D%`````"#[`B-1"0@4/]T)!SH_/___X/$$)"#
+M[`A7_W0D'.C\____BT0D)(/$$(/$'%M>7UW#5U93BW0D$+C_____BWYLBUY@
+M]D98"`^$B````(/L!%;_MR0%``!J!>C\____@$LD`H/$#%-J(?]S*.C\____
+M@\00@'M+`'0>@^P,:-`'``#H_/___XD\).C\____@\00@'M+`'7B@WPD%`!T
+M#V:#3EH09H-+-A#K#8UV`&:#9EKO9H-C-N^#[`16_[<D!0``:@;H_/___X!C
+M)/VX`````(/$$)!;7E_#5E.#[`2+1"00#[9T)!2+4&R+6&#V``%T2X-[+`!T
+M&8/L!(GR#[;"4`^V0TE0_W,LZ/S___^#Q!"#N^``````=#V#[`2)\0^VP5`/
+MMH/5````4/^SX````.C\____@\00ZQR)]H/L!(GQ#[;!4(M#'`^V0`%04NC\
+M____@\00@\0$6U[#55=64X/L#(M<)""*1"0DB$0D"XI$)"B(1"0*QT0D!/__
+M__^+>V"+:VR%_W0)@+N7`````'0*BT0D!.DE`0``D(/L#%7H_/___XG&@\00
+MBT0D!(7V#X0*`0``QD8DX<9&)0&`?"0+`'0.@'PD"@$9P/?0@\`'ZPR`?"0*
+M`1G`]]"#P`V(1B;&1A2`9HM'&&:)1A")7AC'1B``````QT8T`````,=&;.P/
+M`P"#[`A65>C\____QH.7`````6;'@Y0```#T`8/$$(7;=%^#>V``=%F-=@!F
+M@;N4````E@!U&8/L!/]S8&HABT-@_W`HZ/S___^#Q!"-=@!F_XN4````@^P,
+M:-`'``#H_/___XDL).C\____@\00A=MT#X-[8`!T"8"[EP````!UJF:#NY0`
+M````=!R`?A0`=1:+0V!FBT`V9HE#6L=$)`0`````C78`@^P(5E7H_/___XM$
+M)!2#Q!"-=@"#Q`Q;7E]=PX/L#(M,)!"+5"04#[8"@_@)#X>Q````_R2%7!``
+M`(GVBT($QH!7#````(/L#%#H_/___[@`````@\00Z9````"#[`0/MD($4&H`
+M4>A$_O__@\00ZWN-=@"#[`0/MD($4&H!4>@L_O__@\00ZV.-=@"#[`@/MD($
+M4%'H_/___X/$$.M-D(/L!`^V0@50#[9"!%!1Z-'\__^#Q!#K-(/L"`^V0@10
+M4>C\____@\00ZR&0@^P(#[9"!%!1Z/S___^X`````(/$$.L(N/____^-=@"#
+MQ`S#BTPD!(M!8(7`=$K'0!P`````@$@D!,=!8`````#'06@`````QT%D````
+M`(-Y"#]_$XM1;(M!",>$@I@"````````PY"+46R+00C'A(*8`0```````,.)
+M]HM,)`2+06"%P'1*QT`<`````(!@)/O'06``````QT%H`````,=!9`````"#
+M>0@_?Q.+46R+00C'A(*8`@```````,.0BU%LBT$(QX2"F`$```````##B?93
+M@^P4BUPD'%/H_/___XN#)`4```5@#```B00DZ/S___^#Q!A;PXGV4X/L%(M<
+M)!Q3Z/S___^+@R0%```%8`P``(D$).C\____@\086\.)]E575E.#[!R+?"0P
+MBX<D!0``!6`,``")!"2#/P!T&HL'+0```@")!X/L"%#_=Q#H_/___X/$$(GV
+M@W\(`'02@^P(_W<(_W<0Z/S___^#Q!"0@W\,`'02@^P(_W<,_W<0Z/S___^#
+MQ!"0@^P(C40D(E"-1"0D4(U$)"90C40D*%"-1"0J4(U$)"U0C40D,%"-1"0R
+M4(U$)#50C40D-E"-1"0Y4(U$)#Q0C40D/U`/MT<D4.C\____@\1`@[]8!0``
+M`'0V@^P(_[=8!0``C8=`!0``4.C\____@\0(BT0D"/^P6`4``(M$)`P%0`4`
+M`%#H_/___X/$$(GV@[]T!0```'0W@^P(_[=T!0``C8=<!0``4.C\____@\0(
+MBT0D"/^P=`4``(M$)`P%7`4``%#H_/___X/$$(UV`(._D`4```!T-X/L"/^W
+MD`4``(V'>`4``%#H_/___X/$"(M$)`C_L)`%``"+1"0,!7@%``!0Z/S___^#
+MQ!"-=@"#OZP&````=#>#[`C_MZP&``"-AY0&``!0Z/S___^#Q`B+1"0(_["L
+M!@``BT0D#`64!@``4.C\____@\00C78`O@````")\#I$)`=S18VOS`8``)"#
+M[`B)\`^VV/^TG^0&``!5Z/S___^#Q`B+1"0(_[28Y`8``(M$)`P%S`8``%#H
+M_/___X/$$$:)\#I$)`=RPH._3`D```!T-8/L"/^W3`D``(V'-`D``%#H_/__
+M_X/$"(M$)`C_L$P)``"+1"0,!30)``!0Z/S___^#Q!"0@[]T"0```'0W@^P(
+M_[=T"0``C8=<"0``4.C\____@\0(BT0D"/^P=`D``(M$)`P%7`D``%#H_/__
+M_X/$$(UV`(._Q`D```!T-X/L"/^WQ`D``(V'K`D``%#H_/___X/$"(M$)`C_
+ML,0)``"+1"0,!:P)``!0Z/S___^#Q!"-=@"#OZP%````=#>#[`C_MZP%``"-
+MAY0%``!0Z/S___^#Q`B+1"0(_["L!0``BT0D#`64!0``4.C\____@\00C78`
+M@[]8!@```'0W@^P(_[=8!@``C8=`!@``4.C\____@\0(BT0D"/^P6`8``(M$
+M)`P%0`8``%#H_/___X/$$(UV`(._"`8```!T-X/L"/^W"`8``(V'\`4``%#H
+M_/___X/$"(M$)`C_L`@&``"+1"0,!?`%``!0Z/S___^#Q!"-=@"#OR0&````
+M=#>#[`C_MR0&``"-APP&``!0Z/S___^#Q`B+1"0(_[`D!@``BT0D#`4,!@``
+M4.C\____@\00C78`@[^0!@```'0W@^P(_[>0!@``C8=X!@``4.C\____@\0(
+MBT0D"/^PD`8``(M$)`P%>`8``%#H_/___X/$$(UV`(._R`8```!T-X/L"/^W
+MR`8``(V'L`8``%#H_/___X/$"(M$)`C_L,@&``"+1"0,!;`&``!0Z/S___^#
+MQ!"-=@"#O_P(````=#>#[`C_M_P(``"-A^0(``!0Z/S___^#Q`B+1"0(_[#\
+M"```BT0D#`7D"```4.C\____@\00C78`@[\D"0```'0W@^P(_[<D"0``C8<,
+M"0``4.C\____@\0(BT0D"/^P)`D``(M$)`P%#`D``%#H_/___X/$$(UV`(._
+MG`D```!T-X/L"/^WG`D``(V'A`D``%#H_/___X/$"(M$)`C_L)P)``"+1"0,
+M!80)``!0Z/S___^#Q!"-=@"#OW0&````=#>#[`C_MW0&``"-AUP&``!0Z/S_
+M__^#Q`B+1"0(_[!T!@``BT0D#`5<!@``4.C\____@\00C78`@[_@"0```'1'
+M_[?H"0``_[?D"0``_[?@"0``C8?("0``4.C\____BT0D$/^PZ`D``/^PY`D`
+M`/^PX`D``(M$)!P%R`D``%#H_/___X/$()"#OP0*````=$?_MPP*``#_MP@*
+M``#_MP0*``"-A^P)``!0Z/S___^+1"00_[`,"@``_[`("@``_[`$"@``BT0D
+M'`7L"0``4.C\____@\0@D(._*`H```!T1_^W,`H``/^W+`H``/^W*`H``(V'
+M$`H``%#H_/___XM$)!#_L#`*``#_L"P*``#_L"@*``"+1"0<!1`*``!0Z/S_
+M__^#Q""0@[]P"@```'1'_[=X"@``_[=T"@``_[=P"@``C8=8"@``4.C\____
+MBT0D$/^P>`H``/^P=`H``/^P<`H``(M$)!P%6`H``%#H_/___X/$()"#OTP*
+M````=$?_MU0*``#_MU`*``#_MTP*``"-AS0*``!0Z/S___^+1"00_[!4"@``
+M_[!0"@``_[!,"@``BT0D'`4T"@``4.C\____@\0@D(._E`H```!T1_^WG`H`
+M`/^WF`H``/^WE`H``(V'?`H``%#H_/___XM$)!#_L)P*``#_L)@*``#_L)0*
+M``"+1"0<!7P*``!0Z/S___^#Q""0@[^X"@```'1'_[?`"@``_[>\"@``_[>X
+M"@``C8>@"@``4.C\____BT0D$/^PP`H``/^PO`H``/^PN`H``(M$)!P%H`H`
+M`%#H_/___X/$()"#Q!Q;7E]=PU93@^P0BUPD'%/H_/___XVS8`P``(DT).C\
+M____B1PDZ/S____'!"30!P``Z/S___^)'"3H_/___XD<).C\____@\0(:@%3
+MZ/S___^#Q`AJ`5;H_/___X/$%%M>PXUV`(/L&&B@"P``Z/S___^X`````(/$
+M',.0D(M$)`3&``C&0`$2@'PD"`$9TO?2@^($B%`"QD`#`,9`!`#&0`4`QD`&
+M`,9`!P#&0`@`QD`)`,9`"@#&0`L`@'PD#`$9TH/B((A0#,9`#0#&0`X`QD`/
+M`,9`$`#&0!$`QD`2`,9`$P"X%````,.-=@!55U93@^P8BWPD,(I$)#2(1"07
+M#[9T)#C_="0LZ/S___^)Q8/$$+@`````A>T/A)8```"+70B)\@^VPE`/MD0D
+M#U"-0P10Z/S___^)QL8#`,9#`0#&0P(`QD,#`(D\)/]T)"SH_/___X/$$+D`
+M````NA````"-1R2("$!*=?J-7@3&1R05QD<E$8A?*,9'*0"-=SP/MMN)7R#'
+M1V0`````BT4(B4<TB6]0@^P(:@!6Z/S___]3_W40_W4,5NC\____N`$```"#
+MQ""#Q`Q;7E]=PY"0D%=64XM\)!"+1"04B<9FB4<$QD<*`&;'1P@``+L`````
+M9CG#<QB-=@`/M\N+%XGP9BG82&:)!$I#9CGS<NM;7E_#C78`5E.+7"0,BT0D
+M$(G&9HE#!,9#"@%FQT,(``"Y`````&8YP7,/#[?1BP-FB0Q0068Y\7+Q6U[#
+MB?93BUPD"(!["@%U*6:+0P@/M\B+$T!FB4,(9HL42F8[0P9R!F;'0P@``&;_
+M2P0/M\+K$(GV9O]+!`^W4P2+`P^W!%!;PU93@^P(BTPD%(MT)!B`>0H!=2D/
+MMU$(#[=!!(E$)`2-!`(/MU$&B10DF?<\)(L99HDT4V;_003K$8UV``^W402+
+M`6:)-%!F_T$$@\0(6U[#BT0D!&:#>`0`#Y3`#[;`PXM$)`2Z`````#D`=`Z+
+M`(M(!(L0B4H$B1&)PHG0PXGVBU0D!+@`````.1)T#8M"!(M(!(L0B4H$B1'#
+MD%93@^P$BUPD$(MS1(I#/(A$)`.Y`````+IP````B=B0B`A`2G7ZB7-$BD0D
+M`XA#/(/$!%M>PXGV@^P0BU0D%(M,)!B*00&(0@&*00*(0@*+002)0@0/MD(!
+MC01`P>`"4/]Q"/]R".C\____@\0<PY!3@^P$BTPD#(M4)!"*1"04B$0D`[,`
+M.,-S&XGVB@$Z`G0*N`````#K$8UV`$%"0SI<)`-RY[@!````@\0$6\.0BT0D
+M!,9``0"+5"0(B%`"QT`$`````,.05E.+1"0,BW0D&`^V4`&-%%*+2`B-')'^
+M0`$!<`2Y`````+H,````B=B-=@"("$!*=?J+1"00BU0D%(D#B5,$B?"(0PB)
+M\@^VQHA#"<'J$(/B/XI#"H/@P`G0B$,*6U[#BU0D!(I"`3H"#Y+`#[;`P[G_
+M````N@`"``"+1"0$B?:("$!*=?K#D%.#[`2+3"0,BUPD$(I$)!2(1"0#N```
+M``"-=@`/M]"`?)$"_W4.9HD<D8I<)`.(7)$"ZP=`9H/X?W;A#[?`@\0$6\.0
+M5U93BW0D$(M4)!B+3"0<#[=$)!2`?(8"_W4-9HD4AHA,A@+K%XUV``^VP5`/
+MM\)05NC\____#[?`@\0,6UY?PU93BUPD#(MT)!"*3"04N`````"0#[?0.$R3
+M`G439CDTDW4-QD23`O]FQP23___K!T!F@_A_=MT/M\!;7L.-=@!64XM<)`R+
+M="00BDPD%+@`````D`^WT#A,DP)U!V8Y-)-T")!`9H/X?W;I9CV``'4%N(`!
+M```/M\!;7L-55U93BVPD%(!])`AT.H!])"AT-(!])*AT+H!])(AT*(!])`IT
+M(H!])"IT'(!])*IT%H!])(IT$(!])"]T"H!])(\/A18"```/MD4D@_@O#X2;
+M````@_@O?R:#^`IT98/X"G\,@_@(=%OIT@$``(GV@_@H='N#^"IT=NG!`0``
+MD#V/````#X3I````/8\```!_'CV(````#X37````/8H````/A,P```#IDP$`
+M`(UV`#VH````='$]J@```'1JZ7T!``"0#[9%)8/@'\'@$`^V52;!X@@)T`^V
+M52<)T(G&OP`````/ME4HZ6,!``"-=@`/ME4FP>(8#[9%)\'@$`G"#[9%*,'@
+M"`G"#[9%*0G"B=:_``````^V52O!X@@/MD4L"<+I*`$```^V52;!XA@/MD4G
+MP>`0"<(/MD4HP>`("<(/MD4I"<*)UK\`````#[95*L'B&`^V12O!X!`)P@^V
+M12S!X`@)P@^V12T)PNG>````B?8/MG4FB?>^`````,'G&`^V32>)R[D`````
+MP>,0B?`)R(GZ"=H/MDTHB<NY`````,'C"(G&"<Z)UPG?#[9%*8G"N`````")
+M\0G!B?L)TP^V12JZ``````^DPAC!X!B)S@G&B=\)UP^V12NZ``````^DPA#!
+MX!")\0G!B?L)TP^V12RZ``````^DP@C!X`B)S@G&B=\)UP^V32V[`````(GP
+M"<B)^@G:B<:)UP^V52[!XA@/MD4OP>`0"<(/MD4PP>`("<(/MD4Q"<+K$9"^
+M`````+\`````N@````"0B758B7U<B55@9H--$@%;7E]=PY!3@^P0BUPD&`^V
+M0S-0#[9#,E`/MD,Q4`^V0S!0#[9#+U`/MD,N4`^V0RU0#[9#+%`/MD,K4`^V
+M0RI0#[9#*5`/MD,H4`^V0R=0#[9#)E`/MD,E4`^V0R104VA8!0``Z/S___^#
+MQ$@/MT,04&AJ`0``Z/S___^#Q!A;PXGV5U93BWPD$(M<)!2Z_____[D`````
+M9CG9<QV^0`P``)`/M\&*!#@QT`^VP,'J"#,4AD%F.=ERZ8G06UY?PY"0D%.+
+M3"0(BP&+D`0!``")%0````")TX'C?O_^_XL!B9@$`0``B=.!XW[_\O^+002)
+M&(M!!(E8#(M!!(E8$(M!!(E8%(M!!(E8&(M!!(E8!(L!BX!4`0``HP````")
+MPX'C_@#__XL!B9A4`0``6\.-=@!64X/L!(MT)!2*5"08BT0D$(L8@_X#=A"+
+MA/.``0``HP````#K#HGVBX3S@`$``*,`````@^#^@_X#=@R)A/.``0``ZPJ-
+M=@")A/.``0``A-)T88/^`W8.BX2ST`$``*,`````ZPR+A+/0`0``HP````"#
+MR`*#_@-V"8F$L]`!``#K"8F$L]`!``")]H/^`W8/BX2ST`$``*,`````ZPV0
+MBX2ST`$``*,`````J`)UW.MFB?:#_@-V#<>$\S`"````````ZPO'A/-0`@``
+M`````(/L#&@0)P``Z/S___^#Q!"#_@-V#HN$\S0"``"C`````.L,BX3S5`(`
+M`*,`````@\@!@_X#=@F)A/,T`@``ZP>)A/-4`@``@\0$6U[#B?975E.#[!"+
+M?"0@BD0D)(A$)`^*3"0HB$PD#HLWNP````"`?R8`#X22`0``D`^V1"0/B-G3
+M^*@!#X1S`0``@_L#=@Z+A-Z$`0``HP````#K#(N$WH0!``"C`````(/@_H/[
+M`W8,B83>A`$``.L*C78`B83>A`$``(/L#&@0)P``Z/S___^#Q!"`?"0.`'1B
+M@_L#=@Z+A)[0`0``HP````#K#(N$GM`!``"C`````(/(`H/[`W8)B82>T`$`
+M`.L*B82>T`$``(UV`(/[`W8/BX2>T`$``*,`````ZPV0BX2>T`$``*,`````
+MJ`)UW.MFB?:#^P-V#<>$WC`"````````ZPO'A-Y0`@```````(/L#&@0)P``
+MZ/S___^#Q!"#^P-V#HN$WC0"``"C`````.L,BX3>5`(``*,`````@\@!@_L#
+M=@F)A-XT`@``ZP>)A-Y4`@``@_L#=@_'A-Z``0```0```.L-B?;'A-Z``0``
+M`0```(/[`W80BX3>A`$``*,`````ZPZ)]HN$WH0!``"C`````(/(`8/[`W8,
+MB83>A`$``.L+C78`B83>A`$``)!##[9')CG8#X=O_O__@\006UY?PU.+7"0(
+MBDPD#(L#BX`$`0``HP````")PF:!>R2`9'009H%[)("1=`AF@7LD@)1U%`^V
+MR8/!"+@!````T^`)PNL2C78`#[;)@\$,N`$```#3X`G"BP.)D`0!``!;PXUV
+M`%.+7"0(BDPD#(L#BX`$`0``HP````")PF:!>R2`9'009H%[)("1=`AF@7LD
+M@)1U%`^VR8/!"+C^____T\`APNL2C78`#[;)@\$,N/[____3P"'"BP.)D`0!
+M``!;PXUV`%93@^P$BW0D$`^V7"044U;H_/___X/L!&@0)P``Z/S___]35NC\
+M____@\0<6U[#D%.+7"0(BDPD#(#Y_W1Z@/D?=SF+DQ@!``")%0````"X`0``
+M`-/@B<'WT"'0B8,8`0``BX-8`0``HP`````AR'1'B8-8`0``ZS^-=@"+DQP!
+M``")%0`````/MLF#Z2"X`0```-/@B<'WT"'0B8,<`0``BX-@`0``HP`````A
+MR'0(B8-@`0``B?9;PXGV5U93BW0D&(I<)!2+1"00BSB`^P-V$@^VP\>$QP`"
+M```,`0``ZQ")]@^VP\>$QP`"```,`0``@^P,:!`G``#H_/___X/$$(#[`W8M
+M#[;+#[96`\'B&`^V1@+!X!`)P@^V1@'!X`@)P@^V!@G"B93/!`(``.LKC78`
+M#[;+#[96`\'B&`^V1@+!X!`)P@^V1@'!X`@)P@^V!@G"B93/!`(``(#[`W83
+M#[;#QX3'``(``!`!``#K$8UV``^VP\>$QP`"```0`0``@^P,:!`G``#H_/__
+M_X/$$(#[`W8M#[;+#[96!\'B&`^V1@;!X!`)P@^V1@7!X`@)P@^V1@0)PHF4
+MSP0"``#K*XGV#[;+#[96!\'B&`^V1@;!X!`)P@^V1@7!X`@)P@^V1@0)PHF4
+MSP0"``!;7E_#D)"04X/L,(M<)#B-1"0N4(U$)#!0C40D,E"-1"0T4(U$)#90
+MC40D.5"-1"0\4(U$)#Y0C40D05"-1"1"4(U$)$50C40D2%"-1"1+4`^W0R10
+MZ/S___^#Q#P/MD0D%U`/MD0D'%"-1"084.C\____:@$/ME0D)XT$TL'@`BG0
+MP>`#4/]S$(V#0`4``%#H_/___X/$(&H!#[9$)!F-!$"-!(#!X`-0_W,0C8-<
+M!0``4.C\____@\00:@$/MD0D&(T$0(T$P(G"P>(%*<+!X@)2_W,0C8-X!0``
+M4.C\____@\00:@$/MT0D(L'@`E#_<Q"-@Y0%``!0Z/S___^#Q!!J`0^W5"0:
+MC035`````"G0P>`$4/]S$(V#0`8``%#H_/___X/$$&H!#[9$)!T/MU0D&@^O
+MPHT$0,'@`E#_<Q"-@_`%``!0Z/S___^#Q!!J`6@``@``_W,0C8,,!@``4.C\
+M____@\00#[9$)!-0:``(``#_<Q"-@\P&``!0Z/S___^#Q!!J`0^V1"0@C02`
+MP>`"4/]S$(V#>`8``%#H_/___X/$$&H!#[9$)"&-%,"-%%#!X@-2_W,0C8.4
+M!@``4.C\____@\00:@$/MT0D'HT$0,'@`U#_<Q"-@[`&``!0Z/S___^#Q!!J
+M`0^W1"0BT>!0_W,0C8/D"```4.C\____@\00:@$/MD0D%]'@4/]S$(V##`D`
+M`%#H_/___X/$$&H!#[9$)!G1X%#_<Q"-@S0)``!0Z/S___^#Q!!J`0^V1"08
+MT>!0_W,0C8-<"0``4.C\____@\00:@$/MD,FT>!0_W,0C8.$"0``4.C\____
+M@\00:@$/MT0D),'@!5#_<Q"-@UP&``!0Z/S___^#Q!!J`?]T)!#_<Q"-@ZP)
+M``!0Z/S____'!"0!````:D`/MT0D,L'@!E#_<Q"-@\@)``!0Z/S___^#Q!1J
+M`6@``0``:``9``#_<Q"-@^P)``!0Z/S___^#Q!1J`6B`````#[=4)#*-!-*-
+M!(*-!$+!X`10_W,0C8,0"@``4.C\____@\04:@%J!`^W1"0XP>`"4/]S$(V#
+M-`H``%#H_/___X/$%&H!:@0/MT0D.L'@`E#_<Q"-@U@*``!0Z/S___^#Q!1J
+M`6H(#[9$)##!X`M0_W,0C8-\"@``4.C\____@\04:@%J"`^W5"0NC022C02`
+MP>`"*=#!X`)0_W,0@<.@"@``4^C\____N`````"#Q$A;PXGV55=64X/L'+T`
+M````BT0D,,9`.0#&0#@`QD`W`,>`7`P```````#&@%D,````N0````"Z$`$`
+M`(M<)#"-@S@+``"-=@"("$!*=?J+1"0P!<P```"+5"0PB8+,````B8+0````
+MB=`%U````(F"U````(F"V````(U`"(F"W````(F"X````(U`"(F"Y````(F"
+MZ````(U`"(F"[````(F"\````(U`$(F"_````(F"``$``(U`"(F"!`$``(F"
+M"`$``(U`\(F"]````(F"^````(/L"(U$)")0C40D)%"-1"0F4(U$)"A0C40D
+M*E"-1"0M4(U$)#!0C40D,E"-1"0U4(U$)#90C40D.5"-1"0\4(U$)#]0#[="
+M)%#H_/___XI$)$>+3"1PB$$NBD0D2(A!+XI$)$F(@<D```!FBT0D4F:)04"+
+M1"189HF!-`L``&:+1"1:2&:)@38+``"#Q$`/MT$D/8"1``!T"SV`E```#X5$
+M"0``BUPD,,9#-03&0RL$QD,V0,9#-`#&@\8````)QD,L`(/L#(G8!4`%``!0
+MZ/S___^)@U@%``"#Q!"[``````^V3"0'C13)P>("*<J-#-4`````ZP2(&$E`
+MA<EU^(/L#(M$)#P%7`4``%#H_/___XM4)$")@G0%``"#Q!"Y``````^V5"0)
+MC112C122P>(#=`:("$!*=?J#[`R+1"0\!7@%``!0Z/S___^+3"1`B8&0!0``
+M@\00NP`````/ME0D"(T44HT4THG1P>$%*=&)RL'B`G0&B!A`2G7Z@^P,BT0D
+M/`64!0``4.C\____BUPD0(F#K`4``(/$$+D`````#[=4)!+!X@)T!H@(0$IU
+M^H/L#(M$)#P%#`8``%#H_/___XM4)$")@B0&``")T`7P!0``B00DZ/S___^+
+M3"1`B8$(!@``B<.)R`5`!@``B00DZ/S___^+5"1`B8)8!@``B<*^`````(/$
+M$&8[="0*<S>+3"0P@<'<````B5I$BD0D#8A"/(M!!(E1!(D*B4($B1`/MD0D
+M#8T$0(T<@X/"<$9F.W0D"G+3@^P,BT0D/`5<!@``4.C\____BTPD0(F!=`8`
+M`(G"O@````"#Q!!F.W0D%',FBTPD,('!Y````,9""`"+002)402)"HE"!(D0
+M@\(@1F8[="04<N2#[`R+1"0\!7@&``!0Z/S___^+7"1`B8.0!@``B<*^````
+M`(/$$(!\)!``="2)V8'![````(M!!(E1!(D*B4($B1"#PA1&9@^V1"009CGP
+M=^2#[`R+1"0\!90&``!0Z/S___^+5"1`B8*L!@``B<*^`````(/$$(!\)!$`
+M="F+3"0P@<'\````BT$$B5$$B0J)0@2)$('"F````$9F#[9$)!%F.?!WX8/L
+M#(M$)#P%L`8``%#H_/___XM,)$")@<@&``")PKX`````@\009CMT)`YS(HM,
+M)#"!P?0```"+002)402)"HE"!(D0@\(81F8[="0.<NB^`````(!\)`<`=$:+
+M?"0P@<<$`0``#[?>@^P,BT0D/`7,!@``4.C\____BU0D0(F$FN0&``"#Q!"+
+M5P2)1P2).(E0!(D"1F8/MD0D!V8Y\'?$@^P,BT0D/`7D"```4.C\____BTPD
+M0(F!_`@``(F!``D``&:+1"0B9HF!!@D``(/$"`^WP%")R`4`"0``4.C\____
+M@\0$BT0D/`4,"0``4.C\____BUPD0(F#)`D``(F#*`D``&8/MD0D%V:)@RX)
+M``"#Q`@/M\!0B=@%*`D``%#H_/___XG8!30)``")!"3H_/___XF#3`D``(F#
+M4`D``&8/MD0D&6:)@U8)``"#Q`@/M\!0B=@%4`D``%#H_/___XG8!5P)``")
+M!"3H_/___XF#=`D``(F#>`D``&8/MD0D&&:)@WX)``"#Q`@/M\!0B=@%>`D`
+M`%#H_/___XG8!80)``")!"3H_/___XF#G`D``(F#H`D``&8/MD,F9HF#I@D`
+M`(/$"`^V0R90B=@%H`D``%#H_/___XG8!:P)``")!"3H_/___XF#Q`D```^V
+M3"08C13)P>(#*<J-%)&-#)5T10``@\00NP````")RH7)=`:(&$!*=?J+5"0P
+MBX+$"0``B0B+7"0PBY/$"0``BD0D"(A"!(/L!`^V1"0,4%'_L\0)``#H_/__
+M_[X`````@\00@'LF`'1Q#[?&C11`P>(#*<*+1"0PC120C:HH`0``B?&(303&
+M104`B8(H`0``QD4*`,9%-`#&11P`QT58`````(V"2`$``(E%((E%)(V"5`$`
+M`(E%+(E%,('"8`$``(E5.(E5/,9%!@)&BUPD,&8/MD,F9CGP=X^+1"0PQD`T
+M`+X`````#[?&BU0D,,:$$!X%``#_1F:#_@-VZKX`````@'PD!P!T?P^WSHM<
+M)#"+DU@%``"-!,G!X`(IR,'@`\9$$",!BY-8!0``QD00(@"+DU@%``#&1!!(
+M_XN36`4``,9$$#[_BY-8!0``9L>$$)```````,>$BY@"````````B<$#BU@%
+M``"-41")41`#@U@%``"#P!")0`1&9@^V1"0'9CGP=X&+1"0P9L>`Q```````
+MO@````"-=@`/M\:+5"0PQH00F`0``/]&9H'^A0!VZ;X`````@'PD"``/A*<`
+M```/M\:+7"0PBXN0!0``C01`C03`B<+!X@4IPL'B`L9$"C``BX.0!0``QD0"
+M,0"+@Y`%``#'1`(,`````(G1`XN0!0``C4$0B4$0B=`#@Y`%``"#P!")0`2)
+MT0.+D`4``(U!&(E!&(G0`X.0!0``@\`8B4`$BX.0!0``B6P""(G1`XN0!0``
+MC4$HB4$H`Y.0!0``@\(HB5($1F8/MD0D"&8Y\`^'6?___XM$)##&@,<```"`
+MO@````"`?"0)`'1T#[?6BTPD,(N!=`4``(T44HT4DL'B`V;'1`(R!`"+@70%
+M``#&1`(F`(N!=`4``,9$`BC_BX%T!0``QD0"-/^)T8M<)#`#BW0%``"-012)
+M012)T`.#=`4``(/`%(E`!(N#=`4``(EL`E1&9@^V1"0)9CGP=XR+1"0PQH#(
+M````@H/L"(M$)#@%Y`D``%"+1"0\!<@)``!0Z/S___^+5"1`B8+@"0``@\0(
+MB=`%"`H``%"-0.10Z/S___^+3"1`B8$$"@``@\0(B<@%+`H``%"-0.10Z/S_
+M__^+7"1`B8,H"@``@\0(B=@%4`H``%"-0.10Z/S___^)@TP*``"#Q`B)V`5T
+M"@``4(U`Y%#H_/___XF#<`H``(/$"(G8!9@*``!0C4#D4.C\____B8.4"@``
+MBU0D0(NZF`H``(NJG`H``(E$)!"^`````(/$$(!\)!``=$Z)TX'#[````(/L
+M#%/H_/___XG"BTPD$(E("(EX#(EH$(/$$(M#!(E3!(D:B4($B1"!P0`(``")
+M#"2!QP`(``"#U0!&9@^V1"009CGP=[J#[`B+1"0X!;P*``!0BT0D/`6@"@``
+M4.C\____BUPD0(F#N`H``(M4)$"+NKP*``"+JL`*``")1"00O@````"#Q!!F
+M.W0D#G-*B=.!P_0```"#[`Q3Z/S___^)PHM,)!")2`B)>`R):!"#Q!"+0P2)
+M4P2)&HE"!(D0@<&,`0``B0PD@<>,`0``@]4`1F8[="0.<KZ#Q!Q;7E]=PU57
+M5E.#[`R+?"0@QD0D"P`/MD0D"XJ,.!X%``"`^?\/A,@````/MM&-!%+!X`,I
+MT(T$AXV0*`$``(E4)`2]`````("X,@$````/A)X```")UH/&.`^VT8T$4L'@
+M`RG0P>`"B00DC78`@^P,5NC\____B<.#Q!"+1@2)7@2),XE#!(D8@WL<`'0;
+M@^P$_W,<_[<D!0``:@7H_/___X!+)`*#Q!"0@^P$4VH"_W0D$.C\____@\00
+M@'M+`'0>@^P,5^C\____QP0D`0```.C\____@\00@'M+`'7B18GHBQ0D.(0Z
+M,@$```^'>_____Y$)`N`?"0+`P^&%/___X/L#%?H_/___X/$'%M>7UW#C78`
+M4X/L"(M,)!2+7"00.5D8=4^`>20(=%R`>20H=%:`>22H=%"`>22(=$J`>20*
+M=$2`>20J=#Z`>22J=#B`>22*=#*-D\P```"+@\P```")2`2)`8E1!(F+S```
+M`.L6C78`C8/,````BU`$B4@$B0&)402)"H/L#%/H_/___X/$&%O#C78`@^P4
+M_W0D'/]T)!SH_/___X/$',-55U93@^P,BUPD)(MT)"B+;"0LOP````!F@7LD
+MX0%U#(I#)H/H$3P!=C.)]HM$)""+$(N*6`4``(VYZ!8!`&:!>Q"%`'<7#[=#
+M$`^VE!"8!```C032P>`"*="-/,'&1@0%@&8%_H`FW[(`9H%[).$!=0J*0R9(
+M/`%W`K(!B-#!X`>*%H/B?PG"B!:*0V:#X`'!X`:#XK\)PH@69H%[).$!=1**
+M0R:#Z!$\`7<(9HEN".L>B?;V0V8!=!*#[`Q7Z/S___]FB48(@\00ZP1FB6X(
+M9HM&"(A#%6:!>R3A`74ABD,F2#P!=P6*4R?K'V:!>R3A`74,BD,F@^@1L@\\
+M`78+L@"#?S``=`.*5TF#X@^*!H/@\`G0B`:#Q`Q;7E]=PY"#[`S_="0<_W0D
+M'/]T)!R+1"0<_S#H_/___X/$',.)]E93BUPD#(LS9HN#,`L``$!FB8,P"P``
+M9CN#-`L``'()9L>#,`L`````#[>+,`L``(N33`H``(M$)!"+`(D$B@^W@S`+
+M``")ABP!``!;7L.055=64XM<)""+?"08#[9L)!R+="04N@````"Y!````(G8
+MC78`B!!`277ZB?J!XO\/``"+`R4`\/__"=")`P^V5@G!X@PE_P_P_PG0B0,/
+MMD8&T>B#X`&#^`$9P(/@`D#!X!V+$X'B____'PG"B1.*0P.#R!"#X/>(0P/V
+M1@8!=!.)ZH/B?\'B%(L#)?__#_@)T(D#6UY?7<-55U93@^P,BVPD((MT)"3'
+M1"0(`````(!^)`AT$X!^)"AT#8!^)*AT!X!^)(AU"9"#3F0*ZQZ)]H!^)`IT
+M$H!^)"IT#(!^)*IT!H!^)(IU!(-.9`)F@7XDX0%U&(I&)H/H$3P!=PZ#3F0(
+MN`````#I.`4``(M&)"7___\`/>$!$``/A0D!``!F@7X0A0`/AXD````/MT80
+M@+PHF`0``/]T>V:#?A!_=R`/MI0HF`0``(N-6`4``(T$TL'@`BG0BT3!*`^V
+M>`3K66:!?A"!`'<I#[=&$`^VA"B8!```BXV0!0``C01`C03`B<+!X@4IPHM$
+MD0@/MG@$ZR@/MT80#[:$*)@$``"+E70%``"-!$"-!("+1,)4#[9X!.L&D+__
+M____B?H/ML(/MIPH'@4``(T$6\'@`RG8C9R%*`$``(N-D`4``(V![`8-`&:!
+M?A"%`'<<#[=&$`^VA"B8!```C01`C03`B<+!X@4IPHT$D?9`-1`/A6T!``#&
+M1A0$BT0D*,<``````+@!````Z1T$``"09H%^$(4`#X>,````#[=&$("\*)@$
+M``#_='YF@WX0?W<C#[:4*)@$``"+C5@%``"-!-+!X`(IT(M$P2@/MG@$ZUR-
+M=@!F@7X0@0!W*0^W1A`/MH0HF`0``(N-D`4``(T$0(T$P(G"P>(%*<*+1)$(
+M#[9X!.LH#[=&$`^VA"B8!```BY5T!0``C01`C02`BT3"5`^V>`3K!I"_____
+M_[G_````9H%^$(4`=PT/MT809@^VC"B8!```B?H/ML(/MIPH'@4``(T$6\'@
+M`RG8C9R%*`$```^WT8T$TL'@`BG0BY58!0``C03"B40D"&:!?B3A`74)BD8F
+M2#P!=BV09H'Y_P!T"HM$)`CV0",$=1O&1A0&BU0D*,<"`````+@!````Z?<"
+M``"-=@"+5"0(#[9"(*@!=""H!'0<BD4L.D4V<A2+1"0HQP`!````N`$```#I
+MR`(``(-\)`@`#X3Q````BU0D"`^V0B"H`0^$X0```*@$#X39````@^P(5E+H
+M_/___X/$$(3`=1C&1A0$BT0D*,<``````+@!````Z7P"``"+5"0(@'I+'W84
+MBT0D*,<``0```+@!````Z5X"``#V1F8!=`;V0P@!=!CV1F8!=0;V0P@!=0R`
+M?A2!=`;V0P@(="J#[`B)^@^VPE!5Z/S___^#Q!"$P'04BT0D*,<``0```+@!
+M````Z1`"``#V1F8!#X1^`0``]D,(`0^$=`$``(/L#/]T)!3H_/___X/$$&:#
+M^!\/AEL!``"+5"0HQP(!````N`$```#ISP$``(UV`/9#!@)T,HM&)"7___\`
+M/>$!$`!T(XM4)`B*0DLZ0DIR%XM$)"C'``$```"X`0```.F7`0``C78`BT8D
+M)?___P`]X0$0``^$^0```(M4)`@/MT(VB<+1ZH/B`;$!@'XDX0^%W@```(!^
+M)0$/A=0````/MD8F@^@&@_@)#X>L````_R2%A!````^VP5!J`595Z/S___^#
+MQ!"$P`^%I0```(M$)"C'``(```"X`0```.D9`0``#[;!4&H`5E7H_/___X/$
+M$(3`=7V+5"0HQP("````N`$```#I\0```&H!#[;"4%95Z/S___^#Q!"$P'55
+MBT0D*,<``@```+@!````Z<D```!J``^VPE!65>C\____@\00A,!U+8M4)"C'
+M`@(```"X`0```.FA````D,9&%`2+1"0HQP``````N`$```#IB````(/L#(V%
+M``D``%#H_/___X/$$(3`=!*+5"0HQP(!````N`$```#K89"`?B3A=5*`?B4!
+M=4R`?B8/=4:`?BD!=4!F#[9&*,'@"&8/ME8G`="#[`@/M\!05>C\____@\00
+M.49(=02%P'48QD84!(M$)"C'``````"X`0```.L+C78`N`````"-=@"#Q`Q;
+M7E]=PU93BUPD#(MT)!"Y`````+H-````B?")]H@(0$IU^HI#)8@&BD,FB$8!
+MBD,GB$8"BD,HB$8#BD,IB$8$BD,JB$8%BD,KB$8&]D-F!'0>BD,LB$8(BD,M
+MB$8)BD,NB$8*BD,OB$8+BD,PB$8,N`$```!;7L.055=64XML)!2+?"08N@``
+M``"^`````(GVN0<````/MAPWC78`T>*)V-/XJ`%T$O?"`````74:@?)W)]L`
+MZQ*)]O?"`````70(@?)W)]L`B?9)>=%&@_X'?K^)T,'H$(A%`(G0P>@(B$4!
+MB%4"6UY?7<.-=@!55U93@^Q@BVPD>(M$)'2+@"@*``")1"0@QT0D&`````#'
+M1"04`````,=$)!``````QT0D#`````!FQT4>_P^-1"1`4%7_="1\Z/S___^#
+MQ!"$P'0)BT0D/.G?#```BT4D)?___P`]X0$0``^%(P$``(/L#&B($P``Z/S_
+M__^#Q!!F@7T0A0`/AYL````/MT40BU0D<("\$)@$``#_#X2%````9H-]$']W
+M(P^VE!"8!```BUPD<(N+6`4``(T$TL'@`BG0BT3!*(I`!.M=9H%]$($`=RP/
+MMT40BW0D<`^VA#"8!```BXZ0!0``C01`C03`B<+!X@4IPHM$D0B*0`3K*0^W
+M11"+5"1P#[:$$)@$``"+DG0%``"-!$"-!("+1,)4BD`$ZP2)]K#_#[;`BUPD
+M<`^VA!@>!0``B40D&(T$0,'@`RM$)!B-A(,H`0``B40D&(N+D`4``&:!?1"%
+M`'<E#[=%$`^VA!B8!```C01`C03`B<+!X@4IPHT4D8E4)!#IA0$``('![`8-
+M`(E,)!#I=@$``+O_````9H%]$(4`=Q$/MT40BW0D<&8/MIPPF`0``&:!?23A
+M`74.BD4F@^@1/`$/AND```!F@7T0A0`/AYD````/MT40BU0D<("\$)@$``#_
+M#X2#````9H-]$']W(P^VE!"8!```BW0D<(N.6`4``(T$TL'@`BG0BT3!*(I`
+M!.M;9H%]$($`=RP/MT40BU0D<`^VA!"8!```BXJ0!0``C01`C03`B<+!X@4I
+MPHM$D0B*0`3K)P^W11"+3"1P#[:$")@$``"+D70%``"-!$"-!("+1,)4BD`$
+MZP*P_P^VP(MT)'`/MH0P'@4``(E$)!B-!$#!X`,K1"08C82&*`$``(E$)!@/
+MM].-!-+!X`(IT(N66`4``(T$PHE$)!3K(0^WPXT$0(T$@(M,)'"+D70%``"-
+M!,*)1"0,BW!4B70D&&:!?23A`741BE4FC4+O/`%V)HU"_SP!=A]F@?O_`'0*
+MBT0D%/9`(P1U#L9%%`:X`````.DS"@``@^P(C40D0%#_="1\Z/S___]FB40D
+M,&:)11Z#Q`3_="1\Z/S___^)1"04@\00N`(```"#?"0$``^$]@D``(M4)`2)
+M550/MT0D((T<P(T<F(T<6,'C!`-<)!R)V(M,)'`K@2@*``"#P""9B<:)UP.Q
+M+`H``!.Y,`H``(M$)#B)<""+3"0XB7DDBT0D!(MP#(MX$(M$)#B)<"B+3"0X
+MB7DLBT0D.(M4)"!FB5`(N0````"ZL`0``(G8C78`B`A`2G7Z9H%]).$!=6V*
+M12:#Z!$\`7=CC40D0%"+1"0\#[9`"%!5_W0D(.C\____@\00#[=4)""-!-*-
+M!(*-!$+!X`0#1"0<BTPD<"N!*`H```4@!```F8G&B=<#L2P*```3N3`*``"+
+M1"0XB7`0BTPD.(EY%.FL`0``BW0D&/9&!@%U*XM%)"7___\`/>$!$``/A`P!
+M``"+5"04#[9"(*@!#X3\````J`0/A/0```#V168@=!"-1"1`4%7H_/___X/$
+M".L;C40D0%"+1"0\#[9`"%!5_W0D(.C\____@\00#[=4)""-!-*-!(*-!$+!
+MX`0#1"0<BTPD<"N!*`H```4@!```F8G&B=<#L2P*```3N3`*``"+1"0XB7`0
+MBTPD.(EY%&:!?23A`74.BD4F@^@1/`$/ANT```"+="04#[9&(*@"#X3=````
+MJ`0/A-4```"H`0^$S0````^W5"0@C032C02"C01"P>`$`T0D'(M4)'`K@B@*
+M``"9B<:)UXM,)'`#L2P*```3N3`*``"+1"0XB7`8BTPD.(EY'.F&````C78`
+MBUPD&/9#!@)T>0^W1"0@C0S`C0R(C0Q(P>$$`TPD'(G(BW0D<"N&*`H``)F)
+MQHG7BUPD<`.S+`H``!.[,`H``(M$)#B)<!B+7"0XB7L<BW0D<"N.*`H``('!
+M(`0``(G(F8G.B=>+3"1P`[$L"@``$[DP"@``BT0D.(EP$(M,)#B)>12+1"0X
+M@$@!`F8/ME4]BT0D.&:)4`*^`````(!]/0!T+HT4=L'B`HG3BT0D!`-8"(M-
+M1(L$"HD#BT0*!(E#!(M$"@B)0PA&#[9%/3GP=]*+52"+1"0XB5`,9H%]).$!
+M=4Z*12:#Z!$\`7=$#[=<)"!3_W0D/%7_="0DZ/S___^-1"104(T$VXT$@XT$
+M0\'@!`-$)#!05?]T)#3H_/___XM4)#B`8@C^@\0@Z7,%``"+3"08]D$&`@^$
+M\@0``(M$)#C&0`;^BT0D.(!@!_Z#?"04``^$Y@```(M<)!0/MD,@J`(/A-8`
+M``"H!`^$S@```*@!#X3&````#[=$)"!0_W0D/%51Z/S___^#Q!#V168!=`^+
+M1"0X9HM`",'@`XA$)$&-1"1`4`^W5"0DC032C02"C01"P>`$`T0D(%!5_W0D
+M).C\____@\00]D5F`70*BW0D&(!."`'K"(M$)!B`8`C^#[=$)""-#,"-#(B-
+M#$C!X02+5"0<Q@01H8M<)!2*D[(```"#X@^+="0<BD0Q`8/@\`G0B$0Q`6:+
+M0QA`#[;0P>((#[;$"=!FB40Q`H'#G````(E<)`CIP@,``(GV9H%]).$!#X60
+M`@``#[9%)H/X#W0.@_@0#X3B````Z9T#``!F#[95*,'B"&8/MD4G`<*+1"0X
+MQD`$#8M$)#B`8`7^@$PD-PB+7"0X#[9%%8MT)'`/MH[&````T^!F"4,(BTPD
+M.(I!`8/@'X/(((A!`0^W1"0@C0S`C0R(C0Q(P>$$BT0D'(T<`8M%*HF#.`0`
+M`(M%+HF#/`0```^VPL'@"`^VU@G"BW0D'&:)E#%$!```BD4IB(0Q0@0``,8#
+MD8M4)!1FBT(80`^VT,'B"`^VQ`G09HE$,0*+7"04BI.R````@^(/BD0Q`8/@
+M\`G0B$0Q`8'#G````(E<)`CIP`(``(M4)#@/MD45BW0D<`^VCL8```#3X&8)
+M0@@/MT0D((T4P(T4D(T44,'B!(M$)!S&!`*!9L=$`@+__XM<)!"*BXL```"#
+MX0^+="0<BD0R`8/@\`G(B$0R`8-]-`!U#L9%%"&X`````.DJ!```]D4G`71-
+M@WTX`'1'BT4XB40D"`^W1"0@C1S`C1R8C1Q8P>,$@^P(_W0D$(M4)'S_LL0)
+M``#H_/___X/@#XM,)"R*5`L!@^+P"<*(5`L!@\00ZPB+7"00B5PD"+L$````
+MBU4T#[9"`3V3````=VW_)(6L$```@\,$ZV&#PP3K7(/#".M7@\,(ZU*#PPCK
+M38/#".M(@\,(ZT.#PPCK/H/#&.LY@\,8ZS2#PPSK+X/#".LJ#[9:!(T<G0@`
+M``#K'8'#B````.L5@\,DZQ"#PR3K"X/#).L&@<.(````C5,#P>H"BT0D.(A0
+M!(M,)#AFP>H(@^(!BD$%@^#^"="(004/MU0D((T$THT$@HT$0L'@!(MT)!R-
+MA#`@!```@^P$4_]U-%#H_/___X/$$.DF`0``B?8/MD4D@^@$/:L```!W-/\D
+MA?P2```/MD4LP>`(#[95+8U$$/V#^`IW#_\DA:P5``"+1"0X@$@!!(M$)#B`
+M2`$!ZPB+1"0X@&`!^XM$)#C&0`0-BT0D.(!@!?Z+5"0X#[9%%8M<)'`/MHO&
+M````T^!F"4((BT0D.(!@`1\/MT0D((T<P(T<F(T<6,'C!(MT)!S&A#,@!```
+M!HM\)!2!QYP```!7B=X#="0@C88A!```4.C\____5XV&)00``%#H_/___XV6
+M1`0``(M%)(F&1`0``(M%*(E"!(M%+(E""(M%,(E"#,8&D8M$)"2*D+(```"#
+MX@^+3"0LBD0+`8/@\`G0B$0+`8/$$(MT)!1FBT880`^VT,'B"`^VQ`G09HE$
+M"P*)?"0(@WPD"``/A)D````/MU0D((T$THT$@HT$0L'@!`-$)!R+3"0(BQ&)
+M4`2+402)4`CK<XM<)!CV0P8!=&D/MT0D(%#_="0\55/H_/___X/$$/9%9@%T
+M#XM$)#AFBT`(P>`#B$0D08U$)$!0#[=4)"2-!-*-!(*-!$+!X`0#1"0@4%7_
+M="0DZ/S___^#Q!#V168!=`J+="08@$X(`>L(BT0D&(!@"/X/MUPD((M4)'"+
+M@JP%``")+)B+5"0@9L'J!0^WTHM,)""#X1^X`0```-/@BTPD<`F$D;`%``"+
+M120E____`#WA`1``=2N-1"0T4&H`4_]T)"3H_/___XM$)$0E____'PT```!`
+MB40D1(/$$.FK````9H%]).$!=3R*12:#Z!$\`7<R@^P(_W0D%/]T)'SH_/__
+M_XU$)$10BUPD(`^V0S10#[=$)#A0_W0D-.C\____@\0@ZV>#[`C_="0<_W0D
+M?.C\____C40D1%"+="0H#[9&/E`/MT0D.%#_="0TZ/S___\/MD8@@\0@J`)T
+M+Z@$="NH`70GBT0D-"7___\?#0```&")1"0T#[96/H/B?\'B%"7__P_X"=")
+M1"0TC40D-%#_="1TZ/S___^#Q`BX`P```(/$7%M>7UW#C78`55=64X/L!(ML
+M)!B+5"0<BUT`B=!FP>@%#[?PB=&#X1^X`0```(G'T^>%?+-$=2V)X%!J``^W
+MPE!5Z/S___^!3"00````X(U$)!"`8`/W4%/H_/___PE\LT2#Q!B#Q`1;7E]=
+MPU575E.#[`R+?"0@BW0D)(M&3(MH'&:!?A"%``^'GP````^W1A"`O#B8!```
+M_P^$C0```&:#?A!_=R8/MI0XF`0``(N/6`4``(T$TL'@`BG0BT3!*`^V0`0%
+M$`4``.MFD&:!?A"!`'<N#[=&$`^VA#B8!```BX^0!0``C01`C03`B<+!X@4I
+MPHM$D0@/MD`$!1`%``#K+P^W1A`/MH0XF`0``(N7=`4``(T$0(T$@(M$PE0/
+MMD`$!1`%``#K"(UV`+@/!@``#[9<!PZ-!%O!X`,IV(V<AR@!``"#?E``=!&#
+M[`C_=E!7Z/S___^#Q!")]H/L"%97Z/S___^#Q`A54_^5G````(/$'%M>7UW#
+MC78`55=64X/L&(ML)"R+10")1"04C5TL4^C\____B<>#[R"#Q`3_="04Z/S_
+M__^)QH/$$(U'((M3!(E#!(E?((E0!(D"N`$```"%]G1TC58\QD8DX<9&)0'&
+M1B80@$XG`8M,)"2+@9P```")1DB+1DR)2!R)R`60````B48XQD85S&8/MD<S
+M9HE&$(M%`(E&&,=&()````")3C3'1FP`?@,`@^P(:@!2Z/S___^#Q`A6_W0D
+M%.C\____N`````"#Q!"#Q`Q;7E]=PY!55U93@^P,BWPD)(MT)""+1BB)1"0(
+MBRAFBT\>B<AFP>@%#[?8@^$?N`$```#3X(5$G40/A6,#``"+50"-!)T``P``
+MB8)P`0``BT4`BX!T`0``HP````")PL9'%"&+1R0E____`#WA`0\`=2"#[`AJ
+M`%?H_/___X/$#&H`5U7H_/___X/$$.D1`P``D&:+3QZ#X1^X`0```-/@A<)T
+M%H/L"&H!5^C\____B2PDZ/S___^#Q!`/MH:P````@_@$#X?8`@``_R2%V!4`
+M`,:&L`````&#[`1J`5?_="04Z/S___^#Q!#ILP(``,:&L`````*#[`1J"%?_
+M="04Z/S___^#Q!#IE0(``,:&L`````.#[`16:B'_="04Z/S___^#Q!"#?BP`
+M=""#[`QJ`&H!#[9&25#_=BS_="0DZ/S___^#Q"#I5@(``(/L!&H`BU0D$`^V
+M0@E05>C\____@\00Z3H"``#&AK`````$@WXL`'0Q@^P$5FHA_W0D%.C\____
+MQP0D`````&H"#[9&25#_=BS_="0DZ/S___^#Q"#I_`$``(/L!&H`:B'_="04
+MZ/S___^#Q`QJ`8M4)!`/MD()4%7H_/___X/$$.G0`0``@^P$5FH&_W0D%.C\
+M____@\00@WX<`'05BT8<BT@$C5$!B5`$@_D%#X:C`0``QD8C`<9&(@"`?DL`
+M=!^0@^P,5>C\____QP0D`0```.C\____@\00@'Y+`'7B@WXL`'03BU8,BT8(
+MB5`$B0*+1BS^2##K%8-^,`!T#XM6,`^V1DG'1((\`````(M6!(L&B5`$B0*+
+M1"0(_D@*@[[@`````'0;@^P$:@$/MH;5````4/^VX````.C\____@\00@WXL
+M`'05@^P$:@$/MD9)4/]V+.C\____@\00@WX<`'1YBT8<QT!@`````/Z%5PP`
+M`(/L#%7H_/___X/$#&H!BT8<#[9``5!5Z/S___^#Q`R+1AP/MD`"4(M&'`^V
+M0`%0:'<!``#H_/___X/$#/]V'/^U)`4``&H!Z/S___^#Q`S_=AS_M20%``!J
+M!NC\____QT8<`````(/$$(/L"%95Z/S___^#Q!"+5"0(@'H%_W1BOP````"`
+M>@H`=D&)TX/#.(GV@^P,4^C\____B<:#Q!"+0P2)<P2)'HE&!(DP@'XB_W4.
+M1XGXBU0D"#A""G?3ZPN)^(M4)`@X0@IW%HM$)`C&0`7_@^P(4%7H_/___X/$
+M$)"#Q`Q;7E]=PU575E.#[`R+7"0DBW0D((M^*(LOQT0D"`````#V1P@0=`?&
+MAK`````&#[:&L````(/X`0^$@P```(/X`7\*A<!T'>G)`P``D(/X!`^$FP``
+M`(/X!@^$Z@$``.FQ`P``QH:P`````8/L"%95Z/S____&0Q2!@$\("(/$$(-[
+M5`!T$(/L"(U#5%!5Z/S___^#Q!"-E<P```"+A<P```")6`2)`XE3!(F=S```
+M`(/L#%7H_/___X/$$.E4`P``@&<(]_Z&LP```,:&L`````#&0Q0"@^P(4U7H
+M_/___XDL).C\____@\00Z24#``"0QH:S`````(-^'``/A$<!``"+1AR+2`2-
+M40&)4`2#^04/AS(!``"`9PCW@WM4`'00@^P(C4-44%7H_/___X/$$(V5S```
+M`(N%S````(E8!(D#B5,$B9W,````@$\($(-^+`!T'8/L#&H`:@(/MD9)4/]V
+M+%?H_/___X/$(.FC`@``QD0D!P"`?PH`#X:Q````C4<XB00DB?:#[`S_="0,
+MZ/S___^)PX/$$(L4)(M"!(E:!(D3B4,$B1B#>QP`=!V#[`3_<QS_M20%``!J
+M!>C\____@$LD`H/$$(UV`(/L!%-J!E?H_/___X/$$(![2P!T/XM$)`C_1"0(
+M/7^6F`!W,(/L#%7H_/___\<$)`$```#H_/___X/$$(![2P!T$HM$)`C_1"0(
+M/7^6F`!VTXUV`/Y$)`>*1"0'.$<*#X=7____QD8B`X/L"%95Z/S___^#Q!#I
+MS0$``)"-E<P```"+A<P```")6`2)`XE3!(F=S````(-^'`!T%8M&'(M(!(U1
+M`8E0!(/Y!0^&>@$``(/L#&BP!0``Z/S___^#Q`Q6:@97Z/S____^3PJ#Q!"+
+M5@2+!HE0!(D"@WXL`'04BT8L_D@PBU8,BT8(B5`$B0+K&9"#?C``=!*+5C`/
+MMD9)QT2"/`````"-=@"`?DL`=$*+1"0(_T0D"#U_EI@`=S.-=@"#[`Q5Z/S_
+M___'!"0!````Z/S___^#Q!"`?DL`=!*+1"0(_T0D"#U_EI@`=M.-=@"+5@2+
+M!HE0!(D"@[[@`````'0=@^P$:@$/MH;5````4/^VX````.C\____@\00B?:#
+M?BP`=!:#[`1J`0^V1DE0_W8LZ/S___^#Q!"0@WX<`'1VBT8<QT!@`````/Z%
+M5PP``(/L#%7H_/___X/$#&H!BT8<#[9``5!5Z/S___^#Q`R+5AP/MD("4`^V
+M0@%0:'<!``#H_/___X/$#/]V'/^U)`4``&H!Z/S___^#Q`S_=AS_M20%``!J
+M!NC\____QT8<`````(/$$(/L"%95Z/S___^#Q!#K$8/L!%9J`E?H_/___X/$
+M$(GV@^P,5>C\____@\00@\0,6UY?7<-55U93@^P,BUPD)(M\)""+;U2+=0#V
+M10@0=`3&1S4&#[9'-8/X`0^$@0```(/X`7\+A<!T'NE:`P``B?:#^`0/A)$`
+M``"#^`4/A(8!``#I00,``,9'-0&#[`A75NC\____QD,4@8!-"`B#Q!"#>U0`
+M=!"#[`B-0U105NC\____@\00C9;,````BX;,````B5@$B0.)4P2)GLP```"#
+M[`Q6Z/S___^#Q!#IYP(``(!E"/?^1S;&1S4`QD,4`H/L"%-6Z/S___^)-"3H
+M_/___X/$$.F^`@``@&4(]X-[5`!T$(/L"(U#5%!6Z/S___^#Q!"-ELP```"+
+MALP```")6`2)`XE3!(F>S````(/L!&H`:@95Z/S___^#Q`QJ`0^V10E05NC\
+M____QD0D&P"#Q!"`?0H`#X:"````C7TX@^P,5^C\____B<.#Q!"+1P2)7P2)
+M.XE#!(D8@WL<`'0;@^P$_W,<_[8D!0``:@7H_/___X!+)`*#Q!"0@^P$4VH&
+M5>C\____@\00@'M+`'0AC78`@^P,5NC\____QP0D`0```.C\____@\00@'M+
+M`'7B_D0D"XI$)`LX10IW@<9%!0"`30@0@^P,5>C\____@\00Z<`!``"`90CW
+M@WM4`'00@^P(C4-44%;H_/___X/$$(V&S````(N6S````(E:!(D3B4,$B9[,
+M````C44XB<(Y13@/A.@```")1"0$B?:#[`Q2Z/S___^)PX/$$(-X'`!T'(/L
+M!/]P'/^V)`4``&H%Z/S___^`2R0"@\00B?:#[`13:@95Z/S___^#Q!"`>TL`
+M="&-=@"#[`Q6Z/S____'!"0!````Z/S___^#Q!"`>TL`=>*#>QP`=%R+0QS'
+M0&``````_H97#```@^P,5NC\____@\0,:@&+0QP/MD`!4%;H_/___X/$#/]S
+M'/^V)`4``&H!Z/S___^#Q`S_<QS_MB0%``!J!NC\____QT,<`````(/$$(/L
+M"%-6Z/S___^#Q!"+5"0$.54X#X4>____@^P$:@!J!E7H_/___X/$"%=6Z/S_
+M___'12@`````BP:+D%@!``")%0````"#Q!"%TG0(BP:)D%@!``#V108!=%7&
+M1"0+`(!^*P!V&@^V50F)T(I,)`O3^*@!=0I!B$PD"SA.*W?J@^P(#[9<)!-3
+M5NC\____@\0(55;H_/___XG8P>`$`=C'A(8\"P```````(/$$(GV@\0,6UY?
+M7<-55U93@^P4BWPD*(M'*(E$)`R+&%=3Z/S___^#Q!"`O[,````!=@?&A[``
+M```$C7<0.7<0#X0F`@``@^P,5NC\____B40D&(/$$(M'$(M4)`B)4`2)`HER
+M!(E7$+T`````Z<,!``")]@^WU8N#K`4``(LTD(7V#X2L`0``9HM'&&8[1A`/
+MA9X!```/MY,R"P``BX-P"@``.1!T3Y!"#[>#-@L``#G0=P6Z`````(N#<`H`
+M`(M$D`2I```(`'4B)?\/``!F.<5U&#ET)`AU'(/L#%/H_/___X/$$.F!`0``
+MD(N#<`H``#D0=;*+3"0$@'DT``^%,`$``&:!?A"%``^')`$```^W1A"`O!B8
+M!```_P^$$@$``(7_#X3R````#[9'(*@!#X3F````J`0/A-X```"+$V:+1AYF
+MP>@%#[?`C02%``,``(F"<`$``&:+3AZ#X1^Z`0```(G0T^")P8L#B8AT`0``
+M#[=.'HN#K`4``,<$B`````!FBTX>B<AFP>@%#[?`B00D@^$?B=#3X(G!]]&+
+M!"0AC(.P!0``9HM.'HG(9L'H!0^WP(/A']/B]](A5(-$.W0D"'0ZBU8$BP:)
+M4`2)`H-^5`!T$(/L"(U&5%!3Z/S___^#Q!"-D\P```"+@\P```")<`2)!HE6
+M!(FSS````(/L"`^W1AY0C8,`"0``4.C\_____D]+@\00ZQB+5"0$]D(&`G0.
+M@^P(5E?H_/___X/$$)!%9CEK0`^'-?[__X7_="D/MD<@J`%T(:@$=!V+3"0(
+MBU$$BP&)4`2)`H/L"%%7Z/S___^#Q!")]H/$#%M>7UW#55=64X/L%(M\)"B+
+M1U2)1"0,BQA74^C\____@\00@'\V`78$QD<U!(UW%#EW%`^$W`$``(/L#%;H
+M_/___XE$)!B#Q!"+1Q2+5"0(B5`$B0*)<@2)5Q2]`````.F!`0``#[?5BX.L
+M!0``BS20A?8/A&P!``!FBT<D9CM&$`^%7@$```^WDS(+``"+@W`*```Y$'1/
+MD$(/MX,V"P``.=!W!;H`````BX-P"@``BT20!*D```@`=2(E_P\``&8YQ748
+M.70D"'4<@^P,4^C\____@\00Z3D!``"0BX-P"@``.1!ULF:!?A"%``^'\@``
+M``^W1A"`O!B8!```_P^$X````(M,)`2`>30`#X72````]D$&`0^$R````(L3
+M9HM&'F;!Z`4/M\"-!(4``P``B8)P`0``9HM.'H/A'[H!````B=#3X(G!BP.)
+MB'0!```/MTX>BX.L!0``QP2(`````&:+3AZ)R&;!Z`4/M\")!"2#X1^)T-/@
+MB<'WT8L$)"&,@[`%``!FBTX>B<AFP>@%#[?`@^$?T^+WTB%4@T0[="0(="2+
+M5@2+!HE0!(D"C9/,````BX/,````B7`$B0:)5@2)L\P```"#[`@/MT8>4(V#
+M``D``%#H_/____Y/*8/$$(GV168Y:T`/AW7^__^+5"0$]D(&`70;BTPD"(M1
+M!(L!B5`$B0*#[`A15^C\____@\00@\0,6UY?7<-55U93@^P,BWPD(,=$)`@`
+M````C8?,````B<(YA\P````/A,\!``")Q8UV`(/L#(G64NC\____B<.#Q!"#
+M>$P`=2Z#[`Q7Z/S___^)0TR#Q!"%P'4;BX?,````B5@$B0.)<P2)G\P```#I
+MB`$``(GVBT,D)?___P`]X0$0``^$\0```&:!>Q"```^$Y0```&8/MD,09HE#
+M$&:#^']V$F:!>R3A`74BBD,F@^@1/`%W&&:!>Q"%`'<0#[=#$("\.)@$``#_
+M=1J)]L9#%`:#[`A35^C\____@\00Z0H!``")]F:!>R3A`74,BD,F@^@1/`%V
+M-XGVBX]8!0``9H%[$(4`=QT/MT,0#[:4.)@$``"-!-+!X`(IT(T$P8E$)`CK
+M"H'!Z!8!`(E,)`AF@7LDX0%U"XI#)D@\`78[C78`9H%[$(``=#!F@7LDX0%U
+M"HI#)H/H$3P!=AZ+1"0(]D`C!'44QD,4!H/L"%-7Z/S___^#Q!#K=9"#[`A3
+M5^C\____@\00@_@"=PJ#^`%S'.L+C78`@_@#=$3K49"#[`A35^C\____@\00
+MZT&#>U0`=!"#[`B-0U105^C\____@\00C9?,````BX?,````B5@$B0.)4P2)
+MG\P```#K'8/L"%-7Z/S___^#Q!")]HGJ.:_,````#X4V_O__@\0,6UY?7<.)
+M]E575E.#[#R*1"14B$0D(`^VR(G*P>($`<J+7"10C123BX(\"P``B40D'+C^
+M____T\`B@ED+``"(1"0;BQ.)5"04QT0D$`````"`?"0@`W8,QX)P`0``Q`$`
+M`.L.BTPD%,>!<`$``*@!``"+7"04BX-T`0``HP````"*3"0@@^$#NP<```#3
+MXXG&"=Z+1"04B;!T`0``@^P,:.@#``#H_/____?3(=Z+5"0DB;)T`0``@\00
+M@'PD(`-V%0^V1"0@BX2"T`$``*,`````B<;K%P^V1"0@BTPD%(N$@=`!``"C
+M`````(G&@\X(@'PD(`-V$@^V1"0@BUPD%(FT@]`!``#K$`^V1"0@BU0D%(FT
+M@M`!``"`?"0@`W86#[9$)""+3"04QX3!``(``#@```#K%`^V1"0@BUPD%,>$
+MPP`"```X````@^P,:!`G``#H_/___X/$$(!\)"`#=A8/MD0D((M4)!3'A,($
+M`@```````.L4#[9$)""+3"04QX3!!`(```````"#?"0<``^$;0@``+\`````
+MBUPD4(![*P!V-HGVBU0D'`^V0@F)^P^VR]/XJ`%T%8/L!&H!4?]T)%SH_/__
+M_X/$$(UV`$>)^(M4)%`X0BMWS(M,)!SV008!='N#[`A1_W0D7.C\____@\0(
+M#[9<)"A3_W0D7.C\____B=C!X`0!V(M<)&"-%(.+@EP+``"#Q!"I```0`'0+
+M)?__[_^)@EP+``"#[`C_="0D_W0D7.C\____#[94)#")T,'@!`'0BU0D8,>$
+M@CP+````````@\00Z:,'``"+3"0<@'DT`'0=@^P(48M<)%S_L\0)``#H_/__
+M_XM$)"S^2#2#Q!"`?"0;``^$E`(``,=$)`P`````QD0D"P"#[`@/MEPD*%/_
+M="1<Z/S___^)V,'@!`'8BTPD8(T4@8N"7`L``(/$$*D``!``=`LE___O_XF"
+M7`L``(I<)!N+1"0<B%@)OP````"+5"10@'HK``^&80$```^VZXG[#[;+B>C3
+M^*@!#X0]`0``B<C!X`0!R(I4)!N+7"10B)2#60L``(GX/`-V$8M4)!3'A,H`
+M`@``.````.L4B?D/ML&+7"04QX3#``(``#@```"#[`QH$"<``.C\____@\00
+MB?@\`W80#[;`BU0D%(FLP@0"``#K$(GY#[;!BUPD%(FLPP0"``")^#P#=A"+
+M5"04QX)P`0``Q`$``.L.BTPD%,>!<`$``*@!``"+7"04BX-T`0``HP````")
+M^8/A`[L'````T^.)Q@G>BT0D%(FP=`$``(/L#&CH`P``Z/S____WTR'>BU0D
+M)(FR=`$``(/$$(GY@/D#=A,/ML&+A(+0`0``HP````")QNL7B?L/ML.+5"04
+MBX2"T`$``*,`````B<:#S@B)^8#Y`W80#[;!BUPD%(FT@]`!``#K$(GZ#[;"
+MBTPD%(FT@=`!``!'B?N+1"10.%@K#X>B_O__BT0D'(/`+(G"BTPD'#E!+'0W
+M@^P,B=-2Z/S___^-4.")5"0<@\00BU,$B4,$B1B)4`2)`HM,)`R#>0P`=`N)
+MVHM$)!PY6"QUR8-\)`P`=$>+5"0,QD(R`+\`````BTPD4(!Y*P!V,(M<)!P/
+MMD,)B?G3^*@!=!0/MD0D"XM<)`R(3!A`_D,R_D0D"T>)^(M4)%`X0BMWT(/L
+M!&H`:($```#_="0HZ/S___\/ME0D,(G0P>`$`="+3"1@QX2!/`L```````"#
+MQ!#IU`,``(/L!&H`:@;_="0HZ/S___^#Q`@/MEPD*%/_="1<Z/S___^)V,'@
+M!`'8BUPD8(T4@XN"7`L``(/$$*D``!``=`LE___O_XF"7`L``(M$)!R#P"R)
+MPHM,)!PY02P/A!<"``")1"0$@^P,4NC\____C6C@@\00C5`(.5`(#X30`0``
+MD(/L#(U%*%#H_/___XUP^(/$$(!^(0UU'(/L"`7X````4(M&*(L`_W`4Z/S_
+M__^#Q!"-=@"+5@2+!HE0!(D"@'Y+`'0A@^P,_W0D7.C\____QP0D`0```.C\
+M____@\00@'Y+`'7?@WX<``^$.@$``(M&',=`8`````"`?DL`#X2>````OP``
+M``"+7"109H-[0``/A(H```"0BU0D4(N"K`4``(L<N(7;=&=FBT,09CM&&'5=
+M9CV%`'=7#[?`@+P0F`0``/]T2HG1BQ)FBT,>9L'H!0^WP(T$A0`#``")@G`!
+M``"+$6:+2QZ#X1^X`0```-/@B8)T`0``QD,4(8/L!&H`4_]T)%SH_/___X/$
+M$(GV1XM<)%`/MT-`.?@/CW?____V1B0$=2V+1"10_H!7#```@^P,4.C\____
+M@\0,:@&+1AP/MD`!4/]T)%SH_/___X/$$)"#[`2+1AP/MD`"4(M&'`^V0`%0
+M:'<!``#H_/___X/$#/]V'(M4)%C_LB0%``!J`>C\____@\0,_W8<BTPD6/^Q
+M)`4``&H&Z/S____'1AP`````@\00BUPD'/Y+"OY-,(/L"%;_="1<Z/S___^#
+MQ!"-12@Y12@/A3'^__^+1"0<_D@<@^P(5?]T)%SH_/___X/$$(M4)`2+3"0<
+M.5$L#X7M_?__BT0D'(/`.(G"BUPD'#E#.`^$&`$``(G#@^P,4NC\____B<:#
+MQ!"`>$L`=$&+1"00_T0D$#U_EI@`=S*)]H/L#/]T)%SH_/___\<$)`$```#H
+M_/___X/$$(!^2P!T#XM$)!#_1"00/7^6F`!VT(-^'``/A)$```"+1AS'0&``
+M````]D8D!'4LBT0D4/Z`5PP``(/L#%#H_/___X/$#&H!BT8<#[9``5#_="1<
+MZ/S___^#Q!"#[`2+1AP/MD`"4(M&'`^V0`%0:'<!``#H_/___X/$#/]V'(M4
+M)%C_LB0%``!J`>C\____@\0,_W8<BTPD6/^Q)`4``&H&Z/S____'1AP`````
+M@\00BT0D'/Y("H/L"%;_="1<Z/S___^#Q!")VHM,)!PY63@/A>K^__^#[`C_
+M="0D_W0D7.C\____#[94)#")T,'@!`'0BUPD8,>$@SP+````````@\00OP``
+M``"+1"10@'@K``^&]@```(GV#[9$)!N)^=/XJ`%U"CI,)"`/A<T```")^X#[
+M`W80BT0D%,>`<`$``,0!``#K#HM4)!3'@G`!``"H`0``BTPD%(N!=`$``*,`
+M````B?F#X0.-#$F[!P```-/CB<8)WHM$)!2)L'0!``"#[`QHZ`,``.C\____
+M]],AWHM4)"2)LG0!``"#Q!")^8#Y`W83#[;!BX2"T`$``*,`````B<;K%XG[
+M#[;#BU0D%(N$@M`!``"C`````(G&@\X(B?F`^0-V$`^VP8M<)!2)M(/0`0``
+MZQ.)^@^VPHM,)!2)M('0`0``C78`1XG[BT0D4#A8*P^'#/___X/$/%M>7UW#
+M5E.#[`2+="00BQZQ`(![*P!V')`/MM&)T,'@!`'0C82#.`L``#GP=`9!.$LK
+M=^4/MM&)T,'@!`'0C02#BX@\"P``A<ET8O9!!@)T7`4X"P``.4$8=5*`>30`
+M="K^033K1_Y!-(/L#&@`````#[:&BP```%!64?^SQ`D``.C\____@\0@ZR*+
+M42R-<N"-02PYPG05B<*#?@P`=,:+1B"-<.`YT'7PC78`@\0$6U[#B?955U93
+M@^P,BD0D)(A$)`N+?"0@NP`````/MLB)R,'@!`'(C12'B[(\"P``A?8/A&T!
+M``"X_O___]/`A$8)#X5=`0``C48L.48L=!F#[`R-@C@+``!0Z/S___^#Q!#I
+ML@(``(GVO0````"`?@H`#X:A`@``C5XXB?:#[`Q3Z/S___^)PH/$$(M#!(E3
+M!(D:B4($B1"`>B$`#X7O````#[="&(.\AY@"````=0J#>AP`#X2_````#[="
+M&(N$AY@"``"#>'``#X22````QH*P``````^V0B"H`G0KJ`1T)Z@!="/&0B(%
+MQD(C!%(/MD))4/]R+/]R*.C\____@\00Z8H```")]@^V0B"H`G4@J`1T'*@!
+M=!C&0B(#QD(C!(/L"%)7Z/S___^#Q!#K89`/MD(@J`)T6*@$=%2H`750QD(C
+M!L9"(@5FQX*0``````"#[`A25^C\____@\00ZS"#[`3_<AS_MR0%``!J!.C\
+M____@\00ZQB#[`0/MT(84/^W)`4``&H"Z/S___^#Q!!%B>@X1@H/A^#^___I
+M=P$``(UV`&:!^_,!=U(/MG0D"X/L#&@0)P``Z/S___^#Q!"`?"0+`W89BP>+
+MA+#0`0``HP````"I```0`'4AZQ>)]HL'BX2PT`$``*,`````J0``$`!U"$-F
+M@?OS`7:S@^P(#[9<)!-35^C\____B3PDZ/S___^)V,'@!`'8B[2'/`L``(/$
+M$(7V#X3K````LP"`?RL`=B6-=@`/MD8)#[;+T_BH`70/@^P$:@!15^C\____
+M@\000SA?*W?>#[9$)`N)PL'B!`'"C927.`L``(E6&(U&+#E&+'4(C48X.48X
+M='*]`````,9$)`H`C48LB<(Y1BQT+(/L#(G34NC\____C6C@@\00BU,$B4,$
+MB1B)4`2)`H-]#`!T"(G:.5XL==60A>UT5,9%,@"Q`(!_*P!V2`^V1@G3^*@!
+M=!`/MD0D"HA,*$#^13+^1"0*03A/*W?@ZR;V1@8!=`^#[`A65^C\____@\00
+MZQ&#[`AJ`%;H_/___X/$$(UV`(/$#%M>7UW#@^P4BT0D&(L09L=`,B``4%+H
+M_/___X/$',.)]E=64XMT)!"+#HM^*+,`@'DK`'8;#[;3B=#!X`0!T(V$@3@+
+M```Y\'0&0SA9*W?E@/L#=AP/ML.+$8N$@M`!``"C`````*D``!``=1SK+HGV
+M#[;#BQ&+A(+0`0``HP````"I```0`'04@^P$5P^VPU!1Z/S___^#Q!#K$9"#
+M[`@/ML-04>C\____@\006UY?PXM4)`2+@@0*``"+`*,`````BX($"@``BT`$
+MHP````"+@@0*``"+0`BC`````(N"!`H``(M`#*,`````PU575E.#[`R+?"0@
+MQD0D"P"`?RL`#X;=!@``B?8/MD0D"XU("+H!````B=/3XX5<)"1U#XU($-/B
+MA50D)`^$I`8``(!\)`L#=A\/MD0D"XL7BX3"@`$``*,`````J0``"`!U'^L]
+MC78`#[9$)`N+%XN$PH`!``"C`````*D```@`="!7Z/S___\/ME0D#XG0P>`$
+M`="!C(=@"P`````(`(/$!(L?BDPD"X#Y`W8;#[;!BX3#@`$``*,`````B<*!
+MX@```0#K&8GV#[;!BX3#@`$``*,`````B<*!X@```0"%TG1!@/D#=A`/ML''
+MA,.``0`````!`.L.#[;!QX3#@`$``````0"%TG0:#[94)`N)T,'@!`'0@8R'
+M8`L``````0"-=@"`?SD!#X5>!0``@'PD"P-V'P^V1"0+BQ>+A,*``0``HP``
+M``"H`74CZ24!``"-=@`/MD0D"XL7BX3"@`$``*,`````J`$/A`<!``"#[`@/
+MMD0D$XG"P>($`<*-')>-@V0+``!0_W<4Z/S___^#Q!"#NSP+````='N+JSP+
+M``#&1"0*`(!]"@!V8XUU.(/L#%;H_/___XG#@\00BT8$B5X$B3.)0P2)&/9#
+M)`)U,H-['`!T'8/L!/]S'/^W)`4``&H%Z/S___^`2R0"@\00C78`@^P$4VH&
+M5>C\____@\00_D0D"HI$)`HX10IWH+D@H0<`ZR6#[`1J`0^V1"034%?H_/__
+M_\<$)*"&`0#H_/___[D`+3$!@\00#[9$)`N)PL'B!`'"C127C8)D"P``B8ID
+M"P``QT`(G)\#`('".`L``(E0#(/L"%#_=Q3H_/___X/$$(!\)`L#=A</MD0D
+M"XL7BX3"@`$``*,`````ZQ6)]@^V1"0+BQ>+A,*``0``HP````"`?"0+`W8B
+M#[9$)`N+%XN$PH`!``"C`````*F`````=2+I@P```(UV``^V1"0+BQ>+A,*`
+M`0``HP````"I@````'1F@'PD"P-V%P^V1"0+BQ>+A,*$`0``HP````")P^L5
+M#[9$)`N+%XN$PH0!``"C`````(G#@'PD"P-V%P^V3"0+BQ>)V`T```$`B83*
+MA`$``.L5#[9,)`N+%XG8#0```0")A,J$`0``@'PD"P-V(0^V1"0+BQ>+A,*`
+M`0``HP````"I```$`'4EZ>(!``")]@^V1"0+BQ>+A,*``0``HP````"I```$
+M``^$P@$``(!\)`L#=A</MD0D"XL7BX3"@`$``*,`````B</K%0^V1"0+BQ>+
+MA,*``0``HP````")PX'+```$`(!\)`L#=A`/ME0D"XL'B9S0@`$``.L.#[94
+M)`N+!XF<T(`!```/ME0D"XG0P>`$`="#O(<\"P```'5>@'PD"P-V$HL'BX30
+M@`$``*,`````B</K%0^V1"0+BQ>+A,*``0``HP````")PX!\)`L#=A,/ME0D
+M"XL'B9S0@`$``.FE`@``#[94)`N+!XF<T(`!``#ID@(``(UV``^V5"0+B=#!
+MX`0!T(NLASP+``"#?2@`#X33````BT4H#[=0,O;&`0^%PP```(G&]L("#X2P
+M````@^P(C4!84/]W%.C\____QD0D&P"#Q!"`?A\`=FX/MD0D"XM<ACR%VW14
+M@WL<`'0:@^P$_W,<_[<D!0``:@7H_/___X!+)`*#Q!"#[`13:@95Z/S___^#
+MQ!"`>TL`=!^0@^P,5^C\____QP0D`0```.C\____@\00@'M+`'7B_D0D"XI4
+M)`LX5A]WDL=&6""A!P#'1F"`GP,`B79D@^P(C4984/]W%.C\____@\00ZPAF
+M@4@R@`")]H!\)`L#=AT/MD0D"XL7BX3"@`$``*,`````]L0!=2'I$`$```^V
+M1"0+BQ>+A,*``0``HP````#VQ`$/A/0```"`?"0+`W8<#[9$)`N+%XN$PH`!
+M``"C`````*@!="#IT0````^V1"0+BQ>+A,*``0``HP````"H`0^%M@````^V
+M;"0+B>C!X`0!Z(VLAS@+``"#?00`#X29````BUT$B5PD!(/L"(U%+%#_=Q3H
+M_/___\9$)!,`@\00@'L*`'91B=Z#QCB#[`Q6Z/S___^)PX/$$(M&!(E>!(DS
+MB4,$B1B#>QP`=!J#[`3_<QS_MR0%``!J!>C\____@$LD`H/$$/Y$)`.*1"0#
+MBU0D!#A""G>TQT4L@(0>`,=%-`````");3B#[`B-12Q0_W<4Z/S___^#Q!"0
+M@'PD"P-V&0^V1"0+BQ>+A,*``0``HP````")P>L7B?8/MD0D"XL7BX3"@`$`
+M`*,`````B<&`?"0+`W80#[94)`N+!XF,T(`!``#K#@^V5"0+BP>)C-"``0``
+M_D0D"XI<)`LX7RL/AR7Y__^#Q`Q;7E]=PY!55U93@^P\BW0D4(N.6`4``(M$
+M)%2-N>@6`0!F@7@0A0!W%P^W0!`/MI0PF`0``(T$TL'@`BG0C3S!#[9'/L'@
+M"`.&!`H``(N`0`@``*,`````B<7![1#!Z!B(1"00#[9'/L'@"`.&!`H``(N`
+M1`@``*,`````B$0D*(U,)"B)PL'J"(A1`<'H$(A!`@^V1S[!X`@#A@0*``"+
+M@$@(``"C`````(A!`XG"P>H(B%$$P>@0B$$%QD$&`,9!!P"#[`S_<03_="0X
+M#[9$)"10B>H/MMI3:-`%``#H_/___X/$(/;#`74;B>F$R705BUPD5,9#%`"X
+M`````.FG`@``C78`BT0D5(!X%(%U,HU$)"A0#[9$)!10B>H/ML)0_W0D8.C\
+M____BTPD9,9!%`*X`````(/$$.EK`@``C78`BUPD5(M#)"7___\`/>$!#@!U
+M$<9#%"&X`````.E'`@``C78`BT0D5/9`9@%U$O?%`0```'0*@'\B_P^%!0(`
+M`(/L"%=6Z/S___^#Q`A75NC\____BQ:+3"1D9HM!'F;!Z`4/M\"-!(4``P``
+MB8)P`0``BP:+7"1D9HM+'H/A'[H!````B=/3XXF8=`$``(M$)&0/MT@>BX:L
+M!0``QP2(`````(M<)&1FBTL>B<AFP>@%#[?`@^$?B=/3XXG9]]$AC(:P!0``
+MBT0D9&:+2!Z)R&;!Z`4/M\"#X1_3XO?2(52&1(/$"(M,)%R+402+`8E0!(D"
+M#[=!'E"-A@`)``!0Z/S____^3TN+7"1DQD,4@8/$$(-[5`!T%(/L"(G8@\!4
+M4%;H_/___X/$$(GVC4<0B<(Y1Q`/A.4```"]`0```(E$)`R0@^P,4NC\____
+MB<.+%F:+0!YFP>@%#[?`C02%``,``(F"<`$``(L&9HM+'H/A'XGJT^*)D'0!
+M```/MU,>BX:L!0``QP20`````&:+2QZ)R&;!Z`4/M\"#X1^)ZM/BB='WT2&,
+MAK`%``!FBTL>B<AFP>@%#[?`@^$?B>K3XHG1]]$A3(9$@\0(#[=#'E"-A@`)
+M``!0Z/S____^3TN#Q!"#>U0`=!"#[`B-0U105NC\____@\00C9;,````BX;,
+M````B5@$B0.)4P2)GLP```"+5"0,.5<0#X4E____BTPD5(%A9/___O_&A[``
+M```$@^P(45?H_/___[@!````@\00ZR.-1"0H4`^V1"044(GK#[;#4/]T)&#H
+M_/___X/$$+@`````D(/$/%M>7UW#55=64X/L+(M\)$2+;"1`BW4`BX8H"@``
+MB40D&,=$)!0`````BT0D3`M$)$@/A.H"```/M]>-!-*-!(*-!$+!X`2+3"08
+M]D0((0)T$(N&K`4``(L$D,9`%`+K$9`/M\>+EJP%``"+!(+&0!0A#[?'BY:L
+M!0``BQ2"BT(D)?___P`]X0$0``^$G0$``+#_9H%Z$(4`=PL/MT(0BH0PF`0`
+M`#S_=1@/M\>+EJP%``"+!(+&0!0&Z=,(``"-=@`/ML"-%,#!X@(IPHN&6`4`
+M`(T4T(E4)!2`?"1+`'EA#[9"(*@"="6H!'0AJ`%T'8L&BX!8`0``HP````")
+MPH7`=`J+!HF06`$``(GVBP:+@%`!``"C`````(G"@\H"BP:)D%`!``"+!HN`
+M!`$``*,`````B<*`SO^+!HF0!`$```^WUXT$THT$@HT$0L'@!(M<)!AF]T08
+M(`((#X3,````QD0D$P"S`(!^*P!V78UV``^V10D/MLO3^*@!=$>`^P-V&HL&
+MBX2(T`$``*,`````J0``$`!U'>LKC78`#[;#BQ:+A(+0`0``HP````"I```0
+M`'00N`$```"(V=/@"$0D$XUV`$,X7BMWIH!\)!,`=%N*7"03.%T)=5*)^&;!
+MZ`4/M\")^8/A'[H!````T^*%5(9$=3>+1"04@+BP`````G<'QH"P`````X/L
+M"`^WUXN&K`4``/\TD/]T)"#H_/___X/$$.EG!P``C78`]D0D2P$/A%D'```/
+MM\>+EJP%``"+#(+&010ABT$D)?___P`]X0$.``^$-@<``(M4)!0/MD(^P>`(
+M`X8$"@``BX!`"```HP````")Q\'O$(G%P>T8#[9"/L'@"`.&!`H``(N`1`@`
+M`*,`````B$0D((U<)"")PL'J"(A3`<'H$(A#`HM4)!0/MD(^P>`(`X8$"@``
+MBX!("```HP````"(0P.)PL'J"(A3!,'H$(A#!<9#!@#&0P<`]D%F`74CB?@/
+MMM#VP@%T&5.)ZP^VPU!24>C\____@\00Z8<&``"-=@"#[`A15NC\____@\00
+MZ7(&``")]@^WUXN&K`4``(L$D&:!>"3A`0^%*`$```^V0":#Z`:#^`H/AT@&
+M``#_)(7L%0``#[?7BX:L!0``BPR0C032C02"C01"B</!XP2+?"08BD0[,XA!
+M%(N&K`4``(L$D/9`$P0/A`D&``"`>!0`#X3_!0``@W@X``^$]04``(M0.(I$
+M.S.(`NGG!0``#[?7C032C02"C01"P>`$B=.+EJP%``"+%)J+3"08BD0(*HA"
+M%(N&K`4``(L$F(-X-``/A*\%``"#[`R-!-N-!(.-!$/!X`0/MH0((00``%#H
+M_/___XG%BX:L!0``BP28@\00.V@@=@.+:"`/M]>+AJP%``"+#)"-!-*-!(*-
+M!$+!X`2+7"08C408*(/L!%50_W$TZ/S___^#Q!#I1P4```^WQXN6K`4``(L$
+M@L9`%`#I,@4``(GV#[?7BX:L!0``BRR0BT5(B40D#+#_9H%]$(4`=PL/MT40
+MBH0PF`0```^VP(T4P,'B`BG"BX98!0``C130B50D%,:"L``````/MD(@J`(/
+MA$T!``"H!`^$10$``*@!#X0]`0``QD44`/9%9B`/A+\$``"#?"0,``^$M`0`
+M`(M4)`SV0ET"#X2&````@WI8`'06@^P$_W4@_W4T_W)8Z/S___^#Q!#K:H-]
+M-`!T9+\`````BTPD#(-Y8`!T"_9!70%U!8MY8.LC@^P$:@'_MB0&``#_="08
+MBUPD'/]39(/$$(7`=`:+OB0&``"#?2``="&+732#[`3_-U/_=PCH_/___P,?
+M@\00C4<$@\<0@S@`=.*+?"04#[9'/L'@"`.&!`H``(N`0`@``*,`````B<+!
+MZA"+3"0,B%%3P>@89HE!2`^V1S[!X`@#A@0*``"+D$0(``")%0````!F#[;"
+M9HE!3`^VQF:)04Z)T,'H$&8/ML!FB4%0P>H8B%%2#[9'/L'@"`.&!`H``(N`
+M3`@``*,`````9@^VP&:)04KID0,``)`/M]>-!-*-!(*-!$*)P<'A!(M<)!B*
+M1!DSA,`/A:<```"+AJP%``"+!)#&0!0`]D5F$`^$6`,``(-\)`P`#X1-`P``
+MBD09,XM\)`R(1TJ*1UVH`@^$-P,``+\`````BU0D#(-Z8`!T":@!=06+>F#K
+M(X/L!&H!_[8D!@``_W0D&(M,)!S_462#Q!"%P'0&B[XD!@``@WT@``^$\@(`
+M`(M=-(UV`(/L!/\W4_]W".C\____`Q^#Q!"-1P2#QQ"#.`!TXNG)`@``D#P"
+M#X5X`@``#[??C03;C02#C01#P>`$BU0D&(U$$$")1"0(BAB#XW_&1"0'`,9$
+M)`8`QD0D!0`/M]>-!-*-!(*-!$+!X`2+3"08BT0(.(E$)!R-3"0<#[94)!S!
+MXA@/MD$!P>`0"<(/MD$"P>`("<(/MD$#"<*)%"2`^W%V-X/Z`78.BT0D"(I8
+M`8/C#XA<)`>#/"0"=@N+5"0(BE("B%0D!H,\)`-V7(M,)`B*20.(3"0%ZT^#
+M/"0"=@Z+1"0(BE@"@^,/B%PD!X,\)`=V-8M4)`@/MD('@\`(.00D=@.)!"2#
+M/"0,=@N+3"0(BDD,B$PD!H,\)`UV"XM<)`B*6PV(7"0%#[?7BX:L!0``BP20
+M@'@<`'1=@SPD`'17QD`4((N&K`4``(L$D(H4)#A0'','#[9`'(D$)`^WUXN&
+MK`4``(L,D(-Y.`!T.8T$THT$@HT$0L'@!(M<)!B-1!A`@^P$_W0D!%#_<3CH
+M_/___X/$$.L0#[?'BY:L!0``BP2"QD`4(H!\)`<$=1`/M\>+EJP%``"+!(+&
+M0!0".748#X0E`0``@WPD#``/A!H!``#V1680=&$/M\>-%,"-%)"-%%#!X@2+
+M3"08BD0*,XM<)`R(0TKV0UT"=#V*!"0X11QS`XI%'(3`="X/ML@/M]>-!-*-
+M!(*-!$+!X`2+7"08C4080(/L!%%0BWPD&/]W5.C\____@\00#[9$)`>#^`MW
+M5?\DA1@6``"+1"0,QD!>`>F5````@'PD!@1U$H!\)`4"=0N+5"0,QD)>$>M]
+MD(M,)`S&05X"ZW*+7"0,QD->$.MHBWPD#,9'7@OK7HM$)`S&0%X&ZU2+5"0,
+MQD)>#>M*B?8\*'4=BTPD%(I!2TB(04H/M]>+AJP%``"+!)#&0!2!ZR<\"'40
+M@^P,:!`G``#H_/___X/$$`^WQXN6K`4``(L$@L9`%"&-=@"#Q"Q;7E]=PU93
+M@^P$BW0D$(GSBP:+@%`!``"C`````(G"BP:)D%`!``")]O?"`/__`'00@^P(
+M4E;HBNO__X/$$(UV`(L#BX!0`0``HP````")PHL#B9!0`0``]\(`__\`=<FX
+M`````(/$!%M>PXGV55=64X/L+(M\)$!FBX<R"P``9HE$)"*+!XN`0`$``*,`
+M````)?\/``!FB8<R"P``N`````!FBU0D(F8YES(+```/A/,&``!F@;\R"P``
+M_P\/A'P&``!FBTPD(F8YCS(+```/A&H&``"-M]0```")="04B?:+KR@*``!F
+M_T0D(F:+1"0B9CF'-@L``'<'9L=$)"(```^W5"0BBX=P"@``BUR0!/?#```(
+M``^$M0```(L'BX!0`0``HP````")PXL'B9A0`0``QT0D)`````#WPP#__P!T
+M5KH`````@'\K`'1+O0$```!F#[9/*V:)3"0.#[?"C4@(B>[3YH7S=0N-2!")
+MZ-/@A<-T&P^WTHT$4L'@`RG0C82'*`$``(E$)"3K"XUV`$)F.50D#G?$@WPD
+M)`!U%8/L#/]T)$SH_/___X/$$.EY!0``D(/L#/]T)$SH_/___XM4)#2(0@N#
+MQ!#I704``)")WH'F_P\```^WQHT4P(T4D(T44,'B!(G1BU0J((M,*22)5"08
+MB4PD'(N7K`4``(LL@H7M#X0B!0``]\,``"``#X1V`0``@'T4@0^%4`$``,9%
+M%"$/MU4>BX>L!0``QP20`````&:+31Z)R&;!Z`4/M\"#X1^^`0```-/FB?'W
+MT2&,A[`%``!FBTT>B<AFP>@%#[?`@^$?N@$```#3XHG1]]$A3(=$@^P(#[=%
+M'E"-AP`)``!0Z/S___^#Q!"#?50`=!"#[`B-15105^C\____@\009H%]$(4`
+M#X?!````#[=%$("\.)@$``#_#X2O````9H-]$']W)0^VE#B8!```BX]8!0``
+MC032P>`"*="+1,$H@'@$_W5:Z8,```!F@7T0@0!W*P^W11`/MH0XF`0``(N/
+MD`4``(T$0(T$P(G"P>(%*<*+1)$(@'@$_W4DZU`/MT40#[:$.)@$``"+EW0%
+M``"-!$"-!("+1,)4@'@$_W0N@^P(55?H_/___X/$$(V7S````(N'S````(EH
+M!(E%`(E5!(FOS````.F]`P``D(U%"(M,)!2+402)002)30B)4`2)`NFB`P``
+MB?:)\&;!Z`4/M\")\8/A'[H!````T^*%5(=$#X6!`P``#[?6BX>L!0``BP20
+M9H%X$(4`#X>A````#[=0$("\.I@$``#_#X2/````9H-X$']W'P^VE#J8!```
+MBX]8!0``C032P>`"*="+1,$HBE`$ZVL/M]:+AZP%``"+!)!F@7@0@0!W*`^W
+M0!`/MH0XF`0``(N/D`4``(T$0(T$P(G"P>(%*<*+1)$(BE`$ZR\/M]:+AZP%
+M``"+!)`/MT`0#[:$.)@$``"+EW0%``"-!$"-!("+1,)4BE`$ZP*R_X#Z_W0-
+M#[;"@+PX'@4``/]U0HGP9L'H!0^WP(GQ@^$?O@$```#3YH5TAT0/A94"``#&
+M110&@^P(:@!5Z/S___^#Q`QJ`%57Z/S___^#Q!#I<@(```^VP@^VA#@>!0``
+MB40D)(T$0,'@`RM$)"2-A(<H`0``B40D)(M$)!P+1"08=`CWPP```@!U$,=$
+M)!@`````QT0D'`````"+5"0D]D(&`@^$9`$``/]T)!S_="0<#[?&4%+H_/__
+M_XGP9L'H!0^WP(GQ@^$?NP$```")VM/B@\00A52'1`^%Z`$``(!]%($/A84`
+M```/MU4>BX>L!0``QP20`````&:+31Z)R&;!Z`4/M\"#X1_3XXG9]]$AC(>P
+M!0``@^P(#[=%'E"-AP`)``!0Z/S___^#Q`A55^C\____@\00@WU4`'00@^P(
+MC4544%?H_/___X/$$(V7S````(N'S````(EH!(E%`(E5!(FOS````.E9`0``
+MQD0D(0#&1"0@`(N'U````#E$)!1T$(V7U````/Y$)"&+`#G"=?:`?"0A`'0Q
+MC9_4````@^P,4^C\____C4CX@\00BU,$B4,$B1B)4`2)`CGI=07&1"0@`?Y,
+M)"%UU8!\)"``#X7P````C44(BTPD%(M1!(E!!(E-"(E0!(D"B?!FP>@%#[?`
+MB?&#X1^^`0```-/F";2'A````.FZ````_W0D'/]T)!P/M\90_W0D,.C\____
+MQD0D,0#&1"0P`(N'U````(/$$#E$)!1T$HV7U````(GV_D0D(8L`.<)U]H!\
+M)"$`=#6-G]0```"0@^P,4^C\____C4CX@\00BU,$B4,$B1B)4`2)`CGI=0C&
+M1"0@`8UV`/Y,)"%UTH!\)"``=3>`?12!=#&-10B+3"04BU$$B4$$B4T(B5`$
+MB0*)\&;!Z`4/M\")\8/A'[X!````T^8)M(>$````9HM$)")F.8<R"P``#X6B
+M^?__C8?4````B<(YA]0```!T1XGV@^P,B=92Z/S___^#Z`AFBT@>B<MFP>L%
+M#[?;@^$?NO[____3PB&4GX0```"#Q`QJ`%!7Z/S___^#Q!")\CFWU````'6[
+M@^P,5^C\____N`$```"#Q!"#Q"Q;7E]=PXGV5U93@^P0BUPD(&;'1"0.``"+
+MFR0%``"^`````(U\)`Z+`XN`4`$``*,`````BQ.)@E`!``"%P'0;BP/'@%`!
+M```!````@^P,4^C\____B`0W@\00@<-@#```1H/^`7[`@'PD#@!U#+@`````
+M@'PD#P!T!;@!````@\006UY?PY!55U93@^P,BVPD(+D`````9@^V12N)PV:#
+M^`!V&8M$)"0/ME`)C78`B=#3^*@!=09!9CG+=_*+5"0D@WHH`'0E@^P(BT(H
+M@\!84/]U%.C\____@\0(BTPD+/]Q*%7H_/___X/$$(M$)"2#P#B)PHM,)"0Y
+M03@/A%<!``")1"0(D(/L#%+H_/___XG&@\00@W@<``^$%0$``(!X2P`/A(<`
+M``"_`````&:#?4``='N)]HN%K`4``(L<N(7;=&-FBT,09CM&&'599CV%`'=3
+M#[?`@+PHF`0``/]T1HM5`&:+0QYFP>@%#[?`C02%``,``(F"<`$``(M5`&:+
+M2QZ#X1^X`0```-/@B8)T`0``QD,4(8/L!&H`4U7H_/___X/$$)!'#[=%0#GX
+M?X>+1AS'0&``````]D8D!'4G_H57#```@^P,5>C\____@\0,:@&+1AP/MD`!
+M4%7H_/___X/$$(GV@^P$BT8<#[9``E"+1AP/MD`!4&AW`0``Z/S___^#Q`S_
+M=AS_M20%``!J`>C\____@\0,_W8<_[4D!0``:@;H_/___\=&'`````"#Q!"+
+M1"0D_D@*@^P(5E7H_/___X/$$(M4)`B+3"0D.5$X#X6N_O__BT0D),=`*```
+M``"+10"+B%@!``")#0````"%R70)BT4`B8A8`0``@\0,6UY?7<.-=@!75E.+
+M="00BWPD%+,`@'XK`'85#[97"9")T(C9T_BH`74&0SA>*W?P]D<(`G4(C4<X
+M.4<X=6:#[`Q7Z/S___^#Q!"$P'1$@^P,5NC\____B<&#Q!"%P'1$C4<XBU`$
+MB4@$B0&)402)"OY'"HEY*,9!(`7&02$`QD%)#VH!:@%15^C\____@\00ZQ*#
+M[`@/ML-05NC\____@\00B?9;7E_#55=64X/L$(ML)"B+?50/MD4K4/]T)"A7
+MZ/S___^)QF:#33(0NP````"#Q!"+5"0@9@^V0BMFB40D"F:#^`!V%@^V5PF)
+MT(C9T_BH`74(0V8Y7"0*=^YF@_L#=B`/M\.+3"0@BQ&+A(+0`0``HP````"I
+M```0`'4XZQZ)]@^WPXM,)""+$8N$@M`!``"C`````*D``!``=1B#[`@/ML-0
+M_W0D+.C\____@\00Z9@!``"-1S@Y1S@/A(P!``"%]@^$A`$```^V1DG'1(4\
+M`````(M6!(L&B5`$B0*#[`16:@97Z/S___^#Q!"`?DL`="*0@^P,_W0D+.C\
+M____QP0D`0```.C\____@\00@'Y+`'7?@WX<`'1>BT8<QT!@`````/9&)`1U
+M%HM$)"#^@%<,``"#[`Q0Z/S___^#Q!"#[`3_=AR+5"0H_[(D!0``:@'H_/__
+M_X/$#/]V'(M,)"C_L20%``!J!NC\____QT8<`````(/$$/Y/"H/L"%;_="0L
+MZ/S___^+5"0PBP*+D%@!``")%0````"#Q!"%TG0,BTPD((L!B9!8`0``QD4F
+M`&:#93+ONP````"`?1\`=!UF#[95'Y`/M\.+=(4\A?9T!H!^(O]U<T-F.=IW
+MZ?9%,H!T$H/L"%7_="0LZ/S___^#Q!#K5;L`````@'T?`'0]B?8/M\.+=(4\
+MA?9T)?9&)`)T'X/L!/]V'(M$)"C_L"0%``!J!NC\____@&8D_8/$$)!#9@^V
+M11]F.=AWQ6;'13("`(!E+?V-=@"#Q`Q;7E]=PU93@^P$BUPD$(MT)!2+1E2Q
+M`(![*P!V$@^V4`F)T-/XJ`%U!D$X2RMW\L9&)@R#[`A64^C\____@\046U[#
+MB?975E.#[!"+?"0@BD0D)(A$)`^[``````^V\(GV@^P,:!`G``#H_/___X/$
+M$(!\)`\#=AF+!XN$L-`!``"C`````*D``!``=2'K%XGVBP>+A+#0`0``HP``
+M``"I```0`'4(0V:!^_,!=K.#[`@/MEPD%U-7Z/S___^)/"3H_/___XG8P>`$
+M`=B-!(>#Q!#V@%@+```!=!*#[`C_L#P+``!7Z/S___^#Q!"#Q!!;7E_#D%57
+M5E.#[`R+="0@BSX/MU0D)(N'K`4``(L<D+T`````QT0D"`````!F@7LDX0%U
+M*(I#)H/H$3P!=QZ+1BB)1"0(BT0D+`M$)"AU28M$)`C&0#4`ZS^-=@"+CU@%
+M``"-J>@6`0!F@7L0A0!W%P^W0Q`/MI0XF`0``(T$TL'@`BG0C2S!BT0D+`M$
+M)"AU!\:%L`````"`>Q2!=0:`9@CWB?:+1"0L"T0D*`^%R@```,9#%`#V0V8@
+M#X3<`0``BW-(A?8/A-$!``#V1ET"=".#?E@`=!V#>S0`=!>#[`3_<R#_<S3_
+M=ECH_/___X/$$(UV``^V13[!X`@#AP0*``"+@$`(``"C`````(G"P>H0B%93
+MP>@89HE&2`^V13[!X`@#AP0*``"+D$0(``")%0````!F#[;"9HE&3`^VQF:)
+M1DZ)T,'H$&8/ML!FB490P>H8B%92#[9%/L'@"`.'!`H``(N`3`@``*,`````
+M9@^VP&:)1DKI(0$``)"`>Q2`=0;&0Q0AB?:#[`3_="0P_W0D,&@<!@``Z/S_
+M__^#Q!!F@7LDX0%U((I#)H/H$3P!=Q:#[`S_="04Z/S___^#Q!#IU@```(GV
+M]D0D*P%T:8M#)"7___\`/>$!#@!T6@^V13[!X`@#AP0*``"+@$`(``"C````
+M``^V13[!X`@#AP0*``"+@$0(``"C``````^V13[!X`@#AP0*``"+@$@(``"C
+M`````(/L"%-7Z/S___^#Q!#K9XUV`(!\)"L`>1V+!XN`6`$``*,`````B<&%
+MP'1*BP>)B%@!``#K0(!\)"@`>#F`?"0O`'DRBQ=FBT,>9L'H!0^WP(T$A0`#
+M``")@G`!``"+%V:+2QZ#X1^X`0```-/@B8)T`0``B?:#Q`Q;7E]=PU=64X/L
+M$(M<)"2+?"0@BD,4B$0D#XN/6`4``(VQZ!8!`&:!>Q"%`'<7#[=#$`^VE#B8
+M!```C032P>`"*="--,&`?"0/`'4E9L>&D```````@'LD''46@'LF`G40@^P(
+M4U;H_/___X/$$(UV`(-[4`!T$H/L"(U#4%!7Z/S___^#Q!")]H/L"%-7Z/S_
+M__^#Q!"`?"0/!G0[@^P(C9X``0``4_]W%.C\____QX8``0``@(0>`,>&"`$`
+M``````")M@P!``"#Q`A3_W<4Z/S___^#Q!"#Q!!;7E_#B?955U93@^P,BWPD
+M((7_#X3`````BT<HBRB#[`Q5Z/S___^)PXU`/(E$)!B#Q!"%VP^$G@```(/L
+M#%7H_/___XG&@\00A<!U$8/L"%-5Z/S___^#Q!#K?8GVQD,5K&:+1QAFB4,0
+MB6L8QT-D"````(ES4(M&"(E#-,=#(``(``"-A[0```")0SC&0QP@QT-L````
+M`,9#)!S&0R4!QD,F`L9#)PC&0R@`@^P(:@#_="04Z/S_____<R#_=A#_=@S_
+M="0DZ/S___^#Q!A35>C\____@\00@\0,6UY?7<.055=64X/L#(ML)""+?"0D
+MBD0D*(A$)`N+12B+,,9$)`H`C78`#[9$)`J*E#"8!```@/K_=%.#[`1J"(U'
+M#%`/MM*-!-+!X`(IT(T<Q0````")V`.&6`4```6<````4.C\____@\00A,!T
+M'HN&6`4``(I4)`N(E`/6````BX98!0``B:P#X````/Y$)`IYEH/$#%M>7UW#
+MB?955U93@^P,BTPD)(M!-(E$)`@/MD`"B<7!Y0B+5"0(9@^V0@,!Q0^W]8U6
+M!`^W02`YP@^/T````(M<)`B#PPC&1"0'`(M4)`B-1!8$.=@/AJ,```"*`X3`
+M>'Z#X`\\!G5W]D,#P'0&]D,%P'5K]@,0=#"-<PB_`````(![!`!V6(/L!`^V
+M0P-05O]T)"SH_/___X/&'(/$$$>)^#A#!'?@ZS:-<P2_`````(![`@!V*`^V
+M5"0'B10D@^P$_W0D!%;_="0LZ/S___^#QAR#Q!!'B?@X0P)WX9#^1"0'#[9#
+M`8U<`P(/M\6+5"0(C400!#G8#X==____@^P(:@'_="0LZ/S___^#Q!"#Q`Q;
+M7E]=PU575E.#[`2+;"08#[9\)!R*1"0DB$0D`XM%*(LPLP")^0-,)""(3"0"
+MC78`#[;#BH0PF`0``#S_=$H/MM"+CE@%``"-!-+!X`(IT(T4Q0````")^#B$
+M"M8```!U)SFL"N````!U'HI$)`*(A`K5````BX98!0``BDPD`XB,`M0```")
+M]O[#>:2#Q`1;7E]=PU93BW0D&(I<)!"*5"04BT0D#(M(+("YD````$]W+0^V
+M@9````"-!("-%!.(E,&5````#[:!D````(T$@(GRB)3!E````/Z!D````%M>
+MPXGV55=64X/L#(M,)"2+630/MD,"P>`(9@^V4P,!T`^WP(/`!`^W42`YT`^/
+M\@```(U3",9$)`L`O0````"*2P&)]HI"`@!$)`L/MD(#C50"!$6)Z#C!<^J)
+MUL9$)`H`O0````")ZCI4)`L/@Y8```")]HI&`0!$)`J`/@%T!8`^%W4SBEPD
+M"BI>`3I<)`IS9HU%`0^V^`^V!E!7#[;#4/]T)"SH_/___X/$$$,Z7"0*<N3K
+M0HGVBU0D((M"+("XD0````%T,(I<)`HJ7@$Z7"0*<R.-10$/MOB0#[8&4%</
+MML-0_W0D+.C\____@\000SI<)`IRY(/&!$6)Z#I$)`L/@FS___^+5"0@BT(L
+MQH"1`````8/L"&H'4NC\____@\00@\0,6UY?7<-55U93@^PLBW0D0(ML)$2S
+M_XGG_+D%````N`````#SJV8YZ7-&C78`9H/Y#G<)#[?1B@0RB`04#[?!B@0P
+M@^@P/`EW'(#[_W4#LP"0#[;#C02`#[?1BA0RC5Q"T.L'B?:`^_]U!D%F.>ER
+MO0^VPX/$+%M>7UW#B?975E.#[`2+?"04BD0D&(A$)`.*5"0<B%0D`HM'*(LP
+MLP"-=@`/ML.*A#"8!```//]T.@^VT(N.6`4``(T$TL'@`BG0P>`#.;P(X```
+M`'4=BE0D`SB4"-4```!U$(I4)`*(E`C7````ZP>-=@#^PWFT@\0$6UY?PY!5
+M5U93@^P,BVPD)(I$)"B(1"0+BT0D((MP++L`````C7T$B?:-!)N-A,:0````
+M@'@$`78T@'@$%W0NBE0D"SA0!74EBE4#@/H@=@*R((T$FXV$QIP````/MM*#
+M[`125U#H_/___X/$$$.#^T]^MH/$#%M>7UW#B?955U93@^P,BTPD),9$)`8`
+MBVDT#[9%`L'@"&:)1"0*9@^V10-F`40D"@^W7"0*C5,$#[=!(#G"#X\*`0``
+MC74(QD0D!P"-1"L$.?`/AN4```"-=@`/MD8"P>`(9@^V5@,!PF:)5"0(#[?:
+M4XU&!%#H_/___X/$"#S_=6W&1"0&_XU<,P0/MT0D"HU$*`0YV'9QC78`#[9#
+M`L'@"&8/ME,#C3P"#[?'4(U#!%#H_/___X/$"#S_=1&`?"0&_W5$QD0D!@#K
+M/8UV`#I$)`9S!(A$)`8/M\>-7`,$#[=$)`J-1"@$.=AWKNL:*D0D!@^VP%`/
+MMD0D"U#_="0HZ/S___^#Q`R#[`0/MD0D"U!6_W0D+.C\_____D0D%P^W1"08
+MC70&!(/$$`^W1"0*C40H!#GP#X<>____@^P(:@+_="0LZ/S___^#Q!"#Q`Q;
+M7E]=PY!64X/L!(MT)!"+3"04BUDT#[9#`L'@"&8/ME,#`=`/M\"-4`0/MT$@
+M.<)_((/L!%)3_[;D````Z/S___^#Q`AJ`%;H_/___X/$$(GV@\0$6U[#B?95
+M5U93@^P,BVPD((M$)"2*0!2(1"0'BU0D)&:!>A"%``^'I@````^W0A"`O"B8
+M!```_P^$E````&:#>A!_=R4/MI0HF`0``(N-6`4``(T$TL'@`BG0BT3!*`^V
+M0`0%$`4``.MMBT0D)&:!>!"!`'<N#[=`$`^VA"B8!```BXV0!0``C01`C03`
+MB<+!X@4IPHM$D0@/MD`$!1`%``#K,XM4)"0/MT(0#[:$*)@$``"+E70%``"-
+M!$"-!("+1,)4#[9`!`40!0``ZPB-=@"X#P8```^V1`4.B40D"(T$0,'@`RM$
+M)`B-A(4H`0``B40D"(N-6`4``(M$)"2-L>@6`0!F@7@0A0!W%P^W0!`/MI0H
+MF`0``(T$TL'@`BG0C33!@'PD!P`/A3\"``!FQX:0``````"+5"0D@'HD'`^%
+M*`(```^V0B:#^`)T7(/X`G\*@_@!="CI$`(``(/X!W0S@_@*#X4"`@``@^P(
+M_W0D+%;H_/___X/$$.GM`0``@^P(_W0D+%;H_/___X/$$.G8`0``@^P(_W0D
+M+%;H_/___X/$$.G#`0``@^P(_W0D+%;H_/___X/$"(V>``$``%.+1BB+`/]P
+M%.C\____QX8``0``@(0>`,>&"`$```````")M@P!``"#Q`A3BT8HBP#_<!3H
+M_/___X/$$)#&1B+_OP````"+1"0(@'@*``^&J0```(G#@\,X@^P,4^C\____
+MB<:#Q!"+0P2)<P2)'HE&!(DP@'XB_W1K@'XA`'5M@+ZQ``````^$(`$```^V
+M1B"H`G0,J`1T"*@!#X7F````#[9&(*@"=0RH!'0(J`$/A>D````/MD8@J`(/
+MA.P```"H!`^$Y````*@!#X7<````@^P(5E7H_/___X/$$.G*````B?;&AK$`
+M````D$>)^HM$)`@X4`H/AUS___^)^HM$)`@X4`IU7;\`````@'@*`'92B<.#
+MPSB0@^P,4^C\____B<:#Q!"+0P2)<P2)'HE&!(DP@'XB_W0?@'XA(G0&@'XA
+M#743@^P(:@I6Z/S___^#Q!#K5XUV`$>)^HM$)`@X4`IWM(M4)`C&0@7_@^P(
+M4E7H_/___X/$$(!\)`<`#X60````ZR96#[9&25#_=BS_="04Z/S___^#Q!#K
+M#X/L"%95Z/S___^#Q!")]HM$)"2#>%``=!:#[`B+1"0L@\!04%7H_/___X/$
+M$(GV@^P(_W0D+%7H_/___X/$$(!\)`<`=#%F_X:0````9H.^D`````IV$&;'
+MAI```````.DZ_O__B?:#[`AJ"E;H_/___X/$$(GV@\0,6UY?7<-55U93@^P8
+MBVPD+(I$)#"(1"07BT4HBSA7Z/S___^)PXU`/(E$)!2#Q!"%VP^$H````(/L
+M#%?H_/___XG&@\00A<!U$(/L"%-7Z/S___^#Q!#K?Y#&0Q6L9HM%&&:)0Q")
+M>QC'0V0(````B7-0BT8(B4,TQT,@``@``(V%M````(E#.,9#'"#'0VP`````
+MQD,D',9#)0&*1"0+B$,FQD,G",9#*`"#[`AJ`/]T)!#H_/____]S(/]V$/]V
+M#/]T)"#H_/___X/$&%-7Z/S___^#Q!"#Q`Q;7E]=PXGV55=64X/L#(ML)""+
+M12B+,(N5Y`````^V0@*)P\'C"&8/MD(#`<,/M\.#P`0]``@```^/W0```(/L
+M#%;H_/___XG'@\00A<`/A,<```"#[`Q6Z/S___^)1"08@\00A<!U$X/L"%=6
+MZ/S___^#Q!#IH0```)"-1SR)1"0$#[?;@\,$@^P$4_^UY````(M4)!3_<@CH
+M_/___\9'%:QFBT489HE'$(EW&(E?((-/9!*+5"08BT((B4<TB5=0C86T````
+MB4<XQD<<(,=';`````#&1R0=QD<E$,9')@(/ML>(1R>(7RB#Q`AJ`/]T)!#H
+M_/____]W((M$)!S_<!#_<`S_="0@Z/S___^#Q!A75NC\____@\00@\0,6UY?
+M7<-55U93@^P$BWPD&(I$)!R(1"0#BE0D)(A4)`*+1RB+,(MO+,9$)`$`#[9$
+M)`&*C#"8!```@/G_=&,/MM&+GE@%``"-!-+!X`(IT,'@`SF\&.````!U1HI4
+M)`,XE!C5````=3F`?"0"`'0/BX08W````(M,)"")`>LI#[;1BXY8!0``C032
+MP>`"*="+7"0@BQ.)E,'<````ZPF-=@#^1"0!>8;&1"0!`)`/MD0D`8T$@(U4
+MQ0"-@I````"`>`0!=CR`>`07=#:*3"0#.$@%=2V`?"0"`'0.BX*8````BUPD
+M((D#ZR,/MD0D`8T$@(M,)""+$8F4Q9@```#K#)#^1"0!@'PD`4]VH8/$!%M>
+M7UW#D%575E.#[`B+;"0<BD0D((A$)`.+G>0````/MD,"B<;!Y@AF#[9#`P'&
+M#[?&@\`$/0`(``!_9H!\)`,`=`N*A=@```"(0P'K"8I#`8B%V````(U#"(E$
+M)`2_``````^WQHU$&`0[1"0$=C*)]@^V1"0#4(U$)`A0B?H/ML)05>C\____
+M1X-$)!0$@\00#[?&C408!#M$)`1WTXUV`(/$"%M>7UW#4X/L"(M<)!"*5"04
+MBD0D&(A$)`/'1"0$`````(![(P%T2FH!C40D"%`/ML)04^C\____@\00@WPD
+M!`!T+XM$)`2`"("`?"0#`'0-BT0D!(!(`R#K"XUV`(M$)`2`8`/?@^P,4^C\
+M____@\00@\0(6\.-=@!75E.+7"04BWPD$(MS2&:!>Q"%``^'B@````^W0Q"`
+MO#B8!```_W1\9H-[$']W(0^VE#B8!```BX]8!0``C032P>`"*="+1,$HBE`$
+MZUB)]F:!>Q"!`'<H#[=#$`^VA#B8!```BX^0!0``C01`C03`B<+!X@4IPHM$
+MD0B*4`3K)@^W0Q`/MH0XF`0``(N7=`4``(T$0(T$@(M$PE2*4`3K!8UV`++_
+ML?]F@7L0A0!W"P^W0Q"*C#B8!```@/K_=!@/ML*`O#@>!0``_W0+@/G_=`:`
+M>Q0&=32#>U``=!*#[`B-0U!05^C\____@\00B?:#[`A35^C\____QT8L____
+M_XDT)/]6*(/$$.M\@'L4`'4[]D-D"'04@^P$_W,@_W,T_W8<Z/S___^#Q!#'
+M1BP`````@WX@`'0(BU8@BT84B0*#[`Q6_U8H@\00ZQ/'1BS_____@^P,5O]6
+M*(/$$(GV@WM0`'02@^P(C4-04%?H_/___X/$$(GV@^P(4U?H_/___X/$$(UV
+M`%M>7\-55U93@^P8BVPD+(I$)#"(1"07BT4HBSA7Z/S___^)PXU0/(E4)!2#
+MQ!"%P`^$U0```(/L#%?H_/___XG&@\00A<!U%(/L"%-7Z/S___^#Q!#IL0``
+M`(GVQD,5K&:+11AFB4,0BT0D,(E#2(E[&,=#9`@```")<U"+1@B)0S2+1"0L
+MB4,@C86T````B4,XQD,<(,=#;`````#&0R0\QD,E`HI4)`N(4R:+1"0HP>@0
+MB$,GBU0D*`^VQHA#*(A3*8M$)"S!Z!"(0RJ+5"0L#[;&B$,KB%,LQD,M`(/L
+M"&H`_W0D$.C\_____W,@_W80_W8,_W0D(.C\____@\084U?H_/___X/$$(/$
+M#%M>7UW#D%575E.#[!B+7"0LBD0D,(A$)!>+0RB+*%7H_/___XG&@\00A<`/
+MA.T```"#[`Q5Z/S___^)QX/$$(7`=1.#[`A65>C\____@\00Z<D```"0C58\
+MB50D!(/L!/]T)##_L^0```#_<`CH_/___\9&%:QFBT,89HE&$(M$)$")1DB)
+M;AB+1"0\B48@@TYD$HM'"(E&-(E^4(V#M````(E&.,9&'"#'1FP`````QD8D
+M.\9&)0**5"0;B%8FBT0D.,'H$(A&)XM4)#@/ML:(1BB(5BF+1"0\P>@0B$8J
+MBU0D/`^VQHA&*XA6+,9&+0"#Q`AJ`/]T)!#H_/____]V(/]W$/]W#/]T)"#H
+M_/___X/$&%95Z/S___^#Q!"#Q`Q;7E]=PU=64XM<)!"+="04BTPD&(M\)!R+
+M5"0@A=MT#87V=`F%R70%A?]U"9"X`````.LYD&:!^H4`=PT/M\*`O!B8!```
+M_W4(N`````#K'9#&023AQD$E`<9!)A-FB5$0B7$8B7ELN`$```"06UY?PXM,
+M)`2+002+0`2C`````(G"@'PD"`!T"('*```,`.L&@>+___/_BT$$B1"+002)
+M4`R+002)4!"+002)4!2+002)4!B+002)4`3#D)!64XM<)!"+3"0PBW0D.`^W
+M1"0,/1$G``!_+CT0)P``?6,](B$``'1</2(A``!_"3T@(0``=$[K5CU`(0``
+M=$4]1"$``'0^ZT8]@"<``'0U/8`G``!_#BT@)P``@_@"=R[K(HGV/8"1``!T
+M&3V`D0``?PD]@B<``'0+ZQ,]@)0``'4,B?;&`T"+1"04Q@`"BT0D&,8`!(H3
+MBT0D+(@09L<!@`!FQP8``(M$)"#&`""+1"0D9L<```&*$XM$)"B($&8/M@-F
+M`P%F`P:+5"0T9HD"BU0D'&:)`F:+$8M$)#QFB1!FBQ&#P@N+1"1`9HD06U[#
+MC78`55=64X/L#(I$)"2(1"0+BU0D((LZNP````!F@W]```^&>@(``(UV`(G8
+M9L'H!0^WP(G9@^$?N@$```#3XH64AX0````/A4H"```/M].+AZP%``"+-)"%
+M]@^$-@(``+T`````BT8D)?___P`]X0$0``^%L@```(-\)"@`#X43`@``9H%^
+M$(4`#X>2````#[=&$("\.)@$``#_#X2`````9H-^$']W(@^VE#B8!```BX]8
+M!0``C032P>`"*="+1,$HBD@$Z3@!``!F@7X0@0!W*P^W1A`/MH0XF`0``(N/
+MD`4``(T$0(T$P(G"P>(%*<*+1)$(BD@$Z04!```/MT80#[:$.)@$``"+EW0%
+M``"-!$"-!("+1,)4BD@$Z>$```"Q_^G:````B?9F@7X0A0`/AX@````/MT80
+M@+PXF`0``/]T>F:#?A!_=Q\/MI0XF`0``(N/6`4``(T$TL'@`BG0BT3!*(I(
+M!.M69H%^$($`=R@/MT80#[:$.)@$``"+CY`%``"-!$"-!,")PL'B!2G"BT21
+M"(I(!.LF#[=&$`^VA#B8!```BY=T!0``C01`C02`BT3"5(I(!.L%C78`L?]F
+M@7X0A0!W.@^W1A"`O#B8!```_W0LBZ]8!0``9H%^$(4`=Q8/MI0XF`0``(T$
+MTL'@`BG0C6S%`.L(@<7H%@$`B?:+1"0@.$@$#X6'````@WPD*`!T#HM4)"AF
+MBT(89CM&$'5R@'PD"P9T3XM6)('B____`('ZX0$0`'0^#[9%(*@"=#:H!'0R
+MJ`%U+H"]L`````!U)8'ZX0$/`'0YBD0D"XA&%(/L!&H!5O]T)"SH_/___X/$
+M$.L>B?:*5"0+B%84@^P(#[?#4/]T)"SH_/___X/$$(GV0V8Y7T`/AXG]__^`
+M?"0+@0^$8@$``+T`````BY?,````C8?,````.=!T")!%BQ(YT'7Y9H7M#X0\
+M`0``C8?,````B<(YA\P````/A"@!``")1"0$@^P,B=-2Z/S___^)QH/$$(-\
+M)"@`="&+5"0H9HM"&&8[1A!T$XM#!(ES!(D>B48$B3!-Z=4```!F@7X0A0`/
+MAX4````/MT80@+PXF`0``/]T=V:#?A!_=Q\/MI0XF`0``(N/6`4``(T$TL'@
+M`BG0BT3!*(I(!.M39H%^$($`=R@/MT80#[:$.)@$``"+CY`%``"-!$"-!,")
+MPL'B!2G"BT21"(I(!.LC#[=&$`^VA#B8!```BY=T!0``C01`C02`BT3"5(I(
+M!.L"L?^+1"0@.$@$=26+1B0E____`#WA`0\`=!:*5"0+B%84@^P(5E?H_/__
+M_X/$$.L3C8?,````BU`$B7`$B0:)5@2),DUFA>UT$HM4)`0YE\P````/A=[^
+M__^)]H/$#%M>7UW#5U93@^P$BW0D%(I$)!B(1"0#OP````!F@WY```^&`0$`
+M`(GV#[?7BX:L!0``BQR0A=L/A.````!F@7L0A0`/AX@````/MT,0@+PPF`0`
+M`/]T>F:#>Q!_=Q\/MI0PF`0``(N.6`4``(T$TL'@`BG0BT3!*(I(!.M69H%[
+M$($`=R@/MT,0#[:$,)@$``"+CI`%``"-!$"-!,")PL'B!2G"BT21"(I(!.LF
+M#[=#$`^VA#"8!```BY9T!0``C01`C02`BT3"5(I(!.L%C78`L?^X_P```&:!
+M>Q"%`'<-#[=#$&8/MH0PF`0```^WP(T4P,'B`BG"BX98!0``C030.DPD`W46
+M#[9`(*@!=`ZH!'0*N`$```#K$XUV`$=F.7Y`#X<!____N`````"#Q`1;7E_#
+MD%575E.#[`B+5"0<BT(HBS"+CN`)``")3"0$9L=$)`(``(UV`+L`````9H-^
+M0`!V3XN^K`4``(GV#[?3@SR7`'0WBPR7BT$D)?___P`]X0$0`'0EBVPD'&:+
+M11AF.T$0=1>)T,'@!F:+3"0"BU0D!&8Y3!`(=`F)]D-F.5Y`=[EF.5Y`=`UF
+M_T0D`F:#?"0"'W:2#[=$)`*#Q`A;7E]=PY!3BU0D"(M,)`R+7"00@WHX`'09
+MBT(XQ@!PBT(XB$@"BT(XQD`'`(M".(A8#%O#B?;#C78`5U93BUPD$(M4)!2)
+MT8'A_P$``(N#K`4``(,\B`!T)XLTB`^V1A4/MIO&````B-G3X`^W^`^WTKC_
+M_P``T^`APHGP.==T!;@`````6UY?PY!64X/L!(M,)!"+="049H%^).$!#X6?
+M````BD8F@^@1/`$/AY$```"Z_P```&:!?A"%`'<,#[=&$`^VE`B8!```C012
+MC02`BY%T!0``C1S"@'LH_W5+L!2`?F@`=`8/MD9HT>`/ML"-!("-!("-!("-
+M!("-!("-!(#!X`:)0UC'0V``````B5MD@^P(C4-84/]Q%.C\____QD,H`(/$
+M$(GVC4,4BU`$B7`$B0:)5@2),OY#*>FG````NO\```!F@7X0A0!W#`^W1A`/
+MMI0(F`0``(T$TL'@`BG0BY%8!0``C1S"BT8D)?___P`]X0$0`'1N@'M(_W55
+ML!2`?F@`=`8/MD9HT>`/ML"-!("-!("-!("-!("-!("-!(#!X`:)@^@```#'
+M@_``````````B9OT````@^P(C8/H````4/]Q%.C\____QD-(`(/$$(U#$(M0
+M!(EP!(D&B58$B3+^0TN#Q`1;7L.-=@!3@^P(BUPD%(![2/]T'8/L"(V#Z```
+M`%"+1"0<_W`4Z/S____&0TC_@\00@\0(6\-3@^P(BUPD%(![*/]T&H/L"(U#
+M6%"+1"0<_W`4Z/S____&0RC_@\00@\0(6\.-=@!55U93@^P,BVPD((MT)"1F
+M@7XDX0$/A;T```"*1B:#Z!$\`0^'KP```+G_````9H%^$(4`=PP/MT80#[:,
+M*)@$``"-!$F-!("+E70%``"-',*!^?\````/A#L!``#^2RF#[`R->Q17Z/S_
+M__^)P8/$$#GP=4.#[`A35>C\____@\00.7L4#X0-`0``QT-8`"TQ`<=#8```
+M``")6V2#[`B-0UA0_W44Z/S____&0R@`@\00Z>$```"0C5,4BT,4B4@$B0&)
+M402)2Q2+5@2+!HE0!(D"Z<````"Y_P```&:!?A"%`'<,#[=&$`^VC"B8!```
+MC03)P>`"*<B+E5@%``"-',*+1B0E____`#WA`1``#X2#````@?G_````='O^
+M2TN#[`R->Q!7Z/S___^)P8/$$#GP=4>#[`A35>C\____@\00.7L0=%''@^@`
+M````+3$!QX/P`````````(F;]````(/L"(V#Z````%#_=13H_/___\9#2`"#
+MQ!#K'(U3$(M#$(E(!(D!B5$$B4L0BU8$BP:)4`2)`I"#Q`Q;7E]=PU575E.#
+M[!2+="0HBVPD+`^W11AF#[:\,)@$```/M]>-!-+!X`(IT(N66`4``(V$PN0`
+M``!05NC\____#[=5&(/$$(.\EI@"````=!B+A):8`@``@WAP`'4+QX26F`(`
+M```````/MT48QH0PF`0``/^#[`@/M]]3C88H"0``4.C\____BY98!0``C03;
+MP>`"*=C!X`.#Q!"`?!`^_W0/@^P(`=!05NC\____@\00@^P(55;H_/___P^W
+MUXN.6`4``(T$TL'@`BG0P>`#QD0((@"+EE@%``#&1!`C`8/$'%M>7UW#D%57
+M5E.#[`R+;"0@9L=$)`J``(GV#[=$)`IF#[:$*)@$``!F/?\`#X3D````9H%\
+M)`J!`'=[#[?`C01`C03`B<+!X@4IPHN%D`4``(T\D+X`````@'\P``^&KP``
+M`(U?*(/L#%/H_/___XU(^(/$$(M3!(E#!(D8B5`$B0*+02`E`/__`#T``/\`
+M=1GV02,$=!.#>1P`=`V+01R*5"0DB%`!C78`1HGQ.$\P=[3K7HGV#[?`C01`
+MC02`BY5T!0``C13"O@````"`>A\`=C^-=@")\0^VP8M,@CR%R70GBT$@)0#_
+M_P`]``#_`'48]D$C!'02@WD<`'0,BT$<BDPD)(A(`8GV1HGP.$(?=\3_1"0D
+M9O]$)`IF@7PD"H4`#X;R_O__.:TD!0``=1:#[`C_="0L@<5@#```5>C#_O__
+M@\00@\0,6UY?7<-3@^P0BUPD&(M$)!P/ME`S9@^VA!J8!```QH0:F`0``/\/
+MM\!0C8-X"0``4.C\____@\0(:@#_LR0%``#H=_[__X/$&%O#B?964X/L#(MT
+M)!B+1"0<#[=`)&8/MIPPF`0``,:$,)@$``#_#[?;4XV&4`D``%#H_/___XN6
+M=`4``(T<6XT<FXT$W0````"#Q!"`?!`T_W0/@^P(`=!05NC\____@\00@^P(
+M:@#_MB0%``#H`O[__X/$%%M>PU.+7"0(N0````"Z>````(G8C78`B`A`2G7Z
+MQD,H_\9#-/^-0Q2)0Q2)0QA;PXUV`%575E.#[!B+?"0LC8=0"0``4.C\____
+M@\00N@````"$P`^%W````(/L#(V'4`D``%#H_/___XG%LX*#Q!"-=@`/ML.`
+MO#B8!```_W43.)_(````<Q&(G\@```#K"8UV`$.`^X5VVKH`````@/N&#X2/
+M````#[;#B>J(E#B8!```#[?%C01`C02`C33%`````(GP`X=T!0``4.C\____
+MBY=T!0``9@^VPV:)1!8D@\0$@'\Y`74.BX=T!0``9L=$!C#__Y`/M]V+AW0%
+M``"-'%N-')O!XP/&1`,F`(N'=`4``&;'1`,R``"#[`AJ`/^W)`4``.C4_/__
+MB=H#EW0%``"#Q!")T(/$#%M>7UW#C78`@^P4BTPD&(M$)!P/ME`$9@^VA`H>
+M!0``QH0*'@4``/\/M\!0@<&@"0``4>C\____@\0<PU.+7"0(N0````"Z&`$`
+M`(G8C78`B`A`2G7ZQD-(_\9#/O_&0TH?C4,0B4,0B4,46\.-=@!55U93@^P8
+MBWPD+(V'*`D``%#H_/___X/$$+H`````A,`/A3$!``"#[`R-AR@)``!0Z/S_
+M__^)Q;,`@\00C78`#[;#@+PXF`0``/]U%V8/ML-F.8?$````<PYFB8?$````
+MZP60_L-YV+H`````@/N`#X3B````#[;#B>J(E#B8!```#[?5C032P>`"*="-
+M-,4`````B?`#AU@%``!0Z/S___^+EU@%``!F#[;#9HE$%AB+AU@%``#&1`8B
+M`(N'6`4``,9$!CG_BX=8!0``QD0&./^+AU@%``#&1`8Z_XN'6`4``,9$!CS_
+MBX=8!0``QD0&._^+AU@%``#&1`8]_XN'6`4``,:$!K(`````BX=8!0``QH0&
+MUP```/^#[`A7Z/S___^+EU@%``")A!;D````@\00@'\Y`74+BX=8!0``@$P&
+M)`$/M\6-%,#!X@(IPHN'6`4``(T4T(G0@\0,6UY?7<.)]E=64X/L'(MT)"R-
+MAG@)``!0Z/S___^#Q!"Z`````(3`#X4@`0``@^P,C89X"0``4.C\____B<?&
+M1"0?@(/$$`^V1"0/@+PPF`0``/]U%HI$)`\XAL<```!S%8B&QP```.L-B?;^
+M1"0/@'PD#X%VT+H`````@'PD#X(/A,<````/MD0D#XGZB)0PF`0```^WQXT$
+M0(T$P(G"P>(%*<*+AI`%``"[`````+D4#0``C020B!A`277Z#[?'C01`C03`
+MB</!XP4IP\'C`HG:`Y:0!0``C4(0B4(0B=@#AI`%``"#P!")0`2)V@.6D`4`
+M`(U"&(E"&(G8`X:0!0``@\`8B4`$B=H#EI`%``"-0BB)0BB)V`.&D`4``(/`
+M*(E`!(N&D`4``(I4)`^(5`,S@^P(:@#_MB0%``#HM?G__XG:`Y:0!0``@\00
+MB="#Q!!;7E_#D%=64X/L'(MT)"R-AJ`)``!0Z/S___^#Q!"Z`````(3`#X7+
+M````@^P,C8:@"0``4.C\____B<?&1"0?`(/$$`^V1"0/@+PP'@4``/]U#HI$
+M)`\X1C1S$(A&-.L+_D0D#X!\)`\#=MBZ`````(!\)`\$='X/MD0D#XGZB)0P
+M'@4```^WQXT40,'B`RG"NP````"Y7````(V$EB@!``"-=@"(&$!)=?H/M\>-
+M%$#!X@,IPHT4EHV"2`$``(F"2`$``(E`!(V"5`$``(F"5`$``(E`!(V"8`$`
+M`(F"8`$``(E`!(I$)`^(@BP!``"!PB@!``")T(/$$%M>7\.)]E93@^P$BW0D
+M$(V&W````+H`````.8;<````="F#[`R-AMP```!0Z/S___^)PXD$).C\____
+MB30DZ/S___^)0TR)VH/$$(G0@\0$6U[#C78`4X/L"(M<)!"+3"04C8/<````
+MBU`$B4@$B0&)402)"H-Y3`!T$X/L"(U!3%!3Z/S___^#Q!"-=@"#Q`A;PXUV
+M`(/L#(M4)!"-@N0```"Y`````#F"Y````'08@^P,C8+D````4.C\____QD`(
+M`(G!@\00B<B#Q`S#4XM<)`R+$XM$)`@%Y````(M(!(E0!(D"B4H$B1''`P``
+M``!;PXUV`(/L#(M$)!"-D.P```"Y`````#F0[````'0.@^P,4NC\____B<&#
+MQ!")R(/$#,.)]E.+7"0,BQ.+1"0(!>P```"+2`2)4`2)`HE*!(D1QP,`````
+M6\.-=@!3@^P(BT0D$(V0_````+D`````.9#\````="6#[`Q2Z/S___^)PX/$
+M$+@`````N9@```")VHUV`(@"0DEU^HG9B<B#Q`A;PY"+1"0(BU0D!('"_```
+M`(M*!(E"!(D0B4@$B0'#@^P,BT0D$(V0!`$``+D`````.9`$`0``=`Z#[`Q2
+MZ/S___^)P8/$$(G(@\0,PXGV4XM<)`R+$XM$)`@%!`$``(M(!(E0!(D"B4H$
+MB1''`P````!;PXUV`(/L#(M4)!"-@O0```"Y`````#F"]````'0;@^P,C8+T
+M````4.C\____QT`4`````(G!@\00B<B#Q`S#D%.+7"0,BQ.+1"0(!?0```"+
+M2`2)4`2)`HE*!(D1QP,`````6\.-=@!55U93@^P,BVPD((M$)"1F@7@0A0`/
+MAYD````/MT`0@+PHF`0``/\/A(<```"+5"0D9H-Z$']W(`^VE"B8!```BXU8
+M!0``C032P>`"*="+1,$HBD`$ZU^0BTPD)&:!>1"!`'<H#[=!$`^VA"B8!```
+MBXV0!0``C01`C03`B<+!X@4IPHM$D0B*0`3K*HM4)"0/MT(0#[:$*)@$``"+
+ME70%``"-!$"-!("+1,)4BD`$ZP6-=@"P_P^VP`^VO"@>!0``C01_P>`#*?B-
+MO(4H`0``BXV0!0``BT0D)&:!>!"%`'<B#[=`$`^VA"B8!```C01`C03`B<+!
+MX@4IPHT4D8E4)`CK"H'![`8-`(E,)`B+5"0DBT(T#[90`8/Z$G02@?J1````
+M#X0J`0``Z9D!``"0BP^)#"2^`````(I0"8A4)`>*0!J(1"0&O0````"`?PH`
+M=CV-7SB)]H/L#%/H_/___XG&@\00BT,$B7,$B1Z)1@2),(M,)`@Y3BQU#(I&
+M28M4)"0Z0A5T"$6)Z3A/"G?(BT0D)(-X4`!T$O]P4/]T)`3H_/___X/$"(UV
+M`(/L"/]T)"S_="0,Z/S___^*EI(```"-0@&(AI(```"#Q!"`^@-W)8!\)`8`
+M=1Z#[`QJ`&H"BU0D.`^V0A50_W8L5^C\____@\0@ZSR*EI(```"-0@&(AI(`
+M``"`^@)V*(!\)`8`=2'&1B,"QD8B_X!F)/Z#[`A6_W0D#.C\____@\00Z;P`
+M```/MD0D!E`/MD0D"U#_="005^C\____@\00Z9X```")]KH`````O@````"`
+M?PH`=CR-7SB0@^P,4^C\____B<*#Q!"+0P2)4P2)&HE"!(D0BTPD"#E*+'4,
+MBD))BTPD)#I!%70(1HGP.$<*=\@/MD(@J`)T(*@$=!RH`7084HM,)"@/MD$5
+M4/]R+%?H_/___X/$$(GVBT0D)(-X4`!T#O]P4%7H_/___X/$"(GV@^P(_W0D
+M+%7H_/___X/$$(/$#%M>7UW#5U93BWPD$(LW@^P,5NC\____B<.#Q!"%P'1N
+M@^P,5NC\____B<&#Q!"%P'1<C5,\QD,DX<9#)0'&0R80QD,5NXM$)!1F#[9`
+M,V:)0Q"+!XE#&,=#()````"-00B)0S2)2U#&0`$`QD$(0,=#;`````"#[`AJ
+M`%+H_/___X/$"%-6Z/S___^#Q!!;7E_#C78`55=64X/L&(M\)"R+;"0TBS=6
+MZ/S___^)PX/$$(7`='.#[`Q6Z/S___^)P8/$$(7`=&&-4SS&0R3AQD,E`<9#
+M)A#&0Q6[BT0D)&8/MD`S9HE#$(L'B4,8QT,@D````(U!"(E#-(E+4,9``1#&
+M00A`B>F(2`G'0VP`````@^P(:@!2Z/S___^#Q`A35NC\____@\00@\0,6UY?
+M7<.055=64X/L&(ML)"R+?"0TBT0D.(E$)!2+=0!6Z/S___^)PX/$$(7`#X2(
+M````@^P,5NC\____B<&#Q!"%P'1VC5,\QD,DX<9#)0'&0R80B?B(0Q6+1"0D
+M9@^V0#-FB4,0BT4`B4,8QT,@D````(U!"(E#-(E+4,9``9'&00A`B?F(2`F*
+M3"0(B$@*QT-L`````(/L"&H`4NC\____@\0(4U;H_/___\<$)*"&`0#H_/__
+M_X/$$(/$#%M>7UW#C78`55=64X/L&(M\)"R+;"0XBD0D-(A$)!>+-U;H_/__
+M_XG#@\00A<!U#,:%L0````'IC@```(/L#%;H_/___XG!@\00A<!U%H/L"%-6
+MZ/S____&A;$````!@\00ZV:-4SS&0R3AQD,E`<9#)A"*1"0+B$,5BT0D)&8/
+MMD`S9HE#$(L'B4,8QT,@D````(U!"(E#-(E+4,9``1+&00A`BDPD"XA("<=#
+M;`````"#[`AJ`%+H_/___X/$"%-6Z/S___^#Q!"#Q`Q;7E]=PXGV5U93BWPD
+M$(M<)!1F@7L0A0`/AY4````/MT,0@+PXF`0``/\/A(,```!F@WL0?W<D#[:4
+M.)@$``"+CU@%``"-!-+!X`(IT(M$P2AF#[90!.M@C78`9H%[$($`=RH/MT,0
+M#[:$.)@$``"+CY`%``"-!$"-!,")PL'B!2G"BT21"&8/ME`$ZRL/MT,0#[:$
+M.)@$``"+EW0%``"-!$"-!("+1,)49@^V4`3K"(UV`+K_````N?\```!F@7L0
+MA0!W#0^W0Q!F#[:,.)@$``!F@?K_`'06#[?"@+PX'@4``/]T"6:!^?\`=1:)
+M]H/L"%-7Z/S___^#Q!#ICP```(GV#[?"#[:T.!X%``"-!';!X`,I\(VTAR@!
+M``!F#[93)V8/MD,HP>`(`<*!XO\!```/MD,I@_@!=`6#^`AU0P^WTHN'K`4`
+M`(L$D#M#2'4R9HM('HG*9L'J!0^WTH/A'[C^____T\`A1)=$@^P(BT-(#[=`
+M'E!6Z/S___^#Q!"-=@"#[`A35^C\____@\006UY?PXUV`%575E.#[!B+1"0T
+MB40D%(M4)"R+.HM,)#`/MT$0#[:4.)@$``"-!-+!X`(IT(N76`4``(TLPE?H
+M_/___XG#BT0D-&:+<!Z)\&;!Z`4/M\")\8/A'[H!````T^*#Q!"%5(=$#X6X
+M````A=L/A+````"-4SR+3"0D#[9!%0^VC\8```#3X`GPQD,DX<9#)0'&0R8/
+MB$,G9L'H"(A#*(I$)`B(0RF+A:0```")0RJ+A:@```")0RZ+3"0DB4M(QD,5
+MJF:+11AFB4,0BTPD((L!B4,8QT,@`````,=#-`````#'0VQ4]0,`@^P(:@!2
+MZ/S___^#Q`A35^C\____BT0D-&:+2!Z)R&;!Z`4/M\"#X1^Z`0```-/B"52'
+M1(/$$(UV`(/$#%M>7UW#55=64X/L&(M4)"R+0BB+*%7H_/___XG&@\00A<!U
+M$8M$)"#&@+$````!Z94```"0@^P,5>C\____B<>#Q!"%P'4:BU0D(,:"L0``
+M``&#[`A65>C\____@\00ZVB-7CS&1B0EQD85JXM4)"!FBT(89HE&$(EN&,=&
+M(`@```#'1F0(````BT<(B48T@\`(B48XQD8<)(E^4,=&;`````"#[`AJ`%/H
+M_/___VH(_W<0_W<,4^C\____@\085E7H_/___X/$$(/$#%M>7UW#55=64X/L
+M&(M4)"R+0BB+*%7H_/___XG&@\00A<!U$8M$)"#&@+$````!Z9T```"0@^P,
+M5>C\____B<>#Q!"%P'4:BU0D(,:"L0````&#[`A65>C\____@\00ZW"-7CS&
+M1B2>QD8E$,9&,2#&1A6KBU0D(&:+0AAFB480B6X8QT8@(````,=&9`@```"+
+M1PB)1C2)?E"#P"")1CC&1APDQT9L`````(/L"&H`4^C\____:B#_=Q#_=PQ3
+MZ/S___^#Q!A65>C\____@\00@\0,6UY?7<-55U93@^P8BVPD+(I$)#"(1"07
+MBT4HBSA7Z/S___^)PX/$$(7`=0W&A;$````!Z:8```"0@^P,5^C\____B<:#
+MQ!"%P'46QH6Q`````8/L"%-7Z/S___^#Q!#K?8U#/(E$)`3&0R02@'PD"P!T
+M#L9#)0'&0R:`QD,H0.L$QD,H),9#%:MFBT489HE#$(E[&,=#(&````#'0V0(
+M````BT8(B4,TB7-0QT-L`````(/L"&H`_W0D$.C\____:F#_=A#_=@S_="0@
+MZ/S___^#Q!A35^C\____@\00@\0,6UY?7<.-=@!55U93@^P8BW0D+(M&*(L`
+MB40D%%#H_/___XG'NP`(``"#Q!"%P'4,QH:Q`````>F[````@^P,_W0D%.C\
+M____B<6#Q!"%P'4?QH:Q`````8/L"%?_="04Z/S___^#Q!#IB@```(UV`&:!
+M^_\`=@6[_P```,9')!K&1R4(QD<F",9')P"(7RC&1RD`QD<5JV:+1AAFB4<0
+MBT0D"(E'&`^WVXE?(,='9`@```"+10B)1S0!V(E'.,9''"2);U#'1VP`````
+MC7<\@^P(:@!6Z/S___]3_W40_W4,5NC\____@\085_]T)!3H_/___X/$$(/$
+M#%M>7UW#D%=64XM\)!"+1RB+,(/L#%;H_/___XG#@\00A<!U"L:'L0````'K
+M49#&0"05QD`5JV:+1QAFB4,0B7,8:@%J`5-6Z/S___^#Q!"$P'47@^P(4U;H
+M_/___\:'L0````&#Q!#K%9#'0VP`````@^P(4U;H_/___X/$$%M>7\.X!```
+M``^V5"0$@_H7=SG_))5(%@``@\`DPX/`.,.#P!##@\`<PX/`2,.#P!S#@\`\
+MPX/`),.#P!C#@\`4PX/`2,.#P#"-=@##C78`5E.#[`2+="00BUPD%(![/O]T
+M&8/L"`^V0SY0_S;H_/___\9#/O_^3BR#Q!"#Q`1;7L.)]E=64XM\)!"+5"04
+M#[9"(*@"=`VH!'0)J`$/A+4```"0@'H^_P^%J@```(L'BX`8`0``HP````")
+MQK$`N`$```")P]/CA?-U+(A*/HL7B?`)V(F"&`$``(L'BX!8`0``HP````")
+MQB'>=&2+!XFP6`$``.M:08#Y'W;&BP>+@!P!``"C`````(G&L0"X`0```(G#
+MT^.%\W4PC4$@B$(^BQ>)\`G8B8(<`0``BP>+@&`!``"C`````(G&(=YT$8L'
+MB;!@`0``ZP>008#Y'W;"_D<LC78`6UY?PU93@^P$BW0D$(M<)!2`>S3_=!F#
+M[`@/MD,T4/\VZ/S____&0S3__DXL@\00@\0$6U[#B?975E.+?"00BU0D%(!Z
+M-/\/A:<```"+!XN`&`$``*,`````B<:Q`+@!````D(G#T^.%\W4LB$HTBQ>)
+M\`G8B8(8`0``BP>+@%@!``"C`````(G&(=YT8(L'B;!8`0``ZU9!@/D?=L:+
+M!XN`'`$``*,`````B<:Q`+@!````B</3XX7S=2R(2C2+%XGP"=B)@AP!``"+
+M!XN`8`$``*,`````B<8AWG00BP>)L&`!``#K!D&`^1]VQOY'+(UV`%M>7\-5
+M5U93@^P,BVPD((M=`+X`````9H-[0``/AA$!``")]@^WUHN#K`4``(,\D``/
+MA/$````/MGT$BP209H%X$(4`#X>Z````#[=0$("\&I@$``#_#X2H````9H-X
+M$']W*P^VE!J8!```BXM8!0``C032P>`"*="+1,$H#[9`!#GX#X2#````Z9H`
+M```/M]:+@ZP%``"+!)!F@7@0@0!W+0^W0!`/MH08F`0``(N+D`4``(T$0(T$
+MP(G"P>(%*<*+1)$(#[9`!#GX=#_K60^WUHN#K`4``(L$D`^W0!`/MH08F`0`
+M`(N3=`4``(T$0(T$@(M$PE0/MD`$.?AT#>LGC78`@?__````=1R#[`AJ``^W
+MUHN#K`4``/\TD.C\____@\00C78`1F8Y<T`/A_'^__^#Q`Q;7E]=PY"+3"0(
+MBU%,A=)T(HM!)(E"#(M!*(E"$(M!+(E"%(M!,(E"&(M!-(E"',9""`'#B?:+
+M3"0(BU%,A=)T'HM"#(E!)(M"$(E!*(M"%(E!+(M"&(E!,(M"'(E!-,.)]E=6
+M4XMT)!"+7"04.7,8#X2H````@'L4``^%B@````^V0R2#^!5T!8/X575\BTM,
+MA<ET=8!Y"`%U;V:!>0SA`75GB[Y8!0``C9?H%@$`9H%[$(4`=Q</MT,0#[:4
+M,)@$``"-!-+!X`(IT(T4QP^V00Z#^`=T&(/X!W\'@_@&=!7K)X/X#'0<@_@-
+M=!#K&V:#8C;]ZQ1F@THV`NL-9H-B-O?K!F:#2C8(D(-[4`!T#HU#4%!6Z/S_
+M__^#Q`B09H%[).$!#X4T`0``9H%[$(4`=W@/MT,0@+PPF`0``/]T:HN.6`4`
+M`(V1Z!8!`&:!>Q"%`'<3#[:4,)@$``"-!-+!X`(IT(T4P8![%`!U/0^V0R:#
+M^`=T&(/X!W\'@_@&=!7K*(/X#'0<@_@-=!#K'&:#8C;]ZQ5F@THV`NL.9H-B
+M-O?K!V:#2C8(B?9F@7LDX0$/A:@```"`>R8+#X6>````B?=FBTL0#[?1#[9&
+M+DA!.<)](P^V1BZ-4/]F@?F%`'<-#[?!@+PXF`0``/]U#0^WP4$YT'SDN/\`
+M``!F/?\`=%B)]V:+2Q`/M]$/MD8N2$$YPGTF#[9&+HU0_XUV`&:!^84`=PT/
+MM\&`O#B8!```_W4-#[?!03G0?.2X_P```&:)0Q#&0Q2`@^P(4U;H_/___X/$
+M$.D9`0``QD,4`)`Y<QAT)(M#3(7`=!V`>`@!=0I35NC\____@\0(C4-,4%;H
+M_/___X/$"(-[5`!T#8U#5%!6Z/S___^#Q`B#[`A3_W,8_U-L@\009H%[).$!
+M=5N*0R:#Z!$\`7=1N?\```!F@7L0A0!W#`^W0Q`/MHPPF`0``('Y_P````^$
+ME````(T$28T$@(N6=`4``(T$PH!X*0!U?X!X-/]T>8/L"%!6Z/S___^#Q!#K
+M:HGVN?\```!F@7L0A0!W#`^W0Q`/MHPPF`0``(T$R<'@`BG(BY98!0``C13"
+MBT,D)?___P`]X0$0`'0O@?G_````="=F@7LDX0%U"XI#)H/H$3P!=A60@'I+
+M`'4.@^P(4E;H_/___X/$$)!;7E_#5U93BW0D$(M\)!1FBU<>B=!FP>@%#[?8
+MB=&#X1^X_O___]/`B<$A1)Y$9H'Z_P]T1P^WPHN6K`4``(,\@@!T.,<$@@``
+M```AC)ZP!0``@^P(4(V&``D``%#H_/___X/$"%=6Z/S___^#Q`A75NC\____
+M@\00C78`6UY?PU93@^P0BT0D'(N8X`D```4`"0``4.C\____B<8/M]#!X@8!
+MVHM$)"2)$(/$$+L`````N4````")T(UV`(@80$EU^@^WQH/$!%M>PY!75E.#
+M[`2+?"04BD0D'(A$)`.^`````+@`````@W\H`'1"ZP2)QNLEBT\HL@"-=@`/
+MML*#?($\`'0-BT2!/(I<)`,X6$ETW4*`^@1VXXM'*&:!>"2%`'<&B?"%]G4&
+MN`````"0@\0$6UY?PY!55U93BWPD%&8/MEPD'`^V1"08P>`(`<.]`````(!_
+M'``/A+T```"#?S@`#X2S````]D=D"74%O0$```"Q`+Y`$```D`^VT8G89B,$
+MUF8[!-8/A8$```"`?-8%`W0'@'S6!0=U"P^VP8GJ.%3&!'5HQD<4(`^VV0^V
+M1-X&4`^V1-X%4%?H_/___XM7.(I$W@>(0@V#Q`R#?"0@`'0KBT0D((L8BW`$
+MBT<XB7`#BT<X@`B`]D=F!'00A?9T#(M'.(E8"(M'.(`@?XM7.(I''(/H!XA"
+M!^L.B?9!@/D/#X9B____B?9;7E]=PXUV`%575E.#[`R+?"0@BW0D)&:!?A"%
+M``^'B0````^W1A"`O#B8!```_W1[9H-^$']W(`^VE#B8!```BX]8!0``C032
+MP>`"*="+1,$HBD@$ZU>09H%^$($`=R@/MT80#[:$.)@$``"+CY`%``"-!$"-
+M!,")PL'B!2G"BT21"(I(!.LF#[=&$`^VA#B8!```BY=T!0``C01`C02`BT3"
+M5(I(!.L%C78`L?^Z_P```&:!?A"%`'<-#[=&$&8/MI0XF`0``(#Y_P^$DP``
+M``^VP8"\.!X%``#_#X2"````9H'Z_P!T>X!^%`9T=0^VG#@>!0``C01;P>`#
+M*=B-G(<H`0``#[?2C032P>`"*="+EU@%``"-+,*`?B8!=2B#[`QJ"NC\____
+M@\0(5E?H_/___X/$#&H"55/H_/___X/$$.L?C78`@^P,:/0!``#H_/___X/$
+M"%97Z/S___^#Q!")]H/$#%M>7UW#5U93BW0D&(M$)!"+&(/L#%/H_/___XG"
+M@\00A<!T:<9`).'&0"4!B?"(0B;&0B</BT0D%&:+0!AFB4(0B5H8QT(@````
+M`,="-`````#'0FP`````@^P(4E/H_/___X/$$(GP/`%U$8/L#&H%Z/S___^#
+MQ!#K$HGV@^P,:%##``#H_/___X/$$%M>7\-64X/L!(MT)!"+7"049H%[$(4`
+M#X>+````#[=#$("\,)@$``#_='UF@WL0?W<B#[:4,)@$``"+CE@%``"-!-+!
+MX`(IT(M$P2B*2`3K68UV`&:!>Q"!`'<H#[=#$`^VA#"8!```BXZ0!0``C01`
+MC03`B<+!X@4IPHM$D0B*2`3K)@^W0Q`/MH0PF`0``(N6=`4``(T$0(T$@(M$
+MPE2*2`3K!8UV`+'_LO]F@7L0A0!W"P^W0Q"*E#"8!```@/G_=!@/ML&`O#`>
+M!0``_W0+@/K_=`:`>Q0&=22#>U``=`Z-0U!05NC\____@\0(D(/L"%-6Z/S_
+M__^#Q!#K:9`/ML$/MHPP'@4``(T$2<'@`RG(C8R&*`$```^VTHT$TL'@`BG0
+MBY98!0``C03"@'L4`'00@^P$:@%04>C\____@\00D(-[4`!T#HU#4%!6Z/S_
+M__^#Q`B0@^P(4U;H_/___X/$$(UV`(/$!%M>PXGV55=64X/L&(M$)"R+*%7H
+M_/___XG&@\00A<`/A(L```"#[`Q5Z/S___^)QX/$$(7`=1*#[`A65>C\____
+M@\00ZVJ-=@"-7CS&1B3AQD8E`<9&)@Z+5"0D9HM"&&:)1A!F@V(T]XM4)""+
+M`HE&&,=&(``(``"+1PB)1C2)?E#'1FP(!P0`@^P(:@!3Z/S_____=B#_=Q#_
+M=PQ3Z/S___^#Q!A65>C\____@\00@\0,6UY?7<.05U93BWPD$(MT)!2+1RB+
+M&(/L#%/H_/___XG"@\00A<!T/L9`)!O&0"4!B?"(0BAFBT<89HE"$,9":`^)
+M6AC'0B``````QT(T`````,=";`````"#[`A24^C\____@\006UY?PU=64XM\
+M)!"+1RB+,(/L#%;H_/___XG#@\00A<!T;(/L#%;H_/___XG"@\00A<!U&,:'
+ML0````&#[`A35NC\____@\00ZT2)]L9#)`!FBT<89HE#$,9#:`^)<QC'0R``
+M````QT,T`````(M""(E#.,9#'"2)4U#'0VP`````@^P(4U;H_/___X/$$%M>
+M7\.)]E575E.#[!"+;"0HBUPD+,9#(P'&0R(`4VH&5>C\____@\00@WLL`'01
+MBU,,BT,(B5`$B0*+0RS^2#"`>TL`="&#[`S_="0LZ/S____'!"0!````Z/S_
+M__^#Q!"`>TL`==^#N^``````=!Z#[`1J`0^V@]4```!0_[/@````Z/S___^#
+MQ!"-=@"#>RP`=!:#[`1J`0^V0TE0_W,LZ/S___^#Q!"0@WL<``^$J````(MS
+M'(-^<``/A8T```"#?G0`#X6#````]D,D!'4LBT0D(/Z`5PP``(/L#%#H_/__
+M_X/$#&H!BT,<#[9``5#_="0LZ/S___^#Q!"#[`2+0QP/MD`"4(M#'`^V0`%0
+M:(T!``#H_/___X/$#/]S'(M$)"C_L"0%``!J`>C\____@\0,_W,<BT0D*/^P
+M)`4``&H&Z/S___^#Q!"-=@#'0QP`````QT9@`````(-[,`!T#XM3,`^V0TG'
+M1((\`````(M3!(L#B5`$B0+^30J#[`A3_W0D+.C\____@\00@'T%_W16OP``
+M``"`?0H`=C>-=3B#[`Q6Z/S___^)PX/$$(M&!(E>!(DSB4,$B1B`>R+_=0I'
+MB?@X10IWU^L)B?@X10IW%HGVQD4%_X/L"%7_="0LZ/S___^#Q!"#Q`Q;7E]=
+MPP^V1"0(C13`P>(#*<*-%)"-%)5T10``BT0D!(D0PXGV5E.#[`2+="04BD0D
+M&(A$)`.+7"00N`````")\8G:A?9T"(GVB`)"277ZB3.-AHRZ___!Z`*Z6;;Y
+M<O?BB=#!Z`>(0P2*1"0#.$,$=@.(0P2Q`(![!`!V(0^VT<9$$P?_C032P>`#
+M*="-!(+&A(/810``_4$X2P1WW\9#!@#&0P4`L0"0#[;!C12`C130C923D#$`
+M`,9"!P&(2@9!@/D?=N.#Q`1;7L.055=64X/L#(ML)"2+="0@OP````"`?@0`
+M=CZ)]HGX#[;8C03;P>`#*=B-!(.-A(;010``@'@(_707@^P$:@A54.C\____
+M@\00A,!T!(G8ZPU'B?@X1@1WQ+C_````@\0,6UY?7<.-=@!3@^P0BUPD&/]T
+M)!Q3Z/S___^#Q!"Z"0```#S_=!8/MM"-!-+!X`,IT(T$@@^VE(-Z10``B="#
+MQ`A;PY!55U93@^P,BUPD)(V#D````(G?B[.8````@'X&``^$00$``(/L"%!6
+MZ/S___^)Q8/$$#S_#X0J`0``#[9#`8/X`71E@_@!?PR%P'0AZ1,!``"-=@"#
+M^!`/A(,````]D`````^$Q0```.GW````@+Z7,0````^%Z@```,:&ES$```'^
+M3@:#[`AJ`&H`:@")Z@^VPE#_="0X5NC\____@\0@Z;\```"-=@"`OI<Q````
+M#X6O````QH:7,0```?Y.!H/L"&H`:@!J`8GJ#[;"4/]T)#A6Z/S___^#Q"#I
+MA````+$!B?8/ML&-%("-%-"-A):0,0``B>HX4`1U"8I`!3I'"70'D$&`^1]V
+MVOY.!H/L"%</MD<)4&H0B>H/ML)0_W0D.%;H_/___X/$(.LW#[:#H@```(T4
+M@(T4T,:$EI<Q```!_DX&@^P(:@!J`&B0````B>H/ML)0_W0D.%;H_/___X/$
+M((/$#%M>7UW#55=64X/L!(ML)!R*1"0DB$0D`XM4)"AFB10DBUPD&+\`````
+MB?D/ML&-%$")T<'A!@'*C110.6S3%`^%C````+D`````B?@/MO"-!':)PL'B
+M!@'0C01&C13%`````(GV#[?!C01`C03"C408((!X$`!T!H!X$/!U2P^WT8T4
+M4HT$=HG!P>$&`<B-!$:-%`*-%-.):AR+3"0@B4H@C4(0BPPD9HE(%HI,)`.(
+M2!2+3"0LBP&)0BB+002)0BS&0C#_ZPJ)]D%F@?F!`':41XGX/`,/ADW___^#
+MQ`1;7E]=PY!55U93@^P,BVPD(`^V?"0HB>N-M?0P``#&A9<Q````N@````"Y
+MD````(GPD(@00$EU^L9&`0#&!D#'@Y`Q``!T#00`B:N,,0``B?@/MM"-!-+!
+MX`,IT(T$@HT$@XN0T$4``(F3A#$``(N`U$4``(F#B#$``(/L"(V#]#```%#_
+M="0PZ/S___^#Q!Q;7E]=PY!55U93@^P,BVPD(`^V?"0HB>N-M?0P``#&A9<Q
+M````N@````"YD````(GPD(@00$EU^L9&`0'&!D#'@Y`Q``!T#00`B:N,,0``
+MB?@/MM"-!-+!X`,IT(T$@HT$@XN0T$4``(F3A#$``(N`U$4``(F#B#$``(/L
+M"(V#]#```%#_="0PZ/S___^#Q!Q;7E]=PY!55U93@^P,BDPD*(I$)"R(1"0+
+MBWPD(+,!#[;!C13`C2S5`````"G%C2RHD`^VPXT4@(T4T(V$EY`Q``"`>`<!
+M#X6V````B$@$BE0D"XA0!<9`!P`/MG`&C02VC03&C;2']#```+D`````NI``
+M``")\(UV`(@(0$IU^L9&`1#&!D"*1"0+B$8)#[;#C0R`C0S(C0R/C9F0,0``
+M#[9#!HT4@(T4T(T4E\>"D#$``'0-!`"+1"0@B8*,,0``C12OBX+010``B8&$
+M,0``BX+410``B8&(,0``@^P(#[9#!HT4@(T4T(V4E_0P``!2_W0D,.C\____
+M@\00ZQ*-=@!#@/L?#X8F____N`$```"#Q`Q;7E]=PY!55U93@^P,BD0D+(A$
+M)`N+;"0PBWPD(+,!B>H/MM:)5"0$B?8/ML.-%("-%-"-%)>-@I`Q``"`>`<!
+M#X6H````QD`'`(FZC#$```^V0`:-%("-%-"-M)?T,```N0````"ZD````(GP
+MD(@(0$IU^L9&`9#&!D"*3"0$B$X&B>B(1@>*5"0+B%8)BTPD-(L!B480BT$$
+MB484#[;#C12`C130C127QX*0,0``=`T$`(M$)"")@HPQ``"+3"0HBT%<B8*$
+M,0``BT%@B8*(,0``@^P(@<+T,```4O]T)##H_/___X/$$.L2C78`0X#['P^&
+M,O___[@!````@\0,6UY?7<.055=64X/L#(ML)""*1"0LB$0D"XM\)#")[HV=
+M]#```+D`````NI````")V)"("$!*=?K&0P$3Q@-`B?H/ML:(0P:(4P>*5"0+
+MB%,)QX:0,0``=`T$`(FNC#$``(M4)"B+0ER)AH0Q``"+0F")AH@Q``"#[`B-
+MAO0P``!0_W0D,.C\____@\0<6UY?7<.+1"0(#[94)`QFBTQ0<$%FB4Q0<&8/
+MMD`"`<@/M\##D(M,)`2Z`0```(UV`(T$DHT$PH"\@9<Q```!=02)T,.00H/Z
+M'W;FN/__``##4X/L"(M<)!"*1"04B$0D`XI,)!B(3"0'N@$```"-=@"-!)*-
+M!,*-A(.0,0``BDPD`SA(!'42BDPD!SA(!74)QD`'`>L)C78`0H/Z'W;2@\0(
+M6\.055=64X/L/(I$)%B(1"0OBDPD7(I4)&"(5"0NBVPD4(M\)&0/MM"-!-+!
+MX`,IT(T$@H"\A=A%``#]=06Q_8UV``^VP8/X$`^$M`(``(/X$'\7A<`/A)L`
+M``"#^`$/A#0!``#I00D``)`]X@````^$L0@``#WB````?Q(]D`````^$CP<`
+M`.D>"0``B?8]_P````^%$0D```^V5"0OC032P>`#*="-!(+&A(7810``_X"]
+MES$```%U)(/L!%+_="1<_W0D7.C\____@\00A<`/A=0(``#^10;IS`@```^V
+M1"0OQD0%!P&+5"14B52%#.FU"```D(V=]#```("]ES$```%U50^V3"0OC03)
+MP>`#*<B-!(&-1(4`BE,)B)!V10``!=!%``"*4PJ#X@&(4`G&0`@`@^P$4?]T
+M)%S_="1<Z/S___^#Q!"%P`^%6@@``/Y%!NE2"```B?8/MD0D+\9$!0<!BU0D
+M5(E4A0SI.0@``,9$!0?_@^P(:@!J`&C_````4/]TA0S_="1LZ/S___^#Q"#I
+M$@@``+\`````C8WT,```#[94)"^)UHT$TL'@`RG0C02"C5R%`(I!,HB#QD4`
+M`&:+03!FB8/$10``BT$HB8.T10``BT$LB8.X10``BT$,B8.$10``BT$0B8.(
+M10``C9.410``BT$4B8.410``BT$8B4($BT$<B4((BT$@B4(,BT$DB8.L10``
+MQH/810```8!]!A\/A'X'``"`NW9%````#X29````#[9$)"^-%,"-'-4`````
+M*<.-')B)7"0HB40D#)")^@^VPE!6_W0D7/]T)%SH_/___X/$$(7`=2]'_D4&
+MC03VP>`#*?"-!(:-1(4`B?HXD'9%``!U"<:`QT4```#K&XB4G<=%``#K$HGZ
+MBT0D*(B4A<=%``#K(XUV`(!]!A]T&HMT)`R-!/;!X`,I\(T$AHGZ.)2%=D4`
+M`'>$QH67,0```;(`@'T$``^&Q08``)`/ML*`?`4'`0^$??[__T(X501W[.FK
+M!@``C78`QD0D)_^+1QB)1"0PC4PD,(M''(E!!`^V5"0OC032P>`#*="-!(*-
+M=(4`C8;010``QD`($/9'#'`/A)8#``"#OMQ%````=&V*6`J#[`1J"%&+AMQ%
+M``"#P%Q0Z/S___^#Q!"$P'5.]D</#W1(B[;<10``A?9T/H!^90!T+0^VVU-6
+M5>C\____C5<84@^WP%!35O]T)'#_="1PZ/S___^*7F:+=FB#Q"3K!;X`````
+MA?9UQ(GV#[9/#_;!#0^$.P$```^V5"0OC032P>`#*="-!(*-%(4`````C80J
+M<$4``(!X!!\/AQ,!``"*0`2(1"0E]L$(=!(/ML#!X`0!T,:$*.A'```&ZR,/
+MMDPD)0^V5"0OP>$$C032P>`#*="-!(*-!('&A"CH1P``!P^V5"0E#[9$)"_!
+MX@2-#,#!X0,IP8T,B,'A`@'*`>J-FN!'``#&0PD`BD</B$,+BT0D,(F"\$<`
+M`(M$)#2)@O1'``"*1PF(0PJ*5PV#X@^*A"EZ10``.-!V`HC0B,*#X@^*0PR#
+MX/`)T(A##`^V3"0E#[94)"_!X02-!-+!X`,IT(T$@L'@`@'!C8PIX$<``(I7
+M*8/B#XJ$*'I%```XT'8"B-"(PL'B!(I!#(/@#PG0B$$,#[94)"^-!-+!X`,I
+MT(T$@OZ$A71%``#IVP$``(UV`/9'#P(/A,X!``"#[`B-1"0X4%7H_/___XA$
+M)#:#Q!`\_P^%30$``,9$)"<`@'T$`'8P#[94)">-!-+!X`,IT(T$@HV$A=!%
+M``"`>`C_=!.`>`C]=`W^1"0GBD0D)SA%!'?0#[94)">-!-+!X`,IT(T$@KD`
+M````NF0```"-A(5T10``D(@(0$IU^@^V5"0GC032P>`#*="-!(*-1(4`#[94
+M)"^-'-+!XP,ITXT<FHU<G0"-DW1%``")D-Q%``"+D]!%``")D,A%``"+D]1%
+M``")D,Q%``"+5"14B9#D1P``BY/@10``B9#@10``QH#810``_XV0<$4```^V
+M<@N*3PF(C#!\10``_D(+BD\-@^$/BH-Z10``.,AV`HC(B$(*#[94)">-!-+!
+MX`,IT(T$@HU$A0"-B-!%``"+5"0PB9#010``BU0D-(E1!(I7#XB0=T4``(I$
+M)"Z(00J*104Z101U!,9%!0#^107K4\9'!P#I.`,```^V1"0OC0S`P>$#*<&-
+M#(@/ME0D)HT$TL'@`RG0C02"C5R%`(V#=$4``#F$C=Q%``!T%XV#<$4```^V
+M2`N*5PF(E`M\10``_D`+@'PD)O]U$P^V1"0GQD0%!P&+5"14B52%#)`/MD<)
+M4`^V7"0S4U7H_/___XT$V\'@`RG8C02#@\0,@+R%QT4````/A+,```"`?08?
+M#X2=`@``#[9<)"^-!-O!X`,IV(T$@\'@`HT4*(E4)""!PG!%``")5"0<`>B)
+M1"00ZV.0BW0D$,:&V$4``!"-OL!%```/MD<'4%/_="1<_W0D7.C\____@\00
+MA<`/A4$"``#^108/MD<'0`^VEG9%```YT`^$Z?[__XT$V\'@`RG8C02#_H2%
+MQT4``(!]!A\/A`X"``"+5"0@BH+'10``BU0D'#I"!G*+Z?8!``")]H!]!@`/
+MA>H!``"#[`AJ`&H`:)`````/MD0D0U#_="1L_W0D;.C\____@\0@Z<,!``#&
+M1`4'_X/L"&H`:@!H_P```%#_=(4,_W0D;.C\____QD0D-P&#Q"#IX0```(UV
+M`,9$)!<`QT0D&`````"+5"08C012B<+!X@8!T(M4)!B-!$*+5"14.53%%'5]
+MNP````"+5"08C012B<+!X@8!T(M4)!B-!$*-/,4`````C78`C01;C03'C0PH
+MC7$@@'X0_W4^@'T&'P^$*`$``(/L"(U!*%"-41`/MT(64`^V0A10_W$@_W0D
+M;/]T)&SH_/___X/$((7`=0G^10;&1A#PB?9#@?N!````=J?_1"08@WPD&`,/
+MAE7___^`?08`#X72````L@"`?00`=A0/ML*`?`4'`0^$^?[__T(X501W[(!\
+M)!<`#X6K````@^P(:@!J`&CB````#[9$)$-0_W0D;/]T)&SH_/___X/$(.F$
+M````LP"`?00`=BL/MM.-!-+!X`,IT(T$@HV$A=!%``"`>`C]=`J`>`C_=`3&
+M0`C^0SA=!'?5#[94)"^-!-+!X`,IT(T$@HNTA>!%``"S``^VPXT40(G1P>$&
+M`<J-%%"-5-4`C4(0@'@(`743QD`(`(/L"/]R%/]T)%S_UH/$$$.`^P-VRHGV
+M@\0\6UY?7<-55U93@^P$BWPD'(ML)"2*1"0@B$0D`XM,)!C&10#^LP"^````
+M`(!Y!`!V-@^VTXT$TL'@`RG0C02"C02!.;CD1P``=1>)\CI4)`-U"XJ`V$4`
+M`(A%`.L*1HUV`$,X601WRH/$!%M>7UW#B?955U93@^P,BVPD((I$)"R(1"0+
+MB>Z*104Z101U!,9%!0`/MGX%LP`/ML.-%$")T<'A!@'*C110C036BU0D)#E0
+M%'5%QD`8`;\`````@'X$`'9HB?@/MM"-!-+!X`,IT(T$@HT$AHM4)"0YD.1'
+M``!U#8J`V$4``(/``SP!=CQ'B?@X1@1WS.LR#[;#C11`B='!X08!RHT44(T$
+MUH-X%`!U#XM4)"2)4!3&0!@!ZPR)]D.`^P,/AFW___\/ML.-%$")T<'A!@'*
+MC110NP````"Y`@P``(U$UAR(&$!)=?J)^`^VT(M$)"2)1)8,C032P>`#*="-
+M!(*Y`````+ID````C82&=$4``(@(0$IU^HGX#[;0C032P>`#*="-!(*Y````
+M`+H``@``C82&Y$4``(GVB`A`2G7ZB?H/MLJ-!,G!X`,IR(T$@8T$AHM\)"2)
+MN.1'``"+5"0PB9#@10``C9C010``QD,(_\>`W$4```````"+?"0HBQ>)D-!%
+M``"+5P2)4P2*5"0+B)!Z10``@^P(:@!J`&C_````4?]T)#Q5Z/S____^1@6#
+MQ"Q;7E]=PY!55U93BVPD&(MT)!2_`````(!^!``/AI8```")^`^VT(T$TL'@
+M`RG0C02".:R&Y$<``'5QLP$/ML.-%("-%-"-A):0,0``B?HX4`1U!,9`!P%#
+M@/L?=M^)^`^VT(T$TL'@`RG0C02"C02&QX#D1P```````+D`````NF0```"-
+M@'1%``"("$!*=?J)^`^VT(T$TL'@`RG0C02"QH2&V$4``/W^3@5'B?HX5@0/
+MAVK___^_`````(GZ#[;"C11`B='!X08!RHT44(T$UCEH%'4XQT`4`````,9`
+M&`"S`(GZ#[;"C11`B='!X08!RHT44,'B`XGV#[;#C01`C03"QD0P,`!#@/N!
+M=NQ'B?@\`W:G6UY?7<-55U93@^P<BTPD-(M$)$"*5"0\B%0D&XM\)#"]````
+M`+,`@'PD.`$/A?<```"%P`^$U````(E$)!2`?P0`=BF0B>@/MM"-!-+!X`,I
+MT(T$@CF,A^1'``!U!SI<)!MT"4-%B>HX5P1WV(GJ#[;"C1S`P>,#*<.-')B-
+M')^-@W1%``"#[`1J9%#_="0@Z/S___^^`````(/$$("[=$4```!T:(GH#[;0
+MC032P>`#*="-!(+!X`*)1"0,C90X<$4``(E4)!"0B?(/ML+!X`2+5"04C1P0
+MC4MD`T0D#`'XC9#H1P``BX#H1P``B4-DBT($B4$$BT((B4$(BT(,B4$,1HGP
+MBU0D$#A"!'>[B>@/MM"-!-+!X`,IT(T$@@^VA(=T10``ZSJ0O0````"^````
+M`(!_!`!V)(GP#[;0C032P>`#*="-!((YC(?D1P``=0-%B?9&B?(X5P1WW(GJ
+M#[;"@\0<6UY?7<.0D)!64XM$)`R+$(LRL0"`>BL`=A0/ME@)B?:)V-/XJ`%U
+M!D$X2BMW\H#Y`W81#[;!BX2&T`$``*,`````ZP\/ML&+A(;0`0``HP````"I
+M```0``^5P`^VP%M>PXUV`%575E.#[`R+1"0DBU0D((LJBWT`QD`A`,9`(`7&
+M0",&B5`HQD0D!P#'1"0(`````+,`@'TK`'88BTPD(`^V40F)T(C9T_BH`74&
+M0SA=*W?P@/L#=A,/ML/'A,<``@``+````.L1C78`#[;#QX3'``(``"P```"#
+M[`QH$"<``.C\____@\00@/L#=A4/ML.+A,<$`@``HP`````/MO#K$Y`/ML.+
+MA,<$`@``HP`````/MO`)="0(@/L#=A$/ML/'A,<``@``)````.L/D`^VP\>$
+MQP`"```D````@^P,:!`G``#H_/___X/$$(#[`W89#[;#BX3'!`(``*,`````
+MB<:!YO___P#K%P^VPXN$QP0"``"C`````(G&@>;___\`B?#!X`@)1"0(@/L#
+M=A,/ML/'A,<``@``(````.L1C78`#[;#QX3'``(``"````"#[`QH$"<``.C\
+M____@\00@/L#=A4/ML.+A,<$`@``HP````")QNL3B?8/ML.+A,<$`@``HP``
+M``")QH%\)`@!`6F6=1F+1"0@@$@(!HGPP>@0/%`/E,`/ML#K2HGV@7PD"`$!
+M``!U$HGPP>@0/%`/E,`/ML#K+XUV`(/L#&B($P``Z/S___^#Q!#^1"0'@'PD
+M!P0/AD'^__^)\,'H$#Q0#Y3`#[;`@\0,6UY?7<-64X/L!(MT)!"+'E;H_/__
+M_X/$!(3`=13&1@7_@^P(5E/H_/___X/$$.M=D+$`@'LK`'82#[96"8G0T_BH
+M`74&03A+*W?R@^P,4^C\____B<&#Q!"%P'0PC48XBU`$B4@$B0&)402)"OY&
+M"HEQ*,9!(`7&02$`QD%)#VH!:@%15NC\____@\00@\0$6U[#B?955U93@^P,
+MBVPD((MT)"2+?0"["@```)"#[`A65>C\____@\00A,!U$X/L#&CH`P``Z/S_
+M__^#Q!!+==RQ`(!_*P!V$@^V50F)T-/XJ`%U!D$X3RMW\HM6!(L&B5`$B0+^
+M30J#[`A65^C\____@\00]D4(`G1*@WTH`'49@^P,5^C\____@\00A<`/A&@!
+M``")12CK`XM%*(DXB6A4QD`J`,9`*P#&0"8`9H-(,@2#[`A05^C\____@\00
+MZ3@!``"#?2@`#X3-````@^P(BT4H@\!84/]W%.C\____@\0(_W4H5^C\____
+M@\00C44XB<(Y13@/A)<```")PY"#[`Q2Z/S___^)QH/$$(-X'`!T98M`',=`
+M8`````#V1B0$=27^AU<,``"#[`Q7Z/S___^#Q`QJ`8M&'`^V0`%05^C\____
+M@\00@^P$_W8<_[<D!0``:@'H_/___X/$#/]V'/^W)`4``&H&Z/S____'1AP`
+M````@\00_DT*@^P(5E?H_/___X/$$(G:.5TX#X5L____QT4H`````(!]"@!T
+M%H/L#(U%.%#H_/___XG&_DT*@\00ZPZ#[`Q7Z/S___^)QH/$$(7V=#.-13B+
+M4`2)<`2)!HE6!(DR_D4*B6XHQD8@!<9&(0#&1B,&QD8B`X/L"%97Z/S___^#
+MQ!"#Q`Q;7E]=PU575E.#[`R+?"0@BVPD)(I$)"B(1"0+BD0D+(A$)`J+!XE$
+M)`2Z`````+X`````@'\*`'8WC5\X@^P,4^C\____B<*#Q!"+0P2)4P2)&HE"
+M!(D0.6HL=0R*1"0+.$))=`N-=@!&B?`X1PIWS(GP.$<*="V`?"0*4'4FQD(C
+M!L9"(@7&0B`'QD(A`(EJ+(EZ*(/L"%+_="00Z/S___^#Q!"#Q`Q;7E]=PU57
+M5E.#[`R+;"0@BWT`QD0D"_^S@+[_____@/N%=PL/ML,/MK0XF`0``(GP//]T
+M2`^VP(N/D`4``(T$0(T$P(G"P>(%*<*-!)4`````.6P("'4E@^P$:@C_="0L
+M`X>0!0``4.C\____@\00A,!T"8GPB$0D"^L'D$.`^X%VEP^V1"0+@\0,6UY?
+M7<.055=64X'L+`(``(J$)$@"``"(1"0?BY0D0`(``(M2"(E4)!B+*HN,)$`"
+M``"*23"(3"07BX0D0`(``(/`*(G"BXPD0`(``#E!*`^$9P(``(!\)!<`#X1<
+M`@``B40D#(GV@^P,4NC\____C7#X@\0$C40D+%`/MD0D+U!J`?]T)##_M"1@
+M`@``Z/S___^_`````(/$((!\)"``#X;A````C58(B50D$(GV@^P$:@B-AIP`
+M``!0B?D/ML'!X`2-5"0LC1P0C4-L4.C\____@\00A,`/A)D```"-4V"*0@B#
+MX`^(AK(```!FBTXT@>'?_?__B<B#R!!FB48TBD((P.@$/`EU"8G(@\@P9HE&
+M-(GY#[;!P>`$BH0$B````,#H!#P*=09F@4XT``*+A"1``@``@\`HBU`$BTPD
+M$(E(!(E&"(E1!(D*BD8DJ`)T-8/@_8A&)(-^'`!T*8/L!/]V'/^U)`4``&H&
+MZ/S___^#Q!#K$9!'B?@X1"0@#X<K____ZPV0B?HX5"0@#X<+`0``@^P$5FH&
+M_W0D).C\____@\00@'Y+`'0>@^P,5>C\____QP0D`0```.C\____@\00@'Y+
+M`'7B@[[@`````'0=@^P$:@$/MH;5````4/^VX````.C\____@\00B?:#?BP`
+M=!:#[`1J`0^V1DE0_W8LZ/S___^#Q!"0@WX<`'1EBT8<QT!@`````/9&)`1U
+M)?Z%5PP``(/L#%7H_/___X/$#&H!BT8<#[9``5!5Z/S___^#Q!"#[`3_=AS_
+MM20%``!J!NC\____@\0,_W8<_[4D!0``:@'H_/___\=&'`````"#Q!"+5@2+
+M!HE0!(D"BTPD&/Y)"HN$)$`"``#^2#"#[`A65>C\____@\00_DPD%XM4)`R+
+MC"1``@``.5$H=`N`?"07``^%JOW__X'$+`(``%M>7UW#C78`55=64X'L*`(`
+M`(N\)$`"``"+A"0\`@``BP")1"08QD0D%P"-7"0<4P^VM"1,`@``5FH!_[0D
+M2`(``%?H_/___X/$'%97_[0D1`(``.C\____BX0D2`(``(M0*(UJ^(/$$(N$
+M)#@"``"#P"@YPG0KB<*-=@"`?2$-=`:`?2$B=1#&1"0+`<9%(@7&12,$ZPN0
+MBT4(C6CX.=!UVL9$)`H`@'PD$``/ANP!``"+G"0X`@``@\,HBY0D.`(``(M"
+M*(UP^#G8=#4/MD0D"HG'P><$D(/L!&H(C80\A````%"-AIP```!0Z/S___^#
+MQ!"$P'4*BT8(C7#X.=AUUHU&"#G8#X5_`0``QD0D"P"#[`S_="08Z/S___^)
+MQH/$$(7`#X2(`0``BX0D,`(``/Y`"L9&(@7&AK``````QD8C!&;'AI``````
+M`,:&D@````#'1D````4`QT9$``````^V1"0*P>`$C40$<(I0!(A6((I0!8A6
+M(8N4)#`"``")5BB*4`B#X@^(EK(```!FBTXT@>'?_?__B<J#RA!FB58TBD`(
+MP.@$/`EU"8G(@\@P9HE&-`^V1"0*P>`$BD0$>,#H!#P*=09F@4XT``*+A"0X
+M`@``B48L#[9$)`K!X`2-5"00`="*4&:(5DF+4&R)EIP```"+0'")AJ````")
+MEI0```")AI@```"+A"0X`@``_D`PBX0D,`(``(/`.(M0!(EP!(D&B58$B3*-
+M1@B+4P2)0P2)7@B)4`2)`@^V1B"H`G0GJ`1T(Z@!=!]6#[9&25#_M"1``@``
+M_[0D/`(``.C\____@\00ZR&0#[9&(*@"=!BH!'04J`%U$(/L"%;_="08Z/S_
+M__^#Q!#^1"0*BE0D"CA4)!`/AQ[^__^`?"0+`'0.@^P(:@I5Z/S___^#Q!"!
+MQ!P"``!;7E]=PXGV55=64X'L+`(``(N$)$`"``"+`(E$)`R+C"1``@``BDD<
+MB$PD'XN$)$`"``"#P"R)PHNT)$`"```Y1BP/A'H#``"$R0^$<@,``(E$)!B#
+M[`Q2Z/S___^-:.#'!"0`````:@!J`/^T)%@"``#_M"1@`@``Z/S___^(1"0]
+MQD0D/@"#Q"`X1"0>#X/R`0``C78`@^P,:@`/MGPD+E=J`?^T)%@"``#_M"1@
+M`@``Z/S___\/ML#!X`2#P&2#Q"`]``(```^'>0$``(/L#(U<)"Q35VH!_[0D
+M6`(``/^T)&`"``#H_/___X/$'&H(58V$)(@```!0Z/S___^#Q!"$P`^$/0$`
+M`(U5((N$)$`"``"#P"R+2`2)4`2)12")2@2)$8I$)"*(13&#[`B-1"1\4/^T
+M)$P"``#H_/___X/$$#S_="`/ML"-!$"-!,")PL'B!2G"BTPD#(N!D`4``(T4
+MD(E5#(!\)!X`=$\/MD,#T>B#X`'!X`2*536#XN\)PHA5-0^V0P/!Z`.#X`'!
+MX`6#XM\)PHA5-0^V0P/!Z`*#X`'!X`.#XO<)PHA5-8I#!HB%BP```.F>````
+MBD,"B$4QB[0D0`(``(EU"(I#!HB%BP````^W0P2)13AFBT-09HF%B````(I#
+M4HB%B@```(M#0(E%>(M#1(E%?(M#2(F%@````(M#3(F%A````(M#$(E%2(M#
+M%(E%3(M#&(E%4(M#'(E%5(U]6(U#(/RY!@```(G&\Z6+0SB)17"+0SR)173K
+M%HGV_D0D'HI$)!TX1"0>#X(^_O__ZRL/MD0D'E!5_[0D3`(``/^T)$P"``#H
+M_/___X/$$(I,)!TX3"0>#X(=`0``C44HB<(Y12@/A/4```")QY"#[`Q2Z/S_
+M__^-6/B#Q`Q3:@;_M"1,`@``Z/S___^#Q!"`>TL`="*0@^P,_W0D&.C\____
+MQP0D`0```.C\____@\00@'M+`'7?@WL<`'1QBT,<QT!@`````/9#)`1U*8MT
+M)`S^AE<,``"#[`Q6Z/S___^#Q`QJ`8M#'`^V0`%05NC\____@\00@^P$_W,<
+MBT0D%/^P)`4``&H!Z/S___^#Q`S_<QR+3"04_[$D!0``:@;H_/___\=#'```
+M``"#Q!"+4P2+`XE0!(D"B[0D0`(``/Y."OY-,(/L"%/_="08Z/S___^#Q!")
+M^CE]*`^%#O___XN$)$`"``#^2!R#[`A5_W0D&.C\____@\00_DPD'XM4)!B+
+MC"1``@``.5$L=`N`?"0?``^%DOS__X'$+`(``%M>7UW#B?955U93@>PD`@``
+MBZPD/`(``(M%`(E$)!3_M"0X`@``5>C\____QP0D`````&H`:@!5_[0D3`(`
+M`.C\____B$0D*L9$)"L`@\0@.$0D"P^#,P,``)"#[`QJ``^V?"0;5VH!5?^T
+M)$P"``#H_/___P^VP,'@!(/`9(/$(#T``@``#X?O`@``@^P,C5PD'%-7:@%5
+M_[0D3`(``.C\____@\08C40D=%!5Z/S___^#Q!`\_P^%O@(``(/L#/]T)!CH
+M_/___XG#@\00A<`/A-$"``#^11S&0#``BT0D;(D#BT0D<(E#!(/L"(U$)&Q0
+M5>C\____@\00//]T(`^VP(T$0(T$P(G"P>(%*<*+3"0,BX&0!0``C120B5,,
+MBD0D$HA#,0^V1"03T>B#X`'!X`2*4S6#XN\)PHA3-0^V1"03P>@#@^`!P>`%
+M@^+?"<*(4S4/MD0D$\'H`H/@`<'@`X/B]PG"B%,UB6L(BD0D%HB#BP```(M$
+M)!B)0T"+1"0<B4-$BD0D%XA#,@^W1"04B4,XBT0D8&:)@X@```"*1"1BB(.*
+M````BT0D4(E#>(M$)%2)0WR+1"18B8.`````BT0D7(F#A````(M$)"")0TB+
+M1"0DB4-,BT0D*(E#4(M$)"R)0U2->UB-="00@\8@_+D&````\Z6+1"1(B4-P
+MBT0D3(E#=(U3((U%+(M(!(E0!(E#((E*!(D1OP````"`?"00``^$4`$``(/L
+M#/]T)!CH_/___XG&@\00A<`/A&,!``#^10K&0"(%QH"P`````,9`(P3'0$``
+M``4`QT!$`````&;'@)````````^WU\'B!(U4%'"*0@2(1B"*0@6(1B&);BB)
+M7BR*0@:(1DF*0@B#X`^(AK(```!FBTXT@>'?_?__B<B#R!!FB48TBD((P.@$
+M/`EU"8G(@\@P9HE&-`^WQ\'@!(I$!'C`Z`0\"G4&9H%.-``"#[?'P>`$C50D
+M$`'0BU!LB9:<````BT!PB8:@````B9:4````B8:8````_D,PC44XBU`$B7`$
+MB0:)5@2),HU6"(U#*(M(!(E0!(E&"(E*!(D1#[9&(*@"=!JH!'06J`%T$E8/
+MMD9)4%-5Z/S___^#Q!#K(`^V1B"H`G08J`1T%*@!=1"#[`A6_W0D&.C\____
+M@\001V8/MD0D$&8Y^`^'L/[___Y$)`N*3"0*.$PD"P^"SOS__X!]"@!U%,9%
+M!?^#[`A5_W0D&.C\____@\00@<0<`@``6UY?7<.055=64X/L&(ML)"R+="0P
+M:@!J`&H`5E7H_/___XA$)"JS`(/$(#I<)`IS(HU\)`N05P^VPU!65>C\____
+M@\00@'PD"_YU?D,Z7"0*<N/^3C2`?C0`=%:+/L9&-`"+5BR-6N"-1BPYPG1;
+MB<*0@WL,`'0,BT,@C5C@.=!U\.M&_D8T@^P(5E7H_/___\<$)``````/MH.+
+M````4%-6_[?$"0``Z/S___^#Q"#K&(/L"%95Z/S___^#Q`A65>C\____@\00
+MD(/$#%M>7UW#5U93BT0D$(L8OPH```"R`(![*P!V.`^V<`F)]@^VRHGPT_BH
+M`70AB<C!X`0!R(N$@UP+```E```#`,'H$(/`"(GY.,AS`HG'0CA3*W?.B?H/
+MML);7E_#D%=64XM$)!"+&+\(````L@"`>RL`=C@/MG`)B?8/MLJ)\-/XJ`%T
+M(8G(P>`$`<B+A(-<"P``)0```P#!Z!"#P`B)^3C(=@*)QT(X4RMWSHGZ#[;"
+M6UY?PY!55U93@^P<BT0D,(LHQD0D%P"`>`D`#X3T`P``QD0D#P`/MD`)B<*H
+M`741D/Y$)`^)T(I,)`_3^*@!=/`/ME0D#XG0P>`$`="-5(4`BX),"P``J0``
+M`@!T$`T```0`)?___?^)@DP+```/ME0D#XG0P>`$`=#VA(5."P``!`^$N0(`
+M`#FM)`4``'4,C;5@#```B70D&.L*BX4D!0``B40D&(/L!`^V3"03B<C!X`0!
+MR(U$A0`/MI!7"P``4@^VD%8+``!2#[:050L``%(/MI!4"P``4@^VD%,+``!2
+M#[:04@L``%(/MI!1"P``4@^V@%`+``!0#[9%*5!1:#P&``#H_/___X/$,&;'
+M1"04@``/ME0D#XG0P>`$`="-A(50"P``B40D$`^W1"04BU0D&&8/MH00F`0`
+M`&8]_P!T.0^WP(T$0(T$P(G"P>(%*<*+3"08BX&0!0``C1R0BWPD$+D(````
+M_(G>\Z8/E\(/DL`XP@^$=0$``&;_1"049H%\)!2!`':A@^P,5>C\____B<.#
+MQ!"%P`^$=@(```^V5"0/B=#!X`0!T/:$A4T+```$=`2`2S4"#[94)`^)T,'@
+M!`'0]H2%3@L```1T!(!+-1`/ME0D#XG0P>`$`=#VA(5-"P``"'0$@$LU!`^V
+M5"0/B=#!X`0!T/:$A4X+```(=`2`2S4@#[94)`^)T,'@!`'0]H2%30L```)T
+M!(!+-0$/ME0D#XG0P>`$`=#VA(5."P```G0$@$LU",9#,``/ME0D#XG0P>`$
+M`="-1(4`BY!0"P``B1.+@%0+``")0P2+1"0PB4,(4.C\____B(.+````BU0D
+M-/Y"'+$`@\0$@'TK`'8DBW0D,`^V1@G3^*@!=!`/MD0D%XA,&$#^0S+^1"07
+M03A-*W?<C5,@BT0D,(/`+(M(!(E0!(E#((E*!(D1BT0D,/Y`-(/L#&@`````
+M#[:#BP```%!3_W0D2/^UQ`D``.C\____@\0@Z24!``"#[`P/MD,'4`^V0P90
+M#[9#!5`/MD,$4`^V0P-0#[9#`E`/MD,!4`^V`U!HC`8``.C\____@\0HBU0D
+M.,9"!?]25>C\____@\00Z=<```"-=@`/ME0D#XG0P>`$`="-=(4`]H9."P``
+M"`^$MP```(/L#%7H_/___XG#@\00A<`/A*$```#&0",&QD`B!6;'@)``````
+M`,9`(`;&0"$`QT!````%`,=`1`````"+EE`+``")D)P```"+AE0+``")@Z``
+M``")DY0```")@Y@```"+3"0PB4LH4>C\____B(.R````9H-+-!#_="0TZ/S_
+M__^#Q`@\"78&9H%+-``"BW0D,,9&"@&)\(/`.(M0!(E8!(D#B5,$B1J#[`A3
+M5>C\____@\00D(/$'%M>7UW#55=64X/L#(MT)""+?"0DL`"%_W0#BD<%#[;`
+MO0````"%P'00/?\````/A$L!``#IC`4``(GJ#[;"BH0P'@4``#S_=!(/MM"-
+M!%+!X`,IT(V\AB@!``!%B>F`^0-VUKT`````D(GJ#[;"BH0P'@4``#S_=#0/
+MMM"-!%+!X`,IT(V\AB@!``#V1P8"=!"#[`AJ`%?H_/___X/$$.L,@^P,5^C\
+M____@\0018GI@/D#=K1F#[9&)F8YAJ0)```/A?X$``"%_P^%F@```(!^.0`/
+MA>P$``#&1CD!NP````"-=@`/M].+C):8`@``A<ET+H-Y<`!T*(M!<,=!<```
+M``#'A):8`@```````(/L!&K_4?]Q>/_0@\00ZS^-=@`/M].#O):8`@```'0O
+MBX26F`(``(-X=`!T(HM!=,=!=`````#'A):8`@```````(/L#/]Q>/_0@\00
+MB?9#9H/[/W:!Z5P$``#&1P7_@^P(5U;H_/___X/$$.E&!```QD0D"P"0#[9$
+M)`N*A#`>!0``//\/A.P````/MM"-!%+!X`,IT(V\AB@!``"`?P7_#X30````
+MO0````"`?PH`#X:U````C5\X@^P,4^C\____B40D%(/$$(M#!(M4)`2)4P2)
+M&HE"!(D0@'HB_W1_@+JQ`````'1K#[9"(*@"=!ZH!'0:J`%T%E(/MD))4/]R
+M+%?H_/___X/$$.M'B?:+3"0$#[9!(*@"=1BH!'04J`%T$(/L"%%6Z/S___^#
+MQ!#K(I"+5"0$#[9"(*@"=!6H!'01J`%U#8/L"%)6Z/S___^#Q!"X`0```.E>
+M`P``D$6)Z3A/"@^'3O___[@!````Z4<#``")]OY$)`N`?"0+`P^&\?[__\9$
+M)`L`@'XY``^%G@```+L`````D`^WPXN,AI@"``!F#[:4,)@$``"%R71M@WEP
+M`'1G@WE@`'5A9H'Z_P!T,@^WTHN^6`4``(T$TL'@`BG0P>`#]D0X(P1T%X!\
+M."$`=1"#[`1245;H_/___X/$$.LHBU%P#[?#QX2&F`(```````#'07``````
+M@^P$:O]1_W%X_]*#Q!")]D-F@_L_#X9Q____QD8Y`>F$`@``#[9$)`N*A#`>
+M!0``//\/A&`"```/MM"-!%+!X`,IT(V\AB@!``"]`````(!_"@`/AC\"``"-
+M=@"#[`R-7SA3Z/S___^)1"04@\00BT,$BU0D!(E3!(D:B4($B1"`>B+_#X4"
+M`@``9HM*&&:)3"0"#[?!9@^VE#"8!```9HD4)(N<AI@"``"+3"0$BD$DJ`1T
+M8H7;=%Z#>W``=%B#>V``=5*#X/N(023V02,$=!.#[`0/M\)04U;H_/___X/$
+M$.LSBU-P#[=$)`+'A(:8`@```````,=#<`````"+1"0$QT`<`````(/L!&K_
+M4_]S>/_2@\00BU0D!/9"(P0/A#X!``#&@K``````@&<(Y_9")`$/A/H```"`
+M8B3^@WH<`'12@'HA`'4M]D(C!'0G@^P$#[=4)`8/MD8IP>`&`<)2_[8D!0``
+M:@?H_/___X/$$.GL````@^P$BTPD"/]Q'/^V)`4``&H!Z/S___^#Q!#IS0``
+M`(7;=&.#>W``=%V+1"0$@'@A`'4>]D`C!'08@^P$#[=$)`104U;H_/___X/$
+M$.F;````BU-P#[=$)`+'A(:8`@```````,=#<`````"+3"0$QT$<`````(/L
+M!&K_4_]S>/_2@\00ZV:+1"0$@'@A`'5<]D`C!'16@^P$#[=4)`8/MD8IP>`&
+M`<)2_[8D!0``:@+H_/___X/$$.LRC78`BU0D!(-Z'`!T)8M"'(-X=`!T'(M0
+M=,=`=`````"#[`R+3"00BT$<_W!X_]*#Q!"+1"0$]D`D`G0?@^P$_W`<_[8D
+M!0``:@;H_/___XM4)!2`8B3]@\00D$6)Z3A/"@^'Q/W___Y$)`N`?"0+`P^&
+M??W__Y"X`0```(/$#%M>7UW#C78`55=64X/L#(M<)"2+:R@/MT,8N@````"+
+M3"0@@+P(F`0``/\/A)`"```/MD,B@_@/#X3V````@_@/?SF#^`P/A+0```"#
+M^`Q_$X/X!71/@_@+#X20````Z5@"``"#^`T/A*0```"#^`X/A*P```#I00(`
+M`)"#^!E_#X/X&'U6@_@4="WI+`(``(/X&W0T/?\````/A)@```#I%P(``(/L
+M"&H!4^C\____@\00Z00"``"#[`Q3Z/S___^#Q!#I\P$``(/L"&H`4^C\____
+M@\00Z>`!``"#[`AJ`5/H_/___X/$$.G-`0``@^P,4^C\____@\00Z;P!``"#
+M[`Q3Z/S___^#Q!#IJP$``(/L#%/H_/___X/$$.F:`0``@^P,4^C\____@\00
+MZ8D!``"0QD,B_XE<)`B_`````(!]"@`/AL4```"-=3B)]H/L#%;H_/___XG#
+M@\00BT8$B5X$B3.)0P2)&(![(O\/A(<```"`>R$`#X6%````@+NQ`````'1H
+M#[9#(*@"=!RH!'08J`%T%%,/MD-)4/]S+%7H_/___X/$$.M$#[9#(*@"=1RH
+M!'08J`%T%(/L"%/_="0LZ/S___^#Q!#K(HGV#[9#(*@"=!BH!'04J`%U$(/L
+M"%/_="0LZ/S___^#Q!"Z`0```.G'````B?;&@[$`````D$>)^#A%"@^'0/__
+M_XGY.$T*#X6-````BT0D"(!X(2)T!H!X(0UU&(/L"&H*_W0D%.C\____N@$`
+M``"#Q!#K?K\`````@'T*`'9:C74XC78`@^P,5NC\____B<.#Q!"+1@2)7@2)
+M,XE#!(D8@'LA(G0&@'LA#74E@^P(4VBC`0``Z/S___^#Q`AJ"E/H_/___[H!
+M````@\00ZR.)]D>)^3A-"G>LQD4%_X/L"%7_="0LZ/S___^#Q!"Z`0```(G0
+M@\0,6UY?7<.055=64X/L#(M<)"2+:R@/MT,8N@````"+3"0@@+P(F`0``/\/
+MA&P&```/MD,B@_@)#X13`P``@_@)?SV#^`4/A-P```"#^`5_%X/X`P^$@@``
+M`(/X!`^$I````.DP!@``@_@'#X0,`P``@_@'#X_O`@``Z78"``"0@_@6#X2X
+M`@``@_@6?R*#^!0/A"(#``"#^!0/CWL"``"#^`H/A/P"``#IZ@4``(GV@_@:
+M#X0<`@``@_@:?PZ#^!</A(X"``#IS`4``#W_````#X3F`@``Z;P%``"+11B!
+M8"C___[_:@!J`5/_<RCH_/___\<$)`4```#H_/___X/$$.F1!0``:@!J`%/_
+M<RCH_/___\<$)%##``#H_/___X/$$.EP!0``QD0D"P"+?"0@@'\K`'8?#[95
+M"9")T(I,)`O3^*@!=0Y!B$PD"XM\)"`X3RMWY@^V0R"H`G0,J`1T"*@!#X7#
+M````BU48BT(HJ0```0!T#27___[_B4(HZ:D```"^$"<``(I$)`N(1"0*#[;X
+MBTPD((L1@'PD"P-V&P^V1"0+BX3"@`$``*,`````)0```0#K%(UV`(N$^H`!
+M``"C`````"4```$`A<!T)H!\)`H#=A#'A/J``0`````!`.L.C78`QX3Z@`$`
+M`````0"%P'45@^P,:.@#``#H_/___X/$$$YUBNL$A?9U'<9#(P+&0R+_@^P(
+M4_]T)"SH_/___X/$$.EK!```]D4&`70]@^P(4U7H_/___X/$$(3`=2R^^@``
+M`(UV`(/L"%-5Z/S___^#Q!"$P'43@^P,:.@#``#H_/___X/$$$YUW(!\)`L#
+M=B`/MDPD"XM\)""+%XN$RH`!``"C`````(F$RH`!``#K/@^V="0+BT0D((L(
+M@'PD"P-V#HN$\8`!``"C`````.L7#[9$)`N+?"0@BQ>+A,*``0``HP````")
+MA/&``0``@^P(4_]S*.B')```QP0D($X``.C\____@\00Z:,#``"#[`@/MT,8
+M4&C$!@``Z/S___^#Q`A3_W,HZ.4I``"#Q!#I?0,``(/L"`^W0QA0:+<!``#H
+M_/___X/$"%/_<RCH)RH``(/$$.E7`P``@^P(4_]S*.@;)```@\00Z4,#``"#
+M[`A3_W,HZ.,G``"#Q!#I+P,``(/L"%/_<RCH6R<``(/$$.D;`P``@^P(4_]S
+M*.@O*```@\00Z0<#``"#[`A3_W,HZ(,H``"#Q!#I\P(``(/L"%/_<RCHUR@`
+M`(/$$.G?`@``QD,B_P^V0R"H`G0(J`1T!*@!=16#>S``=0]5Z/S___^(@[(`
+M``"#Q`3V10@"#X1@`0``BWTH#[97*@^V1Q](.<)]+?Y'*OY'*\9')@!FBT<R
+M@^#^@\@(9HE',H/L"%?_="0LZ/S___^#Q!#I;P(``,9$)`L`@'T*``^&P```
+M`(UU.(/L#%;H_/___XG#@\00BT8$B5X$B3.)0P2)&(![(O\/A(````"`N[$`
+M````=&L/MD,@J`)T'Z@$=!NH`7074P^V0TE0_W,L5>C\____@\00ZT>-=@`/
+MMD,@J`)U'*@$=!BH`704@^P(4_]T)"SH_/___X/$$.LBB?8/MD,@J`)T&*@$
+M=!2H`740@^P(4_]T)"SH_/___X/$$+H!````Z;\!``")]L:#L0````#^1"0+
+MBD0D"SA%"@^'0_____9',H!T'_9'+0-T&<9')@"#[`A7_W0D+.C\____@\00
+MZ7L!``#&107_QD<F`&:+1S*#X/.#R`)FB4<R@&<M_H/L"%7_="0LZ/S___^#
+MQ!#I3`$``,9$)`L`@'T*``^&Q0```(UU.(GV@^P,5NC\____B<.#Q!"+1@2)
+M7@2),XE#!(D8@'LB_P^$B@```(![(0!U?8"[L0````!T:`^V0R"H`G0<J`1T
+M&*@!=!13#[9#25#_<RQ5Z/S___^#Q!#K1`^V0R"H`G4<J`1T&*@!=!2#[`A3
+M_W0D+.C\____@\00ZR*)]@^V0R"H`G08J`1T%*@!=1"#[`A3_W0D+.C\____
+M@\00N@$```#IEP```(GVQH.Q`````/Y$)`N*3"0+.$T*#X=`____BD0D"SA%
+M"G58QD0D"P"`?0H`=DV-=3B#[`Q6Z/S___^)PX/$$(M&!(E>!(DSB4,$B1B`
+M>R$B=`:`>R$-=1:#[`AJ"E/H_/___[H!````@\00ZRJ0_D0D"XI,)`LX30IW
+MML9%!?^#[`A5_W0D+.C\____@\00C78`N@$```")T(/$#%M>7UW#D%575E.#
+M[`R+?"0@BW0D)(L7BUY4#[9&)H/X&0^'MP,``/\DA:@6``#V1C($=`QFQT8R
+M`0#&1B8!ZSQF@WXR('4,9L=&,@@`QD8F#>LI]D8R@'09]D8M`W039HM&,B1_
+M@\@(9HE&,L9&)@WK"O9&,@AT!,9&)@>#[`A65^C\____@\00Z5`#``"+@@0!
+M``"C`````(/(4(F"!`$``&H!:@)J`5;H_/___X/$$.DH`P``:@%J`&H!5NC\
+M____@\00Z10#``!J`6H!:@%6Z/S___^#Q!#I``,``&H!:F!J`5;H_/___X/$
+M$.GL`@``@^P,:@$/MD8L4&I@:@%6Z/S___^#Q"#IT`(``(/L#&H!:````01J
+M(6H!5NC\____@\0@Z;0"``"#[`QJ`6H!:@)J`%;H_/___X/$(.F;`@``@^P,
+M:@%J`&H":@!6Z/S___^#Q"#I@@(``(M#&(%@*/__]_^#[`QJ`6H!:@)J`%;H
+M_/___X/$(.E?`@``@^P,:@%J`&H":@!6Z/S___^#Q"#I1@(``&H!:@)J`%;H
+M_/___X/$$.DR`@``:@%J`&H`5NC\____@\00Z1X"``!J`6H!:@!6Z/S___^#
+MQ!#I"@(``(M#&(%@*/__]_^#[`QJ`6K_:@%J`%;H_/___X/$(.GG`0``:@%J
+M`&H`5NC\____@\00Z=,!```/MD8KBVR&/(E=*(EU,(I&*XA%2<9%(@/&12$`
+M@$T@!?Y#"HU#.(M0!(EH!(E%`(E5!(DJ@^P,:(`:!@#H_/___\9$)!L`@\00
+M@'\K`'8:#[93"8G0BDPD"]/XJ`%U"D&(3"0+.$\K=^J+4QB+0BBI```(`'0*
+M)?__]_^)0BCK4[N8.@``#[9T)`N0@'PD"P-V&8L'BX3P@`$``*,`````J0``
+M"`!U+.L7B?:+!XN$\(`!``"C`````*D```@`=1.#[`QHZ`,``.C\____@\00
+M2W6X@^P(55?H_/___X/$$.GN````@^P,:$`-`P#H_/___VH`:B!J`5;H_/__
+M_X/$%&@0)P``Z/S___^#Q!#IP````&H`:@%J`%;H_/___\<$)!`G``#H_/__
+M_X/$$.F@````BT,8@6`H___W_X/L#&H`:O]J`6H`5NC\____@\04:!`G``#H
+M_/___X/$$.MS:@!J`&H`5NC\____QP0D$"<``.C\____@\00ZU9J`&H@:@%6
+MZ/S____'!"00)P``Z/S___^#Q!#K.8/L"%97Z/S___^#Q!#K*H/L"%97Z/S_
+M__^#Q!#K&X/L#&H!:/````!HFP```&H!5NC\____@\0@D+@!````@\0,6UY?
+M7<.-=@!55U93@^P<BT0D,(L`B40D&,9$)!,`BU0D,(!Z*P`/AK4"```/MDPD
+M$XG(P>`$`<B+="0PC1R&]H->"P``$`^$@`(``(V34`L``+@!````T^`(0@F+
+MFSP+``")7"04]D((`@^$]````(I<)!-#.%XK#X;F````#[94)!.)T,'@!`'0
+MC02&B40D!(UV``^V\XGPP>`$`?"+5"0PC3R"]H=>"P``$`^$H@```(ML)`3W
+MA4P+``````X`#X2.````@^P$:@B-CU`+``")3"0448V%4`L``(E$)!10Z/S_
+M__^#Q!"$P'1G@^P$:@B-AT0+``!0C85$"P``4.C\____@\00A,!T2+@!````
+MB?'3X(MT)`@*1@F(1@F+5"0,B$()@WPD%`!U#(N_/`L``(E\)!3K&P^VTXG0
+MP>`$`="+="04BTPD,(FT@3P+``")]D.+1"0P.%@K#X<R____B?:#?"04``^%
+MM0```(/L#/]T)#SH_/___XE$)"2#Q!"%P`^$5P$```^V5"03B=#!X`0!T(M4
+M)#"-!(*+3"04B8@\"P``C9`X"P``B5$8BH!8"P``B$$&QD$%`(M<)#")&<9!
+M"@#&030`QD$<`(I<)!-#BW0D,#A>*W9B#[94)!.)T,'@!`'0#[:4AED+``"-
+M=@`/MLN)T-/XJ`%T%HG(P>`$`<B+="04BTPD,(FT@3P+``!#BT0D,#A8*W?5
+MZQZ-=@`/ME0D$XG0P>`$`="+3"04BU0D,(F,@CP+```/MDPD$XG(P>`$`<B+
+M7"0PC82#4`L``(I0"8MT)!2(5@D/ME@)@'PD$P-V$8M$)!C'A,@``@``.```
+M`.L4#[9$)!.+5"08QX3"``(``#@```"#[`QH$"<``.C\____@\00@'PD$P-V
+M%0^V1"03BTPD&(F<P00"``#K$XUV``^V1"03BW0D&(F<Q@0"``#^1"03BD0D
+M$XM4)#`X0BL/ATO]__^#Q!Q;7E]=PXUV`%=64XM\)!"*7"04BS>`^P-V$@^V
+MP\>$QC`"```,````ZQ")]@^VP\>$QE`"```,````@^P,:!`G``#H_/___X/$
+M$(#[`W81#[;#BX3&-`(``*,`````ZP\/ML.+A,94`@``HP````")P8'A```_
+M`,'I$`^VTXG0P>`$`="-E(=0"P``BD((@^#\B$((@_D0=0N#R`*(0@CK%8UV
+M``^VTXG0P>`$`="`C(=8"P```5M>7\.)]E=64X/L((M<)#2+1"0PBSB^````
+M`(UV`(/[`W83C02U``$``(F$WP`"``#K$8UV`(T$M0`!``")A-\``@``@^P,
+M:!`G``#H_/___X/$$(/[`W81BX3?!`(``*,`````ZP^-=@"+A-\$`@``HP``
+M``")!+1&@_X&=I^)YORY!P```(M\)#CSI8/$(%M>7\.)]E=64X/L((M<)#2+
+M1"0PBSB^`````(UV`(/[`W83C02U'`$``(F$WP`"``#K$8UV`(T$M1P!``")
+MA-\``@``@^P,:!`G``#H_/___X/$$(/[`W81BX3?!`(``*,`````ZP^-=@"+
+MA-\$`@``HP````")!+1&@_X&=I^)YORY!P```(M\)#CSI8/$(%M>7\.)]HM,
+M)`2*`<#H!(G"@^(']D$"!'0#@,X"]D$#!'0&@<H```(`]D$""'0#@,X(]D$#
+M"'0&@<H```@`]D$"`G0#@,X$]D$#`G0&@<H```0`#[9!%,'@&`G"B=##C78`
+M_W0D!.C\____@\0$PXUV`%575E.#[$2+;"18BD0D7(A$)!>+50")5"00#[;0
+MB=#!X`0!T(U$A0")J#@+``#&@%D+````4E7H_/___X/$$+D`````NB````"-
+M1"00C78`B`A`2G7Z@^P$C70D%%8/MGPD%U=5Z/S___^)^\'C!`'[C5R=`%;H
+M_/___XF#0`L``(M$)#")@T0+``"+1"0TB8-("P``C9-<"P``@\04@'PD#P-V
+M$HM,)`B+A+G0`0``HP````#K%0^V1"0/BUPD"(N$@]`!``"C`````(D"#[94
+M)`^)T,'@!`'0C8R%8`L``(!\)`\#=A*+7"0(BX33@`$``*,`````ZQ4/MD0D
+M#XM4)`B+A,*``0``HP````")`0^V5"0/B=#!X`0!T(U$A0#V@%X+```0#X1#
+M`0``]H!8"P```G1;N0````"Z(````(U$)!"-=@"("$!*=?J#[`2-?"045P^V
+M="075E7H_/___XGSP>,$`?.-7)T`5^C\____B8-,"P``BT0D,(F#4`L``(M$
+M)#2)@U0+``"#Q!3K%P^V5"0/B=#!X`0!T,>$A4P+```!``(`@'PD#P-V%@^V
+M1"0/BTPD",>$P3`"```8````ZQ0/MD0D#XM<)`C'A,-0`@``&````(/L#&@0
+M)P``Z/S___^#Q!"`?"0/`W89#[9$)`^+5"0(BX3"-`(``*,`````B<'K%P^V
+M1"0/BTPD"(N$P50"``"C`````(G!#[94)`^)T,'@!`'0]X2%7`L``````P!U
+M"('A____W^L&@<D````@@'PD#P-V$@^V1"0/BUPD"(F,PS0"``#K$`^V1"0/
+MBU0D"(F,PE0"``"#Q#Q;7E]=PXUV`(M4)`2+@C@%```E____`#U0`9,`=1**
+M@CL%``#`Z`2Z`0```#P,=`6Z`````(G0PU575E.#[!R+?"0PBS?&1"004(U<
+M)!#&0P$%QD,"!,9#`S#&0P01QD,%J\9#!@#&0P<`QX=<#````````#F_)`4`
+M``^%U````(VO8`P``(/L#&H!:@B-AS@%``!0:````@!7Z/S___^+AS`%``"*
+MESL%``"-1(+\B(<[!0``@\0@5^C\____@\0$A,!U$XM$)!")AS@%``"+0P2)
+MASP%``"A`````(J7.P4```'"0*,`````B)<[!0``BH<X!0``B(4X!0``BH<Y
+M!0``B(4Y!0``BH<Z!0``B(4Z!0``BH<[!0``@\`"B(4[!0``BH<\!0``B(4\
+M!0``BH<]!0``B(4]!0``BH<^!0``B(4^!0``BH<_!0``B(4_!0``QX=<#```
+M`````(N&``$``*,`````)?__``"H('44@\@@B88``0``BX8``0``HP````"+
+M!\>`!`$```````"+!\>`&`$```````"+!\>`'`$```````"#[`QH@(0>`.C\
+M____QX9P`0``&`$``(N&=`$``*,`````@.3]QX9P`0``&`$``(#,!(F&=`$`
+M`,>&<`$``"@!``#'AG0!``!_?P``QX9P`0``)`$``(N&=`$``*,`````)0``
+M___'AG`!```D`0``#?\_``")AG0!``#'AG`!```\`0``QX9T`0````!Z`,>&
+M<`$``*0!``#'AG0!``!]O^__QX9P`0``N`$``(N&=`$``*,`````#[?`QX9P
+M`0``N`$```T``/H`B89T`0``QX:<````_P```,>&D`(``$0!``#'AI0"```&
+M$``(QX:0`@``M`$``,>&E`(``%]P``#'AI`"```P````BX:4`@``HP`````P
+MY(#,,XF&E`(``,9$)!\`@\00@'\K``^&M@(``(GV@'PD#P-V%0^V1"0/QX3&
+M,`(```@```#K$XUV``^V1"0/QX3&4`(```@```"#[`QH$"<``.C\____@\00
+M@'PD#P-V%0^V1"0/BX3&-`(``*,`````ZQ.)]@^V1"0/BX3&5`(``*,`````
+M@'PD#P-V%`^V5"0/#0``@`")A-8T`@``ZQ*0#[94)`\-``"``(F$UE0"``"#
+M[`2-AS@%``!0#[9<)!=35^C\____@\0(4U?H_/___X/$$(!\)`\#=@W'A-XP
+M`@``1`$``.L0#[9$)`_'A,90`@``1`$``(/L#&@0)P``Z/S___^#Q!"`?"0/
+M`W85#[9$)`_'A,8T`@``!A``".L3C78`#[9$)`_'A,94`@``!A``"(!\)`\#
+M=A4/MD0D#\>$QC`"``"T`0``ZQ.-=@`/MD0D#\>$QE`"``"T`0``@^P,:!`G
+M``#H_/___X/$$(!\)`\#=A4/MD0D#\>$QC0"``!?<```ZQ.-=@`/MD0D#\>$
+MQE0"``!?<```@'PD#P-V%0^V1"0/QX3&,`(```@```#K$XUV``^V1"0/QX3&
+M4`(```@```"#[`QH$"<``.C\____N/]4@`"#Q!"`?"0/`W84#[94)`\E_U0`
+M`(F$UC0"``#K$I`/ME0D#R7__W_]B8365`(``(/L!&H!#[9<)!=35^C\____
+MQP0D(*$'`.C\____@\00@'PD#P-V$(N$WH`!``"C`````.L3B?8/MD0D#XN$
+MQH`!``"C`````"7___[_@'PD#P-V#P^V5"0/B836@`$``.L-D`^V5"0/B836
+M@`$``+@%`<@`@'PD#P-V$`^V5"0/B836A`$``.L.B?8/ME0D#XF$UH0!``"#
+M[`QHH(8!`.C\____@\0(#[9$)!=05^C\____@\00_D0D#XI$)`\X1RL/ATS]
+M__^#[`Q7Z/S___^+A@0!``"C`````(/(`HF&!`$``(N&``$``*,`````@^#]
+M@\@-B88``0``BX8``0``HP````"+A^0)``")A@@!``"+A^@)``")A@P!``"+
+MAP@*``")AA`!``"+APP*``")AA0!``#'AB`!````````#[>'-`L``"7_#P``
+M#0```0")AB`!``"+AU`*``")AB0!``"+AU0*``")AB@!``"+AW`*``#'`/\/
+M``#'AC0!````````#[>'-@L``"7_#P``#0```0")AC0!``"+AW0*``")AC@!
+M``"+AW@*``")ACP!``#'AD@!````````QX9,`0````$``(N&!`$``*,`````
+M@\A9B88$`0``QX94`0``^_\`#,>&7`$``/__``"#Q"Q;7E]=PXUV`%.#[!2+
+M7"0<4^AB^?__L@"#Q!"0#[;"QX2#L`4```````#'1(-$`````$*`^@]VY&;'
+M@S`+``#_#V;'@S(+``#_#\9#.`&X`0```(/$"%O#BU0D!(M,)`BX`````#G(
+M?1R-=@"`/`(`=`Z`/`(@=`BX`````,.)]D`YR'SGN`$```##D%575E.#[#R+
+M;"149H%]$(4`#X>=````#[=%$(M4)%"`O!"8!```_P^$AP```&:#?1!_=R0/
+MMI00F`0``(M<)%"+BU@%``"-!-+!X`(IT(M$P2B*2`3K7Y!F@7T0@0!W+`^W
+M11"+?"10#[:$.)@$``"+CY`%``"-!$"-!,")PL'B!2G"BT21"(I(!.LJ#[=%
+M$(M4)%`/MH00F`0``(N2=`4``(T$0(T$@(M$PE2*2`3K!8UV`+'_LO]F@7T0
+MA0!W#P^W11"+7"10BI08F`0``(#Y_W0<#[;!BWPD4("\.!X%``#_=`N`^O]T
+M!H!]%`9U-(-]4`!T%H/L"(U%4%#_="1<Z/S___^#Q!"-=@"#[`A5_W0D7.C\
+M____@\00Z0L'``"-=@`/ML&+3"10#[:T"!X%``"-!';!X`,I\(VT@2@!```/
+MMM*-!-+!X`(IT(N16`4``(T<PF:!NY````"K#7<'@'T4`G5'D(-]4`!T%H/L
+M"(U%4%#_="1<Z/S___^#Q!"-=@"#[`A5_W0D7.C\____QD,B_\9#(P*#Q`A3
+M_W0D7.C\____@\00Z7X&```/MD4D@_@:#X2.!0``@_@:?R6#^!)T3(/X$G\-
+MA<`/A#<%``#I'`8``(/X%0^$!`8``.D.!@``@_@E#X2/`@``@_@E?PZ#^!L/
+MA`0%``#I\@4``#V>````#X1P`P``Z>(%``"`?10`#X5"`@``BTTT@'TE`'1B
+M@'LB&0^4P(/`"XA#(H7)=$.`>0&`=3V`>0(`=3>`>0,\=S$/MG$#NA0```"-
+M0TS&`"!`2G7Y@_X3=@6^%````(U33(U!!(/L!%904NC\____@\009L>#D```
+M````Z6T%``#&0R(8]D$&0'4/#[8!@^`?@_@-#X4\`0``#[8!@^`?@_@-=0;&
+M0R$-ZP3&0R$B@^P(#[9#(5!HS0$``.C\____@\00@WU0`'03@^P(C4504/]T
+M)%SH_/___X/$$(/L"%7_="1<Z/S____&1"0_`(/$$(!^"@!V-XUN.(/L#%7H
+M_/___XG#@\00BT4$B5T$B2N)0P2)&(![(2)T!H![(0UU#?Y$)"^*7"0O.%X*
+M=\R*1"0O.$8*#X7K!```9L=$)"P``,=$)"@`````QD0D+P"`?@H`=DZ-;CB#
+M[`Q5Z/S___^)PX/$$(M%!(E=!(DKB4,$B1B`>R$B=`:`>R$-=1>+5"0L9CE3
+M&'(-B5PD*&:+6QAFB5PD+/Y$)"^*3"0O.$X*=[6#?"0H``^$>`0``(M<)"B`
+M>R+_#X1J!```QD,B_X/L"%/_="1<Z/S___^#Q!#I400```^V`8/@'X/X`74-
+MQD,A`<9#(O_I``0``/9!!0%T!,9#(AF#?30`#X3L`P``BWTTB7PD,+D`````
+MNB@```"-0V"("$!*=?JY`````+H(````C8.(````B`A`2G7ZC4-@BW0D,(/&
+M"/RY!@```(G'\Z6+5"0PBT(@B8.(````Z98#``!F_X.0````@^P,:!`G``#H
+M_/___\9#(@6#Q!#I=@,``(M--(E,)#2+13B*0`*#X`^`?10`=7\/ME$'#[9!
+M!L'@"`'"#[9!!<'@$`'"#[9!!,'@&`'"B9.L````#[91`P^V00+!X`@!P@^V
+M00'!X!`!P@^V`<'@&`'"B5-`QT-$`````(.[K`````!U(&;_@Y````"#[`QH
+M$"<``.C\____QD,B"X/$$.GJ`@``QD,B#>GA`@``@'T4('4H/`9T!#P"=2!F
+M_X.0````@^P,:!`G``#H_/___\9#(@6#Q!#ILP(``(-]4`!T$X/L"(U%4%#_
+M="1<Z/S___^#Q!"#[`A5_W0D7.C\____@\0,4U;_="1<Z/S___^#Q!#IL`(`
+M`(M%.(I``H/@#XM]-(E\)#2`?10`#X4``0``#[97"P^V1PK!X`@!P@^V1PG!
+MX!`!P@^V1PC!X!@!PHF3K`````^V5P</MD<&P>`(`<(/MD<%P>`0`<(/MD<$
+MP>`8`<*)5"0@B=#!^!^)1"0D#[9'`XG"N``````#1"0@$U0D)(E$)!B)5"0<
+M#[9'`HG"N`````#!X@@#1"08$U0D'(E$)!")5"04#[9'`8G"N`````#!XA`#
+M1"00$U0D%(E$)`B)5"0,#[8'B<*X`````,'B&`-$)`@35"0,B4-`B5-$]D<,
+M`70%9H-+-@2#NZP`````=2!F_X.0````@^P,:!`G``#H_/___\9#(AF#Q!#I
+M9@$``,9#(@WI70$``(!]%"!U*#P&=`0\`G4@9O^#D````(/L#&@0)P``Z/S_
+M___&0R(9@\00Z2\!``"#?5``=!.#[`B-15!0_W0D7.C\____@\00@^P(5?]T
+M)%SH_/___X/$#%-6_W0D7.C\____@\00Z2P!``#&0R(4Z>H```"`?10@=3&+
+M13B*0`*#X`\\!G0$/`)U(&;_@Y````"#[`QH$"<``.C\____QD,B%(/$$.FS
+M````QD,B&^FJ````@'T4`'56BU4TB50D,&:+0S1F@TLV`0R&9HE#-(!Z`P!U
+M!8`Z%G<=9O^#D````(/L#&@0)P``Z/S____&0R(-@\00ZV:+3"0P]D$&!'0'
+M9H-+-@+K0&:#8S;]ZSF`?10@=2Z+13B*0`*#X`\\!G0$/`)U(F;_@Y````"#
+M[`QH$"<``.C\____QD,B!8/$$.L:9H-C-/G&0R(.ZP^`?10`=05F@TLV`\9#
+M(@^#?5``=!.#[`B-15!0_W0D7.C\____@\00@^P(5?]T)%SH_/___X/$"%/_
+M="1<Z/S___^#Q!"-=@"#Q#Q;7E]=PU575E.#[`R+?"0@BUPD)&:!>Q"%``^'
+MB0````^W0Q"`O#B8!```_W1[9H-[$']W(`^VE#B8!```BX]8!0``C032P>`"
+M*="+1,$HBD@$ZU>09H%[$($`=R@/MT,0#[:$.)@$``"+CY`%``"-!$"-!,")
+MPL'B!2G"BT21"(I(!.LF#[=#$`^VA#B8!```BY=T!0``C01`C02`BT3"5(I(
+M!.L%C78`L?^R_V:!>Q"%`'<+#[=#$(J4.)@$``"`^?]T&`^VP8"\.!X%``#_
+M=`N`^O]T!H![%`9U+(-[4`!T$H/L"(U#4%!7Z/S___^#Q!")]H/L"%-7Z/S_
+M__^#Q!#I2@(``(GV#[;!#[:T.!X%``"-!';!X`,I\(VTAR@!```/MM*-!-+!
+MX`(IT(N76`4``(TLPHM#-(![%``/A*4```"`>R8&#X2;````@'LF#`^$D0``
+M`&:+E9````"-0@%FB860````9H/Z"78D@'TB!G0>QD4C`L9%(O^`923^@^P(
+M55?H_/___X/$$.F^`0``@^P,:.@#``#H_/___P^V12"#Q!"H`G0EJ`1T(:@!
+M=!V#[`QJ`&H"#[9%25#_=2Q6Z/S___^#Q"#I@0$``,9%(@.#[`A55^C\____
+M@\00Z6L!``"-=@"`>R8!=0K&12($Z2D!``"0@'LF`G4)QD4B!>D9`0``@'LF
+M`P^%D````(!](@5U*6:!>`3(-W4A@^P(#[=%&%!H^`8``.C\____@\00QD4B
+M!NGC````C78`@^P(4%7H_/___VHHC45@4.A']?__@\08A,!U.&H4C45,4.@U
+M]?__@\0(A,!U)FH(C86(````4.@@]?__@\0(A,!U$8M%1`M%0'0)QD4B%^F,
+M````QD4B&F;_A9````#K?X![)A=U!L9%(A7K<X![)AAU!L9%(A;K9X![)@1U
+M!L9%(@?K6X![)@5U!L9%(@CK3X![)@9U!L9%(@GK0X![)@QU!L9%(@KK-X![
+M)A9U!L9%(A3K*X![)@YU)8-[4`!T$(/L"(U#4%!7Z/S___^#Q!"#[`A35^C\
+M____@\00ZS"#>U``=!*#[`B-0U!05^C\____@\00B?:#[`A35^C\____@\0(
+M55?H_/___X/$$)"#Q`Q;7E]=PU575E.#[`R+?"0@BW0D)&:!?A"%``^'B0``
+M``^W1A"`O#B8!```_W1[9H-^$']W(`^VE#B8!```BX]8!0``C032P>`"*="+
+M1,$HBD@$ZU>09H%^$($`=R@/MT80#[:$.)@$``"+CY`%``"-!$"-!,")PL'B
+M!2G"BT21"(I(!.LF#[=&$`^VA#B8!```BY=T!0``C01`C02`BT3"5(I(!.L%
+MC78`L?^Z_P```&:!?A"%`'<-#[=&$&8/MI0XF`0``(#Y_W0'9H'Z_P!U+(-^
+M4`!T$H/L"(U&4%!7Z/S___^#Q!")]H/L"%97Z/S___^#Q!#IP@```(GV#[;)
+M#[:<.1X%``"-!%O!X`,IV(V<AR@!```/M]*-!-+!X`(IT(N76`4``(TLPH!^
+M%`!T.(/L"%%H&`<``.C\____@\0(BU4$BT4`B5`$B0+^2PI55^C\____QD,%
+M_X/$"%-7Z/S___^#Q!"0@'XF`74J@^P,:!`G``#H_/___X/$"%97Z/S___]J
+M`6H`55/H_/___X/$(.LGC78`@^P,:%##``#H_/___X/$"%97Z/S___^#Q`A5
+M4^C\____@\00@\0,6UY?7<-64X/L$(MT)""*1"0DB$0D#XI$)"B(1"0.BT0D
+M'(L84^C\____B<*#Q!"%P'4.QH:Q`````<9&(@/K:I#&0"3AQD`E`8!\)`,!
+M&<#WT(/``HA")K`/@'PD`@!U#+``@WXP`'0$BD9)D(A")V:+1AAFB4(0B5H8
+MQT(@`````,="-`````"X`````(!\)`(`=06X/&4$`(E";(/L"%)3Z/S___^#
+MQ!"#Q`1;7L.055=64X/L&(ML)#"+1"0LBSA7Z/S___^)PX/$$(7`=0S&A;$`
+M```!Z:$```"#[`Q7Z/S___^)QH/$$(7`=1;&A;$````!@^P(4U?H_/___X/$
+M$.MYC5,\B50D",9#).'&0R4!QD,F`V:+11AFB4,0BU0D((L"B4,8QT,@``(`
+M`(M&"(E#-+D`````N@`"``"0B`A`2G7ZB7-0QT-L/&4$`(/L"&H`_W0D%.C\
+M_____W,@_W80_W8,_W0D).C\____@\084U?H_/___X/$$(/$#%M>7UW#C78`
+M5U93BUPD$(M,)!2+?"08O@`````Y_G,5BA.*0P&(`8A1`8/!`H/#`D8Y_G+K
+M6UY?PXUV`%575E.#[`R+7"0@BVPD)(EL)`AF@WT``'D2#[=%`"4`'P``P?@(
+MB$,AC78`C7M,C744_+D%````\Z6+12Z)@X@```"+13*)@XP```"->V"-=3:Q
+M"O.E:@J-0TQ04.AJ____:@2-@X@```!04.A;____:A2-0V!04.A/____9L=#
+M-```9L=#-@``@\0DBT0D"&:#N+(!```!#Y3"P>(#BD,D@^#W"="(0R3VA:<`
+M```$=`9FQT,T`0#VA:0````!="-F@TLT`O:%J@````%T!6:#2S8!]H6H````
+M`70'9H%+-``!D/:%I````"!T$V:#2S0$]H6J````('0%9H-+-@+VA:0```!`
+M=!=F@4LT@`#VA:H```!`=`AF@TLV"(UV`,9#2@+VA9D````!="?V0S0!=`IF
+M@TLT"&:#2S80BH66````@^`?0(A#2CP@=0;&0TH?B?;VA9@````(=`9F@4LT
+M``+VA9@````$=`5F@TLT(/:%F`````)T!6:#2S00]H6H````('00]H6N````
+M('0'9H-+-$")]O9#-`%T%HN%R````(N5S````(E#0(E31.L/B?:+17B)0T#'
+M0T0`````@T-`_X-31/_V16H"=!WVA8`````/=!1F@[V``````AG`@\`$B$,X
+MZP:)]L9#.`+&0SG_]D5^!'0&QD,Y`NL8]D5^`G0&QD,Y`>L,]D5^`70&QD,Y
+M`(GVQD,Z__9%:@1T&+$`#[>%L````-/XJ`%T`XA+.D&`^09VZH/L"&@``@``
+M5>C\____B8.4````N`$```"#Q!Q;7E]=PY!75E.+?"00BUPD%(LW@^P,5NC\
+M____B<**2SJ#Q!"%P'4*QH.Q`````>M"D,9`).'&0"4!QD`F!(A()V:+0QAF
+MB4(0BP>)0AC'0B``````QT(T`````,=";#QE!`"(2SV#[`A25NC\____@\00
+M6UY?PXUV`%=64XM\)!"+7"04BS>#[`Q6Z/S___^)PHI+.(/$$(7`=0K&@[$`
+M```!ZT*0QD`DX<9`)0'&0"8%B$@G9HM#&&:)0A"+!XE"&,="(`````#'0C0`
+M````QT)L/&4$`(A+.X/L"%)6Z/S___^#Q!!;7E_#C78`5U93BW0D$(M\)!2+
+M'H/L#%/H_/___XG"@\00A<!U"<:'L0````'K.\9`).'&0"4!QD`F!F:+1QAF
+MB4(0BP:)0AC'0B``````QT(T`````,=";#QE!`"#[`A24^C\____@\006UY?
+MPY!75E.+="00BWPD%(L>@^P,4^C\____B<*#Q!"%P'4)QH>Q`````>L[QD`D
+MX<9`)0'&0"8,9HM'&&:)0A"+!HE"&,="(`````#'0C0`````QT)L/&4$`(/L
+M"%)3Z/S___^#Q!!;7E_#D%=64XMT)!"+?"04BQZ#[`Q3Z/S___^)PH/$$(7`
+M=0G&A[$````!ZT/&0"3AQD`E`<9`)A;&0"@!9HM'&&:)0A#&0F@/BP:)0AC'
+M0B``````QT(T`````,=";#QE!`"#[`A24^C\____@\006UY?PY!75E.+="00
+MBWPD%(L>@^P,4^C\____B<*#Q!"%P'4)QH>Q`````>L[QD`DX<9`)0'&0"87
+M9HM'&&:)0A"+!HE"&,="(`````#'0C0`````QT)L/&4$`(/L"%)3Z/S___^#
+MQ!!;7E_#D%=64XMT)!"+?"04BQZ#[`Q3Z/S___^)PH/$$(7`=0G&A[$````!
+MZSO&0"3AQD`E`<9`)AAFBT<89HE"$(L&B4(8QT(@`````,="-`````#'0FP\
+M900`@^P(4E/H_/___X/$$%M>7\.05U93@^P<BWPD+(I<)#"*1"0TB$0D&XI$
+M)#B(1"0:BT=4BS!6Z/S___^)PL9`).'&0"4!QD`F$8/$$+`/A-MU`XI'*XA"
+M)XI$)`^(0BAFBT<D9HE"$(ER&,="(`````#'0C0`````N`````"`?"0.`'4%
+MN`````")0FR#[`A25NC\____@\0@6UY?PY!75E.#[!R+?"0LBEPD,(I$)#2(
+M1"0;BDPD/(A,)!J+1U2+,%;H_/___XG"QD`DX<9`)0'&0"82@\00L`^$VW4#
+MBD<KB$(GBD0D#XA"*(M,)"P/ML6(0BF)R,'H$(A"*HG(P>@8B$(KB$HL9HM'
+M)&:)0A")<AC'0B``````QT(T`````+@`````@'PD#@!U!;@`````B4)L@^P(
+M4E;H_/___X/$(%M>7\-55U93@^P<BVPD,(M\)#3'1"08`````&:!?Q"%``^'
+MB0````^W1Q"`O"B8!```_W1[9H-_$']W(`^VE"B8!```BXU8!0``C032P>`"
+M*="+1,$HBE`$ZU>09H%_$($`=R@/MT<0#[:$*)@$``"+C9`%``"-!$"-!,")
+MPL'B!2G"BT21"(I0!.LF#[='$`^VA"B8!```BY5T!0``C01`C02`BT3"5(I0
+M!.L%C78`LO^Q_V:!?Q"%`'<+#[='$(J,*)@$```/ML(/MIPH'@4``(T$6\'@
+M`RG8C9R%*`$```^VP8T$0(T$@(N5=`4``(TTPH!_*`)U>P^V1RPE\````(/X
+M('0%@_@0=6@/ME<LB="#X`^#^`%U(H/L#&H!B=`E\````%!J`FH`5NC\____
+M@\0@Z3X&``"-=@`/MD8KBT2&/(E$)!@/MD<L)?````"#^"`/E,"#P`B+5"08
+MB(*R````BT(P9H%@,O_^Z04&``")]H!_%`!T0HI?%(-_4`!T$8/L"(U'4%!5
+MZ/S___^#Q!"0@^P(5U7H_/___X/$$(#[`@^%S04``(/L"%95Z/S___^#Q!#I
+MNP4```^V1B:#^!D/AW\%``#_)(40%P``#[9&-,'@"`.%!`H``(N`3`@``*,`
+M````@_@%=P6(1A_K!,9&'P6`>PL`=`W&1B8`QD,+`.D_!0``QD8F`NDV!0``
+M#[9&-,'@"`.%!`H``(N`3`@``*,`````9@^VP&:)1B`/MD8TP>`(`X4$"@``
+MBX!$"```HP````")PL'H"&:)1B(/ML+!X`AF"48@9H%^(D!!=0G&1B89Z=H$
+M``#&1B8#Z=$$```/MD8TP>`(`X4$"@``BX!$"```HP````"(1AT/MD8TP>`(
+M`X4$"@``BX!,"```HP````"H"'0&QD8>#.L<J`1T!L9&'@OK$M'H@^`!@_@!
+M&<#WT(/@"HA&'L9&)@3I;P0```^V1C3!X`@#A00*``"+@$P(``"C`````(/(
+M"(A&+,9&)@7I2`0``,9&)@;I/P0```^V1C3!X`@#A00*``"+@$P(``"C````
+M`(!^*P$9P(/@`H/`%(A&)ND3!```BD8K0(A&*SI&'W,)QD8F%NG^`P``QD8K
+M`,9&)A>#[`QH(*$'`.C\____@\00Z>$#``#&1B84Z=@#``#&1B8(Z<\#``#&
+M1B84Z<8#``#&1BX"Z/S___^)1G#&1B85Z;$#```/MD8TP>`(`X4$"@``BX!,
+M"```HP`````/ML")1"04#[9&-,'@"`.%!`H``(N`1`@``*,`````#[;`P>`(
+M"40D%.C\____B49TBT0D%(/@#X/X`W4/@'XN`'0)QD8F"NE-`P``BT9T*T9P
+M+4`-`P!X!H!^+@!T%L9&)A6`?BX`#X0L`P``_DXNZ20#```/MD8K@WR&/``/
+MA.\```#&1"03`(!["@!V1HU+.(E,)`R#[`S_="08Z/S___^)1"0H#[9&*X/$
+M$(M4)!@Y5(8\=!Z+3"0,BT$$B5$$B0J)0@2)$/Y$)!.*1"03.$,*=\'^2PJ+
+M5"08@WH<`'1UBT(<QT!@`````/9")`1U*?Z%5PP``(/L#%7H_/___X/$#&H!
+MBTPD((M!'`^V0`%05>C\____@\00@^P$BT0D'/]P'/^U)`4``&H!Z/S___^#
+MQ`R+5"0<_W(<_[4D!0``:@;H_/___XM,)"C'01P`````@\00#[9&*\=$ACP`
+M````@^P(_W0D(%7H_/___X/$$,9&)@GI'0(```^V1C3!X`@#A00*``"+@$P(
+M``"C``````^VT`^V1C3!X`@#A00*``"+@$0(``"C`````,'@"`G"B58X@'XF
+M"G0(]\(```$`=`[&1B8+Z<L!``#^2PKK<L9&)@P/MD8K@WR&/`!T4\9$)`L`
+M@'L*`'98C4,XB40D!(/L#/]T)!#H_/___XE$)"@/MD8K@\00BU0D&#E4ACQT
+MN8M,)`2+002)402)"HE"!(D0_D0D"XI$)`LX0PIWP>L0@^P,5>C\____B40D
+M*(/$$(-\)!@`#X1X`0``#[9&*XM4)!B)5(8\BD8OB(*R````Z2\!``#'!"0_
+M0@\`BT,8]D`J"'4J@^P,5>C\____QP0D`0```.C\____@\00_PPD@SPD_W0)
+MBT,8]D`J"'36QD8F">GL````#[9&-,'@"`.%!`H``(N`3`@``*,`````#[;`
+MB40D%`^V1C3!X`@#A00*``"+@$0(``"C``````^VP,'@"`E$)!2+1"04)?\/
+M```]$P$``'0'/2,!``!U,,9&)AB+1"04)?\/```]$P$``'4&QD8O".MZBT0D
+M%"7_#P``/2,!``!U:L9&+PGK9`^V5BH/MD8?2#G"?0S^1BK^1BO&1B8'ZTO&
+M1B8`9HM&,H/@]X/(`F:)1C*#?U``=!"#[`B-1U!05>C\____@\00@^P(5U7H
+M_/___\9#!?^#Q`A35>C\____@\00ZS7&1B8#B?:#?U``=!*#[`B-1U!05>C\
+M____@\00B?:#[`A75>C\____@\0(5E7H_/___X/$$(/$'%M>7UW#D%575E.#
+M[!R+?"0PBVPD-,=$)!@`````QD0D$P!F@7T0A0`/AX@````/MT40@+PXF`0`
+M`/]T>F:#?1!_=Q\/MI0XF`0``(N/6`4``(T$TL'@`BG0BT3!*(I(!.M69H%]
+M$($`=R@/MT40#[:$.)@$``"+CY`%``"-!$"-!,")PL'B!2G"BT21"(I(!.LF
+M#[=%$`^VA#B8!```BY=T!0``C01`C02`BT3"5(I(!.L%C78`L?^S_V:!?1"%
+M`'<+#[=%$(J<.)@$```/ML.-!$"-!("+EW0%``"-!,*)1"04#[;1#[:T.AX%
+M``"-!';!X`,I\(VTAR@!``"`^?]T&("\.AX%``#_=`Z`^_]T"8!]%`9U+XUV
+M`(-]4`!T$H/L"(U%4%!7Z/S___^#Q!")]H/L"%57Z/S___^#Q!#I%@8``(GV
+M@'T4`'02@^P(5E?H_/___X/$$.G\!0``BU0D%`^V0B:#Z`V#^`0/A[0%``#_
+M)(5X%P``BTPD%`^V033!X`@#AP0*``"+@$P(``"C``````^VT`^V033!X`@#
+MAP0*``"+@$0(``"C`````,'@"`G"QD0D$@#&1"01`+,`@'D?`'8UC78`#[;+
+MN`$```#3X(7"=!K^1"03BT0D%(-\B#P`=`;^1"01ZP7^1"02D$.+3"04.%D?
+M=\Z`?"02`'0(BT0D%(!(+0&`?"01`'0(BTPD%(!)+0*`?"03`0^%80$``+,`
+MBT0D%(!X'P!V4@^VR[@!````T^"%PG0C@^P$45=6Z/S___^)1"0H@\00A<!T
+M&8EP*(M4)!2)4##K#9!#BTPD%#A9'W?%ZQ6+1"04B%@K.%@?=@G&0"8.Z:,$
+M``"+5"04.%H?#X66!```@^P$:@$/MD8)4%?H_/___\9$)!L`@\00@'X*``^&
+MEP```(U>.(/L#%/H_/___XE$)"B#Q!"+0P2+3"08B4L$B1F)002)"(-Y'`!T
+M'H/L!/]Q'/^W)`4``&H%Z/S___^+1"0H@$@D`H/$$(/L!/]T)!QJ!E;H_/__
+M_X/$$(M4)!B`>DL`="*#[`Q7Z/S____'!"0!````Z/S___^#Q!"+3"08@'E+
+M`'7>_D0D"XI$)`LX1@H/AVS___^#?5``=!"#[`B-15!05^C\____@\00@^P(
+M55?H_/___XM4)"3&0BT`QD8%`(DT).C\____@\00Z=4#``"0BTPD%&:!23*`
+M`+,`@'D?`'93#[;+N`$```#3X(7"="2#[`115U;H_/___XE$)"B#Q!"%P'0:
+MB7`HBU0D%(E0,.L.B?9#BTPD%#A9'W?$ZQ6+1"04B%@K.%@?=@G&0"8/Z3L#
+M``"+5"04.%H?#X4N`P``@^P$:@$/MD8)4%?H_/___\9$)!H`@\00@'X*``^&
+MEP```(U>.(/L#%/H_/___XE$)"B#Q!"+0P2+3"08B4L$B1F)002)"(-Y'`!T
+M'H/L!/]Q'/^W)`4``&H%Z/S___^+1"0H@$@D`H/$$(/L!/]T)!QJ!E;H_/__
+M_X/$$(M4)!B`>DL`="*#[`Q7Z/S____'!"0!````Z/S___^#Q!"+3"08@'E+
+M`'7>_D0D"HI$)`HX1@H/AVS___^#?5``=!"#[`B-15!05^C\____@\00@^P(
+M55?H_/___XM4)"3&0BT`QD8%`(DT).C\____@\00Z6T"``"0BTPD%`^V033!
+MX`@#AP0*``"+@$P(``"C``````^VT`^V033!X`@#AP0*``"+@$0(``"C````
+M`,'@"`G"]\(```0`=`;V02T!=1+WPO__^_]T%XM$)!3V0"T"=`V+5"04QD(F
+M#^G/`0``BTPD%,9!+0#I]@$``+L_0@\`BT88]D`J"'4G@^P,5^C\____QP0D
+M`0```.C\____@\002X/[_W0)BT88]D`J"'39BT0D%,9`)A#I@`$``(M4)!0/
+MMD(TP>`(`X<$"@``BX!,"```HP`````/ML")1"0,#[9"-,'@"`.'!`H``(N`
+M1`@``*,`````#[;`P>`("40D#(M$)`R#X`^#^`,/A=<```#V0BT!=`O&0B82
+MZPW^3@KK<XM,)!3&0282BU0D%`^V0BN#?((\`'1,QD0D"0"`?@H`=E&-7CB#
+M[`Q3Z/S___^)1"0HBTPD)`^V02N#Q!"+5"08.52!/'2TBT,$B5,$B1J)0@2)
+M$/Y$)`F*3"0).$X*=\3K$(/L#%?H_/___XE$)"B#Q!"#?"08``^$T````(M4
+M)!0/MD(KBTPD&(E,@CR+1"0,)?\/```]$P$``'4)QH&R````".MSBT0D#"7_
+M#P``/2,!``!U8XM$)!C&@+(````)ZU:)]HM4)!3&0B83ZTJ+3"04#[9!-,'@
+M"`.'!`H``(N`3`@``*,`````#[9!-,'@"`.'!`H``(N`1`@``*,`````#[9!
+M+8/@`8/X`1G`]]"#P!.(02:)]H-]4`!T$H/L"(U%4%!7Z/S___^#Q!")]H/L
+M"%57Z/S___^#Q`C_="0<5^C\____@\00B?:#Q!Q;7E]=PXM$)`2+2`2!Z0`"
+M`0`/ME0D#(/B!\'B"(#.(`^V1"0(P>`(`<B)D!S%``!FBX`<Q0``9J,`````
+M#[;`PXM$)`2+2`2!Z0`"`0`/ME0D#(/B!\'B"(I4)!"`SA`/MD0D",'@"`'(
+MB9`<Q0``PU575E.#[`S&1"0+`,9$)`H`O?_____&1"0#`+[`X>0`#[9,)`-!
+MNP$```#3X[$`D`^VP4")P@^OTXGPB=>Z`````/?WB40D!+K_____BWPD(#GX
+M=P2)^BG".>IS#HG5BD0D`XA$)`N(3"0*08#Y#W:__D0D`X!\)`,'=J0/MD0D
+M"L'@`PI$)`L/ML"#Q`Q;7E]=PY!75E.+7"00C;O$"@``:@!J!P^V="0<5E/H
+M'____P^V1P%0:@-64^@1____@\0@6UY?PXGV5E.#[`2+="00BD0D%(A$)`.[
+M`````(GV:@(/MD0D!U!6Z*;^__^#Q`RH"'0'N`````#K&X/L#&H!Z/S___^#
+MQ!!#@?L/)P``=LZX_P```(/$!%M>PXUV`%.*7"0,:@,/MD0D%%#_="00Z%[^
+M__^#Q`PXV`^4P`^VP%O#D%93@^P$BW0D$(I$)!2(1"0#BD0D&(A$)`(/ML!0
+M:@$/MEPD"U-6Z&'^__]J0&H"4U;H5O[__X/$&%-6Z$3___^#Q!"Z_P```(7`
+M=6F#?"0<`'1!]D0D`@%T'@^V1"0#4&I`5NAT____@\0,NO\```"%P'1!ZSJ)
+M]@^V1"0#4&H85NA6____@\0,NO\```"%P'0CZQP/MD0D`U!J*%;H.O___X/$
+M#+K_````A<!T!XGVN@````")T(/$!%M>PXUV`%=64XM\)!"*7"04#[9T)!B#
+M[`@/ML-05^BG_O__@\00NO____^%P'4V#[;#4(GR#[;"4%?HX_[__X/$#+K_
+M____A<!T&FH!#[;#4%?H/_W__XM4)"B(`KH`````@\0,B=!;7E_#C78`55=6
+M4X/L#(M\)""*1"0DB$0D"P^V="0HO0````")\H32#X3-````:F1J`@^VV%-7
+MZ"_]__^#Q`A35^@=_O__@\00A<!U#FH#4U?HV?S__X/$#(GV:@&)\@^VPE`/
+MMD0D$U!7Z'#^__^#Q!"Z_____X3`#X54`0``NP`````[7"0P#XU#`0``#[9T
+M)`N+1"0P2#G8=2MJ0&H"5E?HQ/S__XM$)#P!V%!J6%97Z.C^__^#Q""%P`^%
+M#P$``.LIC78`:D1J`E97Z)G\__^+1"0\`=A0:E!65^B]_O__@\0@A<`/A>0`
+M``!%0SM<)#!\GNG7````D&B@A@$`Z);\__\/ML")!"1J`P^V7"034U?H4OS_
+M_X/$"%-7Z$#]__^#Q!"%P'0A#[:'Q0H``%!J`U-7Z##\__^Z_____X/$$.F+
+M````C78`#[9<)`M3:F!7Z&+]__^#Q`R%P'4;#[:'Q0H``%!J`U-7Z/K[__^Z
+M_____X/$$.M8NP`````[7"0P?3(/MG0D"VI$:@)65^C5^___BT0D/`'84&B`
+M````5E?H]OW__X/$((7`=0A%0SM<)#!\TP^VA\4*``!0:@,/MD0D$U!7Z)W[
+M__^#Q!")ZHG0@\0,6UY?7<.)]E93@^P0BUPD'/]T)"C_="0H#[9$)"A0:@!3
+MZ`G^__^)QH/$(&I4:@)J`%/H7/O__XGP@\046U[#5E.#[!"+7"0<_W0D*/]T
+M)"@/MD0D*%!J`5/HT?W__XG&@\0@:E1J`FH!4^@D^___B?"#Q!1;7L-55U93
+M@^P,BWPD((ML)#"*1"0DB$0D"P^V="0H:F1J`@^VV%-7Z/+Z__^#Q`A35^C@
+M^___@\00A<!U#6H#4U?HG/K__X/$#)!J`8GR#[;"4`^V1"034%?H-/S__X/$
+M$+K_____A,!U/^L*NO_____K-HUV`+L`````.>M])0^V="0+B?9J`(M4)#`/
+MM@0:4%97Z/K[__^#Q!"$P'7-0SGK?.*Z`````(G0@\0,6UY?7<.-=@!64X/L
+M$(M<)!S_="0H_W0D*`^V1"0H4&H`4^@M____B<:#Q"!J5&H":@!3Z#CZ__^)
+M\(/$%%M>PU93@^P0BUPD'/]T)"C_="0H#[9$)"A0:@%3Z/7^__^)QH/$(&I4
+M:@)J`5/H`/K__XGP@\046U[#55=64X/L'(ML)#"+1"0TBU`80HE4)!B*2@*(
+M3"07QD0D%0#'1"00`````+X`````BYTD!0``L8`/MGPD%XUV``^VP68/MI08
+MF`0``&:!^O\`=$V)\$8Y^'5&@/F!=Q\/M\*-!$"-!,")PL'B!2G"BX.0!0``
+MC120B50D$.LBBT0D-,=`+/____^#[`Q0_U`HN`````"#Q!#IJP$``(UV`$&`
+M^85VFHN=)`4``('#8`P``+&`#[9\)!>-=@`/ML%F#[:4&)@$``!F@?K_`'1-
+MB?!&.?AU1H#Y@7<?#[?"C01`C03`B<+!X@4IPHN#D`4``(T4D(E4)!#K(HM4
+M)#3'0BS_____@^P,4O]2*+@`````@\00Z2\!``"-=@!!@/F%=IJ+3"08BE$$
+M#[9I!<'E$`^V00;!X`@)Q0^V00<)Q0^V>0C!YQ`/MD$)P>`("<</MD$*"<>#
+M?"00``^$P0```,9$)!8`BT0D$(!X,``/AJX```")QH/&*`^VTHE4)`R0@^P,
+M5NC\____C5CX@\00BU8$B48$B3")4`2)`H![(0UT!H![(2)U9(M4)!@/MD(#
+M@_@[="*#^#QU4L9$)!4!@^P,_W0D0%57_W0D)%/H_/___X/$(.LUBT0D&(/`
+M"X/L!%50_[/D````Z/S___^#Q`3_="1`55?_="0D4^C\____QD0D-0&#Q""-
+M=@#^1"06BDPD%HM$)!`X2#`/AU____^X`0```(!\)!4`=1N+5"0TQT(L____
+M_X/L#%+_4BBX`````(/$$)"#Q!Q;7E]=PU575E.#[!R+1"0TBW@81XM0$$J)
+M5"08QT0D%`````"+2!R)3"00@'\!`74,QT`L`````.E"`@``@'\!`G5:@'\"
+M`75$BT0D,(.X*`4```!T"HN0*`4``(E4)#"+3"0PBX$D!0``BE<#B)!6#```
+MBE<#B)"V&```BT0D-,=`+`````#I\P$``)"+5"0TQT(L_O___^GB`0``@'\!
+M!'4BBD<#@^@[/`%W&(/L"/]T)#S_="0\Z/C\__^#Q!#IW@$``(!_`0-U>H!_
+M`@%U8@^V5P.+3"0P#[9!)HT,`(G0F??Y.=%^.H/L!`^V1P10#[;:4_]T)#SH
+M_/___X/$#`^V1P104_]T)#SH_/___XM4)$3'0BP`````@\00Z5P!``"+3"0T
+MQT$L_O___^E,`0``BT0D-,=`+/[____I/`$``(GVBU0D,(.Z*`4```!T"HN*
+M*`4``(E,)#")^X!_`0`/A*@```"0#[8S0XH#0XC!#[;0]L(!=#^+;"04`?6+
+M1"0T.V@4#X?4````@^P,5HM$)"`#1"0D4%)J`/]T)$SHH_C__X/$(#GP#X6P
+M````B6PD%.M/B?:-+#.)Z"GX@\`".T0D&`^/E````(/L#%93#[;!4&H`_W0D
+M3.BP^O__@\0@A<!U>8GK@'T``'4&@'T!`'0:@^P,:!`G``#H_/___X/$$(![
+M`0`/A5G___\/MC.%]G16:E1J`FH`_W0D/.B']?__@\00BU0D-(M"%"M$)!0Y
+MQG8"B<:#[`Q6BT0D(`-$)"10:@!J`/]T)$SH]??__X/$((7`>`8!1"04ZPR+
+M3"0TQT$L_____Y!J5&H":@#_="0\Z#'U__^#Q!"+1"0T@W@@`'0)BT`@BTPD
+M%(D(@^P,_W0D0(M$)$3_4"B#Q!"#Q!Q;7E]=PXGV@^P,BT0D$(.X*`4```!T
+M!HN`*`4``("X5@P```!U&<8%HP(```%J(&B@`@``:@Y0Z/S___^#Q!"#Q`S#
+M@^P,BT0D$(.X*`4```!T!HN`*`4``,8%HP(```!J(&B@`@``:@Y0Z/S___^#
+MQ!S#5U93BWPD$(/L!`^V="0<5@^V7"0<4_^W)`4``.C\____@\0,5E-7Z/S_
+M__^#Q!!;7E_#D(M4)`2+3"0(BT($9L>`;/[__^R8BT($9HF(:/[__\.04X/L
+M"(M<)!"*1"04BDPD&,8$)`6)XL9$)`$/QD0D`@+&1"0#`\9$)`0&QD0D!0?&
+M1"0&"\9$)`<,/`=W083)=!</ML`/M@P"N/[____3P&8A@U0,``#K%0^VP`^V
+M#`2X`0```-/@9@F#5`P```^W@U0,``!04^C\____@\0(@\0(6\.05U93BW0D
+M$(.^*`4```!T!HNV*`4``+\`````:@!J!XGX#[;84U;HD?/__VI$:@)35NB&
+M\___@\0@:-````!J`%-6Z'7S__]J`&H$4U;H:O/__X/$($>#_P%VP&B@A@$`
+MZ(?S__^(AL4*```/ML!0:@-J`%;H0_/__X/$%%M>7\.+1"0$BU`$@>H``@$`
+MBT0D"(L$`J,`````PXGVBT0D!(M(!('I``(!`(M4)`R+1"0(B10!PXUV`%.+
+M7"0(BU,$@>H``@$`QX*```$``````(N"!`$!`*,`````@,P!B8($`0$`:@1H
+M#,(``%/H_/___VBX"P``:`C"``!3Z/S___]H`0`,`&@`P@``4^C\____@\0D
+M:@1H#,,``%/H_/___VBX"P``:`C#``!3Z/S___]H`0`,`&@`PP``4^C\____
+M@\0D:@!H4,(``%/H_/___VH`:%##``!3Z/S___^+0P1FQX!,_O__``"+0P1F
+MQX!L_O__[)B+0P1FQX!H_O__[)AFQX-4#```__^#Q!A;PU93@^P$BU0D$#F2
+M)`4```^51"0#BD0D%(/@`P^VP(T<0+@'````B-G3X/?0B<8C<CR)<CR`?"08
+M`'0,N`0```#3X`GPB4(\_W(\#[9$)`?!X`@%4,(``%#_LB0%``#H_/___X/$
+M$%M>PXUV`%575E.#[`R+?"0@BW0D)(V?(`L``(N/D`4``(VI[`8-`&:!?A"%
+M`'<<#[=&$`^VA#B8!```C01`C03`B<+!X@4IPHTLD8M6-(!Z`0)U&HM"!(D#
+MBT((B4,$BT(,B4,(BT(0B4,,C78`@WY0`'02@^P(_W905^C\____@\00C78`
+M@^P(5E?H_/___\9%-`"#Q!Q;7E]=PXGV55=64X/L&(M\)"R+;"0PBT0D-(E$
+M)!2+3"0XB4PD$(M'"(LP5NC\____B<.#Q!"%P'1_@^P,5NC\____B<&#Q!"%
+MP'1MQD<T`8U#/,9#).'&0R4!QD,F$,9#%;MF#[97,V:)4Q")<QC'0R"0````
+MC5$(B5,TB4M0QD(!`L9!"$")Z8A*`HI,)`B(2@.*3"0$B$H$QT-L`````(/L
+M"&H`4.C\____@\0(4U;H_/___X/$$(/$#%M>7UW#B?955U93@^P8BUPD+(I$
+M)#"(1"07BDPD-(A,)!:*1"0XB$0D%8M#"(LH5>C\____B40D$(/$$(7`#X0U
+M`0``@^P,5>C\____B<*#Q!"%P`^$'P$``,9#-`&+#"2#P3R)3"0$BS0DQD8D
+MX<9&)0'&1B80QD85NV8/MD,S9HE&$(EN&,=&()````"-0@B)1C2)5E")P[D`
+M````NI````"("$!*=?K&0P&"Q@-`BD0D"XA#`HI,)`J(2P.*1"0)B$,$/`)W
+M/`^V1"0)C7L(C94@"P``_(T<A0````")V<'I`HG6\Z6)\HG8@^`"A<!T!&:E
+MB?*)V(/@`87`=%&)UJ3K3(N%(`L``(E#"(N%)`L``(E##`^V1"0)C7L0C94H
+M"P``_(T<A?C___^)V<'I`HG6\Z6)\HG8@^`"A<!T!&:EB?*)V(/@`87`=`.)
+MUJ2+!"3'0&P`````@^P(:@#_="00Z/S___^#Q`C_="0(5>C\____@\00@\0,
+M6UY?7<.)]E=64X/L$(MT)""*1"0DBE0D*(A4)`^(PL#J`HA4)`Z#X`.)QXM&
+M"(L8:@)J`&H`5NC\____@\00@'XT`'0@B?:#[`Q3Z/S____'!"0!````Z/S_
+M__^#Q!"`?C0`=>*+1@B+$('"(`L``(I"`H3`>#R#R("(0@)J`6H`:@!6Z/S_
+M__^#Q!"`?C0`="&0@^P,4^C\____QP0D`0```.C\____@\00@'XT`'7BB?9J
+M`0^V1"024&H#5NC\____@\00@'XT`'0AC78`@^P,4^C\____QP0D`0```.C\
+M____@\00@'XT`'7BBT8(BQB!PR`+``")^@^VPKD#````*<&`?"0/``^5P@^V
+MTL'B`XL$"X/@YPG0B00+:@$/MD0D$E!J`U;H_/___X/$(%M>7\.0D)!55U93
+MBU0D%(M\)!B+;"0<BUPD((N*6`4``(VQZ!8!`&:!?Q"%`'<7#[='$`^VE!"8
+M!```C032P>`"*="--,&-C2`$``#&A2`$```G9H%_).$!=22*1R9(/`%W"(I7
+M)^LBC78`9H%_).$!=0R*1R:#Z!&R#SP!=@NR`(-^,`!T`XI628/B#XI!`8/@
+M\`G0B$$!L@!F@7\DX0%U"8I')D@\`78#D+(!P>('BD$!@^!_"="(00&*0P:(
+M00**`XA!`XI#!8A!!XI#!XA!#XI#`HA!!(I#`XA!!8I#!(A!!HI#`8A!#(I#
+M"HA!"(I#"XA!"8I##(A!"HI#"(A!"XI#"8A!#5M>7UW#B?964X/L!(M,)!"+
+M7"04BU$HBS(/MD,D@_@O=&6#^"]_*(/X&P^$ZP```(/X&W\*@_@2=$WI\```
+M`(/X*'1#@_@J=#[IX0```)`]B@```'0Q/8H```!_%H/X-0^$M0```#V(````
+M=!KIO0```)`]CP```'0-/>$```!T9>FI````D/9!-`%T!X%+9```!`#V0380
+M#X2=````@'LD*'07@'LD*G01@'LDB'0+@'LDB@^%@0```)#V0@@!=1:#[`@/
+MMD($4%;H_/___X/$$(3`=&60@'L4@71>@4MD```!`.M5N`````"`>R4!=4\/
+MMD,F@_@<=QG_)(6,%P``@TMD".LT@TMD`>LN@TMD(.LHN`````#K)I#V030!
+M=`>!2V0```0`@TMD`>L-D+@`````]D-F('0&D+@!````@\0$6U[#D`^V1"0$
+MPXGV#[9$)`7#B?93BU0D"(M<)!#&0A0"BTHXBT0D#(A!`HM".,9`!P"+0CB(
+M6`Q;PXGVBU0D!(M,)`B*0BF(00**0BB(00.*0B>(002*0B:(00K#C78`BU0D
+M!(M,)`B*0BV(00**0BR(00.*0BN(002*0BJ(00J*0BF(00N*0BB(00S#C78`
+MBTPD#+H`````.<I]$HUV`(G(*="#^`%^`4)".<I\\<-75E.#[`2+7"04BW0D
+M'`^V?"08#[9#)(/X*G0D@_@J?PN#^"AT&NG9````D#V(````="D]B@```'0B
+MZ<4```"0BD,LB$0D`XI#*XA$)`)64^C\____@\0(ZQJ)]HI#,8A$)`.*0S"(
+M1"0"5E/H_/___X/$",9&!4#V0V8!=#**1"0#B`:*1"0"B$8(C03]`````(A&
+M`8![)"AT!H![)(AU!\9&!F#K79#&1@9AZU:)]O9#9@1T)HI$)`.(1@&*1"0"
+MB$8)@'LD*'0&@'LDB'4&QD8&)>LNQD8&->LHBD0D`XA&`8I#)H/@#PA&!8![
+M)"AT!H![)(AU!L9&!LCK!L9&!LJ)]H/$!%M>7\.055=64X/L+(ML)$2+=32)
+MY_RY"````+@`````\ZOVAJ<````$=!:+CL@```"+GLP```"#P?^#T__K#8GV
+MBT9X2(G!NP````"`?20E=5>_"````(G(#ZS8&(@$)(G(#ZS8$(A$)`&)R`^L
+MV`B(1"0"B$PD`_:&U0```!!U#\9$)`8"QD0D!P#IC0```&H$C8;J````4(U$
+M)`Q0Z/S___^#Q`SK=9"_(````(G8P>@8B`0DB=C!Z!"(1"0!B=C!Z`B(1"0"
+MB%PD`XG(#ZS8&(A$)`2)R`^LV!"(1"0%B<@/K-@(B$0D!HA,)`?VAM4````0
+M=0[&1"0*`L9$)`L`ZQJ)]FH$C8;J````4(U$)!!0Z/S___^#Q`R)]HG@@^P$
+M5U#_=33H_/___X/$/%M>7UW#D(M,)`2*028*02<*02@*02D/ML`/ME$L@^(!
+M"=!T#FHD:@51Z/S___^#Q`S#BT0D",9`!NS'06P`````PU93@^P$BUPD$(MT
+M)!0/MD,D@_@O=`H]CP```'0?ZVF0BD,LB$0D`XI#*XA$)`)64^C\____@\0(
+MZQJ)]HI#,8A$)`.*0S"(1"0"5E/H_/___X/$",9&!4#V0V8$=!:*1"0#B$8!
+MBD0D`HA&"<9&!D+K%HGVBD0D`XA&`8I#)H/@#PA&!<9&!D"#Q`1;7L.)]HM,
+M)`B+5"0,QD(%0`^V022#^#5T"SV1````="#K)HGVBT0D!`^W0#2#X`&#^`$9
+MP(/@_8/H%HA"!NL9D,9"!NKK$HGV:B1J!5'H_/___X/$#,.)]O9!)0)T!,9!
+M%`##D(M$)`3V0"CP=`YJ)&H%4.C\____@\0,D,.-=@!55U93BVPD%(MT)!B+
+M7"0@#[9\)!RX`````+D-````B=J-=@"(`D))=?H/ME8D@_HU#X2*````@_HU
+M?R>#^BAT7(/Z*'\.@_H;#X2"````Z70"``"#^BIT1(/Z+W14Z64"``"!^H\`
+M``!T1X'ZCP```'\5@?J(````="*!^HH```!T&NE``@``@?J1````=#&!^N$`
+M``!T8>DK`@``4XGZ#[;"4%;H_/___X/$#.D=`@``4U;H_/___X/$".D.`@``
+M4U95Z/S___^#Q`SI_@$``/9&*`%T&<9#!G#&0P0`QD,#`,9#`@#&0P5`Z=\!
+M``#&0P;@Z=8!``"X`````(!^)0$/A<P!```/MD8F@_@<#X>K`0``_R2%`!@`
+M`,9#!P3IJ@$``,9#!P#IH0$``,9#!NSIF`$``,9#!N_&`P.*1B>#R$"(0P'I
+M@P$``,9#!N_&`P?I=P$``,9#!D#&0P$!QD,%0.EF`0``QD,&[\8#`XI&)X/(
+M"(A#`>E1`0``QD,&[\8#`NE%`0``QD,&[\8#@NDY`0``QD,&[\8#!NDM`0``
+MQD,&[\8#ANDA`0``QD,&XXI&)XA#`>D2`0``QD,&L,8#V,9#`T_&0P3"Z?X`
+M``#&0P:PQ@/9QD,#3\9#!,+IZ@```,9#!K#&`]K&0P-/QD,$PNG6````#[=%
+M-(/@`8/X`1G`@^#]@^@6B$,&Z;P```#&0P;OQ@.JZ;````#&0P;OQ@-5Z:0`
+M``#&0P8OQD,!`<9#`A#IDP```,9#!N2*1BB(`XI&)XA#!>E_````BD8GB$,&
+MBD8HB`.*1BF(0P**1BJ(0P.*1BN(0P2*1BV(0PJ*1BR(0P'K5,9#!NB*1BB(
+M`XI&)XA#!8I&*8A#`HI&*HA#`XI&*XA#!(I&+(A#`>LK]D8H`70EQD,&<,9#
+M!`#&0P,`QD,"`,9#!4#K#[@`````ZPV0N`````#K!;@!````6UY?7<.0D)!7
+M5E.+?"04BT0D$(MP!('N``(!`+L`````.?MS+8UV`(N&`,@``*,`````J`%U
+M";@`````ZQF)]H/L#&H*Z/S___^#Q!!#.?MRUKC_____6UY?PY!3BUPD'(M$
+M)`B+2`2!Z0`"`0`/ME0D$,'B"`^V1"08P>`$"<*`?"04`'0#@\H$@_O_=!")
+MV"7__P,`B8$$R```@\H"BT0D#(D06\.0BT0D!(M0!('J``(!`(M$)`B#R`&)
+M@@#(``##D%93@^P$BUPD$(MS!('N``(!`&K_:@%J`8N#7`P```^V0`)0C40D
+M$%!3Z&K_____="084^BL____@\08:!`G``!3Z/[^__^#Q!"Z_____X7`=1N+
+MA@S(``"C`````(D$)(G"BT0D%(@0N@````")T(/$!%M>PXUV`%575E.#[`R+
+M;"0@BWPD+`^V="0DBD0D*(A$)`J[`````#G[<SV-=@"#[`B-1"034%7H4O__
+M_X/$$(7`=1.)\")$)`LZ1"0*=0>X`````.L7@^P,:@KH_/___X/$$$,Y^W+&
+MN/____^#Q`Q;7E]=PY!3@^P(BUPD$&K_:@!J`(N#7`P```^V`%"-1"044%/H
+MC?[___]T)!Q3Z,_^__^#Q!AH$"<``%/H(?[__X/$$+K_____A<!U&6C@DP0`
+M:@)J`U/H.O___X/$$(/X`1G2]]*)T(/$"%O#D%.#[`B+7"00_W0D%&H!:@&+
+M@UP,```/MD`+4(U$)!104^@B_O___W0D'%/H9/[__X/$&&@0)P``4^BV_?__
+M@\00NO____^%P'4:BT,$BY`,QO__B14`````BT0D&(@0N@````")T(/$"%O#
+MD%93@^P8BUPD)(MT)"C&1"07_XU$)!=05E/H_/___X/$$+K_____A<!U>KH`
+M````@'PD$P!T;H/L#%/H[?[__X/$$+K_____@_C_=%A6:@!J`(N#7`P```^V
+M0`I0C40D'%!3Z'7]____="0D4^BW_?__@\08:!`G``!3Z`G]__^#Q!"Z____
+M_X7`=1EHX),$`&H`:@-3Z"+^__^#Q!"#^`$9TO?2B="#Q!1;7L-3@^P4BUPD
+M'%/H<O[__X/$$+K_____@_C_=%O_="04:@!J`(N#7`P```^V0`90C40D%%!3
+MZ/?\____="0<4^@Y_?__@\08:!`G``!3Z(O\__^#Q!"Z_____X7`=1EHX),$
+M`&H`:@-3Z*3]__^#Q!"#^`$9TO?2B="#Q`A;PXUV`%93@^P0BW0D'(M>!('K
+M``(!`%;HZ/W__XM$)"B)@PC(``#_="0D:@1J`(N&7`P```^V0`50C40D(%!6
+MZ'#\__^#Q"C_-"16Z+#\__]H$"<``%;H!?S__X/$$+K_____A<!U&6B($P``
+M:@!J`5;H'OW__X/$$(/X`1G2]]*)T(/$!%M>PU575E.#[`R+;"0DBWPD*(MT
+M)"R[`````#GS<R.#[`3_-!^-1!T`4/]T)"SH3/___X/$$(/X_W0,@\,$.?-R
+MW;@`````@\0,6UY?7<-64X/L!(M<)!"*1"0<BW,$@>X``@$`/`1V`K`$_W0D
+M%`^VP%!J`8N#7`P```^V0`10C40D$%!3Z*3[____="084^CF^___@\08:!`G
+M``!3Z#C[__^#Q!"Z_____X7`=1N+A@S(``"C`````(D$)(G"BT0D&(D0N@``
+M``")T(/$!%M>PY!55U93@^P,BVPD)(MT)"B+1"0L`>B)1"0$B>N#X_R)[X/G
+M`W1':@2-1"0,4%/_="0LZ$;___^-0P2#Q!"Y!````#M$)`1V"(M,)`0IZ0'Y
+MB?HYSW,2C7PD"(UV`(H$%X@&1D(YRG+U@\,$B?:+?"0$@^?\.?MS)8UL)`B0
+M:@154_]T)"SH\_[__XM$)!B)!H/&!(/$$(/#!#G[<N`[7"0$<S9J!(U$)`Q0
+M4_]T)"SHR?[__XM,)!0IV;H`````@\00.<IS$XU<)`B-=@"*!!.(!D9".<IR
+M]9"X`````(/$#%M>7UW#C78`5E.#[`2+7"00QP0D`````(MS!('N``(!`,:#
+M6`P```!J`&H":@$/M@4(````4(U$)!!04^@[^O___W0D&%/H??K__X/$&&@0
+M)P``4^C/^?__@\00A<!U/(N&#,@``*,`````B00D/;]#``!U)\>#2`P``+]#
+M``#'@TP,`````"``QX-0#````!```&:X``#K"(UV`+C_____@\0$6U[#D%93
+M@^P$BUPD$,<$)`````"+<P2![@`"`0#&@U@,````:@!J`FH!#[8%"````%"-
+M1"004%/HF_G___]T)!A3Z-WY__^#Q!AH$"<``%/H+_G__X/$$(7`=3R+A@S(
+M``"C`````(D$)#T?8P``=2?'@T@,```?8P``QX-,#``````$`,>#4`P`````
+M`0!FN```ZPB-=@"X_____X/$!%M>PY!64X/L!(M<)!#'!"0`````BW,$@>X`
+M`@$`QH-8#````6K_:@)J`0^V!0@```!0C40D$%!3Z/OX____="084^@]^?__
+M@\08:!`G``!3Z(_X__^#Q!"%P'5HBX8,R```HP````")!"0]'T,``'0K/1]$
+M``!U3,>#2`P``!]$``#'@TP,``````0`QX-0#``````!`&:X``#K+<>#2`P`
+M`!]#``#'@TP,``````0`QX-0#``````!`+@`````ZPB-=@"X_____X/$!%M>
+MPY!64X/L!(M<)!#'!"0`````BW,$@>X``@$`QH-8#````&H`:@)J`0^V!0@`
+M``!0C40D$%!3Z"_X____="084^AQ^/__@\08:!`G``!3Z,/W__^#Q!"%P'5P
+MBX8,R```HP````")!"0][Q$``'0+/>\2``!T+.M2B?;'@T@,``#O$0``QX-,
+M#``````$`,>#4`P``````0"X`````.LPC78`QX-(#```[Q(``,>#3`P`````
+M!`#'@U`,``````$`N`````#K"(UV`+C_____@\0$6U[#D%.#[!2+7"0<4^BR
+M_?__@\00A<!U$\>#7`P```````"Z`````.MJB?:#[`Q3Z"_^__^#Q!"%P'41
+MQX-<#````````+H`````ZT>#[`Q3Z,[\__^#Q!"%P'41QX-<#````````+H`
+M````ZR:#[`Q3Z+G^__^#Q!"Z_____X7`=1''@UP,````````N@````")]HG0
+M@\0(6\.05U93BUPD$(M\)!R*1"0@BW0D&+H`````@[M<#`````^$TP```(3`
+M=#N#?"04_W409HN#2`P``&:)!NFQ````D%=6_W0D'%/H5/O__X/$$+H`````
+MA<`/A9P```#ICP```(UV`(-\)!3_=1&`/@\/E(-9#```N@$```#K?+H`````
+M@+M9#````'1NBT0D%+H`````][-0#```A=)U.X"[6`P```!T&8/L"/]T)!Q3
+MZ/S___^#Q!"Z`````(7`=3F#[`C_="0<4^@`^?__@\00N@````"%P'4@5U;_
+M="0<4^CL^?__@\00N@````"%P'4(N@$```"-=@")T%M>7\.0D%575E.#[$R+
+M;"1@QD0D&&V-1"08QD`!_\9``B/&0`,4QD`$.L9`!>_&0`86QD`'DKD`````
+MNB````"-1"0@B?:("$!*=?K&1"0D`<9$)`\`:B"-7"0D4VH.5>C\____@\00
+MA<!U6(/L#&B`&@8`Z/S___]J(%-J#U7H_/___X/$((/X('4XC50D,(U$)!BY
+M"````/R)UHG'\Z8/E\(/DL`XPG4:QD0D#P$/MD0D+L'@"`^V5"0O"=")A30%
+M```/MD0D#X/$3%M>7UW#D%93BU0D#+L#$0`GN0````"#>@@`="Z+0@B+`*,`
+M````B<:+0@B)&(M""(L`HP````"Y`````#G8=0J+0@B),+D!````B<A;7L.-
+M=@!55U93@^P<BUPD,(L#BX!@`/__HP````"#X`.#^`%T&(/X`7('@_@"=&?K
+M;\>#,`4```$```#K8X/L#%/H_/___X/$$(3`=!ZAY`,``(D<A<`#``!`H^0#
+M``#'@S`%```"````ZS53Z/S___^#Q`2$P'0HH>@#``")'(70`P``0*/H`P``
+MQX,P!0``!````.L*QX,P!0```P```*'@`P``B1R%@`,``$"CX`,``(`]#0``
+M```/A8T```#&1"03`(7`#XYG`@``@SW``P```'0L#[94)!.[@`,``(L-P`,`
+M`#L,DW07BP23B8@H!0``BQ23H<`#``")@H@1``"#/=`#````="P/ME0D$[N`
+M`P``BPW0`P``.PR3=!>+!).)B"P%``"+%).AT`,``(F"C!$``/Y$)!,/MD0D
+M$SL%X`,``'R%Z><!``#&1"03`*'``P``B40D&(7`#X3=````O0````"#/>`#
+M````#XZO````D(GI#[;1BP25@`,``(.X*`4````/A8,```"+3"08.<AT>[X`
+M````B@T-````A,ET;(E4)`R+5"0,N(`#``"+')`X2R%R0P^V4R$/ML&)QP,]
+M%!$``#GZ<S"+5"08.$HA<B</MD(A.?AS'XF3*`4``(M,)`RZ@`,``(L$BHM,
+M)!B)B(@1``#K%9!&B?(/ML+!X`6*B`T```"$R769D$6)Z0^VP3L%X`,```^,
+M4O____Y$)!,/MD0D$XL$A<`#``")1"08A<`/A2/____&1"03`*'0`P``B40D
+M%(7`#X3>````O0````"#/>`#````#XZP````B?:)Z0^VT8L$E8`#``"#N"P%
+M````#X6#````BTPD%#G(='N^`````(H-#0```(3)=&R)5"0(BU0D"+B``P``
+MBQR0.$LA<D,/ME,A#[;!B<<#/101```Y^G,PBU0D%#A*(7(G#[9"(3GX<Q^)
+MDRP%``"+3"0(NH`#``"+!(J+3"04B8B,$0``ZQ601HGR#[;"P>`%BH@-````
+MA,EUF9!%B>D/ML$[!>`#```/C%+____^1"03#[9$)!.+!(70`P``B40D%(7`
+M#X4B____@\0<6UY?7<.)]E575E.+;"04O@````"X`0```(`]#0````!T8>L'
+MN`$```#K6(GR#[;"P>`%1HJ(#0```(3)=$"+/101``"-=@`X32%R'P^V52$/
+MML&-'#@YVG,1BT0D&#A((7((#[9`(3G8<KF)\@^VPL'@!4:*B`T```"$R77)
+MN`````!;7E]=PXUV`%.+3"0(BUPD#(N!,`4``+H!````.X,P!0``=PZ+@3`%
+M```[@S`%```9THG06\.)]HM4)`2+3"0(N``````[%6`1``!],HT44L'B`V:+
+M@@`1``!FB0%FBX("$0``9HE!`HJ""!$``(A!"(J""1$``(A!";@!````PU57
+M5E.#[`C'1"0$`````)"+1"0$P>`%B<-F@[@```````^$AP```+T`````@+@<
+M`````'1JB00DBU0D!(U$U0"--(4,````C7PD'+D$````_/.F#Y?"#Y+`.,)U
+M,[\0````BD0[#4"(1#L-@'P[#`!T'CI$.PQV&&8/ML!F#[9,.PRZ`````&;W
+M\8A4.PV)]D6+'"0/MH,<````.>A_F?]$)`2#?"0$`P^.8O___X/$"%M>7UW#
+MB?955U93@^P,QD0D"P#&1"0*`(UV`,9$)`D`:@`/MD0D#5`/MD0D$E`/MD0D
+M%U#H_/___XE$)!2_`````(/$$#L]8!$```^-3P$``(GVC01_P>`##[>0`A$`
+M`,'B$`^W@``1```)PCM4)`0/A1T!``#&1"0(`(T$?\'@`XD$)(TL?P^V5"0(
+MB='!X05F@[D``````'5PBQPDBX,`$0``B8$`````BX,$$0``B8$$````BX,(
+M$0``B8$(````#[:!'````,'B`XT$`HI<)`N('(4-````#[:!'````(T$`HI<
+M)`J('(4.````#[:!'`````'"BD0D"8@$E0\```#^@1P```#K>P^V="0(B?/!
+MXP4/MHL<````B<BZ`````/<T[101``"%TG1)C13U`````(T$"HI,)`N(#(4-
+M````#[:#'````(T$`HI,)`J(#(4.````#[:#'`````'"BD0D"8@$E0\```#^
+M@QP```#K$HUV`/Y$)`B`?"0(`P^&`?___XT$?_\$Q0P1``"-=@!'.SU@$0``
+M#XRS_O___D0D"0^$=O[___Y$)`J`?"0*'P^&8O[___Y$)`N`?"0+_P^%2_[_
+M_X/$#%M>7UW#C78`55=64X/L',=$)!0`````@SWL`P```'4/QP7L`P```0``
+M`.@-_O__@WPD-`!T!XM$)#3&``#'1"08`````+H`````.Q5@$0``?3^)]HM,
+M)!B-!$F-%,4`````BX(,$0```40D%(-\)#0`=`Z+3"0TB@$"@A`1``"(`?]$
+M)!B+1"08.P5@$0``?,.#?"0X``^$IP```,=$)!@`````BT0D&,'@!8G%9H.X
+M```````/A(@```"[`````("X'`````!T:XM4)!C!X@.)5"00B40D#(M$)!`!
+MV(TTA0P```"+?"0XN00```#\\Z8/E\(/DL`XPG4I@WPD-`!T#(J%'0```(M4
+M)#2(`HM$)!C!X`4/MH`<````B40D%.L2B?9#BVPD#`^VA1P````YV'^D_T0D
+M&(-\)!@##XYA____#[9$)!2#Q!Q;7E]=P[C`&```PXGVN)P```##B?:X!```
+M`,.)]E575E.#[`R+?"0@BW0D*(ML)"R-GF`,``"Y`````+K`&```B?"-=@"(
+M"$!*=?J);A"+%6`#``"-0@&C8`,``(A6*(M$)"2)1B#&1BD`9HL'9HE&&&:+
+M1P)FB48:BT<$B48<B6L0B%,HBT0D)(E#(,9#*0%FBP=FB4,89HM'`F:)0QJ+
+M1P2)0QP/MT8:/2(G``!_83T@)P``#XW"````/4`A```/A+<````]0"$``'\;
+M/2`A```/A*4````](B$```^$F@```.FI````/40A```/A(H````]1"$```^,
+MDP```"T0)P``@_@!#X>%````ZV^-=@`]8"<``'1E/6`G``!_(#U`)P``=%<]
+M0"<``'\)/3`G``!T2>M;/40G``!T0.M2/8(G``!T-SV")P``?PD]@"<``'0I
+MZSL]@)$``'0)/8"4``!T&>LK9L=&)("1QD8F!&;'0R2`D<9#)@3K%9!FQT8D
+M@)3&1B8$9L=#)("4QD,F!(I'"(A&*HI'"(A#*F@```0`:@!J`E7H_/___XD&
+M:``@``!J`&H`5>C\____B48(@\0@@SX`=`2%P'4*N`````#IY````(L&C8@`
+M`@$`B4X$C9````(`B18%`$`"`(D#B4L$BT8(B4,(NP`````['6`1``!]3HLM
+M8!$``(T$6XT,Q0````"+!SF!`!$``'4OBX$0$0``0(F!$!$``(.Y#!$```!T
+M&3N!#!$``'81N@````#WL0P1``")D1`1``!#.>M\N(M&!,>`((+__P'P`P"+
+M1@3'@"B"__\!``#H@^P(:GC_=A#H_/___XG")0!P``"#Q!`]`"```'84@^P$
+M:G@/ML)0_W80Z/S___^#Q!#_="0DZ)#Y__^#[`A6Z%/U__^X`0```(/$$(/$
+M#%M>7UW#C78`4X/L%(M<)!Q3Z/S___^!PV`,``")'"3H_/___[@!````@\08
+M6\.)]E93@^P0BW0D'(N>)`4``('#8`P``%;H_/___X/$$(!^.0%U!H![.0%T
+M.X/L"(V>$`$``%/_=A3H_/___\>&$`$``.@#``#'AA@!````````B;8<`0``
+M@\0(4_]V%.C\____@\00@\0$6U[#D%93@^P0BUPD'(VS8`P``%/H_/___XE#
+M%(E&%(F;)`4``(F>)`4``(N#,`4``(F&,`4``(D<).C\____B30DZ/S___^)
+M'"3H_/___X/$$+H`````A,`/A(4```"#[`Q6Z/S___^#Q!"Z`````(3`='"#
+M[`Q3Z/S____'!"30!P``Z/S___^)'"3H_/___XD<).C\____QX,0`0``Z`,`
+M`,>#&`$```````")FQP!``"#Q`B-@Q`!``!0_W,4Z/S___^#Q`AJ`%/H_/__
+M_X/$"&H`5NC\____N@$```"#Q!"0B="#Q`1;7L-55U93@^P\BUPD4,9$)`AM
+MC40D",9``?_&0`(CQD`#%,9`!#K&0`7OQD`&%L9`!Y*#NR@%````=`:+FR@%
+M``"Y`````+H@````C40D$(UV`(@(0$IU^L9$)!0!O0````!J((UT)!16:@Y3
+MZ/S___^#Q!"%P'5!@^P,:(`:!@#H_/___VH@5FH/4^C\____@\0@@_@@=2&-
+M="0@C40D"+D(````_(G'\Z8/E\(/DL`XPG4%O0$```")Z(3`=1"#[`QHX0$`
+M`.C\____@\00B>H/ML*#Q#Q;7E]=PXGVPXUV`%575E.#[`R+;"0@BUPD)+D`
+M````NG@```")V)"("$!*=?J#O3`%```!#Y1#$XM%((D#@$L1$&:+11AFB4,$
+M9HM%&F:)0P:+A3`%``"(0VS&0Q(@9H%]&B`A=`AF@7T:(B%U',9#%P*^4`<`
+M`(U[//RY!P```/.E9J6DZ80```!FBT4:+1`G``!F@_@!=A!F@7T:0"%T"&:!
+M?1I$(75-QD,7!&:+11HM$"<``&:#^`%W%;YP!P``C7L\_+D'````\Z5FI:3K
+M/6:!?1I`(70(9H%]&D0A=2V^D`<``(U[//RY!P```/.E9J6DZQC&0Q<(@^P(
+M:`````"-0SQ0Z/S___^#Q!"*0Q?V8Q*(0Q"$P'4$QD,0@+[]`0``C7L8_+D'
+M````\Z6D@[TL!0```'02BX4L!0``BT`(B4-DF8E3:.L*BT4(B4-DF8E3:,=#
+M8``@``"#Q`Q;7E]=PXUV`(M$)`3&@)<`````PU=64XMT)!"+?FR+AR0%``"`
+M>"<`#X6*````BUYP@^P(BU9@#[:"HP```%`/MH*B````4`^V@J$```!0#[:"
+MH````%`/MH*?````4`^V@IX```!0#[:"G0```%`/MH*<````4`^V@M<```!0
+M#[8&@^`!4`^V1@)0#[9&`5#_=@AHL`<``.C\____@\0\QT9P`````/]V"%;_
+M=GC_TX/$$.LXC78`@^P(C5Y\4_]W%.C\____QT9\]`$``,>&A````"RW!`")
+MMH@```"#Q`A3_W<4Z/S___^#Q!!;7E_#C78`55=64X/L#(ML)"0/MT0D*(T4
+MP,'B`BG"BTPD((N!6`4``(T<T(NQ)`4``('&8`P``(ET)`B)76"):QR#>RP`
+M=0J#>S``#X2;`P``OP````"`30`!BT,PB45HBT,LB45DL0"+1"0@@'@K`'8E
+MBW,HD`^VT8G0P>`$`="+5"0@.[2"/`L```^$A@(``$$X2BMWW[&`BT0D((NP
+M)`4```^VP8J$,)@$```\_W0I@WLL`'0B#[;`C01`C03`B<+!X@4IPHN&D`4`
+M`(T4D#M3+`^$-`(``$=!@/F!=L.Q@HM4)""+LB0%``")]@^VP8J$,)@$```\
+M_W0<#[;`C01`C02`BY9T!0``C03".T,P#X3L`0``1T&`^85VT+&`#[;!BW0D
+M"(J$,)@$```\_W0I@WLL`'0B#[;`C01`C03`B<+!X@4IPHN&D`4``(T4D#M3
+M+`^$GP$``$=!@/F!=K^Q@HUV``^VP8M4)`B*A!"8!```//]T'`^VP(T$0(T$
+M@(N2=`4``(T$PCM#,`^$7`$``$=!@/F%=LR+1"0@@'@Y`75&@WLL`'05@^P$
+M:@`/MD-)4/]S+.C\____@\00@[O@``````^$`@(``(/L!&H`#[:#U0```%#_
+ML^````#H_/___X/$$(UV`(.[X``````/A-<!``"+4RR)5"0$OP````"`>C``
+M=D6)UH/&*(/L#%;H_/___XU(^(/$$(M6!(E&!(DPB5`$B0*`N=<```#_=0^`
+M>2$`=0F#N>``````=0Q'B?F+1"0$.$@P=\")^HM,)`0X43`/A=````"*@]<`
+M``"(10*_`````(!Y,``/AKD!``")SH/&*(/L#%;H_/___XU(^(/$$(M6!(E&
+M!(DPB5`$B0*#>1P`=$*+41R*0@(Z@=<```!T-(-Z<`!U+H-Z=`!U*(J!UP``
+M`(A"`H/L!`^W01A0BT0D*/^P)`4``&H'Z/S___^#Q!"-=@!'B?J+3"0$.%$P
+M=Y#I/P$``(GXB$4!Z:'^__^)^HA5`>F7_O__B?F(30'IC?[__XGXB$4!Z8/^
+M__^+5"0@#[9"*8T$@8B%F````.EJ_?__BD-)B$4"QH/7````_[\`````BTPD
+M!(!Y,``/AN$```")SH/&*(/L#%;H_/___XU(^(/$$(M6!(E&!(DPB5`$B0*`
+MN=<```#_=$?&@=<```#_@WD<`'0ZBU$<BD(".D%)="^#>G``=2F#>G0`=2.*
+M04F(0@*#[`0/MT$84(M$)"C_L"0%``!J!^C\____@\00D$>)^HM,)`0X43!W
+MB.MBB?:*0TF(10+K6(MT)"`/MD8IC02!B$4!B(68````ZR^Q`(M$)""`>"L`
+M=B.+<RB-=@`/MM&)T,'@!`'0BU0D(#NT@CP+``!TP4$X2BMWXXMT)"`X3BMU
+M!,9%`?_&10(`B?:-?2"-<V#\N0H```#SI8U]#(US3+$%\Z6+@X@```")14B+
+M@XP```")14QFBT,T9HE%6&:+0S9FB45:BT-`BU-$B450B554BD-*B$5<]D,D
+M!'4NBT0D(("X5PP```!T#_Z(5PP``("X5PP```!U$H/L#/]T)"SH_/___X/$
+M$(UV`(/L!&H`BT,<#[9``5#_="0LZ/S___\/MD,@@\00J`)T#Z@$=`NH`74'
+M@$T``NL%D(!E`/V*4R30ZH/B!(I%`(/@^PG0B$4`@^P,5>@H^O__@\0<6UY?
+M7<-55U93@^P<BWPD,(MT)#2+;"0XN0````"ZG````(GHD(@(0$IU^HEU"(/^
+M/WX)@<=@#```@^Y`N`````"#O+>8`@````^%:0(``(FLMY@"``")?6R+1"0\
+MB45PBT0D0(E%>+@!````@'\Y`0^%0@(``&;'1"0:_P"!_H4```!_#F8/MH0^
+MF`0``&:)1"0:9H%\)!K_``^$"`(```^W5"0:BX]8!0``C032P>`"*="-%,4`
+M````]D0*(P0/A.,!``"+1`H@)0#__P`]``#_``^%SP$``(T<"O9#)`0/A#8!
+M``#&@[``````#[9#(*@"=#*H!'0NJ`%T*L9#(@7&0R,$4P^V0TE0_W,L_W,H
+MZ/S___^#Q!#I@P$``,:#L0````'K7P^V0R"H`G5VJ`1T<J@!=&Z+:RC&0R(#
+MQD,C!,=$)!0`````@'T*`'0VC74X@^P,5NC\____B<*#Q!"+1@2)5@2),HE"
+M!(D0@'HB_W0$.=IUIO]$)!0/MD4*.T0D%'_-@+NQ`````0^$#@$``(/L"%-7
+MZ/S___^#Q!#I_`````^V0R"H`@^$\````*@$#X3H````J`$/A>````"+0RB*
+M0`F^`````(!_)@!V)P^VZ(GR#[;*B>C3^*@!=`^#[`1J`%%7Z/S___^#Q!!&
+MB?`X1R9WW,9#(P;&0R(%9L>#D```````@^P(4U?H_/___X/$$.F%````BULH
+MB5PD$,9$)`\`@'L*`'9@B=J#PCB)5"0(@^P,_W0D%.C\____B<.#Q!"+5"0(
+MBT($B5H$B1.)0P2)&(![(O]T'H![(2)T!H![(0UU$L>$MY@"````````N```
+M``#K._Y$)`^*1"0/BU0D$#A""G>I@^P$#[=$)!Y055?H_/___X/$$+@!````
+MZQ#'A+>8`@```````+@`````@\0<6UY?7<.055=64X/L#(MT)""+;"0DBWPD
+M*(M>8(7;=0Z#[`Q7_]6#Q!#I``$``(-^=`!U!H-^<`!T$(/L#%?_U8/$$.GF
+M````B?:`N[``````#X7+````BU,H#[9""*@0#X6\````J`@/A;0```"+$HE4
+M)`B`>TL`=!&#[`13:@;_<RCH_/___X/$$(EN=(E^>`^V0R"H`G0IJ`1T):@!
+M="'&0R(%QD,C!%,/MD-)4/]S+/]S*.C\____@\00ZV^-=@`/MD,@J`)U)*@$
+M=""H`70<QD,B`\9#(P2#[`A3_W0D%.C\____@\00ZT*)]@^V0R"H`G0XJ`1T
+M-*@!=3#&0R(%QD,C!F;'@Y```````(/L"%/_="04Z/S___^#Q!#K#9"#[`Q7
+M_]6#Q!"-=@"#Q`Q;7E]=PU=64XM4)!"+="04BT(HBSB+7D@/MD84@_@@=$2#
+M^"!_"X7`=!N#^`9_+NLD@_@B="^#^")\&H/`@(/X`7<:ZQ"+0AS'0`0`````
+MQD->`>L0QD->#>L*B?:X`````.LQD(-^4`!T$H/L"(U&4%!7Z/S___^#Q!")
+M]H/L"%97Z/S___^)'"3_4VBX`0```(/$$%M>7\-55U93@^P<BWPD,(ML)#2+
+M1VR)1"08BT4DB3B#?V``=1/&15X"@^P,5?]5:(/$$.G(!```BT=@]D`D`G03
+MQD5>`H/L#%7_56B#Q!#IK`0``(/L#/]T)"3H_/___XG&@\00A<!U$\9%7@*#
+M[`Q5_U5H@\00Z80$``#'0&0`````B6A(BT=@B488BT=@9HM`&&:)1A#&1A2`
+M#[9%7(/X`@^$10$``(/X`G\)A<!T'.F&`@``@_@##X2L`0``@_@$#X1_`0``
+MZ6\"``"+1V#V0#0!#X20````]D5=`G0&QD8DB.L3BD5=@^`$/`$9P(/@!8/H
+M=HA&)(M-2(M=3&:+55!FB50D%L9&)0")V,'H&(A&)HG8P>@0B$8GB=C!Z`B(
+M1BB(7BF)R`^LV!B(1BJ)R`^LV!"(1BN)R`^LV`B(1BR(3BW&1BX`QD8O`&:+
+M1"069L'H"(A&,(I$)!:(1C'&1C(`QD8S`.MK]D5=`G0&QD8D*.L3BD5=@^`$
+M/`$9P(/@!8/`*HA&)(M-2(M=3&:+55!FB50D%L9&)0")R`^LV!B(1B:)R`^L
+MV!"(1B>)R`^LV`B(1BB(3BG&1BH`9HM$)!9FP>@(B$8KBD0D%HA&+,9&+0"+
+M1V`%M````(E&.,9&'""#3F0"Z5@!``"`?4@0=P7V!P)U"<9%7@;IYP(```^V
+M14B-5B2#[`10_W504NC\____BT=@!;0```")1CC&1AP@@4YD```0`,9&%:N#
+MQ!#V15T&#X0)`0``BT5,B48@Z?X```"*15V#X#`\('41QD8D&\9&)0'&1B@`
+MZ>,```#&1B0UZ=H```"+1V`/MD`@J`%T!*@$=0G&15X&Z64"``"!3F0``"``
+M9HM%5&8[14IT-@^V15.#^$)T+8/X0G\'@_A`="/K&#VP````=`<][````'4*
+M9HM%5&:)14KK"<9%7@;I'@(``,9&)+!FBT5(B$8E9HM%2HA&)F:+14R(1B=F
+MBT5.B$8H9HM%4(A&*8I%4HA&*HI%4XA&*V8/MD5)B$8L9@^V14N(1BUF#[9%
+M38A&+F8/MD5/B$8O9@^V15&(1C#V15T&=!H/MT54P>`)B48@@TYD!.L*D,9%
+M7@;IHP$``(U^/,=&;/C`!`"*15VH!@^$>`$``+L`````J`)T!H-.9`CK!(-.
+M9!"#?6``=`OV15T!=`6+76#K*H-]9`!T)(/L!&H`BU0D(/^R)`8``%7_562#
+MQ!"%P'0*BT0D&(N8)`8``(7;=#B#[`Q6Z/S___^#Q`AJ`%?H_/___X/$$/\S
+M_W,,_W,(5^C\____@\00C4,$@\,0@S@`=.3I\@```(/L#/]T)"3H_/___XE$
+M)""#Q!"%P'4)QD5>!NGD````BU0D$(M""(E&-(E64+D`````N@`"``"0B`A`
+M2G7Z]D5=!`^$@P```/9&9B!T%H/L!/]V(/]U6/]V-.C\____@\00ZV?V1F80
+M=&&+1C2)1"0,@WU@`'0+]D5=`74%BUU@ZR2#[`1J`8M4)"#_LB0&``!5_U5D
+M@\00A<!T"HM$)!B+F"0&``"#[`3_,_]S"/]T)!CH_/___XL3`50D'(/$$(U#
+M!(/#$(,X`'3;@^P(:@!7Z/S_____=B"+1"0D_W`0_W`,5^C\____@\0@ZP2#
+M3F0!@^P(5O]T)"3H_/___X/$$.L8@^P(5O]T)"3H_/___XDL)/]5:(/$$(GV
+M@\0<6UY?7<-55U93@^P<BW0D,(M\)#R*1"1$B$0D&\=$)`S_____B?K!X@EF
+MB50D"HM&8(E$)`2#?F``=`F`OI<`````=`F+1"0,Z5`#``"+5"0$BU(HB10D
+MBVYL9L>&E````!`G@^P,5>C\____B<.#Q!"+1"0,A=L/A"`#``"#[`Q5Z/S_
+M__^)1"0D@\00A<!U%H/L"%-5Z/S___^+1"0<@\00Z?8"``"+A20%``#&0"<!
+M@^P$5O^U)`4``&H%Z/S___^+1"04@$@D`H/$#/]V8&HA_W0D#.C\____C5,\
+MB50D((/$$(!\)!L`=`W'0V0*````QD,D*.LGQT-D$@```,9#)"H/MT0D"H/L
+M!%#_="1(BT0D(/]P".C\____@\00BT9@]D`T`0^$DP```(!\)!L!&<"#X`*#
+MZ'B(0R3&0R4`BU0D.(G0P>@8B$,FBU0D.(G0P>@0B$,GBU0D.(G0P>@(B$,H
+MBU0D.(A3*8M$)#2+5"0X#ZS0&(A#*HM$)#2+5"0X#ZS0$(A#*XM$)#2+5"0X
+M#ZS0"(A#+(I4)#2(4RW&0RX`QD,O`(GX9L'H"(A#,(GXB$,QQD,R`,9#,P#K
+M7H!\)!L!&<"#X`*#P"B(0R3&0R4`BT0D-(M4)#@/K-`8B$,FBT0D-(M4)#@/
+MK-`0B$,GBT0D-(M4)#@/K-`(B$,HBE0D-(A3*<9#*@")^&;!Z`B(0RN)^(A#
+M+,9#+0"#[`Q3Z/S___^+1F!FBT`89HE#$,9#%(")<QB+5"0DBT((B4,T#[=$
+M)!J)0R")4U#&0QP@BT9@!;0```")0SC'0VP@MP0`@\0(:@#_="0<Z/S_____
+M<R"+1"0H_W`0_W`,_W0D+.C\____QH:7`````8/$&%-5Z/S___^#Q!"%]@^$
+MK````(-^8`!T88"^EP````!T6(GV9H&^E````)8`=1F#[`3_=F!J(8M&8/]P
+M*.C\____@\00C78`9O^.E````(/L#&C0!P``Z/S___^)+"3H_/___X/$$(7V
+M=%2#?F``=`F`OI<`````=:J%]G1!@WY@`'0[9H.^E`````!T,8![%`!U*\=$
+M)`P`````@'PD&P!T'`^W1"0*@^P$4(M4)!S_<@C_="1,Z/S___^#Q!"#>U``
+M=!"#[`B-0U!05>C\____@\00@^P(4U7H_/___XN%)`4``,9`)P"#Q`Q6_[4D
+M!0``:@;H_/___XM$)!2`8"3]BT0D'(/$$(UV`(/$'%M>7UW#5E.#[`R+="08
+MBUPD'(A>-P^VVU-6Z/S___^#Q`A3@<9@#```5NC\____N`$```"#Q!1;7L.-
+M=@"#[!C_="0<Z/S___\/ML"#Q!S#D+@`````PXGV5E.+3"0,O@````"Z@```
+M`(N9)`4``(GV#[?"@+P8F`0``/]T`49"9H'ZA0!VZHN))`4``('!8`P``+J`
+M````D`^WPH"\")@$``#_=`%&0F:!^H4`=NJ)\%M>PY"+3"0$BE0D"(C0P.@$
+M/`EV!X/`5^L*B?:(T,#H!(/`,(@!B="#X`^#^`E^#(C0@^`/@\!7ZPJ)]HC0
+M@^`/@\`PB$$!PU93BW0D#(M<)!`/ML=05NBH____#[;;4X/&`E;HF____X/$
+M$%M>PY!55U93BWPD%(ML)!R^`````+D`````N@`!``")Z(UV`(@(0$IU^KJ`
+M````BY\D!0``#[?"9@^VC!B8!```9H'Y_P`/A&P!``")\$8[1"08#X5?`0``
+M9H'Z@0`/A]`````/M\&-!$"-!,")PL'B!2G"BX.0!0``C1R0@WL,`'1MN8``
+M``"+MR0%```/M\%F#[:$,)@$``!F/?\`=!X/M\"-!$"-!,")PL'B!2G"BX:0
+M!0``C120.U,,="Q!9H'Y@0!VR+(`@'LR`'8PO@$````/ML(/MDP80(GPT^`)
+M12!".%,R=^OK%(A-`NO7D,9%`O^+0P@/MD`)B44@QD4``8I#,8A%`8M#2(E%
+M!(M#3(E%"(M#6(E%#(M#7(E%$(M#8(E%%(M#9(E%&(M#<(E%'.MXBY<D!0``
+M#[?!C01`C02`P>`#B<,#FG0%``#&10+_QD4``HN7)`4``(N2=`4``(I$$!^(
+M10&+0U0/MD`)B44@QD4$=@^W0R!0C44%4.A7_O__QD4,9`^W0R)0C44-4.A%
+M_O__QD4<<@^V0QU0C44=4.CO_?__@\08N`````#IGP$``(GV0F:!^H4`#X9K
+M_O__B[\D!0``@<=@#```NH`````/M\)F#[:,.)@$``!F@?G_``^$6`$``(GP
+M1CM$)!@/A4L!``!F@?J!``^'S`````^WP8T$0(T$P(G"P>(%*<*+AY`%``"-
+M')"#>PP`=&FY@`````^WP68/MH0XF`0``&8]_P!T'@^WP(T$0(T$P(G"P>(%
+M*<*+AY`%``"-%)`[4PQT+$%F@?F!`';(L@"`>S(`=C*^`0````^VP@^V3!A`
+MB?#3X`E%($(X4S)WZ^L6B$T"Z]>-=@#&10+_BT,(#[9`"8E%(,9%``&*0S&(
+M10&+0TB)102+0TR)10B+0UB)10R+0UR)11"+0V")112+0V2)11B+0W")11SK
+M;`^WP8T$0(T$@,'@`XG#`Y]T!0``QD4"_\9%``*+EW0%``"*1!`?B$4!BT-4
+M#[9`"8E%(,9%!'8/MT,@4(U%!5#HQ_S__\9%#&0/MT,B4(U%#5#HM?S__\9%
+M''(/MD,=4(U%'5#H7_S__X/$&+@`````ZQ*00F:!^H4`#X:%_O__N/____];
+M7E]=PXGV55=64X/L!(MT)!B+;"0<NP````"Y`````+JD#```BT0D((GVB`A`
+M2G7ZNH````"+OB0%```/M\)F#[:,.)@$``!F@?G_``^$!`,``(G80SGH#X7Y
+M`@``9H'Z@0`/AUD"```/M\&-!$"-!,")PL'B!2G"BX>0!0``C2R0@WT,`'1R
+MN8````")^P^WP68/MH08F`0``&8]_P!T'@^WP(T$0(T$P(G"P>(%*<*+@Y`%
+M``"-%)`[50QT,D%F@?F!`';(L@"`?3(`=CV[`0````^VP@^V3"A`B=C3X(G!
+MBT0D(`E(($(X53)WY>L;BU0D((A*`NO-BTPD(,9!`O^+10@/MD`)B4$@BT0D
+M(,8``8I%,8M4)""(0@&+14B)0@2+14R)0@B+15B)0@R+15R)0A"+16")0A2+
+M162)0AB+17")0AS&1"0#`("]D``````/AO0!```/MD0D`XT$@,'@`XM4)""-
+M#!`!Z(V8D````(I3!(A1)(I3!8A1)8N`F````(H`@^`/B$$F#[9!)(/X`W0I
+M@_@#?PZ#^`(/A.,```#IR@```(/X!'1'@_@2#X2+````Z;<```"-=@`/MDPD
+M`XT,B<'A`XN$*9@```"*4`&#X@</MM+!X@@/MD`"`="-!(#1X(M4)"")1!$H
+MZ9(````/MD0D`XT$@(T4Q0````"+A"J8````@'@"`'4.BTPD(,=$"B@`````
+MZV@/MD0D`XT$@,'@`XN4*)@````/ME("@^H4BTPD((E4""CK10^V3"0#C0R)
+MP>$#BX0IF`````^V4`+!X@@/MD`#`="-!(#1X(M4)"")1!$HZQ>-=@`/MD0D
+M`XT$@(M,)"#'1,$H``````^V="0#C32VP>8#BT0D((U\!BR-M"Z<````_+D(
+M````\Z7^1"0#BE0D`SB5D`````^'G/[__^F+````BY8D!0``#[?!C01`C02`
+MP>`#B<,#FG0%``"+3"0@QD$"_\8!`HN6)`4``(N2=`4``(I$$!^(00&+0U0/
+MMD`)B4$@QD$$=@^W0R!0B<B#P`50Z&_Y__^+1"0HQD`,9`^W0R)0BT0D+(/`
+M#5#H5?G__XM4)##&0AQR#[9#'5")T(/`'5#H^?C__X/$&+@`````Z34#``!"
+M9H'ZA0`/AM/\__^+MB0%``"!QF`,``"Z@`````^WPF8/MHPPF`0``&:!^?\`
+M#X3P`@``B=A#.>@/A>4"``!F@?J!``^'4@(```^WP8T$0(T$P(G"P>(%*<*+
+MAI`%``"-+)"#?0P`='"Y@`````^WP68/MH0PF`0``&8]_P!T'@^WP(T$0(T$
+MP(G"P>(%*<*+AI`%``"-%)`[50QT,D%F@?F!`';(L@"`?3(`=CV[`0````^V
+MP@^V3"A`B=C3X(G!BT0D(`E(($(X53)WY>L;BU0D((A*`NO-BTPD(,9!`O^+
+M10@/MD`)B4$@BT0D(,8``8I%,8M4)""(0@&+14B)0@2+14R)0@B+15B)0@R+
+M15R)0A"+16")0A2+162)0AB+17")0AS&1"0"`("]D``````/AN,!```/MD0D
+M`HT$@,'@`XM4)""-#!`!Z(V8D````(I3!(A1)(I3!8A1)8N`F````(H`@^`/
+MB$$F#[9!)(/X`W0G@_@#?PZ#^`(/A.$```#IR````(/X!'1%@_@2#X2)````
+MZ;4```"0#[9,)`*-#(G!X0.+A"F8````BE`!@^('#[;2P>((#[9``@'0C02`
+MT>"+5"0@B401*.F2````#[9$)`*-!("-%,4`````BX0JF````(!X`@!U#HM,
+M)"#'1`HH`````.MH#[9$)`*-!(#!X`.+E"B8````#[92`H/J%(M,)"")5`@H
+MZT4/MDPD`HT,B<'A`XN$*9@````/ME`"P>((#[9``P'0C02`T>"+5"0@B401
+M*.L7C78`#[9$)`*-!("+3"0@QT3!*``````/MG0D`HTTML'F`XM$)""-?`8L
+MC;0NG````/RY"````/.E_D0D`HI4)`(XE9`````/AY[^___K?P^WP8T$0(T$
+M@,'@`XG#`YYT!0``BTPD(,9!`O_&`0*+EG0%``"*1!`?B$$!BT-4#[9`"8E!
+M(,9!!'8/MT,@4(G(@\`%4.A*]O__BT0D*,9`#&0/MT,B4(M$)"R#P`U0Z##V
+M__^+5"0PQD(<<@^V0QU0B="#P!U0Z-3U__^#Q!BX`````.L3B?9"9H'ZA0`/
+MANW\__^X_____X/$!%M>7UW#C78`55=64X/L!(MT)!B[`````+D`````NJ0,
+M``"+1"0@B?:("$!*=?JZ@````(N^)`4```^WPF8/MHPXF`0``&:!^?\`#X0X
+M`P``B=A#.T0D'`^%*P,``&:!^H$`#X=]`@``#[?!C01`C03`B<+!X@4IPHN'
+MD`4``(TLD(-]#`!T<KF`````B?L/M\%F#[:$&)@$``!F/?\`=!X/M\"-!$"-
+M!,")PL'B!2G"BX.0!0``C120.U4,=#)!9H'Y@0!VR+(`@'TR`'8]NP$````/
+MML(/MDPH0(G8T^")P8M$)"`)2"!".%4R=^7K&XM4)""(2@+KS8M,)"#&00+_
+MBT4(#[9`"8E!((M$)"#&``&*13&+5"0@B$(!BT5(B4($BT5,B4((BT58B4(,
+MBT5<B4(0BT5@B4(4BT5DB4(8BT5PB4(<BTPD'(E*),9$)`,`@+V0``````^&
+M'`(```^V1"0#C02`P>`#BU0D((T,$`'HC9B0````BE,$B)&H````BE,%B)&I
+M````BX"8````B@"#X`^(@:H````/MH&H````@_@#="B#^`-_#H/X`@^$\0``
+M`.G5````@_@$=$F#^!(/A),```#IP@```(GV#[9,)`.-#(G!X0.+A"F8````
+MBE`!@^('#[;2P>((#[9``@'0C02`T>"+5"0@B801K````.F>````#[9$)`.-
+M!("-%,4`````BX0JF````(!X`@!U$8M,)"#'A`JL`````````.MQ#[9$)`.-
+M!(#!X`.+E"B8````#[92`H/J%(M,)"")E`BL````ZTL/MDPD`XT,B<'A`XN$
+M*9@````/ME`"P>((#[9``P'0C02`T>"+5"0@B801K````.L:C78`#[9$)`.-
+M!("+3"0@QX3!K``````````/MG0D`XTTML'F`XM$)""-O`:P````C;0NG```
+M`/RY"````/.E_D0D`XI4)`,XE9`````/AW_^___IE@```(N6)`4```^WP8T$
+M0(T$@,'@`XG#`YIT!0``BTPD(,9!`O_&`0*+EB0%``"+DG0%``"*1!`?B$$!
+MBT-4#[9`"8E!(,9!!'8/MT,@4(G(@\`%4.B]\O__BT0D*,9`#&0/MT,B4(M$
+M)"R#P`U0Z*/R__^+5"0PQD(<<@^V0QU0B="#P!U0Z$?R__^+1"0TBTPD.(E!
+M)(/$&+@`````Z7`#``"-=@!"9H'ZA0`/AI_\__^+MB0%``"!QF`,``"Z@```
+M``^WPF8/MHPPF`0``&:!^?\`#X0H`P``B=A#.T0D'`^%&P,``&:!^H$`#X=]
+M`@``#[?!C01`C03`B<+!X@4IPHN&D`4``(TLD(-]#`!T<+F`````#[?!9@^V
+MA#"8!```9CW_`'0>#[?`C01`C03`B<+!X@4IPHN&D`4``(T4D#M5#'0R06:!
+M^8$`=LBR`(!],@!V/;L!````#[;"#[9,*$")V-/@B<&+1"0@"4@@0CA5,G?E
+MZQN+5"0@B$H"Z\V+3"0@QD$"_XM%"`^V0`F)02"+1"0@Q@`!BD4QBU0D((A"
+M`8M%2(E"!(M%3(E""(M%6(E"#(M%7(E"$(M%8(E"%(M%9(E"&(M%<(E"'(M,
+M)!R)2B3&1"0"`("]D``````/AA("```/MD0D`HT$@,'@`XM4)""-#!`!Z(V8
+MD````(I3!(B1J````(I3!8B1J0```(N`F````(H`@^`/B(&J````#[:!J```
+M`(/X`W0J@_@#?Q&#^`(/A/,```#IUP```(UV`(/X!'1(@_@2#X22````Z<$`
+M``"0#[9,)`*-#(G!X0.+A"F8````BE`!@^('#[;2P>((#[9``@'0C02`T>"+
+M5"0@B801K````.F>````#[9$)`*-!("-%,4`````BX0JF````(!X`@!U$8M,
+M)"#'A`JL`````````.MQ#[9$)`*-!(#!X`.+E"B8````#[92`H/J%(M,)"")
+ME`BL````ZTL/MDPD`HT,B<'A`XN$*9@````/ME`"P>((#[9``P'0C02`T>"+
+M5"0@B801K````.L:C78`#[9$)`*-!("+3"0@QX3!K``````````/MG0D`HTT
+MML'F`XM$)""-O`:P````C;0NG````/RY"````/.E_D0D`HI4)`(XE9`````/
+MAWW^___IB@````^WP8T$0(T$@,'@`XG#`YYT!0``BTPD(,9!`O_&`0*+EG0%
+M``"*1!`?B$$!BT-4#[9`"8E!(,9!!'8/MT,@4(G(@\`%4.A=[___BT0D*,9`
+M#&0/MT,B4(M$)"R#P`U0Z$/O__^+5"0PQD(<<@^V0QU0B="#P!U0Z.?N__^+
+M1"0TBTPD.(E!)(/$&+@`````ZQ.)]D)F@?J%``^&M?S__[C_____@\0$6UY?
+M7<.-=@!55U93BW0D%(M\)!B+;FRY`````+H@````B?B("$!*=?J+G20&``"Y
+M`````+H``@``B=B0B`A`2G7ZC5,VN0````"*1#$AB`)"BD0Q((@"0H/!`H/Y
+M)W[JC5,4N0````"*1#$-B`)"BD0.#(@"0H/!`H/Y$W[JC5,NN0````"*1#%)
+MB`)"BD0Q2(@"0H/!`H/Y!W[JB5\8BT90BU94@\`!@](`B0>)5P2#?F``=3OV
+M!@%T-H-^9`!T%87M=!&+1F0/MD`S@+PHF`0``/]U&X-^:`!T'87M=!F+1F@/
+MMT`D@+PHF`0``/]T"(I&`8A'#.L$QD<,_XI&`HA'#8I&7(A'#L9'$A#&1Q$0
+M#[8&@^`!T>"*7PJ#X_T)PXA?"@^V!H/@`<'@!8I/"(/AWPG!B$\(#[=&6,'H
+M!X/@`<'@!H/AOPG!B$\(#[=&6,'H`H/@`8I7"8/B_@G"B%<)#[=&6L'H`X/@
+M`<'@!X/A?PG!B$\(#[=&6M'H@^`!T>"#XOT)PHA7"0^W1EC!Z`.#X`'!X`:#
+MXK\)PHA7"0^W1EK!Z`2#X`'!X`>#XG\)PHA7"8/)$(A/"(H&T.B#X`&#X_X)
+MPXA?"HH&@^`$@^/["<.(7PIFQT<4`!"*AI@```"(1QQ;7E]=PXGVBT0D#,=`
+M!`````#'``````"X`````,.055=64X/L#(M<)""*1"0DB$0D"\=$)`3_____
+MBW-@BVMLA?9T#X"[EP````!U!O8#`G0-D(M$)`3I_P```(UV`(/L#%7H_/__
+M_XG'@\00BT0D!(7_#X3B````QD<DX<9')0&`?"0+`@^5P(/`&HA')L9'%(!F
+MBT889HE'$(E?&,='(`````#'1S0`````QT=L(+<$`(/L"%=5Z/S____&@Y<`
+M```!9L>#E````/H`@\00A=MT78-[8`!T5Y!F@;N4````E@!U&8/L!/]S8&HA
+MBT-@_W`HZ/S___^#Q!"-=@!F_XN4````@^P,:-`'``#H_/___XDL).C\____
+M@\00A=MT#X-[8`!T"8"[EP````!UJF:#NY0`````=`Z`?Q0`=0C'1"0$````
+M`(/L"%=5Z/S___^+1"04@\00D(/$#%M>7UW#55=64X/L'(MT)#"*7"0TQT0D
+M%/____^+;F"+1FR)1"00A>UT"8"^EP````!T"HM$)!3IF00``)"#[`S_="0<
+MZ/S___^)QX/$$(M$)!2%_P^$>P0``/8&`@^%$0$``(#[%'</#[;;C01;C1R%
+M`````.L>9@^VTXG0P>`$`="-!,)FP>@(P.@$#[;8@</P````QD<DX<9')0'&
+M1R8<B%\GQD<4@&:+11AFB4<0B7<8QT<@`````,='-`````#'1VP@MP0`@^P(
+M5_]T)!SH_/___\:&EP````%FQX:4````Q`F#Q!"%]G1C@WY@`'1=C78`9H&^
+ME````)8`=1F#[`3_=F!J(8M&8/]P*.C\____@\00C78`9O^.E````(/L#&C0
+M!P``Z/S___^#Q`3_="0<Z/S___^#Q!"%]G0/@WY@`'0)@+Z7`````'6F9H.^
+ME``````/A&0#``"`?Q0`#X5:`P``QT0D%`````#I30,``(/L#/]T)!SH_/__
+M_XE$)"B#Q!"#?"08``^$+P,``(U7/(E4)`R+1"08BT`(B40D",9')!K&1R4(
+MQD<F&L9')P#&1R@0QD<I`(M$)!B)1U#&1Q2`9HM%&&:)1Q")=QB+1"08BT`(
+MB4<TQT<@$````(M&8`6T````B4<XQD<<(,=';""W!`"#[`AJ`%+H_/____]W
+M((M$)"S_<!#_<`S_="0HZ/S___^#Q!A7_W0D'.C\____QH:7`````6;'AI0`
+M``#Z`(/$$(7V=%V#?F``=%=F@;Z4````E@!U%H/L!/]V8&HABT9@_W`HZ/S_
+M__^#Q!!F_XZ4````@^P,:-`'``#H_/___X/$!/]T)!SH_/___X/$$(7V=`^#
+M?F``=`F`OI<`````=:EF@[Z4`````'0&@'\4`'09@^P(C40D(%#_="0<Z/S_
+M__^#Q!#I_0$``(/L"%?_="0<Z/S___^#Q`3_="0<Z/S___^)QX/$$(7`=1V#
+M[`B-1"0@4/]T)!SH_/___XM$)"2#Q!#IT@$``(U`/(E$)`R+3"0(@\$$BU0D
+M"`^V0@.*1!`$B$($QD$!"L9!`@"Z!````(M$)`C&``!`2G7YA-MU!H!A`_SK
+M3`^VVXT$VXT$@XT$0XT<Q0````"`20,#B=C!Z!B)1"0$B$$$B=K!ZA"(406)
+MV,'H"(D$)(A!!HA9!XI$)`2(00B(40F*%"2(40J(60N+1"08B4=0QD<D%8H!
+MP/@']]"#P!&(1R7&1R8`QD<G`,9'*!#&1RD`@"$_QD<4@&:+11AFB4<0B7<8
+MBT0D&(M`"(E'-,='(!````"+1F`%M````(E'.,9''"#'1VP@MP0`@^P(:@#_
+M="08Z/S_____=R"+1"0L_W`0_W`,_W0D*.C\____@\085_]T)!SH_/___\:&
+MEP````%FQX:4````^@"#Q!"%]G1=@WY@`'179H&^E````)8`=1:#[`3_=F!J
+M(8M&8/]P*.C\____@\009O^.E````(/L#&C0!P``Z/S___^#Q`3_="0<Z/S_
+M__^#Q!"%]G0/@WY@`'0)@+Z7`````'6I9H.^E`````!T#H!_%`!U",=$)!0`
+M````@^P(C40D(%#_="0<Z/S___^#Q!"0@^P(5_]T)!SH_/___XM$)"2#Q!"#
+MQ!Q;7E]=PU=64XMT)!"X_____XM^;(M>8/9&6`@/A(@```"#[`16_[<D!0``
+M:@7H_/___X!+)`*#Q`Q3:B'_<RCH_/___X/$$(![2P!T'H/L#&C0!P``Z/S_
+M__^)/"3H_/___X/$$(![2P!UXH-\)!0`=`]F@TY:$&:#2S80ZPV-=@!F@V9:
+M[V:#8S;O@^P$5O^W)`4``&H&Z/S___^`8R3]N`````"#Q!"06UY?PU93@^P$
+MBT0D$`^V="04BU!LBUA@]@`!=$N#>RP`=!F#[`2)\@^VPE`/MD-)4/]S+.C\
+M____@\00@[O@`````'0]@^P$B?$/ML%0#[:#U0```%#_L^````#H_/___X/$
+M$.L<B?:#[`2)\0^VP5"+0QP/MD`!4%+H_/___X/$$(/$!%M>PU575E.#[`R+
+M7"0@BD0D)(A$)`N*1"0HB$0D"L=$)`3_____BWM@BVMLA?]T"8"[EP````!T
+M"HM$)`3I)0$``)"#[`Q5Z/S___^)QH/$$(M$)`2%]@^$"@$``,9&).'&1B4!
+M@'PD"P!T#H!\)`H!&<#WT(/`!^L,@'PD"@$9P/?0@\`-B$8FQD84@&:+1QAF
+MB480B5X8QT8@`````,=&-`````#'1FP@MP0`@^P(5E7H_/___\:#EP````%F
+MQX.4````]`&#Q!"%VW1?@WM@`'19C78`9H&[E````)8`=1F#[`3_<V!J(8M#
+M8/]P*.C\____@\00C78`9O^+E````(/L#&C0!P``Z/S___^)+"3H_/___X/$
+M$(7;=`^#>V``=`F`NY<`````=:IF@[N4`````'0<@'X4`'46BT-@9HM`-F:)
+M0UK'1"0$`````(UV`(/L"%95Z/S___^+1"04@\00C78`@\0,6UY?7<.#[`R+
+M3"00BU0D%`^V`H/X"0^'L0```/\DA908``")]HM"!,:`5PP```"#[`Q0Z/S_
+M__^X`````(/$$.F0````@^P$#[9"!%!J`%'H1/[__X/$$.M[C78`@^P$#[9"
+M!%!J`5'H+/[__X/$$.MCC78`@^P(#[9"!%!1Z/S___^#Q!#K39"#[`0/MD(%
+M4`^V0@104>C1_/__@\00ZS2#[`@/MD($4%'H_/___X/$$.LAD(/L"`^V0@10
+M4>C\____N`````"#Q!#K"+C_____C78`@\0,PXM,)`2+06"%P'1*QT`<````
+M`(!()`3'06``````QT%H`````,=!9`````"#>0@_?Q.+46R+00C'A(*8`@``
+M`````,.0BU%LBT$(QX2"F`$```````##B?:+3"0$BT%@A<!T2L=`'`````"`
+M8"3[QT%@`````,=!:`````#'060`````@WD(/W\3BU%LBT$(QX2"F`(`````
+M``##D(M1;(M!",>$@I@!````````PXGV4X/L%(M<)!Q3Z/S___^+@R0%```%
+M8`P``(D$).C\____@\086\.)]E.#[!2+7"0<4^C\____BX,D!0``!6`,``")
+M!"3H_/___X/$&%O#B?955U93@^P<BWPD,(N')`4```5@#```B00D@S\`=!J+
+M!RT```(`B0>#[`A0_W<0Z/S___^#Q!")]H-_"`!T$H/L"/]W"/]W$.C\____
+M@\00D(-_#`!T$H/L"/]W#/]W$.C\____@\00D(/L"(U$)")0C40D)%"-1"0F
+M4(U$)"A0C40D*E"-1"0M4(U$)#!0C40D,E"-1"0U4(U$)#90C40D.5"-1"0\
+M4(U$)#]0#[=')%#H_/___X/$0(._6`4```!T-H/L"/^W6`4``(V'0`4``%#H
+M_/___X/$"(M$)`C_L%@%``"+1"0,!4`%``!0Z/S___^#Q!")]H._=`4```!T
+M-X/L"/^W=`4``(V'7`4``%#H_/___X/$"(M$)`C_L'0%``"+1"0,!5P%``!0
+MZ/S___^#Q!"-=@"#OY`%````=#>#[`C_MY`%``"-AW@%``!0Z/S___^#Q`B+
+M1"0(_["0!0``BT0D#`5X!0``4.C\____@\00C78`@[^L!@```'0W@^P(_[>L
+M!@``C8>4!@``4.C\____@\0(BT0D"/^PK`8``(M$)`P%E`8``%#H_/___X/$
+M$(UV`+X`````B?`Z1"0'<T6-K\P&``"0@^P(B?`/MMC_M)_D!@``5>C\____
+M@\0(BT0D"/^TF.0&``"+1"0,!<P&``!0Z/S___^#Q!!&B?`Z1"0'<L*#OTP)
+M````=#6#[`C_MTP)``"-AS0)``!0Z/S___^#Q`B+1"0(_[!,"0``BT0D#`4T
+M"0``4.C\____@\00D(._=`D```!T-X/L"/^W=`D``(V'7`D``%#H_/___X/$
+M"(M$)`C_L'0)``"+1"0,!5P)``!0Z/S___^#Q!"-=@"#O\0)````=#>#[`C_
+MM\0)``"-AZP)``!0Z/S___^#Q`B+1"0(_[#$"0``BT0D#`6L"0``4.C\____
+M@\00C78`@[^L!0```'0W@^P(_[>L!0``C8>4!0``4.C\____@\0(BT0D"/^P
+MK`4``(M$)`P%E`4``%#H_/___X/$$(UV`(._6`8```!T-X/L"/^W6`8``(V'
+M0`8``%#H_/___X/$"(M$)`C_L%@&``"+1"0,!4`&``!0Z/S___^#Q!"-=@"#
+MOP@&````=#>#[`C_MP@&``"-A_`%``!0Z/S___^#Q`B+1"0(_[`(!@``BT0D
+M#`7P!0``4.C\____@\00C78`@[\D!@```'0W@^P(_[<D!@``C8<,!@``4.C\
+M____@\0(BT0D"/^P)`8``(M$)`P%#`8``%#H_/___X/$$(UV`(._D`8```!T
+M-X/L"/^WD`8``(V'>`8``%#H_/___X/$"(M$)`C_L)`&``"+1"0,!7@&``!0
+MZ/S___^#Q!"-=@"#O\@&````=#>#[`C_M\@&``"-A[`&``!0Z/S___^#Q`B+
+M1"0(_[#(!@``BT0D#`6P!@``4.C\____@\00C78`@[_\"````'0W@^P(_[?\
+M"```C8?D"```4.C\____@\0(BT0D"/^P_`@``(M$)`P%Y`@``%#H_/___X/$
+M$(UV`(._)`D```!T-X/L"/^W)`D``(V'#`D``%#H_/___X/$"(M$)`C_L"0)
+M``"+1"0,!0P)``!0Z/S___^#Q!"-=@"#OYP)````=#>#[`C_MYP)``"-AX0)
+M``!0Z/S___^#Q`B+1"0(_["<"0``BT0D#`6$"0``4.C\____@\00C78`@[]T
+M!@```'0W@^P(_[=T!@``C8=<!@``4.C\____@\0(BT0D"/^P=`8``(M$)`P%
+M7`8``%#H_/___X/$$(UV`(._X`D```!T1_^WZ`D``/^WY`D``/^WX`D``(V'
+MR`D``%#H_/___XM$)!#_L.@)``#_L.0)``#_L.`)``"+1"0<!<@)``!0Z/S_
+M__^#Q""0@[\$"@```'1'_[<,"@``_[<("@``_[<$"@``C8?L"0``4.C\____
+MBT0D$/^P#`H``/^P"`H``/^P!`H``(M$)!P%[`D``%#H_/___X/$()"#OR@*
+M````=$?_MS`*``#_MRP*``#_MR@*``"-AQ`*``!0Z/S___^+1"00_[`P"@``
+M_[`L"@``_[`H"@``BT0D'`40"@``4.C\____@\0@D(._<`H```!T1_^W>`H`
+M`/^W=`H``/^W<`H``(V'6`H``%#H_/___XM$)!#_L'@*``#_L'0*``#_L'`*
+M``"+1"0<!5@*``!0Z/S___^#Q""0@[],"@```'1'_[=4"@``_[=0"@``_[=,
+M"@``C8<T"@``4.C\____BT0D$/^P5`H``/^P4`H``/^P3`H``(M$)!P%-`H`
+M`%#H_/___X/$()"#OY0*````=$?_MYP*``#_MY@*``#_MY0*``"-AWP*``!0
+MZ/S___^+1"00_["<"@``_["8"@``_["4"@``BT0D'`5\"@``4.C\____@\0@
+MD(._N`H```!T1_^WP`H``/^WO`H``/^WN`H``(V'H`H``%#H_/___XM$)!#_
+ML,`*``#_L+P*``#_L+@*``"+1"0<!:`*``!0Z/S___^#Q""0@\0<6UY?7<-6
+M4X/L$(M<)!Q3Z/S___^-LV`,``")-"3H_/___XD<).C\____QP0DT`<``.C\
+M____B1PDZ/S___^)'"3H_/___X/$"&H!4^C\____@\0(:@%6Z/S___^#Q!1;
+M7L.-=@"#[!AH@!$``.C\____N`````"#Q!S#D)"+1"0$Q@`(QD`!$H!\)`@!
+M&=+WTH/B!(A0`L9``P#&0`0`QD`%`,9`!@#&0`<`QD`(`,9`"0#&0`H`QD`+
+M`(!\)`P!&=*#XB"(4`S&0`T`QD`.`,9`#P#&0!``QD`1`,9`$@#&0!,`N!0`
+M``##C78`55=64X/L&(M\)#"*1"0TB$0D%P^V="0X_W0D+.C\____B<6#Q!"X
+M`````(7M#X26````BUT(B?(/ML)0#[9$)`]0C4,$4.C\____B<;&`P#&0P$`
+MQD,"`,9#`P")/"3_="0LZ/S___^#Q!"Y`````+H0````C4<DB`A`2G7ZC5X$
+MQD<D%<9')1&(7RC&1RD`C7<\#[;;B5\@QT=D`````(M%"(E'-(EO4(/L"&H`
+M5NC\____4_]U$/]U#%;H_/___[@!````@\0@@\0,6UY?7<.0D)!75E.+?"00
+MBT0D%(G&9HE'!,9'"@!FQT<(``"[`````&8YPW,8C78`#[?+BQ>)\&8IV$AF
+MB01*0V8Y\W+K6UY?PXUV`%93BUPD#(M$)!")QF:)0P3&0PH!9L=#"```N0``
+M``!F.<%S#P^WT8L#9HD,4$%F.?%R\5M>PXGV4XM<)`B`>PH!=2EFBT,(#[?(
+MBQ-`9HE#"&:+%$IF.T,&<@9FQT,(``!F_TL$#[?"ZQ")]F;_2P0/MU,$BP,/
+MMP106\-64X/L"(M,)!2+="08@'D*`74I#[=1"`^W002)1"0$C00"#[=1!HD4
+M))GW/"2+&6:)-%-F_T$$ZQ&-=@`/MU$$BP%FB3109O]!!(/$"%M>PXM$)`1F
+M@W@$``^4P`^VP,.+1"0$N@`````Y`'0.BP"+2`2+$(E*!(D1B<*)T,.)]HM4
+M)`2X`````#D2=`V+0@2+2`2+$(E*!(D1PY!64X/L!(M<)!"+<T2*0SR(1"0#
+MN0````"Z<````(G8D(@(0$IU^HES1(I$)`.(0SR#Q`1;7L.)]H/L$(M4)!2+
+M3"08BD$!B$(!BD$"B$("BT$$B4($#[9"`8T$0,'@`E#_<0C_<@CH_/___X/$
+M',.04X/L!(M,)`R+5"00BD0D%(A$)`.S`#C#<QN)]HH!.@)T"K@`````ZQ&-
+M=@!!0D,Z7"0#<N>X`0```(/$!%O#D(M$)`3&0`$`BU0D"(A0`L=`!`````##
+MD%93BT0D#(MT)!@/ME`!C112BT@(C1R1_D`!`7`$N0````"Z#````(G8C78`
+MB`A`2G7ZBT0D$(M4)!2)`XE3!(GPB$,(B?(/ML:(0PG!ZA"#XC^*0PJ#X,`)
+MT(A#"EM>PXM4)`2*0@$Z`@^2P`^VP,.Y_P```+H``@``BT0D!(GVB`A`2G7Z
+MPY!3@^P$BTPD#(M<)!"*1"04B$0D`[@`````C78`#[?0@'R1`O]U#F:)')&*
+M7"0#B%R1`NL'0&:#^']VX0^WP(/$!%O#D%=64XMT)!"+5"08BTPD'`^W1"04
+M@'R&`O]U#6:)%(:(3(8"ZQ>-=@`/ML%0#[?"4%;H_/___P^WP(/$#%M>7\-6
+M4XM<)`R+="00BDPD%+@`````D`^WT#A,DP)U$V8Y-)-U#<9$DP+_9L<$D___
+MZP=`9H/X?W;=#[?`6U[#C78`5E.+7"0,BW0D$(I,)!2X`````)`/M]`X3),"
+M=0=F.323=`B00&:#^']VZ68]@`!U!;B``0``#[?`6U[#55=64XML)!2`?20(
+M=#J`?20H=#2`?22H="Z`?22(="B`?20*="*`?20J=!R`?22J=!:`?22*=!"`
+M?20O=`J`?22/#X46`@``#[9%)(/X+P^$FP```(/X+W\F@_@*=&6#^`I_#(/X
+M"'1;Z=(!``")]H/X*'1[@_@J=';IP0$``)`]CP````^$Z0```#V/````?QX]
+MB`````^$UP```#V*````#X3,````Z9,!``"-=@`]J````'1Q/:H```!T:NE]
+M`0``D`^V126#X!_!X!`/ME4FP>(("=`/ME4G"=")QK\`````#[95*.EC`0``
+MC78`#[95)L'B&`^V12?!X!`)P@^V12C!X`@)P@^V12D)PHG6OP`````/ME4K
+MP>((#[9%+`G"Z2@!```/ME4FP>(8#[9%)\'@$`G"#[9%*,'@"`G"#[9%*0G"
+MB=:_``````^V52K!XA@/MD4KP>`0"<(/MD4LP>`("<(/MD4M"<+IW@```(GV
+M#[9U)HGWO@````#!YQ@/MDTGB<NY`````,'C$(GP"<B)^@G:#[9-*(G+N0``
+M``#!XPB)Q@G.B=<)WP^V12F)PK@`````B?$)P8G["=,/MD4JN@`````/I,(8
+MP>`8B<X)QHG?"=</MD4KN@`````/I,(0P>`0B?$)P8G["=,/MD4LN@`````/
+MI,((P>`(B<X)QHG?"=</MDTMNP````")\`G(B?H)VHG&B=</ME4NP>(8#[9%
+M+\'@$`G"#[9%,,'@"`G"#[9%,0G"ZQ&0O@````"_`````+H`````D(EU6(E]
+M7(E58&:#31(!6UY?7<.04X/L$(M<)!@/MD,S4`^V0S)0#[9#,5`/MD,P4`^V
+M0R]0#[9#+E`/MD,M4`^V0RQ0#[9#*U`/MD,J4`^V0RE0#[9#*%`/MD,G4`^V
+M0R90#[9#)5`/MD,D4%-H!`@``.C\____@\1(#[=#$%!H'P(``.C\____@\08
+M6\.)]E=64XM\)!"+7"04NO____^Y`````&8YV7,=OB`2``"0#[?!B@0X,=`/
+MML#!Z@@S%(9!9CG9<NF)T%M>7\.0D)!3BTPD"(L!BY`$`0``B14`````B=.!
+MXW[__O^+`8F8!`$``(G3@>-^__+_BT$$B1B+002)6`R+002)6!"+002)6!2+
+M002)6!B+002)6`2+`8N`5`$``*,`````B<.!X_X`__^+`8F85`$``%O#C78`
+M5E.#[`2+="04BE0D&(M$)!"+&(/^`W80BX3S@`$``*,`````ZPZ)]HN$\X`!
+M``"C`````(/@_H/^`W8,B83S@`$``.L*C78`B83S@`$``(32=&&#_@-V#HN$
+ML]`!``"C`````.L,BX2ST`$``*,`````@\@"@_X#=@F)A+/0`0``ZPF)A+/0
+M`0``B?:#_@-V#XN$L]`!``"C`````.L-D(N$L]`!``"C`````*@"==SK9HGV
+M@_X#=@W'A/,P`@```````.L+QX3S4`(```````"#[`QH$"<``.C\____@\00
+M@_X#=@Z+A/,T`@``HP````#K#(N$\U0"``"C`````(/(`8/^`W8)B83S-`(`
+M`.L'B83S5`(``(/$!%M>PXGV5U93@^P0BWPD((I$)"2(1"0/BDPD*(A,)`Z+
+M-[L`````@'\F``^$D@$``)`/MD0D#XC9T_BH`0^$<P$``(/[`W8.BX3>A`$`
+M`*,`````ZPR+A-Z$`0``HP````"#X/Z#^P-V#(F$WH0!``#K"HUV`(F$WH0!
+M``"#[`QH$"<``.C\____@\00@'PD#@!T8H/[`W8.BX2>T`$``*,`````ZPR+
+MA)[0`0``HP````"#R`*#^P-V"8F$GM`!``#K"HF$GM`!``"-=@"#^P-V#XN$
+MGM`!``"C`````.L-D(N$GM`!``"C`````*@"==SK9HGV@_L#=@W'A-XP`@``
+M`````.L+QX3>4`(```````"#[`QH$"<``.C\____@\00@_L#=@Z+A-XT`@``
+MHP````#K#(N$WE0"``"C`````(/(`8/[`W8)B83>-`(``.L'B83>5`(``(/[
+M`W8/QX3>@`$```$```#K#8GVQX3>@`$```$```"#^P-V$(N$WH0!``"C````
+M`.L.B?:+A-Z$`0``HP````"#R`&#^P-V#(F$WH0!``#K"XUV`(F$WH0!``"0
+M0P^V1R8YV`^';_[__X/$$%M>7\-3BUPD"(I,)`R+`XN`!`$``*,`````B<)F
+M@7LD@&1T$&:!>R2`D70(9H%[)("4=10/MLF#P0BX`0```-/@"<+K$HUV``^V
+MR8/!#+@!````T^`)PHL#B9`$`0``6\.-=@!3BUPD"(I,)`R+`XN`!`$``*,`
+M````B<)F@7LD@&1T$&:!>R2`D70(9H%[)("4=10/MLF#P0BX_O___]/`(<+K
+M$HUV``^VR8/!#+C^____T\`APHL#B9`$`0``6\.-=@!64X/L!(MT)!`/MEPD
+M%%-6Z/S___^#[`1H$"<``.C\____4U;H_/___X/$'%M>PY!3BUPD"(I,)`R`
+M^?]T>H#Y'W<YBY,8`0``B14`````N`$```#3X(G!]]`AT(F#&`$``(N#6`$`
+M`*,`````(<AT1XF#6`$``.L_C78`BY,<`0``B14`````#[;)@^D@N`$```#3
+MX(G!]]`AT(F#'`$``(N#8`$``*,`````(<AT"(F#8`$``(GV6\.)]E=64XMT
+M)!B*7"04BT0D$(LX@/L#=A(/ML/'A,<``@``#`$``.L0B?8/ML/'A,<``@``
+M#`$``(/L#&@0)P``Z/S___^#Q!"`^P-V+0^VRP^V5@/!XA@/MD8"P>`0"<(/
+MMD8!P>`("<(/M@8)PHF4SP0"``#K*XUV``^VRP^V5@/!XA@/MD8"P>`0"<(/
+MMD8!P>`("<(/M@8)PHF4SP0"``"`^P-V$P^VP\>$QP`"```0`0``ZQ&-=@`/
+MML/'A,<``@``$`$``(/L#&@0)P``Z/S___^#Q!"`^P-V+0^VRP^V5@?!XA@/
+MMD8&P>`0"<(/MD8%P>`("<(/MD8$"<*)E,\$`@``ZRN)]@^VRP^V5@?!XA@/
+MMD8&P>`0"<(/MD8%P>`("<(/MD8$"<*)E,\$`@``6UY?PY"0D%.#[#"+7"0X
+MC40D+E"-1"0P4(U$)#)0C40D-%"-1"0V4(U$)#E0C40D/%"-1"0^4(U$)$%0
+MC40D0E"-1"1%4(U$)$A0C40D2U`/MT,D4.C\____@\0\#[9$)!=0#[9$)!Q0
+MC40D&%#H_/___VH!#[94)">-!-+!X`(IT,'@`U#_<Q"-@T`%``!0Z/S___^#
+MQ"!J`0^V1"09C01`C02`P>`#4/]S$(V#7`4``%#H_/___X/$$&H!#[9$)!B-
+M!$"-!,")PL'B!2G"P>("4O]S$(V#>`4``%#H_/___X/$$&H!#[=$)"+!X`)0
+M_W,0C8.4!0``4.C\____@\00:@$/MU0D&HT$U0`````IT,'@!%#_<Q"-@T`&
+M``!0Z/S___^#Q!!J`0^V1"0=#[=4)!H/K\*-!$#!X`)0_W,0C8/P!0``4.C\
+M____@\00:@%H``(``/]S$(V##`8``%#H_/___X/$$`^V1"034&@`"```_W,0
+MC8/,!@``4.C\____@\00:@$/MD0D((T$@,'@`E#_<Q"-@W@&``!0Z/S___^#
+MQ!!J`0^V1"0AC13`C110P>(#4O]S$(V#E`8``%#H_/___X/$$&H!#[=$)!Z-
+M!$#!X`-0_W,0C8.P!@``4.C\____@\00:@$/MT0D(M'@4/]S$(V#Y`@``%#H
+M_/___X/$$&H!#[9$)!?1X%#_<Q"-@PP)``!0Z/S___^#Q!!J`0^V1"09T>!0
+M_W,0C8,T"0``4.C\____@\00:@$/MD0D&-'@4/]S$(V#7`D``%#H_/___X/$
+M$&H!#[9#)M'@4/]S$(V#A`D``%#H_/___X/$$&H!#[=$)"3!X`50_W,0C8-<
+M!@``4.C\____@\00:@'_="00_W,0C8.L"0``4.C\____QP0D`0```&I`#[=$
+M)#+!X`90_W,0C8/("0``4.C\____@\04:@%H``$``&@`&0``_W,0C8/L"0``
+M4.C\____@\04:@%H@`````^W5"0RC032C02"C01"P>`$4/]S$(V#$`H``%#H
+M_/___X/$%&H!:@0/MT0D.,'@`E#_<Q"-@S0*``!0Z/S___^#Q!1J`6H$#[=$
+M)#K!X`)0_W,0C8-8"@``4.C\____@\04:@%J"`^V1"0PP>`+4/]S$(V#?`H`
+M`%#H_/___X/$%&H!:@@/MU0D+HT$DHT$@,'@`BG0P>`"4/]S$('#H`H``%/H
+M_/___[@`````@\1(6\.)]E575E.#[!R]`````(M$)##&0#D`QD`X`,9`-P#'
+M@%P,````````QH!9#````+D`````NA`!``"+7"0PC8,X"P``C78`B`A`2G7Z
+MBT0D,`7,````BU0D,(F"S````(F"T````(G0!=0```")@M0```")@M@```"-
+M0`B)@MP```")@N````"-0`B)@N0```")@N@```"-0`B)@NP```")@O````"-
+M0!")@OP```")@@`!``"-0`B)@@0!``")@@@!``"-0/")@O0```")@O@```"#
+M[`B-1"0B4(U$)"10C40D)E"-1"0H4(U$)"I0C40D+5"-1"0P4(U$)#)0C40D
+M-5"-1"0V4(U$)#E0C40D/%"-1"0_4`^W0B10Z/S___^*1"1'BTPD<(A!+HI$
+M)$B(02^*1"1)B(')````9HM$)%)FB4%`BT0D6&:)@30+``!FBT0D6DAFB8$V
+M"P``@\1`#[=!)#V`D0``=`L]@)0```^%1`D``(M<)##&0S4$QD,K!,9#-D#&
+M0S0`QH/&````"<9#+`"#[`R)V`5`!0``4.C\____B8-8!0``@\00NP`````/
+MMDPD!XT4R<'B`BG*C0S5`````.L$B!A)0(7)=?B#[`R+1"0\!5P%``!0Z/S_
+M__^+5"1`B8)T!0``@\00N0`````/ME0D"8T44HT4DL'B`W0&B`A`2G7Z@^P,
+MBT0D/`5X!0``4.C\____BTPD0(F!D`4``(/$$+L`````#[94)`B-%%*-%-*)
+MT<'A!2G1B<K!X@)T!H@80$IU^H/L#(M$)#P%E`4``%#H_/___XM<)$")@ZP%
+M``"#Q!"Y``````^W5"02P>("=`:("$!*=?J#[`R+1"0\!0P&``!0Z/S___^+
+M5"1`B8(D!@``B=`%\`4``(D$).C\____BTPD0(F!"`8``(G#B<@%0`8``(D$
+M).C\____BU0D0(F"6`8``(G"O@````"#Q!!F.W0D"G,WBTPD,('!W````(E:
+M1(I$)`V(0CR+002)402)"HE"!(D0#[9$)`V-!$"-'(.#PG!&9CMT)`IRTX/L
+M#(M$)#P%7`8``%#H_/___XM,)$")@70&``")PKX`````@\009CMT)!1S)HM,
+M)#"!P>0```#&0@@`BT$$B5$$B0J)0@2)$(/"($9F.W0D%'+D@^P,BT0D/`5X
+M!@``4.C\____BUPD0(F#D`8``(G"O@````"#Q!"`?"00`'0DB=F!P>P```"+
+M002)402)"HE"!(D0@\(41F8/MD0D$&8Y\'?D@^P,BT0D/`64!@``4.C\____
+MBU0D0(F"K`8``(G"O@````"#Q!"`?"01`'0IBTPD,('!_````(M!!(E1!(D*
+MB4($B1"!PI@```!&9@^V1"019CGP=^&#[`R+1"0\!;`&``!0Z/S___^+3"1`
+MB8'(!@``B<*^`````(/$$&8[="0.<R*+3"0P@<'T````BT$$B5$$B0J)0@2)
+M$(/"&$9F.W0D#G+HO@````"`?"0'`'1&BWPD,(''!`$```^WWH/L#(M$)#P%
+MS`8``%#H_/___XM4)$")A)KD!@``@\00BU<$B4<$B3B)4`2)`D9F#[9$)`=F
+M.?!WQ(/L#(M$)#P%Y`@``%#H_/___XM,)$")@?P(``")@0`)``!FBT0D(F:)
+M@08)``"#Q`@/M\!0B<@%``D``%#H_/___X/$!(M$)#P%#`D``%#H_/___XM<
+M)$")@R0)``")@R@)``!F#[9$)!=FB8,N"0``@\0(#[?`4(G8!2@)``!0Z/S_
+M__^)V`4T"0``B00DZ/S___^)@TP)``")@U`)``!F#[9$)!EFB8-6"0``@\0(
+M#[?`4(G8!5`)``!0Z/S___^)V`5<"0``B00DZ/S___^)@W0)``")@W@)``!F
+M#[9$)!AFB8-^"0``@\0(#[?`4(G8!7@)``!0Z/S___^)V`6$"0``B00DZ/S_
+M__^)@YP)``")@Z`)``!F#[9#)F:)@Z8)``"#Q`@/MD,F4(G8!:`)``!0Z/S_
+M__^)V`6L"0``B00DZ/S___^)@\0)```/MDPD&(T4R<'B`RG*C121C0R5=$4`
+M`(/$$+L`````B<J%R70&B!A`2G7ZBU0D,(N"Q`D``(D(BUPD,(N3Q`D``(I$
+M)`B(0@2#[`0/MD0D#%!1_[/$"0``Z/S___^^`````(/$$(![)@!T<0^WQHT4
+M0,'B`RG"BT0D,(T4D(VJ*`$``(GQB$T$QD4%`(F"*`$``,9%"@#&130`QD4<
+M`,=%6`````"-@D@!``")12")122-@E0!``")12R)13"!PF`!``")53B)53S&
+M108"1HM<)#!F#[9#)F8Y\'>/BT0D,,9`-`"^``````^WQHM4)##&A!`>!0``
+M_T9F@_X#=NJ^`````(!\)`<`='\/M\Z+7"0PBY-8!0``C03)P>`"*<C!X`/&
+M1!`C`8N36`4``,9$$"(`BY-8!0``QD002/^+DU@%``#&1!`^_XN36`4``&;'
+MA!"0``````#'A(N8`@```````(G!`XM8!0``C5$0B5$0`X-8!0``@\`0B4`$
+M1F8/MD0D!V8Y\'>!BT0D,&;'@,0``````+X`````C78`#[?&BU0D,,:$$)@$
+M``#_1F:!_H4`=NF^`````(!\)`@`#X2G````#[?&BUPD,(N+D`4``(T$0(T$
+MP(G"P>(%*<+!X@+&1`HP`(N#D`4``,9$`C$`BX.0!0``QT0"#`````")T0.+
+MD`4``(U!$(E!$(G0`X.0!0``@\`0B4`$B=$#BY`%``"-01B)01B)T`.#D`4`
+M`(/`&(E`!(N#D`4``(EL`@B)T0.+D`4``(U!*(E!*`.3D`4``(/"*(E2!$9F
+M#[9$)`AF.?`/AUG___^+1"0PQH#'````@+X`````@'PD"0!T=`^WUHM,)#"+
+M@70%``"-%%*-%)+!X@-FQT0",@0`BX%T!0``QD0")@"+@70%``#&1`(H_XN!
+M=`4``,9$`C3_B=&+7"0P`XMT!0``C4$4B4$4B=`#@W0%``"#P!2)0`2+@W0%
+M``");`)41F8/MD0D"68Y\'>,BT0D,,:`R````(*#[`B+1"0X!>0)``!0BT0D
+M/`7("0``4.C\____BU0D0(F"X`D``(/$"(G0!0@*``!0C4#D4.C\____BTPD
+M0(F!!`H``(/$"(G(!2P*``!0C4#D4.C\____BUPD0(F#*`H``(/$"(G8!5`*
+M``!0C4#D4.C\____B8-,"@``@\0(B=@%=`H``%"-0.10Z/S___^)@W`*``"#
+MQ`B)V`68"@``4(U`Y%#H_/___XF#E`H``(M4)$"+NI@*``"+JIP*``")1"00
+MO@````"#Q!"`?"00`'1.B=.!P^P```"#[`Q3Z/S___^)PHM,)!")2`B)>`R)
+M:!"#Q!"+0P2)4P2)&HE"!(D0@<$`"```B0PD@<<`"```@]4`1F8/MD0D$&8Y
+M\'>Z@^P(BT0D.`6\"@``4(M$)#P%H`H``%#H_/___XM<)$")@[@*``"+5"1`
+MB[J\"@``BZK`"@``B40D$+X`````@\009CMT)`YS2HG3@</T````@^P,4^C\
+M____B<*+3"00B4@(B7@,B6@0@\00BT,$B5,$B1J)0@2)$('!C`$``(D,)(''
+MC`$``(/5`$9F.W0D#G*^@\0<6UY?7<-55U93@^P,BWPD(,9$)`L`#[9$)`N*
+MC#@>!0``@/G_#X3(````#[;1C012P>`#*="-!(>-D"@!``")5"0$O0````"`
+MN#(!````#X2>````B=:#QC@/MM&-!%+!X`,IT,'@`HD$)(UV`(/L#%;H_/__
+M_XG#@\00BT8$B5X$B3.)0P2)&(-['`!T&X/L!/]S'/^W)`4``&H%Z/S___^`
+M2R0"@\00D(/L!%-J`O]T)!#H_/___X/$$(![2P!T'H/L#%?H_/___\<$)`$`
+M``#H_/___X/$$(![2P!UXD6)Z(L4)#B$.C(!```/AWO____^1"0+@'PD"P,/
+MAA3___^#[`Q7Z/S___^#Q!Q;7E]=PXUV`%.#[`B+3"04BUPD$#E9&'5/@'DD
+M"'1<@'DD*'16@'DDJ'10@'DDB'1*@'DD"G1$@'DD*G0^@'DDJG0X@'DDBG0R
+MC9/,````BX/,````B4@$B0&)402)B\P```#K%HUV`(V#S````(M0!(E(!(D!
+MB5$$B0J#[`Q3Z/S___^#Q!A;PXUV`(/L%/]T)!S_="0<Z/S___^#Q!S#55=6
+M4X/L#(M<)"2+="0HBVPD++\`````9H%[).$!=0R*0R:#Z!$\`78SB?:+1"0@
+MBQ"+BE@%``"-N>@6`0!F@7L0A0!W%P^W0Q`/MI00F`0``(T$TL'@`BG0C3S!
+MQD8$!8!F!?Z`)M^R`&:!>R3A`74*BD,F2#P!=P*R`8C0P>`'BA:#XG\)PH@6
+MBD-F@^`!P>`&@^*_"<*(%F:!>R3A`742BD,F@^@1/`%W"&:);@CK'HGV]D-F
+M`702@^P,5^C\____9HE&"(/$$.L$9HEN"&:+1@B(0Q5F@7LDX0%U(8I#)D@\
+M`7<%BE,GZQ]F@7LDX0%U#(I#)H/H$;(//`%V"[(`@W\P`'0#BE=)@^(/B@:#
+MX/`)T(@&@\0,6UY?7<.0@^P,_W0D'/]T)!S_="0<BT0D'/\PZ/S___^#Q!S#
+MB?964XM<)`R+,V:+@S`+``!`9HF#,`L``&8[@S0+``!R"6;'@S`+``````^W
+MBS`+``"+DTP*``"+1"00BP")!(H/MX,P"P``B88L`0``6U[#D%575E.+7"0@
+MBWPD&`^V;"0<BW0D%+H`````N00```")V(UV`(@00$EU^HGZ@>+_#P``BP,E
+M`/#__PG0B0,/ME8)P>(,)?\/\/\)T(D##[9&!M'H@^`!@_@!&<"#X`)`P>`=
+MBQ.!XO___Q\)PHD3BD,#@\@0@^#WB$,#]D8&`703B>J#XG_!XA2+`R7__P_X
+M"=")`UM>7UW#55=64X/L#(ML)""+="0DQT0D"`````"`?B0(=!.`?B0H=`V`
+M?B2H=`>`?B2(=0F0@TYD"NL>B?:`?B0*=!*`?B0J=`R`?B2J=`:`?B2*=02#
+M3F0"9H%^).$!=1B*1B:#Z!$\`7<.@TYD"+@`````Z3@%``"+1B0E____`#WA
+M`1``#X4)`0``9H%^$(4`#X>)````#[=&$("\*)@$``#_='MF@WX0?W<@#[:4
+M*)@$``"+C5@%``"-!-+!X`(IT(M$P2@/MG@$ZUEF@7X0@0!W*0^W1A`/MH0H
+MF`0``(N-D`4``(T$0(T$P(G"P>(%*<*+1)$(#[9X!.LH#[=&$`^VA"B8!```
+MBY5T!0``C01`C02`BT3"5`^V>`3K!I"______XGZ#[;"#[:<*!X%``"-!%O!
+MX`,IV(V<A2@!``"+C9`%``"-@>P&#0!F@7X0A0!W'`^W1A`/MH0HF`0``(T$
+M0(T$P(G"P>(%*<*-!)'V0#40#X5M`0``QD84!(M$)"C'``````"X`0```.D=
+M!```D&:!?A"%``^'C`````^W1A"`O"B8!```_W1^9H-^$']W(P^VE"B8!```
+MBXU8!0``C032P>`"*="+1,$H#[9X!.M<C78`9H%^$($`=RD/MT80#[:$*)@$
+M``"+C9`%``"-!$"-!,")PL'B!2G"BT21"`^V>`3K*`^W1A`/MH0HF`0``(N5
+M=`4``(T$0(T$@(M$PE0/MG@$ZP:0O_____^Y_P```&:!?A"%`'<-#[=&$&8/
+MMHPHF`0``(GZ#[;"#[:<*!X%``"-!%O!X`,IV(V<A2@!```/M]&-!-+!X`(I
+MT(N56`4``(T$PHE$)`AF@7XDX0%U"8I&)D@\`78MD&:!^?\`=`J+1"0(]D`C
+M!'4;QD84!HM4)"C'`@````"X`0```.GW`@``C78`BU0D"`^V0B"H`70@J`1T
+M'(I%+#I%-G(4BT0D*,<``0```+@!````Z<@"``"#?"0(``^$\0```(M4)`@/
+MMD(@J`$/A.$```"H!`^$V0```(/L"%92Z/S___^#Q!"$P'48QD84!(M$)"C'
+M``````"X`0```.E\`@``BU0D"(!Z2Q]V%(M$)"C'``$```"X`0```.E>`@``
+M]D9F`70&]D,(`708]D9F`74&]D,(`74,@'X4@70&]D,("'0J@^P(B?H/ML)0
+M5>C\____@\00A,!T%(M$)"C'``$```"X`0```.D0`@``]D9F`0^$?@$``/9#
+M"`$/A'0!``"#[`S_="04Z/S___^#Q!!F@_@?#X9;`0``BU0D*,<"`0```+@!
+M````Z<\!``"-=@#V0P8"=#*+1B0E____`#WA`1``=".+5"0(BD)+.D)*<A>+
+M1"0HQP`!````N`$```#IEP$``(UV`(M&)"7___\`/>$!$``/A/D```"+5"0(
+M#[="-HG"T>J#X@&Q`8!^).$/A=X```"`?B4!#X74````#[9&)H/H!H/X"0^'
+MK````/\DA<`8```/ML%0:@%65>C\____@\00A,`/A:4```"+1"0HQP`"````
+MN`$```#I&0$```^VP5!J`%95Z/S___^#Q!"$P'5]BU0D*,<"`@```+@!````
+MZ?$```!J`0^VPE!65>C\____@\00A,!U58M$)"C'``(```"X`0```.G)````
+M:@`/ML)05E7H_/___X/$$(3`=2V+5"0HQP("````N`$```#IH0```)#&1A0$
+MBT0D*,<``````+@!````Z8@```"#[`R-A0`)``!0Z/S___^#Q!"$P'02BU0D
+M*,<"`0```+@!````ZV&0@'XDX752@'XE`75,@'XF#W5&@'XI`75`9@^V1BC!
+MX`AF#[96)P'0@^P(#[?`4%7H_/___X/$$#E&2'4$A<!U&,9&%`2+1"0HQP``
+M````N`$```#K"XUV`+@`````C78`@\0,6UY?7<-64XM<)`R+="00N0````"Z
+M#0```(GPB?:("$!*=?J*0R6(!HI#)HA&`8I#)XA&`HI#*(A&`XI#*8A&!(I#
+M*HA&!8I#*XA&!O9#9@1T'HI#+(A&"(I#+8A&"8I#+HA&"HI#+XA&"XI#,(A&
+M#+@!````6U[#D%575E.+;"04BWPD&+H`````O@````")]KD'````#[8<-XUV
+M`-'BB=C3^*@!=!+WP@````%U&H'R=R?;`.L2B?;WP@````%T"('R=R?;`(GV
+M27G11H/^!WZ_B=#!Z!"(10")T,'H"(A%`8A5`EM>7UW#C78`55=64X/L8(ML
+M)'B+1"1TBX`H"@``B40D(,=$)!@`````QT0D%`````#'1"00`````,=$)`P`
+M````9L=%'O\/C40D0%!5_W0D?.C\____@\00A,!T"8M$)#SIWPP``(M%)"7_
+M__\`/>$!$``/A2,!``"#[`QHB!,``.C\____@\009H%]$(4`#X>;````#[=%
+M$(M4)'"`O!"8!```_P^$A0```&:#?1!_=R,/MI00F`0``(M<)'"+BU@%``"-
+M!-+!X`(IT(M$P2B*0`3K76:!?1"!`'<L#[=%$(MT)'`/MH0PF`0``(N.D`4`
+M`(T$0(T$P(G"P>(%*<*+1)$(BD`$ZRD/MT40BU0D<`^VA!"8!```BY)T!0``
+MC01`C02`BT3"5(I`!.L$B?:P_P^VP(M<)'`/MH08'@4``(E$)!B-!$#!X`,K
+M1"08C82#*`$``(E$)!B+BY`%``!F@7T0A0!W)0^W11`/MH08F`0``(T$0(T$
+MP(G"P>(%*<*-%)&)5"00Z84!``"!P>P&#0")3"00Z78!``"[_P```&:!?1"%
+M`'<1#[=%$(MT)'!F#[:<,)@$``!F@7TDX0%U#HI%)H/H$3P!#X;I````9H%]
+M$(4`#X>9````#[=%$(M4)'"`O!"8!```_P^$@P```&:#?1!_=R,/MI00F`0`
+M`(MT)'"+CE@%``"-!-+!X`(IT(M$P2B*0`3K6V:!?1"!`'<L#[=%$(M4)'`/
+MMH00F`0``(N*D`4``(T$0(T$P(G"P>(%*<*+1)$(BD`$ZR</MT40BTPD<`^V
+MA`B8!```BY%T!0``C01`C02`BT3"5(I`!.L"L/\/ML"+="1P#[:$,!X%``")
+M1"08C01`P>`#*T0D&(V$AB@!``")1"08#[?3C032P>`"*="+EE@%``"-!,*)
+M1"04ZR$/M\.-!$"-!("+3"1PBY%T!0``C03"B40D#(MP5(ET)!AF@7TDX0%U
+M$8I5)HU"[SP!=B:-0O\\`78?9H'[_P!T"HM$)!3V0",$=0[&110&N`````#I
+M,PH``(/L"(U$)$!0_W0D?.C\____9HE$)#!FB44>@\0$_W0D?.C\____B40D
+M%(/$$+@"````@WPD!``/A/8)``"+5"0$B554#[=$)""-',"-')B-'%C!XP0#
+M7"0<B=B+3"1P*X$H"@``@\`@F8G&B=<#L2P*```3N3`*``"+1"0XB7`@BTPD
+M.(EY)(M$)`2+<`R+>!"+1"0XB7`HBTPD.(EY+(M$)#B+5"0@9HE0"+D`````
+MNK`$``")V(UV`(@(0$IU^F:!?23A`75MBD4F@^@1/`%W8XU$)$!0BT0D/`^V
+M0`A05?]T)"#H_/___X/$$`^W5"0@C032C02"C01"P>`$`T0D'(M,)'`K@2@*
+M```%(`0``)F)QHG7`[$L"@``$[DP"@``BT0D.(EP$(M,)#B)>13IK`$``(MT
+M)!CV1@8!=2N+120E____`#WA`1``#X0,`0``BU0D%`^V0B"H`0^$_````*@$
+M#X3T````]D5F('00C40D0%!5Z/S___^#Q`CK&XU$)$!0BT0D/`^V0`A05?]T
+M)"#H_/___X/$$`^W5"0@C032C02"C01"P>`$`T0D'(M,)'`K@2@*```%(`0`
+M`)F)QHG7`[$L"@``$[DP"@``BT0D.(EP$(M,)#B)>11F@7TDX0%U#HI%)H/H
+M$3P!#X;M````BW0D%`^V1B"H`@^$W0```*@$#X35````J`$/A,T````/MU0D
+M((T$THT$@HT$0L'@!`-$)!R+5"1P*X(H"@``F8G&B=>+3"1P`[$L"@``$[DP
+M"@``BT0D.(EP&(M,)#B)>1SIA@```(UV`(M<)!CV0P8"='D/MT0D((T,P(T,
+MB(T,2,'A!`-,)!R)R(MT)'`KAB@*``"9B<:)UXM<)'`#LRP*```3NS`*``"+
+M1"0XB7`8BUPD.(E['(MT)'`KCB@*``"!P2`$``")R)F)SHG7BTPD<`.Q+`H`
+M`!.Y,`H``(M$)#B)<!"+3"0XB7D4BT0D.(!(`0)F#[95/8M$)#AFB5`"O@``
+M``"`?3T`="Z-%';!X@*)TXM$)`0#6`B+342+!`J)`XM$"@2)0P2+1`H(B4,(
+M1@^V13TY\'?2BU4@BT0D.(E0#&:!?23A`75.BD4F@^@1/`%W1`^W7"0@4_]T
+M)#Q5_W0D).C\____C40D4%"-!-N-!(.-!$/!X`0#1"0P4%7_="0TZ/S___^+
+M5"0X@&((_H/$(.ES!0``BTPD&/9!!@(/A/($``"+1"0XQD`&_HM$)#B`8`?^
+M@WPD%``/A.8```"+7"04#[9#(*@"#X36````J`0/A,X```"H`0^$Q@````^W
+M1"0@4/]T)#Q54>C\____@\00]D5F`70/BT0D.&:+0`C!X`.(1"1!C40D0%`/
+MMU0D)(T$THT$@HT$0L'@!`-$)"!05?]T)"3H_/___X/$$/9%9@%T"HMT)!B`
+M3@@!ZPB+1"08@&`(_@^W1"0@C0S`C0R(C0Q(P>$$BU0D',8$$:&+7"04BI.R
+M````@^(/BW0D'(I$,0&#X/`)T(A$,0%FBT,80`^VT,'B"`^VQ`G09HE$,0*!
+MPYP```")7"0(Z<(#``")]F:!?23A`0^%D`(```^V12:#^`]T#H/X$`^$X@``
+M`.F=`P``9@^V52C!X@AF#[9%)P'"BT0D.,9`!`V+1"0X@&`%_H!,)#<(BUPD
+M.`^V116+="1P#[:.Q@```-/@9@E#"(M,)#B*00&#X!^#R""(00$/MT0D((T,
+MP(T,B(T,2,'A!(M$)!R-'`&+12J)@S@$``"+12Z)@SP$```/ML+!X`@/MM8)
+MPHMT)!QFB90Q1`0``(I%*8B$,4($``#&`Y&+5"049HM"&$`/MM#!X@@/ML0)
+MT&:)1#$"BUPD%(J3L@```(/B#XI$,0&#X/`)T(A$,0&!PYP```")7"0(Z<`"
+M``"+5"0X#[9%%8MT)'`/MH[&````T^!F"4((#[=$)""-%,"-%)"-%%#!X@2+
+M1"0<Q@0"@6;'1`("__^+7"00BHN+````@^$/BW0D'(I$,@&#X/`)R(A$,@&#
+M?30`=0[&110AN`````#I*@0``/9%)P%T38-].`!T1XM%.(E$)`@/MT0D((T<
+MP(T<F(T<6,'C!(/L"/]T)!"+5"1\_[+$"0``Z/S___^#X`^+3"0LBE0+`8/B
+M\`G"B%0+`8/$$.L(BUPD$(E<)`B[!````(M5-`^V0@$]DP```'=M_R2%Z!@`
+M`(/#!.MA@\,$ZUR#PPCK5X/#".M2@\,(ZTV#PPCK2(/#".M#@\,(ZSZ#PQCK
+M.8/#&.LT@\,,ZR^#PPCK*@^V6@2-')T(````ZQV!PX@```#K%8/#).L0@\,D
+MZPN#PR3K!H'#B````(U3`\'J`HM$)#B(4`2+3"0X9L'J"(/B`8I!!8/@_@G0
+MB$$%#[=4)""-!-*-!(*-!$+!X`2+="0<C80P(`0``(/L!%/_=310Z/S___^#
+MQ!#I)@$``(GV#[9%)(/H!#VK````=S3_)(4X&P``#[9%+,'@"`^V52V-1!#]
+M@_@*=P__)(7H'0``BT0D.(!(`02+1"0X@$@!`>L(BT0D.(!@`?N+1"0XQD`$
+M#8M$)#B`8`7^BU0D.`^V116+7"1P#[:+Q@```-/@9@E""(M$)#B`8`$?#[=$
+M)""-',"-')B-'%C!XP2+="0<QH0S(`0```:+?"04@<><````5XG>`W0D((V&
+M(00``%#H_/___U>-AB4$``!0Z/S___^-ED0$``"+122)AD0$``"+12B)0@2+
+M12R)0@B+13")0@S&!I&+1"0DBI"R````@^(/BTPD+(I$"P&#X/`)T(A$"P&#
+MQ!"+="049HM&&$`/MM#!X@@/ML0)T&:)1`L"B7PD"(-\)`@`#X29````#[=4
+M)""-!-*-!(*-!$+!X`0#1"0<BTPD"(L1B5`$BU$$B5`(ZW.+7"08]D,&`71I
+M#[=$)"!0_W0D/%53Z/S___^#Q!#V168!=`^+1"0X9HM`",'@`XA$)$&-1"1`
+M4`^W5"0DC032C02"C01"P>`$`T0D(%!5_W0D).C\____@\00]D5F`70*BW0D
+M&(!."`'K"(M$)!B`8`C^#[=<)""+5"1PBX*L!0``B2R8BU0D(&;!Z@4/M]*+
+M3"0@@^$?N`$```#3X(M,)'`)A)&P!0``BT4D)?___P`]X0$0`'4KC40D-%!J
+M`%/_="0DZ/S___^+1"1$)?___Q\-````0(E$)$2#Q!#IJP```&:!?23A`74\
+MBD4F@^@1/`%W,H/L"/]T)!3_="1\Z/S___^-1"1$4(M<)"`/MD,T4`^W1"0X
+M4/]T)#3H_/___X/$(.MG@^P(_W0D'/]T)'SH_/___XU$)$10BW0D*`^V1CY0
+M#[=$)#A0_W0D-.C\____#[9&((/$(*@"="^H!'0KJ`%T)XM$)#0E____'PT`
+M``!@B40D-`^V5CZ#XG_!XA0E__\/^`G0B40D-(U$)#10_W0D=.C\____@\0(
+MN`,```"#Q%Q;7E]=PXUV`%575E.#[`2+;"08BU0D'(M=`(G09L'H!0^W\(G1
+M@^$?N`$```")Q]/GA7RS1'4MB>!0:@`/M\)05>C\____@4PD$````."-1"00
+M@&`#]U!3Z/S___\)?+-$@\08@\0$6UY?7<-55U93@^P,BWPD((MT)"2+1DR+
+M:!QF@7X0A0`/AY\````/MT80@+PXF`0``/\/A(T```!F@WX0?W<F#[:4.)@$
+M``"+CU@%``"-!-+!X`(IT(M$P2@/MD`$!1`%``#K9I!F@7X0@0!W+@^W1A`/
+MMH0XF`0``(N/D`4``(T$0(T$P(G"P>(%*<*+1)$(#[9`!`40!0``ZR\/MT80
+M#[:$.)@$``"+EW0%``"-!$"-!("+1,)4#[9`!`40!0``ZPB-=@"X#P8```^V
+M7`<.C01;P>`#*=B-G(<H`0``@WY0`'01@^P(_W905^C\____@\00B?:#[`A6
+M5^C\____@\0(55/_E9P```"#Q!Q;7E]=PXUV`%575E.#[!B+;"0LBT4`B40D
+M%(U=+%/H_/___XG'@^\@@\0$_W0D%.C\____B<:#Q!"-1R"+4P2)0P2)7R")
+M4`2)`K@!````A?9T=(U6/,9&).'&1B4!QD8F$(!.)P&+3"0DBX&<````B49(
+MBT9,B4@<B<@%D````(E&.,9&%<QF#[9',V:)1A"+10")1AC'1B"0````B4XT
+MQT9L-"4%`(/L"&H`4NC\____@\0(5O]T)!3H_/___[@`````@\00@\0,6UY?
+M7<.055=64X/L#(M\)"2+="0@BT8HB40D"(LH9HM/'HG(9L'H!0^WV(/A'[@!
+M````T^"%1)U$#X5C`P``BU4`C02=``,``(F"<`$``(M%`(N`=`$``*,`````
+MB<+&1Q0ABT<D)?___P`]X0$/`'4@@^P(:@!7Z/S___^#Q`QJ`%=5Z/S___^#
+MQ!#I$0,``)!FBT\>@^$?N`$```#3X(7"=!:#[`AJ`5?H_/___XDL).C\____
+M@\00#[:&L````(/X!`^'V`(``/\DA10>``#&AK`````!@^P$:@%7_W0D%.C\
+M____@\00Z;,"``#&AK`````"@^P$:@A7_W0D%.C\____@\00Z94"``#&AK``
+M```#@^P$5FHA_W0D%.C\____@\00@WXL`'0@@^P,:@!J`0^V1DE0_W8L_W0D
+M).C\____@\0@Z58"``"#[`1J`(M4)!`/MD()4%7H_/___X/$$.DZ`@``QH:P
+M````!(-^+`!T,8/L!%9J(?]T)!3H_/___\<$)`````!J`@^V1DE0_W8L_W0D
+M).C\____@\0@Z?P!``"#[`1J`&HA_W0D%.C\____@\0,:@&+5"00#[9""5!5
+MZ/S___^#Q!#IT`$``(/L!%9J!O]T)!3H_/___X/$$(-^'`!T%8M&'(M(!(U1
+M`8E0!(/Y!0^&HP$``,9&(P'&1B(`@'Y+`'0?D(/L#%7H_/___\<$)`$```#H
+M_/___X/$$(!^2P!UXH-^+`!T$XM6#(M&"(E0!(D"BT8L_D@PZQ6#?C``=`^+
+M5C`/MD9)QT2"/`````"+5@2+!HE0!(D"BT0D"/Y("H.^X`````!T&X/L!&H!
+M#[:&U0```%#_MN````#H_/___X/$$(-^+`!T%8/L!&H!#[9&25#_=BSH_/__
+M_X/$$(-^'`!T>8M&',=`8`````#^A5<,``"#[`Q5Z/S___^#Q`QJ`8M&'`^V
+M0`%05>C\____@\0,BT8<#[9``E"+1AP/MD`!4&@L`@``Z/S___^#Q`S_=AS_
+MM20%``!J`>C\____@\0,_W8<_[4D!0``:@;H_/___\=&'`````"#Q!"#[`A6
+M5>C\____@\00BU0D"(!Z!?]T8K\`````@'H*`'9!B=.#PSB)]H/L#%/H_/__
+M_XG&@\00BT,$B7,$B1Z)1@2),(!^(O]U#D>)^(M4)`@X0@IWT^L+B?B+5"0(
+M.$(*=Q:+1"0(QD`%_X/L"%!5Z/S___^#Q!"0@\0,6UY?7<-55U93@^P,BUPD
+M)(MT)""+?BB++\=$)`@`````]D<($'0'QH:P````!@^VAK````"#^`$/A(,`
+M``"#^`%_"H7`=!WIR0,``)"#^`0/A)L```"#^`8/A.H!``#IL0,``,:&L```
+M``&#[`A65>C\____QD,4@8!/"`B#Q!"#>U0`=!"#[`B-0U105>C\____@\00
+MC97,````BX7,````B5@$B0.)4P2)G<P```"#[`Q5Z/S___^#Q!#I5`,``(!G
+M"/?^AK,```#&AK``````QD,4`H/L"%-5Z/S___^)+"3H_/___X/$$.DE`P``
+MD,:&LP````"#?AP`#X1'`0``BT8<BT@$C5$!B5`$@_D%#X<R`0``@&<(]X-[
+M5`!T$(/L"(U#5%!5Z/S___^#Q!"-E<P```"+A<P```")6`2)`XE3!(F=S```
+M`(!/"!"#?BP`=!V#[`QJ`&H"#[9&25#_=BQ7Z/S___^#Q"#IHP(``,9$)`<`
+M@'\*``^&L0```(U'.(D$)(GV@^P,_W0D#.C\____B<.#Q!"+%"2+0@2)6@2)
+M$XE#!(D8@WL<`'0=@^P$_W,<_[4D!0``:@7H_/___X!+)`*#Q!"-=@"#[`13
+M:@97Z/S___^#Q!"`>TL`=#^+1"0(_T0D"#U_EI@`=S"#[`Q5Z/S____'!"0!
+M````Z/S___^#Q!"`>TL`=!*+1"0(_T0D"#U_EI@`=M.-=@#^1"0'BD0D!SA'
+M"@^'5____\9&(@.#[`A65>C\____@\00Z<T!``"0C97,````BX7,````B5@$
+MB0.)4P2)G<P```"#?AP`=!6+1AR+2`2-40&)4`2#^04/AGH!``"#[`QH7`@`
+M`.C\____@\0,5FH&5^C\_____D\*@\00BU8$BP:)4`2)`H-^+`!T%(M&+/Y(
+M,(M6#(M&"(E0!(D"ZQF0@WXP`'02BU8P#[9&2<=$@CP`````C78`@'Y+`'1"
+MBT0D"/]$)`@]?Y:8`'<SC78`@^P,5>C\____QP0D`0```.C\____@\00@'Y+
+M`'02BT0D"/]$)`@]?Y:8`';3C78`BU8$BP:)4`2)`H.^X`````!T'8/L!&H!
+M#[:&U0```%#_MN````#H_/___X/$$(GV@WXL`'06@^P$:@$/MD9)4/]V+.C\
+M____@\00D(-^'`!T=HM&',=`8`````#^A5<,``"#[`Q5Z/S___^#Q`QJ`8M&
+M'`^V0`%05>C\____@\0,BU8<#[9"`E`/MD(!4&@L`@``Z/S___^#Q`S_=AS_
+MM20%``!J`>C\____@\0,_W8<_[4D!0``:@;H_/___\=&'`````"#Q!"#[`A6
+M5>C\____@\00ZQ&#[`16:@)7Z/S___^#Q!")]H/L#%7H_/___X/$$(/$#%M>
+M7UW#55=64X/L#(M<)"2+?"0@BV]4BW4`]D4($'0$QD<U!@^V1S6#^`$/A($`
+M``"#^`%_"X7`=![I6@,``(GV@_@$#X21````@_@%#X2&`0``Z4$#``#&1S4!
+M@^P(5U;H_/___\9#%(&`30@(@\00@WM4`'00@^P(C4-44%;H_/___X/$$(V6
+MS````(N&S````(E8!(D#B5,$B9[,````@^P,5NC\____@\00Z><"``"`90CW
+M_D<VQD<U`,9#%`*#[`A35NC\____B30DZ/S___^#Q!#IO@(``(!E"/>#>U0`
+M=!"#[`B-0U105NC\____@\00C9;,````BX;,````B5@$B0.)4P2)GLP```"#
+M[`1J`&H&5>C\____@\0,:@$/MD4)4%;H_/___\9$)!L`@\00@'T*``^&@@``
+M`(U].(/L#%?H_/___XG#@\00BT<$B5\$B3N)0P2)&(-['`!T&X/L!/]S'/^V
+M)`4``&H%Z/S___^`2R0"@\00D(/L!%-J!E7H_/___X/$$(![2P!T(8UV`(/L
+M#%;H_/___\<$)`$```#H_/___X/$$(![2P!UXOY$)`N*1"0+.$4*=X'&104`
+M@$T($(/L#%7H_/___X/$$.G``0``@&4(]X-[5`!T$(/L"(U#5%!6Z/S___^#
+MQ!"-ALP```"+ELP```")6@2)$XE#!(F>S````(U%.(G".44X#X3H````B40D
+M!(GV@^P,4NC\____B<.#Q!"#>!P`=!R#[`3_<!S_MB0%``!J!>C\____@$LD
+M`H/$$(GV@^P$4VH&5>C\____@\00@'M+`'0AC78`@^P,5NC\____QP0D`0``
+M`.C\____@\00@'M+`'7B@WL<`'1<BT,<QT!@`````/Z&5PP``(/L#%;H_/__
+M_X/$#&H!BT,<#[9``5!6Z/S___^#Q`S_<QS_MB0%``!J`>C\____@\0,_W,<
+M_[8D!0``:@;H_/___\=#'`````"#Q!"#[`A35NC\____@\00BU0D!#E5.`^%
+M'O___X/L!&H`:@95Z/S___^#Q`A75NC\____QT4H`````(L&BY!8`0``B14`
+M````@\00A=)T"(L&B9!8`0``]D4&`715QD0D"P"`?BL`=AH/ME4)B="*3"0+
+MT_BH`74*08A,)`LX3BMWZH/L"`^V7"034U;H_/___X/$"%56Z/S___^)V,'@
+M!`'8QX2&/`L```````"#Q!")]H/$#%M>7UW#55=64X/L%(M\)"B+1RB)1"0,
+MBQA74^C\____@\00@+^S`````78'QH>P````!(UW$#EW$`^$)@(``(/L#%;H
+M_/___XE$)!B#Q!"+1Q"+5"0(B5`$B0*)<@2)5Q"]`````.G#`0``B?8/M]6+
+M@ZP%``"+-)"%]@^$K`$``&:+1QAF.T80#X6>`0``#[>3,@L``(N#<`H``#D0
+M=$^00@^W@S8+```YT'<%N@````"+@W`*``"+1)`$J0``"`!U(B7_#P``9CG%
+M=1@Y="0(=1R#[`Q3Z/S___^#Q!#I@0$``)"+@W`*```Y$'6RBTPD!(!Y-``/
+MA3`!``!F@7X0A0`/AR0!```/MT80@+P8F`0``/\/A!(!``"%_P^$\@````^V
+M1R"H`0^$Y@```*@$#X3>````BQ-FBT8>9L'H!0^WP(T$A0`#``")@G`!``!F
+MBTX>@^$?N@$```")T-/@B<&+`XF(=`$```^W3AZ+@ZP%``#'!(@`````9HM.
+M'HG(9L'H!0^WP(D$)(/A'XG0T^")P??1BP0D(8R#L`4``&:+3AZ)R&;!Z`4/
+MM\"#X1_3XO?2(52#1#MT)`AT.HM6!(L&B5`$B0*#?E0`=!"#[`B-1E104^C\
+M____@\00C9/,````BX/,````B7`$B0:)5@2)L\P```"#[`@/MT8>4(V#``D`
+M`%#H_/____Y/2X/$$.L8BU0D!/9"!@)T#H/L"%97Z/S___^#Q!"0168Y:T`/
+MAS7^__^%_W0I#[9'(*@!="&H!'0=BTPD"(M1!(L!B5`$B0*#[`A15^C\____
+M@\00B?:#Q`Q;7E]=PU575E.#[!2+?"0HBT=4B40D#(L85U/H_/___X/$$(!_
+M-@%V!,9'-02-=Q0Y=Q0/A-P!``"#[`Q6Z/S___^)1"08@\00BT<4BU0D"(E0
+M!(D"B7($B5<4O0````#I@0$```^WU8N#K`4``(LTD(7V#X1L`0``9HM')&8[
+M1A`/A5X!```/MY,R"P``BX-P"@``.1!T3Y!"#[>#-@L``#G0=P6Z`````(N#
+M<`H``(M$D`2I```(`'4B)?\/``!F.<5U&#ET)`AU'(/L#%/H_/___X/$$.DY
+M`0``D(N#<`H``#D0=;)F@7X0A0`/A_(````/MT80@+P8F`0``/\/A.````"+
+M3"0$@'DT``^%T@```/9!!@$/A,@```"+$V:+1AYFP>@%#[?`C02%``,``(F"
+M<`$``&:+3AZ#X1^Z`0```(G0T^")P8L#B8AT`0``#[=.'HN#K`4``,<$B```
+M``!FBTX>B<AFP>@%#[?`B00D@^$?B=#3X(G!]]&+!"0AC(.P!0``9HM.'HG(
+M9L'H!0^WP(/A']/B]](A5(-$.W0D"'0DBU8$BP:)4`2)`HV3S````(N#S```
+M`(EP!(D&B58$B;/,````@^P(#[=&'E"-@P`)``!0Z/S____^3RF#Q!")]D5F
+M.6M`#X=U_O__BU0D!/9"!@%T&XM,)`B+402+`8E0!(D"@^P(45?H_/___X/$
+M$(/$#%M>7UW#55=64X/L#(M\)"#'1"0(`````(V'S````(G".8?,````#X3/
+M`0``B<6-=@"#[`R)UE+H_/___XG#@\00@WA,`'4N@^P,5^C\____B4-,@\00
+MA<!U&XN'S````(E8!(D#B7,$B9_,````Z8@!``")]HM#)"7___\`/>$!$``/
+MA/$```!F@7L0@``/A.4```!F#[9#$&:)0Q!F@_A_=A)F@7LDX0%U(HI#)H/H
+M$3P!=QAF@7L0A0!W$`^W0Q"`O#B8!```_W4:B?;&0Q0&@^P(4U?H_/___X/$
+M$.D*`0``B?9F@7LDX0%U#(I#)H/H$3P!=C>)]HN/6`4``&:!>Q"%`'<=#[=#
+M$`^VE#B8!```C032P>`"*="-!,&)1"0(ZPJ!P>@6`0")3"0(9H%[).$!=0N*
+M0R9(/`%V.XUV`&:!>Q"``'0P9H%[).$!=0J*0R:#Z!$\`78>BT0D"/9`(P1U
+M%,9#%`:#[`A35^C\____@\00ZW60@^P(4U?H_/___X/$$(/X`G<*@_@!<QSK
+M"XUV`(/X`W1$ZU&0@^P(4U?H_/___X/$$.M!@WM4`'00@^P(C4-44%?H_/__
+M_X/$$(V7S````(N'S````(E8!(D#B5,$B9_,````ZQV#[`A35^C\____@\00
+MB?:)ZCFOS`````^%-O[__X/$#%M>7UW#B?955U93@^P\BD0D5(A$)"`/MLB)
+MRL'B!`'*BUPD4(T4DXN"/`L``(E$)!RX_O___]/`(H)9"P``B$0D&XL3B50D
+M%,=$)!``````@'PD(`-V#,>"<`$``,0!``#K#HM,)!3'@7`!``"H`0``BUPD
+M%(N#=`$``*,`````BDPD((/A`[L'````T^.)Q@G>BT0D%(FP=`$``(/L#&CH
+M`P``Z/S____WTR'>BU0D)(FR=`$``(/$$(!\)"`#=A4/MD0D((N$@M`!``"C
+M`````(G&ZQ</MD0D((M,)!2+A('0`0``HP````")QH/."(!\)"`#=A(/MD0D
+M((M<)!2)M(/0`0``ZQ`/MD0D((M4)!2)M(+0`0``@'PD(`-V%@^V1"0@BTPD
+M%,>$P0`"```X````ZQ0/MD0D((M<)!3'A,,``@``.````(/L#&@0)P``Z/S_
+M__^#Q!"`?"0@`W86#[9$)""+5"04QX3"!`(```````#K%`^V1"0@BTPD%,>$
+MP00"````````@WPD'``/A&T(``"_`````(M<)%"`>RL`=C:)]HM4)!P/MD()
+MB?L/MLO3^*@!=!6#[`1J`5'_="1<Z/S___^#Q!"-=@!'B?B+5"10.$(K=\R+
+M3"0<]D$&`71[@^P(4?]T)%SH_/___X/$"`^V7"0H4_]T)%SH_/___XG8P>`$
+M`=B+7"1@C12#BX)<"P``@\00J0``$`!T"R7__^__B8)<"P``@^P(_W0D)/]T
+M)%SH_/___P^V5"0PB=#!X`0!T(M4)&#'A((\"P```````(/$$.FC!P``BTPD
+M'(!Y-`!T'8/L"%&+7"1<_[/$"0``Z/S___^+1"0L_D@T@\00@'PD&P`/A)0"
+M``#'1"0,`````,9$)`L`@^P(#[9<)"A3_W0D7.C\____B=C!X`0!V(M,)&"-
+M%(&+@EP+``"#Q!"I```0`'0+)?__[_^)@EP+``"*7"0;BT0D'(A8";\`````
+MBU0D4(!Z*P`/AF$!```/MNN)^P^VRXGHT_BH`0^$/0$``(G(P>`$`<B*5"0;
+MBUPD4(B4@UD+``")^#P#=A&+5"04QX3*``(``#@```#K%(GY#[;!BUPD%,>$
+MPP`"```X````@^P,:!`G``#H_/___X/$$(GX/`-V$`^VP(M4)!2)K,($`@``
+MZQ")^0^VP8M<)!2)K,,$`@``B?@\`W80BU0D%,>"<`$``,0!``#K#HM,)!3'
+M@7`!``"H`0``BUPD%(N#=`$``*,`````B?F#X0.[!P```-/CB<8)WHM$)!2)
+ML'0!``"#[`QHZ`,``.C\____]],AWHM4)"2)LG0!``"#Q!")^8#Y`W83#[;!
+MBX2"T`$``*,`````B<;K%XG[#[;#BU0D%(N$@M`!``"C`````(G&@\X(B?F`
+M^0-V$`^VP8M<)!2)M(/0`0``ZQ")^@^VPHM,)!2)M('0`0``1XG[BT0D4#A8
+M*P^'HO[__XM$)!R#P"R)PHM,)!PY02QT-X/L#(G34NC\____C5#@B50D'(/$
+M$(M3!(E#!(D8B5`$B0*+3"0,@WD,`'0+B=J+1"0<.5@L=<F#?"0,`'1'BU0D
+M#,9",@"_`````(M,)%"`>2L`=C"+7"0<#[9#"8GYT_BH`704#[9$)`N+7"0,
+MB$P80/Y#,OY$)`M'B?B+5"10.$(K=]"#[`1J`&B!````_W0D*.C\____#[94
+M)#")T,'@!`'0BTPD8,>$@3P+````````@\00Z=0#``"#[`1J`&H&_W0D*.C\
+M____@\0(#[9<)"A3_W0D7.C\____B=C!X`0!V(M<)&"-%(.+@EP+``"#Q!"I
+M```0`'0+)?__[_^)@EP+``"+1"0<@\`LB<*+3"0<.4$L#X07`@``B40D!(/L
+M#%+H_/___XUHX(/$$(U0"#E0"`^$T`$``)"#[`R-12A0Z/S___^-</B#Q!"`
+M?B$-=1R#[`@%^````%"+1BB+`/]P%.C\____@\00C78`BU8$BP:)4`2)`H!^
+M2P!T(8/L#/]T)%SH_/___\<$)`$```#H_/___X/$$(!^2P!UWX-^'``/A#H!
+M``"+1AS'0&``````@'Y+``^$G@```+\`````BUPD4&:#>T``#X2*````D(M4
+M)%"+@JP%``"+'+B%VW1G9HM#$&8[1AAU768]A0!W5P^WP("\$)@$``#_=$J)
+MT8L29HM#'F;!Z`4/M\"-!(4``P``B8)P`0``BQ%FBTL>@^$?N`$```#3X(F"
+M=`$``,9#%"&#[`1J`%/_="1<Z/S___^#Q!")]D>+7"10#[=#0#GX#X]W____
+M]D8D!'4MBT0D4/Z`5PP``(/L#%#H_/___X/$#&H!BT8<#[9``5#_="1<Z/S_
+M__^#Q!"0@^P$BT8<#[9``E"+1AP/MD`!4&@L`@``Z/S___^#Q`S_=AR+5"18
+M_[(D!0``:@'H_/___X/$#/]V'(M,)%C_L20%``!J!NC\____QT8<`````(/$
+M$(M<)!S^2PK^33"#[`A6_W0D7.C\____@\00C44H.44H#X4Q_O__BT0D'/Y(
+M'(/L"%7_="1<Z/S___^#Q!"+5"0$BTPD'#E1+`^%[?W__XM$)!R#P#B)PHM<
+M)!PY0S@/A!@!``")PX/L#%+H_/___XG&@\00@'A+`'1!BT0D$/]$)!`]?Y:8
+M`'<RB?:#[`S_="1<Z/S____'!"0!````Z/S___^#Q!"`?DL`=`^+1"00_T0D
+M$#U_EI@`=M"#?AP`#X21````BT8<QT!@`````/9&)`1U+(M$)%#^@%<,``"#
+M[`Q0Z/S___^#Q`QJ`8M&'`^V0`%0_W0D7.C\____@\00@^P$BT8<#[9``E"+
+M1AP/MD`!4&@L`@``Z/S___^#Q`S_=AR+5"18_[(D!0``:@'H_/___X/$#/]V
+M'(M,)%C_L20%``!J!NC\____QT8<`````(/$$(M$)!S^2`J#[`A6_W0D7.C\
+M____@\00B=J+3"0<.5DX#X7J_O__@^P(_W0D)/]T)%SH_/___P^V5"0PB=#!
+MX`0!T(M<)&#'A(,\"P```````(/$$+\`````BT0D4(!X*P`/AO8```")]@^V
+M1"0;B?G3^*@!=0HZ3"0@#X7-````B?N`^P-V$(M$)!3'@'`!``#$`0``ZPZ+
+M5"04QX)P`0``J`$``(M,)!2+@70!``"C`````(GY@^$#C0Q)NP<```#3XXG&
+M"=Z+1"04B;!T`0``@^P,:.@#``#H_/____?3(=Z+5"0DB;)T`0``@\00B?F`
+M^0-V$P^VP8N$@M`!``"C`````(G&ZQ>)^P^VPXM4)!2+A(+0`0``HP````")
+MQH/."(GY@/D#=A`/ML&+7"04B;2#T`$``.L3B?H/ML*+3"04B;2!T`$``(UV
+M`$>)^XM$)%`X6"L/APS___^#Q#Q;7E]=PU93@^P$BW0D$(L>L0"`>RL`=AR0
+M#[;1B=#!X`0!T(V$@S@+```Y\'0&03A+*W?E#[;1B=#!X`0!T(T$@XN(/`L`
+M`(7)=&+V008"=%P%.`L``#E!&'52@'DT`'0J_D$TZT?^032#[`QH``````^V
+MAHL```!05E'_L\0)``#H_/___X/$(.LBBU$LC7+@C4$L.<)T%8G"@WX,`'3&
+MBT8@C7#@.=!U\(UV`(/$!%M>PXGV55=64X/L#(I$)"2(1"0+BWPD(+L`````
+M#[;(B<C!X`0!R(T4AXNR/`L``(7V#X1M`0``N/[____3P(1&"0^%70$``(U&
+M+#E&+'09@^P,C8(X"P``4.C\____@\00Z;("``")]KT`````@'X*``^&H0(`
+M`(U>.(GV@^P,4^C\____B<*#Q!"+0P2)4P2)&HE"!(D0@'HA``^%[P````^W
+M0AB#O(>8`@```'4*@WH<``^$OP````^W0AB+A(>8`@``@WAP``^$D@```,:"
+ML``````/MD(@J`)T*Z@$=">H`70CQD(B!<9"(P12#[9"25#_<BS_<BCH_/__
+M_X/$$.F*````B?8/MD(@J`)U(*@$=!RH`708QD(B`\9"(P2#[`A25^C\____
+M@\00ZV&0#[9"(*@"=%BH!'14J`%U4,9"(P;&0B(%9L>"D```````@^P(4E?H
+M_/___X/$$.LP@^P$_W(<_[<D!0``:@3H_/___X/$$.L8@^P$#[="&%#_MR0%
+M``!J`NC\____@\0018GH.$8*#X?@_O__Z7<!``"-=@!F@?OS`7=2#[9T)`N#
+M[`QH$"<``.C\____@\00@'PD"P-V&8L'BX2PT`$``*,`````J0``$`!U(>L7
+MB?:+!XN$L-`!``"C`````*D``!``=0A#9H'[\P%VLX/L"`^V7"034U?H_/__
+M_XD\).C\____B=C!X`0!V(NTASP+``"#Q!"%]@^$ZP```+,`@'\K`'8EC78`
+M#[9&"0^VR]/XJ`%T#X/L!&H`45?H_/___X/$$$,X7RMWW@^V1"0+B<+!X@0!
+MPHV4ES@+``")5AB-1BPY1BQU"(U&.#E&.'1RO0````#&1"0*`(U&+(G".48L
+M="R#[`R)TU+H_/___XUHX(/$$(M3!(E#!(D8B5`$B0*#?0P`=`B)VCE>+'75
+MD(7M=%3&13(`L0"`?RL`=D@/MD8)T_BH`700#[9$)`J(3"A`_D4R_D0D"D$X
+M3RMWX.LF]D8&`70/@^P(5E?H_/___X/$$.L1@^P(:@!6Z/S___^#Q!"-=@"#
+MQ`Q;7E]=PX/L%(M$)!B+$&;'0#(@`%!2Z/S___^#Q!S#B?975E.+="00BPZ+
+M?BBS`(!Y*P!V&P^VTXG0P>`$`="-A($X"P``.?!T!D,X62MWY8#[`W8<#[;#
+MBQ&+A(+0`0``HP````"I```0`'4<ZRZ)]@^VPXL1BX2"T`$``*,`````J0``
+M$`!T%(/L!%</ML-04>C\____@\00ZQ&0@^P(#[;#4%'H_/___X/$$%M>7\.+
+M5"0$BX($"@``BP"C`````(N"!`H``(M`!*,`````BX($"@``BT`(HP````"+
+M@@0*``"+0`RC`````,-55U93@^P,BWPD(,9$)`L`@'\K``^&W08``(GV#[9$
+M)`N-2`BZ`0```(G3T^.%7"0D=0^-2!#3XH54)"0/A*0&``"`?"0+`W8?#[9$
+M)`N+%XN$PH`!``"C`````*D```@`=1_K/8UV``^V1"0+BQ>+A,*``0``HP``
+M``"I```(`'0@5^C\____#[94)`^)T,'@!`'0@8R'8`L`````"`"#Q`2+'XI,
+M)`N`^0-V&P^VP8N$PX`!``"C`````(G"@>(```$`ZQF)]@^VP8N$PX`!``"C
+M`````(G"@>(```$`A=)T08#Y`W80#[;!QX3#@`$``````0#K#@^VP<>$PX`!
+M``````$`A=)T&@^V5"0+B=#!X`0!T(&,AV`+``````$`C78`@'\Y`0^%7@4`
+M`(!\)`L#=A\/MD0D"XL7BX3"@`$``*,`````J`%U(^DE`0``C78`#[9$)`N+
+M%XN$PH`!``"C`````*@!#X0'`0``@^P(#[9$)!.)PL'B!`'"C1R7C8-D"P``
+M4/]W%.C\____@\00@[L\"P```'1[BZL\"P``QD0D"@"`?0H`=F.-=3B#[`Q6
+MZ/S___^)PX/$$(M&!(E>!(DSB4,$B1CV0R0"=3*#>QP`=!V#[`3_<QS_MR0%
+M``!J!>C\____@$LD`H/$$(UV`(/L!%-J!E7H_/___X/$$/Y$)`J*1"0*.$4*
+M=Z"Y(*$'`.LE@^P$:@$/MD0D$U!7Z/S____'!"2@A@$`Z/S___^Y`"TQ`8/$
+M$`^V1"0+B<+!X@0!PHT4EXV"9`L``(F*9`L``,=`"-!&!0"!PC@+``")4`R#
+M[`A0_W<4Z/S___^#Q!"`?"0+`W87#[9$)`N+%XN$PH`!``"C`````.L5B?8/
+MMD0D"XL7BX3"@`$``*,`````@'PD"P-V(@^V1"0+BQ>+A,*``0``HP````"I
+M@````'4BZ8,```"-=@`/MD0D"XL7BX3"@`$``*,`````J8````!T9H!\)`L#
+M=A</MD0D"XL7BX3"A`$``*,`````B</K%0^V1"0+BQ>+A,*$`0``HP````")
+MPX!\)`L#=A</MDPD"XL7B=@-```!`(F$RH0!``#K%0^V3"0+BQ>)V`T```$`
+MB83*A`$``(!\)`L#=B$/MD0D"XL7BX3"@`$``*,`````J0``!`!U)>GB`0``
+MB?8/MD0D"XL7BX3"@`$``*,`````J0``!``/A,(!``"`?"0+`W87#[9$)`N+
+M%XN$PH`!``"C`````(G#ZQ4/MD0D"XL7BX3"@`$``*,`````B<.!RP``!`"`
+M?"0+`W80#[94)`N+!XF<T(`!``#K#@^V5"0+BP>)G-"``0``#[94)`N)T,'@
+M!`'0@[R'/`L```!U7H!\)`L#=A*+!XN$T(`!``"C`````(G#ZQ4/MD0D"XL7
+MBX3"@`$``*,`````B<.`?"0+`W83#[94)`N+!XF<T(`!``#II0(```^V5"0+
+MBP>)G-"``0``Z9("``"-=@`/ME0D"XG0P>`$`="+K(<\"P``@WTH``^$TP``
+M`(M%*`^W4#+VQ@$/A<,```")QO;"`@^$L````(/L"(U`6%#_=Q3H_/___\9$
+M)!L`@\00@'X?`'9N#[9$)`N+7(8\A=MT5(-['`!T&H/L!/]S'/^W)`4``&H%
+MZ/S___^`2R0"@\00@^P$4VH&5>C\____@\00@'M+`'0?D(/L#%?H_/___\<$
+M)`$```#H_/___X/$$(![2P!UXOY$)`N*5"0+.%8?=Y+'1E@@H0<`QT9@M$8%
+M`(EV9(/L"(U&6%#_=Q3H_/___X/$$.L(9H%(,H``B?:`?"0+`W8=#[9$)`N+
+M%XN$PH`!``"C`````/;$`74AZ1`!```/MD0D"XL7BX3"@`$``*,`````]L0!
+M#X3T````@'PD"P-V'`^V1"0+BQ>+A,*``0``HP````"H`70@Z=$````/MD0D
+M"XL7BX3"@`$``*,`````J`$/A;8````/MFPD"XGHP>`$`>B-K(<X"P``@WT$
+M``^$F0```(M=!(E<)`2#[`B-12Q0_W<4Z/S____&1"03`(/$$(!["@!V48G>
+M@\8X@^P,5NC\____B<.#Q!"+1@2)7@2),XE#!(D8@WL<`'0:@^P$_W,<_[<D
+M!0``:@7H_/___X!+)`*#Q!#^1"0#BD0D`XM4)`0X0@IWM,=%+("$'@#'130`
+M````B6TX@^P(C44L4/]W%.C\____@\00D(!\)`L#=AD/MD0D"XL7BX3"@`$`
+M`*,`````B<'K%XGV#[9$)`N+%XN$PH`!``"C`````(G!@'PD"P-V$`^V5"0+
+MBP>)C-"``0``ZPX/ME0D"XL'B8S0@`$``/Y$)`N*7"0+.%\K#X<E^?__@\0,
+M6UY?7<.055=64X/L/(MT)%"+CE@%``"+1"14C;GH%@$`9H%X$(4`=Q</MT`0
+M#[:4,)@$``"-!-+!X`(IT(T\P0^V1S[!X`@#A@0*``"+@$`(``"C`````(G%
+MP>T0P>@8B$0D$`^V1S[!X`@#A@0*``"+@$0(``"C`````(A$)"B-3"0HB<+!
+MZ@B(40'!Z!"(00(/MD<^P>`(`X8$"@``BX!("```HP````"(00.)PL'J"(A1
+M!,'H$(A!!<9!!@#&00<`@^P,_W$$_W0D.`^V1"0D4(GJ#[;:4VA\"```Z/S_
+M__^#Q"#VPP%U&XGIA,ET%8M<)%3&0Q0`N`````#IIP(``(UV`(M$)%2`>!2!
+M=3*-1"0H4`^V1"044(GJ#[;"4/]T)&#H_/___XM,)&3&010"N`````"#Q!#I
+M:P(``(UV`(M<)%2+0R0E____`#WA`0X`=1'&0Q0AN`````#I1P(``(UV`(M$
+M)%3V0&8!=1+WQ0$```!T"H!_(O\/A04"``"#[`A75NC\____@\0(5U;H_/__
+M_XL6BTPD9&:+01YFP>@%#[?`C02%``,``(F"<`$``(L&BUPD9&:+2QZ#X1^Z
+M`0```(G3T^.)F'0!``"+1"1D#[=('HN&K`4``,<$B`````"+7"1D9HM+'HG(
+M9L'H!0^WP(/A'XG3T^.)V??1(8R&L`4``(M$)&1FBT@>B<AFP>@%#[?`@^$?
+MT^+WTB%4AD2#Q`B+3"1<BU$$BP&)4`2)`@^W01Y0C88`"0``4.C\_____D]+
+MBUPD9,9#%(&#Q!"#>U0`=!2#[`B)V(/`5%!6Z/S___^#Q!")]HU'$(G".4<0
+M#X3E````O0$```")1"0,D(/L#%+H_/___XG#BQ9FBT`>9L'H!0^WP(T$A0`#
+M``")@G`!``"+!F:+2QZ#X1^)ZM/BB9!T`0``#[=3'HN&K`4``,<$D`````!F
+MBTL>B<AFP>@%#[?`@^$?B>K3XHG1]]$AC(:P!0``9HM+'HG(9L'H!0^WP(/A
+M'XGJT^*)T??1(4R&1(/$"`^W0QY0C88`"0``4.C\_____D]+@\00@WM4`'00
+M@^P(C4-44%;H_/___X/$$(V6S````(N&S````(E8!(D#B5,$B9[,````BU0D
+M##E7$`^%)?___XM,)%2!863___[_QH>P````!(/L"%%7Z/S___^X`0```(/$
+M$.LCC40D*%`/MD0D%%")ZP^VPU#_="1@Z/S___^#Q!"X`````)"#Q#Q;7E]=
+MPU575E.#["R+?"1$BVPD0(MU`(N&*`H``(E$)!C'1"04`````(M$)$P+1"1(
+M#X3J`@``#[?7C032C02"C01"P>`$BTPD&/9$""$"=!"+AJP%``"+!)#&0!0"
+MZQ&0#[?'BY:L!0``BP2"QD`4(0^WQXN6K`4``(L4@HM")"7___\`/>$!$``/
+MA)T!``"P_V:!>A"%`'<+#[="$(J$,)@$```\_W48#[?'BY:L!0``BP2"QD`4
+M!NG3"```C78`#[;`C13`P>("*<*+AE@%``"-%-")5"04@'PD2P!Y80^V0B"H
+M`G0EJ`1T(:@!=!V+!HN`6`$``*,`````B<*%P'0*BP:)D%@!``")]HL&BX!0
+M`0``HP````")PH/*`HL&B9!0`0``BP:+@`0!``"C`````(G"@,[_BP:)D`0!
+M```/M]>-!-*-!(*-!$+!X`2+7"089O=$&"`""`^$S````,9$)!,`LP"`?BL`
+M=EV-=@`/MD4)#[;+T_BH`71'@/L#=AJ+!HN$B-`!``"C`````*D``!``=1WK
+M*XUV``^VPXL6BX2"T`$``*,`````J0``$`!T$+@!````B-G3X`A$)!.-=@!#
+M.%XK=Z:`?"03`'1;BEPD$SA="752B?AFP>@%#[?`B?F#X1^Z`0```-/BA52&
+M1'4WBT0D%("XL`````)W!\:`L`````.#[`@/M]>+AJP%``#_-)#_="0@Z/S_
+M__^#Q!#I9P<``(UV`/9$)$L!#X19!P``#[?'BY:L!0``BPR"QD$4(8M!)"7_
+M__\`/>$!#@`/A#8'``"+5"04#[9"/L'@"`.&!`H``(N`0`@``*,`````B<?!
+M[Q")Q<'M&`^V0C[!X`@#A@0*``"+@$0(``"C`````(A$)""-7"0@B<+!Z@B(
+M4P'!Z!"(0P*+5"04#[9"/L'@"`.&!`H``(N`2`@``*,`````B$,#B<+!Z@B(
+M4P3!Z!"(0P7&0P8`QD,'`/9!9@%U(XGX#[;0]L(!=!E3B>L/ML-04E'H_/__
+M_X/$$.F'!@``C78`@^P(45;H_/___X/$$.ER!@``B?8/M]>+AJP%``"+!)!F
+M@7@DX0$/A2@!```/MD`F@^@&@_@*#X=(!@``_R2%*!X```^WUXN&K`4``(L,
+MD(T$THT$@HT$0HG#P>,$BWPD&(I$.S.(012+AJP%``"+!)#V0!,$#X0)!@``
+M@'@4``^$_P4``(-X.``/A/4%``"+4#B*1#LSB`+IYP4```^WUXT$THT$@HT$
+M0L'@!(G3BY:L!0``BQ2:BTPD&(I$""J(0A2+AJP%``"+!)B#>#0`#X2O!0``
+M@^P,C03;C02#C01#P>`$#[:$""$$``!0Z/S___^)Q8N&K`4``(L$F(/$$#MH
+M('8#BV@@#[?7BX:L!0``BPR0C032C02"C01"P>`$BUPD&(U$&"B#[`154/]Q
+M-.C\____@\00Z4<%```/M\>+EJP%``"+!(+&0!0`Z3(%``")]@^WUXN&K`4`
+M`(LLD(M%2(E$)`RP_V:!?1"%`'<+#[=%$(J$,)@$```/ML"-%,#!X@(IPHN&
+M6`4``(T4T(E4)!3&@K``````#[9"(*@"#X1-`0``J`0/A$4!``"H`0^$/0$`
+M`,9%%`#V168@#X2_!```@WPD#``/A+0$``"+5"0,]D)=`@^$A@```(-Z6`!T
+M%H/L!/]U(/]U-/]R6.C\____@\00ZVJ#?30`=&2_`````(M,)`R#>6``=`OV
+M05T!=06+>6#K(X/L!&H!_[8D!@``_W0D&(M<)!S_4V2#Q!"%P'0&B[XD!@``
+M@WT@`'0ABUTT@^P$_S=3_W<(Z/S___\#'X/$$(U'!(/'$(,X`'3BBWPD%`^V
+M1S[!X`@#A@0*``"+@$`(``"C`````(G"P>H0BTPD#(A14\'H&&:)04@/MD<^
+MP>`(`X8$"@``BY!$"```B14`````9@^VPF:)04P/ML9FB4%.B=#!Z!!F#[;`
+M9HE!4,'J&(A14@^V1S[!X`@#A@0*``"+@$P(``"C`````&8/ML!FB4%*Z9$#
+M``"0#[?7C032C02"C01"B<'!X02+7"08BD09,X3`#X6G````BX:L!0``BP20
+MQD`4`/9%9A`/A%@#``"#?"0,``^$30,``(I$&3.+?"0,B$=*BD==J`(/A#<#
+M``"_`````(M4)`R#>F``=`FH`74%BWI@ZR.#[`1J`?^V)`8``/]T)!B+3"0<
+M_U%D@\00A<!T!HN^)`8``(-](``/A/("``"+732-=@"#[`3_-U/_=PCH_/__
+M_P,?@\00C4<$@\<0@S@`=.+IR0(``)`\`@^%>`(```^WWXT$VXT$@XT$0\'@
+M!(M4)!B-1!!`B40D"(H8@^-_QD0D!P#&1"0&`,9$)`4`#[?7C032C02"C01"
+MP>`$BTPD&(M$"#B)1"0<C4PD'`^V5"0<P>(8#[9!`<'@$`G"#[9!`L'@"`G"
+M#[9!`PG"B10D@/MQ=C>#^@%V#HM$)`B*6`&#XP^(7"0'@SPD`G8+BU0D"(I2
+M`HA4)`:#/"0#=ER+3"0(BDD#B$PD!>M/@SPD`G8.BT0D"(I8`H/C#XA<)`>#
+M/"0'=C6+5"0(#[9"!X/`"#D$)'8#B00D@SPD#'8+BTPD"(I)#(A,)`:#/"0-
+M=@N+7"0(BEL-B%PD!0^WUXN&K`4``(L$D(!X'`!T78,\)`!T5\9`%""+AJP%
+M``"+!)"*%"0X4!QS!P^V0!R)!"0/M]>+AJP%``"+#)"#>3@`=#F-!-*-!(*-
+M!$+!X`2+7"08C4080(/L!/]T)`10_W$XZ/S___^#Q!#K$`^WQXN6K`4``(L$
+M@L9`%"*`?"0'!'40#[?'BY:L!0``BP2"QD`4`CEU&`^$)0$``(-\)`P`#X0:
+M`0``]D5F$'1A#[?'C13`C120C110P>($BTPD&(I$"C.+7"0,B$-*]D-=`G0]
+MB@0D.$4<<P.*11R$P'0N#[;(#[?7C032C02"C01"P>`$BUPD&(U$&$"#[`11
+M4(M\)!C_=U3H_/___X/$$`^V1"0'@_@+=U7_)(54'@``BT0D#,9`7@'IE0``
+M`(!\)`8$=1*`?"0%`G4+BU0D#,9"7A'K?9"+3"0,QD%>`NMRBUPD#,9#7A#K
+M:(M\)`S&1UX+ZUZ+1"0,QD!>!NM4BU0D#,9"7@WK2HGV/"AU'8M,)!2*04M(
+MB$%*#[?7BX:L!0``BP20QD`4@>LG/`AU$(/L#&@0)P``Z/S___^#Q!`/M\>+
+MEJP%``"+!(+&0!0AC78`@\0L6UY?7<-64X/L!(MT)!")\XL&BX!0`0``HP``
+M``")PHL&B9!0`0``B?;WP@#__P!T$(/L"%)6Z(KK__^#Q!"-=@"+`XN`4`$`
+M`*,`````B<*+`XF04`$``/?"`/__`'7)N`````"#Q`1;7L.)]E575E.#["R+
+M?"1`9HN',@L``&:)1"0BBP>+@$`!``"C`````"7_#P``9HF',@L``+@`````
+M9HM4)")F.9<R"P``#X3S!@``9H&_,@L``/\/#X1\!@``9HM,)")F.8\R"P``
+M#X1J!@``C;?4````B70D%(GVBZ\H"@``9O]$)")FBT0D(F8YAS8+``!W!V;'
+M1"0B```/MU0D(HN'<`H``(M<D`3WPP``"``/A+4```"+!XN`4`$``*,`````
+MB<.+!XF84`$``,=$)"0`````]\,`__\`=%:Z`````(!_*P!T2[T!````9@^V
+M3RMFB4PD#@^WPHU("(GNT^:%\W4+C4@0B>C3X(7#=!L/M]*-!%+!X`,IT(V$
+MAR@!``")1"0DZPN-=@!"9CE4)`YWQ(-\)"0`=16#[`S_="1,Z/S___^#Q!#I
+M>04``)"#[`S_="1,Z/S___^+5"0TB$(+@\00Z5T%``"0B=Z!YO\/```/M\:-
+M%,"-%)"-%%#!X@2)T8M4*B"+3"DDB50D&(E,)!R+EZP%``"++(*%[0^$(@4`
+M`/?#```@``^$=@$``(!]%($/A5`!``#&110A#[=5'HN'K`4``,<$D`````!F
+MBTT>B<AFP>@%#[?`@^$?O@$```#3YHGQ]]$AC(>P!0``9HM-'HG(9L'H!0^W
+MP(/A'[H!````T^*)T??1(4R'1(/L"`^W11Y0C8<`"0``4.C\____@\00@WU4
+M`'00@^P(C4544%?H_/___X/$$&:!?1"%``^'P0````^W11"`O#B8!```_P^$
+MKP```&:#?1!_=R4/MI0XF`0``(N/6`4``(T$TL'@`BG0BT3!*(!X!/]U6NF#
+M````9H%]$($`=RL/MT40#[:$.)@$``"+CY`%``"-!$"-!,")PL'B!2G"BT21
+M"(!X!/]U).M0#[=%$`^VA#B8!```BY=T!0``C01`C02`BT3"5(!X!/]T+H/L
+M"%57Z/S___^#Q!"-E\P```"+A\P```"):`2)10")502)K\P```#IO0,``)"-
+M10B+3"04BU$$B4$$B4T(B5`$B0+IH@,``(GVB?!FP>@%#[?`B?&#X1^Z`0``
+M`-/BA52'1`^%@0,```^WUHN'K`4``(L$D&:!>!"%``^'H0````^W4!"`O#J8
+M!```_P^$CP```&:#>!!_=Q\/MI0ZF`0``(N/6`4``(T$TL'@`BG0BT3!*(I0
+M!.MK#[?6BX>L!0``BP209H%X$($`=R@/MT`0#[:$.)@$``"+CY`%``"-!$"-
+M!,")PL'B!2G"BT21"(I0!.LO#[?6BX>L!0``BP20#[=`$`^VA#B8!```BY=T
+M!0``C01`C02`BT3"5(I0!.L"LO^`^O]T#0^VPH"\.!X%``#_=4*)\&;!Z`4/
+MM\")\8/A'[X!````T^:%=(=$#X65`@``QD44!H/L"&H`5>C\____@\0,:@!5
+M5^C\____@\00Z7("```/ML(/MH0X'@4``(E$)"2-!$#!X`,K1"0DC82'*`$`
+M`(E$)"2+1"0<"T0D&'0(]\,```(`=1#'1"08`````,=$)!P`````BU0D)/9"
+M!@(/A&0!``#_="0<_W0D'`^WQE!2Z/S___^)\&;!Z`4/M\")\8/A'[L!````
+MB=K3XH/$$(54AT0/A>@!``"`?12!#X6%````#[=5'HN'K`4``,<$D`````!F
+MBTT>B<AFP>@%#[?`@^$?T^.)V??1(8R'L`4``(/L"`^W11Y0C8<`"0``4.C\
+M____@\0(55?H_/___X/$$(-]5`!T$(/L"(U%5%!7Z/S___^#Q!"-E\P```"+
+MA\P```"):`2)10")502)K\P```#I60$``,9$)"$`QD0D(`"+A]0````Y1"04
+M=!"-E]0```#^1"0ABP`YPG7V@'PD(0!T,8V?U````(/L#%/H_/___XU(^(/$
+M$(M3!(E#!(D8B5`$B0(YZ74%QD0D(`'^3"0A==6`?"0@``^%\````(U%"(M,
+M)!2+402)002)30B)4`2)`HGP9L'H!0^WP(GQ@^$?O@$```#3Y@FTAX0```#I
+MN@```/]T)!S_="0<#[?&4/]T)##H_/___\9$)#$`QD0D,`"+A]0```"#Q!`Y
+M1"04=!*-E]0```")]OY$)"&+`#G"=?:`?"0A`'0UC9_4````D(/L#%/H_/__
+M_XU(^(/$$(M3!(E#!(D8B5`$B0(YZ74(QD0D(`&-=@#^3"0A==*`?"0@`'4W
+M@'T4@70QC44(BTPD%(M1!(E!!(E-"(E0!(D"B?!FP>@%#[?`B?&#X1^^`0``
+M`-/F";2'A````&:+1"0B9CF',@L```^%HOG__XV'U````(G".8?4````=$>)
+M]H/L#(G64NC\____@^@(9HM('HG+9L'K!0^WVX/A'[K^____T\(AE)^$````
+M@\0,:@!05^C\____@\00B?(YM]0```!UNX/L#%?H_/___[@!````@\00@\0L
+M6UY?7<.)]E=64X/L$(M<)"!FQT0D#@``BYLD!0``O@````"-?"0.BP.+@%`!
+M``"C`````(L3B8)0`0``A<!T&XL#QX!0`0```0```(/L#%/H_/___X@$-X/$
+M$('#8`P``$:#_@%^P(!\)`X`=0RX`````(!\)`\`=`6X`0```(/$$%M>7\.0
+M55=64X/L#(ML)""Y`````&8/MD4KB<-F@_@`=AF+1"0D#[90"8UV`(G0T_BH
+M`74&068YRW?RBU0D)(-Z*`!T)8/L"(M"*(/`6%#_=13H_/___X/$"(M,)"S_
+M<2A5Z/S___^#Q!"+1"0D@\`XB<*+3"0D.4$X#X17`0``B40D")"#[`Q2Z/S_
+M__^)QH/$$(-X'``/A!4!``"`>$L`#X2'````OP````!F@WU``'1[B?:+A:P%
+M``"+'+B%VW1C9HM#$&8[1AAU668]A0!W4P^WP("\*)@$``#_=$:+50!FBT,>
+M9L'H!0^WP(T$A0`#``")@G`!``"+50!FBTL>@^$?N`$```#3X(F"=`$``,9#
+M%"&#[`1J`%-5Z/S___^#Q!"01P^W14`Y^'^'BT8<QT!@`````/9&)`1U)_Z%
+M5PP``(/L#%7H_/___X/$#&H!BT8<#[9``5!5Z/S___^#Q!")]H/L!(M&'`^V
+M0`)0BT8<#[9``5!H+`(``.C\____@\0,_W8<_[4D!0``:@'H_/___X/$#/]V
+M'/^U)`4``&H&Z/S____'1AP`````@\00BT0D)/Y("H/L"%95Z/S___^#Q!"+
+M5"0(BTPD)#E1.`^%KO[__XM$)"3'0"@`````BT4`BXA8`0``B0T`````A<ET
+M"8M%`(F(6`$``(/$#%M>7UW#C78`5U93BW0D$(M\)!2S`(!^*P!V%0^V5PF0
+MB="(V=/XJ`%U!D,X7BMW\/9'"`)U"(U'.#E'.'5F@^P,5^C\____@\00A,!T
+M1(/L#%;H_/___XG!@\00A<!T1(U'.(M0!(E(!(D!B5$$B0K^1PJ)>2C&02`%
+MQD$A`,9!20]J`6H!45?H_/___X/$$.L2@^P(#[;#4%;H_/___X/$$(GV6UY?
+MPU575E.#[!"+;"0HBWU4#[9%*U#_="0H5^C\____B<9F@TTR$+L`````@\00
+MBU0D(&8/MD(K9HE$)`IF@_@`=A8/ME<)B="(V=/XJ`%U"$-F.5PD"G?N9H/[
+M`W8@#[?#BTPD((L1BX2"T`$``*,`````J0``$`!U..L>B?8/M\.+3"0@BQ&+
+MA(+0`0``HP````"I```0`'48@^P(#[;#4/]T)"SH_/___X/$$.F8`0``C4<X
+M.4<X#X2,`0``A?8/A(0!```/MD9)QT2%/`````"+5@2+!HE0!(D"@^P$5FH&
+M5^C\____@\00@'Y+`'0BD(/L#/]T)"SH_/___\<$)`$```#H_/___X/$$(!^
+M2P!UWX-^'`!T7HM&',=`8`````#V1B0$=1:+1"0@_H!7#```@^P,4.C\____
+M@\00@^P$_W8<BU0D*/^R)`4``&H!Z/S___^#Q`S_=AR+3"0H_[$D!0``:@;H
+M_/___\=&'`````"#Q!#^3PJ#[`A6_W0D+.C\____BU0D,(L"BY!8`0``B14`
+M````@\00A=)T#(M,)""+`8F06`$``,9%)@!F@V4R[[L`````@'T?`'0=9@^V
+M51^0#[?#BW2%/(7V=`:`?B+_=7-#9CG:=^GV13*`=!*#[`A5_W0D+.C\____
+M@\00ZU6[`````(!]'P!T/8GV#[?#BW2%/(7V="7V1B0"=!^#[`3_=AR+1"0H
+M_[`D!0``:@;H_/___X!F)/V#Q!"00V8/MD4?9CG8=\5FQT4R`@"`92W]C78`
+M@\0,6UY?7<-64X/L!(M<)!"+="04BT94L0"`>RL`=A(/ME`)B=#3^*@!=09!
+M.$LK=_+&1B8,@^P(5E/H_/___X/$%%M>PXGV5U93@^P0BWPD((I$)"2(1"0/
+MNP`````/MO")]H/L#&@0)P``Z/S___^#Q!"`?"0/`W89BP>+A+#0`0``HP``
+M``"I```0`'4AZQ>)]HL'BX2PT`$``*,`````J0``$`!U"$-F@?OS`7:S@^P(
+M#[9<)!=35^C\____B3PDZ/S___^)V,'@!`'8C02'@\00]H!8"P```702@^P(
+M_[`\"P``5^C\____@\00@\006UY?PY!55U93@^P,BW0D((L^#[=4)"2+AZP%
+M``"+')"]`````,=$)`@`````9H%[).$!=2B*0R:#Z!$\`7<>BT8HB40D"(M$
+M)"P+1"0H=4F+1"0(QD`U`.L_C78`BX]8!0``C:GH%@$`9H%[$(4`=Q</MT,0
+M#[:4.)@$``"-!-+!X`(IT(TLP8M$)"P+1"0H=0?&A;``````@'L4@74&@&8(
+M]XGVBT0D+`M$)"@/A<H```#&0Q0`]D-F(`^$W`$``(MS2(7V#X31`0``]D9=
+M`G0C@WY8`'0=@WLT`'07@^P$_W,@_W,T_W98Z/S___^#Q!"-=@`/MD4^P>`(
+M`X<$"@``BX!`"```HP````")PL'J$(A64\'H&&:)1D@/MD4^P>`(`X<$"@``
+MBY!$"```B14`````9@^VPF:)1DP/ML9FB49.B=#!Z!!F#[;`9HE&4,'J&(A6
+M4@^V13[!X`@#AP0*``"+@$P(``"C`````&8/ML!FB49*Z2$!``"0@'L4@'4&
+MQD,4(8GV@^P$_W0D,/]T)#!HR`@``.C\____@\009H%[).$!=2"*0R:#Z!$\
+M`7<6@^P,_W0D%.C\____@\00Z=8```")]O9$)"L!=&F+0R0E____`#WA`0X`
+M=%H/MD4^P>`(`X<$"@``BX!`"```HP`````/MD4^P>`(`X<$"@``BX!$"```
+MHP`````/MD4^P>`(`X<$"@``BX!("```HP````"#[`A35^C\____@\00ZV>-
+M=@"`?"0K`'D=BP>+@%@!``"C`````(G!A<!T2HL'B8A8`0``ZT"`?"0H`'@Y
+M@'PD+P!Y,HL79HM#'F;!Z`4/M\"-!(4``P``B8)P`0``BQ=FBTL>@^$?N`$`
+M``#3X(F"=`$``(GV@\0,6UY?7<-75E.#[!"+7"0DBWPD((I#%(A$)`^+CU@%
+M``"-L>@6`0!F@7L0A0!W%P^W0Q`/MI0XF`0``(T$TL'@`BG0C33!@'PD#P!U
+M)6;'AI```````(![)!QU%H![)@)U$(/L"%-6Z/S___^#Q!"-=@"#>U``=!*#
+M[`B-0U!05^C\____@\00B?:#[`A35^C\____@\00@'PD#P9T.X/L"(V>``$`
+M`%/_=Q3H_/___\>&``$``("$'@#'A@@!````````B;8,`0``@\0(4_]W%.C\
+M____@\00@\006UY?PXGV55=64X/L#(M\)""%_P^$P````(M'*(LH@^P,5>C\
+M____B<.-0#R)1"08@\00A=L/A)X```"#[`Q5Z/S___^)QH/$$(7`=1&#[`A3
+M5>C\____@\00ZWV)]L9#%:QFBT<89HE#$(EK&,=#9`@```")<U"+1@B)0S3'
+M0R``"```C8>T````B4,XQD,<(,=#;`````#&0R0<QD,E`<9#)@+&0R<(QD,H
+M`(/L"&H`_W0D%.C\_____W,@_W80_W8,_W0D).C\____@\084U7H_/___X/$
+M$(/$#%M>7UW#D%575E.#[`R+;"0@BWPD)(I$)"B(1"0+BT4HBS#&1"0*`(UV
+M``^V1"0*BI0PF`0``(#Z_W13@^P$:@B-1PQ0#[;2C032P>`"*="-',4`````
+MB=@#AE@%```%G````%#H_/___X/$$(3`=!Z+AE@%``"*5"0+B)0#U@```(N&
+M6`4``(FL`^````#^1"0*>9:#Q`Q;7E]=PXGV55=64X/L#(M,)"2+032)1"0(
+M#[9``HG%P>4(BU0D"&8/MD(#`<4/M_6-5@0/MT$@.<(/C]````"+7"0(@\,(
+MQD0D!P"+5"0(C406!#G8#X:C````B@.$P'A^@^`//`9U=_9#`\!T!O9#!<!U
+M:_8#$'0PC7,(OP````"`>P0`=EB#[`0/MD,#4%;_="0LZ/S___^#QAR#Q!!'
+MB?@X0P1WX.LVC7,$OP````"`>P(`=B@/ME0D!XD4)(/L!/]T)`16_W0D+.C\
+M____@\8<@\001XGX.$,"=^&0_D0D!P^V0P&-7`,"#[?%BU0D"(U$$`0YV`^'
+M7?___X/L"&H!_W0D+.C\____@\00@\0,6UY?7<-55U93@^P$BVPD&`^V?"0<
+MBD0D)(A$)`.+12B+,+,`B?D#3"0@B$PD`HUV``^VPXJ$,)@$```\_W1*#[;0
+MBXY8!0``C032P>`"*="-%,4`````B?@XA`K6````=2<YK`K@````=1Z*1"0"
+MB(0*U0```(N&6`4``(I,)`.(C`+4````B?;^PWFD@\0$6UY?7<-64XMT)!B*
+M7"00BE0D%(M$)`R+2"R`N9````!/=RT/MH&0````C02`C103B)3!E0````^V
+M@9````"-!(")\HB4P90```#^@9````!;7L.)]E575E.#[`R+3"0DBUDT#[9#
+M`L'@"&8/ME,#`=`/M\"#P`0/MU$@.=`/C_(```"-4PC&1"0+`+T`````BDL!
+MB?:*0@(`1"0+#[9"`XU4`@1%B>@XP7/JB=;&1"0*`+T`````B>HZ5"0+#X.6
+M````B?:*1@$`1"0*@#X!=`6`/A=U,XI<)`HJ7@$Z7"0*<V:-10$/MO@/M@90
+M5P^VPU#_="0LZ/S___^#Q!!#.EPD"G+DZT*)]HM4)""+0BR`N)$````!=#"*
+M7"0**EX!.EPD"G,CC44!#[;XD`^V!E!7#[;#4/]T)"SH_/___X/$$$,Z7"0*
+M<N2#Q@1%B>@Z1"0+#X)L____BU0D((M"+,:`D0````&#[`AJ!U+H_/___X/$
+M$(/$#%M>7UW#55=64X/L+(MT)$"+;"1$L_^)Y_RY!0```+@`````\ZMF.>ES
+M1HUV`&:#^0YW"0^WT8H$,H@$%`^WP8H$,(/H,#P)=QR`^_]U`[,`D`^VPXT$
+M@`^WT8H4,HU<0M#K!XGV@/O_=09!9CGI<KT/ML.#Q"Q;7E]=PXGV5U93@^P$
+MBWPD%(I$)!B(1"0#BE0D'(A4)`*+1RB+,+,`C78`#[;#BH0PF`0``#S_=#H/
+MMM"+CE@%``"-!-+!X`(IT,'@`SF\".````!U'8I4)`,XE`C5````=1"*5"0"
+MB)0(UP```.L'C78`_L-YM(/$!%M>7\.055=64X/L#(ML)"2*1"0HB$0D"XM$
+M)""+<"R[`````(U]!(GVC02;C83&D````(!X!`%V-(!X!!=T+HI4)`LX4`5U
+M)8I5`X#Z('8"LB"-!)N-A,:<````#[;2@^P$4E=0Z/S___^#Q!!#@_M/?K:#
+MQ`Q;7E]=PXGV55=64X/L#(M,)"3&1"0&`(MI-`^V10+!X`AFB40D"F8/MD4#
+M9@%$)`H/MUPD"HU3!`^W02`YP@^/"@$``(UU",9$)`<`C40K!#GP#X;E````
+MC78`#[9&`L'@"&8/ME8#`<)FB50D"`^WVE.-1@10Z/S___^#Q`@\_W5MQD0D
+M!O^-7#,$#[=$)`J-1"@$.=AV<8UV``^V0P+!X`AF#[93`XT\`@^WQU"-0P10
+MZ/S___^#Q`@\_W41@'PD!O]U1,9$)`8`ZSV-=@`Z1"0&<P2(1"0&#[?'C5P#
+M!`^W1"0*C40H!#G8=Z[K&BI$)`8/ML!0#[9$)`M0_W0D*.C\____@\0,@^P$
+M#[9$)`M05O]T)"SH_/____Y$)!</MT0D&(UT!@2#Q!`/MT0D"HU$*`0Y\`^'
+M'O___X/L"&H"_W0D+.C\____@\00@\0,6UY?7<.05E.#[`2+="00BTPD%(M9
+M-`^V0P+!X`AF#[93`P'0#[?`C5`$#[=!(#G"?R"#[`124_^VY````.C\____
+M@\0(:@!6Z/S___^#Q!")]H/$!%M>PXGV55=64X/L#(ML)""+1"0DBD`4B$0D
+M!XM4)"1F@7H0A0`/AZ8````/MT(0@+PHF`0``/\/A)0```!F@WH0?W<E#[:4
+M*)@$``"+C5@%``"-!-+!X`(IT(M$P2@/MD`$!1`%``#K;8M$)"1F@7@0@0!W
+M+@^W0!`/MH0HF`0``(N-D`4``(T$0(T$P(G"P>(%*<*+1)$(#[9`!`40!0``
+MZS.+5"0D#[="$`^VA"B8!```BY5T!0``C01`C02`BT3"5`^V0`0%$`4``.L(
+MC78`N`\&```/MD0%#HE$)`B-!$#!X`,K1"0(C82%*`$``(E$)`B+C5@%``"+
+M1"0DC;'H%@$`9H%X$(4`=Q</MT`0#[:4*)@$``"-!-+!X`(IT(TTP8!\)`<`
+M#X4_`@``9L>&D```````BU0D)(!Z)!P/A2@"```/MD(F@_@"=%R#^`)_"H/X
+M`70HZ1`"``"#^`=T,X/X"@^%`@(``(/L"/]T)"Q6Z/S___^#Q!#I[0$``(/L
+M"/]T)"Q6Z/S___^#Q!#IV`$``(/L"/]T)"Q6Z/S___^#Q!#IPP$``(/L"/]T
+M)"Q6Z/S___^#Q`B-G@`!``!3BT8HBP#_<!3H_/___\>&``$``("$'@#'A@@!
+M````````B;8,`0``@\0(4XM&*(L`_W`4Z/S___^#Q!"0QD8B_[\`````BT0D
+M"(!X"@`/AJD```")PX/#.(/L#%/H_/___XG&@\00BT,$B7,$B1Z)1@2),(!^
+M(O]T:X!^(0!U;8"^L0`````/A"`!```/MD8@J`)T#*@$=`BH`0^%Y@````^V
+M1B"H`G4,J`1T"*@!#X7I````#[9&(*@"#X3L````J`0/A.0```"H`0^%W```
+M`(/L"%95Z/S___^#Q!#IR@```(GVQH:Q`````)!'B?J+1"0(.%`*#X=<____
+MB?J+1"0(.%`*=5V_`````(!X"@!V4HG#@\,XD(/L#%/H_/___XG&@\00BT,$
+MB7,$B1Z)1@2),(!^(O]T'X!^(2)T!H!^(0UU$X/L"&H*5NC\____@\00ZU>-
+M=@!'B?J+1"0(.%`*=[2+5"0(QD(%_X/L"%)5Z/S___^#Q!"`?"0'``^%D```
+M`.LF5@^V1DE0_W8L_W0D%.C\____@\00ZP^#[`A65>C\____@\00B?:+1"0D
+M@WA0`'06@^P(BT0D+(/`4%!5Z/S___^#Q!")]H/L"/]T)"Q5Z/S___^#Q!"`
+M?"0'`'0Q9O^&D````&:#OI`````*=A!FQX:0``````#I.O[__XGV@^P(:@I6
+MZ/S___^#Q!")]H/$#%M>7UW#55=64X/L&(ML)"R*1"0PB$0D%XM%*(LX5^C\
+M____B<.-0#R)1"04@\00A=L/A*````"#[`Q7Z/S___^)QH/$$(7`=1"#[`A3
+M5^C\____@\00ZW^0QD,5K&:+11AFB4,0B7L8QT-D"````(ES4(M&"(E#-,=#
+M(``(``"-A;0```")0SC&0QP@QT-L`````,9#)!S&0R4!BD0D"XA#)L9#)PC&
+M0R@`@^P(:@#_="00Z/S_____<R#_=A#_=@S_="0@Z/S___^#Q!A35^C\____
+M@\00@\0,6UY?7<.)]E575E.#[`R+;"0@BT4HBS"+E>0````/MD("B</!XPAF
+M#[9"`P'##[?#@\`$/0`(```/C]T```"#[`Q6Z/S___^)QX/$$(7`#X3'````
+M@^P,5NC\____B40D&(/$$(7`=1.#[`A75NC\____@\00Z:$```"0C4<\B40D
+M!`^WVX/#!(/L!%/_M>0```"+5"04_W((Z/S____&1Q6L9HM%&&:)1Q")=QB)
+M7R"#3V02BU0D&(M""(E'-(E74(V%M````(E'.,9''"#'1VP`````QD<D'<9'
+M)1#&1R8"#[;'B$<GB%\H@\0(:@#_="00Z/S_____=R"+1"0<_W`0_W`,_W0D
+M(.C\____@\085U;H_/___X/$$(/$#%M>7UW#55=64X/L!(M\)!B*1"0<B$0D
+M`XI4)"2(5"0"BT<HBS"+;RS&1"0!``^V1"0!BHPPF`0``(#Y_W1C#[;1BYY8
+M!0``C032P>`"*=#!X`,YO!C@````=4:*5"0#.)08U0```'4Y@'PD`@!T#XN$
+M&-P```"+3"0@B0'K*0^VT8N.6`4``(T$TL'@`BG0BUPD((L3B93!W````.L)
+MC78`_D0D`7F&QD0D`0"0#[9$)`&-!("-5,4`C8*0````@'@$`78\@'@$%W0V
+MBDPD`SA(!74M@'PD`@!T#HN"F````(M<)"")`^LC#[9$)`&-!("+3"0@BQ&)
+ME,68````ZPR0_D0D`8!\)`%/=J&#Q`1;7E]=PY!55U93@^P(BVPD'(I$)""(
+M1"0#BYWD````#[9#`HG&P>8(9@^V0P,!Q@^WQH/`!#T`"```?V:`?"0#`'0+
+MBH78````B$,!ZPF*0P&(A=@```"-0PB)1"0$OP`````/M\:-1!@$.T0D!'8R
+MB?8/MD0D`U"-1"0(4(GZ#[;"4%7H_/___T>#1"04!(/$$`^WQHU$&`0[1"0$
+M=].-=@"#Q`A;7E]=PU.#[`B+7"00BE0D%(I$)!B(1"0#QT0D!`````"`>R,!
+M=$IJ`8U$)`A0#[;"4%/H_/___X/$$(-\)`0`="^+1"0$@`B`@'PD`P!T#8M$
+M)`2`2`,@ZPN-=@"+1"0$@&`#WX/L#%/H_/___X/$$(/$"%O#C78`5U93BUPD
+M%(M\)!"+<TAF@7L0A0`/AXH````/MT,0@+PXF`0``/]T?&:#>Q!_=R$/MI0X
+MF`0``(N/6`4``(T$TL'@`BG0BT3!*(I0!.M8B?9F@7L0@0!W*`^W0Q`/MH0X
+MF`0``(N/D`4``(T$0(T$P(G"P>(%*<*+1)$(BE`$ZR8/MT,0#[:$.)@$``"+
+MEW0%``"-!$"-!("+1,)4BE`$ZP6-=@"R_['_9H%[$(4`=PL/MT,0BHPXF`0`
+M`(#Z_W08#[;"@+PX'@4``/]T"X#Y_W0&@'L4!G4T@WM0`'02@^P(C4-04%?H
+M_/___X/$$(GV@^P(4U?H_/___\=&+/____^)-"3_5BB#Q!#K?(![%`!U._9#
+M9`AT%(/L!/]S(/]S-/]V'.C\____@\00QT8L`````(-^(`!T"(M6((M&%(D"
+M@^P,5O]6*(/$$.L3QT8L_____X/L#%;_5BB#Q!")]H-[4`!T$H/L"(U#4%!7
+MZ/S___^#Q!")]H/L"%-7Z/S___^#Q!"-=@!;7E_#55=64X/L&(ML)"R*1"0P
+MB$0D%XM%*(LX5^C\____B<.-4#R)5"04@\00A<`/A-4```"#[`Q7Z/S___^)
+MQH/$$(7`=12#[`A35^C\____@\00Z;$```")]L9#%:QFBT489HE#$(M$)#")
+M0TB)>QC'0V0(````B7-0BT8(B4,TBT0D+(E#((V%M````(E#.,9#'"#'0VP`
+M````QD,D/,9#)0**5"0+B%,FBT0D*,'H$(A#)XM4)"@/ML:(0RB(4RF+1"0L
+MP>@0B$,JBU0D+`^VQHA#*XA3+,9#+0"#[`AJ`/]T)!#H_/____]S(/]V$/]V
+M#/]T)"#H_/___X/$&%-7Z/S___^#Q!"#Q`Q;7E]=PY!55U93@^P8BUPD+(I$
+M)#"(1"07BT,HBRA5Z/S___^)QH/$$(7`#X3M````@^P,5>C\____B<>#Q!"%
+MP'43@^P(5E7H_/___X/$$.G)````D(U6/(E4)`2#[`3_="0P_[/D````_W`(
+MZ/S____&1A6L9HM#&&:)1A"+1"1`B49(B6X8BT0D/(E&((-.9!*+1PB)1C2)
+M?E"-@[0```")1CC&1AP@QT9L`````,9&)#O&1B4"BE0D&XA6)HM$)#C!Z!"(
+M1B>+5"0X#[;&B$8HB%8IBT0D/,'H$(A&*HM4)#P/ML:(1BN(5BS&1BT`@\0(
+M:@#_="00Z/S_____=B#_=Q#_=PS_="0@Z/S___^#Q!A65>C\____@\00@\0,
+M6UY?7<-75E.+7"00BW0D%(M,)!B+?"0<BU0D((7;=`V%]G0)A<ET!87_=0F0
+MN`````#K.9!F@?J%`'<-#[?"@+P8F`0``/]U"+@`````ZQV0QD$DX<9!)0'&
+M02839HE1$(EQ&(EY;+@!````D%M>7\.+3"0$BT$$BT`$HP````")PH!\)`@`
+M=`B!R@``#`#K!H'B___S_XM!!(D0BT$$B5`,BT$$B5`0BT$$B5`4BT$$B5`8
+MBT$$B5`$PY"05E.+7"00BTPD,(MT)#@/MT0D##T1)P``?RX]$"<``'UC/2(A
+M``!T7#TB(0``?PD]("$``'1.ZU8]0"$``'1%/40A``!T/NM&/8`G``!T-3V`
+M)P``?PXM("<``(/X`G<NZR*)]CV`D0``=!D]@)$``'\)/8(G``!T"^L3/8"4
+M``!U#(GVQ@-`BT0D%,8``HM$)!C&``2*$XM$)"R($&;'`8``9L<&``"+1"0@
+MQ@`@BT0D)&;'```!BA.+1"0HB!!F#[8#9@,!9@,&BU0D-&:)`HM4)!QFB0)F
+MBQ&+1"0\9HD09HL1@\(+BT0D0&:)$%M>PXUV`%575E.#[`R*1"0DB$0D"XM4
+M)""+.KL`````9H-_0``/AGH"``"-=@")V&;!Z`4/M\")V8/A'[H!````T^*%
+ME(>$````#X5*`@``#[?3BX>L!0``BS20A?8/A#8"``"]`````(M&)"7___\`
+M/>$!$``/A;(```"#?"0H``^%$P(``&:!?A"%``^'D@````^W1A"`O#B8!```
+M_P^$@````&:#?A!_=R(/MI0XF`0``(N/6`4``(T$TL'@`BG0BT3!*(I(!.DX
+M`0``9H%^$($`=RL/MT80#[:$.)@$``"+CY`%``"-!$"-!,")PL'B!2G"BT21
+M"(I(!.D%`0``#[=&$`^VA#B8!```BY=T!0``C01`C02`BT3"5(I(!.GA````
+ML?_IV@```(GV9H%^$(4`#X>(````#[=&$("\.)@$``#_='IF@WX0?W<?#[:4
+M.)@$``"+CU@%``"-!-+!X`(IT(M$P2B*2`3K5F:!?A"!`'<H#[=&$`^VA#B8
+M!```BX^0!0``C01`C03`B<+!X@4IPHM$D0B*2`3K)@^W1A`/MH0XF`0``(N7
+M=`4``(T$0(T$@(M$PE2*2`3K!8UV`+'_9H%^$(4`=SH/MT80@+PXF`0``/]T
+M+(NO6`4``&:!?A"%`'<6#[:4.)@$``"-!-+!X`(IT(ULQ0#K"('%Z!8!`(GV
+MBT0D(#A(!`^%AP```(-\)"@`=`Z+5"0H9HM"&&8[1A!U<H!\)`L&=$^+5B2!
+MXO___P"!^N$!$`!T/@^V12"H`G0VJ`1T,J@!=2Z`O;``````=26!^N$!#P!T
+M.8I$)`N(1A2#[`1J`5;_="0LZ/S___^#Q!#K'HGVBE0D"XA6%(/L"`^WPU#_
+M="0LZ/S___^#Q!")]D-F.5]`#X>)_?__@'PD"X$/A&(!``"]`````(N7S```
+M`(V'S````#G0=`B018L2.=!U^6:%[0^$/`$``(V'S````(G".8?,````#X0H
+M`0``B40D!(/L#(G34NC\____B<:#Q!"#?"0H`'0ABU0D*&:+0AAF.T80=!.+
+M0P2)<P2)'HE&!(DP3>G5````9H%^$(4`#X>%````#[=&$("\.)@$``#_='=F
+M@WX0?W<?#[:4.)@$``"+CU@%``"-!-+!X`(IT(M$P2B*2`3K4V:!?A"!`'<H
+M#[=&$`^VA#B8!```BX^0!0``C01`C03`B<+!X@4IPHM$D0B*2`3K(P^W1A`/
+MMH0XF`0``(N7=`4``(T$0(T$@(M$PE2*2`3K`K'_BT0D(#A(!'4EBT8D)?__
+M_P`]X0$/`'06BE0D"XA6%(/L"%97Z/S___^#Q!#K$XV'S````(M0!(EP!(D&
+MB58$B3)-9H7M=!*+5"0$.9?,````#X7>_O__B?:#Q`Q;7E]=PU=64X/L!(MT
+M)!2*1"08B$0D`[\`````9H-^0``/A@$!``")]@^WUXN&K`4``(L<D(7;#X3@
+M````9H%[$(4`#X>(````#[=#$("\,)@$``#_='IF@WL0?W<?#[:4,)@$``"+
+MCE@%``"-!-+!X`(IT(M$P2B*2`3K5F:!>Q"!`'<H#[=#$`^VA#"8!```BXZ0
+M!0``C01`C03`B<+!X@4IPHM$D0B*2`3K)@^W0Q`/MH0PF`0``(N6=`4``(T$
+M0(T$@(M$PE2*2`3K!8UV`+'_N/\```!F@7L0A0!W#0^W0Q!F#[:$,)@$```/
+MM\"-%,#!X@(IPHN&6`4``(T$T#I,)`-U%@^V0""H`70.J`1T"K@!````ZQ.-
+M=@!'9CE^0`^'`?___[@`````@\0$6UY?PY!55U93@^P(BU0D'(M"*(LPBX[@
+M"0``B4PD!&;'1"0"``"-=@"[`````&:#?D``=D^+OJP%``")]@^WTX,\EP!T
+M-XL,EXM!)"7___\`/>$!$`!T)8ML)!QFBT489CM!$'47B=#!X`9FBTPD`HM4
+M)`1F.4P0"'0)B?9#9CE>0'>Y9CE>0'0-9O]$)`)F@WPD`A]VD@^W1"0"@\0(
+M6UY?7<.04XM4)`B+3"0,BUPD$(-Z.`!T&8M".,8`<(M".(A(`HM".,9`!P"+
+M0CB(6`Q;PXGVPXUV`%=64XM<)!"+5"04B=&!X?\!``"+@ZP%``"#/(@`=">+
+M-(@/MD85#[:;Q@```(C9T^`/M_@/M]*X__\``-/@(<*)\#G7=`6X`````%M>
+M7\.05E.#[`2+3"00BW0D%&:!?B3A`0^%GP```(I&)H/H$3P!#X>1````NO\`
+M``!F@7X0A0!W#`^W1A`/MI0(F`0``(T$4HT$@(N1=`4``(T<PH![*/]U2[`4
+M@'YH`'0&#[9&:-'@#[;`C02`C02`C02`C02`C02`C02`P>`&B4-8QT-@````
+M`(E;9(/L"(U#6%#_<13H_/___\9#*`"#Q!")]HU#%(M0!(EP!(D&B58$B3+^
+M0RGIIP```+K_````9H%^$(4`=PP/MT80#[:4")@$``"-!-+!X`(IT(N16`4`
+M`(T<PHM&)"7___\`/>$!$`!T;H![2/]U5;`4@'YH`'0&#[9&:-'@#[;`C02`
+MC02`C02`C02`C02`C02`P>`&B8/H````QX/P`````````(F;]````(/L"(V#
+MZ````%#_<13H_/___\9#2`"#Q!"-0Q"+4`2)<`2)!HE6!(DR_D-+@\0$6U[#
+MC78`4X/L"(M<)!2`>TC_=!V#[`B-@^@```!0BT0D'/]P%.C\____QD-(_X/$
+M$(/$"%O#4X/L"(M<)!2`>RC_=!J#[`B-0UA0BT0D'/]P%.C\____QD,H_X/$
+M$(/$"%O#C78`55=64X/L#(ML)""+="0D9H%^).$!#X6]````BD8F@^@1/`$/
+MAZ\```"Y_P```&:!?A"%`'<,#[=&$`^VC"B8!```C01)C02`BY5T!0``C1S"
+M@?G_````#X0[`0``_DLI@^P,C7L45^C\____B<&#Q!`Y\'5#@^P(4U7H_/__
+M_X/$$#E[%`^$#0$``,=#6``M,0''0V``````B5MD@^P(C4-84/]U%.C\____
+MQD,H`(/$$.GA````D(U3%(M#%(E(!(D!B5$$B4L4BU8$BP:)4`2)`NG`````
+MN?\```!F@7X0A0!W#`^W1A`/MHPHF`0``(T$R<'@`BG(BY58!0``C1S"BT8D
+M)?___P`]X0$0``^$@P```('Y_P```'1[_DM+@^P,C7L05^C\____B<&#Q!`Y
+M\'5'@^P(4U7H_/___X/$$#E[$'11QX/H`````"TQ`<>#\`````````")F_0`
+M``"#[`B-@^@```!0_W44Z/S____&0T@`@\00ZQR-4Q"+0Q")2`2)`8E1!(E+
+M$(M6!(L&B5`$B0*0@\0,6UY?7<-55U93@^P4BW0D*(ML)"P/MT489@^VO#"8
+M!```#[?7C032P>`"*="+EE@%``"-A,+D````4%;H_/___P^W51B#Q!"#O):8
+M`@```'08BX26F`(``(-X<`!U"\>$EI@"````````#[=%&,:$,)@$``#_@^P(
+M#[??4XV&*`D``%#H_/___XN66`4``(T$V\'@`BG8P>`#@\00@'P0/O]T#X/L
+M"`'04%;H_/___X/$$(/L"%56Z/S___\/M]>+CE@%``"-!-+!X`(IT,'@`\9$
+M""(`BY98!0``QD00(P&#Q!Q;7E]=PY!55U93@^P,BVPD(&;'1"0*@`")]@^W
+M1"0*9@^VA"B8!```9CW_``^$Y````&:!?"0*@0!W>P^WP(T$0(T$P(G"P>(%
+M*<*+A9`%``"-/)"^`````(!_,``/AJ\```"-7RB#[`Q3Z/S___^-2/B#Q!"+
+M4P2)0P2)&(E0!(D"BT$@)0#__P`]``#_`'49]D$C!'03@WD<`'0-BT$<BE0D
+M)(A0`8UV`$:)\3A/,'>TZUZ)]@^WP(T$0(T$@(N5=`4``(T4PKX`````@'H?
+M`'8_C78`B?$/ML&+3((\A<ET)XM!("4`__\`/0``_P!U&/9!(P1T$H-Y'`!T
+M#(M!'(I,)"2(2`&)]D:)\#A"'W?$_T0D)&;_1"0*9H%\)`J%``^&\O[__SFM
+M)`4``'46@^P(_W0D+('%8`P``%7HP_[__X/$$(/$#%M>7UW#4X/L$(M<)!B+
+M1"0<#[90,V8/MH0:F`0``,:$&I@$``#_#[?`4(V#>`D``%#H_/___X/$"&H`
+M_[,D!0``Z'?^__^#Q!A;PXGV5E.#[`R+="08BT0D'`^W0"1F#[:<,)@$``#&
+MA#"8!```_P^WVU.-AE`)``!0Z/S___^+EG0%``"-'%N-')N-!-T`````@\00
+M@'P0-/]T#X/L"`'04%;H_/___X/$$(/L"&H`_[8D!0``Z`+^__^#Q!1;7L-3
+MBUPD"+D`````NG@```")V(UV`(@(0$IU^L9#*/_&0S3_C4,4B4,4B4,86\.-
+M=@!55U93@^P8BWPD+(V'4`D``%#H_/___X/$$+H`````A,`/A=P```"#[`R-
+MAU`)``!0Z/S___^)Q;."@\00C78`#[;#@+PXF`0``/]U$SB?R````',1B)_(
+M````ZPF-=@!#@/N%=MJZ`````(#[A@^$CP````^VPXGJB)0XF`0```^WQ8T$
+M0(T$@(TTQ0````")\`.'=`4``%#H_/___XN7=`4``&8/ML-FB406)(/$!(!_
+M.0%U#HN'=`4``&;'1`8P__^0#[?=BX=T!0``C1Q;C1R;P>,#QD0#)@"+AW0%
+M``!FQT0#,@``@^P(:@#_MR0%``#HU/S__XG:`Y=T!0``@\00B="#Q`Q;7E]=
+MPXUV`(/L%(M,)!B+1"0<#[90!&8/MH0*'@4``,:$"AX%``#_#[?`4('!H`D`
+M`%'H_/___X/$',-3BUPD"+D`````NA@!``")V(UV`(@(0$IU^L9#2/_&0S[_
+MQD-*'XU#$(E#$(E#%%O#C78`55=64X/L&(M\)"R-AR@)``!0Z/S___^#Q!"Z
+M`````(3`#X4Q`0``@^P,C8<H"0``4.C\____B<6S`(/$$(UV``^VPX"\.)@$
+M``#_=1=F#[;#9CF'Q````',.9HF'Q````.L%D/[#>=BZ`````(#[@`^$X@``
+M``^VPXGJB)0XF`0```^WU8T$TL'@`BG0C33%`````(GP`X=8!0``4.C\____
+MBY=8!0``9@^VPV:)1!88BX=8!0``QD0&(@"+AU@%``#&1`8Y_XN'6`4``,9$
+M!CC_BX=8!0``QD0&.O^+AU@%``#&1`8\_XN'6`4``,9$!CO_BX=8!0``QD0&
+M/?^+AU@%``#&A`:R`````(N'6`4``,:$!M<```#_@^P(5^C\____BY=8!0``
+MB806Y````(/$$(!_.0%U"XN'6`4``(!,!B0!#[?%C13`P>("*<*+AU@%``"-
+M%-")T(/$#%M>7UW#B?975E.#[!R+="0LC89X"0``4.C\____@\00N@````"$
+MP`^%(`$``(/L#(V&>`D``%#H_/___XG'QD0D'X"#Q!`/MD0D#X"\,)@$``#_
+M=1:*1"0/.(;'````<Q6(AL<```#K#8GV_D0D#X!\)`^!=M"Z`````(!\)`^"
+M#X3'````#[9$)`^)^HB4,)@$```/M\>-!$"-!,")PL'B!2G"BX:0!0``NP``
+M``"Y%`T``(T$D(@80$EU^@^WQXT$0(T$P(G#P>,%*</!XP*)V@.6D`4``(U"
+M$(E"$(G8`X:0!0``@\`0B4`$B=H#EI`%``"-0AB)0AB)V`.&D`4``(/`&(E`
+M!(G:`Y:0!0``C4(HB4(HB=@#AI`%``"#P"B)0`2+AI`%``"*5"0/B%0#,X/L
+M"&H`_[8D!0``Z+7Y__^)V@.6D`4``(/$$(G0@\006UY?PY!75E.#[!R+="0L
+MC8:@"0``4.C\____@\00N@````"$P`^%RP```(/L#(V&H`D``%#H_/___XG'
+MQD0D'P"#Q!`/MD0D#X"\,!X%``#_=0Z*1"0/.$8T<Q"(1C3K"_Y$)`^`?"0/
+M`W;8N@````"`?"0/!'1^#[9$)`^)^HB4,!X%```/M\>-%$#!X@,IPKL`````
+MN5P```"-A)8H`0``C78`B!A`277Z#[?'C11`P>(#*<*-%):-@D@!``")@D@!
+M``")0`2-@E0!``")@E0!``")0`2-@F`!``")@F`!``")0`2*1"0/B((L`0``
+M@<(H`0``B="#Q!!;7E_#B?964X/L!(MT)!"-AMP```"Z`````#F&W````'0I
+M@^P,C8;<````4.C\____B<.)!"3H_/___XDT).C\____B4-,B=J#Q!")T(/$
+M!%M>PXUV`%.#[`B+7"00BTPD%(V#W````(M0!(E(!(D!B5$$B0J#>4P`=!.#
+M[`B-04Q04^C\____@\00C78`@\0(6\.-=@"#[`R+5"00C8+D````N0`````Y
+M@N0```!T&(/L#(V"Y````%#H_/___\9`"`")P8/$$(G(@\0,PU.+7"0,BQ.+
+M1"0(!>0```"+2`2)4`2)`HE*!(D1QP,`````6\.-=@"#[`R+1"00C9#L````
+MN0`````YD.P```!T#H/L#%+H_/___XG!@\00B<B#Q`S#B?93BUPD#(L3BT0D
+M"`7L````BT@$B5`$B0*)2@2)$<<#`````%O#C78`4X/L"(M$)!"-D/P```"Y
+M`````#F0_````'0E@^P,4NC\____B<.#Q!"X`````+F8````B=J-=@"(`D))
+M=?J)V8G(@\0(6\.0BT0D"(M4)`2!POP```"+2@2)0@2)$(E(!(D!PX/L#(M$
+M)!"-D`0!``"Y`````#F0!`$``'0.@^P,4NC\____B<&#Q!")R(/$#,.)]E.+
+M7"0,BQ.+1"0(!00!``"+2`2)4`2)`HE*!(D1QP,`````6\.-=@"#[`R+5"00
+MC8+T````N0`````Y@O0```!T&X/L#(V"]````%#H_/___\=`%`````")P8/$
+M$(G(@\0,PY!3BUPD#(L3BT0D"`7T````BT@$B5`$B0*)2@2)$<<#`````%O#
+MC78`55=64X/L#(ML)""+1"0D9H%X$(4`#X>9````#[=`$("\*)@$``#_#X2'
+M````BU0D)&:#>A!_=R`/MI0HF`0``(N-6`4``(T$TL'@`BG0BT3!*(I`!.M?
+MD(M,)"1F@7D0@0!W*`^W01`/MH0HF`0``(N-D`4``(T$0(T$P(G"P>(%*<*+
+M1)$(BD`$ZRJ+5"0D#[="$`^VA"B8!```BY5T!0``C01`C02`BT3"5(I`!.L%
+MC78`L/\/ML`/MKPH'@4``(T$?\'@`RGXC;R%*`$``(N-D`4``(M$)"1F@7@0
+MA0!W(@^W0!`/MH0HF`0``(T$0(T$P(G"P>(%*<*-%)&)5"0(ZPJ!P>P&#0")
+M3"0(BU0D)(M"-`^V4`&#^A)T$H'ZD0````^$*@$``.F9`0``D(L/B0PDO@``
+M``"*4`F(5"0'BD`:B$0D!KT`````@'\*`'8]C5\XB?:#[`Q3Z/S___^)QH/$
+M$(M#!(ES!(D>B48$B3"+3"0(.4XL=0R*1DF+5"0D.D(5=`A%B>DX3PIWR(M$
+M)"2#>%``=!+_<%#_="0$Z/S___^#Q`B-=@"#[`C_="0L_W0D#.C\____BI:2
+M````C4(!B(:2````@\00@/H#=R6`?"0&`'4>@^P,:@!J`HM4)#@/MD(54/]V
+M+%?H_/___X/$(.L\BI:2````C4(!B(:2````@/H"=BB`?"0&`'4AQD8C`L9&
+M(O^`9B3^@^P(5O]T)`SH_/___X/$$.F\````#[9$)`90#[9$)`M0_W0D$%?H
+M_/___X/$$.F>````B?:Z`````+X`````@'\*`'8\C5\XD(/L#%/H_/___XG"
+M@\00BT,$B5,$B1J)0@2)$(M,)`@Y2BQU#(I"28M,)"0Z015T"$:)\#A'"G?(
+M#[9"(*@"=""H!'0<J`%T&%*+3"0H#[9!%5#_<BQ7Z/S___^#Q!")]HM$)"2#
+M>%``=`[_<%!5Z/S___^#Q`B)]H/L"/]T)"Q5Z/S___^#Q!"#Q`Q;7E]=PU=6
+M4XM\)!"+-X/L#%;H_/___XG#@\00A<!T;H/L#%;H_/___XG!@\00A<!T7(U3
+M/,9#).'&0R4!QD,F$,9#%;N+1"049@^V0#-FB4,0BP>)0QC'0R"0````C4$(
+MB4,TB4M0QD`!`,9!"$#'0VP`````@^P(:@!2Z/S___^#Q`A35NC\____@\00
+M6UY?PXUV`%575E.#[!B+?"0LBVPD-(LW5NC\____B<.#Q!"%P'1S@^P,5NC\
+M____B<&#Q!"%P'1AC5,\QD,DX<9#)0'&0R80QD,5NXM$)"1F#[9`,V:)0Q"+
+M!XE#&,=#()````"-00B)0S2)2U#&0`$0QD$(0(GIB$@)QT-L`````(/L"&H`
+M4NC\____@\0(4U;H_/___X/$$(/$#%M>7UW#D%575E.#[!B+;"0LBWPD-(M$
+M)#B)1"04BW4`5NC\____B<.#Q!"%P`^$B````(/L#%;H_/___XG!@\00A<!T
+M=HU3/,9#).'&0R4!QD,F$(GXB$,5BT0D)&8/MD`S9HE#$(M%`(E#&,=#()``
+M``"-00B)0S2)2U#&0`&1QD$(0(GYB$@)BDPD"(A("L=#;`````"#[`AJ`%+H
+M_/___X/$"%-6Z/S____'!"2@A@$`Z/S___^#Q!"#Q`Q;7E]=PXUV`%575E.#
+M[!B+?"0LBVPD.(I$)#2(1"07BS=6Z/S___^)PX/$$(7`=0S&A;$````!Z8X`
+M``"#[`Q6Z/S___^)P8/$$(7`=1:#[`A35NC\____QH6Q`````8/$$.MFC5,\
+MQD,DX<9#)0'&0R80BD0D"XA#%8M$)"1F#[9`,V:)0Q"+!XE#&,=#()````"-
+M00B)0S2)2U#&0`$2QD$(0(I,)`N(2`G'0VP`````@^P(:@!2Z/S___^#Q`A3
+M5NC\____@\00@\0,6UY?7<.)]E=64XM\)!"+7"049H%[$(4`#X>5````#[=#
+M$("\.)@$``#_#X2#````9H-[$']W)`^VE#B8!```BX]8!0``C032P>`"*="+
+M1,$H9@^V4`3K8(UV`&:!>Q"!`'<J#[=#$`^VA#B8!```BX^0!0``C01`C03`
+MB<+!X@4IPHM$D0AF#[90!.LK#[=#$`^VA#B8!```BY=T!0``C01`C02`BT3"
+M5&8/ME`$ZPB-=@"Z_P```+G_````9H%[$(4`=PT/MT,09@^VC#B8!```9H'Z
+M_P!T%@^WPH"\.!X%``#_=`EF@?G_`'46B?:#[`A35^C\____@\00Z8\```")
+M]@^WP@^VM#@>!0``C01VP>`#*?"-M(<H`0``9@^V4R=F#[9#*,'@"`'"@>+_
+M`0``#[9#*8/X`70%@_@(=4,/M]*+AZP%``"+!)`[0TAU,F:+2!Z)RF;!Z@4/
+MM]*#X1^X_O___]/`(4271(/L"(M#2`^W0!Y05NC\____@\00C78`@^P(4U?H
+M_/___X/$$%M>7\.-=@!55U93@^P8BT0D-(E$)!2+5"0LBSJ+3"0P#[=!$`^V
+ME#B8!```C032P>`"*="+EU@%``"-+,)7Z/S___^)PXM$)#1FBW`>B?!FP>@%
+M#[?`B?&#X1^Z`0```-/B@\00A52'1`^%N````(7;#X2P````C5,\BTPD)`^V
+M014/MH_&````T^`)\,9#).'&0R4!QD,F#XA#)V;!Z`B(0RB*1"0(B$,IBX6D
+M````B4,JBX6H````B4,NBTPD)(E+2,9#%:IFBT489HE#$(M,)""+`8E#&,=#
+M(`````#'0S0`````QT-LB)P%`(/L"&H`4NC\____@\0(4U?H_/___XM$)#1F
+MBT@>B<AFP>@%#[?`@^$?N@$```#3X@E4AT2#Q!"-=@"#Q`Q;7E]=PU575E.#
+M[!B+5"0LBT(HBRA5Z/S___^)QH/$$(7`=1&+1"0@QH"Q`````>F5````D(/L
+M#%7H_/___XG'@\00A<!U&HM4)"#&@K$````!@^P(5E7H_/___X/$$.MHC5X\
+MQD8D)<9&%:N+5"0@9HM"&&:)1A");AC'1B`(````QT9D"````(M'"(E&-(/`
+M"(E&.,9&'"2)?E#'1FP`````@^P(:@!3Z/S___]J"/]W$/]W#%/H_/___X/$
+M&%95Z/S___^#Q!"#Q`Q;7E]=PU575E.#[!B+5"0LBT(HBRA5Z/S___^)QH/$
+M$(7`=1&+1"0@QH"Q`````>F=````D(/L#%7H_/___XG'@\00A<!U&HM4)"#&
+M@K$````!@^P(5E7H_/___X/$$.MPC5X\QD8DGL9&)1#&1C$@QD85JXM4)"!F
+MBT(89HE&$(EN&,=&("````#'1F0(````BT<(B48TB7Y0@\`@B48XQD8<),=&
+M;`````"#[`AJ`%/H_/___VH@_W<0_W<,4^C\____@\085E7H_/___X/$$(/$
+M#%M>7UW#55=64X/L&(ML)"R*1"0PB$0D%XM%*(LX5^C\____B<.#Q!"%P'4-
+MQH6Q`````>FF````D(/L#%?H_/___XG&@\00A<!U%L:%L0````&#[`A35^C\
+M____@\00ZWV-0SR)1"0$QD,D$H!\)`L`=`[&0R4!QD,F@,9#*$#K!,9#*"3&
+M0Q6K9HM%&&:)0Q")>QC'0R!@````QT-D"````(M&"(E#-(ES4,=#;`````"#
+M[`AJ`/]T)!#H_/___VI@_W80_W8,_W0D(.C\____@\084U?H_/___X/$$(/$
+M#%M>7UW#C78`55=64X/L&(MT)"R+1BB+`(E$)!10Z/S___^)Q[L`"```@\00
+MA<!U#,:&L0````'INP```(/L#/]T)!3H_/___XG%@\00A<!U'\:&L0````&#
+M[`A7_W0D%.C\____@\00Z8H```"-=@!F@?O_`'8%N_\```#&1R0:QD<E",9'
+M)@C&1R<`B%\HQD<I`,9'%:MFBT889HE'$(M$)`B)1Q@/M]N)7R#'1V0(````
+MBT4(B4<T`=B)1SC&1QPDB6]0QT=L`````(UW/(/L"&H`5NC\____4_]U$/]U
+M#%;H_/___X/$&%?_="04Z/S___^#Q!"#Q`Q;7E]=PY!75E.+?"00BT<HBS"#
+M[`Q6Z/S___^)PX/$$(7`=0K&A[$````!ZU&0QD`D%<9`%:MFBT<89HE#$(ES
+M&&H!:@%35NC\____@\00A,!U%X/L"%-6Z/S____&A[$````!@\00ZQ60QT-L
+M`````(/L"%-6Z/S___^#Q!!;7E_#N`0````/ME0D!(/Z%W<Y_R25A!X``(/`
+M),.#P#C#@\`0PX/`',.#P$C#@\`<PX/`/,.#P"3#@\`8PX/`%,.#P$C#@\`P
+MC78`PXUV`%93@^P$BW0D$(M<)!2`>S[_=!F#[`@/MD,^4/\VZ/S____&0S[_
+M_DXL@\00@\0$6U[#B?975E.+?"00BU0D%`^V0B"H`G0-J`1T":@!#X2U````
+MD(!Z/O\/A:H```"+!XN`&`$``*,`````B<:Q`+@!````B</3XX7S=2R(2CZ+
+M%XGP"=B)@A@!``"+!XN`6`$``*,`````B<8AWG1DBP>)L%@!``#K6D&`^1]V
+MQHL'BX`<`0``HP````")QK$`N`$```")P]/CA?-U,(U!((A"/HL7B?`)V(F"
+M'`$``(L'BX!@`0``HP````")QB'>=!&+!XFP8`$``.L'D$&`^1]VPOY'+(UV
+M`%M>7\-64X/L!(MT)!"+7"04@'LT_W09@^P(#[9#-%#_-NC\____QD,T__Y.
+M+(/$$(/$!%M>PXGV5U93BWPD$(M4)!2`>C3_#X6G````BP>+@!@!``"C````
+M`(G&L0"X`0```)")P]/CA?-U+(A*-(L7B?`)V(F"&`$``(L'BX!8`0``HP``
+M``")QB'>=&"+!XFP6`$``.M608#Y'W;&BP>+@!P!``"C`````(G&L0"X`0``
+M`(G#T^.%\W4LB$HTBQ>)\`G8B8(<`0``BP>+@&`!``"C`````(G&(=YT$(L'
+MB;!@`0``ZP9!@/D?=L;^1RR-=@!;7E_#55=64X/L#(ML)""+70"^`````&:#
+M>T``#X81`0``B?8/M]:+@ZP%``"#/)``#X3Q````#[9]!(L$D&:!>!"%``^'
+MN@````^W4!"`O!J8!```_P^$J````&:#>!!_=RL/MI0:F`0``(N+6`4``(T$
+MTL'@`BG0BT3!*`^V0`0Y^`^$@P```.F:````#[?6BX.L!0``BP209H%X$($`
+M=RT/MT`0#[:$&)@$``"+BY`%``"-!$"-!,")PL'B!2G"BT21"`^V0`0Y^'0_
+MZUD/M]:+@ZP%``"+!)`/MT`0#[:$&)@$``"+DW0%``"-!$"-!("+1,)4#[9`
+M!#GX=`WK)XUV`('__P```'4<@^P(:@`/M]:+@ZP%``#_-)#H_/___X/$$(UV
+M`$9F.7-`#X?Q_O__@\0,6UY?7<.0BTPD"(M13(72="*+022)0@R+02B)0A"+
+M02R)0A2+03")0AB+032)0AS&0@@!PXGVBTPD"(M13(72=!Z+0@R)022+0A")
+M02B+0A2)02R+0AB)03"+0AR)033#B?975E.+="00BUPD%#ES&`^$J````(![
+M%``/A8H````/MD,D@_@5=`6#^%5U?(M+3(7)='6`>0@!=6]F@7D,X0%U9XN^
+M6`4``(V7Z!8!`&:!>Q"%`'<7#[=#$`^VE#"8!```C032P>`"*="-%,</MD$.
+M@_@'=!B#^`=_!X/X!G05ZR>#^`QT'(/X#700ZQMF@V(V_>L49H-*-@+K#6:#
+M8C;WZP9F@THV")"#>U``=`Z-0U!05NC\____@\0(D&:!>R3A`0^%-`$``&:!
+M>Q"%`'=X#[=#$("\,)@$``#_=&J+CE@%``"-D>@6`0!F@7L0A0!W$P^VE#"8
+M!```C032P>`"*="-%,&`>Q0`=3T/MD,F@_@'=!B#^`=_!X/X!G05ZRB#^`QT
+M'(/X#700ZQQF@V(V_>L59H-*-@+K#F:#8C;WZP=F@THV"(GV9H%[).$!#X6H
+M````@'LF"P^%G@```(GW9HM+$`^WT0^V1BY(03G"?2,/MD8NC5#_9H'YA0!W
+M#0^WP8"\.)@$``#_=0T/M\%!.=!\Y+C_````9CW_`'18B?=FBTL0#[?1#[9&
+M+DA!.<)])@^V1BZ-4/^-=@!F@?F%`'<-#[?!@+PXF`0``/]U#0^WP4$YT'SD
+MN/\```!FB4,0QD,4@(/L"%-6Z/S___^#Q!#I&0$``,9#%`"0.7,8="2+0TR%
+MP'0=@'@(`74*4U;H_/___X/$"(U#3%!6Z/S___^#Q`B#>U0`=`V-0U105NC\
+M____@\0(@^P(4_]S&/]3;(/$$&:!>R3A`75;BD,F@^@1/`%W4;G_````9H%[
+M$(4`=PP/MT,0#[:,,)@$``"!^?\````/A)0```"-!$F-!("+EG0%``"-!,*`
+M>"D`=7^`>#3_='F#[`A05NC\____@\00ZVJ)]KG_````9H%[$(4`=PP/MT,0
+M#[:,,)@$``"-!,G!X`(IR(N66`4``(T4PHM#)"7___\`/>$!$`!T+X'Y_P``
+M`'0G9H%[).$!=0N*0R:#Z!$\`785D(!Z2P!U#H/L"%)6Z/S___^#Q!"06UY?
+MPU=64XMT)!"+?"049HM7'HG09L'H!0^WV(G1@^$?N/[____3P(G!(42>1&:!
+M^O\/=$</M\*+EJP%``"#/((`=#C'!((`````(8R>L`4``(/L"%"-A@`)``!0
+MZ/S___^#Q`A75NC\____@\0(5U;H_/___X/$$(UV`%M>7\-64X/L$(M$)!R+
+MF.`)```%``D``%#H_/___XG&#[?0P>(&`=J+1"0DB1"#Q!"[`````+E`````
+MB="-=@"(&$!)=?H/M\:#Q`1;7L.05U93@^P$BWPD%(I$)!R(1"0#O@````"X
+M`````(-_*`!T0NL$B<;K)8M/*+(`C78`#[;"@WR!/`!T#8M$@3R*7"0#.%A)
+M=-U"@/H$=N.+1RAF@7@DA0!W!HGPA?9U!K@`````D(/$!%M>7\.055=64XM\
+M)!1F#[9<)!P/MD0D&,'@"`'#O0````"`?QP`#X2]````@W\X``^$LP```/9'
+M9`EU!;T!````L0"^(!8``)`/MM&)V&8C!-9F.P36#X6!````@'S6!0-T!X!\
+MU@4'=0L/ML&)ZCA4Q@1U:,9'%"`/MMD/MD3>!E`/MD3>!5!7Z/S___^+5SB*
+M1-X'B$(-@\0,@WPD(`!T*XM$)""+&(MP!(M'.(EP`XM'.(`(@/9'9@1T$(7V
+M=`R+1SB)6`B+1SB`('^+5SB*1QR#Z`>(0@?K#HGV08#Y#P^&8O___XGV6UY?
+M7<.-=@!55U93@^P,BWPD((MT)"1F@7X0A0`/AXD````/MT80@+PXF`0``/]T
+M>V:#?A!_=R`/MI0XF`0``(N/6`4``(T$TL'@`BG0BT3!*(I(!.M7D&:!?A"!
+M`'<H#[=&$`^VA#B8!```BX^0!0``C01`C03`B<+!X@4IPHM$D0B*2`3K)@^W
+M1A`/MH0XF`0``(N7=`4``(T$0(T$@(M$PE2*2`3K!8UV`+'_NO\```!F@7X0
+MA0!W#0^W1A!F#[:4.)@$``"`^?\/A),````/ML&`O#@>!0``_P^$@@```&:!
+M^O\`='N`?A0&='4/MIPX'@4``(T$6\'@`RG8C9R'*`$```^WTHT$TL'@`BG0
+MBY=8!0``C2S"@'XF`74H@^P,:@KH_/___X/$"%97Z/S___^#Q`QJ`E53Z/S_
+M__^#Q!#K'XUV`(/L#&CT`0``Z/S___^#Q`A65^C\____@\00B?:#Q`Q;7E]=
+MPU=64XMT)!B+1"00BQB#[`Q3Z/S___^)PH/$$(7`=&G&0"3AQD`E`8GPB$(F
+MQD(G#XM$)!1FBT`89HE"$(E:&,="(`````#'0C0`````QT)L`````(/L"%)3
+MZ/S___^#Q!")\#P!=1&#[`QJ!>C\____@\00ZQ*)]H/L#&A0PP``Z/S___^#
+MQ!!;7E_#5E.#[`2+="00BUPD%&:!>Q"%``^'BP````^W0Q"`O#"8!```_W1]
+M9H-[$']W(@^VE#"8!```BXY8!0``C032P>`"*="+1,$HBD@$ZUF-=@!F@7L0
+M@0!W*`^W0Q`/MH0PF`0``(N.D`4``(T$0(T$P(G"P>(%*<*+1)$(BD@$ZR8/
+MMT,0#[:$,)@$``"+EG0%``"-!$"-!("+1,)4BD@$ZP6-=@"Q_[+_9H%[$(4`
+M=PL/MT,0BI0PF`0``(#Y_W08#[;!@+PP'@4``/]T"X#Z_W0&@'L4!G4D@WM0
+M`'0.C4-04%;H_/___X/$")"#[`A35NC\____@\00ZVF0#[;!#[:,,!X%``"-
+M!$G!X`,IR(V,AB@!```/MM*-!-+!X`(IT(N66`4``(T$PH![%`!T$(/L!&H!
+M4%'H_/___X/$$)"#>U``=`Z-0U!05NC\____@\0(D(/L"%-6Z/S___^#Q!"-
+M=@"#Q`1;7L.)]E575E.#[!B+1"0LBRA5Z/S___^)QH/$$(7`#X2+````@^P,
+M5>C\____B<>#Q!"%P'42@^P(5E7H_/___X/$$.MJC78`C5X\QD8DX<9&)0'&
+M1B8.BU0D)&:+0AAFB4809H-B-/>+5"0@BP*)1AC'1B``"```BT<(B48TB7Y0
+MQT9L/*X%`(/L"&H`4^C\_____W8@_W<0_W<,4^C\____@\085E7H_/___X/$
+M$(/$#%M>7UW#D%=64XM\)!"+="04BT<HBQB#[`Q3Z/S___^)PH/$$(7`=#[&
+M0"0;QD`E`8GPB$(H9HM'&&:)0A#&0F@/B5H8QT(@`````,="-`````#'0FP`
+M````@^P(4E/H_/___X/$$%M>7\-75E.+?"00BT<HBS"#[`Q6Z/S___^)PX/$
+M$(7`=&R#[`Q6Z/S___^)PH/$$(7`=1C&A[$````!@^P(4U;H_/___X/$$.M$
+MB?;&0R0`9HM'&&:)0Q#&0V@/B7,8QT,@`````,=#-`````"+0@B)0SC&0QPD
+MB5-0QT-L`````(/L"%-6Z/S___^#Q!!;7E_#B?955U93@^P0BVPD*(M<)"S&
+M0R,!QD,B`%-J!E7H_/___X/$$(-[+`!T$8M3#(M#"(E0!(D"BT,L_D@P@'M+
+M`'0A@^P,_W0D+.C\____QP0D`0```.C\____@\00@'M+`'7?@[O@`````'0>
+M@^P$:@$/MH/5````4/^SX````.C\____@\00C78`@WLL`'06@^P$:@$/MD-)
+M4/]S+.C\____@\00D(-['``/A*@```"+<QR#?G``#X6-````@WYT``^%@P``
+M`/9#)`1U+(M$)"#^@%<,``"#[`Q0Z/S___^#Q`QJ`8M#'`^V0`%0_W0D+.C\
+M____@\00@^P$BT,<#[9``E"+0QP/MD`!4&A"`@``Z/S___^#Q`S_<QR+1"0H
+M_[`D!0``:@'H_/___X/$#/]S'(M$)"C_L"0%``!J!NC\____@\00C78`QT,<
+M`````,=&8`````"#>S``=`^+4S`/MD-)QT2"/`````"+4P2+`XE0!(D"_DT*
+M@^P(4_]T)"SH_/___X/$$(!]!?]T5K\`````@'T*`'8WC74X@^P,5NC\____
+MB<.#Q!"+1@2)7@2),XE#!(D8@'LB_W4*1XGX.$4*=]?K"8GX.$4*=Q:)]L9%
+M!?^#[`A5_W0D+.C\____@\00@\0,6UY?7<,/MD0D"(T4P,'B`RG"C120C125
+M=$4``(M$)`2)$,.)]E93@^P$BW0D%(I$)!B(1"0#BUPD$+@`````B?&)VH7V
+M=`B)]H@"0DEU^HDSC8:,NO__P>@"NEFV^7+WXHG0P>@'B$,$BD0D`SA#!'8#
+MB$,$L0"`>P0`=B$/MM'&1!,'_XT$TL'@`RG0C02"QH2#V$4``/U!.$L$=]_&
+M0P8`QD,%`+$`D`^VP8T4@(T4T(V4DY`Q``#&0@<!B$H&08#Y'W;C@\0$6U[#
+MD%575E.#[`R+;"0DBW0D(+\`````@'X$`'8^B?:)^`^VV(T$V\'@`RG8C02#
+MC82&T$4``(!X"/UT%X/L!&H(55#H_/___X/$$(3`=`2)V.L-1XGX.$8$=\2X
+M_P```(/$#%M>7UW#C78`4X/L$(M<)!C_="0<4^C\____@\00N@D````\_W06
+M#[;0C032P>`#*="-!((/MI2#>D4``(G0@\0(6\.055=64X/L#(M<)"2-@Y``
+M``")WXNSF````(!^!@`/A$$!``"#[`A05NC\____B<6#Q!`\_P^$*@$```^V
+M0P&#^`%T98/X`7\,A<!T(>D3`0``C78`@_@0#X2#````/9`````/A,4```#I
+M]P```("^ES$````/A>H```#&AI<Q```!_DX&@^P(:@!J`&H`B>H/ML)0_W0D
+M.%;H_/___X/$(.F_````C78`@+Z7,0````^%KP```,:&ES$```'^3@:#[`AJ
+M`&H`:@&)Z@^VPE#_="0X5NC\____@\0@Z80```"Q`8GV#[;!C12`C130C826
+MD#$``(GJ.%`$=0F*0`4Z1PET!Y!!@/D?=MK^3@:#[`A7#[9'"5!J$(GJ#[;"
+M4/]T)#A6Z/S___^#Q"#K-P^V@Z(```"-%("-%-#&A):7,0```?Y.!H/L"&H`
+M:@!HD````(GJ#[;"4/]T)#A6Z/S___^#Q""#Q`Q;7E]=PU575E.#[`2+;"0<
+MBD0D)(A$)`.+5"0H9HD4)(M<)!B_`````(GY#[;!C11`B='!X08!RHT44#EL
+MTQ0/A8P```"Y`````(GX#[;PC01VB<+!X@8!T(T$1HT4Q0````")]@^WP8T$
+M0(T$PHU$&""`>!``=`:`>!#P=4L/M]&-%%*-!':)P<'A!@'(C01&C10"C133
+MB6H<BTPD((E*((U"$(L,)&:)2!:*3"0#B$@4BTPD+(L!B4(HBT$$B4(LQD(P
+M_^L*B?9!9H'Y@0!VE$>)^#P##X9-____@\0$6UY?7<.055=64X/L#(ML)"`/
+MMGPD*(GKC;7T,```QH67,0```+H`````N9````")\)"($$!)=?K&1@$`Q@9`
+MQX.0,0``J+0%`(FKC#$``(GX#[;0C032P>`#*="-!(*-!(.+D-!%``")DX0Q
+M``"+@-1%``")@X@Q``"#[`B-@_0P``!0_W0D,.C\____@\0<6UY?7<.055=6
+M4X/L#(ML)"`/MGPD*(GKC;7T,```QH67,0```+H`````N9````")\)"($$!)
+M=?K&1@$!Q@9`QX.0,0``J+0%`(FKC#$``(GX#[;0C032P>`#*="-!(*-!(.+
+MD-!%``")DX0Q``"+@-1%``")@X@Q``"#[`B-@_0P``!0_W0D,.C\____@\0<
+M6UY?7<.055=64X/L#(I,)"B*1"0LB$0D"XM\)""S`0^VP8T4P(TLU0`````I
+MQ8TLJ)`/ML.-%("-%-"-A)>0,0``@'@'`0^%M@```(A(!(I4)`N(4`7&0`<`
+M#[9P!HT$MHT$QHVTA_0P``"Y`````+J0````B?"-=@"("$!*=?K&1@$0Q@9`
+MBD0D"XA&"0^VPXT,@(T,R(T,CXV9D#$```^V0P:-%("-%-"-%)?'@I`Q``"H
+MM`4`BT0D((F"C#$``(T4KXN"T$4``(F!A#$``(N"U$4``(F!B#$``(/L"`^V
+M0P:-%("-%-"-E)?T,```4O]T)##H_/___X/$$.L2C78`0X#['P^&)O___[@!
+M````@\0,6UY?7<.055=64X/L#(I$)"R(1"0+BVPD,(M\)""S`8GJ#[;6B50D
+M!(GV#[;#C12`C130C127C8*0,0``@'@'`0^%J````,9`!P")NHPQ```/MD`&
+MC12`C130C;27]#```+D`````NI````")\)"("$!*=?K&1@&0Q@9`BDPD!(A.
+M!HGHB$8'BE0D"XA6"8M,)#2+`8E&$(M!!(E&%`^VPXT4@(T4T(T4E\>"D#$`
+M`*BT!0"+1"0@B8*,,0``BTPD*(M!7(F"A#$``(M!8(F"B#$``(/L"('"]#``
+M`%+_="0PZ/S___^#Q!#K$HUV`$.`^Q\/AC+___^X`0```(/$#%M>7UW#D%57
+M5E.#[`R+;"0@BD0D+(A$)`N+?"0PB>Z-G?0P``"Y`````+J0````B=B0B`A`
+M2G7ZQD,!$\8#0(GZ#[;&B$,&B%,'BE0D"XA3"<>&D#$``*BT!0")KHPQ``"+
+M5"0HBT)<B8:$,0``BT)@B8:(,0``@^P(C8;T,```4/]T)##H_/___X/$'%M>
+M7UW#BT0D"`^V5"0,9HM,4'!!9HE,4'!F#[9``@'(#[?`PY"+3"0$N@$```"-
+M=@"-!)*-!,*`O(&7,0```74$B=##D$*#^A]VYKC__P``PU.#[`B+7"00BD0D
+M%(A$)`.*3"08B$PD![H!````C78`C022C03"C82#D#$``(I,)`,X2`1U$HI,
+M)`<X2`5U"<9`!P'K"8UV`$*#^A]VTH/$"%O#D%575E.#[#R*1"18B$0D+XI,
+M)%R*5"1@B%0D+HML)%"+?"1D#[;0C032P>`#*="-!(*`O(7810``_74%L?V-
+M=@`/ML&#^!`/A+0"``"#^!!_%X7`#X2;````@_@!#X0T`0``Z4$)``"0/>(`
+M```/A+$(```]X@```'\2/9`````/A(\'``#I'@D``(GV/?\````/A1$)```/
+MME0D+XT$TL'@`RG0C02"QH2%V$4``/^`O9<Q```!=22#[`12_W0D7/]T)%SH
+M_/___X/$$(7`#X74"```_D4&Z<P(```/MD0D+\9$!0<!BU0D5(E4A0SIM0@`
+M`)"-G?0P``"`O9<Q```!=54/MDPD+XT$R<'@`RG(C02!C42%`(I3"8B0=D4`
+M``7010``BE,*@^(!B%`)QD`(`(/L!%'_="1<_W0D7.C\____@\00A<`/A5H(
+M``#^10;I4@@``(GV#[9$)"_&1`4'`8M4)%2)5(4,Z3D(``#&1`4'_X/L"&H`
+M:@!H_P```%#_=(4,_W0D;.C\____@\0@Z1((``"_`````(V-]#````^V5"0O
+MB=:-!-+!X`,IT(T$@HU<A0"*03*(@\9%``!FBT$P9HF#Q$4``(M!*(F#M$4`
+M`(M!+(F#N$4``(M!#(F#A$4``(M!$(F#B$4``(V3E$4``(M!%(F#E$4``(M!
+M&(E"!(M!'(E""(M!((E"#(M!)(F#K$4``,:#V$4```&`?08?#X1^!P``@+MV
+M10````^$F0````^V1"0OC13`C1S5`````"G#C1R8B5PD*(E$)`R0B?H/ML)0
+M5O]T)%S_="1<Z/S___^#Q!"%P'4O1_Y%!HT$]L'@`RGPC02&C42%`(GZ.)!V
+M10``=0G&@,=%````ZQN(E)W'10``ZQ*)^HM$)"B(E(7'10``ZR.-=@"`?08?
+M=!J+="0,C03VP>`#*?"-!(:)^CB4A79%``!WA,:%ES$```&R`(!]!``/AL4&
+M``"0#[;"@'P%!P$/A'W^__]".%4$=^SIJP8``(UV`,9$)"?_BT<8B40D,(U,
+M)#"+1QR)000/ME0D+XT$TL'@`RG0C02"C72%`(V&T$4``,9`"!#V1PQP#X26
+M`P``@[[<10```'1MBE@*@^P$:@A1BX;<10``@\!<4.C\____@\00A,!U3O9'
+M#P]T2(NVW$4``(7V=#Z`?F4`="T/MMM35E7H_/___XU7&%(/M\!04U;_="1P
+M_W0D<.C\____BEYFBW9H@\0DZP6^`````(7V=<2)]@^V3P_VP0T/A#L!```/
+MME0D+XT$TL'@`RG0C02"C12%`````(V$*G!%``"`>`0?#X<3`0``BD`$B$0D
+M)?;!"'02#[;`P>`$`=#&A"CH1P``!NLC#[9,)"4/ME0D+\'A!(T$TL'@`RG0
+MC02"C02!QH0HZ$<```</ME0D)0^V1"0OP>($C0S`P>$#*<&-#(C!X0(!R@'J
+MC9K@1P``QD,)`(I'#XA#"XM$)#")@O!'``"+1"0TB8+T1P``BD<)B$,*BE<-
+M@^(/BH0I>D4``#C0=@*(T(C"@^(/BD,,@^#P"="(0PP/MDPD)0^V5"0OP>$$
+MC032P>`#*="-!(+!X`(!P8V,*>!'``"*5RF#X@^*A"AZ10``.-!V`HC0B,+!
+MX@2*00R#X`\)T(A!#`^V5"0OC032P>`#*="-!(+^A(5T10``Z=L!``"-=@#V
+M1P\"#X3.`0``@^P(C40D.%!5Z/S___^(1"0V@\00//\/A4T!``#&1"0G`(!]
+M!`!V,`^V5"0GC032P>`#*="-!(*-A(7010``@'@(_W03@'@(_70-_D0D)XI$
+M)"<X101WT`^V5"0GC032P>`#*="-!(*Y`````+ID````C82%=$4``)"("$!*
+M=?H/ME0D)XT$TL'@`RG0C02"C42%``^V5"0OC1S2P>,#*=.-')J-7)T`C9-T
+M10``B9#<10``BY/010``B9#(10``BY/410``B9#,10``BU0D5(F0Y$<``(N3
+MX$4``(F0X$4``,:`V$4``/^-D'!%```/MG(+BD\)B(PP?$4``/Y""XI/#8/A
+M#XJ#>D4``#C(=@*(R(A""@^V5"0GC032P>`#*="-!(*-1(4`C8C010``BU0D
+M,(F0T$4``(M4)#2)402*5P^(D'=%``"*1"0NB$$*BD4%.D4$=03&104`_D4%
+MZU/&1P<`Z3@#```/MD0D+XT,P,'A`RG!C0R(#[94)":-!-+!X`,IT(T$@HU<
+MA0"-@W1%```YA(W<10``=!>-@W!%```/MD@+BE<)B)0+?$4``/Y`"X!\)";_
+M=1,/MD0D)\9$!0<!BU0D5(E4A0R0#[9'"5`/MEPD,U-5Z/S___^-!-O!X`,I
+MV(T$@X/$#("\A<=%````#X2S````@'T&'P^$G0(```^V7"0OC03;P>`#*=B-
+M!(/!X`*-%"B)5"0@@<)P10``B50D'`'HB40D$.MCD(MT)!#&AMA%```0C;[`
+M10``#[9'!U!3_W0D7/]T)%SH_/___X/$$(7`#X5!`@``_D4&#[9'!T`/MI9V
+M10``.=`/A.G^__^-!-O!X`,IV(T$@_Z$A<=%``"`?08?#X0.`@``BU0D((J"
+MQT4``(M4)!PZ0@9RB^GV`0``B?:`?08`#X7J`0``@^P(:@!J`&B0````#[9$
+M)$-0_W0D;/]T)&SH_/___X/$(.G#`0``QD0%!_^#[`AJ`&H`:/\```!0_W2%
+M#/]T)&SH_/___\9$)#<!@\0@Z>$```"-=@#&1"07`,=$)!@`````BU0D&(T$
+M4HG"P>(&`="+5"08C01"BU0D5#E4Q11U?;L`````BU0D&(T$4HG"P>(&`="+
+M5"08C01"C3S%`````(UV`(T$6XT$QXT,*(UQ((!^$/]U/H!]!A\/A"@!``"#
+M[`B-02A0C5$0#[="%E`/MD(44/]Q(/]T)&S_="1LZ/S___^#Q""%P'4)_D4&
+MQD80\(GV0X'[@0```':G_T0D&(-\)!@##X95____@'T&``^%T@```+(`@'T$
+M`'84#[;"@'P%!P$/A/G^__]".%4$=^R`?"07``^%JP```(/L"&H`:@!HX@``
+M``^V1"1#4/]T)&S_="1LZ/S___^#Q"#IA````+,`@'T$`'8K#[;3C032P>`#
+M*="-!(*-A(7010``@'@(_70*@'@(_W0$QD`(_D,X701WU0^V5"0OC032P>`#
+M*="-!(*+M(7@10``LP`/ML.-%$")T<'A!@'*C110C535`(U"$(!X"`%U$\9`
+M"`"#[`C_<A3_="1<_]:#Q!!#@/L#=LJ)]H/$/%M>7UW#55=64X/L!(M\)!R+
+M;"0DBD0D((A$)`.+3"08QD4`_K,`O@````"`>00`=C8/MM.-!-+!X`,IT(T$
+M@HT$@3FXY$<``'47B?(Z5"0#=0N*@-A%``"(10#K"D:-=@!#.%D$=\J#Q`1;
+M7E]=PXGV55=64X/L#(ML)""*1"0LB$0D"XGNBD4%.D4$=03&104`#[9^!;,`
+M#[;#C11`B='!X08!RHT44(T$UHM4)"0Y4!1U1<9`&`&_`````(!^!`!V:(GX
+M#[;0C032P>`#*="-!(*-!(:+5"0D.9#D1P``=0V*@-A%``"#P`,\`78\1XGX
+M.$8$=\SK,@^VPXT40(G1P>$&`<J-%%"-!-:#>!0`=0^+5"0DB5`4QD`8`>L,
+MB?9#@/L##X9M____#[;#C11`B='!X08!RHT44+L`````N0(,``"-1-8<B!A`
+M277ZB?@/MM"+1"0DB426#(T$TL'@`RG0C02"N0````"Z9````(V$AG1%``"(
+M"$!*=?J)^`^VT(T$TL'@`RG0C02"N0````"Z``(``(V$AN1%``")]H@(0$IU
+M^HGZ#[;*C03)P>`#*<B-!(&-!(:+?"0DB;CD1P``BU0D,(F0X$4``(V8T$4`
+M`,9#"/_'@-Q%````````BWPD*(L7B9#010``BU<$B5,$BE0D"XB0>D4``(/L
+M"&H`:@!H_P```%'_="0\5>C\_____D8%@\0L6UY?7<.055=64XML)!B+="04
+MOP````"`?@0`#X:6````B?@/MM"-!-+!X`,IT(T$@CFLAN1'``!U<;,!#[;#
+MC12`C130C826D#$``(GZ.%`$=03&0`<!0X#['W;?B?@/MM"-!-+!X`,IT(T$
+M@HT$AL>`Y$<```````"Y`````+ID````C8!T10``B`A`2G7ZB?@/MM"-!-+!
+MX`,IT(T$@L:$AMA%``#]_DX%1XGZ.%8$#X=J____OP````")^@^VPHT40(G1
+MP>$&`<J-%%"-!-8Y:!1U.,=`%`````#&0!@`LP")^@^VPHT40(G1P>$&`<J-
+M%%#!X@.)]@^VPXT$0(T$PL9$,#``0X#[@7;L1XGX/`-VIUM>7UW#55=64X/L
+M'(M,)#2+1"1`BE0D/(A4)!N+?"0PO0````"S`(!\)#@!#X7W````A<`/A-0`
+M``")1"04@'\$`'8ID(GH#[;0C032P>`#*="-!((YC(?D1P``=0<Z7"0;=`E#
+M18GJ.%<$=]B)Z@^VPHT<P,'C`RG#C1R8C1R?C8-T10``@^P$:F10_W0D(.C\
+M____O@````"#Q!"`NW1%````=&B)Z`^VT(T$TL'@`RG0C02"P>`"B40D#(V4
+M.'!%``")5"00D(GR#[;"P>`$BU0D%(T<$(U+9`-$)`P!^(V0Z$<``(N`Z$<`
+M`(E#9(M"!(E!!(M""(E!"(M"#(E!#$:)\(M4)!`X0@1WNXGH#[;0C032P>`#
+M*="-!((/MH2'=$4``.LZD+T`````O@````"`?P0`=B2)\`^VT(T$TL'@`RG0
+MC02".8R'Y$<``'4#18GV1HGR.%<$=]R)Z@^VPH/$'%M>7UW#D)"05E.+1"0,
+MBQ"+,K$`@'HK`'84#[98"8GVB=C3^*@!=09!.$HK=_*`^0-V$0^VP8N$AM`!
+M``"C`````.L/#[;!BX2&T`$``*,`````J0``$``/E<`/ML!;7L.-=@!55U93
+M@^P,BT0D)(M4)""+*HM]`,9`(0#&0"`%QD`C!HE0*,9$)`<`QT0D"`````"S
+M`(!]*P!V&(M,)"`/ME$)B="(V=/XJ`%U!D,X72MW\(#[`W83#[;#QX3'``(`
+M`"P```#K$8UV``^VP\>$QP`"```L````@^P,:!`G``#H_/___X/$$(#[`W85
+M#[;#BX3'!`(``*,`````#[;PZQ.0#[;#BX3'!`(``*,`````#[;P"70D"(#[
+M`W81#[;#QX3'``(``"0```#K#Y`/ML/'A,<``@``)````(/L#&@0)P``Z/S_
+M__^#Q!"`^P-V&0^VPXN$QP0"``"C`````(G&@>;___\`ZQ</ML.+A,<$`@``
+MHP````")QH'F____`(GPP>`("40D"(#[`W83#[;#QX3'``(``"````#K$8UV
+M``^VP\>$QP`"```@````@^P,:!`G``#H_/___X/$$(#[`W85#[;#BX3'!`(`
+M`*,`````B<;K$XGV#[;#BX3'!`(``*,`````B<:!?"0(`0%IEG49BT0D((!(
+M"`:)\,'H$#Q0#Y3`#[;`ZTJ)]H%\)`@!`0``=1*)\,'H$#Q0#Y3`#[;`ZR^-
+M=@"#[`QHB!,``.C\____@\00_D0D!X!\)`<$#X9!_O__B?#!Z!`\4`^4P`^V
+MP(/$#%M>7UW#5E.#[`2+="00BQY6Z/S___^#Q`2$P'44QD8%_X/L"%93Z/S_
+M__^#Q!#K79"Q`(![*P!V$@^V5@F)T-/XJ`%U!D$X2RMW\H/L#%/H_/___XG!
+M@\00A<!T,(U&.(M0!(E(!(D!B5$$B0K^1@J)<2C&02`%QD$A`,9!20]J`6H!
+M45;H_/___X/$$(/$!%M>PXGV55=64X/L#(ML)""+="0DBWT`NPH```"0@^P(
+M5E7H_/___X/$$(3`=1.#[`QHZ`,``.C\____@\002W7<L0"`?RL`=A(/ME4)
+MB=#3^*@!=09!.$\K=_*+5@2+!HE0!(D"_DT*@^P(5E?H_/___X/$$/9%"`)T
+M2H-]*`!U&8/L#%?H_/___X/$$(7`#X1H`0``B44HZP.+12B).(EH5,9`*@#&
+M0"L`QD`F`&:#2#($@^P(4%?H_/___X/$$.DX`0``@WTH``^$S0```(/L"(M%
+M*(/`6%#_=Q3H_/___X/$"/]U*%?H_/___X/$$(U%.(G".44X#X27````B<.0
+M@^P,4NC\____B<:#Q!"#>!P`=&6+0!S'0&``````]D8D!'4E_H=7#```@^P,
+M5^C\____@\0,:@&+1AP/MD`!4%?H_/___X/$$(/L!/]V'/^W)`4``&H!Z/S_
+M__^#Q`S_=AS_MR0%``!J!NC\____QT8<`````(/$$/Y-"H/L"%97Z/S___^#
+MQ!")VCE=.`^%;/___\=%*`````"`?0H`=!:#[`R-13A0Z/S___^)QOY-"H/$
+M$.L.@^P,5^C\____B<:#Q!"%]G0SC44XBU`$B7`$B0:)5@2),OY%"HEN*,9&
+M(`7&1B$`QD8C!L9&(@.#[`A65^C\____@\00@\0,6UY?7<-55U93@^P,BWPD
+M((ML)"2*1"0HB$0D"XI$)"R(1"0*BP>)1"0$N@````"^`````(!_"@!V-XU?
+M.(/L#%/H_/___XG"@\00BT,$B5,$B1J)0@2)$#EJ+'4,BD0D"SA"270+C78`
+M1HGP.$<*=\R)\#A'"G0M@'PD"E!U)L9"(P;&0B(%QD(@!\9"(0"):BR)>BB#
+M[`A2_W0D$.C\____@\00@\0,6UY?7<-55U93@^P,BVPD((M]`,9$)`O_LX"^
+M_____X#[A7<+#[;##[:T.)@$``")\#S_=$@/ML"+CY`%``"-!$"-!,")PL'B
+M!2G"C025`````#EL"`AU)8/L!&H(_W0D+`.'D`4``%#H_/___X/$$(3`=`F)
+M\(A$)`OK!Y!#@/N!=I</MD0D"X/$#%M>7UW#D%575E.!["P"``"*A"1(`@``
+MB$0D'XN4)$`"``"+4@B)5"08BRJ+C"1``@``BDDPB$PD%XN$)$`"``"#P"B)
+MPHN,)$`"```Y02@/A&<"``"`?"07``^$7`(``(E$)`R)]H/L#%+H_/___XUP
+M^(/$!(U$)"Q0#[9$)"]0:@'_="0P_[0D8`(``.C\____OP````"#Q""`?"0@
+M``^&X0```(U6"(E4)!")]H/L!&H(C8:<````4(GY#[;!P>`$C50D+(T<$(U#
+M;%#H_/___X/$$(3`#X29````C5-@BD((@^`/B(:R````9HM.-('AW_W__XG(
+M@\@09HE&-(I"",#H!#P)=0F)R(/(,&:)1C2)^0^VP<'@!(J$!(@```#`Z`0\
+M"G4&9H%.-``"BX0D0`(``(/`*(M0!(M,)!")2`2)1@B)402)"HI&)*@"=#6#
+MX/V(1B2#?AP`="F#[`3_=AS_M20%``!J!NC\____@\00ZQ&01XGX.$0D(`^'
+M*____^L-D(GZ.%0D(`^'"P$``(/L!%9J!O]T)"3H_/___X/$$(!^2P!T'H/L
+M#%7H_/___\<$)`$```#H_/___X/$$(!^2P!UXH.^X`````!T'8/L!&H!#[:&
+MU0```%#_MN````#H_/___X/$$(GV@WXL`'06@^P$:@$/MD9)4/]V+.C\____
+M@\00D(-^'`!T98M&',=`8`````#V1B0$=27^A5<,``"#[`Q5Z/S___^#Q`QJ
+M`8M&'`^V0`%05>C\____@\00@^P$_W8<_[4D!0``:@;H_/___X/$#/]V'/^U
+M)`4``&H!Z/S____'1AP`````@\00BU8$BP:)4`2)`HM,)!C^20J+A"1``@``
+M_D@P@^P(5E7H_/___X/$$/Y,)!>+5"0,BXPD0`(``#E1*'0+@'PD%P`/A:K]
+M__^!Q"P"``!;7E]=PXUV`%575E.!["@"``"+O"1``@``BX0D/`(``(L`B40D
+M&,9$)!<`C5PD'%,/MK0D3`(``%9J`?^T)$@"``!7Z/S___^#Q!Q65_^T)$0"
+M``#H_/___XN$)$@"``"+4"B-:OB#Q!"+A"0X`@``@\`H.<)T*XG"C78`@'TA
+M#70&@'TA(G40QD0D"P'&12(%QD4C!.L+D(M%"(UH^#G0==K&1"0*`(!\)!``
+M#X;L`0``BYPD.`(``(/#*(N4)#@"``"+0BB-</@YV'0U#[9$)`J)Q\'G!)"#
+M[`1J"(V$/(0```!0C8:<````4.C\____@\00A,!U"HM&"(UP^#G8==:-1@@Y
+MV`^%?P$``,9$)`L`@^P,_W0D&.C\____B<:#Q!"%P`^$B`$``(N$)#`"``#^
+M0`K&1B(%QH:P`````,9&(P1FQX:0``````#&AI(`````QT9````%`,=&1```
+M```/MD0D"L'@!(U$!'"*4`2(5B"*4`6(5B&+E"0P`@``B58HBE`(@^(/B):R
+M````9HM.-('AW_W__XG*@\H09HE6-(I`",#H!#P)=0F)R(/(,&:)1C0/MD0D
+M"L'@!(I$!'C`Z`0\"G4&9H%.-``"BX0D.`(``(E&+`^V1"0*P>`$C50D$`'0
+MBE!FB%9)BU!LB9:<````BT!PB8:@````B9:4````B8:8````BX0D.`(``/Y`
+M,(N$)#`"``"#P#B+4`2)<`2)!HE6!(DRC48(BU,$B4,$B5X(B5`$B0(/MD8@
+MJ`)T)Z@$=".H`70?5@^V1DE0_[0D0`(``/^T)#P"``#H_/___X/$$.LAD`^V
+M1B"H`G08J`1T%*@!=1"#[`A6_W0D&.C\____@\00_D0D"HI4)`HX5"00#X<>
+M_O__@'PD"P!T#H/L"&H*5>C\____@\00@<0<`@``6UY?7<.)]E575E.!["P"
+M``"+A"1``@``BP")1"0,BXPD0`(``(I)'(A,)!^+A"1``@``@\`LB<*+M"1`
+M`@``.48L#X1Z`P``A,D/A'(#``")1"08@^P,4NC\____C6C@QP0D`````&H`
+M:@#_M"18`@``_[0D8`(``.C\____B$0D/<9$)#X`@\0@.$0D'@^#\@$``(UV
+M`(/L#&H`#[9\)"Y7:@'_M"18`@``_[0D8`(``.C\____#[;`P>`$@\!D@\0@
+M/0`"```/AWD!``"#[`R-7"0L4U=J`?^T)%@"``#_M"1@`@``Z/S___^#Q!QJ
+M"%6-A"2(````4.C\____@\00A,`/A#T!``"-52"+A"1``@``@\`LBT@$B5`$
+MB44@B4H$B1&*1"0BB$4Q@^P(C40D?%#_M"1,`@``Z/S___^#Q!`\_W0@#[;`
+MC01`C03`B<+!X@4IPHM,)`R+@9`%``"-%)")50R`?"0>`'1/#[9#`]'H@^`!
+MP>`$BE4U@^+O"<*(534/MD,#P>@#@^`!P>`%@^+?"<*(534/MD,#P>@"@^`!
+MP>`#@^+W"<*(536*0P:(A8L```#IG@```(I#`HA%,8NT)$`"``")=0B*0P:(
+MA8L````/MT,$B44X9HM#4&:)A8@```"*0U*(A8H```"+0T")17B+0T2)17R+
+M0TB)A8````"+0TR)A80```"+0Q")14B+0Q2)14R+0QB)15"+0QR)152-?5B-
+M0R#\N08```")QO.EBT,XB45PBT,\B45TZQ:)]OY$)!Z*1"0=.$0D'@^"/O[_
+M_^LK#[9$)!Y05?^T)$P"``#_M"1,`@``Z/S___^#Q!"*3"0=.$PD'@^"'0$`
+M`(U%*(G".44H#X3U````B<>0@^P,4NC\____C5CX@\0,4VH&_[0D3`(``.C\
+M____@\00@'M+`'0BD(/L#/]T)!CH_/___\<$)`$```#H_/___X/$$(![2P!U
+MWX-['`!T<8M#',=`8`````#V0R0$=2F+="0,_H97#```@^P,5NC\____@\0,
+M:@&+0QP/MD`!4%;H_/___X/$$(/L!/]S'(M$)!3_L"0%``!J`>C\____@\0,
+M_W,<BTPD%/^Q)`4``&H&Z/S____'0QP`````@\00BU,$BP.)4`2)`HNT)$`"
+M``#^3@K^33"#[`A3_W0D&.C\____@\00B?HY?2@/A0[___^+A"1``@``_D@<
+M@^P(5?]T)!CH_/___X/$$/Y,)!^+5"08BXPD0`(``#E1+'0+@'PD'P`/A9+\
+M__^!Q"P"``!;7E]=PXGV55=64X'L)`(``(NL)#P"``"+10")1"04_[0D.`(`
+M`%7H_/___\<$)`````!J`&H`5?^T)$P"``#H_/___XA$)"K&1"0K`(/$(#A$
+M)`L/@S,#``"0@^P,:@`/MGPD&U=J`57_M"1,`@``Z/S___\/ML#!X`2#P&2#
+MQ"`]``(```^'[P(``(/L#(U<)!Q35VH!5?^T)$P"``#H_/___X/$&(U$)'10
+M5>C\____@\00//\/A;X"``"#[`S_="08Z/S___^)PX/$$(7`#X31`@``_D4<
+MQD`P`(M$)&R)`XM$)'")0P2#[`B-1"1L4%7H_/___X/$$#S_="`/ML"-!$"-
+M!,")PL'B!2G"BTPD#(N!D`4``(T4D(E3#(I$)!*(0S$/MD0D$]'H@^`!P>`$
+MBE,U@^+O"<*(4S4/MD0D$\'H`X/@`<'@!8/BWPG"B%,U#[9$)!/!Z`*#X`'!
+MX`.#XO<)PHA3-8EK"(I$)!:(@XL```"+1"08B4-`BT0D'(E#1(I$)!>(0S(/
+MMT0D%(E#.(M$)&!FB8.(````BD0D8HB#B@```(M$)%")0WB+1"14B4-\BT0D
+M6(F#@````(M$)%R)@X0```"+1"0@B4-(BT0D)(E#3(M$)"B)0U"+1"0LB4-4
+MC7M8C70D$(/&(/RY!@```/.EBT0D2(E#<(M$)$R)0W2-4R"-12R+2`2)4`2)
+M0R")2@2)$;\`````@'PD$``/A%`!``"#[`S_="08Z/S___^)QH/$$(7`#X1C
+M`0``_D4*QD`B!<:`L`````#&0",$QT!````%`,=`1`````!FQX"0```````/
+MM]?!X@2-5!1PBD($B$8@BD(%B$8AB6XHB5XLBD(&B$9)BD((@^`/B(:R````
+M9HM.-('AW_W__XG(@\@09HE&-(I"",#H!#P)=0F)R(/(,&:)1C0/M\?!X`2*
+M1`1XP.@$/`IU!F:!3C0``@^WQ\'@!(U4)!`!T(M0;(F6G````(M`<(F&H```
+M`(F6E````(F&F````/Y#,(U%.(M0!(EP!(D&B58$B3*-5@B-0RB+2`2)4`2)
+M1@B)2@2)$0^V1B"H`G0:J`1T%J@!=!)6#[9&25!35>C\____@\00ZR`/MD8@
+MJ`)T&*@$=!2H`740@^P(5O]T)!CH_/___X/$$$=F#[9$)!!F.?@/A[#^___^
+M1"0+BDPD"CA,)`L/@L[\__^`?0H`=13&107_@^P(5?]T)!CH_/___X/$$('$
+M'`(``%M>7UW#D%575E.#[!B+;"0LBW0D,&H`:@!J`%95Z/S___^(1"0JLP"#
+MQ"`Z7"0*<R*-?"0+D%</ML-05E7H_/___X/$$(!\)`O^=7Y#.EPD"G+C_DXT
+M@'XT`'16BS[&1C0`BU8LC5K@C48L.<)T6XG"D(-[#`!T#(M#((U8X#G0=?#K
+M1OY&-(/L"%95Z/S____'!"0`````#[:#BP```%!35O^WQ`D``.C\____@\0@
+MZQB#[`A65>C\____@\0(5E7H_/___X/$$)"#Q`Q;7E]=PU=64XM$)!"+&+\*
+M````L@"`>RL`=C@/MG`)B?8/MLJ)\-/XJ`%T(8G(P>`$`<B+A(-<"P``)0``
+M`P#!Z!"#P`B)^3C(<P*)QT(X4RMWSHGZ#[;"6UY?PY!75E.+1"00BQB_"```
+M`+(`@'LK`'8X#[9P"8GV#[;*B?#3^*@!="&)R,'@!`'(BX2#7`L``"4```,`
+MP>@0@\`(B?DXR'8"B<=".%,K=\Z)^@^VPEM>7\.055=64X/L'(M$)#"+*,9$
+M)!<`@'@)``^$]`,``,9$)`\`#[9`"8G"J`%U$9#^1"0/B="*3"0/T_BH`73P
+M#[94)`^)T,'@!`'0C52%`(N"3`L``*D```(`=!`-```$`"7___W_B8),"P``
+M#[94)`^)T,'@!`'0]H2%3@L```0/A+D"```YK20%``!U#(VU8`P``(ET)!CK
+M"HN%)`4``(E$)!B#[`0/MDPD$XG(P>`$`<B-1(4`#[:05PL``%(/MI!6"P``
+M4@^VD%4+``!2#[:05`L``%(/MI!3"P``4@^VD%(+``!2#[:040L``%(/MH!0
+M"P``4`^V12E046CH"```Z/S___^#Q#!FQT0D%(``#[94)`^)T,'@!`'0C82%
+M4`L``(E$)!`/MT0D%(M4)!AF#[:$$)@$``!F/?\`=#D/M\"-!$"-!,")PL'B
+M!2G"BTPD&(N!D`4``(T<D(M\)!"Y"````/R)WO.F#Y?"#Y+`.,(/A'4!``!F
+M_T0D%&:!?"04@0!VH8/L#%7H_/___XG#@\00A<`/A'8"```/ME0D#XG0P>`$
+M`=#VA(5-"P``!'0$@$LU`@^V5"0/B=#!X`0!T/:$A4X+```$=`2`2S40#[94
+M)`^)T,'@!`'0]H2%30L```AT!(!+-00/ME0D#XG0P>`$`=#VA(5."P``"'0$
+M@$LU(`^V5"0/B=#!X`0!T/:$A4T+```"=`2`2S4!#[94)`^)T,'@!`'0]H2%
+M3@L```)T!(!+-0C&0S``#[94)`^)T,'@!`'0C42%`(N04`L``(D3BX!4"P``
+MB4,$BT0D,(E#"%#H_/___XB#BP```(M4)#3^0ARQ`(/$!(!]*P!V)(MT)#`/
+MMD8)T_BH`700#[9$)!>(3!A`_D,R_D0D%T$X32MWW(U3((M$)#"#P"R+2`2)
+M4`2)0R")2@2)$8M$)##^0#2#[`QH``````^V@XL```!04_]T)$C_M<0)``#H
+M_/___X/$(.DE`0``@^P,#[9#!U`/MD,&4`^V0P50#[9#!%`/MD,#4`^V0P)0
+M#[9#`5`/M@-0:#@)``#H_/___X/$*(M4)#C&0@7_4E7H_/___X/$$.G7````
+MC78`#[94)`^)T,'@!`'0C72%`/:&3@L```@/A+<```"#[`Q5Z/S___^)PX/$
+M$(7`#X2A````QD`C!L9`(@5FQX"0``````#&0"`&QD`A`,=`0```!0#'0$0`
+M````BY90"P``B9"<````BX94"P``B8.@````B9.4````B8.8````BTPD,(E+
+M*%'H_/___XB#L@```&:#2S00_W0D-.C\____@\0(/`EV!F:!2S0``HMT)##&
+M1@H!B?"#P#B+4`2)6`2)`XE3!(D:@^P(4U7H_/___X/$$)"#Q!Q;7E]=PU57
+M5E.#[`R+="0@BWPD)+``A?]T`XI'!0^VP+T`````A<!T$#W_````#X1+`0``
+MZ8P%``")Z@^VPHJ$,!X%```\_W02#[;0C012P>`#*="-O(8H`0``18GI@/D#
+M=M:]`````)")Z@^VPHJ$,!X%```\_W0T#[;0C012P>`#*="-O(8H`0``]D<&
+M`G00@^P(:@!7Z/S___^#Q!#K#(/L#%?H_/___X/$$$6)Z8#Y`W:T9@^V1B9F
+M.8:D"0``#X7^!```A?\/A9H```"`?CD`#X7L!```QD8Y`;L`````C78`#[?3
+MBXR6F`(``(7)="Z#>7``="B+07#'07``````QX26F`(```````"#[`1J_U'_
+M<7C_T(/$$.L_C78`#[?3@[R6F`(```!T+XN$EI@"``"#>'0`="*+073'070`
+M````QX26F`(```````"#[`S_<7C_T(/$$(GV0V:#^S]V@>E<!```QD<%_X/L
+M"%=6Z/S___^#Q!#I1@0``,9$)`L`D`^V1"0+BH0P'@4``#S_#X3L````#[;0
+MC012P>`#*="-O(8H`0``@'\%_P^$T````+T`````@'\*``^&M0```(U?.(/L
+M#%/H_/___XE$)!2#Q!"+0P2+5"0$B5,$B1J)0@2)$(!Z(O]T?X"ZL0````!T
+M:P^V0B"H`G0>J`1T&J@!=!92#[9"25#_<BQ7Z/S___^#Q!#K1XGVBTPD!`^V
+M02"H`G48J`1T%*@!=!"#[`A15NC\____@\00ZR*0BU0D!`^V0B"H`G05J`1T
+M$:@!=0V#[`A25NC\____@\00N`$```#I7@,``)!%B>DX3PH/AT[___^X`0``
+M`.E'`P``B?;^1"0+@'PD"P,/AO'^___&1"0+`(!^.0`/A9X```"[`````)`/
+MM\.+C(:8`@``9@^VE#"8!```A<ET;8-Y<`!T9X-Y8`!U86:!^O\`=#(/M]*+
+MOE@%``"-!-+!X`(IT,'@`_9$.",$=!>`?#@A`'40@^P$4E%6Z/S___^#Q!#K
+M*(M1<`^WP\>$AI@"````````QT%P`````(/L!&K_4?]Q>/_2@\00B?9#9H/[
+M/P^&<?___\9&.0'IA`(```^V1"0+BH0P'@4``#S_#X1@`@``#[;0C012P>`#
+M*="-O(8H`0``O0````"`?PH`#X8_`@``C78`@^P,C5\X4^C\____B40D%(/$
+M$(M#!(M4)`2)4P2)&HE"!(D0@'HB_P^%`@(``&:+2AAFB4PD`@^WP68/MI0P
+MF`0``&:)%"2+G(:8`@``BTPD!(I!)*@$=&*%VW1>@WMP`'18@WM@`'52@^#[
+MB$$D]D$C!'03@^P$#[?"4%-6Z/S___^#Q!#K,XM3<`^W1"0"QX2&F`(`````
+M``#'0W``````BT0D!,=`'`````"#[`1J_U/_<WC_TH/$$(M4)`3V0B,$#X0^
+M`0``QH*P`````(!G".?V0B0!#X3Z````@&(D_H-Z'`!T4H!Z(0!U+?9"(P1T
+M)X/L!`^W5"0&#[9&*<'@!@'"4O^V)`4``&H'Z/S___^#Q!#I[````(/L!(M,
+M)`C_<1S_MB0%``!J`>C\____@\00Z<T```"%VW1C@WMP`'1=BT0D!(!X(0!U
+M'O9`(P1T&(/L!`^W1"0$4%-6Z/S___^#Q!#IFP```(M3<`^W1"0"QX2&F`(`
+M``````#'0W``````BTPD!,=!'`````"#[`1J_U/_<WC_TH/$$.MFBT0D!(!X
+M(0!U7/9`(P1T5H/L!`^W5"0&#[9&*<'@!@'"4O^V)`4``&H"Z/S___^#Q!#K
+M,HUV`(M4)`2#>AP`="6+0AR#>'0`=!R+4'3'0'0`````@^P,BTPD$(M!'/]P
+M>/_2@\00BT0D!/9`)`)T'X/L!/]P'/^V)`4``&H&Z/S___^+5"04@&(D_8/$
+M$)!%B>DX3PH/A\3]___^1"0+@'PD"P,/AGW]__^0N`$```"#Q`Q;7E]=PXUV
+M`%575E.#[`R+7"0DBVLH#[=#&+H`````BTPD(("\")@$``#_#X20`@``#[9#
+M(H/X#P^$]@```(/X#W\Y@_@,#X2T````@_@,?Q.#^`5T3X/X"P^$D````.E8
+M`@``@_@-#X2D````@_@.#X2L````Z4$"``"0@_@9?P^#^!A]5H/X%'0MZ2P"
+M``"#^!MT-#W_````#X28````Z1<"``"#[`AJ`5/H_/___X/$$.D$`@``@^P,
+M4^C\____@\00Z?,!``"#[`AJ`%/H_/___X/$$.G@`0``@^P(:@%3Z/S___^#
+MQ!#IS0$``(/L#%/H_/___X/$$.F\`0``@^P,4^C\____@\00Z:L!``"#[`Q3
+MZ/S___^#Q!#IF@$``(/L#%/H_/___X/$$.F)`0``D,9#(O^)7"0(OP````"`
+M?0H`#X;%````C74XB?:#[`Q6Z/S___^)PX/$$(M&!(E>!(DSB4,$B1B`>R+_
+M#X2'````@'LA``^%A0```("[L0````!T:`^V0R"H`G0<J`1T&*@!=!13#[9#
+M25#_<RQ5Z/S___^#Q!#K1`^V0R"H`G4<J`1T&*@!=!2#[`A3_W0D+.C\____
+M@\00ZR*)]@^V0R"H`G08J`1T%*@!=1"#[`A3_W0D+.C\____@\00N@$```#I
+MQP```(GVQH.Q`````)!'B?@X10H/AT#___^)^3A-"@^%C0```(M$)`B`>"$B
+M=`:`>"$-=1B#[`AJ"O]T)!3H_/___[H!````@\00ZWZ_`````(!]"@!V6HUU
+M.(UV`(/L#%;H_/___XG#@\00BT8$B5X$B3.)0P2)&(![(2)T!H![(0UU)8/L
+M"%-H6`(``.C\____@\0(:@I3Z/S___^Z`0```(/$$.LCB?9'B?DX30IWK,9%
+M!?^#[`A5_W0D+.C\____@\00N@$```")T(/$#%M>7UW#D%575E.#[`R+7"0D
+MBVLH#[=#&+H`````BTPD(("\")@$``#_#X1L!@``#[9#(H/X"0^$4P,``(/X
+M"7\]@_@%#X3<````@_@%?Q>#^`,/A((```"#^`0/A*0```#I,`8``(/X!P^$
+M#`,``(/X!P^/[P(``.EV`@``D(/X%@^$N`(``(/X%G\B@_@4#X0B`P``@_@4
+M#X][`@``@_@*#X3\`@``Z>H%``")]H/X&@^$'`(``(/X&G\.@_@7#X2.`@``
+MZ<P%```]_P````^$Y@(``.F\!0``BT48@6`H___^_VH`:@%3_W,HZ/S____'
+M!"0%````Z/S___^#Q!#ID04``&H`:@!3_W,HZ/S____'!"10PP``Z/S___^#
+MQ!#I<`4``,9$)`L`BWPD((!_*P!V'P^V50F0B="*3"0+T_BH`74.08A,)`N+
+M?"0@.$\K=^8/MD,@J`)T#*@$=`BH`0^%PP```(M5&(M"**D```$`=`TE___^
+M_XE"*.FI````OA`G``"*1"0+B$0D"@^V^(M,)""+$8!\)`L#=AL/MD0D"XN$
+MPH`!``"C`````"4```$`ZQ2-=@"+A/J``0``HP`````E```!`(7`=":`?"0*
+M`W80QX3Z@`$``````0#K#HUV`,>$^H`!``````$`A<!U%8/L#&CH`P``Z/S_
+M__^#Q!!.=8KK!(7V=1W&0R,"QD,B_X/L"%/_="0LZ/S___^#Q!#I:P0``/9%
+M!@%T/8/L"%-5Z/S___^#Q!"$P'4LOOH```"-=@"#[`A35>C\____@\00A,!U
+M$X/L#&CH`P``Z/S___^#Q!!.==R`?"0+`W8@#[9,)`N+?"0@BQ>+A,J``0``
+MHP````")A,J``0``ZSX/MG0D"XM$)""+"(!\)`L#=@Z+A/&``0``HP````#K
+M%P^V1"0+BWPD((L7BX3"@`$``*,`````B83Q@`$``(/L"%/_<RCHAR0``,<$
+M)"!.``#H_/___X/$$.FC`P``@^P(#[=#&%!H<`D``.C\____@\0(4_]S*.CE
+M*0``@\00Z7T#``"#[`@/MT,84&AL`@``Z/S___^#Q`A3_W,HZ"<J``"#Q!#I
+M5P,``(/L"%/_<RCH&R0``(/$$.E#`P``@^P(4_]S*.CC)P``@\00Z2\#``"#
+M[`A3_W,HZ%LG``"#Q!#I&P,``(/L"%/_<RCH+R@``(/$$.D'`P``@^P(4_]S
+M*.B#*```@\00Z?,"``"#[`A3_W,HZ-<H``"#Q!#IWP(``,9#(O\/MD,@J`)T
+M"*@$=`2H`745@WLP`'4/5>C\____B(.R````@\0$]D4(`@^$8`$``(M]*`^V
+M5RH/MD<?2#G"?2W^1RK^1RO&1R8`9HM',H/@_H/("&:)1S*#[`A7_W0D+.C\
+M____@\00Z6\"``#&1"0+`(!]"@`/AL````"-=3B#[`Q6Z/S___^)PX/$$(M&
+M!(E>!(DSB4,$B1B`>R+_#X2`````@+NQ`````'1K#[9#(*@"=!^H!'0;J`%T
+M%U,/MD-)4/]S+%7H_/___X/$$.M'C78`#[9#(*@"=1RH!'08J`%T%(/L"%/_
+M="0LZ/S___^#Q!#K(HGV#[9#(*@"=!BH!'04J`%U$(/L"%/_="0LZ/S___^#
+MQ!"Z`0```.F_`0``B?;&@[$`````_D0D"XI$)`LX10H/AT/____V1S*`=!_V
+M1RT#=!G&1R8`@^P(5_]T)"SH_/___X/$$.E[`0``QD4%_\9')@!FBT<R@^#S
+M@\@"9HE',H!G+?Z#[`A5_W0D+.C\____@\00Z4P!``#&1"0+`(!]"@`/AL4`
+M``"-=3B)]H/L#%;H_/___XG#@\00BT8$B5X$B3.)0P2)&(![(O\/A(H```"`
+M>R$`=7V`N[$`````=&@/MD,@J`)T'*@$=!BH`7044P^V0TE0_W,L5>C\____
+M@\00ZT0/MD,@J`)U'*@$=!BH`704@^P(4_]T)"SH_/___X/$$.LBB?8/MD,@
+MJ`)T&*@$=!2H`740@^P(4_]T)"SH_/___X/$$+H!````Z9<```")]L:#L0``
+M``#^1"0+BDPD"SA-"@^'0/___XI$)`LX10IU6,9$)`L`@'T*`'9-C74X@^P,
+M5NC\____B<.#Q!"+1@2)7@2),XE#!(D8@'LA(G0&@'LA#746@^P(:@I3Z/S_
+M__^Z`0```(/$$.LJD/Y$)`N*3"0+.$T*=[;&107_@^P(5?]T)"SH_/___X/$
+M$(UV`+H!````B="#Q`Q;7E]=PY!55U93@^P,BWPD((MT)"2+%XM>5`^V1B:#
+M^!D/A[<#``#_)(7D'@``]D8R!'0,9L=&,@$`QD8F`>L\9H-^,B!U#&;'1C((
+M`,9&)@WK*?9&,H!T&?9&+0-T$V:+1C(D?X/("&:)1C+&1B8-ZPKV1C((=`3&
+M1B8'@^P(5E?H_/___X/$$.E0`P``BX($`0``HP````"#R%")@@0!``!J`6H"
+M:@%6Z/S___^#Q!#I*`,``&H!:@!J`5;H_/___X/$$.D4`P``:@%J`6H!5NC\
+M____@\00Z0`#``!J`6I@:@%6Z/S___^#Q!#I[`(``(/L#&H!#[9&+%!J8&H!
+M5NC\____@\0@Z=`"``"#[`QJ`6@```$$:B%J`5;H_/___X/$(.FT`@``@^P,
+M:@%J`6H":@!6Z/S___^#Q"#IFP(``(/L#&H!:@!J`FH`5NC\____@\0@Z8("
+M``"+0QB!8"C___?_@^P,:@%J`6H":@!6Z/S___^#Q"#I7P(``(/L#&H!:@!J
+M`FH`5NC\____@\0@Z48"``!J`6H":@!6Z/S___^#Q!#I,@(``&H!:@!J`%;H
+M_/___X/$$.D>`@``:@%J`6H`5NC\____@\00Z0H"``"+0QB!8"C___?_@^P,
+M:@%J_VH!:@!6Z/S___^#Q"#IYP$``&H!:@!J`%;H_/___X/$$.G3`0``#[9&
+M*XMLACR)72B)=3"*1BN(14G&12(#QD4A`(!-(`7^0PJ-0SB+4`2):`2)10")
+M502)*H/L#&B`&@8`Z/S____&1"0;`(/$$(!_*P!V&@^V4PF)T(I,)`O3^*@!
+M=0I!B$PD"SA/*W?JBU,8BT(HJ0``"`!T"B7___?_B4(HZU.[F#H```^V="0+
+MD(!\)`L#=AF+!XN$\(`!``"C`````*D```@`=2SK%XGVBP>+A/"``0``HP``
+M``"I```(`'43@^P,:.@#``#H_/___X/$$$MUN(/L"%57Z/S___^#Q!#I[@``
+M`(/L#&A`#0,`Z/S___]J`&H@:@%6Z/S___^#Q!1H$"<``.C\____@\00Z<``
+M``!J`&H!:@!6Z/S____'!"00)P``Z/S___^#Q!#IH````(M#&(%@*/__]_^#
+M[`QJ`&K_:@%J`%;H_/___X/$%&@0)P``Z/S___^#Q!#K<VH`:@!J`%;H_/__
+M_\<$)!`G``#H_/___X/$$.M6:@!J(&H!5NC\____QP0D$"<``.C\____@\00
+MZSF#[`A65^C\____@\00ZRJ#[`A65^C\____@\00ZQN#[`QJ`6CP````:)L`
+M``!J`5;H_/___X/$()"X`0```(/$#%M>7UW#C78`55=64X/L'(M$)#"+`(E$
+M)!C&1"03`(M4)#"`>BL`#X:U`@``#[9,)!.)R,'@!`'(BW0D,(T<AO:#7@L`
+M`!`/A(`"``"-DU`+``"X`0```-/@"$()BYL\"P``B5PD%/9""`(/A/0```"*
+M7"030SA>*P^&Y@````^V5"03B=#!X`0!T(T$AHE$)`2-=@`/MO.)\,'@!`'P
+MBU0D,(T\@O:'7@L``!`/A*(```"+;"0$]X5,"P`````.``^$C@```(/L!&H(
+MC8]0"P``B4PD%%&-A5`+``")1"044.C\____@\00A,!T9X/L!&H(C8=$"P``
+M4(V%1`L``%#H_/___X/$$(3`=$BX`0```(GQT^"+="0("D8)B$8)BU0D#(A"
+M"8-\)!0`=0R+OSP+``")?"04ZQL/MM.)T,'@!`'0BW0D%(M,)#")M($\"P``
+MB?9#BT0D,#A8*P^',O___XGV@WPD%``/A;4```"#[`S_="0\Z/S___^)1"0D
+M@\00A<`/A%<!```/ME0D$XG0P>`$`="+5"0PC02"BTPD%(F(/`L``(V0.`L`
+M`(E1&(J`6`L``(A!!L9!!0"+7"0PB1G&00H`QD$T`,9!'`"*7"030XMT)#`X
+M7BMV8@^V5"03B=#!X`0!T`^VE(99"P``C78`#[;+B=#3^*@!=!:)R,'@!`'(
+MBW0D%(M,)#")M($\"P``0XM$)#`X6"MWU>L>C78`#[94)!.)T,'@!`'0BTPD
+M%(M4)#")C((\"P``#[9,)!.)R,'@!`'(BUPD,(V$@U`+``"*4`F+="04B%8)
+M#[98"8!\)!,#=A&+1"08QX3(``(``#@```#K%`^V1"03BU0D&,>$P@`"```X
+M````@^P,:!`G``#H_/___X/$$(!\)!,#=A4/MD0D$XM,)!B)G,$$`@``ZQ.-
+M=@`/MD0D$XMT)!B)G,8$`@``_D0D$XI$)!.+5"0P.$(K#X=+_?__@\0<6UY?
+M7<.-=@!75E.+?"00BEPD%(LW@/L#=A(/ML/'A,8P`@``#````.L0B?8/ML/'
+MA,90`@``#````(/L#&@0)P``Z/S___^#Q!"`^P-V$0^VPXN$QC0"``"C````
+M`.L/#[;#BX3&5`(``*,`````B<&!X0``/P#!Z1`/MM.)T,'@!`'0C92'4`L`
+M`(I""(/@_(A""(/Y$'4+@\@"B$((ZQ6-=@`/MM.)T,'@!`'0@(R'6`L```%;
+M7E_#B?975E.#[""+7"0TBT0D,(LXO@````"-=@"#^P-V$XT$M0`!``")A-\`
+M`@``ZQ&-=@"-!+4``0``B83?``(``(/L#&@0)P``Z/S___^#Q!"#^P-V$8N$
+MWP0"``"C`````.L/C78`BX3?!`(``*,`````B02T1H/^!G:?B>;\N0<```"+
+M?"0X\Z6#Q"!;7E_#B?975E.#[""+7"0TBT0D,(LXO@````"-=@"#^P-V$XT$
+MM1P!``")A-\``@``ZQ&-=@"-!+4<`0``B83?``(``(/L#&@0)P``Z/S___^#
+MQ!"#^P-V$8N$WP0"``"C`````.L/C78`BX3?!`(``*,`````B02T1H/^!G:?
+MB>;\N0<```"+?"0X\Z6#Q"!;7E_#B?:+3"0$B@'`Z`2)PH/B!_9!`@1T`X#.
+M`O9!`P1T!H'*```"`/9!`@AT`X#."/9!`PAT!H'*```(`/9!`@)T`X#.!/9!
+M`P)T!H'*```$``^V013!X!@)PHG0PXUV`/]T)`3H_/___X/$!,.-=@!55U93
+M@^Q$BVPD6(I$)%R(1"07BU4`B50D$`^VT(G0P>`$`="-1(4`B:@X"P``QH!9
+M"P```%)5Z/S___^#Q!"Y`````+H@````C40D$(UV`(@(0$IU^H/L!(UT)!16
+M#[9\)!=75>C\____B?O!XP0!^XU<G0!6Z/S___^)@T`+``"+1"0PB8-$"P``
+MBT0D-(F#2`L``(V37`L``(/$%(!\)`\#=A*+3"0(BX2YT`$``*,`````ZQ4/
+MMD0D#XM<)`B+A(/0`0``HP````")`@^V5"0/B=#!X`0!T(V,A6`+``"`?"0/
+M`W82BUPD"(N$TX`!``"C`````.L5#[9$)`^+5"0(BX3"@`$``*,`````B0$/
+MME0D#XG0P>`$`="-1(4`]H!>"P``$`^$0P$``/:`6`L```)T6[D`````NB``
+M``"-1"00C78`B`A`2G7Z@^P$C7PD%%</MG0D%U95Z/S___^)\\'C!`'SC5R=
+M`%?H_/___XF#3`L``(M$)#")@U`+``"+1"0TB8-4"P``@\04ZQ</ME0D#XG0
+MP>`$`=#'A(5,"P```0`"`(!\)`\#=A8/MD0D#XM,)`C'A,$P`@``&````.L4
+M#[9$)`^+7"0(QX3#4`(``!@```"#[`QH$"<``.C\____@\00@'PD#P-V&0^V
+M1"0/BU0D"(N$PC0"``"C`````(G!ZQ</MD0D#XM,)`B+A,%4`@``HP````")
+MP0^V5"0/B=#!X`0!T/>$A5P+``````,`=0B!X?___]_K!H')````((!\)`\#
+M=A(/MD0D#XM<)`B)C,,T`@``ZQ`/MD0D#XM4)`B)C,)4`@``@\0\6UY?7<.-
+M=@"+5"0$BX(X!0``)?___P`]4`&3`'42BH([!0``P.@$N@$````\#'0%N@``
+M``")T,-55U93@^P<BWPD,(LWQD0D$%"-7"00QD,!!<9#`@3&0P,PQD,$$<9#
+M!:O&0P8`QD,'`,>'7`P````````YOR0%```/A=0```"-KV`,``"#[`QJ`6H(
+MC8<X!0``4&@```(`5^C\____BX<P!0``BI<[!0``C42"_(B'.P4``(/$(%?H
+M_/___X/$!(3`=1.+1"00B8<X!0``BT,$B8<\!0``H0````"*ESL%```!PD"C
+M`````(B7.P4``(J'.`4``(B%.`4``(J'.04``(B%.04``(J'.@4``(B%.@4`
+M`(J'.P4``(/``HB%.P4``(J'/`4``(B%/`4``(J'/04``(B%/04``(J'/@4`
+M`(B%/@4``(J'/P4``(B%/P4``,>'7`P```````"+A@`!``"C`````"7__P``
+MJ"!U%(/(((F&``$``(N&``$``*,`````BP?'@`0!````````BP?'@!@!````
+M````BP?'@!P!````````@^P,:("$'@#H_/___\>&<`$``!@!``"+AG0!``"C
+M`````(#D_<>&<`$``!@!``"`S`2)AG0!``#'AG`!```H`0``QX9T`0``?W\`
+M`,>&<`$``"0!``"+AG0!``"C`````"4``/__QX9P`0``)`$```W_/P``B89T
+M`0``QX9P`0``/`$``,>&=`$`````>@#'AG`!``"D`0``QX9T`0``?;_O_\>&
+M<`$``+@!``"+AG0!``"C``````^WP,>&<`$``+@!```-``#Z`(F&=`$``,>&
+MG````/\```#'AI`"``!$`0``QX:4`@``!A``",>&D`(``+0!``#'AI0"``!?
+M<```QX:0`@``,````(N&E`(``*,`````,.2`S#.)AI0"``#&1"0?`(/$$(!_
+M*P`/AK8"``")]H!\)`\#=A4/MD0D#\>$QC`"```(````ZQ.-=@`/MD0D#\>$
+MQE`"```(````@^P,:!`G``#H_/___X/$$(!\)`\#=A4/MD0D#XN$QC0"``"C
+M`````.L3B?8/MD0D#XN$QE0"``"C`````(!\)`\#=A0/ME0D#PT``(``B836
+M-`(``.L2D`^V5"0/#0``@`")A-94`@``@^P$C8<X!0``4`^V7"074U?H_/__
+M_X/$"%-7Z/S___^#Q!"`?"0/`W8-QX3>,`(``$0!``#K$`^V1"0/QX3&4`(`
+M`$0!``"#[`QH$"<``.C\____@\00@'PD#P-V%0^V1"0/QX3&-`(```80``CK
+M$XUV``^V1"0/QX3&5`(```80``B`?"0/`W85#[9$)`_'A,8P`@``M`$``.L3
+MC78`#[9$)`_'A,90`@``M`$``(/L#&@0)P``Z/S___^#Q!"`?"0/`W85#[9$
+M)`_'A,8T`@``7W```.L3C78`#[9$)`_'A,94`@``7W```(!\)`\#=A4/MD0D
+M#\>$QC`"```(````ZQ.-=@`/MD0D#\>$QE`"```(````@^P,:!`G``#H_/__
+M_[C_5(``@\00@'PD#P-V%`^V5"0/)?]4``")A-8T`@``ZQ*0#[94)`\E__]_
+M_8F$UE0"``"#[`1J`0^V7"074U?H_/___\<$)""A!P#H_/___X/$$(!\)`\#
+M=A"+A-Z``0``HP````#K$XGV#[9$)`^+A,:``0``HP`````E___^_X!\)`\#
+M=@\/ME0D#XF$UH`!``#K#9`/ME0D#XF$UH`!``"X!0'(`(!\)`\#=A`/ME0D
+M#XF$UH0!``#K#HGV#[94)`^)A-:$`0``@^P,:*"&`0#H_/___X/$"`^V1"07
+M4%?H_/___X/$$/Y$)`^*1"0/.$<K#X=,_?__@^P,5^C\____BX8$`0``HP``
+M``"#R`*)A@0!``"+A@`!``"C`````(/@_8/(#8F&``$``(N&``$``*,`````
+MBX?D"0``B88(`0``BX?H"0``B88,`0``BX<("@``B880`0``BX<,"@``B884
+M`0``QX8@`0````````^WAS0+```E_P\```T```$`B88@`0``BX=0"@``B88D
+M`0``BX=4"@``B88H`0``BX=P"@``QP#_#P``QX8T`0````````^WAS8+```E
+M_P\```T```$`B88T`0``BX=T"@``B88X`0``BX=X"@``B88\`0``QX9(`0``
+M`````,>&3`$````!``"+A@0!``"C`````(/(68F&!`$``,>&5`$``/O_``S'
+MAEP!``#__P``@\0L6UY?7<.-=@!3@^P4BUPD'%/H8OG__[(`@\00D`^VPL>$
+M@[`%````````QT2#1`````!"@/H/=N1FQX,P"P``_P]FQX,R"P``_P_&0S@!
+MN`$```"#Q`A;PXM4)`2+3"0(N``````YR'T<C78`@#P"`'0.@#P"('0(N```
+M``##B?9`.<A\Y[@!````PY!55U93@^P\BVPD5&:!?1"%``^'G0````^W11"+
+M5"10@+P0F`0``/\/A(<```!F@WT0?W<D#[:4$)@$``"+7"10BXM8!0``C032
+MP>`"*="+1,$HBD@$ZU^09H%]$($`=RP/MT40BWPD4`^VA#B8!```BX^0!0``
+MC01`C03`B<+!X@4IPHM$D0B*2`3K*@^W11"+5"10#[:$$)@$``"+DG0%``"-
+M!$"-!("+1,)4BD@$ZP6-=@"Q_[+_9H%]$(4`=P\/MT40BUPD4(J4&)@$``"`
+M^?]T'`^VP8M\)%"`O#@>!0``_W0+@/K_=`:`?10&=32#?5``=!:#[`B-15!0
+M_W0D7.C\____@\00C78`@^P(5?]T)%SH_/___X/$$.D+!P``C78`#[;!BTPD
+M4`^VM`@>!0``C01VP>`#*?"-M($H`0``#[;2C032P>`"*="+D5@%``"-',)F
+M@;N0````JPUW!X!]%`)U1Y"#?5``=!:#[`B-15!0_W0D7.C\____@\00C78`
+M@^P(5?]T)%SH_/___\9#(O_&0R,"@\0(4_]T)%SH_/___X/$$.E^!@``#[9%
+M)(/X&@^$C@4``(/X&G\E@_@2=$R#^!)_#87`#X0W!0``Z1P&``"#^!4/A`0&
+M``#I#@8``(/X)0^$CP(``(/X)7\.@_@;#X0$!0``Z?(%```]G@````^$<`,`
+M`.GB!0``@'T4``^%0@(``(M--(!])0!T8H![(AD/E,"#P`N(0R*%R71#@'D!
+M@'4]@'D"`'4W@'D#/'<Q#[9Q`[H4````C4-,Q@`@0$IU^8/^$W8%OA0```"-
+M4TR-002#[`164%+H_/___X/$$&;'@Y```````.EM!0``QD,B&/9!!D!U#P^V
+M`8/@'X/X#0^%/`$```^V`8/@'X/X#74&QD,A#>L$QD,A(H/L"`^V0R%0:(("
+M``#H_/___X/$$(-]4`!T$X/L"(U%4%#_="1<Z/S___^#Q!"#[`A5_W0D7.C\
+M____QD0D/P"#Q!"`?@H`=C>-;CB#[`Q5Z/S___^)PX/$$(M%!(E=!(DKB4,$
+MB1B`>R$B=`:`>R$-=0W^1"0OBEPD+SA>"G?,BD0D+SA&"@^%ZP0``&;'1"0L
+M``#'1"0H`````,9$)"\`@'X*`'9.C6XX@^P,5>C\____B<.#Q!"+102)702)
+M*XE#!(D8@'LA(G0&@'LA#747BU0D+&8Y4QAR#8E<)"AFBUL89HE<)"S^1"0O
+MBDPD+SA."G>U@WPD*``/A'@$``"+7"0H@'LB_P^$:@0``,9#(O^#[`A3_W0D
+M7.C\____@\00Z5$$```/M@&#X!^#^`%U#<9#(0'&0R+_Z0`$``#V004!=`3&
+M0R(9@WTT``^$[`,``(M]-(E\)#"Y`````+HH````C4-@B`A`2G7ZN0````"Z
+M"````(V#B````(@(0$IU^HU#8(MT)#"#Q@C\N08```")Q_.EBU0D,(M"((F#
+MB````.F6`P``9O^#D````(/L#&@0)P``Z/S____&0R(%@\00Z78#``"+332)
+M3"0TBT4XBD`"@^`/@'T4`'5_#[91!P^V00;!X`@!P@^V007!X!`!P@^V003!
+MX!@!PHF3K`````^V40,/MD$"P>`(`<(/MD$!P>`0`<(/M@'!X!@!PHE30,=#
+M1`````"#NZP`````=2!F_X.0````@^P,:!`G``#H_/___\9#(@N#Q!#IZ@(`
+M`,9#(@WIX0(``(!]%"!U*#P&=`0\`G4@9O^#D````(/L#&@0)P``Z/S____&
+M0R(%@\00Z;,"``"#?5``=!.#[`B-15!0_W0D7.C\____@\00@^P(5?]T)%SH
+M_/___X/$#%-6_W0D7.C\____@\00Z;`"``"+13B*0`*#X`^+?32)?"0T@'T4
+M``^%``$```^V5PL/MD<*P>`(`<(/MD<)P>`0`<(/MD<(P>`8`<*)DZP````/
+MME<'#[9'!L'@"`'"#[9'!<'@$`'"#[9'!,'@&`'"B50D((G0P?@?B40D)`^V
+M1P.)PK@``````T0D(!-4)"2)1"08B50D'`^V1P*)PK@`````P>((`T0D&!-4
+M)!R)1"00B50D%`^V1P&)PK@`````P>(0`T0D$!-4)!2)1"0(B50D#`^V!XG"
+MN`````#!XA@#1"0($U0D#(E#0(E31/9'#`%T!6:#2S8$@[NL`````'4@9O^#
+MD````(/L#&@0)P``Z/S____&0R(9@\00Z68!``#&0R(-Z5T!``"`?10@=2@\
+M!G0$/`)U(&;_@Y````"#[`QH$"<``.C\____QD,B&8/$$.DO`0``@WU0`'03
+M@^P(C4504/]T)%SH_/___X/$$(/L"%7_="1<Z/S___^#Q`Q35O]T)%SH_/__
+M_X/$$.DL`0``QD,B%.GJ````@'T4('4QBT4XBD`"@^`//`9T!#P"=2!F_X.0
+M````@^P,:!`G``#H_/___\9#(A2#Q!#ILP```,9#(AOIJ@```(!]%`!U5HM5
+M-(E4)#!FBT,T9H-+-@$,AF:)0S2`>@,`=06`.A9W'6;_@Y````"#[`QH$"<`
+M`.C\____QD,B#8/$$.MFBTPD,/9!!@1T!V:#2S8"ZT!F@V,V_>LY@'T4('4N
+MBT4XBD`"@^`//`9T!#P"=2)F_X.0````@^P,:!`G``#H_/___\9#(@6#Q!#K
+M&F:#8S3YQD,B#NL/@'T4`'4%9H-+-@/&0R(/@WU0`'03@^P(C4504/]T)%SH
+M_/___X/$$(/L"%7_="1<Z/S___^#Q`A3_W0D7.C\____@\00C78`@\0\6UY?
+M7<-55U93@^P,BWPD((M<)"1F@7L0A0`/AXD````/MT,0@+PXF`0``/]T>V:#
+M>Q!_=R`/MI0XF`0``(N/6`4``(T$TL'@`BG0BT3!*(I(!.M7D&:!>Q"!`'<H
+M#[=#$`^VA#B8!```BX^0!0``C01`C03`B<+!X@4IPHM$D0B*2`3K)@^W0Q`/
+MMH0XF`0``(N7=`4``(T$0(T$@(M$PE2*2`3K!8UV`+'_LO]F@7L0A0!W"P^W
+M0Q"*E#B8!```@/G_=!@/ML&`O#@>!0``_W0+@/K_=`:`>Q0&=2R#>U``=!*#
+M[`B-0U!05^C\____@\00B?:#[`A35^C\____@\00Z4H"``")]@^VP0^VM#@>
+M!0``C01VP>`#*?"-M(<H`0``#[;2C032P>`"*="+EU@%``"-+,*+0S2`>Q0`
+M#X2E````@'LF!@^$FP```(![)@P/A)$```!FBY60````C4(!9HF%D````&:#
+M^@EV)(!](@9T'L9%(P+&12+_@&4D_H/L"%57Z/S___^#Q!#IO@$``(/L#&CH
+M`P``Z/S___\/MD4@@\00J`)T):@$="&H`70=@^P,:@!J`@^V14E0_W4L5NC\
+M____@\0@Z8$!``#&12(#@^P(55?H_/___X/$$.EK`0``C78`@'LF`74*QD4B
+M!.DI`0``D(![)@)U"<9%(@7I&0$``(![)@,/A9````"`?2(%=2EF@7@$R#=U
+M(8/L"`^W11A0:*0)``#H_/___X/$$,9%(@;IXP```(UV`(/L"%!5Z/S___]J
+M*(U%8%#H1_7__X/$&(3`=3AJ%(U%3%#H-?7__X/$"(3`=29J"(V%B````%#H
+M(/7__X/$"(3`=1&+140+14!T"<9%(A?IC````,9%(AIF_X60````ZW^`>R87
+M=0;&12(5ZW.`>R88=0;&12(6ZV>`>R8$=0;&12('ZUN`>R8%=0;&12((ZT^`
+M>R8&=0;&12()ZT.`>R8,=0;&12(*ZS>`>R86=0;&12(4ZRN`>R8.=26#>U``
+M=!"#[`B-0U!05^C\____@\00@^P(4U?H_/___X/$$.LP@WM0`'02@^P(C4-0
+M4%?H_/___X/$$(GV@^P(4U?H_/___X/$"%57Z/S___^#Q!"0@\0,6UY?7<-5
+M5U93@^P,BWPD((MT)"1F@7X0A0`/AXD````/MT80@+PXF`0``/]T>V:#?A!_
+M=R`/MI0XF`0``(N/6`4``(T$TL'@`BG0BT3!*(I(!.M7D&:!?A"!`'<H#[=&
+M$`^VA#B8!```BX^0!0``C01`C03`B<+!X@4IPHM$D0B*2`3K)@^W1A`/MH0X
+MF`0``(N7=`4``(T$0(T$@(M$PE2*2`3K!8UV`+'_NO\```!F@7X0A0!W#0^W
+M1A!F#[:4.)@$``"`^?]T!V:!^O\`=2R#?E``=!*#[`B-1E!05^C\____@\00
+MB?:#[`A65^C\____@\00Z<(```")]@^VR0^VG#D>!0``C01;P>`#*=B-G(<H
+M`0``#[?2C032P>`"*="+EU@%``"-+,*`?A0`=#B#[`A1:,0)``#H_/___X/$
+M"(M5!(M%`(E0!(D"_DL*55?H_/___\9#!?^#Q`A35^C\____@\00D(!^)@%U
+M*H/L#&@0)P``Z/S___^#Q`A65^C\____:@%J`%53Z/S___^#Q"#K)XUV`(/L
+M#&A0PP``Z/S___^#Q`A65^C\____@\0(55/H_/___X/$$(/$#%M>7UW#5E.#
+M[!"+="0@BD0D)(A$)`^*1"0HB$0D#HM$)!R+&%/H_/___XG"@\00A<!U#L:&
+ML0````'&1B(#ZVJ0QD`DX<9`)0&`?"0#`1G`]]"#P`*(0B:P#X!\)`(`=0RP
+M`(-^,`!T!(I&29"(0B=FBT889HE"$(E:&,="(`````#'0C0`````N`````"`
+M?"0"`'4%N'`,!@")0FR#[`A24^C\____@\00@\0$6U[#D%575E.#[!B+;"0P
+MBT0D+(LX5^C\____B<.#Q!"%P'4,QH6Q`````>FA````@^P,5^C\____B<:#
+MQ!"%P'46QH6Q`````8/L"%-7Z/S___^#Q!#K>8U3/(E4)`C&0R3AQD,E`<9#
+M)@-FBT489HE#$(M4)""+`HE#&,=#(``"``"+1@B)0S2Y`````+H``@``D(@(
+M0$IU^HES4,=#;'`,!@"#[`AJ`/]T)!3H_/____]S(/]V$/]V#/]T)"3H_/__
+M_X/$&%-7Z/S___^#Q!"#Q`Q;7E]=PXUV`%=64XM<)!"+3"04BWPD&+X`````
+M.?YS%8H3BD,!B`&(40&#P0*#PP)&.?YRZUM>7\.-=@!55U93@^P,BUPD((ML
+M)"2);"0(9H-]``!Y$@^W10`E`!\``,'X"(A#(8UV`(U[3(UU%/RY!0```/.E
+MBT4NB8.(````BT4RB8.,````C7M@C74VL0KSI6H*C4-,4%#H:O___VH$C8.(
+M````4%#H6____VH4C4-@4%#H3____V;'0S0``&;'0S8``(/$)(M$)`AF@[BR
+M`0```0^4PL'B`XI#)(/@]PG0B$,D]H6G````!'0&9L=#-`$`]H6D`````70C
+M9H-+-`+VA:H````!=`5F@TLV`?:%J`````%T!V:!2S0``9#VA:0````@=!-F
+M@TLT!/:%J@```"!T!6:#2S8"]H6D````0'079H%+-(``]H6J````0'0(9H-+
+M-@B-=@#&0TH"]H69`````70G]D,T`70*9H-+-`AF@TLV$(J%E@```(/@'T"(
+M0TH\('4&QD-*'XGV]H68````"'0&9H%+-``"]H68````!'0%9H-+-"#VA9@`
+M```"=`5F@TLT$/:%J````"!T$/:%K@```"!T!V:#2S1`B?;V0S0!=!:+A<@`
+M``"+E<P```")0T")4T3K#XGVBT5XB4-`QT-$`````(-#0/^#4T3_]D5J`G0=
+M]H6`````#W049H.]@`````(9P(/`!(A#..L&B?;&0S@"QD,Y__9%?@1T!L9#
+M.0+K&/9%?@)T!L9#.0'K#/9%?@%T!L9#.0")]L9#.O_V16H$=!BQ``^WA;``
+M``#3^*@!=`.(2SI!@/D&=NJ#[`AH``(``%7H_/___XF#E````+@!````@\0<
+M6UY?7<.05U93BWPD$(M<)!2+-X/L#%;H_/___XG"BDLZ@\00A<!U"L:#L0``
+M``'K0I#&0"3AQD`E`<9`)@2(2"=FBT,89HE"$(L'B4(8QT(@`````,="-```
+M``#'0FQP#`8`B$L]@^P(4E;H_/___X/$$%M>7\.-=@!75E.+?"00BUPD%(LW
+M@^P,5NC\____B<**2SB#Q!"%P'4*QH.Q`````>M"D,9`).'&0"4!QD`F!8A(
+M)V:+0QAFB4(0BP>)0AC'0B``````QT(T`````,=";'`,!@"(2SN#[`A25NC\
+M____@\006UY?PXUV`%=64XMT)!"+?"04BQZ#[`Q3Z/S___^)PH/$$(7`=0G&
+MA[$````!ZSO&0"3AQD`E`<9`)@9FBT<89HE"$(L&B4(8QT(@`````,="-```
+M``#'0FQP#`8`@^P(4E/H_/___X/$$%M>7\.05U93BW0D$(M\)!2+'H/L#%/H
+M_/___XG"@\00A<!U"<:'L0````'K.\9`).'&0"4!QD`F#&:+1QAFB4(0BP:)
+M0AC'0B``````QT(T`````,=";'`,!@"#[`A24^C\____@\006UY?PY!75E.+
+M="00BWPD%(L>@^P,4^C\____B<*#Q!"%P'4)QH>Q`````>M#QD`DX<9`)0'&
+M0"86QD`H`6:+1QAFB4(0QD)H#XL&B4(8QT(@`````,="-`````#'0FQP#`8`
+M@^P(4E/H_/___X/$$%M>7\.05U93BW0D$(M\)!2+'H/L#%/H_/___XG"@\00
+MA<!U"<:'L0````'K.\9`).'&0"4!QD`F%V:+1QAFB4(0BP:)0AC'0B``````
+MQT(T`````,=";'`,!@"#[`A24^C\____@\006UY?PY!75E.+="00BWPD%(L>
+M@^P,4^C\____B<*#Q!"%P'4)QH>Q`````>L[QD`DX<9`)0'&0"889HM'&&:)
+M0A"+!HE"&,="(`````#'0C0`````QT)L<`P&`(/L"%)3Z/S___^#Q!!;7E_#
+MD%=64X/L'(M\)"R*7"0PBD0D-(A$)!N*1"0XB$0D&HM'5(LP5NC\____B<+&
+M0"3AQD`E`<9`)A&#Q!"P#X3;=0.*1RN(0B>*1"0/B$(H9HM')&:)0A")<AC'
+M0B``````QT(T`````+@`````@'PD#@!U!;@`````B4)L@^P(4E;H_/___X/$
+M(%M>7\.05U93@^P<BWPD+(I<)#"*1"0TB$0D&XI,)#R(3"0:BT=4BS!6Z/S_
+M__^)PL9`).'&0"4!QD`F$H/$$+`/A-MU`XI'*XA")XI$)`^(0BB+3"0L#[;%
+MB$(IB<C!Z!"(0BJ)R,'H&(A"*XA*+&:+1R1FB4(0B7(8QT(@`````,="-```
+M``"X`````(!\)`X`=06X`````(E";(/L"%)6Z/S___^#Q"!;7E_#55=64X/L
+M'(ML)#"+?"0TQT0D&`````!F@7\0A0`/AXD````/MT<0@+PHF`0``/]T>V:#
+M?Q!_=R`/MI0HF`0``(N-6`4``(T$TL'@`BG0BT3!*(I0!.M7D&:!?Q"!`'<H
+M#[='$`^VA"B8!```BXV0!0``C01`C03`B<+!X@4IPHM$D0B*4`3K)@^W1Q`/
+MMH0HF`0``(N5=`4``(T$0(T$@(M$PE2*4`3K!8UV`++_L?]F@7\0A0!W"P^W
+M1Q"*C"B8!```#[;"#[:<*!X%``"-!%O!X`,IV(V<A2@!```/ML&-!$"-!("+
+ME70%``"--,*`?R@"=7L/MD<L)?````"#^"!T!8/X$'5H#[97+(G0@^`/@_@!
+M=2*#[`QJ`8G0)?````!0:@)J`%;H_/___X/$(.D^!@``C78`#[9&*XM$ACR)
+M1"08#[9'+"7P````@_@@#Y3`@\`(BU0D&(B"L@```(M",&:!8#+__ND%!@``
+MB?:`?Q0`=$**7Q2#?U``=!&#[`B-1U!05>C\____@\00D(/L"%=5Z/S___^#
+MQ!"`^P(/A<T%``"#[`A65>C\____@\00Z;L%```/MD8F@_@9#X=_!0``_R2%
+M3!\```^V1C3!X`@#A00*``"+@$P(``"C`````(/X!7<%B$8?ZP3&1A\%@'L+
+M`'0-QD8F`,9#"P#I/P4``,9&)@+I-@4```^V1C3!X`@#A00*``"+@$P(``"C
+M`````&8/ML!FB48@#[9&-,'@"`.%!`H``(N`1`@``*,`````B<+!Z`AFB48B
+M#[;"P>`(9@E&(&:!?B)`074)QD8F&>G:!```QD8F`^G1!```#[9&-,'@"`.%
+M!`H``(N`1`@``*,`````B$8=#[9&-,'@"`.%!`H``(N`3`@``*,`````J`AT
+M!L9&'@SK'*@$=`;&1AX+ZQ+1Z(/@`8/X`1G`]]"#X`J(1A[&1B8$Z6\$```/
+MMD8TP>`(`X4$"@``BX!,"```HP````"#R`B(1BS&1B8%Z4@$``#&1B8&Z3\$
+M```/MD8TP>`(`X4$"@``BX!,"```HP````"`?BL!&<"#X`*#P!2(1B;I$P0`
+M`(I&*T"(1BLZ1A]S"<9&)A;I_@,``,9&*P#&1B87@^P,:""A!P#H_/___X/$
+M$.GA`P``QD8F%.G8`P``QD8F".G/`P``QD8F%.G&`P``QD8N`NC\____B49P
+MQD8F%>FQ`P``#[9&-,'@"`.%!`H``(N`3`@``*,`````#[;`B40D%`^V1C3!
+MX`@#A00*``"+@$0(``"C``````^VP,'@"`E$)!3H_/___XE&=(M$)!2#X`^#
+M^`-U#X!^+@!T"<9&)@KI30,``(M&="M&<"U`#0,`>`:`?BX`=!;&1B85@'XN
+M``^$+`,``/Y.+NDD`P``#[9&*X-\ACP`#X3O````QD0D$P"`>PH`=D:-2SB)
+M3"0,@^P,_W0D&.C\____B40D*`^V1BN#Q!"+5"08.52&/'0>BTPD#(M!!(E1
+M!(D*B4($B1#^1"03BD0D$SA#"G?!_DL*BU0D&(-Z'`!T=8M"',=`8`````#V
+M0B0$=2G^A5<,``"#[`Q5Z/S___^#Q`QJ`8M,)""+01P/MD`!4%7H_/___X/$
+M$(/L!(M$)!S_<!S_M20%``!J`>C\____@\0,BU0D'/]R'/^U)`4``&H&Z/S_
+M__^+3"0HQT$<`````(/$$`^V1BO'1(8\`````(/L"/]T)"!5Z/S___^#Q!#&
+M1B8)Z1T"```/MD8TP>`(`X4$"@``BX!,"```HP`````/MM`/MD8TP>`(`X4$
+M"@``BX!$"```HP````#!X`@)PHE6.(!^)@IT"/?"```!`'0.QD8F"^G+`0``
+M_DL*ZW+&1B8,#[9&*X-\ACP`=%/&1"0+`(!["@!V6(U#.(E$)`2#[`S_="00
+MZ/S___^)1"0H#[9&*X/$$(M4)!@Y5(8\=+F+3"0$BT$$B5$$B0J)0@2)$/Y$
+M)`N*1"0+.$,*=\'K$(/L#%7H_/___XE$)"B#Q!"#?"08``^$>`$```^V1BN+
+M5"08B52&/(I&+XB"L@```.DO`0``QP0D/T(/`(M#&/9`*@AU*H/L#%7H_/__
+M_\<$)`$```#H_/___X/$$/\,)(,\)/]T"8M#&/9`*@ATUL9&)@GI[`````^V
+M1C3!X`@#A00*``"+@$P(``"C``````^VP(E$)!0/MD8TP>`(`X4$"@``BX!$
+M"```HP`````/ML#!X`@)1"04BT0D%"7_#P``/1,!``!T!STC`0``=3#&1B88
+MBT0D%"7_#P``/1,!``!U!L9&+PCK>HM$)!0E_P\``#TC`0``=6K&1B\)ZV0/
+MME8J#[9&'T@YPGT,_D8J_D8KQD8F!^M+QD8F`&:+1C*#X/>#R`)FB48R@W]0
+M`'00@^P(C4=04%7H_/___X/$$(/L"%=5Z/S____&0P7_@\0(4U7H_/___X/$
+M$.LUQD8F`XGV@W]0`'02@^P(C4=04%7H_/___X/$$(GV@^P(5U7H_/___X/$
+M"%95Z/S___^#Q!"#Q!Q;7E]=PY!55U93@^P<BWPD,(ML)#3'1"08`````,9$
+M)!,`9H%]$(4`#X>(````#[=%$("\.)@$``#_='IF@WT0?W<?#[:4.)@$``"+
+MCU@%``"-!-+!X`(IT(M$P2B*2`3K5F:!?1"!`'<H#[=%$`^VA#B8!```BX^0
+M!0``C01`C03`B<+!X@4IPHM$D0B*2`3K)@^W11`/MH0XF`0``(N7=`4``(T$
+M0(T$@(M$PE2*2`3K!8UV`+'_L_]F@7T0A0!W"P^W11"*G#B8!```#[;#C01`
+MC02`BY=T!0``C03"B40D%`^VT0^VM#H>!0``C01VP>`#*?"-M(<H`0``@/G_
+M=!B`O#H>!0``_W0.@/O_=`F`?10&=2^-=@"#?5``=!*#[`B-15!05^C\____
+M@\00B?:#[`A55^C\____@\00Z18&``")]H!]%`!T$H/L"%97Z/S___^#Q!#I
+M_`4``(M4)!0/MD(F@^@-@_@$#X>T!0``_R2%M!\``(M,)!0/MD$TP>`(`X<$
+M"@``BX!,"```HP`````/MM`/MD$TP>`(`X<$"@``BX!$"```HP````#!X`@)
+MPL9$)!(`QD0D$0"S`(!Y'P!V-8UV``^VR[@!````T^"%PG0:_D0D$XM$)!2#
+M?(@\`'0&_D0D$>L%_D0D$I!#BTPD%#A9'W?.@'PD$@!T"(M$)!2`2"T!@'PD
+M$0!T"(M,)!2`22T"@'PD$P$/A6$!``"S`(M$)!2`>!\`=E(/MLNX`0```-/@
+MA<)T(X/L!%%75NC\____B40D*(/$$(7`=!F)<"B+5"04B5`PZPV00XM,)!0X
+M61]WQ>L5BT0D%(A8*SA8'W8)QD`F#NFC!```BU0D%#A:'P^%E@0``(/L!&H!
+M#[9&"5!7Z/S____&1"0;`(/$$(!^"@`/AI<```"-7CB#[`Q3Z/S___^)1"0H
+M@\00BT,$BTPD&(E+!(D9B4$$B0B#>1P`=!Z#[`3_<1S_MR0%``!J!>C\____
+MBT0D*(!()`*#Q!"#[`3_="0<:@96Z/S___^#Q!"+5"08@'I+`'0B@^P,5^C\
+M____QP0D`0```.C\____@\00BTPD&(!Y2P!UWOY$)`N*1"0+.$8*#X=L____
+M@WU0`'00@^P(C4504%?H_/___X/$$(/L"%57Z/S___^+5"0DQD(M`,9&!0")
+M-"3H_/___X/$$.G5`P``D(M,)!1F@4DR@`"S`(!Y'P!V4P^VR[@!````T^"%
+MPG0D@^P$45=6Z/S___^)1"0H@\00A<!T&HEP*(M4)!2)4##K#HGV0XM,)!0X
+M61]WQ.L5BT0D%(A8*SA8'W8)QD`F#^D[`P``BU0D%#A:'P^%+@,``(/L!&H!
+M#[9&"5!7Z/S____&1"0:`(/$$(!^"@`/AI<```"-7CB#[`Q3Z/S___^)1"0H
+M@\00BT,$BTPD&(E+!(D9B4$$B0B#>1P`=!Z#[`3_<1S_MR0%``!J!>C\____
+MBT0D*(!()`*#Q!"#[`3_="0<:@96Z/S___^#Q!"+5"08@'I+`'0B@^P,5^C\
+M____QP0D`0```.C\____@\00BTPD&(!Y2P!UWOY$)`J*1"0*.$8*#X=L____
+M@WU0`'00@^P(C4504%?H_/___X/$$(/L"%57Z/S___^+5"0DQD(M`,9&!0")
+M-"3H_/___X/$$.EM`@``D(M,)!0/MD$TP>`(`X<$"@``BX!,"```HP`````/
+MMM`/MD$TP>`(`X<$"@``BX!$"```HP````#!X`@)PO?"```$`'0&]D$M`742
+M]\+___O_=!>+1"04]D`M`G0-BU0D%,9")@_ISP$``(M,)!3&02T`Z?8!``"[
+M/T(/`(M&&/9`*@AU)X/L#%?H_/___\<$)`$```#H_/___X/$$$N#^_]T"8M&
+M&/9`*@ATV8M$)!3&0"80Z8`!``"+5"04#[9"-,'@"`.'!`H``(N`3`@``*,`
+M````#[;`B40D#`^V0C3!X`@#AP0*``"+@$0(``"C``````^VP,'@"`E$)`R+
+M1"0,@^`/@_@##X77````]D(M`70+QD(F$NL-_DX*ZW.+3"04QD$F$HM4)!0/
+MMD(K@WR"/`!T3,9$)`D`@'X*`'91C5XX@^P,4^C\____B40D*(M,)"0/MD$K
+M@\00BU0D&#E4@3QTM(M#!(E3!(D:B4($B1#^1"0)BDPD"3A."G?$ZQ"#[`Q7
+MZ/S___^)1"0H@\00@WPD&``/A-````"+5"04#[9"*XM,)!B)3((\BT0D#"7_
+M#P``/1,!``!U"<:!L@````CK<XM$)`PE_P\``#TC`0``=6.+1"08QH"R````
+M">M6B?:+5"04QD(F$^M*BTPD%`^V033!X`@#AP0*``"+@$P(``"C``````^V
+M033!X`@#AP0*``"+@$0(``"C``````^V02V#X`&#^`$9P/?0@\`3B$$FB?:#
+M?5``=!*#[`B-15!05^C\____@\00B?:#[`A55^C\____@\0(_W0D'%?H_/__
+M_X/$$(GV@\0<6UY?7<.+1"0$BT@$@>D``@$`#[94)`R#X@?!X@B`SB`/MD0D
+M",'@"`'(B9`<Q0``9HN`',4``&:C``````^VP,.+1"0$BT@$@>D``@$`#[94
+M)`R#X@?!X@B*5"00@,X0#[9$)`C!X`@!R(F0',4``,-55U93@^P,QD0D"P#&
+M1"0*`+W_____QD0D`P"^P.'D``^V3"0#0;L!````T^.Q`)`/ML%`B<(/K].)
+M\(G7N@````#W]XE$)`2Z_____XM\)"`Y^'<$B?HIPCGJ<PZ)U8I$)`.(1"0+
+MB$PD"D&`^0]VO_Y$)`.`?"0#!W:D#[9$)`K!X`,*1"0+#[;`@\0,6UY?7<.0
+M5U93BUPD$(V[Q`H``&H`:@</MG0D'%93Z!____\/MD<!4&H#5E/H$?___X/$
+M(%M>7\.)]E93@^P$BW0D$(I$)!2(1"0#NP````")]FH"#[9$)`=05NBF_O__
+M@\0,J`AT![@`````ZQN#[`QJ`>C\____@\000X'[#R<``';.N/\```"#Q`1;
+M7L.-=@!3BEPD#&H##[9$)!10_W0D$.A>_O__@\0,.-@/E,`/ML!;PY!64X/L
+M!(MT)!"*1"04B$0D`XI$)!B(1"0"#[;`4&H!#[9<)`M35NAA_O__:D!J`E-6
+MZ%;^__^#Q!A35NA$____@\00NO\```"%P'5I@WPD'`!T0?9$)`(!=!X/MD0D
+M`U!J0%;H=/___X/$#+K_````A<!T0>LZB?8/MD0D`U!J&%;H5O___X/$#+K_
+M````A<!T(^L<#[9$)`-0:BA6Z#K___^#Q`RZ_P```(7`=`>)]KH`````B="#
+MQ`1;7L.-=@!75E.+?"00BEPD%`^V="08@^P(#[;#4%?HI_[__X/$$+K_____
+MA<!U-@^VPU")\@^VPE!7Z./^__^#Q`RZ_____X7`=!IJ`0^VPU!7Z#_]__^+
+M5"0HB`*Z`````(/$#(G06UY?PXUV`%575E.#[`R+?"0@BD0D)(A$)`L/MG0D
+M*+T`````B?*$T@^$S0```&ID:@(/MMA35^@O_?__@\0(4U?H'?[__X/$$(7`
+M=0YJ`U-7Z-G\__^#Q`R)]FH!B?(/ML)0#[9$)!-05^AP_O__@\00NO____^$
+MP`^%5`$``+L`````.UPD,`^-0P$```^V="0+BT0D,$@YV'4K:D!J`E97Z,3\
+M__^+1"0\`=A0:EA65^CH_O__@\0@A<`/A0\!``#K*8UV`&I$:@)65^B9_/__
+MBT0D/`'84&I05E?HO?[__X/$((7`#X7D````14,[7"0P?)[IUP```)!HH(8!
+M`.B6_/__#[;`B00D:@,/MEPD$U-7Z%+\__^#Q`A35^A`_?__@\00A<!T(0^V
+MA\4*``!0:@-35^@P_/__NO____^#Q!#IBP```(UV``^V7"0+4VI@5^AB_?__
+M@\0,A<!U&P^VA\4*``!0:@-35^CZ^___NO____^#Q!#K6+L`````.UPD,'TR
+M#[9T)`MJ1&H"5E?HU?O__XM$)#P!V%!H@````%97Z/;]__^#Q""%P'4(14,[
+M7"0P?-,/MH?%"@``4&H##[9$)!-05^B=^___@\00B>J)T(/$#%M>7UW#B?96
+M4X/L$(M<)!S_="0H_W0D*`^V1"0H4&H`4^@)_O__B<:#Q"!J5&H":@!3Z%S[
+M__^)\(/$%%M>PU93@^P0BUPD'/]T)"C_="0H#[9$)"A0:@%3Z-']__^)QH/$
+M(&I4:@)J`5/H)/O__XGP@\046U[#55=64X/L#(M\)""+;"0PBD0D)(A$)`L/
+MMG0D*&ID:@(/MMA35^CR^O__@\0(4U?HX/O__X/$$(7`=0UJ`U-7Z)SZ__^#
+MQ`R0:@&)\@^VPE`/MD0D$U!7Z#3\__^#Q!"Z_____X3`=3_K"KK_____ZS:-
+M=@"[`````#GK?24/MG0D"XGV:@"+5"0P#[8$&E!65^CZ^___@\00A,!US4,Y
+MZWSBN@````")T(/$#%M>7UW#C78`5E.#[!"+7"0<_W0D*/]T)"@/MD0D*%!J
+M`%/H+?___XG&@\0@:E1J`FH`4^@X^O__B?"#Q!1;7L-64X/L$(M<)!S_="0H
+M_W0D*`^V1"0H4&H!4^CU_O__B<:#Q"!J5&H":@%3Z`#Z__^)\(/$%%M>PU57
+M5E.#[!R+;"0PBT0D-(M0&$*)5"08BDH"B$PD%\9$)!4`QT0D$`````"^````
+M`(N=)`4``+&`#[9\)!>-=@`/ML%F#[:4&)@$``!F@?K_`'1-B?!&.?AU1H#Y
+M@7<?#[?"C01`C03`B<+!X@4IPHN#D`4``(T4D(E4)!#K(HM$)#3'0"S_____
+M@^P,4/]0*+@`````@\00Z:L!``"-=@!!@/F%=IJ+G20%``"!PV`,``"Q@`^V
+M?"07C78`#[;!9@^VE!B8!```9H'Z_P!T38GP1CGX=4:`^8%W'P^WPHT$0(T$
+MP(G"P>(%*<*+@Y`%``"-%)")5"00ZR*+5"0TQT(L_____X/L#%+_4BBX````
+M`(/$$.DO`0``C78`08#YA7::BTPD&(I1!`^V:07!Y1`/MD$&P>`("<4/MD$'
+M"<4/MGD(P><0#[9!"<'@"`G'#[9!"@G'@WPD$``/A,$```#&1"06`(M$)!"`
+M>#``#X:N````B<:#QB@/MM*)5"0,D(/L#%;H_/___XU8^(/$$(M6!(E&!(DP
+MB5`$B0*`>R$-=`:`>R$B=62+5"08#[9"`X/X.W0B@_@\=5+&1"05`8/L#/]T
+M)$!55_]T)"13Z/S___^#Q"#K-8M$)!B#P`N#[`154/^SY````.C\____@\0$
+M_W0D0%57_W0D)%/H_/___\9$)#4!@\0@C78`_D0D%HI,)!:+1"00.$@P#X=?
+M____N`$```"`?"05`'4;BU0D-,="+/____^#[`Q2_U(HN`````"#Q!"0@\0<
+M6UY?7<-55U93@^P<BT0D-(MX&$>+4!!*B50D&,=$)!0`````BT@<B4PD$(!_
+M`0%U#,=`+`````#I0@(``(!_`0)U6H!_`@%U1(M$)#"#N"@%````=`J+D"@%
+M``")5"0PBTPD,(N!)`4``(I7`XB05@P``(I7`XB0MA@``(M$)#3'0"P`````
+MZ?,!``"0BU0D-,="+/[____IX@$``(!_`01U(HI'`X/H.SP!=QB#[`C_="0\
+M_W0D/.CX_/__@\00Z=X!``"`?P$#=7J`?P(!=6(/ME<#BTPD,`^V02:-#`")
+MT)GW^3G1?CJ#[`0/MD<$4`^VVE/_="0\Z/S___^#Q`P/MD<$4%/_="0\Z/S_
+M__^+5"1$QT(L`````(/$$.E<`0``BTPD-,=!+/[____I3`$``(M$)#3'0"S^
+M____Z3P!``")]HM4)#"#NB@%````=`J+BB@%``")3"0PB?N`?P$`#X2H````
+MD`^V,T.*`T.(P0^VT/;"`70_BVPD%`'UBT0D-#MH%`^'U````(/L#%:+1"0@
+M`T0D)%!2:@#_="1,Z*/X__^#Q"`Y\`^%L````(EL)!3K3XGVC2PSB>@I^(/`
+M`CM$)!@/CY0```"#[`Q64P^VP5!J`/]T)$SHL/K__X/$((7`=7F)ZX!]``!U
+M!H!]`0!T&H/L#&@0)P``Z/S___^#Q!"`>P$`#X59____#[8SA?9T5FI4:@)J
+M`/]T)#SHA_7__X/$$(M4)#2+0A0K1"04.<9V`HG&@^P,5HM$)"`#1"0D4&H`
+M:@#_="1,Z/7W__^#Q""%P'@&`40D%.L,BTPD-,=!+/____^0:E1J`FH`_W0D
+M/.@Q]?__@\00BT0D-(-X(`!T"8M`((M,)!2)"(/L#/]T)$"+1"1$_U`H@\00
+M@\0<6UY?7<.)]H/L#(M$)!"#N"@%````=`:+@"@%``"`N%8,````=1G&!2,$
+M```!:B!H(`0``&H.4.C\____@\00@\0,PX/L#(M$)!"#N"@%````=`:+@"@%
+M``#&!2,$````:B!H(`0``&H.4.C\____@\0<PU=64XM\)!"#[`0/MG0D'%8/
+MMEPD'%/_MR0%``#H_/___X/$#%935^C\____@\006UY?PY"+5"0$BTPD"(M"
+M!&;'@&S^___LF(M"!&:)B&C^___#D%.#[`B+7"00BD0D%(I,)!C&!"0"B>+&
+M1"0!`\9$)`(%QD0D`P;&1"0$!\9$)`4+QD0D!@S&1"0'#SP'=T&$R707#[;`
+M#[8,`KC^____T\!F(8-4#```ZQ4/ML`/M@P$N`$```#3X&8)@U0,```/MX-4
+M#```4%/H_/___X/$"(/$"%O#D%=64XMT)!"#OB@%````=`:+MB@%``"_````
+M`&H`:@>)^`^VV%-6Z)'S__]J1&H"4U;HAO/__X/$(&C0````:@!35NAU\___
+M:@!J!%-6Z&KS__^#Q"!'@_\!=L!HH(8!`.B'\___B(;%"@``#[;`4&H#:@!6
+MZ$/S__^#Q!1;7E_#BT0D!(M0!('J``(!`(M$)`B+!`*C`````,.)]HM$)`2+
+M2`2!Z0`"`0"+5"0,BT0D"(D4`<.-=@!3BUPD"(M3!('J``(!`,>"@``!````
+M``"+@@0!`0"C`````(#,`8F"!`$!`&H$:`S"``!3Z/S___]HN`L``&@(P@``
+M4^C\____:`$`#`!H`,(``%/H_/___X/$)&H$:`S#``!3Z/S___]HN`L``&@(
+MPP``4^C\____:`$`#`!H`,,``%/H_/___X/$)&H`:%#"``!3Z/S___]J`&A0
+MPP``4^C\____BT,$9L>`3/[__P``BT,$9L>`;/[__^R8BT,$9L>`:/[__^R8
+M9L>#5`P``/__@\086\-64X/L!(M4)!`YDB0%```/E40D`XI$)!2#X`,/ML"-
+M'$"X!P```(C9T^#WT(G&(W(\B7(\@'PD&`!T#+@$````T^`)\(E"//]R/`^V
+M1"0'P>`(!5#"``!0_[(D!0``Z/S___^#Q!!;7L.-=@!55U93@^P,BWPD((MT
+M)"2-GR`+``"+CY`%``"-J>P&#0!F@7X0A0!W'`^W1A`/MH0XF`0``(T$0(T$
+MP(G"P>(%*<*-+)&+5C2`>@$"=1J+0@2)`XM""(E#!(M"#(E#"(M"$(E##(UV
+M`(-^4`!T$H/L"/]V4%?H_/___X/$$(UV`(/L"%97Z/S____&130`@\0<6UY?
+M7<.)]E575E.#[!B+?"0LBVPD,(M$)#2)1"04BTPD.(E,)!"+1PB+,%;H_/__
+M_XG#@\00A<!T?X/L#%;H_/___XG!@\00A<!T;<9'-`&-0SS&0R3AQD,E`<9#
+M)A#&0Q6[9@^V5S-FB5,0B7,8QT,@D````(U1"(E3-(E+4,9"`0+&00A`B>F(
+M2@**3"0(B$H#BDPD!(A*!,=#;`````"#[`AJ`%#H_/___X/$"%-6Z/S___^#
+MQ!"#Q`Q;7E]=PXGV55=64X/L&(M<)"R*1"0PB$0D%XI,)#2(3"06BD0D.(A$
+M)!6+0PB+*%7H_/___XE$)!"#Q!"%P`^$-0$``(/L#%7H_/___XG"@\00A<`/
+MA!\!``#&0S0!BPPD@\$\B4PD!(LT),9&).'&1B4!QD8F$,9&%;MF#[9#,V:)
+M1A");AC'1B"0````C4((B48TB590B<.Y`````+J0````B`A`2G7ZQD,!@L8#
+M0(I$)`N(0P**3"0*B$L#BD0D"8A#!#P"=SP/MD0D"8U["(V5(`L``/R-'(4`
+M````B=G!Z0*)UO.EB?*)V(/@`H7`=`1FI8GRB=B#X`&%P'11B=:DZTR+A2`+
+M``")0PB+A20+``")0PP/MD0D"8U[$(V5*`L``/R-'(7X____B=G!Z0*)UO.E
+MB?*)V(/@`H7`=`1FI8GRB=B#X`&%P'0#B=:DBP0DQT!L`````(/L"&H`_W0D
+M$.C\____@\0(_W0D"%7H_/___X/$$(/$#%M>7UW#B?975E.#[!"+="0@BD0D
+M)(I4)"B(5"0/B,+`Z@*(5"0.@^`#B<>+1@B+&&H":@!J`%;H_/___X/$$(!^
+M-`!T((GV@^P,4^C\____QP0D`0```.C\____@\00@'XT`'7BBT8(BQ"!PB`+
+M``"*0@*$P'@\@\B`B$(":@%J`&H`5NC\____@\00@'XT`'0AD(/L#%/H_/__
+M_\<$)`$```#H_/___X/$$(!^-`!UXHGV:@$/MD0D$E!J`U;H_/___X/$$(!^
+M-`!T(8UV`(/L#%/H_/___\<$)`$```#H_/___X/$$(!^-`!UXHM&"(L8@<,@
+M"P``B?H/ML*Y`P```"G!@'PD#P`/E<(/MM+!X@.+!`N#X.<)T(D$"VH!#[9$
+M)!)0:@-6Z/S___^#Q"!;7E_#D)"055=64XM4)!2+?"08BVPD'(M<)""+BE@%
+M``"-L>@6`0!F@7\0A0!W%P^W1Q`/MI00F`0``(T$TL'@`BG0C33!C8T@!```
+MQH4@!```)V:!?R3A`74DBD<F2#P!=PB*5R?K(HUV`&:!?R3A`74,BD<F@^@1
+ML@\\`78+L@"#?C``=`.*5DF#X@^*00&#X/`)T(A!`;(`9H%_).$!=0F*1R9(
+M/`%V`Y"R`<'B!XI!`8/@?PG0B$$!BD,&B$$"B@.(00.*0P6(00>*0P>(00^*
+M0P*(002*0P.(006*0P2(00:*0P&(00R*0PJ(00B*0PN(00F*0PR(00J*0PB(
+M00N*0PF(00U;7E]=PXGV5E.#[`2+3"00BUPD%(M1*(LR#[9#)(/X+W1E@_@O
+M?RB#^!L/A.L```"#^!M_"H/X$G1-Z?````"#^"AT0X/X*G0^Z>$```"0/8H`
+M``!T,3V*````?Q:#^#4/A+4````]B````'0:Z;T```"0/8\```!T#3WA````
+M=&7IJ0```)#V030!=`>!2V0```0`]D$V$`^$G0```(![)"AT%X![)"IT$8![
+M)(AT"X![)(H/A8$```"0]D((`746@^P(#[9"!%!6Z/S___^#Q!"$P'1ED(![
+M%(%T7H%+9````0#K5;@`````@'LE`75/#[9#)H/X''<9_R2%R!\``(-+9`CK
+M-(-+9`'K+H-+9"#K*+@`````ZR:0]D$T`70'@4MD```$`(-+9`'K#9"X````
+M`/9#9B!T!I"X`0```(/$!%M>PY`/MD0D!,.)]@^V1"0%PXGV4XM4)`B+7"00
+MQD(4`HM*.(M$)`R(00*+0CC&0`<`BT(XB%@,6\.)]HM4)`2+3"0(BD(IB$$"
+MBD(HB$$#BD(GB$$$BD(FB$$*PXUV`(M4)`2+3"0(BD(MB$$"BD(LB$$#BD(K
+MB$$$BD(JB$$*BD(IB$$+BD(HB$$,PXUV`(M,)`RZ`````#G*?1*-=@")R"G0
+M@_@!?@%"0CG*?/'#5U93@^P$BUPD%(MT)!P/MGPD&`^V0R2#^"IT)(/X*G\+
+M@_@H=!KIV0```)`]B````'0I/8H```!T(NG%````D(I#+(A$)`.*0RN(1"0"
+M5E/H_/___X/$".L:B?:*0S&(1"0#BD,PB$0D`E93Z/S___^#Q`C&1@5`]D-F
+M`70RBD0D`X@&BD0D`HA&"(T$_0````"(1@&`>R0H=`:`>R2(=0?&1@9@ZUV0
+MQD8&8>M6B?;V0V8$=":*1"0#B$8!BD0D`HA&"8![)"AT!H![)(AU!L9&!B7K
+M+L9&!C7K*(I$)`.(1@&*0R:#X`\(1@6`>R0H=`:`>R2(=0;&1@;(ZP;&1@;*
+MB?:#Q`1;7E_#D%575E.#["R+;"1$BW4TB>?\N0@```"X`````/.K]H:G````
+M!'06BX[(````BY[,````@\'_@]/_ZPV)]HM&>$B)P;L`````@'TD)757OP@`
+M``")R`^LV!B(!"2)R`^LV!"(1"0!B<@/K-@(B$0D`HA,)`/VAM4````0=0_&
+M1"0&`L9$)`<`Z8T```!J!(V&Z@```%"-1"0,4.C\____@\0,ZW60OR````")
+MV,'H&(@$)(G8P>@0B$0D`8G8P>@(B$0D`HA<)`.)R`^LV!B(1"0$B<@/K-@0
+MB$0D!8G(#ZS8"(A$)`:(3"0']H;5````$'4.QD0D"@+&1"0+`.L:B?9J!(V&
+MZ@```%"-1"004.C\____@\0,B?:)X(/L!%=0_W4TZ/S___^#Q#Q;7E]=PY"+
+M3"0$BD$F"D$G"D$H"D$I#[;`#[91+(/B`0G0=`YJ)&H%4>C\____@\0,PXM$
+M)`C&0`;LQT%L`````,-64X/L!(M<)!"+="04#[9#)(/X+W0*/8\```!T'^MI
+MD(I#+(A$)`.*0RN(1"0"5E/H_/___X/$".L:B?:*0S&(1"0#BD,PB$0D`E93
+MZ/S___^#Q`C&1@5`]D-F!'06BD0D`XA&`8I$)`*(1@G&1@9"ZQ:)]HI$)`.(
+M1@&*0R:#X`\(1@7&1@9`@\0$6U[#B?:+3"0(BU0D#,9"!4`/MD$D@_@U=`L]
+MD0```'0@ZR:)]HM$)`0/MT`T@^`!@_@!&<"#X/V#Z!:(0@;K&9#&0@;JZQ*)
+M]FHD:@51Z/S___^#Q`S#B?;V024"=`3&010`PY"+1"0$]D`H\'0.:B1J!5#H
+M_/___X/$#)##C78`55=64XML)!2+="08BUPD(`^V?"0<N`````"Y#0```(G:
+MC78`B`)"277Z#[96)(/Z-0^$B@```(/Z-7\G@_HH=%R#^BA_#H/Z&P^$@@``
+M`.ET`@``@_HJ=$2#^B]T5.EE`@``@?J/````=$>!^H\```!_%8'ZB````'0B
+M@?J*````=!KI0`(``('ZD0```'0Q@?KA````=&'I*P(``%.)^@^VPE!6Z/S_
+M__^#Q`SI'0(``%-6Z/S___^#Q`CI#@(``%-65>C\____@\0,Z?X!``#V1B@!
+M=!G&0P9PQD,$`,9#`P#&0P(`QD,%0.G?`0``QD,&X.G6`0``N`````"`?B4!
+M#X7,`0``#[9&)H/X'`^'JP$``/\DA3P@``#&0P<$Z:H!``#&0P<`Z:$!``#&
+M0P;LZ9@!``#&0P;OQ@,#BD8G@\A`B$,!Z8,!``#&0P;OQ@,'Z7<!``#&0P9`
+MQD,!`<9#!4#I9@$``,9#!N_&`P.*1B>#R`B(0P'I40$``,9#!N_&`P+I10$`
+M`,9#!N_&`X+I.0$``,9#!N_&`P;I+0$``,9#!N_&`X;I(0$``,9#!N.*1B>(
+M0P'I$@$``,9#!K#&`]C&0P-/QD,$PNG^````QD,&L,8#V<9#`T_&0P3"Z>H`
+M``#&0P:PQ@/:QD,#3\9#!,+IU@````^W132#X`&#^`$9P(/@_8/H%HA#!NF\
+M````QD,&[\8#JNFP````QD,&[\8#5>FD````QD,&+\9#`0'&0P(0Z9,```#&
+M0P;DBD8HB`.*1B>(0P7I?P```(I&)XA#!HI&*(@#BD8IB$,"BD8JB$,#BD8K
+MB$,$BD8MB$,*BD8LB$,!ZU3&0P;HBD8HB`.*1B>(0P6*1BF(0P**1BJ(0P.*
+M1BN(0P2*1BR(0P'K*_9&*`%T)<9#!G#&0P0`QD,#`,9#`@#&0P5`ZP^X````
+M`.L-D+@`````ZP6X`0```%M>7UW#D)"05U93BWPD%(M$)!"+<`2![@`"`0"[
+M`````#G[<RV-=@"+A@#(``"C`````*@!=0FX`````.L9B?:#[`QJ"NC\____
+M@\000SG[<M:X_____UM>7\.04XM<)!R+1"0(BT@$@>D``@$`#[94)!#!X@@/
+MMD0D&,'@!`G"@'PD%`!T`X/*!(/[_W00B=@E__\#`(F!!,@``(/*`HM$)`R)
+M$%O#D(M$)`2+4`2!Z@`"`0"+1"0(@\@!B8(`R```PY!64X/L!(M<)!"+<P2!
+M[@`"`0!J_VH!:@&+@UP,```/MD`"4(U$)!!04^AJ_____W0D&%/HK/___X/$
+M&&@0)P``4^C^_O__@\00NO____^%P'4;BX8,R```HP````")!"2)PHM$)!2(
+M$+H`````B="#Q`1;7L.-=@!55U93@^P,BVPD((M\)"P/MG0D)(I$)"B(1"0*
+MNP`````Y^W,]C78`@^P(C40D$U!5Z%+___^#Q!"%P'43B?`B1"0+.D0D"G4'
+MN`````#K%X/L#&H*Z/S___^#Q!!#.?MRQKC_____@\0,6UY?7<.04X/L"(M<
+M)!!J_VH`:@"+@UP,```/M@!0C40D%%!3Z(W^____="0<4^C/_O__@\08:!`G
+M``!3Z"'^__^#Q!"Z_____X7`=1EHX),$`&H":@-3Z#K___^#Q!"#^`$9TO?2
+MB="#Q`A;PY!3@^P(BUPD$/]T)!1J`6H!BX-<#```#[9`"U"-1"044%/H(O[_
+M__]T)!Q3Z&3^__^#Q!AH$"<``%/HMOW__X/$$+K_____A<!U&HM#!(N0#,;_
+M_XD5`````(M$)!B($+H`````B="#Q`A;PY!64X/L&(M<)"2+="0HQD0D%_^-
+M1"074%93Z/S___^#Q!"Z_____X7`=7JZ`````(!\)!,`=&Z#[`Q3Z.W^__^#
+MQ!"Z_____X/X_W185FH`:@"+@UP,```/MD`*4(U$)!Q04^AU_?___W0D)%/H
+MM_W__X/$&&@0)P``4^@)_?__@\00NO____^%P'49:."3!`!J`&H#4^@B_O__
+M@\00@_@!&=+WTHG0@\046U[#4X/L%(M<)!Q3Z'+^__^#Q!"Z_____X/X_W1;
+M_W0D%&H`:@"+@UP,```/MD`&4(U$)!104^CW_/___W0D'%/H.?W__X/$&&@0
+M)P``4^B+_/__@\00NO____^%P'49:."3!`!J`&H#4^BD_?__@\00@_@!&=+W
+MTHG0@\0(6\.-=@!64X/L$(MT)!R+7@2!ZP`"`0!6Z.C]__^+1"0HB8,(R```
+M_W0D)&H$:@"+AEP,```/MD`%4(U$)"!05NAP_/__@\0H_S0D5NBP_/__:!`G
+M``!6Z`7\__^#Q!"Z_____X7`=1EHB!,``&H`:@%6Z![]__^#Q!"#^`$9TO?2
+MB="#Q`1;7L-55U93@^P,BVPD)(M\)"B+="0LNP`````Y\W,C@^P$_S0?C40=
+M`%#_="0LZ$S___^#Q!"#^/]T#(/#!#GS<MVX`````(/$#%M>7UW#5E.#[`2+
+M7"00BD0D'(MS!('N``(!`#P$=@*P!/]T)!0/ML!0:@&+@UP,```/MD`$4(U$
+M)!!04^BD^____W0D&%/HYOO__X/$&&@0)P``4^@X^___@\00NO____^%P'4;
+MBX8,R```HP````")!"2)PHM$)!B)$+H`````B="#Q`1;7L.055=64X/L#(ML
+M)"2+="0HBT0D+`'HB40D!(GK@^/\B>^#YP-T1VH$C40D#%!3_W0D+.A&____
+MC4,$@\00N00````[1"0$=@B+3"0$*>D!^8GZ.<]S$HU\)`B-=@"*!!>(!D9"
+M.<IR]8/#!(GVBWPD!(/G_#G[<R6-;"0(D&H$55/_="0LZ//^__^+1"08B0:#
+MQ@2#Q!"#PP0Y^W+@.UPD!',V:@2-1"0,4%/_="0LZ,G^__^+3"04*=FZ````
+M`(/$$#G*<Q.-7"0(C78`B@03B`9&0CG*<O60N`````"#Q`Q;7E]=PXUV`%93
+M@^P$BUPD$,<$)`````"+<P2![@`"`0#&@U@,````:@!J`FH!#[8%"````%"-
+M1"004%/H._K___]T)!A3Z'WZ__^#Q!AH$"<``%/HS_G__X/$$(7`=3R+A@S(
+M``"C`````(D$)#V_0P``=2?'@T@,``"_0P``QX-,#``````@`,>#4`P````0
+M``!FN```ZPB-=@"X_____X/$!%M>PY!64X/L!(M<)!#'!"0`````BW,$@>X`
+M`@$`QH-8#````&H`:@)J`0^V!0@```!0C40D$%!3Z)OY____="084^C=^?__
+M@\08:!`G``!3Z"_Y__^#Q!"%P'4\BX8,R```HP````")!"0]'V,``'4GQX-(
+M#```'V,``,>#3`P`````!`#'@U`,``````$`9K@``.L(C78`N/____^#Q`1;
+M7L.05E.#[`2+7"00QP0D`````(MS!('N``(!`,:#6`P```%J_VH":@$/M@4(
+M````4(U$)!!04^C[^/___W0D&%/H/?G__X/$&&@0)P``4^B/^/__@\00A<!U
+M:(N&#,@``*,`````B00D/1]#``!T*ST?1```=4S'@T@,```?1```QX-,#```
+M```$`,>#4`P``````0!FN```ZRW'@T@,```?0P``QX-,#``````$`,>#4`P`
+M`````0"X`````.L(C78`N/____^#Q`1;7L.05E.#[`2+7"00QP0D`````(MS
+M!('N``(!`,:#6`P```!J`&H":@$/M@4(````4(U$)!!04^@O^/___W0D&%/H
+M<?C__X/$&&@0)P``4^C#]___@\00A<!U<(N&#,@``*,`````B00D/>\1``!T
+M"SWO$@``="SK4HGVQX-(#```[Q$``,>#3`P`````!`#'@U`,``````$`N```
+M``#K,(UV`,>#2`P``.\2``#'@TP,``````0`QX-0#``````!`+@`````ZPB-
+M=@"X_____X/$!%M>PY!3@^P4BUPD'%/HLOW__X/$$(7`=1/'@UP,````````
+MN@````#K:HGV@^P,4^@O_O__@\00A<!U$<>#7`P```````"Z`````.M'@^P,
+M4^C._/__@\00A<!U$<>#7`P```````"Z`````.LF@^P,4^BY_O__@\00NO__
+M__^%P'41QX-<#````````+H`````B?:)T(/$"%O#D%=64XM<)!"+?"0<BD0D
+M((MT)!BZ`````(.[7`P````/A-,```"$P'0[@WPD%/]U$&:+@T@,``!FB0;I
+ML0```)!75O]T)!Q3Z%3[__^#Q!"Z`````(7`#X6<````Z8\```"-=@"#?"04
+M_W41@#X/#Y2#60P``+H!````ZWRZ`````("[60P```!T;HM$)!2Z`````/>S
+M4`P``(72=3N`NU@,````=!F#[`C_="0<4^C\____@\00N@````"%P'4Y@^P(
+M_W0D'%/H`/G__X/$$+H`````A<!U(%=6_W0D'%/H[/G__X/$$+H`````A<!U
+M"+H!````C78`B=!;7E_#D)!55U93@^P4BU0D*(L"BX!@`/__HP````"#X`-T
+M!X/X`70.ZSK'@C`%```"````ZRZA9`4``(D4A4`%``!`HV0%``"A:`4``(D4
+MA5`%``!`HV@%``#'@C`%```!````H6`%``")%(4`!0``0*-@!0``@#T-````
+M``^%C0```,9$)`L`A<`/CF@"``"#/4`%````="P/ME0D"[L`!0``BPU`!0``
+M.PR3=!>+!).)B"@%``"+%).A0`4``(F"B!$``(,]4`4```!T+`^V5"0+NP`%
+M``"+#5`%```[#)-T%XL$DXF(+`4``(L4DZ%0!0``B8*,$0``_D0D"P^V1"0+
+M.P5@!0``?(7IZ`$``,9$)`L`H4`%``")1"00A<`/A-X```"]`````(,]8`4`
+M```/CK````")]HGI#[;1BP25``4``(.X*`4````/A8,```"+3"00.<AT>[X`
+M````B@T-````A,ET;(E4)`2+5"0$N``%``"+')`X2R%R0P^V4R$/ML&)QP,]
+M]!8``#GZ<S"+5"00.$HA<B</MD(A.?AS'XF3*`4``(M,)`2Z``4``(L$BHM,
+M)!")B(@1``#K%9!&B?(/ML+!X`6*B`T```"$R769D$6)Z0^VP3L%8`4```^,
+M4O____Y$)`L/MD0D"XL$A4`%``")1"00A<`/A2+____&1"0+`*%0!0``B40D
+M#(7`#X3>````O0````"#/6`%````#XZP````B?:)Z0^VT8L$E0`%``"#N"P%
+M````#X6#````BTPD##G(='N^`````(H-#0```(3)=&R)%"20BQ0DN``%``"+
+M')`X2R%R1`^V4R$/ML&)QP,]]!8``#GZ<S&+5"0,.$HA<B@/MD(A.?AS((F3
+M+`4``(L,)+H`!0``BP2*BTPD#(F(C!$``.L7C78`1HGR#[;"P>`%BH@-````
+MA,EUF9!%B>D/ML$[!6`%```/C%+____^1"0+#[9$)`N+!(50!0``B40D#(7`
+M#X4B____@\046UY?7<.)]E575E.+;"04O@````"X`0```(`]#0````!T8>L'
+MN`$```#K6(GR#[;"P>`%1HJ(#0```(3)=$"+/?06``"-=@`X32%R'P^V52$/
+MML&-'#@YVG,1BT0D&#A((7((#[9`(3G8<KF)\@^VPL'@!4:*B`T```"$R77)
+MN`````!;7E]=PXUV`%.+3"0(BUPD#(N!,`4``+H!````.X,P!0``=PZ+@3`%
+M```[@S`%```9THG06\.)]HM4)`2+3"0(N``````[%7`7``!],HT44L'B`V:+
+M@N`6``!FB0%FBX+B%@``9HE!`HJ"Z!8``(A!"(J"Z18``(A!";@!````PU57
+M5E.#[`C'1"0$`````)"+1"0$P>`%B<-F@[@```````^$AP```+T`````@+@<
+M`````'1JB00DBU0D!(U$U0"--(4,````C7PD'+D$````_/.F#Y?"#Y+`.,)U
+M,[\0````BD0[#4"(1#L-@'P[#`!T'CI$.PQV&&8/ML!F#[9,.PRZ`````&;W
+M\8A4.PV)]D6+'"0/MH,<````.>A_F?]$)`2#?"0$`P^.8O___X/$"%M>7UW#
+MB?955U93@^P,QD0D"P#&1"0*`(UV`,9$)`D`:@`/MD0D#5`/MD0D$E`/MD0D
+M%U#H_/___XE$)!2_`````(/$$#L]<!<```^-3P$``(GVC01_P>`##[>0XA8`
+M`,'B$`^W@.`6```)PCM4)`0/A1T!``#&1"0(`(T$?\'@`XD$)(TL?P^V5"0(
+MB='!X05F@[D``````'5PBQPDBX/@%@``B8$`````BX/D%@``B8$$````BX/H
+M%@``B8$(````#[:!'````,'B`XT$`HI<)`N('(4-````#[:!'````(T$`HI<
+M)`J('(4.````#[:!'`````'"BD0D"8@$E0\```#^@1P```#K>P^V="0(B?/!
+MXP4/MHL<````B<BZ`````/<T[?06``"%TG1)C13U`````(T$"HI,)`N(#(4-
+M````#[:#'````(T$`HI,)`J(#(4.````#[:#'`````'"BD0D"8@$E0\```#^
+M@QP```#K$HUV`/Y$)`B`?"0(`P^&`?___XT$?_\$Q>P6``"-=@!'.SUP%P``
+M#XRS_O___D0D"0^$=O[___Y$)`J`?"0*'P^&8O[___Y$)`N`?"0+_P^%2_[_
+M_X/$#%M>7UW#C78`55=64X/L',=$)!0`````@SUL!0```'4/QP5L!0```0``
+M`.@-_O__@WPD-`!T!XM$)#3&``#'1"08`````+H`````.Q5P%P``?3^)]HM,
+M)!B-!$F-%,4`````BX+L%@```40D%(-\)#0`=`Z+3"0TB@$"@O`6``"(`?]$
+M)!B+1"08.P5P%P``?,.#?"0X``^$IP```,=$)!@`````BT0D&,'@!8G%9H.X
+M```````/A(@```"[`````("X'`````!T:XM4)!C!X@.)5"00B40D#(M$)!`!
+MV(TTA0P```"+?"0XN00```#\\Z8/E\(/DL`XPG4I@WPD-`!T#(J%'0```(M4
+M)#2(`HM$)!C!X`4/MH`<````B40D%.L2B?9#BVPD#`^VA1P````YV'^D_T0D
+M&(-\)!@##XYA____#[9$)!2#Q!Q;7E]=P[C`&```PXGVN)P```##B?:X!```
+M`,.)]E575E.#[`R+?"0@BW0D*(ML)"R-GF`,``"Y`````+K`&```B?"-=@"(
+M"$!*=?J);A"+%>`$``"-0@&CX`0``(A6*(M$)"2)1B#&1BD`9HL'9HE&&&:+
+M1P)FB48:BT<$B48<B6L0B%,HBT0D)(E#(,9#*0%FBP=FB4,89HM'`F:)0QJ+
+M1P2)0QP/MT8:/2(G``!_83T@)P``#XW"````/4`A```/A+<````]0"$``'\;
+M/2`A```/A*4````](B$```^$F@```.FI````/40A```/A(H````]1"$```^,
+MDP```"T0)P``@_@!#X>%````ZV^-=@`]8"<``'1E/6`G``!_(#U`)P``=%<]
+M0"<``'\)/3`G``!T2>M;/40G``!T0.M2/8(G``!T-SV")P``?PD]@"<``'0I
+MZSL]@)$``'0)/8"4``!T&>LK9L=&)("1QD8F!&;'0R2`D<9#)@3K%9!FQT8D
+M@)3&1B8$9L=#)("4QD,F!(I'"(A&*HI'"(A#*F@```0`:@!J`E7H_/___XD&
+M:``@``!J`&H`5>C\____B48(@\0@@SX`=`2%P'4*N`````#IX0```(L&C8@`
+M`@$`B4X$C9````(`B18%`$`"`(D#B4L$BT8(B4,(NP`````['7`7``!]3HLM
+M<!<``(T$6XT,Q0````"+!SF!X!8``'4OBX'P%@``0(F!\!8``(.Y[!8```!T
+M&3N![!8``'81N@````#WL>P6``")D?`6``!#.>M\N(M&!,>`((+__P'P`P"+
+M1@3'@"B"__\!``#H@^P(:GC_=A#H_/___XG")0!P``"#Q!`]`"```'84@^P$
+M:G@/ML)0_W80Z/S___^#Q!#_="0DZ)#Y__]6Z)+U__^X`0```(/$"(/$#%M>
+M7UW#B?93@^P4BUPD'%/H_/___X'#8`P``(D<).C\____N`$```"#Q!A;PXGV
+M5E.#[!"+="0<BYXD!0``@<-@#```5NC\____@\00@'XY`74&@'LY`70[@^P(
+MC9X0`0``4_]V%.C\____QX80`0``Z`,``,>&&`$```````")MAP!``"#Q`A3
+M_W84Z/S___^#Q!"#Q`1;7L.05E.#[!"+7"0<C;-@#```4^C\____B4,4B484
+MB9LD!0``B9XD!0``BX,P!0``B88P!0``B1PDZ/S___^)-"3H_/___XD<).C\
+M____@\00N@````"$P`^$A0```(/L#%;H_/___X/$$+H`````A,!T<(/L#%/H
+M_/___\<$)-`'``#H_/___XD<).C\____B1PDZ/S____'@Q`!``#H`P``QX,8
+M`0```````(F;'`$``(/$"(V#$`$``%#_<Q3H_/___X/$"&H`4^C\____@\0(
+M:@!6Z/S___^Z`0```(/$$)")T(/$!%M>PU575E.#[#R+7"10QD0D"&V-1"0(
+MQD`!_\9``B/&0`,4QD`$.L9`!>_&0`86QD`'DH.[*`4```!T!HN;*`4``+D`
+M````NB````"-1"00C78`B`A`2G7ZQD0D%`&]`````&H@C70D%%9J#E/H_/__
+M_X/$$(7`=4&#[`QH@!H&`.C\____:B!6:@]3Z/S___^#Q""#^"!U(8UT)""-
+M1"0(N0@```#\B<?SI@^7P@^2P#C"=06]`0```(GHA,!U$(/L#&B6`@``Z/S_
+M__^#Q!")Z@^VPH/$/%M>7UW#B?;#C78`55=64X/L#(ML)""+7"0DN0````"Z
+M>````(G8D(@(0$IU^H.],`4```$/E$,3BT4@B0.`2Q$09HM%&&:)0P1FBT4:
+M9HE#!HN%,`4``(A#;,9#$B!F@7T:("%T"&:!?1HB(74<QD,7`K[\"0``C7L\
+M_+D'````\Z5FI:3IA````&:+11HM$"<``&:#^`%V$&:!?1I`(70(9H%]&D0A
+M=4W&0Q<$9HM%&BT0)P``9H/X`7<5OAP*``"->SS\N0<```#SI6:EI.L]9H%]
+M&D`A=`AF@7T:1"%U+;X\"@``C7L\_+D'````\Z5FI:3K&,9#%PB#[`AH````
+M`(U#/%#H_/___X/$$(I#%_9C$HA#$(3`=03&0Q"`OK("``"->QC\N0<```#S
+MI:2#O2P%````=!*+A2P%``"+0`B)0V29B5-HZPJ+10B)0V29B5-HQT-@`"``
+M`(/$#%M>7UW#C78`BT0D!,:`EP````##5U93BW0D$(M^;(N')`4``(!X)P`/
+MA8H```"+7G"#[`B+5F`/MH*C````4`^V@J(```!0#[:"H0```%`/MH*@````
+M4`^V@I\```!0#[:"G@```%`/MH*=````4`^V@IP```!0#[:"UP```%`/M@:#
+MX`%0#[9&`E`/MD8!4/]V"&A<"@``Z/S___^#Q#S'1G``````_W8(5O]V>/_3
+M@\00ZSB-=@"#[`B-7GQ3_W<4Z/S____'1GST`0``QX:$````"%T&`(FVB```
+M`(/$"%/_=Q3H_/___X/$$%M>7\.-=@!55U93@^P,BVPD)`^W1"0HC13`P>("
+M*<*+3"0@BX%8!0``C1S0B[$D!0``@<9@#```B70D"(E=8(EK'(-[+`!U"H-[
+M,``/A)L#``"_`````(!-``&+0S")16B+0RR)162Q`(M$)""`>"L`=B6+<RB0
+M#[;1B=#!X`0!T(M4)"`[M((\"P``#X2&`@``03A**W??L8"+1"0@B[`D!0``
+M#[;!BH0PF`0``#S_="F#>RP`="(/ML"-!$"-!,")PL'B!2G"BX:0!0``C120
+M.U,L#X0T`@``1T&`^8%VP[&"BU0D((NR)`4``(GV#[;!BH0PF`0``#S_=!P/
+MML"-!$"-!("+EG0%``"-!,([0S`/A.P!``!'08#YA7;0L8`/ML&+="0(BH0P
+MF`0``#S_="F#>RP`="(/ML"-!$"-!,")PL'B!2G"BX:0!0``C120.U,L#X2?
+M`0``1T&`^8%VO[&"C78`#[;!BU0D"(J$$)@$```\_W0<#[;`C01`C02`BY)T
+M!0``C03".T,P#X1<`0``1T&`^85VS(M$)""`>#D!=4:#>RP`=!6#[`1J``^V
+M0TE0_W,LZ/S___^#Q!"#N^``````#X0"`@``@^P$:@`/MH/5````4/^SX```
+M`.C\____@\00C78`@[O@``````^$UP$``(M3+(E4)`2_`````(!Z,`!V18G6
+M@\8H@^P,5NC\____C4CX@\00BU8$B48$B3")4`2)`H"YUP```/]U#X!Y(0!U
+M"8.YX`````!U#$>)^8M$)`0X2#!WP(GZBTPD!#A1,`^%T````(J#UP```(A%
+M`K\`````@'DP``^&N0$``(G.@\8H@^P,5NC\____C4CX@\00BU8$B48$B3")
+M4`2)`H-Y'`!T0HM1'(I"`CJ!UP```'0T@WIP`'4N@WIT`'4HBH'7````B$("
+M@^P$#[=!&%"+1"0H_[`D!0``:@?H_/___X/$$(UV`$>)^HM,)`0X43!WD.D_
+M`0``B?B(10'IH?[__XGZB%4!Z9?^__^)^8A-`>F-_O__B?B(10'I@_[__XM4
+M)"`/MD(IC02!B(68````Z6K]__^*0TF(10+&@]<```#_OP````"+3"0$@'DP
+M``^&X0```(G.@\8H@^P,5NC\____C4CX@\00BU8$B48$B3")4`2)`H"YUP``
+M`/]T1\:!UP```/^#>1P`=#J+41R*0@(Z04ET+X-Z<`!U*8-Z=`!U(XI!28A"
+M`H/L!`^W01A0BT0D*/^P)`4``&H'Z/S___^#Q!"01XGZBTPD!#A1,'>(ZV*)
+M]HI#28A%`NM8BW0D(`^V1BF-!(&(10&(A9@```#K+[$`BT0D((!X*P!V(XMS
+M*(UV``^VT8G0P>`$`="+5"0@.[2"/`L``'3!03A**W?CBW0D(#A.*W4$QD4!
+M_\9%`@")]HU]((US8/RY"@```/.EC7T,C7-,L07SI8N#B````(E%2(N#C```
+M`(E%3&:+0S1FB4589HM#-F:)15J+0T"+4T2)15")552*0TJ(15SV0R0$=2Z+
+M1"0@@+A7#````'0/_HA7#```@+A7#````'42@^P,_W0D+.C\____@\00C78`
+M@^P$:@"+0QP/MD`!4/]T)"SH_/___P^V0R"#Q!"H`G0/J`1T"Z@!=0>`30`"
+MZP60@&4`_8I3)-#J@^($BD4`@^#["="(10"#[`Q5Z"CZ__^#Q!Q;7E]=PU57
+M5E.#[!R+?"0PBW0D-(ML)#BY`````+J<````B>B0B`A`2G7ZB74(@_X_?@F!
+MQV`,``"#[D"X`````(.\MY@"````#X5I`@``B:RWF`(``(E];(M$)#R)17"+
+M1"1`B45XN`$```"`?SD!#X5"`@``9L=$)!K_`('^A0```'\.9@^VA#Z8!```
+M9HE$)!IF@7PD&O\`#X0(`@``#[=4)!J+CU@%``"-!-+!X`(IT(T4Q0````#V
+M1`HC!`^$XP$``(M$"B`E`/__`#T``/\`#X7/`0``C1P*]D,D!`^$-@$``,:#
+ML``````/MD,@J`)T,J@$="ZH`70JQD,B!<9#(P13#[9#25#_<RS_<RCH_/__
+M_X/$$.F#`0``QH.Q`````>M?#[9#(*@"=7:H!'1RJ`%T;HMK*,9#(@/&0R,$
+MQT0D%`````"`?0H`=#:-=3B#[`Q6Z/S___^)PH/$$(M&!(E6!(DRB4($B1"`
+M>B+_=`0YVG6F_T0D%`^V10H[1"04?\V`N[$````!#X0.`0``@^P(4U?H_/__
+M_X/$$.G\````#[9#(*@"#X3P````J`0/A.@```"H`0^%X````(M#*(I`";X`
+M````@'\F`'8G#[;HB?(/MLJ)Z-/XJ`%T#X/L!&H`45?H_/___X/$$$:)\#A'
+M)G?<QD,C!L9#(@5FQX.0``````"#[`A35^C\____@\00Z84```"+6RB)7"00
+MQD0D#P"`>PH`=F")VH/".(E4)`B#[`S_="04Z/S___^)PX/$$(M4)`B+0@2)
+M6@2)$XE#!(D8@'LB_W0>@'LA(G0&@'LA#742QX2WF`(```````"X`````.L[
+M_D0D#XI$)`^+5"00.$(*=ZF#[`0/MT0D'E!55^C\____@\00N`$```#K$,>$
+MMY@"````````N`````"#Q!Q;7E]=PY!55U93@^P,BW0D((ML)"2+?"0HBUY@
+MA=MU#H/L#%?_U8/$$.D``0``@WYT`'4&@WYP`'00@^P,5__5@\00Z>8```")
+M]H"[L``````/A<L```"+4R@/MD((J!`/A;P```"H"`^%M````(L2B50D"(![
+M2P!T$8/L!%-J!O]S*.C\____@\00B6YTB7YX#[9#(*@"="FH!'0EJ`%T(<9#
+M(@7&0R,$4P^V0TE0_W,L_W,HZ/S___^#Q!#K;XUV``^V0R"H`G4DJ`1T(*@!
+M=!S&0R(#QD,C!(/L"%/_="04Z/S___^#Q!#K0HGV#[9#(*@"=#BH!'0TJ`%U
+M,,9#(@7&0R,&9L>#D```````@^P(4_]T)!3H_/___X/$$.L-D(/L#%?_U8/$
+M$(UV`(/$#%M>7UW#5U93BU0D$(MT)!2+0BB+.(M>2`^V1A2#^"!T1(/X('\+
+MA<!T&X/X!G\NZR2#^")T+X/X(GP:@\"`@_@!=QKK$(M"',=`!`````#&0UX!
+MZQ#&0UX-ZPJ)]K@`````ZS&0@WY0`'02@^P(C4904%?H_/___X/$$(GV@^P(
+M5E?H_/___XD<)/]3:+@!````@\006UY?PU575E.#[!R+?"0PBVPD-(M';(E$
+M)!B+122).(-_8`!U$\9%7@*#[`Q5_U5H@\00Z<@$``"+1V#V0"0"=!/&15X"
+M@^P,5?]5:(/$$.FL!```@^P,_W0D).C\____B<:#Q!"%P'43QD5>`H/L#%7_
+M56B#Q!#IA`0``,=`9`````"):$B+1V")1AB+1V!FBT`89HE&$,9&%(`/MD5<
+M@_@"#X1%`0``@_@"?PF%P'0<Z88"``"#^`,/A*P!``"#^`0/A'\!``#I;P(`
+M`(M'8/9`-`$/A)````#V15T"=`;&1B2(ZQ.*15V#X`0\`1G`@^`%@^AVB$8D
+MBTU(BUU,9HM54&:)5"06QD8E`(G8P>@8B$8FB=C!Z!"(1B>)V,'H"(A&*(A>
+M*8G(#ZS8&(A&*HG(#ZS8$(A&*XG(#ZS8"(A&+(A.+<9&+@#&1B\`9HM$)!9F
+MP>@(B$8PBD0D%HA&,<9&,@#&1C,`ZVOV15T"=`;&1B0HZQ.*15V#X`0\`1G`
+M@^`%@\`JB$8DBTU(BUU,9HM54&:)5"06QD8E`(G(#ZS8&(A&)HG(#ZS8$(A&
+M)XG(#ZS8"(A&*(A.*<9&*@!FBT0D%F;!Z`B(1BN*1"06B$8LQD8M`(M'8`6T
+M````B48XQD8<((-.9`+I6`$``(!]2!!W!?8'`G4)QD5>!NGG`@``#[9%2(U6
+M)(/L!%#_=5!2Z/S___^+1V`%M````(E&.,9&'""!3F0``!``QD85JX/$$/9%
+M708/A`D!``"+14R)1B#I_@```(I%78/@,#P@=1'&1B0;QD8E`<9&*`#IXP``
+M`,9&)#7IV@```(M'8`^V0""H`70$J`1U"<9%7@;I90(``(%.9```(`!FBT54
+M9CM%2G0V#[9%4X/X0G0M@_A"?P>#^$!T(^L8/;````!T!SWL````=0IFBT54
+M9HE%2NL)QD5>!ND>`@``QD8DL&:+14B(1B5FBT5*B$8F9HM%3(A&)V:+14Z(
+M1BAFBT50B$8IBD52B$8JBD53B$8K9@^V14F(1BQF#[9%2XA&+68/MD5-B$8N
+M9@^V14^(1B]F#[9%48A&,/9%709T&@^W153!X`F)1B"#3F0$ZPJ0QD5>!NFC
+M`0``C7X\QT9LU&8&`(I%7:@&#X1X`0``NP````"H`G0&@TYD".L$@TYD$(-]
+M8`!T"_9%70%T!8M=8.LJ@WUD`'0D@^P$:@"+5"0@_[(D!@``5?]59(/$$(7`
+M=`J+1"08BY@D!@``A=MT.(/L#%;H_/___X/$"&H`5^C\____@\00_S/_<PS_
+M<PA7Z/S___^#Q!"-0P2#PQ"#.`!TY.GR````@^P,_W0D).C\____B40D((/$
+M$(7`=0G&15X&Z>0```"+5"00BT((B48TB590N0````"Z``(``)"("$!*=?KV
+M15T$#X2#````]D9F('06@^P$_W8@_W58_W8TZ/S___^#Q!#K9_9&9A!T88M&
+M-(E$)`R#?6``=`OV15T!=06+76#K)(/L!&H!BU0D(/^R)`8``%7_562#Q!"%
+MP'0*BT0D&(N8)`8``(/L!/\S_W,(_W0D&.C\____BQ,!5"0<@\00C4,$@\,0
+M@S@`=-N#[`AJ`%?H_/____]V((M$)"3_<!#_<`Q7Z/S___^#Q"#K!(-.9`&#
+M[`A6_W0D).C\____@\00ZQB#[`A6_W0D).C\____B2PD_U5H@\00B?:#Q!Q;
+M7E]=PU575E.#[!R+="0PBWPD/(I$)$2(1"0;QT0D#/____^)^L'B"6:)5"0*
+MBT9@B40D!(-^8`!T"8"^EP````!T"8M$)`SI4`,``(M4)`2+4BB)%"2+;FQF
+MQX:4````$">#[`Q5Z/S___^)PX/$$(M$)`R%VP^$(`,``(/L#%7H_/___XE$
+M)"2#Q!"%P'46@^P(4U7H_/___XM$)!R#Q!#I]@(``(N%)`4``,9`)P&#[`16
+M_[4D!0``:@7H_/___XM$)!2`2"0"@\0,_W9@:B'_="0,Z/S___^-4SR)5"0@
+M@\00@'PD&P!T#<=#9`H```#&0R0HZR?'0V02````QD,D*@^W1"0*@^P$4/]T
+M)$B+1"0@_W`(Z/S___^#Q!"+1F#V0#0!#X23````@'PD&P$9P(/@`H/H>(A#
+M),9#)0"+5"0XB=#!Z!B(0R:+5"0XB=#!Z!"(0R>+5"0XB=#!Z`B(0RB+5"0X
+MB%,IBT0D-(M4)#@/K-`8B$,JBT0D-(M4)#@/K-`0B$,KBT0D-(M4)#@/K-`(
+MB$,LBE0D-(A3+<9#+@#&0R\`B?AFP>@(B$,PB?B(0S'&0S(`QD,S`.M>@'PD
+M&P$9P(/@`H/`*(A#),9#)0"+1"0TBU0D.`^LT!B(0R:+1"0TBU0D.`^LT!"(
+M0R>+1"0TBU0D.`^LT`B(0RB*5"0TB%,IQD,J`(GX9L'H"(A#*XGXB$,LQD,M
+M`(/L#%/H_/___XM&8&:+0!AFB4,0QD,4@(ES&(M4)"2+0@B)0S0/MT0D&HE#
+M((E34,9#'""+1F`%M````(E#.,=#;/Q<!@"#Q`AJ`/]T)!SH_/____]S((M$
+M)"C_<!#_<`S_="0LZ/S____&AI<````!@\084U7H_/___X/$$(7V#X2L````
+M@WY@`'1A@+Z7`````'18B?9F@;Z4````E@!U&8/L!/]V8&HABT9@_W`HZ/S_
+M__^#Q!"-=@!F_XZ4````@^P,:-`'``#H_/___XDL).C\____@\00A?9T5(-^
+M8`!T"8"^EP````!UJH7V=$&#?F``=#MF@[Z4`````'0Q@'L4`'4KQT0D#```
+M``"`?"0;`'0<#[=$)`J#[`10BU0D'/]R"/]T)$SH_/___X/$$(-[4`!T$(/L
+M"(U#4%!5Z/S___^#Q!"#[`A35>C\____BX4D!0``QD`G`(/$#%;_M20%``!J
+M!NC\____BT0D%(!@)/V+1"0<@\00C78`@\0<6UY?7<-64X/L#(MT)!B+7"0<
+MB%XW#[;;4U;H_/___X/$"%.!QF`,``!6Z/S___^X`0```(/$%%M>PXUV`(/L
+M&/]T)!SH_/___P^VP(/$',.0N`````##B?964XM,)`R^`````+J`````BYDD
+M!0``B?8/M\*`O!B8!```_W0!1D)F@?J%`';JBXDD!0``@<%@#```NH````"0
+M#[?"@+P(F`0``/]T`49"9H'ZA0!VZHGP6U[#D(M,)`2*5"0(B-#`Z`0\"78'
+M@\!7ZPJ)]HC0P.@$@\`PB`&)T(/@#X/X"7X,B-"#X`^#P%?K"HGVB-"#X`^#
+MP#"(00'#5E.+="0,BUPD$`^VQU!6Z*C___\/MMM3@\8"5NB;____@\006U[#
+MD%575E.+?"04BVPD'+X`````N0````"Z``$``(GHC78`B`A`2G7ZNH````"+
+MGR0%```/M\)F#[:,&)@$``!F@?G_``^$;`$``(GP1CM$)!@/A5\!``!F@?J!
+M``^'T`````^WP8T$0(T$P(G"P>(%*<*+@Y`%``"-')"#>PP`=&VY@````(NW
+M)`4```^WP68/MH0PF`0``&8]_P!T'@^WP(T$0(T$P(G"P>(%*<*+AI`%``"-
+M%)`[4PQT+$%F@?F!`';(L@"`>S(`=C"^`0````^VP@^V3!A`B?#3X`E%($(X
+M4S)WZ^L4B$T"Z]>0QD4"_XM#"`^V0`F)12#&10`!BD,QB$4!BT-(B44$BT-,
+MB44(BT-8B44,BT-<B440BT-@B444BT-DB448BT-PB44<ZWB+ER0%```/M\&-
+M!$"-!(#!X`.)PP.:=`4``,9%`O_&10`"BY<D!0``BY)T!0``BD00'XA%`8M#
+M5`^V0`F)12#&101V#[=#(%"-1050Z%?^___&10QD#[=#(E"-10U0Z$7^___&
+M11QR#[9#'5"-11U0Z._]__^#Q!BX`````.F?`0``B?9"9H'ZA0`/AFO^__^+
+MOR0%``"!QV`,``"Z@`````^WPF8/MHPXF`0``&:!^?\`#X18`0``B?!&.T0D
+M&`^%2P$``&:!^H$`#X?,````#[?!C01`C03`B<+!X@4IPHN'D`4``(T<D(-[
+M#`!T:;F`````#[?!9@^VA#B8!```9CW_`'0>#[?`C01`C03`B<+!X@4IPHN'
+MD`4``(T4D#M3#'0L06:!^8$`=LBR`(![,@!V,KX!````#[;"#[9,&$")\-/@
+M"44@0CA3,G?KZQ:(30+KUXUV`,9%`O^+0P@/MD`)B44@QD4``8I#,8A%`8M#
+M2(E%!(M#3(E%"(M#6(E%#(M#7(E%$(M#8(E%%(M#9(E%&(M#<(E%'.ML#[?!
+MC01`C02`P>`#B<,#GW0%``#&10+_QD4``HN7=`4``(I$$!^(10&+0U0/MD`)
+MB44@QD4$=@^W0R!0C44%4.C'_/__QD4,9`^W0R)0C44-4.BU_/__QD4<<@^V
+M0QU0C44=4.A?_/__@\08N`````#K$I!"9H'ZA0`/AH7^__^X_____UM>7UW#
+MB?955U93@^P$BW0D&(ML)!R[`````+D`````NJ0,``"+1"0@B?:("$!*=?JZ
+M@````(N^)`4```^WPF8/MHPXF`0``&:!^?\`#X0$`P``B=A#.>@/A?D"``!F
+M@?J!``^'60(```^WP8T$0(T$P(G"P>(%*<*+AY`%``"-+)"#?0P`='*Y@```
+M`(G[#[?!9@^VA!B8!```9CW_`'0>#[?`C01`C03`B<+!X@4IPHN#D`4``(T4
+MD#M5#'0R06:!^8$`=LBR`(!],@!V/;L!````#[;"#[9,*$")V-/@B<&+1"0@
+M"4@@0CA5,G?EZQN+5"0@B$H"Z\V+3"0@QD$"_XM%"`^V0`F)02"+1"0@Q@`!
+MBD4QBU0D((A"`8M%2(E"!(M%3(E""(M%6(E"#(M%7(E"$(M%8(E"%(M%9(E"
+M&(M%<(E"',9$)`,`@+V0``````^&]`$```^V1"0#C02`P>`#BU0D((T,$`'H
+MC9B0````BE,$B%$DBE,%B%$EBX"8````B@"#X`^(028/MD$D@_@#="F#^`-_
+M#H/X`@^$XP```.G*````@_@$=$>#^!(/A(L```#IMP```(UV``^V3"0#C0R)
+MP>$#BX0IF````(I0`8/B!P^VTL'B"`^V0`(!T(T$@-'@BU0D((E$$2CID@``
+M``^V1"0#C02`C13%`````(N$*I@```"`>`(`=0Z+3"0@QT0**`````#K:`^V
+M1"0#C02`P>`#BY0HF`````^V4@*#ZA2+3"0@B50(*.M%#[9,)`.-#(G!X0.+
+MA"F8````#[90`L'B"`^V0`,!T(T$@-'@BU0D((E$$2CK%XUV``^V1"0#C02`
+MBTPD(,=$P2@`````#[9T)`.--+;!Y@.+1"0@C7P&+(VT+IP```#\N0@```#S
+MI?Y$)`.*5"0#.)60````#X><_O__Z8L```"+EB0%```/M\&-!$"-!(#!X`.)
+MPP.:=`4``(M,)"#&00+_Q@$"BY8D!0``BY)T!0``BD00'XA!`8M#5`^V0`F)
+M02#&001V#[=#(%")R(/`!5#H;_G__XM$)"C&0`QD#[=#(E"+1"0L@\`-4.A5
+M^?__BU0D,,9"''(/MD,=4(G0@\`=4.CY^/__@\08N`````#I-0,``$)F@?J%
+M``^&T_S__XNV)`4``('&8`P``+J`````#[?"9@^VC#"8!```9H'Y_P`/A/`"
+M``")V$,YZ`^%Y0(``&:!^H$`#X=2`@``#[?!C01`C03`B<+!X@4IPHN&D`4`
+M`(TLD(-]#`!T<+F`````#[?!9@^VA#"8!```9CW_`'0>#[?`C01`C03`B<+!
+MX@4IPHN&D`4``(T4D#M5#'0R06:!^8$`=LBR`(!],@!V/;L!````#[;"#[9,
+M*$")V-/@B<&+1"0@"4@@0CA5,G?EZQN+5"0@B$H"Z\V+3"0@QD$"_XM%"`^V
+M0`F)02"+1"0@Q@`!BD4QBU0D((A"`8M%2(E"!(M%3(E""(M%6(E"#(M%7(E"
+M$(M%8(E"%(M%9(E"&(M%<(E"',9$)`(`@+V0``````^&XP$```^V1"0"C02`
+MP>`#BU0D((T,$`'HC9B0````BE,$B%$DBE,%B%$EBX"8````B@"#X`^(028/
+MMD$D@_@#=">#^`-_#H/X`@^$X0```.G(````@_@$=$6#^!(/A(D```#IM0``
+M`)`/MDPD`HT,B<'A`XN$*9@```"*4`&#X@</MM+!X@@/MD`"`="-!(#1X(M4
+M)"")1!$HZ9(````/MD0D`HT$@(T4Q0````"+A"J8````@'@"`'4.BTPD(,=$
+M"B@`````ZV@/MD0D`HT$@,'@`XN4*)@````/ME("@^H4BTPD((E4""CK10^V
+M3"0"C0R)P>$#BX0IF`````^V4`+!X@@/MD`#`="-!(#1X(M4)"")1!$HZQ>-
+M=@`/MD0D`HT$@(M,)"#'1,$H``````^V="0"C32VP>8#BT0D((U\!BR-M"Z<
+M````_+D(````\Z7^1"0"BE0D`CB5D`````^'GO[__^M_#[?!C01`C02`P>`#
+MB<,#GG0%``"+3"0@QD$"_\8!`HN6=`4``(I$$!^(00&+0U0/MD`)B4$@QD$$
+M=@^W0R!0B<B#P`50Z$KV__^+1"0HQD`,9`^W0R)0BT0D+(/`#5#H,/;__XM4
+M)##&0AQR#[9#'5")T(/`'5#HU/7__X/$&+@`````ZQ.)]D)F@?J%``^&[?S_
+M_[C_____@\0$6UY?7<.-=@!55U93@^P$BW0D&+L`````N0````"ZI`P``(M$
+M)"")]H@(0$IU^KJ`````B[XD!0``#[?"9@^VC#B8!```9H'Y_P`/A#@#``")
+MV$,[1"0<#X4K`P``9H'Z@0`/AWT"```/M\&-!$"-!,")PL'B!2G"BX>0!0``
+MC2R0@WT,`'1RN8````")^P^WP68/MH08F`0``&8]_P!T'@^WP(T$0(T$P(G"
+MP>(%*<*+@Y`%``"-%)`[50QT,D%F@?F!`';(L@"`?3(`=CV[`0````^VP@^V
+M3"A`B=C3X(G!BT0D(`E(($(X53)WY>L;BU0D((A*`NO-BTPD(,9!`O^+10@/
+MMD`)B4$@BT0D(,8``8I%,8M4)""(0@&+14B)0@2+14R)0@B+15B)0@R+15R)
+M0A"+16")0A2+162)0AB+17")0AR+3"0<B4HDQD0D`P"`O9``````#X8<`@``
+M#[9$)`.-!(#!X`.+5"0@C0P0`>B-F)````"*4P2(D:@```"*4P6(D:D```"+
+M@)@```"*`(/@#XB!J@````^V@:@```"#^`-T*(/X`W\.@_@"#X3Q````Z=4`
+M``"#^`1T28/X$@^$DP```.G"````B?8/MDPD`XT,B<'A`XN$*9@```"*4`&#
+MX@</MM+!X@@/MD`"`="-!(#1X(M4)"")A!&L````Z9X````/MD0D`XT$@(T4
+MQ0````"+A"J8````@'@"`'41BTPD(,>$"JP`````````ZW$/MD0D`XT$@,'@
+M`XN4*)@````/ME("@^H4BTPD((F4"*P```#K2P^V3"0#C0R)P>$#BX0IF```
+M``^V4`+!X@@/MD`#`="-!(#1X(M4)"")A!&L````ZQJ-=@`/MD0D`XT$@(M,
+M)"#'A,&L``````````^V="0#C32VP>8#BT0D((V\!K````"-M"Z<````_+D(
+M````\Z7^1"0#BE0D`SB5D`````^'?_[__^F6````BY8D!0``#[?!C01`C02`
+MP>`#B<,#FG0%``"+3"0@QD$"_\8!`HN6)`4``(N2=`4``(I$$!^(00&+0U0/
+MMD`)B4$@QD$$=@^W0R!0B<B#P`50Z+WR__^+1"0HQD`,9`^W0R)0BT0D+(/`
+M#5#HH_+__XM4)##&0AQR#[9#'5")T(/`'5#H1_+__XM$)#2+3"0XB4$D@\08
+MN`````#I<`,``(UV`$)F@?J%``^&G_S__XNV)`4``('&8`P``+J`````#[?"
+M9@^VC#"8!```9H'Y_P`/A"@#``")V$,[1"0<#X4;`P``9H'Z@0`/AWT"```/
+MM\&-!$"-!,")PL'B!2G"BX:0!0``C2R0@WT,`'1PN8`````/M\%F#[:$,)@$
+M``!F/?\`=!X/M\"-!$"-!,")PL'B!2G"BX:0!0``C120.U4,=#)!9H'Y@0!V
+MR+(`@'TR`'8]NP$````/ML(/MDPH0(G8T^")P8M$)"`)2"!".%4R=^7K&XM4
+M)""(2@+KS8M,)"#&00+_BT4(#[9`"8E!((M$)"#&``&*13&+5"0@B$(!BT5(
+MB4($BT5,B4((BT58B4(,BT5<B4(0BT5@B4(4BT5DB4(8BT5PB4(<BTPD'(E*
+M),9$)`(`@+V0``````^&$@(```^V1"0"C02`P>`#BU0D((T,$`'HC9B0````
+MBE,$B)&H````BE,%B)&I````BX"8````B@"#X`^(@:H````/MH&H````@_@#
+M="J#^`-_$8/X`@^$\P```.G7````C78`@_@$=$B#^!(/A)(```#IP0```)`/
+MMDPD`HT,B<'A`XN$*9@```"*4`&#X@</MM+!X@@/MD`"`="-!(#1X(M4)"")
+MA!&L````Z9X````/MD0D`HT$@(T4Q0````"+A"J8````@'@"`'41BTPD(,>$
+M"JP`````````ZW$/MD0D`HT$@,'@`XN4*)@````/ME("@^H4BTPD((F4"*P`
+M``#K2P^V3"0"C0R)P>$#BX0IF`````^V4`+!X@@/MD`#`="-!(#1X(M4)"")
+MA!&L````ZQJ-=@`/MD0D`HT$@(M,)"#'A,&L``````````^V="0"C32VP>8#
+MBT0D((V\!K````"-M"Z<````_+D(````\Z7^1"0"BE0D`CB5D`````^'??[_
+M_^F*````#[?!C01`C02`P>`#B<,#GG0%``"+3"0@QD$"_\8!`HN6=`4``(I$
+M$!^(00&+0U0/MD`)B4$@QD$$=@^W0R!0B<B#P`50Z%WO__^+1"0HQD`,9`^W
+M0R)0BT0D+(/`#5#H0^___XM4)##&0AQR#[9#'5")T(/`'5#HY^[__XM$)#2+
+M3"0XB4$D@\08N`````#K$XGV0F:!^H4`#X:U_/__N/____^#Q`1;7E]=PXUV
+M`%575E.+="04BWPD&(MN;+D`````NB````")^(@(0$IU^HN=)`8``+D`````
+MN@`"``")V)"("$!*=?J-4S:Y`````(I$,2&(`D**1#$@B`)"@\$"@_DG?NJ-
+M4Q2Y`````(I$,0V(`D**1`X,B`)"@\$"@_D3?NJ-4RZY`````(I$,4F(`D**
+M1#%(B`)"@\$"@_D'?NJ)7QB+1E"+5E2#P`&#T@")!XE7!(-^8`!U._8&`70V
+M@WYD`'05A>UT$8M&9`^V0#.`O"B8!```_W4;@WYH`'0=A>UT&8M&:`^W0"2`
+MO"B8!```_W0(BD8!B$<,ZP3&1PS_BD8"B$<-BD9<B$<.QD<2$,9'$1`/M@:#
+MX`'1X(I?"H/C_0G#B%\*#[8&@^`!P>`%BD\(@^'?"<&(3P@/MT98P>@'@^`!
+MP>`&@^&_"<&(3P@/MT98P>@"@^`!BE<)@^+^"<*(5PD/MT9:P>@#@^`!P>`'
+M@^%_"<&(3P@/MT9:T>B#X`'1X(/B_0G"B%<)#[=&6,'H`X/@`<'@!H/BOPG"
+MB%<)#[=&6L'H!(/@`<'@!X/B?PG"B%<)@\D0B$\(B@;0Z(/@`8/C_@G#B%\*
+MB@:#X`2#X_L)PXA?"F;'1Q0`$(J&F````(A''%M>7UW#B?:+1"0,QT`$````
+M`,<``````+@`````PY!55U93@^P,BUPD((I$)"2(1"0+QT0D!/____^+<V"+
+M:VR%]G0/@+N7`````'4&]@,"=`V0BT0D!.G_````C78`@^P,5>C\____B<>#
+MQ!"+1"0$A?\/A.(```#&1R3AQD<E`8!\)`L"#Y7`@\`:B$<FQD<4@&:+1AAF
+MB4<0B5\8QT<@`````,='-`````#'1VS\7`8`@^P(5U7H_/___\:#EP````%F
+MQX.4````^@"#Q!"%VW1=@WM@`'17D&:!NY0```"6`'49@^P$_W-@:B&+0V#_
+M<"CH_/___X/$$(UV`&;_BY0```"#[`QHT`<``.C\____B2PDZ/S___^#Q!"%
+MVW0/@WM@`'0)@+N7`````'6J9H.[E`````!T#H!_%`!U",=$)`0`````@^P(
+M5U7H_/___XM$)!2#Q!"0@\0,6UY?7<-55U93@^P<BW0D,(I<)#3'1"04____
+M_XMN8(M&;(E$)!"%[70)@+Z7`````'0*BT0D%.F9!```D(/L#/]T)!SH_/__
+M_XG'@\00BT0D%(7_#X1[!```]@8"#X41`0``@/L4=P\/MMN-!%N-'(4`````
+MZQYF#[;3B=#!X`0!T(T$PF;!Z`C`Z`0/MMB!P_````#&1R3AQD<E`<9')AR(
+M7R?&1Q2`9HM%&&:)1Q")=QC'1R``````QT<T`````,=';/Q<!@"#[`A7_W0D
+M'.C\____QH:7`````6;'AI0```#$"8/$$(7V=&.#?F``=%V-=@!F@;Z4````
+ME@!U&8/L!/]V8&HABT9@_W`HZ/S___^#Q!"-=@!F_XZ4````@^P,:-`'``#H
+M_/___X/$!/]T)!SH_/___X/$$(7V=`^#?F``=`F`OI<`````=:9F@[Z4````
+M``^$9`,``(!_%``/A5H#``#'1"04`````.E-`P``@^P,_W0D'.C\____B40D
+M*(/$$(-\)!@`#X0O`P``C5<\B50D#(M$)!B+0`B)1"0(QD<D&L9')0C&1R8:
+MQD<G`,9'*!#&1RD`BT0D&(E'4,9'%(!FBT489HE'$(EW&(M$)!B+0`B)1S3'
+M1R`0````BT9@!;0```")1SC&1QP@QT=L_%P&`(/L"&H`4NC\_____W<@BT0D
+M+/]P$/]P#/]T)"CH_/___X/$&%?_="0<Z/S____&AI<````!9L>&E````/H`
+M@\00A?9T78-^8`!T5V:!OI0```"6`'46@^P$_W9@:B&+1F#_<"CH_/___X/$
+M$&;_CI0```"#[`QHT`<``.C\____@\0$_W0D'.C\____@\00A?9T#X-^8`!T
+M"8"^EP````!UJ6:#OI0`````=`:`?Q0`=!F#[`B-1"0@4/]T)!SH_/___X/$
+M$.G]`0``@^P(5_]T)!SH_/___X/$!/]T)!SH_/___XG'@\00A<!U'8/L"(U$
+M)"!0_W0D'.C\____BT0D)(/$$.G2`0``C4`\B40D#(M,)`B#P02+5"0(#[9"
+M`XI$$`2(0@3&00$*QD$"`+H$````BT0D",8``$!*=?F$VW4&@&$#_.M,#[;;
+MC03;C02#C01#C1S%`````(!)`P.)V,'H&(E$)`2(002)VL'J$(A1!8G8P>@(
+MB00DB$$&B%D'BD0D!(A!"(A1"8H4)(A1"HA9"XM$)!B)1U#&1R05B@'`^`?W
+MT(/`$8A')<9')@#&1R<`QD<H$,9'*0"`(3_&1Q2`9HM%&&:)1Q")=QB+1"08
+MBT`(B4<TQT<@$````(M&8`6T````B4<XQD<<(,=';/Q<!@"#[`AJ`/]T)!CH
+M_/____]W((M$)"S_<!#_<`S_="0HZ/S___^#Q!A7_W0D'.C\____QH:7````
+M`6;'AI0```#Z`(/$$(7V=%V#?F``=%=F@;Z4````E@!U%H/L!/]V8&HABT9@
+M_W`HZ/S___^#Q!!F_XZ4````@^P,:-`'``#H_/___X/$!/]T)!SH_/___X/$
+M$(7V=`^#?F``=`F`OI<`````=:EF@[Z4`````'0.@'\4`'4(QT0D%`````"#
+M[`B-1"0@4/]T)!SH_/___X/$$)"#[`A7_W0D'.C\____BT0D)(/$$(/$'%M>
+M7UW#5U93BW0D$+C_____BWYLBUY@]D98"`^$B````(/L!%;_MR0%``!J!>C\
+M____@$LD`H/$#%-J(?]S*.C\____@\00@'M+`'0>@^P,:-`'``#H_/___XD\
+M).C\____@\00@'M+`'7B@WPD%`!T#V:#3EH09H-+-A#K#8UV`&:#9EKO9H-C
+M-N^#[`16_[<D!0``:@;H_/___X!C)/VX`````(/$$)!;7E_#5E.#[`2+1"00
+M#[9T)!2+4&R+6&#V``%T2X-[+`!T&8/L!(GR#[;"4`^V0TE0_W,LZ/S___^#
+MQ!"#N^``````=#V#[`2)\0^VP5`/MH/5````4/^SX````.C\____@\00ZQR)
+M]H/L!(GQ#[;!4(M#'`^V0`%04NC\____@\00@\0$6U[#55=64X/L#(M<)""*
+M1"0DB$0D"XI$)"B(1"0*QT0D!/____^+>V"+:VR%_W0)@+N7`````'0*BT0D
+M!.DE`0``D(/L#%7H_/___XG&@\00BT0D!(7V#X0*`0``QD8DX<9&)0&`?"0+
+M`'0.@'PD"@$9P/?0@\`'ZPR`?"0*`1G`]]"#P`V(1B;&1A2`9HM'&&:)1A")
+M7AC'1B``````QT8T`````,=&;/Q<!@"#[`A65>C\____QH.7`````6;'@Y0`
+M``#T`8/$$(7;=%^#>V``=%F-=@!F@;N4````E@!U&8/L!/]S8&HABT-@_W`H
+MZ/S___^#Q!"-=@!F_XN4````@^P,:-`'``#H_/___XDL).C\____@\00A=MT
+M#X-[8`!T"8"[EP````!UJF:#NY0`````=!R`?A0`=1:+0V!FBT`V9HE#6L=$
+M)`0`````C78`@^P(5E7H_/___XM$)!2#Q!"-=@"#Q`Q;7E]=PX/L#(M,)!"+
+M5"04#[8"@_@)#X>Q````_R2%Y"```(GVBT($QH!7#````(/L#%#H_/___[@`
+M````@\00Z9````"#[`0/MD($4&H`4>A$_O__@\00ZWN-=@"#[`0/MD($4&H!
+M4>@L_O__@\00ZV.-=@"#[`@/MD($4%'H_/___X/$$.M-D(/L!`^V0@50#[9"
+M!%!1Z-'\__^#Q!#K-(/L"`^V0@104>C\____@\00ZR&0@^P(#[9"!%!1Z/S_
+M__^X`````(/$$.L(N/____^-=@"#Q`S#BTPD!(M!8(7`=$K'0!P`````@$@D
+M!,=!8`````#'06@`````QT%D`````(-Y"#]_$XM1;(M!",>$@I@"````````
+MPY"+46R+00C'A(*8`0```````,.)]HM,)`2+06"%P'1*QT`<`````(!@)/O'
+M06``````QT%H`````,=!9`````"#>0@_?Q.+46R+00C'A(*8`@```````,.0
+MBU%LBT$(QX2"F`$```````##B?93@^P4BUPD'%/H_/___XN#)`4```5@#```
+MB00DZ/S___^#Q!A;PXGV4X/L%(M<)!Q3Z/S___^+@R0%```%8`P``(D$).C\
+M____@\086\.)]E575E.#[!R+?"0PBX<D!0``!6`,``")!"2#/P!T&HL'+0``
+M`@")!X/L"%#_=Q#H_/___X/$$(GV@W\(`'02@^P(_W<(_W<0Z/S___^#Q!"0
+M@W\,`'02@^P(_W<,_W<0Z/S___^#Q!"0@^P(C40D(E"-1"0D4(U$)"90C40D
+M*%"-1"0J4(U$)"U0C40D,%"-1"0R4(U$)#50C40D-E"-1"0Y4(U$)#Q0C40D
+M/U`/MT<D4.C\____@\1`@[]8!0```'0V@^P(_[=8!0``C8=`!0``4.C\____
+M@\0(BT0D"/^P6`4``(M$)`P%0`4``%#H_/___X/$$(GV@[]T!0```'0W@^P(
+M_[=T!0``C8=<!0``4.C\____@\0(BT0D"/^P=`4``(M$)`P%7`4``%#H_/__
+M_X/$$(UV`(._D`4```!T-X/L"/^WD`4``(V'>`4``%#H_/___X/$"(M$)`C_
+ML)`%``"+1"0,!7@%``!0Z/S___^#Q!"-=@"#OZP&````=#>#[`C_MZP&``"-
+MAY0&``!0Z/S___^#Q`B+1"0(_["L!@``BT0D#`64!@``4.C\____@\00C78`
+MO@````")\#I$)`=S18VOS`8``)"#[`B)\`^VV/^TG^0&``!5Z/S___^#Q`B+
+M1"0(_[28Y`8``(M$)`P%S`8``%#H_/___X/$$$:)\#I$)`=RPH._3`D```!T
+M-8/L"/^W3`D``(V'-`D``%#H_/___X/$"(M$)`C_L$P)``"+1"0,!30)``!0
+MZ/S___^#Q!"0@[]T"0```'0W@^P(_[=T"0``C8=<"0``4.C\____@\0(BT0D
+M"/^P=`D``(M$)`P%7`D``%#H_/___X/$$(UV`(._Q`D```!T-X/L"/^WQ`D`
+M`(V'K`D``%#H_/___X/$"(M$)`C_L,0)``"+1"0,!:P)``!0Z/S___^#Q!"-
+M=@"#OZP%````=#>#[`C_MZP%``"-AY0%``!0Z/S___^#Q`B+1"0(_["L!0``
+MBT0D#`64!0``4.C\____@\00C78`@[]8!@```'0W@^P(_[=8!@``C8=`!@``
+M4.C\____@\0(BT0D"/^P6`8``(M$)`P%0`8``%#H_/___X/$$(UV`(._"`8`
+M``!T-X/L"/^W"`8``(V'\`4``%#H_/___X/$"(M$)`C_L`@&``"+1"0,!?`%
+M``!0Z/S___^#Q!"-=@"#OR0&````=#>#[`C_MR0&``"-APP&``!0Z/S___^#
+MQ`B+1"0(_[`D!@``BT0D#`4,!@``4.C\____@\00C78`@[^0!@```'0W@^P(
+M_[>0!@``C8=X!@``4.C\____@\0(BT0D"/^PD`8``(M$)`P%>`8``%#H_/__
+M_X/$$(UV`(._R`8```!T-X/L"/^WR`8``(V'L`8``%#H_/___X/$"(M$)`C_
+ML,@&``"+1"0,!;`&``!0Z/S___^#Q!"-=@"#O_P(````=#>#[`C_M_P(``"-
+MA^0(``!0Z/S___^#Q`B+1"0(_[#\"```BT0D#`7D"```4.C\____@\00C78`
+M@[\D"0```'0W@^P(_[<D"0``C8<,"0``4.C\____@\0(BT0D"/^P)`D``(M$
+M)`P%#`D``%#H_/___X/$$(UV`(._G`D```!T-X/L"/^WG`D``(V'A`D``%#H
+M_/___X/$"(M$)`C_L)P)``"+1"0,!80)``!0Z/S___^#Q!"-=@"#OW0&````
+M=#>#[`C_MW0&``"-AUP&``!0Z/S___^#Q`B+1"0(_[!T!@``BT0D#`5<!@``
+M4.C\____@\00C78`@[_@"0```'1'_[?H"0``_[?D"0``_[?@"0``C8?("0``
+M4.C\____BT0D$/^PZ`D``/^PY`D``/^PX`D``(M$)!P%R`D``%#H_/___X/$
+M()"#OP0*````=$?_MPP*``#_MP@*``#_MP0*``"-A^P)``!0Z/S___^+1"00
+M_[`,"@``_[`("@``_[`$"@``BT0D'`7L"0``4.C\____@\0@D(._*`H```!T
+M1_^W,`H``/^W+`H``/^W*`H``(V'$`H``%#H_/___XM$)!#_L#`*``#_L"P*
+M``#_L"@*``"+1"0<!1`*``!0Z/S___^#Q""0@[]P"@```'1'_[=X"@``_[=T
+M"@``_[=P"@``C8=8"@``4.C\____BT0D$/^P>`H``/^P=`H``/^P<`H``(M$
+M)!P%6`H``%#H_/___X/$()"#OTP*````=$?_MU0*``#_MU`*``#_MTP*``"-
+MAS0*``!0Z/S___^+1"00_[!4"@``_[!0"@``_[!,"@``BT0D'`4T"@``4.C\
+M____@\0@D(._E`H```!T1_^WG`H``/^WF`H``/^WE`H``(V'?`H``%#H_/__
+M_XM$)!#_L)P*``#_L)@*``#_L)0*``"+1"0<!7P*``!0Z/S___^#Q""0@[^X
+M"@```'1'_[?`"@``_[>\"@``_[>X"@``C8>@"@``4.C\____BT0D$/^PP`H`
+M`/^PO`H``/^PN`H``(M$)!P%H`H``%#H_/___X/$()"#Q!Q;7E]=PU93@^P0
+MBUPD'%/H_/___XVS8`P``(DT).C\____B1PDZ/S____'!"30!P``Z/S___^)
+M'"3H_/___XD<).C\____@\0(:@%3Z/S___^#Q`AJ`5;H_/___X/$%%M>PXUV
+M`(/L&&B`%P``Z/S___^X`````(/$',.0D(M4)`2A`````(E"!(D5`````,.0
+MH0`````%F`$#`,.05U93BW0D$(L=`````+\`````Z/S___^)\H7`=`N-=@")
+M^8@*0DAU^(,]``````!U"(DU`````.L0@SL`=`F)]HL;@SL`=?F),XM$)!2)
+M1@2-1@R)1@R)1A"-1A2)1A2)1AB-1AR)1AR)1B"-AD`!``")AD`!``")AD0!
+M``"-AF`!``")AF`!`P#'AF0!`P``$```6UY?PY"+5"0$BTPD"(72=`2+$NL(
+MBQ4`````B?:%TG0)A<ET!8M"!(D!B=##BT0D"(M`$`-$)`0%F`$#`,.-=@!3
+M@>P0`0``BY0D&`$``(N<)!P!``"+2@2-A"2(````4/]R"/]1'(/$"(M3!(U$
+M)`A0_W,(_U(<@\00N@$```"*A"2!````.D0D`7=8NO____^*A"2!````.D0D
+M`7)&N@$```"*A"2"````.D0D`G<TNO____^*A"2"````.D0D`G(BN@$```"*
+MA"2#````.D0D`W<0BH0D@P```#I$)`,9THUV`(G0@<0(`0``6\.)]E=64XMT
+M)!"+'0````"%VP^$I0```(UV`(-["`!U%HE>#,<&`````(ES"+@!````Z8L`
+M``"+0PB+5@0[4`1U<8/L"/]P"/]V"/]2)(/$$(3`=%Z->PB#>P@`=$*+1@2#
+MN(``````=!V+%SM"!'46@^P(_W((_W8(_Y"`````@\00ZQ")]H/L"/\W5NC\
+M____@\00A<!X!XL_@S\`=;Z)7@R+!XD&B3>X`0```.L2C78`BQN%VP^%7O__
+M_[@`````6UY?PY"+5"0$H0````")`HD5`````(-Z#`!T$:$`````B4(0BT(,
+M`04`````PXUV`%.#[`B*1"00B$0D!XL=`````(7;=#")]HI$)`<X0P1T&8-[
+M0`!T&8/L#`^V1"034/]30(/$$(7`=`:)V.L-B?:+&X7;==*X`````(/$"%O#
+M55=64X/L+(ML)$"Y`````(`]``````)U/X.]E`$#`"!W-H/L"(M$)$R+4%"-
+M1"0(4(M$)%#_<%S_4CR+1"14BU!8#[9$)!P#0BB+5"14B4(<@\00ZSN)]HUU
+M#(GWC78`NP````"+10PYQG0:B?J)]CF(]/W__W4(0;L!````ZP:+`#G"=>J%
+MVW76BT0D1(E('(/$+%M>7UW#C78`N`````"+%0````"%TG0/D#E"&'8#BT(8
+MBQ*%TG7R@\!LPXGV5U93@\2`B[0DD````(N\))0```"%_W4$BWX$D(M>"(7;
+M=%^0BX:4`0,`B4,H@^P(BU,$C40D"%#_<PC_4AP/MD0D(`&&E`$#`%"#[`B+
+M0P3_<PC_4#"#Q`Q05XU#$%#H_/___X/$(`^V1"004&H45XU#+%#H_/___X/$
+M$(L;A=MUHKH`````BQT`````A=MT$8UV`#E3%'8#BU,4BQN%VW7R@<)@`@``
+MBX:4`0,`C03`4%)7C48X4.C\____@\00_[:4`0,`:``"``!7C4904.C\____
+M@\00:@%J+%>-AI@```!0Z/S___^#Q!#_MI0!`P!J%%>-AK````!0Z/S___^#
+MQ!"+AI0!`P"-!,!0:FA7C8:`````4.C\____@\00QX;D`````0```,>&\```
+M```0``#'AN@`````$```Z/S___]H0B$``%!7C49H4.C\____@\00BQT`````
+MA=MT'H-['`!T$H/L!/^VE`$#`%=6_U,<@\00D(L;A=MUXH/L@%M>7\.-=@!7
+M5E.#[!"+?"0@BD0D)(A$)`^`/0`````"=1"X`````(!\)`\!#X45`0``@^P,
+M#[9$)!M0Z/S___^)QH/$$+@`````A?8/A/4```"#[`R-1SA0Z/S___^)PX/$
+M$+D`````NF`"``")]H@(0$IU^J&<!0``0*.<!0``B8-8`@``C8-(`@``B8-(
+M`@``B8-,`@``@(L<`@```8ES!(I$)`^(0PB).X-^%`!T&XV#8`(``(E#$+D`
+M````BU84A=)T!H@(0$IU^HV#,`(``(F#,`(``(F#-`(``(V#.`(``(F#.`(`
+M`(F#/`(``,=#(`(!``#'0QS_____@WXP`'0G@^P,4_]6,(/$$(7`=!F#[`A3
+MC4<X4.C\____N`````"#Q!#K'HGVC8,H`@``C5<,BTH$B4($B9,H`@``B4@$
+MB0&)V(/$$%M>7\.055=64X/L#(ML)""+?0"+7QR-1QPYV'0WC7/TBQLY;BAU
+M)HU&#(M(!(M6#(E*!(D1B48,B4`$QD9>`H/L#%;H_/___X/$$(GVC4<<.=AU
+MR8M%!(-X-`!T#(/L#%7_4#2#Q!")]HN5+`(``(N%*`(``(E0!(D"@^P(58U'
+M.%#H_/___X/$'%M>7UW#B?975E.+?"00BW<,C4<,.?`/A*0```"-=@"-GMC]
+M___V@QP"```!#X2!````@WL,`'5[@'L(!'85@[MD`0```'08BX-D`0``.5@$
+M=`V0@'L(`75:]D-,`G14@WL<`'D-@^P(4U?H?/O__X/$$/:#'`(```)T.(/L
+M"&H`5^C\____B<*#Q!"%P'0D.=AT(/:`'`(```)T"8"C'`(``/WK#HM#'(E"
+M',=#'`````"0BS:-1PPY\`^%7____UM>7\.-=@!75E.+="00BWPD%(M$)!B+
+M7@S_BY`!`P"%P'@P@^P$4%=6Z/S___^#Q!"%P'4N@^P,BT8$5_]00(/$"%>-
+M1A!0Z/S___^#Q!#K$HGV@^P(5XU&$%#H_/___X/$$(.[D`$#``!U#X/L#%/H
+M"@```(/$$(UV`%M>7\-55U93@^P,BVPD(,9$)`L`BUT,C44,.=AT6XGVC;/8
+M_?__@'X(`75$]D9,0'0.@^P,5NC\____@\00ZS"`/0``````="?V1DP"=2'V
+M1DP!=`R#[`Q6Z/S___^#Q!"*1DRH!'4(@\@DB$9,B?:+&XU%##G8=:>+712-
+M110YV'0:B<:-=@"-0_2#[`Q0Z/S___^#Q!"+&SG>=>N+70R-10PYV'0KB<>-
+M=@"-L]C]__^`?@@$=A2#?@P`=0Z#[`Q6Z/S___^#Q!")]HL;.=]UVHM=#(U%
+M##G8=&6-L]C]__^`?@@!=5"*1DRH('1)@^#;B$9,BT8DA<!T%H-X%`!T"L9$
+M)`L!ZPF-=@"+`(7`=>J`?"0+`'4?@#T``````746@^P,5NC\____B30DZ/S_
+M__^#Q!")]HL;C44,.=AUFX/L#%7H@OW__X/$$(.]C`$#``!T$H/L#/]U!/^5
+MC`$#`(/$$(UV`(/$#%M>7UW#55=64X'LG````(N<)+````"+:PS'1"0,````
+M`(7;#X0/`0``@^P(BT,$C50D&%+_<PC_4!R#Q!`/MD0D(#L%H`4```^.U@``
+M`(U#$(E$)`3V1"0A`755#[8%`````#M$)`QU2`^V!0````"-!("-!("-!("-
+M!("-!("-!(#!X`:CI`4``,<%K`4```````")';`%``"#[`AHI`4``%7H_/__
+M_X/$$.FC````D(M#&(E$)`C_A9`!`P"#[`R+?"005^C\____B<:+0P2)'"1H
+M1)X&`%;_-:`%``#_<PC_4#2#Q""$P'45@^P(5E?H_/____^-D`$#`(/$$.L,
+MBT0D"#E#&(-4)`P`_P6@!0``#[9$)"`[!:`%```/CS'____'!:`%````````
+MBQN%VP^%\?[___^-D`$#`(.]D`$#``!U#(/L#%7H2?W__X/$$('$G````%M>
+M7UW#C78`55=64X/L#(MT)""+?"0DBVPD*(FNC`$#`(M>"(7;=!F#[`R+0P3_
+M<PC_4'B#Q!"$P'1SBQN%VW7GBQT`````A=MT%Y"#>R@`=`J#[`Q6_U,H@\00
+MBQN%VW7JA?]T%8/L"(M'!&H!_W<(_U`HQD=$`8/$$,>&D`$#``$```"#[`S_
+M=@CH_/___X/$$(.^D`$#``!T2(7M=!>#[`Q6Z/S___^#Q!#K-L:&A`$#``'K
+M+8.^D`$#``!T)(/L#&B@A@$`Z/S___^)-"3H_/___X/$$(.^D`$#``!UWXUV
+M`(/$#%M>7UW#5E.#[`2+="00.34`````=0N+!J,`````ZR2)]HL5`````(72
+M=!@Y,G0,B?:+$H72=`PY,G7VA=)T!(L&B0*-1@PY1@QT&XG#BT8,+2@"``"#
+M[`Q0Z/S___^#Q!`Y7@QUYXU&%#E&%'0NC78`BT84C4CTBU`$BP")4`2)`H/L
+M"%&-AH````!0Z/S___^#Q!"-1A0Y1A1UU8"^A`$#``!U(HL=`````(7;=!B)
+M]H-[+`!T"H/L#%;_4RR#Q!"+&X7;=>J+7@B%VW08C78`@^P,BT,$_W,(_U!T
+M@\00BQN%VW7K@\0$6U[#D%.+3"0(BUPD#(M1#(U!##G0=!:)P8UV`(V"V/W_
+M_SE8''0+BQ(YT77ON`````!;PU93@^P0BUPD'%/H_/___XG&QT`(`````(U`
+M;(E&)(M##(/H;(E&((U&#(E&#(E&$(/$$+D`````ND0```"-1BB("$!*=?J)
+M\(/$!%M>PXGV5E.#[`2+7"04BW0D&+@`````.7,(<B&#[`Q3Z/S___^+5"0@
+MB1")6`2)<`B+4P@I\D*)4PB#Q!"#Q`1;7L.)]H/L%(M$)!B+3"0<BU`(`U$(
+M2HE0"%%0Z/S___^#Q!S#@^P0BT0D%/]T)!B-4&A24.C\____@\0<PXUV`(/L
+M%(M$)!A0BP"#P&A0Z/S___^#Q!S#D%=64XM\)!"^`````+@`````@+^$`0,`
+M`'4[BU\(A=MT&HUV`(/L#(M#!/]S"/]05`G&@\00BQN%VW7IB?"$P'0/@^P,
+M5^C\____@\00C78`B?(/ML);7E_#C78`4X/L"(M$)!"+6`B%VW06D(/L#(M#
+M!/]S"/]0;(/$$(L;A=MUZX/$"%O#B?964X/L!(MT)!"+7@B%VW0N@^P,BT,$
+M_W,(_U!P@\00@'M$`'03@^P(BT,$:@'_<PC_4"B#Q!")]HL;A=MUTHM>#(U&
+M##G8="J)QHGVC8/8_?__@'@(`744BU`$@WHX`'0+@^P,4/]2.(/$$)"+&SG>
+M==J#Q`1;7L-3@^P(BT0D$(M8"(7;="Z0@'M$`'02@^P(BT,$:@#_<PC_4"B#
+MQ!"0@^P,BT,$_W,(_U!H@\00BQN%VW73@\0(6\.)]E93BUPD#(MT)!"+0PR+
+M4`R#P`PYT'0CB<&-=@"-@MC]__^`>`@!=0PY<%1U!SE86'0-B?:+$CG1=>*X
+M`````%M>PXGV55=64X/L#(M\)""+;"0D55?HIO___XG#@\0(A<`/A(\```"Z
+M`````/:`'`(```$/A<L```"#N*0`````=0F#N)0`````=`VZ`````.FO````
+MC78`BT,DA<!T2Y"+4!2%TG0]BTH,A<ET)[@`````@'DP`'0<#[9Q,(UV`#E4
+M@4AU"L=$@4@`````B?9`.<9_ZX/L#%+H_/___X/$$.NUD(L`A<!UMH/L#%/H
+M_/___X/$$(/L#(U'$%#H_/___XG#@\00A<!T,H/L#(M'!/]T)#C_="0X4U7_
+M=PC_4#2#Q""Z`0```(3`=1>#[`A3C4<04.C\____@\00N@````")]HG0@\0,
+M6UY?7<.)]E=64XM\)!"#[`Q7Z/S___^+7PR#Q!"-1PPYV'0MB<:0C8/8_?__
+M@[@D`@```'05BU`$@WHX`'0,@^P,4/]2.(/$$(GVBQLYWG76@^P,5^C\____
+MBU\,@\00C4<,.=AT%H-[^`!T"K@!````ZPZ-=@"+&SG8=>JX`````%M>7\.0
+M@^P4BT0D&%#_,.CA\?__@\0<PY"+1"0$@W@<`'@'QT`<_____\.)]E.+3"0(
+MNP````"+5"0,2H/Z_W0,#[8!`<-!2H/Z_W7T#[;#6\.-=@"+3"0$H0````"%
+MP'08BU`(A=)T"SE*"'01BQ*%TG7UBP"%P'7HN`````##D%93@^P$BW0D$(M,
+M)!2#>1``=&&+GL@```"#>10`=`F+412+01")0A"+41"+012)`L=!$`````#'
+M010`````@[[(`````'0M.9[(````="6#[!"+GL@```#H_/___X/$"(M3!"G"
+M4O]V!.C\____@\00C78`@\0$6U[#B?975E.+?"00BW0D%.C\____B<&#?A``
+M=!Z#?A0`=`F+5A2+1A")0A"+5A"+1A2)`L=&$`````")R`,&B48$BY?(````
+MC8_(````A=)T%HG#D(M"!"G8A<!_"HU*%(M2%(72=>V)5A2)3A"%TG0&C484
+MB4(0B3$YM\@```!U$X/L"/\V_W<$Z/S___^#Q!"-=@!;7E_#5U93BW0D$.C\
+M____B<>+GL@```")V87;=$R)]HM!!"GXA<!_08-Y%`!T#(M1%(V&R````(E"
+M$(M!%(F&R````(G#QT$0`````,=!%`````"#[`S_<0S_40B#Q!"+CL@```"%
+MR76V@^P,5NC\____@\00A=MT'CF>R````'46@^P(BT,$*?A0_W8$Z/S___^#
+MQ!")]EM>7\-75E.+5"00BWPD%(MT)!B+2@R-0@PYR'0]B<.0C9'8_?__@'H(
+M!'8H.7HD=2.%]G@3@WH,`'0)BT(,.52P2'0*A?9Y#(-Z#`!U!HG0ZPV)]HL)
+M.<MUQK@`````6UY?PY!64XMT)`R+7A"Y`````+HL````B=B-=@"("$!*=?J-
+M0PB)0PB)0PR)&XE;!,=#%.BN!@")<QC'0QP`````N`````!;7L.-=@!75E.+
+M="00@^P(:$`8``#_-NC\____B<>#Q!#V1DP(=1R+1B2%P'05BQB#[`A05^C\
+M____B=B#Q!"%VW7K@^P,BT90_W9<_U!`@\0(_W9<BT98@\`04.C\____@\00
+M6UY?PXGV5E.#[`2+="00C48D]D`H`G0.@^P,5NC\____@\00ZR*+&(7;=!R)
+M]HM3%(72=`V#[`R+0@12_U`D@\00BQN%VW7FQX:D`````````(/$!%M>PXGV
+M4X/L$(M$)!B+6!!0BP,%L````%#H_/___\>#F````*BJ!@")FYP```#'@Z``
+M````````@\0(C8.8````4(L#@\`D4.C\____@\086\.-=@!75E.+?"00@*<<
+M`@``_HM?)(7;=!F-=@"#>Q0`=`J+0Q2`H!P"``#^BQN%VW7J@^P(5VH!Z/S_
+M___'AZ0````!````BP<%L````(D$).C\____B<:#Q!"%P'1@QP`!````QT`$
+M_*H&`(E&",=`#`````")>!"+7R2%VW0LBT,4A<!T'X-X#`!T#(UV`(M`#(-X
+M#`!U]X/L"%90Z/S___^#Q!"+&X7;==3_#H,^`'4,@^P,5NCX_O__@\006UY?
+MPY!75E.+="00BWPD%(M$)!B%P`^(S0```(/L!%!75NC\____B<.#Q!"%P`^$
+MI0```(MV#+\`````]D!,`G0/@^P,4.C\____@\00ZR^0@#T``````'0E]D!,
+M`70-@^P,4.C\____@\00D(I#3*A$=0:#R"2(0TR_`0```(.^)`$```!U087_
+M=#W'AB0!```!````QX88`0```````(FV'`$``,>&(`$```````"#[`B-AA@!
+M``!0C48D4.C\____@\00C78`@^P(4VH"Z/S___^#Q!#K((/L#(M&!%?_4$"#
+MQ!"-=@"#[`A7C4804.C\____@\006UY?PU93@^P,BT0D&(M8#(MP$%"-0RQ0
+MZ/S___]3:`RL!@!64^C\____@\0D6U[#BT0D!(M`)`,%6!@``(/H%,.-=@!5
+M5U93@^P,BW0D(%;HV____X/$!(E$)`B+;BB+?1#_3Q`/MD9>@_@-=!Z#^`U_
+M#8/X"W10Z9L```"-=@"#^!%T7>F.````B?9FBT9<)?\"``!F/0`"=7V`?E\`
+M=2'&1E\!QD9>`(U'"(M0!(M,)`B)2`2)`8E1!(D*Z8P```#&1EX0ZU#&1EX`
+MC4<(BU`$BTPD"(E(!(D!B5$$B0KK;(/L#%7HF1X``(/$$(7`=2:`?E\!=R#^
+M1E_&1EX`C4<(BU`$BTPD"(E(!(D!B5$$B0KK.8UV`(!^7A!U&HM=$(EU$(/L
+M"%5J`^C\____B5T0@\00C78`BU0D"(M""(E&:(/L#%;H_/___X/$$(-_(`!U
+M(,='(`$```"#[`B-1Q10BT4`@\`L4.C\____@\00C78`@\0,6UY?7<.+1"0$
+MBT`0BPBZ`````#G!=!*+402+`8E0!(D"B0F)202+40R)T,.05E.#[`2+="00
+MBUPD%(M.$(![7`!U%0^W0U"Z``````-#2!-33(E&0(E61/]!$(/L"(M&4%/_
+M=ES_4$R#Q!1;7L.-=@!64X/L!(MT)!"+7A#'0R``````]H8<`@``&`^%X```
+M`(.^E``````/A=,```"*0RBH`@^%R````*@$="2-0P@Y0PAU!#D;=!B#[`Q6
+MZ$L=``"#Q!#V0R@"#X6B````B?:-0P@Y0PAT+8-[$``/A8X```"+0PB+2`2+
+M$(E*!(D1B0")0`2#[`C_<`Q6Z"S___^#Q!#K:P^V1DHY0Q!S8HGV5NCN_O__
+MB<*#Q`2%P'119HM`7"7_,```9CT$('4J.1MT&L9"7@&#[`Q2Z/S___]6Z+_^
+M__^)PH/$%.L,]D,H`70&@$LH!(GV@^P(4E;HRO[__X/$$`^V1DHY0Q!RHHGV
+M@\0$6U[#B?975E.+="00BWXHBU\05N@M_?__@\0$B<*`?EP$=1[V1ETP=`;V
+M0R@$=!+&1EX!@^P,5NC\____@\00ZUC'0R0`````QT(0`````(ER#(M&:(E"
+M",=&:$2M!@"+0P2)4P2)&HE"!(D0#[9'2CE#$',D@WL@`'4>QT,@`0```(/L
+M"(U#%%"+!X/`+%#H_/___X/$$(GV6UY?PX/L#(M4)!"+0A"`HAP"``#WQX*4
+M`````````(-X(`!U'\=`(`$```"#[`B#P!10BP*#P"Q0Z/S___^#Q!"-=@"#
+MQ`S#@^P,BU0D$(J"'`(``*@(=1^#R`B(@AP"``"#[`2+0E!2:(BP!@#_<ES_
+M4$2#Q!"0@\0,PU93@^P$BW0D$(M&)(7`=$J+4!2%TG0]BTH,A<ET)[@`````
+M@'DP`'0<#[99,(UV`#E4@4AU"L=$@4@`````B?9`.<-_ZX/L#%+H_/___X/$
+M$.NVD(L`A<!UMH/L#%;H_/___X/$!(M&4/]V7/]09(DT).C\____@\046U[#
+MC78`4X/L"(M,)!"+7"0<BE0D)+C_____]H$<`@```70C@^P(BT%0#[;24O]T
+M)"P/M]-2_W0D+/]T)"S_<5S_4%"#Q""#Q`A;PXGV55=64XM,)!2_`````(M9
+M.(MQ/('#``#^_X/6_XG8)0``_O^)PX/#`8/6`(M1)(72=!Z]`0```)"+0A2%
+MP'0+BT@H*=F)Z-/@"<>+$H72=>BY`````+H!````B?:)T-/@A<=U#(G(F0'8
+M$?+K$XUV`$&#^0-^YK@`````N@````!;7E]=PXUV`%575E.+7"04O@````"_
+M`````+T`````QT,P`````,=#-`````#V0TQ`=!''0R@`````QT,L`````.M=
+MD(M+)(7)=#>0@WD4`'0&1>LGC78`BT,PBU,T`T$,$U$0B4,PB5,T.7D0<@UW
+M!3EQ#'8&BW$,BWD0BPF%R77*@_T#?A#'0R@`````QT,L`````.L)B7,HB7LL
+MC78`6UY?7<.-=@!55U93@^P,BT0D((M8)+D`````A=MT#I"#>Q0!@]G_BQN%
+MVW7SN`````"#^0,/CXP$``#K1XG8Z8,$``"+,XM&!(M6"(E#!(E3"(L&B0.#
+M[`A6@^P,:$`8``"+5"0\_S+H_/___X/$%%#H_/___[@`````@\00Z40$``"0
+MBW0D((M>)(7;#X0O!```D(-[%``/A48"``"+?"0H.7L(#X<M`@``<@V+5"0D
+M.5,$#X<>`@``BW0D)(M\)"@#="0L$WPD,(M#!(M3"`-##!-3$#G7#X?Z`0``
+M<@@YQ@^'\`$``(M4)"@S4PB+1"0D,T,$"<)U%HM4)#`S4Q"+1"0L,T,,"<(/
+MA"W___^+5"0H,U,(BT0D)#-#!`G"#X6&````@^P8:$`8``"+="0\_S;H_/__
+M_X/$%%#H_/___XG&@\00N`````"%]@^$<P,``+D`````NA@```")\(@(0$IU
+M^HM##(M3$"M$)"P;5"0PB48,B580BT0D)(M4)"@#1"0L$U0D,(E&!(E6"(L#
+MB0:),XM$)"R+5"0PB4,,B5,0B=CI'`,``)"+5"0H.5,(#X<?`0``<@V+?"0D
+M.7L$#X,0`0``@^P8:$`8``"+1"0\_S#H_/___X/$%%#H_/___XG&@\00N```
+M``"%]@^$T0(``+D`````NA@```")\(@(0$IU^HM#!(M3"(E&!(E6"(M4)"2+
+M3"0H*U,$&TL(B58,B4X0BP.)!HDSBW0D)(M\)"B)<P2)>P@I4PP92Q"+?"0P
+M.7L0#X*`````=PF+5"0L.5,,=G6#[!AH0!@``(MT)#S_-NC\____@\044.C\
+M____B<:#Q!"%P`^$P?W__[D`````NA@```"("$!*=?J+1"0LBU0D,`-#!!-3
+M"(E&!(E6"(M##(M3$"M$)"P;5"0PB48,B580BP.)!HDSBT0D+(M4)#")0PR)
+M4Q")V.GQ`0``B?:#>Q0`#X36`0``B?:+5"0H,U,(BT0D)#-#!`G"#X6^`0``
+MN0$```"+,X7V=#.#?A0`=">+5"0H,U8(BT0D)#-&!`G"=16+1@R+5A`[4Q!R
+M"7<%.T,,=@*)\T&+-H7V=<VX`````(/Y`0^/@0$``(M4)#`Y4Q!R='<)BWPD
+M+#E[#')I@^P8:$`8``"+1"0\_S#H_/___X/$%%#H_/___XG&@\00N`````"%
+M]@^$/P$``+D`````NA@```")\(@(0$IU^HM$)"2+5"0HB48$B58(BT0D+(M4
+M)#")1@R)5A"+`XD&B3.)\.D$`0``BU0D((MR)(7V#X3<````@WX4``^%R```
+M`(M[#(MK$(M#!(M3"`'X$>J+3@@QT3-&!`G!#X6H````BT8,BU80`?@1ZCM4
+M)#!W$G(&.T0D+',*N`````#IJ0```(/L&&A`&```BWPD//\WZ/S___^#Q!10
+MZ/S___^)QX/$$+D`````NA@```"("$!*=?J+1"0LBU0D,`-#!!-3"(E&!(E6
+M"(M&#(M6$`-##!-3$"M$)"P;5"0PB48,B580BT0D)(M4)"B)1P2)5PB+1"0L
+MBU0D,(E'#(E7$(L#B0>).XGXZR20BS:%]@^%)/___[@`````ZQ*-=@"+&X7;
+M#X72^___N`````"#Q`Q;7E]=PY!64X/L#(M<)!B+="0<:$`8``#_,^C\____
+MB<&-4R2#Q!"#>R0`=""0.3)U%(L&B0*#[`A64>C\____@\00ZPB0BQ*#.@!U
+MX8/$!%M>PXUV`%575E.#[`R+?"0DO0````"+1"0@BW`DA?9T'Y`Y_G04BT8$
+MBU8(BT\(,=$S1P0)P74"B?6+-H7V=>*%[0^$OP```(M%#(M5$#M7$'(<=P4[
+M1PQR%8/L"%?_="0LZ/S___^#Q!#I4P$``(M$)""+<"2%]G1E@WX4`'48BT<$
+MBU<(`T<,$U<0BTX(,=$S1@0)P70(BS:%]G7<ZS^%]G0[BTT,BUT0BT4$BU4(
+M`<@1VHE&!(E6"(M'#(M7$"G(&=H!1@P15A"#[`A7_W0D+.C\____@\00Z>,`
+M``#'1Q0`````BTT,BUT0BT4$BU4(`<@1VHE'!(E7""E/#!E?$.F[````O0``
+M``"[`````(M$)""+<"2%]G1$B?:#?A0`=3:+1P2+5P@#1PP35Q"+3@@QT3-&
+M!`G!=02)\^L:BT8$BU8(`T8,$U80BT\(,=$S1P0)P74"B?6+-H7V=;['1Q0`
+M````A>UT+HM%!(M5"(E'!(E7"(M'#(M7$`-%#!-5$(E'#(E7$(/L"%7_="0L
+MZ/S___^#Q!"%VW0EBT<,BU<0`T,,$U,0B4<,B5<0@^P(4_]T)"SH_/___X/$
+M$(UV`(M$)""`2$P0@\0,6UY?7<-55U93@^P,BW0D)(M\)"C'1"0(`````,=$
+M)`0`````O0````"#?"0L`'0'BT0D+(MH,(7M=1J+3"0@.7DL=Q%R!3EQ*',*
+MN`````#I0P$``(M$)""+6"2%VW1OD(-[%`!T"HM,)"PY2Q1U,9`Y>Q!R*W<%
+M.7,,<B2#?"0(`'09BT,,BU,0BTPD"#M1$'(*=PP[00QS!XUV`(E<)`B#>Q0`
+M=2*%[70>BT4$BU4(`T4,$U40BTL(,=$S0P0)P74&B5PD!(GVBQN%VW62@WPD
+M!`!T'XM,)`2+00R+41`#10P351`Y^G(+=P0Y\'(%B6PD")"X`````(-\)`@`
+M#X23````@^P(:@2+1"0L_S#H_/___XG#@\00N`````"%VW1UBTPD((E+)%'H
+MR?;__XE#*(E3+(/$!(G1"<%T*8ES%(E[&(/L#%=6BT0D'/]P"/]P!/]T)#SH
+MQ/?__XE$)"B#Q""%P'43@^P,4^C\____N`````"#Q!#K'8M,)`B)612)2S"+
+M1"0@@$A,$%#H_/___XG8@\0$@\0,6UY?7<.05E.#[`R+7"08BW,D_W,P5NB#
+M_/__B1PDZ/S___]6Z/S___^#Q!A;7L.-=@!64X/L'(MT)"AH0!@``/\VZ/S_
+M__^#Q!10Z/S___^)PX/$$(7`=0Z#[`Q6Z/S___^#Q!#K,KD`````NA@```"0
+MB`A`2G7ZBT84BU88B4,,B5,0B5XDBT84BU88B48PB58TB48HB58L@\0$6U[#
+MC78`55=64X'L#`(``(NT)"`"``"#QB2*5BB(T(/@`SP!#X1Z`0``B-"#X.^(
+M1BBY`````+H``@``B>"("$!*=?J*1BBH`@^%50$``(GEB,&#X?>(3BC'!"1?
+M=V%2BYPD(`(``(M#%(M3&(E$)`2)5"0(A,EY#(!,)`P0BD8GB$0D#?9&*0%T
+M&(!-#P&*5BG!X@*#X@B*10R#X/<)T(A%#(I&*:@$=!:`30\"B,+0ZH/B!(I%
+M#(/@^PG0B$4,BD8IJ!!T%X!-#PB(PL#J!(/B`HI%#(/@_0G0B$4,BD8IJ$!T
+M%(!-#P2(PL#J!XI%#(/@_@G0B$4,@WX(`'<-@7X$__\?`'<$@&8H^XI&**@@
+M=0G`Z`*#X`&(10Z_`````(L>A=MT.X-[%`!T+XT,?XU,S0"+0P2+4PB)01")
+M412+0PR+4Q")01B)41R+0Q2+4"R+0"B)02")421'BQN%VW7%@^P(:``"``!5
+MZ/S____WV(B%``$``(/$"&H`56H!BT84BU88!0``_O^#TO\E``#^_U)0_[0D
+M/`(``.C\____@\0@@<0,`@``6UY?7<.-=@!3@^P(BUPD$(!["`%U"8`]````
+M``)U";C_____ZS^)]HM#.(M3/`4``/[_@]+_)0``_O^)0Q2)4QB#[`Q3Z*+]
+M__^`8TSTQT,<_____XD<).C\____N`````"#Q!"#Q`A;PXGV5U93BW0D$(M<
+M)!2)WX`]``````!T$H`]``````!U"8!.3`+II````(J&'`(``*@!#X26````
+M@^#[B(8<`@``N0````"Z``(``(GXD(@(0$IU^H/L"&H!5VH!:@!J`%;H_/__
+M_X/$((`[174T@'L!4G4N@^P(:@%3:@%J`&H!5NC\____@\0@@#M0=12`>P%-
+M=0Z`3DP"ZS2`3DP"ZRZ)]H"[_@$``%5U(X"[_P$``*IU&KH`````B=#!X`2#
+MO#C*`0```'720H/Z`W[K6UY?PU93@^P$BW0D$(!F3+^+7B2%VW1*@WL4`'0.
+M@^P,_W,4Z/S___^#Q!"+&X7;=>:+7B2%VW0IC78`@WL4`'0:BT,4@W@,`'41
+M@^P,4.C\____BUXD@\00ZP*+&X7;==I6Z/S___^#Q`A;7L.)]E575E.![$P"
+M``"+M"1@`@``C7PD0(U>)(G]@#T``````@^$+0(``(/L"&H!5VH!BT8XBU8\
+M!0``_O^#TO\E``#^_U)05NC\____@\0@A<!T'X"F'`(``/Z#[`A6:@'H_/__
+M_X!+*`&#Q!#I_0,``)"!/U]W85(/A=0!``"#[`AH``(``%?H_/___X/$$(3`
+M#X6[`0``@'\.``^5PL'B`HI#*(/@^PG0B$,HBT8XBU8\!0``_O^#TO\E``#^
+M_XE&%(E6&(/L#%;H>/O__X/$$/9'#!!T"H!+*("*1PV(0R?V1P\!=!>*4RF#
+MR@&*1PS`Z`*#X`*#XOT)PHA3*?9'#P)T%HI3*8/*!(I'#-'@@^`(@^+W"<*(
+M4RGV1P\(=!>*4RF#RA"*1PS!X`2#X""#XM\)PHA3*?9'#P1T&HI3*8/*0(I'
+M#(/@`0^VP,'@!X/B?PG"B%,IQT0D.`````#'1"0\`````(M4)#R-!%*-!,>)
+M1"0T@\`0B40D,(G!BT`,"T$(#X2%````@^P(:@3_-NC\____B40D2(/$$(7`
+M#X3)`@``@^P,BT0D//]P#/]P"(M4)$C_<A3_<A!6Z-CQ__^)1"0\@\0@A<!T
+M<(M,)#B)<22+1"0\C01`BU3'((M,QR2+1"0XB5`HB4@LBU0D'(E0,(M4)!R+
+M0@R+4A"+3"0XB4$4B5$8BT0D'(E(%/]$)#R#?"0\`P^.2?___X-\)#@`=0;V
+M0R@$="N`2RA`5NC\____@\0$Z74!``"#[`S_="1$Z/S___^#Q!#I'0(``)"`
+M2R@!@^P(C40D2%!6Z&+\__^#Q!#V1DP"#X0!`0``@$LH`8!F3/N#[`AJ`8U4
+M)$Q2:@%J`&H)5NC\____@\0@A<`/A;G]__^!?"1`>6-G;`^%R@```(/L"&@`
+M`@``C4PD3%'H_/___X/$$(3`#X6M````BDPD1(C*P.H$@^("BH8<`@``@^#]
+M"="(AAP"``#VP1!T"X!+*("*1"1%B$,G]D0D1P%T&(I3*8/*`8I$)$3`Z`*#
+MX`*#XOT)PHA3*?9$)$<"=!>*4RF#R@2*1"1$T>"#X`B#XO<)PHA3*?9$)$<(
+M=!B*4RF#RA"*1"1$P>`$@^`@@^+?"<*(4RGV1"1'!'0=BE,I@\I`BD0D1(/@
+M`0^VP,'@!X/B?PG"B%,IB?;V0R@!=#J#.P!T*8/L"/\S@^P,:$`8``#_-NC\
+M____@\044.C\____QP,`````@\00C78`BT,4BU,8B484B588@'LH`'D:QD4`
+M`(I#)XA%!(/L"(M#+%7_<SC_4&"#Q!#V0RD!="+&10`"BD,IT.B#X`&(102#
+M[`B+0RQ5_W,X_U!@@\00C78`BD,IJ`1T'<9%``/`Z`.#X`&(102#[`B+0RQ5
+M_W,X_U!@@\00BD,IJ!!T(<9%``3`Z`6#X`&(103&104`@^P(BT,L5?]S./]0
+M8(/$$(I#*:A`="'&10`%P.@'B$4$QD4%`(/L"(M#+%7_<SC_4&"#Q!"-=@"!
+MQ$P"``!;7E]=PY!75E.![``"``"+M"00`@``C5XDB>>`/0``````#X1.`0``
+M@$Y,`H!+*`&`9DS[@^P(:@%7:@%J`&H)5NC\____@\0@A<`/A0L!``"!/"1Y
+M8V=L#X6\````@^P(:``"``!7Z/S___^#Q!"$P`^%HP```(I,)`2(RL#J!(/B
+M`HJ&'`(``(/@_0G0B(8<`@``]L$0=`N`2RB`BD0D!8A#)_9'!P%T%XI3*8/*
+M`8I'!,#H`H/@`H/B_0G"B%,I]D<'`G06BE,I@\H$BD<$T>"#X`B#XO<)PHA3
+M*?9'!PAT%XI3*8/*$(I'!,'@!(/@((/BWPG"B%,I]D<'!'0:BE,I@\I`BD<$
+M@^`!#[;`P>`'@^)_"<*(4RGV0R@!=%:#.P!T*8/L"/\S@^P,:$`8``#_-NC\
+M____@\044.C\____QP,`````@\00C78`BT,4BU,8B484B588ZQJ`IAP"``#^
+M@^P(5FH!Z/S___^`2R@!@\00D('$``(``%M>7\.)]E93BUPD#(G>`W0D$(GQ
+M.=YV$XGV@^D"BA&*00&(`8A1`3G9=^^)V3GS=%&`.R!U#$,Y\W0Z@#L@=/:)
+M]CGS="^`.P!T*HUV`(H#0SP@=1$Y\W0<@#L`=`Z`.R!T"8UV`(I#_X@!03GS
+M=`6`.P!UV3GQ=`F0Q@$`03GQ=?A;7L.05E.+7"0,BW0D$(I3"M#J@^(!BD8*
+MT.B#X`&Y`0```#G"?TF*4PK0ZH/B`8I&"M#H@^`!N?____\YPGPPBD,,N0$`
+M```Z1@QW(XI##+G_____.D8,<A:*0PVY`0```#I&#7<)BD,-.D8-&<F0B<A;
+M7L.-=@!55U93@^Q4BVPD:&H!_W4,Z/S___^)QX/$"(M5!(U$)"A0_W0D</]2
+M/(/$$(N7+`(``(N'*`(``(E0!(D"BP>+6`R#P`PYV`^$@@```(UV`(VSV/W_
+M_X!^"`%U:(M66(M%!#M"!'4=@[B``````'04@^P(_W((_W4(_Y"`````@\00
+MZP^#[`C_=EA5Z/S___^#Q!"%P'@XA<!U*8/L"(M%!(U4)`A2_W9<_U`\C40D
+M,(U4)!!24.C1_O__@\08A<!^#8GVBQN+!X/`##G8=8&-AR@"``"+4P2)0P2)
+MGR@"``")4`2)`L='(`$```"`CQP"```!BT4$B4=0BT0D9(E'7(EO6(M$)&B)
+M1U2+1"0@BU0D)(E'.(E7/(E'%(E7&(I$)"Z(1TJ+1"0T9HE'2(M/$`^V5"0J
+M@^(!BD$H@^#^"="(02AJ*(U'8%#H_/___XGX@\146UY?7<.-=@!3@^PL_W0D
+M//]T)#S_="0\Z(_^__^)PX/$"(M04(U$)`A0_W-<_U(\BT0D*(/$$/9$)`H!
+M=0GV@``!```$=0R#[`Q3Z/S___^#Q!")V(/$*%O#B?:#[`R+1"08C03`4&H8
+M_W0D'(/L#&A`&```_W0D+.C\____@\044.C\____@\0<PY!55U93@^PLBWPD
+M0(MT)$2#_P</AYP!``#_)+T,(0``D(/L#%;H_/___XG%BU`,@\00C4`,.=`/
+MA'@!``"-FMC]__^`>P@!=0R+3"1(.4M<=`Z-=@"+$CG0=>+I50$``(/_!P^'
+M3`$``/\DO2PA``"#[`R+0P13_U`D@\00Z3,!``"#NY0`````#X4F`0``QX.4
+M`````0```(M#!(M`.(F#B````(F;C````,>#D`````````"#[`B-@X@```!0
+MC44L4.C\____@\00Z>4```"`BQP"```0Z=D```"`HQP"``#OBT,0@W@@``^%
+MQ0```,=`(`$```"#[`B+0Q"#P!10C44L4.C\____@\00Z:,```"#[`B+0UB+
+M4`2-1"0(4/]S7/]2/(I$)!Z(0TJ#Q!#I@````(/L#%;H_/___XG%BU@(@\00
+MA=MT#HUV`#ES"'0&BQN%VW7U@^P,C4,L4.C\____@\00A<!T2HE8#(M4)$B)
+M4!#'``2M!@")0`3'0`@`````@^P(4(U%)%#H_/___X/$$.L>B?:+7A#'1A``
+M````@^P(5FH#Z/S___^)7A"#Q!"0@\0L6UY?7<-3@^P(QP58&````````(L=
+M`````(7;=!O_4T@Y!5@8``!S"?]32*-8&```D(M;!(7;=>6#!5@8```4@^P,
+M:$`8``#H_/___[@`````@\086\.-=@"#[!C_="0<Z/S___^#Q!S#4X/L"(M<
+M)!"+4Q"*0BB#X`4\`75/BT0D%#E")')&@^P(:@'_,^C\____B<*#Q!"%P'0T
+MBD!=@^#/@\@@B$)=B5HHB5HLQD)<!,9"7@#'0F@PR@8`@^P,4NC\____@\00
+MZP6)]O]")(/$"%O#BT0D!(M`$,=`)`$```##D%93@^P0BT0D'(M8+(LP4.C\
+M_____PN#Q!"#.P!U$H/L"(U#!%!6Z/S___^#Q!")]H/$!%M>PXGV5E.#[`R+
+M="08BUX0:@'_-NC\____@\00N@````"%P'1?]D,H`70=QD!<`L=`4$PA``#&
+M0$@&QT!,`````,9`20#K.)#&0%P#QT!8`````,9`4T!FQT!,``!FQT!.``!F
+MQT!0``#&0%)`9L=`2```9L=`2@$`9L=`5```B7`HB<*)T(/$!%M>PU.#[!2+
+M7"0@_W0D'.AG____@\00A<!T&(E8+,=`:+S*!@#_`X/L#%#H_/___X/$$(/$
+M"%O#C78`5U93BUPD$(M\)!2`>P@$=C>^`````(![,`!T4(M$LTB%P'08]H`<
+M`@```70/@^P(5U#H_/___X/$$(GV1@^V0S`Y\'_7ZR60@'L(!'4&BULDC78`
+M]H,<`@```70/@^P(5U/H8?___X/$$(GV6UY?PU93@^P$BTPD$(MQ*(M>$(I3
+M*(C0@^#]B$,H@'E>`74(B-"#X/F(0RB#[`Q1Z/S___^#Q!"#>R``=1['0R`!
+M````@^P(C4,44(L&@\`L4.C\____@\00B?:#Q`1;7L.)]E93@^P0BUPD'(MS
+M$%/H7O[__XG"@\00N/____^%TG0@QT)H),P&`(!.*`*#[`B+0U!2_W-<_U!,
+MN`````"#Q!"#Q`1;7L.0D%93BW0D#(L-`````(7)=":+40R-00PYT'06B<.-
+M@MC]__\YL%@"``!T$8L2.=-U[(L)A<EUVK@`````6U[#B?:+5"0$@'H$`'42
+MN`````"!.GL!``!V%^L0C78`N`````"!.GL!``!V!;@!````PY"+5"0$@'H$
+M`'42N`````"!.L,!``!V%^L0C78`N`````"!.L,!``!V!;@!````PY"+5"0$
+MBTPD"(H".@%U$HGV@#H`=`M"08H".@%T\XUV``^^`@^^$2G0PXUV`%575E.#
+M[`R+?"0@BVPD)(FO:`$#`+X`````.>YS)HGVC1QVC1R?@^P(C8-D`0``4%?H
+M_/___XF#8`$``(/$$$8Y[G+<QX=L`0,`$@```(L5`````(72=!N+AVP!`P`[
+M0@AV"8M""(F';`$#`(M2!(72=>6#Q`Q;7E]=PY!64X/L!(MT)!"[`````(.^
+M:`$#``!V*Y"-!%N-!(;_L&@!``#_L&0!``#_L&`!``!6Z/S___^#Q!!#.9YH
+M`0,`=];'AF@!`P``````@^P,5NC\____@\046U[#D%575E.![(P```"^````
+M`(L]`````(7_#X2S````C78`BU\(A=L/A)L```"-;"0`D(/L"(M#!%7_<PC_
+M4!R#Q!"`?"03`'1UB?!&.X0DH````'5I@[PDI`````!T6P^V1"07BY0DI```
+M`#D"?$N+&X7;=0FX`````.M;B?8/MD0D%XN4)*0````I`H/L"(M#!%7_<PC_
+M4!R#Q!"`?"03`'0'N`````#K+0^V1"07BY0DI````#D"?;6)V.L9BQN%VP^%
+M:O___XL_A?\/A5#___^X`````('$C````%M>7UW#55=64X'LC````+X`````
+MBST`````A?\/A*<```"-=@"+7PB%VP^$CP```(UL)`"0@^P(BT,$5?]S"/]0
+M'(/$$(!\)!,`=&F)\$8[A"2@````=5V#O"2D`````'1/BX0DI````(,X`'1#
+MBQN%VW4)N`````#K4XGVBX0DI````/\(@^P(BT,$5?]S"/]0'(/$$(!\)!,`
+M=`BX`````.LJD(N$)*0```"#.`!UO8G8ZQF+&X7;#X5V____BS^%_P^%7/__
+M_[@`````@<2,````6UY?7<-55U93@>R<````B[PDN````(NT)+P```#'1"0,
+M_____\=$)`@`````QP<`````QP8`````BRT`````A>T/A)````")]HM="(7;
+M='R0@^P(BU,$C40D&%#_<PC_4AR+0P2#Q!"#N(0`````=!B%]G04@^P,_W,(
+M_Y"$````B40D&(/$$)"`?"0C`'00_T0D#,<'`````,<&`````#N<)+````!U
+M$(N$)+0```"+5"0,B1#K'Y`/MD0D)P$'BT0D"`$&BQN%VW6%BVT`A>T/A7+_
+M__^!Q)P```!;7E]=PXUV`%575E.![(P```"_`````(LM`````(7M=#2-=@"+
+M70B%VW0CC70D`)"#[`B+0P16_W,(_U`<@\00@'PD$P&#W_^+&X7;=>*+;0"%
+M[77/B?B!Q(P```!;7E]=PXGV55=64X'LI````(NL)+P```!J`/^T)+P```#H
+M\?S__XG#@\00N/____^%VP^$JP```+D`````NDP```")Z(UV`(@(0$IU^KD`
+M````NG@```"-1"00B`A`2G7Z@^P(BU,$C40D&%#_<PC_4AR*1"0VB$4#BD0D
+M-(A%`(I$)#6(10&-?02-="1<_+@)````B<'SI8U]*(UT)#B)P?.EBD0D-XA%
+M`H/$$(,[`'0LBQN#[`B+4P2-1"084/]S"/]2'(/$$(!\)",`=0^*10("1"0G
+MB$4"@SL`==2X`````('$G````%M>7UW#D%575E.![*0```"+K"2\````:@#_
+MM"2\````Z`G\__^)PX/$$+C_____A=L/A-<```"Y`````+I8````B>B-=@"(
+M"$!*=?JY`````+IX````C40D$(@(0$IU^H/L"(M3!(U$)!A0_W,(_U(<BD0D
+M-HA%`XI$)#2(10"*1"0UB$4!C7T$C70D7/RX"0```(G!\Z6-?2B-="0XB<'S
+MI8I$)""(15"*1"0AB$51BD0D(HA%4HI$)".(15.+0PR)14R#Q!"`>T0`=`2`
+M30,$BD0D)XA%`H,[`'0LBQN#[`B+4P2-1"084/]S"/]2'(/$$(!\)",`=0^*
+M10("1"0GB$4"@SL`==2X`````('$G````%M>7UW#D%575E.![,0```"-A"3<
+M````4/^T)-P```#H]OK__XG'QD0D%P"#Q!"X_____X7_#X3Q````BV\,N0``
+M``"Z1````(N$)-@```"-=@"("$!*=?J#[`B+5P2-1"0X4/]W"/]2'(/$$(!\
+M)$(/=@7&1"1"#X/L!(M'!(U4)`Q2_[0DW````/]W"/]07(/$$(7`=12+1"0,
+MBY0DV````(E"!(M$)`B)`HM=#(U%##G8='*0C;/8_?__@'X(`75<.7Y8=5>#
+M[`B+5E"-1"084/]V7/]2/(/$$/9$)!H"=3P/MD0D'#N$)-0```!U+HI$)!TZ
+M1"1"<R0/MM"+AE@"``"+C"38````B421"/Y$)`>*1"0'.$0D0G0+B?:+&XU%
+M##G8=8^X`````('$O````%M>7UW#C78`55=64XML)!2+?"08O@````"X````
+M`(7_?G_K!(GPZWF+'0````"%VW1MB?:+2PR-0PPYR'1;B?:-@=C]__^#>`P`
+M=42`>`@$=B*+D&0!``"%TG0+@WH$`'0%.4((="F+@%@"``")1+4`1NL8@'@(
+M`742]D!,`G0,BX!8`@``B42U`$:0.?YTE(L)C4,,.<AUIXL;A=MUE8GP6UY?
+M7<.)]E575E.+;"04BWPD&+X`````N`````"%_WY(ZP2)\.M"BPT`````A<ET
+M-HGVBU$,C4$,.=!T)(G#C8+8_?__@'@(`740BX!8`@``B42U`$8Y_G3)D(L2
+M.=-UWHL)A<EUS(GP6UY?7<.0BU0D!(/J!;@`````@_H'=S?_))54(0``N`$`
+M``##N`(```##N`<```##N`4```##N`8```##N`,```##N`0```##N`@```"0
+MPXUV`%575E.#[`R+;"0@QT0D"`````#VA1P"```!=23'1"0(`0```/:%20$`
+M``1T",=$)`@!"```BT0D".GB`0``B?;VA4@!```"=1J+13B+73R)PC-50(G9
+M,TU$(<(AV8G("=!T!8-,)`@"]H5(`0```70(@4PD"``0``#VA4@!```0=`6#
+M3"0(!/:%2`$``"!T"(%,)`@``0``]H5(`0``0'0(@4PD"``"``"+140+14!T
+M*X-,)`@(@^P(_W5$_W5`Z/S___^+500/ME(&@\00.=!]"H%,)`@`(```B?;V
+MA1P"```$=`6#3"0($/:%'`(```)T!8-,)`A`]H5(`0``"'0(@4PD"(````#V
+MA4D!```$=`B!3"0(``@``/:%20$```AT"(%,)`@`!```OP````"`?3``#X2[
+M````B?:+=+U(A?8/A*````#VAAP"```!#X23````@'X(!`^&B0```/:&2`$`
+M``)U&HM&.(M>/(G",U9`B=DS3D0APB'9B<@)T'0%@TPD"`+VAD@!```!=`B!
+M3"0(`!```/:&2`$``!!T!8-,)`@$]H9(`0``('0(@4PD"``!``#VAD@!``!`
+M=`B!3"0(``(``(M&1`M&0'0%@TPD"`CVAD@!```(=`J!3"0(@````(GV1P^V
+M13`Y^`^/1_____9$)`@"="#W1"0(`!```'4.BT0D""4((```@_@(=0B#9"0(
+M_8UV`(M$)`B#Q`Q;7E]=PXM,)`2+5"0(N`````#V@1P"```!=0*P`?9"""!T
+M`X/((/:!'`(```1T`X/(`O:!'`(```)T`X/(!/9""!!T`X/($/9""@%T`X/(
+M0/9""@)T`@R`]D%,!'0%#0```(#V04P"=`4-```"`/9!3`%T!0T```$`PXUV
+M`%575E.#[!R+3"0PBX%,`0``BY%0`0``#ZS0"\'J"XG!B=,/I,,"P>$"`<$1
+MTXG(B=H/I,H"P>`"`<$1TXG(B=H/I,H"P>`"`<$1TP^DRP/!X0.+="0PBT84
+MBU88#ZS0"\'J"U)04U'H_/___X/$$(E$)`B)5"0,#[9&,(E$)!2+3@0/MDD&
+M*<B)P8M$)`CWX8G!P>`"`<B-'`"^`````(-\)!0`#XZ;````B?:+1"0PBTRP
+M2(7)='SV@1P"```!='.`>0@$=FWV@4@!``!P=&2+@4P!``"+D5`!```/K-`+
+MC02`C02`C02`C2S%`````(M!%(M1&`^LT`O!Z@N)1"0(B50D#(GHN@````#W
+M="0(B<4/MD$PBU$$#[92!BG0#Z_%C02`T>"%VW0$.<-V!8G#C78`1HM4)#`/
+MMD(P.?`/CV?___^!^Q`G``!V!;L0)P``B=B#Q!Q;7E]=PU575E.#[`R+1"0@
+MBZAD`0``@'UF`@^%)0$``(M%"(M-!(M0&(M`%"M!%!M1&`^LT`O!Z@NY$"<`
+M`(G3"<,/A,4"``"`?10`='B+10B+<!2+>!B)\(GZ*T5<&U5@#ZS0"\'J"XG!
+MB=,/I,,"P>$"`<$1TXG(B=H/I,H"P>`"`<$1TXG(B=H/I,H"P>`"`<$1TP^D
+MRP/!X0.+100K<!0;>!@/K/X+P>\+5U934>C\____@\00B<'!X0(!P='AZ4<"
+M``"+102+<!2+>!B+15R+56`I\!GZ#ZS0"\'J"XG!B=,/I,,"P>$"`<$1TXG(
+MB=H/I,H"P>`"`<$1TXG(B=H/I,H"P>`"`<$1TP^DRP/!X0.+10B+4!B+0!0I
+M\!GZ#ZS0"\'J"U)04U'H_/___X/$$(G!P>$"`<'1X>G+`0``C78`@'UF`P^%
+MX@```(!]%`!T<(M%!(MP%(MX&(GQB?LK35P;76`/K-D+P>L+B<B)V@^DR@+!
+MX`(!R!':B<&)TP^DPP+!X0(!R!':B<&)TP^DPP+!X0(!R!':#Z3"`\'@`P^L
+M_@O![PM75E)0Z/S___^#Q!")P<'A`@'!T>'I20$``)"+15R+56`/K-`+P>H+
+MB<&)TP^DPP+!X0(!P1'3B<B)V@^DR@+!X`(!P1'3B<B)V@^DR@+!X`(!P1'3
+M#Z3+`\'A`XM%!(M0&(M`%`^LT`O!Z@M24%-1Z/S___^#Q!")P<'A`@'!T>'I
+MW0```)"`?10`=&Z+10B+<!2+>!B)\8G[*TU<&UU@#ZS9"\'K"XG(B=H/I,H"
+MP>`"`<@1VHG!B=,/I,,"P>$"`<@1VHG!B=,/I,,"P>$"`<@1V@^DP@/!X`,/
+MK/X+P>\+5U924.C\____@\00B<'!X0(!P='AZVJ)]HM%7(M58`^LT`O!Z@N)
+MP8G3#Z3#`L'A`@'!$=.)R(G:#Z3*`L'@`@'!$=.)R(G:#Z3*`L'@`@'!$=,/
+MI,L#P>$#BT4(BU`8BT`4#ZS0"\'J"U)04U'H_/___X/$$(G!P>$"`<'1X8GV
+M@?D0)P``=@6Y$"<``(G(@\0,6UY?7<.055=64X/L#(ML)""+?"0DBX54`0``
+MB0>+A5@!``")1P2+A5P!``")1PB+A6`!``")1PP/MD4(4.A<^/__@^P(B$=D
+MBD4QB$=EBX5,`0``B8>0````5>B*^/__B4=HB2PDZ/S___^)AXP```#&1V8`
+MO@````"#Q!"`?3``=%N-=@"+7+5(A=MT1X!_9P!U$`^V0PA0Z`#X__^#Q`2(
+M1V>`>P@$=10/MD=FBU,DBY)8`@``B52';.L/D`^V5V:+@U@"``")1)=L_D=F
+M@']F!W<)1@^V13`Y\'^H#[9W9H/^!W\1C78`QT2W;/____]&@_X'?O*#Q`Q;
+M7E]=PXGV55=64X/L#(ML)""+?"0DBX54`0``B0>+A5@!``")1P2+A5P!``")
+M1PB+A6`!``")1PP/MD4(4.A@]___@^P(B$=DBD4QB$=EBX5,`0``BY50`0``
+MB8>P````B9>T````5>B"]___B4=HB2PDZ/S___^)AZP```#&1V8`O@````"#
+MQ!"`?3``=%N-=@"+7+5(A=MT1X!_9P!U$`^V0PA0Z/CV__^#Q`2(1V>`>P@$
+M=10/MD=FBU,DBY)8`@``B52';.L/D`^V5V:+@U@"``")1)=L_D=F@']F#W<)
+M1@^V13`Y\'^H#[9W9H/^#W\1C78`QT2W;/____]&@_X/?O*#Q`Q;7E]=PXGV
+M4XM<)`B+4PR%TG4,BT,DZR<#0B1`ZR&0N`````"`>C``=!`/MDHPD#E<@DAT
+MXT`YP7?UN`````!;PXGV55=64X/L#(ML)""+?"0D9HM%.&:)A\@```!5Z*3_
+M__^)A\0```"+A50!``")!XN%6`$``(E'!(N%7`$``(E'"(N%8`$``(E'#`^V
+M10A0Z`7V__^#[`2(1V2*13&(1V6+A4P!``"+E5`!``")A[````")E[0```!5
+MZ"?V__^)1VB)+"3H_/___XF'K````,9'9@"^`````(/$$(!],`!T68M<M4B%
+MVW0X@']G`'40#[9#"%#HH/7__X/$!(A'9X!["`1U$(M#)(N`6`(``(E$MVSK
+M%9"+@U@"``")1+=LZPC'1+=L`````/Y'9D8/MD4P.?!^!8/^#WZG#[9W9H/^
+M#W\0B?;'1+=L_____T:#_@]^\H.]9`$```!T68N59`$``+C_____@WH$`'0)
+MBT($BX!8`@``B8>X````N/____^#>@@`=`F+0@B+@%@"``")A[P```"#>@0`
+M=!F#>@@`=!.#[`Q5Z/S___^#Q!")A\````"0@\0,6UY?7<-55U93@^P,BVPD
+M((M\)"2+13B+53R)AY````")EY0```!5Z"'^__^)AX0```"+A50!``")!XN%
+M6`$``(E'!(N%7`$``(E'"(N%8`$``(E'#`^V10A0Z(+T__^#[`2(1V2*13&(
+M1V6*132(AX@```"+A4P!``"+E5`!``")1W")5W15Z*'T__^)1VB)+"3H_/__
+M_XE';,9'9@"^`````(/$$(!],`!T9I"+7+5(A=MT0(!_9P!U$`^V0PA0Z!ST
+M__^#Q`2(1V>`>P@$=12+0R2+@%@"``")A+>8````ZQZ)]HN#6`(``(F$MY@`
+M``#K#9#'A+>8`````````)#^1V9&#[9%,#GP?@6#_C]^FP^V=V:#_C]_$XGV
+MQX2WF````/____]&@_X_?N^#O60!````=%*+E60!``"X_____X-Z!`!T"8M"
+M!(N`6`(``(E'>+C_____@WH(`'0)BT((BX!8`@``B4=\@WH$`'08@WH(`'02
+M@^P,5>C\____@\00B8>`````@\0,6UY?7<-75E.![+````"+O"3`````B[0D
+MQ````(M?6+C_____@'\(`0^%C`$``(/L"(M74(V$))@```!0_W=<_U(\@\0(
+MBU,$C40D&%#_<PC_4AR-1"0<4(U$)!Q0C40D'%!3Z'GM__^*A"2]````B$8"
+M#[:$)+P```"#Q"#VA"2:`````G0&`T0D#.L$`T0D"(A&`8M$)`2(!H!_3`!Y
+M"8I'2XA&`^L+D(J$)*(```"(1@.*E"28````B-'`Z0:#X0&*1@:#X/S`Z@?1
+MX@G("=`/MHPDF0```(/A`<'A`H/@\XJ<))D```"-%)T`````@^(("<@)T(C9
+M@^$0@^#/B-J#XB`)R`G0B-F#X4"#X#^(VL#J!P^VTL'B!PG("="(1@:*E"2?
+M````@^(#BD8'@^#\"="(1@>*A"2C````B$8%]L,$=`?&1@0"ZQR0BH0DF0``
+M`,#H`X/@`8/X`1G`@^#^@\`#B$8$C80DD````%!7Z%/T__^#Q`B)1@B#O"2H
+M`````'0OC48,@^P$:)8```#_M"2P````4.C\____C5Y"@\0(:BA3Z/S____&
+M0R<`@\00B?:X`````('$L````%M>7\.05U93@>RP````B[PDP````(NT),0`
+M``"+7UBX_____X!_"`$/A>D!``"#[`B+5U"-A"28````4/]W7/]2/(/$"(M3
+M!(U$)!A0_W,(_U(<C40D'%"-1"0<4(U$)!Q04^BYZ___BH0DO0```(A&`@^V
+MA"2\````@\0@]H0DF@````)T!@-$)`SK!`-$)`B(1@&+1"0$B`:`?TP`>0B*
+M1TN(1@/K"HJ$)*(```"(1@.*A"2C````B$8%BI0DF````(C1P.D&@^$!BD8&
+M@^#\P.H'T>()R`G0#[:,))D```"#X0'!X0*#X/.*G"29````C12=`````(/B
+M"`G("="(V8/A$(/@SXC:@^(@"<@)T(C9@^%`@^`_B-K`Z@</MM+!X@<)R`G0
+MB$8&BI0DGP```(/B`XI&!X/@_`G0B$8']L,$=`;&1@0"ZQN*A"29````P.@#
+M@^`!@_@!&<"#X/Z#P`.(1@2-A"20````4%?HE?+__X/$"(E&"(.\)*@`````
+M="V-1@R#[`1HE@```/^T)+````!0Z/S___^-7D*#Q`AJ*%/H_/___\9#)P"#
+MQ!#V1TQ!=22+1S"+5S2)AJ(```")EJ8```"+1RB+5RR)AJH```")EJX```"+
+M5R2Y`````(72="N)]H-Z%`!T&(M"%(M`#(7`=`Z+@%@"``")A(ZZ````08/Y
+M!W\&BQ*%TG77N`````"!Q+````!;7E_#5U93BWPD$(MT)!17Z/S___^)PX/$
+M!+D`````NJX```")\(GVB`A`2G7ZA?]T!(7;=0>X_____^M;BT,4B48$N/__
+M__^#>PP`=`F+0PR+@%@"``")1@B`>P@$=AK&!@&#[`B-1@Q04^AP]O__N```
+M``"#Q!#K'KC_____@'L(`743Q@8"@^P(C48,4%/HD_O__X/$$%M>7\-75E.+
+M?"00BW0D%%?H_/___XG#@\0$N0````"ZV````(GPB?:("$!*=?J%_W0$A=MU
+M![C_____ZV&+0Q2+4QB)1@2)5@BX_____X-[#`!T"8M##(N`6`(``(E&#(![
+M"`1V&L8&`8/L"(U&$%!3Z,[V__^X`````(/$$.L>N/____^`>P@!=1/&!@*#
+M[`B-1A!04^CU^O__@\006UY?PXGV5U93BWPD$(MT)!17Z/S___^)PX/$!+D`
+M````NOH```")\(GVB`A`2G7ZA?]T!(7;=0JX_____^F+````BT,4BU,8B48$
+MB58(N/____^#>PP`=`F+0PR+@%@"``")1@RP_X-['`!X`XI#'(A&`X/L#(L#
+M_W`$Z/S___^(1@**@QT"``"(1@&#Q!"`>P@$=AK&!@&#[`B-1B!04^A%]___
+MN`````"#Q!#K'KC_____@'L(`743Q@8"@^P(C48@4%/HZ/O__X/$$%M>7\.0
+M5U93BWPD$(MT)!17Z/S___^)PX/$!+D`````C58%BP:#Z`5T"8UV`(@*0DAU
+M^H7_=`2%VW4*N/_____IF````(M#%(M3&(E&$(E6%+C_____@WL,`'0)BT,,
+MBX!8`@``B488L/^#>QP`>`.*0QR(1@^#[`R+`_]P!.C\____B$8.BH,=`@``
+MB$8-@\00@'L(!'8FQD8,`;C_____@'LP0'<V@^P(C48L4%/HY??__[@`````
+M@\00ZQ^X_____X!["`%U%,9&#`*#[`B-1BQ04^@+^___@\006UY?PU575E.!
+M[#P"``"+K"10`@``BH0D6`(``(A$)"_'1"0@_____\=$)"3_____QD0D'P"+
+ME"14`@``@'H/`'@,@'T(!G4+]D(/`G0%QD0D'P&Y`````+H``@``C40D,(UV
+M`(@(0$IU^HN4)%0"``"*0@N(132*0@Z(13$/MDH.N`$```#3X&:)13**E4@!
+M``"(T(/(!(B%2`$``(N$)%0"``#V0`\#=&*(T(/(!8B%2`$``,>%3`$`````
+M``#'A5`!````````BT4$@'@'`'1.B-"#R`>(A4@!``"`?0@*=3T/MDTP2;@!
+M````N@`````/I<+3X/;!('0'B<*X`````(E%.(E5/.L5D,>%3`$``/_____'
+MA5`!``#_____BY0D5`(``(M"$(F%5`$``(M"%(F%6`$``(M"&(F%7`$``(M"
+M'(F%8`$``+\`````@'TP``^$*@$``(MTO4B);@R+1"0D.488=QER"8M$)"`Y
+M1A1S#HM&%(M6&(E$)"")5"0D@'X(!`^%Z@```(M6)(E4)!B`?"0O`'1$@'PD
+M'P!U2+L`````C40D,(E$)!2#[`AJ`/]T)"!J`8M.,(G8F0-!!!-1"%)0_W0D
+M-.C\____@\0@0X/[`7[5Z9@```"`?"0?``^$C0```(/L"&H!C40D/%!J`8M&
+M,/]P"/]P!/]T)#3H_/___X/$((7`=6B`O"0N`@``JG4<@+PD+P(``%5U$L:$
+M)"X"``!5QH0D+P(``*JP`8!\)#!2=1:`?"0Q174/QD0D,$7&1"0Q4K@!````
+MA<!T(8/L"&H`C40D/%!J`8M&,/]P"/]P!/]T)#3H_/___X/$($</MD4P.?@/
+MC];^__^`?0@'=3&_``````^V13")PX/X``^.A@```(M,O4B+112+51@#0103
+M41B)112)51A'.?M_Y>MIBT4$@'@%`'0A#[=%,O?8B<&)P\'['XM$)"`AR(M4
+M)"0AVHE$)"")5"0D#[9%,(M5!`^V4@8IT(E$)`B9B50D#(M$)"#W9"0(B<&+
+M?"0D#Z]\)`B)U@'^BT0D(`^O1"0,C1P&B4T4B5T8BY0D5`(```^V0@^#X!S!
+M^`*(A1T"``"!Q#P"``!;7E]=PXGV55=64XM\)!2+;"08O@````"`?S``=%Z0
+MBU2W2(72=$SV@AP"```!=$.`>@@$=C&Y`````(!Z,`!T,@^V6C")]HM$BDB%
+MP'0.]H`<`@```70%.6@D="1!.<M_Y>L/C78`.6HD=0>)T.L1C78`1@^V1S`Y
+M\'^CN`````!;7E]=PY!55U93@^P(BT0D'(ML)"#'1"0$`````,<$)`````"%
+M[70&BU4PB10DO@````"_`````(M8)(7;=!6-=@"#>Q0`=`:#Q@&#UP"+&X7;
+M=>Z#_P!W!8/^`W8/N`````"Z`````.FU````O@````"_`````(7M=`:+=12+
+M?1B+6"2%VW14B?:%[70%.6L4=$.#/"0`="6#>Q0`=3>+#"2+002+40@#00P3
+M41"+2P@QT3-#!`G!=02)7"0$@WL4`'42.7L0<@UW!3ES#'8&BW,,BWL0BQN%
+MVW6N@SPD`'0[@WPD!`!T-(M,)`2+00R+41"+#"0#00P341`Y^G(==P0Y\'87
+MBTPD!(M!#(M1$(G&B=>+#"0#<0P3>1")\(GZD(/$"%M>7UW#55=64X/L3(ML
+M)&"+7"1HBD0D9(A$)$>*5"1TB%0D1<=$)#C_____QT0D//_____'1"0P````
+M`,=$)#0`````BDPD<(/A#XA,)$:%[0^$E@$``(!]"`=T%#P'#X6``0``@'T(
+M!P^%?@$``(GV@'TP`0^$\@$``(!]"`</A6@!``"`?"1'!P^%70$``+\`````
+M@'TP``^$3@$``#G?#X-&`0``BW2]2(7V#X3$!```BT0D;/\TN.C\____@\0$
+M.48D=!9'#[9%,#GX#X89`0``.=]RS^D0`0``#[9%,+H`````N0`````YV`^'
+MP`0``.L3BU8,BTX0`50D,!%,)#3I@P```+\`````@'TP`'0MBW2]2(7V#X1D
+M!```BTPD;/\TN>C\____@\0$.48D#X58!```1P^V13`Y^'?3#[9%,(M\A42+
+M1R2+512+31B)5"0PB4PD-(MP)(7V="N#?A0`=1^+3S"+002+40@#00P341"+
+M3@@QT3-&!`G!#X1P____BS:%]G75#[9],#G?<T6+3"1L_S2YZ/S___^)QH/$
+M!(7`=`V+`#M%`'4&@'X(`700N@````"Y`````.GO`P``D(M&*(M6+`%$)#`1
+M5"0T1SG?<KN+5"0PBTPD-.G.`P``A>T/A8````"_`````#G?#X/G````C78`
+MBU0D;/\TNNC\____B<:#Q`2%P'0&@'@(`701N@````"Y`````.F,`P``B?:+
+M0"P+1B@/A&@#``"+1BB+5BP!1"0P$50D-(M4)#PY5BQW&7()BT0D.#E&*',.
+MBU8HBTXLB50D.(E,)#Q'.=]RD^MUD+\`````.=]S:XUV`(M,)&S_-+GH_/__
+M_XG&@\0$A<!T#8L`.T4`=0:`?@@!=!*Z`````+D`````Z0D#``"-=@!65>BM
+M^___4%;H)OS__P%$)$`15"1$@\00.U0D/'<0<@8[1"0X<PB)1"0XB50D/$<Y
+MWW*8#[9$)$>#^`</A[H"``#_)(5T(0``BU0D,(M,)#3IL`(``(!\)$4!=U6)
+M7"0HQT0D+`````"X_____XI,)$;3X)F+3"0X(<&)#"2+3"0\(=&)3"0$BT0D
+M*/<D)(G!BWPD*`^O?"0$B=8!_HL$)`^O1"0LC1P&B<J)V>E4`@``@'PD10(/
+MAK4````/MG0D18G8N@````#W]HG%A=(/A8X```"#^`$/CH4```"X_____XI,
+M)$;3X(E$)""9B50D)(M,)"`C3"0XB0PDBT0D)"-$)#R)1"0$C4[_B<O!^Q^+
+M!"3WX8E$)""+/"0/K_N)U@'^BT0D!`^OP0'&B70D)(GIB>O!^Q^+1"0@]^6)
+M!"2+?"0@#Z_[B=8!_@^O3"0D`<Z)="0$BQ0DBTPD!.FC`0``N@````"Y````
+M`.F4`0``N@````"Y`````(/[`0^&@0$``(M4)#B+3"0\@_L"#X9P`0``N/__
+M__^*3"1&T^")1"08F8E4)!R+3"08(TPD.(D,)(M$)!PC1"0\B40D!(G9T>F[
+M`````(L$)/?AB40D&(L\)`^O^XG6`?Z+1"0$#Z_!`<:)="0<BU0D&(M,)!SI
+M#P$``+H`````N0````"#^P(/AOP```"-0_^)1"00QT0D%`````"X_____XI,
+M)$;3X)F+3"0X(<&)#"2+3"0\(=&)3"0$BT0D$/<D)(G!BWPD$`^O?"0$B=8!
+M_HL$)`^O1"04C1P&B<J)V>FD````N@````"Y`````(/[`P^&D0```(U#_HE$
+M)`C'1"0,`````+C_____BDPD1M/@F8M,)#@AP8D,)(M,)#PAT8E,)`2+1"0(
+M]R0DB<&+?"0(#Z]\)`2)U@'^BP0D#Z]$)`R-'`:)RHG9ZSRZ`````+D`````
+MZS"Z`````+D`````ZR2Z`````+D`````ZQB)]KH`````N0````#K"KH`````
+MN0````")T(G*@\1,6UY?7<.)]E575E.![!P"``"+K"0P`@``BH0D-`(``(A$
+M)`^^`````(!],``/AE$!``"0BURU2(7;#X0X`0``@'L(!'8>@^P$_[0D/`(`
+M``^V1"074%/HK/___X/$$.D4`0``BX0D.`(``$B#^`%W-XG?@'L(!'4/BWLD
+M@^P,4^C\____@\00@[PD.`(```(/A>(```"#[`Q7Z/S___^#Q!#IT0```)"+
+M>R2`>S0`=0N`?"0/``^$E````/:''`(```$/A(<```"#[`AJ`8U$)!Q0:@&+
+M0S#_<`C_<`17Z/S___^#Q""%P'5E@+PD#@(``%5U'("\)`\"``"J=1+&A"0.
+M`@``JL:$)`\"``!5L`&`?"001746@'PD$5)U#\9$)!!2QD0D$46X`0```(7`
+M=!Z#[`AJ`(U$)!Q0:@&+0S#_<`C_<`17Z/S___^#Q""#[`Q3Z/S___^#Q!#V
+M1TP0=!;VAQP"```!=`V#[`Q7Z/S___^#Q!"01HGP.$4P#X>P_O__@^P,5>C\
+M____@<0L`@``6UY?7<-55U93@^P8BT0D+(MH+(M8*(LXB[<H`0``4.C\____
+MBT,<B44<@\00BU<<C4<<.=!T%(G!C4+T.5@H=02):"B0BQ(YT77N@^P$:@!J
+M`%/H'?[__X/$"/]U'/]W!.C\____B2PDZ/S___^+1AR+E5@"``")$,=&,#!W
+M!P")=C3'1C@`````@\0(C48P4/]V".C\____@\0<6UY?7<-3@^P(BUPD$(![
+M7@%T8OY#7X![7P)W6<9#7@"+0SS'0!``````BT,\QT`<`````(M#/,=`(```
+M``"+0SS'0"0`````BU,\C4(4B4(4BU,\C4(4B4(8BT,\QT`H`````(/L#%/H
+M_/___X/$$.L\C78`@^P(_W,\BP,%F````%#H_/___\=#%#CU!@")6QC'0QP`
+M````@\0(C4,44(L#@\`D4.C\____@\00@\0(6\.)]E.#[!2+1"0<BT`$BQA0
+MZ/S___^+DR@!``#'0C`P=P<`B5(TQT(X`````(/$"(U",%#_<@CH_/___X/$
+M&%O#B?955U93@^P,BWPD((M?+(L'B40D"(N`*`$``(E$)`2+:P2+<PB`?UX!
+M=&+^1U^`?U\"=UG&1UX`BT<\QT`0`````(M'/,=`'`````"+1SS'0"``````
+MBT<\QT`D`````(M7/(U"%(E"%(M7/(U"%(E"&(M'/,=`*`````"#[`Q7Z/S_
+M__^#Q!#IJ0```(/L"/]W/(M$)!0%F````%#H_/___XD\).C\____BT0D%(M0
+M'(/$$+C_____A?9T!HN&6`(``(D"@_C_=0N+1"0$QT`L_____X"-20$```2`
+MCDD!```$@*9(`0``_8F>9`$``(F=9`$``(U3#(M$)`B#P!2+2`2)4`2)0PR)
+M2@2)$<=#&(3V!@")6QS'0R``````@^P(C4,84(M$)!2#P"10Z/S___^#Q!"#
+MQ`Q;7E]=PXUV`%575E.#["R+;"1`BWPD1+X`````@'TP`'0P@'\-`'0JBURU
+M2(7;=#__=+=\Z/S___^#Q`0Y0R1T&T8/MD4P.?!^"`^V1PTY\'_6N@$```#I
+M&`,``(I%,+K_____.D<-#X<'`P``ZQZZ_____^G[`@``NO_____I\0(``+K_
+M____Z><"``"^`````(!],`!T(HM<M4B%VW39_W2W?.C\____@\0$.4,D==)&
+M#[9%,#GP?]Z+1W2+5W@K110;51B)1"0@B50D)`G"#X1+`@``#[9%,(MTA42+
+M1B2)1"0<QT0D$`````#'1"04`````(M8)(7;#X3R````@WL4``^%W@```(M.
+M,(M!!(M1"`-!#!-1$(M+"#'1,T,$"<$/A;\```"+1A2+5AB)1"00B50D%(M4
+M)"0Y4Q!R8G<)BU0D(#E3#'97BTXPBT0D((M4)"0#00P341")00R)41")1A2)
+M5AB+1"0@BU0D)`%#!!%3""E##!E3$,=$)"``````QT0D)`````"+5"0<@$I,
+M$(/L#%+H_/___X/$$.M0BT,,BU,0*40D(!E4)"2+3C`#00P341")00R)41")
+M1A2)5AB#[`A3_W0D*.C\____BT0D+(!(3!")!"3H_/___X/$$.L+D(L;A=L/
+MA0[___^+5"0D"U0D(`^$(0$```^V=3`/MD<-.?`/CO8```#_=+=\Z/S___^)
+MPXM`*(M3+(E$)`R)5"00@\0$BT0D)#G"<B`Y1"0,=PJ+1"0@.40D"'80BT0D
+M((M4)"2)1"0(B50D#&H`_W0D$/]T)!!3Z/S___^)1+5(@\00A<!U:8M4)!0+
+M5"00="Z#[`P/MD4P_W2%1.C\____#[9=,&H`_W0D*/]T)"C_="0XZ/S___^)
+M1)U$@\0@#[9=,#GS?1R#[`S_=)U(Z/S____'1)U(`````(/$$$,Y\WSDNO__
+M___IGP```(UV`(M$M4B):`R+1"0(BU0D#"E$)"`95"0D1@^V1PTY\'X.BU0D
+M)`M4)"`/A0K___\/MD<-.?!U#HM$)"0+1"0@#X53____B?*(53"+1W2+5WB)
+M112)51B+1Q")A50!``"+1Q2)A5@!``"+1QB)A5P!``"+1QR)A6`!``"#[`Q5
+MZ/S___^#Q`C_=1R+10#_<`3H_/___[H`````@\00D(G0@\0L6UY?7<.)]L.-
+M=@"#[!2+3"08C9',`0``BP&)0@C'0@P/_P``C8$(`@``B4(8QT(0"````,="
+M%`````#'0B``````BX%8`@``B8$(`@``BTH8BT0D'(E!!,="*'S[!@!2_W((
+MZ%MZ``"#Q!S#C78`5E.#[`2+="00B?.#?@P`=`.+7@R*@TD!``"H!'1RJ`@/
+MA<H```"+DV0!``"%T@^$O````(-Z!``/A+(```"#>@@`#X2H````BT($@(A)
+M`0``"(M""("(20$```C'@\0!``!H`0<`B9O(`0``@^P(C8/``0``4(L#_W`$
+MZ/S___^#Q`A3:A+H_/___X/$$.M@]H9(`0``$'57A=MT"?:#20$```AU2HJ&
+M2`$``*A@=4"#X/>#R!"(AD@!``#'AL0!``!H`0<`B;;(`0``@^P(C8;``0``
+M4(L&_W`$Z/S___^#Q`A6:@3H_/___X/$$(GV@\0$6U[#B?:#[!2+1"08BT`D
+MQX#$`0``:`$'`(F`R`$``(V0P`$``%*+`/]P!.C\____@\0<PY!3@^P0BUPD
+M&(M$)!R)F-0!``#'@-@!```/_P``C8@(`@``B8CD`0``QX#<`0``"````(N0
+M6`(``(F0"`(``,=!!`P```"-D!8"``")D.@!``#'@.`!````````QX#L`0``
+M`````(F`\`$``,>`]`$``-S\!@`%S`$``%!3Z/S___^#Q!A;PXGV55=64X/L
+M+(ML)$"+?22#?2S]=12`OQ<"```"?PO^AQ<"``#I?`,``,:'%P(```#VATD!
+M```(=&"#?2S]=2:`/0``````=!W'12P`````@^P(5VH<Z/S___^#Q!#INP(`
+M`(UV`(-]+``/A*X"``"`ITD!``#WBX=D`0``BT`(@*!)`0``]X/L"%=J%.C\
+M____@\00Z3,#``#VAT@!```0#X3/````@WTL_74Y@#T``````'0PQT4L````
+M`(/L"%=J'.C\____#[>'%`(``+H``````8=,`0``$9=0`0``@\00ZR&0@WTL
+M`'0:@*=(`0``[X/L"%=J".C\____@\00Z<<"```/MD<PBU<$#[92!BG0B40D
+M")F)5"0,BY],`0``BT0D"/?CB40D((E4)"2+="0(#Z^W4`$``(G1`?$/KUPD
+M#(T<&8E<)"0[7Q@/@LH!``!W#8M4)"`[5Q0/@KL!``"#[`AJ`U?H@/S__X/$
+M$.E7`@``BH=(`0``J"`/A.(```"#?2P`=5^$P'A5#[9',(M7!`^V4@8IT(E$
+M)`B9B50D#(N?3`$``(M$)`CWXXE$)!B)5"0<BW0D"`^OMU`!``")T0'Q#Z]<
+M)`R-'!F)7"0<.U\8=PMR8XM4)!@[5Q1R6H-]+`!T!+`+ZQF*AT@!``#`Z`</
+MML"#^`$9P(/@`H/`"HGV@*=(`0``7X/L"%</ML!0Z/S___^#Q!#VAT@!```(
+M#X2C`0``@^P(:@%7Z+G[__^#Q!#ID`$``(N'Z`$``(`X``^$T@```("G2`$`
+M`-^#[`AJ`5?HD/O__X/$$.EG`0``BH=(`0``J$`/A%D!``"H`74<@^"_B(=(
+M`0``@^P(5VH.Z/S___^#Q!#I.0$``(-]+`!T&H"G2`$``+^#[`A7:@_H_/__
+M_X/$$.D9`0``#[9',(M7!`^V4@8IT(E$)`B9B50D#(N?3`$``(M$)`CWXXE$
+M)!")5"04BW0D"`^OMU`!``")T0'Q#Z]<)`R-'!F)7"04.U\8<B!W"8M4)!`[
+M5Q1R%8/L"&H)5^C:^O__@\00Z;$```")]O:'20$```AT)XN'9`$``(M87('C
+M__\/`+X`````#[=09+D`````.<YR*G<$.=-R)/:'2`$``%!T3XN'3`$``"7_
+M_S\`N@````"#^@!W.H/X?W<UD,>'Q`$```S]!@")O\@!``#'A\`!````````
+M@^P(C8?``0``4(L'_W`$Z/S___^#Q!#K*)#'A\0!``!H`0<`B;_(`0``@^P(
+MC8?``0``4(L'_W`$Z/S___^#Q!"#Q"Q;7E]=PY!55U93@^P<BVPD,(M\)#2)
+MK]0!``"-AP@"``")A^0!``"-AQ8"``")A^@!``#'A^`!````````QX?L`0``
+M`````(F_\`$``,>']`$``)3]!@"+AU@"``")AP@"``#VATD!```(=!K'A]@!
+M```J_P``QX?<`0``!````.D]`0``D(J'2`$``*AP#X1:`0``@^"@/*!T5P^V
+M1S"+5P0/ME(&*=")1"0(F8E4)`R+GTP!``"+1"0(]^.)1"00B50D%(MT)`@/
+MK[=0`0``B=$!\0^O7"0,`=F)3"04.T\8=PYR+8M4)!`[5Q1R)(UV`,>'^`$`
+M``````"#[`R-A\P!``!0Z"?[__^#Q!#IVP```(J'2`$``+HC_P``J!!U$\#H
+M!8/@`8/X`1G2]]*!PB7_``")E]@!``"+A^0!``"+ETP!``"+CU`!``")4`2)
+M2`B+1P2`>`4`=!"+E^0!``!FBT<R9HE"#.LMBX_D`0``BT<4BU<8*X=,`0``
+M&Y=0`0``@_H`=P<]@````'8%N(````!FB4$,QX?<`0``#@```/:'2`$``"!T
+M%HN'Z`$``,8``,>'X`$```$```"-=@#_A[P!``"#O[P!``!D?@K'A[P!````
+M````@^P(C8?,`0``4%7H_/___X/$$(/$'%M>7UW#4X/L"(M<)!"+0QC_,.C\
+M____@^P(4.C\____QT,P,'<'`(E;-,=#.`````"#Q`B-0S!0_W,(Z/S___^#
+MQ!A;PU575E.#[`R+7"0@BSN+<RR+1AB+`(E$)`A0Z/S___^)Q8/$!(![7@%T
+M8OY#7X![7P)W6<9#7@"+0SS'0!``````BT,\QT`<`````(M#/,=`(`````"+
+M0SS'0"0`````BU,\C4(4B4(4BU,\C4(4B4(8BT,\QT`H`````(/L#%/H_/__
+M_X/$$.FN````@^P(_W,\C8>8````4.C\____B1PDZ/S___^#Q!"+1@P]*_\`
+M`'0A/2O_``!W"CTI_P``=`KK$9`].?\``'4)BT8<BU0D"(D0A>UT.#E]`'4S
+MQX=(`0``6`,'`(FW3`$``,>'4`$```````"#[`B-AT@!``!0C4<D4.C\____
+M@\00ZRN0QT8L_O___\=&,#!W!P")=C3'1C@`````@^P(C48P4/]V".C\____
+M@\00@\0,6UY?7<.)]E=64XM\)!"+'X/L"/]W(%/H_/___XG&@<.8````B1PD
+MZ/S____'0!``````QP``````QT`$`````(M7%(M/&(E0"(E(#,=`'`````#'
+M0"``````QT`D`````(/$!(U0%(E0%(E0&,=`*`````")1CR)?BC&1EP$BT0D
+M((E&+(M$)"2)1FC&1EX`5NC\____@\006UY?PXGV55=64X'LC````(NL)*@`
+M``#H_/___XE$)'R+172+57B)1"1PB50D=,9$)%``QT0D2`````#'1"1``0``
+M`,=$)#P`````BD4.P.@$B$0D;G43BE4*B%0D;H32=0C&1"1N`8UV`(!E#@^`
+M?0U`=PR`?0T!=Q"`?0P'=`JX_____^D0#0``OP````"`?0T`=#*0_W2]?.C\
+M____@\0$@'@(`74)]H`<`@```74-N/_____IWPP``(UV`$</MD4-.?A_SP^V
+M10R#^`AW;?\DA90A``#&1"1O!^MLQD0D;P6`?"1N`QG)@^'^@\$(B$PD4.M4
+MQD0D;PJX_____X!]#@</A9`,``#K/L9$)&\(ZS?&1"1O">LPQD0D;P:`?0T"
+M=B7&1"1O!<9$)%`&QD0D;@+K%,9$)&\,ZPVX_____^E3#```C78`@^P,#[9$
+M)'M0Z/S___^)1"1<@\00N/____^#?"1,``^$*PP``(!\)&X!=D9F#[9%#68/
+MMDPD;KH`````9O?QN/____]FA=(/A0,,``"#[`P/MD0D7%#H_/___XE$)%B#
+MQ!"X_____X-\)$@`#X3>"P``BUPD=`M<)'`/A:T```"`?"1O!W5)OP````"`
+M?0T`#X0&`0``_W2]?.C\____B<.#Q`2+0"P+0R@/A$P+``"+172+57@#0R@3
+M4RR)172)57A'#[9%#3GX?\OIS````,=$)'#_____QT0D=/____^_`````(!]
+M#0`/A*T```"0_W2]?.C\____B<.#Q`2+1"1T.4,L=QMR"XM,)'`Y2RAS$(GV
+MBT,HBU,LB40D<(E4)'1'#[9%#3GX?\7K;XM4)$R`>@4`="UF#[9%#?9T)&X/
+MML`/ME(&*="94E#_="1\_W0D?.C\____@\00B40D<(E4)'2#?"1(`'0QBTPD
+M2(!Y!0!T)P^V1"1N#[91!BG0F5)0_W0D?/]T)'SH_/___X/$$(E$)'")5"1T
+MD(M<)$R`>P4`=1F#?"1(``^$XP```(M$)$B`>`4`#X35````#[9-#KC_____
+MT^")P8G#P?L?BT0D<"'(BU0D="':B40D<(E4)'2)172)57B+5"1,@'H%`'1)
+M9@^V10WV="1N#[;`#[92!BG0B<&)P\'['XM]=/?GB40D"(E4)`R+57@/K]&+
+M="0,`=8/K_L!_HET)`R+3"0(BUPD#(E-=(E=>(-\)$@`=$^+7"1(@'L%`'1%
+M#[9$)&X/ME,&*=")P8G#P?L?BWUT]^>)1"0(B50D#(M5>`^OT8MT)`P!U@^O
+M^P'^B70D#(M,)`B+7"0,B4UTB5UXC78`@[PDI``````/A$0!``"+G"2D````
+M@'L(!'8IBX0DH````#D#=1[V@QP"```!=!6#NV0!````=0QF]X-(`0``4`)T
+M"Y"X_____^EN"0``BXPDI````(M!%(M1&#M5>'(1=P4[171V"KC_____Z4L)
+M``"`90_\BYPDI````(!["`=T%(!]#`</A<8```"`>P@'#X6T````@'T,!P^%
+MEP```(/L"%7_M"2P````Z`CN__^)QX/$$(7`=7$/MD4/@^`<P?@"B,*+C"2D
+M````@+D=`@```G4V.($=`@``="Z(@1T"``"#[`1HF`,'`(N<)*@```#_LR@!
+M``!1Z)+Z__^X`````(/$$.FQ"```BX0DI````(B0'0(``(N4)*0```"+@E@"
+M``#ID@@``+C_____A?\/B(4(``"+C"2D````@'D(!W4&@'DP`70(QT0D/`$`
+M``"#[`@/MD0D=U#_M"2L````Z/S___^)1"14@\00N/____^#?"1$``^$/@@`
+M`(!\)&\'#X4&`0``BT5TBU5XB40D*(E4)"R_`````(!]#0`/A,P````)P@^$
+MQ````/]TO7SH_/___XG#BU`HBT@LB50D)(E,)"B#Q`2+1"0L.<%R(#E$)"1W
+M"HM,)"@Y3"0@=A"+1"0HBU0D+(E$)"")5"0D:@#_="0H_W0D*%/H_/___XM4
+M)%2)1+I(@\00A<!U.KL`````.?M]&(/L#(M,)%#_=)E(Z/S___^#Q!!#.?M\
+MZ(/L#/]T)%#H_/___[C_____@\00Z7$'``"+1"0@BU0D)"E$)"@95"0L1P^V
+M10TY^'X.BU0D+`M4)"@/A3S___\/MD4-.?AU"HM,)"P+3"0H=8V)^XM$)$2(
+M6##K=+\`````@'T-`'1?_W2]?.C\____B<.#Q`2X`````(-\)#P`=1J#O"2D
+M`````'004_^T)*@```#H,>#__X/$"%#_="1X_W0D>%/H_/___XM4)%2)1+I(
+M@\00A<`/A"'___]'#[9%#3GX?Z&*10V+3"1$B$$PBT0D?(M<)$2)0R2)0RR`
+M?"1N`0^&N@$``+\`````#[94)&Z)5"0<B50D&(/L"`^V1"184/^T)*P```#H
+M_/___XG&@\00A<`/A8````"[`````(GXF?=\)!R#^`!^)8MT)!B#[`1J`6H`
+MBU0D4/]TFDCHX^;__X/$$$.)^)GW_CG8?]^)^XM4)$0/MD(P.?A^((/L#(M,
+M)%#_=)E(Z/S___^#Q!!#BU0D1`^V0C`YV'_@@^P,_W0D4.C\____N/____^#
+MQ!#I[P4``(UV`+L`````BU0D'(/Z`'X6B?:-!!^+3"1$BT2!2(E$GDA#.=I_
+M[(I<)&Z(7C"+5"1$BT(DB48D@^P$@[PDJ``````/E,`/ML!055;HFMO__XGX
+MF?=\)"R+5"14B72"2`-\)"R#Q!")^3A*,`^'[_[__V8/MD(P]O.(0C`/MOB)
+M^X#[/W<4BT0D1,=$N$@`````1XGZ@/H_=NR#[`2#O"2H``````^4P`^VP%!5
+M_W0D4.@UV___OP````"#Q!"+3"1$#[9!,(G"@_@`?EN+7"1$BW2[2(G3BU0D
+M3`^V0@:)V2G!B<B94E&+1"1,_W`8_W`4Z/S___^#Q!")1A2)5AA'B=HY^W_&
+MZQ^#[`2#O"2H``````^4P`^VP%!5_W0D4.C&VO__@\00@[PDI``````/A.,"
+M``"+E"2D````BT(LBTPD1(E!+(/L"%%2Z/S___^#Q!"$P`^%7`$``(N<)*0`
+M``"*DQP"``"#X@2+3"1$BH$<`@``@^#["="(@1P"``"*DQP"``"#X@*#X/T)
+MT(B!'`(``(I#-(A!-(N<)*0```"+0Q2+4Q@[41AW9G(%.T$4=U^+5"1$BT($
+M@'@&`'4,BT)(BT`$@'@&`'1&@^P,_[0DL````.COQO__@\00)0(0``")1"1`
+M#X7*````BXPDI````(M!%(M1&(M<)$0[4Q@/@K````!W"3M#%`^"I0```(N$
+M)*0```"`N!T"```"=1^#[`1HU/4&`/]T)$Q0Z([U__^X`````(/$$.FM`P``
+MBY0DI````(M"'(M,)$2)01R+G"2@````BU,<B=B#P!PYT'0>B<&-0O2+G"2D
+M````.5@H=0>+7"1$B5@HBQ(YT77D@^P$:@!J`/^T)+````#H^./__X/$"(M$
+M)$S_<!R+E"2L````_W($Z/S___^#Q!#I80$``(/L#(N$)*P```"#Z(!0Z/S_
+M__^)PX/$$+D`````NF@```"0B`A`2G7ZZ/S___^)`XN,)*0```")2P2+1"1$
+MB4,(@^P,4^C\____BU0D5(M"!(/$$(!X!@!U#(M"2(M`!(!X!@!T%;`"@WPD
+M0`!T!X![%``/E<"(0V;K!,9#9@.`>Q0`=">`>V8#=0^+C"2D````BT$4BU$8
+MZPJ+3"1$BT$4BU$8B4-<B5-@ZR2X`````+H`````@WPD0`!U#8N,)*0```"+
+M012+41B)0UR)4V"`>V8"=!"+A"2D````@+@=`@```G4B@^P$:,3V!@!3_[0D
+ML````.@0]/__N`````"#Q!#I+P(``(N4)*0```"`BDD!```$BTPD1(")20$`
+M``2`H4@!``#]B9ED`0``B9ID`0``C4,,BY0DH````(/"%(M*!(E"!(E3#(E(
+M!(D!@^P,_[0DL````.C\____@\00@^P,_W0D4.C\____@\00@[PDI`````!U
+M%?9%#P%U#X/L#/]T)%#H_/___X/$$/9%#P$/A,H```"`?"1N`79WBUPD2(![
+M!@!T;;\`````BT0D1(!X,`!T3HM4)$2+7+I(@(M(`0``0,>#Q`$``&@!!P")
+MF\@!``"#[`B-@\`!``!0BP/_<`3H_/___X/$"%-J#>C\____@\001XM,)$0/
+MMD$P.?A_LHM<)$2`HT@!``"_Z10!``"+1"1$@(A(`0``0,>`Q`$``&@!!P")
+M@,@!``"#[`B+1"1,!<`!``!0BU0D4(L"_W`$Z/S___^#Q`C_="1,:@WH_/__
+M_X/$$.G(````]D4/`@^$O@```(!\)&X!=G:+3"1(@'D&`'1LOP````"+7"1$
+M@'LP``^$F@```(M$)$2+7+A(@(M(`0``$,>#Q`$``&@!!P")F\@!``"#[`B-
+M@\`!``!0BP/_<`3H_/___X/$"%-J!.C\____@\001XM4)$0/MD(P.?A_LNM*
+MB?:X_____^M-BTPD1(")2`$``!#'@<0!``!H`0<`B8G(`0``@^P(B<@%P`$`
+M`%"+`?]P!.C\____@\0(_W0D3&H$Z/S___^#Q!"+7"1$BX-8`@``B?:!Q(P`
+M``!;7E]=PY!75HL5P`4``+C_____.Q7$!0``=$.--)*--'*--+7@!0``_+D+
+M````BWPD#/.EBPW`!0``C4$!H\`%``")PH7`>0:-01"-=@"#X/`IPHD5P`4`
+M`+@`````7E_#D%=6BW0D#(L-Q`4``(U1`8G0A=)Y`XU!$(/@\"G"N/____\[
+M%<`%``!T):'$!0``C3R`C3QXC3R]X`4``/RY"P```/.EB17$!0``N`````!>
+M7\.)]E93@^PTBU0D0(M,)$B+7"1,BW0D4(!Z"`%U%8N"6`(``(E$)`2)3"0,
+MB5PD$.LED(!Z"`1U'HM")(M2,(N`6`(``(E$)`0#2@036@B)3"0,B5PD$(-\
+M)$0!&<"#P!F(1"0(9HET)!2)X%#H_/___X/$.%M>PXUV`%575E.#[`R+;"0@
+MBT48BU@$_S#H_/___XG&QT0D#`````"#Q`2#^PX/AYX'``#_))VX(0``QT0D
+M"`,```#IN@<``(N`9`$``&;WAD@!``!P"`^%=0<``(7`#X1M!P``@'AG``^%
+M8P<``(M0!(M`"/:"'`(```$/A%`'``#V@!P"```!#X1#!P``@*))`0``[X"@
+M20$``.^`BDD!```(@(A)`0``",>&Q`$``&@!!P")ML@!``"#[`B-AL`!``!0
+MBP;_<`3H_/___X/$"%9J$NC\____@\00Z2`'``"+D&0!``!FBX!(`0``)7`(
+M``!F/0`(#X74!@``A=(/A,P&``"+0@2+4@B`H$D!``#W@*))`0``]\=$)`@!
+M````@^P(5FH3Z/S___^#Q!#IS08``(M`#(7`=`WV@$D!```,#X6)!@``9O>&
+M2`$``'`,#X5Z!@``]H8<`@```0^$;08``(!^"`4/A9D```"_`````(!^,``/
+MA.,```"+7+Y(A=MT<X!["`1V;?:#2`$``!!U9(/L"/]S1/]S0.C\____BU,$
+M#[92!H/$$#G0#XT=!@``BH-(`0``@^#W@\@0B(-(`0``QX/$`0``:`$'`(F;
+MR`$``(/L"(V#P`$``%"+`_]P!.C\____@\0(4VH$Z/S___^#Q!!'#[9&,#GX
+M#X]X____ZUF#[`C_=D3_=D#H_/___XM6!`^V4@:#Q!`YT`^-J@4``(".2`$`
+M`!#'AL0!``!H`0<`B;;(`0``@^P(C8;``0``4(L&_W`$Z/S___^#Q`A6:@3H
+M_/___X/$$("F2`$``/>+1D0+1D!T".C\____B48HQT0D"`$```#I?04``(!X
+M"`5U1K\`````@'@P`'10BU2^2(72="B`>@@$=B**@D@!``"H$'08@^#GB()(
+M`0``@^P(4FH%Z/S___^#Q!"01P^V1C`Y^'_'ZQ6`H$@!``#G@^P(4&H%Z/S_
+M__^#Q!#'1"0(`0```.D/!0``BH!(`0``J!`/A-$$``#VAAP"```!#X3$!```
+M@^#EB(9(`0``BT9`BU9$B48XB58\QX9,`0``_____\>&4`$``/____^#[`A6
+M:@;H_/___X"F2`$``/Z#Q!"#?@P`=$V+3@R_`````(!Y,`!T/P^V63"+1+E(
+MA<!T+O:`'`(```%T)8!X"`1V'P^VD$@!``"#X@&*@4@!``"#X/X)T(B!2`$`
+M`*@!=05'.?M_Q8M&1`M&0(/X`1G`@\`"B40D".E,!```BT`,A<!T#?:`20$`
+M``P/A0@$``!F]X9(`0``<`P/A?D#``#VAAP"```!#X3L`P``@'X(!0^%SP``
+M`+\`````@'XP``^$`P0``(M4ODB)5"0$A=(/A)X```"`>@@$#X:4````]H)(
+M`0``(`^%AP```(/L"(M..(M>/(G("T9`B=H+5D124.C\____BU8$#[92!H/$
+M$#G0#XV``P``BT0D!("(2`$``"#'@$P!````````QX!0`0```````,>`Q`$`
+M`&@!!P")@,@!``"#[`B+1"0,!<`!``!0BU0D$(L"_W`$Z/S___^#Q`C_="0,
+M:@GH_/___X/$$$</MD8P.?@/CT7____I0P,``(/L"(M..(M>/(G("T9`B=H+
+M5D124.C\____BU8$#[92!H/$$#G0#XWG`@``@(Y(`0``(,>&3`$```````#'
+MAE`!````````QX;$`0``:`$'`(FVR`$``(/L"(V&P`$``%"+!O]P!.C\____
+M@\0(5FH)Z/S___^#Q!#IQ0(``)"`H$@!``#?@^P(4&H*Z/S___^#Q!#IJ@(`
+M`("@2`$``-^#[`A0:@OH_/___X/$$.F0`@``@*!(`0``W^F$`@``]H`<`@``
+M`0^$1P(``(M`1`M&0`^%.P(``&:+AD@!```E<0P``&:#^`$/A24"``"`?@@%
+M#X6+````OP````"`?C``#X3)````BUR^2(7;=&F`>P@$=F.*DT@!``"(T(/@
+M03P!=52(T(/(0(/@]XB#2`$``,>#3`$```````#'@U`!````````QX/$`0``
+M:`$'`(F;R`$``(/L"(V#P`$``%"+`_]P!.C\____@\0(4VH-Z/S___^#Q!!'
+M#[9&,#GX?X;K38".2`$``$#'ADP!````````QX90`0```````,>&Q`$``&@!
+M!P")ML@!``"#[`B-AL`!``!0BP;_<`3H_/___X/$"%9J#>C\____@\00@*9(
+M`0``]^EG`0``@W@,`'0*D(MV#(-^#`!U]X!^"`5U2+\`````@'XP`'12B?:+
+M5+Y(A=)T*(!Z"`1V(HJ"2`$``*A`=!B#X+^(@D@!``"#[`A2:@[H_/___X/$
+M$)!'#[9&,#GX?\?K%8"F2`$``+^#[`A6:@[H_/___X/$$(-^'`!Y#(/L#%;H
+M_/___X/$$,=$)`@!````Z=4```"`H$@!``"TQX!,`0``_____\>`4`$``/__
+M___'0#@`````QT`\`````(/L"%!J$.C\____@\00@WX,`'1!BW8,OP````"`
+M?C``=#,/ME8PB?:+1+Y(A<!T(/:`'`(```%T%X!X"`1V$?:`2`$```%T",=$
+M)`@!````1SGZ?].#?"0(`'43@*9(`0``_H/L#%;H_/___X/$$,=$)`@!````
+MZS.-=@#'12S^____QT4P,'<'`(EM-,=%.`````"#[`B-13!0_W4(Z/S___^#
+MQ!#IJ````)"#?"0(`'1]@WX,`'07@WPD"`-T$(MV#(-^#`!T!X-\)`@#=?"`
+MCD@!```$@WPD"`)U#H/L#%;H_/___X/$$.M$@[YD`0```'0NBX9D`0``BU`$
+MBU@(A=)T#(/L#%+H_/___X/$$(7;=!N#[`Q3Z/S___^#Q!#K#8/L#%;H_/__
+M_X/$$)#'13`P=P<`B6TTQT4X`````(/L"(U%,%#_=0CH_/___X/$$(/$#%M>
+M7UW#D%575E.#[`R+?"0@QD0D"P"]`````+D`````NBP```")^(UV`(@(0$IU
+M^L<'+````.CGL___B$<$H0````"#.``/E$<%@^P,_S4`````Z/S____!X`R#
+MQ!`]____`78*QD<&!<9'!POK",9'!@?&1P<'QD<(`,9'"0'&1PH/BD<+@^#^
+M@\@8B$<+NP4```")]H/L#`^VPU#H_/___X/$$(7`=#B)Z`^V\%/H`KC__X/$
+M!(A$-PR#^P9U#,9$-QP"@$PD"T#K%(GJ#[;"QD0''$"#^P5U!8!,)`L@14.#
+M^PQ^KX!\)`M@=1VA`````(.XE`$#``-V#XGJ#[;"QD0'#!+&1`<<0*$`````
+M@[B4`0,`!78018GJ#[;"QD0'#!/&1`<<0+@`````@\0,6UY?7<-55U93@^P,
+MBVPD((MU&+\`````@SX`=F7_=+X$Z/S___^)PX/$!(!X"`%T+,=%+/[____'
+M13`P=P<`B6TTQT4X`````(/L"(U%,%#_=0CH_/___X/$$.M(]D!,`G0.@^P,
+M4.C\____@\00B?:#[`Q3Z/S___^#Q!!'.3YWF\=%,#!W!P");33'13@`````
+M@^P(C44P4/]U".C\____@\00@\0,6UY?7<-64X/L!(MT)!"+7BR!>PPD_P``
+M=`F!>PP9_P``=2B`?EX,=1R+0QS&``&#[`C_=BAJ$>C\____QD9>`8/$$.L&
+MBT,<Q@``#[9&7H/X$'<A_R2%]"$``(GVQT,L`````.L6C78`QT,L_?___^L*
+MC78`QT,L_____X/L"/]V/(L&!9@```!0Z/S___^#Q`3_-NC`KO__B30DZ/S_
+M___'0S`P=P<`B5LTQT,X`````(/$"(U#,%#_<PCH_/___X/$%%M>PXGV4X/L
+M#(M<)!3_<QAJ`/]S".C;Y?__BU,<B0*#Q!"#^/]U"L=#+/____^-=@#'0S`P
+M=P<`B5LTQT,X`````(/L"(U#,%#_<PCH_/___X/$&%O#C78`55=64X'LS```
+M`(N<).````"+:PB+>QB)YKD`````N@P```")X(UV`(@(0$IU^L<&?`$``(U&
+M#(/L!&BP````5U#H_/___X/$#%9J`%7H2N7__XM3'(D"@\00@_C_=0?'0RS_
+M____QT,P,'<'`(E;-,=#.`````"#[`B-0S!0_W,(Z/S___^!Q-P```!;7E]=
+MPXUV`%575E.![+P```"+G"30````BT,(B40D#(MS&(UL)!"Y`````+H,````
+MB>B0B`A`2G7ZQT4`?`$``(U%#(/L!&IH5E#H_/___\=%=`````#'17@`````
+MC7U\@\9H_+D(````\Z6#Q`Q5:@#_="08Z)7D__^+4QR)`H/$$(/X_W4'QT,L
+M_____\=#,#!W!P")6S3'0S@`````@^P(C4,P4/]S".C\____@<3,````6UY?
+M7<.)]E575E.![,P```"+M"3@````BT88C7@$_S#H_/___XG%C5PD!(G<N0``
+M``"Z#````(G8B?:("$!*=?K'`WP!``"-0PR#[`1HL````%=0Z/S___^#Q`Q3
+M5?]V".CUX___B<*#Q!"%P'0T@_C_=0?'1BS_____BT8<B1#'1C`P=P<`B78T
+MQT8X`````(/L"(U&,%#_=@CH_/___X/$$('$S````%M>7UW#D%93@^P$BW0D
+M$(M&&(U8!/\PZ/S___]34/]V".B,X___B<*#Q!"%P'0W@_C_=0K'1BS_____
+MC78`BT8<B1#'1C`P=P<`B78TQT8X`````(/L"(U&,%#_=@CH_/___X/$$(/$
+M!%M>PXGV55=64X/L#(M\)""+1QB+6`2+5PB)5"0(_S#H_/___XG&@\0$]L,#
+M#Y1$)`>]`````(N89`$``(7;=$F#>P0`=!>+0P2#N"`"````=2N#N%0"````
+M=2*)]H7;="B#>P@`="*+0PB#N"`"````=0J#N%0"````=`V0O?_____IN@``
+M`(GV]H9(`0``<'0+O?_____II0```)"Z`````(!^,`!T(0^V3C"0BT262(7`
+M=`^`>`@$=@GV@$@!``!P=6)".=%_Y(7;=&"#>P0`=!:#[`1J``^V1"0/4/]S
+M!.B7T/__@\00@WL(`'06@^P$:@`/MD0D#U#_<PCH>]#__X/$$(M3$(M##(E0
+M!(D"@^P(4XM$)!2#Z(!0Z/S___^#Q!#K&[W_____ZQ2#[`1J``^V1"0/4%;H
+M/]#__X/$$(M''(DH@_W_=0K'1RS_____C78`QT<P,'<'`(E_-,='.`````"#
+M[`B-1S!0_W<(Z/S___^#Q!Q;7E]=PU.#[`B+7"00BT,8_S#H_/___XG!@\0$
+M@7L,#/\```^4PHI`3(A$)`?`Z`*#X`$/MM(YT'0>P>("BD0D!X/@^PG0@\@0
+MB$%,@^P,4>C\____@\00QT,P,'<'`(E;-,=#.`````"#[`B-0S!0_W,(Z/S_
+M__^#Q!A;PU=64XM<)!"+0QB+<`3_,.C\____B<=6Z/S___]05^C\____@\0(
+M@_@!&<#WT(E#+,=#,#!W!P")6S3'0S@`````C4,P4/]S".C\____@\006UY?
+MPU575E.#[`R+;"0@BUT8C7L$_S/H_/___XG&@\0$]D,$`71"N0````"Z$```
+M`(V`5`$``)"("$!*=?J+1P2)AE0!``"+1PB)AE@!``"+1PR)AEP!``"+1Q")
+MAF`!``"`CD@!```$]@<"=#>Y`````+I`````C89L`0``B?:("$!*=?J-EFP!
+M``"-1Q2#[`1J0%!2Z/S___^`CD@!```$@\00]H9(`0``!'0,@^P,5NC\____
+M@\00QT4P,'<'`(EM-,=%.`````"#[`B-13!0_W4(Z/S___^#Q!Q;7E]=PXGV
+M5E.#[!3&1"0(!HM$)""+6`B%VW0BC70D"(UV`(M#"(E&!(/L"(M#!%9J`/]0
+M8(/$$(L;A=MUY8/$%%M>PXUV`%=64X/L$(M<)""+0QB+$(UX!(72=3J#[`S_
+M<PCHG____\=#+/S____'0S`P=P<`B5LTQT,X`````(/$"(U#,%#_<PCH_/__
+M_X/$$.F'````4NC\____B<:#Q`3V!P%T0,9$)`@`C50D"(I'!(A"!(/L"(M&
+M4%+_=ES_4&")0RR#Q!"%P'4:BD9,B,*#RH"(5DR*5P2(5DN#R)"(1DR-=@#V
+M1DP0=`Z#[`Q6Z/S___^#Q!")]L=#,#!W!P")6S3'0S@`````@^P(C4,P4/]S
+M".C\____@\00@\006UY?PXGV5U93@^PPBWPD0(M'&(L0C7`$A=)U.H/L#/]W
+M".B__O__QT<L_/___\=',#!W!P")?S3'1S@`````@\0(C4<P4/]W".C\____
+M@\00Z0,"``!2Z/S___^)PX/$!/8&`71`QD0D"`"-5"0(BD8$B$($@^P(BT-0
+M4O]S7/]08(E'+(/$$(7`=1J*0TR(PH/*@(A33(I6!(A32X/(D(A#3(UV`/8&
+M`G1+QD0D"`2-5"0(BD8%B$($QD(%`(/L"(M#4%+_<US_4&")1RR#Q!"%P'4A
+MBE--@\H0B%--@'X%``^5P,'@!8/BWPG"B%--@$M,$(GV]@8$=$_&1"0(!8U4
+M)`B*1@:(0@3&0@4`@^P(BT-04O]S7/]08(E'+(/$$(7`=26*4TV#RD"(4TV`
+M?@8`#Y7`#[;`P>`'@^)_"<*(4TV`2TP0C78`]@8(=$?&1"0(`XU4)`B*1@>(
+M0@2#[`B+0U!2_W-<_U!@B4<L@\00A<!U(8I338/*!(A338!^!P`/E<#!X`.#
+MXO<)PHA338!+3!")]O8&$'1'QD0D"`*-5"0(BD8(B$($@^P(BT-04O]S7/]0
+M8(E'+(/$$(7`=2&*4TV#R@&(4TV`?@@`#Y7`T>"#XOT)PHA338!+3!"-=@#V
+M!B!T(\9$)`@'C50D"(I&"8A"!(/L"(M#4%+_<US_4&")1RR#Q!"0]D-,$'0F
+M@^P(BT-0C50D&%+_<US_4#R*1"0NB$-*B1PDZ/S___^#Q!"-=@#'1S`P=P<`
+MB7\TQT<X`````(/L"(U',%#_=PCH_/___X/$$(/$,%M>7\.)]E575E.#[#R+
+M5"10BT(8BQ"-6`2%TG5+QD0D"`:+/0````"%_P^$C0,``(UL)`B)]HM?"(7;
+M="")[HUV`(M#"(E&!(/L"(M#!%9J`/]08(/$$(L;A=MUY8L_A?]UT^E5`P``
+M4NC\____B<:#Q`0/M@.%P'0.@_@!#X3#`0``Z2H#``"`?@@!#X5W`0``#[9#
+M`8/X!0^':@$``/\DA3@B``"+1"10@W@0"0^%50$``(!.3(#&1"0(`(U4)`B*
+M0P2(0@2#[`B+1E!2_W9<_U!@BU0D8(E"+(!.3!"#Q!#I+0$``(M$)%"#>!`)
+M#X44`0``QD0D"`*-5"0(BD,$B$($@^P(BT904O]V7/]08(M4)&")0BR`3DP0
+M@\00Z?````"+1"10@W@0"0^%UP```,9$)`@#C50D"(I#!(A"!(/L"(M&4%+_
+M=ES_4&"+5"1@B4(L@$Y,$(/$$.FS````BT0D4(-X$`D/A9H```#&1"0(!(U4
+M)`B*0P2(0@3&0@4`@^P(BT904O]V7/]08(M4)&")0BR`3DP0@\00ZW6+1"10
+M@W@0"75@QD0D"`6-5"0(BD,$B$($QD(%`(/L"(M&4%+_=ES_4&"+5"1@B4(L
+M@$Y,$(/$$.L[BT0D4(-X$`EU)L9$)`@)C50D"(I#!(A"!(/L"(M&4%+_=ES_
+M4&"+5"1@B4(L@\00BT0D4,=`+/[____V1DP0#X2?`0``@^P(BT90C50D&%+_
+M=ES_4#R*1"0NB$9*B30DZ/S___^#Q!#I=P$``(!^"`1VO0^V0P&#^`%T;(/X
+M`7\)A<!T$^DL`0``@_@"#X2=````Z1X!``"+5"10@WH0&'6.N0````"Z$```
+M`(V&5`$``(@(0$IU^HM#!(F&5`$``(M#"(F&6`$``(M##(F&7`$``(M#$(F&
+M8`$``(".2`$```3IV0```(M$)%"#>!!(#X4Z____N0````"Z!````(V&;`$`
+M`(@(0$IU^HV6;`$``(U#!(/L!&I`4%+H_/___X".2`$```2#Q!#ID0````^V
+MOAT"``"+5"10@WH0"0^%Z_[__P^V0P0Y^'0]BD,$B(8=`@``@'X(!'8NN0``
+M``"`?C``=",/MFXPBU2.2(72=!*`>@@$=@R*AAT"``"(@AT"``!!.<U_X8/_
+M`G4>@'L$`G08@^P$:)@#!P#_="185NB2V/__@\00ZV>0@(Y(`0``!.L+BT0D
+M4,=`+/[____VAD@!```$=!J#[`Q6Z/S___^#Q!#K#)"+5"10QT(L_O___XM$
+M)%#'0#`P=P<`B4`TQT`X`````(/L"(M$)%B#P#!0BU0D7/]R".C\____@\00
+M@\0\6UY?7<.)]E575E.#[`R+?"0@BVPD)(M$)"B+=PS_CI`!`P"%P'AT@^P$
+M4%57Z/S___^)PX/$$(7`=1R#[`R+1P15_U!`@\0(58U'$%#H_/___X/$$.M4
+M@#T``````'0K]D!,`G4E]D!,`70/@^P,4.C\____@\00C78`BD-,J`1U"8/(
+M)(A#3(UV`(/L"%-J`NC\____@\00ZQ"#[`A5C4<04.C\____@\00@[Z0`0,`
+M`'4SQX94`0``?#$'`(FV6`$``,>&7`$```````"#[`B-AE0!``!0C48D4.C\
+M____@\00C78`@\0,6UY?7<-55U93@>R8````BZPDK````(M]"%?HDO?__X/$
+M$(._D`$#``!T+\=%+/S____'13`P=P<`B6TTQT4X`````(/L"(U%,%#_=0CH
+M_/___X/$$.G2````QX>0`0,``0```(M?"(7;=%B)]H/L"(M#!(U4)`A2_W,(
+M_U`<#[9$)"`!AY`!`P"^`````(/$$(!\)!``="604VC`+`<`5E/H_/___X/$
+M$(3`=0;_CY`!`P!&#[9$)!`Y\'_<BQN%VW6J_X^0`0,`@[^0`0,``'4PQX=4
+M`0``?#$'`(F_6`$``,>'7`$```````"#[`B-AU0!``!0C4<D4.C\____@\00
+MQT4L_/___\=%,#!W!P");33'13@`````@^P(C44P4/]U".C\____@\00@<2,
+M````6UY?7<.)]E575E.#[!2+1"0HBW@0QD0D$P!0C8>P````4.C\____QX<D
+M`0```````(MW#(/$$(U'##GP=#*0C9[8_?__@'L(`74<]D-,0'06]H,<`@``
+M`70-@^P,4^C\____@\00D(LVC4<,.?!USXMW%(U'%#GP=!J)PXUV`(U&](/L
+M#%#H_/___X/$$(LV.?-UZXMW#(U'##GP="N)Q8UV`(V>V/W__X!["`1V%(-[
+M#`!U#H/L#%/H_/___X/$$(GVBS8Y]77:BW<,C4<,.?!T78V>V/W__X!["`%U
+M2(I#3*@@=$&#X-N(0TR+0R2%P'06@W@4`'0*QD0D"P'K"8UV`(L`A<!UZH!\
+M)`L`=1>#[`Q3Z/S___^)'"3H_/___X/$$(UV`(LVC4<,.?!UHXMW#(U'##GP
+M#X3:````D(V>V/W__X-['``/B:0```#V@QP"```!#X2O````@'L(!'9U@WL,
+M``^%GP```/:#2`$``$`/A9(```"#NV0!````=`N+@V0!```Y6`1U?KT`````
+MN@````"`>S``="`/MDLPBT232(7`=`^`>`@$=@GV@$@!``!`=1=".=%_Y(7M
+M=4J#[`Q3Z/S___^#Q!#K/+T!````Z^>0@'L(`74N]D-,`G0H@^P,4^C\____
+M@\00ZQJ)]O:#'`(```%U#X/L#%/H_/___X/$$(UV`(LVC4<,.?`/A2?___^#
+MQ`Q;7E]=PXUV`%=64XM\)!"#[`R-A[````!0Z/S___^)QH/$$(7`=&''``$`
+M``#'0`3<+@<`B48(QT`,`````(EX$(M?#(U'##G8=">)QXUV`(V#V/W__X!X
+M"`%U$(/L"%90Z/S___^#Q!"-=@"+&SG?==[_#H,^`'4/@^P,5NAJ_?__@\00
+MC78`6UY?PX/L&/]T)!SH_/___X/$',-55U93@^P,BWPD((MW"(M'&(LH5>C\
+M____B40D#(M>#(/$!(U&##G8#X2?````B?:-D]C]__^Y`````(-Z#`!U?X7M
+M=1>*@AP"``"H`G0-@^#]B((<`@``L0'K0#M4)`AU&HJ"'`(``*@"=1"#R`*(
+M@AP"``"Y`0```.L@BH(<`@``J`)T%CM4)`AT$(/@_8B"'`(``+D!````B?:%
+MR70@@'H(`74.@^P,4NC\____@\00ZPR#[`Q2Z/S___^#Q!"+&XU&##G8#X5C
+M____QT<P,'<'`(E_-,='.`````"#[`B-1S!0_W<(Z/S___^#Q!Q;7E]=PXUV
+M`%.#[!"+7"08BP/_L'`!`P!0Z/Z:__^+`X/$$(-X)`!U#X/L#%/H_/___X/$
+M$.L7D(U##(L3@\(<BTH$B4($B5,,B4@$B0&#Q`A;PY!55U93@^P,BT0D,&:)
+M1"0*BU0D-(MJ"`^WV,'C"0.=9`$#`$N)V+H`````][5D`0,`B<.#?"0D`'06
+MBU0D)/:"20$```1U"8M"!(!X!@!U.(M,)#3'02S^____QT$P,'<'`(E)-,=!
+M.`````"#[`B)R(/`,%#_<0CH_/___X/$$.G/`@``C78`#[=$)`JZ`````(MT
+M)"B+?"0L`<81UXM4)"0/MD(PBU($#[92!BG0F5)0BT0D+/]P&/]P%.C\____
+M@\00.==R!G>&.<9W@H/L#(V%F````%#H_/___XG&@\00A<!U-HM4)#3'0BS]
+M____QT(P,'<'`(E2-,=".`````"#[`B)T(/`,%#_<@CH_/___X/$$.DY`@``
+MD(/L"(M,)"S_<2!5Z/S___^)QX/$$(7`=1>#[`A6C868````4.C\____@\00
+MZYR)]L=&$`````"+1"0HBU0D+(D&B58$#[=$)`JZ``````-$)"@35"0LB48(
+MB58,QT8<`````,=&(`````#'1B0`````C484B484B488QT8H`0```(EW/(M4
+M)#2)5RS&1UP!H0````"%P'X6BTPD)(N!O`$``#L%``````^<P`^VP(E'-(M4
+M)"2+0@2`>`4`=%"+1"0@+0O_``"#^!IW(O\DA5`B``#&1U(!Z?,```#&1U("
+MZ>H```#&1U(#Z>$```"#[`A6C868````4.C\____B3PDZ/S___^#Q!#I)O[_
+M_XM$)"`M"_\``(/X&G<;_R2%O"(``,9'4@'K+L9'4@/K*-'CQD=2`NL@@^P(
+M5HV%F````%#H_/___XD\).C\____@\00Z=W]__^-A6`!`P")1U2+1"0HBU0D
+M+(E'2(E73&:+5"0*9HE74,='9`````#&1UX`BTPD)(E/*,=':,`>!P")G7`!
+M`P#'A8`!`P``````QX5T`0,`A#('`(F]>`$#`,>%?`$#``````"#[`B-A7`!
+M`P!05>C\____@\00ZVF+1"0D#[9(,8M$)"B+5"0L#ZW0T^KVP2!T!XG0N@``
+M``")1TB)5TS'1V0`````QD=>`(M4)"2)5RC'1VC`'@<`@WTD`'4.@^P,5^C\
+M____@\00ZQ6-1PR-51R+2@2)0@2)5PR)2`2)`9"#Q`Q;7E]=PU575E.+="08
+MBU0D%(M"*(N09`$``(UZ4(LH@<5@`0,`BT0D%`^W6%#!XPF`>A0`=!_V0%T$
+M=!D/MT\(#[='"BG!BU0D%`^W0E`IP<'A">L'#[=/"L'A"8G(N@````#W=02-
+M!$"+30"-/(&)T87;=$:#?"0<`'0)B<@#!XE&".L3B<BZ``````-'!!-7"(E&
+M"(E6#(M%!"G(.=AV`HG8B0;'1@0`````N0````"#QA"#QPPIPW6ZQT;T`0``
+M`+@!````6UY?7<.055=64XML)!B_`````(!],`!T9I"+=+U(A?9T5(!^"`1V
+M'H/L"%;_="0@Z-'___^#Q!"$P'0ZN`$```#K08UV`(M&,(M4)!2+2C"+4`B+
+M0`2+60@QTS-!!`G#=12+1B2+5"04.T(D=0BX`0```.L/D$</MD4P.?A_F[@`
+M````6UY?7<.055=64XM\)!2+;"08O@````"`?S``=#J0BURW2(7;="B`>P@$
+M=A*#[`A54^C0____@\00ZQ.-=@!54^@]____@\0(A,`/E$,T1@^V1S`Y\'_'
+M6UY?7<.)]E93@^P,BT0D&(MP!(M8"%"+`X/H@%#H_/___X/$#&H`:@!6Z+"[
+M__^`BT@!```$B1PDZ/S___^#Q!1;7L.-=@"#[!2+1"08QT`8T#<'`(E`',=`
+M(`````"-4!A2BT`$BP"#P"10Z/S___^#Q!S#B?955U93@^P,BW0D((MN!(M>
+M"(M%`(NX*`$``%-5Z!?____'@V0!````````QX5D`0```````(J5'`(``(/B
+M!(J#'`(``(/@^PG0B(,<`@``BI4<`@``@^("@^#]"="(@QP"``"*132(0S3'
+M1S`P=P<`B7\TQT<X`````(U',%#_=PCH_/___X/$"%-J%>C\____@\0(BU80
+MBT8,B5`$B0+'1A@0.`<`B78<QT8@`````(/&&%;_=0#H_/___X/$'%M>7UW#
+M5E.#[!"+5"0<BUHLBT,$BS!2Z/S____'0QA`.`<`B5L<QT,@`````(/$"(/#
+M&%.#QB16Z/S___^#Q!1;7L.)]E=64XMT)!"+7@2+5@B+.XM#'(E"',=#'/__
+M__^`HTD!``#S@*))`0``\X/L"/]R'/]W!.C\____@\0(_W,@5^C\____B5@H
+MQD!<!(EP+,=`:`0Y!P")!"3H_/___X/$$%M>7\-55U93@^P,BT0D((MH+(M`
+M*(NP9`$``(U.4(M^!(M>"(E<)`B*1F:(1"0'@'X4`'1;#[=!"+H`````BTY<
+MBUY@*<$9TXE.7(E>8(!^9@%U%(M7&#':BT<4,<@)PG4&QD9F`(GV@'YF`G42
+MBT9<BU9@BT\8,=$S1Q0)P71VBT9@"T9<=&[IKP```(UV``^W00BZ`````(G!
+MB=,#3EP37F")3ER)7F"`?F8`=16+5Q@QVHM'%#'("<)U!\9&9@&-=@"`?F8#
+M=1:+3@2+1ER+5F"+61@QTS-!%`G#=!>0BT9<BU9@BUPD"(M+&#'1,T,4"<%U
+M1H/L#/\WZ'"3__^#Q!"`?"0'`'0'@'PD!P-U$H/L"(U&)%#_=@3H_/___X/$
+M$(/L#/]T)"SH_/___XDT).AI_O__@\00ZUR#[`S_-^@JD___@\00@'PD!P!T
+M!X!\)`<#=1*#[`B-1B10_W8$Z/S___^#Q!"#[`S_="0LZ/S____'13`P=P<`
+MB6TTQT4X`````(/$"(U%,%#_=0CH_/___X/$$(/$#%M>7UW#4X/L"(M<)!"+
+M$\9#7@#V0UT"=!R#>B0`=!:-0PR#PAR+2@2)0@2)4PR)2`2)`>L,@^P,4^C\
+M____@\00@\0(6\.-=@!55U93@^P,BW0D((MN+(M&*(N89`$``(L&B40D"(U[
+M4(!^7@$/A,X```"`?EX"=#3&1EX`QT,81#L'`(ES',=#(`````"#[`B-0QA0
+MBT0D%(/`)%#H_/___X/$$.F_`0``C78`QD-G`8M#!("@'`(``/Z+0PB`H!P"
+M``#^BT,$@*!)`0``]XM#"("@20$``/>#[`R+0P3_,.COD?__@\00@'MF`'0&
+M@'MF`W42@^P(C4,D4/]S!.C\____@\00@^P,5NC\____QT4L_____\=%,#!W
+M!P");33'13@`````@\0(C44P4/]U".C\____@\00Z2H!``")]F:+1PJ)PF8#
+M5E!FB5<*BT8H.T,$=0YF.U<(<C9FQT<*``")]F:+1PIF.T<(#X/H````BD9=
+M@^#]@\@$B$9=BT,(B48HQT8\`````,=&.`````#&1EX`BTPD"(N1;`$#`$J+
+M@60!`P#!Z`F)T0^OR`^W5P@/MT<**<(YT78"B=%FB4Y09H'Y``%V!F;'1E``
+M`8![%`!T-O9&701T,`^W1PBZ``````,'$U<$#[=/"KL`````*<@9V@^W3E"[
+M`````"G(&=J)1DB)5DSK%`^W1PJZ``````,'$U<$B49(B59,]D9=`G0FBT0D
+M"(-X)`!T'(U&#(M4)`B#PAR+2@2)0@2)5@R)2`2)`>L>B?:#[`Q6Z/S___^#
+MQ!#K#H/L#%;H!?S__X/$$(GV@\0,6UY?7<-55U93@^P4BT0D*(/`4(E$)!"+
+M5"0HBT($BRB+C2@!``")3"0,_[5P`0,`5>BWC___@\0(BUPD*(M#"(M3!(M`
+M(#M"(',#BT(@4(M\)"R+1P3_,.C\____B<:#Q!"%P'5L@']F`'0&@']F`W4:
+M@^P(BT0D*(/`)%"+1"0L_W`$Z/S___^#Q!"#[`R+5"0LBT($_S#HS(___XM,
+M)!3'02S_____QT$P,'<'`(E)-,=!.`````"#Q`B)R(/`,%#_<0CH_/___X/$
+M$.EW`0``H0````"%P'X9BUPD((M#!(N`O`$``#L%``````^<P`^VP(E&-,9&
+M7@"+?"0@@']F`'0&@']F`W4:BT0D((/`)(E&.(M4)""+0@2)1BB`3ET"ZTV+
+M3"0@BT$(B48H@$Y=!+L`````@[UH`0,``'8QOP````"-=@"+E6`!`P"-!%N+
+MC60!`P"+!(*%R70*B?:)^H@00$EU^$,YG6@!`P!WUXN5;`$#`$J+A60!`P#!
+MZ`F)T0^OR(M<)`@/MU,(#[=#"BG".=%V`HG19HE.4&:!^0`!=@9FQT90``&+
+M?"0@@'\4`'0Z]D9=!'0TBTPD"`^W00BZ``````,!$U$$#[=)"KL`````*<@9
+MV@^W3E"[`````"G(&=J)1DB)5DSK&(M,)`@/MT$*N@`````#`1-1!(E&2(E6
+M3(!.70B+?"0$B7XLQT9HB#L'`,=&9"PV!P"#?20`=0Z#[`Q6Z/S___^#Q!#K
+M%(U&#(U5'(M*!(E"!(E6#(E(!(D!@\0,6UY?7<-3@^P0BTPD&(M!!(L`B40D
+M#`^W05C!X`F+5"0,`X)D`0,`2(G3N@````#WLV0!`P")@W`!`P#'@X`!`P``
+M````QX-T`0,`L#T'`(F+>`$#`,>#?`$#``````")V`5P`0,`4%/H_/___X/$
+M&%O#C78`4XM4)`B+3"0,B<NX`````(!Z"`%U8H7)="6+@60!``"%P'0;.4@$
+M=1.+6`CK$;@`````ZT.X`````.L\BU@$BU(DA=)T+8GV@WH4`'0?A<ETW(M"
+M%(-X#`!T"I"+0`R#>`P`=?<YR'0$.=AUR(L2A=)UU;@!````6\.)]E=64XM<
+M)!"+?"04@[L@`@```'4)@[M4`@```'0+N@````#IG0```)"#>QS_=!R#[`C_
+M<QR+`_]P!.C\____@\00N@````"%P'5Z@'L(!'9`N@````!F]X-(`0``<`AU
+M9+X`````@'LP`'12D(M$LTB%P'01@^P(5U#H@O___X/$$(3`=#%&#[9#,#GP
+M?][K+8!["`1U$5?_<R3HY?[__P^VT(/$".L=5U/HUO[__P^VT(/$".L.N@``
+M``#K![H!````B?:)T%M>7\.)]H/L#(M4)!"`>@@$=@ZX`````(.Z9`$```!U
+M$X/L"/]T)!Q2Z`S___\/ML"#Q!"#Q`S#B?955U93@^P8BU0D+(M:+(L#B40D
+M%(NX*`$``(M'&(L`B40D$(MJ,%+H_/___X/$$(!["`1V;XNS9`$``(7V=%*#
+M?@0`=!.#[`1J`FH`_W8$Z&RQ__^#Q!"0@WX(`'02@^P$:@)J`/]V".A3L?__
+M@\00BU80BT8,B5`$B0*#[`A6BT0D%(/H@%#H_/___X/$$.L?@^P$:@)J`%/H
+M(K'__X/$$.L-D(/L#%/H_/___X/$$$4[;"0$=27'1S`P=P<`B7\TQT<X````
+M`(/L"(U',%#_=PCH_/___X/$$.L9BT<8_W2H!.C\____@^P$55#H.@```(/$
+M$(/$#%M>7UW#C78`@^P4BT0D&,=`%.A!!P")0!C'0!P`````C5`44HL`@\`D
+M4.C\____@\0<PY!3@^P0BUPD&/]S(/\SZ/S___^*4%V#XL^#RB"(4%V)6"C&
+M0%P$B5@LBU0D)(E0,,9`7@#'0&CH0@<`B00DZ/S___^#Q!A;PY!55U93@^P,
+MBWPD((M'&(L0]L;_#Y3`#[;H#[;RBT<<QP``````NP`````Y\W-JA>UT.HGV
+MBT<8_W28!.C\____@\0$B<*`>`@$=P6Z`````(/L"%)0Z/[]__^#Q!"$P'1$
+M0SGS<P:%[77*B?:[`````#GS<R.-=@"+1QC_=)@$Z/S___^#[`A0Z/S___^#
+MQ!!#.?-RXXUV`(7M=3C'1RP`````ZSC'1RS_____BU<<C4,!B0+K)XM'&/]T
+MF`3H_/___X/L!%-0Z.S^__^#Q!#K+XUV`+L`````.?-RV<=',#!W!P")?S3'
+M1S@`````@^P(C4<P4/]W".C\____@\00@\0,6UY?7<-64X/L!(MT)!"`/0``
+M````=&R+7@R-1@PYV'0UC9/8_?__@'H(`74@]H(<`@```707@^P(#[8%````
+M`%!2Z/S___^#Q!"-=@"+&XU&##G8=<O'ALP`````AY,#QX;4````9$0'`(FV
+MV````(/L"(V&S````%!6Z/S___^#Q!"#Q`1;7L-55U93@>R<````BZPDL```
+M`(M]"(M%&(E$)`3'!"0`````BW<,C4<,.?!T38V>V/W___:#'`(```%T-8![
+M"`%U+X/L#%/H_/___\9$)!@(BU0D%(I"((A$)!R#Q`B+0U"-5"004O]S7/]0
+M8(/$$(GVBS:-1PPY\'6SBU0D!(I"(*(`````BU\(A=MT*H/L"(M3!(U$)!A0
+M_W,(_U(<@\00]D0D(1!T"<<$)`$```#K!HL;A=MUUH,\)`!T.(/L"(V?S```
+M`%-7Z/S____'A\P`````AY,#QX?4````9$0'`(F_V````(/$"%-7Z/S___^#
+MQ!"0QT4L`````,=%,#!W!P");33'13@`````@^P(C44P4/]U".C\____@<2L
+M````6UY?7<.)]E575E.#[#R+;"10BWT(BT48QD0D"`>`>"`!&<"#P`*(1"0,
+MBU\,C4<,.=AT5(UV`(VSV/W___:&'`(```%T.8!^"`%U,X/L"(M&4(U4)!A2
+M_W9<_U`\C50D&(/$$(I$)!\Z0@1T$H/L"(M&4%+_=ES_4&"#Q!")]HL;C4<,
+M.=AUK\=%+`````#'13`P=P<`B6TTQT4X`````(/L"(U%,%#_=0CH_/___X/$
+M3%M>7UW#@^P4BU0D&(L"!2P!``!04NC\____@\0<PXUV`(M$)`2#>!``>`:#
+M>!0#=P?'0"S^____PX/L%(M$)!B+4!S'`@```0+'0#`P=P<`B4`TQT`X````
+M`(U0,%+_<`CH_/___X/$',.-=@"+1"0$@7@0QP```'8)@7@4QP```'<'QT`L
+M_O___\.)]E575E.#[`R+1"0@BV@8BU@<QT`L`````(`]``````%W/VC4`@``
+M5>CXA?__@\0(A<!U+?RY"````(G?B>[SI<9#1`#&0T$`QD-``HI%18A#1:``
+M````B$,@Z=8```")]FCA`@``5>BYA?__@\0(A<!U0ORY"````(G?B>[SI<9#
+M1`#&0T$`BD5%B$-%QD-``8L5`````(G0!9`!``!Y"8V"EP$``(UV`,'X`XA#
+M(.F!````D&CR`@``5>AEA?__@\0(A<!U*/RY"````(G?B>[SI<9#1`#&0T$`
+MBD5%B$-%QD-``J``````B$,@ZT9H#P,``%7H*X7__X/$"(7`=2C\N0@```")
+MWXGN\Z7&0T0`QD-!`(I%18A#1<9#0`&@`````(A#(.L,BU0D(,="+/____^0
+MBT0D(,=`,#!W!P")0#3'0#@`````@^P(BT0D*(/`,%"+5"0L_W((Z/S___^#
+MQ!Q;7E]=PXM$)`2!>!#'````=@>#>!0`>0B0QT`L_O___\-64X/L!(MT)!!H
+M#P,``/]V&.B*A/__@\0(A<!U/XM&"(M8#(/`##G8=#*)]HV#V/W___:`'`(`
+M``%T%8!X"`%U#X/L#%#HJOW__X/$$(UV`(L;BT8(@\`,.=AUT(/$!%M>PXGV
+M5E.#[`2+="00BUX8:-0"``!3Z"6$__^#Q`B%P'4RBD,@H@````#'1C`P=P<`
+MB78TQT8X`````(/L"(U&,%#_=@CH_/___X/$$.E*`0``B?9HX0(``%/HX8/_
+M_X/$"(7`=3H/MD,@C03%</[__Z,`````QT8P,'<'`(EV-,=&.`````"#[`B-
+M1C!0_W8(Z/S___^#Q!#I_@```(GV:/("``!3Z)6#__^#Q`B%P'4RBD,@H@``
+M``#'1C`P=P<`B78TQT8X`````(/L"(U&,%#_=@CH_/___X/$$.FZ````B?9H
+M#P,``%/H48/__X/$"(7`=36+1@C'@$@!``#H1`<`B;!,`0``QX!0`0``````
+M`(/L"(V02`$``%*#P"10Z/S___^#Q!#K<6@L`P``4^@*@___@\0(A<!U-8M&
+M",>`2`$``!!&!P")L$P!``#'@%`!````````@^P(C9!(`0``4H/`)%#H_/__
+M_X/$$.LJQT8L_____\=&,#!W!P")=C3'1C@`````@^P(C48P4/]V".C\____
+M@\00@\0$6U[#B?:+1"0$@W@0`'@&@W@4`W<'QT`L_O___\-64X/L!(M<)!"+
+M<QSH"X;__XD&QT,P,'<'`(E;-,=#.`````"#[`B-0S!0_W,(Z/S___^#Q!1;
+M7L.-=@"+1"0$@W@0`W8&@W@42W<'QT`L_O___\-3@^P0BUPD&(M#&/]S'/\P
+MZ`^&__^#Q!"%P'0'QT,L_____\=#,#!W!P")6S3'0S@`````@^P(C4,P4/]S
+M".C\____@\086\.+1"0$@W@0`W8&@W@45W<'QT`L_O___\-3@^P0BUPD&(M#
+M&/]S'/\PZ)>&__^#Q!"%P'0'QT,L_____\=#,#!W!P")6S3'0S@`````@^P(
+MC4,P4/]S".C\____@\086\.+1"0$@W@0!W8&@W@4#W<'QT`L_O___\-64X/L
+M6(M<)&2+0QB+<QR-5"0$4O]P!/\PZ$*'__^#Q!"%P'0+QT,L_____^L<B?:+
+M!"2)!HM$)`2)1@2+1"0(B48(BT0D#(E&#,=#,#!W!P")6S3'0S@`````@^P(
+MC4,P4/]S".C\____@\1D6U[#BT0D!(-X$`=V!H-X%$-W!\=`+/[____#4X/L
+M#(M<)!2+0QC_<QS_<`3_,.C`AO__@\00A<!T!\=#+/_____'0S`P=P<`B5LT
+MQT,X`````(/L"(U#,%#_<PCH_/___X/$&%O#D(M$)`2#>!`#=@:#>!0#=P?'
+M0"S^____PU=64X'LB````(NT))@```"+1AAJ`/\PZ&R!__^)P[\`````@\00
+MA<!T0XGVBT,$@[B$`````'04@^P,_W,(_Y"$`````<>#Q!"-=@"+&X7;=!N#
+M[`B+4P2-1"0(4/]S"/]2'(/$$(!\)!,`=+^+1AR).,=&,#!W!P")=C3'1C@`
+M````@^P(C48P4/]V".C\____@<20````6UY?PXM$)`2#>!`'=@F!>!3_````
+M=P?'0"S^____PY!55U93@>RD````B[PDN````(M'&(MP!(M7'(E4)!1J`/\P
+MZ*F`__^)P[T`````QT<L_____X/$$(7`='F+0P2#N(0`````=$R#[`S_<PC_
+MD(0```"#Q!`Y\'XU@^P$BT,$_W0D$%;_<PC_D(@```"#Q!"%P'4_BT0D#(!X
+M`O]T!8GJ`%`"QT<L`````.LGB?8IQ@'%BQN%VW0;@^P(BU,$C40D&%#_<PC_
+M4AR#Q!"`?"0C`'2'QT<P,'<'`(E_-,='.`````"#[`B-1S!0_W<(Z/S___^!
+MQ*P```!;7E]=PXM$)`2#>!`'=@F!>!2C#```=P?'0"S^____PY!55U93@>RD
+M````B[PDN````(M'&(MP!(M7'(E4)!1J`/\PZ*U___^)P[T`````QT<L____
+M_X/$$(7`='F+0P2#N(0`````=$R#[`S_<PC_D(0```"#Q!`Y\'XU@^P$BT,$
+M_W0D$%;_<PC_D(P```"#Q!"%P'4_BT0D#(!X`O]T!8GJ`%`"QT<L`````.LG
+MB?8IQ@'%BQN%VW0;@^P(BU,$C40D&%#_<PC_4AR#Q!"`?"0C`'2'QT<P,'<'
+M`(E_-,='.`````"#[`B-1S!0_W<(Z/S___^!Q*P```!;7E]=PXM$)`2#>!`'
+M=@F!>!0G#0``=P?'0"S^____PY!55U93@>RD````B[PDN````(M'&(MP!(M7
+M'(E4)!1J`/\PZ+%^__^)P[T`````QT<L_____X/$$(7`='F+0P2#N(0`````
+M=$R#[`S_<PC_D(0```"#Q!`Y\'XU@^P$BT,$_W0D$%;_<PC_D)````"#Q!"%
+MP'4_BT0D#(!X`O]T!8GJ`%`"QT<L`````.LGB?8IQ@'%BQN%VW0;@^P(BU,$
+MC40D&%#_<PC_4AR#Q!"`?"0C`'2'QT<P,'<'`(E_-,='.`````"#[`B-1S!0
+M_W<(Z/S___^!Q*P```!;7E]=PXM4)`2+0AB+`(-Z$`-V#(T$A00````Y0A1S
+M!\="+/[____#D%93@^P$BUPD$(M3&(MS'(U&!/\R4.C:@___B0;'0S`P=P<`
+MB5LTQT,X`````(U#,%#_<PCH_/___X/$%%M>PY"+5"0$BT(8BP"#>A`#=@R-
+M!(4$````.4(4<P?'0BS^____PY!64X/L!(M<)!"+4QB+<QR-1@3_,E#H%H3_
+M_XD&QT,P,'<'`(E;-,=#.`````"-0S!0_W,(Z/S___^#Q!1;7L.04XM<)`B+
+M0QB+`(-[$`-V"8%[%*T```!W"\=#+/[____K%HGV4.C\____@\0$A<!U!\=#
+M+/[___];PXGV5U93BUPD$(M#&(LXBW,<N`````"YK@```(GRD(@"0DEU^H/L
+M"%97Z'R4__^#Q!"%P'0'QT,L_____\=#,#!W!P")6S3'0S@`````@^P(C4,P
+M4/]S".C\____@\006UY?PXUV`%.+7"0(BT,8BP"#>Q`#=@F!>Q37````=PO'
+M0RS^____ZQ:)]E#H_/___X/$!(7`=0?'0RS^____6\.)]E=64XM<)!"+0QB+
+M.(MS'+@`````N=@```")\I"(`D))=?J#[`A65^ATE/__@\00A<!T!\=#+/__
+M___'0S`P=P<`B5LTQT,X`````(/L"(U#,%#_<PCH_/___X/$$%M>7\.-=@!3
+MBUPD"(M#&(L`@WL0`W8)@7L4^0```'<+QT,L_O___^L6B?90Z/S___^#Q`2%
+MP'4'QT,L_O___UO#B?975E.+7"00BT,8BSB+<QRX`````+GZ````B?*0B`)"
+M277Z@^P(5E?H=)3__X/$$(7`=`?'0RS_____QT,P,'<'`(E;-,=#.`````"#
+M[`B-0S!0_W,(Z/S___^#Q!!;7E_#C78`5E.+7"0,BT,8BS"+2QR#>Q`(=@:#
+M>Q0$?PK'0RS^____ZSF0BT,8BU`$BD`(B1&(0011Z.1Y__^#Q`0\`70)QT,L
+M_O___^L45NC\____@\0$A<!U!\=#+/[___];7L.04X/L$(M<)!B+0QC_<QS_
+M,.B3E/__@\00A<!T!\=#+/_____'0S`P=P<`B5LTQT,X`````(/L"(U#,%#_
+M<PCH_/___X/$&%O#5E.+7"0,@7L0LP```'8&@WL4!W<+QT,L_O___^LVB?:+
+M0QB+,%;H_/___X/$!(7V="*#_O]T'87`=`^`>`@$=@F#N&0!````=`K'0RS^
+M____C78`6U[#D%575E.#[`R+?"0@BT<8BQB-<`2+;QQ3Z/S___^)PH/$!(7;
+M=`>#^_]U!XGVN@````!J``^V1@*#X`]0C49P4`^V1@%0#[8&4%+H?IG__XE%
+M`(E5!,=',#!W!P")?S3'1S@`````@\00C4<P4/]W".C\____@\0<6UY?7<-7
+M5E.+7"00@WL0"'8&@WL4!W<)QT,L_O___^M(BT,8BS"->`16Z/S___^#Q`2%
+M]G0?@_[_=!J%P'0/@'@(!'8)@[AD`0```'0'QT,L_O___U?H&GC__X/$!#P!
+M=`?'0RS^____6UY?PU575E.#[`R+?"0@BT<8BS"-6`2+;QQ6Z/S___^)PH/$
+M!(7V=`>#_O]U!XGVN@````"`>PH`=`D/MD,*ZPR-=@"*0P[`Z`0/ML!0#[9#
+M#H/@#U"-0WQ0#[9##5`/MD,,4%+H@IC__XE%`(E5!,=',#!W!P")?S3'1S@`
+M````@\00C4<P4/]W".C\____@\0<6UY?7<-55U93BW0D%(M&&(LXC02]!```
+M`#E&$'('@WX4`'D-D,=&+/[____K<XUV`(`]``````)U)\=&+/[____K7L=&
+M+/[____K5<=&+/S____K3,=&+/[____K0XUV`+T`````.?US-XUV`(M&&(M<
+MJ`13Z/S___^#Q`2%P'3"4^C\____B<*#Q`2+`#M&"'6Y]D),`72\13G]<L^-
+M=@!;7E]=PXUV`%93@^P$BT0D$(M8&+X`````@SL`=AZ)]H/L#/]TLP3H_/__
+M_XD$).A8\/__@\001CDS=^2#Q`1;7L.)]H/L%(M$)!B+4`C'@D@!```8'@<`
+MB8),`0``QX)0`0```````(V"2`$``%"#PB12Z/S___^#Q!S#55=64XM<)!2+
+M<QB!>Q"'````=@:#>Q0#=PK'0RS^____ZV&0@'X!"'8>QT,L_O___^M1QT,L
+M_O___^M(QT,L_/___^L_C78`O0````"`?@$`=C&0B>H/ML*+?(9H5^C\____
+M@\0$A<!TR5?H_/___X/$!(L`.T,(=<)%B>@X1@%WTHGV6UY?7<.-=@!64X/L
+M!(M$)!"+6!B^`````(![`0!T(9"#[`S_=+-HZ/S___^)!"3H6.___X/$$$8/
+MMD,!.?!WX(/$!%M>PXGV@^P4BT0D&(M0",>"2`$``&P@!P")@DP!``#'@E`!
+M````````C8)(`0``4(/")%+H_/___X/$',.+1"0$@W@0`W8&@W@4`W\'QT`L
+M_O___\-64X'LC````(N<))@```"+0QAJ`/\PZ(EV__^)P8MS'(/$$(7`="F#
+M[`B+4`2-1"0(4/]Q"/]2'(M$)!1FB09FBT0D%F:)1@*#Q!#K"HUV`,=#+/[_
+M___'0S`P=P<`B5LTQT,X`````(/L"(U#,%#_<PCH_/___X'$E````%M>PU93
+MBTPD#(M!&(M8"(MP#(M1$(7;=`J-1A`YPG(3ZP:0@_H/=@N%VW4..7$4<PF)
+M]L=!+/[___];7L.)]E575E.#[!2+7"0HBT,8BV@$BW`(BW@,:@#_,.C(=?__
+MB<&#Q!"%P'4+QT,L_O___^L_B?:%]G4<@^P,BT`$:@%7_W,<5?]Q"/^0E```
+M`(/$(.L>D(M#&(/`$(/L#(M1!&H`5U!5_W$(_Y*4````@\0@QT,P,'<'`(E;
+M-,=#.`````"#[`B-0S!0_W,(Z/S___^#Q!Q;7E]=PXUV`%575E.+7"04BW,8
+M@7L0KP```'8&@WL4`W<*QT,L_O___^MAD(!^`1!V'L=#+/[____K4<=#+/[_
+M___K2,=#+/S____K/XUV`+T`````@'X!`'8QD(GJ#[;"BWR&<%?H_/___X/$
+M!(7`=,E7Z/S___^#Q`2+`#M#"'7"18GH.$8!=]*)]EM>7UW#C78`5E.#[`2+
+M1"00BU@8O@````"`>P$`="&0@^P,_W2S<.C\____B00DZ.3L__^#Q!!&#[9#
+M`3GP=^"#Q`1;7L.)]H/L%(M$)!B+4`C'@D@!``#8'P<`B8),`0``QX)0`0``
+M`````(V"2`$``%"#PB12Z/S___^#Q!S#55=64XM<)!2+<QB#>Q`$?@:#>Q0#
+M=PG'0RS^____ZW16Z+YR__^#Q`0\`70)QT,L_O___^M>@'X-0'8<QT,L_O__
+M_^M/QT,L_O___^M&QT,L_/___^L]D+T`````@'X-`'8QB>H/ML*+?(9\5^C\
+M____@\0$A<!TS%?H_/___X/$!(L`.T,(=<5%B>@X1@UWTHUV`%M>7UW#C78`
+M5E.#[`2+1"00BU@8O@````"`>PT`="&0@^P,_W2S?.C\____B00DZ-#K__^#
+MQ!!&#[9##3GP=^"#Q`1;7L.)]H/L%(M$)!B+4`C'@D@!``"$'P<`B8),`0``
+MQX)0`0```````(V"2`$``%"#PB12Z/S___^#Q!S#55=64XM<)!2+0QB+,(UX
+M!(%[$+,```!V!H-[%`-W#<=#+/[____IC0```)!6Z/S___^#Q`2%P'4)QT,L
+M_O___^MV5NC\____@\0$BP`[0PAT"<=#+/S____K78!_`1!V&\=#+/[____K
+M3L=#+/[____K1<=#+/S____K/+T`````@'\!`'8QB>H/ML*+=(=P5NC\____
+M@\0$A<!TS5;H_/___X/$!(L`.T,(=<9%B>@X1P%WTHUV`%M>7UW#C78`5E.#
+M[`2+1"00BU@8@\,$O@````"`>P$`="*)]H/L#/]TLW#H_/___XD$).B4ZO__
+M@\001@^V0P$Y\'?@@\0$6U[#B?:#[!2+1"08BU`(QX)(`0``("$'`(F"3`$`
+M`,>"4`$```````"-@D@!``!0@\(D4NC\____@\0<PU575E.+7"04BT,8BS"-
+M>`2#>Q`(=@:#>Q0#=PS'0RS^____Z:0```!6Z/S___^#Q`2%P'4,QT,L_O__
+M_^F+````5NC\____@\0$BP`[0PAT"<=#+/S____K<E?H-'#__X/$!#P!=`G'
+M0RS^____ZUR`?PU`=AO'0RS^____ZTW'0RS^____ZT3'0RS\____ZSN]````
+M`(!_#0!V,(GJ#[;"BW2'?%;H_/___X/$!(7`=,U6Z/S___^#Q`2+`#M#"'7&
+M18GH.$<-=]*)]EM>7UW#C78`5E.#[`2+1"00BU@8@\,$O@````"`>PT`="*)
+M]H/L#/]TLWSH_/___XD$).A$Z?__@\001@^V0PTY\'?@@\0$6U[#B?:#[!2+
+M1"08BU`(QX)(`0``R"$'`(F"3`$``,>"4`$```````"-@D@!``!0@\(D4NC\
+M____@\0<PU93@^P$BUPD$(M#&(LP@WL0!W8&@WL4`W<*QT,L_O___^MMD%;H
+M_/___X/$!(7`=0G'0RS^____ZU96Z/S___^)PH/$!(L`.T,(=`G'0RS\____
+MZSN#>@P`=0:`>@@$=PG'0RS^____ZR:#>AS_=""#[`C_<AR+`O]P!.C\____
+M@\00A<!T"<=#+/____^)]H/$!%M>PXGV4X/L"(M$)!"+0!C_,.C\____B<.#
+MQ`2%P'1!@[AD`0```'0XBX!D`0``@W@$`'00@^P,_W`$Z"7H__^#Q!")]HN#
+M9`$``(-X"`!T'(/L#/]P".@)Z/__@\00ZPR#[`Q3Z/OG__^#Q!"#Q`A;PXUV
+M`(/L%(M$)!B+4`C'@D@!```P(@<`B8),`0``QX)0`0```````(V"2`$``%"#
+MPB12Z/S___^#Q!S#BT0D!(-X$`!X!H-X%"MW!\=`+/[____#4X/L"(M<)!#_
+M<QSHY+/__X/$!(7`=`?'0RS_____QT,P,'<'`(E;-,=#.`````"#[`B-0S!0
+M_W,(Z/S___^#Q!A;PY!64XM<)`R+0QB+,(-[$`AV!X-[%`!Y#9#'0RS^____
+MZS.-=@!6Z/S___^#Q`2%P'4)QT,L_O___^L:5NC\____@\0$BP`[0PAT"L=#
+M+/S___^-=@!;7L.04X/L$(M<)!B+2QA3#[9!"%"+002Z`````%)0_S'H_/__
+M_XD$)/]S#.CGTO__@\0H6\.)]E93BUPD#(M#&(LP@WL0"'8'@WL4`'\-D,=#
+M+/[____K,XUV`%;H_/___X/$!(7`=0G'0RS^____ZQI6Z/S___^#Q`2+`#M#
+M"'0*QT,L_/___XUV`%M>PY!3@^P0BUPD&(M+&%,/MD$(4(M!!+H`````4E#_
+M,>C\____B00D_W,,Z%O2__^#Q"A;PXGV5E.+7"0,BT,8BS"#>Q`(=@>#>Q0`
+M>0V0QT,L_O___^LSC78`5NC\____@\0$A<!U"<=#+/[____K&E;H_/___X/$
+M!(L`.T,(=`K'0RS\____C78`6U[#D%.#[!"+7"08BTL84P^V00A0BT$$N@``
+M``!24/\QZ/S___^)!"3_<PSHS]'__X/$*%O#B?964XM<)`R+0QB+,(-[$`UV
+M!X-[%`!Y#9#'0RS^____ZS.-=@!6Z/S___^#Q`2%P'4)QT,L_O___^L:5NC\
+M____@\0$BP`[0PAT"L=#+/S___^-=@!;7L.04X/L$(M<)!B+4QA3#[="#%#_
+M<@C_<@3_,NC\____B00D_W,,Z$?1__^#Q"A;PXGV5E.+7"0,BT,8BS"#>Q`-
+M=@>#>Q0`?PV0QT,L_O___^LSC78`5NC\____@\0$A<!U"<=#+/[____K&E;H
+M_/___X/$!(L`.T,(=`K'0RS\____C78`6U[#D%.#[!"+7"08BU,84P^W0@Q0
+M_W((_W($_S+H_/___XD$)/]S#.B_T/__@\0H6\.)]E93BUPD#(M#&(LP@WL0
+M#78'@WL4`'D-D,=#+/[____K,XUV`%;H_/___X/$!(7`=0G'0RS^____ZQI6
+MZ/S___^#Q`2+`#M#"'0*QT,L_/___XUV`%M>PY!3@^P0BUPD&(M3&%,/MT(,
+M4/]R"/]R!/\RZ/S___^)!"3_<PSH-]#__X/$*%O#B?964XM<)`R+0QB+,(-[
+M$`-V!X-[%`!Y#9#'0RS^____ZV.-=@!6Z/S___^#Q`2%P'4)QT,L_O___^M*
+M5NC\____B<*#Q`2+`#M#"'0)QT,L_/___^LO@'H(!'8B@[ID`0```'09BX)D
+M`0``@'AG`'4-BH))`0``@^`8/`AT!\=#+/[___];7L.055=64X/L#(M$)""+
+M0!C_,.C\____B[!D`0``C6Y0@\0$@'X4``^$`0$``(M.!(M&7(M68(M9&#'3
+M,T$4"<-U)(!^9@)U$H/L#%;HS=7__X/$$.GS`0``D(!^9@%U!L9&9@")]HM.
+M!(M&7(M68#M1&'(^=P4[011V-XM.!`^W1F2Z``````-!%!-1&#E68'(0=P4Y
+M1EQV"6:+?F3K;XUV`&:+?ER+1@1F*W@4ZU^-=@"+1@2+3ER+7F"+4!@QVHM`
+M%#'("<)U)0^W1F2Z`````%)04U'H_/___X/$$(G'9H7`=2EFBWYDZR.-=@`/
+MMT9DN@`````Y5F!R#7<%.49<<@9FBWYDZP5FBWY<D`^WQ[H`````BTY<BUY@
+M*<$9TXD,)(E<)`3ID@```(GVBTX$BT9<BU9@BUD8,=,S010)PW4C@'YF`W41
+M@^P,5NC,U/__@\00Z?(```"`?F8`=0;&1F8!B?:+1ER+5F")!"2)5"0$@'YF
+M`'0)@'YF`W4/C78`BT8$BT@4BU@8ZPJ0BT8(BT@4BU@8#[=&9+H``````T9<
+M$U9@.=IR$'<$.<AV"HG/9BM^7.L&B?9FBWYD9L=%"@``BP0DBU0D!(E%`(E5
+M!&:)?0B`?F8`=`:`?F8#=5_'1C0`````BT4`BU4$B48DB58H#[=%"+H`````
+M`T4`$U4$B48LB58PQT9`_#\'`(EV1,=&2`````"-1CB)1CB)1CS'1DP!````
+M@^P(C48D4/]V!.C\____@\00A<!U#(/L#%;HC=K__X/$$(/$#%M>7UW#B?96
+M4XM<)`R+0QB+,(-[$`-V!X-[%`!Y#9#'0RS^____ZT.-=@!6Z/S___^#Q`2%
+MP'4)QT,L_O___^LJ5NC\____B<*#Q`2+`#M#"'0)QT,L_/___^L/@'H(`70)
+MQT,L_O___XGV6U[#D(/L#(M$)!"+0!C_,.C\____@^P(4.C"X/__@\0<PXGV
+M@^P4BT0D&(M0",>"2`$``*@C!P")@DP!``#'@E`!````````C8)(`0``4(/"
+M)%+H_/___X/$',-64XM<)`R+0QB+,(-[$`-V!X-[%`!Y#9#'0RS^____ZT.-
+M=@!6Z/S___^#Q`2%P'4)QT,L_O___^LJ5NC\____B<*#Q`2+`#M#"'0)QT,L
+M_/___^L/@'H(`70)QT,L_O___XGV6U[#D(/L#(M$)!"+0!C_,.C\____@^P(
+M4.@"X/__@\0<PXGV@^P4BT0D&(M0",>"2`$``*@C!P")@DP!``#'@E`!````
+M````C8)(`0``4(/")%+H_/___X/$',-75E.+7"00BT,8BS"+>`2#>Q`'=@>#
+M>Q0`>0V0QT,L_O___^F4````5NC\____@\0$A<!U"<=#+/[____K?E?H_/__
+M_X/$!(7`=0G'0RS^____ZVA6Z/S___^)QE?H_/___XG"@\0(BP8[0PAT"<=#
+M+/S____K18L".T,(=`G'0RS\____ZS6+1@2`>`8`=".`>@@!=1V+1D0+1D!T
+M%8.^9`$```!T%8N&9`$``(!X9P!T"<=#+/[___^)]EM>7\-64X/L!(M$)!"+
+M0!B+6`3_,.C\____B<93Z/S___^)PX/L!%;HV][__XD<).C3WO__@\046U[#
+MD(/L%(M$)!B+4`C'@D@!```@)`<`B8),`0``QX)0`0```````(V"2`$``%"#
+MPB12Z/S___^#Q!S#5E.+7"0,BT,8BS"#>Q`'=@>#>Q0`>0V0QT,L_O___^M#
+MC78`5NC\____@\0$A<!U"<=#+/[____K*E;H_/___XG"@\0$BP`[0PAT"<=#
+M+/S____K#X!Z"`1W"<=#+/[___^)]EM>PY!64X/L!(M$)!"+0!B+6`3_,.C\
+M____B<:#Q`2#^PUU1(7`=%R#N&0!````=%.+@&0!``"#>`0`=`^#[`S_<`3H
+MZ-W__X/$$)"+AF0!``"#>`@`="R#[`S_<`CHS=W__X/$$.L<@_L!=`N#^P1T
+M!H/[!W4-D(/L#%;HK]W__X/$$(/$!%M>PXGV@^P4BT0D&(M0",>"2`$``#P4
+M!P")@DP!``#'@E`!````````C8)(`0``4(/")%+H_/___X/$',-64XM<)`R+
+M0QB+,(-[$%=V!X-[%`!Y#9#'0RS^____ZT>-=@!6Z/S___^#Q`2%P'4)QT,L
+M_O___^LN5NC\____B<*#Q`2+`#M#"'0)QT,L_/___^L3@'H(!'8&@WH,`'0'
+MQT,L_O___UM>PY"#[!B+1"0<BT`8_S#H_/___XD$).CGW/__@\0<PXUV`(/L
+M%(M$)!B+4`C'@D@!``!T)`<`B8),`0``QX)0`0```````(V"2`$``%"#PB12
+MZ/S___^#Q!S#5E.+7"0,BT,8BS"#>Q!#=@>#>Q0`>0V0QT,L_O___^M'C78`
+MA?9T0%;H_/___X/$!(7`=0G'0RS^____ZRI6Z/S___^)PH/$!(L`.T,(=`G'
+M0RS\____ZP^`>@@!=`G'0RS^____B?9;7L.0@^P4BT0D&(M0",>"2`$``'0F
+M!P")@DP!``#'@E`!````````C8)(`0``4(/")%+H_/___X/$',-64XM<)`R+
+M0QB+,(-[$`AV!X-[%`!Y#9#'0RS^____ZT>-=@"%]G1`5NC\____@\0$A<!U
+M"<=#+/[____K*E;H_/___XG"@\0$BP`[0PAT"<=#+/S____K#X!Z"`%T"<=#
+M+/[___^)]EM>PY"#[!2+1"08BU`(QX)(`0``E"4'`(F"3`$``,>"4`$`````
+M``"-@D@!``!0@\(D4NC\____@\0<PXM$)`2#>!``>`:#>!0`>0?'0"S^____
+MPX/L%(M$)!B+4`C'@D@!``"H+0<`B8),`0``QX)0`0```````(V"2`$``%"#
+MPB12Z/S___^#Q!S#BT0D!(-X$`!X!H-X%"MW!\=`+/[____#4X/L%(M<)!S_
+M<QSH$+'__X/$$(7`=`?'0RS_____QT,P,'<'`(E;-,=#.`````"#[`B-0S!0
+M_W,(Z/S___^#Q!A;PY"+1"0$@W@0`'@&@W@4?W<'QT`L_O___\-64X/L$(MT
+M)!R+7AQ3Z+*P__^#Q!"%P'0'QT8L_____\<#@````+D`````NE0```"-0RR0
+MB`A`2G7ZN@````"0BD03#(/@#P^VP(/H`X/X`G<%QD03+`9"@_H/?N/'1C`P
+M=P<`B78TQT8X`````(/L"(U&,%#_=@CH_/___X/$%%M>PY!64XMT)`R+7A@/
+MME,+P>()BTX0@'L,`G4+C4(0.<%R).L'B?:#^0]V&XM.%(![#`%U"HU"$#G!
+M<@OK%9"#^0]W#XUV`,=&+/[____K0XUV`/\SZ/S___^#Q`2%P'4)QT8L_O__
+M_^LI_S/H_/___XG"@\0$BP`[1@AT"<=&+/S____K#8!Z"`%T!\=&+/[___];
+M7L.04X/L"(M<)!"+0QC_,.C\____@^P$4U#H9`T``(/$&%O#C78`5E.+="0,
+MBUX8#[=3$,'B"8M.$(![$@)U"XU"%#G!<B3K!XGV@_D3=AN+3A2`>Q(!=0J-
+M0A0YP7(+ZQ60@_D3=P^-=@#'1BS^____ZT.-=@#_,^C\____@\0$A<!U"<=&
+M+/[____K*?\SZ/S___^)PH/$!(L`.T8(=`G'1BS\____ZPV`>@@!=`?'1BS^
+M____6U[#D%.#[`B+7"00BT,8_S#H_/___X/L!%-0Z*P,``"#Q!A;PXUV`%93
+MBUPD#(M#&(LP@WL0`W8'@WL4`'D-D,=#+/[____K,XUV`%;H_/___X/$!(7`
+M=0G'0RS^____ZQI6Z/S___^#Q`2+`#M#"'0*QT,L_/___XUV`%M>PY"#[!2+
+M1"08BU`(QX)(`0``C#$'`(F"3`$``,>"4`$```````"-@D@!``!0@\(D4NC\
+M____@\0<PU575E.+7"04BT,8#[8XC02]!````#E#$'(&@WL4`W<<QT,L_O__
+M_^M+QT,L_O___^M"QT,L_/___^LYD+T`````.?US+XUV`(M#&(MTJ`16Z/S_
+M__^#Q`2%P'3-5NC\____@\0$BP`[0PAUQD4Y_7+7C78`6UY?7<.-=@!55U93
+M@^P,BVPD((M%&(LXB?@E``$``(E$)`B!Y_\```"+11S'``````"^`````#G^
+M#X.1````D(M%&/]TL`3H_/___XG#@\0$@WPD"`!T-(-X#`!U'(/L"(!["`1W
+M!;@`````4%/H)=+__X/$$(3`=0J+51R-1@&)`NM,@WPD"`!U.9"#>PP`=2AF
+M]X-(`0``<`AU'8-['/]T(8/L"/]S'(L#_W`$Z/S___^#Q!"%P'0*BU4<C48!
+MB0+K#$8Y_@^"<____XUV`,=%,#!W!P");33'13@`````@^P(C44P4/]U".C\
+M____@\0<6UY?7<-55U93BUPD%(M#&`^V.(T$O00````Y0Q!R!H-[%`-W',=#
+M+/[____K2\=#+/[____K0L=#+/S____K.9"]`````#G]<R^-=@"+0QB+=*@$
+M5NC\____@\0$A<!TS5;H_/___X/$!(L`.T,(=<9%.?URUXUV`%M>7UW#C78`
+M5U93BWPD$(M'&(L`]L3_#Y3"#[;PA-)T0[L`````.?-].HGVBT<8_W28!.C\
+M____@\0$A<!T'8!X"`1V%X.X9`$```!U#H/L#%#HX=7__X/$$(GV0SGS?,N-
+M=@!;7E_#@^P4BT0D&(M0",>"2`$``%Q#!P")@DP!``#'@E`!````````C8)(
+M`0``4(/")%+H_/___X/$',-64XM<)`R+0QB+,(-[$`=W"\=#+/[____K,HGV
+M5NC\____@\0$A<!U"<=#+/[____K&E;H_/___X/$!(L`.T,(=`K'0RS\____
+MC78`6U[#D(/L#(M$)!"+0!B+$(!X!`%U%H/L#%+H_/___XD$).@EU?__@\00
+MB?:#Q`S#@^P4BT0D&(M0",>"2`$``-`H!P")@DP!``#'@E`!````````C8)(
+M`0``4(/")%+H_/___X/$',.+5"0$BT(8BP"#>A`#=@R-!(4$````.4(4<P?'
+M0BS^____PY!55U93@>R<````BZPDL````(M%&(L`B40D#,=$)`0`````OP``
+M``"+11R#P`2)1"0(BS4`````A?9T4I"+7@B%VW1$D(/L"(M3!(U$)!A0_W,(
+M_U(<@\00@'PD(P!T(CEU"'4<BU0D"(DZ@\($B50D"/]$)`2+1"0,.40D!',.
+MD$>+&X7;=;V+-H7V=:^+11R+5"0$B1#'13`P=P<`B6TTQT4X`````(/L"(U%
+M,%#_=0CH_/___X'$K````%M>7UW#C78`4X/L"(M<)!"+0QB*`(-[$`)V"8-[
+M%`!Y#XUV`,=#+/[____K/XUV`(/L"&H`#[;`4.AV6___B<*#Q!"%P'0)BT`$
+M@WA\`'4,QT,L_O___^L3C78`BT(,.T,(=`C'0RS\____D(/$"%O#C78`@^P4
+MBT0D&(M("(N12`$``(E0*,=`,#!W!P")0#3'0#@`````@\`P4%'H_/___X/$
+M',.)]E.#[`B+7"00BT,8BA"`>`(#=2$/MD`$B40D!(/L"(U$)`Q0#[;"4.C@
+M6O__B<&#Q!#K/)"`>`($=2(/MD`!B00D@^P(C40D"%`/ML)0Z)I;__^)P8/$
+M$.L6C78`@^P(:@`/ML)0Z*):__^)P8/$$(M3"(M#*(F"2`$``(M#"(F83`$`
+M`(M#",>`4`$```````#'0R@P<P<`@^P(BT$$4_]Q"/]0?(/$&%O#B?964XMT
+M)`R+7AB+5A"`>P0"=0Z+0QB#P!PYPG(HZP>)]H/Z&W8?BU84@'L$`74.BT,8
+M@\`(.<)R#.L6B?:#^@=W#XUV`,=&+/[____K0XUV`/\SZ/S___^#Q`2%P'4)
+MQT8L_O___^LI_S/H_/___XG"@\0$BP`[1@AT"<=&+/S____K#8!Z"`%T!\=&
+M+/[___];7L.04XM<)`R+1"0(BU`LBTH8N`````"#?"00`'0K@'D$`74+BT(<
+M@\`(B4,(ZPF+0AB#P!R)0PB+01B)`\=#!`$```"X`0```%O#5E.#[`2+3"00
+MBUDLBW,<@'E>`70&@'E*`'0UQT,L`````(I!2H@&A,!T"0^V04F)1@3K!HM!
+M3(E&!(-[(`!T%XM3((M&!(/`"(D"ZPJ-=@#'0RS_____@^P,4>C\____QT,P
+M,'<'`(E;-,=#.`````"#Q`B-0S!0_W,(Z/S___^#Q!1;7L.)]E=64XM\)!"+
+M=QC_-NC\____B<.#[`3_<"#_,.C\____B<*#Q!"%P'4OQT<L_?___\=',#!W
+M!P")?S3'1S@`````@^P(C4<P4/]W".C\____@\00ZVF-=@")>"R)6"C&0%P"
+M@'X$`74(@$A=`NL.B?:`?@0"=0:`2%T$B?:-1@B)0E"*1@>(0DB+1AB)0DR*
+M1Q2#Z`B(0DF$P'0)BT<<@\`(B4)4QT)DI'0'`,=":.QT!P"#[`Q2Z/S___^#
+MQ!!;7E_#B?975E.+?"00BW0D%+N@&```@SV@&```_W0?H:`8```[1@QT$)"#
+MPQ2#._]T#(L#.T8,=?&#._]U%L=&+/[___^#[`Q6_U8H@\00Z:8```#'1BP`
+M````@^P,5O]3!(/$$(-^+`!T#X/L#%;_5BB#Q!#I@````("_A`$#``!UNX-[
+M$`!U9H._*`$```!T%8V'0`$``(M0!(EP!(D&B58$B3+K4XFW*`$``(-["`!T
+M/,>'+`$```$```"+0PR)AS`!``")MS0!``#'AS@!````````@^P,5O]3"/^/
+M+`$``(/$$(._+`$```!U"X/L#%;_4PR#Q!"06UY?PU93@^P$BW0D$(M>"#FS
+M*`$``'4\QX,H`0```````(V#0`$``#F#0`$``'0DBX-``0``BT@$BQ")2@2)
+M$8D`B4`$@^P(4%/HO?[__X/$$(GV@^P,5O]6*(/$%%M>PXUV`%.#[`B+7"00
+MBTPD%(E9"(-Y(`!T"(M1((M!%(D"@^P(45/H@?[__XD<).C\____@\086\.+
+M1"0$BX!8`@``PY!64X/L-(I<)$"+="1$N0````"Z+````(G@C78`B`A`2G7Z
+MB%PD"(#[!W46@WX,`'0-BT8,BX!8`@``B40D#(MV)(#[!G0/@/L$=`J`^P5T
+M!8#["'4.]H9(`0```70%QD0D#`&`^QQU((N&3`$``(N64`$``(E$)`R)5"00
+M9HN&%`(``&:)1"04@/L#=3B#?A``=#*+3A"*05R(1"0,@'E<`'4BBT%(BU%,
+MB40D$(E4)!0/MT%0B40D&(I!7=#H@^`!B$0D#8N&6`(``(E$)`2)X%#H_/__
+M_X/$.%M>PXUV`%=64X/L((MT)#"+7BR+?BB!>PQ"_P``=4.+4QR*1E.(0@]F
+MBT9,9HE""&:+1DYFB4(*9HM&4&:)0@R*1E*(0@YFBT9(9HE"!&:+1DIFB4(&
+M9HM&5&:)0A#K.XGVBU,<BD93B$(*9HM&3(A"!F:+1DZ(0@=FBT90B$((BD92
+MB$()9HM&2(A"!&:+1DJ(0@5FBT94B$(+@'Y>`75AQT,L`````(%[#$+_``!U
+M"8M#&(!X#_)T$H%[#!C_``!U1HM#&(!X"O)U/8/L"(M74(U$)`A0_W=<_U(\
+MBT0D*(/$$/:```$```1T'("@``$``/N#[`Q7Z/S___^#Q!#K!\=#+/____^#
+M[`Q6Z/S____'0S`P=P<`B5LTQT,X`````(/$"(U#,%#_<PCH_/___X/$,%M>
+M7\.05U93@>RX````B[PDR````(MW*(M>6(M64(V$))@```!0_W9<_U(\@\0(
+MBU,$C40D&%#_<PC_4AR-1"0<4(U$)!Q0C40D'%!3Z/-5__\/MH0DO````(/$
+M(/:$))H````"=`8#1"0,ZP0#1"0(@']>`74B@^P$4/]T)`QHL`H``.C\____
+M@\005FH;Z/S___^#Q`CK((/L!%#_="0,:-@*``#H_/___X/$$%9J&NC\____
+M@\0(@^P(_W<LBP:#P%!0Z/S___^)/"3H_/___X'$P````%M>7\.055=64X/L
+M%(M\)"B+;"0L_W<@_S?H_/___XG#@\00A<!U,L=%+/W____'13`P=P<`B6TT
+MQT4X`````(/L"(U%,%#_=0CH_/___X/$$.GK`0``C78`B7@HQD!<`X%]#$+_
+M```/E,`/MO"%]G00BT48@'@/]`^4P`^VP.L.D(M%&(!X"O0/E,`/ML"%P`^$
+MOP```(/L#(L'@\!04.C\____B<>#Q!"%P'04A?9T"(M%&(/`%.M`BT48@\`0
+MZSC'12S_____QT4P,'<'`(EM-,=%.`````"#[`B-13!0_W4(Z/S___^)'"3H
+M_/___X/$$.E)`0``D(/L!&@``@``4%?H_/___X/$"(E[+(!+702)>UC&0U/T
+M9L=#5`$`QT-HY'D'`,=%+`````#'13`P=P<`B6TTQT4X`````(U%,%#_=0CH
+M_/___X/$$.GC````C78`A?9T:(M5&(!Z$@%U#X!+70*+11R#P!2)0UCK$(!Z
+M$@)U"H!+702-0A2)0UB*0@^(0U-FBT((9HE#3&:+0@IFB4-.9HM"#&:)0U"*
+M0@Z(0U)FBT($9HE#2&:+0@9FB4-*9HM"$&:)0U3K;(GVBU48@'H,`74/@$M=
+M`HM%'(/`$(E#6.L0@'H,`G4*@$M=!(U"$(E#6(I""HA#4V8/MD(&9HE#3&8/
+MMD('9HE#3F8/MD((9HE#4(I""8A#4F8/MD($9HE#2&8/MD(%9HE#2F8/MD(+
+M9HE#5(EK+,=#:+!X!P"#[`Q3Z/S___^#Q!"#Q`Q;7E]=PXM$)`BB`````,.)
+M]E.+3"0(BUPD#(M1#(U!##G0=">)P8UV`(V"V/W__X!X"`%U$/:`'`(```%T
+M!X7;=`Y+B?:+$CG1==ZX`````%O#C78`5E.#[!"+="0<BUXL_W,(_U,$@\0(
+M4XL&!;````!0Z/S___^)-"3H_/___X/$%%M>PXUV`(/L#(M4)!"+0BS_"(,X
+M`'4KQT(44'T'`(E2&,="'`````"#[`B-0A10BP*#P"Q0Z/S___^#Q!#K#XUV
+M`(/L#%+H_/___X/$$(/$#,-75E.+3"00BT$HBY!D`0``.4($=0>+>@CK!8GV
+MBWH$A?]T7?:''`(```%T5(MQ+(I97<#K!(/C`X/L#%'H_/___X/$"/]W(/\W
+MZ/S___^)P<'C!(I`78/@SPG8B$%=B7DHQD%<!(EQ+,9!7@#'06B$?0<`B0PD
+MZ/S___^#Q!#K#(/L#%'H*____X/$$%M>7\-64X/L#(MT)!B+7"0@_P/_=B#_
+M-NC\____B<&#Q!"#?"04`1G`@\`"@^`#P>`$BE%=@^+/"<*(45V)<2C&05P$
+MB5DLQD%>`(!^"`1V$X.^9`$```!T"L=!:-!]!P#K")#'06B$?0<`@^P,4>C\
+M____@\0$_S;H_/___X/$%%M>PU575E.#[!B+;"0LC86P````4.C\____B<:#
+MQ!"%P'4@@^P,:#T#``#H_/___X/$!/]T)#3_5"0T@\00ZW>-=@#'``$```"+
+M1"0DB48$BT0D*(E&",=&#`````");A"+70R-10PYV'0EB<>)]HV#V/W__X-X
+M'/]T#X/L!%9J`%#H_/[__X/$$(L;.=]UW_\.@SX`=2"#[`A6C86P````4.C\
+M____@\0$_W0D-/]4)#2#Q!")]H/$#%M>7UW#55=64X/L&(M\)"R+;"0TC8>P
+M````4.C\____B<:#Q!"%P'4<@^P,:%4#``#H_/___XDL)/]4)#2#Q!#K=XUV
+M`,<``0```(M$)"2)1@2);@C'1@P`````B7X0BU\,C4<,.=AT+8V#V/W__X!X
+M"`%U&/:`'`(```%T#X/L!%9J`5#H/_[__X/$$(L;C4<,.=AUT_\.@SX`=1R#
+M[`A6C8>P````4.C\____B2PD_U0D-(/$$(GV@\0,6UY?7<-55U93BVPD%(MT
+M)!B+C5`"``"%R70UB?:+`8M1!#M6#'<B<@4[1@AS&XM!"(M1##M6!'(0=P0[
+M!G8*N`$```#IOP```(M)$(7)=<V+G3`"``"-A3`"```YV'1'B<>-=@"-2_2`
+M>5P`=3,/MT%0N@`````#04@344PY5@1W'W($.09S&8M&"(M6##M13'(.=P4[
+M04AV![@!````ZV>+&SG?=;Z+G3@"``"-A3@"```YV'1,B<>-2_2`>5P`=`>`
+M>5R`=360#[=!4+H``````T%($U%,.58$=R!R!#D&<QJ+1@B+5@P[44QR#W<%
+M.T%(=@BX`0```.L,D(L;.=]UMK@`````6UY?7<-64XMT)`R+7"004U;HY_[_
+M_X/$"(7`="R#>QP`=!^)V8V65`(``(.^5`(```!T#)"+`HU0$(-X$`!U]8D*
+MN/_____K%(N&4`(``(E#$(F>4`(``+@`````6U[#D%575E.+;"04BUPD&(V5
+M4`(``#F=4`(``'0,B?:+`HU0$#E8$'7VBT,0B0+'0Q``````C7L4B[5,`@``
+M.7L4=!B+0Q2+3P2+%HEP!(D&B1&)2@2)>Q2)?P2+10#'0#0!````6UY?7<.0
+M4X/L"(M4)!"+0BC_@"`"``")TX-Z/`!T,HM"/,=`'`````"+0CR)4""+0CS'
+M0"0`````_W(\_W(HZ/S___^#Q`B%P'42BT,\B4,X@^P,4^C\____@\00@\0(
+M6\-55U93BWPD&(M?2(MW3`^W5U"Y``````':$?&+;"04BX50`@``A<!T2HUO
+M#/9'74!T!H-X*`!T-#E'.'0O.4@$=RIR!#D0<R0Y<`QR'W<%.5@(=AB#P!2+
+M4`2):`2)1PR)502)*K@!````ZV&+0!"%P'6Y@W\X`'5/]D==0'5)BVPD%(N%
+M5`(``(7`=#N-;PPY2`1W*W($.1!S)3EP#'(@=P4Y6`AV&8/`%(M0!(EH!(E'
+M#(E5!(DJN`$```#K#I"+0!"%P'7)D+@`````6UY?7<.)]E=64XM\)!"+=RB`
+M?UP`#X6@````5U;H$?___X/$"(7`#X5*`0``@'X(!`^&A````(.^9`$```!T
+M*8N&9`$``(!X9P!U'?9'70AU%X/L#%?H:`<``(/$$(7`#X41`0``BW<H@'X(
+M!'9,]D==!'1&BH9)`0``J"!T/(/@WXB&20$``.C\____B48H@(Y(`0``!(L'
+MQX"(`0,``0```(M..(M>/(G("T9`B=H+5D2)1CB)5CR)]HV.,`(``#F.,`(`
+M`'4FBP?'0#0!````C4<,BY8P`@``B4($B5<,B4@$B88P`@``Z8@```"#?S0`
+M=4*+CC0"``"-6?2#>S0`>1>-1PR+402)002)3PR)4`2)`O]#-.M=D(U'#(V6
+M,`(``(M*!(E"!(E7#(E(!(D!ZT.-=@"#?S0`?B"-1PR-CC`"``"+EC`"``")
+M0@2)5PR)2`2)AC`"``#K&HU'#(V6,`(``(M*!(E"!(E7#(E(!(D!C78`6UY?
+MPU93@^P$BUPD$(MT)!3V@QP"```!=3;&1EX"_X,D`@``C48,C9,X`@``BTH$
+MB4($B58,B4@$B0&#[`Q6Z/S___^X`````(/$$.M?B?:#NR0"````=`N+@T0"
+M```[1C1_1/:#'`(``!AU.XM&-(F#1`(``/^#)`(``(U6#(V#.`(``(M(!(E0
+M!(E&#(E*!(D1@^P,BT,$5O]0(+@`````@\00ZP:0N`$```"#Q`1;7L.0BU0D
+M!(M,)`B#.@!U!XE*!(D*PY"+0@2)2`B)2@3#B?;_="0(BT0D"(/`+%#H_/__
+M_X/$",.-=@!55U93@^P<BT0D,(/`+(E$)!"+5"0P@\(<B50D#(M,)##'030`
+M````ZPV)]H/L#/]P!/\0@\00BT0D$(L0.U`$=1+'0`0`````QP``````ZPR-
+M=@"+0@B+3"00B0&%TG0'QT((`````(G0A=)UOL=$)!0`````BT0D,(M`#(E$
+M)!B+1"0P@\`,.T0D&`^$=0$``(MT)!B![B@"``"#OB`"````=0GVAAP"```@
+M=`C'1"04`0```(V^,`(``.LNB?:#[`A35NA._O__@\00A<!T&XU##(N6,`(`
+M`(E"!(E3#(EX!(F&,`(``.LHD+@`````.;XP`@``=!2+!XM(!(L0B4H$B1&)
+M`(E`!(/H#(G#A<!UK8VN2`(``.M'D(G?@WL\`'0RBT,\QT`<`````(M#/(E8
+M((M#/,=`)`````#_<SS_<RCH_/___X/$"(7`=1*+0SR)0SB#[`Q7Z/S___^#
+MQ!"X`````#FN2`(``'05BT4`BT@$BQ")2@2)$8D`B4`$@^@,B<.%P'62@[Y4
+M`@```'1;C;Y4`@``BYY4`@``A=MT2Y!35NC]^/__@\0(A<!T!HU[$.LQD(M#
+M$(D'BX90`@``B4,0B9Y0`@``C4,<4/]T)!3H_/___XM4)#C'0C0!````@\0(
+MD(L?A=MUMHM,)!B+"8E,)!B+1"0P@\`,.<@/A8O^__^#?"04``^%G0```(M$
+M)#"#N(@!`P``=!;'@(@!`P``````@^P,4.C\____@\00BUPD,(/#).L+@^P,
+M_W`$_Q"#Q!"+$SM3!'4/QT,$`````,<#`````.L%BT((B0.%TG0'QT((````
+M`(G0A=)UR8MT)`SK#(/L#%/H_/___X/$$+@`````BU0D,#ER''04BP:+2`2+
+M$(E*!(D1B0")0`2#Z`R)PX7`=<R+3"0P@WDL``^%8/W__X-Y-``/A5;]__^#
+MQ!Q;7E]=PY!64X/L!(MT)!"+'H-[)`!U#X/L#%;H_/___X/$$.L5D(U&#(U3
+M'(M*!(E"!(E6#(E(!(D!@^P,4^C\____@\046U[#D%.#[`B+7"00BT-`A<!T
+M$\=#0`````"#[`C_<T13_]"#Q!"+0VB)0Q2)6QC'0QP`````C4,44(L#@\`L
+M4.C\____@\006\.)]E93@^P0BUPD'(MS*%/H_/___X/$$(U##(M(!(M3#(E*
+M!(D1B4,,B4`$_XXD`@``_XX@`@``@WL\`'0-_W,\5NC\____@\0(D(/$!%M>
+MPXGV55=64X/L'(M$)#"+3"0XBU`LBUI@BWA(*WI(P><)#[=H4,'E"87;=`^*
+M0EV#X`%F#[;`9CG(=2>+7"0T@WID`'03@^P$4?]T)#Q2_U)D@\00A<!U"K@`
+M````Z8<```"^`````(L#B<(Y^'<.`=:#PQ"+$XT$%CGX=O(I]XG^QT0D#```
+M``")]HM,)`S!X02)\+H``````T,($U,,BWPD-(E$.0B)5#D,BP,I\(D$.3GH
+M<QB#PQ"^`````,=$.00`````*<7_1"0,Z[V+1"0,P>`$BU0D-(DL$,=$$`0!
+M````N`$```"#Q!Q;7E]=PXGV55=64X/L#(MT)""+7BR+;BB+O60!``!FBT-0
+M9BM&4&:)1"0*@'Y>`75BBT9(BU9,BTM,,=$S0T@)P750N0````"+5B"+1B2%
+MTG0'D(@(0$IU^CEO!'4%BT<(ZP.+1P2)1BB+1UR+5V")1DB)5DQFBT0D"F:)
+M1E#&1EX`@^P,5NC\____@\00ZS.-=@#&0UP`BD9>B$->@^P(5O]S!.C\____
+MBT,$_T@(BT<$_X`D`@``B1PDZ/S___^#Q!"#Q`Q;7E]=PU575E.#[!R+;"0P
+MBWTHBX=D`0``B40D%(M52(M-3(E4)`B)3"0,#[=54+D``````U0D"!-,)`S'
+M1"00`````+@`````@7UH3(H'``^$:P$``+@`````BUPD%#E[!`^%60$``(M$
+M)!2`>!0`=":+7"0,.5A@=PMR5XM<)`@Y6%QV3HM$)!0Y2&!W.W)F.5!<<F'K
+M,HM<)!0Y2V!R!W<Q.5-<<RR+5"0,BT0D%#E08'(5=PF+7"0(.5A<=@K'1"00
+M`0```.LMN`````#I[0```(M4)!2+0@B)12C_CR`"``"+0@C_@"`"``"X````
+M`.G*````BT4$_T`(@^P,_W4$Z/S___^)QXM%`(D'BT4$B4<$BT4TB4<T@\00
+M@WPD$`!T"8M,)!2+00CK!XM<)!2+0P2)1RB);RS'1V1<B0<`QT=H3(H'`(M$
+M)`B+5"0,B4=(B5=,BU0D%&:+0EQF*T0D"&:)1U#'1V``````QD=>`(I%78A'
+M78-].`!T"(M%.(E'..L'QT<X`0```(U%#(M,)!2+402!PC@"``"+2@2)0@2)
+M50R)2`2)`<9%7("#[`Q7Z/S___^X`0```(/$$(/$'%M>7UW#55=64XMT)!2+
+M?"08O0````")^`GP=!Z018GQB?N#P?^#T_^)\"'(B?HAVHG&B=>)T`GP=>.)
+MZ%M>7UW#55=64XMT)!2+;@R+1CP+1CAU&?:&2`$```)T$(M&!(!X!P%U!P^V
+M>`;K!I"_`````(M&0(M61(G!"TXXB=,+7CQ34>C\____`<>+1@0/MD`&@\0(
+M.?A]#("F'`(``/[I@````(".'`(```&+1CB+5CR)T0G!=&V)P3-.0(G3,UY$
+MB=@)R'5%@*9(`0``_>M4N`$```"Z``````^EPM/@]L$@=`>)PK@`````]]#W
+MTB-%0"-51(E%0(E51(/L#%7H_/___X/$$.M#C78`BT8X(<B+5CPAVHG1"<%T
+M"(".2`$```*0]H8<`@```70?A>UT&[``@'TP`'83C78`#[;(.72-2'2+0#A%
+M,'?QD%M>7UW#C78`55=64X/L#(ML)""+=0RY`````+L`````#[9&,+H`````
+M@_H`=P:#^`!V()`Y;(Y(=!F#P0&#TP`/MD8PN@`````YVG(&=^4YR'?AN`$`
+M``"Z``````^EPM/@]L$@=`>)PK@`````B<&)TXM&0`G(BU9$"=J)1D")5D16
+MZ/S___^#Q`3VAAP"```!#X4'`0``@WX,`'02@^P,BT8,BT`$5O]0)(/$$.L,
+M@^P,5NC\____@\00N0````"[``````^V1C"Z`````(/Z`'<(@_@`=G2-=@"+
+M5(Y(A=)T4/:"'`(```%T1X!Z"`1V00^VND@!``")^(/@CXB"2`$``#GJ=0V)
+M^(/@C(B"2`$``.L>]H)(`0```705BH)(`0``@^#^@\@"B()(`0``C78`@\$!
+M@],`#[9&,+H`````.=IR!G>3.<AWCX.^9`$````/A)L!``"+AF0!``"#>`0`
+M#X2+`0``@W@(``^$@0$``#EP!'4%BW`(ZPF+AF0!``"+<`2`IAP"``#^@^P,
+M5NC\____@\00Z58!``"]`````(J&2`$``(/@OXB&2`$``*@@=!V#R("(AD@!
+M``#'ADP!````````QX90`0````````^VOD@!``")^(/@_HB&2`$``(M.0(M>
+M1(G(]]")VO?2(T8X(U8\B=$)P74+B?B#X.R(AD@!``"#?@P`='B+?@R`IT@!
+M``#^N0````"[``````^V1S"Z`````(/Z`'<%@_@`=E&+5(](A=)T,/:"'`(`
+M``%T)X!Z"`1V(?:"2`$```%T&(J"2`$``(/(`H/@KHB"2`$``+T!````D(/!
+M`8/3``^V1S"Z`````#G:<@9WLSG(=Z^#OF0!````=36#?@P`=`R+1@R#N&0!
+M````=2.#?AP`>0^#?@P`=!>+1@R#>!P`>`Z#[`AJ`%;H_/___X/$$/:&2`$`
+M``1T#H/L#%;H_/___X/$$.L0A>UT#(/L#%;H_/___X/$$(".20$``""#Q`Q;
+M7E]=PXUV`%575E.#[!2+;"0LBU0D,(T$4@^V1,4A4/]T)"SH_/___XE$)!B#
+MQ!"X`````(-\)`@`#X17`0``BTPD"("A'`(``/Z*11>(@1T"``")SX/')(M%
+M!(E!)(N%Q@```(E'"(J%Q0```(A'$(M$)"B-'$"-7-T`C7,0BE85P.H"@^(!
+MBH<D`0``@^#^"="(AR0!``"+0RF+4RV)AR@!``")ERP!``"+5"0HBX25O0``
+M`(E'!(I#)(A'#0^VR+@!````T^!FB4<.BT8)BU8-BTPD"(E!%(E1&(I#(HA'
+M#+C_____NO____^`?PP_=R4/MD\,N`$```"Z``````^EPM/@]L$@=`>)PK@`
+M````@\#_@]+_B4<<B5<@BT5)B8<P`0``BT5-B8<T`0``BT51B8<X`0``BT55
+MB8<\`0``BT59B8=$`0``BX6=````B8>(`0``BX6A````B8>,`0``BX6E````
+MB8>0`0``BX6I````B8>4`0``C9=(`0``C45=@^P$:D!04NC\____BT0D&(/$
+M$(/$#%M>7UW#D%575E.![#0"``"+A"1(`@``BP")1"0@:@&-5"0L4FH!BXPD
+M5`(``/]Q+/]Q*/]Q).C\____@\0@@7PD(/06>%IU&8/L"&@``@``C40D+%#H
+M_/___X/$$(3`=`VZ_____^DW!P``C78`@^P,C50D+%+H_/___X/$$+K_____
+M@'PD000/AA0'``"`?"1"0'<'@'PD6D!V"KK_____Z?P&```/MT0D1[H`````
+MBXPDS0````G!B4PD$(N,)-$````)T8E,)!2+3"08BU$,B<B#P`PYT`^$X0``
+M`(V"V/W__XE$)!R`>`@$#X:\````@W@,``^%L@```(G!BT`D.T0D)`^%HP``
+M`+,`]H$<`@```70KBT0D$`M!.(M4)!0+43Q24.C\____BTPD)(M1!`^V4@:#
+MQ`@YT'X$LP'K5H!\)#@!=D\/MD0D0XM4)!R+;()(A>UT/O:%'`(```%T-0^W
+M1"1?N@`````+A"35````"Y0DV0````M%.`M5/%)0Z/S___^+500/ME(&@\0(
+M.=!^`K,!A-MT2X/L#/]T)"CH_/___X/$$.L3B?:+$HM$)!B#P`PYT`^%'___
+M_X/L!&H`C4PD*%'_="0DZ)S\__^)1"0L@\00NO____^%P`^$O`4``(ML)!R#
+MQ22*A20!``"(P=#IBE0D18/B`0G*@^(!T>*#X/T)T(B%)`$``(MU%(M]&(!]
+M##]W1@^V30RX`0```+H`````#Z7"T^#VP2!T!XG"N`````"#P/^#TO\C1"00
+M(U0D%(GQ"<&)^PG3ZQN-=@")G4`!``#IF````)"+3"00"?&+7"04"?N)312)
+M71@/MI4D`0``@^(!BD0D1<#H`H/@`3G"=">*E20!``"#XOZ(E20!``"+3"0<
+MBT$$@'@&`'0+B-"#R`*(A20!``"#?"0H``^$4`$``("-)0$```2+G4`!``"%
+MVP^%M0```(M$)!B+4!2#P!0YT'08B<&-6O2+0O0[1"0H#X1C____BQ(YT77J
+M@[U``0````^%@@```(/L#(M$)"2#Z(!0Z/S___^)A4`!``")PX/$$+K_____
+MA<`/A'0$``"Y`````+IH````BX5``0``B`A`2G7ZC5,,BT0D&(/`%(M(!(E0
+M!(E##(E*!(D1BT0D*(D#BT0D+(M4)#")0UR)4V"*1"0TB$-F]D0D-@)T"HN%
+M0`$``,9`%`&`>Q0`=!J+0UR+4V`[5"0P=R)R!CM$)"QW&H![%`!U*8M#7(M3
+M8#M4)#!R"'<;.T0D+',5BT0D+(M4)#")0UR)4V"*1"0TB$-F]D0D-@1T#X-[
+M"`!U%HM4)!R)4PCK#8-[!`!U!XM,)!R)2P2+0P0[0PAU$L=#!`````"Z____
+M_^F5`P``D(M%!#N$)-T```!T'8"-)`$```+'A2@!````````QX4L`0``````
+M`.LOBX4H`0``BY4L`0``.U0D37(==P8[1"1)=A6+1"1)BU0D38F%*`$``(F5
+M+`$``)#V1"0V`70+BT0D'("('`(```**7"1#@'PD.`$/AB0"```/ML.+;(4D
+MA>UU,X/L!&H!C50D*%+_="0DZ,GY__^)Q8/$$+K_____A<`/A.L"``"+3"0<
+MB4@,#[;#B6R!2/9$)#8!=`>`C1P"```"BI5(`0``B-'0Z8I$)%V#X`$)R(/@
+M`='@@^+]"<*(E4@!```/MTPD7[L`````BX0DU0````G(BY0DV0````G:B<:)
+MUX!],#]W/0^V13")1"0,N`$```"Z`````(I,)`P/I<+3X/;!('0'B<*X````
+M`(G!B=.#P?^#T_^)\"'(B?HAVHG&B=>+13@)\(M5/`GZB44XB54\#[:52`$`
+M`(/B`8I$)%W`Z`*#X`$YPG0CBI5(`0``@^+^B)5(`0``BT4$@'@&`'0+B-"#
+MR`*(A4@!``"*7"1;#[;#NO____^#?(5(``^%YP$```^VPXN4)$`"``")5(5(
+MB6H,BT4H.X0DX0```'0=@(U(`0```L>%3`$```````#'A5`!````````ZRZ+
+MA4P!``"+E5`!```[5"1E<AQW!CM$)&%V%(M$)&&+5"1EB85,`0``B950`0``
+MN`$```"Z`````(C9#Z7"T^#VPR!T!XG"N`````#WT/?2(T5`(U5$B45`B55$
+M5>C\____@\0$]H5(`0``$'09QX5,`0```````,>%4`$```````#IRP```(J%
+M2`$``*@@#X2]````@\B`B(5(`0``QX5,`0```````,>%4`$```````#IFP``
+M``^VRXN4)$`"``"+1"0<B52(2(E"#+@!````N@`````/I<+3X/;!('0'B<*X
+M`````/?0]]*+3"0<(T%`(U%$B4%`B5%$4>C\____@\0$BT0D'/:`2`$``!!T
+M%L>`3`$```````#'@%`!````````ZRN+5"0<BH)(`0``J"!T'8/(@(B"2`$`
+M`,>"3`$```````#'@E`!````````BTPD'/:!'`(```%T1X.Y9`$```!T/HN!
+M9`$``(-X!`!T,H-X"`!T+#E(!'4)BT`(B40D'.L1BU0D'(N"9`$``(M`!(E$
+M)!S_="0<Z/S___^#Q`20N@````"-=@")T('$+`(``%M>7UW#C78`4XM<)`B+
+M4PRQ`(!Z,`!V#P^VP3E<@DAT"T$X2C!W\;C_````6\.)]E575E.![`P"``"+
+MK"0@`@``OP````")YHM%)/:`'`(```$/A)4"``"+70R%VW0+@WL,`'0%B=^+
+M6PRY`````+H``@``B?")]H@(0$IU^L<&]!9X6K@`````A=MT`XM#)(E&!+@`
+M````A=MT`XM#+(F&Q@```/:%'`(```)T!(!.%@&P`(7;=`B#_P$9P(/``HA&
+M&(7;#X1=`0``@[MD`0```'0]BXMD`0``BP&)1@B+05R+46")1@R)5A"*012#
+MX`'1X(I6%H/B_0G"B%86.5D(=0B(T(/(!(A&%HI!9HA&%(I#-(B&Q0```(J#
+M'0(``(A&%XM#%(M3&(E&&8E6'8I#"(A&(8I#,(A&(HGXA?]U`HGH4.B__O__
+MB$8CBD,QB$8D#[:#2`$``(/@`<'@`HI6)8/B^PG"B%8E@\0$]H-(`0```G0(
+MB-"#R`&(1B6+0SB+4SR)AJT```")EK$```!FBT,X9HE&)XN#3`$``(N34`$`
+M`(E&*8E6+8M#*(F&O0```(N#5`$``(E&28N#6`$``(E&38N#7`$``(E&48N#
+M8`$``(E&58N#:`$``(E&68N#K`$``(F&G0```(N#L`$``(F&H0```(N#M`$`
+M`(F&I0```(N#N`$``(F&J0```(U678V#;`$``(/L!&I`4%+H_/___X/$$(7_
+M#X2(````BT<4BU<8B48QB58UBD<(B$8YBD<PB$8Z5>BZ_?__B$8[BD<QB$8\
+M#[:'2`$``(/@`<'@`HI6/8/B^PG"B%8]@\0$]H=(`0```G0(B-"#R`&(1CV+
+M1SB+5SR)AK4```")EKD```!FBT<X9HE&/XN'3`$``(N74`$``(E&08E618M'
+M*(F&P0```(/L#%;H_/___X/$"&@``@``5NC\____]]B(1A6#Q`AJ`%9J`?]U
+M+/]U*/]U).C\____@\0@@<0,`@``6UY?7<-3@^P4BUPD'%/H*OW__XM#)(/$
+M$/9`3!!T#H/L#%#H_/___X/$$(GV@\0(6\.-=@!64X/L!(MT)!"`?@@$=@>`
+MID@!``#[]H8<`@```71M@'X(!'9:NP````"`?C``=%R#?)Y(`'0]BTR>2(J6
+M'`(``(/B`HJ!'`(``(/@_0G0B($<`@``BU2>2(!Z"`1V!HI&-(A"-(/L#/]T
+MGDCH_/___X/$$$,/MD8P.=A_L^L-@^P,5NA(____@\00D(/$!%M>PXGV5U93
+MBUPD$(-[#`!T#(UV`(M;#(-[#`!U]^C\____B4,DB[MD`0``A?]T-CE?!'4(
+MBW<(ZP:-=@"+=P3H_/___XD'A?9T&XGVZ/S___^)1B0[0R1T\X/L#%;H_/__
+M_X/$$(/L#%/H_/___XM#!(/$$(-X/`!T"H/L#%/_4#R#Q!!;7E_#5U93BWPD
+M$(M$)!2+<"2%]G1?BT84A<!T4HG!@W@,`'1*C78`BTD,.?EU";@!````ZT2)
+M]KH`````@'DP`'0F#[99,)"+1)%(A<!T%(!X"`1V#CGX=0JX`0```.L9C78`
+M0CG3?]^#>0P`=;F+-H7V=:&X`````%M>7\.)]E575E.#[!R+?"0P#[9',(M7
+M!`^V4@8IT)E24/]W&/]W%.C\____@\00B40D$(E4)!3'1"0(_____\=$)`S_
+M____O0````"+!XMP#(/`##GP='&)]HV>V/W___:#'`(```%T58!["`%U3_9#
+M3`1T25-7Z`[___^#Q`B$P'4[BT0D%#E#+'(R=PF+1"00.4,H<B>+5"0,.5,L
+M=QYR"8M4)`@Y4RAS$XM#*(M3+(E$)`B)5"0,B=V-=@"+-HL'@\`,.?!UD;@`
+M````A>UT0/:'20$```)U%6H`_W0D&/]T)!A5Z/S___^#Q!#K(HM%)(7`=`^-
+M=@"#>!0`=0J+`(7`=?2)Z.L(N`````"-=@"#Q!Q;7E]=PU575E.#[`R+="0@
+MOP````"`?C``#X0%`0``B?:#?+Y(`'01BT2^2/:`'`(```$/A=X```"+;"0D
+MA>UU&(/L#%;HI_[__X/$$(G%A<`/A+D```")]HEU#(-\OD@`=`N+1+Y(QT`,
+M`````(ELODB*ED@!``"(T(/("HB&2`$``,>&3`$```````#'AE`!````````
+MJ"!T"XC0@\B*B(9(`0``N`$```"Z`````(GY#Z7"T^#VP2!T!XG"N`````")
+M!"2)5"0$BP0D"T8XBU0D!`M6/(E&.(E6/(L$)/?0BU0D!/?2(T9`(U9$B49`
+MB59$@WPD)`!U#H/L"%5J!^C\____@\00@(Y(`0``!(-\)"0`=0U'#[9&,#GX
+M#X_]_O__]H9(`0``"'0,@^P,5NC\____@\00@\0,6UY?7<-64X/L!(M<)!"+
+M="045E/H(/W__X/$"+K_____A,!U:0^V0S"+4P0/ME(&*="94E#_<QC_<Q3H
+M_/___X/$$/:#20$```)U)6H`4E!6Z/S___^#Q!"Z_____X7`="R#[`A04^C\
+M____@\00B?;V@T@!```$=`^#[`Q3Z/S___^#Q!"-=@"Z`````(G0@\0$6U[#
+MC78`55=64X/L#(M\)"`/MD<(@^@%@_@%#X<-`@``_R2%*",``(GVO0````"^
+M`````(!_,`!T18M<MTB%VW0T@'L(!'8N@^P,4^C\____@\00]H-(`0``!'0'
+M@(](`0``!(J#2`$``(/@`SP"=06]`0```$8/MD<P.?!_NX7M#X2G`0``@*=(
+M`0``_KX`````@'\P``^$D0$``)"+7+=(A=MT,(!["`1V*O:#2`$```%T(8J#
+M2`$``(/@OH/(`HB#2`$``(/L#%/H_/___X/$$(UV`$8/MD<P.?!_O^E*`0``
+MB?8/MT<RN@````"#P/^#TO_WT/?2(X=,`0``(Y=0`0``B8=,`0``B9=0`0``
+M]H<<`@```70DBT=`BU]$B<+WTHG9]]$C5S@C3SR)R`G0=`J`CT@!```"C78`
+MBT=$"T=`=0B+1SP+1SAT.X!_"`IU+@^V3S!)N`$```"Z``````^EPM/@]L$@
+M=`>)PK@`````BT\\,=$S1S@)P70)B?:`IT@!``#^BT=$"T=`=`>`CTD!```@
+MBT=$"T=`="KVAQP"```!="&#?PP`=`R+1PSV@!P"```!=`^#[`AJ`%?H_/__
+M_X/$$)#VAQP"```!=%OVATD!```$=5+VAT@!```#=$F+=SB+;SR)Z`GP=!B+
+M1T"+7T2)PO?2B=GWT2'R(>F)R`G0="6#?PP`=`R+1PSV@!P"```!=!.`CT@!
+M```(@^P,5^C\____@\00@W\,`'46]H=(`0``!'0-@^P,5^C\____@\00D(/$
+M#%M>7UW#5U93@^P(BUPD&(MT)!R+?"0@@'L(!`^&B````,<$)`````#'1"0$
+M`0```+@`````@'LP`'03#[9+,(GVBU2#2(72=45`.<%_\XM3!(!Z!0!T(@^V
+M0S`/ME(&*=`/KT0D!(E$)`0/MT,R.P0D=@:)!"2-=@"%]G0%BP0DB0:%_W0W
+MBT0D!(D'ZR^#[`2-1"0(4(U$)`A04NC\____@\00ZZB-=@"%]G0&QP8`````
+MA?]T!L<'`0```(/$"%M>7\.04X/L$(M<)!B-1"0,4(U$)`Q0_W,$Z/S___^-
+M1"004(U$)!!0_W,(Z/S___^#Q!B+1"0,.T0D!`^70Q2+1"0(.P0D<P.+!"0/
+MKT0D#&:)0V1FA<!U!F;'0V2``(/$$%O#4X/L"(M4)!"+6@2+0@B%VW0+A<!U
+M&H"C'`(``/Z%P'0'@*`<`@``_L9"9P'K5HGV]H,<`@```70)]H`<`@```74;
+M@*`<`@``_H"C'`(``/['0QS_____QD)G`>LGQD)G`("+20$```2`B$D!```$
+M4NC\____@^P(4^C\____@\00C78`@\0(6\.-=@!55U93@^P$BW0D&(ML)!R*
+M1@@Z10AU#6:+13!F.48P=`V-=@"X`0```.F^````QP0D`````(!^,``/A*4`
+M``"+!"2+3(9(BU2%2(7)='^%TG1[@'D(!'8F@'H(!'8:@^P(4E'H_/___X/$
+M$(3`=&6X`0```.MVB?:`>0@$=TB`>@@$=T*+020[0B1U,XMY,(M:,(M'!(M7
+M"(M+"#'1,T,$"<%U&XM'#(M7$#M3$'<0<@4[0PQW"?:&2`$```-T%;@!````
+MZR:X`0```.L?N`$```#K&/\$)`^V1C`[!"0/CUO___^X`````(UV`(/$!%M>
+M7UW#5E.#[`2+="00BUX,C48,.=AT/I"-@]C]__^`>`@$=BCV@$@!```$=!^#
+M>`P`=`J0BT`,@W@,`'7W@^P,4.C\____@\00C78`BQN-1@PYV'7#@\0$6U[#
+MD*$`````A<!Y!P7_#P``B?;!^`S#PXUV`(M,)`2+5"0(BX'\````B4(,B9'\
+M````PX/L#(M4)!"+3"04@[H``0```'4PBX+L````.P%R%H/L#/]Q"/]1!+@`
+M````@\00ZS.-=@")B@0!``")B@`!``#K$8GVBX($`0``B4@0B8H$`0``@^P,
+M4NC\____N`$```"#Q!"#Q`S#@^P4_W0D'(M$)!P%Y````%#H_/___X/$',.)
+M]K@`````PXGV@^P,_W0D'/]T)!S_="0<BT0D'`7D````4.C\____@\0<PXGV
+M5U93BWPD$,>'%`$```````"+MP`!``"%]G1]D(N'[````#L&<CXYMP0!``!U
+M%L>'!`$```````#'AP`!````````ZPF+1A")AP`!``#'1A``````@^P,_W8(
+M_U8$@\00ZRR)]HN?_````(7;=!:)]H/L"/\V_S/_4P2#Q!"+6PR%VW7LBX?L
+M````.P9R-HNW``$``(7V=82!O^P```!_`0``=R"+G_P```"%VW06B?:#[`AJ
+M`/\S_U,$@\00BUL,A=MU[%M>7\-3@^P(BUPD$(.[%`$```!U.\>#"`$``!RH
+M!P")FPP!``#'@Q`!````````@^P(C8,(`0``4(U#+%#H_/___\>#%`$```$`
+M``"#Q!"0@\0(6\.-=@!64X/L!(MT)!"+GOP```"%VW05D(/L"&K__S/_4P2#
+MQ!"+6PR%VW7L@WXL``^5P`^VP(/$!%M>PXM$)`3V0!4$=`2`2!0$]D`5`70$
+M@$@4`?9`)01T!(!()`3V0"4!=`2`2"0!PXUV`(M$)`3V0"8$=`2`2"4$]D`F
+M`70$@$@E`?9`/@1T!(!(/03V0#X!=`2`2#T!PY"0D(/L#(M4)!"`HAP"``#^
+M@WH,`'00@^P,BT(,BT`$4O]0)(/$$(/$#,-3@^P0BU0D&(M:+(I"7HA#7E+_
+M<P3H_/___XM#!/]("(D<).C\____@\086\.-=@"#[`R+1"00BU`LN`````"#
+M>F0`=!.#[`3_="0<_W0D'%+_4F2#Q!"0@\0,PU=64XMT)!"+?BB+1@3_0`B#
+M[`S_=@3H_/___XG#BP:)`XM&!(E#!(M&-(E#-(/$$(I&78A#7<=#:/BI!P")
+M<RR+1R2)0RB*1ER(0UR`?EP`=2J+3S"+1DB+5DP#000340B)0TB)4TQFBT90
+M9HE#4(M&8(E#8,=#9"BJ!P"#[`Q3Z/S___^#Q!!;7E_#@^P8:"`=``#H_/__
+M_[@`````@\0<PY"0@^P4:(`=``#_="0<Z/S___]J`6@@`0``_W0D+%#H_/__
+M_X/$+,.)]E.#[!!H@!T``/]T)!SH_/___XG#B00DZ/S___^)0QB#Q!A;PX/L
+M%&B`'0``_W0D'.C\____@\0(_W`84.C\____@\0<PXUV`%575E.#[!2+1"0H
+MBWPD,(M0*(M2#(E4)!"+6"R+<R2+4V")5"0,BE`PB%0D"FB`'0``_S#H_/__
+M_XM0&(/$$(-\)`0`=`^*0UV#X`%F#[;`9CGX=22)5"0$@WMD`'00@^P$5U)3
+M_U-D@\00A<!U"K@`````Z:8````/MUX,P>,)BD8(B$0D`Y"+5"0$BW((BWH,
+MBRJ)V3GK=@*)Z8I$)`(X1"0#=1J+5"0DB0K'0@0`````B7((B7H,@\(0B50D
+M)"G-N@`````!SA'7*<MU)OY$)`.*1"0#BU0D"#I",'4(QD0D`P"-=@"+5"0(
+M#[=",HG#P>,)A>UUFXM$)`2#>`0`=0R#P!")1"0$Z7G___^+5"0DQT+T`0``
+M`+@!````@\0,6UY?7<.05U93BWPD$(M?+(MS)(M/,+@!````N@`````/I<+3
+MX/;!('0'B<*X`````/?0]](C1A0C5AB)1A2)5AB`?UX!=`:*1UZ(0UZ#[`A7
+M_W,$Z/S___^+0P3_2`B#Q!"+1A@+1A1U%H![7@!U!,9#7@&#[`Q3Z/S___^#
+MQ!!;7E_#B?955U93@^P4BT0D+(I<)"B+4"B)5"0,BT@DBS&+>01FBVD0.%D(
+M=1$/MT$.N@`````!QA'7ZR&)]CA9"'8:BT0D#`^W0#*)!"3'1"0$``````,T
+M)!-\)`0X60AU!&8#:0PX60EU!V8#:0J-=@"`>1P`=`XX60AS)3A9"7<6ZQZ)
+M]CA9"',(BT0D#&8#:#(X60EV"HM4)`QF`VHRB?:+1"0P9HEH4(EP2(EX3(/$
+M%%M>7UW#B?955U:#[""+="0PBT0D-(M02(M(3(E4)!B)3"0<9HMH4(MX),=$
+M)`P`````#[9.,8M$)!B+5"0<#ZW0T^KVP2!T!XG0N@````")1"00B50D%&;'
+M1Q```,9''`$/MD8PN@````!24/]T)!S_="0<Z/S___^#Q!`/MDXQ#Z7"T^#V
+MP2!T!XG"N`````")!XE7!`^V1C"Z`````%)0_W0D'/]T)!SH_/___X/$$(A'
+M"(C!9HM&,D@C1"089HE'#F:+5C)F*<+'1Q0`````QT<8`````&8YZG(+9HEO
+M#+T`````ZV-FB5<,9BG5QT0D#`$```"X`0```+H`````#Z7"T^#VP2!T!XG"
+MN``````+1Q0+5QB)1Q2)5QA!.$XP=1NQ`(!_'`!T!\9''`#K#9!FBT<09@-&
+M,F:)1Q!F.6XR<P9F*VXRZZRX`0```+H`````#Z7"T^#VP2!T!XG"N``````+
+M1Q0+5QB)1Q2)5QB(3PEFB6\*BT0D#(/$(%Y?7<.-=@!55U93@^P,BT0D((M`
+M*(E$)`B+5"0@BU(DB50D!(M,)""`>5P$#X7A````QT(4`````,="&`````"]
+M`````(!X,``/AM`!``")Z`^V^(M4)`B+=+I(A?8/A)<```#VAAP"```!#X2*
+M````N`$```"Z`````(GY#Z7"T^#VP2!T!XG"N`````"+3"0$"T$4"U$8B4$4
+MB5$8BU0D((M"!/]`"(/L#/]R!.C\____B<.+3"0PBP&)`XM!!(E#!(M!-(E#
+M-(ES*,9#7`2*45V#XC"*0UV#X,\)T(A#7<=#:)"L!P")2RR)>S")'"3H_/__
+M_X/$$(GV18GHBU0D"#A",`^'1/___^D/`0``C78`@^P(_W0D*/]T)!3H9/W_
+M_XE$)!"#Q!"+3"0$BT$8"T$4=1F+1"0@QD!>`H/L#%#H_/___X/$$.G0````
+MO0````"+5"0(@'HP``^&O0```)")Z0^V^;@!````N@````")^0^EPM/@]L$@
+M=`>)PK@`````BTPD!"-!%"-1&(G1"<%T>HM$)`B+=+A(BU0D((M"!/]`"(/L
+M#/]R!.C\____B<.+3"0PBP&)`XM!!(E#!(M!-(E#-(/$$(ES*(I!78A#7<=#
+M:)"L!P#'0V1HJP<`B4LLB7LP4U%7Z./[__^#Q`R#/"0`=0J+5"0@BT)@B4-@
+M@^P,4^C\____@\0018GIBT0D"#A(,`^'1/___X/$#%M>7UW#@^P8:(`=``#H
+M_/___[@`````@\0<PY"05E.#[`2+3"04BW0D&(M$)!"+6"R+4V"%TG0-BD-=
+M@^`!#[;`.?!U)(-[9`!T%8/L!%914_]39(/$$+H!````A<!U,KH`````ZRN)
+M]HL"B0&+0@2)002+0@B)00B+0@R)00R#P1"-0@2#PA"#.`!TW+H!````B="#
+MQ`1;7L.-=@!55U93@^P<O@````"_`````+T`````BT0D,(!X,`!T6P^V4#")
+M5"04BTPD,(M$L4B%P'0)]H`<`@```74WN`$```"Z`````(GQ#Z7"T^#VP2!T
+M!XG"N`````")1"0(B50D#(M$)`@)^(M4)`P)ZHG'B=6)]D8Y="04=ZV+3"0P
+MBU%$,>J+04`Q^`G"=!.)>4"):42#[`Q1Z/S___^#Q!"0@\0<6UY?7<-64X/L
+M$(M<)!R+<RP/MT-04/]S3/]S2(![7@$/E,`/ML!0_W,HZ/S___^#Q""`?EP`
+M=0G&1EX!ZPF-=@"*0UZ(1EZ#[`A3_W8$Z/S___^+1@3_2`B)-"3H_/___X/$
+M%%M>PXGV55=64X/L#(M\)""+7RR+4RB+<R2`?UP$=1:`?UX!#X2J`0``BD=>
+MB$->Z9\!``"0@']>`0^$`@$``/9#70(/A(@```"`>U\`#X5Z`0``BT(\"T(X
+M#X5N`0``BT)$"T)`#X5B`0``QD-?`8-_,``/E,`/MLB)3S"+1(I(A<!T.8E'
+M*+@!````N@`````/I<+3X/;!('0'B<*X`````(D&B58$QD=>`(/L#%?H_/__
+M_X/$$.EU`0``D(-_,``/E,`/ML")1S#I_@```(GV]D-=!`^$\@```(!_7@)T
+M%<9'7@"#[`Q7Z/S___^#Q!#I.P$``(/L#%+H^OW__X/$$(![7@$/A,<```"+
+M3S"X`0```+H`````#Z7"T^#VP2!T!XG"N`````"+3@0QT3,&"<$/A)0```#I
+ME0```(UV`(![7P`/A((````/MF]=]\4"````=':#?S``#Y3`#[;(B4\PBT2*
+M2(7`=%'V@!P"```!=$B)1RB)Z(/@_8/(!(A'7;@!````N@`````/I<+3X/;!
+M('0'B<*X`````(D&B58$QT=HI+('`,9'7@"#[`Q7Z/S___^#Q!#K=9"#?S``
+M#Y3`#[;`B4<PC78`BD=>B$->BT\PN`$```"Z``````^EPM/@]L$@=`>)PK@`
+M````]]#WTB,&(U8$B0:)5@2#[`A7_W,$Z/S___^+0P3_2`B#Q!"+1@0+!G46
+M@'M>`'4$QD->`8/L#%/H_/___X/$$(/$#%M>7UW#55=64X/L'(M$)#"+>"B+
+M4"2)5"08QT((`````(!X7`%U$H/L#%#H30@``(/$$.E\`P``D(M,)#"`>5P$
+M#X7B````BUPD&,<#`````,=#!`````"^`````(!_,``/ADT#``")]HGP#[;H
+MBURO2(7;#X2;````]H,<`@```0^$C@```+@!````N@````")Z0^EPM/@]L$@
+M=`>)PK@`````BTPD&`L!"U$$B0&)402+5"0PBT($_T`(@^P,_W($Z/S___^)
+MP8M4)$"+`HD!BT($B4$$BT(TB4$T@\0$B5DHQD%<!(M<)#R*4UV#XC"*05V#
+MX,\)T(A!7<=!:`BS!P")62R):3!1Z/S___^#Q!"-=@!&B?`X1S`/ATC____I
+MC@(``(UV`(M'1`M'0`^%U````(M'/`M'.`^%R````(M4)##V0ET"#X2Z````
+MBT=(]H`<`@```0^$J@```(M73/:"'`(```$/A)H```"`>`@$=0.+0"2`>@@$
+M=0.+4B2`>`@!=6Z`>@@!=6B+7"0PBTM(B<LK6D"+L"`"``"+DB`"```K2$!Y
+M`O?9A=MY`O?;.=E](+T`````A=(/A;(```"#_@4/AJD```"]`0```.F?````
+MO0````"%]G4)@_H%#X>-````O0$```#I@P```(UV`(M7$(,Z``^4P(G%#[;`
+MB0+K;HGVO0````"`?S``=F&+5T")5"04BT\XB4PD$(M?1(E<)`R+=SR)="0(
+MD(GH#[;PN`$```")\=/@B<&)P\'['XM$)!`+1"04BU0D"`M4)`PAP2'3B=@)
+MR'4-BT2W2/:`'`(```%U"$6)ZCA7,'>\BTPD&,<!`````,=!!`````"^````
+M`(GS#[;#BUR'2(7;=$GV@QP"```!=$"+1"0P]D!=!'4*B>J)\3C*=2Z)]K@!
+M````N@````")\0^EPM/@]L$@=`>)PK@`````BUPD&`L#"U,$B0.)4P201HGP
+M/`%VHXM4)!B+`H/P`PM"!'4'QT((`````+X`````B?$/MNF+7*](A=L/A)8`
+M``#V@QP"```!#X2)````BTPD&(L!BU$$B>D/K=#3ZO;!('0"B="H`71NBU0D
+M,(M"!/]`"(/L#/]R!.C\____B<&+5"1`BP*)`8M"!(E!!(M"-(E!-(/$!(E9
+M*(I"78A!7<=!:`BS!P#'061\L0<`B5$LB6DPBUPD/(M#2(M33(E!2(E13&:+
+M0U!FB4%04>C\____@\00B?9&B?`\`0^&3O___X/$'%M>7UW#D(/L&&C@'0``
+MZ/S___^X`````(/$',.)]E575E.+5"04BUPD&(ML)!R+0BR+>%2+-P^W2E#!
+MX0ET-XUV`(7M=`B+!HE#".L-D(M&!(M6"(E#"(E3#(M'!#G(=@*)R(D#QT,$
+M`````(/#$(/&#"G!=<S'0_0!````N`$```!;7E]=PXUV`%575E.#[`R+?"0@
+MBU\LBVLHBW,DBT\PN`$```"Z``````^EPM/@]L$@=`>)PK@`````]]#WTB,&
+M(U8$B0:)5@2`?UX!=`:*1UZ(0UZ#[`A7_W,$Z/S___^+0P3_2`B#Q!"+1@0+
+M!G4Q@'M>`'4?QD->`0^W0U"Z``````-#2!-33(F%3`$``(F54`$``(/L#%/H
+M_/___X/$$(/$#%M>7UW#C78`5U93BW0D$(M>+(M[*(!^7@%T"8I&7HA#7NMU
+MD(I&7:@"=#6#X/V#R`2(1EW&1E\`QD9>`(-^,``/E,`/ML")1C"+1(=(B48H
+M@^P,5NC\____@\00ZU>)]L9#7@&+ATP!``"+EU`!``"+2TPQT3-#2`G!=1P/
+MMT-0N@`````#0T@34TR)ATP!``")EU`!``"0@^P(5O]S!.C\____BT,$_T@(
+MB1PDZ/S___^#Q!!;7E_#C78`55=64XM4)!2+7"08BVPD'(M"+(MX5(LW#[=*
+M4,'A"8-Z,`!T"XM'"-'HC01`C32&A<ET-(7M=`B+!HE#".L-D(M&!(M6"(E#
+M"(E3#(M'!#G(=@*)R(D#QT,$`````(/#$(/&#"G!=<S'0_0!````N`$```!;
+M7E]=PXUV`%575E.#[!R+7"0PBT,LB40D&(M0*(E4)!2+<"2+2S"X`0```+H`
+M````#Z7"T^#VP2!T!XG"N`````#WT/?2(P8C5@2)!HE6!(M3,(I#7HA$%@R#
+M[`A3BTPD)/]Q!.C\____BUPD*(M#!/]("(/$$(M&!`L&#X7E`0``@'X,`70(
+MBD8,B$->ZQ"`?@T!=`J*1@V+?"08B$=>BT0D&(!X7A`/A>8```"`?@P!=`J`
+M?@T!#X76````BU0D&(M"!/]`"(/L#/]R!.C\____B<.+3"0HBP&)`XM!!(E#
+M!(M!-(E#-(/$!(M\)"2+1TB+5TR)0TB)4TQFBT=09HE#4(!+702)>RR`?@P!
+M#Y7`#[;`B4,PQT-HI+('`,=#9-"Z!P"#^`$9P(/@!(M4)""+1!!(B4,H4^C\
+M____@\00Z2`!``"+3"08QD%>#(M<)!2*BT@!``"(R(/("HB#2`$``(MT)!B+
+M1DB+5DR)@TP!``")DU`!``#'0S@"````QT,\`````(/)#HB+2`$``.M_D(M\
+M)!B`?UX`#X6V````#[='4(M75(E4)!#'1"0,`````,9'7@'!X`F)1"0(=%#\
+MD(M,)!"+600[7"0(=@2+7"0(BW0D$(L6BWPD#(T,?XM&"-'H`?B-!$"++(J+
+M/(*)V3G;B>[SI@^7P@^2P#C"#X4______T0D#"E<)`AULHM\)!B`?UX!=3R+
+M3"04BX%,`0``BY%0`0``BT],,=$S1T@)P74@#[='4+H``````T=($U=,BW0D
+M%(F&3`$``(F64`$``)"#[`S_="0DZ/S___^#Q!"#Q!Q;7E]=PY!55U93@^P,
+MBW0D((MN*(M&)(E$)`B+5E2)5"0$BT5$"T5`#X7T`0``#[9&4H/X`@^$6@$`
+M`(/X`G\.@_@!#X37````Z=0!``"#^`,/A<L!``"_`````(M<)`2#>P@`=CBZ
+M`````(UV`(M$)`2+`(D$)(T$?XM<)`2+2P2+'"2+!(.%R70)C78`B!!`277Z
+M1XM$)`0Y>`AWT(M4)`C'`@,```#'0@0`````OP````"+1@3_0`B#[`S_=@3H
+M_/___XG!BP:)`8M&!(E!!(M&-(E!-(M&2(M63(E!2(E13&:+1E!FB4%0@$E=
+M!(EQ+(EY,,=!:'BY!P#'060,N0<`BT2]2(E!*(D,).C\____@\001X/_`7:9
+MZ1(!``"+1@3_0`B#[`S_=@3H_/___XG!BP:)`8M&!(E!!(M&-(E!-(M&2(M6
+M3(E!2(E13&:+1E!FB4%0@$E=`HEQ+,=!:!RZ!P#'060,N0<`BT4X@_`!"T4\
+M#Y3`#[;`B4$PBT2%2(E!*(D,).C\____@\00Z9T```"+13P+13@/A8$```"+
+M5"0(QP(#````QT($`````+\`````BT8$_T`(@^P,_W8$Z/S___^)P8L&B0&+
+M1@2)002+1C2)032+1DB+5DR)04B)44QFBT909HE!4(!)70*)<2R)>3#'06A,
+MNP<`QT%DT+H'`(M$O4B)02B)#"3H_/___X/$$$>#_P%VF>L2B?;&1EX&@^P,
+M5NC\____@\00@\0,6UY?7<-75E.+7"00BTPD%(M4)!B^`````(M$)!S!Z`*)
+MQX/X`'86B?:+`3,"@\($@\$$B0.#PP1&.?=W[%M>7\-75E.+7"00BTPD%+X`
+M````BT0D&,'H`HG'@_@`=A6)]HG:@\,$BP(S`8/!!(D"1CGW=^U;7E_#D%=6
+M4XM\)!"+7"04@^P,C4<D4.C\____B<:)&(/$$$N#^_]T'(/L"(U$WD10_S?H
+M_/___XE$G@2#Q!!+@_O_=>2)\%M>7\.)]E=64XM\)!"+="04BQY+@_O_=!V0
+M_W3>2/]TWD3_=)X$_S?H_/___X/$$$N#^_]UY(/L"%:-1R10Z/S___^#Q!!;
+M7E_#5E.+="0,BQY+@_O_=!JY`````+H`$```BT2>!(@(0$IU^DN#^_]UZUM>
+MPY!55U93BVPD%(M<)!B+=0!.@_[_=$N%VW1'C78`BU2U!+\`$```.=]V`HG?
+MN0````")^,'H`H/X`'8:B?C!Z`*0@SH`=`>X`````.L908/"!#G(=^PI^TZ#
+M_O]T!(7;=;RX`0```%M>7UW#B?955U93@^P(#[=$)"#!X`F+5"0DB=?!YPF)
+MPH'B_P\``(D4),'H#(E$)`2)]KH`$```*Q0D.?IV`HGZO@````")T8L$)(M<
+M)`2+;"0<`T2=!(72=`B)\X@80$EU^#GZ=`__1"0$*=?'!"0`````Z[V#Q`A;
+M7E]=PY!55U93@^P$BW0D&(ML)!R)\<<$)`````"_`````&:#?A`@=@?'!"3_
+M____9H-Y$$!V!;______LP"`>1(`=C^0.%D3=#,/ML/!X`0!R(V0D`4``(.X
+MD`4``/]U$HL$)#E"!'4*.7H(=04Y>@QT"K@`````ZPZ-=@!#.%D2=\*X`0``
+M`(7`=%*+1"0<BU`$.<)T1XV^D`D``(V*</;__XN"</;__SL&=2B+60R+20@[
+M7@QW&7(%.TX(<Q*+`HEX!(F&D`D``(E7!(DZZR2)U8GVBU($.U0D''6_C8:0
+M"0``BU4$B44$B:Z0"0``B5`$B0*#Q`1;7E]=PXM,)`2*D;$)```/ML*-!(#!
+MX`2-A`BT"0``0HB1L0D``(D(QD`%`,9`!@#&0`<`PU=64XM\)!"+="04NP``
+M``#K$XGV@^P(_W2>&%?H8_W__X/$$$,/ME82@'X2!'81C4+]T?B-!`(YV'_9
+MZPJ-=@"-0@$YV'_-QT8$`````(/L"%:-1SQ0Z/S___^#Q!!;7E_#B?955U93
+M@^P8BWPD,(MT)#R)^(A$)!>)\XM$)"R#P#Q0Z/S___^)Q8V`D`D``(F%D`D`
+M`(F%E`D``(/$$(M4)""+`HF%K`D``(M$)"B+5"0LB44(B54,9HEU$(GXB$42
+MQH7XA@```,>%[(4```````#'A?"%````````QD45`&;!ZP,/M_N%_W4$9K\!
+M`,>%_(8```````"^`````(!\)`L`=$N[``````^V5"0+B50D!(GPP>`$NA``
+M``"-A"B0`0``C78`B!A`2G7ZB?#!X`2Y`````+H0````C80HD`4``(@(0$IU
+M^D8Y="0$?\.^``````^V5"0+C4+]T?B-!`*)!"2-6@'K')"#[`A7_W0D+.C#
+M^___B42U&`&]_(8``(/$$$:`?"0+!'8'.30D?]GK!#GS?].)Z(/$#%M>7UW#
+MD%575E.#[`R+7"0DBWPD*(ML)"R+1"0P9HE$)`J+4Q`/MDLQB?C3Z"7_`P``
+MBQ*-!(*)1"0$BS"%]@^$DP```)"+5@PQZHM&"#'X"<)U=H"^^(8```%U)L:&
+M^(8```"-AI`)``"+2`2+EI`)``")2@2)$8F&D`D``(E`!.LW@+[XA@```W4N
+MQH;XA@```(M4)"#_BM````"-AI`)``"+2`2+EI`)``")2@2)$8F&D`D``(E`
+M!/Z&^88``(GPZ?,```"-=@"+MIP)``"%]@^%;O___X/L#`^W1"064%57#[9#
+M,%#_="0\Z-7]__^)QHD8QX`0AP```````(M#)(E&!(/$((-[#`!T+L9&%`"+
+M0PR)P8!X,`!T(Y`/OD84.5R!2'08_D84#[Y6%(M+#`^V03`YPGSDZP3&1A3_
+MBTPD!(L!B8:<"0``A<!T#HL1C8:<"0``B8*8"0``BT0D!(F&F`D``(DPBD,P
+MB$822(A$)`.(1A.`>P@(=3,/MDLQ#ZWOT^WVP2!T!XGOO0`````/MD,PN@``
+M``!24%57Z/S___^#Q!"*3"0#*,&(3A/&AOF&```!B?"#Q`Q;7E]=PU575E.#
+M["R+1"1$BT`DB40D*(M,)$2*45V(T-#H@_`!B<&#X0&)3"0DQT0D'`````"+
+M1"1$@WA@`'0%]L(!=#&#[`R+1"1,@\!L4.C\____B40D+(E$)#"#Q`QJ`?]T
+M)"3_="10BU0D5/]29(/$$.L+BTPD1(M)8(E,)""+1"0@BRC'1"00`````,9$
+M)!H`BU0D*("ZH@`````/AD8!```/ME0D&HM,)"@/MH11I````(T$0(M$P22)
+M1"04BI11I0```(A4)!L/ML*+3"049HN4@?2%``!FBX2!]H4``&:)1"0.B=!F
+MP>@##[?`B40D"(/B!V:)5"0,#[?"B<+!X@FX"````&8K1"0,9HE$)`QFBT0D
+M#F8Y1"0,=@5FB40D#`^W1"0,B<;!Y@D/MD0D&XM,)!2+1($8B=>+3"0(`WR(
+M!(UV`#EL)!!U%H-$)"`0BT0D((LHQT0D$`````"-=@")ZRM<)!`Y\W8"B?.+
+M5"0@BT((@WPD)`!T%@-$)!"#[`134%?H_/___X/$$.L4B?8#1"00@^P$4U=0
+MZ/S___^#Q!`!7"00*=YT!`'?ZY:+3"0,9BE,)`YT%?]$)`BZ`````&;'1"0,
+M"`#I0?____Y$)!J*1"0:BU0D*#B"H@````^'NO[__X-\)!P`=!>#[`C_="0D
+MBT0D3(/`;%#H_/___X/$$(/L!&H`_W0D3(M,)$S_,?]4)%B#Q#Q;7E]=PY!6
+M4X/L!(M4)!"+<BR+7B2`>EX!=`:*0EZ(1EZ#[`A2_W8$Z/S___^+1@3_2`B#
+MQ!"*@Z$```!`B(.A````.H.@````=3>`?EX`=03&1EX!BD9>B$0D`X7V="*)
+M]HM&)(M8%(I$)`.(1EZ#[`Q6Z/S___^)WH/$$(7;=>&0@\0$6U[#B?955U93
+M@^P,BVPD((M%$(MP",=`"`````"+1B2)1"0(QH"A`````,:`H`````"_````
+M`(!],`!T=8M<O4B%VW1D]H,<`@```71;BT8$_T`(@^P,_W8$Z/S___^+%HD0
+MBU8$B5`$BU8TB5`T@\0$B5@HQD!<!(I.78/A,(I078/BSPG*B%!=QT!HH,@'
+M`(EP+(M4)!3^@J````!0Z/S___^#Q!")]D</MD4P.?AWBX/$#%M>7UW#C78`
+M55=64X/L#(ML)""+="0D@[[PA0```'1@B?.X`````'0WBX;PA0``BT`DBT@4
+M.8[PA0``=0_'AO"%````````ZQ6-=@"+@_"%``"+4"2+022+0!2)0A2)R(/L
+M#%#HTW@``(/$$(7`#X0<`0``@[[PA0```'6LC78`@+[YA@````^%`P$``(.^
+M$(<```!T"L>&$(<```````")][$`@'X2`'9!B?8/ML'!X`0!^(V0D`$``+L`
+M````@[B0`0```'44@WH$`'4.@WH(`'4(@WH,`'0'B?:[`0```(7;=3Q!.$\2
+M=\&X`````(7`=#3&AOB&```#BY:4"0``BX:0"0``B5`$B0*-10Q05N@.]___
+M_X70````@\0(ZS:X`0```.O(QH;XA@```8V6D`D``(M*!(N&D`D``(E(!(D!
+MC44$BT@$B5`$B8:0"0``B4H$B1&+%HM"$(-X"`!T+H/L#%+H55L``(/$$(7`
+M=!"#[`C_-E7H=U$``(/$$.L.@^P,_S;HQ/W__X/$$)"#Q`Q;7E]=PU.#[!"+
+M1"0<QH#XA@```(V0D`D``(M:!(N(D`D``(E9!(D+B9"0"0``B5($QX#LA0``
+M`````/Z(^88``%#_="0<Z"K^__^#Q!A;PY!55U93@^P4BVPD+&A`'@``_W0D
+M+.C\____B<>+=22#Q!"#?"0H`'0$QD5>"[L`````@+Z>`````'0AB?:-!%N#
+M[`C_=,8D5^AH____@\000P^VAIX````YV'_A@^P,5>C,6P``@\0<6UY?7<.#
+M[!2+1"08QD`5`,>``(<``&#,!P")@`2'``#'@`B'````````C9``AP``4O^P
+MK`D``.C\____@\0<PY!55U93@^PTBW0D2(N&K`D``(E$)"QH0!X``%#H_/__
+M_XE$)#"++HM%$(N6[(4``(E4)"S_2`2#Q!"#>`0`=0>`I1P"``#?@[X,AP``
+M`'0=@+[VA@```744@^P,5N@K&0``@\00Z9X$``"-=@"#?"0<``^$)00``(M,
+M)!R+222)3"08@+ZS"0```'1A@+[VA@```74RB?>S`(!^$@!V/;D`````#[;#
+MP>`$NA````"-A#B0`0``C78`B`A`2G7Z0SA?$G??ZQ6`OO:&```"=0R#[`Q5
+MZ"QZ``"#Q!"#[`Q6Z*@8``"#Q!#I&P0``("^]H8``!!U/XM$)!R`>%P`=!"`
+M>%P!#X5/`@``@'A2`G4EBTPD'(I17XU"`8A!7X#Z`G<3@^P,5NAB&```@\00
+MZ=4#``")]HM$)!R`>%P!#X46`@``#[=&$+H``````T8($U8,B40D$(E4)!2+
+M5"0<@'I2`@^%L````("^]H8```$/A:P````/MT80P>`)4`^V1A/_=(88Z"OS
+M__^#Q`B%P`^%@P```,:&]H8```R`C4@!```"@'T("G4L#[9-,$FX`0```+H`
+M````#Z7"T^#VP2!T!XG"N``````+13@+53R)13B)53R`C4@!```(#[=%,O?8
+MF8M.""'!BUX,(=,YG5`!``!R(W<(.8U,`0``=AD/MT4R]]B9(T8((U8,B85,
+M`0``B950`0``@+[VA@```70NBH;VA@``BTPD'(A!7H/L"%;_="0LZ-+\__^#
+MQ`3_="0HZ$)9``"#Q!#IN0(``(N%3`$``(N54`$``(M.##'1,T8("<%U%(M$
+M)!"+5"04B85,`0``B950`0``@^P(5O]T)"SHA?S__P^W53*)5"00QT0D%```
+M``"+="0LBTY(BUY,@\$!@],`BT0D$/?AB40D&(M\)!`/K_N)U@'^B<@/KT0D
+M%`'&B70D'(/$$(M4)!0Y5"0,<FUW"HMT)!`Y="0(=F&+1"08QT`D`````(M4
+M)!"+3"04BW0D&(E6*(E.+%;_="0@5?]T)"SH4F\``(/$$(7`#X3N`0``QT8$
+M_#T(`(M$)!R)1@C'1@P`````@^P(5O]T)##H_/___X/$$.G$`0``@^P,_W0D
+M*.@Y6```@\00Z;`!``"0BU0D&(J"GP```$"(@I\````Z@IX````/A9(!``"+
+M3"0<]D%=!`^$EP```+\`````@+J>`````'9UB?H/ML*-!$"+3"08BW3!)("^
+M]H8```%U,(GULP"`?A(`=C.Y``````^VP\'@!+H0````C80HD`$``)"("$!*
+M=?I#.%T2=^'K#8J&]H8``(M4)!R(0EZ#[`A6_W0D+.@8^___@\001XGYBW0D
+M&#B.G@```'>+@^P,_W0D*.AV5P``@\00Z>T```"_`````(M$)!B`N)X`````
+M=C6)^@^VPHT$0(M,)!B+=,$D@+[VA@```70-BH;VA@``BW0D'(A&7D>)^(M4
+M)!@X@IX```!WRXM,)!R`>5X`=1J#[`1HN,L'`%'_="0LZ*/U__^#Q!#I@@``
+M`(/L!&H`_W0D)/]T)##HP?K__X/$$.MK@+[VA@```74QB?>S`(!^$@!V/+D`
+M````#[;#P>`$NA````"-A#B0`0``B?:("$!*=?I#.%\2=^#K%8"^]H8```)U
+M#(/L#%7H''8``(/$$(/L"%;_="0LZ!3Z__^#Q`3_="0PZ/S___^#Q!"#Q"Q;
+M7E]=PY"#[`R+1"04BP"`N+()````=#;&@+()````QX"@"0``L.`'`(F`I`D`
+M`,>`J`D```````"#[`@%H`D``%#_="0<Z/S___^#Q!"#Q`S#55=64X/L'(I$
+M)#B(1"07BT0D-(MH$(M=#(U%##G8#X2Y````BT0D1+H``````T0D/!-4)$")
+M1"0(B50D#(UV`(G9#[9$)!<Y0Q0/A8````"+0Q"Z``````-#"!-3#(D$)(E4
+M)`2+1"0(BU0D#(MT)$`Y<PQW-G()BW0D/#ES"'<7.U0D!'<1<@4[!"1W"HG(
+MZ9(```"-=@"+="1`.7$,<B]W"8MT)#PY<0AR)#M4)`1R'G<%.P0D<A>+7"0\
+MBW0D0(E9"(EQ#"G8B4$0B<CK5XL;C44,.=@/A6/___^#[`R+1"0\!;0```!0
+MZ/S___^)P8/$$(7`="T/MD0D%XE!%(M$)#R+5"1`B4$(B5$,BU0D1(E1$(U%
+M#(M0!(E(!(D!B5$$B0J)R(/$'%M>7UW#D%575E.#[!R*1"0XB$0D%XM4)#2+
+M0A"-2`R)3"00BT@,BRD[3"00#X2;`0``BT0D1+H``````T0D/!-4)$")1"0(
+MB50D#(UV`(G/#[9$)!<Y010/A6`!``"+01"Z``````-!"!-1#(M<)`B+="0,
+MB1PDB70D!(MT)$`Y<0QR=G<)BW0D/#EQ"')7.50D!')1=P4Y!"1R2HM1!(L!
+MB5`$B0*)"8E)!(/L"%>+1"0\!;0```!0Z/S___\/MT<0B00D_W<,_W<(:@&+
+M1Q2+5"10_W2"2.C\____@\0@Z=D```"0BTPD0#E/#'=S<@F+="0\.7<(<U0Y
+M5"1`=TYR!CE$)#QS1CE4)`1R0'<%.00D<CF+3"0\BUPD0(E/"(E?#(/L#&8I
+MR`^WP%#_="10_W0D4&H!BT<4BUPD4/]T@TCH_/___X/$(.MRB?:+="1`.7<,
+M<F=W"8M<)#PY7PAR7#E4)`1W5G(%.00D<T^+="0$.7<,=T9R"(L4)#E7"',\
+MBT0D1`-$)#PK1PB)1Q"#[`R+1"10`T0D2&8K1P@/M\!0_W<,_W<(:@&+1Q2+
+M3"10_W2!2.C\____@\0@B>F+;0`[3"00#X6!_O__@\0<6UY?7<.055=64X/L
+M%(M<)"B+?"0L:$`>``#_,^C\____B<6+0Q"-<`R+2`R+&8/$$#GQ=#&0.7D4
+M=2.+402+`8E0!(D"B0F)202#[`A1C86T````4.C\____@\00D(G9BQLY\770
+M@\0,6UY?7<-55U93BU0D%(MT)!B+0BR+"`^V0`F+;($8BT)(*T$(P>`)#[=:
+M4,'C"8G"@>+_#P``B<?![PR)]KD`$```*=$YV78"B=F#?"0<`'0,B=`#1+T$
+MB48(ZQ:0B="Z``````-$_4035/U(B48(B58,B0XYV704QT8$`````(/&$$<I
+MR[H`````Z[''1@0!````N`$```!;7E]=PU=64XM4)!"*0@H"0@N(0@J-6@R^
+M`0```.L5B?:`>@H`>0JX`````.GR````_D(*#[9*"H/Y'W<0B?#3X(5"#`^5
+MP`^VP.M-D(/Y/W<3@^D@B?#3X(5#!`^5P`^VP.LUD(/Y7W<3@^E`B?#3X(5#
+M"`^5P`^VP.L=D+@`````@_E_=Q*#Z6")\-/@A4,,#Y7`#[;`B?:%P'2$QD(+
+M`8UZ#`^V6@J^`0```.L%B?;^0@L/MD(+C0P#@_D?=Q&)\-/@A4(,#Y7`#[;`
+MZTZ)]H/Y/W<3@^D@B?#3X(5'!`^5P`^VP.LUD(/Y7W<2@^E`B?#3X(5'"`^5
+MP`^VP.L=N`````"#^7]W$X/I8(GPT^"%1PP/E<`/ML"-=@"%P'60L`%;7E_#
+MB?955U93@^PDBW0D.(L&B40D'&A`'@``4.C\____B<6+7BR+.XM&2(M63(E$
+M)!B)5"0<#[=64(E4)!2*1EZ(0P:+0P0E_P#_`(/$$#T!`!``=1^#[`A2_W0D
+M&/]T)!@/MD,(4/\W5>AR^O__@\0@C78`@[_LA0```'0C@^P(5HN'[(4``/]P
+M!.C\____BX?LA0``BT`$_T@(@\00ZR&#[`A6BX7D````_W`$Z/S___^+A>0`
+M``"+0`3_2`B#Q!"`>P8!#X6%````4^@/_O__@\0$A<!T%,9#!@"#[`A35>BN
+M````@\00ZWF0@'L$`74^BD,(.$,)=58/MO")\,'@!(VT.)`%``"-2PR+!@M#
+M#(D&BT8$"T$$B48$BT8("T$(B48(BT8,"T$,B48,ZR"#[`C_="0,_W0D&/]T
+M)!@/MD,(4/\W5>C$^O__@\0@D,9#!0*#[`A3_W0D(.@S^?__@\00@\0<6UY?
+M7<-3@^P(BUPD%,9#"P#&0PH`4^A>_?__@^P$4_]T)!SH!0```(/$&%O#55=6
+M4X/L#(MT)""+?"0DBQ^+$P^V1PB+;()(@[OLA0```'1(BX/LA0``BT`$_T`(
+M@^P,BX/LA0``_W`$Z/S___^)P8N#[(4``(L`B0&+@^R%``"+0`2)002+@^R%
+M``"+0#2)032#Q!#K1HGVBX;D````BT`$_T`(@^P,BX;D````_W`$Z/S___^)
+MP8N&Y````(L`B0&+AN0```"+0`2)002+AN0```"+0#2)032#Q!"):2B`?P0!
+M=0>`25T"ZP60@$E=!`^V1PJZ``````-#"!-3#(E!2(E13&8/MD<+9HE!4,=!
+M9"35!P")>2S'06C@U@<`@^P,4>C\____@\0<6UY?7<-55U93@^P$BWPD'+X`
+M````O0````"+1"08B00DZP^#_7]V"8GPZ3D!``")]D6#_1]W%[@!````B>G3
+MX(M4)!B%`@^5P`^VP.M7@_T_=QB-3>"X`0```-/@BQ0DA4($#Y7`#[;`ZSJ#
+M_5]W&(U-P+@!````T^"+%"2%0@@/E<`/ML#K';@`````@_U_=Q.-3:"P`=/@
+MBQ0DA4(,#Y7`#[;`A<`/A';___^[`0```(M4)!CK`I!#C4P=`(/Y'W<2N`$`
+M``#3X(4"#Y7`#[;`ZU60@_D_=Q>#Z2"X`0```-/@A4($#Y7`#[;`ZSJ)]H/Y
+M7W<7@^E`N`$```#3X(5""`^5P`^VP.L>B?:X`````(/Y?W<2@^E@L`'3X(5"
+M#`^5P`^VP(GVA<!UC(GJ`=V)T,'H`X@$MXC0@^`'B$2W`;$(*,&(3+<"#[;!
+M.=AS!RG#`<)&Z]F(7+<"1H/]?P^&S/[__XGP@\0$6UY?7<.055=64X'L+`$`
+M`(N$)$0!``"+,(M8"(![%0`/A`0!``"#>Q``=0B)0Q#IY`$``,9#%0"-1"0@
+M4%/H5_[__XE$)!`/MD,4BU2&&(E4)!R+0Q`/MD`,BU2&&(E4)!B+E"1,`0``
+M#[9"#(M4AAB)5"04O0````"#Q`@[;"0(#XUV`0``C78`#[9$K"&)P\'C"0^V
+M3*PB#[94K"")V(MT)!`#1)8$B40D&(G8BW0D#`-$E@2)1"0<B=Z+1"04`W20
+M!(G/P><).70D&'435_]T)"!6Z'#D__^#Q`SK%8UV`%?_="0@_W0D(%;H'>3_
+M_X/$$+H"````@_H"=AR[`@```',5D%?_=)P<5N@YY/__@\0,0X/[`G+L13ML
+M)`@/C&7____ITP```(U$)"!04^AE_?__B40D$`^V0Q2+5(88B50D'(N4)$P!
+M```/MD(,BU2&&(E4)!B]`````(/$"#ML)`@/C9,````/MD2L(8G#P>,)#[9,
+MK"(/ME2L((G8BW0D%`-$E@2)1"08B=B+="00`T26!(E$)!R+="08B<_!YPDY
+M]G435_]T)"!6Z)CC__^#Q`SK%8UV`%?_="0@_W0D(%;H1>/__X/$$+@"````
+M@_@"=AR[`@```',5D%?_=)P<5NAAX___@\0,0X/[`G+L13ML)`@/C&W___^#
+M[`1J`/^T)$P!``#_M"1,`0``Z,D"``"#Q!"!Q"P!``!;7E]=PXUV`%575E.!
+M["P!``"+A"1$`0``BQB-1"0@4(N$)$@!``"#P`A0Z$S\__^)1"04BY0D3`$`
+M``^V0AB+=(,8B70D'`^V0AF+5(,8B50D&+T`````@\0(.VPD#`^-D@```(UV
+M``^V1*PAP>`)#[9<K"(/MDRL((G"BW0D%`-4C@2)5"08BU0D$`-$B@2)1"0<
+MBW0D&(G?P><).?9U$U?_="0@5NB`XO__@\0,ZQ6-=@!7_W0D(/]T)"!6Z"WB
+M__^#Q!"X`@```(/X`G8<NP(```!S%9!7_W2<'%;H2>+__X/$#$.#^P)R[$4[
+M;"0,#XQQ____@^P$:@#_M"1,`0``_[0D3`$``.BQ`0``@<0\`0``6UY?7<.)
+M]E575E.![#P#``"+A"14`P``BS"+6`B-A"0P`@``4%/H//O__XE$)"@/MD,4
+MBU2&&(E4)#2Q`(/$"(N\)%0#``"`?TP`=B6*7TR-=@`/ML&+K"14`P``#[94
+M!0R+5)88B92$,`$``$$XRW?AQT0D)`````"+1"0@.40D)`^-_0```(UV`(M4
+M)"0/MH24,0(``(G'P><)#[:$E#("``#!X`F)1"0HBH24,`(``(A$)`^Q`(N4
+M)%0#``"`>DP`=B`/MO"*6DP/ML&+E(0P`0``BVRR!(T4+XE4A#!!.,MWY@^V
+M1"0/B?V+5"0L`VR"!(U\)#"+A"14`P``#[9P3(M4)"B)5"0<@_X!=1.#[`12
+M_W0D.%7H_/___X/$$.M0.2]U%/]T)!S_=P15Z./@__^#Q`SK%(GV_W0D'/]W
+M!/\W5>B1X/__@\00@_X"=B&[`@```#GS<QC_="0<_S2?5>BOX/__@\0,0SGS
+M<NN-=@#_1"0DBWPD(#E\)"0/C`;___^#[`1J`/^T)%P#``#_M"1<`P``Z`X`
+M``"!Q$P#``!;7E]=PXUV`%=64XM\)!"+7"04BW0D&,9#!0*#_@$9P(/@]8/`
+M#(A#!H/L"%-7Z(WQ__^#Q!"`>P0#=3"+0PB+4!"%TG0FQT`0`````,9"!0*#
+M_@$9P(/@]8/`#(A"!H/L"%)7Z%?Q__^#Q!!;7E_#4X/L#(M<)!2+@]@```!J
+M`%!0Z/S___^#Q`QJ`/]T)!S_,^AQ____@\086\-3BTPD"(M<)`P/ME,'A=)T
+M2XUV``^VA%'4?P``C02`P>`$C80(M`D``(!X!0)T";@`````ZRN)]H!X!@%T
+M$L9#!0**0`:(0P:X`````.L2D`^VE%'5?P``A=)UN+@!````6\.055=64X/L
+M;(N\)(````#&A[()````@+_WA@````^$C@```+X`````C9^T"0``@+^Q"0``
+M`'11B?:`>P4!=3J`>P0#=26+0PB`>!4`=!R#>!``=!;'0!``````QD,%`HJ'
+M]H8``(A#!NL/QH>R"0```>F\!```C78`1H/#4`^VA[$)```Y\'^Q@^P,5^CD
+MZO__@\00Z9D$``"*0P:(A_:&``#&A_>&```!Z77___^-=@#'1"1H`````,=$
+M)&0!````O@````"-G[0)``"`O[$)````#X0K!```@'L%``^%[@$``%-7Z+/^
+M__^#Q`B%P`^$T`$``,9#!0&)7"1@BX>L"0``B40D7(/L"&A`'@``4.C\____
+M@\00#[93!(/Z"`^'H`$``/\DE4`C``"#[`C_="1H4.A@]O__@\00Z80!``"#
+M[`C_="1H_W0D:.C@^/__@\00Z6P!``"#[`C_="1H_W0D:.CH^O__@\00Z50!
+M``"#[`C_="1H_W0D:.CD^___@\00Z3P!``#&1Q4!#[97$XG0P>`$C80XD`$`
+M`(E$)%B)1"00BTPD8(/!"(L`BU0D8`M""(M4)%B)`HM4)!"+0@0+002+5"18
+MB4($BU0D$(M""`M!"(M4)%B)0@B+5"00BT(,"T$,BU0D6(E"#`^V1Q/!X`2-
+MA#B0!0``B40D5(E$)!"+$(M$)&`+4`B+1"14B1"+5"00BT($"T$$BU0D5(E"
+M!(M4)!"+0@@+00B+5"14B4((BU0D$(M"#`M!#(M4)%2)0@R#OQ"'````=0K'
+MAQ"'````````BT0D8,9`!0+&0`8!@^P(4/]T)&CH3^[__X/$$.M.@^P(_W0D
+M:%#H[?S__X/$$.L\#[9'$\'@!+D`````NA````"-A#B0!0``B`A`2G7ZBU0D
+M8,9"!0+&0@8!@^P(4O]T)&CH`>[__X/$$(GV@'L%`G4,_T0D:(GV@'L%`G0.
+MQT0D9`````#I#0(``)"`>P8!#X0"`@``@'\5``^$H/W__XL'#[93"(M$D$CV
+M@!P"```!#X3=`0``QT0D9`````#&0P4!QD,&`(E<)%"+AZP)``")1"1,@^P(
+M:$`>``!0Z/S___^#Q!`/ME,$@_H(#X>E`0``_R259",``(/L"/]T)%A0Z#GT
+M__^#Q!#IB0$``(/L"/]T)%C_="18Z+GV__^#Q!#I<0$``(/L"/]T)%C_="18
+MZ,'X__^#Q!#I60$``(/L"/]T)%C_="18Z+WY__^#Q!#I00$``,9'%0$/ME<3
+MB=#!X`2-A#B0`0``B40D2(E$)!"+3"10@\$(BP"+5"10"T((BU0D2(D"BU0D
+M$(M"!`M!!(M4)$B)0@2+5"00BT(("T$(BU0D2(E""(M4)!"+0@P+00R+5"1(
+MB4(,#[9'$\'@!(V$.)`%``")1"1$B40D$(L0BT0D4`M0"(M$)$2)$(M4)!"+
+M0@0+002+5"1$B4($BU0D$(M""`M!"(M4)$2)0@B+5"00BT(,"T$,BU0D1(E"
+M#(._$(<```!U"L>'$(<```````"+1"10QD`%`L9`!@&#[`A0_W0D6.@H[/__
+M@\00ZU.#[`C_="184.C&^O__@\00ZT$/MD<3P>`$N0````"Z$````(V$.)`%
+M``"("$!*=?J+5"10QD(%`L9"!@&#[`A2_W0D6.C:Z___@\00ZP60QD,&`4:#
+MPU`/MH>Q"0``.?`/C]7[__^#?"1H``^%HOO__X-\)&0`=!7&A_:&```!@^P,
+M5^A/YO__@\00ZP?&A[()```!@\1L6UY?7<.-=@!55U93@>R4````BX0DJ```
+M`(L`B40D9(N4)*@```"+DNR%``")5"1@:$`>``"+C"2L````_[&L"0``Z/S_
+M__^+7"1LBUL0B5PD9(VP>`,``(ET)&`%>`<``(E$)%S&1"1-`,9$)$P`_T,$
+MBT0D;("('`(``""+3"1LBU%`BTE$B50D&(E,)!R#Q!"+7"1<BX-,`0``BY-0
+M`0``B[0DH````#M6#'="<@4[1@AW.XM$)%R+<#B+>#R)^@GR=!:+1"0("?"+
+M5"0,"?J)1"0(B50D#.L5BTPD7/:!2`$```)T",9$)#P!C78`BUPD#`M<)`AT
+M4+T`````O@$```"_`````.L!18GPB?J)Z0^E\M/@]L$@=`>)PK@`````(T0D
+M""-4)`R)TPG#=-J+M"2@````B(ZP"0``ZQBX`0```.F>````BX0DH````,:`
+ML`D``$"+E"2@````QH*Q"0```,:"U'\```#&@O:&````QH+WA@```,>"#(<`
+M``````#&@K,)````@'H5``^$.P$``(G6L0"`>A(`=D,/ML'!X`0!\(V0D`$`
+M`+L`````@[B0`0```'44@WH$`'4.@WH(`'4(@WH,`'0'B?:[`0```(7;#X5C
+M____03A.$G>]N`````"%P`^$G`<``,9$)#\`BXPDH````(!Y$@`/AL(T``")
+M]@^V1"0_P>`$`X0DH````(V0D`$``(N`D`$``(E$)'"+0@2)1"1TBT((B40D
+M>(M"#(E$)'R*7"0_B[0DH````#B>L`D``'1EN`````"#?"1P`'45@WPD=`!U
+M#H-\)'@`=0>#?"1\`'0%N`$```"%P'0[_[0DH````.B'VO__@\0$QD`$`HI4
+M)#^(4`B(4`F+5"1PB5`,BU0D=(E0$(M4)'B)4!2+5"1\B5`8B?;^1"0_BDPD
+M/XN<)*`````X2Q(/ASS____I]S,``(NT)*````"`OK`)``!`#X6H!```B?"+
+M7@B+=@P/MU`0BTPD7(MY$(M/#(U'##G(=%")T+H``````=@1\HE$)!")5"04
+MC6\,B<^+01"Z``````-!"!-1##GR<B!W!#G8=AJ+1"00BU0D%#M7#'(-=P4[
+M1PAV!HGXZPV)]HL).<UUQK@`````BYPDH````(F##(<``(7`#X0A!```N0``
+M``"Z$````(U$)'")]H@(0$IU^HNT)*````"+A@R'``"+4`@K5@B+<!"_````
+M`(/Z'W=)B?D/ML&-7(1PB=6Y(````"G1.?%V`HGQ@_D@=0C'`______K#K@!
+M````T^!(B>G3X`D#N"`````IT#GP<Q:-=!;@N@````#K`X/J($>)^X#[`W:G
+MBX0DH````(I`$XA$)#N+E"2@````B(+0A0``QH+1A0```(M$)'")@KR%``"+
+M1"1TB8+`A0``BT0D>(F"Q(4``(M$)'R)@LB%``#'@LR%````````B=.!P[R%
+M``!2Z+38__^#Q`3&0`0#B5@(BDPD.XA(#(G%QD0D/P"+G"2@````@'L2``^&
+M<@(``('#O(4``(E<)#20#[94)#^+M"2@````BX8,AP``.U`4#X0T`@``B=;!
+MY@2+E"2@````C006C9B0!0``C8B0`0``BY"0`0``]](CD)`%``")5"1@BT$$
+M]]`C0P2)1"1DBT$(]]`C0PB)1"1HBT$,]]`C0PR)1"1LBUPD3(T,'O?2(U0D
+M<(D1BT0D9/?0(T0D=(E!!(M$)&CWT"-$)'B)00B+1"1L]]`C1"1\B4$,N```
+M``"#.0!U$H-Y!`!U#(-Y"`!U!H-Y#`!T!;@!````A<`/A`X!``"+M"2@````
+MBEX2#[9T)#^)\,'@!(M4)$R--!#_M"2@````Z([7__^#Q`3&0`0!BDPD/XA(
+M"(A8"8L6B5`,BU8$B5`0BU8(B5`4BU8,B5`8B<>+"/Z!U'\```^VF=1_``")
+MZBG*@>JT"0``P?H$C022C02`C01"B<+!X@@!T(G"P>(0`=#WV(B$6=1_``"*
+M1P>(A%G5?P``B%\'B[0DH````(I>$E;H"]?__X/$!,9`!`.+5"0TB5`(B%@,
+MB40D2(L(_H'4?P``#[:9U'\``(GZ*<J!ZK0)``#!^@2-!)*-!("-!$*)PL'B
+M"`'0B<+!XA`!T/?8B(19U'\``(MT)$B*1@>(A%G5?P``B%X'ZW+_M"2@````
+MZ)O6__^#Q`3&0`0#BU0D-(E0"(I,)#^(2`R)1"1(BPC^@=1_```/MIG4?P``
+MB>HIRH'JM`D``,'Z!(T$DHT$@(T$0HG"P>((`=")PL'B$`'0]]B(A%G4?P``
+MBW0D2(I&!XB$6=5_``"(7@>+;"1(_D0D/XI$)#^+E"2@````.$(2#X>9_?__
+MBXPDH````(N!#(<``(M8%(I!$XA$)#-1Z/S5__^#Q`3&0`0"B%@(BE0D,XA0
+M"8M4)'")4`R+5"1TB5`0BU0D>(E0%(M4)'R)4!B)QHL(_H'4?P``#[:9U'\`
+M`(GJ*<J!ZK0)``#!^@2-!)*-!("-!$*)PL'B"`'0B<+!XA`!T/?8B(19U'\`
+M`(I&!XB$6=5_``"(7@?I.R\``(-\)%@`#X0`&```BTPD6(!Y7`$/A1(*```/
+MMD%2@_@"#X2.!0``@_@"?PZ#^`$/A&,!``#I`B\``(/X`P^%^2X``+D`````
+MNA````"-1"1PB`A`2G7ZOP````"+M"2@````#[=>$+X`````@_\?=TF)\@^V
+MPHU4A'")_;D@````*?DYV78"B=F#^2!U",<"_____^L.N`$```#3X$B)Z=/@
+M"0*X(````"GX.=AS%8U<.^"_`````.L#@^\@1HGP/`-VJ(N4)*````#_<ACH
+MI=+__\9$)$,`@\0$BXPDH````(!Y$@`/AE`N``"[``````^V1"0_P>`$NA``
+M``"+M"2@````C80PD`$``(@80$IU^@^V1"0_P>`$N0````"Z$````(NT)*``
+M``"-A#"0!0``B?:("$!*=?K_M"2@````Z#K4__^#Q`3&0`0"BE0D/XA0",9`
+M"0"+5"1PB5`,BU0D=(E0$(M4)'B)4!2+5"1\B5`8_D0D/XI,)#^+M"2@````
+M.$X2#X=E____Z:LM``"X`0```.M1B[0DH````+$`@'X2`'8]#[;!P>`$`?"-
+MD)`!``"[`````(.XD`$```!U$H-Z!`!U#(-Z"`!U!H-Z#`!T!;L!````A=MU
+MLT$X3A)WP[@`````A<!T$XN$)*````#&@+,)```!Z0P6``"Y`````+H0````
+MC40D<(GVB`A`2G7ZOP````"+E"2@````#[=:$+X`````D(/_'W=)B?$/ML&-
+M5(1PB?VY(````"GY.=EV`HG9@_D@=0C'`O_____K#K@!````T^!(B>G3X`D"
+MN"`````I^#G8<Q6-7#O@OP````#K`X/O($:)\#P#=JB+E"2@````@+JP"0``
+M0'4)BD(3B(*P"0``BXPDH````(J9L`D``(B9T(4``,:!T84```&+1"1PB8&\
+MA0``BT0D=(F!P(4``(M$)'B)@<2%``"+1"1\B8'(A0``QX',A0```````%'H
+MD=+__X/$!,9`!`*(6`B(6`F+5"1PB5`,BU0D=(E0$(M4)'B)4!2+5"1\B5`8
+MB<:+G"2@````@'L2`@^'2@$``('#O(4``/^T)*````#H0]+__X/$!,9`!`6)
+M6`C&0$P`B40D2(L._H'4?P``#[:9U'\``(G"*<J!ZK0)``#!^@2-!)*-!("-
+M!$*)PL'B"`'0B<+!XA`!T/?8B(19U'\``(I&!XB$6=5_``"(7@?&1"0_`(NT
+M)*````"`?A(`#X:.*P``BD0D/XN4)*`````X@K`)```/A),```!2Z+71__^#
+MQ`3&0`0!BDPD/XA("(A("8M4)'")4`R+5"1TB5`0BU0D>(E0%(M4)'R)4!B+
+M7"1(BE-,#[;*BEPD/XMT)$B(7`X,0HA63(L._H'4?P``#[:9U'\``"G(+;0)
+M``#!^`2-%("-%)*-%%")T,'@"`'"B=#!X!`!PO?:B)19U'\``(I&!XB$6=5_
+M``"(7@?^1"0_BD0D/XN4)*`````X0A(/AS[____IQRH``,9$)#\`BXPDH```
+M`(!Y$@`/AK$J``")S8'%O(4``)"*7"0_BX0DH````#B8L`D```^$Y@```%#H
+MS]#__X/$!,9`!`&(6`B(6`F+5"1PB5`,BU0D=(E0$(M4)'B)4!2+5"1\B5`8
+MB<?_M"2@````Z)C0__^#Q`3&0`0#B6@(B%@,B40D2(L(_H'4?P``#[:9U'\`
+M`(GZ*<J!ZK0)``#!^@2-!)*-!("-!$*)PL'B"`'0B<+!XA`!T/?8B(19U'\`
+M`(M4)$B*0@>(A%G5?P``B%H'BP[^@=1_```/MIG4?P``BU0D2"G*@>JT"0``
+MP?H$C022C02`C01"B<+!X@@!T(G"P>(0`=#WV(B$6=1_``"*1@>(A%G5?P``
+MB%X'_D0D/XI,)#^+G"2@````.$L2#X?K_O__Z8XI``"X`0```.M1B[0DH```
+M`+$`@'X2`'8]#[;!P>`$`?"-D)`!``"[`````(.XD`$```!U$H-Z!`!U#(-Z
+M"`!U!H-Z#`!T!;L!````A=MULT$X3A)WP[@`````A<!T$XNT)*````#&AK,)
+M```!Z>\1``#_M"2@````Z%?/__^)1"1$QD`$!X/$!+D`````NA````"-1"1P
+MB`A`2G7ZOP````"+A"2@````#[=8$+X`````@_\?=TF)\@^VPHU4A'")_;D@
+M````*?DYV78"B=F#^2!U",<"_____^L.N`$```#3X$B)Z=/@"0*X(````"GX
+M.=AS%8U<.^"_`````.L#@^\@1HGP/`-VJ(N4)*````"*0A.(@M"%``#&@M&%
+M````BT0D<(F"O(4``(M$)'2)@L"%``"+1"1XB8+$A0``BT0D?(F"R(4``,>"
+MS(4```````"`>A("#X=9`0``B=.!P[R%``!2Z&K.__^#Q`3&0`0%B5@(QD!,
+M`(E$)$B+"/Z!U'\```^VF=1_``"+5"1`*<J!ZK0)``#!^@2-!)*-!("-!$*)
+MPL'B"`'0B<+!XA`!T/?8B(19U'\``(MT)$B*1@>(A%G5?P``B%X'BY0DH```
+M`(I"$XA&#,9&3`'&1"0_`(!Z$@`/AJ4G``#_M"2@````Z-W-__^#Q`3&0`0!
+MBDPD/XA("(A("8M4)'")4`R+5"1TB5`0BU0D>(E0%(M4)'R)4!B+7"1`BPO^
+M@=1_```/MIG4?P``*<@MM`D``,'X!(T4@(T4DHT44(G0P>`(`<*)T,'@$`'"
+M]]J(E%G4?P``BW0D0(I&!XB$6=5_``"(7@>*1"0_BY0DH````#A"$W06BTPD
+M2(I!3`^VT(I<)#^(7!$,0(A!3/Y$)#^*1"0_BY0DH````#A"$@^'.____^G;
+M)@``BXPDH````(I9$U'H#\W__X/$!,9`!`&(6`B(6`F+5"1PB5`,BU0D=(E0
+M$(M4)'B)4!2+5"1\B5`8BUPD0(L+_H'4?P``#[:9U'\``"G(+;0)``#!^`2-
+M%("-%)*-%%")T,'@"`'"B=#!X!`!PO?:B)19U'\``(MT)$"*1@>(A%G5?P``
+MB%X'QD0D/P"+A"2@````@'@2``^&/B8``(G&@<:\A0``BE0D/XN,)*`````X
+M41,/A.X```!1Z&#,__^#Q`3&0`0!BEPD/XA8"(A8"8M4)'")4`R+5"1TB5`0
+MBU0D>(E0%(M4)'R)4!B)Q_^T)*````#H)<S__X/$!,9`!`.)<`B(6`R)1"1(
+MBPC^@=1_```/MIG4?P``B?HIRH'JM`D``,'Z!(T$DHT$@(T$0HG"P>((`=")
+MPL'B$`'0]]B(A%G4?P``BU0D2(I"!XB$6=5_``"(6@>+"OZ!U'\```^VF=1_
+M``"+5"1`*<J!ZK0)``#!^@2-!)*-!("-!$*)PL'B"`'0B<+!XA`!T/?8B(19
+MU'\``(M4)$B*0@>(A%G5?P``B%H'_D0D/XI,)#^+G"2@````.$L2#X?F_O__
+MZ1<E``"X`0```.MO@WPD6``/A-4-``"+="18BD9=J`(/A,8-``"H"'1HB[0D
+MH````+$`@'X2`'8]#[;!P>`$`?"-D)`!``"[`````(.XD`$```!U$H-Z!`!U
+M#(-Z"`!U!H-Z#`!T!;L!````A=MUE4$X3A)WP[@`````A<!T$XN$)*````#&
+M@+,)```!Z5H-``"+E"2@````BI+TA@``B%0D/XN,)*`````XD?6&```/@E0"
+M``"*7"0_B[0DH````#A>$P^$)0(```^VP\'@!+D`````NA````"+7"10C008
+MC78`B`A`2G7Z#[9L)#^)ZHGHP>`$BW0D4(TL,(N$)*`````/MYR0](4```^W
+MM)#VA0``OP````"-=@"#^Q]W3XGZ#[;"C52%`(E<)"RY(````"G9.?%V`HGQ
+M@_D@=0C'`O_____K$+@!````T^!(BDPD+-/@"0*X(````"G8.?!S%XUT'N"[
+M`````.L%B?:#ZR!'B?@\`W:B#[9<)#^)V,'@!(M,)$R-'`B)QHM$)%"-#`:+
+MA"2@````C90&D`4``(L"]]`C`8D#BT($]]`C002)0P2+0@CWT"-!"(E#"(M"
+M#/?0(T$,B4,,BE0D/XN,)*`````XD;`)```/A0T!``"+7"1,C00>N@````"#
+M.`!U$H-X!`!U#(-X"`!U!H-X#`!T!;H!````A=(/A-T```#&1"0]`8MT)%2#
+M?AQ`#X;*````#[9L)#^)Z,'@!(M4)$R-+!"_`````(N,)*`````/MUD0O@``
+M``"#_Q]W38GR#[;"C52%`(E\)"BY(````"GY.=EV`HG9@_D@=0C'`O_____K
+M$+@!````T^!(BDPD*-/@"0*X(````"GX.=AS%8U<.^"_`````.L#@^\@1HGP
+M/`-VI`^V7"0_B=C!X`2+3"1,C1P(B[0DH````(V4,)`%``"+`O?0(P.)`XM"
+M!/?0(T,$B4,$BT((]]`C0PB)0PB+0@SWT"-##(E##/Y$)#^*1"0_BY0DH```
+M`#B"]88```^#K/W__X!\)#T`#X1E"```N0````"Z$````(U$)'"0B`A`2G7Z
+MQD0D/P"+C"2@````@'D2`'9IBEPD/XNT)*`````XGK`)``!T0CA>$W0]#[;3
+MP>($`?*-BI`!``"+1"1P"X*0`0``B40D<(M$)'0+002)1"1TBT0D>`M!"(E$
+M)'B+1"1\"T$,B40D?/Y$)#^*1"0_BY0DH````#A"$G>7BXPDH`````^VN;`)
+M``")^,'@!(M<)$R-/!B+1"1P(P>)1"1@BU0D="-7!(E4)&2+3"1X(T\(B4PD
+M:(M<)'PC7PR)7"1L]]`C!XE$)'#WTB-7!(E4)'3WT2-/"(E,)'CWTR-?#(E<
+M)'S_M"2@````Z$?'__^#Q`3&0`0`B40D0+@`````@WPD<`!U%8-\)'0`=0Z#
+M?"1X`'4'@WPD?`!T!;@!````A<`/A%0#``"+M"2@````BH:P"0``B(;0A0``
+MBT0D<(F&O(4``(M$)'2)AL"%``"+1"1XB8;$A0``BT0D?(F&R(4``,:&T84`
+M``''ALR%````````@'X2`G=SB?.!P[R%``!6Z*[&__^#Q`3&0`0%B5@(QD!,
+M`(E$)$B+1"1`BPC^@=1_```/MIG4?P``BU0D2"G*@>JT"0``P?H$C022C02`
+MC01"B<+!X@@!T(G"P>(0`=#WV(B$6=1_``"+5"1`BD('B(19U7\``(A:!\9$
+M)#\`BXPDH````(!Y$@`/ADL#``"*7"0_B[0DH````#B>L`D```^$10(``#B>
+M](8``'<-.)[UA@``<@4X7A-U4`^V1"0_P>`$BU0D3(T,$`.$)*````"-D)`%
+M``"+@)`%``#WT"-$)'")`8M"!/?0(T0D=(E!!(M""/?0(T0D>(E!"(M"#/?0
+M(T0D?(E!#.ME#[9<)#^)V,'@!(MT)$R-'#")P8M$)'`+`XD#BT0D=`M#!(E#
+M!(M$)'@+0PB)0PB+1"1\"T,,B4,,BX0DH````(V,`9`%``"+`??0(0.+003W
+MT"%#!(M!"/?0(4,(BT$,]]`A0PR+E"2@````@'H2`G<;BTPD2(I!3`^VT(I<
+M)#^(7!$,0(A!3.F+````BYPDH````('#O(4``/^T)*````#H$<7__X/$!,9`
+M!`.)6`B*5"0_B%`,B40D2(N,)*`````X41-U48M<)$"+"_Z!U'\```^VF=1_
+M``")PBG*@>JT"0``P?H$C022C02`C01"B<+!X@@!T(G"P>(0`=#WV(B$6=1_
+M``"+="1`BD8'B(19U7\``(A>!P^V1"0_P>`$`T0D3+H`````@S@`=1*#>`0`
+M=0R#>`@`=0:#>`P`=`6Z`0```(72#X23````#[9<)#^)V,'@!(M4)$R-'!#_
+MM"2@````Z$W$__^#Q`3&0`0!BDPD/XA("(A("8L3B5`,BU,$B5`0BU,(B5`4
+MBU,,B5`8BUPD2(L+_H'4?P``#[:9U'\``"G(+;0)``#!^`2-%("-%)*-%%")
+MT,'@"`'"B=#!X!`!PO?:B)19U'\``(MT)$B*1@>(A%G5?P``B%X'_D0D/XI$
+M)#^+E"2@````.$(2#X>,_?__Z=(```#&1"0_`(N,)*````"`>1(`#X:\````
+MBEPD/XNT)*`````XGO2&```/AXT````XGO6&```/@H$````X7A-T?#B>L`D`
+M`'1T#[;#P>`$`T0D3+H`````@S@`=1*#>`0`=0R#>`@`=0:#>`P`=`6Z`0``
+M`(72=$4/MEPD/XG8P>`$BU0D3(T<$/^T)*````#H*,/__X/$!,9`!`&*3"0_
+MB$@(B$@)BQ.)4`R+4P2)4!"+4PB)4!2+4PR)4!C^1"0_BEPD/XNT)*`````X
+M7A(/AT3___^X`````(-\)&``=16#?"1D`'4.@WPD:`!U!X-\)&P`=`6X`0``
+M`(7`#X1V'```BX0DH````(J`L`D``(A$)">+E"2@````B(+HA0``BT0D8(F"
+MU(4``(M$)&2)@MB%``"+1"1HB8+<A0``BT0D;(F"X(4``,:"Z84```#'@N2%
+M````````BEH34NA:PO__@\0$QD`$`8A8"(I,)">(2`F+5"1@B5`,BU0D9(E0
+M$(M4)&B)4!2+5"1LB5`8B40D1+T`````QD0D/P"+G"2@````@'L2``^&W@$`
+M`(I$)#^+E"2@````.(*P"0``#X2O`0``.$(3#X2F`0``BEH34NCEP?__@\0$
+MQD`$`8I,)#^(2`B(6`F+5"1@B5`,BU0D9(E0$(M4)&B)4!2+5"1LB5`8B<>+
+M"/Z!U'\```^VF=1_``"+5"1`*<J!ZK0)``#!^@2-!)*-!("-!$*)PL'B"`'0
+MB<+!XA`!T/?8B(19U'\``(I'!XB$6=5_``"(7P>%[71)BP_^@=1_```/MIG4
+M?P``B>HIRH'JM`D``,'Z!(T$DHT$@(T$0HG"P>((`=")PL'B$`'0]]B(A%G4
+M?P``BD<'B(19U7\``(A?!XN<)*````"!P]2%``"+A"2@````BD`3B$0D)O^T
+M)*````#H]\#__X/$!,9`!`.)6`B*5"0FB%`,B40D2(G%BPC^@=1_```/MIG4
+M?P``B?HIRH'JM`D``,'Z!(T$DHT$@(T$0HG"P>((`=")PL'B$`'0]]B(A%G4
+M?P``BW0D2(I&!XB$6=5_``"(7@>+#OZ!U'\```^VF=1_``"+5"1$*<J!ZK0)
+M``#!^@2-!)*-!("-!$*)PL'B"`'0B<+!XA`!T/?8B(19U'\``(I&!XB$6=5_
+M``"(7@?^1"0_BD0D/XN4)*`````X0A(/AR+^__^+G"2@````#[9+$XG(P>`$
+MC8P8D`4``(M$)&#WT",!B0&+1"1D]]`C002)002+1"1H]]`C00B)00B+1"1L
+M]]`C00R)00SIHAD``(MT)%2#?AQ`#X:;`0``QD0D/P"+A"2@````@'@2``^&
+M?AD``(I4)#^+C"2@````.)&P"0``#X11`0``#[;"P>`$N0````"Z$````(M<
+M)$R-!!B("$!*=?H/MG0D/XGPP>`$`T0D3(E$)""_`````(N$)*`````/MU@0
+MO@````"#_Q]W3(GR#[;"BTPD((T4@8G]N2`````I^3G9=@*)V8/Y('4(QP+_
+M____ZPZX`0```-/@2(GIT^`)`K@@````*?@YV',5C5P[X+\`````ZP.#[R!&
+MB?`\`W:E#[9,)#^)R,'@!(M<)$R-#!B+M"2@````C90PD`4``(L"]]`C`8D!
+MBT($]]`C002)002+0@CWT"-!"(E!"(M"#/?0(T$,B4$,N`````"#.0!U$H-Y
+M!`!U#(-Y"`!U!H-Y#`!T!;@!````A<!T10^V7"0_B=C!X`2+5"1,C1P0_[0D
+MH````.B"OO__@\0$QD`$`8I,)#^(2`B(2`F+$XE0#(M3!(E0$(M3"(E0%(M3
+M#(E0&/Y$)#^*7"0_B[0DH````#A>$@^'@/[__^GY%P``BX0DH````(J`](8`
+M`(A$)#^+E"2@````.(+UA@``#X+5%P``BDPD/XN<)*`````X2Q-T=`^VP<'@
+M!`-$)$RZ`````(,X`'42@W@$`'4,@W@(`'4&@W@,`'0%N@$```"%TG1%#[9<
+M)#^)V,'@!(MT)$R-'##_M"2@````Z+V]__^#Q`3&0`0!BE0D/XA0"(A0"8L3
+MB5`,BU,$B5`0BU,(B5`4BU,,B5`8_D0D/XI,)#^+G"2@````.(OUA@``#X-A
+M____Z3$7``"0B[0DH````("^L`D``#\/AFT,``"Y`````+H0````C40D<(GV
+MB`A`2G7ZQD0D/@#&1"0_`(N$)*````"`>!(`#X:I````C78`BE0D/XN,)*``
+M```X41-T?@^VPL'@!`'(C9"0`0``N0````"#N)`!````=1*#>@0`=0R#>@@`
+M=0:#>@P`=`6Y`0```(7)=$</ME0D/XG0P>`$BYPDH````(V4&)`!``"+1"1P
+M"P*)1"1PBT0D=`M"!(E$)'2+1"1X"T((B40D>(M$)'P+0@R)1"1\_D0D/OY$
+M)#^*1"0_BY0DH````#A"$@^'6O___P^V5"0^BXPDH`````^V01*#Z`/1^#G"
+M?PN`?"0\``^$3`8``(NT)*````"*7A.(GM"%``"+1"1PB8:\A0``BT0D=(F&
+MP(4``(M$)'B)AL2%``"+1"1\B8;(A0``QH;1A0```<>&S(4```````!6Z!.\
+M__^#Q`3&0`0"B%@(B%@)BU0D<(E0#(M4)'2)4!"+5"1XB5`4BU0D?(E0&(G&
+M_[0DH````.C<N___@\0$QD`$!HM4)'")4`B+5"1TB5`,BU0D>(E0$(M4)'R)
+M4!2)1"1`BP[^@=1_```/MIG4?P``B<(IRH'JM`D``,'Z!(T$DHT$@(T$0HG"
+MP>((`=")PL'B$`'0]]B(A%G4?P``BD8'B(19U7\``(A>!XN$)*````"`>!("
+M#X>H`@``B<.!P[R%``!0Z$V[__^#Q`3&0`0%B5@(QD!,`(E$)$B+5"1`BPK^
+M@=1_```/MIG4?P``B<(IRH'JM`D``,'Z!(T$DHT$@(T$0HG"P>((`=")PL'B
+M$`'0]]B(A%G4?P``BW0D0(I&!XB$6=5_``"(7@?&1"0_`(N$)*````"`>!(`
+M#X:0%```BE0D/XN,)*`````X41,/A/`!``"+7"1(BD-,#[;0BDPD/XA,$PQ`
+MB$-,#[;!P>`$BUPD3(T,&`.$)*````"-D)`%``"+@)`%``#WT"-$)'")`8M"
+M!/?0(T0D=(E!!(M""/?0(T0D>(E!"(M"#/?0(T0D?(E!#+@`````@SD`=1*#
+M>00`=0R#>0@`=0:#>0P`=`6X`0```(7`#X23````#[9<)#^)V,'@!(MT)$R-
+M'##_M"2@````Z!BZ__^#Q`3&0`0!BE0D/XA0"(A0"8L3B5`,BU,$B5`0BU,(
+MB5`4BU,,B5`8BUPD2(L+_H'4?P``#[:9U'\``"G(+;0)``#!^`2-%("-%)*-
+M%%")T,'@"`'"B=#!X!`!PO?:B)19U'\``(MT)$B*1@>(A%G5?P``B%X'#[9$
+M)#_!X`2+E"2@````C800D`$``+H`````@S@`=1*#>`0`=0R#>`@`=0:#>`P`
+M=`6Z`0```(72#X23````#[9<)#^)V,'@!(N,)*````"-G`B0`0``4>A%N?__
+M@\0$QD`$`HI4)#^(4`B(4`F+$XE0#(M3!(E0$(M3"(E0%(M3#(E0&(G&BPC^
+M@=1_```/MIG4?P``BU0D0"G*@>JT"0``P?H$C022C02`C01"B<+!X@@!T(G"
+MP>(0`=#WV(B$6=1_``"*1@>(A%G5?P``B%X'_D0D/XI,)#^+G"2@````.$L2
+M#X?D_?__Z6\2``#&1"0_`(NT)*````"`?A(`#X99$@``BD0D/XN4)*`````X
+M0A,/A%8"```/ML#!X`2+3"1,C30(`="-D)`%``"+@)`%``#WT"-$)'")!HM"
+M!/?0(T0D=(E&!(M""/?0(T0D>(E&"(M"#/?0(T0D?(E&#(N<)*````"!P[R%
+M``#_M"2@````Z"FX__^#Q`3&0`0#B5@(BEPD/XA8#(E$)$B+1"1`BPC^@=1_
+M```/MIG4?P``BU0D2"G*@>JT"0``P?H$C022C02`C01"B<+!X@@!T(G"P>(0
+M`=#WV(B$6=1_``"+5"1`BD('B(19U7\``(A:![@`````@SX`=1*#?@0`=0R#
+M?@@`=0:#?@P`=`6X`0```(7`#X23````#[9<)#^)V,'@!(M,)$R-'`C_M"2@
+M````Z'NW__^#Q`3&0`0!BE0D/XA0"(A0"8L3B5`,BU,$B5`0BU,(B5`4BU,,
+MB5`8BUPD2(L+_H'4?P``#[:9U'\``"G(+;0)``#!^`2-%("-%)*-%%")T,'@
+M"`'"B=#!X!`!PO?:B)19U'\``(MT)$B*1@>(A%G5?P``B%X'#[9$)#_!X`2+
+ME"2@````C800D`$``+H`````@S@`=1*#>`0`=0R#>`@`=0:#>`P`=`6Z`0``
+M`(72#X23````#[9<)#^)V,'@!(N,)*````"-G`B0`0``4>BHMO__@\0$QD`$
+M`HI4)#^(4`B(4`F+$XE0#(M3!(E0$(M3"(E0%(M3#(E0&(G&BPC^@=1_```/
+MMIG4?P``BU0D0"G*@>JT"0``P?H$C022C02`C01"B<+!X@@!T(G"P>(0`=#W
+MV(B$6=1_``"*1@>(A%G5?P``B%X'_D0D/XI,)#^+G"2@````.$L2#X=^_?__
+MZ=(/``"+M"2@````#[96$XG0P>`$C90PD`4``(L"]]`C1"1PB40D8(M"!/?0
+M(T0D=(E$)&2+0@CWT"-$)'B)1"1HBT(,]]`C1"1\B40D;+@`````@WPD8`!U
+M%8-\)&0`=0Z#?"1H`'4'@WPD;`!T!;@!````A<!T/XN$)*````"*6!-0Z)*U
+M__^#Q`3&0`0!B%@(B%@)BU0D8(E0#(M4)&2)4!"+5"1HB5`4BU0D;(E0&(E$
+M)$3K%_^T)*````#H5[7__X/$!,9`!`")1"1$BY0DH````(I:$U+H/+7__X/$
+M!,9`!`*(6`B(6`F+5"1PB5`,BU0D=(E0$(M4)'B)4!2+5"1\B5`8B<;_M"2@
+M````Z`6U__^#Q`3&0`0&BU0D<(E0"(M4)'2)4`R+5"1XB5`0BU0D?(E0%(E$
+M)$"+#OZ!U'\```^VF=1_``")PBG*@>JT"0``P?H$C022C02`C01"B<+!X@@!
+MT(G"P>(0`=#WV(B$6=1_``"*1@>(A%G5?P``B%X'QD0D/P"+C"2@````@'D2
+M``^&.PX``(I<)#^+M"2@````.%X3#X1;`P``#[;#P>`$`?"-D)`!``"Y````
+M`(.XD`$```!U$H-Z!`!U#(-Z"`!U!H-Z#`!T!;D!````A<D/A"`#``#^3"0^
+MBD0D/HN4)*````"*4A*-+!`/MEPD/XG>B=C!X`2+C"2@````C9P(D`$``%'H
+M^[/__X/$!,9`!`&*5"0_B%`(B>F(2`F+$XE0#(M3!(E0$(M3"(E0%(M3#(E0
+M&(G'BYPDH````(I;$XA<)!_!Y@2+A"2@````C9P&D`$``%#HJK/__X/$!,9`
+M!`2*5"0?B%`8B>F(2!F+$XE0"(M3!(E0#(M3"(E0$(M3#(E0%(E$)$B+"/Z!
+MU'\```^VF=1_``"+5"1$*<J!ZK0)``#!^@2-!)*-!("-!$*)PL'B"`'0B<+!
+MXA`!T/?8B(19U'\``(M4)$B*0@>(A%G5?P``B%H'BPK^@=1_```/MIG4?P``
+MB?HIRH'JM`D``,'Z!(T$DHT$@(T$0HG"P>((`=")PL'B$`'0]]B(A%G4?P``
+MBU0D2(I"!XB$6=5_``"(6@>+7"1`BPO^@=1_```/MIG4?P``BU0D2"G*@>JT
+M"0``P?H$C022C02`C01"B<+!X@@!T(G"P>(0`=#WV(B$6=1_``"+5"1`BD('
+MB(19U7\``(A:!XN,)*````"*21.(3"0>BX0DH````(V<!I`!``!0Z&NR__^#
+MQ`3&0`0$BE0D'HA0&(I,)#^(2!F+$XE0"(M3!(E0#(M3"(E0$(M3#(E0%(E$
+M)$B+"/Z!U'\```^VF=1_``"+5"1$*<J!ZK0)``#!^@2-!)*-!("-!$*)PL'B
+M"`'0B<+!XA`!T/?8B(19U'\``(M4)$B*0@>(A%G5?P``B%H'BUPD0(L+_H'4
+M?P``#[:9U'\``(M4)$@IRH'JM`D``,'Z!(T$DHT$@(T$0HG"P>((`=")PL'B
+M$`'0]]B(A%G4?P``BU0D0(I"!XB$6=5_``"(6@>+C"2@````C;0.D`$``%'H
+MA;'__X/$!,9`!`**7"0_B%@(B%@)BQ:)4`R+5@2)4!"+5@B)4!2+5@R)4!B)
+MQHL(_H'4?P``#[:9U'\``(M4)$`IRH'JM`D``,'Z!(T$DHT$@(T$0HG"P>((
+M`=")PL'B$`'0]]B(A%G4?P``BD8'B(19U7\``(A>!_Y$)#^*1"0_BY0DH```
+M`#A"$@^'>?S__^FO"@``BXPDH````(J!L`D``#I!$P^%)@$``%'HU[#__XE$
+M)$S&0`0`QD0D0P"#Q`2+G"2@````@'L2``^&<@H``(I$)#^+E"2@````.$(3
+M#X3.````#[;`P>`$`="-D)`!``"Y`````(.XD`$```!U$H-Z!`!U#(-Z"`!U
+M!H-Z#`!T!;D!````A<D/A),````/MEPD/XG8P>`$BXPDH````(V<")`!``!1
+MZ$FP__^#Q`3&0`0"BE0D/XA0"(A0"8L3B5`,BU,$B5`0BU,(B5`4BU,,B5`8
+MB<:+"/Z!U'\```^VF=1_``"+5"1(*<J!ZK0)``#!^@2-!)*-!("-!$*)PL'B
+M"`'0B<+!XA`!T/?8B(19U'\``(I&!XB$6=5_``"(7@?^1"0_BDPD/XN<)*``
+M```X2Q(/AP;____I<PD``+D`````NA````"-1"1PD(@(0$IU^O^T)*````#H
+MEJ___X/$!,9`!`:[`````+D0````C5`(B?:(&D))=?J)1"1`QD0D/P"+M"2@
+M````@'X2``^&3`$``(I$)#^+E"2@````.$(3#X0@`0``#[;`P>`$`="-D)`!
+M``"Y`````(.XD`$```!U$H-Z!`!U#(-Z"`!U!H-Z#`!T!;D!````A<D/A.4`
+M```/ME0D/XG1B=#!X`2+G"2@````C908D`$``(M$)'`+`HE$)'"+1"1T"T($
+MB40D=(M$)'@+0@B)1"1XBT0D?`M"#(E$)'R*1"0_.(.P"0``#X20````B<O!
+MXP2+E"2@````C9P3D`$``%+HHZ[__X/$!,9`!`**3"0_B$@(B$@)BQ.)4`R+
+M4P2)4!"+4PB)4!2+4PR)4!B)QHL(_H'4?P``#[:9U'\``(M4)$`IRH'JM`D`
+M`,'Z!(T$DHT$@(T$0HG"P>((`=")PL'B$`'0]]B(A%G4?P``BD8'B(19U7\`
+M`(A>!XGV_D0D/XI<)#^+M"2@````.%X2#X>T_O__BX0DH````(I8$U#H!*[_
+M_X/$!,9`!`*(6`B(6`F+5"1PB5`,BU0D=(E0$(M4)'B)4!2+5"1\B5`8B<:+
+M"/Z!U'\```^VF=1_``"+5"1`*<J!ZK0)``#!^@2-!)*-!("-!$*)PL'B"`'0
+MB<+!XA`!T/?8B(19U'\``(I&!XB$6=5_``"(7@>+1"1PBU0D0(E""(M$)'2)
+M0@R+1"1XB4(0BT0D?(E"%(N<)*`````/MHNP"0``B<J)R,'@!(V,&)`%``"+
+M`??0BWPD<"'XB40D8(M!!/?0BW0D="'PB40D9(M!"/?0BUPD>"'8B40D:(M!
+M#/?0BTPD?"'(B40D;,'B!(N$)*````"-E`*0!0``(SJ)?"1P(W($B70D="-:
+M"(E<)'@C2@R)3"1\N`````"#?"1P`'4/@WPD=`!U"(7;=02%R70%N`$```"%
+MP`^$A`(``(N4)*````"*0A.(@M"%``"+1"1PB8*\A0``BT0D=(F"P(4``(M$
+M)'B)@L2%``"+1"1\B8+(A0``QH+1A0```<>"S(4```````#&1"0_`(!Z$@`/
+MABP"``")UX''O(4``(I,)#^+G"2@````.(NP"0``=6I3Z$JL__^#Q`3&0`0#
+MB7@(BE0D/XA0#(M<)$"+"_Z!U'\```^VF=1_```IR"VT"0``P?@$C12`C122
+MC110B=#!X`@!PHG0P>`0`<+WVHB46=1_``"+="1`BD8'B(19U7\``(A>!^F/
+M`0``BD0D/XN4)*`````X0A,/A'L!```/MLB)R,'@!(M<)$R-#!B)QHV4$)`%
+M``"+`O?0(T0D<(D!BT($]]`C1"1TB4$$BT((]]`C1"1XB4$(BT(,]]`C1"1\
+MB4$,_[0DH````.B`J___@\0$QD`$`XEX"(I4)#^(4`R)1"1(BUPD0(L+_H'4
+M?P``#[:9U'\``(G"*<J!ZK0)``#!^@2-!)*-!("-!$*)PL'B"`'0B<+!XA`!
+MT/?8B(19U'\``(M4)$"*0@>(A%G5?P``B%H'BTPD3(T$#KH`````@S@`=1*#
+M>`0`=0R#>`@`=0:#>`P`=`6Z`0```(72#X23````#[9<)#^)V,'@!(MT)$R-
+M'##_M"2@````Z,VJ__^#Q`3&0`0!BE0D/XA0"(A0"8L3B5`,BU,$B5`0BU,(
+MB5`4BU,,B5`8BUPD2(L+_H'4?P``#[:9U'\``"G(+;0)``#!^`2-%("-%)*-
+M%%")T,'@"`'"B=#!X!`!PO?:B)19U'\``(MT)$B*1@>(A%G5?P``B%X'_D0D
+M/XI$)#^+E"2@````.$(2#X?<_?__N`````"#?"1@`'45@WPD9`!U#H-\)&@`
+M=0>#?"1L`'0%N`$```"%P`^$S0,``(N,)*````"*61-1Z`&J__^#Q`3&0`0!
+MB%@(B%@)BU0D8(E0#(M4)&2)4!"+5"1HB5`4BU0D;(E0&(E$)$2]`````,9$
+M)#\`BYPDH````(![$@`/AG4#``"*1"0_BY0DH````#B"L`D```^$1@,``#A"
+M$P^$/0,```^VP,'@!(M,)$R-'`@!T(V(D`$``(M4)&`CD)`!``")$XM$)&0C
+M002)0P2+1"1H(T$(B4,(BT0D;"-!#(E##+@`````@SL`=1*#>P0`=0R#>P@`
+M=0:#>PP`=`6X`0```(7`#X35`@``B[0DH````(J>L`D```^V="0_B?#!X`2+
+M5"1,C300_[0DH````.@'J?__@\0$QD`$`8I,)#^(2`B(6`F+%HE0#(M6!(E0
+M$(M6"(E0%(M6#(E0&(G'A>UT28L(_H'4?P``#[:9U'\``(GJ*<J!ZK0)``#!
+M^@2-!)*-!("-!$*)PL'B"`'0B<+!XA`!T/?8B(19U'\``(I'!XB$6=5_``"(
+M7P>+M"2@````BEX3BH:P"0``B$0D'0^V;"0_B>Z)Z,'@!(M4)$R-+!#_M"2@
+M````Z%VH__^#Q`3&0`0$B%@8BDPD'8A(&8M5`(E0"(M5!(E0#(M5"(E0$(M5
+M#(E0%(E$)$B)Q8L(_H'4?P``#[:9U'\``(M4)$0IRH'JM`D``,'Z!(T$DHT$
+M@(T$0HG"P>((`=")PL'B$`'0]]B(A%G4?P``BU0D2(I"!XB$6=5_``"(6@>+
+M"OZ!U'\```^VF=1_``")^BG*@>JT"0``P?H$C022C02`C01"B<+!X@@!T(G"
+MP>(0`=#WV(B$6=1_``"+5"1(BD('B(19U7\``(A:!XM<)$"+"_Z!U'\```^V
+MF=1_``"+5"1(*<J!ZK0)``#!^@2-!)*-!("-!$*)PL'B"`'0B<+!XA`!T/?8
+MB(19U'\``(M4)$"*0@>(A%G5?P``B%H'BXPDH````(I9$\'F!`-T)$Q1Z"BG
+M__^#Q`3&0`0$B%@8BEPD/XA8&8L6B5`(BU8$B5`,BU8(B5`0BU8,B5`4B40D
+M2(L(_H'4?P``#[:9U'\``(M4)$0IRH'JM`D``,'Z!(T$DHT$@(T$0HG"P>((
+M`=")PL'B$`'0]]B(A%G4?P``BW0D2(I&!XB$6=5_``"(7@>+1"1`BPC^@=1_
+M```/MIG4?P``B?(IRH'JM`D``,'Z!(T$DHT$@(T$0HG"P>((`=")PL'B$`'0
+M]]B(A%G4?P``BU0D0(I"!XB$6=5_``"(6@?^1"0_BDPD/XN<)*`````X2Q(/
+MAXO\__^#[`S_M"2L````Z/7#__^!Q)P```!;7E]=PXGV55=64X/L'(M$)#"#
+MP`R+5"0P.4(,#X0C`P``B40D$(M*#(E,)!0YP0^$$`,``(GVBUPD%('KD`D`
+M`(E<)`R+="04BS:)="04BP.)1"0(#[9#$DB)!"29B50D!(G9BUL(BP0D]^.)
+MQXLT)`^O<0R)T0'Q#Z]<)`2-+!F+5"0(@WH,``^$@````(M*#(E,)`B+F60!
+M``"^`````(7;#X2N````.4L$#X6E````@'L4`'0I#[9!,+H`````4E#_<V#_
+M<USH_/___X/$$#GJ<C-W!#GX=BV`>Q0`=7:+3"0(#[9!,+H`````4E#_<V#_
+M<USH_/___X/$$#GJ=P9R4SGX=D^^`0```.M(BW0D"(N>9`$``+X`````A=MT
+M-8M$)`@Y0P1U+(![%`!T$CEK8'(9=P4Y>UQV$H![%`!U%#EK8'<'<@TY>UQV
+M"+X!````C78`A?8/A)````"+5"0,QH+XA@```(M,)##_B=````")T`60"0``
+MBT@$BUPD#(N3D`D``(E*!(D1B8.0"0``B4`$@[N8"0```'0W@[N<"0```'02
+MBY.<"0``BX.8"0``B8*8"0``BW0D#(N6F`D``(N&G`D``(D"QX:8"0``````
+M`(/L"/]T)!3_="0\Z'FD__^#Q!#I20$``)"#?"0T`'00BU0D-(M$)`PY$`^%
+M,0$``(M,)`R+$8M:$(M#!(MT)#`[AM0````/@R,!``#V@AP"```!#X6P````
+MQH'XA@```/^.T````(G(!9`)``"+2`2+="0,BY:0"0``B4H$B1&)AI`)``")
+M0`2#OI@)````=#F#OIP)````=!*+EIP)``"+AI@)``")@I@)``"+1"0,BY"8
+M"0``B<&+@)P)``")`L>!F`D```````"#[`C_="04_W0D/.BOH___@\00@WL(
+M`'1^B?:+0PB+4"2+4A2)4PC&0%X"@^P,4.C\____@\00@WL(`'7>ZUB+7"0,
+MQH/XA@```HMT)##_CM````")VH'"D`D``(M*!(N#D`D``(E(!(D!B?"#P!2+
+M2`2)4`2)@Y`)``")2@2)$?Z#^88``(/L#%/H_,7__X/$$.L1C78`BT0D$#E$
+M)!0/A?+\__^#Q!Q;7E]=PXGV55=64X/L+,=$)!P`````BT0D0(M`!(E$)"2+
+M1"1`@\`$.T0D)`^$W@$``)"+5"0D@>J0"0``B50D((M,)"2+B7#V__^)3"08
+M#[9"$DB)1"0(B</!^Q^)7"0,BUH(BT0D"/?CB<>)U8MT)`B+5"0@#Z]R#(GI
+M`?$/KUPD#(TL&8M,)!B#>0P`#X2#````BUD,B5PD&(G8BYMD`0``O@````"%
+MVP^$JP```#E#!`^%H@```(![%`!T*0^V0#"Z`````%)0_W-@_W-<Z/S___^#
+MQ!`YZG(S=P0Y^'8M@'L4`'5SBTPD&`^V03"Z`````%)0_W-@_W-<Z/S___^#
+MQ!`YZG<&<E`Y^'9,O@$```#K19"+1"08BYAD`0``O@````"%VW0Q.4,$=2R`
+M>Q0`=!(Y:V!R&7<%.7M<=A*`>Q0`=10Y:V!W!W(-.7M<=@B^`0```(UV`(7V
+M#X24````BU0D)(L2B50D)(M,)"#&@?B&````B<@%D`D``(M(!(M<)""+DY`)
+M``")2@2)$8F#D`D``(E`!(N#_(8```%$)!R#NY@)````=#>#NYP)````=!*+
+MDYP)``"+@Y@)``")@I@)``"+3"0@BY&8"0``BX&<"0``B0+'@9@)````````
+M@^P(_W0D*/]T)$SH(Z'__X/$$(M<)"2+&XE<)"2+1"1`@\`$.=@/A2/^__^+
+M1"1`BT`,B40D)(M$)$"#P`P[1"0D#X3J`0``C78`BU0D)('JD`D``(E4)""+
+M3"0DBXEP]O__B4PD%`^V0A)(B40D"(G#P?L?B5PD#(M:"(M$)`CWXXG'B=6+
+M="0(BU0D(`^O<@R)Z0'Q#Z]<)`R-+!F+3"04@WD,``^$@P```(M9#(E<)!2)
+MV(N;9`$``+X`````A=L/A*L````Y0P0/A:(```"`>Q0`="D/MD`PN@````!2
+M4/]S8/]S7.C\____@\00.>IR,W<$.?AV+8![%`!U<XM,)!0/MD$PN@````!2
+M4/]S8/]S7.C\____@\00.>IW!G)0.?AV3+X!````ZT60BT0D%(N89`$``+X`
+M````A=MT,3E#!'4L@'L4`'02.6M@<AEW!3E[7'82@'L4`'44.6M@=P=R#3E[
+M7'8(O@$```"-=@"%]@^$G@```(M4)"2+$HE4)"2+3"0@QH'XA@```(M<)$#_
+MB]````")R`60"0``BT@$BUPD((N3D`D``(E*!(D1B8.0"0``B4`$BX/\A@``
+M`40D'(.[F`D```!T-X.[G`D```!T$HN3G`D``(N#F`D``(F"F`D``(M,)""+
+MD9@)``"+@9P)``")`L>!F`D```````"#[`C_="0H_W0D3.@=G___@\00BUPD
+M)(L;B5PD)(M$)$"#P`PYV`^%&?[__X-\)$0`=2"+5"1`BX+,````T>B+5"0<
+MBTPD0#F!T`````^"00(``(-\)$3_#X2Y````BUPD1#E<)!P/@ZL```"0BT0D
+M0(/`!(M4)$`Y0@0/A)8```"+2@2)3"0D@>F0"0``B4PD(,:!^(8```"+7"0D
+MBU,$BP.)4`2)`HD;B5L$BX'\A@```40D'(.YF`D```!T-X.YG`D```!T$HN1
+MG`D``(N!F`D``(F"F`D``(M,)""+D9@)``"+@9P)``")`L>!F`D```````"#
+M[`C_="0H_W0D3.@GGO__@\00BUPD1#E<)!P/@E;___^+;"1`@\4,BT0D0(M`
+M#(E$)"0YZ`^$'`$``(M4)"2!ZI`)``")5"0@BTPD)(L)B4PD)(L"]H`<`@``
+M`0^$]0```(M`$(M`!(M<)$`[@]0````/@]\```")T;\`````O@````!F@WH0
+M('8%O_____]F@WD00'8%OO____^S`(!Y$@!V/8UV`#A9$W0O#[;#P>`$`<B-
+MD)`%``"#N)`%``#_=0\Y>@1U"CER"'4%.7(,=`FX`````.L-B?9#.%D2=\:X
+M`0```(7`=&V+1"0@QH#XA@```HM4)$#_BM````")PH'"D`D``(M*!(M<)""+
+M@Y`)``")2`2)`8M$)$"#P!2+2`2)4`2)@Y`)``")2@2)$?Z#^88``(/L#%/H
+MP[___XN#_(8```%$)"R#Q!`Y;"0D#X7D_O__BU0D1#E4)!QS.8M,)$"+F=0`
+M``"#^P-V#X/Z_W4*QX'4`````P```(/L"&H`_W0D3.A2]O__BT0D4(F8U```
+M`(/$$(M4)!R)T(/$+%M>7UW#C78`55=64X/L%&A`'@``BT0D+/\PZ/S___^)
+MQ8M0#(/$$(U`##G0#X2'````B?:-@G#V__^+3"0@.8IP]O__=6:)Q[,`@'@2
+M`'8_#[;#P>`$`?B-B)`!``"^`````(.XD`$```!U%(-Y!`!U#H-Y"`!U"(-Y
+M#`!T!XGVO@$```"%]G490SA?$G?!N`````"%P'04N`$```#IL````+@!````
+MZ^N-=@"+$HU%##G0#X5[____BU44C444.=`/A(8```"0C8)P]O__BTPD(#F*
+M</;__W5FB<.^`````(!X$@!V0I")\0^VP<'@!`'8C8B0`0``OP````"#N)`!
+M````=1*#>00`=0R#>0@`=0:#>0P`=`6_`0```(7_=1A&B?`X0Q)WO[@`````
+MA<!T#K@!````ZQFX`0```.ONBQ*-110YT`^%>____[@`````@\0,6UY?7<.)
+M]E93@^P$BUPD$(LS@'M>`'4$QD->`8![7@%T,8![7`!U*X![7@9T)8![7@-T
+M'X![7A!T&8![7@)U#X/L#/]S*.@X'P``@\00D,9#7@N#[`Q3Z/S___^)-"3H
+M_/___X/$%%M>PY!55U93@^PTBWPD3&A`'@``BT0D3/\PZ/S___^)1"0TBU0D
+M4(M:+(M+)(E,)##'1"00`````(/$$(-[8`!T#XI#78/@`0^VP#M$)$AU7+@`
+M````@WMD``^$#0,``(/L#(ML)#"#Q6Q5Z/S___^)1"00B<:#Q`S_="1,4%/_
+M4V2#Q!"%P'4G@^P(_W0D"%7H_/___[@`````@\00Z<H"``")'X/'$.F7`@``
+MBW-@O0````"+1"1`BD`PB$0D!XM,)$"+44B+24R)5"0(B4PD#,9$)`8`BT0D
+M(("XH@`````/AO0!```/MD0D!HM4)""*G$*E````#[:$0J0```"-!$"-3,(D
+M.%D,=2(/MT$.N@`````#000340B)1"00B50D%&:+21!FB4PD'NM/.%D-=2P/
+MMT$2N@`````#000340B)1"00B50D%&:+211FB4PD'NLHB1^#QQ#I@0```(M!
+M!(M1"(E$)!")5"04BU0D(&:+DIP```!FB50D'CI<)`</A10!``"+7"00*UPD
+M",'C"71,@WPD2`!T#XM,)"2+@=@```")1PCK%HM,)"2+@=P```"+D>````")
+M1PB)5PS'1P0`````@?L`$```=H;'!P`0``"#QQ"!ZP`0``!UM`^W7"0>P>,)
+MBPZ)R"GH.=AR,HGHN@`````#1@@35@R)1PB)5PR)'\='!`````"#QQ`!W3G-
+M=3R]`````(/&$.LRC78`B>BZ``````-&"!-6#(E'"(E7#(G(*>B)!\='!```
+M``"#QQ`IPX/&$+T`````ZY4/MT0D'HE$)`C'1"0,`````(M$)!"+5"04`40D
+M"!%4)`R+3"1`#[=!4+H``````T%($U%,BTPD##'1,T0D"`G!=$?K+0'=ZRD/
+MMUPD'L'C"9"+#HG(*>@YV'?IB<@IZ"G#@WX$`'4*@\80O0````#KX/Y$)`:*
+M1"0&BU0D(#B"H@````^'#/[__XM,)$`/MT%0BUE(`<,K7"0(P>,)=%*)]H-\
+M)$@`=`^+5"0DBX+8````B4<(ZQ:+3"0DBX'<````BY'@````B4<(B5<,QT<$
+M`````('[`!````^&</W__\<'`!```(/'$('K`!```'6PQT?T`0```(,\)`!T
+M%X/L"/]T)`B+1"0P@\!L4.C\____@\00N`$```"#Q"Q;7E]=PXUV`%=64XMT
+M)!"+7BR+>R2`?EX!=#^`?EX0=3.#[`@/MT904/]V3/]V2`^V1C!0_W,H@^P,
+M:$`>``#_,^C\____@\044.BUI?__@\0@B?:*1EZ(0UZ#[`A6_W,$Z/S___^+
+M0P3_2`B#Q!"*AZ$```!`B(>A````.H>@````=4"`>UX`=03&0UX!@'M>`70D
+M@'M>!G0>@'M>`W08@'M>`G4.@^P,_W,HZ/L:``"#Q!#&0UX+@^P,4^C\____
+M@\006UY?PU575E.#[#R+5"10BT0D5(M`*(E$)"B+2!")3"0DBUPD5(M;)(E<
+M)"")QXM`/`M'.'42BT=$"T=`=0J)R(/`##E!#'0*N`````#I4`0``(V"^```
+M`(E$)#B!PO@"``")5"0TN0````"Z@````(M$)#2("$!*=?K&1"0S`(M4)""`
+MNIX`````#X8\`P``#[9$)#.-!$"+3"0@BT3!)(E$)"R)QK$`@'@2`'9!B?8/
+MML'!X`0!\(V0D`$``+L`````@[B0`0```'44@WH$`'4.@WH(`'4(@WH,`'0'
+MB?:[`0```(7;=1E!.$X2=\&X`````(7`=!&X`````.F@`P``N`$```#KZXM<
+M)"R*F_2&``"(7"0RBWPD+#B?]88```^"D0$``)"*1"0RBU0D+#A"$P^$L0``
+M``^VR(M<)#B-+,N+?"0TC3Q/B7PD'(G3#[>$BO2%``"Z`````(G&B=<#<P@3
+M>PQFBXR+]H4``&:)3"0:BT0D'&:#.`!T50^W`+H`````B<&)TP--`!-=!`^W
+M1"0:N@`````!\!'Z.=IR#7<$.<AV!P^W3"0:`?$Y?01R#7<%.74`=@:)=0")
+M?02)R&8K10"+7"0<9HD#Z<T```")=0")?01FBT0D&HM\)!QFB0?IM@```(M4
+M)"B`>@@(#X6H````BTPD)(-Y'$`/AIH````/MFPD,HGHBUPD.(TLZXM\)#2-
+M!$>)1"04BT0D+(MP"(MX#&:+4!!FB50D$HM,)!1F@SD`=%(/MP&Z`````(G!
+MB=,#30`3700/MT0D$KH``````?`1^CG:<@UW!#G(=@</MTPD$@'Q.7T$<@UW
+M!3EU`'8&B74`B7T$B<AF*T4`BUPD%&:)`^L2B74`B7T$9HM$)!*+?"049HD'
+M_D0D,HI4)#*+3"0L.)'UA@``#X-P_O__BUPD*(!["`@/A>X```"+?"0D@W\<
+M0`^&X````(M$)"P/MI#UA@``#[>$D/2%``"+3"0L#[>4D?:%```!T`^W41`Y
+MT`^%LP```(I<)#(X61)W!<9$)#(`BD0D,HM4)"PX0A,/A90````/MNB)Z(M,
+M)#B-+.F+7"0TC01#B40D#(MR"(MZ#&:+4A!FB50D"HM,)`QF@SD`=%(/MP&Z
+M`````(G!B=,#30`3700/MT0D"KH``````?`1^CG:<@UW!#G(=@</MTPD"@'Q
+M.7T$<@UW!3EU`'8&B74`B7T$B<AF*T4`BUPD#&:)`^L2B74`B7T$9HM$)`J+
+M?"0,9HD'_D0D,XI4)#.+3"0@.)&>````#X?$_/__BUPD(,:#H`````#&@Z$`
+M````QD0D,@"+?"0H@'\P``^&K`````^V="0RBT0D-&:#/'``#X2#````BU0D
+M*(M<LDB+3"14BT$$_T`(@^P,_W$$Z/S___^+?"1DBQ>)$(M7!(E0!(M7-(E0
+M-(/$!(M4)"S^@J````"+3"1`9HL4<6:)4%"+?"1$BQ3WBTSW!(E02(E(3(!(
+M70+'0&1,*`@`QT!HP"L(`(E8*(M4)&")4"R)<#!0Z/S___^#Q!#^1"0RBDPD
+M,HM<)"@X2S`/AU3___^X`0```(/$/%M>7UW#B?955U93@^Q4:$`>``"+1"1L
+M_S#H_/___XE$)%B+5"1PBU(DB50D5(M,)'"+22B)3"1,@\00BT0D8/9`700/
+MA/\'``#'1"1``````("ZG@`````/A&\'``"+5"1`C012BTPD1(M$P22)1"0X
+MBH#TA@``B$0D-XM4)#@X@O6&```/@D(!``"*3"0WBT0D.#A($P^$&0$```^V
+MP8G"P>($BTPD.(V4"I`!``")5"0P#[>4@?2%```/M[2!]H4``+\`````C78`
+M@_H?=T^)^0^VP8M,)#"-'(&)U;D@````*=$Y\78"B?&#^2!U"\<#_____^L1
+MC78`N`$```#3X$B)Z=/@"0.X(````"G0.?!S%8UT%N"Z`````.L#@^H@1XGX
+M/`-VH@^V;"0WB>J)Z,'@!(M,)#B-K`B0!0``#[><D?2%```/M[21]H4``+\`
+M````B?:#^Q]W3XGZ#[;"C52%`(E<)"RY(````"G9.?%V`HGQ@_D@=0C'`O__
+M___K$+@!````T^!(BDPD+-/@"0*X(````"G8.?!S%XUT'N"[`````.L%B?:#
+MZR!'B?@\`W:B_D0D-XI4)#>+3"0X.)'UA@``#X.^_O__BT0D8/9`70@/A-D%
+M``"+5"0\BX)D`0``A<!U"8M"#(N`9`$``(!X%``/A-0"``"+3"0XBHGTA@``
+MB$PD-P^VP8M4)#AFBY2"](4``&:)5"0J9H72#X0,`0``P>`$BTPD.(V$")`!
+M``")1"0DOP`````/M_*R`(/_'W=*#[;"BTPD)(T<@8G]N2`````I^3GQ=@*)
+M\8/Y('4(QP/_____ZPZX`0```-/@2(GIT^`)`[@@````*?@Y\',4C70^X+\`
+M````ZP.#[R!"@/H#=J@/MD0D-\'@!(M4)#B-A!"0!0``B40D(+\`````#[=T
+M)"JR`(/_'W=*#[;"BTPD((T<@8G]N2`````I^3GQ=@*)\8/Y('4(QP/_____
+MZPZX`0```-/@2(GIT^`)`[@@````*?@Y\',4C70^X+\`````ZP.#[R!"@/H#
+M=J@/MT0D*E!J``^V1"0_BU0D0/]T@ACH+XW__X/$#,9$)#<`BTPD.("Y](8`
+M```/AFL$``")]HI$)#>+5"0X.$(3#X17`0``#[;`P>`$`="-D)`%``"Y````
+M`(.XD`4```!U$H-Z!`!U#(-Z"`!U!H-Z#`!T!;D!````A<D/A1P!```/MDPD
+M-XG(P>`$BU0D.(V$$)`!``")1"0<OP`````/MUH0O@````"0@_\?=TR)\0^V
+MP8M,)!R-%(&)_;D@````*?DYV78"B=F#^2!U",<"_____^L.N`$```#3X$B)
+MZ=/@"0*X(````"GX.=AS%8U<.^"_`````.L#@^\@1HGP/`-VI0^V5"0WB=#!
+MX`2+3"0XC80(D`4``(E$)!B_``````^W61"^`````(GV@_\?=TR)\@^VPHM,
+M)!B-%(&)_;D@````*?DYV78"B=F#^2!U",<"_____^L.N`$```#3X$B)Z=/@
+M"0*X(````"GX.=AS%8U<.^"_`````.L#@^\@1HGP/`-VI0^V1"0WBU0D./]T
+M@ACH%XO__X/$!/Y$)#>*3"0WBT0D.#B(](8```^'@/[__^GD`@``BU0D.(J2
+M]88``(A4)#</MLJ+5"0X9HN$BO2%``!F`X2*]H4``&:)1"0J9CE"$`^&%P$`
+M`(G(P>`$C800D`$``(E$)!0/MUPD*@^W<A`IWK(`@_L?=TH/ML*+3"04C3R!
+MB=VY(````"G9.?%V`HGQ@_D@=0C'!______K#K@!````T^!(B>G3X`D'N"``
+M```IV#GP<Q2-=![@NP````#K`X/K($*`^@-VJ`^V1"0WP>`$BU0D.(V$$)`%
+M``")1"00#[=<)"H/MW(0*=ZR`(/['W=*#[;"BTPD$(T\@8G=N2`````IV3GQ
+M=@*)\8/Y('4(QP?_____ZPZX`0```-/@2(GIT^`)![@@````*=@Y\',4C70>
+MX+L`````ZP.#ZR!"@/H#=JB+5"0X#[="$`^W5"0J*=!04@^V1"0_BTPD0/]T
+M@1CH1XK__X/$#/Y$)#>*1"0WBU0D.#A"$@^&A`$``(UV`(I,)#>+1"0X.$@3
+M#X1;`0``#[;!P>`$`T0D.(V0D`4``+D`````@[B0!0```'42@WH$`'4,@WH(
+M`'4&@WH,`'0%N0$```"%R0^%'@$```^V5"0WB=#!X`2+3"0XC80(D`$``(E$
+M)`R_``````^W61"^`````(UV`(/_'W=,B?(/ML*+3"0,C12!B?VY(````"GY
+M.=EV`HG9@_D@=0C'`O_____K#K@!````T^!(B>G3X`D"N"`````I^#G8<Q6-
+M7#O@OP````#K`X/O($:)\#P#=J4/ME0D-XG0P>`$BTPD.(V$")`%``")1"0(
+MOP`````/MUD0O@````")]H/_'W=,B?(/ML*+3"0(C12!B?VY(````"GY.=EV
+M`HG9@_D@=0C'`O_____K#K@!````T^!(B>G3X`D"N"`````I^#G8<Q6-7#O@
+MOP````#K`X/O($:)\#P#=J4/MD0D-XM4)#C_=((8Z"N(__^#Q`3^1"0WBDPD
+M-XM$)#@X2!(/AW_^____1"1`BU0D1`^V@IX````[1"1`#X^1^/__BTPD/("Y
+M'0(```)T"HM$)&#V0%T(=&3'1"1``````(M4)$2`NIX`````=#Z+3"1`C01)
+MBU0D1(M$PB3'@.R%````````@^P(4/]T)%3H+)+__X/$$/]$)$"+3"1$#[:!
+MG@```#M$)$!_PH/L#/]T)&SHA.[__X/$$.M$QT0D0`````"+1"1$@+B>````
+M`'0O@^P,BU0D3(T$4HM,)%#_=,$DZ%>L__^#Q!#_1"1`BU0D1`^V@IX````[
+M1"1`?]&#Q$Q;7E]=PXUV`%575E.#[$R+7"1DBT,DB40D1(M3*(E4)$#'1"0T
+M`````&:+2C)FB4PD/F:!^8``=@=FQT0D/H``9HM4)#Z+1"1$9HF0G````(G0
+M9L'H`P^WR(7)=0*Q`8M$)$`/ME`P@'@P!'80C4+]T?@!P@^ORHE,)"CK"$(/
+MK\J)3"0H@'M<`74OBU0D1,:"G@````''0B0`````BTPD:(M!$(M1%(M<)$2)
+M0RB)4RR+1"0HZ3T#``"+3"1H#[9!(KH`````4E"+7"1P_W,$_S/H_/___X/$
+M$(A$)#.*0R*(1"0RBU0D0(!Z"`AU(0^V0C"Z`````%)0BUPD</]S#/]S".C\
+M____@\00*$0D,HI$)#(X1"0S@%PD,_^+3"1`9HM1,HU"_XM<)&AFBTL8(<%F
+M*<IFB50D/&8Y4R!S"6:+0R!FB40D/(M4)$3&@IX`````QH*?`````,:"H@``
+M``#'1"0D`````,=$)"P!````#[=$)#[WV(E$)!B)P\'['XE<)!P/M\&Z````
+M`(G'B=6+3"1H`WD0$VD49HM$)#Y((?AFBUPD/F8IPV:)7"0ZBT0D/&8YPW8%
+M9HE$)#J+3"08(?F+7"0<(>N#?"0L``^$F0```,=$)"P`````9HM$)#Z+5"1`
+M9CE",G9'O@````"+5"1$#[:"G@```(E$)!2#^`!^+HGVC01VBU0D1(U$PB2)
+M1"0TBU`(,=J)5"0$BU`$,<J+1"0$"=!T0D8Y="04?]2+5"1$BH*>````#[;P
+M0(B"G@```(T$=HU$PB2)1"0TQP``````B4@$B5@(QD`,0,9`#0"+1"0H`40D
+M)(I4)#.+1"0T.%`,=AF(4`R)^&8IR(M4)#1FB4(.9HM$)#IFB4(0BE0D,XM$
+M)#0X4`US&8A0#8GX9BG(BU0D-&:)0A)FBTPD.F:)2A2+7"1$#[:+H@```(M$
+M)#0IV(/H),'X`XT4@(T4D(T4D(G0P>`(`<*)T,'@$`'"]]J(E$ND````#[:#
+MH@```(I4)#.(E$.E````_H.B````9HM<)#J+3"1H9BE9(&8I7"0\=!D/M\.Z
+M``````''$=7'1"0L`0```.EE_O__BT0D:&:#>"``#X2M````N0````#^1"0S
+MBE0D,CA4)#-U!/Y$)#.*7"0SBT0D0#A8,'5)@'@("'48@'PD,@!T!OY,)#+K
+M"XM4)&B*4B*(5"0R@'PD,@`/E$0D,XM<)$`/MT,RN@````"+7"1H`4,0$5,4
+MQT0D+`$```#K%V:+5"0^BT0D0&8Y4#)V",=$)"P!````BUPD:&:+6R!FB5PD
+M/(M$)$!F.U@R#X:A_?__9HM0,F:)5"0\Z9/]__^+1"0D@\1,6UY?7<.0@^P,
+MBU0D%(-\)!@`=!+&0EX+@^P,4N@=ZO__@\00ZR6+0B3'0!@H,0@`B5`<QT`@
+M`````(/L"(/`&%#_,NC\____@\00@\0,PXUV`%575E.#[!1H0!X``(M$)"S_
+M,.C\____B<6+1"0PBW`DOP````"#Q!"`OIX`````=#F-=@"-''^-'-Z#[`P/
+MMX:<````4/]S+/]S*(M$)#C_<"A5Z'"&__^)0R2#Q"!'#[:&G@```#GX?\J#
+M[`S_="0LZ)X$``"#Q!"#^`)U/K\`````@+Z>`````'0?@^P(C01__W3&)%7H
+M1(O__X/$$$</MH:>````.?A_X8/L#/]U`.C\____@\00C78`@\0,6UY?7<-5
+M5U93@^P,O@````"+1"0L@+B>``````^$E0```(T$=HM4)"R-1,(DB40D"(M<
+M)"2+4Q`/MDLQBT`$T^@E_P,``(L2BQR"A=MT,HM$)`B+:`B+>`2+0PB+4PR)
+MZ3'1,?@)P70,BYN<"0``A=MUYNL,BU0D"(D:A=MU)(GVA?9^%$Z-!':+7"0L
+MQT3#)`````"%]G_LN/_____I'@$``$:+5"0L#[:"G@```#GP#X]K____O@``
+M``"+7"0L@+N>``````^$C@```(T$=HM4)"R+7,(D@+OXA@```74HQH/XA@``
+M`(V#D`D``(M(!(N3D`D``(E*!(D1B8.0"0``B4`$ZSJ)]H"[^(8```-U+\:#
+M^(8```"+1"0@_XC0````C8.0"0``BT@$BY.0"0``B4H$B1&)@Y`)``")0`20
+M_H/YA@``1HM4)"P/MH*>````.?`/CW+___^#[`S_="0TZ.X"``"#Q!"#^`)U
+M3;X`````BUPD+("[G@````!T*H/L"(T$=HM4)#3_=,(D_W0D+.B)B?__@\00
+M1HM<)"P/MH.>````.?!_UH/L#(M$)"S_,.C\____@\00N`````"#Q`Q;7E]=
+MPU575E.#[&2+1"1XBP")1"0D:$`>``!0Z/S___^)1"0HBY0D@````(M2*(E4
+M)"2+6A"#Q!"+3"1P@'E<!'5.BT$DBU,(B5`4B4L(@^P,_W0D(.BZY?__@\00
+MA<!T&(/L"/]T)!S_="0DZ-?;__^#Q!#I#P(``(/L#/]T)"#H'XC__X/$$.G[
+M`0``C78`BW0D<(!^7``/A1H!``#V1ET&=1C&1EX!@^P,5NC\____@\00Z<\!
+M``"-=@"+1"1P]D!=!'0RQT,<`````(-["`!T8)"+0PB+4"2+4A2)4PC&0%X!
+M@^P,4.C\____@\00@WL(`'7>ZSN+0Q2+4QB+="1PBTY,,=$S1D@)P74%_T,<
+MZP?'0QP`````BTPD<`^W05"Z``````-!2!-13(E#%(E3&(M$)'"+6$B+<$R)
+M7"0XB70D/&:+0%!FB40D0(M,)!2*03!(B$0D0@^V23$/K?/3[O;!('0'B?.^
+M`````(E<)"")="0D#[9$)$*Z`````%)05E/H_/___X/$$(E$)"B)5"0LBUPD
+M%`^V2S$/I<+3X/;!('0'B<*X`````(E$)#")5"0TZVV+="04BT9$"T9`=!R+
+M1"1PQD!>!H/L#%#H_/___X/$$.FK````C78`BU0D%`^W4C*)5"0(QT0D#```
+M``"+7"1PBWM(BT0D"/?GB<&)TXML)`B+5"1P#Z]J3(G>`>X/KWPD#(T</HE,
+M)#")7"0TBTPD<(M9)(/L!(U$)"104?]T)"CH^O;__XD#QT,0`````%/_M"2$
+M````_W0D+/]T)#3HY/O__X/$((7`="7'0P3\/0@`BW0D<(ES",=##`````"#
+M[`A3_W0D*.C\____@\00@\1<6UY?7<-55U93@^P4:$`>``"+1"0L_S#H_/__
+M_XE$)!B+5"0PBVHDOP````"#Q!"`O9X`````=&F0C01_BUS%)("[^(8```)U
+M3(G>BTPD((.[\(4```!T)(M1)(N#\(4``(M`)(M`%(E"%(N#\(4``(M`)(M4
+M)"")4!3K!HM!)(E(%(F.\(4``+@!````Z>L!``"-=@!'#[:%G@```#GX?YB_
+M`````("]G@`````/A,H```")]HT$?XU$Q0"-2"2+6"2+1"0@@'A<``^%G0``
+M`(I!#(B#](8``(I!#8B#]88```^VD_2&```/ML`YT'Q]D`^V@_2&```YT'4=
+M9HM!#F:)A)/TA0``9HM!$&:)A)/VA0``ZTF-=@`/MH/UA@``.=!U'6:+01)F
+MB823](4``&:+011FB823]H4``.LAC78`#[9#$SG0=!9FQX23](4`````9HM#
+M$&:)A)/VA0``0@^V@_6&```YT'V&B?9'#[:%G@```#GX#X\X____BU0D(/9"
+M70)T1H/L"%+_="04Z.'G__^#Q!"$P'0ROP````"`O9X`````=!F-!'^+1,4D
+M_HCYA@``1P^VA9X````Y^'_GN`(```#IL0```)"_`````("]G@````!T4XMT
+M)`B#QA2-=@"-!'^+7,4DQH/XA@```HV3D`D``(M*!(N#D`D``(E(!(D!BT8$
+MB58$B;.0"0``B4($B1"+1"0@B8/LA0``1P^VA9X````Y^'^WBU0D(/9"701T
+M%X/L!&BP/0@`4O]T)!3H*X'__X/$$.LIBU0D((M"),=`&"@Q"`")4!S'0"``
+M````@^P(@\`84/\RZ/S___^#Q!"X`````(/$#%M>7UW#4X/L"(M$)!"+6!"#
+M>P@`="6-=@"+0PB+4"2+4A2)4PC&0%X-@^P,4.C\____@\00@WL(`'7>@\0(
+M6\.04X/L$(M<)!AH0!X``/\SZ/S___^+6Q"#P%2)!"3H_/___XD#@\00N/__
+M__^#.P!T([D`````N@`0``"+`XUV`(@(0$IU^HU##(E##(E#$+@`````@\0(
+M6\.-=@!55U93@^P4BUPD*&A`'@``_S/H_/___XG'BT,0B40D&(/$$(,X``^$
+M!@$``+T`````C78`BU0D"(L"BS2HA?8/A((```"-=@"`OOB&```#=2_&AOB&
+M````_X_0````C8:0"0``BT@$BY:0"0``B4H$B1&)AI`)``")0`3K)XUV`,:&
+M^(8```"-AI`)``"+2`2+EI`)``")2@2)$8F&D`D``(E`!,>&F`D```````"+
+MGIP)``"#[`A65^@Z?/__B=Z#Q!"%VW6!18']_P,```^&8/___X/L"(M$)!#_
+M,(U'5%#H_/___XM4)!C'`@````"+2@R+&8/$$(G0@\`,.<AT,8M1!(L!B5`$
+MB0*)"8E)!(/L"%&-A[0```!0Z/S___^#Q!")V8L;BT0D"(/`##G(=<^#Q`Q;
+M7E]=PXGV55=64X/L'+X`````OP````"]`````(M$)#"`>#``=%L/ME`PB50D
+M%(M,)#"+1+%(A<!T"?:`'`(```%U-[@!````N@````")\0^EPM/@]L$@=`>)
+MPK@`````B40D"(E4)`R+1"0("?B+5"0,">J)QXG5B?9&.70D%'>MBTPD,(M1
+M1#'JBT%`,?@)PG03B7E`B6E$@^P,4>C\____@\00D(/$'%M>7UW#5E.#[!"+
+M="0<BUX,5NC\____N@````"#Q!"`>S``="$Y=)-(=1*#[`A24^B`C/__@\00
+MZPR-=@!"#[9#,#G0=]_V@QP"```!="[V@T@!```$=26#[`Q3Z"S>__^#Q!"%
+MP'05Z/S___^)0RB#[`Q3Z/S___^#Q!"0@\0$6U[#B?975E.+7"00BW0D%(/L
+M"&A`'@``4^C\____B<>)'"3H_/___XF'S````,'@#(G#P>L04V@4AP``5HU'
+M/%#H_/___X/$((T$6\'@!"G8T>!0:,0```!6C4<D4.C\____@\00:A!H`!``
+M`%:-1U10Z/S___^#Q!!J`6@@`0``5HU';%#H_/___X/$$,>'U`````,```!H
+M,!@``(/L#.C\____@\0,4%:-AYP```!0Z/S____'!"0!````:``0``!H`!``
+M`%:-AX0```!0Z/S___^#Q"!J$&H85HV'M````%#H_/___X/$$%M>7\.)]E93
+M@^P,BUPD&&A`'@``4^C\____B<:)&(U`!(E&!(E&"(/$#(U&#(E&#(E&$(U&
+M%(E&%(E&&(U&'(E&'(E&(/^VI````(V&G````%!3Z/S___^)AN0```"#Q`B-
+MAMP```!0C8:$````4.C\____B8;8````B;;H````QX;L````$"`(`,>&\```
+M``````"#Q`B-AN@```!04^C\____@\046U[#4X/L$&A`'@``_W0D'.C\____
+MB<.#Q`C_L.0```"-@)P```!0Z/S_____L^````#_L]P```#_L]@```"-@X0`
+M``!0Z/S___^#Q"A;PU575E.#[!2+="0H:$`>``#_-NC\____B<>]_____X/$
+M$(-^#`!T+;D`````BT8,B<*`>#``=!V)PXUV`#ETBDAU!HG-ZPZ)]D&)V@^V
+M0S`YR'_ID(M7#(U'##G0="2)PXV*</;__SFR</;__W4.BT8DB4$$B>B(012-
+M=@"+$CG3==Z+5Q2-1Q0YT'0FB<.)]HV*</;__SFR</;__W4.BT8DB4$$B>B(
+M012-=@"+$CG3==Z+5P2-1P0YT'0FB<.)]HV*</;__SFR</;__W4.BT8DB4$$
+MB>B(012-=@"+$CG3==Z#Q`Q;7E]=PXGV@^P8Q@5('@```6A`'@``Z/S___^X
+M`````(/$',.0D)"#[!1HH!X``/]T)!SH_/___VH!:"`!``#_="0L4.C\____
+M@\0LPXGV4X/L$&B@'@``_W0D'.C\____B<.)!"3H_/___XE#&(/$&%O#@^P4
+M:*`>``#_="0<Z/S___^#Q`C_<!A0Z/S___^#Q!S#C78`55=64X/L%(MT)"R+
+M1"0HBW@LBV\DBU]@:*`>``#_,.C\____BU`8@\00A=MT#XI'78/@`0^VP#M$
+M)"AU)XG3@W]D`'03@^P$_W0D+%)7_U=D@\00A<!U#+@`````Z=\```")]H!]
+M"?\/A*H````/MTT*P>$)BSLY^78TD`^V10B+5"0@.4(P=1N+`XD&BT,$B48$
+MBT,(B48(BT,,B48,@\80B?8I^8/#$(L[.?EWS0^V10B+5"0@.4(P=1R+0PB+
+M4PR)1@B)5@R)#L=&!`$```"X`0```.MI.?ES-XG(N@`````#0P@34PR)1@B)
+M5@R)^"G(B0:#>P0`=`['1@0!````N`$```#K.,=&!`````"#QA"#PQ")]HL#
+MB0:+0P2)1@2+0PB)1@B+0PR)1@R#QA"-0P2#PQ"#.`!TW+@!````@\0,6UY?
+M7<.-=@!75E.+?"00BU\LBW,DBT\PN`$```"Z``````^EPM/@]L$@=`>)PK@`
+M````]]#WTB-&$"-6%(E&$(E6%(!_7@%T!HI'7HA#7H/L"%?_<P3H_/___XM#
+M!/]("(/$$(M&%`M&$'46@'M>`'4$QD->`8/L#%/H_/___X/$$%M>7\.)]HM,
+M)`R+1"0(BU`DBD0D!#A""'449HM""F:)05"+`HM2!(E!2(E13,-FBT(,9HE!
+M4,=!2`````#'04P`````PY!55U93@^P(BU0D'(M$)""+:"2+6$B+<$QFBT!0
+M9HE$)`;'!"0`````N0````"`>C``#X30````D(M\BD@Y=QAW#P^"K0```#E?
+M%`^&I````(E=`(EU!(A-"+@!````N@`````/I<+3X/;!('0'B<*X`````(E%
+M$(E5%`^W1"0&N@`````!V!'R.U<8<E=W!3M'%'90QP0D`0```(U!`8A%"4&X
+M`0```+H`````#Z7"T^#VP2!T!XG"N``````+11`+512)11")511FBT<49BG8
+M9HE%"F:+5"0&9BG"9HE5#.LEB?;&10G_9HM$)`9FB44*ZQ20*U\4&W<800^V
+M0C`YR`^',?___XL$)(/$"%M>7UW#B?955U93@^P,BT0D((M`*(E$)`B+5"0@
+MBU(DB50D!(M,)""`>5P$#X7A````QT(0`````,="%`````"]`````(!X,``/
+MAK@!``")Z`^V^(M4)`B+=+I(A?8/A)<```#VAAP"```!#X2*````N`$```"Z
+M`````(GY#Z7"T^#VP2!T!XG"N`````"+3"0$"T$0"U$4B4$0B5$4BU0D((M"
+M!/]`"(/L#/]R!.C\____B<.+3"0PBP&)`XM!!(E#!(M!-(E#-(ES*,9#7`2*
+M45V#XC"*0UV#X,\)T(A#7<=#:#!-"`")2RR)>S")'"3H_/___X/$$(GV18GH
+MBU0D"#A",`^'1/___^GW````C78`_W0D(/]T)`SHT_W__X/$"(M,)`2+010+
+M01!U'(M$)"#&0%X"@^P,4.C\____@\00Z;\```"-=@"]`````(M4)`B`>C``
+M#X:I````D(GI#[;YN`$```"Z`````(GY#Z7"T^#VP2!T!XG"N`````"+3"0$
+M(T$0(U$4B=$)P71DBT0D"(MTN$B+5"0@BT($_T`(@^P,_W($Z/S___^)PXM,
+M)#"+`8D#BT$$B4,$BT$TB4,T@\00B7,HBD%=B$-=QT-H,$T(`,=#9.1+"`")
+M2RR)>S!345?HQ_S__U/H_/___X/$$$6)Z(M4)`@X0C`/AUK___^)]H/$#%M>
+M7UW#@^P8:*`>``#H_/___[@`````@\0<PP````````````"K)```UR0``%`E
+M``!0)0``4"4``%`E``#_)```)R4``%`E``!H)0``SC```,XP``!H,```;3``
+M`,XP``#.,```SC```,XP``#.,```SC```,XP``#.,```SC```,XP``#.,```
+MSC```'(P``!W,```?#```($P``"&,```BS```)`P``"5,```SC```,XP``#.
+M,```SC```,XP``#.,```SC```,XP``#.,```SC```,XP``#.,```SC```,XP
+M``#.,```SC```,XP``#.,```SC```,XP``#.,```SC```,XP``#.,```SC``
+M`,XP``#.,```SC```,XP``#.,```SC```,XP``#.,```SC```,XP``#.,```
+MSC```,XP``#.,```SC```,XP``#.,```SC```,XP``#.,```SC```,XP``#.
+M,```SC```,XP``#.,```SC```,XP``#.,```SC```,XP``#.,```SC```,XP
+M``#.,```SC```,XP``#.,```SC```,XP``#.,```SC```,XP``#.,```SC``
+M`,XP``#.,```SC```,XP``#.,```SC```,XP``#.,```SC```,XP``#.,```
+MSC```,XP``#.,```SC```,XP``#.,```SC```,XP``#.,```SC```,XP``#.
+M,```SC```,XP``#.,```SC```,XP``#.,```SC```,XP``#.,```SC```,XP
+M``":,```GS```*0P``#.,```SC```+$P``#.,```SC```,XP``#.,```SC``
+M`,XP``#.,```SC```,XP``#.,```N3```+XP``##,```R#```%PQ``!F,0``
+M9C$``&8Q``!F,0``9C$``&8Q``!F,0``9C$``&8Q``!F,0``9C$``&8Q``!F
+M,0``9C$``&8Q``!F,0``9C$``&8Q``!F,0``9C$``&8Q``!F,0``9C$``&8Q
+M``!F,0``9C$``&8Q``!F,0``9C$``&8Q``!F,0``9C$``&8Q``!F,0``9C$`
+M`#DQ``!F,0``.3$``&8Q``!F,0``9C$``#DQ```Y,0``9C$``&8Q``!F,0``
+M9C$``&8Q``!F,0``9C$``&8Q``!F,0``9C$``&8Q``!F,0``9C$``&8Q``!F
+M,0``9C$``&8Q```Y,0``9C$``&8Q``!F,0``9C$``&8Q``!F,0``9C$``&8Q
+M``!F,0``9C$``&8Q``!F,0``9C$``&8Q```Y,0``.3$``#DQ```Y,0``9C$`
+M`&8Q``!F,0``9C$``&8Q``!F,0``9C$``&8Q``!F,0``9C$``&8Q``!F,0``
+M9C$``&8Q``!F,0``9C$``&8Q``!F,0``9C$``&8Q``!F,0``9C$``&8Q``!F
+M,0``9C$``&8Q``!F,0``9C$``&8Q``!F,0``9C$``&8Q``!F,0``9C$``&8Q
+M``!F,0``9C$``&8Q``!F,0``9C$``&8Q``!F,0``9C$``#DQ``!F,0``9C$`
+M`&8Q``!F,0``9C$``&8Q``!F,0``9C$``#DQ``!F,0``.3$``&8Q``!F,0``
+M9C$``#DQ```Y,0``9C$``&8Q``!F,0``.3$``&8Q``!F,0``9C$``&8Q``!F
+M,0``9C$``&8Q``!F,0``9C$``&8Q``!F,0``9C$``&8Q``!F,0``9C$``&8Q
+M``!F,0``9C$``&8Q``!F,0``.3$``&8Q```Y,0``9C$``&8Q``!F,0``.3$`
+M`#DQ``!4,0``5#$``%PQ``!4,0``5#$``%PQ``!4,0``5#$``%0Q``!4,0``
+M5#$``"\W``!--P``:S<``,8W```P.```Y64``.5E```L:P``+&L``"QK```L
+M:P``Y64``.5E```L:P``ZV0``$5E``#8:@``BFH``)=J``"Z:@``V&H``,YJ
+M``#$:@``V&H``-AJ``#8:@``V&H``,1J``"FL@``JK(``*ZR``"RL@``V+(`
+M`-BR``#8L@``V+(``-BR``#8L@``V+(``-BR``#8L@``V+(``-BR``#8L@``
+MMK(``+JR``"^L@``PK(``,:R``#*L@``SK(``-*R``#P``$`4`$!`'@!`0",
+M`0$`H`$!`+0!`0#0`0$`'@(!`$$"`0"Y`@$`@@(!`)8"`0#-`@$`L@,!`.`#
+M`0``!`$`+00!`$H$`0!G!`$`=@0!`%H"`0!N`@$`[`$!``4"`0""`@$`A00!
+M`&`P`0#H*@$`*BL!`(\K`0#Q*P$`&"P!`"$L`0"(+`$`D2P!`'0O`0!#+@$`
+M,2\!`&`P`0!@,`$`8#`!`&`P`0!@,`$`8#`!`&`P`0!@,`$`FBP!`*\L`0!-
+M+`$`?RP!`$,N`0!:,`$`"S(!`(`U`0#V-0$`.#8!`&XW`0`@3`$`%$P!`!1,
+M`0`.3`$`%$P!`!1,`0`43`$`%$P!`!1,`0`43`$`%$P!`!1,`0`43`$`%$P!
+M``Y,`0`@3`$`($P!``Y,`0`.3`$`($P!`"!,`0`:3`$`%$P!`!1,`0`43`$`
+M($P!`!1,`0`43`$`%$P!`$13`0"@40$`J5$!`+)1`0"[40$`[5$!``)2`0`.
+M4@$`05(!`%52`0!I4@$`?5(!`)=2`0"C4@$`KU(!`$13`0!$4P$`P%(!`/]2
+M`0!$4P$`1%,!`-12`0`H4P$`T%$!`-Q1`0!$4P$`&E(!`"92`0`R4@$`````
+M`````````````````%)O8VME=%)!240@,C<R>%\Q>"!305,@0V]N=')O;&QE
+M<@```/R8`0#\F`$`=)@!`(R8`0#\F`$`N)@!`%28`0"DF`$`T)@!`.28`0"K
+MQ@$`U\8!`%#'`0!0QP$`4,<!`%#'`0#_Q@$`)\<!`%#'`0!HQP$`SM(!`,[2
+M`0!HT@$`;=(!`,[2`0#.T@$`SM(!`,[2`0#.T@$`SM(!`,[2`0#.T@$`SM(!
+M`,[2`0#.T@$`SM(!`'+2`0!WT@$`?-(!`('2`0"&T@$`B](!`)#2`0"5T@$`
+MSM(!`,[2`0#.T@$`SM(!`,[2`0#.T@$`SM(!`,[2`0#.T@$`SM(!`,[2`0#.
+MT@$`SM(!`,[2`0#.T@$`SM(!`,[2`0#.T@$`SM(!`,[2`0#.T@$`SM(!`,[2
+M`0#.T@$`SM(!`,[2`0#.T@$`SM(!`,[2`0#.T@$`SM(!`,[2`0#.T@$`SM(!
+M`,[2`0#.T@$`SM(!`,[2`0#.T@$`SM(!`,[2`0#.T@$`SM(!`,[2`0#.T@$`
+MSM(!`,[2`0#.T@$`SM(!`,[2`0#.T@$`SM(!`,[2`0#.T@$`SM(!`,[2`0#.
+MT@$`SM(!`,[2`0#.T@$`SM(!`,[2`0#.T@$`SM(!`,[2`0#.T@$`SM(!`,[2
+M`0#.T@$`SM(!`,[2`0#.T@$`SM(!`,[2`0#.T@$`SM(!`,[2`0#.T@$`SM(!
+M`,[2`0#.T@$`SM(!`,[2`0#.T@$`SM(!`,[2`0#.T@$`SM(!`,[2`0#.T@$`
+MSM(!`,[2`0#.T@$`SM(!`,[2`0#.T@$`SM(!`,[2`0#.T@$`SM(!`,[2`0#.
+MT@$`SM(!`,[2`0":T@$`G](!`*32`0#.T@$`SM(!`+'2`0#.T@$`SM(!`,[2
+M`0#.T@$`SM(!`,[2`0#.T@$`SM(!`,[2`0#.T@$`N=(!`+[2`0##T@$`R-(!
+M`%S3`0!FTP$`9M,!`&;3`0!FTP$`9M,!`&;3`0!FTP$`9M,!`&;3`0!FTP$`
+M9M,!`&;3`0!FTP$`9M,!`&;3`0!FTP$`9M,!`&;3`0!FTP$`9M,!`&;3`0!F
+MTP$`9M,!`&;3`0!FTP$`9M,!`&;3`0!FTP$`9M,!`&;3`0!FTP$`9M,!`&;3
+M`0!FTP$`9M,!`#G3`0!FTP$`.=,!`&;3`0!FTP$`9M,!`#G3`0`YTP$`9M,!
+M`&;3`0!FTP$`9M,!`&;3`0!FTP$`9M,!`&;3`0!FTP$`9M,!`&;3`0!FTP$`
+M9M,!`&;3`0!FTP$`9M,!`&;3`0`YTP$`9M,!`&;3`0!FTP$`9M,!`&;3`0!F
+MTP$`9M,!`&;3`0!FTP$`9M,!`&;3`0!FTP$`9M,!`&;3`0`YTP$`.=,!`#G3
+M`0`YTP$`9M,!`&;3`0!FTP$`9M,!`&;3`0!FTP$`9M,!`&;3`0!FTP$`9M,!
+M`&;3`0!FTP$`9M,!`&;3`0!FTP$`9M,!`&;3`0!FTP$`9M,!`&;3`0!FTP$`
+M9M,!`&;3`0!FTP$`9M,!`&;3`0!FTP$`9M,!`&;3`0!FTP$`9M,!`&;3`0!F
+MTP$`9M,!`&;3`0!FTP$`9M,!`&;3`0!FTP$`9M,!`&;3`0!FTP$`9M,!`#G3
+M`0!FTP$`9M,!`&;3`0!FTP$`9M,!`&;3`0!FTP$`9M,!`#G3`0!FTP$`.=,!
+M`&;3`0!FTP$`9M,!`#G3`0`YTP$`9M,!`&;3`0!FTP$`.=,!`&;3`0!FTP$`
+M9M,!`&;3`0!FTP$`9M,!`&;3`0!FTP$`9M,!`&;3`0!FTP$`9M,!`&;3`0!F
+MTP$`9M,!`&;3`0!FTP$`9M,!`&;3`0!FTP$`.=,!`&;3`0`YTP$`9M,!`&;3
+M`0!FTP$`.=,!`#G3`0!4TP$`5-,!`%S3`0!4TP$`5-,!`%S3`0!4TP$`5-,!
+M`%33`0!4TP$`5-,!`"_9`0!-V0$`:]D!`,;9`0`PV@$`Y0<"`.4'`@`L#0(`
+M+`T"`"P-`@`L#0(`Y0<"`.4'`@`L#0(`ZP8"`$4'`@#8#`(`B@P"`)<,`@"Z
+M#`(`V`P"`,X,`@#$#`(`V`P"`-@,`@#8#`(`V`P"`,0,`@"F5`(`JE0"`*Y4
+M`@"R5`(`V%0"`-A4`@#85`(`V%0"`-A4`@#85`(`V%0"`-A4`@#85`(`V%0"
+M`-A4`@#85`(`ME0"`+I4`@"^5`(`PE0"`,94`@#*5`(`SE0"`-)4`@#PH@(`
+M4*,"`'BC`@",HP(`H*,"`+2C`@#0HP(`'J0"`$&D`@"YI`(`@J0"`):D`@#-
+MI`(`LJ4"`."E`@``I@(`+:8"`$JF`@!GI@(`=J8"`%JD`@!NI`(`[*,"``6D
+M`@""I`(`A:8"`&#2`@#HS`(`*LT"`(_-`@#QS0(`&,X"`"'.`@"(S@(`D<X"
+M`'31`@!#T`(`,=$"`&#2`@!@T@(`8-("`&#2`@!@T@(`8-("`&#2`@!@T@(`
+MFLX"`*_.`@!-S@(`?\X"`$/0`@!:T@(`"]0"`(#7`@#VUP(`.-@"`&[9`@"$
+M[@(`>.X"`'CN`@!R[@(`>.X"`'CN`@!X[@(`>.X"`'CN`@!X[@(`>.X"`'CN
+M`@!X[@(`>.X"`'+N`@"$[@(`A.X"`'+N`@!R[@(`A.X"`(3N`@!^[@(`>.X"
+M`'CN`@!X[@(`A.X"`'CN`@!X[@(`>.X"`*CU`@`$]`(`#?0"`!;T`@`?]`(`
+M4?0"`&;T`@!R]`(`I?0"`+GT`@#-]`(`X?0"`/OT`@`']0(`$_4"`*CU`@"H
+M]0(`)/4"`&/U`@"H]0(`J/4"`#CU`@",]0(`-/0"`$#T`@"H]0(`?O0"`(KT
+M`@"6]`(`4F]C:V5T4D%)1"`R-S9X(%-!4R!#;VYT<F]L;&5R``!P0`,`<$`#
+M`.@_`P``0`,`<$`#`"Q``P#(/P,`&$`#`$1``P!80`,`'VX#`$MN`P#$;@,`
+MQ&X#`,1N`P#$;@,`<VX#`)MN`P#$;@,`W&X#`$)Z`P!">@,`W'D#`.%Y`P!"
+M>@,`0GH#`$)Z`P!">@,`0GH#`$)Z`P!">@,`0GH#`$)Z`P!">@,`0GH#`$)Z
+M`P#F>0,`ZWD#`/!Y`P#U>0,`^GD#`/]Y`P`$>@,`"7H#`$)Z`P!">@,`0GH#
+M`$)Z`P!">@,`0GH#`$)Z`P!">@,`0GH#`$)Z`P!">@,`0GH#`$)Z`P!">@,`
+M0GH#`$)Z`P!">@,`0GH#`$)Z`P!">@,`0GH#`$)Z`P!">@,`0GH#`$)Z`P!"
+M>@,`0GH#`$)Z`P!">@,`0GH#`$)Z`P!">@,`0GH#`$)Z`P!">@,`0GH#`$)Z
+M`P!">@,`0GH#`$)Z`P!">@,`0GH#`$)Z`P!">@,`0GH#`$)Z`P!">@,`0GH#
+M`$)Z`P!">@,`0GH#`$)Z`P!">@,`0GH#`$)Z`P!">@,`0GH#`$)Z`P!">@,`
+M0GH#`$)Z`P!">@,`0GH#`$)Z`P!">@,`0GH#`$)Z`P!">@,`0GH#`$)Z`P!"
+M>@,`0GH#`$)Z`P!">@,`0GH#`$)Z`P!">@,`0GH#`$)Z`P!">@,`0GH#`$)Z
+M`P!">@,`0GH#`$)Z`P!">@,`0GH#`$)Z`P!">@,`0GH#`$)Z`P!">@,`0GH#
+M`$)Z`P!">@,`0GH#`$)Z`P!">@,`0GH#`$)Z`P!">@,`0GH#`$)Z`P!">@,`
+M#GH#`!-Z`P`8>@,`0GH#`$)Z`P`E>@,`0GH#`$)Z`P!">@,`0GH#`$)Z`P!"
+M>@,`0GH#`$)Z`P!">@,`0GH#`"UZ`P`R>@,`-WH#`#QZ`P#0>@,`VGH#`-IZ
+M`P#:>@,`VGH#`-IZ`P#:>@,`VGH#`-IZ`P#:>@,`VGH#`-IZ`P#:>@,`VGH#
+M`-IZ`P#:>@,`VGH#`-IZ`P#:>@,`VGH#`-IZ`P#:>@,`VGH#`-IZ`P#:>@,`
+MVGH#`-IZ`P#:>@,`VGH#`-IZ`P#:>@,`VGH#`-IZ`P#:>@,`VGH#`-IZ`P"M
+M>@,`VGH#`*UZ`P#:>@,`VGH#`-IZ`P"M>@,`K7H#`-IZ`P#:>@,`VGH#`-IZ
+M`P#:>@,`VGH#`-IZ`P#:>@,`VGH#`-IZ`P#:>@,`VGH#`-IZ`P#:>@,`VGH#
+M`-IZ`P#:>@,`K7H#`-IZ`P#:>@,`VGH#`-IZ`P#:>@,`VGH#`-IZ`P#:>@,`
+MVGH#`-IZ`P#:>@,`VGH#`-IZ`P#:>@,`K7H#`*UZ`P"M>@,`K7H#`-IZ`P#:
+M>@,`VGH#`-IZ`P#:>@,`VGH#`-IZ`P#:>@,`VGH#`-IZ`P#:>@,`VGH#`-IZ
+M`P#:>@,`VGH#`-IZ`P#:>@,`VGH#`-IZ`P#:>@,`VGH#`-IZ`P#:>@,`VGH#
+M`-IZ`P#:>@,`VGH#`-IZ`P#:>@,`VGH#`-IZ`P#:>@,`VGH#`-IZ`P#:>@,`
+MVGH#`-IZ`P#:>@,`VGH#`-IZ`P#:>@,`VGH#`-IZ`P"M>@,`VGH#`-IZ`P#:
+M>@,`VGH#`-IZ`P#:>@,`VGH#`-IZ`P"M>@,`VGH#`*UZ`P#:>@,`VGH#`-IZ
+M`P"M>@,`K7H#`-IZ`P#:>@,`VGH#`*UZ`P#:>@,`VGH#`-IZ`P#:>@,`VGH#
+M`-IZ`P#:>@,`VGH#`-IZ`P#:>@,`VGH#`-IZ`P#:>@,`VGH#`-IZ`P#:>@,`
+MVGH#`-IZ`P#:>@,`VGH#`*UZ`P#:>@,`K7H#`-IZ`P#:>@,`VGH#`*UZ`P"M
+M>@,`R'H#`,AZ`P#0>@,`R'H#`,AZ`P#0>@,`R'H#`,AZ`P#(>@,`R'H#`,AZ
+M`P"C@`,`P8`#`-^``P`Z@0,`I($#`%FO`P!9KP,`H+0#`*"T`P"@M`,`H+0#
+M`%FO`P!9KP,`H+0#`%^N`P"YK@,`3+0#`/ZS`P`+M`,`+K0#`$RT`P!"M`,`
+M.+0#`$RT`P!,M`,`3+0#`$RT`P`XM`,`&OP#`![\`P`B_`,`)OP#`$S\`P!,
+M_`,`3/P#`$S\`P!,_`,`3/P#`$S\`P!,_`,`3/P#`$S\`P!,_`,`3/P#`"K\
+M`P`N_`,`,OP#`#;\`P`Z_`,`/OP#`$+\`P!&_`,`9$H$`,1*!`#L2@0``$L$
+M`!1+!``H2P0`1$L$`))+!`"U2P0`+4P$`/9+!``*3`0`04P$`"9-!`!4300`
+M=$T$`*%-!`"^300`VTT$`.I-!`#.2P0`XDL$`&!+!`!Y2P0`]DL$`/E-!`#4
+M>00`7'0$`)YT!``#=00`974$`(QU!`"5=00`_'4$``5V!`#H>`0`MW<$`*5X
+M!`#4>00`U'D$`-1Y!`#4>00`U'D$`-1Y!`#4>00`U'D$``YV!``C=@0`P74$
+M`/-U!`"W=P0`SGD$`'][!`#T?@0`:G\$`*Q_!`#B@`0`^)4$`.R5!`#LE00`
+MYI4$`.R5!`#LE00`[)4$`.R5!`#LE00`[)4$`.R5!`#LE00`[)4$`.R5!`#F
+ME00`^)4$`/B5!`#FE00`YI4$`/B5!`#XE00`\I4$`.R5!`#LE00`[)4$`/B5
+M!`#LE00`[)4$`.R5!``<G00`>)L$`(&;!`"*FP0`DYL$`,6;!`#:FP0`YIL$
+M`!F<!``MG`0`09P$`%6<!`!OG`0`>YP$`(><!``<G00`')T$`)B<!`#7G`0`
+M')T$`!R=!`"LG`0``)T$`*B;!`"TFP0`')T$`/*;!`#^FP0`"IP$`%)O8VME
+M=%)!240@,C<X>"!305,@0V]N=')O;&QE<@``I.<$`*3G!``<YP0`-.<$`*3G
+M!`!@YP0`_.8$`$SG!`!XYP0`C.<$``````!3%04`?Q4%`/@5!0#X%04`^!4%
+M`/@5!0"G%04`SQ4%`/@5!0`0%@4`=B$%`'8A!0`0(04`%2$%`'8A!0!V(04`
+M=B$%`'8A!0!V(04`=B$%`'8A!0!V(04`=B$%`'8A!0!V(04`=B$%`!HA!0`?
+M(04`)"$%`"DA!0`N(04`,R$%`#@A!0`](04`=B$%`'8A!0!V(04`=B$%`'8A
+M!0!V(04`=B$%`'8A!0!V(04`=B$%`'8A!0!V(04`=B$%`'8A!0!V(04`=B$%
+M`'8A!0!V(04`=B$%`'8A!0!V(04`=B$%`'8A!0!V(04`=B$%`'8A!0!V(04`
+M=B$%`'8A!0!V(04`=B$%`'8A!0!V(04`=B$%`'8A!0!V(04`=B$%`'8A!0!V
+M(04`=B$%`'8A!0!V(04`=B$%`'8A!0!V(04`=B$%`'8A!0!V(04`=B$%`'8A
+M!0!V(04`=B$%`'8A!0!V(04`=B$%`'8A!0!V(04`=B$%`'8A!0!V(04`=B$%
+M`'8A!0!V(04`=B$%`'8A!0!V(04`=B$%`'8A!0!V(04`=B$%`'8A!0!V(04`
+M=B$%`'8A!0!V(04`=B$%`'8A!0!V(04`=B$%`'8A!0!V(04`=B$%`'8A!0!V
+M(04`=B$%`'8A!0!V(04`=B$%`'8A!0!V(04`=B$%`'8A!0!V(04`=B$%`'8A
+M!0!V(04`=B$%`'8A!0!V(04`=B$%`'8A!0!V(04`=B$%`'8A!0!"(04`1R$%
+M`$PA!0!V(04`=B$%`%DA!0!V(04`=B$%`'8A!0!V(04`=B$%`'8A!0!V(04`
+M=B$%`'8A!0!V(04`82$%`&8A!0!K(04`<"$%``0B!0`.(@4`#B(%``XB!0`.
+M(@4`#B(%``XB!0`.(@4`#B(%``XB!0`.(@4`#B(%``XB!0`.(@4`#B(%``XB
+M!0`.(@4`#B(%``XB!0`.(@4`#B(%``XB!0`.(@4`#B(%``XB!0`.(@4`#B(%
+M``XB!0`.(@4`#B(%``XB!0`.(@4`#B(%``XB!0`.(@4`#B(%`.$A!0`.(@4`
+MX2$%``XB!0`.(@4`#B(%`.$A!0#A(04`#B(%``XB!0`.(@4`#B(%``XB!0`.
+M(@4`#B(%``XB!0`.(@4`#B(%``XB!0`.(@4`#B(%``XB!0`.(@4`#B(%``XB
+M!0#A(04`#B(%``XB!0`.(@4`#B(%``XB!0`.(@4`#B(%``XB!0`.(@4`#B(%
+M``XB!0`.(@4`#B(%``XB!0#A(04`X2$%`.$A!0#A(04`#B(%``XB!0`.(@4`
+M#B(%``XB!0`.(@4`#B(%``XB!0`.(@4`#B(%``XB!0`.(@4`#B(%``XB!0`.
+M(@4`#B(%``XB!0`.(@4`#B(%``XB!0`.(@4`#B(%``XB!0`.(@4`#B(%``XB
+M!0`.(@4`#B(%``XB!0`.(@4`#B(%``XB!0`.(@4`#B(%``XB!0`.(@4`#B(%
+M``XB!0`.(@4`#B(%``XB!0`.(@4`#B(%`.$A!0`.(@4`#B(%``XB!0`.(@4`
+M#B(%``XB!0`.(@4`#B(%`.$A!0`.(@4`X2$%``XB!0`.(@4`#B(%`.$A!0#A
+M(04`#B(%``XB!0`.(@4`X2$%``XB!0`.(@4`#B(%``XB!0`.(@4`#B(%``XB
+M!0`.(@4`#B(%``XB!0`.(@4`#B(%``XB!0`.(@4`#B(%``XB!0`.(@4`#B(%
+M``XB!0`.(@4`X2$%``XB!0#A(04`#B(%``XB!0`.(@4`X2$%`.$A!0#\(04`
+M_"$%``0B!0#\(04`_"$%``0B!0#\(04`_"$%`/PA!0#\(04`_"$%`-<G!0#U
+M)P4`$R@%`&XH!0#8*`4`C58%`(U6!0#46P4`U%L%`-1;!0#46P4`C58%`(U6
+M!0#46P4`DU4%`.U5!0"`6P4`,EL%`#];!0!B6P4`@%L%`'9;!0!L6P4`@%L%
+M`(!;!0"`6P4`@%L%`&Q;!0!.HP4`4J,%`%:C!0!:HP4`@*,%`("C!0"`HP4`
+M@*,%`("C!0"`HP4`@*,%`("C!0"`HP4`@*,%`("C!0"`HP4`7J,%`&*C!0!F
+MHP4`:J,%`&ZC!0!RHP4`=J,%`'JC!0"8\04`^/$%`"#R!0`T\@4`2/(%`%SR
+M!0!X\@4`QO(%`.GR!0!A\P4`*O,%`#[S!0!U\P4`6O0%`(CT!0"H]`4`U?0%
+M`/+T!0`/]04`'O4%``+S!0`6\P4`E/(%`*WR!0`J\P4`+?4%``@A!@"0&P8`
+MTAL&`#<<!@"9'`8`P!P&`,D<!@`P'08`.1T&`!P@!@#K'@8`V1\&``@A!@`(
+M(08`""$&``@A!@`((08`""$&``@A!@`((08`0AT&`%<=!@#U'`8`)QT&`.L>
+M!@`"(08`LR(&`"@F!@">)@8`X"8&`!8H!@`L/08`(#T&`"`]!@`:/08`(#T&
+M`"`]!@`@/08`(#T&`"`]!@`@/08`(#T&`"`]!@`@/08`(#T&`!H]!@`L/08`
+M+#T&`!H]!@`:/08`+#T&`"P]!@`F/08`(#T&`"`]!@`@/08`+#T&`"`]!@`@
+M/08`(#T&`%!$!@"L0@8`M4(&`+Y"!@#'0@8`^4(&``Y#!@`:0P8`34,&`&%#
+M!@!U0P8`B4,&`*-#!@"O0P8`NT,&`%!$!@!01`8`S$,&``M$!@!01`8`4$0&
+M`.!#!@`T1`8`W$(&`.A"!@!01`8`)D,&`#)#!@`^0P8`````````````````
+M`````%)O8VME=%)!240@,C<T>%\S>"!305,@0V]N=')O;&QE<@```("-!@"`
+MC08`^(P&`!"-!@"`C08`/(T&`-B,!@`HC08`5(T&`&B-!@#4R08`0,@&`%3)
+M!@"XR08`0,@&`$#(!@!`R`8`0,@&`-3)!@"/R`8`U,D&`-3)!@"AR`8`[\@&
+M`/O(!@`QR08`&P````$```"PU08`MM4&`+S5!@#.U08`U-4&`,+5!@#(U08`
+MVM4&`)#S!@#J\`8`!O(&`(OR!@#V\@8`B_(&`)#S!@#=\`8`JP8'`$P&!P"(
+M!@<`>@8'`($&!P!D!@<`JP8'`$4&!P"D!@<`"!P'`&L5!P"[%@<`*1<'`.P7
+M!P!T&0<`J!D'`+09!P#1&@<`8QL'`(X9!P`('`<`<10'`'X4!P`8%0<`,!\'
+M`!@?!P`P'P<`,!\'`#`?!P`D'P<`,!\'`#`?!P`D'P<`,!\'`#`?!P`D'P<`
+M,!\'`"0?!P`P'P<`,!\'`"0?!P!P*0<`L2D'`.XI!P`K*@<`:2H'`*,J!P"_
+M-`<`VC0'`-HT!P#:-`<`VC0'`-HT!P#:-`<`VC0'`-HT!P#:-`<`VC0'`-HT
+M!P#:-`<`VC0'`,@T!P#1-`<`VC0'`-HT!P#:-`<`VC0'`-HT!P#:-`<`VC0'
+M`-HT!P"_-`<`R#0'`-$T!P`/-0<`(S4'`",U!P`C-0<`(S4'`",U!P`C-0<`
+M(S4'`",U!P`C-0<`(S4'`",U!P`C-0<`(S4'`!LU!P`5-0<`(S4'`",U!P`C
+M-0<`(S4'`",U!P`C-0<`(S4'`",U!P`/-0<`&S4'`!4U!P`<H@<`,*,'`!RB
+M!P#8H@<`V*('`-BB!P`(XP<`V^$'`-OA!P#PX0<`".('`"#B!P`XX@<`..,'
+M`";C!P`OY0<``N0'``+D!P`7Y`<`+^0'`$?D!P!?Y`<`7^4'`$WE!P!-5E]2
+M97%U97-T("5P.B!#9&);)3)X+"4R>"PE,G@L)3)X+"`E,G@L)3)X+"4R>"PE
+M,G@L("4R>"PE,G@L)3)X+"4R>"P@)3)X+"4R>"PE,G@L)3)X72X`-2!2971R
+M>6EN9R!F86EL960L(&1I<VL@9&]W;B$A(0!487-K(&9I;&4@97)R;W(L(%-T
+M871U<U)E9STP>"5X+"!%<G)296<],'@E>"P@3$)!6S`M,UT],'@E>"Q,0D%;
+M-"TW73TP>"5X+@``1&5V:6-E(&5R<F]R(&EN9F]R;6%T:6]N(#!X)6QL6`!!
+M='1$979305-!9&1R6R5X72`@6U5N:71)9"`E>%T@<V%S(&%D9'(@)3`R>"TE
+M,#)X+24P,G@M)3`R>"TE,#)X+24P,G@M)3`R>"TE,#)X`'-A;64@<V%S(&%D
+M9'(@)3`R>"TE,#)X+24P,G@M)3`R>"TE,#)X+24P,G@M)3`R>"TE,#)X````
+M1&5V:6-E("5X(&EN('-T86YD8GD@;6]D92P@<W1A<G0@=&\@<&]W97(@:70@
+M=7`N`````%-T87)T('1O('!O=V5R('5P(&1E=FEC92`E>"XN+@``<&]R="!R
+M97-E="!N;W0@8V]M<&QE=&4@<W5C8V5S<RP@:6=N;W)E('1H92!P;W)T("@E
+M>"D```!2;V-K971204E$(%-31"`R,3)X($-O;G1R;VQL97(``%)O8VME=%)!
+M240@,C<Q>"!305,@0V]N=')O;&QE<@``4F]C:V5T4D%)1"!34T0@,C$T>"!#
+M;VYT<F]L;&5R``!!='1A8VAE9"!D979I8V4@:6YD97@@)3`R>"`H4&%T:"`E
+M,#)X('P@5&%R9V5T("4P,G@@?"!%)7@O4R4P,G@I("`E>"5X)7@E>"5X)7@E
+M>"5X``!-5E]297%U97-T("5P.B!#9&);)3)X+"4R>"PE,G@L)3)X+"`E,G@L
+M)3)X+"4R>"PE,G@L("4R>"PE,G@L)3)X+"4R>"P@)3)X+"4R>"PE,G@L)3)X
+M72X`-2!2971R>6EN9R!F86EL960L(&1I<VL@9&]W;B$A(0!487-K(&9I;&4@
+M97)R;W(L(%-T871U<U)E9STP>"5X+"!%<G)296<],'@E>"P@3$)!6S`M,UT]
+M,'@E>"Q,0D%;-"TW73TP>"5X+@``1&5V:6-E(&5R<F]R(&EN9F]R;6%T:6]N
+M(#!X)6QL6`!!='1$979305-!9&1R6R5X72`@6U5N:71)9"`E>%T@<V%S(&%D
+M9'(@)3`R>"TE,#)X+24P,G@M)3`R>"TE,#)X+24P,G@M)3`R>"TE,#)X`'-A
+M;64@<V%S(&%D9'(@)3`R>"TE,#)X+24P,G@M)3`R>"TE,#)X+24P,G@M)3`R
+M>"TE,#)X````1&5V:6-E("5X(&EN('-T86YD8GD@;6]D92P@<W1A<G0@=&\@
+M<&]W97(@:70@=7`N`````%-T87)T('1O('!O=V5R('5P(&1E=FEC92`E>"XN
+M+@``<&]R="!R97-E="!N;W0@8V]M<&QE=&4@<W5C8V5S<RP@:6=N;W)E('1H
+M92!P;W)T("@E>"D```!2;V-K971204E$(%-31"`R,3)X($-O;G1R;VQL97(`
+M`%)O8VME=%)!240@,C<Q>"!305,@0V]N=')O;&QE<@``4F]C:V5T4D%)1"!3
+M4T0@,C$T>"!#;VYT<F]L;&5R``!!='1A8VAE9"!D979I8V4@:6YD97@@)3`R
+M>"`H4&%T:"`E,#)X('P@5&%R9V5T("4P,G@@?"!%)7@O4R4P,G@I("`E>"5X
+M)7@E>"5X)7@E>"5X``!-5E]297%U97-T("5P.B!#9&);)3)X+"4R>"PE,G@L
+M)3)X+"`E,G@L)3)X+"4R>"PE,G@L("4R>"PE,G@L)3)X+"4R>"P@)3)X+"4R
+M>"PE,G@L)3)X72X`-2!2971R>6EN9R!F86EL960L(&1I<VL@9&]W;B$A(0!4
+M87-K(&9I;&4@97)R;W(L(%-T871U<U)E9STP>"5X+"!%<G)296<],'@E>"P@
+M3$)!6S`M,UT],'@E>"Q,0D%;-"TW73TP>"5X+@``1&5V:6-E(&5R<F]R(&EN
+M9F]R;6%T:6]N(#!X)6QL6`!!='1$979305-!9&1R6R5X72`@6U5N:71)9"`E
+M>%T@<V%S(&%D9'(@)3`R>"TE,#)X+24P,G@M)3`R>"TE,#)X+24P,G@M)3`R
+M>"TE,#)X`'-A;64@<V%S(&%D9'(@)3`R>"TE,#)X+24P,G@M)3`R>"TE,#)X
+M+24P,G@M)3`R>"TE,#)X````1&5V:6-E("5X(&EN('-T86YD8GD@;6]D92P@
+M<W1A<G0@=&\@<&]W97(@:70@=7`N`````%-T87)T('1O('!O=V5R('5P(&1E
+M=FEC92`E>"XN+@``<&]R="!R97-E="!N;W0@8V]M<&QE=&4@<W5C8V5S<RP@
+M:6=N;W)E('1H92!P;W)T("@E>"D```!2;V-K971204E$(%-31"`R,3)X($-O
+M;G1R;VQL97(``%)O8VME=%)!240@,C<Q>"!305,@0V]N=')O;&QE<@``4F]C
+M:V5T4D%)1"!34T0@,C$T>"!#;VYT<F]L;&5R``!!='1A8VAE9"!D979I8V4@
+M:6YD97@@)3`R>"`H4&%T:"`E,#)X('P@5&%R9V5T("4P,G@@?"!%)7@O4R4P
+M,G@I("`E>"5X)7@E>"5X)7@E>"5X``!-5E]297%U97-T("5P.B!#9&);)3)X
+M+"4R>"PE,G@L)3)X+"`E,G@L)3)X+"4R>"PE,G@L("4R>"PE,G@L)3)X+"4R
+M>"P@)3)X+"4R>"PE,G@L)3)X72X`-2!2971R>6EN9R!F86EL960L(&1I<VL@
+M9&]W;B$A(0!487-K(&9I;&4@97)R;W(L(%-T871U<U)E9STP>"5X+"!%<G)2
+M96<],'@E>"P@3$)!6S`M,UT],'@E>"Q,0D%;-"TW73TP>"5X+@``1&5V:6-E
+M(&5R<F]R(&EN9F]R;6%T:6]N(#!X)6QL6`!!='1$979305-!9&1R6R5X72`@
+M6U5N:71)9"`E>%T@<V%S(&%D9'(@)3`R>"TE,#)X+24P,G@M)3`R>"TE,#)X
+M+24P,G@M)3`R>"TE,#)X`'-A;64@<V%S(&%D9'(@)3`R>"TE,#)X+24P,G@M
+M)3`R>"TE,#)X+24P,G@M)3`R>"TE,#)X````1&5V:6-E("5X(&EN('-T86YD
+M8GD@;6]D92P@<W1A<G0@=&\@<&]W97(@:70@=7`N`````%-T87)T('1O('!O
+M=V5R('5P(&1E=FEC92`E>"XN+@``<&]R="!R97-E="!N;W0@8V]M<&QE=&4@
+M<W5C8V5S<RP@:6=N;W)E('1H92!P;W)T("@E>"D```!2;V-K971204E$(%-3
+M1"`R,3)X($-O;G1R;VQL97(``%)O8VME=%)!240@,C<Q>"!305,@0V]N=')O
+M;&QE<@``4F]C:V5T4D%)1"!34T0@,C$T>"!#;VYT<F]L;&5R``!!='1A8VAE
+M9"!D979I8V4@:6YD97@@)3`R>"`H4&%T:"`E,#)X('P@5&%R9V5T("4P,G@@
+M?"!%)7@O4R4P,G@I("`E>"5X)7@E>"5X)7@E>"5X``!;)60@)61=(&1E=FEC
+M92!E<F%S92!U;FET('-U8V-E<W-F=6QL>2X`6R5D("5D72!D979I8V4@97)A
+M<V4@=6YI="!F86EL960@;W(@86)O<G1E9"X`1&5V:6-E7TED/25D`$1E=FEC
+M92`E>"\E>"!R96UO=F5D+@!$979I8V4@)7@O)7@@<F5M;W9E9"X`<W1A<G0@
+M4T53(&1E=FEC92`E<`!$979I8V4@)7@@<&]W97)E9"!U<"X`1F]U;F0@4T53
+M($1E=FEC92`E>`!&86EL960@=&\@=F5R:69Y(&-O;G1R;VQL97(`2&EG:%!O
+M:6YT(%1E8VAN;VQO9VEE<RP@26YC+@!O9&EN`$1E=FEC95])9#TE9`!$979I
+M8V4@)7@O)7@@<F5M;W9E9"X`1&5V:6-E("5X+R5X(')E;6]V960N`'-T87)T
+M(%-%4R!D979I8V4@)7``1&5V:6-E("5X('!O=V5R960@=7`N`$9O=6YD(%-%
+M4R!$979I8V4@)7@`1F%I;&5D('1O('9E<FEF>2!C;VYT<F]L;&5R`$AI9VA0
+M;VEN="!496-H;F]L;V=I97,L($EN8RX`;V1I;@!$979I8V5?260])60`1&5V
+M:6-E("5X+R5X(')E;6]V960N`$1E=FEC92`E>"\E>"!R96UO=F5D+@!S=&%R
+M="!315,@9&5V:6-E("5P`$1E=FEC92`E>"!P;W=E<F5D('5P+@!&;W5N9"!3
+M15,@1&5V:6-E("5X`$9A:6QE9"!T;R!V97)I9GD@8V]N=')O;&QE<@!(:6=H
+M4&]I;G0@5&5C:&YO;&]G:65S+"!);F,N`&]D:6X`1&5V:6-E7TED/25D`$1E
+M=FEC92`E>"\E>"!R96UO=F5D+@!$979I8V4@)7@O)7@@<F5M;W9E9"X`<W1A
+M<G0@4T53(&1E=FEC92`E<`!$979I8V4@)7@@<&]W97)E9"!U<"X`1F]U;F0@
+M4T53($1E=FEC92`E>`!&86EL960@=&\@=F5R:69Y(&-O;G1R;VQL97(`2&EG
+M:%!O:6YT(%1E8VAN;VQO9VEE<RP@26YC+@!O9&EN`$%U=&\@4F5B=6EL9`!2
+M96)U:6QD(%!R:6]R:71Y`$-O;G1I;G5E(%)E8G5I;&1I;F<@;VX@17)R;W(`
+M4W!I;F1O=VX@261L92!$:7-K("AM:6YU=&5S*0!3=&%G9V5R960@<W!I;G5P
+M`$9A:6QE9"!T;R!F;'5S:"!T87)G971S`$9A:6QE9"!T;R!S<&EN9&]W;B!D
+M979I8V5S``````````"6,`=W+&$.[KI1"9D9Q&T'C_1J<#6E8^FCE62>,HC;
+M#J2XW'D>Z=7@B-G2ERM,M@F]?+%^!RVXYY$=OY!D$+<=\B"P:DAQN?/>0;Z$
+M?=3:&NODW6U1M=3TQX73@U:8;!/`J&MD>OEB_>S)98I/7`$4V6P&8V,]#_KU
+M#0B-R"!N.UX0:4SD06#5<G%GHM'D`SQ'U`1+_84-TFNU"J7ZJ+4U;)BR0M;)
+MN]M`^;RLXVS8,G5<WT7/#=;<63W1JZPPV28Z`-Y1@%'7R!9AT+^U]+0A(\2S
+M5IF5NL\/I;VXGK@"*`B(!5^RV0S&).D+L8=\;R\13&A8JQUAP3TM9K:00=QV
+M!G';`;P@TI@J$-7OB86Q<1^UM@:EY+^?,]2XZ*+)!W@T^0`/CJ@)EAB8#N&[
+M#6I_+3UM")=L9)$!7&/F]%%K:V)A;!S8,&6%3@!B\NV5!FQ[I0$;P?0(@E?$
+M#_7&V;!E4.FW$NJXOHM\B+G\WQW=8DDMVA7S?-.,94S4^UAALDW.4;4Z=`"\
+MH^(PN]1!I=]*UY78/6W$T:3[]-;3:NEI0_S9;C1&B&>MT+A@VG,M!$3E'0,S
+M7TP*JLE\#=T\<050JD$")Q`0"[Z&(`S));5H5[.%;R`)U&:YG^1AS@[YWEZ8
+MR=DI(IC0L+2HU\<7/;-9@0VT+CM<O;>M;+K`((.X[;:SOYH,XK8#FM*Q=#E'
+MU>JO=]*=%2;;!(,6W',2"V/CA#MDE#YJ;0VH6FIZ"\\.Y)W_"9,GK@`*L9X'
+M?423#_#2HPB':/(!'O["!FE=5V+WRV=E@'$V;!GG!FMN=AO4_N`KTXE:>MH0
+MS$K=9V_?N?GY[[Z.0[ZW%]6.L&#HH];6?I/1H<3"V#A2\M]/\6>[T6=7O*;=
+M!K4_2S:R2-HK#=A,&PJO]DH#-F!Z!$'#[V#?5=]GJ.^.;C%YOFE&C+-ARQJ#
+M9KR@TF\E-N)H4I5W#,P#1PN[N18"(B\F!56^.[K%*`N]LI):M"L$:K-<I__7
+MPC'/T+6+GMDL':[>6[#"9)LF\F/LG*-J=0J3;0*I!@F</S8.ZX5G!W(35P`%
+M@DJ_E11ZN.*N*[%[.!NV#)N.TI(-OM7EM^_<?"'?VPO4TM.&0N+4\?BSW6AN
+M@]H?S1:^@5LFN?;A=[!O=T>W&.9:"(AP:@__RCL&9EP+`1'_GF6/::YB^-/_
+M:V%%SVP6>.(*H.[2#==4@P1.PK,#.6$F9Z?W%F#034=I2=MW;CY*:M&NW%K6
+MV68+WT#P.]@W4ZZ\J<6>N]Y_S[)'Z?^U,!SRO;V*PKK*,).S4Z:CM"0%-M"Z
+MDP;7S2E7WE2_9]DC+GIFL[A*8<0"&VA=E"MO*C>^"[2AC@S#&]\%6HWO`BT`
+M(```!$0````@`0`$1````@$```(Z```"`0$``CH```0!```+````!`$!``L`
+M```(`0``!EH!``@!`0`&6@$`$`$```,4`0`0`0$``Q0!`"`!```&*```(`$!
+M``8H``!``0```Q$``$`!`0`')P``@`$```M'`P"``0$`"T<#``8$!0$#`B!@
+MD%!2```````&!`4!`P)28A4`````````!@0%`0,"V&"?-CD\``````8$!0$#
+M`MA@D``````````$!08'``$"`P```````````````````````````````*L1
+M@)$```````(``````````````0```*L1@)0```````(``````````````0``
+M`$L;@)0```````(``````````````0````,1("<```````(`````````````
+M`0````,1(2<```````(``````````````0````,1(B<```````(`````````
+M`````0````,1$"<```````(``````````````0````,1$2<```````(`````
+M`````````0````@`````````````````````````````````````````L```
+M```````A````T%T!`)Q@`0#D80$`_&$!`/QF`0"@9`$`R%T!`/AF`0`T90$`
+M[&$!`$1N`0"T>P$`9(T!````````<0$`]&$!`,1R`0#(=P$`H'L!`&A[`0!H
+MCP$`-)@!``B9`0"XF0$`X)D!`(BA`0`(F@$`'&8!````````````O'L!`(1\
+M`0#<?P$`;(8!``````````````````````"6,`=W+&$.[KI1"9D9Q&T'C_1J
+M<#6E8^FCE62>,HC;#J2XW'D>Z=7@B-G2ERM,M@F]?+%^!RVXYY$=OY!D$+<=
+M\B"P:DAQN?/>0;Z$?=3:&NODW6U1M=3TQX73@U:8;!/`J&MD>OEB_>S)98I/
+M7`$4V6P&8V,]#_KU#0B-R"!N.UX0:4SD06#5<G%GHM'D`SQ'U`1+_84-TFNU
+M"J7ZJ+4U;)BR0M;)N]M`^;RLXVS8,G5<WT7/#=;<63W1JZPPV28Z`-Y1@%'7
+MR!9AT+^U]+0A(\2S5IF5NL\/I;VXGK@"*`B(!5^RV0S&).D+L8=\;R\13&A8
+MJQUAP3TM9K:00=QV!G';`;P@TI@J$-7OB86Q<1^UM@:EY+^?,]2XZ*+)!W@T
+M^0`/CJ@)EAB8#N&[#6I_+3UM")=L9)$!7&/F]%%K:V)A;!S8,&6%3@!B\NV5
+M!FQ[I0$;P?0(@E?$#_7&V;!E4.FW$NJXOHM\B+G\WQW=8DDMVA7S?-.,94S4
+M^UAALDW.4;4Z=`"\H^(PN]1!I=]*UY78/6W$T:3[]-;3:NEI0_S9;C1&B&>M
+MT+A@VG,M!$3E'0,S7TP*JLE\#=T\<050JD$")Q`0"[Z&(`S));5H5[.%;R`)
+MU&:YG^1AS@[YWEZ8R=DI(IC0L+2HU\<7/;-9@0VT+CM<O;>M;+K`((.X[;:S
+MOYH,XK8#FM*Q=#E'U>JO=]*=%2;;!(,6W',2"V/CA#MDE#YJ;0VH6FIZ"\\.
+MY)W_"9,GK@`*L9X'?423#_#2HPB':/(!'O["!FE=5V+WRV=E@'$V;!GG!FMN
+M=AO4_N`KTXE:>MH0S$K=9V_?N?GY[[Z.0[ZW%]6.L&#HH];6?I/1H<3"V#A2
+M\M]/\6>[T6=7O*;=!K4_2S:R2-HK#=A,&PJO]DH#-F!Z!$'#[V#?5=]GJ.^.
+M;C%YOFE&C+-ARQJ#9KR@TF\E-N)H4I5W#,P#1PN[N18"(B\F!56^.[K%*`N]
+MLI):M"L$:K-<I__7PC'/T+6+GMDL':[>6[#"9)LF\F/LG*-J=0J3;0*I!@F<
+M/S8.ZX5G!W(35P`%@DJ_E11ZN.*N*[%[.!NV#)N.TI(-OM7EM^_<?"'?VPO4
+MTM.&0N+4\?BSW6AN@]H?S1:^@5LFN?;A=[!O=T>W&.9:"(AP:@__RCL&9EP+
+M`1'_GF6/::YB^-/_:V%%SVP6>.(*H.[2#==4@P1.PK,#.6$F9Z?W%F#034=I
+M2=MW;CY*:M&NW%K6V68+WT#P.]@W4ZZ\J<6>N]Y_S[)'Z?^U,!SRO;V*PKK*
+M,).S4Z:CM"0%-M"ZDP;7S2E7WE2_9]DC+GIFL[A*8<0"&VA=E"MO*C>^"[2A
+MC@S#&]\%6HWO`BT`(```!$0````@`0`$1````@$```(Z```"`0$``CH```0!
+M```+````!`$!``L````(`0``!EH!``@!`0`&6@$`$`$```,4`0`0`0$``Q0!
+M`"`!```&*```(`$!``8H``!``0```Q$``$`!`0`')P``@`$```M'`P"``0$`
+M"T<#``8$!0$#`B!@D%!2```````&!`4!`P)28A4`````````!@0%`0,"V&"?
+M-CD\``````8$!0$#`MA@D`````````"K$8"1```````"``````````````0`
+M``"K$8"4```````"``````````````0```!+&X"4```````"````````````
+M``0````#$6`G```````"``````````````0````$````````````````````
+M`````````````````````&4!````````(0```"`%`P`L"`,`=`D#`(P)`P"0
+M#@,`-`P#`&P$`P",#@,`R`P#`'P)`P#8%0,`2",#`/@T`P``````E!@#`(0)
+M`P!8&@,`7!\#`#0C`P#\(@,`W#8#`*@_`P!\0`,`+$$#`%1!`P#\2`,`?$$#
+M`+`-`P``````\`0#`%`C`P`8)`,`<"<#```N`P``````````````````````
+MEC`'=RQA#NZZ40F9&<1M!X_T:G`UI6/IHY5DGC*(VPZDN-QY'NG5X(C9TI<K
+M3+8)O7RQ?@<MN.>1';^09!"W'?(@L&I(<;GSWD&^A'W4VAKKY-UM4;74],>%
+MTX-6F&P3P*AK9'KY8OWLR66*3UP!%-EL!F-C/0_Z]0T(C<@@;CM>$&E,Y$%@
+MU7)Q9Z+1Y`,\1]0$2_V%#=)KM0JE^JBU-6R8LD+6R;O;0/F\K.-LV#)U7-]%
+MSPW6W%D]T:NL,-DF.@#>48!1U\@68="_M?2T(2/$LU:9E;K/#Z6]N)ZX`B@(
+MB`5?LMD,QB3I"[&'?&\O$4QH6*L=8<$]+6:VD$'<=@9QVP&\(-*8*A#5[XF%
+ML7$?M;8&I>2_GS/4N.BBR0=X-/D`#XZH"988F`[ANPUJ?RT];0B7;&21`5QC
+MYO11:VMB86P<V#!EA4X`8O+ME09L>Z4!&\'T"()7Q`_UQMFP95#IMQ+JN+Z+
+M?(BY_-\=W6))+=H5\WS3C&5,U/M88;)-SE&U.G0`O*/B,+O40:7?2M>5V#UM
+MQ-&D^_36TVKI:4/\V6XT1HAGK="X8-IS+01$Y1T#,U],"JK)?`W=/'$%4*I!
+M`B<0$`N^AB`,R26U:%>SA6\@"=1FN9_D8<X.^=Y>F,G9*2*8T+"TJ-?'%SVS
+M68$-M"X[7+VWK6RZP""#N.VVL[^:#.*V`YK2L70Y1]7JKW?2G14FVP2#%MQS
+M$@MCXX0[9)0^:FT-J%IJ>@O/#N2=_PF3)ZX`"K&>!WU$DP_PTJ,(AVCR`1[^
+MP@9I75=B]\MG98!Q-FP9YP9K;G8;U/[@*].)6GK:$,Q*W6=OW[GY^>^^CD.^
+MMQ?5CK!@Z*/6UGZ3T:'$PM@X4O+?3_%GN]%G5[RFW0:U/TLVLDC:*PW83!L*
+MK_9*`S9@>@1!P^]@WU7?9ZCOCFXQ>;YI1HRS8<L:@V:\H-)O)3;B:%*5=PS,
+M`T<+N[D6`B(O)@55OCNZQ2@+O;*26K0K!&JS7*?_U\(QS]"UBY[9+!VNWENP
+MPF2;)O)C[)RC:G4*DVT"J08)G#\V#NN%9P=R$U<`!8)*OY44>KCBKBNQ>S@;
+MM@R;CM*2#;[5Y;?OW'PAW]L+U-+3AD+BU/'XL]UH;H/:'\T6OH%;)KGVX7>P
+M;W='MQCF6@B(<&H/_\H[!F9<"P$1_YYECVFN8OC3_VMA1<]L%GCB"J#NT@W7
+M5(,$3L*S`SEA)F>G]Q9@T$U':4G;=VX^2FK1KMQ:UMEF"]]`\#O8-U.NO*G%
+MGKO>?\^R1^G_M3`<\KV]BL*ZRC"3LU.FH[0D!3;0NI,&U\TI5]Y4OV?9(RYZ
+M9K.X2F'$`AMH790K;RHWO@NTH8X,PQO?!5J-[P(M`"````1$````(`$`!$0`
+M``(!```".@```@$!``(Z```$`0``"P````0!`0`+````"`$```9:`0`(`0$`
+M!EH!`!`!```#%`$`$`$!``,4`0`@`0``!B@``"`!`0`&*```0`$```,1``!`
+M`0$`!R<``(`!```+1P,`@`$!``M'`P`&!`4!`P(@8)!04@``````!@0%`0,"
+M4F(5``````````8$!0$#`MA@GS8Y/``````&!`4!`P+88)``````````JQ&`
+MD0```````@`````````````$````JQ&`E````````@`````````````$````
+M2QN`E````````@`````````````$`````Q&")P```````@`````````````$
+M````!``````````````````````````````````````````:`@```````"$`
+M``"4K`0`8*\$`*BP!`#`L`0`Q+4$`&BS!`#@JP0`P+4$`/RS!`"PL`0`#+T$
+M`'S*!``LW`0``````,B_!`"XL`0`C,$$`)#&!`!HR@0`,,H$`!#>!`#<Y@0`
+ML.<$`&#H!`"(Z`0`,/`$`+#H!`#DM`0``````&2L!`"$R@0`3,L$`*3.!``T
+MU00``````````````````````)8P!W<L80[NNE$)F1G$;0>/]&IP-:5CZ:.5
+M9)XRB-L.I+C<>1[IU>"(V=*7*TRV";U\L7X'+;CGD1V_D&00MQWR(+!J2'&Y
+M\]Y!OH1]U-H:Z^3=;5&UU/3'A=.#5IAL$\"H:V1Z^6+][,EEBD]<`139;`9C
+M8ST/^O4-"(W((&X[7A!I3.1!8-5R<6>BT>0#/$?4!$O]A0W2:[4*I?JHM35L
+MF+)"ULF[VT#YO*SC;-@R=5S?1<\-UMQ9/=&KK##9)CH`WE&`4=?(%F'0O[7T
+MM"$CQ+-6F96ZSP^EO;B>N`(H"(@%7[+9#,8DZ0NQAWQO+Q%,:%BK'6'!/2UF
+MMI!!W'8&<=L!O"#2F"H0U>^)A;%Q'[6V!J7DOY\SU+CHHLD'>#3Y``^.J`F6
+M&)@.X;L-:G\M/6T(EVQDD0%<8^;T46MK8F%L'-@P985.`&+R[94&;'NE`1O!
+M]`B"5\0/]<;9L&50Z;<2ZKB^BWR(N?S?'=UB22W:%?-\TXQE3-3[6&&R3<Y1
+MM3IT`+RCXC"[U$&EWTK7E=@];<31I/OTUM-JZ6E#_-EN-$:(9ZW0N&#:<RT$
+M1.4=`S-?3`JJR7P-W3QQ!5"J00(G$!`+OH8@#,DEM6A7LX5O(`G49KF?Y&'.
+M#OG>7IC)V2DBF-"PM*C7QQ<]LUF!#;0N.UR]MZULNL`@@[CMMK._F@SBM@.:
+MTK%T.4?5ZJ]WTIT5)ML$@Q;<<Q(+8^.$.V24/FIM#:A::GH+SP[DG?\)DR>N
+M``JQG@=]1),/\-*C"(=H\@$>_L(&:5U78O?+9V6`<39L&><&:VYV&]3^X"O3
+MB5IZVA#,2MUG;]^Y^?GOOHY#OK<7U8ZP8.BCUM9^D]&AQ,+8.%+RWT_Q9[O1
+M9U>\IMT&M3]+-K)(VBL-V$P;"J_V2@,V8'H$0</O8-]5WV>H[XYN,7F^:4:,
+MLV'+&H-FO*#2;R4VXFA2E7<,S`-'"[NY%@(B+R8%5;X[NL4H"[VRDEJT*P1J
+MLURG_]?",<_0M8N>V2P=KMY;L,)DFR;R8^R<HVIU"I-M`JD&"9P_-@[KA6<'
+M<A-7``6"2K^5%'JXXJXKL7LX&[8,FX[2D@V^U>6W[]Q\(=_;"]32TX9"XM3Q
+M^+/=:&Z#VA_-%KZ!6R:Y]N%WL&]W1[<8YEH(B'!J#__*.P9F7`L!$?^>98]I
+MKF+XT_]K847/;!9XX@J@[M(-UU2#!$["LP,Y829GI_<68-!-1VE)VW=N/DIJ
+MT:[<6M;99@O?0/`[V#=3KKRIQ9Z[WG_/LD?I_[4P'/*]O8K"NLHPD[-3IJ.T
+M)`4VT+J3!M?-*5?>5+]GV2,N>F:SN$IAQ`(;:%V4*V\J-[X+M*&.#,,;WP5:
+MC>\"+0`@```$1````"`!``1$```"`0```CH```(!`0`".@``!`$```L````$
+M`0$`"P````@!```&6@$`"`$!``9:`0`0`0```Q0!`!`!`0`#%`$`(`$```8H
+M```@`0$`!B@``$`!```#$0``0`$!``<G``"``0``"T<#`(`!`0`+1P,`!@0%
+M`0,"(&"04%(```````8$!0$#`E)B%0`````````&!`4!`P+88)\V.3P`````
+M!@0%`0,"V&"0`````````*L1@)$```````(``````````````@```*L1@)0`
+M``````(``````````````@```$L;@)0```````(``````````````@````,1
+M,"<```````(``````````````@````,10"<```````(``````````````@``
+M``,11"<```````(``````````````@````8```````````````````#/`@``
+M`````"$```!T4@8`0%4&`(A6!@"@5@8`H%L&`$19!@#`408`G%L&`-A9!@"0
+M5@8`Z&(&`%AP!@`(@@8``````*1E!@"85@8`:&<&`&QL!@!$<`8`#'`&`.R#
+M!@"XC`8`C(T&`#R.!@!DC@8`#)8&`(R.!@#`6@8``````$12!@!@<`8`*'$&
+M`(!T!@`0>P8`````````````````_P$`````````````````````````````
+M`````````````````0`````````8`````````"P````4````\,<&`/"O!@!,
+MJP8```````````#\J08`1*H&`,RP!@``````````````````````````````
+M````````````````````_P``W$8'``````#T1@<``0````'_``#02@<`````
+M`.A*!P`!`````O\``"1+!P``````/$L'``$````#_P``Y$L'``````#\2P<`
+M`0```#7_``!L3`<``````(1,!P`!````!/\``'A0!P``````G%`'``$````%
+M_P``0%$'``````!\40<``0````;_``"P5@<`/%<'`'Q7!P``````!_\``,A=
+M!P!@7@<`T%X'```````*_P``"%\'```````@7P<``0````O_``!D7P<`````
+M`+Q?!P``````#/\``'QE!P#D90<`!&8'```````-_P``/&8'`*1F!P#$9@<`
+M``````[_``#\9@<`O&<'`/1G!P``````#_\``"QH!P"4:`<`'&D'```````0
+M_P``5&D'`,!I!P#@:0<``````!'_``"\:@<``````"AK!P``````$O\``&!K
+M!P``````>&L'```````3_P``L&L'``````#(:P<``0```#3_```,;`<`````
+M`"1L!P`!````&/\``*AL!P``````/&T'``````!"_P``8&T'``````#T;0<`
+M`````!G_``#P7P<``````$A@!P``````&O\``'Q@!P``````U&`'```````=
+M_P``&&X'``````!P;@<``````![_``"H;@<``````"1O!P`!````'_\``!1P
+M!P"0<`<`\'`'```````@_P``)%D'`+!9!P#P60<``````"'_``#@40<`````
+M`!Q2!P`!````(O\``!AJ!P``````A&H'```````C_P``"&$'``````!@80<`
+M`````"3_``"080<``````.AA!P``````)?\``!AB!P``````<&('```````I
+M_P``/%L'`/Q;!P!`7`<``````"K_``"@8@<``````"AC!P``````*_\``"AQ
+M!P!X<0<`I'$'```````L_P``R%,'```````@5`<``0```"W_``"850<`/%8'
+M`'A6!P``````+O\``(!2!P``````O%('``$````O_P``A$L'``````"<2P<`
+M`0```#?_```@4P<``````(!3!P`!````./\``"A:!P#$6@<`!%L'```````Y
+M_P``>%P'`$Q=!P"070<``````#K_``"<5`<```````15!P`!````._\``!!T
+M!P``````='4'``$````\_P``W%`'````````40<``0```#W_``#03`<`````
+M`.A,!P`!````/O\``(1-!P``````H$T'``$```!#_P``@$X'``````"<3@<`
+M`0```$3_``!\3P<``````)A/!P`!````,O\``"A'!P``````2$<'``$````S
+M_P``L$@'`,Q(!P`P20<``````&3_``#<<0<```````!R!P`!````,/\``,1R
+M!P``````9','``$```!F_P``3%@'``````"(6`<``0```&?_``"T5P<`````
+M`,Q7!P`!````_____P``````````````````````````````````````````
+M!````````````````````````````````````%2J!P#0J0<`````````````
+M````````````````````````````````````````````````````````````
+M````````!0$````````<```````````````@````^*H'`$2O!P``````(*L'
+M`$2K!P``````````````````````````````````````````````````````
+M````````````````!@`!``````````````````0````0`````````#RU!P``
+M````````````````````````````````````````````````````````````
+M````````````````````````"`$!`@````!X"P```````"````"X````C$@(
+M`(1`"``,2`@`>$D(`!Q*"`#,10@`*$8(`)!%"`!H2@@`````````````````
+M````````````````````````````````!P`````````<```````````````8
+M````=$L(``1/"```````G$L(`,!+"```````````````````````````````
+M````````````````````````````````````1T-#.B`H1TY5*2`S+C0N,B!;
+M1G)E94)31%T@,C`P-#`W,C@``$=#0SH@*$=.52D@,RXT+C(@6T9R965"4T1=
+M(#(P,#0P-S(X``!'0T,Z("A'3E4I(#,N-"XR(%M&<F5E0E-$72`R,#`T,#<R
+M.```1T-#.B`H1TY5*2`S+C0N,B!;1G)E94)31%T@,C`P-#`W,C@``$=#0SH@
+M*$=.52D@,RXT+C(@6T9R965"4T1=(#(P,#0P-S(X``!'0T,Z("A'3E4I(#,N
+M-"XR(%M&<F5E0E-$72`R,#`T,#<R.```1T-#.B`H1TY5*2`S+C0N,B!;1G)E
+M94)31%T@,C`P-#`W,C@``$=#0SH@*$=.52D@,RXT+C(@6T9R965"4T1=(#(P
+M,#0P-S(X``!'0T,Z("A'3E4I(#,N-"XR(%M&<F5E0E-$72`R,#`T,#<R.```
+M1T-#.B`H1TY5*2`S+C0N,B!;1G)E94)31%T@,C`P-#`W,C@``$=#0SH@*$=.
+M52D@,RXT+C(@6T9R965"4T1=(#(P,#0P-S(X``!'0T,Z("A'3E4I(#,N-"XR
+M(%M&<F5E0E-$72`R,#`T,#<R.```1T-#.B`H1TY5*2`S+C0N,B!;1G)E94)3
+M1%T@,C`P-#`W,C@``$=#0SH@*$=.52D@,RXT+C(@6T9R965"4T1=(#(P,#0P
+M-S(X``!'0T,Z("A'3E4I(#,N-"XR(%M&<F5E0E-$72`R,#`T,#<R.```1T-#
+M.B`H1TY5*2`S+C0N,B!;1G)E94)31%T@,C`P-#`W,C@``$=#0SH@*$=.52D@
+M,RXT+C(@6T9R965"4T1=(#(P,#0P-S(X``!'0T,Z("A'3E4I(#,N-"XR(%M&
+M<F5E0E-$72`R,#`T,#<R.```1T-#.B`H1TY5*2`S+C0N,B!;1G)E94)31%T@
+M,C`P-#`W,C@``$=#0SH@*$=.52D@,RXT+C(@6T9R965"4T1=(#(P,#0P-S(X
+M``!'0T,Z("A'3E4I(#,N-"XR(%M&<F5E0E-$72`R,#`T,#<R.```1T-#.B`H
+M1TY5*2`S+C0N,B!;1G)E94)31%T@,C`P-#`W,C@``$=#0SH@*$=.52D@,RXT
+M+C(@6T9R965"4T1=(#(P,#0P-S(X``!'0T,Z("A'3E4I(#,N-"XR(%M&<F5E
+M0E-$72`R,#`T,#<R.```1T-#.B`H1TY5*2`S+C0N,B!;1G)E94)31%T@,C`P
+M-#`W,C@``$=#0SH@*$=.52D@,RXT+C(@6T9R965"4T1=(#(P,#0P-S(X``!'
+M0T,Z("A'3E4I(#,N-"XR(%M&<F5E0E-$72`R,#`T,#<R.```1T-#.B`H1TY5
+M*2`S+C0N,B!;1G)E94)31%T@,C`P-#`W,C@``$=#0SH@*$=.52D@,RXT+C(@
+M6T9R965"4T1=(#(P,#0P-S(X``!'0T,Z("A'3E4I(#,N-"XR(%M&<F5E0E-$
+M72`R,#`T,#<R.```1T-#.B`H1TY5*2`S+C0N,B!;1G)E94)31%T@,C`P-#`W
+M,C@``$=#0SH@*$=.52D@,RXT+C(@6T9R965"4T1=(#(P,#0P-S(X``!'0T,Z
+M("A'3E4I(#,N-"XR(%M&<F5E0E-$72`R,#`T,#<R.```1T-#.B`H1TY5*2`S
+M+C0N,B!;1G)E94)31%T@,C`P-#`W,C@``$=#0SH@*$=.52D@,RXT+C(@6T9R
+M965"4T1=(#(P,#0P-S(X``!'0T,Z("A'3E4I(#,N-"XR(%M&<F5E0E-$72`R
+M,#`T,#<R.```1T-#.B`H1TY5*2`S+C0N,B!;1G)E94)31%T@,C`P-#`W,C@`
+M`$=#0SH@*$=.52D@,RXT+C(@6T9R965"4T1=(#(P,#0P-S(X``!'0T,Z("A'
+M3E4I(#,N-"XR(%M&<F5E0E-$72`R,#`T,#<R.```1T-#.B`H1TY5*2`S+C0N
+M,B!;1G)E94)31%T@,C`P-#`W,C@``$=#0SH@*$=.52D@,RXT+C(@6T9R965"
+M4T1=(#(P,#0P-S(X``!'0T,Z("A'3E4I(#,N-"XR(%M&<F5E0E-$72`R,#`T
+M,#<R.```1T-#.B`H1TY5*2`S+C0N,B!;1G)E94)31%T@,C`P-#`W,C@``$=#
+M0SH@*$=.52D@,RXT+C(@6T9R965"4T1=(#(P,#0P-S(X``!'0T,Z("A'3E4I
+M(#,N-"XR(%M&<F5E0E-$72`R,#`T,#<R.```1T-#.B`H1TY5*2`S+C0N,B!;
+M1G)E94)31%T@,C`P-#`W,C@``$=#0SH@*$=.52D@,RXT+C(@6T9R965"4T1=
+M(#(P,#0P-S(X``!'0T,Z("A'3E4I(#,N-"XR(%M&<F5E0E-$72`R,#`T,#<R
+M.```1T-#.B`H1TY5*2`S+C0N,B!;1G)E94)31%T@,C`P-#`W,C@``$=#0SH@
+M*$=.52D@,RXT+C(@6T9R965"4T1=(#(P,#0P-S(X``!'0T,Z("A'3E4I(#,N
+M-"XR(%M&<F5E0E-$72`R,#`T,#<R.```1T-#.B`H1TY5*2`S+C0N,B!;1G)E
+M94)31%T@,C`P-#`W,C@``$=#0SH@*$=.52D@,RXT+C(@6T9R965"4T1=(#(P
+M,#0P-S(X``!'0T,Z("A'3E4I(#,N-"XR(%M&<F5E0E-$72`R,#`T,#<R.```
+M1T-#.B`H1TY5*2`S+C0N,B!;1G)E94)31%T@,C`P-#`W,C@``$=#0SH@*$=.
+M52D@,RXT+C(@6T9R965"4T1=(#(P,#0P-S(X``!'0T,Z("A'3E4I(#,N-"XR
+M(%M&<F5E0E-$72`R,#`T,#<R.```1T-#.B`H1TY5*2`S+C0N,B!;1G)E94)3
+M1%T@,C`P-#`W,C@``$=#0SH@*$=.52D@,RXT+C(@6T9R965"4T1=(#(P,#0P
+M-S(X``!'0T,Z("A'3E4I(#,N-"XR(%M&<F5E0E-$72`R,#`T,#<R.```1T-#
+M.B`H1TY5*2`S+C0N,B!;1G)E94)31%T@,C`P-#`W,C@``$=#0SH@*$=.52D@
+M,RXT+C(@6T9R965"4T1=(#(P,#0P-S(X``!'0T,Z("A'3E4I(#,N-"XR(%M&
+M<F5E0E-$72`R,#`T,#<R.```1T-#.B`H1TY5*2`S+C0N,B!;1G)E94)31%T@
+M,C`P-#`W,C@``$=#0SH@*$=.52D@,RXT+C(@6T9R965"4T1=(#(P,#0P-S(X
+M``!'0T,Z("A'3E4I(#,N-"XR(%M&<F5E0E-$72`R,#`T,#<R.```1T-#.B`H
+M1TY5*2`S+C0N,B!;1G)E94)31%T@,C`P-#`W,C@``$=#0SH@*$=.52D@,RXT
+M+C(@6T9R965"4T1=(#(P,#0P-S(X``!'0T,Z("A'3E4I(#,N-"XR(%M&<F5E
+M0E-$72`R,#`T,#<R.```1T-#.B`H1TY5*2`S+C0N,B!;1G)E94)31%T@,C`P
+M-#`W,C@``$=#0SH@*$=.52D@,RXT+C(@6T9R965"4T1=(#(P,#0P-S(X``!'
+M0T,Z("A'3E4I(#,N-"XR(%M&<F5E0E-$72`R,#`T,#<R.```+G-Y;71A8@`N
+M<W1R=&%B`"YS:'-T<G1A8@`N<F5L+G1E>'0`+G)E;"YR;V1A=&$`+G)O9&%T
+M82YS='(Q+C0`+G)O9&%T82YS='(Q+C$`+G)E;"YD871A`"YB<W,`+F-O;6UE
+M;G0````````````````````````````````````````````````````````?
+M`````0````8`````````-````")1"`````````````0`````````&P````D`
+M`````````````/!M"0"H]0``#`````$````$````"````"D````!`````@``
+M``````!@40@`B",`````````````(``````````E````"0``````````````
+MF&,*`*A%```,`````P````0````(````,0````$````R`````````.AT"``%
+M"P`````````````$`````0```$`````!````,@````````#M?P@`<`,`````
+M`````````0````$```!3`````0````,`````````8(,(`.0>````````````
+M`"``````````3P````D``````````````$"I"@!8"0``#`````<````$````
+M"````%D````(`````P````````!@H@@`H`@`````````````(`````````!>
+M`````0``````````````8*((`&@*``````````````$`````````$0````,`
+M`````````````,BL"`!G```````````````!``````````$````"````````
+M``````!@KP@`@$L```T```!-!```!````!`````)`````P``````````````
+MX/H(`!!S``````````````$`````````````````````````````````````
+M``````````,``0`````````````````#``(``````````````````P`#````
+M``````````````,`!``````````````````#``4``````````````````P`&
+M``````````````````,`!P`````````````````#``@`````````````````
+M`P`)``````````````````,`"@`````````````````#``L`````````````
+M`````P`,``````````````````,`#0`!````H&$``)0)```"``$`(P```.BS
+M```R`````@`!`#T````0$P$`4`````(``0!5````>)```$H````"``$`>```
+M`&PF``!Q`````@`!`(8```#$"0$`#0````(``0"5````%$L!`#\!```"``$`
+MK@```"S*```L`````@`!`,@```#$"P``70````(``0#>````I+L``&0!```"
+M``$``P$``)3"```>`````@`!`!L!``!LQ0``WP````(``0`X`0``.(L``*0`
+M```"``$`7@$``*`$```0`````0`'`'0!```,R@``'P````(``0"/`0``V$0!
+M`!D````"``$`J@$``!`#```_`````@`!`+L!``#(/0$`.`````(``0#,`0``
+M/$8``/X!```"``$`Z@$``,20`0#8!````@`!``<"``#P`P``0P````(``0`=
+M`@``>-8``!0!```"``$`.`(``"2````H`0```@`!`%\"``"\1`$`&@````(`
+M`0!Y`@``#(D``!P!```"``$`FP(```Q&`0"6`````@`!`+@"``!L50$`:P``
+M``(``0#%`@``*(H```\!```"``$`YP(``+BI``";`````@`!``L#```8#@``
+MF@,```(``0`N`P``5`(``!`````"``$`00,``"0,```O`````@`!`%4#``"4
+M>```KP````(``0!T`P``)$0``!@"```"``$`C@,``(10`0#9`@```@`!`*8#
+M``"(F0``,`````(``0"\`P``A!T``($````"``$`W`,``(B;``#C`````@`!
+M`/0#```H-```9`````(``0`-!```W$@!`"T!```"``$`*@0``"!<`0"7````
+M`@`!`#X$``#LC@``(`$```(``0!?!```C-<``&4!```"``$`>`0``#R"``!V
+M`````@`!`),$``#<VP````(```(``0"J!```P'P``-L````"``$`T@0``'2E
+M```N`````@`!`.H$``"0L@``20````(``0#_!```9/<``,,"```"``$`'04`
+M`.BD```E`````@`!`#H%```@F```90$```(``0!-!0``G#4``,<````"``$`
+M:04``"CZ``"?!@```@`!`(@%```<*0$`>P<```(``0"F!0``N)$``!0$```"
+M``$`P`4``%P?``!/`````@`!`-D%````"```(@````$``P#D!0``7-0``&H`
+M```"``$``P8``'0<```-`0```@`!`!X&``"`!```$`````$`!P`Q!@``K!\`
+M`)@````"``$`4@8````^`0`X`````@`!`&,&``"TP@``IP````(``0![!@``
+M_)8``)\````"``$`C`8``&0+``!=`````@`!`*$&``!8A```V`,```(``0#`
+M!@``P`$``$0````"``$`T@8``(@!```V`````@`!`.<&``#@#```-0$```(`
+M`0#]!@``T)<``$\````"``$`&`<``,SL``!7`````@`!`#@'``#TV```60``
+M``(``0!7!P``W"`!`*L````"``$`=`<``(3>``"+`````@`!`(H'```XL```
+MX0````(``0"O!P``&*0``#T````"``$`S`<``.2?```Q`````@`!`.('``"$
+MN0``?`````(``0``"```R*,``$T````"``$`'@@``*0\`0`X`````@`!`"X(
+M``!@````@`````$`"0`T"```R&0!`&L````"``$`1`@``%1X```^`````@`!
+M`&8(``"P!```$`````$`!P!V"```U.$``+8"```"``$`D0@``*`)``#$`0``
+M`@`!`*4(``!$`0``00````(``0"U"```#$H!``8!```"``$`R`@``/`$``!C
+M`@```@`!`.<(```0LP``V`````(``0``"0``0````!P````!``D`$PD``&A0
+M`0`9`````@`!`#@)``!L0P$`,`````(``0!'"0``U`D!`'D"```"``$`7`D`
+M`+BD```N`````@`!`'H)``"XN@``Z0````(``0"."0``@`@``!X!```"``$`
+MFPD``"3M``!7`````@`!`+L)```HJ0``C0````(``0#D"0``J,```.P!```"
+M``$`^`D``%1,`0`&`````@`!`!(*``#T0P$`1P````(``0`F"@``T`<``#T`
+M```"``$`-`H``$2V```J`````@`!`%(*``"0I```)0````(``0!O"@``1"``
+M`+0%```"``$`D0H``-RR```R`````@`!`*@*``"$`@``&P````(``0"\"@``
+M@,@``/\````"``$`V0H``$1Y``"@`@```@`!`/D*``#$D```\0````(``0`8
+M"P``!`(``%`````"``$`+@L``)@P`0!<!P```@`!`$\+```T!```0`````(`
+M`0!O"P``Q($``'<````"``$`C@L``%",``",`0```@`!`*4+``#<Q@``CP``
+M``(``0#0"P``3($``'8````"``$`YPL```#L``#,`````@`!```,``!P````
+MT0````(``0`=#```C.0``,8#```"``$`-@P``+0$```\`````@`!`$P,``#(
+M``$`Y0,```(``0!G#```$-\``,$"```"``$`@`P``&!'`0!Z`0```@`!`)X,
+M``!D3`$`)@````(``0"]#```"%`!`%\````"``$`X@P``,RB``#Z`````@`!
+M`/D,``!$?P``D`````(``0`A#0``U'\``$X````"``$`2PT``)QK``!"!P``
+M`@`!`&4-``#`0P$`,P````(``0!Z#0``(#X``)P#```"``$`EPT``/R=``!T
+M`````@`!`*L-``!8R@``4P````(``0#!#0``]%T``*P#```"``$`XPT```2$
+M``!2`````@`!``P.```8H```8@$```(``0`E#@``G$,!`"(````"``$`-PX`
+M`'0H`0"H`````@`!`$\.```4M@``+@````(``0!J#@``$*4``$<````"``$`
+MAPX``-R+``!Q`````@`!`)T.``#`!```"`````$`!P"L#@``M)T``$8````"
+M``$`Q@X``+2_``!D`````@`!`.T.``#$PP``.P````(``0`/#P``-'X``!`!
+M```"``$`-@\``&S'```3`0```@`!`$P/``"P3`$`+0````(``0!I#P``C$P!
+M`"$````"``$`A@\``-@#```7`````@`!`*@/``#H)P$`BP````(``0"_#P``
+M3-L``(X````"``$`U0\``!RT``#``````@`!`/$/``#HF0``H`$```(``0`&
+M$```X"8``$4-```"``$`(Q```%BE```<`````@`!`#\0``#,E0``+P$```(`
+M`0!<$```E`<!`+(````"``$`<A```%Q,`0`&`````@`!`(P0```(.@``&`0`
+M``(``0"F$```S)<```$````"``$`O1```&0V``"D`P```@`!`-80``"4(@$`
+M6P(```(``0#V$```H`(``#8````"``$`#A$``(#)``",`````@`!`"L1``!4
+MZ```JP,```(``0!"$0``8)D!`%8````"``$`7!$``%#9``#\`0```@`!`'@1
+M``!D`@``'@````(``0"-$0``L)\``#0````"``$`HQ$```"Z``!+`````@`!
+M`+P1``!,N@``:P````(``0#/$0``%*L``,H````"``$`^!$``&2O``#4````
+M`@`!`"02``"LR@``L`D```(``0`W$@``N%8``#P````"``$`5!(``&@)`0!9
+M`````@`!`&`2``!`4@``K@````(``0!X$@``I*4``"4````"``$`CQ(``-R-
+M```/`0```@`!`+`2``!\[0``&`0```(``0#%$@``!'8``%`"```"``$`YQ(`
+M``BF```E`````@`!``$3``#T1`$`JP````(``0`9$P``4`P!`#`````"``$`
+M)Q,``%0'``!Z`````@`!`#T3``!\H0``3P$```(``0!8$P``/!\``!X````"
+M``$`>!,``#!#`0`\`````@`!`(83``!H`P``8`````(``0"<$P``X'(``'\`
+M```"``$`P!,``!C```".`````@`!`-P3````30$`"P$```(``0`!%```"!X`
+M`!0````"``$`'Q0``&1U``"@`````@`!`#X4``#,I0``.P````(``0!9%```
+MG)<``"X````"``$`<Q0``)`$```0`````0`'`(@4```<L0``]P````(``0"K
+M%```H)X```T!```"``$`P!0``-A5`0"L`````@`!`-@4``!PK0``*`$```(`
+M`0#]%```#$X!`"\!```"``$`+14``!2R``!\`````@`!`%$5``!PG@``+0``
+M``(``0!C%0``V`@!`(X````"``$`=Q4``.1[``#:`````@`!`)05``#<W0``
+MJ`````(``0"K%0``X$P!`"`````"``$`R14``%BD```X`````@`!`.<5````
+M````;0````(``0`'%@``@(\!`$0!```"``$`)!8``%`#```7`````@`!`#@6
+M```(O0``C`````(``0!5%@``1)8!`(0````"``$`<18``/!2```<`P```@`!
+M`(H6``"X7`$`_@````(``0"C%@``1&D!```%```"``$`O!8``$@(`0".````
+M`@`!`-`6``"T@@``3P$```(``0#[%@``W+0``#<!```"``$`#Q<``-P\`0`X
+M`````@`!`!\7``"8K@``S`````(``0!)%P````````0````!``D`6Q<``#1K
+M``!F`````@`!`',7``!@<P```0(```(``0"2%P``R`,``!`````"``$`JQ<`
+M`)03`0`T"````@`!`,H7``"XF0``+0````(``0#C%P``V`(``#<````"``$`
+M^1<```R0``!L`````@`!`!@8``!4#```B@````(``0`W&```<+8``!0#```"
+M``$`3A@``*1&`0"Z`````@`!`&L8```\3P$`/`````(``0"3&```,*8``/@"
+M```"``$`LQ@``,C4``"O`0```@`!`,H8``"@10$`:0````(``0#C&```'!\!
+M`,`!```"``$``1D``#Q(```$"@```@`!`!H9``"\00``:`(```(``0`Q&0``
+MG'T``)8````"``$`4AD``%2J``"]`````@`!`'@9```<'@``'P$```(``0"9
+M&0``]#@!`#(````"``$`JAD```"_``"S`````@`!`,@9``"4\0``S04```(`
+M`0#E&0``B$`!`*8"```"``$`]QD``+01``#`"@```@`!`!0:``!T!```/0``
+M``(``0`M&@``^"4``',````"``$`41H``$S&``"/`````@`!`&P:```\1`$`
+M@`````(``0"(&@``>$\!`(X````"``$`JAH``%S#``!E`````@`!`+L:```P
+MB```V@````(``0#?&@``L`0!`.$"```"``$`^QH``!`(``!M`````@`!`!$;
+M``#@R`$`10T```(``0`N&P``&+`!`)H#```"``$`41L``%1,`@"]`````@`!
+M`'@```!LR`$`<0````(``0"&````Q*L"``T````"``$`=QL``"2N`0`O````
+M`@`!`(L;``"X,P(`%`0```(``0"E&P``',$"`,`!```"``$`PQL``*1'`@`E
+M`````@`!`-H;``#XQP$`<P````(``0#^&P``;/("`%\````"``$`(QP``(!J
+M`@#_`````@`!`$`<``!`ZP(`+0$```(``0!='```9-@!`*0#```"``$`=AP`
+M`,PW`@`O`0```@`!`),<``"49`(`'@````(``0!>`0````L``!`````!``<`
+MNP$``,C?`@`X`````@`!`*L<``#$,@(`\0````(``0#*'```S#D"``$````"
+M``$`X1P``,CN`@`F`````@`!`+@"``#0]P(`:P````(``0``'0``0/0!`*X`
+M```"``$`&!T```!A`@"S`````@`!`#8=``!DF0(`PP(```(``0!4'0``W,("
+M`*L````"``$`<1T``/`*```0`````0`'`(8=```\Z@$`!`H```(``0`^!```
+M[#`"`"`!```"``$`GQT``&3O`@`+`0```@`!`,0=```,;`(`'P````(``0!X
+M!```/"0"`'8````"``$`WQT```A(`@`E`````@`!`*H$``#`'@(`VP````(`
+M`0#Y'0``N/@!`#P````"``$`%AX``$2C`0!!`````@`!`"8>```45`(`?```
+M``(``0!*'@``=,H"`*@````"``$`8AX``/#N`@`A`````@`!`'\>```(Z0(`
+MN@````(``0#9!0``/!```!\````!``,`G!X``(3^`@"7`````@`!`+`>``#<
+M5`(`,@````(``0#''@``!*0!`%`````"``$`W1X``$0A`@"0`````@`!`%(&
+M````X`(`.`````(``0`%'P``]#8#`$0!```"``$`(A\``(@]`@#C`````@`!
+M`#H?``!DK0$`70````(``0!/'P``</`"`"\!```"``$`?Q\``)3$`@!;`@``
+M`@`!`)\?``#(I0$`$`````(``0"X'P``$.<"`!D````"``$`TQ\``-"I`0`]
+M`````@`!`.$?```X4@(`X0````(``0`&(```!.@"`&D````"``$`'R```-2K
+M`@!Y`@```@`!`#0@```<P`$`'P$```(``0!5(```_#\"`'0````"``$`:2``
+M`(CB`@"F`@```@`!`'L@```0@0(`P0(```(``0`>"```I-X"`#@````"``$`
+ME"````0F`@!2`````@`!`"X(``!@`0``@`````$`"0"](```U(,"`+8"```"
+M``$`V"```-@0`P``!0```@`!`#0(``!<#`,`:P````(``0!F"```$`L``!``
+M```!``<`\2```+SC`0!H`@```@`!``@A```P*@(`V@````(``0`L(0``;.4"
+M`#`````"``$`.R$``!A"`@!B`0```@`!`%0A``!4I`$`$`````(``0!G(0``
+ML*8"`.$"```"``$`@R$``#@X`P#8!````@`!`*`A``"01@(`)0````(``0"]
+M(0``M+,!`,`*```"``$`VB$``#@M`@"D`````@`!```B``#<5@(`-P$```(`
+M`0`4(@``E+4"`#0(```"``$`,R(``'"B`0#1`````@`!`%`B``#@"@``$```
+M``$`!P!C(@``).8!`!@"```"``$`?2(``.@``P!)`````@`!`(\B``!D40(`
+MU`````(``0"[(@``#"L"`!P!```"``$`W2(``-`Y`@!/`````@`!`/@B``!4
+MJ0$`>@````(``0`.(P``5!H"`#X````"``$`,",``/3_`0"L`P```@`!`%(C
+M``!P[`(`!@$```(``0!E(P``3%P"`&L````"``$`>",``#S!`0`>`````@`!
+M`)@C```TI@$`0`````(``0"X(P``<$\"`"@!```"``$`C@D``("J`0`>`0``
+M`@`!`-TC``!$[P(`(`````(``0#[(P``S$<"`#L````"``$`%B0``-SQ`@".
+M`````@`!`#@D``#D00(`,0````(``0!.)```)(\"`%<````"``$`;B0``,Q$
+M`@#Z`````@`!`(4D```<_P(`_@````(``0">)```?$,"`$\!```"``$`N20`
+M`-Q]`@```@```@`!`-`D``#PI0$`0P````(``0#F)````%P"`$L````"``$`
+M_R0``%2*`@"K`P```@`!`!8E``"(HP$`-@````(``0`K)0``%$T"`,H````"
+M``$`5"4``'3F`@"``````@`!`'`E``"@JP$`Q`$```(``0"$)0``M&$"`&0`
+M```"``$`C@L``%`N`@",`0```@`!`*LE```PY0(`/`````(``0"Y)0``Z$8"
+M`"4````"``$`UB4``$Q]`@".`````@`!`.PE``#@K@$`-0$```(``0`")@``
+M8!4"``$"```"``$`(28``%"E`0`7`````@`!`#4F```\Z`$`_@$```(``0!3
+M)@``6$<"`!P````"``$`;R8``'#H`@"6`````@`!`"$-``#4(0(`3@````(`
+M`0",)@``6$8"`#@````"``$`JB8```".`@#,`````@`!`,,F``#`HP$`1```
+M``(``0#5)@``%.\"`"T````"``$`\B8``$3"`0"T!0```@`!`"4.``"<Y0(`
+M,P````(``0`4)P``G`T"`$('```"``$`+B<``"#@`0"<`P```@`!`$LG``"$
+MI`$`&P````(``0!?)P``V*4!`!<````"``$`@2<``#0@`@`0`0```@`!`*@G
+M```L;`(`+`````(``0#")P``M&0"`*<````"``$`VB<``!!'`@!'`````@`!
+M`/<G```HU@$`9`````(``0`0*```M"0"`$\!```"``$`.R@``(2_`0"!````
+M`@`!`%LH``"(.P(`,`````(``0!Q*```*$L"`(T````"``$`FB@``#!(`@#X
+M`@```@`!`+HH```@.@(`90$```(``0#-*```3&@"`(\````"``$`Z"@``*"D
+M`0`V`````@`!```I``#H\@(`V0(```(``0`8*0``Q&4"`#L````"``$`.BD`
+M`$0;`@"@`@```@`!`%HI``"L;`(`L`D```(``0!M*0``'%8"`,`````"``$`
+MB2D```08`@!0`@```@`!`*LI``#$K0$`70````(``0#!*0``D%0"`$D````"
+M``$`UBD``/PX`@"?`````@`!`.<I```0I0$`/P````(``0#X*0``Z%4"`#(`
+M```"``$`$BH``+A+`@";`````@`!`#8J``"4J0(`L@````(``0!4$@``:*L"
+M`%D````"``$`3"H``$18`@`J`````@`!`&HJ``#<+0(`<0````(``0"`*@``
+M"%\"`(P````"``$`G2H``)C2`@!<!P```@`!`(\2``#<+P(`#P$```(``0"^
+M*@``S(X"`%<````"``$`WBH``*1=`@!D`0```@`!``,K``"@0`(`#0$```(`
+M`0`8*P``K,$!`)@````"``$`&1,``%"N`@`P`````@`!`#DK``!L9P(`WP``
+M``(``0!6*P``X!0"`'\````"``$`>BL``+!!`@`T`````@`!`,`3```88@(`
+MC@````(``0"0*P``",`!`!0````"``$`KBL``(1;`@!\`````@`!`,PK``#$
+M(P(`=P````(``0#K*P``$%4"`-@````"``$`!"P``'2F`0`]`````@`!`!TL
+M``"84`(`S`````(``0!'+```W'\"`*@````"``$`P!0``#SX`@"L`````@`!
+M`%XL``!TO@$`#0$```(``0!Y+```\*8!`&,"```"``$`F"P``&07`@"@````
+M`@`!`+<L``"H8@(`[`$```(``0#++```T.4"`!\````"``$`X"P``)P?`@"6
+M`````@`!``$M``"@`P(`E`D```(``0`C+0``9*0!`!X````"``$`."T``-QH
+M`@"/`````@`!`&,M```<RP(`>P<```(``0"!+0``7,$!`$\````"``$`8Q4`
+M`-BJ`@".`````@`!`'<5``#D'0(`V@````(``0":+0``6&P"`%,````"``$`
+ML"T``,AV`@"O`0```@`!`,<M``"X.P(`+0````(``0#@+0``U$`#`%8````"
+M``$`^BT``'!``@`M`````@`!``PN``#(10(`30````(``0`J+@``\.4"`(,`
+M```"``$`/BX``"SG`@#8`````@`!`%8N``#`[@(`!@````(``0!P+@``&$8"
+M`#T````"``$`C2X``!"U`@!0`````@`!`*4N``!X>`(`%`$```(``0#`+@``
+M"-P!`!@$```"``$`VBX```PR`@!L`````@`!`/DN``!\CP(`&`0```(``0`.
+M+P``'%,"`/<````"``$`,2\``%@F`@#8`P```@`!`%`O```<``,`RP````(`
+M`0!5%@``N#T#`(0````"``$`8"\``+A<`@#I`````@`!`'0O``#8I`$`-P``
+M``(``0"*+P``3","`'8````"``$`H2\``&QI`@`3`0```@`!`+<O```T#0(`
+M9@````(``0"\%@``2*H"`(X````"``$`SR\``,BB`@#E`P```@`!`.HO```H
+MG`(`GP8```(``0`/%P``W-X"`#@````"``$`21<````!```$`````0`)``DP
+M``!0>P(`_`$```(``0`E,```Z#L"`*`!```"``$`.C```'!8`@`4`P```@`!
+M`%$P```D(@(`*`$```(``0!X,```M#\"`$8````"``$`DC```(QY`@!E`0``
+M`@`!`*LP``"X[@(`!@````(``0#%,```A(`"`(L````"``$`VS```%QV`@!J
+M`````@`!`/HP``!<90(`90````(``0`+,0``G#D"`"X````"``$`)3$``)0:
+M`@"O`````@`!`$0Q``!T1P(`+@````(``0!<,0``>#("`$H````"``$`?S$`
+M`!18`@`N`````@`!`)HQ``"`:P(`C`````(``0"W,0``Q.D"`'H!```"``$`
+MU3$``!"J`0!M`````@`!`.LQ``!HI0$`8`````(``0`!,@``0`$``!P````!
+M``D`%#(``/3F`@`:`````@`!`"XR``!4K@$`B@````(``0!-,@``\/0!`!P#
+M```"``$`9C(``+A&`@`N`````@`!`(0R``"TI@$`/`````(``0":,@``E),"
+M`,T%```"``$`MS(``(R&`@#&`P```@`!`-`R``#TV@(`,@````(``0#A,@``
+MH/$"`#P````"``$`"3,``)S7`0#'`````@`!`"4S``#T>@(`60````(``0!$
+M,P``S/("`!D````"``$`:3,``.C)`@"+`````@`!`(`S```H+`(`#P$```(`
+M`0"B,P```*(!`&T````"``$`PC,``'CM`@`_`0```@`!`-LS``#X9@,`@0``
+M``(``0#[,P``\#8$`!@$```"``$`$#0``"`4!`"P"0```@`!`",T``"XP@,`
+MH`(```(``0!#-```$'\#`,<````"``$`>````.!O`P!Q`````@`!`%\T``#@
+MF00`7P````(``0"&````.%,$``T````"``$`A#0``.`.!`#?`````@`!`*$T
+M```43`,`-@````(``0"Y-```.-H#`/$````"``$`V#0``$#L`P#Z`````@`!
+M`.\T```\30,`$`````(``0`(-0``\.H#`$\!```"``$`(S4``!CO`P`E````
+M`@`!`#HU```HS`,`3P$```(``0!E-0``=#4$`,P````"``$`?C4``)B-`P`8
+M`@```@`!`)@U``!(*P0`M@(```(``0"S-0``"&P$`%L"```"``$`7@$``.`0
+M```0`````0`'`+L!```\AP0`.`````(``0#3-0``B)8$`"T````"``$`\#4`
+M`!3H`P`-`0```@`!``4V``#T$@0`C`````(``0`B-@``P`\$`(\````"``$`
+M/38``$A3!`!Y`@```@`!`%(V``#0$```$`````$`!P!G-@``N)8$`"`````"
+M``$`N`(``$2?!`!K`````@`!`(4V``!<F@0`V0(```(``0"=-@``_.0#`.,`
+M```"``$`M38``(3N`P!'`````@`!`-(V``"0_0,`P`````(``0#N-@``=$D#
+M`&T````"``$`#C<``*31`P#:`````@`!`#(W``"(_P,`+@````(``0!--P``
+MN/\#`"H````"``$`:S<``"@,!`"G`````@`!`(,W``"(]`,`R@````(``0"L
+M-P``(&D#`)@````"``$`/@0``&#8`P`@`0```@`!`,TW``!\[P,`)0````(`
+M`0!X!```L,L#`'8````"``$`YS<``,0B!`#\`0```@`!`*H$```TQ@,`VP``
+M``(``0`#.```Z(T$`(`````"``$`'S@``&BG`P"L`P```@`!`$$X``!8Z0,`
+M,0````(``0!7.```?)`$`+H````"``$`V04``'08```?`````0`#`'0X``!<
+M[@,`)0````(``0"1.```%*L#`)0)```"``$`4@8``'2'!``X`````@`!`+,X
+M``!`X0,``0````(``0#*.```P`,$`&L````"``$`W3@``/BE!`"7`````@`!
+M`/$X``!D3@,`8P(```(``0`0.0``T&@#`$\````"``$`*3D``"3I`P`T````
+M`@`!`#\Y``!DG`,`'`,```(``0!8.0``.)$$`'H!```"``$`=CD``!"U`P!"
+M!P```@`!`)`Y``#80`0`PP(```(``0"N.0``[-D#`$H````"``$`T3D``'0(
+M!`"S`````@`!`!X(```8A@0`.`````(``0`N"```X`(``(`````!``D`[SD`
+M`)S3`P`/`0```@`!`!$Z```LE@0`!@````(``0`T"```D+,$`&L````"``$`
+M9@@``/`0```0`````0`'`"LZ``#(P0,`/@````(``0!-.@``^`($`'P````"
+M``$`:SH``.AQ!`"H`````@`!`(,Z``!H(@0`60````(``0"B.@``F,D#`"@!
+M```"``$`?2(``%RH!`!)`````@`!`,DZ```,^`,`S`````(``0#S.@``Z&4#
+M``T!```"``$`#CL``'C-`P!2`````@`!`#<[``#L'P0`%`$```(``0!2.P``
+MW$P#`&`````"``$`:#L``%1P`P!%#0```@`!`(4[``"`V0,`;`````(``0"D
+M.P``J$T#`$`````"``$`Q#L```A=!``T"````@`!`.,[```0QP,`E@````(`
+M`0`$/```/$H$`.4#```"``$`'SP``,1,`P`7`````@`!`#,\``!0_@,`-P$`
+M``(``0"."0``]%$#`!X!```"``$`1SP``-`=!`!J`````@`!`&8\```$[@,`
+M)0````(``0"#/```4/P#`#(````"``$`FCP``/Q*`P`V`````@`!`*\\``#(
+M,00`JP,```(``0#&/```.`T$`#L````"``$`Z#P``'B/!`!I`````@`!``$]
+M``#X)P0`BP````(``0`7/0``7/T#`#(````"``$`,3T``.A-`P`]`````@`!
+M`$H]``!`[P,`.P````(``0!E/0``/)8$`"8````"``$`A#T``(Q7`P":`P``
+M`@`!`*<]``"PD0,`!`H```(``0#`/0``N$H#`$$````"``$`T#T``,A+`P`0
+M`````@`!`.,]``!PX`,`GP````(``0#T/0``F%4#`"\````"``$`"#X``,P3
+M!`!3`````@`!`(X+``#$U0,`C`$```(``0`>/@``[)0$`#\!```"``$`-SX`
+M``3\`P!)`````@`!`$P^````(00`90$```(``0!E/@``H(X$`-@````"``$`
+M?3X``+"/`P#^`0```@`!`)L^```<"@0`[`$```(``0"O/@``V+X#`*`````"
+M``$`SCX``)@V!`!7`````@`!`.X^``#D]@,`*`$```(``0`3/P``0#8$`%<`
+M```"``$`,S\``'B_`P!0`@```@`!`%4_```\[0,`30````(``0!S/P``K/D#
+M`.$````"``$`F#\``#C+`P!W`````@`!`+<_``",[0,`/0````(``0#4/P``
+M+.,#`"T````"``$`[3\``/01!`#_`````@`!``I```!X2P,`4`````(``0`@
+M0```A%$#`&T````"``$`-D```$Q,`P`W`````@`!`"$-``!(R0,`3@````(`
+M`0!,0```V%0#`%T````"``$`84```.23!``&`0```@`!`'1```"(^P,`?```
+M``(``0"80```".@$`%8````"``$`LD```-`,!`!E`````@`!`,-```#@$`0`
+M$P$```(``0#90```9$T#`$,````"``$`[T```"1.!`#A`@```@`!`"4.```0
+MC00`,P````(``0`+00``_.(#`#`````"``$`(4$``"P$!`#I`````@`!`#5!
+M```,N`0```4```(``0!.00``*.<#`$8````"``$`:$$``#A5`P!=`````@`!
+M`'Y!```(.P0`S04```(``0";00``P,H#`'8````"``$`LD$``%QQ!`"+````
+M`@`!`,E!```44P,`Q`$```(``0#=00``9)8$`"$````"``$`^D$``&2-!`"#
+M`````@`!``Y"``"$_`,`V`````(``0`G0@``S.X#`!P````"``$`0T(``$Q-
+M`P`7`````@`!`&5"``!`F@0`&0````(``0"*0@``1.$#`$\````"``$`I4(`
+M`)Q#!`"?!@```@`!`,1"``"$7`0`4`````(``0#<0@``7.,#`*`!```"``$`
+M\4(```C"`P"O`````@`!`!!#``!0U0,`<0````(``0`F0P``"`P$`!X````"
+M``$`/D,```QZ!`!<!P```@`!`%]#``!45@,`-0$```(``0!U0P``&`4$`&0!
+M```"``$`FD,``$#?`P`O`0```@`!`+=#```TE@0`!@````(``0#10P``R/,#
+M`+T````"``$`]T,``%!J!`"K`````@`!`%02``#<4@0`60````(``0`41```
+ME(<#`)P#```"``$`CQ(``%#7`P`/`0```@`!`#%$``#@C`0`,`````(``0`9
+M$P``Q%4$`#`````"``$`0$0``#P>!`"O`0```@`!`%=$``"`T@,`'`$```(`
+M`0#`$P``C`D$`(X````"``$`>40``-CX`P#4`````@`!`*5$``!0F00`C@``
+M``(``0#'1```+.X#`"X````"``$`Y40``+2;`P"N`````@`!`/U$``#\B00`
+MI@(```(``0`/10``@!,$`!\````"``$`*D4``%`0!`"/`````@`!`%5%```P
+MBP,`:`(```(``0!L10``D*8$`/X````"``$`P!0``+"?!`"L`````@`!`(5%
+M``#H[@,`+@````(``0"=10``*`D$`&0````"``$`Q$4``)3A`P!E`0```@`!
+M`-=%``#8?P,`I`,```(``0#P10``J+0#`&8````"``$`"$8``)!R!`![!P``
+M`@`!`"9&``"0:`0`P`$```(``0!$1@``A"@$`,$"```"``$`748``'0#!`!+
+M`````@`!`'9&``"HQP,`$`$```(``0"=1@``?`8$`(P````"``$`ND8``-B6
+M!``+`0```@`!`-]&``"X:0,`M`4```(``0`!1P``:(($`#(````"``$`$D<`
+M`.27!``O`0```@`!`$)'```T2P,`1`````(``0!C%0``3%($`(X````"``$`
+M=Q4``%C%`P#:`````@`!`%1'``!0)00```(```(``0!K1P``N,@#`)`````"
+M``$`DT<``'R#`P`8!````@`!`*U'```4F00`/`````(``0#51P``4"<$`*@`
+M```"``$`[$<``,`"```<`````0`)`/]'``#X2P,`&P````(``0`32```C.D#
+M`&(!```"``$`+$@``"S;`P`4!````@`!`$9(```0X0,`+@````(``0!0+P``
+MD*<$`,L````"``$`8$@``"C>!`!$`0```@`!`%46``#LY`0`A`````(``0!]
+M2```G/(#`(T````"``$`ID@``"R@`P`\`````@`!`,-(``!4O`,`?P````(`
+M`0#G2```Y$D#`-$````"``$`!$D``&QO`P!S`````@`!`+P6``"\400`C@``
+M``(``0`H20``?&<#`!0````"``$`1DD``,`D!`".`````@`!`%Q)```H6P,`
+MP`H```(``0`/%P``4(8$`#@````"``$`>4D``*3O`P#X`@```@`!`$D7``"`
+M`@``!`````$`"0"920``Y.<#`"T````"``$`JTD``"SS`P";`````@`!`,])
+M``"TD@0`+0$```(``0#L20``"%$$`+(````"``$``DH``&B.!``:`````@`!
+M`!Q*``#,S0,`V`,```(``0`[2@``R%`#`'H````"``$`44H````N!`#&`P``
+M`@`!`&I*``!$C00`'P````(``0!_2@``I(P$`#P````"``$`C4H``"A.`P`\
+M`````@`!`*-*``!PYP,`=`````(``0"W2@``A(X$`!D````"``$`TDH``*S4
+M`P"D`````@`!`/A*``#,[0,`.`````(``0`62P``Y(\$`)8````"``$`,TL`
+M`)#Z`P#W`````@`!`%9+``#`$```$`````$`!P!I2P``U+P#``$"```"``$`
+MB$L``,A5`P"*`````@`!`*=+``"<?0,`9`````(``0#`2P``L&@#`!X````"
+M``$`X$L``)!G`P`?`0```@`!``%,``"@$P0`+`````(``0`;3```1%$#`#T`
+M```"``$`*4P``(1,`P`_`````@`!`#I,``#D_P,`%`,```(``0!13```V$L#
+M`!X````"``$`9DP``&S?!`#8!````@`!`(-,``"`\P0`-P````(``0"93```
+M0`0``!P````!``D`>````!07!0!Q`````@`!`*Q,``#D-@4`_@$```(``0"&
+M````;/H%``T````"``$`RDP``-B6!0#X`@```@`!`.I,```8-P8`E@````(`
+M`0`'30``1%P%`$('```"``$`(4T``/QH!0`^`````@`!`$--``!@F@4`FP``
+M``(``0!G30``D$$&`-D"```"``$`?TT``,@N!0"<`P```@`!`)Q-``#H0@4`
+MK@````(``0!>`0``P!8``!`````!``<`M$T``+`J!0`8!````@`!`,Y-```,
+M/@8`"P$```(``0"[`0``<"X&`#@````"``$`\TT``"SS!``;`````@`!``=.
+M``!@JP4`Z0````(``0`;3@```+L%`%,````"``$`,4X``"#'!0`4`0```@`!
+M`$Q.``!TA@4`+P$```(``0!I3@``L!8``!`````!``<`N`(``'A&!@!K````
+M`@`!`'Y.``"(8P4`?P````(``0"B3@``X*`%`.$````"``$`QTX``*C<!0#,
+M`````@`!`.!.``!$;@4`E@````(``0`!3P``5!`%`)@````"``$`(D\``&`]
+M!@`&`````@`!`#Q/``!8D`4`-`````(``0!23P``F/4$`&,"```"``$`<4\`
+M`/S\!`"*`````@`!`)!/``#L\00`00````(``0"@3P``;+0%`#L````"``$`
+MPD\``'1!!@`9`````@`!`.=/```4N`4`$P$```(``0#]3P``:#T&``8````"
+M``$`%U```&CR!`!$`````@`!`#X$``"4?P4`(`$```(``0!X!```Y'(%`'8`
+M```"``$`*5```+C/!0#!`@```@`!`$)0```XE04`)0````(``0"J!```:&T%
+M`-L````"``$`7U```,S=!0!7`````@`!`']0``"8-`8`@P````(``0"34```
+M8(H%`"T````"``$`K%```)`8!@"+`````@`!`,-0``"TN@4`'P````(``0#>
+M4```O)L%`,H````"``$`!U$``*CP!`!M`````@`!`"=1``#TJ@4`:P````(`
+M`0`Z40``B/T$`#4!```"``$`4%$``/3+!0".`````@`!`-D%``#`(```(@``
+M``$``P!F40``/+,%`!X````"``$`?E$``,1-!@#^`````@`!`%(&``"H+@8`
+M.`````(``0"740``2%(%`)0)```"``$`N5$``#P3!@!;`@```@`!`-E1```8
+MCP4`+0````(``0#K40``Q*$%`/<````"``$`#E(``'#T!``0`````@`!`"=2
+M``#,<`4`*`$```(``0!.4@``P/X$`)H#```"``$`<5(``!PU!@"``````@`!
+M`(U2``!X-`8`'P````(``0"B4@``P)`%`&(!```"``$`NU(``)"5!0`E````
+M`@`!`!X(``!,+08`.`````(``0`N"```8`0``(`````!``D`V%(``%"Q!0#L
+M`0```@`!`.Q2```\X@4`S04```(``0`T"```;%D&`&L````"``$`9@@``-`6
+M```0`````0`'``E3```XHP4`20````(``0`>4P``Q!D&`'L'```"``$`/%,`
+M`!P9!@"H`````@`!`%13``!TDP4`^@````(``0!K4P``N*,%`-@````"``$`
+MA%,``'#Q!0#E`P```@`!`)]3```LJ@4`?`````(``0"]4P``-,@%`&4!```"
+M``$`UE,``$R6!0`E`````@`!`.U3```$M`4`90````(``0#^4P``&/$$`-$`
+M```"``$`&U0``,S\!``O`````@`!`"]4``"L\@0`4`````(``0"."0``*/D$
+M`!X!```"``$`150``$0F!0#'`````@`!`&%4```P,08`I@(```(``0!S5```
+M2/,$`#8````"``$`BU0``'#%!0"O`0```@`!`*)4``"\/08`+0````(``0"_
+M5```N)4%`$<````"``$`W%0```"6!0`<`````@`!`/A4``"$HP4`,@````(`
+M`0`/50``I(<%`)\````"``$`(%4``-Q;!0!F`````@`!`#A5``#8>`4`V@``
+M``(``0!<50``@/0$`!<````"``$`?E4``+CS!``_`````@`!`(]5``"0I`4`
+M,@````(``0"I50``K&8%`%`"```"``$`RU4``,PT!0`8`@```@`!`.55``!8
+M]04`X0(```(``0"."P``^'P%`(P!```"``$``58```2$!@!$`0```@`!`!Y6
+M``"T>04`'`$```(``0!`5@``%+8%`-\````"``$`758``.P0!0"T!0```@`!
+M`']6```\^`4`L@````(``0"55@``_/<$`'H````"``$`JU8```AD!0`!`@``
+M`@`!`,I6``"<-08`&@````(``0#D5@``^,D%`/P!```"``$``%<``-QN!0`0
+M`0```@`!`"=7```<#04`#0$```(``0`A#0``?'`%`$X````"``$`0E<``"P.
+M!0"!`````@`!`&)7``"$0`8`C@````(``0"$5P``/`0&`#0(```"``$`HU<`
+M`&QR!0!W`````@`!`,)7```DW@4`&`0```(``0#75P``A'P%`'$````"``$`
+M[5<``*`6```0`````0`'``!8``!L_`0`70````(``0`66```#&8%`*`````"
+M``$`-5@``"S/!0"+`````@`!`$M8``!TB`4``0````(``0`E#@``1#0&`#,`
+M```"``$`8E@```S\!`!=`````@`!`'=8``!`(08`7`<```(``0"86```L*T%
+M`(P````"``$`M5@``&!'!0`\`````@`!`-)8``#D.`4`!`H```(``0#K6```
+MZ#D&`"T!```"``$`"%D``-0U!@#8`````@`!`"!9``"(%P4`10T```(``0`]
+M60``2$`&`#P````"``$`95D``$CZ!`#$`0```@`!`'E9```@/`8`/P$```(`
+M`0"260``^/,$`!<````"``$`IED``%SU!``\`````@`!`+Q9```8/P8`+P$`
+M``(``0#L60``>(@%`$\````"``$`!UH``(3.!0"H`````@`!`!Y:````E04`
+M.`````(``0`\6@``&*<%`!0#```"``$`4UH``##R!``V`````@`!`&A:``#$
+M#P8`P`$```(``0"&6@``N`,&`%`````"``$`GEH``/S8!0"K`P```@`!`+5:
+M``#4N@4`+`````(``0#/6@``2(\%``T!```"``$`Y%H``.2-!@!6`````@`!
+M`/Y:``!X^`0`/0````(``0`,6P``A,P%```"```"``$`(UL``*BO!0"S````
+M`@`!`$%;``#T<04`=@````(``0!86P``;($%`/$````"``$`=UL``$B%!@#8
+M!````@`!`)1;``"DC@4`=`````(``0"H6P``N/@$`&T````"``$`OEL```3%
+M!0!J`````@`!`%02```0^@4`60````(``0#=6P``C)`%`#$````"``$`\UL`
+M`,"4!0`]`````@`!`(\2``"$?@4`#P$```(``0`07```A*4%`#<!```"``$`
+M)%P``*PV!@!I`````@`!`#U<``#\F@4`O0````(``0`9$P``^/P%`#`````"
+M``$`8UP``)A#!0`<`P```@`!`'Q<```8.P8`!@$```(``0#`$P``P+`%`(X`
+M```"``$`CUP``#35!0#&`P```@`!`*A<```<E@4`+@````(``0#`7```[&\%
+M`)`````"``$`Z%P``&PX!@!Z`0```@`!``9=``!TW04`5P````(``0`F70``
+MH!8%`',````"``$`2ET``-@S!@`\`````@`!`%A=``"\I@4`+@````(``0!S
+M70``#"<%`*0#```"``$`C%T``"Q-!@"7`````@`!`*!=``!<C@4`1@````(`
+M`0"Z70``7+,%`*<````"``$`P!0``.1&!@"L`````@`!`-)=```0]`0`8```
+M``(``0#H70``0)\%`,P````"``$`$EX``-#J!0"?!@```@`!`#%>``#@>P4`
+MI`````(``0!77@``F/0$`$,````"``$`;5X``+RB!0!\`````@`!`)%>```4
+M008`7P````(``0!C%0``@/D%`(X````"``$`MEX``-"9!0"-`````@`!`-]>
+M```8G@4`*`$```(``0!W%0``C&P%`-H````"``$`!%\``#",!0#C`````@`!
+M`!Q?``!TE@4`.P````(``0`W7P``?-(%`+8"```"``$`4E\``/SR!``0````
+M`@`!`&5?``#$I`4`P`````(``0"!7P``Y`\%`!X````"``$`H5\``.QI!0"@
+M`@```@`!`,%?``"P-P8`N@````(``0#>7P``,(H%`#`````"``$`]%\``.A=
+M!@``!0```@`!``U@``"T@`4`;`````(``0!5%@``R(H&`(0````"``$`+&``
+M`'SZ!0!Y`@```@`!`$%@```<]00`/0````(``0!:8```8)4%`"X````"``$`
+M>&```)S)!0!9`````@`!`)=@``!,K`4`9`$```(``0"\8```K'0%`%(````"
+M``$`O!8``/#X!0".`````@`!`.5@```4-`8`,`````(``0`/%P``A"T&`#@`
+M```"``$`21<````$```$`````0`)`/1@``!<`@4`P`H```(``0`180``!!`%
+M`$\````"``$`*F$``%2[!0"P"0```@`!`#UA``#$#@4`'P$```(``0!>80``
+M#*`%`-0````"``$`BF$``+`.!0`4`````@`!`*AA``!@@@4`%`0```(``0#"
+M80``(($%`$H````"``$`Y6$``-!Z!0`/`0```@`!``=B``!<<P4`3P$```(`
+M`0`R8@``G$X%`*P#```"``$`5&(``-ST!`!``````@`!`'1B```HN04`_P``
+M``(``0"18@``#/,$`!X````"``$`IF(``'"4!0!-`````@`!`,1B``"$$08`
+MJP````(``0#A8@``D(H%`*`!```"``$`]F(``*BJ!0!+`````@`!``]C```H
+MN@4`C`````(``0`L8P``#.@%`,,"```"``$`2F,``(2W!0"/`````@`!`'5C
+M``"8/08`(0````(``0"28P``G"D&`#(````"``$`HV,``$2(!0`N`````@`!
+M`+UC``"PE@4`)0````(``0#78P``7+`%`&0````"``$`_F,``&0R!0!H`@``
+M`@`!`!5D```\:04`KP````(``0`T9````'4%`-@#```"``$`4V0``+@U!@`9
+M`````@`!`&YD```DD@4`3P$```(``0")9```]+8%`(\````"``$`I&0``,B(
+M!0!E`0```@`!`+=D``#0)`4`9`````(``0#09```<#T&`"8````"``$`[V0`
+M`.P]!@`@`````@`!``UE``#LI@4`*@````(``0`K90``<*D'`"T````"``$`
+M.64``+3+!@!P`````@`!`$EE``!8OP8`=P0```(``0!C90``M)('`*D'```"
+M``$`<V4``/@P!P"$`````@`!`(-E``"(!0``!`````$`"0"390``K,H&``\`
+M```"``$`J&4``'"[!@`I`````@`!`+UE``#DI@<`5P````(``0#590``E04`
+M``$````!``D`Y64``'`3!P!2`````@`!`/5E``#PI0<`]`````(``0`&9@``
+M9*4'`(D````"``$`&F8``/BA!P!,`@```@`!`#!F``"$V`8`7`$```(``0!&
+M9@``C`4```0````!``D`5&8```2E!P!@`````@`!`&QF```,?0<`00````(`
+M`0!^9@``[*4&``H!```"``$`D68``.#9!@`?`P```@`!`*EF```8F08`4```
+M``(``0"]9@``U+D&`)L!```"``$`T68``+B]!@!B`````@`!`-]F``!0L@8`
+MG0````(``0#T9@``N+<&`$T````"``$`!6<``("Q!@!&`````@`!`!QG``"6
+M!0```0````$`"0`P9P``[+X&`&H````"``$`2V<``)S'!@!2`````@`!`%]G
+M````L08`?0````(``0!O9P``H*<&`"4````"``$`>&<``'B7!@"N`````@`!
+M`)1G``!DH0<`D0````(``0"J9P``#+P&`*D!```"``$`O6<``-2,!P`\````
+M`@`!`,9G``"@J0<`+0````(``0#49P``T,,&`'H!```"``$`\&<``-!W!P#=
+M`````@`!`/MG``#@?@<`O`````(``0`1:```Y/L&`/8````"``$`(V@``)Q_
+M!P"\`````@`!`#QH``#$B`<`1@````(``0!-:```S,P&`#X````"``$`6&@`
+M`%2#!P!T`0```@`!`&EH``!`R@8`;`````(``0!^:```1*0'`+\````"``$`
+MC6@``(26!@`3````$@`!`+9H``":!0```0```!$`"0#-:``````````````0
+M````YF@`````````````$````.UH```,40@`%@```!(``0`&:0``U*<'`!H`
+M```2``$`'VD`````````````$````#1I``#`I`8`*@```!(``0!(:0``.*D'
+M`#@````2``$`66D``"B:!@"%`0``$@`!`')I``#TIP8`>@```!(``0"+:0``
+M```````````0````I6D``&RG!P!H````$@`!`,!I``!DEP8`$0```!(``0#9
+M:0``^)P&`(H````2``$`\FD`````````````$`````]J``!DI`8`60```!(`
+M`0`@:@`````````````0````)VH```2I!@"8````$@`!`#QJ```$F@8`(@``
+M`!(``0!5:@``3*0&`!<````2``$`:VH``+";!@!'`0``$@`!`(-J```HH`<`
+M/`$``!(``0"B:@``D`4```0````1``D`NVH``("=!P"2````$@`!`-=J````
+M`````````!````#N:@``@*,&`$X````2``$`!FL``-S)!@!1````$@`!`"-K
+M````?0<`"@```!(``0`_:P``;)8&`!8````2``$`7FL`````````````$```
+M`')K``#DJ`<`40```!(``0"):P``@`4```0````1``D`FVL``)B%!P`5````
+M$@`!`+9K``#XI@8`?P```!(``0#-:P``5$L(`!T````2``$`YVL``)L%```!
+M````$0`)``%L`````````````!`````+;```O($'`&<````2``$`)&P`````
+M````````$````#UL``!DI08`0@```!(``0!2;``````````````0````7&P`
+M`(0%```$````$0`)`&UL``!PJ`8`E````!(``0"';```[*0&`'@````2``$`
+MFFP``/2X!P`6````$@`!`+1L``#$=P<`"P```!(``0#.;``````````````0
+M````YVP``)!W!P`T````$@`!`/EL``"9!0```0```!$`"0`7;0``````````
+M```0````+&T`````````````$````$%M```A&````0```!$`!P!7;0``,*0&
+M`!D````2``$`?FT``+"%!P#/`@``$@`!`(YM```0I`8`(````!(``0"L;0``
+MX*H'`!8````2``$`RFT`````````````$````.1M```D@@<`7````!(``0#[
+M;0``Z*$!`!8````2``$`&FX`````````````$````#)N```4G@<`A````!(`
+M`0!/;@``@(@'`$,````2``$`96X`````````````$````'=N````````````
+M`!````"0;@``^*<'`"(````2``$`J6X`````````````$````+YN``",IP8`
+M$@```!(``0#<;@``*)@&`,,````2``$`^6X``)0%```!````$0`)``YO``"8
+ME@8`"P```!(``0`H;P``EP4```$````1``D`16\``"2.!P#U`@``$@`!`&=O
+M``#PIP<`!@```!(``0"#;P``(,@&`+P!```2``$`G&\``*26!@"7````$@`!
+M`+1O``#(IP8`*P```!(``0#/;P`````````````0````Z&\``#R7!@`H````
+M$@`!``)P`````````````!`````8<```4*,&`#`````2``$`,'```%2G!P`8
+M````$@`!`%!P``"$H08`Y````!(``0!R<``````````````0````B'``````
+M````````$````*=P``!XIP8`$P```!(``0##<```9+$'`!8````2``$`W7``
+M````````````$````/)P``!@@0<`6P```!(``0`+<0`````````````0````
+M*'$``%"G!P`!````$@`!`#UQ```,B0<`3@```!(``0!4<0``7$D#`!8````2
+M``$`<W$``$S%!@!_````$@`!`(UQ```\IP<`%````!(``0"M<0``[)@&`"D`
+M```2``$`W7$``"`8```!````$0`'`/MQ``!HH@8`YP```!(``0`4<@``>(4'
+M`!X````2``$`*W(``-"C!@`^````$@`!`$QR`````````````!````!E<@``
+M**`&`%D!```2``$`A'(``)RI!@!?````$@`!`)MR``"0\`0`%@```!(``0"Z
+M<@``$(T'`!$!```2``$`V7(``)@%```!````$0`)`/9R``#$$P<`=0```!(`
+M`0``<G(R-S(P7U-!4U](86YD;&5#;VUP;&5T961#;VUM86YD`')R,C<R,%]0
+M35]&<F5E4F5G:7-T97)3970`<G(R-S(P7T-O<F5?36]D=6QE4W1A<G0`<G(R
+M-S(P7T-O<F5?36]D=6QE16YA8FQE1&ES86)L94E240!S87-?:&%S:%]A9&1R
+M`$UA:V5!='1$979);F9O`')R,C<R,%]#871E9V]R>5]#1$)?5'EP90!R<C(W
+M,C!?1FEN9$9R965335!#;VYT97AT`')R,C<R,%]M=E]D:7-A8FQE7WAM=`!R
+M<C(W,C!?4G5N=&EM94ES<W5E4V]F=%)E<V5T0V%L;&)A8VL`<G(R-S(P7T1)
+M4T-?1V5T4F5S;W5R8V4`<G(R-S(P7U-T;W)E7T-O;F9I9U)O=71E26YF;P!R
+M<C(W,C!?57!D871E4W1A='5S5G-397-#;VYT<F]L0G5F9F5R`$%4345,7U-0
+M25]#341?-#%A7S`R,0!R<C(W,C!?0V%L8W5L871E4F]U=&5);F1E>`!R<C(W
+M,C!?4T=024]?5W)I=&5296=I<W1E<@!R<C(W,C!?359?17%U86QS`&DR8T%?
+M=W)I=&5?8GET97,`<G(R-S(P7T-O<F5?2&%N9&QE5V%I=&EN9TQI<W0`<G(R
+M-S(P7V]D:6Y?<V5T7VED;&5?<W1A;F1B>0!R<C(W,C!?359?36%P5&%R9V5T
+M240`<G(R-S(P7T1)4T-?0V%N8V5L1&ES8V]V97(`<G(R-S(P7U!O<W1-86ME
+M4V5S0V]N9FEG=7)A=&EO;E)E<75E<W0`<G(R-S(P7U-'4$E/7U)E861296=I
+M<W1E<@!R<C(W,C!?1&5V:6-E7U=R:71E4V5S0V]N=')O;$1I86<`<G(R-S(P
+M7U-'4$E/7U--4%)E<5]#86QL8F%C:P!/9&EN4U!)7U)D<'0`<G(R-S(P7T9I
+M;&Q%;F-L;W-U<F5%;&5M96YT4W1A='5S`')R,C<R,%]%>'!A;F1E<E]335!2
+M97%U97-T7T1I<V-O=F5R`')R,C<R,%]#;W)E7TUO9'5L94=E=%)E<V]U<F-E
+M475O=&$`<G(R-S(P7U1A9U])<T5M<'1Y`')R,C<R,%]M=E]R97-E=%]X;70`
+M<G(R-S(P7U!O<G1?2&%N9&QE1&5V:6-E4&QU9VEN`')R,C<R,%]035]#;W)E
+M7U)E<51I;65O=70`<G(R-S(P7T%405]#1$(R5&%S:T9I;&4`<G(R-S(P7U]?
+M8V%N8V5L7W1I;65R`')R,C<R,%]#;W)E7TEN=&5R;F%L4V5N9%)E<75E<W0`
+M<G(R-S(P7T9R965$979I8V54;U!O;VP`<G(R-S(P7T-O<F5?4F5S971#;613
+M;&]T`')R,C<R,%]335!?4T=024]?4V5T7T9A:6QL960`<G(R-S(P7T]D:6Y3
+M4$E?26YI=`!$979I8V5?36%K95!R:79A=&5396YD4V5S4F5Q=65S=`!R<C(W
+M,C!?1$E30U]'97149W1$979-87``07-S:6=N16QE;65N1&5S8W)I<'1O<DYA
+M;64`<G(R-S(P7U-!5$%?4&]R=$1E=&5C=`!$979I8V5?36%K95-E<T5L96UE
+M;G13=&%T=7-297%U97-T5&EM97(`<G(R-S(P7T=E=%-%4U-"1G)O;5!O;VP`
+M<G(R-S(P7U--4%)E<W!,96YG=&@`<G(R-S(P7U-!4U]$979I8V53=&%T94UA
+M8VAI;F4`<G(R-S(P7T9R9653051!4V-R871C:%1O4&]O;`!R<C(W,C!?7U]A
+M9&1?=&EM97(`<G(R-S(P7T-/4D5?27-S=65335!297%U97-T`')R,C<R,%]3
+M051!7T1E=FEC95-T871E36%C:&EN90!R<C(W,C!?4T%405]034EN:71297%#
+M86QL8F%C:P!R<C(W,C!?4&]R=%]!8F]R=%)E<75E<W1S`')R,C<R,%]7<FET
+M941%3%9?45]%;G1R>0!P<F]D=6-T7VED`')R,C<R,%]$25-#7T-H96-K1&ES
+M8V]V97)3=&%T90!R<C(W,C!?0V]R95]-;V1U;&53:'5T9&]W;@!R<C(W,C!?
+M4U-47U-025]#340`<G(R-S(P7U!R97!A<F5$96QI=F5R>5%U975E16YT<GD`
+M:3)C0E]W<FET95]B>71E<P!R<C(W,C!?1$E30U]3971297-O=7)C90!R<C(W
+M,C!?1V5T3D-15&%G`')R,C<R,%]M=E]E;F%B;&5?>&UT`')R,C<R,%]315-?
+M26YT97)N86Q297%#86QL8F%C:P!R<C(W,C!?5&%G7T=E=$]N90!R<C(W,C!?
+M5&%G7TEN:71?1DE&3P!R<C(W,C!?;79?<V5T7U-!4T%D9'(`<G(R-S(P7T9I
+M;F12=6YN:6YG4F5Q0GE486<`<G(R-S(P7T=E=$UI;DYE9V]T:6%T961,:6YK
+M4F%T90!R<C(W,C!?4T%405]0;W)T1&5V:6-E1&5T96-T960`<G(R-S(P7T1E
+M=FEC95])<W-U95-O9G1297-E=`!R<C(W,C!?4&]R=%]&:6YD5&=T3F\`<G(R
+M-S(P7T1E=FEC95]-86ME26YQ=6ER>51A<VM297%U97-T`')R,C<R,%]&<F5E
+M26YT97)N86Q297%4;U!O;VP`<G(R-S(P7U!R945M<'1Y1&5V:6-E`')R,C<R
+M,%]#;VUP;&5T95)E<75E<W1!;F13;&]T`')R,C<R,%]'971);G1E<FYA;%)E
+M<49R;VU0;V]L`&DR8T%?<F5A9%]B>71E<P!A:6YF;P!O9&EN7V-O<F5?=&EM
+M97(`<G(R-S(P7U-!5$%?4$U?2&%N9&QE1&5V:6-E4&QU9VEN`%=)3D)/3D1?
+M4U!)7T--1`!R<C(W,C!?57!D871E5&%R9V5T1&5V:6-E<P!R<C(W,C!?;79?
+M<F5S971?<&AY`')R,C<R,%]486=?26YI=`!R<C(W,C!?4T-325]4;U]&25,`
+M<G(R-S(P7TU67U-E=$Q"06%N9%-E8W1O<D-O=6YT`')R,C<R,%]!<W-I9VY2
+M96=I<W1E<E-E=`!R<C(W,C!?;6]D95!A9V5"=68`<G(R-S(P7U-#4TE?051!
+M7U-T87)T4W1O<%1R86YS;&%T:6]N`')R,C<R,%]"965P3V9F`')R,C<R,%]5
+M<&1A=&50:'E);F9O`')R,C<R,%]'9713051!4V-R871C:$9R;VU0;V]L`')R
+M,C<R,%]3051396YS941A=&$`;79?<&AY7W)E<V5T`')R,C<R,%]'971-87A.
+M96=O=&EA=&5D3&EN:U)A=&4`<G(R-S(P7T5X<&%N9&5R7U--4%)E<75E<W1?
+M4F5P;W)T1V5N97)A;`!R<C(W,C!?4F5M;W9E1&5V:6-E`')R,C<R,%]30U-)
+M7T%405],;W=E<E=O<F0`<G(R-S(P7W-E=%]F86EL7VQE9`!R<C(W,C!?359?
+M0U)#`')R,C<R,%]#;W)E4F5S=&]R94]R:6=I;F%L0T1"`')R,C<R,%]&<F5E
+M0V]R94-O;G1E>'14;U!O;VP`<G(R-S(P7U9E<FEF>4-O;6UA;F1"969O<F53
+M96YD:6YG`')R,C<R,%]&<F5E4F5G:7-T97)3970`<G(R-S(P7TQI<W1?1V5T
+M3&%S=`!R<C(W,C!?27-S=65?0V]N9FEG4F]U=&5);F9O`')R,C<R,%]3051!
+M7U!O<G1(86YD;&5);G1E<G)U<'0`<G(R-S(P7T-O<F5?1V5T4W5P<&]R=&5D
+M0V]U;G1S`')R,C<R,%]486=?4F5L96%S94]N90!R<C(W,C!?4T%405]034AO
+M='!L=6=297%#86QL8F%C:P!R<C(W,C!?359?36%P5&]3<&5C:69I8U1A<F=E
+M=$E$`')R,C<R,%]!<W-I9VY%;&5M96YT4VQO=$YU;6)E<@!315-?4')I=F%T
+M95)E<4-A;&QB86-K`')R,C<R,%])<W-U95]297!O<G1-86YU9F%C='5R97))
+M;F9O<FUA=&EO;@!R<C(W,C!?1FEN9$%S8VEI3G5M8F5R`')R,C<R,%]$:7-C
+M;W9E<GE#86QL0F%C:P!R<C(W,C!?4T-325]-86ME0V%C:&5#;VUM86YD`')R
+M,C<R,%]#:&5C:U1A<F=E=$-H86YG90!R<C(W,C!?359?1V5T36%P<&5D240`
+M<G(R-S(P7U-!5$%?4$U3=&%T94UA8VAI;F4`<G(R-S(P7T-H96-K1&5V:6-E
+M0VAA;F=E`')R,C<R,%]31U!)3U]335!297%U97-T7U=R:71E`')R,C<R,%]3
+M0U-)7T%405]#:&5C:T-O;F1I=&EO;@!R<C(W,C!?4T-325]!5$%?4WEN8T-A
+M8VAE5')A;G-L871I;VX`<G(R-S(P7T=E=%!O<G1&<F]M4&]O;`!R<C(W,C!?
+M07-S:6=N1&5V:6-E3W9E<F%L;$5L96UE;G1.=6UB97(`07-S:6=N4V5S3W1H
+M97)%;&5M96YT3W9E<F%L;$5L96UE;G1.=6UB97(`<G(R-S(P7TAA;F1L94-O
+M;6UA;F11=65U90!R<C(W,C!?<V5T7V9A:6Q?;&5D<P!R<C(W,C!?4T%405]0
+M35]%<G)O<DAA;F1L:6YG`')R,C<R,%]&<F5E4$U4;U!O;VP`<G(R-S(P7T9R
+M965335!#;VYT97AT`')R,C<R,%]C;W)E7VAA;F1L95]T87-K9FEL95]E<G)O
+M<@!R<C(W,C!?4&]S=$UA:V5397-%;F-L;W-U<F53=&%T=7-297%U97-T`')R
+M,C<R,%]'971$979I8V5&<F]M4&]O;`!P;W)T7W-E=%]F86EL7VQE9`!R<C(W
+M,C!?4$U?27-S=657<FET95)E9P!R<C(W,C!?0V]R95-A=F5/<FEG:6YA;$-$
+M0@!R<C(W,C!?1V5T4TU04V-R871C:$9R;VU0;V]L`')R,C<R,%]315-?4V5T
+M1F%I;$QE9`!0;W)T36%P7U)2,C<Q,0!R<C(W,C!?1G)E945X<&%N9&5R5&]0
+M;V]L`')R,C<R,%]$979I8V5?36%K95-T87)T4W1O<%5N:71297%U97-T`')R
+M,C<R,%]$25-#7T=E=$YE9V]T:6%T961,:6YK4F%T90!R<C(W,C!?4&]S=$UA
+M:V5397-%;&5M96YT4W1A='5S4F5Q=65S=`!R<C(W,C!?27-S=65?1&ES8V]V
+M97(`<G(R-S(P7U-#4TE?051!7T9I;&Q,0D%#9&(Q-@!R<C(W,C!?4T-325]!
+M5$%?1FEL;$Q"04-D8C$P`')R,C<R,%]-5E]);FET:6%L:7IE5&%R9V5T2414
+M86)L90!R<C(W,C!?4$U?27-S=65296%D4F5G`')R,C<R,%]3051!7U!O<G12
+M97-E=`!R<C(W,C!?4$U?07-S:6=N4F5G:7-T97)3970`<G(R-S(P7U]?<F5N
+M97=?=&EM97(`<G(R-S(P7U!R97!A<F5!;F1396YD0V]M;6%N9`!R<C(W,C!?
+M1G)E95--4%-C<F%T8VA4;U!O;VP`<G(R-S(P7U!O<G1?27-297%U97-T4G5N
+M;FEN9P!R<C(W,C!?1&5T96-T4&]R=%1Y<&4`<G(R-S(P7U-#4TE?051!7U5P
+M<&5R5V]R9`!R<C(W,C!?4T%405]%<G)O<DAA;F1L:6YG`')R,C<R,%]-5E]$
+M=6UP4F5G:7-T97(`<G(R-S(P7U-!4U]%<G)O<DAA;F1L:6YG`')R,C<R,%]$
+M979I8V5?4&%R<V5)9&5N=&EF>41A=&$`<G(R-S(P7TU67UIE<F]-=E)E<75E
+M<W0`<G(R-S(P7TES<W5E7U)E<&]R=%)O=71E26YF;P!R<C(W,C!?57!D871E
+M5&=T1&5V36%P`')R,C<R,%]O9&EN7W)E;6]V95]D979I8V4`<G(R-S(P7U-!
+M5$%?4&]R=$1E=FEC95)E861Y`')R,C<R,%],:7-T7T=E=$9I<G-T`')R,C<R
+M,%]&<F5E4&]R=%1O4&]O;`!R<C(W,C!?1V5T3VYE0V]M;6%N9%-L;W0`<G(R
+M-S(P7T=E=%!-1&5V:6-E`')R,C<R,%]%>'!A;F1E<E]335!297%U97-T7U)E
+M<&]R=%!(65-!5$$`<G(R-S(P7T1E=FEC95]-86ME4F5A9$-A<&%C:71Y,394
+M87-K4F5Q=65S=`!R<C(W,C!?1&ES8V]V97)Y4TT`<G(R-S(P7V1U;7!?=6YA
+M<W-O8VEA=&5D7V9I<P!-86ME1&5V26YF;P!R<C(W,C!?4T%37TAA;F1L94)2
+M1$-35`!R<C(W,C!?1G)E95-%4U-"5&]0;V]L`$1E=FEC95]-86ME4')I=F%T
+M95)E8W9397-297%U97-T`')R,C<R,%]305-?4&]R=%)E<V5T`')R,C<R,%]3
+M051!7U!-7TAA;F1L941E=FEC955N<&QU9P!R<C(W,C!?1G)E95-'0G5F9F5R
+M5&]0;V]L`')R,C<R,%]31U!)3U]);FET:6%L:7IE`&-H96-K7U-A<T%D9'(`
+M<G(R-S(P7TU67T1U;7!297%U97-T`')R,C<R,%]'971%>'!A;F1E<D9R;VU0
+M;V]L`')R,C<R,%]3051!7U!R97!A<F5#;VUM86YD5&%B;&4`<G(R-S(P7T)E
+M97!/;@!R<C(W,C!?4T=486)L95]!<'!E;F0`<G(R-S(P7T-O<F5?26YT97)R
+M=7!T4V5R=FEC95)O=71I;F4`1&5V:6-E7U1E<W15;FET4F5A9'E297%U97-T
+M`')R,C<R,%]30U-)7T%405]296%D5W)I=&54<F%N<VQA=&EO;@!R<C(W,C!?
+M0V]R95]-;V1U;&5396YD4F5Q=65S=`!R<C(W,C!?4T%405](86YD;&5$979I
+M8V50;'5G:6X`<G(R-S(P7T=E=%-'0G5F9F5R1G)O;5!O;VP`<G(R-S(P7T-O
+M<F5?1FEL;%-E;G-E1&%T80!R<C(W,C!?051-14Q?4U!)7T--1`!R<C(W,C!?
+M1&5V:6-E7TUA:V5-;V1E4V5N<V5297%U97-T`')R,C<R,%]'9710349R;VU0
+M;V]L`$]D:6Y34$E?4V5C=&]R56YP<F]T96-T`')R,C<R,%]$979I8V5?36%K
+M95)E<75E<W1487-K4F5Q=65S=`!R<C(W,C!?4T-325]!5$%?4F5A9$-A<&%C
+M:71Y5')A;G-L871I;VY#86QL8F%C:P!R<C(W,C!?1&5V:6-E7TUA:V5-;V1E
+M4V5L96-T4F5Q=65S=`!R<C(W,C!?4')E16UP='E030!'971!='1)9&5N=&EF
+M>49R86UE`%-%4U1I;65R7TEN=&5R;F%L4F5Q0V%L;&)A8VL`<G(R-S(P7U-4
+M4%]$979I8V5297-E=`!R<C(W,C!?4T-325]!5$%?1FEL;$1A=&%&:65L9`!R
+M<C(W,C!?1V5T0V]R94-O;G1E>'1&<F]M4&]O;`!R<C(W,C!?4T-325]-86ME
+M36]D95!A9V5#86-H:6YG`')R,C<R,%]O9&EN7W-E=%]S<&EN7W5P7VUO9&4`
+M<G(R-S(P7U-'5&%B;&5?26YI=`!R<C(W,C!?4G5N=&EM94ES<W5E4V]F=%)E
+M<V5T`&]D:6Y?<V5T7VAA<F1?9&ES:U]I9&5N=&EF>0!R<C(W,C!?4&]R=%](
+M86YD;&50;'5G:6X`<G(R-S(P7V]D:6Y?9FQA<VA?86-C97-S`')R,C<R,%]D
+M979I8V5?<')O8F5?9&]N90!'971$979)9&5N=&EF>49R86UE`')R,C<R,%]0
+M;W-T36%K95-E<T5L96UE;G1$97-C<FEP=&]R4F5Q=65S=`!R<C(W,C!?4&]R
+M=%]-;VYI=&]R`&DR8T)?<F5A9%]B>71E<P!R<C(W,C!?1&5V:6-E7TUA:V52
+M96%D0V%P86-I='E487-K4F5Q=65S=`!S87-?861D<F5S<U]C;W5N=`!R<C(W
+M,C!?4V5R=FEC94EN=&5R<G5P=`!R<C(W,C!?4T%405](86YD;&5$979I8V55
+M;G!L=6<`<G(R-S(P7U-'5&%B;&5?079A:6QA8FQE`')R,C<R,%]305-?26YT
+M97)N86Q297%#86QL8F%C:P!R<C(W,C!?7U]035]C86YC96Q?=&EM97(`<G(R
+M-S(P7TU67T-O<'E31U1A8FQE`')R,C<R,%]#;W)E7TUA:V5$979I8V5297-E
+M=%)E<0!R<C(W,C!?;79?9&ES86)L95]R96=I<W1E<E]S970`<G(R-S(P7T-O
+M;7!L971E4F5Q=65S=`!R<C(W,C!?4T=024]?4TU04F5Q=65S=%]296%D`')R
+M,C<R,%]30U-)7T%405]296%D0V%P86-I='E4<F%N<VQA=&EO;@!R<C(W,C!?
+M17AP86YD97)?4TU04F5Q7T-A;&QB86-K`')R,C<R,%]$25-#7T1O1&ES8V]V
+M97(`<G(R-S(P7U-'4$E/7U-E=%]&86EL;&5D`')R,C<R,%]0;W)T7U-O9G12
+M97-E=$-A;&QB86-K`')R,C<R,%]0;W)T7TAA;F1L955N<&QU9P!R<C(W,C!?
+M0V]R95]297%4:6UE;W5T`')R,C<R,%]!<W-I9VY$979I8V5%;&5M96YT3G5M
+M8F5R`')R,C<R,%]%>'!A;F1E<E]335!297%U97-T7U!H>4-O;G1R;VP`<G(R
+M-S(P7U-!5$%?4')E<&%R94-O;6UA;F1(96%D97(`<G(R-S(P7VDR8U]R97-E
+M=`!R<C(W,C!?4G5N=&EM94ES<W5E4F5A9$QO9T5X=`!R<C(W,C!?;79#:&%N
+M;F5L4W1A=&5-86-H:6YE`')R,C<R,%]O9&EN7VEO8W1L`')R,C<R,%]#;W)E
+M7TUO9'5L94EN:71I86QI>F4`<G(R-S(P7TU67U)E;6]V951A<F=E=$E$`')R
+M,C<R,%]#;W)E7W!A<W-?=&AR=5]F:6QL7W1A<VMF:6QE`')R,C<R,%])<W-U
+M95]297!O<G1'96YE<F%L`')R,C<R,%]),D-?36]D=6QE26YI=&EA;&EZ90!R
+M<C(W,C!?4T-325]!5$%?5F5R:69Y5')A;G-L871I;VX`<G(R-S(P7T9I;F14
+M9W1.;P!R<C(W,C!?1&5V:6-E7TUA:V5397-28W9$:6%G4F5Q=65S=`!R<C(W
+M,C!?57!D871E5VED95!O<G10:'E-87``<G(R-S(P7VUV7V1I<V%B;&5?:&)A
+M`')R,C<V>%]0<F5P87)E06YD4V5N9$-O;6UA;F0`<G(R-S9X7T-O<F5?36]D
+M=6QE1V5T4F5S;W5R8V51=6]T80!R<C(W-GA?17AP86YD97)?4TU04F5Q=65S
+M=%]0:'E#;VYT<F]L`')R,C<V>%]M=E]R97-E=%]X;70`<G(R-S9X7U!O<G1?
+M06)O<G1297%U97-T<P!R<C(W-GA?4&]R=%]3;V9T4F5S971#86QL8F%C:P!R
+M<C(W-GA?1G)E95-%4U-"5&]0;V]L`')R,C<V>%]#;W)E7W!A<W-?=&AR=5]F
+M:6QL7W1A<VMF:6QE`')R,C<V>%]30U-)7T%405]3>6YC0V%C:&54<F%N<VQA
+M=&EO;@!R<C(W-GA?27-S=65?0V]N9FEG4F]U=&5);F9O`')R,C<V>%]335!?
+M4T=024]?4V5T7T9A:6QL960`<G(R-S9X7U-!4U]%<G)O<DAA;F1L:6YG`')R
+M,C<V>%]0;W)T7TES4F5Q=65S=%)U;FYI;F<`<G(R-S9X7T1)4T-?1V5T4F5S
+M;W5R8V4`<G(R-S9X7T-O<F5?1V5T4W5P<&]R=&5D0V]U;G1S`')R,C<V>%]-
+M5E]$=6UP4F5G:7-T97(`<G(R-S9X7U-#4TE?051!7T-H96-K0V]N9&ET:6]N
+M`')R,C<V>%]305-?2&%N9&QE0E)$0U-4`')R,C<V>%]2=6YT:6UE27-S=652
+M96%D3&]G17AT`')R,C<V>%]305-?1&5V:6-E4W1A=&5-86-H:6YE`')R,C<V
+M>%]$979I8V5?27-S=653;V9T4F5S970`<G(R-S9X7T%4345,7U-025]#340`
+M<G(R-S9X7U!O<G1?2&%N9&QE56YP;'5G`')R,C<V>%]30U-)7T%405]296%D
+M5W)I=&54<F%N<VQA=&EO;@!R<C(W-GA?0V%L8W5L871E4F]U=&5);F1E>`!R
+M<C(W-GA?1G)E95-'0G5F9F5R5&]0;V]L`')R,C<V>%]D=6UP7W5N87-S;V-I
+M871E9%]F:7,`<G(R-S9X7U1A9U]);FET`')R,C<V>%]$979I8V5?36%K94UO
+M9&5396QE8W1297%U97-T`')R,C<V>%]035])<W-U95=R:71E4F5G`')R,C<V
+M>%]30U-)7T%405]&:6QL3$)!0V1B,3``<G(R-S9X7U-'4$E/7U--4%)E<75E
+M<W1?4F5A9`!R<C(W-GA?3V1I;E-025]);FET`')R,C<V>%]&<F5E4F5G:7-T
+M97)3970`<G(R-S9X7U1A9U]296QE87-E3VYE`')R,C<V>%]!<W-I9VY$979I
+M8V5/=F5R86QL16QE;65N=$YU;6)E<@!R<C(W-GA?;V1I;E]S971?<W!I;E]U
+M<%]M;V1E`')R,C<V>%]&<F5E1&5V:6-E5&]0;V]L`')R,C<V>%]M=E]E;F%B
+M;&5?>&UT`')R,C<V>%]30U-)7T%405]296%D0V%P86-I='E4<F%N<VQA=&EO
+M;D-A;&QB86-K`')R,C<V>%]$979I8V5?4&%R<V5)9&5N=&EF>41A=&$`<G(R
+M-S9X7U-'5&%B;&5?079A:6QA8FQE`')R,C<V>%]31U!)3U]7<FET95)E9VES
+M=&5R`')R,C<V>%]-5E]#4D,`<G(R-S9X7T1E=FEC95]-86ME26YQ=6ER>51A
+M<VM297%U97-T`')R,C<V>%]31U!)3U]3971?1F%I;&QE9`!R<C(W-GA?57!D
+M871E4&AY26YF;P!R<C(W-GA?4T%405]0<F5P87)E0V]M;6%N9$AE861E<@!R
+M<C(W-GA?1G)E95!-5&]0;V]L`')R,C<V>%]O9&EN7VEO8W1L`')R,C<V>%]#
+M:&5C:T1E=FEC94-H86YG90!R<C(W-GA?4&]S=$UA:V5397-%;F-L;W-U<F53
+M=&%T=7-297%U97-T`')R,C<V>%]5<&1A=&5487)G971$979I8V5S`')R,C<V
+M>%]D979I8V5?<')O8F5?9&]N90!R<C(W-GA?0V]R95]297%4:6UE;W5T`')R
+M,C<V>%]$979I8V5?36%K95-E<U)C=D1I86=297%U97-T`')R,C<V>%]"965P
+M3V9F`')R,C<V>%]'971$979I8V5&<F]M4&]O;`!R<C(W-GA?5&%G7TES16UP
+M='D`<G(R-S9X7U5P9&%T95=I9&50;W)T4&AY36%P`')R,C<V>%]O9&EN7W-E
+M=%]I9&QE7W-T86YD8GD`<G(R-S9X7T9R965#;W)E0V]N=&5X=%1O4&]O;`!R
+M<C(W-GA?0V]R95]-;V1U;&5);FET:6%L:7IE`')R,C<V>%]5<&1A=&53=&%T
+M=7-6<U-E<T-O;G1R;VQ"=69F97(`<G(R-S9X7U!O<G1?36]N:71O<@!R<C(W
+M-GA?4T%37TEN=&5R;F%L4F5Q0V%L;&)A8VL`<G(R-S9X7U-#4TE?36%K94-A
+M8VAE0V]M;6%N9`!R<C(W-GA?4U-47U-025]#340`<G(R-S9X7U!-7T-O<F5?
+M4F5Q5&EM96]U=`!?;V1I;E]C:&5C:U]N=G)A;0!R<C(W-GA?1&5V:6-E7TUA
+M:V5296%D0V%P86-I='DQ-E1A<VM297%U97-T`')R,C<V>%]$979I8V5?5W)I
+M=&5397-#;VYT<F]L1&EA9P!R<C(W-GA?1FEN9%)U;FYI;F=297%">51A9P!R
+M<C(W-GA?359?1'5M<%)E<75E<W0`<G(R-S9X7U-!5$%?4$U?2&%N9&QE1&5V
+M:6-E4&QU9VEN`')R,C<V>%]C;W)E7VAA;F1L95]T87-K9FEL95]E<G)O<@!R
+M<C(W-GA?4T-325]4;U]&25,`<G(R-S9X7T=E=%!-1&5V:6-E`')R,C<V>%]3
+M051!7U!R97!A<F5#;VUM86YD5&%B;&4`<G(R-S9X7TU67TUA<%1O4W!E8VEF
+M:6-487)G971)1`!R<C(W-GA?1&5V:6-E7TUA:V5297%U97-T5&%S:U)E<75E
+M<W0`<G(R-S9X7U-#4TE?051!7T9I;&Q$871A1FEE;&0`<G(R-S9X7T=E=%-'
+M0G5F9F5R1G)O;5!O;VP`<G(R-S9X7U-#4TE?051!7U9E<FEF>51R86YS;&%T
+M:6]N`')R,C<V>%]0<F5%;7!T>41E=FEC90!R<C(W-GA?1V5T36%X3F5G;W1I
+M871E9$QI;FM2871E`')R,C<V>%]'9710;W)T1G)O;5!O;VP`<G(R-S9X7V]D
+M:6Y?9FQA<VA?86-C97-S`')R,C<V>%]'971%>'!A;F1E<D9R;VU0;V]L`')R
+M,C<V>%]3051!7U!O<G1$971E8W0`<G(R-S9X7TU67TUA<%1A<F=E=$E$`')R
+M,C<V>%]'971/;F5#;VUM86YD4VQO=`!R<C(W-GA?57!D871E5&=T1&5V36%P
+M`')R,C<V>%]486=?26YI=%]&249/`')R,C<V>%]%>'!A;F1E<E]335!297%U
+M97-T7U)E<&]R=%!(65-!5$$`<G(R-S9X7TDR0U]-;V1U;&5);FET:6%L:7IE
+M`')R,C<V>%]M=E]R97-E=%]P:'D`<G(R-S9X7T1E=FEC95]-86ME4W1A<G13
+M=&]P56YI=%)E<75E<W0`<G(R-S9X7T)E97!/;@!R<C(W-GA?1G)E95-!5$%3
+M8W)A=&-H5&]0;V]L`')R,C<V>%]3051!7U!O<G1297-E=`!R<C(W-GA?;79?
+M<V5T7U-!4T%D9'(`<G(R-S9X7U-!5$%?2&%N9&QE1&5V:6-E56YP;'5G`')R
+M,C<V>%]31U1A8FQE7TEN:70`<G(R-S9X7T-O<F5?2&%N9&QE5V%I=&EN9TQI
+M<W0`<G(R-S9X7T9R965335!38W)A=&-H5&]0;V]L`')R,C<V>%]31U!)3U]3
+M35!297%?0V%L;&)A8VL`<G(R-S9X7T=E=$-O<F5#;VYT97AT1G)O;5!O;VP`
+M<G(R-S9X7T1I<V-O=F5R>4-A;&Q"86-K`')R,C<V>%]486=?1V5T3VYE`')R
+M,C<V>%]30U-)7T%405]&:6QL3$)!0V1B,38`<G(R-S9X7U9E<FEF>4-O;6UA
+M;F1"969O<F5396YD:6YG`')R,C<V>%](86YD;&5#;VUM86YD475E=64`<G(R
+M-S9X7U-!5$%?4$U?17)R;W)(86YD;&EN9P!R<C(W-GA?3&ES=%]'971,87-T
+M`')R,C<V>%]-5E]);FET:6%L:7IE5&%R9V5T241486)L90!R<C(W-GA?4&]S
+M=$UA:V5397-%;&5M96YT4W1A='5S4F5Q=65S=`!R<C(W-GA?1FEN9$9R9653
+M35!#;VYT97AT`')R,C<V>%]$25-#7U-E=%)E<V]U<F-E`')R,C<V>%]'9713
+M35!38W)A=&-H1G)O;5!O;VP`<G(R-S9X7T-O<F5?4F5S971#;613;&]T`')R
+M,C<V>%]0;W-T36%K95-E<T5L96UE;G1$97-C<FEP=&]R4F5Q=65S=`!R<C(W
+M-GA?0V]R95]);G1E<FYA;%-E;F1297%U97-T`')R,C<V>%]?7V-A;F-E;%]T
+M:6UE<@!R<C(W-GA?17AP86YD97)?4TU04F5Q=65S=%]297!O<G1'96YE<F%L
+M`')R,C<V>%]%>'!A;F1E<E]335!297%?0V%L;&)A8VL`<G(R-S9X7U]?861D
+M7W1I;65R`')R,C<V>%])<W-U95]297!O<G1'96YE<F%L`')R,C<V>%]-5E]:
+M97)O379297%U97-T`')R,C<V>%]!5$%?0T1",E1A<VM&:6QE`')R,C<V>%]$
+M25-#7T=E=$YE9V]T:6%T961,:6YK4F%T90!R<C(W-GA?4T%405]0;W)T2&%N
+M9&QE26YT97)R=7!T`')R,C<V>%]$:7-C;W9E<GE330!R<C(W-GA?4$U?07-S
+M:6=N4F5G:7-T97)3970`<G(R-S9X7U-!5$%?4$U?2&%N9&QE1&5V:6-E56YP
+M;'5G`')R,C<V>%]M=E]D:7-A8FQE7WAM=`!R<C(W-GA?4TU04F5S<$QE;F=T
+M:`!R<C(W-GA?1V5T3D-15&%G`')R,C<V>%]-5E]%<75A;',`<G(R-S9X7U!-
+M7T9R965296=I<W1E<E-E=`!R<C(W-GA?17AP86YD97)?4TU04F5Q=65S=%]$
+M:7-C;W9E<@!R<C(W-GA?1&5T96-T4&]R=%1Y<&4`<G(R-S9X7T-O<F5297-T
+M;W)E3W)I9VEN86Q#1$(`<G(R-S9X7U-%4U]3971&86EL3&5D`')R,C<V>%]2
+M=6YT:6UE27-S=653;V9T4F5S970`<G(R-S9X7U-!5$%?4$U(;W1P;'5G4F5Q
+M0V%L;&)A8VL`<G(R-S9X7T=E=$UI;DYE9V]T:6%T961,:6YK4F%T90!R<C(W
+M-GA?4G5N=&EM94ES<W5E4V]F=%)E<V5T0V%L;&)A8VL`<G(R-S9X7T=E=%!-
+M1G)O;5!O;VP`<G(R-S9X7U!R97!A<F5$96QI=F5R>5%U975E16YT<GD`<G(R
+M-S9X7U-T;W)E7T-O;F9I9U)O=71E26YF;P!R<C(W-GA?0V]R95]);G1E<G)U
+M<'1397)V:6-E4F]U=&EN90!R<C(W-GA?1G)E95!O<G14;U!O;VP`<G(R-S9X
+M7T-O<F5?36]D=6QE4V5N9%)E<75E<W0`<G(R-S9X7T-O;7!L971E4F5Q=65S
+M=$%N9%-L;W0`<G(R-S9X7T%S<VEG;D5L96UE;G13;&]T3G5M8F5R`')R,C<V
+M>%]!<W-I9VY296=I<W1E<E-E=`!R<C(W-GA?359?4F5M;W9E5&%R9V5T240`
+M<G(R-S9X7T1E=FEC95]-86ME4F5A9$-A<&%C:71Y5&%S:U)E<75E<W0`<G(R
+M-S9X7U-44%]$979I8V5297-E=`!R<C(W-GA?0V]R95]-;V1U;&53:'5T9&]W
+M;@!R<C(W-GA?359?4V5T3$)!86YD4V5C=&]R0V]U;G0`<G(R-S9X7U-!5$%?
+M2&%N9&QE1&5V:6-E4&QU9VEN`')R,C<V>%]296UO=F5$979I8V4`<G(R-S9X
+M7W-E=%]F86EL7VQE9',`<G(R-S9X7T%S<VEG;D1E=FEC945L96UE;G1.=6UB
+M97(`<G(R-S9X7U-!4U](86YD;&5#;VUP;&5T961#;VUM86YD`')R,C<V>%],
+M:7-T7T=E=$9I<G-T`')R,C<V>%])<W-U95]297!O<G1-86YU9F%C='5R97))
+M;F9O<FUA=&EO;@!R<C(W-GA?4T%405]034EN:71297%#86QL8F%C:P!R<C(W
+M-GA?5W)I=&5$14Q67U%?16YT<GD`<G(R-S9X7T9R965335!#;VYT97AT`')R
+M,C<V>%]$25-#7T1O1&ES8V]V97(`<G(R-S9X7U]?4$U?8V%N8V5L7W1I;65R
+M`')R,C<V>%]O9&EN7W)E;6]V95]D979I8V4`<G(R-S9X7U!R945M<'1Y4$T`
+M<G(R-S9X7T=E=$EN=&5R;F%L4F5Q1G)O;5!O;VP`<G(R-S9X7W-E=%]F86EL
+M7VQE9`!R<C(W-GA?4T=024]?26YI=&EA;&EZ90!R<C(W-GA?4T-325]!5$%?
+M57!P97)7;W)D`')R,C<V>%]&<F5E26YT97)N86Q297%4;U!O;VP`<G(R-S9X
+M7T-O<F5?36]D=6QE4W1A<G0`<G(R-S9X7T1)4T-?0V%N8V5L1&ES8V]V97(`
+M<G(R-S9X7U-!5$%?17)R;W)(86YD;&EN9P!R<C(W-GA?0V]R95]-86ME1&5V
+M:6-E4F5S971297$`<G(R-S9X7U-!4U]0;W)T4F5S970`<G(R-S9X7T1E=FEC
+M95]-86ME36]D95-E;G-E4F5Q=65S=`!R<C(W-GA?4T537TEN=&5R;F%L4F5Q
+M0V%L;&)A8VL`7V]D:6Y?8VAE8VM?;'!C`')R,C<V>%]3051396YS941A=&$`
+M<G(R-S9X7TU67T-O<'E31U1A8FQE`')R,C<V>%]&:6YD07-C:6E.=6UB97(`
+M<G(R-S9X7TES<W5E7T1I<V-O=F5R`')R,C<V>%]397)V:6-E26YT97)R=7!T
+M`')R,C<V>%]3051!7U!-4W1A=&5-86-H:6YE`')R,C<V>%]3051!7T1E=FEC
+M95-T871E36%C:&EN90!R<C(W-GA?4T%405]0;W)T1&5V:6-E4F5A9'D`<G(R
+M-S9X7U]?<F5N97=?=&EM97(`<G(R-S9X7T-O;7!L971E4F5Q=65S=`!R<C(W
+M-GA?4&]S=$UA:V5397-#;VYF:6=U<F%T:6]N4F5Q=65S=`!R<C(W-GA?1G)E
+M945X<&%N9&5R5&]0;V]L`')R,C<V>%]$25-#7T=E=%1G=$1E=DUA<`!R<C(W
+M-GA?4T-325]!5$%?3&]W97)7;W)D`')R,C<V>%]0;W)T7T9I;F149W1.;P!R
+M<C(W-GA?1$E30U]#:&5C:T1I<V-O=F5R4W1A=&4`<G(R-S9X7T9I;F149W1.
+M;P!R<C(W-GA?0V]R95]&:6QL4V5N<V5$871A`')R,C<V>%]0;W)T7TAA;F1L
+M941E=FEC95!L=6=I;@!R<C(W-GA?1V5T4T534T)&<F]M4&]O;`!R<C(W-GA?
+M0V]R95]-;V1U;&5%;F%B;&5$:7-A8FQE25)1`')R,C<V>%]#;W)E4V%V94]R
+M:6=I;F%L0T1"`')R,C<V>%])<W-U95]297!O<G12;W5T94EN9F\`<G(R-S9X
+M7U-'4$E/7U--4%)E<75E<W1?5W)I=&4`<G(R-S9X7VUV7V1I<V%B;&5?:&)A
+M`')R,C<V>%]31U1A8FQE7T%P<&5N9`!R<C(W-GA?;6]D95!A9V5"=68`<G(R
+M-S9X7U-'4$E/7U)E861296=I<W1E<@!R<C(W-GA?;79?9&ES86)L95]R96=I
+M<W1E<E]S970`<G(R-S9X7U!O<G1?2&%N9&QE4&QU9VEN`')R,C<V>%]'9713
+M051!4V-R871C:$9R;VU0;V]L`')R,C<V>%]-5E]'971-87!P961)1`!R<C(W
+M-GA?;79#:&%N;F5L4W1A=&5-86-H:6YE`')R,C<V>%]#:&5C:U1A<F=E=$-H
+M86YG90!R<C(W-GA?:3)C7W)E<V5T`')R,C<V>%]30U-)7T%405]296%D0V%P
+M86-I='E4<F%N<VQA=&EO;@!R<C(W-GA?0T]215])<W-U95--4%)E<75E<W0`
+M<G(R-S9X7U-!5$%?4&]R=$1E=FEC941E=&5C=&5D`')R,C<V>%]30U-)7T%4
+M05]3=&%R=%-T;W!4<F%N<VQA=&EO;@!R<C(W-GA?4$U?27-S=65296%D4F5G
+M`')R,C<V>%]&:6QL16YC;&]S=7)E16QE;65N=%-T871U<P!R<C(W-GA?4T-3
+M25]-86ME36]D95!A9V5#86-H:6YG`')R,C<V>%]#871E9V]R>5]#1$)?5'EP
+M90!R<C(W.'A?0V]R95]);G1E<FYA;%-E;F1297%U97-T`')R,C<X>%]305-?
+M4&]R=%)E<V5T`')R,C<X>%]$:7-C;W9E<GE330!R<C(W.'A?4T%405]0;W)T
+M2&%N9&QE26YT97)R=7!T`')R,C<X>%]#3U)%7TES<W5E4TU04F5Q=65S=`!R
+M<C(W.'A?4T-325]!5$%?4WEN8T-A8VAE5')A;G-L871I;VX`<G(R-SAX7U-T
+M;W)E7T-O;F9I9U)O=71E26YF;P!R<C(W.'A?359?6F5R;TUV4F5Q=65S=`!R
+M<C(W.'A?0V]R95]'9713=7!P;W)T961#;W5N=',`<G(R-SAX7T=E=%!O<G1&
+M<F]M4&]O;`!R<C(W.'A?4T=486)L95]!=F%I;&%B;&4`<G(R-SAX7T=E=$5X
+M<&%N9&5R1G)O;5!O;VP`<G(R-SAX7T9R965315-30E1O4&]O;`!R<C(W.'A?
+M4&]S=$UA:V5397-%;&5M96YT1&5S8W)I<'1O<E)E<75E<W0`<G(R-SAX7T1I
+M<V-O=F5R>4-A;&Q"86-K`')R,C<X>%]035]#;W)E7U)E<51I;65O=70`<G(R
+M-SAX7U5P9&%T951A<F=E=$1E=FEC97,`<G(R-SAX7T1E=FEC95]087)S94ED
+M96YT:69Y1&%T80!R<C(W.'A?4T-325]!5$%?1FEL;$Q"04-D8C$V`')R,C<X
+M>%]'9710349R;VU0;V]L`')R,C<X>%])<W-U95]297!O<G12;W5T94EN9F\`
+M<G(R-SAX7TES<W5E7U)E<&]R=$=E;F5R86P`<G(R-SAX7U5P9&%T95!H>4EN
+M9F\`<G(R-SAX7T%4345,7U-025]#340`<G(R-SAX7U-#4TE?051!7T9I;&Q$
+M871A1FEE;&0`<G(R-SAX7T%405]#1$(R5&%S:T9I;&4`<G(R-SAX7T9R965$
+M979I8V54;U!O;VP`<G(R-SAX7T=E=%--4%-C<F%T8VA&<F]M4&]O;`!R<C(W
+M.'A?4$U?07-S:6=N4F5G:7-T97)3970`<G(R-SAX7U-#4TE?36%K94UO9&50
+M86=E0V%C:&EN9P!R<C(W.'A?1&5V:6-E7TUA:V5397-28W9$:6%G4F5Q=65S
+M=`!R<C(W.'A?0V]R95-A=F5/<FEG:6YA;$-$0@!R<C(W.'A?0V]R95)E<W1O
+M<F5/<FEG:6YA;$-$0@!R<C(W.'A?1$E30U]3971297-O=7)C90!R<C(W.'A?
+M17AP86YD97)?4TU04F5Q=65S=%]297!O<G102%E3051!`')R,C<X>%]0<F5P
+M87)E1&5L:79E<GE1=65U945N=')Y`')R,C<X>%]&<F5E4T="=69F97)4;U!O
+M;VP`<G(R-SAX7U-!5$%?4&]R=$1E=FEC95)E861Y`')R,C<X>%]),D-?36]D
+M=6QE26YI=&EA;&EZ90!R<C(W.'A?8V]R95]H86YD;&5?=&%S:V9I;&5?97)R
+M;W(`<G(R-SAX7U!R945M<'1Y1&5V:6-E`')R,C<X>%]31U!)3U]335!297%U
+M97-T7U)E860`<G(R-SAX7T9R9653051!4V-R871C:%1O4&]O;`!R<C(W.'A?
+M4T%37TAA;F1L94-O;7!L971E9$-O;6UA;F0`<G(R-SAX7TU67T1U;7!296=I
+M<W1E<@!R<C(W.'A?1V5T4$U$979I8V4`<G(R-SAX7T]D:6Y34$E?26YI=`!R
+M<C(W.'A?359?4V5T3$)!86YD4V5C=&]R0V]U;G0`<G(R-SAX7U=R:71E1$5,
+M5E]17T5N=')Y`')R,C<X>%]&<F5E4&]R=%1O4&]O;`!R<C(W.'A?4&]R=%](
+M86YD;&50;'5G:6X`<G(R-SAX7U-'4$E/7U--4%)E<75E<W1?5W)I=&4`<G(R
+M-SAX7TAA;F1L94-O;6UA;F11=65U90!R<C(W.'A?4T%37T1E=FEC95-T871E
+M36%C:&EN90!R<C(W.'A?0V]R95]-;V1U;&5%;F%B;&5$:7-A8FQE25)1`')R
+M,C<X>%]2=6YT:6UE27-S=65296%D3&]G17AT`')R,C<X>%]&:6QL16YC;&]S
+M=7)E16QE;65N=%-T871U<P!R<C(W.'A?4T-325]!5$%?3&]W97)7;W)D`')R
+M,C<X>%]3051!7U!-7TAA;F1L941E=FEC95!L=6=I;@!R<C(W.'A?0V]M<&QE
+M=&5297%U97-T06YD4VQO=`!R<C(W.'A?4$U?27-S=657<FET95)E9P!R<C(W
+M.'A?4T%405]0;W)T1&5V:6-E1&5T96-T960`<G(R-SAX7U!O<W1-86ME4V5S
+M0V]N9FEG=7)A=&EO;E)E<75E<W0`<G(R-SAX7T1E=FEC95]-86ME4F5A9$-A
+M<&%C:71Y5&%S:U)E<75E<W0`<G(R-SAX7T-O<F5?36]D=6QE4VAU=&1O=VX`
+M<G(R-SAX7U!O<W1-86ME4V5S16YC;&]S=7)E4W1A='5S4F5Q=65S=`!R<C(W
+M.'A?1$E30U]#86YC96Q$:7-C;W9E<@!R<C(W.'A?4T=486)L95]!<'!E;F0`
+M<G(R-SAX7U!R97!A<F5!;F1396YD0V]M;6%N9`!R<C(W.'A?0V]R95]-86ME
+M1&5V:6-E4F5S971297$`<G(R-SAX7TU67TUA<%1O4W!E8VEF:6-487)G971)
+M1`!R<C(W.'A?4T%37TEN=&5R;F%L4F5Q0V%L;&)A8VL`<G(R-SAX7T%S<VEG
+M;D1E=FEC945L96UE;G1.=6UB97(`<G(R-SAX7U-!5$%?4$U3=&%T94UA8VAI
+M;F4`<G(R-SAX7U-'5&%B;&5?26YI=`!R<C(W.'A?4&]R=%]-;VYI=&]R`')R
+M,C<X>%]$25-#7T-H96-K1&ES8V]V97)3=&%T90!R<C(W.'A?1G)E94-O<F5#
+M;VYT97AT5&]0;V]L`')R,C<X>%]&<F5E4F5G:7-T97)3970`<G(R-SAX7U1A
+M9U]);FET7T9)1D\`<G(R-SAX7U5P9&%T951G=$1E=DUA<`!R<C(W.'A?1$E3
+M0U]'971.96=O=&EA=&5D3&EN:U)A=&4`<G(R-SAX7U-'4$E/7U-E=%]&86EL
+M;&5D`')R,C<X>%]0;W)T7T9I;F149W1.;P!R<C(W.'A?4$U?1G)E95)E9VES
+M=&5R4V5T`')R,C<X>%]-5E]296UO=F5487)G971)1`!R<C(W.'A?1V5T4T="
+M=69F97)&<F]M4&]O;`!R<C(W.'A?4T-325]!5$%?0VAE8VM#;VYD:71I;VX`
+M<G(R-SAX7T-O<F5?36]D=6QE1V5T4F5S;W5R8V51=6]T80!R<C(W.'A?4&]R
+M=%](86YD;&55;G!L=6<`<G(R-SAX7U1A9U]);FET`')R,C<X>%]486=?27-%
+M;7!T>0!R<C(W.'A?1V5T3D-15&%G`')R,C<X>%]M=E]R97-E=%]X;70`<G(R
+M-SAX7T9R965335!#;VYT97AT`')R,C<X>%]#871E9V]R>5]#1$)?5'EP90!R
+M<C(W.'A?4TU04F5S<$QE;F=T:`!R<C(W.'A?1$E30U]'97149W1$979-87``
+M<G(R-SAX7U-'4$E/7TEN:71I86QI>F4`<G(R-SAX7T-O<F5?2&%N9&QE5V%I
+M=&EN9TQI<W0`<G(R-SAX7U)E;6]V941E=FEC90!R<C(W.'A?4T%405](86YD
+M;&5$979I8V50;'5G:6X`<G(R-SAX7T=E=$UA>$YE9V]T:6%T961,:6YK4F%T
+M90!R<C(W.'A?1&5V:6-E7TUA:V5297%U97-T5&%S:U)E<75E<W0`<G(R-SAX
+M7T=E=$UI;DYE9V]T:6%T961,:6YK4F%T90!R<C(W.'A?4T%405]035](86YD
+M;&5$979I8V55;G!L=6<`<G(R-SAX7T=E=$EN=&5R;F%L4F5Q1G)O;5!O;VP`
+M<G(R-SAX7T1E=FEC95]-86ME26YQ=6ER>51A<VM297%U97-T`')R,C<X>%]!
+M<W-I9VY%;&5M96YT4VQO=$YU;6)E<@!R<C(W.'A?1G)E94EN=&5R;F%L4F5Q
+M5&]0;V]L`')R,C<X>%]?7U!-7V-A;F-E;%]T:6UE<@!R<C(W.'A?27-S=65?
+M0V]N9FEG4F]U=&5);F9O`')R,C<X>%]486=?4F5L96%S94]N90!R<C(W.'A?
+M;79?9&ES86)L95]H8F$`<G(R-SAX7TU67T-O<'E31U1A8FQE`')R,C<X>%]M
+M=E]E;F%B;&5?>&UT`')R,C<X>%]30U-)7U1O7T9)4P!R<C(W.'A?1&5V:6-E
+M7TUA:V5-;V1E4V5L96-T4F5Q=65S=`!R<C(W.'A?;V1I;E]R96UO=F5?9&5V
+M:6-E`')R,C<X>%]&:6YD5&=T3F\`<G(R-SAX7TES<W5E7T1I<V-O=F5R`')R
+M,C<X>%]-5E]-87!487)G971)1`!R<C(W.'A?57!D871E5VED95!O<G10:'E-
+M87``<G(R-SAX7U]?8V%N8V5L7W1I;65R`')R,C<X>%]3051396YS941A=&$`
+M<G(R-SAX7V1E=FEC95]P<F]B95]D;VYE`')R,C<X>%]&<F5E17AP86YD97)4
+M;U!O;VP`<G(R-SAX7VUV7V1I<V%B;&5?>&UT`')R,C<X>%]M=D-H86YN96Q3
+M=&%T94UA8VAI;F4`<G(R-SAX7T9I;F1!<V-I:4YU;6)E<@!R<C(W.'A?4$U?
+M27-S=65296%D4F5G`')R,C<X>%]M=E]R97-E=%]P:'D`<G(R-SAX7U-#4TE?
+M051!7T9I;&Q,0D%#9&(Q,`!R<C(W.'A?<V5T7V9A:6Q?;&5D`')R,C<X>%]!
+M<W-I9VY296=I<W1E<E-E=`!R<C(W.'A?1G)E95--4%-C<F%T8VA4;U!O;VP`
+M<G(R-SAX7TU67TEN:71I86QI>F5487)G971)1%1A8FQE`')R,C<X>%]30U-)
+M7T%405]3=&%R=%-T;W!4<F%N<VQA=&EO;@!R<C(W.'A?1FEN9%)U;FYI;F=2
+M97%">51A9P!R<C(W.'A?4T%405]$979I8V53=&%T94UA8VAI;F4`<G(R-SAX
+M7T-O<F5?36]D=6QE4W1A<G0`<G(R-SAX7U]?<F5N97=?=&EM97(`<G(R-SAX
+M7U!O<G1?2&%N9&QE1&5V:6-E4&QU9VEN`')R,C<X>%]315-?4V5T1F%I;$QE
+M9`!R<C(W.'A?1$E30U]'971297-O=7)C90!R<C(W.'A?4T%405]034AO='!L
+M=6=297%#86QL8F%C:P!R<C(W.'A?;79?<V5T7U-!4T%D9'(`<G(R-SAX7U)U
+M;G1I;65)<W-U95-O9G1297-E=$-A;&QB86-K`')R,C<X>%]0;W)T7TES4F5Q
+M=65S=%)U;FYI;F<`<G(R-SAX7U-#4TE?051!7U5P<&5R5V]R9`!R<C(W.'A?
+M17AP86YD97)?4TU04F5Q=65S=%]0:'E#;VYT<F]L`')R,C<X>%]$979I8V5?
+M27-S=653;V9T4F5S970`<G(R-SAX7U-!5$%?4$U?17)R;W)(86YD;&EN9P!R
+M<C(W.'A?0F5E<$]F9@!R<C(W.'A?1$E30U]$;T1I<V-O=F5R`')R,C<X>%]$
+M979I8V5?5W)I=&5397-#;VYT<F]L1&EA9P!R<C(W.'A?1&5V:6-E7TUA:V52
+M96%D0V%P86-I='DQ-E1A<VM297%U97-T`')R,C<X>%]30U-)7T%405]697)I
+M9GE4<F%N<VQA=&EO;@!R<C(W.'A?1V5T4T%405-C<F%T8VA&<F]M4&]O;`!R
+M<C(W.'A?4T%37TAA;F1L94)21$-35`!R<C(W.'A?;V1I;E]I;V-T;`!R<C(W
+M.'A?0V%L8W5L871E4F]U=&5);F1E>`!R<C(W.'A?27-S=65?4F5P;W)T36%N
+M=69A8W1U<F5R26YF;W)M871I;VX`<G(R-SAX7T-O<F5?4F5Q5&EM96]U=`!R
+M<C(W.'A?;V1I;E]F;&%S:%]A8V-E<W,`<G(R-SAX7T=E=%-%4U-"1G)O;5!O
+M;VP`<G(R-SAX7T1E=FEC95]-86ME4W1A<G13=&]P56YI=%)E<75E<W0`<G(R
+M-SAX7U]?861D7W1I;65R`')R,C<X>%]305-?17)R;W)(86YD;&EN9P!R<C(W
+M.'A?4V5R=FEC94EN=&5R<G5P=`!R<C(W.'A?4T%405]034EN:71297%#86QL
+M8F%C:P!R<C(W.'A?4&]R=%]3;V9T4F5S971#86QL8F%C:P!R<C(W.'A?0VAE
+M8VM$979I8V5#:&%N9V4`<G(R-SAX7T=E=$]N94-O;6UA;F13;&]T`')R,C<X
+M>%]0;W-T36%K95-E<T5L96UE;G13=&%T=7-297%U97-T`')R,C<X>%]2=6YT
+M:6UE27-S=653;V9T4F5S970`<G(R-SAX7U-#4TE?051!7U)E8617<FET951R
+M86YS;&%T:6]N`')R,C<X>%]697)I9GE#;VUM86YD0F5F;W)E4V5N9&EN9P!R
+M<C(W.'A?:3)C7W)E<V5T`')R,C<X>%]30U-)7T%405]296%D0V%P86-I='E4
+M<F%N<VQA=&EO;D-A;&QB86-K`')R,C<X>%]486=?1V5T3VYE`')R,C<X>%]3
+M051!7U!O<G1$971E8W0`<G(R-SAX7T%S<VEG;D1E=FEC94]V97)A;&Q%;&5M
+M96YT3G5M8F5R`')R,C<X>%]3051!7T5R<F]R2&%N9&QI;F<`<G(R-SAX7U-#
+M4TE?051!7U)E861#87!A8VET>51R86YS;&%T:6]N`')R,C<X>%]35%!?1&5V
+M:6-E4F5S970`<G(R-SAX7VUO9&5086=E0G5F`')R,C<X>%],:7-T7T=E=$QA
+M<W0`<G(R-SAX7T=E=$1E=FEC949R;VU0;V]L`')R,C<X>%]0;W)T7T%B;W)T
+M4F5Q=65S=',`<G(R-SAX7T-O<F5?1FEL;%-E;G-E1&%T80!R<C(W.'A?;V1I
+M;E]S971?<W!I;E]U<%]M;V1E`')R,C<X>%]%>'!A;F1E<E]335!297%U97-T
+M7U)E<&]R=$=E;F5R86P`<G(R-SAX7V1U;7!?=6YA<W-O8VEA=&5D7V9I<P!R
+M<C(W.'A?0V]R95]);G1E<G)U<'1397)V:6-E4F]U=&EN90!R<C(W.'A?4T-3
+M25]-86ME0V%C:&5#;VUM86YD`')R,C<X>%]#;W)E7W!A<W-?=&AR=5]F:6QL
+M7W1A<VMF:6QE`')R,C<X>%]#;W)E7TUO9'5L95-E;F1297%U97-T`')R,C<X
+M>%]3051!7U!O<G1297-E=`!R<C(W.'A?0V]R95]-;V1U;&5);FET:6%L:7IE
+M`')R,C<X>%]%>'!A;F1E<E]335!297%?0V%L;&)A8VL`<G(R-SAX7U!R945M
+M<'1Y4$T`<G(R-SAX7T5X<&%N9&5R7U--4%)E<75E<W1?1&ES8V]V97(`<G(R
+M-SAX7U--4%]31U!)3U]3971?1F%I;&QE9`!R<C(W.'A?1&5T96-T4&]R=%1Y
+M<&4`<G(R-SAX7U-'4$E/7U)E861296=I<W1E<@!R<C(W.'A?4T537TEN=&5R
+M;F%L4F5Q0V%L;&)A8VL`<G(R-SAX7TU67T1U;7!297%U97-T`')R,C<X>%]#
+M:&5C:U1A<F=E=$-H86YG90!R<C(W.'A?<V5T7V9A:6Q?;&5D<P!R<C(W.'A?
+M0F5E<$]N`')R,C<X>%]-5E]'971-87!P961)1`!R<C(W.'A?1G)E95!-5&]0
+M;V]L`')R,C<X>%]31U!)3U]7<FET95)E9VES=&5R`')R,C<X>%]5<&1A=&53
+M=&%T=7-6<U-E<T-O;G1R;VQ"=69F97(`<G(R-SAX7T=E=$-O<F5#;VYT97AT
+M1G)O;5!O;VP`<G(R-SAX7U-'4$E/7U--4%)E<5]#86QL8F%C:P!R<C(W.'A?
+M1&5V:6-E7TUA:V5-;V1E4V5N<V5297%U97-T`')R,C<X>%]34U1?4U!)7T--
+M1`!R<C(W.'A?4T%405](86YD;&5$979I8V55;G!L=6<`<G(R-SAX7VUV7V1I
+M<V%B;&5?<F5G:7-T97)?<V5T`')R,C<X>%]#;W)E7U)E<V5T0VUD4VQO=`!R
+M<C(W.'A?4T%405]0<F5P87)E0V]M;6%N9%1A8FQE`')R,C<X>%]3051!7U!R
+M97!A<F5#;VUM86YD2&5A9&5R`')R,C<X>%]&:6YD1G)E95--4$-O;G1E>'0`
+M<G(R-SAX7TU67T-20P!R<C(W.'A?359?17%U86QS`')R,C<X>%]#;VUP;&5T
+M95)E<75E<W0`<G(R-SAX7TQI<W1?1V5T1FER<W0`<G(R-SAX7V]D:6Y?<V5T
+M7VED;&5?<W1A;F1B>0!R<C(W,WA?359?0V]P>5-'5&%B;&4`<G(R-S-X7VUO
+M9&5086=E0G5F`')R,C<S>%]#;W)E7TAA;F1L95=A:71I;F=,:7-T`')R,C<S
+M>%]%>'!A;F1E<E]335!297%?0V%L;&)A8VL`<G(R-S-X7U-'4$E/7U--4%)E
+M<5]#86QL8F%C:P!R<C(W,WA?2&%N9&QE0V]M;6%N9%%U975E`')R,C<S>%]3
+M051!7U!-7TAA;F1L941E=FEC95!L=6=I;@!R<C(W,WA?17AP86YD97)?4TU0
+M4F5Q=65S=%]$:7-C;W9E<@!R<C(W,WA?051!7T-$0C)487-K1FEL90!R<C(W
+M,WA?4T%405]035]%<G)O<DAA;F1L:6YG`')R,C<S>%]305-?2&%N9&QE0E)$
+M0U-4`')R,C<S>%]3051!7T5R<F]R2&%N9&QI;F<`<G(R-S-X7U-#4TE?051!
+M7U)E8617<FET951R86YS;&%T:6]N`')R,C<S>%],:7-T7T=E=$QA<W0`<G(R
+M-S-X7U-!5%-E;G-E1&%T80!R<C(W,WA?1G)E95--4$-O;G1E>'0`<G(R-S-X
+M7T1)4T-?0V%N8V5L1&ES8V]V97(`<G(R-S-X7U!O<G1?27-297%U97-T4G5N
+M;FEN9P!R<C(W,WA?051-14Q?4U!)7T--1`!R<C(W,WA?0V]R95]);G1E<G)U
+M<'1397)V:6-E4F]U=&EN90!R<C(W,WA?1&5V:6-E7TUA:V5);G%U:7)Y5&%S
+M:U)E<75E<W0`<G(R-S-X7T1I<V-O=F5R>4-A;&Q"86-K`')R,C<S>%]!<W-I
+M9VY$979I8V5%;&5M96YT3G5M8F5R`')R,C<S>%]0<F5P87)E1&5L:79E<GE1
+M=65U945N=')Y`')R,C<S>%]30U-)7T%405],;W=E<E=O<F0`<G(R-S-X7T9R
+M9650;W)T5&]0;V]L`')R,C<S>%]-5E]3971,0D%A;F1396-T;W)#;W5N=`!R
+M<C(W,WA?;79?9&ES86)L95]R96=I<W1E<E]S970`<G(R-S-X7U1A9U]);FET
+M`')R,C<S>%]$25-#7T=E=$YE9V]T:6%T961,:6YK4F%T90!R<C(W,WA?4T-3
+M25]!5$%?4W1A<G13=&]P5')A;G-L871I;VX`<G(R-S-X7TES<W5E7T1I<V-O
+M=F5R`')R,C<S>%]30U-)7T%405]5<'!E<E=O<F0`<G(R-S-X7U1A9U]'971/
+M;F4`<G(R-S-X7T-H96-K1&5V:6-E0VAA;F=E`')R,C<S>%]&<F5E0V]R94-O
+M;G1E>'14;U!O;VP`<G(R-S-X7T=E=$UA>$YE9V]T:6%T961,:6YK4F%T90!R
+M<C(W,WA?<V5T7V9A:6Q?;&5D`')R,C<S>%]?7U!-7V-A;F-E;%]T:6UE<@!R
+M<C(W,WA?4$U?27-S=65296%D4F5G`')R,C<S>%]#86QC=6QA=&52;W5T94EN
+M9&5X`')R,C<S>%]%>'!A;F1E<E]335!297%U97-T7U)E<&]R=%!(65-!5$$`
+M<G(R-S-X7U-#4TE?36%K94UO9&5086=E0V%C:&EN9P!R<C(W,WA?1V5T4$U$
+M979I8V4`<G(R-S-X7VUV7W-E=%]305-!9&1R`')R,C<S>%]3051!7U!O<G12
+M97-E=`!R<C(W,WA?1$E30U]'971297-O=7)C90!R<C(W,WA?;V1I;E]F;&%S
+M:%]A8V-E<W,`<G(R-S-X7U-!4U](86YD;&5#;VUP;&5T961#;VUM86YD`')R
+M,C<S>%]$979I8V5?4&%R<V5)9&5N=&EF>41A=&$`<G(R-S-X7U!R945M<'1Y
+M4$T`<G(R-S-X7T1E=FEC95]-86ME36]D95-E;G-E4F5Q=65S=`!R<C(W,WA?
+M4T=486)L95]!=F%I;&%B;&4`<G(R-S-X7U!O<W1-86ME4V5S0V]N9FEG=7)A
+M=&EO;E)E<75E<W0`<G(R-S-X7T-O<F5?36]D=6QE1V5T4F5S;W5R8V51=6]T
+M80!R<C(W,WA?23)#7TUO9'5L94EN:71I86QI>F4`<G(R-S-X7W-E=%]F86EL
+M7VQE9',`<G(R-S-X7T=E=$1E=FEC949R;VU0;V]L`')R,C<S>%]&<F5E4T%4
+M05-C<F%T8VA4;U!O;VP`<G(R-S-X7U)E;6]V941E=FEC90!R<C(W,WA?;79#
+M:&%N;F5L4W1A=&5-86-H:6YE`')R,C<S>%]335!297-P3&5N9W1H`')R,C<S
+M>%]3051!7U!-26YI=%)E<4-A;&QB86-K`')R,C<S>%]035])<W-U95=R:71E
+M4F5G`')R,C<S>%]'9710;W)T1G)O;5!O;VP`<G(R-S-X7T%S<VEG;E)E9VES
+M=&5R4V5T`')R,C<S>%]3051!7U!-4W1A=&5-86-H:6YE`')R,C<S>%]#;VUP
+M;&5T95)E<75E<W1!;F13;&]T`')R,C<S>%]$25-#7T=E=%1G=$1E=DUA<`!R
+M<C(W,WA?1G)E95-%4U-"5&]0;V]L`')R,C<S>%]&:6YD5&=T3F\`<G(R-S-X
+M7U-#4TE?36%K94-A8VAE0V]M;6%N9`!R<C(W,WA?;79?<F5S971?>&UT`')R
+M,C<S>%]486=?4F5L96%S94]N90!R<C(W,WA?0T]215])<W-U95--4%)E<75E
+M<W0`<G(R-S-X7V]D:6Y?:6]C=&P`<G(R-S-X7TU67UIE<F]-=E)E<75E<W0`
+M<G(R-S-X7T1)4T-?1&]$:7-C;W9E<@!R<C(W,WA?4T-325]!5$%?1FEL;$Q"
+M04-D8C$V`')R,C<S>%]'971335!38W)A=&-H1G)O;5!O;VP`<G(R-S-X7T9R
+M965335!38W)A=&-H5&]0;V]L`')R,C<S>%]&<F5E4F5G:7-T97)3970`<G(R
+M-S-X7T=E=$Y#451A9P!R<C(W,WA?4V5R=FEC94EN=&5R<G5P=`!R<C(W,WA?
+M1&5V:6-E7TUA:V5397-28W9$:6%G4F5Q=65S=`!R<C(W,WA?359?26YI=&EA
+M;&EZ951A<F=E=$E$5&%B;&4`<G(R-S-X7TU67T5Q=6%L<P!R<C(W,WA?4$U?
+M1G)E95)E9VES=&5R4V5T`')R,C<S>%]3051!7U!-7TAA;F1L941E=FEC955N
+M<&QU9P!R<C(W,WA?4$U?0V]R95]297%4:6UE;W5T`')R,C<S>%]5<&1A=&57
+M:61E4&]R=%!H>4UA<`!R<C(W,WA?;V1I;E]S971?<W!I;E]U<%]M;V1E`')R
+M,C<S>%]$979I8V5?5W)I=&5397-#;VYT<F]L1&EA9P!R<C(W,WA?4W1O<F5?
+M0V]N9FEG4F]U=&5);F9O`')R,C<S>%]697)I9GE#;VUM86YD0F5F;W)E4V5N
+M9&EN9P!R<C(W,WA?1&5T96-T4&]R=%1Y<&4`<G(R-S-X7TU67T1U;7!297%U
+M97-T`')R,C<S>%]3051!7TAA;F1L941E=FEC955N<&QU9P!R<C(W,WA?4T=0
+M24]?4F5A9%)E9VES=&5R`')R,C<S>%]3051!7U!O<G1$979I8V5296%D>0!R
+M<C(W,WA?4&]S=$UA:V5397-%;&5M96YT4W1A='5S4F5Q=65S=`!R<C(W,WA?
+M0V]R95]-;V1U;&53:'5T9&]W;@!R<C(W,WA?0V]R95]);G1E<FYA;%-E;F12
+M97%U97-T`')R,C<S>%]30U-)7T%405]697)I9GE4<F%N<VQA=&EO;@!R<C(W
+M,WA?4T%37TEN=&5R;F%L4F5Q0V%L;&)A8VL`<G(R-S-X7T%S<VEG;D5L96UE
+M;G13;&]T3G5M8F5R`')R,C<S>%]305-?4&]R=%)E<V5T`')R,C<S>%]315-?
+M4V5T1F%I;$QE9`!R<C(W,WA?4U-47U-025]#340`<G(R-S-X7VUV7V1I<V%B
+M;&5?>&UT`')R,C<S>%]3051!7TAA;F1L941E=FEC95!L=6=I;@!R<C(W,WA?
+M4&]R=%]&:6YD5&=T3F\`<G(R-S-X7TU67T1U;7!296=I<W1E<@!R<C(W,WA?
+M;79?96YA8FQE7WAM=`!R<C(W,WA?4T%405]034AO='!L=6=297%#86QL8F%C
+M:P!R<C(W,WA?4G5N=&EM94ES<W5E4V]F=%)E<V5T`')R,C<S>%]D=6UP7W5N
+M87-S;V-I871E9%]F:7,`<G(R-S-X7U!O<G1?2&%N9&QE56YP;'5G`')R,C<S
+M>%]335!?4T=024]?4V5T7T9A:6QL960`<G(R-S-X7U-'4$E/7TEN:71I86QI
+M>F4`<G(R-S-X7U!R97!A<F5!;F1396YD0V]M;6%N9`!R<C(W,WA?4T-325]!
+M5$%?4F5A9$-A<&%C:71Y5')A;G-L871I;VX`<G(R-S-X7VUV7W)E<V5T7W!H
+M>0!R<C(W,WA?0V%T96=O<GE?0T1"7U1Y<&4`<G(R-S-X7U-'5&%B;&5?26YI
+M=`!R<C(W,WA?359?1V5T36%P<&5D240`<G(R-S-X7U-#4TE?051!7U)E861#
+M87!A8VET>51R86YS;&%T:6]N0V%L;&)A8VL`<G(R-S-X7T9I;F12=6YN:6YG
+M4F5Q0GE486<`<G(R-S-X7U-44%]$979I8V5297-E=`!R<C(W,WA?1V5T0V]R
+M94-O;G1E>'1&<F]M4&]O;`!R<C(W,WA?0V]M<&QE=&5297%U97-T`')R,C<S
+M>%]486=?26YI=%]&249/`')R,C<S>%]0;W)T7U-O9G1297-E=$-A;&QB86-K
+M`')R,C<S>%]#;W)E7TUO9'5L95-T87)T`')R,C<S>%]5<&1A=&549W1$979-
+M87``<G(R-S-X7T9I;F1&<F5E4TU00V]N=&5X=`!R<C(W,WA?1V5T4$U&<F]M
+M4&]O;`!R<C(W,WA?;V1I;E]R96UO=F5?9&5V:6-E`')R,C<S>%]-5E]#4D,`
+M<G(R-S-X7U-!5$%?4&]R=$1E=&5C=`!R<C(W,WA?4G5N=&EM94ES<W5E4F5A
+M9$QO9T5X=`!R<C(W,WA?1FEN9$%S8VEI3G5M8F5R`')R,C<S>%]#;W)E7T=E
+M=%-U<'!O<G1E9$-O=6YT<P!R<C(W,WA?;V1I;E]S971?:61L95]S=&%N9&)Y
+M`')R,C<S>%]&<F5E4$U4;U!O;VP`<G(R-S-X7VUV7V1I<V%B;&5?:&)A`')R
+M,C<S>%]$25-#7T-H96-K1&ES8V]V97)3=&%T90!R<C(W,WA?4')E16UP='E$
+M979I8V4`<G(R-S-X7T9R965);G1E<FYA;%)E<51O4&]O;`!R<C(W,WA?4&]R
+M=%]-;VYI=&]R`')R,C<S>%]31U!)3U]3971?1F%I;&QE9`!R<C(W,WA?17AP
+M86YD97)?4TU04F5Q=65S=%]0:'E#;VYT<F]L`')R,C<S>%]0;W)T7TAA;F1L
+M95!L=6=I;@!R<C(W,WA?4T-325]4;U]&25,`<G(R-S-X7T-H96-K5&%R9V5T
+M0VAA;F=E`')R,C<S>%]'971315-30D9R;VU0;V]L`')R,C<S>%]!<W-I9VY$
+M979I8V5/=F5R86QL16QE;65N=$YU;6)E<@!R<C(W,WA?4T=024]?4TU04F5Q
+M=65S=%]7<FET90!R<C(W,WA?1V5T36EN3F5G;W1I871E9$QI;FM2871E`')R
+M,C<S>%]#;W)E7W!A<W-?=&AR=5]F:6QL7W1A<VMF:6QE`')R,C<S>%]"965P
+M3VX`<G(R-S-X7T-O<F53879E3W)I9VEN86Q#1$(`<G(R-S-X7U-!4U]%<G)O
+M<DAA;F1L:6YG`')R,C<S>%]/9&EN4U!)7TEN:70`<G(R-S-X7T9R965%>'!A
+M;F1E<E1O4&]O;`!R<C(W,WA?1$E30U]3971297-O=7)C90!R<C(W,WA?4T=4
+M86)L95]!<'!E;F0`<G(R-S-X7T1E=FEC95]-86ME4F5A9$-A<&%C:71Y5&%S
+M:U)E<75E<W0`<G(R-S-X7U-!5$%?1&5V:6-E4W1A=&5-86-H:6YE`')R,C<S
+M>%]5<&1A=&53=&%T=7-6<U-E<T-O;G1R;VQ"=69F97(`<G(R-S-X7TU67TUA
+M<%1A<F=E=$E$`')R,C<S>%]$979I8V5?36%K94UO9&5396QE8W1297%U97-T
+M`')R,C<S>%]30U-)7T%405]3>6YC0V%C:&54<F%N<VQA=&EO;@!R<C(W,WA?
+M17AP86YD97)?4TU04F5Q=65S=%]297!O<G1'96YE<F%L`')R,C<S>%]$979I
+M8V5?36%K95)E<75E<W1487-K4F5Q=65S=`!R<C(W,WA?1G)E941E=FEC951O
+M4&]O;`!R<C(W,WA?1V5T4T="=69F97)&<F]M4&]O;`!R<C(W,WA?57!D871E
+M5&%R9V5T1&5V:6-E<P!R<C(W,WA?5&%G7TES16UP='D`<G(R-S-X7U!-7T%S
+M<VEG;E)E9VES=&5R4V5T`')R,C<S>%]3051!7U!R97!A<F5#;VUM86YD5&%B
+M;&4`<G(R-S-X7U-!5$%?4&]R=$AA;F1L94EN=&5R<G5P=`!R<C(W,WA?4T=0
+M24]?4TU04F5Q=65S=%]296%D`')R,C<S>%]?7V-A;F-E;%]T:6UE<@!R<C(W
+M,WA?9&5V:6-E7W!R;V)E7V1O;F4`<G(R-S-X7T-O<F5?36%K941E=FEC95)E
+M<V5T4F5Q`')R,C<S>%]5<&1A=&50:'E);F9O`')R,C<S>%]-5E]296UO=F54
+M87)G971)1`!R<C(W,WA?1V5T4T%405-C<F%T8VA&<F]M4&]O;`!R<C(W,WA?
+M4T%405]0;W)T1&5V:6-E1&5T96-T960`<G(R-S-X7U)U;G1I;65)<W-U95-O
+M9G1297-E=$-A;&QB86-K`')R,C<S>%]0;W-T36%K95-E<T5N8VQO<W5R95-T
+M871U<U)E<75E<W0`<G(R-S-X7T)E97!/9F8`<G(R-S-X7T-O<F5?36]D=6QE
+M26YI=&EA;&EZ90!R<C(W,WA?5W)I=&5$14Q67U%?16YT<GD`<G(R-S-X7T1I
+M<V-O=F5R>5--`')R,C<S>%]3051!7U!R97!A<F5#;VUM86YD2&5A9&5R`')R
+M,C<S>%]$979I8V5?36%K95)E861#87!A8VET>3$V5&%S:U)E<75E<W0`<G(R
+M-S-X7T-O<F5?36]D=6QE4V5N9%)E<75E<W0`<G(R-S-X7U!O<G1?06)O<G12
+M97%U97-T<P!R<C(W,WA?0V]R95]-;V1U;&5%;F%B;&5$:7-A8FQE25)1`')R
+M,C<S>%]&:6QL16YC;&]S=7)E16QE;65N=%-T871U<P!R<C(W,WA?4&]S=$UA
+M:V5397-%;&5M96YT1&5S8W)I<'1O<E)E<75E<W0`<G(R-S-X7V-O<F5?:&%N
+M9&QE7W1A<VMF:6QE7V5R<F]R`')R,C<S>%]-5E]-87!4;U-P96-I9FEC5&%R
+M9V5T240`<G(R-S-X7TES<W5E7T-O;F9I9U)O=71E26YF;P!R<C(W,WA?3&ES
+M=%]'971&:7)S=`!R<C(W,WA?1V5T26YT97)N86Q297%&<F]M4&]O;`!R<C(W
+M,WA?1&5V:6-E7TES<W5E4V]F=%)E<V5T`')R,C<S>%]?7W)E;F5W7W1I;65R
+M`')R,C<S>%]'971/;F5#;VUM86YD4VQO=`!R<C(W,WA?27-S=65?4F5P;W)T
+M4F]U=&5);F9O`')R,C<S>%]305-?1&5V:6-E4W1A=&5-86-H:6YE`')R,C<S
+M>%])<W-U95]297!O<G1-86YU9F%C='5R97));F9O<FUA=&EO;@!R<C(W,WA?
+M4T-325]!5$%?1FEL;$Q"04-D8C$P`')R,C<S>%]I,F-?<F5S970`<G(R-S-X
+M7T-O<F5?1FEL;%-E;G-E1&%T80!R<C(W,WA?1G)E95-'0G5F9F5R5&]0;V]L
+M`')R,C<S>%]$979I8V5?36%K95-T87)T4W1O<%5N:71297%U97-T`')R,C<S
+M>%]#;W)E7U)E<51I;65O=70`<G(R-S-X7U!O<G1?2&%N9&QE1&5V:6-E4&QU
+M9VEN`')R,C<S>%]315-?26YT97)N86Q297%#86QL8F%C:P!R<C(W,WA?4T=0
+M24]?5W)I=&5296=I<W1E<@!R<C(W,WA?1V5T17AP86YD97)&<F]M4&]O;`!R
+M<C(W,WA?27-S=65?4F5P;W)T1V5N97)A;`!R<C(W,WA?7U]A9&1?=&EM97(`
+M<G(R-S-X7T-O<F5?4F5S971#;613;&]T`')R,C<S>%]30U-)7T%405]#:&5C
+M:T-O;F1I=&EO;@!R<C(W,WA?4T-325]!5$%?1FEL;$1A=&%&:65L9`!R<C(W
+M,WA?0V]R95)E<W1O<F5/<FEG:6YA;$-$0@!3=V%P2'!T365T858S`&QD;5]S
+M<&EN=7!?=F1E=@!R87=?8VAE8VM?9&ES:U]D97-C<FEP=&]R`&QD;5]C:&5C
+M:U]A<G)A>0!L9&U?<F5C:&5C:U]A;&P`=F1E=E]C;&%S<U]L:7-T`')A=U]I
+M9&QE7W1I;65R7W)E<V5T`&QD;5]D96QE=&5?<&%R=&ET:6]N`&QD;5]S>6YC
+M7V-H86YG961?87)R87ES`&=R96)U:6QD;VYE<G)O<@!L9&U?<75E=65?979E
+M;G0`=')A;G-F;W)M7VYE961E9`!L9&U?8VAE8VM?=')A;G-F;W)M`&QD;5]F
+M:7AU<%]A<G)A>5]S=&%T90!C86QC7W)E8G5I;&1?<')O9W)E<W,`=F)U<U]E
+M>'1?<VEZ90!S971?=')A;G-F;W)M7W-T97!?:6YF;P!L9&U?9FEN9%]V9&5V
+M7W)A=P!L9&U?<F5P<F]B95]D979I8V4`8V%L8U]T<F%N<V9O<FU?<')O9W)E
+M<W,`;&1M7V9I;F1?=F1E=E]C;&%S<P!L9&U?86QL;V-?<&%R=&ET:6]N`&QD
+M;5]I;FET7V1I<VL`<F5F<F5S:%]R87=?9&5V7VEN9F\`7V1E;&5T95]R87=?
+M<&%R=`!R87=?<F5A9%]W<FET95]S96-T;W)S`&=I9&QE<W1A;F1B>71I;65O
+M=70`<F%W7V-H96-K7V%R<F%Y7V1E<V-R:7!T;W(`;&1M7V-R96%T95]V9&5V
+M7W)A=P!U;G!L=6=?<F%W7W9D978`0VAE8VM3=6T`8V]M<&%R95]S;&]T7W-E
+M<5]B>5]P8VEA9&1R`&QD;5]A9&1?9&ES:U]T;U]A<G)A>0!L9&U?<WEN8U]D
+M:7-K7VEN9F\`9V5T7V)I=',`4W=A<$AP=$UE=&%6-`!R87=?8V]N=F5R=%]S
+M<&%R95]T;U]L96=A8WD`9DYO=&EF>4=520!L9&U?9FQU<VA?86QL7W1A<F=E
+M=',`;&1M7W-T87)T7W)E8G5I;&0`;&1M7W-P:6YD;W=N7V%L;%]R87=D979S
+M`%]?;&1M7V9I;FES:%]C;60`241?5$]?5D1%5@!?7W9D979?<75E=65?8VUD
+M`')A=U]I9&QE7W1I;65R7V-H96-K`&=E=%]S=')I<%]I;F9O`&AP=#(W>'A?
+M;&1M7W)E9VES=&5R7VAI;5]27S9?-35?-S5?-#9?-C0`:'!T,C=X>%]G1VQO
+M8F%L3F-Q1FQA9P!H<'0R-WAX7V]S7W)E<75E<W1?=&EM97(`<W1R8W!Y`&AP
+M=#(W>'A?:6YI=%]M;V1U;&5?:F)O9`!H<'0R-WAX7V1M87!O;VQ?9V5T7W!A
+M9V4`:'!T,C=X>%]O<U]G971?<W1A;7``:'!T,C=X>%]L9&U?<W5S<&5N9`!H
+M<'0R-WAX7VQD;5]I9&QE`&AP=#(W>'A?;&1M7V=E=%]M96U?:6YF;P!H<'0R
+M-WAX7VQD;5]R96UO=F5?=&EM97(`:'!T,C=X>%]P8VEC9F=?<F5A9%]D=V]R
+M9`!H<'0R-WAX7V1M87!O;VQ?;6%K95]O<F1E<@!H<'0R-WAX7VQD;5]G971?
+M=F)U<U]E>'0`:'!T,C=X>%]L9&U?<F5L96%S95]V9&5V`&AP=#(W>'A?9G)E
+M96QI<W1?<F5S97)V95]D;6$`:'!T,C=X>%]L9&U?:6YT<@!M96UC<'D`:'!T
+M,C=X>%]L9&U?;VY?=&EM97(`:'!T,C=X>%]L9&U?9V5T7V-M9%]S:7IE`&AP
+M=#(W>'A?;&1M7V9R965?8VUD<P!H<'0R-WAX7VQD;5]C<F5A=&5?=F1E=@!H
+M<'0R-WAX7VQD;5]A9&1?<W!A<F5?=&]?87)R87D`:'!T,C=X>%]G<F5B=6EL
+M9'!R:6]R:71Y`&AP=#(W>'A?;&1M7W-Y;F-?87)R87E?:6YF;P!H<'0R-WAX
+M7V]S7VUA<%]P8VE?8F%R`&AP=#(W>'A?7U]L9&U?86QL;V-?8VUD`&AP=#(W
+M>'A?:6YI=%]M;V1U;&5?=F1E=E]R87<`:'!T,C=X>%]L9&U?<V5T7V%U=&]R
+M96)U:6QD`&AP=#(W>'A?:6YI=%]M;V1U;&5?:&EM7W)R,C<S>`!H<'0R-WAX
+M7U]?9'5M;7E?<F5G`&AP=#(W>'A?9&UA<&]O;%]A8W1I=F4`:'!T,C=X>%]V
+M8G5S7VQI<W0`:'!T,C=X>%]L9&U?<75E=65?=F)U<U]D<&,`:'!T,C=X>%]L
+M9&U?<F5S971?=F)U<P!H<'0R-WAX7VEN:71?;6]D=6QE7W)A:60U`&AP=#(W
+M>'A?9U-'4$E/4&%R=%-U<'!O<G0`7U]U;6]D9&DS`&AP=#(W>'A?;&1M7W)E
+M;&5A<V5?;&]C:P!H<'0R-WAX7V]S7W5N;6%P7W!C:5]B87(`:'!T,C=X>%]L
+M9&U?<VAU=&1O=VX`7U]U9&EV9&DS`&AP=#(W>'A?:&EM7VQI<W0`:'!T,C=X
+M>%]L9&U?<F5Q=65S=%]T:6UE<@!H<'0R-WAX7VQD;5]R97-U;64`:'!T,C=X
+M>%]I;FET7VUO9'5L95]R86ED,0!H<'0R-WAX7VQD;5]G971?9&5V:6-E7VED
+M`&AP=#(W>'A?;W-?<V-H961U;&5?=&%S:P!H<'0R-WAX7VQD;5]I;V-T;`!H
+M<'0R-WAX7V=3<&EN=7!/;F5$979%86-H5&EM90!H<'0R-WAX7V9R965L:7-T
+M7W!U=`!H<'0R-WAX7V]S7W-T86QL97AE8P!H<'0R-WAX7V=?;&5G86-Y7VUO
+M9&4`:'!T,C=X>%]L9&U?86QL;V-?8VUD<U]27S9?-35?-S5?-#9?-C0`:'!T
+M,C=X>%]L9&U?<G5N`&AP=#(W>'A?;&1M7V9R965?8VUD<U]T;U]L:7-T`&AP
+M=#(W>'A?:6YI=%]M;V1U;&5?<&%R=&ET:6]N`&AP=#(W>'A?;W-?;6%X7V-A
+M8VAE7W-I>F4`:'!T,C=X>%]V9&5V7W%U975E7V-M9`!H<'0R-WAX7VEN:71?
+M;6]D=6QE7VAI;5]R<C(W,C``:'!T,C=X>%]O<U]G971?=F)U<U]S97$`:'!T
+M,C=X>%]L9&U?<WEN8U]A<G)A>5]S=&%M<`!H<'0R-WAX7VQD;5]Q=65U95]C
+M;60`:'!T,C=X>%]O<U]P<FEN=&L`:'!T,C=X>%]F<F5E;&ES=%]R97-E<G9E
+M`&AP=#(W>'A?9&UA<&]O;%]P=71?<&%G90!H<'0R-WAX7V9R965L:7-T7V=E
+M=`!H<'0R-WAX7VQD;5]U;G)E9VES=&5R7V1E=FEC90!H<'0R-WAX7VQD;5]R
+M96=I<W1E<E]A9&%P=&5R`&AP=#(W>'A?9V%U=&]R96)U:6QD`&AP=#(W>'A?
+M;&1M7V=E=%]V8G5S7W-I>F4`:'!T,C=X>%]D96QA>5]B971W965N7W-P:6YU
+M<`!H<'0R-WAX7VQD;5]G96YE<FEC7VUE;6)E<E]F86EL960`:'!T,C=X>%]D
+M;6%P;V]L7V=E=%]P86=E7V%T`&AP=#(W>'A?;&1M7V5V96YT7VYO=&EF>0!H
+M<'0R-WAX7VQD;5]C<F5A=&5?=F)U<P!H<'0R-WAX7VAI;5]H86YD;&5?=&]?
+M=F)U<P!H<'0R-WAX7V9R965L:7-T7V=E=%]D;6$`:'!T,C=X>%]L9&U?9V5T
+M7VYE>'1?=F)U<P!H<'0R-WAX7V]S7W!C:5]W<FET96P`:'!T,C=X>%]L9&U?
+M9FEN9%]T87)G970`:'!T,C=X>%]D;6%P;V]L7W)E9VES=&5R7V-L:65N=`!H
+M<'0R-WAX7VQD;5]I;FET:6%L:7IE7W9B=7-?87-Y;F,`:'!T,C=X>%]O<U]Q
+M=65R>5]T:6UE`&AP=#(W>'A?;W-?<75E<GE?<F5M;W9E7V1E=FEC90!H<'0R
+M-WAX7VQD;5]R96=I<W1E<E]D979I8V4`:'!T,C=X>%]I;FET7VUO9'5L95]R
+M86ED,`!H<'0R-WAX7V]S7W!C:5]R96%D;`!H<'0R-WAX7VQD;5]A8W%U:7)E
+M7VQO8VL`:'!T,C=X>%]O<U]R979A;&ED871E7V1E=FEC90!H<'0R-WAX7V1M
+M87!O;VQ?:6YI=`!H<'0R-WAX7VQD;5]F:6YI<VA?8VUD`&AP=#(W>'A?:6YI
+M=%]M;V1U;&5?:&EM7W)R,C<V>`!H<'0R-WAX7VQD;5]I9&5?9FEX<W1R:6YG
+M`&AP=#(W>'A?9&UA<&]O;%]M87A?8VQA<W-?<&%G97,`:'!T,C=X>%]L9&U?
+M<F5G:7-T97)?=F1E=E]C;&%S<U]27S9?-35?-S5?-#9?-C0`:'!T,C=X>%]N
+M=6U?9')I=F5S7W!E<E]S<&EN=7``:'!T,C=X>%]L9&U?<F5L96%S95]V8G5S
+M`&AP=#(W>'A?;&1M7W%U975E7W1A<VL`:'!T,C=X>%]L9&U?86QL;V-?8VUD
+M<U]F<F]M7VQI<W0`:'!T,C=X>%]F<F5E;&ES=%]P=71?9&UA`&AP=#(W>'A?
+M;&1M7W1I;65R7W!R;V)E7V1E=FEC90!H<'0R-WAX7VQD;5]F:6YD7W-T86UP
+M`&AP=#(W>'A?:6YI=%]M;V1U;&5?:&EM7W)R,C<X>`!H<'0R-WAX7VQD;5]C
+M:&5C:U]A<G)A>5]O;FQI;F4`:'!T,C=X>%]G4')O8F5);DEN:71I86QI>FEN
+M9P!H<'0R-WAX7VQO9U]S96-T;W)?<F5P86ER`(T````";```MP````+B``#4
+M`````IH``"`!```"Y```+0$```+-```'`P```EX$`&8$```"(@``K@<```$%
+M``"S!P```HP$`,`'```!!@``Q0<```*,!`#K!P```0<``!\(```!:P0`9P@`
+M``%K!`"@"````6L$`+`(```!:P0`X`@```%K!`#N"````6L$`!D)```!:P0`
+M*`D```%K!`!:"0```H`$`&X)```!:P0`?`D```%K!`#J"0```6L$`/@)```!
+M:P0`(`H```*`!``["@```6L$`$D*```!:P0`=0H```%K!`"$"@```6L$`+8*
+M```"@`0`R@H```%K!`#8"@```6L$`"`+```!:P0`,`L```%K!`!V"P```6L$
+M`-8+```!:P0`-0P```(6``!"#````H`$`$D,```"3@``;PP```%K!`"-#```
+M`6L$`*@,```!:P0`S`P```%K!``?#0```H`$`*\-```"@`0`9PX```)\``"`
+M#@```A@``*(.```"C00`Q0X```*-!`#O#@```HT$``P/```"C00`,@\```*-
+M!`!:#P```HT$`',/```"C00`D`\```*-!`"P#P```HT$`-,/```"C00`\P\`
+M``*-!``/$````HT$`"L0```"C00`1Q````*-!`!C$````HT$`'X0```"C00`
+MFQ````*-!`"S$````HT$`-00```"7`0`\A````)<!``=$0```EP$`#P1```"
+M7`0`6Q$```)<!`!Z$0```EP$`*01```"7`0`SA(```)\``!3$P```H\$`)$3
+M```"CP0`RQ,```*/!``.%````H\$`$(4```"CP0`6Q0```*/!`!V%````H\$
+M`-H4```"CP0`+14```*/!`!^%0```H\$`-05```"CP0`/!8```*/!`!U%@``
+M`H\$`*46```"40``MQ8```*/!`#H%@```F0``/<6```"CP0`)!<```)D```S
+M%P```H\$`&`7```"9```;Q<```*/!`"<%P```F0``*L7```"CP0`#A@```),
+M``#0&@```IH$`.X:```"F@0`#!L```*:!``J&P```IH$`$0;```"F@0`7AL`
+M``*:!`"8&P```K@``/$;```"F@0`+QP```*X``#A'````K@```P=```"EP0`
+M(QT```)$```U'0```LX``$$=```"@`0`=1T```(1`0#\'0```B```!0>```"
+M,@``VQX```)-``!2'P```F4``%$C```"%```P2,```*L``#\(P```DT``*<D
+M```!`P``M"0```*%``#@)````H4```@E```"A0``,"4```*%``!S)0```BP`
+M`,`E```"4P``*B<```)W``!:)P```H`$`/<I```"N@``#"H```+3``#0*@``
+M`C```&$K```""@$`?BL```(P``!%+0```@,!`&4M```"RP``SRT```(#`0`,
+M+@```LL``"DP```"H```9#````$#```6,0```EX$`#4Q```!`P``4#$```$#
+M``#5,0```A(``.(Q```"$@``D#(```(#`0#-,@```LL``#XS```"2@``>C,`
+M``*H``"7,P```DH``*PS```"9P``R3,```)*```1-````D4``&(T```"2@``
+M>30```)%``!S-0```JL``((U```"60``LS4```*X``#$-0```EP``#<V```!
+M`0``0C8```+D``!/-@```M$``+<V```!:P0`US8```+)``#C-@```EL```DW
+M```"R0``$3<```*P```K-P```0,``$$W```"V0``7S<```+9``!]-P```D0`
+M`)XW```"`@$`NC<```)C``#>-P```D0``/@W```"`@$`$#@```)$```D.```
+M`F,``#LX```"1```<3@```+.``!].````H`$`.8X```"G````3D```(U```C
+M.0```LP``#8Y```"F```3CD```$&``!3.0```HP$`&8Y```"EP0`>3D```*7
+M!`"-.0```C,``+4Y```"N```^#D```(&`0!T.@```G@``)(Z```"Q@``N#H`
+M``(@``#?.@```O@``.<Z```"(```+3L```+&``!I.P```@(!`)0[```"N```
+MPCL```*7!`#8.P```D0``/D[```"S@``!3P```*`!``_/````D(``(4\```!
+M!0``BCP```*,!`"6/````D0``/D\```"S@``!3T```*`!`!+/0```IP``&@]
+M```"-0``BST```+,``">/0```I@``+,]```!!@``N#T```*,!`#+/0```I<$
+M`-X]```"EP0`\CT```(S```#/@```D0``!$^```"(```?3X```(/``";/@``
+M`L8``,$^```"(```XCX```+X``#J/@```B````D_```"Q@``,S\```)$``!#
+M/P```F,``&$_```"N```C#\```*7!`"@/P```D0``+4_```"S@``P3\```*`
+M!`#H/P```J<```=````"Q@``04````*X``!?0````I<$`'1````"1```B4``
+M``+.``"50````H`$`+U````"S```T$````*8``#C0````I<$`/9````"EP0`
+M"D$```(S```G00```D0``#%!```"DP``1D$```%K!`"/00```FL``)E!```"
+MN0``TT$```(Q``#[00```K@``(]"```"D```CT,```+&``#`0P```GT``-Q#
+M```"L0``$T0```*O```[1````O0``%U$```"N```[T0```*0``#X10```GT`
+M`"U&```"D@``;T8```*X``"#1@```N$```Y'```"^```ID<```+X``"V1P``
+M`JH``-I'```"^```\D<```+&```;2````D```+%(```!:P0`VD@```*`!``#
+M20```6L$`!Q)```!:P0`B$D```*`!`#Z20```OT``"-*```"\0``-4H```)K
+M``!N2@```KD``*Y*```"(P``XDH```)K``"+2P```H`$`.=+```!:P0`#DP`
+M``*`!``U3````6L$`$Y,```!:P0`ITP```*X```T30```D0``&=-```"1```
+M>4T```)K``#%30```K@``.1-```"N```!DX```)7!``H3@```LX``#1.```"
+M@`0`XTX```);```23P```LP``"A/```"F```1$\```$&``!)3P```HP$`&!/
+M```"EP0`=T\```*7!`"83P```C,``+M/```"G@``\$\```*X```84````LX`
+M`"10```"@`0`:5````+,``!_4````I@``)I0```!!@``GU````*,!`"V4```
+M`I<$`,U0```"EP0`ZU````(S```-40```KD``(M1```!:P0`M5$```*`!`#<
+M40```6L$`/51```!:P0`J%(```&$``"]4@```OP``$93```"P0``;5,```*X
+M``#F4P```KP``!)4```"0@``0U0```(^``!;5````I<$`'54```"EP0`I50`
+M``*`!`"]5````6L$`-94```!:P0`]%0```)K``#\5````A`!`#E5```"_0``
+MAU4```*X``#J50```M(``/I5```"Q```'E8```*(``!I5@```6L$`(56```!
+M:P0`FE8```+G``"M5@```O\``,56```!:P0`TU8```%K!`#A5@```6L$`.]6
+M```!:P0`3%<```%K!`!K5P```6L$`'A7```"OP``K%<```%K!`#'5P```6L$
+M`#A8```!:P0`5U@```%K!`"`6````E<$`*E8```"N```VE@```*7!`#P6```
+M`D0``!A9```";@``)%D```*`!`!.60```0$``&-9```">`0`@%D```%K!`"7
+M60```6L$`+%9```!:P0`TUD```%K!`#T60```6L$``M:```!:P0`6EH```%K
+M!`![6@```6L$`*!:```!:P0`MUH```%K!``/6P```6L$`"9;```!:P0`GUL`
+M``)7!`#36P```I<$`.9;```"1```^5L```+.```%7````H`$`"E<```!`0``
+M.UP```)X!`!B7````6L$`']<```!:P0`HEP```%K!`"^7````6L$`/E<```"
+M5P0`%5T```*X``!`70```I<$`&9=```!P0``>%T```)X!`"670```6L$`*]=
+M```!:P0`0EX```%K!`!F7@```6L$`)1>```!:P0`R%X```$%``#-7@```HP$
+M`!1?```";0``=E\```(Q``"`7P```G@``#!@```"?0``4V````+&``!Y8```
+M`K@```AA```"?0``(6$```+&``!G80```J\``(MA```";0``E&(```%K!`"Q
+M8@```6L$`,MB```!:P0`*&,```%K!`!%8P```6L$`+EC```"L0``#F0```%K
+M!``P9````6L$`&)D```!:P0`F60```)M``"N9````I4``.=D```!`P``EF4`
+M``(]``#990```EX$`)EF```"7@0`^&8```)>!``D9P```6L$`%!G```!:P0`
+MBF<```%K!`!*:````EX$`,YI```"7@0`<FH```)>!`"&:@```0,``!)K```"
+M@`0`2&L```%K!`!Y:P```6L$`+QK```!:P0`5&P```%K!`#7;````O```.QL
+M```"\```MFT```)]``#,;0```L8``'AN```"J0``TF\```+)``#>;P```EL`
+M`$QP```"#@``O'````)]``#&<````JD``-QP```"Q@``.W$```*X``"S<0``
+M`GL``/5Q```"N```AW(```*X``"T<@```EL``,IR```"(```"7,```%K!``J
+M<P```I```*YS```"5P0`OG,```*3``#E<P```K@``'AT```"6P``I'0```+,
+M``"W=````I@``-1T```!!@``V70```*,!`#L=````I<$`/]T```"EP0`&G4`
+M``(S``!(=0```6L$`)]U```"50``KW4```*7``#E=0```E8``/=U```"_P``
+M'78```*[``!Q=@```6L$`)%V```!:P0`J'8```+_``#F=@```D0``/QV```"
+MS@``"'<```*`!``Z=P```LP``%1W```"EP0`:W<```*7!`"%=P```C,``)=W
+M```!:P0`[G<```*(```H>````I<$`(AX```"B```N7@```*`!`#1>````6L$
+M`.IX```!:P0`"'D```)K```0>0```A`!`#5Y```"T@``*GH```)>!`!(>@``
+M`6L$`'!Z```!:P0`JGH```%K!`#4>@```04``-EZ```"C`0`^GH```(O```R
+M>P```6L$`$I[```!:P0`8GL```%K!`!L>P```I4``(A[```!:P0`1GP```*6
+M``!??````C\``&Y\```"60``BGP```)7!`">?````3L``+!\```">`0`W7P`
+M``)<``#Z?````FP```U]```"60``3GT```'>``!P?0```N0``()]```"S0``
+MC'T```+1``#[?0```AX``,)^```"`0$`^7X```(!`0`U?P```@\!`,:````"
+MC@``"H$```*/```]@0```@\!`)V"```"7@0`)(,```*#``!@@P```H,``*^#
+M```"@```Q8,```(Y``#T@P```@\!`#R$```"7@0`1X0```(:``#'A0```J$`
+M`-R%```")```\84```+K```&A@```I8``!V&```"5P0`,88```$[``!(A@``
+M`G@$`'&&```"N```ZH8```(^```QAP```K@``&"'```"#P$`AH<```(&`0"H
+MAP```KP``+>'```"0@``UX<```(_``#IAP```ED``!^(```"#P$`2H@```)<
+M``!GB````FP``'J(```"60``NH@```%/``#?B````N0``/&(```"S0``^X@`
+M``+1``!(B0```EP``%Z)```";```<XD```)9``"?B0```EX$`-:)```!3P``
+M^8D```+D```/B@```LT``!F*```"T0``MXL```(I```+C````BD``$&,```"
+M)@``-XT```(_``!&C0```ED``'6-```"7@0`OXT```(_``#.C0```ED``/:-
+M```"7```$XX```)L```FC@```ED``'&.```!@0``P(X```+D``#2C@```LT`
+M`-R.```"T0``!H\```)<```<CP```FP``"^/```"60``5(\```)>!`"2CP``
+M`8$``.&/```"Y```\X\```+-``#]CP```M$``(.0```!:P0`)90```+9``!#
+ME````C0``*>4```"N```D)4```+X``"AF````2\``+.8```">`0`29D```$`
+M`0!AF0```G@$`*B9```"5P0`U9D```)7!`!0F@```K@``&.:```"]```?9H`
+M``$O``"/F@```G@$`!";```"N```(YL```(Q```_FP```0`!`%>;```">`0`
+MOYL```+"```'G````GT``"Z<```">```.YP```(Q``#1G````K@``.&=```"
+M?0``*IX```)]``!3G@```@\``+.>```"+```TIX```)0```ZGP```MP``-R?
+M```"?0``*Z````(L``!*H````E```+:@```"6@``-Z$```(\``".H0```BP`
+M`*VA```"4```WJ(```(L``#]H@```E```.^C```"N```^:,```*S```!I```
+M`N$``$:D```"=@``?:0```*X``#7I````K@``#"E```"N```DZ4```*X``#Q
+MI0```K@``(VG```"N```TJ<```*K``#HIP```ED``!^H```"`@$`6*@```)"
+M``!VJ````M\``)VH```"N```[Z@```*\```'J0```JL``!FI```"60``-JD`
+M``)<``!(J0```IL``)6I```!^P``H*D```+D``"JJ0```M$``,NI```"7```
+MW:D```*;```OJ@```?L``#JJ```"Y```1*H```+1``!PJ@```EP``(:J```"
+MFP``X:H```'[``#LJ@```N0``/:J```"T0```JL```*`!``OJP```EP``$VK
+M```"FP``8*L```)9``"ZJP```?L``,6K```"Y```SZL```+1``#.K````ED`
+M`%*M```"-```8JT```)9``"HK0```EP``%*N```!`0``7:X```+D``!GK@``
+M`M$``*JN```"7```S:X```)L``#KK@```ED``#*O```!\P``/:\```+D``!+
+MKP```LT``%6O```"T0``=J\```)<``"9KP```FP``+>O```"60``!K````'S
+M```1L````N0``!^P```"S0``*;````+1``!2L````EP``'&P```";```B[``
+M``)9``#AL````?,``.^P```"Y````+$```+-```*L0```M$``#*Q```"7```
+M6+$```)L``!UL0```ED``-RQ```!\P``ZK$```+D``#WL0```LT```2R```"
+MT0``);(```)<``!6L@```H4``&>R```"60``>[(```'S``"%L@```M$``**R
+M```!`P``^K(```+W``!#LP```6L$`'"S```!:P0`D[,```%K!`##LP```6L$
+M``:T```"]P``.K0```%K!`!HM````6L$`(NT```!:P0`N+0```%K!`#VM0``
+M`LD``"2W```"/P``6[@```+1``"!N````G4``(ZX```"=@``H;@```+&```-
+MN0```@\``'BY```">```WKD```)]``#HN0```JD``/*Y```"^```%KH```)0
+M``#WN@```0<``#V[```"U```PKP```*`!`#,O````ED``-B\```"Y0``[;P`
+M``*`!`#WO````ED``!J]```"7```6+T```$7``!BO0```M$``'6]```"@`0`
+MB;T```*`!`!XO@```C\``(:^```"60``S+X```+E``#@O@```C\``.Z^```"
+M60``#[\```)<```EOP```FP``#B_```"60``@+\```$!``"+OP```N0``)J_
+M```"S0``I+\```+1``#)OP```EP```/````!\P``#<````+1```IP````EP`
+M`#O````";```5<````)9``"1P````?,``)O````"T0``Q,````)$``#PP```
+M`LX``/S````"@`0`)L$```*<``!$P0```C4``(+!```"S```F,$```*8``"S
+MP0```08``+C!```"C`0`S\$```*7!`#FP0```I<$`"G"```",P``2<(```*X
+M``"%P@```@8!`)W#```"'@``TL,```(.`0`IQ````@X!`)G$```"O@``U,0`
+M``*^```DQ0```KX``%W%```"O@``B\8```$!``#/Q@```D$``!O'```!`0``
+M7\<```)!```9R````0$``%S(```"00``*<D```$!``!<R0```D$``-')```!
+M`0```,H```)!``!QRP```@L!`.O+```"@@``-LP```*^```0S0```J(```?.
+M```"'@``+\X```(<``!&S@```AD``+S/```"#@$`C=$```*4```$T@```J(`
+M`(72```"O@``K-(```*^``!,TP```GH``,33```"O@``:-8```*^```8V```
+M`EX$`"K9```!:P0`.]D```%K!`#/V0```H`$`.;9```!:P0`^]D```%K!``S
+MV@```H`$`$K:```!:P0`8]H```%K!`"GV@```H`$`+[:```!:P0`T]H```%K
+M!``AVP```H`$`%G;```"50``;ML```(&`0"7VP```I<``,W;```"5@``^ML`
+M``*W```.W````H`$`$7<```",P``7=P```+7``"0W````H@``+3<```"5P0`
+MP-P```*3``#=W````K@```?=```"S```&MT```*8```PW0```I<$`$/=```"
+MEP0`6MT```(S``"!W0```K@``)3=```"EP``S=T```)"```9W@```K@``'7>
+M```"0@``Z-X```(>``!UWP```K@``)C?```".```V-\```(>``!VX````I<$
+M`*?@```"1```N>````+.``#%X````H`$`._@```"G```#.$```(U```UX0``
+M`LP``$CA```"F```7N$```*7!`!QX0```I<$`*#A```",P``$.(```(X```A
+MX@```HD``+GB```"'@``YN(```*7```NY````KP``%'D```"/@``>.0```(/
+M`0#>Y````K@``/_D```".```..4```(X``!MY0```C@``(#E```"'@``P>4`
+M``)7``#VY@```F(``"'G```"N```-N<```)$``!,YP```LX``%CG```"@`0`
+MBN<```+,``"=YP```I@``+?G```"EP0`SN<```*7!`#\YP```C,``"'H```"
+MG@``=>@```*&``"-Z````C@``+[H```".```[>@```(X``#[Z````E<``!+I
+M```"R@``0>D```)7``"`Z@```I<``(_K```"O```L>L```(^``#MZP```@8!
+M`!CL```".```..P```)'``"'[````B,``([L```!A```H^P```+\``"R[```
+M`K4``+SL```"(P``=^X```$%``!\[@```HP$``7O```"R@``X.\```)4``!#
+M\````80``%OP```"_```DO````$%``"7\````HP$`*GP```"!@$`VO````*7
+M```_\0```E0``%/Q```";P``A/$```(^```G\@```L0``#7R```"IP```O,`
+M``(&`0!;\P```K@``*'S```"O```QO,```)"``#J\P```CX``(OT```"Z0``
+M$/4```*X``"']0```ND``!?V```"EP0`-O8```*7!`!H]@```ND``-3V```"
+MEP0`*/<```*7!``(^````I\``!GX```"SP``+/@```)8```_^````E@``%#X
+M```"[@``8?@```*]``!R^````M8``(/X```"VP``L?@```*X``#_^````KP`
+M`"'Y```"0@``1?D```(^``"1^0```@\!`+7Y```"N```W/D```$&``#A^0``
+M`HP$`.SY```"#P$`$?H```(&`0`/^P```E8``!O[```"@`0`,/L```)6```\
+M^P```H`$`,[[```!:P0`Y/L```%K!``@_````H`$`$'\```"0@``6?P```*W
+M``!R_````K<``(;\```"@`0`JOP```%K!`#1_````6L$`.K\```!:P0`"?T`
+M``*`!``>_0```04``"/]```"C`0`1/T```$&``!)_0```HP$`/7]```"5```
+M/?X```*(``!@_@```K@``*3^```"O```R?X```)"``#M_@```CX``#'_```"
+MB```8/\```(&`0"%_P```K@``,__```"O```\?\```)"```5``$``CX``%P`
+M`0`"N```A0`!``(/`0"N``$``@8!`.P``0`!`P``1`$!``*(``!7`0$``6L$
+M`&P!`0`"I@``@`$!``*F``"4`0$``J8``*@!`0`"I@``Q`$!``*9``#@`0$`
+M`ID``/D!`0`"F0``$@(!``*9```U`@$``ID``$X"`0`"F0``8@(!``*F``!V
+M`@$``J8``(H"`0`"I@``K0(!``*9``#!`@$``J8```H#`0`"@`0`:0,!``%K
+M!`""`P$``6L$`)8#`0`"@`0`I@,!``)"``"[`P$``H`$`,<#`0`"I@``U`,!
+M``*`!`#H`P$``J8``/0#`0`"@`0`%P0!``*9```D!`$``H`$`#4$`0`"I@``
+M000!``*`!`!2!`$``J8``%X$`0`"@`0`;00!``)@``!\!`$``L4``)@$`0`"
+MF0``B@4!``(>``"I!0$``AX``!\&`0`"C0``00<!``*`!`#/!P$``H`$`.8'
+M`0`!:P0`]P<!``%K!`"/"`$``H`$`*,(`0`!:P0`M`@!``%K!``?"0$``H`$
+M`#,)`0`!:P0`1`D!``%K!`#)"0$``L````P*`0`"K0``.@H!``+J``!+"@$`
+M`L```(4*`0`!:P0`G`H!``%K!`#("@$``6L$`-\*`0`!:P0`,@L!``+=``!#
+M"P$``A,``+<+`0`"@`0`U@L!``%K!`#O"P$``6L$`+@,`0`!&P``XPP!``+H
+M```"#0$``L@``"$-`0`![P``+PT!``'O``"M#0$``6L$`,H-`0`!:P0`^PT!
+M``*`!``0#@$``6L$`$\.`0`!:P0`I@X!``%K!``%#P$``6L$`%T/`0`"@`0`
+M>`\!``%K!`"-#P$``6L$`,\/`0`"4@``V0\!``).```-$`$``H`$`'40`0`"
+M@`0`W1`!``*`!``B$0$``FX``"X1`0`"@`0`1!$!``%K!`!9$0$``6L$`+41
+M`0`"@`0`Q!$!``)K``#A$0$``A`!`.P1`0`!:P0``!(!``%K!``7$@$``6L$
+M`.02`0`!:P0`EA0!``(_``"I%`$``ED```X5`0`"/P``(14!``)9```V%0$`
+M`CX```46`0`"7@0`418!``$&``!6%@$``HP$`&\6`0`"/P``?Q8!``)9``"9
+M%@$``K@``/<6`0`"N```8Q<!``(^```!&`$``H`$`(T8`0`"@`0`Q!@!``*`
+M!`#F&`$``C\``/88`0`"60``!!D!``)Q```1&@$``H`$`$@:`0`"@`0`:AH!
+M``(_``!Z&@$``ED``(@:`0`"<0``Q!H!``*`!``4&P$``H`$`&`;`0`"@`0`
+MF1L!``(_``"I&P$``ED``+8;`0`"/@``KQP!``(_``"^'`$``ED``$H=`0`"
+M0@``7QT!``*`!`"''0$``@(!`)T=`0`"0@``[!T!``$%``#Q'0$``HP$``H>
+M`0`"L@``SAX!``(_``#;'@$``ED``/,>`0`"/P```A\!``)9```,'P$``D(`
+M`/<?`0`"/P``!B`!``)9``!-(`$``04``%(@`0`"C`0`:B`!``(S``!X(`$`
+M`@8!`(\@`0`"@`0`F2`!``)9``"D(`$``E8``+D@`0`"@`0`PR`!``)9``#-
+M(`$``CH``/T@`0`"7```82$!``'^``!M(0$``0$``'HA`0`"T0``FR$!``)<
+M``"Y(0$``FP``-,A`0`"60``)"(!``$!```R(@$``N0``$0B`0`"S0``3B(!
+M``+1``#8)`$``G0```(E`0`"7```224!``$!``!6)0$``M$``'8E`0`"7```
+MO24!``$!``#*)0$``M$``.HE`0`"7```*B8!``$!```T)@$``M$``%(F`0`"
+M7```DB8!``$!``"<)@$``M$``+HF`0`"7````B<!``$!```,)P$``M$``"HG
+M`0`"7```:B<!``$!``!T)P$``M$``)(G`0`"7```TB<!``$!``#<)P$``M$`
+M``TH`0`"7```3R@!``%#``!;*`$``7X``&@H`0`"T0``F2@!``)<``#X*`$`
+M`4,```0I`0`!?@``$2D!``+1``!%*@$``ID``*0J`0`"/P``LBH!``)9``#(
+M*@$``H@``.0J`0`!`P``_"H!``%K!``^*P$``6L$`%XK`0`!:P0`HRL!``%K
+M!`"^*P$``6L$``4L`0`!:P0`-2P!``%K!`!S+`$``H`$`)\L`0`"H`0`PRP!
+M``%K!`#B+`$``6L$`/$L`0`"H`0`92T!``*X``#$+0$``LP``-LM`0`"F```
+M]2T!``*7!``,+@$``I<$`#,N`0`",P``5RX!``%K!`!R+@$``6L$`,,N`0`"
+MN````2\!``*7``!&+P$``LX``%(O`0`"@`0`B"\!``%K!`"G+P$``6L$`#8P
+M`0`"/P``0S`!``)9``!1,`$``@8!`&\P`0`"/P``?C`!``)9``"(,`$``H@`
+M`+LQ`0`"/P``RC$!``)9``#D,0$``O$```<R`0`!`P``(S(!``%K!``^,@$`
+M`6L$`-@R`0`"NP``+C,!``)C``!,,P$``K@``'TS`0`"EP0`ES,!``)$``"M
+M,P$``LX``+DS`0`"@`0`ZC,!``(_``#W,P$``ED```LT`0`"IP``/S0!``*[
+M``"6-`$``F,``+0T`0`"N```Y30!``*7!`#_-`$``D0``!4U`0`"S@``(34!
+M``*`!`!2-0$``C\``%\U`0`"60``<S4!``*G``"8-0$``6L$`+,U`0`!:P0`
+M"38!``+.```5-@$``H`$`%`V`0`!:P0`;S8!``%K!`#(-@$``K@```8W`0`"
+MEP``AC<!``%K!`">-P$``6L$`,<W`0`"/P``UC<!``)9``#C-P$``H@``"@X
+M`0`!:P0`8CD!``*`!`"]/P$``K@```9``0`"PP``(D`!``)>!``U0`$``C<`
+M`'U!`0`"<P``CT$!``+]``""0@$``H`$`%%#`0`!"0``64,!``$)``!A0P$`
+M`DL``(1#`0`!"0``C$,!``$)``"40P$``DL``+9#`0`"<P``W$,!``$)``#C
+M0P$``0D``.M#`0`"2P``,T0!``*1``#11`$``6L$`!-%`0`!:P0`*44!``(=
+M```Y10$``AT``$E%`0`"'0``644!``(=``!I10$``AT``'E%`0`"'0``B44!
+M``(=``"610$``AT``/]%`0`"'0``@D8!``*K``"21@$``ED``,I&`0`"7```
+MW$8!``*;```Z1P$``2<``$5'`0`"Y```3T<!``+1``"*1P$``EP``*)'`0`"
+MFP``L$@!``$G``"^2`$``N0``,M(`0`"T0``#4D!``+Y```A20$``LX``"U)
+M`0`"@`0`6DD!``**``!M20$``LX``'E)`0`"@`0`E$D!``+Y``"I20$``LX`
+M`+5)`0`"@`0`_DD!``**``#82P$``JP```I,`0`!`P``44T!``*D``!M30$`
+M`J,``*9.`0`"X```&T\!``+@```O3P$``EX$`&!/`0`"BP``<T\!``':``"I
+M3P$``J0``,5/`0`"HP``4E`!``*+``!X4`$``HL``"I1`0`"T```.5$!``(-
+M`0!)40$``HP``)Q1`0`!`P``AU,!``%K!`">4P$``H`$`'54`0`!:P0`ZE0!
+M``*`!`#!50$``6L$`/)5`0`"*```.U@!``%K!`!I60$``4D``)]9`0`!:P0`
+M"5H!``'5```_6@$``6L$`*E:`0`!&P``WUH!``%K!`!U6P$``6$``*M;`0`!
+M:P0`.UP!``'5``!>7`$``1L``']<`0`!20``I5P!``%A``!G70$``M@``-]=
+M`0`!!P``[ET!``$'``#X70$``0<```)>`0`!!P``"UX!``$'```T7@$``5X`
+M`$9>`0`!7@``6UX!``%>``!V7@$``5X``*]>`0`!7@``_EX!``)8!``07P$`
+M`0<``"5?`0`!!P``+U\!``$'``!=7P$``5X``&E?`0`!!P``;U\!``%>``!U
+M7P$``0<``'M?`0`!7@``@5\!``$'``"'7P$``5X``(Y?`0`!7@``GU\!``%>
+M``"F7P$``5X``+1?`0`!7@``NU\!``%>``#(7P$``5X``,Y?`0`!7@``X5\!
+M``%>``#O7P$``0<```A@`0`!7@``#V`!``%>```=8`$``5X``"1@`0`!7@``
+M,6`!``%>```W8`$``5X``%5@`0`!!P``7V`!``$'``"M8`$``0D``+9@`0`!
+M"0``X&`!``$'``#X8`$``0<```]A`0`!!P``'V$!``$'``!$80$``5X``%9A
+M`0`!7@``=6$!``%>``"880$``5X``*QA`0`!7@``P&$!``%>```O8@$``0D`
+M`#=B`0`!"0``AV,!``)F!`"88P$``F8$`-]C`0`!!P``YV,!``$'``#Y8P$`
+M`0<```%D`0`!!P``"&0!``$'```.9`$``0<``!=D`0`!!P``)&0!``$'```J
+M9`$``0<``%9D`0`"I`0`>&0!``*<!`"J9`$``BL``+AD`0`"*P``WV0!``+.
+M````90$``E<$`!1E`0`!7P``)F4!``)X!`!%90$``ID$`&ME`0`""`$`<V4!
+M``((`0![90$``A```)1E`0`"$```J64!``(,`0"U90$``H`$`+UE`0`"QP``
+MQ64!``(V``#990$``5\``/%E`0`">`0`_&4!``(&`0`'9@$``@8!`(=F`0`"
+M2P``FV8!``*`!`"F9@$``NT``-UF`0`!!@``XF8!``*,!`!D9P$``04``*YG
+M`0`!!0``TV<!``$%``#O9P$``48``/AG`0`"4`0`$6@!``$&``#D:`$``04`
+M`.EH`0`"C`0`$VD!``)7!``D:0$``0$``#9I`0`">`0`]FH!``(U```>:P$`
+M`IP``%%K`0`"N```O6L!``*X```2;`$``I<$`)5L`0`"N```]&P!``*7!`#B
+M;0$``FH``/YM`0`"F```46\!``*\``"7;P$``K@``-AO`0`"0@``*7`!``)N
+M``!/<`$``CX``'YP`0`"N```V7`!``+I``!^<0$``D0``+!Q`0`"O```W7$!
+M``)"```2<@$``CX``)]R`0`"/P``KG(!``)9```<<P$``EP``-%T`0`"7@0`
+M"W8!``$!``!Q=@$``F8``'QV`0`"Y```C78!``+-``"L=@$``FP``/]V`0`"
+M7@0`5W<!``)>!`!V=P$``N0``(EW`0`"S0``GW<!``+1``"Q=P$``ED``"MX
+M`0`"7```17@!``)L``!:>`$``ED``(%X`0`"EP0`FG@!``)$``#<>`$``EX$
+M`.9Y`0`"9@``(WH!``$!```Q>@$``N0``$=Z`0`"S0``6'H!``+1``"2>@$`
+M`D0``*QZ`0`"@`0`M'H!``+.```,>P$``EX$`")[`0`"/P``+WL!``)9``!*
+M>P$``I<$`'Y[`0`"$0``CGL!``(1``"H>P$``LX``&..`0`!G0``Q8\!``)<
+M```0D`$``0$``!J0`0`"T0``5I`!``)$``!PD`$``H`$`'B0`0`"S@``L)`!
+M``)9```$D0$``EP``(.1`0`!`0``D)$!``+1``#.D0$``D0``.B1`0`"@`0`
+M])$!``+.```[D@$``FP``+22`0`!`0``OY(!``+D``#5D@$``LT``.*2`0`"
+MT0``'9,!``)$```TDP$``H`$`$"3`0`"S@``=Y,!``(_``",DP$``ED``)B3
+M`0`"7```LI,!``(_``"JE`$``0$``+B4`0`"Y```SI0!``+-``#;E`$``M$`
+M`!:5`0`"1```+94!``*`!``YE0$``LX``'B5`0`"/P``B94!``)9``#%E0$`
+M`I<$`->5`0`"1```[94!``*`!`#UE0$``LX``"^6`0`"EP0`=98!``(U``"=
+ME@$``IP``+N6`0`"F```#9<!``)<``!NEP$``0$``'B7`0`"T0``MI<!``)$
+M``#0EP$``H`$`-B7`0`"S@``'I@!``)9``!.F`$``0,``&.8`0`":@``KI@!
+M``+C``#:F`$``B$``.Z8`0`"Y@``PID!``)(``#5F0$``D@``.J9`0`"2```
+M_9D!``)(```WF@$``G0$`%":`0`"=`0`:)H!``)T!`"ZF@$``GP``-N:`0`"
+M?P0`]YH!``)_!``:FP$``G\$`#:;`0`"?P0`6IL!``)_!`!VFP$``G\$`)J;
+M`0`"?P0`MIL!``)_!`#EFP$``G\$``*<`0`"?P0`+)P!``)_!`!(G`$``G\$
+M`&J<`0`"?P0`AIP!``)_!`"JG`$``G\$`,:<`0`"?P0`ZIP!``)_!``&G0$`
+M`G\$`"J=`0`"?P0`1IT!``)_!`!JG0$``G\$`(:=`0`"?P0`JIT!``)_!`#&
+MG0$``G\$`.J=`0`"?P0`!IX!``)_!``JG@$``G\$`$:>`0`"?P0`:IX!``)_
+M!`"&G@$``G\$`*J>`0`"?P0`QIX!``)_!`#JG@$``G\$``:?`0`"?P0`*I\!
+M``)_!`!&GP$``G\$`'.?`0`"L00`F)\!``*Q!`##GP$``K$$`.B?`0`"L00`
+M$Z`!``*Q!``XH`$``K$$`&.@`0`"L00`B*`!``*Q!`"SH`$``K$$`-B@`0`"
+ML00``Z$!``*Q!``HH0$``K$$`%.A`0`"L00`>*$!``*Q!`"3H0$``A```*&A
+M`0`"$```J:$!``(,`0"UH0$``H`$`+VA`0`"QP``Q:$!``(V``#0H0$``A$`
+M`-NA`0`"$0``[*$!``$'``#QH0$``DT$`(VB`0`""@(`MZ(!``(5`@#4H@$`
+M`@$"`""C`0`"B0$`+:,!``(%`@`'I0$``EX$`&:F`0`">P$`KJD!``$%``"S
+MJ0$``HP$`,"I`0`!!@``Q:D!``*,!`#KJ0$``0<``!^J`0`!:P0`9ZH!``%K
+M!`"@J@$``6L$`+"J`0`!:P0`X*H!``%K!`#NJ@$``6L$`!FK`0`!:P0`**L!
+M``%K!`!:JP$``H`$`&ZK`0`!:P0`?*L!``%K!`#JJP$``6L$`/BK`0`!:P0`
+M(*P!``*`!``[K`$``6L$`$FL`0`!:P0`=:P!``%K!`"$K`$``6L$`+:L`0`"
+M@`0`RJP!``%K!`#8K`$``6L$`""M`0`!:P0`,*T!``%K!`!VK0$``6L$`-:M
+M`0`!:P0`-:X!``*K`0!"K@$``H`$`$FN`0`"0@$`;ZX!``%K!`"-K@$``6L$
+M`*BN`0`!:P0`S*X!``%K!``?KP$``H`$`*^O`0`"@`0`9[`!``(D`0"`L`$`
+M`B$!`**P`0`"C00`Q;`!``*-!`#OL`$``HT$``RQ`0`"C00`,K$!``*-!`!:
+ML0$``HT$`'.Q`0`"C00`D+$!``*-!`"PL0$``HT$`-.Q`0`"C00`\[$!``*-
+M!``/L@$``HT$`"NR`0`"C00`1[(!``*-!`!CL@$``HT$`'ZR`0`"C00`F[(!
+M``*-!`"SL@$``HT$`-2R`0`"7`0`\K(!``)<!``=LP$``EP$`#RS`0`"7`0`
+M6[,!``)<!`!ZLP$``EP$`*2S`0`"7`0`SK0!``(D`0!3M0$``H\$`)&U`0`"
+MCP0`R[4!``*/!``.M@$``H\$`$*V`0`"CP0`6[8!``*/!`!VM@$``H\$`-JV
+M`0`"CP0`+;<!``*/!`!^MP$``H\$`-2W`0`"CP0`/+@!``*/!`!UN`$``H\$
+M`*6X`0`"?@$`M[@!``*/!`#HN`$``C4!`/>X`0`"CP0`)+D!``(U`0`SN0$`
+M`H\$`&"Y`0`"-0$`;[D!``*/!`"<N0$``C4!`*NY`0`"CP0`#KH!``*:`0#0
+MO`$``IH$`.Z\`0`"F@0`#+T!``*:!``JO0$``IH$`$2]`0`"F@0`7KT!``*:
+M!`"8O0$``M`!`/&]`0`"F@0`+[X!``+0`0#AO@$``M`!``R_`0`"EP0`([\!
+M``(8`0`UOP$``KX!`$&_`0`"@`0`=;\!``($`@#\OP$``HH!`!3``0`"G@$`
+MV\`!``*M`0!2P0$``FP!`%'%`0`"%@(`P<4!``(@`0#\Q0$``JT!`*?&`0`!
+M`P``M,8!``)B`0#@Q@$``F(!``C'`0`"8@$`,,<!``)B`0!SQP$``EH!`,#'
+M`0`":`$`*LD!``*2`0!:R0$``H`$`/?+`0`"?`$`#,P!``)S`0#0S`$``J4!
+M`&'-`0`"&P$`?LT!``*E`0!%SP$``DL!`&7/`0`";@$`S\\!``)+`0`,T`$`
+M`FX!`"G2`0`"I@$`9-(!``$#```6TP$``EX$`#73`0`!`P``4-,!``$#``#5
+MTP$``A4!`.+3`0`"%0$`D-0!``)+`0#-U`$``FX!`#[5`0`"NP$`>M4!``*I
+M`0"7U0$``KL!`*S5`0`"Q`$`R=4!``*[`0`1U@$``M,!`&+6`0`"NP$`>=8!
+M``+3`0!SUP$``HL!`(+7`0`"WP$`L]<!``+0`0#$UP$``ML!`#?8`0`!`0``
+M0M@!``*)`0!/V`$``L$!`+?8`0`!:P0`U]@!``)I`0#CV`$``L(!``G9`0`"
+M:0$`$=D!``(E`0`KV0$``0,``$'9`0`"<`$`7]D!``)P`0!]V0$``A@!`)[9
+M`0`"%`$`NMD!``*!`0#>V0$``A@!`/C9`0`"%`$`$-H!``(8`0`DV@$``H$!
+M`#O:`0`"&`$`<=H!``*^`0!]V@$``H`$`.;:`0`"M`$``=L!``(>`0`CVP$`
+M`H0!`#;;`0`"DP$`3ML!``$&``!3VP$``HP$`&;;`0`"EP0`>=L!``*7!`"-
+MVP$``D$!`+7;`0`"T`$`^-L!``(,`@!TW`$``CP!`)+<`0`",@$`N-P!``**
+M`0#?W`$``O4!`.?<`0`"B@$`+=T!``(R`0!IW0$``A0!`)3=`0`"T`$`PMT!
+M``*7!`#8W0$``A@!`/G=`0`"O@$`!=X!``*`!``_W@$``O`!`(7>`0`!!0``
+MBMX!``*,!`"6W@$``A@!`/G>`0`"O@$`!=\!``*`!`!+WP$``K0!`&C?`0`"
+M'@$`B]\!``*$`0">WP$``I,!`+/?`0`!!@``N-\!``*,!`#+WP$``I<$`-[?
+M`0`"EP0`\M\!``)!`0`#X`$``A@!`!'@`0`"B@$`?>`!``*O`0";X`$``C(!
+M`,'@`0`"B@$`XN`!``+U`0#JX`$``HH!``GA`0`",@$`,^$!``(8`0!#X0$`
+M`H$!`&'A`0`"T`$`C.$!``*7!`"@X0$``A@!`+7A`0`"O@$`P>$!``*`!`#H
+MX0$``H8!``?B`0`",@$`0>(!``+0`0!?X@$``I<$`'3B`0`"&`$`B>(!``*^
+M`0"5X@$``H`$`+WB`0`"A`$`T.(!``*3`0#CX@$``I<$`/;B`0`"EP0`"N,!
+M``)!`0`GXP$``A@!`#'C`0`"3`$`1N,!``%K!`"/XP$``DH!`)GC`0`"OP$`
+MT^,!``*?`0#[XP$``M`!`(_D`0`"E`$`C^4!``(R`0#`Y0$``CT!`-SE`0`"
+M'P$`$^8!``+B`0`[Y@$``M@!`%WF`0`"T`$`[^8!``*4`0#XYP$``CT!`"WH
+M`0`"E0$`;^@!``+0`0"#Z`$``HX!``[I`0`"]0$`IND!``+U`0"VZ0$``A(!
+M`-KI`0`"]0$`\ND!``(R`0`;Z@$``J(!`+'J`0`!:P0`VNH!``*`!``#ZP$`
+M`6L$`!SK`0`!:P0`B.L!``*`!`#ZZP$``DD!`"/L`0`"B`$`->P!``)*`0!N
+M[`$``K\!`*[L`0`"X0$`XNP!``)*`0"+[0$``H`$`.?M`0`!:P0`#NX!``*`
+M!``U[@$``6L$`$[N`0`!:P0`I^X!``+0`0`T[P$``A@!`&?O`0`"&`$`>>\!
+M``)*`0#%[P$``M`!`.3O`0`"T`$`!O`!``)7!``H\`$``KX!`#3P`0`"@`0`
+MX_`!``+"`0`2\0$``H0!`"CQ`0`"DP$`1/$!``$&``!)\0$``HP$`&#Q`0`"
+MEP0`=_$!``*7!`"8\0$``D$!`+OQ`0`"]P$`\/$!``+0`0`8\@$``KX!`"3R
+M`0`"@`0`:?(!``*$`0!_\@$``I,!`)KR`0`!!@``G_(!``*,!`"V\@$``I<$
+M`,WR`0`"EP0`Z_(!``)!`0`-\P$``K\!`(OS`0`!:P0`M?,!``*`!`#<\P$`
+M`6L$`/7S`0`!:P0`J/0!``&/`0"]]`$``M<!`$;U`0`"*`$`;?4!``+0`0#F
+M]0$``G\!`!+V`0`"\`$`0_8!``(J`0!;]@$``I<$`'7V`0`"EP0`I?8!``*`
+M!`"]]@$``6L$`-;V`0`!:P0`]/8!``)*`0#\]@$``EL!`#GW`0`"20$`A_<!
+M``+0`0#J]P$``LL!`/KW`0`"Y`$`'O@!``+O`0!I^`$``6L$`(7X`0`!:P0`
+MFO@!``()`@"M^`$``BT!`,7X`0`!:P0`T_@!``%K!`#A^`$``6L$`._X`0`!
+M:P0`3/D!``%K!`!K^0$``6L$`'CY`0`"-`$`K/D!``%K!`#'^0$``6L$`#CZ
+M`0`!:P0`5_H!``%K!`"`^@$``E<$`*GZ`0`"T`$`VOH!``*7!`#P^@$``A@!
+M`!C[`0`"<0$`)/L!``*`!`!.^P$``0$``&/[`0`">`0`@/L!``%K!`"7^P$`
+M`6L$`+'[`0`!:P0`T_L!``%K!`#T^P$``6L$``O\`0`!:P0`6OP!``%K!`![
+M_`$``6L$`*#\`0`!:P0`M_P!``%K!``/_0$``6L$`";]`0`!:P0`G_T!``)7
+M!`#3_0$``I<$`.;]`0`"&`$`^?T!``*^`0`%_@$``H`$`"G^`0`!`0``._X!
+M``)X!`!B_@$``6L$`'_^`0`!:P0`HOX!``%K!`"^_@$``6L$`/G^`0`"5P0`
+M%?\!``+0`0!`_P$``I<$`&;_`0`!*`$`>/\!``)X!`"6_P$``6L$`*__`0`!
+M:P0`0@`"``%K!`!F``(``6L$`)0``@`!:P0`R``"``$%``#-``(``HP$`!0!
+M`@`"Z0$`=@$"``*?`0"``0(``CP!`#`"`@`"/0$`4P("``(R`0!Y`@(``M`!
+M``@#`@`"/0$`(0,"``(R`0!G`P(``N(!`(L#`@`"Z0$`E`0"``%K!`"Q!`(`
+M`6L$`,L$`@`!:P0`*`4"``%K!`!%!0(``6L$`+D%`@`"'P$`#@8"``%K!``P
+M!@(``6L$`&(&`@`!:P0`F08"``+I`0"N!@(``FL!`.<&`@`!`P``E@<"``*L
+M`0#9!P(``EX$`)D(`@`"7@0`^`@"``)>!``D"0(``6L$`%`)`@`!:P0`B@D"
+M``%K!`!*"@(``EX$`,X+`@`"7@0`<@P"``)>!`"&#`(``0,``!(-`@`"@`0`
+M2`T"``%K!`!Y#0(``6L$`+P-`@`!:P0`5`X"``%K!`#7#@(``NT!`.P.`@`"
+M[0$`M@\"``(]`0#,#P(``C(!`'@0`@`"]`$`TA$"``)I`0#>$0(``L(!`$P2
+M`@`"SP$`O!("``(]`0#&$@(``O0!`-P2`@`",@$`.Q,"``+0`0"S$P(``J<!
+M`/43`@`"T`$`AQ0"``+0`0"T%`(``L(!`,H4`@`"B@$`"14"``%K!``J%0(`
+M`I0!`*X5`@`"5P0`OA4"``),`0#E%0(``M`!`'@6`@`"P@$`I!8"``*$`0"W
+M%@(``I,!`-06`@`!!@``V18"``*,!`#L%@(``I<$`/\6`@`"EP0`&A<"``)!
+M`0!(%P(``6L$`)\7`@`"$0(`KQ<"``)9`0#E%P(``BL!`/<7`@`"+0$`'1@"
+M``)M`0!Q&`(``6L$`)$8`@`!:P0`J!@"``(M`0#F&`(``A@!`/P8`@`"O@$`
+M"!D"``*`!``Z&0(``H0!`%09`@`"EP0`:QD"``*7!`"%&0(``D$!`)<9`@`!
+M:P0`[AD"``+O`0`H&@(``I<$`(@:`@`"[P$`N1H"``*`!`#1&@(``6L$`.H:
+M`@`!:P0`"!L"``)*`0`0&P(``EL!`#4;`@`"RP$`*AP"``)>!`!('`(``6L$
+M`'`<`@`!:P0`JAP"``%K!`#4'`(``04``-D<`@`"C`0`^AP"``)D`0`R'0(`
+M`6L$`$H=`@`!:P0`8AT"``%K!`!L'0(``FL!`(@=`@`!:P0`1AX"``)0`0!?
+M'@(``H4!`&X>`@`"WP$`BAX"``)7!`">'@(``3,!`+`>`@`">`0`W1X"``+;
+M`0#Z'@(``@H"``T?`@`"WP$`3A\"``'5`0!P'P(``HD!`((?`@`"!0(`C!\"
+M``+!`0#['P(``JX!`,(@`@`"S@$`^2`"``+.`0`U(0(``E<!`,8B`@`"/@$`
+M"B,"``*-`0`](P(``E<!`)TD`@`"7@0`)"4"``+K`0!@)0(``NL!`*\E`@`"
+MPP$`Q24"``(Q`0#T)0(``E<!`#PF`@`"7@0`1R8"``)?`0#')P(``I@!`-PG
+M`@`"]@$`\2<"``*=`0`&*`(``E`!`!TH`@`"5P0`,2@"``$S`0!(*`(``G@$
+M`'$H`@`"T`$`ZB@"``(J`0`Q*0(``M`!`&`I`@`"5P$`ABD"``(,`@"H*0(`
+M`G\!`+<I`@`"\`$`URD"``*%`0#I*0(``M\!`!\J`@`"5P$`2BH"``+;`0!G
+M*@(``@H"`'HJ`@`"WP$`NBH"``'F`0#?*@(``HD!`/$J`@`"!0(`^RH"``+!
+M`0!(*P(``ML!`%XK`@`""@(`<RL"``+?`0"?*P(``EX$`-8K`@`!Y@$`^2L"
+M``*)`0`/+`(``@4"`!DL`@`"P0$`MRT"``(4`@`++@(``A0"`$$N`@`"9P$`
+M-R\"``*%`0!&+P(``M\!`'4O`@`"7@0`OR\"``*%`0#.+P(``M\!`/8O`@`"
+MVP$`$S`"``(*`@`F,`(``M\!`'$P`@`!@P$`P#`"``*)`0#2,`(``@4"`-PP
+M`@`"P0$`!C$"``+;`0`<,0(``@H"`"\Q`@`"WP$`5#$"``)>!`"2,0(``8,!
+M`.$Q`@`"B0$`\S$"``(%`@#],0(``L$!`(,R`@`!:P0`)38"``)P`0!#-@(`
+M`IP!`*<V`@`"T`$`D#<"``+U`0"A.@(``60!`+,Z`@`">`0`23L"``%6`0!A
+M.P(``G@$`*@[`@`"5P0`U3L"``)7!`!0/`(``M`!`&,\`@`"V`$`?3P"``%D
+M`0"//`(``G@$`!`]`@`"T`$`(ST"``*?`0`_/0(``58!`%<]`@`">`0`OST"
+M``(:`0`'/@(``CT!`"X^`@`"/`$`.SX"``*?`0#1/@(``M`!`.$_`@`"/0$`
+M*D`"``(]`0!30`(``J\!`+-``@`"6@$`TD`"``*0`0`Z00(``MH!`-Q!`@`"
+M/0$`*T("``):`0!*0@(``I`!`+9"`@`"=0$`-T,"``+_`0".0P(``EH!`*U#
+M`@`"D`$`WD0"``):`0#]1`(``I`!`.]%`@`"T`$`^44"``*D`0`!1@(``HX!
+M`$9&`@`"70$`?48"``+0`0#71@(``M`!`#!'`@`"T`$`DT<"``+0`0#Q1P(`
+M`M`!`(U)`@`"T`$`TDD"``*+`0#H20(``M\!`!]*`@`"%`$`6$H"``+P`0!V
+M2@(``L<!`)U*`@`"T`$`[TH"``)_`0`'2P(``HL!`!E+`@`"WP$`-DL"``+;
+M`0!(2P(``IL!`)5+`@`!H0$`H$L"``*)`0"J2P(``L$!`,M+`@`"VP$`W4L"
+M``*;`0`O3`(``:$!`#I,`@`"B0$`1$P"``+!`0!P3`(``ML!`(9,`@`"FP$`
+MX4P"``&A`0#L3`(``HD!`/9,`@`"P0$``DT"``*`!``O30(``ML!`$U-`@`"
+MFP$`8$T"``+?`0"Z30(``:$!`,5-`@`"B0$`STT"``+!`0#.3@(``M\!`%)/
+M`@`"G`$`8D\"``+?`0"H3P(``ML!`%)0`@`!`0``75`"``*)`0!G4`(``L$!
+M`*I0`@`"VP$`S5`"``(*`@#K4`(``M\!`#)1`@`!80$`/5$"``*)`0!+40(`
+M`@4"`%51`@`"P0$`=E$"``+;`0"940(``@H"`+=1`@`"WP$`!E("``%A`0`1
+M4@(``HD!`!]2`@`"!0(`*5("``+!`0!24@(``ML!`'%2`@`""@(`BU("``+?
+M`0#A4@(``6$!`.]2`@`"B0$``%,"``(%`@`*4P(``L$!`#)3`@`"VP$`6%,"
+M``(*`@!U4P(``M\!`-Q3`@`!80$`ZE,"``*)`0#W4P(``@4"``14`@`"P0$`
+M)50"``+;`0!65`(``F(!`&=4`@`"WP$`>U0"``%A`0"%5`(``L$!`*)4`@`!
+M`P``^E0"``((`@!#50(``6L$`'!5`@`!:P0`DU4"``%K!`##50(``6L$``96
+M`@`""`(`.E8"``%K!`!H5@(``6L$`(M6`@`!:P0`N%8"``%K!`#V5P(``FD!
+M`"19`@`"A0$`6UH"``+!`0"!6@(``K,!`(Y:`@`"70$`H5H"``(R`0`-6P(`
+M`J\!`'A;`@`"/`$`WEL"``(]`0#H6P(``O0!`/);`@`"]0$`%EP"``*0`0#W
+M7`(``0<``#U=`@`"_0$`PEX"``*`!`#,7@(``M\!`-A>`@`"M0$`[5X"``*`
+M!`#W7@(``M\!`!I?`@`"VP$`6%\"``&Y`0!B7P(``L$!`'5?`@`"@`0`B5\"
+M``*`!`!X8`(``H4!`(9@`@`"WP$`S&`"``*U`0#@8`(``H4!`.Y@`@`"WP$`
+M#V$"``+;`0`E80(``@H"`#AA`@`"WP$`@&$"``$!``"+80(``HD!`)IA`@`"
+M!0(`I&$"``+!`0#)80(``ML!``-B`@`!80$`#6("``+!`0`I8@(``ML!`#MB
+M`@`""@(`56("``+?`0"18@(``6$!`)MB`@`"P0$`Q&("``(8`0#P8@(``KX!
+M`/QB`@`"@`0`)F,"``*T`0!$8P(``AX!`()C`@`"A`$`F&,"``*3`0"S8P(`
+M`08``+AC`@`"C`0`SV,"``*7!`#F8P(``I<$`"ED`@`"00$`260"``+0`0"%
+M9`(``@P"`)UE`@`"K@$`TF4"``+\`0`I9@(``OP!`)EF`@`"J`$`U&8"``*H
+M`0`D9P(``J@!`%UG`@`"J`$`BV@"``$!``#/:`(``A`"`!MI`@`!`0``7VD"
+M``(0`@`9:@(``0$``%QJ`@`"$`(`*6L"``$!``!<:P(``A`"`-%K`@`!`0``
+M`&P"``(0`@!Q;0(``J,!`.MM`@`"T0$`-FX"``*H`0`0;P(``NP!``=P`@`"
+MK@$`+W`"``(P`0!&<`(``KT!`+QQ`@`"_`$`C7,"``+6`0`$=`(``NP!`(5T
+M`@`"J`$`K'0"``*H`0!,=0(``AT!`,1U`@`"J`$`:'@"``*H`0`8>@(``EX$
+M`"I[`@`!:P0`.WL"``%K!`#/>P(``H`$`.9[`@`!:P0`^WL"``%K!``S?`(`
+M`H`$`$I\`@`!:P0`8WP"``%K!`"G?`(``H`$`+Y\`@`!:P0`TWP"``%K!``A
+M?0(``H`$`%E]`@`"$0(`;GT"``(,`@"7?0(``ED!`,U]`@`"*P$`^GT"``+S
+M`0`.?@(``H`$`$5^`@`"00$`77X"``*Z`0"0?@(``N\!`+1^`@`"5P0`P'X"
+M``),`0#=?@(``M`!``=_`@`"A`$`&G\"``*3`0`P?P(``I<$`$-_`@`"EP0`
+M6G\"``)!`0"!?P(``M`!`)1_`@`"60$`S7\"``+P`0`9@`(``M`!`'6``@`"
+M\`$`Z(`"``*N`0!U@0(``M`!`)B!`@`"^`$`V($"``*N`0!V@@(``I<$`*>"
+M`@`"&`$`N8("``*^`0#%@@(``H`$`.^"`@`"M`$`#(,"``(>`0`U@P(``H0!
+M`$B#`@`"DP$`7H,"``*7!`!Q@P(``I<$`*"#`@`"00$`$(0"``+X`0`AA`(`
+M`DX!`+F$`@`"K@$`YH0"``)9`0`NA@(``G\!`%&&`@`"*@$`>(8"``)7`0#>
+MA@(``M`!`/^&`@`"^`$`.(<"``+X`0!MAP(``O@!`("'`@`"K@$`P8<"``+Z
+M`0#VB`(``E(!`"&)`@`"T`$`-HD"``(8`0!,B0(``KX!`%B)`@`"@`0`BHD"
+M``*$`0"=B0(``I,!`+>)`@`"EP0`SHD"``*7!`#\B0(``D$!`"&*`@`"]P$`
+M=8H"``(-`@"-B@(``O@!`+Z*`@`"^`$`[8H"``+X`0#[B@(``OH!`!*+`@`"
+M>0$`08L"``+Z`0"`C`(``ED!`(^-`@`"?P$`L8T"``(J`0#MC0(``@P"`!B.
+M`@`"^`$`.(X"``+[`0"'C@(``N$!`(Z.`@`!CP$`HXX"``+7`0"RC@(``GT!
+M`+R.`@`"X0$`=Y`"``$%``!\D`(``HP$``61`@`">0$`X)$"``*X`0!#D@(`
+M`8\!`%N2`@`"UP$`DI("``$%``"7D@(``HP$`*F2`@`"#`(`VI("``)9`0`_
+MDP(``K@!`%.3`@`"=@$`A),"``(J`0`GE`(``N0!`#64`@`"A@$``I4"``(,
+M`@!;E0(``M`!`*&5`@`"?P$`QI4"``+P`0#JE0(``BH!`(N6`@`"4P$`$)<"
+M``+0`0"'EP(``E,!`!>8`@`"EP0`-I@"``*7!`!HF`(``E,!`-28`@`"EP0`
+M*)D"``*7!``(F@(``H(!`!F:`@`"P`$`+)H"``)(`0`_F@(``D@!`%":`@`"
+MQ@$`89H"``)F`0!RF@(``N4!`(.:`@`"-@$`L9H"``+0`0#_F@(``G\!`"&;
+M`@`"\`$`19L"``(J`0"1FP(``E<!`+6;`@`"T`$`W)L"``$&``#AFP(``HP$
+M`.R;`@`"5P$`$9P"``(,`@`/G0(``BL!`!N=`@`"@`0`,)T"``(K`0`\G0(`
+M`H`$`,Z=`@`!:P0`Y)T"``%K!``@G@(``H`$`$&>`@`"\`$`69X"``+S`0!R
+MG@(``O,!`(:>`@`"@`0`JIX"``%K!`#1G@(``6L$`.J>`@`!:P0`"9\"``*`
+M!``>GP(``04``".?`@`"C`0`1)\"``$&``!)GP(``HP$`/6?`@`"N`$`/:`"
+M``+O`0!@H`(``M`!`*2@`@`"?P$`R:`"``+P`0#MH`(``BH!`#&A`@`"[P$`
+M8*$"``(,`@"%H0(``M`!`,^A`@`"?P$`\:$"``+P`0`5H@(``BH!`%RB`@`"
+MT`$`A:("``)7`0"NH@(``@P"`.RB`@`!`P``1*,"``+O`0!7HP(``6L$`&RC
+M`@`"$P(`@*,"``(3`@"4HP(``A,"`*BC`@`"$P(`Q*,"``(W`0#@HP(``C<!
+M`/FC`@`"-P$`$J0"``(W`0`UI`(``C<!`$ZD`@`"-P$`8J0"``(3`@!VI`(`
+M`A,"`(JD`@`"$P(`K:0"``(W`0#!I`(``A,"``JE`@`"@`0`::4"``%K!`""
+MI0(``6L$`):E`@`"@`0`IJ4"``+P`0"[I0(``H`$`,>E`@`"$P(`U*4"``*`
+M!`#HI0(``A,"`/2E`@`"@`0`%Z8"``(W`0`DI@(``H`$`#6F`@`"$P(`0:8"
+M``*`!`!2I@(``A,"`%ZF`@`"@`0`;:8"``)J`0!\I@(``JH!`)BF`@`"-P$`
+MBJ<"``*N`0"IIP(``JX!`!^H`@`"=P$`0:D"``*`!`#/J0(``H`$`.:I`@`!
+M:P0`]ZD"``%K!`"/J@(``H`$`*.J`@`!:P0`M*H"``%K!``?JP(``H`$`#.K
+M`@`!:P0`1*L"``%K!`#)JP(``K(!``RL`@`"L0$`.JP"``+N`0!+K`(``K(!
+M`(6L`@`!:P0`G*P"``%K!`#(K`(``6L$`-^L`@`!:P0`,JT"``+4`0!#K0(`
+M`A8!`+>M`@`"@`0`UJT"``%K!`#OK0(``6L$`+BN`@`!(@$`XZX"``)X`0`"
+MKP(``KP!`"&O`@`!\@$`+Z\"``'R`0"MKP(``6L$`,JO`@`!:P0`^Z\"``*`
+M!``0L`(``6L$`$^P`@`!:P0`IK`"``%K!``%L0(``6L$`%VQ`@`"@`0`>+$"
+M``%K!`"-L0(``6L$`,^Q`@`"AP$`V;$"``)"`0`-L@(``H`$`'6R`@`"@`0`
+MW;("``*`!``BLP(``G$!`"ZS`@`"@`0`1+,"``%K!`!9LP(``6L$`+6S`@`"
+M@`0`Q+,"``)*`0#ALP(``EL!`.RS`@`!:P0``+0"``%K!``7M`(``6L$`.2T
+M`@`!:P0`EK8"``*%`0"IM@(``M\!``ZW`@`"A0$`(;<"``+?`0`VMP(``BH!
+M``6X`@`"7@0`4;@"``$&``!6N`(``HP$`&^X`@`"A0$`?[@"``+?`0"9N`(`
+M`M`!`/>X`@`"T`$`8[D"``(J`0`!N@(``H`$`(VZ`@`"@`0`Q+H"``*`!`#F
+MN@(``H4!`/:Z`@`"WP$`!+L"``+,`0`1O`(``H`$`$B\`@`"@`0`:KP"``*%
+M`0!ZO`(``M\!`(B\`@`"S`$`Q+P"``*`!``4O0(``H`$`&"]`@`"@`0`F;T"
+M``*%`0"IO0(``M\!`+:]`@`"*@$`K[X"``*%`0"^O@(``M\!`$J_`@`"\`$`
+M7[\"``*`!`"'OP(``A0!`)V_`@`"\`$`[+\"``$%``#QOP(``HP$``K``@`"
+M1`$`SL`"``*%`0#;P`(``M\!`//``@`"A0$``L$"``+?`0`,P0(``O`!`/?!
+M`@`"A0$`!L("``+?`0!-P@(``04``%+"`@`"C`0`:L("``)!`0!XP@(``@P"
+M`(_"`@`"@`0`F<("``+?`0"DP@(``BL!`+G"`@`"@`0`P\("``+?`0#-P@(`
+M`GH!`/W"`@`"VP$`8<,"``$9`0!MPP(``0$``'K#`@`"P0$`F\,"``+;`0"Y
+MPP(``@H"`-/#`@`"WP$`),0"``$!```RQ`(``HD!`$3$`@`"!0(`3L0"``+!
+M`0#8Q@(``D<!``+'`@`"VP$`2<<"``$!``!6QP(``L$!`';'`@`"VP$`O<<"
+M``$!``#*QP(``L$!`.K'`@`"VP$`*L@"``$!```TR`(``L$!`%+(`@`"VP$`
+MDL@"``$!``"<R`(``L$!`+K(`@`"VP$``LD"``$!```,R0(``L$!`"K)`@`"
+MVP$`:LD"``$!``!TR0(``L$!`)+)`@`"VP$`TLD"``$!``#<R0(``L$!``W*
+M`@`"VP$`3\H"``'2`0!;R@(``;8!`&C*`@`"P0$`F<H"``+;`0#XR@(``=(!
+M``3+`@`!M@$`$<L"``+!`0!%S`(``C<!`*3,`@`"A0$`LLP"``+?`0#(S`(`
+M`N\!`.3,`@`!`P``_,P"``%K!``^S0(``6L$`%[-`@`!:P0`H\T"``%K!`"^
+MS0(``6L$``7.`@`!:P0`-<X"``%K!`!SS@(``H`$`)_.`@`"H`0`P\X"``%K
+M!`#BS@(``6L$`/'.`@`"H`0`9<\"``+0`0#$SP(``H0!`-O/`@`"DP$`]<\"
+M``*7!``,T`(``I<$`#/0`@`"00$`5]`"``%K!`!RT`(``6L$`,/0`@`"T`$`
+M`=$"``)9`0!&T0(``KX!`%+1`@`"@`0`B-$"``%K!`"GT0(``6L$`#;2`@`"
+MA0$`0]("``+?`0!1T@(``@P"`&_2`@`"A0$`?M("``+?`0"(T@(``N\!`+O3
+M`@`"A0$`RM,"``+?`0#DTP(``H@!``?4`@`!`P``(]0"``%K!``^U`(``6L$
+M`-C4`@`";0$`+M4"``*!`0!,U0(``M`!`'W5`@`"EP0`E]4"``(8`0"MU0(`
+M`KX!`+G5`@`"@`0`ZM4"``*%`0#WU0(``M\!``O6`@`"A@$`/]8"``)M`0"6
+MU@(``H$!`+36`@`"T`$`Y=8"``*7!`#_U@(``A@!`!77`@`"O@$`(=<"``*`
+M!`!2UP(``H4!`%_7`@`"WP$`<]<"``*&`0"8UP(``6L$`+/7`@`!:P0`"=@"
+M``*^`0`5V`(``H`$`%#8`@`!:P0`;]@"``%K!`#(V`(``M`!``;9`@`"60$`
+MAMD"``%K!`">V0(``6L$`,?9`@`"A0$`UMD"``+?`0#CV0(``N\!`"C:`@`!
+M:P0`8ML"``*`!`"]X0(``M`!``;B`@`"MP$`(N("``)>!``UX@(``BX!`'WC
+M`@`"W`$`C^,"``))`0""Y`(``H`$`%'E`@`!"0``6>4"``$)``!AY0(``C\!
+M`(3E`@`!"0``C.4"``$)``"4Y0(``C\!`+GE`@`"W`$`Q.4"``))`0!GY@(`
+M`LT!``GG`@`!:P0`2^<"``%K!`!AYP(``D8!`''G`@`"1@$`@><"``)&`0"1
+MYP(``D8!`*'G`@`"1@$`L><"``)&`0#!YP(``D8!`,[G`@`"1@$`8^@"``)&
+M`0#FZ`(``HL!`/;H`@`"WP$`+ND"``+;`0!`Z0(``IL!`)[I`@`!C`$`J>D"
+M``*)`0"SZ0(``L$!`.[I`@`"VP$`!NH"``*;`0`4ZP(``8P!`"+K`@`"B0$`
+M+^L"``+!`0!QZP(``CD!`(7K`@`"O@$`D>L"``*`!`"^ZP(``@,"`-'K`@`"
+MO@$`W>L"``*`!`#XZP(``CD!``WL`@`"O@$`&>P"``*`!`!B[`(``@,"`#SN
+M`@`"(`$`;NX"``$#``"U[P(``C@!`-'O`@`"D0$`"O$"``)R`0!_\0(``G(!
+M`)/Q`@`"7@0`Q/$"``(F`0#7\0(``4,!``WR`@`".`$`*?("``*1`0"V\@(`
+M`B8!`-SR`@`")@$`CO,"``(O`0"=\P(``G0!`*WS`@`"'`$``/0"``$#``#K
+M]0(``6L$``+V`@`"@`0`V?8"``%K!`!.]P(``H`$`"7X`@`!:P0`5O@"``(G
+M`0"?^@(``6L$`,W[`@`!8P$``_P"``%K!`!M_`(``2P!`*/\`@`!:P0`#?T"
+M``$B`0!#_0(``6L$`-G]`@`!50$`#_X"``%K!`"?_@(``2P!`,+^`@`!(@$`
+MX_X"``%C`0`)_P(``54!`,O_`@`"R`$`=P`#``(_`0"+``,``H`$`)8``P`"
+M\0$`!`$#``%K!``5`0,``6L$`$@!`P`!:P0`<0$#``+G`0!]`0,``0D``(0!
+M`P`!"0``B@$#``$)``"<`0,``F4!`*@!`P`!"0``KP$#``$)``"U`0,``0D`
+M`-`!`P`!"0``UP$#``$)``#=`0,``0D``.,!`P`!40$`_0$#``$)```*`@,`
+M`0D``!`"`P`!"0``)@(#``$)```R`@,``0D``#\"`P`!"0``10(#``$)``!;
+M`@,``0D``'`"`P`!"0``@0(#``$)``"8`@,``0D``*P"`P`!"0``S`(#``%1
+M`0#=`@,``0D``/0"`P`!!P``&`,#``$)```W`P,``5$!`$@#`P`!"0``7@,#
+M``$)``!T`P,``0D``(L#`P`!"0``H`,#``$)``#``P,``5$!`-$#`P`!"0``
+MZ`,#``$'```,!`,``0D``"L$`P`!40$`/`0#``$)``!2!`,``0D``(`$`P`!
+M40$`FP0#``%1`0"E!`,``0<``-L$`P`!40$`+P4#``$'```^!0,``0<``$@%
+M`P`!!P``4@4#``$'``!;!0,``0<``(0%`P`!40$`E@4#``%1`0"K!0,``5$!
+M`,8%`P`!40$`_P4#``%1`0!7!@,``E@$`&D&`P`!!P``A08#``$'``"/!@,`
+M`0<``,(&`P`!40$`SP8#``$'``#5!@,``5$!`-L&`P`!!P``X08#``%1`0#G
+M!@,``0<``.T&`P`!40$`]`8#``%1`0`%!P,``5$!``P'`P`!40$`&@<#``%1
+M`0`A!P,``5$!`"X'`P`!40$`-`<#``%1`0!/!P,``5$!`%\'`P`!!P``>@<#
+M``%1`0"0!P,``5$!`)D'`P`!40$`K`<#``%1`0##!P,``5$!`.4'`P`!!P``
+M[P<#``$'```]"`,``0D``$8(`P`!"0``<`@#``$'``"("`,``0<``)\(`P`!
+M!P``KP@#``$'``#4"`,``5$!`.8(`P`!40$`!0D#``%1`0`H"0,``5$!`#P)
+M`P`!40$`4`D#``%1`0"_"0,``0D``,<)`P`!"0``%PL#``)F!``H"P,``F8$
+M`&\+`P`!!P``=PL#``$'``")"P,``0<``)$+`P`!!P``F`L#``$'``">"P,`
+M`0<``*<+`P`!!P``M`L#``$'``"Z"P,``0<``.8+`P`"I`0`"`P#``*<!``^
+M#`,``A,!`$P,`P`"$P$`<PP#``*^`0"4#`,``E<$`*@,`P`!5`$`N@P#``)X
+M!`#9#`,``ID$`/\,`P`"7@$`!PT#``)>`0`/#0,``N`!`"@-`P`"X`$`/0T#
+M``*``0!)#0,``H`$`%$-`P`"W0$`60T#``([`0!M#0,``50!`(4-`P`">`0`
+MD`T#``(,`@";#0,``@P"`!L.`P`"/P$`+PX#``*`!``Z#@,``O$!`'$.`P`!
+M!@``=@X#``*,!`#X#@,``04``$(/`P`!!0``9P\#``$%``"##P,``3H!`(P/
+M`P`"4`0`I0\#``$&``!X$`,``04``'T0`P`"C`0`IQ`#``)7!`"X$`,``0$`
+M`,H0`P`">`0`BA(#``(>`0"R$@,``K0!`.42`P`"T`$`41,#``+0`0"F$P,`
+M`I<$`"D4`P`"T`$`B!0#``*7!`!V%0,``E@!`)(5`P`"DP$`Y18#``)_`0`K
+M%P,``M`!`&P7`P`"\`$`O1<#``)Q`0#C%P,``BH!`!(8`P`"T`$`;1@#``)3
+M`0`2&0,``A@!`$09`P`"?P$`<1D#``+P`0"F&0,``BH!`#,:`P`"A0$`0AH#
+M``+?`0"P&@,``ML!`&4<`P`"7@0`GQT#``$!```%'@,``LH!`!`>`P`"B0$`
+M(1X#``(%`@!`'@,``@H"`),>`P`"7@0`ZQX#``)>!``*'P,``HD!`!T?`P`"
+M!0(`,Q\#``+!`0!%'P,``M\!`+\?`P`"VP$`V1\#``(*`@#N'P,``M\!`!4@
+M`P`"EP0`+B`#``(8`0!P(`,``EX$`'HA`P`"R@$`MR$#``$!``#%(0,``HD!
+M`-LA`P`"!0(`["$#``+!`0`F(@,``A@!`$`B`P`"@`0`2"(#``*^`0"@(@,`
+M`EX$`+8B`P`"A0$`PR(#``+?`0#>(@,``I<$`!(C`P`"``(`(B,#``(``@`\
+M(P,``KX!`#DW`P`"VP$`A#<#``$!``".-P,``L$!`,HW`P`"&`$`Y#<#``*`
+M!`#L-P,``KX!`"0X`P`"WP$`>#@#``+;`0#W.`,``0$```0Y`P`"P0$`0CD#
+M``(8`0!<.0,``H`$`&@Y`P`"O@$`KSD#``(*`@`H.@,``0$``#,Z`P`"B0$`
+M23H#``(%`@!6.@,``L$!`)$Z`P`"&`$`J#H#``*`!`"T.@,``KX!`.LZ`P`"
+MA0$``#L#``+?`0`,.P,``ML!`"8[`P`"A0$`'CP#``$!```L/`,``HD!`$(\
+M`P`"!0(`3SP#``+!`0"*/`,``A@!`*$\`P`"@`0`K3P#``*^`0#L/`,``H4!
+M`/T\`P`"WP$`.3T#``*7!`!+/0,``A@!`&$]`P`"@`0`:3T#``*^`0"C/0,`
+M`I<$`.D]`P`"'@$`$3X#``*T`0`O/@,``I,!`($^`P`"VP$`XCX#``$!``#L
+M/@,``L$!`"H_`P`"&`$`1#\#``*`!`!,/P,``KX!`)(_`P`"WP$`PC\#``$#
+M``#7/P,``E@!`")``P`"0`$`3D`#``)<`0!B0`,``N@!`#9!`P`"R0$`24$#
+M``+)`0!>00,``LD!`'%!`P`"R0$`JT$#``)T!`#$00,``G0$`-Q!`P`"=`0`
+M+D(#``(D`0!/0@,``G\$`&M"`P`"?P0`CD(#``)_!`"J0@,``G\$`,Y"`P`"
+M?P0`ZD(#``)_!``.0P,``G\$`"I#`P`"?P0`64,#``)_!`!V0P,``G\$`*!#
+M`P`"?P0`O$,#``)_!`#>0P,``G\$`/I#`P`"?P0`'D0#``)_!``Z1`,``G\$
+M`%Y$`P`"?P0`>D0#``)_!`">1`,``G\$`+I$`P`"?P0`WD0#``)_!`#Z1`,`
+M`G\$`!Y%`P`"?P0`.D4#``)_!`!>10,``G\$`'I%`P`"?P0`GD4#``)_!`"Z
+M10,``G\$`-Y%`P`"?P0`^D4#``)_!``>1@,``G\$`#I&`P`"?P0`7D8#``)_
+M!`!Z1@,``G\$`)Y&`P`"?P0`ND8#``)_!`#G1@,``K$$``Q'`P`"L00`-T<#
+M``*Q!`!<1P,``K$$`(='`P`"L00`K$<#``*Q!`#71P,``K$$`/Q'`P`"L00`
+M)T@#``*Q!`!,2`,``K$$`'=(`P`"L00`G$@#``*Q!`#'2`,``K$$`.Q(`P`"
+ML00`!TD#``+@`0`520,``N`!`!U)`P`"@`$`*4D#``*`!``Q20,``MT!`#E)
+M`P`".P$`1$D#``(``@!/20,``@`"`&!)`P`!!P``94D#``)-!``!2@,``LP"
+M`"M*`P`".0(`2$H#``([`@"42@,``G`"`*%*`P`":0(`>TP#``)>!`#:30,`
+M`J("`")1`P`!!0``)U$#``*,!``T40,``08``#E1`P`"C`0`7U$#``$'``"3
+M40,``6L$`-M1`P`!:P0`%%(#``%K!``D4@,``6L$`%12`P`!:P0`8E(#``%K
+M!`"-4@,``6L$`)Q2`P`!:P0`SE(#``*`!`#B4@,``6L$`/!2`P`!:P0`7E,#
+M``%K!`!L4P,``6L$`)13`P`"@`0`KU,#``%K!`"]4P,``6L$`.E3`P`!:P0`
+M^%,#``%K!``J5`,``H`$`#Y4`P`!:P0`3%0#``%K!`"45`,``6L$`*14`P`!
+M:P0`ZE0#``%K!`!*50,``6L$`*E5`P`"J0(`ME4#``*`!`"]50,``IP"`.-5
+M`P`!:P0``58#``%K!``<5@,``6L$`$!6`P`!:P0`DU8#``*`!``C5P,``H`$
+M`-M7`P`"(0(`]%<#``*Z`@`66`,``HT$`#E8`P`"C00`8U@#``*-!`"`6`,`
+M`HT$`*98`P`"C00`SE@#``*-!`#G6`,``HT$``19`P`"C00`)%D#``*-!`!'
+M60,``HT$`&=9`P`"C00`@UD#``*-!`"?60,``HT$`+M9`P`"C00`UUD#``*-
+M!`#R60,``HT$``]:`P`"C00`)UH#``*-!`!(6@,``EP$`&9:`P`"7`0`D5H#
+M``)<!`"P6@,``EP$`,]:`P`"7`0`[EH#``)<!``86P,``EP$`$)<`P`"(0(`
+MQUP#``*/!``%70,``H\$`#]=`P`"CP0`@ET#``*/!`"V70,``H\$`,]=`P`"
+MCP0`ZET#``*/!`!.7@,``H\$`*%>`P`"CP0`\EX#``*/!`!(7P,``H\$`+!?
+M`P`"CP0`Z5\#``*/!``98`,``G8"`"M@`P`"CP0`7&`#``*!`@!K8`,``H\$
+M`)A@`P`"@0(`IV`#``*/!`#48`,``H$"`.-@`P`"CP0`$&$#``*!`@`?80,`
+M`H\$`()A`P`"/0(`1&0#``*:!`!B9`,``IH$`(!D`P`"F@0`GF0#``*:!`"X
+M9`,``IH$`-)D`P`"F@0`#&4#``(:`P!E90,``IH$`*-E`P`"&@,`568#``(:
+M`P"`9@,``I<$`)=F`P`"[@(`J68#``+U`@"U9@,``H`$`.EF`P`"F0(`<&<#
+M``*+`@"(9P,``A<"`$]H`P`"@P(`QF@#``*=`@#%;`,``H<"`#5M`P`"O@(`
+M<&T#``*#`@`;;@,``0,``"AN`P`"]@(`5&X#``+V`@!\;@,``O8"`*1N`P`"
+M]@(`YVX#``*"`@`T;P,``K0"`)YP`P`"X`(`SG`#``*`!`!K<P,``MP"`(!S
+M`P`"?0(`1'0#``(U`@#5=`,``O<"`/)T`P`"-0(`N78#``(5`P#9=@,``A0#
+M`$-W`P`"%0,`@'<#``(4`P"=>0,``G@"`-AY`P`!`P``BGH#``)>!`"I>@,`
+M`0,``,1Z`P`!`P``27L#``(<`@!6>P,``AP"``1\`P`"%0,`07P#``(4`P"R
+M?`,``C\"`.Y\`P`".`(`"WT#``(_`@`@?0,``K`"`#U]`P`"/P(`A7T#``)1
+M`@#6?0,``C\"`.U]`P`"40(`YWX#``*Q`@#V?@,``I4"`"=_`P`"&@,`.'\#
+M``*2`@"K?P,``0$``+9_`P`"<`(`PW\#``+Y`@`K@`,``6L$`$N``P`"!0,`
+M5X`#``)@`@!]@`,``@4#`(6``P`"30(`GX`#``$#``"U@`,``H\"`-.``P`"
+MCP(`\8`#``+N`@`2@0,``L`"`"Z!`P`"K0(`4H$#``+N`@!L@0,``L`"`(2!
+M`P`"[@(`F($#``*M`@"O@0,``NX"`.6!`P`"]0(`\8$#``*`!`!:@@,``KD"
+M`'6"`P`"`0,`EX(#``((`P"J@@,``J0"`,*"`P`!!@``QX(#``*,!`#:@@,`
+M`I<$`.V"`P`"EP0``8,#``(V`@`I@P,``AH#`&R#`P`"J@(`Z(,#``)U`@`&
+MA`,``D$"`"R$`P`"BP(`4X0#``(9`P!;A`,``HL"`*&$`P`"00(`W80#``+`
+M`@`(A0,``AH#`#:%`P`"EP0`3(4#``+N`@!MA0,``O4"`'F%`P`"@`0`LX4#
+M``*U`@#YA0,``04``/Z%`P`"C`0`"H8#``+N`@!MA@,``O4"`'F&`P`"@`0`
+MOX8#``*Y`@#<A@,``@$#`/^&`P`""`,`$H<#``*D`@`GAP,``08``"R'`P`"
+MC`0`/X<#``*7!`!2AP,``I<$`&:'`P`"-@(`=X<#``+N`@"%AP,``HL"`/&'
+M`P`">P(`#X@#``)!`@`UB`,``HL"`%:(`P`"&0,`7H@#``*+`@!]B`,``D$"
+M`*>(`P`"[@(`MX@#``*M`@#5B`,``AH#``")`P`"EP0`%(D#``+N`@`IB0,`
+M`O4"`#6)`P`"@`0`7(D#``+Z`@![B0,``D$"`+6)`P`"&@,`TXD#``*7!`#H
+MB0,``NX"`/V)`P`"]0(`"8H#``*`!``QB@,``@@#`$2*`P`"I`(`5XH#``*7
+M!`!JB@,``I<$`'Z*`P`"-@(`FXH#``+N`@"EB@,``@H#`+J*`P`!:P0``XL#
+M``(Q`@`-BP,``E("`$>+`P`"I0(`;XL#``(:`P`#C`,``E4"``.-`P`"00(`
+M-(T#``*8`@!0C0,``M<"`(>-`P`"Z`(`KXT#``*6`@#1C0,``AH#`&..`P`"
+M50(`;(\#``*8`@"ACP,``L,"`../`P`"&@,`]X\#``(-`P""D`,``AD#`!J1
+M`P`"&0,`*I$#``)J`@!.D0,``AD#`&:1`P`"00(`CY$#``+6`@`ED@,``6L$
+M`$Z2`P`"@`0`=Y(#``%K!`"0D@,``6L$`/R2`P`"@`0`;I,#``)Y`@"7DP,`
+M`A$#`*F3`P`",0(`XI,#``)2`@`BE`,``F@"`%:4`P`",0(`_Y0#``*`!`!;
+ME0,``6L$`(*5`P`"@`0`J94#``%K!`#"E0,``6L$`!N6`P`"&@,`J)8#``+N
+M`@#;E@,``NX"`.V6`P`",0(`.9<#``(:`P!8EP,``AH#`'J7`P`"5P0`G)<#
+M``+U`@"HEP,``H`$`%>8`P`"8`(`AI@#``((`P"<F`,``J0"`+B8`P`!!@``
+MO9@#``*,!`#4F`,``I<$`.N8`P`"EP0`#)D#``(V`@`OF0,``J@"`&29`P`"
+M&@,`C)D#``+U`@"8F0,``H`$`-V9`P`""`,`\YD#``*D`@`.F@,``08``!.:
+M`P`"C`0`*IH#``*7!`!!F@,``I<$`%^:`P`"-@(`@9H#``)2`@#_F@,``6L$
+M`"F;`P`"@`0`4)L#``%K!`!IFP,``6L$`!R<`P`!)P(`,9P#``+'`@"ZG`,`
+M`LT"`.&<`P`"&@,`6IT#``(^`@"&G0,``K4"`+>=`P`"5@(`SYT#``*7!`#I
+MG0,``I<$`!F>`P`"@`0`,9X#``%K!`!*G@,``6L$`&B>`P`",0(`<)X#``*C
+M`@"MG@,``GD"`/N>`P`"&@,`7I\#``*-`@!NGP,``A@"`)*?`P`";P(`W9\#
+M``%K!`#YGP,``6L$``Z@`P`"4P(`(:`#``*``@`YH`,``6L$`$>@`P`!:P0`
+M5:`#``%K!`!CH`,``6L$`,"@`P`!:P0`WZ`#``%K!`#LH`,``O0"`""A`P`!
+M:P0`.Z$#``%K!`"LH0,``6L$`,NA`P`!:P0`]*$#``)7!``=H@,``AH#`$ZB
+M`P`"EP0`9*(#``+N`@",H@,``G("`)BB`P`"@`0`PJ(#``$!``#7H@,``G@$
+M`/2B`P`!:P0`"Z,#``%K!``EHP,``6L$`$>C`P`!:P0`:*,#``%K!`!_HP,`
+M`6L$`,ZC`P`!:P0`[Z,#``%K!``4I`,``6L$`"ND`P`!:P0`@Z0#``%K!`":
+MI`,``6L$`!.E`P`"5P0`1Z4#``*7!`!:I0,``NX"`&VE`P`"]0(`>:4#``*`
+M!`"=I0,``0$``*^E`P`">`0`UJ4#``%K!`#SI0,``6L$`!:F`P`!:P0`,J8#
+M``%K!`!MI@,``E<$`(FF`P`"&@,`M*8#``*7!`#:I@,``<T"`.RF`P`">`0`
+M"J<#``%K!``CIP,``6L$`+:G`P`!:P0`VJ<#``%K!``(J`,``6L$`#RH`P`!
+M!0``0:@#``*,!`"(J`,``J8"`.JH`P`"I0(`]*@#``)U`@"DJ0,``I@"`,>I
+M`P`"00(`[:D#``(:`P!\J@,``I@"`)6J`P`"00(`VZH#``+H`@#_J@,``J8"
+M``BL`P`!:P0`):P#``%K!``_K`,``6L$`)RL`P`!:P0`N:P#``%K!``MK0,`
+M`M<"`(*M`P`!:P0`I*T#``%K!`#6K0,``6L$``VN`P`"I@(`(JX#``)&`@!;
+MK@,``0,```JO`P`"B`(`3:\#``)>!``-L`,``EX$`&RP`P`"7@0`F+`#``%K
+M!`#$L`,``6L$`/ZP`P`!:P0`OK$#``)>!`!"LP,``EX$`.:S`P`"7@0`^K,#
+M``$#``"&M`,``H`$`+RT`P`!:P0`[;0#``%K!``PM0,``6L$`,BU`P`!:P0`
+M2[8#``+8`@!@M@,``M@"`"JW`P`"F`(`0+<#``)!`@#LMP,``K<"`$:Y`P`"
+M!0,`4KD#``)@`@#`N0,``DL"`#"Z`P`"F`(`.KH#``*W`@!0N@,``D$"`*^Z
+M`P`"&@,`)[L#``(:`@!INP,``AH#`/N[`P`"&@,`*+P#``)@`@`^O`,``HL"
+M`'V\`P`!:P0`GKP#``)5`@`BO0,``E<$`#*]`P`""@,`6;T#``(:`P#LO0,`
+M`F`"`!B^`P`""`,`*[X#``*D`@!(O@,``08``$V^`P`"C`0`8+X#``*7!`!S
+MO@,``I<$`(Z^`P`"-@(`O+X#``%K!``3OP,``F("`"._`P`"[0(`6;\#``+!
+M`@!KOP,``H`"`)&_`P`"3@(`Y;\#``%K!``%P`,``6L$`!S``P`"@`(`6L`#
+M``+N`@!PP`,``O4"`'S``P`"@`0`KL`#``((`P#(P`,``I<$`-_``P`"EP0`
+M^<`#``(V`@`+P0,``6L$`&+!`P`";P(`G,$#``*7!`#\P0,``F\"`"W"`P`"
+M@`0`1<(#``%K!`!>P@,``6L$`'S"`P`",0(`A,(#``*C`@"IP@,``HT"`)[#
+M`P`"7@0`O,,#``%K!`#DPP,``6L$`![$`P`!:P0`2,0#``$%``!-Q`,``HP$
+M`&[$`P`"*`(`IL0#``%K!`"^Q`,``6L$`-;$`P`!:P0`X,0#``)&`@#\Q`,`
+M`6L$`+K%`P`"9P(`T\4#``)*`@#BQ0,``I4"`/[%`P`"5P0`$L8#``%$`@`D
+MQ@,``G@$`%'&`P`"D@(`;L8#``+,`@"!Q@,``I4"`,+&`P`!Y0(`Y,8#``)P
+M`@#VQ@,``FD"``#'`P`"^0(`;\<#``(8`P`VR`,``FX"`&W(`P`";@(`J<@#
+M``(Z`@`ZR@,``N<"`'[*`P`"FP(`L<H#``(Z`@`1S`,``EX$`)C,`P`"JP(`
+MU,P#``*K`@`CS0,``I0"`#G-`P`"0@(`:,T#``(Z`@"PS0,``EX$`+O-`P`"
+M#`,`.\\#``+=`@!0SP,``F,"`&7/`P`")@(`>L\#``)G`@"1SP,``E<$`*7/
+M`P`!1`(`O,\#``)X!`#ESP,``AH#`%[0`P`"5@(`I=`#``(:`P#4T`,``CH"
+M`/K0`P`"J@(`'-$#``(^`@`KT0,``K4"`$O1`P`"2@(`7=$#``*5`@"3T0,`
+M`CH"`+[1`P`"D@(`V]$#``+,`@#NT0,``I4"`"[2`P`!!`,`4](#``)P`@!E
+MT@,``FD"`&_2`P`"^0(`O-(#``*2`@#2T@,``LP"`.?2`P`"E0(`$],#``)>
+M!`!*TP,``00#`&W3`P`"<`(`@],#``)I`@"-TP,``OD"`"O5`P`"6P(`?]4#
+M``);`@"UU0,``L@"`*O6`P`"2@(`NM8#``*5`@#IU@,``EX$`#/7`P`"2@(`
+M0M<#``*5`@!JUP,``I("`(?7`P`"S`(`FM<#``*5`@#EUP,``88"`#38`P`"
+M<`(`1M@#``)I`@!0V`,``OD"`'K8`P`"D@(`D-@#``+,`@"CV`,``I4"`,C8
+M`P`"7@0`!MD#``&&`@!5V0,``G`"`&?9`P`":0(`<=D#``+Y`@#WV0,``6L$
+M`)G=`P`"CP(`M]T#``(3`P`;W@,``AH#``3?`P`"&0,`%>(#``$H`@`GX@,`
+M`G@$`+WB`P`!T0(`U>(#``)X!``<XP,``E<$`$GC`P`"5P0`Q.,#``(:`P#7
+MXP,``I8"`/'C`P`!*`(``^0#``)X!`"$Y`,``AH#`)?D`P`"I0(`L^0#``'1
+M`@#+Y`,``G@$`#/E`P`")0(`>^4#``*8`@"BY0,``G4"`*_E`P`"I0(`1>8#
+M``(:`P!5YP,``I@"`)[G`P`"F`(`Q^<#``)[`@`GZ`,``H("`$;H`P`"XP(`
+MKN@#``+_`@!0Z0,``I@"`)_I`P`"@@(`OND#``+C`@`JZ@,``D<"`*OJ`P`"
+MU`(``NL#``*"`@`AZP,``N,"`%+L`P`"@@(`<>P#``+C`@!C[0,``AH#`&WM
+M`P`"(`(`=>T#``(-`P"Z[0,``G0"`/'M`P`"&@,`2^X#``(:`P"D[@,``AH#
+M``?O`P`"&@,`9>\#``(:`P`!\0,``AH#`$;Q`P`"L0(`7/$#``*5`@"3\0,`
+M`L`"`,SQ`P`"M0(`ZO$#``+J`@`1\@,``AH#`&/R`P`"/@(`>_(#``*Q`@"-
+M\@,``I4"`*KR`P`"D@(`O/(#``(W`@`)\P,``?T"`!3S`P`"<`(`'O,#``+Y
+M`@`_\P,``I("`%'S`P`"-P(`H_,#``']`@"N\P,``G`"`+CS`P`"^0(`Y/,#
+M``*2`@#Z\P,``C<"`%7T`P`!_0(`8/0#``)P`@!J]`,``OD"`';T`P`"@`0`
+MH_0#``*2`@#!]`,``C<"`-3T`P`"E0(`+O4#``']`@`Y]0,``G`"`$/U`P`"
+M^0(`0O8#``*5`@#&]@,``A,#`-;V`P`"E0(`'/<#``*2`@#&]P,``0$``-'W
+M`P`"<`(`V_<#``+Y`@`>^`,``I("`$'X`P`"S`(`7_@#``*5`@"F^`,``6T"
+M`+'X`P`"<`(`O_@#``)I`@#)^`,``OD"`.KX`P`"D@(`#?D#``+,`@`K^0,`
+M`I4"`'KY`P`!;0(`A?D#``)P`@"3^0,``FD"`)WY`P`"^0(`QOD#``*2`@#E
+M^0,``LP"`/_Y`P`"E0(`5?H#``%M`@!C^@,``G`"`'3Z`P`":0(`?OH#``+Y
+M`@"F^@,``I("`,SZ`P`"S`(`Z?H#``*5`@!0^P,``6T"`%[[`P`"<`(`:_L#
+M``)I`@!X^P,``OD"`)G[`P`"D@(`ROL#``+V`@#;^P,``I4"`._[`P`!;0(`
+M^?L#``+Y`@`6_`,``0,``&[\`P`"$@,`M_P#``%K!`#D_`,``6L$``?]`P`!
+M:P0`-_T#``%K!`!Z_0,``A(#`*[]`P`!:P0`W/T#``%K!`#__0,``6L$`"S^
+M`P`!:P0`:O\#``(%`P"8``0``DH"`,\!!``"^0(`]0$$``(\`@`"`@0``G0"
+M`!4"!``"00(`@0($``)[`@#L`@0``G4"`%(#!``"F`(`7`,$``*W`@!F`P0`
+M`AD#`(H#!``"XP(`:P0$``$'``"Q!`0``N\"`#8&!``"@`0`0`8$``*5`@!,
+M!@0``MX"`&$&!``"@`0`:P8$``*5`@".!@0``I("`,P&!``!O0(`U@8$``+Y
+M`@#I!@0``H`$`/T&!``"@`0`[`<$``)*`@#Z!P0``I4"`$`(!``"W@(`5`@$
+M``)*`@!B"`0``I4"`(,(!``"D@(`F0@$``+,`@"L"`0``I4"`/0(!``!`0``
+M_P@$``)P`@`."00``FD"`!@)!``"^0(`/0D$``*2`@!W"00``6T"`($)!``"
+M^0(`G0D$``*2`@"O"00``LP"`,D)!``"E0(`!0H$``%M`@`/"@0``OD"`#@*
+M!``"[@(`9`H$``+U`@!P"@0``H`$`)H*!``"N0(`N`H$``(!`P#V"@0``@@#
+M``P+!``"I`(`)PL$``$&```L"P0``HP$`$,+!``"EP0`6@L$``*7!`"="P0`
+M`C8"`+T+!``"&@,`^0L$``*J`@`1#00``A@#`$8-!``"H`(`G0T$``*@`@`-
+M#@0``AD"`$@.!``"&0(`F`X$``(9`@#1#@0``AD"`/\/!``!`0``0Q`$``(;
+M`@"/$`0``0$``-,0!``"&P(`C1$$``$!``#0$00``AL"`)T2!``!`0``T!($
+M``(;`@!%$P0``0$``'03!``"&P(`Y10$``(P`@!?%00``M`"`*H5!``"&0(`
+MA!8$``*A`@![%P0``A@#`*,7!``"SP(`NA<$``(?`@`P&00``J`"``$;!``"
+MA0(`>!L$``*A`@#Y&P0``AD"`"`<!``"&0(`P!P$``*7`@`X'00``AD"`-P?
+M!``"&0(`C"$$``)>!`">(@0``6L$`*\B!``!:P0`0R,$``*`!`!:(P0``6L$
+M`&\C!``!:P0`IR,$``*`!`"^(P0``6L$`-<C!``!:P0`&R0$``*`!``R)`0`
+M`6L$`$<D!``!:P0`E20$``*`!`#-)`0``F("`.(D!``"J@(`"R4$``+M`@!!
+M)00``L$"`&XE!``"0P(`@B4$``*`!`"Y)00``C8"`-$E!``"+@(`!"8$``)O
+M`@`H)@0``E<$`#0F!``""@,`428$``(:`P![)@0``@@#`(XF!``"I`(`I"8$
+M``*7!`"W)@0``I<$`,XF!``"-@(`]28$``(:`P`()P0``NT"`$$G!``"M0(`
+MC2<$``(:`P#I)P0``K4"`%PH!``"&`,`Z2@$``(:`P`,*00``HD"`$PI!``"
+M&`,`ZBD$``*7!``;*@0``NX"`"TJ!``"]0(`.2H$``*`!`!C*@0``KD"`(`J
+M!``"`0,`J2H$``((`P"\*@0``J0"`-(J!``"EP0`Y2H$``*7!``4*P0``C8"
+M`(0K!``"B0(`E2L$``+;`@`M+`0``A@#`%HL!``"[0(`HBT$``(^`@#%+00`
+M`E8"`.PM!``".@(`4BX$``(:`P!S+@0``HD"`*PN!``"B0(`X2X$``*)`@#T
+M+@0``A@#`#4O!``">@(`:C`$``(I`@"5,`0``AH#`*HP!``"[@(`P#`$``+U
+M`@#,,`0``H`$`/XP!``""`,`$3$$``*D`@`K,00``I<$`$(Q!``"EP0`<#$$
+M``(V`@"5,00``J@"`.DQ!``"!@,``3($``*)`@`R,@0``HD"`&$R!``"B0(`
+M;S($``)Z`@"&,@0``B0"`+4R!``">@(`]#,$``+M`@`#-00``CX"`"4U!``"
+M5@(`834$``*J`@",-00``HD"`*PU!``"<P(`^S4$``)H`@`"-@0``2<"`!<V
+M!``"QP(`)C8$``)W`@`P-@0``F@"`.LW!``!!0``\#<$``*,!`!Y.`0``B0"
+M`%0Y!``"D`(`MSD$``$G`@#/.00``L<"``8Z!``!!0``"SH$``*,!``=.@0`
+M`JH"`$XZ!``"[0(`LSH$``*0`@#'.@0``HX"`/@Z!``"5@(`FSL$``(8`@"I
+M.P0``OH"`'8\!``"J@(`SSP$``(:`P`5/00``CX"`#H]!``"M0(`7CT$``)6
+M`@#_/00``J<"`(0^!``"&@,`^SX$``*G`@"+/P0``I<$`*H_!``"EP0`W#\$
+M``*G`@!(0`0``I<$`)Q`!``"EP0`?$$$``+5`@"-000``LD"`*!!!``"DP(`
+MLT$$``*3`@#$000``F4"`-5!!``"R@(`YD$$``(/`P#W000``IX"`"5"!``"
+M&@,`<T($``(^`@"50@0``K4"`+E"!``"5@(`!4,$``(Z`@`I0P0``AH#`%!#
+M!``!!@``54,$``*,!`!@0P0``CH"`(5#!``"J@(`@T0$``+!`@"/1`0``H`$
+M`*1$!``"P0(`L$0$``*`!`!"100``6L$`%A%!``!:P0`E$4$``*`!`"U100`
+M`K4"`,U%!``"0P(`YD4$``)#`@#Z100``H`$`!Y&!``!:P0`148$``%K!`!>
+M1@0``6L$`'U&!``"@`0`DD8$``$%``"71@0``HP$`+A&!``!!@``O48$``*,
+M!`!I1P0``I`"`+%'!``";P(`U$<$``(:`P`82`0``CX"`#U(!``"M0(`84@$
+M``)6`@"E2`0``F\"`-1(!``"J@(`^4@$``(:`P!#200``CX"`&5)!``"M0(`
+MB4D$``)6`@#0200``AH#`/E)!``".@(`(DH$``*J`@!@2@0``0,``+A*!``"
+M;P(`RTH$``%K!`#@2@0``JP"`/1*!``"K`(`"$L$``*L`@`<2P0``JP"`#A+
+M!``"80(`5$L$``)A`@!M2P0``F$"`(9+!``"80(`J4L$``)A`@#"2P0``F$"
+M`-9+!``"K`(`ZDL$``*L`@#^2P0``JP"`"%,!``"80(`-4P$``*L`@!^3`0`
+M`H`$`-U,!``!:P0`]DP$``%K!``*300``H`$`!I-!``"M0(`+TT$``*`!``[
+M300``JP"`$A-!``"@`0`7$T$``*L`@!H300``H`$`(M-!``"80(`F$T$``*`
+M!`"I300``JP"`+5-!``"@`0`QDT$``*L`@#2300``H`$`.%-!``"7P(`\$T$
+M``*1`@`,3@0``F$"`/Y.!``"&`,`'4\$``(8`P"33P0``B("`+50!``"@`0`
+M0U$$``*`!`!:400``6L$`&M1!``!:P0``U($``*`!``74@0``6L$`"A2!``!
+M:P0`DU($``*`!`"G4@0``6L$`+A2!``!:P0`/5,$``+"`@"`4P0``@(#`*Y3
+M!``"^`(`OU,$``+"`@#Y4P0``6L$`!!4!``!:P0`/%0$``%K!`!35`0``6L$
+M`*94!``"Y`(`MU0$``(>`@`K500``H`$`$I5!``!:P0`8U4$``%K!``L5@0`
+M`2L"`%=6!``"T@(`=E8$``+&`@"55@0``?X"`*-6!``!_@(`(5<$``%K!``^
+M5P0``6L$`&]7!``"@`0`A%<$``%K!`##5P0``6L$`!I8!``!:P0`>5@$``%K
+M!`#16`0``H`$`.Q8!``!:P0``5D$``%K!`!#600``KP"`$U9!``"G`(`@5D$
+M``*`!`#I600``H`$`%%:!``"@`0`EEH$``)R`@"B6@0``H`$`+A:!``!:P0`
+MS5H$``%K!``I6P0``H`$`#A;!``",0(`55L$``*C`@!@6P0``6L$`'1;!``!
+M:P0`BUL$``%K!`!87`0``6L$``I>!``"2@(`'5X$``*5`@""7@0``DH"`)5>
+M!``"E0(`JEX$``)6`@!Y7P0``EX$`,5?!``!!@``RE\$``*,!`#C7P0``DH"
+M`/-?!``"E0(`#6`$``(:`P!K8`0``AH#`-=@!``"5@(`=6$$``*`!``!8@0`
+M`H`$`#AB!``"@`0`6F($``)*`@!J8@0``I4"`'AB!``"C`(`A6,$``*`!`"\
+M8P0``H`$`-YC!``"2@(`[F,$``*5`@#\8P0``HP"`#AD!``"@`0`B&0$``*`
+M!`#49`0``H`$``UE!``"2@(`'64$``*5`@`J900``E8"`"-F!``"2@(`,F8$
+M``*5`@"^9@0``K4"`--F!``"@`0`^V8$``+``@`19P0``K4"`&!G!``!!0``
+M96<$``*,!`!^9P0``BH"`$)H!``"2@(`3V@$``*5`@!G:`0``DH"`'9H!``"
+ME0(`@&@$``*U`@!K:00``DH"`'II!``"E0(`P6D$``$%``#&:00``HP$`-YI
+M!``"-@(`[&D$``*J`@`#:@0``H`$``UJ!``"E0(`&&H$``+!`@`M:@0``H`$
+M`#=J!``"E0(`06H$``+F`@!Q:@0``I("`-5J!``!V@(`X6H$``$!``#N:@0`
+M`OD"``]K!``"D@(`+6L$``+,`@!':P0``I4"`)AK!``!`0``IFL$``)P`@"X
+M:P0``FD"`,)K!``"^0(`3&X$``(7`P!V;@0``I("`+UN!``!`0``RFX$``+Y
+M`@#J;@0``I("`#%O!``!`0``/F\$``+Y`@!>;P0``I("`)YO!``!`0``J&\$
+M``+Y`@#&;P0``I("``9P!``!`0``$'`$``+Y`@`N<`0``I("`'9P!``!`0``
+M@'`$``+Y`@"><`0``I("`-YP!``!`0``Z'`$``+Y`@`&<00``I("`$9Q!``!
+M`0``4'$$``+Y`@"!<00``I("`,-Q!``!V0(`SW$$``&[`@#<<00``OD"``UR
+M!``"D@(`;'($``'9`@!X<@0``;L"`(5R!``"^0(`N7,$``)A`@`8=`0``DH"
+M`"9T!``"E0(`/'0$``)O`@!8=`0``0,``'!T!``!:P0`LG0$``%K!`#2=`0`
+M`6L$`!=U!``!:P0`,G4$``%K!`!Y=00``6L$`*EU!``!:P0`YW4$``*`!``3
+M=@0``J`$`#=V!``!:P0`5G8$``%K!`!E=@0``J`$`-EV!``"&@,`.'<$``((
+M`P!/=P0``J0"`&EW!``"EP0`@'<$``*7!`"G=P0``C8"`,MW!``!:P0`YG<$
+M``%K!``W>`0``AH#`'5X!``"[0(`NG@$``+U`@#&>`0``H`$`/QX!``!:P0`
+M&WD$``%K!`"J>00``DH"`+=Y!``"E0(`Q7D$``*J`@#C>00``DH"`/)Y!``"
+ME0(`_'D$``)O`@`O>P0``DH"`#Y[!``"E0(`6'L$``(1`P![>P0``0,``)=[
+M!``!:P0`LGL$``%K!`!,?`0``DX"`*)\!``"K0(`P'P$``(:`P#Q?`0``I<$
+M``M]!``"[@(`(7T$``+U`@`M?00``H`$`%Y]!``"2@(`:WT$``*5`@!_?00`
+M`OH"`+-]!``"3@(`"GX$``*M`@`H?@0``AH#`%E^!``"EP0`<WX$``+N`@")
+M?@0``O4"`)5^!``"@`0`QGX$``)*`@#3?@0``I4"`.=^!``"^@(`#'\$``%K
+M!``G?P0``6L$`'U_!``"]0(`B7\$``*`!`#$?P0``6L$`.-_!``!:P0`/(`$
+M``(:`P!Z@`0``NT"`/J`!``!:P0`$H$$``%K!``[@00``DH"`$J!!``"E0(`
+M5X$$``)O`@"<@00``6L$`-:"!``"@`0`,8D$``(:`P!ZB00``L0"`):)!``"
+M7@0`J8D$``)``@#QB@0``J\"``.+!``">0(`]HL$``*`!`#%C`0``0D``,V,
+M!``!"0``U8P$``),`@#XC`0``0D```"-!``!"0``"(T$``),`@`MC00``J\"
+M`#B-!``">0(`VXT$``('`P!]C@0``6L$`+^.!``!:P0`U8X$``(+`P#EC@0`
+M`@L#`/6.!``""P,`!8\$``(+`P`5CP0``@L#`"6/!``""P,`-8\$``(+`P!"
+MCP0``@L#`->/!``""P,`6I`$``*Q`@!JD`0``I4"`**0!``"D@(`M)`$``(W
+M`@`2D00``0X#`!V1!``"<`(`)Y$$``+Y`@!BD00``I("`'J1!``"-P(`B)($
+M``$.`P"6D@0``G`"`*.2!``"^0(`Y9($``)(`@#YD@0``O4"``63!``"@`0`
+M,I,$``)4`@!%DP0``O4"`%&3!``"@`0`;),$``)(`@"!DP0``O4"`(V3!``"
+M@`0`UI,$``)4`@"PE00``KX"`.*5!``!`P``*9<$``*N`@!%EP0``BT"`'Z8
+M!``",P(`\Y@$``(S`@`'F00``EX$`#B9!``"?@(`2YD$``'B`@"!F00``JX"
+M`)V9!``"+0(`*IH$``)^`@!0F@0``GX"``*;!``"WP(`$9L$``++`@`AFP0`
+M`AT"`'2;!``!`P``7YT$``%K!`!VG00``H`$`$V>!``!:P0`PIX$``*`!`"9
+MGP0``6L$`,J?!``"-`(`$Z($``%K!`!!HP0``1`#`'>C!``!:P0`X:,$``$R
+M`@`7I`0``6L$`(&D!``!*P(`MZ0$``%K!`!-I00``5X"`(.E!``!:P0`$Z8$
+M``$R`@`VI@0``2L"`%>F!``!$`,`?:8$``%>`@`_IP0``M,"`.NG!``"3`(`
+M_Z<$``*`!``*J`0``OP"`'BH!``!:P0`B:@$``%K!`"\J`0``6L$`.6H!``"
+M\`(`\:@$``$)``#XJ`0``0D``/ZH!``!"0``$*D$``)D`@`<J00``0D``".I
+M!``!"0``*:D$``$)``!$J00``0D``$NI!``!"0``4:D$``$)``!7J00``5H"
+M`'&I!``!"0``?JD$``$)``"$J00``0D``)JI!``!"0``IJD$``$)``"SJ00`
+M`0D``+FI!``!"0``SZD$``$)``#DJ00``0D``/6I!``!"0``#*H$``$)```@
+MJ@0``0D``$"J!``!6@(`4:H$``$)``!HJ@0``0<``(RJ!``!"0``JZH$``%:
+M`@"\J@0``0D``-*J!``!"0``Z*H$``$)``#_J@0``0D``!2K!``!"0``-*L$
+M``%:`@!%JP0``0D``%RK!``!!P``@*L$``$)``"?JP0``5H"`+"K!``!"0``
+MQJL$``$)``#TJP0``5H"``^L!``!6@(`&:P$``$'``!/K`0``5H"`*.L!``!
+M!P``LJP$``$'``"\K`0``0<``,:L!``!!P``SZP$``$'``#XK`0``5H"``JM
+M!``!6@(`'ZT$``%:`@`ZK00``5H"`'.M!``!6@(`PJT$``)8!`#4K00``0<`
+M`.FM!``!!P``\ZT$``$'```AK@0``5H"`"VN!``!!P``,ZX$``%:`@`YK@0`
+M`0<``#^N!``!6@(`1:X$``$'``!+K@0``5H"`%*N!``!6@(`8ZX$``%:`@!J
+MK@0``5H"`'BN!``!6@(`?ZX$``%:`@",K@0``5H"`)*N!``!6@(`I:X$``%:
+M`@"SK@0``0<``,RN!``!6@(`TZX$``%:`@#AK@0``5H"`.BN!``!6@(`]:X$
+M``%:`@#[K@0``5H"`!FO!``!!P``(Z\$``$'``!QKP0``0D``'JO!``!"0``
+MI*\$``$'``"\KP0``0<``-.O!``!!P``XZ\$``$'```(L`0``5H"`!JP!``!
+M6@(`.;`$``%:`@!<L`0``5H"`'"P!``!6@(`A+`$``%:`@#SL`0``0D``/NP
+M!``!"0``2[($``)F!`!<L@0``F8$`*.R!``!!P``J[($``$'``"]L@0``0<`
+M`,6R!``!!P``S+($``$'``#2L@0``0<``-NR!``!!P``Z+($``$'``#NL@0`
+M`0<``!JS!``"I`0`/+,$``*<!`!RLP0``G\"`("S!``"?P(`I[,$``+U`@#(
+MLP0``E<$`-RS!``!70(`[K,$``)X!``-M`0``ID$`#.T!``"^P(`.[0$``+[
+M`@!#M`0``K8"`%RT!``"M@(`<;0$``)%`@!]M`0``H`$`(6T!``"B@(`C;0$
+M``)/`@"AM`0``5T"`+FT!``">`0`Q+0$``*J`@#/M`0``JH"`$^U!``"3`(`
+M8[4$``*`!`!NM00``OP"`*6U!``!!@``JK4$``*,!``LM@0``04``':V!``!
+M!0``F[8$``$%``"WM@0``4D"`,"V!``"4`0`V;8$``$&``"LMP0``04``+&W
+M!``"C`0`V[<$``)7!`#LMP0``0$``/ZW!``">`0`OKD$``(!`P#FN00``KD"
+M`!FZ!``"&@,`A;H$``(:`P#:N@0``I<$`%V[!``"&@,`O+L$``*7!`"JO`0`
+M`L4"`,:\!``"I`(`&;X$``(^`@!?O@0``AH#`*"^!``"M0(`\;X$``)R`@`7
+MOP0``E8"`$:_!``"&@,`H;\$``*G`@!&P`0``NX"`'C`!``"/@(`I<`$``*U
+M`@#:P`0``E8"`&?!!``"2@(`=L$$``*5`@#DP00``I("`)G#!``"7@0`T\0$
+M``$!```YQ00``E`"`$3%!``"<`(`5<4$``)I`@!TQ00``LP"`,?%!``"7@0`
+M'\8$``)>!``^Q@0``G`"`%'&!``":0(`9\8$``+Y`@!YQ@0``I4"`//&!``"
+MD@(`#<<$``+,`@`BQP0``I4"`$G'!``"EP0`8L<$``+N`@"DQP0``EX$`*[(
+M!``"4`(`Z\@$``$!``#YR`0``G`"``_)!``":0(`(,D$``+Y`@!:R00``NX"
+M`'3)!``"@`0`?,D$``+U`@#4R00``EX$`.K)!``"2@(`]\D$``*5`@`2R@0`
+M`I<$`$;*!``"5P(`5LH$``)7`@!PR@0``O4"`&W>!``"D@(`N-X$``$!``#"
+MW@0``OD"`/[>!``"[@(`&-\$``*`!``@WP0``O4"`%C?!``"E0(`K-\$``*2
+M`@`KX`0``0$``#C@!``"^0(`=N`$``+N`@"0X`0``H`$`)S@!``"]0(`X^`$
+M``+,`@!<X00``0$``&?A!``"<`(`?>$$``)I`@"*X00``OD"`,7A!``"[@(`
+MW.$$``*`!`#HX00``O4"`!_B!``"2@(`-.($``*5`@!`X@0``I("`%KB!``"
+M2@(`4N,$``$!``!@XP0``G`"`';C!``":0(`@^,$``+Y`@"^XP0``NX"`-7C
+M!``"@`0`X>,$``+U`@`@Y`0``DH"`#'D!``"E0(`;>0$``*7!`!_Y`0``NX"
+M`)7D!``"@`0`G>0$``+U`@#7Y`0``I<$`!WE!``"`0,`1>4$``*Y`@!CY00`
+M`J0"`+7E!``"D@(`%N8$``$!```@Y@0``OD"`%[F!``"[@(`>.8$``*`!`"`
+MY@0``O4"`,;F!``"E0(`]N8$``$#```+YP0``L4"`%;G!``"\0(`@N<$``(;
+M`P"6YP0``O("`&KH!``"9@(`?>@$``)F`@"2Z`0``F8"`*7H!``"9@(`W^@$
+M``)T!`#XZ`0``G0$`!#I!``"=`0`8ND$``(A`@"#Z00``G\$`)_I!``"?P0`
+MPND$``)_!`#>Z00``G\$``+J!``"?P0`'NH$``)_!`!"Z@0``G\$`%[J!``"
+M?P0`C>H$``)_!`"JZ@0``G\$`-3J!``"?P0`\.H$``)_!``2ZP0``G\$`"[K
+M!``"?P0`4NL$``)_!`!NZP0``G\$`)+K!``"?P0`KNL$``)_!`#2ZP0``G\$
+M`.[K!``"?P0`$NP$``)_!``N[`0``G\$`%+L!``"?P0`;NP$``)_!`"2[`0`
+M`G\$`*[L!``"?P0`TNP$``)_!`#N[`0``G\$`!+M!``"?P0`+NT$``)_!`!2
+M[00``G\$`&[M!``"?P0`DNT$``)_!`"N[00``G\$`-+M!``"?P0`[NT$``)_
+M!``;[@0``K$$`$#N!``"L00`:^X$``*Q!`"0[@0``K$$`+ON!``"L00`X.X$
+M``*Q!``+[P0``K$$`##O!``"L00`6^\$``*Q!`"`[P0``K$$`*OO!``"L00`
+MT.\$``*Q!`#[[P0``K$$`"#P!``"L00`._`$``*V`@!)\`0``K8"`%'P!``"
+M10(`7?`$``*`!`!E\`0``HH"`&WP!``"3P(`>/`$``)7`@"#\`0``E<"`)3P
+M!``!!P``F?`$``)-!``U\00``O(#`%_Q!``"3@,`?/$$``+3`P#(\00``JH#
+M`-7Q!``"V0,`K_,$``)>!``.]00``MT#`%;X!``!!0``6_@$``*,!`!H^`0`
+M`08``&WX!``"C`0`D_@$``$'``#'^`0``6L$``_Y!``!:P0`2/D$``%K!`!8
+M^00``6L$`(CY!``!:P0`EOD$``%K!`#!^00``6L$`-#Y!``!:P0``OH$``*`
+M!``6^@0``6L$`"3Z!``!:P0`DOH$``%K!`"@^@0``6L$`,CZ!``"@`0`X_H$
+M``%K!`#Q^@0``6L$`!W[!``!:P0`+/L$``%K!`!>^P0``H`$`'+[!``!:P0`
+M@/L$``%K!`#(^P0``6L$`-C[!``!:P0`'OP$``%K!`!^_`0``6L$`-W\!``"
+MF@,`ZOP$``*`!`#Q_`0``I\#`!?]!``!:P0`-?T$``%K!`!0_00``6L$`'3]
+M!``!:P0`Q_T$``*`!`!7_@0``H`$``__!``"O`,`*/\$``)3`P!*_P0``HT$
+M`&W_!``"C00`E_\$``*-!`"T_P0``HT$`-K_!``"C00``@`%``*-!``;``4`
+M`HT$`#@`!0`"C00`6``%``*-!`![``4``HT$`)L`!0`"C00`MP`%``*-!`#3
+M``4``HT$`.\`!0`"C00`"P$%``*-!``F`04``HT$`$,!!0`"C00`6P$%``*-
+M!`!\`04``EP$`)H!!0`"7`0`Q0$%``)<!`#D`04``EP$``,"!0`"7`0`(@(%
+M``)<!`!,`@4``EP$`'8#!0`"O`,`^P,%``*/!``Y!`4``H\$`',$!0`"CP0`
+MM@0%``*/!`#J!`4``H\$``,%!0`"CP0`'@4%``*/!`""!04``H\$`-4%!0`"
+MCP0`)@8%``*/!`!\!@4``H\$`.0&!0`"CP0`'0<%``*/!`!-!P4``K$#`%\'
+M!0`"CP0`D`<%``(]`P"?!P4``H\$`,P'!0`"/0,`VP<%``*/!``("`4``CT#
+M`!<(!0`"CP0`1`@%``(]`P!3"`4``H\$`+8(!0`"UP,`>`L%``*:!`"6"P4`
+M`IH$`+0+!0`"F@0`T@L%``*:!`#L"P4``IH$``8,!0`"F@0`0`P%``('!`"9
+M#`4``IH$`-<,!0`"!P0`B0T%``('!`"T#04``I<$`,L-!0`"``0`W0T%``(T
+M`P#I#04``H`$`!T.!0`"OP,`I`X%``(?`P"\#@4``I,#`(,/!0`"?0,`^@\%
+M``+*`P#Y$P4``JD#`&D4!0`",0,`I!0%``)]`P!/%04``0,``%P5!0`"<0,`
+MB!4%``)Q`P"P%04``G$#`-@5!0`"<0,`&Q8%``+G`P!H%@4``JT#`-(7!0`"
+MB@,``A@%``*`!`"?&@4``@L$`+0:!0`"Y0,`>!L%``(F`P`)'`4``M$#`"8<
+M!0`")@,`[1T%``+]`P`-'@4``ND#`'<>!0`"_0,`M!X%``+I`P#1(`4``CX#
+M``PA!0`!`P``OB$%``)>!`#=(04``0,``/@A!0`!`P``?2(%``(>`P"*(@4`
+M`AX#`#@C!0`"_0,`=2,%``+I`P#F(P4``C@#`"(D!0`"Z`,`/R0%``(X`P!4
+M)`4``FL#`'$D!0`".`,`N20%``+[`P`*)04``C@#`"$E!0`"^P,`&R8%``)[
+M`P`J)@4``L,#`%LF!0`"!P0`;"8%``((!`#?)@4``0$``.HF!0`"J@,`]R8%
+M``+_`P!?)P4``6L$`'\G!0`"C`,`BR<%``)M`P"Q)P4``HP#`+DG!0`"G0,`
+MTR<%``$#``#I)P4``N(#``<H!0`"X@,`)2@%``(`!`!&*`4``L<#`&(H!0`"
+MJ`,`AB@%``(`!`"@*`4``L<#`+@H!0`"``0`S"@%``*H`P#C*`4``@`$`!DI
+M!0`"-`,`)2D%``*`!`".*04``I@#`*DI!0`"I`,`RRD%``+2`P#>*04``IX#
+M`/8I!0`!!@``^RD%``*,!``.*@4``I<$`"$J!0`"EP0`-2H%``+D`P!=*@4`
+M`@<$`*`J!0`"9`,`'"L%``)\`P`Z*P4``A($`&`K!0`"'P,`ARL%``*P`P"/
+M*P4``A\#`-4K!0`"$@0`$2P%``+'`P`\+`4``@<$`&HL!0`"EP0`@"P%``(`
+M!`"A+`4``C0#`*TL!0`"@`0`YRP%``+;`P`M+04``04``#(M!0`"C`0`/BT%
+M``(`!`"A+04``C0#`*TM!0`"@`0`\RT%``*8`P`0+@4``J0#`#,N!0`"T@,`
+M1BX%``*>`P!;+@4``08``&`N!0`"C`0`<RX%``*7!`"&+@4``I<$`)HN!0`"
+MY`,`JRX%``(`!`"Y+@4``A\#`"4O!0`"@@,`0R\%``(2!`!I+P4``A\#`(HO
+M!0`"L`,`DB\%``(?`P"Q+P4``A($`-LO!0`"``0`ZR\%``*H`P`),`4``@<$
+M`#0P!0`"EP0`2#`%``(`!`!=,`4``C0#`&DP!0`"@`0`D#`%``)1`P"O,`4`
+M`A($`.DP!0`"!P0`!S$%``*7!``<,04``@`$`#$Q!0`"-`,`/3$%``*`!`!E
+M,04``M(#`'@Q!0`"G@,`BS$%``*7!`">,04``I<$`+(Q!0`"Y`,`SS$%``(`
+M!`#9,04``KX#`.XQ!0`!:P0`-S(%``+P`P!!,@4``CH#`'LR!0`"[`,`HS(%
+M``('!``W,P4``B,#`#<T!0`"$@0`:#0%``)S`P"$-`4``M0#`+LT!0`"*@,`
+MXS0%``)*`P`%-04``@<$`)<U!0`"(P,`H#8%``)S`P#5-@4``B<#`!<W!0`"
+M!P0`*S<%``*O`P"V-P4``K`#`$XX!0`"L`,`7C@%``*F`P"".`4``K`#`)HX
+M!0`"$@0`PS@%``(:!`!9.04``6L$`((Y!0`"@`0`JSD%``%K!`#$.04``6L$
+M`#`Z!0`"@`0`HCH%``+&`P#+.@4``HT#`-TZ!0`"\`,`%CL%``(Z`P!6.P4`
+M`C`#`(H[!0`"\`,`,SP%``*`!`"//`4``6L$`+8\!0`"@`0`W3P%``%K!`#V
+M/`4``6L$`$\]!0`"!P0`W#T%``(`!``//@4``@`$`"$^!0`"\`,`;3X%``('
+M!`",/@4``@<$`*X^!0`"5P0`T#X%``(T`P#</@4``H`$`(L_!0`";0,`NC\%
+M``+2`P#0/P4``IX#`.P_!0`!!@``\3\%``*,!``(0`4``I<$`!]`!0`"EP0`
+M0$`%``+D`P!C0`4``M8#`)A`!0`"!P0`P$`%``(T`P#,0`4``H`$`!%!!0`"
+MT@,`)T$%``*>`P!"004``08``$=!!0`"C`0`7D$%``*7!`!U004``I<$`)-!
+M!0`"Y`,`M4$%``(Z`P`S0@4``6L$`%U"!0`"@`0`A$(%``%K!`"=0@4``6L$
+M`%!#!0`!-@,`94,%``)X`P#N0P4``B@#`!5$!0`"!P0`CD0%``)-`P"Z1`4`
+M`ML#`.M$!0`"#00``T4%``*7!``=104``I<$`$U%!0`"@`0`944%``%K!`!^
+M104``6L$`)Q%!0`"\`,`I$4%``*%`P#A104``L8#`"]&!0`"!P0`DD8%``*;
+M`P"B1@4``I<#`,9&!0`";`,`$4<%``%K!``M1P4``6L$`$)'!0`"R0,`54<%
+M``*C`P!M1P4``6L$`'M'!0`!:P0`B4<%``%K!`"71P4``6L$`/1'!0`!:P0`
+M$T@%``%K!``@2`4``J(#`%1(!0`!:P0`;T@%``%K!`#@2`4``6L$`/](!0`!
+M:P0`*$D%``)7!`!1204``@<$`())!0`"EP0`F$D%``(`!`#`204``G0#`,Q)
+M!0`"@`0`]DD%``$!```+2@4``G@$`"A*!0`!:P0`/TH%``%K!`!92@4``6L$
+M`'M*!0`!:P0`G$H%``%K!`"S2@4``6L$``)+!0`!:P0`(TL%``%K!`!(2P4`
+M`6L$`%]+!0`!:P0`MTL%``%K!`#.2P4``6L$`$=,!0`"5P0`>TP%``*7!`".
+M3`4``@`$`*%,!0`"-`,`K4P%``*`!`#13`4``0$``.-,!0`">`0`"DT%``%K
+M!``G304``6L$`$I-!0`!:P0`9DT%``%K!`"A304``E<$`+U-!0`"!P0`Z$T%
+M``*7!``.3@4``2@#`"!.!0`">`0`/DX%``%K!`!73@4``6L$`.I.!0`!:P0`
+M#D\%``%K!``\3P4``6L$`'!/!0`!!0``=4\%``*,!`"\3P4``BX#`!Y0!0`"
+M[`,`*%`%``)\`P#84`4``G,#`/M0!0`"$@0`(5$%``('!`"P404``G,#`,E1
+M!0`"$@0`#U(%``(J`P`S4@4``BX#`#Q3!0`!:P0`65,%``%K!`!S4P4``6L$
+M`-!3!0`!:P0`[5,%``%K!`!A5`4``M0#`+94!0`!:P0`V%0%``%K!``*504`
+M`6L$`$%5!0`"+@,`5E4%``($!`"/504``0,``#Y6!0`"9P,`@58%``)>!`!!
+M5P4``EX$`*!7!0`"7@0`S%<%``%K!`#X5P4``6L$`#)8!0`!:P0`\E@%``)>
+M!`!V6@4``EX$`!I;!0`"7@0`+EL%``$#``"Z6P4``H`$`/!;!0`!:P0`(5P%
+M``%K!`!D7`4``6L$`/Q<!0`!:P0`?UT%``)^`P"4704``GX#`%Y>!0`"<P,`
+M=%X%``(2!``@7P4``@H$`'I@!0`"C`,`AF`%``)M`P#T8`4``E8#`&1A!0`"
+M<P,`;F$%``(*!`"$804``A($`.-A!0`"!P0`6V(%``+J`P"=8@4``@<$`"]C
+M!0`"!P0`7&,%``)M`P!R8P4``A\#`+%C!0`!:P0`TF,%``(C`P!69`4``E<$
+M`&9D!0`"O@,`C60%``('!``@904``FT#`$QE!0`"T@,`7V4%``*>`P!\904`
+M`08``(%E!0`"C`0`E&4%``*7!`"G904``I<$`,)E!0`"Y`,`\&4%``%K!`!'
+M9@4``O,#`%=F!0`"7P,`C68%``()!`"?9@4``J,#`,5F!0`"3P,`&6<%``%K
+M!``Y9P4``6L$`%!G!0`"HP,`CF<%``(`!`"D9P4``C0#`+!G!0`"@`0`XF<%
+M``+2`P#\9P4``I<$`!-H!0`"EP0`+6@%``+D`P`_:`4``6L$`)9H!0`";`,`
+MT&@%``*7!``P:04``FP#`&%I!0`"@`0`>6D%``%K!`"2:04``6L$`+!I!0`"
+M\`,`N&D%``*%`P#=:04``IL#`-)J!0`"7@0`\&H%``%K!``8:P4``6L$`%)K
+M!0`!:P0`?&L%``$%``"!:P4``HP$`*)K!0`"A`,`VFL%``%K!`#R:P4``6L$
+M``IL!0`!:P0`%&P%``($!``P;`4``6L$`.YL!0`"]0,`!VT%``)@`P`6;04`
+M`L,#`#)M!0`"5P0`1FT%``%'`P!8;04``G@$`(5M!0`""`0`HFT%``+R`P"U
+M;04``L,#`/9M!0`!XP,`&&X%``*J`P`J;@4``MD#`#1N!0`"_P,`HVX%``*!
+M`P!J;P4``C<#`*%O!0`"-P,`W6\%``)_`P!N<04``LX#`+)Q!0`"D@,`Y7$%
+M``)_`P!%<P4``EX$`,QS!0`"NP,`"'0%``*[`P!7=`4``I8#`&UT!0`"1`,`
+MG'0%``)_`P#D=`4``EX$`.]T!0`"W`,`;W8%``*0`P"$=@4``EL#`)EV!0`"
+M`P0`KG8%``+U`P#%=@4``E<$`-EV!0`!1P,`\'8%``)X!``9=P4``@<$`))W
+M!0`"#00`V7<%``('!``(>`4``G\#`"YX!0`"9`,`4'@%``)-`P!?>`4``ML#
+M`']X!0`"8`,`D7@%``+#`P#'>`4``G\#`/)X!0`""`0`#WD%``+R`P`B>04`
+M`L,#`&)Y!0`!%@0`AWD%``*J`P"9>04``MD#`*-Y!0`"_P,`\'D%``((!``&
+M>@4``O(#`!MZ!0`"PP,`1WH%``)>!`!^>@4``18$`*%Z!0`"J@,`MWH%``+9
+M`P#!>@4``O\#`%]\!0`"`@0`LWP%``("!`#I?`4``H@#`-]]!0`"8`,`[GT%
+M``+#`P`=?@4``EX$`&=^!0`"8`,`=GX%``+#`P">?@4``@@$`+M^!0`"\@,`
+MSGX%``+#`P`9?P4``88#`&A_!0`"J@,`>G\%``+9`P"$?P4``O\#`*Y_!0`"
+M"`0`Q'\%``+R`P#7?P4``L,#`/Q_!0`"7@0`.H`%``&&`P")@`4``JH#`)N`
+M!0`"V0,`I8`%``+_`P`K@04``6L$`,V$!0`"X@,`ZX0%``(;!`!/A04``@<$
+M`#B&!0`"L`,`28D%``&$`P!;B04``G@$`/&)!0`!%`0`"8H%``)X!`!0B@4`
+M`E<$`'V*!0`"5P0`^(H%``('!``+BP4``DH#`"6+!0`!A`,`-XL%``)X!`"X
+MBP4``@<$`,N+!0`"[`,`YXL%``$4!`#_BP4``G@$`&>,!0`";P,`KXP%``)S
+M`P#6C`4``GP#`..,!0`"[`,`>8T%``('!`")C@4``G,#`-*.!0`"<P,`^XX%
+M``*"`P!;CP4``N<#`'J/!0`"0@,`XH\%``)8`P"$D`4``G,#`-.0!0`"YP,`
+M\I`%``)"`P!>D04``L(#`-^1!0`"S0,`-I(%``+G`P!5D@4``D(#`(:3!0`"
+MYP,`I9,%``)"`P"7E`4``@<$`*&4!0`"=P,`J90%``*O`P#NE`4``D8#`"65
+M!0`"!P0`?Y4%``('!`#8E04``@<$`#N6!0`"!P0`F98%``('!``UF`4``@<$
+M`'J8!0`">P,`D)@%``+#`P#'F`4``L<#``"9!0`"VP,`'ID%``*N`P!%F04`
+M`@<$`)>9!0`"30,`KYD%``)[`P#!F04``L,#`-Z9!0`""`0`\)D%``)Z`P`]
+MF@4``2$#`$B:!0`"J@,`4IH%``+_`P!SF@4``@@$`(6:!0`">@,`UYH%``$A
+M`P#BF@4``JH#`.R:!0`"_P,`&)L%``((!``NFP4``GH#`(F;!0`!(0,`E)L%
+M``*J`P">FP4``O\#`*J;!0`"@`0`UYL%``((!`#UFP4``GH#``B<!0`"PP,`
+M8IP%``$A`P!MG`4``JH#`'><!0`"_P,`=IT%``+#`P#ZG04``AL$``J>!0`"
+MPP,`4)X%``((!`#ZG@4``0$```6?!0`"J@,`#Y\%``+_`P!2GP4``@@$`'6?
+M!0`"\@,`DY\%``+#`P#:GP4``94#`.6?!0`"J@,`\Y\%``+9`P#]GP4``O\#
+M`!Z@!0`""`0`0:`%``+R`P!?H`4``L,#`*Z@!0`!E0,`N:`%``*J`P#'H`4`
+M`MD#`-&@!0`"_P,`^J`%``((!``9H04``O(#`#.A!0`"PP,`B:$%``&5`P"7
+MH04``JH#`*BA!0`"V0,`LJ$%``+_`P#:H04``@@$``"B!0`"\@,`':(%``+#
+M`P"$H@4``94#`)*B!0`"J@,`GZ(%``+9`P"LH@4``O\#`,VB!0`""`0`_J(%
+M``)Q`P`/HP4``L,#`".C!0`!E0,`+:,%``+_`P!*HP4``0,``**C!0`"/`,`
+MZZ,%``%K!``8I`4``6L$`#ND!0`!:P0`:Z0%``%K!`"NI`4``CP#`.*D!0`!
+M:P0`$*4%``%K!``SI04``6L$`&"E!0`!:P0`GJ8%``*,`P#,IP4``F`#``.I
+M!0`"_P,`*:D%``(>!``VJ04``D8#`$FI!0`"$@0`M:D%``*"`P`@J@4``GP#
+M`(:J!0`"<P,`D*H%``(*!`":J@4``K`#`+ZJ!0`"0@,`GZL%``$'``#EJP4`
+M`A$$`&JM!0`"@`0`=*T%``+#`P"`K04``J$#`)6M!0`"@`0`GZT%``+#`P#"
+MK04``@@$``"N!0`!]`,`"JX%``+_`P`=K@4``H`$`#&N!0`"@`0`(*\%``)@
+M`P`NKP4``L,#`'2O!0`"H0,`B*\%``)@`P"6KP4``L,#`+>O!0`""`0`S:\%
+M``+R`P#@KP4``L,#`"BP!0`!`0``,[`%``*J`P!"L`4``MD#`$RP!0`"_P,`
+M<;`%``((!`"KL`4``94#`+6P!0`"_P,`T;`%``((!`#CL`4``O(#`/VP!0`"
+MPP,`.;$%``&5`P!#L04``O\#`&RQ!0`"``0`F+$%``(T`P"DL04``H`$`,ZQ
+M!0`"F`,`[+$%``*D`P`JL@4``M(#`$"R!0`"G@,`6[(%``$&``!@L@4``HP$
+M`'>R!0`"EP0`CK(%``*7!`#1L@4``N0#`/&R!0`"!P0`+;,%``)D`P!%M`4`
+M`H$#`'JT!0`"<`,`T;0%``)P`P!!M04``OP#`'RU!0`"_`,`S+4%``+\`P`%
+MM@4``OP#`#.W!0`!`0``=[<%``)U`P##MP4``0$```>X!0`"=0,`P;@%``$!
+M```$N04``G4#`-&Y!0`!`0``!+H%``)U`P!YN@4``0$``*BZ!0`"=0,`&;P%
+M``(9!`"3O`4``@X$`-Z\!0`"_`,`N+T%``)``P"OO@4``H$#`->^!0`"3`,`
+M[KX%``*)`P!DP`4``G`#`#7"!0`"+P,`K,(%``)``P`MPP4``OP#`%3#!0`"
+M_`,`],,%``(&!`!LQ`4``OP#`!#'!0`"_`,`P,@%``)>!`#2R04``6L$`./)
+M!0`!:P0`=\H%``*`!`".R@4``6L$`*/*!0`!:P0`V\H%``*`!`#RR@4``6L$
+M``O+!0`!:P0`3\L%``*`!`!FRP4``6L$`'O+!0`!:P0`R<L%``*`!``!S`4`
+M`O,#`!;,!0`"9`,`/\P%``)?`P!US`4``@D$`*+,!0`"CP,`MLP%``*`!`#M
+MS`4``N0#``7-!0`"M@,`.,T%``)L`P!<S04``E<$`&C-!0`"O@,`A<T%``('
+M!`"OS04``M(#`,+-!0`"G@,`V,T%``*7!`#KS04``I<$``+.!0`"Y`,`*<X%
+M``('!``\S@4``E\#`'7.!0`"VP,`P<X%``('!``=SP4``ML#`)#/!0`"@0,`
+M'=`%``('!`!`T`4``FX#`(#0!0`"@0,`'M$%``*7!`!/T04``@`$`&'1!0`"
+M-`,`;=$%``*`!`"7T04``I@#`+31!0`"I`,`W=$%``+2`P#PT04``IX#``;2
+M!0`"EP0`&=(%``*7!`!(T@4``N0#`+C2!0`";@,`R=(%``)%`P!ATP4``H$#
+M`([3!0`"7P,`UM0%``)-`P#YU`4``@T$`"#5!0`"?P,`AM4%``('!`"GU04`
+M`FX#`.#5!0`";@,`%=8%``)N`P`HU@4``H$#`&G6!0`"G`,`GM<%``+F`P#)
+MUP4``@<$`-[7!0`"``0`]-<%``(T`P``V`4``H`$`#+8!0`"T@,`1=@%``*>
+M`P!?V`4``I<$`';8!0`"EP0`I-@%``+D`P#)V`4``M8#`!W9!0`"S`,`-=D%
+M``)N`P!FV04``FX#`)79!0`";@,`H]D%``*<`P"ZV04``A@$`.G9!0`"G`,`
+M*-L%``)?`P`WW`4``DT#`%G<!0`"#00`E=P%``)D`P#`W`4``FX#`.#<!0`"
+MP`,`+]T%``(P`P`VW04``38#`$O=!0`">`,`6MT%``*T`P!DW04``C`#`!_?
+M!0`!!0``)-\%``*,!`"MWP4``A@$`(C@!0`"T`,`Z^`%``$V`P`#X04``G@#
+M`#KA!0`!!0``/^$%``*,!`!1X04``F0#`(+A!0`"7P,`Y^$%``+0`P#[X04`
+M`D@#`"SB!0`"#00`S^(%``*7`P#=X@4``E$#`*KC!0`"9`,``^0%``('!`!)
+MY`4``DT#`&[D!0`"VP,`DN0%``(-!``SY04``NT#`+CE!0`"!P0`+^8%``+M
+M`P"_Y@4``I<$`-[F!0`"EP0`$.<%``+M`P!\YP4``I<$`-#G!0`"EP0`L.@%
+M``(3!`#!Z`4``LL#`-3H!0`"-0,`Y^@%``(U`P#XZ`4``MH#``GI!0`"_@,`
+M&ND%``)9`P`KZ04``MX#`%GI!0`"!P0`I^D%``)-`P#)Z04``ML#`.WI!0`"
+M#00`.>H%``)_`P!=Z@4``@<$`(3J!0`!!@``B>H%``*,!`"4Z@4``G\#`+GJ
+M!0`"9`,`M^L%``()!`##ZP4``H`$`-CK!0`""00`Y.L%``*`!`!V[`4``6L$
+M`(SL!0`!:P0`R.P%``*`!`#I[`4``ML#``'M!0`"CP,`&NT%``*/`P`N[04`
+M`H`$`%+M!0`!:P0`>>T%``%K!`"2[04``6L$`+'M!0`"@`0`QNT%``$%``#+
+M[04``HP$`.SM!0`!!@``\>T%``*,!`"=[@4``M`#`.7N!0`";`,`".\%``('
+M!`!,[P4``DT#`''O!0`"VP,`E>\%``(-!`#9[P4``FP#``CP!0`"9`,`+?`%
+M``('!`!W\`4``DT#`)GP!0`"VP,`O?`%``(-!``$\04``@<$`"WQ!0`"?P,`
+M5O$%``)D`P"4\04``0,``.SQ!0`";`,`__$%``%K!``4\@4``DL#`"CR!0`"
+M2P,`//(%``)+`P!0\@4``DL#`&SR!0`":0,`B/(%``)I`P"A\@4``FD#`+KR
+M!0`":0,`W?(%``)I`P#V\@4``FD#``KS!0`"2P,`'O,%``)+`P`R\P4``DL#
+M`%7S!0`":0,`:?,%``)+`P"R\P4``H`$`!'T!0`!:P0`*O0%``%K!``^]`4`
+M`H`$`$[T!0`"VP,`8_0%``*`!`!O]`4``DL#`'ST!0`"@`0`D/0%``)+`P"<
+M]`4``H`$`+_T!0`":0,`S/0%``*`!`#=]`4``DL#`.GT!0`"@`0`^O0%``)+
+M`P`&]04``H`$`!7U!0`")`,`)/4%``*#`P!`]04``FD#`#+V!0`"@0,`4?8%
+M``*!`P#']@4``FH#`.GW!0`"@`0`=_@%``*`!`".^`4``6L$`)_X!0`!:P0`
+M-_D%``*`!`!+^04``6L$`%SY!0`!:P0`Q_D%``*`!`#;^04``6L$`.SY!0`!
+M:P0`<?H%``+!`P"T^@4``HL#`.+Z!0`"]@,`\_H%``+!`P`M^P4``6L$`$3[
+M!0`!:P0`</L%``%K!`"'^P4``6L$`-K[!0`"X`,`Z_L%``(@`P!?_`4``H`$
+M`'[\!0`!:P0`E_P%``%K!`!@_04``2D#`(O]!0`"5`,`JOT%``+(`P#)_04`
+M`?D#`-?]!0`!^0,`5?X%``%K!`!R_@4``6L$`*/^!0`"@`0`N/X%``%K!`#W
+M_@4``6L$`$[_!0`!:P0`K?\%``%K!``%``8``H`$`"``!@`!:P0`-0`&``%K
+M!`!W``8``E`#`($`!@`"GP,`M0`&``*`!``=`08``H`$`(4!!@`"@`0`R@$&
+M``)T`P#6`08``H`$`.P!!@`!:P0``0(&``%K!`!=`@8``H`$`&P"!@`"\`,`
+MB0(&``*%`P"4`@8``6L$`*@"!@`!:P0`OP(&``%K!`",`P8``6L$`#X%!@`"
+M8`,`404&``+#`P"V!08``F`#`,D%!@`"PP,`W@4&``(-!`"M!@8``EX$`/D&
+M!@`!!@``_@8&``*,!``7!P8``F`#`"<'!@`"PP,`00<&``('!`"?!P8``@<$
+M``L(!@`"#00`J0@&``*`!``U"08``H`$`&P)!@`"@`0`C@D&``)@`P">"08`
+M`L,#`*P)!@`"8P,`N0H&``*`!`#P"@8``H`$`!(+!@`"8`,`(@L&``+#`P`P
+M"P8``F,#`&P+!@`"@`0`O`L&``*`!``(#`8``H`$`$$,!@`"8`,`40P&``+#
+M`P!>#`8``@T$`%<-!@`"8`,`9@T&``+#`P#R#08``ML#``<.!@`"@`0`+PX&
+M``+'`P!%#@8``ML#`)0.!@`!!0``F0X&``*,!`"R#@8``E<#`'8/!@`"8`,`
+M@P\&``+#`P";#P8``F`#`*H/!@`"PP,`M`\&``+;`P"?$`8``F`#`*X0!@`"
+MPP,`]1`&``$%``#Z$`8``HP$`!(1!@`"Y`,`(!$&``)D`P`W$08``H`$`$$1
+M!@`"PP,`3!$&``()!`!A$08``H`$`&L1!@`"PP,`=1$&``*Y`P"E$08``@@$
+M``D2!@`!L@,`%1(&``$!```B$@8``O\#`$,2!@`""`0`81(&``+R`P![$@8`
+M`L,#`,P2!@`!`0``VA(&``*J`P#L$@8``MD#`/82!@`"_P,`@!4&``*X`P"J
+M%08``@@$`/$5!@`!`0``_A4&``+_`P`>%@8``@@$`&46!@`!`0``<A8&``+_
+M`P"2%@8``@@$`-(6!@`!`0``W!8&``+_`P#Z%@8``@@$`#H7!@`!`0``1!<&
+M``+_`P!B%P8``@@$`*H7!@`!`0``M!<&``+_`P#2%P8``@@$`!(8!@`!`0``
+M'!@&``+_`P`Z&`8``@@$`'H8!@`!`0``A!@&``+_`P"U&`8``@@$`/<8!@`!
+M:`,``QD&``&@`P`0&08``O\#`$$9!@`""`0`H!D&``%H`P"L&08``:`#`+D9
+M!@`"_P,`[1H&``)I`P!,&P8``F`#`%H;!@`"PP,`<!L&``)L`P",&P8``0,`
+M`*0;!@`!:P0`YAL&``%K!``&'`8``6L$`$L<!@`!:P0`9AP&``%K!`"M'`8`
+M`6L$`-T<!@`!:P0`&QT&``*`!`!''08``J`$`&L=!@`!:P0`BAT&``%K!`"9
+M'08``J`$``T>!@`"!P0`;!X&``+2`P"#'@8``IX#`)T>!@`"EP0`M!X&``*7
+M!`#;'@8``N0#`/\>!@`!:P0`&A\&``%K!`!K'P8``@<$`*D?!@`"7P,`[A\&
+M``(T`P#Z'P8``H`$`#`@!@`!:P0`3R`&``%K!`#>(`8``F`#`.L@!@`"PP,`
+M^2`&``)D`P`7(08``F`#`"8A!@`"PP,`,"$&``)L`P!C(@8``F`#`'(B!@`"
+MPP,`C"(&``*-`P"O(@8``0,``,LB!@`!:P0`YB(&``%K!`"`(P8``D\#`-8C
+M!@`"J`,`]",&``('!``E)`8``I<$`#\D!@`"``0`520&``(T`P!A)`8``H`$
+M`)(D!@`"8`,`GR0&``+#`P"S)`8``E$#`.<D!@`"3P,`/B4&``*H`P!<)08`
+M`@<$`(TE!@`"EP0`IR4&``(`!`"])08``C0#`,DE!@`"@`0`^B4&``)@`P`'
+M)@8``L,#`!LF!@`"40,`0"8&``%K!`!;)@8``6L$`+$F!@`"-`,`O28&``*`
+M!`#X)@8``6L$`!<G!@`!:P0`<"<&``('!`"N)P8``E\#`"XH!@`!:P0`1B@&
+M``%K!`!O*`8``F`#`'XH!@`"PP,`BR@&``)L`P#0*`8``6L$``HJ!@`"@`0`
+M93`&``('!`"N,`8``L0#`,HP!@`"7@0`W3`&``)#`P`E,@8``DD#`#<R!@`"
+MQ@,`*C,&``*`!`#Y,P8``0D```$T!@`!"0``"30&``)5`P`L-`8``0D``#0T
+M!@`!"0``/#0&``)5`P!A-`8``DD#`&PT!@`"Q@,`#S4&``)>`P"Q-08``6L$
+M`/,U!@`!:P0`"38&``(7!``9-@8``A<$`"DV!@`"%P0`.38&``(7!`!)-@8`
+M`A<$`%DV!@`"%P0`:38&``(7!`!V-@8``A<$``LW!@`"%P0`CC<&``)[`P">
+M-P8``L,#`-8W!@`""`0`Z#<&``)Z`P!&.`8``2(#`%$X!@`"J@,`6S@&``+_
+M`P"6.`8``@@$`*XX!@`">@,`O#D&``$B`P#*.08``JH#`-<Y!@`"_P,`&3H&
+M``+K`P`M.@8``C0#`#DZ!@`"@`0`9CH&``+/`P!Y.@8``C0#`(4Z!@`"@`0`
+MH#H&``+K`P"U.@8``C0#`,$Z!@`"@`0`"CL&``+/`P#D/`8``C$#`!8]!@`!
+M`P``73X&``(/!`!Y/@8``GD#`+(_!@`"'00`)T`&``(=!``[0`8``EX$`&Q`
+M!@`"'`0`?T`&``&L`P"U0`8``@\$`-%`!@`">0,`7D$&``(<!`"$008``AP$
+M`#9"!@`"*P,`14(&``*4`P!50@8``M\#`*A"!@`!`P``DT0&``%K!`"J1`8`
+M`H`$`(%%!@`!:P0`]D4&``*`!`#-1@8``6L$`/Y&!@`",P,`1TD&``%K!`!U
+M2@8``9D#`*M*!@`!:P0`%4L&``$R`P!+2P8``6L$`+5+!@`!*0,`ZTL&``%K
+M!`"!3`8``68#`+=,!@`!:P0`1TT&``$R`P!J308``2D#`(M-!@`!F0,`L4T&
+M``%F`P!S3@8``M@#`-A.!@`!:P0`]4X&``$)``#\3@8``0D```)/!@`!"0``
+M!T\&``$)```.3P8``0D``!1/!@`!"0``(T\&``$)```J3P8``0D``#!/!@`!
+M"0``-D\&``%B`P!03P8``0D``%U/!@`!"0``8T\&``$)``!Y3P8``0D``(5/
+M!@`!"0``DD\&``$)``"83P8``0D``*Y/!@`!"0``PT\&``$)``#43P8``0D`
+M`.M/!@`!"0```%`&``$)```@4`8``6(#`#%0!@`!"0``2%`&``$'``!L4`8`
+M`0D``(M0!@`!8@,`G%`&``$)``"R4`8``0D``,A0!@`!"0``WU`&``$)``#T
+M4`8``0D``!11!@`!8@,`)%$&``$)```[408``0<``%Y1!@`!"0``?U$&``%B
+M`P"0408``0D``*91!@`!"0``U%$&``%B`P#O408``6(#`/E1!@`!!P``+U(&
+M``%B`P"#4@8``0<``))2!@`!!P``G%(&``$'``"F4@8``0<``*]2!@`!!P``
+MV%(&``%B`P#J4@8``6(#`/]2!@`!8@,`&E,&``%B`P!34P8``6(#`*)3!@`"
+M6`0`M%,&``$'``#)4P8``0<``--3!@`!!P```50&``%B`P`-5`8``0<``!-4
+M!@`!8@,`&50&``$'```?5`8``6(#`"54!@`!!P``*U0&``%B`P`R5`8``6(#
+M`$-4!@`!8@,`2E0&``%B`P!85`8``6(#`%]4!@`!8@,`;%0&``%B`P!R5`8`
+M`6(#`(54!@`!8@,`DU0&``$'``"L5`8``6(#`+-4!@`!8@,`P50&``%B`P#(
+M5`8``6(#`-54!@`!8@,`VU0&``%B`P#Y5`8``0<```-5!@`!!P``454&``$)
+M``!:508``0D``(15!@`!!P``G%4&``$'``"S508``0<``,-5!@`!!P``Z%4&
+M``%B`P#Z508``6(#`!E6!@`!8@,`/%8&``%B`P!05@8``6(#`&16!@`!8@,`
+MTU8&``$)``#;5@8``0D``"M8!@`"9@0`/%@&``)F!`"#6`8``0<``(M8!@`!
+M!P``G5@&``$'``"E6`8``0<``*Q8!@`!!P``LE@&``$'``"[6`8``0<``,A8
+M!@`!!P``SE@&``$'``#Z6`8``J0$`!Q9!@`"G`0`3ED&``)<`P!<608``EP#
+M`(-9!@`"-`,`I%D&``)7!`"X608``64#`,I9!@`">`0`Z5D&``*9!``/6@8`
+M`OH#`!=:!@`"^@,`'UH&``*S`P`X6@8``K,#`$U:!@`"70,`65H&``*`!`!A
+M6@8``J4#`&E:!@`"U0,`?5H&``%E`P"56@8``G@$`*!:!@`"9`,`JUH&``)D
+M`P`K6P8``E4#`#];!@`"@`0`2EL&``+X`P"!6P8``08``(9;!@`"C`0`"%P&
+M``$%``!27`8``04``'=<!@`!!0``DUP&``%2`P"<7`8``E`$`+5<!@`!!@``
+MB%T&``$%``"-708``HP$`+==!@`"5P0`R%T&``$!``#:708``G@$`)I?!@`"
+MI`,`PE\&``*8`P#U7P8``@<$`&%@!@`"!P0`MF`&``*7!``Y808``@<$`)AA
+M!@`"EP0`AF(&``+W`P"B8@8``IX#`/5C!@`"30,`.V0&``('!`!\9`8``ML#
+M`,UD!@`"=`,`\V0&``(-!``B908``@<$`'UE!@`"[0,`(F8&``(`!`!49@8`
+M`DT#`(%F!@`"VP,`MF8&``(-!`!#9P8``F`#`%)G!@`"PP,`P&<&``((!`!U
+M:08``EX$`*]J!@`!`0``%6L&``([`P`@:P8``JH#`#%K!@`"V0,`4&L&``+R
+M`P"C:P8``EX$`/MK!@`"7@0`&FP&``*J`P`M;`8``MD#`$-L!@`"_P,`56P&
+M``+#`P#/;`8``@@$`.EL!@`"\@,`_FP&``+#`P`E;08``I<$`#YM!@`"``0`
+M@&T&``)>!`"*;@8``CL#`,=N!@`!`0``U6X&``*J`P#K;@8``MD#`/QN!@`"
+M_P,`-F\&``(`!`!0;P8``H`$`%AO!@`"-`,`L&\&``)>!`#&;P8``F`#`--O
+M!@`"PP,`[F\&``*7!``B<`8``@$$`#)P!@`"`00`3'`&``(T`P!)A`8``@@$
+M`)2$!@`!`0``GH0&``+_`P#:A`8``@`$`/2$!@`"@`0`_(0&``(T`P`TA08`
+M`L,#`(B%!@`""`0`!X8&``$!```4A@8``O\#`%*&!@`"``0`;(8&``*`!`!X
+MA@8``C0#`+^&!@`"\@,`.(<&``$!``!#AP8``JH#`%F'!@`"V0,`9H<&``+_
+M`P"AAP8``@`$`+B'!@`"@`0`Q(<&``(T`P#[AP8``F`#`!"(!@`"PP,`'(@&
+M``((!``VB`8``F`#`"Z)!@`!`0``/(D&``*J`P!2B08``MD#`%^)!@`"_P,`
+MFHD&``(`!`"QB08``H`$`+V)!@`"-`,`_(D&``)@`P`-B@8``L,#`$F*!@`"
+MEP0`6XH&``(`!`!QB@8``H`$`'F*!@`"-`,`LXH&``*7!`#YB@8``J0#`"&+
+M!@`"F`,`/XL&``*>`P"1BP8``@@$`/*+!@`!`0``_(L&``+_`P`ZC`8``@`$
+M`%2,!@`"@`0`7(P&``(T`P"BC`8``L,#`-*,!@`!`P``YXP&``+W`P`RC08`
+M`H<#`%Z-!@`"O0,`<HT&``+O`P!&C@8``I$#`%F.!@`"D0,`;HX&``*1`P"!
+MC@8``I$#`+N.!@`"=`0`U(X&``)T!`#LC@8``G0$`#Z/!@`"O`,`7X\&``)_
+M!`![CP8``G\$`)Z/!@`"?P0`NH\&``)_!`#>CP8``G\$`/J/!@`"?P0`'I`&
+M``)_!``ZD`8``G\$`&F0!@`"?P0`AI`&``)_!`"PD`8``G\$`,R0!@`"?P0`
+M[I`&``)_!``*D08``G\$`"Z1!@`"?P0`2I$&``)_!`!ND08``G\$`(J1!@`"
+M?P0`KI$&``)_!`#*D08``G\$`.Z1!@`"?P0`"I(&``)_!``ND@8``G\$`$J2
+M!@`"?P0`;I(&``)_!`"*D@8``G\$`*Z2!@`"?P0`RI(&``)_!`#ND@8``G\$
+M``J3!@`"?P0`+I,&``)_!`!*DP8``G\$`&Z3!@`"?P0`BI,&``)_!`"NDP8`
+M`G\$`,J3!@`"?P0`]Y,&``*Q!``<E`8``K$$`$>4!@`"L00`;)0&``*Q!`"7
+ME`8``K$$`+R4!@`"L00`YY0&``*Q!``,E08``K$$`#>5!@`"L00`7)4&``*Q
+M!`"'E08``K$$`*R5!@`"L00`UY4&``*Q!`#\E08``K$$`!>6!@`"LP,`)98&
+M``*S`P`ME@8``ET#`#F6!@`"@`0`098&``*E`P!)E@8``M4#`%26!@`"`00`
+M7Y8&``(!!`!PE@8``0<``'66!@`"300`B98&``%W!`"2E@8``7<$`)F6!@`!
+M+@0`K98&``%M!`"WE@8``I,$`,Z6!@`!;00`UY8&``%M!`!.EP8``6T$`#&8
+M!@`!;00`LY@&``(^!`#QF`8``20$`/F8!@`!)`0`!)D&``$N!``0F08``2X$
+M`":9!@`!)`0`>ID&``&!!``+F@8``20$`(B:!@`"C00`G9H&``*-!`"QF@8`
+M`20$`.&:!@`"C00`^9H&``*-!``-FP8``HT$`"6;!@`"C00`09L&``*-!`!G
+MFP8``F`$`'>;!@`"C00`@)L&``$D!`#$FP8``8$$`.6;!@`",P0``YP&``*/
+M!``?G`8``0D``"6<!@`!"0``Q)P&``)_!``WG08``D@$`':=!@`"?P0`_YT&
+M``*=!`!GG@8``CL$`(6>!@`"?P0`F9X&``)_!`#OG@8``CH$`/J>!@`!D@0`
+M$I\&``(U!`!(GP8``BL$`'N?!@`"+`0`TY\&``&!!`#?GP8``D,$`.>?!@`"
+MH@0`9Z`&``$)``""H`8``:T$`(^@!@`!E`0`J:`&``$)``"OH`8``0D``+.@
+M!@`!L@0`N:`&``$)``#!H`8``0D``,>@!@`">`0`ZJ`&``*/!`#WH`8``0$`
+M`/Z@!@`!"0``%:$&``)_!``RH08``0D``#VA!@`!"0``2:$&``$)``"_H08`
+M`20$``BB!@`"L@0`(:(&``*#!`!%H@8``H`$`$VB!@`"7P0`<Z(&``%M!`!\
+MH@8``6T$`(:B!@`!;00`O:(&``);!`#PH@8``G\$``JC!@`!)`0`BZ,&``*/
+M!`#LHP8``F<$`"BD!@`"?P0`0:0&``*P!`!;I`8``H0$`*JD!@`"@P0`@J8&
+M``(F!`"7I@8``EL$`*:F!@`"CP0`WJ8&``)_!``$IP8``H,$`$>G!@`"@P0`
+MS:<&``%M!`!-J`8``J`$`%ZH!@`"3P0`?*@&``*@!`#VJ`8``D\$``RI!@`"
+MH`0`;ZD&``*#!`"/J08``D\$`"NJ!@`!`0``3ZH&``$'``!6J@8``EH$`'2J
+M!@`"?P0`FZH&``)_!`"_J@8``I`$`!&K!@`"?P0`&ZL&``$!``!`JP8``J\$
+M`(&K!@`"1`0`FJL&``*/!`"PJP8``0$``.>K!@`"(`0`*JP&``([!`!.K`8`
+M`J($`%JL!@`!D@0`;*P&``(U!`"CK`8``2,$`,:L!@`"KP0`UZP&``)$!`#Y
+MK`8``G\$`!FM!@`"?P0`'ZT&``$!```FK08``C$$`#FM!@`!!P``*ZX&``)$
+M!`!'K@8``J@$`&JN!@`"KP0`LZ\&``*H!``CL`8``J@$`$:P!@`!`0``>[`&
+M``*O!`"^L`8``J\$`.ZP!@`!`0``2K$&``(F!`!?L08``I`$`'.Q!@`"6P0`
+M1K,&``$'``!1LP8``EH$`%JS!@`"?P0`$K0&``$'```=M`8``EH$`":T!@`"
+MCP0`M+0&``$'``"_M`8``EH$`,BT!@`"CP0`1K4&``$'``!1M08``EH$`%JU
+M!@`"CP0`1K8&``$'``!1M@8``EH$`%JV!@`"CP0`"K<&``$'```5MP8``EH$
+M`!ZW!@`"CP0`QK<&``$'``#-MP8``EH$`.ZW!@`"?P0`9;@&``(W!`#5N`8`
+M`C<$`)2Y!@`"-P0`NKD&``(W!`#@N@8``F($`#R[!@`"6P0`7KL&``(V!`")
+MNP8``EL$`(^[!@`"-@0`IKL&``$'``"MNP8``EH$`+:[!@`"CP0`R+L&``);
+M!`!RO08``CT$`*.]!@`".`0`R+T&``&!!``)O@8``D`$`"N^!@`!@00`-+X&
+M``&2!`!\O@8``C@$`)R^!@`".`0`#;\&``(B!``XOP8``B8$`$R_!@`"-@0`
+M=+\&``&!!`">OP8``C@$`+>_!@`"1`0`WK\&``(]!`#HP`8``F($`(?!!@`"
+M-@0`F\$&``);!`#AP08``C@$``S"!@`"/00`W,(&``$'``#CP@8``EH$`.S"
+M!@`"?P0`Y\,&``&!!``,Q`8``C@$`#+$!@`"/00`^,0&``$'``#_Q`8``EH$
+M``C%!@`"?P0`-,4&``)$!`!1Q@8``F($`,S&!@`"/@0`B\<&``*J!`#@QP8`
+M`B$$``7(!@`!!P``#L@&``):!``7R`8``HT$`#O(!@`!`P``1<@&``*9!`"+
+MR`8``0,``./(!@`"KP0`)<D&``*O!`!9R08``ID$`'_)!@`"CP0`ELD&``$!
+M``"MR08``J\$`,G)!@`"1`0`XLD&``$'``#LR08``7<$`/G)!@`!!P```\H&
+M``$'```1R@8``0<``!K*!@`!!P``'\H&``*L!``XR@8``F$$`&;*!@`"@@0`
+MD,H&``$!``"9R@8``H<$`,S*!@`"800`X\H&``)N!``%RP8``H($`"++!@`!
+M`P``FLL&``$!``"ERP8``H<$`.?+!@`"(`0`4<P&``)A!`!SS`8``J\$`*?,
+M!@`!`0``U,P&``%M!`#*S08``E($`.C-!@`!=P0`1LX&``*.!`!ES@8``FP$
+M`('.!@`!;00`8<\&``%M!`!:T`8``6T$`!71!@`!;00`LM0&``%M!`!2U08`
+M`6T$`*S5!@`!`P``I-8&``)!!`#LV`8``G8$`(S:!@`"=@0`"-L&``)V!`"*
+MVP8``G8$`/;;!@`"=@0`;-P&``)V!`#6W`8``G8$`&'=!@`"+00`:=X&``(M
+M!`#$WP8``BT$`*;@!@`",@0`2N$&``(M!``SX@8``C($`-WC!@`"7@0`Z^,&
+M``*J!`";Y08``EX$`*GE!@`"J@0`,>8&``))!`#)Y@8``DD$`&GG!@`"200`
+MTN<&``*)!``UZ`8``DD$`*+H!@`"B00`S>H&``(X!``$ZP8``C@$`'#K!@`"
+M.`0`HNX&``))!``.[P8``DD$`(+O!@`"200`[.\&``))!`!H\`8``DD$`-GP
+M!@`!`P``(?0&``(F!``[]`8``CP$`(#T!@`".`0`Z?0&``(X!`#U]`8``B8$
+M`!#U!@`"0`0`*?4&``);!`!3]08``F$$`)7U!@`"I@0`G?4&``)E!`"O]08`
+M`0$``,CU!@`";@0`./8&``*'!`!3]@8``G\$`%KV!@`!`0``=O8&``*O!`"3
+M]@8``HH$`*#V!@`!`0``N?8&``)N!`!$]P8``H<$`&'W!@`"?P0`:?<&``)A
+M!`#4]P8``0$``/+W!@`"KP0`,?@&``))!`"A^`8``DD$`)7Y!@`"-@0`ROD&
+M``(W!`#:^08``C8$`!'Z!@`"200`7/H&``(T!`"!^@8``B8$`)CZ!@`"-`0`
+ML_H&``(F!`!2^P8``F4$`&/[!@`"I@0`T/L&``$!``!&_`8``0$``&#\!@`"
+M?`0`:_P&``)$!`"F_`8``0$``,#\!@`"?`0`R_P&``)$!`#L_`8``0$```/]
+M!@`"?`0`??T&``$!``")_08``GT$`-3]!@`!*`0`Z?T&``)$!``@_@8``D0$
+M`$'^!@`!*`0`5OX&``)$!`",_@8``D0$`*C_!@`"1`0`&@`'``)$!``Z``<`
+M`D0$``H!!P`!`0``+@$'``)\!``^`0<``0$``%@!!P`"?`0`M0$'``$!``!)
+M`P<``GT$`&8#!P`"200`;P,'``**!`!V`P<``0$``(\#!P`";@0`LP,'``))
+M!``8!`<``H<$`#($!P`"?P0`.@0'``)A!`![!`<``0$``)X$!P`"KP0`L@0'
+M``$!``#+!`<``FX$`.T$!P`"@@0`_00'``*/!`!G!0<``H<$`(8%!P`"4P0`
+M"08'``))!`!!!@<``0,``,(&!P`",P0`#P<'``(S!`!3!P<``DD$`*T'!P`"
+M200`#0@'``)V!`!$"`<``G8$`#,*!P`!`0``KPH'``)B!`#_"@<``DD$`$H+
+M!P`"-`0`<@L'``(F!`"&"P<``EL$`.L+!P`"200`)0P'``(T!`"+#`<``F($
+M`.P,!P`")@0`"`T'``);!``,#@<``G8$`&8.!P`"*@0`0`\'``$!``#%#P<`
+M`J8$`.`/!P`"CP0`^P\'``)3!``7$`<``B\$`+L0!P`!`0``*Q$'``**!``Z
+M$0<``F4$`%D1!P`"H@0`GQ$'``$!``"Y$0<``GP$`,01!P`"1`0`^1$'``$!
+M```:$@<``GP$`"@2!P`"1`0`=Q('``$!``"1$@<``GP$`)P2!P`"1`0`S!('
+M``$!``#G$@<``GP$`/42!P`"1`0`&!,'``$)```C$P<``0D``#(3!P`!"0``
+M1!,'``$)``!,$P<``0D``&,3!P`!"0``>!,'``$)``"4$P<``0D``)L3!P`!
+M"0``J!,'``$)``"V$P<``0D``"\4!P`"*00`4!0'``))!`!M%`<``0,``.<4
+M!P`!`0```14'``)\!``,%0<``D0$`%\5!P`"1`0`U14'``)!!``#%@<``0$`
+M`!T6!P`"?`0`*!8'``)$!`!(%@<``D$$`&L6!P`!`0``A18'``)\!`"0%@<`
+M`D0$`*<6!P`"4P0`]!8'``)$!``5%P<``D0$`'07!P`"1`0`<A@'``)!!`"M
+M&`<``0$``,X8!P`"?`0`W!@'``)$!``+&0<``D$$`$(9!P`!`0``7!D'``)\
+M!`!G&0<``D0$`((9!P`"1`0`G!D'``)$!`!!&@<``0$``%L:!P`"?`0`9AH'
+M``)$!`"9&@<``0$``+,:!P`"?`0`OAH'``)$!``<&P<``D0$`#T;!P`"1`0`
+M3QL'``*B!`"3&P<``D0$`/0;!P`"H@0`$AP'``$!```K'`<``FX$`&\<!P`"
+MB@0`EAP'``)E!`"F'`<``F4$`+0<!P`"900`OQP'``$!``#8'`<``FX$`"$=
+M!P`!;00`,1T'``%M!``V'0<``JL$`(`=!P`",P0`T1T'``%M!`#N'0<``6T$
+M`#4>!P`"200`3AX'``$!``!G'@<``FX$`'L>!P`"D`0`B1X'``(U!`"8'@<`
+M`0$``+$>!P`";@0`\QX'``)$!``2'P<``0,``$8?!P`"?P0`6!\'``)A!`!?
+M'P<``0$``'@?!P`";@0`LQ\'``$!``#,'P<``FX$`!H@!P`"7@0`02`'``$!
+M``!:(`<``FX$`+`@!P`"7@0`]B`'``$!```/(0<``FX$`#HA!P`"200`;B$'
+M``)>!`"<(0<``0$``+4A!P`";@0`VB$'``))!``((@<``0$``"$B!P`";@0`
+M2R('``))!`!((P<``G\$`(,C!P`!`0``G",'``)N!`"V(P<``DD$`/0C!P`"
+M0`0`_B,'``$!```7)`<``FX$`#`D!P`"200`."0'``))!``_)`<``C\$`%,D
+M!P`!`0``:20'``)N!`"()`<``DD$``<E!P`"7@0`(R4'``)E!``M)0<``0$`
+M`$8E!P`";@0`OR4'``$!``#8)0<``FX$`.8E!P`"200`/R8'``)`!`!+)@<`
+M`0$``&0F!P`";@0`GR8'``$!``"X)@<``FX$`,8F!P`"200`FB@'``)`!`"G
+M*`<``0$``,`H!P`";@0`[B@'``%M!``T*0<``DD$`&PI!P`!`P``!"L'``)`
+M!`#`*P<``EX$`#PL!P`!`0``<BP'``)E!`".+`<``0$``*\L!P`";@0`YRP'
+M``([!``'+0<``G\$`!(M!P`!D@0`*BT'``(U!`!++0<``D0$`%TM!P`"?P0`
+M<RT'``$!``"6+0<``J\$`-@M!P`!`0``\2T'``)N!``^+@<``0$``$4N!P`"
+M,00`>RX'``$!``">+@<``J\$`*\N!P`!`0``R"X'``)N!`#X+@<``G\$`#0O
+M!P`".@0`7"\'``(K!`"/+P<``BP$`.HO!P`"0P0`\B\'``*B!`";,`<``J($
+M`+TP!P`"H@0`UC`'``*0!``*,0<``H\$`"`Q!P`!`0``4C$'``(@!`"$,0<`
+M`B,$`*$Q!P`"200`-S('``)`!`!%,@<``HH$`%PR!P`!`0``=3('``)N!`"J
+M,@<``H<$`"XS!P`!`0``23,'``)N!`"-,P<``G8$`*DS!P`"CP0`Q#,'``$!
+M``#?,P<``FX$`/@S!P`"@@0`$30'``)_!`!\-`<``60$`)`T!P`!9`0`NS0'
+M``$#``#F-`<``G\$`.XT!P`"800`"S4'``$#```O-0<``G\$`#<U!P`"800`
+M>#4'``$!``"2-0<``0$``+(U!P`"600`]S4'``$!```&-@<``H<$`.<W!P`"
+M?P0``S@'``(L!``:.`<``0$``#8X!P`"KP0`K#@'``$!``#".`<``FX$`,TX
+M!P`"1`0`XC@'``$!``#X.`<``FX$`!<Y!P`"800`'CD'``$!```X.0<``J\$
+M`'@Y!P`"I@0`A#D'``*"!`"5.0<``0$``)TY!P`"AP0`P#H'``)S!`#/.@<`
+M`F$$``8[!P`"<P0`%3L'``)A!``<.P<``0$``#4[!P`";@0`>3L'``*'!`"_
+M.P<``0$``-T[!P`"KP0`/SP'``)S!`!+/`<``F$$`%D\!P`!`0``<CP'``)N
+M!`"1/0<``H<$``0^!P`"@@0`,#X'``)S!`!6/@<``0$``'$^!P`";@0`?CX'
+M``%D!`"5/@<``60$`,$_!P`!`0``R#\'``$!``#7/P<``H<$`$)`!P`!`0``
+M8$`'``)9!``B00<``J$$`!!"!P`"800`<$('``)_!`"10@<``CP$`*)"!P`!
+M`0``NT('``)N!`#,0@<``DD$`/)"!P`!`0``"T,'``*O!``B0P<``H($`$I#
+M!P`!`0``4D,'``*'!`"80P<``DD$`-Q#!P`"200`Y4,'``*0!``:1`<``DD$
+M`#Q$!P`!`0``540'``)N!`!O1`<``3D$`)M$!P`!.00`HD0'``)+!`#%1`<`
+M`0$``-M$!P`">`0`+D4'``(E!`!I10<``3D$`+!%!P`"5P0`Q$4'``$!``#4
+M10<``G@$`.9%!P`!`0``_T4'``)N!`";1@<``0$``+1&!P`";@0`T48'``(@
+M!``'1P<``0$``!U'!P`";@0`8D<'``&!!`!J1P<``08``)I'!P`!D@0`J4<'
+M``$&``#:1P<``60$`/U'!P`!!@``+4@'``$H!``W2`<``08``&=(!P`!.00`
+M@T@'``$!``"D2`<``FX$`-9(!P`!!@``/4D'``$&``!220<``9($`%E)!P`!
+M`0``<DD'``)N!`"!20<``08``)Y)!P`!9`0`I4D'``$!``"^20<``FX$`,U)
+M!P`!!@``XDD'``$H!`#I20<``0$```)*!P`";@0`$4H'``$&```K2@<``0$`
+M`$Y*!P`"KP0`6$H'``$&``!R2@<``0$``)5*!P`"KP0`J$H'``$!``#!2@<`
+M`FX$`/Y*!P`!`0``%TL'``)N!`!B2P<``0$``'M+!P`";@0`PDL'``$!``#;
+M2P<``FX$`$E,!P`!`0``8DP'``)N!`"M3`<``0$``,9,!P`";@0`74T'``$!
+M``!V30<``FX$`%A.!P`!`0``<4X'``)N!`!43P<``0$``&U/!P`";@0`4%`'
+M``$!``!I4`<``FX$`+M0!P`!`0``T5`'``)N!``?40<``0$``#51!P`";@0`
+M9E$'``))!`"Y40<``0$``-)1!P`";@0`!E('``))!`!94@<``0$``')2!P`"
+M;@0`IE('``))!`#Y4@<``0$``!)3!P`";@0`:E,'``))!`"F4P<``0$``+]3
+M!P`";@0`[U,'``))!``X5`<``DD$`'=4!P`!`0``D%0'``)N!`#"5`<``DD$
+M`!Q5!P`"200`<U4'``$!``",50<``FX$`,95!P`!@00`"58'``))!``65@<`
+M`DD$`%Q6!P`"200`B%8'``$!``"H5@<``J\$``]7!P`"200`'%<'``))!`!<
+M5P<``DD$`(Q7!P`!`0``K%<'``*O!``F6`<``0$``#]8!P`";@0`_%@'``$!
+M```560<``FX$`(-9!P`"200`D%D'``))!`#060<``DD$``!:!P`!`0``(%H'
+M``*O!`"66@<``DD$`*-:!P`"200`Y%H'``))!``46P<``0$``#1;!P`"KP0`
+M:EL'``))!`"`6P<``DD$`,Y;!P`"200`VUL'``))!``@7`<``DD$`%!<!P`!
+M`0``<%P'``*O!`"B7`<``DD$`+M<!P`"200`'UT'``))!``L70<``DD$`'!=
+M!P`"200`H%T'``$!``#`70<``J\$`.Y=!P`"200`!%X'``))!`!$7@<``J$$
+M`&Y>!P`"200`X%X'``$!````7P<``J\$`$%?!P`!`0``6E\'``)N!`"*7P<`
+M`DD$`*!?!P`"200`VE\'``))!``68`<``DD$`"Q@!P`"200`9F`'``))!`"B
+M8`<``DD$`+A@!P`"200`\F`'``))!``N80<``DD$`$1A!P`"200`>F$'``))
+M!`"V80<``DD$`,QA!P`"200``F('``))!``^8@<``DD$`%1B!P`"200`BF('
+M``))!`#&8@<``DD$`-QB!P`"200`.6,'``))!`#]8P<``G($`#)E!P`!`0``
+M6V4'``*E!`"B90<``DD$`+AE!P`"200`\64'``))!``49@<``0$``#1F!P`"
+MKP0`8F8'``))!`!X9@<``DD$`+%F!P`"200`U&8'``$!``#T9@<``J\$`"9G
+M!P`"200`/&<'``))!`!29P<``DD$`%IG!P`"200`SF<'``))!`#69P<``DD$
+M``1H!P`!`0``)&@'``*O!`!2:`<``DD$`&AH!P`"200`IF@'``))!``L:0<`
+M`0$``$QI!P`"KP0`>FD'``))!`"0:0<``DD$`,UI!P`"200`\&D'``$!```0
+M:@<``J\$`$)J!P`"200`6&H'``))!`"4:@<``0$``+1J!P`"KP0`YFH'``))
+M!`#\:@<``DD$`#AK!P`!`0``6&L'``*O!`"(:P<``0$``*AK!P`"KP0`Z6L'
+M``$!```";`<``FX$`(1L!P`!`0``G6P'``)N!`#[;`<``DD$`!)M!P`"200`
+M2FT'``))!`"S;0<``DD$`,IM!P`"200``FX'``))!``^;@<``DD$`%1N!P`"
+M200`@&X'``$!``"@;@<``J\$`/EN!P`"200`!F\'``))!`!D;P<``DD$`,MO
+M!P`"H00`[V\'``$!```(<`<``FX$`&5P!P`"200`<G`'``))!`"\<`<``DD$
+M``!Q!P`!`0``('$'``*O!`!&<0<``DD$`%QQ!P`"200`CW$'``))!`"T<0<`
+M`0$``-1Q!P`"KP0`,W('``%M!`"9<@<``0$``+)R!P`";@0`1G,'``$!``!:
+M<P<``FX$`/AS!P`!`0``8W0'``))!`!Z=`<``DD$`$AU!P`"800`3W4'``$!
+M``!H=0<``FX$`(%U!P`"200`D'4'``*"!`"G=0<``0$``,!U!P`";@0`&W8'
+M``$!```B=@<``0$``"MV!P`"AP0`1'8'``$'``!*=@<``0<``%)V!P`!!P``
+MNW<'``*#!`"C>`<``BD$`*-Y!P`"(00`N'D'``)A!`"_>0<``0$``-AY!P`"
+M;@0`7WH'``$%``!D>@<``HP$`&]Z!P`"1`0`@7H'``$%``"&>@<``HP$`)%Z
+M!P`"1`0`I7H'``)_!`"M>@<``F$$`-%Z!P`"@@0`Z'H'``$!```!>P<``FX$
+M`%=[!P`"CP0`@GL'``$!``";>P<``FX$`*-[!P`"800`NWL'``)>!`#9>P<`
+M`0$``.=[!P`!`0``_7L'``)N!`#H?`<``0$``/%\!P`"AP0`!7T'``&2!`!O
+M?0<``G\$`'=]!P`"800`F'T'``$!``"T?0<``J\$`,5]!P`"800`#7X'``)A
+M!``:?@<``H($`#]^!P`!`0``1WX'``*'!`!U?@<``H($`+E^!P`!`0``PWX'
+M``$!``#,?@<``H<$`-9^!P`"@P0`\WX'``*/!``$?P<``08```E_!P`"C`0`
+M@'\'``)_!`"S?P<``H\$`,1_!P`!!@``R7\'``*,!`!`@`<``G\$`$."!P`!
+M2@0`7H('``*E!`!T@@<``DH$`-:#!P`"4P0`!(4'``*H!`"EA0<``J\$`-J&
+M!P`!2@0`]88'``*E!``+AP<``DH$`(6'!P`"KP0`WH<'``(G!``PB`<``H<$
+M`):(!P`"AP0`N8@'``*#!``!B0<``J\$`!J)!P`"2`0`3(D'``)S!`#,B@<`
+M`H<$`.J*!P`"?P0``8L'``*H!`!7BP<``0$```^,!P`"9P0`28P'``$!``!0
+MC`<``0$``,",!P`"AP0`5(T'``)!!`#0C0<``K4$`*".!P`"M00`T8X'``*0
+M!`"OCP<``I`$`-R0!P`"8P0`\9`'``**!``#D0<``F4$`#F1!P`"8@0`H)('
+M``)>!`#ED@<``C@$``23!P`"/00`)9,'``)"!`#5DP<``D$$`#&4!P`"000`
+M490'``**!`#`E0<``H\$``"9!P`"M00`GYD'``*U!`!`F@<``K4$`'F<!P`"
+M7@0`%9T'``)"!``CG0<``CT$`#Z=!P`".`0`;YT'``)`!`#MG0<``F4$`"Z>
+M!P`"4P0`4)X'``)3!`!=G@<``E,$`&Z>!P`"900`>IX'``)E!``VGP<``G8$
+M`/6?!P`"-`0`):$'``)$!`!5H0<``D8$`)NA!P`"=@0`L:$'``(T!`#'H0<`
+M`F,$`-ZA!P`"B@0`%J('``$#```_H@<``BP$`+ZB!P`"900`M*,'``)C!``9
+MI`<``D8$`#2D!P`"B@0`W*0'``),!``:I0<``DP$`"RE!P`"3`0`U:4'``(O
+M!`#>I0<``D8$`%2F!P`"*@0`(J<'``)E!``]IP<``88$`,2G!P`";`0`YJ<'
+M``*:!``2J`<``K$$`/NH!P`!`0``'JD'``*O!``.J@<``G\$`!RJ!P`"J`0`
+M:ZH'``)G!`"-J@<``0$``,RJ!P`!`0``U:H'``*'!`#DJ@<``0<``.FJ!P`"
+MK`0`_*H'``$'```%JP<``EH$`!:K!P`"C00`):L'``$'```NJP<``EH$`#BK
+M!P`"CP0`2*L'``$'``!1JP<``EH$`%VK!P`"?P0`EJL'``$'``"=JP<``EH$
+M`-^L!P`"?P0``ZT'``*H!``RK@<``G8$`&>N!P`"<@0`[*\'``)G!``AL`<`
+M`0$``"^P!P`"AP0`@+`'``*H!`#KL`<``F<$`!2Q!P`!`0``&[$'``$!``!%
+ML0<``H<$`&BQ!P`!!P``;;$'``*L!`"4L@<``K4$`,JR!P`"MP0`[K('``)_
+M!`#\L@<``J@$`+.S!P`"AP0`[;,'``*'!`"IM`<``0$``+:T!P`"AP0`"K4'
+M``)_!``MM0<``J@$`/JU!P`"9P0`-K8'``$!``!"M@<``H<$`(.X!P`"9P0`
+MK+@'``$!``"SN`<``0$``->X!P`"AP0`^+@'``$'``#]N`<``JP$`,RY!P`"
+M?P0`"KH'``*H!`!IN@<``H<$`+2Z!P`"?P0`PKH'``*H!`"JNP<``G\$`!.\
+M!P`"9P0`7[P'``$!``!FO`<``0$``'^\!P`"AP0`I+T'``*H!`!OO@<``F<$
+M`*:^!P`!`0``K;X'``$!``"\O@<``H<$`-N^!P`"9P0`#[\'``$!```6OP<`
+M`0$``#>_!P`"AP0`<K\'``)G!`"IOP<``0$``+"_!P`!`0``O[\'``*'!`#9
+MOP<``J@$`&_`!P`"CP0`B\`'``)2!`#'P`<``HX$`-W`!P`"?P0`=\,'``)_
+M!`"DPP<``H\$`%_&!P`"<@0`S,8'``*/!``%R`<``EX$`!O(!P`"7@0`?<@'
+M``)_!`##R`<``G\$``[)!P`"J`0`>LD'``)G!`"LR0<``0$``+_)!P`"AP0`
+MQ,L'``$'``#-RP<``EH$`#7,!P`!`0``5\P'``)N!`!VS`<``0<``'S,!P`"
+M6@0`?,\'``$!``"7SP<``ED$`,_0!P`!`0``8-$'``)L!`"/T0<``0$``+'1
+M!P`";@0`I]('``*/!`"@TP<``G\$`+_3!P`"MP0`*=0'``*W!`"=U`<``K<$
+M`,S4!P`!!P``T]0'``):!``,U0<``G\$`/+6!P`!!P``^-8'``):!`!GUP<`
+M`G\$`(K7!P`"?P0`K=@'``)G!`#UV`<``F<$`%79!P`!`0``7]D'``$!``!H
+MV0<``H<$`"??!P`"7@0`,^`'``)>!`"ZX0<``0<``,#A!P`"6@0`U^$'``$#
+M``#AXP<``0<``.?C!P`"6@0`_N,'``$#```5Y@<``0<``"?F!P`"6@0`BQT(
+M``)V!`"X'0@``G8$`)$?"``"J`0`VB`(``)V!``'(0@``G8$`-8B"``"=@0`
+M`R,(``)V!`"<)@@``0<``*<F"``"6@0`.2@(``*H!`!!*`@``FP$`%@H"``!
+M!P``8R@(``):!`"T*`@``H\$`-HH"``"?P0`J2L(``)_!`#S*P@``0<``/HK
+M"``"6@0`&BP(``)_!`!U+`@``J@$`)HP"``"9P0`XS`(``$!``#J,`@``0$`
+M`/TP"``"AP0`,#$(``$'```[,0@``EH$`(,Z"``"<@0`M3H(``)R!`#6/0@`
+M`0$``.X]"``";@0`!#X(``$'```//@@``EH$`*X^"``";`0`<$`(``)L!`"6
+M0`@``0<``)Q`"``"6@0`+4$(``*H!`!I00@``J@$``9""``"=@0`44((``*H
+M!`#F0@@``0$```%#"``"600`&$,(``$'```C0P@``EH$`$=%"``!`0``9$4(
+M``$!``!\10@``FX$`+E%"``"J`0`U44(``$'``#<10@``EH$`.I%"``"CP0`
+M-$8(``$'```[1@@``EH$``I'"``"?P0`1$<(``)_!`#\1P@``K4$`!I("``"
+ME00`<$@(``)3!`!\2`@``F4$`)M("``!!P``H4@(``):!`"K2`@``JL$`,E(
+M"``"C00`YD@(``*-!`#Z2`@``HT$``Y)"``"C00`*$D(``)@!``Y20@``HT$
+M`%=)"``"7`0`:TD(``*-!`""20@``0<``(A)"``"6@0`QDD(``*P!`#B20@`
+M`IH$`/A)"``!`0``$DH(``*>!``A2@@``0<``"I*"``"6@0`04H(``*$!`!?
+M2@@``K$$`'1*"``!!P``>TH(``):!`!92P@``0<``%]+"``!!P``9$L(``*L
+M!`!X2P@``0<``(%+"``"6@0`DDL(``*-!`"A2P@``0<``*I+"``"6@0`M$L(
+M``*/!`#$2P@``0<``,U+"``"6@0`V4L(``)_!`#]2P@``0<```1,"``"6@0`
+M?TT(``)_!`"C30@``J@$`*Q/"``"9P0`X4\(``$!``#O3P@``H<$`#E0"``"
+MJ`0`IU`(``)G!`#04`@``0$``-=0"``!`0``ZU`(``*'!``040@``0<``!51
+M"``"K`0```````$!```$`````0$```@````!`0``#`````$!```0`````0$`
+M`!0````!`0``&`````$!```<`````0$``"`````!`0``)`````$!```H````
+M`0$``"P````!`0``,`````$!```T`````0$``#@````!`0``/`````$!``!`
+M`````0$``$0````!`0``2`````$!``!,`````0$``%`````!`0``5`````$!
+M``!8`````0$``%P````!`0``8`````$!``!D`````0$``&@````!`0``;```
+M``$!``!P`````0$``'0````!`0``>`````$!``!\`````0$``(`````!`0``
+MA`````$!``"(`````0$``(P````!`0``D`````$!``"4`````0$``)@````!
+M`0``G`````$!``"@`````0$``*0````!`0``J`````$!``"L`````0$``+``
+M```!`0``M`````$!``"X`````0$``+P````!`0``P`````$!``#$`````0$`
+M`,@````!`0``S`````$!``#0`````0$``-0````!`0``V`````$!``#<````
+M`0$``.`````!`0``Y`````$!``#H`````0$``.P````!`0``\`````$!``#T
+M`````0$``/@````!`0``_`````$!`````0```0$```0!```!`0``"`$```$!
+M```,`0```0$``!`!```!`0``%`$```$!```8`0```0$``!P!```!`0``(`$`
+M``$!```D`0```0$``"@!```!`0``+`$```$!```P`0```0$``#0!```!`0``
+M.`$```$!```\`0```0$``$`!```!`0``1`$```$!``!(`0```0$``$P!```!
+M`0``4`$```$!``!4`0```0$``%@!```!`0``7`$```$!``!@`0```0$``&0!
+M```!`0``:`$```$!``!L`0```0$``'`!```!`0``=`$```$!``!X`0```0$`
+M`'P!```!`0``@`$```$!``"$`0```0$``(@!```!`0``C`$```$!``"0`0``
+M`0$``)0!```!`0``F`$```$!``"<`0```0$``*`!```!`0``I`$```$!``"H
+M`0```0$``*P!```!`0``L`$```$!``"T`0```0$``+@!```!`0``O`$```$!
+M``#``0```0$``,0!```!`0``R`$```$!``#,`0```0$``-`!```!`0``U`$`
+M``$!``#8`0```0$``-P!```!`0``X`$```$!``#D`0```0$``.@!```!`0``
+M[`$```$!``#P`0```0$``/0!```!`0``^`$```$!``#\`0```0$````"```!
+M`0``!`(```$!```(`@```0$```P"```!`0``$`(```$!```4`@```0$``!@"
+M```!`0``'`(```$!```@`@```0$``"0"```!`0``*`(```$!```L`@```0$`
+M`#`"```!`0``-`(```$!```X`@```0$``#P"```!`0``0`(```$!``!$`@``
+M`0$``$@"```!`0``3`(```$!``!0`@```0$``%0"```!`0``6`(```$!``!<
+M`@```0$``&`"```!`0``9`(```$!``!H`@```0$``&P"```!`0``<`(```$!
+M``!T`@```0$``'@"```!`0``?`(```$!``"``@```0$``(0"```!`0``B`(`
+M``$!``",`@```0$``)`"```!`0``E`(```$!``"8`@```0$``)P"```!`0``
+MH`(```$!``"D`@```0$``*@"```!`0``K`(```$!``"P`@```0$``+0"```!
+M`0``N`(```$!``"\`@```0$``,`"```!`0``Q`(```$!``#(`@```0$``,P"
+M```!`0``T`(```$!``#4`@```0$``-@"```!`0``W`(```$!``#@`@```0$`
+M`.0"```!`0``Z`(```$!``#L`@```0$``/`"```!`0``]`(```$!``#X`@``
+M`0$``/P"```!`0````,```$!```$`P```0$```@#```!`0``#`,```$!```0
+M`P```0$``!0#```!`0``&`,```$!```<`P```0$``"`#```!`0``)`,```$!
+M```H`P```0$``"P#```!`0``,`,```$!```T`P```0$``#@#```!`0``/`,`
+M``$!``!``P```0$``$0#```!`0``2`,```$!``!,`P```0$``%`#```!`0``
+M5`,```$!``!8`P```0$``%P#```!`0``8`,```$!``!D`P```0$``&@#```!
+M`0``;`,```$!``!P`P```0$``'0#```!`0``>`,```$!``!\`P```0$``(`#
+M```!`0``A`,```$!``"(`P```0$``(P#```!`0``D`,```$!``"4`P```0$`
+M`)@#```!`0``G`,```$!``"@`P```0$``*0#```!`0``J`,```$!``"L`P``
+M`0$``+`#```!`0``M`,```$!``"X`P```0$``+P#```!`0``P`,```$!``#$
+M`P```0$``,@#```!`0``S`,```$!``#0`P```0$``-0#```!`0``V`,```$!
+M``#<`P```0$``.`#```!`0``Y`,```$!``#H`P```0$``.P#```!`0``\`,`
+M``$!``#T`P```0$``/@#```!`0``_`,```$!````!````0$```0$```!`0``
+M"`0```$!```,!````0$``!`$```!`0``%`0```$!```8!````0$``!P$```!
+M`0``(`0```$!```D!````0$``"@$```!`0``+`0```$!```P!````0$``#0$
+M```!`0``.`0```$!```\!````0$``$`$```!`0``1`0```$!``!(!````0$`
+M`$P$```!`0``4`0```$!``!4!````0$``%@$```!`0``7`0```$!``!@!```
+M`0$``&0$```!`0``:`0```$!``!L!````0$``'`$```!`0``=`0```$!``!X
+M!````0$``'P$```!`0``@`0```$!``"$!````0$``(@$```!`0``C`0```$!
+M``"0!````0$``)0$```!`0``F`0```$!``"<!````0$``*`$```!`0``I`0`
+M``$!``"H!````0$``*P$```!`0``L`0```$!``"T!````0$``+@$```!`0``
+MO`0```$!``#`!````0$``,0$```!`0``R`0```$!``#,!````0$``-`$```!
+M`0``U`0```$!``#8!````0$``-P$```!`0``X`0```$!``#D!````0$``.@$
+M```!`0``[`0```$!``#P!````0$``/0$```!`0``^`0```$!``#\!````0$`
+M```%```!`0``!`4```$!```(!0```0$```P%```!`0``$`4```$!```4!0``
+M`0$``!@%```!`0``'`4```$!```@!0```0$``"0%```!`0``*`4```$!```L
+M!0```0$``#`%```!`0``-`4```$!```X!0```0$``#P%```!`0``0`4```$!
+M``!$!0```0$``$@%```!`0``3`4```$!``!0!0```0$``%0%```!`0``6`4`
+M``$!``!<!0```0$``&`%```!`0``9`4```$!``!H!0```0$``&P%```!`0``
+M<`4```$!``!T!0```0$``'@%```!`0``?`4```$!``"`!0```0$``(0%```!
+M`0``B`4```$!``",!0```0$``)`%```!`0``E`4```$!``"8!0```0$``)P%
+M```!`0``H`4```$!``"D!0```0$``*@%```!`0``K`4```$!``"P!0```0$`
+M`+0%```!`0``N`4```$!``"\!0```0$``,`%```!`0``Q`4```$!``#(!0``
+M`0$``,P%```!`0``T`4```$!``#4!0```0$``-@%```!`0``W`4```$!``#@
+M!0```0$``.0%```!`0``Z`4```$!``#L!0```0$``/`%```!`0``]`4```$!
+M``#X!0```0$``/P%```!`0````8```$!```$!@```0$```@&```!`0``#`8`
+M``$!```0!@```0$``!0&```!`0``&`8```$!```<!@```0$``"`&```!`0``
+M)`8```$!```H!@```0$``"P&```!`0``,`8```$!```T!@```0$``#@&```!
+M`0``/`8```$!``!`!@```0$``$0&```!`0``2`8```$!``!,!@```0$``%`&
+M```!`0``5`8```$!``!8!@```0$``%P&```!`0``8`8```$!``!D!@```0$`
+M`&@&```!`0``;`8```$!``!P!@```0$``'0&```!`0``>`8```$!``!\!@``
+M`0$``(`&```!`0``A`8```$!``"(!@```0$``(P&```!`0``D`8```$!``"4
+M!@```0$``)@&```!`0``G`8```$!``"@!@```0$``*0&```!`0``J`8```$!
+M``"L!@```0$``+`&```!`0``M`8```$!``"X!@```0$``+P&```!`0``P`8`
+M``$!``#$!@```0$``,@&```!`0``S`8```$!``#0!@```0$``-0&```!`0``
+MV`8```$!``#<!@```0$``.`&```!`0``Y`8```$!``#H!@```0$``.P&```!
+M`0``\`8```$!``#T!@```0$``/@&```!`0``_`8```$!````!P```0$```0'
+M```!`0``"`<```$!```,!P```0$``!`'```!`0``%`<```$!```8!P```0$`
+M`!P'```!`0``(`<```$!```D!P```0$``"@'```!`0``+`<```$!```P!P``
+M`0$``#0'```!`0``.`<```$!```\!P```0$``$`'```!`0``1`<```$!``!(
+M!P```0$``$P'```!`0``4`<```$!``!4!P```0$``%@'```!`0``7`<```$!
+M``!@!P```0$``&0'```!`0``:`<```$!``!L!P```0$``'`'```!`0``=`<`
+M``$!``!X!P```0$``'P'```!`0``@`<```$!``"$!P```0$``(@'```!`0``
+MC`<```$!``"0!P```0$``)0'```!`0``F`<```$!``"<!P```0$``*`'```!
+M`0``I`<```$!``"H!P```0$``*P'```!`0``L`<```$!``"T!P```0$``+@'
+M```!`0``O`<```$!``#`!P```0$``,0'```!`0``R`<```$!``#,!P```0$`
+M`-`'```!`0``U`<```$!``#8!P```0$``-P'```!`0``X`<```$!``#D!P``
+M`0$``.@'```!`0``[`<```$!```D"````0$``"@(```!`0``+`@```$!```P
+M"````0$``#0(```!`0``.`@```$!```\"````0$``$`(```!`0``1`@```$!
+M``!("````0$``$P(```!`0``4`@```$!``!4"````0$``%@(```!`0``7`@`
+M``$!``!@"````0$``&0(```!`0``:`@```$!``!L"````0$``'`(```!`0``
+M=`@```$!``!X"````0$``'P(```!`0``@`@```$!``"$"````0$``(@(```!
+M`0``C`@```$!``"0"````0$``)0(```!`0``F`@```$!``"<"````0$``*`(
+M```!`0``I`@```$!``"H"````0$``*P(```!`0``L`@```$!``"T"````0$`
+M`+@(```!`0``O`@```$!``#`"````0$``,0(```!`0``R`@```$!``#,"```
+M`0$``-`(```!`0``U`@```$!``#8"````0$``-P(```!`0``X`@```$!``#D
+M"````0$``.@(```!`0``[`@```$!``#P"````0$``/0(```!`0``^`@```$!
+M``#\"````0$````)```!`0``!`D```$!```("0```0$```P)```!`0``$`D`
+M``$!```4"0```0$``!@)```!`0``'`D```$!```@"0```0$``"0)```!`0``
+M*`D```$!```L"0```0$``#`)```!`0``-`D```$!```X"0```0$``#P)```!
+M`0``0`D```$!``!$"0```0$``$@)```!`0``3`D```$!``!0"0```0$``%0)
+M```!`0``6`D```$!``!<"0```0$``&`)```!`0``9`D```$!``!H"0```0$`
+M`&P)```!`0``<`D```$!``!T"0```0$``'@)```!`0``?`D```$!``"`"0``
+M`0$``(0)```!`0``B`D```$!``","0```0$``)`)```!`0``E`D```$!``"8
+M"0```0$``)P)```!`0``H`D```$!``"D"0```0$``*@)```!`0``K`D```$!
+M``"P"0```0$``+0)```!`0``N`D```$!``"\"0```0$``,`)```!`0``Q`D`
+M``$!``#("0```0$``,P)```!`0``T`D```$!``#4"0```0$``-@)```!`0``
+MW`D```$!``#@"0```0$``.0)```!`0``Z`D```$!``#L"0```0$``/`)```!
+M`0``]`D```$!``#X"0```0$``/P)```!`0````H```$!```$"@```0$```@*
+M```!`0``#`H```$!```0"@```0$``!0*```!`0``&`H```$!```<"@```0$`
+M`"`*```!`0``)`H```$!```H"@```0$``"P*```!`0``,`H```$!```T"@``
+M`0$``#@*```!`0``/`H```$!``!`"@```0$``$0*```!`0``2`H```$!``!,
+M"@```0$``%`*```!`0``5`H```$!``!8"@```0$``%P*```!`0``8`H```$!
+M``!D"@```0$``&@*```!`0``;`H```$!``!P"@```0$``'0*```!`0``>`H`
+M``$!``!\"@```0$``(`*```!`0``A`H```$!``"("@```0$``(P*```!`0``
+MD`H```$!``"4"@```0$``)@*```!`0``G`H```$!``"@"@```0$``*0*```!
+M`0``J`H```$!``"L"@```0$``+`*```!`0``M`H```$!``"X"@```0$``+P*
+M```!`0``P`H```$!``#$"@```0$``,@*```!`0``S`H```$!``#0"@```0$`
+M`-0*```!`0``V`H```$!``#<"@```0$``.`*```!`0``Y`H```$!``#H"@``
+M`0$``.P*```!`0``\`H```$!``#T"@```0$``/@*```!`0``_`H```$!````
+M"P```0$```0+```!`0``"`L```$!```,"P```0$``!`+```!`0``%`L```$!
+M```8"P```0$``!P+```!`0``(`L```$!```D"P```0$``"@+```!`0``+`L`
+M``$!```P"P```0$``#0+```!`0``.`L```$!```\"P```0$``$`+```!`0``
+M1`L```$!``!("P```0$``$P+```!`0``4`L```$!``!4"P```0$``%@+```!
+M`0``7`L```$!``!@"P```0$``&0+```!`0``:`L```$!``!L"P```0$``'`+
+M```!`0``=`L```$!``!X"P```0$``'P+```!`0``@`L```$!``"$"P```0$`
+M`(@+```!`0``C`L```$!``"0"P```0$``)0+```!`0``F`L```$!``"<"P``
+M`0$``*`+```!`0``I`L```$!``"H"P```0$``*P+```!`0``L`L```$!``"T
+M"P```0$``+@+```!`0``O`L```$!``#`"P```0$``,0+```!`0``R`L```$!
+M``#,"P```0$``-`+```!`0``U`L```$!``#8"P```0$``-P+```!`0``X`L`
+M``$!``#D"P```0$``.@+```!`0``[`L```$!``#P"P```0$``/0+```!`0``
+M^`L```$!``#\"P```0$````,```!`0``!`P```$!```(#````0$```P,```!
+M`0``$`P```$!```4#````0$``!@,```!`0``'`P```$!```@#````0$``"0,
+M```!`0``*`P```$!```L#````0$``#`,```!`0``-`P```$!```X#````0$`
+M`#P,```!`0``0`P```$!``!$#````0$``$@,```!`0``3`P```$!``!0#```
+M`0$``%0,```!`0``6`P```$!``!<#````0$``&`,```!`0``9`P```$!``!H
+M#````0$``&P,```!`0``<`P```$!``!T#````0$``'@,```!`0``?`P```$!
+M``"`#````0$``(0,```!`0``B`P```$!``",#````0$``)`,```!`0``E`P`
+M``$!``"8#````0$``)P,```!`0``H`P```$!``"D#````0$``*@,```!`0``
+MK`P```$!``"P#````0$``+0,```!`0``N`P```$!``"\#````0$``,`,```!
+M`0``Q`P```$!``#(#````0$``,P,```!`0``T`P```$!``#4#````0$``-@,
+M```!`0``W`P```$!``#@#````0$``.0,```!`0``Z`P```$!``#L#````0$`
+M`/`,```!`0``]`P```$!``#X#````0$``/P,```!`0````T```$!```$#0``
+M`0$```@-```!`0``#`T```$!```0#0```0$``!0-```!`0``&`T```$!```<
+M#0```0$``"`-```!`0``)`T```$!```H#0```0$``"P-```!`0``,`T```$!
+M```T#0```0$``#@-```!`0``/`T```$!``!`#0```0$``$0-```!`0``2`T`
+M``$!``!,#0```0$``%`-```!`0``5`T```$!``!8#0```0$``%P-```!`0``
+M8`T```$!``!D#0```0$``&@-```!`0``;`T```$!``!P#0```0$``'0-```!
+M`0``>`T```$!``!\#0```0$``(`-```!`0``A`T```$!``"(#0```0$``(P-
+M```!`0``D`T```$!``"4#0```0$``)@-```!`0``G`T```$!``"@#0```0$`
+M`*0-```!`0``J`T```$!``"L#0```0$``+`-```!`0``M`T```$!``"X#0``
+M`0$``+P-```!`0``P`T```$!``#$#0```0$``,@-```!`0``S`T```$!``#0
+M#0```0$``-0-```!`0``V`T```$!``#<#0```0$``.`-```!`0``Y`T```$!
+M``#H#0```0$``.P-```!`0``\`T```$!``#T#0```0$``/@-```!`0``_`T`
+M``$!````#@```0$```0.```!`0``"`X```$!```,#@```0$``!`.```!`0``
+M%`X```$!```8#@```0$``!P.```!`0``(`X```$!```D#@```0$``"@.```!
+M`0``+`X```$!```P#@```0$``#0.```!`0``.`X```$!```\#@```0$``$`.
+M```!`0``1`X```$!``!(#@```0$``$P.```!`0``4`X```$!``!4#@```0$`
+M`%@.```!`0``7`X```$!``!@#@```0$``&0.```!`0``:`X```$!``!L#@``
+M`0$``'`.```!`0``=`X```$!``!X#@```0$``'P.```!`0``@`X```$!``"$
+M#@```0$``(@.```!`0``C`X```$!``"0#@```0$``)0.```!`0``F`X```$!
+M``"<#@```0$``*`.```!`0``I`X```$!``"H#@```0$``*P.```!`0``L`X`
+M``$!``"T#@```0$``+@.```!`0``O`X```$!``#`#@```0$``,0.```!`0``
+MR`X```$!``#,#@```0$``-`.```!`0``U`X```$!``#8#@```0$``-P.```!
+M`0``X`X```$!``#D#@```0$``.@.```!`0``[`X```$!``#P#@```0$``/0.
+M```!`0``^`X```$!``#\#@```0$````/```!`0``!`\```$!```(#P```0$`
+M``P/```!`0``$`\```$!```4#P```0$``!@/```!`0``'`\```$!```@#P``
+M`0$``"0/```!`0``*`\```$!```L#P```0$``#`/```!`0``-`\```$!```X
+M#P```0$``#P/```!`0``0`\```$!``!$#P```0$``$@/```!`0``3`\```$!
+M``!0#P```0$``%0/```!`0``6`\```$!``!<#P```0$``&`/```!`0``9`\`
+M``$!``!H#P```0$``&P/```!`0``<`\```$!``!T#P```0$``'@/```!`0``
+M?`\```$!``"`#P```0$``(0/```!`0``B`\```$!``",#P```0$``)`/```!
+M`0``E`\```$!``"8#P```0$``)P/```!`0``H`\```$!``"D#P```0$``*@/
+M```!`0``K`\```$!``"P#P```0$``+0/```!`0``N`\```$!``"\#P```0$`
+M`,`/```!`0``Q`\```$!``#(#P```0$``,P/```!`0``T`\```$!``#4#P``
+M`0$``-@/```!`0``W`\```$!``#@#P```0$``.0/```!`0``Z`\```$!``#L
+M#P```0$``/`/```!`0``]`\```$!``#X#P```0$``/P/```!`0```!````$!
+M```$$````0$```@0```!`0``#!````$!```0$````0$``!00```!`0``&!``
+M``$!```<$````0$``"`0```!`0``)!````$!```H$````0$``"P0```!`0``
+M,!````$!```T$````0$``#@0```!`0``7!````$!``!@$````0$``&00```!
+M`0``:!````$!``!L$````0$``'`0```!`0``=!````$!``!X$````0$``'P0
+M```!`0``@!````$!``"$$````0$``(@0```!`0``C!````$!``"0$````0$`
+M`)00```!`0``F!````$!``"<$````0$``*`0```!`0``I!````$!``"H$```
+M`0$``*P0```!`0``L!````$!``"T$````0$``+@0```!`0``O!````$!``#`
+M$````0$``,00```!`0``R!````$!``#,$````0$``-`0```!`0``U!````$!
+M``#8$````0$``-P0```!`0``X!````$!``#D$````0$``.@0```!`0``[!``
+M``$!``#P$````0$``/00```!`0``^!````$!``#\$````0$````1```!`0``
+M!!$```$!```($0```0$```P1```!`0``$!$```$!```4$0```0$``!@1```!
+M`0``'!$```$!```@$0```0$``"01```!`0``*!$```$!```L$0```0$``#`1
+M```!`0``-!$```$!```X$0```0$``#P1```!`0``0!$```$!``!$$0```0$`
+M`$@1```!`0``3!$```$!``!0$0```0$``%01```!`0``6!$```$!``!<$0``
+M`0$``&`1```!`0``9!$```$!``!H$0```0$``&P1```!`0``<!$```$!``!T
+M$0```0$``'@1```!`0``?!$```$!``"`$0```0$``(01```!`0``B!$```$!
+M``",$0```0$``)`1```!`0``E!$```$!``"8$0```0$``)P1```!`0``H!$`
+M``$!``"D$0```0$``*@1```!`0``K!$```$!``"P$0```0$``+01```!`0``
+MN!$```$!``"\$0```0$``,`1```!`0``Q!$```$!``#($0```0$``,P1```!
+M`0``T!$```$!``#4$0```0$``-@1```!`0``W!$```$!``#@$0```0$``.01
+M```!`0``Z!$```$!``#L$0```0$``/`1```!`0``]!$```$!``#X$0```0$`
+M`/P1```!`0```!(```$!```$$@```0$```@2```!`0``#!(```$!```0$@``
+M`0$``!02```!`0``&!(```$!```<$@```0$``"`2```!`0``)!(```$!```H
+M$@```0$``"P2```!`0``,!(```$!```T$@```0$``#@2```!`0``/!(```$!
+M``!`$@```0$``$02```!`0``2!(```$!``!,$@```0$``%`2```!`0``5!(`
+M``$!``!8$@```0$``%P2```!`0``8!(```$!``!D$@```0$``&@2```!`0``
+M;!(```$!``!P$@```0$``'02```!`0``>!(```$!``!\$@```0$``(`2```!
+M`0``A!(```$!``"($@```0$``(P2```!`0``D!(```$!``"4$@```0$``)@2
+M```!`0``G!(```$!``"@$@```0$``*02```!`0``J!(```$!``"L$@```0$`
+M`+`2```!`0``M!(```$!``"X$@```0$``+P2```!`0``P!(```$!``#$$@``
+M`0$``,@2```!`0``S!(```$!``#0$@```0$``-02```!`0``V!(```$!``#<
+M$@```0$``.`2```!`0``Y!(```$!``#H$@```0$``.P2```!`0``\!(```$!
+M``#T$@```0$``/@2```!`0``_!(```$!````$P```0$```03```!`0``"!,`
+M``$!```,$P```0$``!`3```!`0``%!,```$!```8$P```0$``!P3```!`0``
+M(!,```$!```D$P```0$``"@3```!`0``+!,```$!```P$P```0$``#03```!
+M`0``.!,```$!```\$P```0$``$`3```!`0``1!,```$!``!($P```0$``$P3
+M```!`0``4!,```$!``!4$P```0$``%@3```!`0``7!,```$!``!@$P```0$`
+M`&03```!`0``:!,```$!``!L$P```0$``'`3```!`0``=!,```$!``!X$P``
+M`0$``'P3```!`0``@!,```$!``"$$P```0$``(@3```!`0``C!,```$!``"0
+M$P```0$``)03```!`0``F!,```$!``"<$P```0$``*`3```!`0``I!,```$!
+M``"H$P```0$``*P3```!`0``L!,```$!``"T$P```0$``+@3```!`0``O!,`
+M``$!``#`$P```0$``,03```!`0``R!,```$!``#,$P```0$``-`3```!`0``
+MU!,```$!``#8$P```0$``-P3```!`0``X!,```$!``#D$P```0$``.@3```!
+M`0``[!,```$!``#P$P```0$``/03```!`0``^!,```$!``#\$P```0$````4
+M```!`0``!!0```$!```(%````0$```P4```!`0``$!0```$!```4%````0$`
+M`!@4```!`0``'!0```$!```@%````0$``"04```!`0``*!0```$!```L%```
+M`0$``#`4```!`0``-!0```$!```X%````0$``#P4```!`0``0!0```$!``!$
+M%````0$``$@4```!`0``3!0```$!``!0%````0$``%04```!`0``6!0```$!
+M``!<%````0$``&`4```!`0``9!0```$!``!H%````0$``&P4```!`0``<!0`
+M``$!``!T%````0$``'@4```!`0``?!0```$!``"`%````0$``(04```!`0``
+MB!0```$!``",%````0$``)`4```!`0``E!0```$!``"8%````0$``)P4```!
+M`0``H!0```$!``"D%````0$``*@4```!`0``K!0```$!``"P%````0$``+04
+M```!`0``N!0```$!``"\%````0$``,`4```!`0``Q!0```$!``#(%````0$`
+M`,P4```!`0``T!0```$!``#4%````0$``-@4```!`0``W!0```$!``#@%```
+M`0$``.04```!`0``Z!0```$!``#L%````0$``/`4```!`0``]!0```$!``#X
+M%````0$``/P4```!`0```!4```$!```$%0```0$```@5```!`0``#!4```$!
+M```0%0```0$``!05```!`0``&!4```$!```<%0```0$``"`5```!`0``)!4`
+M``$!```H%0```0$``"P5```!`0``,!4```$!```T%0```0$``#@5```!`0``
+M/!4```$!``!`%0```0$``$05```!`0``2!4```$!``!,%0```0$``%`5```!
+M`0``5!4```$!``!8%0```0$``%P5```!`0``8!4```$!``!D%0```0$``&@5
+M```!`0``;!4```$!``!P%0```0$``'05```!`0``>!4```$!``!\%0```0$`
+M`(`5```!`0``A!4```$!``"(%0```0$``(P5```!`0``D!4```$!``"4%0``
+M`0$``)@5```!`0``G!4```$!``"@%0```0$``*05```!`0``J!4```$!``"L
+M%0```0$``+`5```!`0``M!4```$!``"X%0```0$``+P5```!`0``P!4```$!
+M``#$%0```0$``,@5```!`0``S!4```$!``#0%0```0$``-05```!`0``V!4`
+M``$!``#<%0```0$``.`5```!`0``Y!4```$!``#H%0```0$``.P5```!`0``
+M\!4```$!``#T%0```0$``/@5```!`0``_!4```$!````%@```0$```06```!
+M`0``"!8```$!```,%@```0$``!`6```!`0``%!8```$!```8%@```0$``!P6
+M```!`0``(!8```$!```D%@```0$``"@6```!`0``+!8```$!```P%@```0$`
+M`#06```!`0``.!8```$!```\%@```0$``$`6```!`0``1!8```$!``!(%@``
+M`0$``$P6```!`0``4!8```$!``!4%@```0$``%@6```!`0``7!8```$!``!@
+M%@```0$``&06```!`0``:!8```$!``!L%@```0$``'`6```!`0``=!8```$!
+M``!X%@```0$``'P6```!`0``@!8```$!``"$%@```0$``(@6```!`0``C!8`
+M``$!``"0%@```0$``)06```!`0``F!8```$!``"<%@```0$``*`6```!`0``
+MI!8```$!``"H%@```0$``*P6```!`0``L!8```$!``"T%@```0$``+@6```!
+M`0``O!8```$!``#`%@```0$``,06```!`0``R!8```$!``#,%@```0$``-`6
+M```!`0``U!8```$!``#8%@```0$``-P6```!`0``X!8```$!``#D%@```0$`
+M`.@6```!`0``[!8```$!``#P%@```0$``/06```!`0``^!8```$!``#\%@``
+M`0$````7```!`0``!!<```$!```(%P```0$```P7```!`0``$!<```$!```4
+M%P```0$``!@7```!`0``'!<```$!```@%P```0$``"07```!`0``*!<```$!
+M```L%P```0$``#`7```!`0``-!<```$!```X%P```0$``#P7```!`0``0!<`
+M``$!``!$%P```0$``$@7```!`0``3!<```$!``!0%P```0$``%07```!`0``
+M6!<```$!``!<%P```0$``&`7```!`0``9!<```$!``!H%P```0$``&P7```!
+M`0``<!<```$!``!T%P```0$``'@7```!`0``?!<```$!``"`%P```0$``(07
+M```!`0``B!<```$!``",%P```0$``)`7```!`0``E!<```$!``"8%P```0$`
+M`)P7```!`0``H!<```$!``"D%P```0$``*@7```!`0``K!<```$!``"P%P``
+M`0$``+07```!`0``N!<```$!``"\%P```0$``,`7```!`0``Q!<```$!``#(
+M%P```0$``,P7```!`0``T!<```$!``#4%P```0$``-@7```!`0``W!<```$!
+M``#@%P```0$``.07```!`0``Z!<```$!``#L%P```0$``/`7```!`0``]!<`
+M``$!``#X%P```0$``/P7```!`0```!@```$!```$&````0$```@8```!`0``
+M#!@```$!```0&````0$``!08```!`0``&!@```$!```<&````0$``"`8```!
+M`0``)!@```$!```H&````0$``"P8```!`0``,!@```$!```T&````0$``#@8
+M```!`0``/!@```$!``!`&````0$``$08```!`0``2!@```$!``!,&````0$`
+M`%`8```!`0``5!@```$!``!8&````0$``%P8```!`0``8!@```$!``!D&```
+M`0$``&@8```!`0``;!@```$!``!P&````0$``)08```!`0``F!@```$!``"<
+M&````0$``*`8```!`0``I!@```$!``"H&````0$``*P8```!`0``L!@```$!
+M``"T&````0$``+@8```!`0``P!@```$!``#$&````0$``,@8```!`0``S!@`
+M``$!``#0&````0$``-08```!`0``V!@```$!``#<&````0$``.`8```!`0``
+MY!@```$!``#H&````0$``.P8```!`0``\!@```$!``#T&````0$``/@8```!
+M`0``_!@```$!````&0```0$```09```!`0``"!D```$!```,&0```0$``!`9
+M```!`0``%!D```$!```8&0```0$``!P9```!`0``(!D```$!```D&0```0$`
+M`"@9```!`0``+!D```$!```P&0```0$``#09```!`0``.!D```$!```\&0``
+M`0$``$`9```!`0``1!D```$!``!(&0```0$``$P9```!`0``4!D```$!``!4
+M&0```0$``%@9```!`0``7!D```$!``!@&0```0$``&09```!`0``:!D```$!
+M``!L&0```0$``'`9```!`0``=!D```$!``!X&0```0$``'P9```!`0``@!D`
+M``$!``"$&0```0$``(@9```!`0``C!D```$!``"0&0```0$``)09```!`0``
+MF!D```$!``"<&0```0$``*`9```!`0``I!D```$!``"H&0```0$``*P9```!
+M`0``L!D```$!``"T&0```0$``+@9```!`0``O!D```$!``#`&0```0$``,09
+M```!`0``R!D```$!``#,&0```0$``-`9```!`0``U!D```$!``#8&0```0$`
+M`-P9```!`0``X!D```$!``#D&0```0$``.@9```!`0``[!D```$!``#P&0``
+M`0$``/09```!`0``^!D```$!``#\&0```0$````:```!`0``!!H```$!```(
+M&@```0$```P:```!`0``$!H```$!```4&@```0$``!@:```!`0``'!H```$!
+M```@&@```0$``"0:```!`0``*!H```$!```L&@```0$``#`:```!`0``-!H`
+M``$!```X&@```0$``#P:```!`0``0!H```$!``!$&@```0$``$@:```!`0``
+M3!H```$!``!0&@```0$``%0:```!`0``6!H```$!``!<&@```0$``&`:```!
+M`0``9!H```$!``!H&@```0$``&P:```!`0``<!H```$!``!T&@```0$``'@:
+M```!`0``?!H```$!``"`&@```0$``(0:```!`0``B!H```$!``",&@```0$`
+M`)`:```!`0``E!H```$!``"8&@```0$``)P:```!`0``H!H```$!``"D&@``
+M`0$``*@:```!`0``K!H```$!``"P&@```0$``+0:```!`0``N!H```$!``"\
+M&@```0$``,`:```!`0``Q!H```$!``#(&@```0$``,P:```!`0``T!H```$!
+M``#4&@```0$``-@:```!`0``W!H```$!``#@&@```0$``.0:```!`0``Z!H`
+M``$!``#L&@```0$``/`:```!`0``]!H```$!``#X&@```0$``/P:```!`0``
+M`!L```$!```$&P```0$```@;```!`0``#!L```$!```0&P```0$``!0;```!
+M`0``&!L```$!```<&P```0$``"`;```!`0``)!L```$!```H&P```0$``"P;
+M```!`0``,!L```$!```T&P```0$``#@;```!`0``/!L```$!``!`&P```0$`
+M`$0;```!`0``2!L```$!``!,&P```0$``%`;```!`0``5!L```$!``!8&P``
+M`0$``%P;```!`0``8!L```$!``!D&P```0$``&@;```!`0``;!L```$!``!P
+M&P```0$``'0;```!`0``>!L```$!``!\&P```0$``(`;```!`0``A!L```$!
+M``"(&P```0$``(P;```!`0``D!L```$!``"4&P```0$``)@;```!`0``G!L`
+M``$!``"@&P```0$``*0;```!`0``J!L```$!``"L&P```0$``+`;```!`0``
+MM!L```$!``"X&P```0$``+P;```!`0``P!L```$!``#$&P```0$``,@;```!
+M`0``S!L```$!``#0&P```0$``-0;```!`0``V!L```$!``#<&P```0$``.`;
+M```!`0``Y!L```$!``#H&P```0$``.P;```!`0``\!L```$!``#T&P```0$`
+M`/@;```!`0``_!L```$!````'````0$```0<```!`0``"!P```$!```,'```
+M`0$``!`<```!`0``%!P```$!```8'````0$``!P<```!`0``(!P```$!```D
+M'````0$``"@<```!`0``+!P```$!```P'````0$``#0<```!`0``.!P```$!
+M```\'````0$``$`<```!`0``1!P```$!``!('````0$``$P<```!`0``4!P`
+M``$!``!4'````0$``%@<```!`0``7!P```$!``!@'````0$``&0<```!`0``
+M:!P```$!``!L'````0$``'`<```!`0``=!P```$!``!X'````0$``'P<```!
+M`0``@!P```$!``"$'````0$``(@<```!`0``C!P```$!``"0'````0$``)0<
+M```!`0``F!P```$!``"<'````0$``*`<```!`0``I!P```$!``"H'````0$`
+M`*P<```!`0``L!P```$!``"T'````0$``+@<```!`0``O!P```$!``#`'```
+M`0$``,0<```!`0``R!P```$!``#,'````0$``-`<```!`0``U!P```$!``#8
+M'````0$``-P<```!`0``X!P```$!``#D'````0$``.@<```!`0``[!P```$!
+M``#P'````0$``/0<```!`0``^!P```$!``#\'````0$````=```!`0``!!T`
+M``$!```('0```0$```P=```!`0``$!T```$!```4'0```0$``!@=```!`0``
+M'!T```$!```@'0```0$``"0=```!`0``*!T```$!```L'0```0$``#`=```!
+M`0``-!T```$!```X'0```0$``#P=```!`0``0!T```$!``!$'0```0$``$@=
+M```!`0``3!T```$!``!0'0```0$``%0=```!`0``6!T```$!``!<'0```0$`
+M`&`=```!`0``9!T```$!``!H'0```0$``&P=```!`0``<!T```$!``!T'0``
+M`0$``'@=```!`0``?!T```$!``"`'0```0$``(0=```!`0``B!T```$!``",
+M'0```0$``)`=```!`0``E!T```$!``"8'0```0$``)P=```!`0``H!T```$!
+M``"D'0```0$``*@=```!`0``K!T```$!``"P'0```0$``+0=```!`0``N!T`
+M``$!``"\'0```0$``,`=```!`0``Q!T```$!``#('0```0$``,P=```!`0``
+MT!T```$!``#4'0```0$``-@=```!`0``W!T```$!``#@'0```0$``.0=```!
+M`0``Z!T```$!``#L'0```0$``/`=```!`0``]!T```$!``#X'0```0$``/P=
+M```!`0```!X```$!```$'@```0$```@>```!`0``#!X```$!```0'@```0$`
+M`!0>```!`0``&!X```$!```<'@```0$``"`>```!`0``)!X```$!```H'@``
+M`0$``"P>```!`0``,!X```$!```T'@```0$``#@>```!`0``/!X```$!``!`
+M'@```0$``$0>```!`0``2!X```$!``!,'@```0$``%`>```!`0``5!X```$!
+M``!8'@```0$``%P>```!`0``8!X```$!``!D'@```0$``&@>```!`0``;!X`
+M``$!``!P'@```0$``'0>```!`0``>!X```$!``!\'@```0$``(`>```!`0``
+MA!X```$!``"('@```0$``(P>```!`0``D!X```$!``"4'@```0$``)@>```!
+M`0``G!X```$!``"@'@```0$``*0>```!`0``J!X```$!``"L'@```0$``+`>
+M```!`0``M!X```$!``"X'@```0$``+P>```!`0``P!X```$!``#$'@```0$`
+M`,@>```!`0``S!X```$!``#0'@```0$``-0>```!`0``V!X```$!``#<'@``
+M`0$``.`>```!`0``Y!X```$!``#H'@```0$``.P>```!`0``\!X```$!``#T
+M'@```0$``/@>```!`0``_!X```$!````'P```0$```0?```!`0``"!\```$!
+M```,'P```0$``!`?```!`0``%!\```$!```8'P```0$``!P?```!`0``(!\`
+M``$!```D'P```0$``"@?```!`0``+!\```$!```P'P```0$``#0?```!`0``
+M.!\```$!```\'P```0$``$`?```!`0``1!\```$!``!('P```0$``$P?```!
+M`0``4!\```$!``!4'P```0$``%@?```!`0``7!\```$!``!@'P```0$``&0?
+M```!`0``:!\```$!``!L'P```0$``'`?```!`0``=!\```$!``!X'P```0$`
+M`'P?```!`0``@!\```$!``"$'P```0$``(@?```!`0``C!\```$!``"0'P``
+M`0$``)0?```!`0``F!\```$!``"<'P```0$``*`?```!`0``I!\```$!``"H
+M'P```0$``*P?```!`0``L!\```$!``"T'P```0$``+@?```!`0``O!\```$!
+M``#`'P```0$``,0?```!`0``R!\```$!``#,'P```0$``-`?```!`0``U!\`
+M``$!``#8'P```0$``-P?```!`0``X!\```$!``#D'P```0$``.@?```!`0``
+M[!\```$!``#P'P```0$``/0?```!`0``^!\```$!``#\'P```0$````@```!
+M`0``!"````$!```((````0$```P@```!`0``$"````$!```4(````0$``!@@
+M```!`0``'"````$!```@(````0$``"0@```!`0``*"````$!```L(````0$`
+M`#`@```!`0``-"````$!```X(````0$``#P@```!`0``0"````$!``!$(```
+M`0$``$@@```!`0``3"````$!``!0(````0$``%0@```!`0``6"````$!``!<
+M(````0$``&`@```!`0``9"````$!``!H(````0$``&P@```!`0``<"````$!
+M``!T(````0$``'@@```!`0``?"````$!``"`(````0$``(0@```!`0``B"``
+M``$!``",(````0$``)`@```!`0``E"````$!``"8(````0$``)P@```!`0``
+MH"````$!``"D(````0$``*@@```!`0``K"````$!``#D(````0$``.@@```!
+M`0``["````$!``#P(````0$``/0@```!`0``^"````$!``#\(````0$````A
+M```!`0``!"$```$!```((0```0$```PA```!`0``$"$```$!```4(0```0$`
+M`!@A```!`0``'"$```$!```@(0```0$``"0A```!`0``*"$```$!```L(0``
+M`0$``#`A```!`0``-"$```$!```X(0```0$``#PA```!`0``0"$```$!``!$
+M(0```0$``$@A```!`0``5"$```$!``!8(0```0$``%PA```!`0``8"$```$!
+M``!D(0```0$``&@A```!`0``;"$```$!``!P(0```0$``'0A```!`0``>"$`
+M``$!``!\(0```0$``(`A```!`0``A"$```$!``"((0```0$``(PA```!`0``
+MD"$```$!``"4(0```0$``)@A```!`0``G"$```$!``"@(0```0$``*0A```!
+M`0``J"$```$!``"L(0```0$``+`A```!`0``M"$```$!``"X(0```0$``+PA
+M```!`0``P"$```$!``#$(0```0$``,@A```!`0``S"$```$!``#0(0```0$`
+M`-0A```!`0``V"$```$!``#<(0```0$``.`A```!`0``Y"$```$!``#H(0``
+M`0$``.PA```!`0``\"$```$!``#T(0```0$``/@A```!`0``_"$```$!````
+M(@```0$```0B```!`0``""(```$!```,(@```0$``!`B```!`0``%"(```$!
+M```8(@```0$``!PB```!`0``("(```$!```D(@```0$``"@B```!`0``+"(`
+M``$!```P(@```0$``#0B```!`0``."(```$!```\(@```0$``$`B```!`0``
+M1"(```$!``!((@```0$``$PB```!`0``4"(```$!``!4(@```0$``%@B```!
+M`0``7"(```$!``!@(@```0$``&0B```!`0``:"(```$!``!L(@```0$``'`B
+M```!`0``="(```$!``!X(@```0$``'PB```!`0``@"(```$!``"$(@```0$`
+M`(@B```!`0``C"(```$!``"0(@```0$``)0B```!`0``F"(```$!``"<(@``
+M`0$``*`B```!`0``I"(```$!``"H(@```0$``*PB```!`0``L"(```$!``"T
+M(@```0$``+@B```!`0``O"(```$!``#`(@```0$``,0B```!`0``R"(```$!
+M``#,(@```0$``-`B```!`0``U"(```$!``#8(@```0$``-PB```!`0``X"(`
+M``$!``#D(@```0$``.@B```!`0``["(```$!``#P(@```0$``/0B```!`0``
+M^"(```$!``#\(@```0$````C```!`0``!",```$!```((P```0$```PC```!
+M`0``$",```$!```4(P```0$``!@C```!`0``'",```$!```@(P```0$``"0C
+M```!`0``*",```$!```L(P```0$``#`C```!`0``-",```$!```X(P```0$`
+M`#PC```!`0``0",```$!``!$(P```0$``$@C```!`0``3",```$!``!0(P``
+M`0$``%0C```!`0``6",```$!``!<(P```0$``&`C```!`0``9",```$!``!H
+M(P```0$``&PC```!`0``<",```$!``!T(P```0$``'@C```!`0``?",```$!
+M``"`(P```0$``(0C```!`0``P`4```$&``#,!0```0$``-`%```!`0``U`4`
+M``$!``#8!0```0$``-P%```!`0``X`4```$!``#D!0```0$``.@%```!`0``
+M[`4```$!``#P!0```0$``/0%```!`0``^`4```$!``#\!0```0$````&```!
+MM@``!`8```$!```(!@```0$```P&```!`0``$`8```$!```4!@```0$``!@&
+M```!`0``'`8```$!```@!@```0$``"0&```!`0``*`8```$!```L!@```0$`
+M`#`&```!`0``-`8```$!```X!@```0$``#P&```!!P$`1`8```$!``!(!@``
+M`0$``$P&```!`0``4`8```$!``!4!@```>@``*`+```!!@``K`L```$!``"P
+M"P```0$``+0+```!`0``N`L```$!``"\"P```0$``,`+```!`0``Q`L```$!
+M``#("P```0$``,P+```!`0``T`L```$!``#4"P```0$``-@+```!`0``W`L`
+M``$!``#@"P```=D!`.0+```!`0``Z`L```$!``#L"P```0$``/`+```!`0``
+M]`L```$!``#X"P```0$``/P+```!`0````P```$!```$#````0$```@,```!
+M`0``#`P```$!```0#````0$``!0,```!`0``&`P```$!```<#````4T!`"`,
+M```!`0``)`P```$!```H#````0$``"P,```!`0``,`P```$!```T#````7@!
+M`(`1```!!@``C!$```$!``"0$0```0$``)01```!`0``F!$```$!``"<$0``
+M`0$``*`1```!`0``I!$```$!``"H$0```0$``*P1```!`0``L!$```$!``"T
+M$0```0$``+@1```!`0``O!$```$!``#`$0```9\"`,01```!`0``R!$```$!
+M``#,$0```0$``-`1```!`0``U!$```$!``#8$0```0$``-P1```!`0``X!$`
+M``$!``#D$0```0$``.@1```!`0``[!$```$!``#P$0```0$``/01```!`0``
+M^!$```$!``#\$0```<X"```2```!`0``!!(```$!```($@```0$```P2```!
+M`0``$!(```$!```4$@```=("`(`7```!!@``C!<```$!``"0%P```0$``)07
+M```!`0``F!<```$!``"<%P```0$``*`7```!`0``I!<```$!``"H%P```0$`
+M`*P7```!`0``L!<```$!``"T%P```0$``+@7```!`0``O!<```$!``#`%P``
+M`;<#`,07```!`0``R!<```$!``#,%P```0$``-`7```!`0``U!<```$!``#8
+M%P```0$``-P7```!`0``X!<```$!``#D%P```0$``.@7```!`0``[!<```$!
+M``#P%P```0$``/07```!`0``^!<```$!``#\%P```78#```8```!`0``!!@`
+M``$!```(&````0$```P8```!`0``$!@```$!```4&````50#`%P8```!`0``
+M8!@```$!``!D&````0$``'`8```!`0``=!@```$!``!X&````0$``*08```!
+M`0``K!@```$!``"X&````0$``,`8```!`0``S!@```$!``#4&````0$``.`8
+M```!`0``Z!@```$!``#T&````0$``/P8```!`0``"!D```$!```0&0```0$`
+M`!P9```!`0``)!D```$!```P&0```0$``#09```!`0``.!D```$!``!$&0``
+M`0$``$@9```!`0``3!D```$!``!8&0```0$``&`9```!`0``;!D```$!``!T
+M&0```0$``(`9```!`0``A!D```$!``"(&0```0$``)09```!`0``F!D```$!
+M``"<&0```0$``*@9```!`0``K!D```$!``"P&0```0$``+P9```!`0``P!D`
+M``$!``#$&0```0$``-`9```!`0``U!D```$!``#8&0```0$``.09```!`0``
+M[!D```$!``#X&0```0$````:```!`0``#!H```$!```4&@```0$``"`:```!
+M`0``*!H```$!```T&@```0$``#P:```!`0``2!H```$!``!0&@```0$``%P:
+M```!`0``9!H```$!``!P&@```0$``'@:```!`0``A!H```$!``",&@```0$`
+M`)@:```!`0``H!H```$!``"L&@```0$``+`:```!`0``M!H```$!``#`&@``
+M`0$``,0:```!`0``R!H```$!``#4&@```0$``-P:```!`0``Z!H```$!``#P
+M&@```0$``/P:```!`0``!!L```$!```0&P```0$``!@;```!`0``)!L```$!
+M```L&P```0$``#@;```!`0``/!L```$!``!`&P```0$``$P;```!`0``5!L`
+M``$!``!@&P```0$``&0;```!`0``:!L```$!``!T&P```0$``'P;```!`0``
+MB!L```$!``",&P```0$``)`;```!`0``G!L```$!``"D&P```0$``+`;```!
+M`0``N!L```$!``#$&P```0$``,P;```!`0``V!L```$!``#<&P```0$``.`;
+M```!`0``[!L```$!``#P&P```0$``/0;```!`0```!P```$!```('````0$`
+M`!0<```!`0``'!P```$!```H'````0$``#`<```!`0``/!P```$!``!$'```
+M`0$``%`<```!`0``6!P```$!``!D'````0$``&P<```!`0``>!P```$!``"`
+M'````0$``(P<```!`0``E!P```$!``"@'````0$``*0<```!`0``J!P```$!
+M``"T'````0$``+P<```!`0``R!P```$!``#0'````0$``-P<```!`0``Y!P`
+M``$!``#P'````0$``/@<```!`0``0!T```$!``!$'0```0$``)P=```!`0``
+MH!T```$!``"D'0```94$`*@=```!`0``K!T```$!````'@```0$```0>```!
+ME00`7!X```$!``!@'@```0$``&0>```!`0``:!X```$!``!L'@```0$``'`>
+M```!`0``=!X```$!``!X'@```0$``'P>```!`0``O!X```$!``#`'@```0$`
+9`,0>```!E00`R!X```$!``#,'@```0$`````
+`
+end
diff --git a/sys/dev/hpt27xx/ldm.h b/sys/dev/hpt27xx/ldm.h
new file mode 100644
index 0000000..d3b5e61
--- /dev/null
+++ b/sys/dev/hpt27xx/ldm.h
@@ -0,0 +1,533 @@
+/*-
+ * Copyright (c) 2011 HighPoint Technologies, Inc.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ */
+
+#include <dev/hpt27xx/hpt27xx_config.h>
+
+#ifndef _HPT_LDM_H_
+#define _HPT_LDM_H_
+
+#define VERMAGIC_LDM 75
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+
+#define __hpt_set_ver(x, v1, v2, v3, v4, v5) x ## _R_ ## v1 ## _ ## v2 ## _ ## v3 ## _ ## v4 ## _ ## v5
+#define _hpt_set_ver(x, v1, v2, v3, v4, v5) __hpt_set_ver(x, v1, v2, v3, v4, v5)
+#define hpt_set_ver(x) _hpt_set_ver(x, VERMAGIC_OSM, VERMAGIC_HIM, VERMAGIC_LDM, VERMAGIC_ARRAY, MAX_MEMBERS)
+
+#define ldm_register_him hpt_set_ver(ldm_register_him)
+#define ldm_register_vdev_class hpt_set_ver(ldm_register_vdev_class)
+#define ldm_alloc_cmds hpt_set_ver(ldm_alloc_cmds)
+
+
+#ifndef HPT_INTERFACE_VERSION
+#define HPT_INTERFACE_VERSION 0x02010000
+#endif
+
+#ifndef MAX_PARTITIONS_PER_DISK
+#define MAX_PARTITIONS_PER_DISK 4
+#endif
+
+#if defined(__MAX_PARTITIONS_PER_DISK) && MAX_PARTITIONS_PER_DISK > __MAX_PARTITIONS_PER_DISK
+#error "Please redefine MAX_PARTITIONS_PER_DISK!!!"
+#endif
+
+#define MAX(a,b) (((a)>(b))?(a):(b))
+#define MIN(a,b) (((a)<(b))?(a):(b))
+
+
+typedef char check_HPT_TIME_is_unsigned[ (HPT_TIME)(-1) > 0 ? 1 : -1 ];
+
+#define hpt_time_after_eq(a, b) ((int)(a) - (int)(b) >= 0)
+#define hpt_time_after(a, b) ((int)(a) - (int)(b) > 0)
+
+
+
+struct freelist {
+ int dma;
+ HPT_UINT alignment;
+ HPT_UINT count;
+ HPT_UINT size;
+ void * head;
+ struct freelist *next;
+#if DBG
+ char *tag;
+ HPT_UINT reserved_count;
+ #define freelist_debug_tag(list, _tag) (list)->tag = _tag
+#else
+ #define freelist_debug_tag(list, _tag)
+#endif
+};
+
+
+void freelist_reserve(struct freelist *list, void *osext, HPT_UINT size, HPT_UINT count);
+
+void *freelist_get(struct freelist *);
+void freelist_put(struct freelist *, void *p);
+
+void freelist_reserve_dma(struct freelist *list, void *osext, HPT_UINT size, HPT_UINT alignment, HPT_UINT count);
+void *freelist_get_dma(struct freelist *, BUS_ADDRESS *busaddr);
+void freelist_put_dma(struct freelist *, void *p, BUS_ADDRESS busaddr);
+
+
+#define freelist_reserve_with_tag(list, osext, size, count) \
+ do {\
+ freelist_debug_tag(list, #list " at " __FILE__);\
+ freelist_reserve(list, osext, (HPT_UINT)(size), (HPT_UINT)(count));\
+ }while(0)
+
+#define freelist_reserve_dma_with_tag(list, osext, size, alignment, count) \
+ do {\
+ freelist_debug_tag(list, #list " at " __FILE__);\
+ freelist_reserve_dma(list, osext, (HPT_UINT)(size), (HPT_UINT)(alignment), (HPT_UINT)(count));\
+ }while(0)
+
+struct lock_request {
+ HPT_U64 start, end;
+ struct lock_request *next;
+ struct list_head waiters; /* blocked commands */
+ struct tq_item callback;
+ int lock_cc;
+};
+
+#define INIT_LOCK_REQUEST(req, _start, _end, _cb, _arg, _cc) \
+ do {\
+ (req)->next = 0;\
+ (req)->start = _start;\
+ (req)->end = _end;\
+ INIT_TQ_ITEM(&(req)->callback, _cb, _arg);\
+ INIT_LIST_HEAD(&(req)->waiters);\
+ (req)->lock_cc = _cc;\
+ } while (0)
+
+struct task_queue {
+ struct tq_item *head, *tail;
+};
+
+#define TQ_EMPTY(tq) ((tq)->head==0)
+
+struct dmapool_order {
+ HPT_UINT npages;
+ struct tq_item wakeup_fn;
+ struct dmapool_order *next;
+};
+
+struct dmapool_client {
+ void * handle;
+ HPT_UINT (*shrink)(void *handle, HPT_UINT npages);
+ int (*resume)(void *handle);
+ struct dmapool_client *next;
+};
+
+typedef struct _VBUS * PVBUS;
+typedef struct _VDEV * PVDEV;
+
+
+void dmapool_register_client(PVBUS vbus, struct dmapool_client *client);
+
+
+void dmapool_active(PVBUS vbus);
+
+/* return 0 if the request is immediately satisfied, non-zero otherwise. */
+int dmapool_make_order(PVBUS vbus, struct dmapool_order *order);
+
+
+void *dmapool_get_page(PVBUS vbus, BUS_ADDRESS *busaddr);
+void *dmapool_get_page_at(PVBUS vbus, void *p, BUS_ADDRESS *busaddr);
+void dmapool_put_page(PVBUS vbus, void *p, BUS_ADDRESS busaddr);
+void dmapool_init(PVBUS vbus);
+HPT_UINT dmapool_max_class_pages(PVBUS vbus);
+
+
+struct timer_call {
+ HPT_U32 interval; /*microseconds*/
+ HPT_TIME expire_time; /*microseconds*/
+ void (*proc)(void * arg);
+ void * arg;
+ struct timer_call ** pprev;
+ struct timer_call * next;
+};
+
+#define ldm_init_timer(timer) do { (timer)->next=0; (timer)->pprev=0; } while (0)
+
+#define INIT_TIMER_CALL(timer, _interval, _proc, _arg) \
+ do { \
+ HPT_ASSERT((timer)->next==0 && (timer)->pprev==0);\
+ (timer)->interval = _interval;\
+ (timer)->proc = _proc;\
+ (timer)->arg = _arg;\
+ } while(0)
+
+void ldm_request_timer(PVBUS vbus, struct timer_call * tc);
+void ldm_remove_timer(PVBUS vbus, struct timer_call * tc);
+void ldm_on_timer(PVBUS vbus);
+
+
+typedef struct _LDM_ADAPTER
+{
+ struct _LDM_ADAPTER *next;
+ HIM *him;
+ void *him_handle;
+ PVBUS vbus;
+ struct freelist freelist_dev;
+ int devid_start;
+ struct freelist freelist_plugged_dpc;
+ HPT_BOOL master;
+}
+LDM_ADAPTER, *PLDM_ADAPTER;
+
+typedef struct _IOCTL_ARG
+{
+ struct list_head link;
+ PVBUS vbus;
+ HPT_U32 dwIoControlCode;
+ HPT_U32 nInBufferSize;
+ HPT_U32 nOutBufferSize;
+ void * lpInBuffer;
+ void * lpOutBuffer;
+ HPT_U32 *lpBytesReturned;
+ void * ioctl_cmnd;
+ void (* done)(struct _IOCTL_ARG *);
+ int result; /* HPT_IOCTL_RESULT_ */
+ struct tq_item dpc;
+} IOCTL_ARG;
+
+#define HPT_IOCTL_RESULT_OK 0
+#define HPT_IOCTL_RESULT_FAILED (-1)
+#define HPT_IOCTL_RESULT_INVALID (-2)
+#define HPT_IOCTL_RESULT_RETRY (-3)
+#define HPT_IOCTL_RESULT_WRONG_VBUS (-4)
+
+void ldm_ioctl( PVBUS vbus, IOCTL_ARG *IAPnt);
+void ldm_set_autorebuild(PVBUS vbus, int enable);
+HPT_U32 ldm_get_device_id(PVDEV vd); /* for ioctl */
+
+#ifndef __HPT_RAW_LBA
+#define __HPT_RAW_LBA HPT_RAW_LBA
+#endif
+
+#include <dev/hpt27xx/array.h>
+
+typedef struct hpt_raw_disk
+{
+#ifdef SUPPORT_ARRAY
+ PRAW_PARTITION raw_part_list;
+ __HPT_RAW_LBA max_available_capacity;
+ __HPT_RAW_LBA total_available_capacity;
+#endif
+ __HPT_RAW_LBA real_capacity;
+ __HPT_RAW_LBA head_position;
+
+ HPT_U16 max_sectors_per_cmd;
+ HPT_U8 max_queue_depth;
+ HPT_U8 user_select_mode;
+
+ HPT_UINT uninitialized : 1;
+ HPT_UINT legacy_disk : 1;
+ HPT_UINT is_spare : 1;
+ HPT_UINT v3_format : 1;
+ HPT_UINT need_sync : 1;
+ HPT_UINT temp_spare : 1;
+ HPT_UINT need_check_array : 1;
+ HPT_UINT df_user_mode_set: 1;
+
+ HPT_UINT df_read_ahead_set: 1;
+ HPT_UINT enable_read_ahead : 1;
+ HPT_UINT df_write_cache_set: 1;
+ HPT_UINT enable_write_cache : 1;
+ HPT_UINT df_tcq_set: 1;
+ HPT_UINT enable_tcq : 1;
+ HPT_UINT df_ncq_set: 1;
+ HPT_UINT enable_ncq : 1;
+
+ HIM * him;
+ int index;
+ PLDM_ADAPTER adapter;
+ void * phy_dev;
+
+ char model[40];
+
+ struct tq_item reset_dpc;
+ int reset_pending;
+
+ struct tq_item fail_dpc;
+ int fail_pending;
+}
+HPT_RAW_DISK, *PHPT_RAW_DISK;
+
+struct vdev_class
+{
+ struct vdev_class *next;
+
+ HPT_U8 __type;
+ HPT_U8 stripped; /* RAID0,3,5,6 */
+ HPT_U8 redundancy; /* RAID1-1, RAID3/5-1, RAID6-2 */
+ HPT_U8 must_init; /* RAID3,5,6 */
+ HPT_U8 docache;
+
+ HPT_UINT vbus_ext_size;
+ HPT_UINT vbus_ext_offset; /* used by LDM */
+ HPT_UINT dev_ext_size;
+ HPT_UINT cmd_ext_size;
+
+
+ void (*get_mem_info)(PVBUS vbus, void *osext, int phydev_count);
+ void (*queue_cmd)(PCOMMAND cmd);
+ void (*member_failed)(struct _VDEV * vd);
+
+
+ void (*initialize)(PVBUS vbus);
+ void (*release)(PVBUS vbus);
+ int (*add)(PVDEV vd);
+ void (*remove)(PVDEV vd);
+ void (*reset)(PVDEV vd);
+ void (*sync_stamp)(PVDEV vd);
+ int (*support_type)(int type);
+};
+
+
+#define VDEV_CLASS_CONSTRUCTOR(type, prefix) { \
+ 0, \
+ type, \
+ prefix ## _stripped, \
+ prefix ## _redundancy, \
+ prefix ## _must_init, \
+ 0, \
+ (HPT_UINT)(prefix ## _vbus_ext_size), \
+ 0, \
+ (HPT_UINT)(prefix ## _dev_ext_size), \
+ (HPT_UINT)(prefix ## _cmd_ext_size), \
+ prefix ## _get_mem_info, \
+ prefix ## _queue_cmd, \
+ prefix ## _member_failed, \
+ prefix ## _initialize, \
+ prefix ## _release, \
+ prefix ## _add, \
+ prefix ## _remove, \
+ prefix ## _reset, \
+ prefix ## _sync_stamp, \
+ 0 \
+}
+
+#define VD_RAW 1
+#define VD_PARTITION 4
+
+#define mIsArray(vdev_type) ((vdev_type)>VD_PARTITION)
+
+#define VD_RAID0 5
+#define VD_RAID1 6
+#define VD_JBOD 7
+#define VD_RAID5 8
+#define VD_RAID6 9
+#define VD_RAID3 10
+#define VD_RAID4 11
+#define VD_RAID1E 12
+
+#define MAX_VD_TYPE_ID 12
+
+struct vdev_class *ldm_find_vdev_class(HPT_U8 type);
+
+typedef struct _VDEV {
+ PVBUS vbus;
+ struct vdev_class *Class;
+ HPT_U8 type;
+ PVDEV parent;
+ void * ext;
+ HPT_U64 capacity;
+ int target_id;
+ HPT_UINT cmds_per_request;
+
+ union {
+#ifdef SUPPORT_ARRAY
+ HPT_ARRAY array;
+ HPT_PARTITION partition;
+#endif
+ HPT_RAW_DISK raw;
+ } u;
+
+ HPT_U8 vf_online : 1;
+ HPT_U8 vf_bootmark : 1;
+ HPT_U8 vf_bootable : 1;
+ HPT_U8 vf_resetting: 1;
+ HPT_U8 vf_quiesced: 1;
+ HPT_U8 vf_clslock: 1;
+
+ HPT_U8 cache_policy; /* see CACHE_POLICY_* */
+
+ HPT_UINT cq_len;
+ HPT_UINT cmds_sent;
+
+ struct list_head link;
+ struct list_head cq_wait_send;
+ struct list_head cq_sent;
+
+ HPT_U32 last_active;
+ int cq_priority;
+ struct list_head cq_wait_lock;
+ struct lock_request *locks_granted;
+ struct lock_request *locks_wait;
+ HPT_U32 ioctl_id;
+ void * cc_ext;
+}
+VDEV;
+
+#define CACHE_POLICY_NONE 0
+#define CACHE_POLICY_WRITE_THROUGH 1
+#define CACHE_POLICY_WRITE_BACK 2
+
+
+extern HIM *him_list;
+
+
+void ldm_register_him(PHIM him);
+
+
+void ldm_register_vdev_class(struct vdev_class *Class);
+
+
+HPT_BOOL ldm_register_adapter(PLDM_ADAPTER adapter);
+
+
+int init_config(void);
+
+HPT_UINT ldm_get_vbus_size(void);
+
+
+void ldm_create_vbus(PVBUS vbus, void *osext);
+
+
+void ldm_get_mem_info(PVBUS vbus, void *osext);
+
+
+void *ldm_get_vbus_ext(PVBUS vbus, struct vdev_class *Class);
+
+
+PVBUS ldm_get_next_vbus(PVBUS vbus, void **posext);
+
+#define ldm_for_each_vbus(vbus, vbus_ext) \
+ for (vbus = ldm_get_next_vbus(0, (void **)(void *)&vbus_ext); vbus; \
+ vbus = ldm_get_next_vbus(vbus, (void **)(void *)&vbus_ext))
+
+
+void ldm_initialize_vbus_async(PVBUS vbus, PLDM_ADAPTER master_adapter, void (*done)(void *osext));
+
+/* ldm_initialize_vbus is deprecated since it will hold the CPU too long. */
+#define ldm_initialize_vbus(vbus, adapter) ldm_initialize_vbus_async(vbus, adapter, 0)
+
+
+void ldm_release_vbus(PVBUS vbus);
+
+PVDEV ldm_create_vdev(PVBUS vbus, HPT_U8 type);
+void ldm_release_vdev(PVDEV vd);
+
+PVDEV ldm_find_target(PVBUS vbus, int id);
+PVDEV ldm_find_stamp(PVBUS vbus, HPT_U32 stamp, int seq);
+
+
+PCOMMAND ldm_alloc_cmds(PVBUS vbus, HPT_UINT cnt);
+void ldm_free_cmds(PCOMMAND cmd);
+
+HPT_UINT ldm_get_cmd_size(void);
+PCOMMAND ldm_alloc_cmds_from_list(PVBUS vbus, struct freelist *list, HPT_UINT cnt);
+void ldm_free_cmds_to_list(struct freelist *list, PCOMMAND cmd);
+
+
+PCOMMAND __ldm_alloc_cmd(struct freelist *list);
+
+#ifdef OS_SUPPORT_TASK
+#define CMD_SET_PRIORITY(cmd, pri) cmd->priority = (pri)
+#else
+#define CMD_SET_PRIORITY(cmd, pri)
+#endif
+
+
+#define CMD_GROUP_GET(grp, cmd) \
+ do {\
+ grp->grplist->count++;\
+ cmd = __ldm_alloc_cmd(grp->grplist);\
+ cmd->vbus = grp->vbus;\
+ cmd->grplist = grp->grplist;\
+ CMD_SET_PRIORITY(cmd, grp->priority);\
+ } while(0)
+
+#define CMD_GROUP_PUT(grp, cmd) \
+ do {\
+ freelist_put(grp->grplist, cmd);\
+ grp->grplist->count--;\
+ } while (0)
+
+
+
+
+void ldm_queue_cmd(PCOMMAND cmd);
+void vdev_queue_cmd(PCOMMAND cmd);
+void ldm_finish_cmd(PCOMMAND cmd);
+
+
+int ldm_acquire_lock(PVDEV vd, struct lock_request *req);
+void ldm_release_lock(PVDEV vd, struct lock_request *req);
+
+void ldm_queue_task(struct task_queue *tq, struct tq_item *t);
+void ldm_queue_vbus_dpc(PVBUS vbus, struct tq_item *t);
+
+HPT_BOOL ldm_intr(PVBUS vbus);
+void ldm_run(PVBUS vbus);
+int ldm_idle(PVBUS vbus);
+
+
+int ldm_reset_vbus(PVBUS vbus);
+
+
+void ldm_suspend(PVBUS vbus);
+void ldm_resume(PVBUS vbus);
+void ldm_shutdown(PVBUS vbus);/*shutdown all the controllers*/
+
+
+#define HIM_EVENT_DEVICE_REMOVED 1
+#define HIM_EVENT_DEVICE_PLUGGED 2
+#define HIM_EVENT_DEVICE_ERROR 3
+#define HIM_EVENT_RESET_REQUIRED 4
+#define HIM_EVENT_QUIESCE_DEVICE 5
+#define HIM_EVENT_UNQUIESCE_DEVICE 6
+#define HIM_EVENT_CONFIG_CHANGED 7
+
+void ldm_event_notify(HPT_U32 event, void *arg1, void *arg2);
+
+void log_sector_repair(PVDEV vd, int success, HPT_LBA lba, HPT_U16 nsectors);
+
+void ldm_register_device(PVDEV vd);
+void ldm_unregister_device(PVDEV vd);
+
+PVBUS him_handle_to_vbus(void * him_handle);
+void ldm_ide_fixstring (HPT_U8 *s, const int bytecount);
+#if defined(__cplusplus)
+}
+#endif
+#endif
diff --git a/sys/dev/hpt27xx/list.h b/sys/dev/hpt27xx/list.h
new file mode 100644
index 0000000..cae0767
--- /dev/null
+++ b/sys/dev/hpt27xx/list.h
@@ -0,0 +1,130 @@
+/*-
+ * Copyright (c) 2011 HighPoint Technologies, Inc.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ */
+
+#include <dev/hpt27xx/hpt27xx_config.h>
+
+#ifndef _HPT_LIST_H_
+#define _HPT_LIST_H_
+
+#ifndef _LINUX_LIST_H
+
+#ifndef HPT_INLINE
+#define HPT_INLINE __inline
+#endif
+
+struct list_head {
+ struct list_head *next, *prev;
+};
+
+#define INIT_LIST_HEAD(ptr) do { (ptr)->next = (ptr); (ptr)->prev = (ptr); } while (0)
+
+static HPT_INLINE void __list_add(struct list_head * _new, struct list_head * prev, struct list_head * next)
+{
+ next->prev = _new;
+ _new->next = next;
+ _new->prev = prev;
+ prev->next = _new;
+}
+
+static HPT_INLINE void list_add(struct list_head *_new, struct list_head *head)
+{
+ __list_add(_new, head, head->next);
+}
+
+static HPT_INLINE void list_add_tail(struct list_head *_new, struct list_head *head)
+{
+ __list_add(_new, head->prev, head);
+}
+
+static HPT_INLINE void __list_del(struct list_head * prev, struct list_head * next)
+{
+ next->prev = prev;
+ prev->next = next;
+}
+
+static HPT_INLINE void list_del(struct list_head *entry)
+{
+ __list_del(entry->prev, entry->next);
+}
+
+static HPT_INLINE void list_del_init(struct list_head *entry)
+{
+ __list_del(entry->prev, entry->next);
+ INIT_LIST_HEAD(entry);
+}
+
+static HPT_INLINE int list_empty(struct list_head *head)
+{
+ HPT_ASSERT(!(head->next==head && head->prev!=head));
+ return head->next == head;
+}
+
+static HPT_INLINE void __list_splice(struct list_head *list,
+ struct list_head *head)
+{
+ struct list_head *first = list->next;
+ struct list_head *last = list->prev;
+ struct list_head *at = head->next;
+
+ first->prev = head;
+ head->next = first;
+
+ last->next = at;
+ at->prev = last;
+}
+
+static HPT_INLINE void list_splice(struct list_head *list, struct list_head *head)
+{
+ if (!list_empty(list))
+ __list_splice(list, head);
+}
+
+static HPT_INLINE void list_splice_init(struct list_head *list, struct list_head *head)
+{
+ if (!list_empty(list)) {
+ __list_splice(list, head);
+ INIT_LIST_HEAD(list);
+ }
+}
+
+#define list_entry(ptr, type, member) \
+ ((type *)((char *)(ptr)-(HPT_UPTR)(&((type *)0)->member)))
+
+#define list_for_each(pos, head) \
+ for (pos = (head)->next; pos != (head); pos = pos->next)
+
+#define list_for_each_safe(pos, n, head) \
+ for (pos = (head)->next, n = pos->next; pos != (head); \
+ pos = n, n = pos->next)
+
+#define get_first_item(attached, type, member) \
+ ((type *)((char *)((attached)->next)-(HPT_UPTR)(&((type *)0)->member)))
+
+#endif
+
+#endif
diff --git a/sys/dev/hpt27xx/os_bsd.c b/sys/dev/hpt27xx/os_bsd.c
new file mode 100644
index 0000000..43f8116
--- /dev/null
+++ b/sys/dev/hpt27xx/os_bsd.c
@@ -0,0 +1,370 @@
+/*-
+ * Copyright (c) 2011 HighPoint Technologies, Inc.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ */
+
+#include <dev/hpt27xx/hpt27xx_config.h>
+
+#include <dev/hpt27xx/os_bsd.h>
+
+/* hardware access */
+HPT_U8 os_inb (void *port) { return inb((unsigned)(HPT_UPTR)port); }
+HPT_U16 os_inw (void *port) { return inw((unsigned)(HPT_UPTR)port); }
+HPT_U32 os_inl (void *port) { return inl((unsigned)(HPT_UPTR)port); }
+
+void os_outb (void *port, HPT_U8 value) { outb((unsigned)(HPT_UPTR)port, (value)); }
+void os_outw (void *port, HPT_U16 value) { outw((unsigned)(HPT_UPTR)port, (value)); }
+void os_outl (void *port, HPT_U32 value) { outl((unsigned)(HPT_UPTR)port, (value)); }
+
+void os_insw (void *port, HPT_U16 *buffer, HPT_U32 count)
+{ insw((unsigned)(HPT_UPTR)port, (void *)buffer, count); }
+
+void os_outsw(void *port, HPT_U16 *buffer, HPT_U32 count)
+{ outsw((unsigned)(HPT_UPTR)port, (void *)buffer, count); }
+
+HPT_U32 __dummy_reg = 0;
+
+/* PCI configuration space */
+HPT_U8 os_pci_readb (void *osext, HPT_U8 offset)
+{
+ return pci_read_config(((PHBA)osext)->pcidev, offset, 1);
+}
+
+HPT_U16 os_pci_readw (void *osext, HPT_U8 offset)
+{
+ return pci_read_config(((PHBA)osext)->pcidev, offset, 2);
+}
+
+HPT_U32 os_pci_readl (void *osext, HPT_U8 offset)
+{
+ return pci_read_config(((PHBA)osext)->pcidev, offset, 4);
+}
+
+void os_pci_writeb (void *osext, HPT_U8 offset, HPT_U8 value)
+{
+ pci_write_config(((PHBA)osext)->pcidev, offset, value, 1);
+}
+
+void os_pci_writew (void *osext, HPT_U8 offset, HPT_U16 value)
+{
+ pci_write_config(((PHBA)osext)->pcidev, offset, value, 2);
+}
+
+void os_pci_writel (void *osext, HPT_U8 offset, HPT_U32 value)
+{
+ pci_write_config(((PHBA)osext)->pcidev, offset, value, 4);
+}
+
+#if __FreeBSD_version < 500043
+/* PCI space access */
+HPT_U8 pcicfg_read_byte (HPT_U8 bus, HPT_U8 dev, HPT_U8 func, HPT_U8 reg)
+{
+ HPT_U8 v;
+ pcicfgregs pciref;
+
+ pciref.bus = bus;
+ pciref.slot = dev;
+ pciref.func = func;
+
+ v = pci_cfgread(&pciref, reg, 1);
+ return v;
+}
+HPT_U32 pcicfg_read_dword(HPT_U8 bus, HPT_U8 dev, HPT_U8 func, HPT_U8 reg)
+{
+ HPT_U32 v;
+ pcicfgregs pciref;
+
+ pciref.bus = bus;
+ pciref.slot = dev;
+ pciref.func = func;
+
+ v = pci_cfgread(&pciref, reg, 4);
+ return v;
+}
+void pcicfg_write_byte (HPT_U8 bus, HPT_U8 dev, HPT_U8 func, HPT_U8 reg, HPT_U8 v)
+{
+ pcicfgregs pciref;
+
+ pciref.hose = -1;
+ pciref.bus = bus;
+ pciref.slot = dev;
+ pciref.func = func;
+
+ pci_cfgwrite(&pciref, reg, v, 1);
+}
+void pcicfg_write_dword(HPT_U8 bus, HPT_U8 dev, HPT_U8 func, HPT_U8 reg, HPT_U32 v)
+{
+ pcicfgregs pciref;
+
+ pciref.hose = -1;
+ pciref.bus = bus;
+ pciref.slot = dev;
+ pciref.func = func;
+
+ pci_cfgwrite(&pciref, reg, v, 4);
+}/* PCI space access */
+#else
+HPT_U8 pcicfg_read_byte (HPT_U8 bus, HPT_U8 dev, HPT_U8 func, HPT_U8 reg)
+{
+ return (HPT_U8)pci_cfgregread(bus, dev, func, reg, 1);
+}
+HPT_U32 pcicfg_read_dword(HPT_U8 bus, HPT_U8 dev, HPT_U8 func, HPT_U8 reg)
+{
+ return (HPT_U32)pci_cfgregread(bus, dev, func, reg, 4);;
+}
+void pcicfg_write_byte (HPT_U8 bus, HPT_U8 dev, HPT_U8 func, HPT_U8 reg, HPT_U8 v)
+{
+ pci_cfgregwrite(bus, dev, func, reg, v, 1);
+}
+void pcicfg_write_dword(HPT_U8 bus, HPT_U8 dev, HPT_U8 func, HPT_U8 reg, HPT_U32 v)
+{
+ pci_cfgregwrite(bus, dev, func, reg, v, 4);
+}/* PCI space access */
+#endif
+
+void *os_map_pci_bar(
+ void *osext,
+ int index,
+ HPT_U32 offset,
+ HPT_U32 length
+)
+{
+ PHBA hba = (PHBA)osext;
+ HPT_U32 base;
+
+ hba->pcibar[index].rid = 0x10 + index * 4;
+ base = pci_read_config(hba->pcidev, hba->pcibar[index].rid, 4);
+
+ if (base & 1) {
+ hba->pcibar[index].type = SYS_RES_IOPORT;
+ hba->pcibar[index].res = bus_alloc_resource(hba->pcidev,
+ hba->pcibar[index].type, &hba->pcibar[index].rid, 0, ~0, length, RF_ACTIVE);
+ hba->pcibar[index].base = (void *)(unsigned long)(base & ~0x1);
+ } else {
+ hba->pcibar[index].type = SYS_RES_MEMORY;
+ hba->pcibar[index].res = bus_alloc_resource(hba->pcidev,
+ hba->pcibar[index].type, &hba->pcibar[index].rid, 0, ~0, length, RF_ACTIVE);
+ hba->pcibar[index].base = (char *)rman_get_virtual(hba->pcibar[index].res) + offset;
+ }
+
+ return hba->pcibar[index].base;
+}
+
+void os_unmap_pci_bar(void *osext, void *base)
+{
+ PHBA hba = (PHBA)osext;
+ int index;
+
+ for (index=0; index<6; index++) {
+ if (hba->pcibar[index].base==base) {
+ bus_release_resource(hba->pcidev, hba->pcibar[index].type,
+ hba->pcibar[index].rid, hba->pcibar[index].res);
+ hba->pcibar[index].base = 0;
+ return;
+ }
+ }
+}
+
+void freelist_reserve(struct freelist *list, void *osext, HPT_UINT size, HPT_UINT count)
+{
+ PVBUS_EXT vbus_ext = osext;
+
+ if (vbus_ext->ext_type!=EXT_TYPE_VBUS)
+ vbus_ext = ((PHBA)osext)->vbus_ext;
+
+ list->next = vbus_ext->freelist_head;
+ vbus_ext->freelist_head = list;
+ list->dma = 0;
+ list->size = size;
+ list->head = 0;
+#if DBG
+ list->reserved_count =
+#endif
+ list->count = count;
+}
+
+void *freelist_get(struct freelist *list)
+{
+ void * result;
+ if (list->count) {
+ HPT_ASSERT(list->head);
+ result = list->head;
+ list->head = *(void **)result;
+ list->count--;
+ return result;
+ }
+ return 0;
+}
+
+void freelist_put(struct freelist * list, void *p)
+{
+ HPT_ASSERT(list->dma==0);
+ list->count++;
+ *(void **)p = list->head;
+ list->head = p;
+}
+
+void freelist_reserve_dma(struct freelist *list, void *osext, HPT_UINT size, HPT_UINT alignment, HPT_UINT count)
+{
+ PVBUS_EXT vbus_ext = osext;
+
+ if (vbus_ext->ext_type!=EXT_TYPE_VBUS)
+ vbus_ext = ((PHBA)osext)->vbus_ext;
+
+ list->next = vbus_ext->freelist_dma_head;
+ vbus_ext->freelist_dma_head = list;
+ list->dma = 1;
+ list->alignment = alignment;
+ list->size = size;
+ list->head = 0;
+#if DBG
+ list->reserved_count =
+#endif
+ list->count = count;
+}
+
+void *freelist_get_dma(struct freelist *list, BUS_ADDRESS *busaddr)
+{
+ void *result;
+ HPT_ASSERT(list->dma);
+ result = freelist_get(list);
+ if (result)
+ *busaddr = *(BUS_ADDRESS *)((void **)result+1);
+ return result;
+}
+
+void freelist_put_dma(struct freelist *list, void *p, BUS_ADDRESS busaddr)
+{
+ HPT_ASSERT(list->dma);
+ list->count++;
+ *(void **)p = list->head;
+ *(BUS_ADDRESS *)((void **)p+1) = busaddr;
+ list->head = p;
+}
+
+HPT_U32 os_get_stamp(void)
+{
+ HPT_U32 stamp;
+ do { stamp = random(); } while (stamp==0);
+ return stamp;
+}
+
+void os_stallexec(HPT_U32 microseconds)
+{
+ DELAY(microseconds);
+}
+
+static void os_timer_for_ldm(void *arg)
+{
+ PVBUS_EXT vbus_ext = (PVBUS_EXT)arg;
+ ldm_on_timer((PVBUS)vbus_ext->vbus);
+}
+
+void os_request_timer(void * osext, HPT_U32 interval)
+{
+ PVBUS_EXT vbus_ext = osext;
+
+ HPT_ASSERT(vbus_ext->ext_type==EXT_TYPE_VBUS);
+
+ untimeout(os_timer_for_ldm, vbus_ext, vbus_ext->timer);
+ vbus_ext->timer = timeout(os_timer_for_ldm, vbus_ext, interval * hz / 1000000);
+}
+
+HPT_TIME os_query_time(void)
+{
+ return ticks * (1000000 / hz);
+}
+
+void os_schedule_task(void *osext, OSM_TASK *task)
+{
+ PVBUS_EXT vbus_ext = osext;
+
+ HPT_ASSERT(task->next==0);
+
+ if (vbus_ext->tasks==0)
+ vbus_ext->tasks = task;
+ else {
+ OSM_TASK *t = vbus_ext->tasks;
+ while (t->next) t = t->next;
+ t->next = task;
+ }
+
+ if (vbus_ext->worker.ta_context)
+ TASK_ENQUEUE(&vbus_ext->worker);
+}
+
+int os_revalidate_device(void *osext, int id)
+{
+
+ return 0;
+}
+
+int os_query_remove_device(void *osext, int id)
+{
+ PVBUS_EXT vbus_ext = (PVBUS_EXT)osext;
+ struct cam_periph *periph = NULL;
+ struct cam_path *path;
+ int status,retval = 0;
+
+ status = xpt_create_path(&path, NULL, vbus_ext->sim->path_id, id, 0);
+ if (status == CAM_REQ_CMP) {
+ if((periph = cam_periph_find(path, "da")) != NULL){
+ if(periph->refcount >= 1)
+ retval = -1;
+ }
+ xpt_free_path(path);
+ }
+
+ return retval;
+}
+
+HPT_U8 os_get_vbus_seq(void *osext)
+{
+ return ((PVBUS_EXT)osext)->sim->path_id;
+}
+
+int os_printk(char *fmt, ...)
+{
+ va_list args;
+ static char buf[512];
+
+ va_start(args, fmt);
+ vsnprintf(buf, sizeof(buf), fmt, args);
+ va_end(args);
+ return printf("%s: %s\n", driver_name, buf);
+}
+
+#if DBG
+void os_check_stack(const char *location, int size){}
+
+void __os_dbgbreak(const char *file, int line)
+{
+ printf("*** break at %s:%d ***", file, line);
+ while (1);
+}
+
+int hpt_dbg_level = 1;
+#endif
diff --git a/sys/dev/hpt27xx/os_bsd.h b/sys/dev/hpt27xx/os_bsd.h
new file mode 100644
index 0000000..3895f40
--- /dev/null
+++ b/sys/dev/hpt27xx/os_bsd.h
@@ -0,0 +1,263 @@
+/*-
+ * Copyright (c) 2011 HighPoint Technologies, Inc.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ */
+
+#include <dev/hpt27xx/hpt27xx_config.h>
+
+#ifndef _OS_BSD_H
+#define _OS_BSD_H
+
+#ifndef DBG
+#define DBG 0
+#endif
+
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/cons.h>
+#if (__FreeBSD_version >= 500000)
+#include <sys/time.h>
+#include <sys/systm.h>
+#else
+#include <machine/clock.h> /*to support DELAY function under 4.x BSD versions*/
+#endif
+
+#include <sys/stat.h>
+#include <sys/malloc.h>
+#include <sys/conf.h>
+#include <sys/libkern.h>
+#include <sys/kernel.h>
+
+#if (__FreeBSD_version >= 500000)
+#include <sys/kthread.h>
+#include <sys/mutex.h>
+#include <sys/module.h>
+#endif
+
+#include <sys/eventhandler.h>
+#include <sys/bus.h>
+#include <sys/taskqueue.h>
+#include <sys/ioccom.h>
+
+#include <machine/resource.h>
+#if __FreeBSD_version >= 500043
+#include <machine/pci_cfgreg.h>
+#endif
+#include <machine/bus.h>
+#include <machine/stdarg.h>
+#include <sys/rman.h>
+
+#include <vm/vm.h>
+#include <vm/pmap.h>
+
+#if (__FreeBSD_version >= 500000)
+#include <dev/pci/pcireg.h>
+#include <dev/pci/pcivar.h>
+#else
+#include <pci/pcivar.h>
+#include <pci/pcireg.h>
+#endif
+
+#if (__FreeBSD_version <= 500043)
+#include <sys/devicestat.h>
+#endif
+
+#include <cam/cam.h>
+#include <cam/cam_ccb.h>
+#include <cam/cam_sim.h>
+#include <cam/cam_xpt_sim.h>
+#include <cam/cam_debug.h>
+#include <cam/cam_xpt_periph.h>
+#include <cam/cam_periph.h>
+#include <cam/scsi/scsi_all.h>
+#include <cam/scsi/scsi_message.h>
+
+#if (__FreeBSD_version < 500043)
+#include <sys/bus_private.h>
+#endif
+
+
+typedef struct _INQUIRYDATA {
+ u_char DeviceType : 5;
+ u_char DeviceTypeQualifier : 3;
+ u_char DeviceTypeModifier : 7;
+ u_char RemovableMedia : 1;
+ u_char Versions;
+ u_char ResponseDataFormat;
+ u_char AdditionalLength;
+ u_char Reserved[2];
+ u_char SoftReset : 1;
+ u_char CommandQueue : 1;
+ u_char Reserved2 : 1;
+ u_char LinkedCommands : 1;
+ u_char Synchronous : 1;
+ u_char Wide16Bit : 1;
+ u_char Wide32Bit : 1;
+ u_char RelativeAddressing : 1;
+ u_char VendorId[8];
+ u_char ProductId[16];
+ u_char ProductRevisionLevel[4];
+ u_char VendorSpecific[20];
+ u_char Reserved3[40];
+}
+__attribute__((packed))
+INQUIRYDATA, *PINQUIRYDATA;
+
+#endif
+
+/* private headers */
+
+#include <dev/hpt27xx/osm.h>
+#include <dev/hpt27xx/him.h>
+#include <dev/hpt27xx/ldm.h>
+
+/* driver parameters */
+extern char driver_name[];
+extern char driver_name_long[];
+extern char driver_ver[];
+extern int osm_max_targets;
+
+/*
+ * adapter/vbus extensions:
+ * each physical controller has an adapter_ext, passed to him.create_adapter()
+ * each vbus has a vbus_ext passed to ldm_create_vbus().
+ */
+#define EXT_TYPE_HBA 1
+#define EXT_TYPE_VBUS 2
+
+typedef struct _hba {
+ int ext_type;
+ LDM_ADAPTER ldm_adapter;
+ device_t pcidev;
+ PCI_ADDRESS pciaddr;
+ struct _vbus_ext *vbus_ext;
+ struct _hba *next;
+
+ struct {
+ struct resource *res;
+ int type;
+ int rid;
+ void *base;
+ }
+ pcibar[6];
+
+ struct resource *irq_res;
+ void *irq_handle;
+}
+HBA, *PHBA;
+
+typedef struct _os_cmdext {
+ struct _vbus_ext *vbus_ext;
+ struct _os_cmdext *next;
+ union ccb *ccb;
+ bus_dmamap_t dma_map;
+ SG psg[os_max_sg_descriptors];
+}
+OS_CMDEXT, *POS_CMDEXT;
+
+typedef struct _vbus_ext {
+ int ext_type;
+ struct _vbus_ext *next;
+ PHBA hba_list;
+ struct freelist *freelist_head;
+ struct freelist *freelist_dma_head;
+
+ struct cam_sim *sim; /* sim for this vbus */
+ struct cam_path *path; /* peripheral, path, tgt, lun with this vbus */
+#if (__FreeBSD_version >= 500000)
+ struct mtx lock; /* general purpose lock */
+#else
+ int hpt_splx;
+#endif
+ bus_dma_tag_t io_dmat; /* I/O buffer DMA tag */
+
+ POS_CMDEXT cmdext_list;
+
+ OSM_TASK *tasks;
+ struct task worker;
+
+ struct callout_handle timer;
+
+ eventhandler_tag shutdown_eh;
+
+ /* the LDM vbus instance continues */
+ unsigned long vbus[0] __attribute__((aligned(sizeof(unsigned long))));
+}
+VBUS_EXT, *PVBUS_EXT;
+
+#if __FreeBSD_version >= 500000
+#define hpt_lock_vbus(vbus_ext) mtx_lock(&(vbus_ext)->lock)
+#define hpt_unlock_vbus(vbus_ext) mtx_unlock(&(vbus_ext)->lock)
+#else
+static __inline void hpt_lock_vbus(PVBUS_EXT vbus_ext)
+{
+ vbus_ext->hpt_splx = splcam();
+}
+static __inline void hpt_unlock_vbus(PVBUS_EXT vbus_ext)
+{
+ splx(vbus_ext->hpt_splx);
+}
+#endif
+
+
+#define HPT_OSM_TIMEOUT (20*hz) /* timeout value for OS commands */
+
+#define HPT_DO_IOCONTROL _IOW('H', 0, HPT_IOCTL_PARAM)
+
+#define HPT_SCAN_BUS _IO('H', 1)
+
+#if __FreeBSD_version >= 501000
+#define TASK_ENQUEUE(task) taskqueue_enqueue(taskqueue_swi_giant,(task));
+#else
+#define TASK_ENQUEUE(task) taskqueue_enqueue(taskqueue_swi,(task));
+#endif
+
+#if __FreeBSD_version >= 500000
+static __inline int hpt_sleep(PVBUS_EXT vbus_ext, void *ident, int priority, const char *wmesg, int timo)
+{
+ return msleep(ident, &vbus_ext->lock, priority, wmesg, timo);
+}
+#else
+static __inline int hpt_sleep(PVBUS_EXT vbus_ext, void *ident, int priority, const char *wmesg, int timo)
+{
+ int retval = 0;
+
+ asleep(ident, priority, wmesg, timo);
+ hpt_unlock_vbus(vbus_ext);
+ retval = await(priority, timo);
+ hpt_lock_vbus(vbus_ext);
+
+ return retval;
+}
+#endif
+
+#if __FreeBSD_version < 501000
+#define READ_16 0x88
+#define WRITE_16 0x8a
+#define SERVICE_ACTION_IN 0x9e
+#endif
+
+#define HPT_DEV_MAJOR 200
diff --git a/sys/dev/hpt27xx/osm.h b/sys/dev/hpt27xx/osm.h
new file mode 100644
index 0000000..3d8a471
--- /dev/null
+++ b/sys/dev/hpt27xx/osm.h
@@ -0,0 +1,240 @@
+/*-
+ * Copyright (c) 2011 HighPoint Technologies, Inc.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ */
+
+#include <dev/hpt27xx/hpt27xx_config.h>
+
+#ifndef _HPT_OSM_H_
+#define _HPT_OSM_H_
+
+#define VERMAGIC_OSM 6
+
+
+#define MAX_MEMBERS 64
+
+#define os_max_queue_comm 32
+#define os_max_sg_descriptors 18
+
+
+extern int os_max_cache_size;
+
+
+#define DMAPOOL_PAGE_SIZE 0x1000 /* PAGE_SIZE (i386/x86_64) */
+#define os_max_cache_pages (os_max_cache_size/DMAPOOL_PAGE_SIZE)
+
+/* data types */
+typedef unsigned int HPT_UINT, HPT_U32;
+typedef unsigned long HPT_UPTR;
+typedef unsigned short HPT_U16;
+typedef unsigned char HPT_U8;
+typedef unsigned long HPT_TIME;
+typedef unsigned long long HPT_U64;
+
+#define CPU_TO_LE64(x) (x)
+#define CPU_TO_LE32(x) (x)
+#define CPU_TO_LE16(x) (x)
+#define LE32_TO_CPU(x) (x)
+#define LE16_TO_CPU(x) (x)
+#define LE64_TO_CPU(x) (x)
+
+static __inline HPT_U64 CPU_TO_BE64(HPT_U64 x)
+{
+ HPT_U8 *p = (HPT_U8 *)&x;
+ return ((HPT_U64)p[0] << 56) |
+ ((HPT_U64)p[1] << 48) |
+ ((HPT_U64)p[2] << 40) |
+ ((HPT_U64)p[3] << 32) |
+ ((HPT_U64)p[4] << 24) |
+ ((HPT_U64)p[5] << 16) |
+ ((HPT_U64)p[6] << 8) |
+ p[7];
+}
+
+static __inline HPT_U32 CPU_TO_BE32(HPT_U32 x)
+{
+ HPT_U8 *p = (HPT_U8 *)&x;
+ return ((HPT_U32)p[0] << 24) |
+ ((HPT_U32)p[1] << 16) |
+ ((HPT_U32)p[2] << 8) | p[3];
+}
+
+static __inline HPT_U16 CPU_TO_BE16(HPT_U16 x)
+{
+ return ((HPT_U8)x << 8) | (x>>8);
+}
+
+#define BE16_TO_CPU(x) CPU_TO_BE16(x)
+#define BE32_TO_CPU(x) CPU_TO_BE32(x)
+#define BE64_TO_CPU(x) CPU_TO_BE64(x)
+
+#define FAR
+#define EXTERN_C
+
+typedef void * HPT_PTR;
+
+typedef HPT_U64 HPT_LBA;
+typedef HPT_U64 HPT_RAW_LBA;
+#define MAX_LBA_VALUE 0xffffffffffffffffull
+#define MAX_RAW_LBA_VALUE MAX_LBA_VALUE
+#define RAW_LBA(x) (x)
+#define LO_LBA(x) ((HPT_U32)(x))
+#define HI_LBA(x) (sizeof(HPT_LBA)>4? (HPT_U32)((x)>>32) : 0)
+#define LBA_FORMAT_STR "0x%llX"
+
+typedef HPT_U64 BUS_ADDRESS;
+#define LO_BUSADDR(x) ((HPT_U32)(x))
+#define HI_BUSADDR(x) (sizeof(BUS_ADDRESS)>4? (x)>>32 : 0)
+
+typedef unsigned char HPT_BOOL;
+#define HPT_TRUE 1
+#define HPT_FALSE 0
+
+typedef struct _TIME_RECORD {
+ HPT_U32 seconds:6; /* 0 - 59 */
+ HPT_U32 minutes:6; /* 0 - 59 */
+ HPT_U32 month:4; /* 1 - 12 */
+ HPT_U32 hours:6; /* 0 - 59 */
+ HPT_U32 day:5; /* 1 - 31 */
+ HPT_U32 year:5; /* 0=2000, 31=2031 */
+} TIME_RECORD;
+
+/* hardware access */
+HPT_U8 os_inb (void *port);
+HPT_U16 os_inw (void *port);
+HPT_U32 os_inl (void *port);
+void os_outb (void *port, HPT_U8 value);
+void os_outw (void *port, HPT_U16 value);
+void os_outl (void *port, HPT_U32 value);
+void os_insw (void *port, HPT_U16 *buffer, HPT_U32 count);
+void os_outsw(void *port, HPT_U16 *buffer, HPT_U32 count);
+
+extern HPT_U32 __dummy_reg; /* to avoid the compiler warning */
+
+#define os_readb(addr) (*(HPT_U8 *)&__dummy_reg = *(volatile HPT_U8 *)(addr))
+#define os_readw(addr) (*(HPT_U16 *)&__dummy_reg = *(volatile HPT_U16 *)(addr))
+#define os_readl(addr) (*(HPT_U32 *)&__dummy_reg = *(volatile HPT_U32 *)(addr))
+
+#define os_writeb(addr, val) *(volatile HPT_U8 *)(addr) = (HPT_U8)(val)
+#define os_writew(addr, val) *(volatile HPT_U16 *)(addr) = (HPT_U16)(val)
+#define os_writel(addr, val) *(volatile HPT_U32 *)(addr) = (HPT_U32)(val)
+
+/* PCI configuration space for specified device*/
+HPT_U8 os_pci_readb (void *osext, HPT_U8 offset);
+HPT_U16 os_pci_readw (void *osext, HPT_U8 offset);
+HPT_U32 os_pci_readl (void *osext, HPT_U8 offset);
+void os_pci_writeb(void *osext, HPT_U8 offset, HPT_U8 value);
+void os_pci_writew(void *osext, HPT_U8 offset, HPT_U16 value);
+void os_pci_writel(void *osext, HPT_U8 offset, HPT_U32 value);
+
+/* obsolute interface */
+#define MAX_PCI_BUS_NUMBER 0xff
+#define MAX_PCI_DEVICE_NUMBER 32
+#define MAX_PCI_FUNC_NUMBER 1
+HPT_U8 pcicfg_read_byte (HPT_U8 bus, HPT_U8 dev, HPT_U8 func, HPT_U8 reg);
+HPT_U32 pcicfg_read_dword(HPT_U8 bus, HPT_U8 dev, HPT_U8 func, HPT_U8 reg);
+void pcicfg_write_byte (HPT_U8 bus, HPT_U8 dev, HPT_U8 func, HPT_U8 reg, HPT_U8 v);
+void pcicfg_write_dword(HPT_U8 bus, HPT_U8 dev, HPT_U8 func, HPT_U8 reg, HPT_U32 v);
+
+
+void *os_map_pci_bar(
+ void *osext,
+ int index,
+ HPT_U32 offset,
+ HPT_U32 length
+);
+
+
+void os_unmap_pci_bar(void *osext, void *base);
+
+#define os_kmap_sgptr(psg) (psg->addr._logical)
+#define os_kunmap_sgptr(ptr)
+#define os_set_sgptr(psg, ptr) (psg)->addr._logical = (ptr)
+
+/* timer */
+void *os_add_timer(void *osext, HPT_U32 microseconds, void (*proc)(void *), void *arg);
+void os_del_timer(void *handle);
+void os_request_timer(void * osext, HPT_U32 interval);
+HPT_TIME os_query_time(void);
+
+/* task */
+#define OS_SUPPORT_TASK
+
+typedef struct _OSM_TASK {
+ struct _OSM_TASK *next;
+ void (*func)(void *vbus, void *data);
+ void *data;
+}
+OSM_TASK;
+
+void os_schedule_task(void *osext, OSM_TASK *task);
+
+/* misc */
+HPT_U32 os_get_stamp(void);
+void os_stallexec(HPT_U32 microseconds);
+
+#ifndef _SYS_LIBKERN_H_
+#define memcpy(dst, src, size) __builtin_memcpy((dst), (src), (size))
+#define memcmp(dst, src, size) __builtin_memcmp((dst), (src), (size))
+#define strcpy(dst, src) __builtin_strcpy((dst), (src))
+static __inline void * memset(void *dst, int c, unsigned long size)
+{
+ char *p;
+ for (p=(char*)dst; size; size--,p++) *p = c;
+ return dst;
+}
+#endif
+
+#define farMemoryCopy(a,b,c) memcpy((char *)(a), (char *)(b), (HPT_U32)c)
+
+
+#define os_register_device(osext, target_id)
+#define os_unregister_device(osext, target_id)
+int os_query_remove_device(void *osext, int target_id);
+int os_revalidate_device(void *osext, int target_id);
+
+HPT_U8 os_get_vbus_seq(void *osext);
+
+/* debug support */
+int os_printk(char *fmt, ...);
+
+#if DBG
+extern int hpt_dbg_level;
+#define KdPrint(x) do { if (hpt_dbg_level) os_printk x; } while (0)
+void __os_dbgbreak(const char *file, int line);
+#define os_dbgbreak() __os_dbgbreak(__FILE__, __LINE__)
+#define HPT_ASSERT(x) do { if (!(x)) os_dbgbreak(); } while (0)
+void os_check_stack(const char *location, int size);
+#define HPT_CHECK_STACK(size) os_check_stack(__FUNCTION__, (size))
+#else
+#define KdPrint(x)
+#define HPT_ASSERT(x)
+#define HPT_CHECK_STACK(size)
+#endif
+
+#define OsPrint(x) do { os_printk x; } while (0)
+
+#endif
diff --git a/sys/dev/hpt27xx/osm_bsd.c b/sys/dev/hpt27xx/osm_bsd.c
new file mode 100644
index 0000000..ac7e9d8
--- /dev/null
+++ b/sys/dev/hpt27xx/osm_bsd.c
@@ -0,0 +1,1421 @@
+/*-
+ * Copyright (c) 2011 HighPoint Technologies, Inc.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ */
+
+#include <dev/hpt27xx/hpt27xx_config.h>
+
+#include <dev/hpt27xx/os_bsd.h>
+#include <dev/hpt27xx/hptintf.h>
+
+static int hpt_probe(device_t dev)
+{
+ PCI_ID pci_id;
+ HIM *him;
+ int i;
+ PHBA hba;
+
+ for (him = him_list; him; him = him->next) {
+ for (i=0; him->get_supported_device_id(i, &pci_id); i++) {
+ if (him->get_controller_count)
+ him->get_controller_count(&pci_id,0,0);
+ if ((pci_get_vendor(dev) == pci_id.vid) &&
+ (pci_get_device(dev) == pci_id.did)){
+ KdPrint(("hpt_probe: adapter at PCI %d:%d:%d, IRQ %d",
+ pci_get_bus(dev), pci_get_slot(dev), pci_get_function(dev), pci_get_irq(dev)
+ ));
+ device_set_desc(dev, him->name);
+ hba = (PHBA)device_get_softc(dev);
+ memset(hba, 0, sizeof(HBA));
+ hba->ext_type = EXT_TYPE_HBA;
+ hba->ldm_adapter.him = him;
+ return 0;
+ }
+ }
+ }
+
+ return (ENXIO);
+}
+
+static int hpt_attach(device_t dev)
+{
+ PHBA hba = (PHBA)device_get_softc(dev);
+ HIM *him = hba->ldm_adapter.him;
+ PCI_ID pci_id;
+ HPT_UINT size;
+ PVBUS vbus;
+ PVBUS_EXT vbus_ext;
+
+ KdPrint(("hpt_attach(%d/%d/%d)", pci_get_bus(dev), pci_get_slot(dev), pci_get_function(dev)));
+
+#if __FreeBSD_version >=440000
+ pci_enable_busmaster(dev);
+#endif
+
+ pci_id.vid = pci_get_vendor(dev);
+ pci_id.did = pci_get_device(dev);
+ pci_id.rev = pci_get_revid(dev);
+ pci_id.subsys = (HPT_U32)(pci_get_subdevice(dev)) << 16 | pci_get_subvendor(dev);
+
+ size = him->get_adapter_size(&pci_id);
+ hba->ldm_adapter.him_handle = malloc(size, M_DEVBUF, M_WAITOK);
+ if (!hba->ldm_adapter.him_handle)
+ return ENXIO;
+
+ hba->pcidev = dev;
+ hba->pciaddr.tree = 0;
+ hba->pciaddr.bus = pci_get_bus(dev);
+ hba->pciaddr.device = pci_get_slot(dev);
+ hba->pciaddr.function = pci_get_function(dev);
+
+ if (!him->create_adapter(&pci_id, hba->pciaddr, hba->ldm_adapter.him_handle, hba)) {
+ free(hba->ldm_adapter.him_handle, M_DEVBUF);
+ return -1;
+ }
+
+ os_printk("adapter at PCI %d:%d:%d, IRQ %d",
+ hba->pciaddr.bus, hba->pciaddr.device, hba->pciaddr.function, pci_get_irq(dev));
+
+ if (!ldm_register_adapter(&hba->ldm_adapter)) {
+ size = ldm_get_vbus_size();
+ vbus_ext = malloc(sizeof(VBUS_EXT) + size, M_DEVBUF, M_WAITOK);
+ if (!vbus_ext) {
+ free(hba->ldm_adapter.him_handle, M_DEVBUF);
+ return -1;
+ }
+ memset(vbus_ext, 0, sizeof(VBUS_EXT));
+ vbus_ext->ext_type = EXT_TYPE_VBUS;
+ ldm_create_vbus((PVBUS)vbus_ext->vbus, vbus_ext);
+ ldm_register_adapter(&hba->ldm_adapter);
+ }
+
+ ldm_for_each_vbus(vbus, vbus_ext) {
+ if (hba->ldm_adapter.vbus==vbus) {
+ hba->vbus_ext = vbus_ext;
+ hba->next = vbus_ext->hba_list;
+ vbus_ext->hba_list = hba;
+ break;
+ }
+ }
+ return 0;
+}
+
+/*
+ * Maybe we'd better to use the bus_dmamem_alloc to alloc DMA memory,
+ * but there are some problems currently (alignment, etc).
+ */
+static __inline void *__get_free_pages(int order)
+{
+ /* don't use low memory - other devices may get starved */
+ return contigmalloc(PAGE_SIZE<<order,
+ M_DEVBUF, M_WAITOK, BUS_SPACE_MAXADDR_24BIT, BUS_SPACE_MAXADDR, PAGE_SIZE, 0);
+}
+
+static __inline void free_pages(void *p, int order)
+{
+ contigfree(p, PAGE_SIZE<<order, M_DEVBUF);
+}
+
+static int hpt_alloc_mem(PVBUS_EXT vbus_ext)
+{
+ PHBA hba;
+ struct freelist *f;
+ HPT_UINT i;
+ void **p;
+
+ for (hba = vbus_ext->hba_list; hba; hba = hba->next)
+ hba->ldm_adapter.him->get_meminfo(hba->ldm_adapter.him_handle);
+
+ ldm_get_mem_info((PVBUS)vbus_ext->vbus, 0);
+
+ for (f=vbus_ext->freelist_head; f; f=f->next) {
+ KdPrint(("%s: %d*%d=%d bytes",
+ f->tag, f->count, f->size, f->count*f->size));
+ for (i=0; i<f->count; i++) {
+ p = (void **)malloc(f->size, M_DEVBUF, M_WAITOK);
+ if (!p) return (ENXIO);
+ *p = f->head;
+ f->head = p;
+ }
+ }
+
+ for (f=vbus_ext->freelist_dma_head; f; f=f->next) {
+ int order, size, j;
+
+ HPT_ASSERT((f->size & (f->alignment-1))==0);
+
+ for (order=0, size=PAGE_SIZE; size<f->size; order++, size<<=1) ;
+
+ KdPrint(("%s: %d*%d=%d bytes, order %d",
+ f->tag, f->count, f->size, f->count*f->size, order));
+ HPT_ASSERT(f->alignment<=PAGE_SIZE);
+
+ for (i=0; i<f->count;) {
+ p = (void **)__get_free_pages(order);
+ if (!p) return -1;
+ for (j = size/f->size; j && i<f->count; i++,j--) {
+ *p = f->head;
+ *(BUS_ADDRESS *)(p+1) = (BUS_ADDRESS)vtophys(p);
+ f->head = p;
+ p = (void **)((unsigned long)p + f->size);
+ }
+ }
+ }
+
+ HPT_ASSERT(PAGE_SIZE==DMAPOOL_PAGE_SIZE);
+
+ for (i=0; i<os_max_cache_pages; i++) {
+ p = (void **)__get_free_pages(0);
+ if (!p) return -1;
+ HPT_ASSERT(((HPT_UPTR)p & (DMAPOOL_PAGE_SIZE-1))==0);
+ dmapool_put_page((PVBUS)vbus_ext->vbus, p, (BUS_ADDRESS)vtophys(p));
+ }
+
+ return 0;
+}
+
+static void hpt_free_mem(PVBUS_EXT vbus_ext)
+{
+ struct freelist *f;
+ void *p;
+ int i;
+ BUS_ADDRESS bus;
+
+ for (f=vbus_ext->freelist_head; f; f=f->next) {
+#if DBG
+ if (f->count!=f->reserved_count) {
+ KdPrint(("memory leak for freelist %s (%d/%d)", f->tag, f->count, f->reserved_count));
+ }
+#endif
+ while ((p=freelist_get(f)))
+ free(p, M_DEVBUF);
+ }
+
+ for (i=0; i<os_max_cache_pages; i++) {
+ p = dmapool_get_page((PVBUS)vbus_ext->vbus, &bus);
+ HPT_ASSERT(p);
+ free_pages(p, 0);
+ }
+
+ for (f=vbus_ext->freelist_dma_head; f; f=f->next) {
+ int order, size;
+#if DBG
+ if (f->count!=f->reserved_count) {
+ KdPrint(("memory leak for dma freelist %s (%d/%d)", f->tag, f->count, f->reserved_count));
+ }
+#endif
+ for (order=0, size=PAGE_SIZE; size<f->size; order++, size<<=1) ;
+
+ while ((p=freelist_get_dma(f, &bus))) {
+ if (order)
+ free_pages(p, order);
+ else {
+ /* can't free immediately since other blocks in this page may still be in the list */
+ if (((HPT_UPTR)p & (PAGE_SIZE-1))==0)
+ dmapool_put_page((PVBUS)vbus_ext->vbus, p, bus);
+ }
+ }
+ }
+
+ while ((p = dmapool_get_page((PVBUS)vbus_ext->vbus, &bus)))
+ free_pages(p, 0);
+}
+
+static int hpt_init_vbus(PVBUS_EXT vbus_ext)
+{
+ PHBA hba;
+
+ for (hba = vbus_ext->hba_list; hba; hba = hba->next)
+ if (!hba->ldm_adapter.him->initialize(hba->ldm_adapter.him_handle)) {
+ KdPrint(("fail to initialize %p", hba));
+ return -1;
+ }
+
+ ldm_initialize_vbus((PVBUS)vbus_ext->vbus, &vbus_ext->hba_list->ldm_adapter);
+ return 0;
+}
+
+static void hpt_flush_done(PCOMMAND pCmd)
+{
+ PVDEV vd = pCmd->target;
+
+ if (mIsArray(vd->type) && vd->u.array.transform && vd!=vd->u.array.transform->target) {
+ vd = vd->u.array.transform->target;
+ HPT_ASSERT(vd);
+ pCmd->target = vd;
+ pCmd->Result = RETURN_PENDING;
+ vdev_queue_cmd(pCmd);
+ return;
+ }
+
+ *(int *)pCmd->priv = 1;
+ wakeup(pCmd);
+}
+
+/*
+ * flush a vdev (without retry).
+ */
+static int hpt_flush_vdev(PVBUS_EXT vbus_ext, PVDEV vd)
+{
+ PCOMMAND pCmd;
+ int result = 0, done;
+ HPT_UINT count;
+
+ KdPrint(("flusing dev %p", vd));
+
+ hpt_lock_vbus(vbus_ext);
+
+ if (mIsArray(vd->type) && vd->u.array.transform)
+ count = MAX(vd->u.array.transform->source->cmds_per_request,
+ vd->u.array.transform->target->cmds_per_request);
+ else
+ count = vd->cmds_per_request;
+
+ pCmd = ldm_alloc_cmds(vd->vbus, count);
+
+ if (!pCmd) {
+ hpt_unlock_vbus(vbus_ext);
+ return -1;
+ }
+
+ pCmd->type = CMD_TYPE_FLUSH;
+ pCmd->flags.hard_flush = 1;
+ pCmd->target = vd;
+ pCmd->done = hpt_flush_done;
+ done = 0;
+ pCmd->priv = &done;
+
+ ldm_queue_cmd(pCmd);
+
+ if (!done) {
+ while (hpt_sleep(vbus_ext, pCmd, PPAUSE, "hptfls", HPT_OSM_TIMEOUT)) {
+ ldm_reset_vbus(vd->vbus);
+ }
+ }
+
+ KdPrint(("flush result %d", pCmd->Result));
+
+ if (pCmd->Result!=RETURN_SUCCESS)
+ result = -1;
+
+ ldm_free_cmds(pCmd);
+
+ hpt_unlock_vbus(vbus_ext);
+
+ return result;
+}
+
+static void hpt_stop_tasks(PVBUS_EXT vbus_ext);
+static void hpt_shutdown_vbus(PVBUS_EXT vbus_ext, int howto)
+{
+ PVBUS vbus = (PVBUS)vbus_ext->vbus;
+ PHBA hba;
+ int i;
+
+ KdPrint(("hpt_shutdown_vbus"));
+
+ /* stop all ctl tasks and disable the worker taskqueue */
+ hpt_stop_tasks(vbus_ext);
+ vbus_ext->worker.ta_context = 0;
+
+ /* flush devices */
+ for (i=0; i<osm_max_targets; i++) {
+ PVDEV vd = ldm_find_target(vbus, i);
+ if (vd) {
+ /* retry once */
+ if (hpt_flush_vdev(vbus_ext, vd))
+ hpt_flush_vdev(vbus_ext, vd);
+ }
+ }
+
+ hpt_lock_vbus(vbus_ext);
+ ldm_shutdown(vbus);
+ hpt_unlock_vbus(vbus_ext);
+
+ ldm_release_vbus(vbus);
+
+ for (hba=vbus_ext->hba_list; hba; hba=hba->next)
+ bus_teardown_intr(hba->pcidev, hba->irq_res, hba->irq_handle);
+
+ hpt_free_mem(vbus_ext);
+
+ while ((hba=vbus_ext->hba_list)) {
+ vbus_ext->hba_list = hba->next;
+ free(hba->ldm_adapter.him_handle, M_DEVBUF);
+ }
+
+ free(vbus_ext, M_DEVBUF);
+ KdPrint(("hpt_shutdown_vbus done"));
+}
+
+static void __hpt_do_tasks(PVBUS_EXT vbus_ext)
+{
+ OSM_TASK *tasks;
+
+ tasks = vbus_ext->tasks;
+ vbus_ext->tasks = 0;
+
+ while (tasks) {
+ OSM_TASK *t = tasks;
+ tasks = t->next;
+ t->next = 0;
+ t->func(vbus_ext->vbus, t->data);
+ }
+}
+
+static void hpt_do_tasks(PVBUS_EXT vbus_ext, int pending)
+{
+ if(vbus_ext){
+ hpt_lock_vbus(vbus_ext);
+ __hpt_do_tasks(vbus_ext);
+ hpt_unlock_vbus(vbus_ext);
+ }
+}
+
+static void hpt_action(struct cam_sim *sim, union ccb *ccb);
+static void hpt_poll(struct cam_sim *sim);
+static void hpt_async(void * callback_arg, u_int32_t code, struct cam_path * path, void * arg);
+static void hpt_pci_intr(void *arg);
+
+static __inline POS_CMDEXT cmdext_get(PVBUS_EXT vbus_ext)
+{
+ POS_CMDEXT p = vbus_ext->cmdext_list;
+ if (p)
+ vbus_ext->cmdext_list = p->next;
+ return p;
+}
+
+static __inline void cmdext_put(POS_CMDEXT p)
+{
+ p->next = p->vbus_ext->cmdext_list;
+ p->vbus_ext->cmdext_list = p;
+}
+
+static void hpt_timeout(void *arg)
+{
+ PCOMMAND pCmd = (PCOMMAND)arg;
+ POS_CMDEXT ext = (POS_CMDEXT)pCmd->priv;
+
+ KdPrint(("pCmd %p timeout", pCmd));
+
+ ldm_reset_vbus((PVBUS)ext->vbus_ext->vbus);
+}
+
+static void os_cmddone(PCOMMAND pCmd)
+{
+ POS_CMDEXT ext = (POS_CMDEXT)pCmd->priv;
+ union ccb *ccb = ext->ccb;
+
+ KdPrint(("os_cmddone(%p, %d)", pCmd, pCmd->Result));
+
+ untimeout(hpt_timeout, pCmd, ccb->ccb_h.timeout_ch);
+
+ switch(pCmd->Result) {
+ case RETURN_SUCCESS:
+ ccb->ccb_h.status = CAM_REQ_CMP;
+ break;
+ case RETURN_BAD_DEVICE:
+ ccb->ccb_h.status = CAM_DEV_NOT_THERE;
+ break;
+ case RETURN_DEVICE_BUSY:
+ ccb->ccb_h.status = CAM_BUSY;
+ break;
+ case RETURN_INVALID_REQUEST:
+ ccb->ccb_h.status = CAM_REQ_INVALID;
+ break;
+ case RETURN_SELECTION_TIMEOUT:
+ ccb->ccb_h.status = CAM_SEL_TIMEOUT;
+ break;
+ case RETURN_RETRY:
+ ccb->ccb_h.status = CAM_BUSY;
+ break;
+ default:
+ ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR;
+ break;
+ }
+
+ if (pCmd->flags.data_in) {
+ bus_dmamap_sync(ext->vbus_ext->io_dmat, ext->dma_map, BUS_DMASYNC_POSTREAD);
+ }
+ else if (pCmd->flags.data_out) {
+ bus_dmamap_sync(ext->vbus_ext->io_dmat, ext->dma_map, BUS_DMASYNC_POSTWRITE);
+ }
+
+ bus_dmamap_unload(ext->vbus_ext->io_dmat, ext->dma_map);
+
+ cmdext_put(ext);
+ ldm_free_cmds(pCmd);
+ xpt_done(ccb);
+}
+
+static int os_buildsgl(PCOMMAND pCmd, PSG pSg, int logical)
+{
+ POS_CMDEXT ext = (POS_CMDEXT)pCmd->priv;
+ union ccb *ccb = ext->ccb;
+ bus_dma_segment_t *sgList = (bus_dma_segment_t *)ccb->csio.data_ptr;
+ int idx;
+
+ if(logical) {
+ if (ccb->ccb_h.flags & CAM_DATA_PHYS)
+ panic("physical address unsupported");
+
+ if (ccb->ccb_h.flags & CAM_SCATTER_VALID) {
+ if (ccb->ccb_h.flags & CAM_SG_LIST_PHYS)
+ panic("physical address unsupported");
+
+ for (idx = 0; idx < ccb->csio.sglist_cnt; idx++) {
+ os_set_sgptr(&pSg[idx], (HPT_U8 *)(HPT_UPTR)sgList[idx].ds_addr);
+ pSg[idx].size = sgList[idx].ds_len;
+ pSg[idx].eot = (idx==ccb->csio.sglist_cnt-1)? 1 : 0;
+ }
+ }
+ else {
+ os_set_sgptr(pSg, (HPT_U8 *)ccb->csio.data_ptr);
+ pSg->size = ccb->csio.dxfer_len;
+ pSg->eot = 1;
+ }
+ return TRUE;
+ }
+
+ /* since we have provided physical sg, nobody will ask us to build physical sg */
+ HPT_ASSERT(0);
+ return FALSE;
+}
+
+static void hpt_io_dmamap_callback(void *arg, bus_dma_segment_t *segs, int nsegs, int error)
+{
+ PCOMMAND pCmd = (PCOMMAND)arg;
+ POS_CMDEXT ext = (POS_CMDEXT)pCmd->priv;
+ PSG psg = pCmd->psg;
+ int idx;
+
+ HPT_ASSERT(pCmd->flags.physical_sg);
+
+ if (error || nsegs == 0)
+ panic("busdma error");
+
+ HPT_ASSERT(nsegs<=os_max_sg_descriptors);
+
+ for (idx = 0; idx < nsegs; idx++, psg++) {
+ psg->addr.bus = segs[idx].ds_addr;
+ psg->size = segs[idx].ds_len;
+ psg->eot = 0;
+ }
+ psg[-1].eot = 1;
+
+ if (pCmd->flags.data_in) {
+ bus_dmamap_sync(ext->vbus_ext->io_dmat, ext->dma_map, BUS_DMASYNC_PREREAD);
+ }
+ else if (pCmd->flags.data_out) {
+ bus_dmamap_sync(ext->vbus_ext->io_dmat, ext->dma_map, BUS_DMASYNC_PREWRITE);
+ }
+
+ ext->ccb->ccb_h.timeout_ch = timeout(hpt_timeout, pCmd, HPT_OSM_TIMEOUT);
+ ldm_queue_cmd(pCmd);
+}
+
+static void hpt_scsi_io(PVBUS_EXT vbus_ext, union ccb *ccb)
+{
+ PVBUS vbus = (PVBUS)vbus_ext->vbus;
+ PVDEV vd;
+ PCOMMAND pCmd;
+ POS_CMDEXT ext;
+ HPT_U8 *cdb;
+
+ if (ccb->ccb_h.flags & CAM_CDB_POINTER)
+ cdb = ccb->csio.cdb_io.cdb_ptr;
+ else
+ cdb = ccb->csio.cdb_io.cdb_bytes;
+
+ KdPrint(("hpt_scsi_io: ccb %x id %d lun %d cdb %x-%x-%x",
+ ccb,
+ ccb->ccb_h.target_id, ccb->ccb_h.target_lun,
+ *(HPT_U32 *)&cdb[0], *(HPT_U32 *)&cdb[4], *(HPT_U32 *)&cdb[8]
+ ));
+
+ /* ccb->ccb_h.path_id is not our bus id - don't check it */
+ if (ccb->ccb_h.target_lun != 0 ||
+ ccb->ccb_h.target_id >= osm_max_targets ||
+ (ccb->ccb_h.flags & CAM_CDB_PHYS))
+ {
+ ccb->ccb_h.status = CAM_TID_INVALID;
+ xpt_done(ccb);
+ return;
+ }
+
+ vd = ldm_find_target(vbus, ccb->ccb_h.target_id);
+
+ if (!vd) {
+ ccb->ccb_h.status = CAM_TID_INVALID;
+ xpt_done(ccb);
+ return;
+ }
+
+ switch (cdb[0]) {
+ case TEST_UNIT_READY:
+ case START_STOP_UNIT:
+ case SYNCHRONIZE_CACHE:
+ ccb->ccb_h.status = CAM_REQ_CMP;
+ break;
+
+ case INQUIRY:
+ {
+ PINQUIRYDATA inquiryData;
+ memset(ccb->csio.data_ptr, 0, ccb->csio.dxfer_len);
+ inquiryData = (PINQUIRYDATA)ccb->csio.data_ptr;
+
+ inquiryData->AdditionalLength = 31;
+ inquiryData->CommandQueue = 1;
+ memcpy(&inquiryData->VendorId, "HPT ", 8);
+ memcpy(&inquiryData->ProductId, "DISK 0_0 ", 16);
+
+ if (vd->target_id / 10) {
+ inquiryData->ProductId[7] = (vd->target_id % 100) / 10 + '0';
+ inquiryData->ProductId[8] = (vd->target_id % 100) % 10 + '0';
+ }
+ else
+ inquiryData->ProductId[7] = (vd->target_id % 100) % 10 + '0';
+
+ memcpy(&inquiryData->ProductRevisionLevel, "4.00", 4);
+
+ ccb->ccb_h.status = CAM_REQ_CMP;
+ }
+ break;
+
+ case READ_CAPACITY:
+ {
+ HPT_U8 *rbuf = ccb->csio.data_ptr;
+ HPT_U32 cap;
+
+ if (vd->capacity>0xfffffffful)
+ cap = 0xfffffffful;
+ else
+ cap = vd->capacity - 1;
+
+ rbuf[0] = (HPT_U8)(cap>>24);
+ rbuf[1] = (HPT_U8)(cap>>16);
+ rbuf[2] = (HPT_U8)(cap>>8);
+ rbuf[3] = (HPT_U8)cap;
+ rbuf[4] = 0;
+ rbuf[5] = 0;
+ rbuf[6] = 2;
+ rbuf[7] = 0;
+
+ ccb->ccb_h.status = CAM_REQ_CMP;
+ break;
+ }
+
+ case SERVICE_ACTION_IN:
+ {
+ HPT_U8 *rbuf = ccb->csio.data_ptr;
+ HPT_U64 cap = vd->capacity - 1;
+
+ rbuf[0] = (HPT_U8)(cap>>56);
+ rbuf[1] = (HPT_U8)(cap>>48);
+ rbuf[2] = (HPT_U8)(cap>>40);
+ rbuf[3] = (HPT_U8)(cap>>32);
+ rbuf[4] = (HPT_U8)(cap>>24);
+ rbuf[5] = (HPT_U8)(cap>>16);
+ rbuf[6] = (HPT_U8)(cap>>8);
+ rbuf[7] = (HPT_U8)cap;
+ rbuf[8] = 0;
+ rbuf[9] = 0;
+ rbuf[10] = 2;
+ rbuf[11] = 0;
+
+ ccb->ccb_h.status = CAM_REQ_CMP;
+ break;
+ }
+
+ case READ_6:
+ case READ_10:
+ case READ_16:
+ case WRITE_6:
+ case WRITE_10:
+ case WRITE_16:
+ case 0x13:
+ case 0x2f:
+ case 0x8f: /* VERIFY_16 */
+ {
+ pCmd = ldm_alloc_cmds(vbus, vd->cmds_per_request);
+ if(!pCmd){
+ KdPrint(("Failed to allocate command!"));
+ ccb->ccb_h.status = CAM_BUSY;
+ break;
+ }
+
+ switch (cdb[0]) {
+ case READ_6:
+ case WRITE_6:
+ case 0x13:
+ pCmd->uCmd.Ide.Lba = ((HPT_U32)cdb[1] << 16) | ((HPT_U32)cdb[2] << 8) | (HPT_U32)cdb[3];
+ pCmd->uCmd.Ide.nSectors = (HPT_U16) cdb[4];
+ break;
+ case READ_16:
+ case WRITE_16:
+ case 0x8f: /* VERIFY_16 */
+ {
+ HPT_U64 block =
+ ((HPT_U64)cdb[2]<<56) |
+ ((HPT_U64)cdb[3]<<48) |
+ ((HPT_U64)cdb[4]<<40) |
+ ((HPT_U64)cdb[5]<<32) |
+ ((HPT_U64)cdb[6]<<24) |
+ ((HPT_U64)cdb[7]<<16) |
+ ((HPT_U64)cdb[8]<<8) |
+ ((HPT_U64)cdb[9]);
+ pCmd->uCmd.Ide.Lba = block;
+ pCmd->uCmd.Ide.nSectors = (HPT_U16)cdb[13] | ((HPT_U16)cdb[12]<<8);
+ break;
+ }
+
+ default:
+ pCmd->uCmd.Ide.Lba = (HPT_U32)cdb[5] | ((HPT_U32)cdb[4] << 8) | ((HPT_U32)cdb[3] << 16) | ((HPT_U32)cdb[2] << 24);
+ pCmd->uCmd.Ide.nSectors = (HPT_U16) cdb[8] | ((HPT_U16)cdb[7]<<8);
+ break;
+ }
+
+ switch (cdb[0]) {
+ case READ_6:
+ case READ_10:
+ case READ_16:
+ pCmd->flags.data_in = 1;
+ break;
+ case WRITE_6:
+ case WRITE_10:
+ case WRITE_16:
+ pCmd->flags.data_out = 1;
+ break;
+ }
+ pCmd->priv = ext = cmdext_get(vbus_ext);
+ HPT_ASSERT(ext);
+ ext->ccb = ccb;
+ pCmd->target = vd;
+ pCmd->done = os_cmddone;
+ pCmd->buildsgl = os_buildsgl;
+
+ pCmd->psg = ext->psg;
+
+ if (ccb->ccb_h.flags & CAM_SCATTER_VALID) {
+ int idx;
+ bus_dma_segment_t *sgList = (bus_dma_segment_t *)ccb->csio.data_ptr;
+
+ if (ccb->ccb_h.flags & CAM_SG_LIST_PHYS)
+ pCmd->flags.physical_sg = 1;
+
+ for (idx = 0; idx < ccb->csio.sglist_cnt; idx++) {
+ pCmd->psg[idx].addr.bus = sgList[idx].ds_addr;
+ pCmd->psg[idx].size = sgList[idx].ds_len;
+ pCmd->psg[idx].eot = (idx==ccb->csio.sglist_cnt-1)? 1 : 0;
+ }
+
+ ccb->ccb_h.timeout_ch = timeout(hpt_timeout, pCmd, HPT_OSM_TIMEOUT);
+ ldm_queue_cmd(pCmd);
+ }
+ else {
+ int error;
+ pCmd->flags.physical_sg = 1;
+ error = bus_dmamap_load(vbus_ext->io_dmat,
+ ext->dma_map,
+ ccb->csio.data_ptr, ccb->csio.dxfer_len,
+ hpt_io_dmamap_callback, pCmd,
+ BUS_DMA_WAITOK
+ );
+ KdPrint(("bus_dmamap_load return %d", error));
+ if (error && error!=EINPROGRESS) {
+ os_printk("bus_dmamap_load error %d", error);
+ cmdext_put(ext);
+ ldm_free_cmds(pCmd);
+ ccb->ccb_h.status = CAM_REQ_CMP_ERR;
+ xpt_done(ccb);
+ }
+ }
+ return;
+ }
+
+ default:
+ ccb->ccb_h.status = CAM_REQ_INVALID;
+ break;
+ }
+
+ xpt_done(ccb);
+ return;
+}
+
+static void hpt_action(struct cam_sim *sim, union ccb *ccb)
+{
+ PVBUS_EXT vbus_ext = (PVBUS_EXT)cam_sim_softc(sim);
+
+ KdPrint(("hpt_action(fn=%d, id=%d)", ccb->ccb_h.func_code, ccb->ccb_h.target_id));
+
+ switch (ccb->ccb_h.func_code) {
+
+ case XPT_SCSI_IO:
+ hpt_lock_vbus(vbus_ext);
+ hpt_scsi_io(vbus_ext, ccb);
+ hpt_unlock_vbus(vbus_ext);
+ return;
+
+ case XPT_RESET_BUS:
+ hpt_lock_vbus(vbus_ext);
+ ldm_reset_vbus((PVBUS)vbus_ext->vbus);
+ hpt_unlock_vbus(vbus_ext);
+ break;
+
+ case XPT_GET_TRAN_SETTINGS:
+ case XPT_SET_TRAN_SETTINGS:
+ ccb->ccb_h.status = CAM_FUNC_NOTAVAIL;
+ break;
+
+ case XPT_CALC_GEOMETRY:
+ ccb->ccg.heads = 255;
+ ccb->ccg.secs_per_track = 63;
+ ccb->ccg.cylinders = ccb->ccg.volume_size / (ccb->ccg.heads * ccb->ccg.secs_per_track);
+ ccb->ccb_h.status = CAM_REQ_CMP;
+ break;
+
+ case XPT_PATH_INQ:
+ {
+ struct ccb_pathinq *cpi = &ccb->cpi;
+
+ cpi->version_num = 1;
+ cpi->hba_inquiry = PI_SDTR_ABLE;
+ cpi->target_sprt = 0;
+ cpi->hba_misc = PIM_NOBUSRESET;
+ cpi->hba_eng_cnt = 0;
+ cpi->max_target = osm_max_targets;
+ cpi->max_lun = 0;
+ cpi->unit_number = cam_sim_unit(sim);
+ cpi->bus_id = cam_sim_bus(sim);
+ cpi->initiator_id = osm_max_targets;
+ cpi->base_transfer_speed = 3300;
+
+ strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN);
+ strncpy(cpi->hba_vid, "HPT ", HBA_IDLEN);
+ strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN);
+#if (__FreeBSD_version >= 800000)
+ cpi->transport = XPORT_SPI;
+ cpi->transport_version = 2;
+ cpi->protocol = PROTO_SCSI;
+ cpi->protocol_version = SCSI_REV_2;
+#endif
+ cpi->ccb_h.status = CAM_REQ_CMP;
+ break;
+ }
+
+ default:
+ ccb->ccb_h.status = CAM_REQ_INVALID;
+ break;
+ }
+
+ xpt_done(ccb);
+ return;
+}
+
+static void hpt_pci_intr(void *arg)
+{
+ PVBUS_EXT vbus_ext = (PVBUS_EXT)arg;
+ hpt_lock_vbus(vbus_ext);
+ ldm_intr((PVBUS)vbus_ext->vbus);
+ hpt_unlock_vbus(vbus_ext);
+}
+
+static void hpt_poll(struct cam_sim *sim)
+{
+ hpt_pci_intr(cam_sim_softc(sim));
+}
+
+static void hpt_async(void * callback_arg, u_int32_t code, struct cam_path * path, void * arg)
+{
+ KdPrint(("hpt_async"));
+}
+
+static int hpt_shutdown(device_t dev)
+{
+ KdPrint(("hpt_shutdown(dev=%p)", dev));
+ return 0;
+}
+
+static int hpt_detach(device_t dev)
+{
+ /* we don't allow the driver to be unloaded. */
+ return EBUSY;
+}
+
+static void hpt_ioctl_done(struct _IOCTL_ARG *arg)
+{
+ arg->ioctl_cmnd = 0;
+ wakeup(arg);
+}
+
+static void __hpt_do_ioctl(PVBUS_EXT vbus_ext, IOCTL_ARG *ioctl_args)
+{
+ ioctl_args->result = -1;
+ ioctl_args->done = hpt_ioctl_done;
+ ioctl_args->ioctl_cmnd = (void *)1;
+
+ hpt_lock_vbus(vbus_ext);
+ ldm_ioctl((PVBUS)vbus_ext->vbus, ioctl_args);
+
+ while (ioctl_args->ioctl_cmnd) {
+ if (hpt_sleep(vbus_ext, ioctl_args, PPAUSE, "hptctl", HPT_OSM_TIMEOUT)==0)
+ break;
+ ldm_reset_vbus((PVBUS)vbus_ext->vbus);
+ __hpt_do_tasks(vbus_ext);
+ }
+
+ /* KdPrint(("ioctl %x result %d", ioctl_args->dwIoControlCode, ioctl_args->result)); */
+
+ hpt_unlock_vbus(vbus_ext);
+}
+
+static void hpt_do_ioctl(IOCTL_ARG *ioctl_args)
+{
+ PVBUS vbus;
+ PVBUS_EXT vbus_ext;
+
+ ldm_for_each_vbus(vbus, vbus_ext) {
+ __hpt_do_ioctl(vbus_ext, ioctl_args);
+ if (ioctl_args->result!=HPT_IOCTL_RESULT_WRONG_VBUS)
+ return;
+ }
+}
+
+#define HPT_DO_IOCTL(code, inbuf, insize, outbuf, outsize) ({\
+ IOCTL_ARG arg;\
+ arg.dwIoControlCode = code;\
+ arg.lpInBuffer = inbuf;\
+ arg.lpOutBuffer = outbuf;\
+ arg.nInBufferSize = insize;\
+ arg.nOutBufferSize = outsize;\
+ arg.lpBytesReturned = 0;\
+ hpt_do_ioctl(&arg);\
+ arg.result;\
+})
+
+#define DEVICEID_VALID(id) ((id) && ((HPT_U32)(id)!=0xffffffff))
+
+static int hpt_get_logical_devices(DEVICEID * pIds, int nMaxCount)
+{
+ int i;
+ HPT_U32 count = nMaxCount-1;
+
+ if (HPT_DO_IOCTL(HPT_IOCTL_GET_LOGICAL_DEVICES,
+ &count, sizeof(HPT_U32), pIds, sizeof(DEVICEID)*nMaxCount))
+ return -1;
+
+ nMaxCount = (int)pIds[0];
+ for (i=0; i<nMaxCount; i++) pIds[i] = pIds[i+1];
+ return nMaxCount;
+}
+
+static int hpt_get_device_info_v3(DEVICEID id, PLOGICAL_DEVICE_INFO_V3 pInfo)
+{
+ return HPT_DO_IOCTL(HPT_IOCTL_GET_DEVICE_INFO_V3,
+ &id, sizeof(DEVICEID), pInfo, sizeof(LOGICAL_DEVICE_INFO_V3));
+}
+
+/* not belong to this file logically, but we want to use ioctl interface */
+static int __hpt_stop_tasks(PVBUS_EXT vbus_ext, DEVICEID id)
+{
+ LOGICAL_DEVICE_INFO_V3 devinfo;
+ int i, result;
+ DEVICEID param[2] = { id, 0 };
+
+ if (hpt_get_device_info_v3(id, &devinfo))
+ return -1;
+
+ if (devinfo.Type!=LDT_ARRAY)
+ return -1;
+
+ if (devinfo.u.array.Flags & ARRAY_FLAG_REBUILDING)
+ param[1] = AS_REBUILD_ABORT;
+ else if (devinfo.u.array.Flags & ARRAY_FLAG_VERIFYING)
+ param[1] = AS_VERIFY_ABORT;
+ else if (devinfo.u.array.Flags & ARRAY_FLAG_INITIALIZING)
+ param[1] = AS_INITIALIZE_ABORT;
+ else if (devinfo.u.array.Flags & ARRAY_FLAG_TRANSFORMING)
+ param[1] = AS_TRANSFORM_ABORT;
+ else
+ return -1;
+
+ KdPrint(("SET_ARRAY_STATE(%x, %d)", param[0], param[1]));
+ result = HPT_DO_IOCTL(HPT_IOCTL_SET_ARRAY_STATE,
+ param, sizeof(param), 0, 0);
+
+ for (i=0; i<devinfo.u.array.nDisk; i++)
+ if (DEVICEID_VALID(devinfo.u.array.Members[i]))
+ __hpt_stop_tasks(vbus_ext, devinfo.u.array.Members[i]);
+
+ return result;
+}
+
+static void hpt_stop_tasks(PVBUS_EXT vbus_ext)
+{
+ DEVICEID ids[32];
+ int i, count;
+
+ count = hpt_get_logical_devices((DEVICEID *)&ids, sizeof(ids)/sizeof(ids[0]));
+
+ for (i=0; i<count; i++)
+ __hpt_stop_tasks(vbus_ext, ids[i]);
+}
+
+static d_open_t hpt_open;
+static d_close_t hpt_close;
+static d_ioctl_t hpt_ioctl;
+static void hpt_bus_scan_cb(struct cam_periph *periph, union ccb *ccb);
+static int hpt_rescan_bus(void);
+
+static struct cdevsw hpt_cdevsw = {
+ .d_open = hpt_open,
+ .d_close = hpt_close,
+ .d_ioctl = hpt_ioctl,
+ .d_name = driver_name,
+#if __FreeBSD_version>=503000
+ .d_version = D_VERSION,
+#endif
+#if (__FreeBSD_version>=503000 && __FreeBSD_version<600034)
+ .d_flags = D_NEEDGIANT,
+#endif
+#if __FreeBSD_version<600034
+#if __FreeBSD_version>501000
+ .d_maj = MAJOR_AUTO,
+#else
+ .d_maj = HPT_DEV_MAJOR,
+#endif
+#endif
+};
+
+static struct intr_config_hook hpt_ich;
+
+/*
+ * hpt_final_init will be called after all hpt_attach.
+ */
+static void hpt_final_init(void *dummy)
+{
+ int i;
+ PVBUS_EXT vbus_ext;
+ PVBUS vbus;
+ PHBA hba;
+
+ /* Clear the config hook */
+ config_intrhook_disestablish(&hpt_ich);
+
+ /* allocate memory */
+ i = 0;
+ ldm_for_each_vbus(vbus, vbus_ext) {
+ if (hpt_alloc_mem(vbus_ext)) {
+ os_printk("out of memory");
+ return;
+ }
+ i++;
+ }
+
+ if (!i) {
+ os_printk("no controller detected.");
+ return;
+ }
+
+ /* initializing hardware */
+ ldm_for_each_vbus(vbus, vbus_ext) {
+ /* make timer available here */
+ callout_handle_init(&vbus_ext->timer);
+ if (hpt_init_vbus(vbus_ext)) {
+ os_printk("fail to initialize hardware");
+ break; /* FIXME */
+ }
+ }
+
+ /* register CAM interface */
+ ldm_for_each_vbus(vbus, vbus_ext) {
+ struct cam_devq *devq;
+ struct ccb_setasync ccb;
+
+#if (__FreeBSD_version >= 500000)
+ mtx_init(&vbus_ext->lock, "hptsleeplock", NULL, MTX_DEF);
+#endif
+ if (bus_dma_tag_create(NULL,/* parent */
+ 4, /* alignment */
+ BUS_SPACE_MAXADDR_32BIT+1, /* boundary */
+ BUS_SPACE_MAXADDR, /* lowaddr */
+ BUS_SPACE_MAXADDR, /* highaddr */
+ NULL, NULL, /* filter, filterarg */
+ PAGE_SIZE * (os_max_sg_descriptors-1), /* maxsize */
+ os_max_sg_descriptors, /* nsegments */
+ 0x10000, /* maxsegsize */
+ BUS_DMA_WAITOK, /* flags */
+#if __FreeBSD_version>502000
+ busdma_lock_mutex, /* lockfunc */
+ &vbus_ext->lock, /* lockfuncarg */
+#endif
+ &vbus_ext->io_dmat /* tag */))
+ {
+ return ;
+ }
+
+ for (i=0; i<os_max_queue_comm; i++) {
+ POS_CMDEXT ext = (POS_CMDEXT)malloc(sizeof(OS_CMDEXT), M_DEVBUF, M_WAITOK);
+ if (!ext) {
+ os_printk("Can't alloc cmdext(%d)", i);
+ return ;
+ }
+ ext->vbus_ext = vbus_ext;
+ ext->next = vbus_ext->cmdext_list;
+ vbus_ext->cmdext_list = ext;
+
+ if (bus_dmamap_create(vbus_ext->io_dmat, 0, &ext->dma_map)) {
+ os_printk("Can't create dma map(%d)", i);
+ return ;
+ }
+ }
+
+ if ((devq = cam_simq_alloc(os_max_queue_comm)) == NULL) {
+ os_printk("cam_simq_alloc failed");
+ return ;
+ }
+
+#if __FreeBSD_version > 700025
+ vbus_ext->sim = cam_sim_alloc(hpt_action, hpt_poll, driver_name,
+ vbus_ext, 0, &Giant, os_max_queue_comm, /*tagged*/8, devq);
+#else
+ vbus_ext->sim = cam_sim_alloc(hpt_action, hpt_poll, driver_name,
+ vbus_ext, 0, os_max_queue_comm, /*tagged*/8, devq);
+#endif
+
+ if (!vbus_ext->sim) {
+ os_printk("cam_sim_alloc failed");
+ cam_simq_free(devq);
+ return ;
+ }
+
+#if __FreeBSD_version > 700044
+ if (xpt_bus_register(vbus_ext->sim, NULL, 0) != CAM_SUCCESS) {
+#else
+ if (xpt_bus_register(vbus_ext->sim, 0) != CAM_SUCCESS) {
+#endif
+ os_printk("xpt_bus_register failed");
+ cam_sim_free(vbus_ext->sim, /*free devq*/ TRUE);
+ vbus_ext->sim = NULL;
+ return ;
+ }
+
+ if (xpt_create_path(&vbus_ext->path, /*periph */ NULL,
+ cam_sim_path(vbus_ext->sim), CAM_TARGET_WILDCARD,
+ CAM_LUN_WILDCARD) != CAM_REQ_CMP)
+ {
+ os_printk("xpt_create_path failed");
+ xpt_bus_deregister(cam_sim_path(vbus_ext->sim));
+ cam_sim_free(vbus_ext->sim, /*free_devq*/TRUE);
+ vbus_ext->sim = NULL;
+ return ;
+ }
+
+ xpt_setup_ccb(&ccb.ccb_h, vbus_ext->path, /*priority*/5);
+ ccb.ccb_h.func_code = XPT_SASYNC_CB;
+ ccb.event_enable = AC_LOST_DEVICE;
+ ccb.callback = hpt_async;
+ ccb.callback_arg = vbus_ext;
+ xpt_action((union ccb *)&ccb);
+
+ for (hba = vbus_ext->hba_list; hba; hba = hba->next) {
+ int rid = 0;
+ if ((hba->irq_res = bus_alloc_resource(hba->pcidev,
+ SYS_RES_IRQ, &rid, 0, ~0ul, 1, RF_SHAREABLE | RF_ACTIVE)) == NULL)
+ {
+ os_printk("can't allocate interrupt");
+ return ;
+ }
+
+ if (bus_setup_intr(hba->pcidev, hba->irq_res, INTR_TYPE_CAM,
+#if __FreeBSD_version > 700025
+ NULL, hpt_pci_intr, vbus_ext, &hba->irq_handle))
+#else
+ hpt_pci_intr, vbus_ext, &hba->irq_handle))
+#endif
+ {
+ os_printk("can't set up interrupt");
+ return ;
+ }
+ hba->ldm_adapter.him->intr_control(hba->ldm_adapter.him_handle, HPT_TRUE);
+
+ }
+
+ vbus_ext->shutdown_eh = EVENTHANDLER_REGISTER(shutdown_final,
+ hpt_shutdown_vbus, vbus_ext, SHUTDOWN_PRI_DEFAULT);
+ if (!vbus_ext->shutdown_eh)
+ os_printk("Shutdown event registration failed");
+ }
+
+ ldm_for_each_vbus(vbus, vbus_ext) {
+ TASK_INIT(&vbus_ext->worker, 0, (task_fn_t *)hpt_do_tasks, vbus_ext);
+ if (vbus_ext->tasks)
+ TASK_ENQUEUE(&vbus_ext->worker);
+ }
+
+ make_dev(&hpt_cdevsw, DRIVER_MINOR, UID_ROOT, GID_OPERATOR,
+ S_IRUSR | S_IWUSR, driver_name);
+}
+
+#if defined(KLD_MODULE) && (__FreeBSD_version >= 503000)
+
+typedef struct driverlink *driverlink_t;
+struct driverlink {
+ kobj_class_t driver;
+ TAILQ_ENTRY(driverlink) link; /* list of drivers in devclass */
+};
+
+typedef TAILQ_HEAD(driver_list, driverlink) driver_list_t;
+
+struct devclass {
+ TAILQ_ENTRY(devclass) link;
+ devclass_t parent; /* parent in devclass hierarchy */
+ driver_list_t drivers; /* bus devclasses store drivers for bus */
+ char *name;
+ device_t *devices; /* array of devices indexed by unit */
+ int maxunit; /* size of devices array */
+};
+
+static void override_kernel_driver(void)
+{
+ driverlink_t dl, dlfirst;
+ driver_t *tmpdriver;
+ devclass_t dc = devclass_find("pci");
+
+ if (dc){
+ dlfirst = TAILQ_FIRST(&dc->drivers);
+ for (dl = dlfirst; dl; dl = TAILQ_NEXT(dl, link)) {
+ if(strcmp(dl->driver->name, driver_name) == 0) {
+ tmpdriver=dl->driver;
+ dl->driver=dlfirst->driver;
+ dlfirst->driver=tmpdriver;
+ break;
+ }
+ }
+ }
+}
+
+#else
+#define override_kernel_driver()
+#endif
+
+static void hpt_init(void *dummy)
+{
+ os_printk("%s %s", driver_name_long, driver_ver);
+
+ override_kernel_driver();
+ init_config();
+
+ hpt_ich.ich_func = hpt_final_init;
+ hpt_ich.ich_arg = NULL;
+ if (config_intrhook_establish(&hpt_ich) != 0) {
+ printf("%s: cannot establish configuration hook\n",
+ driver_name_long);
+ }
+
+}
+SYSINIT(hptinit, SI_SUB_CONFIGURE, SI_ORDER_FIRST, hpt_init, NULL);
+
+/*
+ * CAM driver interface
+ */
+static device_method_t driver_methods[] = {
+ /* Device interface */
+ DEVMETHOD(device_probe, hpt_probe),
+ DEVMETHOD(device_attach, hpt_attach),
+ DEVMETHOD(device_detach, hpt_detach),
+ DEVMETHOD(device_shutdown, hpt_shutdown),
+ { 0, 0 }
+};
+
+static driver_t hpt_pci_driver = {
+ driver_name,
+ driver_methods,
+ sizeof(HBA)
+};
+
+static devclass_t hpt_devclass;
+
+#ifndef TARGETNAME
+#error "no TARGETNAME found"
+#endif
+
+/* use this to make TARGETNAME be expanded */
+#define __DRIVER_MODULE(p1, p2, p3, p4, p5, p6) DRIVER_MODULE(p1, p2, p3, p4, p5, p6)
+#define __MODULE_VERSION(p1, p2) MODULE_VERSION(p1, p2)
+#define __MODULE_DEPEND(p1, p2, p3, p4, p5) MODULE_DEPEND(p1, p2, p3, p4, p5)
+__DRIVER_MODULE(TARGETNAME, pci, hpt_pci_driver, hpt_devclass, 0, 0);
+__MODULE_VERSION(TARGETNAME, 1);
+__MODULE_DEPEND(TARGETNAME, cam, 1, 1, 1);
+
+#if __FreeBSD_version>503000
+typedef struct cdev * ioctl_dev_t;
+#else
+typedef dev_t ioctl_dev_t;
+#endif
+
+#if __FreeBSD_version >= 500000
+typedef struct thread * ioctl_thread_t;
+#else
+typedef struct proc * ioctl_thread_t;
+#endif
+
+static int hpt_open(ioctl_dev_t dev, int flags, int devtype, ioctl_thread_t td)
+{
+ return 0;
+}
+
+static int hpt_close(ioctl_dev_t dev, int flags, int devtype, ioctl_thread_t td)
+{
+ return 0;
+}
+
+static int hpt_ioctl(ioctl_dev_t dev, u_long cmd, caddr_t data, int fflag, ioctl_thread_t td)
+{
+ PHPT_IOCTL_PARAM piop=(PHPT_IOCTL_PARAM)data;
+ IOCTL_ARG ioctl_args;
+ HPT_U32 bytesReturned;
+
+ switch (cmd){
+ case HPT_DO_IOCONTROL:
+ {
+ if (piop->Magic == HPT_IOCTL_MAGIC || piop->Magic == HPT_IOCTL_MAGIC32) {
+ KdPrint(("ioctl=%x in=%p len=%d out=%p len=%d\n",
+ piop->dwIoControlCode,
+ piop->lpInBuffer,
+ piop->nInBufferSize,
+ piop->lpOutBuffer,
+ piop->nOutBufferSize));
+
+ memset(&ioctl_args, 0, sizeof(ioctl_args));
+
+ ioctl_args.dwIoControlCode = piop->dwIoControlCode;
+ ioctl_args.nInBufferSize = piop->nInBufferSize;
+ ioctl_args.nOutBufferSize = piop->nOutBufferSize;
+ ioctl_args.lpBytesReturned = &bytesReturned;
+
+ if (ioctl_args.nInBufferSize) {
+ ioctl_args.lpInBuffer = malloc(ioctl_args.nInBufferSize, M_DEVBUF, M_WAITOK);
+ if (!ioctl_args.lpInBuffer)
+ goto invalid;
+ if (copyin((void*)piop->lpInBuffer,
+ ioctl_args.lpInBuffer, piop->nInBufferSize))
+ goto invalid;
+ }
+
+ if (ioctl_args.nOutBufferSize) {
+ ioctl_args.lpOutBuffer = malloc(ioctl_args.nOutBufferSize, M_DEVBUF, M_WAITOK);
+ if (!ioctl_args.lpOutBuffer)
+ goto invalid;
+ }
+
+#if (__FreeBSD_version >= 500000)
+ mtx_lock(&Giant);
+#endif
+
+ hpt_do_ioctl(&ioctl_args);
+
+#if (__FreeBSD_version >= 500000)
+ mtx_unlock(&Giant);
+#endif
+
+ if (ioctl_args.result==HPT_IOCTL_RESULT_OK) {
+ if (piop->nOutBufferSize) {
+ if (copyout(ioctl_args.lpOutBuffer,
+ (void*)piop->lpOutBuffer, piop->nOutBufferSize))
+ goto invalid;
+ }
+ if (piop->lpBytesReturned) {
+ if (copyout(&bytesReturned,
+ (void*)piop->lpBytesReturned, sizeof(HPT_U32)))
+ goto invalid;
+ }
+ if (ioctl_args.lpInBuffer) free(ioctl_args.lpInBuffer, M_DEVBUF);
+ if (ioctl_args.lpOutBuffer) free(ioctl_args.lpOutBuffer, M_DEVBUF);
+ return 0;
+ }
+invalid:
+ if (ioctl_args.lpInBuffer) free(ioctl_args.lpInBuffer, M_DEVBUF);
+ if (ioctl_args.lpOutBuffer) free(ioctl_args.lpOutBuffer, M_DEVBUF);
+ return EFAULT;
+ }
+ return EFAULT;
+ }
+
+ case HPT_SCAN_BUS:
+ {
+ return hpt_rescan_bus();
+ }
+ default:
+ KdPrint(("invalid command!"));
+ return EFAULT;
+ }
+
+}
+
+static int hpt_rescan_bus(void)
+{
+ struct cam_path *path;
+ union ccb *ccb;
+ PVBUS vbus;
+ PVBUS_EXT vbus_ext;
+
+#if (__FreeBSD_version >= 500000)
+ mtx_lock(&Giant);
+#endif
+
+ ldm_for_each_vbus(vbus, vbus_ext) {
+ if (xpt_create_path(&path, xpt_periph, cam_sim_path(vbus_ext->sim),
+ CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP)
+ return(EIO);
+ if ((ccb = malloc(sizeof(union ccb), M_TEMP, M_WAITOK)) == NULL)
+ return(ENOMEM);
+ bzero(ccb, sizeof(union ccb));
+ xpt_setup_ccb(&ccb->ccb_h, path, 5);
+ ccb->ccb_h.func_code = XPT_SCAN_BUS;
+ ccb->ccb_h.cbfcnp = hpt_bus_scan_cb;
+ ccb->crcn.flags = CAM_FLAG_NONE;
+ xpt_action(ccb);
+ }
+
+#if (__FreeBSD_version >= 500000)
+ mtx_unlock(&Giant);
+#endif
+
+ return(0);
+}
+
+static void hpt_bus_scan_cb(struct cam_periph *periph, union ccb *ccb)
+{
+ if (ccb->ccb_h.status != CAM_REQ_CMP)
+ KdPrint(("cam_scan_callback: failure status = %x",ccb->ccb_h.status));
+ else
+ KdPrint(("Scan bus successfully!"));
+
+ xpt_free_path(ccb->ccb_h.path);
+ free(ccb, M_TEMP);
+ return;
+}
diff --git a/sys/dev/hpt27xx/wj.h b/sys/dev/hpt27xx/wj.h
new file mode 100644
index 0000000..7f2a9c9c
--- /dev/null
+++ b/sys/dev/hpt27xx/wj.h
@@ -0,0 +1,56 @@
+/*-
+ * Copyright (c) 2011 HighPoint Technologies, Inc.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ */
+
+#include <dev/hpt27xx/hpt27xx_config.h>
+/*
+ * NVRAM write journaling interface.
+ */
+
+#ifndef _WJ_H_
+#define _WJ_H_
+
+#if defined(SUPPORT_BBU) || defined(SUPPORT_NVRAM)
+
+void wj_init(PVBUS vbus, void *nvram_addr, HPT_U32 nvram_size);
+void *wj_add_entry(PVBUS vbus, PVDEV vd, HPT_LBA lba, HPT_U16 sectors);
+void *wj_get_entry(PVBUS vbus, PVDEV *vd_p, HPT_LBA *lba_p, HPT_U16 *sectors_p);
+void wj_del_entry(PVBUS vbus, void *handle);
+void wj_del_vd(PVBUS vbus, PVDEV vd);
+void wj_sync_stamp(PVBUS vbus, PVDEV vd);
+
+#else
+
+#define wj_add_entry(vbus, vd, lba, sectors) 0
+#define wj_get_entry(vbus, vd_p, lba_p, sectors_p) 0
+#define wj_del_entry(vbus, handle) 0
+#define wj_del_vd(vbus, vd) 0
+#define wj_sync_stamp(vbus, vd) 0
+
+#endif
+
+#endif
diff --git a/sys/dev/hptmv/readme.txt b/sys/dev/hptmv/readme.txt
index 6143076..177f9f9 100644
--- a/sys/dev/hptmv/readme.txt
+++ b/sys/dev/hptmv/readme.txt
@@ -184,7 +184,7 @@ Revision History:
/kernel text=0x24f1db data=0x3007ec+0x2062c -
Hit [Enter] to boot immediagely, or any other key for command prompt.
- Booting [kernel] in 9 seconds¡­
+ Booting [kernel] in 9 seconds
<-- press SPACE key here
Type '?' for a list of commands, 'help' for more detailed help.
diff --git a/sys/dev/hwpmc/hwpmc_amd.c b/sys/dev/hwpmc/hwpmc_amd.c
index 268904b..9ffa62f 100644
--- a/sys/dev/hwpmc/hwpmc_amd.c
+++ b/sys/dev/hwpmc/hwpmc_amd.c
@@ -889,7 +889,6 @@ pmc_amd_initialize(void)
* field returned by CPUID for instruction family >= 6.
*/
- class = cputype = -1;
name = NULL;
switch (cpu_id & 0xF00) {
#if defined(__i386__)
@@ -906,9 +905,8 @@ pmc_amd_initialize(void)
class = PMC_CLASS_K8;
name = "K8";
break;
- }
- if ((int) cputype == -1) {
+ default:
(void) printf("pmc: Unknown AMD CPU.\n");
return NULL;
}
diff --git a/sys/dev/hwpmc/hwpmc_core.c b/sys/dev/hwpmc/hwpmc_core.c
index 04f6e92..4dea06a 100644
--- a/sys/dev/hwpmc/hwpmc_core.c
+++ b/sys/dev/hwpmc/hwpmc_core.c
@@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$");
#include <machine/apicvar.h>
#include <machine/cpu.h>
#include <machine/cpufunc.h>
+#include <machine/md_var.h>
#include <machine/specialreg.h>
#define CORE_CPUID_REQUEST 0xA
@@ -641,7 +642,7 @@ static struct iap_event_descr iap_events[] = {
IAPDESCR(08H_09H, 0x08, 0x09, IAP_F_FM | IAP_F_CA),
IAPDESCR(08H_10H, 0x08, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM),
IAPDESCR(08H_20H, 0x08, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM),
- IAPDESCR(08H_40H, 0x08, 0x40, IAP_F_FM | IAP_F_I7),
+ IAPDESCR(08H_40H, 0x08, 0x40, IAP_F_FM | IAP_F_I7O),
IAPDESCR(08H_80H, 0x08, 0x80, IAP_F_FM | IAP_F_I7),
IAPDESCR(09H_01H, 0x09, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O),
@@ -844,7 +845,7 @@ static struct iap_event_descr iap_events[] = {
IAPDESCR(47H_00H, 0x47, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2),
IAPDESCR(48H_00H, 0x48, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2),
- IAPDESCR(48H_02H, 0x48, 0x02, IAP_F_FM | IAP_F_I7),
+ IAPDESCR(48H_02H, 0x48, 0x02, IAP_F_FM | IAP_F_I7O),
IAPDESCR(49H_00H, 0x49, 0x00, IAP_F_FM | IAP_F_CC),
IAPDESCR(49H_01H, 0x49, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 |
@@ -853,9 +854,9 @@ static struct iap_event_descr iap_events[] = {
IAP_F_I7 | IAP_F_WM),
IAPDESCR(49H_04H, 0x49, 0x04, IAP_F_FM | IAP_F_WM),
IAPDESCR(49H_10H, 0x49, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM),
- IAPDESCR(49H_20H, 0x49, 0x20, IAP_F_FM | IAP_F_I7O),
+ IAPDESCR(49H_20H, 0x49, 0x20, IAP_F_FM | IAP_F_I7),
IAPDESCR(49H_40H, 0x49, 0x40, IAP_F_FM | IAP_F_I7O),
- IAPDESCR(49H_80H, 0x49, 0x80, IAP_F_FM | IAP_F_WM | IAP_F_I7O),
+ IAPDESCR(49H_80H, 0x49, 0x80, IAP_F_FM | IAP_F_WM | IAP_F_I7),
IAPDESCR(4BH_00H, 0x4B, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2),
IAPDESCR(4BH_01H, 0x4B, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7O),
@@ -1305,7 +1306,7 @@ static struct iap_event_descr iap_events[] = {
IAPDESCR(E8H_01H, 0xE8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM),
IAPDESCR(E8H_02H, 0xE8, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM),
- IAPDESCR(E8H_03H, 0xE8, 0x03, IAP_F_FM | IAP_F_I7),
+ IAPDESCR(E8H_03H, 0xE8, 0x03, IAP_F_FM | IAP_F_I7O),
IAPDESCR(ECH_01H, 0xEC, 0x01, IAP_F_FM | IAP_F_WM),
@@ -1453,7 +1454,6 @@ iap_event_corei7_ok_on_counter(enum pmc_event pe, int ri)
case PMC_EV_IAP_EVENT_42H_08H:
case PMC_EV_IAP_EVENT_43H_01H:
case PMC_EV_IAP_EVENT_43H_02H:
- case PMC_EV_IAP_EVENT_48H_02H:
case PMC_EV_IAP_EVENT_51H_01H:
case PMC_EV_IAP_EVENT_51H_02H:
case PMC_EV_IAP_EVENT_51H_04H:
@@ -1553,7 +1553,7 @@ static int
iap_allocate_pmc(int cpu, int ri, struct pmc *pm,
const struct pmc_op_pmcallocate *a)
{
- int n;
+ int n, model;
enum pmc_event ev;
struct iap_event_descr *ie;
uint32_t c, caps, config, cpuflag, evsel, mask;
@@ -1573,6 +1573,16 @@ iap_allocate_pmc(int cpu, int ri, struct pmc *pm,
if (iap_architectural_event_is_unsupported(ev))
return (EOPNOTSUPP);
+ /*
+ * A small number of events are not supported in all the
+ * processors based on a given microarchitecture.
+ */
+ if (ev == PMC_EV_IAP_EVENT_0FH_01H || ev == PMC_EV_IAP_EVENT_0FH_80H) {
+ model = ((cpu_id & 0xF0000) >> 12) | ((cpu_id & 0xF0) >> 4);
+ if (core_cputype == PMC_CPU_INTEL_COREI7 && model != 0x2E)
+ return (EINVAL);
+ }
+
switch (core_cputype) {
case PMC_CPU_INTEL_COREI7:
if (iap_event_corei7_ok_on_counter(ev, ri) == 0)
@@ -1710,7 +1720,7 @@ iap_allocate_pmc(int cpu, int ri, struct pmc *pm,
if (core_cputype == PMC_CPU_INTEL_COREI7 &&
ev == PMC_EV_IAP_EVENT_BBH_01H)
return (EINVAL);
- if ( a->pm_md.pm_iap.pm_iap_rsp & ~IA_OFFCORE_RSP_MASK)
+ if (a->pm_md.pm_iap.pm_iap_rsp & ~IA_OFFCORE_RSP_MASK)
return (EINVAL);
pm->pm_md.pm_iap.pm_iap_rsp =
a->pm_md.pm_iap.pm_iap_rsp & IA_OFFCORE_RSP_MASK;
diff --git a/sys/dev/hwpmc/hwpmc_powerpc.c b/sys/dev/hwpmc/hwpmc_powerpc.c
index ce1caf6..8e97b97 100644
--- a/sys/dev/hwpmc/hwpmc_powerpc.c
+++ b/sys/dev/hwpmc/hwpmc_powerpc.c
@@ -1,4 +1,5 @@
/*-
+ * Copyright (c) 2011 Justin Hibbits
* Copyright (c) 2005, Joseph Koshy
* All rights reserved.
*
@@ -30,20 +31,297 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/pmc.h>
+#include <sys/pmckern.h>
+#include <sys/systm.h>
#include <machine/pmc_mdep.h>
+#include <machine/spr.h>
+#include <machine/cpu.h>
-struct pmc_mdep *
-pmc_md_initialize()
-{
- return NULL;
-}
+#define POWERPC_PMC_CAPS (PMC_CAP_INTERRUPT | PMC_CAP_USER | \
+ PMC_CAP_SYSTEM | PMC_CAP_EDGE | \
+ PMC_CAP_THRESHOLD | PMC_CAP_READ | \
+ PMC_CAP_WRITE | PMC_CAP_INVERT | \
+ PMC_CAP_QUALIFIER)
-void
-pmc_md_finalize(struct pmc_mdep *md)
-{
- (void) md;
-}
+#define PPC_SET_PMC1SEL(r, x) ((r & ~(SPR_MMCR0_PMC1SEL(0x3f))) | SPR_MMCR0_PMC1SEL(x))
+#define PPC_SET_PMC2SEL(r, x) ((r & ~(SPR_MMCR0_PMC2SEL(0x3f))) | SPR_MMCR0_PMC2SEL(x))
+#define PPC_SET_PMC3SEL(r, x) ((r & ~(SPR_MMCR1_PMC3SEL(0x1f))) | SPR_MMCR1_PMC3SEL(x))
+#define PPC_SET_PMC4SEL(r, x) ((r & ~(SPR_MMCR1_PMC4SEL(0x1f))) | SPR_MMCR1_PMC4SEL(x))
+#define PPC_SET_PMC5SEL(r, x) ((r & ~(SPR_MMCR1_PMC5SEL(0x1f))) | SPR_MMCR1_PMC5SEL(x))
+#define PPC_SET_PMC6SEL(r, x) ((r & ~(SPR_MMCR1_PMC6SEL(0x3f))) | SPR_MMCR1_PMC6SEL(x))
+
+/* Change this when we support more than just the 7450. */
+#define PPC_MAX_PMCS 6
+
+#define POWERPC_PMC_KERNEL_ENABLE (0x1 << 30)
+#define POWERPC_PMC_USER_ENABLE (0x1 << 31)
+
+#define POWERPC_PMC_ENABLE (POWERPC_PMC_KERNEL_ENABLE | POWERPC_PMC_USER_ENABLE)
+#define POWERPC_RELOAD_COUNT_TO_PERFCTR_VALUE(V) (0x80000000-(V))
+#define POWERPC_PERFCTR_VALUE_TO_RELOAD_COUNT(P) ((P)-0x80000000)
+#define POWERPC_PMC_HAS_OVERFLOWED(x) (powerpc_pmcn_read(x) & (0x1 << 31))
+
+
+/*
+ * This should work for every 32-bit PowerPC implementation I know of (G3 and G4
+ * specifically). PoewrPC 970 will take more work.
+ */
+
+/*
+ * Per-processor information.
+ */
+struct powerpc_cpu {
+ struct pmc_hw *pc_ppcpmcs;
+};
+
+static struct powerpc_cpu **powerpc_pcpu;
+
+struct powerpc_event_code_map {
+ enum pmc_event pe_ev; /* enum value */
+ uint8_t pe_counter_mask; /* Which counter this can be counted in. */
+ uint8_t pe_code; /* numeric code */
+};
+
+#define PPC_PMC_MASK1 0
+#define PPC_PMC_MASK2 1
+#define PPC_PMC_MASK3 2
+#define PPC_PMC_MASK4 3
+#define PPC_PMC_MASK5 4
+#define PPC_PMC_MASK6 5
+#define PPC_PMC_MASK_ALL 0x3f
+
+#define PMC_POWERPC_EVENT(id, mask, number) \
+ { .pe_ev = PMC_EV_PPC7450_##id, .pe_counter_mask = mask, .pe_code = number }
+
+static struct powerpc_event_code_map powerpc_event_codes[] = {
+ PMC_POWERPC_EVENT(CYCLE,PPC_PMC_MASK_ALL, 1),
+ PMC_POWERPC_EVENT(INSTR_COMPLETED, 0x0f, 2),
+ PMC_POWERPC_EVENT(TLB_BIT_TRANSITIONS, 0x0f, 3),
+ PMC_POWERPC_EVENT(INSTR_DISPATCHED, 0x0f, 4),
+ PMC_POWERPC_EVENT(PMON_EXCEPT, 0x0f, 5),
+ PMC_POWERPC_EVENT(PMON_SIG, 0x0f, 7),
+ PMC_POWERPC_EVENT(VPU_INSTR_COMPLETED, 0x03, 8),
+ PMC_POWERPC_EVENT(VFPU_INSTR_COMPLETED, 0x03, 9),
+ PMC_POWERPC_EVENT(VIU1_INSTR_COMPLETED, 0x03, 10),
+ PMC_POWERPC_EVENT(VIU2_INSTR_COMPLETED, 0x03, 11),
+ PMC_POWERPC_EVENT(MTVSCR_INSTR_COMPLETED, 0x03, 12),
+ PMC_POWERPC_EVENT(MTVRSAVE_INSTR_COMPLETED, 0x03, 13),
+ PMC_POWERPC_EVENT(VPU_INSTR_WAIT_CYCLES, 0x03, 14),
+ PMC_POWERPC_EVENT(VFPU_INSTR_WAIT_CYCLES, 0x03, 15),
+ PMC_POWERPC_EVENT(VIU1_INSTR_WAIT_CYCLES, 0x03, 16),
+ PMC_POWERPC_EVENT(VIU2_INSTR_WAIT_CYCLES, 0x03, 17),
+ PMC_POWERPC_EVENT(MFVSCR_SYNC_CYCLES, 0x03, 18),
+ PMC_POWERPC_EVENT(VSCR_SAT_SET, 0x03, 19),
+ PMC_POWERPC_EVENT(STORE_INSTR_COMPLETED, 0x03, 20),
+ PMC_POWERPC_EVENT(L1_INSTR_CACHE_MISSES, 0x03, 21),
+ PMC_POWERPC_EVENT(L1_DATA_SNOOPS, 0x03, 22),
+ PMC_POWERPC_EVENT(UNRESOLVED_BRANCHES, 0x01, 23),
+ PMC_POWERPC_EVENT(SPEC_BUFFER_CYCLES, 0x01, 24),
+ PMC_POWERPC_EVENT(BRANCH_UNIT_STALL_CYCLES, 0x01, 25),
+ PMC_POWERPC_EVENT(TRUE_BRANCH_TARGET_HITS, 0x01, 26),
+ PMC_POWERPC_EVENT(BRANCH_LINK_STAC_PREDICTED, 0x01, 27),
+ PMC_POWERPC_EVENT(GPR_ISSUE_QUEUE_DISPATCHES, 0x01, 28),
+ PMC_POWERPC_EVENT(CYCLES_THREE_INSTR_DISPATCHED, 0x01, 29),
+ PMC_POWERPC_EVENT(THRESHOLD_INSTR_QUEUE_ENTRIES_CYCLES, 0x01, 30),
+ PMC_POWERPC_EVENT(THRESHOLD_VEC_INSTR_QUEUE_ENTRIES_CYCLES, 0x01, 31),
+ PMC_POWERPC_EVENT(CYCLES_NO_COMPLETED_INSTRS, 0x01, 32),
+ PMC_POWERPC_EVENT(IU2_INSTR_COMPLETED, 0x01, 33),
+ PMC_POWERPC_EVENT(BRANCHES_COMPLETED, 0x01, 34),
+ PMC_POWERPC_EVENT(EIEIO_INSTR_COMPLETED, 0x01, 35),
+ PMC_POWERPC_EVENT(MTSPR_INSTR_COMPLETED, 0x01, 36),
+ PMC_POWERPC_EVENT(SC_INSTR_COMPLETED, 0x01, 37),
+ PMC_POWERPC_EVENT(LS_LM_COMPLETED, 0x01, 38),
+ PMC_POWERPC_EVENT(ITLB_HW_TABLE_SEARCH_CYCLES, 0x01, 39),
+ PMC_POWERPC_EVENT(DTLB_HW_SEARCH_CYCLES_OVER_THRESHOLD, 0x01, 40),
+ PMC_POWERPC_EVENT(L1_INSTR_CACHE_ACCESSES, 0x01, 41),
+ PMC_POWERPC_EVENT(INSTR_BKPT_MATCHES, 0x01, 42),
+ PMC_POWERPC_EVENT(L1_DATA_CACHE_LOAD_MISS_CYCLES_OVER_THRESHOLD, 0x01, 43),
+ PMC_POWERPC_EVENT(L1_DATA_SNOOP_HIT_ON_MODIFIED, 0x01, 44),
+ PMC_POWERPC_EVENT(LOAD_MISS_ALIAS, 0x01, 45),
+ PMC_POWERPC_EVENT(LOAD_MISS_ALIAS_ON_TOUCH, 0x01, 46),
+ PMC_POWERPC_EVENT(TOUCH_ALIAS, 0x01, 47),
+ PMC_POWERPC_EVENT(L1_DATA_SNOOP_HIT_CASTOUT_QUEUE, 0x01, 48),
+ PMC_POWERPC_EVENT(L1_DATA_SNOOP_HIT_CASTOUT, 0x01, 49),
+ PMC_POWERPC_EVENT(L1_DATA_SNOOP_HITS, 0x01, 50),
+ PMC_POWERPC_EVENT(WRITE_THROUGH_STORES, 0x01, 51),
+ PMC_POWERPC_EVENT(CACHE_INHIBITED_STORES, 0x01, 52),
+ PMC_POWERPC_EVENT(L1_DATA_LOAD_HIT, 0x01, 53),
+ PMC_POWERPC_EVENT(L1_DATA_TOUCH_HIT, 0x01, 54),
+ PMC_POWERPC_EVENT(L1_DATA_STORE_HIT, 0x01, 55),
+ PMC_POWERPC_EVENT(L1_DATA_TOTAL_HITS, 0x01, 56),
+ PMC_POWERPC_EVENT(DST_INSTR_DISPATCHED, 0x01, 57),
+ PMC_POWERPC_EVENT(REFRESHED_DSTS, 0x01, 58),
+ PMC_POWERPC_EVENT(SUCCESSFUL_DST_TABLE_SEARCHES, 0x01, 59),
+ PMC_POWERPC_EVENT(DSS_INSTR_COMPLETED, 0x01, 60),
+ PMC_POWERPC_EVENT(DST_STREAM_0_CACHE_LINE_FETCHES, 0x01, 61),
+ PMC_POWERPC_EVENT(VTQ_SUSPENDS_DUE_TO_CTX_CHANGE, 0x01, 62),
+ PMC_POWERPC_EVENT(VTQ_LINE_FETCH_HIT, 0x01, 63),
+ PMC_POWERPC_EVENT(VEC_LOAD_INSTR_COMPLETED, 0x01, 64),
+ PMC_POWERPC_EVENT(FP_STORE_INSTR_COMPLETED_IN_LSU, 0x01, 65),
+ PMC_POWERPC_EVENT(FPU_RENORMALIZATION, 0x01, 66),
+ PMC_POWERPC_EVENT(FPU_DENORMALIZATION, 0x01, 67),
+ PMC_POWERPC_EVENT(FP_STORE_CAUSES_STALL_IN_LSU, 0x01, 68),
+ PMC_POWERPC_EVENT(LD_ST_TRUE_ALIAS_STALL, 0x01, 70),
+ PMC_POWERPC_EVENT(LSU_INDEXED_ALIAS_STALL, 0x01, 71),
+ PMC_POWERPC_EVENT(LSU_ALIAS_VS_FSQ_WB0_WB1, 0x01, 72),
+ PMC_POWERPC_EVENT(LSU_ALIAS_VS_CSQ, 0x01, 73),
+ PMC_POWERPC_EVENT(LSU_LOAD_HIT_LINE_ALIAS_VS_CSQ0, 0x01, 74),
+ PMC_POWERPC_EVENT(LSU_LOAD_MISS_LINE_ALIAS_VS_CSQ0, 0x01, 75),
+ PMC_POWERPC_EVENT(LSU_TOUCH_LINE_ALIAS_VS_FSQ_WB0_WB1, 0x01, 76),
+ PMC_POWERPC_EVENT(LSU_TOUCH_ALIAS_VS_CSQ, 0x01, 77),
+ PMC_POWERPC_EVENT(LSU_LMQ_FULL_STALL, 0x01, 78),
+ PMC_POWERPC_EVENT(FP_LOAD_INSTR_COMPLETED_IN_LSU, 0x01, 79),
+ PMC_POWERPC_EVENT(FP_LOAD_SINGLE_INSTR_COMPLETED_IN_LSU, 0x01, 80),
+ PMC_POWERPC_EVENT(FP_LOAD_DOUBLE_COMPLETED_IN_LSU, 0x01, 81),
+ PMC_POWERPC_EVENT(LSU_RA_LATCH_STALL, 0x01, 82),
+ PMC_POWERPC_EVENT(LSU_LOAD_VS_STORE_QUEUE_ALIAS_STALL, 0x01, 83),
+ PMC_POWERPC_EVENT(LSU_LMQ_INDEX_ALIAS, 0x01, 84),
+ PMC_POWERPC_EVENT(LSU_STORE_QUEUE_INDEX_ALIAS, 0x01, 85),
+ PMC_POWERPC_EVENT(LSU_CSQ_FORWARDING, 0x01, 86),
+ PMC_POWERPC_EVENT(LSU_MISALIGNED_LOAD_FINISH, 0x01, 87),
+ PMC_POWERPC_EVENT(LSU_MISALIGN_STORE_COMPLETED, 0x01, 88),
+ PMC_POWERPC_EVENT(LSU_MISALIGN_STALL, 0x01, 89),
+ PMC_POWERPC_EVENT(FP_ONE_QUARTER_FPSCR_RENAMES_BUSY, 0x01, 90),
+ PMC_POWERPC_EVENT(FP_ONE_HALF_FPSCR_RENAMES_BUSY, 0x01, 91),
+ PMC_POWERPC_EVENT(FP_THREE_QUARTERS_FPSCR_RENAMES_BUSY, 0x01, 92),
+ PMC_POWERPC_EVENT(FP_ALL_FPSCR_RENAMES_BUSY, 0x01, 93),
+ PMC_POWERPC_EVENT(FP_DENORMALIZED_RESULT, 0x01, 94),
+ PMC_POWERPC_EVENT(L1_DATA_TOTAL_MISSES, 0x02, 23),
+ PMC_POWERPC_EVENT(DISPATCHES_TO_FPR_ISSUE_QUEUE, 0x02, 24),
+ PMC_POWERPC_EVENT(LSU_INSTR_COMPLETED, 0x02, 25),
+ PMC_POWERPC_EVENT(LOAD_INSTR_COMPLETED, 0x02, 26),
+ PMC_POWERPC_EVENT(SS_SM_INSTR_COMPLETED, 0x02, 27),
+ PMC_POWERPC_EVENT(TLBIE_INSTR_COMPLETED, 0x02, 28),
+ PMC_POWERPC_EVENT(LWARX_INSTR_COMPLETED, 0x02, 29),
+ PMC_POWERPC_EVENT(MFSPR_INSTR_COMPLETED, 0x02, 30),
+ PMC_POWERPC_EVENT(REFETCH_SERIALIZATION, 0x02, 31),
+ PMC_POWERPC_EVENT(COMPLETION_QUEUE_ENTRIES_OVER_THRESHOLD, 0x02, 32),
+ PMC_POWERPC_EVENT(CYCLES_ONE_INSTR_DISPATCHED, 0x02, 33),
+ PMC_POWERPC_EVENT(CYCLES_TWO_INSTR_COMPLETED, 0x02, 34),
+ PMC_POWERPC_EVENT(ITLB_NON_SPECULATIVE_MISSES, 0x02, 35),
+ PMC_POWERPC_EVENT(CYCLES_WAITING_FROM_L1_INSTR_CACHE_MISS, 0x02, 36),
+ PMC_POWERPC_EVENT(L1_DATA_LOAD_ACCESS_MISS, 0x02, 37),
+ PMC_POWERPC_EVENT(L1_DATA_TOUCH_MISS, 0x02, 38),
+ PMC_POWERPC_EVENT(L1_DATA_STORE_MISS, 0x02, 39),
+ PMC_POWERPC_EVENT(L1_DATA_TOUCH_MISS_CYCLES, 0x02, 40),
+ PMC_POWERPC_EVENT(L1_DATA_CYCLES_USED, 0x02, 41),
+ PMC_POWERPC_EVENT(DST_STREAM_1_CACHE_LINE_FETCHES, 0x02, 42),
+ PMC_POWERPC_EVENT(VTQ_STREAM_CANCELED_PREMATURELY, 0x02, 43),
+ PMC_POWERPC_EVENT(VTQ_RESUMES_DUE_TO_CTX_CHANGE, 0x02, 44),
+ PMC_POWERPC_EVENT(VTQ_LINE_FETCH_MISS, 0x02, 45),
+ PMC_POWERPC_EVENT(VTQ_LINE_FETCH, 0x02, 46),
+ PMC_POWERPC_EVENT(TLBIE_SNOOPS, 0x02, 47),
+ PMC_POWERPC_EVENT(L1_INSTR_CACHE_RELOADS, 0x02, 48),
+ PMC_POWERPC_EVENT(L1_DATA_CACHE_RELOADS, 0x02, 49),
+ PMC_POWERPC_EVENT(L1_DATA_CACHE_CASTOUTS_TO_L2, 0x02, 50),
+ PMC_POWERPC_EVENT(STORE_MERGE_GATHER, 0x02, 51),
+ PMC_POWERPC_EVENT(CACHEABLE_STORE_MERGE_TO_32_BYTES, 0x02, 52),
+ PMC_POWERPC_EVENT(DATA_BKPT_MATCHES, 0x02, 53),
+ PMC_POWERPC_EVENT(FALL_THROUGH_BRANCHES_PROCESSED, 0x02, 54),
+ PMC_POWERPC_EVENT(FIRST_SPECULATIVE_BRANCH_BUFFER_RESOLVED_CORRECTLY, 0x02, 55),
+ PMC_POWERPC_EVENT(SECOND_SPECULATION_BUFFER_ACTIVE, 0x02, 56),
+ PMC_POWERPC_EVENT(BPU_STALL_ON_LR_DEPENDENCY, 0x02, 57),
+ PMC_POWERPC_EVENT(BTIC_MISS, 0x02, 58),
+ PMC_POWERPC_EVENT(BRANCH_LINK_STACK_CORRECTLY_RESOLVED, 0x02, 59),
+ PMC_POWERPC_EVENT(FPR_ISSUE_STALLED, 0x02, 60),
+ PMC_POWERPC_EVENT(SWITCHES_BETWEEN_PRIV_USER, 0x02, 61),
+ PMC_POWERPC_EVENT(LSU_COMPLETES_FP_STORE_SINGLE, 0x02, 62),
+ PMC_POWERPC_EVENT(CYCLES_TWO_INSTR_COMPLETED, 0x04, 8),
+ PMC_POWERPC_EVENT(CYCLES_ONE_INSTR_DISPATCHED, 0x04, 9),
+ PMC_POWERPC_EVENT(VR_ISSUE_QUEUE_DISPATCHES, 0x04, 10),
+ PMC_POWERPC_EVENT(VR_STALLS, 0x04, 11),
+ PMC_POWERPC_EVENT(GPR_RENAME_BUFFER_ENTRIES_OVER_THRESHOLD, 0x04, 12),
+ PMC_POWERPC_EVENT(FPR_ISSUE_QUEUE_ENTRIES, 0x04, 13),
+ PMC_POWERPC_EVENT(FPU_INSTR_COMPLETED, 0x04, 14),
+ PMC_POWERPC_EVENT(STWCX_INSTR_COMPLETED, 0x04, 15),
+ PMC_POWERPC_EVENT(LS_LM_INSTR_PIECES, 0x04, 16),
+ PMC_POWERPC_EVENT(ITLB_HW_SEARCH_CYCLES_OVER_THRESHOLD, 0x04, 17),
+ PMC_POWERPC_EVENT(DTLB_MISSES, 0x04, 18),
+ PMC_POWERPC_EVENT(CANCELLED_L1_INSTR_CACHE_MISSES, 0x04, 19),
+ PMC_POWERPC_EVENT(L1_DATA_CACHE_OP_HIT, 0x04, 20),
+ PMC_POWERPC_EVENT(L1_DATA_LOAD_MISS_CYCLES, 0x04, 21),
+ PMC_POWERPC_EVENT(L1_DATA_PUSHES, 0x04, 22),
+ PMC_POWERPC_EVENT(L1_DATA_TOTAL_MISS, 0x04, 23),
+ PMC_POWERPC_EVENT(VT2_FETCHES, 0x04, 24),
+ PMC_POWERPC_EVENT(TAKEN_BRANCHES_PROCESSED, 0x04, 25),
+ PMC_POWERPC_EVENT(BRANCH_FLUSHES, 0x04, 26),
+ PMC_POWERPC_EVENT(SECOND_SPECULATIVE_BRANCH_BUFFER_RESOLVED_CORRECTLY, 0x04, 27),
+ PMC_POWERPC_EVENT(THIRD_SPECULATION_BUFFER_ACTIVE, 0x04, 28),
+ PMC_POWERPC_EVENT(BRANCH_UNIT_STALL_ON_CTR_DEPENDENCY, 0x04, 29),
+ PMC_POWERPC_EVENT(FAST_BTIC_HIT, 0x04, 30),
+ PMC_POWERPC_EVENT(BRANCH_LINK_STACK_MISPREDICTED, 0x04, 31),
+ PMC_POWERPC_EVENT(CYCLES_THREE_INSTR_COMPLETED, 0x08, 14),
+ PMC_POWERPC_EVENT(CYCLES_NO_INSTR_DISPATCHED, 0x08, 15),
+ PMC_POWERPC_EVENT(GPR_ISSUE_QUEUE_ENTRIES_OVER_THRESHOLD, 0x08, 16),
+ PMC_POWERPC_EVENT(GPR_ISSUE_QUEUE_STALLED, 0x08, 17),
+ PMC_POWERPC_EVENT(IU1_INSTR_COMPLETED, 0x08, 18),
+ PMC_POWERPC_EVENT(DSSALL_INSTR_COMPLETED, 0x08, 19),
+ PMC_POWERPC_EVENT(TLBSYNC_INSTR_COMPLETED, 0x08, 20),
+ PMC_POWERPC_EVENT(SYNC_INSTR_COMPLETED, 0x08, 21),
+ PMC_POWERPC_EVENT(SS_SM_INSTR_PIECES, 0x08, 22),
+ PMC_POWERPC_EVENT(DTLB_HW_SEARCH_CYCLES, 0x08, 23),
+ PMC_POWERPC_EVENT(SNOOP_RETRIES, 0x08, 24),
+ PMC_POWERPC_EVENT(SUCCESSFUL_STWCX, 0x08, 25),
+ PMC_POWERPC_EVENT(DST_STREAM_3_CACHE_LINE_FETCHES, 0x08, 26),
+ PMC_POWERPC_EVENT(THIRD_SPECULATIVE_BRANCH_BUFFER_RESOLVED_CORRECTLY, 0x08, 27),
+ PMC_POWERPC_EVENT(MISPREDICTED_BRANCHES, 0x08, 28),
+ PMC_POWERPC_EVENT(FOLDED_BRANCHES, 0x08, 29),
+ PMC_POWERPC_EVENT(FP_STORE_DOUBLE_COMPLETES_IN_LSU, 0x08, 30),
+ PMC_POWERPC_EVENT(L2_CACHE_HITS, 0x30, 2),
+ PMC_POWERPC_EVENT(L3_CACHE_HITS, 0x30, 3),
+ PMC_POWERPC_EVENT(L2_INSTR_CACHE_MISSES, 0x30, 4),
+ PMC_POWERPC_EVENT(L3_INSTR_CACHE_MISSES, 0x30, 5),
+ PMC_POWERPC_EVENT(L2_DATA_CACHE_MISSES, 0x30, 6),
+ PMC_POWERPC_EVENT(L3_DATA_CACHE_MISSES, 0x30, 7),
+ PMC_POWERPC_EVENT(L2_LOAD_HITS, 0x10, 8),
+ PMC_POWERPC_EVENT(L2_STORE_HITS, 0x10, 9),
+ PMC_POWERPC_EVENT(L3_LOAD_HITS, 0x10, 10),
+ PMC_POWERPC_EVENT(L3_STORE_HITS, 0x10, 11),
+ PMC_POWERPC_EVENT(L2_TOUCH_HITS, 0x30, 13),
+ PMC_POWERPC_EVENT(L3_TOUCH_HITS, 0x30, 14),
+ PMC_POWERPC_EVENT(SNOOP_RETRIES, 0x30, 15),
+ PMC_POWERPC_EVENT(SNOOP_MODIFIED, 0x10, 16),
+ PMC_POWERPC_EVENT(SNOOP_VALID, 0x10, 17),
+ PMC_POWERPC_EVENT(INTERVENTION, 0x30, 18),
+ PMC_POWERPC_EVENT(L2_CACHE_MISSES, 0x10, 19),
+ PMC_POWERPC_EVENT(L3_CACHE_MISSES, 0x10, 20),
+ PMC_POWERPC_EVENT(L2_CACHE_CASTOUTS, 0x20, 8),
+ PMC_POWERPC_EVENT(L3_CACHE_CASTOUTS, 0x20, 9),
+ PMC_POWERPC_EVENT(L2SQ_FULL_CYCLES, 0x20, 10),
+ PMC_POWERPC_EVENT(L3SQ_FULL_CYCLES, 0x20, 11),
+ PMC_POWERPC_EVENT(RAQ_FULL_CYCLES, 0x20, 16),
+ PMC_POWERPC_EVENT(WAQ_FULL_CYCLES, 0x20, 17),
+ PMC_POWERPC_EVENT(L1_EXTERNAL_INTERVENTIONS, 0x20, 19),
+ PMC_POWERPC_EVENT(L2_EXTERNAL_INTERVENTIONS, 0x20, 20),
+ PMC_POWERPC_EVENT(L3_EXTERNAL_INTERVENTIONS, 0x20, 21),
+ PMC_POWERPC_EVENT(EXTERNAL_INTERVENTIONS, 0x20, 22),
+ PMC_POWERPC_EVENT(EXTERNAL_PUSHES, 0x20, 23),
+ PMC_POWERPC_EVENT(EXTERNAL_SNOOP_RETRY, 0x20, 24),
+ PMC_POWERPC_EVENT(DTQ_FULL_CYCLES, 0x20, 25),
+ PMC_POWERPC_EVENT(BUS_RETRY, 0x20, 26),
+ PMC_POWERPC_EVENT(L2_VALID_REQUEST, 0x20, 27),
+ PMC_POWERPC_EVENT(BORDQ_FULL, 0x20, 28),
+ PMC_POWERPC_EVENT(BUS_TAS_FOR_READS, 0x20, 42),
+ PMC_POWERPC_EVENT(BUS_TAS_FOR_WRITES, 0x20, 43),
+ PMC_POWERPC_EVENT(BUS_READS_NOT_RETRIED, 0x20, 44),
+ PMC_POWERPC_EVENT(BUS_WRITES_NOT_RETRIED, 0x20, 45),
+ PMC_POWERPC_EVENT(BUS_READS_WRITES_NOT_RETRIED, 0x20, 46),
+ PMC_POWERPC_EVENT(BUS_RETRY_DUE_TO_L1_RETRY, 0x20, 47),
+ PMC_POWERPC_EVENT(BUS_RETRY_DUE_TO_PREVIOUS_ADJACENT, 0x20, 48),
+ PMC_POWERPC_EVENT(BUS_RETRY_DUE_TO_COLLISION, 0x20, 49),
+ PMC_POWERPC_EVENT(BUS_RETRY_DUE_TO_INTERVENTION_ORDERING, 0x20, 50),
+ PMC_POWERPC_EVENT(SNOOP_REQUESTS, 0x20, 51),
+ PMC_POWERPC_EVENT(PREFETCH_ENGINE_REQUEST, 0x20, 52),
+ PMC_POWERPC_EVENT(PREFETCH_ENGINE_COLLISION_VS_LOAD, 0x20, 53),
+ PMC_POWERPC_EVENT(PREFETCH_ENGINE_COLLISION_VS_STORE, 0x20, 54),
+ PMC_POWERPC_EVENT(PREFETCH_ENGINE_COLLISION_VS_INSTR_FETCH, 0x20, 55),
+ PMC_POWERPC_EVENT(PREFETCH_ENGINE_COLLISION_VS_LOAD_STORE_INSTR_FETCH, 0x20, 56),
+ PMC_POWERPC_EVENT(PREFETCH_ENGINE_FULL, 0x20, 57)
+};
+
+const size_t powerpc_event_codes_size =
+ sizeof(powerpc_event_codes) / sizeof(powerpc_event_codes[0]);
int
pmc_save_kernel_callchain(uintptr_t *cc, int maxsamples,
@@ -55,6 +333,515 @@ pmc_save_kernel_callchain(uintptr_t *cc, int maxsamples,
return (0);
}
+static pmc_value_t
+powerpc_pmcn_read(unsigned int pmc)
+{
+ switch (pmc) {
+ case 0:
+ return mfspr(SPR_PMC1);
+ break;
+ case 1:
+ return mfspr(SPR_PMC2);
+ break;
+ case 2:
+ return mfspr(SPR_PMC3);
+ break;
+ case 3:
+ return mfspr(SPR_PMC4);
+ break;
+ case 4:
+ return mfspr(SPR_PMC5);
+ break;
+ case 5:
+ return mfspr(SPR_PMC6);
+ default:
+ panic("Invalid PMC number: %d\n", pmc);
+ }
+}
+
+static void
+powerpc_pmcn_write(unsigned int pmc, uint32_t val)
+{
+ switch (pmc) {
+ case 0:
+ mtspr(SPR_PMC1, val);
+ break;
+ case 1:
+ mtspr(SPR_PMC2, val);
+ break;
+ case 2:
+ mtspr(SPR_PMC3, val);
+ break;
+ case 3:
+ mtspr(SPR_PMC4, val);
+ break;
+ case 4:
+ mtspr(SPR_PMC5, val);
+ break;
+ case 5:
+ mtspr(SPR_PMC6, val);
+ break;
+ default:
+ panic("Invalid PMC number: %d\n", pmc);
+ }
+}
+
+static int
+powerpc_allocate_pmc(int cpu, int ri, struct pmc *pm,
+ const struct pmc_op_pmcallocate *a)
+{
+ enum pmc_event pe;
+ uint32_t caps, config, counter;
+ int i;
+
+ KASSERT(cpu >= 0 && cpu < pmc_cpu_max(),
+ ("[powerpc,%d] illegal CPU value %d", __LINE__, cpu));
+ KASSERT(ri >= 0 && ri < PPC_MAX_PMCS,
+ ("[powerpc,%d] illegal row index %d", __LINE__, ri));
+
+ caps = a->pm_caps;
+
+ /*
+ * TODO: Check actual class for different generations.
+ */
+ if (a->pm_class != PMC_CLASS_PPC7450)
+ return (EINVAL);
+ pe = a->pm_ev;
+ for (i = 0; i < powerpc_event_codes_size; i++) {
+ if (powerpc_event_codes[i].pe_ev == pe) {
+ config = powerpc_event_codes[i].pe_code;
+ counter = powerpc_event_codes[i].pe_counter_mask;
+ break;
+ }
+ }
+ if (i == powerpc_event_codes_size)
+ return (EINVAL);
+
+ if ((counter & (1 << ri)) == 0)
+ return (EINVAL);
+
+ if (caps & PMC_CAP_SYSTEM)
+ config |= POWERPC_PMC_KERNEL_ENABLE;
+ if (caps & PMC_CAP_USER)
+ config |= POWERPC_PMC_USER_ENABLE;
+ if ((caps & (PMC_CAP_USER | PMC_CAP_SYSTEM)) == 0)
+ config |= POWERPC_PMC_ENABLE;
+
+ pm->pm_md.pm_powerpc.pm_powerpc_evsel = config;
+
+ PMCDBG(MDP,ALL,2,"powerpc-allocate ri=%d -> config=0x%x", ri, config);
+
+ return 0;
+}
+
+static int
+powerpc_read_pmc(int cpu, int ri, pmc_value_t *v)
+{
+ struct pmc *pm;
+ pmc_value_t tmp;
+
+ KASSERT(cpu >= 0 && cpu < pmc_cpu_max(),
+ ("[powerpc,%d] illegal CPU value %d", __LINE__, cpu));
+ KASSERT(ri >= 0 && ri < PPC_MAX_PMCS,
+ ("[powerpc,%d] illegal row index %d", __LINE__, ri));
+
+ pm = powerpc_pcpu[cpu]->pc_ppcpmcs[ri].phw_pmc;
+ tmp = powerpc_pmcn_read(ri);
+ PMCDBG(MDP,REA,2,"ppc-read id=%d -> %jd", ri, tmp);
+ if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm)))
+ *v = POWERPC_PERFCTR_VALUE_TO_RELOAD_COUNT(tmp);
+ else
+ *v = tmp;
+
+ return 0;
+}
+
+static int
+powerpc_write_pmc(int cpu, int ri, pmc_value_t v)
+{
+ struct pmc *pm;
+
+ KASSERT(cpu >= 0 && cpu < pmc_cpu_max(),
+ ("[powerpc,%d] illegal CPU value %d", __LINE__, cpu));
+ KASSERT(ri >= 0 && ri < PPC_MAX_PMCS,
+ ("[powerpc,%d] illegal row-index %d", __LINE__, ri));
+
+ pm = powerpc_pcpu[cpu]->pc_ppcpmcs[ri].phw_pmc;
+
+ if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm)))
+ v = POWERPC_RELOAD_COUNT_TO_PERFCTR_VALUE(v);
+
+ PMCDBG(MDP,WRI,1,"powerpc-write cpu=%d ri=%d v=%jx", cpu, ri, v);
+
+ powerpc_pmcn_write(ri, v);
+
+ return 0;
+}
+
+static int
+powerpc_config_pmc(int cpu, int ri, struct pmc *pm)
+{
+ struct pmc_hw *phw;
+
+ PMCDBG(MDP,CFG,1, "cpu=%d ri=%d pm=%p", cpu, ri, pm);
+
+ KASSERT(cpu >= 0 && cpu < pmc_cpu_max(),
+ ("[powerpc,%d] illegal CPU value %d", __LINE__, cpu));
+ KASSERT(ri >= 0 && ri < PPC_MAX_PMCS,
+ ("[powerpc,%d] illegal row-index %d", __LINE__, ri));
+
+ phw = &powerpc_pcpu[cpu]->pc_ppcpmcs[ri];
+
+ KASSERT(pm == NULL || phw->phw_pmc == NULL,
+ ("[powerpc,%d] pm=%p phw->pm=%p hwpmc not unconfigured",
+ __LINE__, pm, phw->phw_pmc));
+
+ phw->phw_pmc = pm;
+
+ return 0;
+}
+
+static int
+powerpc_start_pmc(int cpu, int ri)
+{
+ uint32_t config;
+ struct pmc *pm;
+ struct pmc_hw *phw;
+ register_t pmc_mmcr;
+
+ phw = &powerpc_pcpu[cpu]->pc_ppcpmcs[ri];
+ pm = phw->phw_pmc;
+ config = pm->pm_md.pm_powerpc.pm_powerpc_evsel & ~POWERPC_PMC_ENABLE;
+
+ /* Enable the PMC. */
+ switch (ri) {
+ case 0:
+ pmc_mmcr = mfspr(SPR_MMCR0);
+ pmc_mmcr = PPC_SET_PMC1SEL(pmc_mmcr, config);
+ mtspr(SPR_MMCR0, pmc_mmcr);
+ break;
+ case 1:
+ pmc_mmcr = mfspr(SPR_MMCR0);
+ pmc_mmcr = PPC_SET_PMC2SEL(pmc_mmcr, config);
+ mtspr(SPR_MMCR0, pmc_mmcr);
+ break;
+ case 2:
+ pmc_mmcr = mfspr(SPR_MMCR1);
+ pmc_mmcr = PPC_SET_PMC3SEL(pmc_mmcr, config);
+ mtspr(SPR_MMCR1, pmc_mmcr);
+ break;
+ case 3:
+ pmc_mmcr = mfspr(SPR_MMCR0);
+ pmc_mmcr = PPC_SET_PMC4SEL(pmc_mmcr, config);
+ mtspr(SPR_MMCR0, pmc_mmcr);
+ break;
+ case 4:
+ pmc_mmcr = mfspr(SPR_MMCR1);
+ pmc_mmcr = PPC_SET_PMC5SEL(pmc_mmcr, config);
+ mtspr(SPR_MMCR1, pmc_mmcr);
+ break;
+ case 5:
+ pmc_mmcr = mfspr(SPR_MMCR1);
+ pmc_mmcr = PPC_SET_PMC6SEL(pmc_mmcr, config);
+ mtspr(SPR_MMCR1, pmc_mmcr);
+ break;
+ default:
+ break;
+ }
+
+ /* The mask is inverted (enable is 1) compared to the flags in MMCR0, which
+ * are Freeze flags.
+ */
+ config = ~pm->pm_md.pm_powerpc.pm_powerpc_evsel & POWERPC_PMC_ENABLE;
+
+ pmc_mmcr = mfspr(SPR_MMCR0);
+ pmc_mmcr &= ~SPR_MMCR0_FC;
+ pmc_mmcr |= config;
+ mtspr(SPR_MMCR0, pmc_mmcr);
+
+ return 0;
+}
+
+static int
+powerpc_stop_pmc(int cpu, int ri)
+{
+ struct pmc *pm;
+ struct pmc_hw *phw;
+ register_t pmc_mmcr;
+
+ phw = &powerpc_pcpu[cpu]->pc_ppcpmcs[ri];
+ pm = phw->phw_pmc;
+
+ /*
+ * Disable the PMCs.
+ */
+ switch (ri) {
+ case 0:
+ pmc_mmcr = mfspr(SPR_MMCR0);
+ pmc_mmcr = PPC_SET_PMC1SEL(pmc_mmcr, 0);
+ mtspr(SPR_MMCR0, pmc_mmcr);
+ break;
+ case 1:
+ pmc_mmcr = mfspr(SPR_MMCR0);
+ pmc_mmcr = PPC_SET_PMC2SEL(pmc_mmcr, 0);
+ mtspr(SPR_MMCR0, pmc_mmcr);
+ break;
+ case 2:
+ pmc_mmcr = mfspr(SPR_MMCR1);
+ pmc_mmcr = PPC_SET_PMC3SEL(pmc_mmcr, 0);
+ mtspr(SPR_MMCR1, pmc_mmcr);
+ break;
+ case 3:
+ pmc_mmcr = mfspr(SPR_MMCR0);
+ pmc_mmcr = PPC_SET_PMC4SEL(pmc_mmcr, 0);
+ mtspr(SPR_MMCR0, pmc_mmcr);
+ break;
+ case 4:
+ pmc_mmcr = mfspr(SPR_MMCR1);
+ pmc_mmcr = PPC_SET_PMC5SEL(pmc_mmcr, 0);
+ mtspr(SPR_MMCR1, pmc_mmcr);
+ break;
+ case 5:
+ pmc_mmcr = mfspr(SPR_MMCR1);
+ pmc_mmcr = PPC_SET_PMC6SEL(pmc_mmcr, 0);
+ mtspr(SPR_MMCR1, pmc_mmcr);
+ break;
+ default:
+ break;
+ }
+ return 0;
+}
+
+static int
+powerpc_release_pmc(int cpu, int ri, struct pmc *pmc)
+{
+ struct pmc_hw *phw;
+
+ KASSERT(cpu >= 0 && cpu < pmc_cpu_max(),
+ ("[powerpc,%d] illegal CPU value %d", __LINE__, cpu));
+ KASSERT(ri >= 0 && ri < PPC_MAX_PMCS,
+ ("[powerpc,%d] illegal row-index %d", __LINE__, ri));
+
+ phw = &powerpc_pcpu[cpu]->pc_ppcpmcs[ri];
+ KASSERT(phw->phw_pmc == NULL,
+ ("[powerpc,%d] PHW pmc %p non-NULL", __LINE__, phw->phw_pmc));
+
+ return 0;
+}
+
+static int
+powerpc_switch_in(struct pmc_cpu *pc, struct pmc_process *pp)
+{
+ return 0;
+}
+
+static int
+powerpc_switch_out(struct pmc_cpu *pc, struct pmc_process *pp)
+{
+ return 0;
+}
+
+static int
+powerpc_intr(int cpu, struct trapframe *tf)
+{
+ int i, error, retval;
+ uint32_t config;
+ struct pmc *pm;
+ struct powerpc_cpu *pac;
+ pmc_value_t v;
+
+ KASSERT(cpu >= 0 && cpu < pmc_cpu_max(),
+ ("[powerpc,%d] out of range CPU %d", __LINE__, cpu));
+
+ PMCDBG(MDP,INT,1, "cpu=%d tf=%p um=%d", cpu, (void *) tf,
+ TRAPF_USERMODE(tf));
+
+ retval = 0;
+
+ pac = powerpc_pcpu[cpu];
+
+ /*
+ * look for all PMCs that have interrupted:
+ * - look for a running, sampling PMC which has overflowed
+ * and which has a valid 'struct pmc' association
+ *
+ * If found, we call a helper to process the interrupt.
+ */
+
+ for (i = 0; i < PPC_MAX_PMCS; i++) {
+ if ((pm = pac->pc_ppcpmcs[i].phw_pmc) == NULL ||
+ !PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) {
+ continue;
+ }
+
+ if (!POWERPC_PMC_HAS_OVERFLOWED(i))
+ continue;
+
+ retval = 1; /* Found an interrupting PMC. */
+
+ if (pm->pm_state != PMC_STATE_RUNNING)
+ continue;
+
+ /* Stop the PMC, reload count. */
+ v = pm->pm_sc.pm_reloadcount;
+ config = mfspr(SPR_MMCR0);
+
+ mtspr(SPR_MMCR0, config | SPR_MMCR0_FC);
+ powerpc_pmcn_write(i, v);
+
+ /* Restart the counter if logging succeeded. */
+ error = pmc_process_interrupt(cpu, pm, tf, TRAPF_USERMODE(tf));
+ mtspr(SPR_MMCR0, config);
+ if (error != 0)
+ powerpc_stop_pmc(cpu, i);
+ atomic_add_int(retval ? &pmc_stats.pm_intr_processed :
+ &pmc_stats.pm_intr_ignored, 1);
+
+ }
+
+ /* Re-enable PERF exceptions. */
+ mtspr(SPR_MMCR0, mfspr(SPR_MMCR0) | SPR_MMCR0_PMXE);
+
+ return (retval);
+}
+
+static int
+powerpc_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc)
+{
+ int error;
+ struct pmc_hw *phw;
+ char powerpc_name[PMC_NAME_MAX];
+
+ KASSERT(cpu >= 0 && cpu < pmc_cpu_max(),
+ ("[powerpc,%d], illegal CPU %d", __LINE__, cpu));
+ KASSERT(ri >= 0 && ri < PPC_MAX_PMCS,
+ ("[powerpc,%d] row-index %d out of range", __LINE__, ri));
+
+ phw = &powerpc_pcpu[cpu]->pc_ppcpmcs[ri];
+ snprintf(powerpc_name, sizeof(powerpc_name), "POWERPC-%d", ri);
+ if ((error = copystr(powerpc_name, pi->pm_name, PMC_NAME_MAX,
+ NULL)) != 0)
+ return error;
+ pi->pm_class = PMC_CLASS_PPC7450;
+ if (phw->phw_state & PMC_PHW_FLAG_IS_ENABLED) {
+ pi->pm_enabled = TRUE;
+ *ppmc = phw->phw_pmc;
+ } else {
+ pi->pm_enabled = FALSE;
+ *ppmc = NULL;
+ }
+
+ return (0);
+}
+
+static int
+powerpc_get_config(int cpu, int ri, struct pmc **ppm)
+{
+ *ppm = powerpc_pcpu[cpu]->pc_ppcpmcs[ri].phw_pmc;
+
+ return 0;
+}
+
+static int
+powerpc_pcpu_init(struct pmc_mdep *md, int cpu)
+{
+ int first_ri, i;
+ struct pmc_cpu *pc;
+ struct powerpc_cpu *pac;
+ struct pmc_hw *phw;
+
+ KASSERT(cpu >= 0 && cpu < pmc_cpu_max(),
+ ("[powerpc,%d] wrong cpu number %d", __LINE__, cpu));
+ PMCDBG(MDP,INI,1,"powerpc-init cpu=%d", cpu);
+
+ powerpc_pcpu[cpu] = pac = malloc(sizeof(struct powerpc_cpu), M_PMC,
+ M_WAITOK|M_ZERO);
+ pac->pc_ppcpmcs = malloc(sizeof(struct pmc_hw) * PPC_MAX_PMCS,
+ M_PMC, M_WAITOK|M_ZERO);
+ pc = pmc_pcpu[cpu];
+ first_ri = md->pmd_classdep[PMC_MDEP_CLASS_INDEX_PPC7450].pcd_ri;
+ KASSERT(pc != NULL, ("[powerpc,%d] NULL per-cpu pointer", __LINE__));
+
+ for (i = 0, phw = pac->pc_ppcpmcs; i < PPC_MAX_PMCS; i++, phw++) {
+ phw->phw_state = PMC_PHW_FLAG_IS_ENABLED |
+ PMC_PHW_CPU_TO_STATE(cpu) | PMC_PHW_INDEX_TO_STATE(i);
+ phw->phw_pmc = NULL;
+ pc->pc_hwpmcs[i + first_ri] = phw;
+ }
+
+ /* Clear the MMCRs, and set FC, to disable all PMCs. */
+ mtspr(SPR_MMCR0, SPR_MMCR0_FC | SPR_MMCR0_PMXE | SPR_MMCR0_PMC1CE | SPR_MMCR0_PMCNCE);
+ mtspr(SPR_MMCR1, 0);
+
+ return 0;
+}
+
+static int
+powerpc_pcpu_fini(struct pmc_mdep *md, int cpu)
+{
+ uint32_t mmcr0 = mfspr(SPR_MMCR0);
+
+ mmcr0 |= SPR_MMCR0_FC;
+ mtspr(SPR_MMCR0, mmcr0);
+ free(powerpc_pcpu[cpu]->pc_ppcpmcs, M_PMC);
+ free(powerpc_pcpu[cpu], M_PMC);
+ return 0;
+}
+
+struct pmc_mdep *
+pmc_md_initialize()
+{
+ struct pmc_mdep *pmc_mdep;
+ struct pmc_classdep *pcd;
+
+ /*
+ * Allocate space for pointers to PMC HW descriptors and for
+ * the MDEP structure used by MI code.
+ */
+ powerpc_pcpu = malloc(sizeof(struct powerpc_cpu *) * pmc_cpu_max(), M_PMC,
+ M_WAITOK|M_ZERO);
+
+ /* Just one class */
+ pmc_mdep = malloc(sizeof(struct pmc_mdep) + sizeof(struct pmc_classdep),
+ M_PMC, M_WAITOK|M_ZERO);
+
+ pmc_mdep->pmd_cputype = PMC_CPU_PPC_7450;
+ pmc_mdep->pmd_nclass = 1;
+
+ pcd = &pmc_mdep->pmd_classdep[PMC_MDEP_CLASS_INDEX_PPC7450];
+ pcd->pcd_caps = POWERPC_PMC_CAPS;
+ pcd->pcd_class = PMC_CLASS_PPC7450;
+ pcd->pcd_num = PPC_MAX_PMCS;
+ pcd->pcd_ri = pmc_mdep->pmd_npmc;
+ pcd->pcd_width = 32; /* All PMCs, even in ppc970, are 32-bit */
+
+ pcd->pcd_allocate_pmc = powerpc_allocate_pmc;
+ pcd->pcd_config_pmc = powerpc_config_pmc;
+ pcd->pcd_pcpu_fini = powerpc_pcpu_fini;
+ pcd->pcd_pcpu_init = powerpc_pcpu_init;
+ pcd->pcd_describe = powerpc_describe;
+ pcd->pcd_get_config = powerpc_get_config;
+ pcd->pcd_read_pmc = powerpc_read_pmc;
+ pcd->pcd_release_pmc = powerpc_release_pmc;
+ pcd->pcd_start_pmc = powerpc_start_pmc;
+ pcd->pcd_stop_pmc = powerpc_stop_pmc;
+ pcd->pcd_write_pmc = powerpc_write_pmc;
+
+ pmc_mdep->pmd_intr = powerpc_intr;
+ pmc_mdep->pmd_switch_in = powerpc_switch_in;
+ pmc_mdep->pmd_switch_out = powerpc_switch_out;
+
+ pmc_mdep->pmd_npmc += PPC_MAX_PMCS;
+
+ return (pmc_mdep);
+}
+
+void
+pmc_md_finalize(struct pmc_mdep *md)
+{
+ free(md, M_PMC);
+}
+
int
pmc_save_user_callchain(uintptr_t *cc, int maxsamples,
struct trapframe *tf)
diff --git a/sys/dev/hwpmc/hwpmc_uncore.c b/sys/dev/hwpmc/hwpmc_uncore.c
index 36cd95c..9a6e739 100644
--- a/sys/dev/hwpmc/hwpmc_uncore.c
+++ b/sys/dev/hwpmc/hwpmc_uncore.c
@@ -545,8 +545,14 @@ static struct ucp_event_descr ucp_events[] = {
UCPDESCR(0CH_01H, 0x0C, 0x01, UCP_F_FM | UCP_F_WM),
UCPDESCR(0CH_02H, 0x0C, 0x02, UCP_F_FM | UCP_F_WM),
- UCPDESCR(0CH_04H, 0x0C, 0x04, UCP_F_FM | UCP_F_WM),
- UCPDESCR(0CH_08H, 0x0C, 0x08, UCP_F_FM | UCP_F_WM),
+ UCPDESCR(0CH_04H_E, 0x0C, 0x04, UCP_F_FM | UCP_F_WM),
+ UCPDESCR(0CH_04H_F, 0x0C, 0x04, UCP_F_FM | UCP_F_WM),
+ UCPDESCR(0CH_04H_M, 0x0C, 0x04, UCP_F_FM | UCP_F_WM),
+ UCPDESCR(0CH_04H_S, 0x0C, 0x04, UCP_F_FM | UCP_F_WM),
+ UCPDESCR(0CH_08H_E, 0x0C, 0x08, UCP_F_FM | UCP_F_WM),
+ UCPDESCR(0CH_08H_F, 0x0C, 0x08, UCP_F_FM | UCP_F_WM),
+ UCPDESCR(0CH_08H_M, 0x0C, 0x08, UCP_F_FM | UCP_F_WM),
+ UCPDESCR(0CH_08H_S, 0x0C, 0x08, UCP_F_FM | UCP_F_WM),
UCPDESCR(20H_01H, 0x20, 0x01, UCP_F_FM | UCP_F_I7 | UCP_F_WM),
UCPDESCR(20H_02H, 0x20, 0x02, UCP_F_FM | UCP_F_I7 | UCP_F_WM),
@@ -965,6 +971,28 @@ ucp_start_pmc(int cpu, int ri)
PMCDBG(MDP,STA,2, "ucp-start/2 cpu=%d ri=%d evselmsr=0x%x evsel=0x%x",
cpu, ri, UCP_EVSEL0 + ri, evsel);
+ /* Event specific configuration. */
+ switch (pm->pm_event) {
+ case PMC_EV_UCP_EVENT_0CH_04H_E:
+ case PMC_EV_UCP_EVENT_0CH_08H_E:
+ wrmsr(MSR_GQ_SNOOP_MESF,0x2);
+ break;
+ case PMC_EV_UCP_EVENT_0CH_04H_F:
+ case PMC_EV_UCP_EVENT_0CH_08H_F:
+ wrmsr(MSR_GQ_SNOOP_MESF,0x8);
+ break;
+ case PMC_EV_UCP_EVENT_0CH_04H_M:
+ case PMC_EV_UCP_EVENT_0CH_08H_M:
+ wrmsr(MSR_GQ_SNOOP_MESF,0x1);
+ break;
+ case PMC_EV_UCP_EVENT_0CH_04H_S:
+ case PMC_EV_UCP_EVENT_0CH_08H_S:
+ wrmsr(MSR_GQ_SNOOP_MESF,0x4);
+ break;
+ default:
+ break;
+ }
+
wrmsr(UCP_EVSEL0 + ri, evsel);
do {
diff --git a/sys/dev/hwpmc/hwpmc_uncore.h b/sys/dev/hwpmc/hwpmc_uncore.h
index 2be34db..6c3b4cf 100644
--- a/sys/dev/hwpmc/hwpmc_uncore.h
+++ b/sys/dev/hwpmc/hwpmc_uncore.h
@@ -92,6 +92,12 @@ struct pmc_md_ucp_op_pmcallocate {
#define UC_GLOBAL_CTRL_FLAG_FRZ (1ULL << 63)
#define UC_GLOBAL_CTRL_FLAG_ENPMICORE0 (1ULL << 48)
+/*
+ * Model specific registers.
+ */
+
+#define MSR_GQ_SNOOP_MESF 0x301
+
struct pmc_md_ucf_pmc {
uint64_t pm_ucf_ctrl;
};
diff --git a/sys/dev/hwpmc/pmc_events.h b/sys/dev/hwpmc/pmc_events.h
index 9fcf926..095e79c 100644
--- a/sys/dev/hwpmc/pmc_events.h
+++ b/sys/dev/hwpmc/pmc_events.h
@@ -1669,7 +1669,7 @@ __PMC_EV_ALIAS("X87_OPS_RETIRED.FXCH", IAP_EVENT_C1H_01H)
/*
* Core i7 and Xeon 5500 events removed between 253669-031US June 2009
- * and 253669-033US December 2009.
+ * and 253669-040US October 2011.
*/
#define __PMC_EV_ALIAS_COREI7_OLD() \
__PMC_EV_ALIAS("SB_FORWARD.ANY", IAP_EVENT_02H_01H) \
@@ -1682,6 +1682,7 @@ __PMC_EV_ALIAS("MISALIGN_MEM_REF.ANY", IAP_EVENT_05H_03H) \
__PMC_EV_ALIAS("STORE_BLOCKS.NOT_STA", IAP_EVENT_06H_01H) \
__PMC_EV_ALIAS("STORE_BLOCKS.STA", IAP_EVENT_06H_02H) \
__PMC_EV_ALIAS("STORE_BLOCKS.ANY", IAP_EVENT_06H_0FH) \
+__PMC_EV_ALIAS("DTLB_LOAD_MISSES.PDP_MISS", IAP_EVENT_08H_40H) \
__PMC_EV_ALIAS("MEMORY_DISAMBIGURATION.RESET", IAP_EVENT_09H_01H) \
__PMC_EV_ALIAS("MEMORY_DISAMBIGURATION.SUCCESS", IAP_EVENT_09H_02H) \
__PMC_EV_ALIAS("MEMORY_DISAMBIGURATION.WATCHDOG", IAP_EVENT_09H_04H) \
@@ -1693,9 +1694,8 @@ __PMC_EV_ALIAS("L2_WRITE.RFO.E_STATE", IAP_EVENT_27H_04H) \
__PMC_EV_ALIAS("UOPS_DECODED.DEC0", IAP_EVENT_3DH_01H) \
__PMC_EV_ALIAS("L1D_CACHE_ST.I_STATE", IAP_EVENT_41H_01H) \
__PMC_EV_ALIAS("L1D_CACHE_ST.MESI", IAP_EVENT_41H_0FH) \
-__PMC_EV_ALIAS("DTLB_MISSES.PDE_MISS", IAP_EVENT_49H_20H) \
+__PMC_EV_ALIAS("L1D_PEND_MISS.LOAD_BUFFERS_FULL", IAP_EVENT_48H_02H) \
__PMC_EV_ALIAS("DTLB_MISSES.PDP_MISS", IAP_EVENT_49H_40H) \
-__PMC_EV_ALIAS("DTLB_MISSES.LARGE_WALK_COMPLETED", IAP_EVENT_49H_80H) \
__PMC_EV_ALIAS("SSE_MEM_EXEC.NTA", IAP_EVENT_4BH_01H) \
__PMC_EV_ALIAS("SSE_MEM_EXEC.STREAMING_STORES", IAP_EVENT_4BH_08H) \
__PMC_EV_ALIAS("SFENCE_CYCLES", IAP_EVENT_4DH_01H) \
@@ -1734,6 +1734,7 @@ __PMC_EV_ALIAS("PIC_ACCESSES.TPR_READS", IAP_EVENT_BAH_01H) \
__PMC_EV_ALIAS("PIC_ACCESSES.TPR_WRITES", IAP_EVENT_BAH_02H) \
__PMC_EV_ALIAS("MACHINE_CLEARS.FUSION_ASSIST", IAP_EVENT_C3H_10H) \
__PMC_EV_ALIAS("BOGUS_BR", IAP_EVENT_E4H_01H) \
+__PMC_EV_ALIAS("BPU_CLEARS.ANY", IAP_EVENT_E8H_03H) \
__PMC_EV_ALIAS("L2_HW_PREFETCH.HIT", IAP_EVENT_F3H_01H) \
__PMC_EV_ALIAS("L2_HW_PREFETCH.ALLOC", IAP_EVENT_F3H_02H) \
__PMC_EV_ALIAS("L2_HW_PREFETCH.DATA_TRIGGER", IAP_EVENT_F3H_04H) \
@@ -1759,7 +1760,6 @@ __PMC_EV_ALIAS("DTLB_LOAD_MISSES.ANY", IAP_EVENT_08H_01H) \
__PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_COMPLETED", IAP_EVENT_08H_02H) \
__PMC_EV_ALIAS("DTLB_LOAD_MISSES.STLB_HIT", IAP_EVENT_08H_10H) \
__PMC_EV_ALIAS("DTLB_LOAD_MISSES.PDE_MISS", IAP_EVENT_08H_20H) \
-__PMC_EV_ALIAS("DTLB_LOAD_MISSES.PDP_MISS", IAP_EVENT_08H_40H) \
__PMC_EV_ALIAS("DTLB_LOAD_MISSES.LARGE_WALK_COMPLETED", \
IAP_EVENT_08H_80H) \
__PMC_EV_ALIAS("MEM_INST_RETIRED.LOADS", IAP_EVENT_0BH_01H) \
@@ -1867,10 +1867,11 @@ __PMC_EV_ALIAS("L1D_CACHE_LOCK.E_STATE", IAP_EVENT_42H_04H) \
__PMC_EV_ALIAS("L1D_CACHE_LOCK.M_STATE", IAP_EVENT_42H_08H) \
__PMC_EV_ALIAS("L1D_ALL_REF.ANY", IAP_EVENT_43H_01H) \
__PMC_EV_ALIAS("L1D_ALL_REF.CACHEABLE", IAP_EVENT_43H_02H) \
-__PMC_EV_ALIAS("L1D_PEND_MISS.LOAD_BUFFERS_FULL", IAP_EVENT_48H_02H) \
__PMC_EV_ALIAS("DTLB_MISSES.ANY", IAP_EVENT_49H_01H) \
__PMC_EV_ALIAS("DTLB_MISSES.WALK_COMPLETED", IAP_EVENT_49H_02H) \
__PMC_EV_ALIAS("DTLB_MISSES.STLB_HIT", IAP_EVENT_49H_10H) \
+__PMC_EV_ALIAS("DTLB_MISSES.PDE_MISS", IAP_EVENT_49H_20H) \
+__PMC_EV_ALIAS("DTLB_MISSES.LARGE_WALK_COMPLETED", IAP_EVENT_49H_80H) \
__PMC_EV_ALIAS("LOAD_HIT_PRE", IAP_EVENT_4CH_01H) \
__PMC_EV_ALIAS("L1D_PREFETCH.REQUESTS", IAP_EVENT_4EH_01H) \
__PMC_EV_ALIAS("L1D_PREFETCH.MISS", IAP_EVENT_4EH_02H) \
@@ -1996,7 +1997,6 @@ __PMC_EV_ALIAS("BACLEAR.CLEAR", IAP_EVENT_E6H_01H) \
__PMC_EV_ALIAS("BACLEAR.BAD_TARGET", IAP_EVENT_E6H_02H) \
__PMC_EV_ALIAS("BPU_CLEARS.EARLY", IAP_EVENT_E8H_01H) \
__PMC_EV_ALIAS("BPU_CLEARS.LATE", IAP_EVENT_E8H_02H) \
-__PMC_EV_ALIAS("BPU_CLEARS.ANY", IAP_EVENT_E8H_03H) \
__PMC_EV_ALIAS("L2_TRANSACTIONS.LOAD", IAP_EVENT_F0H_01H) \
__PMC_EV_ALIAS("L2_TRANSACTIONS.RFO", IAP_EVENT_F0H_02H) \
__PMC_EV_ALIAS("L2_TRANSACTIONS.IFETCH", IAP_EVENT_F0H_04H) \
@@ -2388,8 +2388,14 @@ __PMC_EV(UCP, EVENT_0BH_10H) \
__PMC_EV(UCP, EVENT_0BH_1FH) \
__PMC_EV(UCP, EVENT_0CH_01H) \
__PMC_EV(UCP, EVENT_0CH_02H) \
-__PMC_EV(UCP, EVENT_0CH_04H) \
-__PMC_EV(UCP, EVENT_0CH_08H) \
+__PMC_EV(UCP, EVENT_0CH_04H_E) \
+__PMC_EV(UCP, EVENT_0CH_04H_F) \
+__PMC_EV(UCP, EVENT_0CH_04H_M) \
+__PMC_EV(UCP, EVENT_0CH_04H_S) \
+__PMC_EV(UCP, EVENT_0CH_08H_E) \
+__PMC_EV(UCP, EVENT_0CH_08H_F) \
+__PMC_EV(UCP, EVENT_0CH_08H_M) \
+__PMC_EV(UCP, EVENT_0CH_08H_S) \
__PMC_EV(UCP, EVENT_20H_01H) \
__PMC_EV(UCP, EVENT_20H_02H) \
__PMC_EV(UCP, EVENT_20H_04H) \
@@ -2789,8 +2795,14 @@ __PMC_EV_ALIAS("L3_LINES_OUT.F_STATE", UCP_EVENT_0BH_10H) \
__PMC_EV_ALIAS("L3_LINES_OUT.ANY", UCP_EVENT_0BH_1FH) \
__PMC_EV_ALIAS("GQ_SNOOP.GOTO_S", UCP_EVENT_0CH_01H) \
__PMC_EV_ALIAS("GQ_SNOOP.GOTO_I", UCP_EVENT_0CH_02H) \
-__PMC_EV_ALIAS("GQ_SNOOP.GOTO_S_HIT", UCP_EVENT_0CH_04H) \
-__PMC_EV_ALIAS("GQ_SNOOP.GOTO_I_HIT", UCP_EVENT_0CH_08H) \
+__PMC_EV_ALIAS("GQ_SNOOP.GOTO_S_HIT_E", UCP_EVENT_0CH_04H_E) \
+__PMC_EV_ALIAS("GQ_SNOOP.GOTO_S_HIT_F", UCP_EVENT_0CH_04H_F) \
+__PMC_EV_ALIAS("GQ_SNOOP.GOTO_S_HIT_M", UCP_EVENT_0CH_04H_M) \
+__PMC_EV_ALIAS("GQ_SNOOP.GOTO_S_HIT_S", UCP_EVENT_0CH_04H_S) \
+__PMC_EV_ALIAS("GQ_SNOOP.GOTO_I_HIT_E", UCP_EVENT_0CH_08H_E) \
+__PMC_EV_ALIAS("GQ_SNOOP.GOTO_I_HIT_F", UCP_EVENT_0CH_08H_F) \
+__PMC_EV_ALIAS("GQ_SNOOP.GOTO_I_HIT_M", UCP_EVENT_0CH_08H_M) \
+__PMC_EV_ALIAS("GQ_SNOOP.GOTO_I_HIT_S", UCP_EVENT_0CH_08H_S) \
__PMC_EV_ALIAS("QHL_REQUESTS.IOH_READS", UCP_EVENT_20H_01H) \
__PMC_EV_ALIAS("QHL_REQUESTS.IOH_WRITES", UCP_EVENT_20H_02H) \
__PMC_EV_ALIAS("QHL_REQUESTS.REMOTE_READS", UCP_EVENT_20H_04H) \
@@ -3093,6 +3105,231 @@ __PMC_EV_ALIAS("CYCLES_UNHALTED_L3_FLL_DISABLE", UCP_EVENT_86H_01H)
#define PMC_EV_MIPS24K_FIRST PMC_EV_MIPS24K_CYCLE
#define PMC_EV_MIPS24K_LAST PMC_EV_MIPS24K_WBB_FULL_PIPELINE_STALLS
+#define __PMC_EV_PPC7450() \
+ __PMC_EV(PPC7450, CYCLE) \
+ __PMC_EV(PPC7450, INSTR_COMPLETED) \
+ __PMC_EV(PPC7450, TLB_BIT_TRANSITIONS) \
+ __PMC_EV(PPC7450, INSTR_DISPATCHED) \
+ __PMC_EV(PPC7450, PMON_EXCEPT) \
+ __PMC_EV(PPC7450, PMON_SIG) \
+ __PMC_EV(PPC7450, VPU_INSTR_COMPLETED) \
+ __PMC_EV(PPC7450, VFPU_INSTR_COMPLETED) \
+ __PMC_EV(PPC7450, VIU1_INSTR_COMPLETED) \
+ __PMC_EV(PPC7450, VIU2_INSTR_COMPLETED) \
+ __PMC_EV(PPC7450, MTVSCR_INSTR_COMPLETED) \
+ __PMC_EV(PPC7450, MTVRSAVE_INSTR_COMPLETED) \
+ __PMC_EV(PPC7450, VPU_INSTR_WAIT_CYCLES) \
+ __PMC_EV(PPC7450, VFPU_INSTR_WAIT_CYCLES) \
+ __PMC_EV(PPC7450, VIU1_INSTR_WAIT_CYCLES) \
+ __PMC_EV(PPC7450, VIU2_INSTR_WAIT_CYCLES) \
+ __PMC_EV(PPC7450, MFVSCR_SYNC_CYCLES) \
+ __PMC_EV(PPC7450, VSCR_SAT_SET) \
+ __PMC_EV(PPC7450, STORE_INSTR_COMPLETED) \
+ __PMC_EV(PPC7450, L1_INSTR_CACHE_MISSES) \
+ __PMC_EV(PPC7450, L1_DATA_SNOOPS) \
+ __PMC_EV(PPC7450, UNRESOLVED_BRANCHES) \
+ __PMC_EV(PPC7450, SPEC_BUFFER_CYCLES) \
+ __PMC_EV(PPC7450, BRANCH_UNIT_STALL_CYCLES) \
+ __PMC_EV(PPC7450, TRUE_BRANCH_TARGET_HITS) \
+ __PMC_EV(PPC7450, BRANCH_LINK_STAC_PREDICTED) \
+ __PMC_EV(PPC7450, GPR_ISSUE_QUEUE_DISPATCHES) \
+ __PMC_EV(PPC7450, CYCLES_THREE_INSTR_DISPATCHED) \
+ __PMC_EV(PPC7450, THRESHOLD_INSTR_QUEUE_ENTRIES_CYCLES) \
+ __PMC_EV(PPC7450, THRESHOLD_VEC_INSTR_QUEUE_ENTRIES_CYCLES) \
+ __PMC_EV(PPC7450, CYCLES_NO_COMPLETED_INSTRS) \
+ __PMC_EV(PPC7450, IU2_INSTR_COMPLETED) \
+ __PMC_EV(PPC7450, BRANCHES_COMPLETED) \
+ __PMC_EV(PPC7450, EIEIO_INSTR_COMPLETED) \
+ __PMC_EV(PPC7450, MTSPR_INSTR_COMPLETED) \
+ __PMC_EV(PPC7450, SC_INSTR_COMPLETED) \
+ __PMC_EV(PPC7450, LS_LM_COMPLETED) \
+ __PMC_EV(PPC7450, ITLB_HW_TABLE_SEARCH_CYCLES) \
+ __PMC_EV(PPC7450, DTLB_HW_SEARCH_CYCLES_OVER_THRESHOLD) \
+ __PMC_EV(PPC7450, L1_INSTR_CACHE_ACCESSES) \
+ __PMC_EV(PPC7450, INSTR_BKPT_MATCHES) \
+ __PMC_EV(PPC7450, L1_DATA_CACHE_LOAD_MISS_CYCLES_OVER_THRESHOLD) \
+ __PMC_EV(PPC7450, L1_DATA_SNOOP_HIT_ON_MODIFIED) \
+ __PMC_EV(PPC7450, LOAD_MISS_ALIAS) \
+ __PMC_EV(PPC7450, LOAD_MISS_ALIAS_ON_TOUCH) \
+ __PMC_EV(PPC7450, TOUCH_ALIAS) \
+ __PMC_EV(PPC7450, L1_DATA_SNOOP_HIT_CASTOUT_QUEUE) \
+ __PMC_EV(PPC7450, L1_DATA_SNOOP_HIT_CASTOUT) \
+ __PMC_EV(PPC7450, L1_DATA_SNOOP_HITS) \
+ __PMC_EV(PPC7450, WRITE_THROUGH_STORES) \
+ __PMC_EV(PPC7450, CACHE_INHIBITED_STORES) \
+ __PMC_EV(PPC7450, L1_DATA_LOAD_HIT) \
+ __PMC_EV(PPC7450, L1_DATA_TOUCH_HIT) \
+ __PMC_EV(PPC7450, L1_DATA_STORE_HIT) \
+ __PMC_EV(PPC7450, L1_DATA_TOTAL_HITS) \
+ __PMC_EV(PPC7450, DST_INSTR_DISPATCHED) \
+ __PMC_EV(PPC7450, REFRESHED_DSTS) \
+ __PMC_EV(PPC7450, SUCCESSFUL_DST_TABLE_SEARCHES) \
+ __PMC_EV(PPC7450, DSS_INSTR_COMPLETED) \
+ __PMC_EV(PPC7450, DST_STREAM_0_CACHE_LINE_FETCHES) \
+ __PMC_EV(PPC7450, VTQ_SUSPENDS_DUE_TO_CTX_CHANGE) \
+ __PMC_EV(PPC7450, VTQ_LINE_FETCH_HIT) \
+ __PMC_EV(PPC7450, VEC_LOAD_INSTR_COMPLETED) \
+ __PMC_EV(PPC7450, FP_STORE_INSTR_COMPLETED_IN_LSU) \
+ __PMC_EV(PPC7450, FPU_RENORMALIZATION) \
+ __PMC_EV(PPC7450, FPU_DENORMALIZATION) \
+ __PMC_EV(PPC7450, FP_STORE_CAUSES_STALL_IN_LSU) \
+ __PMC_EV(PPC7450, LD_ST_TRUE_ALIAS_STALL) \
+ __PMC_EV(PPC7450, LSU_INDEXED_ALIAS_STALL) \
+ __PMC_EV(PPC7450, LSU_ALIAS_VS_FSQ_WB0_WB1) \
+ __PMC_EV(PPC7450, LSU_ALIAS_VS_CSQ) \
+ __PMC_EV(PPC7450, LSU_LOAD_HIT_LINE_ALIAS_VS_CSQ0) \
+ __PMC_EV(PPC7450, LSU_LOAD_MISS_LINE_ALIAS_VS_CSQ0) \
+ __PMC_EV(PPC7450, LSU_TOUCH_LINE_ALIAS_VS_FSQ_WB0_WB1) \
+ __PMC_EV(PPC7450, LSU_TOUCH_ALIAS_VS_CSQ) \
+ __PMC_EV(PPC7450, LSU_LMQ_FULL_STALL) \
+ __PMC_EV(PPC7450, FP_LOAD_INSTR_COMPLETED_IN_LSU) \
+ __PMC_EV(PPC7450, FP_LOAD_SINGLE_INSTR_COMPLETED_IN_LSU) \
+ __PMC_EV(PPC7450, FP_LOAD_DOUBLE_COMPLETED_IN_LSU) \
+ __PMC_EV(PPC7450, LSU_RA_LATCH_STALL) \
+ __PMC_EV(PPC7450, LSU_LOAD_VS_STORE_QUEUE_ALIAS_STALL) \
+ __PMC_EV(PPC7450, LSU_LMQ_INDEX_ALIAS) \
+ __PMC_EV(PPC7450, LSU_STORE_QUEUE_INDEX_ALIAS) \
+ __PMC_EV(PPC7450, LSU_CSQ_FORWARDING) \
+ __PMC_EV(PPC7450, LSU_MISALIGNED_LOAD_FINISH) \
+ __PMC_EV(PPC7450, LSU_MISALIGN_STORE_COMPLETED) \
+ __PMC_EV(PPC7450, LSU_MISALIGN_STALL) \
+ __PMC_EV(PPC7450, FP_ONE_QUARTER_FPSCR_RENAMES_BUSY) \
+ __PMC_EV(PPC7450, FP_ONE_HALF_FPSCR_RENAMES_BUSY) \
+ __PMC_EV(PPC7450, FP_THREE_QUARTERS_FPSCR_RENAMES_BUSY) \
+ __PMC_EV(PPC7450, FP_ALL_FPSCR_RENAMES_BUSY) \
+ __PMC_EV(PPC7450, FP_DENORMALIZED_RESULT) \
+ __PMC_EV(PPC7450, L1_DATA_TOTAL_MISSES) \
+ __PMC_EV(PPC7450, DISPATCHES_TO_FPR_ISSUE_QUEUE) \
+ __PMC_EV(PPC7450, LSU_INSTR_COMPLETED) \
+ __PMC_EV(PPC7450, LOAD_INSTR_COMPLETED) \
+ __PMC_EV(PPC7450, SS_SM_INSTR_COMPLETED) \
+ __PMC_EV(PPC7450, TLBIE_INSTR_COMPLETED) \
+ __PMC_EV(PPC7450, LWARX_INSTR_COMPLETED) \
+ __PMC_EV(PPC7450, MFSPR_INSTR_COMPLETED) \
+ __PMC_EV(PPC7450, REFETCH_SERIALIZATION) \
+ __PMC_EV(PPC7450, COMPLETION_QUEUE_ENTRIES_OVER_THRESHOLD) \
+ __PMC_EV(PPC7450, CYCLES_ONE_INSTR_DISPATCHED) \
+ __PMC_EV(PPC7450, CYCLES_TWO_INSTR_COMPLETED) \
+ __PMC_EV(PPC7450, ITLB_NON_SPECULATIVE_MISSES) \
+ __PMC_EV(PPC7450, CYCLES_WAITING_FROM_L1_INSTR_CACHE_MISS) \
+ __PMC_EV(PPC7450, L1_DATA_LOAD_ACCESS_MISS) \
+ __PMC_EV(PPC7450, L1_DATA_TOUCH_MISS) \
+ __PMC_EV(PPC7450, L1_DATA_STORE_MISS) \
+ __PMC_EV(PPC7450, L1_DATA_TOUCH_MISS_CYCLES) \
+ __PMC_EV(PPC7450, L1_DATA_CYCLES_USED) \
+ __PMC_EV(PPC7450, DST_STREAM_1_CACHE_LINE_FETCHES) \
+ __PMC_EV(PPC7450, VTQ_STREAM_CANCELED_PREMATURELY) \
+ __PMC_EV(PPC7450, VTQ_RESUMES_DUE_TO_CTX_CHANGE) \
+ __PMC_EV(PPC7450, VTQ_LINE_FETCH_MISS) \
+ __PMC_EV(PPC7450, VTQ_LINE_FETCH) \
+ __PMC_EV(PPC7450, TLBIE_SNOOPS) \
+ __PMC_EV(PPC7450, L1_INSTR_CACHE_RELOADS) \
+ __PMC_EV(PPC7450, L1_DATA_CACHE_RELOADS) \
+ __PMC_EV(PPC7450, L1_DATA_CACHE_CASTOUTS_TO_L2) \
+ __PMC_EV(PPC7450, STORE_MERGE_GATHER) \
+ __PMC_EV(PPC7450, CACHEABLE_STORE_MERGE_TO_32_BYTES) \
+ __PMC_EV(PPC7450, DATA_BKPT_MATCHES) \
+ __PMC_EV(PPC7450, FALL_THROUGH_BRANCHES_PROCESSED) \
+ __PMC_EV(PPC7450, FIRST_SPECULATIVE_BRANCH_BUFFER_RESOLVED_CORRECTLY) \
+ __PMC_EV(PPC7450, SECOND_SPECULATION_BUFFER_ACTIVE) \
+ __PMC_EV(PPC7450, BPU_STALL_ON_LR_DEPENDENCY) \
+ __PMC_EV(PPC7450, BTIC_MISS) \
+ __PMC_EV(PPC7450, BRANCH_LINK_STACK_CORRECTLY_RESOLVED) \
+ __PMC_EV(PPC7450, FPR_ISSUE_STALLED) \
+ __PMC_EV(PPC7450, SWITCHES_BETWEEN_PRIV_USER) \
+ __PMC_EV(PPC7450, LSU_COMPLETES_FP_STORE_SINGLE) \
+ __PMC_EV(PPC7450, VR_ISSUE_QUEUE_DISPATCHES) \
+ __PMC_EV(PPC7450, VR_STALLS) \
+ __PMC_EV(PPC7450, GPR_RENAME_BUFFER_ENTRIES_OVER_THRESHOLD) \
+ __PMC_EV(PPC7450, FPR_ISSUE_QUEUE_ENTRIES) \
+ __PMC_EV(PPC7450, FPU_INSTR_COMPLETED) \
+ __PMC_EV(PPC7450, STWCX_INSTR_COMPLETED) \
+ __PMC_EV(PPC7450, LS_LM_INSTR_PIECES) \
+ __PMC_EV(PPC7450, ITLB_HW_SEARCH_CYCLES_OVER_THRESHOLD) \
+ __PMC_EV(PPC7450, DTLB_MISSES) \
+ __PMC_EV(PPC7450, CANCELLED_L1_INSTR_CACHE_MISSES) \
+ __PMC_EV(PPC7450, L1_DATA_CACHE_OP_HIT) \
+ __PMC_EV(PPC7450, L1_DATA_LOAD_MISS_CYCLES) \
+ __PMC_EV(PPC7450, L1_DATA_PUSHES) \
+ __PMC_EV(PPC7450, L1_DATA_TOTAL_MISS) \
+ __PMC_EV(PPC7450, VT2_FETCHES) \
+ __PMC_EV(PPC7450, TAKEN_BRANCHES_PROCESSED) \
+ __PMC_EV(PPC7450, BRANCH_FLUSHES) \
+ __PMC_EV(PPC7450, SECOND_SPECULATIVE_BRANCH_BUFFER_RESOLVED_CORRECTLY) \
+ __PMC_EV(PPC7450, THIRD_SPECULATION_BUFFER_ACTIVE) \
+ __PMC_EV(PPC7450, BRANCH_UNIT_STALL_ON_CTR_DEPENDENCY) \
+ __PMC_EV(PPC7450, FAST_BTIC_HIT) \
+ __PMC_EV(PPC7450, BRANCH_LINK_STACK_MISPREDICTED) \
+ __PMC_EV(PPC7450, CYCLES_THREE_INSTR_COMPLETED) \
+ __PMC_EV(PPC7450, CYCLES_NO_INSTR_DISPATCHED) \
+ __PMC_EV(PPC7450, GPR_ISSUE_QUEUE_ENTRIES_OVER_THRESHOLD) \
+ __PMC_EV(PPC7450, GPR_ISSUE_QUEUE_STALLED) \
+ __PMC_EV(PPC7450, IU1_INSTR_COMPLETED) \
+ __PMC_EV(PPC7450, DSSALL_INSTR_COMPLETED) \
+ __PMC_EV(PPC7450, TLBSYNC_INSTR_COMPLETED) \
+ __PMC_EV(PPC7450, SYNC_INSTR_COMPLETED) \
+ __PMC_EV(PPC7450, SS_SM_INSTR_PIECES) \
+ __PMC_EV(PPC7450, DTLB_HW_SEARCH_CYCLES) \
+ __PMC_EV(PPC7450, SNOOP_RETRIES) \
+ __PMC_EV(PPC7450, SUCCESSFUL_STWCX) \
+ __PMC_EV(PPC7450, DST_STREAM_3_CACHE_LINE_FETCHES) \
+ __PMC_EV(PPC7450, THIRD_SPECULATIVE_BRANCH_BUFFER_RESOLVED_CORRECTLY) \
+ __PMC_EV(PPC7450, MISPREDICTED_BRANCHES) \
+ __PMC_EV(PPC7450, FOLDED_BRANCHES) \
+ __PMC_EV(PPC7450, FP_STORE_DOUBLE_COMPLETES_IN_LSU) \
+ __PMC_EV(PPC7450, L2_CACHE_HITS) \
+ __PMC_EV(PPC7450, L3_CACHE_HITS) \
+ __PMC_EV(PPC7450, L2_INSTR_CACHE_MISSES) \
+ __PMC_EV(PPC7450, L3_INSTR_CACHE_MISSES) \
+ __PMC_EV(PPC7450, L2_DATA_CACHE_MISSES) \
+ __PMC_EV(PPC7450, L3_DATA_CACHE_MISSES) \
+ __PMC_EV(PPC7450, L2_LOAD_HITS) \
+ __PMC_EV(PPC7450, L2_STORE_HITS) \
+ __PMC_EV(PPC7450, L3_LOAD_HITS) \
+ __PMC_EV(PPC7450, L3_STORE_HITS) \
+ __PMC_EV(PPC7450, L2_TOUCH_HITS) \
+ __PMC_EV(PPC7450, L3_TOUCH_HITS) \
+ __PMC_EV(PPC7450, SNOOP_MODIFIED) \
+ __PMC_EV(PPC7450, SNOOP_VALID) \
+ __PMC_EV(PPC7450, INTERVENTION) \
+ __PMC_EV(PPC7450, L2_CACHE_MISSES) \
+ __PMC_EV(PPC7450, L3_CACHE_MISSES) \
+ __PMC_EV(PPC7450, L2_CACHE_CASTOUTS) \
+ __PMC_EV(PPC7450, L3_CACHE_CASTOUTS) \
+ __PMC_EV(PPC7450, L2SQ_FULL_CYCLES) \
+ __PMC_EV(PPC7450, L3SQ_FULL_CYCLES) \
+ __PMC_EV(PPC7450, RAQ_FULL_CYCLES) \
+ __PMC_EV(PPC7450, WAQ_FULL_CYCLES) \
+ __PMC_EV(PPC7450, L1_EXTERNAL_INTERVENTIONS) \
+ __PMC_EV(PPC7450, L2_EXTERNAL_INTERVENTIONS) \
+ __PMC_EV(PPC7450, L3_EXTERNAL_INTERVENTIONS) \
+ __PMC_EV(PPC7450, EXTERNAL_INTERVENTIONS) \
+ __PMC_EV(PPC7450, EXTERNAL_PUSHES) \
+ __PMC_EV(PPC7450, EXTERNAL_SNOOP_RETRY) \
+ __PMC_EV(PPC7450, DTQ_FULL_CYCLES) \
+ __PMC_EV(PPC7450, BUS_RETRY) \
+ __PMC_EV(PPC7450, L2_VALID_REQUEST) \
+ __PMC_EV(PPC7450, BORDQ_FULL) \
+ __PMC_EV(PPC7450, BUS_TAS_FOR_READS) \
+ __PMC_EV(PPC7450, BUS_TAS_FOR_WRITES) \
+ __PMC_EV(PPC7450, BUS_READS_NOT_RETRIED) \
+ __PMC_EV(PPC7450, BUS_WRITES_NOT_RETRIED) \
+ __PMC_EV(PPC7450, BUS_READS_WRITES_NOT_RETRIED) \
+ __PMC_EV(PPC7450, BUS_RETRY_DUE_TO_L1_RETRY) \
+ __PMC_EV(PPC7450, BUS_RETRY_DUE_TO_PREVIOUS_ADJACENT) \
+ __PMC_EV(PPC7450, BUS_RETRY_DUE_TO_COLLISION) \
+ __PMC_EV(PPC7450, BUS_RETRY_DUE_TO_INTERVENTION_ORDERING) \
+ __PMC_EV(PPC7450, SNOOP_REQUESTS) \
+ __PMC_EV(PPC7450, PREFETCH_ENGINE_REQUEST) \
+ __PMC_EV(PPC7450, PREFETCH_ENGINE_COLLISION_VS_LOAD) \
+ __PMC_EV(PPC7450, PREFETCH_ENGINE_COLLISION_VS_STORE) \
+ __PMC_EV(PPC7450, PREFETCH_ENGINE_COLLISION_VS_INSTR_FETCH) \
+ __PMC_EV(PPC7450, PREFETCH_ENGINE_COLLISION_VS_LOAD_STORE_INSTR_FETCH) \
+ __PMC_EV(PPC7450, PREFETCH_ENGINE_FULL)
+
+#define PMC_EV_PPC7450_FIRST PMC_EV_PPC7450_CYCLE
+#define PMC_EV_PPC7450_LAST PMC_EV_PPC7450_PREFETCH_ENGINE_FULL
+
/*
* All known PMC events.
*
@@ -3138,6 +3375,8 @@ __PMC_EV_ALIAS("CYCLES_UNHALTED_L3_FLL_DISABLE", UCP_EVENT_86H_01H)
__PMC_EV_UCF() \
__PMC_EV_BLOCK(UCP, 0x12080) \
__PMC_EV_UCP() \
+ __PMC_EV_BLOCK(PPC7450, 0x13000) \
+ __PMC_EV_PPC7450() \
#define PMC_EVENT_FIRST PMC_EV_TSC_TSC
#define PMC_EVENT_LAST PMC_EV_UCP_LAST
diff --git a/sys/dev/ichwd/ichwd.c b/sys/dev/ichwd/ichwd.c
index 5d800c9..904c44d 100644
--- a/sys/dev/ichwd/ichwd.c
+++ b/sys/dev/ichwd/ichwd.c
@@ -198,26 +198,26 @@ static struct ichwd_device ichwd_devices[] = {
static devclass_t ichwd_devclass;
#define ichwd_read_tco_1(sc, off) \
- bus_space_read_1((sc)->tco_bst, (sc)->tco_bsh, (off))
+ bus_read_1((sc)->tco_res, (off))
#define ichwd_read_tco_2(sc, off) \
- bus_space_read_2((sc)->tco_bst, (sc)->tco_bsh, (off))
+ bus_read_2((sc)->tco_res, (off))
#define ichwd_read_tco_4(sc, off) \
- bus_space_read_4((sc)->tco_bst, (sc)->tco_bsh, (off))
+ bus_read_4((sc)->tco_res, (off))
#define ichwd_read_smi_4(sc, off) \
- bus_space_read_4((sc)->smi_bst, (sc)->smi_bsh, (off))
+ bus_read_4((sc)->smi_res, (off))
#define ichwd_read_gcs_4(sc, off) \
- bus_space_read_4((sc)->gcs_bst, (sc)->gcs_bsh, (off))
+ bus_read_4((sc)->gcs_res, (off))
#define ichwd_write_tco_1(sc, off, val) \
- bus_space_write_1((sc)->tco_bst, (sc)->tco_bsh, (off), (val))
+ bus_write_1((sc)->tco_res, (off), (val))
#define ichwd_write_tco_2(sc, off, val) \
- bus_space_write_2((sc)->tco_bst, (sc)->tco_bsh, (off), (val))
+ bus_write_2((sc)->tco_res, (off), (val))
#define ichwd_write_tco_4(sc, off, val) \
- bus_space_write_4((sc)->tco_bst, (sc)->tco_bsh, (off), (val))
+ bus_write_4((sc)->tco_res, (off), (val))
#define ichwd_write_smi_4(sc, off, val) \
- bus_space_write_4((sc)->smi_bst, (sc)->smi_bsh, (off), (val))
+ bus_write_4((sc)->smi_res, (off), (val))
#define ichwd_write_gcs_4(sc, off, val) \
- bus_space_write_4((sc)->gcs_bst, (sc)->gcs_bsh, (off), (val))
+ bus_write_4((sc)->gcs_res, (off), (val))
#define ichwd_verbose_printf(dev, ...) \
do { \
@@ -519,8 +519,6 @@ ichwd_attach(device_t dev)
device_printf(dev, "unable to reserve SMI registers\n");
goto fail;
}
- sc->smi_bst = rman_get_bustag(sc->smi_res);
- sc->smi_bsh = rman_get_bushandle(sc->smi_res);
sc->tco_rid = 1;
sc->tco_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &sc->tco_rid,
@@ -530,8 +528,6 @@ ichwd_attach(device_t dev)
device_printf(dev, "unable to reserve TCO registers\n");
goto fail;
}
- sc->tco_bst = rman_get_bustag(sc->tco_res);
- sc->tco_bsh = rman_get_bushandle(sc->tco_res);
sc->gcs_rid = 0;
if (sc->ich_version >= 6) {
@@ -541,12 +537,6 @@ ichwd_attach(device_t dev)
device_printf(dev, "unable to reserve GCS registers\n");
goto fail;
}
- sc->gcs_bst = rman_get_bustag(sc->gcs_res);
- sc->gcs_bsh = rman_get_bushandle(sc->gcs_res);
- } else {
- sc->gcs_res = 0;
- sc->gcs_bst = 0;
- sc->gcs_bsh = 0;
}
if (ichwd_clear_noreboot(sc) != 0)
diff --git a/sys/dev/ichwd/ichwd.h b/sys/dev/ichwd/ichwd.h
index bb809d8..5c5b068 100644
--- a/sys/dev/ichwd/ichwd.h
+++ b/sys/dev/ichwd/ichwd.h
@@ -48,18 +48,12 @@ struct ichwd_softc {
int smi_enabled;
int smi_rid;
struct resource *smi_res;
- bus_space_tag_t smi_bst;
- bus_space_handle_t smi_bsh;
int tco_rid;
struct resource *tco_res;
- bus_space_tag_t tco_bst;
- bus_space_handle_t tco_bsh;
int gcs_rid;
struct resource *gcs_res;
- bus_space_tag_t gcs_bst;
- bus_space_handle_t gcs_bsh;
eventhandler_tag ev_tag;
};
diff --git a/sys/dev/ie/if_ie.c b/sys/dev/ie/if_ie.c
index 172bf9e..363255b 100644
--- a/sys/dev/ie/if_ie.c
+++ b/sys/dev/ie/if_ie.c
@@ -313,7 +313,6 @@ ie_attach(device_t dev)
ifp->if_softc = sc;
if_initname(ifp, device_get_name(dev), device_get_unit(dev));
- ifp->if_mtu = ETHERMTU;
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
ifp->if_start = iestart;
ifp->if_ioctl = ieioctl;
diff --git a/sys/dev/ieee488/ibfoo.c b/sys/dev/ieee488/ibfoo.c
index c08c118..2fe72dc 100644
--- a/sys/dev/ieee488/ibfoo.c
+++ b/sys/dev/ieee488/ibfoo.c
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * High-level driver for µPD7210 based GPIB cards.
+ * High-level driver for µPD7210 based GPIB cards.
*
*/
diff --git a/sys/dev/ieee488/pcii.c b/sys/dev/ieee488/pcii.c
index 3c5699e..833ec91 100644
--- a/sys/dev/ieee488/pcii.c
+++ b/sys/dev/ieee488/pcii.c
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * Driver for GPIB cards based on NEC µPD7210 and compatibles.
+ * Driver for GPIB cards based on NEC µPD7210 and compatibles.
*
* This driver just hooks up to the hardware and leaves all the interesting
* stuff to upd7210.c.
@@ -116,14 +116,14 @@ pcii_probe(device_t dev)
/*
* The PCIIA decodes a fixed pattern of 0x2e1 for the lower 10
* address bits A0 ... A9. Bits A10 through A12 are used by
- * the µPD7210 register select lines. This makes the
+ * the µPD7210 register select lines. This makes the
* individual 7210 register being 0x400 bytes apart in the ISA
* bus address space. Address bits A13 and A14 are compared
* to a DIP switch setting on the card, allowing for up to 4
* different cards being installed (at base addresses 0x2e1,
* 0x22e1, 0x42e1, and 0x62e1, respectively). A15 has been
* used to select an optional on-board time-of-day clock chip
- * (MM58167A) on the original PCIIA rather than the µPD7210
+ * (MM58167A) on the original PCIIA rather than the µPD7210
* (which is not implemented on later boards). The
* documentation states the respective addresses for that chip
* should be handled as reserved addresses, which we don't do
@@ -174,7 +174,7 @@ pcii_probe(device_t dev)
}
error = ENXIO;
/*
- * Perform some basic tests on the µPD7210 registers. At
+ * Perform some basic tests on the µPD7210 registers. At
* least *some* register must read different from 0x00 or
* 0xff.
*/
diff --git a/sys/dev/ieee488/upd7210.c b/sys/dev/ieee488/upd7210.c
index ed6c64e..0e76c83 100644
--- a/sys/dev/ieee488/upd7210.c
+++ b/sys/dev/ieee488/upd7210.c
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * High-level driver for µPD7210 based GPIB cards.
+ * High-level driver for µPD7210 based GPIB cards.
*
*/
@@ -252,7 +252,7 @@ gpib_l_open(struct cdev *dev, int oflags, int devtype, struct thread *td)
bus_write_1(u->reg_res[0], cmdr, 0x04); /* GO */
bus_write_1(u->reg_res[0], imr3, 0x04); /* NEF IE */
} else {
- /* µPD7210/NAT7210, or TNT4882 in non-FIFO mode */
+ /* µPD7210/NAT7210, or TNT4882 in non-FIFO mode */
upd7210_wr(u, IMR1, 0x01); /* data in interrupt enable */
}
return (0);
diff --git a/sys/dev/ieee488/upd7210.h b/sys/dev/ieee488/upd7210.h
index 88235dd..27e3a7a 100644
--- a/sys/dev/ieee488/upd7210.h
+++ b/sys/dev/ieee488/upd7210.h
@@ -26,13 +26,13 @@
*
* $FreeBSD$
*
- * Locating an actual µPD7210 data book has proven quite impossible for me.
- * There are a fair number of newer chips which are supersets of the µPD7210
+ * Locating an actual µPD7210 data book has proven quite impossible for me.
+ * There are a fair number of newer chips which are supersets of the µPD7210
* but they are particular eager to comprehensively mark what the extensions
* are and what is in the base set. Some even give the registers and their
* bits new names.
*
- * The following information is based on a description of the µPD7210 found
+ * The following information is based on a description of the µPD7210 found
* in an old manual for a VME board which used the chip.
*/
diff --git a/sys/dev/if_ndis/if_ndis.c b/sys/dev/if_ndis/if_ndis.c
index d350e09..10fc018 100644
--- a/sys/dev/if_ndis/if_ndis.c
+++ b/sys/dev/if_ndis/if_ndis.c
@@ -150,9 +150,9 @@ static funcptr ndis_resettask_wrap;
static funcptr ndis_inputtask_wrap;
static struct ieee80211vap *ndis_vap_create(struct ieee80211com *,
- const char name[IFNAMSIZ], int unit, int opmode,
- int flags, const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t mac[IEEE80211_ADDR_LEN]);
+ const char [IFNAMSIZ], int, enum ieee80211_opmode, int,
+ const uint8_t [IEEE80211_ADDR_LEN],
+ const uint8_t [IEEE80211_ADDR_LEN]);
static void ndis_vap_delete (struct ieee80211vap *);
static void ndis_tick (void *);
static void ndis_ticktask (device_object *, void *);
@@ -714,7 +714,6 @@ ndis_attach(dev)
ndis_probe_offload(sc);
if_initname(ifp, device_get_name(dev), device_get_unit(dev));
- ifp->if_mtu = ETHERMTU;
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
ifp->if_ioctl = ndis_ioctl;
ifp->if_start = ndis_start;
@@ -973,10 +972,10 @@ fail:
}
static struct ieee80211vap *
-ndis_vap_create(struct ieee80211com *ic,
- const char name[IFNAMSIZ], int unit, int opmode, int flags,
- const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t mac[IEEE80211_ADDR_LEN])
+ndis_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit,
+ enum ieee80211_opmode opmode, int flags,
+ const uint8_t bssid[IEEE80211_ADDR_LEN],
+ const uint8_t mac[IEEE80211_ADDR_LEN])
{
struct ndis_vap *nvp;
struct ieee80211vap *vap;
diff --git a/sys/dev/if_ndis/if_ndis_pccard.c b/sys/dev/if_ndis/if_ndis_pccard.c
index e7ecf2e..a5a7b5e 100644
--- a/sys/dev/if_ndis/if_ndis_pccard.c
+++ b/sys/dev/if_ndis/if_ndis_pccard.c
@@ -207,7 +207,7 @@ ndis_attach_pccard(dev)
goto fail;
}
sc->ndis_rescnt++;
- resource_list_add(&sc->ndis_rl, SYS_RES_IOPORT, rid,
+ resource_list_add(&sc->ndis_rl, SYS_RES_IOPORT, sc->ndis_io_rid,
rman_get_start(sc->ndis_res_io), rman_get_end(sc->ndis_res_io),
rman_get_size(sc->ndis_res_io));
diff --git a/sys/dev/iicbus/iicbb.c b/sys/dev/iicbus/iicbb.c
index 2bc6321..a7eb2a0 100644
--- a/sys/dev/iicbus/iicbb.c
+++ b/sys/dev/iicbus/iicbb.c
@@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$");
struct iicbb_softc {
device_t iicbus;
+ int udelay; /* signal toggle delay in usec */
};
static int iicbb_attach(device_t);
@@ -123,6 +124,7 @@ iicbb_attach(device_t dev)
sc->iicbus = device_add_child(dev, "iicbus", -1);
if (!sc->iicbus)
return (ENXIO);
+ sc->udelay = 10; /* 10 uS default */
bus_generic_attach(dev);
return (0);
@@ -184,20 +186,18 @@ iicbb_print_child(device_t bus, device_t dev)
return (retval);
}
-#define IIC_DELAY 10
-
-#define I2C_SETSDA(dev,val) do { \
+#define I2C_SETSDA(sc,dev,val) do { \
IICBB_SETSDA(device_get_parent(dev), val); \
- DELAY(IIC_DELAY); \
+ DELAY(sc->udelay); \
} while (0)
#define I2C_SETSCL(dev,val) do { \
iicbb_setscl(dev, val, 100); \
} while (0)
-#define I2C_SET(dev,ctrl,data) do { \
+#define I2C_SET(sc,dev,ctrl,data) do { \
I2C_SETSCL(dev, ctrl); \
- I2C_SETSDA(dev, data); \
+ I2C_SETSDA(sc, dev, data); \
} while (0)
#define I2C_GETSDA(dev) (IICBB_GETSDA(device_get_parent(dev)))
@@ -216,34 +216,39 @@ static int i2c_debug = 0;
static void
iicbb_setscl(device_t dev, int val, int timeout)
{
+ struct iicbb_softc *sc = device_get_softc(dev);
int k = 0;
IICBB_SETSCL(device_get_parent(dev), val);
- DELAY(IIC_DELAY);
+ DELAY(sc->udelay);
while (val && !I2C_GETSCL(dev) && k++ < timeout) {
IICBB_SETSCL(device_get_parent(dev), val);
- DELAY(IIC_DELAY);
+ DELAY(sc->udelay);
}
-
+
return;
}
static void
iicbb_one(device_t dev, int timeout)
{
- I2C_SET(dev,0,1);
- I2C_SET(dev,1,1);
- I2C_SET(dev,0,1);
+ struct iicbb_softc *sc = device_get_softc(dev);
+
+ I2C_SET(sc,dev,0,1);
+ I2C_SET(sc,dev,1,1);
+ I2C_SET(sc,dev,0,1);
return;
}
static void
iicbb_zero(device_t dev, int timeout)
{
- I2C_SET(dev,0,0);
- I2C_SET(dev,1,0);
- I2C_SET(dev,0,0);
+ struct iicbb_softc *sc = device_get_softc(dev);
+
+ I2C_SET(sc,dev,0,0);
+ I2C_SET(sc,dev,1,0);
+ I2C_SET(sc,dev,0,0);
return;
}
@@ -264,20 +269,21 @@ iicbb_zero(device_t dev, int timeout)
static int
iicbb_ack(device_t dev, int timeout)
{
+ struct iicbb_softc *sc = device_get_softc(dev);
int noack;
int k = 0;
-
- I2C_SET(dev,0,1);
- I2C_SET(dev,1,1);
+
+ I2C_SET(sc,dev,0,1);
+ I2C_SET(sc,dev,1,1);
do {
noack = I2C_GETSDA(dev);
if (!noack)
break;
- DELAY(10);
- k += 10;
+ DELAY(1);
+ k++;
} while (k < timeout);
- I2C_SET(dev,0,1);
+ I2C_SET(sc,dev,0,1);
I2C_DEBUG(printf("%c ",noack?'-':'+'));
return (noack);
@@ -302,16 +308,17 @@ iicbb_sendbyte(device_t dev, u_char data, int timeout)
static u_char
iicbb_readbyte(device_t dev, int last, int timeout)
{
+ struct iicbb_softc *sc = device_get_softc(dev);
int i;
unsigned char data=0;
-
- I2C_SET(dev,0,1);
+
+ I2C_SET(sc,dev,0,1);
for (i=7; i>=0; i--)
{
- I2C_SET(dev,1,1);
+ I2C_SET(sc,dev,1,1);
if (I2C_GETSDA(dev))
data |= (1<<i);
- I2C_SET(dev,0,1);
+ I2C_SET(sc,dev,0,1);
}
if (last) {
iicbb_one(dev, timeout);
@@ -337,13 +344,14 @@ iicbb_reset(device_t dev, u_char speed, u_char addr, u_char *oldaddr)
static int
iicbb_start(device_t dev, u_char slave, int timeout)
{
+ struct iicbb_softc *sc = device_get_softc(dev);
int error;
I2C_DEBUG(printf("<"));
- I2C_SET(dev,1,1);
- I2C_SET(dev,1,0);
- I2C_SET(dev,0,0);
+ I2C_SET(sc,dev,1,1);
+ I2C_SET(sc,dev,1,0);
+ I2C_SET(sc,dev,0,0);
/* send address */
iicbb_sendbyte(dev, slave, timeout);
@@ -364,10 +372,13 @@ error:
static int
iicbb_stop(device_t dev)
{
- I2C_SET(dev,0,0);
- I2C_SET(dev,1,0);
- I2C_SET(dev,1,1);
+ struct iicbb_softc *sc = device_get_softc(dev);
+
+ I2C_SET(sc,dev,0,0);
+ I2C_SET(sc,dev,1,0);
+ I2C_SET(sc,dev,1,1);
I2C_DEBUG(printf(">"));
+ I2C_DEBUG(printf("\n"));
return (0);
}
diff --git a/sys/dev/ipw/if_ipw.c b/sys/dev/ipw/if_ipw.c
index 7560430..e632451 100644
--- a/sys/dev/ipw/if_ipw.c
+++ b/sys/dev/ipw/if_ipw.c
@@ -108,9 +108,9 @@ static const struct ipw_ident ipw_ident_table[] = {
};
static struct ieee80211vap *ipw_vap_create(struct ieee80211com *,
- const char name[IFNAMSIZ], int unit, int opmode, int flags,
- const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t mac[IEEE80211_ADDR_LEN]);
+ const char [IFNAMSIZ], int, enum ieee80211_opmode, int,
+ const uint8_t [IEEE80211_ADDR_LEN],
+ const uint8_t [IEEE80211_ADDR_LEN]);
static void ipw_vap_delete(struct ieee80211vap *);
static int ipw_dma_alloc(struct ipw_softc *);
static void ipw_release(struct ipw_softc *);
@@ -428,10 +428,10 @@ ipw_detach(device_t dev)
}
static struct ieee80211vap *
-ipw_vap_create(struct ieee80211com *ic,
- const char name[IFNAMSIZ], int unit, int opmode, int flags,
- const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t mac[IEEE80211_ADDR_LEN])
+ipw_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit,
+ enum ieee80211_opmode opmode, int flags,
+ const uint8_t bssid[IEEE80211_ADDR_LEN],
+ const uint8_t mac[IEEE80211_ADDR_LEN])
{
struct ifnet *ifp = ic->ic_ifp;
struct ipw_softc *sc = ifp->if_softc;
diff --git a/sys/dev/isp/isp_freebsd.c b/sys/dev/isp/isp_freebsd.c
index 3d676ab..56fedff 100644
--- a/sys/dev/isp/isp_freebsd.c
+++ b/sys/dev/isp/isp_freebsd.c
@@ -1087,8 +1087,9 @@ static ISP_INLINE void
destroy_lun_state(ispsoftc_t *isp, tstate_t *tptr)
{
struct tslist *lhp;
- KASSERT((tptr->hold == 0), ("tptr still held"));
- ISP_GET_PC_ADDR(isp, xpt_path_path_id(tptr->owner), lun_hash[LUN_HASH_FUNC(xpt_path_lun_id(tptr->owner))], lhp);
+ KASSERT((tptr->hold != 0), ("tptr is not held"));
+ KASSERT((tptr->hold == 1), ("tptr still held (%d)", tptr->hold));
+ ISP_GET_PC_ADDR(isp, cam_sim_bus(xpt_path_sim(tptr->owner)), lun_hash[LUN_HASH_FUNC(xpt_path_lun_id(tptr->owner))], lhp);
SLIST_REMOVE(lhp, tptr, tstate, next);
xpt_free_path(tptr->owner);
free(tptr, M_DEVBUF);
@@ -1316,12 +1317,13 @@ isp_disable_lun(ispsoftc_t *isp, union ccb *ccb)
mtx_sleep(isp, &isp->isp_lock, PRIBIO, "want_isp_disable_lun", 0);
}
isp->isp_osinfo.tmbusy = 1;
+ status = CAM_REQ_INPROG;
/*
* Find the state pointer.
*/
if ((tptr = get_lun_statep(isp, bus, lun)) == NULL) {
- ccb->ccb_h.status = CAM_PATH_INVALID;
+ status = CAM_PATH_INVALID;
goto done;
}
@@ -1341,13 +1343,13 @@ isp_disable_lun(ispsoftc_t *isp, union ccb *ccb)
}
isp->isp_osinfo.rptr = &status;
- status = CAM_REQ_INPROG;
if (isp_lun_cmd(isp, RQSTYPE_ENABLE_LUN, bus, lun, 0, 0)) {
status = CAM_RESRC_UNAVAIL;
} else {
mtx_sleep(ccb, &isp->isp_lock, PRIBIO, "isp_disable_lun", 0);
}
done:
+ ccb->ccb_h.status = status;
if (status == CAM_REQ_CMP) {
xpt_print(ccb->ccb_h.path, "now disabled for target mode\n");
}
@@ -2949,23 +2951,25 @@ isp_target_mark_aborted(ispsoftc_t *isp, union ccb *ccb)
{
tstate_t *tptr;
atio_private_data_t *atp;
+ union ccb *accb = ccb->cab.abort_ccb;
- tptr = get_lun_statep(isp, XS_CHANNEL(ccb), XS_LUN(ccb));
+ tptr = get_lun_statep(isp, XS_CHANNEL(accb), XS_LUN(accb));
if (tptr == NULL) {
- tptr = get_lun_statep(isp, XS_CHANNEL(ccb), CAM_LUN_WILDCARD);
+ tptr = get_lun_statep(isp, XS_CHANNEL(accb), CAM_LUN_WILDCARD);
if (tptr == NULL) {
ccb->ccb_h.status = CAM_REQ_INVALID;
return;
}
}
- atp = isp_get_atpd(isp, tptr, ccb->atio.tag_id);
+ atp = isp_get_atpd(isp, tptr, accb->atio.tag_id);
if (atp == NULL) {
ccb->ccb_h.status = CAM_REQ_INVALID;
- return;
+ } else {
+ atp->dead = 1;
+ ccb->ccb_h.status = CAM_REQ_CMP;
}
- atp->dead = 1;
- ccb->ccb_h.status = CAM_REQ_CMP;
+ rls_lun_statep(isp, tptr);
}
static void
@@ -3166,10 +3170,10 @@ isptargstart(struct cam_periph *periph, union ccb *iccb)
xpt_print(atio->ccb_h.path, "[0x%x] Non-Zero Lun %d: cdb0=0x%x\n", atio->tag_id, return_lun, cdb[0]);
if (cdb[0] != INQUIRY && cdb[0] != REPORT_LUNS && cdb[0] != REQUEST_SENSE) {
status = SCSI_STATUS_CHECK_COND;
- atio->sense_data.error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_ILLEGAL_REQUEST;
- atio->sense_data.add_sense_code = 0x25;
- atio->sense_data.add_sense_code_qual = 0x0;
- atio->sense_len = sizeof (atio->sense_data);
+ SDFIXED(atio->sense_data)->error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_ILLEGAL_REQUEST;
+ SDFIXED(atio->sense_data)->add_sense_code = 0x25;
+ SDFIXED(atio->sense_data)->add_sense_code_qual = 0x0;
+ atio->sense_len = SSD_MIN_SIZE;
}
return_lun = CAM_LUN_WILDCARD;
}
@@ -3193,10 +3197,10 @@ isptargstart(struct cam_periph *periph, union ccb *iccb)
case READ_16:
if (isptarg_rwparm(cdb, disk_data, disk_size, atio->ccb_h.ccb_data_offset, &data_ptr, &data_len, &last)) {
status = SCSI_STATUS_CHECK_COND;
- atio->sense_data.error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_UNIT_ATTENTION;
- atio->sense_data.add_sense_code = 0x5;
- atio->sense_data.add_sense_code_qual = 0x24;
- atio->sense_len = sizeof (atio->sense_data);
+ SDFIXED(atio->sense_data)->error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_UNIT_ATTENTION;
+ SDFIXED(atio->sense_data)->add_sense_code = 0x5;
+ SDFIXED(atio->sense_data)->add_sense_code_qual = 0x24;
+ atio->sense_len = SSD_MIN_SIZE;
} else {
#ifdef ISP_FORCE_TIMEOUT
{
@@ -3232,10 +3236,10 @@ isptargstart(struct cam_periph *periph, union ccb *iccb)
case WRITE_16:
if (isptarg_rwparm(cdb, disk_data, disk_size, atio->ccb_h.ccb_data_offset, &data_ptr, &data_len, &last)) {
status = SCSI_STATUS_CHECK_COND;
- atio->sense_data.error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_UNIT_ATTENTION;
- atio->sense_data.add_sense_code = 0x5;
- atio->sense_data.add_sense_code_qual = 0x24;
- atio->sense_len = sizeof (atio->sense_data);
+ SDFIXED(atio->sense_data)->error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_UNIT_ATTENTION;
+ SDFIXED(atio->sense_data)->add_sense_code = 0x5;
+ SDFIXED(atio->sense_data)->add_sense_code_qual = 0x24;
+ atio->sense_len = SSD_MIN_SIZE;
} else {
#ifdef ISP_FORCE_TIMEOUT
{
@@ -3269,10 +3273,10 @@ isptargstart(struct cam_periph *periph, union ccb *iccb)
flags |= CAM_DIR_IN;
if (cdb[1] || cdb[2] || cdb[3]) {
status = SCSI_STATUS_CHECK_COND;
- atio->sense_data.error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_UNIT_ATTENTION;
- atio->sense_data.add_sense_code = 0x5;
- atio->sense_data.add_sense_code_qual = 0x20;
- atio->sense_len = sizeof (atio->sense_data);
+ SDFIXED(atio->sense_data)->error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_UNIT_ATTENTION;
+ SDFIXED(atio->sense_data)->add_sense_code = 0x5;
+ SDFIXED(atio->sense_data)->add_sense_code_qual = 0x20;
+ atio->sense_len = SSD_MIN_SIZE;
break;
}
data_len = sizeof (iqd);
@@ -3293,10 +3297,10 @@ isptargstart(struct cam_periph *periph, union ccb *iccb)
if (ca) {
ca = 0;
status = SCSI_STATUS_CHECK_COND;
- atio->sense_data.error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_UNIT_ATTENTION;
- atio->sense_data.add_sense_code = 0x28;
- atio->sense_data.add_sense_code_qual = 0x0;
- atio->sense_len = sizeof (atio->sense_data);
+ SDFIXED(atio->sense_data)->error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_UNIT_ATTENTION;
+ SDFIXED(atio->sense_data)->add_sense_code = 0x28;
+ SDFIXED(atio->sense_data)->add_sense_code_qual = 0x0;
+ atio->sense_len = SSD_MIN_SIZE;
}
break;
case SYNCHRONIZE_CACHE:
@@ -3311,10 +3315,10 @@ isptargstart(struct cam_periph *periph, union ccb *iccb)
flags |= CAM_DIR_IN;
if (cdb[2] || cdb[3] || cdb[4] || cdb[5]) {
status = SCSI_STATUS_CHECK_COND;
- atio->sense_data.error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_UNIT_ATTENTION;
- atio->sense_data.add_sense_code = 0x5;
- atio->sense_data.add_sense_code_qual = 0x24;
- atio->sense_len = sizeof (atio->sense_data);
+ SDFIXED(atio->sense_data)->error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_UNIT_ATTENTION;
+ SDFIXED(atio->sense_data)->add_sense_code = 0x5;
+ SDFIXED(atio->sense_data)->add_sense_code_qual = 0x24;
+ atio->sense_len = SSD_MIN_SIZE;
break;
}
if (cdb[8] & 0x1) { /* PMI */
@@ -3365,10 +3369,10 @@ isptargstart(struct cam_periph *periph, union ccb *iccb)
default:
flags |= CAM_DIR_NONE;
status = SCSI_STATUS_CHECK_COND;
- atio->sense_data.error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_UNIT_ATTENTION;
- atio->sense_data.add_sense_code = 0x5;
- atio->sense_data.add_sense_code_qual = 0x20;
- atio->sense_len = sizeof (atio->sense_data);
+ SDFIXED(atio->sense_data)->error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_UNIT_ATTENTION;
+ SDFIXED(atio->sense_data)->add_sense_code = 0x5;
+ SDFIXED(atio->sense_data)->add_sense_code_qual = 0x20;
+ atio->sense_len = SSD_MIN_SIZE;
break;
}
@@ -4519,7 +4523,7 @@ isp_action(struct cam_sim *sim, union ccb *ccb)
switch (accb->ccb_h.func_code) {
#ifdef ISP_TARGET_MODE
case XPT_ACCEPT_TARGET_IO:
- isp_target_mark_aborted(isp, accb);
+ isp_target_mark_aborted(isp, ccb);
break;
#endif
case XPT_SCSI_IO:
diff --git a/sys/dev/isp/isp_freebsd.h b/sys/dev/isp/isp_freebsd.h
index 0875e64..d54defa 100644
--- a/sys/dev/isp/isp_freebsd.h
+++ b/sys/dev/isp/isp_freebsd.h
@@ -76,6 +76,13 @@
#define ISP_IFLAGS INTR_TYPE_CAM | INTR_ENTROPY | INTR_MPSAFE
#ifdef ISP_TARGET_MODE
+/* Not quite right, but there was no bump for this change */
+#if __FreeBSD_version < 225469
+#define SDFIXED(x) (&x)
+#else
+#define SDFIXED(x) ((struct scsi_sense_data_fixed *)(&x))
+#endif
+
#define ISP_TARGET_FUNCTIONS 1
#define ATPDPSIZE 4096
diff --git a/sys/dev/iwi/if_iwi.c b/sys/dev/iwi/if_iwi.c
index 73b861c..a7fd9d1 100644
--- a/sys/dev/iwi/if_iwi.c
+++ b/sys/dev/iwi/if_iwi.c
@@ -129,9 +129,9 @@ static const struct iwi_ident iwi_ident_table[] = {
};
static struct ieee80211vap *iwi_vap_create(struct ieee80211com *,
- const char name[IFNAMSIZ], int unit, int opmode, int flags,
- const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t mac[IEEE80211_ADDR_LEN]);
+ const char [IFNAMSIZ], int, enum ieee80211_opmode, int,
+ const uint8_t [IEEE80211_ADDR_LEN],
+ const uint8_t [IEEE80211_ADDR_LEN]);
static void iwi_vap_delete(struct ieee80211vap *);
static void iwi_dma_map_addr(void *, bus_dma_segment_t *, int, int);
static int iwi_alloc_cmd_ring(struct iwi_softc *, struct iwi_cmd_ring *,
@@ -495,10 +495,10 @@ iwi_detach(device_t dev)
}
static struct ieee80211vap *
-iwi_vap_create(struct ieee80211com *ic,
- const char name[IFNAMSIZ], int unit, int opmode, int flags,
- const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t mac[IEEE80211_ADDR_LEN])
+iwi_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit,
+ enum ieee80211_opmode opmode, int flags,
+ const uint8_t bssid[IEEE80211_ADDR_LEN],
+ const uint8_t mac[IEEE80211_ADDR_LEN])
{
struct ifnet *ifp = ic->ic_ifp;
struct iwi_softc *sc = ifp->if_softc;
diff --git a/sys/dev/iwn/if_iwn.c b/sys/dev/iwn/if_iwn.c
index a28e40b..3786456 100644
--- a/sys/dev/iwn/if_iwn.c
+++ b/sys/dev/iwn/if_iwn.c
@@ -116,9 +116,9 @@ static int iwn5000_attach(struct iwn_softc *, uint16_t);
static void iwn_radiotap_attach(struct iwn_softc *);
static void iwn_sysctlattach(struct iwn_softc *);
static struct ieee80211vap *iwn_vap_create(struct ieee80211com *,
- const char name[IFNAMSIZ], int unit, int opmode,
- int flags, const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t mac[IEEE80211_ADDR_LEN]);
+ const char [IFNAMSIZ], int, enum ieee80211_opmode, int,
+ const uint8_t [IEEE80211_ADDR_LEN],
+ const uint8_t [IEEE80211_ADDR_LEN]);
static void iwn_vap_delete(struct ieee80211vap *);
static int iwn_detach(device_t);
static int iwn_shutdown(device_t);
@@ -845,8 +845,8 @@ iwn_sysctlattach(struct iwn_softc *sc)
}
static struct ieee80211vap *
-iwn_vap_create(struct ieee80211com *ic,
- const char name[IFNAMSIZ], int unit, int opmode, int flags,
+iwn_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit,
+ enum ieee80211_opmode opmode, int flags,
const uint8_t bssid[IEEE80211_ADDR_LEN],
const uint8_t mac[IEEE80211_ADDR_LEN])
{
@@ -2128,7 +2128,7 @@ iwn_newassoc(struct ieee80211_node *ni, int isnew)
plcp |= IWN_RFLAG_SGI;
} else if (ni->ni_htcap & IEEE80211_HTCAP_SHORTGI20)
plcp |= IWN_RFLAG_SGI;
- if (i > 7)
+ if (RV(ni->ni_htrates.rs_rates[i]) > 7)
plcp |= IWN_RFLAG_ANT(txant1 | txant2);
else
plcp |= IWN_RFLAG_ANT(txant1);
diff --git a/sys/dev/ixgb/if_ixgb.c b/sys/dev/ixgb/if_ixgb.c
index e5cddb3..33db5b2 100644
--- a/sys/dev/ixgb/if_ixgb.c
+++ b/sys/dev/ixgb/if_ixgb.c
@@ -1354,7 +1354,6 @@ ixgb_setup_interface(device_t dev, struct adapter * adapter)
ifp->if_unit = device_get_unit(dev);
ifp->if_name = "ixgb";
#endif
- ifp->if_mtu = ETHERMTU;
ifp->if_baudrate = 1000000000;
ifp->if_init = ixgb_init;
ifp->if_softc = adapter;
diff --git a/sys/dev/ixgbe/ixgbe.c b/sys/dev/ixgbe/ixgbe.c
index ae76e9f..b4f11bd 100644
--- a/sys/dev/ixgbe/ixgbe.c
+++ b/sys/dev/ixgbe/ixgbe.c
@@ -265,7 +265,7 @@ TUNABLE_INT("hw.ixgbe.enable_msix", &ixgbe_enable_msix);
* it can be a performance win in some workloads, but
* in others it actually hurts, its off by default.
*/
-static bool ixgbe_header_split = FALSE;
+static int ixgbe_header_split = FALSE;
TUNABLE_INT("hw.ixgbe.hdr_split", &ixgbe_header_split);
/*
@@ -1138,6 +1138,31 @@ ixgbe_init_locked(struct adapter *adapter)
msec_delay(1);
}
wmb();
+#ifdef DEV_NETMAP
+ /*
+ * In netmap mode, we must preserve the buffers made
+ * available to userspace before the if_init()
+ * (this is true by default on the TX side, because
+ * init makes all buffers available to userspace).
+ *
+ * netmap_reset() and the device specific routines
+ * (e.g. ixgbe_setup_receive_rings()) map these
+ * buffers at the end of the NIC ring, so here we
+ * must set the RDT (tail) register to make sure
+ * they are not overwritten.
+ *
+ * In this driver the NIC ring starts at RDH = 0,
+ * RDT points to the last slot available for reception (?),
+ * so RDT = num_rx_desc - 1 means the whole ring is available.
+ */
+ if (ifp->if_capenable & IFCAP_NETMAP) {
+ struct netmap_adapter *na = NA(adapter->ifp);
+ struct netmap_kring *kring = &na->rx_rings[i];
+ int t = na->num_rx_desc - 1 - kring->nr_hwavail;
+
+ IXGBE_WRITE_REG(hw, IXGBE_RDT(i), t);
+ } else
+#endif /* DEV_NETMAP */
IXGBE_WRITE_REG(hw, IXGBE_RDT(i), adapter->num_rx_desc - 1);
}
@@ -2431,7 +2456,6 @@ ixgbe_setup_interface(device_t dev, struct adapter *adapter)
return (-1);
}
if_initname(ifp, device_get_name(dev), device_get_unit(dev));
- ifp->if_mtu = ETHERMTU;
ifp->if_baudrate = 1000000000;
ifp->if_init = ixgbe_init;
ifp->if_softc = adapter;
@@ -2877,8 +2901,7 @@ ixgbe_setup_transmit_ring(struct tx_ring *txr)
if (si >= na->num_tx_desc)
si -= na->num_tx_desc;
- netmap_load_map(txr->txtag, txbuf->map,
- NMB(slot + si), na->buff_size);
+ netmap_load_map(txr->txtag, txbuf->map, NMB(slot + si));
}
#endif /* DEV_NETMAP */
/* Clear the EOP index */
@@ -3066,7 +3089,7 @@ ixgbe_free_transmit_buffers(struct tx_ring *txr)
*
**********************************************************************/
-static boolean_t
+static bool
ixgbe_tx_ctx_setup(struct tx_ring *txr, struct mbuf *mp)
{
struct adapter *adapter = txr->adapter;
@@ -3184,7 +3207,7 @@ ixgbe_tx_ctx_setup(struct tx_ring *txr, struct mbuf *mp)
* adapters using advanced tx descriptors
*
**********************************************************************/
-static boolean_t
+static bool
ixgbe_tso_setup(struct tx_ring *txr, struct mbuf *mp, u32 *paylen)
{
struct adapter *adapter = txr->adapter;
@@ -3348,7 +3371,7 @@ ixgbe_atr(struct tx_ring *txr, struct mbuf *mp)
* tx_buffer is put back on the free queue.
*
**********************************************************************/
-static boolean_t
+static bool
ixgbe_txeof(struct tx_ring *txr)
{
struct adapter *adapter = txr->adapter;
@@ -3811,16 +3834,15 @@ ixgbe_setup_receive_ring(struct rx_ring *rxr)
*/
if (slot) {
int sj = j + na->rx_rings[rxr->me].nkr_hwofs;
+ uint64_t paddr;
void *addr;
if (sj >= na->num_rx_desc)
sj -= na->num_rx_desc;
- addr = NMB(slot + sj);
- netmap_load_map(rxr->ptag,
- rxbuf->pmap, addr, na->buff_size);
+ addr = PNMB(slot + sj, &paddr);
+ netmap_load_map(rxr->ptag, rxbuf->pmap, addr);
/* Update descriptor */
- rxr->rx_base[j].read.pkt_addr =
- htole64(vtophys(addr));
+ rxr->rx_base[j].read.pkt_addr = htole64(paddr);
continue;
}
#endif /* DEV_NETMAP */
@@ -3906,6 +3928,21 @@ skip_head:
lro->ifp = adapter->ifp;
}
+#ifdef DEV_NETMAP1 /* XXX experimental CRC strip */
+ {
+ struct ixgbe_hw *hw = &adapter->hw;
+ u32 rdrxctl;
+
+ rdrxctl = IXGBE_READ_REG(hw, IXGBE_RDRXCTL);
+ rdrxctl &= ~IXGBE_RDRXCTL_RSCFRSTSIZE;
+ if (slot)
+ rdrxctl &= ~IXGBE_RDRXCTL_CRCSTRIP;
+ else
+ rdrxctl |= IXGBE_RDRXCTL_CRCSTRIP;
+ rdrxctl |= IXGBE_RDRXCTL_RSCACKC;
+ IXGBE_WRITE_REG(hw, IXGBE_RDRXCTL, rdrxctl);
+ }
+#endif /* DEV_NETMAP1 */
IXGBE_RX_UNLOCK(rxr);
return (0);
@@ -3985,6 +4022,12 @@ ixgbe_initialize_receive_units(struct adapter *adapter)
hlreg |= IXGBE_HLREG0_JUMBOEN;
else
hlreg &= ~IXGBE_HLREG0_JUMBOEN;
+#ifdef DEV_NETMAP1 /* XXX experimental CRCSTRIP */
+ if (ifp->if_capenable & IFCAP_NETMAP)
+ hlreg &= ~IXGBE_HLREG0_RXCRCSTRP;
+ else
+ hlreg |= IXGBE_HLREG0_RXCRCSTRP;
+#endif /* DEV_NETMAP1 */
IXGBE_WRITE_REG(hw, IXGBE_HLREG0, hlreg);
bufsz = (adapter->rx_mbuf_sz + BSIZEPKT_ROUNDUP) >> IXGBE_SRRCTL_BSIZEPKT_SHIFT;
@@ -4016,35 +4059,6 @@ ixgbe_initialize_receive_units(struct adapter *adapter)
/* Setup the HW Rx Head and Tail Descriptor Pointers */
IXGBE_WRITE_REG(hw, IXGBE_RDH(i), 0);
-#ifdef DEV_NETMAP
- /*
- * In netmap mode, we must preserve the buffers made
- * available to userspace before the if_init()
- * (this is true by default on the TX side, because
- * init makes all buffers available to userspace).
- *
- * netmap_reset() and the device specific routines
- * (e.g. ixgbe_setup_receive_rings()) map these
- * buffers at the end of the NIC ring, so here we
- * must set the RDT (tail) register to make sure
- * they are not overwritten.
- *
- * In this driver the NIC ring starts at RDH = 0,
- * RDT points to the first 'busy' slot, so RDT = 0
- * means the whole ring is available, and
- * RDT = (num_rx_desc - X) means X slots are available.
- * Computations are done modulo the ring size.
- */
- if (ifp->if_capenable & IFCAP_NETMAP) {
- struct netmap_adapter *na = NA(adapter->ifp);
- struct netmap_kring *kring = &na->rx_rings[i];
- int t = na->num_rx_desc - kring->nr_hwavail;
-
- if (t >= na->num_rx_desc)
- t -= adapter->num_rx_desc;
- IXGBE_WRITE_REG(hw, IXGBE_RDT(i), t);
- } else
-#endif /* DEV_NETMAP */
IXGBE_WRITE_REG(hw, IXGBE_RDT(i), 0);
}
diff --git a/sys/dev/ixgbe/ixgbe_osdep.h b/sys/dev/ixgbe/ixgbe_osdep.h
index 03ea5b5..19dbf6b 100644
--- a/sys/dev/ixgbe/ixgbe_osdep.h
+++ b/sys/dev/ixgbe/ixgbe_osdep.h
@@ -95,7 +95,9 @@ typedef uint16_t u16;
typedef uint32_t u32;
typedef int32_t s32;
typedef uint64_t u64;
+#ifndef __bool_true_false_are_defined
typedef boolean_t bool;
+#endif
#define le16_to_cpu
diff --git a/sys/dev/ixgbe/ixv.c b/sys/dev/ixgbe/ixv.c
index e52a527..1a8b507 100644
--- a/sys/dev/ixgbe/ixv.c
+++ b/sys/dev/ixgbe/ixv.c
@@ -207,7 +207,7 @@ TUNABLE_INT("hw.ixv.flow_control", &ixv_flow_control);
* it can be a performance win in some workloads, but
* in others it actually hurts, its off by default.
*/
-static bool ixv_header_split = FALSE;
+static int ixv_header_split = FALSE;
TUNABLE_INT("hw.ixv.hdr_split", &ixv_header_split);
/*
@@ -1829,7 +1829,6 @@ ixv_setup_interface(device_t dev, struct adapter *adapter)
if (ifp == NULL)
panic("%s: can not if_alloc()\n", device_get_nameunit(dev));
if_initname(ifp, device_get_name(dev), device_get_unit(dev));
- ifp->if_mtu = ETHERMTU;
ifp->if_baudrate = 1000000000;
ifp->if_init = ixv_init;
ifp->if_softc = adapter;
@@ -2374,7 +2373,7 @@ ixv_free_transmit_buffers(struct tx_ring *txr)
*
**********************************************************************/
-static boolean_t
+static bool
ixv_tx_ctx_setup(struct tx_ring *txr, struct mbuf *mp)
{
struct adapter *adapter = txr->adapter;
@@ -2497,7 +2496,7 @@ ixv_tx_ctx_setup(struct tx_ring *txr, struct mbuf *mp)
* adapters using advanced tx descriptors
*
**********************************************************************/
-static boolean_t
+static bool
ixv_tso_setup(struct tx_ring *txr, struct mbuf *mp, u32 *paylen)
{
struct adapter *adapter = txr->adapter;
@@ -2586,7 +2585,7 @@ ixv_tso_setup(struct tx_ring *txr, struct mbuf *mp, u32 *paylen)
* tx_buffer is put back on the free queue.
*
**********************************************************************/
-static boolean_t
+static bool
ixv_txeof(struct tx_ring *txr)
{
struct adapter *adapter = txr->adapter;
diff --git a/sys/dev/lge/if_lge.c b/sys/dev/lge/if_lge.c
index 6f69a0a..26bd410 100644
--- a/sys/dev/lge/if_lge.c
+++ b/sys/dev/lge/if_lge.c
@@ -536,7 +536,6 @@ lge_attach(dev)
}
ifp->if_softc = sc;
if_initname(ifp, device_get_name(dev), device_get_unit(dev));
- ifp->if_mtu = ETHERMTU;
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
ifp->if_ioctl = lge_ioctl;
ifp->if_start = lge_start;
diff --git a/sys/dev/malo/if_malo.c b/sys/dev/malo/if_malo.c
index 6a7a786..7305d12 100644
--- a/sys/dev/malo/if_malo.c
+++ b/sys/dev/malo/if_malo.c
@@ -125,10 +125,10 @@ enum {
static MALLOC_DEFINE(M_MALODEV, "malodev", "malo driver dma buffers");
-static struct ieee80211vap *malo_vap_create(struct ieee80211com *ic,
- const char name[IFNAMSIZ], int unit, int opmode, int flags,
- const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t mac[IEEE80211_ADDR_LEN]);
+static struct ieee80211vap *malo_vap_create(struct ieee80211com *,
+ const char [IFNAMSIZ], int, enum ieee80211_opmode, int,
+ const uint8_t [IEEE80211_ADDR_LEN],
+ const uint8_t [IEEE80211_ADDR_LEN]);
static void malo_vap_delete(struct ieee80211vap *);
static int malo_dma_setup(struct malo_softc *);
static int malo_setup_hwdma(struct malo_softc *);
@@ -344,10 +344,10 @@ bad:
}
static struct ieee80211vap *
-malo_vap_create(struct ieee80211com *ic,
- const char name[IFNAMSIZ], int unit, int opmode, int flags,
- const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t mac[IEEE80211_ADDR_LEN])
+malo_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit,
+ enum ieee80211_opmode opmode, int flags,
+ const uint8_t bssid[IEEE80211_ADDR_LEN],
+ const uint8_t mac[IEEE80211_ADDR_LEN])
{
struct ifnet *ifp = ic->ic_ifp;
struct malo_vap *mvp;
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
index 35d5832..8ff52a9 100644
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -105,9 +105,11 @@ static MALLOC_DEFINE(M_MD, "md_disk", "Memory Disk");
static MALLOC_DEFINE(M_MDSECT, "md_sectors", "Memory Disk Sectors");
static int md_debug;
-SYSCTL_INT(_debug, OID_AUTO, mddebug, CTLFLAG_RW, &md_debug, 0, "");
+SYSCTL_INT(_debug, OID_AUTO, mddebug, CTLFLAG_RW, &md_debug, 0,
+ "Enable md(4) debug messages");
static int md_malloc_wait;
-SYSCTL_INT(_vm, OID_AUTO, md_malloc_wait, CTLFLAG_RW, &md_malloc_wait, 0, "");
+SYSCTL_INT(_vm, OID_AUTO, md_malloc_wait, CTLFLAG_RW, &md_malloc_wait, 0,
+ "Allow malloc to wait for memory allocations");
#if defined(MD_ROOT) && defined(MD_ROOT_SIZE)
/*
diff --git a/sys/dev/mps/mps_sas.c b/sys/dev/mps/mps_sas.c
index cf4757a..c253ee0 100644
--- a/sys/dev/mps/mps_sas.c
+++ b/sys/dev/mps/mps_sas.c
@@ -937,6 +937,7 @@ mpssas_action(struct cam_sim *sim, union ccb *ccb)
cpi->transport_version = 0;
cpi->protocol = PROTO_SCSI;
cpi->protocol_version = SCSI_REV_SPC;
+ cpi->maxio = MAXPHYS;
cpi->ccb_h.status = CAM_REQ_CMP;
break;
}
diff --git a/sys/dev/msk/if_msk.c b/sys/dev/msk/if_msk.c
index 588eb8d..304e6a2 100644
--- a/sys/dev/msk/if_msk.c
+++ b/sys/dev/msk/if_msk.c
@@ -648,8 +648,8 @@ msk_rx_fill(struct msk_if_softc *sc_if, int jumbo)
if ((sc_if->msk_flags & MSK_FLAG_DESCV2) == 0 &&
(sc_if->msk_ifp->if_capenable & IFCAP_RXCSUM) != 0) {
/* Wait until controller executes OP_TCPSTART command. */
- for (i = 10; i > 0; i--) {
- DELAY(10);
+ for (i = 100; i > 0; i--) {
+ DELAY(100);
idx = CSR_READ_2(sc_if->msk_softc,
Y2_PREF_Q_ADDR(sc_if->msk_rxq,
PREF_UNIT_GET_IDX_REG));
@@ -1636,7 +1636,6 @@ msk_attach(device_t dev)
}
ifp->if_softc = sc_if;
if_initname(ifp, device_get_name(dev), device_get_unit(dev));
- ifp->if_mtu = ETHERMTU;
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
ifp->if_capabilities = IFCAP_TXCSUM | IFCAP_TSO4;
/*
diff --git a/sys/dev/mwl/if_mwl.c b/sys/dev/mwl/if_mwl.c
index 5af96ba..bc1a15e 100644
--- a/sys/dev/mwl/if_mwl.c
+++ b/sys/dev/mwl/if_mwl.c
@@ -83,9 +83,9 @@ __FBSDID("$FreeBSD$");
#define SM(v,x) (((v) << x##_S) & x)
static struct ieee80211vap *mwl_vap_create(struct ieee80211com *,
- const char name[IFNAMSIZ], int unit, int opmode,
- int flags, const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t mac[IEEE80211_ADDR_LEN]);
+ const char [IFNAMSIZ], int, enum ieee80211_opmode, int,
+ const uint8_t [IEEE80211_ADDR_LEN],
+ const uint8_t [IEEE80211_ADDR_LEN]);
static void mwl_vap_delete(struct ieee80211vap *);
static int mwl_setupdma(struct mwl_softc *);
static int mwl_hal_reset(struct mwl_softc *sc);
@@ -601,10 +601,10 @@ reclaim_address(struct mwl_softc *sc, uint8_t mac[IEEE80211_ADDR_LEN])
}
static struct ieee80211vap *
-mwl_vap_create(struct ieee80211com *ic,
- const char name[IFNAMSIZ], int unit, int opmode, int flags,
- const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t mac0[IEEE80211_ADDR_LEN])
+mwl_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit,
+ enum ieee80211_opmode opmode, int flags,
+ const uint8_t bssid[IEEE80211_ADDR_LEN],
+ const uint8_t mac0[IEEE80211_ADDR_LEN])
{
struct ifnet *ifp = ic->ic_ifp;
struct mwl_softc *sc = ifp->if_softc;
diff --git a/sys/dev/mxge/if_mxge.c b/sys/dev/mxge/if_mxge.c
index 23af286..a33d03f 100644
--- a/sys/dev/mxge/if_mxge.c
+++ b/sys/dev/mxge/if_mxge.c
@@ -2827,7 +2827,7 @@ mxge_media_init(mxge_softc_t *sc)
}
for (i = 0; i < 3; i++, ptr++) {
- ptr = index(ptr, '-');
+ ptr = strchr(ptr, '-');
if (ptr == NULL) {
device_printf(sc->dev,
"only %d dashes in PC?!?\n", i);
diff --git a/sys/dev/my/if_my.c b/sys/dev/my/if_my.c
index 4b59c48..c7c0ad4 100644
--- a/sys/dev/my/if_my.c
+++ b/sys/dev/my/if_my.c
@@ -895,7 +895,6 @@ my_attach(device_t dev)
}
ifp->if_softc = sc;
if_initname(ifp, device_get_name(dev), device_get_unit(dev));
- ifp->if_mtu = ETHERMTU;
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
ifp->if_ioctl = my_ioctl;
ifp->if_start = my_start;
diff --git a/sys/dev/netmap/if_em_netmap.h b/sys/dev/netmap/if_em_netmap.h
index 681a652..959f52f 100644
--- a/sys/dev/netmap/if_em_netmap.h
+++ b/sys/dev/netmap/if_em_netmap.h
@@ -76,7 +76,7 @@ em_netmap_lock_wrapper(void *_a, int what, u_int queueid)
ASSERT(queueid < adapter->num_queues);
switch (what) {
- case NETMAP_CORE_LOCK:
+ case NETMAP_CORE_LOCK:
EM_CORE_LOCK(adapter);
break;
case NETMAP_CORE_UNLOCK:
@@ -222,7 +222,8 @@ em_netmap_txsync(void *a, u_int ring_nr, int do_lock)
int flags = ((slot->flags & NS_REPORT) ||
j == 0 || j == report_frequency) ?
E1000_TXD_CMD_RS : 0;
- void *addr = NMB(slot);
+ uint64_t paddr;
+ void *addr = PNMB(slot, &paddr);
int len = slot->len;
if (addr == netmap_buffer_base || len > NETMAP_BUF_SIZE) {
if (do_lock)
@@ -236,10 +237,9 @@ em_netmap_txsync(void *a, u_int ring_nr, int do_lock)
htole32(adapter->txd_cmd | len |
(E1000_TXD_CMD_EOP | flags) );
if (slot->flags & NS_BUF_CHANGED) {
- curr->buffer_addr = htole64(vtophys(addr));
+ curr->buffer_addr = htole64(paddr);
/* buffer has changed, reload map */
- netmap_reload_map(txr->txtag, txbuf->map,
- addr, na->buff_size);
+ netmap_reload_map(txr->txtag, txbuf->map, addr);
slot->flags &= ~NS_BUF_CHANGED;
}
@@ -329,7 +329,7 @@ em_netmap_rxsync(void *a, u_int ring_nr, int do_lock)
if ((curr->status & E1000_RXD_STAT_DD) == 0)
break;
ring->slot[j].len = le16toh(curr->length);
- bus_dmamap_sync(rxr->tag, rxr->rx_buffers[l].map,
+ bus_dmamap_sync(rxr->rxtag, rxr->rx_buffers[l].map,
BUS_DMASYNC_POSTREAD);
j = (j == lim) ? 0 : j + 1;
/* make sure next_to_refresh follows next_to_check */
@@ -355,7 +355,8 @@ em_netmap_rxsync(void *a, u_int ring_nr, int do_lock)
struct netmap_slot *slot = &ring->slot[j];
struct e1000_rx_desc *curr = &rxr->rx_base[l];
struct em_buffer *rxbuf = &rxr->rx_buffers[l];
- void *addr = NMB(slot);
+ uint64_t paddr;
+ void *addr = PNMB(slot, &paddr);
if (addr == netmap_buffer_base) { /* bad buf */
if (do_lock)
@@ -365,10 +366,9 @@ em_netmap_rxsync(void *a, u_int ring_nr, int do_lock)
curr->status = 0;
if (slot->flags & NS_BUF_CHANGED) {
- curr->buffer_addr = htole64(vtophys(addr));
+ curr->buffer_addr = htole64(paddr);
/* buffer has changed, reload map */
- netmap_reload_map(rxr->rxtag, rxbuf->map,
- addr, na->buff_size);
+ netmap_reload_map(rxr->rxtag, rxbuf->map, addr);
slot->flags &= ~NS_BUF_CHANGED;
}
diff --git a/sys/dev/netmap/if_igb_netmap.h b/sys/dev/netmap/if_igb_netmap.h
index c048ec4..0e4229b 100644
--- a/sys/dev/netmap/if_igb_netmap.h
+++ b/sys/dev/netmap/if_igb_netmap.h
@@ -168,7 +168,6 @@ igb_netmap_txsync(void *a, u_int ring_nr, int do_lock)
j = kring->nr_hwcur; /* netmap ring index */
if (j != k) { /* we have new packets to send */
u32 olinfo_status = 0;
- int n = 0;
l = j - kring->nkr_hwofs; /* NIC ring index */
if (l < 0)
@@ -182,7 +181,8 @@ igb_netmap_txsync(void *a, u_int ring_nr, int do_lock)
struct igb_tx_buffer *txbuf = &txr->tx_buffers[l];
union e1000_adv_tx_desc *curr =
(union e1000_adv_tx_desc *)&txr->tx_base[l];
- void *addr = NMB(slot);
+ uint64_t paddr;
+ void *addr = PNMB(slot, &paddr);
int flags = ((slot->flags & NS_REPORT) ||
j == 0 || j == report_frequency) ?
E1000_ADVTXD_DCMD_RS : 0;
@@ -196,7 +196,7 @@ igb_netmap_txsync(void *a, u_int ring_nr, int do_lock)
slot->flags &= ~NS_REPORT;
// XXX do we need to set the address ?
- curr->read.buffer_addr = htole64(vtophys(addr));
+ curr->read.buffer_addr = htole64(paddr);
curr->read.olinfo_status =
htole32(olinfo_status |
(len<< E1000_ADVTXD_PAYLEN_SHIFT));
@@ -207,8 +207,7 @@ igb_netmap_txsync(void *a, u_int ring_nr, int do_lock)
E1000_ADVTXD_DCMD_EOP | flags);
if (slot->flags & NS_BUF_CHANGED) {
/* buffer has changed, reload map */
- netmap_reload_map(txr->txtag, txbuf->map,
- addr, na->buff_size);
+ netmap_reload_map(txr->txtag, txbuf->map, addr);
slot->flags &= ~NS_BUF_CHANGED;
}
@@ -318,7 +317,8 @@ igb_netmap_rxsync(void *a, u_int ring_nr, int do_lock)
struct netmap_slot *slot = ring->slot + j;
union e1000_adv_rx_desc *curr = &rxr->rx_base[l];
struct igb_rx_buf *rxbuf = rxr->rx_buffers + l;
- void *addr = NMB(slot);
+ uint64_t paddr;
+ void *addr = PNMB(slot, &paddr);
if (addr == netmap_buffer_base) { /* bad buf */
if (do_lock)
@@ -327,10 +327,9 @@ igb_netmap_rxsync(void *a, u_int ring_nr, int do_lock)
}
curr->wb.upper.status_error = 0;
- curr->read.pkt_addr = htole64(vtophys(addr));
+ curr->read.pkt_addr = htole64(paddr);
if (slot->flags & NS_BUF_CHANGED) {
- netmap_reload_map(rxr->ptag, rxbuf->pmap,
- addr, na->buff_size);
+ netmap_reload_map(rxr->ptag, rxbuf->pmap, addr);
slot->flags &= ~NS_BUF_CHANGED;
}
diff --git a/sys/dev/netmap/if_lem_netmap.h b/sys/dev/netmap/if_lem_netmap.h
index ae64cd6..b9438fb 100644
--- a/sys/dev/netmap/if_lem_netmap.h
+++ b/sys/dev/netmap/if_lem_netmap.h
@@ -186,7 +186,8 @@ lem_netmap_txsync(void *a, u_int ring_nr, int do_lock)
struct netmap_slot *slot = &ring->slot[j];
struct e1000_tx_desc *curr = &adapter->tx_desc_base[l];
struct em_buffer *txbuf = &adapter->tx_buffer_area[l];
- void *addr = NMB(slot);
+ uint64_t paddr;
+ void *addr = PNMB(slot, &paddr);
int flags = ((slot->flags & NS_REPORT) ||
j == 0 || j == report_frequency) ?
E1000_TXD_CMD_RS : 0;
@@ -204,10 +205,9 @@ lem_netmap_txsync(void *a, u_int ring_nr, int do_lock)
htole32( adapter->txd_cmd | len |
(E1000_TXD_CMD_EOP | flags) );
if (slot->flags & NS_BUF_CHANGED) {
- curr->buffer_addr = htole64(vtophys(addr));
+ curr->buffer_addr = htole64(paddr);
/* buffer has changed, reload map */
- netmap_reload_map(adapter->txtag, txbuf->map,
- addr, na->buff_size);
+ netmap_reload_map(adapter->txtag, txbuf->map, addr);
slot->flags &= ~NS_BUF_CHANGED;
}
@@ -314,7 +314,8 @@ lem_netmap_rxsync(void *a, u_int ring_nr, int do_lock)
struct netmap_slot *slot = &ring->slot[j];
struct e1000_rx_desc *curr = &adapter->rx_desc_base[l];
struct em_buffer *rxbuf = &adapter->rx_buffer_area[l];
- void *addr = NMB(slot);
+ uint64_t paddr;
+ void *addr = PNMB(slot, &paddr);
if (addr == netmap_buffer_base) { /* bad buf */
if (do_lock)
@@ -323,10 +324,9 @@ lem_netmap_rxsync(void *a, u_int ring_nr, int do_lock)
}
curr->status = 0;
if (slot->flags & NS_BUF_CHANGED) {
- curr->buffer_addr = htole64(vtophys(addr));
+ curr->buffer_addr = htole64(paddr);
/* buffer has changed, and reload map */
- netmap_reload_map(adapter->rxtag, rxbuf->map,
- addr, na->buff_size);
+ netmap_reload_map(adapter->rxtag, rxbuf->map, addr);
slot->flags &= ~NS_BUF_CHANGED;
}
diff --git a/sys/dev/netmap/if_re_netmap.h b/sys/dev/netmap/if_re_netmap.h
index 105660c..a92432c 100644
--- a/sys/dev/netmap/if_re_netmap.h
+++ b/sys/dev/netmap/if_re_netmap.h
@@ -25,7 +25,7 @@
/*
* $FreeBSD$
- * $Id: if_re_netmap.h 9802 2011-12-02 18:42:37Z luigi $
+ * $Id: if_re_netmap.h 10075 2011-12-25 22:55:48Z luigi $
*
* netmap support for if_re
*/
@@ -183,7 +183,8 @@ re_netmap_txsync(void *a, u_int ring_nr, int do_lock)
struct rl_desc *desc = &sc->rl_ldata.rl_tx_list[l];
int cmd = slot->len | RL_TDESC_CMD_EOF |
RL_TDESC_CMD_OWN | RL_TDESC_CMD_SOF ;
- void *addr = NMB(slot);
+ uint64_t paddr;
+ void *addr = PNMB(slot, &paddr);
int len = slot->len;
if (addr == netmap_buffer_base || len > NETMAP_BUF_SIZE) {
@@ -197,12 +198,11 @@ re_netmap_txsync(void *a, u_int ring_nr, int do_lock)
cmd |= RL_TDESC_CMD_EOR;
if (slot->flags & NS_BUF_CHANGED) {
- uint64_t paddr = vtophys(addr);
desc->rl_bufaddr_lo = htole32(RL_ADDR_LO(paddr));
desc->rl_bufaddr_hi = htole32(RL_ADDR_HI(paddr));
/* buffer has changed, unload and reload map */
netmap_reload_map(sc->rl_ldata.rl_tx_mtag,
- txd[l].tx_dmamap, addr, na->buff_size);
+ txd[l].tx_dmamap, addr);
slot->flags &= ~NS_BUF_CHANGED;
}
slot->flags &= ~NS_REPORT;
@@ -304,7 +304,8 @@ re_netmap_rxsync(void *a, u_int ring_nr, int do_lock)
struct netmap_slot *slot = ring->slot + j;
struct rl_desc *desc = &sc->rl_ldata.rl_rx_list[l];
int cmd = na->buff_size | RL_RDESC_CMD_OWN;
- void *addr = NMB(slot);
+ uint64_t paddr;
+ void *addr = PNMB(slot, &paddr);
if (addr == netmap_buffer_base) { /* bad buf */
if (do_lock)
@@ -318,11 +319,10 @@ re_netmap_rxsync(void *a, u_int ring_nr, int do_lock)
desc->rl_cmdstat = htole32(cmd);
slot->flags &= ~NS_REPORT;
if (slot->flags & NS_BUF_CHANGED) {
- uint64_t paddr = vtophys(addr);
desc->rl_bufaddr_lo = htole32(RL_ADDR_LO(paddr));
desc->rl_bufaddr_hi = htole32(RL_ADDR_HI(paddr));
netmap_reload_map(sc->rl_ldata.rl_rx_mtag,
- rxd[l].rx_dmamap, addr, na->buff_size);
+ rxd[l].rx_dmamap, addr);
slot->flags &= ~NS_BUF_CHANGED;
}
bus_dmamap_sync(sc->rl_ldata.rl_rx_mtag,
@@ -377,12 +377,11 @@ re_netmap_tx_init(struct rl_softc *sc)
if (l >= n)
l -= n;
- addr = NMB(slot + l);
- paddr = vtophys(addr);
+ addr = PNMB(slot + l, &paddr);
desc[i].rl_bufaddr_lo = htole32(RL_ADDR_LO(paddr));
desc[i].rl_bufaddr_hi = htole32(RL_ADDR_HI(paddr));
netmap_load_map(sc->rl_ldata.rl_tx_mtag,
- txd[i].tx_dmamap, addr, na->buff_size);
+ txd[i].tx_dmamap, addr);
}
}
@@ -407,8 +406,12 @@ re_netmap_rx_init(struct rl_softc *sc)
if (l >= n)
l -= n;
- addr = NMB(slot + l);
- paddr = vtophys(addr);
+ addr = PNMB(slot + l, &paddr);
+
+ netmap_reload_map(sc->rl_ldata.rl_rx_mtag,
+ sc->rl_ldata.rl_rx_desc[i].rx_dmamap, addr);
+ bus_dmamap_sync(sc->rl_ldata.rl_rx_mtag,
+ sc->rl_ldata.rl_rx_desc[i].rx_dmamap, BUS_DMASYNC_PREREAD);
desc[i].rl_bufaddr_lo = htole32(RL_ADDR_LO(paddr));
desc[i].rl_bufaddr_hi = htole32(RL_ADDR_HI(paddr));
cmdstat = na->buff_size;
@@ -422,9 +425,5 @@ re_netmap_rx_init(struct rl_softc *sc)
if (i < n - 1 - kring->nr_hwavail) // XXX + 1 ?
cmdstat |= RL_RDESC_CMD_OWN;
desc[i].rl_cmdstat = htole32(cmdstat);
-
- netmap_reload_map(sc->rl_ldata.rl_rx_mtag,
- sc->rl_ldata.rl_rx_desc[i].rx_dmamap,
- addr, na->buff_size);
}
}
diff --git a/sys/dev/netmap/ixgbe_netmap.h b/sys/dev/netmap/ixgbe_netmap.h
index 6c8b2b6..f456044 100644
--- a/sys/dev/netmap/ixgbe_netmap.h
+++ b/sys/dev/netmap/ixgbe_netmap.h
@@ -253,7 +253,7 @@ ixgbe_netmap_txsync(void *a, u_int ring_nr, int do_lock)
* Note that txbuf and curr are indexed by l.
*
* In this driver we collect the buffer address
- * (using the NMB() macro) because we always
+ * (using the PNMB() macro) because we always
* need to rewrite it into the NIC ring.
* Many other drivers preserve the address, so
* we only need to access it if NS_BUF_CHANGED
@@ -262,7 +262,8 @@ ixgbe_netmap_txsync(void *a, u_int ring_nr, int do_lock)
struct netmap_slot *slot = &ring->slot[j];
struct ixgbe_tx_buf *txbuf = &txr->tx_buffers[l];
union ixgbe_adv_tx_desc *curr = &txr->tx_base[l];
- void *addr = NMB(slot);
+ uint64_t paddr;
+ void *addr = PNMB(slot, &paddr);
// XXX type for flags and len ?
int flags = ((slot->flags & NS_REPORT) ||
j == 0 || j == report_frequency) ?
@@ -290,7 +291,7 @@ ring_reset:
* address in the NIC ring. Other drivers do not
* need this.
*/
- curr->read.buffer_addr = htole64(vtophys(addr));
+ curr->read.buffer_addr = htole64(paddr);
curr->read.olinfo_status = 0;
curr->read.cmd_type_len =
htole32(txr->txd_cmd | len |
@@ -303,8 +304,7 @@ ring_reset:
*/
if (slot->flags & NS_BUF_CHANGED) {
/* buffer has changed, unload and reload map */
- netmap_reload_map(txr->txtag, txbuf->map,
- addr, na->buff_size);
+ netmap_reload_map(txr->txtag, txbuf->map, addr);
slot->flags &= ~NS_BUF_CHANGED;
}
@@ -472,22 +472,23 @@ ixgbe_netmap_rxsync(void *a, u_int ring_nr, int do_lock)
* and flag handling as in the txsync code.
*
* NOTE curr and rxbuf are indexed by l.
- * Also, this driver needs to update the physical * address in the NIC ring, but other drivers
+ * Also, this driver needs to update the physical
+ * address in the NIC ring, but other drivers
* may not have this requirement.
*/
struct netmap_slot *slot = &ring->slot[j];
union ixgbe_adv_rx_desc *curr = &rxr->rx_base[l];
struct ixgbe_rx_buf *rxbuf = &rxr->rx_buffers[l];
- void *addr = NMB(slot);
+ uint64_t paddr;
+ void *addr = PNMB(slot, &paddr);
if (addr == netmap_buffer_base) /* bad buf */
goto ring_reset;
curr->wb.upper.status_error = 0;
- curr->read.pkt_addr = htole64(vtophys(addr));
+ curr->read.pkt_addr = htole64(paddr);
if (slot->flags & NS_BUF_CHANGED) {
- netmap_reload_map(rxr->ptag, rxbuf->pmap,
- addr, na->buff_size);
+ netmap_reload_map(rxr->ptag, rxbuf->pmap, addr);
slot->flags &= ~NS_BUF_CHANGED;
}
diff --git a/sys/dev/netmap/netmap.c b/sys/dev/netmap/netmap.c
index 53a2729..e5695b3 100644
--- a/sys/dev/netmap/netmap.c
+++ b/sys/dev/netmap/netmap.c
@@ -104,6 +104,13 @@ MALLOC_DEFINE(M_NETMAP, "netmap", "Network memory map");
static void * netmap_malloc(size_t size, const char *msg);
static void netmap_free(void *addr, const char *msg);
+#define netmap_if_malloc(len) netmap_malloc(len, "nifp")
+#define netmap_if_free(v) netmap_free((v), "nifp")
+
+#define netmap_ring_malloc(len) netmap_malloc(len, "ring")
+#define netmap_free_rings(na) \
+ netmap_free((na)->tx_rings[0].ring, "shadow rings");
+
/*
* Allocator for a pool of packet buffers. For each buffer we have
* one entry in the bitmap to signal the state. Allocation scans
@@ -123,7 +130,7 @@ struct netmap_buf_pool {
struct netmap_buf_pool nm_buf_pool;
/* XXX move these two vars back into netmap_buf_pool */
u_int netmap_total_buffers;
-char *netmap_buffer_base;
+char *netmap_buffer_base; /* address of an invalid buffer */
/* user-controlled variables */
int netmap_verbose;
@@ -145,8 +152,10 @@ SYSCTL_INT(_dev_netmap, OID_AUTO, free_buffers,
* Buffer 0 is the 'junk' buffer.
*/
static void
-netmap_new_bufs(struct netmap_buf_pool *p, struct netmap_slot *slot, u_int n)
+netmap_new_bufs(struct netmap_if *nifp __unused,
+ struct netmap_slot *slot, u_int n)
{
+ struct netmap_buf_pool *p = &nm_buf_pool;
uint32_t bi = 0; /* index in the bitmap */
uint32_t mask, j, i = 0; /* slot counter */
@@ -175,8 +184,10 @@ netmap_new_bufs(struct netmap_buf_pool *p, struct netmap_slot *slot, u_int n)
static void
-netmap_free_buf(struct netmap_buf_pool *p, uint32_t i)
+netmap_free_buf(struct netmap_if *nifp __unused, uint32_t i)
{
+ struct netmap_buf_pool *p = &nm_buf_pool;
+
uint32_t pos, mask;
if (i >= p->total_buffers) {
D("invalid free index %d", i);
@@ -233,6 +244,12 @@ struct netmap_priv_d {
uint16_t np_txpoll;
};
+/* Shorthand to compute a netmap interface offset. */
+#define netmap_if_offset(v) \
+ ((char *) (v) - (char *) netmap_mem_d->nm_buffer)
+/* .. and get a physical address given a memory offset */
+#define netmap_ofstophys(o) \
+ (vtophys(netmap_mem_d->nm_buffer) + (o))
static struct cdev *netmap_dev; /* /dev/netmap character device. */
static struct netmap_mem_d *netmap_mem_d; /* Our memory allocator. */
@@ -386,21 +403,19 @@ netmap_dtor(void *data)
ring = na->tx_rings[i].ring;
lim = na->tx_rings[i].nkr_num_slots;
for (j = 0; j < lim; j++)
- netmap_free_buf(&nm_buf_pool,
- ring->slot[j].buf_idx);
+ netmap_free_buf(nifp, ring->slot[j].buf_idx);
ND("rx queue %d", i);
ring = na->rx_rings[i].ring;
lim = na->rx_rings[i].nkr_num_slots;
for (j = 0; j < lim; j++)
- netmap_free_buf(&nm_buf_pool,
- ring->slot[j].buf_idx);
+ netmap_free_buf(nifp, ring->slot[j].buf_idx);
}
NMA_UNLOCK();
- netmap_free(na->tx_rings[0].ring, "shadow rings");
+ netmap_free_rings(na);
wakeup(na);
}
- netmap_free(nifp, "nifp");
+ netmap_if_free(nifp);
na->nm_lock(ifp->if_softc, NETMAP_CORE_UNLOCK, 0);
@@ -411,7 +426,6 @@ netmap_dtor(void *data)
}
-
/*
* Create and return a new ``netmap_if`` object, and possibly also
* rings and packet buffors.
@@ -432,7 +446,7 @@ netmap_if_new(const char *ifname, struct netmap_adapter *na)
* to the tx and rx rings in the shared memory region.
*/
len = sizeof(struct netmap_if) + 2 * n * sizeof(ssize_t);
- nifp = netmap_malloc(len, "nifp");
+ nifp = netmap_if_malloc(len);
if (nifp == NULL)
return (NULL);
@@ -455,13 +469,13 @@ netmap_if_new(const char *ifname, struct netmap_adapter *na)
len = n * (2 * sizeof(struct netmap_ring) +
(na->num_tx_desc + na->num_rx_desc) *
sizeof(struct netmap_slot) );
- buff = netmap_malloc(len, "shadow rings");
+ buff = netmap_ring_malloc(len);
if (buff == NULL) {
D("failed to allocate %d bytes for %s shadow ring",
len, ifname);
error:
(na->refcount)--;
- netmap_free(nifp, "nifp, rings failed");
+ netmap_if_free(nifp);
return (NULL);
}
/* do we have the bufers ? we are in need of num_tx_desc buffers for
@@ -503,7 +517,7 @@ error:
*/
ring->avail = kring->nr_hwavail = numdesc - 1;
ring->cur = kring->nr_hwcur = 0;
- netmap_new_bufs(&nm_buf_pool, ring->slot, numdesc);
+ netmap_new_bufs(nifp, ring->slot, numdesc);
ofs += sizeof(struct netmap_ring) +
numdesc * sizeof(struct netmap_slot);
@@ -522,7 +536,7 @@ error:
kring->nkr_num_slots = numdesc;
ring->cur = kring->nr_hwcur = 0;
ring->avail = kring->nr_hwavail = 0; /* empty */
- netmap_new_bufs(&nm_buf_pool, ring->slot, numdesc);
+ netmap_new_bufs(nifp, ring->slot, numdesc);
ofs += sizeof(struct netmap_ring) +
numdesc * sizeof(struct netmap_slot);
}
@@ -567,8 +581,9 @@ netmap_mmap(__unused struct cdev *dev, vm_ooffset_t offset, vm_paddr_t *paddr,
{
if (nprot & PROT_EXEC)
return (-1); // XXX -1 or EINVAL ?
+
ND("request for offset 0x%x", (uint32_t)offset);
- *paddr = vtophys(netmap_mem_d->nm_buffer) + offset;
+ *paddr = netmap_ofstophys(offset);
return (0);
}
@@ -907,11 +922,12 @@ netmap_ioctl(__unused struct cdev *dev, u_long cmd, caddr_t data,
/*
* do something similar to netmap_dtor().
*/
- netmap_free(na->tx_rings[0].ring, "rings, reg.failed");
- free(na->tx_rings, M_DEVBUF);
+ netmap_free_rings(na);
+ // XXX tx_rings is inline, must not be freed.
+ // free(na->tx_rings, M_DEVBUF); // XXX wrong ?
na->tx_rings = na->rx_rings = NULL;
na->refcount--;
- netmap_free(nifp, "nifp, rings failed");
+ netmap_if_free(nifp);
nifp = NULL;
}
}
@@ -939,8 +955,7 @@ error:
nmr->nr_numrings = na->num_queues;
nmr->nr_numslots = na->num_tx_desc;
nmr->nr_memsize = netmap_mem_d->nm_totalsize;
- nmr->nr_offset =
- ((char *) nifp - (char *) netmap_mem_d->nm_buffer);
+ nmr->nr_offset = netmap_if_offset(nifp);
break;
case NIOCUNREGIF:
@@ -1039,8 +1054,9 @@ netmap_poll(__unused struct cdev *dev, int events, struct thread *td)
struct netmap_adapter *na;
struct ifnet *ifp;
struct netmap_kring *kring;
- u_int i, check_all, want_tx, want_rx, revents = 0;
+ u_int core_lock, i, check_all, want_tx, want_rx, revents = 0;
void *adapter;
+ enum {NO_CL, NEED_CL, LOCKED_CL }; /* see below */
if (devfs_get_cdevpriv((void **)&priv) != 0 || priv == NULL)
return POLLERR;
@@ -1115,9 +1131,7 @@ netmap_poll(__unused struct cdev *dev, int events, struct thread *td)
* to remember to release the lock once done.
* LOCKED_CL core lock is set, so we need to release it.
*/
- enum {NO_CL, NEED_CL, LOCKED_CL };
- int core_lock = (check_all || !na->separate_locks) ?
- NEED_CL:NO_CL;
+ core_lock = (check_all || !na->separate_locks) ? NEED_CL : NO_CL;
/*
* We start with a lock free round which is good if we have
* data available. If this fails, then lock and call the sync
@@ -1246,7 +1260,7 @@ netmap_attach(struct netmap_adapter *na, int num_queues)
buf = malloc(size, M_DEVBUF, M_NOWAIT | M_ZERO);
if (buf) {
- ifp->if_pspare[0] = buf;
+ WNA(ifp) = buf;
na->tx_rings = (void *)((char *)buf + sizeof(*na));
na->rx_rings = na->tx_rings + n;
bcopy(na, buf, sizeof(*na));
@@ -1276,7 +1290,7 @@ netmap_detach(struct ifnet *ifp)
knlist_destroy(&na->rx_rings[i].si.si_note);
}
bzero(na, sizeof(*na));
- ifp->if_pspare[0] = NULL;
+ WNA(ifp) = NULL;
free(na, M_DEVBUF);
}
@@ -1378,34 +1392,6 @@ netmap_reset(struct netmap_adapter *na, enum txrx tx, int n,
return kring->ring->slot;
}
-static void
-ns_dmamap_cb(__unused void *arg, __unused bus_dma_segment_t * segs,
- __unused int nseg, __unused int error)
-{
-}
-
-/* unload a bus_dmamap and create a new one. Used when the
- * buffer in the slot is changed.
- * XXX buflen is probably not needed, buffers have constant size.
- */
-void
-netmap_reload_map(bus_dma_tag_t tag, bus_dmamap_t map,
- void *buf, bus_size_t buflen)
-{
- bus_addr_t paddr;
- bus_dmamap_unload(tag, map);
- bus_dmamap_load(tag, map, buf, buflen, ns_dmamap_cb, &paddr,
- BUS_DMA_NOWAIT);
-}
-
-void
-netmap_load_map(bus_dma_tag_t tag, bus_dmamap_t map,
- void *buf, bus_size_t buflen)
-{
- bus_addr_t paddr;
- bus_dmamap_load(tag, map, buf, buflen, ns_dmamap_cb, &paddr,
- BUS_DMA_NOWAIT);
-}
/*------ netmap memory allocator -------*/
/*
@@ -1530,7 +1516,7 @@ netmap_memory_init(void)
int i, n, sz = NETMAP_MEMORY_SIZE;
int extra_sz = 0; // space for rings and two spare buffers
- for (; !buf && sz >= 1<<20; sz >>=1) {
+ for (; sz >= 1<<20; sz >>=1) {
extra_sz = sz/200;
extra_sz = (extra_sz + 2*PAGE_SIZE - 1) & ~(PAGE_SIZE-1);
buf = contigmalloc(sz + extra_sz,
@@ -1541,6 +1527,8 @@ netmap_memory_init(void)
PAGE_SIZE, /* alignment */
0 /* boundary */
);
+ if (buf)
+ break;
}
if (buf == NULL)
return (ENOMEM);
diff --git a/sys/dev/netmap/netmap_kern.h b/sys/dev/netmap/netmap_kern.h
index eb36ec6..ff4b151 100644
--- a/sys/dev/netmap/netmap_kern.h
+++ b/sys/dev/netmap/netmap_kern.h
@@ -39,13 +39,13 @@ MALLOC_DECLARE(M_NETMAP);
#endif
#define ND(format, ...)
-#define D(format, ...) \
- do { \
- struct timeval __xxts; \
+#define D(format, ...) \
+ do { \
+ struct timeval __xxts; \
microtime(&__xxts); \
- printf("%03d.%06d %s [%d] " format "\n",\
- (int)__xxts.tv_sec % 1000, (int)__xxts.tv_usec, \
- __FUNCTION__, __LINE__, ##__VA_ARGS__); \
+ printf("%03d.%06d %s [%d] " format "\n", \
+ (int)__xxts.tv_sec % 1000, (int)__xxts.tv_usec, \
+ __FUNCTION__, __LINE__, ##__VA_ARGS__); \
} while (0)
struct netmap_adapter;
@@ -169,18 +169,8 @@ int netmap_start(struct ifnet *, struct mbuf *);
enum txrx { NR_RX = 0, NR_TX = 1 };
struct netmap_slot *netmap_reset(struct netmap_adapter *na,
enum txrx tx, int n, u_int new_cur);
-void netmap_load_map(bus_dma_tag_t tag, bus_dmamap_t map,
- void *buf, bus_size_t buflen);
-void netmap_reload_map(bus_dma_tag_t tag, bus_dmamap_t map,
- void *buf, bus_size_t buflen);
int netmap_ring_reinit(struct netmap_kring *);
-/*
- * XXX eventually, get rid of netmap_total_buffers and netmap_buffer_base
- * in favour of the structure
- */
-// struct netmap_buf_pool;
-// extern struct netmap_buf_pool nm_buf_pool;
extern u_int netmap_total_buffers;
extern char *netmap_buffer_base;
extern int netmap_verbose; // XXX debugging
@@ -196,17 +186,49 @@ enum { /* verbose flags */
};
/*
- * return a pointer to the struct netmap adapter from the ifp
+ * NA returns a pointer to the struct netmap adapter from the ifp,
+ * WNA is used to write it.
*/
-#define NA(_ifp) ((struct netmap_adapter *)(_ifp)->if_pspare[0])
+#ifndef WNA
+#define WNA(_ifp) (_ifp)->if_pspare[0]
+#endif
+#define NA(_ifp) ((struct netmap_adapter *)WNA(_ifp))
+
+
+/* Callback invoked by the dma machinery after a successfull dmamap_load */
+static void netmap_dmamap_cb(__unused void *arg,
+ __unused bus_dma_segment_t * segs, __unused int nseg, __unused int error)
+{
+}
+
+/* bus_dmamap_load wrapper: call aforementioned function if map != NULL.
+ * XXX can we do it without a callback ?
+ */
+static inline void
+netmap_load_map(bus_dma_tag_t tag, bus_dmamap_t map, void *buf)
+{
+ if (map)
+ bus_dmamap_load(tag, map, buf, NETMAP_BUF_SIZE,
+ netmap_dmamap_cb, NULL, BUS_DMA_NOWAIT);
+}
+
+/* update the map when a buffer changes. */
+static inline void
+netmap_reload_map(bus_dma_tag_t tag, bus_dmamap_t map, void *buf)
+{
+ if (map) {
+ bus_dmamap_unload(tag, map);
+ bus_dmamap_load(tag, map, buf, NETMAP_BUF_SIZE,
+ netmap_dmamap_cb, NULL, BUS_DMA_NOWAIT);
+ }
+}
/*
- * return the address of a buffer.
- * XXX this is a special version with hardwired 2k bufs
- * On error return netmap_buffer_base which is detected as a bad pointer.
+ * NMB return the virtual address of a buffer (buffer 0 on bad index)
+ * PNMB also fills the physical address
*/
-static inline char *
+static inline void *
NMB(struct netmap_slot *slot)
{
uint32_t i = slot->buf_idx;
@@ -218,4 +240,18 @@ NMB(struct netmap_slot *slot)
#endif
}
+static inline void *
+PNMB(struct netmap_slot *slot, uint64_t *pp)
+{
+ uint32_t i = slot->buf_idx;
+ void *ret = (i >= netmap_total_buffers) ? netmap_buffer_base :
+#if NETMAP_BUF_SIZE == 2048
+ netmap_buffer_base + (i << 11);
+#else
+ netmap_buffer_base + (i *NETMAP_BUF_SIZE);
+#endif
+ *pp = vtophys(ret);
+ return ret;
+}
+
#endif /* _NET_NETMAP_KERN_H_ */
diff --git a/sys/dev/nfe/if_nfe.c b/sys/dev/nfe/if_nfe.c
index f4c5bed..fe072f3 100644
--- a/sys/dev/nfe/if_nfe.c
+++ b/sys/dev/nfe/if_nfe.c
@@ -565,7 +565,6 @@ nfe_attach(device_t dev)
ifp->if_softc = sc;
if_initname(ifp, device_get_name(dev), device_get_unit(dev));
- ifp->if_mtu = ETHERMTU;
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
ifp->if_ioctl = nfe_ioctl;
ifp->if_start = nfe_start;
diff --git a/sys/dev/null/null.c b/sys/dev/null/null.c
index b053d5d..0fe46fa 100644
--- a/sys/dev/null/null.c
+++ b/sys/dev/null/null.c
@@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$");
#include <sys/priv.h>
#include <sys/disk.h>
#include <sys/bus.h>
+#include <sys/filio.h>
#include <machine/bus.h>
#include <machine/vmparam.h>
@@ -49,6 +50,7 @@ static struct cdev *zero_dev;
static d_write_t null_write;
static d_ioctl_t null_ioctl;
+static d_ioctl_t zero_ioctl;
static d_read_t zero_read;
static struct cdevsw null_cdevsw = {
@@ -63,6 +65,7 @@ static struct cdevsw zero_cdevsw = {
.d_version = D_VERSION,
.d_read = zero_read,
.d_write = null_write,
+ .d_ioctl = zero_ioctl,
.d_name = "zero",
.d_flags = D_MMAP_ANON,
};
@@ -82,17 +85,50 @@ null_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t data __unused,
int flags __unused, struct thread *td)
{
int error;
+ error = 0;
- if (cmd != DIOCSKERNELDUMP)
- return (ENOIOCTL);
- error = priv_check(td, PRIV_SETDUMPER);
- if (error)
- return (error);
- return (set_dumper(NULL));
+ switch (cmd) {
+ case DIOCSKERNELDUMP:
+ error = priv_check(td, PRIV_SETDUMPER);
+ if (error == 0)
+ error = set_dumper(NULL);
+ break;
+ case FIONBIO:
+ break;
+ case FIOASYNC:
+ if (*(int *)data != 0)
+ error = EINVAL;
+ break;
+ default:
+ error = ENOIOCTL;
+ }
+ return (error);
}
/* ARGSUSED */
static int
+zero_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t data __unused,
+ int flags __unused, struct thread *td)
+{
+ int error;
+ error = 0;
+
+ switch (cmd) {
+ case FIONBIO:
+ break;
+ case FIOASYNC:
+ if (*(int *)data != 0)
+ error = EINVAL;
+ break;
+ default:
+ error = ENOIOCTL;
+ }
+ return (error);
+}
+
+
+/* ARGSUSED */
+static int
zero_read(struct cdev *dev __unused, struct uio *uio, int flags __unused)
{
void *zbuf;
diff --git a/sys/dev/nve/if_nve.c b/sys/dev/nve/if_nve.c
index 5c53239..f02cf07 100644
--- a/sys/dev/nve/if_nve.c
+++ b/sys/dev/nve/if_nve.c
@@ -529,7 +529,6 @@ nve_attach(device_t dev)
ifp->if_ioctl = nve_ioctl;
ifp->if_start = nve_ifstart;
ifp->if_init = nve_init;
- ifp->if_mtu = ETHERMTU;
ifp->if_baudrate = IF_Mbps(100);
IFQ_SET_MAXLEN(&ifp->if_snd, TX_RING_SIZE - 1);
ifp->if_snd.ifq_drv_maxlen = TX_RING_SIZE - 1;
diff --git a/sys/dev/nxge/include/xgehal-channel.h b/sys/dev/nxge/include/xgehal-channel.h
index d786649..2f637b2 100644
--- a/sys/dev/nxge/include/xgehal-channel.h
+++ b/sys/dev/nxge/include/xgehal-channel.h
@@ -139,7 +139,7 @@ typedef enum xge_hal_channel_reopen_e {
* Channel callback gets called by HAL if, and only if, there is at least
* one new completion on a given ring or fifo channel. Upon processing the
* first @dtrh ULD is _supposed_ to continue consuming completions
- * usingáone of the following HAL APIs:
+ * using one of the following HAL APIs:
* - xge_hal_fifo_dtr_next_completed()
* or
* - xge_hal_ring_dtr_next_completed().
diff --git a/sys/dev/nxge/include/xgehal-config.h b/sys/dev/nxge/include/xgehal-config.h
index c320b4a..2a63296 100644
--- a/sys/dev/nxge/include/xgehal-config.h
+++ b/sys/dev/nxge/include/xgehal-config.h
@@ -621,7 +621,7 @@ typedef struct xge_hal_mac_config_t {
* stable in order for the adapter to declare "LINK UP".
* The enumerated settings (see Xframe-II UG) are:
* 0 ........... instantaneous
- * 1 ........... 500 ³s
+ * 1 ........... 500 μs
* 2 ........... 1 ms
* 3 ........... 64 ms
* 4 ........... 256 ms
diff --git a/sys/dev/nxge/xgehal/xgehal-fifo-fp.c b/sys/dev/nxge/xgehal/xgehal-fifo-fp.c
index efc4d37..6c28c55 100644
--- a/sys/dev/nxge/xgehal/xgehal-fifo-fp.c
+++ b/sys/dev/nxge/xgehal/xgehal-fifo-fp.c
@@ -794,7 +794,7 @@ xge_hal_fifo_dtr_free(xge_hal_channel_h channelh, xge_hal_dtr_h dtr)
* in fifo descriptor.
* @channelh: Channel handle.
* @dtrh: Descriptor handle.
- * @frag_idx: Index of the data buffer in the caller's scatter-gather listá
+ * @frag_idx: Index of the data buffer in the caller's scatter-gather list
* (of buffers).
* @vaddr: Virtual address of the data buffer.
* @dma_pointer: DMA address of the data buffer referenced by @frag_idx.
@@ -1015,7 +1015,7 @@ xge_hal_fifo_dtr_buffer_finalize(xge_hal_channel_h channelh, xge_hal_dtr_h dtrh,
* descriptor.
* @channelh: Channel handle.
* @dtrh: Descriptor handle.
- * @frag_idx: Index of the data buffer in the caller's scatter-gather listá
+ * @frag_idx: Index of the data buffer in the caller's scatter-gather list
* (of buffers).
* @dma_pointer: DMA address of the data buffer referenced by @frag_idx.
* @size: Size of the data buffer (in bytes).
diff --git a/sys/dev/ofw/ofw_console.c b/sys/dev/ofw/ofw_console.c
index 62dbe51..e71d5c1 100644
--- a/sys/dev/ofw/ofw_console.c
+++ b/sys/dev/ofw/ofw_console.c
@@ -74,6 +74,8 @@ static cn_init_t ofw_cninit;
static cn_term_t ofw_cnterm;
static cn_getc_t ofw_cngetc;
static cn_putc_t ofw_cnputc;
+static cn_grab_t ofw_cngrab;
+static cn_ungrab_t ofw_cnungrab;
CONSOLE_DRIVER(ofw);
@@ -192,6 +194,16 @@ ofw_cnterm(struct consdev *cp)
{
}
+static void
+ofw_cngrab(struct consdev *cp)
+{
+}
+
+static void
+ofw_cnungrab(struct consdev *cp)
+{
+}
+
static int
ofw_cngetc(struct consdev *cp)
{
diff --git a/sys/dev/pccard/pccardvar.h b/sys/dev/pccard/pccardvar.h
index 1cfcd58..f98bcc8 100644
--- a/sys/dev/pccard/pccardvar.h
+++ b/sys/dev/pccard/pccardvar.h
@@ -106,7 +106,7 @@ typedef int (*pccard_product_match_fn) (device_t dev,
* make this inline so that we don't have to worry about dangling references
* to it in the modules or the code.
*/
-static __inline const struct pccard_product *
+static inline const struct pccard_product *
pccard_product_lookup(device_t dev, const struct pccard_product *tab,
size_t ent_size, pccard_product_match_fn matchfn)
{
@@ -150,31 +150,31 @@ pccard_product_lookup(device_t dev, const struct pccard_product *tab,
/* Convenience functions */
-static __inline int
+static inline int
pccard_cis_scan(device_t dev, pccard_scan_t fct, void *arg)
{
return (CARD_CIS_SCAN(device_get_parent(dev), dev, fct, arg));
}
-static __inline int
+static inline int
pccard_attr_read_1(device_t dev, uint32_t offset, uint8_t *val)
{
return (CARD_ATTR_READ(device_get_parent(dev), dev, offset, val));
}
-static __inline int
+static inline int
pccard_attr_write_1(device_t dev, uint32_t offset, uint8_t val)
{
return (CARD_ATTR_WRITE(device_get_parent(dev), dev, offset, val));
}
-static __inline int
+static inline int
pccard_ccr_read_1(device_t dev, uint32_t offset, uint8_t *val)
{
return (CARD_CCR_READ(device_get_parent(dev), dev, offset, val));
}
-static __inline int
+static inline int
pccard_ccr_write_1(device_t dev, uint32_t offset, uint8_t val)
{
return (CARD_CCR_WRITE(device_get_parent(dev), dev, offset, val));
@@ -199,7 +199,7 @@ enum {
};
#define PCCARD_ACCESSOR(A, B, T) \
-__inline static int \
+static inline int \
pccard_get_ ## A(device_t dev, T *t) \
{ \
return BUS_READ_IVAR(device_get_parent(dev), dev, \
diff --git a/sys/dev/pci/isa_pci.c b/sys/dev/pci/isa_pci.c
index 4f9e2a2..7819b7e 100644
--- a/sys/dev/pci/isa_pci.c
+++ b/sys/dev/pci/isa_pci.c
@@ -67,6 +67,7 @@ static device_method_t isab_methods[] = {
DEVMETHOD(device_resume, bus_generic_resume),
/* Bus interface */
+ DEVMETHOD(bus_add_child, bus_generic_add_child),
DEVMETHOD(bus_alloc_resource, isab_pci_alloc_resource),
DEVMETHOD(bus_release_resource, isab_pci_release_resource),
DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index 9ebb848..b4b67fb 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -1136,11 +1136,9 @@ pci_get_vpd_readonly_method(device_t dev, device_t child, const char *kw,
if (memcmp(kw, cfg->vpd.vpd_ros[i].keyword,
sizeof(cfg->vpd.vpd_ros[i].keyword)) == 0) {
*vptr = cfg->vpd.vpd_ros[i].value;
+ return (0);
}
- if (i != cfg->vpd.vpd_rocnt)
- return (0);
-
*vptr = NULL;
return (ENXIO);
}
diff --git a/sys/dev/pst/pst-iop.c b/sys/dev/pst/pst-iop.c
index d4e83f0..65f9267 100644
--- a/sys/dev/pst/pst-iop.c
+++ b/sys/dev/pst/pst-iop.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2001,2002,2003 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 2001,2002,2003 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/pst/pst-iop.h b/sys/dev/pst/pst-iop.h
index 59314ce..6532084 100644
--- a/sys/dev/pst/pst-iop.h
+++ b/sys/dev/pst/pst-iop.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2001,2002,2003 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 2001,2002,2003 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/pst/pst-pci.c b/sys/dev/pst/pst-pci.c
index c5f4a85..7070e6b 100644
--- a/sys/dev/pst/pst-pci.c
+++ b/sys/dev/pst/pst-pci.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2001,2002,2003 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 2001,2002,2003 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -95,7 +95,7 @@ iop_pci_attach(device_t dev)
sc->ibase = rman_get_virtual(sc->r_mem);
sc->reg = (struct i2o_registers *)sc->ibase;
sc->dev = dev;
- mtx_init(&sc->mtx, "pst lock", MTX_DEF, 0);
+ mtx_init(&sc->mtx, "pst lock", NULL, MTX_DEF);
if (!iop_init(sc))
return 0;
diff --git a/sys/dev/pst/pst-raid.c b/sys/dev/pst/pst-raid.c
index f14be91..e48b1c2 100644
--- a/sys/dev/pst/pst-raid.c
+++ b/sys/dev/pst/pst-raid.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2001,2002,2003 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 2001,2002,2003 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/qlxgb/qla_misc.c b/sys/dev/qlxgb/qla_misc.c
index c616d4f..fd86e2a 100644
--- a/sys/dev/qlxgb/qla_misc.c
+++ b/sys/dev/qlxgb/qla_misc.c
@@ -407,7 +407,7 @@ qla_crb_init(qla_host_t *ha)
addr_val_t *addr_val_map, *avmap;
qla_rd_flash32(ha, 0, &sig);
- QL_DPRINT2((ha->pci_dev, "%s: val[0] = 0x%08x\n", __func__, val));
+ QL_DPRINT2((ha->pci_dev, "%s: val[0] = 0x%08x\n", __func__, sig));
qla_rd_flash32(ha, 4, &val);
QL_DPRINT2((ha->pci_dev, "%s: val[4] = 0x%08x\n", __func__, val));
diff --git a/sys/dev/qlxgb/qla_os.c b/sys/dev/qlxgb/qla_os.c
index 1fc30f5..5dc3849 100644
--- a/sys/dev/qlxgb/qla_os.c
+++ b/sys/dev/qlxgb/qla_os.c
@@ -660,7 +660,6 @@ qla_init_ifnet(device_t dev, qla_host_t *ha)
if_initname(ifp, device_get_name(dev), device_get_unit(dev));
- ifp->if_mtu = ETHERMTU;
ifp->if_baudrate = (1 * 1000 * 1000 *1000);
ifp->if_init = qla_init;
ifp->if_softc = ha;
@@ -760,7 +759,7 @@ qla_set_multi(qla_host_t *ha, uint32_t add_multi)
int mcnt = 0;
struct ifnet *ifp = ha->ifp;
- IF_ADDR_LOCK(ifp);
+ if_maddr_rlock(ifp);
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
@@ -776,7 +775,7 @@ qla_set_multi(qla_host_t *ha, uint32_t add_multi)
mcnt++;
}
- IF_ADDR_UNLOCK(ifp);
+ if_maddr_runlock(ifp);
qla_hw_set_multi(ha, mta, mcnt, add_multi);
diff --git a/sys/dev/ral/rt2560.c b/sys/dev/ral/rt2560.c
index 6064707..9fdc157 100644
--- a/sys/dev/ral/rt2560.c
+++ b/sys/dev/ral/rt2560.c
@@ -85,9 +85,9 @@ __FBSDID("$FreeBSD$");
#endif
static struct ieee80211vap *rt2560_vap_create(struct ieee80211com *,
- const char name[IFNAMSIZ], int unit, int opmode,
- int flags, const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t mac[IEEE80211_ADDR_LEN]);
+ const char [IFNAMSIZ], int, enum ieee80211_opmode,
+ int, const uint8_t [IEEE80211_ADDR_LEN],
+ const uint8_t [IEEE80211_ADDR_LEN]);
static void rt2560_vap_delete(struct ieee80211vap *);
static void rt2560_dma_map_addr(void *, bus_dma_segment_t *, int,
int);
@@ -373,10 +373,10 @@ rt2560_detach(void *xsc)
}
static struct ieee80211vap *
-rt2560_vap_create(struct ieee80211com *ic,
- const char name[IFNAMSIZ], int unit, int opmode, int flags,
- const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t mac[IEEE80211_ADDR_LEN])
+rt2560_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit,
+ enum ieee80211_opmode opmode, int flags,
+ const uint8_t bssid[IEEE80211_ADDR_LEN],
+ const uint8_t mac[IEEE80211_ADDR_LEN])
{
struct ifnet *ifp = ic->ic_ifp;
struct rt2560_vap *rvp;
diff --git a/sys/dev/ral/rt2661.c b/sys/dev/ral/rt2661.c
index 372fcff..c4e8fe7 100644
--- a/sys/dev/ral/rt2661.c
+++ b/sys/dev/ral/rt2661.c
@@ -82,9 +82,9 @@ __FBSDID("$FreeBSD$");
#endif
static struct ieee80211vap *rt2661_vap_create(struct ieee80211com *,
- const char name[IFNAMSIZ], int unit, int opmode,
- int flags, const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t mac[IEEE80211_ADDR_LEN]);
+ const char [IFNAMSIZ], int, enum ieee80211_opmode,
+ int, const uint8_t [IEEE80211_ADDR_LEN],
+ const uint8_t [IEEE80211_ADDR_LEN]);
static void rt2661_vap_delete(struct ieee80211vap *);
static void rt2661_dma_map_addr(void *, bus_dma_segment_t *, int,
int);
@@ -368,10 +368,10 @@ rt2661_detach(void *xsc)
}
static struct ieee80211vap *
-rt2661_vap_create(struct ieee80211com *ic,
- const char name[IFNAMSIZ], int unit, int opmode, int flags,
- const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t mac[IEEE80211_ADDR_LEN])
+rt2661_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit,
+ enum ieee80211_opmode opmode, int flags,
+ const uint8_t bssid[IEEE80211_ADDR_LEN],
+ const uint8_t mac[IEEE80211_ADDR_LEN])
{
struct ifnet *ifp = ic->ic_ifp;
struct rt2661_vap *rvp;
diff --git a/sys/dev/random/harvest.c b/sys/dev/random/harvest.c
index aacba32..a1ff8dd 100644
--- a/sys/dev/random/harvest.c
+++ b/sys/dev/random/harvest.c
@@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$");
#include <sys/queue.h>
#include <sys/random.h>
#include <sys/selinfo.h>
+#include <sys/syslog.h>
#include <sys/systm.h>
#include <sys/sysctl.h>
@@ -48,6 +49,7 @@ static int read_random_phony(void *, int);
/* Structure holding the desired entropy sources */
struct harvest_select harvest = { 1, 1, 1, 0 };
+static int warned = 0;
/* hold the address of the routine which is actually called if
* the randomdev is loaded
@@ -71,6 +73,7 @@ random_yarrow_deinit_harvester(void)
{
reap_func = NULL;
read_func = read_random_phony;
+ warned = 0;
}
/* Entropy harvesting routine. This is supposed to be fast; do
@@ -108,6 +111,11 @@ read_random_phony(void *buf, int count)
u_long randval;
int size, i;
+ if (!warned) {
+ log(LOG_WARNING, "random device not loaded; using insecure entropy\n");
+ warned = 1;
+ }
+
/* srandom() is called in kern/init_main.c:proc0_post() */
/* Fill buf[] with random(9) output */
diff --git a/sys/dev/random/nehemiah.c b/sys/dev/random/nehemiah.c
index f91e228..b9f52e7 100644
--- a/sys/dev/random/nehemiah.c
+++ b/sys/dev/random/nehemiah.c
@@ -84,7 +84,7 @@ static uint8_t out[RANDOM_BLOCK_SIZE+7] __aligned(16);
static union VIA_ACE_CW acw __aligned(16);
-static struct fpu_kern_ctx fpu_ctx_save;
+static struct fpu_kern_ctx *fpu_ctx_save;
static struct mtx random_nehemiah_mtx;
@@ -135,11 +135,14 @@ random_nehemiah_init(void)
acw.field.round_count = 12;
mtx_init(&random_nehemiah_mtx, "random nehemiah", NULL, MTX_DEF);
+ fpu_ctx_save = fpu_kern_alloc_ctx(FPU_KERN_NORMAL);
}
void
random_nehemiah_deinit(void)
{
+
+ fpu_kern_free_ctx(fpu_ctx_save);
mtx_destroy(&random_nehemiah_mtx);
}
@@ -151,7 +154,7 @@ random_nehemiah_read(void *buf, int c)
uint8_t *p;
mtx_lock(&random_nehemiah_mtx);
- error = fpu_kern_enter(curthread, &fpu_ctx_save, FPU_KERN_NORMAL);
+ error = fpu_kern_enter(curthread, fpu_ctx_save, FPU_KERN_NORMAL);
if (error != 0) {
mtx_unlock(&random_nehemiah_mtx);
return (0);
@@ -196,7 +199,7 @@ random_nehemiah_read(void *buf, int c)
c = MIN(RANDOM_BLOCK_SIZE, c);
memcpy(buf, out, (size_t)c);
- fpu_kern_leave(curthread, &fpu_ctx_save);
+ fpu_kern_leave(curthread, fpu_ctx_save);
mtx_unlock(&random_nehemiah_mtx);
return (c);
}
diff --git a/sys/dev/random/probe.c b/sys/dev/random/probe.c
index 264f9d5..0bbfd95 100644
--- a/sys/dev/random/probe.c
+++ b/sys/dev/random/probe.c
@@ -36,7 +36,7 @@ __FBSDID("$FreeBSD$");
#include <sys/stdint.h>
#include <sys/sysctl.h>
-#if defined(__i386__) && !defined(PC98)
+#if defined(__amd64__) || (defined(__i386__) && !defined(PC98))
#include <machine/cpufunc.h>
#include <machine/cputypes.h>
#include <machine/md_var.h>
@@ -55,7 +55,7 @@ random_ident_hardware(struct random_systat *systat)
*systat = random_yarrow;
/* Then go looking for hardware */
-#if defined(__i386__) && !defined(PC98)
+#if defined(__amd64__) || (defined(__i386__) && !defined(PC98))
if (via_feature_rng & VIA_HAS_RNG) {
*systat = random_nehemiah;
}
diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c
index 92fbbfe..0142308 100644
--- a/sys/dev/re/if_re.c
+++ b/sys/dev/re/if_re.c
@@ -3558,7 +3558,6 @@ re_stop(struct rl_softc *sc)
}
/* Free the TX list buffers. */
-
for (i = 0; i < sc->rl_ldata.rl_tx_desc_cnt; i++) {
txd = &sc->rl_ldata.rl_tx_desc[i];
if (txd->tx_m != NULL) {
@@ -3572,11 +3571,10 @@ re_stop(struct rl_softc *sc)
}
/* Free the RX list buffers. */
-
for (i = 0; i < sc->rl_ldata.rl_rx_desc_cnt; i++) {
rxd = &sc->rl_ldata.rl_rx_desc[i];
if (rxd->rx_m != NULL) {
- bus_dmamap_sync(sc->rl_ldata.rl_tx_mtag,
+ bus_dmamap_sync(sc->rl_ldata.rl_rx_mtag,
rxd->rx_dmamap, BUS_DMASYNC_POSTREAD);
bus_dmamap_unload(sc->rl_ldata.rl_rx_mtag,
rxd->rx_dmamap);
@@ -3584,6 +3582,20 @@ re_stop(struct rl_softc *sc)
rxd->rx_m = NULL;
}
}
+
+ if ((sc->rl_flags & RL_FLAG_JUMBOV2) != 0) {
+ for (i = 0; i < sc->rl_ldata.rl_rx_desc_cnt; i++) {
+ rxd = &sc->rl_ldata.rl_jrx_desc[i];
+ if (rxd->rx_m != NULL) {
+ bus_dmamap_sync(sc->rl_ldata.rl_jrx_mtag,
+ rxd->rx_dmamap, BUS_DMASYNC_POSTREAD);
+ bus_dmamap_unload(sc->rl_ldata.rl_jrx_mtag,
+ rxd->rx_dmamap);
+ m_freem(rxd->rx_m);
+ rxd->rx_m = NULL;
+ }
+ }
+ }
}
/*
@@ -3796,7 +3808,7 @@ re_setwol(struct rl_softc *sc)
/* Config register write done. */
CSR_WRITE_1(sc, RL_EECMD, RL_EEMODE_OFF);
- if ((ifp->if_capenable & IFCAP_WOL) != 0 &&
+ if ((ifp->if_capenable & IFCAP_WOL) == 0 &&
(sc->rl_flags & RL_FLAG_PHYWAKE_PM) != 0)
CSR_WRITE_1(sc, RL_PMCH, CSR_READ_1(sc, RL_PMCH) & ~0x80);
/*
diff --git a/sys/dev/rt/if_rt.c b/sys/dev/rt/if_rt.c
index a1667e5..6649782 100644
--- a/sys/dev/rt/if_rt.c
+++ b/sys/dev/rt/if_rt.c
@@ -383,7 +383,6 @@ rt_attach(device_t dev)
ifp->if_init = rt_init;
ifp->if_ioctl = rt_ioctl;
ifp->if_start = rt_start;
- ifp->if_mtu = ETHERMTU;
#define RT_TX_QLEN 256
IFQ_SET_MAXLEN(&ifp->if_snd, RT_TX_QLEN);
diff --git a/sys/dev/sfxge/sfxge_port.c b/sys/dev/sfxge/sfxge_port.c
index a38f40a..2c7f772 100644
--- a/sys/dev/sfxge/sfxge_port.c
+++ b/sys/dev/sfxge/sfxge_port.c
@@ -301,7 +301,7 @@ sfxge_mac_filter_set_locked(struct sfxge_softc *sc)
* 0xff. */
bucket[0xff] = 1;
- IF_ADDR_LOCK(ifp);
+ if_maddr_rlock(ifp);
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
if (ifma->ifma_addr->sa_family == AF_LINK) {
sa = (struct sockaddr_dl *)ifma->ifma_addr;
@@ -309,7 +309,7 @@ sfxge_mac_filter_set_locked(struct sfxge_softc *sc)
bucket[index] = 1;
}
}
- IF_ADDR_UNLOCK(ifp);
+ if_maddr_runlock(ifp);
}
return efx_mac_hash_set(enp, bucket);
}
@@ -391,10 +391,10 @@ sfxge_port_start(struct sfxge_softc *sc)
goto fail2;
/* Set the unicast address */
- IF_ADDR_LOCK(ifp);
+ if_addr_rlock(ifp);
bcopy(LLADDR((struct sockaddr_dl *)ifp->if_addr->ifa_addr),
mac_addr, sizeof(mac_addr));
- IF_ADDR_UNLOCK(ifp);
+ if_addr_runlock(ifp);
if ((rc = efx_mac_addr_set(enp, mac_addr)) != 0)
goto fail;
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index 7e2054e..d389f45 100644
--- a/sys/dev/sio/sio.c
+++ b/sys/dev/sio/sio.c
@@ -2293,6 +2293,8 @@ static cn_init_t sio_cninit;
static cn_term_t sio_cnterm;
static cn_getc_t sio_cngetc;
static cn_putc_t sio_cnputc;
+static cn_grab_t sio_cngrab;
+static cn_ungrab_t sio_cnungrab;
CONSOLE_DRIVER(sio);
@@ -2512,6 +2514,16 @@ sio_cnterm(cp)
comconsole = -1;
}
+static void
+sio_cngrab(struct consdev *cp)
+{
+}
+
+static void
+sio_cnungrab(struct consdev *cp)
+{
+}
+
static int
sio_cngetc(struct consdev *cd)
{
diff --git a/sys/dev/sis/if_sis.c b/sys/dev/sis/if_sis.c
index ba8106e..c5bb8a0 100644
--- a/sys/dev/sis/if_sis.c
+++ b/sys/dev/sis/if_sis.c
@@ -1054,7 +1054,6 @@ sis_attach(device_t dev)
}
ifp->if_softc = sc;
if_initname(ifp, device_get_name(dev), device_get_unit(dev));
- ifp->if_mtu = ETHERMTU;
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
ifp->if_ioctl = sis_ioctl;
ifp->if_start = sis_start;
diff --git a/sys/dev/sk/if_sk.c b/sys/dev/sk/if_sk.c
index b217784..836c34d 100644
--- a/sys/dev/sk/if_sk.c
+++ b/sys/dev/sk/if_sk.c
@@ -1350,7 +1350,6 @@ sk_attach(dev)
}
ifp->if_softc = sc_if;
if_initname(ifp, device_get_name(dev), device_get_unit(dev));
- ifp->if_mtu = ETHERMTU;
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
/*
* SK_GENESIS has a bug in checksum offload - From linux.
diff --git a/sys/dev/sn/if_sn.c b/sys/dev/sn/if_sn.c
index 0f86f92..8aef549 100644
--- a/sys/dev/sn/if_sn.c
+++ b/sys/dev/sn/if_sn.c
@@ -201,7 +201,6 @@ sn_attach(device_t dev)
}
ifp->if_softc = sc;
if_initname(ifp, device_get_name(dev), device_get_unit(dev));
- ifp->if_mtu = ETHERMTU;
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
ifp->if_start = snstart;
ifp->if_ioctl = snioctl;
diff --git a/sys/dev/snc/dp83932.c b/sys/dev/snc/dp83932.c
index 0b62053..f86ad7e 100644
--- a/sys/dev/snc/dp83932.c
+++ b/sys/dev/snc/dp83932.c
@@ -176,7 +176,6 @@ sncconfig(sc, media, nmedia, defmedia, myea)
ifp->if_start = sncstart;
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
ifp->if_init = sncinit;
- ifp->if_mtu = ETHERMTU;
IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen);
/* Initialize media goo. */
diff --git a/sys/dev/sound/pci/allegro_code.h b/sys/dev/sound/pci/allegro_code.h
new file mode 100644
index 0000000..4d5c173
--- /dev/null
+++ b/sys/dev/sound/pci/allegro_code.h
@@ -0,0 +1,218 @@
+/* $FreeBSD$ */
+/*-
+ * Copyright (C) 1996-2008, 4Front Technologies
+ * Copyright (C) 1997-1999 ESS Technology, Inc
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ */
+
+/*---------------------------------------------------------------------------
+ * This source code, its compiled object code, and its associated data sets
+ * are copyright (C) 1997-1999 ESS Technology, Inc. This source code and its
+ * associated data sets are trade secrets of ESS Technology, Inc.
+ *---------------------------------------------------------------------------
+ * DESCRIPTION: DSP binaries
+ *---------------------------------------------------------------------------
+ * AUTHOR: Henry Tang / Hong Kim / Alger Yeung/Don Kim
+ *---------------------------------------------------------------------------
+ * For practical purposes we only include what is necessary for current
+ * Maestro3 driver. Files used in this header include:
+ * kernel.dat
+ * 400m_src.dat
+ * mini_src_lpf from srcmgr.h
+ *---------------------------------------------------------------------------
+ */
+#ifndef _DEV_SOUND_PCI_ALLEGRO_CODE_H
+#define _DEV_SOUND_PCI_ALLEGRO_CODE_H
+
+/*
+ * Kernel
+ */
+
+uint16_t gaw_kernel_vect_code[] = {
+ 0x7980, 0x0030, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x00FB, 0x7980,
+ 0x00DD, 0x7980, 0x03B4, 0x7980, 0x0332, 0x7980, 0x0287, 0x7980, 0x03B4,
+ 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x031A, 0x7980,
+ 0x03B4, 0x7980, 0x022F, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4,
+ 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x0063, 0x7980, 0x006B, 0x7980,
+ 0x03B4, 0x7980, 0x03B4, 0xBF80, 0x2C7C, 0x8806, 0x8804, 0xBE40, 0xBC20,
+ 0xAE09, 0x1000, 0xAE0A, 0x0001, 0x6938, 0xEB08, 0x0053, 0x695A, 0xEB08,
+ 0x00D6, 0x0009, 0x8B88, 0x6980, 0xE388, 0x0036, 0xBE30, 0xBC20, 0x6909,
+ 0xB801, 0x9009, 0xBE41, 0xBE41, 0x6928, 0xEB88, 0x0078, 0xBE41, 0xBE40,
+ 0x7980, 0x0038, 0xBE41, 0xBE41, 0x903A, 0x6938, 0xE308, 0x0056, 0x903A,
+ 0xBE41, 0xBE40, 0xEF00, 0x903A, 0x6939, 0xE308, 0x005E, 0x903A, 0xEF00,
+ 0x690B, 0x660C, 0xEF8C, 0x690A, 0x660C, 0x620B, 0x6609, 0xEF00, 0x6910,
+ 0x660F, 0xEF04, 0xE388, 0x0075, 0x690E, 0x660F, 0x6210, 0x660D, 0xEF00,
+ 0x690E, 0x660D, 0xEF00, 0xAE70, 0x0001, 0xBC20, 0xAE27, 0x0001, 0x6939,
+ 0xEB08, 0x005D, 0x6926, 0xB801, 0x9026, 0x0026, 0x8B88, 0x6980, 0xE388,
+ 0x00CB, 0x9028, 0x0D28, 0x4211, 0xE100, 0x007A, 0x4711, 0xE100, 0x00A0,
+ 0x7A80, 0x0063, 0xB811, 0x660A, 0x6209, 0xE304, 0x007A, 0x0C0B, 0x4005,
+ 0x100A, 0xBA01, 0x9012, 0x0C12, 0x4002, 0x7980, 0x00AF, 0x7A80, 0x006B,
+ 0xBE02, 0x620E, 0x660D, 0xBA10, 0xE344, 0x007A, 0x0C10, 0x4005, 0x100E,
+ 0xBA01, 0x9012, 0x0C12, 0x4002, 0x1003, 0xBA02, 0x9012, 0x0C12, 0x4000,
+ 0x1003, 0xE388, 0x00BA, 0x1004, 0x7980, 0x00BC, 0x1004, 0xBA01, 0x9012,
+ 0x0C12, 0x4001, 0x0C05, 0x4003, 0x0C06, 0x4004, 0x1011, 0xBFB0, 0x01FF,
+ 0x9012, 0x0C12, 0x4006, 0xBC20, 0xEF00, 0xAE26, 0x1028, 0x6970, 0xBFD0,
+ 0x0001, 0x9070, 0xE388, 0x007A, 0xAE28, 0x0000, 0xEF00, 0xAE70, 0x0300,
+ 0x0C70, 0xB00C, 0xAE5A, 0x0000, 0xEF00, 0x7A80, 0x038A, 0x697F, 0xB801,
+ 0x907F, 0x0056, 0x8B88, 0x0CA0, 0xB008, 0xAF71, 0xB000, 0x4E71, 0xE200,
+ 0x00F3, 0xAE56, 0x1057, 0x0056, 0x0CA0, 0xB008, 0x8056, 0x7980, 0x03A1,
+ 0x0810, 0xBFA0, 0x1059, 0xE304, 0x03A1, 0x8056, 0x7980, 0x03A1, 0x7A80,
+ 0x038A, 0xBF01, 0xBE43, 0xBE59, 0x907C, 0x6937, 0xE388, 0x010D, 0xBA01,
+ 0xE308, 0x010C, 0xAE71, 0x0004, 0x0C71, 0x5000, 0x6936, 0x9037, 0xBF0A,
+ 0x109E, 0x8B8A, 0xAF80, 0x8014, 0x4C80, 0xBF0A, 0x0560, 0xF500, 0xBF0A,
+ 0x0520, 0xB900, 0xBB17, 0x90A0, 0x6917, 0xE388, 0x0148, 0x0D17, 0xE100,
+ 0x0127, 0xBF0C, 0x0578, 0xBF0D, 0x057C, 0x7980, 0x012B, 0xBF0C, 0x0538,
+ 0xBF0D, 0x053C, 0x6900, 0xE308, 0x0135, 0x8B8C, 0xBE59, 0xBB07, 0x90A0,
+ 0xBC20, 0x7980, 0x0157, 0x030C, 0x8B8B, 0xB903, 0x8809, 0xBEC6, 0x013E,
+ 0x69AC, 0x90AB, 0x69AD, 0x90AB, 0x0813, 0x660A, 0xE344, 0x0144, 0x0309,
+ 0x830C, 0xBC20, 0x7980, 0x0157, 0x6955, 0xE388, 0x0157, 0x7C38, 0xBF0B,
+ 0x0578, 0xF500, 0xBF0B, 0x0538, 0xB907, 0x8809, 0xBEC6, 0x0156, 0x10AB,
+ 0x90AA, 0x6974, 0xE388, 0x0163, 0xAE72, 0x0540, 0xF500, 0xAE72, 0x0500,
+ 0xAE61, 0x103B, 0x7A80, 0x02F6, 0x6978, 0xE388, 0x0182, 0x8B8C, 0xBF0C,
+ 0x0560, 0xE500, 0x7C40, 0x0814, 0xBA20, 0x8812, 0x733D, 0x7A80, 0x0380,
+ 0x733E, 0x7A80, 0x0380, 0x8B8C, 0xBF0C, 0x056C, 0xE500, 0x7C40, 0x0814,
+ 0xBA2C, 0x8812, 0x733F, 0x7A80, 0x0380, 0x7340, 0x7A80, 0x0380, 0x6975,
+ 0xE388, 0x018E, 0xAE72, 0x0548, 0xF500, 0xAE72, 0x0508, 0xAE61, 0x1041,
+ 0x7A80, 0x02F6, 0x6979, 0xE388, 0x01AD, 0x8B8C, 0xBF0C, 0x0560, 0xE500,
+ 0x7C40, 0x0814, 0xBA18, 0x8812, 0x7343, 0x7A80, 0x0380, 0x7344, 0x7A80,
+ 0x0380, 0x8B8C, 0xBF0C, 0x056C, 0xE500, 0x7C40, 0x0814, 0xBA24, 0x8812,
+ 0x7345, 0x7A80, 0x0380, 0x7346, 0x7A80, 0x0380, 0x6976, 0xE388, 0x01B9,
+ 0xAE72, 0x0558, 0xF500, 0xAE72, 0x0518, 0xAE61, 0x1047, 0x7A80, 0x02F6,
+ 0x697A, 0xE388, 0x01D8, 0x8B8C, 0xBF0C, 0x0560, 0xE500, 0x7C40, 0x0814,
+ 0xBA08, 0x8812, 0x7349, 0x7A80, 0x0380, 0x734A, 0x7A80, 0x0380, 0x8B8C,
+ 0xBF0C, 0x056C, 0xE500, 0x7C40, 0x0814, 0xBA14, 0x8812, 0x734B, 0x7A80,
+ 0x0380, 0x734C, 0x7A80, 0x0380, 0xBC21, 0xAE1C, 0x1090, 0x8B8A, 0xBF0A,
+ 0x0560, 0xE500, 0x7C40, 0x0812, 0xB804, 0x8813, 0x8B8D, 0xBF0D, 0x056C,
+ 0xE500, 0x7C40, 0x0815, 0xB804, 0x8811, 0x7A80, 0x034A, 0x8B8A, 0xBF0A,
+ 0x0560, 0xE500, 0x7C40, 0x731F, 0xB903, 0x8809, 0xBEC6, 0x01F9, 0x548A,
+ 0xBE03, 0x98A0, 0x7320, 0xB903, 0x8809, 0xBEC6, 0x0201, 0x548A, 0xBE03,
+ 0x98A0, 0x1F20, 0x2F1F, 0x9826, 0xBC20, 0x6935, 0xE388, 0x03A1, 0x6933,
+ 0xB801, 0x9033, 0xBFA0, 0x02EE, 0xE308, 0x03A1, 0x9033, 0xBF00, 0x6951,
+ 0xE388, 0x021F, 0x7334, 0xBE80, 0x5760, 0xBE03, 0x9F7E, 0xBE59, 0x9034,
+ 0x697E, 0x0D51, 0x9013, 0xBC20, 0x695C, 0xE388, 0x03A1, 0x735E, 0xBE80,
+ 0x5760, 0xBE03, 0x9F7E, 0xBE59, 0x905E, 0x697E, 0x0D5C, 0x9013, 0x7980,
+ 0x03A1, 0x7A80, 0x038A, 0xBF01, 0xBE43, 0x6977, 0xE388, 0x024E, 0xAE61,
+ 0x104D, 0x0061, 0x8B88, 0x6980, 0xE388, 0x024E, 0x9071, 0x0D71, 0x000B,
+ 0xAFA0, 0x8010, 0xAFA0, 0x8010, 0x0810, 0x660A, 0xE308, 0x0249, 0x0009,
+ 0x0810, 0x660C, 0xE388, 0x024E, 0x800B, 0xBC20, 0x697B, 0xE388, 0x03A1,
+ 0xBF0A, 0x109E, 0x8B8A, 0xAF80, 0x8014, 0x4C80, 0xE100, 0x0266, 0x697C,
+ 0xBF90, 0x0560, 0x9072, 0x0372, 0x697C, 0xBF90, 0x0564, 0x9073, 0x0473,
+ 0x7980, 0x0270, 0x697C, 0xBF90, 0x0520, 0x9072, 0x0372, 0x697C, 0xBF90,
+ 0x0524, 0x9073, 0x0473, 0x697C, 0xB801, 0x907C, 0xBF0A, 0x10FD, 0x8B8A,
+ 0xAF80, 0x8010, 0x734F, 0x548A, 0xBE03, 0x9880, 0xBC21, 0x7326, 0x548B,
+ 0xBE03, 0x618B, 0x988C, 0xBE03, 0x6180, 0x9880, 0x7980, 0x03A1, 0x7A80,
+ 0x038A, 0x0D28, 0x4711, 0xE100, 0x02BE, 0xAF12, 0x4006, 0x6912, 0xBFB0,
+ 0x0C00, 0xE388, 0x02B6, 0xBFA0, 0x0800, 0xE388, 0x02B2, 0x6912, 0xBFB0,
+ 0x0C00, 0xBFA0, 0x0400, 0xE388, 0x02A3, 0x6909, 0x900B, 0x7980, 0x02A5,
+ 0xAF0B, 0x4005, 0x6901, 0x9005, 0x6902, 0x9006, 0x4311, 0xE100, 0x02ED,
+ 0x6911, 0xBFC0, 0x2000, 0x9011, 0x7980, 0x02ED, 0x6909, 0x900B, 0x7980,
+ 0x02B8, 0xAF0B, 0x4005, 0xAF05, 0x4003, 0xAF06, 0x4004, 0x7980, 0x02ED,
+ 0xAF12, 0x4006, 0x6912, 0xBFB0, 0x0C00, 0xE388, 0x02E7, 0xBFA0, 0x0800,
+ 0xE388, 0x02E3, 0x6912, 0xBFB0, 0x0C00, 0xBFA0, 0x0400, 0xE388, 0x02D4,
+ 0x690D, 0x9010, 0x7980, 0x02D6, 0xAF10, 0x4005, 0x6901, 0x9005, 0x6902,
+ 0x9006, 0x4311, 0xE100, 0x02ED, 0x6911, 0xBFC0, 0x2000, 0x9011, 0x7980,
+ 0x02ED, 0x690D, 0x9010, 0x7980, 0x02E9, 0xAF10, 0x4005, 0xAF05, 0x4003,
+ 0xAF06, 0x4004, 0xBC20, 0x6970, 0x9071, 0x7A80, 0x0078, 0x6971, 0x9070,
+ 0x7980, 0x03A1, 0xBC20, 0x0361, 0x8B8B, 0x6980, 0xEF88, 0x0272, 0x0372,
+ 0x7804, 0x9071, 0x0D71, 0x8B8A, 0x000B, 0xB903, 0x8809, 0xBEC6, 0x0309,
+ 0x69A8, 0x90AB, 0x69A8, 0x90AA, 0x0810, 0x660A, 0xE344, 0x030F, 0x0009,
+ 0x0810, 0x660C, 0xE388, 0x0314, 0x800B, 0xBC20, 0x6961, 0xB801, 0x9061,
+ 0x7980, 0x02F7, 0x7A80, 0x038A, 0x5D35, 0x0001, 0x6934, 0xB801, 0x9034,
+ 0xBF0A, 0x109E, 0x8B8A, 0xAF80, 0x8014, 0x4880, 0xAE72, 0x0550, 0xF500,
+ 0xAE72, 0x0510, 0xAE61, 0x1051, 0x7A80, 0x02F6, 0x7980, 0x03A1, 0x7A80,
+ 0x038A, 0x5D35, 0x0002, 0x695E, 0xB801, 0x905E, 0xBF0A, 0x109E, 0x8B8A,
+ 0xAF80, 0x8014, 0x4780, 0xAE72, 0x0558, 0xF500, 0xAE72, 0x0518, 0xAE61,
+ 0x105C, 0x7A80, 0x02F6, 0x7980, 0x03A1, 0x001C, 0x8B88, 0x6980, 0xEF88,
+ 0x901D, 0x0D1D, 0x100F, 0x6610, 0xE38C, 0x0358, 0x690E, 0x6610, 0x620F,
+ 0x660D, 0xBA0F, 0xE301, 0x037A, 0x0410, 0x8B8A, 0xB903, 0x8809, 0xBEC6,
+ 0x036C, 0x6A8C, 0x61AA, 0x98AB, 0x6A8C, 0x61AB, 0x98AD, 0x6A8C, 0x61AD,
+ 0x98A9, 0x6A8C, 0x61A9, 0x98AA, 0x7C04, 0x8B8B, 0x7C04, 0x8B8D, 0x7C04,
+ 0x8B89, 0x7C04, 0x0814, 0x660E, 0xE308, 0x0379, 0x040D, 0x8410, 0xBC21,
+ 0x691C, 0xB801, 0x901C, 0x7980, 0x034A, 0xB903, 0x8809, 0x8B8A, 0xBEC6,
+ 0x0388, 0x54AC, 0xBE03, 0x618C, 0x98AA, 0xEF00, 0xBC20, 0xBE46, 0x0809,
+ 0x906B, 0x080A, 0x906C, 0x080B, 0x906D, 0x081A, 0x9062, 0x081B, 0x9063,
+ 0x081E, 0x9064, 0xBE59, 0x881E, 0x8065, 0x8166, 0x8267, 0x8368, 0x8469,
+ 0x856A, 0xEF00, 0xBC20, 0x696B, 0x8809, 0x696C, 0x880A, 0x696D, 0x880B,
+ 0x6962, 0x881A, 0x6963, 0x881B, 0x6964, 0x881E, 0x0065, 0x0166, 0x0267,
+ 0x0368, 0x0469, 0x056A, 0xBE3A,
+};
+
+/*
+ * MINI Sample Rate Conversion
+ */
+
+uint16_t gaw_minisrc_code_0400[] = {
+ 0xBF80, 0x101E, 0x906E, 0x006E, 0x8B88, 0x6980, 0xEF88, 0x906F, 0x0D6F,
+ 0x6900, 0xEB08, 0x0412, 0xBC20, 0x696E, 0xB801, 0x906E, 0x7980, 0x0403,
+ 0xB90E, 0x8807, 0xBE43, 0xBF01, 0xBE47, 0xBE41, 0x7A80, 0x002A, 0xBE40,
+ 0x3029, 0xEFCC, 0xBE41, 0x7A80, 0x0028, 0xBE40, 0x3028, 0xEFCC, 0x6907,
+ 0xE308, 0x042A, 0x6909, 0x902C, 0x7980, 0x042C, 0x690D, 0x902C, 0x1009,
+ 0x881A, 0x100A, 0xBA01, 0x881B, 0x100D, 0x881C, 0x100E, 0xBA01, 0x881D,
+ 0xBF80, 0x00ED, 0x881E, 0x050C, 0x0124, 0xB904, 0x9027, 0x6918, 0xE308,
+ 0x04B3, 0x902D, 0x6913, 0xBFA0, 0x7598, 0xF704, 0xAE2D, 0x00FF, 0x8B8D,
+ 0x6919, 0xE308, 0x0463, 0x691A, 0xE308, 0x0456, 0xB907, 0x8809, 0xBEC6,
+ 0x0453, 0x10A9, 0x90AD, 0x7980, 0x047C, 0xB903, 0x8809, 0xBEC6, 0x0460,
+ 0x1889, 0x6C22, 0x90AD, 0x10A9, 0x6E23, 0x6C22, 0x90AD, 0x7980, 0x047C,
+ 0x101A, 0xE308, 0x046F, 0xB903, 0x8809, 0xBEC6, 0x046C, 0x10A9, 0x90A0,
+ 0x90AD, 0x7980, 0x047C, 0xB901, 0x8809, 0xBEC6, 0x047B, 0x1889, 0x6C22,
+ 0x90A0, 0x90AD, 0x10A9, 0x6E23, 0x6C22, 0x90A0, 0x90AD, 0x692D, 0xE308,
+ 0x049C, 0x0124, 0xB703, 0xB902, 0x8818, 0x8B89, 0x022C, 0x108A, 0x7C04,
+ 0x90A0, 0x692B, 0x881F, 0x7E80, 0x055B, 0x692A, 0x8809, 0x8B89, 0x99A0,
+ 0x108A, 0x90A0, 0x692B, 0x881F, 0x7E80, 0x055B, 0x692A, 0x8809, 0x8B89,
+ 0x99AF, 0x7B99, 0x0484, 0x0124, 0x060F, 0x101B, 0x2013, 0x901B, 0xBFA0,
+ 0x7FFF, 0xE344, 0x04AC, 0x901B, 0x8B89, 0x7A80, 0x051A, 0x6927, 0xBA01,
+ 0x9027, 0x7A80, 0x0523, 0x6927, 0xE308, 0x049E, 0x7980, 0x050F, 0x0624,
+ 0x1026, 0x2013, 0x9026, 0xBFA0, 0x7FFF, 0xE304, 0x04C0, 0x8B8D, 0x7A80,
+ 0x051A, 0x7980, 0x04B4, 0x9026, 0x1013, 0x3026, 0x901B, 0x8B8D, 0x7A80,
+ 0x051A, 0x7A80, 0x0523, 0x1027, 0xBA01, 0x9027, 0xE308, 0x04B4, 0x0124,
+ 0x060F, 0x8B89, 0x691A, 0xE308, 0x04EA, 0x6919, 0xE388, 0x04E0, 0xB903,
+ 0x8809, 0xBEC6, 0x04DD, 0x1FA0, 0x2FAE, 0x98A9, 0x7980, 0x050F, 0xB901,
+ 0x8818, 0xB907, 0x8809, 0xBEC6, 0x04E7, 0x10EE, 0x90A9, 0x7980, 0x050F,
+ 0x6919, 0xE308, 0x04FE, 0xB903, 0x8809, 0xBE46, 0xBEC6, 0x04FA, 0x17A0,
+ 0xBE1E, 0x1FAE, 0xBFBF, 0xFF00, 0xBE13, 0xBFDF, 0x8080, 0x99A9, 0xBE47,
+ 0x7980, 0x050F, 0xB901, 0x8809, 0xBEC6, 0x050E, 0x16A0, 0x26A0, 0xBFB7,
+ 0xFF00, 0xBE1E, 0x1EA0, 0x2EAE, 0xBFBF, 0xFF00, 0xBE13, 0xBFDF, 0x8080,
+ 0x99A9, 0x850C, 0x860F, 0x6907, 0xE388, 0x0516, 0x0D07, 0x8510, 0xBE59,
+ 0x881E, 0xBE4A, 0xEF00, 0x101E, 0x901C, 0x101F, 0x901D, 0x10A0, 0x901E,
+ 0x10A0, 0x901F, 0xEF00, 0x101E, 0x301C, 0x9020, 0x731B, 0x5420, 0xBE03,
+ 0x9825, 0x1025, 0x201C, 0x9025, 0x7325, 0x5414, 0xBE03, 0x8B8E, 0x9880,
+ 0x692F, 0xE388, 0x0539, 0xBE59, 0xBB07, 0x6180, 0x9880, 0x8BA0, 0x101F,
+ 0x301D, 0x9021, 0x731B, 0x5421, 0xBE03, 0x982E, 0x102E, 0x201D, 0x902E,
+ 0x732E, 0x5415, 0xBE03, 0x9880, 0x692F, 0xE388, 0x054F, 0xBE59, 0xBB07,
+ 0x6180, 0x9880, 0x8BA0, 0x6918, 0xEF08, 0x7325, 0x5416, 0xBE03, 0x98A0,
+ 0x732E, 0x5417, 0xBE03, 0x98A0, 0xEF00, 0x8BA0, 0xBEC6, 0x056B, 0xBE59,
+ 0xBB04, 0xAA90, 0xBE04, 0xBE1E, 0x99E0, 0x8BE0, 0x69A0, 0x90D0, 0x69A0,
+ 0x90D0, 0x081F, 0xB805, 0x881F, 0x8B90, 0x69A0, 0x90D0, 0x69A0, 0x9090,
+ 0x8BD0, 0x8BD8, 0xBE1F, 0xEF00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+};
+
+uint16_t minisrc_lpf[10] = {
+ 0X0743, 0X1104, 0X0A4C, 0XF88D, 0X242C,
+ 0X1023, 0X1AA9, 0X0B60, 0XEFDD, 0X186F
+};
+
+#endif /* !_DEV_SOUND_PCI_ALLEGRO_CODE_H */
diff --git a/sys/dev/sound/pci/allegro_reg.h b/sys/dev/sound/pci/allegro_reg.h
new file mode 100644
index 0000000..759e8e8
--- /dev/null
+++ b/sys/dev/sound/pci/allegro_reg.h
@@ -0,0 +1,790 @@
+/* $FreeBSD$ */
+/*-
+ * Copyright (c) 1996-2008, 4Front Technologies
+ * Copyright (C) 1992-2000 Don Kim (don.kim@esstech.com)
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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, WHETHERIN 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.
+ *
+ */
+
+/*---------------------------------------------------------------------------
+ * Copyright (C) 1997-1999, ESS Technology, Inc.
+ * This source code, its compiled object code, and its associated data sets
+ * are copyright (C) 1997-1999 ESS Technology, Inc.
+ *---------------------------------------------------------------------------
+ * This header contains data structures and registers taken from the
+ * 4Front OSS Allegro BSD licensed driver (in the Attic/ directory).
+ * Files used for this header include:
+ * hardware.h
+ * kernel.h and hckernel.h
+ * srcmgr.h
+ *---------------------------------------------------------------------------
+ */
+
+#ifndef _DEV_SOUND_PCI_ALLEGRO_REG_H
+#define _DEV_SOUND_PCI_ALLEGRO_REG_H
+
+/* Allegro PCI configuration registers */
+#define PCI_LEGACY_AUDIO_CTRL 0x40
+#define SOUND_BLASTER_ENABLE 0x00000001
+#define FM_SYNTHESIS_ENABLE 0x00000002
+#define GAME_PORT_ENABLE 0x00000004
+#define MPU401_IO_ENABLE 0x00000008
+#define MPU401_IRQ_ENABLE 0x00000010
+#define ALIAS_10BIT_IO 0x00000020
+#define SB_DMA_MASK 0x000000C0
+#define SB_DMA_0 0x00000040
+#define SB_DMA_1 0x00000040
+#define SB_DMA_R 0x00000080
+#define SB_DMA_3 0x000000C0
+#define SB_IRQ_MASK 0x00000700
+#define SB_IRQ_5 0x00000000
+#define SB_IRQ_7 0x00000100
+#define SB_IRQ_9 0x00000200
+#define SB_IRQ_10 0x00000300
+#define MIDI_IRQ_MASK 0x00003800
+#define SERIAL_IRQ_ENABLE 0x00004000
+#define DISABLE_LEGACY 0x00008000
+
+#define PCI_ALLEGRO_CONFIG 0x50
+#define SB_ADDR_240 0x00000004
+#define MPU_ADDR_MASK 0x00000018
+#define MPU_ADDR_330 0x00000000
+#define MPU_ADDR_300 0x00000008
+#define MPU_ADDR_320 0x00000010
+#define MPU_ADDR_340 0x00000018
+#define USE_PCI_TIMING 0x00000040
+#define POSTED_WRITE_ENABLE 0x00000080
+#define DMA_POLICY_MASK 0x00000700
+#define DMA_DDMA 0x00000000
+#define DMA_TDMA 0x00000100
+#define DMA_PCPCI 0x00000200
+#define DMA_WBDMA16 0x00000400
+#define DMA_WBDMA4 0x00000500
+#define DMA_WBDMA2 0x00000600
+#define DMA_WBDMA1 0x00000700
+#define DMA_SAFE_GUARD 0x00000800
+#define HI_PERF_GP_ENABLE 0x00001000
+#define PIC_SNOOP_MODE_0 0x00002000
+#define PIC_SNOOP_MODE_1 0x00004000
+#define SOUNDBLASTER_IRQ_MASK 0x00008000
+#define RING_IN_ENABLE 0x00010000
+#define SPDIF_TEST_MODE 0x00020000
+#define CLK_MULT_MODE_SELECT_2 0x00040000
+#define EEPROM_WRITE_ENABLE 0x00080000
+#define CODEC_DIR_IN 0x00100000
+#define HV_BUTTON_FROM_GD 0x00200000
+#define REDUCED_DEBOUNCE 0x00400000
+#define HV_CTRL_ENABLE 0x00800000
+#define SPDIF_ENABLE 0x01000000
+#define CLK_DIV_SELECT 0x06000000
+#define CLK_DIV_BY_48 0x00000000
+#define CLK_DIV_BY_49 0x02000000
+#define CLK_DIV_BY_50 0x04000000
+#define CLK_DIV_RESERVED 0x06000000
+#define PM_CTRL_ENABLE 0x08000000
+#define CLK_MULT_MODE_SELECT 0x30000000
+#define CLK_MULT_MODE_SHIFT 28
+#define CLK_MULT_MODE_0 0x00000000
+#define CLK_MULT_MODE_1 0x10000000
+#define CLK_MULT_MODE_2 0x20000000
+#define CLK_MULT_MODE_3 0x30000000
+#define INT_CLK_SELECT 0x40000000
+#define INT_CLK_MULT_RESET 0x80000000
+
+/* M3 */
+#define INT_CLK_SRC_NOT_PCI 0x00100000
+#define INT_CLK_MULT_ENABLE 0x80000000
+
+#define PCI_ACPI_CONTROL 0x54
+#define PCI_ACPI_D0 0x00000000
+#define PCI_ACPI_D1 0xB4F70000
+#define PCI_ACPI_D2 0xB4F7B4F7
+
+#define PCI_USER_CONFIG 0x58
+#define EXT_PCI_MASTER_ENABLE 0x00000001
+#define SPDIF_OUT_SELECT 0x00000002
+#define TEST_PIN_DIR_CTRL 0x00000004
+#define AC97_CODEC_TEST 0x00000020
+#define TRI_STATE_BUFFER 0x00000080
+#define IN_CLK_12MHZ_SELECT 0x00000100
+#define MULTI_FUNC_DISABLE 0x00000200
+#define EXT_MASTER_PAIR_SEL 0x00000400
+#define PCI_MASTER_SUPPORT 0x00000800
+#define STOP_CLOCK_ENABLE 0x00001000
+#define EAPD_DRIVE_ENABLE 0x00002000
+#define REQ_TRI_STATE_ENABLE 0x00004000
+#define REQ_LOW_ENABLE 0x00008000
+#define MIDI_1_ENABLE 0x00010000
+#define MIDI_2_ENABLE 0x00020000
+#define SB_AUDIO_SYNC 0x00040000
+#define HV_CTRL_TEST 0x00100000
+#define SOUNDBLASTER_TEST 0x00400000
+
+#define PCI_USER_CONFIG_C 0x5C
+
+#define PCI_DDMA_CTRL 0x60
+#define DDMA_ENABLE 0x00000001
+
+
+/* Allegro registers */
+#define HOST_INT_CTRL 0x18
+#define SB_INT_ENABLE 0x0001
+#define MPU401_INT_ENABLE 0x0002
+#define ASSP_INT_ENABLE 0x0010
+#define RING_INT_ENABLE 0x0020
+#define HV_INT_ENABLE 0x0040
+#define CLKRUN_GEN_ENABLE 0x0100
+#define HV_CTRL_TO_PME 0x0400
+#define SOFTWARE_RESET_ENABLE 0x8000
+
+#define HOST_INT_STATUS 0x1A
+#define SB_INT_PENDING 0x01
+#define MPU401_INT_PENDING 0x02
+#define ASSP_INT_PENDING 0x10
+#define RING_INT_PENDING 0x20
+#define HV_INT_PENDING 0x40
+
+#define HARDWARE_VOL_CTRL 0x1B
+#define SHADOW_MIX_REG_VOICE 0x1C
+#define HW_VOL_COUNTER_VOICE 0x1D
+#define SHADOW_MIX_REG_MASTER 0x1E
+#define HW_VOL_COUNTER_MASTER 0x1F
+
+#define CODEC_COMMAND 0x30
+#define CODEC_READ_B 0x80
+
+#define CODEC_STATUS 0x30
+#define CODEC_BUSY_B 0x01
+
+#define CODEC_DATA 0x32
+
+/* AC97 registers */
+#ifndef M3_MODEL
+#define AC97_RESET 0x00
+#endif
+
+#define AC97_VOL_MUTE_B 0x8000
+#define AC97_VOL_M 0x1F
+#define AC97_LEFT_VOL_S 8
+
+#define AC97_MASTER_VOL 0x02
+#define AC97_LINE_LEVEL_VOL 0x04
+#define AC97_MASTER_MONO_VOL 0x06
+#define AC97_PC_BEEP_VOL 0x0A
+#define AC97_PC_BEEP_VOL_M 0x0F
+#define AC97_SROUND_MASTER_VOL 0x38
+#define AC97_PC_BEEP_VOL_S 1
+
+#ifndef M3_MODEL
+#define AC97_PHONE_VOL 0x0C
+#define AC97_MIC_VOL 0x0E
+#endif
+#define AC97_MIC_20DB_ENABLE 0x40
+
+#ifndef M3_MODEL
+#define AC97_LINEIN_VOL 0x10
+#define AC97_CD_VOL 0x12
+#define AC97_VIDEO_VOL 0x14
+#define AC97_AUX_VOL 0x16
+#endif
+#define AC97_PCM_OUT_VOL 0x18
+#ifndef M3_MODEL
+#define AC97_RECORD_SELECT 0x1A
+#endif
+#define AC97_RECORD_MIC 0x00
+#define AC97_RECORD_CD 0x01
+#define AC97_RECORD_VIDEO 0x02
+#define AC97_RECORD_AUX 0x03
+#define AC97_RECORD_MONO_MUX 0x02
+#define AC97_RECORD_DIGITAL 0x03
+#define AC97_RECORD_LINE 0x04
+#define AC97_RECORD_STEREO 0x05
+#define AC97_RECORD_MONO 0x06
+#define AC97_RECORD_PHONE 0x07
+
+#ifndef M3_MODEL
+#define AC97_RECORD_GAIN 0x1C
+#endif
+#define AC97_RECORD_VOL_M 0x0F
+
+#ifndef M3_MODEL
+#define AC97_GENERAL_PURPOSE 0x20
+#endif
+#define AC97_POWER_DOWN_CTRL 0x26
+#define AC97_ADC_READY 0x0001
+#define AC97_DAC_READY 0x0002
+#define AC97_ANALOG_READY 0x0004
+#define AC97_VREF_ON 0x0008
+#define AC97_PR0 0x0100
+#define AC97_PR1 0x0200
+#define AC97_PR2 0x0400
+#define AC97_PR3 0x0800
+#define AC97_PR4 0x1000
+
+#define AC97_RESERVED1 0x28
+
+#define AC97_VENDOR_TEST 0x5A
+
+#define AC97_CLOCK_DELAY 0x5C
+#define AC97_LINEOUT_MUX_SEL 0x0001
+#define AC97_MONO_MUX_SEL 0x0002
+#define AC97_CLOCK_DELAY_SEL 0x1F
+#define AC97_DAC_CDS_SHIFT 6
+#define AC97_ADC_CDS_SHIFT 11
+
+#define AC97_MULTI_CHANNEL_SEL 0x74
+
+#ifndef M3_MODEL
+#define AC97_VENDOR_ID1 0x7C
+#define AC97_VENDOR_ID2 0x7E
+#endif
+
+#define RING_BUS_CTRL_A 0x36
+#define RAC_PME_ENABLE 0x0100
+#define RAC_SDFS_ENABLE 0x0200
+#define LAC_PME_ENABLE 0x0400
+#define LAC_SDFS_ENABLE 0x0800
+#define SERIAL_AC_LINK_ENABLE 0x1000
+#define IO_SRAM_ENABLE 0x2000
+#define IIS_INPUT_ENABLE 0x8000
+
+#define RING_BUS_CTRL_B 0x38
+#define SECOND_CODEC_ID_MASK 0x0003
+#define SPDIF_FUNC_ENABLE 0x0010
+#define SECOND_AC_ENABLE 0x0020
+#define SB_MODULE_INTF_ENABLE 0x0040
+#define SSPE_ENABLE 0x0040
+#define M3I_DOCK_ENABLE 0x0080
+
+#define SDO_OUT_DEST_CTRL 0x3A
+#define COMMAND_ADDR_OUT 0x0003
+#define PCM_LR_OUT_LOCAL 0x0000
+#define PCM_LR_OUT_REMOTE 0x0004
+#define PCM_LR_OUT_MUTE 0x0008
+#define PCM_LR_OUT_BOTH 0x000C
+#define LINE1_DAC_OUT_LOCAL 0x0000
+#define LINE1_DAC_OUT_REMOTE 0x0010
+#define LINE1_DAC_OUT_MUTE 0x0020
+#define LINE1_DAC_OUT_BOTH 0x0030
+#define PCM_CLS_OUT_LOCAL 0x0000
+#define PCM_CLS_OUT_REMOTE 0x0040
+#define PCM_CLS_OUT_MUTE 0x0080
+#define PCM_CLS_OUT_BOTH 0x00C0
+#define PCM_RLF_OUT_LOCAL 0x0000
+#define PCM_RLF_OUT_REMOTE 0x0100
+#define PCM_RLF_OUT_MUTE 0x0200
+#define PCM_RLF_OUT_BOTH 0x0300
+#define LINE2_DAC_OUT_LOCAL 0x0000
+#define LINE2_DAC_OUT_REMOTE 0x0400
+#define LINE2_DAC_OUT_MUTE 0x0800
+#define LINE2_DAC_OUT_BOTH 0x0C00
+#define HANDSET_OUT_LOCAL 0x0000
+#define HANDSET_OUT_REMOTE 0x1000
+#define HANDSET_OUT_MUTE 0x2000
+#define HANDSET_OUT_BOTH 0x3000
+#define IO_CTRL_OUT_LOCAL 0x0000
+#define IO_CTRL_OUT_REMOTE 0x4000
+#define IO_CTRL_OUT_MUTE 0x8000
+#define IO_CTRL_OUT_BOTH 0xC000
+
+#define SDO_IN_DEST_CTRL 0x3C
+#define STATUS_ADDR_IN 0x0003
+#define PCM_LR_IN_LOCAL 0x0000
+#define PCM_LR_IN_REMOTE 0x0004
+#define PCM_LR_RESERVED 0x0008
+#define PCM_LR_IN_BOTH 0x000C
+#define LINE1_ADC_IN_LOCAL 0x0000
+#define LINE1_ADC_IN_REMOTE 0x0010
+#define LINE1_ADC_IN_MUTE 0x0020
+#define MIC_ADC_IN_LOCAL 0x0000
+#define MIC_ADC_IN_REMOTE 0x0040
+#define MIC_ADC_IN_MUTE 0x0080
+#define LINE2_DAC_IN_LOCAL 0x0000
+#define LINE2_DAC_IN_REMOTE 0x0400
+#define LINE2_DAC_IN_MUTE 0x0800
+#define HANDSET_IN_LOCAL 0x0000
+#define HANDSET_IN_REMOTE 0x1000
+#define HANDSET_IN_MUTE 0x2000
+#define IO_STATUS_IN_LOCAL 0x0000
+#define IO_STATUS_IN_REMOTE 0x4000
+
+#define SPDIF_IN_CTRL 0x3E
+#define SPDIF_IN_ENABLE 0x0001
+
+#define GPIO_DATA 0x60
+#define GPIO_DATA_MASK 0x0FFF
+#define GPIO_HV_STATUS 0x3000
+#define GPIO_PME_STATUS 0x4000
+
+#define GPIO_MASK 0x64
+#define GPIO_DIRECTION 0x68
+#define GPO_PRIMARY_AC97 0x0001
+#define GPI_LINEOUT_SENSE 0x0004
+#define GPO_SECONDARY_AC97 0x0008
+#define GPI_VOL_DOWN 0x0010
+#define GPI_VOL_UP 0x0020
+#define GPI_IIS_CLK 0x0040
+#define GPI_IIS_LRCLK 0x0080
+#define GPI_IIS_DATA 0x0100
+#define GPI_DOCKING_STATUS 0x0100
+#define GPI_HEADPHONE_SENSE 0x0200
+#define GPO_EXT_AMP_SHUTDOWN 0x1000
+
+/* M3 */
+#define GPO_M3_EXT_AMP_SHUTDN 0x0002
+
+#define ASSP_INDEX_PORT 0x80
+#define ASSP_MEMORY_PORT 0x82
+#define ASSP_DATA_PORT 0x84
+
+#define MPU401_DATA_PORT 0x98
+#define MPU401_STATUS_PORT 0x99
+
+#define CLK_MULT_DATA_PORT 0x9C
+
+#define ASSP_CONTROL_A 0xA2
+#define ASSP_0_WS_ENABLE 0x01
+#define ASSP_CTRL_A_RESERVED1 0x02
+#define ASSP_CTRL_A_RESERVED2 0x04
+#define ASSP_CLK_49MHZ_SELECT 0x08
+#define FAST_PLU_ENABLE 0x10
+#define ASSP_CTRL_A_RESERVED3 0x20
+#define DSP_CLK_36MHZ_SELECT 0x40
+
+#define ASSP_CONTROL_B 0xA4
+#define RESET_ASSP 0x00
+#define RUN_ASSP 0x01
+#define ENABLE_ASSP_CLOCK 0x00
+#define STOP_ASSP_CLOCK 0x10
+#define RESET_TOGGLE 0x40
+
+#define ASSP_CONTROL_C 0xA6
+#define ASSP_HOST_INT_ENABLE 0x01
+#define FM_ADDR_REMAP_DISABLE 0x02
+#define HOST_WRITE_PORT_ENABLE 0x08
+
+#define ASSP_HOST_INT_STATUS 0xAC
+#define DSP2HOST_REQ_PIORECORD 0x01
+#define DSP2HOST_REQ_I2SRATE 0x02
+#define DSP2HOST_REQ_TIMER 0x04
+
+/*
+ * DSP memory map
+ */
+
+#define REV_A_CODE_MEMORY_BEGIN 0x0000
+#define REV_A_CODE_MEMORY_END 0x0FFF
+#define REV_A_CODE_MEMORY_UNIT_LENGTH 0x0040
+#define REV_A_CODE_MEMORY_LENGTH (REV_A_CODE_MEMORY_END - REV_A_CODE_MEMORY_BEGIN + 1)
+
+#define REV_B_CODE_MEMORY_BEGIN 0x0000
+#define REV_B_CODE_MEMORY_END 0x0BFF
+#define REV_B_CODE_MEMORY_UNIT_LENGTH 0x0040
+#define REV_B_CODE_MEMORY_LENGTH (REV_B_CODE_MEMORY_END - REV_B_CODE_MEMORY_BEGIN + 1)
+
+#if (REV_A_CODE_MEMORY_LENGTH % REV_A_CODE_MEMORY_UNIT_LENGTH)
+#error Assumption about code memory unit length failed.
+#endif
+#if (REV_B_CODE_MEMORY_LENGTH % REV_B_CODE_MEMORY_UNIT_LENGTH)
+#error Assumption about code memory unit length failed.
+#endif
+
+#define REV_A_DATA_MEMORY_BEGIN 0x1000
+#define REV_A_DATA_MEMORY_END 0x2FFF
+#define REV_A_DATA_MEMORY_UNIT_LENGTH 0x0080
+#define REV_A_DATA_MEMORY_LENGTH (REV_A_DATA_MEMORY_END - REV_A_DATA_MEMORY_BEGIN + 1)
+
+#define REV_B_DATA_MEMORY_BEGIN 0x1000
+/*#define REV_B_DATA_MEMORY_END 0x23FF */
+#define REV_B_DATA_MEMORY_END 0x2BFF
+#define REV_B_DATA_MEMORY_UNIT_LENGTH 0x0080
+#define REV_B_DATA_MEMORY_LENGTH (REV_B_DATA_MEMORY_END - REV_B_DATA_MEMORY_BEGIN + 1)
+
+#if (REV_A_DATA_MEMORY_LENGTH % REV_A_DATA_MEMORY_UNIT_LENGTH)
+#error Assumption about data memory unit length failed.
+#endif
+#if (REV_B_DATA_MEMORY_LENGTH % REV_B_DATA_MEMORY_UNIT_LENGTH)
+#error Assumption about data memory unit length failed.
+#endif
+
+#define CODE_MEMORY_MAP_LENGTH (64 + 1)
+#define DATA_MEMORY_MAP_LENGTH (64 + 1)
+
+#if (CODE_MEMORY_MAP_LENGTH < ((REV_A_CODE_MEMORY_LENGTH / REV_A_CODE_MEMORY_UNIT_LENGTH) + 1))
+#error Code memory map length too short.
+#endif
+#if (DATA_MEMORY_MAP_LENGTH < ((REV_A_DATA_MEMORY_LENGTH / REV_A_DATA_MEMORY_UNIT_LENGTH) + 1))
+#error Data memory map length too short.
+#endif
+#if (CODE_MEMORY_MAP_LENGTH < ((REV_B_CODE_MEMORY_LENGTH / REV_B_CODE_MEMORY_UNIT_LENGTH) + 1))
+#error Code memory map length too short.
+#endif
+#if (DATA_MEMORY_MAP_LENGTH < ((REV_B_DATA_MEMORY_LENGTH / REV_B_DATA_MEMORY_UNIT_LENGTH) + 1))
+#error Data memory map length too short.
+#endif
+
+
+/*
+ * Kernel code memory definition
+ */
+
+#define KCODE_VECTORS_BEGIN 0x0000
+#define KCODE_VECTORS_END 0x002F
+#define KCODE_VECTORS_UNIT_LENGTH 0x0002
+#define KCODE_VECTORS_LENGTH (KCODE_VECTORS_END - KCODE_VECTORS_BEGIN + 1)
+
+
+/*
+ * Kernel data memory definition
+ */
+
+#define KDATA_BASE_ADDR 0x1000
+#define KDATA_BASE_ADDR2 0x1080
+
+#define KDATA_TASK0 (KDATA_BASE_ADDR + 0x0000)
+#define KDATA_TASK1 (KDATA_BASE_ADDR + 0x0001)
+#define KDATA_TASK2 (KDATA_BASE_ADDR + 0x0002)
+#define KDATA_TASK3 (KDATA_BASE_ADDR + 0x0003)
+#define KDATA_TASK4 (KDATA_BASE_ADDR + 0x0004)
+#define KDATA_TASK5 (KDATA_BASE_ADDR + 0x0005)
+#define KDATA_TASK6 (KDATA_BASE_ADDR + 0x0006)
+#define KDATA_TASK7 (KDATA_BASE_ADDR + 0x0007)
+#define KDATA_TASK_ENDMARK (KDATA_BASE_ADDR + 0x0008)
+
+#define KDATA_CURRENT_TASK (KDATA_BASE_ADDR + 0x0009)
+#define KDATA_TASK_SWITCH (KDATA_BASE_ADDR + 0x000A)
+
+#define KDATA_INSTANCE0_POS3D (KDATA_BASE_ADDR + 0x000B)
+#define KDATA_INSTANCE1_POS3D (KDATA_BASE_ADDR + 0x000C)
+#define KDATA_INSTANCE2_POS3D (KDATA_BASE_ADDR + 0x000D)
+#define KDATA_INSTANCE3_POS3D (KDATA_BASE_ADDR + 0x000E)
+#define KDATA_INSTANCE4_POS3D (KDATA_BASE_ADDR + 0x000F)
+#define KDATA_INSTANCE5_POS3D (KDATA_BASE_ADDR + 0x0010)
+#define KDATA_INSTANCE6_POS3D (KDATA_BASE_ADDR + 0x0011)
+#define KDATA_INSTANCE7_POS3D (KDATA_BASE_ADDR + 0x0012)
+#define KDATA_INSTANCE8_POS3D (KDATA_BASE_ADDR + 0x0013)
+#define KDATA_INSTANCE_POS3D_ENDMARK (KDATA_BASE_ADDR + 0x0014)
+
+#define KDATA_INSTANCE0_SPKVIRT (KDATA_BASE_ADDR + 0x0015)
+#define KDATA_INSTANCE_SPKVIRT_ENDMARK (KDATA_BASE_ADDR + 0x0016)
+
+#define KDATA_INSTANCE0_SPDIF (KDATA_BASE_ADDR + 0x0017)
+#define KDATA_INSTANCE_SPDIF_ENDMARK (KDATA_BASE_ADDR + 0x0018)
+
+#define KDATA_INSTANCE0_MODEM (KDATA_BASE_ADDR + 0x0019)
+#define KDATA_INSTANCE_MODEM_ENDMARK (KDATA_BASE_ADDR + 0x001A)
+
+#define KDATA_INSTANCE0_SRC (KDATA_BASE_ADDR + 0x001B)
+#define KDATA_INSTANCE1_SRC (KDATA_BASE_ADDR + 0x001C)
+#define KDATA_INSTANCE_SRC_ENDMARK (KDATA_BASE_ADDR + 0x001D)
+
+#define KDATA_INSTANCE0_MINISRC (KDATA_BASE_ADDR + 0x001E)
+#define KDATA_INSTANCE1_MINISRC (KDATA_BASE_ADDR + 0x001F)
+#define KDATA_INSTANCE2_MINISRC (KDATA_BASE_ADDR + 0x0020)
+#define KDATA_INSTANCE3_MINISRC (KDATA_BASE_ADDR + 0x0021)
+#define KDATA_INSTANCE_MINISRC_ENDMARK (KDATA_BASE_ADDR + 0x0022)
+
+#define KDATA_INSTANCE0_CPYTHRU (KDATA_BASE_ADDR + 0x0023)
+#define KDATA_INSTANCE1_CPYTHRU (KDATA_BASE_ADDR + 0x0024)
+#define KDATA_INSTANCE_CPYTHRU_ENDMARK (KDATA_BASE_ADDR + 0x0025)
+
+#define KDATA_CURRENT_DMA (KDATA_BASE_ADDR + 0x0026)
+#define KDATA_DMA_SWITCH (KDATA_BASE_ADDR + 0x0027)
+#define KDATA_DMA_ACTIVE (KDATA_BASE_ADDR + 0x0028)
+
+#define KDATA_DMA_XFER0 (KDATA_BASE_ADDR + 0x0029)
+#define KDATA_DMA_XFER1 (KDATA_BASE_ADDR + 0x002A)
+#define KDATA_DMA_XFER2 (KDATA_BASE_ADDR + 0x002B)
+#define KDATA_DMA_XFER3 (KDATA_BASE_ADDR + 0x002C)
+#define KDATA_DMA_XFER4 (KDATA_BASE_ADDR + 0x002D)
+#define KDATA_DMA_XFER5 (KDATA_BASE_ADDR + 0x002E)
+#define KDATA_DMA_XFER6 (KDATA_BASE_ADDR + 0x002F)
+#define KDATA_DMA_XFER7 (KDATA_BASE_ADDR + 0x0030)
+#define KDATA_DMA_XFER8 (KDATA_BASE_ADDR + 0x0031)
+#define KDATA_DMA_XFER_ENDMARK (KDATA_BASE_ADDR + 0x0032)
+
+#define KDATA_I2S_SAMPLE_COUNT (KDATA_BASE_ADDR + 0x0033)
+#define KDATA_I2S_INT_METER (KDATA_BASE_ADDR + 0x0034)
+#define KDATA_I2S_ACTIVE (KDATA_BASE_ADDR + 0x0035)
+
+#define KDATA_TIMER_COUNT_RELOAD (KDATA_BASE_ADDR + 0x0036)
+#define KDATA_TIMER_COUNT_CURRENT (KDATA_BASE_ADDR + 0x0037)
+
+#define KDATA_HALT_SYNCH_CLIENT (KDATA_BASE_ADDR + 0x0038)
+#define KDATA_HALT_SYNCH_DMA (KDATA_BASE_ADDR + 0x0039)
+#define KDATA_HALT_ACKNOWLEDGE (KDATA_BASE_ADDR + 0x003A)
+
+#define KDATA_ADC1_XFER0 (KDATA_BASE_ADDR + 0x003B)
+#define KDATA_ADC1_XFER_ENDMARK (KDATA_BASE_ADDR + 0x003C)
+#define KDATA_ADC1_LEFT_VOLUME (KDATA_BASE_ADDR + 0x003D)
+#define KDATA_ADC1_RIGHT_VOLUME (KDATA_BASE_ADDR + 0x003E)
+#define KDATA_ADC1_LEFT_SUR_VOL (KDATA_BASE_ADDR + 0x003F)
+#define KDATA_ADC1_RIGHT_SUR_VOL (KDATA_BASE_ADDR + 0x0040)
+
+#define KDATA_ADC2_XFER0 (KDATA_BASE_ADDR + 0x0041)
+#define KDATA_ADC2_XFER_ENDMARK (KDATA_BASE_ADDR + 0x0042)
+#define KDATA_ADC2_LEFT_VOLUME (KDATA_BASE_ADDR + 0x0043)
+#define KDATA_ADC2_RIGHT_VOLUME (KDATA_BASE_ADDR + 0x0044)
+#define KDATA_ADC2_LEFT_SUR_VOL (KDATA_BASE_ADDR + 0x0045)
+#define KDATA_ADC2_RIGHT_SUR_VOL (KDATA_BASE_ADDR + 0x0046)
+
+#define KDATA_CD_XFER0 (KDATA_BASE_ADDR + 0x0047)
+#define KDATA_CD_XFER_ENDMARK (KDATA_BASE_ADDR + 0x0048)
+#define KDATA_CD_LEFT_VOLUME (KDATA_BASE_ADDR + 0x0049)
+#define KDATA_CD_RIGHT_VOLUME (KDATA_BASE_ADDR + 0x004A)
+#define KDATA_CD_LEFT_SUR_VOL (KDATA_BASE_ADDR + 0x004B)
+#define KDATA_CD_RIGHT_SUR_VOL (KDATA_BASE_ADDR + 0x004C)
+
+#define KDATA_MIC_XFER0 (KDATA_BASE_ADDR + 0x004D)
+#define KDATA_MIC_XFER_ENDMARK (KDATA_BASE_ADDR + 0x004E)
+#define KDATA_MIC_VOLUME (KDATA_BASE_ADDR + 0x004F)
+#define KDATA_MIC_SUR_VOL (KDATA_BASE_ADDR + 0x0050)
+
+#define KDATA_I2S_XFER0 (KDATA_BASE_ADDR + 0x0051)
+#define KDATA_I2S_XFER_ENDMARK (KDATA_BASE_ADDR + 0x0052)
+
+#define KDATA_CHI_XFER0 (KDATA_BASE_ADDR + 0x0053)
+#define KDATA_CHI_XFER_ENDMARK (KDATA_BASE_ADDR + 0x0054)
+
+#define KDATA_SPDIF_XFER (KDATA_BASE_ADDR + 0x0055)
+#define KDATA_SPDIF_CURRENT_FRAME (KDATA_BASE_ADDR + 0x0056)
+#define KDATA_SPDIF_FRAME0 (KDATA_BASE_ADDR + 0x0057)
+#define KDATA_SPDIF_FRAME1 (KDATA_BASE_ADDR + 0x0058)
+#define KDATA_SPDIF_FRAME2 (KDATA_BASE_ADDR + 0x0059)
+
+#define KDATA_SPDIF_REQUEST (KDATA_BASE_ADDR + 0x005A)
+#define KDATA_SPDIF_TEMP (KDATA_BASE_ADDR + 0x005B)
+
+/*AY SPDIF IN */
+#define KDATA_SPDIFIN_XFER0 (KDATA_BASE_ADDR + 0x005C)
+#define KDATA_SPDIFIN_XFER_ENDMARK (KDATA_BASE_ADDR + 0x005D)
+#define KDATA_SPDIFIN_INT_METER (KDATA_BASE_ADDR + 0x005E)
+
+#define KDATA_DSP_RESET_COUNT (KDATA_BASE_ADDR + 0x005F)
+#define KDATA_DEBUG_OUTPUT (KDATA_BASE_ADDR + 0x0060)
+
+#define KDATA_KERNEL_ISR_LIST (KDATA_BASE_ADDR + 0x0061)
+
+#define KDATA_KERNEL_ISR_CBSR1 (KDATA_BASE_ADDR + 0x0062)
+#define KDATA_KERNEL_ISR_CBER1 (KDATA_BASE_ADDR + 0x0063)
+#define KDATA_KERNEL_ISR_CBCR (KDATA_BASE_ADDR + 0x0064)
+#define KDATA_KERNEL_ISR_AR0 (KDATA_BASE_ADDR + 0x0065)
+#define KDATA_KERNEL_ISR_AR1 (KDATA_BASE_ADDR + 0x0066)
+#define KDATA_KERNEL_ISR_AR2 (KDATA_BASE_ADDR + 0x0067)
+#define KDATA_KERNEL_ISR_AR3 (KDATA_BASE_ADDR + 0x0068)
+#define KDATA_KERNEL_ISR_AR4 (KDATA_BASE_ADDR + 0x0069)
+#define KDATA_KERNEL_ISR_AR5 (KDATA_BASE_ADDR + 0x006A)
+#define KDATA_KERNEL_ISR_BRCR (KDATA_BASE_ADDR + 0x006B)
+#define KDATA_KERNEL_ISR_PASR (KDATA_BASE_ADDR + 0x006C)
+#define KDATA_KERNEL_ISR_PAER (KDATA_BASE_ADDR + 0x006D)
+
+#define KDATA_CLIENT_SCRATCH0 (KDATA_BASE_ADDR + 0x006E)
+#define KDATA_CLIENT_SCRATCH1 (KDATA_BASE_ADDR + 0x006F)
+#define KDATA_KERNEL_SCRATCH (KDATA_BASE_ADDR + 0x0070)
+#define KDATA_KERNEL_ISR_SCRATCH (KDATA_BASE_ADDR + 0x0071)
+
+#define KDATA_OUEUE_LEFT (KDATA_BASE_ADDR + 0x0072)
+#define KDATA_QUEUE_RIGHT (KDATA_BASE_ADDR + 0x0073)
+
+#define KDATA_ADC1_REQUEST (KDATA_BASE_ADDR + 0x0074)
+#define KDATA_ADC2_REQUEST (KDATA_BASE_ADDR + 0x0075)
+#define KDATA_CD_REQUEST (KDATA_BASE_ADDR + 0x0076)
+#define KDATA_MIC_REQUEST (KDATA_BASE_ADDR + 0x0077)
+
+#define KDATA_ADC1_MIXER_REQUEST (KDATA_BASE_ADDR + 0x0078)
+#define KDATA_ADC2_MIXER_REQUEST (KDATA_BASE_ADDR + 0x0079)
+#define KDATA_CD_MIXER_REQUEST (KDATA_BASE_ADDR + 0x007A)
+#define KDATA_MIC_MIXER_REQUEST (KDATA_BASE_ADDR + 0x007B)
+#define KDATA_MIC_SYNC_COUNTER (KDATA_BASE_ADDR + 0x007C)
+
+/*
+ * second segment
+ */
+
+/* smart mixer buffer */
+
+#define KDATA_MIXER_WORD0 (KDATA_BASE_ADDR2 + 0x0000)
+#define KDATA_MIXER_WORD1 (KDATA_BASE_ADDR2 + 0x0001)
+#define KDATA_MIXER_WORD2 (KDATA_BASE_ADDR2 + 0x0002)
+#define KDATA_MIXER_WORD3 (KDATA_BASE_ADDR2 + 0x0003)
+#define KDATA_MIXER_WORD4 (KDATA_BASE_ADDR2 + 0x0004)
+#define KDATA_MIXER_WORD5 (KDATA_BASE_ADDR2 + 0x0005)
+#define KDATA_MIXER_WORD6 (KDATA_BASE_ADDR2 + 0x0006)
+#define KDATA_MIXER_WORD7 (KDATA_BASE_ADDR2 + 0x0007)
+#define KDATA_MIXER_WORD8 (KDATA_BASE_ADDR2 + 0x0008)
+#define KDATA_MIXER_WORD9 (KDATA_BASE_ADDR2 + 0x0009)
+#define KDATA_MIXER_WORDA (KDATA_BASE_ADDR2 + 0x000A)
+#define KDATA_MIXER_WORDB (KDATA_BASE_ADDR2 + 0x000B)
+#define KDATA_MIXER_WORDC (KDATA_BASE_ADDR2 + 0x000C)
+#define KDATA_MIXER_WORDD (KDATA_BASE_ADDR2 + 0x000D)
+#define KDATA_MIXER_WORDE (KDATA_BASE_ADDR2 + 0x000E)
+#define KDATA_MIXER_WORDF (KDATA_BASE_ADDR2 + 0x000F)
+
+#define KDATA_MIXER_XFER0 (KDATA_BASE_ADDR2 + 0x0010)
+#define KDATA_MIXER_XFER1 (KDATA_BASE_ADDR2 + 0x0011)
+#define KDATA_MIXER_XFER2 (KDATA_BASE_ADDR2 + 0x0012)
+#define KDATA_MIXER_XFER3 (KDATA_BASE_ADDR2 + 0x0013)
+#define KDATA_MIXER_XFER4 (KDATA_BASE_ADDR2 + 0x0014)
+#define KDATA_MIXER_XFER5 (KDATA_BASE_ADDR2 + 0x0015)
+#define KDATA_MIXER_XFER6 (KDATA_BASE_ADDR2 + 0x0016)
+#define KDATA_MIXER_XFER7 (KDATA_BASE_ADDR2 + 0x0017)
+#define KDATA_MIXER_XFER8 (KDATA_BASE_ADDR2 + 0x0018)
+#define KDATA_MIXER_XFER9 (KDATA_BASE_ADDR2 + 0x0019)
+#define KDATA_MIXER_XFER_ENDMARK (KDATA_BASE_ADDR2 + 0x001A)
+
+#define KDATA_MIXER_TASK_NUMBER (KDATA_BASE_ADDR2 + 0x001B)
+#define KDATA_CURRENT_MIXER (KDATA_BASE_ADDR2 + 0x001C)
+#define KDATA_MIXER_ACTIVE (KDATA_BASE_ADDR2 + 0x001D)
+#define KDATA_MIXER_BANK_STATUS (KDATA_BASE_ADDR2 + 0x001E)
+#define KDATA_DAC_LEFT_VOLUME (KDATA_BASE_ADDR2 + 0x001F)
+#define KDATA_DAC_RIGHT_VOLUME (KDATA_BASE_ADDR2 + 0x0020)
+
+/*
+ * Client data memory definition
+ */
+
+#define CDATA_INSTANCE_READY 0x00
+
+#define CDATA_HOST_SRC_ADDRL 0x01
+#define CDATA_HOST_SRC_ADDRH 0x02
+#define CDATA_HOST_SRC_END_PLUS_1L 0x03
+#define CDATA_HOST_SRC_END_PLUS_1H 0x04
+#define CDATA_HOST_SRC_CURRENTL 0x05
+#define CDATA_HOST_SRC_CURRENTH 0x06
+
+#define CDATA_IN_BUF_CONNECT 0x07
+#define CDATA_OUT_BUF_CONNECT 0x08
+
+#define CDATA_IN_BUF_BEGIN 0x09
+#define CDATA_IN_BUF_END_PLUS_1 0x0A
+#define CDATA_IN_BUF_HEAD 0x0B
+#define CDATA_IN_BUF_TAIL 0x0C
+
+#define CDATA_OUT_BUF_BEGIN 0x0D
+#define CDATA_OUT_BUF_END_PLUS_1 0x0E
+#define CDATA_OUT_BUF_HEAD 0x0F
+#define CDATA_OUT_BUF_TAIL 0x10
+
+#define CDATA_DMA_CONTROL 0x11
+#define CDATA_RESERVED 0x12
+
+#define CDATA_FREQUENCY 0x13
+#define CDATA_LEFT_VOLUME 0x14
+#define CDATA_RIGHT_VOLUME 0x15
+#define CDATA_LEFT_SUR_VOL 0x16
+#define CDATA_RIGHT_SUR_VOL 0x17
+
+/* These are from Allegro hckernel.h */
+#define CDATA_HEADER_LEN 0x18
+#define SRC3_DIRECTION_OFFSET CDATA_HEADER_LEN
+#define SRC3_MODE_OFFSET CDATA_HEADER_LEN + 1
+#define SRC3_WORD_LENGTH_OFFSET CDATA_HEADER_LEN + 2
+#define SRC3_PARAMETER_OFFSET CDATA_HEADER_LEN + 3
+#define SRC3_COEFF_ADDR_OFFSET CDATA_HEADER_LEN + 8
+#define SRC3_FILTAP_ADDR_OFFSET CDATA_HEADER_LEN + 10
+#define SRC3_TEMP_INBUF_ADDR_OFFSET CDATA_HEADER_LEN + 16
+#define SRC3_TEMP_OUTBUF_ADDR_OFFSET CDATA_HEADER_LEN + 17
+#define FOR_FUTURE_USE 10 /* for storing temporary variable in future */
+
+/*
+ * DMA control definition
+ */
+
+#define DMACONTROL_BLOCK_MASK 0x000F
+#define DMAC_BLOCK0_SELECTOR 0x0000
+#define DMAC_BLOCK1_SELECTOR 0x0001
+#define DMAC_BLOCK2_SELECTOR 0x0002
+#define DMAC_BLOCK3_SELECTOR 0x0003
+#define DMAC_BLOCK4_SELECTOR 0x0004
+#define DMAC_BLOCK5_SELECTOR 0x0005
+#define DMAC_BLOCK6_SELECTOR 0x0006
+#define DMAC_BLOCK7_SELECTOR 0x0007
+#define DMAC_BLOCK8_SELECTOR 0x0008
+#define DMAC_BLOCK9_SELECTOR 0x0009
+#define DMAC_BLOCKA_SELECTOR 0x000A
+#define DMAC_BLOCKB_SELECTOR 0x000B
+#define DMAC_BLOCKC_SELECTOR 0x000C
+#define DMAC_BLOCKD_SELECTOR 0x000D
+#define DMAC_BLOCKE_SELECTOR 0x000E
+#define DMAC_BLOCKF_SELECTOR 0x000F
+#define DMACONTROL_PAGE_MASK 0x00F0
+#define DMAC_PAGE0_SELECTOR 0x0030
+#define DMAC_PAGE1_SELECTOR 0x0020
+#define DMAC_PAGE2_SELECTOR 0x0010
+#define DMAC_PAGE3_SELECTOR 0x0000
+#define DMACONTROL_AUTOREPEAT 0x1000
+#define DMACONTROL_STOPPED 0x2000
+#define DMACONTROL_DIRECTION 0x0100
+
+/*
+ * Kernel/client memory allocation
+ */
+
+#define NUM_UNITS_KERNEL_CODE 16
+#define NUM_UNITS_KERNEL_DATA 2
+
+#define NUM_UNITS_KERNEL_CODE_WITH_HSP 16
+#ifdef M3_MODEL
+#define NUM_UNITS_KERNEL_DATA_WITH_HSP 5
+#else
+#define NUM_UNITS_KERNEL_DATA_WITH_HSP 4
+#endif
+
+#define NUM_UNITS( BYTES, UNITLEN ) ((((BYTES+1)>>1) + (UNITLEN-1)) / UNITLEN)
+
+/*
+ * DSP hardware
+ */
+
+#define DSP_PORT_TIMER_COUNT 0x06
+#define DSP_PORT_MEMORY_INDEX 0x80
+#define DSP_PORT_MEMORY_TYPE 0x82
+#define DSP_PORT_MEMORY_DATA 0x84
+#define DSP_PORT_CONTROL_REG_A 0xA2
+#define DSP_PORT_CONTROL_REG_B 0xA4
+#define DSP_PORT_CONTROL_REG_C 0xA6
+
+#define MEMTYPE_INTERNAL_CODE 0x0002
+#define MEMTYPE_INTERNAL_DATA 0x0003
+#define MEMTYPE_MASK 0x0003
+
+#define REGB_ENABLE_RESET 0x01
+#define REGB_STOP_CLOCK 0x10
+
+#define REGC_DISABLE_FM_MAPPING 0x02
+
+#define DP_SHIFT_COUNT 7
+
+#define DMA_BLOCK_LENGTH 32
+
+/* These are from Allegro srcmgr.h */
+#define MINISRC_BIQUAD_STAGE 2
+#define MINISRC_IN_BUFFER_SIZE ( 0x50 * 2 )
+#define MINISRC_OUT_BUFFER_SIZE ( 0x50 * 2 * 2)
+#define MINISRC_TMP_BUFFER_SIZE ( 112 + ( MINISRC_BIQUAD_STAGE * 3 + 4 ) * 2 * 2 )
+#define MINISRC_BIQUAD_STAGE 2
+/* M. SRC LPF coefficient could be changed in the DSP code */
+#define MINISRC_COEF_LOC 0X175
+
+#endif /* !_DEV_SOUND_PCI_ALLEGRO_REG_H */
diff --git a/sys/dev/sound/pci/ds1-fw.h b/sys/dev/sound/pci/ds1-fw.h
index a34d233..13c4745 100644
--- a/sys/dev/sound/pci/ds1-fw.h
+++ b/sys/dev/sound/pci/ds1-fw.h
@@ -822,9 +822,9 @@ static u_int32_t CntrlInst[] = {
1999/06/21
Buf441 slot is Enabled.
--------------------------------------------
- 04/09@creat
+ 04/09 @creat
04/12 stop nise fix
- 06/21@WorkingOff timming
+ 06/21 @WorkingOff timming
*/
static u_int32_t CntrlInst1E[] = {
diff --git a/sys/dev/sound/pci/emu10k1.c b/sys/dev/sound/pci/emu10k1.c
index 4c02fa4..0aaeb4b 100644
--- a/sys/dev/sound/pci/emu10k1.c
+++ b/sys/dev/sound/pci/emu10k1.c
@@ -32,7 +32,7 @@
#include <dev/sound/pcm/sound.h>
#include <dev/sound/pcm/ac97.h>
-#include "emu10k1-alsa%diked.h"
+#include <dev/sound/pci/emuxkireg.h>
#include <dev/pci/pcireg.h>
#include <dev/pci/pcivar.h>
@@ -66,12 +66,94 @@ SND_DECLARE_FILE("$FreeBSD$");
#define ENABLE 0xffffffff
#define DISABLE 0x00000000
-#define ENV_ON DCYSUSV_CHANNELENABLE_MASK
+#define ENV_ON EMU_CHAN_DCYSUSV_CHANNELENABLE_MASK
#define ENV_OFF 0x00 /* XXX: should this be 1? */
-#define A_IOCFG_GPOUT_A 0x40 /* Analog Output */
-#define A_IOCFG_GPOUT_D 0x04 /* Digital Output */
-#define A_IOCFG_GPOUT_AD (A_IOCFG_GPOUT_A|A_IOCFG_GPOUT_D) /* A_IOCFG_GPOUT0 */
+#define EMU_A_IOCFG_GPOUT_A 0x40
+#define EMU_A_IOCFG_GPOUT_D 0x04
+#define EMU_A_IOCFG_GPOUT_AD (EMU_A_IOCFG_GPOUT_A|EMU_A_IOCFG_GPOUT_D) /* EMU_A_IOCFG_GPOUT0 */
+
+#define EMU_HCFG_GPOUT1 0x00000800
+
+/* instruction set */
+#define iACC3 0x06
+#define iMACINT0 0x04
+#define iINTERP 0x0e
+
+#define C_00000000 0x40
+#define C_00000001 0x41
+#define C_00000004 0x44
+#define C_40000000 0x4d
+/* Audigy constants */
+#define A_C_00000000 0xc0
+#define A_C_40000000 0xcd
+
+/* GPRs */
+#define FXBUS(x) (0x00 + (x))
+#define EXTIN(x) (0x10 + (x))
+#define EXTOUT(x) (0x20 + (x))
+
+#define GPR(x) (EMU_FXGPREGBASE + (x))
+#define A_EXTIN(x) (0x40 + (x))
+#define A_FXBUS(x) (0x00 + (x))
+#define A_EXTOUT(x) (0x60 + (x))
+#define A_GPR(x) (EMU_A_FXGPREGBASE + (x))
+
+/* FX buses */
+#define FXBUS_PCM_LEFT 0x00
+#define FXBUS_PCM_RIGHT 0x01
+#define FXBUS_MIDI_LEFT 0x04
+#define FXBUS_MIDI_RIGHT 0x05
+#define FXBUS_MIDI_REVERB 0x0c
+#define FXBUS_MIDI_CHORUS 0x0d
+
+/* Inputs */
+#define EXTIN_AC97_L 0x00
+#define EXTIN_AC97_R 0x01
+#define EXTIN_SPDIF_CD_L 0x02
+#define EXTIN_SPDIF_CD_R 0x03
+#define EXTIN_TOSLINK_L 0x06
+#define EXTIN_TOSLINK_R 0x07
+#define EXTIN_COAX_SPDIF_L 0x0a
+#define EXTIN_COAX_SPDIF_R 0x0b
+/* Audigy Inputs */
+#define A_EXTIN_AC97_L 0x00
+#define A_EXTIN_AC97_R 0x01
+
+/* Outputs */
+#define EXTOUT_AC97_L 0x00
+#define EXTOUT_AC97_R 0x01
+#define EXTOUT_TOSLINK_L 0x02
+#define EXTOUT_TOSLINK_R 0x03
+#define EXTOUT_AC97_CENTER 0x04
+#define EXTOUT_AC97_LFE 0x05
+#define EXTOUT_HEADPHONE_L 0x06
+#define EXTOUT_HEADPHONE_R 0x07
+#define EXTOUT_REAR_L 0x08
+#define EXTOUT_REAR_R 0x09
+#define EXTOUT_ADC_CAP_L 0x0a
+#define EXTOUT_ADC_CAP_R 0x0b
+#define EXTOUT_ACENTER 0x11
+#define EXTOUT_ALFE 0x12
+/* Audigy Outputs */
+#define A_EXTOUT_FRONT_L 0x00
+#define A_EXTOUT_FRONT_R 0x01
+#define A_EXTOUT_CENTER 0x02
+#define A_EXTOUT_LFE 0x03
+#define A_EXTOUT_HEADPHONE_L 0x04
+#define A_EXTOUT_HEADPHONE_R 0x05
+#define A_EXTOUT_REAR_L 0x06
+#define A_EXTOUT_REAR_R 0x07
+#define A_EXTOUT_AFRONT_L 0x08
+#define A_EXTOUT_AFRONT_R 0x09
+#define A_EXTOUT_ACENTER 0x0a
+#define A_EXTOUT_ALFE 0x0b
+#define A_EXTOUT_AREAR_L 0x0e
+#define A_EXTOUT_AREAR_R 0x0f
+#define A_EXTOUT_AC97_L 0x10
+#define A_EXTOUT_AC97_R 0x11
+#define A_EXTOUT_ADC_CAP_L 0x16
+#define A_EXTOUT_ADC_CAP_R 0x17
struct emu_memblk {
SLIST_ENTRY(emu_memblk) link;
@@ -247,9 +329,9 @@ emu_rdptr(struct sc_info *sc, int chn, int reg)
{
u_int32_t ptr, val, mask, size, offset;
- ptr = ((reg << 16) & sc->addrmask) | (chn & PTR_CHANNELNUM_MASK);
- emu_wr(sc, PTR, ptr, 4);
- val = emu_rd(sc, DATA, 4);
+ ptr = ((reg << 16) & sc->addrmask) | (chn & EMU_PTR_CHNO_MASK);
+ emu_wr(sc, EMU_PTR, ptr, 4);
+ val = emu_rd(sc, EMU_DATA, 4);
if (reg & 0xff000000) {
size = (reg >> 24) & 0x3f;
offset = (reg >> 16) & 0x1f;
@@ -265,23 +347,23 @@ emu_wrptr(struct sc_info *sc, int chn, int reg, u_int32_t data)
{
u_int32_t ptr, mask, size, offset;
- ptr = ((reg << 16) & sc->addrmask) | (chn & PTR_CHANNELNUM_MASK);
- emu_wr(sc, PTR, ptr, 4);
+ ptr = ((reg << 16) & sc->addrmask) | (chn & EMU_PTR_CHNO_MASK);
+ emu_wr(sc, EMU_PTR, ptr, 4);
if (reg & 0xff000000) {
size = (reg >> 24) & 0x3f;
offset = (reg >> 16) & 0x1f;
mask = ((1 << size) - 1) << offset;
data <<= offset;
data &= mask;
- data |= emu_rd(sc, DATA, 4) & ~mask;
+ data |= emu_rd(sc, EMU_DATA, 4) & ~mask;
}
- emu_wr(sc, DATA, data, 4);
+ emu_wr(sc, EMU_DATA, data, 4);
}
static void
emu_wrefx(struct sc_info *sc, unsigned int pc, unsigned int data)
{
- pc += sc->audigy ? A_MICROCODEBASE : MICROCODEBASE;
+ pc += sc->audigy ? EMU_A_MICROCODEBASE : EMU_MICROCODEBASE;
emu_wrptr(sc, 0, pc, data);
}
@@ -294,8 +376,8 @@ emu_rdcd(kobj_t obj, void *devinfo, int regno)
{
struct sc_info *sc = (struct sc_info *)devinfo;
- emu_wr(sc, AC97ADDRESS, regno, 1);
- return emu_rd(sc, AC97DATA, 2);
+ emu_wr(sc, EMU_AC97ADDR, regno, 1);
+ return emu_rd(sc, EMU_AC97DATA, 2);
}
static int
@@ -303,8 +385,8 @@ emu_wrcd(kobj_t obj, void *devinfo, int regno, u_int32_t data)
{
struct sc_info *sc = (struct sc_info *)devinfo;
- emu_wr(sc, AC97ADDRESS, regno, 1);
- emu_wr(sc, AC97DATA, data, 2);
+ emu_wr(sc, EMU_AC97ADDR, regno, 1);
+ emu_wr(sc, EMU_AC97DATA, data, 2);
return 0;
}
@@ -346,7 +428,7 @@ emu_settimer(struct sc_info *sc)
}
RANGE(rate, 48, 9600);
sc->timerinterval = 48000 / rate;
- emu_wr(sc, TIMER, sc->timerinterval & 0x03ff, 2);
+ emu_wr(sc, EMU_TIMER, sc->timerinterval & 0x03ff, 2);
return sc->timerinterval;
}
@@ -357,15 +439,15 @@ emu_enatimer(struct sc_info *sc, int go)
u_int32_t x;
if (go) {
if (sc->timer++ == 0) {
- x = emu_rd(sc, INTE, 4);
- x |= INTE_INTERVALTIMERENB;
- emu_wr(sc, INTE, x, 4);
+ x = emu_rd(sc, EMU_INTE, 4);
+ x |= EMU_INTE_INTERTIMERENB;
+ emu_wr(sc, EMU_INTE, x, 4);
}
} else {
sc->timer = 0;
- x = emu_rd(sc, INTE, 4);
- x &= ~INTE_INTERVALTIMERENB;
- emu_wr(sc, INTE, x, 4);
+ x = emu_rd(sc, EMU_INTE, 4);
+ x &= ~EMU_INTE_INTERTIMERENB;
+ emu_wr(sc, EMU_INTE, x, 4);
}
return 0;
}
@@ -373,7 +455,7 @@ emu_enatimer(struct sc_info *sc, int go)
static void
emu_enastop(struct sc_info *sc, char channel, int enable)
{
- int reg = (channel & 0x20) ? SOLEH : SOLEL;
+ int reg = (channel & 0x20) ? EMU_SOLEH : EMU_SOLEL;
channel &= 0x1f;
reg |= 1 << 24;
reg |= channel << 16;
@@ -568,49 +650,49 @@ emu_vwrite(struct sc_info *sc, struct emu_voice *v)
r = v->ismaster ? 0 : r;
}
- emu_wrptr(sc, v->vnum, CPF, v->stereo ? CPF_STEREO_MASK : 0);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_CPF, v->stereo ? EMU_CHAN_CPF_STEREO_MASK : 0);
val = v->stereo ? 28 : 30;
val *= v->b16 ? 1 : 2;
start = sa + val;
if (sc->audigy) {
- emu_wrptr(sc, v->vnum, A_FXRT1, v->fxrt1);
- emu_wrptr(sc, v->vnum, A_FXRT2, v->fxrt2);
- emu_wrptr(sc, v->vnum, A_SENDAMOUNTS, 0);
+ emu_wrptr(sc, v->vnum, EMU_A_CHAN_FXRT1, v->fxrt1);
+ emu_wrptr(sc, v->vnum, EMU_A_CHAN_FXRT2, v->fxrt2);
+ emu_wrptr(sc, v->vnum, EMU_A_CHAN_SENDAMOUNTS, 0);
}
else
- emu_wrptr(sc, v->vnum, FXRT, v->fxrt1 << 16);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_FXRT, v->fxrt1 << 16);
- emu_wrptr(sc, v->vnum, PTRX, (x << 8) | r);
- emu_wrptr(sc, v->vnum, DSL, ea | (y << 24));
- emu_wrptr(sc, v->vnum, PSST, sa | (l << 24));
- emu_wrptr(sc, v->vnum, CCCA, start | (v->b16 ? 0 : CCCA_8BITSELECT));
+ emu_wrptr(sc, v->vnum, EMU_CHAN_PTRX, (x << 8) | r);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_DSL, ea | (y << 24));
+ emu_wrptr(sc, v->vnum, EMU_CHAN_PSST, sa | (l << 24));
+ emu_wrptr(sc, v->vnum, EMU_CHAN_CCCA, start | (v->b16 ? 0 : EMU_CHAN_CCCA_8BITSELECT));
- emu_wrptr(sc, v->vnum, Z1, 0);
- emu_wrptr(sc, v->vnum, Z2, 0);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_Z1, 0);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_Z2, 0);
silent_page = ((u_int32_t)(sc->mem.silent_page_addr) << 1)
- | MAP_PTI_MASK;
- emu_wrptr(sc, v->vnum, MAPA, silent_page);
- emu_wrptr(sc, v->vnum, MAPB, silent_page);
-
- emu_wrptr(sc, v->vnum, CVCF, CVCF_CURRENTFILTER_MASK);
- emu_wrptr(sc, v->vnum, VTFT, VTFT_FILTERTARGET_MASK);
- emu_wrptr(sc, v->vnum, ATKHLDM, 0);
- emu_wrptr(sc, v->vnum, DCYSUSM, DCYSUSM_DECAYTIME_MASK);
- emu_wrptr(sc, v->vnum, LFOVAL1, 0x8000);
- emu_wrptr(sc, v->vnum, LFOVAL2, 0x8000);
- emu_wrptr(sc, v->vnum, FMMOD, 0);
- emu_wrptr(sc, v->vnum, TREMFRQ, 0);
- emu_wrptr(sc, v->vnum, FM2FRQ2, 0);
- emu_wrptr(sc, v->vnum, ENVVAL, 0x8000);
-
- emu_wrptr(sc, v->vnum, ATKHLDV,
- ATKHLDV_HOLDTIME_MASK | ATKHLDV_ATTACKTIME_MASK);
- emu_wrptr(sc, v->vnum, ENVVOL, 0x8000);
-
- emu_wrptr(sc, v->vnum, PEFE_FILTERAMOUNT, 0x7f);
- emu_wrptr(sc, v->vnum, PEFE_PITCHAMOUNT, 0);
+ | EMU_CHAN_MAP_PTI_MASK;
+ emu_wrptr(sc, v->vnum, EMU_CHAN_MAPA, silent_page);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_MAPB, silent_page);
+
+ emu_wrptr(sc, v->vnum, EMU_CHAN_CVCF, EMU_CHAN_CVCF_CURRFILTER_MASK);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_VTFT, EMU_CHAN_VTFT_FILTERTARGET_MASK);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_ATKHLDM, 0);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_DCYSUSM, EMU_CHAN_DCYSUSM_DECAYTIME_MASK);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_LFOVAL1, 0x8000);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_LFOVAL2, 0x8000);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_FMMOD, 0);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_TREMFRQ, 0);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_FM2FRQ2, 0);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_ENVVAL, 0x8000);
+
+ emu_wrptr(sc, v->vnum, EMU_CHAN_ATKHLDV,
+ EMU_CHAN_ATKHLDV_HOLDTIME_MASK | EMU_CHAN_ATKHLDV_ATTACKTIME_MASK);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_ENVVOL, 0x8000);
+
+ emu_wrptr(sc, v->vnum, EMU_CHAN_PEFE_FILTERAMOUNT, 0x7f);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_PEFE_PITCHAMOUNT, 0);
if (v->slave != NULL)
emu_vwrite(sc, v->slave);
@@ -631,29 +713,29 @@ emu_vtrigger(struct sc_info *sc, struct emu_voice *v, int go)
sample = v->b16 ? 0x00000000 : 0x80808080;
for (i = 0; i < cs; i++)
- emu_wrptr(sc, v->vnum, CD0 + i, sample);
- emu_wrptr(sc, v->vnum, CCR_CACHEINVALIDSIZE, 0);
- emu_wrptr(sc, v->vnum, CCR_READADDRESS, cra);
- emu_wrptr(sc, v->vnum, CCR_CACHEINVALIDSIZE, ccis);
-
- emu_wrptr(sc, v->vnum, IFATN, 0xff00);
- emu_wrptr(sc, v->vnum, VTFT, 0xffffffff);
- emu_wrptr(sc, v->vnum, CVCF, 0xffffffff);
- emu_wrptr(sc, v->vnum, DCYSUSV, 0x00007f7f);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_CD0 + i, sample);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_CCR_CACHEINVALIDSIZE, 0);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_CCR_READADDRESS, cra);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_CCR_CACHEINVALIDSIZE, ccis);
+
+ emu_wrptr(sc, v->vnum, EMU_CHAN_IFATN, 0xff00);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_VTFT, 0xffffffff);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_CVCF, 0xffffffff);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_DCYSUSV, 0x00007f7f);
emu_enastop(sc, v->vnum, 0);
pitch_target = emu_rate_to_linearpitch(v->speed);
initial_pitch = emu_rate_to_pitch(v->speed) >> 8;
- emu_wrptr(sc, v->vnum, PTRX_PITCHTARGET, pitch_target);
- emu_wrptr(sc, v->vnum, CPF_CURRENTPITCH, pitch_target);
- emu_wrptr(sc, v->vnum, IP, initial_pitch);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_PTRX_PITCHTARGET, pitch_target);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_CPF_PITCH, pitch_target);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_IP, initial_pitch);
} else {
- emu_wrptr(sc, v->vnum, PTRX_PITCHTARGET, 0);
- emu_wrptr(sc, v->vnum, CPF_CURRENTPITCH, 0);
- emu_wrptr(sc, v->vnum, IFATN, 0xffff);
- emu_wrptr(sc, v->vnum, VTFT, 0x0000ffff);
- emu_wrptr(sc, v->vnum, CVCF, 0x0000ffff);
- emu_wrptr(sc, v->vnum, IP, 0);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_PTRX_PITCHTARGET, 0);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_CPF_PITCH, 0);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_IFATN, 0xffff);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_VTFT, 0x0000ffff);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_CVCF, 0x0000ffff);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_IP, 0);
emu_enastop(sc, v->vnum, 1);
}
if (v->slave != NULL)
@@ -666,7 +748,7 @@ emu_vpos(struct sc_info *sc, struct emu_voice *v)
int s, ptr;
s = (v->b16 ? 1 : 0) + (v->stereo ? 1 : 0);
- ptr = (emu_rdptr(sc, v->vnum, CCCA_CURRADDR) - (v->start >> s)) << s;
+ ptr = (emu_rdptr(sc, v->vnum, EMU_CHAN_CCCA_CURRADDR) - (v->start >> s)) << s;
return ptr & ~0x0000001f;
}
@@ -875,27 +957,27 @@ emurchan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b,
ch->num = sc->rnum;
switch(sc->rnum) {
case 0:
- ch->idxreg = sc->audigy ? A_ADCIDX : ADCIDX;
- ch->basereg = ADCBA;
- ch->sizereg = ADCBS;
- ch->setupreg = ADCCR;
- ch->irqmask = INTE_ADCBUFENABLE;
+ ch->idxreg = sc->audigy ? EMU_A_ADCIDX : EMU_ADCIDX;
+ ch->basereg = EMU_ADCBA;
+ ch->sizereg = EMU_ADCBS;
+ ch->setupreg = EMU_ADCCR;
+ ch->irqmask = EMU_INTE_ADCBUFENABLE;
break;
case 1:
- ch->idxreg = FXIDX;
- ch->basereg = FXBA;
- ch->sizereg = FXBS;
- ch->setupreg = FXWC;
- ch->irqmask = INTE_EFXBUFENABLE;
+ ch->idxreg = EMU_FXIDX;
+ ch->basereg = EMU_FXBA;
+ ch->sizereg = EMU_FXBS;
+ ch->setupreg = EMU_FXWC;
+ ch->irqmask = EMU_INTE_EFXBUFENABLE;
break;
case 2:
- ch->idxreg = MICIDX;
- ch->basereg = MICBA;
- ch->sizereg = MICBS;
+ ch->idxreg = EMU_MICIDX;
+ ch->basereg = EMU_MICBA;
+ ch->sizereg = EMU_MICBS;
ch->setupreg = 0;
- ch->irqmask = INTE_MICBUFENABLE;
+ ch->irqmask = EMU_INTE_MICBUFENABLE;
break;
}
sc->rnum++;
@@ -967,27 +1049,27 @@ emurchan_trigger(kobj_t obj, void *data, int go)
switch(sc->bufsz) {
case 4096:
- sz = ADCBS_BUFSIZE_4096;
+ sz = EMU_RECBS_BUFSIZE_4096;
break;
case 8192:
- sz = ADCBS_BUFSIZE_8192;
+ sz = EMU_RECBS_BUFSIZE_8192;
break;
case 16384:
- sz = ADCBS_BUFSIZE_16384;
+ sz = EMU_RECBS_BUFSIZE_16384;
break;
case 32768:
- sz = ADCBS_BUFSIZE_32768;
+ sz = EMU_RECBS_BUFSIZE_32768;
break;
case 65536:
- sz = ADCBS_BUFSIZE_65536;
+ sz = EMU_RECBS_BUFSIZE_65536;
break;
default:
- sz = ADCBS_BUFSIZE_4096;
+ sz = EMU_RECBS_BUFSIZE_4096;
}
snd_mtxlock(sc->lock);
@@ -997,23 +1079,23 @@ emurchan_trigger(kobj_t obj, void *data, int go)
emu_wrptr(sc, 0, ch->sizereg, sz);
if (ch->num == 0) {
if (sc->audigy) {
- val = A_ADCCR_LCHANENABLE;
+ val = EMU_A_ADCCR_LCHANENABLE;
if (AFMT_CHANNEL(ch->fmt) > 1)
- val |= A_ADCCR_RCHANENABLE;
+ val |= EMU_A_ADCCR_RCHANENABLE;
val |= audigy_recval(ch->spd);
} else {
- val = ADCCR_LCHANENABLE;
+ val = EMU_ADCCR_LCHANENABLE;
if (AFMT_CHANNEL(ch->fmt) > 1)
- val |= ADCCR_RCHANENABLE;
+ val |= EMU_ADCCR_RCHANENABLE;
val |= emu_recval(ch->spd);
}
emu_wrptr(sc, 0, ch->setupreg, 0);
emu_wrptr(sc, 0, ch->setupreg, val);
}
- val = emu_rd(sc, INTE, 4);
+ val = emu_rd(sc, EMU_INTE, 4);
val |= ch->irqmask;
- emu_wr(sc, INTE, val, 4);
+ emu_wr(sc, EMU_INTE, val, 4);
break;
case PCMTRIG_STOP:
@@ -1022,9 +1104,9 @@ emurchan_trigger(kobj_t obj, void *data, int go)
emu_wrptr(sc, 0, ch->sizereg, 0);
if (ch->setupreg)
emu_wrptr(sc, 0, ch->setupreg, 0);
- val = emu_rd(sc, INTE, 4);
+ val = emu_rd(sc, EMU_INTE, 4);
val &= ~ch->irqmask;
- emu_wr(sc, INTE, val, 4);
+ emu_wr(sc, EMU_INTE, val, 4);
break;
case PCMTRIG_EMLDMAWR:
@@ -1122,9 +1204,9 @@ emu_midiattach(struct sc_info *sc)
{
int i;
- i = emu_rd(sc, INTE, 4);
- i |= INTE_MIDIRXENABLE;
- emu_wr(sc, INTE, i, 4);
+ i = emu_rd(sc, EMU_INTE, 4);
+ i |= EMU_INTE_MIDIRXENABLE;
+ emu_wr(sc, EMU_INTE, i, 4);
sc->mpu = mpu401_init(&emu_mpu_class, sc, emu_intr2, &sc->mpu_intr);
}
@@ -1139,52 +1221,52 @@ emu_intr(void *data)
snd_mtxlock(sc->lock);
while (1) {
- stat = emu_rd(sc, IPR, 4);
+ stat = emu_rd(sc, EMU_IPR, 4);
if (stat == 0)
break;
ack = 0;
/* process irq */
- if (stat & IPR_INTERVALTIMER)
- ack |= IPR_INTERVALTIMER;
+ if (stat & EMU_IPR_INTERVALTIMER)
+ ack |= EMU_IPR_INTERVALTIMER;
- if (stat & (IPR_ADCBUFFULL | IPR_ADCBUFHALFFULL))
- ack |= stat & (IPR_ADCBUFFULL | IPR_ADCBUFHALFFULL);
+ if (stat & (EMU_IPR_ADCBUFFULL | EMU_IPR_ADCBUFHALFFULL))
+ ack |= stat & (EMU_IPR_ADCBUFFULL | EMU_IPR_ADCBUFHALFFULL);
- if (stat & (IPR_EFXBUFFULL | IPR_EFXBUFHALFFULL))
- ack |= stat & (IPR_EFXBUFFULL | IPR_EFXBUFHALFFULL);
+ if (stat & (EMU_IPR_EFXBUFFULL | EMU_IPR_EFXBUFHALFFULL))
+ ack |= stat & (EMU_IPR_EFXBUFFULL | EMU_IPR_EFXBUFHALFFULL);
- if (stat & (IPR_MICBUFFULL | IPR_MICBUFHALFFULL))
- ack |= stat & (IPR_MICBUFFULL | IPR_MICBUFHALFFULL);
+ if (stat & (EMU_IPR_MICBUFFULL | EMU_IPR_MICBUFHALFFULL))
+ ack |= stat & (EMU_IPR_MICBUFFULL | EMU_IPR_MICBUFHALFFULL);
- if (stat & IPR_PCIERROR) {
- ack |= IPR_PCIERROR;
+ if (stat & EMU_PCIERROR) {
+ ack |= EMU_PCIERROR;
device_printf(sc->dev, "pci error\n");
/* we still get an nmi with ecc ram even if we ack this */
}
- if (stat & IPR_SAMPLERATETRACKER) {
- ack |= IPR_SAMPLERATETRACKER;
+ if (stat & EMU_IPR_RATETRCHANGE) {
+ ack |= EMU_IPR_RATETRCHANGE;
#ifdef EMUDEBUG
device_printf(sc->dev,
"sample rate tracker lock status change\n");
#endif
}
- if (stat & IPR_MIDIRECVBUFEMPTY)
+ if (stat & EMU_IPR_MIDIRECVBUFE)
if (sc->mpu_intr) {
(sc->mpu_intr)(sc->mpu);
- ack |= IPR_MIDIRECVBUFEMPTY | IPR_MIDITRANSBUFEMPTY;
+ ack |= EMU_IPR_MIDIRECVBUFE | EMU_IPR_MIDITRANSBUFE;
}
if (stat & ~ack)
device_printf(sc->dev, "dodgy irq: %x (harmless)\n",
stat & ~ack);
- emu_wr(sc, IPR, stat, 4);
+ emu_wr(sc, EMU_IPR, stat, 4);
if (ack) {
snd_mtxunlock(sc->lock);
- if (ack & IPR_INTERVALTIMER) {
+ if (ack & EMU_IPR_INTERVALTIMER) {
x = 0;
for (i = 0; i < sc->nchans; i++) {
if (sc->pch[i].run) {
@@ -1197,15 +1279,15 @@ emu_intr(void *data)
}
- if (ack & (IPR_ADCBUFFULL | IPR_ADCBUFHALFFULL)) {
+ if (ack & (EMU_IPR_ADCBUFFULL | EMU_IPR_ADCBUFHALFFULL)) {
if (sc->rch[0].channel)
chn_intr(sc->rch[0].channel);
}
- if (ack & (IPR_EFXBUFFULL | IPR_EFXBUFHALFFULL)) {
+ if (ack & (EMU_IPR_EFXBUFFULL | EMU_IPR_EFXBUFHALFFULL)) {
if (sc->rch[1].channel)
chn_intr(sc->rch[1].channel);
}
- if (ack & (IPR_MICBUFFULL | IPR_MICBUFHALFFULL)) {
+ if (ack & (EMU_IPR_MICBUFFULL | EMU_IPR_MICBUFHALFFULL)) {
if (sc->rch[2].channel)
chn_intr(sc->rch[2].channel);
}
@@ -1378,12 +1460,12 @@ audigy_initefx(struct sc_info *sc)
audigy_addefxop(sc, 0x0f, 0x0c0, 0x0c0, 0x0cf, 0x0c0, &pc);
for (i = 0; i < 512; i++)
- emu_wrptr(sc, 0, A_FXGPREGBASE + i, 0x0);
+ emu_wrptr(sc, 0, EMU_A_FXGPREGBASE + i, 0x0);
pc = 16;
/* stop fx processor */
- emu_wrptr(sc, 0, A_DBG, A_DBG_SINGLE_STEP);
+ emu_wrptr(sc, 0, EMU_A_DBG, EMU_A_DBG_SINGLE_STEP);
/* Audigy 2 (EMU10K2) DSP Registers:
FX Bus
@@ -1518,7 +1600,7 @@ audigy_initefx(struct sc_info *sc)
A_C_00000000, A_EXTIN(A_EXTIN_AC97_R), &pc);
/* resume normal operations */
- emu_wrptr(sc, 0, A_DBG, 0);
+ emu_wrptr(sc, 0, EMU_A_DBG, 0);
}
static void
@@ -1534,7 +1616,7 @@ emu_initefx(struct sc_info *sc)
}
for (i = 0; i < 256; i++)
- emu_wrptr(sc, 0, FXGPREGBASE + i, 0);
+ emu_wrptr(sc, 0, EMU_FXGPREGBASE + i, 0);
/* FX-8010 DSP Registers:
FX Bus
@@ -1654,7 +1736,7 @@ emu_initefx(struct sc_info *sc)
C_00000000, EXTIN(EXTIN_AC97_R), &pc);
/* resume normal operations */
- emu_wrptr(sc, 0, DBG, 0);
+ emu_wrptr(sc, 0, EMU_DBG, 0);
}
/* Probe and attach the card */
@@ -1665,69 +1747,69 @@ emu_init(struct sc_info *sc)
if (sc->audigy) {
/* enable additional AC97 slots */
- emu_wrptr(sc, 0, AC97SLOT, AC97SLOT_CNTR | AC97SLOT_LFE);
+ emu_wrptr(sc, 0, EMU_AC97SLOT, EMU_AC97SLOT_CENTER | EMU_AC97SLOT_LFE);
}
/* disable audio and lock cache */
- emu_wr(sc, HCFG,
- HCFG_LOCKSOUNDCACHE | HCFG_LOCKTANKCACHE_MASK | HCFG_MUTEBUTTONENABLE,
+ emu_wr(sc, EMU_HCFG,
+ EMU_HCFG_LOCKSOUNDCACHE | EMU_HCFG_LOCKTANKCACHE_MASK | EMU_HCFG_MUTEBUTTONENABLE,
4);
/* reset recording buffers */
- emu_wrptr(sc, 0, MICBS, ADCBS_BUFSIZE_NONE);
- emu_wrptr(sc, 0, MICBA, 0);
- emu_wrptr(sc, 0, FXBS, ADCBS_BUFSIZE_NONE);
- emu_wrptr(sc, 0, FXBA, 0);
- emu_wrptr(sc, 0, ADCBS, ADCBS_BUFSIZE_NONE);
- emu_wrptr(sc, 0, ADCBA, 0);
+ emu_wrptr(sc, 0, EMU_MICBS, EMU_RECBS_BUFSIZE_NONE);
+ emu_wrptr(sc, 0, EMU_MICBA, 0);
+ emu_wrptr(sc, 0, EMU_FXBS, EMU_RECBS_BUFSIZE_NONE);
+ emu_wrptr(sc, 0, EMU_FXBA, 0);
+ emu_wrptr(sc, 0, EMU_ADCBS, EMU_RECBS_BUFSIZE_NONE);
+ emu_wrptr(sc, 0, EMU_ADCBA, 0);
/* disable channel interrupt */
- emu_wr(sc, INTE,
- INTE_INTERVALTIMERENB | INTE_SAMPLERATETRACKER | INTE_PCIERRORENABLE,
+ emu_wr(sc, EMU_INTE,
+ EMU_INTE_INTERTIMERENB | EMU_INTE_SAMPLERATER | EMU_INTE_PCIERRENABLE,
4);
- emu_wrptr(sc, 0, CLIEL, 0);
- emu_wrptr(sc, 0, CLIEH, 0);
- emu_wrptr(sc, 0, SOLEL, 0);
- emu_wrptr(sc, 0, SOLEH, 0);
+ emu_wrptr(sc, 0, EMU_CLIEL, 0);
+ emu_wrptr(sc, 0, EMU_CLIEH, 0);
+ emu_wrptr(sc, 0, EMU_SOLEL, 0);
+ emu_wrptr(sc, 0, EMU_SOLEH, 0);
/* wonder what these do... */
if (sc->audigy) {
- emu_wrptr(sc, 0, SPBYPASS, 0xf00);
- emu_wrptr(sc, 0, AC97SLOT, 0x3);
+ emu_wrptr(sc, 0, EMU_SPBYPASS, 0xf00);
+ emu_wrptr(sc, 0, EMU_AC97SLOT, 0x3);
}
/* init envelope engine */
for (ch = 0; ch < NUM_G; ch++) {
- emu_wrptr(sc, ch, DCYSUSV, ENV_OFF);
- emu_wrptr(sc, ch, IP, 0);
- emu_wrptr(sc, ch, VTFT, 0xffff);
- emu_wrptr(sc, ch, CVCF, 0xffff);
- emu_wrptr(sc, ch, PTRX, 0);
- emu_wrptr(sc, ch, CPF, 0);
- emu_wrptr(sc, ch, CCR, 0);
-
- emu_wrptr(sc, ch, PSST, 0);
- emu_wrptr(sc, ch, DSL, 0x10);
- emu_wrptr(sc, ch, CCCA, 0);
- emu_wrptr(sc, ch, Z1, 0);
- emu_wrptr(sc, ch, Z2, 0);
- emu_wrptr(sc, ch, FXRT, 0xd01c0000);
-
- emu_wrptr(sc, ch, ATKHLDM, 0);
- emu_wrptr(sc, ch, DCYSUSM, 0);
- emu_wrptr(sc, ch, IFATN, 0xffff);
- emu_wrptr(sc, ch, PEFE, 0);
- emu_wrptr(sc, ch, FMMOD, 0);
- emu_wrptr(sc, ch, TREMFRQ, 24); /* 1 Hz */
- emu_wrptr(sc, ch, FM2FRQ2, 24); /* 1 Hz */
- emu_wrptr(sc, ch, TEMPENV, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_DCYSUSV, ENV_OFF);
+ emu_wrptr(sc, ch, EMU_CHAN_IP, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_VTFT, 0xffff);
+ emu_wrptr(sc, ch, EMU_CHAN_CVCF, 0xffff);
+ emu_wrptr(sc, ch, EMU_CHAN_PTRX, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_CPF, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_CCR, 0);
+
+ emu_wrptr(sc, ch, EMU_CHAN_PSST, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_DSL, 0x10);
+ emu_wrptr(sc, ch, EMU_CHAN_CCCA, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_Z1, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_Z2, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_FXRT, 0xd01c0000);
+
+ emu_wrptr(sc, ch, EMU_CHAN_ATKHLDM, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_DCYSUSM, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_IFATN, 0xffff);
+ emu_wrptr(sc, ch, EMU_CHAN_PEFE, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_FMMOD, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_TREMFRQ, 24); /* 1 Hz */
+ emu_wrptr(sc, ch, EMU_CHAN_FM2FRQ2, 24); /* 1 Hz */
+ emu_wrptr(sc, ch, EMU_CHAN_TEMPENV, 0);
/*** these are last so OFF prevents writing ***/
- emu_wrptr(sc, ch, LFOVAL2, 0);
- emu_wrptr(sc, ch, LFOVAL1, 0);
- emu_wrptr(sc, ch, ATKHLDV, 0);
- emu_wrptr(sc, ch, ENVVOL, 0);
- emu_wrptr(sc, ch, ENVVAL, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_LFOVAL2, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_LFOVAL1, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_ATKHLDV, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_ENVVOL, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_ENVVAL, 0);
if (sc->audigy) {
/* audigy cards need this to initialize correctly */
@@ -1736,9 +1818,9 @@ emu_init(struct sc_info *sc)
emu_wrptr(sc, ch, 0x4e, 0);
emu_wrptr(sc, ch, 0x4f, 0);
/* set default routing */
- emu_wrptr(sc, ch, A_FXRT1, 0x03020100);
- emu_wrptr(sc, ch, A_FXRT2, 0x3f3f3f3f);
- emu_wrptr(sc, ch, A_SENDAMOUNTS, 0);
+ emu_wrptr(sc, ch, EMU_A_CHAN_FXRT1, 0x03020100);
+ emu_wrptr(sc, ch, EMU_A_CHAN_FXRT2, 0x3f3f3f3f);
+ emu_wrptr(sc, ch, EMU_A_CHAN_SENDAMOUNTS, 0);
}
sc->voice[ch].vnum = ch;
@@ -1769,13 +1851,13 @@ emu_init(struct sc_info *sc)
* AN = 0 (Audio data)
* P = 0 (Consumer)
*/
- spcs = SPCS_CLKACCY_1000PPM | SPCS_SAMPLERATE_48 |
- SPCS_CHANNELNUM_LEFT | SPCS_SOURCENUM_UNSPEC |
- SPCS_GENERATIONSTATUS | 0x00001200 | 0x00000000 |
- SPCS_EMPHASIS_NONE | SPCS_COPYRIGHT;
- emu_wrptr(sc, 0, SPCS0, spcs);
- emu_wrptr(sc, 0, SPCS1, spcs);
- emu_wrptr(sc, 0, SPCS2, spcs);
+ spcs = EMU_SPCS_CLKACCY_1000PPM | EMU_SPCS_SAMPLERATE_48 |
+ EMU_SPCS_CHANNELNUM_LEFT | EMU_SPCS_SOURCENUM_UNSPEC |
+ EMU_SPCS_GENERATIONSTATUS | 0x00001200 | 0x00000000 |
+ EMU_SPCS_EMPHASIS_NONE | EMU_SPCS_COPYRIGHT;
+ emu_wrptr(sc, 0, EMU_SPCS0, spcs);
+ emu_wrptr(sc, 0, EMU_SPCS1, spcs);
+ emu_wrptr(sc, 0, EMU_SPCS2, spcs);
if (!sc->audigy)
emu_initefx(sc);
@@ -1786,8 +1868,8 @@ emu_init(struct sc_info *sc)
u_int32_t tmp;
/* Setup SRCMulti_I2S SamplingRate */
- tmp = emu_rdptr(sc, 0, A_SPDIF_SAMPLERATE) & 0xfffff1ff;
- emu_wrptr(sc, 0, A_SPDIF_SAMPLERATE, tmp | 0x400);
+ tmp = emu_rdptr(sc, 0, EMU_A_SPDIF_SAMPLERATE) & 0xfffff1ff;
+ emu_wrptr(sc, 0, EMU_A_SPDIF_SAMPLERATE, tmp | 0x400);
/* Setup SRCSel (Enable SPDIF, I2S SRCMulti) */
emu_wr(sc, 0x20, 0x00600000, 4);
@@ -1816,13 +1898,13 @@ emu_init(struct sc_info *sc)
for (i = 0; i < EMUMAXPAGES; i++)
sc->mem.ptb_pages[i] = tmp | i;
- emu_wrptr(sc, 0, PTB, (sc->mem.ptb_pages_addr));
- emu_wrptr(sc, 0, TCB, 0); /* taken from original driver */
- emu_wrptr(sc, 0, TCBS, 0); /* taken from original driver */
+ emu_wrptr(sc, 0, EMU_PTB, (sc->mem.ptb_pages_addr));
+ emu_wrptr(sc, 0, EMU_TCB, 0); /* taken from original driver */
+ emu_wrptr(sc, 0, EMU_TCBS, 0); /* taken from original driver */
for (ch = 0; ch < NUM_G; ch++) {
- emu_wrptr(sc, ch, MAPA, tmp | MAP_PTI_MASK);
- emu_wrptr(sc, ch, MAPB, tmp | MAP_PTI_MASK);
+ emu_wrptr(sc, ch, EMU_CHAN_MAPA, tmp | EMU_CHAN_MAP_PTI_MASK);
+ emu_wrptr(sc, ch, EMU_CHAN_MAPB, tmp | EMU_CHAN_MAP_PTI_MASK);
}
/* emu_memalloc(sc, EMUPAGESIZE); */
@@ -1850,19 +1932,19 @@ emu_init(struct sc_info *sc)
*/
if (sc->audigy) {
- tmp = HCFG_AUTOMUTE | HCFG_JOYENABLE;
+ tmp = EMU_HCFG_AUTOMUTE | EMU_HCFG_JOYENABLE;
if (sc->audigy2) /* Audigy 2 */
- tmp = HCFG_AUDIOENABLE | HCFG_AC3ENABLE_CDSPDIF |
- HCFG_AC3ENABLE_GPSPDIF;
- emu_wr(sc, HCFG, tmp, 4);
+ tmp = EMU_HCFG_AUDIOENABLE | EMU_HCFG_AC3ENABLE_CDSPDIF |
+ EMU_HCFG_AC3ENABLE_GPSPDIF;
+ emu_wr(sc, EMU_HCFG, tmp, 4);
audigy_initefx(sc);
/* from ALSA initialization code: */
/* enable audio and disable both audio/digital outputs */
- emu_wr(sc, HCFG, emu_rd(sc, HCFG, 4) | HCFG_AUDIOENABLE, 4);
- emu_wr(sc, A_IOCFG, emu_rd(sc, A_IOCFG, 4) & ~A_IOCFG_GPOUT_AD,
+ emu_wr(sc, EMU_HCFG, emu_rd(sc, EMU_HCFG, 4) | EMU_HCFG_AUDIOENABLE, 4);
+ emu_wr(sc, EMU_A_IOCFG, emu_rd(sc, EMU_A_IOCFG, 4) & ~EMU_A_IOCFG_GPOUT_AD,
4);
if (sc->audigy2) { /* Audigy 2 */
/* Unmute Analog.
@@ -1870,27 +1952,27 @@ emu_init(struct sc_info *sc)
* init Alice3 I2SOut beyond 48kHz.
* So, sequence is important.
*/
- emu_wr(sc, A_IOCFG,
- emu_rd(sc, A_IOCFG, 4) | A_IOCFG_GPOUT_A, 4);
+ emu_wr(sc, EMU_A_IOCFG,
+ emu_rd(sc, EMU_A_IOCFG, 4) | EMU_A_IOCFG_GPOUT_A, 4);
}
} else {
/* EMU10K1 initialization code */
- tmp = HCFG_AUDIOENABLE | HCFG_LOCKTANKCACHE_MASK
- | HCFG_AUTOMUTE;
+ tmp = EMU_HCFG_AUDIOENABLE | EMU_HCFG_LOCKTANKCACHE_MASK
+ | EMU_HCFG_AUTOMUTE;
if (sc->rev >= 6)
- tmp |= HCFG_JOYENABLE;
+ tmp |= EMU_HCFG_JOYENABLE;
- emu_wr(sc, HCFG, tmp, 4);
+ emu_wr(sc, EMU_HCFG, tmp, 4);
/* TOSLink detection */
sc->tos_link = 0;
- tmp = emu_rd(sc, HCFG, 4);
- if (tmp & (HCFG_GPINPUT0 | HCFG_GPINPUT1)) {
- emu_wr(sc, HCFG, tmp | HCFG_GPOUT1, 4);
+ tmp = emu_rd(sc, EMU_HCFG, 4);
+ if (tmp & (EMU_HCFG_GPINPUT0 | EMU_HCFG_GPINPUT1)) {
+ emu_wr(sc, EMU_HCFG, tmp | EMU_HCFG_GPOUT1, 4);
DELAY(50);
- if (tmp != (emu_rd(sc, HCFG, 4) & ~HCFG_GPOUT1)) {
+ if (tmp != (emu_rd(sc, EMU_HCFG, 4) & ~EMU_HCFG_GPOUT1)) {
sc->tos_link = 1;
- emu_wr(sc, HCFG, tmp, 4);
+ emu_wr(sc, EMU_HCFG, tmp, 4);
}
}
}
@@ -1903,42 +1985,42 @@ emu_uninit(struct sc_info *sc)
{
u_int32_t ch;
- emu_wr(sc, INTE, 0, 4);
+ emu_wr(sc, EMU_INTE, 0, 4);
for (ch = 0; ch < NUM_G; ch++)
- emu_wrptr(sc, ch, DCYSUSV, ENV_OFF);
+ emu_wrptr(sc, ch, EMU_CHAN_DCYSUSV, ENV_OFF);
for (ch = 0; ch < NUM_G; ch++) {
- emu_wrptr(sc, ch, VTFT, 0);
- emu_wrptr(sc, ch, CVCF, 0);
- emu_wrptr(sc, ch, PTRX, 0);
- emu_wrptr(sc, ch, CPF, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_VTFT, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_CVCF, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_PTRX, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_CPF, 0);
}
if (sc->audigy) { /* stop fx processor */
- emu_wrptr(sc, 0, A_DBG, A_DBG_SINGLE_STEP);
+ emu_wrptr(sc, 0, EMU_A_DBG, EMU_A_DBG_SINGLE_STEP);
}
/* disable audio and lock cache */
- emu_wr(sc, HCFG,
- HCFG_LOCKSOUNDCACHE | HCFG_LOCKTANKCACHE_MASK | HCFG_MUTEBUTTONENABLE,
+ emu_wr(sc, EMU_HCFG,
+ EMU_HCFG_LOCKSOUNDCACHE | EMU_HCFG_LOCKTANKCACHE_MASK | EMU_HCFG_MUTEBUTTONENABLE,
4);
- emu_wrptr(sc, 0, PTB, 0);
+ emu_wrptr(sc, 0, EMU_PTB, 0);
/* reset recording buffers */
- emu_wrptr(sc, 0, MICBS, ADCBS_BUFSIZE_NONE);
- emu_wrptr(sc, 0, MICBA, 0);
- emu_wrptr(sc, 0, FXBS, ADCBS_BUFSIZE_NONE);
- emu_wrptr(sc, 0, FXBA, 0);
- emu_wrptr(sc, 0, FXWC, 0);
- emu_wrptr(sc, 0, ADCBS, ADCBS_BUFSIZE_NONE);
- emu_wrptr(sc, 0, ADCBA, 0);
- emu_wrptr(sc, 0, TCB, 0);
- emu_wrptr(sc, 0, TCBS, 0);
+ emu_wrptr(sc, 0, EMU_MICBS, EMU_RECBS_BUFSIZE_NONE);
+ emu_wrptr(sc, 0, EMU_MICBA, 0);
+ emu_wrptr(sc, 0, EMU_FXBS, EMU_RECBS_BUFSIZE_NONE);
+ emu_wrptr(sc, 0, EMU_FXBA, 0);
+ emu_wrptr(sc, 0, EMU_FXWC, 0);
+ emu_wrptr(sc, 0, EMU_ADCBS, EMU_RECBS_BUFSIZE_NONE);
+ emu_wrptr(sc, 0, EMU_ADCBA, 0);
+ emu_wrptr(sc, 0, EMU_TCB, 0);
+ emu_wrptr(sc, 0, EMU_TCBS, 0);
/* disable channel interrupt */
- emu_wrptr(sc, 0, CLIEL, 0);
- emu_wrptr(sc, 0, CLIEH, 0);
- emu_wrptr(sc, 0, SOLEL, 0);
- emu_wrptr(sc, 0, SOLEH, 0);
+ emu_wrptr(sc, 0, EMU_CLIEL, 0);
+ emu_wrptr(sc, 0, EMU_CLIEH, 0);
+ emu_wrptr(sc, 0, EMU_SOLEL, 0);
+ emu_wrptr(sc, 0, EMU_SOLEH, 0);
/* init envelope engine */
if (!SLIST_EMPTY(&sc->mem.blocks))
@@ -1997,7 +2079,7 @@ emu_pci_attach(device_t dev)
sc->audigy = sc->type == EMU10K2_PCI_ID || sc->type == EMU10K3_PCI_ID;
sc->audigy2 = (sc->audigy && sc->rev == 0x04);
sc->nchans = sc->audigy ? 8 : 4;
- sc->addrmask = sc->audigy ? A_PTR_ADDRESS_MASK : PTR_ADDRESS_MASK;
+ sc->addrmask = sc->audigy ? EMU_A_PTR_ADDR_MASK : EMU_PTR_ADDR_MASK;
data = pci_read_config(dev, PCIR_COMMAND, 2);
data |= (PCIM_CMD_PORTEN | PCIM_CMD_BUSMASTEREN);
diff --git a/sys/dev/sound/pci/emu10kx-midi.c b/sys/dev/sound/pci/emu10kx-midi.c
index 63abd3d..c85800e 100644
--- a/sys/dev/sound/pci/emu10kx-midi.c
+++ b/sys/dev/sound/pci/emu10kx-midi.c
@@ -50,8 +50,8 @@
#include <dev/sound/midi/mpu401.h>
#include "mpufoi_if.h"
+#include <dev/sound/pci/emuxkireg.h>
#include <dev/sound/pci/emu10kx.h>
-#include "emu10k1-alsa%diked.h"
struct emu_midi_softc {
struct mtx mtx;
@@ -176,25 +176,25 @@ emu_midi_attach(device_t dev)
if (scp->is_emu10k1) {
/* SB Live! - only one MIDI device here */
inte_val = 0;
- /* inte_val |= INTE_MIDITXENABLE;*/
- inte_val |= INTE_MIDIRXENABLE;
- ipr_val = IPR_MIDITRANSBUFEMPTY;
- ipr_val |= IPR_MIDIRECVBUFEMPTY;
+ /* inte_val |= EMU_INTE_MIDITXENABLE;*/
+ inte_val |= EMU_INTE_MIDIRXENABLE;
+ ipr_val = EMU_IPR_MIDITRANSBUFE;
+ ipr_val |= EMU_IPR_MIDIRECVBUFE;
} else {
- if (scp->port == A_MUDATA1) {
+ if (scp->port == EMU_A_MUDATA1) {
/* EXTERNAL MIDI (AudigyDrive) */
inte_val = 0;
- /* inte_val |= A_INTE_MIDITXENABLE1;*/
- inte_val |= INTE_MIDIRXENABLE;
- ipr_val = IPR_MIDITRANSBUFEMPTY;
- ipr_val |= IPR_MIDIRECVBUFEMPTY;
+ /* inte_val |= A_EMU_INTE_MIDITXENABLE1;*/
+ inte_val |= EMU_INTE_MIDIRXENABLE;
+ ipr_val = EMU_IPR_MIDITRANSBUFE;
+ ipr_val |= EMU_IPR_MIDIRECVBUFE;
} else {
/* MIDI hw config port 2 */
inte_val = 0;
- /* inte_val |= A_INTE_MIDITXENABLE2;*/
- inte_val |= INTE_A_MIDIRXENABLE2;
- ipr_val = IPR_A_MIDITRANSBUFEMPTY2;
- ipr_val |= IPR_A_MIDIRECVBUFEMPTY2;
+ /* inte_val |= A_EMU_INTE_MIDITXENABLE2;*/
+ inte_val |= EMU_INTE_A_MIDIRXENABLE2;
+ ipr_val = EMU_IPR_A_MIDITRANSBUFE2;
+ ipr_val |= EMU_IPR_A_MIDIRECBUFE2;
}
}
@@ -214,7 +214,7 @@ emu_midi_attach(device_t dev)
if (scp->is_emu10k1)
emu_enable_ir(scp->card);
else {
- if (scp->port == A_MUDATA1)
+ if (scp->port == EMU_A_MUDATA1)
emu_enable_ir(scp->card);
}
diff --git a/sys/dev/sound/pci/emu10kx-pcm.c b/sys/dev/sound/pci/emu10kx-pcm.c
index 7ffee84..ab20dc6 100644
--- a/sys/dev/sound/pci/emu10kx-pcm.c
+++ b/sys/dev/sound/pci/emu10kx-pcm.c
@@ -49,8 +49,8 @@
#include "mixer_if.h"
+#include <dev/sound/pci/emuxkireg.h>
#include <dev/sound/pci/emu10kx.h>
-#include "emu10k1-alsa%diked.h"
struct emu_pcm_pchinfo {
int spd;
@@ -555,8 +555,8 @@ emu_ac97_read_emulation(struct emu_pcm_info *sc, int regno)
break;
}
- emu_wr(sc->card, AC97ADDRESS, regno, 1);
- tmp = emu_rd(sc->card, AC97DATA, 2);
+ emu_wr(sc->card, EMU_AC97ADDR, regno, 1);
+ tmp = emu_rd(sc->card, EMU_AC97DATA, 2);
if (use_ac97)
emulated = tmp;
@@ -621,8 +621,8 @@ emu_ac97_write_emulation(struct emu_pcm_info *sc, int regno, uint32_t data)
break;
}
if (write_ac97) {
- emu_wr(sc->card, AC97ADDRESS, regno, 1);
- emu_wr(sc->card, AC97DATA, data, 2);
+ emu_wr(sc->card, EMU_AC97ADDR, regno, 1);
+ emu_wr(sc->card, EMU_AC97DATA, data, 2);
}
}
@@ -658,8 +658,8 @@ emu_rdcd(kobj_t obj __unused, void *devinfo, int regno)
struct emu_pcm_info *sc = (struct emu_pcm_info *)devinfo;
KASSERT(sc->card != NULL, ("emu_rdcd: no soundcard"));
- emu_wr(sc->card, AC97ADDRESS, regno, 1);
- rd = emu_rd(sc->card, AC97DATA, 2);
+ emu_wr(sc->card, EMU_AC97ADDR, regno, 1);
+ rd = emu_rd(sc->card, EMU_AC97DATA, 2);
return (rd);
}
@@ -669,8 +669,8 @@ emu_wrcd(kobj_t obj __unused, void *devinfo, int regno, uint32_t data)
struct emu_pcm_info *sc = (struct emu_pcm_info *)devinfo;
KASSERT(sc->card != NULL, ("emu_wrcd: no soundcard"));
- emu_wr(sc->card, AC97ADDRESS, regno, 1);
- emu_wr(sc->card, AC97DATA, data, 2);
+ emu_wr(sc->card, EMU_AC97ADDR, regno, 1);
+ emu_wr(sc->card, EMU_AC97DATA, data, 2);
return (0);
}
@@ -870,12 +870,12 @@ emurchan_init(kobj_t obj __unused, void *devinfo, struct snd_dbuf *b, struct pcm
ch->blksz = sc->bufsz / 2; /* We rise interrupt for half-full buffer */
ch->fmt = SND_FORMAT(AFMT_U8, 1, 0);
ch->spd = 8000;
- ch->idxreg = sc->is_emu10k1 ? ADCIDX : A_ADCIDX;
- ch->basereg = ADCBA;
- ch->sizereg = ADCBS;
- ch->setupreg = ADCCR;
- ch->irqmask = INTE_ADCBUFENABLE;
- ch->iprmask = IPR_ADCBUFFULL | IPR_ADCBUFHALFFULL;
+ ch->idxreg = sc->is_emu10k1 ? EMU_ADCIDX : EMU_A_ADCIDX;
+ ch->basereg = EMU_ADCBA;
+ ch->sizereg = EMU_ADCBS;
+ ch->setupreg = EMU_ADCCR;
+ ch->irqmask = EMU_INTE_ADCBUFENABLE;
+ ch->iprmask = EMU_IPR_ADCBUFFULL | EMU_IPR_ADCBUFHALFFULL;
if (sndbuf_alloc(ch->buffer, emu_gettag(sc->card), 0, sc->bufsz) != 0)
return (NULL);
@@ -953,22 +953,22 @@ emurchan_trigger(kobj_t obj __unused, void *c_devinfo, int go)
switch (sc->bufsz) {
case 4096:
- sz = ADCBS_BUFSIZE_4096;
+ sz = EMU_RECBS_BUFSIZE_4096;
break;
case 8192:
- sz = ADCBS_BUFSIZE_8192;
+ sz = EMU_RECBS_BUFSIZE_8192;
break;
case 16384:
- sz = ADCBS_BUFSIZE_16384;
+ sz = EMU_RECBS_BUFSIZE_16384;
break;
case 32768:
- sz = ADCBS_BUFSIZE_32768;
+ sz = EMU_RECBS_BUFSIZE_32768;
break;
case 65536:
- sz = ADCBS_BUFSIZE_65536;
+ sz = EMU_RECBS_BUFSIZE_65536;
break;
default:
- sz = ADCBS_BUFSIZE_4096;
+ sz = EMU_RECBS_BUFSIZE_4096;
}
snd_mtxlock(sc->lock);
@@ -976,9 +976,9 @@ emurchan_trigger(kobj_t obj __unused, void *c_devinfo, int go)
case PCMTRIG_START:
ch->run = 1;
emu_wrptr(sc->card, 0, ch->sizereg, sz);
- val = sc->is_emu10k1 ? ADCCR_LCHANENABLE : A_ADCCR_LCHANENABLE;
+ val = sc->is_emu10k1 ? EMU_ADCCR_LCHANENABLE : EMU_A_ADCCR_LCHANENABLE;
if (AFMT_CHANNEL(ch->fmt) > 1)
- val |= sc->is_emu10k1 ? ADCCR_RCHANENABLE : A_ADCCR_RCHANENABLE;
+ val |= sc->is_emu10k1 ? EMU_ADCCR_RCHANENABLE : EMU_A_ADCCR_RCHANENABLE;
val |= sc->is_emu10k1 ? emu_k1_recval(ch->spd) : emu_k2_recval(ch->spd);
emu_wrptr(sc->card, 0, ch->setupreg, 0);
emu_wrptr(sc->card, 0, ch->setupreg, val);
@@ -1049,11 +1049,11 @@ emufxrchan_init(kobj_t obj __unused, void *devinfo, struct snd_dbuf *b, struct p
ch = &(sc->rch_efx);
ch->fmt = SND_FORMAT(AFMT_S16_LE, 1, 0);
ch->spd = sc->is_emu10k1 ? 48000*32 : 48000 * 64;
- ch->idxreg = FXIDX;
- ch->basereg = FXBA;
- ch->sizereg = FXBS;
- ch->irqmask = INTE_EFXBUFENABLE;
- ch->iprmask = IPR_EFXBUFFULL | IPR_EFXBUFHALFFULL;
+ ch->idxreg = EMU_FXIDX;
+ ch->basereg = EMU_FXBA;
+ ch->sizereg = EMU_FXBS;
+ ch->irqmask = EMU_INTE_EFXBUFENABLE;
+ ch->iprmask = EMU_IPR_EFXBUFFULL | EMU_IPR_EFXBUFHALFFULL;
ch->buffer = b;
ch->pcm = sc;
ch->channel = c;
@@ -1113,22 +1113,22 @@ emufxrchan_trigger(kobj_t obj __unused, void *c_devinfo, int go)
switch (sc->bufsz) {
case 4096:
- sz = ADCBS_BUFSIZE_4096;
+ sz = EMU_RECBS_BUFSIZE_4096;
break;
case 8192:
- sz = ADCBS_BUFSIZE_8192;
+ sz = EMU_RECBS_BUFSIZE_8192;
break;
case 16384:
- sz = ADCBS_BUFSIZE_16384;
+ sz = EMU_RECBS_BUFSIZE_16384;
break;
case 32768:
- sz = ADCBS_BUFSIZE_32768;
+ sz = EMU_RECBS_BUFSIZE_32768;
break;
case 65536:
- sz = ADCBS_BUFSIZE_65536;
+ sz = EMU_RECBS_BUFSIZE_65536;
break;
default:
- sz = ADCBS_BUFSIZE_4096;
+ sz = EMU_RECBS_BUFSIZE_4096;
}
snd_mtxlock(sc->lock);
@@ -1140,14 +1140,14 @@ emufxrchan_trigger(kobj_t obj __unused, void *c_devinfo, int go)
/*
* SB Live! is limited to 32 mono channels. Audigy
* has 64 mono channels. Channels are enabled
- * by setting a bit in A_FXWC[1|2] registers.
+ * by setting a bit in EMU_A_FXWC[1|2] registers.
*/
/* XXX there is no way to demultiplex this streams for now */
if (sc->is_emu10k1) {
- emu_wrptr(sc->card, 0, FXWC, 0xffffffff);
+ emu_wrptr(sc->card, 0, EMU_FXWC, 0xffffffff);
} else {
- emu_wrptr(sc->card, 0, A_FXWC1, 0xffffffff);
- emu_wrptr(sc->card, 0, A_FXWC2, 0xffffffff);
+ emu_wrptr(sc->card, 0, EMU_A_FXWC1, 0xffffffff);
+ emu_wrptr(sc->card, 0, EMU_A_FXWC2, 0xffffffff);
}
break;
case PCMTRIG_STOP:
@@ -1155,10 +1155,10 @@ emufxrchan_trigger(kobj_t obj __unused, void *c_devinfo, int go)
case PCMTRIG_ABORT:
ch->run = 0;
if (sc->is_emu10k1) {
- emu_wrptr(sc->card, 0, FXWC, 0x0);
+ emu_wrptr(sc->card, 0, EMU_FXWC, 0x0);
} else {
- emu_wrptr(sc->card, 0, A_FXWC1, 0x0);
- emu_wrptr(sc->card, 0, A_FXWC2, 0x0);
+ emu_wrptr(sc->card, 0, EMU_A_FXWC1, 0x0);
+ emu_wrptr(sc->card, 0, EMU_A_FXWC2, 0x0);
}
emu_wrptr(sc->card, 0, ch->sizereg, 0);
(void)emu_intr_unregister(sc->card, ch->ihandle);
@@ -1238,8 +1238,8 @@ emu_pcm_intr(void *pcm, uint32_t stat)
snd_mtxlock(sc->lock);
- if (stat & IPR_INTERVALTIMER) {
- ack |= IPR_INTERVALTIMER;
+ if (stat & EMU_IPR_INTERVALTIMER) {
+ ack |= EMU_IPR_INTERVALTIMER;
for (i = 0; i < MAX_CHANNELS; i++)
if (sc->pch[i].channel) {
if (sc->pch[i].run == 1) {
@@ -1262,8 +1262,8 @@ emu_pcm_intr(void *pcm, uint32_t stat)
}
- if (stat & (IPR_ADCBUFFULL | IPR_ADCBUFHALFFULL)) {
- ack |= stat & (IPR_ADCBUFFULL | IPR_ADCBUFHALFFULL);
+ if (stat & (EMU_IPR_ADCBUFFULL | EMU_IPR_ADCBUFHALFFULL)) {
+ ack |= stat & (EMU_IPR_ADCBUFFULL | EMU_IPR_ADCBUFHALFFULL);
if (sc->rch_adc.channel) {
snd_mtxunlock(sc->lock);
chn_intr(sc->rch_adc.channel);
@@ -1271,8 +1271,8 @@ emu_pcm_intr(void *pcm, uint32_t stat)
}
}
- if (stat & (IPR_EFXBUFFULL | IPR_EFXBUFHALFFULL)) {
- ack |= stat & (IPR_EFXBUFFULL | IPR_EFXBUFHALFFULL);
+ if (stat & (EMU_IPR_EFXBUFFULL | EMU_IPR_EFXBUFHALFFULL)) {
+ ack |= stat & (EMU_IPR_EFXBUFFULL | EMU_IPR_EFXBUFHALFFULL);
if (sc->rch_efx.channel) {
snd_mtxunlock(sc->lock);
chn_intr(sc->rch_efx.channel);
@@ -1450,8 +1450,8 @@ emu_pcm_attach(device_t dev)
goto bad;
}
- inte = INTE_INTERVALTIMERENB;
- ipr = IPR_INTERVALTIMER; /* Used by playback & ADC */
+ inte = EMU_INTE_INTERTIMERENB;
+ ipr = EMU_IPR_INTERVALTIMER; /* Used by playback & ADC */
sc->ihandle = emu_intr_register(sc->card, inte, ipr, &emu_pcm_intr, sc);
if (emu_pcm_init(sc) == -1) {
diff --git a/sys/dev/sound/pci/emu10kx.c b/sys/dev/sound/pci/emu10kx.c
index c7ac57f..7939515 100644
--- a/sys/dev/sound/pci/emu10kx.c
+++ b/sys/dev/sound/pci/emu10kx.c
@@ -53,6 +53,7 @@
#include <dev/sound/pcm/sound.h>
#include <dev/sound/pcm/ac97.h>
+#include <dev/sound/pci/emuxkireg.h>
#include <dev/sound/pci/emu10kx.h>
/* hw flags */
@@ -157,7 +158,7 @@
#define OUT_ADC_REC OUT_ADC_REC_L
#define OUT_MIC_CAP 0x0c
-/* Live! 5.1 Digital, non-standart 5.1 (center & sub) outputs */
+/* Live! 5.1 Digital, non-standard 5.1 (center & sub) outputs */
#define OUT_A_CENTER 0x11
#define OUT_A_SUB 0x12
@@ -181,7 +182,7 @@
#define A_IN_AUX2_R 0x0d
#define A_IN_AUX2 A_IN_AUX2_L
-/* Audigiy Outputs */
+/* Audigy Outputs */
#define A_OUT_D_FRONT_L 0x00
#define A_OUT_D_FRONT_R 0x01
#define A_OUT_D_FRONT A_OUT_D_FRONT_L
@@ -217,9 +218,19 @@
#define A_OUT_ADC_REC_R 0x17
#define A_OUT_ADC_REC A_OUT_ADC_REC_L
-#include "emu10k1-alsa%diked.h"
-#include "p16v-alsa%diked.h"
-#include "p17v-alsa%diked.h"
+#define EMU_DATA2 0x24
+#define EMU_IPR2 0x28
+#define EMU_INTE2 0x2c
+#define EMU_IPR3 0x38
+#define EMU_INTE3 0x3c
+
+#define EMU_A2_SRCSel 0x60
+#define EMU_A2_SRCMULTI_ENABLE 0x6e
+
+#define EMU_A_I2S_CAPTURE_96000 0x00000400
+
+#define EMU_A2_MIXER_I2S_ENABLE 0x7B
+#define EMU_A2_MIXER_SPDIF_ENABLE 0x7A
#define C_FRONT_L 0
#define C_FRONT_R 1
@@ -630,7 +641,7 @@ emu_wr_nolock(struct emu_sc_info *sc, unsigned int regno, uint32_t data, unsigne
}
}
/*
- * PTR / DATA interface. Access to EMU10Kx is made
+ * EMU_PTR / EMU_DATA interface. Access to EMU10Kx is made
* via (channel, register) pair. Some registers are channel-specific,
* some not.
*/
@@ -639,11 +650,11 @@ emu_rdptr(struct emu_sc_info *sc, unsigned int chn, unsigned int reg)
{
uint32_t ptr, val, mask, size, offset;
- ptr = ((reg << 16) & sc->address_mask) | (chn & PTR_CHANNELNUM_MASK);
+ ptr = ((reg << 16) & sc->address_mask) | (chn & EMU_PTR_CHNO_MASK);
EMU_RWLOCK();
- emu_wr_nolock(sc, PTR, ptr, 4);
- val = emu_rd_nolock(sc, DATA, 4);
+ emu_wr_nolock(sc, EMU_PTR, ptr, 4);
+ val = emu_rd_nolock(sc, EMU_DATA, 4);
EMU_RWUNLOCK();
/*
@@ -666,10 +677,10 @@ emu_wrptr(struct emu_sc_info *sc, unsigned int chn, unsigned int reg, uint32_t d
{
uint32_t ptr, mask, size, offset;
- ptr = ((reg << 16) & sc->address_mask) | (chn & PTR_CHANNELNUM_MASK);
+ ptr = ((reg << 16) & sc->address_mask) | (chn & EMU_PTR_CHNO_MASK);
EMU_RWLOCK();
- emu_wr_nolock(sc, PTR, ptr, 4);
+ emu_wr_nolock(sc, EMU_PTR, ptr, 4);
/*
* XXX Another kind of magic encoding in register number. This can
* give you side effect - it will read previous data from register
@@ -681,13 +692,13 @@ emu_wrptr(struct emu_sc_info *sc, unsigned int chn, unsigned int reg, uint32_t d
mask = ((1 << size) - 1) << offset;
data <<= offset;
data &= mask;
- data |= emu_rd_nolock(sc, DATA, 4) & ~mask;
+ data |= emu_rd_nolock(sc, EMU_DATA, 4) & ~mask;
}
- emu_wr_nolock(sc, DATA, data, 4);
+ emu_wr_nolock(sc, EMU_DATA, data, 4);
EMU_RWUNLOCK();
}
/*
- * PTR2 / DATA2 interface. Access to P16v is made
+ * EMU_A2_PTR / EMU_DATA2 interface. Access to P16v is made
* via (channel, register) pair. Some registers are channel-specific,
* some not. This interface is supported by CA0102 and CA0108 chips only.
*/
@@ -698,8 +709,8 @@ emu_rd_p16vptr(struct emu_sc_info *sc, uint16_t chn, uint16_t reg)
/* XXX separate lock? */
EMU_RWLOCK();
- emu_wr_nolock(sc, PTR2, (reg << 16) | chn, 4);
- val = emu_rd_nolock(sc, DATA2, 4);
+ emu_wr_nolock(sc, EMU_A2_PTR, (reg << 16) | chn, 4);
+ val = emu_rd_nolock(sc, EMU_DATA2, 4);
EMU_RWUNLOCK();
@@ -711,8 +722,8 @@ emu_wr_p16vptr(struct emu_sc_info *sc, uint16_t chn, uint16_t reg, uint32_t data
{
EMU_RWLOCK();
- emu_wr_nolock(sc, PTR2, (reg << 16) | chn, 4);
- emu_wr_nolock(sc, DATA2, data, 4);
+ emu_wr_nolock(sc, EMU_A2_PTR, (reg << 16) | chn, 4);
+ emu_wr_nolock(sc, EMU_DATA2, data, 4);
EMU_RWUNLOCK();
}
/*
@@ -737,13 +748,13 @@ emu_wr_cbptr(struct emu_sc_info *sc, uint32_t data)
/*
* Direct hardware register access
- * Assume that it is never used to access PTR-based registers and can run unlocked.
+ * Assume that it is never used to access EMU_PTR-based registers and can run unlocked.
*/
void
emu_wr(struct emu_sc_info *sc, unsigned int regno, uint32_t data, unsigned int size)
{
- KASSERT(regno != PTR, ("emu_wr: attempt to write to PTR"));
- KASSERT(regno != PTR2, ("emu_wr: attempt to write to PTR2"));
+ KASSERT(regno != EMU_PTR, ("emu_wr: attempt to write to EMU_PTR"));
+ KASSERT(regno != EMU_A2_PTR, ("emu_wr: attempt to write to EMU_A2_PTR"));
emu_wr_nolock(sc, regno, data, size);
}
@@ -753,8 +764,8 @@ emu_rd(struct emu_sc_info *sc, unsigned int regno, unsigned int size)
{
uint32_t rd;
- KASSERT(regno != DATA, ("emu_rd: attempt to read DATA"));
- KASSERT(regno != DATA2, ("emu_rd: attempt to read DATA2"));
+ KASSERT(regno != EMU_DATA, ("emu_rd: attempt to read DATA"));
+ KASSERT(regno != EMU_DATA2, ("emu_rd: attempt to read DATA2"));
rd = emu_rd_nolock(sc, regno, size);
return (rd);
@@ -770,24 +781,24 @@ emu_enable_ir(struct emu_sc_info *sc)
uint32_t iocfg;
if (sc->is_emu10k2 || sc->is_ca0102) {
- iocfg = emu_rd_nolock(sc, A_IOCFG, 2);
- emu_wr_nolock(sc, A_IOCFG, iocfg | A_IOCFG_GPOUT2, 2);
+ iocfg = emu_rd_nolock(sc, EMU_A_IOCFG, 2);
+ emu_wr_nolock(sc, EMU_A_IOCFG, iocfg | EMU_A_IOCFG_GPOUT2, 2);
DELAY(500);
- emu_wr_nolock(sc, A_IOCFG, iocfg | A_IOCFG_GPOUT1 | A_IOCFG_GPOUT2, 2);
+ emu_wr_nolock(sc, EMU_A_IOCFG, iocfg | EMU_A_IOCFG_GPOUT1 | EMU_A_IOCFG_GPOUT2, 2);
DELAY(500);
- emu_wr_nolock(sc, A_IOCFG, iocfg | A_IOCFG_GPOUT1, 2);
+ emu_wr_nolock(sc, EMU_A_IOCFG, iocfg | EMU_A_IOCFG_GPOUT1, 2);
DELAY(100);
- emu_wr_nolock(sc, A_IOCFG, iocfg, 2);
+ emu_wr_nolock(sc, EMU_A_IOCFG, iocfg, 2);
device_printf(sc->dev, "Audigy IR MIDI events enabled.\n");
sc->enable_ir = 1;
}
if (sc->is_emu10k1) {
- iocfg = emu_rd_nolock(sc, HCFG, 4);
- emu_wr_nolock(sc, HCFG, iocfg | HCFG_GPOUT2, 4);
+ iocfg = emu_rd_nolock(sc, EMU_HCFG, 4);
+ emu_wr_nolock(sc, EMU_HCFG, iocfg | EMU_HCFG_GPOUT2, 4);
DELAY(500);
- emu_wr_nolock(sc, HCFG, iocfg | HCFG_GPOUT1 | HCFG_GPOUT2, 4);
+ emu_wr_nolock(sc, EMU_HCFG, iocfg | EMU_HCFG_GPOUT1 | EMU_HCFG_GPOUT2, 4);
DELAY(100);
- emu_wr_nolock(sc, HCFG, iocfg, 4);
+ emu_wr_nolock(sc, EMU_HCFG, iocfg, 4);
device_printf(sc->dev, "SB Live! IR MIDI events enabled.\n");
sc->enable_ir = 1;
}
@@ -795,7 +806,7 @@ emu_enable_ir(struct emu_sc_info *sc)
/*
- * emu_timer_ - HW timer managment
+ * emu_timer_ - HW timer management
*/
int
emu_timer_create(struct emu_sc_info *sc)
@@ -835,7 +846,7 @@ emu_timer_set(struct emu_sc_info *sc, int timer, int delay)
sc->timerinterval = sc->timer[i];
/* XXX */
- emu_wr(sc, TIMER, sc->timerinterval & 0x03ff, 2);
+ emu_wr(sc, EMU_TIMER, sc->timerinterval & 0x03ff, 2);
mtx_unlock(&sc->lock);
return (timer);
@@ -868,16 +879,16 @@ emu_timer_enable(struct emu_sc_info *sc, int timer, int go)
ena_int = 1;
}
- emu_wr(sc, TIMER, sc->timerinterval & 0x03ff, 2);
+ emu_wr(sc, EMU_TIMER, sc->timerinterval & 0x03ff, 2);
if (ena_int == 1) {
- x = emu_rd(sc, INTE, 4);
- x |= INTE_INTERVALTIMERENB;
- emu_wr(sc, INTE, x, 4);
+ x = emu_rd(sc, EMU_INTE, 4);
+ x |= EMU_INTE_INTERTIMERENB;
+ emu_wr(sc, EMU_INTE, x, 4);
} else {
- x = emu_rd(sc, INTE, 4);
- x &= ~INTE_INTERVALTIMERENB;
- emu_wr(sc, INTE, x, 4);
+ x = emu_rd(sc, EMU_INTE, 4);
+ x &= ~EMU_INTE_INTERTIMERENB;
+ emu_wr(sc, EMU_INTE, x, 4);
}
mtx_unlock(&sc->lock);
return (0);
@@ -902,7 +913,7 @@ emu_timer_clear(struct emu_sc_info *sc, int timer)
}
/*
- * emu_intr_ - HW interrupt handler managment
+ * emu_intr_ - HW interrupt handler management
*/
int
emu_intr_register(struct emu_sc_info *sc, uint32_t inte_mask, uint32_t intr_mask, uint32_t(*func) (void *softc, uint32_t irq), void *isc)
@@ -917,9 +928,9 @@ emu_intr_register(struct emu_sc_info *sc, uint32_t inte_mask, uint32_t intr_mask
sc->ihandler[i].intr_mask = intr_mask;
sc->ihandler[i].softc = isc;
sc->ihandler[i].irq_func = func;
- x = emu_rd(sc, INTE, 4);
+ x = emu_rd(sc, EMU_INTE, 4);
x |= inte_mask;
- emu_wr(sc, INTE, x, 4);
+ emu_wr(sc, EMU_INTE, x, 4);
mtx_unlock(&sc->lock);
if (sc->dbg_level > 1)
device_printf(sc->dev, "ihandle %d registered\n", i);
@@ -946,7 +957,7 @@ emu_intr_unregister(struct emu_sc_info *sc, int hnumber)
return (-1);
}
- x = emu_rd(sc, INTE, 4);
+ x = emu_rd(sc, EMU_INTE, 4);
x &= ~sc->ihandler[hnumber].inte_mask;
sc->ihandler[hnumber].inte_mask = 0;
@@ -954,12 +965,12 @@ emu_intr_unregister(struct emu_sc_info *sc, int hnumber)
sc->ihandler[hnumber].softc = NULL;
sc->ihandler[hnumber].irq_func = NULL;
- /* other interrupt handlers may use this INTE value */
+ /* other interrupt handlers may use this EMU_INTE value */
for (i = 0; i < EMU_MAX_IRQ_CONSUMERS; i++)
if (sc->ihandler[i].inte_mask != 0)
x |= sc->ihandler[i].inte_mask;
- emu_wr(sc, INTE, x, 4);
+ emu_wr(sc, EMU_INTE, x, 4);
mtx_unlock(&sc->lock);
return (hnumber);
@@ -973,11 +984,11 @@ emu_intr(void *p)
int i;
for (;;) {
- stat = emu_rd(sc, IPR, 4);
+ stat = emu_rd(sc, EMU_IPR, 4);
ack = 0;
if (stat == 0)
break;
- emu_wr(sc, IPR, stat, 4);
+ emu_wr(sc, EMU_IPR, stat, 4);
for (i = 0; i < EMU_MAX_IRQ_CONSUMERS; i++) {
if ((((sc->ihandler[i].intr_mask) & stat) != 0) &&
(((void *)sc->ihandler[i].irq_func) != NULL)) {
@@ -993,27 +1004,27 @@ emu_intr(void *p)
if ((sc->is_ca0102) || (sc->is_ca0108))
for (;;) {
- stat = emu_rd(sc, IPR2, 4);
+ stat = emu_rd(sc, EMU_IPR2, 4);
ack = 0;
if (stat == 0)
break;
- emu_wr(sc, IPR2, stat, 4);
+ emu_wr(sc, EMU_IPR2, stat, 4);
if (sc->dbg_level > 1)
- device_printf(sc->dev, "IPR2: %08x\n", stat);
+ device_printf(sc->dev, "EMU_IPR2: %08x\n", stat);
- break; /* to avoid infinite loop. shoud be removed
+ break; /* to avoid infinite loop. should be removed
* after completion of P16V interface. */
}
if (sc->is_ca0102)
for (;;) {
- stat = emu_rd(sc, IPR3, 4);
+ stat = emu_rd(sc, EMU_IPR3, 4);
ack = 0;
if (stat == 0)
break;
- emu_wr(sc, IPR3, stat, 4);
+ emu_wr(sc, EMU_IPR3, stat, 4);
if (sc->dbg_level > 1)
- device_printf(sc->dev, "IPR3: %08x\n", stat);
+ device_printf(sc->dev, "EMU_IPR3: %08x\n", stat);
break; /* to avoid infinite loop. should be removed
* after completion of S/PDIF interface */
@@ -1374,61 +1385,61 @@ emu_vwrite(struct emu_sc_info *sc, struct emu_voice *v)
if (v->stereo) {
- emu_wrptr(sc, v->vnum, CPF, CPF_STEREO_MASK);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_CPF, EMU_CHAN_CPF_STEREO_MASK);
} else {
- emu_wrptr(sc, v->vnum, CPF, 0);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_CPF, 0);
}
val = v->stereo ? 28 : 30;
val *= v->b16 ? 1 : 2;
start = v->sa + val;
if (sc->is_emu10k1) {
- emu_wrptr(sc, v->vnum, FXRT, ((v->routing[3] << 12) |
+ emu_wrptr(sc, v->vnum, EMU_CHAN_FXRT, ((v->routing[3] << 12) |
(v->routing[2] << 8) |
(v->routing[1] << 4) |
(v->routing[0] << 0)) << 16);
} else {
- emu_wrptr(sc, v->vnum, A_FXRT1, (v->routing[3] << 24) |
+ emu_wrptr(sc, v->vnum, EMU_A_CHAN_FXRT1, (v->routing[3] << 24) |
(v->routing[2] << 16) |
(v->routing[1] << 8) |
(v->routing[0] << 0));
- emu_wrptr(sc, v->vnum, A_FXRT2, (v->routing[7] << 24) |
+ emu_wrptr(sc, v->vnum, EMU_A_CHAN_FXRT2, (v->routing[7] << 24) |
(v->routing[6] << 16) |
(v->routing[5] << 8) |
(v->routing[4] << 0));
- emu_wrptr(sc, v->vnum, A_SENDAMOUNTS, (v->amounts[7] << 24) |
+ emu_wrptr(sc, v->vnum, EMU_A_CHAN_SENDAMOUNTS, (v->amounts[7] << 24) |
(v->amounts[6] << 26) |
(v->amounts[5] << 8) |
(v->amounts[4] << 0));
}
- emu_wrptr(sc, v->vnum, PTRX, (v->amounts[0] << 8) | (v->amounts[1] << 0));
- emu_wrptr(sc, v->vnum, DSL, v->ea | (v->amounts[3] << 24));
- emu_wrptr(sc, v->vnum, PSST, v->sa | (v->amounts[2] << 24));
-
- emu_wrptr(sc, v->vnum, CCCA, start | (v->b16 ? 0 : CCCA_8BITSELECT));
- emu_wrptr(sc, v->vnum, Z1, 0);
- emu_wrptr(sc, v->vnum, Z2, 0);
-
- silent_page = ((uint32_t) (sc->mem.silent_page_addr) << 1) | MAP_PTI_MASK;
- emu_wrptr(sc, v->vnum, MAPA, silent_page);
- emu_wrptr(sc, v->vnum, MAPB, silent_page);
-
- emu_wrptr(sc, v->vnum, CVCF, CVCF_CURRENTFILTER_MASK);
- emu_wrptr(sc, v->vnum, VTFT, VTFT_FILTERTARGET_MASK);
- emu_wrptr(sc, v->vnum, ATKHLDM, 0);
- emu_wrptr(sc, v->vnum, DCYSUSM, DCYSUSM_DECAYTIME_MASK);
- emu_wrptr(sc, v->vnum, LFOVAL1, 0x8000);
- emu_wrptr(sc, v->vnum, LFOVAL2, 0x8000);
- emu_wrptr(sc, v->vnum, FMMOD, 0);
- emu_wrptr(sc, v->vnum, TREMFRQ, 0);
- emu_wrptr(sc, v->vnum, FM2FRQ2, 0);
- emu_wrptr(sc, v->vnum, ENVVAL, 0x8000);
-
- emu_wrptr(sc, v->vnum, ATKHLDV, ATKHLDV_HOLDTIME_MASK | ATKHLDV_ATTACKTIME_MASK);
- emu_wrptr(sc, v->vnum, ENVVOL, 0x8000);
-
- emu_wrptr(sc, v->vnum, PEFE_FILTERAMOUNT, 0x7f);
- emu_wrptr(sc, v->vnum, PEFE_PITCHAMOUNT, 0);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_PTRX, (v->amounts[0] << 8) | (v->amounts[1] << 0));
+ emu_wrptr(sc, v->vnum, EMU_CHAN_DSL, v->ea | (v->amounts[3] << 24));
+ emu_wrptr(sc, v->vnum, EMU_CHAN_PSST, v->sa | (v->amounts[2] << 24));
+
+ emu_wrptr(sc, v->vnum, EMU_CHAN_CCCA, start | (v->b16 ? 0 : EMU_CHAN_CCCA_8BITSELECT));
+ emu_wrptr(sc, v->vnum, EMU_CHAN_Z1, 0);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_Z2, 0);
+
+ silent_page = ((uint32_t) (sc->mem.silent_page_addr) << 1) | EMU_CHAN_MAP_PTI_MASK;
+ emu_wrptr(sc, v->vnum, EMU_CHAN_MAPA, silent_page);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_MAPB, silent_page);
+
+ emu_wrptr(sc, v->vnum, EMU_CHAN_CVCF, EMU_CHAN_CVCF_CURRFILTER_MASK);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_VTFT, EMU_CHAN_VTFT_FILTERTARGET_MASK);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_ATKHLDM, 0);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_DCYSUSM, EMU_CHAN_DCYSUSM_DECAYTIME_MASK);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_LFOVAL1, 0x8000);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_LFOVAL2, 0x8000);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_FMMOD, 0);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_TREMFRQ, 0);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_FM2FRQ2, 0);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_ENVVAL, 0x8000);
+
+ emu_wrptr(sc, v->vnum, EMU_CHAN_ATKHLDV, EMU_CHAN_ATKHLDV_HOLDTIME_MASK | EMU_CHAN_ATKHLDV_ATTACKTIME_MASK);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_ENVVOL, 0x8000);
+
+ emu_wrptr(sc, v->vnum, EMU_CHAN_PEFE_FILTERAMOUNT, 0x7f);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_PEFE_PITCHAMOUNT, 0);
if ((v->stereo) && (v->slave != NULL))
emu_vwrite(sc, v->slave);
}
@@ -1438,7 +1449,7 @@ emu_vstop(struct emu_sc_info *sc, char channel, int enable)
{
int reg;
- reg = (channel & 0x20) ? SOLEH : SOLEL;
+ reg = (channel & 0x20) ? EMU_SOLEH : EMU_SOLEL;
channel &= 0x1f;
reg |= 1 << 24;
reg |= channel << 16;
@@ -1459,29 +1470,29 @@ emu_vtrigger(struct emu_sc_info *sc, struct emu_voice *v, int go)
ccis *= v->b16 ? 1 : 2;
sample = v->b16 ? 0x00000000 : 0x80808080;
for (i = 0; i < cs; i++)
- emu_wrptr(sc, v->vnum, CD0 + i, sample);
- emu_wrptr(sc, v->vnum, CCR_CACHEINVALIDSIZE, 0);
- emu_wrptr(sc, v->vnum, CCR_READADDRESS, cra);
- emu_wrptr(sc, v->vnum, CCR_CACHEINVALIDSIZE, ccis);
-
- emu_wrptr(sc, v->vnum, IFATN, 0xff00);
- emu_wrptr(sc, v->vnum, VTFT, 0xffffffff);
- emu_wrptr(sc, v->vnum, CVCF, 0xffffffff);
- emu_wrptr(sc, v->vnum, DCYSUSV, 0x00007f7f);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_CD0 + i, sample);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_CCR_CACHEINVALIDSIZE, 0);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_CCR_READADDRESS, cra);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_CCR_CACHEINVALIDSIZE, ccis);
+
+ emu_wrptr(sc, v->vnum, EMU_CHAN_IFATN, 0xff00);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_VTFT, 0xffffffff);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_CVCF, 0xffffffff);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_DCYSUSV, 0x00007f7f);
emu_vstop(sc, v->vnum, 0);
pitch_target = emu_rate_to_linearpitch(v->speed);
initial_pitch = emu_rate_to_pitch(v->speed) >> 8;
- emu_wrptr(sc, v->vnum, PTRX_PITCHTARGET, pitch_target);
- emu_wrptr(sc, v->vnum, CPF_CURRENTPITCH, pitch_target);
- emu_wrptr(sc, v->vnum, IP, initial_pitch);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_PTRX_PITCHTARGET, pitch_target);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_CPF_PITCH, pitch_target);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_IP, initial_pitch);
} else {
- emu_wrptr(sc, v->vnum, PTRX_PITCHTARGET, 0);
- emu_wrptr(sc, v->vnum, CPF_CURRENTPITCH, 0);
- emu_wrptr(sc, v->vnum, IFATN, 0xffff);
- emu_wrptr(sc, v->vnum, VTFT, 0x0000ffff);
- emu_wrptr(sc, v->vnum, CVCF, 0x0000ffff);
- emu_wrptr(sc, v->vnum, IP, 0);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_PTRX_PITCHTARGET, 0);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_CPF_PITCH, 0);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_IFATN, 0xffff);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_VTFT, 0x0000ffff);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_CVCF, 0x0000ffff);
+ emu_wrptr(sc, v->vnum, EMU_CHAN_IP, 0);
emu_vstop(sc, v->vnum, 1);
}
if ((v->stereo) && (v->slave != NULL))
@@ -1494,7 +1505,7 @@ emu_vpos(struct emu_sc_info *sc, struct emu_voice *v)
int s, ptr;
s = (v->b16 ? 1 : 0) + (v->stereo ? 1 : 0);
- ptr = (emu_rdptr(sc, v->vnum, CCCA_CURRADDR) - (v->start >> s)) << s;
+ ptr = (emu_rdptr(sc, v->vnum, EMU_CHAN_CCCA_CURRADDR) - (v->start >> s)) << s;
return (ptr & ~0x0000001f);
}
@@ -1694,9 +1705,9 @@ emu_initefx(struct emu_sc_info *sc)
/* stop DSP */
if (sc->is_emu10k1) {
- emu_wrptr(sc, 0, DBG, EMU10K1_DBG_SINGLE_STEP);
+ emu_wrptr(sc, 0, EMU_DBG, EMU_DBG_SINGLE_STEP);
} else {
- emu_wrptr(sc, 0, A_DBG, A_DBG_SINGLE_STEP);
+ emu_wrptr(sc, 0, EMU_A_DBG, EMU_A_DBG_SINGLE_STEP);
}
/* code size is in instructions */
@@ -2162,9 +2173,9 @@ emu_initefx(struct emu_sc_info *sc)
/* start DSP */
if (sc->is_emu10k1) {
- emu_wrptr(sc, 0, DBG, 0);
+ emu_wrptr(sc, 0, EMU_DBG, 0);
} else {
- emu_wrptr(sc, 0, A_DBG, 0);
+ emu_wrptr(sc, 0, EMU_A_DBG, 0);
}
}
@@ -2450,24 +2461,24 @@ emumix_set_mode(struct emu_sc_info *sc, int mode)
return;
}
- hcfg = HCFG_AUDIOENABLE | HCFG_AUTOMUTE;
+ hcfg = EMU_HCFG_AUDIOENABLE | EMU_HCFG_AUTOMUTE;
a_iocfg = 0;
if (sc->rev >= 6)
- hcfg |= HCFG_JOYENABLE;
+ hcfg |= EMU_HCFG_JOYENABLE;
if (sc->is_emu10k1)
- hcfg |= HCFG_LOCKTANKCACHE_MASK;
+ hcfg |= EMU_HCFG_LOCKTANKCACHE_MASK;
else
- hcfg |= HCFG_CODECFORMAT_I2S | HCFG_JOYENABLE;
+ hcfg |= EMU_HCFG_CODECFMT_I2S | EMU_HCFG_JOYENABLE;
if (mode == MODE_DIGITAL) {
if (sc->broken_digital) {
device_printf(sc->dev, "Digital mode is reported as broken on this card.\n");
}
- a_iocfg |= A_IOCFG_ENABLE_DIGITAL;
- hcfg |= HCFG_GPOUT0;
+ a_iocfg |= EMU_A_IOCFG_GPOUT1;
+ hcfg |= EMU_HCFG_GPOUT0;
}
if (mode == MODE_ANALOG)
@@ -2478,12 +2489,12 @@ emumix_set_mode(struct emu_sc_info *sc, int mode)
if ((sc->is_ca0102) || (sc->is_ca0108))
/*
- * Setting A_IOCFG_DISABLE_ANALOG will do opposite things
+ * Setting EMU_A_IOCFG_DISABLE_ANALOG will do opposite things
* on diffrerent cards.
* "don't disable analog outs" on Audigy 2 (ca0102/ca0108)
* "disable analog outs" on Audigy (emu10k2)
*/
- a_iocfg |= A_IOCFG_DISABLE_ANALOG;
+ a_iocfg |= EMU_A_IOCFG_DISABLE_ANALOG;
if (sc->is_ca0108)
a_iocfg |= 0x20; /* XXX */
@@ -2492,12 +2503,12 @@ emumix_set_mode(struct emu_sc_info *sc, int mode)
if (mode == MODE_DIGITAL)
emumix_set_gpr(sc, sc->mute_gpr[ANALOGMUTE], 1);
- emu_wr(sc, HCFG, hcfg, 4);
+ emu_wr(sc, EMU_HCFG, hcfg, 4);
if ((sc->is_emu10k2) || (sc->is_ca0102) || (sc->is_ca0108)) {
- tmp = emu_rd(sc, A_IOCFG, 2);
+ tmp = emu_rd(sc, EMU_A_IOCFG, 2);
tmp = a_iocfg;
- emu_wr(sc, A_IOCFG, tmp, 2);
+ emu_wr(sc, EMU_A_IOCFG, tmp, 2);
}
/* Unmute if we have changed mode to analog. */
@@ -2523,16 +2534,16 @@ emumix_set_spdif_mode(struct emu_sc_info *sc, int mode)
return;
}
- spcs = SPCS_CLKACCY_1000PPM | SPCS_SAMPLERATE_48 |
- SPCS_CHANNELNUM_LEFT | SPCS_SOURCENUM_UNSPEC |
- SPCS_GENERATIONSTATUS | 0x00001200 | 0x00000000 |
- SPCS_EMPHASIS_NONE | SPCS_COPYRIGHT;
+ spcs = EMU_SPCS_CLKACCY_1000PPM | EMU_SPCS_SAMPLERATE_48 |
+ EMU_SPCS_CHANNELNUM_LEFT | EMU_SPCS_SOURCENUM_UNSPEC |
+ EMU_SPCS_GENERATIONSTATUS | 0x00001200 | 0x00000000 |
+ EMU_SPCS_EMPHASIS_NONE | EMU_SPCS_COPYRIGHT;
mode = SPDIF_MODE_PCM;
- emu_wrptr(sc, 0, SPCS0, spcs);
- emu_wrptr(sc, 0, SPCS1, spcs);
- emu_wrptr(sc, 0, SPCS2, spcs);
+ emu_wrptr(sc, 0, EMU_SPCS0, spcs);
+ emu_wrptr(sc, 0, EMU_SPCS1, spcs);
+ emu_wrptr(sc, 0, EMU_SPCS2, spcs);
}
#define L2L_POINTS 10
@@ -2635,8 +2646,8 @@ emu_cardbus_init(struct emu_sc_info *sc)
{
/*
- * XXX May not need this if we have IPR3 handler.
- * Is it a real init calls, or IPR3 interrupt acknowledgments?
+ * XXX May not need this if we have EMU_IPR3 handler.
+ * Is it a real init calls, or EMU_IPR3 interrupt acknowledgments?
* Looks much like "(data << 16) | register".
*/
emu_wr_cbptr(sc, (0x00d0 << 16) | 0x0000);
@@ -2660,42 +2671,42 @@ emu_init(struct emu_sc_info *sc)
int i;
/* disable audio and lock cache */
- emu_wr(sc, HCFG, HCFG_LOCKSOUNDCACHE | HCFG_LOCKTANKCACHE_MASK | HCFG_MUTEBUTTONENABLE, 4);
+ emu_wr(sc, EMU_HCFG, EMU_HCFG_LOCKSOUNDCACHE | EMU_HCFG_LOCKTANKCACHE_MASK | EMU_HCFG_MUTEBUTTONENABLE, 4);
/* reset recording buffers */
- emu_wrptr(sc, 0, MICBS, ADCBS_BUFSIZE_NONE);
- emu_wrptr(sc, 0, MICBA, 0);
- emu_wrptr(sc, 0, FXBS, ADCBS_BUFSIZE_NONE);
- emu_wrptr(sc, 0, FXBA, 0);
- emu_wrptr(sc, 0, ADCBS, ADCBS_BUFSIZE_NONE);
- emu_wrptr(sc, 0, ADCBA, 0);
+ emu_wrptr(sc, 0, EMU_MICBS, EMU_RECBS_BUFSIZE_NONE);
+ emu_wrptr(sc, 0, EMU_MICBA, 0);
+ emu_wrptr(sc, 0, EMU_FXBS, EMU_RECBS_BUFSIZE_NONE);
+ emu_wrptr(sc, 0, EMU_FXBA, 0);
+ emu_wrptr(sc, 0, EMU_ADCBS, EMU_RECBS_BUFSIZE_NONE);
+ emu_wrptr(sc, 0, EMU_ADCBA, 0);
/* disable channel interrupt */
- emu_wr(sc, INTE, INTE_INTERVALTIMERENB | INTE_SAMPLERATETRACKER | INTE_PCIERRORENABLE, 4);
- emu_wrptr(sc, 0, CLIEL, 0);
- emu_wrptr(sc, 0, CLIEH, 0);
- emu_wrptr(sc, 0, SOLEL, 0);
- emu_wrptr(sc, 0, SOLEH, 0);
+ emu_wr(sc, EMU_INTE, EMU_INTE_INTERTIMERENB | EMU_INTE_SAMPLERATER | EMU_INTE_PCIERRENABLE, 4);
+ emu_wrptr(sc, 0, EMU_CLIEL, 0);
+ emu_wrptr(sc, 0, EMU_CLIEH, 0);
+ emu_wrptr(sc, 0, EMU_SOLEL, 0);
+ emu_wrptr(sc, 0, EMU_SOLEH, 0);
/* disable P16V and S/PDIF interrupts */
if ((sc->is_ca0102) || (sc->is_ca0108))
- emu_wr(sc, INTE2, 0, 4);
+ emu_wr(sc, EMU_INTE2, 0, 4);
if (sc->is_ca0102)
- emu_wr(sc, INTE3, 0, 4);
+ emu_wr(sc, EMU_INTE3, 0, 4);
/* init phys inputs and outputs */
ac97slot = 0;
if (sc->has_51)
- ac97slot = AC97SLOT_CNTR | AC97SLOT_LFE;
+ ac97slot = EMU_AC97SLOT_CENTER | EMU_AC97SLOT_LFE;
if (sc->has_71)
- ac97slot = AC97SLOT_CNTR | AC97SLOT_LFE | AC97SLOT_REAR_LEFT | AC97SLOT_REAR_RIGHT;
+ ac97slot = EMU_AC97SLOT_CENTER | EMU_AC97SLOT_LFE | EMU_AC97SLOT_REAR_LEFT | EMU_AC97SLOT_REAR_RIGHT;
if (sc->is_emu10k2)
ac97slot |= 0x40;
- emu_wrptr(sc, 0, AC97SLOT, ac97slot);
+ emu_wrptr(sc, 0, EMU_AC97SLOT, ac97slot);
if (sc->is_emu10k2) /* XXX for later cards? */
- emu_wrptr(sc, 0, SPBYPASS, 0xf00); /* What will happen if
+ emu_wrptr(sc, 0, EMU_SPBYPASS, 0xf00); /* What will happen if
* we write 1 here? */
if (bus_dma_tag_create( /* parent */ bus_get_dma_tag(sc->dev),
@@ -2729,61 +2740,61 @@ emu_init(struct emu_sc_info *sc)
sc->mem.ptb_pages[i] = tmp | i;
for (ch = 0; ch < NUM_G; ch++) {
- emu_wrptr(sc, ch, MAPA, tmp | MAP_PTI_MASK);
- emu_wrptr(sc, ch, MAPB, tmp | MAP_PTI_MASK);
+ emu_wrptr(sc, ch, EMU_CHAN_MAPA, tmp | EMU_CHAN_MAP_PTI_MASK);
+ emu_wrptr(sc, ch, EMU_CHAN_MAPB, tmp | EMU_CHAN_MAP_PTI_MASK);
}
- emu_wrptr(sc, 0, PTB, (sc->mem.ptb_pages_addr));
- emu_wrptr(sc, 0, TCB, 0); /* taken from original driver */
- emu_wrptr(sc, 0, TCBS, 0); /* taken from original driver */
+ emu_wrptr(sc, 0, EMU_PTB, (sc->mem.ptb_pages_addr));
+ emu_wrptr(sc, 0, EMU_TCB, 0); /* taken from original driver */
+ emu_wrptr(sc, 0, EMU_TCBS, 0); /* taken from original driver */
/* init envelope engine */
for (ch = 0; ch < NUM_G; ch++) {
- emu_wrptr(sc, ch, DCYSUSV, 0);
- emu_wrptr(sc, ch, IP, 0);
- emu_wrptr(sc, ch, VTFT, 0xffff);
- emu_wrptr(sc, ch, CVCF, 0xffff);
- emu_wrptr(sc, ch, PTRX, 0);
- emu_wrptr(sc, ch, CPF, 0);
- emu_wrptr(sc, ch, CCR, 0);
-
- emu_wrptr(sc, ch, PSST, 0);
- emu_wrptr(sc, ch, DSL, 0x10);
- emu_wrptr(sc, ch, CCCA, 0);
- emu_wrptr(sc, ch, Z1, 0);
- emu_wrptr(sc, ch, Z2, 0);
- emu_wrptr(sc, ch, FXRT, 0xd01c0000);
-
- emu_wrptr(sc, ch, ATKHLDM, 0);
- emu_wrptr(sc, ch, DCYSUSM, 0);
- emu_wrptr(sc, ch, IFATN, 0xffff);
- emu_wrptr(sc, ch, PEFE, 0);
- emu_wrptr(sc, ch, FMMOD, 0);
- emu_wrptr(sc, ch, TREMFRQ, 24); /* 1 Hz */
- emu_wrptr(sc, ch, FM2FRQ2, 24); /* 1 Hz */
- emu_wrptr(sc, ch, TEMPENV, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_DCYSUSV, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_IP, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_VTFT, 0xffff);
+ emu_wrptr(sc, ch, EMU_CHAN_CVCF, 0xffff);
+ emu_wrptr(sc, ch, EMU_CHAN_PTRX, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_CPF, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_CCR, 0);
+
+ emu_wrptr(sc, ch, EMU_CHAN_PSST, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_DSL, 0x10);
+ emu_wrptr(sc, ch, EMU_CHAN_CCCA, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_Z1, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_Z2, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_FXRT, 0xd01c0000);
+
+ emu_wrptr(sc, ch, EMU_CHAN_ATKHLDM, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_DCYSUSM, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_IFATN, 0xffff);
+ emu_wrptr(sc, ch, EMU_CHAN_PEFE, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_FMMOD, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_TREMFRQ, 24); /* 1 Hz */
+ emu_wrptr(sc, ch, EMU_CHAN_FM2FRQ2, 24); /* 1 Hz */
+ emu_wrptr(sc, ch, EMU_CHAN_TEMPENV, 0);
/*** these are last so OFF prevents writing ***/
- emu_wrptr(sc, ch, LFOVAL2, 0);
- emu_wrptr(sc, ch, LFOVAL1, 0);
- emu_wrptr(sc, ch, ATKHLDV, 0);
- emu_wrptr(sc, ch, ENVVOL, 0);
- emu_wrptr(sc, ch, ENVVAL, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_LFOVAL2, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_LFOVAL1, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_ATKHLDV, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_ENVVOL, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_ENVVAL, 0);
if ((sc->is_emu10k2) || (sc->is_ca0102) || (sc->is_ca0108)) {
emu_wrptr(sc, ch, 0x4c, 0x0);
emu_wrptr(sc, ch, 0x4d, 0x0);
emu_wrptr(sc, ch, 0x4e, 0x0);
emu_wrptr(sc, ch, 0x4f, 0x0);
- emu_wrptr(sc, ch, A_FXRT1, 0x3f3f3f3f);
- emu_wrptr(sc, ch, A_FXRT2, 0x3f3f3f3f);
- emu_wrptr(sc, ch, A_SENDAMOUNTS, 0x0);
+ emu_wrptr(sc, ch, EMU_A_CHAN_FXRT1, 0x3f3f3f3f);
+ emu_wrptr(sc, ch, EMU_A_CHAN_FXRT2, 0x3f3f3f3f);
+ emu_wrptr(sc, ch, EMU_A_CHAN_SENDAMOUNTS, 0x0);
}
}
emumix_set_spdif_mode(sc, SPDIF_MODE_PCM);
if ((sc->is_emu10k2) || (sc->is_ca0102) || (sc->is_ca0108))
- emu_wrptr(sc, 0, A_SPDIF_SAMPLERATE, A_SPDIF_48000);
+ emu_wrptr(sc, 0, EMU_A_SPDIF_SAMPLERATE, EMU_A_SPDIF_48000);
/*
* CAxxxx cards needs additional setup:
@@ -2793,23 +2804,23 @@ emu_init(struct emu_sc_info *sc)
*/
if ((sc->is_ca0102) || (sc->is_ca0108)) {
- spdif_sr = emu_rdptr(sc, 0, A_SPDIF_SAMPLERATE);
+ spdif_sr = emu_rdptr(sc, 0, EMU_A_SPDIF_SAMPLERATE);
spdif_sr &= 0xfffff1ff;
- spdif_sr |= A_I2S_CAPTURE_96000;
- emu_wrptr(sc, 0, A_SPDIF_SAMPLERATE, spdif_sr);
+ spdif_sr |= EMU_A_I2S_CAPTURE_96000;
+ emu_wrptr(sc, 0, EMU_A_SPDIF_SAMPLERATE, spdif_sr);
/* Disable P16v processing */
- emu_wr_p16vptr(sc, 0, SRCSel, 0x14);
+ emu_wr_p16vptr(sc, 0, EMU_A2_SRCSel, 0x14);
/* Setup P16v/P17v sound routing */
if (sc->is_ca0102)
- emu_wr_p16vptr(sc, 0, SRCMULTI_ENABLE, 0xFF00FF00);
+ emu_wr_p16vptr(sc, 0, EMU_A2_SRCMULTI_ENABLE, 0xFF00FF00);
else {
- emu_wr_p16vptr(sc, 0, P17V_MIXER_I2S_ENABLE, 0xFF000000);
- emu_wr_p16vptr(sc, 0, P17V_MIXER_SPDIF_ENABLE, 0xFF000000);
+ emu_wr_p16vptr(sc, 0, EMU_A2_MIXER_I2S_ENABLE, 0xFF000000);
+ emu_wr_p16vptr(sc, 0, EMU_A2_MIXER_SPDIF_ENABLE, 0xFF000000);
- tmp = emu_rd(sc, A_IOCFG, 2);
- emu_wr(sc, A_IOCFG, tmp & ~0x8, 2);
+ tmp = emu_rd(sc, EMU_A_IOCFG, 2);
+ emu_wr(sc, EMU_A_IOCFG, tmp & ~0x8, 2);
}
}
emu_initefx(sc);
@@ -2824,7 +2835,7 @@ emu_init(struct emu_sc_info *sc)
emumix_set_mode(sc, def_mode);
if (bootverbose) {
- tmp = emu_rd(sc, HCFG, 4);
+ tmp = emu_rd(sc, EMU_HCFG, 4);
device_printf(sc->dev, "Card Configuration ( 0x%08x )\n", tmp);
device_printf(sc->dev, "Card Configuration ( & 0xff000000 ) : %s%s%s%s%s%s%s%s\n",
(tmp & 0x80000000 ? "[Legacy MPIC] " : ""),
@@ -2864,7 +2875,7 @@ emu_init(struct emu_sc_info *sc)
(tmp & 0x00000001 ? "[AUDIOENABLE]" : " "));
if ((sc->is_emu10k2) || (sc->is_ca0102) || (sc->is_ca0108)) {
- tmp = emu_rd(sc, A_IOCFG, 2);
+ tmp = emu_rd(sc, EMU_A_IOCFG, 2);
device_printf(sc->dev, "Audigy Card Configuration ( 0x%04x )\n", tmp);
device_printf(sc->dev, "Audigy Card Configuration ( & 0xff00 )");
printf(" : %s%s%s%s%s%s%s%s\n",
@@ -2897,36 +2908,36 @@ emu_uninit(struct emu_sc_info *sc)
uint32_t ch;
struct emu_memblk *blk;
- emu_wr(sc, INTE, 0, 4);
+ emu_wr(sc, EMU_INTE, 0, 4);
for (ch = 0; ch < NUM_G; ch++)
- emu_wrptr(sc, ch, DCYSUSV, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_DCYSUSV, 0);
for (ch = 0; ch < NUM_G; ch++) {
- emu_wrptr(sc, ch, VTFT, 0);
- emu_wrptr(sc, ch, CVCF, 0);
- emu_wrptr(sc, ch, PTRX, 0);
- emu_wrptr(sc, ch, CPF, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_VTFT, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_CVCF, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_PTRX, 0);
+ emu_wrptr(sc, ch, EMU_CHAN_CPF, 0);
}
/* disable audio and lock cache */
- emu_wr(sc, HCFG, HCFG_LOCKSOUNDCACHE | HCFG_LOCKTANKCACHE_MASK | HCFG_MUTEBUTTONENABLE, 4);
+ emu_wr(sc, EMU_HCFG, EMU_HCFG_LOCKSOUNDCACHE | EMU_HCFG_LOCKTANKCACHE_MASK | EMU_HCFG_MUTEBUTTONENABLE, 4);
- emu_wrptr(sc, 0, PTB, 0);
+ emu_wrptr(sc, 0, EMU_PTB, 0);
/* reset recording buffers */
- emu_wrptr(sc, 0, MICBS, ADCBS_BUFSIZE_NONE);
- emu_wrptr(sc, 0, MICBA, 0);
- emu_wrptr(sc, 0, FXBS, ADCBS_BUFSIZE_NONE);
- emu_wrptr(sc, 0, FXBA, 0);
- emu_wrptr(sc, 0, FXWC, 0);
- emu_wrptr(sc, 0, ADCBS, ADCBS_BUFSIZE_NONE);
- emu_wrptr(sc, 0, ADCBA, 0);
- emu_wrptr(sc, 0, TCB, 0);
- emu_wrptr(sc, 0, TCBS, 0);
+ emu_wrptr(sc, 0, EMU_MICBS, EMU_RECBS_BUFSIZE_NONE);
+ emu_wrptr(sc, 0, EMU_MICBA, 0);
+ emu_wrptr(sc, 0, EMU_FXBS, EMU_RECBS_BUFSIZE_NONE);
+ emu_wrptr(sc, 0, EMU_FXBA, 0);
+ emu_wrptr(sc, 0, EMU_FXWC, 0);
+ emu_wrptr(sc, 0, EMU_ADCBS, EMU_RECBS_BUFSIZE_NONE);
+ emu_wrptr(sc, 0, EMU_ADCBA, 0);
+ emu_wrptr(sc, 0, EMU_TCB, 0);
+ emu_wrptr(sc, 0, EMU_TCBS, 0);
/* disable channel interrupt */
- emu_wrptr(sc, 0, CLIEL, 0);
- emu_wrptr(sc, 0, CLIEH, 0);
- emu_wrptr(sc, 0, SOLEL, 0);
- emu_wrptr(sc, 0, SOLEH, 0);
+ emu_wrptr(sc, 0, EMU_CLIEL, 0);
+ emu_wrptr(sc, 0, EMU_CLIEH, 0);
+ emu_wrptr(sc, 0, EMU_SOLEL, 0);
+ emu_wrptr(sc, 0, EMU_SOLEH, 0);
if (!SLIST_EMPTY(&sc->mem.blocks))
device_printf(sc->dev, "warning: memblock list not empty\n");
@@ -3137,9 +3148,9 @@ emu_pci_attach(device_t dev)
/* 0xe0...0x100 are unknown */
/* sc->tram_base = 0x200 */
/* sc->tram_addr_base = 0x300 */
- sc->gpr_base = A_FXGPREGBASE;
+ sc->gpr_base = EMU_A_FXGPREGBASE;
sc->num_gprs = 0x200;
- sc->code_base = A_MICROCODEBASE;
+ sc->code_base = EMU_A_MICROCODEBASE;
sc->code_size = 0x800 / 2; /* 0x600-0xdff, 2048 words,
* 1024 instructions */
@@ -3147,16 +3158,16 @@ emu_pci_attach(device_t dev)
sc->num_fxbuses = 16;
sc->num_inputs = 8;
sc->num_outputs = 16;
- sc->address_mask = A_PTR_ADDRESS_MASK;
+ sc->address_mask = EMU_A_PTR_ADDR_MASK;
}
if (sc->is_emu10k1) {
sc->has_51 = 0; /* We don't support 5.1 sound on SB Live! 5.1 */
sc->opcode_shift = 20;
sc->high_operand_shift = 10;
- sc->code_base = MICROCODEBASE;
+ sc->code_base = EMU_MICROCODEBASE;
sc->code_size = 0x400 / 2; /* 0x400-0x7ff, 1024 words,
* 512 instructions */
- sc->gpr_base = FXGPREGBASE;
+ sc->gpr_base = EMU_FXGPREGBASE;
sc->num_gprs = 0x100;
sc->input_base = 0x10;
sc->output_base = 0x20;
@@ -3171,7 +3182,7 @@ emu_pci_attach(device_t dev)
sc->num_fxbuses = 8;
sc->num_inputs = 8;
sc->num_outputs = 16;
- sc->address_mask = PTR_ADDRESS_MASK;
+ sc->address_mask = EMU_PTR_ADDR_MASK;
}
if (sc->opcode_shift == 0)
goto bad;
@@ -3379,7 +3390,7 @@ emu_pci_attach(device_t dev)
}
midiinfo->card = sc;
if (sc->is_emu10k2 || (sc->is_ca0102)) {
- midiinfo->port = A_MUDATA1;
+ midiinfo->port = EMU_A_MUDATA1;
midiinfo->portnr = 1;
}
if (sc->is_emu10k1) {
@@ -3405,7 +3416,7 @@ emu_pci_attach(device_t dev)
}
midiinfo->card = sc;
- midiinfo->port = A_MUDATA2;
+ midiinfo->port = EMU_A_MUDATA2;
midiinfo->portnr = 2;
func->func = SCF_MIDI;
diff --git a/sys/dev/sound/pci/emu10kx.h b/sys/dev/sound/pci/emu10kx.h
index d27c9db..cfdb697 100644
--- a/sys/dev/sound/pci/emu10kx.h
+++ b/sys/dev/sound/pci/emu10kx.h
@@ -52,6 +52,14 @@
#define EMU_VAR_MCH_DISABLED 3
#define EMU_VAR_MCH_REC 4
+#define EMU_A_IOCFG_DISABLE_ANALOG 0x0040 /* = 'enable' for Audigy2 */
+#define EMU_A_IOCFG_GPOUT2 0x0001
+#define EMU_AC97SLOT_REAR_RIGHT 0x01
+#define EMU_AC97SLOT_REAR_LEFT 0x02
+#define EMU_HCFG_GPOUT0 0x00001000
+#define EMU_HCFG_GPOUT1 0x00000800
+#define EMU_HCFG_GPOUT2 0x00000400
+
#define RT_FRONT 0
#define RT_REAR 1
#define RT_CENTER 2
diff --git a/sys/dev/sound/pci/emuxkireg.h b/sys/dev/sound/pci/emuxkireg.h
new file mode 100644
index 0000000..555acc9
--- /dev/null
+++ b/sys/dev/sound/pci/emuxkireg.h
@@ -0,0 +1,689 @@
+/* $FreeBSD$ */
+/* $NetBSD: emuxkireg.h,v 1.8 2008/04/28 20:23:54 martin Exp $ */
+
+/*-
+ * Copyright (c) 2001 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Yannick Montulet.
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _DEV_PCI_EMUXKIREG_H_
+#define _DEV_PCI_EMUXKIREG_H_
+
+/*
+ * Register values for Creative EMU10000. The register values have been
+ * taken from GPLed SBLive! header file published by Creative. The comments
+ * have been stripped to avoid GPL pollution in kernel. The Creative version
+ * including comments is available in Linux 2.4.* kernel as file
+ * drivers/sound/emu10k1/8010.h
+ */
+
+/*
+ * Audigy specific registers contain an '_A_'
+ * Audigy2 specific registers contain an '_A2_'
+ */
+
+#define EMU_MKSUBREG(sz, idx, reg) (((sz) << 24) | ((idx) << 16) | (reg))
+
+#define EMU_PTR 0x00
+#define EMU_PTR_CHNO_MASK 0x0000003f
+#define EMU_PTR_ADDR_MASK 0x07ff0000
+#define EMU_A_PTR_ADDR_MASK 0x0fff0000
+
+#define EMU_DATA 0x04
+
+#define EMU_IPR 0x08
+#define EMU_IPR_RATETRCHANGE 0x01000000
+#define EMU_IPR_FXDSP 0x00800000
+#define EMU_IPR_FORCEINT 0x00400000
+#define EMU_PCIERROR 0x00200000
+#define EMU_IPR_VOLINCR 0x00100000
+#define EMU_IPR_VOLDECR 0x00080000
+#define EMU_IPR_MUTE 0x00040000
+#define EMU_IPR_MICBUFFULL 0x00020000
+#define EMU_IPR_MICBUFHALFFULL 0x00010000
+#define EMU_IPR_ADCBUFFULL 0x00008000
+#define EMU_IPR_ADCBUFHALFFULL 0x00004000
+#define EMU_IPR_EFXBUFFULL 0x00002000
+#define EMU_IPR_EFXBUFHALFFULL 0x00001000
+#define EMU_IPR_GPSPDIFSTCHANGE 0x00000800
+#define EMU_IPR_CDROMSTCHANGE 0x00000400
+#define EMU_IPR_INTERVALTIMER 0x00000200
+#define EMU_IPR_MIDITRANSBUFE 0x00000100
+#define EMU_IPR_MIDIRECVBUFE 0x00000080
+#define EMU_IPR_A_MIDITRANSBUFE2 0x10000000
+#define EMU_IPR_A_MIDIRECBUFE2 0x08000000
+#define EMU_IPR_CHANNELLOOP 0x00000040
+#define EMU_IPR_CHNOMASK 0x0000003f
+
+#define EMU_INTE 0x0c
+
+#define EMU_INTE_VSB_MASK 0xc0000000
+#define EMU_INTE_VSB_220 0x00000000
+#define EMU_INTE_VSB_240 0x40000000
+#define EMU_INTE_VSB_260 0x80000000
+#define EMU_INTE_VSB_280 0xc0000000
+
+#define EMU_INTE_VMPU_MASK 0x30000000
+#define EMU_INTE_VMPU_300 0x00000000
+#define EMU_INTE_VMPU_310 0x10000000
+#define EMU_INTE_VMPU_320 0x20000000
+#define EMU_INTE_VMPU_330 0x30000000
+#define EMU_INTE_MDMAENABLE 0x08000000
+#define EMU_INTE_SDMAENABLE 0x04000000
+#define EMU_INTE_MPICENABLE 0x02000000
+#define EMU_INTE_SPICENABLE 0x01000000
+#define EMU_INTE_VSBENABLE 0x00800000
+#define EMU_INTE_ADLIBENABLE 0x00400000
+#define EMU_INTE_MPUENABLE 0x00200000
+#define EMU_INTE_FORCEINT 0x00100000
+#define EMU_INTE_MRHANDENABLE 0x00080000
+#define EMU_INTE_SAMPLERATER 0x00002000
+#define EMU_INTE_FXDSPENABLE 0x00001000
+#define EMU_INTE_PCIERRENABLE 0x00000800
+#define EMU_INTE_VOLINCRENABLE 0x00000400
+#define EMU_INTE_VOLDECRENABLE 0x00000200
+#define EMU_INTE_MUTEENABLE 0x00000100
+#define EMU_INTE_MICBUFENABLE 0x00000080
+#define EMU_INTE_ADCBUFENABLE 0x00000040
+#define EMU_INTE_EFXBUFENABLE 0x00000020
+#define EMU_INTE_GPSPDIFENABLE 0x00000010
+#define EMU_INTE_CDSPDIFENABLE 0x00000008
+#define EMU_INTE_INTERTIMERENB 0x00000004
+#define EMU_INTE_MIDITXENABLE 0x00000002
+#define EMU_INTE_MIDIRXENABLE 0x00000001
+#define EMU_INTE_A_MIDITXENABLE2 0x00020000
+#define EMU_INTE_A_MIDIRXENABLE2 0x00010000
+
+#define EMU_WC 0x10
+#define EMU_WC_SAMPLECOUNTER_MASK 0x03FFFFC0
+#define EMU_WC_SAMPLECOUNTER EMU_MKSUBREG(20, 6, EMU_WC)
+#define EMU_WC_CURRENTCHANNEL 0x0000003F
+
+#define EMU_HCFG 0x14
+#define EMU_HCFG_LEGACYFUNC_MASK 0xe0000000
+#define EMU_HCFG_LEGACYFUNC_MPU 0x00000000
+#define EMU_HCFG_LEGACYFUNC_SB 0x40000000
+#define EMU_HCFG_LEGACYFUNC_AD 0x60000000
+#define EMU_HCFG_LEGACYFUNC_MPIC 0x80000000
+#define EMU_HCFG_LEGACYFUNC_MDMA 0xa0000000
+#define EMU_HCFG_LEGACYFUNC_SPCI 0xc0000000
+#define EMU_HCFG_LEGACYFUNC_SDMA 0xe0000000
+#define EMU_HCFG_IOCAPTUREADDR 0x1f000000
+#define EMU_HCFG_LEGACYWRITE 0x00800000
+#define EMU_HCFG_LEGACYWORD 0x00400000
+#define EMU_HCFG_LEGACYINT 0x00200000
+
+#define EMU_HCFG_CODECFMT_MASK 0x00070000
+#define EMU_HCFG_CODECFMT_AC97 0x00000000
+#define EMU_HCFG_CODECFMT_I2S 0x00010000
+#define EMU_HCFG_GPINPUT0 0x00004000
+#define EMU_HCFG_GPINPUT1 0x00002000
+#define EMU_HCFG_GPOUTPUT_MASK 0x00001c00
+#define EMU_HCFG_JOYENABLE 0x00000200
+#define EMU_HCFG_PHASETRACKENABLE 0x00000100
+#define EMU_HCFG_AC3ENABLE_MASK 0x000000e0
+#define EMU_HCFG_AC3ENABLE_ZVIDEO 0x00000080
+#define EMU_HCFG_AC3ENABLE_CDSPDIF 0x00000040
+#define EMU_HCFG_AC3ENABLE_GPSPDIF 0x00000020
+#define EMU_HCFG_AUTOMUTE 0x00000010
+#define EMU_HCFG_LOCKSOUNDCACHE 0x00000008
+#define EMU_HCFG_LOCKTANKCACHE_MASK 0x00000004
+#define EMU_HCFG_LOCKTANKCACHE EMU_MKSUBREG(1, 2, EMU_HCFG)
+#define EMU_HCFG_MUTEBUTTONENABLE 0x00000002
+#define EMU_HCFG_AUDIOENABLE 0x00000001
+
+#define EMU_MUDATA 0x18
+#define EMU_MUCMD 0x19
+#define EMU_MUCMD_RESET 0xff
+#define EMU_MUCMD_ENTERUARTMODE 0x3f
+
+#define EMU_MUSTAT EMU_MUCMD
+#define EMU_MUSTAT_IRDYN 0x80
+#define EMU_MUSTAT_ORDYN 0x40
+
+#define EMU_A_IOCFG 0x18
+#define EMU_A_GPINPUT_MASK 0xff00
+#define EMU_A_GPOUTPUT_MASK 0x00ff
+#define EMU_A_IOCFG_GPOUT0 0x0044
+#define EMU_A_IOCFG_GPOUT1 0x0002
+
+#define EMU_TIMER 0x1a
+#define EMU_TIMER_RATE_MASK 0x000003ff
+#define EMU_TIMER_RATE EMU_MKSUBREG(10, 0, EMU_TIMER)
+
+#define EMU_AC97DATA 0x1c
+#define EMU_AC97ADDR 0x1e
+#define EMU_AC97ADDR_RDY 0x80
+#define EMU_AC97ADDR_ADDR 0x7f
+
+#define EMU_A2_PTR 0x20
+#define EMU_A2_DATA 0x24
+
+#define EMU_A2_SRCSEL 0x600000
+#define EMU_A2_SRCSEL_ENABLE_SPDIF 0x00000004
+#define EMU_A2_SRCSEL_ENABLE_SRCMULTI 0x00000010
+#define EMU_A2_SRCMULTI 0x6e0000
+#define EMU_A2_SRCMULTI_ENABLE_INPUT 0xff00ff00
+
+/* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- */
+
+#define EMU_CHAN_CPF 0x00
+
+#define EMU_CHAN_CPF_PITCH_MASK 0xffff0000
+#define EMU_CHAN_CPF_PITCH EMU_MKSUBREG(16, 16, EMU_CHAN_CPF)
+#define EMU_CHAN_CPF_STEREO_MASK 0x00008000
+#define EMU_CHAN_CPF_STEREO EMU_MKSUBREG(1, 15, EMU_CHAN_CPF)
+#define EMU_CHAN_CPF_STOP_MASK 0x00004000
+#define EMU_CHAN_CPF_FRACADDRESS_MASK 0x00003fff
+
+
+#define EMU_CHAN_PTRX 0x01
+#define EMU_CHAN_PTRX_PITCHTARGET_MASK 0xffff0000
+#define EMU_CHAN_PTRX_PITCHTARGET EMU_MKSUBREG(16, 16, EMU_CHAN_PTRX)
+#define EMU_CHAN_PTRX_FXSENDAMOUNT_A_MASK 0x0000ff00
+#define EMU_CHAN_PTRX_FXSENDAMOUNT_A EMU_MKSUBREG(8, 8, EMU_CHAN_PTRX)
+#define EMU_CHAN_PTRX_FXSENDAMOUNT_B_MASK 0x000000ff
+#define EMU_CHAN_PTRX_FXSENDAMOUNT_B EMU_MKSUBREG(8, 0, EMU_CHAN_PTRX)
+
+#define EMU_CHAN_CVCF 0x02
+#define EMU_CHAN_CVCF_CURRVOL_MASK 0xffff0000
+#define EMU_CHAN_CVCF_CURRVOL EMU_MKSUBREG(16, 16, EMU_CHAN_CVCF)
+#define EMU_CHAN_CVCF_CURRFILTER_MASK 0x0000ffff
+#define EMU_CHAN_CVCF_CURRFILTER EMU_MKSUBREG(16, 0, EMU_CHAN_CVCF)
+
+#define EMU_CHAN_VTFT 0x03
+#define EMU_CHAN_VTFT_VOLUMETARGET_MASK 0xffff0000
+#define EMU_CHAN_VTFT_VOLUMETARGET EMU_MKSUBREG(16, 16, EMU_CHAN_VTFT)
+#define EMU_CHAN_VTFT_FILTERTARGET_MASK 0x0000ffff
+#define EMU_CHAN_VTFT_FILTERTARGET EMU_MKSUBREG(16, 0, EMU_CHAN_VTFT)
+
+#define EMU_CHAN_Z1 0x05
+#define EMU_CHAN_Z2 0x04
+
+#define EMU_CHAN_PSST 0x06
+#define EMU_CHAN_PSST_FXSENDAMOUNT_C_MASK 0xff000000
+#define EMU_CHAN_PSST_FXSENDAMOUNT_C EMU_MKSUBREG(8, 24, EMU_CHAN_PSST)
+#define EMU_CHAN_PSST_LOOPSTARTADDR_MASK 0x00ffffff
+#define EMU_CHAN_PSST_LOOPSTARTADDR EMU_MKSUBREG(24, 0, EMU_CHAN_PSST)
+
+#define EMU_CHAN_DSL 0x07
+#define EMU_CHAN_DSL_FXSENDAMOUNT_D_MASK 0xff000000
+#define EMU_CHAN_DSL_FXSENDAMOUNT_D EMU_MKSUBREG(8, 24, EMU_CHAN_DSL)
+#define EMU_CHAN_DSL_LOOPENDADDR_MASK 0x00ffffff
+#define EMU_CHAN_DSL_LOOPENDADDR EMU_MKSUBREG(24, 0, EMU_CHAN_DSL)
+
+#define EMU_CHAN_CCCA 0x08
+#define EMU_CHAN_CCCA_RESONANCE 0xf0000000
+#define EMU_CHAN_CCCA_INTERPROMMASK 0x0e000000
+#define EMU_CHAN_CCCA_INTERPROM_0 0x00000000
+#define EMU_CHAN_CCCA_INTERPROM_1 0x02000000
+#define EMU_CHAN_CCCA_INTERPROM_2 0x04000000
+#define EMU_CHAN_CCCA_INTERPROM_3 0x06000000
+#define EMU_CHAN_CCCA_INTERPROM_4 0x08000000
+#define EMU_CHAN_CCCA_INTERPROM_5 0x0a000000
+#define EMU_CHAN_CCCA_INTERPROM_6 0x0c000000
+#define EMU_CHAN_CCCA_INTERPROM_7 0x0e000000
+#define EMU_CHAN_CCCA_8BITSELECT 0x01000000
+#define EMU_CHAN_CCCA_CURRADDR_MASK 0x00ffffff
+#define EMU_CHAN_CCCA_CURRADDR EMU_MKSUBREG(24, 0, EMU_CHAN_CCCA)
+
+#define EMU_CHAN_CCR 0x09
+#define EMU_CHAN_CCR_CACHEINVALIDSIZE_MASK 0xfe000000
+#define EMU_CHAN_CCR_CACHEINVALIDSIZE EMU_MKSUBREG(7, 25, EMU_CHAN_CCR)
+#define EMU_CHAN_CCR_CACHELOOPFLAG 0x01000000
+#define EMU_CHAN_CCR_INTERLEAVEDSAMPLES 0x00800000
+#define EMU_CHAN_CCR_WORDSIZEDSAMPLES 0x00400000
+#define EMU_CHAN_CCR_READADDRESS_MASK 0x003f0000
+#define EMU_CHAN_CCR_READADDRESS EMU_MKSUBREG(6, 16, EMU_CHAN_CCR)
+#define EMU_CHAN_CCR_LOOPINVALSIZE 0x0000fe00
+#define EMU_CHAN_CCR_LOOPFLAG 0x00000100
+#define EMU_CHAN_CCR_CACHELOOPADDRHI 0x000000ff
+
+#define EMU_CHAN_CLP 0x0a
+#define EMU_CHAN_CLP_CACHELOOPADDR 0x0000ffff
+
+#define EMU_CHAN_FXRT 0x0b
+#define EMU_CHAN_FXRT_CHANNELA 0x000f0000
+#define EMU_CHAN_FXRT_CHANNELB 0x00f00000
+#define EMU_CHAN_FXRT_CHANNELC 0x0f000000
+#define EMU_CHAN_FXRT_CHANNELD 0xf0000000
+
+#define EMU_CHAN_MAPA 0x0c
+#define EMU_CHAN_MAPB 0x0d
+
+#define EMU_CHAN_MAP_PTE_MASK 0xffffe000
+#define EMU_CHAN_MAP_PTI_MASK 0x00001fff
+
+
+#define EMU_CHAN_ENVVOL 0x10
+#define EMU_CHAN_ENVVOL_MASK 0x0000ffff
+
+
+#define EMU_CHAN_ATKHLDV 0x11
+#define EMU_CHAN_ATKHLDV_PHASE0 0x00008000
+#define EMU_CHAN_ATKHLDV_HOLDTIME_MASK 0x00007f00
+#define EMU_CHAN_ATKHLDV_ATTACKTIME_MASK 0x0000007f
+
+
+#define EMU_CHAN_DCYSUSV 0x12
+#define EMU_CHAN_DCYSUSV_PHASE1_MASK 0x00008000
+#define EMU_CHAN_DCYSUSV_SUSTAINLEVEL_MASK 0x00007f00
+#define EMU_CHAN_DCYSUSV_CHANNELENABLE_MASK 0x00000080
+#define EMU_CHAN_DCYSUSV_DECAYTIME_MASK 0x0000007f
+
+
+#define EMU_CHAN_LFOVAL1 0x13
+#define EMU_CHAN_LFOVAL_MASK 0x0000ffff
+
+#define EMU_CHAN_ENVVAL 0x14
+#define EMU_CHAN_ENVVAL_MASK 0x0000ffff
+
+#define EMU_CHAN_ATKHLDM 0x15
+#define EMU_CHAN_ATKHLDM_PHASE0 0x00008000
+#define EMU_CHAN_ATKHLDM_HOLDTIME 0x00007f00
+#define EMU_CHAN_ATKHLDM_ATTACKTIME 0x0000007f
+
+#define EMU_CHAN_DCYSUSM 0x16
+#define EMU_CHAN_DCYSUSM_PHASE1_MASK 0x00008000
+#define EMU_CHAN_DCYSUSM_SUSTAINLEVEL_MASK 0x00007f00
+#define EMU_CHAN_DCYSUSM_DECAYTIME_MASK 0x0000007f
+
+#define EMU_CHAN_LFOVAL2 0x17
+#define EMU_CHAN_LFOVAL2_MASK 0x0000ffff
+
+#define EMU_CHAN_IP 0x18
+#define EMU_CHAN_IP_MASK 0x0000ffff
+#define EMU_CHAN_IP_UNITY 0x0000e000
+
+#define EMU_CHAN_IFATN 0x19
+#define EMU_CHAN_IFATN_FILTERCUTOFF_MASK 0x0000ff00
+#define EMU_CHAN_IFATN_FILTERCUTOFF EMU_MKSUBREG(8, 8, EMU_CHAN_IFATN)
+#define EMU_CHAN_IFATN_ATTENUATION_MASK 0x000000ff
+#define EMU_CHAN_IFATN_ATTENUATION EMU_MKSUBREG(8, 0, EMU_CHAN_IFATN)
+
+#define EMU_CHAN_PEFE 0x1a
+#define EMU_CHAN_PEFE_PITCHAMOUNT_MASK 0x0000ff00
+#define EMU_CHAN_PEFE_PITCHAMOUNT EMU_MKSUBREG(8, 8, EMU_CHAN_PEFE)
+#define EMU_CHAN_PEFE_FILTERAMOUNT_MASK 0x000000ff
+#define EMU_CHAN_PEFE_FILTERAMOUNT EMU_MKSUBREG(8, 0, EMU_CHAN_PEFE)
+
+#define EMU_CHAN_FMMOD 0x1b
+#define EMU_CHAN_FMMOD_MODVIBRATO 0x0000ff00
+#define EMU_CHAN_FMMOD_MOFILTER 0x000000ff
+
+#define EMU_CHAN_TREMFRQ 0x1c
+#define EMU_CHAN_TREMFRQ_DEPTH 0x0000ff00
+
+#define EMU_CHAN_FM2FRQ2 0x1d
+#define EMU_CHAN_FM2FRQ2_DEPTH 0x0000ff00
+#define EMU_CHAN_FM2FRQ2_FREQUENCY 0x000000ff
+
+#define EMU_CHAN_TEMPENV 0x1e
+#define EMU_CHAN_TEMPENV_MASK 0x0000ffff
+
+#define EMU_CHAN_CD0 0x20
+#define EMU_CHAN_CD1 0x21
+#define EMU_CHAN_CD2 0x22
+#define EMU_CHAN_CD3 0x23
+#define EMU_CHAN_CD4 0x24
+#define EMU_CHAN_CD5 0x25
+#define EMU_CHAN_CD6 0x26
+#define EMU_CHAN_CD7 0x27
+#define EMU_CHAN_CD8 0x28
+#define EMU_CHAN_CD9 0x29
+#define EMU_CHAN_CDA 0x2a
+#define EMU_CHAN_CDB 0x2b
+#define EMU_CHAN_CDC 0x2c
+#define EMU_CHAN_CDD 0x2d
+#define EMU_CHAN_CDE 0x2e
+#define EMU_CHAN_CDF 0x2f
+
+/* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- */
+
+#define EMU_PTB 0x40
+#define EMU_PTB_MASK 0xfffff000
+
+#define EMU_TCB 0x41
+#define EMU_TCB_MASK 0xfffff000
+
+#define EMU_ADCCR 0x42
+#define EMU_ADCCR_RCHANENABLE 0x00000010
+#define EMU_A_ADCCR_RCHANENABLE 0x00000020
+#define EMU_ADCCR_LCHANENABLE 0x00000008
+#define EMU_A_ADCCR_LCHANENABLE 0x00000010
+#define EMU_ADCCR_SAMPLERATE_MASK 0x00000007
+#define EMU_A_ADCCR_SAMPLERATE_MASK 0x0000000f
+#define EMU_ADCCR_SAMPLERATE_48 0x00000000
+#define EMU_ADCCR_SAMPLERATE_44 0x00000001
+#define EMU_ADCCR_SAMPLERATE_32 0x00000002
+#define EMU_ADCCR_SAMPLERATE_24 0x00000003
+#define EMU_ADCCR_SAMPLERATE_22 0x00000004
+#define EMU_ADCCR_SAMPLERATE_16 0x00000005
+#define EMU_A_ADCCR_SAMPLERATE_12 0x00000006
+#define EMU_ADCCR_SAMPLERATE_11 0x00000006
+#define EMU_A_ADCCR_SAMPLERATE_11 0x00000007
+#define EMU_ADCCR_SAMPLERATE_8 0x00000007
+#define EMU_A_ADCCR_SAMPLERATE_8 0x00000008
+
+#define EMU_FXWC 0x43
+#define EMU_TCBS 0x44
+#define EMU_TCBS_MASK 0x00000007
+#define EMU_TCBS_BUFFSIZE_16K 0x00000000
+#define EMU_TCBS_BUFFSIZE_32K 0x00000001
+#define EMU_TCBS_BUFFSIZE_64K 0x00000002
+#define EMU_TCBS_BUFFSIZE_128K 0x00000003
+#define EMU_TCBS_BUFFSIZE_256K 0x00000004
+#define EMU_TCBS_BUFFSIZE_512K 0x00000005
+#define EMU_TCBS_BUFFSIZE_1024K 0x00000006
+#define EMU_TCBS_BUFFSIZE_2048K 0x00000007
+
+#define EMU_MICBA 0x45
+#define EMU_ADCBA 0x46
+#define EMU_FXBA 0x47
+#define EMU_RECBA_MASK 0xfffff000
+
+#define EMU_MICBS 0x49
+#define EMU_ADCBS 0x4a
+#define EMU_FXBS 0x4b
+#define EMU_RECBS_BUFSIZE_NONE 0x00000000
+#define EMU_RECBS_BUFSIZE_384 0x00000001
+#define EMU_RECBS_BUFSIZE_448 0x00000002
+#define EMU_RECBS_BUFSIZE_512 0x00000003
+#define EMU_RECBS_BUFSIZE_640 0x00000004
+#define EMU_RECBS_BUFSIZE_768 0x00000005
+#define EMU_RECBS_BUFSIZE_896 0x00000006
+#define EMU_RECBS_BUFSIZE_1024 0x00000007
+#define EMU_RECBS_BUFSIZE_1280 0x00000008
+#define EMU_RECBS_BUFSIZE_1536 0x00000009
+#define EMU_RECBS_BUFSIZE_1792 0x0000000a
+#define EMU_RECBS_BUFSIZE_2048 0x0000000b
+#define EMU_RECBS_BUFSIZE_2560 0x0000000c
+#define EMU_RECBS_BUFSIZE_3072 0x0000000d
+#define EMU_RECBS_BUFSIZE_3584 0x0000000e
+#define EMU_RECBS_BUFSIZE_4096 0x0000000f
+#define EMU_RECBS_BUFSIZE_5120 0x00000010
+#define EMU_RECBS_BUFSIZE_6144 0x00000011
+#define EMU_RECBS_BUFSIZE_7168 0x00000012
+#define EMU_RECBS_BUFSIZE_8192 0x00000013
+#define EMU_RECBS_BUFSIZE_10240 0x00000014
+#define EMU_RECBS_BUFSIZE_12288 0x00000015
+#define EMU_RECBS_BUFSIZE_14366 0x00000016
+#define EMU_RECBS_BUFSIZE_16384 0x00000017
+#define EMU_RECBS_BUFSIZE_20480 0x00000018
+#define EMU_RECBS_BUFSIZE_24576 0x00000019
+#define EMU_RECBS_BUFSIZE_28672 0x0000001a
+#define EMU_RECBS_BUFSIZE_32768 0x0000001b
+#define EMU_RECBS_BUFSIZE_40960 0x0000001c
+#define EMU_RECBS_BUFSIZE_49152 0x0000001d
+#define EMU_RECBS_BUFSIZE_57344 0x0000001e
+#define EMU_RECBS_BUFSIZE_65536 0x0000001f
+
+#define EMU_CDCS 0x50
+#define EMU_GPSCS 0x51
+
+#define EMU_DBG 0x52
+#define EMU_DBG_ZC 0x80000000
+#define EMU_DBG_SATURATION_OCCURRED 0x02000000
+#define EMU_DBG_SATURATION_ADDR 0x01ff0000
+#define EMU_DBG_SINGLE_STEP 0x00008000
+#define EMU_DBG_STEP 0x00004000
+#define EMU_DBG_CONDITION_CODE 0x00003e00
+#define EMU_DBG_SINGLE_STEP_ADDR 0x000001ff
+
+#define EMU_A_DBG 0x53
+#define EMU_A_DBG_SINGLE_STEP 0x00020000
+#define EMU_A_DBG_ZC 0x40000000
+#define EMU_A_DBG_STEP_ADDR 0x000003ff
+#define EMU_A_DBG_SATURATION_OCCRD 0x20000000
+#define EMU_A_DBG_SATURATION_ADDR 0x0ffc0000
+
+#define EMU_SPCS0 0x54
+#define EMU_SPCS1 0x55
+#define EMU_SPCS2 0x56
+#define EMU_SPCS_CLKACCYMASK 0x30000000
+#define EMU_SPCS_CLKACCY_1000PPM 0x00000000
+#define EMU_SPCS_CLKACCY_50PPM 0x10000000
+#define EMU_SPCS_CLKACCY_VARIABLE 0x20000000
+#define EMU_SPCS_SAMPLERATEMASK 0x0f000000
+#define EMU_SPCS_SAMPLERATE_44 0x00000000
+#define EMU_SPCS_SAMPLERATE_48 0x02000000
+#define EMU_SPCS_SAMPLERATE_32 0x03000000
+#define EMU_SPCS_CHANNELNUMMASK 0x00f00000
+#define EMU_SPCS_CHANNELNUM_UNSPEC 0x00000000
+#define EMU_SPCS_CHANNELNUM_LEFT 0x00100000
+#define EMU_SPCS_CHANNELNUM_RIGHT 0x00200000
+#define EMU_SPCS_SOURCENUMMASK 0x000f0000
+#define EMU_SPCS_SOURCENUM_UNSPEC 0x00000000
+#define EMU_SPCS_GENERATIONSTATUS 0x00008000
+#define EMU_SPCS_CATEGORYCODEMASK 0x00007f00
+#define EMU_SPCS_MODEMASK 0x000000c0
+#define EMU_SPCS_EMPHASISMASK 0x00000038
+#define EMU_SPCS_EMPHASIS_NONE 0x00000000
+#define EMU_SPCS_EMPHASIS_50_15 0x00000008
+#define EMU_SPCS_COPYRIGHT 0x00000004
+#define EMU_SPCS_NOTAUDIODATA 0x00000002
+#define EMU_SPCS_PROFESSIONAL 0x00000001
+
+#define EMU_CLIEL 0x58
+#define EMU_CLIEH 0x59
+#define EMU_CLIPL 0x5a
+#define EMU_CLIPH 0x5b
+#define EMU_SOLEL 0x5c
+#define EMU_SOLEH 0x5d
+
+#define EMU_SPBYPASS 0x5e
+#define EMU_SPBYPASS_ENABLE 0x00000001
+#define EMU_SPBYPASS_24_BITS 0x00000f00
+
+#define EMU_AC97SLOT 0x5f
+#define EMU_AC97SLOT_CENTER 0x00000010
+#define EMU_AC97SLOT_LFE 0x00000020
+
+#define EMU_CDSRCS 0x60
+#define EMU_GPSRCS 0x61
+#define EMU_ZVSRCS 0x62
+#define EMU_SRCS_SPDIFLOCKED 0x02000000
+#define EMU_SRCS_RATELOCKED 0x01000000
+#define EMU_SRCS_ESTSAMPLERATE 0x0007ffff
+
+#define EMU_MICIDX 0x63
+#define EMU_A_MICIDX 0x64
+#define EMU_ADCIDX 0x64
+#define EMU_A_ADCIDX 0x63
+#define EMU_FXIDX 0x65
+#define EMU_RECIDX_MASK 0x0000ffff
+#define EMU_RECIDX(idxreg) (0x10000000|(idxreg))
+/*
+#define EMU_MICIDX_IDX 0x10000063
+#define EMU_ADCIDX_IDX 0x10000064
+#define EMU_FXIDX_IDX 0x10000065
+*/
+
+#define EMU_A_MUDATA1 0x70
+#define EMU_A_MUCMD1 0x71
+#define EMU_A_MUSTAT1 EMU_A_MUCMD1
+#define EMU_A_MUDATA2 0x72
+#define EMU_A_MUCMD2 0x73
+#define EMU_A_MUSTAT2 EMU_A_MUCMD2
+#define EMU_A_FXWC1 0x74
+#define EMU_A_FXWC2 0x75
+#define EMU_A_SPDIF_SAMPLERATE 0x76
+#define EMU_A_SPDIF_44100 0x00000080
+#define EMU_A_SPDIF_48000 0x00000000
+#define EMU_A_SPDIF_96000 0x00000040
+#define EMU_A2_SPDIF_SAMPLERATE EMU_MKSUBREG(3, 9, EMU_A_SPDIF_SAMPLERATE)
+#define EMU_A2_SPDIF_MASK 0x00000e00
+#define EMU_A2_SPDIF_UNKNOWN 0x2
+
+#define EMU_A_CHAN_FXRT2 0x7c
+#define EMU_A_CHAN_FXRT_CHANNELE 0x0000003f
+#define EMU_A_CHAN_FXRT_CHANNELF 0x00003f00
+#define EMU_A_CHAN_FXRT_CHANNELG 0x003f0000
+#define EMU_A_CHAN_FXRT_CHANNELH 0x3f000000
+#define EMU_A_CHAN_SENDAMOUNTS 0x7d
+#define EMU_A_CHAN_FXSENDAMOUNTS_E_MASK 0xff000000
+#define EMU_A_CHAN_FXSENDAMOUNTS_F_MASK 0x00ff0000
+#define EMU_A_CHAN_FXSENDAMOUNTS_G_MASK 0x0000ff00
+#define EMU_A_CHAN_FXSENDAMOUNTS_H_MASK 0x000000ff
+#define EMU_A_CHAN_FXRT1 0x7e
+#define EMU_A_CHAN_FXRT_CHANNELA 0x0000003f
+#define EMU_A_CHAN_FXRT_CHANNELB 0x00003f00
+#define EMU_A_CHAN_FXRT_CHANNELC 0x003f0000
+#define EMU_A_CHAN_FXRT_CHANNELD 0x3f000000
+
+#define EMU_FXGPREGBASE 0x100
+#define EMU_A_FXGPREGBASE 0x400
+
+#define EMU_TANKMEMDATAREGBASE 0x200
+#define EMU_TANKMEMDATAREG_MASK 0x000fffff
+
+#define EMU_TANKMEMADDRREGBASE 0x300
+#define EMU_TANKMEMADDRREG_ADDR_MASK 0x000fffff
+#define EMU_TANKMEMADDRREG_CLEAR 0x00800000
+#define EMU_TANKMEMADDRREG_ALIGN 0x00400000
+#define EMU_TANKMEMADDRREG_WRITE 0x00200000
+#define EMU_TANKMEMADDRREG_READ 0x00100000
+
+#define EMU_MICROCODEBASE 0x400
+#define EMU_A_MICROCODEBASE 0x600
+#define EMU_DSP_LOWORD_OPX_MASK 0x000ffc00
+#define EMU_DSP_LOWORD_OPY_MASK 0x000003ff
+#define EMU_DSP_HIWORD_OPCODE_MASK 0x00f00000
+#define EMU_DSP_HIWORD_RESULT_MASK 0x000ffc00
+#define EMU_DSP_HIWORD_OPA_MASK 0x000003ff
+#define EMU_A_DSP_LOWORD_OPX_MASK 0x007ff000
+#define EMU_A_DSP_LOWORD_OPY_MASK 0x000007ff
+#define EMU_A_DSP_HIWORD_OPCODE_MASK 0x0f000000
+#define EMU_A_DSP_HIWORD_RESULT_MASK 0x007ff000
+#define EMU_A_DSP_HIWORD_OPA_MASK 0x000007ff
+
+#define EMU_DSP_OP_MACS 0x0
+#define EMU_DSP_OP_MACS1 0x1
+#define EMU_DSP_OP_MACW 0x2
+#define EMU_DSP_OP_MACW1 0x3
+#define EMU_DSP_OP_MACINTS 0x4
+#define EMU_DSP_OP_MACINTW 0x5
+#define EMU_DSP_OP_ACC3 0x6
+#define EMU_DSP_OP_MACMV 0x7
+#define EMU_DSP_OP_ANDXOR 0x8
+#define EMU_DSP_OP_TSTNEG 0x9
+#define EMU_DSP_OP_LIMIT 0xA
+#define EMU_DSP_OP_LIMIT1 0xB
+#define EMU_DSP_OP_LOG 0xC
+#define EMU_DSP_OP_EXP 0xD
+#define EMU_DSP_OP_INTERP 0xE
+#define EMU_DSP_OP_SKIP 0xF
+
+
+#define EMU_DSP_FX(num) (num)
+
+#define EMU_DSP_IOL(base, num) (base + (num << 1))
+#define EMU_DSP_IOR(base, num) (EMU_DSP_IOL(base, num) + 1)
+
+#define EMU_DSP_INL_BASE 0x010
+#define EMU_DSP_INL(num) (EMU_DSP_IOL(EMU_DSP_INL_BASE, num))
+#define EMU_DSP_INR(num) (EMU_DSP_IOR(EMU_DSP_INL_BASE, num))
+#define EMU_A_DSP_INL_BASE 0x040
+#define EMU_A_DSP_INL(num) (EMU_DSP_IOL(EMU_A_DSP_INL_BASE, num))
+#define EMU_A_DSP_INR(num) (EMU_DSP_IOR(EMU_A_DSP_INL_BASE, num))
+#define EMU_DSP_IN_AC97 0
+#define EMU_DSP_IN_CDSPDIF 1
+#define EMU_DSP_IN_ZOOM 2
+#define EMU_DSP_IN_TOSOPT 3
+#define EMU_DSP_IN_LVDLM1 4
+#define EMU_DSP_IN_LVDCOS 5
+#define EMU_DSP_IN_LVDLM2 6
+#define EMU_DSP_IN_UNKNOWN 7
+
+#define EMU_DSP_OUTL_BASE 0x020
+#define EMU_DSP_OUTL(num) (EMU_DSP_IOL(EMU_DSP_OUTL_BASE, num))
+#define EMU_DSP_OUTR(num) (EMU_DSP_IOR(EMU_DSP_OUTL_BASE, num))
+#define EMU_DSP_OUT_A_FRONT 0
+#define EMU_DSP_OUT_D_FRONT 1
+#define EMU_DSP_OUT_D_CENTER 2
+#define EMU_DSP_OUT_DRIVE_HP 3
+#define EMU_DSP_OUT_AD_REAR 4
+#define EMU_DSP_OUT_ADC 5
+#define EMU_DSP_OUTL_MIC 6
+
+#define EMU_A_DSP_OUTL_BASE 0x060
+#define EMU_A_DSP_OUTL(num) (EMU_DSP_IOL(EMU_A_DSP_OUTL_BASE, num))
+#define EMU_A_DSP_OUTR(num) (EMU_DSP_IOR(EMU_A_DSP_OUTL_BASE, num))
+#define EMU_A_DSP_OUT_D_FRONT 0
+#define EMU_A_DSP_OUT_D_CENTER 1
+#define EMU_A_DSP_OUT_DRIVE_HP 2
+#define EMU_A_DSP_OUT_DREAR 3
+#define EMU_A_DSP_OUT_A_FRONT 4
+#define EMU_A_DSP_OUT_A_CENTER 5
+#define EMU_A_DSP_OUT_A_REAR 7
+#define EMU_A_DSP_OUT_ADC 11
+
+#define EMU_DSP_CST_BASE 0x40
+#define EMU_A_DSP_CST_BASE 0xc0
+#define EMU_DSP_CST(num) (EMU_DSP_CST_BASE + num)
+#define EMU_A_DSP_CST(num) (EMU_A_DSP_CST_BASE + num)
+/*
+00 = 0x00000000
+01 = 0x00000001
+02 = 0x00000002
+03 = 0x00000003
+04 = 0x00000004
+05 = 0x00000008
+06 = 0x00000010
+07 = 0x00000020
+08 = 0x00000100
+09 = 0x00010000
+0A = 0x00080000
+0B = 0x10000000
+0C = 0x20000000
+0D = 0x40000000
+0E = 0x80000000
+0F = 0x7FFFFFFF
+10 = 0xFFFFFFFF
+11 = 0xFFFFFFFE
+12 = 0xC0000000
+13 = 0x4F1BBCDC
+14 = 0x5A7EF9DB
+15 = 0x00100000
+*/
+
+#define EMU_DSP_HWR_ACC 0x056
+#define EMU_DSP_HWR_CCR 0x057
+#define EMU_DSP_HWR_CCR_S 0x04
+#define EMU_DSP_HWR_CCR_Z 0x03
+#define EMU_DSP_HWR_CCR_M 0x02
+#define EMU_DSP_HWR_CCR_N 0x01
+#define EMU_DSP_HWR_CCR_B 0x00
+#define EMU_DSP_HWR_NOISE0 0x058
+#define EMU_DSP_HWR_NOISE1 0x059
+#define EMU_DSP_HWR_INTR 0x05A
+#define EMU_DSP_HWR_DBAC 0x05B
+
+#define EMU_DSP_GPR(num) (EMU_FXGPREGBASE + num)
+#define EMU_A_DSP_GPR(num) (EMU_A_FXGPREGBASE + num)
+
+#endif /* _DEV_PCI_EMUXKIREG_H_ */
diff --git a/sys/dev/sound/pci/hda/hda_reg.h b/sys/dev/sound/pci/hda/hda_reg.h
index 0eeea64..c60a74d 100644
--- a/sys/dev/sound/pci/hda/hda_reg.h
+++ b/sys/dev/sound/pci/hda/hda_reg.h
@@ -400,7 +400,7 @@
HDA_CMD_GET_UNSOLICITED_RESPONSE_TAG_SHIFT)
#define HDA_CMD_SET_UNSOLICITED_RESPONSE_ENABLE 0x80
-#define HDA_CMD_SET_UNSOLICITED_RESPONSE_TAG_MASK 0x1f
+#define HDA_CMD_SET_UNSOLICITED_RESPONSE_TAG_MASK 0x3f
#define HDA_CMD_SET_UNSOLICITED_RESPONSE_TAG_SHIFT 0
#define HDA_CMD_SET_UNSOLICITED_RESPONSE_TAG(param) \
@@ -418,14 +418,11 @@
(HDA_CMD_12BIT((cad), (nid), \
HDA_CMD_VERB_SET_PIN_SENSE, (payload)))
-#define HDA_CMD_GET_PIN_SENSE_PRESENCE_DETECT_MASK 0x80000000
-#define HDA_CMD_GET_PIN_SENSE_PRESENCE_DETECT_SHIFT 31
+#define HDA_CMD_GET_PIN_SENSE_PRESENCE_DETECT 0x80000000
+#define HDA_CMD_GET_PIN_SENSE_ELD_VALID 0x40000000
#define HDA_CMD_GET_PIN_SENSE_IMP_SENSE_MASK 0x7fffffff
#define HDA_CMD_GET_PIN_SENSE_IMP_SENSE_SHIFT 0
-#define HDA_CMD_GET_PIN_SENSE_PRESENCE_DETECT(rsp) \
- (((rsp) & HDA_CMD_GET_PIN_SENSE_PRESENCE_DETECT_MASK) >> \
- HDA_CMD_GET_PIN_SENSE_PRESENCE_DETECT_SHIFT)
#define HDA_CMD_GET_PIN_SENSE_IMP_SENSE(rsp) \
(((rsp) & HDA_CMD_GET_PIN_SENSE_IMP_SENSE_MASK) >> \
HDA_CMD_GET_PIN_SENSE_IMP_SENSE_SHIFT)
@@ -679,17 +676,47 @@
HDA_CMD_VERB_SET_CONV_CHAN_COUNT, (payload)))
#define HDA_CMD_VERB_GET_HDMI_DIP_SIZE 0xf2e
+
+#define HDA_CMD_GET_HDMI_DIP_SIZE(cad, nid, arg) \
+ (HDA_CMD_12BIT((cad), (nid), \
+ HDA_CMD_VERB_GET_HDMI_DIP_SIZE, (arg)))
+
#define HDA_CMD_VERB_GET_HDMI_ELDD 0xf2f
+#define HDA_CMD_GET_HDMI_ELDD(cad, nid, off) \
+ (HDA_CMD_12BIT((cad), (nid), \
+ HDA_CMD_VERB_GET_HDMI_ELDD, (off)))
+
#define HDA_CMD_VERB_GET_HDMI_DIP_INDEX 0xf30
#define HDA_CMD_VERB_SET_HDMI_DIP_INDEX 0x730
+#define HDA_CMD_GET_HDMI_DIP_INDEX(cad, nid) \
+ (HDA_CMD_12BIT((cad), (nid), \
+ HDA_CMD_VERB_GET_HDMI_DIP_INDEX, 0x0))
+#define HDA_CMD_SET_HDMI_DIP_INDEX(cad, nid, payload) \
+ (HDA_CMD_12BIT((cad), (nid), \
+ HDA_CMD_VERB_SET_HDMI_DIP_INDEX, (payload)))
+
#define HDA_CMD_VERB_GET_HDMI_DIP_DATA 0xf31
#define HDA_CMD_VERB_SET_HDMI_DIP_DATA 0x731
+#define HDA_CMD_GET_HDMI_DIP_DATA(cad, nid) \
+ (HDA_CMD_12BIT((cad), (nid), \
+ HDA_CMD_VERB_GET_HDMI_DIP_DATA, 0x0))
+#define HDA_CMD_SET_HDMI_DIP_DATA(cad, nid, payload) \
+ (HDA_CMD_12BIT((cad), (nid), \
+ HDA_CMD_VERB_SET_HDMI_DIP_DATA, (payload)))
+
#define HDA_CMD_VERB_GET_HDMI_DIP_XMIT 0xf32
#define HDA_CMD_VERB_SET_HDMI_DIP_XMIT 0x732
+#define HDA_CMD_GET_HDMI_DIP_XMIT(cad, nid) \
+ (HDA_CMD_12BIT((cad), (nid), \
+ HDA_CMD_VERB_GET_HDMI_DIP_XMIT, 0x0))
+#define HDA_CMD_SET_HDMI_DIP_XMIT(cad, nid, payload) \
+ (HDA_CMD_12BIT((cad), (nid), \
+ HDA_CMD_VERB_SET_HDMI_DIP_XMIT, (payload)))
+
#define HDA_CMD_VERB_GET_HDMI_CP_CTRL 0xf33
#define HDA_CMD_VERB_SET_HDMI_CP_CTRL 0x733
@@ -703,6 +730,23 @@
(HDA_CMD_12BIT((cad), (nid), \
HDA_CMD_VERB_SET_HDMI_CHAN_SLOT, (payload)))
+#define HDA_HDMI_CODING_TYPE_REF_STREAM_HEADER 0
+#define HDA_HDMI_CODING_TYPE_LPCM 1
+#define HDA_HDMI_CODING_TYPE_AC3 2
+#define HDA_HDMI_CODING_TYPE_MPEG1 3
+#define HDA_HDMI_CODING_TYPE_MP3 4
+#define HDA_HDMI_CODING_TYPE_MPEG2 5
+#define HDA_HDMI_CODING_TYPE_AACLC 6
+#define HDA_HDMI_CODING_TYPE_DTS 7
+#define HDA_HDMI_CODING_TYPE_ATRAC 8
+#define HDA_HDMI_CODING_TYPE_SACD 9
+#define HDA_HDMI_CODING_TYPE_EAC3 10
+#define HDA_HDMI_CODING_TYPE_DTS_HD 11
+#define HDA_HDMI_CODING_TYPE_MLP 12
+#define HDA_HDMI_CODING_TYPE_DST 13
+#define HDA_HDMI_CODING_TYPE_WMAPRO 14
+#define HDA_HDMI_CODING_TYPE_REF_CTX 15
+
/* Function Reset */
#define HDA_CMD_VERB_FUNCTION_RESET 0x7ff
diff --git a/sys/dev/sound/pci/hda/hdaa.c b/sys/dev/sound/pci/hda/hdaa.c
new file mode 100644
index 0000000..9d7ff0d
--- /dev/null
+++ b/sys/dev/sound/pci/hda/hdaa.c
@@ -0,0 +1,6747 @@
+/*-
+ * Copyright (c) 2006 Stephane E. Potvin <sepotvin@videotron.ca>
+ * Copyright (c) 2006 Ariff Abdullah <ariff@FreeBSD.org>
+ * Copyright (c) 2008-2012 Alexander Motin <mav@FreeBSD.org>
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ */
+
+/*
+ * Intel High Definition Audio (Audio function) driver for FreeBSD.
+ */
+
+#ifdef HAVE_KERNEL_OPTION_HEADERS
+#include "opt_snd.h"
+#endif
+
+#include <dev/sound/pcm/sound.h>
+
+#include <sys/ctype.h>
+#include <sys/taskqueue.h>
+
+#include <dev/sound/pci/hda/hdac.h>
+#include <dev/sound/pci/hda/hdaa.h>
+#include <dev/sound/pci/hda/hda_reg.h>
+
+#include "mixer_if.h"
+
+SND_DECLARE_FILE("$FreeBSD$");
+
+#define hdaa_lock(devinfo) snd_mtxlock((devinfo)->lock)
+#define hdaa_unlock(devinfo) snd_mtxunlock((devinfo)->lock)
+#define hdaa_lockassert(devinfo) snd_mtxassert((devinfo)->lock)
+#define hdaa_lockowned(devinfo) mtx_owned((devinfo)->lock)
+
+static const struct {
+ char *key;
+ uint32_t value;
+} hdaa_quirks_tab[] = {
+ { "softpcmvol", HDAA_QUIRK_SOFTPCMVOL },
+ { "fixedrate", HDAA_QUIRK_FIXEDRATE },
+ { "forcestereo", HDAA_QUIRK_FORCESTEREO },
+ { "eapdinv", HDAA_QUIRK_EAPDINV },
+ { "senseinv", HDAA_QUIRK_SENSEINV },
+ { "ivref50", HDAA_QUIRK_IVREF50 },
+ { "ivref80", HDAA_QUIRK_IVREF80 },
+ { "ivref100", HDAA_QUIRK_IVREF100 },
+ { "ovref50", HDAA_QUIRK_OVREF50 },
+ { "ovref80", HDAA_QUIRK_OVREF80 },
+ { "ovref100", HDAA_QUIRK_OVREF100 },
+ { "ivref", HDAA_QUIRK_IVREF },
+ { "ovref", HDAA_QUIRK_OVREF },
+ { "vref", HDAA_QUIRK_VREF },
+};
+#define HDAA_QUIRKS_TAB_LEN \
+ (sizeof(hdaa_quirks_tab) / sizeof(hdaa_quirks_tab[0]))
+
+#define HDA_PARSE_MAXDEPTH 10
+
+MALLOC_DEFINE(M_HDAA, "hdaa", "HDA Audio");
+
+const char *HDA_COLORS[16] = {"Unknown", "Black", "Grey", "Blue", "Green", "Red",
+ "Orange", "Yellow", "Purple", "Pink", "Res.A", "Res.B", "Res.C", "Res.D",
+ "White", "Other"};
+
+const char *HDA_DEVS[16] = {"Line-out", "Speaker", "Headphones", "CD",
+ "SPDIF-out", "Digital-out", "Modem-line", "Modem-handset", "Line-in",
+ "AUX", "Mic", "Telephony", "SPDIF-in", "Digital-in", "Res.E", "Other"};
+
+const char *HDA_CONNS[4] = {"Jack", "None", "Fixed", "Both"};
+
+const char *HDA_CONNECTORS[16] = {
+ "Unknown", "1/8", "1/4", "ATAPI", "RCA", "Optical", "Digital", "Analog",
+ "DIN", "XLR", "RJ-11", "Combo", "0xc", "0xd", "0xe", "Other" };
+
+const char *HDA_LOCS[64] = {
+ "0x00", "Rear", "Front", "Left", "Right", "Top", "Bottom", "Rear-panel",
+ "Drive-bay", "0x09", "0x0a", "0x0b", "0x0c", "0x0d", "0x0e", "0x0f",
+ "Internal", "0x11", "0x12", "0x13", "0x14", "0x15", "0x16", "Riser",
+ "0x18", "Onboard", "0x1a", "0x1b", "0x1c", "0x1d", "0x1e", "0x1f",
+ "External", "Ext-Rear", "Ext-Front", "Ext-Left", "Ext-Right", "Ext-Top", "Ext-Bottom", "0x07",
+ "0x28", "0x29", "0x2a", "0x2b", "0x2c", "0x2d", "0x2e", "0x2f",
+ "Other", "0x31", "0x32", "0x33", "0x34", "0x35", "Other-Bott", "Lid-In",
+ "Lid-Out", "0x39", "0x3a", "0x3b", "0x3c", "0x3d", "0x3e", "0x3f" };
+
+const char *HDA_GPIO_ACTIONS[8] = {
+ "keep", "set", "clear", "disable", "input", "0x05", "0x06", "0x07"};
+
+const char *HDA_HDMI_CODING_TYPES[18] = {
+ "undefined", "LPCM", "AC-3", "MPEG1", "MP3", "MPEG2", "AAC-LC", "DTS",
+ "ATRAC", "DSD", "E-AC-3", "DTS-HD", "MLP", "DST", "WMAPro", "HE-AAC",
+ "HE-AACv2", "MPEG-Surround"
+};
+
+/* Default */
+static uint32_t hdaa_fmt[] = {
+ SND_FORMAT(AFMT_S16_LE, 2, 0),
+ 0
+};
+
+static struct pcmchan_caps hdaa_caps = {48000, 48000, hdaa_fmt, 0};
+
+static const struct {
+ uint32_t rate;
+ int valid;
+ uint16_t base;
+ uint16_t mul;
+ uint16_t div;
+} hda_rate_tab[] = {
+ { 8000, 1, 0x0000, 0x0000, 0x0500 }, /* (48000 * 1) / 6 */
+ { 9600, 0, 0x0000, 0x0000, 0x0400 }, /* (48000 * 1) / 5 */
+ { 12000, 0, 0x0000, 0x0000, 0x0300 }, /* (48000 * 1) / 4 */
+ { 16000, 1, 0x0000, 0x0000, 0x0200 }, /* (48000 * 1) / 3 */
+ { 18000, 0, 0x0000, 0x1000, 0x0700 }, /* (48000 * 3) / 8 */
+ { 19200, 0, 0x0000, 0x0800, 0x0400 }, /* (48000 * 2) / 5 */
+ { 24000, 0, 0x0000, 0x0000, 0x0100 }, /* (48000 * 1) / 2 */
+ { 28800, 0, 0x0000, 0x1000, 0x0400 }, /* (48000 * 3) / 5 */
+ { 32000, 1, 0x0000, 0x0800, 0x0200 }, /* (48000 * 2) / 3 */
+ { 36000, 0, 0x0000, 0x1000, 0x0300 }, /* (48000 * 3) / 4 */
+ { 38400, 0, 0x0000, 0x1800, 0x0400 }, /* (48000 * 4) / 5 */
+ { 48000, 1, 0x0000, 0x0000, 0x0000 }, /* (48000 * 1) / 1 */
+ { 64000, 0, 0x0000, 0x1800, 0x0200 }, /* (48000 * 4) / 3 */
+ { 72000, 0, 0x0000, 0x1000, 0x0100 }, /* (48000 * 3) / 2 */
+ { 96000, 1, 0x0000, 0x0800, 0x0000 }, /* (48000 * 2) / 1 */
+ { 144000, 0, 0x0000, 0x1000, 0x0000 }, /* (48000 * 3) / 1 */
+ { 192000, 1, 0x0000, 0x1800, 0x0000 }, /* (48000 * 4) / 1 */
+ { 8820, 0, 0x4000, 0x0000, 0x0400 }, /* (44100 * 1) / 5 */
+ { 11025, 1, 0x4000, 0x0000, 0x0300 }, /* (44100 * 1) / 4 */
+ { 12600, 0, 0x4000, 0x0800, 0x0600 }, /* (44100 * 2) / 7 */
+ { 14700, 0, 0x4000, 0x0000, 0x0200 }, /* (44100 * 1) / 3 */
+ { 17640, 0, 0x4000, 0x0800, 0x0400 }, /* (44100 * 2) / 5 */
+ { 18900, 0, 0x4000, 0x1000, 0x0600 }, /* (44100 * 3) / 7 */
+ { 22050, 1, 0x4000, 0x0000, 0x0100 }, /* (44100 * 1) / 2 */
+ { 25200, 0, 0x4000, 0x1800, 0x0600 }, /* (44100 * 4) / 7 */
+ { 26460, 0, 0x4000, 0x1000, 0x0400 }, /* (44100 * 3) / 5 */
+ { 29400, 0, 0x4000, 0x0800, 0x0200 }, /* (44100 * 2) / 3 */
+ { 33075, 0, 0x4000, 0x1000, 0x0300 }, /* (44100 * 3) / 4 */
+ { 35280, 0, 0x4000, 0x1800, 0x0400 }, /* (44100 * 4) / 5 */
+ { 44100, 1, 0x4000, 0x0000, 0x0000 }, /* (44100 * 1) / 1 */
+ { 58800, 0, 0x4000, 0x1800, 0x0200 }, /* (44100 * 4) / 3 */
+ { 66150, 0, 0x4000, 0x1000, 0x0100 }, /* (44100 * 3) / 2 */
+ { 88200, 1, 0x4000, 0x0800, 0x0000 }, /* (44100 * 2) / 1 */
+ { 132300, 0, 0x4000, 0x1000, 0x0000 }, /* (44100 * 3) / 1 */
+ { 176400, 1, 0x4000, 0x1800, 0x0000 }, /* (44100 * 4) / 1 */
+};
+#define HDA_RATE_TAB_LEN (sizeof(hda_rate_tab) / sizeof(hda_rate_tab[0]))
+
+const static char *ossnames[] = SOUND_DEVICE_NAMES;
+
+/****************************************************************************
+ * Function prototypes
+ ****************************************************************************/
+static int hdaa_pcmchannel_setup(struct hdaa_chan *);
+
+static void hdaa_widget_connection_select(struct hdaa_widget *, uint8_t);
+static void hdaa_audio_ctl_amp_set(struct hdaa_audio_ctl *,
+ uint32_t, int, int);
+static struct hdaa_audio_ctl *hdaa_audio_ctl_amp_get(struct hdaa_devinfo *,
+ nid_t, int, int, int);
+static void hdaa_audio_ctl_amp_set_internal(struct hdaa_devinfo *,
+ nid_t, int, int, int, int, int, int);
+
+static void hdaa_dump_pin_config(struct hdaa_widget *w, uint32_t conf);
+
+static char *
+hdaa_audio_ctl_ossmixer_mask2allname(uint32_t mask, char *buf, size_t len)
+{
+ int i, first = 1;
+
+ bzero(buf, len);
+ for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) {
+ if (mask & (1 << i)) {
+ if (first == 0)
+ strlcat(buf, ", ", len);
+ strlcat(buf, ossnames[i], len);
+ first = 0;
+ }
+ }
+ return (buf);
+}
+
+static struct hdaa_audio_ctl *
+hdaa_audio_ctl_each(struct hdaa_devinfo *devinfo, int *index)
+{
+ if (devinfo == NULL ||
+ index == NULL || devinfo->ctl == NULL ||
+ devinfo->ctlcnt < 1 ||
+ *index < 0 || *index >= devinfo->ctlcnt)
+ return (NULL);
+ return (&devinfo->ctl[(*index)++]);
+}
+
+static struct hdaa_audio_ctl *
+hdaa_audio_ctl_amp_get(struct hdaa_devinfo *devinfo, nid_t nid, int dir,
+ int index, int cnt)
+{
+ struct hdaa_audio_ctl *ctl;
+ int i, found = 0;
+
+ if (devinfo == NULL || devinfo->ctl == NULL)
+ return (NULL);
+
+ i = 0;
+ while ((ctl = hdaa_audio_ctl_each(devinfo, &i)) != NULL) {
+ if (ctl->enable == 0)
+ continue;
+ if (ctl->widget->nid != nid)
+ continue;
+ if (dir && ctl->ndir != dir)
+ continue;
+ if (index >= 0 && ctl->ndir == HDAA_CTL_IN &&
+ ctl->dir == ctl->ndir && ctl->index != index)
+ continue;
+ found++;
+ if (found == cnt || cnt <= 0)
+ return (ctl);
+ }
+
+ return (NULL);
+}
+
+/*
+ * Headphones redirection change handler.
+ */
+static void
+hdaa_hpredir_handler(struct hdaa_widget *w)
+{
+ struct hdaa_devinfo *devinfo = w->devinfo;
+ struct hdaa_audio_as *as = &devinfo->as[w->bindas];
+ struct hdaa_widget *w1;
+ struct hdaa_audio_ctl *ctl;
+ uint32_t val;
+ int j, connected = w->wclass.pin.connected;
+
+ HDA_BOOTVERBOSE(
+ device_printf((as->pdevinfo && as->pdevinfo->dev) ?
+ as->pdevinfo->dev : devinfo->dev,
+ "Redirect output to: %s\n",
+ connected ? "headphones": "main");
+ );
+ /* (Un)Mute headphone pin. */
+ ctl = hdaa_audio_ctl_amp_get(devinfo,
+ w->nid, HDAA_CTL_IN, -1, 1);
+ if (ctl != NULL && ctl->mute) {
+ /* If pin has muter - use it. */
+ val = connected ? 0 : 1;
+ if (val != ctl->forcemute) {
+ ctl->forcemute = val;
+ hdaa_audio_ctl_amp_set(ctl,
+ HDAA_AMP_MUTE_DEFAULT,
+ HDAA_AMP_VOL_DEFAULT, HDAA_AMP_VOL_DEFAULT);
+ }
+ } else {
+ /* If there is no muter - disable pin output. */
+ if (connected)
+ val = w->wclass.pin.ctrl |
+ HDA_CMD_SET_PIN_WIDGET_CTRL_OUT_ENABLE;
+ else
+ val = w->wclass.pin.ctrl &
+ ~HDA_CMD_SET_PIN_WIDGET_CTRL_OUT_ENABLE;
+ if (val != w->wclass.pin.ctrl) {
+ w->wclass.pin.ctrl = val;
+ hda_command(devinfo->dev,
+ HDA_CMD_SET_PIN_WIDGET_CTRL(0,
+ w->nid, w->wclass.pin.ctrl));
+ }
+ }
+ /* (Un)Mute other pins. */
+ for (j = 0; j < 15; j++) {
+ if (as->pins[j] <= 0)
+ continue;
+ ctl = hdaa_audio_ctl_amp_get(devinfo,
+ as->pins[j], HDAA_CTL_IN, -1, 1);
+ if (ctl != NULL && ctl->mute) {
+ /* If pin has muter - use it. */
+ val = connected ? 1 : 0;
+ if (val == ctl->forcemute)
+ continue;
+ ctl->forcemute = val;
+ hdaa_audio_ctl_amp_set(ctl,
+ HDAA_AMP_MUTE_DEFAULT,
+ HDAA_AMP_VOL_DEFAULT, HDAA_AMP_VOL_DEFAULT);
+ continue;
+ }
+ /* If there is no muter - disable pin output. */
+ w1 = hdaa_widget_get(devinfo, as->pins[j]);
+ if (w1 != NULL) {
+ if (connected)
+ val = w1->wclass.pin.ctrl &
+ ~HDA_CMD_SET_PIN_WIDGET_CTRL_OUT_ENABLE;
+ else
+ val = w1->wclass.pin.ctrl |
+ HDA_CMD_SET_PIN_WIDGET_CTRL_OUT_ENABLE;
+ if (val != w1->wclass.pin.ctrl) {
+ w1->wclass.pin.ctrl = val;
+ hda_command(devinfo->dev,
+ HDA_CMD_SET_PIN_WIDGET_CTRL(0,
+ w1->nid, w1->wclass.pin.ctrl));
+ }
+ }
+ }
+}
+
+/*
+ * Recording source change handler.
+ */
+static void
+hdaa_autorecsrc_handler(struct hdaa_audio_as *as, struct hdaa_widget *w)
+{
+ struct hdaa_pcm_devinfo *pdevinfo = as->pdevinfo;
+ struct hdaa_devinfo *devinfo;
+ struct hdaa_widget *w1;
+ int i, mask, fullmask, prio, bestprio;
+ char buf[128];
+
+ if (!as->mixed || pdevinfo == NULL || pdevinfo->mixer == NULL)
+ return;
+ /* Don't touch anything if we asked not to. */
+ if (pdevinfo->autorecsrc == 0 ||
+ (pdevinfo->autorecsrc == 1 && w != NULL))
+ return;
+ /* Don't touch anything if "mix" or "speaker" selected. */
+ if (pdevinfo->recsrc & (SOUND_MASK_IMIX | SOUND_MASK_SPEAKER))
+ return;
+ /* Don't touch anything if several selected. */
+ if (ffs(pdevinfo->recsrc) != fls(pdevinfo->recsrc))
+ return;
+ devinfo = pdevinfo->devinfo;
+ mask = fullmask = 0;
+ bestprio = 0;
+ for (i = 0; i < 16; i++) {
+ if (as->pins[i] <= 0)
+ continue;
+ w1 = hdaa_widget_get(devinfo, as->pins[i]);
+ if (w1 == NULL || w1->enable == 0)
+ continue;
+ if (w1->wclass.pin.connected == 0)
+ continue;
+ prio = (w1->wclass.pin.connected == 1) ? 2 : 1;
+ if (prio < bestprio)
+ continue;
+ if (prio > bestprio) {
+ mask = 0;
+ bestprio = prio;
+ }
+ mask |= (1 << w1->ossdev);
+ fullmask |= (1 << w1->ossdev);
+ }
+ if (mask == 0)
+ return;
+ /* Prefer newly connected input. */
+ if (w != NULL && (mask & (1 << w->ossdev)))
+ mask = (1 << w->ossdev);
+ /* Prefer previously selected input */
+ if (mask & pdevinfo->recsrc)
+ mask &= pdevinfo->recsrc;
+ /* Prefer mic. */
+ if (mask & SOUND_MASK_MIC)
+ mask = SOUND_MASK_MIC;
+ /* Prefer monitor (2nd mic). */
+ if (mask & SOUND_MASK_MONITOR)
+ mask = SOUND_MASK_MONITOR;
+ /* Just take first one. */
+ mask = (1 << (ffs(mask) - 1));
+ HDA_BOOTVERBOSE(
+ hdaa_audio_ctl_ossmixer_mask2allname(mask, buf, sizeof(buf));
+ device_printf(pdevinfo->dev,
+ "Automatically set rec source to: %s\n", buf);
+ );
+ hdaa_unlock(devinfo);
+ mix_setrecsrc(pdevinfo->mixer, mask);
+ hdaa_lock(devinfo);
+}
+
+/*
+ * Jack presence detection event handler.
+ */
+static void
+hdaa_presence_handler(struct hdaa_widget *w)
+{
+ struct hdaa_devinfo *devinfo = w->devinfo;
+ struct hdaa_audio_as *as;
+ uint32_t res;
+ int connected;
+
+ if (w->enable == 0 || w->type !=
+ HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
+ return;
+
+ if (HDA_PARAM_PIN_CAP_PRESENCE_DETECT_CAP(w->wclass.pin.cap) == 0 ||
+ (HDA_CONFIG_DEFAULTCONF_MISC(w->wclass.pin.config) & 1) != 0)
+ return;
+
+ res = hda_command(devinfo->dev, HDA_CMD_GET_PIN_SENSE(0, w->nid));
+ connected = (res & HDA_CMD_GET_PIN_SENSE_PRESENCE_DETECT) != 0;
+ if (devinfo->quirks & HDAA_QUIRK_SENSEINV)
+ connected = !connected;
+ if (connected == w->wclass.pin.connected)
+ return;
+ w->wclass.pin.connected = connected;
+ HDA_BOOTVERBOSE(
+ device_printf(devinfo->dev,
+ "Pin sense: nid=%d sence=0x%08x (%sconnected)\n",
+ w->nid, res, !w->wclass.pin.connected ? "dis" : "");
+ );
+
+ as = &devinfo->as[w->bindas];
+ if (as->hpredir >= 0 && as->pins[15] == w->nid)
+ hdaa_hpredir_handler(w);
+ if (as->dir == HDAA_CTL_IN)
+ hdaa_autorecsrc_handler(as, w);
+}
+
+/*
+ * Callback for poll based presence detection.
+ */
+static void
+hdaa_jack_poll_callback(void *arg)
+{
+ struct hdaa_devinfo *devinfo = arg;
+ struct hdaa_widget *w;
+ int i;
+
+ hdaa_lock(devinfo);
+ if (devinfo->poll_ival == 0) {
+ hdaa_unlock(devinfo);
+ return;
+ }
+ for (i = 0; i < devinfo->ascnt; i++) {
+ if (devinfo->as[i].hpredir < 0)
+ continue;
+ w = hdaa_widget_get(devinfo, devinfo->as[i].pins[15]);
+ if (w == NULL || w->enable == 0 || w->type !=
+ HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
+ continue;
+ hdaa_presence_handler(w);
+ }
+ callout_reset(&devinfo->poll_jack, devinfo->poll_ival,
+ hdaa_jack_poll_callback, devinfo);
+ hdaa_unlock(devinfo);
+}
+
+static void
+hdaa_eld_dump(struct hdaa_widget *w)
+{
+ struct hdaa_devinfo *devinfo = w->devinfo;
+ device_t dev = devinfo->dev;
+ uint8_t *sad;
+ int len, mnl, i, sadc, fmt;
+
+ if (w->eld == NULL || w->eld_len < 4)
+ return;
+ device_printf(dev,
+ "ELD nid=%d: ELD_Ver=%u Baseline_ELD_Len=%u\n",
+ w->nid, w->eld[0] >> 3, w->eld[2]);
+ if ((w->eld[0] >> 3) != 0x02)
+ return;
+ len = min(w->eld_len, (u_int)w->eld[2] * 4);
+ mnl = w->eld[4] & 0x1f;
+ device_printf(dev,
+ "ELD nid=%d: CEA_EDID_Ver=%u MNL=%u\n",
+ w->nid, w->eld[4] >> 5, mnl);
+ sadc = w->eld[5] >> 4;
+ device_printf(dev,
+ "ELD nid=%d: SAD_Count=%u Conn_Type=%u S_AI=%u HDCP=%u\n",
+ w->nid, sadc, (w->eld[5] >> 2) & 0x3,
+ (w->eld[5] >> 1) & 0x1, w->eld[5] & 0x1);
+ device_printf(dev,
+ "ELD nid=%d: Aud_Synch_Delay=%ums\n",
+ w->nid, w->eld[6] * 2);
+ device_printf(dev,
+ "ELD nid=%d: Channels=0x%b\n",
+ w->nid, w->eld[7],
+ "\020\07RLRC\06FLRC\05RC\04RLR\03FC\02LFE\01FLR");
+ device_printf(dev,
+ "ELD nid=%d: Port_ID=0x%02x%02x%02x%02x%02x%02x%02x%02x\n",
+ w->nid, w->eld[8], w->eld[9], w->eld[10], w->eld[11],
+ w->eld[12], w->eld[13], w->eld[14], w->eld[15]);
+ device_printf(dev,
+ "ELD nid=%d: Manufacturer_Name=0x%02x%02x\n",
+ w->nid, w->eld[16], w->eld[17]);
+ device_printf(dev,
+ "ELD nid=%d: Product_Code=0x%02x%02x\n",
+ w->nid, w->eld[18], w->eld[19]);
+ device_printf(dev,
+ "ELD nid=%d: Monitor_Name_String='%.*s'\n",
+ w->nid, mnl, &w->eld[20]);
+ for (i = 0; i < sadc; i++) {
+ sad = &w->eld[20 + mnl + i * 3];
+ fmt = (sad[0] >> 3) & 0x0f;
+ if (fmt == HDA_HDMI_CODING_TYPE_REF_CTX) {
+ fmt = (sad[2] >> 3) & 0x1f;
+ if (fmt < 1 || fmt > 3)
+ fmt = 0;
+ else
+ fmt += 14;
+ }
+ device_printf(dev,
+ "ELD nid=%d: %s %dch freqs=0x%b",
+ w->nid, HDA_HDMI_CODING_TYPES[fmt], (sad[0] & 0x07) + 1,
+ sad[1], "\020\007192\006176\00596\00488\00348\00244\00132");
+ switch (fmt) {
+ case HDA_HDMI_CODING_TYPE_LPCM:
+ printf(" sizes=0x%b",
+ sad[2] & 0x07, "\020\00324\00220\00116");
+ break;
+ case HDA_HDMI_CODING_TYPE_AC3:
+ case HDA_HDMI_CODING_TYPE_MPEG1:
+ case HDA_HDMI_CODING_TYPE_MP3:
+ case HDA_HDMI_CODING_TYPE_MPEG2:
+ case HDA_HDMI_CODING_TYPE_AACLC:
+ case HDA_HDMI_CODING_TYPE_DTS:
+ case HDA_HDMI_CODING_TYPE_ATRAC:
+ printf(" max_bitrate=%d", sad[2] * 8000);
+ break;
+ case HDA_HDMI_CODING_TYPE_WMAPRO:
+ printf(" profile=%d", sad[2] & 0x07);
+ break;
+ }
+ printf("\n");
+ }
+}
+
+static void
+hdaa_eld_handler(struct hdaa_widget *w)
+{
+ struct hdaa_devinfo *devinfo = w->devinfo;
+ uint32_t res;
+ int i;
+
+ if (w->enable == 0 || w->type !=
+ HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
+ return;
+
+ if (HDA_PARAM_PIN_CAP_PRESENCE_DETECT_CAP(w->wclass.pin.cap) == 0 ||
+ (HDA_CONFIG_DEFAULTCONF_MISC(w->wclass.pin.config) & 1) != 0)
+ return;
+
+ res = hda_command(devinfo->dev, HDA_CMD_GET_PIN_SENSE(0, w->nid));
+ if ((w->eld != 0) == ((res & HDA_CMD_GET_PIN_SENSE_ELD_VALID) != 0))
+ return;
+ if (w->eld != NULL) {
+ w->eld_len = 0;
+ free(w->eld, M_HDAA);
+ w->eld = NULL;
+ }
+ HDA_BOOTVERBOSE(
+ device_printf(devinfo->dev,
+ "Pin sense: nid=%d sence=0x%08x "
+ "(%sconnected, ELD %svalid)\n",
+ w->nid, res,
+ (res & HDA_CMD_GET_PIN_SENSE_PRESENCE_DETECT) ? "" : "dis",
+ (res & HDA_CMD_GET_PIN_SENSE_ELD_VALID) ? "" : "in");
+ );
+ if ((res & HDA_CMD_GET_PIN_SENSE_ELD_VALID) == 0)
+ return;
+
+ res = hda_command(devinfo->dev,
+ HDA_CMD_GET_HDMI_DIP_SIZE(0, w->nid, 0x08));
+ if (res == HDA_INVALID)
+ return;
+ w->eld_len = res & 0xff;
+ if (w->eld_len != 0)
+ w->eld = malloc(w->eld_len, M_HDAA, M_ZERO | M_NOWAIT);
+ if (w->eld == NULL) {
+ w->eld_len = 0;
+ return;
+ }
+
+ for (i = 0; i < w->eld_len; i++) {
+ res = hda_command(devinfo->dev,
+ HDA_CMD_GET_HDMI_ELDD(0, w->nid, i));
+ if (res & 0x80000000)
+ w->eld[i] = res & 0xff;
+ }
+ HDA_BOOTVERBOSE(
+ hdaa_eld_dump(w);
+ );
+}
+
+/*
+ * Pin sense initializer.
+ */
+static void
+hdaa_sense_init(struct hdaa_devinfo *devinfo)
+{
+ struct hdaa_audio_as *as;
+ struct hdaa_widget *w;
+ int i, poll = 0;
+
+ for (i = devinfo->startnode; i < devinfo->endnode; i++) {
+ w = hdaa_widget_get(devinfo, i);
+ if (w == NULL || w->enable == 0 || w->type !=
+ HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
+ continue;
+ if (HDA_PARAM_AUDIO_WIDGET_CAP_UNSOL_CAP(w->param.widget_cap) &&
+ w->unsol < 0) {
+ w->unsol = HDAC_UNSOL_ALLOC(
+ device_get_parent(devinfo->dev), devinfo->dev, w->nid);
+ hda_command(devinfo->dev,
+ HDA_CMD_SET_UNSOLICITED_RESPONSE(0, w->nid,
+ HDA_CMD_SET_UNSOLICITED_RESPONSE_ENABLE | w->unsol));
+ }
+ as = &devinfo->as[w->bindas];
+ if (as->hpredir >= 0 && as->pins[15] == w->nid) {
+ if (HDA_PARAM_PIN_CAP_PRESENCE_DETECT_CAP(w->wclass.pin.cap) == 0 ||
+ (HDA_CONFIG_DEFAULTCONF_MISC(w->wclass.pin.config) & 1) != 0) {
+ device_printf(devinfo->dev,
+ "No presence detection support at nid %d\n",
+ as[i].pins[15]);
+ } else {
+ if (w->unsol < 0)
+ poll = 1;
+ HDA_BOOTVERBOSE(
+ device_printf(devinfo->dev,
+ "Headphones redirection for "
+ "association %d nid=%d using %s.\n",
+ w->bindas, w->nid,
+ (poll != 0) ? "polling" :
+ "unsolicited responses");
+ );
+ };
+ }
+ hdaa_presence_handler(w);
+ if (!HDA_PARAM_PIN_CAP_DP(w->wclass.pin.cap) &&
+ !HDA_PARAM_PIN_CAP_HDMI(w->wclass.pin.cap))
+ continue;
+ hdaa_eld_handler(w);
+ }
+ if (poll) {
+ callout_reset(&devinfo->poll_jack, 1,
+ hdaa_jack_poll_callback, devinfo);
+ }
+}
+
+static void
+hdaa_sense_deinit(struct hdaa_devinfo *devinfo)
+{
+ struct hdaa_widget *w;
+ int i;
+
+ callout_stop(&devinfo->poll_jack);
+ for (i = devinfo->startnode; i < devinfo->endnode; i++) {
+ w = hdaa_widget_get(devinfo, i);
+ if (w == NULL || w->enable == 0 || w->type !=
+ HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
+ continue;
+ if (w->unsol < 0)
+ continue;
+ hda_command(devinfo->dev,
+ HDA_CMD_SET_UNSOLICITED_RESPONSE(0, w->nid, 0));
+ HDAC_UNSOL_FREE(
+ device_get_parent(devinfo->dev), devinfo->dev,
+ w->unsol);
+ w->unsol = -1;
+ }
+}
+
+uint32_t
+hdaa_widget_pin_patch(uint32_t config, const char *str)
+{
+ char buf[256];
+ char *key, *value, *rest, *bad;
+ int ival, i;
+
+ strlcpy(buf, str, sizeof(buf));
+ rest = buf;
+ while ((key = strsep(&rest, "=")) != NULL) {
+ value = strsep(&rest, " \t");
+ if (value == NULL)
+ break;
+ ival = strtol(value, &bad, 10);
+ if (strcmp(key, "seq") == 0) {
+ config &= ~HDA_CONFIG_DEFAULTCONF_SEQUENCE_MASK;
+ config |= ((ival << HDA_CONFIG_DEFAULTCONF_SEQUENCE_SHIFT) &
+ HDA_CONFIG_DEFAULTCONF_SEQUENCE_MASK);
+ } else if (strcmp(key, "as") == 0) {
+ config &= ~HDA_CONFIG_DEFAULTCONF_ASSOCIATION_MASK;
+ config |= ((ival << HDA_CONFIG_DEFAULTCONF_ASSOCIATION_SHIFT) &
+ HDA_CONFIG_DEFAULTCONF_ASSOCIATION_MASK);
+ } else if (strcmp(key, "misc") == 0) {
+ config &= ~HDA_CONFIG_DEFAULTCONF_MISC_MASK;
+ config |= ((ival << HDA_CONFIG_DEFAULTCONF_MISC_SHIFT) &
+ HDA_CONFIG_DEFAULTCONF_MISC_MASK);
+ } else if (strcmp(key, "color") == 0) {
+ config &= ~HDA_CONFIG_DEFAULTCONF_COLOR_MASK;
+ if (bad[0] == 0) {
+ config |= ((ival << HDA_CONFIG_DEFAULTCONF_COLOR_SHIFT) &
+ HDA_CONFIG_DEFAULTCONF_COLOR_MASK);
+ };
+ for (i = 0; i < 16; i++) {
+ if (strcasecmp(HDA_COLORS[i], value) == 0) {
+ config |= (i << HDA_CONFIG_DEFAULTCONF_COLOR_SHIFT);
+ break;
+ }
+ }
+ } else if (strcmp(key, "ctype") == 0) {
+ config &= ~HDA_CONFIG_DEFAULTCONF_CONNECTION_TYPE_MASK;
+ if (bad[0] == 0) {
+ config |= ((ival << HDA_CONFIG_DEFAULTCONF_CONNECTION_TYPE_SHIFT) &
+ HDA_CONFIG_DEFAULTCONF_CONNECTION_TYPE_MASK);
+ }
+ for (i = 0; i < 16; i++) {
+ if (strcasecmp(HDA_CONNECTORS[i], value) == 0) {
+ config |= (i << HDA_CONFIG_DEFAULTCONF_CONNECTION_TYPE_SHIFT);
+ break;
+ }
+ }
+ } else if (strcmp(key, "device") == 0) {
+ config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK;
+ if (bad[0] == 0) {
+ config |= ((ival << HDA_CONFIG_DEFAULTCONF_DEVICE_SHIFT) &
+ HDA_CONFIG_DEFAULTCONF_DEVICE_MASK);
+ continue;
+ };
+ for (i = 0; i < 16; i++) {
+ if (strcasecmp(HDA_DEVS[i], value) == 0) {
+ config |= (i << HDA_CONFIG_DEFAULTCONF_DEVICE_SHIFT);
+ break;
+ }
+ }
+ } else if (strcmp(key, "loc") == 0) {
+ config &= ~HDA_CONFIG_DEFAULTCONF_LOCATION_MASK;
+ if (bad[0] == 0) {
+ config |= ((ival << HDA_CONFIG_DEFAULTCONF_LOCATION_SHIFT) &
+ HDA_CONFIG_DEFAULTCONF_LOCATION_MASK);
+ continue;
+ }
+ for (i = 0; i < 64; i++) {
+ if (strcasecmp(HDA_LOCS[i], value) == 0) {
+ config |= (i << HDA_CONFIG_DEFAULTCONF_LOCATION_SHIFT);
+ break;
+ }
+ }
+ } else if (strcmp(key, "conn") == 0) {
+ config &= ~HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK;
+ if (bad[0] == 0) {
+ config |= ((ival << HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_SHIFT) &
+ HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK);
+ continue;
+ };
+ for (i = 0; i < 4; i++) {
+ if (strcasecmp(HDA_CONNS[i], value) == 0) {
+ config |= (i << HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_SHIFT);
+ break;
+ }
+ }
+ }
+ }
+ return (config);
+}
+
+uint32_t
+hdaa_gpio_patch(uint32_t gpio, const char *str)
+{
+ char buf[256];
+ char *key, *value, *rest;
+ int ikey, i;
+
+ strlcpy(buf, str, sizeof(buf));
+ rest = buf;
+ while ((key = strsep(&rest, "=")) != NULL) {
+ value = strsep(&rest, " \t");
+ if (value == NULL)
+ break;
+ ikey = strtol(key, NULL, 10);
+ if (ikey < 0 || ikey > 7)
+ continue;
+ for (i = 0; i < 7; i++) {
+ if (strcasecmp(HDA_GPIO_ACTIONS[i], value) == 0) {
+ gpio &= ~HDAA_GPIO_MASK(ikey);
+ gpio |= i << HDAA_GPIO_SHIFT(ikey);
+ break;
+ }
+ }
+ }
+ return (gpio);
+}
+
+static void
+hdaa_local_patch_pin(struct hdaa_widget *w)
+{
+ device_t dev = w->devinfo->dev;
+ const char *res = NULL;
+ uint32_t config, orig;
+ char buf[32];
+
+ config = orig = w->wclass.pin.config;
+ snprintf(buf, sizeof(buf), "cad%u.nid%u.config",
+ hda_get_codec_id(dev), w->nid);
+ if (resource_string_value(device_get_name(
+ device_get_parent(device_get_parent(dev))),
+ device_get_unit(device_get_parent(device_get_parent(dev))),
+ buf, &res) == 0) {
+ if (strncmp(res, "0x", 2) == 0) {
+ config = strtol(res + 2, NULL, 16);
+ } else {
+ config = hdaa_widget_pin_patch(config, res);
+ }
+ }
+ snprintf(buf, sizeof(buf), "nid%u.config", w->nid);
+ if (resource_string_value(device_get_name(dev), device_get_unit(dev),
+ buf, &res) == 0) {
+ if (strncmp(res, "0x", 2) == 0) {
+ config = strtol(res + 2, NULL, 16);
+ } else {
+ config = hdaa_widget_pin_patch(config, res);
+ }
+ }
+ HDA_BOOTVERBOSE(
+ if (config != orig)
+ device_printf(w->devinfo->dev,
+ "Patching pin config nid=%u 0x%08x -> 0x%08x\n",
+ w->nid, orig, config);
+ );
+ w->wclass.pin.newconf = w->wclass.pin.config = config;
+}
+
+static int
+hdaa_sysctl_config(SYSCTL_HANDLER_ARGS)
+{
+ char buf[256];
+ int error;
+ uint32_t conf;
+
+ conf = *(uint32_t *)oidp->oid_arg1;
+ snprintf(buf, sizeof(buf), "0x%08x as=%d seq=%d "
+ "device=%s conn=%s ctype=%s loc=%s color=%s misc=%d",
+ conf,
+ HDA_CONFIG_DEFAULTCONF_ASSOCIATION(conf),
+ HDA_CONFIG_DEFAULTCONF_SEQUENCE(conf),
+ HDA_DEVS[HDA_CONFIG_DEFAULTCONF_DEVICE(conf)],
+ HDA_CONNS[HDA_CONFIG_DEFAULTCONF_CONNECTIVITY(conf)],
+ HDA_CONNECTORS[HDA_CONFIG_DEFAULTCONF_CONNECTION_TYPE(conf)],
+ HDA_LOCS[HDA_CONFIG_DEFAULTCONF_LOCATION(conf)],
+ HDA_COLORS[HDA_CONFIG_DEFAULTCONF_COLOR(conf)],
+ HDA_CONFIG_DEFAULTCONF_MISC(conf));
+ error = sysctl_handle_string(oidp, buf, sizeof(buf), req);
+ if (error != 0 || req->newptr == NULL)
+ return (error);
+ if (strncmp(buf, "0x", 2) == 0)
+ conf = strtol(buf + 2, NULL, 16);
+ else
+ conf = hdaa_widget_pin_patch(conf, buf);
+ *(uint32_t *)oidp->oid_arg1 = conf;
+ return (0);
+}
+
+static void
+hdaa_config_fetch(const char *str, uint32_t *on, uint32_t *off)
+{
+ int i = 0, j, k, len, inv;
+
+ for (;;) {
+ while (str[i] != '\0' &&
+ (str[i] == ',' || isspace(str[i]) != 0))
+ i++;
+ if (str[i] == '\0')
+ return;
+ j = i;
+ while (str[j] != '\0' &&
+ !(str[j] == ',' || isspace(str[j]) != 0))
+ j++;
+ len = j - i;
+ if (len > 2 && strncmp(str + i, "no", 2) == 0)
+ inv = 2;
+ else
+ inv = 0;
+ for (k = 0; len > inv && k < HDAA_QUIRKS_TAB_LEN; k++) {
+ if (strncmp(str + i + inv,
+ hdaa_quirks_tab[k].key, len - inv) != 0)
+ continue;
+ if (len - inv != strlen(hdaa_quirks_tab[k].key))
+ continue;
+ if (inv == 0) {
+ *on |= hdaa_quirks_tab[k].value;
+ *off &= ~hdaa_quirks_tab[k].value;
+ } else {
+ *off |= hdaa_quirks_tab[k].value;
+ *on &= ~hdaa_quirks_tab[k].value;
+ }
+ break;
+ }
+ i = j;
+ }
+}
+
+static int
+hdaa_sysctl_quirks(SYSCTL_HANDLER_ARGS)
+{
+ char buf[256];
+ int error, n = 0, i;
+ uint32_t quirks, quirks_off;
+
+ quirks = *(uint32_t *)oidp->oid_arg1;
+ buf[0] = 0;
+ for (i = 0; i < HDAA_QUIRKS_TAB_LEN; i++) {
+ if ((quirks & hdaa_quirks_tab[i].value) != 0)
+ n += snprintf(buf + n, sizeof(buf) - n, "%s%s",
+ n != 0 ? "," : "", hdaa_quirks_tab[i].key);
+ }
+ error = sysctl_handle_string(oidp, buf, sizeof(buf), req);
+ if (error != 0 || req->newptr == NULL)
+ return (error);
+ if (strncmp(buf, "0x", 2) == 0)
+ quirks = strtol(buf + 2, NULL, 16);
+ else {
+ quirks = 0;
+ hdaa_config_fetch(buf, &quirks, &quirks_off);
+ }
+ *(uint32_t *)oidp->oid_arg1 = quirks;
+ return (0);
+}
+
+static void
+hdaa_local_patch(struct hdaa_devinfo *devinfo)
+{
+ struct hdaa_widget *w;
+ const char *res = NULL;
+ uint32_t quirks_on = 0, quirks_off = 0, x;
+ int i;
+
+ for (i = devinfo->startnode; i < devinfo->endnode; i++) {
+ w = hdaa_widget_get(devinfo, i);
+ if (w == NULL)
+ continue;
+ if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
+ hdaa_local_patch_pin(w);
+ }
+
+ if (resource_string_value(device_get_name(devinfo->dev),
+ device_get_unit(devinfo->dev), "config", &res) == 0) {
+ if (res != NULL && strlen(res) > 0)
+ hdaa_config_fetch(res, &quirks_on, &quirks_off);
+ devinfo->quirks |= quirks_on;
+ devinfo->quirks &= ~quirks_off;
+ }
+ if (devinfo->newquirks == -1)
+ devinfo->newquirks = devinfo->quirks;
+ else
+ devinfo->quirks = devinfo->newquirks;
+ HDA_BOOTHVERBOSE(
+ device_printf(devinfo->dev,
+ "Config options: 0x%08x\n", devinfo->quirks);
+ );
+
+ if (resource_string_value(device_get_name(devinfo->dev),
+ device_get_unit(devinfo->dev), "gpio_config", &res) == 0) {
+ if (strncmp(res, "0x", 2) == 0) {
+ devinfo->gpio = strtol(res + 2, NULL, 16);
+ } else {
+ devinfo->gpio = hdaa_gpio_patch(devinfo->gpio, res);
+ }
+ }
+ if (devinfo->newgpio == -1)
+ devinfo->newgpio = devinfo->gpio;
+ else
+ devinfo->gpio = devinfo->newgpio;
+ if (devinfo->newgpo == -1)
+ devinfo->newgpo = devinfo->gpo;
+ else
+ devinfo->gpo = devinfo->newgpo;
+ HDA_BOOTHVERBOSE(
+ device_printf(devinfo->dev, "GPIO config options:");
+ for (i = 0; i < 7; i++) {
+ x = (devinfo->gpio & HDAA_GPIO_MASK(i)) >> HDAA_GPIO_SHIFT(i);
+ if (x != 0)
+ printf(" %d=%s", i, HDA_GPIO_ACTIONS[x]);
+ }
+ printf("\n");
+ );
+}
+
+static void
+hdaa_widget_connection_parse(struct hdaa_widget *w)
+{
+ uint32_t res;
+ int i, j, max, ents, entnum;
+ nid_t nid = w->nid;
+ nid_t cnid, addcnid, prevcnid;
+
+ w->nconns = 0;
+
+ res = hda_command(w->devinfo->dev,
+ HDA_CMD_GET_PARAMETER(0, nid, HDA_PARAM_CONN_LIST_LENGTH));
+
+ ents = HDA_PARAM_CONN_LIST_LENGTH_LIST_LENGTH(res);
+
+ if (ents < 1)
+ return;
+
+ entnum = HDA_PARAM_CONN_LIST_LENGTH_LONG_FORM(res) ? 2 : 4;
+ max = (sizeof(w->conns) / sizeof(w->conns[0])) - 1;
+ prevcnid = 0;
+
+#define CONN_RMASK(e) (1 << ((32 / (e)) - 1))
+#define CONN_NMASK(e) (CONN_RMASK(e) - 1)
+#define CONN_RESVAL(r, e, n) ((r) >> ((32 / (e)) * (n)))
+#define CONN_RANGE(r, e, n) (CONN_RESVAL(r, e, n) & CONN_RMASK(e))
+#define CONN_CNID(r, e, n) (CONN_RESVAL(r, e, n) & CONN_NMASK(e))
+
+ for (i = 0; i < ents; i += entnum) {
+ res = hda_command(w->devinfo->dev,
+ HDA_CMD_GET_CONN_LIST_ENTRY(0, nid, i));
+ for (j = 0; j < entnum; j++) {
+ cnid = CONN_CNID(res, entnum, j);
+ if (cnid == 0) {
+ if (w->nconns < ents)
+ device_printf(w->devinfo->dev,
+ "WARNING: nid=%d has zero cnid "
+ "entnum=%d j=%d index=%d "
+ "entries=%d found=%d res=0x%08x\n",
+ nid, entnum, j, i,
+ ents, w->nconns, res);
+ else
+ goto getconns_out;
+ }
+ if (cnid < w->devinfo->startnode ||
+ cnid >= w->devinfo->endnode) {
+ HDA_BOOTVERBOSE(
+ device_printf(w->devinfo->dev,
+ "WARNING: nid=%d has cnid outside "
+ "of the AFG range j=%d "
+ "entnum=%d index=%d res=0x%08x\n",
+ nid, j, entnum, i, res);
+ );
+ }
+ if (CONN_RANGE(res, entnum, j) == 0)
+ addcnid = cnid;
+ else if (prevcnid == 0 || prevcnid >= cnid) {
+ device_printf(w->devinfo->dev,
+ "WARNING: Invalid child range "
+ "nid=%d index=%d j=%d entnum=%d "
+ "prevcnid=%d cnid=%d res=0x%08x\n",
+ nid, i, j, entnum, prevcnid,
+ cnid, res);
+ addcnid = cnid;
+ } else
+ addcnid = prevcnid + 1;
+ while (addcnid <= cnid) {
+ if (w->nconns > max) {
+ device_printf(w->devinfo->dev,
+ "Adding %d (nid=%d): "
+ "Max connection reached! max=%d\n",
+ addcnid, nid, max + 1);
+ goto getconns_out;
+ }
+ w->connsenable[w->nconns] = 1;
+ w->conns[w->nconns++] = addcnid++;
+ }
+ prevcnid = cnid;
+ }
+ }
+
+getconns_out:
+ return;
+}
+
+static void
+hdaa_widget_parse(struct hdaa_widget *w)
+{
+ device_t dev = w->devinfo->dev;
+ uint32_t wcap, cap;
+ nid_t nid = w->nid;
+ char buf[64];
+
+ w->param.widget_cap = wcap = hda_command(dev,
+ HDA_CMD_GET_PARAMETER(0, nid, HDA_PARAM_AUDIO_WIDGET_CAP));
+ w->type = HDA_PARAM_AUDIO_WIDGET_CAP_TYPE(wcap);
+
+ hdaa_widget_connection_parse(w);
+
+ if (HDA_PARAM_AUDIO_WIDGET_CAP_OUT_AMP(wcap)) {
+ if (HDA_PARAM_AUDIO_WIDGET_CAP_AMP_OVR(wcap))
+ w->param.outamp_cap =
+ hda_command(dev,
+ HDA_CMD_GET_PARAMETER(0, nid,
+ HDA_PARAM_OUTPUT_AMP_CAP));
+ else
+ w->param.outamp_cap =
+ w->devinfo->outamp_cap;
+ } else
+ w->param.outamp_cap = 0;
+
+ if (HDA_PARAM_AUDIO_WIDGET_CAP_IN_AMP(wcap)) {
+ if (HDA_PARAM_AUDIO_WIDGET_CAP_AMP_OVR(wcap))
+ w->param.inamp_cap =
+ hda_command(dev,
+ HDA_CMD_GET_PARAMETER(0, nid,
+ HDA_PARAM_INPUT_AMP_CAP));
+ else
+ w->param.inamp_cap =
+ w->devinfo->inamp_cap;
+ } else
+ w->param.inamp_cap = 0;
+
+ if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_OUTPUT ||
+ w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT) {
+ if (HDA_PARAM_AUDIO_WIDGET_CAP_FORMAT_OVR(wcap)) {
+ cap = hda_command(dev,
+ HDA_CMD_GET_PARAMETER(0, nid,
+ HDA_PARAM_SUPP_STREAM_FORMATS));
+ w->param.supp_stream_formats = (cap != 0) ? cap :
+ w->devinfo->supp_stream_formats;
+ cap = hda_command(dev,
+ HDA_CMD_GET_PARAMETER(0, nid,
+ HDA_PARAM_SUPP_PCM_SIZE_RATE));
+ w->param.supp_pcm_size_rate = (cap != 0) ? cap :
+ w->devinfo->supp_pcm_size_rate;
+ } else {
+ w->param.supp_stream_formats =
+ w->devinfo->supp_stream_formats;
+ w->param.supp_pcm_size_rate =
+ w->devinfo->supp_pcm_size_rate;
+ }
+ if (HDA_PARAM_AUDIO_WIDGET_CAP_STRIPE(w->param.widget_cap)) {
+ w->wclass.conv.stripecap = hda_command(dev,
+ HDA_CMD_GET_STRIPE_CONTROL(0, w->nid)) >> 20;
+ } else
+ w->wclass.conv.stripecap = 1;
+ } else {
+ w->param.supp_stream_formats = 0;
+ w->param.supp_pcm_size_rate = 0;
+ }
+
+ if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) {
+ w->wclass.pin.original = w->wclass.pin.newconf =
+ w->wclass.pin.config = hda_command(dev,
+ HDA_CMD_GET_CONFIGURATION_DEFAULT(0, w->nid));
+ w->wclass.pin.cap = hda_command(dev,
+ HDA_CMD_GET_PARAMETER(0, w->nid, HDA_PARAM_PIN_CAP));;
+ w->wclass.pin.ctrl = hda_command(dev,
+ HDA_CMD_GET_PIN_WIDGET_CTRL(0, nid));
+ if (HDA_PARAM_PIN_CAP_EAPD_CAP(w->wclass.pin.cap)) {
+ w->param.eapdbtl = hda_command(dev,
+ HDA_CMD_GET_EAPD_BTL_ENABLE(0, nid));
+ w->param.eapdbtl &= 0x7;
+ w->param.eapdbtl |= HDA_CMD_SET_EAPD_BTL_ENABLE_EAPD;
+ } else
+ w->param.eapdbtl = HDA_INVALID;
+
+ hdaa_unlock(w->devinfo);
+ snprintf(buf, sizeof(buf), "nid%d_config", w->nid);
+ SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
+ SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO,
+ buf, CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE,
+ &w->wclass.pin.newconf, sizeof(&w->wclass.pin.newconf),
+ hdaa_sysctl_config, "A", "Current pin configuration");
+ snprintf(buf, sizeof(buf), "nid%d_original", w->nid);
+ SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
+ SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO,
+ buf, CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE,
+ &w->wclass.pin.original, sizeof(&w->wclass.pin.original),
+ hdaa_sysctl_config, "A", "Original pin configuration");
+ hdaa_lock(w->devinfo);
+ }
+ w->unsol = -1;
+}
+
+static void
+hdaa_widget_postprocess(struct hdaa_widget *w)
+{
+ char *typestr;
+
+ w->type = HDA_PARAM_AUDIO_WIDGET_CAP_TYPE(w->param.widget_cap);
+ switch (w->type) {
+ case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_OUTPUT:
+ typestr = "audio output";
+ break;
+ case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT:
+ typestr = "audio input";
+ break;
+ case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER:
+ typestr = "audio mixer";
+ break;
+ case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_SELECTOR:
+ typestr = "audio selector";
+ break;
+ case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX:
+ typestr = "pin";
+ break;
+ case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_POWER_WIDGET:
+ typestr = "power widget";
+ break;
+ case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_VOLUME_WIDGET:
+ typestr = "volume widget";
+ break;
+ case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_BEEP_WIDGET:
+ typestr = "beep widget";
+ break;
+ case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_VENDOR_WIDGET:
+ typestr = "vendor widget";
+ break;
+ default:
+ typestr = "unknown type";
+ break;
+ }
+ strlcpy(w->name, typestr, sizeof(w->name));
+
+ if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) {
+ uint32_t config;
+ const char *devstr;
+ int conn, color;
+
+ config = w->wclass.pin.config;
+ devstr = HDA_DEVS[(config & HDA_CONFIG_DEFAULTCONF_DEVICE_MASK) >>
+ HDA_CONFIG_DEFAULTCONF_DEVICE_SHIFT];
+ conn = (config & HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK) >>
+ HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_SHIFT;
+ color = (config & HDA_CONFIG_DEFAULTCONF_COLOR_MASK) >>
+ HDA_CONFIG_DEFAULTCONF_COLOR_SHIFT;
+ strlcat(w->name, ": ", sizeof(w->name));
+ strlcat(w->name, devstr, sizeof(w->name));
+ strlcat(w->name, " (", sizeof(w->name));
+ if (conn == 0 && color != 0 && color != 15) {
+ strlcat(w->name, HDA_COLORS[color], sizeof(w->name));
+ strlcat(w->name, " ", sizeof(w->name));
+ }
+ strlcat(w->name, HDA_CONNS[conn], sizeof(w->name));
+ strlcat(w->name, ")", sizeof(w->name));
+
+ if (HDA_PARAM_PIN_CAP_PRESENCE_DETECT_CAP(w->wclass.pin.cap) == 0 ||
+ (HDA_CONFIG_DEFAULTCONF_MISC(w->wclass.pin.config) & 1) != 0)
+ w->wclass.pin.connected = 2;
+ }
+}
+
+struct hdaa_widget *
+hdaa_widget_get(struct hdaa_devinfo *devinfo, nid_t nid)
+{
+ if (devinfo == NULL || devinfo->widget == NULL ||
+ nid < devinfo->startnode || nid >= devinfo->endnode)
+ return (NULL);
+ return (&devinfo->widget[nid - devinfo->startnode]);
+}
+
+static void
+hdaa_audio_ctl_amp_set_internal(struct hdaa_devinfo *devinfo, nid_t nid,
+ int index, int lmute, int rmute,
+ int left, int right, int dir)
+{
+ uint16_t v = 0;
+
+ HDA_BOOTHVERBOSE(
+ device_printf(devinfo->dev,
+ "Setting amplifier nid=%d index=%d %s mute=%d/%d vol=%d/%d\n",
+ nid,index,dir ? "in" : "out",lmute,rmute,left,right);
+ );
+ if (left != right || lmute != rmute) {
+ v = (1 << (15 - dir)) | (1 << 13) | (index << 8) |
+ (lmute << 7) | left;
+ hda_command(devinfo->dev,
+ HDA_CMD_SET_AMP_GAIN_MUTE(0, nid, v));
+ v = (1 << (15 - dir)) | (1 << 12) | (index << 8) |
+ (rmute << 7) | right;
+ } else
+ v = (1 << (15 - dir)) | (3 << 12) | (index << 8) |
+ (lmute << 7) | left;
+
+ hda_command(devinfo->dev,
+ HDA_CMD_SET_AMP_GAIN_MUTE(0, nid, v));
+}
+
+static void
+hdaa_audio_ctl_amp_set(struct hdaa_audio_ctl *ctl, uint32_t mute,
+ int left, int right)
+{
+ nid_t nid;
+ int lmute, rmute;
+
+ nid = ctl->widget->nid;
+
+ /* Save new values if valid. */
+ if (mute != HDAA_AMP_MUTE_DEFAULT)
+ ctl->muted = mute;
+ if (left != HDAA_AMP_VOL_DEFAULT)
+ ctl->left = left;
+ if (right != HDAA_AMP_VOL_DEFAULT)
+ ctl->right = right;
+ /* Prepare effective values */
+ if (ctl->forcemute) {
+ lmute = 1;
+ rmute = 1;
+ left = 0;
+ right = 0;
+ } else {
+ lmute = HDAA_AMP_LEFT_MUTED(ctl->muted);
+ rmute = HDAA_AMP_RIGHT_MUTED(ctl->muted);
+ left = ctl->left;
+ right = ctl->right;
+ }
+ /* Apply effective values */
+ if (ctl->dir & HDAA_CTL_OUT)
+ hdaa_audio_ctl_amp_set_internal(ctl->widget->devinfo, nid, ctl->index,
+ lmute, rmute, left, right, 0);
+ if (ctl->dir & HDAA_CTL_IN)
+ hdaa_audio_ctl_amp_set_internal(ctl->widget->devinfo, nid, ctl->index,
+ lmute, rmute, left, right, 1);
+}
+
+static void
+hdaa_widget_connection_select(struct hdaa_widget *w, uint8_t index)
+{
+ if (w == NULL || w->nconns < 1 || index > (w->nconns - 1))
+ return;
+ HDA_BOOTHVERBOSE(
+ device_printf(w->devinfo->dev,
+ "Setting selector nid=%d index=%d\n", w->nid, index);
+ );
+ hda_command(w->devinfo->dev,
+ HDA_CMD_SET_CONNECTION_SELECT_CONTROL(0, w->nid, index));
+ w->selconn = index;
+}
+
+/****************************************************************************
+ * Device Methods
+ ****************************************************************************/
+
+static void *
+hdaa_channel_init(kobj_t obj, void *data, struct snd_dbuf *b,
+ struct pcm_channel *c, int dir)
+{
+ struct hdaa_chan *ch = data;
+ struct hdaa_pcm_devinfo *pdevinfo = ch->pdevinfo;
+ struct hdaa_devinfo *devinfo = pdevinfo->devinfo;
+
+ hdaa_lock(devinfo);
+ if (devinfo->quirks & HDAA_QUIRK_FIXEDRATE) {
+ ch->caps.minspeed = ch->caps.maxspeed = 48000;
+ ch->pcmrates[0] = 48000;
+ ch->pcmrates[1] = 0;
+ }
+ ch->dir = dir;
+ ch->b = b;
+ ch->c = c;
+ ch->blksz = pdevinfo->chan_size / pdevinfo->chan_blkcnt;
+ ch->blkcnt = pdevinfo->chan_blkcnt;
+ hdaa_unlock(devinfo);
+
+ if (sndbuf_alloc(ch->b, bus_get_dma_tag(devinfo->dev),
+ hda_get_dma_nocache(devinfo->dev) ? BUS_DMA_NOCACHE : 0,
+ pdevinfo->chan_size) != 0)
+ return (NULL);
+
+ return (ch);
+}
+
+static int
+hdaa_channel_setformat(kobj_t obj, void *data, uint32_t format)
+{
+ struct hdaa_chan *ch = data;
+ int i;
+
+ for (i = 0; ch->caps.fmtlist[i] != 0; i++) {
+ if (format == ch->caps.fmtlist[i]) {
+ ch->fmt = format;
+ return (0);
+ }
+ }
+
+ return (EINVAL);
+}
+
+static uint32_t
+hdaa_channel_setspeed(kobj_t obj, void *data, uint32_t speed)
+{
+ struct hdaa_chan *ch = data;
+ uint32_t spd = 0, threshold;
+ int i;
+
+ /* First look for equal or multiple frequency. */
+ for (i = 0; ch->pcmrates[i] != 0; i++) {
+ spd = ch->pcmrates[i];
+ if (speed != 0 && spd / speed * speed == spd) {
+ ch->spd = spd;
+ return (spd);
+ }
+ }
+ /* If no match, just find nearest. */
+ for (i = 0; ch->pcmrates[i] != 0; i++) {
+ spd = ch->pcmrates[i];
+ threshold = spd + ((ch->pcmrates[i + 1] != 0) ?
+ ((ch->pcmrates[i + 1] - spd) >> 1) : 0);
+ if (speed < threshold)
+ break;
+ }
+ ch->spd = spd;
+ return (spd);
+}
+
+static uint16_t
+hdaa_stream_format(struct hdaa_chan *ch)
+{
+ int i;
+ uint16_t fmt;
+
+ fmt = 0;
+ if (ch->fmt & AFMT_S16_LE)
+ fmt |= ch->bit16 << 4;
+ else if (ch->fmt & AFMT_S32_LE)
+ fmt |= ch->bit32 << 4;
+ else
+ fmt |= 1 << 4;
+ for (i = 0; i < HDA_RATE_TAB_LEN; i++) {
+ if (hda_rate_tab[i].valid && ch->spd == hda_rate_tab[i].rate) {
+ fmt |= hda_rate_tab[i].base;
+ fmt |= hda_rate_tab[i].mul;
+ fmt |= hda_rate_tab[i].div;
+ break;
+ }
+ }
+ fmt |= (AFMT_CHANNEL(ch->fmt) - 1);
+
+ return (fmt);
+}
+
+static int
+hdaa_allowed_stripes(uint16_t fmt)
+{
+ static const int bits[8] = { 8, 16, 20, 24, 32, 32, 32, 32 };
+ int size;
+
+ size = bits[(fmt >> 4) & 0x03];
+ size *= (fmt & 0x0f) + 1;
+ size *= ((fmt >> 11) & 0x07) + 1;
+ return (0xffffffffU >> (32 - fls(size / 8)));
+}
+
+static void
+hdaa_audio_setup(struct hdaa_chan *ch)
+{
+ struct hdaa_audio_as *as = &ch->devinfo->as[ch->as];
+ struct hdaa_widget *w, *wp;
+ int i, j, k, chn, cchn, totalchn, totalextchn, c;
+ uint16_t fmt, dfmt;
+ /* Mapping channel pairs to codec pins/converters. */
+ const static uint16_t convmap[2][5] =
+ {{ 0x0010, 0x0001, 0x0201, 0x0231, 0x0231 }, /* 5.1 */
+ { 0x0010, 0x0001, 0x2001, 0x2031, 0x2431 }};/* 7.1 */
+ /* Mapping formats to HDMI channel allocations. */
+ const static uint8_t hdmica[2][8] =
+ {{ 0x02, 0x00, 0x04, 0x08, 0x0a, 0x0e, 0x12, 0x12 }, /* x.0 */
+ { 0x01, 0x03, 0x01, 0x03, 0x09, 0x0b, 0x0f, 0x13 }}; /* x.1 */
+ /* Mapping formats to HDMI channels order. */
+ const static uint32_t hdmich[2][8] =
+ {{ 0xFFFF0F00, 0xFFFFFF10, 0xFFF2FF10, 0xFF32FF10,
+ 0xFF324F10, 0xF5324F10, 0x54326F10, 0x54326F10 }, /* x.0 */
+ { 0xFFFFF000, 0xFFFF0100, 0xFFFFF210, 0xFFFF2310,
+ 0xFF32F410, 0xFF324510, 0xF6324510, 0x76325410 }}; /* x.1 */
+ int convmapid = -1;
+ nid_t nid;
+ uint8_t csum;
+
+ totalchn = AFMT_CHANNEL(ch->fmt);
+ totalextchn = AFMT_EXTCHANNEL(ch->fmt);
+ HDA_BOOTHVERBOSE(
+ device_printf(ch->pdevinfo->dev,
+ "PCMDIR_%s: Stream setup fmt=%08x (%d.%d) speed=%d\n",
+ (ch->dir == PCMDIR_PLAY) ? "PLAY" : "REC",
+ ch->fmt, totalchn - totalextchn, totalextchn, ch->spd);
+ );
+ fmt = hdaa_stream_format(ch);
+
+ /* Set channels to I/O converters mapping for known speaker setups. */
+ if ((as->pinset == 0x0007 || as->pinset == 0x0013)) /* Standard 5.1 */
+ convmapid = 0;
+ else if (as->pinset == 0x0017) /* Standard 7.1 */
+ convmapid = 1;
+
+ dfmt = HDA_CMD_SET_DIGITAL_CONV_FMT1_DIGEN;
+ if (ch->fmt & AFMT_AC3)
+ dfmt |= HDA_CMD_SET_DIGITAL_CONV_FMT1_NAUDIO;
+
+ chn = 0;
+ for (i = 0; ch->io[i] != -1; i++) {
+ w = hdaa_widget_get(ch->devinfo, ch->io[i]);
+ if (w == NULL)
+ continue;
+
+ /* If HP redirection is enabled, but failed to use same
+ DAC, make last DAC to duplicate first one. */
+ if (as->fakeredir && i == (as->pincnt - 1)) {
+ c = (ch->sid << 4);
+ } else {
+ /* Map channels to I/O converters, if set. */
+ if (convmapid >= 0)
+ chn = (((convmap[convmapid][totalchn / 2]
+ >> i * 4) & 0xf) - 1) * 2;
+ if (chn < 0 || chn >= totalchn) {
+ c = 0;
+ } else {
+ c = (ch->sid << 4) | chn;
+ }
+ }
+ hda_command(ch->devinfo->dev,
+ HDA_CMD_SET_CONV_FMT(0, ch->io[i], fmt));
+ if (HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL(w->param.widget_cap)) {
+ hda_command(ch->devinfo->dev,
+ HDA_CMD_SET_DIGITAL_CONV_FMT1(0, ch->io[i], dfmt));
+ }
+ hda_command(ch->devinfo->dev,
+ HDA_CMD_SET_CONV_STREAM_CHAN(0, ch->io[i], c));
+ if (HDA_PARAM_AUDIO_WIDGET_CAP_STRIPE(w->param.widget_cap)) {
+ hda_command(ch->devinfo->dev,
+ HDA_CMD_SET_STRIPE_CONTROL(0, w->nid, ch->stripectl));
+ }
+ cchn = HDA_PARAM_AUDIO_WIDGET_CAP_CC(w->param.widget_cap);
+ if (cchn > 1 && chn < totalchn) {
+ cchn = min(cchn, totalchn - chn - 1);
+ hda_command(ch->devinfo->dev,
+ HDA_CMD_SET_CONV_CHAN_COUNT(0, ch->io[i], cchn));
+ }
+ HDA_BOOTHVERBOSE(
+ device_printf(ch->pdevinfo->dev,
+ "PCMDIR_%s: Stream setup nid=%d: "
+ "fmt=0x%04x, dfmt=0x%04x, chan=0x%04x, "
+ "chan_count=0x%02x, stripe=%d\n",
+ (ch->dir == PCMDIR_PLAY) ? "PLAY" : "REC",
+ ch->io[i], fmt, dfmt, c, cchn, ch->stripectl);
+ );
+ for (j = 0; j < 16; j++) {
+ if (as->dacs[ch->asindex][j] != ch->io[i])
+ continue;
+ nid = as->pins[j];
+ wp = hdaa_widget_get(ch->devinfo, nid);
+ if (wp == NULL)
+ continue;
+ if (!HDA_PARAM_PIN_CAP_DP(wp->wclass.pin.cap) &&
+ !HDA_PARAM_PIN_CAP_HDMI(wp->wclass.pin.cap))
+ continue;
+
+ /* Set channel mapping. */
+ for (k = 0; k < 8; k++) {
+ hda_command(ch->devinfo->dev,
+ HDA_CMD_SET_HDMI_CHAN_SLOT(0, nid,
+ (((hdmich[totalextchn == 0 ? 0 : 1][totalchn - 1]
+ >> (k * 4)) & 0xf) << 4) | k));
+ }
+
+ /*
+ * Enable High Bit Rate (HBR) Encoded Packet Type
+ * (EPT), if supported and needed (8ch data).
+ */
+ if (HDA_PARAM_PIN_CAP_HDMI(wp->wclass.pin.cap) &&
+ HDA_PARAM_PIN_CAP_HBR(wp->wclass.pin.cap)) {
+ wp->wclass.pin.ctrl &=
+ ~HDA_CMD_SET_PIN_WIDGET_CTRL_VREF_ENABLE_MASK;
+ if ((ch->fmt & AFMT_AC3) && (cchn == 8))
+ wp->wclass.pin.ctrl |= 0x03;
+ hda_command(ch->devinfo->dev,
+ HDA_CMD_SET_PIN_WIDGET_CTRL(0, nid,
+ wp->wclass.pin.ctrl));
+ }
+
+ /* Stop audio infoframe transmission. */
+ hda_command(ch->devinfo->dev,
+ HDA_CMD_SET_HDMI_DIP_INDEX(0, nid, 0x00));
+ hda_command(ch->devinfo->dev,
+ HDA_CMD_SET_HDMI_DIP_XMIT(0, nid, 0x00));
+
+ /* Clear audio infoframe buffer. */
+ hda_command(ch->devinfo->dev,
+ HDA_CMD_SET_HDMI_DIP_INDEX(0, nid, 0x00));
+ for (k = 0; k < 32; k++)
+ hda_command(ch->devinfo->dev,
+ HDA_CMD_SET_HDMI_DIP_DATA(0, nid, 0x00));
+
+ /* Write HDMI/DisplayPort audio infoframe. */
+ hda_command(ch->devinfo->dev,
+ HDA_CMD_SET_HDMI_DIP_INDEX(0, nid, 0x00));
+ if (w->eld != NULL && w->eld_len >= 6 &&
+ ((w->eld[5] >> 2) & 0x3) == 1) { /* DisplayPort */
+ hda_command(ch->devinfo->dev,
+ HDA_CMD_SET_HDMI_DIP_DATA(0, nid, 0x84));
+ hda_command(ch->devinfo->dev,
+ HDA_CMD_SET_HDMI_DIP_DATA(0, nid, 0x1b));
+ hda_command(ch->devinfo->dev,
+ HDA_CMD_SET_HDMI_DIP_DATA(0, nid, 0x44));
+ } else { /* HDMI */
+ hda_command(ch->devinfo->dev,
+ HDA_CMD_SET_HDMI_DIP_DATA(0, nid, 0x84));
+ hda_command(ch->devinfo->dev,
+ HDA_CMD_SET_HDMI_DIP_DATA(0, nid, 0x01));
+ hda_command(ch->devinfo->dev,
+ HDA_CMD_SET_HDMI_DIP_DATA(0, nid, 0x0a));
+ csum = 0;
+ csum -= 0x84 + 0x01 + 0x0a + (totalchn - 1) +
+ hdmica[totalextchn == 0 ? 0 : 1][totalchn - 1];
+ hda_command(ch->devinfo->dev,
+ HDA_CMD_SET_HDMI_DIP_DATA(0, nid, csum));
+ }
+ hda_command(ch->devinfo->dev,
+ HDA_CMD_SET_HDMI_DIP_DATA(0, nid, totalchn - 1));
+ hda_command(ch->devinfo->dev,
+ HDA_CMD_SET_HDMI_DIP_DATA(0, nid, 0x00));
+ hda_command(ch->devinfo->dev,
+ HDA_CMD_SET_HDMI_DIP_DATA(0, nid, 0x00));
+ hda_command(ch->devinfo->dev,
+ HDA_CMD_SET_HDMI_DIP_DATA(0, nid,
+ hdmica[totalextchn == 0 ? 0 : 1][totalchn - 1]));
+
+ /* Start audio infoframe transmission. */
+ hda_command(ch->devinfo->dev,
+ HDA_CMD_SET_HDMI_DIP_INDEX(0, nid, 0x00));
+ hda_command(ch->devinfo->dev,
+ HDA_CMD_SET_HDMI_DIP_XMIT(0, nid, 0xc0));
+ }
+ chn += cchn + 1;
+ }
+}
+
+/*
+ * Greatest Common Divisor.
+ */
+static unsigned
+gcd(unsigned a, unsigned b)
+{
+ u_int c;
+
+ while (b != 0) {
+ c = a;
+ a = b;
+ b = (c % b);
+ }
+ return (a);
+}
+
+/*
+ * Least Common Multiple.
+ */
+static unsigned
+lcm(unsigned a, unsigned b)
+{
+
+ return ((a * b) / gcd(a, b));
+}
+
+static int
+hdaa_channel_setfragments(kobj_t obj, void *data,
+ uint32_t blksz, uint32_t blkcnt)
+{
+ struct hdaa_chan *ch = data;
+
+ blksz -= blksz % lcm(HDA_DMA_ALIGNMENT, sndbuf_getalign(ch->b));
+
+ if (blksz > (sndbuf_getmaxsize(ch->b) / HDA_BDL_MIN))
+ blksz = sndbuf_getmaxsize(ch->b) / HDA_BDL_MIN;
+ if (blksz < HDA_BLK_MIN)
+ blksz = HDA_BLK_MIN;
+ if (blkcnt > HDA_BDL_MAX)
+ blkcnt = HDA_BDL_MAX;
+ if (blkcnt < HDA_BDL_MIN)
+ blkcnt = HDA_BDL_MIN;
+
+ while ((blksz * blkcnt) > sndbuf_getmaxsize(ch->b)) {
+ if ((blkcnt >> 1) >= HDA_BDL_MIN)
+ blkcnt >>= 1;
+ else if ((blksz >> 1) >= HDA_BLK_MIN)
+ blksz >>= 1;
+ else
+ break;
+ }
+
+ if ((sndbuf_getblksz(ch->b) != blksz ||
+ sndbuf_getblkcnt(ch->b) != blkcnt) &&
+ sndbuf_resize(ch->b, blkcnt, blksz) != 0)
+ device_printf(ch->devinfo->dev, "%s: failed blksz=%u blkcnt=%u\n",
+ __func__, blksz, blkcnt);
+
+ ch->blksz = sndbuf_getblksz(ch->b);
+ ch->blkcnt = sndbuf_getblkcnt(ch->b);
+
+ return (0);
+}
+
+static uint32_t
+hdaa_channel_setblocksize(kobj_t obj, void *data, uint32_t blksz)
+{
+ struct hdaa_chan *ch = data;
+
+ hdaa_channel_setfragments(obj, data, blksz, ch->pdevinfo->chan_blkcnt);
+
+ return (ch->blksz);
+}
+
+static void
+hdaa_channel_stop(struct hdaa_chan *ch)
+{
+ struct hdaa_devinfo *devinfo = ch->devinfo;
+ struct hdaa_widget *w;
+ int i;
+
+ if ((ch->flags & HDAA_CHN_RUNNING) == 0)
+ return;
+ ch->flags &= ~HDAA_CHN_RUNNING;
+ HDAC_STREAM_STOP(device_get_parent(devinfo->dev), devinfo->dev,
+ ch->dir == PCMDIR_PLAY ? 1 : 0, ch->sid);
+ for (i = 0; ch->io[i] != -1; i++) {
+ w = hdaa_widget_get(ch->devinfo, ch->io[i]);
+ if (w == NULL)
+ continue;
+ if (HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL(w->param.widget_cap)) {
+ hda_command(devinfo->dev,
+ HDA_CMD_SET_DIGITAL_CONV_FMT1(0, ch->io[i], 0));
+ }
+ hda_command(devinfo->dev,
+ HDA_CMD_SET_CONV_STREAM_CHAN(0, ch->io[i],
+ 0));
+ }
+ HDAC_STREAM_FREE(device_get_parent(devinfo->dev), devinfo->dev,
+ ch->dir == PCMDIR_PLAY ? 1 : 0, ch->sid);
+}
+
+static int
+hdaa_channel_start(struct hdaa_chan *ch)
+{
+ struct hdaa_devinfo *devinfo = ch->devinfo;
+ uint32_t fmt;
+
+ fmt = hdaa_stream_format(ch);
+ ch->stripectl = fls(ch->stripecap & hdaa_allowed_stripes(fmt)) - 1;
+ ch->sid = HDAC_STREAM_ALLOC(device_get_parent(devinfo->dev), devinfo->dev,
+ ch->dir == PCMDIR_PLAY ? 1 : 0, fmt, ch->stripectl, &ch->dmapos);
+ if (ch->sid <= 0)
+ return (EBUSY);
+ hdaa_audio_setup(ch);
+ HDAC_STREAM_RESET(device_get_parent(devinfo->dev), devinfo->dev,
+ ch->dir == PCMDIR_PLAY ? 1 : 0, ch->sid);
+ HDAC_STREAM_START(device_get_parent(devinfo->dev), devinfo->dev,
+ ch->dir == PCMDIR_PLAY ? 1 : 0, ch->sid,
+ sndbuf_getbufaddr(ch->b), ch->blksz, ch->blkcnt);
+ ch->flags |= HDAA_CHN_RUNNING;
+ return (0);
+}
+
+static int
+hdaa_channel_trigger(kobj_t obj, void *data, int go)
+{
+ struct hdaa_chan *ch = data;
+ int error = 0;
+
+ if (!PCMTRIG_COMMON(go))
+ return (0);
+
+ hdaa_lock(ch->devinfo);
+ switch (go) {
+ case PCMTRIG_START:
+ error = hdaa_channel_start(ch);
+ break;
+ case PCMTRIG_STOP:
+ case PCMTRIG_ABORT:
+ hdaa_channel_stop(ch);
+ break;
+ default:
+ break;
+ }
+ hdaa_unlock(ch->devinfo);
+
+ return (error);
+}
+
+static uint32_t
+hdaa_channel_getptr(kobj_t obj, void *data)
+{
+ struct hdaa_chan *ch = data;
+ struct hdaa_devinfo *devinfo = ch->devinfo;
+ uint32_t ptr;
+
+ hdaa_lock(devinfo);
+ if (ch->dmapos != NULL) {
+ ptr = *(ch->dmapos);
+ } else {
+ ptr = HDAC_STREAM_GETPTR(
+ device_get_parent(devinfo->dev), devinfo->dev,
+ ch->dir == PCMDIR_PLAY ? 1 : 0, ch->sid);
+ }
+ hdaa_unlock(devinfo);
+
+ /*
+ * Round to available space and force 128 bytes aligment.
+ */
+ ptr %= ch->blksz * ch->blkcnt;
+ ptr &= HDA_BLK_ALIGN;
+
+ return (ptr);
+}
+
+static struct pcmchan_caps *
+hdaa_channel_getcaps(kobj_t obj, void *data)
+{
+ return (&((struct hdaa_chan *)data)->caps);
+}
+
+static kobj_method_t hdaa_channel_methods[] = {
+ KOBJMETHOD(channel_init, hdaa_channel_init),
+ KOBJMETHOD(channel_setformat, hdaa_channel_setformat),
+ KOBJMETHOD(channel_setspeed, hdaa_channel_setspeed),
+ KOBJMETHOD(channel_setblocksize, hdaa_channel_setblocksize),
+ KOBJMETHOD(channel_setfragments, hdaa_channel_setfragments),
+ KOBJMETHOD(channel_trigger, hdaa_channel_trigger),
+ KOBJMETHOD(channel_getptr, hdaa_channel_getptr),
+ KOBJMETHOD(channel_getcaps, hdaa_channel_getcaps),
+ KOBJMETHOD_END
+};
+CHANNEL_DECLARE(hdaa_channel);
+
+static int
+hdaa_audio_ctl_ossmixer_init(struct snd_mixer *m)
+{
+ struct hdaa_pcm_devinfo *pdevinfo = mix_getdevinfo(m);
+ struct hdaa_devinfo *devinfo = pdevinfo->devinfo;
+ struct hdaa_widget *w, *cw;
+ uint32_t mask, recmask;
+ int i, j;
+
+ hdaa_lock(devinfo);
+ pdevinfo->mixer = m;
+
+ /* Make sure that in case of soft volume it won't stay muted. */
+ for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) {
+ pdevinfo->left[i] = 100;
+ pdevinfo->right[i] = 100;
+ }
+
+ /* Declare volume controls assigned to this association. */
+ mask = pdevinfo->ossmask;
+ if (pdevinfo->playas >= 0) {
+ /* Declate EAPD as ogain control. */
+ for (i = devinfo->startnode; i < devinfo->endnode; i++) {
+ w = hdaa_widget_get(devinfo, i);
+ if (w == NULL || w->enable == 0)
+ continue;
+ if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX ||
+ w->param.eapdbtl == HDA_INVALID ||
+ w->bindas != pdevinfo->playas)
+ continue;
+ mask |= SOUND_MASK_OGAIN;
+ break;
+ }
+
+ /* Declare soft PCM volume if needed. */
+ if ((mask & SOUND_MASK_PCM) == 0 ||
+ (devinfo->quirks & HDAA_QUIRK_SOFTPCMVOL) ||
+ pdevinfo->minamp[SOUND_MIXER_PCM] ==
+ pdevinfo->maxamp[SOUND_MIXER_PCM]) {
+ mask |= SOUND_MASK_PCM;
+ pcm_setflags(pdevinfo->dev, pcm_getflags(pdevinfo->dev) | SD_F_SOFTPCMVOL);
+ HDA_BOOTHVERBOSE(
+ device_printf(pdevinfo->dev,
+ "Forcing Soft PCM volume\n");
+ );
+ }
+
+ /* Declare master volume if needed. */
+ if ((mask & SOUND_MASK_VOLUME) == 0) {
+ mask |= SOUND_MASK_VOLUME;
+ mix_setparentchild(m, SOUND_MIXER_VOLUME,
+ SOUND_MASK_PCM);
+ mix_setrealdev(m, SOUND_MIXER_VOLUME,
+ SOUND_MIXER_NONE);
+ HDA_BOOTHVERBOSE(
+ device_printf(pdevinfo->dev,
+ "Forcing master volume with PCM\n");
+ );
+ }
+ }
+
+ /* Declare record sources available to this association. */
+ recmask = 0;
+ if (pdevinfo->recas >= 0) {
+ for (i = 0; i < 16; i++) {
+ if (devinfo->as[pdevinfo->recas].dacs[0][i] < 0)
+ continue;
+ w = hdaa_widget_get(devinfo,
+ devinfo->as[pdevinfo->recas].dacs[0][i]);
+ if (w == NULL || w->enable == 0)
+ continue;
+ for (j = 0; j < w->nconns; j++) {
+ if (w->connsenable[j] == 0)
+ continue;
+ cw = hdaa_widget_get(devinfo, w->conns[j]);
+ if (cw == NULL || cw->enable == 0)
+ continue;
+ if (cw->bindas != pdevinfo->recas &&
+ cw->bindas != -2)
+ continue;
+ recmask |= cw->ossmask;
+ }
+ }
+ }
+
+ recmask &= (1 << SOUND_MIXER_NRDEVICES) - 1;
+ mask &= (1 << SOUND_MIXER_NRDEVICES) - 1;
+ pdevinfo->ossmask = mask;
+
+ mix_setrecdevs(m, recmask);
+ mix_setdevs(m, mask);
+
+ hdaa_unlock(devinfo);
+
+ return (0);
+}
+
+/*
+ * Update amplification per pdevinfo per ossdev, calculate summary coefficient
+ * and write it to codec, update *left and *right to reflect remaining error.
+ */
+static void
+hdaa_audio_ctl_dev_set(struct hdaa_audio_ctl *ctl, int ossdev,
+ int mute, int *left, int *right)
+{
+ int i, zleft, zright, sleft, sright, smute, lval, rval;
+
+ ctl->devleft[ossdev] = *left;
+ ctl->devright[ossdev] = *right;
+ ctl->devmute[ossdev] = mute;
+ smute = sleft = sright = zleft = zright = 0;
+ for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) {
+ sleft += ctl->devleft[i];
+ sright += ctl->devright[i];
+ smute |= ctl->devmute[i];
+ if (i == ossdev)
+ continue;
+ zleft += ctl->devleft[i];
+ zright += ctl->devright[i];
+ }
+ lval = QDB2VAL(ctl, sleft);
+ rval = QDB2VAL(ctl, sright);
+ hdaa_audio_ctl_amp_set(ctl, smute, lval, rval);
+ *left -= VAL2QDB(ctl, lval) - VAL2QDB(ctl, QDB2VAL(ctl, zleft));
+ *right -= VAL2QDB(ctl, rval) - VAL2QDB(ctl, QDB2VAL(ctl, zright));
+}
+
+/*
+ * Trace signal from source, setting volumes on the way.
+ */
+static void
+hdaa_audio_ctl_source_volume(struct hdaa_pcm_devinfo *pdevinfo,
+ int ossdev, nid_t nid, int index, int mute, int left, int right, int depth)
+{
+ struct hdaa_devinfo *devinfo = pdevinfo->devinfo;
+ struct hdaa_widget *w, *wc;
+ struct hdaa_audio_ctl *ctl;
+ int i, j, conns = 0;
+
+ if (depth > HDA_PARSE_MAXDEPTH)
+ return;
+
+ w = hdaa_widget_get(devinfo, nid);
+ if (w == NULL || w->enable == 0)
+ return;
+
+ /* Count number of active inputs. */
+ if (depth > 0) {
+ for (j = 0; j < w->nconns; j++) {
+ if (!w->connsenable[j])
+ continue;
+ conns++;
+ }
+ }
+
+ /* If this is not a first step - use input mixer.
+ Pins have common input ctl so care must be taken. */
+ if (depth > 0 && (conns == 1 ||
+ w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)) {
+ ctl = hdaa_audio_ctl_amp_get(devinfo, w->nid, HDAA_CTL_IN,
+ index, 1);
+ if (ctl)
+ hdaa_audio_ctl_dev_set(ctl, ossdev, mute, &left, &right);
+ }
+
+ /* If widget has own ossdev - not traverse it.
+ It will be traversed on it's own. */
+ if (w->ossdev >= 0 && depth > 0)
+ return;
+
+ /* We must not traverse pin */
+ if ((w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT ||
+ w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) &&
+ depth > 0)
+ return;
+
+ /*
+ * If signals mixed, we can't assign controls farther.
+ * Ignore this on depth zero. Caller must knows why.
+ */
+ if (conns > 1 &&
+ (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER ||
+ w->selconn != index))
+ return;
+
+ ctl = hdaa_audio_ctl_amp_get(devinfo, w->nid, HDAA_CTL_OUT, -1, 1);
+ if (ctl)
+ hdaa_audio_ctl_dev_set(ctl, ossdev, mute, &left, &right);
+
+ for (i = devinfo->startnode; i < devinfo->endnode; i++) {
+ wc = hdaa_widget_get(devinfo, i);
+ if (wc == NULL || wc->enable == 0)
+ continue;
+ for (j = 0; j < wc->nconns; j++) {
+ if (wc->connsenable[j] && wc->conns[j] == nid) {
+ hdaa_audio_ctl_source_volume(pdevinfo, ossdev,
+ wc->nid, j, mute, left, right, depth + 1);
+ }
+ }
+ }
+ return;
+}
+
+/*
+ * Trace signal from destination, setting volumes on the way.
+ */
+static void
+hdaa_audio_ctl_dest_volume(struct hdaa_pcm_devinfo *pdevinfo,
+ int ossdev, nid_t nid, int index, int mute, int left, int right, int depth)
+{
+ struct hdaa_devinfo *devinfo = pdevinfo->devinfo;
+ struct hdaa_audio_as *as = devinfo->as;
+ struct hdaa_widget *w, *wc;
+ struct hdaa_audio_ctl *ctl;
+ int i, j, consumers, cleft, cright;
+
+ if (depth > HDA_PARSE_MAXDEPTH)
+ return;
+
+ w = hdaa_widget_get(devinfo, nid);
+ if (w == NULL || w->enable == 0)
+ return;
+
+ if (depth > 0) {
+ /* If this node produce output for several consumers,
+ we can't touch it. */
+ consumers = 0;
+ for (i = devinfo->startnode; i < devinfo->endnode; i++) {
+ wc = hdaa_widget_get(devinfo, i);
+ if (wc == NULL || wc->enable == 0)
+ continue;
+ for (j = 0; j < wc->nconns; j++) {
+ if (wc->connsenable[j] && wc->conns[j] == nid)
+ consumers++;
+ }
+ }
+ /* The only exception is if real HP redirection is configured
+ and this is a duplication point.
+ XXX: Actually exception is not completely correct.
+ XXX: Duplication point check is not perfect. */
+ if ((consumers == 2 && (w->bindas < 0 ||
+ as[w->bindas].hpredir < 0 || as[w->bindas].fakeredir ||
+ (w->bindseqmask & (1 << 15)) == 0)) ||
+ consumers > 2)
+ return;
+
+ /* Else use it's output mixer. */
+ ctl = hdaa_audio_ctl_amp_get(devinfo, w->nid,
+ HDAA_CTL_OUT, -1, 1);
+ if (ctl)
+ hdaa_audio_ctl_dev_set(ctl, ossdev, mute, &left, &right);
+ }
+
+ /* We must not traverse pin */
+ if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX &&
+ depth > 0)
+ return;
+
+ for (i = 0; i < w->nconns; i++) {
+ if (w->connsenable[i] == 0)
+ continue;
+ if (index >= 0 && i != index)
+ continue;
+ cleft = left;
+ cright = right;
+ ctl = hdaa_audio_ctl_amp_get(devinfo, w->nid,
+ HDAA_CTL_IN, i, 1);
+ if (ctl)
+ hdaa_audio_ctl_dev_set(ctl, ossdev, mute, &cleft, &cright);
+ hdaa_audio_ctl_dest_volume(pdevinfo, ossdev, w->conns[i], -1,
+ mute, cleft, cright, depth + 1);
+ }
+}
+
+/*
+ * Set volumes for the specified pdevinfo and ossdev.
+ */
+static void
+hdaa_audio_ctl_dev_volume(struct hdaa_pcm_devinfo *pdevinfo, unsigned dev)
+{
+ struct hdaa_devinfo *devinfo = pdevinfo->devinfo;
+ struct hdaa_widget *w, *cw;
+ uint32_t mute;
+ int lvol, rvol;
+ int i, j;
+
+ mute = 0;
+ if (pdevinfo->left[dev] == 0) {
+ mute |= HDAA_AMP_MUTE_LEFT;
+ lvol = -4000;
+ } else
+ lvol = ((pdevinfo->maxamp[dev] - pdevinfo->minamp[dev]) *
+ pdevinfo->left[dev] + 50) / 100 + pdevinfo->minamp[dev];
+ if (pdevinfo->right[dev] == 0) {
+ mute |= HDAA_AMP_MUTE_RIGHT;
+ rvol = -4000;
+ } else
+ rvol = ((pdevinfo->maxamp[dev] - pdevinfo->minamp[dev]) *
+ pdevinfo->right[dev] + 50) / 100 + pdevinfo->minamp[dev];
+ for (i = devinfo->startnode; i < devinfo->endnode; i++) {
+ w = hdaa_widget_get(devinfo, i);
+ if (w == NULL || w->enable == 0)
+ continue;
+ if (w->bindas < 0 && pdevinfo->index != 0)
+ continue;
+ if (w->bindas != pdevinfo->playas &&
+ w->bindas != pdevinfo->recas)
+ continue;
+ if (dev == SOUND_MIXER_RECLEV &&
+ w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT) {
+ hdaa_audio_ctl_dest_volume(pdevinfo, dev,
+ w->nid, -1, mute, lvol, rvol, 0);
+ continue;
+ }
+ if (dev == SOUND_MIXER_VOLUME &&
+ w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX &&
+ devinfo->as[w->bindas].dir == HDAA_CTL_OUT) {
+ hdaa_audio_ctl_dest_volume(pdevinfo, dev,
+ w->nid, -1, mute, lvol, rvol, 0);
+ continue;
+ }
+ if (dev == SOUND_MIXER_IGAIN &&
+ w->pflags & HDAA_ADC_MONITOR) {
+ for (j = 0; j < w->nconns; j++) {
+ if (!w->connsenable[j])
+ continue;
+ cw = hdaa_widget_get(devinfo, w->conns[j]);
+ if (cw == NULL || cw->enable == 0)
+ continue;
+ if (cw->bindas == -1)
+ continue;
+ if (cw->bindas >= 0 &&
+ devinfo->as[cw->bindas].dir != HDAA_CTL_IN)
+ continue;
+ hdaa_audio_ctl_dest_volume(pdevinfo, dev,
+ w->nid, j, mute, lvol, rvol, 0);
+ }
+ continue;
+ }
+ if (w->ossdev != dev)
+ continue;
+ hdaa_audio_ctl_source_volume(pdevinfo, dev,
+ w->nid, -1, mute, lvol, rvol, 0);
+ if (dev == SOUND_MIXER_IMIX && (w->pflags & HDAA_IMIX_AS_DST))
+ hdaa_audio_ctl_dest_volume(pdevinfo, dev,
+ w->nid, -1, mute, lvol, rvol, 0);
+ }
+}
+
+/*
+ * OSS Mixer set method.
+ */
+static int
+hdaa_audio_ctl_ossmixer_set(struct snd_mixer *m, unsigned dev,
+ unsigned left, unsigned right)
+{
+ struct hdaa_pcm_devinfo *pdevinfo = mix_getdevinfo(m);
+ struct hdaa_devinfo *devinfo = pdevinfo->devinfo;
+ struct hdaa_widget *w;
+ int i;
+
+ hdaa_lock(devinfo);
+
+ /* Save new values. */
+ pdevinfo->left[dev] = left;
+ pdevinfo->right[dev] = right;
+
+ /* 'ogain' is the special case implemented with EAPD. */
+ if (dev == SOUND_MIXER_OGAIN) {
+ uint32_t orig;
+ w = NULL;
+ for (i = devinfo->startnode; i < devinfo->endnode; i++) {
+ w = hdaa_widget_get(devinfo, i);
+ if (w == NULL || w->enable == 0)
+ continue;
+ if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX ||
+ w->param.eapdbtl == HDA_INVALID)
+ continue;
+ break;
+ }
+ if (i >= devinfo->endnode) {
+ hdaa_unlock(devinfo);
+ return (-1);
+ }
+ orig = w->param.eapdbtl;
+ if (left == 0)
+ w->param.eapdbtl &= ~HDA_CMD_SET_EAPD_BTL_ENABLE_EAPD;
+ else
+ w->param.eapdbtl |= HDA_CMD_SET_EAPD_BTL_ENABLE_EAPD;
+ if (orig != w->param.eapdbtl) {
+ uint32_t val;
+
+ val = w->param.eapdbtl;
+ if (devinfo->quirks & HDAA_QUIRK_EAPDINV)
+ val ^= HDA_CMD_SET_EAPD_BTL_ENABLE_EAPD;
+ hda_command(devinfo->dev,
+ HDA_CMD_SET_EAPD_BTL_ENABLE(0, w->nid, val));
+ }
+ hdaa_unlock(devinfo);
+ return (left | (left << 8));
+ }
+
+ /* Recalculate all controls related to this OSS device. */
+ hdaa_audio_ctl_dev_volume(pdevinfo, dev);
+
+ hdaa_unlock(devinfo);
+ return (left | (right << 8));
+}
+
+/*
+ * Set mixer settings to our own default values:
+ * +20dB for mics, -10dB for analog vol, mute for igain, 0dB for others.
+ */
+static void
+hdaa_audio_ctl_set_defaults(struct hdaa_pcm_devinfo *pdevinfo)
+{
+ int amp, vol, dev;
+
+ for (dev = 0; dev < SOUND_MIXER_NRDEVICES; dev++) {
+ if ((pdevinfo->ossmask & (1 << dev)) == 0)
+ continue;
+
+ /* If the value was overriden, leave it as is. */
+ if (resource_int_value(device_get_name(pdevinfo->dev),
+ device_get_unit(pdevinfo->dev), ossnames[dev], &vol) == 0)
+ continue;
+
+ vol = -1;
+ if (dev == SOUND_MIXER_OGAIN)
+ vol = 100;
+ else if (dev == SOUND_MIXER_IGAIN)
+ vol = 0;
+ else if (dev == SOUND_MIXER_MIC ||
+ dev == SOUND_MIXER_MONITOR)
+ amp = 20 * 4; /* +20dB */
+ else if (dev == SOUND_MIXER_VOLUME && !pdevinfo->digital)
+ amp = -10 * 4; /* -10dB */
+ else
+ amp = 0;
+ if (vol < 0 &&
+ (pdevinfo->maxamp[dev] - pdevinfo->minamp[dev]) <= 0) {
+ vol = 100;
+ } else if (vol < 0) {
+ vol = ((amp - pdevinfo->minamp[dev]) * 100 +
+ (pdevinfo->maxamp[dev] - pdevinfo->minamp[dev]) / 2) /
+ (pdevinfo->maxamp[dev] - pdevinfo->minamp[dev]);
+ vol = imin(imax(vol, 1), 100);
+ }
+ mix_set(pdevinfo->mixer, dev, vol, vol);
+ }
+}
+
+/*
+ * Recursively commutate specified record source.
+ */
+static uint32_t
+hdaa_audio_ctl_recsel_comm(struct hdaa_pcm_devinfo *pdevinfo, uint32_t src, nid_t nid, int depth)
+{
+ struct hdaa_devinfo *devinfo = pdevinfo->devinfo;
+ struct hdaa_widget *w, *cw;
+ struct hdaa_audio_ctl *ctl;
+ char buf[64];
+ int i, muted;
+ uint32_t res = 0;
+
+ if (depth > HDA_PARSE_MAXDEPTH)
+ return (0);
+
+ w = hdaa_widget_get(devinfo, nid);
+ if (w == NULL || w->enable == 0)
+ return (0);
+
+ for (i = 0; i < w->nconns; i++) {
+ if (w->connsenable[i] == 0)
+ continue;
+ cw = hdaa_widget_get(devinfo, w->conns[i]);
+ if (cw == NULL || cw->enable == 0 || cw->bindas == -1)
+ continue;
+ /* Call recursively to trace signal to it's source if needed. */
+ if ((src & cw->ossmask) != 0) {
+ if (cw->ossdev < 0) {
+ res |= hdaa_audio_ctl_recsel_comm(pdevinfo, src,
+ w->conns[i], depth + 1);
+ } else {
+ res |= cw->ossmask;
+ }
+ }
+ /* We have two special cases: mixers and others (selectors). */
+ if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER) {
+ ctl = hdaa_audio_ctl_amp_get(devinfo,
+ w->nid, HDAA_CTL_IN, i, 1);
+ if (ctl == NULL)
+ continue;
+ /* If we have input control on this node mute them
+ * according to requested sources. */
+ muted = (src & cw->ossmask) ? 0 : 1;
+ if (muted != ctl->forcemute) {
+ ctl->forcemute = muted;
+ hdaa_audio_ctl_amp_set(ctl,
+ HDAA_AMP_MUTE_DEFAULT,
+ HDAA_AMP_VOL_DEFAULT, HDAA_AMP_VOL_DEFAULT);
+ }
+ HDA_BOOTHVERBOSE(
+ device_printf(pdevinfo->dev,
+ "Recsel (%s): nid %d source %d %s\n",
+ hdaa_audio_ctl_ossmixer_mask2allname(
+ src, buf, sizeof(buf)),
+ nid, i, muted?"mute":"unmute");
+ );
+ } else {
+ if (w->nconns == 1)
+ break;
+ if ((src & cw->ossmask) == 0)
+ continue;
+ /* If we found requested source - select it and exit. */
+ hdaa_widget_connection_select(w, i);
+ HDA_BOOTHVERBOSE(
+ device_printf(pdevinfo->dev,
+ "Recsel (%s): nid %d source %d select\n",
+ hdaa_audio_ctl_ossmixer_mask2allname(
+ src, buf, sizeof(buf)),
+ nid, i);
+ );
+ break;
+ }
+ }
+ return (res);
+}
+
+static uint32_t
+hdaa_audio_ctl_ossmixer_setrecsrc(struct snd_mixer *m, uint32_t src)
+{
+ struct hdaa_pcm_devinfo *pdevinfo = mix_getdevinfo(m);
+ struct hdaa_devinfo *devinfo = pdevinfo->devinfo;
+ struct hdaa_widget *w;
+ struct hdaa_audio_as *as;
+ struct hdaa_audio_ctl *ctl;
+ struct hdaa_chan *ch;
+ int i, j;
+ uint32_t ret = 0xffffffff;
+
+ hdaa_lock(devinfo);
+ if (pdevinfo->recas < 0) {
+ hdaa_unlock(devinfo);
+ return (0);
+ }
+ as = &devinfo->as[pdevinfo->recas];
+
+ /* For non-mixed associations we always recording everything. */
+ if (!as->mixed) {
+ hdaa_unlock(devinfo);
+ return (mix_getrecdevs(m));
+ }
+
+ /* Commutate requested recsrc for each ADC. */
+ for (j = 0; j < as->num_chans; j++) {
+ ch = &devinfo->chans[as->chans[j]];
+ for (i = 0; ch->io[i] >= 0; i++) {
+ w = hdaa_widget_get(devinfo, ch->io[i]);
+ if (w == NULL || w->enable == 0)
+ continue;
+ ret &= hdaa_audio_ctl_recsel_comm(pdevinfo, src,
+ ch->io[i], 0);
+ }
+ }
+ if (ret == 0xffffffff)
+ ret = 0;
+
+ /*
+ * Some controls could be shared. Reset volumes for controls
+ * related to previously chosen devices, as they may no longer
+ * affect the signal.
+ */
+ i = 0;
+ while ((ctl = hdaa_audio_ctl_each(devinfo, &i)) != NULL) {
+ if (ctl->enable == 0 ||
+ !(ctl->ossmask & pdevinfo->recsrc))
+ continue;
+ if (!((pdevinfo->playas >= 0 &&
+ ctl->widget->bindas == pdevinfo->playas) ||
+ (pdevinfo->recas >= 0 &&
+ ctl->widget->bindas == pdevinfo->recas) ||
+ (pdevinfo->index == 0 &&
+ ctl->widget->bindas == -2)))
+ continue;
+ for (j = 0; j < SOUND_MIXER_NRDEVICES; j++) {
+ if (pdevinfo->recsrc & (1 << j)) {
+ ctl->devleft[j] = 0;
+ ctl->devright[j] = 0;
+ ctl->devmute[j] = 0;
+ }
+ }
+ }
+
+ /*
+ * Some controls could be shared. Set volumes for controls
+ * related to devices selected both previously and now.
+ */
+ for (j = 0; j < SOUND_MIXER_NRDEVICES; j++) {
+ if ((ret | pdevinfo->recsrc) & (1 << j))
+ hdaa_audio_ctl_dev_volume(pdevinfo, j);
+ }
+
+ pdevinfo->recsrc = ret;
+ hdaa_unlock(devinfo);
+ return (ret);
+}
+
+static kobj_method_t hdaa_audio_ctl_ossmixer_methods[] = {
+ KOBJMETHOD(mixer_init, hdaa_audio_ctl_ossmixer_init),
+ KOBJMETHOD(mixer_set, hdaa_audio_ctl_ossmixer_set),
+ KOBJMETHOD(mixer_setrecsrc, hdaa_audio_ctl_ossmixer_setrecsrc),
+ KOBJMETHOD_END
+};
+MIXER_DECLARE(hdaa_audio_ctl_ossmixer);
+
+static void
+hdaa_dump_gpi(struct hdaa_devinfo *devinfo)
+{
+ device_t dev = devinfo->dev;
+ int i;
+ uint32_t data, wake, unsol, sticky;
+
+ if (HDA_PARAM_GPIO_COUNT_NUM_GPI(devinfo->gpio_cap) > 0) {
+ data = hda_command(dev,
+ HDA_CMD_GET_GPI_DATA(0, devinfo->nid));
+ wake = hda_command(dev,
+ HDA_CMD_GET_GPI_WAKE_ENABLE_MASK(0, devinfo->nid));
+ unsol = hda_command(dev,
+ HDA_CMD_GET_GPI_UNSOLICITED_ENABLE_MASK(0, devinfo->nid));
+ sticky = hda_command(dev,
+ HDA_CMD_GET_GPI_STICKY_MASK(0, devinfo->nid));
+ for (i = 0; i < HDA_PARAM_GPIO_COUNT_NUM_GPI(devinfo->gpio_cap); i++) {
+ device_printf(dev, " GPI%d:%s%s%s state=%d", i,
+ (sticky & (1 << i)) ? " sticky" : "",
+ (unsol & (1 << i)) ? " unsol" : "",
+ (wake & (1 << i)) ? " wake" : "",
+ (data >> i) & 1);
+ }
+ }
+}
+
+static void
+hdaa_dump_gpio(struct hdaa_devinfo *devinfo)
+{
+ device_t dev = devinfo->dev;
+ int i;
+ uint32_t data, dir, enable, wake, unsol, sticky;
+
+ if (HDA_PARAM_GPIO_COUNT_NUM_GPIO(devinfo->gpio_cap) > 0) {
+ data = hda_command(dev,
+ HDA_CMD_GET_GPIO_DATA(0, devinfo->nid));
+ enable = hda_command(dev,
+ HDA_CMD_GET_GPIO_ENABLE_MASK(0, devinfo->nid));
+ dir = hda_command(dev,
+ HDA_CMD_GET_GPIO_DIRECTION(0, devinfo->nid));
+ wake = hda_command(dev,
+ HDA_CMD_GET_GPIO_WAKE_ENABLE_MASK(0, devinfo->nid));
+ unsol = hda_command(dev,
+ HDA_CMD_GET_GPIO_UNSOLICITED_ENABLE_MASK(0, devinfo->nid));
+ sticky = hda_command(dev,
+ HDA_CMD_GET_GPIO_STICKY_MASK(0, devinfo->nid));
+ for (i = 0; i < HDA_PARAM_GPIO_COUNT_NUM_GPIO(devinfo->gpio_cap); i++) {
+ device_printf(dev, " GPIO%d: ", i);
+ if ((enable & (1 << i)) == 0) {
+ printf("disabled\n");
+ continue;
+ }
+ if ((dir & (1 << i)) == 0) {
+ printf("input%s%s%s",
+ (sticky & (1 << i)) ? " sticky" : "",
+ (unsol & (1 << i)) ? " unsol" : "",
+ (wake & (1 << i)) ? " wake" : "");
+ } else
+ printf("output");
+ printf(" state=%d\n", (data >> i) & 1);
+ }
+ }
+}
+
+static void
+hdaa_dump_gpo(struct hdaa_devinfo *devinfo)
+{
+ device_t dev = devinfo->dev;
+ int i;
+ uint32_t data;
+
+ if (HDA_PARAM_GPIO_COUNT_NUM_GPO(devinfo->gpio_cap) > 0) {
+ data = hda_command(dev,
+ HDA_CMD_GET_GPO_DATA(0, devinfo->nid));
+ for (i = 0; i < HDA_PARAM_GPIO_COUNT_NUM_GPO(devinfo->gpio_cap); i++) {
+ device_printf(dev, " GPO%d: state=%d", i,
+ (data >> i) & 1);
+ }
+ }
+}
+
+static void
+hdaa_audio_parse(struct hdaa_devinfo *devinfo)
+{
+ struct hdaa_widget *w;
+ uint32_t res;
+ int i;
+ nid_t nid;
+
+ nid = devinfo->nid;
+
+ res = hda_command(devinfo->dev,
+ HDA_CMD_GET_PARAMETER(0, nid, HDA_PARAM_GPIO_COUNT));
+ devinfo->gpio_cap = res;
+
+ HDA_BOOTVERBOSE(
+ device_printf(devinfo->dev,
+ "NumGPIO=%d NumGPO=%d "
+ "NumGPI=%d GPIWake=%d GPIUnsol=%d\n",
+ HDA_PARAM_GPIO_COUNT_NUM_GPIO(devinfo->gpio_cap),
+ HDA_PARAM_GPIO_COUNT_NUM_GPO(devinfo->gpio_cap),
+ HDA_PARAM_GPIO_COUNT_NUM_GPI(devinfo->gpio_cap),
+ HDA_PARAM_GPIO_COUNT_GPI_WAKE(devinfo->gpio_cap),
+ HDA_PARAM_GPIO_COUNT_GPI_UNSOL(devinfo->gpio_cap));
+ hdaa_dump_gpi(devinfo);
+ hdaa_dump_gpio(devinfo);
+ hdaa_dump_gpo(devinfo);
+ );
+
+ res = hda_command(devinfo->dev,
+ HDA_CMD_GET_PARAMETER(0, nid, HDA_PARAM_SUPP_STREAM_FORMATS));
+ devinfo->supp_stream_formats = res;
+
+ res = hda_command(devinfo->dev,
+ HDA_CMD_GET_PARAMETER(0, nid, HDA_PARAM_SUPP_PCM_SIZE_RATE));
+ devinfo->supp_pcm_size_rate = res;
+
+ res = hda_command(devinfo->dev,
+ HDA_CMD_GET_PARAMETER(0, nid, HDA_PARAM_OUTPUT_AMP_CAP));
+ devinfo->outamp_cap = res;
+
+ res = hda_command(devinfo->dev,
+ HDA_CMD_GET_PARAMETER(0, nid, HDA_PARAM_INPUT_AMP_CAP));
+ devinfo->inamp_cap = res;
+
+ for (i = devinfo->startnode; i < devinfo->endnode; i++) {
+ w = hdaa_widget_get(devinfo, i);
+ if (w == NULL)
+ device_printf(devinfo->dev, "Ghost widget! nid=%d!\n", i);
+ else {
+ w->devinfo = devinfo;
+ w->nid = i;
+ w->enable = 1;
+ w->selconn = -1;
+ w->pflags = 0;
+ w->ossdev = -1;
+ w->bindas = -1;
+ w->param.eapdbtl = HDA_INVALID;
+ hdaa_widget_parse(w);
+ }
+ }
+}
+
+static void
+hdaa_audio_postprocess(struct hdaa_devinfo *devinfo)
+{
+ struct hdaa_widget *w;
+ int i;
+
+ for (i = devinfo->startnode; i < devinfo->endnode; i++) {
+ w = hdaa_widget_get(devinfo, i);
+ if (w == NULL)
+ continue;
+ hdaa_widget_postprocess(w);
+ }
+}
+
+static void
+hdaa_audio_ctl_parse(struct hdaa_devinfo *devinfo)
+{
+ struct hdaa_audio_ctl *ctls;
+ struct hdaa_widget *w, *cw;
+ int i, j, cnt, max, ocap, icap;
+ int mute, offset, step, size;
+
+ /* XXX This is redundant */
+ max = 0;
+ for (i = devinfo->startnode; i < devinfo->endnode; i++) {
+ w = hdaa_widget_get(devinfo, i);
+ if (w == NULL || w->enable == 0)
+ continue;
+ if (w->param.outamp_cap != 0)
+ max++;
+ if (w->param.inamp_cap != 0) {
+ switch (w->type) {
+ case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_SELECTOR:
+ case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER:
+ for (j = 0; j < w->nconns; j++) {
+ cw = hdaa_widget_get(devinfo,
+ w->conns[j]);
+ if (cw == NULL || cw->enable == 0)
+ continue;
+ max++;
+ }
+ break;
+ default:
+ max++;
+ break;
+ }
+ }
+ }
+ devinfo->ctlcnt = max;
+
+ if (max < 1)
+ return;
+
+ ctls = (struct hdaa_audio_ctl *)malloc(
+ sizeof(*ctls) * max, M_HDAA, M_ZERO | M_NOWAIT);
+
+ if (ctls == NULL) {
+ /* Blekh! */
+ device_printf(devinfo->dev, "unable to allocate ctls!\n");
+ devinfo->ctlcnt = 0;
+ return;
+ }
+
+ cnt = 0;
+ for (i = devinfo->startnode; cnt < max && i < devinfo->endnode; i++) {
+ if (cnt >= max) {
+ device_printf(devinfo->dev, "%s: Ctl overflow!\n",
+ __func__);
+ break;
+ }
+ w = hdaa_widget_get(devinfo, i);
+ if (w == NULL || w->enable == 0)
+ continue;
+ ocap = w->param.outamp_cap;
+ icap = w->param.inamp_cap;
+ if (ocap != 0) {
+ mute = HDA_PARAM_OUTPUT_AMP_CAP_MUTE_CAP(ocap);
+ step = HDA_PARAM_OUTPUT_AMP_CAP_NUMSTEPS(ocap);
+ size = HDA_PARAM_OUTPUT_AMP_CAP_STEPSIZE(ocap);
+ offset = HDA_PARAM_OUTPUT_AMP_CAP_OFFSET(ocap);
+ /*if (offset > step) {
+ HDA_BOOTVERBOSE(
+ device_printf(devinfo->dev,
+ "BUGGY outamp: nid=%d "
+ "[offset=%d > step=%d]\n",
+ w->nid, offset, step);
+ );
+ offset = step;
+ }*/
+ ctls[cnt].enable = 1;
+ ctls[cnt].widget = w;
+ ctls[cnt].mute = mute;
+ ctls[cnt].step = step;
+ ctls[cnt].size = size;
+ ctls[cnt].offset = offset;
+ ctls[cnt].left = offset;
+ ctls[cnt].right = offset;
+ if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX ||
+ w->waspin)
+ ctls[cnt].ndir = HDAA_CTL_IN;
+ else
+ ctls[cnt].ndir = HDAA_CTL_OUT;
+ ctls[cnt++].dir = HDAA_CTL_OUT;
+ }
+
+ if (icap != 0) {
+ mute = HDA_PARAM_OUTPUT_AMP_CAP_MUTE_CAP(icap);
+ step = HDA_PARAM_OUTPUT_AMP_CAP_NUMSTEPS(icap);
+ size = HDA_PARAM_OUTPUT_AMP_CAP_STEPSIZE(icap);
+ offset = HDA_PARAM_OUTPUT_AMP_CAP_OFFSET(icap);
+ /*if (offset > step) {
+ HDA_BOOTVERBOSE(
+ device_printf(devinfo->dev,
+ "BUGGY inamp: nid=%d "
+ "[offset=%d > step=%d]\n",
+ w->nid, offset, step);
+ );
+ offset = step;
+ }*/
+ switch (w->type) {
+ case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_SELECTOR:
+ case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER:
+ for (j = 0; j < w->nconns; j++) {
+ if (cnt >= max) {
+ device_printf(devinfo->dev,
+ "%s: Ctl overflow!\n",
+ __func__);
+ break;
+ }
+ cw = hdaa_widget_get(devinfo,
+ w->conns[j]);
+ if (cw == NULL || cw->enable == 0)
+ continue;
+ ctls[cnt].enable = 1;
+ ctls[cnt].widget = w;
+ ctls[cnt].childwidget = cw;
+ ctls[cnt].index = j;
+ ctls[cnt].mute = mute;
+ ctls[cnt].step = step;
+ ctls[cnt].size = size;
+ ctls[cnt].offset = offset;
+ ctls[cnt].left = offset;
+ ctls[cnt].right = offset;
+ ctls[cnt].ndir = HDAA_CTL_IN;
+ ctls[cnt++].dir = HDAA_CTL_IN;
+ }
+ break;
+ default:
+ if (cnt >= max) {
+ device_printf(devinfo->dev,
+ "%s: Ctl overflow!\n",
+ __func__);
+ break;
+ }
+ ctls[cnt].enable = 1;
+ ctls[cnt].widget = w;
+ ctls[cnt].mute = mute;
+ ctls[cnt].step = step;
+ ctls[cnt].size = size;
+ ctls[cnt].offset = offset;
+ ctls[cnt].left = offset;
+ ctls[cnt].right = offset;
+ if (w->type ==
+ HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
+ ctls[cnt].ndir = HDAA_CTL_OUT;
+ else
+ ctls[cnt].ndir = HDAA_CTL_IN;
+ ctls[cnt++].dir = HDAA_CTL_IN;
+ break;
+ }
+ }
+ }
+
+ devinfo->ctl = ctls;
+}
+
+static void
+hdaa_audio_as_parse(struct hdaa_devinfo *devinfo)
+{
+ struct hdaa_audio_as *as;
+ struct hdaa_widget *w;
+ int i, j, cnt, max, type, dir, assoc, seq, first, hpredir;
+
+ /* Count present associations */
+ max = 0;
+ for (j = 1; j < 16; j++) {
+ for (i = devinfo->startnode; i < devinfo->endnode; i++) {
+ w = hdaa_widget_get(devinfo, i);
+ if (w == NULL || w->enable == 0)
+ continue;
+ if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
+ continue;
+ if (HDA_CONFIG_DEFAULTCONF_ASSOCIATION(w->wclass.pin.config)
+ != j)
+ continue;
+ max++;
+ if (j != 15) /* There could be many 1-pin assocs #15 */
+ break;
+ }
+ }
+
+ devinfo->ascnt = max;
+
+ if (max < 1)
+ return;
+
+ as = (struct hdaa_audio_as *)malloc(
+ sizeof(*as) * max, M_HDAA, M_ZERO | M_NOWAIT);
+
+ if (as == NULL) {
+ /* Blekh! */
+ device_printf(devinfo->dev, "unable to allocate assocs!\n");
+ devinfo->ascnt = 0;
+ return;
+ }
+
+ for (i = 0; i < max; i++) {
+ as[i].hpredir = -1;
+ as[i].digital = 0;
+ as[i].num_chans = 1;
+ as[i].location = -1;
+ }
+
+ /* Scan associations skipping as=0. */
+ cnt = 0;
+ for (j = 1; j < 16; j++) {
+ first = 16;
+ hpredir = 0;
+ for (i = devinfo->startnode; i < devinfo->endnode; i++) {
+ w = hdaa_widget_get(devinfo, i);
+ if (w == NULL || w->enable == 0)
+ continue;
+ if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
+ continue;
+ assoc = HDA_CONFIG_DEFAULTCONF_ASSOCIATION(w->wclass.pin.config);
+ seq = HDA_CONFIG_DEFAULTCONF_SEQUENCE(w->wclass.pin.config);
+ if (assoc != j) {
+ continue;
+ }
+ KASSERT(cnt < max,
+ ("%s: Associations owerflow (%d of %d)",
+ __func__, cnt, max));
+ type = w->wclass.pin.config &
+ HDA_CONFIG_DEFAULTCONF_DEVICE_MASK;
+ /* Get pin direction. */
+ if (type == HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_OUT ||
+ type == HDA_CONFIG_DEFAULTCONF_DEVICE_SPEAKER ||
+ type == HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT ||
+ type == HDA_CONFIG_DEFAULTCONF_DEVICE_SPDIF_OUT ||
+ type == HDA_CONFIG_DEFAULTCONF_DEVICE_DIGITAL_OTHER_OUT)
+ dir = HDAA_CTL_OUT;
+ else
+ dir = HDAA_CTL_IN;
+ /* If this is a first pin - create new association. */
+ if (as[cnt].pincnt == 0) {
+ as[cnt].enable = 1;
+ as[cnt].index = j;
+ as[cnt].dir = dir;
+ }
+ if (seq < first)
+ first = seq;
+ /* Check association correctness. */
+ if (as[cnt].pins[seq] != 0) {
+ device_printf(devinfo->dev, "%s: Duplicate pin %d (%d) "
+ "in association %d! Disabling association.\n",
+ __func__, seq, w->nid, j);
+ as[cnt].enable = 0;
+ }
+ if (dir != as[cnt].dir) {
+ device_printf(devinfo->dev, "%s: Pin %d has wrong "
+ "direction for association %d! Disabling "
+ "association.\n",
+ __func__, w->nid, j);
+ as[cnt].enable = 0;
+ }
+ if (HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL(w->param.widget_cap)) {
+ as[cnt].digital |= 0x1;
+ if (HDA_PARAM_PIN_CAP_HDMI(w->wclass.pin.cap))
+ as[cnt].digital |= 0x2;
+ if (HDA_PARAM_PIN_CAP_DP(w->wclass.pin.cap))
+ as[cnt].digital |= 0x4;
+ }
+ if (as[cnt].location == -1) {
+ as[cnt].location =
+ HDA_CONFIG_DEFAULTCONF_LOCATION(w->wclass.pin.config);
+ } else if (as[cnt].location !=
+ HDA_CONFIG_DEFAULTCONF_LOCATION(w->wclass.pin.config)) {
+ as[cnt].location = -2;
+ }
+ /* Headphones with seq=15 may mean redirection. */
+ if (type == HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT &&
+ seq == 15)
+ hpredir = 1;
+ as[cnt].pins[seq] = w->nid;
+ as[cnt].pincnt++;
+ /* Association 15 is a multiple unassociated pins. */
+ if (j == 15)
+ cnt++;
+ }
+ if (j != 15 && as[cnt].pincnt > 0) {
+ if (hpredir && as[cnt].pincnt > 1)
+ as[cnt].hpredir = first;
+ cnt++;
+ }
+ }
+ for (i = 0; i < max; i++) {
+ if (as[i].dir == HDAA_CTL_IN && (as[i].pincnt == 1 ||
+ as[i].pins[14] > 0 || as[i].pins[15] > 0))
+ as[i].mixed = 1;
+ }
+ HDA_BOOTVERBOSE(
+ device_printf(devinfo->dev,
+ "%d associations found:\n", max);
+ for (i = 0; i < max; i++) {
+ device_printf(devinfo->dev,
+ "Association %d (%d) %s%s:\n",
+ i, as[i].index, (as[i].dir == HDAA_CTL_IN)?"in":"out",
+ as[i].enable?"":" (disabled)");
+ for (j = 0; j < 16; j++) {
+ if (as[i].pins[j] == 0)
+ continue;
+ device_printf(devinfo->dev,
+ " Pin nid=%d seq=%d\n",
+ as[i].pins[j], j);
+ }
+ }
+ );
+
+ devinfo->as = as;
+}
+
+/*
+ * Trace path from DAC to pin.
+ */
+static nid_t
+hdaa_audio_trace_dac(struct hdaa_devinfo *devinfo, int as, int seq, nid_t nid,
+ int dupseq, int min, int only, int depth)
+{
+ struct hdaa_widget *w;
+ int i, im = -1;
+ nid_t m = 0, ret;
+
+ if (depth > HDA_PARSE_MAXDEPTH)
+ return (0);
+ w = hdaa_widget_get(devinfo, nid);
+ if (w == NULL || w->enable == 0)
+ return (0);
+ HDA_BOOTHVERBOSE(
+ if (!only) {
+ device_printf(devinfo->dev,
+ " %*stracing via nid %d\n",
+ depth + 1, "", w->nid);
+ }
+ );
+ /* Use only unused widgets */
+ if (w->bindas >= 0 && w->bindas != as) {
+ HDA_BOOTHVERBOSE(
+ if (!only) {
+ device_printf(devinfo->dev,
+ " %*snid %d busy by association %d\n",
+ depth + 1, "", w->nid, w->bindas);
+ }
+ );
+ return (0);
+ }
+ if (dupseq < 0) {
+ if (w->bindseqmask != 0) {
+ HDA_BOOTHVERBOSE(
+ if (!only) {
+ device_printf(devinfo->dev,
+ " %*snid %d busy by seqmask %x\n",
+ depth + 1, "", w->nid, w->bindseqmask);
+ }
+ );
+ return (0);
+ }
+ } else {
+ /* If this is headphones - allow duplicate first pin. */
+ if (w->bindseqmask != 0 &&
+ (w->bindseqmask & (1 << dupseq)) == 0) {
+ HDA_BOOTHVERBOSE(
+ device_printf(devinfo->dev,
+ " %*snid %d busy by seqmask %x\n",
+ depth + 1, "", w->nid, w->bindseqmask);
+ );
+ return (0);
+ }
+ }
+
+ switch (w->type) {
+ case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT:
+ /* Do not traverse input. AD1988 has digital monitor
+ for which we are not ready. */
+ break;
+ case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_OUTPUT:
+ /* If we are tracing HP take only dac of first pin. */
+ if ((only == 0 || only == w->nid) &&
+ (w->nid >= min) && (dupseq < 0 || w->nid ==
+ devinfo->as[as].dacs[0][dupseq]))
+ m = w->nid;
+ break;
+ case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX:
+ if (depth > 0)
+ break;
+ /* Fall */
+ default:
+ /* Find reachable DACs with smallest nid respecting constraints. */
+ for (i = 0; i < w->nconns; i++) {
+ if (w->connsenable[i] == 0)
+ continue;
+ if (w->selconn != -1 && w->selconn != i)
+ continue;
+ if ((ret = hdaa_audio_trace_dac(devinfo, as, seq,
+ w->conns[i], dupseq, min, only, depth + 1)) != 0) {
+ if (m == 0 || ret < m) {
+ m = ret;
+ im = i;
+ }
+ if (only || dupseq >= 0)
+ break;
+ }
+ }
+ if (im >= 0 && only && ((w->nconns > 1 &&
+ w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER) ||
+ w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_SELECTOR))
+ w->selconn = im;
+ break;
+ }
+ if (m && only) {
+ w->bindas = as;
+ w->bindseqmask |= (1 << seq);
+ }
+ HDA_BOOTHVERBOSE(
+ if (!only) {
+ device_printf(devinfo->dev,
+ " %*snid %d returned %d\n",
+ depth + 1, "", w->nid, m);
+ }
+ );
+ return (m);
+}
+
+/*
+ * Trace path from widget to ADC.
+ */
+static nid_t
+hdaa_audio_trace_adc(struct hdaa_devinfo *devinfo, int as, int seq, nid_t nid,
+ int mixed, int min, int only, int depth, int *length, int onlylength)
+{
+ struct hdaa_widget *w, *wc;
+ int i, j, im, lm = HDA_PARSE_MAXDEPTH;
+ nid_t m = 0, ret;
+
+ if (depth > HDA_PARSE_MAXDEPTH)
+ return (0);
+ w = hdaa_widget_get(devinfo, nid);
+ if (w == NULL || w->enable == 0)
+ return (0);
+ HDA_BOOTHVERBOSE(
+ device_printf(devinfo->dev,
+ " %*stracing via nid %d\n",
+ depth + 1, "", w->nid);
+ );
+ /* Use only unused widgets */
+ if (w->bindas >= 0 && w->bindas != as) {
+ HDA_BOOTHVERBOSE(
+ device_printf(devinfo->dev,
+ " %*snid %d busy by association %d\n",
+ depth + 1, "", w->nid, w->bindas);
+ );
+ return (0);
+ }
+ if (!mixed && w->bindseqmask != 0) {
+ HDA_BOOTHVERBOSE(
+ device_printf(devinfo->dev,
+ " %*snid %d busy by seqmask %x\n",
+ depth + 1, "", w->nid, w->bindseqmask);
+ );
+ return (0);
+ }
+ switch (w->type) {
+ case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT:
+ if ((only == 0 || only == w->nid) && (w->nid >= min) &&
+ (onlylength == 0 || onlylength == depth)) {
+ m = w->nid;
+ if (length != NULL)
+ *length = depth;
+ }
+ break;
+ case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX:
+ if (depth > 0)
+ break;
+ /* Fall */
+ default:
+ /* Try to find reachable ADCs with specified nid. */
+ for (j = devinfo->startnode; j < devinfo->endnode; j++) {
+ wc = hdaa_widget_get(devinfo, j);
+ if (wc == NULL || wc->enable == 0)
+ continue;
+ im = -1;
+ for (i = 0; i < wc->nconns; i++) {
+ if (wc->connsenable[i] == 0)
+ continue;
+ if (wc->conns[i] != nid)
+ continue;
+ if ((ret = hdaa_audio_trace_adc(devinfo, as, seq,
+ j, mixed, min, only, depth + 1,
+ length, onlylength)) != 0) {
+ if (m == 0 || ret < m ||
+ (ret == m && length != NULL &&
+ *length < lm)) {
+ m = ret;
+ im = i;
+ lm = *length;
+ }
+ if (only)
+ break;
+ }
+ }
+ if (im >= 0 && only && ((wc->nconns > 1 &&
+ wc->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER) ||
+ wc->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_SELECTOR))
+ wc->selconn = im;
+ }
+ break;
+ }
+ if (m && only) {
+ w->bindas = as;
+ w->bindseqmask |= (1 << seq);
+ }
+ HDA_BOOTHVERBOSE(
+ device_printf(devinfo->dev,
+ " %*snid %d returned %d\n",
+ depth + 1, "", w->nid, m);
+ );
+ return (m);
+}
+
+/*
+ * Erase trace path of the specified association.
+ */
+static void
+hdaa_audio_undo_trace(struct hdaa_devinfo *devinfo, int as, int seq)
+{
+ struct hdaa_widget *w;
+ int i;
+
+ for (i = devinfo->startnode; i < devinfo->endnode; i++) {
+ w = hdaa_widget_get(devinfo, i);
+ if (w == NULL || w->enable == 0)
+ continue;
+ if (w->bindas == as) {
+ if (seq >= 0) {
+ w->bindseqmask &= ~(1 << seq);
+ if (w->bindseqmask == 0) {
+ w->bindas = -1;
+ w->selconn = -1;
+ }
+ } else {
+ w->bindas = -1;
+ w->bindseqmask = 0;
+ w->selconn = -1;
+ }
+ }
+ }
+}
+
+/*
+ * Trace association path from DAC to output
+ */
+static int
+hdaa_audio_trace_as_out(struct hdaa_devinfo *devinfo, int as, int seq)
+{
+ struct hdaa_audio_as *ases = devinfo->as;
+ int i, hpredir;
+ nid_t min, res;
+
+ /* Find next pin */
+ for (i = seq; i < 16 && ases[as].pins[i] == 0; i++)
+ ;
+ /* Check if there is no any left. If so - we succeeded. */
+ if (i == 16)
+ return (1);
+
+ hpredir = (i == 15 && ases[as].fakeredir == 0)?ases[as].hpredir:-1;
+ min = 0;
+ do {
+ HDA_BOOTHVERBOSE(
+ device_printf(devinfo->dev,
+ " Tracing pin %d with min nid %d",
+ ases[as].pins[i], min);
+ if (hpredir >= 0)
+ printf(" and hpredir %d", hpredir);
+ printf("\n");
+ );
+ /* Trace this pin taking min nid into account. */
+ res = hdaa_audio_trace_dac(devinfo, as, i,
+ ases[as].pins[i], hpredir, min, 0, 0);
+ if (res == 0) {
+ /* If we failed - return to previous and redo it. */
+ HDA_BOOTVERBOSE(
+ device_printf(devinfo->dev,
+ " Unable to trace pin %d seq %d with min "
+ "nid %d",
+ ases[as].pins[i], i, min);
+ if (hpredir >= 0)
+ printf(" and hpredir %d", hpredir);
+ printf("\n");
+ );
+ return (0);
+ }
+ HDA_BOOTVERBOSE(
+ device_printf(devinfo->dev,
+ " Pin %d traced to DAC %d",
+ ases[as].pins[i], res);
+ if (hpredir >= 0)
+ printf(" and hpredir %d", hpredir);
+ if (ases[as].fakeredir)
+ printf(" with fake redirection");
+ printf("\n");
+ );
+ /* Trace again to mark the path */
+ hdaa_audio_trace_dac(devinfo, as, i,
+ ases[as].pins[i], hpredir, min, res, 0);
+ ases[as].dacs[0][i] = res;
+ /* We succeeded, so call next. */
+ if (hdaa_audio_trace_as_out(devinfo, as, i + 1))
+ return (1);
+ /* If next failed, we should retry with next min */
+ hdaa_audio_undo_trace(devinfo, as, i);
+ ases[as].dacs[0][i] = 0;
+ min = res + 1;
+ } while (1);
+}
+
+/*
+ * Check equivalency of two DACs.
+ */
+static int
+hdaa_audio_dacs_equal(struct hdaa_widget *w1, struct hdaa_widget *w2)
+{
+ struct hdaa_devinfo *devinfo = w1->devinfo;
+ struct hdaa_widget *w3;
+ int i, j, c1, c2;
+
+ if (memcmp(&w1->param, &w2->param, sizeof(w1->param)))
+ return (0);
+ for (i = devinfo->startnode; i < devinfo->endnode; i++) {
+ w3 = hdaa_widget_get(devinfo, i);
+ if (w3 == NULL || w3->enable == 0)
+ continue;
+ if (w3->bindas != w1->bindas)
+ continue;
+ if (w3->nconns == 0)
+ continue;
+ c1 = c2 = -1;
+ for (j = 0; j < w3->nconns; j++) {
+ if (w3->connsenable[j] == 0)
+ continue;
+ if (w3->conns[j] == w1->nid)
+ c1 = j;
+ if (w3->conns[j] == w2->nid)
+ c2 = j;
+ }
+ if (c1 < 0)
+ continue;
+ if (c2 < 0)
+ return (0);
+ if (w3->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER)
+ return (0);
+ }
+ return (1);
+}
+
+/*
+ * Check equivalency of two ADCs.
+ */
+static int
+hdaa_audio_adcs_equal(struct hdaa_widget *w1, struct hdaa_widget *w2)
+{
+ struct hdaa_devinfo *devinfo = w1->devinfo;
+ struct hdaa_widget *w3, *w4;
+ int i;
+
+ if (memcmp(&w1->param, &w2->param, sizeof(w1->param)))
+ return (0);
+ if (w1->nconns != 1 || w2->nconns != 1)
+ return (0);
+ if (w1->conns[0] == w2->conns[0])
+ return (1);
+ w3 = hdaa_widget_get(devinfo, w1->conns[0]);
+ if (w3 == NULL || w3->enable == 0)
+ return (0);
+ w4 = hdaa_widget_get(devinfo, w2->conns[0]);
+ if (w4 == NULL || w4->enable == 0)
+ return (0);
+ if (w3->bindas == w4->bindas && w3->bindseqmask == w4->bindseqmask)
+ return (1);
+ if (w4->bindas >= 0)
+ return (0);
+ if (w3->type != w4->type)
+ return (0);
+ if (memcmp(&w3->param, &w4->param, sizeof(w3->param)))
+ return (0);
+ if (w3->nconns != w4->nconns)
+ return (0);
+ for (i = 0; i < w3->nconns; i++) {
+ if (w3->conns[i] != w4->conns[i])
+ return (0);
+ }
+ return (1);
+}
+
+/*
+ * Look for equivalent DAC/ADC to implement second channel.
+ */
+static void
+hdaa_audio_adddac(struct hdaa_devinfo *devinfo, int asid)
+{
+ struct hdaa_audio_as *as = &devinfo->as[asid];
+ struct hdaa_widget *w1, *w2;
+ int i, pos;
+ nid_t nid1, nid2;
+
+ HDA_BOOTVERBOSE(
+ device_printf(devinfo->dev,
+ "Looking for additional %sC "
+ "for association %d (%d)\n",
+ (as->dir == HDAA_CTL_OUT) ? "DA" : "AD",
+ asid, as->index);
+ );
+
+ /* Find the exisitng DAC position and return if found more the one. */
+ pos = -1;
+ for (i = 0; i < 16; i++) {
+ if (as->dacs[0][i] <= 0)
+ continue;
+ if (pos >= 0 && as->dacs[0][i] != as->dacs[0][pos])
+ return;
+ pos = i;
+ }
+
+ nid1 = as->dacs[0][pos];
+ w1 = hdaa_widget_get(devinfo, nid1);
+ w2 = NULL;
+ for (nid2 = devinfo->startnode; nid2 < devinfo->endnode; nid2++) {
+ w2 = hdaa_widget_get(devinfo, nid2);
+ if (w2 == NULL || w2->enable == 0)
+ continue;
+ if (w2->bindas >= 0)
+ continue;
+ if (w1->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_OUTPUT) {
+ if (w2->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_OUTPUT)
+ continue;
+ if (hdaa_audio_dacs_equal(w1, w2))
+ break;
+ } else {
+ if (w2->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT)
+ continue;
+ if (hdaa_audio_adcs_equal(w1, w2))
+ break;
+ }
+ }
+ if (nid2 >= devinfo->endnode)
+ return;
+ w2->bindas = w1->bindas;
+ w2->bindseqmask = w1->bindseqmask;
+ if (w1->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT) {
+ HDA_BOOTVERBOSE(
+ device_printf(devinfo->dev,
+ " ADC %d considered equal to ADC %d\n", nid2, nid1);
+ );
+ w1 = hdaa_widget_get(devinfo, w1->conns[0]);
+ w2 = hdaa_widget_get(devinfo, w2->conns[0]);
+ w2->bindas = w1->bindas;
+ w2->bindseqmask = w1->bindseqmask;
+ } else {
+ HDA_BOOTVERBOSE(
+ device_printf(devinfo->dev,
+ " DAC %d considered equal to DAC %d\n", nid2, nid1);
+ );
+ }
+ for (i = 0; i < 16; i++) {
+ if (as->dacs[0][i] <= 0)
+ continue;
+ as->dacs[as->num_chans][i] = nid2;
+ }
+ as->num_chans++;
+}
+
+/*
+ * Trace association path from input to ADC
+ */
+static int
+hdaa_audio_trace_as_in(struct hdaa_devinfo *devinfo, int as)
+{
+ struct hdaa_audio_as *ases = devinfo->as;
+ struct hdaa_widget *w;
+ int i, j, k, length;
+
+ for (j = devinfo->startnode; j < devinfo->endnode; j++) {
+ w = hdaa_widget_get(devinfo, j);
+ if (w == NULL || w->enable == 0)
+ continue;
+ if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT)
+ continue;
+ if (w->bindas >= 0 && w->bindas != as)
+ continue;
+
+ /* Find next pin */
+ for (i = 0; i < 16; i++) {
+ if (ases[as].pins[i] == 0)
+ continue;
+
+ HDA_BOOTHVERBOSE(
+ device_printf(devinfo->dev,
+ " Tracing pin %d to ADC %d\n",
+ ases[as].pins[i], j);
+ );
+ /* Trace this pin taking goal into account. */
+ if (hdaa_audio_trace_adc(devinfo, as, i,
+ ases[as].pins[i], 1, 0, j, 0, &length, 0) == 0) {
+ /* If we failed - return to previous and redo it. */
+ HDA_BOOTVERBOSE(
+ device_printf(devinfo->dev,
+ " Unable to trace pin %d to ADC %d, undo traces\n",
+ ases[as].pins[i], j);
+ );
+ hdaa_audio_undo_trace(devinfo, as, -1);
+ for (k = 0; k < 16; k++)
+ ases[as].dacs[0][k] = 0;
+ break;
+ }
+ HDA_BOOTVERBOSE(
+ device_printf(devinfo->dev,
+ " Pin %d traced to ADC %d\n",
+ ases[as].pins[i], j);
+ );
+ ases[as].dacs[0][i] = j;
+ }
+ if (i == 16)
+ return (1);
+ }
+ return (0);
+}
+
+/*
+ * Trace association path from input to multiple ADCs
+ */
+static int
+hdaa_audio_trace_as_in_mch(struct hdaa_devinfo *devinfo, int as, int seq)
+{
+ struct hdaa_audio_as *ases = devinfo->as;
+ int i, length;
+ nid_t min, res;
+
+ /* Find next pin */
+ for (i = seq; i < 16 && ases[as].pins[i] == 0; i++)
+ ;
+ /* Check if there is no any left. If so - we succeeded. */
+ if (i == 16)
+ return (1);
+
+ min = 0;
+ do {
+ HDA_BOOTHVERBOSE(
+ device_printf(devinfo->dev,
+ " Tracing pin %d with min nid %d",
+ ases[as].pins[i], min);
+ printf("\n");
+ );
+ /* Trace this pin taking min nid into account. */
+ res = hdaa_audio_trace_adc(devinfo, as, i,
+ ases[as].pins[i], 0, min, 0, 0, &length, 0);
+ if (res == 0) {
+ /* If we failed - return to previous and redo it. */
+ HDA_BOOTVERBOSE(
+ device_printf(devinfo->dev,
+ " Unable to trace pin %d seq %d with min "
+ "nid %d",
+ ases[as].pins[i], i, min);
+ printf("\n");
+ );
+ return (0);
+ }
+ HDA_BOOTVERBOSE(
+ device_printf(devinfo->dev,
+ " Pin %d traced to ADC %d\n",
+ ases[as].pins[i], res);
+ );
+ /* Trace again to mark the path */
+ hdaa_audio_trace_adc(devinfo, as, i,
+ ases[as].pins[i], 0, min, res, 0, &length, length);
+ ases[as].dacs[0][i] = res;
+ /* We succeeded, so call next. */
+ if (hdaa_audio_trace_as_in_mch(devinfo, as, i + 1))
+ return (1);
+ /* If next failed, we should retry with next min */
+ hdaa_audio_undo_trace(devinfo, as, i);
+ ases[as].dacs[0][i] = 0;
+ min = res + 1;
+ } while (1);
+}
+
+/*
+ * Trace input monitor path from mixer to output association.
+ */
+static int
+hdaa_audio_trace_to_out(struct hdaa_devinfo *devinfo, nid_t nid, int depth)
+{
+ struct hdaa_audio_as *ases = devinfo->as;
+ struct hdaa_widget *w, *wc;
+ int i, j;
+ nid_t res = 0;
+
+ if (depth > HDA_PARSE_MAXDEPTH)
+ return (0);
+ w = hdaa_widget_get(devinfo, nid);
+ if (w == NULL || w->enable == 0)
+ return (0);
+ HDA_BOOTHVERBOSE(
+ device_printf(devinfo->dev,
+ " %*stracing via nid %d\n",
+ depth + 1, "", w->nid);
+ );
+ /* Use only unused widgets */
+ if (depth > 0 && w->bindas != -1) {
+ if (w->bindas < 0 || ases[w->bindas].dir == HDAA_CTL_OUT) {
+ HDA_BOOTHVERBOSE(
+ device_printf(devinfo->dev,
+ " %*snid %d found output association %d\n",
+ depth + 1, "", w->nid, w->bindas);
+ );
+ if (w->bindas >= 0)
+ w->pflags |= HDAA_ADC_MONITOR;
+ return (1);
+ } else {
+ HDA_BOOTHVERBOSE(
+ device_printf(devinfo->dev,
+ " %*snid %d busy by input association %d\n",
+ depth + 1, "", w->nid, w->bindas);
+ );
+ return (0);
+ }
+ }
+
+ switch (w->type) {
+ case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT:
+ /* Do not traverse input. AD1988 has digital monitor
+ for which we are not ready. */
+ break;
+ case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX:
+ if (depth > 0)
+ break;
+ /* Fall */
+ default:
+ /* Try to find reachable ADCs with specified nid. */
+ for (j = devinfo->startnode; j < devinfo->endnode; j++) {
+ wc = hdaa_widget_get(devinfo, j);
+ if (wc == NULL || wc->enable == 0)
+ continue;
+ for (i = 0; i < wc->nconns; i++) {
+ if (wc->connsenable[i] == 0)
+ continue;
+ if (wc->conns[i] != nid)
+ continue;
+ if (hdaa_audio_trace_to_out(devinfo,
+ j, depth + 1) != 0) {
+ res = 1;
+ if (wc->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_SELECTOR &&
+ wc->selconn == -1)
+ wc->selconn = i;
+ }
+ }
+ }
+ break;
+ }
+ if (res && w->bindas == -1)
+ w->bindas = -2;
+
+ HDA_BOOTHVERBOSE(
+ device_printf(devinfo->dev,
+ " %*snid %d returned %d\n",
+ depth + 1, "", w->nid, res);
+ );
+ return (res);
+}
+
+/*
+ * Trace extra associations (beeper, monitor)
+ */
+static void
+hdaa_audio_trace_as_extra(struct hdaa_devinfo *devinfo)
+{
+ struct hdaa_audio_as *as = devinfo->as;
+ struct hdaa_widget *w;
+ int j;
+
+ /* Input monitor */
+ /* Find mixer associated with input, but supplying signal
+ for output associations. Hope it will be input monitor. */
+ HDA_BOOTVERBOSE(
+ device_printf(devinfo->dev,
+ "Tracing input monitor\n");
+ );
+ for (j = devinfo->startnode; j < devinfo->endnode; j++) {
+ w = hdaa_widget_get(devinfo, j);
+ if (w == NULL || w->enable == 0)
+ continue;
+ if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER)
+ continue;
+ if (w->bindas < 0 || as[w->bindas].dir != HDAA_CTL_IN)
+ continue;
+ HDA_BOOTVERBOSE(
+ device_printf(devinfo->dev,
+ " Tracing nid %d to out\n",
+ j);
+ );
+ if (hdaa_audio_trace_to_out(devinfo, w->nid, 0)) {
+ HDA_BOOTVERBOSE(
+ device_printf(devinfo->dev,
+ " nid %d is input monitor\n",
+ w->nid);
+ );
+ w->ossdev = SOUND_MIXER_IMIX;
+ }
+ }
+
+ /* Other inputs monitor */
+ /* Find input pins supplying signal for output associations.
+ Hope it will be input monitoring. */
+ HDA_BOOTVERBOSE(
+ device_printf(devinfo->dev,
+ "Tracing other input monitors\n");
+ );
+ for (j = devinfo->startnode; j < devinfo->endnode; j++) {
+ w = hdaa_widget_get(devinfo, j);
+ if (w == NULL || w->enable == 0)
+ continue;
+ if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
+ continue;
+ if (w->bindas < 0 || as[w->bindas].dir != HDAA_CTL_IN)
+ continue;
+ HDA_BOOTVERBOSE(
+ device_printf(devinfo->dev,
+ " Tracing nid %d to out\n",
+ j);
+ );
+ if (hdaa_audio_trace_to_out(devinfo, w->nid, 0)) {
+ HDA_BOOTVERBOSE(
+ device_printf(devinfo->dev,
+ " nid %d is input monitor\n",
+ w->nid);
+ );
+ }
+ }
+
+ /* Beeper */
+ HDA_BOOTVERBOSE(
+ device_printf(devinfo->dev,
+ "Tracing beeper\n");
+ );
+ for (j = devinfo->startnode; j < devinfo->endnode; j++) {
+ w = hdaa_widget_get(devinfo, j);
+ if (w == NULL || w->enable == 0)
+ continue;
+ if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_BEEP_WIDGET)
+ continue;
+ HDA_BOOTHVERBOSE(
+ device_printf(devinfo->dev,
+ " Tracing nid %d to out\n",
+ j);
+ );
+ if (hdaa_audio_trace_to_out(devinfo, w->nid, 0)) {
+ HDA_BOOTVERBOSE(
+ device_printf(devinfo->dev,
+ " nid %d traced to out\n",
+ j);
+ );
+ }
+ w->bindas = -2;
+ }
+}
+
+/*
+ * Bind assotiations to PCM channels
+ */
+static void
+hdaa_audio_bind_as(struct hdaa_devinfo *devinfo)
+{
+ struct hdaa_audio_as *as = devinfo->as;
+ int i, j, cnt = 0, free;
+
+ for (j = 0; j < devinfo->ascnt; j++) {
+ if (as[j].enable)
+ cnt += as[j].num_chans;
+ }
+ if (devinfo->num_chans == 0) {
+ devinfo->chans = (struct hdaa_chan *)malloc(
+ sizeof(struct hdaa_chan) * cnt,
+ M_HDAA, M_ZERO | M_NOWAIT);
+ if (devinfo->chans == NULL) {
+ device_printf(devinfo->dev,
+ "Channels memory allocation failed!\n");
+ return;
+ }
+ } else {
+ devinfo->chans = (struct hdaa_chan *)realloc(devinfo->chans,
+ sizeof(struct hdaa_chan) * (devinfo->num_chans + cnt),
+ M_HDAA, M_ZERO | M_NOWAIT);
+ if (devinfo->chans == NULL) {
+ devinfo->num_chans = 0;
+ device_printf(devinfo->dev,
+ "Channels memory allocation failed!\n");
+ return;
+ }
+ /* Fixup relative pointers after realloc */
+ for (j = 0; j < devinfo->num_chans; j++)
+ devinfo->chans[j].caps.fmtlist = devinfo->chans[j].fmtlist;
+ }
+ free = devinfo->num_chans;
+ devinfo->num_chans += cnt;
+
+ for (j = free; j < free + cnt; j++) {
+ devinfo->chans[j].devinfo = devinfo;
+ devinfo->chans[j].as = -1;
+ }
+
+ /* Assign associations in order of their numbers, */
+ for (j = 0; j < devinfo->ascnt; j++) {
+ if (as[j].enable == 0)
+ continue;
+ for (i = 0; i < as[j].num_chans; i++) {
+ devinfo->chans[free].as = j;
+ devinfo->chans[free].asindex = i;
+ devinfo->chans[free].dir =
+ (as[j].dir == HDAA_CTL_IN) ? PCMDIR_REC : PCMDIR_PLAY;
+ hdaa_pcmchannel_setup(&devinfo->chans[free]);
+ as[j].chans[i] = free;
+ free++;
+ }
+ }
+}
+
+static void
+hdaa_audio_disable_nonaudio(struct hdaa_devinfo *devinfo)
+{
+ struct hdaa_widget *w;
+ int i;
+
+ /* Disable power and volume widgets. */
+ for (i = devinfo->startnode; i < devinfo->endnode; i++) {
+ w = hdaa_widget_get(devinfo, i);
+ if (w == NULL || w->enable == 0)
+ continue;
+ if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_POWER_WIDGET ||
+ w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_VOLUME_WIDGET) {
+ w->enable = 0;
+ HDA_BOOTHVERBOSE(
+ device_printf(devinfo->dev,
+ " Disabling nid %d due to it's"
+ " non-audio type.\n",
+ w->nid);
+ );
+ }
+ }
+}
+
+static void
+hdaa_audio_disable_useless(struct hdaa_devinfo *devinfo)
+{
+ struct hdaa_widget *w, *cw;
+ struct hdaa_audio_ctl *ctl;
+ int done, found, i, j, k;
+
+ /* Disable useless pins. */
+ for (i = devinfo->startnode; i < devinfo->endnode; i++) {
+ w = hdaa_widget_get(devinfo, i);
+ if (w == NULL || w->enable == 0)
+ continue;
+ if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) {
+ if ((w->wclass.pin.config &
+ HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK) ==
+ HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_NONE) {
+ w->enable = 0;
+ HDA_BOOTHVERBOSE(
+ device_printf(devinfo->dev,
+ " Disabling pin nid %d due"
+ " to None connectivity.\n",
+ w->nid);
+ );
+ } else if ((w->wclass.pin.config &
+ HDA_CONFIG_DEFAULTCONF_ASSOCIATION_MASK) == 0) {
+ w->enable = 0;
+ HDA_BOOTHVERBOSE(
+ device_printf(devinfo->dev,
+ " Disabling unassociated"
+ " pin nid %d.\n",
+ w->nid);
+ );
+ }
+ }
+ }
+ do {
+ done = 1;
+ /* Disable and mute controls for disabled widgets. */
+ i = 0;
+ while ((ctl = hdaa_audio_ctl_each(devinfo, &i)) != NULL) {
+ if (ctl->enable == 0)
+ continue;
+ if (ctl->widget->enable == 0 ||
+ (ctl->childwidget != NULL &&
+ ctl->childwidget->enable == 0)) {
+ ctl->forcemute = 1;
+ ctl->muted = HDAA_AMP_MUTE_ALL;
+ ctl->left = 0;
+ ctl->right = 0;
+ ctl->enable = 0;
+ if (ctl->ndir == HDAA_CTL_IN)
+ ctl->widget->connsenable[ctl->index] = 0;
+ done = 0;
+ HDA_BOOTHVERBOSE(
+ device_printf(devinfo->dev,
+ " Disabling ctl %d nid %d cnid %d due"
+ " to disabled widget.\n", i,
+ ctl->widget->nid,
+ (ctl->childwidget != NULL)?
+ ctl->childwidget->nid:-1);
+ );
+ }
+ }
+ /* Disable useless widgets. */
+ for (i = devinfo->startnode; i < devinfo->endnode; i++) {
+ w = hdaa_widget_get(devinfo, i);
+ if (w == NULL || w->enable == 0)
+ continue;
+ /* Disable inputs with disabled child widgets. */
+ for (j = 0; j < w->nconns; j++) {
+ if (w->connsenable[j]) {
+ cw = hdaa_widget_get(devinfo, w->conns[j]);
+ if (cw == NULL || cw->enable == 0) {
+ w->connsenable[j] = 0;
+ HDA_BOOTHVERBOSE(
+ device_printf(devinfo->dev,
+ " Disabling nid %d connection %d due"
+ " to disabled child widget.\n",
+ i, j);
+ );
+ }
+ }
+ }
+ if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_SELECTOR &&
+ w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER)
+ continue;
+ /* Disable mixers and selectors without inputs. */
+ found = 0;
+ for (j = 0; j < w->nconns; j++) {
+ if (w->connsenable[j]) {
+ found = 1;
+ break;
+ }
+ }
+ if (found == 0) {
+ w->enable = 0;
+ done = 0;
+ HDA_BOOTHVERBOSE(
+ device_printf(devinfo->dev,
+ " Disabling nid %d due to all it's"
+ " inputs disabled.\n", w->nid);
+ );
+ }
+ /* Disable nodes without consumers. */
+ if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_SELECTOR &&
+ w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER)
+ continue;
+ found = 0;
+ for (k = devinfo->startnode; k < devinfo->endnode; k++) {
+ cw = hdaa_widget_get(devinfo, k);
+ if (cw == NULL || cw->enable == 0)
+ continue;
+ for (j = 0; j < cw->nconns; j++) {
+ if (cw->connsenable[j] && cw->conns[j] == i) {
+ found = 1;
+ break;
+ }
+ }
+ }
+ if (found == 0) {
+ w->enable = 0;
+ done = 0;
+ HDA_BOOTHVERBOSE(
+ device_printf(devinfo->dev,
+ " Disabling nid %d due to all it's"
+ " consumers disabled.\n", w->nid);
+ );
+ }
+ }
+ } while (done == 0);
+
+}
+
+static void
+hdaa_audio_disable_unas(struct hdaa_devinfo *devinfo)
+{
+ struct hdaa_audio_as *as = devinfo->as;
+ struct hdaa_widget *w, *cw;
+ struct hdaa_audio_ctl *ctl;
+ int i, j, k;
+
+ /* Disable unassosiated widgets. */
+ for (i = devinfo->startnode; i < devinfo->endnode; i++) {
+ w = hdaa_widget_get(devinfo, i);
+ if (w == NULL || w->enable == 0)
+ continue;
+ if (w->bindas == -1) {
+ w->enable = 0;
+ HDA_BOOTHVERBOSE(
+ device_printf(devinfo->dev,
+ " Disabling unassociated nid %d.\n",
+ w->nid);
+ );
+ }
+ }
+ /* Disable input connections on input pin and
+ * output on output. */
+ for (i = devinfo->startnode; i < devinfo->endnode; i++) {
+ w = hdaa_widget_get(devinfo, i);
+ if (w == NULL || w->enable == 0)
+ continue;
+ if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
+ continue;
+ if (w->bindas < 0)
+ continue;
+ if (as[w->bindas].dir == HDAA_CTL_IN) {
+ for (j = 0; j < w->nconns; j++) {
+ if (w->connsenable[j] == 0)
+ continue;
+ w->connsenable[j] = 0;
+ HDA_BOOTHVERBOSE(
+ device_printf(devinfo->dev,
+ " Disabling connection to input pin "
+ "nid %d conn %d.\n",
+ i, j);
+ );
+ }
+ ctl = hdaa_audio_ctl_amp_get(devinfo, w->nid,
+ HDAA_CTL_IN, -1, 1);
+ if (ctl && ctl->enable) {
+ ctl->forcemute = 1;
+ ctl->muted = HDAA_AMP_MUTE_ALL;
+ ctl->left = 0;
+ ctl->right = 0;
+ ctl->enable = 0;
+ }
+ } else {
+ ctl = hdaa_audio_ctl_amp_get(devinfo, w->nid,
+ HDAA_CTL_OUT, -1, 1);
+ if (ctl && ctl->enable) {
+ ctl->forcemute = 1;
+ ctl->muted = HDAA_AMP_MUTE_ALL;
+ ctl->left = 0;
+ ctl->right = 0;
+ ctl->enable = 0;
+ }
+ for (k = devinfo->startnode; k < devinfo->endnode; k++) {
+ cw = hdaa_widget_get(devinfo, k);
+ if (cw == NULL || cw->enable == 0)
+ continue;
+ for (j = 0; j < cw->nconns; j++) {
+ if (cw->connsenable[j] && cw->conns[j] == i) {
+ cw->connsenable[j] = 0;
+ HDA_BOOTHVERBOSE(
+ device_printf(devinfo->dev,
+ " Disabling connection from output pin "
+ "nid %d conn %d cnid %d.\n",
+ k, j, i);
+ );
+ if (cw->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX &&
+ cw->nconns > 1)
+ continue;
+ ctl = hdaa_audio_ctl_amp_get(devinfo, k,
+ HDAA_CTL_IN, j, 1);
+ if (ctl && ctl->enable) {
+ ctl->forcemute = 1;
+ ctl->muted = HDAA_AMP_MUTE_ALL;
+ ctl->left = 0;
+ ctl->right = 0;
+ ctl->enable = 0;
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+static void
+hdaa_audio_disable_notselected(struct hdaa_devinfo *devinfo)
+{
+ struct hdaa_audio_as *as = devinfo->as;
+ struct hdaa_widget *w;
+ int i, j;
+
+ /* On playback path we can safely disable all unseleted inputs. */
+ for (i = devinfo->startnode; i < devinfo->endnode; i++) {
+ w = hdaa_widget_get(devinfo, i);
+ if (w == NULL || w->enable == 0)
+ continue;
+ if (w->nconns <= 1)
+ continue;
+ if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER)
+ continue;
+ if (w->bindas < 0 || as[w->bindas].dir == HDAA_CTL_IN)
+ continue;
+ for (j = 0; j < w->nconns; j++) {
+ if (w->connsenable[j] == 0)
+ continue;
+ if (w->selconn < 0 || w->selconn == j)
+ continue;
+ w->connsenable[j] = 0;
+ HDA_BOOTHVERBOSE(
+ device_printf(devinfo->dev,
+ " Disabling unselected connection "
+ "nid %d conn %d.\n",
+ i, j);
+ );
+ }
+ }
+}
+
+static void
+hdaa_audio_disable_crossas(struct hdaa_devinfo *devinfo)
+{
+ struct hdaa_audio_as *ases = devinfo->as;
+ struct hdaa_widget *w, *cw;
+ struct hdaa_audio_ctl *ctl;
+ int i, j;
+
+ /* Disable crossassociatement and unwanted crosschannel connections. */
+ /* ... using selectors */
+ for (i = devinfo->startnode; i < devinfo->endnode; i++) {
+ w = hdaa_widget_get(devinfo, i);
+ if (w == NULL || w->enable == 0)
+ continue;
+ if (w->nconns <= 1)
+ continue;
+ if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER)
+ continue;
+ /* Allow any -> mix */
+ if (w->bindas == -2)
+ continue;
+ for (j = 0; j < w->nconns; j++) {
+ if (w->connsenable[j] == 0)
+ continue;
+ cw = hdaa_widget_get(devinfo, w->conns[j]);
+ if (cw == NULL || w->enable == 0)
+ continue;
+ /* Allow mix -> out. */
+ if (cw->bindas == -2 && w->bindas >= 0 &&
+ ases[w->bindas].dir == HDAA_CTL_OUT)
+ continue;
+ /* Allow mix -> mixed-in. */
+ if (cw->bindas == -2 && w->bindas >= 0 &&
+ ases[w->bindas].mixed)
+ continue;
+ /* Allow in -> mix. */
+ if ((w->pflags & HDAA_ADC_MONITOR) &&
+ cw->bindas >= 0 &&
+ ases[cw->bindas].dir == HDAA_CTL_IN)
+ continue;
+ /* Allow if have common as/seqs. */
+ if (w->bindas == cw->bindas &&
+ (w->bindseqmask & cw->bindseqmask) != 0)
+ continue;
+ w->connsenable[j] = 0;
+ HDA_BOOTHVERBOSE(
+ device_printf(devinfo->dev,
+ " Disabling crossassociatement connection "
+ "nid %d conn %d cnid %d.\n",
+ i, j, cw->nid);
+ );
+ }
+ }
+ /* ... using controls */
+ i = 0;
+ while ((ctl = hdaa_audio_ctl_each(devinfo, &i)) != NULL) {
+ if (ctl->enable == 0 || ctl->childwidget == NULL)
+ continue;
+ /* Allow any -> mix */
+ if (ctl->widget->bindas == -2)
+ continue;
+ /* Allow mix -> out. */
+ if (ctl->childwidget->bindas == -2 &&
+ ctl->widget->bindas >= 0 &&
+ ases[ctl->widget->bindas].dir == HDAA_CTL_OUT)
+ continue;
+ /* Allow mix -> mixed-in. */
+ if (ctl->childwidget->bindas == -2 &&
+ ctl->widget->bindas >= 0 &&
+ ases[ctl->widget->bindas].mixed)
+ continue;
+ /* Allow in -> mix. */
+ if ((ctl->widget->pflags & HDAA_ADC_MONITOR) &&
+ ctl->childwidget->bindas >= 0 &&
+ ases[ctl->childwidget->bindas].dir == HDAA_CTL_IN)
+ continue;
+ /* Allow if have common as/seqs. */
+ if (ctl->widget->bindas == ctl->childwidget->bindas &&
+ (ctl->widget->bindseqmask & ctl->childwidget->bindseqmask) != 0)
+ continue;
+ ctl->forcemute = 1;
+ ctl->muted = HDAA_AMP_MUTE_ALL;
+ ctl->left = 0;
+ ctl->right = 0;
+ ctl->enable = 0;
+ if (ctl->ndir == HDAA_CTL_IN)
+ ctl->widget->connsenable[ctl->index] = 0;
+ HDA_BOOTHVERBOSE(
+ device_printf(devinfo->dev,
+ " Disabling crossassociatement connection "
+ "ctl %d nid %d cnid %d.\n", i,
+ ctl->widget->nid,
+ ctl->childwidget->nid);
+ );
+ }
+
+}
+
+/*
+ * Find controls to control amplification for source and calculate possible
+ * amplification range.
+ */
+static int
+hdaa_audio_ctl_source_amp(struct hdaa_devinfo *devinfo, nid_t nid, int index,
+ int ossdev, int ctlable, int depth, int *minamp, int *maxamp)
+{
+ struct hdaa_widget *w, *wc;
+ struct hdaa_audio_ctl *ctl;
+ int i, j, conns = 0, tminamp, tmaxamp, cminamp, cmaxamp, found = 0;
+
+ if (depth > HDA_PARSE_MAXDEPTH)
+ return (found);
+
+ w = hdaa_widget_get(devinfo, nid);
+ if (w == NULL || w->enable == 0)
+ return (found);
+
+ /* Count number of active inputs. */
+ if (depth > 0) {
+ for (j = 0; j < w->nconns; j++) {
+ if (!w->connsenable[j])
+ continue;
+ conns++;
+ }
+ }
+
+ /* If this is not a first step - use input mixer.
+ Pins have common input ctl so care must be taken. */
+ if (depth > 0 && ctlable && (conns == 1 ||
+ w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)) {
+ ctl = hdaa_audio_ctl_amp_get(devinfo, w->nid, HDAA_CTL_IN,
+ index, 1);
+ if (ctl) {
+ ctl->ossmask |= (1 << ossdev);
+ found++;
+ if (*minamp == *maxamp) {
+ *minamp += MINQDB(ctl);
+ *maxamp += MAXQDB(ctl);
+ }
+ }
+ }
+
+ /* If widget has own ossdev - not traverse it.
+ It will be traversed on it's own. */
+ if (w->ossdev >= 0 && depth > 0)
+ return (found);
+
+ /* We must not traverse pin */
+ if ((w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT ||
+ w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) &&
+ depth > 0)
+ return (found);
+
+ /* record that this widget exports such signal, */
+ w->ossmask |= (1 << ossdev);
+
+ /*
+ * If signals mixed, we can't assign controls farther.
+ * Ignore this on depth zero. Caller must knows why.
+ */
+ if (conns > 1 &&
+ w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER)
+ ctlable = 0;
+
+ if (ctlable) {
+ ctl = hdaa_audio_ctl_amp_get(devinfo, w->nid, HDAA_CTL_OUT, -1, 1);
+ if (ctl) {
+ ctl->ossmask |= (1 << ossdev);
+ found++;
+ if (*minamp == *maxamp) {
+ *minamp += MINQDB(ctl);
+ *maxamp += MAXQDB(ctl);
+ }
+ }
+ }
+
+ cminamp = cmaxamp = 0;
+ for (i = devinfo->startnode; i < devinfo->endnode; i++) {
+ wc = hdaa_widget_get(devinfo, i);
+ if (wc == NULL || wc->enable == 0)
+ continue;
+ for (j = 0; j < wc->nconns; j++) {
+ if (wc->connsenable[j] && wc->conns[j] == nid) {
+ tminamp = tmaxamp = 0;
+ found += hdaa_audio_ctl_source_amp(devinfo,
+ wc->nid, j, ossdev, ctlable, depth + 1,
+ &tminamp, &tmaxamp);
+ if (cminamp == 0 && cmaxamp == 0) {
+ cminamp = tminamp;
+ cmaxamp = tmaxamp;
+ } else if (tminamp != tmaxamp) {
+ cminamp = imax(cminamp, tminamp);
+ cmaxamp = imin(cmaxamp, tmaxamp);
+ }
+ }
+ }
+ }
+ if (*minamp == *maxamp && cminamp < cmaxamp) {
+ *minamp += cminamp;
+ *maxamp += cmaxamp;
+ }
+ return (found);
+}
+
+/*
+ * Find controls to control amplification for destination and calculate
+ * possible amplification range.
+ */
+static int
+hdaa_audio_ctl_dest_amp(struct hdaa_devinfo *devinfo, nid_t nid, int index,
+ int ossdev, int depth, int *minamp, int *maxamp)
+{
+ struct hdaa_audio_as *as = devinfo->as;
+ struct hdaa_widget *w, *wc;
+ struct hdaa_audio_ctl *ctl;
+ int i, j, consumers, tminamp, tmaxamp, cminamp, cmaxamp, found = 0;
+
+ if (depth > HDA_PARSE_MAXDEPTH)
+ return (found);
+
+ w = hdaa_widget_get(devinfo, nid);
+ if (w == NULL || w->enable == 0)
+ return (found);
+
+ if (depth > 0) {
+ /* If this node produce output for several consumers,
+ we can't touch it. */
+ consumers = 0;
+ for (i = devinfo->startnode; i < devinfo->endnode; i++) {
+ wc = hdaa_widget_get(devinfo, i);
+ if (wc == NULL || wc->enable == 0)
+ continue;
+ for (j = 0; j < wc->nconns; j++) {
+ if (wc->connsenable[j] && wc->conns[j] == nid)
+ consumers++;
+ }
+ }
+ /* The only exception is if real HP redirection is configured
+ and this is a duplication point.
+ XXX: Actually exception is not completely correct.
+ XXX: Duplication point check is not perfect. */
+ if ((consumers == 2 && (w->bindas < 0 ||
+ as[w->bindas].hpredir < 0 || as[w->bindas].fakeredir ||
+ (w->bindseqmask & (1 << 15)) == 0)) ||
+ consumers > 2)
+ return (found);
+
+ /* Else use it's output mixer. */
+ ctl = hdaa_audio_ctl_amp_get(devinfo, w->nid,
+ HDAA_CTL_OUT, -1, 1);
+ if (ctl) {
+ ctl->ossmask |= (1 << ossdev);
+ found++;
+ if (*minamp == *maxamp) {
+ *minamp += MINQDB(ctl);
+ *maxamp += MAXQDB(ctl);
+ }
+ }
+ }
+
+ /* We must not traverse pin */
+ if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX &&
+ depth > 0)
+ return (found);
+
+ cminamp = cmaxamp = 0;
+ for (i = 0; i < w->nconns; i++) {
+ if (w->connsenable[i] == 0)
+ continue;
+ if (index >= 0 && i != index)
+ continue;
+ tminamp = tmaxamp = 0;
+ ctl = hdaa_audio_ctl_amp_get(devinfo, w->nid,
+ HDAA_CTL_IN, i, 1);
+ if (ctl) {
+ ctl->ossmask |= (1 << ossdev);
+ found++;
+ if (*minamp == *maxamp) {
+ tminamp += MINQDB(ctl);
+ tmaxamp += MAXQDB(ctl);
+ }
+ }
+ found += hdaa_audio_ctl_dest_amp(devinfo, w->conns[i], -1, ossdev,
+ depth + 1, &tminamp, &tmaxamp);
+ if (cminamp == 0 && cmaxamp == 0) {
+ cminamp = tminamp;
+ cmaxamp = tmaxamp;
+ } else if (tminamp != tmaxamp) {
+ cminamp = imax(cminamp, tminamp);
+ cmaxamp = imin(cmaxamp, tmaxamp);
+ }
+ }
+ if (*minamp == *maxamp && cminamp < cmaxamp) {
+ *minamp += cminamp;
+ *maxamp += cmaxamp;
+ }
+ return (found);
+}
+
+/*
+ * Assign OSS names to sound sources
+ */
+static void
+hdaa_audio_assign_names(struct hdaa_devinfo *devinfo)
+{
+ struct hdaa_audio_as *as = devinfo->as;
+ struct hdaa_widget *w;
+ int i, j;
+ int type = -1, use, used = 0;
+ static const int types[7][13] = {
+ { SOUND_MIXER_LINE, SOUND_MIXER_LINE1, SOUND_MIXER_LINE2,
+ SOUND_MIXER_LINE3, -1 }, /* line */
+ { SOUND_MIXER_MONITOR, SOUND_MIXER_MIC, -1 }, /* int mic */
+ { SOUND_MIXER_MIC, SOUND_MIXER_MONITOR, -1 }, /* ext mic */
+ { SOUND_MIXER_CD, -1 }, /* cd */
+ { SOUND_MIXER_SPEAKER, -1 }, /* speaker */
+ { SOUND_MIXER_DIGITAL1, SOUND_MIXER_DIGITAL2, SOUND_MIXER_DIGITAL3,
+ -1 }, /* digital */
+ { SOUND_MIXER_LINE, SOUND_MIXER_LINE1, SOUND_MIXER_LINE2,
+ SOUND_MIXER_LINE3, SOUND_MIXER_PHONEIN, SOUND_MIXER_PHONEOUT,
+ SOUND_MIXER_VIDEO, SOUND_MIXER_RADIO, SOUND_MIXER_DIGITAL1,
+ SOUND_MIXER_DIGITAL2, SOUND_MIXER_DIGITAL3, SOUND_MIXER_MONITOR,
+ -1 } /* others */
+ };
+
+ /* Surely known names */
+ for (i = devinfo->startnode; i < devinfo->endnode; i++) {
+ w = hdaa_widget_get(devinfo, i);
+ if (w == NULL || w->enable == 0)
+ continue;
+ if (w->bindas == -1)
+ continue;
+ use = -1;
+ switch (w->type) {
+ case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX:
+ if (as[w->bindas].dir == HDAA_CTL_OUT)
+ break;
+ type = -1;
+ switch (w->wclass.pin.config & HDA_CONFIG_DEFAULTCONF_DEVICE_MASK) {
+ case HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN:
+ type = 0;
+ break;
+ case HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN:
+ if ((w->wclass.pin.config & HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK)
+ == HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_JACK)
+ break;
+ type = 1;
+ break;
+ case HDA_CONFIG_DEFAULTCONF_DEVICE_CD:
+ type = 3;
+ break;
+ case HDA_CONFIG_DEFAULTCONF_DEVICE_SPEAKER:
+ type = 4;
+ break;
+ case HDA_CONFIG_DEFAULTCONF_DEVICE_SPDIF_IN:
+ case HDA_CONFIG_DEFAULTCONF_DEVICE_DIGITAL_OTHER_IN:
+ type = 5;
+ break;
+ }
+ if (type == -1)
+ break;
+ j = 0;
+ while (types[type][j] >= 0 &&
+ (used & (1 << types[type][j])) != 0) {
+ j++;
+ }
+ if (types[type][j] >= 0)
+ use = types[type][j];
+ break;
+ case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_OUTPUT:
+ use = SOUND_MIXER_PCM;
+ break;
+ case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_BEEP_WIDGET:
+ use = SOUND_MIXER_SPEAKER;
+ break;
+ default:
+ break;
+ }
+ if (use >= 0) {
+ w->ossdev = use;
+ used |= (1 << use);
+ }
+ }
+ /* Semi-known names */
+ for (i = devinfo->startnode; i < devinfo->endnode; i++) {
+ w = hdaa_widget_get(devinfo, i);
+ if (w == NULL || w->enable == 0)
+ continue;
+ if (w->ossdev >= 0)
+ continue;
+ if (w->bindas == -1)
+ continue;
+ if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
+ continue;
+ if (as[w->bindas].dir == HDAA_CTL_OUT)
+ continue;
+ type = -1;
+ switch (w->wclass.pin.config & HDA_CONFIG_DEFAULTCONF_DEVICE_MASK) {
+ case HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_OUT:
+ case HDA_CONFIG_DEFAULTCONF_DEVICE_SPEAKER:
+ case HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT:
+ case HDA_CONFIG_DEFAULTCONF_DEVICE_AUX:
+ type = 0;
+ break;
+ case HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN:
+ type = 2;
+ break;
+ case HDA_CONFIG_DEFAULTCONF_DEVICE_SPDIF_OUT:
+ case HDA_CONFIG_DEFAULTCONF_DEVICE_DIGITAL_OTHER_OUT:
+ type = 5;
+ break;
+ }
+ if (type == -1)
+ break;
+ j = 0;
+ while (types[type][j] >= 0 &&
+ (used & (1 << types[type][j])) != 0) {
+ j++;
+ }
+ if (types[type][j] >= 0) {
+ w->ossdev = types[type][j];
+ used |= (1 << types[type][j]);
+ }
+ }
+ /* Others */
+ for (i = devinfo->startnode; i < devinfo->endnode; i++) {
+ w = hdaa_widget_get(devinfo, i);
+ if (w == NULL || w->enable == 0)
+ continue;
+ if (w->ossdev >= 0)
+ continue;
+ if (w->bindas == -1)
+ continue;
+ if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
+ continue;
+ if (as[w->bindas].dir == HDAA_CTL_OUT)
+ continue;
+ j = 0;
+ while (types[6][j] >= 0 &&
+ (used & (1 << types[6][j])) != 0) {
+ j++;
+ }
+ if (types[6][j] >= 0) {
+ w->ossdev = types[6][j];
+ used |= (1 << types[6][j]);
+ }
+ }
+}
+
+static void
+hdaa_audio_build_tree(struct hdaa_devinfo *devinfo)
+{
+ struct hdaa_audio_as *as = devinfo->as;
+ int j, res;
+
+ /* Trace all associations in order of their numbers. */
+ for (j = 0; j < devinfo->ascnt; j++) {
+ if (as[j].enable == 0)
+ continue;
+ HDA_BOOTVERBOSE(
+ device_printf(devinfo->dev,
+ "Tracing association %d (%d)\n", j, as[j].index);
+ );
+ if (as[j].dir == HDAA_CTL_OUT) {
+retry:
+ res = hdaa_audio_trace_as_out(devinfo, j, 0);
+ if (res == 0 && as[j].hpredir >= 0 &&
+ as[j].fakeredir == 0) {
+ /* If CODEC can't do analog HP redirection
+ try to make it using one more DAC. */
+ as[j].fakeredir = 1;
+ goto retry;
+ }
+ } else if (as[j].mixed)
+ res = hdaa_audio_trace_as_in(devinfo, j);
+ else
+ res = hdaa_audio_trace_as_in_mch(devinfo, j, 0);
+ if (res) {
+ HDA_BOOTVERBOSE(
+ device_printf(devinfo->dev,
+ "Association %d (%d) trace succeeded\n",
+ j, as[j].index);
+ );
+ } else {
+ HDA_BOOTVERBOSE(
+ device_printf(devinfo->dev,
+ "Association %d (%d) trace failed\n",
+ j, as[j].index);
+ );
+ as[j].enable = 0;
+ }
+ }
+
+ /* Look for additional DACs/ADCs. */
+ for (j = 0; j < devinfo->ascnt; j++) {
+ if (as[j].enable == 0)
+ continue;
+ hdaa_audio_adddac(devinfo, j);
+ }
+
+ /* Trace mixer and beeper pseudo associations. */
+ hdaa_audio_trace_as_extra(devinfo);
+}
+
+/*
+ * Store in pdevinfo new data about whether and how we can control signal
+ * for OSS device to/from specified widget.
+ */
+static void
+hdaa_adjust_amp(struct hdaa_widget *w, int ossdev,
+ int found, int minamp, int maxamp)
+{
+ struct hdaa_devinfo *devinfo = w->devinfo;
+ struct hdaa_pcm_devinfo *pdevinfo;
+
+ if (w->bindas >= 0)
+ pdevinfo = devinfo->as[w->bindas].pdevinfo;
+ else
+ pdevinfo = &devinfo->devs[0];
+ if (found)
+ pdevinfo->ossmask |= (1 << ossdev);
+ if (minamp == 0 && maxamp == 0)
+ return;
+ if (pdevinfo->minamp[ossdev] == 0 && pdevinfo->maxamp[ossdev] == 0) {
+ pdevinfo->minamp[ossdev] = minamp;
+ pdevinfo->maxamp[ossdev] = maxamp;
+ } else {
+ pdevinfo->minamp[ossdev] = imax(pdevinfo->minamp[ossdev], minamp);
+ pdevinfo->maxamp[ossdev] = imin(pdevinfo->maxamp[ossdev], maxamp);
+ }
+}
+
+/*
+ * Trace signals from/to all possible sources/destionstions to find possible
+ * recording sources, OSS device control ranges and to assign controls.
+ */
+static void
+hdaa_audio_assign_mixers(struct hdaa_devinfo *devinfo)
+{
+ struct hdaa_audio_as *as = devinfo->as;
+ struct hdaa_widget *w, *cw;
+ int i, j, minamp, maxamp, found;
+
+ /* Assign mixers to the tree. */
+ for (i = devinfo->startnode; i < devinfo->endnode; i++) {
+ w = hdaa_widget_get(devinfo, i);
+ if (w == NULL || w->enable == 0)
+ continue;
+ minamp = maxamp = 0;
+ if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_OUTPUT ||
+ w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_BEEP_WIDGET ||
+ (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX &&
+ as[w->bindas].dir == HDAA_CTL_IN)) {
+ if (w->ossdev < 0)
+ continue;
+ found = hdaa_audio_ctl_source_amp(devinfo, w->nid, -1,
+ w->ossdev, 1, 0, &minamp, &maxamp);
+ hdaa_adjust_amp(w, w->ossdev, found, minamp, maxamp);
+ } else if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT) {
+ found = hdaa_audio_ctl_dest_amp(devinfo, w->nid, -1,
+ SOUND_MIXER_RECLEV, 0, &minamp, &maxamp);
+ hdaa_adjust_amp(w, SOUND_MIXER_RECLEV, found, minamp, maxamp);
+ } else if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX &&
+ as[w->bindas].dir == HDAA_CTL_OUT) {
+ found = hdaa_audio_ctl_dest_amp(devinfo, w->nid, -1,
+ SOUND_MIXER_VOLUME, 0, &minamp, &maxamp);
+ hdaa_adjust_amp(w, SOUND_MIXER_VOLUME, found, minamp, maxamp);
+ }
+ if (w->ossdev == SOUND_MIXER_IMIX) {
+ minamp = maxamp = 0;
+ found = hdaa_audio_ctl_source_amp(devinfo, w->nid, -1,
+ w->ossdev, 1, 0, &minamp, &maxamp);
+ if (minamp == maxamp) {
+ /* If we are unable to control input monitor
+ as source - try to control it as destination. */
+ found += hdaa_audio_ctl_dest_amp(devinfo, w->nid, -1,
+ w->ossdev, 0, &minamp, &maxamp);
+ w->pflags |= HDAA_IMIX_AS_DST;
+ }
+ hdaa_adjust_amp(w, w->ossdev, found, minamp, maxamp);
+ }
+ if (w->pflags & HDAA_ADC_MONITOR) {
+ for (j = 0; j < w->nconns; j++) {
+ if (!w->connsenable[j])
+ continue;
+ cw = hdaa_widget_get(devinfo, w->conns[j]);
+ if (cw == NULL || cw->enable == 0)
+ continue;
+ if (cw->bindas == -1)
+ continue;
+ if (cw->bindas >= 0 &&
+ as[cw->bindas].dir != HDAA_CTL_IN)
+ continue;
+ minamp = maxamp = 0;
+ found = hdaa_audio_ctl_dest_amp(devinfo,
+ w->nid, j, SOUND_MIXER_IGAIN, 0,
+ &minamp, &maxamp);
+ hdaa_adjust_amp(w, SOUND_MIXER_IGAIN,
+ found, minamp, maxamp);
+ }
+ }
+ }
+}
+
+static void
+hdaa_audio_prepare_pin_ctrl(struct hdaa_devinfo *devinfo)
+{
+ struct hdaa_audio_as *as = devinfo->as;
+ struct hdaa_widget *w;
+ uint32_t pincap;
+ int i;
+
+ for (i = 0; i < devinfo->nodecnt; i++) {
+ w = &devinfo->widget[i];
+ if (w == NULL)
+ continue;
+ if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX &&
+ w->waspin == 0)
+ continue;
+
+ pincap = w->wclass.pin.cap;
+
+ /* Disable everything. */
+ w->wclass.pin.ctrl &= ~(
+ HDA_CMD_SET_PIN_WIDGET_CTRL_HPHN_ENABLE |
+ HDA_CMD_SET_PIN_WIDGET_CTRL_OUT_ENABLE |
+ HDA_CMD_SET_PIN_WIDGET_CTRL_IN_ENABLE |
+ HDA_CMD_SET_PIN_WIDGET_CTRL_VREF_ENABLE_MASK);
+
+ if (w->enable == 0) {
+ /* Pin is unused so left it disabled. */
+ continue;
+ } else if (w->waspin) {
+ /* Enable input for beeper input. */
+ w->wclass.pin.ctrl |=
+ HDA_CMD_SET_PIN_WIDGET_CTRL_IN_ENABLE;
+ } else if (w->bindas < 0 || as[w->bindas].enable == 0) {
+ /* Pin is unused so left it disabled. */
+ continue;
+ } else if (as[w->bindas].dir == HDAA_CTL_IN) {
+ /* Input pin, configure for input. */
+ if (HDA_PARAM_PIN_CAP_INPUT_CAP(pincap))
+ w->wclass.pin.ctrl |=
+ HDA_CMD_SET_PIN_WIDGET_CTRL_IN_ENABLE;
+
+ if ((devinfo->quirks & HDAA_QUIRK_IVREF100) &&
+ HDA_PARAM_PIN_CAP_VREF_CTRL_100(pincap))
+ w->wclass.pin.ctrl |=
+ HDA_CMD_SET_PIN_WIDGET_CTRL_VREF_ENABLE(
+ HDA_CMD_PIN_WIDGET_CTRL_VREF_ENABLE_100);
+ else if ((devinfo->quirks & HDAA_QUIRK_IVREF80) &&
+ HDA_PARAM_PIN_CAP_VREF_CTRL_80(pincap))
+ w->wclass.pin.ctrl |=
+ HDA_CMD_SET_PIN_WIDGET_CTRL_VREF_ENABLE(
+ HDA_CMD_PIN_WIDGET_CTRL_VREF_ENABLE_80);
+ else if ((devinfo->quirks & HDAA_QUIRK_IVREF50) &&
+ HDA_PARAM_PIN_CAP_VREF_CTRL_50(pincap))
+ w->wclass.pin.ctrl |=
+ HDA_CMD_SET_PIN_WIDGET_CTRL_VREF_ENABLE(
+ HDA_CMD_PIN_WIDGET_CTRL_VREF_ENABLE_50);
+ } else {
+ /* Output pin, configure for output. */
+ if (HDA_PARAM_PIN_CAP_OUTPUT_CAP(pincap))
+ w->wclass.pin.ctrl |=
+ HDA_CMD_SET_PIN_WIDGET_CTRL_OUT_ENABLE;
+
+ if (HDA_PARAM_PIN_CAP_HEADPHONE_CAP(pincap) &&
+ (w->wclass.pin.config &
+ HDA_CONFIG_DEFAULTCONF_DEVICE_MASK) ==
+ HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT)
+ w->wclass.pin.ctrl |=
+ HDA_CMD_SET_PIN_WIDGET_CTRL_HPHN_ENABLE;
+
+ if ((devinfo->quirks & HDAA_QUIRK_OVREF100) &&
+ HDA_PARAM_PIN_CAP_VREF_CTRL_100(pincap))
+ w->wclass.pin.ctrl |=
+ HDA_CMD_SET_PIN_WIDGET_CTRL_VREF_ENABLE(
+ HDA_CMD_PIN_WIDGET_CTRL_VREF_ENABLE_100);
+ else if ((devinfo->quirks & HDAA_QUIRK_OVREF80) &&
+ HDA_PARAM_PIN_CAP_VREF_CTRL_80(pincap))
+ w->wclass.pin.ctrl |=
+ HDA_CMD_SET_PIN_WIDGET_CTRL_VREF_ENABLE(
+ HDA_CMD_PIN_WIDGET_CTRL_VREF_ENABLE_80);
+ else if ((devinfo->quirks & HDAA_QUIRK_OVREF50) &&
+ HDA_PARAM_PIN_CAP_VREF_CTRL_50(pincap))
+ w->wclass.pin.ctrl |=
+ HDA_CMD_SET_PIN_WIDGET_CTRL_VREF_ENABLE(
+ HDA_CMD_PIN_WIDGET_CTRL_VREF_ENABLE_50);
+ }
+ }
+}
+
+static void
+hdaa_audio_ctl_commit(struct hdaa_devinfo *devinfo)
+{
+ struct hdaa_audio_ctl *ctl;
+ int i, z;
+
+ i = 0;
+ while ((ctl = hdaa_audio_ctl_each(devinfo, &i)) != NULL) {
+ if (ctl->enable == 0 || ctl->ossmask != 0) {
+ /* Mute disabled and mixer controllable controls.
+ * Last will be initialized by mixer_init().
+ * This expected to reduce click on startup. */
+ hdaa_audio_ctl_amp_set(ctl, HDAA_AMP_MUTE_ALL, 0, 0);
+ continue;
+ }
+ /* Init fixed controls to 0dB amplification. */
+ z = ctl->offset;
+ if (z > ctl->step)
+ z = ctl->step;
+ hdaa_audio_ctl_amp_set(ctl, HDAA_AMP_MUTE_NONE, z, z);
+ }
+}
+
+static void
+hdaa_gpio_commit(struct hdaa_devinfo *devinfo)
+{
+ uint32_t gdata, gmask, gdir;
+ int i, numgpio;
+
+ numgpio = HDA_PARAM_GPIO_COUNT_NUM_GPIO(devinfo->gpio_cap);
+ if (devinfo->gpio != 0 && numgpio != 0) {
+ gdata = hda_command(devinfo->dev,
+ HDA_CMD_GET_GPIO_DATA(0, devinfo->nid));
+ gmask = hda_command(devinfo->dev,
+ HDA_CMD_GET_GPIO_ENABLE_MASK(0, devinfo->nid));
+ gdir = hda_command(devinfo->dev,
+ HDA_CMD_GET_GPIO_DIRECTION(0, devinfo->nid));
+ for (i = 0; i < numgpio; i++) {
+ if ((devinfo->gpio & HDAA_GPIO_MASK(i)) ==
+ HDAA_GPIO_SET(i)) {
+ gdata |= (1 << i);
+ gmask |= (1 << i);
+ gdir |= (1 << i);
+ } else if ((devinfo->gpio & HDAA_GPIO_MASK(i)) ==
+ HDAA_GPIO_CLEAR(i)) {
+ gdata &= ~(1 << i);
+ gmask |= (1 << i);
+ gdir |= (1 << i);
+ } else if ((devinfo->gpio & HDAA_GPIO_MASK(i)) ==
+ HDAA_GPIO_DISABLE(i)) {
+ gmask &= ~(1 << i);
+ } else if ((devinfo->gpio & HDAA_GPIO_MASK(i)) ==
+ HDAA_GPIO_INPUT(i)) {
+ gmask |= (1 << i);
+ gdir &= ~(1 << i);
+ }
+ }
+ HDA_BOOTVERBOSE(
+ device_printf(devinfo->dev, "GPIO commit\n");
+ );
+ hda_command(devinfo->dev,
+ HDA_CMD_SET_GPIO_ENABLE_MASK(0, devinfo->nid, gmask));
+ hda_command(devinfo->dev,
+ HDA_CMD_SET_GPIO_DIRECTION(0, devinfo->nid, gdir));
+ hda_command(devinfo->dev,
+ HDA_CMD_SET_GPIO_DATA(0, devinfo->nid, gdata));
+ HDA_BOOTVERBOSE(
+ hdaa_dump_gpio(devinfo);
+ );
+ }
+}
+
+static void
+hdaa_gpo_commit(struct hdaa_devinfo *devinfo)
+{
+ uint32_t gdata;
+ int i, numgpo;
+
+ numgpo = HDA_PARAM_GPIO_COUNT_NUM_GPO(devinfo->gpio_cap);
+ if (devinfo->gpo != 0 && numgpo != 0) {
+ gdata = hda_command(devinfo->dev,
+ HDA_CMD_GET_GPO_DATA(0, devinfo->nid));
+ for (i = 0; i < numgpo; i++) {
+ if ((devinfo->gpio & HDAA_GPIO_MASK(i)) ==
+ HDAA_GPIO_SET(i)) {
+ gdata |= (1 << i);
+ } else if ((devinfo->gpio & HDAA_GPIO_MASK(i)) ==
+ HDAA_GPIO_CLEAR(i)) {
+ gdata &= ~(1 << i);
+ }
+ }
+ HDA_BOOTVERBOSE(
+ device_printf(devinfo->dev, "GPO commit\n");
+ );
+ hda_command(devinfo->dev,
+ HDA_CMD_SET_GPO_DATA(0, devinfo->nid, gdata));
+ HDA_BOOTVERBOSE(
+ hdaa_dump_gpo(devinfo);
+ );
+ }
+}
+
+static void
+hdaa_audio_commit(struct hdaa_devinfo *devinfo)
+{
+ struct hdaa_widget *w;
+ int i;
+
+ /* Commit controls. */
+ hdaa_audio_ctl_commit(devinfo);
+
+ /* Commit selectors, pins and EAPD. */
+ for (i = 0; i < devinfo->nodecnt; i++) {
+ w = &devinfo->widget[i];
+ if (w == NULL)
+ continue;
+ if (w->selconn == -1)
+ w->selconn = 0;
+ if (w->nconns > 0)
+ hdaa_widget_connection_select(w, w->selconn);
+ if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX ||
+ w->waspin) {
+ hda_command(devinfo->dev,
+ HDA_CMD_SET_PIN_WIDGET_CTRL(0, w->nid,
+ w->wclass.pin.ctrl));
+ }
+ if (w->param.eapdbtl != HDA_INVALID) {
+ uint32_t val;
+
+ val = w->param.eapdbtl;
+ if (devinfo->quirks &
+ HDAA_QUIRK_EAPDINV)
+ val ^= HDA_CMD_SET_EAPD_BTL_ENABLE_EAPD;
+ hda_command(devinfo->dev,
+ HDA_CMD_SET_EAPD_BTL_ENABLE(0, w->nid,
+ val));
+ }
+ }
+
+ hdaa_gpio_commit(devinfo);
+ hdaa_gpo_commit(devinfo);
+}
+
+static void
+hdaa_powerup(struct hdaa_devinfo *devinfo)
+{
+ int i;
+
+ hda_command(devinfo->dev,
+ HDA_CMD_SET_POWER_STATE(0,
+ devinfo->nid, HDA_CMD_POWER_STATE_D0));
+ DELAY(100);
+
+ for (i = devinfo->startnode; i < devinfo->endnode; i++) {
+ hda_command(devinfo->dev,
+ HDA_CMD_SET_POWER_STATE(0,
+ i, HDA_CMD_POWER_STATE_D0));
+ }
+ DELAY(1000);
+}
+
+static int
+hdaa_pcmchannel_setup(struct hdaa_chan *ch)
+{
+ struct hdaa_devinfo *devinfo = ch->devinfo;
+ struct hdaa_audio_as *as = devinfo->as;
+ struct hdaa_widget *w;
+ uint32_t cap, fmtcap, pcmcap;
+ int i, j, ret, channels, onlystereo;
+ uint16_t pinset;
+
+ ch->caps = hdaa_caps;
+ ch->caps.fmtlist = ch->fmtlist;
+ ch->bit16 = 1;
+ ch->bit32 = 0;
+ ch->pcmrates[0] = 48000;
+ ch->pcmrates[1] = 0;
+ ch->stripecap = 0xff;
+
+ ret = 0;
+ channels = 0;
+ onlystereo = 1;
+ pinset = 0;
+ fmtcap = devinfo->supp_stream_formats;
+ pcmcap = devinfo->supp_pcm_size_rate;
+
+ for (i = 0; i < 16; i++) {
+ /* Check as is correct */
+ if (ch->as < 0)
+ break;
+ /* Cound only present DACs */
+ if (as[ch->as].dacs[ch->asindex][i] <= 0)
+ continue;
+ /* Ignore duplicates */
+ for (j = 0; j < ret; j++) {
+ if (ch->io[j] == as[ch->as].dacs[ch->asindex][i])
+ break;
+ }
+ if (j < ret)
+ continue;
+
+ w = hdaa_widget_get(devinfo, as[ch->as].dacs[ch->asindex][i]);
+ if (w == NULL || w->enable == 0)
+ continue;
+ cap = w->param.supp_stream_formats;
+ if (!HDA_PARAM_SUPP_STREAM_FORMATS_PCM(cap) &&
+ !HDA_PARAM_SUPP_STREAM_FORMATS_AC3(cap))
+ continue;
+ /* Many CODECs does not declare AC3 support on SPDIF.
+ I don't beleave that they doesn't support it! */
+ if (HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL(w->param.widget_cap))
+ cap |= HDA_PARAM_SUPP_STREAM_FORMATS_AC3_MASK;
+ if (ret == 0) {
+ fmtcap = cap;
+ pcmcap = w->param.supp_pcm_size_rate;
+ } else {
+ fmtcap &= cap;
+ pcmcap &= w->param.supp_pcm_size_rate;
+ }
+ ch->io[ret++] = as[ch->as].dacs[ch->asindex][i];
+ ch->stripecap &= w->wclass.conv.stripecap;
+ /* Do not count redirection pin/dac channels. */
+ if (i == 15 && as[ch->as].hpredir >= 0)
+ continue;
+ channels += HDA_PARAM_AUDIO_WIDGET_CAP_CC(w->param.widget_cap) + 1;
+ if (HDA_PARAM_AUDIO_WIDGET_CAP_CC(w->param.widget_cap) != 1)
+ onlystereo = 0;
+ pinset |= (1 << i);
+ }
+ ch->io[ret] = -1;
+ ch->channels = channels;
+
+ if (as[ch->as].fakeredir)
+ ret--;
+ /* Standard speaks only about stereo pins and playback, ... */
+ if ((!onlystereo) || as[ch->as].mixed)
+ pinset = 0;
+ /* ..., but there it gives us info about speakers layout. */
+ as[ch->as].pinset = pinset;
+
+ ch->supp_stream_formats = fmtcap;
+ ch->supp_pcm_size_rate = pcmcap;
+
+ /*
+ * 8bit = 0
+ * 16bit = 1
+ * 20bit = 2
+ * 24bit = 3
+ * 32bit = 4
+ */
+ if (ret > 0) {
+ i = 0;
+ if (HDA_PARAM_SUPP_STREAM_FORMATS_PCM(fmtcap)) {
+ if (HDA_PARAM_SUPP_PCM_SIZE_RATE_16BIT(pcmcap))
+ ch->bit16 = 1;
+ else if (HDA_PARAM_SUPP_PCM_SIZE_RATE_8BIT(pcmcap))
+ ch->bit16 = 0;
+ if (HDA_PARAM_SUPP_PCM_SIZE_RATE_24BIT(pcmcap))
+ ch->bit32 = 3;
+ else if (HDA_PARAM_SUPP_PCM_SIZE_RATE_20BIT(pcmcap))
+ ch->bit32 = 2;
+ else if (HDA_PARAM_SUPP_PCM_SIZE_RATE_32BIT(pcmcap))
+ ch->bit32 = 4;
+ if (!(devinfo->quirks & HDAA_QUIRK_FORCESTEREO)) {
+ ch->fmtlist[i++] = SND_FORMAT(AFMT_S16_LE, 1, 0);
+ if (ch->bit32)
+ ch->fmtlist[i++] = SND_FORMAT(AFMT_S32_LE, 1, 0);
+ }
+ if (channels >= 2) {
+ ch->fmtlist[i++] = SND_FORMAT(AFMT_S16_LE, 2, 0);
+ if (ch->bit32)
+ ch->fmtlist[i++] = SND_FORMAT(AFMT_S32_LE, 2, 0);
+ }
+ if (channels >= 3 && !onlystereo) {
+ ch->fmtlist[i++] = SND_FORMAT(AFMT_S16_LE, 3, 0);
+ if (ch->bit32)
+ ch->fmtlist[i++] = SND_FORMAT(AFMT_S32_LE, 3, 0);
+ ch->fmtlist[i++] = SND_FORMAT(AFMT_S16_LE, 3, 1);
+ if (ch->bit32)
+ ch->fmtlist[i++] = SND_FORMAT(AFMT_S32_LE, 3, 1);
+ }
+ if (channels >= 4) {
+ ch->fmtlist[i++] = SND_FORMAT(AFMT_S16_LE, 4, 0);
+ if (ch->bit32)
+ ch->fmtlist[i++] = SND_FORMAT(AFMT_S32_LE, 4, 0);
+ if (!onlystereo) {
+ ch->fmtlist[i++] = SND_FORMAT(AFMT_S16_LE, 4, 1);
+ if (ch->bit32)
+ ch->fmtlist[i++] = SND_FORMAT(AFMT_S32_LE, 4, 1);
+ }
+ }
+ if (channels >= 5 && !onlystereo) {
+ ch->fmtlist[i++] = SND_FORMAT(AFMT_S16_LE, 5, 0);
+ if (ch->bit32)
+ ch->fmtlist[i++] = SND_FORMAT(AFMT_S32_LE, 5, 0);
+ ch->fmtlist[i++] = SND_FORMAT(AFMT_S16_LE, 5, 1);
+ if (ch->bit32)
+ ch->fmtlist[i++] = SND_FORMAT(AFMT_S32_LE, 5, 1);
+ }
+ if (channels >= 6) {
+ ch->fmtlist[i++] = SND_FORMAT(AFMT_S16_LE, 6, 1);
+ if (ch->bit32)
+ ch->fmtlist[i++] = SND_FORMAT(AFMT_S32_LE, 6, 1);
+ if (!onlystereo) {
+ ch->fmtlist[i++] = SND_FORMAT(AFMT_S16_LE, 6, 0);
+ if (ch->bit32)
+ ch->fmtlist[i++] = SND_FORMAT(AFMT_S32_LE, 6, 0);
+ }
+ }
+ if (channels >= 7 && !onlystereo) {
+ ch->fmtlist[i++] = SND_FORMAT(AFMT_S16_LE, 7, 0);
+ if (ch->bit32)
+ ch->fmtlist[i++] = SND_FORMAT(AFMT_S32_LE, 7, 0);
+ ch->fmtlist[i++] = SND_FORMAT(AFMT_S16_LE, 7, 1);
+ if (ch->bit32)
+ ch->fmtlist[i++] = SND_FORMAT(AFMT_S32_LE, 7, 1);
+ }
+ if (channels >= 8) {
+ ch->fmtlist[i++] = SND_FORMAT(AFMT_S16_LE, 8, 1);
+ if (ch->bit32)
+ ch->fmtlist[i++] = SND_FORMAT(AFMT_S32_LE, 8, 1);
+ }
+ }
+ if (HDA_PARAM_SUPP_STREAM_FORMATS_AC3(fmtcap)) {
+ ch->fmtlist[i++] = SND_FORMAT(AFMT_AC3, 2, 0);
+ if (channels >= 8) {
+ ch->fmtlist[i++] = SND_FORMAT(AFMT_AC3, 8, 0);
+ ch->fmtlist[i++] = SND_FORMAT(AFMT_AC3, 8, 1);
+ }
+ }
+ ch->fmtlist[i] = 0;
+ i = 0;
+ if (HDA_PARAM_SUPP_PCM_SIZE_RATE_8KHZ(pcmcap))
+ ch->pcmrates[i++] = 8000;
+ if (HDA_PARAM_SUPP_PCM_SIZE_RATE_11KHZ(pcmcap))
+ ch->pcmrates[i++] = 11025;
+ if (HDA_PARAM_SUPP_PCM_SIZE_RATE_16KHZ(pcmcap))
+ ch->pcmrates[i++] = 16000;
+ if (HDA_PARAM_SUPP_PCM_SIZE_RATE_22KHZ(pcmcap))
+ ch->pcmrates[i++] = 22050;
+ if (HDA_PARAM_SUPP_PCM_SIZE_RATE_32KHZ(pcmcap))
+ ch->pcmrates[i++] = 32000;
+ if (HDA_PARAM_SUPP_PCM_SIZE_RATE_44KHZ(pcmcap))
+ ch->pcmrates[i++] = 44100;
+ /* if (HDA_PARAM_SUPP_PCM_SIZE_RATE_48KHZ(pcmcap)) */
+ ch->pcmrates[i++] = 48000;
+ if (HDA_PARAM_SUPP_PCM_SIZE_RATE_88KHZ(pcmcap))
+ ch->pcmrates[i++] = 88200;
+ if (HDA_PARAM_SUPP_PCM_SIZE_RATE_96KHZ(pcmcap))
+ ch->pcmrates[i++] = 96000;
+ if (HDA_PARAM_SUPP_PCM_SIZE_RATE_176KHZ(pcmcap))
+ ch->pcmrates[i++] = 176400;
+ if (HDA_PARAM_SUPP_PCM_SIZE_RATE_192KHZ(pcmcap))
+ ch->pcmrates[i++] = 192000;
+ /* if (HDA_PARAM_SUPP_PCM_SIZE_RATE_384KHZ(pcmcap)) */
+ ch->pcmrates[i] = 0;
+ if (i > 0) {
+ ch->caps.minspeed = ch->pcmrates[0];
+ ch->caps.maxspeed = ch->pcmrates[i - 1];
+ }
+ }
+
+ return (ret);
+}
+
+static void
+hdaa_prepare_pcms(struct hdaa_devinfo *devinfo)
+{
+ struct hdaa_audio_as *as = devinfo->as;
+ int i, j, k, apdev = 0, ardev = 0, dpdev = 0, drdev = 0;
+
+ for (i = 0; i < devinfo->ascnt; i++) {
+ if (as[i].enable == 0)
+ continue;
+ if (as[i].dir == HDAA_CTL_IN) {
+ if (as[i].digital)
+ drdev++;
+ else
+ ardev++;
+ } else {
+ if (as[i].digital)
+ dpdev++;
+ else
+ apdev++;
+ }
+ }
+ devinfo->num_devs =
+ max(ardev, apdev) + max(drdev, dpdev);
+ devinfo->devs =
+ (struct hdaa_pcm_devinfo *)malloc(
+ devinfo->num_devs * sizeof(struct hdaa_pcm_devinfo),
+ M_HDAA, M_ZERO | M_NOWAIT);
+ if (devinfo->devs == NULL) {
+ device_printf(devinfo->dev,
+ "Unable to allocate memory for devices\n");
+ return;
+ }
+ for (i = 0; i < devinfo->num_devs; i++) {
+ devinfo->devs[i].index = i;
+ devinfo->devs[i].devinfo = devinfo;
+ devinfo->devs[i].playas = -1;
+ devinfo->devs[i].recas = -1;
+ devinfo->devs[i].digital = 255;
+ }
+ for (i = 0; i < devinfo->ascnt; i++) {
+ if (as[i].enable == 0)
+ continue;
+ for (j = 0; j < devinfo->num_devs; j++) {
+ if (devinfo->devs[j].digital != 255 &&
+ (!devinfo->devs[j].digital) !=
+ (!as[i].digital))
+ continue;
+ if (as[i].dir == HDAA_CTL_IN) {
+ if (devinfo->devs[j].recas >= 0)
+ continue;
+ devinfo->devs[j].recas = i;
+ } else {
+ if (devinfo->devs[j].playas >= 0)
+ continue;
+ devinfo->devs[j].playas = i;
+ }
+ as[i].pdevinfo = &devinfo->devs[j];
+ for (k = 0; k < as[i].num_chans; k++) {
+ devinfo->chans[as[i].chans[k]].pdevinfo =
+ &devinfo->devs[j];
+ }
+ devinfo->devs[j].digital = as[i].digital;
+ break;
+ }
+ }
+}
+
+static void
+hdaa_create_pcms(struct hdaa_devinfo *devinfo)
+{
+ int i;
+
+ for (i = 0; i < devinfo->num_devs; i++) {
+ struct hdaa_pcm_devinfo *pdevinfo = &devinfo->devs[i];
+
+ pdevinfo->dev = device_add_child(devinfo->dev, "pcm", -1);
+ device_set_ivars(pdevinfo->dev, (void *)pdevinfo);
+ }
+}
+
+static void
+hdaa_dump_ctls(struct hdaa_pcm_devinfo *pdevinfo, const char *banner, uint32_t flag)
+{
+ struct hdaa_devinfo *devinfo = pdevinfo->devinfo;
+ struct hdaa_audio_ctl *ctl;
+ char buf[64];
+ int i, j, printed;
+
+ if (flag == 0) {
+ flag = ~(SOUND_MASK_VOLUME | SOUND_MASK_PCM |
+ SOUND_MASK_CD | SOUND_MASK_LINE | SOUND_MASK_RECLEV |
+ SOUND_MASK_MIC | SOUND_MASK_SPEAKER | SOUND_MASK_IGAIN |
+ SOUND_MASK_OGAIN | SOUND_MASK_IMIX | SOUND_MASK_MONITOR);
+ }
+
+ for (j = 0; j < SOUND_MIXER_NRDEVICES; j++) {
+ if ((flag & (1 << j)) == 0)
+ continue;
+ i = 0;
+ printed = 0;
+ while ((ctl = hdaa_audio_ctl_each(devinfo, &i)) != NULL) {
+ if (ctl->enable == 0 ||
+ ctl->widget->enable == 0)
+ continue;
+ if (!((pdevinfo->playas >= 0 &&
+ ctl->widget->bindas == pdevinfo->playas) ||
+ (pdevinfo->recas >= 0 &&
+ ctl->widget->bindas == pdevinfo->recas) ||
+ (ctl->widget->bindas == -2 && pdevinfo->index == 0)))
+ continue;
+ if ((ctl->ossmask & (1 << j)) == 0)
+ continue;
+
+ if (printed == 0) {
+ device_printf(pdevinfo->dev, "\n");
+ if (banner != NULL) {
+ device_printf(pdevinfo->dev, "%s", banner);
+ } else {
+ device_printf(pdevinfo->dev, "Unknown Ctl");
+ }
+ printf(" (OSS: %s)",
+ hdaa_audio_ctl_ossmixer_mask2allname(1 << j,
+ buf, sizeof(buf)));
+ if (pdevinfo->ossmask & (1 << j)) {
+ printf(": %+d/%+ddB\n",
+ pdevinfo->minamp[j] / 4,
+ pdevinfo->maxamp[j] / 4);
+ } else
+ printf("\n");
+ device_printf(pdevinfo->dev, " |\n");
+ printed = 1;
+ }
+ device_printf(pdevinfo->dev, " +- ctl %2d (nid %3d %s", i,
+ ctl->widget->nid,
+ (ctl->ndir == HDAA_CTL_IN)?"in ":"out");
+ if (ctl->ndir == HDAA_CTL_IN && ctl->ndir == ctl->dir)
+ printf(" %2d): ", ctl->index);
+ else
+ printf("): ");
+ if (ctl->step > 0) {
+ printf("%+d/%+ddB (%d steps)%s\n",
+ MINQDB(ctl) / 4,
+ MAXQDB(ctl) / 4,
+ ctl->step + 1,
+ ctl->mute?" + mute":"");
+ } else
+ printf("%s\n", ctl->mute?"mute":"");
+ }
+ }
+}
+
+static void
+hdaa_dump_audio_formats(device_t dev, uint32_t fcap, uint32_t pcmcap)
+{
+ uint32_t cap;
+
+ cap = fcap;
+ if (cap != 0) {
+ device_printf(dev, " Stream cap: 0x%08x\n", cap);
+ device_printf(dev, " ");
+ if (HDA_PARAM_SUPP_STREAM_FORMATS_AC3(cap))
+ printf(" AC3");
+ if (HDA_PARAM_SUPP_STREAM_FORMATS_FLOAT32(cap))
+ printf(" FLOAT32");
+ if (HDA_PARAM_SUPP_STREAM_FORMATS_PCM(cap))
+ printf(" PCM");
+ printf("\n");
+ }
+ cap = pcmcap;
+ if (cap != 0) {
+ device_printf(dev, " PCM cap: 0x%08x\n", cap);
+ device_printf(dev, " ");
+ if (HDA_PARAM_SUPP_PCM_SIZE_RATE_8BIT(cap))
+ printf(" 8");
+ if (HDA_PARAM_SUPP_PCM_SIZE_RATE_16BIT(cap))
+ printf(" 16");
+ if (HDA_PARAM_SUPP_PCM_SIZE_RATE_20BIT(cap))
+ printf(" 20");
+ if (HDA_PARAM_SUPP_PCM_SIZE_RATE_24BIT(cap))
+ printf(" 24");
+ if (HDA_PARAM_SUPP_PCM_SIZE_RATE_32BIT(cap))
+ printf(" 32");
+ printf(" bits,");
+ if (HDA_PARAM_SUPP_PCM_SIZE_RATE_8KHZ(cap))
+ printf(" 8");
+ if (HDA_PARAM_SUPP_PCM_SIZE_RATE_11KHZ(cap))
+ printf(" 11");
+ if (HDA_PARAM_SUPP_PCM_SIZE_RATE_16KHZ(cap))
+ printf(" 16");
+ if (HDA_PARAM_SUPP_PCM_SIZE_RATE_22KHZ(cap))
+ printf(" 22");
+ if (HDA_PARAM_SUPP_PCM_SIZE_RATE_32KHZ(cap))
+ printf(" 32");
+ if (HDA_PARAM_SUPP_PCM_SIZE_RATE_44KHZ(cap))
+ printf(" 44");
+ printf(" 48");
+ if (HDA_PARAM_SUPP_PCM_SIZE_RATE_88KHZ(cap))
+ printf(" 88");
+ if (HDA_PARAM_SUPP_PCM_SIZE_RATE_96KHZ(cap))
+ printf(" 96");
+ if (HDA_PARAM_SUPP_PCM_SIZE_RATE_176KHZ(cap))
+ printf(" 176");
+ if (HDA_PARAM_SUPP_PCM_SIZE_RATE_192KHZ(cap))
+ printf(" 192");
+ printf(" KHz\n");
+ }
+}
+
+static void
+hdaa_dump_pin(struct hdaa_widget *w)
+{
+ uint32_t pincap;
+
+ pincap = w->wclass.pin.cap;
+
+ device_printf(w->devinfo->dev, " Pin cap: 0x%08x\n", pincap);
+ device_printf(w->devinfo->dev, " ");
+ if (HDA_PARAM_PIN_CAP_IMP_SENSE_CAP(pincap))
+ printf(" ISC");
+ if (HDA_PARAM_PIN_CAP_TRIGGER_REQD(pincap))
+ printf(" TRQD");
+ if (HDA_PARAM_PIN_CAP_PRESENCE_DETECT_CAP(pincap))
+ printf(" PDC");
+ if (HDA_PARAM_PIN_CAP_HEADPHONE_CAP(pincap))
+ printf(" HP");
+ if (HDA_PARAM_PIN_CAP_OUTPUT_CAP(pincap))
+ printf(" OUT");
+ if (HDA_PARAM_PIN_CAP_INPUT_CAP(pincap))
+ printf(" IN");
+ if (HDA_PARAM_PIN_CAP_BALANCED_IO_PINS(pincap))
+ printf(" BAL");
+ if (HDA_PARAM_PIN_CAP_HDMI(pincap))
+ printf(" HDMI");
+ if (HDA_PARAM_PIN_CAP_VREF_CTRL(pincap)) {
+ printf(" VREF[");
+ if (HDA_PARAM_PIN_CAP_VREF_CTRL_50(pincap))
+ printf(" 50");
+ if (HDA_PARAM_PIN_CAP_VREF_CTRL_80(pincap))
+ printf(" 80");
+ if (HDA_PARAM_PIN_CAP_VREF_CTRL_100(pincap))
+ printf(" 100");
+ if (HDA_PARAM_PIN_CAP_VREF_CTRL_GROUND(pincap))
+ printf(" GROUND");
+ if (HDA_PARAM_PIN_CAP_VREF_CTRL_HIZ(pincap))
+ printf(" HIZ");
+ printf(" ]");
+ }
+ if (HDA_PARAM_PIN_CAP_EAPD_CAP(pincap))
+ printf(" EAPD");
+ if (HDA_PARAM_PIN_CAP_DP(pincap))
+ printf(" DP");
+ if (HDA_PARAM_PIN_CAP_HBR(pincap))
+ printf(" HBR");
+ printf("\n");
+ device_printf(w->devinfo->dev, " Pin config: 0x%08x\n",
+ w->wclass.pin.config);
+ device_printf(w->devinfo->dev, " Pin control: 0x%08x", w->wclass.pin.ctrl);
+ if (w->wclass.pin.ctrl & HDA_CMD_SET_PIN_WIDGET_CTRL_HPHN_ENABLE)
+ printf(" HP");
+ if (w->wclass.pin.ctrl & HDA_CMD_SET_PIN_WIDGET_CTRL_IN_ENABLE)
+ printf(" IN");
+ if (w->wclass.pin.ctrl & HDA_CMD_SET_PIN_WIDGET_CTRL_OUT_ENABLE)
+ printf(" OUT");
+ if (HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL(w->param.widget_cap)) {
+ if ((w->wclass.pin.ctrl &
+ HDA_CMD_SET_PIN_WIDGET_CTRL_VREF_ENABLE_MASK) == 0x03)
+ printf(" HBR");
+ else if ((w->wclass.pin.ctrl &
+ HDA_CMD_SET_PIN_WIDGET_CTRL_VREF_ENABLE_MASK) != 0)
+ printf(" EPTs");
+ } else {
+ if ((w->wclass.pin.ctrl &
+ HDA_CMD_SET_PIN_WIDGET_CTRL_VREF_ENABLE_MASK) != 0)
+ printf(" VREFs");
+ }
+ printf("\n");
+}
+
+static void
+hdaa_dump_pin_config(struct hdaa_widget *w, uint32_t conf)
+{
+
+ device_printf(w->devinfo->dev, "%2d %08x %-2d %-2d "
+ "%-13s %-5s %-7s %-10s %-7s %d%s\n",
+ w->nid, conf,
+ HDA_CONFIG_DEFAULTCONF_ASSOCIATION(conf),
+ HDA_CONFIG_DEFAULTCONF_SEQUENCE(conf),
+ HDA_DEVS[HDA_CONFIG_DEFAULTCONF_DEVICE(conf)],
+ HDA_CONNS[HDA_CONFIG_DEFAULTCONF_CONNECTIVITY(conf)],
+ HDA_CONNECTORS[HDA_CONFIG_DEFAULTCONF_CONNECTION_TYPE(conf)],
+ HDA_LOCS[HDA_CONFIG_DEFAULTCONF_LOCATION(conf)],
+ HDA_COLORS[HDA_CONFIG_DEFAULTCONF_COLOR(conf)],
+ HDA_CONFIG_DEFAULTCONF_MISC(conf),
+ (w->enable == 0)?" DISA":"");
+}
+
+static void
+hdaa_dump_pin_configs(struct hdaa_devinfo *devinfo)
+{
+ struct hdaa_widget *w;
+ int i;
+
+ device_printf(devinfo->dev, "nid 0x as seq "
+ "device conn jack loc color misc\n");
+ for (i = devinfo->startnode; i < devinfo->endnode; i++) {
+ w = hdaa_widget_get(devinfo, i);
+ if (w == NULL)
+ continue;
+ if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
+ continue;
+ hdaa_dump_pin_config(w, w->wclass.pin.config);
+ }
+}
+
+static void
+hdaa_dump_amp(device_t dev, uint32_t cap, char *banner)
+{
+ device_printf(dev, " %s amp: 0x%08x\n", banner, cap);
+ device_printf(dev, " "
+ "mute=%d step=%d size=%d offset=%d\n",
+ HDA_PARAM_OUTPUT_AMP_CAP_MUTE_CAP(cap),
+ HDA_PARAM_OUTPUT_AMP_CAP_NUMSTEPS(cap),
+ HDA_PARAM_OUTPUT_AMP_CAP_STEPSIZE(cap),
+ HDA_PARAM_OUTPUT_AMP_CAP_OFFSET(cap));
+}
+
+static void
+hdaa_dump_nodes(struct hdaa_devinfo *devinfo)
+{
+ struct hdaa_widget *w, *cw;
+ char buf[64];
+ int i, j;
+
+ device_printf(devinfo->dev, "\n");
+ device_printf(devinfo->dev, "Default Parameter\n");
+ device_printf(devinfo->dev, "-----------------\n");
+ hdaa_dump_audio_formats(devinfo->dev,
+ devinfo->supp_stream_formats,
+ devinfo->supp_pcm_size_rate);
+ device_printf(devinfo->dev, " IN amp: 0x%08x\n",
+ devinfo->inamp_cap);
+ device_printf(devinfo->dev, " OUT amp: 0x%08x\n",
+ devinfo->outamp_cap);
+ for (i = devinfo->startnode; i < devinfo->endnode; i++) {
+ w = hdaa_widget_get(devinfo, i);
+ if (w == NULL) {
+ device_printf(devinfo->dev, "Ghost widget nid=%d\n", i);
+ continue;
+ }
+ device_printf(devinfo->dev, "\n");
+ device_printf(devinfo->dev, " nid: %d%s\n", w->nid,
+ (w->enable == 0) ? " [DISABLED]" : "");
+ device_printf(devinfo->dev, " Name: %s\n", w->name);
+ device_printf(devinfo->dev, " Widget cap: 0x%08x\n",
+ w->param.widget_cap);
+ if (w->param.widget_cap & 0x0ee1) {
+ device_printf(devinfo->dev, " ");
+ if (HDA_PARAM_AUDIO_WIDGET_CAP_LR_SWAP(w->param.widget_cap))
+ printf(" LRSWAP");
+ if (HDA_PARAM_AUDIO_WIDGET_CAP_POWER_CTRL(w->param.widget_cap))
+ printf(" PWR");
+ if (HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL(w->param.widget_cap))
+ printf(" DIGITAL");
+ if (HDA_PARAM_AUDIO_WIDGET_CAP_UNSOL_CAP(w->param.widget_cap))
+ printf(" UNSOL");
+ if (HDA_PARAM_AUDIO_WIDGET_CAP_PROC_WIDGET(w->param.widget_cap))
+ printf(" PROC");
+ if (HDA_PARAM_AUDIO_WIDGET_CAP_STRIPE(w->param.widget_cap))
+ printf(" STRIPE(x%d)",
+ 1 << (fls(w->wclass.conv.stripecap) - 1));
+ j = HDA_PARAM_AUDIO_WIDGET_CAP_CC(w->param.widget_cap);
+ if (j == 1)
+ printf(" STEREO");
+ else if (j > 1)
+ printf(" %dCH", j + 1);
+ printf("\n");
+ }
+ if (w->bindas != -1) {
+ device_printf(devinfo->dev, " Association: %d (0x%08x)\n",
+ w->bindas, w->bindseqmask);
+ }
+ if (w->ossmask != 0 || w->ossdev >= 0) {
+ device_printf(devinfo->dev, " OSS: %s",
+ hdaa_audio_ctl_ossmixer_mask2allname(w->ossmask, buf, sizeof(buf)));
+ if (w->ossdev >= 0)
+ printf(" (%s)", ossnames[w->ossdev]);
+ printf("\n");
+ }
+ if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_OUTPUT ||
+ w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT) {
+ hdaa_dump_audio_formats(devinfo->dev,
+ w->param.supp_stream_formats,
+ w->param.supp_pcm_size_rate);
+ } else if (w->type ==
+ HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX || w->waspin)
+ hdaa_dump_pin(w);
+ if (w->param.eapdbtl != HDA_INVALID)
+ device_printf(devinfo->dev, " EAPD: 0x%08x\n",
+ w->param.eapdbtl);
+ if (HDA_PARAM_AUDIO_WIDGET_CAP_OUT_AMP(w->param.widget_cap) &&
+ w->param.outamp_cap != 0)
+ hdaa_dump_amp(devinfo->dev, w->param.outamp_cap, "Output");
+ if (HDA_PARAM_AUDIO_WIDGET_CAP_IN_AMP(w->param.widget_cap) &&
+ w->param.inamp_cap != 0)
+ hdaa_dump_amp(devinfo->dev, w->param.inamp_cap, " Input");
+ if (w->nconns > 0) {
+ device_printf(devinfo->dev, " connections: %d\n", w->nconns);
+ device_printf(devinfo->dev, " |\n");
+ }
+ for (j = 0; j < w->nconns; j++) {
+ cw = hdaa_widget_get(devinfo, w->conns[j]);
+ device_printf(devinfo->dev, " + %s<- nid=%d [%s]",
+ (w->connsenable[j] == 0)?"[DISABLED] ":"",
+ w->conns[j], (cw == NULL) ? "GHOST!" : cw->name);
+ if (cw == NULL)
+ printf(" [UNKNOWN]");
+ else if (cw->enable == 0)
+ printf(" [DISABLED]");
+ if (w->nconns > 1 && w->selconn == j && w->type !=
+ HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER)
+ printf(" (selected)");
+ printf("\n");
+ }
+ }
+
+}
+
+static void
+hdaa_dump_dst_nid(struct hdaa_pcm_devinfo *pdevinfo, nid_t nid, int depth)
+{
+ struct hdaa_devinfo *devinfo = pdevinfo->devinfo;
+ struct hdaa_widget *w, *cw;
+ char buf[64];
+ int i, printed = 0;
+
+ if (depth > HDA_PARSE_MAXDEPTH)
+ return;
+
+ w = hdaa_widget_get(devinfo, nid);
+ if (w == NULL || w->enable == 0)
+ return;
+
+ if (depth == 0)
+ device_printf(pdevinfo->dev, "%*s", 4, "");
+ else
+ device_printf(pdevinfo->dev, "%*s + <- ", 4 + (depth - 1) * 7, "");
+ printf("nid=%d [%s]", w->nid, w->name);
+
+ if (depth > 0) {
+ if (w->ossmask == 0) {
+ printf("\n");
+ return;
+ }
+ printf(" [src: %s]",
+ hdaa_audio_ctl_ossmixer_mask2allname(
+ w->ossmask, buf, sizeof(buf)));
+ if (w->ossdev >= 0) {
+ printf("\n");
+ return;
+ }
+ }
+ printf("\n");
+
+ for (i = 0; i < w->nconns; i++) {
+ if (w->connsenable[i] == 0)
+ continue;
+ cw = hdaa_widget_get(devinfo, w->conns[i]);
+ if (cw == NULL || cw->enable == 0 || cw->bindas == -1)
+ continue;
+ if (printed == 0) {
+ device_printf(pdevinfo->dev, "%*s |\n", 4 + (depth) * 7, "");
+ printed = 1;
+ }
+ hdaa_dump_dst_nid(pdevinfo, w->conns[i], depth + 1);
+ }
+
+}
+
+static void
+hdaa_dump_dac(struct hdaa_pcm_devinfo *pdevinfo)
+{
+ struct hdaa_devinfo *devinfo = pdevinfo->devinfo;
+ struct hdaa_audio_as *as;
+ struct hdaa_widget *w;
+ int i, printed = 0;
+
+ if (pdevinfo->playas < 0)
+ return;
+
+ as = &devinfo->as[pdevinfo->playas];
+ for (i = 0; i < 16; i++) {
+ if (as->pins[i] <= 0)
+ continue;
+ w = hdaa_widget_get(devinfo, as->pins[i]);
+ if (w == NULL || w->enable == 0)
+ continue;
+ if (printed == 0) {
+ printed = 1;
+ device_printf(pdevinfo->dev, "\n");
+ device_printf(pdevinfo->dev, "Playback:\n");
+ }
+ device_printf(pdevinfo->dev, "\n");
+ hdaa_dump_dst_nid(pdevinfo, as->pins[i], 0);
+ }
+}
+
+static void
+hdaa_dump_adc(struct hdaa_pcm_devinfo *pdevinfo)
+{
+ struct hdaa_devinfo *devinfo = pdevinfo->devinfo;
+ struct hdaa_widget *w;
+ int i;
+ int printed = 0;
+
+ if (pdevinfo->recas < 0)
+ return;
+
+ for (i = devinfo->startnode; i < devinfo->endnode; i++) {
+ w = hdaa_widget_get(devinfo, i);
+ if (w == NULL || w->enable == 0)
+ continue;
+ if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT)
+ continue;
+ if (w->bindas != pdevinfo->recas)
+ continue;
+ if (printed == 0) {
+ printed = 1;
+ device_printf(pdevinfo->dev, "\n");
+ device_printf(pdevinfo->dev, "Record:\n");
+ }
+ device_printf(pdevinfo->dev, "\n");
+ hdaa_dump_dst_nid(pdevinfo, i, 0);
+ }
+}
+
+static void
+hdaa_dump_mix(struct hdaa_pcm_devinfo *pdevinfo)
+{
+ struct hdaa_devinfo *devinfo = pdevinfo->devinfo;
+ struct hdaa_widget *w;
+ int i;
+ int printed = 0;
+
+ for (i = devinfo->startnode; i < devinfo->endnode; i++) {
+ w = hdaa_widget_get(devinfo, i);
+ if (w == NULL || w->enable == 0)
+ continue;
+ if (w->ossdev != SOUND_MIXER_IMIX)
+ continue;
+ if (w->bindas != pdevinfo->recas)
+ continue;
+ if (printed == 0) {
+ printed = 1;
+ device_printf(pdevinfo->dev, "\n");
+ device_printf(pdevinfo->dev, "Input Mix:\n");
+ }
+ device_printf(pdevinfo->dev, "\n");
+ hdaa_dump_dst_nid(pdevinfo, i, 0);
+ }
+}
+
+static void
+hdaa_dump_pcmchannels(struct hdaa_pcm_devinfo *pdevinfo)
+{
+ struct hdaa_devinfo *devinfo = pdevinfo->devinfo;
+ nid_t *nids;
+ int chid, i;
+
+ if (pdevinfo->playas >= 0) {
+ device_printf(pdevinfo->dev, "\n");
+ device_printf(pdevinfo->dev, "Playback:\n");
+ device_printf(pdevinfo->dev, "\n");
+ chid = devinfo->as[pdevinfo->playas].chans[0];
+ hdaa_dump_audio_formats(pdevinfo->dev,
+ devinfo->chans[chid].supp_stream_formats,
+ devinfo->chans[chid].supp_pcm_size_rate);
+ for (i = 0; i < devinfo->as[pdevinfo->playas].num_chans; i++) {
+ chid = devinfo->as[pdevinfo->playas].chans[i];
+ device_printf(pdevinfo->dev, " DAC:");
+ for (nids = devinfo->chans[chid].io; *nids != -1; nids++)
+ printf(" %d", *nids);
+ printf("\n");
+ }
+ }
+ if (pdevinfo->recas >= 0) {
+ device_printf(pdevinfo->dev, "\n");
+ device_printf(pdevinfo->dev, "Record:\n");
+ device_printf(pdevinfo->dev, "\n");
+ chid = devinfo->as[pdevinfo->recas].chans[0];
+ hdaa_dump_audio_formats(pdevinfo->dev,
+ devinfo->chans[chid].supp_stream_formats,
+ devinfo->chans[chid].supp_pcm_size_rate);
+ for (i = 0; i < devinfo->as[pdevinfo->recas].num_chans; i++) {
+ chid = devinfo->as[pdevinfo->recas].chans[i];
+ device_printf(pdevinfo->dev, " DAC:");
+ for (nids = devinfo->chans[chid].io; *nids != -1; nids++)
+ printf(" %d", *nids);
+ printf("\n");
+ }
+ }
+}
+
+static void
+hdaa_pindump(device_t dev)
+{
+ struct hdaa_devinfo *devinfo = device_get_softc(dev);
+ struct hdaa_widget *w;
+ uint32_t res, pincap, delay;
+ int i;
+
+ device_printf(dev, "Dumping AFG pins:\n");
+ device_printf(dev, "nid 0x as seq "
+ "device conn jack loc color misc\n");
+ for (i = devinfo->startnode; i < devinfo->endnode; i++) {
+ w = hdaa_widget_get(devinfo, i);
+ if (w == NULL || w->type !=
+ HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
+ continue;
+ hdaa_dump_pin_config(w, w->wclass.pin.config);
+ pincap = w->wclass.pin.cap;
+ device_printf(dev, " Caps: %2s %3s %2s %4s %4s",
+ HDA_PARAM_PIN_CAP_INPUT_CAP(pincap)?"IN":"",
+ HDA_PARAM_PIN_CAP_OUTPUT_CAP(pincap)?"OUT":"",
+ HDA_PARAM_PIN_CAP_HEADPHONE_CAP(pincap)?"HP":"",
+ HDA_PARAM_PIN_CAP_EAPD_CAP(pincap)?"EAPD":"",
+ HDA_PARAM_PIN_CAP_VREF_CTRL(pincap)?"VREF":"");
+ if (HDA_PARAM_PIN_CAP_IMP_SENSE_CAP(pincap) ||
+ HDA_PARAM_PIN_CAP_PRESENCE_DETECT_CAP(pincap)) {
+ if (HDA_PARAM_PIN_CAP_TRIGGER_REQD(pincap)) {
+ delay = 0;
+ hda_command(dev,
+ HDA_CMD_SET_PIN_SENSE(0, w->nid, 0));
+ do {
+ res = hda_command(dev,
+ HDA_CMD_GET_PIN_SENSE(0, w->nid));
+ if (res != 0x7fffffff && res != 0xffffffff)
+ break;
+ DELAY(10);
+ } while (++delay < 10000);
+ } else {
+ delay = 0;
+ res = hda_command(dev, HDA_CMD_GET_PIN_SENSE(0,
+ w->nid));
+ }
+ printf(" Sense: 0x%08x (%sconnected%s)", res,
+ (res & HDA_CMD_GET_PIN_SENSE_PRESENCE_DETECT) ?
+ "" : "dis",
+ (HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL(w->param.widget_cap) &&
+ (res & HDA_CMD_GET_PIN_SENSE_ELD_VALID)) ?
+ ", ELD valid" : "");
+ if (delay > 0)
+ printf(" delay %dus", delay * 10);
+ }
+ printf("\n");
+ }
+ device_printf(dev,
+ "NumGPIO=%d NumGPO=%d NumGPI=%d GPIWake=%d GPIUnsol=%d\n",
+ HDA_PARAM_GPIO_COUNT_NUM_GPIO(devinfo->gpio_cap),
+ HDA_PARAM_GPIO_COUNT_NUM_GPO(devinfo->gpio_cap),
+ HDA_PARAM_GPIO_COUNT_NUM_GPI(devinfo->gpio_cap),
+ HDA_PARAM_GPIO_COUNT_GPI_WAKE(devinfo->gpio_cap),
+ HDA_PARAM_GPIO_COUNT_GPI_UNSOL(devinfo->gpio_cap));
+ hdaa_dump_gpi(devinfo);
+ hdaa_dump_gpio(devinfo);
+ hdaa_dump_gpo(devinfo);
+}
+
+static void
+hdaa_configure(device_t dev)
+{
+ struct hdaa_devinfo *devinfo = device_get_softc(dev);
+ struct hdaa_audio_ctl *ctl;
+ int i;
+
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Applying built-in patches...\n");
+ );
+ hdaa_patch(devinfo);
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Applying local patches...\n");
+ );
+ hdaa_local_patch(devinfo);
+ hdaa_audio_postprocess(devinfo);
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Parsing Ctls...\n");
+ );
+ hdaa_audio_ctl_parse(devinfo);
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Disabling nonaudio...\n");
+ );
+ hdaa_audio_disable_nonaudio(devinfo);
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Disabling useless...\n");
+ );
+ hdaa_audio_disable_useless(devinfo);
+ HDA_BOOTVERBOSE(
+ device_printf(dev, "Patched pins configuration:\n");
+ hdaa_dump_pin_configs(devinfo);
+ );
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Parsing pin associations...\n");
+ );
+ hdaa_audio_as_parse(devinfo);
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Building AFG tree...\n");
+ );
+ hdaa_audio_build_tree(devinfo);
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Disabling unassociated "
+ "widgets...\n");
+ );
+ hdaa_audio_disable_unas(devinfo);
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Disabling nonselected "
+ "inputs...\n");
+ );
+ hdaa_audio_disable_notselected(devinfo);
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Disabling useless...\n");
+ );
+ hdaa_audio_disable_useless(devinfo);
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Disabling "
+ "crossassociatement connections...\n");
+ );
+ hdaa_audio_disable_crossas(devinfo);
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Disabling useless...\n");
+ );
+ hdaa_audio_disable_useless(devinfo);
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Binding associations to channels...\n");
+ );
+ hdaa_audio_bind_as(devinfo);
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Assigning names to signal sources...\n");
+ );
+ hdaa_audio_assign_names(devinfo);
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Preparing PCM devices...\n");
+ );
+ hdaa_prepare_pcms(devinfo);
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Assigning mixers to the tree...\n");
+ );
+ hdaa_audio_assign_mixers(devinfo);
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Preparing pin controls...\n");
+ );
+ hdaa_audio_prepare_pin_ctrl(devinfo);
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "AFG commit...\n");
+ );
+ hdaa_audio_commit(devinfo);
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Applying direct built-in patches...\n");
+ );
+ hdaa_patch_direct(devinfo);
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Pin sense init...\n");
+ );
+ hdaa_sense_init(devinfo);
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Creating PCM devices...\n");
+ );
+ hdaa_create_pcms(devinfo);
+
+ HDA_BOOTVERBOSE(
+ if (devinfo->quirks != 0) {
+ device_printf(dev, "FG config/quirks:");
+ for (i = 0; i < HDAA_QUIRKS_TAB_LEN; i++) {
+ if ((devinfo->quirks &
+ hdaa_quirks_tab[i].value) ==
+ hdaa_quirks_tab[i].value)
+ printf(" %s", hdaa_quirks_tab[i].key);
+ }
+ printf("\n");
+ }
+
+ device_printf(dev, "\n");
+ device_printf(dev, "+-------------------+\n");
+ device_printf(dev, "| DUMPING HDA NODES |\n");
+ device_printf(dev, "+-------------------+\n");
+ hdaa_dump_nodes(devinfo);
+ );
+
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "\n");
+ device_printf(dev, "+------------------------+\n");
+ device_printf(dev, "| DUMPING HDA AMPLIFIERS |\n");
+ device_printf(dev, "+------------------------+\n");
+ device_printf(dev, "\n");
+ i = 0;
+ while ((ctl = hdaa_audio_ctl_each(devinfo, &i)) != NULL) {
+ device_printf(dev, "%3d: nid %3d %s (%s) index %d", i,
+ (ctl->widget != NULL) ? ctl->widget->nid : -1,
+ (ctl->ndir == HDAA_CTL_IN)?"in ":"out",
+ (ctl->dir == HDAA_CTL_IN)?"in ":"out",
+ ctl->index);
+ if (ctl->childwidget != NULL)
+ printf(" cnid %3d", ctl->childwidget->nid);
+ else
+ printf(" ");
+ printf(" ossmask=0x%08x\n",
+ ctl->ossmask);
+ device_printf(dev,
+ " mute: %d step: %3d size: %3d off: %3d%s\n",
+ ctl->mute, ctl->step, ctl->size, ctl->offset,
+ (ctl->enable == 0) ? " [DISABLED]" :
+ ((ctl->ossmask == 0) ? " [UNUSED]" : ""));
+ }
+ );
+
+ HDA_BOOTVERBOSE(
+ device_printf(dev, "\n");
+ );
+}
+
+static void
+hdaa_unconfigure(device_t dev)
+{
+ struct hdaa_devinfo *devinfo = device_get_softc(dev);
+ struct hdaa_widget *w;
+ int i, j;
+
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Pin sense deinit...\n");
+ );
+ hdaa_sense_deinit(devinfo);
+ free(devinfo->ctl, M_HDAA);
+ devinfo->ctl = NULL;
+ devinfo->ctlcnt = 0;
+ free(devinfo->as, M_HDAA);
+ devinfo->as = NULL;
+ devinfo->ascnt = 0;
+ free(devinfo->devs, M_HDAA);
+ devinfo->devs = NULL;
+ devinfo->num_devs = 0;
+ free(devinfo->chans, M_HDAA);
+ devinfo->chans = NULL;
+ devinfo->num_chans = 0;
+ for (i = devinfo->startnode; i < devinfo->endnode; i++) {
+ w = hdaa_widget_get(devinfo, i);
+ if (w == NULL)
+ continue;
+ w->enable = 1;
+ w->selconn = -1;
+ w->pflags = 0;
+ w->bindas = -1;
+ w->bindseqmask = 0;
+ w->ossdev = -1;
+ w->ossmask = 0;
+ for (j = 0; j < w->nconns; j++)
+ w->connsenable[j] = 1;
+ if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
+ w->wclass.pin.config = w->wclass.pin.newconf;
+ if (w->eld != NULL) {
+ w->eld_len = 0;
+ free(w->eld, M_HDAA);
+ w->eld = NULL;
+ }
+ }
+}
+
+static int
+hdaa_sysctl_gpi_state(SYSCTL_HANDLER_ARGS)
+{
+ struct hdaa_devinfo *devinfo = oidp->oid_arg1;
+ device_t dev = devinfo->dev;
+ char buf[256];
+ int n = 0, i, numgpi;
+ uint32_t data = 0;
+
+ buf[0] = 0;
+ hdaa_lock(devinfo);
+ numgpi = HDA_PARAM_GPIO_COUNT_NUM_GPI(devinfo->gpio_cap);
+ if (numgpi > 0) {
+ data = hda_command(dev,
+ HDA_CMD_GET_GPI_DATA(0, devinfo->nid));
+ }
+ hdaa_unlock(devinfo);
+ for (i = 0; i < numgpi; i++) {
+ n += snprintf(buf + n, sizeof(buf) - n, "%s%d=%d",
+ n != 0 ? " " : "", i, ((data >> i) & 1));
+ }
+ return (sysctl_handle_string(oidp, buf, sizeof(buf), req));
+}
+
+static int
+hdaa_sysctl_gpio_state(SYSCTL_HANDLER_ARGS)
+{
+ struct hdaa_devinfo *devinfo = oidp->oid_arg1;
+ device_t dev = devinfo->dev;
+ char buf[256];
+ int n = 0, i, numgpio;
+ uint32_t data = 0, enable = 0, dir = 0;
+
+ buf[0] = 0;
+ hdaa_lock(devinfo);
+ numgpio = HDA_PARAM_GPIO_COUNT_NUM_GPIO(devinfo->gpio_cap);
+ if (numgpio > 0) {
+ data = hda_command(dev,
+ HDA_CMD_GET_GPIO_DATA(0, devinfo->nid));
+ enable = hda_command(dev,
+ HDA_CMD_GET_GPIO_ENABLE_MASK(0, devinfo->nid));
+ dir = hda_command(dev,
+ HDA_CMD_GET_GPIO_DIRECTION(0, devinfo->nid));
+ }
+ hdaa_unlock(devinfo);
+ for (i = 0; i < numgpio; i++) {
+ n += snprintf(buf + n, sizeof(buf) - n, "%s%d=",
+ n != 0 ? " " : "", i);
+ if ((enable & (1 << i)) == 0) {
+ n += snprintf(buf + n, sizeof(buf) - n, "disabled");
+ continue;
+ }
+ n += snprintf(buf + n, sizeof(buf) - n, "%sput(%d)",
+ ((dir >> i) & 1) ? "out" : "in", ((data >> i) & 1));
+ }
+ return (sysctl_handle_string(oidp, buf, sizeof(buf), req));
+}
+
+static int
+hdaa_sysctl_gpio_config(SYSCTL_HANDLER_ARGS)
+{
+ struct hdaa_devinfo *devinfo = oidp->oid_arg1;
+ char buf[256];
+ int error, n = 0, i, numgpio;
+ uint32_t gpio, x;
+
+ gpio = devinfo->newgpio;
+ numgpio = HDA_PARAM_GPIO_COUNT_NUM_GPIO(devinfo->gpio_cap);
+ buf[0] = 0;
+ for (i = 0; i < numgpio; i++) {
+ x = (gpio & HDAA_GPIO_MASK(i)) >> HDAA_GPIO_SHIFT(i);
+ n += snprintf(buf + n, sizeof(buf) - n, "%s%d=%s",
+ n != 0 ? " " : "", i, HDA_GPIO_ACTIONS[x]);
+ }
+ error = sysctl_handle_string(oidp, buf, sizeof(buf), req);
+ if (error != 0 || req->newptr == NULL)
+ return (error);
+ if (strncmp(buf, "0x", 2) == 0)
+ gpio = strtol(buf + 2, NULL, 16);
+ else
+ gpio = hdaa_gpio_patch(gpio, buf);
+ hdaa_lock(devinfo);
+ devinfo->newgpio = devinfo->gpio = gpio;
+ hdaa_gpio_commit(devinfo);
+ hdaa_unlock(devinfo);
+ return (0);
+}
+
+static int
+hdaa_sysctl_gpo_state(SYSCTL_HANDLER_ARGS)
+{
+ struct hdaa_devinfo *devinfo = oidp->oid_arg1;
+ device_t dev = devinfo->dev;
+ char buf[256];
+ int n = 0, i, numgpo;
+ uint32_t data = 0;
+
+ buf[0] = 0;
+ hdaa_lock(devinfo);
+ numgpo = HDA_PARAM_GPIO_COUNT_NUM_GPO(devinfo->gpio_cap);
+ if (numgpo > 0) {
+ data = hda_command(dev,
+ HDA_CMD_GET_GPO_DATA(0, devinfo->nid));
+ }
+ hdaa_unlock(devinfo);
+ for (i = 0; i < numgpo; i++) {
+ n += snprintf(buf + n, sizeof(buf) - n, "%s%d=%d",
+ n != 0 ? " " : "", i, ((data >> i) & 1));
+ }
+ return (sysctl_handle_string(oidp, buf, sizeof(buf), req));
+}
+
+static int
+hdaa_sysctl_gpo_config(SYSCTL_HANDLER_ARGS)
+{
+ struct hdaa_devinfo *devinfo = oidp->oid_arg1;
+ char buf[256];
+ int error, n = 0, i, numgpo;
+ uint32_t gpo, x;
+
+ gpo = devinfo->newgpo;
+ numgpo = HDA_PARAM_GPIO_COUNT_NUM_GPO(devinfo->gpio_cap);
+ buf[0] = 0;
+ for (i = 0; i < numgpo; i++) {
+ x = (gpo & HDAA_GPIO_MASK(i)) >> HDAA_GPIO_SHIFT(i);
+ n += snprintf(buf + n, sizeof(buf) - n, "%s%d=%s",
+ n != 0 ? " " : "", i, HDA_GPIO_ACTIONS[x]);
+ }
+ error = sysctl_handle_string(oidp, buf, sizeof(buf), req);
+ if (error != 0 || req->newptr == NULL)
+ return (error);
+ if (strncmp(buf, "0x", 2) == 0)
+ gpo = strtol(buf + 2, NULL, 16);
+ else
+ gpo = hdaa_gpio_patch(gpo, buf);
+ hdaa_lock(devinfo);
+ devinfo->newgpo = devinfo->gpo = gpo;
+ hdaa_gpo_commit(devinfo);
+ hdaa_unlock(devinfo);
+ return (0);
+}
+
+static int
+hdaa_sysctl_reconfig(SYSCTL_HANDLER_ARGS)
+{
+ device_t dev;
+ struct hdaa_devinfo *devinfo;
+ int error, val;
+
+ dev = oidp->oid_arg1;
+ devinfo = device_get_softc(dev);
+ if (devinfo == NULL)
+ return (EINVAL);
+ val = 0;
+ error = sysctl_handle_int(oidp, &val, 0, req);
+ if (error != 0 || req->newptr == NULL || val == 0)
+ return (error);
+
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Reconfiguration...\n");
+ );
+ if ((error = device_delete_children(dev)) != 0)
+ return (error);
+ hdaa_lock(devinfo);
+ hdaa_unconfigure(dev);
+ hdaa_configure(dev);
+ hdaa_unlock(devinfo);
+ bus_generic_attach(dev);
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Reconfiguration done\n");
+ );
+ return (0);
+}
+
+static int
+hdaa_suspend(device_t dev)
+{
+ struct hdaa_devinfo *devinfo = device_get_softc(dev);
+ int i;
+
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Suspend...\n");
+ );
+ hdaa_lock(devinfo);
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Stop streams...\n");
+ );
+ for (i = 0; i < devinfo->num_chans; i++) {
+ if (devinfo->chans[i].flags & HDAA_CHN_RUNNING) {
+ devinfo->chans[i].flags |= HDAA_CHN_SUSPEND;
+ hdaa_channel_stop(&devinfo->chans[i]);
+ }
+ }
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Power down FG"
+ " nid=%d to the D3 state...\n",
+ devinfo->nid);
+ );
+ hda_command(devinfo->dev,
+ HDA_CMD_SET_POWER_STATE(0,
+ devinfo->nid, HDA_CMD_POWER_STATE_D3));
+ callout_stop(&devinfo->poll_jack);
+ hdaa_unlock(devinfo);
+ callout_drain(&devinfo->poll_jack);
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Suspend done\n");
+ );
+ return (0);
+}
+
+static int
+hdaa_resume(device_t dev)
+{
+ struct hdaa_devinfo *devinfo = device_get_softc(dev);
+ int i;
+
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Resume...\n");
+ );
+ hdaa_lock(devinfo);
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Power up audio FG nid=%d...\n",
+ devinfo->nid);
+ );
+ hdaa_powerup(devinfo);
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "AFG commit...\n");
+ );
+ hdaa_audio_commit(devinfo);
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Applying direct built-in patches...\n");
+ );
+ hdaa_patch_direct(devinfo);
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Pin sense init...\n");
+ );
+ hdaa_sense_init(devinfo);
+
+ hdaa_unlock(devinfo);
+ for (i = 0; i < devinfo->num_devs; i++) {
+ struct hdaa_pcm_devinfo *pdevinfo = &devinfo->devs[i];
+ HDA_BOOTHVERBOSE(
+ device_printf(pdevinfo->dev,
+ "OSS mixer reinitialization...\n");
+ );
+ if (mixer_reinit(pdevinfo->dev) == -1)
+ device_printf(pdevinfo->dev,
+ "unable to reinitialize the mixer\n");
+ }
+ hdaa_lock(devinfo);
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Start streams...\n");
+ );
+ for (i = 0; i < devinfo->num_chans; i++) {
+ if (devinfo->chans[i].flags & HDAA_CHN_SUSPEND) {
+ devinfo->chans[i].flags &= ~HDAA_CHN_SUSPEND;
+ hdaa_channel_start(&devinfo->chans[i]);
+ }
+ }
+ hdaa_unlock(devinfo);
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Resume done\n");
+ );
+ return (0);
+}
+
+static int
+hdaa_probe(device_t dev)
+{
+ char buf[128];
+
+ if (hda_get_node_type(dev) != HDA_PARAM_FCT_GRP_TYPE_NODE_TYPE_AUDIO)
+ return (ENXIO);
+ snprintf(buf, sizeof(buf), "%s Audio Function Group",
+ device_get_desc(device_get_parent(dev)));
+ device_set_desc_copy(dev, buf);
+ return (BUS_PROBE_DEFAULT);
+}
+
+static int
+hdaa_attach(device_t dev)
+{
+ struct hdaa_devinfo *devinfo = device_get_softc(dev);
+ uint32_t res;
+ nid_t nid = hda_get_node_id(dev);
+
+ devinfo->dev = dev;
+ devinfo->lock = HDAC_GET_MTX(device_get_parent(dev), dev);
+ devinfo->nid = nid;
+ devinfo->newquirks = -1;
+ devinfo->newgpio = -1;
+ devinfo->newgpo = -1;
+ callout_init(&devinfo->poll_jack, CALLOUT_MPSAFE);
+ devinfo->poll_ival = hz;
+
+ hdaa_lock(devinfo);
+ res = hda_command(dev,
+ HDA_CMD_GET_PARAMETER(0 , nid, HDA_PARAM_SUB_NODE_COUNT));
+ hdaa_unlock(devinfo);
+
+ devinfo->nodecnt = HDA_PARAM_SUB_NODE_COUNT_TOTAL(res);
+ devinfo->startnode = HDA_PARAM_SUB_NODE_COUNT_START(res);
+ devinfo->endnode = devinfo->startnode + devinfo->nodecnt;
+
+ HDA_BOOTVERBOSE(
+ device_printf(dev,
+ "Audio Function Group at nid=%d: %d subnodes %d-%d\n",
+ nid, devinfo->nodecnt,
+ devinfo->startnode, devinfo->endnode - 1);
+ );
+
+ if (devinfo->nodecnt > 0)
+ devinfo->widget = (struct hdaa_widget *)malloc(
+ sizeof(*(devinfo->widget)) * devinfo->nodecnt, M_HDAA,
+ M_WAITOK | M_ZERO);
+ else
+ devinfo->widget = NULL;
+
+ hdaa_lock(devinfo);
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Powering up...\n");
+ );
+ hdaa_powerup(devinfo);
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Parsing audio FG...\n");
+ );
+ hdaa_audio_parse(devinfo);
+ HDA_BOOTVERBOSE(
+ device_printf(dev, "Original pins configuration:\n");
+ hdaa_dump_pin_configs(devinfo);
+ );
+ hdaa_configure(dev);
+ hdaa_unlock(devinfo);
+
+ SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
+ SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO,
+ "config", CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE,
+ &devinfo->newquirks, sizeof(&devinfo->newquirks),
+ hdaa_sysctl_quirks, "A", "Configuration options");
+ SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
+ SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO,
+ "gpi_state", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE,
+ devinfo, sizeof(devinfo),
+ hdaa_sysctl_gpi_state, "A", "GPI state");
+ SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
+ SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO,
+ "gpio_state", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE,
+ devinfo, sizeof(devinfo),
+ hdaa_sysctl_gpio_state, "A", "GPIO state");
+ SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
+ SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO,
+ "gpio_config", CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE,
+ devinfo, sizeof(devinfo),
+ hdaa_sysctl_gpio_config, "A", "GPIO configuration");
+ SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
+ SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO,
+ "gpo_state", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE,
+ devinfo, sizeof(devinfo),
+ hdaa_sysctl_gpo_state, "A", "GPO state");
+ SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
+ SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO,
+ "gpo_config", CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE,
+ devinfo, sizeof(devinfo),
+ hdaa_sysctl_gpo_config, "A", "GPO configuration");
+ SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
+ SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO,
+ "reconfig", CTLTYPE_INT | CTLFLAG_RW,
+ dev, sizeof(dev),
+ hdaa_sysctl_reconfig, "I", "Reprocess configuration");
+ bus_generic_attach(dev);
+ return (0);
+}
+
+static int
+hdaa_detach(device_t dev)
+{
+ struct hdaa_devinfo *devinfo = device_get_softc(dev);
+ int error;
+
+ if ((error = device_delete_children(dev)) != 0)
+ return (error);
+
+ hdaa_lock(devinfo);
+ hdaa_unconfigure(dev);
+ devinfo->poll_ival = 0;
+ callout_stop(&devinfo->poll_jack);
+ hdaa_unlock(devinfo);
+ callout_drain(&devinfo->poll_jack);
+
+ free(devinfo->widget, M_HDAA);
+ return (0);
+}
+
+static int
+hdaa_print_child(device_t dev, device_t child)
+{
+ struct hdaa_devinfo *devinfo = device_get_softc(dev);
+ struct hdaa_pcm_devinfo *pdevinfo =
+ (struct hdaa_pcm_devinfo *)device_get_ivars(child);
+ struct hdaa_audio_as *as;
+ int retval, first = 1, i;
+
+ retval = bus_print_child_header(dev, child);
+ retval += printf(" at nid ");
+ if (pdevinfo->playas >= 0) {
+ as = &devinfo->as[pdevinfo->playas];
+ for (i = 0; i < 16; i++) {
+ if (as->pins[i] <= 0)
+ continue;
+ retval += printf("%s%d", first ? "" : ",", as->pins[i]);
+ first = 0;
+ }
+ }
+ if (pdevinfo->recas >= 0) {
+ if (pdevinfo->playas >= 0) {
+ retval += printf(" and ");
+ first = 1;
+ }
+ as = &devinfo->as[pdevinfo->recas];
+ for (i = 0; i < 16; i++) {
+ if (as->pins[i] <= 0)
+ continue;
+ retval += printf("%s%d", first ? "" : ",", as->pins[i]);
+ first = 0;
+ }
+ }
+ retval += bus_print_child_footer(dev, child);
+
+ return (retval);
+}
+
+static int
+hdaa_child_location_str(device_t dev, device_t child, char *buf,
+ size_t buflen)
+{
+ struct hdaa_devinfo *devinfo = device_get_softc(dev);
+ struct hdaa_pcm_devinfo *pdevinfo =
+ (struct hdaa_pcm_devinfo *)device_get_ivars(child);
+ struct hdaa_audio_as *as;
+ int first = 1, i, len = 0;
+
+ len += snprintf(buf + len, buflen - len, "nid=");
+ if (pdevinfo->playas >= 0) {
+ as = &devinfo->as[pdevinfo->playas];
+ for (i = 0; i < 16; i++) {
+ if (as->pins[i] <= 0)
+ continue;
+ len += snprintf(buf + len, buflen - len,
+ "%s%d", first ? "" : ",", as->pins[i]);
+ first = 0;
+ }
+ }
+ if (pdevinfo->recas >= 0) {
+ as = &devinfo->as[pdevinfo->recas];
+ for (i = 0; i < 16; i++) {
+ if (as->pins[i] <= 0)
+ continue;
+ len += snprintf(buf + len, buflen - len,
+ "%s%d", first ? "" : ",", as->pins[i]);
+ first = 0;
+ }
+ }
+ return (0);
+}
+
+static void
+hdaa_stream_intr(device_t dev, int dir, int stream)
+{
+ struct hdaa_devinfo *devinfo = device_get_softc(dev);
+ struct hdaa_chan *ch;
+ int i;
+
+ for (i = 0; i < devinfo->num_chans; i++) {
+ ch = &devinfo->chans[i];
+ if (!(ch->flags & HDAA_CHN_RUNNING))
+ continue;
+ if (ch->dir == ((dir == 1) ? PCMDIR_PLAY : PCMDIR_REC) &&
+ ch->sid == stream) {
+ hdaa_unlock(devinfo);
+ chn_intr(ch->c);
+ hdaa_lock(devinfo);
+ }
+ }
+}
+
+static void
+hdaa_unsol_intr(device_t dev, uint32_t resp)
+{
+ struct hdaa_devinfo *devinfo = device_get_softc(dev);
+ struct hdaa_widget *w;
+ int i, tag, flags;
+
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Unsolicited response %08x\n", resp);
+ );
+ tag = resp >> 26;
+ for (i = devinfo->startnode; i < devinfo->endnode; i++) {
+ w = hdaa_widget_get(devinfo, i);
+ if (w == NULL || w->enable == 0 || w->type !=
+ HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
+ continue;
+ if (w->unsol != tag)
+ continue;
+ if (HDA_PARAM_PIN_CAP_DP(w->wclass.pin.cap) ||
+ HDA_PARAM_PIN_CAP_HDMI(w->wclass.pin.cap))
+ flags = resp & 0x03;
+ else
+ flags = 0x01;
+ if (flags & 0x01)
+ hdaa_presence_handler(w);
+ if (flags & 0x02)
+ hdaa_eld_handler(w);
+ }
+}
+
+static device_method_t hdaa_methods[] = {
+ /* device interface */
+ DEVMETHOD(device_probe, hdaa_probe),
+ DEVMETHOD(device_attach, hdaa_attach),
+ DEVMETHOD(device_detach, hdaa_detach),
+ DEVMETHOD(device_suspend, hdaa_suspend),
+ DEVMETHOD(device_resume, hdaa_resume),
+ /* Bus interface */
+ DEVMETHOD(bus_print_child, hdaa_print_child),
+ DEVMETHOD(bus_child_location_str, hdaa_child_location_str),
+ DEVMETHOD(hdac_stream_intr, hdaa_stream_intr),
+ DEVMETHOD(hdac_unsol_intr, hdaa_unsol_intr),
+ DEVMETHOD(hdac_pindump, hdaa_pindump),
+ { 0, 0 }
+};
+
+static driver_t hdaa_driver = {
+ "hdaa",
+ hdaa_methods,
+ sizeof(struct hdaa_devinfo),
+};
+
+static devclass_t hdaa_devclass;
+
+DRIVER_MODULE(snd_hda, hdacc, hdaa_driver, hdaa_devclass, 0, 0);
+
+static void
+hdaa_chan_formula(struct hdaa_devinfo *devinfo, int asid,
+ char *buf, int buflen)
+{
+ struct hdaa_audio_as *as;
+ int c;
+
+ as = &devinfo->as[asid];
+ c = devinfo->chans[as->chans[0]].channels;
+ if (c == 1)
+ snprintf(buf, buflen, "mono");
+ else if (c == 2)
+ buf[0] = 0;
+ else if (as->pinset == 0x0003)
+ snprintf(buf, buflen, "3.1");
+ else if (as->pinset == 0x0005 || as->pinset == 0x0011)
+ snprintf(buf, buflen, "4.0");
+ else if (as->pinset == 0x0007 || as->pinset == 0x0013)
+ snprintf(buf, buflen, "5.1");
+ else if (as->pinset == 0x0017)
+ snprintf(buf, buflen, "7.1");
+ else
+ snprintf(buf, buflen, "%dch", c);
+}
+
+static int
+hdaa_sysctl_32bit(SYSCTL_HANDLER_ARGS)
+{
+ struct hdaa_audio_as *as = (struct hdaa_audio_as *)oidp->oid_arg1;
+ struct hdaa_pcm_devinfo *pdevinfo = as->pdevinfo;
+ struct hdaa_devinfo *devinfo = pdevinfo->devinfo;
+ struct hdaa_chan *ch;
+ int error, val, i;
+ uint32_t pcmcap;
+
+ ch = &devinfo->chans[as->chans[0]];
+ val = (ch->bit32 == 4) ? 32 : ((ch->bit32 == 3) ? 24 :
+ ((ch->bit32 == 2) ? 20 : 0));
+ error = sysctl_handle_int(oidp, &val, 0, req);
+ if (error != 0 || req->newptr == NULL)
+ return (error);
+ pcmcap = ch->supp_pcm_size_rate;
+ if (val == 32 && HDA_PARAM_SUPP_PCM_SIZE_RATE_32BIT(pcmcap))
+ ch->bit32 = 4;
+ else if (val == 24 && HDA_PARAM_SUPP_PCM_SIZE_RATE_24BIT(pcmcap))
+ ch->bit32 = 3;
+ else if (val == 20 && HDA_PARAM_SUPP_PCM_SIZE_RATE_20BIT(pcmcap))
+ ch->bit32 = 2;
+ else
+ return (EINVAL);
+ for (i = 1; i < as->num_chans; i++)
+ devinfo->chans[as->chans[i]].bit32 = ch->bit32;
+ return (0);
+}
+
+static int
+hdaa_pcm_probe(device_t dev)
+{
+ struct hdaa_pcm_devinfo *pdevinfo =
+ (struct hdaa_pcm_devinfo *)device_get_ivars(dev);
+ struct hdaa_devinfo *devinfo = pdevinfo->devinfo;
+ char chans1[8], chans2[8];
+ char buf[128];
+ int loc1, loc2;
+
+ if (pdevinfo->playas >= 0)
+ loc1 = devinfo->as[pdevinfo->playas].location;
+ else
+ loc1 = devinfo->as[pdevinfo->recas].location;
+ if (pdevinfo->recas >= 0)
+ loc2 = devinfo->as[pdevinfo->recas].location;
+ else
+ loc2 = loc1;
+ if (loc1 != loc2)
+ loc1 = -2;
+ if (loc1 >= 0 && HDA_LOCS[loc1][0] == '0')
+ loc1 = -2;
+ chans1[0] = 0;
+ chans2[0] = 0;
+ if (pdevinfo->playas >= 0)
+ hdaa_chan_formula(devinfo, pdevinfo->playas,
+ chans1, sizeof(chans1));
+ if (pdevinfo->recas >= 0)
+ hdaa_chan_formula(devinfo, pdevinfo->recas,
+ chans2, sizeof(chans2));
+ if (chans1[0] != 0 || chans2[0] != 0) {
+ if (chans1[0] == 0 && pdevinfo->playas >= 0)
+ snprintf(chans1, sizeof(chans1), "2.0");
+ else if (chans2[0] == 0 && pdevinfo->recas >= 0)
+ snprintf(chans2, sizeof(chans2), "2.0");
+ if (strcmp(chans1, chans2) == 0)
+ chans2[0] = 0;
+ }
+ snprintf(buf, sizeof(buf), "%s PCM (%s%s%s%s%s%s%s)",
+ device_get_desc(device_get_parent(device_get_parent(dev))),
+ loc1 >= 0 ? HDA_LOCS[loc1] : "", loc1 >= 0 ? " " : "",
+ (pdevinfo->digital == 0x7)?"HDMI/DP":
+ ((pdevinfo->digital == 0x5)?"DisplayPort":
+ ((pdevinfo->digital == 0x3)?"HDMI":
+ ((pdevinfo->digital)?"Digital":"Analog"))),
+ chans1[0] ? " " : "", chans1,
+ chans2[0] ? "/" : "", chans2);
+ device_set_desc_copy(dev, buf);
+ return (BUS_PROBE_SPECIFIC);
+}
+
+static int
+hdaa_pcm_attach(device_t dev)
+{
+ struct hdaa_pcm_devinfo *pdevinfo =
+ (struct hdaa_pcm_devinfo *)device_get_ivars(dev);
+ struct hdaa_devinfo *devinfo = pdevinfo->devinfo;
+ struct hdaa_audio_as *as;
+ struct snddev_info *d;
+ char status[SND_STATUSLEN];
+ int i;
+
+ pdevinfo->chan_size = pcm_getbuffersize(dev,
+ HDA_BUFSZ_MIN, HDA_BUFSZ_DEFAULT, HDA_BUFSZ_MAX);
+
+ HDA_BOOTVERBOSE(
+ device_printf(dev, "+--------------------------------------+\n");
+ device_printf(dev, "| DUMPING PCM Playback/Record Channels |\n");
+ device_printf(dev, "+--------------------------------------+\n");
+ hdaa_dump_pcmchannels(pdevinfo);
+ device_printf(dev, "\n");
+ device_printf(dev, "+-------------------------------+\n");
+ device_printf(dev, "| DUMPING Playback/Record Paths |\n");
+ device_printf(dev, "+-------------------------------+\n");
+ hdaa_dump_dac(pdevinfo);
+ hdaa_dump_adc(pdevinfo);
+ hdaa_dump_mix(pdevinfo);
+ device_printf(dev, "\n");
+ device_printf(dev, "+-------------------------+\n");
+ device_printf(dev, "| DUMPING Volume Controls |\n");
+ device_printf(dev, "+-------------------------+\n");
+ hdaa_dump_ctls(pdevinfo, "Master Volume", SOUND_MASK_VOLUME);
+ hdaa_dump_ctls(pdevinfo, "PCM Volume", SOUND_MASK_PCM);
+ hdaa_dump_ctls(pdevinfo, "CD Volume", SOUND_MASK_CD);
+ hdaa_dump_ctls(pdevinfo, "Microphone Volume", SOUND_MASK_MIC);
+ hdaa_dump_ctls(pdevinfo, "Microphone2 Volume", SOUND_MASK_MONITOR);
+ hdaa_dump_ctls(pdevinfo, "Line-in Volume", SOUND_MASK_LINE);
+ hdaa_dump_ctls(pdevinfo, "Speaker/Beep Volume", SOUND_MASK_SPEAKER);
+ hdaa_dump_ctls(pdevinfo, "Recording Level", SOUND_MASK_RECLEV);
+ hdaa_dump_ctls(pdevinfo, "Input Mix Level", SOUND_MASK_IMIX);
+ hdaa_dump_ctls(pdevinfo, "Input Monitoring Level", SOUND_MASK_IGAIN);
+ hdaa_dump_ctls(pdevinfo, NULL, 0);
+ device_printf(dev, "\n");
+ );
+
+ if (resource_int_value(device_get_name(dev),
+ device_get_unit(dev), "blocksize", &i) == 0 && i > 0) {
+ i &= HDA_BLK_ALIGN;
+ if (i < HDA_BLK_MIN)
+ i = HDA_BLK_MIN;
+ pdevinfo->chan_blkcnt = pdevinfo->chan_size / i;
+ i = 0;
+ while (pdevinfo->chan_blkcnt >> i)
+ i++;
+ pdevinfo->chan_blkcnt = 1 << (i - 1);
+ if (pdevinfo->chan_blkcnt < HDA_BDL_MIN)
+ pdevinfo->chan_blkcnt = HDA_BDL_MIN;
+ else if (pdevinfo->chan_blkcnt > HDA_BDL_MAX)
+ pdevinfo->chan_blkcnt = HDA_BDL_MAX;
+ } else
+ pdevinfo->chan_blkcnt = HDA_BDL_DEFAULT;
+
+ /*
+ * We don't register interrupt handler with snd_setup_intr
+ * in pcm device. Mark pcm device as MPSAFE manually.
+ */
+ pcm_setflags(dev, pcm_getflags(dev) | SD_F_MPSAFE);
+
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "OSS mixer initialization...\n");
+ );
+ if (mixer_init(dev, &hdaa_audio_ctl_ossmixer_class, pdevinfo) != 0)
+ device_printf(dev, "Can't register mixer\n");
+
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Registering PCM channels...\n");
+ );
+ if (pcm_register(dev, pdevinfo, (pdevinfo->playas >= 0)?1:0,
+ (pdevinfo->recas >= 0)?1:0) != 0)
+ device_printf(dev, "Can't register PCM\n");
+
+ pdevinfo->registered++;
+
+ d = device_get_softc(dev);
+ if (pdevinfo->playas >= 0) {
+ as = &devinfo->as[pdevinfo->playas];
+ for (i = 0; i < as->num_chans; i++)
+ pcm_addchan(dev, PCMDIR_PLAY, &hdaa_channel_class,
+ &devinfo->chans[as->chans[i]]);
+ SYSCTL_ADD_PROC(&d->play_sysctl_ctx,
+ SYSCTL_CHILDREN(d->play_sysctl_tree), OID_AUTO,
+ "32bit", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE,
+ as, sizeof(as), hdaa_sysctl_32bit, "I",
+ "Resolution of 32bit samples (20/24/32bit)");
+ }
+ if (pdevinfo->recas >= 0) {
+ as = &devinfo->as[pdevinfo->recas];
+ for (i = 0; i < as->num_chans; i++)
+ pcm_addchan(dev, PCMDIR_REC, &hdaa_channel_class,
+ &devinfo->chans[as->chans[i]]);
+ SYSCTL_ADD_PROC(&d->rec_sysctl_ctx,
+ SYSCTL_CHILDREN(d->rec_sysctl_tree), OID_AUTO,
+ "32bit", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE,
+ as, sizeof(as), hdaa_sysctl_32bit, "I",
+ "Resolution of 32bit samples (20/24/32bit)");
+ pdevinfo->autorecsrc = 2;
+ resource_int_value(device_get_name(dev), device_get_unit(dev),
+ "rec.autosrc", &pdevinfo->autorecsrc);
+ SYSCTL_ADD_INT(&d->rec_sysctl_ctx,
+ SYSCTL_CHILDREN(d->rec_sysctl_tree), OID_AUTO,
+ "autosrc", CTLTYPE_INT | CTLFLAG_RW,
+ &pdevinfo->autorecsrc, 0,
+ "Automatic recording source selection");
+ }
+
+ if (pdevinfo->mixer != NULL) {
+ hdaa_audio_ctl_set_defaults(pdevinfo);
+ if (pdevinfo->recas >= 0) {
+ as = &devinfo->as[pdevinfo->recas];
+ hdaa_lock(devinfo);
+ hdaa_autorecsrc_handler(as, NULL);
+ hdaa_unlock(devinfo);
+ }
+ }
+
+ snprintf(status, SND_STATUSLEN, "on %s %s",
+ device_get_nameunit(device_get_parent(dev)),
+ PCM_KLDSTRING(snd_hda));
+ pcm_setstatus(dev, status);
+
+ return (0);
+}
+
+static int
+hdaa_pcm_detach(device_t dev)
+{
+ struct hdaa_pcm_devinfo *pdevinfo =
+ (struct hdaa_pcm_devinfo *)device_get_ivars(dev);
+ int err;
+
+ if (pdevinfo->registered > 0) {
+ err = pcm_unregister(dev);
+ if (err != 0)
+ return (err);
+ }
+
+ return (0);
+}
+
+static device_method_t hdaa_pcm_methods[] = {
+ /* device interface */
+ DEVMETHOD(device_probe, hdaa_pcm_probe),
+ DEVMETHOD(device_attach, hdaa_pcm_attach),
+ DEVMETHOD(device_detach, hdaa_pcm_detach),
+ { 0, 0 }
+};
+
+static driver_t hdaa_pcm_driver = {
+ "pcm",
+ hdaa_pcm_methods,
+ PCM_SOFTC_SIZE,
+};
+
+DRIVER_MODULE(snd_hda_pcm, hdaa, hdaa_pcm_driver, pcm_devclass, 0, 0);
+MODULE_DEPEND(snd_hda, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER);
+MODULE_VERSION(snd_hda, 1);
diff --git a/sys/dev/sound/pci/hda/hdaa.h b/sys/dev/sound/pci/hda/hdaa.h
new file mode 100644
index 0000000..06ee87e
--- /dev/null
+++ b/sys/dev/sound/pci/hda/hdaa.h
@@ -0,0 +1,274 @@
+/*-7
+ * Copyright (c) 2006 Stephane E. Potvin <sepotvin@videotron.ca>
+ * Copyright (c) 2006 Ariff Abdullah <ariff@FreeBSD.org>
+ * Copyright (c) 2008-2012 Alexander Motin <mav@FreeBSD.org>
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ */
+
+/*
+ * Intel High Definition Audio (Audio function quirks) driver for FreeBSD.
+ */
+
+#ifndef _HDAA_QUIRKS_H_
+#define _HDAA_QUIRKS_H_
+
+#define HDAA_GPIO_SHIFT(n) (n * 3)
+#define HDAA_GPIO_MASK(n) (0x7 << (n * 3))
+#define HDAA_GPIO_KEEP(n) (0x0 << (n * 3))
+#define HDAA_GPIO_SET(n) (0x1 << (n * 3))
+#define HDAA_GPIO_CLEAR(n) (0x2 << (n * 3))
+#define HDAA_GPIO_DISABLE(n) (0x3 << (n * 3))
+#define HDAA_GPIO_INPUT(n) (0x4 << (n * 3))
+
+/* 9 - 25 = anything else */
+#define HDAA_QUIRK_SOFTPCMVOL (1 << 9)
+#define HDAA_QUIRK_FIXEDRATE (1 << 10)
+#define HDAA_QUIRK_FORCESTEREO (1 << 11)
+#define HDAA_QUIRK_EAPDINV (1 << 12)
+#define HDAA_QUIRK_SENSEINV (1 << 14)
+
+/* 26 - 31 = vrefs */
+#define HDAA_QUIRK_IVREF50 (1 << 26)
+#define HDAA_QUIRK_IVREF80 (1 << 27)
+#define HDAA_QUIRK_IVREF100 (1 << 28)
+#define HDAA_QUIRK_OVREF50 (1 << 29)
+#define HDAA_QUIRK_OVREF80 (1 << 30)
+#define HDAA_QUIRK_OVREF100 (1 << 31)
+
+#define HDAA_QUIRK_IVREF (HDAA_QUIRK_IVREF50 | HDAA_QUIRK_IVREF80 | \
+ HDAA_QUIRK_IVREF100)
+#define HDAA_QUIRK_OVREF (HDAA_QUIRK_OVREF50 | HDAA_QUIRK_OVREF80 | \
+ HDAA_QUIRK_OVREF100)
+#define HDAA_QUIRK_VREF (HDAA_QUIRK_IVREF | HDAA_QUIRK_OVREF)
+
+#define HDAA_AMP_VOL_DEFAULT (-1)
+#define HDAA_AMP_MUTE_DEFAULT (0xffffffff)
+#define HDAA_AMP_MUTE_NONE (0)
+#define HDAA_AMP_MUTE_LEFT (1 << 0)
+#define HDAA_AMP_MUTE_RIGHT (1 << 1)
+#define HDAA_AMP_MUTE_ALL (HDAA_AMP_MUTE_LEFT | HDAA_AMP_MUTE_RIGHT)
+
+#define HDAA_AMP_LEFT_MUTED(v) ((v) & (HDAA_AMP_MUTE_LEFT))
+#define HDAA_AMP_RIGHT_MUTED(v) (((v) & HDAA_AMP_MUTE_RIGHT) >> 1)
+
+/* Widget in playback receiving signal from recording. */
+#define HDAA_ADC_MONITOR (1 << 0)
+/* Input mixer widget needs volume control as destination. */
+#define HDAA_IMIX_AS_DST (2 << 0)
+
+#define HDAA_CTL_OUT 1
+#define HDAA_CTL_IN 2
+
+#define HDA_MAX_CONNS 32
+#define HDA_MAX_NAMELEN 32
+
+struct hdaa_audio_as;
+struct hdaa_audio_ctl;
+struct hdaa_chan;
+struct hdaa_devinfo;
+struct hdaa_pcm_devinfo;
+struct hdaa_widget;
+
+struct hdaa_widget {
+ nid_t nid;
+ int type;
+ int enable;
+ int nconns, selconn;
+ int waspin;
+ uint32_t pflags;
+ int bindas;
+ int bindseqmask;
+ int ossdev;
+ uint32_t ossmask;
+ int unsol;
+ nid_t conns[HDA_MAX_CONNS];
+ u_char connsenable[HDA_MAX_CONNS];
+ char name[HDA_MAX_NAMELEN];
+ uint8_t *eld;
+ int eld_len;
+ struct hdaa_devinfo *devinfo;
+ struct {
+ uint32_t widget_cap;
+ uint32_t outamp_cap;
+ uint32_t inamp_cap;
+ uint32_t supp_stream_formats;
+ uint32_t supp_pcm_size_rate;
+ uint32_t eapdbtl;
+ } param;
+ union {
+ struct {
+ uint32_t config;
+ uint32_t original;
+ uint32_t newconf;
+ uint32_t cap;
+ uint32_t ctrl;
+ int connected;
+ } pin;
+ struct {
+ uint8_t stripecap;
+ } conv;
+ } wclass;
+};
+
+struct hdaa_audio_ctl {
+ struct hdaa_widget *widget, *childwidget;
+ int enable;
+ int index, dir, ndir;
+ int mute, step, size, offset;
+ int left, right, forcemute;
+ uint32_t muted;
+ uint32_t ossmask; /* OSS devices that may affect control. */
+ int devleft[SOUND_MIXER_NRDEVICES]; /* Left ampl in 1/4dB. */
+ int devright[SOUND_MIXER_NRDEVICES]; /* Right ampl in 1/4dB. */
+ int devmute[SOUND_MIXER_NRDEVICES]; /* Mutes per OSS device. */
+};
+
+/* Association is a group of pins bound for some special function. */
+struct hdaa_audio_as {
+ u_char enable;
+ u_char index;
+ u_char dir;
+ u_char pincnt;
+ u_char fakeredir;
+ u_char digital;
+ uint16_t pinset;
+ nid_t hpredir;
+ nid_t pins[16];
+ nid_t dacs[2][16];
+ int num_chans;
+ int chans[2];
+ int location; /* Pins location, if all have the same */
+ int mixed; /* Mixed/multiplexed recording, not multichannel. */
+ struct hdaa_pcm_devinfo *pdevinfo;
+};
+
+struct hdaa_pcm_devinfo {
+ device_t dev;
+ struct hdaa_devinfo *devinfo;
+ struct snd_mixer *mixer;
+ int index;
+ int registered;
+ int playas, recas;
+ u_char left[SOUND_MIXER_NRDEVICES];
+ u_char right[SOUND_MIXER_NRDEVICES];
+ int minamp[SOUND_MIXER_NRDEVICES]; /* Minimal amps in 1/4dB. */
+ int maxamp[SOUND_MIXER_NRDEVICES]; /* Maximal amps in 1/4dB. */
+ int chan_size;
+ int chan_blkcnt;
+ u_char digital;
+ uint32_t ossmask; /* Mask of supported OSS devices. */
+ uint32_t recsrc; /* Mask of supported OSS sources. */
+ int autorecsrc;
+};
+
+struct hdaa_devinfo {
+ device_t dev;
+ struct mtx *lock;
+ nid_t nid;
+ nid_t startnode, endnode;
+ uint32_t outamp_cap;
+ uint32_t inamp_cap;
+ uint32_t supp_stream_formats;
+ uint32_t supp_pcm_size_rate;
+ uint32_t gpio_cap;
+ uint32_t quirks;
+ uint32_t newquirks;
+ uint32_t gpio;
+ uint32_t newgpio;
+ uint32_t gpo;
+ uint32_t newgpo;
+ int nodecnt;
+ int ctlcnt;
+ int ascnt;
+ int num_devs;
+ int num_chans;
+ struct hdaa_widget *widget;
+ struct hdaa_audio_ctl *ctl;
+ struct hdaa_audio_as *as;
+ struct hdaa_pcm_devinfo *devs;
+ struct hdaa_chan *chans;
+ struct callout poll_jack;
+ int poll_ival;
+};
+
+#define HDAA_CHN_RUNNING 0x00000001
+#define HDAA_CHN_SUSPEND 0x00000002
+
+struct hdaa_chan {
+ struct snd_dbuf *b;
+ struct pcm_channel *c;
+ struct pcmchan_caps caps;
+ struct hdaa_devinfo *devinfo;
+ struct hdaa_pcm_devinfo *pdevinfo;
+ uint32_t spd, fmt, fmtlist[32], pcmrates[16];
+ uint32_t supp_stream_formats, supp_pcm_size_rate;
+ uint32_t blkcnt, blksz;
+ uint32_t *dmapos;
+ uint32_t flags;
+ int dir;
+ int off;
+ int sid;
+ int bit16, bit32;
+ int channels; /* Number of audio channels. */
+ int as; /* Number of association. */
+ int asindex; /* Index within association. */
+ nid_t io[16];
+ uint8_t stripecap; /* AND of stripecap of all ios. */
+ uint8_t stripectl; /* stripe to use to all ios. */
+};
+
+#define MINQDB(ctl) \
+ ((0 - (ctl)->offset) * ((ctl)->size + 1))
+
+#define MAXQDB(ctl) \
+ (((ctl)->step - (ctl)->offset) * ((ctl)->size + 1))
+
+#define RANGEQDB(ctl) \
+ ((ctl)->step * ((ctl)->size + 1))
+
+#define VAL2QDB(ctl, val) \
+ (((ctl)->size + 1) * ((int)(val) - (ctl)->offset))
+
+#define QDB2VAL(ctl, qdb) \
+ imax(imin((((qdb) + (ctl)->size / 2 * ((qdb) > 0 ? 1 : -1)) / \
+ ((ctl)->size + 1) + (ctl)->offset), (ctl)->step), 0)
+
+#define hdaa_codec_id(devinfo) \
+ (((uint32_t)hda_get_vendor_id(devinfo->dev) << 16) + \
+ hda_get_device_id(devinfo->dev))
+
+#define hdaa_subvendor_id(devinfo) \
+ (((uint32_t)hda_get_subdevice_id(devinfo->dev) << 16) + \
+ hda_get_subvendor_id(devinfo->dev))
+
+struct hdaa_widget *hdaa_widget_get(struct hdaa_devinfo *, nid_t);
+uint32_t hdaa_widget_pin_patch(uint32_t config, const char *str);
+uint32_t hdaa_gpio_patch(uint32_t gpio, const char *str);
+
+void hdaa_patch(struct hdaa_devinfo *devinfo);
+void hdaa_patch_direct(struct hdaa_devinfo *devinfo);
+
+#endif
diff --git a/sys/dev/sound/pci/hda/hdaa_patches.c b/sys/dev/sound/pci/hda/hdaa_patches.c
new file mode 100644
index 0000000..cd03913
--- /dev/null
+++ b/sys/dev/sound/pci/hda/hdaa_patches.c
@@ -0,0 +1,638 @@
+/*-
+ * Copyright (c) 2006 Stephane E. Potvin <sepotvin@videotron.ca>
+ * Copyright (c) 2006 Ariff Abdullah <ariff@FreeBSD.org>
+ * Copyright (c) 2008-2012 Alexander Motin <mav@FreeBSD.org>
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ */
+
+/*
+ * Intel High Definition Audio (Audio function quirks) driver for FreeBSD.
+ */
+
+#ifdef HAVE_KERNEL_OPTION_HEADERS
+#include "opt_snd.h"
+#endif
+
+#include <dev/sound/pcm/sound.h>
+
+#include <sys/ctype.h>
+
+#include <dev/sound/pci/hda/hdac.h>
+#include <dev/sound/pci/hda/hdaa.h>
+#include <dev/sound/pci/hda/hda_reg.h>
+
+SND_DECLARE_FILE("$FreeBSD$");
+
+static const struct {
+ uint32_t model;
+ uint32_t id;
+ uint32_t set, unset;
+ uint32_t gpio;
+} hdac_quirks[] = {
+ /*
+ * XXX Force stereo quirk. Monoural recording / playback
+ * on few codecs (especially ALC880) seems broken or
+ * perhaps unsupported.
+ */
+ { HDA_MATCH_ALL, HDA_MATCH_ALL,
+ HDAA_QUIRK_FORCESTEREO | HDAA_QUIRK_IVREF, 0,
+ 0 },
+ { ACER_ALL_SUBVENDOR, HDA_MATCH_ALL,
+ 0, 0,
+ HDAA_GPIO_SET(0) },
+ { ASUS_G2K_SUBVENDOR, HDA_CODEC_ALC660,
+ 0, 0,
+ HDAA_GPIO_SET(0) },
+ { ASUS_M5200_SUBVENDOR, HDA_CODEC_ALC880,
+ 0, 0,
+ HDAA_GPIO_SET(0) },
+ { ASUS_A7M_SUBVENDOR, HDA_CODEC_ALC880,
+ 0, 0,
+ HDAA_GPIO_SET(0) },
+ { ASUS_A7T_SUBVENDOR, HDA_CODEC_ALC882,
+ 0, 0,
+ HDAA_GPIO_SET(0) },
+ { ASUS_W2J_SUBVENDOR, HDA_CODEC_ALC882,
+ 0, 0,
+ HDAA_GPIO_SET(0) },
+ { ASUS_U5F_SUBVENDOR, HDA_CODEC_AD1986A,
+ HDAA_QUIRK_EAPDINV, 0,
+ 0 },
+ { ASUS_A8X_SUBVENDOR, HDA_CODEC_AD1986A,
+ HDAA_QUIRK_EAPDINV, 0,
+ 0 },
+ { ASUS_F3JC_SUBVENDOR, HDA_CODEC_ALC861,
+ HDAA_QUIRK_OVREF, 0,
+ 0 },
+ { UNIWILL_9075_SUBVENDOR, HDA_CODEC_ALC861,
+ HDAA_QUIRK_OVREF, 0,
+ 0 },
+ /*{ ASUS_M2N_SUBVENDOR, HDA_CODEC_AD1988,
+ HDAA_QUIRK_IVREF80, HDAA_QUIRK_IVREF50 | HDAA_QUIRK_IVREF100,
+ 0 },*/
+ { MEDION_MD95257_SUBVENDOR, HDA_CODEC_ALC880,
+ 0, 0,
+ HDAA_GPIO_SET(1) },
+ { LENOVO_3KN100_SUBVENDOR, HDA_CODEC_AD1986A,
+ HDAA_QUIRK_EAPDINV | HDAA_QUIRK_SENSEINV, 0,
+ 0 },
+ { SAMSUNG_Q1_SUBVENDOR, HDA_CODEC_AD1986A,
+ HDAA_QUIRK_EAPDINV, 0,
+ 0 },
+ { APPLE_MB3_SUBVENDOR, HDA_CODEC_ALC885,
+ HDAA_QUIRK_OVREF50, 0,
+ HDAA_GPIO_SET(0) },
+ { APPLE_INTEL_MAC, HDA_CODEC_STAC9221,
+ 0, 0,
+ HDAA_GPIO_SET(0) | HDAA_GPIO_SET(1) },
+ { APPLE_MACBOOKPRO55, HDA_CODEC_CS4206,
+ 0, 0,
+ HDAA_GPIO_SET(1) | HDAA_GPIO_SET(3) },
+ { DELL_D630_SUBVENDOR, HDA_CODEC_STAC9205X,
+ 0, 0,
+ HDAA_GPIO_SET(0) },
+ { DELL_V1400_SUBVENDOR, HDA_CODEC_STAC9228X,
+ 0, 0,
+ HDAA_GPIO_SET(2) },
+ { DELL_V1500_SUBVENDOR, HDA_CODEC_STAC9205X,
+ 0, 0,
+ HDAA_GPIO_SET(0) },
+ { HDA_MATCH_ALL, HDA_CODEC_AD1988,
+ HDAA_QUIRK_IVREF80, HDAA_QUIRK_IVREF50 | HDAA_QUIRK_IVREF100,
+ 0 },
+ { HDA_MATCH_ALL, HDA_CODEC_AD1988B,
+ HDAA_QUIRK_IVREF80, HDAA_QUIRK_IVREF50 | HDAA_QUIRK_IVREF100,
+ 0 },
+ { HDA_MATCH_ALL, HDA_CODEC_CX20549,
+ 0, HDAA_QUIRK_FORCESTEREO,
+ 0 }
+};
+#define HDAC_QUIRKS_LEN (sizeof(hdac_quirks) / sizeof(hdac_quirks[0]))
+
+static void
+hdac_pin_patch(struct hdaa_widget *w)
+{
+ const char *patch = NULL;
+ uint32_t config, orig, id, subid;
+ nid_t nid = w->nid;
+
+ config = orig = w->wclass.pin.config;
+ id = hdaa_codec_id(w->devinfo);
+ subid = hdaa_subvendor_id(w->devinfo);
+
+ /* XXX: Old patches require complete review.
+ * Now they may create more problem then solve due to
+ * incorrect associations.
+ */
+ if (id == HDA_CODEC_ALC880 && subid == LG_LW20_SUBVENDOR) {
+ switch (nid) {
+ case 26:
+ config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK;
+ config |= HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN;
+ break;
+ case 27:
+ config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK;
+ config |= HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT;
+ break;
+ default:
+ break;
+ }
+ } else if (id == HDA_CODEC_ALC880 &&
+ (subid == CLEVO_D900T_SUBVENDOR ||
+ subid == ASUS_M5200_SUBVENDOR)) {
+ /*
+ * Super broken BIOS
+ */
+ switch (nid) {
+ case 24: /* MIC1 */
+ config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK;
+ config |= HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN;
+ break;
+ case 25: /* XXX MIC2 */
+ config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK;
+ config |= HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN;
+ break;
+ case 26: /* LINE1 */
+ config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK;
+ config |= HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN;
+ break;
+ case 27: /* XXX LINE2 */
+ config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK;
+ config |= HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN;
+ break;
+ case 28: /* CD */
+ config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK;
+ config |= HDA_CONFIG_DEFAULTCONF_DEVICE_CD;
+ break;
+ }
+ } else if (id == HDA_CODEC_ALC883 &&
+ (subid == MSI_MS034A_SUBVENDOR ||
+ HDA_DEV_MATCH(ACER_ALL_SUBVENDOR, subid))) {
+ switch (nid) {
+ case 25:
+ config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK |
+ HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK);
+ config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN |
+ HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED);
+ break;
+ case 28:
+ config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK |
+ HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK);
+ config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_CD |
+ HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED);
+ break;
+ }
+ } else if (id == HDA_CODEC_CX20549 && subid ==
+ HP_V3000_SUBVENDOR) {
+ switch (nid) {
+ case 18:
+ config &= ~HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK;
+ config |= HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_NONE;
+ break;
+ case 20:
+ config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK |
+ HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK);
+ config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN |
+ HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED);
+ break;
+ case 21:
+ config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK |
+ HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK);
+ config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_CD |
+ HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED);
+ break;
+ }
+ } else if (id == HDA_CODEC_CX20551 && subid ==
+ HP_DV5000_SUBVENDOR) {
+ switch (nid) {
+ case 20:
+ case 21:
+ config &= ~HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK;
+ config |= HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_NONE;
+ break;
+ }
+ } else if (id == HDA_CODEC_ALC861 && subid ==
+ ASUS_W6F_SUBVENDOR) {
+ switch (nid) {
+ case 11:
+ config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK |
+ HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK);
+ config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_OUT |
+ HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED);
+ break;
+ case 12:
+ case 14:
+ case 16:
+ case 31:
+ case 32:
+ config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK |
+ HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK);
+ config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN |
+ HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED);
+ break;
+ case 15:
+ config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK |
+ HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK);
+ config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT |
+ HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_JACK);
+ break;
+ }
+ } else if (id == HDA_CODEC_ALC861 && subid ==
+ UNIWILL_9075_SUBVENDOR) {
+ switch (nid) {
+ case 15:
+ config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK |
+ HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK);
+ config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT |
+ HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_JACK);
+ break;
+ }
+ }
+
+ /* New patches */
+ if (id == HDA_CODEC_AD1986A &&
+ (subid == ASUS_M2NPVMX_SUBVENDOR ||
+ subid == ASUS_A8NVMCSM_SUBVENDOR ||
+ subid == ASUS_P5PL2_SUBVENDOR)) {
+ switch (nid) {
+ case 26: /* Headphones with redirection */
+ patch = "as=1 seq=15";
+ break;
+ case 28: /* 5.1 out => 2.0 out + 1 input */
+ patch = "device=Line-in as=8 seq=1";
+ break;
+ case 29: /* Can't use this as input, as the only available mic
+ * preamplifier is busy by front panel mic (nid 31).
+ * If you want to use this rear connector as mic input,
+ * you have to disable the front panel one. */
+ patch = "as=0";
+ break;
+ case 31: /* Lot of inputs configured with as=15 and unusable */
+ patch = "as=8 seq=3";
+ break;
+ case 32:
+ patch = "as=8 seq=4";
+ break;
+ case 34:
+ patch = "as=8 seq=5";
+ break;
+ case 36:
+ patch = "as=8 seq=6";
+ break;
+ }
+ } else if (id == HDA_CODEC_ALC260 &&
+ HDA_DEV_MATCH(SONY_S5_SUBVENDOR, subid)) {
+ switch (nid) {
+ case 16:
+ patch = "seq=15 device=Headphones";
+ break;
+ }
+ } else if (id == HDA_CODEC_ALC268) {
+ if (subid == ACER_T5320_SUBVENDOR) {
+ switch (nid) {
+ case 20: /* Headphones Jack */
+ patch = "as=1 seq=15";
+ break;
+ }
+ }
+ } else if (id == HDA_CODEC_CX20561 &&
+ subid == LENOVO_B450_SUBVENDOR) {
+ switch (nid) {
+ case 22:
+ patch = "as=1 seq=15";
+ break;
+ }
+ }
+
+ if (patch != NULL)
+ config = hdaa_widget_pin_patch(config, patch);
+ HDA_BOOTVERBOSE(
+ if (config != orig)
+ device_printf(w->devinfo->dev,
+ "Patching pin config nid=%u 0x%08x -> 0x%08x\n",
+ nid, orig, config);
+ );
+ w->wclass.pin.config = config;
+}
+
+static void
+hdaa_widget_patch(struct hdaa_widget *w)
+{
+ struct hdaa_devinfo *devinfo = w->devinfo;
+ uint32_t orig;
+ nid_t beeper = -1;
+
+ orig = w->param.widget_cap;
+ /* On some codecs beeper is an input pin, but it is not recordable
+ alone. Also most of BIOSes does not declare beeper pin.
+ Change beeper pin node type to beeper to help parser. */
+ switch (hdaa_codec_id(devinfo)) {
+ case HDA_CODEC_AD1882:
+ case HDA_CODEC_AD1883:
+ case HDA_CODEC_AD1984:
+ case HDA_CODEC_AD1984A:
+ case HDA_CODEC_AD1984B:
+ case HDA_CODEC_AD1987:
+ case HDA_CODEC_AD1988:
+ case HDA_CODEC_AD1988B:
+ case HDA_CODEC_AD1989B:
+ beeper = 26;
+ break;
+ case HDA_CODEC_ALC260:
+ beeper = 23;
+ break;
+ }
+ if (hda_get_vendor_id(devinfo->dev) == REALTEK_VENDORID &&
+ hdaa_codec_id(devinfo) != HDA_CODEC_ALC260)
+ beeper = 29;
+ if (w->nid == beeper) {
+ w->param.widget_cap &= ~HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_MASK;
+ w->param.widget_cap |= HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_BEEP_WIDGET <<
+ HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_SHIFT;
+ w->waspin = 1;
+ }
+ HDA_BOOTVERBOSE(
+ if (w->param.widget_cap != orig) {
+ device_printf(w->devinfo->dev,
+ "Patching widget caps nid=%u 0x%08x -> 0x%08x\n",
+ w->nid, orig, w->param.widget_cap);
+ }
+ );
+
+ if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
+ hdac_pin_patch(w);
+}
+
+void
+hdaa_patch(struct hdaa_devinfo *devinfo)
+{
+ struct hdaa_widget *w;
+ uint32_t id, subid;
+ int i;
+
+ id = hdaa_codec_id(devinfo);
+ subid = hdaa_subvendor_id(devinfo);
+
+ /*
+ * Quirks
+ */
+ for (i = 0; i < HDAC_QUIRKS_LEN; i++) {
+ if (!(HDA_DEV_MATCH(hdac_quirks[i].model, subid) &&
+ HDA_DEV_MATCH(hdac_quirks[i].id, id)))
+ continue;
+ if (hdac_quirks[i].set != 0)
+ devinfo->quirks |=
+ hdac_quirks[i].set;
+ if (hdac_quirks[i].unset != 0)
+ devinfo->quirks &=
+ ~(hdac_quirks[i].unset);
+ }
+
+ /* Apply per-widget patch. */
+ for (i = devinfo->startnode; i < devinfo->endnode; i++) {
+ w = hdaa_widget_get(devinfo, i);
+ if (w == NULL)
+ continue;
+ hdaa_widget_patch(w);
+ }
+
+ switch (id) {
+ case HDA_CODEC_AD1983:
+ /*
+ * This CODEC has several possible usages, but none
+ * fit the parser best. Help parser to choose better.
+ */
+ /* Disable direct unmixed playback to get pcm volume. */
+ w = hdaa_widget_get(devinfo, 5);
+ if (w != NULL)
+ w->connsenable[0] = 0;
+ w = hdaa_widget_get(devinfo, 6);
+ if (w != NULL)
+ w->connsenable[0] = 0;
+ w = hdaa_widget_get(devinfo, 11);
+ if (w != NULL)
+ w->connsenable[0] = 0;
+ /* Disable mic and line selectors. */
+ w = hdaa_widget_get(devinfo, 12);
+ if (w != NULL)
+ w->connsenable[1] = 0;
+ w = hdaa_widget_get(devinfo, 13);
+ if (w != NULL)
+ w->connsenable[1] = 0;
+ /* Disable recording from mono playback mix. */
+ w = hdaa_widget_get(devinfo, 20);
+ if (w != NULL)
+ w->connsenable[3] = 0;
+ break;
+ case HDA_CODEC_AD1986A:
+ /*
+ * This CODEC has overcomplicated input mixing.
+ * Make some cleaning there.
+ */
+ /* Disable input mono mixer. Not needed and not supported. */
+ w = hdaa_widget_get(devinfo, 43);
+ if (w != NULL)
+ w->enable = 0;
+ /* Disable any with any input mixing mesh. Use separately. */
+ w = hdaa_widget_get(devinfo, 39);
+ if (w != NULL)
+ w->enable = 0;
+ w = hdaa_widget_get(devinfo, 40);
+ if (w != NULL)
+ w->enable = 0;
+ w = hdaa_widget_get(devinfo, 41);
+ if (w != NULL)
+ w->enable = 0;
+ w = hdaa_widget_get(devinfo, 42);
+ if (w != NULL)
+ w->enable = 0;
+ /* Disable duplicate mixer node connector. */
+ w = hdaa_widget_get(devinfo, 15);
+ if (w != NULL)
+ w->connsenable[3] = 0;
+ /* There is only one mic preamplifier, use it effectively. */
+ w = hdaa_widget_get(devinfo, 31);
+ if (w != NULL) {
+ if ((w->wclass.pin.config &
+ HDA_CONFIG_DEFAULTCONF_DEVICE_MASK) ==
+ HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN) {
+ w = hdaa_widget_get(devinfo, 16);
+ if (w != NULL)
+ w->connsenable[2] = 0;
+ } else {
+ w = hdaa_widget_get(devinfo, 15);
+ if (w != NULL)
+ w->connsenable[0] = 0;
+ }
+ }
+ w = hdaa_widget_get(devinfo, 32);
+ if (w != NULL) {
+ if ((w->wclass.pin.config &
+ HDA_CONFIG_DEFAULTCONF_DEVICE_MASK) ==
+ HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN) {
+ w = hdaa_widget_get(devinfo, 16);
+ if (w != NULL)
+ w->connsenable[0] = 0;
+ } else {
+ w = hdaa_widget_get(devinfo, 15);
+ if (w != NULL)
+ w->connsenable[1] = 0;
+ }
+ }
+
+ if (subid == ASUS_A8X_SUBVENDOR) {
+ /*
+ * This is just plain ridiculous.. There
+ * are several A8 series that share the same
+ * pci id but works differently (EAPD).
+ */
+ w = hdaa_widget_get(devinfo, 26);
+ if (w != NULL && w->type ==
+ HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX &&
+ (w->wclass.pin.config &
+ HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK) !=
+ HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_NONE)
+ devinfo->quirks &=
+ ~HDAA_QUIRK_EAPDINV;
+ }
+ break;
+ case HDA_CODEC_AD1981HD:
+ /*
+ * This CODEC has very unusual design with several
+ * points inappropriate for the present parser.
+ */
+ /* Disable recording from mono playback mix. */
+ w = hdaa_widget_get(devinfo, 21);
+ if (w != NULL)
+ w->connsenable[3] = 0;
+ /* Disable rear to front mic mixer, use separately. */
+ w = hdaa_widget_get(devinfo, 31);
+ if (w != NULL)
+ w->enable = 0;
+ /* Disable direct playback, use mixer. */
+ w = hdaa_widget_get(devinfo, 5);
+ if (w != NULL)
+ w->connsenable[0] = 0;
+ w = hdaa_widget_get(devinfo, 6);
+ if (w != NULL)
+ w->connsenable[0] = 0;
+ w = hdaa_widget_get(devinfo, 9);
+ if (w != NULL)
+ w->connsenable[0] = 0;
+ w = hdaa_widget_get(devinfo, 24);
+ if (w != NULL)
+ w->connsenable[0] = 0;
+ break;
+ case HDA_CODEC_CX20582:
+ case HDA_CODEC_CX20583:
+ case HDA_CODEC_CX20584:
+ case HDA_CODEC_CX20585:
+ case HDA_CODEC_CX20590:
+ /*
+ * These codecs have extra connectivity on record side
+ * too reach for the present parser.
+ */
+ w = hdaa_widget_get(devinfo, 20);
+ if (w != NULL)
+ w->connsenable[1] = 0;
+ w = hdaa_widget_get(devinfo, 21);
+ if (w != NULL)
+ w->connsenable[1] = 0;
+ w = hdaa_widget_get(devinfo, 22);
+ if (w != NULL)
+ w->connsenable[0] = 0;
+ break;
+ case HDA_CODEC_VT1708S_0:
+ case HDA_CODEC_VT1708S_1:
+ case HDA_CODEC_VT1708S_2:
+ case HDA_CODEC_VT1708S_3:
+ case HDA_CODEC_VT1708S_4:
+ case HDA_CODEC_VT1708S_5:
+ case HDA_CODEC_VT1708S_6:
+ case HDA_CODEC_VT1708S_7:
+ /*
+ * These codecs have hidden mic boost controls.
+ */
+ w = hdaa_widget_get(devinfo, 26);
+ if (w != NULL)
+ w->param.inamp_cap =
+ (40 << HDA_PARAM_OUTPUT_AMP_CAP_STEPSIZE_SHIFT) |
+ (3 << HDA_PARAM_OUTPUT_AMP_CAP_NUMSTEPS_SHIFT) |
+ (0 << HDA_PARAM_OUTPUT_AMP_CAP_OFFSET_SHIFT);
+ w = hdaa_widget_get(devinfo, 30);
+ if (w != NULL)
+ w->param.inamp_cap =
+ (40 << HDA_PARAM_OUTPUT_AMP_CAP_STEPSIZE_SHIFT) |
+ (3 << HDA_PARAM_OUTPUT_AMP_CAP_NUMSTEPS_SHIFT) |
+ (0 << HDA_PARAM_OUTPUT_AMP_CAP_OFFSET_SHIFT);
+ break;
+ }
+}
+
+void
+hdaa_patch_direct(struct hdaa_devinfo *devinfo)
+{
+ device_t dev = devinfo->dev;
+ uint32_t id, subid, val;
+
+ id = hdaa_codec_id(devinfo);
+ subid = hdaa_subvendor_id(devinfo);
+
+ switch (id) {
+ case HDA_CODEC_VT1708S_0:
+ case HDA_CODEC_VT1708S_1:
+ case HDA_CODEC_VT1708S_2:
+ case HDA_CODEC_VT1708S_3:
+ case HDA_CODEC_VT1708S_4:
+ case HDA_CODEC_VT1708S_5:
+ case HDA_CODEC_VT1708S_6:
+ case HDA_CODEC_VT1708S_7:
+ /* Enable Mic Boost Volume controls. */
+ hda_command(dev, HDA_CMD_12BIT(0, devinfo->nid,
+ 0xf98, 0x01));
+ /* Don't bypass mixer. */
+ hda_command(dev, HDA_CMD_12BIT(0, devinfo->nid,
+ 0xf88, 0xc0));
+ break;
+ }
+ if (subid == APPLE_INTEL_MAC)
+ hda_command(dev, HDA_CMD_12BIT(0, devinfo->nid,
+ 0x7e7, 0));
+ if (id == HDA_CODEC_ALC269) {
+ if (subid == 0x16e31043 || subid == 0x831a1043 ||
+ subid == 0x834a1043 || subid == 0x83981043 ||
+ subid == 0x83ce1043) {
+ /*
+ * The ditital mics on some Asus laptops produce
+ * differential signals instead of expected stereo.
+ * That results in silence if downmix it to mono.
+ * To workaround, make codec to handle signal as mono.
+ */
+ hda_command(dev, HDA_CMD_SET_COEFF_INDEX(0, 0x20, 0x07));
+ val = hda_command(dev, HDA_CMD_GET_PROCESSING_COEFF(0, 0x20));
+ hda_command(dev, HDA_CMD_SET_COEFF_INDEX(0, 0x20, 0x07));
+ hda_command(dev, HDA_CMD_SET_PROCESSING_COEFF(0, 0x20, val|0x80));
+ }
+ }
+}
diff --git a/sys/dev/sound/pci/hda/hdac.c b/sys/dev/sound/pci/hda/hdac.c
index 66aa162..9c32cff 100644
--- a/sys/dev/sound/pci/hda/hdac.c
+++ b/sys/dev/sound/pci/hda/hdac.c
@@ -1,7 +1,7 @@
/*-
* Copyright (c) 2006 Stephane E. Potvin <sepotvin@videotron.ca>
* Copyright (c) 2006 Ariff Abdullah <ariff@FreeBSD.org>
- * Copyright (c) 2008 Alexander Motin <mav@FreeBSD.org>
+ * Copyright (c) 2008-2012 Alexander Motin <mav@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -27,45 +27,7 @@
*/
/*
- * Intel High Definition Audio (Controller) driver for FreeBSD. Be advised
- * that this driver still in its early stage, and possible of rewrite are
- * pretty much guaranteed. There are supposedly several distinct parent/child
- * busses to make this "perfect", but as for now and for the sake of
- * simplicity, everything is gobble up within single source.
- *
- * List of subsys:
- * 1) HDA Controller support
- * 2) HDA Codecs support, which may include
- * - HDA
- * - Modem
- * 3) Widget parser - the real magic of why this driver works on so
- * many hardwares with minimal vendor specific quirk. The original
- * parser was written using Ruby and can be found at
- * http://people.freebsd.org/~ariff/HDA/parser.rb . This crude
- * ruby parser take the verbose dmesg dump as its input. Refer to
- * http://www.microsoft.com/whdc/device/audio/default.mspx for various
- * interesting documents, especially UAA (Universal Audio Architecture).
- * 4) Possible vendor specific support.
- * (snd_hda_intel, snd_hda_ati, etc..)
- *
- * Thanks to Ahmad Ubaidah Omar @ Defenxis Sdn. Bhd. for the
- * Compaq V3000 with Conexant HDA.
- *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * * *
- * * This driver is a collaborative effort made by: *
- * * *
- * * Stephane E. Potvin <sepotvin@videotron.ca> *
- * * Andrea Bittau <a.bittau@cs.ucl.ac.uk> *
- * * Wesley Morgan <morganw@chemikals.org> *
- * * Daniel Eischen <deischen@FreeBSD.org> *
- * * Maxime Guillaud <bsd-ports@mguillaud.net> *
- * * Ariff Abdullah <ariff@FreeBSD.org> *
- * * Alexander Motin <mav@FreeBSD.org> *
- * * *
- * * ....and various people from freebsd-multimedia@FreeBSD.org *
- * * *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Intel High Definition Audio (Controller) driver for FreeBSD.
*/
#ifdef HAVE_KERNEL_OPTION_HEADERS
@@ -84,477 +46,109 @@
#include <dev/sound/pci/hda/hda_reg.h>
#include <dev/sound/pci/hda/hdac.h>
-#include "mixer_if.h"
-
-#define HDA_DRV_TEST_REV "20100226_0142"
+#define HDA_DRV_TEST_REV "20120111_0001"
SND_DECLARE_FILE("$FreeBSD$");
-#define HDA_BOOTVERBOSE(stmt) do { \
- if (bootverbose != 0 || snd_verbose > 3) { \
- stmt \
- } \
-} while (0)
-
-#define HDA_BOOTHVERBOSE(stmt) do { \
- if (snd_verbose > 3) { \
- stmt \
- } \
-} while (0)
-
-#if 1
-#undef HDAC_INTR_EXTRA
-#define HDAC_INTR_EXTRA 1
-#endif
-
#define hdac_lock(sc) snd_mtxlock((sc)->lock)
#define hdac_unlock(sc) snd_mtxunlock((sc)->lock)
#define hdac_lockassert(sc) snd_mtxassert((sc)->lock)
#define hdac_lockowned(sc) mtx_owned((sc)->lock)
-#define HDA_FLAG_MATCH(fl, v) (((fl) & (v)) == (v))
-#define HDA_DEV_MATCH(fl, v) ((fl) == (v) || \
- (fl) == 0xffffffff || \
- (((fl) & 0xffff0000) == 0xffff0000 && \
- ((fl) & 0x0000ffff) == ((v) & 0x0000ffff)) || \
- (((fl) & 0x0000ffff) == 0x0000ffff && \
- ((fl) & 0xffff0000) == ((v) & 0xffff0000)))
-#define HDA_MATCH_ALL 0xffffffff
-#define HDAC_INVALID 0xffffffff
-
-/* Default controller / jack sense poll: 250ms */
-#define HDAC_POLL_INTERVAL max(hz >> 2, 1)
-
-/*
- * Make room for possible 4096 playback/record channels, in 100 years to come.
- */
-#define HDAC_TRIGGER_NONE 0x00000000
-#define HDAC_TRIGGER_PLAY 0x00000fff
-#define HDAC_TRIGGER_REC 0x00fff000
-#define HDAC_TRIGGER_UNSOL 0x80000000
-
-#define HDA_MODEL_CONSTRUCT(vendor, model) \
- (((uint32_t)(model) << 16) | ((vendor##_VENDORID) & 0xffff))
-
-/* Controller models */
-
-/* Intel */
-#define INTEL_VENDORID 0x8086
-#define HDA_INTEL_CPT HDA_MODEL_CONSTRUCT(INTEL, 0x1c20)
-#define HDA_INTEL_PATSBURG HDA_MODEL_CONSTRUCT(INTEL, 0x1d20)
-#define HDA_INTEL_PPT1 HDA_MODEL_CONSTRUCT(INTEL, 0x1e20)
-#define HDA_INTEL_82801F HDA_MODEL_CONSTRUCT(INTEL, 0x2668)
-#define HDA_INTEL_63XXESB HDA_MODEL_CONSTRUCT(INTEL, 0x269a)
-#define HDA_INTEL_82801G HDA_MODEL_CONSTRUCT(INTEL, 0x27d8)
-#define HDA_INTEL_82801H HDA_MODEL_CONSTRUCT(INTEL, 0x284b)
-#define HDA_INTEL_82801I HDA_MODEL_CONSTRUCT(INTEL, 0x293e)
-#define HDA_INTEL_82801JI HDA_MODEL_CONSTRUCT(INTEL, 0x3a3e)
-#define HDA_INTEL_82801JD HDA_MODEL_CONSTRUCT(INTEL, 0x3a6e)
-#define HDA_INTEL_PCH HDA_MODEL_CONSTRUCT(INTEL, 0x3b56)
-#define HDA_INTEL_PCH2 HDA_MODEL_CONSTRUCT(INTEL, 0x3b57)
-#define HDA_INTEL_SCH HDA_MODEL_CONSTRUCT(INTEL, 0x811b)
-#define HDA_INTEL_ALL HDA_MODEL_CONSTRUCT(INTEL, 0xffff)
-
-/* Nvidia */
-#define NVIDIA_VENDORID 0x10de
-#define HDA_NVIDIA_MCP51 HDA_MODEL_CONSTRUCT(NVIDIA, 0x026c)
-#define HDA_NVIDIA_MCP55 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0371)
-#define HDA_NVIDIA_MCP61_1 HDA_MODEL_CONSTRUCT(NVIDIA, 0x03e4)
-#define HDA_NVIDIA_MCP61_2 HDA_MODEL_CONSTRUCT(NVIDIA, 0x03f0)
-#define HDA_NVIDIA_MCP65_1 HDA_MODEL_CONSTRUCT(NVIDIA, 0x044a)
-#define HDA_NVIDIA_MCP65_2 HDA_MODEL_CONSTRUCT(NVIDIA, 0x044b)
-#define HDA_NVIDIA_MCP67_1 HDA_MODEL_CONSTRUCT(NVIDIA, 0x055c)
-#define HDA_NVIDIA_MCP67_2 HDA_MODEL_CONSTRUCT(NVIDIA, 0x055d)
-#define HDA_NVIDIA_MCP78_1 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0774)
-#define HDA_NVIDIA_MCP78_2 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0775)
-#define HDA_NVIDIA_MCP78_3 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0776)
-#define HDA_NVIDIA_MCP78_4 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0777)
-#define HDA_NVIDIA_MCP73_1 HDA_MODEL_CONSTRUCT(NVIDIA, 0x07fc)
-#define HDA_NVIDIA_MCP73_2 HDA_MODEL_CONSTRUCT(NVIDIA, 0x07fd)
-#define HDA_NVIDIA_MCP79_1 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0ac0)
-#define HDA_NVIDIA_MCP79_2 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0ac1)
-#define HDA_NVIDIA_MCP79_3 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0ac2)
-#define HDA_NVIDIA_MCP79_4 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0ac3)
-#define HDA_NVIDIA_MCP89_1 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0d94)
-#define HDA_NVIDIA_MCP89_2 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0d95)
-#define HDA_NVIDIA_MCP89_3 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0d96)
-#define HDA_NVIDIA_MCP89_4 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0d97)
-#define HDA_NVIDIA_ALL HDA_MODEL_CONSTRUCT(NVIDIA, 0xffff)
-
-/* ATI */
-#define ATI_VENDORID 0x1002
-#define HDA_ATI_SB450 HDA_MODEL_CONSTRUCT(ATI, 0x437b)
-#define HDA_ATI_SB600 HDA_MODEL_CONSTRUCT(ATI, 0x4383)
-#define HDA_ATI_RS600 HDA_MODEL_CONSTRUCT(ATI, 0x793b)
-#define HDA_ATI_RS690 HDA_MODEL_CONSTRUCT(ATI, 0x7919)
-#define HDA_ATI_RS780 HDA_MODEL_CONSTRUCT(ATI, 0x960f)
-#define HDA_ATI_R600 HDA_MODEL_CONSTRUCT(ATI, 0xaa00)
-#define HDA_ATI_RV630 HDA_MODEL_CONSTRUCT(ATI, 0xaa08)
-#define HDA_ATI_RV610 HDA_MODEL_CONSTRUCT(ATI, 0xaa10)
-#define HDA_ATI_RV670 HDA_MODEL_CONSTRUCT(ATI, 0xaa18)
-#define HDA_ATI_RV635 HDA_MODEL_CONSTRUCT(ATI, 0xaa20)
-#define HDA_ATI_RV620 HDA_MODEL_CONSTRUCT(ATI, 0xaa28)
-#define HDA_ATI_RV770 HDA_MODEL_CONSTRUCT(ATI, 0xaa30)
-#define HDA_ATI_RV730 HDA_MODEL_CONSTRUCT(ATI, 0xaa38)
-#define HDA_ATI_RV710 HDA_MODEL_CONSTRUCT(ATI, 0xaa40)
-#define HDA_ATI_RV740 HDA_MODEL_CONSTRUCT(ATI, 0xaa48)
-#define HDA_ATI_ALL HDA_MODEL_CONSTRUCT(ATI, 0xffff)
-
-/* RDC */
-#define RDC_VENDORID 0x17f3
-#define HDA_RDC_M3010 HDA_MODEL_CONSTRUCT(RDC, 0x3010)
-
-/* VIA */
-#define VIA_VENDORID 0x1106
-#define HDA_VIA_VT82XX HDA_MODEL_CONSTRUCT(VIA, 0x3288)
-#define HDA_VIA_ALL HDA_MODEL_CONSTRUCT(VIA, 0xffff)
-
-/* SiS */
-#define SIS_VENDORID 0x1039
-#define HDA_SIS_966 HDA_MODEL_CONSTRUCT(SIS, 0x7502)
-#define HDA_SIS_ALL HDA_MODEL_CONSTRUCT(SIS, 0xffff)
-
-/* ULI */
-#define ULI_VENDORID 0x10b9
-#define HDA_ULI_M5461 HDA_MODEL_CONSTRUCT(ULI, 0x5461)
-#define HDA_ULI_ALL HDA_MODEL_CONSTRUCT(ULI, 0xffff)
-
-/* OEM/subvendors */
-
-/* Intel */
-#define INTEL_D101GGC_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xd600)
-
-/* HP/Compaq */
-#define HP_VENDORID 0x103c
-#define HP_V3000_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30b5)
-#define HP_NX7400_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30a2)
-#define HP_NX6310_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30aa)
-#define HP_NX6325_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30b0)
-#define HP_XW4300_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x3013)
-#define HP_3010_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x3010)
-#define HP_DV5000_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30a5)
-#define HP_DC7700S_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x2801)
-#define HP_DC7700_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x2802)
-#define HP_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0xffff)
-/* What is wrong with XN 2563 anyway? (Got the picture ?) */
-#define HP_NX6325_SUBVENDORX 0x103c30b0
-
-/* Dell */
-#define DELL_VENDORID 0x1028
-#define DELL_D630_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01f9)
-#define DELL_D820_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01cc)
-#define DELL_V1400_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0227)
-#define DELL_V1500_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0228)
-#define DELL_I1300_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01c9)
-#define DELL_XPSM1210_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01d7)
-#define DELL_OPLX745_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01da)
-#define DELL_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0xffff)
-
-/* Clevo */
-#define CLEVO_VENDORID 0x1558
-#define CLEVO_D900T_SUBVENDOR HDA_MODEL_CONSTRUCT(CLEVO, 0x0900)
-#define CLEVO_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(CLEVO, 0xffff)
-
-/* Acer */
-#define ACER_VENDORID 0x1025
-#define ACER_A5050_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x010f)
-#define ACER_A4520_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0127)
-#define ACER_A4710_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x012f)
-#define ACER_A4715_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0133)
-#define ACER_3681WXM_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0110)
-#define ACER_T6292_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x011b)
-#define ACER_T5320_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x011f)
-#define ACER_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xffff)
-
-/* Asus */
-#define ASUS_VENDORID 0x1043
-#define ASUS_A8X_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1153)
-#define ASUS_U5F_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1263)
-#define ASUS_W6F_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1263)
-#define ASUS_A7M_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1323)
-#define ASUS_F3JC_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1338)
-#define ASUS_G2K_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1339)
-#define ASUS_A7T_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x13c2)
-#define ASUS_W2J_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1971)
-#define ASUS_M5200_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1993)
-#define ASUS_P5PL2_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x817f)
-#define ASUS_P1AH2_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x81cb)
-#define ASUS_M2NPVMX_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x81cb)
-#define ASUS_M2V_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x81e7)
-#define ASUS_P5BWD_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x81ec)
-#define ASUS_M2N_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x8234)
-#define ASUS_A8NVMCSM_SUBVENDOR HDA_MODEL_CONSTRUCT(NVIDIA, 0xcb84)
-#define ASUS_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0xffff)
-
-/* IBM / Lenovo */
-#define IBM_VENDORID 0x1014
-#define IBM_M52_SUBVENDOR HDA_MODEL_CONSTRUCT(IBM, 0x02f6)
-#define IBM_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(IBM, 0xffff)
-
-/* Lenovo */
-#define LENOVO_VENDORID 0x17aa
-#define LENOVO_3KN100_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x2066)
-#define LENOVO_3KN200_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x384e)
-#define LENOVO_B450_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x3a0d)
-#define LENOVO_TCA55_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x1015)
-#define LENOVO_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0xffff)
-
-/* Samsung */
-#define SAMSUNG_VENDORID 0x144d
-#define SAMSUNG_Q1_SUBVENDOR HDA_MODEL_CONSTRUCT(SAMSUNG, 0xc027)
-#define SAMSUNG_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(SAMSUNG, 0xffff)
-
-/* Medion ? */
-#define MEDION_VENDORID 0x161f
-#define MEDION_MD95257_SUBVENDOR HDA_MODEL_CONSTRUCT(MEDION, 0x203d)
-#define MEDION_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(MEDION, 0xffff)
-
-/* Apple Computer Inc. */
-#define APPLE_VENDORID 0x106b
-#define APPLE_MB3_SUBVENDOR HDA_MODEL_CONSTRUCT(APPLE, 0x00a1)
-
-/* Sony */
-#define SONY_VENDORID 0x104d
-#define SONY_S5_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81cc)
-#define SONY_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0xffff)
-
-/*
- * Apple Intel MacXXXX seems using Sigmatel codec/vendor id
- * instead of their own, which is beyond my comprehension
- * (see HDA_CODEC_STAC9221 below).
- */
-#define APPLE_INTEL_MAC 0x76808384
-#define APPLE_MACBOOKPRO55 0xcb7910de
-
-/* LG Electronics */
-#define LG_VENDORID 0x1854
-#define LG_LW20_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0x0018)
-#define LG_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0xffff)
-
-/* Fujitsu Siemens */
-#define FS_VENDORID 0x1734
-#define FS_PA1510_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x10b8)
-#define FS_SI1848_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x10cd)
-#define FS_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0xffff)
-
-/* Fujitsu Limited */
-#define FL_VENDORID 0x10cf
-#define FL_S7020D_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x1326)
-#define FL_U1010_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x142d)
-#define FL_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0xffff)
-
-/* Toshiba */
-#define TOSHIBA_VENDORID 0x1179
-#define TOSHIBA_U200_SUBVENDOR HDA_MODEL_CONSTRUCT(TOSHIBA, 0x0001)
-#define TOSHIBA_A135_SUBVENDOR HDA_MODEL_CONSTRUCT(TOSHIBA, 0xff01)
-#define TOSHIBA_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(TOSHIBA, 0xffff)
-
-/* Micro-Star International (MSI) */
-#define MSI_VENDORID 0x1462
-#define MSI_MS1034_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0x0349)
-#define MSI_MS034A_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0x034a)
-#define MSI_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0xffff)
-
-/* Giga-Byte Technology */
-#define GB_VENDORID 0x1458
-#define GB_G33S2H_SUBVENDOR HDA_MODEL_CONSTRUCT(GB, 0xa022)
-#define GP_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(GB, 0xffff)
-
-/* Uniwill ? */
-#define UNIWILL_VENDORID 0x1584
-#define UNIWILL_9075_SUBVENDOR HDA_MODEL_CONSTRUCT(UNIWILL, 0x9075)
-#define UNIWILL_9080_SUBVENDOR HDA_MODEL_CONSTRUCT(UNIWILL, 0x9080)
-
-
-/* Misc constants.. */
-#define HDA_AMP_VOL_DEFAULT (-1)
-#define HDA_AMP_MUTE_DEFAULT (0xffffffff)
-#define HDA_AMP_MUTE_NONE (0)
-#define HDA_AMP_MUTE_LEFT (1 << 0)
-#define HDA_AMP_MUTE_RIGHT (1 << 1)
-#define HDA_AMP_MUTE_ALL (HDA_AMP_MUTE_LEFT | HDA_AMP_MUTE_RIGHT)
-
-#define HDA_AMP_LEFT_MUTED(v) ((v) & (HDA_AMP_MUTE_LEFT))
-#define HDA_AMP_RIGHT_MUTED(v) (((v) & HDA_AMP_MUTE_RIGHT) >> 1)
-
-#define HDA_ADC_MONITOR (1 << 0)
-
-#define HDA_CTL_OUT 1
-#define HDA_CTL_IN 2
-
-#define HDA_GPIO_MAX 8
-/* 0 - 7 = GPIO , 8 = Flush */
-#define HDA_QUIRK_GPIO0 (1 << 0)
-#define HDA_QUIRK_GPIO1 (1 << 1)
-#define HDA_QUIRK_GPIO2 (1 << 2)
-#define HDA_QUIRK_GPIO3 (1 << 3)
-#define HDA_QUIRK_GPIO4 (1 << 4)
-#define HDA_QUIRK_GPIO5 (1 << 5)
-#define HDA_QUIRK_GPIO6 (1 << 6)
-#define HDA_QUIRK_GPIO7 (1 << 7)
-#define HDA_QUIRK_GPIOFLUSH (1 << 8)
-
-/* 9 - 25 = anything else */
-#define HDA_QUIRK_SOFTPCMVOL (1 << 9)
-#define HDA_QUIRK_FIXEDRATE (1 << 10)
-#define HDA_QUIRK_FORCESTEREO (1 << 11)
-#define HDA_QUIRK_EAPDINV (1 << 12)
-#define HDA_QUIRK_DMAPOS (1 << 13)
-#define HDA_QUIRK_SENSEINV (1 << 14)
-
-/* 26 - 31 = vrefs */
-#define HDA_QUIRK_IVREF50 (1 << 26)
-#define HDA_QUIRK_IVREF80 (1 << 27)
-#define HDA_QUIRK_IVREF100 (1 << 28)
-#define HDA_QUIRK_OVREF50 (1 << 29)
-#define HDA_QUIRK_OVREF80 (1 << 30)
-#define HDA_QUIRK_OVREF100 (1 << 31)
-
-#define HDA_QUIRK_IVREF (HDA_QUIRK_IVREF50 | HDA_QUIRK_IVREF80 | \
- HDA_QUIRK_IVREF100)
-#define HDA_QUIRK_OVREF (HDA_QUIRK_OVREF50 | HDA_QUIRK_OVREF80 | \
- HDA_QUIRK_OVREF100)
-#define HDA_QUIRK_VREF (HDA_QUIRK_IVREF | HDA_QUIRK_OVREF)
-
-#if __FreeBSD_version < 600000
-#define taskqueue_drain(...)
-#endif
+#define HDAC_QUIRK_64BIT (1 << 0)
+#define HDAC_QUIRK_DMAPOS (1 << 1)
+#define HDAC_QUIRK_MSI (1 << 2)
static const struct {
char *key;
uint32_t value;
} hdac_quirks_tab[] = {
- { "gpio0", HDA_QUIRK_GPIO0 },
- { "gpio1", HDA_QUIRK_GPIO1 },
- { "gpio2", HDA_QUIRK_GPIO2 },
- { "gpio3", HDA_QUIRK_GPIO3 },
- { "gpio4", HDA_QUIRK_GPIO4 },
- { "gpio5", HDA_QUIRK_GPIO5 },
- { "gpio6", HDA_QUIRK_GPIO6 },
- { "gpio7", HDA_QUIRK_GPIO7 },
- { "gpioflush", HDA_QUIRK_GPIOFLUSH },
- { "softpcmvol", HDA_QUIRK_SOFTPCMVOL },
- { "fixedrate", HDA_QUIRK_FIXEDRATE },
- { "forcestereo", HDA_QUIRK_FORCESTEREO },
- { "eapdinv", HDA_QUIRK_EAPDINV },
- { "dmapos", HDA_QUIRK_DMAPOS },
- { "senseinv", HDA_QUIRK_SENSEINV },
- { "ivref50", HDA_QUIRK_IVREF50 },
- { "ivref80", HDA_QUIRK_IVREF80 },
- { "ivref100", HDA_QUIRK_IVREF100 },
- { "ovref50", HDA_QUIRK_OVREF50 },
- { "ovref80", HDA_QUIRK_OVREF80 },
- { "ovref100", HDA_QUIRK_OVREF100 },
- { "ivref", HDA_QUIRK_IVREF },
- { "ovref", HDA_QUIRK_OVREF },
- { "vref", HDA_QUIRK_VREF },
+ { "64bit", HDAC_QUIRK_DMAPOS },
+ { "dmapos", HDAC_QUIRK_DMAPOS },
+ { "msi", HDAC_QUIRK_MSI },
};
#define HDAC_QUIRKS_TAB_LEN \
(sizeof(hdac_quirks_tab) / sizeof(hdac_quirks_tab[0]))
-#define HDA_BDL_MIN 2
-#define HDA_BDL_MAX 256
-#define HDA_BDL_DEFAULT HDA_BDL_MIN
-
-#define HDA_BLK_MIN HDAC_DMA_ALIGNMENT
-#define HDA_BLK_ALIGN (~(HDA_BLK_MIN - 1))
-
-#define HDA_BUFSZ_MIN 4096
-#define HDA_BUFSZ_MAX 65536
-#define HDA_BUFSZ_DEFAULT 16384
-
-#define HDA_PARSE_MAXDEPTH 10
-
-#define HDAC_UNSOLTAG_EVENT_HP 0x00
-
-MALLOC_DEFINE(M_HDAC, "hdac", "High Definition Audio Controller");
-
-const char *HDA_COLORS[16] = {"Unknown", "Black", "Grey", "Blue", "Green", "Red",
- "Orange", "Yellow", "Purple", "Pink", "Res.A", "Res.B", "Res.C", "Res.D",
- "White", "Other"};
-
-const char *HDA_DEVS[16] = {"Line-out", "Speaker", "Headphones", "CD",
- "SPDIF-out", "Digital-out", "Modem-line", "Modem-handset", "Line-in",
- "AUX", "Mic", "Telephony", "SPDIF-in", "Digital-in", "Res.E", "Other"};
-
-const char *HDA_CONNS[4] = {"Jack", "None", "Fixed", "Both"};
-
-/* Default */
-static uint32_t hdac_fmt[] = {
- SND_FORMAT(AFMT_S16_LE, 2, 0),
- 0
-};
-
-static struct pcmchan_caps hdac_caps = {48000, 48000, hdac_fmt, 0};
-
-#define HDAC_NO_MSI 1
-#define HDAC_NO_64BIT 2
+MALLOC_DEFINE(M_HDAC, "hdac", "HDA Controller");
static const struct {
uint32_t model;
char *desc;
- char flags;
+ char quirks_on;
+ char quirks_off;
} hdac_devices[] = {
- { HDA_INTEL_CPT, "Intel Cougar Point", 0 },
- { HDA_INTEL_PATSBURG,"Intel Patsburg", 0 },
- { HDA_INTEL_PPT1, "Intel Panther Point", 0 },
- { HDA_INTEL_82801F, "Intel 82801F", 0 },
- { HDA_INTEL_63XXESB, "Intel 631x/632xESB", 0 },
- { HDA_INTEL_82801G, "Intel 82801G", 0 },
- { HDA_INTEL_82801H, "Intel 82801H", 0 },
- { HDA_INTEL_82801I, "Intel 82801I", 0 },
- { HDA_INTEL_82801JI, "Intel 82801JI", 0 },
- { HDA_INTEL_82801JD, "Intel 82801JD", 0 },
- { HDA_INTEL_PCH, "Intel 5 Series/3400 Series", 0 },
- { HDA_INTEL_PCH2, "Intel 5 Series/3400 Series", 0 },
- { HDA_INTEL_SCH, "Intel SCH", 0 },
- { HDA_NVIDIA_MCP51, "NVidia MCP51", HDAC_NO_MSI },
- { HDA_NVIDIA_MCP55, "NVidia MCP55", HDAC_NO_MSI },
- { HDA_NVIDIA_MCP61_1, "NVidia MCP61", 0 },
- { HDA_NVIDIA_MCP61_2, "NVidia MCP61", 0 },
- { HDA_NVIDIA_MCP65_1, "NVidia MCP65", 0 },
- { HDA_NVIDIA_MCP65_2, "NVidia MCP65", 0 },
- { HDA_NVIDIA_MCP67_1, "NVidia MCP67", 0 },
- { HDA_NVIDIA_MCP67_2, "NVidia MCP67", 0 },
- { HDA_NVIDIA_MCP73_1, "NVidia MCP73", 0 },
- { HDA_NVIDIA_MCP73_2, "NVidia MCP73", 0 },
- { HDA_NVIDIA_MCP78_1, "NVidia MCP78", HDAC_NO_64BIT },
- { HDA_NVIDIA_MCP78_2, "NVidia MCP78", HDAC_NO_64BIT },
- { HDA_NVIDIA_MCP78_3, "NVidia MCP78", HDAC_NO_64BIT },
- { HDA_NVIDIA_MCP78_4, "NVidia MCP78", HDAC_NO_64BIT },
- { HDA_NVIDIA_MCP79_1, "NVidia MCP79", 0 },
- { HDA_NVIDIA_MCP79_2, "NVidia MCP79", 0 },
- { HDA_NVIDIA_MCP79_3, "NVidia MCP79", 0 },
- { HDA_NVIDIA_MCP79_4, "NVidia MCP79", 0 },
- { HDA_NVIDIA_MCP89_1, "NVidia MCP89", 0 },
- { HDA_NVIDIA_MCP89_2, "NVidia MCP89", 0 },
- { HDA_NVIDIA_MCP89_3, "NVidia MCP89", 0 },
- { HDA_NVIDIA_MCP89_4, "NVidia MCP89", 0 },
- { HDA_ATI_SB450, "ATI SB450", 0 },
- { HDA_ATI_SB600, "ATI SB600", 0 },
- { HDA_ATI_RS600, "ATI RS600", 0 },
- { HDA_ATI_RS690, "ATI RS690", 0 },
- { HDA_ATI_RS780, "ATI RS780", 0 },
- { HDA_ATI_R600, "ATI R600", 0 },
- { HDA_ATI_RV610, "ATI RV610", 0 },
- { HDA_ATI_RV620, "ATI RV620", 0 },
- { HDA_ATI_RV630, "ATI RV630", 0 },
- { HDA_ATI_RV635, "ATI RV635", 0 },
- { HDA_ATI_RV710, "ATI RV710", 0 },
- { HDA_ATI_RV730, "ATI RV730", 0 },
- { HDA_ATI_RV740, "ATI RV740", 0 },
- { HDA_ATI_RV770, "ATI RV770", 0 },
- { HDA_RDC_M3010, "RDC M3010", 0 },
- { HDA_VIA_VT82XX, "VIA VT8251/8237A",0 },
- { HDA_SIS_966, "SiS 966", 0 },
- { HDA_ULI_M5461, "ULI M5461", 0 },
+ { HDA_INTEL_CPT, "Intel Cougar Point", 0, 0 },
+ { HDA_INTEL_PATSBURG,"Intel Patsburg", 0, 0 },
+ { HDA_INTEL_PPT1, "Intel Panther Point", 0, 0 },
+ { HDA_INTEL_82801F, "Intel 82801F", 0, 0 },
+ { HDA_INTEL_63XXESB, "Intel 631x/632xESB", 0, 0 },
+ { HDA_INTEL_82801G, "Intel 82801G", 0, 0 },
+ { HDA_INTEL_82801H, "Intel 82801H", 0, 0 },
+ { HDA_INTEL_82801I, "Intel 82801I", 0, 0 },
+ { HDA_INTEL_82801JI, "Intel 82801JI", 0, 0 },
+ { HDA_INTEL_82801JD, "Intel 82801JD", 0, 0 },
+ { HDA_INTEL_PCH, "Intel 5 Series/3400 Series", 0, 0 },
+ { HDA_INTEL_PCH2, "Intel 5 Series/3400 Series", 0, 0 },
+ { HDA_INTEL_SCH, "Intel SCH", 0, 0 },
+ { HDA_NVIDIA_MCP51, "NVIDIA MCP51", 0, HDAC_QUIRK_MSI },
+ { HDA_NVIDIA_MCP55, "NVIDIA MCP55", 0, HDAC_QUIRK_MSI },
+ { HDA_NVIDIA_MCP61_1, "NVIDIA MCP61", 0, 0 },
+ { HDA_NVIDIA_MCP61_2, "NVIDIA MCP61", 0, 0 },
+ { HDA_NVIDIA_MCP65_1, "NVIDIA MCP65", 0, 0 },
+ { HDA_NVIDIA_MCP65_2, "NVIDIA MCP65", 0, 0 },
+ { HDA_NVIDIA_MCP67_1, "NVIDIA MCP67", 0, 0 },
+ { HDA_NVIDIA_MCP67_2, "NVIDIA MCP67", 0, 0 },
+ { HDA_NVIDIA_MCP73_1, "NVIDIA MCP73", 0, 0 },
+ { HDA_NVIDIA_MCP73_2, "NVIDIA MCP73", 0, 0 },
+ { HDA_NVIDIA_MCP78_1, "NVIDIA MCP78", 0, HDAC_QUIRK_64BIT },
+ { HDA_NVIDIA_MCP78_2, "NVIDIA MCP78", 0, HDAC_QUIRK_64BIT },
+ { HDA_NVIDIA_MCP78_3, "NVIDIA MCP78", 0, HDAC_QUIRK_64BIT },
+ { HDA_NVIDIA_MCP78_4, "NVIDIA MCP78", 0, HDAC_QUIRK_64BIT },
+ { HDA_NVIDIA_MCP79_1, "NVIDIA MCP79", 0, 0 },
+ { HDA_NVIDIA_MCP79_2, "NVIDIA MCP79", 0, 0 },
+ { HDA_NVIDIA_MCP79_3, "NVIDIA MCP79", 0, 0 },
+ { HDA_NVIDIA_MCP79_4, "NVIDIA MCP79", 0, 0 },
+ { HDA_NVIDIA_MCP89_1, "NVIDIA MCP89", 0, 0 },
+ { HDA_NVIDIA_MCP89_2, "NVIDIA MCP89", 0, 0 },
+ { HDA_NVIDIA_MCP89_3, "NVIDIA MCP89", 0, 0 },
+ { HDA_NVIDIA_MCP89_4, "NVIDIA MCP89", 0, 0 },
+ { HDA_NVIDIA_0BE2, "NVIDIA (0x0be2)", 0, HDAC_QUIRK_MSI },
+ { HDA_NVIDIA_0BE3, "NVIDIA (0x0be3)", 0, HDAC_QUIRK_MSI },
+ { HDA_NVIDIA_0BE4, "NVIDIA (0x0be4)", 0, HDAC_QUIRK_MSI },
+ { HDA_NVIDIA_GT100, "NVIDIA GT100", 0, HDAC_QUIRK_MSI },
+ { HDA_NVIDIA_GT104, "NVIDIA GT104", 0, HDAC_QUIRK_MSI },
+ { HDA_NVIDIA_GT106, "NVIDIA GT106", 0, HDAC_QUIRK_MSI },
+ { HDA_NVIDIA_GT108, "NVIDIA GT108", 0, HDAC_QUIRK_MSI },
+ { HDA_NVIDIA_GT116, "NVIDIA GT116", 0, HDAC_QUIRK_MSI },
+ { HDA_NVIDIA_GF119, "NVIDIA GF119", 0, 0 },
+ { HDA_NVIDIA_GF110_1, "NVIDIA GF110", 0, HDAC_QUIRK_MSI },
+ { HDA_NVIDIA_GF110_2, "NVIDIA GF110", 0, HDAC_QUIRK_MSI },
+ { HDA_ATI_SB450, "ATI SB450", 0, 0 },
+ { HDA_ATI_SB600, "ATI SB600", 0, 0 },
+ { HDA_ATI_RS600, "ATI RS600", 0, 0 },
+ { HDA_ATI_RS690, "ATI RS690", 0, 0 },
+ { HDA_ATI_RS780, "ATI RS780", 0, 0 },
+ { HDA_ATI_R600, "ATI R600", 0, 0 },
+ { HDA_ATI_RV610, "ATI RV610", 0, 0 },
+ { HDA_ATI_RV620, "ATI RV620", 0, 0 },
+ { HDA_ATI_RV630, "ATI RV630", 0, 0 },
+ { HDA_ATI_RV635, "ATI RV635", 0, 0 },
+ { HDA_ATI_RV710, "ATI RV710", 0, 0 },
+ { HDA_ATI_RV730, "ATI RV730", 0, 0 },
+ { HDA_ATI_RV740, "ATI RV740", 0, 0 },
+ { HDA_ATI_RV770, "ATI RV770", 0, 0 },
+ { HDA_RDC_M3010, "RDC M3010", 0, 0 },
+ { HDA_VIA_VT82XX, "VIA VT8251/8237A",0, 0 },
+ { HDA_SIS_966, "SiS 966", 0, 0 },
+ { HDA_ULI_M5461, "ULI M5461", 0, 0 },
/* Unknown */
- { HDA_INTEL_ALL, "Intel (Unknown)" },
- { HDA_NVIDIA_ALL, "NVidia (Unknown)" },
- { HDA_ATI_ALL, "ATI (Unknown)" },
- { HDA_VIA_ALL, "VIA (Unknown)" },
- { HDA_SIS_ALL, "SiS (Unknown)" },
- { HDA_ULI_ALL, "ULI (Unknown)" },
+ { HDA_INTEL_ALL, "Intel", 0, 0 },
+ { HDA_NVIDIA_ALL, "NVIDIA", 0, 0 },
+ { HDA_ATI_ALL, "ATI", 0, 0 },
+ { HDA_VIA_ALL, "VIA", 0, 0 },
+ { HDA_SIS_ALL, "SiS", 0, 0 },
+ { HDA_ULI_ALL, "ULI", 0, 0 },
};
#define HDAC_DEVICES_LEN (sizeof(hdac_devices) / sizeof(hdac_devices[0]))
@@ -571,482 +165,6 @@ static const struct {
#define HDAC_PCIESNOOP_LEN \
(sizeof(hdac_pcie_snoop) / sizeof(hdac_pcie_snoop[0]))
-static const struct {
- uint32_t rate;
- int valid;
- uint16_t base;
- uint16_t mul;
- uint16_t div;
-} hda_rate_tab[] = {
- { 8000, 1, 0x0000, 0x0000, 0x0500 }, /* (48000 * 1) / 6 */
- { 9600, 0, 0x0000, 0x0000, 0x0400 }, /* (48000 * 1) / 5 */
- { 12000, 0, 0x0000, 0x0000, 0x0300 }, /* (48000 * 1) / 4 */
- { 16000, 1, 0x0000, 0x0000, 0x0200 }, /* (48000 * 1) / 3 */
- { 18000, 0, 0x0000, 0x1000, 0x0700 }, /* (48000 * 3) / 8 */
- { 19200, 0, 0x0000, 0x0800, 0x0400 }, /* (48000 * 2) / 5 */
- { 24000, 0, 0x0000, 0x0000, 0x0100 }, /* (48000 * 1) / 2 */
- { 28800, 0, 0x0000, 0x1000, 0x0400 }, /* (48000 * 3) / 5 */
- { 32000, 1, 0x0000, 0x0800, 0x0200 }, /* (48000 * 2) / 3 */
- { 36000, 0, 0x0000, 0x1000, 0x0300 }, /* (48000 * 3) / 4 */
- { 38400, 0, 0x0000, 0x1800, 0x0400 }, /* (48000 * 4) / 5 */
- { 48000, 1, 0x0000, 0x0000, 0x0000 }, /* (48000 * 1) / 1 */
- { 64000, 0, 0x0000, 0x1800, 0x0200 }, /* (48000 * 4) / 3 */
- { 72000, 0, 0x0000, 0x1000, 0x0100 }, /* (48000 * 3) / 2 */
- { 96000, 1, 0x0000, 0x0800, 0x0000 }, /* (48000 * 2) / 1 */
- { 144000, 0, 0x0000, 0x1000, 0x0000 }, /* (48000 * 3) / 1 */
- { 192000, 1, 0x0000, 0x1800, 0x0000 }, /* (48000 * 4) / 1 */
- { 8820, 0, 0x4000, 0x0000, 0x0400 }, /* (44100 * 1) / 5 */
- { 11025, 1, 0x4000, 0x0000, 0x0300 }, /* (44100 * 1) / 4 */
- { 12600, 0, 0x4000, 0x0800, 0x0600 }, /* (44100 * 2) / 7 */
- { 14700, 0, 0x4000, 0x0000, 0x0200 }, /* (44100 * 1) / 3 */
- { 17640, 0, 0x4000, 0x0800, 0x0400 }, /* (44100 * 2) / 5 */
- { 18900, 0, 0x4000, 0x1000, 0x0600 }, /* (44100 * 3) / 7 */
- { 22050, 1, 0x4000, 0x0000, 0x0100 }, /* (44100 * 1) / 2 */
- { 25200, 0, 0x4000, 0x1800, 0x0600 }, /* (44100 * 4) / 7 */
- { 26460, 0, 0x4000, 0x1000, 0x0400 }, /* (44100 * 3) / 5 */
- { 29400, 0, 0x4000, 0x0800, 0x0200 }, /* (44100 * 2) / 3 */
- { 33075, 0, 0x4000, 0x1000, 0x0300 }, /* (44100 * 3) / 4 */
- { 35280, 0, 0x4000, 0x1800, 0x0400 }, /* (44100 * 4) / 5 */
- { 44100, 1, 0x4000, 0x0000, 0x0000 }, /* (44100 * 1) / 1 */
- { 58800, 0, 0x4000, 0x1800, 0x0200 }, /* (44100 * 4) / 3 */
- { 66150, 0, 0x4000, 0x1000, 0x0100 }, /* (44100 * 3) / 2 */
- { 88200, 1, 0x4000, 0x0800, 0x0000 }, /* (44100 * 2) / 1 */
- { 132300, 0, 0x4000, 0x1000, 0x0000 }, /* (44100 * 3) / 1 */
- { 176400, 1, 0x4000, 0x1800, 0x0000 }, /* (44100 * 4) / 1 */
-};
-#define HDA_RATE_TAB_LEN (sizeof(hda_rate_tab) / sizeof(hda_rate_tab[0]))
-
-/* All codecs you can eat... */
-#define HDA_CODEC_CONSTRUCT(vendor, id) \
- (((uint32_t)(vendor##_VENDORID) << 16) | ((id) & 0xffff))
-
-/* Cirrus Logic */
-#define CIRRUSLOGIC_VENDORID 0x1013
-#define HDA_CODEC_CS4206 HDA_CODEC_CONSTRUCT(CIRRUSLOGIC, 0x4206)
-#define HDA_CODEC_CS4207 HDA_CODEC_CONSTRUCT(CIRRUSLOGIC, 0x4207)
-#define HDA_CODEC_CSXXXX HDA_CODEC_CONSTRUCT(CIRRUSLOGIC, 0xffff)
-
-/* Realtek */
-#define REALTEK_VENDORID 0x10ec
-#define HDA_CODEC_ALC260 HDA_CODEC_CONSTRUCT(REALTEK, 0x0260)
-#define HDA_CODEC_ALC262 HDA_CODEC_CONSTRUCT(REALTEK, 0x0262)
-#define HDA_CODEC_ALC267 HDA_CODEC_CONSTRUCT(REALTEK, 0x0267)
-#define HDA_CODEC_ALC268 HDA_CODEC_CONSTRUCT(REALTEK, 0x0268)
-#define HDA_CODEC_ALC269 HDA_CODEC_CONSTRUCT(REALTEK, 0x0269)
-#define HDA_CODEC_ALC270 HDA_CODEC_CONSTRUCT(REALTEK, 0x0270)
-#define HDA_CODEC_ALC272 HDA_CODEC_CONSTRUCT(REALTEK, 0x0272)
-#define HDA_CODEC_ALC273 HDA_CODEC_CONSTRUCT(REALTEK, 0x0273)
-#define HDA_CODEC_ALC275 HDA_CODEC_CONSTRUCT(REALTEK, 0x0275)
-#define HDA_CODEC_ALC660 HDA_CODEC_CONSTRUCT(REALTEK, 0x0660)
-#define HDA_CODEC_ALC662 HDA_CODEC_CONSTRUCT(REALTEK, 0x0662)
-#define HDA_CODEC_ALC663 HDA_CODEC_CONSTRUCT(REALTEK, 0x0663)
-#define HDA_CODEC_ALC665 HDA_CODEC_CONSTRUCT(REALTEK, 0x0665)
-#define HDA_CODEC_ALC861 HDA_CODEC_CONSTRUCT(REALTEK, 0x0861)
-#define HDA_CODEC_ALC861VD HDA_CODEC_CONSTRUCT(REALTEK, 0x0862)
-#define HDA_CODEC_ALC880 HDA_CODEC_CONSTRUCT(REALTEK, 0x0880)
-#define HDA_CODEC_ALC882 HDA_CODEC_CONSTRUCT(REALTEK, 0x0882)
-#define HDA_CODEC_ALC883 HDA_CODEC_CONSTRUCT(REALTEK, 0x0883)
-#define HDA_CODEC_ALC885 HDA_CODEC_CONSTRUCT(REALTEK, 0x0885)
-#define HDA_CODEC_ALC887 HDA_CODEC_CONSTRUCT(REALTEK, 0x0887)
-#define HDA_CODEC_ALC888 HDA_CODEC_CONSTRUCT(REALTEK, 0x0888)
-#define HDA_CODEC_ALC889 HDA_CODEC_CONSTRUCT(REALTEK, 0x0889)
-#define HDA_CODEC_ALC892 HDA_CODEC_CONSTRUCT(REALTEK, 0x0892)
-#define HDA_CODEC_ALCXXXX HDA_CODEC_CONSTRUCT(REALTEK, 0xffff)
-
-/* Analog Devices */
-#define ANALOGDEVICES_VENDORID 0x11d4
-#define HDA_CODEC_AD1884A HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x184a)
-#define HDA_CODEC_AD1882 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1882)
-#define HDA_CODEC_AD1883 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1883)
-#define HDA_CODEC_AD1884 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1884)
-#define HDA_CODEC_AD1984A HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x194a)
-#define HDA_CODEC_AD1984B HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x194b)
-#define HDA_CODEC_AD1981HD HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1981)
-#define HDA_CODEC_AD1983 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1983)
-#define HDA_CODEC_AD1984 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1984)
-#define HDA_CODEC_AD1986A HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1986)
-#define HDA_CODEC_AD1987 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1987)
-#define HDA_CODEC_AD1988 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1988)
-#define HDA_CODEC_AD1988B HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x198b)
-#define HDA_CODEC_AD1882A HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x882a)
-#define HDA_CODEC_AD1989B HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x989b)
-#define HDA_CODEC_ADXXXX HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0xffff)
-
-/* CMedia */
-#define CMEDIA_VENDORID 0x434d
-#define HDA_CODEC_CMI9880 HDA_CODEC_CONSTRUCT(CMEDIA, 0x4980)
-#define HDA_CODEC_CMIXXXX HDA_CODEC_CONSTRUCT(CMEDIA, 0xffff)
-
-/* Sigmatel */
-#define SIGMATEL_VENDORID 0x8384
-#define HDA_CODEC_STAC9230X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7612)
-#define HDA_CODEC_STAC9230D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7613)
-#define HDA_CODEC_STAC9229X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7614)
-#define HDA_CODEC_STAC9229D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7615)
-#define HDA_CODEC_STAC9228X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7616)
-#define HDA_CODEC_STAC9228D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7617)
-#define HDA_CODEC_STAC9227X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7618)
-#define HDA_CODEC_STAC9227D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7619)
-#define HDA_CODEC_STAC9274 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7620)
-#define HDA_CODEC_STAC9274D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7621)
-#define HDA_CODEC_STAC9273X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7622)
-#define HDA_CODEC_STAC9273D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7623)
-#define HDA_CODEC_STAC9272X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7624)
-#define HDA_CODEC_STAC9272D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7625)
-#define HDA_CODEC_STAC9271X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7626)
-#define HDA_CODEC_STAC9271D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7627)
-#define HDA_CODEC_STAC9274X5NH HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7628)
-#define HDA_CODEC_STAC9274D5NH HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7629)
-#define HDA_CODEC_STAC9250 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7634)
-#define HDA_CODEC_STAC9251 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7636)
-#define HDA_CODEC_IDT92HD700X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7638)
-#define HDA_CODEC_IDT92HD700D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7639)
-#define HDA_CODEC_IDT92HD206X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7645)
-#define HDA_CODEC_IDT92HD206D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7646)
-#define HDA_CODEC_CXD9872RDK HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7661)
-#define HDA_CODEC_STAC9872AK HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7662)
-#define HDA_CODEC_CXD9872AKD HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7664)
-#define HDA_CODEC_STAC9221 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7680)
-#define HDA_CODEC_STAC922XD HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7681)
-#define HDA_CODEC_STAC9221_A2 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7682)
-#define HDA_CODEC_STAC9221D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7683)
-#define HDA_CODEC_STAC9220 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7690)
-#define HDA_CODEC_STAC9200D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7691)
-#define HDA_CODEC_IDT92HD005 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7698)
-#define HDA_CODEC_IDT92HD005D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7699)
-#define HDA_CODEC_STAC9205X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x76a0)
-#define HDA_CODEC_STAC9205D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x76a1)
-#define HDA_CODEC_STAC9204X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x76a2)
-#define HDA_CODEC_STAC9204D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x76a3)
-#define HDA_CODEC_STAC9220_A2 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7880)
-#define HDA_CODEC_STAC9220_A1 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7882)
-#define HDA_CODEC_STACXXXX HDA_CODEC_CONSTRUCT(SIGMATEL, 0xffff)
-
-/* IDT */
-#define IDT_VENDORID 0x111d
-#define HDA_CODEC_IDT92HD75BX HDA_CODEC_CONSTRUCT(IDT, 0x7603)
-#define HDA_CODEC_IDT92HD83C1X HDA_CODEC_CONSTRUCT(IDT, 0x7604)
-#define HDA_CODEC_IDT92HD81B1X HDA_CODEC_CONSTRUCT(IDT, 0x7605)
-#define HDA_CODEC_IDT92HD75B3 HDA_CODEC_CONSTRUCT(IDT, 0x7608)
-#define HDA_CODEC_IDT92HD73D1 HDA_CODEC_CONSTRUCT(IDT, 0x7674)
-#define HDA_CODEC_IDT92HD73C1 HDA_CODEC_CONSTRUCT(IDT, 0x7675)
-#define HDA_CODEC_IDT92HD73E1 HDA_CODEC_CONSTRUCT(IDT, 0x7676)
-#define HDA_CODEC_IDT92HD71B8 HDA_CODEC_CONSTRUCT(IDT, 0x76b0)
-#define HDA_CODEC_IDT92HD71B7 HDA_CODEC_CONSTRUCT(IDT, 0x76b2)
-#define HDA_CODEC_IDT92HD71B5 HDA_CODEC_CONSTRUCT(IDT, 0x76b6)
-#define HDA_CODEC_IDT92HD83C1C HDA_CODEC_CONSTRUCT(IDT, 0x76d4)
-#define HDA_CODEC_IDT92HD81B1C HDA_CODEC_CONSTRUCT(IDT, 0x76d5)
-#define HDA_CODEC_IDTXXXX HDA_CODEC_CONSTRUCT(IDT, 0xffff)
-
-/* Silicon Image */
-#define SII_VENDORID 0x1095
-#define HDA_CODEC_SII1390 HDA_CODEC_CONSTRUCT(SII, 0x1390)
-#define HDA_CODEC_SII1392 HDA_CODEC_CONSTRUCT(SII, 0x1392)
-#define HDA_CODEC_SIIXXXX HDA_CODEC_CONSTRUCT(SII, 0xffff)
-
-/* Lucent/Agere */
-#define AGERE_VENDORID 0x11c1
-#define HDA_CODEC_AGEREXXXX HDA_CODEC_CONSTRUCT(AGERE, 0xffff)
-
-/* Conexant */
-#define CONEXANT_VENDORID 0x14f1
-#define HDA_CODEC_CX20549 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5045)
-#define HDA_CODEC_CX20551 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5047)
-#define HDA_CODEC_CX20561 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5051)
-#define HDA_CODEC_CX20582 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5066)
-#define HDA_CODEC_CX20583 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5067)
-#define HDA_CODEC_CX20584 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5068)
-#define HDA_CODEC_CX20585 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5069)
-#define HDA_CODEC_CX20590 HDA_CODEC_CONSTRUCT(CONEXANT, 0x506e)
-#define HDA_CODEC_CX20631 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5097)
-#define HDA_CODEC_CX20632 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5098)
-#define HDA_CODEC_CX20641 HDA_CODEC_CONSTRUCT(CONEXANT, 0x50a1)
-#define HDA_CODEC_CX20642 HDA_CODEC_CONSTRUCT(CONEXANT, 0x50a2)
-#define HDA_CODEC_CX20651 HDA_CODEC_CONSTRUCT(CONEXANT, 0x50ab)
-#define HDA_CODEC_CX20652 HDA_CODEC_CONSTRUCT(CONEXANT, 0x50ac)
-#define HDA_CODEC_CX20664 HDA_CODEC_CONSTRUCT(CONEXANT, 0x50b8)
-#define HDA_CODEC_CX20665 HDA_CODEC_CONSTRUCT(CONEXANT, 0x50b9)
-#define HDA_CODEC_CXXXXX HDA_CODEC_CONSTRUCT(CONEXANT, 0xffff)
-
-/* VIA */
-#define HDA_CODEC_VT1708_8 HDA_CODEC_CONSTRUCT(VIA, 0x1708)
-#define HDA_CODEC_VT1708_9 HDA_CODEC_CONSTRUCT(VIA, 0x1709)
-#define HDA_CODEC_VT1708_A HDA_CODEC_CONSTRUCT(VIA, 0x170a)
-#define HDA_CODEC_VT1708_B HDA_CODEC_CONSTRUCT(VIA, 0x170b)
-#define HDA_CODEC_VT1709_0 HDA_CODEC_CONSTRUCT(VIA, 0xe710)
-#define HDA_CODEC_VT1709_1 HDA_CODEC_CONSTRUCT(VIA, 0xe711)
-#define HDA_CODEC_VT1709_2 HDA_CODEC_CONSTRUCT(VIA, 0xe712)
-#define HDA_CODEC_VT1709_3 HDA_CODEC_CONSTRUCT(VIA, 0xe713)
-#define HDA_CODEC_VT1709_4 HDA_CODEC_CONSTRUCT(VIA, 0xe714)
-#define HDA_CODEC_VT1709_5 HDA_CODEC_CONSTRUCT(VIA, 0xe715)
-#define HDA_CODEC_VT1709_6 HDA_CODEC_CONSTRUCT(VIA, 0xe716)
-#define HDA_CODEC_VT1709_7 HDA_CODEC_CONSTRUCT(VIA, 0xe717)
-#define HDA_CODEC_VT1708B_0 HDA_CODEC_CONSTRUCT(VIA, 0xe720)
-#define HDA_CODEC_VT1708B_1 HDA_CODEC_CONSTRUCT(VIA, 0xe721)
-#define HDA_CODEC_VT1708B_2 HDA_CODEC_CONSTRUCT(VIA, 0xe722)
-#define HDA_CODEC_VT1708B_3 HDA_CODEC_CONSTRUCT(VIA, 0xe723)
-#define HDA_CODEC_VT1708B_4 HDA_CODEC_CONSTRUCT(VIA, 0xe724)
-#define HDA_CODEC_VT1708B_5 HDA_CODEC_CONSTRUCT(VIA, 0xe725)
-#define HDA_CODEC_VT1708B_6 HDA_CODEC_CONSTRUCT(VIA, 0xe726)
-#define HDA_CODEC_VT1708B_7 HDA_CODEC_CONSTRUCT(VIA, 0xe727)
-#define HDA_CODEC_VT1708S_0 HDA_CODEC_CONSTRUCT(VIA, 0x0397)
-#define HDA_CODEC_VT1708S_1 HDA_CODEC_CONSTRUCT(VIA, 0x1397)
-#define HDA_CODEC_VT1708S_2 HDA_CODEC_CONSTRUCT(VIA, 0x2397)
-#define HDA_CODEC_VT1708S_3 HDA_CODEC_CONSTRUCT(VIA, 0x3397)
-#define HDA_CODEC_VT1708S_4 HDA_CODEC_CONSTRUCT(VIA, 0x4397)
-#define HDA_CODEC_VT1708S_5 HDA_CODEC_CONSTRUCT(VIA, 0x5397)
-#define HDA_CODEC_VT1708S_6 HDA_CODEC_CONSTRUCT(VIA, 0x6397)
-#define HDA_CODEC_VT1708S_7 HDA_CODEC_CONSTRUCT(VIA, 0x7397)
-#define HDA_CODEC_VT1702_0 HDA_CODEC_CONSTRUCT(VIA, 0x0398)
-#define HDA_CODEC_VT1702_1 HDA_CODEC_CONSTRUCT(VIA, 0x1398)
-#define HDA_CODEC_VT1702_2 HDA_CODEC_CONSTRUCT(VIA, 0x2398)
-#define HDA_CODEC_VT1702_3 HDA_CODEC_CONSTRUCT(VIA, 0x3398)
-#define HDA_CODEC_VT1702_4 HDA_CODEC_CONSTRUCT(VIA, 0x4398)
-#define HDA_CODEC_VT1702_5 HDA_CODEC_CONSTRUCT(VIA, 0x5398)
-#define HDA_CODEC_VT1702_6 HDA_CODEC_CONSTRUCT(VIA, 0x6398)
-#define HDA_CODEC_VT1702_7 HDA_CODEC_CONSTRUCT(VIA, 0x7398)
-#define HDA_CODEC_VT1716S_0 HDA_CODEC_CONSTRUCT(VIA, 0x0433)
-#define HDA_CODEC_VT1716S_1 HDA_CODEC_CONSTRUCT(VIA, 0xa721)
-#define HDA_CODEC_VT1718S_0 HDA_CODEC_CONSTRUCT(VIA, 0x0428)
-#define HDA_CODEC_VT1718S_1 HDA_CODEC_CONSTRUCT(VIA, 0x4428)
-#define HDA_CODEC_VT1812 HDA_CODEC_CONSTRUCT(VIA, 0x0448)
-#define HDA_CODEC_VT1818S HDA_CODEC_CONSTRUCT(VIA, 0x0440)
-#define HDA_CODEC_VT1828S HDA_CODEC_CONSTRUCT(VIA, 0x4441)
-#define HDA_CODEC_VT2002P_0 HDA_CODEC_CONSTRUCT(VIA, 0x0438)
-#define HDA_CODEC_VT2002P_1 HDA_CODEC_CONSTRUCT(VIA, 0x4438)
-#define HDA_CODEC_VT2020 HDA_CODEC_CONSTRUCT(VIA, 0x0441)
-#define HDA_CODEC_VTXXXX HDA_CODEC_CONSTRUCT(VIA, 0xffff)
-
-/* ATI */
-#define HDA_CODEC_ATIRS600_1 HDA_CODEC_CONSTRUCT(ATI, 0x793c)
-#define HDA_CODEC_ATIRS600_2 HDA_CODEC_CONSTRUCT(ATI, 0x7919)
-#define HDA_CODEC_ATIRS690 HDA_CODEC_CONSTRUCT(ATI, 0x791a)
-#define HDA_CODEC_ATIR6XX HDA_CODEC_CONSTRUCT(ATI, 0xaa01)
-#define HDA_CODEC_ATIXXXX HDA_CODEC_CONSTRUCT(ATI, 0xffff)
-
-/* NVIDIA */
-#define HDA_CODEC_NVIDIAMCP78 HDA_CODEC_CONSTRUCT(NVIDIA, 0x0002)
-#define HDA_CODEC_NVIDIAMCP78_2 HDA_CODEC_CONSTRUCT(NVIDIA, 0x0006)
-#define HDA_CODEC_NVIDIAMCP7A HDA_CODEC_CONSTRUCT(NVIDIA, 0x0007)
-#define HDA_CODEC_NVIDIAGT220 HDA_CODEC_CONSTRUCT(NVIDIA, 0x000a)
-#define HDA_CODEC_NVIDIAGT21X HDA_CODEC_CONSTRUCT(NVIDIA, 0x000b)
-#define HDA_CODEC_NVIDIAMCP89 HDA_CODEC_CONSTRUCT(NVIDIA, 0x000c)
-#define HDA_CODEC_NVIDIAGT240 HDA_CODEC_CONSTRUCT(NVIDIA, 0x000d)
-#define HDA_CODEC_NVIDIAMCP67 HDA_CODEC_CONSTRUCT(NVIDIA, 0x0067)
-#define HDA_CODEC_NVIDIAMCP73 HDA_CODEC_CONSTRUCT(NVIDIA, 0x8001)
-#define HDA_CODEC_NVIDIAXXXX HDA_CODEC_CONSTRUCT(NVIDIA, 0xffff)
-
-/* INTEL */
-#define HDA_CODEC_INTELIP HDA_CODEC_CONSTRUCT(INTEL, 0x0054)
-#define HDA_CODEC_INTELBL HDA_CODEC_CONSTRUCT(INTEL, 0x2801)
-#define HDA_CODEC_INTELCA HDA_CODEC_CONSTRUCT(INTEL, 0x2802)
-#define HDA_CODEC_INTELEL HDA_CODEC_CONSTRUCT(INTEL, 0x2803)
-#define HDA_CODEC_INTELIP2 HDA_CODEC_CONSTRUCT(INTEL, 0x2804)
-#define HDA_CODEC_INTELCPT HDA_CODEC_CONSTRUCT(INTEL, 0x2805)
-#define HDA_CODEC_INTELCL HDA_CODEC_CONSTRUCT(INTEL, 0x29fb)
-#define HDA_CODEC_INTELXXXX HDA_CODEC_CONSTRUCT(INTEL, 0xffff)
-
-/* Codecs */
-static const struct {
- uint32_t id;
- char *name;
-} hdac_codecs[] = {
- { HDA_CODEC_CS4206, "Cirrus Logic CS4206" },
- { HDA_CODEC_CS4207, "Cirrus Logic CS4207" },
- { HDA_CODEC_ALC260, "Realtek ALC260" },
- { HDA_CODEC_ALC262, "Realtek ALC262" },
- { HDA_CODEC_ALC267, "Realtek ALC267" },
- { HDA_CODEC_ALC268, "Realtek ALC268" },
- { HDA_CODEC_ALC269, "Realtek ALC269" },
- { HDA_CODEC_ALC270, "Realtek ALC270" },
- { HDA_CODEC_ALC272, "Realtek ALC272" },
- { HDA_CODEC_ALC273, "Realtek ALC273" },
- { HDA_CODEC_ALC275, "Realtek ALC275" },
- { HDA_CODEC_ALC660, "Realtek ALC660" },
- { HDA_CODEC_ALC662, "Realtek ALC662" },
- { HDA_CODEC_ALC663, "Realtek ALC663" },
- { HDA_CODEC_ALC665, "Realtek ALC665" },
- { HDA_CODEC_ALC861, "Realtek ALC861" },
- { HDA_CODEC_ALC861VD, "Realtek ALC861-VD" },
- { HDA_CODEC_ALC880, "Realtek ALC880" },
- { HDA_CODEC_ALC882, "Realtek ALC882" },
- { HDA_CODEC_ALC883, "Realtek ALC883" },
- { HDA_CODEC_ALC885, "Realtek ALC885" },
- { HDA_CODEC_ALC887, "Realtek ALC887" },
- { HDA_CODEC_ALC888, "Realtek ALC888" },
- { HDA_CODEC_ALC889, "Realtek ALC889" },
- { HDA_CODEC_ALC892, "Realtek ALC892" },
- { HDA_CODEC_AD1882, "Analog Devices AD1882" },
- { HDA_CODEC_AD1882A, "Analog Devices AD1882A" },
- { HDA_CODEC_AD1883, "Analog Devices AD1883" },
- { HDA_CODEC_AD1884, "Analog Devices AD1884" },
- { HDA_CODEC_AD1884A, "Analog Devices AD1884A" },
- { HDA_CODEC_AD1981HD, "Analog Devices AD1981HD" },
- { HDA_CODEC_AD1983, "Analog Devices AD1983" },
- { HDA_CODEC_AD1984, "Analog Devices AD1984" },
- { HDA_CODEC_AD1984A, "Analog Devices AD1984A" },
- { HDA_CODEC_AD1984B, "Analog Devices AD1984B" },
- { HDA_CODEC_AD1986A, "Analog Devices AD1986A" },
- { HDA_CODEC_AD1987, "Analog Devices AD1987" },
- { HDA_CODEC_AD1988, "Analog Devices AD1988A" },
- { HDA_CODEC_AD1988B, "Analog Devices AD1988B" },
- { HDA_CODEC_AD1989B, "Analog Devices AD1989B" },
- { HDA_CODEC_CMI9880, "CMedia CMI9880" },
- { HDA_CODEC_CXD9872RDK, "Sigmatel CXD9872RD/K" },
- { HDA_CODEC_CXD9872AKD, "Sigmatel CXD9872AKD" },
- { HDA_CODEC_STAC9200D, "Sigmatel STAC9200D" },
- { HDA_CODEC_STAC9204X, "Sigmatel STAC9204X" },
- { HDA_CODEC_STAC9204D, "Sigmatel STAC9204D" },
- { HDA_CODEC_STAC9205X, "Sigmatel STAC9205X" },
- { HDA_CODEC_STAC9205D, "Sigmatel STAC9205D" },
- { HDA_CODEC_STAC9220, "Sigmatel STAC9220" },
- { HDA_CODEC_STAC9220_A1, "Sigmatel STAC9220_A1" },
- { HDA_CODEC_STAC9220_A2, "Sigmatel STAC9220_A2" },
- { HDA_CODEC_STAC9221, "Sigmatel STAC9221" },
- { HDA_CODEC_STAC9221_A2, "Sigmatel STAC9221_A2" },
- { HDA_CODEC_STAC9221D, "Sigmatel STAC9221D" },
- { HDA_CODEC_STAC922XD, "Sigmatel STAC9220D/9223D" },
- { HDA_CODEC_STAC9227X, "Sigmatel STAC9227X" },
- { HDA_CODEC_STAC9227D, "Sigmatel STAC9227D" },
- { HDA_CODEC_STAC9228X, "Sigmatel STAC9228X" },
- { HDA_CODEC_STAC9228D, "Sigmatel STAC9228D" },
- { HDA_CODEC_STAC9229X, "Sigmatel STAC9229X" },
- { HDA_CODEC_STAC9229D, "Sigmatel STAC9229D" },
- { HDA_CODEC_STAC9230X, "Sigmatel STAC9230X" },
- { HDA_CODEC_STAC9230D, "Sigmatel STAC9230D" },
- { HDA_CODEC_STAC9250, "Sigmatel STAC9250" },
- { HDA_CODEC_STAC9251, "Sigmatel STAC9251" },
- { HDA_CODEC_STAC9271X, "Sigmatel STAC9271X" },
- { HDA_CODEC_STAC9271D, "Sigmatel STAC9271D" },
- { HDA_CODEC_STAC9272X, "Sigmatel STAC9272X" },
- { HDA_CODEC_STAC9272D, "Sigmatel STAC9272D" },
- { HDA_CODEC_STAC9273X, "Sigmatel STAC9273X" },
- { HDA_CODEC_STAC9273D, "Sigmatel STAC9273D" },
- { HDA_CODEC_STAC9274, "Sigmatel STAC9274" },
- { HDA_CODEC_STAC9274D, "Sigmatel STAC9274D" },
- { HDA_CODEC_STAC9274X5NH, "Sigmatel STAC9274X5NH" },
- { HDA_CODEC_STAC9274D5NH, "Sigmatel STAC9274D5NH" },
- { HDA_CODEC_STAC9872AK, "Sigmatel STAC9872AK" },
- { HDA_CODEC_IDT92HD005, "IDT 92HD005" },
- { HDA_CODEC_IDT92HD005D, "IDT 92HD005D" },
- { HDA_CODEC_IDT92HD206X, "IDT 92HD206X" },
- { HDA_CODEC_IDT92HD206D, "IDT 92HD206D" },
- { HDA_CODEC_IDT92HD700X, "IDT 92HD700X" },
- { HDA_CODEC_IDT92HD700D, "IDT 92HD700D" },
- { HDA_CODEC_IDT92HD71B5, "IDT 92HD71B5" },
- { HDA_CODEC_IDT92HD71B7, "IDT 92HD71B7" },
- { HDA_CODEC_IDT92HD71B8, "IDT 92HD71B8" },
- { HDA_CODEC_IDT92HD73C1, "IDT 92HD73C1" },
- { HDA_CODEC_IDT92HD73D1, "IDT 92HD73D1" },
- { HDA_CODEC_IDT92HD73E1, "IDT 92HD73E1" },
- { HDA_CODEC_IDT92HD75B3, "IDT 92HD75B3" },
- { HDA_CODEC_IDT92HD75BX, "IDT 92HD75BX" },
- { HDA_CODEC_IDT92HD81B1C, "IDT 92HD81B1C" },
- { HDA_CODEC_IDT92HD81B1X, "IDT 92HD81B1X" },
- { HDA_CODEC_IDT92HD83C1C, "IDT 92HD83C1C" },
- { HDA_CODEC_IDT92HD83C1X, "IDT 92HD83C1X" },
- { HDA_CODEC_CX20549, "Conexant CX20549 (Venice)" },
- { HDA_CODEC_CX20551, "Conexant CX20551 (Waikiki)" },
- { HDA_CODEC_CX20561, "Conexant CX20561 (Hermosa)" },
- { HDA_CODEC_CX20582, "Conexant CX20582 (Pebble)" },
- { HDA_CODEC_CX20583, "Conexant CX20583 (Pebble HSF)" },
- { HDA_CODEC_CX20584, "Conexant CX20584" },
- { HDA_CODEC_CX20585, "Conexant CX20585" },
- { HDA_CODEC_CX20590, "Conexant CX20590" },
- { HDA_CODEC_CX20631, "Conexant CX20631" },
- { HDA_CODEC_CX20632, "Conexant CX20632" },
- { HDA_CODEC_CX20641, "Conexant CX20641" },
- { HDA_CODEC_CX20642, "Conexant CX20642" },
- { HDA_CODEC_CX20651, "Conexant CX20651" },
- { HDA_CODEC_CX20652, "Conexant CX20652" },
- { HDA_CODEC_CX20664, "Conexant CX20664" },
- { HDA_CODEC_CX20665, "Conexant CX20665" },
- { HDA_CODEC_VT1708_8, "VIA VT1708_8" },
- { HDA_CODEC_VT1708_9, "VIA VT1708_9" },
- { HDA_CODEC_VT1708_A, "VIA VT1708_A" },
- { HDA_CODEC_VT1708_B, "VIA VT1708_B" },
- { HDA_CODEC_VT1709_0, "VIA VT1709_0" },
- { HDA_CODEC_VT1709_1, "VIA VT1709_1" },
- { HDA_CODEC_VT1709_2, "VIA VT1709_2" },
- { HDA_CODEC_VT1709_3, "VIA VT1709_3" },
- { HDA_CODEC_VT1709_4, "VIA VT1709_4" },
- { HDA_CODEC_VT1709_5, "VIA VT1709_5" },
- { HDA_CODEC_VT1709_6, "VIA VT1709_6" },
- { HDA_CODEC_VT1709_7, "VIA VT1709_7" },
- { HDA_CODEC_VT1708B_0, "VIA VT1708B_0" },
- { HDA_CODEC_VT1708B_1, "VIA VT1708B_1" },
- { HDA_CODEC_VT1708B_2, "VIA VT1708B_2" },
- { HDA_CODEC_VT1708B_3, "VIA VT1708B_3" },
- { HDA_CODEC_VT1708B_4, "VIA VT1708B_4" },
- { HDA_CODEC_VT1708B_5, "VIA VT1708B_5" },
- { HDA_CODEC_VT1708B_6, "VIA VT1708B_6" },
- { HDA_CODEC_VT1708B_7, "VIA VT1708B_7" },
- { HDA_CODEC_VT1708S_0, "VIA VT1708S_0" },
- { HDA_CODEC_VT1708S_1, "VIA VT1708S_1" },
- { HDA_CODEC_VT1708S_2, "VIA VT1708S_2" },
- { HDA_CODEC_VT1708S_3, "VIA VT1708S_3" },
- { HDA_CODEC_VT1708S_4, "VIA VT1708S_4" },
- { HDA_CODEC_VT1708S_5, "VIA VT1708S_5" },
- { HDA_CODEC_VT1708S_6, "VIA VT1708S_6" },
- { HDA_CODEC_VT1708S_7, "VIA VT1708S_7" },
- { HDA_CODEC_VT1702_0, "VIA VT1702_0" },
- { HDA_CODEC_VT1702_1, "VIA VT1702_1" },
- { HDA_CODEC_VT1702_2, "VIA VT1702_2" },
- { HDA_CODEC_VT1702_3, "VIA VT1702_3" },
- { HDA_CODEC_VT1702_4, "VIA VT1702_4" },
- { HDA_CODEC_VT1702_5, "VIA VT1702_5" },
- { HDA_CODEC_VT1702_6, "VIA VT1702_6" },
- { HDA_CODEC_VT1702_7, "VIA VT1702_7" },
- { HDA_CODEC_VT1716S_0, "VIA VT1716S_0" },
- { HDA_CODEC_VT1716S_1, "VIA VT1716S_1" },
- { HDA_CODEC_VT1718S_0, "VIA VT1718S_0" },
- { HDA_CODEC_VT1718S_1, "VIA VT1718S_1" },
- { HDA_CODEC_VT1812, "VIA VT1812" },
- { HDA_CODEC_VT1818S, "VIA VT1818S" },
- { HDA_CODEC_VT1828S, "VIA VT1828S" },
- { HDA_CODEC_VT2002P_0, "VIA VT2002P_0" },
- { HDA_CODEC_VT2002P_1, "VIA VT2002P_1" },
- { HDA_CODEC_VT2020, "VIA VT2020" },
- { HDA_CODEC_ATIRS600_1,"ATI RS600 HDMI" },
- { HDA_CODEC_ATIRS600_2,"ATI RS600 HDMI" },
- { HDA_CODEC_ATIRS690, "ATI RS690/780 HDMI" },
- { HDA_CODEC_ATIR6XX, "ATI R6xx HDMI" },
- { HDA_CODEC_NVIDIAMCP67, "NVidia MCP67 HDMI" },
- { HDA_CODEC_NVIDIAMCP73, "NVidia MCP73 HDMI" },
- { HDA_CODEC_NVIDIAMCP78, "NVidia MCP78 HDMI" },
- { HDA_CODEC_NVIDIAMCP78_2, "NVidia MCP78 HDMI" },
- { HDA_CODEC_NVIDIAMCP7A, "NVidia MCP7A HDMI" },
- { HDA_CODEC_NVIDIAGT220, "NVidia GT220 HDMI" },
- { HDA_CODEC_NVIDIAGT21X, "NVidia GT21x HDMI" },
- { HDA_CODEC_NVIDIAMCP89, "NVidia MCP89 HDMI" },
- { HDA_CODEC_NVIDIAGT240, "NVidia GT240 HDMI" },
- { HDA_CODEC_INTELIP, "Intel Ibex Peak HDMI" },
- { HDA_CODEC_INTELBL, "Intel Bearlake HDMI" },
- { HDA_CODEC_INTELCA, "Intel Cantiga HDMI" },
- { HDA_CODEC_INTELEL, "Intel Eaglelake HDMI" },
- { HDA_CODEC_INTELIP2, "Intel Ibex Peak HDMI" },
- { HDA_CODEC_INTELCPT, "Intel Cougar Point HDMI" },
- { HDA_CODEC_INTELCL, "Intel Crestline HDMI" },
- { HDA_CODEC_SII1390, "Silicon Image SiI1390 HDMI" },
- { HDA_CODEC_SII1392, "Silicon Image SiI1392 HDMI" },
- /* Unknown codec */
- { HDA_CODEC_ALCXXXX, "Realtek (Unknown)" },
- { HDA_CODEC_ADXXXX, "Analog Devices (Unknown)" },
- { HDA_CODEC_CSXXXX, "Cirrus Logic (Unknown)" },
- { HDA_CODEC_CMIXXXX, "CMedia (Unknown)" },
- { HDA_CODEC_STACXXXX, "Sigmatel (Unknown)" },
- { HDA_CODEC_SIIXXXX, "Silicon Image (Unknown)" },
- { HDA_CODEC_AGEREXXXX, "Lucent/Agere Systems (Unknown)" },
- { HDA_CODEC_CXXXXX, "Conexant (Unknown)" },
- { HDA_CODEC_VTXXXX, "VIA (Unknown)" },
- { HDA_CODEC_ATIXXXX, "ATI (Unknown)" },
- { HDA_CODEC_NVIDIAXXXX,"NVidia (Unknown)" },
- { HDA_CODEC_INTELXXXX, "Intel (Unknown)" },
- { HDA_CODEC_IDTXXXX, "IDT (Unknown)" },
-};
-#define HDAC_CODECS_LEN (sizeof(hdac_codecs) / sizeof(hdac_codecs[0]))
-
-
/****************************************************************************
* Function prototypes
****************************************************************************/
@@ -1065,392 +183,78 @@ static void hdac_corb_init(struct hdac_softc *);
static void hdac_rirb_init(struct hdac_softc *);
static void hdac_corb_start(struct hdac_softc *);
static void hdac_rirb_start(struct hdac_softc *);
-static void hdac_scan_codecs(struct hdac_softc *);
-static void hdac_probe_codec(struct hdac_codec *);
-static void hdac_probe_function(struct hdac_codec *, nid_t);
-static int hdac_pcmchannel_setup(struct hdac_chan *);
static void hdac_attach2(void *);
-static uint32_t hdac_command_sendone_internal(struct hdac_softc *,
- uint32_t, int);
-static void hdac_command_send_internal(struct hdac_softc *,
- struct hdac_command_list *, int);
+static uint32_t hdac_send_command(struct hdac_softc *, nid_t, uint32_t);
static int hdac_probe(device_t);
static int hdac_attach(device_t);
static int hdac_detach(device_t);
static int hdac_suspend(device_t);
static int hdac_resume(device_t);
-static void hdac_widget_connection_select(struct hdac_widget *, uint8_t);
-static void hdac_audio_ctl_amp_set(struct hdac_audio_ctl *,
- uint32_t, int, int);
-static struct hdac_audio_ctl *hdac_audio_ctl_amp_get(struct hdac_devinfo *,
- nid_t, int, int, int);
-static void hdac_audio_ctl_amp_set_internal(struct hdac_softc *,
- nid_t, nid_t, int, int, int, int, int, int);
-static struct hdac_widget *hdac_widget_get(struct hdac_devinfo *, nid_t);
static int hdac_rirb_flush(struct hdac_softc *sc);
static int hdac_unsolq_flush(struct hdac_softc *sc);
-static void hdac_dump_pin_config(struct hdac_widget *w, uint32_t conf);
-
#define hdac_command(a1, a2, a3) \
- hdac_command_sendone_internal(a1, a2, a3)
-
-#define hdac_codec_id(c) \
- ((uint32_t)((c == NULL) ? 0x00000000 : \
- ((((uint32_t)(c)->vendor_id & 0x0000ffff) << 16) | \
- ((uint32_t)(c)->device_id & 0x0000ffff))))
+ hdac_send_command(a1, a3, a2)
-static char *
-hdac_codec_name(struct hdac_codec *codec)
-{
- uint32_t id;
- int i;
-
- id = hdac_codec_id(codec);
-
- for (i = 0; i < HDAC_CODECS_LEN; i++) {
- if (HDA_DEV_MATCH(hdac_codecs[i].id, id))
- return (hdac_codecs[i].name);
- }
-
- return ((id == 0x00000000) ? "NULL Codec" : "Unknown Codec");
-}
-
-static char *
-hdac_audio_ctl_ossmixer_mask2allname(uint32_t mask, char *buf, size_t len)
-{
- static char *ossname[] = SOUND_DEVICE_NAMES;
- int i, first = 1;
-
- bzero(buf, len);
- for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) {
- if (mask & (1 << i)) {
- if (first == 0)
- strlcat(buf, ", ", len);
- strlcat(buf, ossname[i], len);
- first = 0;
- }
- }
- return (buf);
-}
-
-static struct hdac_audio_ctl *
-hdac_audio_ctl_each(struct hdac_devinfo *devinfo, int *index)
-{
- if (devinfo == NULL ||
- devinfo->node_type != HDA_PARAM_FCT_GRP_TYPE_NODE_TYPE_AUDIO ||
- index == NULL || devinfo->function.audio.ctl == NULL ||
- devinfo->function.audio.ctlcnt < 1 ||
- *index < 0 || *index >= devinfo->function.audio.ctlcnt)
- return (NULL);
- return (&devinfo->function.audio.ctl[(*index)++]);
-}
-
-static struct hdac_audio_ctl *
-hdac_audio_ctl_amp_get(struct hdac_devinfo *devinfo, nid_t nid, int dir,
- int index, int cnt)
-{
- struct hdac_audio_ctl *ctl;
- int i, found = 0;
-
- if (devinfo == NULL || devinfo->function.audio.ctl == NULL)
- return (NULL);
-
- i = 0;
- while ((ctl = hdac_audio_ctl_each(devinfo, &i)) != NULL) {
- if (ctl->enable == 0)
- continue;
- if (ctl->widget->nid != nid)
- continue;
- if (dir && ctl->ndir != dir)
- continue;
- if (index >= 0 && ctl->ndir == HDA_CTL_IN &&
- ctl->dir == ctl->ndir && ctl->index != index)
- continue;
- found++;
- if (found == cnt || cnt <= 0)
- return (ctl);
- }
-
- return (NULL);
-}
-
-/*
- * Jack detection (Speaker/HP redirection) event handler.
- */
+/* This function surely going to make its way into upper level someday. */
static void
-hdac_hp_switch_handler(struct hdac_devinfo *devinfo)
+hdac_config_fetch(struct hdac_softc *sc, uint32_t *on, uint32_t *off)
{
- struct hdac_audio_as *as;
- struct hdac_softc *sc;
- struct hdac_widget *w;
- struct hdac_audio_ctl *ctl;
- uint32_t val, res;
- int i, j;
- nid_t cad;
+ const char *res = NULL;
+ int i = 0, j, k, len, inv;
- if (devinfo == NULL || devinfo->codec == NULL ||
- devinfo->codec->sc == NULL)
+ if (resource_string_value(device_get_name(sc->dev),
+ device_get_unit(sc->dev), "config", &res) != 0)
return;
-
- sc = devinfo->codec->sc;
- cad = devinfo->codec->cad;
- as = devinfo->function.audio.as;
- for (i = 0; i < devinfo->function.audio.ascnt; i++) {
- if (as[i].hpredir < 0)
- continue;
-
- w = hdac_widget_get(devinfo, as[i].pins[15]);
- if (w == NULL || w->enable == 0 || w->type !=
- HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
- continue;
-
- res = hdac_command(sc,
- HDA_CMD_GET_PIN_SENSE(cad, as[i].pins[15]), cad);
-
- HDA_BOOTVERBOSE(
- device_printf(sc->dev,
- "Pin sense: nid=%d res=0x%08x\n",
- as[i].pins[15], res);
- );
-
- res = HDA_CMD_GET_PIN_SENSE_PRESENCE_DETECT(res);
- if (devinfo->function.audio.quirks & HDA_QUIRK_SENSEINV)
- res ^= 1;
-
- /* (Un)Mute headphone pin. */
- ctl = hdac_audio_ctl_amp_get(devinfo,
- as[i].pins[15], HDA_CTL_IN, -1, 1);
- if (ctl != NULL && ctl->mute) {
- /* If pin has muter - use it. */
- val = (res != 0) ? 0 : 1;
- if (val != ctl->forcemute) {
- ctl->forcemute = val;
- hdac_audio_ctl_amp_set(ctl,
- HDA_AMP_MUTE_DEFAULT,
- HDA_AMP_VOL_DEFAULT, HDA_AMP_VOL_DEFAULT);
- }
- } else {
- /* If there is no muter - disable pin output. */
- w = hdac_widget_get(devinfo, as[i].pins[15]);
- if (w != NULL && w->type ==
- HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) {
- if (res != 0)
- val = w->wclass.pin.ctrl |
- HDA_CMD_SET_PIN_WIDGET_CTRL_OUT_ENABLE;
- else
- val = w->wclass.pin.ctrl &
- ~HDA_CMD_SET_PIN_WIDGET_CTRL_OUT_ENABLE;
- if (val != w->wclass.pin.ctrl) {
- w->wclass.pin.ctrl = val;
- hdac_command(sc,
- HDA_CMD_SET_PIN_WIDGET_CTRL(cad,
- w->nid, w->wclass.pin.ctrl), cad);
- }
- }
+ if (!(res != NULL && strlen(res) > 0))
+ return;
+ HDA_BOOTVERBOSE(
+ device_printf(sc->dev, "Config options:");
+ );
+ for (;;) {
+ while (res[i] != '\0' &&
+ (res[i] == ',' || isspace(res[i]) != 0))
+ i++;
+ if (res[i] == '\0') {
+ HDA_BOOTVERBOSE(
+ printf("\n");
+ );
+ return;
}
- /* (Un)Mute other pins. */
- for (j = 0; j < 15; j++) {
- if (as[i].pins[j] <= 0)
+ j = i;
+ while (res[j] != '\0' &&
+ !(res[j] == ',' || isspace(res[j]) != 0))
+ j++;
+ len = j - i;
+ if (len > 2 && strncmp(res + i, "no", 2) == 0)
+ inv = 2;
+ else
+ inv = 0;
+ for (k = 0; len > inv && k < HDAC_QUIRKS_TAB_LEN; k++) {
+ if (strncmp(res + i + inv,
+ hdac_quirks_tab[k].key, len - inv) != 0)
continue;
- ctl = hdac_audio_ctl_amp_get(devinfo,
- as[i].pins[j], HDA_CTL_IN, -1, 1);
- if (ctl != NULL && ctl->mute) {
- /* If pin has muter - use it. */
- val = (res != 0) ? 1 : 0;
- if (val == ctl->forcemute)
- continue;
- ctl->forcemute = val;
- hdac_audio_ctl_amp_set(ctl,
- HDA_AMP_MUTE_DEFAULT,
- HDA_AMP_VOL_DEFAULT, HDA_AMP_VOL_DEFAULT);
+ if (len - inv != strlen(hdac_quirks_tab[k].key))
continue;
+ HDA_BOOTVERBOSE(
+ printf(" %s%s", (inv != 0) ? "no" : "",
+ hdac_quirks_tab[k].key);
+ );
+ if (inv == 0) {
+ *on |= hdac_quirks_tab[k].value;
+ *on &= ~hdac_quirks_tab[k].value;
+ } else if (inv != 0) {
+ *off |= hdac_quirks_tab[k].value;
+ *off &= ~hdac_quirks_tab[k].value;
}
- /* If there is no muter - disable pin output. */
- w = hdac_widget_get(devinfo, as[i].pins[j]);
- if (w != NULL && w->type ==
- HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) {
- if (res != 0)
- val = w->wclass.pin.ctrl &
- ~HDA_CMD_SET_PIN_WIDGET_CTRL_OUT_ENABLE;
- else
- val = w->wclass.pin.ctrl |
- HDA_CMD_SET_PIN_WIDGET_CTRL_OUT_ENABLE;
- if (val != w->wclass.pin.ctrl) {
- w->wclass.pin.ctrl = val;
- hdac_command(sc,
- HDA_CMD_SET_PIN_WIDGET_CTRL(cad,
- w->nid, w->wclass.pin.ctrl), cad);
- }
- }
- }
- }
-}
-
-/*
- * Callback for poll based jack detection.
- */
-static void
-hdac_jack_poll_callback(void *arg)
-{
- struct hdac_devinfo *devinfo = arg;
- struct hdac_softc *sc;
-
- if (devinfo == NULL || devinfo->codec == NULL ||
- devinfo->codec->sc == NULL)
- return;
- sc = devinfo->codec->sc;
- hdac_lock(sc);
- if (sc->poll_ival == 0) {
- hdac_unlock(sc);
- return;
- }
- hdac_hp_switch_handler(devinfo);
- callout_reset(&sc->poll_jack, sc->poll_ival,
- hdac_jack_poll_callback, devinfo);
- hdac_unlock(sc);
-}
-
-/*
- * Jack detection initializer.
- */
-static void
-hdac_hp_switch_init(struct hdac_devinfo *devinfo)
-{
- struct hdac_softc *sc = devinfo->codec->sc;
- struct hdac_audio_as *as = devinfo->function.audio.as;
- struct hdac_widget *w;
- uint32_t id;
- int i, enable = 0, poll = 0;
- nid_t cad;
-
- id = hdac_codec_id(devinfo->codec);
- cad = devinfo->codec->cad;
- for (i = 0; i < devinfo->function.audio.ascnt; i++) {
- if (as[i].hpredir < 0)
- continue;
-
- w = hdac_widget_get(devinfo, as[i].pins[15]);
- if (w == NULL || w->enable == 0 || w->type !=
- HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
- continue;
- if (HDA_PARAM_PIN_CAP_PRESENCE_DETECT_CAP(w->wclass.pin.cap) == 0 ||
- (HDA_CONFIG_DEFAULTCONF_MISC(w->wclass.pin.config) & 1) != 0) {
- device_printf(sc->dev,
- "No jack detection support at pin %d\n",
- as[i].pins[15]);
- continue;
- }
- enable = 1;
- if (HDA_PARAM_AUDIO_WIDGET_CAP_UNSOL_CAP(w->param.widget_cap)) {
- hdac_command(sc,
- HDA_CMD_SET_UNSOLICITED_RESPONSE(cad, w->nid,
- HDA_CMD_SET_UNSOLICITED_RESPONSE_ENABLE |
- HDAC_UNSOLTAG_EVENT_HP), cad);
- } else
- poll = 1;
- HDA_BOOTVERBOSE(
- device_printf(sc->dev,
- "Enabling headphone/speaker "
- "audio routing switching:\n");
- device_printf(sc->dev, "\tas=%d sense nid=%d [%s]\n",
- i, w->nid, (poll != 0) ? "POLL" : "UNSOL");
- );
- }
- if (enable) {
- hdac_hp_switch_handler(devinfo);
- if (poll) {
- callout_reset(&sc->poll_jack, 1,
- hdac_jack_poll_callback, devinfo);
- }
- }
-}
-
-/*
- * Unsolicited messages handler.
- */
-static void
-hdac_unsolicited_handler(struct hdac_codec *codec, uint32_t tag)
-{
- struct hdac_softc *sc;
- struct hdac_devinfo *devinfo = NULL;
- int i;
-
- if (codec == NULL || codec->sc == NULL)
- return;
-
- sc = codec->sc;
-
- HDA_BOOTVERBOSE(
- device_printf(sc->dev, "Unsol Tag: 0x%08x\n", tag);
- );
-
- for (i = 0; i < codec->num_fgs; i++) {
- if (codec->fgs[i].node_type ==
- HDA_PARAM_FCT_GRP_TYPE_NODE_TYPE_AUDIO) {
- devinfo = &codec->fgs[i];
break;
}
+ i = j;
}
-
- if (devinfo == NULL)
- return;
-
- switch (tag) {
- case HDAC_UNSOLTAG_EVENT_HP:
- hdac_hp_switch_handler(devinfo);
- break;
- default:
- device_printf(sc->dev, "Unknown unsol tag: 0x%08x!\n", tag);
- break;
- }
-}
-
-static int
-hdac_stream_intr(struct hdac_softc *sc, struct hdac_chan *ch)
-{
- /* XXX to be removed */
-#ifdef HDAC_INTR_EXTRA
- uint32_t res;
-#endif
-
- if (!(ch->flags & HDAC_CHN_RUNNING))
- return (0);
-
- /* XXX to be removed */
-#ifdef HDAC_INTR_EXTRA
- res = HDAC_READ_1(&sc->mem, ch->off + HDAC_SDSTS);
-#endif
-
- /* XXX to be removed */
-#ifdef HDAC_INTR_EXTRA
- HDA_BOOTVERBOSE(
- if (res & (HDAC_SDSTS_DESE | HDAC_SDSTS_FIFOE))
- device_printf(ch->pdevinfo->dev,
- "PCMDIR_%s intr triggered beyond stream boundary:"
- "%08x\n",
- (ch->dir == PCMDIR_PLAY) ? "PLAY" : "REC", res);
- );
-#endif
-
- HDAC_WRITE_1(&sc->mem, ch->off + HDAC_SDSTS,
- HDAC_SDSTS_DESE | HDAC_SDSTS_FIFOE | HDAC_SDSTS_BCIS );
-
- /* XXX to be removed */
-#ifdef HDAC_INTR_EXTRA
- if (res & HDAC_SDSTS_BCIS) {
-#endif
- return (1);
- /* XXX to be removed */
-#ifdef HDAC_INTR_EXTRA
- }
-#endif
-
- return (0);
}
/****************************************************************************
@@ -1462,69 +266,70 @@ static void
hdac_intr_handler(void *context)
{
struct hdac_softc *sc;
+ device_t dev;
uint32_t intsts;
uint8_t rirbsts;
- struct hdac_rirb *rirb_base;
- uint32_t trigger;
int i;
sc = (struct hdac_softc *)context;
-
hdac_lock(sc);
- if (sc->polling != 0) {
- hdac_unlock(sc);
- return;
- }
/* Do we have anything to do? */
intsts = HDAC_READ_4(&sc->mem, HDAC_INTSTS);
- if (!HDA_FLAG_MATCH(intsts, HDAC_INTSTS_GIS)) {
+ if ((intsts & HDAC_INTSTS_GIS) == 0) {
hdac_unlock(sc);
return;
}
- trigger = 0;
-
/* Was this a controller interrupt? */
- if (HDA_FLAG_MATCH(intsts, HDAC_INTSTS_CIS)) {
- rirb_base = (struct hdac_rirb *)sc->rirb_dma.dma_vaddr;
+ if (intsts & HDAC_INTSTS_CIS) {
rirbsts = HDAC_READ_1(&sc->mem, HDAC_RIRBSTS);
/* Get as many responses that we can */
- while (HDA_FLAG_MATCH(rirbsts, HDAC_RIRBSTS_RINTFL)) {
+ while (rirbsts & HDAC_RIRBSTS_RINTFL) {
HDAC_WRITE_1(&sc->mem,
HDAC_RIRBSTS, HDAC_RIRBSTS_RINTFL);
- if (hdac_rirb_flush(sc) != 0)
- trigger |= HDAC_TRIGGER_UNSOL;
+ hdac_rirb_flush(sc);
rirbsts = HDAC_READ_1(&sc->mem, HDAC_RIRBSTS);
}
- /* XXX to be removed */
- /* Clear interrupt and exit */
-#ifdef HDAC_INTR_EXTRA
- HDAC_WRITE_4(&sc->mem, HDAC_INTSTS, HDAC_INTSTS_CIS);
-#endif
+ if (sc->unsolq_rp != sc->unsolq_wp)
+ taskqueue_enqueue(taskqueue_thread, &sc->unsolq_task);
}
if (intsts & HDAC_INTSTS_SIS_MASK) {
- for (i = 0; i < sc->num_chans; i++) {
- if ((intsts & (1 << (sc->chans[i].off >> 5))) &&
- hdac_stream_intr(sc, &sc->chans[i]) != 0)
- trigger |= (1 << i);
+ for (i = 0; i < sc->num_ss; i++) {
+ if ((intsts & (1 << i)) == 0)
+ continue;
+ HDAC_WRITE_1(&sc->mem, (i << 5) + HDAC_SDSTS,
+ HDAC_SDSTS_DESE | HDAC_SDSTS_FIFOE | HDAC_SDSTS_BCIS );
+ if ((dev = sc->streams[i].dev) != NULL) {
+ HDAC_STREAM_INTR(dev,
+ sc->streams[i].dir, sc->streams[i].stream);
+ }
}
- /* XXX to be removed */
-#ifdef HDAC_INTR_EXTRA
- HDAC_WRITE_4(&sc->mem, HDAC_INTSTS, intsts &
- HDAC_INTSTS_SIS_MASK);
-#endif
}
+ HDAC_WRITE_4(&sc->mem, HDAC_INTSTS, intsts);
hdac_unlock(sc);
+}
+
+static void
+hdac_poll_callback(void *arg)
+{
+ struct hdac_softc *sc = arg;
+
+ if (sc == NULL)
+ return;
- for (i = 0; i < sc->num_chans; i++) {
- if (trigger & (1 << i))
- chn_intr(sc->chans[i].c);
+ hdac_lock(sc);
+ if (sc->polling == 0) {
+ hdac_unlock(sc);
+ return;
}
- if (trigger & HDAC_TRIGGER_UNSOL)
- taskqueue_enqueue(taskqueue_thread, &sc->unsolq_task);
+ callout_reset(&sc->poll_callout, sc->poll_ival,
+ hdac_poll_callback, sc);
+ hdac_unlock(sc);
+
+ hdac_intr_handler(sc);
}
/****************************************************************************
@@ -1577,11 +382,11 @@ hdac_reset(struct hdac_softc *sc, int wakeup)
device_printf(sc->dev, "Unable to put hdac in reset\n");
return (ENXIO);
}
-
+
/* If wakeup is not requested - leave the controller in reset state. */
if (!wakeup)
return (0);
-
+
DELAY(100);
gctl = HDAC_READ_4(&sc->mem, HDAC_GCTL);
HDAC_WRITE_4(&sc->mem, HDAC_GCTL, gctl | HDAC_GCTL_CRST);
@@ -1629,8 +434,13 @@ hdac_get_capabilities(struct hdac_softc *sc)
sc->num_iss = HDAC_GCAP_ISS(gcap);
sc->num_oss = HDAC_GCAP_OSS(gcap);
sc->num_bss = HDAC_GCAP_BSS(gcap);
+ sc->num_ss = sc->num_iss + sc->num_oss + sc->num_bss;
sc->num_sdo = HDAC_GCAP_NSDO(gcap);
- sc->support_64bit = HDA_FLAG_MATCH(gcap, HDAC_GCAP_64OK);
+ sc->support_64bit = (gcap & HDAC_GCAP_64OK) != 0;
+ if (sc->quirks_on & HDAC_QUIRK_64BIT)
+ sc->support_64bit = 1;
+ else if (sc->quirks_off & HDAC_QUIRK_64BIT)
+ sc->support_64bit = 0;
corbsize = HDAC_READ_1(&sc->mem, HDAC_CORBSIZE);
if ((corbsize & HDAC_CORBSIZE_CORBSZCAP_256) ==
@@ -1707,7 +517,7 @@ hdac_dma_alloc(struct hdac_softc *sc, struct hdac_dma *dma, bus_size_t size)
bus_size_t roundsz;
int result;
- roundsz = roundup2(size, HDAC_DMA_ALIGNMENT);
+ roundsz = roundup2(size, HDA_DMA_ALIGNMENT);
bzero(dma, sizeof(*dma));
/*
@@ -1715,7 +525,7 @@ hdac_dma_alloc(struct hdac_softc *sc, struct hdac_dma *dma, bus_size_t size)
*/
result = bus_dma_tag_create(
bus_get_dma_tag(sc->dev), /* parent */
- HDAC_DMA_ALIGNMENT, /* alignment */
+ HDA_DMA_ALIGNMENT, /* alignment */
0, /* boundary */
(sc->support_64bit) ? BUS_SPACE_MAXADDR :
BUS_SPACE_MAXADDR_32BIT, /* lowaddr */
@@ -1863,12 +673,10 @@ hdac_irq_alloc(struct hdac_softc *sc)
irq = &sc->irq;
irq->irq_rid = 0x0;
- if ((sc->flags & HDAC_F_MSI) &&
+ if ((sc->quirks_off & HDAC_QUIRK_MSI) == 0 &&
(result = pci_msi_count(sc->dev)) == 1 &&
pci_alloc_msi(sc->dev, &result) == 0)
irq->irq_rid = 0x1;
- else
- sc->flags &= ~HDAC_F_MSI;
irq->irq_res = bus_alloc_resource_any(sc->dev, SYS_RES_IRQ,
&irq->irq_rid, RF_SHAREABLE | RF_ACTIVE);
@@ -2058,884 +866,10 @@ hdac_rirb_start(struct hdac_softc *sc)
HDAC_WRITE_1(&sc->mem, HDAC_RIRBCTL, rirbctl);
}
-
-/****************************************************************************
- * void hdac_scan_codecs(struct hdac_softc *, int)
- *
- * Scan the bus for available codecs, starting with num.
- ****************************************************************************/
-static void
-hdac_scan_codecs(struct hdac_softc *sc)
-{
- struct hdac_codec *codec;
- int i;
- uint16_t statests;
-
- statests = HDAC_READ_2(&sc->mem, HDAC_STATESTS);
- for (i = 0; i < HDAC_CODEC_MAX; i++) {
- if (HDAC_STATESTS_SDIWAKE(statests, i)) {
- /* We have found a codec. */
- codec = (struct hdac_codec *)malloc(sizeof(*codec),
- M_HDAC, M_ZERO | M_NOWAIT);
- if (codec == NULL) {
- device_printf(sc->dev,
- "Unable to allocate memory for codec\n");
- continue;
- }
- codec->commands = NULL;
- codec->responses_received = 0;
- codec->verbs_sent = 0;
- codec->sc = sc;
- codec->cad = i;
- sc->codecs[i] = codec;
- hdac_probe_codec(codec);
- }
- }
- /* All codecs have been probed, now try to attach drivers to them */
- /* bus_generic_attach(sc->dev); */
-}
-
-/****************************************************************************
- * void hdac_probe_codec(struct hdac_softc *, int)
- *
- * Probe a the given codec_id for available function groups.
- ****************************************************************************/
-static void
-hdac_probe_codec(struct hdac_codec *codec)
-{
- struct hdac_softc *sc = codec->sc;
- uint32_t vendorid, revisionid, subnode;
- int startnode;
- int endnode;
- int i;
- nid_t cad = codec->cad;
-
- HDA_BOOTVERBOSE(
- device_printf(sc->dev, "Probing codec #%d...\n", cad);
- );
- vendorid = hdac_command(sc,
- HDA_CMD_GET_PARAMETER(cad, 0x0, HDA_PARAM_VENDOR_ID),
- cad);
- revisionid = hdac_command(sc,
- HDA_CMD_GET_PARAMETER(cad, 0x0, HDA_PARAM_REVISION_ID),
- cad);
- codec->vendor_id = HDA_PARAM_VENDOR_ID_VENDOR_ID(vendorid);
- codec->device_id = HDA_PARAM_VENDOR_ID_DEVICE_ID(vendorid);
- codec->revision_id = HDA_PARAM_REVISION_ID_REVISION_ID(revisionid);
- codec->stepping_id = HDA_PARAM_REVISION_ID_STEPPING_ID(revisionid);
-
- if (vendorid == HDAC_INVALID && revisionid == HDAC_INVALID) {
- device_printf(sc->dev, "Codec #%d is not responding!"
- " Probing aborted.\n", cad);
- return;
- }
-
- device_printf(sc->dev, "HDA Codec #%d: %s\n",
- cad, hdac_codec_name(codec));
- HDA_BOOTVERBOSE(
- device_printf(sc->dev, " HDA Codec ID: 0x%08x\n",
- hdac_codec_id(codec));
- device_printf(sc->dev, " Vendor: 0x%04x\n",
- codec->vendor_id);
- device_printf(sc->dev, " Device: 0x%04x\n",
- codec->device_id);
- device_printf(sc->dev, " Revision: 0x%02x\n",
- codec->revision_id);
- device_printf(sc->dev, " Stepping: 0x%02x\n",
- codec->stepping_id);
- device_printf(sc->dev, "PCI Subvendor: 0x%08x\n",
- sc->pci_subvendor);
- );
- subnode = hdac_command(sc,
- HDA_CMD_GET_PARAMETER(cad, 0x0, HDA_PARAM_SUB_NODE_COUNT),
- cad);
- startnode = HDA_PARAM_SUB_NODE_COUNT_START(subnode);
- endnode = startnode + HDA_PARAM_SUB_NODE_COUNT_TOTAL(subnode);
-
- HDA_BOOTHVERBOSE(
- device_printf(sc->dev, "\tstartnode=%d endnode=%d\n",
- startnode, endnode);
- );
-
- codec->fgs = (struct hdac_devinfo *)malloc(sizeof(struct hdac_devinfo) *
- (endnode - startnode), M_HDAC, M_NOWAIT | M_ZERO);
- if (codec->fgs == NULL) {
- device_printf(sc->dev, "%s: Unable to allocate function groups\n",
- __func__);
- return;
- }
-
- for (i = startnode; i < endnode; i++)
- hdac_probe_function(codec, i);
- return;
-}
-
-/*
- * Probe codec function and add it to the list.
- */
-static void
-hdac_probe_function(struct hdac_codec *codec, nid_t nid)
-{
- struct hdac_softc *sc = codec->sc;
- struct hdac_devinfo *devinfo = &codec->fgs[codec->num_fgs];
- uint32_t fctgrptype;
- uint32_t res;
- nid_t cad = codec->cad;
-
- fctgrptype = HDA_PARAM_FCT_GRP_TYPE_NODE_TYPE(hdac_command(sc,
- HDA_CMD_GET_PARAMETER(cad, nid, HDA_PARAM_FCT_GRP_TYPE), cad));
-
- devinfo->nid = nid;
- devinfo->node_type = fctgrptype;
- devinfo->codec = codec;
-
- res = hdac_command(sc,
- HDA_CMD_GET_PARAMETER(cad , nid, HDA_PARAM_SUB_NODE_COUNT), cad);
-
- devinfo->nodecnt = HDA_PARAM_SUB_NODE_COUNT_TOTAL(res);
- devinfo->startnode = HDA_PARAM_SUB_NODE_COUNT_START(res);
- devinfo->endnode = devinfo->startnode + devinfo->nodecnt;
-
- HDA_BOOTVERBOSE(
- device_printf(sc->dev,
- "\tFound %s FG nid=%d startnode=%d endnode=%d total=%d\n",
- (fctgrptype == HDA_PARAM_FCT_GRP_TYPE_NODE_TYPE_AUDIO) ? "audio":
- (fctgrptype == HDA_PARAM_FCT_GRP_TYPE_NODE_TYPE_MODEM) ? "modem":
- "unknown", nid, devinfo->startnode, devinfo->endnode,
- devinfo->nodecnt);
- );
-
- if (devinfo->nodecnt > 0)
- devinfo->widget = (struct hdac_widget *)malloc(
- sizeof(*(devinfo->widget)) * devinfo->nodecnt, M_HDAC,
- M_NOWAIT | M_ZERO);
- else
- devinfo->widget = NULL;
-
- if (devinfo->widget == NULL) {
- device_printf(sc->dev, "unable to allocate widgets!\n");
- devinfo->endnode = devinfo->startnode;
- devinfo->nodecnt = 0;
- return;
- }
-
- codec->num_fgs++;
-}
-
-static void
-hdac_widget_connection_parse(struct hdac_widget *w)
-{
- struct hdac_softc *sc = w->devinfo->codec->sc;
- uint32_t res;
- int i, j, max, ents, entnum;
- nid_t cad = w->devinfo->codec->cad;
- nid_t nid = w->nid;
- nid_t cnid, addcnid, prevcnid;
-
- w->nconns = 0;
-
- res = hdac_command(sc,
- HDA_CMD_GET_PARAMETER(cad, nid, HDA_PARAM_CONN_LIST_LENGTH), cad);
-
- ents = HDA_PARAM_CONN_LIST_LENGTH_LIST_LENGTH(res);
-
- if (ents < 1)
- return;
-
- entnum = HDA_PARAM_CONN_LIST_LENGTH_LONG_FORM(res) ? 2 : 4;
- max = (sizeof(w->conns) / sizeof(w->conns[0])) - 1;
- prevcnid = 0;
-
-#define CONN_RMASK(e) (1 << ((32 / (e)) - 1))
-#define CONN_NMASK(e) (CONN_RMASK(e) - 1)
-#define CONN_RESVAL(r, e, n) ((r) >> ((32 / (e)) * (n)))
-#define CONN_RANGE(r, e, n) (CONN_RESVAL(r, e, n) & CONN_RMASK(e))
-#define CONN_CNID(r, e, n) (CONN_RESVAL(r, e, n) & CONN_NMASK(e))
-
- for (i = 0; i < ents; i += entnum) {
- res = hdac_command(sc,
- HDA_CMD_GET_CONN_LIST_ENTRY(cad, nid, i), cad);
- for (j = 0; j < entnum; j++) {
- cnid = CONN_CNID(res, entnum, j);
- if (cnid == 0) {
- if (w->nconns < ents)
- device_printf(sc->dev,
- "%s: nid=%d WARNING: zero cnid "
- "entnum=%d j=%d index=%d "
- "entries=%d found=%d res=0x%08x\n",
- __func__, nid, entnum, j, i,
- ents, w->nconns, res);
- else
- goto getconns_out;
- }
- if (cnid < w->devinfo->startnode ||
- cnid >= w->devinfo->endnode) {
- HDA_BOOTVERBOSE(
- device_printf(sc->dev,
- "GHOST: nid=%d j=%d "
- "entnum=%d index=%d res=0x%08x\n",
- nid, j, entnum, i, res);
- );
- }
- if (CONN_RANGE(res, entnum, j) == 0)
- addcnid = cnid;
- else if (prevcnid == 0 || prevcnid >= cnid) {
- device_printf(sc->dev,
- "%s: WARNING: Invalid child range "
- "nid=%d index=%d j=%d entnum=%d "
- "prevcnid=%d cnid=%d res=0x%08x\n",
- __func__, nid, i, j, entnum, prevcnid,
- cnid, res);
- addcnid = cnid;
- } else
- addcnid = prevcnid + 1;
- while (addcnid <= cnid) {
- if (w->nconns > max) {
- device_printf(sc->dev,
- "Adding %d (nid=%d): "
- "Max connection reached! max=%d\n",
- addcnid, nid, max + 1);
- goto getconns_out;
- }
- w->connsenable[w->nconns] = 1;
- w->conns[w->nconns++] = addcnid++;
- }
- prevcnid = cnid;
- }
- }
-
-getconns_out:
- return;
-}
-
-static uint32_t
-hdac_widget_pin_patch(uint32_t config, const char *str)
-{
- char buf[256];
- char *key, *value, *rest, *bad;
- int ival, i;
-
- strlcpy(buf, str, sizeof(buf));
- rest = buf;
- while ((key = strsep(&rest, "=")) != NULL) {
- value = strsep(&rest, " \t");
- if (value == NULL)
- break;
- ival = strtol(value, &bad, 10);
- if (strcmp(key, "seq") == 0) {
- config &= ~HDA_CONFIG_DEFAULTCONF_SEQUENCE_MASK;
- config |= ((ival << HDA_CONFIG_DEFAULTCONF_SEQUENCE_SHIFT) &
- HDA_CONFIG_DEFAULTCONF_SEQUENCE_MASK);
- } else if (strcmp(key, "as") == 0) {
- config &= ~HDA_CONFIG_DEFAULTCONF_ASSOCIATION_MASK;
- config |= ((ival << HDA_CONFIG_DEFAULTCONF_ASSOCIATION_SHIFT) &
- HDA_CONFIG_DEFAULTCONF_ASSOCIATION_MASK);
- } else if (strcmp(key, "misc") == 0) {
- config &= ~HDA_CONFIG_DEFAULTCONF_MISC_MASK;
- config |= ((ival << HDA_CONFIG_DEFAULTCONF_MISC_SHIFT) &
- HDA_CONFIG_DEFAULTCONF_MISC_MASK);
- } else if (strcmp(key, "color") == 0) {
- config &= ~HDA_CONFIG_DEFAULTCONF_COLOR_MASK;
- if (bad[0] == 0) {
- config |= ((ival << HDA_CONFIG_DEFAULTCONF_COLOR_SHIFT) &
- HDA_CONFIG_DEFAULTCONF_COLOR_MASK);
- };
- for (i = 0; i < 16; i++) {
- if (strcasecmp(HDA_COLORS[i], value) == 0) {
- config |= (i << HDA_CONFIG_DEFAULTCONF_COLOR_SHIFT);
- break;
- }
- }
- } else if (strcmp(key, "ctype") == 0) {
- config &= ~HDA_CONFIG_DEFAULTCONF_CONNECTION_TYPE_MASK;
- config |= ((ival << HDA_CONFIG_DEFAULTCONF_CONNECTION_TYPE_SHIFT) &
- HDA_CONFIG_DEFAULTCONF_CONNECTION_TYPE_MASK);
- } else if (strcmp(key, "device") == 0) {
- config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK;
- if (bad[0] == 0) {
- config |= ((ival << HDA_CONFIG_DEFAULTCONF_DEVICE_SHIFT) &
- HDA_CONFIG_DEFAULTCONF_DEVICE_MASK);
- continue;
- };
- for (i = 0; i < 16; i++) {
- if (strcasecmp(HDA_DEVS[i], value) == 0) {
- config |= (i << HDA_CONFIG_DEFAULTCONF_DEVICE_SHIFT);
- break;
- }
- }
- } else if (strcmp(key, "loc") == 0) {
- config &= ~HDA_CONFIG_DEFAULTCONF_LOCATION_MASK;
- config |= ((ival << HDA_CONFIG_DEFAULTCONF_LOCATION_SHIFT) &
- HDA_CONFIG_DEFAULTCONF_LOCATION_MASK);
- } else if (strcmp(key, "conn") == 0) {
- config &= ~HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK;
- if (bad[0] == 0) {
- config |= ((ival << HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_SHIFT) &
- HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK);
- continue;
- };
- for (i = 0; i < 4; i++) {
- if (strcasecmp(HDA_CONNS[i], value) == 0) {
- config |= (i << HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_SHIFT);
- break;
- }
- }
- }
- }
- return (config);
-}
-
-static uint32_t
-hdac_widget_pin_getconfig(struct hdac_widget *w)
-{
- struct hdac_softc *sc;
- uint32_t config, orig, id;
- nid_t cad, nid;
- char buf[32];
- const char *res = NULL, *patch = NULL;
-
- sc = w->devinfo->codec->sc;
- cad = w->devinfo->codec->cad;
- nid = w->nid;
- id = hdac_codec_id(w->devinfo->codec);
-
- config = hdac_command(sc,
- HDA_CMD_GET_CONFIGURATION_DEFAULT(cad, nid),
- cad);
- orig = config;
-
- HDA_BOOTVERBOSE(
- hdac_dump_pin_config(w, orig);
- );
-
- /* XXX: Old patches require complete review.
- * Now they may create more problem then solve due to
- * incorrect associations.
- */
- if (id == HDA_CODEC_ALC880 && sc->pci_subvendor == LG_LW20_SUBVENDOR) {
- switch (nid) {
- case 26:
- config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK;
- config |= HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN;
- break;
- case 27:
- config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK;
- config |= HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT;
- break;
- default:
- break;
- }
- } else if (id == HDA_CODEC_ALC880 &&
- (sc->pci_subvendor == CLEVO_D900T_SUBVENDOR ||
- sc->pci_subvendor == ASUS_M5200_SUBVENDOR)) {
- /*
- * Super broken BIOS
- */
- switch (nid) {
- case 24: /* MIC1 */
- config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK;
- config |= HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN;
- break;
- case 25: /* XXX MIC2 */
- config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK;
- config |= HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN;
- break;
- case 26: /* LINE1 */
- config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK;
- config |= HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN;
- break;
- case 27: /* XXX LINE2 */
- config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK;
- config |= HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN;
- break;
- case 28: /* CD */
- config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK;
- config |= HDA_CONFIG_DEFAULTCONF_DEVICE_CD;
- break;
- }
- } else if (id == HDA_CODEC_ALC883 &&
- (sc->pci_subvendor == MSI_MS034A_SUBVENDOR ||
- HDA_DEV_MATCH(ACER_ALL_SUBVENDOR, sc->pci_subvendor))) {
- switch (nid) {
- case 25:
- config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK |
- HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK);
- config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN |
- HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED);
- break;
- case 28:
- config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK |
- HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK);
- config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_CD |
- HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED);
- break;
- }
- } else if (id == HDA_CODEC_CX20549 && sc->pci_subvendor ==
- HP_V3000_SUBVENDOR) {
- switch (nid) {
- case 18:
- config &= ~HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK;
- config |= HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_NONE;
- break;
- case 20:
- config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK |
- HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK);
- config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN |
- HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED);
- break;
- case 21:
- config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK |
- HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK);
- config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_CD |
- HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED);
- break;
- }
- } else if (id == HDA_CODEC_CX20551 && sc->pci_subvendor ==
- HP_DV5000_SUBVENDOR) {
- switch (nid) {
- case 20:
- case 21:
- config &= ~HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK;
- config |= HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_NONE;
- break;
- }
- } else if (id == HDA_CODEC_ALC861 && sc->pci_subvendor ==
- ASUS_W6F_SUBVENDOR) {
- switch (nid) {
- case 11:
- config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK |
- HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK);
- config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_OUT |
- HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED);
- break;
- case 12:
- case 14:
- case 16:
- case 31:
- case 32:
- config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK |
- HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK);
- config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN |
- HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED);
- break;
- case 15:
- config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK |
- HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK);
- config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT |
- HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_JACK);
- break;
- }
- } else if (id == HDA_CODEC_ALC861 && sc->pci_subvendor ==
- UNIWILL_9075_SUBVENDOR) {
- switch (nid) {
- case 15:
- config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK |
- HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK);
- config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT |
- HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_JACK);
- break;
- }
- }
-
- /* New patches */
- if (id == HDA_CODEC_AD1986A &&
- (sc->pci_subvendor == ASUS_M2NPVMX_SUBVENDOR ||
- sc->pci_subvendor == ASUS_A8NVMCSM_SUBVENDOR ||
- sc->pci_subvendor == ASUS_P5PL2_SUBVENDOR)) {
- switch (nid) {
- case 26: /* Headphones with redirection */
- patch = "as=1 seq=15";
- break;
- case 28: /* 5.1 out => 2.0 out + 1 input */
- patch = "device=Line-in as=8 seq=1";
- break;
- case 29: /* Can't use this as input, as the only available mic
- * preamplifier is busy by front panel mic (nid 31).
- * If you want to use this rear connector as mic input,
- * you have to disable the front panel one. */
- patch = "as=0";
- break;
- case 31: /* Lot of inputs configured with as=15 and unusable */
- patch = "as=8 seq=3";
- break;
- case 32:
- patch = "as=8 seq=4";
- break;
- case 34:
- patch = "as=8 seq=5";
- break;
- case 36:
- patch = "as=8 seq=6";
- break;
- }
- } else if (id == HDA_CODEC_ALC260 &&
- HDA_DEV_MATCH(SONY_S5_SUBVENDOR, sc->pci_subvendor)) {
- switch (nid) {
- case 16:
- patch = "seq=15 device=Headphones";
- break;
- }
- } else if (id == HDA_CODEC_ALC268) {
- if (sc->pci_subvendor == ACER_T5320_SUBVENDOR) {
- switch (nid) {
- case 20: /* Headphones Jack */
- patch = "as=1 seq=15";
- break;
- }
- }
- } else if (id == HDA_CODEC_CX20561 &&
- sc->pci_subvendor == LENOVO_B450_SUBVENDOR) {
- switch (nid) {
- case 22:
- patch = "as=1 seq=15";
- break;
- }
- }
-
- if (patch != NULL)
- config = hdac_widget_pin_patch(config, patch);
-
- snprintf(buf, sizeof(buf), "cad%u.nid%u.config", cad, nid);
- if (resource_string_value(device_get_name(sc->dev),
- device_get_unit(sc->dev), buf, &res) == 0) {
- if (strncmp(res, "0x", 2) == 0) {
- config = strtol(res + 2, NULL, 16);
- } else {
- config = hdac_widget_pin_patch(config, res);
- }
- }
-
- HDA_BOOTVERBOSE(
- if (config != orig)
- device_printf(sc->dev,
- "Patching pin config nid=%u 0x%08x -> 0x%08x\n",
- nid, orig, config);
- );
-
- return (config);
-}
-
-static uint32_t
-hdac_widget_pin_getcaps(struct hdac_widget *w)
-{
- struct hdac_softc *sc;
- uint32_t caps, orig, id;
- nid_t cad, nid;
-
- sc = w->devinfo->codec->sc;
- cad = w->devinfo->codec->cad;
- nid = w->nid;
- id = hdac_codec_id(w->devinfo->codec);
-
- caps = hdac_command(sc,
- HDA_CMD_GET_PARAMETER(cad, nid, HDA_PARAM_PIN_CAP), cad);
- orig = caps;
-
- HDA_BOOTVERBOSE(
- if (caps != orig)
- device_printf(sc->dev,
- "Patching pin caps nid=%u 0x%08x -> 0x%08x\n",
- nid, orig, caps);
- );
-
- return (caps);
-}
-
-static void
-hdac_widget_pin_parse(struct hdac_widget *w)
-{
- struct hdac_softc *sc = w->devinfo->codec->sc;
- uint32_t config, pincap;
- const char *devstr;
- nid_t cad = w->devinfo->codec->cad;
- nid_t nid = w->nid;
- int conn, color;
-
- config = hdac_widget_pin_getconfig(w);
- w->wclass.pin.config = config;
-
- pincap = hdac_widget_pin_getcaps(w);
- w->wclass.pin.cap = pincap;
-
- w->wclass.pin.ctrl = hdac_command(sc,
- HDA_CMD_GET_PIN_WIDGET_CTRL(cad, nid), cad);
-
- if (HDA_PARAM_PIN_CAP_EAPD_CAP(pincap)) {
- w->param.eapdbtl = hdac_command(sc,
- HDA_CMD_GET_EAPD_BTL_ENABLE(cad, nid), cad);
- w->param.eapdbtl &= 0x7;
- w->param.eapdbtl |= HDA_CMD_SET_EAPD_BTL_ENABLE_EAPD;
- } else
- w->param.eapdbtl = HDAC_INVALID;
-
- devstr = HDA_DEVS[(config & HDA_CONFIG_DEFAULTCONF_DEVICE_MASK) >>
- HDA_CONFIG_DEFAULTCONF_DEVICE_SHIFT];
-
- conn = (config & HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK) >>
- HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_SHIFT;
- color = (config & HDA_CONFIG_DEFAULTCONF_COLOR_MASK) >>
- HDA_CONFIG_DEFAULTCONF_COLOR_SHIFT;
-
- strlcat(w->name, ": ", sizeof(w->name));
- strlcat(w->name, devstr, sizeof(w->name));
- strlcat(w->name, " (", sizeof(w->name));
- if (conn == 0 && color != 0 && color != 15) {
- strlcat(w->name, HDA_COLORS[color], sizeof(w->name));
- strlcat(w->name, " ", sizeof(w->name));
- }
- strlcat(w->name, HDA_CONNS[conn], sizeof(w->name));
- strlcat(w->name, ")", sizeof(w->name));
-}
-
-static uint32_t
-hdac_widget_getcaps(struct hdac_widget *w, int *waspin)
-{
- struct hdac_softc *sc;
- uint32_t caps, orig, id;
- nid_t cad, nid, beeper = -1;
-
- sc = w->devinfo->codec->sc;
- cad = w->devinfo->codec->cad;
- nid = w->nid;
- id = hdac_codec_id(w->devinfo->codec);
-
- caps = hdac_command(sc,
- HDA_CMD_GET_PARAMETER(cad, nid, HDA_PARAM_AUDIO_WIDGET_CAP),
- cad);
- orig = caps;
-
- /* On some codecs beeper is an input pin, but it is not recordable
- alone. Also most of BIOSes does not declare beeper pin.
- Change beeper pin node type to beeper to help parser. */
- *waspin = 0;
- switch (id) {
- case HDA_CODEC_AD1882:
- case HDA_CODEC_AD1883:
- case HDA_CODEC_AD1984:
- case HDA_CODEC_AD1984A:
- case HDA_CODEC_AD1984B:
- case HDA_CODEC_AD1987:
- case HDA_CODEC_AD1988:
- case HDA_CODEC_AD1988B:
- case HDA_CODEC_AD1989B:
- beeper = 26;
- break;
- case HDA_CODEC_ALC260:
- beeper = 23;
- break;
- case HDA_CODEC_ALC262:
- case HDA_CODEC_ALC268:
- case HDA_CODEC_ALC880:
- case HDA_CODEC_ALC882:
- case HDA_CODEC_ALC883:
- case HDA_CODEC_ALC885:
- case HDA_CODEC_ALC888:
- case HDA_CODEC_ALC889:
- beeper = 29;
- break;
- }
- if (nid == beeper) {
- caps &= ~HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_MASK;
- caps |= HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_BEEP_WIDGET <<
- HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_SHIFT;
- *waspin = 1;
- }
-
- HDA_BOOTVERBOSE(
- if (caps != orig) {
- device_printf(sc->dev,
- "Patching widget caps nid=%u 0x%08x -> 0x%08x\n",
- nid, orig, caps);
- }
- );
-
- return (caps);
-}
-
-static void
-hdac_widget_parse(struct hdac_widget *w)
-{
- struct hdac_softc *sc = w->devinfo->codec->sc;
- uint32_t wcap, cap;
- char *typestr;
- nid_t cad = w->devinfo->codec->cad;
- nid_t nid = w->nid;
-
- wcap = hdac_widget_getcaps(w, &w->waspin);
-
- w->param.widget_cap = wcap;
- w->type = HDA_PARAM_AUDIO_WIDGET_CAP_TYPE(wcap);
-
- switch (w->type) {
- case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_OUTPUT:
- typestr = "audio output";
- break;
- case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT:
- typestr = "audio input";
- break;
- case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER:
- typestr = "audio mixer";
- break;
- case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_SELECTOR:
- typestr = "audio selector";
- break;
- case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX:
- typestr = "pin";
- break;
- case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_POWER_WIDGET:
- typestr = "power widget";
- break;
- case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_VOLUME_WIDGET:
- typestr = "volume widget";
- break;
- case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_BEEP_WIDGET:
- typestr = "beep widget";
- break;
- case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_VENDOR_WIDGET:
- typestr = "vendor widget";
- break;
- default:
- typestr = "unknown type";
- break;
- }
-
- strlcpy(w->name, typestr, sizeof(w->name));
-
- hdac_widget_connection_parse(w);
-
- if (HDA_PARAM_AUDIO_WIDGET_CAP_OUT_AMP(wcap)) {
- if (HDA_PARAM_AUDIO_WIDGET_CAP_AMP_OVR(wcap))
- w->param.outamp_cap =
- hdac_command(sc,
- HDA_CMD_GET_PARAMETER(cad, nid,
- HDA_PARAM_OUTPUT_AMP_CAP), cad);
- else
- w->param.outamp_cap =
- w->devinfo->function.audio.outamp_cap;
- } else
- w->param.outamp_cap = 0;
-
- if (HDA_PARAM_AUDIO_WIDGET_CAP_IN_AMP(wcap)) {
- if (HDA_PARAM_AUDIO_WIDGET_CAP_AMP_OVR(wcap))
- w->param.inamp_cap =
- hdac_command(sc,
- HDA_CMD_GET_PARAMETER(cad, nid,
- HDA_PARAM_INPUT_AMP_CAP), cad);
- else
- w->param.inamp_cap =
- w->devinfo->function.audio.inamp_cap;
- } else
- w->param.inamp_cap = 0;
-
- if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_OUTPUT ||
- w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT) {
- if (HDA_PARAM_AUDIO_WIDGET_CAP_FORMAT_OVR(wcap)) {
- cap = hdac_command(sc,
- HDA_CMD_GET_PARAMETER(cad, nid,
- HDA_PARAM_SUPP_STREAM_FORMATS), cad);
- w->param.supp_stream_formats = (cap != 0) ? cap :
- w->devinfo->function.audio.supp_stream_formats;
- cap = hdac_command(sc,
- HDA_CMD_GET_PARAMETER(cad, nid,
- HDA_PARAM_SUPP_PCM_SIZE_RATE), cad);
- w->param.supp_pcm_size_rate = (cap != 0) ? cap :
- w->devinfo->function.audio.supp_pcm_size_rate;
- } else {
- w->param.supp_stream_formats =
- w->devinfo->function.audio.supp_stream_formats;
- w->param.supp_pcm_size_rate =
- w->devinfo->function.audio.supp_pcm_size_rate;
- }
- } else {
- w->param.supp_stream_formats = 0;
- w->param.supp_pcm_size_rate = 0;
- }
-
- if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
- hdac_widget_pin_parse(w);
-}
-
-static struct hdac_widget *
-hdac_widget_get(struct hdac_devinfo *devinfo, nid_t nid)
-{
- if (devinfo == NULL || devinfo->widget == NULL ||
- nid < devinfo->startnode || nid >= devinfo->endnode)
- return (NULL);
- return (&devinfo->widget[nid - devinfo->startnode]);
-}
-
-static __inline int
-hda_poll_channel(struct hdac_chan *ch)
-{
- uint32_t sz, delta;
- volatile uint32_t ptr;
-
- if (!(ch->flags & HDAC_CHN_RUNNING))
- return (0);
-
- sz = ch->blksz * ch->blkcnt;
- if (ch->dmapos != NULL)
- ptr = *(ch->dmapos);
- else
- ptr = HDAC_READ_4(&ch->devinfo->codec->sc->mem,
- ch->off + HDAC_SDLPIB);
- ch->ptr = ptr;
- ptr %= sz;
- ptr &= ~(ch->blksz - 1);
- delta = (sz + ptr - ch->prevptr) % sz;
-
- if (delta < ch->blksz)
- return (0);
-
- ch->prevptr = ptr;
-
- return (1);
-}
-
-static void
-hda_poll_callback(void *arg)
-{
- struct hdac_softc *sc = arg;
- uint32_t trigger;
- int i, active = 0;
-
- if (sc == NULL)
- return;
-
- hdac_lock(sc);
- if (sc->polling == 0) {
- hdac_unlock(sc);
- return;
- }
-
- trigger = 0;
- for (i = 0; i < sc->num_chans; i++) {
- if ((sc->chans[i].flags & HDAC_CHN_RUNNING) == 0)
- continue;
- active = 1;
- if (hda_poll_channel(&sc->chans[i]))
- trigger |= (1 << i);
- }
-
- /* XXX */
- if (active)
- callout_reset(&sc->poll_hda, sc->poll_ticks,
- hda_poll_callback, sc);
-
- hdac_unlock(sc);
-
- for (i = 0; i < sc->num_chans; i++) {
- if (trigger & (1 << i))
- chn_intr(sc->chans[i].c);
- }
-}
-
static int
hdac_rirb_flush(struct hdac_softc *sc)
{
struct hdac_rirb *rirb_base, *rirb;
- struct hdac_codec *codec;
- struct hdac_command_list *commands;
nid_t cad;
uint32_t resp;
uint8_t rirbwp;
@@ -2949,46 +883,46 @@ hdac_rirb_flush(struct hdac_softc *sc)
#endif
ret = 0;
-
while (sc->rirb_rp != rirbwp) {
sc->rirb_rp++;
sc->rirb_rp %= sc->rirb_size;
rirb = &rirb_base[sc->rirb_rp];
cad = HDAC_RIRB_RESPONSE_EX_SDATA_IN(rirb->response_ex);
- if (cad < 0 || cad >= HDAC_CODEC_MAX ||
- sc->codecs[cad] == NULL)
- continue;
resp = rirb->response;
- codec = sc->codecs[cad];
- commands = codec->commands;
if (rirb->response_ex & HDAC_RIRB_RESPONSE_EX_UNSOLICITED) {
- sc->unsolq[sc->unsolq_wp++] = (cad << 16) |
- ((resp >> 26) & 0xffff);
+ sc->unsolq[sc->unsolq_wp++] = resp;
+ sc->unsolq_wp %= HDAC_UNSOLQ_MAX;
+ sc->unsolq[sc->unsolq_wp++] = cad;
sc->unsolq_wp %= HDAC_UNSOLQ_MAX;
- } else if (commands != NULL && commands->num_commands > 0 &&
- codec->responses_received < commands->num_commands)
- commands->responses[codec->responses_received++] =
- resp;
+ } else if (sc->codecs[cad].pending <= 0) {
+ device_printf(sc->dev, "Unexpected unsolicited "
+ "response from address %d: %08x\n", cad, resp);
+ } else {
+ sc->codecs[cad].response = resp;
+ sc->codecs[cad].pending--;
+ }
ret++;
}
-
return (ret);
}
static int
hdac_unsolq_flush(struct hdac_softc *sc)
{
+ device_t child;
nid_t cad;
- uint32_t tag;
+ uint32_t resp;
int ret = 0;
if (sc->unsolq_st == HDAC_UNSOLQ_READY) {
sc->unsolq_st = HDAC_UNSOLQ_BUSY;
while (sc->unsolq_rp != sc->unsolq_wp) {
- cad = sc->unsolq[sc->unsolq_rp] >> 16;
- tag = sc->unsolq[sc->unsolq_rp++] & 0xffff;
+ resp = sc->unsolq[sc->unsolq_rp++];
sc->unsolq_rp %= HDAC_UNSOLQ_MAX;
- hdac_unsolicited_handler(sc->codecs[cad], tag);
+ cad = sc->unsolq[sc->unsolq_rp++];
+ sc->unsolq_rp %= HDAC_UNSOLQ_MAX;
+ if ((child = sc->codecs[cad].dev) != NULL)
+ HDAC_UNSOL_INTR(child, resp);
ret++;
}
sc->unsolq_st = HDAC_UNSOLQ_READY;
@@ -2997,375 +931,54 @@ hdac_unsolq_flush(struct hdac_softc *sc)
return (ret);
}
-static void
-hdac_poll_callback(void *arg)
-{
- struct hdac_softc *sc = arg;
- if (sc == NULL)
- return;
-
- hdac_lock(sc);
- if (sc->polling == 0 || sc->poll_ival == 0) {
- hdac_unlock(sc);
- return;
- }
- if (hdac_rirb_flush(sc) != 0)
- hdac_unsolq_flush(sc);
- callout_reset(&sc->poll_hdac, sc->poll_ival, hdac_poll_callback, sc);
- hdac_unlock(sc);
-}
-
-static void
-hdac_poll_reinit(struct hdac_softc *sc)
-{
- int i, pollticks, min = 1000000;
- struct hdac_chan *ch;
-
- for (i = 0; i < sc->num_chans; i++) {
- if ((sc->chans[i].flags & HDAC_CHN_RUNNING) == 0)
- continue;
- ch = &sc->chans[i];
- pollticks = ((uint64_t)hz * ch->blksz) /
- ((uint64_t)sndbuf_getalign(ch->b) * sndbuf_getspd(ch->b));
- pollticks >>= 1;
- if (pollticks > hz)
- pollticks = hz;
- if (pollticks < 1) {
- HDA_BOOTVERBOSE(
- device_printf(sc->dev,
- "%s: pollticks=%d < 1 !\n",
- __func__, pollticks);
- );
- pollticks = 1;
- }
- if (min > pollticks)
- min = pollticks;
- }
- HDA_BOOTVERBOSE(
- device_printf(sc->dev,
- "%s: pollticks %d -> %d\n",
- __func__, sc->poll_ticks, min);
- );
- sc->poll_ticks = min;
- if (min == 1000000)
- callout_stop(&sc->poll_hda);
- else
- callout_reset(&sc->poll_hda, 1, hda_poll_callback, sc);
-}
-
-static void
-hdac_stream_stop(struct hdac_chan *ch)
-{
- struct hdac_softc *sc = ch->devinfo->codec->sc;
- uint32_t ctl;
-
- ctl = HDAC_READ_1(&sc->mem, ch->off + HDAC_SDCTL0);
- ctl &= ~(HDAC_SDCTL_IOCE | HDAC_SDCTL_FEIE | HDAC_SDCTL_DEIE |
- HDAC_SDCTL_RUN);
- HDAC_WRITE_1(&sc->mem, ch->off + HDAC_SDCTL0, ctl);
-
- ch->flags &= ~HDAC_CHN_RUNNING;
-
- if (sc->polling != 0)
- hdac_poll_reinit(sc);
-
- ctl = HDAC_READ_4(&sc->mem, HDAC_INTCTL);
- ctl &= ~(1 << (ch->off >> 5));
- HDAC_WRITE_4(&sc->mem, HDAC_INTCTL, ctl);
-}
-
-static void
-hdac_stream_start(struct hdac_chan *ch)
-{
- struct hdac_softc *sc = ch->devinfo->codec->sc;
- uint32_t ctl;
-
- ch->flags |= HDAC_CHN_RUNNING;
-
- if (sc->polling != 0)
- hdac_poll_reinit(sc);
-
- ctl = HDAC_READ_4(&sc->mem, HDAC_INTCTL);
- ctl |= 1 << (ch->off >> 5);
- HDAC_WRITE_4(&sc->mem, HDAC_INTCTL, ctl);
-
- ctl = HDAC_READ_1(&sc->mem, ch->off + HDAC_SDCTL0);
- ctl |= HDAC_SDCTL_IOCE | HDAC_SDCTL_FEIE | HDAC_SDCTL_DEIE |
- HDAC_SDCTL_RUN;
- HDAC_WRITE_1(&sc->mem, ch->off + HDAC_SDCTL0, ctl);
-}
-
-static void
-hdac_stream_reset(struct hdac_chan *ch)
-{
- struct hdac_softc *sc = ch->devinfo->codec->sc;
- int timeout = 1000;
- int to = timeout;
- uint32_t ctl;
-
- ctl = HDAC_READ_1(&sc->mem, ch->off + HDAC_SDCTL0);
- ctl |= HDAC_SDCTL_SRST;
- HDAC_WRITE_1(&sc->mem, ch->off + HDAC_SDCTL0, ctl);
- do {
- ctl = HDAC_READ_1(&sc->mem, ch->off + HDAC_SDCTL0);
- if (ctl & HDAC_SDCTL_SRST)
- break;
- DELAY(10);
- } while (--to);
- if (!(ctl & HDAC_SDCTL_SRST)) {
- device_printf(sc->dev, "timeout in reset\n");
- }
- ctl &= ~HDAC_SDCTL_SRST;
- HDAC_WRITE_1(&sc->mem, ch->off + HDAC_SDCTL0, ctl);
- to = timeout;
- do {
- ctl = HDAC_READ_1(&sc->mem, ch->off + HDAC_SDCTL0);
- if (!(ctl & HDAC_SDCTL_SRST))
- break;
- DELAY(10);
- } while (--to);
- if (ctl & HDAC_SDCTL_SRST)
- device_printf(sc->dev, "can't reset!\n");
-}
-
-static void
-hdac_stream_setid(struct hdac_chan *ch)
-{
- struct hdac_softc *sc = ch->devinfo->codec->sc;
- uint32_t ctl;
-
- ctl = HDAC_READ_1(&sc->mem, ch->off + HDAC_SDCTL2);
- ctl &= ~HDAC_SDCTL2_STRM_MASK;
- ctl |= ch->sid << HDAC_SDCTL2_STRM_SHIFT;
- HDAC_WRITE_1(&sc->mem, ch->off + HDAC_SDCTL2, ctl);
-}
-
-static void
-hdac_bdl_setup(struct hdac_chan *ch)
-{
- struct hdac_softc *sc = ch->devinfo->codec->sc;
- struct hdac_bdle *bdle;
- uint64_t addr;
- uint32_t blksz, blkcnt;
- int i;
-
- addr = (uint64_t)sndbuf_getbufaddr(ch->b);
- bdle = (struct hdac_bdle *)ch->bdl_dma.dma_vaddr;
-
- blksz = ch->blksz;
- blkcnt = ch->blkcnt;
-
- for (i = 0; i < blkcnt; i++, bdle++) {
- bdle->addrl = (uint32_t)addr;
- bdle->addrh = (uint32_t)(addr >> 32);
- bdle->len = blksz;
- bdle->ioc = 1;
- addr += blksz;
- }
-
- HDAC_WRITE_4(&sc->mem, ch->off + HDAC_SDCBL, blksz * blkcnt);
- HDAC_WRITE_2(&sc->mem, ch->off + HDAC_SDLVI, blkcnt - 1);
- addr = ch->bdl_dma.dma_paddr;
- HDAC_WRITE_4(&sc->mem, ch->off + HDAC_SDBDPL, (uint32_t)addr);
- HDAC_WRITE_4(&sc->mem, ch->off + HDAC_SDBDPU, (uint32_t)(addr >> 32));
- if (ch->dmapos != NULL &&
- !(HDAC_READ_4(&sc->mem, HDAC_DPIBLBASE) & 0x00000001)) {
- addr = sc->pos_dma.dma_paddr;
- HDAC_WRITE_4(&sc->mem, HDAC_DPIBLBASE,
- ((uint32_t)addr & HDAC_DPLBASE_DPLBASE_MASK) | 0x00000001);
- HDAC_WRITE_4(&sc->mem, HDAC_DPIBUBASE, (uint32_t)(addr >> 32));
- }
-}
-
-static int
-hdac_bdl_alloc(struct hdac_chan *ch)
-{
- struct hdac_softc *sc = ch->devinfo->codec->sc;
- int rc;
-
- rc = hdac_dma_alloc(sc, &ch->bdl_dma,
- sizeof(struct hdac_bdle) * HDA_BDL_MAX);
- if (rc) {
- device_printf(sc->dev, "can't alloc bdl\n");
- return (rc);
- }
-
- return (0);
-}
-
-static void
-hdac_audio_ctl_amp_set_internal(struct hdac_softc *sc, nid_t cad, nid_t nid,
- int index, int lmute, int rmute,
- int left, int right, int dir)
-{
- uint16_t v = 0;
-
- if (sc == NULL)
- return;
-
- if (left != right || lmute != rmute) {
- v = (1 << (15 - dir)) | (1 << 13) | (index << 8) |
- (lmute << 7) | left;
- hdac_command(sc,
- HDA_CMD_SET_AMP_GAIN_MUTE(cad, nid, v), cad);
- v = (1 << (15 - dir)) | (1 << 12) | (index << 8) |
- (rmute << 7) | right;
- } else
- v = (1 << (15 - dir)) | (3 << 12) | (index << 8) |
- (lmute << 7) | left;
-
- hdac_command(sc,
- HDA_CMD_SET_AMP_GAIN_MUTE(cad, nid, v), cad);
-}
-
-static void
-hdac_audio_ctl_amp_set(struct hdac_audio_ctl *ctl, uint32_t mute,
- int left, int right)
-{
- struct hdac_softc *sc;
- nid_t nid, cad;
- int lmute, rmute;
-
- sc = ctl->widget->devinfo->codec->sc;
- cad = ctl->widget->devinfo->codec->cad;
- nid = ctl->widget->nid;
-
- /* Save new values if valid. */
- if (mute != HDA_AMP_MUTE_DEFAULT)
- ctl->muted = mute;
- if (left != HDA_AMP_VOL_DEFAULT)
- ctl->left = left;
- if (right != HDA_AMP_VOL_DEFAULT)
- ctl->right = right;
- /* Prepare effective values */
- if (ctl->forcemute) {
- lmute = 1;
- rmute = 1;
- left = 0;
- right = 0;
- } else {
- lmute = HDA_AMP_LEFT_MUTED(ctl->muted);
- rmute = HDA_AMP_RIGHT_MUTED(ctl->muted);
- left = ctl->left;
- right = ctl->right;
- }
- /* Apply effective values */
- if (ctl->dir & HDA_CTL_OUT)
- hdac_audio_ctl_amp_set_internal(sc, cad, nid, ctl->index,
- lmute, rmute, left, right, 0);
- if (ctl->dir & HDA_CTL_IN)
- hdac_audio_ctl_amp_set_internal(sc, cad, nid, ctl->index,
- lmute, rmute, left, right, 1);
-}
-
-static void
-hdac_widget_connection_select(struct hdac_widget *w, uint8_t index)
-{
- if (w == NULL || w->nconns < 1 || index > (w->nconns - 1))
- return;
- hdac_command(w->devinfo->codec->sc,
- HDA_CMD_SET_CONNECTION_SELECT_CONTROL(w->devinfo->codec->cad,
- w->nid, index), w->devinfo->codec->cad);
- w->selconn = index;
-}
-
-
/****************************************************************************
* uint32_t hdac_command_sendone_internal
*
* Wrapper function that sends only one command to a given codec
****************************************************************************/
static uint32_t
-hdac_command_sendone_internal(struct hdac_softc *sc, uint32_t verb, nid_t cad)
+hdac_send_command(struct hdac_softc *sc, nid_t cad, uint32_t verb)
{
- struct hdac_command_list cl;
- uint32_t response = HDAC_INVALID;
+ int timeout;
+ uint32_t *corb;
if (!hdac_lockowned(sc))
device_printf(sc->dev, "WARNING!!!! mtx not owned!!!!\n");
- cl.num_commands = 1;
- cl.verbs = &verb;
- cl.responses = &response;
-
- hdac_command_send_internal(sc, &cl, cad);
-
- return (response);
-}
-
-/****************************************************************************
- * hdac_command_send_internal
- *
- * Send a command list to the codec via the corb. We queue as much verbs as
- * we can and msleep on the codec. When the interrupt get the responses
- * back from the rirb, it will wake us up so we can queue the remaining verbs
- * if any.
- ****************************************************************************/
-static void
-hdac_command_send_internal(struct hdac_softc *sc,
- struct hdac_command_list *commands, nid_t cad)
-{
- struct hdac_codec *codec;
- int corbrp;
- uint32_t *corb;
- int timeout;
- int retry = 10;
- struct hdac_rirb *rirb_base;
-
- if (sc == NULL || sc->codecs[cad] == NULL || commands == NULL ||
- commands->num_commands < 1)
- return;
+ verb &= ~HDA_CMD_CAD_MASK;
+ verb |= ((uint32_t)cad) << HDA_CMD_CAD_SHIFT;
+ sc->codecs[cad].response = HDA_INVALID;
- codec = sc->codecs[cad];
- codec->commands = commands;
- codec->responses_received = 0;
- codec->verbs_sent = 0;
+ sc->codecs[cad].pending++;
+ sc->corb_wp++;
+ sc->corb_wp %= sc->corb_size;
corb = (uint32_t *)sc->corb_dma.dma_vaddr;
- rirb_base = (struct hdac_rirb *)sc->rirb_dma.dma_vaddr;
-
- do {
- if (codec->verbs_sent != commands->num_commands) {
- /* Queue as many verbs as possible */
- corbrp = HDAC_READ_2(&sc->mem, HDAC_CORBRP);
#if 0
- bus_dmamap_sync(sc->corb_dma.dma_tag,
- sc->corb_dma.dma_map, BUS_DMASYNC_PREWRITE);
+ bus_dmamap_sync(sc->corb_dma.dma_tag,
+ sc->corb_dma.dma_map, BUS_DMASYNC_PREWRITE);
#endif
- while (codec->verbs_sent != commands->num_commands &&
- ((sc->corb_wp + 1) % sc->corb_size) != corbrp) {
- sc->corb_wp++;
- sc->corb_wp %= sc->corb_size;
- corb[sc->corb_wp] =
- commands->verbs[codec->verbs_sent++];
- }
-
- /* Send the verbs to the codecs */
+ corb[sc->corb_wp] = verb;
#if 0
- bus_dmamap_sync(sc->corb_dma.dma_tag,
- sc->corb_dma.dma_map, BUS_DMASYNC_POSTWRITE);
+ bus_dmamap_sync(sc->corb_dma.dma_tag,
+ sc->corb_dma.dma_map, BUS_DMASYNC_POSTWRITE);
#endif
- HDAC_WRITE_2(&sc->mem, HDAC_CORBWP, sc->corb_wp);
- }
+ HDAC_WRITE_2(&sc->mem, HDAC_CORBWP, sc->corb_wp);
- timeout = 1000;
- while (hdac_rirb_flush(sc) == 0 && --timeout)
+ timeout = 10000;
+ do {
+ if (hdac_rirb_flush(sc) == 0)
DELAY(10);
- } while ((codec->verbs_sent != commands->num_commands ||
- codec->responses_received != commands->num_commands) && --retry);
+ } while (sc->codecs[cad].pending != 0 && --timeout);
- if (retry == 0)
- device_printf(sc->dev,
- "%s: TIMEOUT numcmd=%d, sent=%d, received=%d\n",
- __func__, commands->num_commands, codec->verbs_sent,
- codec->responses_received);
-
- codec->commands = NULL;
- codec->responses_received = 0;
- codec->verbs_sent = 0;
+ if (sc->codecs[cad].pending != 0) {
+ device_printf(sc->dev, "Command timeout on address %d\n", cad);
+ sc->codecs[cad].pending = 0;
+ }
- hdac_unsolq_flush(sc);
+ if (sc->unsolq_rp != sc->unsolq_wp)
+ taskqueue_enqueue(taskqueue_thread, &sc->unsolq_task);
+ return (sc->codecs[cad].response);
}
-
/****************************************************************************
* Device Methods
****************************************************************************/
@@ -3393,737 +1006,33 @@ hdac_probe(device_t dev)
result = ENXIO;
for (i = 0; i < HDAC_DEVICES_LEN; i++) {
if (hdac_devices[i].model == model) {
- strlcpy(desc, hdac_devices[i].desc, sizeof(desc));
- result = BUS_PROBE_DEFAULT;
+ strlcpy(desc, hdac_devices[i].desc, sizeof(desc));
+ result = BUS_PROBE_DEFAULT;
break;
}
if (HDA_DEV_MATCH(hdac_devices[i].model, model) &&
class == PCIC_MULTIMEDIA &&
subclass == PCIS_MULTIMEDIA_HDA) {
- strlcpy(desc, hdac_devices[i].desc, sizeof(desc));
- result = BUS_PROBE_GENERIC;
+ snprintf(desc, sizeof(desc),
+ "%s (0x%04x)",
+ hdac_devices[i].desc, pci_get_device(dev));
+ result = BUS_PROBE_GENERIC;
break;
}
}
if (result == ENXIO && class == PCIC_MULTIMEDIA &&
subclass == PCIS_MULTIMEDIA_HDA) {
- strlcpy(desc, "Generic", sizeof(desc));
- result = BUS_PROBE_GENERIC;
+ snprintf(desc, sizeof(desc), "Generic (0x%08x)", model);
+ result = BUS_PROBE_GENERIC;
}
if (result != ENXIO) {
- strlcat(desc, " High Definition Audio Controller",
- sizeof(desc));
+ strlcat(desc, " HDA Controller", sizeof(desc));
device_set_desc_copy(dev, desc);
}
return (result);
}
-static void *
-hdac_channel_init(kobj_t obj, void *data, struct snd_dbuf *b,
- struct pcm_channel *c, int dir)
-{
- struct hdac_pcm_devinfo *pdevinfo = data;
- struct hdac_devinfo *devinfo = pdevinfo->devinfo;
- struct hdac_softc *sc = devinfo->codec->sc;
- struct hdac_chan *ch;
- int i, ord = 0, chid;
-
- hdac_lock(sc);
-
- chid = (dir == PCMDIR_PLAY)?pdevinfo->play:pdevinfo->rec;
- ch = &sc->chans[chid];
- for (i = 0; i < sc->num_chans && i < chid; i++) {
- if (ch->dir == sc->chans[i].dir)
- ord++;
- }
- if (dir == PCMDIR_PLAY) {
- ch->off = (sc->num_iss + ord) << 5;
- } else {
- ch->off = ord << 5;
- }
-
- if (devinfo->function.audio.quirks & HDA_QUIRK_FIXEDRATE) {
- ch->caps.minspeed = ch->caps.maxspeed = 48000;
- ch->pcmrates[0] = 48000;
- ch->pcmrates[1] = 0;
- }
- if (sc->pos_dma.dma_vaddr != NULL)
- ch->dmapos = (uint32_t *)(sc->pos_dma.dma_vaddr +
- (sc->streamcnt * 8));
- else
- ch->dmapos = NULL;
- ch->sid = ++sc->streamcnt;
- ch->dir = dir;
- ch->b = b;
- ch->c = c;
- ch->blksz = pdevinfo->chan_size / pdevinfo->chan_blkcnt;
- ch->blkcnt = pdevinfo->chan_blkcnt;
- hdac_unlock(sc);
-
- if (hdac_bdl_alloc(ch) != 0) {
- ch->blkcnt = 0;
- return (NULL);
- }
-
- if (sndbuf_alloc(ch->b, sc->chan_dmat,
- (sc->flags & HDAC_F_DMA_NOCACHE) ? BUS_DMA_NOCACHE : 0,
- pdevinfo->chan_size) != 0)
- return (NULL);
-
- return (ch);
-}
-
-static int
-hdac_channel_setformat(kobj_t obj, void *data, uint32_t format)
-{
- struct hdac_chan *ch = data;
- int i;
-
- for (i = 0; ch->caps.fmtlist[i] != 0; i++) {
- if (format == ch->caps.fmtlist[i]) {
- ch->fmt = format;
- return (0);
- }
- }
-
- return (EINVAL);
-}
-
-static uint32_t
-hdac_channel_setspeed(kobj_t obj, void *data, uint32_t speed)
-{
- struct hdac_chan *ch = data;
- uint32_t spd = 0, threshold;
- int i;
-
- for (i = 0; ch->pcmrates[i] != 0; i++) {
- spd = ch->pcmrates[i];
- threshold = spd + ((ch->pcmrates[i + 1] != 0) ?
- ((ch->pcmrates[i + 1] - spd) >> 1) : 0);
- if (speed < threshold)
- break;
- }
-
- if (spd == 0) /* impossible */
- ch->spd = 48000;
- else
- ch->spd = spd;
-
- return (ch->spd);
-}
-
-static void
-hdac_stream_setup(struct hdac_chan *ch)
-{
- struct hdac_softc *sc = ch->devinfo->codec->sc;
- struct hdac_audio_as *as = &ch->devinfo->function.audio.as[ch->as];
- struct hdac_widget *w;
- int i, chn, totalchn, c;
- nid_t cad = ch->devinfo->codec->cad;
- uint16_t fmt, dfmt;
- uint16_t chmap[2][5] = {{ 0x0010, 0x0001, 0x0201, 0x0231, 0x0231 }, /* 5.1 */
- { 0x0010, 0x0001, 0x2001, 0x2031, 0x2431 }};/* 7.1 */
- int map = -1;
-
- totalchn = AFMT_CHANNEL(ch->fmt);
- HDA_BOOTHVERBOSE(
- device_printf(ch->pdevinfo->dev,
- "PCMDIR_%s: Stream setup fmt=%08x speed=%d\n",
- (ch->dir == PCMDIR_PLAY) ? "PLAY" : "REC",
- ch->fmt, ch->spd);
- );
- fmt = 0;
- if (ch->fmt & AFMT_S16_LE)
- fmt |= ch->bit16 << 4;
- else if (ch->fmt & AFMT_S32_LE)
- fmt |= ch->bit32 << 4;
- else
- fmt |= 1 << 4;
- for (i = 0; i < HDA_RATE_TAB_LEN; i++) {
- if (hda_rate_tab[i].valid && ch->spd == hda_rate_tab[i].rate) {
- fmt |= hda_rate_tab[i].base;
- fmt |= hda_rate_tab[i].mul;
- fmt |= hda_rate_tab[i].div;
- break;
- }
- }
- fmt |= (totalchn - 1);
-
- /* Set channel mapping for known speaker setups. */
- if (as->pinset == 0x0007 || as->pinset == 0x0013) /* Standard 5.1 */
- map = 0;
- else if (as->pinset == 0x0017) /* Standard 7.1 */
- map = 1;
-
- HDAC_WRITE_2(&sc->mem, ch->off + HDAC_SDFMT, fmt);
-
- dfmt = HDA_CMD_SET_DIGITAL_CONV_FMT1_DIGEN;
- if (ch->fmt & AFMT_AC3)
- dfmt |= HDA_CMD_SET_DIGITAL_CONV_FMT1_NAUDIO;
-
- chn = 0;
- for (i = 0; ch->io[i] != -1; i++) {
- w = hdac_widget_get(ch->devinfo, ch->io[i]);
- if (w == NULL)
- continue;
-
- /* If HP redirection is enabled, but failed to use same
- DAC, make last DAC to duplicate first one. */
- if (as->fakeredir && i == (as->pincnt - 1)) {
- c = (ch->sid << 4);
- } else {
- if (map >= 0) /* Map known speaker setups. */
- chn = (((chmap[map][totalchn / 2] >> i * 4) &
- 0xf) - 1) * 2;
- if (chn < 0 || chn >= totalchn) {
- c = 0;
- } else {
- c = (ch->sid << 4) | chn;
- }
- }
- HDA_BOOTHVERBOSE(
- device_printf(ch->pdevinfo->dev,
- "PCMDIR_%s: Stream setup nid=%d: "
- "fmt=0x%04x, dfmt=0x%04x, chan=0x%04x\n",
- (ch->dir == PCMDIR_PLAY) ? "PLAY" : "REC",
- ch->io[i], fmt, dfmt, c);
- );
- hdac_command(sc,
- HDA_CMD_SET_CONV_FMT(cad, ch->io[i], fmt), cad);
- if (HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL(w->param.widget_cap)) {
- hdac_command(sc,
- HDA_CMD_SET_DIGITAL_CONV_FMT1(cad, ch->io[i], dfmt),
- cad);
- }
- hdac_command(sc,
- HDA_CMD_SET_CONV_STREAM_CHAN(cad, ch->io[i], c), cad);
-#if 0
- hdac_command(sc,
- HDA_CMD_SET_CONV_CHAN_COUNT(cad, ch->io[i], 1), cad);
- hdac_command(sc,
- HDA_CMD_SET_HDMI_CHAN_SLOT(cad, ch->io[i], 0x00), cad);
- hdac_command(sc,
- HDA_CMD_SET_HDMI_CHAN_SLOT(cad, ch->io[i], 0x11), cad);
-#endif
- chn += HDA_PARAM_AUDIO_WIDGET_CAP_CC(w->param.widget_cap) + 1;
- }
-}
-
-/*
- * Greatest Common Divisor.
- */
-static unsigned
-gcd(unsigned a, unsigned b)
-{
- u_int c;
-
- while (b != 0) {
- c = a;
- a = b;
- b = (c % b);
- }
- return (a);
-}
-
-/*
- * Least Common Multiple.
- */
-static unsigned
-lcm(unsigned a, unsigned b)
-{
-
- return ((a * b) / gcd(a, b));
-}
-
-static int
-hdac_channel_setfragments(kobj_t obj, void *data,
- uint32_t blksz, uint32_t blkcnt)
-{
- struct hdac_chan *ch = data;
- struct hdac_softc *sc = ch->devinfo->codec->sc;
-
- blksz -= blksz % lcm(HDAC_DMA_ALIGNMENT, sndbuf_getalign(ch->b));
-
- if (blksz > (sndbuf_getmaxsize(ch->b) / HDA_BDL_MIN))
- blksz = sndbuf_getmaxsize(ch->b) / HDA_BDL_MIN;
- if (blksz < HDA_BLK_MIN)
- blksz = HDA_BLK_MIN;
- if (blkcnt > HDA_BDL_MAX)
- blkcnt = HDA_BDL_MAX;
- if (blkcnt < HDA_BDL_MIN)
- blkcnt = HDA_BDL_MIN;
-
- while ((blksz * blkcnt) > sndbuf_getmaxsize(ch->b)) {
- if ((blkcnt >> 1) >= HDA_BDL_MIN)
- blkcnt >>= 1;
- else if ((blksz >> 1) >= HDA_BLK_MIN)
- blksz >>= 1;
- else
- break;
- }
-
- if ((sndbuf_getblksz(ch->b) != blksz ||
- sndbuf_getblkcnt(ch->b) != blkcnt) &&
- sndbuf_resize(ch->b, blkcnt, blksz) != 0)
- device_printf(sc->dev, "%s: failed blksz=%u blkcnt=%u\n",
- __func__, blksz, blkcnt);
-
- ch->blksz = sndbuf_getblksz(ch->b);
- ch->blkcnt = sndbuf_getblkcnt(ch->b);
-
- return (0);
-}
-
-static uint32_t
-hdac_channel_setblocksize(kobj_t obj, void *data, uint32_t blksz)
-{
- struct hdac_chan *ch = data;
-
- hdac_channel_setfragments(obj, data, blksz, ch->pdevinfo->chan_blkcnt);
-
- return (ch->blksz);
-}
-
-static void
-hdac_channel_stop(struct hdac_softc *sc, struct hdac_chan *ch)
-{
- struct hdac_devinfo *devinfo = ch->devinfo;
- struct hdac_widget *w;
- nid_t cad = devinfo->codec->cad;
- int i;
-
- hdac_stream_stop(ch);
-
- for (i = 0; ch->io[i] != -1; i++) {
- w = hdac_widget_get(ch->devinfo, ch->io[i]);
- if (w == NULL)
- continue;
- if (HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL(w->param.widget_cap)) {
- hdac_command(sc,
- HDA_CMD_SET_DIGITAL_CONV_FMT1(cad, ch->io[i], 0),
- cad);
- }
- hdac_command(sc,
- HDA_CMD_SET_CONV_STREAM_CHAN(cad, ch->io[i],
- 0), cad);
- }
-}
-
-static void
-hdac_channel_start(struct hdac_softc *sc, struct hdac_chan *ch)
-{
- ch->ptr = 0;
- ch->prevptr = 0;
- hdac_stream_stop(ch);
- hdac_stream_reset(ch);
- hdac_bdl_setup(ch);
- hdac_stream_setid(ch);
- hdac_stream_setup(ch);
- hdac_stream_start(ch);
-}
-
-static int
-hdac_channel_trigger(kobj_t obj, void *data, int go)
-{
- struct hdac_chan *ch = data;
- struct hdac_softc *sc = ch->devinfo->codec->sc;
-
- if (!PCMTRIG_COMMON(go))
- return (0);
-
- hdac_lock(sc);
- switch (go) {
- case PCMTRIG_START:
- hdac_channel_start(sc, ch);
- break;
- case PCMTRIG_STOP:
- case PCMTRIG_ABORT:
- hdac_channel_stop(sc, ch);
- break;
- default:
- break;
- }
- hdac_unlock(sc);
-
- return (0);
-}
-
-static uint32_t
-hdac_channel_getptr(kobj_t obj, void *data)
-{
- struct hdac_chan *ch = data;
- struct hdac_softc *sc = ch->devinfo->codec->sc;
- uint32_t ptr;
-
- hdac_lock(sc);
- if (sc->polling != 0)
- ptr = ch->ptr;
- else if (ch->dmapos != NULL)
- ptr = *(ch->dmapos);
- else
- ptr = HDAC_READ_4(&sc->mem, ch->off + HDAC_SDLPIB);
- hdac_unlock(sc);
-
- /*
- * Round to available space and force 128 bytes aligment.
- */
- ptr %= ch->blksz * ch->blkcnt;
- ptr &= HDA_BLK_ALIGN;
-
- return (ptr);
-}
-
-static struct pcmchan_caps *
-hdac_channel_getcaps(kobj_t obj, void *data)
-{
- return (&((struct hdac_chan *)data)->caps);
-}
-
-static kobj_method_t hdac_channel_methods[] = {
- KOBJMETHOD(channel_init, hdac_channel_init),
- KOBJMETHOD(channel_setformat, hdac_channel_setformat),
- KOBJMETHOD(channel_setspeed, hdac_channel_setspeed),
- KOBJMETHOD(channel_setblocksize, hdac_channel_setblocksize),
- KOBJMETHOD(channel_setfragments, hdac_channel_setfragments),
- KOBJMETHOD(channel_trigger, hdac_channel_trigger),
- KOBJMETHOD(channel_getptr, hdac_channel_getptr),
- KOBJMETHOD(channel_getcaps, hdac_channel_getcaps),
- KOBJMETHOD_END
-};
-CHANNEL_DECLARE(hdac_channel);
-
-static int
-hdac_audio_ctl_ossmixer_init(struct snd_mixer *m)
-{
- struct hdac_pcm_devinfo *pdevinfo = mix_getdevinfo(m);
- struct hdac_devinfo *devinfo = pdevinfo->devinfo;
- struct hdac_softc *sc = devinfo->codec->sc;
- struct hdac_widget *w, *cw;
- struct hdac_audio_ctl *ctl;
- uint32_t mask, recmask, id;
- int i, j, softpcmvol;
-
- hdac_lock(sc);
-
- /* Make sure that in case of soft volume it won't stay muted. */
- for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) {
- pdevinfo->left[i] = 100;
- pdevinfo->right[i] = 100;
- }
-
- mask = 0;
- recmask = 0;
- id = hdac_codec_id(devinfo->codec);
-
- /* Declate EAPD as ogain control. */
- if (pdevinfo->play >= 0) {
- for (i = devinfo->startnode; i < devinfo->endnode; i++) {
- w = hdac_widget_get(devinfo, i);
- if (w == NULL || w->enable == 0)
- continue;
- if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX ||
- w->param.eapdbtl == HDAC_INVALID ||
- w->bindas != sc->chans[pdevinfo->play].as)
- continue;
- mask |= SOUND_MASK_OGAIN;
- break;
- }
- }
-
- /* Declare volume controls assigned to this association. */
- i = 0;
- ctl = NULL;
- while ((ctl = hdac_audio_ctl_each(devinfo, &i)) != NULL) {
- if (ctl->enable == 0)
- continue;
- if ((pdevinfo->play >= 0 &&
- ctl->widget->bindas == sc->chans[pdevinfo->play].as) ||
- (pdevinfo->rec >= 0 &&
- ctl->widget->bindas == sc->chans[pdevinfo->rec].as) ||
- (ctl->widget->bindas == -2 && pdevinfo->index == 0))
- mask |= ctl->ossmask;
- }
-
- /* Declare record sources available to this association. */
- if (pdevinfo->rec >= 0) {
- struct hdac_chan *ch = &sc->chans[pdevinfo->rec];
- for (i = 0; ch->io[i] != -1; i++) {
- w = hdac_widget_get(devinfo, ch->io[i]);
- if (w == NULL || w->enable == 0)
- continue;
- for (j = 0; j < w->nconns; j++) {
- if (w->connsenable[j] == 0)
- continue;
- cw = hdac_widget_get(devinfo, w->conns[j]);
- if (cw == NULL || cw->enable == 0)
- continue;
- if (cw->bindas != sc->chans[pdevinfo->rec].as &&
- cw->bindas != -2)
- continue;
- recmask |= cw->ossmask;
- }
- }
- }
-
- /* Declare soft PCM volume if needed. */
- if (pdevinfo->play >= 0) {
- ctl = NULL;
- if ((mask & SOUND_MASK_PCM) == 0 ||
- (devinfo->function.audio.quirks & HDA_QUIRK_SOFTPCMVOL)) {
- softpcmvol = 1;
- mask |= SOUND_MASK_PCM;
- } else {
- softpcmvol = 0;
- i = 0;
- while ((ctl = hdac_audio_ctl_each(devinfo, &i)) != NULL) {
- if (ctl->enable == 0)
- continue;
- if (ctl->widget->bindas != sc->chans[pdevinfo->play].as &&
- (ctl->widget->bindas != -2 || pdevinfo->index != 0))
- continue;
- if (!(ctl->ossmask & SOUND_MASK_PCM))
- continue;
- if (ctl->step > 0)
- break;
- }
- }
-
- if (softpcmvol == 1 || ctl == NULL) {
- pcm_setflags(pdevinfo->dev, pcm_getflags(pdevinfo->dev) | SD_F_SOFTPCMVOL);
- HDA_BOOTVERBOSE(
- device_printf(pdevinfo->dev,
- "%s Soft PCM volume\n",
- (softpcmvol == 1) ? "Forcing" : "Enabling");
- );
- }
- }
-
- /* Declare master volume if needed. */
- if (pdevinfo->play >= 0) {
- if ((mask & (SOUND_MASK_VOLUME | SOUND_MASK_PCM)) ==
- SOUND_MASK_PCM) {
- mask |= SOUND_MASK_VOLUME;
- mix_setparentchild(m, SOUND_MIXER_VOLUME,
- SOUND_MASK_PCM);
- mix_setrealdev(m, SOUND_MIXER_VOLUME,
- SOUND_MIXER_NONE);
- HDA_BOOTVERBOSE(
- device_printf(pdevinfo->dev,
- "Forcing master volume with PCM\n");
- );
- }
- }
-
- recmask &= (1 << SOUND_MIXER_NRDEVICES) - 1;
- mask &= (1 << SOUND_MIXER_NRDEVICES) - 1;
-
- mix_setrecdevs(m, recmask);
- mix_setdevs(m, mask);
-
- hdac_unlock(sc);
-
- return (0);
-}
-
-static int
-hdac_audio_ctl_ossmixer_set(struct snd_mixer *m, unsigned dev,
- unsigned left, unsigned right)
-{
- struct hdac_pcm_devinfo *pdevinfo = mix_getdevinfo(m);
- struct hdac_devinfo *devinfo = pdevinfo->devinfo;
- struct hdac_softc *sc = devinfo->codec->sc;
- struct hdac_widget *w;
- struct hdac_audio_ctl *ctl;
- uint32_t mute;
- int lvol, rvol;
- int i, j;
-
- hdac_lock(sc);
- /* Save new values. */
- pdevinfo->left[dev] = left;
- pdevinfo->right[dev] = right;
-
- /* 'ogain' is the special case implemented with EAPD. */
- if (dev == SOUND_MIXER_OGAIN) {
- uint32_t orig;
- w = NULL;
- for (i = devinfo->startnode; i < devinfo->endnode; i++) {
- w = hdac_widget_get(devinfo, i);
- if (w == NULL || w->enable == 0)
- continue;
- if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX ||
- w->param.eapdbtl == HDAC_INVALID)
- continue;
- break;
- }
- if (i >= devinfo->endnode) {
- hdac_unlock(sc);
- return (-1);
- }
- orig = w->param.eapdbtl;
- if (left == 0)
- w->param.eapdbtl &= ~HDA_CMD_SET_EAPD_BTL_ENABLE_EAPD;
- else
- w->param.eapdbtl |= HDA_CMD_SET_EAPD_BTL_ENABLE_EAPD;
- if (orig != w->param.eapdbtl) {
- uint32_t val;
-
- val = w->param.eapdbtl;
- if (devinfo->function.audio.quirks & HDA_QUIRK_EAPDINV)
- val ^= HDA_CMD_SET_EAPD_BTL_ENABLE_EAPD;
- hdac_command(sc,
- HDA_CMD_SET_EAPD_BTL_ENABLE(devinfo->codec->cad,
- w->nid, val), devinfo->codec->cad);
- }
- hdac_unlock(sc);
- return (left | (left << 8));
- }
-
- /* Recalculate all controls related to this OSS device. */
- i = 0;
- while ((ctl = hdac_audio_ctl_each(devinfo, &i)) != NULL) {
- if (ctl->enable == 0 ||
- !(ctl->ossmask & (1 << dev)))
- continue;
- if (!((pdevinfo->play >= 0 &&
- ctl->widget->bindas == sc->chans[pdevinfo->play].as) ||
- (pdevinfo->rec >= 0 &&
- ctl->widget->bindas == sc->chans[pdevinfo->rec].as) ||
- ctl->widget->bindas == -2))
- continue;
-
- lvol = 100;
- rvol = 100;
- for (j = 0; j < SOUND_MIXER_NRDEVICES; j++) {
- if (ctl->ossmask & (1 << j)) {
- lvol = lvol * pdevinfo->left[j] / 100;
- rvol = rvol * pdevinfo->right[j] / 100;
- }
- }
- mute = (lvol == 0) ? HDA_AMP_MUTE_LEFT : 0;
- mute |= (rvol == 0) ? HDA_AMP_MUTE_RIGHT : 0;
- lvol = (lvol * ctl->step + 50) / 100;
- rvol = (rvol * ctl->step + 50) / 100;
- hdac_audio_ctl_amp_set(ctl, mute, lvol, rvol);
- }
- hdac_unlock(sc);
-
- return (left | (right << 8));
-}
-
-/*
- * Commutate specified record source.
- */
-static uint32_t
-hdac_audio_ctl_recsel_comm(struct hdac_pcm_devinfo *pdevinfo, uint32_t src, nid_t nid, int depth)
-{
- struct hdac_devinfo *devinfo = pdevinfo->devinfo;
- struct hdac_widget *w, *cw;
- struct hdac_audio_ctl *ctl;
- char buf[64];
- int i, muted;
- uint32_t res = 0;
-
- if (depth > HDA_PARSE_MAXDEPTH)
- return (0);
-
- w = hdac_widget_get(devinfo, nid);
- if (w == NULL || w->enable == 0)
- return (0);
-
- for (i = 0; i < w->nconns; i++) {
- if (w->connsenable[i] == 0)
- continue;
- cw = hdac_widget_get(devinfo, w->conns[i]);
- if (cw == NULL || cw->enable == 0 || cw->bindas == -1)
- continue;
- /* Call recursively to trace signal to it's source if needed. */
- if ((src & cw->ossmask) != 0) {
- if (cw->ossdev < 0) {
- res |= hdac_audio_ctl_recsel_comm(pdevinfo, src,
- w->conns[i], depth + 1);
- } else {
- res |= cw->ossmask;
- }
- }
- /* We have two special cases: mixers and others (selectors). */
- if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER) {
- ctl = hdac_audio_ctl_amp_get(devinfo,
- w->nid, HDA_CTL_IN, i, 1);
- if (ctl == NULL)
- continue;
- /* If we have input control on this node mute them
- * according to requested sources. */
- muted = (src & cw->ossmask) ? 0 : 1;
- if (muted != ctl->forcemute) {
- ctl->forcemute = muted;
- hdac_audio_ctl_amp_set(ctl,
- HDA_AMP_MUTE_DEFAULT,
- HDA_AMP_VOL_DEFAULT, HDA_AMP_VOL_DEFAULT);
- }
- HDA_BOOTHVERBOSE(
- device_printf(pdevinfo->dev,
- "Recsel (%s): nid %d source %d %s\n",
- hdac_audio_ctl_ossmixer_mask2allname(
- src, buf, sizeof(buf)),
- nid, i, muted?"mute":"unmute");
- );
- } else {
- if (w->nconns == 1)
- break;
- if ((src & cw->ossmask) == 0)
- continue;
- /* If we found requested source - select it and exit. */
- hdac_widget_connection_select(w, i);
- HDA_BOOTHVERBOSE(
- device_printf(pdevinfo->dev,
- "Recsel (%s): nid %d source %d select\n",
- hdac_audio_ctl_ossmixer_mask2allname(
- src, buf, sizeof(buf)),
- nid, i);
- );
- break;
- }
- }
- return (res);
-}
-
-static uint32_t
-hdac_audio_ctl_ossmixer_setrecsrc(struct snd_mixer *m, uint32_t src)
-{
- struct hdac_pcm_devinfo *pdevinfo = mix_getdevinfo(m);
- struct hdac_devinfo *devinfo = pdevinfo->devinfo;
- struct hdac_widget *w;
- struct hdac_softc *sc = devinfo->codec->sc;
- struct hdac_chan *ch;
- int i;
- uint32_t ret = 0xffffffff;
-
- hdac_lock(sc);
-
- /* Commutate requested recsrc for each ADC. */
- ch = &sc->chans[pdevinfo->rec];
- for (i = 0; ch->io[i] != -1; i++) {
- w = hdac_widget_get(devinfo, ch->io[i]);
- if (w == NULL || w->enable == 0)
- continue;
- ret &= hdac_audio_ctl_recsel_comm(pdevinfo, src, ch->io[i], 0);
- }
-
- hdac_unlock(sc);
-
- return ((ret == 0xffffffff)? 0 : ret);
-}
-
-static kobj_method_t hdac_audio_ctl_ossmixer_methods[] = {
- KOBJMETHOD(mixer_init, hdac_audio_ctl_ossmixer_init),
- KOBJMETHOD(mixer_set, hdac_audio_ctl_ossmixer_set),
- KOBJMETHOD(mixer_setrecsrc, hdac_audio_ctl_ossmixer_setrecsrc),
- KOBJMETHOD_END
-};
-MIXER_DECLARE(hdac_audio_ctl_ossmixer);
-
static void
hdac_unsolq_task(void *context, int pending)
{
@@ -4154,6 +1063,7 @@ hdac_attach(device_t dev)
uint16_t vendor;
uint8_t v;
+ sc = device_get_softc(dev);
HDA_BOOTVERBOSE(
device_printf(dev, "HDA Driver Revision: %s\n",
HDA_DRV_TEST_REV);
@@ -4177,38 +1087,44 @@ hdac_attach(device_t dev)
}
}
- sc = device_get_softc(dev);
- sc->lock = snd_mtxcreate(device_get_nameunit(dev), HDAC_MTX_NAME);
+ sc->lock = snd_mtxcreate(device_get_nameunit(dev), "HDA driver mutex");
sc->dev = dev;
- sc->pci_subvendor = (uint32_t)pci_get_subdevice(sc->dev) << 16;
- sc->pci_subvendor |= (uint32_t)pci_get_subvendor(sc->dev) & 0x0000ffff;
- vendor = pci_get_vendor(dev);
-
- if (sc->pci_subvendor == HP_NX6325_SUBVENDORX) {
- /* Screw nx6325 - subdevice/subvendor swapped */
- sc->pci_subvendor = HP_NX6325_SUBVENDOR;
- }
-
- callout_init(&sc->poll_hda, CALLOUT_MPSAFE);
- callout_init(&sc->poll_hdac, CALLOUT_MPSAFE);
- callout_init(&sc->poll_jack, CALLOUT_MPSAFE);
-
TASK_INIT(&sc->unsolq_task, 0, hdac_unsolq_task, sc);
-
- sc->poll_ticks = 1000000;
- sc->poll_ival = HDAC_POLL_INTERVAL;
+ callout_init(&sc->poll_callout, CALLOUT_MPSAFE);
+ for (i = 0; i < HDAC_CODEC_MAX; i++)
+ sc->codecs[i].dev = NULL;
+ if (devid >= 0) {
+ sc->quirks_on = hdac_devices[devid].quirks_on;
+ sc->quirks_off = hdac_devices[devid].quirks_off;
+ } else {
+ sc->quirks_on = 0;
+ sc->quirks_off = 0;
+ }
+ if (resource_int_value(device_get_name(dev),
+ device_get_unit(dev), "msi", &i) == 0) {
+ if (i == 0)
+ sc->quirks_off |= HDAC_QUIRK_MSI;
+ else {
+ sc->quirks_on |= HDAC_QUIRK_MSI;
+ sc->quirks_off |= ~HDAC_QUIRK_MSI;
+ }
+ }
+ hdac_config_fetch(sc, &sc->quirks_on, &sc->quirks_off);
+ HDA_BOOTVERBOSE(
+ device_printf(sc->dev,
+ "Config options: on=0x%08x off=0x%08x\n",
+ sc->quirks_on, sc->quirks_off);
+ );
+ sc->poll_ival = hz;
if (resource_int_value(device_get_name(dev),
device_get_unit(dev), "polling", &i) == 0 && i != 0)
sc->polling = 1;
else
sc->polling = 0;
- sc->hdabus = NULL;
- for (i = 0; i < HDAC_CODEC_MAX; i++)
- sc->codecs[i] = NULL;
-
pci_enable_busmaster(dev);
+ vendor = pci_get_vendor(dev);
if (vendor == INTEL_VENDORID) {
/* TCSEL -> TC0 */
v = pci_read_config(dev, 0x44, 1);
@@ -4219,18 +1135,6 @@ hdac_attach(device_t dev)
);
}
- if (devid >= 0 && (hdac_devices[devid].flags & HDAC_NO_MSI))
- sc->flags &= ~HDAC_F_MSI;
- else
- sc->flags |= HDAC_F_MSI;
- if (resource_int_value(device_get_name(dev),
- device_get_unit(dev), "msi", &i) == 0) {
- if (i == 0)
- sc->flags &= ~HDAC_F_MSI;
- else
- sc->flags |= HDAC_F_MSI;
- }
-
#if defined(__i386__) || defined(__amd64__)
sc->flags |= HDAC_F_DMA_NOCACHE;
@@ -4299,10 +1203,7 @@ hdac_attach(device_t dev)
if (result != 0)
goto hdac_attach_fail;
- if (devid >= 0 && (hdac_devices[devid].flags & HDAC_NO_64BIT))
- sc->support_64bit = 0;
-
- /* Allocate CORB and RIRB dma memory */
+ /* Allocate CORB, RIRB, POS and BDLs dma memory */
result = hdac_dma_alloc(sc, &sc->corb_dma,
sc->corb_size * sizeof(uint32_t));
if (result != 0)
@@ -4311,10 +1212,34 @@ hdac_attach(device_t dev)
sc->rirb_size * sizeof(struct hdac_rirb));
if (result != 0)
goto hdac_attach_fail;
+ sc->streams = malloc(sizeof(struct hdac_stream) * sc->num_ss,
+ M_HDAC, M_ZERO | M_WAITOK);
+ for (i = 0; i < sc->num_ss; i++) {
+ result = hdac_dma_alloc(sc, &sc->streams[i].bdl,
+ sizeof(struct hdac_bdle) * HDA_BDL_MAX);
+ if (result != 0)
+ goto hdac_attach_fail;
+ }
+ if (sc->quirks_on & HDAC_QUIRK_DMAPOS) {
+ if (hdac_dma_alloc(sc, &sc->pos_dma, (sc->num_ss) * 8) != 0) {
+ HDA_BOOTVERBOSE(
+ device_printf(dev, "Failed to "
+ "allocate DMA pos buffer "
+ "(non-fatal)\n");
+ );
+ } else {
+ uint64_t addr = sc->pos_dma.dma_paddr;
+
+ HDAC_WRITE_4(&sc->mem, HDAC_DPIBUBASE, addr >> 32);
+ HDAC_WRITE_4(&sc->mem, HDAC_DPIBLBASE,
+ (addr & HDAC_DPLBASE_DPLBASE_MASK) |
+ HDAC_DPLBASE_DPLBASE_DMAPBE);
+ }
+ }
result = bus_dma_tag_create(
bus_get_dma_tag(sc->dev), /* parent */
- HDAC_DMA_ALIGNMENT, /* alignment */
+ HDA_DMA_ALIGNMENT, /* alignment */
0, /* boundary */
(sc->support_64bit) ? BUS_SPACE_MAXADDR :
BUS_SPACE_MAXADDR_32BIT, /* lowaddr */
@@ -4356,6 +1281,9 @@ hdac_attach(device_t dev)
hdac_attach_fail:
hdac_irq_free(sc);
+ for (i = 0; i < sc->num_ss; i++)
+ hdac_dma_free(sc, &sc->streams[i].bdl);
+ free(sc->streams, M_HDAC);
hdac_dma_free(sc, &sc->rirb_dma);
hdac_dma_free(sc, &sc->corb_dma);
hdac_mem_free(sc);
@@ -4364,3085 +1292,113 @@ hdac_attach_fail:
return (ENXIO);
}
-static void
-hdac_audio_parse(struct hdac_devinfo *devinfo)
-{
- struct hdac_codec *codec = devinfo->codec;
- struct hdac_softc *sc = codec->sc;
- struct hdac_widget *w;
- uint32_t res;
- int i;
- nid_t cad, nid;
-
- cad = devinfo->codec->cad;
- nid = devinfo->nid;
-
- res = hdac_command(sc,
- HDA_CMD_GET_PARAMETER(cad , nid, HDA_PARAM_GPIO_COUNT), cad);
- devinfo->function.audio.gpio = res;
-
- HDA_BOOTVERBOSE(
- device_printf(sc->dev, "GPIO: 0x%08x "
- "NumGPIO=%d NumGPO=%d "
- "NumGPI=%d GPIWake=%d GPIUnsol=%d\n",
- devinfo->function.audio.gpio,
- HDA_PARAM_GPIO_COUNT_NUM_GPIO(devinfo->function.audio.gpio),
- HDA_PARAM_GPIO_COUNT_NUM_GPO(devinfo->function.audio.gpio),
- HDA_PARAM_GPIO_COUNT_NUM_GPI(devinfo->function.audio.gpio),
- HDA_PARAM_GPIO_COUNT_GPI_WAKE(devinfo->function.audio.gpio),
- HDA_PARAM_GPIO_COUNT_GPI_UNSOL(devinfo->function.audio.gpio));
- );
-
- res = hdac_command(sc,
- HDA_CMD_GET_PARAMETER(cad, nid, HDA_PARAM_SUPP_STREAM_FORMATS),
- cad);
- devinfo->function.audio.supp_stream_formats = res;
-
- res = hdac_command(sc,
- HDA_CMD_GET_PARAMETER(cad, nid, HDA_PARAM_SUPP_PCM_SIZE_RATE),
- cad);
- devinfo->function.audio.supp_pcm_size_rate = res;
-
- res = hdac_command(sc,
- HDA_CMD_GET_PARAMETER(cad, nid, HDA_PARAM_OUTPUT_AMP_CAP),
- cad);
- devinfo->function.audio.outamp_cap = res;
-
- res = hdac_command(sc,
- HDA_CMD_GET_PARAMETER(cad, nid, HDA_PARAM_INPUT_AMP_CAP),
- cad);
- devinfo->function.audio.inamp_cap = res;
-
- for (i = devinfo->startnode; i < devinfo->endnode; i++) {
- w = hdac_widget_get(devinfo, i);
- if (w == NULL)
- device_printf(sc->dev, "Ghost widget! nid=%d!\n", i);
- else {
- w->devinfo = devinfo;
- w->nid = i;
- w->enable = 1;
- w->selconn = -1;
- w->pflags = 0;
- w->ossdev = -1;
- w->bindas = -1;
- w->param.eapdbtl = HDAC_INVALID;
- hdac_widget_parse(w);
- }
- }
-}
-
-static void
-hdac_audio_ctl_parse(struct hdac_devinfo *devinfo)
-{
- struct hdac_softc *sc = devinfo->codec->sc;
- struct hdac_audio_ctl *ctls;
- struct hdac_widget *w, *cw;
- int i, j, cnt, max, ocap, icap;
- int mute, offset, step, size;
-
- /* XXX This is redundant */
- max = 0;
- for (i = devinfo->startnode; i < devinfo->endnode; i++) {
- w = hdac_widget_get(devinfo, i);
- if (w == NULL || w->enable == 0)
- continue;
- if (w->param.outamp_cap != 0)
- max++;
- if (w->param.inamp_cap != 0) {
- switch (w->type) {
- case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_SELECTOR:
- case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER:
- for (j = 0; j < w->nconns; j++) {
- cw = hdac_widget_get(devinfo,
- w->conns[j]);
- if (cw == NULL || cw->enable == 0)
- continue;
- max++;
- }
- break;
- default:
- max++;
- break;
- }
- }
- }
-
- devinfo->function.audio.ctlcnt = max;
-
- if (max < 1)
- return;
-
- ctls = (struct hdac_audio_ctl *)malloc(
- sizeof(*ctls) * max, M_HDAC, M_ZERO | M_NOWAIT);
-
- if (ctls == NULL) {
- /* Blekh! */
- device_printf(sc->dev, "unable to allocate ctls!\n");
- devinfo->function.audio.ctlcnt = 0;
- return;
- }
-
- cnt = 0;
- for (i = devinfo->startnode; cnt < max && i < devinfo->endnode; i++) {
- if (cnt >= max) {
- device_printf(sc->dev, "%s: Ctl overflow!\n",
- __func__);
- break;
- }
- w = hdac_widget_get(devinfo, i);
- if (w == NULL || w->enable == 0)
- continue;
- ocap = w->param.outamp_cap;
- icap = w->param.inamp_cap;
- if (ocap != 0) {
- mute = HDA_PARAM_OUTPUT_AMP_CAP_MUTE_CAP(ocap);
- step = HDA_PARAM_OUTPUT_AMP_CAP_NUMSTEPS(ocap);
- size = HDA_PARAM_OUTPUT_AMP_CAP_STEPSIZE(ocap);
- offset = HDA_PARAM_OUTPUT_AMP_CAP_OFFSET(ocap);
- /*if (offset > step) {
- HDA_BOOTVERBOSE(
- device_printf(sc->dev,
- "BUGGY outamp: nid=%d "
- "[offset=%d > step=%d]\n",
- w->nid, offset, step);
- );
- offset = step;
- }*/
- ctls[cnt].enable = 1;
- ctls[cnt].widget = w;
- ctls[cnt].mute = mute;
- ctls[cnt].step = step;
- ctls[cnt].size = size;
- ctls[cnt].offset = offset;
- ctls[cnt].left = offset;
- ctls[cnt].right = offset;
- if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX ||
- w->waspin)
- ctls[cnt].ndir = HDA_CTL_IN;
- else
- ctls[cnt].ndir = HDA_CTL_OUT;
- ctls[cnt++].dir = HDA_CTL_OUT;
- }
-
- if (icap != 0) {
- mute = HDA_PARAM_OUTPUT_AMP_CAP_MUTE_CAP(icap);
- step = HDA_PARAM_OUTPUT_AMP_CAP_NUMSTEPS(icap);
- size = HDA_PARAM_OUTPUT_AMP_CAP_STEPSIZE(icap);
- offset = HDA_PARAM_OUTPUT_AMP_CAP_OFFSET(icap);
- /*if (offset > step) {
- HDA_BOOTVERBOSE(
- device_printf(sc->dev,
- "BUGGY inamp: nid=%d "
- "[offset=%d > step=%d]\n",
- w->nid, offset, step);
- );
- offset = step;
- }*/
- switch (w->type) {
- case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_SELECTOR:
- case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER:
- for (j = 0; j < w->nconns; j++) {
- if (cnt >= max) {
- device_printf(sc->dev,
- "%s: Ctl overflow!\n",
- __func__);
- break;
- }
- cw = hdac_widget_get(devinfo,
- w->conns[j]);
- if (cw == NULL || cw->enable == 0)
- continue;
- ctls[cnt].enable = 1;
- ctls[cnt].widget = w;
- ctls[cnt].childwidget = cw;
- ctls[cnt].index = j;
- ctls[cnt].mute = mute;
- ctls[cnt].step = step;
- ctls[cnt].size = size;
- ctls[cnt].offset = offset;
- ctls[cnt].left = offset;
- ctls[cnt].right = offset;
- ctls[cnt].ndir = HDA_CTL_IN;
- ctls[cnt++].dir = HDA_CTL_IN;
- }
- break;
- default:
- if (cnt >= max) {
- device_printf(sc->dev,
- "%s: Ctl overflow!\n",
- __func__);
- break;
- }
- ctls[cnt].enable = 1;
- ctls[cnt].widget = w;
- ctls[cnt].mute = mute;
- ctls[cnt].step = step;
- ctls[cnt].size = size;
- ctls[cnt].offset = offset;
- ctls[cnt].left = offset;
- ctls[cnt].right = offset;
- if (w->type ==
- HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
- ctls[cnt].ndir = HDA_CTL_OUT;
- else
- ctls[cnt].ndir = HDA_CTL_IN;
- ctls[cnt++].dir = HDA_CTL_IN;
- break;
- }
- }
- }
-
- devinfo->function.audio.ctl = ctls;
-}
-
-static void
-hdac_audio_as_parse(struct hdac_devinfo *devinfo)
-{
- struct hdac_softc *sc = devinfo->codec->sc;
- struct hdac_audio_as *as;
- struct hdac_widget *w;
- int i, j, cnt, max, type, dir, assoc, seq, first, hpredir;
-
- /* Count present associations */
- max = 0;
- for (j = 1; j < 16; j++) {
- for (i = devinfo->startnode; i < devinfo->endnode; i++) {
- w = hdac_widget_get(devinfo, i);
- if (w == NULL || w->enable == 0)
- continue;
- if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
- continue;
- if (HDA_CONFIG_DEFAULTCONF_ASSOCIATION(w->wclass.pin.config)
- != j)
- continue;
- max++;
- if (j != 15) /* There could be many 1-pin assocs #15 */
- break;
- }
- }
-
- devinfo->function.audio.ascnt = max;
-
- if (max < 1)
- return;
-
- as = (struct hdac_audio_as *)malloc(
- sizeof(*as) * max, M_HDAC, M_ZERO | M_NOWAIT);
-
- if (as == NULL) {
- /* Blekh! */
- device_printf(sc->dev, "unable to allocate assocs!\n");
- devinfo->function.audio.ascnt = 0;
- return;
- }
-
- for (i = 0; i < max; i++) {
- as[i].hpredir = -1;
- as[i].chan = -1;
- as[i].digital = 0;
- }
-
- /* Scan associations skipping as=0. */
- cnt = 0;
- for (j = 1; j < 16; j++) {
- first = 16;
- hpredir = 0;
- for (i = devinfo->startnode; i < devinfo->endnode; i++) {
- w = hdac_widget_get(devinfo, i);
- if (w == NULL || w->enable == 0)
- continue;
- if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
- continue;
- assoc = HDA_CONFIG_DEFAULTCONF_ASSOCIATION(w->wclass.pin.config);
- seq = HDA_CONFIG_DEFAULTCONF_SEQUENCE(w->wclass.pin.config);
- if (assoc != j) {
- continue;
- }
- KASSERT(cnt < max,
- ("%s: Associations owerflow (%d of %d)",
- __func__, cnt, max));
- type = w->wclass.pin.config &
- HDA_CONFIG_DEFAULTCONF_DEVICE_MASK;
- /* Get pin direction. */
- if (type == HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_OUT ||
- type == HDA_CONFIG_DEFAULTCONF_DEVICE_SPEAKER ||
- type == HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT ||
- type == HDA_CONFIG_DEFAULTCONF_DEVICE_SPDIF_OUT ||
- type == HDA_CONFIG_DEFAULTCONF_DEVICE_DIGITAL_OTHER_OUT)
- dir = HDA_CTL_OUT;
- else
- dir = HDA_CTL_IN;
- /* If this is a first pin - create new association. */
- if (as[cnt].pincnt == 0) {
- as[cnt].enable = 1;
- as[cnt].index = j;
- as[cnt].dir = dir;
- }
- if (seq < first)
- first = seq;
- /* Check association correctness. */
- if (as[cnt].pins[seq] != 0) {
- device_printf(sc->dev, "%s: Duplicate pin %d (%d) "
- "in association %d! Disabling association.\n",
- __func__, seq, w->nid, j);
- as[cnt].enable = 0;
- }
- if (dir != as[cnt].dir) {
- device_printf(sc->dev, "%s: Pin %d has wrong "
- "direction for association %d! Disabling "
- "association.\n",
- __func__, w->nid, j);
- as[cnt].enable = 0;
- }
- if (HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL(w->param.widget_cap)) {
- if (HDA_PARAM_PIN_CAP_DP(w->wclass.pin.cap))
- as[cnt].digital = 3;
- else if (HDA_PARAM_PIN_CAP_HDMI(w->wclass.pin.cap))
- as[cnt].digital = 2;
- else
- as[cnt].digital = 1;
- }
- /* Headphones with seq=15 may mean redirection. */
- if (type == HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT &&
- seq == 15)
- hpredir = 1;
- as[cnt].pins[seq] = w->nid;
- as[cnt].pincnt++;
- /* Association 15 is a multiple unassociated pins. */
- if (j == 15)
- cnt++;
- }
- if (j != 15 && as[cnt].pincnt > 0) {
- if (hpredir && as[cnt].pincnt > 1)
- as[cnt].hpredir = first;
- cnt++;
- }
- }
- HDA_BOOTVERBOSE(
- device_printf(sc->dev,
- "%d associations found:\n", max);
- for (i = 0; i < max; i++) {
- device_printf(sc->dev,
- "Association %d (%d) %s%s:\n",
- i, as[i].index, (as[i].dir == HDA_CTL_IN)?"in":"out",
- as[i].enable?"":" (disabled)");
- for (j = 0; j < 16; j++) {
- if (as[i].pins[j] == 0)
- continue;
- device_printf(sc->dev,
- " Pin nid=%d seq=%d\n",
- as[i].pins[j], j);
- }
- }
- );
-
- devinfo->function.audio.as = as;
-}
-
-static const struct {
- uint32_t model;
- uint32_t id;
- uint32_t set, unset;
-} hdac_quirks[] = {
- /*
- * XXX Force stereo quirk. Monoural recording / playback
- * on few codecs (especially ALC880) seems broken or
- * perhaps unsupported.
- */
- { HDA_MATCH_ALL, HDA_MATCH_ALL,
- HDA_QUIRK_FORCESTEREO | HDA_QUIRK_IVREF, 0 },
- { ACER_ALL_SUBVENDOR, HDA_MATCH_ALL,
- HDA_QUIRK_GPIO0, 0 },
- { ASUS_G2K_SUBVENDOR, HDA_CODEC_ALC660,
- HDA_QUIRK_GPIO0, 0 },
- { ASUS_M5200_SUBVENDOR, HDA_CODEC_ALC880,
- HDA_QUIRK_GPIO0, 0 },
- { ASUS_A7M_SUBVENDOR, HDA_CODEC_ALC880,
- HDA_QUIRK_GPIO0, 0 },
- { ASUS_A7T_SUBVENDOR, HDA_CODEC_ALC882,
- HDA_QUIRK_GPIO0, 0 },
- { ASUS_W2J_SUBVENDOR, HDA_CODEC_ALC882,
- HDA_QUIRK_GPIO0, 0 },
- { ASUS_U5F_SUBVENDOR, HDA_CODEC_AD1986A,
- HDA_QUIRK_EAPDINV, 0 },
- { ASUS_A8X_SUBVENDOR, HDA_CODEC_AD1986A,
- HDA_QUIRK_EAPDINV, 0 },
- { ASUS_F3JC_SUBVENDOR, HDA_CODEC_ALC861,
- HDA_QUIRK_OVREF, 0 },
- { UNIWILL_9075_SUBVENDOR, HDA_CODEC_ALC861,
- HDA_QUIRK_OVREF, 0 },
- /*{ ASUS_M2N_SUBVENDOR, HDA_CODEC_AD1988,
- HDA_QUIRK_IVREF80, HDA_QUIRK_IVREF50 | HDA_QUIRK_IVREF100 },*/
- { MEDION_MD95257_SUBVENDOR, HDA_CODEC_ALC880,
- HDA_QUIRK_GPIO1, 0 },
- { LENOVO_3KN100_SUBVENDOR, HDA_CODEC_AD1986A,
- HDA_QUIRK_EAPDINV | HDA_QUIRK_SENSEINV, 0 },
- { SAMSUNG_Q1_SUBVENDOR, HDA_CODEC_AD1986A,
- HDA_QUIRK_EAPDINV, 0 },
- { APPLE_MB3_SUBVENDOR, HDA_CODEC_ALC885,
- HDA_QUIRK_GPIO0 | HDA_QUIRK_OVREF50, 0},
- { APPLE_INTEL_MAC, HDA_CODEC_STAC9221,
- HDA_QUIRK_GPIO0 | HDA_QUIRK_GPIO1, 0 },
- { APPLE_MACBOOKPRO55, HDA_CODEC_CS4206,
- HDA_QUIRK_GPIO1 | HDA_QUIRK_GPIO3, 0 },
- { DELL_D630_SUBVENDOR, HDA_CODEC_STAC9205X,
- HDA_QUIRK_GPIO0, 0 },
- { DELL_V1400_SUBVENDOR, HDA_CODEC_STAC9228X,
- HDA_QUIRK_GPIO2, 0 },
- { DELL_V1500_SUBVENDOR, HDA_CODEC_STAC9205X,
- HDA_QUIRK_GPIO0, 0 },
- { HDA_MATCH_ALL, HDA_CODEC_AD1988,
- HDA_QUIRK_IVREF80, HDA_QUIRK_IVREF50 | HDA_QUIRK_IVREF100 },
- { HDA_MATCH_ALL, HDA_CODEC_AD1988B,
- HDA_QUIRK_IVREF80, HDA_QUIRK_IVREF50 | HDA_QUIRK_IVREF100 },
- { HDA_MATCH_ALL, HDA_CODEC_CX20549,
- 0, HDA_QUIRK_FORCESTEREO }
-};
-#define HDAC_QUIRKS_LEN (sizeof(hdac_quirks) / sizeof(hdac_quirks[0]))
-
-static void
-hdac_vendor_patch_parse(struct hdac_devinfo *devinfo)
-{
- struct hdac_widget *w;
- uint32_t id, subvendor;
- int i;
-
- id = hdac_codec_id(devinfo->codec);
- subvendor = devinfo->codec->sc->pci_subvendor;
-
- /*
- * Quirks
- */
- for (i = 0; i < HDAC_QUIRKS_LEN; i++) {
- if (!(HDA_DEV_MATCH(hdac_quirks[i].model, subvendor) &&
- HDA_DEV_MATCH(hdac_quirks[i].id, id)))
- continue;
- if (hdac_quirks[i].set != 0)
- devinfo->function.audio.quirks |=
- hdac_quirks[i].set;
- if (hdac_quirks[i].unset != 0)
- devinfo->function.audio.quirks &=
- ~(hdac_quirks[i].unset);
- }
-
- switch (id) {
- case HDA_CODEC_AD1983:
- /*
- * This codec has several possible usages, but none
- * fit the parser best. Help parser to choose better.
- */
- /* Disable direct unmixed playback to get pcm volume. */
- w = hdac_widget_get(devinfo, 5);
- if (w != NULL)
- w->connsenable[0] = 0;
- w = hdac_widget_get(devinfo, 6);
- if (w != NULL)
- w->connsenable[0] = 0;
- w = hdac_widget_get(devinfo, 11);
- if (w != NULL)
- w->connsenable[0] = 0;
- /* Disable mic and line selectors. */
- w = hdac_widget_get(devinfo, 12);
- if (w != NULL)
- w->connsenable[1] = 0;
- w = hdac_widget_get(devinfo, 13);
- if (w != NULL)
- w->connsenable[1] = 0;
- /* Disable recording from mono playback mix. */
- w = hdac_widget_get(devinfo, 20);
- if (w != NULL)
- w->connsenable[3] = 0;
- break;
- case HDA_CODEC_AD1986A:
- /*
- * This codec has overcomplicated input mixing.
- * Make some cleaning there.
- */
- /* Disable input mono mixer. Not needed and not supported. */
- w = hdac_widget_get(devinfo, 43);
- if (w != NULL)
- w->enable = 0;
- /* Disable any with any input mixing mesh. Use separately. */
- w = hdac_widget_get(devinfo, 39);
- if (w != NULL)
- w->enable = 0;
- w = hdac_widget_get(devinfo, 40);
- if (w != NULL)
- w->enable = 0;
- w = hdac_widget_get(devinfo, 41);
- if (w != NULL)
- w->enable = 0;
- w = hdac_widget_get(devinfo, 42);
- if (w != NULL)
- w->enable = 0;
- /* Disable duplicate mixer node connector. */
- w = hdac_widget_get(devinfo, 15);
- if (w != NULL)
- w->connsenable[3] = 0;
- /* There is only one mic preamplifier, use it effectively. */
- w = hdac_widget_get(devinfo, 31);
- if (w != NULL) {
- if ((w->wclass.pin.config &
- HDA_CONFIG_DEFAULTCONF_DEVICE_MASK) ==
- HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN) {
- w = hdac_widget_get(devinfo, 16);
- if (w != NULL)
- w->connsenable[2] = 0;
- } else {
- w = hdac_widget_get(devinfo, 15);
- if (w != NULL)
- w->connsenable[0] = 0;
- }
- }
- w = hdac_widget_get(devinfo, 32);
- if (w != NULL) {
- if ((w->wclass.pin.config &
- HDA_CONFIG_DEFAULTCONF_DEVICE_MASK) ==
- HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN) {
- w = hdac_widget_get(devinfo, 16);
- if (w != NULL)
- w->connsenable[0] = 0;
- } else {
- w = hdac_widget_get(devinfo, 15);
- if (w != NULL)
- w->connsenable[1] = 0;
- }
- }
-
- if (subvendor == ASUS_A8X_SUBVENDOR) {
- /*
- * This is just plain ridiculous.. There
- * are several A8 series that share the same
- * pci id but works differently (EAPD).
- */
- w = hdac_widget_get(devinfo, 26);
- if (w != NULL && w->type ==
- HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX &&
- (w->wclass.pin.config &
- HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK) !=
- HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_NONE)
- devinfo->function.audio.quirks &=
- ~HDA_QUIRK_EAPDINV;
- }
- break;
- case HDA_CODEC_AD1981HD:
- /*
- * This codec has very unusual design with several
- * points inappropriate for the present parser.
- */
- /* Disable recording from mono playback mix. */
- w = hdac_widget_get(devinfo, 21);
- if (w != NULL)
- w->connsenable[3] = 0;
- /* Disable rear to front mic mixer, use separately. */
- w = hdac_widget_get(devinfo, 31);
- if (w != NULL)
- w->enable = 0;
- /* Disable direct playback, use mixer. */
- w = hdac_widget_get(devinfo, 5);
- if (w != NULL)
- w->connsenable[0] = 0;
- w = hdac_widget_get(devinfo, 6);
- if (w != NULL)
- w->connsenable[0] = 0;
- w = hdac_widget_get(devinfo, 9);
- if (w != NULL)
- w->connsenable[0] = 0;
- w = hdac_widget_get(devinfo, 24);
- if (w != NULL)
- w->connsenable[0] = 0;
- break;
- case HDA_CODEC_CX20582:
- case HDA_CODEC_CX20583:
- case HDA_CODEC_CX20584:
- case HDA_CODEC_CX20585:
- case HDA_CODEC_CX20590:
- /*
- * These codecs have extra connectivity on record side
- * too reach for the present parser.
- */
- w = hdac_widget_get(devinfo, 20);
- if (w != NULL)
- w->connsenable[1] = 0;
- w = hdac_widget_get(devinfo, 21);
- if (w != NULL)
- w->connsenable[1] = 0;
- w = hdac_widget_get(devinfo, 22);
- if (w != NULL)
- w->connsenable[0] = 0;
- break;
- }
-}
-
-/*
- * Trace path from DAC to pin.
- */
-static nid_t
-hdac_audio_trace_dac(struct hdac_devinfo *devinfo, int as, int seq, nid_t nid,
- int dupseq, int min, int only, int depth)
+static int
+sysctl_hdac_pindump(SYSCTL_HANDLER_ARGS)
{
- struct hdac_widget *w;
- int i, im = -1;
- nid_t m = 0, ret;
-
- if (depth > HDA_PARSE_MAXDEPTH)
- return (0);
- w = hdac_widget_get(devinfo, nid);
- if (w == NULL || w->enable == 0)
- return (0);
- HDA_BOOTHVERBOSE(
- if (!only) {
- device_printf(devinfo->codec->sc->dev,
- " %*stracing via nid %d\n",
- depth + 1, "", w->nid);
- }
- );
- /* Use only unused widgets */
- if (w->bindas >= 0 && w->bindas != as) {
- HDA_BOOTHVERBOSE(
- if (!only) {
- device_printf(devinfo->codec->sc->dev,
- " %*snid %d busy by association %d\n",
- depth + 1, "", w->nid, w->bindas);
- }
- );
- return (0);
- }
- if (dupseq < 0) {
- if (w->bindseqmask != 0) {
- HDA_BOOTHVERBOSE(
- if (!only) {
- device_printf(devinfo->codec->sc->dev,
- " %*snid %d busy by seqmask %x\n",
- depth + 1, "", w->nid, w->bindseqmask);
- }
- );
- return (0);
- }
- } else {
- /* If this is headphones - allow duplicate first pin. */
- if (w->bindseqmask != 0 &&
- (w->bindseqmask & (1 << dupseq)) == 0) {
- HDA_BOOTHVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- " %*snid %d busy by seqmask %x\n",
- depth + 1, "", w->nid, w->bindseqmask);
- );
- return (0);
- }
- }
-
- switch (w->type) {
- case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT:
- /* Do not traverse input. AD1988 has digital monitor
- for which we are not ready. */
- break;
- case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_OUTPUT:
- /* If we are tracing HP take only dac of first pin. */
- if ((only == 0 || only == w->nid) &&
- (w->nid >= min) && (dupseq < 0 || w->nid ==
- devinfo->function.audio.as[as].dacs[dupseq]))
- m = w->nid;
- break;
- case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX:
- if (depth > 0)
- break;
- /* Fall */
- default:
- /* Find reachable DACs with smallest nid respecting constraints. */
- for (i = 0; i < w->nconns; i++) {
- if (w->connsenable[i] == 0)
- continue;
- if (w->selconn != -1 && w->selconn != i)
- continue;
- if ((ret = hdac_audio_trace_dac(devinfo, as, seq,
- w->conns[i], dupseq, min, only, depth + 1)) != 0) {
- if (m == 0 || ret < m) {
- m = ret;
- im = i;
- }
- if (only || dupseq >= 0)
- break;
- }
- }
- if (m && only && ((w->nconns > 1 &&
- w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER) ||
- w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_SELECTOR))
- w->selconn = im;
- break;
- }
- if (m && only) {
- w->bindas = as;
- w->bindseqmask |= (1 << seq);
- }
- HDA_BOOTHVERBOSE(
- if (!only) {
- device_printf(devinfo->codec->sc->dev,
- " %*snid %d returned %d\n",
- depth + 1, "", w->nid, m);
- }
- );
- return (m);
-}
+ struct hdac_softc *sc;
+ device_t *devlist;
+ device_t dev;
+ int devcount, i, err, val;
-/*
- * Trace path from widget to ADC.
- */
-static nid_t
-hdac_audio_trace_adc(struct hdac_devinfo *devinfo, int as, int seq, nid_t nid,
- int only, int depth)
-{
- struct hdac_widget *w, *wc;
- int i, j;
- nid_t res = 0;
+ dev = oidp->oid_arg1;
+ sc = device_get_softc(dev);
+ if (sc == NULL)
+ return (EINVAL);
+ val = 0;
+ err = sysctl_handle_int(oidp, &val, 0, req);
+ if (err != 0 || req->newptr == NULL || val == 0)
+ return (err);
- if (depth > HDA_PARSE_MAXDEPTH)
- return (0);
- w = hdac_widget_get(devinfo, nid);
- if (w == NULL || w->enable == 0)
+ /* XXX: Temporary. For debugging. */
+ if (val == 100) {
+ hdac_suspend(dev);
return (0);
- HDA_BOOTHVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- " %*stracing via nid %d\n",
- depth + 1, "", w->nid);
- );
- /* Use only unused widgets */
- if (w->bindas >= 0 && w->bindas != as) {
- HDA_BOOTHVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- " %*snid %d busy by association %d\n",
- depth + 1, "", w->nid, w->bindas);
- );
+ } else if (val == 101) {
+ hdac_resume(dev);
return (0);
}
-
- switch (w->type) {
- case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT:
- /* If we are tracing HP take only dac of first pin. */
- if (only == w->nid)
- res = 1;
- break;
- case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX:
- if (depth > 0)
- break;
- /* Fall */
- default:
- /* Try to find reachable ADCs with specified nid. */
- for (j = devinfo->startnode; j < devinfo->endnode; j++) {
- wc = hdac_widget_get(devinfo, j);
- if (wc == NULL || wc->enable == 0)
- continue;
- for (i = 0; i < wc->nconns; i++) {
- if (wc->connsenable[i] == 0)
- continue;
- if (wc->conns[i] != nid)
- continue;
- if (hdac_audio_trace_adc(devinfo, as, seq,
- j, only, depth + 1) != 0) {
- res = 1;
- if (((wc->nconns > 1 &&
- wc->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER) ||
- wc->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_SELECTOR) &&
- wc->selconn == -1)
- wc->selconn = i;
- }
- }
- }
- break;
- }
- if (res) {
- w->bindas = as;
- w->bindseqmask |= (1 << seq);
- }
- HDA_BOOTHVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- " %*snid %d returned %d\n",
- depth + 1, "", w->nid, res);
- );
- return (res);
-}
-
-/*
- * Erase trace path of the specified association.
- */
-static void
-hdac_audio_undo_trace(struct hdac_devinfo *devinfo, int as, int seq)
-{
- struct hdac_widget *w;
- int i;
-
- for (i = devinfo->startnode; i < devinfo->endnode; i++) {
- w = hdac_widget_get(devinfo, i);
- if (w == NULL || w->enable == 0)
- continue;
- if (w->bindas == as) {
- if (seq >= 0) {
- w->bindseqmask &= ~(1 << seq);
- if (w->bindseqmask == 0) {
- w->bindas = -1;
- w->selconn = -1;
- }
- } else {
- w->bindas = -1;
- w->bindseqmask = 0;
- w->selconn = -1;
- }
- }
- }
-}
-
-/*
- * Trace association path from DAC to output
- */
-static int
-hdac_audio_trace_as_out(struct hdac_devinfo *devinfo, int as, int seq)
-{
- struct hdac_audio_as *ases = devinfo->function.audio.as;
- int i, hpredir;
- nid_t min, res;
-
- /* Find next pin */
- for (i = seq; i < 16 && ases[as].pins[i] == 0; i++)
- ;
- /* Check if there is no any left. If so - we succeeded. */
- if (i == 16)
- return (1);
-
- hpredir = (i == 15 && ases[as].fakeredir == 0)?ases[as].hpredir:-1;
- min = 0;
- res = 0;
- do {
- HDA_BOOTHVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- " Tracing pin %d with min nid %d",
- ases[as].pins[i], min);
- if (hpredir >= 0)
- printf(" and hpredir %d", hpredir);
- printf("\n");
- );
- /* Trace this pin taking min nid into account. */
- res = hdac_audio_trace_dac(devinfo, as, i,
- ases[as].pins[i], hpredir, min, 0, 0);
- if (res == 0) {
- /* If we failed - return to previous and redo it. */
- HDA_BOOTVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- " Unable to trace pin %d seq %d with min "
- "nid %d",
- ases[as].pins[i], i, min);
- if (hpredir >= 0)
- printf(" and hpredir %d", hpredir);
- printf("\n");
- );
- return (0);
- }
- HDA_BOOTVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- " Pin %d traced to DAC %d",
- ases[as].pins[i], res);
- if (hpredir >= 0)
- printf(" and hpredir %d", hpredir);
- if (ases[as].fakeredir)
- printf(" with fake redirection");
- printf("\n");
- );
- /* Trace again to mark the path */
- hdac_audio_trace_dac(devinfo, as, i,
- ases[as].pins[i], hpredir, min, res, 0);
- ases[as].dacs[i] = res;
- /* We succeeded, so call next. */
- if (hdac_audio_trace_as_out(devinfo, as, i + 1))
- return (1);
- /* If next failed, we should retry with next min */
- hdac_audio_undo_trace(devinfo, as, i);
- ases[as].dacs[i] = 0;
- min = res + 1;
- } while (1);
-}
-
-/*
- * Trace association path from input to ADC
- */
-static int
-hdac_audio_trace_as_in(struct hdac_devinfo *devinfo, int as)
-{
- struct hdac_audio_as *ases = devinfo->function.audio.as;
- struct hdac_widget *w;
- int i, j, k;
-
- for (j = devinfo->startnode; j < devinfo->endnode; j++) {
- w = hdac_widget_get(devinfo, j);
- if (w == NULL || w->enable == 0)
- continue;
- if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT)
- continue;
- if (w->bindas >= 0 && w->bindas != as)
- continue;
- /* Find next pin */
- for (i = 0; i < 16; i++) {
- if (ases[as].pins[i] == 0)
- continue;
-
- HDA_BOOTHVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- " Tracing pin %d to ADC %d\n",
- ases[as].pins[i], j);
- );
- /* Trace this pin taking goal into account. */
- if (hdac_audio_trace_adc(devinfo, as, i,
- ases[as].pins[i], j, 0) == 0) {
- /* If we failed - return to previous and redo it. */
- HDA_BOOTVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- " Unable to trace pin %d to ADC %d, undo traces\n",
- ases[as].pins[i], j);
- );
- hdac_audio_undo_trace(devinfo, as, -1);
- for (k = 0; k < 16; k++)
- ases[as].dacs[k] = 0;
- break;
- }
- HDA_BOOTVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- " Pin %d traced to ADC %d\n",
- ases[as].pins[i], j);
- );
- ases[as].dacs[i] = j;
- }
- if (i == 16)
- return (1);
- }
+ if ((err = device_get_children(dev, &devlist, &devcount)) != 0)
+ return (err);
+ hdac_lock(sc);
+ for (i = 0; i < devcount; i++)
+ HDAC_PINDUMP(devlist[i]);
+ hdac_unlock(sc);
+ free(devlist, M_TEMP);
return (0);
}
-/*
- * Trace input monitor path from mixer to output association.
- */
static int
-hdac_audio_trace_to_out(struct hdac_devinfo *devinfo, nid_t nid, int depth)
-{
- struct hdac_audio_as *ases = devinfo->function.audio.as;
- struct hdac_widget *w, *wc;
- int i, j;
- nid_t res = 0;
-
- if (depth > HDA_PARSE_MAXDEPTH)
- return (0);
- w = hdac_widget_get(devinfo, nid);
- if (w == NULL || w->enable == 0)
- return (0);
- HDA_BOOTHVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- " %*stracing via nid %d\n",
- depth + 1, "", w->nid);
- );
- /* Use only unused widgets */
- if (depth > 0 && w->bindas != -1) {
- if (w->bindas < 0 || ases[w->bindas].dir == HDA_CTL_OUT) {
- HDA_BOOTHVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- " %*snid %d found output association %d\n",
- depth + 1, "", w->nid, w->bindas);
- );
- if (w->bindas >= 0)
- w->pflags |= HDA_ADC_MONITOR;
- return (1);
- } else {
- HDA_BOOTHVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- " %*snid %d busy by input association %d\n",
- depth + 1, "", w->nid, w->bindas);
- );
- return (0);
- }
- }
-
- switch (w->type) {
- case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT:
- /* Do not traverse input. AD1988 has digital monitor
- for which we are not ready. */
- break;
- case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX:
- if (depth > 0)
- break;
- /* Fall */
- default:
- /* Try to find reachable ADCs with specified nid. */
- for (j = devinfo->startnode; j < devinfo->endnode; j++) {
- wc = hdac_widget_get(devinfo, j);
- if (wc == NULL || wc->enable == 0)
- continue;
- for (i = 0; i < wc->nconns; i++) {
- if (wc->connsenable[i] == 0)
- continue;
- if (wc->conns[i] != nid)
- continue;
- if (hdac_audio_trace_to_out(devinfo,
- j, depth + 1) != 0) {
- res = 1;
- if (wc->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_SELECTOR &&
- wc->selconn == -1)
- wc->selconn = i;
- }
- }
- }
- break;
- }
- if (res && w->bindas == -1)
- w->bindas = -2;
-
- HDA_BOOTHVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- " %*snid %d returned %d\n",
- depth + 1, "", w->nid, res);
- );
- return (res);
-}
-
-/*
- * Trace extra associations (beeper, monitor)
- */
-static void
-hdac_audio_trace_as_extra(struct hdac_devinfo *devinfo)
-{
- struct hdac_audio_as *as = devinfo->function.audio.as;
- struct hdac_widget *w;
- int j;
-
- /* Input monitor */
- /* Find mixer associated with input, but supplying signal
- for output associations. Hope it will be input monitor. */
- HDA_BOOTVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- "Tracing input monitor\n");
- );
- for (j = devinfo->startnode; j < devinfo->endnode; j++) {
- w = hdac_widget_get(devinfo, j);
- if (w == NULL || w->enable == 0)
- continue;
- if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER)
- continue;
- if (w->bindas < 0 || as[w->bindas].dir != HDA_CTL_IN)
- continue;
- HDA_BOOTVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- " Tracing nid %d to out\n",
- j);
- );
- if (hdac_audio_trace_to_out(devinfo, w->nid, 0)) {
- HDA_BOOTVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- " nid %d is input monitor\n",
- w->nid);
- );
- w->ossdev = SOUND_MIXER_IMIX;
- }
- }
-
- /* Other inputs monitor */
- /* Find input pins supplying signal for output associations.
- Hope it will be input monitoring. */
- HDA_BOOTVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- "Tracing other input monitors\n");
- );
- for (j = devinfo->startnode; j < devinfo->endnode; j++) {
- w = hdac_widget_get(devinfo, j);
- if (w == NULL || w->enable == 0)
- continue;
- if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
- continue;
- if (w->bindas < 0 || as[w->bindas].dir != HDA_CTL_IN)
- continue;
- HDA_BOOTVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- " Tracing nid %d to out\n",
- j);
- );
- if (hdac_audio_trace_to_out(devinfo, w->nid, 0)) {
- HDA_BOOTVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- " nid %d is input monitor\n",
- w->nid);
- );
- }
- }
-
- /* Beeper */
- HDA_BOOTVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- "Tracing beeper\n");
- );
- for (j = devinfo->startnode; j < devinfo->endnode; j++) {
- w = hdac_widget_get(devinfo, j);
- if (w == NULL || w->enable == 0)
- continue;
- if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_BEEP_WIDGET)
- continue;
- HDA_BOOTHVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- " Tracing nid %d to out\n",
- j);
- );
- if (hdac_audio_trace_to_out(devinfo, w->nid, 0)) {
- HDA_BOOTVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- " nid %d traced to out\n",
- j);
- );
- }
- w->bindas = -2;
- }
-}
-
-/*
- * Bind assotiations to PCM channels
- */
-static void
-hdac_audio_bind_as(struct hdac_devinfo *devinfo)
-{
- struct hdac_softc *sc = devinfo->codec->sc;
- struct hdac_audio_as *as = devinfo->function.audio.as;
- int j, cnt = 0, free;
-
- for (j = 0; j < devinfo->function.audio.ascnt; j++) {
- if (as[j].enable)
- cnt++;
- }
- if (sc->num_chans == 0) {
- sc->chans = (struct hdac_chan *)malloc(
- sizeof(struct hdac_chan) * cnt,
- M_HDAC, M_ZERO | M_NOWAIT);
- if (sc->chans == NULL) {
- device_printf(sc->dev,
- "Channels memory allocation failed!\n");
- return;
- }
- } else {
- sc->chans = (struct hdac_chan *)realloc(sc->chans,
- sizeof(struct hdac_chan) * (sc->num_chans + cnt),
- M_HDAC, M_ZERO | M_NOWAIT);
- if (sc->chans == NULL) {
- sc->num_chans = 0;
- device_printf(sc->dev,
- "Channels memory allocation failed!\n");
- return;
- }
- /* Fixup relative pointers after realloc */
- for (j = 0; j < sc->num_chans; j++)
- sc->chans[j].caps.fmtlist = sc->chans[j].fmtlist;
- }
- free = sc->num_chans;
- sc->num_chans += cnt;
-
- for (j = free; j < free + cnt; j++) {
- sc->chans[j].devinfo = devinfo;
- sc->chans[j].as = -1;
- }
-
- /* Assign associations in order of their numbers, */
- for (j = 0; j < devinfo->function.audio.ascnt; j++) {
- if (as[j].enable == 0)
- continue;
-
- as[j].chan = free;
- sc->chans[free].as = j;
- sc->chans[free].dir =
- (as[j].dir == HDA_CTL_IN) ? PCMDIR_REC : PCMDIR_PLAY;
- hdac_pcmchannel_setup(&sc->chans[free]);
- free++;
- }
-}
-
-static void
-hdac_audio_disable_nonaudio(struct hdac_devinfo *devinfo)
-{
- struct hdac_widget *w;
- int i;
-
- /* Disable power and volume widgets. */
- for (i = devinfo->startnode; i < devinfo->endnode; i++) {
- w = hdac_widget_get(devinfo, i);
- if (w == NULL || w->enable == 0)
- continue;
- if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_POWER_WIDGET ||
- w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_VOLUME_WIDGET) {
- w->enable = 0;
- HDA_BOOTHVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- " Disabling nid %d due to it's"
- " non-audio type.\n",
- w->nid);
- );
- }
- }
-}
-
-static void
-hdac_audio_disable_useless(struct hdac_devinfo *devinfo)
-{
- struct hdac_widget *w, *cw;
- struct hdac_audio_ctl *ctl;
- int done, found, i, j, k;
-
- /* Disable useless pins. */
- for (i = devinfo->startnode; i < devinfo->endnode; i++) {
- w = hdac_widget_get(devinfo, i);
- if (w == NULL || w->enable == 0)
- continue;
- if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) {
- if ((w->wclass.pin.config &
- HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK) ==
- HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_NONE) {
- w->enable = 0;
- HDA_BOOTHVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- " Disabling pin nid %d due"
- " to None connectivity.\n",
- w->nid);
- );
- } else if ((w->wclass.pin.config &
- HDA_CONFIG_DEFAULTCONF_ASSOCIATION_MASK) == 0) {
- w->enable = 0;
- HDA_BOOTHVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- " Disabling unassociated"
- " pin nid %d.\n",
- w->nid);
- );
- }
- }
- }
- do {
- done = 1;
- /* Disable and mute controls for disabled widgets. */
- i = 0;
- while ((ctl = hdac_audio_ctl_each(devinfo, &i)) != NULL) {
- if (ctl->enable == 0)
- continue;
- if (ctl->widget->enable == 0 ||
- (ctl->childwidget != NULL &&
- ctl->childwidget->enable == 0)) {
- ctl->forcemute = 1;
- ctl->muted = HDA_AMP_MUTE_ALL;
- ctl->left = 0;
- ctl->right = 0;
- ctl->enable = 0;
- if (ctl->ndir == HDA_CTL_IN)
- ctl->widget->connsenable[ctl->index] = 0;
- done = 0;
- HDA_BOOTHVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- " Disabling ctl %d nid %d cnid %d due"
- " to disabled widget.\n", i,
- ctl->widget->nid,
- (ctl->childwidget != NULL)?
- ctl->childwidget->nid:-1);
- );
- }
- }
- /* Disable useless widgets. */
- for (i = devinfo->startnode; i < devinfo->endnode; i++) {
- w = hdac_widget_get(devinfo, i);
- if (w == NULL || w->enable == 0)
- continue;
- /* Disable inputs with disabled child widgets. */
- for (j = 0; j < w->nconns; j++) {
- if (w->connsenable[j]) {
- cw = hdac_widget_get(devinfo, w->conns[j]);
- if (cw == NULL || cw->enable == 0) {
- w->connsenable[j] = 0;
- HDA_BOOTHVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- " Disabling nid %d connection %d due"
- " to disabled child widget.\n",
- i, j);
- );
- }
- }
- }
- if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_SELECTOR &&
- w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER)
- continue;
- /* Disable mixers and selectors without inputs. */
- found = 0;
- for (j = 0; j < w->nconns; j++) {
- if (w->connsenable[j]) {
- found = 1;
- break;
- }
- }
- if (found == 0) {
- w->enable = 0;
- done = 0;
- HDA_BOOTHVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- " Disabling nid %d due to all it's"
- " inputs disabled.\n", w->nid);
- );
- }
- /* Disable nodes without consumers. */
- if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_SELECTOR &&
- w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER)
- continue;
- found = 0;
- for (k = devinfo->startnode; k < devinfo->endnode; k++) {
- cw = hdac_widget_get(devinfo, k);
- if (cw == NULL || cw->enable == 0)
- continue;
- for (j = 0; j < cw->nconns; j++) {
- if (cw->connsenable[j] && cw->conns[j] == i) {
- found = 1;
- break;
- }
- }
- }
- if (found == 0) {
- w->enable = 0;
- done = 0;
- HDA_BOOTHVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- " Disabling nid %d due to all it's"
- " consumers disabled.\n", w->nid);
- );
- }
- }
- } while (done == 0);
-
-}
-
-static void
-hdac_audio_disable_unas(struct hdac_devinfo *devinfo)
-{
- struct hdac_audio_as *as = devinfo->function.audio.as;
- struct hdac_widget *w, *cw;
- struct hdac_audio_ctl *ctl;
- int i, j, k;
-
- /* Disable unassosiated widgets. */
- for (i = devinfo->startnode; i < devinfo->endnode; i++) {
- w = hdac_widget_get(devinfo, i);
- if (w == NULL || w->enable == 0)
- continue;
- if (w->bindas == -1) {
- w->enable = 0;
- HDA_BOOTHVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- " Disabling unassociated nid %d.\n",
- w->nid);
- );
- }
- }
- /* Disable input connections on input pin and
- * output on output. */
- for (i = devinfo->startnode; i < devinfo->endnode; i++) {
- w = hdac_widget_get(devinfo, i);
- if (w == NULL || w->enable == 0)
- continue;
- if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
- continue;
- if (w->bindas < 0)
- continue;
- if (as[w->bindas].dir == HDA_CTL_IN) {
- for (j = 0; j < w->nconns; j++) {
- if (w->connsenable[j] == 0)
- continue;
- w->connsenable[j] = 0;
- HDA_BOOTHVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- " Disabling connection to input pin "
- "nid %d conn %d.\n",
- i, j);
- );
- }
- ctl = hdac_audio_ctl_amp_get(devinfo, w->nid,
- HDA_CTL_IN, -1, 1);
- if (ctl && ctl->enable) {
- ctl->forcemute = 1;
- ctl->muted = HDA_AMP_MUTE_ALL;
- ctl->left = 0;
- ctl->right = 0;
- ctl->enable = 0;
- }
- } else {
- ctl = hdac_audio_ctl_amp_get(devinfo, w->nid,
- HDA_CTL_OUT, -1, 1);
- if (ctl && ctl->enable) {
- ctl->forcemute = 1;
- ctl->muted = HDA_AMP_MUTE_ALL;
- ctl->left = 0;
- ctl->right = 0;
- ctl->enable = 0;
- }
- for (k = devinfo->startnode; k < devinfo->endnode; k++) {
- cw = hdac_widget_get(devinfo, k);
- if (cw == NULL || cw->enable == 0)
- continue;
- for (j = 0; j < cw->nconns; j++) {
- if (cw->connsenable[j] && cw->conns[j] == i) {
- cw->connsenable[j] = 0;
- HDA_BOOTHVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- " Disabling connection from output pin "
- "nid %d conn %d cnid %d.\n",
- k, j, i);
- );
- if (cw->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX &&
- cw->nconns > 1)
- continue;
- ctl = hdac_audio_ctl_amp_get(devinfo, k,
- HDA_CTL_IN, j, 1);
- if (ctl && ctl->enable) {
- ctl->forcemute = 1;
- ctl->muted = HDA_AMP_MUTE_ALL;
- ctl->left = 0;
- ctl->right = 0;
- ctl->enable = 0;
- }
- }
- }
- }
- }
- }
-}
-
-static void
-hdac_audio_disable_notselected(struct hdac_devinfo *devinfo)
-{
- struct hdac_audio_as *as = devinfo->function.audio.as;
- struct hdac_widget *w;
- int i, j;
-
- /* On playback path we can safely disable all unseleted inputs. */
- for (i = devinfo->startnode; i < devinfo->endnode; i++) {
- w = hdac_widget_get(devinfo, i);
- if (w == NULL || w->enable == 0)
- continue;
- if (w->nconns <= 1)
- continue;
- if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER)
- continue;
- if (w->bindas < 0 || as[w->bindas].dir == HDA_CTL_IN)
- continue;
- for (j = 0; j < w->nconns; j++) {
- if (w->connsenable[j] == 0)
- continue;
- if (w->selconn < 0 || w->selconn == j)
- continue;
- w->connsenable[j] = 0;
- HDA_BOOTHVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- " Disabling unselected connection "
- "nid %d conn %d.\n",
- i, j);
- );
- }
- }
-}
-
-static void
-hdac_audio_disable_crossas(struct hdac_devinfo *devinfo)
+hdac_mdata_rate(uint16_t fmt)
{
- struct hdac_audio_as *ases = devinfo->function.audio.as;
- struct hdac_widget *w, *cw;
- struct hdac_audio_ctl *ctl;
- int i, j;
-
- /* Disable crossassociatement and unwanted crosschannel connections. */
- /* ... using selectors */
- for (i = devinfo->startnode; i < devinfo->endnode; i++) {
- w = hdac_widget_get(devinfo, i);
- if (w == NULL || w->enable == 0)
- continue;
- if (w->nconns <= 1)
- continue;
- if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER)
- continue;
- if (w->bindas == -2)
- continue;
- for (j = 0; j < w->nconns; j++) {
- if (w->connsenable[j] == 0)
- continue;
- cw = hdac_widget_get(devinfo, w->conns[j]);
- if (cw == NULL || w->enable == 0)
- continue;
- if (cw->bindas == -2 ||
- ((w->pflags & HDA_ADC_MONITOR) &&
- cw->bindas >= 0 &&
- ases[cw->bindas].dir == HDA_CTL_IN))
- continue;
- if (w->bindas == cw->bindas &&
- (w->bindseqmask & cw->bindseqmask) != 0)
- continue;
- w->connsenable[j] = 0;
- HDA_BOOTHVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- " Disabling crossassociatement connection "
- "nid %d conn %d cnid %d.\n",
- i, j, cw->nid);
- );
- }
- }
- /* ... using controls */
- i = 0;
- while ((ctl = hdac_audio_ctl_each(devinfo, &i)) != NULL) {
- if (ctl->enable == 0 || ctl->childwidget == NULL)
- continue;
- if (ctl->widget->bindas == -2)
- continue;
- if (ctl->childwidget->bindas == -2 ||
- ((ctl->widget->pflags & HDA_ADC_MONITOR) &&
- ctl->childwidget->bindas >= 0 &&
- ases[ctl->childwidget->bindas].dir == HDA_CTL_IN))
- continue;
- if (ctl->widget->bindas != ctl->childwidget->bindas ||
- (ctl->widget->bindseqmask & ctl->childwidget->bindseqmask) == 0) {
- ctl->forcemute = 1;
- ctl->muted = HDA_AMP_MUTE_ALL;
- ctl->left = 0;
- ctl->right = 0;
- ctl->enable = 0;
- if (ctl->ndir == HDA_CTL_IN)
- ctl->widget->connsenable[ctl->index] = 0;
- HDA_BOOTHVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- " Disabling crossassociatement connection "
- "ctl %d nid %d cnid %d.\n", i,
- ctl->widget->nid,
- ctl->childwidget->nid);
- );
- }
- }
+ static const int mbits[8] = { 8, 16, 32, 32, 32, 32, 32, 32 };
+ int rate, bits;
+ if (fmt & (1 << 14))
+ rate = 44100;
+ else
+ rate = 48000;
+ rate *= ((fmt >> 11) & 0x07) + 1;
+ rate /= ((fmt >> 8) & 0x07) + 1;
+ bits = mbits[(fmt >> 4) & 0x03];
+ bits *= (fmt & 0x0f) + 1;
+ return (rate * bits);
}
-#define HDA_CTL_GIVE(ctl) ((ctl)->step?1:0)
-
-/*
- * Find controls to control amplification for source.
- */
static int
-hdac_audio_ctl_source_amp(struct hdac_devinfo *devinfo, nid_t nid, int index,
- int ossdev, int ctlable, int depth, int need)
+hdac_bdata_rate(uint16_t fmt, int output)
{
- struct hdac_widget *w, *wc;
- struct hdac_audio_ctl *ctl;
- int i, j, conns = 0, rneed;
-
- if (depth > HDA_PARSE_MAXDEPTH)
- return (need);
-
- w = hdac_widget_get(devinfo, nid);
- if (w == NULL || w->enable == 0)
- return (need);
-
- /* Count number of active inputs. */
- if (depth > 0) {
- for (j = 0; j < w->nconns; j++) {
- if (w->connsenable[j])
- conns++;
- }
- }
+ static const int bbits[8] = { 8, 16, 20, 24, 32, 32, 32, 32 };
+ int rate, bits;
- /* If this is not a first step - use input mixer.
- Pins have common input ctl so care must be taken. */
- if (depth > 0 && ctlable && (conns == 1 ||
- w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)) {
- ctl = hdac_audio_ctl_amp_get(devinfo, w->nid, HDA_CTL_IN,
- index, 1);
- if (ctl) {
- if (HDA_CTL_GIVE(ctl) & need)
- ctl->ossmask |= (1 << ossdev);
- else
- ctl->possmask |= (1 << ossdev);
- need &= ~HDA_CTL_GIVE(ctl);
- }
- }
-
- /* If widget has own ossdev - not traverse it.
- It will be traversed on it's own. */
- if (w->ossdev >= 0 && depth > 0)
- return (need);
-
- /* We must not traverse pin */
- if ((w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT ||
- w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) &&
- depth > 0)
- return (need);
-
- /* record that this widget exports such signal, */
- w->ossmask |= (1 << ossdev);
-
- /* If signals mixed, we can't assign controls farther.
- * Ignore this on depth zero. Caller must knows why.
- * Ignore this for static selectors if this input selected.
- */
- if (conns > 1)
- ctlable = 0;
-
- if (ctlable) {
- ctl = hdac_audio_ctl_amp_get(devinfo, w->nid, HDA_CTL_OUT, -1, 1);
- if (ctl) {
- if (HDA_CTL_GIVE(ctl) & need)
- ctl->ossmask |= (1 << ossdev);
- else
- ctl->possmask |= (1 << ossdev);
- need &= ~HDA_CTL_GIVE(ctl);
- }
- }
-
- rneed = 0;
- for (i = devinfo->startnode; i < devinfo->endnode; i++) {
- wc = hdac_widget_get(devinfo, i);
- if (wc == NULL || wc->enable == 0)
- continue;
- for (j = 0; j < wc->nconns; j++) {
- if (wc->connsenable[j] && wc->conns[j] == nid) {
- rneed |= hdac_audio_ctl_source_amp(devinfo,
- wc->nid, j, ossdev, ctlable, depth + 1, need);
- }
- }
- }
- rneed &= need;
-
- return (rneed);
+ rate = 48000;
+ rate *= ((fmt >> 11) & 0x07) + 1;
+ bits = bbits[(fmt >> 4) & 0x03];
+ bits *= (fmt & 0x0f) + 1;
+ if (!output)
+ bits = ((bits + 7) & ~0x07) + 10;
+ return (rate * bits);
}
-/*
- * Find controls to control amplification for destination.
- */
static void
-hdac_audio_ctl_dest_amp(struct hdac_devinfo *devinfo, nid_t nid, int index,
- int ossdev, int depth, int need)
+hdac_poll_reinit(struct hdac_softc *sc)
{
- struct hdac_audio_as *as = devinfo->function.audio.as;
- struct hdac_widget *w, *wc;
- struct hdac_audio_ctl *ctl;
- int i, j, consumers;
-
- if (depth > HDA_PARSE_MAXDEPTH)
- return;
-
- w = hdac_widget_get(devinfo, nid);
- if (w == NULL || w->enable == 0)
- return;
-
- if (depth > 0) {
- /* If this node produce output for several consumers,
- we can't touch it. */
- consumers = 0;
- for (i = devinfo->startnode; i < devinfo->endnode; i++) {
- wc = hdac_widget_get(devinfo, i);
- if (wc == NULL || wc->enable == 0)
- continue;
- for (j = 0; j < wc->nconns; j++) {
- if (wc->connsenable[j] && wc->conns[j] == nid)
- consumers++;
- }
- }
- /* The only exception is if real HP redirection is configured
- and this is a duplication point.
- XXX: Actually exception is not completely correct.
- XXX: Duplication point check is not perfect. */
- if ((consumers == 2 && (w->bindas < 0 ||
- as[w->bindas].hpredir < 0 || as[w->bindas].fakeredir ||
- (w->bindseqmask & (1 << 15)) == 0)) ||
- consumers > 2)
- return;
+ int i, pollticks, min = 1000000;
+ struct hdac_stream *s;
- /* Else use it's output mixer. */
- ctl = hdac_audio_ctl_amp_get(devinfo, w->nid,
- HDA_CTL_OUT, -1, 1);
- if (ctl) {
- if (HDA_CTL_GIVE(ctl) & need)
- ctl->ossmask |= (1 << ossdev);
- else
- ctl->possmask |= (1 << ossdev);
- need &= ~HDA_CTL_GIVE(ctl);
- }
- }
-
- /* We must not traverse pin */
- if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX &&
- depth > 0)
+ if (sc->polling == 0)
return;
-
- for (i = 0; i < w->nconns; i++) {
- int tneed = need;
- if (w->connsenable[i] == 0)
- continue;
- if (index >= 0 && i != index)
- continue;
- ctl = hdac_audio_ctl_amp_get(devinfo, w->nid,
- HDA_CTL_IN, i, 1);
- if (ctl) {
- if (HDA_CTL_GIVE(ctl) & tneed)
- ctl->ossmask |= (1 << ossdev);
- else
- ctl->possmask |= (1 << ossdev);
- tneed &= ~HDA_CTL_GIVE(ctl);
- }
- hdac_audio_ctl_dest_amp(devinfo, w->conns[i], -1, ossdev,
- depth + 1, tneed);
- }
-}
-
-/*
- * Assign OSS names to sound sources
- */
-static void
-hdac_audio_assign_names(struct hdac_devinfo *devinfo)
-{
- struct hdac_audio_as *as = devinfo->function.audio.as;
- struct hdac_widget *w;
- int i, j;
- int type = -1, use, used = 0;
- static const int types[7][13] = {
- { SOUND_MIXER_LINE, SOUND_MIXER_LINE1, SOUND_MIXER_LINE2,
- SOUND_MIXER_LINE3, -1 }, /* line */
- { SOUND_MIXER_MONITOR, SOUND_MIXER_MIC, -1 }, /* int mic */
- { SOUND_MIXER_MIC, SOUND_MIXER_MONITOR, -1 }, /* ext mic */
- { SOUND_MIXER_CD, -1 }, /* cd */
- { SOUND_MIXER_SPEAKER, -1 }, /* speaker */
- { SOUND_MIXER_DIGITAL1, SOUND_MIXER_DIGITAL2, SOUND_MIXER_DIGITAL3,
- -1 }, /* digital */
- { SOUND_MIXER_LINE, SOUND_MIXER_LINE1, SOUND_MIXER_LINE2,
- SOUND_MIXER_LINE3, SOUND_MIXER_PHONEIN, SOUND_MIXER_PHONEOUT,
- SOUND_MIXER_VIDEO, SOUND_MIXER_RADIO, SOUND_MIXER_DIGITAL1,
- SOUND_MIXER_DIGITAL2, SOUND_MIXER_DIGITAL3, SOUND_MIXER_MONITOR,
- -1 } /* others */
- };
-
- /* Surely known names */
- for (i = devinfo->startnode; i < devinfo->endnode; i++) {
- w = hdac_widget_get(devinfo, i);
- if (w == NULL || w->enable == 0)
- continue;
- if (w->bindas == -1)
- continue;
- use = -1;
- switch (w->type) {
- case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX:
- if (as[w->bindas].dir == HDA_CTL_OUT)
- break;
- type = -1;
- switch (w->wclass.pin.config & HDA_CONFIG_DEFAULTCONF_DEVICE_MASK) {
- case HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN:
- type = 0;
- break;
- case HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN:
- if ((w->wclass.pin.config & HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK)
- == HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_JACK)
- break;
- type = 1;
- break;
- case HDA_CONFIG_DEFAULTCONF_DEVICE_CD:
- type = 3;
- break;
- case HDA_CONFIG_DEFAULTCONF_DEVICE_SPEAKER:
- type = 4;
- break;
- case HDA_CONFIG_DEFAULTCONF_DEVICE_SPDIF_IN:
- case HDA_CONFIG_DEFAULTCONF_DEVICE_DIGITAL_OTHER_IN:
- type = 5;
- break;
- }
- if (type == -1)
- break;
- j = 0;
- while (types[type][j] >= 0 &&
- (used & (1 << types[type][j])) != 0) {
- j++;
- }
- if (types[type][j] >= 0)
- use = types[type][j];
- break;
- case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_OUTPUT:
- use = SOUND_MIXER_PCM;
- break;
- case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_BEEP_WIDGET:
- use = SOUND_MIXER_SPEAKER;
- break;
- default:
- break;
- }
- if (use >= 0) {
- w->ossdev = use;
- used |= (1 << use);
- }
- }
- /* Semi-known names */
- for (i = devinfo->startnode; i < devinfo->endnode; i++) {
- w = hdac_widget_get(devinfo, i);
- if (w == NULL || w->enable == 0)
- continue;
- if (w->ossdev >= 0)
- continue;
- if (w->bindas == -1)
- continue;
- if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
- continue;
- if (as[w->bindas].dir == HDA_CTL_OUT)
- continue;
- type = -1;
- switch (w->wclass.pin.config & HDA_CONFIG_DEFAULTCONF_DEVICE_MASK) {
- case HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_OUT:
- case HDA_CONFIG_DEFAULTCONF_DEVICE_SPEAKER:
- case HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT:
- case HDA_CONFIG_DEFAULTCONF_DEVICE_AUX:
- type = 0;
- break;
- case HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN:
- type = 2;
- break;
- case HDA_CONFIG_DEFAULTCONF_DEVICE_SPDIF_OUT:
- case HDA_CONFIG_DEFAULTCONF_DEVICE_DIGITAL_OTHER_OUT:
- type = 5;
- break;
- }
- if (type == -1)
- break;
- j = 0;
- while (types[type][j] >= 0 &&
- (used & (1 << types[type][j])) != 0) {
- j++;
- }
- if (types[type][j] >= 0) {
- w->ossdev = types[type][j];
- used |= (1 << types[type][j]);
- }
- }
- /* Others */
- for (i = devinfo->startnode; i < devinfo->endnode; i++) {
- w = hdac_widget_get(devinfo, i);
- if (w == NULL || w->enable == 0)
- continue;
- if (w->ossdev >= 0)
- continue;
- if (w->bindas == -1)
- continue;
- if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
- continue;
- if (as[w->bindas].dir == HDA_CTL_OUT)
- continue;
- j = 0;
- while (types[6][j] >= 0 &&
- (used & (1 << types[6][j])) != 0) {
- j++;
- }
- if (types[6][j] >= 0) {
- w->ossdev = types[6][j];
- used |= (1 << types[6][j]);
- }
- }
-}
-
-static void
-hdac_audio_build_tree(struct hdac_devinfo *devinfo)
-{
- struct hdac_audio_as *as = devinfo->function.audio.as;
- int j, res;
-
- /* Trace all associations in order of their numbers, */
- for (j = 0; j < devinfo->function.audio.ascnt; j++) {
- if (as[j].enable == 0)
- continue;
- HDA_BOOTVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- "Tracing association %d (%d)\n", j, as[j].index);
- );
- if (as[j].dir == HDA_CTL_OUT) {
-retry:
- res = hdac_audio_trace_as_out(devinfo, j, 0);
- if (res == 0 && as[j].hpredir >= 0 &&
- as[j].fakeredir == 0) {
- /* If codec can't do analog HP redirection
- try to make it using one more DAC. */
- as[j].fakeredir = 1;
- goto retry;
- }
- } else {
- res = hdac_audio_trace_as_in(devinfo, j);
- }
- if (res) {
- HDA_BOOTVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- "Association %d (%d) trace succeeded\n",
- j, as[j].index);
- );
- } else {
+ if (sc->unsol_registered > 0)
+ min = hz / 2;
+ for (i = 0; i < sc->num_ss; i++) {
+ s = &sc->streams[i];
+ if (s->running == 0)
+ continue;
+ pollticks = ((uint64_t)hz * s->blksz) /
+ (hdac_mdata_rate(s->format) / 8);
+ pollticks >>= 1;
+ if (pollticks > hz)
+ pollticks = hz;
+ if (pollticks < 1) {
HDA_BOOTVERBOSE(
- device_printf(devinfo->codec->sc->dev,
- "Association %d (%d) trace failed\n",
- j, as[j].index);
+ device_printf(sc->dev,
+ "poll interval < 1 tick !\n");
);
- as[j].enable = 0;
- }
- }
-
- /* Trace mixer and beeper pseudo associations. */
- hdac_audio_trace_as_extra(devinfo);
-}
-
-static void
-hdac_audio_assign_mixers(struct hdac_devinfo *devinfo)
-{
- struct hdac_audio_as *as = devinfo->function.audio.as;
- struct hdac_audio_ctl *ctl;
- struct hdac_widget *w, *cw;
- int i, j;
-
- /* Assign mixers to the tree. */
- for (i = devinfo->startnode; i < devinfo->endnode; i++) {
- w = hdac_widget_get(devinfo, i);
- if (w == NULL || w->enable == 0)
- continue;
- if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_OUTPUT ||
- w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_BEEP_WIDGET ||
- (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX &&
- as[w->bindas].dir == HDA_CTL_IN)) {
- if (w->ossdev < 0)
- continue;
- hdac_audio_ctl_source_amp(devinfo, w->nid, -1,
- w->ossdev, 1, 0, 1);
- } else if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT) {
- hdac_audio_ctl_dest_amp(devinfo, w->nid, -1,
- SOUND_MIXER_RECLEV, 0, 1);
- } else if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX &&
- as[w->bindas].dir == HDA_CTL_OUT) {
- hdac_audio_ctl_dest_amp(devinfo, w->nid, -1,
- SOUND_MIXER_VOLUME, 0, 1);
- }
- if (w->ossdev == SOUND_MIXER_IMIX) {
- if (hdac_audio_ctl_source_amp(devinfo, w->nid, -1,
- w->ossdev, 1, 0, 1)) {
- /* If we are unable to control input monitor
- as source - try to control it as destination. */
- hdac_audio_ctl_dest_amp(devinfo, w->nid, -1,
- w->ossdev, 0, 1);
- }
- }
- if (w->pflags & HDA_ADC_MONITOR) {
- for (j = 0; j < w->nconns; j++) {
- if (!w->connsenable[j])
- continue;
- cw = hdac_widget_get(devinfo, w->conns[j]);
- if (cw == NULL || cw->enable == 0)
- continue;
- if (cw->bindas == -1)
- continue;
- if (cw->bindas >= 0 &&
- as[cw->bindas].dir != HDA_CTL_IN)
- continue;
- hdac_audio_ctl_dest_amp(devinfo,
- w->nid, j, SOUND_MIXER_IGAIN, 0, 1);
- }
- }
- }
- /* Treat unrequired as possible. */
- i = 0;
- while ((ctl = hdac_audio_ctl_each(devinfo, &i)) != NULL) {
- if (ctl->ossmask == 0)
- ctl->ossmask = ctl->possmask;
- }
-}
-
-static void
-hdac_audio_prepare_pin_ctrl(struct hdac_devinfo *devinfo)
-{
- struct hdac_audio_as *as = devinfo->function.audio.as;
- struct hdac_widget *w;
- uint32_t pincap;
- int i;
-
- for (i = 0; i < devinfo->nodecnt; i++) {
- w = &devinfo->widget[i];
- if (w == NULL)
- continue;
- if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
- continue;
-
- pincap = w->wclass.pin.cap;
-
- /* Disable everything. */
- w->wclass.pin.ctrl &= ~(
- HDA_CMD_SET_PIN_WIDGET_CTRL_HPHN_ENABLE |
- HDA_CMD_SET_PIN_WIDGET_CTRL_OUT_ENABLE |
- HDA_CMD_SET_PIN_WIDGET_CTRL_IN_ENABLE |
- HDA_CMD_SET_PIN_WIDGET_CTRL_VREF_ENABLE_MASK);
-
- if (w->enable == 0 ||
- w->bindas < 0 || as[w->bindas].enable == 0) {
- /* Pin is unused so left it disabled. */
- continue;
- } else if (as[w->bindas].dir == HDA_CTL_IN) {
- /* Input pin, configure for input. */
- if (HDA_PARAM_PIN_CAP_INPUT_CAP(pincap))
- w->wclass.pin.ctrl |=
- HDA_CMD_SET_PIN_WIDGET_CTRL_IN_ENABLE;
-
- if ((devinfo->function.audio.quirks & HDA_QUIRK_IVREF100) &&
- HDA_PARAM_PIN_CAP_VREF_CTRL_100(pincap))
- w->wclass.pin.ctrl |=
- HDA_CMD_SET_PIN_WIDGET_CTRL_VREF_ENABLE(
- HDA_CMD_PIN_WIDGET_CTRL_VREF_ENABLE_100);
- else if ((devinfo->function.audio.quirks & HDA_QUIRK_IVREF80) &&
- HDA_PARAM_PIN_CAP_VREF_CTRL_80(pincap))
- w->wclass.pin.ctrl |=
- HDA_CMD_SET_PIN_WIDGET_CTRL_VREF_ENABLE(
- HDA_CMD_PIN_WIDGET_CTRL_VREF_ENABLE_80);
- else if ((devinfo->function.audio.quirks & HDA_QUIRK_IVREF50) &&
- HDA_PARAM_PIN_CAP_VREF_CTRL_50(pincap))
- w->wclass.pin.ctrl |=
- HDA_CMD_SET_PIN_WIDGET_CTRL_VREF_ENABLE(
- HDA_CMD_PIN_WIDGET_CTRL_VREF_ENABLE_50);
- } else {
- /* Output pin, configure for output. */
- if (HDA_PARAM_PIN_CAP_OUTPUT_CAP(pincap))
- w->wclass.pin.ctrl |=
- HDA_CMD_SET_PIN_WIDGET_CTRL_OUT_ENABLE;
-
- if (HDA_PARAM_PIN_CAP_HEADPHONE_CAP(pincap) &&
- (w->wclass.pin.config &
- HDA_CONFIG_DEFAULTCONF_DEVICE_MASK) ==
- HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT)
- w->wclass.pin.ctrl |=
- HDA_CMD_SET_PIN_WIDGET_CTRL_HPHN_ENABLE;
-
- if ((devinfo->function.audio.quirks & HDA_QUIRK_OVREF100) &&
- HDA_PARAM_PIN_CAP_VREF_CTRL_100(pincap))
- w->wclass.pin.ctrl |=
- HDA_CMD_SET_PIN_WIDGET_CTRL_VREF_ENABLE(
- HDA_CMD_PIN_WIDGET_CTRL_VREF_ENABLE_100);
- else if ((devinfo->function.audio.quirks & HDA_QUIRK_OVREF80) &&
- HDA_PARAM_PIN_CAP_VREF_CTRL_80(pincap))
- w->wclass.pin.ctrl |=
- HDA_CMD_SET_PIN_WIDGET_CTRL_VREF_ENABLE(
- HDA_CMD_PIN_WIDGET_CTRL_VREF_ENABLE_80);
- else if ((devinfo->function.audio.quirks & HDA_QUIRK_OVREF50) &&
- HDA_PARAM_PIN_CAP_VREF_CTRL_50(pincap))
- w->wclass.pin.ctrl |=
- HDA_CMD_SET_PIN_WIDGET_CTRL_VREF_ENABLE(
- HDA_CMD_PIN_WIDGET_CTRL_VREF_ENABLE_50);
- }
- }
-}
-
-static void
-hdac_audio_ctl_commit(struct hdac_devinfo *devinfo)
-{
- struct hdac_audio_ctl *ctl;
- int i, z;
-
- i = 0;
- while ((ctl = hdac_audio_ctl_each(devinfo, &i)) != NULL) {
- if (ctl->enable == 0 || ctl->ossmask != 0) {
- /* Mute disabled and mixer controllable controls.
- * Last will be initialized by mixer_init().
- * This expected to reduce click on startup. */
- hdac_audio_ctl_amp_set(ctl, HDA_AMP_MUTE_ALL, 0, 0);
- continue;
- }
- /* Init fixed controls to 0dB amplification. */
- z = ctl->offset;
- if (z > ctl->step)
- z = ctl->step;
- hdac_audio_ctl_amp_set(ctl, HDA_AMP_MUTE_NONE, z, z);
- }
-}
-
-static void
-hdac_audio_commit(struct hdac_devinfo *devinfo)
-{
- struct hdac_softc *sc = devinfo->codec->sc;
- struct hdac_widget *w;
- nid_t cad;
- uint32_t gdata, gmask, gdir;
- int commitgpio, numgpio;
- int i;
-
- cad = devinfo->codec->cad;
-
- if (sc->pci_subvendor == APPLE_INTEL_MAC)
- hdac_command(sc, HDA_CMD_12BIT(cad, devinfo->nid,
- 0x7e7, 0), cad);
-
- /* Commit controls. */
- hdac_audio_ctl_commit(devinfo);
-
- /* Commit selectors, pins and EAPD. */
- for (i = 0; i < devinfo->nodecnt; i++) {
- w = &devinfo->widget[i];
- if (w == NULL)
- continue;
- if (w->selconn == -1)
- w->selconn = 0;
- if (w->nconns > 0)
- hdac_widget_connection_select(w, w->selconn);
- if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) {
- hdac_command(sc,
- HDA_CMD_SET_PIN_WIDGET_CTRL(cad, w->nid,
- w->wclass.pin.ctrl), cad);
- }
- if (w->param.eapdbtl != HDAC_INVALID) {
- uint32_t val;
-
- val = w->param.eapdbtl;
- if (devinfo->function.audio.quirks &
- HDA_QUIRK_EAPDINV)
- val ^= HDA_CMD_SET_EAPD_BTL_ENABLE_EAPD;
- hdac_command(sc,
- HDA_CMD_SET_EAPD_BTL_ENABLE(cad, w->nid,
- val), cad);
- }
- }
-
- /* Commit GPIOs. */
- gdata = 0;
- gmask = 0;
- gdir = 0;
- commitgpio = 0;
- numgpio = HDA_PARAM_GPIO_COUNT_NUM_GPIO(
- devinfo->function.audio.gpio);
-
- if (devinfo->function.audio.quirks & HDA_QUIRK_GPIOFLUSH)
- commitgpio = (numgpio > 0) ? 1 : 0;
- else {
- for (i = 0; i < numgpio && i < HDA_GPIO_MAX; i++) {
- if (!(devinfo->function.audio.quirks &
- (1 << i)))
- continue;
- if (commitgpio == 0) {
- commitgpio = 1;
- HDA_BOOTVERBOSE(
- gdata = hdac_command(sc,
- HDA_CMD_GET_GPIO_DATA(cad,
- devinfo->nid), cad);
- gmask = hdac_command(sc,
- HDA_CMD_GET_GPIO_ENABLE_MASK(cad,
- devinfo->nid), cad);
- gdir = hdac_command(sc,
- HDA_CMD_GET_GPIO_DIRECTION(cad,
- devinfo->nid), cad);
- device_printf(sc->dev,
- "GPIO init: data=0x%08x "
- "mask=0x%08x dir=0x%08x\n",
- gdata, gmask, gdir);
- gdata = 0;
- gmask = 0;
- gdir = 0;
- );
- }
- gdata |= 1 << i;
- gmask |= 1 << i;
- gdir |= 1 << i;
- }
- }
-
- if (commitgpio != 0) {
- HDA_BOOTVERBOSE(
- device_printf(sc->dev,
- "GPIO commit: data=0x%08x mask=0x%08x "
- "dir=0x%08x\n",
- gdata, gmask, gdir);
- );
- hdac_command(sc,
- HDA_CMD_SET_GPIO_ENABLE_MASK(cad, devinfo->nid,
- gmask), cad);
- hdac_command(sc,
- HDA_CMD_SET_GPIO_DIRECTION(cad, devinfo->nid,
- gdir), cad);
- hdac_command(sc,
- HDA_CMD_SET_GPIO_DATA(cad, devinfo->nid,
- gdata), cad);
- }
-}
-
-static void
-hdac_powerup(struct hdac_devinfo *devinfo)
-{
- struct hdac_softc *sc = devinfo->codec->sc;
- nid_t cad = devinfo->codec->cad;
- int i;
-
- hdac_command(sc,
- HDA_CMD_SET_POWER_STATE(cad,
- devinfo->nid, HDA_CMD_POWER_STATE_D0),
- cad);
- DELAY(100);
-
- for (i = devinfo->startnode; i < devinfo->endnode; i++) {
- hdac_command(sc,
- HDA_CMD_SET_POWER_STATE(cad,
- i, HDA_CMD_POWER_STATE_D0),
- cad);
- }
- DELAY(1000);
-}
-
-static int
-hdac_pcmchannel_setup(struct hdac_chan *ch)
-{
- struct hdac_devinfo *devinfo = ch->devinfo;
- struct hdac_audio_as *as = devinfo->function.audio.as;
- struct hdac_widget *w;
- uint32_t cap, fmtcap, pcmcap;
- int i, j, ret, channels, onlystereo;
- uint16_t pinset;
-
- ch->caps = hdac_caps;
- ch->caps.fmtlist = ch->fmtlist;
- ch->bit16 = 1;
- ch->bit32 = 0;
- ch->pcmrates[0] = 48000;
- ch->pcmrates[1] = 0;
-
- ret = 0;
- channels = 0;
- onlystereo = 1;
- pinset = 0;
- fmtcap = devinfo->function.audio.supp_stream_formats;
- pcmcap = devinfo->function.audio.supp_pcm_size_rate;
-
- for (i = 0; i < 16; i++) {
- /* Check as is correct */
- if (ch->as < 0)
- break;
- /* Cound only present DACs */
- if (as[ch->as].dacs[i] <= 0)
- continue;
- /* Ignore duplicates */
- for (j = 0; j < ret; j++) {
- if (ch->io[j] == as[ch->as].dacs[i])
- break;
- }
- if (j < ret)
- continue;
-
- w = hdac_widget_get(devinfo, as[ch->as].dacs[i]);
- if (w == NULL || w->enable == 0)
- continue;
- cap = w->param.supp_stream_formats;
- if (!HDA_PARAM_SUPP_STREAM_FORMATS_PCM(cap) &&
- !HDA_PARAM_SUPP_STREAM_FORMATS_AC3(cap))
- continue;
- /* Many CODECs does not declare AC3 support on SPDIF.
- I don't beleave that they doesn't support it! */
- if (HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL(w->param.widget_cap))
- cap |= HDA_PARAM_SUPP_STREAM_FORMATS_AC3_MASK;
- if (ret == 0) {
- fmtcap = cap;
- pcmcap = w->param.supp_pcm_size_rate;
- } else {
- fmtcap &= cap;
- pcmcap &= w->param.supp_pcm_size_rate;
- }
- ch->io[ret++] = as[ch->as].dacs[i];
- /* Do not count redirection pin/dac channels. */
- if (i == 15 && as[ch->as].hpredir >= 0)
- continue;
- channels += HDA_PARAM_AUDIO_WIDGET_CAP_CC(w->param.widget_cap) + 1;
- if (HDA_PARAM_AUDIO_WIDGET_CAP_CC(w->param.widget_cap) != 1)
- onlystereo = 0;
- pinset |= (1 << i);
- }
- ch->io[ret] = -1;
-
- if (as[ch->as].fakeredir)
- ret--;
- /* Standard speaks only about stereo pins and playback, ... */
- if ((!onlystereo) || as[ch->as].dir != HDA_CTL_OUT)
- pinset = 0;
- /* ..., but there it gives us info about speakers layout. */
- as[ch->as].pinset = pinset;
-
- ch->supp_stream_formats = fmtcap;
- ch->supp_pcm_size_rate = pcmcap;
-
- /*
- * 8bit = 0
- * 16bit = 1
- * 20bit = 2
- * 24bit = 3
- * 32bit = 4
- */
- if (ret > 0) {
- i = 0;
- if (HDA_PARAM_SUPP_STREAM_FORMATS_PCM(fmtcap)) {
- if (HDA_PARAM_SUPP_PCM_SIZE_RATE_16BIT(pcmcap))
- ch->bit16 = 1;
- else if (HDA_PARAM_SUPP_PCM_SIZE_RATE_8BIT(pcmcap))
- ch->bit16 = 0;
- if (HDA_PARAM_SUPP_PCM_SIZE_RATE_32BIT(pcmcap))
- ch->bit32 = 4;
- else if (HDA_PARAM_SUPP_PCM_SIZE_RATE_24BIT(pcmcap))
- ch->bit32 = 3;
- else if (HDA_PARAM_SUPP_PCM_SIZE_RATE_20BIT(pcmcap))
- ch->bit32 = 2;
- if (!(devinfo->function.audio.quirks & HDA_QUIRK_FORCESTEREO)) {
- ch->fmtlist[i++] = SND_FORMAT(AFMT_S16_LE, 1, 0);
- if (ch->bit32)
- ch->fmtlist[i++] = SND_FORMAT(AFMT_S32_LE, 1, 0);
- }
- if (channels >= 2) {
- ch->fmtlist[i++] = SND_FORMAT(AFMT_S16_LE, 2, 0);
- if (ch->bit32)
- ch->fmtlist[i++] = SND_FORMAT(AFMT_S32_LE, 2, 0);
- }
- if (channels == 4 || /* Any 4-channel */
- pinset == 0x0007 || /* 5.1 */
- pinset == 0x0013 || /* 5.1 */
- pinset == 0x0017) { /* 7.1 */
- ch->fmtlist[i++] = SND_FORMAT(AFMT_S16_LE, 4, 0);
- if (ch->bit32)
- ch->fmtlist[i++] = SND_FORMAT(AFMT_S32_LE, 4, 0);
- }
- if (channels == 6 || /* Any 6-channel */
- pinset == 0x0017) { /* 7.1 */
- ch->fmtlist[i++] = SND_FORMAT(AFMT_S16_LE, 6, 1);
- if (ch->bit32)
- ch->fmtlist[i++] = SND_FORMAT(AFMT_S32_LE, 6, 1);
- }
- if (channels == 8) { /* Any 8-channel */
- ch->fmtlist[i++] = SND_FORMAT(AFMT_S16_LE, 8, 1);
- if (ch->bit32)
- ch->fmtlist[i++] = SND_FORMAT(AFMT_S32_LE, 8, 1);
- }
- }
- if (HDA_PARAM_SUPP_STREAM_FORMATS_AC3(fmtcap)) {
- ch->fmtlist[i++] = SND_FORMAT(AFMT_AC3, 2, 0);
- }
- ch->fmtlist[i] = 0;
- i = 0;
- if (HDA_PARAM_SUPP_PCM_SIZE_RATE_8KHZ(pcmcap))
- ch->pcmrates[i++] = 8000;
- if (HDA_PARAM_SUPP_PCM_SIZE_RATE_11KHZ(pcmcap))
- ch->pcmrates[i++] = 11025;
- if (HDA_PARAM_SUPP_PCM_SIZE_RATE_16KHZ(pcmcap))
- ch->pcmrates[i++] = 16000;
- if (HDA_PARAM_SUPP_PCM_SIZE_RATE_22KHZ(pcmcap))
- ch->pcmrates[i++] = 22050;
- if (HDA_PARAM_SUPP_PCM_SIZE_RATE_32KHZ(pcmcap))
- ch->pcmrates[i++] = 32000;
- if (HDA_PARAM_SUPP_PCM_SIZE_RATE_44KHZ(pcmcap))
- ch->pcmrates[i++] = 44100;
- /* if (HDA_PARAM_SUPP_PCM_SIZE_RATE_48KHZ(pcmcap)) */
- ch->pcmrates[i++] = 48000;
- if (HDA_PARAM_SUPP_PCM_SIZE_RATE_88KHZ(pcmcap))
- ch->pcmrates[i++] = 88200;
- if (HDA_PARAM_SUPP_PCM_SIZE_RATE_96KHZ(pcmcap))
- ch->pcmrates[i++] = 96000;
- if (HDA_PARAM_SUPP_PCM_SIZE_RATE_176KHZ(pcmcap))
- ch->pcmrates[i++] = 176400;
- if (HDA_PARAM_SUPP_PCM_SIZE_RATE_192KHZ(pcmcap))
- ch->pcmrates[i++] = 192000;
- /* if (HDA_PARAM_SUPP_PCM_SIZE_RATE_384KHZ(pcmcap)) */
- ch->pcmrates[i] = 0;
- if (i > 0) {
- ch->caps.minspeed = ch->pcmrates[0];
- ch->caps.maxspeed = ch->pcmrates[i - 1];
- }
- }
-
- return (ret);
-}
-
-static void
-hdac_create_pcms(struct hdac_devinfo *devinfo)
-{
- struct hdac_softc *sc = devinfo->codec->sc;
- struct hdac_audio_as *as = devinfo->function.audio.as;
- int i, j, apdev = 0, ardev = 0, dpdev = 0, drdev = 0;
-
- for (i = 0; i < devinfo->function.audio.ascnt; i++) {
- if (as[i].enable == 0)
- continue;
- if (as[i].dir == HDA_CTL_IN) {
- if (as[i].digital)
- drdev++;
- else
- ardev++;
- } else {
- if (as[i].digital)
- dpdev++;
- else
- apdev++;
- }
- }
- devinfo->function.audio.num_devs =
- max(ardev, apdev) + max(drdev, dpdev);
- devinfo->function.audio.devs =
- (struct hdac_pcm_devinfo *)malloc(
- devinfo->function.audio.num_devs * sizeof(struct hdac_pcm_devinfo),
- M_HDAC, M_ZERO | M_NOWAIT);
- if (devinfo->function.audio.devs == NULL) {
- device_printf(sc->dev,
- "Unable to allocate memory for devices\n");
- return;
- }
- for (i = 0; i < devinfo->function.audio.num_devs; i++) {
- devinfo->function.audio.devs[i].index = i;
- devinfo->function.audio.devs[i].devinfo = devinfo;
- devinfo->function.audio.devs[i].play = -1;
- devinfo->function.audio.devs[i].rec = -1;
- devinfo->function.audio.devs[i].digital = 255;
- }
- for (i = 0; i < devinfo->function.audio.ascnt; i++) {
- if (as[i].enable == 0)
- continue;
- for (j = 0; j < devinfo->function.audio.num_devs; j++) {
- if (devinfo->function.audio.devs[j].digital != 255 &&
- (!devinfo->function.audio.devs[j].digital) !=
- (!as[i].digital))
- continue;
- if (as[i].dir == HDA_CTL_IN) {
- if (devinfo->function.audio.devs[j].rec >= 0)
- continue;
- devinfo->function.audio.devs[j].rec
- = as[i].chan;
- } else {
- if (devinfo->function.audio.devs[j].play >= 0)
- continue;
- devinfo->function.audio.devs[j].play
- = as[i].chan;
- }
- sc->chans[as[i].chan].pdevinfo =
- &devinfo->function.audio.devs[j];
- devinfo->function.audio.devs[j].digital =
- as[i].digital;
- break;
- }
- }
- for (i = 0; i < devinfo->function.audio.num_devs; i++) {
- struct hdac_pcm_devinfo *pdevinfo =
- &devinfo->function.audio.devs[i];
- pdevinfo->dev =
- device_add_child(sc->dev, "pcm", -1);
- device_set_ivars(pdevinfo->dev,
- (void *)pdevinfo);
- }
-}
-
-static void
-hdac_dump_ctls(struct hdac_pcm_devinfo *pdevinfo, const char *banner, uint32_t flag)
-{
- struct hdac_devinfo *devinfo = pdevinfo->devinfo;
- struct hdac_audio_ctl *ctl;
- struct hdac_softc *sc = devinfo->codec->sc;
- char buf[64];
- int i, j, printed;
-
- if (flag == 0) {
- flag = ~(SOUND_MASK_VOLUME | SOUND_MASK_PCM |
- SOUND_MASK_CD | SOUND_MASK_LINE | SOUND_MASK_RECLEV |
- SOUND_MASK_MIC | SOUND_MASK_SPEAKER | SOUND_MASK_IGAIN |
- SOUND_MASK_OGAIN | SOUND_MASK_IMIX | SOUND_MASK_MONITOR);
- }
-
- for (j = 0; j < SOUND_MIXER_NRDEVICES; j++) {
- if ((flag & (1 << j)) == 0)
- continue;
- i = 0;
- printed = 0;
- while ((ctl = hdac_audio_ctl_each(devinfo, &i)) != NULL) {
- if (ctl->enable == 0 ||
- ctl->widget->enable == 0)
- continue;
- if (!((pdevinfo->play >= 0 &&
- ctl->widget->bindas == sc->chans[pdevinfo->play].as) ||
- (pdevinfo->rec >= 0 &&
- ctl->widget->bindas == sc->chans[pdevinfo->rec].as) ||
- (ctl->widget->bindas == -2 && pdevinfo->index == 0)))
- continue;
- if ((ctl->ossmask & (1 << j)) == 0)
- continue;
-
- if (printed == 0) {
- device_printf(pdevinfo->dev, "\n");
- if (banner != NULL) {
- device_printf(pdevinfo->dev, "%s", banner);
- } else {
- device_printf(pdevinfo->dev, "Unknown Ctl");
- }
- printf(" (OSS: %s)\n",
- hdac_audio_ctl_ossmixer_mask2allname(1 << j,
- buf, sizeof(buf)));
- device_printf(pdevinfo->dev, " |\n");
- printed = 1;
- }
- device_printf(pdevinfo->dev, " +- ctl %2d (nid %3d %s", i,
- ctl->widget->nid,
- (ctl->ndir == HDA_CTL_IN)?"in ":"out");
- if (ctl->ndir == HDA_CTL_IN && ctl->ndir == ctl->dir)
- printf(" %2d): ", ctl->index);
- else
- printf("): ");
- if (ctl->step > 0) {
- printf("%+d/%+ddB (%d steps)%s\n",
- (0 - ctl->offset) * (ctl->size + 1) / 4,
- (ctl->step - ctl->offset) * (ctl->size + 1) / 4,
- ctl->step + 1,
- ctl->mute?" + mute":"");
- } else
- printf("%s\n", ctl->mute?"mute":"");
- }
- }
-}
-
-static void
-hdac_dump_audio_formats(device_t dev, uint32_t fcap, uint32_t pcmcap)
-{
- uint32_t cap;
-
- cap = fcap;
- if (cap != 0) {
- device_printf(dev, " Stream cap: 0x%08x\n", cap);
- device_printf(dev, " ");
- if (HDA_PARAM_SUPP_STREAM_FORMATS_AC3(cap))
- printf(" AC3");
- if (HDA_PARAM_SUPP_STREAM_FORMATS_FLOAT32(cap))
- printf(" FLOAT32");
- if (HDA_PARAM_SUPP_STREAM_FORMATS_PCM(cap))
- printf(" PCM");
- printf("\n");
- }
- cap = pcmcap;
- if (cap != 0) {
- device_printf(dev, " PCM cap: 0x%08x\n", cap);
- device_printf(dev, " ");
- if (HDA_PARAM_SUPP_PCM_SIZE_RATE_8BIT(cap))
- printf(" 8");
- if (HDA_PARAM_SUPP_PCM_SIZE_RATE_16BIT(cap))
- printf(" 16");
- if (HDA_PARAM_SUPP_PCM_SIZE_RATE_20BIT(cap))
- printf(" 20");
- if (HDA_PARAM_SUPP_PCM_SIZE_RATE_24BIT(cap))
- printf(" 24");
- if (HDA_PARAM_SUPP_PCM_SIZE_RATE_32BIT(cap))
- printf(" 32");
- printf(" bits,");
- if (HDA_PARAM_SUPP_PCM_SIZE_RATE_8KHZ(cap))
- printf(" 8");
- if (HDA_PARAM_SUPP_PCM_SIZE_RATE_11KHZ(cap))
- printf(" 11");
- if (HDA_PARAM_SUPP_PCM_SIZE_RATE_16KHZ(cap))
- printf(" 16");
- if (HDA_PARAM_SUPP_PCM_SIZE_RATE_22KHZ(cap))
- printf(" 22");
- if (HDA_PARAM_SUPP_PCM_SIZE_RATE_32KHZ(cap))
- printf(" 32");
- if (HDA_PARAM_SUPP_PCM_SIZE_RATE_44KHZ(cap))
- printf(" 44");
- printf(" 48");
- if (HDA_PARAM_SUPP_PCM_SIZE_RATE_88KHZ(cap))
- printf(" 88");
- if (HDA_PARAM_SUPP_PCM_SIZE_RATE_96KHZ(cap))
- printf(" 96");
- if (HDA_PARAM_SUPP_PCM_SIZE_RATE_176KHZ(cap))
- printf(" 176");
- if (HDA_PARAM_SUPP_PCM_SIZE_RATE_192KHZ(cap))
- printf(" 192");
- printf(" KHz\n");
- }
-}
-
-static void
-hdac_dump_pin(struct hdac_softc *sc, struct hdac_widget *w)
-{
- uint32_t pincap;
-
- pincap = w->wclass.pin.cap;
-
- device_printf(sc->dev, " Pin cap: 0x%08x\n", pincap);
- device_printf(sc->dev, " ");
- if (HDA_PARAM_PIN_CAP_IMP_SENSE_CAP(pincap))
- printf(" ISC");
- if (HDA_PARAM_PIN_CAP_TRIGGER_REQD(pincap))
- printf(" TRQD");
- if (HDA_PARAM_PIN_CAP_PRESENCE_DETECT_CAP(pincap))
- printf(" PDC");
- if (HDA_PARAM_PIN_CAP_HEADPHONE_CAP(pincap))
- printf(" HP");
- if (HDA_PARAM_PIN_CAP_OUTPUT_CAP(pincap))
- printf(" OUT");
- if (HDA_PARAM_PIN_CAP_INPUT_CAP(pincap))
- printf(" IN");
- if (HDA_PARAM_PIN_CAP_BALANCED_IO_PINS(pincap))
- printf(" BAL");
- if (HDA_PARAM_PIN_CAP_HDMI(pincap))
- printf(" HDMI");
- if (HDA_PARAM_PIN_CAP_VREF_CTRL(pincap)) {
- printf(" VREF[");
- if (HDA_PARAM_PIN_CAP_VREF_CTRL_50(pincap))
- printf(" 50");
- if (HDA_PARAM_PIN_CAP_VREF_CTRL_80(pincap))
- printf(" 80");
- if (HDA_PARAM_PIN_CAP_VREF_CTRL_100(pincap))
- printf(" 100");
- if (HDA_PARAM_PIN_CAP_VREF_CTRL_GROUND(pincap))
- printf(" GROUND");
- if (HDA_PARAM_PIN_CAP_VREF_CTRL_HIZ(pincap))
- printf(" HIZ");
- printf(" ]");
- }
- if (HDA_PARAM_PIN_CAP_EAPD_CAP(pincap))
- printf(" EAPD");
- if (HDA_PARAM_PIN_CAP_DP(pincap))
- printf(" DP");
- if (HDA_PARAM_PIN_CAP_HBR(pincap))
- printf(" HBR");
- printf("\n");
- device_printf(sc->dev, " Pin config: 0x%08x\n",
- w->wclass.pin.config);
- device_printf(sc->dev, " Pin control: 0x%08x", w->wclass.pin.ctrl);
- if (w->wclass.pin.ctrl & HDA_CMD_SET_PIN_WIDGET_CTRL_HPHN_ENABLE)
- printf(" HP");
- if (w->wclass.pin.ctrl & HDA_CMD_SET_PIN_WIDGET_CTRL_IN_ENABLE)
- printf(" IN");
- if (w->wclass.pin.ctrl & HDA_CMD_SET_PIN_WIDGET_CTRL_OUT_ENABLE)
- printf(" OUT");
- if (w->wclass.pin.ctrl & HDA_CMD_SET_PIN_WIDGET_CTRL_VREF_ENABLE_MASK)
- printf(" VREFs");
- printf("\n");
-}
-
-static void
-hdac_dump_pin_config(struct hdac_widget *w, uint32_t conf)
-{
- struct hdac_softc *sc = w->devinfo->codec->sc;
-
- device_printf(sc->dev, " nid %d 0x%08x as %2d seq %2d %13s %5s "
- "jack %2d loc %2d color %7s misc %d%s\n",
- w->nid, conf,
- HDA_CONFIG_DEFAULTCONF_ASSOCIATION(conf),
- HDA_CONFIG_DEFAULTCONF_SEQUENCE(conf),
- HDA_DEVS[HDA_CONFIG_DEFAULTCONF_DEVICE(conf)],
- HDA_CONNS[HDA_CONFIG_DEFAULTCONF_CONNECTIVITY(conf)],
- HDA_CONFIG_DEFAULTCONF_CONNECTION_TYPE(conf),
- HDA_CONFIG_DEFAULTCONF_LOCATION(conf),
- HDA_COLORS[HDA_CONFIG_DEFAULTCONF_COLOR(conf)],
- HDA_CONFIG_DEFAULTCONF_MISC(conf),
- (w->enable == 0)?" [DISABLED]":"");
-}
-
-static void
-hdac_dump_pin_configs(struct hdac_devinfo *devinfo)
-{
- struct hdac_widget *w;
- int i;
-
- for (i = devinfo->startnode; i < devinfo->endnode; i++) {
- w = hdac_widget_get(devinfo, i);
- if (w == NULL)
- continue;
- if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
- continue;
- hdac_dump_pin_config(w, w->wclass.pin.config);
- }
-}
-
-static void
-hdac_dump_amp(struct hdac_softc *sc, uint32_t cap, char *banner)
-{
- device_printf(sc->dev, " %s amp: 0x%08x\n", banner, cap);
- device_printf(sc->dev, " "
- "mute=%d step=%d size=%d offset=%d\n",
- HDA_PARAM_OUTPUT_AMP_CAP_MUTE_CAP(cap),
- HDA_PARAM_OUTPUT_AMP_CAP_NUMSTEPS(cap),
- HDA_PARAM_OUTPUT_AMP_CAP_STEPSIZE(cap),
- HDA_PARAM_OUTPUT_AMP_CAP_OFFSET(cap));
-}
-
-static void
-hdac_dump_nodes(struct hdac_devinfo *devinfo)
-{
- struct hdac_softc *sc = devinfo->codec->sc;
- static char *ossname[] = SOUND_DEVICE_NAMES;
- struct hdac_widget *w, *cw;
- char buf[64];
- int i, j;
-
- device_printf(sc->dev, "\n");
- device_printf(sc->dev, "Default Parameter\n");
- device_printf(sc->dev, "-----------------\n");
- hdac_dump_audio_formats(sc->dev,
- devinfo->function.audio.supp_stream_formats,
- devinfo->function.audio.supp_pcm_size_rate);
- device_printf(sc->dev, " IN amp: 0x%08x\n",
- devinfo->function.audio.inamp_cap);
- device_printf(sc->dev, " OUT amp: 0x%08x\n",
- devinfo->function.audio.outamp_cap);
- for (i = devinfo->startnode; i < devinfo->endnode; i++) {
- w = hdac_widget_get(devinfo, i);
- if (w == NULL) {
- device_printf(sc->dev, "Ghost widget nid=%d\n", i);
- continue;
- }
- device_printf(sc->dev, "\n");
- device_printf(sc->dev, " nid: %d%s\n", w->nid,
- (w->enable == 0) ? " [DISABLED]" : "");
- device_printf(sc->dev, " Name: %s\n", w->name);
- device_printf(sc->dev, " Widget cap: 0x%08x\n",
- w->param.widget_cap);
- if (w->param.widget_cap & 0x0ee1) {
- device_printf(sc->dev, " ");
- if (HDA_PARAM_AUDIO_WIDGET_CAP_LR_SWAP(w->param.widget_cap))
- printf(" LRSWAP");
- if (HDA_PARAM_AUDIO_WIDGET_CAP_POWER_CTRL(w->param.widget_cap))
- printf(" PWR");
- if (HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL(w->param.widget_cap))
- printf(" DIGITAL");
- if (HDA_PARAM_AUDIO_WIDGET_CAP_UNSOL_CAP(w->param.widget_cap))
- printf(" UNSOL");
- if (HDA_PARAM_AUDIO_WIDGET_CAP_PROC_WIDGET(w->param.widget_cap))
- printf(" PROC");
- if (HDA_PARAM_AUDIO_WIDGET_CAP_STRIPE(w->param.widget_cap))
- printf(" STRIPE");
- j = HDA_PARAM_AUDIO_WIDGET_CAP_CC(w->param.widget_cap);
- if (j == 1)
- printf(" STEREO");
- else if (j > 1)
- printf(" %dCH", j + 1);
- printf("\n");
- }
- if (w->bindas != -1) {
- device_printf(sc->dev, " Association: %d (0x%08x)\n",
- w->bindas, w->bindseqmask);
- }
- if (w->ossmask != 0 || w->ossdev >= 0) {
- device_printf(sc->dev, " OSS: %s",
- hdac_audio_ctl_ossmixer_mask2allname(w->ossmask, buf, sizeof(buf)));
- if (w->ossdev >= 0)
- printf(" (%s)", ossname[w->ossdev]);
- printf("\n");
- }
- if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_OUTPUT ||
- w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT) {
- hdac_dump_audio_formats(sc->dev,
- w->param.supp_stream_formats,
- w->param.supp_pcm_size_rate);
- } else if (w->type ==
- HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
- hdac_dump_pin(sc, w);
- if (w->param.eapdbtl != HDAC_INVALID)
- device_printf(sc->dev, " EAPD: 0x%08x\n",
- w->param.eapdbtl);
- if (HDA_PARAM_AUDIO_WIDGET_CAP_OUT_AMP(w->param.widget_cap) &&
- w->param.outamp_cap != 0)
- hdac_dump_amp(sc, w->param.outamp_cap, "Output");
- if (HDA_PARAM_AUDIO_WIDGET_CAP_IN_AMP(w->param.widget_cap) &&
- w->param.inamp_cap != 0)
- hdac_dump_amp(sc, w->param.inamp_cap, " Input");
- if (w->nconns > 0) {
- device_printf(sc->dev, " connections: %d\n", w->nconns);
- device_printf(sc->dev, " |\n");
- }
- for (j = 0; j < w->nconns; j++) {
- cw = hdac_widget_get(devinfo, w->conns[j]);
- device_printf(sc->dev, " + %s<- nid=%d [%s]",
- (w->connsenable[j] == 0)?"[DISABLED] ":"",
- w->conns[j], (cw == NULL) ? "GHOST!" : cw->name);
- if (cw == NULL)
- printf(" [UNKNOWN]");
- else if (cw->enable == 0)
- printf(" [DISABLED]");
- if (w->nconns > 1 && w->selconn == j && w->type !=
- HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER)
- printf(" (selected)");
- printf("\n");
- }
- }
-
-}
-
-static void
-hdac_dump_dst_nid(struct hdac_pcm_devinfo *pdevinfo, nid_t nid, int depth)
-{
- struct hdac_devinfo *devinfo = pdevinfo->devinfo;
- struct hdac_widget *w, *cw;
- char buf[64];
- int i, printed = 0;
-
- if (depth > HDA_PARSE_MAXDEPTH)
- return;
-
- w = hdac_widget_get(devinfo, nid);
- if (w == NULL || w->enable == 0)
- return;
-
- if (depth == 0)
- device_printf(pdevinfo->dev, "%*s", 4, "");
- else
- device_printf(pdevinfo->dev, "%*s + <- ", 4 + (depth - 1) * 7, "");
- printf("nid=%d [%s]", w->nid, w->name);
-
- if (depth > 0) {
- if (w->ossmask == 0) {
- printf("\n");
- return;
- }
- printf(" [src: %s]",
- hdac_audio_ctl_ossmixer_mask2allname(
- w->ossmask, buf, sizeof(buf)));
- if (w->ossdev >= 0) {
- printf("\n");
- return;
- }
- }
- printf("\n");
-
- for (i = 0; i < w->nconns; i++) {
- if (w->connsenable[i] == 0)
- continue;
- cw = hdac_widget_get(devinfo, w->conns[i]);
- if (cw == NULL || cw->enable == 0 || cw->bindas == -1)
- continue;
- if (printed == 0) {
- device_printf(pdevinfo->dev, "%*s |\n", 4 + (depth) * 7, "");
- printed = 1;
- }
- hdac_dump_dst_nid(pdevinfo, w->conns[i], depth + 1);
- }
-
-}
-
-static void
-hdac_dump_dac(struct hdac_pcm_devinfo *pdevinfo)
-{
- struct hdac_devinfo *devinfo = pdevinfo->devinfo;
- struct hdac_softc *sc = devinfo->codec->sc;
- struct hdac_audio_as *as;
- struct hdac_widget *w;
- int i, printed = 0;
-
- if (pdevinfo->play < 0)
- return;
-
- as = &devinfo->function.audio.as[sc->chans[pdevinfo->play].as];
- for (i = 0; i < 16; i++) {
- if (as->pins[i] <= 0)
- continue;
- w = hdac_widget_get(devinfo, as->pins[i]);
- if (w == NULL || w->enable == 0)
- continue;
- if (printed == 0) {
- printed = 1;
- device_printf(pdevinfo->dev, "\n");
- device_printf(pdevinfo->dev, "Playback:\n");
- }
- device_printf(pdevinfo->dev, "\n");
- hdac_dump_dst_nid(pdevinfo, as->pins[i], 0);
- }
-}
-
-static void
-hdac_dump_adc(struct hdac_pcm_devinfo *pdevinfo)
-{
- struct hdac_devinfo *devinfo = pdevinfo->devinfo;
- struct hdac_softc *sc = devinfo->codec->sc;
- struct hdac_widget *w;
- int i;
- int printed = 0;
-
- if (pdevinfo->rec < 0)
- return;
-
- for (i = devinfo->startnode; i < devinfo->endnode; i++) {
- w = hdac_widget_get(devinfo, i);
- if (w == NULL || w->enable == 0)
- continue;
- if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT)
- continue;
- if (w->bindas != sc->chans[pdevinfo->rec].as)
- continue;
- if (printed == 0) {
- printed = 1;
- device_printf(pdevinfo->dev, "\n");
- device_printf(pdevinfo->dev, "Record:\n");
- }
- device_printf(pdevinfo->dev, "\n");
- hdac_dump_dst_nid(pdevinfo, i, 0);
- }
-}
-
-static void
-hdac_dump_mix(struct hdac_pcm_devinfo *pdevinfo)
-{
- struct hdac_devinfo *devinfo = pdevinfo->devinfo;
- struct hdac_widget *w;
- int i;
- int printed = 0;
-
- if (pdevinfo->index != 0)
- return;
-
- for (i = devinfo->startnode; i < devinfo->endnode; i++) {
- w = hdac_widget_get(devinfo, i);
- if (w == NULL || w->enable == 0)
- continue;
- if (w->ossdev != SOUND_MIXER_IMIX)
- continue;
- if (printed == 0) {
- printed = 1;
- device_printf(pdevinfo->dev, "\n");
- device_printf(pdevinfo->dev, "Input Mix:\n");
- }
- device_printf(pdevinfo->dev, "\n");
- hdac_dump_dst_nid(pdevinfo, i, 0);
- }
-}
-
-static void
-hdac_dump_pcmchannels(struct hdac_pcm_devinfo *pdevinfo)
-{
- struct hdac_softc *sc = pdevinfo->devinfo->codec->sc;
- nid_t *nids;
- int i;
-
- if (pdevinfo->play >= 0) {
- i = pdevinfo->play;
- device_printf(pdevinfo->dev, "\n");
- device_printf(pdevinfo->dev, "Playback:\n");
- device_printf(pdevinfo->dev, "\n");
- hdac_dump_audio_formats(pdevinfo->dev, sc->chans[i].supp_stream_formats,
- sc->chans[i].supp_pcm_size_rate);
- device_printf(pdevinfo->dev, " DAC:");
- for (nids = sc->chans[i].io; *nids != -1; nids++)
- printf(" %d", *nids);
- printf("\n");
- }
- if (pdevinfo->rec >= 0) {
- i = pdevinfo->rec;
- device_printf(pdevinfo->dev, "\n");
- device_printf(pdevinfo->dev, "Record:\n");
- device_printf(pdevinfo->dev, "\n");
- hdac_dump_audio_formats(pdevinfo->dev, sc->chans[i].supp_stream_formats,
- sc->chans[i].supp_pcm_size_rate);
- device_printf(pdevinfo->dev, " ADC:");
- for (nids = sc->chans[i].io; *nids != -1; nids++)
- printf(" %d", *nids);
- printf("\n");
- }
-}
-
-static void
-hdac_release_resources(struct hdac_softc *sc)
-{
- int i, j;
-
- if (sc == NULL)
- return;
-
- hdac_lock(sc);
- sc->polling = 0;
- sc->poll_ival = 0;
- callout_stop(&sc->poll_hda);
- callout_stop(&sc->poll_hdac);
- callout_stop(&sc->poll_jack);
- hdac_reset(sc, 0);
- hdac_unlock(sc);
- taskqueue_drain(taskqueue_thread, &sc->unsolq_task);
- callout_drain(&sc->poll_hda);
- callout_drain(&sc->poll_hdac);
- callout_drain(&sc->poll_jack);
-
- hdac_irq_free(sc);
-
- for (i = 0; i < HDAC_CODEC_MAX; i++) {
- if (sc->codecs[i] == NULL)
- continue;
- for (j = 0; j < sc->codecs[i]->num_fgs; j++) {
- free(sc->codecs[i]->fgs[j].widget, M_HDAC);
- if (sc->codecs[i]->fgs[j].node_type ==
- HDA_PARAM_FCT_GRP_TYPE_NODE_TYPE_AUDIO) {
- free(sc->codecs[i]->fgs[j].function.audio.ctl,
- M_HDAC);
- free(sc->codecs[i]->fgs[j].function.audio.as,
- M_HDAC);
- free(sc->codecs[i]->fgs[j].function.audio.devs,
- M_HDAC);
- }
+ pollticks = 1;
}
- free(sc->codecs[i]->fgs, M_HDAC);
- free(sc->codecs[i], M_HDAC);
- sc->codecs[i] = NULL;
- }
-
- hdac_dma_free(sc, &sc->pos_dma);
- hdac_dma_free(sc, &sc->rirb_dma);
- hdac_dma_free(sc, &sc->corb_dma);
- for (i = 0; i < sc->num_chans; i++) {
- if (sc->chans[i].blkcnt > 0)
- hdac_dma_free(sc, &sc->chans[i].bdl_dma);
- }
- free(sc->chans, M_HDAC);
- if (sc->chan_dmat != NULL) {
- bus_dma_tag_destroy(sc->chan_dmat);
- sc->chan_dmat = NULL;
+ if (min > pollticks)
+ min = pollticks;
}
- hdac_mem_free(sc);
- snd_mtxfree(sc->lock);
-}
-
-/* This function surely going to make its way into upper level someday. */
-static void
-hdac_config_fetch(struct hdac_softc *sc, uint32_t *on, uint32_t *off)
-{
- const char *res = NULL;
- int i = 0, j, k, len, inv;
-
- if (on != NULL)
- *on = 0;
- if (off != NULL)
- *off = 0;
- if (sc == NULL)
- return;
- if (resource_string_value(device_get_name(sc->dev),
- device_get_unit(sc->dev), "config", &res) != 0)
- return;
- if (!(res != NULL && strlen(res) > 0))
- return;
HDA_BOOTVERBOSE(
- device_printf(sc->dev, "HDA Config:");
+ device_printf(sc->dev,
+ "poll interval %d -> %d ticks\n",
+ sc->poll_ival, min);
);
- for (;;) {
- while (res[i] != '\0' &&
- (res[i] == ',' || isspace(res[i]) != 0))
- i++;
- if (res[i] == '\0') {
- HDA_BOOTVERBOSE(
- printf("\n");
- );
- return;
- }
- j = i;
- while (res[j] != '\0' &&
- !(res[j] == ',' || isspace(res[j]) != 0))
- j++;
- len = j - i;
- if (len > 2 && strncmp(res + i, "no", 2) == 0)
- inv = 2;
- else
- inv = 0;
- for (k = 0; len > inv && k < HDAC_QUIRKS_TAB_LEN; k++) {
- if (strncmp(res + i + inv,
- hdac_quirks_tab[k].key, len - inv) != 0)
- continue;
- if (len - inv != strlen(hdac_quirks_tab[k].key))
- continue;
- HDA_BOOTVERBOSE(
- printf(" %s%s", (inv != 0) ? "no" : "",
- hdac_quirks_tab[k].key);
- );
- if (inv == 0 && on != NULL)
- *on |= hdac_quirks_tab[k].value;
- else if (inv != 0 && off != NULL)
- *off |= hdac_quirks_tab[k].value;
- break;
- }
- i = j;
- }
+ sc->poll_ival = min;
+ if (min == 1000000)
+ callout_stop(&sc->poll_callout);
+ else
+ callout_reset(&sc->poll_callout, 1, hdac_poll_callback, sc);
}
static int
@@ -7470,11 +1426,9 @@ sysctl_hdac_polling(SYSCTL_HANDLER_ARGS)
hdac_lock(sc);
if (val != sc->polling) {
if (val == 0) {
- callout_stop(&sc->poll_hda);
- callout_stop(&sc->poll_hdac);
+ callout_stop(&sc->poll_callout);
hdac_unlock(sc);
- callout_drain(&sc->poll_hda);
- callout_drain(&sc->poll_hdac);
+ callout_drain(&sc->poll_callout);
hdac_lock(sc);
sc->polling = 0;
ctl = HDAC_READ_4(&sc->mem, HDAC_INTCTL);
@@ -7484,12 +1438,8 @@ sysctl_hdac_polling(SYSCTL_HANDLER_ARGS)
ctl = HDAC_READ_4(&sc->mem, HDAC_INTCTL);
ctl &= ~HDAC_INTCTL_GIE;
HDAC_WRITE_4(&sc->mem, HDAC_INTCTL, ctl);
- hdac_unlock(sc);
- taskqueue_drain(taskqueue_thread, &sc->unsolq_task);
- hdac_lock(sc);
sc->polling = 1;
hdac_poll_reinit(sc);
- callout_reset(&sc->poll_hdac, 1, hdac_poll_callback, sc);
}
}
hdac_unlock(sc);
@@ -7497,202 +1447,17 @@ sysctl_hdac_polling(SYSCTL_HANDLER_ARGS)
return (err);
}
-static int
-sysctl_hdac_polling_interval(SYSCTL_HANDLER_ARGS)
-{
- struct hdac_softc *sc;
- device_t dev;
- int err, val;
-
- dev = oidp->oid_arg1;
- sc = device_get_softc(dev);
- if (sc == NULL)
- return (EINVAL);
- hdac_lock(sc);
- val = ((uint64_t)sc->poll_ival * 1000) / hz;
- hdac_unlock(sc);
- err = sysctl_handle_int(oidp, &val, 0, req);
-
- if (err != 0 || req->newptr == NULL)
- return (err);
-
- if (val < 1)
- val = 1;
- if (val > 5000)
- val = 5000;
- val = ((uint64_t)val * hz) / 1000;
- if (val < 1)
- val = 1;
- if (val > (hz * 5))
- val = hz * 5;
-
- hdac_lock(sc);
- sc->poll_ival = val;
- hdac_unlock(sc);
-
- return (err);
-}
-
-static int
-sysctl_hdac_pindump(SYSCTL_HANDLER_ARGS)
-{
- struct hdac_softc *sc;
- struct hdac_codec *codec;
- struct hdac_devinfo *devinfo;
- struct hdac_widget *w;
- device_t dev;
- uint32_t res, pincap, delay;
- int codec_index, fg_index;
- int i, err, val;
- nid_t cad;
-
- dev = oidp->oid_arg1;
- sc = device_get_softc(dev);
- if (sc == NULL)
- return (EINVAL);
- val = 0;
- err = sysctl_handle_int(oidp, &val, 0, req);
- if (err != 0 || req->newptr == NULL || val == 0)
- return (err);
-
- /* XXX: Temporary. For debugging. */
- if (val == 100) {
- hdac_suspend(dev);
- return (0);
- } else if (val == 101) {
- hdac_resume(dev);
- return (0);
- }
-
- hdac_lock(sc);
- for (codec_index = 0; codec_index < HDAC_CODEC_MAX; codec_index++) {
- codec = sc->codecs[codec_index];
- if (codec == NULL)
- continue;
- cad = codec->cad;
- for (fg_index = 0; fg_index < codec->num_fgs; fg_index++) {
- devinfo = &codec->fgs[fg_index];
- if (devinfo->node_type !=
- HDA_PARAM_FCT_GRP_TYPE_NODE_TYPE_AUDIO)
- continue;
-
- device_printf(dev, "Dumping AFG cad=%d nid=%d pins:\n",
- codec_index, devinfo->nid);
- for (i = devinfo->startnode; i < devinfo->endnode; i++) {
- w = hdac_widget_get(devinfo, i);
- if (w == NULL || w->type !=
- HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
- continue;
- hdac_dump_pin_config(w, w->wclass.pin.config);
- pincap = w->wclass.pin.cap;
- device_printf(dev, " Caps: %2s %3s %2s %4s %4s",
- HDA_PARAM_PIN_CAP_INPUT_CAP(pincap)?"IN":"",
- HDA_PARAM_PIN_CAP_OUTPUT_CAP(pincap)?"OUT":"",
- HDA_PARAM_PIN_CAP_HEADPHONE_CAP(pincap)?"HP":"",
- HDA_PARAM_PIN_CAP_EAPD_CAP(pincap)?"EAPD":"",
- HDA_PARAM_PIN_CAP_VREF_CTRL(pincap)?"VREF":"");
- if (HDA_PARAM_PIN_CAP_IMP_SENSE_CAP(pincap) ||
- HDA_PARAM_PIN_CAP_PRESENCE_DETECT_CAP(pincap)) {
- if (HDA_PARAM_PIN_CAP_TRIGGER_REQD(pincap)) {
- delay = 0;
- hdac_command(sc,
- HDA_CMD_SET_PIN_SENSE(cad, w->nid, 0), cad);
- do {
- res = hdac_command(sc,
- HDA_CMD_GET_PIN_SENSE(cad, w->nid), cad);
- if (res != 0x7fffffff && res != 0xffffffff)
- break;
- DELAY(10);
- } while (++delay < 10000);
- } else {
- delay = 0;
- res = hdac_command(sc, HDA_CMD_GET_PIN_SENSE(cad,
- w->nid), cad);
- }
- printf(" Sense: 0x%08x", res);
- if (delay > 0)
- printf(" delay %dus", delay * 10);
- }
- printf("\n");
- }
- device_printf(dev,
- "NumGPIO=%d NumGPO=%d NumGPI=%d GPIWake=%d GPIUnsol=%d\n",
- HDA_PARAM_GPIO_COUNT_NUM_GPIO(devinfo->function.audio.gpio),
- HDA_PARAM_GPIO_COUNT_NUM_GPO(devinfo->function.audio.gpio),
- HDA_PARAM_GPIO_COUNT_NUM_GPI(devinfo->function.audio.gpio),
- HDA_PARAM_GPIO_COUNT_GPI_WAKE(devinfo->function.audio.gpio),
- HDA_PARAM_GPIO_COUNT_GPI_UNSOL(devinfo->function.audio.gpio));
- if (HDA_PARAM_GPIO_COUNT_NUM_GPI(devinfo->function.audio.gpio) > 0) {
- device_printf(dev, " GPI:");
- res = hdac_command(sc,
- HDA_CMD_GET_GPI_DATA(cad, devinfo->nid), cad);
- printf(" data=0x%08x", res);
- res = hdac_command(sc,
- HDA_CMD_GET_GPI_WAKE_ENABLE_MASK(cad, devinfo->nid),
- cad);
- printf(" wake=0x%08x", res);
- res = hdac_command(sc,
- HDA_CMD_GET_GPI_UNSOLICITED_ENABLE_MASK(cad, devinfo->nid),
- cad);
- printf(" unsol=0x%08x", res);
- res = hdac_command(sc,
- HDA_CMD_GET_GPI_STICKY_MASK(cad, devinfo->nid), cad);
- printf(" sticky=0x%08x\n", res);
- }
- if (HDA_PARAM_GPIO_COUNT_NUM_GPO(devinfo->function.audio.gpio) > 0) {
- device_printf(dev, " GPO:");
- res = hdac_command(sc,
- HDA_CMD_GET_GPO_DATA(cad, devinfo->nid), cad);
- printf(" data=0x%08x\n", res);
- }
- if (HDA_PARAM_GPIO_COUNT_NUM_GPIO(devinfo->function.audio.gpio) > 0) {
- device_printf(dev, "GPIO:");
- res = hdac_command(sc,
- HDA_CMD_GET_GPIO_DATA(cad, devinfo->nid), cad);
- printf(" data=0x%08x", res);
- res = hdac_command(sc,
- HDA_CMD_GET_GPIO_ENABLE_MASK(cad, devinfo->nid), cad);
- printf(" enable=0x%08x", res);
- res = hdac_command(sc,
- HDA_CMD_GET_GPIO_DIRECTION(cad, devinfo->nid), cad);
- printf(" direction=0x%08x\n", res);
- res = hdac_command(sc,
- HDA_CMD_GET_GPIO_WAKE_ENABLE_MASK(cad, devinfo->nid), cad);
- device_printf(dev, " wake=0x%08x", res);
- res = hdac_command(sc,
- HDA_CMD_GET_GPIO_UNSOLICITED_ENABLE_MASK(cad, devinfo->nid),
- cad);
- printf(" unsol=0x%08x", res);
- res = hdac_command(sc,
- HDA_CMD_GET_GPIO_STICKY_MASK(cad, devinfo->nid), cad);
- printf(" sticky=0x%08x\n", res);
- }
- }
- }
- hdac_unlock(sc);
- return (0);
-}
-
static void
hdac_attach2(void *arg)
{
- struct hdac_codec *codec;
struct hdac_softc *sc;
- struct hdac_audio_ctl *ctl;
- uint32_t quirks_on, quirks_off;
- int codec_index, fg_index;
- int i, dmaalloc = 0;
- struct hdac_devinfo *devinfo;
+ device_t child;
+ uint32_t vendorid, revisionid;
+ int i;
+ uint16_t statests;
sc = (struct hdac_softc *)arg;
- hdac_config_fetch(sc, &quirks_on, &quirks_off);
-
- HDA_BOOTHVERBOSE(
- device_printf(sc->dev, "HDA Config: on=0x%08x off=0x%08x\n",
- quirks_on, quirks_off);
- );
-
hdac_lock(sc);
/* Remove ourselves from the config hooks */
@@ -7701,7 +1466,6 @@ hdac_attach2(void *arg)
sc->intrhook.ich_func = NULL;
}
- /* Start the corb and rirb engines */
HDA_BOOTHVERBOSE(
device_printf(sc->dev, "Starting CORB Engine...\n");
);
@@ -7710,7 +1474,6 @@ hdac_attach2(void *arg)
device_printf(sc->dev, "Starting RIRB Engine...\n");
);
hdac_rirb_start(sc);
-
HDA_BOOTHVERBOSE(
device_printf(sc->dev,
"Enabling controller interrupt...\n");
@@ -7720,218 +1483,60 @@ hdac_attach2(void *arg)
if (sc->polling == 0) {
HDAC_WRITE_4(&sc->mem, HDAC_INTCTL,
HDAC_INTCTL_CIE | HDAC_INTCTL_GIE);
- } else {
- callout_reset(&sc->poll_hdac, 1, hdac_poll_callback, sc);
}
DELAY(1000);
HDA_BOOTHVERBOSE(
- device_printf(sc->dev,
- "Scanning HDA codecs ...\n");
+ device_printf(sc->dev, "Scanning HDA codecs ...\n");
);
- hdac_scan_codecs(sc);
-
- for (codec_index = 0; codec_index < HDAC_CODEC_MAX; codec_index++) {
- codec = sc->codecs[codec_index];
- if (codec == NULL)
- continue;
- for (fg_index = 0; fg_index < codec->num_fgs; fg_index++) {
- devinfo = &codec->fgs[fg_index];
- HDA_BOOTVERBOSE(
- device_printf(sc->dev, "\n");
+ statests = HDAC_READ_2(&sc->mem, HDAC_STATESTS);
+ hdac_unlock(sc);
+ for (i = 0; i < HDAC_CODEC_MAX; i++) {
+ if (HDAC_STATESTS_SDIWAKE(statests, i)) {
+ HDA_BOOTHVERBOSE(
device_printf(sc->dev,
- "Processing %s FG cad=%d nid=%d...\n",
- (devinfo->node_type == HDA_PARAM_FCT_GRP_TYPE_NODE_TYPE_AUDIO) ? "audio":
- (devinfo->node_type == HDA_PARAM_FCT_GRP_TYPE_NODE_TYPE_MODEM) ? "modem":
- "unknown",
- devinfo->codec->cad, devinfo->nid);
+ "Found CODEC at address %d\n", i);
);
- if (devinfo->node_type !=
- HDA_PARAM_FCT_GRP_TYPE_NODE_TYPE_AUDIO) {
- HDA_BOOTHVERBOSE(
- device_printf(sc->dev,
- "Powering down...\n");
- );
- hdac_command(sc,
- HDA_CMD_SET_POWER_STATE(codec->cad,
- devinfo->nid, HDA_CMD_POWER_STATE_D3),
- codec->cad);
+ hdac_lock(sc);
+ vendorid = hdac_send_command(sc, i,
+ HDA_CMD_GET_PARAMETER(0, 0x0, HDA_PARAM_VENDOR_ID));
+ revisionid = hdac_send_command(sc, i,
+ HDA_CMD_GET_PARAMETER(0, 0x0, HDA_PARAM_REVISION_ID));
+ hdac_unlock(sc);
+ if (vendorid == HDA_INVALID &&
+ revisionid == HDA_INVALID) {
+ device_printf(sc->dev,
+ "CODEC is not responding!\n");
continue;
}
-
- HDA_BOOTHVERBOSE(
- device_printf(sc->dev, "Powering up...\n");
- );
- hdac_powerup(devinfo);
- HDA_BOOTHVERBOSE(
- device_printf(sc->dev, "Parsing audio FG...\n");
- );
- hdac_audio_parse(devinfo);
- HDA_BOOTHVERBOSE(
- device_printf(sc->dev, "Parsing Ctls...\n");
- );
- hdac_audio_ctl_parse(devinfo);
- HDA_BOOTHVERBOSE(
- device_printf(sc->dev, "Parsing vendor patch...\n");
- );
- hdac_vendor_patch_parse(devinfo);
- devinfo->function.audio.quirks |= quirks_on;
- devinfo->function.audio.quirks &= ~quirks_off;
-
- HDA_BOOTHVERBOSE(
- device_printf(sc->dev, "Disabling nonaudio...\n");
- );
- hdac_audio_disable_nonaudio(devinfo);
- HDA_BOOTHVERBOSE(
- device_printf(sc->dev, "Disabling useless...\n");
- );
- hdac_audio_disable_useless(devinfo);
- HDA_BOOTVERBOSE(
- device_printf(sc->dev, "Patched pins configuration:\n");
- hdac_dump_pin_configs(devinfo);
- );
- HDA_BOOTHVERBOSE(
- device_printf(sc->dev, "Parsing pin associations...\n");
- );
- hdac_audio_as_parse(devinfo);
- HDA_BOOTHVERBOSE(
- device_printf(sc->dev, "Building AFG tree...\n");
- );
- hdac_audio_build_tree(devinfo);
- HDA_BOOTHVERBOSE(
- device_printf(sc->dev, "Disabling unassociated "
- "widgets...\n");
- );
- hdac_audio_disable_unas(devinfo);
- HDA_BOOTHVERBOSE(
- device_printf(sc->dev, "Disabling nonselected "
- "inputs...\n");
- );
- hdac_audio_disable_notselected(devinfo);
- HDA_BOOTHVERBOSE(
- device_printf(sc->dev, "Disabling useless...\n");
- );
- hdac_audio_disable_useless(devinfo);
- HDA_BOOTHVERBOSE(
- device_printf(sc->dev, "Disabling "
- "crossassociatement connections...\n");
- );
- hdac_audio_disable_crossas(devinfo);
- HDA_BOOTHVERBOSE(
- device_printf(sc->dev, "Disabling useless...\n");
- );
- hdac_audio_disable_useless(devinfo);
- HDA_BOOTHVERBOSE(
- device_printf(sc->dev, "Binding associations to channels...\n");
- );
- hdac_audio_bind_as(devinfo);
- HDA_BOOTHVERBOSE(
- device_printf(sc->dev, "Assigning names to signal sources...\n");
- );
- hdac_audio_assign_names(devinfo);
- HDA_BOOTHVERBOSE(
- device_printf(sc->dev, "Assigning mixers to the tree...\n");
- );
- hdac_audio_assign_mixers(devinfo);
- HDA_BOOTHVERBOSE(
- device_printf(sc->dev, "Preparing pin controls...\n");
- );
- hdac_audio_prepare_pin_ctrl(devinfo);
- HDA_BOOTHVERBOSE(
- device_printf(sc->dev, "AFG commit...\n");
- );
- hdac_audio_commit(devinfo);
- HDA_BOOTHVERBOSE(
- device_printf(sc->dev, "HP switch init...\n");
- );
- hdac_hp_switch_init(devinfo);
-
- if ((devinfo->function.audio.quirks & HDA_QUIRK_DMAPOS) &&
- dmaalloc == 0) {
- if (hdac_dma_alloc(sc, &sc->pos_dma,
- (sc->num_iss + sc->num_oss + sc->num_bss) * 8) != 0) {
- HDA_BOOTVERBOSE(
- device_printf(sc->dev, "Failed to "
- "allocate DMA pos buffer "
- "(non-fatal)\n");
- );
- } else
- dmaalloc = 1;
+ sc->codecs[i].vendor_id =
+ HDA_PARAM_VENDOR_ID_VENDOR_ID(vendorid);
+ sc->codecs[i].device_id =
+ HDA_PARAM_VENDOR_ID_DEVICE_ID(vendorid);
+ sc->codecs[i].revision_id =
+ HDA_PARAM_REVISION_ID_REVISION_ID(revisionid);
+ sc->codecs[i].stepping_id =
+ HDA_PARAM_REVISION_ID_STEPPING_ID(revisionid);
+ child = device_add_child(sc->dev, "hdacc", -1);
+ if (child == NULL) {
+ device_printf(sc->dev,
+ "Failed to add CODEC device\n");
+ continue;
}
-
- HDA_BOOTHVERBOSE(
- device_printf(sc->dev, "Creating PCM devices...\n");
- );
- hdac_create_pcms(devinfo);
-
- HDA_BOOTVERBOSE(
- if (devinfo->function.audio.quirks != 0) {
- device_printf(sc->dev, "FG config/quirks:");
- for (i = 0; i < HDAC_QUIRKS_TAB_LEN; i++) {
- if ((devinfo->function.audio.quirks &
- hdac_quirks_tab[i].value) ==
- hdac_quirks_tab[i].value)
- printf(" %s", hdac_quirks_tab[i].key);
- }
- printf("\n");
- }
-
- device_printf(sc->dev, "\n");
- device_printf(sc->dev, "+-------------------+\n");
- device_printf(sc->dev, "| DUMPING HDA NODES |\n");
- device_printf(sc->dev, "+-------------------+\n");
- hdac_dump_nodes(devinfo);
- );
-
- HDA_BOOTHVERBOSE(
- device_printf(sc->dev, "\n");
- device_printf(sc->dev, "+------------------------+\n");
- device_printf(sc->dev, "| DUMPING HDA AMPLIFIERS |\n");
- device_printf(sc->dev, "+------------------------+\n");
- device_printf(sc->dev, "\n");
- i = 0;
- while ((ctl = hdac_audio_ctl_each(devinfo, &i)) != NULL) {
- device_printf(sc->dev, "%3d: nid %3d %s (%s) index %d", i,
- (ctl->widget != NULL) ? ctl->widget->nid : -1,
- (ctl->ndir == HDA_CTL_IN)?"in ":"out",
- (ctl->dir == HDA_CTL_IN)?"in ":"out",
- ctl->index);
- if (ctl->childwidget != NULL)
- printf(" cnid %3d", ctl->childwidget->nid);
- else
- printf(" ");
- printf(" ossmask=0x%08x\n",
- ctl->ossmask);
- device_printf(sc->dev,
- " mute: %d step: %3d size: %3d off: %3d%s\n",
- ctl->mute, ctl->step, ctl->size, ctl->offset,
- (ctl->enable == 0) ? " [DISABLED]" :
- ((ctl->ossmask == 0) ? " [UNUSED]" : ""));
- }
- );
+ device_set_ivars(child, (void *)(intptr_t)i);
+ sc->codecs[i].dev = child;
}
}
- hdac_unlock(sc);
-
- HDA_BOOTVERBOSE(
- device_printf(sc->dev, "\n");
- );
-
bus_generic_attach(sc->dev);
SYSCTL_ADD_PROC(device_get_sysctl_ctx(sc->dev),
SYSCTL_CHILDREN(device_get_sysctl_tree(sc->dev)), OID_AUTO,
- "polling", CTLTYPE_INT | CTLFLAG_RW, sc->dev, sizeof(sc->dev),
- sysctl_hdac_polling, "I", "Enable polling mode");
- SYSCTL_ADD_PROC(device_get_sysctl_ctx(sc->dev),
- SYSCTL_CHILDREN(device_get_sysctl_tree(sc->dev)), OID_AUTO,
- "polling_interval", CTLTYPE_INT | CTLFLAG_RW, sc->dev,
- sizeof(sc->dev), sysctl_hdac_polling_interval, "I",
- "Controller/Jack Sense polling interval (1-1000 ms)");
- SYSCTL_ADD_PROC(device_get_sysctl_ctx(sc->dev),
- SYSCTL_CHILDREN(device_get_sysctl_tree(sc->dev)), OID_AUTO,
"pindump", CTLTYPE_INT | CTLFLAG_RW, sc->dev, sizeof(sc->dev),
sysctl_hdac_pindump, "I", "Dump pin states/data");
+ SYSCTL_ADD_PROC(device_get_sysctl_ctx(sc->dev),
+ SYSCTL_CHILDREN(device_get_sysctl_tree(sc->dev)), OID_AUTO,
+ "polling", CTLTYPE_INT | CTLFLAG_RW, sc->dev, sizeof(sc->dev),
+ sysctl_hdac_polling, "I", "Enable polling mode");
}
/****************************************************************************
@@ -7942,64 +1547,23 @@ hdac_attach2(void *arg)
static int
hdac_suspend(device_t dev)
{
- struct hdac_softc *sc;
- struct hdac_codec *codec;
- struct hdac_devinfo *devinfo;
- int codec_index, fg_index, i;
+ struct hdac_softc *sc = device_get_softc(dev);
HDA_BOOTHVERBOSE(
device_printf(dev, "Suspend...\n");
);
+ bus_generic_suspend(dev);
- sc = device_get_softc(dev);
hdac_lock(sc);
-
- HDA_BOOTHVERBOSE(
- device_printf(dev, "Stop streams...\n");
- );
- for (i = 0; i < sc->num_chans; i++) {
- if (sc->chans[i].flags & HDAC_CHN_RUNNING) {
- sc->chans[i].flags |= HDAC_CHN_SUSPEND;
- hdac_channel_stop(sc, &sc->chans[i]);
- }
- }
-
- for (codec_index = 0; codec_index < HDAC_CODEC_MAX; codec_index++) {
- codec = sc->codecs[codec_index];
- if (codec == NULL)
- continue;
- for (fg_index = 0; fg_index < codec->num_fgs; fg_index++) {
- devinfo = &codec->fgs[fg_index];
- HDA_BOOTHVERBOSE(
- device_printf(dev,
- "Power down FG"
- " cad=%d nid=%d to the D3 state...\n",
- codec->cad, devinfo->nid);
- );
- hdac_command(sc,
- HDA_CMD_SET_POWER_STATE(codec->cad,
- devinfo->nid, HDA_CMD_POWER_STATE_D3),
- codec->cad);
- }
- }
-
HDA_BOOTHVERBOSE(
device_printf(dev, "Reset controller...\n");
);
- callout_stop(&sc->poll_hda);
- callout_stop(&sc->poll_hdac);
- callout_stop(&sc->poll_jack);
hdac_reset(sc, 0);
hdac_unlock(sc);
taskqueue_drain(taskqueue_thread, &sc->unsolq_task);
- callout_drain(&sc->poll_hda);
- callout_drain(&sc->poll_hdac);
- callout_drain(&sc->poll_jack);
-
HDA_BOOTHVERBOSE(
device_printf(dev, "Suspend done\n");
);
-
return (0);
}
@@ -8011,16 +1575,12 @@ hdac_suspend(device_t dev)
static int
hdac_resume(device_t dev)
{
- struct hdac_softc *sc;
- struct hdac_codec *codec;
- struct hdac_devinfo *devinfo;
- int codec_index, fg_index, i;
+ struct hdac_softc *sc = device_get_softc(dev);
+ int error;
HDA_BOOTHVERBOSE(
device_printf(dev, "Resume...\n");
);
-
- sc = device_get_softc(dev);
hdac_lock(sc);
/* Quiesce everything */
@@ -8033,7 +1593,6 @@ hdac_resume(device_t dev)
hdac_corb_init(sc);
hdac_rirb_init(sc);
- /* Start the corb and rirb engines */
HDA_BOOTHVERBOSE(
device_printf(dev, "Starting CORB Engine...\n");
);
@@ -8042,91 +1601,22 @@ hdac_resume(device_t dev)
device_printf(dev, "Starting RIRB Engine...\n");
);
hdac_rirb_start(sc);
-
HDA_BOOTHVERBOSE(
- device_printf(dev,
- "Enabling controller interrupt...\n");
+ device_printf(dev, "Enabling controller interrupt...\n");
);
HDAC_WRITE_4(&sc->mem, HDAC_GCTL, HDAC_READ_4(&sc->mem, HDAC_GCTL) |
HDAC_GCTL_UNSOL);
- if (sc->polling == 0) {
- HDAC_WRITE_4(&sc->mem, HDAC_INTCTL,
- HDAC_INTCTL_CIE | HDAC_INTCTL_GIE);
- } else {
- callout_reset(&sc->poll_hdac, 1, hdac_poll_callback, sc);
- }
+ HDAC_WRITE_4(&sc->mem, HDAC_INTCTL, HDAC_INTCTL_CIE | HDAC_INTCTL_GIE);
DELAY(1000);
-
- for (codec_index = 0; codec_index < HDAC_CODEC_MAX; codec_index++) {
- codec = sc->codecs[codec_index];
- if (codec == NULL)
- continue;
- for (fg_index = 0; fg_index < codec->num_fgs; fg_index++) {
- devinfo = &codec->fgs[fg_index];
- if (devinfo->node_type !=
- HDA_PARAM_FCT_GRP_TYPE_NODE_TYPE_AUDIO) {
- HDA_BOOTHVERBOSE(
- device_printf(dev,
- "Power down unsupported non-audio FG"
- " cad=%d nid=%d to the D3 state...\n",
- codec->cad, devinfo->nid);
- );
- hdac_command(sc,
- HDA_CMD_SET_POWER_STATE(codec->cad,
- devinfo->nid, HDA_CMD_POWER_STATE_D3),
- codec->cad);
- continue;
- }
-
- HDA_BOOTHVERBOSE(
- device_printf(dev,
- "Power up audio FG cad=%d nid=%d...\n",
- devinfo->codec->cad, devinfo->nid);
- );
- hdac_powerup(devinfo);
- HDA_BOOTHVERBOSE(
- device_printf(dev, "AFG commit...\n");
- );
- hdac_audio_commit(devinfo);
- HDA_BOOTHVERBOSE(
- device_printf(dev, "HP switch init...\n");
- );
- hdac_hp_switch_init(devinfo);
-
- hdac_unlock(sc);
- for (i = 0; i < devinfo->function.audio.num_devs; i++) {
- struct hdac_pcm_devinfo *pdevinfo =
- &devinfo->function.audio.devs[i];
- HDA_BOOTHVERBOSE(
- device_printf(pdevinfo->dev,
- "OSS mixer reinitialization...\n");
- );
- if (mixer_reinit(pdevinfo->dev) == -1)
- device_printf(pdevinfo->dev,
- "unable to reinitialize the mixer\n");
- }
- hdac_lock(sc);
- }
- }
-
- HDA_BOOTHVERBOSE(
- device_printf(dev, "Start streams...\n");
- );
- for (i = 0; i < sc->num_chans; i++) {
- if (sc->chans[i].flags & HDAC_CHN_SUSPEND) {
- sc->chans[i].flags &= ~HDAC_CHN_SUSPEND;
- hdac_channel_start(sc, &sc->chans[i]);
- }
- }
-
hdac_unlock(sc);
+ error = bus_generic_resume(dev);
HDA_BOOTHVERBOSE(
device_printf(dev, "Resume done\n");
);
-
- return (0);
+ return (error);
}
+
/****************************************************************************
* int hdac_detach(device_t)
*
@@ -8135,204 +1625,441 @@ hdac_resume(device_t dev)
static int
hdac_detach(device_t dev)
{
- struct hdac_softc *sc;
+ struct hdac_softc *sc = device_get_softc(dev);
device_t *devlist;
- int i, devcount, error;
+ int cad, i, devcount, error;
if ((error = device_get_children(dev, &devlist, &devcount)) != 0)
return (error);
for (i = 0; i < devcount; i++) {
+ cad = (intptr_t)device_get_ivars(devlist[i]);
if ((error = device_delete_child(dev, devlist[i])) != 0) {
free(devlist, M_TEMP);
return (error);
}
+ sc->codecs[cad].dev = NULL;
}
free(devlist, M_TEMP);
- sc = device_get_softc(dev);
- hdac_release_resources(sc);
+ hdac_lock(sc);
+ hdac_reset(sc, 0);
+ hdac_unlock(sc);
+ taskqueue_drain(taskqueue_thread, &sc->unsolq_task);
+ hdac_irq_free(sc);
+ for (i = 0; i < sc->num_ss; i++)
+ hdac_dma_free(sc, &sc->streams[i].bdl);
+ free(sc->streams, M_HDAC);
+ hdac_dma_free(sc, &sc->pos_dma);
+ hdac_dma_free(sc, &sc->rirb_dma);
+ hdac_dma_free(sc, &sc->corb_dma);
+ if (sc->chan_dmat != NULL) {
+ bus_dma_tag_destroy(sc->chan_dmat);
+ sc->chan_dmat = NULL;
+ }
+ hdac_mem_free(sc);
+ snd_mtxfree(sc->lock);
return (0);
}
+static bus_dma_tag_t
+hdac_get_dma_tag(device_t dev, device_t child)
+{
+ struct hdac_softc *sc = device_get_softc(dev);
+
+ return (sc->chan_dmat);
+}
+
static int
hdac_print_child(device_t dev, device_t child)
{
- struct hdac_pcm_devinfo *pdevinfo =
- (struct hdac_pcm_devinfo *)device_get_ivars(child);
int retval;
retval = bus_print_child_header(dev, child);
- retval += printf(" at cad %d nid %d",
- pdevinfo->devinfo->codec->cad, pdevinfo->devinfo->nid);
+ retval += printf(" at cad %d",
+ (int)(intptr_t)device_get_ivars(child));
retval += bus_print_child_footer(dev, child);
return (retval);
}
-static device_method_t hdac_methods[] = {
- /* device interface */
- DEVMETHOD(device_probe, hdac_probe),
- DEVMETHOD(device_attach, hdac_attach),
- DEVMETHOD(device_detach, hdac_detach),
- DEVMETHOD(device_suspend, hdac_suspend),
- DEVMETHOD(device_resume, hdac_resume),
- /* Bus interface */
- DEVMETHOD(bus_print_child, hdac_print_child),
- { 0, 0 }
-};
+static int
+hdac_child_location_str(device_t dev, device_t child, char *buf,
+ size_t buflen)
+{
-static driver_t hdac_driver = {
- "hdac",
- hdac_methods,
- sizeof(struct hdac_softc),
-};
+ snprintf(buf, buflen, "cad=%d",
+ (int)(intptr_t)device_get_ivars(child));
+ return (0);
+}
-static devclass_t hdac_devclass;
+static int
+hdac_child_pnpinfo_str_method(device_t dev, device_t child, char *buf,
+ size_t buflen)
+{
+ struct hdac_softc *sc = device_get_softc(dev);
+ nid_t cad = (uintptr_t)device_get_ivars(child);
-DRIVER_MODULE(snd_hda, pci, hdac_driver, hdac_devclass, 0, 0);
-MODULE_DEPEND(snd_hda, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER);
-MODULE_VERSION(snd_hda, 1);
+ snprintf(buf, buflen, "vendor=0x%04x device=0x%04x revision=0x%02x "
+ "stepping=0x%02x",
+ sc->codecs[cad].vendor_id, sc->codecs[cad].device_id,
+ sc->codecs[cad].revision_id, sc->codecs[cad].stepping_id);
+ return (0);
+}
static int
-hdac_pcm_probe(device_t dev)
+hdac_read_ivar(device_t dev, device_t child, int which, uintptr_t *result)
{
- struct hdac_pcm_devinfo *pdevinfo =
- (struct hdac_pcm_devinfo *)device_get_ivars(dev);
- char buf[128];
-
- snprintf(buf, sizeof(buf), "HDA %s PCM #%d %s",
- hdac_codec_name(pdevinfo->devinfo->codec),
- pdevinfo->index,
- (pdevinfo->digital == 3)?"DisplayPort":
- ((pdevinfo->digital == 2)?"HDMI":
- ((pdevinfo->digital)?"Digital":"Analog")));
- device_set_desc_copy(dev, buf);
+ struct hdac_softc *sc = device_get_softc(dev);
+ nid_t cad = (uintptr_t)device_get_ivars(child);
+
+ switch (which) {
+ case HDA_IVAR_CODEC_ID:
+ *result = cad;
+ break;
+ case HDA_IVAR_VENDOR_ID:
+ *result = sc->codecs[cad].vendor_id;
+ break;
+ case HDA_IVAR_DEVICE_ID:
+ *result = sc->codecs[cad].device_id;
+ break;
+ case HDA_IVAR_REVISION_ID:
+ *result = sc->codecs[cad].revision_id;
+ break;
+ case HDA_IVAR_STEPPING_ID:
+ *result = sc->codecs[cad].stepping_id;
+ break;
+ case HDA_IVAR_SUBVENDOR_ID:
+ *result = pci_get_subvendor(dev);
+ break;
+ case HDA_IVAR_SUBDEVICE_ID:
+ *result = pci_get_subdevice(dev);
+ break;
+ case HDA_IVAR_DMA_NOCACHE:
+ *result = (sc->flags & HDAC_F_DMA_NOCACHE) != 0;
+ break;
+ default:
+ return (ENOENT);
+ }
return (0);
}
+static struct mtx *
+hdac_get_mtx(device_t dev, device_t child)
+{
+ struct hdac_softc *sc = device_get_softc(dev);
+
+ return (sc->lock);
+}
+
+static uint32_t
+hdac_codec_command(device_t dev, device_t child, uint32_t verb)
+{
+
+ return (hdac_send_command(device_get_softc(dev),
+ (intptr_t)device_get_ivars(child), verb));
+}
+
static int
-hdac_pcm_attach(device_t dev)
+hdac_find_stream(struct hdac_softc *sc, int dir, int stream)
{
- struct hdac_pcm_devinfo *pdevinfo =
- (struct hdac_pcm_devinfo *)device_get_ivars(dev);
- struct hdac_softc *sc = pdevinfo->devinfo->codec->sc;
- char status[SND_STATUSLEN];
- int i;
+ int i, ss;
- pdevinfo->chan_size = pcm_getbuffersize(dev,
- HDA_BUFSZ_MIN, HDA_BUFSZ_DEFAULT, HDA_BUFSZ_MAX);
+ ss = -1;
+ /* Allocate ISS/BSS first. */
+ if (dir == 0) {
+ for (i = 0; i < sc->num_iss; i++) {
+ if (sc->streams[i].stream == stream) {
+ ss = i;
+ break;
+ }
+ }
+ } else {
+ for (i = 0; i < sc->num_oss; i++) {
+ if (sc->streams[i + sc->num_iss].stream == stream) {
+ ss = i + sc->num_iss;
+ break;
+ }
+ }
+ }
+ /* Fallback to BSS. */
+ if (ss == -1) {
+ for (i = 0; i < sc->num_bss; i++) {
+ if (sc->streams[i + sc->num_iss + sc->num_oss].stream
+ == stream) {
+ ss = i + sc->num_iss + sc->num_oss;
+ break;
+ }
+ }
+ }
+ return (ss);
+}
- HDA_BOOTVERBOSE(
- device_printf(dev, "+--------------------------------------+\n");
- device_printf(dev, "| DUMPING PCM Playback/Record Channels |\n");
- device_printf(dev, "+--------------------------------------+\n");
- hdac_dump_pcmchannels(pdevinfo);
- device_printf(dev, "\n");
- device_printf(dev, "+-------------------------------+\n");
- device_printf(dev, "| DUMPING Playback/Record Paths |\n");
- device_printf(dev, "+-------------------------------+\n");
- hdac_dump_dac(pdevinfo);
- hdac_dump_adc(pdevinfo);
- hdac_dump_mix(pdevinfo);
- device_printf(dev, "\n");
- device_printf(dev, "+-------------------------+\n");
- device_printf(dev, "| DUMPING Volume Controls |\n");
- device_printf(dev, "+-------------------------+\n");
- hdac_dump_ctls(pdevinfo, "Master Volume", SOUND_MASK_VOLUME);
- hdac_dump_ctls(pdevinfo, "PCM Volume", SOUND_MASK_PCM);
- hdac_dump_ctls(pdevinfo, "CD Volume", SOUND_MASK_CD);
- hdac_dump_ctls(pdevinfo, "Microphone Volume", SOUND_MASK_MIC);
- hdac_dump_ctls(pdevinfo, "Microphone2 Volume", SOUND_MASK_MONITOR);
- hdac_dump_ctls(pdevinfo, "Line-in Volume", SOUND_MASK_LINE);
- hdac_dump_ctls(pdevinfo, "Speaker/Beep Volume", SOUND_MASK_SPEAKER);
- hdac_dump_ctls(pdevinfo, "Recording Level", SOUND_MASK_RECLEV);
- hdac_dump_ctls(pdevinfo, "Input Mix Level", SOUND_MASK_IMIX);
- hdac_dump_ctls(pdevinfo, "Input Monitoring Level", SOUND_MASK_IGAIN);
- hdac_dump_ctls(pdevinfo, NULL, 0);
- device_printf(dev, "\n");
- );
+static int
+hdac_stream_alloc(device_t dev, device_t child, int dir, int format, int stripe,
+ uint32_t **dmapos)
+{
+ struct hdac_softc *sc = device_get_softc(dev);
+ nid_t cad = (uintptr_t)device_get_ivars(child);
+ int stream, ss, bw, maxbw, prevbw;
- if (resource_int_value(device_get_name(dev),
- device_get_unit(dev), "blocksize", &i) == 0 && i > 0) {
- i &= HDA_BLK_ALIGN;
- if (i < HDA_BLK_MIN)
- i = HDA_BLK_MIN;
- pdevinfo->chan_blkcnt = pdevinfo->chan_size / i;
- i = 0;
- while (pdevinfo->chan_blkcnt >> i)
- i++;
- pdevinfo->chan_blkcnt = 1 << (i - 1);
- if (pdevinfo->chan_blkcnt < HDA_BDL_MIN)
- pdevinfo->chan_blkcnt = HDA_BDL_MIN;
- else if (pdevinfo->chan_blkcnt > HDA_BDL_MAX)
- pdevinfo->chan_blkcnt = HDA_BDL_MAX;
- } else
- pdevinfo->chan_blkcnt = HDA_BDL_DEFAULT;
-
- /*
- * We don't register interrupt handler with snd_setup_intr
- * in pcm device. Mark pcm device as MPSAFE manually.
- */
- pcm_setflags(dev, pcm_getflags(dev) | SD_F_MPSAFE);
+ /* Look for empty stream. */
+ ss = hdac_find_stream(sc, dir, 0);
- HDA_BOOTHVERBOSE(
- device_printf(dev, "OSS mixer initialization...\n");
- );
- if (mixer_init(dev, &hdac_audio_ctl_ossmixer_class, pdevinfo) != 0)
- device_printf(dev, "Can't register mixer\n");
+ /* Return if found nothing. */
+ if (ss < 0)
+ return (0);
+ /* Check bus bandwidth. */
+ bw = hdac_bdata_rate(format, dir);
+ if (dir == 1) {
+ bw *= 1 << (sc->num_sdo - stripe);
+ prevbw = sc->sdo_bw_used;
+ maxbw = 48000 * 960 * (1 << sc->num_sdo);
+ } else {
+ prevbw = sc->codecs[cad].sdi_bw_used;
+ maxbw = 48000 * 464;
+ }
HDA_BOOTHVERBOSE(
- device_printf(dev, "Registering PCM channels...\n");
+ device_printf(dev, "%dKbps of %dKbps bandwidth used%s\n",
+ (bw + prevbw) / 1000, maxbw / 1000,
+ bw + prevbw > maxbw ? " -- OVERFLOW!" : "");
);
- if (pcm_register(dev, pdevinfo, (pdevinfo->play >= 0)?1:0,
- (pdevinfo->rec >= 0)?1:0) != 0)
- device_printf(dev, "Can't register PCM\n");
-
- pdevinfo->registered++;
+ if (bw + prevbw > maxbw)
+ return (0);
+ if (dir == 1)
+ sc->sdo_bw_used += bw;
+ else
+ sc->codecs[cad].sdi_bw_used += bw;
- if (pdevinfo->play >= 0)
- pcm_addchan(dev, PCMDIR_PLAY, &hdac_channel_class, pdevinfo);
- if (pdevinfo->rec >= 0)
- pcm_addchan(dev, PCMDIR_REC, &hdac_channel_class, pdevinfo);
+ /* Allocate stream number */
+ if (ss >= sc->num_iss + sc->num_oss)
+ stream = 15 - (ss - sc->num_iss + sc->num_oss);
+ else if (ss >= sc->num_iss)
+ stream = ss - sc->num_iss + 1;
+ else
+ stream = ss + 1;
+
+ sc->streams[ss].dev = child;
+ sc->streams[ss].dir = dir;
+ sc->streams[ss].stream = stream;
+ sc->streams[ss].bw = bw;
+ sc->streams[ss].format = format;
+ sc->streams[ss].stripe = stripe;
+ if (dmapos != NULL) {
+ if (sc->pos_dma.dma_vaddr != NULL)
+ *dmapos = (uint32_t *)(sc->pos_dma.dma_vaddr + ss * 8);
+ else
+ *dmapos = NULL;
+ }
+ return (stream);
+}
- snprintf(status, SND_STATUSLEN, "at cad %d nid %d on %s %s",
- pdevinfo->devinfo->codec->cad, pdevinfo->devinfo->nid,
- device_get_nameunit(sc->dev), PCM_KLDSTRING(snd_hda));
- pcm_setstatus(dev, status);
+static void
+hdac_stream_free(device_t dev, device_t child, int dir, int stream)
+{
+ struct hdac_softc *sc = device_get_softc(dev);
+ nid_t cad = (uintptr_t)device_get_ivars(child);
+ int ss;
- return (0);
+ ss = hdac_find_stream(sc, dir, stream);
+ KASSERT(ss >= 0,
+ ("Free for not allocated stream (%d/%d)\n", dir, stream));
+ if (dir == 1)
+ sc->sdo_bw_used -= sc->streams[ss].bw;
+ else
+ sc->codecs[cad].sdi_bw_used -= sc->streams[ss].bw;
+ sc->streams[ss].stream = 0;
+ sc->streams[ss].dev = NULL;
}
static int
-hdac_pcm_detach(device_t dev)
+hdac_stream_start(device_t dev, device_t child,
+ int dir, int stream, bus_addr_t buf, int blksz, int blkcnt)
{
- struct hdac_pcm_devinfo *pdevinfo =
- (struct hdac_pcm_devinfo *)device_get_ivars(dev);
- int err;
-
- if (pdevinfo->registered > 0) {
- err = pcm_unregister(dev);
- if (err != 0)
- return (err);
+ struct hdac_softc *sc = device_get_softc(dev);
+ struct hdac_bdle *bdle;
+ uint64_t addr;
+ int i, ss, off;
+ uint32_t ctl;
+
+ ss = hdac_find_stream(sc, dir, stream);
+ KASSERT(ss >= 0,
+ ("Start for not allocated stream (%d/%d)\n", dir, stream));
+
+ addr = (uint64_t)buf;
+ bdle = (struct hdac_bdle *)sc->streams[ss].bdl.dma_vaddr;
+ for (i = 0; i < blkcnt; i++, bdle++) {
+ bdle->addrl = (uint32_t)addr;
+ bdle->addrh = (uint32_t)(addr >> 32);
+ bdle->len = blksz;
+ bdle->ioc = 1;
+ addr += blksz;
}
+ off = ss << 5;
+ HDAC_WRITE_4(&sc->mem, off + HDAC_SDCBL, blksz * blkcnt);
+ HDAC_WRITE_2(&sc->mem, off + HDAC_SDLVI, blkcnt - 1);
+ addr = sc->streams[ss].bdl.dma_paddr;
+ HDAC_WRITE_4(&sc->mem, off + HDAC_SDBDPL, (uint32_t)addr);
+ HDAC_WRITE_4(&sc->mem, off + HDAC_SDBDPU, (uint32_t)(addr >> 32));
+
+ ctl = HDAC_READ_1(&sc->mem, off + HDAC_SDCTL2);
+ if (dir)
+ ctl |= HDAC_SDCTL2_DIR;
+ else
+ ctl &= ~HDAC_SDCTL2_DIR;
+ ctl &= ~HDAC_SDCTL2_STRM_MASK;
+ ctl |= stream << HDAC_SDCTL2_STRM_SHIFT;
+ ctl &= ~HDAC_SDCTL2_STRIPE_MASK;
+ ctl |= sc->streams[ss].stripe << HDAC_SDCTL2_STRIPE_SHIFT;
+ HDAC_WRITE_1(&sc->mem, off + HDAC_SDCTL2, ctl);
+
+ HDAC_WRITE_2(&sc->mem, off + HDAC_SDFMT, sc->streams[ss].format);
+
+ ctl = HDAC_READ_4(&sc->mem, HDAC_INTCTL);
+ ctl |= 1 << ss;
+ HDAC_WRITE_4(&sc->mem, HDAC_INTCTL, ctl);
+
+ ctl = HDAC_READ_1(&sc->mem, off + HDAC_SDCTL0);
+ ctl |= HDAC_SDCTL_IOCE | HDAC_SDCTL_FEIE | HDAC_SDCTL_DEIE |
+ HDAC_SDCTL_RUN;
+ HDAC_WRITE_1(&sc->mem, off + HDAC_SDCTL0, ctl);
+
+ sc->streams[ss].blksz = blksz;
+ sc->streams[ss].running = 1;
+ hdac_poll_reinit(sc);
return (0);
}
-static device_method_t hdac_pcm_methods[] = {
+static void
+hdac_stream_stop(device_t dev, device_t child, int dir, int stream)
+{
+ struct hdac_softc *sc = device_get_softc(dev);
+ int ss, off;
+ uint32_t ctl;
+
+ ss = hdac_find_stream(sc, dir, stream);
+ KASSERT(ss >= 0,
+ ("Stop for not allocated stream (%d/%d)\n", dir, stream));
+
+ off = ss << 5;
+ ctl = HDAC_READ_1(&sc->mem, off + HDAC_SDCTL0);
+ ctl &= ~(HDAC_SDCTL_IOCE | HDAC_SDCTL_FEIE | HDAC_SDCTL_DEIE |
+ HDAC_SDCTL_RUN);
+ HDAC_WRITE_1(&sc->mem, off + HDAC_SDCTL0, ctl);
+
+ ctl = HDAC_READ_4(&sc->mem, HDAC_INTCTL);
+ ctl &= ~(1 << ss);
+ HDAC_WRITE_4(&sc->mem, HDAC_INTCTL, ctl);
+
+ sc->streams[ss].running = 0;
+ hdac_poll_reinit(sc);
+}
+
+static void
+hdac_stream_reset(device_t dev, device_t child, int dir, int stream)
+{
+ struct hdac_softc *sc = device_get_softc(dev);
+ int timeout = 1000;
+ int to = timeout;
+ int ss, off;
+ uint32_t ctl;
+
+ ss = hdac_find_stream(sc, dir, stream);
+ KASSERT(ss >= 0,
+ ("Reset for not allocated stream (%d/%d)\n", dir, stream));
+
+ off = ss << 5;
+ ctl = HDAC_READ_1(&sc->mem, off + HDAC_SDCTL0);
+ ctl |= HDAC_SDCTL_SRST;
+ HDAC_WRITE_1(&sc->mem, off + HDAC_SDCTL0, ctl);
+ do {
+ ctl = HDAC_READ_1(&sc->mem, off + HDAC_SDCTL0);
+ if (ctl & HDAC_SDCTL_SRST)
+ break;
+ DELAY(10);
+ } while (--to);
+ if (!(ctl & HDAC_SDCTL_SRST))
+ device_printf(dev, "Reset setting timeout\n");
+ ctl &= ~HDAC_SDCTL_SRST;
+ HDAC_WRITE_1(&sc->mem, off + HDAC_SDCTL0, ctl);
+ to = timeout;
+ do {
+ ctl = HDAC_READ_1(&sc->mem, off + HDAC_SDCTL0);
+ if (!(ctl & HDAC_SDCTL_SRST))
+ break;
+ DELAY(10);
+ } while (--to);
+ if (ctl & HDAC_SDCTL_SRST)
+ device_printf(dev, "Reset timeout!\n");
+}
+
+static uint32_t
+hdac_stream_getptr(device_t dev, device_t child, int dir, int stream)
+{
+ struct hdac_softc *sc = device_get_softc(dev);
+ int ss, off;
+
+ ss = hdac_find_stream(sc, dir, stream);
+ KASSERT(ss >= 0,
+ ("Reset for not allocated stream (%d/%d)\n", dir, stream));
+
+ off = ss << 5;
+ return (HDAC_READ_4(&sc->mem, off + HDAC_SDLPIB));
+}
+
+static int
+hdac_unsol_alloc(device_t dev, device_t child, int tag)
+{
+ struct hdac_softc *sc = device_get_softc(dev);
+
+ sc->unsol_registered++;
+ hdac_poll_reinit(sc);
+ return (tag);
+}
+
+static void
+hdac_unsol_free(device_t dev, device_t child, int tag)
+{
+ struct hdac_softc *sc = device_get_softc(dev);
+
+ sc->unsol_registered--;
+ hdac_poll_reinit(sc);
+}
+
+static device_method_t hdac_methods[] = {
/* device interface */
- DEVMETHOD(device_probe, hdac_pcm_probe),
- DEVMETHOD(device_attach, hdac_pcm_attach),
- DEVMETHOD(device_detach, hdac_pcm_detach),
+ DEVMETHOD(device_probe, hdac_probe),
+ DEVMETHOD(device_attach, hdac_attach),
+ DEVMETHOD(device_detach, hdac_detach),
+ DEVMETHOD(device_suspend, hdac_suspend),
+ DEVMETHOD(device_resume, hdac_resume),
+ /* Bus interface */
+ DEVMETHOD(bus_get_dma_tag, hdac_get_dma_tag),
+ DEVMETHOD(bus_print_child, hdac_print_child),
+ DEVMETHOD(bus_child_location_str, hdac_child_location_str),
+ DEVMETHOD(bus_child_pnpinfo_str, hdac_child_pnpinfo_str_method),
+ DEVMETHOD(bus_read_ivar, hdac_read_ivar),
+ DEVMETHOD(hdac_get_mtx, hdac_get_mtx),
+ DEVMETHOD(hdac_codec_command, hdac_codec_command),
+ DEVMETHOD(hdac_stream_alloc, hdac_stream_alloc),
+ DEVMETHOD(hdac_stream_free, hdac_stream_free),
+ DEVMETHOD(hdac_stream_start, hdac_stream_start),
+ DEVMETHOD(hdac_stream_stop, hdac_stream_stop),
+ DEVMETHOD(hdac_stream_reset, hdac_stream_reset),
+ DEVMETHOD(hdac_stream_getptr, hdac_stream_getptr),
+ DEVMETHOD(hdac_unsol_alloc, hdac_unsol_alloc),
+ DEVMETHOD(hdac_unsol_free, hdac_unsol_free),
{ 0, 0 }
};
-static driver_t hdac_pcm_driver = {
- "pcm",
- hdac_pcm_methods,
- PCM_SOFTC_SIZE,
+static driver_t hdac_driver = {
+ "hdac",
+ hdac_methods,
+ sizeof(struct hdac_softc),
};
-DRIVER_MODULE(snd_hda_pcm, hdac, hdac_pcm_driver, pcm_devclass, 0, 0);
+static devclass_t hdac_devclass;
+DRIVER_MODULE(snd_hda, pci, hdac_driver, hdac_devclass, 0, 0);
diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h
index 298afde..71fae4f 100644
--- a/sys/dev/sound/pci/hda/hdac.h
+++ b/sys/dev/sound/pci/hda/hdac.h
@@ -29,40 +29,569 @@
#ifndef _HDAC_H_
#define _HDAC_H_
+#include "hdac_if.h"
-#if 0
/****************************************************************************
* Miscellanious defines
****************************************************************************/
+/* Controller models */
+#define HDA_MODEL_CONSTRUCT(vendor, model) \
+ (((uint32_t)(model) << 16) | ((vendor##_VENDORID) & 0xffff))
+
+/* Intel */
+#define INTEL_VENDORID 0x8086
+#define HDA_INTEL_CPT HDA_MODEL_CONSTRUCT(INTEL, 0x1c20)
+#define HDA_INTEL_PATSBURG HDA_MODEL_CONSTRUCT(INTEL, 0x1d20)
+#define HDA_INTEL_PPT1 HDA_MODEL_CONSTRUCT(INTEL, 0x1e20)
+#define HDA_INTEL_82801F HDA_MODEL_CONSTRUCT(INTEL, 0x2668)
+#define HDA_INTEL_63XXESB HDA_MODEL_CONSTRUCT(INTEL, 0x269a)
+#define HDA_INTEL_82801G HDA_MODEL_CONSTRUCT(INTEL, 0x27d8)
+#define HDA_INTEL_82801H HDA_MODEL_CONSTRUCT(INTEL, 0x284b)
+#define HDA_INTEL_82801I HDA_MODEL_CONSTRUCT(INTEL, 0x293e)
+#define HDA_INTEL_82801JI HDA_MODEL_CONSTRUCT(INTEL, 0x3a3e)
+#define HDA_INTEL_82801JD HDA_MODEL_CONSTRUCT(INTEL, 0x3a6e)
+#define HDA_INTEL_PCH HDA_MODEL_CONSTRUCT(INTEL, 0x3b56)
+#define HDA_INTEL_PCH2 HDA_MODEL_CONSTRUCT(INTEL, 0x3b57)
+#define HDA_INTEL_SCH HDA_MODEL_CONSTRUCT(INTEL, 0x811b)
+#define HDA_INTEL_ALL HDA_MODEL_CONSTRUCT(INTEL, 0xffff)
+
+/* Nvidia */
+#define NVIDIA_VENDORID 0x10de
+#define HDA_NVIDIA_MCP51 HDA_MODEL_CONSTRUCT(NVIDIA, 0x026c)
+#define HDA_NVIDIA_MCP55 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0371)
+#define HDA_NVIDIA_MCP61_1 HDA_MODEL_CONSTRUCT(NVIDIA, 0x03e4)
+#define HDA_NVIDIA_MCP61_2 HDA_MODEL_CONSTRUCT(NVIDIA, 0x03f0)
+#define HDA_NVIDIA_MCP65_1 HDA_MODEL_CONSTRUCT(NVIDIA, 0x044a)
+#define HDA_NVIDIA_MCP65_2 HDA_MODEL_CONSTRUCT(NVIDIA, 0x044b)
+#define HDA_NVIDIA_MCP67_1 HDA_MODEL_CONSTRUCT(NVIDIA, 0x055c)
+#define HDA_NVIDIA_MCP67_2 HDA_MODEL_CONSTRUCT(NVIDIA, 0x055d)
+#define HDA_NVIDIA_MCP78_1 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0774)
+#define HDA_NVIDIA_MCP78_2 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0775)
+#define HDA_NVIDIA_MCP78_3 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0776)
+#define HDA_NVIDIA_MCP78_4 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0777)
+#define HDA_NVIDIA_MCP73_1 HDA_MODEL_CONSTRUCT(NVIDIA, 0x07fc)
+#define HDA_NVIDIA_MCP73_2 HDA_MODEL_CONSTRUCT(NVIDIA, 0x07fd)
+#define HDA_NVIDIA_MCP79_1 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0ac0)
+#define HDA_NVIDIA_MCP79_2 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0ac1)
+#define HDA_NVIDIA_MCP79_3 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0ac2)
+#define HDA_NVIDIA_MCP79_4 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0ac3)
+#define HDA_NVIDIA_0BE2 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0be2)
+#define HDA_NVIDIA_0BE3 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0be3)
+#define HDA_NVIDIA_0BE4 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0be4)
+#define HDA_NVIDIA_GT100 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0be5)
+#define HDA_NVIDIA_GT106 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0be9)
+#define HDA_NVIDIA_GT108 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0bea)
+#define HDA_NVIDIA_GT104 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0beb)
+#define HDA_NVIDIA_GT116 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0bee)
+#define HDA_NVIDIA_MCP89_1 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0d94)
+#define HDA_NVIDIA_MCP89_2 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0d95)
+#define HDA_NVIDIA_MCP89_3 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0d96)
+#define HDA_NVIDIA_MCP89_4 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0d97)
+#define HDA_NVIDIA_GF119 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0e08)
+#define HDA_NVIDIA_GF110_1 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0e09)
+#define HDA_NVIDIA_GF110_2 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0e0c)
+#define HDA_NVIDIA_ALL HDA_MODEL_CONSTRUCT(NVIDIA, 0xffff)
+
+/* ATI */
+#define ATI_VENDORID 0x1002
+#define HDA_ATI_SB450 HDA_MODEL_CONSTRUCT(ATI, 0x437b)
+#define HDA_ATI_SB600 HDA_MODEL_CONSTRUCT(ATI, 0x4383)
+#define HDA_ATI_RS600 HDA_MODEL_CONSTRUCT(ATI, 0x793b)
+#define HDA_ATI_RS690 HDA_MODEL_CONSTRUCT(ATI, 0x7919)
+#define HDA_ATI_RS780 HDA_MODEL_CONSTRUCT(ATI, 0x960f)
+#define HDA_ATI_R600 HDA_MODEL_CONSTRUCT(ATI, 0xaa00)
+#define HDA_ATI_RV630 HDA_MODEL_CONSTRUCT(ATI, 0xaa08)
+#define HDA_ATI_RV610 HDA_MODEL_CONSTRUCT(ATI, 0xaa10)
+#define HDA_ATI_RV670 HDA_MODEL_CONSTRUCT(ATI, 0xaa18)
+#define HDA_ATI_RV635 HDA_MODEL_CONSTRUCT(ATI, 0xaa20)
+#define HDA_ATI_RV620 HDA_MODEL_CONSTRUCT(ATI, 0xaa28)
+#define HDA_ATI_RV770 HDA_MODEL_CONSTRUCT(ATI, 0xaa30)
+#define HDA_ATI_RV730 HDA_MODEL_CONSTRUCT(ATI, 0xaa38)
+#define HDA_ATI_RV710 HDA_MODEL_CONSTRUCT(ATI, 0xaa40)
+#define HDA_ATI_RV740 HDA_MODEL_CONSTRUCT(ATI, 0xaa48)
+#define HDA_ATI_ALL HDA_MODEL_CONSTRUCT(ATI, 0xffff)
+
+/* RDC */
+#define RDC_VENDORID 0x17f3
+#define HDA_RDC_M3010 HDA_MODEL_CONSTRUCT(RDC, 0x3010)
+
+/* VIA */
+#define VIA_VENDORID 0x1106
+#define HDA_VIA_VT82XX HDA_MODEL_CONSTRUCT(VIA, 0x3288)
+#define HDA_VIA_ALL HDA_MODEL_CONSTRUCT(VIA, 0xffff)
+
+/* SiS */
+#define SIS_VENDORID 0x1039
+#define HDA_SIS_966 HDA_MODEL_CONSTRUCT(SIS, 0x7502)
+#define HDA_SIS_ALL HDA_MODEL_CONSTRUCT(SIS, 0xffff)
+
+/* ULI */
+#define ULI_VENDORID 0x10b9
+#define HDA_ULI_M5461 HDA_MODEL_CONSTRUCT(ULI, 0x5461)
+#define HDA_ULI_ALL HDA_MODEL_CONSTRUCT(ULI, 0xffff)
+
+/* OEM/subvendors */
+
+/* Intel */
+#define INTEL_D101GGC_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xd600)
+
+/* HP/Compaq */
+#define HP_VENDORID 0x103c
+#define HP_V3000_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30b5)
+#define HP_NX7400_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30a2)
+#define HP_NX6310_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30aa)
+#define HP_NX6325_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30b0)
+#define HP_XW4300_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x3013)
+#define HP_3010_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x3010)
+#define HP_DV5000_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30a5)
+#define HP_DC7700S_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x2801)
+#define HP_DC7700_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x2802)
+#define HP_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0xffff)
+/* What is wrong with XN 2563 anyway? (Got the picture ?) */
+#define HP_NX6325_SUBVENDORX 0x103c30b0
+
+/* Dell */
+#define DELL_VENDORID 0x1028
+#define DELL_D630_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01f9)
+#define DELL_D820_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01cc)
+#define DELL_V1400_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0227)
+#define DELL_V1500_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0228)
+#define DELL_I1300_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01c9)
+#define DELL_XPSM1210_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01d7)
+#define DELL_OPLX745_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01da)
+#define DELL_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0xffff)
+
+/* Clevo */
+#define CLEVO_VENDORID 0x1558
+#define CLEVO_D900T_SUBVENDOR HDA_MODEL_CONSTRUCT(CLEVO, 0x0900)
+#define CLEVO_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(CLEVO, 0xffff)
+
+/* Acer */
+#define ACER_VENDORID 0x1025
+#define ACER_A5050_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x010f)
+#define ACER_A4520_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0127)
+#define ACER_A4710_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x012f)
+#define ACER_A4715_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0133)
+#define ACER_3681WXM_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0110)
+#define ACER_T6292_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x011b)
+#define ACER_T5320_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x011f)
+#define ACER_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xffff)
+
+/* Asus */
+#define ASUS_VENDORID 0x1043
+#define ASUS_A8X_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1153)
+#define ASUS_U5F_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1263)
+#define ASUS_W6F_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1263)
+#define ASUS_A7M_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1323)
+#define ASUS_F3JC_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1338)
+#define ASUS_G2K_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1339)
+#define ASUS_A7T_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x13c2)
+#define ASUS_W2J_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1971)
+#define ASUS_M5200_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1993)
+#define ASUS_P5PL2_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x817f)
+#define ASUS_P1AH2_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x81cb)
+#define ASUS_M2NPVMX_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x81cb)
+#define ASUS_M2V_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x81e7)
+#define ASUS_P5BWD_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x81ec)
+#define ASUS_M2N_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x8234)
+#define ASUS_A8NVMCSM_SUBVENDOR HDA_MODEL_CONSTRUCT(NVIDIA, 0xcb84)
+#define ASUS_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0xffff)
+
+/* IBM / Lenovo */
+#define IBM_VENDORID 0x1014
+#define IBM_M52_SUBVENDOR HDA_MODEL_CONSTRUCT(IBM, 0x02f6)
+#define IBM_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(IBM, 0xffff)
+
+/* Lenovo */
+#define LENOVO_VENDORID 0x17aa
+#define LENOVO_3KN100_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x2066)
+#define LENOVO_3KN200_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x384e)
+#define LENOVO_B450_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x3a0d)
+#define LENOVO_TCA55_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x1015)
+#define LENOVO_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0xffff)
+
+/* Samsung */
+#define SAMSUNG_VENDORID 0x144d
+#define SAMSUNG_Q1_SUBVENDOR HDA_MODEL_CONSTRUCT(SAMSUNG, 0xc027)
+#define SAMSUNG_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(SAMSUNG, 0xffff)
+
+/* Medion ? */
+#define MEDION_VENDORID 0x161f
+#define MEDION_MD95257_SUBVENDOR HDA_MODEL_CONSTRUCT(MEDION, 0x203d)
+#define MEDION_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(MEDION, 0xffff)
+
+/* Apple Computer Inc. */
+#define APPLE_VENDORID 0x106b
+#define APPLE_MB3_SUBVENDOR HDA_MODEL_CONSTRUCT(APPLE, 0x00a1)
+
+/* Sony */
+#define SONY_VENDORID 0x104d
+#define SONY_S5_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81cc)
+#define SONY_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0xffff)
+
+/*
+ * Apple Intel MacXXXX seems using Sigmatel codec/vendor id
+ * instead of their own, which is beyond my comprehension
+ * (see HDA_CODEC_STAC9221 below).
+ */
+#define APPLE_INTEL_MAC 0x76808384
+#define APPLE_MACBOOKPRO55 0xcb7910de
+
+/* LG Electronics */
+#define LG_VENDORID 0x1854
+#define LG_LW20_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0x0018)
+#define LG_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0xffff)
+
+/* Fujitsu Siemens */
+#define FS_VENDORID 0x1734
+#define FS_PA1510_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x10b8)
+#define FS_SI1848_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x10cd)
+#define FS_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0xffff)
+
+/* Fujitsu Limited */
+#define FL_VENDORID 0x10cf
+#define FL_S7020D_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x1326)
+#define FL_U1010_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x142d)
+#define FL_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0xffff)
+
+/* Toshiba */
+#define TOSHIBA_VENDORID 0x1179
+#define TOSHIBA_U200_SUBVENDOR HDA_MODEL_CONSTRUCT(TOSHIBA, 0x0001)
+#define TOSHIBA_A135_SUBVENDOR HDA_MODEL_CONSTRUCT(TOSHIBA, 0xff01)
+#define TOSHIBA_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(TOSHIBA, 0xffff)
+
+/* Micro-Star International (MSI) */
+#define MSI_VENDORID 0x1462
+#define MSI_MS1034_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0x0349)
+#define MSI_MS034A_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0x034a)
+#define MSI_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0xffff)
+
+/* Giga-Byte Technology */
+#define GB_VENDORID 0x1458
+#define GB_G33S2H_SUBVENDOR HDA_MODEL_CONSTRUCT(GB, 0xa022)
+#define GP_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(GB, 0xffff)
+
+/* Uniwill ? */
+#define UNIWILL_VENDORID 0x1584
+#define UNIWILL_9075_SUBVENDOR HDA_MODEL_CONSTRUCT(UNIWILL, 0x9075)
+#define UNIWILL_9080_SUBVENDOR HDA_MODEL_CONSTRUCT(UNIWILL, 0x9080)
+
+/* All codecs you can eat... */
+#define HDA_CODEC_CONSTRUCT(vendor, id) \
+ (((uint32_t)(vendor##_VENDORID) << 16) | ((id) & 0xffff))
+
+/* Cirrus Logic */
+#define CIRRUSLOGIC_VENDORID 0x1013
+#define HDA_CODEC_CS4206 HDA_CODEC_CONSTRUCT(CIRRUSLOGIC, 0x4206)
+#define HDA_CODEC_CS4207 HDA_CODEC_CONSTRUCT(CIRRUSLOGIC, 0x4207)
+#define HDA_CODEC_CS4210 HDA_CODEC_CONSTRUCT(CIRRUSLOGIC, 0x4210)
+#define HDA_CODEC_CSXXXX HDA_CODEC_CONSTRUCT(CIRRUSLOGIC, 0xffff)
+
+/* Realtek */
+#define REALTEK_VENDORID 0x10ec
+#define HDA_CODEC_ALC221 HDA_CODEC_CONSTRUCT(REALTEK, 0x0221)
+#define HDA_CODEC_ALC260 HDA_CODEC_CONSTRUCT(REALTEK, 0x0260)
+#define HDA_CODEC_ALC262 HDA_CODEC_CONSTRUCT(REALTEK, 0x0262)
+#define HDA_CODEC_ALC267 HDA_CODEC_CONSTRUCT(REALTEK, 0x0267)
+#define HDA_CODEC_ALC268 HDA_CODEC_CONSTRUCT(REALTEK, 0x0268)
+#define HDA_CODEC_ALC269 HDA_CODEC_CONSTRUCT(REALTEK, 0x0269)
+#define HDA_CODEC_ALC270 HDA_CODEC_CONSTRUCT(REALTEK, 0x0270)
+#define HDA_CODEC_ALC272 HDA_CODEC_CONSTRUCT(REALTEK, 0x0272)
+#define HDA_CODEC_ALC273 HDA_CODEC_CONSTRUCT(REALTEK, 0x0273)
+#define HDA_CODEC_ALC275 HDA_CODEC_CONSTRUCT(REALTEK, 0x0275)
+#define HDA_CODEC_ALC276 HDA_CODEC_CONSTRUCT(REALTEK, 0x0276)
+#define HDA_CODEC_ALC660 HDA_CODEC_CONSTRUCT(REALTEK, 0x0660)
+#define HDA_CODEC_ALC662 HDA_CODEC_CONSTRUCT(REALTEK, 0x0662)
+#define HDA_CODEC_ALC663 HDA_CODEC_CONSTRUCT(REALTEK, 0x0663)
+#define HDA_CODEC_ALC665 HDA_CODEC_CONSTRUCT(REALTEK, 0x0665)
+#define HDA_CODEC_ALC861 HDA_CODEC_CONSTRUCT(REALTEK, 0x0861)
+#define HDA_CODEC_ALC861VD HDA_CODEC_CONSTRUCT(REALTEK, 0x0862)
+#define HDA_CODEC_ALC880 HDA_CODEC_CONSTRUCT(REALTEK, 0x0880)
+#define HDA_CODEC_ALC882 HDA_CODEC_CONSTRUCT(REALTEK, 0x0882)
+#define HDA_CODEC_ALC883 HDA_CODEC_CONSTRUCT(REALTEK, 0x0883)
+#define HDA_CODEC_ALC885 HDA_CODEC_CONSTRUCT(REALTEK, 0x0885)
+#define HDA_CODEC_ALC887 HDA_CODEC_CONSTRUCT(REALTEK, 0x0887)
+#define HDA_CODEC_ALC888 HDA_CODEC_CONSTRUCT(REALTEK, 0x0888)
+#define HDA_CODEC_ALC889 HDA_CODEC_CONSTRUCT(REALTEK, 0x0889)
+#define HDA_CODEC_ALC892 HDA_CODEC_CONSTRUCT(REALTEK, 0x0892)
+#define HDA_CODEC_ALC899 HDA_CODEC_CONSTRUCT(REALTEK, 0x0899)
+#define HDA_CODEC_ALCXXXX HDA_CODEC_CONSTRUCT(REALTEK, 0xffff)
+
+/* Analog Devices */
+#define ANALOGDEVICES_VENDORID 0x11d4
+#define HDA_CODEC_AD1884A HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x184a)
+#define HDA_CODEC_AD1882 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1882)
+#define HDA_CODEC_AD1883 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1883)
+#define HDA_CODEC_AD1884 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1884)
+#define HDA_CODEC_AD1984A HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x194a)
+#define HDA_CODEC_AD1984B HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x194b)
+#define HDA_CODEC_AD1981HD HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1981)
+#define HDA_CODEC_AD1983 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1983)
+#define HDA_CODEC_AD1984 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1984)
+#define HDA_CODEC_AD1986A HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1986)
+#define HDA_CODEC_AD1987 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1987)
+#define HDA_CODEC_AD1988 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1988)
+#define HDA_CODEC_AD1988B HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x198b)
+#define HDA_CODEC_AD1882A HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x882a)
+#define HDA_CODEC_AD1989A HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x989a)
+#define HDA_CODEC_AD1989B HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x989b)
+#define HDA_CODEC_ADXXXX HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0xffff)
+
+/* CMedia */
+#define CMEDIA_VENDORID 0x434d
+#define HDA_CODEC_CMI9880 HDA_CODEC_CONSTRUCT(CMEDIA, 0x4980)
+#define HDA_CODEC_CMIXXXX HDA_CODEC_CONSTRUCT(CMEDIA, 0xffff)
+
+/* Sigmatel */
+#define SIGMATEL_VENDORID 0x8384
+#define HDA_CODEC_STAC9230X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7612)
+#define HDA_CODEC_STAC9230D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7613)
+#define HDA_CODEC_STAC9229X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7614)
+#define HDA_CODEC_STAC9229D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7615)
+#define HDA_CODEC_STAC9228X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7616)
+#define HDA_CODEC_STAC9228D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7617)
+#define HDA_CODEC_STAC9227X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7618)
+#define HDA_CODEC_STAC9227D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7619)
+#define HDA_CODEC_STAC9274 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7620)
+#define HDA_CODEC_STAC9274D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7621)
+#define HDA_CODEC_STAC9273X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7622)
+#define HDA_CODEC_STAC9273D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7623)
+#define HDA_CODEC_STAC9272X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7624)
+#define HDA_CODEC_STAC9272D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7625)
+#define HDA_CODEC_STAC9271X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7626)
+#define HDA_CODEC_STAC9271D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7627)
+#define HDA_CODEC_STAC9274X5NH HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7628)
+#define HDA_CODEC_STAC9274D5NH HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7629)
+#define HDA_CODEC_STAC9250 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7634)
+#define HDA_CODEC_STAC9251 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7636)
+#define HDA_CODEC_IDT92HD700X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7638)
+#define HDA_CODEC_IDT92HD700D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7639)
+#define HDA_CODEC_IDT92HD206X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7645)
+#define HDA_CODEC_IDT92HD206D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7646)
+#define HDA_CODEC_CXD9872RDK HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7661)
+#define HDA_CODEC_STAC9872AK HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7662)
+#define HDA_CODEC_CXD9872AKD HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7664)
+#define HDA_CODEC_STAC9221 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7680)
+#define HDA_CODEC_STAC922XD HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7681)
+#define HDA_CODEC_STAC9221_A2 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7682)
+#define HDA_CODEC_STAC9221D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7683)
+#define HDA_CODEC_STAC9220 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7690)
+#define HDA_CODEC_STAC9200D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7691)
+#define HDA_CODEC_IDT92HD005 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7698)
+#define HDA_CODEC_IDT92HD005D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7699)
+#define HDA_CODEC_STAC9205X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x76a0)
+#define HDA_CODEC_STAC9205D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x76a1)
+#define HDA_CODEC_STAC9204X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x76a2)
+#define HDA_CODEC_STAC9204D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x76a3)
+#define HDA_CODEC_STAC9220_A2 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7880)
+#define HDA_CODEC_STAC9220_A1 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7882)
+#define HDA_CODEC_STACXXXX HDA_CODEC_CONSTRUCT(SIGMATEL, 0xffff)
+
+/* IDT */
+#define IDT_VENDORID 0x111d
+#define HDA_CODEC_IDT92HD75BX HDA_CODEC_CONSTRUCT(IDT, 0x7603)
+#define HDA_CODEC_IDT92HD83C1X HDA_CODEC_CONSTRUCT(IDT, 0x7604)
+#define HDA_CODEC_IDT92HD81B1X HDA_CODEC_CONSTRUCT(IDT, 0x7605)
+#define HDA_CODEC_IDT92HD75B3 HDA_CODEC_CONSTRUCT(IDT, 0x7608)
+#define HDA_CODEC_IDT92HD73D1 HDA_CODEC_CONSTRUCT(IDT, 0x7674)
+#define HDA_CODEC_IDT92HD73C1 HDA_CODEC_CONSTRUCT(IDT, 0x7675)
+#define HDA_CODEC_IDT92HD73E1 HDA_CODEC_CONSTRUCT(IDT, 0x7676)
+#define HDA_CODEC_IDT92HD71B8 HDA_CODEC_CONSTRUCT(IDT, 0x76b0)
+#define HDA_CODEC_IDT92HD71B7 HDA_CODEC_CONSTRUCT(IDT, 0x76b2)
+#define HDA_CODEC_IDT92HD71B5 HDA_CODEC_CONSTRUCT(IDT, 0x76b6)
+#define HDA_CODEC_IDT92HD83C1C HDA_CODEC_CONSTRUCT(IDT, 0x76d4)
+#define HDA_CODEC_IDT92HD81B1C HDA_CODEC_CONSTRUCT(IDT, 0x76d5)
+#define HDA_CODEC_IDTXXXX HDA_CODEC_CONSTRUCT(IDT, 0xffff)
+
+/* Silicon Image */
+#define SII_VENDORID 0x1095
+#define HDA_CODEC_SII1390 HDA_CODEC_CONSTRUCT(SII, 0x1390)
+#define HDA_CODEC_SII1392 HDA_CODEC_CONSTRUCT(SII, 0x1392)
+#define HDA_CODEC_SIIXXXX HDA_CODEC_CONSTRUCT(SII, 0xffff)
+
+/* Lucent/Agere */
+#define AGERE_VENDORID 0x11c1
+#define HDA_CODEC_AGEREXXXX HDA_CODEC_CONSTRUCT(AGERE, 0xffff)
+
+/* Conexant */
+#define CONEXANT_VENDORID 0x14f1
+#define HDA_CODEC_CX20549 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5045)
+#define HDA_CODEC_CX20551 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5047)
+#define HDA_CODEC_CX20561 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5051)
+#define HDA_CODEC_CX20582 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5066)
+#define HDA_CODEC_CX20583 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5067)
+#define HDA_CODEC_CX20584 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5068)
+#define HDA_CODEC_CX20585 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5069)
+#define HDA_CODEC_CX20588 HDA_CODEC_CONSTRUCT(CONEXANT, 0x506c)
+#define HDA_CODEC_CX20590 HDA_CODEC_CONSTRUCT(CONEXANT, 0x506e)
+#define HDA_CODEC_CX20631 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5097)
+#define HDA_CODEC_CX20632 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5098)
+#define HDA_CODEC_CX20641 HDA_CODEC_CONSTRUCT(CONEXANT, 0x50a1)
+#define HDA_CODEC_CX20642 HDA_CODEC_CONSTRUCT(CONEXANT, 0x50a2)
+#define HDA_CODEC_CX20651 HDA_CODEC_CONSTRUCT(CONEXANT, 0x50ab)
+#define HDA_CODEC_CX20652 HDA_CODEC_CONSTRUCT(CONEXANT, 0x50ac)
+#define HDA_CODEC_CX20664 HDA_CODEC_CONSTRUCT(CONEXANT, 0x50b8)
+#define HDA_CODEC_CX20665 HDA_CODEC_CONSTRUCT(CONEXANT, 0x50b9)
+#define HDA_CODEC_CXXXXX HDA_CODEC_CONSTRUCT(CONEXANT, 0xffff)
+
+/* VIA */
+#define HDA_CODEC_VT1708_8 HDA_CODEC_CONSTRUCT(VIA, 0x1708)
+#define HDA_CODEC_VT1708_9 HDA_CODEC_CONSTRUCT(VIA, 0x1709)
+#define HDA_CODEC_VT1708_A HDA_CODEC_CONSTRUCT(VIA, 0x170a)
+#define HDA_CODEC_VT1708_B HDA_CODEC_CONSTRUCT(VIA, 0x170b)
+#define HDA_CODEC_VT1709_0 HDA_CODEC_CONSTRUCT(VIA, 0xe710)
+#define HDA_CODEC_VT1709_1 HDA_CODEC_CONSTRUCT(VIA, 0xe711)
+#define HDA_CODEC_VT1709_2 HDA_CODEC_CONSTRUCT(VIA, 0xe712)
+#define HDA_CODEC_VT1709_3 HDA_CODEC_CONSTRUCT(VIA, 0xe713)
+#define HDA_CODEC_VT1709_4 HDA_CODEC_CONSTRUCT(VIA, 0xe714)
+#define HDA_CODEC_VT1709_5 HDA_CODEC_CONSTRUCT(VIA, 0xe715)
+#define HDA_CODEC_VT1709_6 HDA_CODEC_CONSTRUCT(VIA, 0xe716)
+#define HDA_CODEC_VT1709_7 HDA_CODEC_CONSTRUCT(VIA, 0xe717)
+#define HDA_CODEC_VT1708B_0 HDA_CODEC_CONSTRUCT(VIA, 0xe720)
+#define HDA_CODEC_VT1708B_1 HDA_CODEC_CONSTRUCT(VIA, 0xe721)
+#define HDA_CODEC_VT1708B_2 HDA_CODEC_CONSTRUCT(VIA, 0xe722)
+#define HDA_CODEC_VT1708B_3 HDA_CODEC_CONSTRUCT(VIA, 0xe723)
+#define HDA_CODEC_VT1708B_4 HDA_CODEC_CONSTRUCT(VIA, 0xe724)
+#define HDA_CODEC_VT1708B_5 HDA_CODEC_CONSTRUCT(VIA, 0xe725)
+#define HDA_CODEC_VT1708B_6 HDA_CODEC_CONSTRUCT(VIA, 0xe726)
+#define HDA_CODEC_VT1708B_7 HDA_CODEC_CONSTRUCT(VIA, 0xe727)
+#define HDA_CODEC_VT1708S_0 HDA_CODEC_CONSTRUCT(VIA, 0x0397)
+#define HDA_CODEC_VT1708S_1 HDA_CODEC_CONSTRUCT(VIA, 0x1397)
+#define HDA_CODEC_VT1708S_2 HDA_CODEC_CONSTRUCT(VIA, 0x2397)
+#define HDA_CODEC_VT1708S_3 HDA_CODEC_CONSTRUCT(VIA, 0x3397)
+#define HDA_CODEC_VT1708S_4 HDA_CODEC_CONSTRUCT(VIA, 0x4397)
+#define HDA_CODEC_VT1708S_5 HDA_CODEC_CONSTRUCT(VIA, 0x5397)
+#define HDA_CODEC_VT1708S_6 HDA_CODEC_CONSTRUCT(VIA, 0x6397)
+#define HDA_CODEC_VT1708S_7 HDA_CODEC_CONSTRUCT(VIA, 0x7397)
+#define HDA_CODEC_VT1702_0 HDA_CODEC_CONSTRUCT(VIA, 0x0398)
+#define HDA_CODEC_VT1702_1 HDA_CODEC_CONSTRUCT(VIA, 0x1398)
+#define HDA_CODEC_VT1702_2 HDA_CODEC_CONSTRUCT(VIA, 0x2398)
+#define HDA_CODEC_VT1702_3 HDA_CODEC_CONSTRUCT(VIA, 0x3398)
+#define HDA_CODEC_VT1702_4 HDA_CODEC_CONSTRUCT(VIA, 0x4398)
+#define HDA_CODEC_VT1702_5 HDA_CODEC_CONSTRUCT(VIA, 0x5398)
+#define HDA_CODEC_VT1702_6 HDA_CODEC_CONSTRUCT(VIA, 0x6398)
+#define HDA_CODEC_VT1702_7 HDA_CODEC_CONSTRUCT(VIA, 0x7398)
+#define HDA_CODEC_VT1716S_0 HDA_CODEC_CONSTRUCT(VIA, 0x0433)
+#define HDA_CODEC_VT1716S_1 HDA_CODEC_CONSTRUCT(VIA, 0xa721)
+#define HDA_CODEC_VT1718S_0 HDA_CODEC_CONSTRUCT(VIA, 0x0428)
+#define HDA_CODEC_VT1718S_1 HDA_CODEC_CONSTRUCT(VIA, 0x4428)
+#define HDA_CODEC_VT1802_0 HDA_CODEC_CONSTRUCT(VIA, 0x0446)
+#define HDA_CODEC_VT1802_1 HDA_CODEC_CONSTRUCT(VIA, 0x8446)
+#define HDA_CODEC_VT1812 HDA_CODEC_CONSTRUCT(VIA, 0x0448)
+#define HDA_CODEC_VT1818S HDA_CODEC_CONSTRUCT(VIA, 0x0440)
+#define HDA_CODEC_VT1828S HDA_CODEC_CONSTRUCT(VIA, 0x4441)
+#define HDA_CODEC_VT2002P_0 HDA_CODEC_CONSTRUCT(VIA, 0x0438)
+#define HDA_CODEC_VT2002P_1 HDA_CODEC_CONSTRUCT(VIA, 0x4438)
+#define HDA_CODEC_VT2020 HDA_CODEC_CONSTRUCT(VIA, 0x0441)
+#define HDA_CODEC_VTXXXX HDA_CODEC_CONSTRUCT(VIA, 0xffff)
+
+/* ATI */
+#define HDA_CODEC_ATIRS600_1 HDA_CODEC_CONSTRUCT(ATI, 0x793c)
+#define HDA_CODEC_ATIRS600_2 HDA_CODEC_CONSTRUCT(ATI, 0x7919)
+#define HDA_CODEC_ATIRS690 HDA_CODEC_CONSTRUCT(ATI, 0x791a)
+#define HDA_CODEC_ATIR6XX HDA_CODEC_CONSTRUCT(ATI, 0xaa01)
+#define HDA_CODEC_ATIXXXX HDA_CODEC_CONSTRUCT(ATI, 0xffff)
+
+/* NVIDIA */
+#define HDA_CODEC_NVIDIAMCP78 HDA_CODEC_CONSTRUCT(NVIDIA, 0x0002)
+#define HDA_CODEC_NVIDIAMCP78_2 HDA_CODEC_CONSTRUCT(NVIDIA, 0x0006)
+#define HDA_CODEC_NVIDIAMCP7A HDA_CODEC_CONSTRUCT(NVIDIA, 0x0007)
+#define HDA_CODEC_NVIDIAGT220 HDA_CODEC_CONSTRUCT(NVIDIA, 0x000a)
+#define HDA_CODEC_NVIDIAGT21X HDA_CODEC_CONSTRUCT(NVIDIA, 0x000b)
+#define HDA_CODEC_NVIDIAMCP89 HDA_CODEC_CONSTRUCT(NVIDIA, 0x000c)
+#define HDA_CODEC_NVIDIAGT240 HDA_CODEC_CONSTRUCT(NVIDIA, 0x000d)
+#define HDA_CODEC_NVIDIAMCP67 HDA_CODEC_CONSTRUCT(NVIDIA, 0x0067)
+#define HDA_CODEC_NVIDIAMCP73 HDA_CODEC_CONSTRUCT(NVIDIA, 0x8001)
+#define HDA_CODEC_NVIDIAXXXX HDA_CODEC_CONSTRUCT(NVIDIA, 0xffff)
+
+/* INTEL */
+#define HDA_CODEC_INTELIP HDA_CODEC_CONSTRUCT(INTEL, 0x0054)
+#define HDA_CODEC_INTELBL HDA_CODEC_CONSTRUCT(INTEL, 0x2801)
+#define HDA_CODEC_INTELCA HDA_CODEC_CONSTRUCT(INTEL, 0x2802)
+#define HDA_CODEC_INTELEL HDA_CODEC_CONSTRUCT(INTEL, 0x2803)
+#define HDA_CODEC_INTELIP2 HDA_CODEC_CONSTRUCT(INTEL, 0x2804)
+#define HDA_CODEC_INTELCPT HDA_CODEC_CONSTRUCT(INTEL, 0x2805)
+#define HDA_CODEC_INTELPPT HDA_CODEC_CONSTRUCT(INTEL, 0x2806)
+#define HDA_CODEC_INTELCL HDA_CODEC_CONSTRUCT(INTEL, 0x29fb)
+#define HDA_CODEC_INTELXXXX HDA_CODEC_CONSTRUCT(INTEL, 0xffff)
+
/****************************************************************************
* Helper Macros
****************************************************************************/
+#define HDA_DMA_ALIGNMENT 128
+
+#define HDA_BDL_MIN 2
+#define HDA_BDL_MAX 256
+#define HDA_BDL_DEFAULT HDA_BDL_MIN
+
+#define HDA_BLK_MIN HDA_DMA_ALIGNMENT
+#define HDA_BLK_ALIGN (~(HDA_BLK_MIN - 1))
+
+#define HDA_BUFSZ_MIN (HDA_BDL_MIN * HDA_BLK_MIN)
+#define HDA_BUFSZ_MAX 262144
+#define HDA_BUFSZ_DEFAULT 65536
+
+#define HDA_GPIO_MAX 8
+
+#define HDA_DEV_MATCH(fl, v) ((fl) == (v) || \
+ (fl) == 0xffffffff || \
+ (((fl) & 0xffff0000) == 0xffff0000 && \
+ ((fl) & 0x0000ffff) == ((v) & 0x0000ffff)) || \
+ (((fl) & 0x0000ffff) == 0x0000ffff && \
+ ((fl) & 0xffff0000) == ((v) & 0xffff0000)))
+#define HDA_MATCH_ALL 0xffffffff
+#define HDA_INVALID 0xffffffff
+
+#define HDA_BOOTVERBOSE(stmt) do { \
+ if (bootverbose != 0 || snd_verbose > 3) { \
+ stmt \
+ } \
+} while (0)
+
+#define HDA_BOOTHVERBOSE(stmt) do { \
+ if (snd_verbose > 3) { \
+ stmt \
+ } \
+} while (0)
+
+#define hda_command(dev, verb) \
+ HDAC_CODEC_COMMAND(device_get_parent(dev), (dev), (verb))
+
+typedef int nid_t;
+
/****************************************************************************
* Simplified Accessors for HDA devices
****************************************************************************/
+
enum hdac_device_ivars {
- HDAC_IVAR_CODEC_ID,
- HDAC_IVAR_NODE_ID,
- HDAC_IVAR_VENDOR_ID,
- HDAC_IVAR_DEVICE_ID,
- HDAC_IVAR_REVISION_ID,
- HDAC_IVAR_STEPPING_ID,
- HDAC_IVAR_NODE_TYPE,
+ HDA_IVAR_CODEC_ID,
+ HDA_IVAR_NODE_ID,
+ HDA_IVAR_VENDOR_ID,
+ HDA_IVAR_DEVICE_ID,
+ HDA_IVAR_REVISION_ID,
+ HDA_IVAR_STEPPING_ID,
+ HDA_IVAR_SUBVENDOR_ID,
+ HDA_IVAR_SUBDEVICE_ID,
+ HDA_IVAR_SUBSYSTEM_ID,
+ HDA_IVAR_NODE_TYPE,
+ HDA_IVAR_DMA_NOCACHE,
};
-#define HDAC_ACCESSOR(var, ivar, type) \
- __BUS_ACCESSOR(hdac, var, HDAC, ivar, type)
+#define HDA_ACCESSOR(var, ivar, type) \
+ __BUS_ACCESSOR(hda, var, HDA, ivar, type)
-HDAC_ACCESSOR(codec_id, CODEC_ID, uint8_t);
-HDAC_ACCESSOR(node_id, NODE_ID, uint8_t);
-HDAC_ACCESSOR(vendor_id, VENDOR_ID, uint16_t);
-HDAC_ACCESSOR(device_id, DEVICE_ID, uint16_t);
-HDAC_ACCESSOR(revision_id, REVISION_ID, uint8_t);
-HDAC_ACCESSOR(stepping_id, STEPPING_ID, uint8_t);
-HDAC_ACCESSOR(node_type, NODE_TYPE, uint8_t);
-#endif
+HDA_ACCESSOR(codec_id, CODEC_ID, uint8_t);
+HDA_ACCESSOR(node_id, NODE_ID, uint8_t);
+HDA_ACCESSOR(vendor_id, VENDOR_ID, uint16_t);
+HDA_ACCESSOR(device_id, DEVICE_ID, uint16_t);
+HDA_ACCESSOR(revision_id, REVISION_ID, uint8_t);
+HDA_ACCESSOR(stepping_id, STEPPING_ID, uint8_t);
+HDA_ACCESSOR(subvendor_id, SUBVENDOR_ID, uint16_t);
+HDA_ACCESSOR(subdevice_id, SUBDEVICE_ID, uint16_t);
+HDA_ACCESSOR(node_type, NODE_TYPE, uint8_t);
+HDA_ACCESSOR(dma_nocache, DMA_NOCACHE, uint8_t);
#define PCIS_MULTIMEDIA_HDA 0x03
diff --git a/sys/dev/sound/pci/hda/hdac_if.m b/sys/dev/sound/pci/hda/hdac_if.m
new file mode 100644
index 0000000..f87e2ed
--- /dev/null
+++ b/sys/dev/sound/pci/hda/hdac_if.m
@@ -0,0 +1,115 @@
+# Copyright (c) 2012 Alexander Motin <mav@FreeBSD.org>
+# 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,
+# without modification, immediately at the beginning of the file.
+# 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.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# $FreeBSD$
+
+#include <sys/rman.h>
+
+INTERFACE hdac;
+
+METHOD struct mtx * get_mtx {
+ device_t dev;
+ device_t child;
+};
+
+METHOD uint32_t codec_command {
+ device_t dev;
+ device_t child;
+ uint32_t verb;
+};
+
+METHOD int stream_alloc {
+ device_t dev;
+ device_t child;
+ int dir;
+ int format;
+ int stripe;
+ uint32_t **dmapos;
+};
+
+METHOD void stream_free {
+ device_t dev;
+ device_t child;
+ int dir;
+ int stream;
+};
+
+METHOD int stream_start {
+ device_t dev;
+ device_t child;
+ int dir;
+ int stream;
+ bus_addr_t buf;
+ int blksz;
+ int blkcnt;
+};
+
+METHOD void stream_stop {
+ device_t dev;
+ device_t child;
+ int dir;
+ int stream;
+};
+
+METHOD void stream_reset {
+ device_t dev;
+ device_t child;
+ int dir;
+ int stream;
+};
+
+METHOD uint32_t stream_getptr {
+ device_t dev;
+ device_t child;
+ int dir;
+ int stream;
+};
+
+METHOD void stream_intr {
+ device_t dev;
+ int dir;
+ int stream;
+};
+
+METHOD int unsol_alloc {
+ device_t dev;
+ device_t child;
+ int wanted;
+};
+
+METHOD void unsol_free {
+ device_t dev;
+ device_t child;
+ int tag;
+};
+
+METHOD void unsol_intr {
+ device_t dev;
+ uint32_t resp;
+};
+
+METHOD void pindump {
+ device_t dev;
+};
+
diff --git a/sys/dev/sound/pci/hda/hdac_private.h b/sys/dev/sound/pci/hda/hdac_private.h
index 24beed7..b8798d7 100644
--- a/sys/dev/sound/pci/hda/hdac_private.h
+++ b/sys/dev/sound/pci/hda/hdac_private.h
@@ -1,5 +1,6 @@
/*-
* Copyright (c) 2006 Stephane E. Potvin <sepotvin@videotron.ca>
+ * Copyright (c) 2008-2012 Alexander Motin <mav@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -29,15 +30,11 @@
#ifndef _HDAC_PRIVATE_H_
#define _HDAC_PRIVATE_H_
-
/****************************************************************************
* Miscellaneous defines
****************************************************************************/
-#define HDAC_DMA_ALIGNMENT 128
#define HDAC_CODEC_MAX 16
-#define HDAC_MTX_NAME "hdac driver mutex"
-
/****************************************************************************
* Helper Macros
****************************************************************************/
@@ -82,7 +79,6 @@
#define HDAC_BSDBDPL(sc, n) (_HDAC_BSDBDPL((n), (sc)->num_iss, (sc)->num_oss))
#define HDAC_BSDBDPU(sc, n) (_HDAC_BSDBDPU((n), (sc)->num_iss, (sc)->num_oss))
-
/****************************************************************************
* Custom hdac malloc type
****************************************************************************/
@@ -145,22 +141,6 @@ struct hdac_rirb {
(((response_ex) & HDAC_RIRB_RESPONSE_EX_SDATA_IN_MASK) >> \
HDAC_RIRB_RESPONSE_EX_SDATA_IN_OFFSET)
-/****************************************************************************
- * struct hdac_command_list
- *
- * This structure holds the list of verbs that are to be sent to the codec
- * via the corb and the responses received via the rirb. It's allocated by
- * the codec driver and is owned by it.
- ****************************************************************************/
-struct hdac_command_list {
- int num_commands;
- uint32_t *verbs;
- uint32_t *responses;
-};
-
-typedef int nid_t;
-
-struct hdac_softc;
struct hdac_bdle {
volatile uint32_t addrl;
volatile uint32_t addrh;
@@ -168,181 +148,38 @@ struct hdac_bdle {
volatile uint32_t ioc;
} __packed;
-#define HDA_MAX_CONNS 32
-#define HDA_MAX_NAMELEN 32
-
-struct hdac_widget {
- nid_t nid;
- int type;
- int enable;
- int nconns, selconn;
- int waspin;
- uint32_t pflags;
- int bindas;
- int bindseqmask;
- int ossdev;
- uint32_t ossmask;
- nid_t conns[HDA_MAX_CONNS];
- u_char connsenable[HDA_MAX_CONNS];
- char name[HDA_MAX_NAMELEN];
- struct hdac_devinfo *devinfo;
- struct {
- uint32_t widget_cap;
- uint32_t outamp_cap;
- uint32_t inamp_cap;
- uint32_t supp_stream_formats;
- uint32_t supp_pcm_size_rate;
- uint32_t eapdbtl;
- } param;
- union {
- struct {
- uint32_t config;
- uint32_t cap;
- uint32_t ctrl;
- } pin;
- } wclass;
-};
-
-struct hdac_audio_ctl {
- struct hdac_widget *widget, *childwidget;
- int enable;
- int index, dir, ndir;
- int mute, step, size, offset;
- int left, right, forcemute;
- uint32_t muted;
- uint32_t ossmask, possmask;
-};
-
-/* Association is a group of pins bound for some special function. */
-struct hdac_audio_as {
- u_char enable;
- u_char index;
- u_char dir;
- u_char pincnt;
- u_char fakeredir;
- u_char digital;
- uint16_t pinset;
- nid_t hpredir;
- nid_t pins[16];
- nid_t dacs[16];
- int chan;
-};
-
-struct hdac_pcm_devinfo {
- device_t dev;
- struct hdac_devinfo *devinfo;
- int index;
- int registered;
- int play, rec;
- u_char left[SOUND_MIXER_NRDEVICES];
- u_char right[SOUND_MIXER_NRDEVICES];
- int chan_size;
- int chan_blkcnt;
- u_char digital;
-};
-
-/****************************************************************************
- * struct hdac_devinfo
- *
- * Holds all the parameters of a given codec function group. This is stored
- * in the ivar of each child of the hdac bus
- ****************************************************************************/
-struct hdac_devinfo {
- uint8_t node_type;
- nid_t nid;
- nid_t startnode, endnode;
- int nodecnt;
- struct hdac_codec *codec;
- struct hdac_widget *widget;
- union {
- struct {
- uint32_t outamp_cap;
- uint32_t inamp_cap;
- uint32_t supp_stream_formats;
- uint32_t supp_pcm_size_rate;
- int ctlcnt, ascnt;
- struct hdac_audio_ctl *ctl;
- struct hdac_audio_as *as;
- uint32_t quirks;
- uint32_t gpio;
- struct hdac_pcm_devinfo *devs;
- int num_devs;
- } audio;
- /* XXX undefined: modem, hdmi. */
- } function;
-};
-
-#define HDAC_CHN_RUNNING 0x00000001
-#define HDAC_CHN_SUSPEND 0x00000002
-
-struct hdac_chan {
- struct snd_dbuf *b;
- struct pcm_channel *c;
- struct pcmchan_caps caps;
- struct hdac_devinfo *devinfo;
- struct hdac_pcm_devinfo *pdevinfo;
- struct hdac_dma bdl_dma;
- uint32_t spd, fmt, fmtlist[16], pcmrates[16];
- uint32_t supp_stream_formats, supp_pcm_size_rate;
- uint32_t ptr, prevptr, blkcnt, blksz;
- uint32_t *dmapos;
- uint32_t flags;
- int dir;
- int off;
- int sid;
- int bit16, bit32;
- int as;
- nid_t io[16];
-};
-
-/****************************************************************************
- * struct hdac_codec
- *
- ****************************************************************************/
-struct hdac_codec {
- int verbs_sent;
- int responses_received;
- nid_t cad;
- uint16_t vendor_id;
- uint16_t device_id;
- uint8_t revision_id;
- uint8_t stepping_id;
- struct hdac_command_list *commands;
- struct hdac_softc *sc;
- struct hdac_devinfo *fgs;
- int num_fgs;
+struct hdac_stream {
+ device_t dev;
+ struct hdac_dma bdl;
+ int dir;
+ int stream;
+ int blksz;
+ int running;
+ int bw;
+ int stripe;
+ uint16_t format;
};
-/****************************************************************************
- * struct hdac_softc
- *
- * This structure holds the current state of the hdac driver.
- ****************************************************************************/
-
-#define HDAC_F_DMA_NOCACHE 0x00000001
-#define HDAC_F_MSI 0x00000002
-
struct hdac_softc {
device_t dev;
- device_t hdabus;
struct mtx *lock;
struct intr_config_hook intrhook;
struct hdac_mem mem;
struct hdac_irq irq;
- uint32_t pci_subvendor;
+ uint32_t quirks_on;
+ uint32_t quirks_off;
uint32_t flags;
+#define HDAC_F_DMA_NOCACHE 0x00000001
- struct hdac_chan *chans;
- int num_chans;
int num_iss;
int num_oss;
int num_bss;
+ int num_ss;
int num_sdo;
int support_64bit;
- int streamcnt;
int corb_size;
struct hdac_dma corb_dma;
@@ -356,18 +193,13 @@ struct hdac_softc {
bus_dma_tag_t chan_dmat;
- /*
- * Polling
- */
+ /* Polling */
int polling;
- int poll_ticks;
int poll_ival;
- struct callout poll_hda;
- struct callout poll_hdac;
- struct callout poll_jack;
+ struct callout poll_callout;
+ int unsol_registered;
struct task unsolq_task;
-
#define HDAC_UNSOLQ_MAX 64
#define HDAC_UNSOLQ_READY 0
#define HDAC_UNSOLQ_BUSY 1
@@ -376,13 +208,20 @@ struct hdac_softc {
int unsolq_st;
uint32_t unsolq[HDAC_UNSOLQ_MAX];
- struct hdac_codec *codecs[HDAC_CODEC_MAX];
-};
+ int sdo_bw_used;
-/****************************************************************************
- * struct hdac_command flags
- ****************************************************************************/
-#define HDAC_COMMAND_FLAG_WAITOK 0x0000
-#define HDAC_COMMAND_FLAG_NOWAIT 0x0001
+ struct hdac_stream *streams;
+
+ struct {
+ device_t dev;
+ uint16_t vendor_id;
+ uint16_t device_id;
+ uint8_t revision_id;
+ uint8_t stepping_id;
+ int pending;
+ uint32_t response;
+ int sdi_bw_used;
+ } codecs[HDAC_CODEC_MAX];
+};
#endif
diff --git a/sys/dev/sound/pci/hda/hdac_reg.h b/sys/dev/sound/pci/hda/hdac_reg.h
index 813af72..893e3d2 100644
--- a/sys/dev/sound/pci/hda/hdac_reg.h
+++ b/sys/dev/sound/pci/hda/hdac_reg.h
@@ -254,10 +254,10 @@
#define HDAC_SDCTL_IOCE 0x000004
#define HDAC_SDCTL_FEIE 0x000008
#define HDAC_SDCTL_DEIE 0x000010
-#define HDAC_SDCTL_STRIPE_MASK 0x030000
-#define HDAC_SDCTL_STRIPE_SHIFT 16
-#define HDAC_SDCTL_TP 0x040000
-#define HDAC_SDCTL_DIR 0x080000
+#define HDAC_SDCTL2_STRIPE_MASK 0x03
+#define HDAC_SDCTL2_STRIPE_SHIFT 0
+#define HDAC_SDCTL2_TP 0x04
+#define HDAC_SDCTL2_DIR 0x08
#define HDAC_SDCTL2_STRM_MASK 0xf0
#define HDAC_SDCTL2_STRM_SHIFT 4
diff --git a/sys/dev/sound/pci/hda/hdacc.c b/sys/dev/sound/pci/hda/hdacc.c
new file mode 100644
index 0000000..c415e0f
--- /dev/null
+++ b/sys/dev/sound/pci/hda/hdacc.c
@@ -0,0 +1,658 @@
+/*-
+ * Copyright (c) 2006 Stephane E. Potvin <sepotvin@videotron.ca>
+ * Copyright (c) 2006 Ariff Abdullah <ariff@FreeBSD.org>
+ * Copyright (c) 2008-2012 Alexander Motin <mav@FreeBSD.org>
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ */
+
+/*
+ * Intel High Definition Audio (CODEC) driver for FreeBSD.
+ */
+
+#ifdef HAVE_KERNEL_OPTION_HEADERS
+#include "opt_snd.h"
+#endif
+
+#include <dev/sound/pcm/sound.h>
+
+#include <sys/ctype.h>
+
+#include <dev/sound/pci/hda/hda_reg.h>
+#include <dev/sound/pci/hda/hdac.h>
+
+SND_DECLARE_FILE("$FreeBSD$");
+
+struct hdacc_fg {
+ device_t dev;
+ nid_t nid;
+ uint8_t type;
+ uint32_t subsystem_id;
+};
+
+struct hdacc_softc {
+ device_t dev;
+ struct mtx *lock;
+ nid_t cad;
+ device_t streams[2][16];
+ device_t tags[64];
+ int fgcnt;
+ struct hdacc_fg *fgs;
+};
+
+#define hdacc_lock(codec) snd_mtxlock((codec)->lock)
+#define hdacc_unlock(codec) snd_mtxunlock((codec)->lock)
+#define hdacc_lockassert(codec) snd_mtxassert((codec)->lock)
+#define hdacc_lockowned(codec) mtx_owned((codec)->lock)
+
+MALLOC_DEFINE(M_HDACC, "hdacc", "HDA CODEC");
+
+/* CODECs */
+static const struct {
+ uint32_t id;
+ uint16_t revid;
+ char *name;
+} hdacc_codecs[] = {
+ { HDA_CODEC_CS4206, 0, "Cirrus Logic CS4206" },
+ { HDA_CODEC_CS4207, 0, "Cirrus Logic CS4207" },
+ { HDA_CODEC_CS4210, 0, "Cirrus Logic CS4210" },
+ { HDA_CODEC_ALC221, 0, "Realtek ALC221" },
+ { HDA_CODEC_ALC260, 0, "Realtek ALC260" },
+ { HDA_CODEC_ALC262, 0, "Realtek ALC262" },
+ { HDA_CODEC_ALC267, 0, "Realtek ALC267" },
+ { HDA_CODEC_ALC268, 0, "Realtek ALC268" },
+ { HDA_CODEC_ALC269, 0, "Realtek ALC269" },
+ { HDA_CODEC_ALC270, 0, "Realtek ALC270" },
+ { HDA_CODEC_ALC272, 0, "Realtek ALC272" },
+ { HDA_CODEC_ALC273, 0, "Realtek ALC273" },
+ { HDA_CODEC_ALC275, 0, "Realtek ALC275" },
+ { HDA_CODEC_ALC276, 0, "Realtek ALC276" },
+ { HDA_CODEC_ALC660, 0, "Realtek ALC660-VD" },
+ { HDA_CODEC_ALC662, 0x0002, "Realtek ALC662 rev2" },
+ { HDA_CODEC_ALC662, 0, "Realtek ALC662" },
+ { HDA_CODEC_ALC663, 0, "Realtek ALC663" },
+ { HDA_CODEC_ALC665, 0, "Realtek ALC665" },
+ { HDA_CODEC_ALC861, 0x0340, "Realtek ALC660" },
+ { HDA_CODEC_ALC861, 0, "Realtek ALC861" },
+ { HDA_CODEC_ALC861VD, 0, "Realtek ALC861-VD" },
+ { HDA_CODEC_ALC880, 0, "Realtek ALC880" },
+ { HDA_CODEC_ALC882, 0, "Realtek ALC882" },
+ { HDA_CODEC_ALC883, 0, "Realtek ALC883" },
+ { HDA_CODEC_ALC885, 0x0101, "Realtek ALC889A" },
+ { HDA_CODEC_ALC885, 0x0103, "Realtek ALC889A" },
+ { HDA_CODEC_ALC885, 0, "Realtek ALC885" },
+ { HDA_CODEC_ALC887, 0, "Realtek ALC887" },
+ { HDA_CODEC_ALC888, 0x0101, "Realtek ALC1200" },
+ { HDA_CODEC_ALC888, 0, "Realtek ALC888" },
+ { HDA_CODEC_ALC889, 0, "Realtek ALC889" },
+ { HDA_CODEC_ALC892, 0, "Realtek ALC892" },
+ { HDA_CODEC_ALC899, 0, "Realtek ALC899" },
+ { HDA_CODEC_AD1882, 0, "Analog Devices AD1882" },
+ { HDA_CODEC_AD1882A, 0, "Analog Devices AD1882A" },
+ { HDA_CODEC_AD1883, 0, "Analog Devices AD1883" },
+ { HDA_CODEC_AD1884, 0, "Analog Devices AD1884" },
+ { HDA_CODEC_AD1884A, 0, "Analog Devices AD1884A" },
+ { HDA_CODEC_AD1981HD, 0, "Analog Devices AD1981HD" },
+ { HDA_CODEC_AD1983, 0, "Analog Devices AD1983" },
+ { HDA_CODEC_AD1984, 0, "Analog Devices AD1984" },
+ { HDA_CODEC_AD1984A, 0, "Analog Devices AD1984A" },
+ { HDA_CODEC_AD1984B, 0, "Analog Devices AD1984B" },
+ { HDA_CODEC_AD1986A, 0, "Analog Devices AD1986A" },
+ { HDA_CODEC_AD1987, 0, "Analog Devices AD1987" },
+ { HDA_CODEC_AD1988, 0, "Analog Devices AD1988A" },
+ { HDA_CODEC_AD1988B, 0, "Analog Devices AD1988B" },
+ { HDA_CODEC_AD1989A, 0, "Analog Devices AD1989A" },
+ { HDA_CODEC_AD1989B, 0, "Analog Devices AD1989B" },
+ { HDA_CODEC_CMI9880, 0, "CMedia CMI9880" },
+ { HDA_CODEC_CXD9872RDK, 0, "Sigmatel CXD9872RD/K" },
+ { HDA_CODEC_CXD9872AKD, 0, "Sigmatel CXD9872AKD" },
+ { HDA_CODEC_STAC9200D, 0, "Sigmatel STAC9200D" },
+ { HDA_CODEC_STAC9204X, 0, "Sigmatel STAC9204X" },
+ { HDA_CODEC_STAC9204D, 0, "Sigmatel STAC9204D" },
+ { HDA_CODEC_STAC9205X, 0, "Sigmatel STAC9205X" },
+ { HDA_CODEC_STAC9205D, 0, "Sigmatel STAC9205D" },
+ { HDA_CODEC_STAC9220, 0, "Sigmatel STAC9220" },
+ { HDA_CODEC_STAC9220_A1, 0, "Sigmatel STAC9220_A1" },
+ { HDA_CODEC_STAC9220_A2, 0, "Sigmatel STAC9220_A2" },
+ { HDA_CODEC_STAC9221, 0, "Sigmatel STAC9221" },
+ { HDA_CODEC_STAC9221_A2, 0, "Sigmatel STAC9221_A2" },
+ { HDA_CODEC_STAC9221D, 0, "Sigmatel STAC9221D" },
+ { HDA_CODEC_STAC922XD, 0, "Sigmatel STAC9220D/9223D" },
+ { HDA_CODEC_STAC9227X, 0, "Sigmatel STAC9227X" },
+ { HDA_CODEC_STAC9227D, 0, "Sigmatel STAC9227D" },
+ { HDA_CODEC_STAC9228X, 0, "Sigmatel STAC9228X" },
+ { HDA_CODEC_STAC9228D, 0, "Sigmatel STAC9228D" },
+ { HDA_CODEC_STAC9229X, 0, "Sigmatel STAC9229X" },
+ { HDA_CODEC_STAC9229D, 0, "Sigmatel STAC9229D" },
+ { HDA_CODEC_STAC9230X, 0, "Sigmatel STAC9230X" },
+ { HDA_CODEC_STAC9230D, 0, "Sigmatel STAC9230D" },
+ { HDA_CODEC_STAC9250, 0, "Sigmatel STAC9250" },
+ { HDA_CODEC_STAC9251, 0, "Sigmatel STAC9251" },
+ { HDA_CODEC_STAC9271X, 0, "Sigmatel STAC9271X" },
+ { HDA_CODEC_STAC9271D, 0, "Sigmatel STAC9271D" },
+ { HDA_CODEC_STAC9272X, 0, "Sigmatel STAC9272X" },
+ { HDA_CODEC_STAC9272D, 0, "Sigmatel STAC9272D" },
+ { HDA_CODEC_STAC9273X, 0, "Sigmatel STAC9273X" },
+ { HDA_CODEC_STAC9273D, 0, "Sigmatel STAC9273D" },
+ { HDA_CODEC_STAC9274, 0, "Sigmatel STAC9274" },
+ { HDA_CODEC_STAC9274D, 0, "Sigmatel STAC9274D" },
+ { HDA_CODEC_STAC9274X5NH, 0, "Sigmatel STAC9274X5NH" },
+ { HDA_CODEC_STAC9274D5NH, 0, "Sigmatel STAC9274D5NH" },
+ { HDA_CODEC_STAC9872AK, 0, "Sigmatel STAC9872AK" },
+ { HDA_CODEC_IDT92HD005, 0, "IDT 92HD005" },
+ { HDA_CODEC_IDT92HD005D, 0, "IDT 92HD005D" },
+ { HDA_CODEC_IDT92HD206X, 0, "IDT 92HD206X" },
+ { HDA_CODEC_IDT92HD206D, 0, "IDT 92HD206D" },
+ { HDA_CODEC_IDT92HD700X, 0, "IDT 92HD700X" },
+ { HDA_CODEC_IDT92HD700D, 0, "IDT 92HD700D" },
+ { HDA_CODEC_IDT92HD71B5, 0, "IDT 92HD71B5" },
+ { HDA_CODEC_IDT92HD71B7, 0, "IDT 92HD71B7" },
+ { HDA_CODEC_IDT92HD71B8, 0, "IDT 92HD71B8" },
+ { HDA_CODEC_IDT92HD73C1, 0, "IDT 92HD73C1" },
+ { HDA_CODEC_IDT92HD73D1, 0, "IDT 92HD73D1" },
+ { HDA_CODEC_IDT92HD73E1, 0, "IDT 92HD73E1" },
+ { HDA_CODEC_IDT92HD75B3, 0, "IDT 92HD75B3" },
+ { HDA_CODEC_IDT92HD75BX, 0, "IDT 92HD75BX" },
+ { HDA_CODEC_IDT92HD81B1C, 0, "IDT 92HD81B1C" },
+ { HDA_CODEC_IDT92HD81B1X, 0, "IDT 92HD81B1X" },
+ { HDA_CODEC_IDT92HD83C1C, 0, "IDT 92HD83C1C" },
+ { HDA_CODEC_IDT92HD83C1X, 0, "IDT 92HD83C1X" },
+ { HDA_CODEC_CX20549, 0, "Conexant CX20549 (Venice)" },
+ { HDA_CODEC_CX20551, 0, "Conexant CX20551 (Waikiki)" },
+ { HDA_CODEC_CX20561, 0, "Conexant CX20561 (Hermosa)" },
+ { HDA_CODEC_CX20582, 0, "Conexant CX20582 (Pebble)" },
+ { HDA_CODEC_CX20583, 0, "Conexant CX20583 (Pebble HSF)" },
+ { HDA_CODEC_CX20584, 0, "Conexant CX20584" },
+ { HDA_CODEC_CX20585, 0, "Conexant CX20585" },
+ { HDA_CODEC_CX20588, 0, "Conexant CX20588" },
+ { HDA_CODEC_CX20590, 0, "Conexant CX20590" },
+ { HDA_CODEC_CX20631, 0, "Conexant CX20631" },
+ { HDA_CODEC_CX20632, 0, "Conexant CX20632" },
+ { HDA_CODEC_CX20641, 0, "Conexant CX20641" },
+ { HDA_CODEC_CX20642, 0, "Conexant CX20642" },
+ { HDA_CODEC_CX20651, 0, "Conexant CX20651" },
+ { HDA_CODEC_CX20652, 0, "Conexant CX20652" },
+ { HDA_CODEC_CX20664, 0, "Conexant CX20664" },
+ { HDA_CODEC_CX20665, 0, "Conexant CX20665" },
+ { HDA_CODEC_VT1708_8, 0, "VIA VT1708_8" },
+ { HDA_CODEC_VT1708_9, 0, "VIA VT1708_9" },
+ { HDA_CODEC_VT1708_A, 0, "VIA VT1708_A" },
+ { HDA_CODEC_VT1708_B, 0, "VIA VT1708_B" },
+ { HDA_CODEC_VT1709_0, 0, "VIA VT1709_0" },
+ { HDA_CODEC_VT1709_1, 0, "VIA VT1709_1" },
+ { HDA_CODEC_VT1709_2, 0, "VIA VT1709_2" },
+ { HDA_CODEC_VT1709_3, 0, "VIA VT1709_3" },
+ { HDA_CODEC_VT1709_4, 0, "VIA VT1709_4" },
+ { HDA_CODEC_VT1709_5, 0, "VIA VT1709_5" },
+ { HDA_CODEC_VT1709_6, 0, "VIA VT1709_6" },
+ { HDA_CODEC_VT1709_7, 0, "VIA VT1709_7" },
+ { HDA_CODEC_VT1708B_0, 0, "VIA VT1708B_0" },
+ { HDA_CODEC_VT1708B_1, 0, "VIA VT1708B_1" },
+ { HDA_CODEC_VT1708B_2, 0, "VIA VT1708B_2" },
+ { HDA_CODEC_VT1708B_3, 0, "VIA VT1708B_3" },
+ { HDA_CODEC_VT1708B_4, 0, "VIA VT1708B_4" },
+ { HDA_CODEC_VT1708B_5, 0, "VIA VT1708B_5" },
+ { HDA_CODEC_VT1708B_6, 0, "VIA VT1708B_6" },
+ { HDA_CODEC_VT1708B_7, 0, "VIA VT1708B_7" },
+ { HDA_CODEC_VT1708S_0, 0, "VIA VT1708S_0" },
+ { HDA_CODEC_VT1708S_1, 0, "VIA VT1708S_1" },
+ { HDA_CODEC_VT1708S_2, 0, "VIA VT1708S_2" },
+ { HDA_CODEC_VT1708S_3, 0, "VIA VT1708S_3" },
+ { HDA_CODEC_VT1708S_4, 0, "VIA VT1708S_4" },
+ { HDA_CODEC_VT1708S_5, 0, "VIA VT1708S_5" },
+ { HDA_CODEC_VT1708S_6, 0, "VIA VT1708S_6" },
+ { HDA_CODEC_VT1708S_7, 0, "VIA VT1708S_7" },
+ { HDA_CODEC_VT1702_0, 0, "VIA VT1702_0" },
+ { HDA_CODEC_VT1702_1, 0, "VIA VT1702_1" },
+ { HDA_CODEC_VT1702_2, 0, "VIA VT1702_2" },
+ { HDA_CODEC_VT1702_3, 0, "VIA VT1702_3" },
+ { HDA_CODEC_VT1702_4, 0, "VIA VT1702_4" },
+ { HDA_CODEC_VT1702_5, 0, "VIA VT1702_5" },
+ { HDA_CODEC_VT1702_6, 0, "VIA VT1702_6" },
+ { HDA_CODEC_VT1702_7, 0, "VIA VT1702_7" },
+ { HDA_CODEC_VT1716S_0, 0, "VIA VT1716S_0" },
+ { HDA_CODEC_VT1716S_1, 0, "VIA VT1716S_1" },
+ { HDA_CODEC_VT1718S_0, 0, "VIA VT1718S_0" },
+ { HDA_CODEC_VT1718S_1, 0, "VIA VT1718S_1" },
+ { HDA_CODEC_VT1802_0, 0, "VIA VT1802_0" },
+ { HDA_CODEC_VT1802_1, 0, "VIA VT1802_1" },
+ { HDA_CODEC_VT1812, 0, "VIA VT1812" },
+ { HDA_CODEC_VT1818S, 0, "VIA VT1818S" },
+ { HDA_CODEC_VT1828S, 0, "VIA VT1828S" },
+ { HDA_CODEC_VT2002P_0, 0, "VIA VT2002P_0" },
+ { HDA_CODEC_VT2002P_1, 0, "VIA VT2002P_1" },
+ { HDA_CODEC_VT2020, 0, "VIA VT2020" },
+ { HDA_CODEC_ATIRS600_1, 0, "ATI RS600" },
+ { HDA_CODEC_ATIRS600_2, 0, "ATI RS600" },
+ { HDA_CODEC_ATIRS690, 0, "ATI RS690/780" },
+ { HDA_CODEC_ATIR6XX, 0, "ATI R6xx" },
+ { HDA_CODEC_NVIDIAMCP67, 0, "NVIDIA MCP67" },
+ { HDA_CODEC_NVIDIAMCP73, 0, "NVIDIA MCP73" },
+ { HDA_CODEC_NVIDIAMCP78, 0, "NVIDIA MCP78" },
+ { HDA_CODEC_NVIDIAMCP78_2, 0, "NVIDIA MCP78" },
+ { HDA_CODEC_NVIDIAMCP7A, 0, "NVIDIA MCP7A" },
+ { HDA_CODEC_NVIDIAGT220, 0, "NVIDIA GT220" },
+ { HDA_CODEC_NVIDIAGT21X, 0, "NVIDIA GT21x" },
+ { HDA_CODEC_NVIDIAMCP89, 0, "NVIDIA MCP89" },
+ { HDA_CODEC_NVIDIAGT240, 0, "NVIDIA GT240" },
+ { HDA_CODEC_INTELIP, 0, "Intel Ibex Peak" },
+ { HDA_CODEC_INTELBL, 0, "Intel Bearlake" },
+ { HDA_CODEC_INTELCA, 0, "Intel Cantiga" },
+ { HDA_CODEC_INTELEL, 0, "Intel Eaglelake" },
+ { HDA_CODEC_INTELIP2, 0, "Intel Ibex Peak" },
+ { HDA_CODEC_INTELCPT, 0, "Intel Cougar Point" },
+ { HDA_CODEC_INTELPPT, 0, "Intel Panther Point" },
+ { HDA_CODEC_INTELCL, 0, "Intel Crestline" },
+ { HDA_CODEC_SII1390, 0, "Silicon Image SiI1390" },
+ { HDA_CODEC_SII1392, 0, "Silicon Image SiI1392" },
+ /* Unknown CODECs */
+ { HDA_CODEC_ALCXXXX, 0, "Realtek" },
+ { HDA_CODEC_ADXXXX, 0, "Analog Devices" },
+ { HDA_CODEC_CSXXXX, 0, "Cirrus Logic" },
+ { HDA_CODEC_CMIXXXX, 0, "CMedia" },
+ { HDA_CODEC_STACXXXX, 0, "Sigmatel" },
+ { HDA_CODEC_SIIXXXX, 0, "Silicon Image" },
+ { HDA_CODEC_AGEREXXXX, 0, "Lucent/Agere Systems" },
+ { HDA_CODEC_CXXXXX, 0, "Conexant" },
+ { HDA_CODEC_VTXXXX, 0, "VIA" },
+ { HDA_CODEC_ATIXXXX, 0, "ATI" },
+ { HDA_CODEC_NVIDIAXXXX, 0, "NVIDIA" },
+ { HDA_CODEC_INTELXXXX, 0, "Intel" },
+ { HDA_CODEC_IDTXXXX, 0, "IDT" },
+};
+#define HDACC_CODECS_LEN (sizeof(hdacc_codecs) / sizeof(hdacc_codecs[0]))
+
+static int
+hdacc_suspend(device_t dev)
+{
+
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Suspend...\n");
+ );
+ bus_generic_suspend(dev);
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Suspend done\n");
+ );
+ return (0);
+}
+
+static int
+hdacc_resume(device_t dev)
+{
+
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Resume...\n");
+ );
+ bus_generic_resume(dev);
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Resume done\n");
+ );
+ return (0);
+}
+
+static int
+hdacc_probe(device_t dev)
+{
+ uint32_t id, revid;
+ char buf[128];
+ int i;
+
+ id = ((uint32_t)hda_get_vendor_id(dev) << 16) + hda_get_device_id(dev);
+ revid = ((uint32_t)hda_get_revision_id(dev) << 8) + hda_get_stepping_id(dev);
+
+ for (i = 0; i < HDACC_CODECS_LEN; i++) {
+ if (!HDA_DEV_MATCH(hdacc_codecs[i].id, id))
+ continue;
+ if (hdacc_codecs[i].revid != 0 &&
+ hdacc_codecs[i].revid != revid)
+ continue;
+ break;
+ }
+ if (i < HDACC_CODECS_LEN) {
+ if ((hdacc_codecs[i].id & 0xffff) != 0xffff)
+ strlcpy(buf, hdacc_codecs[i].name, sizeof(buf));
+ else
+ snprintf(buf, sizeof(buf), "%s (0x%04x)",
+ hdacc_codecs[i].name, hda_get_device_id(dev));
+ } else
+ snprintf(buf, sizeof(buf), "Generic (0x%04x)", id);
+ strlcat(buf, " HDA CODEC", sizeof(buf));
+ device_set_desc_copy(dev, buf);
+ return (BUS_PROBE_DEFAULT);
+}
+
+static int
+hdacc_attach(device_t dev)
+{
+ struct hdacc_softc *codec = device_get_softc(dev);
+ device_t child;
+ int cad = (intptr_t)device_get_ivars(dev);
+ uint32_t subnode;
+ int startnode;
+ int endnode;
+ int i, n;
+
+ codec->lock = HDAC_GET_MTX(device_get_parent(dev), dev);
+ codec->dev = dev;
+ codec->cad = cad;
+
+ hdacc_lock(codec);
+ subnode = hda_command(dev,
+ HDA_CMD_GET_PARAMETER(0, 0x0, HDA_PARAM_SUB_NODE_COUNT));
+ hdacc_unlock(codec);
+ if (subnode == HDA_INVALID)
+ return (EIO);
+ codec->fgcnt = HDA_PARAM_SUB_NODE_COUNT_TOTAL(subnode);
+ startnode = HDA_PARAM_SUB_NODE_COUNT_START(subnode);
+ endnode = startnode + codec->fgcnt;
+
+ HDA_BOOTVERBOSE(
+ device_printf(dev,
+ "Root Node at nid=0: %d subnodes %d-%d\n",
+ HDA_PARAM_SUB_NODE_COUNT_TOTAL(subnode),
+ startnode, endnode - 1);
+ );
+
+ codec->fgs = malloc(sizeof(struct hdacc_fg) * codec->fgcnt,
+ M_HDACC, M_ZERO | M_WAITOK);
+ for (i = startnode, n = 0; i < endnode; i++, n++) {
+ codec->fgs[n].nid = i;
+ hdacc_lock(codec);
+ codec->fgs[n].type =
+ HDA_PARAM_FCT_GRP_TYPE_NODE_TYPE(hda_command(dev,
+ HDA_CMD_GET_PARAMETER(0, i, HDA_PARAM_FCT_GRP_TYPE)));
+ codec->fgs[n].subsystem_id = hda_command(dev,
+ HDA_CMD_GET_SUBSYSTEM_ID(0, i));
+ hdacc_unlock(codec);
+ codec->fgs[n].dev = child = device_add_child(dev, NULL, -1);
+ if (child == NULL) {
+ device_printf(dev, "Failed to add function device\n");
+ continue;
+ }
+ device_set_ivars(child, &codec->fgs[n]);
+ }
+
+ bus_generic_attach(dev);
+
+ return (0);
+}
+
+static int
+hdacc_detach(device_t dev)
+{
+
+ return (device_delete_children(dev));
+}
+
+static int
+hdacc_child_location_str(device_t dev, device_t child, char *buf,
+ size_t buflen)
+{
+ struct hdacc_fg *fg = device_get_ivars(child);
+
+ snprintf(buf, buflen, "nid=%d", fg->nid);
+ return (0);
+}
+
+static int
+hdacc_child_pnpinfo_str_method(device_t dev, device_t child, char *buf,
+ size_t buflen)
+{
+ struct hdacc_fg *fg = device_get_ivars(child);
+
+ snprintf(buf, buflen, "type=0x%02x subsystem=0x%08x",
+ fg->type, fg->subsystem_id);
+ return (0);
+}
+
+static int
+hdacc_print_child(device_t dev, device_t child)
+{
+ struct hdacc_fg *fg = device_get_ivars(child);
+ int retval;
+
+ retval = bus_print_child_header(dev, child);
+ retval += printf(" at nid %d", fg->nid);
+ retval += bus_print_child_footer(dev, child);
+
+ return (retval);
+}
+
+static void
+hdacc_probe_nomatch(device_t dev, device_t child)
+{
+ struct hdacc_softc *codec = device_get_softc(dev);
+ struct hdacc_fg *fg = device_get_ivars(child);
+
+ device_printf(child, "<%s %s Function Group> at nid %d on %s "
+ "(no driver attached)\n",
+ device_get_desc(dev),
+ fg->type == HDA_PARAM_FCT_GRP_TYPE_NODE_TYPE_AUDIO ? "Audio" :
+ (fg->type == HDA_PARAM_FCT_GRP_TYPE_NODE_TYPE_MODEM ? "Modem" :
+ "Unknown"), fg->nid, device_get_nameunit(dev));
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Power down FG nid=%d to the D3 state...\n",
+ fg->nid);
+ );
+ hdacc_lock(codec);
+ hda_command(dev, HDA_CMD_SET_POWER_STATE(0,
+ fg->nid, HDA_CMD_POWER_STATE_D3));
+ hdacc_unlock(codec);
+}
+
+static int
+hdacc_read_ivar(device_t dev, device_t child, int which, uintptr_t *result)
+{
+ struct hdacc_fg *fg = device_get_ivars(child);
+
+ switch (which) {
+ case HDA_IVAR_NODE_ID:
+ *result = fg->nid;
+ break;
+ case HDA_IVAR_NODE_TYPE:
+ *result = fg->type;
+ break;
+ case HDA_IVAR_SUBSYSTEM_ID:
+ *result = fg->subsystem_id;
+ break;
+ default:
+ return(BUS_READ_IVAR(device_get_parent(dev), dev,
+ which, result));
+ }
+ return (0);
+}
+
+static struct mtx *
+hdacc_get_mtx(device_t dev, device_t child)
+{
+ struct hdacc_softc *codec = device_get_softc(dev);
+
+ return (codec->lock);
+}
+
+static uint32_t
+hdacc_codec_command(device_t dev, device_t child, uint32_t verb)
+{
+
+ return (HDAC_CODEC_COMMAND(device_get_parent(dev), dev, verb));
+}
+
+static int
+hdacc_stream_alloc(device_t dev, device_t child, int dir, int format,
+ int stripe, uint32_t **dmapos)
+{
+ struct hdacc_softc *codec = device_get_softc(dev);
+ int stream;
+
+ stream = HDAC_STREAM_ALLOC(device_get_parent(dev), dev,
+ dir, format, stripe, dmapos);
+ if (stream > 0)
+ codec->streams[dir][stream] = child;
+ return (stream);
+}
+
+static void
+hdacc_stream_free(device_t dev, device_t child, int dir, int stream)
+{
+ struct hdacc_softc *codec = device_get_softc(dev);
+
+ codec->streams[dir][stream] = NULL;
+ HDAC_STREAM_FREE(device_get_parent(dev), dev, dir, stream);
+}
+
+static int
+hdacc_stream_start(device_t dev, device_t child,
+ int dir, int stream, bus_addr_t buf, int blksz, int blkcnt)
+{
+
+ return (HDAC_STREAM_START(device_get_parent(dev), dev,
+ dir, stream, buf, blksz, blkcnt));
+}
+
+static void
+hdacc_stream_stop(device_t dev, device_t child, int dir, int stream)
+{
+
+ HDAC_STREAM_STOP(device_get_parent(dev), dev, dir, stream);
+}
+
+static void
+hdacc_stream_reset(device_t dev, device_t child, int dir, int stream)
+{
+
+ HDAC_STREAM_RESET(device_get_parent(dev), dev, dir, stream);
+}
+
+static uint32_t
+hdacc_stream_getptr(device_t dev, device_t child, int dir, int stream)
+{
+
+ return (HDAC_STREAM_GETPTR(device_get_parent(dev), dev, dir, stream));
+}
+
+static void
+hdacc_stream_intr(device_t dev, int dir, int stream)
+{
+ struct hdacc_softc *codec = device_get_softc(dev);
+ device_t child;
+
+ if ((child = codec->streams[dir][stream]) != NULL);
+ HDAC_STREAM_INTR(child, dir, stream);
+}
+
+static int
+hdacc_unsol_alloc(device_t dev, device_t child, int wanted)
+{
+ struct hdacc_softc *codec = device_get_softc(dev);
+ int tag;
+
+ wanted &= 0x3f;
+ tag = wanted;
+ do {
+ if (codec->tags[tag] == NULL) {
+ codec->tags[tag] = child;
+ HDAC_UNSOL_ALLOC(device_get_parent(dev), dev, tag);
+ return (tag);
+ }
+ tag++;
+ tag &= 0x3f;
+ } while (tag != wanted);
+ return (-1);
+}
+
+static void
+hdacc_unsol_free(device_t dev, device_t child, int tag)
+{
+ struct hdacc_softc *codec = device_get_softc(dev);
+
+ KASSERT(tag >= 0 && tag <= 0x3f, ("Wrong tag value %d\n", tag));
+ codec->tags[tag] = NULL;
+ HDAC_UNSOL_FREE(device_get_parent(dev), dev, tag);
+}
+
+static void
+hdacc_unsol_intr(device_t dev, uint32_t resp)
+{
+ struct hdacc_softc *codec = device_get_softc(dev);
+ device_t child;
+ int tag;
+
+ tag = resp >> 26;
+ if ((child = codec->tags[tag]) != NULL)
+ HDAC_UNSOL_INTR(child, resp);
+ else
+ device_printf(codec->dev, "Unexpected unsolicited "
+ "response with tag %d: %08x\n", tag, resp);
+}
+
+static void
+hdacc_pindump(device_t dev)
+{
+ device_t *devlist;
+ int devcount, i;
+
+ if (device_get_children(dev, &devlist, &devcount) != 0)
+ return;
+ for (i = 0; i < devcount; i++)
+ HDAC_PINDUMP(devlist[i]);
+ free(devlist, M_TEMP);
+}
+
+static device_method_t hdacc_methods[] = {
+ /* device interface */
+ DEVMETHOD(device_probe, hdacc_probe),
+ DEVMETHOD(device_attach, hdacc_attach),
+ DEVMETHOD(device_detach, hdacc_detach),
+ DEVMETHOD(device_suspend, hdacc_suspend),
+ DEVMETHOD(device_resume, hdacc_resume),
+ /* Bus interface */
+ DEVMETHOD(bus_child_location_str, hdacc_child_location_str),
+ DEVMETHOD(bus_child_pnpinfo_str, hdacc_child_pnpinfo_str_method),
+ DEVMETHOD(bus_print_child, hdacc_print_child),
+ DEVMETHOD(bus_probe_nomatch, hdacc_probe_nomatch),
+ DEVMETHOD(bus_read_ivar, hdacc_read_ivar),
+ DEVMETHOD(hdac_get_mtx, hdacc_get_mtx),
+ DEVMETHOD(hdac_codec_command, hdacc_codec_command),
+ DEVMETHOD(hdac_stream_alloc, hdacc_stream_alloc),
+ DEVMETHOD(hdac_stream_free, hdacc_stream_free),
+ DEVMETHOD(hdac_stream_start, hdacc_stream_start),
+ DEVMETHOD(hdac_stream_stop, hdacc_stream_stop),
+ DEVMETHOD(hdac_stream_reset, hdacc_stream_reset),
+ DEVMETHOD(hdac_stream_getptr, hdacc_stream_getptr),
+ DEVMETHOD(hdac_stream_intr, hdacc_stream_intr),
+ DEVMETHOD(hdac_unsol_alloc, hdacc_unsol_alloc),
+ DEVMETHOD(hdac_unsol_free, hdacc_unsol_free),
+ DEVMETHOD(hdac_unsol_intr, hdacc_unsol_intr),
+ DEVMETHOD(hdac_pindump, hdacc_pindump),
+ { 0, 0 }
+};
+
+static driver_t hdacc_driver = {
+ "hdacc",
+ hdacc_methods,
+ sizeof(struct hdacc_softc),
+};
+
+static devclass_t hdacc_devclass;
+
+DRIVER_MODULE(snd_hda, hdac, hdacc_driver, hdacc_devclass, 0, 0);
diff --git a/sys/dev/sound/pci/maestro3.c b/sys/dev/sound/pci/maestro3.c
index 51f9ee0..41e71cd 100644
--- a/sys/dev/sound/pci/maestro3.c
+++ b/sys/dev/sound/pci/maestro3.c
@@ -62,8 +62,10 @@
#include <dev/pci/pcireg.h>
#include <dev/pci/pcivar.h>
-#include <gnu/dev/sound/pci/maestro3_reg.h>
-#include <gnu/dev/sound/pci/maestro3_dsp.h>
+#define M3_MODEL 1
+
+#include <dev/sound/pci/allegro_reg.h>
+#include <dev/sound/pci/allegro_code.h>
SND_DECLARE_FILE("$FreeBSD$");
@@ -96,6 +98,7 @@ static struct m3_card_type {
#define M3_PCHANS 4 /* create /dev/dsp0.[0-N] to use more than one */
#define M3_RCHANS 1
#define M3_MAXADDR ((1 << 27) - 1)
+#define M3_DEFAULT_VOL 0x6800
struct sc_info;
@@ -376,6 +379,31 @@ m3_pchan_init(kobj_t kobj, void *devinfo, struct snd_dbuf *b, struct pcm_channel
int idx, data_bytes, dac_data;
int dsp_in_size, dsp_out_size, dsp_in_buf, dsp_out_buf;
+ struct data_word {
+ u_int16_t addr, val;
+ } pv[] = {
+ {CDATA_LEFT_VOLUME, M3_DEFAULT_VOL},
+ {CDATA_RIGHT_VOLUME, M3_DEFAULT_VOL},
+ {SRC3_DIRECTION_OFFSET, 0} ,
+ {SRC3_DIRECTION_OFFSET + 3, 0x0000},
+ {SRC3_DIRECTION_OFFSET + 4, 0},
+ {SRC3_DIRECTION_OFFSET + 5, 0},
+ {SRC3_DIRECTION_OFFSET + 6, 0},
+ {SRC3_DIRECTION_OFFSET + 7, 0},
+ {SRC3_DIRECTION_OFFSET + 8, 0},
+ {SRC3_DIRECTION_OFFSET + 9, 0},
+ {SRC3_DIRECTION_OFFSET + 10, 0x8000},
+ {SRC3_DIRECTION_OFFSET + 11, 0xFF00},
+ {SRC3_DIRECTION_OFFSET + 13, 0},
+ {SRC3_DIRECTION_OFFSET + 14, 0},
+ {SRC3_DIRECTION_OFFSET + 15, 0},
+ {SRC3_DIRECTION_OFFSET + 16, 8},
+ {SRC3_DIRECTION_OFFSET + 17, 50*2},
+ {SRC3_DIRECTION_OFFSET + 18, MINISRC_BIQUAD_STAGE - 1},
+ {SRC3_DIRECTION_OFFSET + 20, 0},
+ {SRC3_DIRECTION_OFFSET + 21, 0}
+ };
+
M3_LOCK(sc);
idx = sc->pch_cnt; /* dac instance number, no active reuse! */
M3_DEBUG(CHANGE, ("m3_pchan_init(dac=%d)\n", idx));
@@ -729,6 +757,33 @@ m3_rchan_init(kobj_t kobj, void *devinfo, struct snd_dbuf *b, struct pcm_channel
int idx, data_bytes, adc_data;
int dsp_in_size, dsp_out_size, dsp_in_buf, dsp_out_buf;
+ struct data_word {
+ u_int16_t addr, val;
+ } rv[] = {
+ {CDATA_LEFT_VOLUME, M3_DEFAULT_VOL},
+ {CDATA_RIGHT_VOLUME, M3_DEFAULT_VOL},
+ {SRC3_DIRECTION_OFFSET, 1},
+ {SRC3_DIRECTION_OFFSET + 3, 0x0000},
+ {SRC3_DIRECTION_OFFSET + 4, 0},
+ {SRC3_DIRECTION_OFFSET + 5, 0},
+ {SRC3_DIRECTION_OFFSET + 6, 0},
+ {SRC3_DIRECTION_OFFSET + 7, 0},
+ {SRC3_DIRECTION_OFFSET + 8, 0},
+ {SRC3_DIRECTION_OFFSET + 9, 0},
+ {SRC3_DIRECTION_OFFSET + 10, 0x8000},
+ {SRC3_DIRECTION_OFFSET + 11, 0xFF00},
+ {SRC3_DIRECTION_OFFSET + 13, 0},
+ {SRC3_DIRECTION_OFFSET + 14, 0},
+ {SRC3_DIRECTION_OFFSET + 15, 0},
+ {SRC3_DIRECTION_OFFSET + 16, 50},
+ {SRC3_DIRECTION_OFFSET + 17, 8},
+ {SRC3_DIRECTION_OFFSET + 18, 0},
+ {SRC3_DIRECTION_OFFSET + 19, 0},
+ {SRC3_DIRECTION_OFFSET + 20, 0},
+ {SRC3_DIRECTION_OFFSET + 21, 0},
+ {SRC3_DIRECTION_OFFSET + 22, 0xff}
+ };
+
M3_LOCK(sc);
idx = sc->rch_cnt; /* adc instance number, no active reuse! */
M3_DEBUG(CHANGE, ("m3_rchan_init(adc=%d)\n", idx));
@@ -1189,25 +1244,25 @@ m3_init(struct sc_info *sc)
m3_wr_assp_data(sc, KDATA_CURRENT_DMA,
KDATA_DMA_XFER0);
/* write kernel into code memory */
- size = sizeof(assp_kernel_image);
+ size = sizeof(gaw_kernel_vect_code);
for(i = 0 ; i < size / 2; i++) {
m3_wr_assp_code(sc, REV_B_CODE_MEMORY_BEGIN + i,
- assp_kernel_image[i]);
+ gaw_kernel_vect_code[i]);
}
/*
* We only have this one client and we know that 0x400 is free in
* our kernel's mem map, so lets just drop it there. It seems that
* the minisrc doesn't need vectors, so we won't bother with them..
*/
- size = sizeof(assp_minisrc_image);
+ size = sizeof(gaw_minisrc_code_0400);
for(i = 0 ; i < size / 2; i++) {
- m3_wr_assp_code(sc, 0x400 + i, assp_minisrc_image[i]);
+ m3_wr_assp_code(sc, 0x400 + i, gaw_minisrc_code_0400[i]);
}
/* write the coefficients for the low pass filter? */
- size = sizeof(minisrc_lpf_image);
+ size = sizeof(minisrc_lpf);
for(i = 0; i < size / 2 ; i++) {
m3_wr_assp_code(sc,0x400 + MINISRC_COEF_LOC + i,
- minisrc_lpf_image[i]);
+ minisrc_lpf[i]);
}
m3_wr_assp_code(sc, 0x400 + MINISRC_COEF_LOC + size, 0x8000);
/* the minisrc is the only thing on our task list */
@@ -1215,8 +1270,8 @@ m3_init(struct sc_info *sc)
/* init the mixer number */
m3_wr_assp_data(sc, KDATA_MIXER_TASK_NUMBER, 0);
/* extreme kernel master volume */
- m3_wr_assp_data(sc, KDATA_DAC_LEFT_VOLUME, ARB_VOLUME);
- m3_wr_assp_data(sc, KDATA_DAC_RIGHT_VOLUME, ARB_VOLUME);
+ m3_wr_assp_data(sc, KDATA_DAC_LEFT_VOLUME, M3_DEFAULT_VOL);
+ m3_wr_assp_data(sc, KDATA_DAC_RIGHT_VOLUME, M3_DEFAULT_VOL);
m3_amp_enable(sc);
diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c
index 2b3b390..d45dec1 100644
--- a/sys/dev/sound/pcm/channel.c
+++ b/sys/dev/sound/pcm/channel.c
@@ -2000,9 +2000,10 @@ chn_setformat(struct pcm_channel *c, uint32_t format)
int ret;
/* XXX force stereo */
- if (format & AFMT_PASSTHROUGH)
+ if ((format & AFMT_PASSTHROUGH) && AFMT_CHANNEL(format) < 2) {
format = SND_FORMAT(format, AFMT_PASSTHROUGH_CHANNEL,
AFMT_PASSTHROUGH_EXTCHANNEL);
+ }
oldformat = c->format;
oldspeed = c->speed;
diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c
index de76f28..7d97a42 100644
--- a/sys/dev/sound/usb/uaudio.c
+++ b/sys/dev/sound/usb/uaudio.c
@@ -765,7 +765,17 @@ uaudio_detach(device_t dev)
{
struct uaudio_softc *sc = device_get_softc(dev);
- if (bus_generic_detach(dev)) {
+ /*
+ * Stop USB transfers early so that any audio applications
+ * will time out and close opened /dev/dspX.Y device(s), if
+ * any.
+ */
+ if (sc->sc_play_chan.valid)
+ usbd_transfer_unsetup(sc->sc_play_chan.xfer, UAUDIO_NCHANBUFS);
+ if (sc->sc_rec_chan.valid)
+ usbd_transfer_unsetup(sc->sc_rec_chan.xfer, UAUDIO_NCHANBUFS);
+
+ if (bus_generic_detach(dev) != 0) {
DPRINTF("detach failed!\n");
}
sbuf_delete(&sc->sc_sndstat);
diff --git a/sys/dev/sound/usb/uaudio.h b/sys/dev/sound/usb/uaudio.h
index 622cb3b..10c10de 100644
--- a/sys/dev/sound/usb/uaudio.h
+++ b/sys/dev/sound/usb/uaudio.h
@@ -27,6 +27,9 @@
/* prototypes from "uaudio.c" used by "uaudio_pcm.c" */
+#ifndef _UAUDIO_H_
+#define _UAUDIO_H_
+
struct uaudio_chan;
struct uaudio_softc;
struct snd_dbuf;
@@ -63,3 +66,5 @@ extern uint32_t uaudio_mixer_setrecsrc(struct uaudio_softc *sc, uint32_t src);
int uaudio_get_vendor(device_t dev);
int uaudio_get_product(device_t dev);
int uaudio_get_release(device_t dev);
+
+#endif /* _UAUDIO_H_ */
diff --git a/sys/dev/speaker/spkr.c b/sys/dev/speaker/spkr.c
index 2d52519..94d4792 100644
--- a/sys/dev/speaker/spkr.c
+++ b/sys/dev/speaker/spkr.c
@@ -130,7 +130,9 @@ rest(int centisecs)
* except possibly at physical block boundaries.
*/
+#ifndef __bool_true_false_are_defined
typedef int bool;
+#endif
#define TRUE 1
#define FALSE 0
diff --git a/sys/dev/spibus/spibusvar.h b/sys/dev/spibus/spibusvar.h
index 543fcfe..c035be1 100644
--- a/sys/dev/spibus/spibusvar.h
+++ b/sys/dev/spibus/spibusvar.h
@@ -18,7 +18,7 @@ enum {
};
#define SPIBUS_ACCESSOR(A, B, T) \
-__inline static int \
+static inline int \
spibus_get_ ## A(device_t dev, T *t) \
{ \
return BUS_READ_IVAR(device_get_parent(dev), dev, \
diff --git a/sys/dev/stge/if_stge.c b/sys/dev/stge/if_stge.c
index 28e9584..7de2115 100644
--- a/sys/dev/stge/if_stge.c
+++ b/sys/dev/stge/if_stge.c
@@ -573,7 +573,6 @@ stge_attach(device_t dev)
ifp->if_ioctl = stge_ioctl;
ifp->if_start = stge_start;
ifp->if_init = stge_init;
- ifp->if_mtu = ETHERMTU;
ifp->if_snd.ifq_drv_maxlen = STGE_TX_RING_CNT - 1;
IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen);
IFQ_SET_READY(&ifp->if_snd);
diff --git a/sys/dev/syscons/blank/blank_saver.c b/sys/dev/syscons/blank/blank_saver.c
index ad1ef74..38ce540 100644
--- a/sys/dev/syscons/blank/blank_saver.c
+++ b/sys/dev/syscons/blank/blank_saver.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1995-1998 Søren Schmidt
+ * Copyright (c) 1995-1998 Søren Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/syscons/fade/fade_saver.c b/sys/dev/syscons/fade/fade_saver.c
index 27d732c..0bcc9e8 100644
--- a/sys/dev/syscons/fade/fade_saver.c
+++ b/sys/dev/syscons/fade/fade_saver.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1995-1998 Søren Schmidt
+ * Copyright (c) 1995-1998 Søren Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/syscons/green/green_saver.c b/sys/dev/syscons/green/green_saver.c
index b03cc72..792a561 100644
--- a/sys/dev/syscons/green/green_saver.c
+++ b/sys/dev/syscons/green/green_saver.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1995-1998 Søren Schmidt
+ * Copyright (c) 1995-1998 Søren Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/syscons/logo/logo_saver.c b/sys/dev/syscons/logo/logo_saver.c
index 16dd333..5828d7e 100644
--- a/sys/dev/syscons/logo/logo_saver.c
+++ b/sys/dev/syscons/logo/logo_saver.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 Dag-Erling Coïdan Smørgrav
+ * Copyright (c) 1998 Dag-Erling Coïdan Smørgrav
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/syscons/rain/rain_saver.c b/sys/dev/syscons/rain/rain_saver.c
index 3953137..ff28924 100644
--- a/sys/dev/syscons/rain/rain_saver.c
+++ b/sys/dev/syscons/rain/rain_saver.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 Dag-Erling Coïdan Smørgrav
+ * Copyright (c) 1998 Dag-Erling Coïdan Smørgrav
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/syscons/schistory.c b/sys/dev/syscons/schistory.c
index c4c95cd..8eefb00 100644
--- a/sys/dev/syscons/schistory.c
+++ b/sys/dev/syscons/schistory.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 1999 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
- * Copyright (c) 1992-1998 Søren Schmidt
+ * Copyright (c) 1992-1998 Søren Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/syscons/snake/snake_saver.c b/sys/dev/syscons/snake/snake_saver.c
index dbcc217..15f8edd 100644
--- a/sys/dev/syscons/snake/snake_saver.c
+++ b/sys/dev/syscons/snake/snake_saver.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1995-1998 Søren Schmidt
+ * Copyright (c) 1995-1998 Søren Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/syscons/star/star_saver.c b/sys/dev/syscons/star/star_saver.c
index d4b58cd..56bfc01 100644
--- a/sys/dev/syscons/star/star_saver.c
+++ b/sys/dev/syscons/star/star_saver.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1995-1998 Søren Schmidt
+ * Copyright (c) 1995-1998 Søren Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index 3928d91..7abc9e1 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1992-1998 Søren Schmidt
+ * Copyright (c) 1992-1998 Søren Schmidt
* All rights reserved.
*
* This code is derived from software contributed to The DragonFly Project
@@ -185,6 +185,7 @@ static void scshutdown(void *, int);
static void scsuspend(void *);
static void scresume(void *);
static u_int scgetc(sc_softc_t *sc, u_int flags);
+static void sc_puts(scr_stat *scp, u_char *buf, int len, int kernel);
#define SCGETC_CN 1
#define SCGETC_NONBLOCK 2
static void sccnupdate(scr_stat *scp);
@@ -228,6 +229,8 @@ static cn_init_t sc_cninit;
static cn_term_t sc_cnterm;
static cn_getc_t sc_cngetc;
static cn_putc_t sc_cnputc;
+static cn_grab_t sc_cngrab;
+static cn_ungrab_t sc_cnungrab;
CONSOLE_DRIVER(sc);
@@ -1608,6 +1611,58 @@ sc_cnterm(struct consdev *cp)
}
static void
+sc_cngrab(struct consdev *cp)
+{
+ scr_stat *scp;
+
+ if (!cold &&
+ sc_console->sc->cur_scp->index != sc_console->index &&
+ sc_console->sc->cur_scp->smode.mode == VT_AUTO &&
+ sc_console->smode.mode == VT_AUTO)
+ sc_switch_scr(sc_console->sc, sc_console->index);
+
+ scp = sc_console->sc->cur_scp;
+
+ if (scp->sc->kbd == NULL)
+ return;
+
+ if (scp->grabbed++ > 0)
+ return;
+
+ /*
+ * Make sure the keyboard is accessible even when the kbd device
+ * driver is disabled.
+ */
+ kbdd_enable(scp->sc->kbd);
+
+ /* we shall always use the keyboard in the XLATE mode here */
+ scp->kbd_prev_mode = scp->kbd_mode;
+ scp->kbd_mode = K_XLATE;
+ (void)kbdd_ioctl(scp->sc->kbd, KDSKBMODE, (caddr_t)&scp->kbd_mode);
+
+ kbdd_poll(scp->sc->kbd, TRUE);
+}
+
+static void
+sc_cnungrab(struct consdev *cp)
+{
+ scr_stat *scp;
+
+ scp = sc_console->sc->cur_scp; /* XXX */
+ if (scp->sc->kbd == NULL)
+ return;
+
+ if (--scp->grabbed > 0)
+ return;
+
+ kbdd_poll(scp->sc->kbd, FALSE);
+
+ scp->kbd_mode = scp->kbd_prev_mode;
+ (void)kbdd_ioctl(scp->sc->kbd, KDSKBMODE, (caddr_t)&scp->kbd_mode);
+ kbdd_disable(scp->sc->kbd);
+}
+
+static void
sc_cnputc(struct consdev *cd, int c)
{
u_char buf[1];
@@ -1662,7 +1717,6 @@ sc_cngetc(struct consdev *cd)
static int fkeycp;
scr_stat *scp;
const u_char *p;
- int cur_mode;
int s = spltty(); /* block sckbdevent and scrn_timer while we poll */
int c;
@@ -1686,25 +1740,7 @@ sc_cngetc(struct consdev *cd)
return -1;
}
- /*
- * Make sure the keyboard is accessible even when the kbd device
- * driver is disabled.
- */
- kbdd_enable(scp->sc->kbd);
-
- /* we shall always use the keyboard in the XLATE mode here */
- cur_mode = scp->kbd_mode;
- scp->kbd_mode = K_XLATE;
- (void)kbdd_ioctl(scp->sc->kbd, KDSKBMODE, (caddr_t)&scp->kbd_mode);
-
- kbdd_poll(scp->sc->kbd, TRUE);
c = scgetc(scp->sc, SCGETC_CN | SCGETC_NONBLOCK);
- kbdd_poll(scp->sc->kbd, FALSE);
-
- scp->kbd_mode = cur_mode;
- (void)kbdd_ioctl(scp->sc->kbd, KDSKBMODE, (caddr_t)&scp->kbd_mode);
- kbdd_disable(scp->sc->kbd);
- splx(s);
switch (KEYFLAGS(c)) {
case 0: /* normal char */
@@ -2603,7 +2639,7 @@ exchange_scr(sc_softc_t *sc)
mark_all(scp);
}
-void
+static void
sc_puts(scr_stat *scp, u_char *buf, int len, int kernel)
{
int need_unlock = 0;
diff --git a/sys/dev/syscons/syscons.h b/sys/dev/syscons/syscons.h
index 79f531b..23a7bba 100644
--- a/sys/dev/syscons/syscons.h
+++ b/sys/dev/syscons/syscons.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1995-1998 Søren Schmidt
+ * Copyright (c) 1995-1998 Søren Schmidt
* All rights reserved.
*
* This code is derived from software contributed to The DragonFly Project
@@ -301,7 +301,9 @@ typedef struct scr_stat {
void *ts;
int status; /* status (bitfield) */
+ int grabbed;
int kbd_mode; /* keyboard I/O mode */
+ int kbd_prev_mode; /* keyboard I/O mode */
int cursor_pos; /* cursor buffer position */
int cursor_oldpos; /* cursor old buffer position */
@@ -562,7 +564,6 @@ void sc_save_font(scr_stat *scp, int page, int size, int width,
void sc_show_font(scr_stat *scp, int page);
void sc_touch_scrn_saver(void);
-void sc_puts(scr_stat *scp, u_char *buf, int len, int kernel);
void sc_draw_cursor_image(scr_stat *scp);
void sc_remove_cursor_image(scr_stat *scp);
void sc_set_cursor_image(scr_stat *scp);
diff --git a/sys/dev/syscons/warp/warp_saver.c b/sys/dev/syscons/warp/warp_saver.c
index 85a7d29..a800118 100644
--- a/sys/dev/syscons/warp/warp_saver.c
+++ b/sys/dev/syscons/warp/warp_saver.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 Dag-Erling Coïdan Smørgrav
+ * Copyright (c) 1998 Dag-Erling Coïdan Smørgrav
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ti/if_ti.c b/sys/dev/ti/if_ti.c
index d57be53..ead6901 100644
--- a/sys/dev/ti/if_ti.c
+++ b/sys/dev/ti/if_ti.c
@@ -1562,7 +1562,6 @@ ti_newbuf_jumbo(struct ti_softc *sc, int idx, struct mbuf *m_old)
struct mbuf *m[3] = {NULL, NULL, NULL};
struct ti_rx_desc_ext *r;
vm_page_t frame;
- static int color;
/* 1 extra buf to make nobufs easy*/
struct sf_buf *sf[3] = {NULL, NULL, NULL};
int i;
@@ -1605,7 +1604,7 @@ ti_newbuf_jumbo(struct ti_softc *sc, int idx, struct mbuf *m_old)
"failed -- packet dropped!\n");
goto nobufs;
}
- frame = vm_page_alloc(NULL, color++,
+ frame = vm_page_alloc(NULL, 0,
VM_ALLOC_INTERRUPT | VM_ALLOC_NOOBJ |
VM_ALLOC_WIRED);
if (frame == NULL) {
diff --git a/sys/dev/tl/if_tl.c b/sys/dev/tl/if_tl.c
index 4ab97e4..5f489bf 100644
--- a/sys/dev/tl/if_tl.c
+++ b/sys/dev/tl/if_tl.c
@@ -1175,7 +1175,6 @@ tl_attach(dev)
ifp->if_ioctl = tl_ioctl;
ifp->if_start = tl_start;
ifp->if_init = tl_init;
- ifp->if_mtu = ETHERMTU;
ifp->if_snd.ifq_maxlen = TL_TX_LIST_CNT - 1;
ifp->if_capabilities |= IFCAP_VLAN_MTU;
ifp->if_capenable |= IFCAP_VLAN_MTU;
diff --git a/sys/dev/tsec/if_tsec.c b/sys/dev/tsec/if_tsec.c
index c924419..ce257ab 100644
--- a/sys/dev/tsec/if_tsec.c
+++ b/sys/dev/tsec/if_tsec.c
@@ -247,7 +247,6 @@ tsec_attach(struct tsec_softc *sc)
ifp->if_softc = sc;
if_initname(ifp, device_get_name(sc->dev), device_get_unit(sc->dev));
- ifp->if_mtu = ETHERMTU;
ifp->if_flags = IFF_SIMPLEX | IFF_MULTICAST | IFF_BROADCAST;
ifp->if_init = tsec_init;
ifp->if_start = tsec_start;
diff --git a/sys/dev/twa/tw_osl.h b/sys/dev/twa/tw_osl.h
index 1cc40fb..8927c76 100644
--- a/sys/dev/twa/tw_osl.h
+++ b/sys/dev/twa/tw_osl.h
@@ -153,7 +153,7 @@ struct twa_softc {
struct mtx sim_lock_handle;/* sim lock shared with cam */
struct mtx *sim_lock;/* ptr to sim lock */
- struct callout watchdog_callout[2]; /* For command timout */
+ struct callout watchdog_callout[2]; /* For command timeout */
TW_UINT32 watchdog_index;
#ifdef TW_OSL_DEBUG
diff --git a/sys/dev/tws/tws.c b/sys/dev/tws/tws.c
index 02f78a5..ba3b150 100644
--- a/sys/dev/tws/tws.c
+++ b/sys/dev/tws/tws.c
@@ -685,6 +685,7 @@ tws_init_reqs(struct tws_softc *sc, u_int32_t dma_mem_size)
{
if (bus_dmamap_create(sc->data_tag, 0, &sc->reqs[i].dma_map)) {
/* log a ENOMEM failure msg here */
+ mtx_unlock(&sc->q_lock);
return(FAILURE);
}
sc->reqs[i].cmd_pkt = &cmd_buf[i];
diff --git a/sys/dev/tws/tws.h b/sys/dev/tws/tws.h
index cf9f727..6d0f6ad 100644
--- a/sys/dev/tws/tws.h
+++ b/sys/dev/tws/tws.h
@@ -205,7 +205,11 @@ struct tws_init_connect_info {
/* ------------ boolean types ------------------- */
+#ifndef __bool_true_false_are_defined
typedef enum _boolean { false, true } boolean;
+#else
+#define boolean bool
+#endif
enum err { SUCCESS, FAILURE };
/* ----------- per instance data ---------------- */
diff --git a/sys/dev/uart/uart_bus_fdt.c b/sys/dev/uart/uart_bus_fdt.c
index 8088db4..8bb62ea 100644
--- a/sys/dev/uart/uart_bus_fdt.c
+++ b/sys/dev/uart/uart_bus_fdt.c
@@ -186,7 +186,7 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di)
di->bas.chan = 0;
di->bas.regshft = (u_int)shift;
- di->baudrate = 0;
+ di->baudrate = br;
di->bas.rclk = (u_int)rclk;
di->ops = uart_getops(class);
di->databits = 8;
diff --git a/sys/dev/uart/uart_bus_pci.c b/sys/dev/uart/uart_bus_pci.c
index 7c5b8b3..45ef8b7 100644
--- a/sys/dev/uart/uart_bus_pci.c
+++ b/sys/dev/uart/uart_bus_pci.c
@@ -110,7 +110,15 @@ static struct pci_id pci_ns8250_ids[] = {
8 * DEFAULT_RCLK },
{ 0x1415, 0x950b, 0xffff, 0, "Oxford Semiconductor OXCB950 Cardbus 16950 UART",
0x10, 16384000 },
+{ 0x14e4, 0x4344, 0xffff, 0, "Sony Ericsson GC89 PC Card", 0x10},
{ 0x151f, 0x0000, 0xffff, 0, "TOPIC Semiconductor TP560 56k modem", 0x10 },
+{ 0x8086, 0x1c3d, 0xffff, 0, "Intel AMT - KT Controller", 0x10 },
+{ 0x8086, 0x3b67, 0xffff, 0, "5 Series/3400 Series Chipset KT Controller",
+ 0x10 },
+{ 0x8086, 0x8811, 0xffff, 0, "Intel EG20T Serial Port 0", 0x10 },
+{ 0x8086, 0x8812, 0xffff, 0, "Intel EG20T Serial Port 1", 0x10 },
+{ 0x8086, 0x8813, 0xffff, 0, "Intel EG20T Serial Port 2", 0x10 },
+{ 0x8086, 0x8814, 0xffff, 0, "Intel EG20T Serial Port 3", 0x10 },
{ 0x9710, 0x9820, 0x1000, 1, "NetMos NM9820 Serial Port", 0x10 },
{ 0x9710, 0x9835, 0x1000, 1, "NetMos NM9835 Serial Port", 0x10 },
{ 0x9710, 0x9865, 0xa000, 0x1000, "NetMos NM9865 Serial Port", 0x10 },
diff --git a/sys/dev/uart/uart_cpu_sparc64.c b/sys/dev/uart/uart_cpu_sparc64.c
index 582e919..6cbfbe2 100644
--- a/sys/dev/uart/uart_cpu_sparc64.c
+++ b/sys/dev/uart/uart_cpu_sparc64.c
@@ -71,7 +71,7 @@ uart_cpu_channel(char *dev)
if ((aliases = OF_finddevice("/aliases")) != -1)
(void)OF_getprop(aliases, dev, alias, sizeof(alias));
len = strlen(alias);
- if ((p = rindex(alias, ':')) == NULL)
+ if ((p = strrchr(alias, ':')) == NULL)
return (0);
p++;
if (p - alias == len - 1 && (*p == 'a' || *p == 'b'))
diff --git a/sys/dev/uart/uart_subr.c b/sys/dev/uart/uart_subr.c
index 6b32c24..5a3f16f 100644
--- a/sys/dev/uart/uart_subr.c
+++ b/sys/dev/uart/uart_subr.c
@@ -56,13 +56,13 @@ static struct uart_class *uart_classes[] = {
static size_t uart_nclasses = sizeof(uart_classes) / sizeof(uart_classes[0]);
static bus_addr_t
-uart_parse_addr(__const char **p)
+uart_parse_addr(const char **p)
{
return (strtoul(*p, (char**)(uintptr_t)p, 0));
}
static struct uart_class *
-uart_parse_class(struct uart_class *class, __const char **p)
+uart_parse_class(struct uart_class *class, const char **p)
{
struct uart_class *uc;
const char *nm;
@@ -84,13 +84,13 @@ uart_parse_class(struct uart_class *class, __const char **p)
}
static long
-uart_parse_long(__const char **p)
+uart_parse_long(const char **p)
{
return (strtol(*p, (char**)(uintptr_t)p, 0));
}
static int
-uart_parse_parity(__const char **p)
+uart_parse_parity(const char **p)
{
if (!strncmp(*p, "even", 4)) {
*p += 4;
@@ -116,7 +116,7 @@ uart_parse_parity(__const char **p)
}
static int
-uart_parse_tag(__const char **p)
+uart_parse_tag(const char **p)
{
int tag;
@@ -192,7 +192,7 @@ out:
int
uart_getenv(int devtype, struct uart_devinfo *di, struct uart_class *class)
{
- __const char *spec;
+ const char *spec;
bus_addr_t addr = ~0U;
int error;
diff --git a/sys/dev/uart/uart_tty.c b/sys/dev/uart/uart_tty.c
index 2170108..97ee08d 100644
--- a/sys/dev/uart/uart_tty.c
+++ b/sys/dev/uart/uart_tty.c
@@ -54,6 +54,8 @@ static cn_init_t uart_cninit;
static cn_term_t uart_cnterm;
static cn_getc_t uart_cngetc;
static cn_putc_t uart_cnputc;
+static cn_grab_t uart_cngrab;
+static cn_ungrab_t uart_cnungrab;
CONSOLE_DRIVER(uart);
@@ -108,6 +110,16 @@ uart_cnterm(struct consdev *cp)
}
static void
+uart_cngrab(struct consdev *cp)
+{
+}
+
+static void
+uart_cnungrab(struct consdev *cp)
+{
+}
+
+static void
uart_cnputc(struct consdev *cp, int c)
{
diff --git a/sys/dev/usb/controller/at91dci.c b/sys/dev/usb/controller/at91dci.c
index f831115..d325812 100644
--- a/sys/dev/usb/controller/at91dci.c
+++ b/sys/dev/usb/controller/at91dci.c
@@ -1461,16 +1461,16 @@ at91dci_uninit(struct at91dci_softc *sc)
USB_BUS_UNLOCK(&sc->sc_bus);
}
-void
+static void
at91dci_suspend(struct at91dci_softc *sc)
{
- return;
+ /* TODO */
}
-void
+static void
at91dci_resume(struct at91dci_softc *sc)
{
- return;
+ /* TODO */
}
static void
@@ -2306,6 +2306,26 @@ at91dci_ep_init(struct usb_device *udev, struct usb_endpoint_descriptor *edesc,
}
}
+static void
+at91dci_set_hw_power_sleep(struct usb_bus *bus, uint32_t state)
+{
+ struct at91dci_softc *sc = AT9100_DCI_BUS2SC(bus);
+
+ switch (state) {
+ case USB_HW_POWER_SUSPEND:
+ at91dci_suspend(sc);
+ break;
+ case USB_HW_POWER_SHUTDOWN:
+ at91dci_uninit(sc);
+ break;
+ case USB_HW_POWER_RESUME:
+ at91dci_resume(sc);
+ break;
+ default:
+ break;
+ }
+}
+
struct usb_bus_methods at91dci_bus_methods =
{
.endpoint_init = &at91dci_ep_init,
@@ -2316,4 +2336,5 @@ struct usb_bus_methods at91dci_bus_methods =
.clear_stall = &at91dci_clear_stall,
.roothub_exec = &at91dci_roothub_exec,
.xfer_poll = &at91dci_do_poll,
+ .set_hw_power_sleep = &at91dci_set_hw_power_sleep,
};
diff --git a/sys/dev/usb/controller/at91dci.h b/sys/dev/usb/controller/at91dci.h
index a1603aa..b079eb5 100644
--- a/sys/dev/usb/controller/at91dci.h
+++ b/sys/dev/usb/controller/at91dci.h
@@ -235,8 +235,6 @@ struct at91dci_softc {
usb_error_t at91dci_init(struct at91dci_softc *sc);
void at91dci_uninit(struct at91dci_softc *sc);
-void at91dci_suspend(struct at91dci_softc *sc);
-void at91dci_resume(struct at91dci_softc *sc);
void at91dci_interrupt(struct at91dci_softc *sc);
void at91dci_vbus_interrupt(struct at91dci_softc *sc, uint8_t is_on);
diff --git a/sys/dev/usb/controller/at91dci_atmelarm.c b/sys/dev/usb/controller/at91dci_atmelarm.c
index 1e8e394..da9ba36 100644
--- a/sys/dev/usb/controller/at91dci_atmelarm.c
+++ b/sys/dev/usb/controller/at91dci_atmelarm.c
@@ -77,7 +77,6 @@ __FBSDID("$FreeBSD$");
static device_probe_t at91_udp_probe;
static device_attach_t at91_udp_attach;
static device_detach_t at91_udp_detach;
-static device_shutdown_t at91_udp_shutdown;
struct at91_udp_softc {
struct at91dci_softc sc_dci; /* must be first */
@@ -324,35 +323,22 @@ at91_udp_detach(device_t dev)
return (0);
}
-static int
-at91_udp_shutdown(device_t dev)
-{
- struct at91_udp_softc *sc = device_get_softc(dev);
- int err;
-
- err = bus_generic_shutdown(dev);
- if (err)
- return (err);
-
- at91dci_uninit(&sc->sc_dci);
-
- return (0);
-}
-
static device_method_t at91_udp_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, at91_udp_probe),
DEVMETHOD(device_attach, at91_udp_attach),
DEVMETHOD(device_detach, at91_udp_detach),
- DEVMETHOD(device_shutdown, at91_udp_shutdown),
+ DEVMETHOD(device_suspend, bus_generic_suspend),
+ DEVMETHOD(device_resume, bus_generic_resume),
+ DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD_END
};
static driver_t at91_udp_driver = {
- "at91_udp",
- at91_udp_methods,
- sizeof(struct at91_udp_softc),
+ .name = "at91_udp",
+ .methods = at91_udp_methods,
+ .size = sizeof(struct at91_udp_softc),
};
static devclass_t at91_udp_devclass;
diff --git a/sys/dev/usb/controller/atmegadci.c b/sys/dev/usb/controller/atmegadci.c
index ad53fc3..7db3bdb 100644
--- a/sys/dev/usb/controller/atmegadci.c
+++ b/sys/dev/usb/controller/atmegadci.c
@@ -1352,16 +1352,16 @@ atmegadci_uninit(struct atmegadci_softc *sc)
USB_BUS_UNLOCK(&sc->sc_bus);
}
-void
+static void
atmegadci_suspend(struct atmegadci_softc *sc)
{
- return;
+ /* TODO */
}
-void
+static void
atmegadci_resume(struct atmegadci_softc *sc)
{
- return;
+ /* TODO */
}
static void
@@ -2126,6 +2126,26 @@ atmegadci_ep_init(struct usb_device *udev, struct usb_endpoint_descriptor *edesc
}
}
+static void
+atmegadci_set_hw_power_sleep(struct usb_bus *bus, uint32_t state)
+{
+ struct atmegadci_softc *sc = ATMEGA_BUS2SC(bus);
+
+ switch (state) {
+ case USB_HW_POWER_SUSPEND:
+ atmegadci_suspend(sc);
+ break;
+ case USB_HW_POWER_SHUTDOWN:
+ atmegadci_uninit(sc);
+ break;
+ case USB_HW_POWER_RESUME:
+ atmegadci_resume(sc);
+ break;
+ default:
+ break;
+ }
+}
+
struct usb_bus_methods atmegadci_bus_methods =
{
.endpoint_init = &atmegadci_ep_init,
@@ -2136,4 +2156,5 @@ struct usb_bus_methods atmegadci_bus_methods =
.clear_stall = &atmegadci_clear_stall,
.roothub_exec = &atmegadci_roothub_exec,
.xfer_poll = &atmegadci_do_poll,
+ .set_hw_power_sleep = &atmegadci_set_hw_power_sleep,
};
diff --git a/sys/dev/usb/controller/atmegadci.h b/sys/dev/usb/controller/atmegadci.h
index 68613af..91ba030 100644
--- a/sys/dev/usb/controller/atmegadci.h
+++ b/sys/dev/usb/controller/atmegadci.h
@@ -278,8 +278,6 @@ struct atmegadci_softc {
usb_error_t atmegadci_init(struct atmegadci_softc *sc);
void atmegadci_uninit(struct atmegadci_softc *sc);
-void atmegadci_suspend(struct atmegadci_softc *sc);
-void atmegadci_resume(struct atmegadci_softc *sc);
void atmegadci_interrupt(struct atmegadci_softc *sc);
#endif /* _ATMEGADCI_H_ */
diff --git a/sys/dev/usb/controller/atmegadci_atmelarm.c b/sys/dev/usb/controller/atmegadci_atmelarm.c
index c68101c..6c380b6 100644
--- a/sys/dev/usb/controller/atmegadci_atmelarm.c
+++ b/sys/dev/usb/controller/atmegadci_atmelarm.c
@@ -62,7 +62,6 @@ __FBSDID("$FreeBSD$");
static device_probe_t atmegadci_probe;
static device_attach_t atmegadci_attach;
static device_detach_t atmegadci_detach;
-static device_shutdown_t atmegadci_shutdown;
struct atmegadci_super_softc {
struct atmegadci_softc sc_otg; /* must be first */
@@ -193,35 +192,22 @@ atmegadci_detach(device_t dev)
return (0);
}
-static int
-atmegadci_shutdown(device_t dev)
-{
- struct atmegadci_super_softc *sc = device_get_softc(dev);
- int err;
-
- err = bus_generic_shutdown(dev);
- if (err)
- return (err);
-
- atmegadci_uninit(&sc->sc_otg);
-
- return (0);
-}
-
static device_method_t atmegadci_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, atmegadci_probe),
DEVMETHOD(device_attach, atmegadci_attach),
DEVMETHOD(device_detach, atmegadci_detach),
- DEVMETHOD(device_shutdown, atmegadci_shutdown),
+ DEVMETHOD(device_suspend, bus_generic_suspend),
+ DEVMETHOD(device_resume, bus_generic_resume),
+ DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD_END
};
static driver_t atmegadci_driver = {
- "atmegadci",
- atmegadci_methods,
- sizeof(struct atmegadci_super_softc),
+ .name = "atmegadci",
+ .methods = atmegadci_methods,
+ .size = sizeof(struct atmegadci_super_softc),
};
static devclass_t atmegadci_devclass;
diff --git a/sys/dev/usb/controller/avr32dci.c b/sys/dev/usb/controller/avr32dci.c
index 26785a3..9494c30 100644
--- a/sys/dev/usb/controller/avr32dci.c
+++ b/sys/dev/usb/controller/avr32dci.c
@@ -265,7 +265,7 @@ avr32dci_set_address(struct avr32dci_softc *sc, uint8_t addr)
{
DPRINTFN(5, "addr=%d\n", addr);
- avr32dci_mod_ctrl(sc, AVR32_UDADDR_ADDEN | addr, 0);
+ avr32dci_mod_ctrl(sc, AVR32_CTRL_DEV_FADDR_EN | addr, 0);
}
static uint8_t
@@ -501,7 +501,7 @@ repeat:
}
/* allocate FIFO bank */
- AVR32_WRITE_4(sc, AVR32_EPTCLRSTA(td->ep_no), AVR32_EPTSTA_TX_BK_RDY);
+ AVR32_WRITE_4(sc, AVR32_EPTCTL(td->ep_no), AVR32_EPTCTL_TX_PK_RDY);
/* check remainder */
if (td->remainder == 0) {
@@ -754,7 +754,7 @@ avr32dci_setup_standard_chain(struct usb_xfer *xfer)
uint8_t need_sync;
DPRINTFN(9, "addr=%d endpt=%d sumlen=%d speed=%d\n",
- xfer->address, UE_GET_ADDR(xfer->endpoint),
+ xfer->address, UE_GET_ADDR(xfer->endpointno),
xfer->sumlen, usbd_get_speed(xfer->xroot->udev));
temp.max_frame_size = xfer->max_frame_size;
@@ -773,7 +773,7 @@ avr32dci_setup_standard_chain(struct usb_xfer *xfer)
temp.did_stall = !xfer->flags_int.control_stall;
sc = AVR32_BUS2SC(xfer->xroot->bus);
- ep_no = (xfer->endpoint & UE_ADDR);
+ ep_no = (xfer->endpointno & UE_ADDR);
/* check if we should prepend a setup message */
@@ -798,7 +798,7 @@ avr32dci_setup_standard_chain(struct usb_xfer *xfer)
}
if (x != xfer->nframes) {
- if (xfer->endpoint & UE_DIR_IN) {
+ if (xfer->endpointno & UE_DIR_IN) {
temp.func = &avr32dci_data_tx;
need_sync = 1;
} else {
@@ -872,7 +872,7 @@ avr32dci_setup_standard_chain(struct usb_xfer *xfer)
* Send a DATA1 message and invert the current
* endpoint direction.
*/
- if (xfer->endpoint & UE_DIR_IN) {
+ if (xfer->endpointno & UE_DIR_IN) {
temp.func = &avr32dci_data_rx;
need_sync = 0;
} else {
@@ -913,7 +913,8 @@ avr32dci_start_standard_chain(struct usb_xfer *xfer)
/* poll one time - will turn on interrupts */
if (avr32dci_xfer_do_fifo(xfer)) {
- uint8_t ep_no = xfer->endpoint & UE_ADDR_MASK;
+ uint8_t ep_no = xfer->endpointno & UE_ADDR;
+ struct avr32dci_softc *sc = AVR32_BUS2SC(xfer->xroot->bus);
avr32dci_mod_ien(sc, AVR32_INT_EPT_INT(ep_no), 0);
@@ -1012,7 +1013,7 @@ avr32dci_standard_done(struct usb_xfer *xfer)
usb_error_t err = 0;
DPRINTFN(13, "xfer=%p pipe=%p transfer done\n",
- xfer, xfer->pipe);
+ xfer, xfer->endpoint);
/* reset scanner */
@@ -1064,10 +1065,10 @@ avr32dci_device_done(struct usb_xfer *xfer, usb_error_t error)
USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED);
DPRINTFN(9, "xfer=%p, pipe=%p, error=%d\n",
- xfer, xfer->pipe, error);
+ xfer, xfer->endpoint, error);
if (xfer->flags_int.usb_mode == USB_MODE_DEVICE) {
- ep_no = (xfer->endpoint & UE_ADDR);
+ ep_no = (xfer->endpointno & UE_ADDR);
/* disable endpoint interrupt */
avr32dci_mod_ien(sc, 0, AVR32_INT_EPT_INT(ep_no));
@@ -1080,7 +1081,7 @@ avr32dci_device_done(struct usb_xfer *xfer, usb_error_t error)
static void
avr32dci_set_stall(struct usb_device *udev, struct usb_xfer *xfer,
- struct usb_endpoint *ep, uint8_t *did_stall)
+ struct usb_endpoint *pipe, uint8_t *did_stall)
{
struct avr32dci_softc *sc;
uint8_t ep_no;
@@ -1166,7 +1167,7 @@ avr32dci_clear_stall_sub(struct avr32dci_softc *sc, uint8_t ep_no,
}
static void
-avr32dci_clear_stall(struct usb_device *udev, struct usb_endpoint *ep)
+avr32dci_clear_stall(struct usb_device *udev, struct usb_endpoint *pipe)
{
struct avr32dci_softc *sc;
struct usb_endpoint_descriptor *ed;
@@ -1226,8 +1227,7 @@ avr32dci_init(struct avr32dci_softc *sc)
AVR32_INT_ENDRESET, 0);
/* reset all endpoints */
-/**INDENT** Warning@1207: Extra ) */
- AVR32_WRITE_4(sc, AVR32_EPTRST, (1 << AVR32_EP_MAX) - 1));
+ AVR32_WRITE_4(sc, AVR32_EPTRST, (1 << AVR32_EP_MAX) - 1);
/* disable all endpoints */
for (n = 0; n != AVR32_EP_MAX; n++) {
@@ -1262,8 +1262,7 @@ avr32dci_uninit(struct avr32dci_softc *sc)
avr32dci_mod_ien(sc, 0, 0xFFFFFFFF);
/* reset all endpoints */
-/**INDENT** Warning@1242: Extra ) */
- AVR32_WRITE_4(sc, AVR32_EPTRST, (1 << AVR32_EP_MAX) - 1));
+ AVR32_WRITE_4(sc, AVR32_EPTRST, (1 << AVR32_EP_MAX) - 1);
/* disable all endpoints */
for (n = 0; n != AVR32_EP_MAX; n++) {
@@ -1284,16 +1283,16 @@ avr32dci_uninit(struct avr32dci_softc *sc)
USB_BUS_UNLOCK(&sc->sc_bus);
}
-void
+static void
avr32dci_suspend(struct avr32dci_softc *sc)
{
- return;
+ /* TODO */
}
-void
+static void
avr32dci_resume(struct avr32dci_softc *sc)
{
- return;
+ /* TODO */
}
static void
@@ -1369,10 +1368,10 @@ avr32dci_device_isoc_fs_enter(struct usb_xfer *xfer)
uint8_t ep_no;
DPRINTFN(6, "xfer=%p next=%d nframes=%d\n",
- xfer, xfer->pipe->isoc_next, xfer->nframes);
+ xfer, xfer->endpoint->isoc_next, xfer->nframes);
/* get the current frame index */
- ep_no = xfer->endpoint & UE_ADDR_MASK;
+ ep_no = xfer->endpointno & UE_ADDR;
nframes = (AVR32_READ_4(sc, AVR32_FNUM) / 8);
nframes &= AVR32_FRAME_MASK;
@@ -1381,9 +1380,9 @@ avr32dci_device_isoc_fs_enter(struct usb_xfer *xfer)
* check if the frame index is within the window where the frames
* will be inserted
*/
- temp = (nframes - xfer->pipe->isoc_next) & AVR32_FRAME_MASK;
+ temp = (nframes - xfer->endpoint->isoc_next) & AVR32_FRAME_MASK;
- if ((xfer->pipe->is_synced == 0) ||
+ if ((xfer->endpoint->is_synced == 0) ||
(temp < xfer->nframes)) {
/*
* If there is data underflow or the pipe queue is
@@ -1391,15 +1390,15 @@ avr32dci_device_isoc_fs_enter(struct usb_xfer *xfer)
* of the current frame position. Else two isochronous
* transfers might overlap.
*/
- xfer->pipe->isoc_next = (nframes + 3) & AVR32_FRAME_MASK;
- xfer->pipe->is_synced = 1;
- DPRINTFN(3, "start next=%d\n", xfer->pipe->isoc_next);
+ xfer->endpoint->isoc_next = (nframes + 3) & AVR32_FRAME_MASK;
+ xfer->endpoint->is_synced = 1;
+ DPRINTFN(3, "start next=%d\n", xfer->endpoint->isoc_next);
}
/*
* compute how many milliseconds the insertion is ahead of the
* current frame position:
*/
- temp = (xfer->pipe->isoc_next - nframes) & AVR32_FRAME_MASK;
+ temp = (xfer->endpoint->isoc_next - nframes) & AVR32_FRAME_MASK;
/*
* pre-compute when the isochronous transfer will be finished:
@@ -1409,7 +1408,7 @@ avr32dci_device_isoc_fs_enter(struct usb_xfer *xfer)
xfer->nframes;
/* compute frame number for next insertion */
- xfer->pipe->isoc_next += xfer->nframes;
+ xfer->endpoint->isoc_next += xfer->nframes;
/* setup TDs */
avr32dci_setup_standard_chain(xfer);
@@ -1832,7 +1831,7 @@ tr_handle_clear_port_feature:
AVR32_WRITE_4(sc, AVR32_EPTCLRSTA(0), AVR32_EPTSTA_FRCESTALL);
/* configure */
- AVR32_WRITE_4(sc, AVR32_EPTCFG(0), AVR32_EPTCFG_TYPE_CONTROL |
+ AVR32_WRITE_4(sc, AVR32_EPTCFG(0), AVR32_EPTCFG_TYPE_CTRL |
AVR32_EPTCFG_NBANK(1) | AVR32_EPTCFG_EPSIZE(6));
temp = AVR32_READ_4(sc, AVR32_EPTCFG(0));
@@ -1974,7 +1973,7 @@ avr32dci_xfer_setup(struct usb_setup_params *parm)
/*
* compute maximum number of TDs
*/
- if ((xfer->pipe->edesc->bmAttributes & UE_XFERTYPE) == UE_CONTROL) {
+ if ((xfer->endpoint->edesc->bmAttributes & UE_XFERTYPE) == UE_CONTROL) {
ntd = xfer->nframes + 1 /* STATUS */ + 1 /* SYNC 1 */
+ 1 /* SYNC 2 */ ;
@@ -1997,7 +1996,7 @@ avr32dci_xfer_setup(struct usb_setup_params *parm)
/*
* get profile stuff
*/
- ep_no = xfer->endpoint & UE_ADDR;
+ ep_no = xfer->endpointno & UE_ADDR;
avr32dci_get_hw_ep_profile(parm->udev, &pf, ep_no);
if (pf == NULL) {
@@ -2045,7 +2044,7 @@ avr32dci_xfer_unsetup(struct usb_xfer *xfer)
static void
avr32dci_ep_init(struct usb_device *udev, struct usb_endpoint_descriptor *edesc,
- struct usb_endpoint *ep)
+ struct usb_endpoint *pipe)
{
struct avr32dci_softc *sc = AVR32_BUS2SC(udev->bus);
@@ -2072,6 +2071,26 @@ avr32dci_ep_init(struct usb_device *udev, struct usb_endpoint_descriptor *edesc,
}
}
+static void
+avr32dci_set_hw_power_sleep(struct usb_bus *bus, uint32_t state)
+{
+ struct avr32dci_softc *sc = AVR32_BUS2SC(bus);
+
+ switch (state) {
+ case USB_HW_POWER_SUSPEND:
+ avr32dci_suspend(sc);
+ break;
+ case USB_HW_POWER_SHUTDOWN:
+ avr32dci_uninit(sc);
+ break;
+ case USB_HW_POWER_RESUME:
+ avr32dci_resume(sc);
+ break;
+ default:
+ break;
+ }
+}
+
struct usb_bus_methods avr32dci_bus_methods =
{
.endpoint_init = &avr32dci_ep_init,
@@ -2082,4 +2101,5 @@ struct usb_bus_methods avr32dci_bus_methods =
.clear_stall = &avr32dci_clear_stall,
.roothub_exec = &avr32dci_roothub_exec,
.xfer_poll = &avr32dci_do_poll,
+ .set_hw_power_sleep = &avr32dci_set_hw_power_sleep,
};
diff --git a/sys/dev/usb/controller/avr32dci.h b/sys/dev/usb/controller/avr32dci.h
index 6672fa7..2d80344 100644
--- a/sys/dev/usb/controller/avr32dci.h
+++ b/sys/dev/usb/controller/avr32dci.h
@@ -166,6 +166,7 @@ struct avr32dci_td {
uint32_t offset;
uint32_t remainder;
uint16_t max_packet_size;
+ uint8_t bank_shift;
uint8_t error:1;
uint8_t alt_next:1;
uint8_t short_pkt:1;
@@ -246,8 +247,6 @@ struct avr32dci_softc {
usb_error_t avr32dci_init(struct avr32dci_softc *sc);
void avr32dci_uninit(struct avr32dci_softc *sc);
-void avr32dci_suspend(struct avr32dci_softc *sc);
-void avr32dci_resume(struct avr32dci_softc *sc);
void avr32dci_interrupt(struct avr32dci_softc *sc);
void avr32dci_vbus_interrupt(struct avr32dci_softc *sc, uint8_t is_on);
diff --git a/sys/dev/usb/controller/dwc_otg.c b/sys/dev/usb/controller/dwc_otg.c
new file mode 100644
index 0000000..c679ccc
--- /dev/null
+++ b/sys/dev/usb/controller/dwc_otg.c
@@ -0,0 +1,2612 @@
+/*-
+ * Copyright (c) 2012 Hans Petter Selasky. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ */
+
+/*
+ * This file contains the driver for the DesignWare series USB 2.0 OTG
+ * Controller. This driver currently only supports the device mode of
+ * the USB hardware.
+ */
+
+/*
+ * LIMITATION: Drivers must be bound to all OUT endpoints in the
+ * active configuration for this driver to work properly. Blocking any
+ * OUT endpoint will block all OUT endpoints including the control
+ * endpoint. Usually this is not a problem.
+ */
+
+/*
+ * NOTE: Writing to non-existing registers appears to cause an
+ * internal reset.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/stdint.h>
+#include <sys/stddef.h>
+#include <sys/param.h>
+#include <sys/queue.h>
+#include <sys/types.h>
+#include <sys/systm.h>
+#include <sys/kernel.h>
+#include <sys/bus.h>
+#include <sys/module.h>
+#include <sys/lock.h>
+#include <sys/mutex.h>
+#include <sys/condvar.h>
+#include <sys/sysctl.h>
+#include <sys/sx.h>
+#include <sys/unistd.h>
+#include <sys/callout.h>
+#include <sys/malloc.h>
+#include <sys/priv.h>
+
+#include <dev/usb/usb.h>
+#include <dev/usb/usbdi.h>
+
+#define USB_DEBUG_VAR dwc_otg_debug
+
+#include <dev/usb/usb_core.h>
+#include <dev/usb/usb_debug.h>
+#include <dev/usb/usb_busdma.h>
+#include <dev/usb/usb_process.h>
+#include <dev/usb/usb_transfer.h>
+#include <dev/usb/usb_device.h>
+#include <dev/usb/usb_hub.h>
+#include <dev/usb/usb_util.h>
+
+#include <dev/usb/usb_controller.h>
+#include <dev/usb/usb_bus.h>
+
+#include <dev/usb/controller/dwc_otg.h>
+
+#define DWC_OTG_BUS2SC(bus) \
+ ((struct dwc_otg_softc *)(((uint8_t *)(bus)) - \
+ ((uint8_t *)&(((struct dwc_otg_softc *)0)->sc_bus))))
+
+#define DWC_OTG_PC2SC(pc) \
+ DWC_OTG_BUS2SC(USB_DMATAG_TO_XROOT((pc)->tag_parent)->bus)
+
+#define DWC_OTG_MSK_GINT_ENABLED \
+ (DWC_OTG_MSK_GINT_ENUM_DONE | \
+ DWC_OTG_MSK_GINT_USB_SUSPEND | \
+ DWC_OTG_MSK_GINT_INEP | \
+ DWC_OTG_MSK_GINT_RXFLVL | \
+ DWC_OTG_MSK_GINT_SESSREQINT)
+
+#define DWC_OTG_USE_HSIC 0
+
+#ifdef USB_DEBUG
+static int dwc_otg_debug = 0;
+
+static SYSCTL_NODE(_hw_usb, OID_AUTO, dwc_otg, CTLFLAG_RW, 0, "USB DWC OTG");
+SYSCTL_INT(_hw_usb_dwc_otg, OID_AUTO, debug, CTLFLAG_RW,
+ &dwc_otg_debug, 0, "DWC OTG debug level");
+#endif
+
+#define DWC_OTG_INTR_ENDPT 1
+
+/* prototypes */
+
+struct usb_bus_methods dwc_otg_bus_methods;
+struct usb_pipe_methods dwc_otg_device_non_isoc_methods;
+struct usb_pipe_methods dwc_otg_device_isoc_fs_methods;
+
+static dwc_otg_cmd_t dwc_otg_setup_rx;
+static dwc_otg_cmd_t dwc_otg_data_rx;
+static dwc_otg_cmd_t dwc_otg_data_tx;
+static dwc_otg_cmd_t dwc_otg_data_tx_sync;
+static void dwc_otg_device_done(struct usb_xfer *, usb_error_t);
+static void dwc_otg_do_poll(struct usb_bus *);
+static void dwc_otg_standard_done(struct usb_xfer *);
+static void dwc_otg_root_intr(struct dwc_otg_softc *sc);
+
+/*
+ * Here is a configuration that the chip supports.
+ */
+static const struct usb_hw_ep_profile dwc_otg_ep_profile[1] = {
+
+ [0] = {
+ .max_in_frame_size = 64,/* fixed */
+ .max_out_frame_size = 64, /* fixed */
+ .is_simplex = 1,
+ .support_control = 1,
+ }
+};
+
+static void
+dwc_otg_get_hw_ep_profile(struct usb_device *udev,
+ const struct usb_hw_ep_profile **ppf, uint8_t ep_addr)
+{
+ struct dwc_otg_softc *sc;
+
+ sc = DWC_OTG_BUS2SC(udev->bus);
+
+ if (ep_addr < sc->sc_dev_ep_max)
+ *ppf = &sc->sc_hw_ep_profile[ep_addr].usb;
+ else
+ *ppf = NULL;
+}
+
+static int
+dwc_otg_init_fifo(struct dwc_otg_softc *sc)
+{
+ struct dwc_otg_profile *pf;
+ uint32_t fifo_size;
+ uint32_t fifo_regs;
+ uint32_t tx_start;
+ uint8_t x;
+
+ fifo_size = sc->sc_fifo_size;
+
+ fifo_regs = 4 * (sc->sc_dev_ep_max + sc->sc_dev_in_ep_max);
+
+ if (fifo_size >= fifo_regs)
+ fifo_size -= fifo_regs;
+ else
+ fifo_size = 0;
+
+ /* split equally for IN and OUT */
+ fifo_size /= 2;
+
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_GRXFSIZ, fifo_size / 4);
+
+ /* align to 4-bytes */
+ fifo_size &= ~3;
+
+ tx_start = fifo_size;
+
+ if (fifo_size < 0x40) {
+ DPRINTFN(-1, "Not enough data space for EP0 FIFO.\n");
+ USB_BUS_UNLOCK(&sc->sc_bus);
+ return (EINVAL);
+ }
+
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_GNPTXFSIZ, (0x10 << 16) | (tx_start / 4));
+ fifo_size -= 0x40;
+ tx_start += 0x40;
+
+ /* setup control endpoint profile */
+ sc->sc_hw_ep_profile[0].usb = dwc_otg_ep_profile[0];
+
+ for (x = 1; x != sc->sc_dev_ep_max; x++) {
+
+ pf = sc->sc_hw_ep_profile + x;
+
+ pf->usb.max_out_frame_size = 1024 * 3;
+ pf->usb.is_simplex = 0; /* assume duplex */
+ pf->usb.support_bulk = 1;
+ pf->usb.support_interrupt = 1;
+ pf->usb.support_isochronous = 1;
+ pf->usb.support_out = 1;
+
+ if (x < sc->sc_dev_in_ep_max) {
+ uint32_t limit;
+
+ limit = (x == 1) ? DWC_OTG_MAX_TXN :
+ (DWC_OTG_MAX_TXN / 2);
+
+ if (fifo_size >= limit) {
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DIEPTXF(x),
+ ((limit / 4) << 16) |
+ (tx_start / 4));
+ tx_start += limit;
+ fifo_size -= limit;
+ pf->usb.max_in_frame_size = 0x200;
+ pf->usb.support_in = 1;
+ pf->max_buffer = limit;
+
+ } else if (fifo_size >= 0x80) {
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DIEPTXF(x),
+ ((0x80 / 4) << 16) | (tx_start / 4));
+ tx_start += 0x80;
+ fifo_size -= 0x80;
+ pf->usb.max_in_frame_size = 0x40;
+ pf->usb.support_in = 1;
+
+ } else {
+ pf->usb.is_simplex = 1;
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DIEPTXF(x),
+ (0x0 << 16) | (tx_start / 4));
+ }
+ } else {
+ pf->usb.is_simplex = 1;
+ }
+
+ DPRINTF("FIFO%d = IN:%d / OUT:%d\n", x,
+ pf->usb.max_in_frame_size,
+ pf->usb.max_out_frame_size);
+ }
+
+ /* reset RX FIFO */
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_GRSTCTL,
+ DWC_OTG_MSK_GRSTCTL_RXFFLUSH);
+
+ /* reset all TX FIFOs */
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_GRSTCTL,
+ DWC_OTG_MSK_GRSTCTL_TXFIFO(0x10) |
+ DWC_OTG_MSK_GRSTCTL_TXFFLUSH);
+
+ return (0);
+}
+
+static void
+dwc_otg_clocks_on(struct dwc_otg_softc *sc)
+{
+ if (sc->sc_flags.clocks_off &&
+ sc->sc_flags.port_powered) {
+
+ DPRINTFN(5, "\n");
+
+ /* TODO - platform specific */
+
+ sc->sc_flags.clocks_off = 0;
+ }
+}
+
+static void
+dwc_otg_clocks_off(struct dwc_otg_softc *sc)
+{
+ if (!sc->sc_flags.clocks_off) {
+
+ DPRINTFN(5, "\n");
+
+ /* TODO - platform specific */
+
+ sc->sc_flags.clocks_off = 1;
+ }
+}
+
+static void
+dwc_otg_pull_up(struct dwc_otg_softc *sc)
+{
+ uint32_t temp;
+
+ /* pullup D+, if possible */
+
+ if (!sc->sc_flags.d_pulled_up &&
+ sc->sc_flags.port_powered) {
+ sc->sc_flags.d_pulled_up = 1;
+
+ temp = DWC_OTG_READ_4(sc, DWC_OTG_REG_DCTL);
+ temp &= ~DWC_OTG_MSK_DCTL_SOFT_DISC;
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DCTL, temp);
+ }
+}
+
+static void
+dwc_otg_pull_down(struct dwc_otg_softc *sc)
+{
+ uint32_t temp;
+
+ /* pulldown D+, if possible */
+
+ if (sc->sc_flags.d_pulled_up) {
+ sc->sc_flags.d_pulled_up = 0;
+
+ temp = DWC_OTG_READ_4(sc, DWC_OTG_REG_DCTL);
+ temp |= DWC_OTG_MSK_DCTL_SOFT_DISC;
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DCTL, temp);
+ }
+}
+
+static void
+dwc_otg_resume_irq(struct dwc_otg_softc *sc)
+{
+ if (sc->sc_flags.status_suspend) {
+ /* update status bits */
+ sc->sc_flags.status_suspend = 0;
+ sc->sc_flags.change_suspend = 1;
+
+ /*
+ * Disable resume interrupt and enable suspend
+ * interrupt:
+ */
+ sc->sc_irq_mask &= ~DWC_OTG_MSK_GINT_WKUPINT;
+ sc->sc_irq_mask |= DWC_OTG_MSK_GINT_USB_SUSPEND;
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_GINTMSK, sc->sc_irq_mask);
+
+ /* complete root HUB interrupt endpoint */
+ dwc_otg_root_intr(sc);
+ }
+}
+
+static void
+dwc_otg_wakeup_peer(struct dwc_otg_softc *sc)
+{
+ uint32_t temp;
+
+ if (!sc->sc_flags.status_suspend)
+ return;
+
+ DPRINTFN(5, "Remote wakeup\n");
+
+ /* enable remote wakeup signalling */
+ temp = DWC_OTG_READ_4(sc, DWC_OTG_REG_DCTL);
+ temp |= DWC_OTG_MSK_DCTL_REMOTE_WAKEUP;
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DCTL, temp);
+
+ /* Wait 8ms for remote wakeup to complete. */
+ usb_pause_mtx(&sc->sc_bus.bus_mtx, hz / 125);
+
+ temp &= ~DWC_OTG_MSK_DCTL_REMOTE_WAKEUP;
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DCTL, temp);
+
+ /* need to fake resume IRQ */
+ dwc_otg_resume_irq(sc);
+}
+
+static void
+dwc_otg_set_address(struct dwc_otg_softc *sc, uint8_t addr)
+{
+ uint32_t temp;
+
+ DPRINTFN(5, "addr=%d\n", addr);
+
+ temp = DWC_OTG_READ_4(sc, DWC_OTG_REG_DCFG);
+ temp &= ~DWC_OTG_MSK_DCFG_SET_DEV_ADDR(0x7F);
+ temp |= DWC_OTG_MSK_DCFG_SET_DEV_ADDR(addr);
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DCFG, temp);
+}
+
+static void
+dwc_otg_common_rx_ack(struct dwc_otg_softc *sc)
+{
+ DPRINTFN(5, "RX status clear\n");
+
+ /* enable RX FIFO level interrupt */
+ sc->sc_irq_mask |= DWC_OTG_MSK_GINT_RXFLVL;
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_GINTMSK, sc->sc_irq_mask);
+
+ /* clear cached status */
+ sc->sc_last_rx_status = 0;
+}
+
+static uint8_t
+dwc_otg_setup_rx(struct dwc_otg_td *td)
+{
+ struct dwc_otg_softc *sc;
+ struct usb_device_request req __aligned(4);
+ uint32_t temp;
+ uint16_t count;
+
+ /* get pointer to softc */
+ sc = DWC_OTG_PC2SC(td->pc);
+
+ /* check endpoint status */
+
+ if (sc->sc_last_rx_status == 0)
+ goto not_complete;
+
+ if (DWC_OTG_MSK_GRXSTS_GET_CHANNEL(sc->sc_last_rx_status) != 0)
+ goto not_complete;
+
+ if ((sc->sc_last_rx_status & DWC_OTG_MSK_GRXSTS_PID) !=
+ DWC_OTG_MSK_GRXSTS_PID_DATA0) {
+ /* release FIFO */
+ dwc_otg_common_rx_ack(sc);
+ goto not_complete;
+ }
+
+ if ((sc->sc_last_rx_status & DWC_OTG_MSK_GRXSTS_PACKET_STS) !=
+ DWC_OTG_MSK_GRXSTS_DEV_STP_DATA) {
+ /* release FIFO */
+ dwc_otg_common_rx_ack(sc);
+ goto not_complete;
+ }
+
+ DPRINTFN(5, "GRXSTSR=0x%08x\n", sc->sc_last_rx_status);
+
+ /* clear did stall */
+ td->did_stall = 0;
+
+ /* get the packet byte count */
+ count = DWC_OTG_MSK_GRXSTS_GET_BYTE_CNT(sc->sc_last_rx_status);
+
+ /* verify data length */
+ if (count != td->remainder) {
+ DPRINTFN(0, "Invalid SETUP packet "
+ "length, %d bytes\n", count);
+ /* release FIFO */
+ dwc_otg_common_rx_ack(sc);
+ goto not_complete;
+ }
+ if (count != sizeof(req)) {
+ DPRINTFN(0, "Unsupported SETUP packet "
+ "length, %d bytes\n", count);
+ /* release FIFO */
+ dwc_otg_common_rx_ack(sc);
+ goto not_complete;
+ }
+
+ /* copy in control request */
+ memcpy(&req, sc->sc_rx_bounce_buffer, sizeof(req));
+
+ /* copy data into real buffer */
+ usbd_copy_in(td->pc, 0, &req, sizeof(req));
+
+ td->offset = sizeof(req);
+ td->remainder = 0;
+
+ /* sneak peek the set address */
+ if ((req.bmRequestType == UT_WRITE_DEVICE) &&
+ (req.bRequest == UR_SET_ADDRESS)) {
+ /* must write address before ZLP */
+ dwc_otg_set_address(sc, req.wValue[0] & 0x7F);
+ }
+
+ /* don't send any data by default */
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DIEPTSIZ(0),
+ DWC_OTG_MSK_DXEPTSIZ_SET_NPKT(0) |
+ DWC_OTG_MSK_DXEPTSIZ_SET_NBYTES(0));
+
+ temp = sc->sc_in_ctl[0];
+
+ /* enable IN endpoint */
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DIEPCTL(0),
+ temp | DWC_OTG_MSK_DIEPCTL_ENABLE);
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DIEPCTL(0),
+ temp | DWC_OTG_MSK_DIEPCTL_SET_NAK);
+
+ /* reset IN endpoint buffer */
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_GRSTCTL,
+ DWC_OTG_MSK_GRSTCTL_TXFIFO(0) |
+ DWC_OTG_MSK_GRSTCTL_TXFFLUSH);
+
+ /* acknowledge RX status */
+ dwc_otg_common_rx_ack(sc);
+ return (0); /* complete */
+
+not_complete:
+ /* abort any ongoing transfer, before enabling again */
+
+ temp = sc->sc_out_ctl[0];
+
+ temp |= DWC_OTG_MSK_DOEPCTL_ENABLE |
+ DWC_OTG_MSK_DOEPCTL_SET_NAK;
+
+ /* enable OUT endpoint */
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DOEPCTL(0), temp);
+
+ if (!td->did_stall) {
+ td->did_stall = 1;
+
+ DPRINTFN(5, "stalling IN and OUT direction\n");
+
+ /* set stall after enabling endpoint */
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DOEPCTL(0),
+ temp | DWC_OTG_MSK_DOEPCTL_STALL);
+
+ temp = sc->sc_in_ctl[0];
+
+ /* set stall assuming endpoint is enabled */
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DIEPCTL(0),
+ temp | DWC_OTG_MSK_DIEPCTL_STALL);
+ }
+
+ /* setup number of buffers to receive */
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DOEPTSIZ(0),
+ DWC_OTG_MSK_DXEPTSIZ_SET_MULTI(3) |
+ DWC_OTG_MSK_DXEPTSIZ_SET_NPKT(1) |
+ DWC_OTG_MSK_DXEPTSIZ_SET_NBYTES(sizeof(req)));
+
+ return (1); /* not complete */
+}
+
+static uint8_t
+dwc_otg_data_rx(struct dwc_otg_td *td)
+{
+ struct dwc_otg_softc *sc;
+ uint32_t temp;
+ uint16_t count;
+ uint8_t got_short;
+
+ got_short = 0;
+
+ /* get pointer to softc */
+ sc = DWC_OTG_PC2SC(td->pc);
+
+ /* check endpoint status */
+ if (sc->sc_last_rx_status == 0)
+ goto not_complete;
+
+ if (DWC_OTG_MSK_GRXSTS_GET_CHANNEL(sc->sc_last_rx_status) != td->ep_no)
+ goto not_complete;
+
+ /* check for SETUP packet */
+ if ((sc->sc_last_rx_status & DWC_OTG_MSK_GRXSTS_PACKET_STS) ==
+ DWC_OTG_MSK_GRXSTS_DEV_STP_DATA) {
+ if (td->remainder == 0) {
+ /*
+ * We are actually complete and have
+ * received the next SETUP
+ */
+ DPRINTFN(5, "faking complete\n");
+ return (0); /* complete */
+ }
+ /*
+ * USB Host Aborted the transfer.
+ */
+ td->error = 1;
+ return (0); /* complete */
+ }
+
+ if ((sc->sc_last_rx_status & DWC_OTG_MSK_GRXSTS_PACKET_STS) !=
+ DWC_OTG_MSK_GRXSTS_DEV_OUT_DATA) {
+ /* release FIFO */
+ dwc_otg_common_rx_ack(sc);
+ goto not_complete;
+ }
+
+ /* get the packet byte count */
+ count = DWC_OTG_MSK_GRXSTS_GET_BYTE_CNT(sc->sc_last_rx_status);
+
+ /* verify the packet byte count */
+ if (count != td->max_packet_size) {
+ if (count < td->max_packet_size) {
+ /* we have a short packet */
+ td->short_pkt = 1;
+ got_short = 1;
+ } else {
+ /* invalid USB packet */
+ td->error = 1;
+
+ /* release FIFO */
+ dwc_otg_common_rx_ack(sc);
+ return (0); /* we are complete */
+ }
+ }
+ /* verify the packet byte count */
+ if (count > td->remainder) {
+ /* invalid USB packet */
+ td->error = 1;
+
+ /* release FIFO */
+ dwc_otg_common_rx_ack(sc);
+ return (0); /* we are complete */
+ }
+
+ usbd_copy_in(td->pc, td->offset, sc->sc_rx_bounce_buffer, count);
+ td->remainder -= count;
+ td->offset += count;
+
+ /* release FIFO */
+ dwc_otg_common_rx_ack(sc);
+
+ /* check if we are complete */
+ if ((td->remainder == 0) || got_short) {
+ if (td->short_pkt) {
+ /* we are complete */
+ return (0);
+ }
+ /* else need to receive a zero length packet */
+ }
+
+not_complete:
+
+ temp = sc->sc_out_ctl[td->ep_no];
+
+ temp |= DWC_OTG_MSK_DOEPCTL_ENABLE |
+ DWC_OTG_MSK_DOEPCTL_CLR_NAK;
+
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DOEPCTL(td->ep_no), temp);
+
+ /* enable SETUP and transfer complete interrupt */
+ if (td->ep_no == 0) {
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DOEPTSIZ(0),
+ DWC_OTG_MSK_DXEPTSIZ_SET_NPKT(1) |
+ DWC_OTG_MSK_DXEPTSIZ_SET_NBYTES(td->max_packet_size));
+ } else {
+ /* allow reception of multiple packets */
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DOEPTSIZ(td->ep_no),
+ DWC_OTG_MSK_DXEPTSIZ_SET_MULTI(1) |
+ DWC_OTG_MSK_DXEPTSIZ_SET_NPKT(4) |
+ DWC_OTG_MSK_DXEPTSIZ_SET_NBYTES(4 *
+ ((td->max_packet_size + 3) & ~3)));
+ }
+ return (1); /* not complete */
+}
+
+static uint8_t
+dwc_otg_data_tx(struct dwc_otg_td *td)
+{
+ struct dwc_otg_softc *sc;
+ uint32_t max_buffer;
+ uint32_t count;
+ uint32_t fifo_left;
+ uint32_t mpkt;
+ uint32_t temp;
+ uint8_t to;
+
+ to = 3; /* don't loop forever! */
+
+ /* get pointer to softc */
+ sc = DWC_OTG_PC2SC(td->pc);
+
+ max_buffer = sc->sc_hw_ep_profile[td->ep_no].max_buffer;
+
+repeat:
+ /* check for for endpoint 0 data */
+
+ temp = sc->sc_last_rx_status;
+
+ if ((td->ep_no == 0) && (temp != 0) &&
+ (DWC_OTG_MSK_GRXSTS_GET_CHANNEL(temp) == 0)) {
+
+ if ((temp & DWC_OTG_MSK_GRXSTS_PACKET_STS) !=
+ DWC_OTG_MSK_GRXSTS_DEV_STP_DATA) {
+
+ /* dump data - wrong direction */
+ dwc_otg_common_rx_ack(sc);
+ } else {
+ /*
+ * The current transfer was cancelled
+ * by the USB Host:
+ */
+ td->error = 1;
+ return (0); /* complete */
+ }
+ }
+
+ /* fill in more TX data, if possible */
+ if (td->tx_bytes != 0) {
+
+ uint16_t cpkt;
+
+ /* check if packets have been transferred */
+ temp = DWC_OTG_READ_4(sc, DWC_OTG_REG_DIEPTSIZ(td->ep_no));
+
+ /* get current packet number */
+ cpkt = DWC_OTG_MSK_DXEPTSIZ_GET_NPKT(temp);
+
+ if (cpkt >= td->npkt) {
+ fifo_left = 0;
+ } else {
+ if (max_buffer != 0) {
+ fifo_left = (td->npkt - cpkt) *
+ td->max_packet_size;
+
+ if (fifo_left > max_buffer)
+ fifo_left = max_buffer;
+ } else {
+ fifo_left = td->max_packet_size;
+ }
+ }
+
+ count = td->tx_bytes;
+ if (count > fifo_left)
+ count = fifo_left;
+
+ if (count != 0) {
+
+ /* clear topmost word before copy */
+ sc->sc_tx_bounce_buffer[(count - 1) / 4] = 0;
+
+ /* copy out data */
+ usbd_copy_out(td->pc, td->offset,
+ sc->sc_tx_bounce_buffer, count);
+
+ /* transfer data into FIFO */
+ bus_space_write_region_4(sc->sc_io_tag, sc->sc_io_hdl,
+ DWC_OTG_REG_DFIFO(td->ep_no),
+ sc->sc_tx_bounce_buffer, (count + 3) / 4);
+
+ td->tx_bytes -= count;
+ td->remainder -= count;
+ td->offset += count;
+ td->npkt = cpkt;
+ }
+ if (td->tx_bytes != 0)
+ goto not_complete;
+
+ /* check remainder */
+ if (td->remainder == 0) {
+ if (td->short_pkt)
+ return (0); /* complete */
+
+ /* else we need to transmit a short packet */
+ }
+ }
+
+ /* check if no packets have been transferred */
+ temp = DWC_OTG_READ_4(sc, DWC_OTG_REG_DIEPTSIZ(td->ep_no));
+
+ if (DWC_OTG_MSK_DXEPTSIZ_GET_NPKT(temp) != 0) {
+
+ DPRINTFN(5, "busy ep=%d npkt=%d DIEPTSIZ=0x%08x "
+ "DIEPCTL=0x%08x\n", td->ep_no,
+ DWC_OTG_MSK_DXEPTSIZ_GET_NPKT(temp),
+ temp, DWC_OTG_READ_4(sc, DWC_OTG_REG_DIEPCTL(td->ep_no)));
+
+ goto not_complete;
+ }
+
+ DPRINTFN(5, "rem=%u ep=%d\n", td->remainder, td->ep_no);
+
+ /* try to optimise by sending more data */
+ if ((max_buffer != 0) && ((td->max_packet_size & 3) == 0)) {
+
+ /* send multiple packets at the same time */
+ mpkt = max_buffer / td->max_packet_size;
+
+ if (mpkt > 0x3FE)
+ mpkt = 0x3FE;
+
+ count = td->remainder;
+ if (count > 0x7FFFFF)
+ count = 0x7FFFFF - (0x7FFFFF % td->max_packet_size);
+
+ td->npkt = count / td->max_packet_size;
+
+ /*
+ * NOTE: We could use 0x3FE instead of "mpkt" in the
+ * check below to get more throughput, but then we
+ * have a dependency towards non-generic chip features
+ * to disable the TX-FIFO-EMPTY interrupts on a per
+ * endpoint basis. Increase the maximum buffer size of
+ * the IN endpoint to increase the performance.
+ */
+ if (td->npkt > mpkt) {
+ td->npkt = mpkt;
+ count = td->max_packet_size * mpkt;
+ } else if ((count == 0) || (count % td->max_packet_size)) {
+ /* we are transmitting a short packet */
+ td->npkt++;
+ td->short_pkt = 1;
+ }
+ } else {
+ /* send one packet at a time */
+ mpkt = 1;
+ count = td->max_packet_size;
+ if (td->remainder < count) {
+ /* we have a short packet */
+ td->short_pkt = 1;
+ count = td->remainder;
+ }
+ td->npkt = 1;
+ }
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DIEPTSIZ(td->ep_no),
+ DWC_OTG_MSK_DXEPTSIZ_SET_MULTI(1) |
+ DWC_OTG_MSK_DXEPTSIZ_SET_NPKT(td->npkt) |
+ DWC_OTG_MSK_DXEPTSIZ_SET_NBYTES(count));
+
+ /* make room for buffering */
+ td->npkt += mpkt;
+
+ temp = sc->sc_in_ctl[td->ep_no];
+
+ /* must enable before writing data to FIFO */
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DIEPCTL(td->ep_no), temp |
+ DWC_OTG_MSK_DIEPCTL_ENABLE |
+ DWC_OTG_MSK_DIEPCTL_CLR_NAK);
+
+ td->tx_bytes = count;
+
+ /* check remainder */
+ if (td->tx_bytes == 0 &&
+ td->remainder == 0) {
+ if (td->short_pkt)
+ return (0); /* complete */
+
+ /* else we need to transmit a short packet */
+ }
+
+ if (--to)
+ goto repeat;
+
+not_complete:
+ return (1); /* not complete */
+}
+
+static uint8_t
+dwc_otg_data_tx_sync(struct dwc_otg_td *td)
+{
+ struct dwc_otg_softc *sc;
+ uint32_t temp;
+
+ /* get pointer to softc */
+ sc = DWC_OTG_PC2SC(td->pc);
+
+ /*
+ * If all packets are transferred we are complete:
+ */
+ temp = DWC_OTG_READ_4(sc, DWC_OTG_REG_DIEPTSIZ(td->ep_no));
+
+ /* check that all packets have been transferred */
+ if (DWC_OTG_MSK_DXEPTSIZ_GET_NPKT(temp) != 0) {
+ DPRINTFN(5, "busy ep=%d\n", td->ep_no);
+ goto not_complete;
+ }
+ return (0);
+
+not_complete:
+
+ /* we only want to know if there is a SETUP packet or free IN packet */
+
+ temp = sc->sc_last_rx_status;
+
+ if ((td->ep_no == 0) && (temp != 0) &&
+ (DWC_OTG_MSK_GRXSTS_GET_CHANNEL(temp) == 0)) {
+
+ if ((temp & DWC_OTG_MSK_GRXSTS_PACKET_STS) ==
+ DWC_OTG_MSK_GRXSTS_DEV_STP_DATA) {
+ DPRINTFN(5, "faking complete\n");
+ /*
+ * Race condition: We are complete!
+ */
+ return (0);
+ } else {
+ /* dump data - wrong direction */
+ dwc_otg_common_rx_ack(sc);
+ }
+ }
+ return (1); /* not complete */
+}
+
+static uint8_t
+dwc_otg_xfer_do_fifo(struct usb_xfer *xfer)
+{
+ struct dwc_otg_td *td;
+
+ DPRINTFN(9, "\n");
+
+ td = xfer->td_transfer_cache;
+ while (1) {
+ if ((td->func) (td)) {
+ /* operation in progress */
+ break;
+ }
+ if (((void *)td) == xfer->td_transfer_last) {
+ goto done;
+ }
+ if (td->error) {
+ goto done;
+ } else if (td->remainder > 0) {
+ /*
+ * We had a short transfer. If there is no alternate
+ * next, stop processing !
+ */
+ if (!td->alt_next)
+ goto done;
+ }
+
+ /*
+ * Fetch the next transfer descriptor and transfer
+ * some flags to the next transfer descriptor
+ */
+ td = td->obj_next;
+ xfer->td_transfer_cache = td;
+ }
+ return (1); /* not complete */
+
+done:
+ /* compute all actual lengths */
+
+ dwc_otg_standard_done(xfer);
+ return (0); /* complete */
+}
+
+static void
+dwc_otg_interrupt_poll(struct dwc_otg_softc *sc)
+{
+ struct usb_xfer *xfer;
+ uint32_t temp;
+ uint8_t got_rx_status;
+
+repeat:
+ if (sc->sc_last_rx_status == 0) {
+
+ temp = DWC_OTG_READ_4(sc, DWC_OTG_REG_GINTSTS);
+ if (temp & DWC_OTG_MSK_GINT_RXFLVL) {
+ /* pop current status */
+ sc->sc_last_rx_status =
+ DWC_OTG_READ_4(sc, DWC_OTG_REG_GRXSTSP);
+ }
+
+ if (sc->sc_last_rx_status != 0) {
+
+ uint32_t temp;
+ uint8_t ep_no;
+
+ temp = DWC_OTG_MSK_GRXSTS_GET_BYTE_CNT(
+ sc->sc_last_rx_status);
+ ep_no = DWC_OTG_MSK_GRXSTS_GET_CHANNEL(
+ sc->sc_last_rx_status);
+
+ /* receive data, if any */
+ if (temp != 0) {
+ DPRINTF("Reading %d bytes from ep %d\n", temp, ep_no);
+ bus_space_read_region_4(sc->sc_io_tag, sc->sc_io_hdl,
+ DWC_OTG_REG_DFIFO(ep_no),
+ sc->sc_rx_bounce_buffer, (temp + 3) / 4);
+ }
+
+ temp = sc->sc_last_rx_status &
+ DWC_OTG_MSK_GRXSTS_PACKET_STS;
+
+ /* non-data messages we simply skip */
+ if (temp != DWC_OTG_MSK_GRXSTS_DEV_STP_DATA &&
+ temp != DWC_OTG_MSK_GRXSTS_DEV_OUT_DATA) {
+ dwc_otg_common_rx_ack(sc);
+ goto repeat;
+ }
+
+ /* check if we should dump the data */
+ if (!(sc->sc_active_out_ep & (1U << ep_no))) {
+ dwc_otg_common_rx_ack(sc);
+ goto repeat;
+ }
+
+ got_rx_status = 1;
+
+ DPRINTFN(5, "RX status = 0x%08x: ch=%d pid=%d bytes=%d sts=%d\n",
+ sc->sc_last_rx_status, ep_no,
+ (sc->sc_last_rx_status >> 15) & 3,
+ DWC_OTG_MSK_GRXSTS_GET_BYTE_CNT(sc->sc_last_rx_status),
+ (sc->sc_last_rx_status >> 17) & 15);
+ } else {
+ got_rx_status = 0;
+ }
+ } else {
+ uint8_t ep_no;
+
+ ep_no = DWC_OTG_MSK_GRXSTS_GET_CHANNEL(
+ sc->sc_last_rx_status);
+
+ /* check if we should dump the data */
+ if (!(sc->sc_active_out_ep & (1U << ep_no))) {
+ dwc_otg_common_rx_ack(sc);
+ goto repeat;
+ }
+
+ got_rx_status = 1;
+ }
+
+ TAILQ_FOREACH(xfer, &sc->sc_bus.intr_q.head, wait_entry) {
+ if (!dwc_otg_xfer_do_fifo(xfer)) {
+ /* queue has been modified */
+ goto repeat;
+ }
+ }
+
+ if (got_rx_status) {
+ if (sc->sc_last_rx_status == 0)
+ goto repeat;
+
+ /* disable RX FIFO level interrupt */
+ sc->sc_irq_mask &= ~DWC_OTG_MSK_GINT_RXFLVL;
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_GINTMSK, sc->sc_irq_mask);
+ }
+}
+
+static void
+dwc_otg_vbus_interrupt(struct dwc_otg_softc *sc, uint8_t is_on)
+{
+ DPRINTFN(5, "vbus = %u\n", is_on);
+
+ if (is_on) {
+ if (!sc->sc_flags.status_vbus) {
+ sc->sc_flags.status_vbus = 1;
+
+ /* complete root HUB interrupt endpoint */
+
+ dwc_otg_root_intr(sc);
+ }
+ } else {
+ if (sc->sc_flags.status_vbus) {
+ sc->sc_flags.status_vbus = 0;
+ sc->sc_flags.status_bus_reset = 0;
+ sc->sc_flags.status_suspend = 0;
+ sc->sc_flags.change_suspend = 0;
+ sc->sc_flags.change_connect = 1;
+
+ /* complete root HUB interrupt endpoint */
+
+ dwc_otg_root_intr(sc);
+ }
+ }
+}
+
+void
+dwc_otg_interrupt(struct dwc_otg_softc *sc)
+{
+ uint32_t status;
+
+ USB_BUS_LOCK(&sc->sc_bus);
+
+ /* read and clear interrupt status */
+ status = DWC_OTG_READ_4(sc, DWC_OTG_REG_GINTSTS);
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_GINTSTS, status);
+
+ DPRINTFN(14, "GINTSTS=0x%08x\n", status);
+
+ /* check for any bus state change interrupts */
+ if (status & DWC_OTG_MSK_GINT_ENUM_DONE) {
+
+ uint32_t temp;
+
+ DPRINTFN(5, "end of reset\n");
+
+ /* set correct state */
+ sc->sc_flags.status_bus_reset = 1;
+ sc->sc_flags.status_suspend = 0;
+ sc->sc_flags.change_suspend = 0;
+ sc->sc_flags.change_connect = 1;
+
+ /* reset FIFOs */
+ dwc_otg_init_fifo(sc);
+
+ /* reset function address */
+ dwc_otg_set_address(sc, 0);
+
+ /* reset active endpoints */
+ sc->sc_active_out_ep = 1;
+
+ /* figure out enumeration speed */
+ temp = DWC_OTG_READ_4(sc, DWC_OTG_REG_DSTS);
+ if (DWC_OTG_MSK_DSTS_GET_ENUM_SPEED(temp) ==
+ DWC_OTG_MSK_DSTS_ENUM_SPEED_HI)
+ sc->sc_flags.status_high_speed = 1;
+ else
+ sc->sc_flags.status_high_speed = 0;
+
+ /* disable resume interrupt and enable suspend interrupt */
+
+ sc->sc_irq_mask &= ~DWC_OTG_MSK_GINT_WKUPINT;
+ sc->sc_irq_mask |= DWC_OTG_MSK_GINT_USB_SUSPEND;
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_GINTMSK, sc->sc_irq_mask);
+
+ /* complete root HUB interrupt endpoint */
+ dwc_otg_root_intr(sc);
+ }
+ /*
+ * If resume and suspend is set at the same time we interpret
+ * that like RESUME. Resume is set when there is at least 3
+ * milliseconds of inactivity on the USB BUS.
+ */
+ if (status & DWC_OTG_MSK_GINT_WKUPINT) {
+
+ DPRINTFN(5, "resume interrupt\n");
+
+ dwc_otg_resume_irq(sc);
+
+ } else if (status & DWC_OTG_MSK_GINT_USB_SUSPEND) {
+
+ DPRINTFN(5, "suspend interrupt\n");
+
+ if (!sc->sc_flags.status_suspend) {
+ /* update status bits */
+ sc->sc_flags.status_suspend = 1;
+ sc->sc_flags.change_suspend = 1;
+
+ /*
+ * Disable suspend interrupt and enable resume
+ * interrupt:
+ */
+ sc->sc_irq_mask &= ~DWC_OTG_MSK_GINT_USB_SUSPEND;
+ sc->sc_irq_mask |= DWC_OTG_MSK_GINT_WKUPINT;
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_GINTMSK, sc->sc_irq_mask);
+
+ /* complete root HUB interrupt endpoint */
+ dwc_otg_root_intr(sc);
+ }
+ }
+ /* check VBUS */
+ if (status & (DWC_OTG_MSK_GINT_USB_SUSPEND |
+ DWC_OTG_MSK_GINT_SESSREQINT)) {
+ uint32_t temp;
+
+ temp = DWC_OTG_READ_4(sc, DWC_OTG_REG_GOTGCTL);
+
+ DPRINTFN(5, "GOTGCTL=0x%08x\n", temp);
+
+ dwc_otg_vbus_interrupt(sc,
+ (temp & DWC_OTG_MSK_GOTGCTL_BSESS_VALID) ? 1 : 0);
+ }
+
+ /* clear all IN endpoint interrupts */
+ if (status & DWC_OTG_MSK_GINT_INEP) {
+ uint32_t temp;
+ uint8_t x;
+
+ for (x = 0; x != sc->sc_dev_in_ep_max; x++) {
+ temp = DWC_OTG_READ_4(sc, DWC_OTG_REG_DIEPINT(x));
+ if (temp == 0)
+ continue;
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DIEPINT(x), temp);
+ }
+ }
+
+#if 0
+ /* check if we should poll the FIFOs */
+ if (status & (DWC_OTG_MSK_GINT_RXFLVL | DWC_OTG_MSK_GINT_INEP))
+#endif
+ /* poll FIFO(s) */
+ dwc_otg_interrupt_poll(sc);
+
+ USB_BUS_UNLOCK(&sc->sc_bus);
+}
+
+static void
+dwc_otg_setup_standard_chain_sub(struct dwc_otg_std_temp *temp)
+{
+ struct dwc_otg_td *td;
+
+ /* get current Transfer Descriptor */
+ td = temp->td_next;
+ temp->td = td;
+
+ /* prepare for next TD */
+ temp->td_next = td->obj_next;
+
+ /* fill out the Transfer Descriptor */
+ td->func = temp->func;
+ td->pc = temp->pc;
+ td->offset = temp->offset;
+ td->remainder = temp->len;
+ td->tx_bytes = 0;
+ td->error = 0;
+ td->npkt = 1;
+ td->did_stall = temp->did_stall;
+ td->short_pkt = temp->short_pkt;
+ td->alt_next = temp->setup_alt_next;
+}
+
+static void
+dwc_otg_setup_standard_chain(struct usb_xfer *xfer)
+{
+ struct dwc_otg_std_temp temp;
+ struct dwc_otg_td *td;
+ uint32_t x;
+ uint8_t need_sync;
+
+ DPRINTFN(9, "addr=%d endpt=%d sumlen=%d speed=%d\n",
+ xfer->address, UE_GET_ADDR(xfer->endpointno),
+ xfer->sumlen, usbd_get_speed(xfer->xroot->udev));
+
+ temp.max_frame_size = xfer->max_frame_size;
+
+ td = xfer->td_start[0];
+ xfer->td_transfer_first = td;
+ xfer->td_transfer_cache = td;
+
+ /* setup temp */
+
+ temp.pc = NULL;
+ temp.td = NULL;
+ temp.td_next = xfer->td_start[0];
+ temp.offset = 0;
+ temp.setup_alt_next = xfer->flags_int.short_frames_ok;
+ temp.did_stall = !xfer->flags_int.control_stall;
+
+ /* check if we should prepend a setup message */
+
+ if (xfer->flags_int.control_xfr) {
+ if (xfer->flags_int.control_hdr) {
+
+ temp.func = &dwc_otg_setup_rx;
+ temp.len = xfer->frlengths[0];
+ temp.pc = xfer->frbuffers + 0;
+ temp.short_pkt = temp.len ? 1 : 0;
+
+ /* check for last frame */
+ if (xfer->nframes == 1) {
+ /* no STATUS stage yet, SETUP is last */
+ if (xfer->flags_int.control_act)
+ temp.setup_alt_next = 0;
+ }
+
+ dwc_otg_setup_standard_chain_sub(&temp);
+ }
+ x = 1;
+ } else {
+ x = 0;
+ }
+
+ if (x != xfer->nframes) {
+ if (xfer->endpointno & UE_DIR_IN) {
+ temp.func = &dwc_otg_data_tx;
+ need_sync = 1;
+ } else {
+ temp.func = &dwc_otg_data_rx;
+ need_sync = 0;
+ }
+
+ /* setup "pc" pointer */
+ temp.pc = xfer->frbuffers + x;
+ } else {
+ need_sync = 0;
+ }
+ while (x != xfer->nframes) {
+
+ /* DATA0 / DATA1 message */
+
+ temp.len = xfer->frlengths[x];
+
+ x++;
+
+ if (x == xfer->nframes) {
+ if (xfer->flags_int.control_xfr) {
+ if (xfer->flags_int.control_act) {
+ temp.setup_alt_next = 0;
+ }
+ } else {
+ temp.setup_alt_next = 0;
+ }
+ }
+ if (temp.len == 0) {
+
+ /* make sure that we send an USB packet */
+
+ temp.short_pkt = 0;
+
+ } else {
+
+ /* regular data transfer */
+
+ temp.short_pkt = (xfer->flags.force_short_xfer ? 0 : 1);
+ }
+
+ dwc_otg_setup_standard_chain_sub(&temp);
+
+ if (xfer->flags_int.isochronous_xfr) {
+ temp.offset += temp.len;
+ } else {
+ /* get next Page Cache pointer */
+ temp.pc = xfer->frbuffers + x;
+ }
+ }
+
+ if (xfer->flags_int.control_xfr) {
+
+ /* always setup a valid "pc" pointer for status and sync */
+ temp.pc = xfer->frbuffers + 0;
+ temp.len = 0;
+ temp.short_pkt = 0;
+ temp.setup_alt_next = 0;
+
+ /* check if we need to sync */
+ if (need_sync) {
+ /* we need a SYNC point after TX */
+ temp.func = &dwc_otg_data_tx_sync;
+ dwc_otg_setup_standard_chain_sub(&temp);
+ }
+
+ /* check if we should append a status stage */
+ if (!xfer->flags_int.control_act) {
+
+ /*
+ * Send a DATA1 message and invert the current
+ * endpoint direction.
+ */
+ if (xfer->endpointno & UE_DIR_IN) {
+ temp.func = &dwc_otg_data_rx;
+ need_sync = 0;
+ } else {
+ temp.func = &dwc_otg_data_tx;
+ need_sync = 1;
+ }
+
+ dwc_otg_setup_standard_chain_sub(&temp);
+ if (need_sync) {
+ /* we need a SYNC point after TX */
+ temp.func = &dwc_otg_data_tx_sync;
+ dwc_otg_setup_standard_chain_sub(&temp);
+ }
+ }
+ } else {
+ /* check if we need to sync */
+ if (need_sync) {
+
+ temp.pc = xfer->frbuffers + 0;
+ temp.len = 0;
+ temp.short_pkt = 0;
+ temp.setup_alt_next = 0;
+
+ /* we need a SYNC point after TX */
+ temp.func = &dwc_otg_data_tx_sync;
+ dwc_otg_setup_standard_chain_sub(&temp);
+ }
+ }
+
+ /* must have at least one frame! */
+ td = temp.td;
+ xfer->td_transfer_last = td;
+}
+
+static void
+dwc_otg_timeout(void *arg)
+{
+ struct usb_xfer *xfer = arg;
+
+ DPRINTF("xfer=%p\n", xfer);
+
+ USB_BUS_LOCK_ASSERT(xfer->xroot->bus, MA_OWNED);
+
+ /* transfer is transferred */
+ dwc_otg_device_done(xfer, USB_ERR_TIMEOUT);
+}
+
+static void
+dwc_otg_start_standard_chain(struct usb_xfer *xfer)
+{
+ DPRINTFN(9, "\n");
+
+ /* poll one time - will turn on interrupts */
+ if (dwc_otg_xfer_do_fifo(xfer)) {
+
+ /* put transfer on interrupt queue */
+ usbd_transfer_enqueue(&xfer->xroot->bus->intr_q, xfer);
+
+ /* start timeout, if any */
+ if (xfer->timeout != 0) {
+ usbd_transfer_timeout_ms(xfer,
+ &dwc_otg_timeout, xfer->timeout);
+ }
+ }
+}
+
+static void
+dwc_otg_root_intr(struct dwc_otg_softc *sc)
+{
+ DPRINTFN(9, "\n");
+
+ USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED);
+
+ /* set port bit */
+ sc->sc_hub_idata[0] = 0x02; /* we only have one port */
+
+ uhub_root_intr(&sc->sc_bus, sc->sc_hub_idata,
+ sizeof(sc->sc_hub_idata));
+}
+
+static usb_error_t
+dwc_otg_standard_done_sub(struct usb_xfer *xfer)
+{
+ struct dwc_otg_td *td;
+ uint32_t len;
+ uint8_t error;
+
+ DPRINTFN(9, "\n");
+
+ td = xfer->td_transfer_cache;
+
+ do {
+ len = td->remainder;
+
+ if (xfer->aframes != xfer->nframes) {
+ /*
+ * Verify the length and subtract
+ * the remainder from "frlengths[]":
+ */
+ if (len > xfer->frlengths[xfer->aframes]) {
+ td->error = 1;
+ } else {
+ xfer->frlengths[xfer->aframes] -= len;
+ }
+ }
+ /* Check for transfer error */
+ if (td->error) {
+ /* the transfer is finished */
+ error = 1;
+ td = NULL;
+ break;
+ }
+ /* Check for short transfer */
+ if (len > 0) {
+ if (xfer->flags_int.short_frames_ok) {
+ /* follow alt next */
+ if (td->alt_next) {
+ td = td->obj_next;
+ } else {
+ td = NULL;
+ }
+ } else {
+ /* the transfer is finished */
+ td = NULL;
+ }
+ error = 0;
+ break;
+ }
+ td = td->obj_next;
+
+ /* this USB frame is complete */
+ error = 0;
+ break;
+
+ } while (0);
+
+ /* update transfer cache */
+
+ xfer->td_transfer_cache = td;
+
+ return (error ?
+ USB_ERR_STALLED : USB_ERR_NORMAL_COMPLETION);
+}
+
+static void
+dwc_otg_standard_done(struct usb_xfer *xfer)
+{
+ usb_error_t err = 0;
+
+ DPRINTFN(13, "xfer=%p endpoint=%p transfer done\n",
+ xfer, xfer->endpoint);
+
+ /* reset scanner */
+
+ xfer->td_transfer_cache = xfer->td_transfer_first;
+
+ if (xfer->flags_int.control_xfr) {
+
+ if (xfer->flags_int.control_hdr) {
+
+ err = dwc_otg_standard_done_sub(xfer);
+ }
+ xfer->aframes = 1;
+
+ if (xfer->td_transfer_cache == NULL) {
+ goto done;
+ }
+ }
+ while (xfer->aframes != xfer->nframes) {
+
+ err = dwc_otg_standard_done_sub(xfer);
+ xfer->aframes++;
+
+ if (xfer->td_transfer_cache == NULL) {
+ goto done;
+ }
+ }
+
+ if (xfer->flags_int.control_xfr &&
+ !xfer->flags_int.control_act) {
+
+ err = dwc_otg_standard_done_sub(xfer);
+ }
+done:
+ dwc_otg_device_done(xfer, err);
+}
+
+/*------------------------------------------------------------------------*
+ * dwc_otg_device_done
+ *
+ * NOTE: this function can be called more than one time on the
+ * same USB transfer!
+ *------------------------------------------------------------------------*/
+static void
+dwc_otg_device_done(struct usb_xfer *xfer, usb_error_t error)
+{
+ DPRINTFN(9, "xfer=%p, endpoint=%p, error=%d\n",
+ xfer, xfer->endpoint, error);
+
+ if (xfer->flags_int.usb_mode == USB_MODE_DEVICE) {
+ DPRINTFN(15, "disabled interrupts!\n");
+ }
+ /* dequeue transfer and start next transfer */
+ usbd_transfer_done(xfer, error);
+}
+
+static void
+dwc_otg_set_stall(struct usb_device *udev, struct usb_xfer *xfer,
+ struct usb_endpoint *ep, uint8_t *did_stall)
+{
+ struct dwc_otg_softc *sc;
+ uint32_t temp;
+ uint32_t reg;
+ uint8_t ep_no;
+
+ USB_BUS_LOCK_ASSERT(udev->bus, MA_OWNED);
+
+ if (xfer) {
+ /* cancel any ongoing transfers */
+ dwc_otg_device_done(xfer, USB_ERR_STALLED);
+ }
+ sc = DWC_OTG_BUS2SC(udev->bus);
+
+ /* get endpoint address */
+ ep_no = ep->edesc->bEndpointAddress;
+
+ DPRINTFN(5, "endpoint=0x%x\n", ep_no);
+
+ if (ep_no & UE_DIR_IN) {
+ reg = DWC_OTG_REG_DIEPCTL(ep_no & UE_ADDR);
+ temp = sc->sc_in_ctl[ep_no & UE_ADDR];
+ } else {
+ reg = DWC_OTG_REG_DOEPCTL(ep_no & UE_ADDR);
+ temp = sc->sc_out_ctl[ep_no & UE_ADDR];
+ }
+
+ /* disable and stall endpoint */
+ DWC_OTG_WRITE_4(sc, reg, temp | DWC_OTG_MSK_DOEPCTL_DISABLE);
+ DWC_OTG_WRITE_4(sc, reg, temp | DWC_OTG_MSK_DOEPCTL_STALL);
+
+ /* clear active OUT ep */
+ if (!(ep_no & UE_DIR_IN)) {
+
+ sc->sc_active_out_ep &= ~(1U << (ep_no & UE_ADDR));
+
+ if (sc->sc_last_rx_status != 0 &&
+ (ep_no & UE_ADDR) == DWC_OTG_MSK_GRXSTS_GET_CHANNEL(
+ sc->sc_last_rx_status)) {
+ /* dump data */
+ dwc_otg_common_rx_ack(sc);
+ /* poll interrupt */
+ dwc_otg_interrupt_poll(sc);
+ }
+ }
+}
+
+static void
+dwc_otg_clear_stall_sub(struct dwc_otg_softc *sc, uint32_t mps,
+ uint8_t ep_no, uint8_t ep_type, uint8_t ep_dir)
+{
+ uint32_t reg;
+ uint32_t temp;
+
+ if (ep_type == UE_CONTROL) {
+ /* clearing stall is not needed */
+ return;
+ }
+
+ if (ep_dir) {
+ reg = DWC_OTG_REG_DIEPCTL(ep_no);
+ } else {
+ reg = DWC_OTG_REG_DOEPCTL(ep_no);
+ sc->sc_active_out_ep |= (1U << ep_no);
+ }
+
+ /* round up and mask away the multiplier count */
+ mps = (mps + 3) & 0x7FC;
+
+ if (ep_type == UE_BULK) {
+ temp = DWC_OTG_MSK_EP_SET_TYPE(
+ DWC_OTG_MSK_EP_TYPE_BULK) |
+ DWC_OTG_MSK_DIEPCTL_USB_AEP;
+ } else if (ep_type == UE_INTERRUPT) {
+ temp = DWC_OTG_MSK_EP_SET_TYPE(
+ DWC_OTG_MSK_EP_TYPE_INTERRUPT) |
+ DWC_OTG_MSK_DIEPCTL_USB_AEP;
+ } else {
+ temp = DWC_OTG_MSK_EP_SET_TYPE(
+ DWC_OTG_MSK_EP_TYPE_ISOC) |
+ DWC_OTG_MSK_DIEPCTL_USB_AEP;
+ }
+
+ temp |= DWC_OTG_MSK_DIEPCTL_MPS(mps);
+ temp |= DWC_OTG_MSK_DIEPCTL_FNUM(ep_no);
+
+ if (ep_dir)
+ sc->sc_in_ctl[ep_no] = temp;
+ else
+ sc->sc_out_ctl[ep_no] = temp;
+
+ DWC_OTG_WRITE_4(sc, reg, temp | DWC_OTG_MSK_DOEPCTL_DISABLE);
+ DWC_OTG_WRITE_4(sc, reg, temp | DWC_OTG_MSK_DOEPCTL_SET_DATA0);
+ DWC_OTG_WRITE_4(sc, reg, temp | DWC_OTG_MSK_DIEPCTL_SET_NAK);
+
+ /* we only reset the transmit FIFO */
+ if (ep_dir) {
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_GRSTCTL,
+ DWC_OTG_MSK_GRSTCTL_TXFIFO(ep_no) |
+ DWC_OTG_MSK_GRSTCTL_TXFFLUSH);
+
+ DWC_OTG_WRITE_4(sc,
+ DWC_OTG_REG_DIEPTSIZ(ep_no), 0);
+ }
+
+ /* poll interrupt */
+ dwc_otg_interrupt_poll(sc);
+}
+
+static void
+dwc_otg_clear_stall(struct usb_device *udev, struct usb_endpoint *ep)
+{
+ struct dwc_otg_softc *sc;
+ struct usb_endpoint_descriptor *ed;
+
+ DPRINTFN(5, "endpoint=%p\n", ep);
+
+ USB_BUS_LOCK_ASSERT(udev->bus, MA_OWNED);
+
+ /* check mode */
+ if (udev->flags.usb_mode != USB_MODE_DEVICE) {
+ /* not supported */
+ return;
+ }
+ /* get softc */
+ sc = DWC_OTG_BUS2SC(udev->bus);
+
+ /* get endpoint descriptor */
+ ed = ep->edesc;
+
+ /* reset endpoint */
+ dwc_otg_clear_stall_sub(sc,
+ UGETW(ed->wMaxPacketSize),
+ (ed->bEndpointAddress & UE_ADDR),
+ (ed->bmAttributes & UE_XFERTYPE),
+ (ed->bEndpointAddress & (UE_DIR_IN | UE_DIR_OUT)));
+}
+
+static void
+dwc_otg_device_state_change(struct usb_device *udev)
+{
+ struct dwc_otg_softc *sc;
+ uint8_t x;
+
+ /* get softc */
+ sc = DWC_OTG_BUS2SC(udev->bus);
+
+ /* deactivate all other endpoint but the control endpoint */
+ if (udev->state == USB_STATE_CONFIGURED ||
+ udev->state == USB_STATE_ADDRESSED) {
+
+ USB_BUS_LOCK(&sc->sc_bus);
+
+ for (x = 1; x != sc->sc_dev_ep_max; x++) {
+
+ if (x < sc->sc_dev_in_ep_max) {
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DIEPCTL(x),
+ DWC_OTG_MSK_DIEPCTL_DISABLE);
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DIEPCTL(x), 0);
+ }
+
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DOEPCTL(x),
+ DWC_OTG_MSK_DOEPCTL_DISABLE);
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DOEPCTL(x), 0);
+ }
+ USB_BUS_UNLOCK(&sc->sc_bus);
+ }
+}
+
+int
+dwc_otg_init(struct dwc_otg_softc *sc)
+{
+ uint32_t temp;
+
+ DPRINTF("start\n");
+
+ /* set up the bus structure */
+ sc->sc_bus.usbrev = USB_REV_2_0;
+ sc->sc_bus.methods = &dwc_otg_bus_methods;
+
+ /* reset active endpoints */
+ sc->sc_active_out_ep = 1;
+
+ USB_BUS_LOCK(&sc->sc_bus);
+
+ /* turn on clocks */
+ dwc_otg_clocks_on(sc);
+
+ temp = DWC_OTG_READ_4(sc, DWC_OTG_REG_GSNPSID);
+ DPRINTF("Version = 0x%08x\n", temp);
+
+ /* disconnect */
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DCTL,
+ DWC_OTG_MSK_DCTL_SOFT_DISC);
+
+ /* wait for host to detect disconnect */
+ usb_pause_mtx(&sc->sc_bus.bus_mtx, hz / 32);
+
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_GRSTCTL,
+ DWC_OTG_MSK_GRSTCTL_CSFTRST);
+
+ /* wait a little bit for block to reset */
+ usb_pause_mtx(&sc->sc_bus.bus_mtx, hz / 128);
+
+ /* select HSIC or non-HSIC mode */
+ if (DWC_OTG_USE_HSIC) {
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_GUSBCFG,
+ DWC_OTG_MSK_GUSBCFG_PHY_INTF |
+ DWC_OTG_MSK_GUSBCFG_TRD_TIM(5));
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_GOTGCTL,
+ 0x000000EC);
+
+ temp = DWC_OTG_READ_4(sc, DWC_OTG_REG_GLPMCFG);
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_GLPMCFG,
+ temp & ~DWC_OTG_MSK_GLPMCFG_HSIC_CONN);
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_GLPMCFG,
+ temp | DWC_OTG_MSK_GLPMCFG_HSIC_CONN);
+ } else {
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_GUSBCFG,
+ DWC_OTG_MSK_GUSBCFG_ULPI_UMTI_SEL |
+ DWC_OTG_MSK_GUSBCFG_TRD_TIM(5));
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_GOTGCTL, 0);
+
+ temp = DWC_OTG_READ_4(sc, DWC_OTG_REG_GLPMCFG);
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_GLPMCFG,
+ temp & ~DWC_OTG_MSK_GLPMCFG_HSIC_CONN);
+ }
+
+ /* clear global nak */
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DCTL,
+ DWC_OTG_MSK_DCTL_CGOUT_NAK |
+ DWC_OTG_MSK_DCTL_CGNPIN_NAK);
+
+ /* enable USB port */
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_PCGCCTL, 0);
+
+ /* pull up D+ */
+ dwc_otg_pull_up(sc);
+
+ temp = DWC_OTG_READ_4(sc, DWC_OTG_REG_GHWCFG3);
+
+ sc->sc_fifo_size = 4 * DWC_OTG_MSK_GHWCFG3_GET_DFIFO(temp);
+
+ temp = DWC_OTG_READ_4(sc, DWC_OTG_REG_GHWCFG2);
+
+ sc->sc_dev_ep_max = DWC_OTG_MSK_GHWCFG2_NUM_DEV_EP(temp);
+
+ temp = DWC_OTG_READ_4(sc, DWC_OTG_REG_GHWCFG4);
+
+ sc->sc_dev_in_ep_max = DWC_OTG_MSK_GHWCFG4_NUM_IN_EPS(temp);
+
+ DPRINTF("Total FIFO size = %d bytes, Device EPs = %d/%d\n",
+ sc->sc_fifo_size, sc->sc_dev_ep_max, sc->sc_dev_in_ep_max);
+
+ /* setup FIFO */
+ if (dwc_otg_init_fifo(sc))
+ return (EINVAL);
+
+ /* enable interrupts */
+ sc->sc_irq_mask = DWC_OTG_MSK_GINT_ENABLED;
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_GINTMSK, sc->sc_irq_mask);
+
+ /*
+ * Disable all endpoint interrupts,
+ * we use the SOF IRQ for transmit:
+ */
+
+ /* enable all endpoint interrupts */
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DIEPMSK,
+ /* DWC_OTG_MSK_DIEP_FIFO_EMPTY | */
+ DWC_OTG_MSK_DIEP_XFER_COMPLETE);
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DOEPMSK, 0);
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DAINTMSK, 0xFFFF);
+
+ /* enable global IRQ */
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_GAHBCFG,
+ DWC_OTG_MSK_GAHBCFG_GLOBAL_IRQ);
+
+ /* turn off clocks */
+ dwc_otg_clocks_off(sc);
+
+ /* read initial VBUS state */
+
+ temp = DWC_OTG_READ_4(sc, DWC_OTG_REG_GOTGCTL);
+
+ DPRINTFN(5, "GOTCTL=0x%08x\n", temp);
+
+ dwc_otg_vbus_interrupt(sc,
+ (temp & DWC_OTG_MSK_GOTGCTL_BSESS_VALID) ? 1 : 0);
+
+ USB_BUS_UNLOCK(&sc->sc_bus);
+
+ /* catch any lost interrupts */
+
+ dwc_otg_do_poll(&sc->sc_bus);
+
+ return (0); /* success */
+}
+
+void
+dwc_otg_uninit(struct dwc_otg_softc *sc)
+{
+ USB_BUS_LOCK(&sc->sc_bus);
+
+ /* set disconnect */
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DCTL,
+ DWC_OTG_MSK_DCTL_SOFT_DISC);
+
+ /* turn off global IRQ */
+ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_GAHBCFG, 0);
+
+ sc->sc_flags.port_powered = 0;
+ sc->sc_flags.status_vbus = 0;
+ sc->sc_flags.status_bus_reset = 0;
+ sc->sc_flags.status_suspend = 0;
+ sc->sc_flags.change_suspend = 0;
+ sc->sc_flags.change_connect = 1;
+
+ dwc_otg_pull_down(sc);
+ dwc_otg_clocks_off(sc);
+
+ USB_BUS_UNLOCK(&sc->sc_bus);
+}
+
+static void
+dwc_otg_suspend(struct dwc_otg_softc *sc)
+{
+ return;
+}
+
+static void
+dwc_otg_resume(struct dwc_otg_softc *sc)
+{
+ return;
+}
+
+static void
+dwc_otg_do_poll(struct usb_bus *bus)
+{
+ struct dwc_otg_softc *sc = DWC_OTG_BUS2SC(bus);
+
+ USB_BUS_LOCK(&sc->sc_bus);
+ dwc_otg_interrupt_poll(sc);
+ USB_BUS_UNLOCK(&sc->sc_bus);
+}
+
+/*------------------------------------------------------------------------*
+ * at91dci bulk support
+ * at91dci control support
+ * at91dci interrupt support
+ *------------------------------------------------------------------------*/
+static void
+dwc_otg_device_non_isoc_open(struct usb_xfer *xfer)
+{
+ return;
+}
+
+static void
+dwc_otg_device_non_isoc_close(struct usb_xfer *xfer)
+{
+ dwc_otg_device_done(xfer, USB_ERR_CANCELLED);
+}
+
+static void
+dwc_otg_device_non_isoc_enter(struct usb_xfer *xfer)
+{
+ return;
+}
+
+static void
+dwc_otg_device_non_isoc_start(struct usb_xfer *xfer)
+{
+ /* setup TDs */
+ dwc_otg_setup_standard_chain(xfer);
+ dwc_otg_start_standard_chain(xfer);
+}
+
+struct usb_pipe_methods dwc_otg_device_non_isoc_methods =
+{
+ .open = dwc_otg_device_non_isoc_open,
+ .close = dwc_otg_device_non_isoc_close,
+ .enter = dwc_otg_device_non_isoc_enter,
+ .start = dwc_otg_device_non_isoc_start,
+};
+
+/*------------------------------------------------------------------------*
+ * at91dci full speed isochronous support
+ *------------------------------------------------------------------------*/
+static void
+dwc_otg_device_isoc_fs_open(struct usb_xfer *xfer)
+{
+ return;
+}
+
+static void
+dwc_otg_device_isoc_fs_close(struct usb_xfer *xfer)
+{
+ dwc_otg_device_done(xfer, USB_ERR_CANCELLED);
+}
+
+static void
+dwc_otg_device_isoc_fs_enter(struct usb_xfer *xfer)
+{
+ struct dwc_otg_softc *sc = DWC_OTG_BUS2SC(xfer->xroot->bus);
+ uint32_t temp;
+ uint32_t nframes;
+
+ DPRINTFN(6, "xfer=%p next=%d nframes=%d\n",
+ xfer, xfer->endpoint->isoc_next, xfer->nframes);
+
+ temp = DWC_OTG_READ_4(sc, DWC_OTG_REG_DSTS);
+
+ /* get the current frame index */
+
+ nframes = DWC_OTG_MSK_DSTS_GET_FNUM(temp);
+
+ if (sc->sc_flags.status_high_speed)
+ nframes /= 8;
+
+ nframes &= DWC_OTG_FRAME_MASK;
+
+ /*
+ * check if the frame index is within the window where the frames
+ * will be inserted
+ */
+ temp = (nframes - xfer->endpoint->isoc_next) & DWC_OTG_FRAME_MASK;
+
+ if ((xfer->endpoint->is_synced == 0) ||
+ (temp < xfer->nframes)) {
+ /*
+ * If there is data underflow or the pipe queue is
+ * empty we schedule the transfer a few frames ahead
+ * of the current frame position. Else two isochronous
+ * transfers might overlap.
+ */
+ xfer->endpoint->isoc_next = (nframes + 3) & DWC_OTG_FRAME_MASK;
+ xfer->endpoint->is_synced = 1;
+ DPRINTFN(3, "start next=%d\n", xfer->endpoint->isoc_next);
+ }
+ /*
+ * compute how many milliseconds the insertion is ahead of the
+ * current frame position:
+ */
+ temp = (xfer->endpoint->isoc_next - nframes) & DWC_OTG_FRAME_MASK;
+
+ /*
+ * pre-compute when the isochronous transfer will be finished:
+ */
+ xfer->isoc_time_complete =
+ usb_isoc_time_expand(&sc->sc_bus, nframes) + temp +
+ xfer->nframes;
+
+ /* compute frame number for next insertion */
+ xfer->endpoint->isoc_next += xfer->nframes;
+
+ /* setup TDs */
+ dwc_otg_setup_standard_chain(xfer);
+}
+
+static void
+dwc_otg_device_isoc_fs_start(struct usb_xfer *xfer)
+{
+ /* start TD chain */
+ dwc_otg_start_standard_chain(xfer);
+}
+
+struct usb_pipe_methods dwc_otg_device_isoc_fs_methods =
+{
+ .open = dwc_otg_device_isoc_fs_open,
+ .close = dwc_otg_device_isoc_fs_close,
+ .enter = dwc_otg_device_isoc_fs_enter,
+ .start = dwc_otg_device_isoc_fs_start,
+};
+
+/*------------------------------------------------------------------------*
+ * at91dci root control support
+ *------------------------------------------------------------------------*
+ * Simulate a hardware HUB by handling all the necessary requests.
+ *------------------------------------------------------------------------*/
+
+static const struct usb_device_descriptor dwc_otg_devd = {
+ .bLength = sizeof(struct usb_device_descriptor),
+ .bDescriptorType = UDESC_DEVICE,
+ .bcdUSB = {0x00, 0x02},
+ .bDeviceClass = UDCLASS_HUB,
+ .bDeviceSubClass = UDSUBCLASS_HUB,
+ .bDeviceProtocol = UDPROTO_HSHUBSTT,
+ .bMaxPacketSize = 64,
+ .bcdDevice = {0x00, 0x01},
+ .iManufacturer = 1,
+ .iProduct = 2,
+ .bNumConfigurations = 1,
+};
+
+static const struct dwc_otg_config_desc dwc_otg_confd = {
+ .confd = {
+ .bLength = sizeof(struct usb_config_descriptor),
+ .bDescriptorType = UDESC_CONFIG,
+ .wTotalLength[0] = sizeof(dwc_otg_confd),
+ .bNumInterface = 1,
+ .bConfigurationValue = 1,
+ .iConfiguration = 0,
+ .bmAttributes = UC_SELF_POWERED,
+ .bMaxPower = 0,
+ },
+ .ifcd = {
+ .bLength = sizeof(struct usb_interface_descriptor),
+ .bDescriptorType = UDESC_INTERFACE,
+ .bNumEndpoints = 1,
+ .bInterfaceClass = UICLASS_HUB,
+ .bInterfaceSubClass = UISUBCLASS_HUB,
+ .bInterfaceProtocol = 0,
+ },
+ .endpd = {
+ .bLength = sizeof(struct usb_endpoint_descriptor),
+ .bDescriptorType = UDESC_ENDPOINT,
+ .bEndpointAddress = (UE_DIR_IN | DWC_OTG_INTR_ENDPT),
+ .bmAttributes = UE_INTERRUPT,
+ .wMaxPacketSize[0] = 8,
+ .bInterval = 255,
+ },
+};
+
+static const struct usb_hub_descriptor_min dwc_otg_hubd = {
+ .bDescLength = sizeof(dwc_otg_hubd),
+ .bDescriptorType = UDESC_HUB,
+ .bNbrPorts = 1,
+ .wHubCharacteristics[0] =
+ (UHD_PWR_NO_SWITCH | UHD_OC_INDIVIDUAL) & 0xFF,
+ .wHubCharacteristics[1] =
+ (UHD_PWR_NO_SWITCH | UHD_OC_INDIVIDUAL) >> 8,
+ .bPwrOn2PwrGood = 50,
+ .bHubContrCurrent = 0,
+ .DeviceRemovable = {0}, /* port is removable */
+};
+
+#define STRING_LANG \
+ 0x09, 0x04, /* American English */
+
+#define STRING_VENDOR \
+ 'D', 0, 'W', 0, 'C', 0, 'O', 0, 'T', 0, 'G', 0
+
+#define STRING_PRODUCT \
+ 'D', 0, 'C', 0, 'I', 0, ' ', 0, 'R', 0, \
+ 'o', 0, 'o', 0, 't', 0, ' ', 0, 'H', 0, \
+ 'U', 0, 'B', 0,
+
+USB_MAKE_STRING_DESC(STRING_LANG, dwc_otg_langtab);
+USB_MAKE_STRING_DESC(STRING_VENDOR, dwc_otg_vendor);
+USB_MAKE_STRING_DESC(STRING_PRODUCT, dwc_otg_product);
+
+static usb_error_t
+dwc_otg_roothub_exec(struct usb_device *udev,
+ struct usb_device_request *req, const void **pptr, uint16_t *plength)
+{
+ struct dwc_otg_softc *sc = DWC_OTG_BUS2SC(udev->bus);
+ const void *ptr;
+ uint16_t len;
+ uint16_t value;
+ uint16_t index;
+ usb_error_t err;
+
+ USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED);
+
+ /* buffer reset */
+ ptr = (const void *)&sc->sc_hub_temp;
+ len = 0;
+ err = 0;
+
+ value = UGETW(req->wValue);
+ index = UGETW(req->wIndex);
+
+ /* demultiplex the control request */
+
+ switch (req->bmRequestType) {
+ case UT_READ_DEVICE:
+ switch (req->bRequest) {
+ case UR_GET_DESCRIPTOR:
+ goto tr_handle_get_descriptor;
+ case UR_GET_CONFIG:
+ goto tr_handle_get_config;
+ case UR_GET_STATUS:
+ goto tr_handle_get_status;
+ default:
+ goto tr_stalled;
+ }
+ break;
+
+ case UT_WRITE_DEVICE:
+ switch (req->bRequest) {
+ case UR_SET_ADDRESS:
+ goto tr_handle_set_address;
+ case UR_SET_CONFIG:
+ goto tr_handle_set_config;
+ case UR_CLEAR_FEATURE:
+ goto tr_valid; /* nop */
+ case UR_SET_DESCRIPTOR:
+ goto tr_valid; /* nop */
+ case UR_SET_FEATURE:
+ default:
+ goto tr_stalled;
+ }
+ break;
+
+ case UT_WRITE_ENDPOINT:
+ switch (req->bRequest) {
+ case UR_CLEAR_FEATURE:
+ switch (UGETW(req->wValue)) {
+ case UF_ENDPOINT_HALT:
+ goto tr_handle_clear_halt;
+ case UF_DEVICE_REMOTE_WAKEUP:
+ goto tr_handle_clear_wakeup;
+ default:
+ goto tr_stalled;
+ }
+ break;
+ case UR_SET_FEATURE:
+ switch (UGETW(req->wValue)) {
+ case UF_ENDPOINT_HALT:
+ goto tr_handle_set_halt;
+ case UF_DEVICE_REMOTE_WAKEUP:
+ goto tr_handle_set_wakeup;
+ default:
+ goto tr_stalled;
+ }
+ break;
+ case UR_SYNCH_FRAME:
+ goto tr_valid; /* nop */
+ default:
+ goto tr_stalled;
+ }
+ break;
+
+ case UT_READ_ENDPOINT:
+ switch (req->bRequest) {
+ case UR_GET_STATUS:
+ goto tr_handle_get_ep_status;
+ default:
+ goto tr_stalled;
+ }
+ break;
+
+ case UT_WRITE_INTERFACE:
+ switch (req->bRequest) {
+ case UR_SET_INTERFACE:
+ goto tr_handle_set_interface;
+ case UR_CLEAR_FEATURE:
+ goto tr_valid; /* nop */
+ case UR_SET_FEATURE:
+ default:
+ goto tr_stalled;
+ }
+ break;
+
+ case UT_READ_INTERFACE:
+ switch (req->bRequest) {
+ case UR_GET_INTERFACE:
+ goto tr_handle_get_interface;
+ case UR_GET_STATUS:
+ goto tr_handle_get_iface_status;
+ default:
+ goto tr_stalled;
+ }
+ break;
+
+ case UT_WRITE_CLASS_INTERFACE:
+ case UT_WRITE_VENDOR_INTERFACE:
+ /* XXX forward */
+ break;
+
+ case UT_READ_CLASS_INTERFACE:
+ case UT_READ_VENDOR_INTERFACE:
+ /* XXX forward */
+ break;
+
+ case UT_WRITE_CLASS_DEVICE:
+ switch (req->bRequest) {
+ case UR_CLEAR_FEATURE:
+ goto tr_valid;
+ case UR_SET_DESCRIPTOR:
+ case UR_SET_FEATURE:
+ break;
+ default:
+ goto tr_stalled;
+ }
+ break;
+
+ case UT_WRITE_CLASS_OTHER:
+ switch (req->bRequest) {
+ case UR_CLEAR_FEATURE:
+ goto tr_handle_clear_port_feature;
+ case UR_SET_FEATURE:
+ goto tr_handle_set_port_feature;
+ case UR_CLEAR_TT_BUFFER:
+ case UR_RESET_TT:
+ case UR_STOP_TT:
+ goto tr_valid;
+
+ default:
+ goto tr_stalled;
+ }
+ break;
+
+ case UT_READ_CLASS_OTHER:
+ switch (req->bRequest) {
+ case UR_GET_TT_STATE:
+ goto tr_handle_get_tt_state;
+ case UR_GET_STATUS:
+ goto tr_handle_get_port_status;
+ default:
+ goto tr_stalled;
+ }
+ break;
+
+ case UT_READ_CLASS_DEVICE:
+ switch (req->bRequest) {
+ case UR_GET_DESCRIPTOR:
+ goto tr_handle_get_class_descriptor;
+ case UR_GET_STATUS:
+ goto tr_handle_get_class_status;
+
+ default:
+ goto tr_stalled;
+ }
+ break;
+ default:
+ goto tr_stalled;
+ }
+ goto tr_valid;
+
+tr_handle_get_descriptor:
+ switch (value >> 8) {
+ case UDESC_DEVICE:
+ if (value & 0xff) {
+ goto tr_stalled;
+ }
+ len = sizeof(dwc_otg_devd);
+ ptr = (const void *)&dwc_otg_devd;
+ goto tr_valid;
+ case UDESC_CONFIG:
+ if (value & 0xff) {
+ goto tr_stalled;
+ }
+ len = sizeof(dwc_otg_confd);
+ ptr = (const void *)&dwc_otg_confd;
+ goto tr_valid;
+ case UDESC_STRING:
+ switch (value & 0xff) {
+ case 0: /* Language table */
+ len = sizeof(dwc_otg_langtab);
+ ptr = (const void *)&dwc_otg_langtab;
+ goto tr_valid;
+
+ case 1: /* Vendor */
+ len = sizeof(dwc_otg_vendor);
+ ptr = (const void *)&dwc_otg_vendor;
+ goto tr_valid;
+
+ case 2: /* Product */
+ len = sizeof(dwc_otg_product);
+ ptr = (const void *)&dwc_otg_product;
+ goto tr_valid;
+ default:
+ break;
+ }
+ break;
+ default:
+ goto tr_stalled;
+ }
+ goto tr_stalled;
+
+tr_handle_get_config:
+ len = 1;
+ sc->sc_hub_temp.wValue[0] = sc->sc_conf;
+ goto tr_valid;
+
+tr_handle_get_status:
+ len = 2;
+ USETW(sc->sc_hub_temp.wValue, UDS_SELF_POWERED);
+ goto tr_valid;
+
+tr_handle_set_address:
+ if (value & 0xFF00) {
+ goto tr_stalled;
+ }
+ sc->sc_rt_addr = value;
+ goto tr_valid;
+
+tr_handle_set_config:
+ if (value >= 2) {
+ goto tr_stalled;
+ }
+ sc->sc_conf = value;
+ goto tr_valid;
+
+tr_handle_get_interface:
+ len = 1;
+ sc->sc_hub_temp.wValue[0] = 0;
+ goto tr_valid;
+
+tr_handle_get_tt_state:
+tr_handle_get_class_status:
+tr_handle_get_iface_status:
+tr_handle_get_ep_status:
+ len = 2;
+ USETW(sc->sc_hub_temp.wValue, 0);
+ goto tr_valid;
+
+tr_handle_set_halt:
+tr_handle_set_interface:
+tr_handle_set_wakeup:
+tr_handle_clear_wakeup:
+tr_handle_clear_halt:
+ goto tr_valid;
+
+tr_handle_clear_port_feature:
+ if (index != 1) {
+ goto tr_stalled;
+ }
+ DPRINTFN(9, "UR_CLEAR_PORT_FEATURE on port %d\n", index);
+
+ switch (value) {
+ case UHF_PORT_SUSPEND:
+ dwc_otg_wakeup_peer(sc);
+ break;
+
+ case UHF_PORT_ENABLE:
+ sc->sc_flags.port_enabled = 0;
+ break;
+
+ case UHF_PORT_TEST:
+ case UHF_PORT_INDICATOR:
+ case UHF_C_PORT_ENABLE:
+ case UHF_C_PORT_OVER_CURRENT:
+ case UHF_C_PORT_RESET:
+ /* nops */
+ break;
+ case UHF_PORT_POWER:
+ sc->sc_flags.port_powered = 0;
+ dwc_otg_pull_down(sc);
+ dwc_otg_clocks_off(sc);
+ break;
+ case UHF_C_PORT_CONNECTION:
+ /* clear connect change flag */
+ sc->sc_flags.change_connect = 0;
+
+ if (!sc->sc_flags.status_bus_reset) {
+ /* we are not connected */
+ break;
+ }
+ break;
+ case UHF_C_PORT_SUSPEND:
+ sc->sc_flags.change_suspend = 0;
+ break;
+ default:
+ err = USB_ERR_IOERROR;
+ goto done;
+ }
+ goto tr_valid;
+
+tr_handle_set_port_feature:
+ if (index != 1) {
+ goto tr_stalled;
+ }
+ DPRINTFN(9, "UR_SET_PORT_FEATURE\n");
+
+ switch (value) {
+ case UHF_PORT_ENABLE:
+ sc->sc_flags.port_enabled = 1;
+ break;
+ case UHF_PORT_SUSPEND:
+ case UHF_PORT_RESET:
+ case UHF_PORT_TEST:
+ case UHF_PORT_INDICATOR:
+ /* nops */
+ break;
+ case UHF_PORT_POWER:
+ sc->sc_flags.port_powered = 1;
+ break;
+ default:
+ err = USB_ERR_IOERROR;
+ goto done;
+ }
+ goto tr_valid;
+
+tr_handle_get_port_status:
+
+ DPRINTFN(9, "UR_GET_PORT_STATUS\n");
+
+ if (index != 1) {
+ goto tr_stalled;
+ }
+ if (sc->sc_flags.status_vbus) {
+ dwc_otg_clocks_on(sc);
+ } else {
+ dwc_otg_clocks_off(sc);
+ }
+
+ /* Select Device Side Mode */
+
+ value = UPS_PORT_MODE_DEVICE;
+
+ if (sc->sc_flags.status_high_speed) {
+ value |= UPS_HIGH_SPEED;
+ }
+ if (sc->sc_flags.port_powered) {
+ value |= UPS_PORT_POWER;
+ }
+ if (sc->sc_flags.port_enabled) {
+ value |= UPS_PORT_ENABLED;
+ }
+ if (sc->sc_flags.status_vbus &&
+ sc->sc_flags.status_bus_reset) {
+ value |= UPS_CURRENT_CONNECT_STATUS;
+ }
+ if (sc->sc_flags.status_suspend) {
+ value |= UPS_SUSPEND;
+ }
+ USETW(sc->sc_hub_temp.ps.wPortStatus, value);
+
+ value = 0;
+
+ if (sc->sc_flags.change_connect) {
+ value |= UPS_C_CONNECT_STATUS;
+ }
+ if (sc->sc_flags.change_suspend) {
+ value |= UPS_C_SUSPEND;
+ }
+ USETW(sc->sc_hub_temp.ps.wPortChange, value);
+ len = sizeof(sc->sc_hub_temp.ps);
+ goto tr_valid;
+
+tr_handle_get_class_descriptor:
+ if (value & 0xFF) {
+ goto tr_stalled;
+ }
+ ptr = (const void *)&dwc_otg_hubd;
+ len = sizeof(dwc_otg_hubd);
+ goto tr_valid;
+
+tr_stalled:
+ err = USB_ERR_STALLED;
+tr_valid:
+done:
+ *plength = len;
+ *pptr = ptr;
+ return (err);
+}
+
+static void
+dwc_otg_xfer_setup(struct usb_setup_params *parm)
+{
+ const struct usb_hw_ep_profile *pf;
+ struct usb_xfer *xfer;
+ void *last_obj;
+ uint32_t ntd;
+ uint32_t n;
+ uint8_t ep_no;
+
+ xfer = parm->curr_xfer;
+
+ /*
+ * NOTE: This driver does not use any of the parameters that
+ * are computed from the following values. Just set some
+ * reasonable dummies:
+ */
+ parm->hc_max_packet_size = 0x500;
+ parm->hc_max_packet_count = 1;
+ parm->hc_max_frame_size = 0x500;
+
+ usbd_transfer_setup_sub(parm);
+
+ /*
+ * compute maximum number of TDs
+ */
+ if ((xfer->endpoint->edesc->bmAttributes & UE_XFERTYPE) == UE_CONTROL) {
+
+ ntd = xfer->nframes + 1 /* STATUS */ + 1 /* SYNC 1 */
+ + 1 /* SYNC 2 */ ;
+ } else {
+
+ ntd = xfer->nframes + 1 /* SYNC */ ;
+ }
+
+ /*
+ * check if "usbd_transfer_setup_sub" set an error
+ */
+ if (parm->err)
+ return;
+
+ /*
+ * allocate transfer descriptors
+ */
+ last_obj = NULL;
+
+ /*
+ * get profile stuff
+ */
+ ep_no = xfer->endpointno & UE_ADDR;
+ dwc_otg_get_hw_ep_profile(parm->udev, &pf, ep_no);
+
+ if (pf == NULL) {
+ /* should not happen */
+ parm->err = USB_ERR_INVAL;
+ return;
+ }
+
+ /* align data */
+ parm->size[0] += ((-parm->size[0]) & (USB_HOST_ALIGN - 1));
+
+ for (n = 0; n != ntd; n++) {
+
+ struct dwc_otg_td *td;
+
+ if (parm->buf) {
+
+ td = USB_ADD_BYTES(parm->buf, parm->size[0]);
+
+ /* init TD */
+ td->max_packet_size = xfer->max_packet_size;
+ td->ep_no = ep_no;
+ td->obj_next = last_obj;
+
+ last_obj = td;
+ }
+ parm->size[0] += sizeof(*td);
+ }
+
+ xfer->td_start[0] = last_obj;
+}
+
+static void
+dwc_otg_xfer_unsetup(struct usb_xfer *xfer)
+{
+ return;
+}
+
+static void
+dwc_otg_ep_init(struct usb_device *udev, struct usb_endpoint_descriptor *edesc,
+ struct usb_endpoint *ep)
+{
+ struct dwc_otg_softc *sc = DWC_OTG_BUS2SC(udev->bus);
+
+ DPRINTFN(2, "endpoint=%p, addr=%d, endpt=%d, mode=%d (%d,%d)\n",
+ ep, udev->address,
+ edesc->bEndpointAddress, udev->flags.usb_mode,
+ sc->sc_rt_addr, udev->device_index);
+
+ if (udev->device_index != sc->sc_rt_addr) {
+
+ if (udev->flags.usb_mode != USB_MODE_DEVICE) {
+ /* not supported */
+ return;
+ }
+ if (udev->speed != USB_SPEED_FULL &&
+ udev->speed != USB_SPEED_HIGH) {
+ /* not supported */
+ return;
+ }
+ if ((edesc->bmAttributes & UE_XFERTYPE) == UE_ISOCHRONOUS)
+ ep->methods = &dwc_otg_device_isoc_fs_methods;
+ else
+ ep->methods = &dwc_otg_device_non_isoc_methods;
+ }
+}
+
+static void
+dwc_otg_set_hw_power_sleep(struct usb_bus *bus, uint32_t state)
+{
+ struct dwc_otg_softc *sc = DWC_OTG_BUS2SC(bus);
+
+ switch (state) {
+ case USB_HW_POWER_SUSPEND:
+ dwc_otg_suspend(sc);
+ break;
+ case USB_HW_POWER_SHUTDOWN:
+ dwc_otg_uninit(sc);
+ break;
+ case USB_HW_POWER_RESUME:
+ dwc_otg_resume(sc);
+ break;
+ default:
+ break;
+ }
+}
+
+struct usb_bus_methods dwc_otg_bus_methods =
+{
+ .endpoint_init = &dwc_otg_ep_init,
+ .xfer_setup = &dwc_otg_xfer_setup,
+ .xfer_unsetup = &dwc_otg_xfer_unsetup,
+ .get_hw_ep_profile = &dwc_otg_get_hw_ep_profile,
+ .set_stall = &dwc_otg_set_stall,
+ .clear_stall = &dwc_otg_clear_stall,
+ .roothub_exec = &dwc_otg_roothub_exec,
+ .xfer_poll = &dwc_otg_do_poll,
+ .device_state_change = &dwc_otg_device_state_change,
+ .set_hw_power_sleep = &dwc_otg_set_hw_power_sleep,
+};
diff --git a/sys/dev/usb/controller/dwc_otg.h b/sys/dev/usb/controller/dwc_otg.h
new file mode 100644
index 0000000..cf0ad2f
--- /dev/null
+++ b/sys/dev/usb/controller/dwc_otg.h
@@ -0,0 +1,437 @@
+/* $FreeBSD$ */
+/*-
+ * Copyright (c) 2012 Hans Petter Selasky. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ */
+
+#ifndef _DWC_OTG_H_
+#define _DWC_OTG_H_
+
+#define DWC_OTG_MAX_DEVICES (USB_MIN_DEVICES + 1)
+#define DWC_OTG_FRAME_MASK 0x7FF
+#define DWC_OTG_MAX_TXP 4
+#define DWC_OTG_MAX_TXN (0x200 * DWC_OTG_MAX_TXP)
+
+/* Global CSR registers */
+
+#define DWC_OTG_REG_GOTGCTL 0x0000
+#define DWC_OTG_MSK_GOTGCTL_CHIRP_ON (1U << 27)
+#define DWC_OTG_MSK_GOTGCTL_BSESS_VALID (1U << 19)
+#define DWC_OTG_MSK_GOTGCTL_ASESS_VALID (1U << 18)
+#define DWC_OTG_MSK_GOTGCTL_CONN_ID_STATUS (1U << 16)
+#define DWC_OTG_MSK_GOTGCTL_SESS_REQ (1U << 1)
+#define DWC_OTG_MSK_GOTGCTL_SESS_VALID (1U << 0)
+
+#define DWC_OTG_REG_GOTGINT 0x0004
+#define DWC_OTG_REG_GAHBCFG 0x0008
+#define DWC_OTG_MSK_GAHBCFG_GLOBAL_IRQ (1U << 0)
+
+#define DWC_OTG_REG_GUSBCFG 0x000C
+#define DWC_OTG_MSK_GUSBCFG_FORCE_DEVICE (1U << 30)
+#define DWC_OTG_MSK_GUSBCFG_FORCE_HOST (1U << 29)
+#define DWC_OTG_MSK_GUSBCFG_NO_PULLUP (1U << 27)
+#define DWC_OTG_MSK_GUSBCFG_NO_PULLUP (1U << 27)
+#define DWC_OTG_MSK_GUSBCFG_IC_USB_CAP (1U << 26)
+#define DWC_OTG_MSK_GUSBCFG_ULPI_FS_LS (1U << 17)
+#define DWC_OTG_MSK_GUSBCFG_TRD_TIM(x) (((x) & 15U) << 10)
+#define DWC_OTG_MSK_GUSBCFG_HRP (1U << 9)
+#define DWC_OTG_MSK_GUSBCFG_SRP (1U << 8)
+#define DWC_OTG_MSK_GUSBCFG_HS_PHY (1U << 6)
+#define DWC_OTG_MSK_GUSBCFG_FS_INTF (1U << 5)
+#define DWC_OTG_MSK_GUSBCFG_ULPI_UMTI_SEL (1U << 4)
+#define DWC_OTG_MSK_GUSBCFG_PHY_INTF (1U << 3)
+
+#define DWC_OTG_REG_GRSTCTL 0x0010
+#define DWC_OTG_MSK_GRSTCTL_TXFIFO(n) (((n) & 31U) << 6)
+#define DWC_OTG_MSK_GRSTCTL_TXFFLUSH (1U << 5)
+#define DWC_OTG_MSK_GRSTCTL_RXFFLUSH (1U << 4)
+#define DWC_OTG_MSK_GRSTCTL_FRMCNTRRST (1U << 2)
+#define DWC_OTG_MSK_GRSTCTL_CSFTRST (1U << 0)
+
+#define DWC_OTG_REG_GINTSTS 0x0014
+#define DWC_OTG_REG_GINTMSK 0x0018
+#define DWC_OTG_MSK_GINT_WKUPINT (1U << 31)
+#define DWC_OTG_MSK_GINT_SESSREQINT (1U << 30)
+#define DWC_OTG_MSK_GINT_DISCONNINT (1U << 29)
+#define DWC_OTG_MSK_GINT_CONNIDSTSCHNG (1U << 28)
+#define DWC_OTG_MSK_GINT_LPM (1U << 27)
+#define DWC_OTG_MSK_GINT_PTXFEMP (1U << 26)
+#define DWC_OTG_MSK_GINT_HCHINT (1U << 25)
+#define DWC_OTG_MSK_GINT_PRTINT (1U << 24)
+#define DWC_OTG_MSK_GINT_RESETDET (1U << 23)
+#define DWC_OTG_MSK_GINT_FETSUSP (1U << 22)
+#define DWC_OTG_MSK_GINT_INCOMPL_P (1U << 21)
+#define DWC_OTG_MSK_GINT_INCOMPL_ISO_IN (1U << 20)
+#define DWC_OTG_MSK_GINT_OUTEP (1U << 19)
+#define DWC_OTG_MSK_GINT_INEP (1U << 18)
+#define DWC_OTG_MSK_GINT_EP_MISMATCH (1U << 17)
+#define DWC_OTG_MSK_GINT_RESTORE_DONE (1U << 16)
+#define DWC_OTG_MSK_GINT_EOP_FRAME (1U << 15)
+#define DWC_OTG_MSK_GINT_ISO_OUT_DROP (1U << 14)
+#define DWC_OTG_MSK_GINT_ENUM_DONE (1U << 13)
+#define DWC_OTG_MSK_GINT_USB_RESET (1U << 12)
+#define DWC_OTG_MSK_GINT_USB_SUSPEND (1U << 11)
+#define DWC_OTG_MSK_GINT_EARLY_SUSPEND (1U << 10)
+#define DWC_OTG_MSK_GINT_I2C_INT (1U << 9)
+#define DWC_OTG_MSK_GINT_ULPI_CARKIT (1U << 8)
+#define DWC_OTG_MSK_GINT_GLOBAL_OUT_NAK (1U << 7)
+#define DWC_OTG_MSK_GINT_GLOBAL_IN_NAK (1U << 6)
+#define DWC_OTG_MSK_GINT_NPTXFEMP (1U << 5)
+#define DWC_OTG_MSK_GINT_RXFLVL (1U << 4)
+#define DWC_OTG_MSK_GINT_SOF (1U << 3)
+#define DWC_OTG_MSK_GINT_OTG (1U << 2)
+#define DWC_OTG_MSK_GINT_MODE_MISMATCH (1U << 1)
+#define DWC_OTG_MSK_GINT_CUR_MODE (1U << 0)
+
+#define DWC_OTG_REG_GRXSTSR 0x001C
+#define DWC_OTG_REG_GRXSTSP 0x0020
+#define DWC_OTG_MSK_GRXSTS_PACKET_STS (15U << 17)
+#define DWC_OTG_MSK_GRXSTS_HST_IN_DATA (2U << 17)
+#define DWC_OTG_MSK_GRXSTS_HST_IN_COMPLETE (3U << 17)
+#define DWC_OTG_MSK_GRXSTS_HST_DT_ERROR (5U << 17)
+#define DWC_OTG_MSK_GRXSTS_HST_HALTED (7U << 17)
+#define DWC_OTG_MSK_GRXSTS_DEV_GLOB_OUT_NAK (1U << 17)
+#define DWC_OTG_MSK_GRXSTS_DEV_OUT_DATA (2U << 17)
+#define DWC_OTG_MSK_GRXSTS_DEV_OUT_COMPLETE (3U << 17)
+#define DWC_OTG_MSK_GRXSTS_DEV_STP_COMPLETE (4U << 17)
+#define DWC_OTG_MSK_GRXSTS_DEV_STP_DATA (6U << 17)
+#define DWC_OTG_MSK_GRXSTS_PID (3U << 15)
+#define DWC_OTG_MSK_GRXSTS_PID_DATA0 (0U << 15)
+#define DWC_OTG_MSK_GRXSTS_PID_DATA1 (2U << 15)
+#define DWC_OTG_MSK_GRXSTS_PID_DATA2 (1U << 15)
+#define DWC_OTG_MSK_GRXSTS_PID_MDATA (3U << 15)
+#define DWC_OTG_MSK_GRXSTS_GET_BYTE_CNT(x) (((x) >> 4) & 0x7FFU)
+#define DWC_OTG_MSK_GRXSTS_GET_CHANNEL(x) ((x) & 15U)
+#define DWC_OTG_MSK_GRXSTS_GET_FRNUM (x) (((x) >> 21) & 15U)
+
+#define DWC_OTG_REG_GRXFSIZ 0x0024
+#define DWC_OTG_REG_GNPTXFSIZ 0x0028
+#define DWC_OTG_REG_GNPTXSTS 0x002C
+#define DWC_OTG_REG_GI2CCTL 0x0030
+#define DWC_OTG_REG_GPVNDCTL 0x0034
+#define DWC_OTG_REG_GGPIO 0x0038
+#define DWC_OTG_REG_GUID 0x003C
+#define DWC_OTG_REG_GSNPSID 0x0040
+#define DWC_OTG_REG_GHWCFG1 0x0044
+#define DWC_OTG_MSK_GHWCFG1_GET_DIR(x, n) (((x) >> (2 * (n))) & 3U)
+#define DWC_OTG_MSK_GHWCFG1_BIDIR (0U)
+#define DWC_OTG_MSK_GHWCFG1_IN (1U)
+#define DWC_OTG_MSK_GHWCFG1_OUT (2U)
+#define DWC_OTG_REG_GHWCFG2 0x0048
+#define DWC_OTG_MSK_GHWCFG2_NUM_DEV_EP(x) ((((x) >> 10) & 15) + 1)
+#define DWC_OTG_MSK_GHWCFG2_NUM_HOST_EP(x) ((((x) >> 14) & 15) + 1)
+#define DWC_OTG_REG_GHWCFG3 0x004C
+#define DWC_OTG_MSK_GHWCFG3_GET_DFIFO(x) ((x) >> 16)
+#define DWC_OTG_MSK_GHWCFG3_PKT_SIZE (0x10U << (((x) >> 4) & 7))
+#define DWC_OTG_MSK_GHWCFG3_XFR_SIZE (0x400U << (((x) >> 0) & 15))
+
+#define DWC_OTG_REG_GHWCFG4 0x0050
+#define DWC_OTG_MSK_GHWCFG4_NUM_IN_EPS(x) ((((x) >> 26) & 15U) + 1U)
+#define DWC_OTG_MSK_GHWCFG4_NUM_CTRL_EPS(x) (((x) >> 16) & 15U)
+#define DWC_OTG_MSK_GHWCFG4_NUM_IN_PERIODIC_EPS(x) (((x) >> 0) & 15U)
+
+#define DWC_OTG_REG_GLPMCFG 0x0054
+#define DWC_OTG_MSK_GLPMCFG_HSIC_CONN (1U << 30)
+#define DWC_OTG_REG_GPWRDN 0x0058
+#define DWC_OTG_MSK_GPWRDN_BVALID (1U << 22)
+#define DWC_OTG_MSK_GPWRDN_IDDIG (1U << 21)
+#define DWC_OTG_MSK_GPWRDN_CONNDET_INT (1U << 14)
+#define DWC_OTG_MSK_GPWRDN_CONNDET (1U << 13)
+#define DWC_OTG_MSK_GPWRDN_DISCONN_INT (1U << 12)
+#define DWC_OTG_MSK_GPWRDN_DISCONN (1U << 11)
+#define DWC_OTG_MSK_GPWRDN_RESETDET_INT (1U << 10)
+#define DWC_OTG_MSK_GPWRDN_RESETDET (1U << 9)
+#define DWC_OTG_MSK_GPWRDN_LINESTATE_INT (1U << 8)
+#define DWC_OTG_MSK_GPWRDN_LINESTATE (1U << 7)
+#define DWC_OTG_MSK_GPWRDN_DISABLE_VBUS (1U << 6)
+#define DWC_OTG_MSK_GPWRDN_POWER_DOWN (1U << 5)
+#define DWC_OTG_MSK_GPWRDN_POWER_DOWN_RST (1U << 4)
+#define DWC_OTG_MSK_GPWRDN_POWER_DOWN_CLAMP (1U << 3)
+#define DWC_OTG_MSK_GPWRDN_RESTORE (1U << 2)
+#define DWC_OTG_MSK_GPWRDN_PMU_ACTIVE (1U << 1)
+#define DWC_OTG_MSK_GPWRDN_PMU_IRQ_SEL (1U << 0)
+
+#define DWC_OTG_REG_GDFIFOCFG 0x005C
+#define DWC_OTG_REG_GADPCTL 0x0060
+#define DWC_OTG_REG_HPTXFSIZ 0x0100
+#define DWC_OTG_REG_DPTXFSIZ(n) (0x0100 + (4*(n)))
+#define DWC_OTG_REG_DIEPTXF(n) (0x0100 + (4*(n)))
+
+/* Host Mode CSR registers */
+
+#define DWC_OTG_REG_HCFG 0x0400
+#define DWC_OTG_REG_HFIR 0x0404
+#define DWC_OTG_REG_HFNUM 0x0408
+#define DWC_OTG_REG_HPTXSTS 0x0410
+#define DWC_OTG_REG_HAINT 0x0414
+#define DWC_OTG_REG_HAINTMSK 0x0418
+#define DWC_OTG_REG_HPRT 0x0440
+#define DWC_OTG_REG_HCCHAR(n) (0x0500 + (32*(n)))
+#define DWC_OTG_REG_HCSPLT(n) (0x0504 + (32*(n)))
+#define DWC_OTG_REG_HCINT(n) (0x0508 + (32*(n)))
+#define DWC_OTG_REG_HCINTMSK(n) (0x050C + (32*(n)))
+#define DWC_OTG_REG_HCTSIZ(n) (0x0510 + (32*(n)))
+#define DWC_OTG_REG_HCDMA(n) (0x0514 + (32*(n)))
+#define DWC_OTG_REG_HCDMAB(n) (0x051C + (32*(n)))
+
+/* Device Mode CSR registers */
+
+#define DWC_OTG_REG_DCFG 0x0800
+#define DWC_OTG_MSK_DCFG_SET_DEV_ADDR(x) (((x) & 0x7FU) << 4)
+#define DWC_OTG_MSK_DCFG_SET_DEV_SPEED(x) ((x) & 0x3U)
+#define DWC_OTG_MSK_DCFG_DEV_SPEED_HI (0U)
+#define DWC_OTG_MSK_DCFG_DEV_SPEED_FULL20 (1U)
+#define DWC_OTG_MSK_DCFG_DEV_SPEED_FULL10 (3U)
+
+#define DWC_OTG_REG_DCTL 0x0804
+#define DWC_OTG_MSK_DCTL_PWRON_PROG_DONE (1U << 11)
+#define DWC_OTG_MSK_DCTL_CGOUT_NAK (1U << 10)
+#define DWC_OTG_MSK_DCTL_CGNPIN_NAK (1U << 8)
+#define DWC_OTG_MSK_DCTL_SOFT_DISC (1U << 1)
+#define DWC_OTG_MSK_DCTL_REMOTE_WAKEUP (1U << 0)
+
+#define DWC_OTG_REG_DSTS 0x0808
+#define DWC_OTG_MSK_DSTS_GET_FNUM(x) (((x) >> 8) & 0x3FFF)
+#define DWC_OTG_MSK_DSTS_GET_ENUM_SPEED(x) (((x) >> 1) & 3U)
+#define DWC_OTG_MSK_DSTS_ENUM_SPEED_HI (0U)
+#define DWC_OTG_MSK_DSTS_ENUM_SPEED_FULL20 (1U)
+#define DWC_OTG_MSK_DSTS_ENUM_SPEED_LOW10 (2U)
+#define DWC_OTG_MSK_DSTS_ENUM_SPEED_FULL10 (3U)
+#define DWC_OTG_MSK_DSTS_SUSPEND (1U << 0)
+
+#define DWC_OTG_REG_DIEPMSK 0x0810
+#define DWC_OTG_MSK_DIEP_FIFO_EMPTY (1U << 4)
+#define DWC_OTG_MSK_DIEP_XFER_COMPLETE (1U << 0)
+
+#define DWC_OTG_REG_DOEPMSK 0x0814
+#define DWC_OTG_MSK_DOEP_FIFO_EMPTY (1U << 4)
+#define DWC_OTG_MSK_DOEP_XFER_COMPLETE (1U << 0)
+
+#define DWC_OTG_REG_DAINT 0x0818
+#define DWC_OTG_REG_DAINTMSK 0x081C
+
+#define DWC_OTG_MSK_ENDPOINT(x,in) \
+ ((in) ? (1U << ((x) & 15U)) : \
+ (0x10000U << ((x) & 15U)))
+
+#define DWC_OTG_REG_DTKNQR1 0x0820
+#define DWC_OTG_REG_DTKNQR2 0x0824
+#define DWC_OTG_REG_DTKNQR3 0x0830
+#define DWC_OTG_REG_DTKNQR4 0x0834
+#define DWC_OTG_REG_DVBUSDIS 0x0828
+#define DWC_OTG_REG_DVBUSPULSE 0x082C
+#define DWC_OTG_REG_DTHRCTL 0x0830
+#define DWC_OTG_REG_DIEPEMPMSK 0x0834
+#define DWC_OTG_REG_DEACHINT 0x0838
+#define DWC_OTG_REG_DEACHINTMSK 0x083C
+#define DWC_OTG_REG_DIEPEACHMSK(n) (0x0840 + (4*(n)))
+#define DWC_OTG_MSK_DIEPEACH_XFER_COMPLETE (1U << 0)
+
+#define DWC_OTG_REG_DOEPEACHMSK(n) (0x0880 + (4*(n)))
+#define DWC_OTG_MSK_DOEPEACH_SETUP (1U << 3)
+#define DWC_OTG_MSK_DOEPEACH_XFER_COMPLETE (1U << 0)
+
+#define DWC_OTG_REG_DIEPCTL(n) (0x0900 + (32*(n)))
+#define DWC_OTG_MSK_DIEPCTL_ENABLE (1U << 31)
+#define DWC_OTG_MSK_DIEPCTL_DISABLE (1U << 30)
+#define DWC_OTG_MSK_DIEPCTL_SET_DATA1 (1U << 29) /* non-control */
+#define DWC_OTG_MSK_DIEPCTL_SET_DATA0 (1U << 28) /* non-control */
+#define DWC_OTG_MSK_DIEPCTL_SET_NAK (1U << 27)
+#define DWC_OTG_MSK_DIEPCTL_CLR_NAK (1U << 26)
+#define DWC_OTG_MSK_DIEPCTL_FNUM(n) (((n) & 15U) << 22)
+#define DWC_OTG_MSK_DIEPCTL_STALL (1U << 21)
+#define DWC_OTG_MSK_EP_SET_TYPE(n) (((n) & 3) << 18)
+#define DWC_OTG_MSK_EP_TYPE_CONTROL (0U)
+#define DWC_OTG_MSK_EP_TYPE_ISOC (1U)
+#define DWC_OTG_MSK_EP_TYPE_BULK (2U)
+#define DWC_OTG_MSK_EP_TYPE_INTERRUPT (3U)
+#define DWC_OTG_MSK_DIEPCTL_USB_AEP (1U << 15)
+#define DWC_OTG_MSK_DIEPCTL_MPS_64 (0U << 0) /* control-only */
+#define DWC_OTG_MSK_DIEPCTL_MPS_32 (1U << 0) /* control-only */
+#define DWC_OTG_MSK_DIEPCTL_MPS_16 (2U << 0) /* control-only */
+#define DWC_OTG_MSK_DIEPCTL_MPS_8 (3U << 0) /* control-only */
+#define DWC_OTG_MSK_DIEPCTL_MPS(n) ((n) & 0x7FF) /* non-control */
+
+#define DWC_OTG_REG_DIEPINT(n) (0x0908 + (32*(n)))
+#define DWC_OTG_MSK_DXEPINT_TXFEMP (1U << 7)
+#define DWC_OTG_MSK_DXEPINT_SETUP (1U << 3)
+#define DWC_OTG_MSK_DXEPINT_XFER_COMPL (1U << 0)
+
+#define DWC_OTG_REG_DIEPTSIZ(n) (0x0910 + (32*(n)))
+#define DWC_OTG_MSK_DXEPTSIZ_SET_MULTI(n) (((n) & 3) << 29)
+#define DWC_OTG_MSK_DXEPTSIZ_SET_NPKT(n) (((n) & 0x3FF) << 19)
+#define DWC_OTG_MSK_DXEPTSIZ_GET_NPKT(n) (((n) >> 19) & 0x3FF)
+#define DWC_OTG_MSK_DXEPTSIZ_SET_NBYTES(n) (((n) & 0x7FFFFF) << 0)
+#define DWC_OTG_MSK_DXEPTSIZ_GET_NBYTES(n) (((n) >> 0) & 0x7FFFFF)
+
+#define DWC_OTG_REG_DIEPDMA(n) (0x0914 + (32*(n)))
+#define DWC_OTG_REG_DTXFSTS(n) (0x0918 + (32*(n)))
+#define DWC_OTG_REG_DIEPDMAB0 (0x091C + (32*(n)))
+
+#define DWC_OTG_REG_DOEPCTL(n) (0x0B00 + (32*(n)))
+#define DWC_OTG_MSK_DOEPCTL_ENABLE (1U << 31)
+#define DWC_OTG_MSK_DOEPCTL_DISABLE (1U << 30)
+#define DWC_OTG_MSK_DOEPCTL_SET_DATA1 (1U << 29) /* non-control */
+#define DWC_OTG_MSK_DOEPCTL_SET_DATA0 (1U << 28) /* non-control */
+#define DWC_OTG_MSK_DOEPCTL_SET_NAK (1U << 27)
+#define DWC_OTG_MSK_DOEPCTL_CLR_NAK (1U << 26)
+#define DWC_OTG_MSK_DOEPCTL_FNUM(n) (((n) & 15U) << 22)
+#define DWC_OTG_MSK_DOEPCTL_STALL (1U << 21)
+#define DWC_OTG_MSK_DOEPCTL_EP_TYPE(n) (((n) & 3) << 18)
+#define DWC_OTG_MSK_DOEPCTL_USB_AEP (1U << 15)
+#define DWC_OTG_MSK_DOEPCTL_MPS_64 (0U << 0) /* control-only */
+#define DWC_OTG_MSK_DOEPCTL_MPS_32 (1U << 0) /* control-only */
+#define DWC_OTG_MSK_DOEPCTL_MPS_16 (2U << 0) /* control-only */
+#define DWC_OTG_MSK_DOEPCTL_MPS_8 (3U << 0) /* control-only */
+#define DWC_OTG_MSK_DOEPCTL_MPS(n) ((n) & 0x7FF) /* non-control */
+
+#define DWC_OTG_REG_DOEPINT(n) (0x0B08 + (32*(n)))
+#define DWC_OTG_REG_DOEPTSIZ(n) (0x0B10 + (32*(n)))
+#define DWC_OTG_REG_DOEPDMA(n) (0x0B14 + (32*(n)))
+#define DWC_OTG_REG_DOEPDMAB(n) (0x0B1C + (32*(n)))
+
+/* FIFO access registers */
+
+#define DWC_OTG_REG_DFIFO(n) (0x1000 + (0x1000 * (n)))
+
+/* Power and clock gating CSR */
+
+#define DWC_OTG_REG_PCGCCTL 0x0E00
+
+#define DWC_OTG_READ_4(sc, reg) \
+ bus_space_read_4((sc)->sc_io_tag, (sc)->sc_io_hdl, reg)
+
+#define DWC_OTG_WRITE_4(sc, reg, data) \
+ bus_space_write_4((sc)->sc_io_tag, (sc)->sc_io_hdl, reg, data)
+
+struct dwc_otg_td;
+struct dwc_otg_softc;
+
+typedef uint8_t (dwc_otg_cmd_t)(struct dwc_otg_td *td);
+
+struct dwc_otg_td {
+ struct dwc_otg_td *obj_next;
+ dwc_otg_cmd_t *func;
+ struct usb_page_cache *pc;
+ uint32_t tx_bytes;
+ uint32_t offset;
+ uint32_t remainder;
+ uint16_t max_packet_size; /* packet_size */
+ uint16_t npkt;
+ uint8_t ep_no;
+ uint8_t error:1;
+ uint8_t alt_next:1;
+ uint8_t short_pkt:1;
+ uint8_t did_stall:1;
+};
+
+struct dwc_otg_std_temp {
+ dwc_otg_cmd_t *func;
+ struct usb_page_cache *pc;
+ struct dwc_otg_td *td;
+ struct dwc_otg_td *td_next;
+ uint32_t len;
+ uint32_t offset;
+ uint16_t max_frame_size;
+ uint8_t short_pkt;
+ /*
+ * short_pkt = 0: transfer should be short terminated
+ * short_pkt = 1: transfer should not be short terminated
+ */
+ uint8_t setup_alt_next;
+ uint8_t did_stall;
+ uint8_t bulk_or_control;
+};
+
+struct dwc_otg_config_desc {
+ struct usb_config_descriptor confd;
+ struct usb_interface_descriptor ifcd;
+ struct usb_endpoint_descriptor endpd;
+} __packed;
+
+union dwc_otg_hub_temp {
+ uWord wValue;
+ struct usb_port_status ps;
+};
+
+struct dwc_otg_flags {
+ uint8_t change_connect:1;
+ uint8_t change_suspend:1;
+ uint8_t status_suspend:1; /* set if suspended */
+ uint8_t status_vbus:1; /* set if present */
+ uint8_t status_bus_reset:1; /* set if reset complete */
+ uint8_t status_high_speed:1; /* set if High Speed is selected */
+ uint8_t remote_wakeup:1;
+ uint8_t self_powered:1;
+ uint8_t clocks_off:1;
+ uint8_t port_powered:1;
+ uint8_t port_enabled:1;
+ uint8_t d_pulled_up:1;
+};
+
+struct dwc_otg_profile {
+ struct usb_hw_ep_profile usb;
+ uint16_t max_buffer;
+};
+
+struct dwc_otg_softc {
+ struct usb_bus sc_bus;
+ union dwc_otg_hub_temp sc_hub_temp;
+ struct dwc_otg_profile sc_hw_ep_profile[16];
+
+ struct usb_device *sc_devices[DWC_OTG_MAX_DEVICES];
+ struct resource *sc_io_res;
+ struct resource *sc_irq_res;
+ void *sc_intr_hdl;
+ bus_size_t sc_io_size;
+ bus_space_tag_t sc_io_tag;
+ bus_space_handle_t sc_io_hdl;
+
+ uint32_t sc_rx_bounce_buffer[1024 / 4];
+ uint32_t sc_tx_bounce_buffer[(512 * DWC_OTG_MAX_TXP) / 4];
+
+ uint32_t sc_fifo_size;
+ uint32_t sc_irq_mask;
+ uint32_t sc_last_rx_status;
+ uint32_t sc_out_ctl[16];
+ uint32_t sc_in_ctl[16];
+
+ uint16_t sc_active_out_ep;
+
+ uint8_t sc_dev_ep_max;
+ uint8_t sc_dev_in_ep_max;
+ uint8_t sc_rt_addr; /* root HUB address */
+ uint8_t sc_conf; /* root HUB config */
+
+ uint8_t sc_hub_idata[1];
+
+ struct dwc_otg_flags sc_flags;
+};
+
+/* prototypes */
+
+void dwc_otg_interrupt(struct dwc_otg_softc *);
+int dwc_otg_init(struct dwc_otg_softc *);
+void dwc_otg_uninit(struct dwc_otg_softc *);
+
+#endif /* _DWC_OTG_H_ */
diff --git a/sys/dev/usb/controller/dwc_otg_atmelarm.c b/sys/dev/usb/controller/dwc_otg_atmelarm.c
new file mode 100644
index 0000000..bf75844
--- /dev/null
+++ b/sys/dev/usb/controller/dwc_otg_atmelarm.c
@@ -0,0 +1,199 @@
+/*-
+ * Copyright (c) 2012 Hans Petter Selasky. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/stdint.h>
+#include <sys/stddef.h>
+#include <sys/param.h>
+#include <sys/queue.h>
+#include <sys/types.h>
+#include <sys/systm.h>
+#include <sys/kernel.h>
+#include <sys/bus.h>
+#include <sys/module.h>
+#include <sys/lock.h>
+#include <sys/mutex.h>
+#include <sys/condvar.h>
+#include <sys/sysctl.h>
+#include <sys/sx.h>
+#include <sys/unistd.h>
+#include <sys/callout.h>
+#include <sys/malloc.h>
+#include <sys/priv.h>
+
+#include <dev/usb/usb.h>
+#include <dev/usb/usbdi.h>
+
+#include <dev/usb/usb_core.h>
+#include <dev/usb/usb_busdma.h>
+#include <dev/usb/usb_process.h>
+#include <dev/usb/usb_util.h>
+
+#include <dev/usb/usb_controller.h>
+#include <dev/usb/usb_bus.h>
+
+#include <dev/usb/controller/dwc_otg.h>
+
+static device_probe_t dwc_otg_probe;
+static device_attach_t dwc_otg_attach;
+static device_detach_t dwc_otg_detach;
+
+struct dwc_otg_super_softc {
+ struct dwc_otg_softc sc_otg; /* must be first */
+};
+
+static int
+dwc_otg_probe(device_t dev)
+{
+ device_set_desc(dev, "DWC OTG 2.0 integrated USB controller");
+ return (0);
+}
+
+static int
+dwc_otg_attach(device_t dev)
+{
+ struct dwc_otg_super_softc *sc = device_get_softc(dev);
+ int err;
+ int rid;
+
+ /* initialise some bus fields */
+ sc->sc_otg.sc_bus.parent = dev;
+ sc->sc_otg.sc_bus.devices = sc->sc_otg.sc_devices;
+ sc->sc_otg.sc_bus.devices_max = DWC_OTG_MAX_DEVICES;
+
+ /* get all DMA memory */
+ if (usb_bus_mem_alloc_all(&sc->sc_otg.sc_bus,
+ USB_GET_DMA_TAG(dev), NULL)) {
+ return (ENOMEM);
+ }
+ rid = 0;
+ sc->sc_otg.sc_io_res =
+ bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE);
+
+ if (!(sc->sc_otg.sc_io_res)) {
+ err = ENOMEM;
+ goto error;
+ }
+ sc->sc_otg.sc_io_tag = rman_get_bustag(sc->sc_otg.sc_io_res);
+ sc->sc_otg.sc_io_hdl = rman_get_bushandle(sc->sc_otg.sc_io_res);
+ sc->sc_otg.sc_io_size = rman_get_size(sc->sc_otg.sc_io_res);
+
+ rid = 0;
+ sc->sc_otg.sc_irq_res =
+ bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE);
+ if (sc->sc_otg.sc_irq_res == NULL)
+ goto error;
+
+ sc->sc_otg.sc_bus.bdev = device_add_child(dev, "usbus", -1);
+ if (sc->sc_otg.sc_bus.bdev == NULL)
+ goto error;
+
+ device_set_ivars(sc->sc_otg.sc_bus.bdev, &sc->sc_otg.sc_bus);
+
+ err = bus_setup_intr(dev, sc->sc_otg.sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE,
+ NULL, (driver_intr_t *)dwc_otg_interrupt, sc, &sc->sc_otg.sc_intr_hdl);
+ if (err) {
+ sc->sc_otg.sc_intr_hdl = NULL;
+ goto error;
+ }
+ err = dwc_otg_init(&sc->sc_otg);
+ if (err == 0) {
+ err = device_probe_and_attach(sc->sc_otg.sc_bus.bdev);
+ }
+ if (err)
+ goto error;
+ return (0);
+
+error:
+ dwc_otg_detach(dev);
+ return (ENXIO);
+}
+
+static int
+dwc_otg_detach(device_t dev)
+{
+ struct dwc_otg_super_softc *sc = device_get_softc(dev);
+ device_t bdev;
+ int err;
+
+ if (sc->sc_otg.sc_bus.bdev) {
+ bdev = sc->sc_otg.sc_bus.bdev;
+ device_detach(bdev);
+ device_delete_child(dev, bdev);
+ }
+ /* during module unload there are lots of children leftover */
+ device_delete_children(dev);
+
+ if (sc->sc_otg.sc_irq_res && sc->sc_otg.sc_intr_hdl) {
+ /*
+ * only call dwc_otg_uninit() after dwc_otg_init()
+ */
+ dwc_otg_uninit(&sc->sc_otg);
+
+ err = bus_teardown_intr(dev, sc->sc_otg.sc_irq_res,
+ sc->sc_otg.sc_intr_hdl);
+ sc->sc_otg.sc_intr_hdl = NULL;
+ }
+ /* free IRQ channel, if any */
+ if (sc->sc_otg.sc_irq_res) {
+ bus_release_resource(dev, SYS_RES_IRQ, 0,
+ sc->sc_otg.sc_irq_res);
+ sc->sc_otg.sc_irq_res = NULL;
+ }
+ /* free memory resource, if any */
+ if (sc->sc_otg.sc_io_res) {
+ bus_release_resource(dev, SYS_RES_MEMORY, 0,
+ sc->sc_otg.sc_io_res);
+ sc->sc_otg.sc_io_res = NULL;
+ }
+ usb_bus_mem_free_all(&sc->sc_otg.sc_bus, NULL);
+
+ return (0);
+}
+
+static device_method_t dwc_otg_methods[] = {
+ /* Device interface */
+ DEVMETHOD(device_probe, dwc_otg_probe),
+ DEVMETHOD(device_attach, dwc_otg_attach),
+ DEVMETHOD(device_detach, dwc_otg_detach),
+ DEVMETHOD(device_suspend, bus_generic_suspend),
+ DEVMETHOD(device_resume, bus_generic_resume),
+ DEVMETHOD(device_shutdown, bus_generic_shutdown),
+
+ DEVMETHOD_END
+};
+
+static driver_t dwc_otg_driver = {
+ .name = "dwc_otg",
+ .methods = dwc_otg_methods,
+ .size = sizeof(struct dwc_otg_super_softc),
+};
+
+static devclass_t dwc_otg_devclass;
+
+DRIVER_MODULE(dwcotg, atmelarm, dwc_otg_driver, dwc_otg_devclass, 0, 0);
+MODULE_DEPEND(dwcotg, usb, 1, 1, 1);
diff --git a/sys/dev/usb/controller/ehci.c b/sys/dev/usb/controller/ehci.c
index 7e682f4..f59c801 100644
--- a/sys/dev/usb/controller/ehci.c
+++ b/sys/dev/usb/controller/ehci.c
@@ -188,7 +188,7 @@ ehci_reset(ehci_softc_t *sc)
EOWRITE4(sc, EHCI_USBCMD, EHCI_CMD_HCRESET);
for (i = 0; i < 100; i++) {
- usb_pause_mtx(NULL, hz / 1000);
+ usb_pause_mtx(NULL, hz / 128);
hcr = EOREAD4(sc, EHCI_USBCMD) & EHCI_CMD_HCRESET;
if (!hcr) {
if (sc->sc_flags & (EHCI_SCFLG_SETMODE | EHCI_SCFLG_BIGEMMIO)) {
@@ -212,7 +212,7 @@ ehci_reset(ehci_softc_t *sc)
return (0);
}
}
- device_printf(sc->sc_bus.bdev, "reset timeout\n");
+ device_printf(sc->sc_bus.bdev, "Reset timeout\n");
return (USB_ERR_IOERROR);
}
@@ -224,7 +224,7 @@ ehci_hcreset(ehci_softc_t *sc)
EOWRITE4(sc, EHCI_USBCMD, 0); /* Halt controller */
for (i = 0; i < 100; i++) {
- usb_pause_mtx(NULL, hz / 1000);
+ usb_pause_mtx(NULL, hz / 128);
hcr = EOREAD4(sc, EHCI_USBSTS) & EHCI_STS_HCH;
if (hcr)
break;
@@ -237,7 +237,60 @@ ehci_hcreset(ehci_softc_t *sc)
*/
device_printf(sc->sc_bus.bdev, "stop timeout\n");
- return ehci_reset(sc);
+ return (ehci_reset(sc));
+}
+
+static int
+ehci_init_sub(struct ehci_softc *sc)
+{
+ struct usb_page_search buf_res;
+ uint32_t cparams;
+ uint32_t hcr;
+ uint8_t i;
+
+ cparams = EREAD4(sc, EHCI_HCCPARAMS);
+
+ DPRINTF("cparams=0x%x\n", cparams);
+
+ if (EHCI_HCC_64BIT(cparams)) {
+ DPRINTF("HCC uses 64-bit structures\n");
+
+ /* MUST clear segment register if 64 bit capable */
+ EWRITE4(sc, EHCI_CTRLDSSEGMENT, 0);
+ }
+
+ usbd_get_page(&sc->sc_hw.pframes_pc, 0, &buf_res);
+ EOWRITE4(sc, EHCI_PERIODICLISTBASE, buf_res.physaddr);
+
+ usbd_get_page(&sc->sc_hw.async_start_pc, 0, &buf_res);
+ EOWRITE4(sc, EHCI_ASYNCLISTADDR, buf_res.physaddr | EHCI_LINK_QH);
+
+ /* enable interrupts */
+ EOWRITE4(sc, EHCI_USBINTR, sc->sc_eintrs);
+
+ /* turn on controller */
+ EOWRITE4(sc, EHCI_USBCMD,
+ EHCI_CMD_ITC_1 | /* 1 microframes interrupt delay */
+ (EOREAD4(sc, EHCI_USBCMD) & EHCI_CMD_FLS_M) |
+ EHCI_CMD_ASE |
+ EHCI_CMD_PSE |
+ EHCI_CMD_RS);
+
+ /* Take over port ownership */
+ EOWRITE4(sc, EHCI_CONFIGFLAG, EHCI_CONF_CF);
+
+ for (i = 0; i < 100; i++) {
+ usb_pause_mtx(NULL, hz / 128);
+ hcr = EOREAD4(sc, EHCI_USBSTS) & EHCI_STS_HCH;
+ if (!hcr) {
+ break;
+ }
+ }
+ if (hcr) {
+ device_printf(sc->sc_bus.bdev, "Run timeout\n");
+ return (USB_ERR_IOERROR);
+ }
+ return (USB_ERR_NORMAL_COMPLETION);
}
usb_error_t
@@ -246,8 +299,6 @@ ehci_init(ehci_softc_t *sc)
struct usb_page_search buf_res;
uint32_t version;
uint32_t sparams;
- uint32_t cparams;
- uint32_t hcr;
uint16_t i;
uint16_t x;
uint16_t y;
@@ -279,15 +330,6 @@ ehci_init(ehci_softc_t *sc)
DPRINTF("sparams=0x%x\n", sparams);
sc->sc_noport = EHCI_HCS_N_PORTS(sparams);
- cparams = EREAD4(sc, EHCI_HCCPARAMS);
- DPRINTF("cparams=0x%x\n", cparams);
-
- if (EHCI_HCC_64BIT(cparams)) {
- DPRINTF("HCC uses 64-bit structures\n");
-
- /* MUST clear segment register if 64 bit capable */
- EWRITE4(sc, EHCI_CTRLDSSEGMENT, 0);
- }
sc->sc_bus.usbrev = USB_REV_2_0;
/* Reset the controller */
@@ -464,9 +506,6 @@ ehci_init(ehci_softc_t *sc)
[i & (EHCI_VIRTUAL_FRAMELIST_COUNT - 1)]->itd_self;
}
}
- /* setup sync list pointer */
- EOWRITE4(sc, EHCI_PERIODICLISTBASE, buf_res.physaddr);
-
usbd_get_page(&sc->sc_hw.async_start_pc, 0, &buf_res);
if (1) {
@@ -511,35 +550,8 @@ ehci_init(ehci_softc_t *sc)
}
#endif
- /* setup async list pointer */
- EOWRITE4(sc, EHCI_ASYNCLISTADDR, buf_res.physaddr | EHCI_LINK_QH);
-
-
- /* enable interrupts */
- EOWRITE4(sc, EHCI_USBINTR, sc->sc_eintrs);
-
- /* turn on controller */
- EOWRITE4(sc, EHCI_USBCMD,
- EHCI_CMD_ITC_1 | /* 1 microframes interrupt delay */
- (EOREAD4(sc, EHCI_USBCMD) & EHCI_CMD_FLS_M) |
- EHCI_CMD_ASE |
- EHCI_CMD_PSE |
- EHCI_CMD_RS);
-
- /* Take over port ownership */
- EOWRITE4(sc, EHCI_CONFIGFLAG, EHCI_CONF_CF);
-
- for (i = 0; i < 100; i++) {
- usb_pause_mtx(NULL, hz / 1000);
- hcr = EOREAD4(sc, EHCI_USBSTS) & EHCI_STS_HCH;
- if (!hcr) {
- break;
- }
- }
- if (hcr) {
- device_printf(sc->sc_bus.bdev, "run timeout\n");
- return (USB_ERR_IOERROR);
- }
+ /* finial setup */
+ err = ehci_init_sub(sc);
if (!err) {
/* catch any lost interrupts */
@@ -573,137 +585,28 @@ ehci_detach(ehci_softc_t *sc)
usb_callout_drain(&sc->sc_tmo_poll);
}
-void
+static void
ehci_suspend(ehci_softc_t *sc)
{
- uint32_t cmd;
- uint32_t hcr;
- uint8_t i;
-
- USB_BUS_LOCK(&sc->sc_bus);
-
- for (i = 1; i <= sc->sc_noport; i++) {
- cmd = EOREAD4(sc, EHCI_PORTSC(i));
- if (((cmd & EHCI_PS_PO) == 0) &&
- ((cmd & EHCI_PS_PE) == EHCI_PS_PE)) {
- EOWRITE4(sc, EHCI_PORTSC(i),
- cmd | EHCI_PS_SUSP);
- }
- }
-
- sc->sc_cmd = EOREAD4(sc, EHCI_USBCMD);
-
- cmd = sc->sc_cmd & ~(EHCI_CMD_ASE | EHCI_CMD_PSE);
- EOWRITE4(sc, EHCI_USBCMD, cmd);
-
- for (i = 0; i < 100; i++) {
- hcr = EOREAD4(sc, EHCI_USBSTS) &
- (EHCI_STS_ASS | EHCI_STS_PSS);
-
- if (hcr == 0) {
- break;
- }
- usb_pause_mtx(&sc->sc_bus.bus_mtx, hz / 1000);
- }
-
- if (hcr != 0) {
- device_printf(sc->sc_bus.bdev, "reset timeout\n");
- }
- cmd &= ~EHCI_CMD_RS;
- EOWRITE4(sc, EHCI_USBCMD, cmd);
-
- for (i = 0; i < 100; i++) {
- hcr = EOREAD4(sc, EHCI_USBSTS) & EHCI_STS_HCH;
- if (hcr == EHCI_STS_HCH) {
- break;
- }
- usb_pause_mtx(&sc->sc_bus.bus_mtx, hz / 1000);
- }
+ DPRINTF("stopping the HC\n");
- if (hcr != EHCI_STS_HCH) {
- device_printf(sc->sc_bus.bdev,
- "config timeout\n");
- }
- USB_BUS_UNLOCK(&sc->sc_bus);
+ /* reset HC */
+ ehci_hcreset(sc);
}
-void
+static void
ehci_resume(ehci_softc_t *sc)
{
- struct usb_page_search buf_res;
- uint32_t cmd;
- uint32_t hcr;
- uint8_t i;
-
- USB_BUS_LOCK(&sc->sc_bus);
-
- /* restore things in case the bios doesn't */
- EOWRITE4(sc, EHCI_CTRLDSSEGMENT, 0);
-
- usbd_get_page(&sc->sc_hw.pframes_pc, 0, &buf_res);
- EOWRITE4(sc, EHCI_PERIODICLISTBASE, buf_res.physaddr);
+ /* reset HC */
+ ehci_hcreset(sc);
- usbd_get_page(&sc->sc_hw.async_start_pc, 0, &buf_res);
- EOWRITE4(sc, EHCI_ASYNCLISTADDR, buf_res.physaddr | EHCI_LINK_QH);
-
- EOWRITE4(sc, EHCI_USBINTR, sc->sc_eintrs);
-
- hcr = 0;
- for (i = 1; i <= sc->sc_noport; i++) {
- cmd = EOREAD4(sc, EHCI_PORTSC(i));
- if (((cmd & EHCI_PS_PO) == 0) &&
- ((cmd & EHCI_PS_SUSP) == EHCI_PS_SUSP)) {
- EOWRITE4(sc, EHCI_PORTSC(i),
- cmd | EHCI_PS_FPR);
- hcr = 1;
- }
- }
-
- if (hcr) {
- usb_pause_mtx(&sc->sc_bus.bus_mtx,
- USB_MS_TO_TICKS(USB_RESUME_WAIT));
-
- for (i = 1; i <= sc->sc_noport; i++) {
- cmd = EOREAD4(sc, EHCI_PORTSC(i));
- if (((cmd & EHCI_PS_PO) == 0) &&
- ((cmd & EHCI_PS_SUSP) == EHCI_PS_SUSP)) {
- EOWRITE4(sc, EHCI_PORTSC(i),
- cmd & ~EHCI_PS_FPR);
- }
- }
- }
- EOWRITE4(sc, EHCI_USBCMD, sc->sc_cmd);
-
- for (i = 0; i < 100; i++) {
- hcr = EOREAD4(sc, EHCI_USBSTS) & EHCI_STS_HCH;
- if (hcr != EHCI_STS_HCH) {
- break;
- }
- usb_pause_mtx(&sc->sc_bus.bus_mtx, hz / 1000);
- }
- if (hcr == EHCI_STS_HCH) {
- device_printf(sc->sc_bus.bdev, "config timeout\n");
- }
-
- USB_BUS_UNLOCK(&sc->sc_bus);
-
- usb_pause_mtx(NULL,
- USB_MS_TO_TICKS(USB_RESUME_WAIT));
+ /* setup HC */
+ ehci_init_sub(sc);
/* catch any lost interrupts */
ehci_do_poll(&sc->sc_bus);
}
-void
-ehci_shutdown(ehci_softc_t *sc)
-{
- DPRINTF("stopping the HC\n");
-
- if (ehci_hcreset(sc)) {
- DPRINTF("reset failed!\n");
- }
-}
-
#ifdef USB_DEBUG
static void
ehci_dump_regs(ehci_softc_t *sc)
@@ -3908,8 +3811,24 @@ ehci_device_suspend(struct usb_device *udev)
}
USB_BUS_UNLOCK(udev->bus);
+}
- return;
+static void
+ehci_set_hw_power_sleep(struct usb_bus *bus, uint32_t state)
+{
+ struct ehci_softc *sc = EHCI_BUS2SC(bus);
+
+ switch (state) {
+ case USB_HW_POWER_SUSPEND:
+ case USB_HW_POWER_SHUTDOWN:
+ ehci_suspend(sc);
+ break;
+ case USB_HW_POWER_RESUME:
+ ehci_resume(sc);
+ break;
+ default:
+ break;
+ }
}
static void
@@ -3955,6 +3874,7 @@ struct usb_bus_methods ehci_bus_methods =
.device_resume = ehci_device_resume,
.device_suspend = ehci_device_suspend,
.set_hw_power = ehci_set_hw_power,
+ .set_hw_power_sleep = ehci_set_hw_power_sleep,
.roothub_exec = ehci_roothub_exec,
.xfer_poll = ehci_do_poll,
};
diff --git a/sys/dev/usb/controller/ehci.h b/sys/dev/usb/controller/ehci.h
index a8aa514..b8b6985 100644
--- a/sys/dev/usb/controller/ehci.h
+++ b/sys/dev/usb/controller/ehci.h
@@ -333,8 +333,6 @@ typedef struct ehci_softc {
uint32_t sc_terminate_self; /* TD short packet termination pointer */
uint32_t sc_eintrs;
- uint32_t sc_cmd; /* shadow of cmd register during
- * suspend */
uint16_t sc_intr_stat[EHCI_VIRTUAL_FRAMELIST_COUNT];
uint16_t sc_id_vendor; /* vendor ID for root hub */
@@ -445,9 +443,6 @@ usb_bus_mem_cb_t ehci_iterate_hw_softc;
usb_error_t ehci_reset(ehci_softc_t *sc);
usb_error_t ehci_init(ehci_softc_t *sc);
void ehci_detach(struct ehci_softc *sc);
-void ehci_suspend(struct ehci_softc *sc);
-void ehci_resume(struct ehci_softc *sc);
-void ehci_shutdown(ehci_softc_t *sc);
void ehci_interrupt(ehci_softc_t *sc);
#endif /* _EHCI_H_ */
diff --git a/sys/dev/usb/controller/ehci_ixp4xx.c b/sys/dev/usb/controller/ehci_ixp4xx.c
index 7327fde..45113d9 100644
--- a/sys/dev/usb/controller/ehci_ixp4xx.c
+++ b/sys/dev/usb/controller/ehci_ixp4xx.c
@@ -78,9 +78,6 @@ struct ixp_ehci_softc {
static device_attach_t ehci_ixp_attach;
static device_detach_t ehci_ixp_detach;
-static device_shutdown_t ehci_ixp_shutdown;
-static device_suspend_t ehci_ixp_suspend;
-static device_resume_t ehci_ixp_resume;
static uint8_t ehci_bs_r_1(void *, bus_space_handle_t, bus_size_t);
static void ehci_bs_w_1(void *, bus_space_handle_t, bus_size_t, u_int8_t);
@@ -90,45 +87,6 @@ static uint32_t ehci_bs_r_4(void *, bus_space_handle_t, bus_size_t);
static void ehci_bs_w_4(void *, bus_space_handle_t, bus_size_t, uint32_t);
static int
-ehci_ixp_suspend(device_t self)
-{
- ehci_softc_t *sc = device_get_softc(self);
- int err;
-
- err = bus_generic_suspend(self);
- if (err)
- return (err);
- ehci_suspend(sc);
- return (0);
-}
-
-static int
-ehci_ixp_resume(device_t self)
-{
- ehci_softc_t *sc = device_get_softc(self);
-
- ehci_resume(sc);
-
- bus_generic_resume(self);
-
- return (0);
-}
-
-static int
-ehci_ixp_shutdown(device_t self)
-{
- ehci_softc_t *sc = device_get_softc(self);
- int err;
-
- err = bus_generic_shutdown(self);
- if (err)
- return (err);
- ehci_shutdown(sc);
-
- return (0);
-}
-
-static int
ehci_ixp_probe(device_t self)
{
@@ -335,9 +293,9 @@ static device_method_t ehci_methods[] = {
DEVMETHOD(device_probe, ehci_ixp_probe),
DEVMETHOD(device_attach, ehci_ixp_attach),
DEVMETHOD(device_detach, ehci_ixp_detach),
- DEVMETHOD(device_suspend, ehci_ixp_suspend),
- DEVMETHOD(device_resume, ehci_ixp_resume),
- DEVMETHOD(device_shutdown, ehci_ixp_shutdown),
+ DEVMETHOD(device_suspend, bus_generic_suspend),
+ DEVMETHOD(device_resume, bus_generic_resume),
+ DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD_END
};
diff --git a/sys/dev/usb/controller/ehci_mv.c b/sys/dev/usb/controller/ehci_mv.c
index f12cb14..a47e253 100644
--- a/sys/dev/usb/controller/ehci_mv.c
+++ b/sys/dev/usb/controller/ehci_mv.c
@@ -81,9 +81,6 @@ __FBSDID("$FreeBSD$");
static device_attach_t mv_ehci_attach;
static device_detach_t mv_ehci_detach;
-static device_shutdown_t mv_ehci_shutdown;
-static device_suspend_t mv_ehci_suspend;
-static device_resume_t mv_ehci_resume;
static int err_intr(void *arg);
@@ -103,45 +100,6 @@ static void *ih_err;
#define MV_USB_DEVICE_UNDERFLOW (1 << 3)
static int
-mv_ehci_suspend(device_t self)
-{
- ehci_softc_t *sc = device_get_softc(self);
- int err;
-
- err = bus_generic_suspend(self);
- if (err)
- return (err);
- ehci_suspend(sc);
- return (0);
-}
-
-static int
-mv_ehci_resume(device_t self)
-{
- ehci_softc_t *sc = device_get_softc(self);
-
- ehci_resume(sc);
-
- bus_generic_resume(self);
-
- return (0);
-}
-
-static int
-mv_ehci_shutdown(device_t self)
-{
- ehci_softc_t *sc = device_get_softc(self);
- int err;
-
- err = bus_generic_shutdown(self);
- if (err)
- return (err);
- ehci_shutdown(sc);
-
- return (0);
-}
-
-static int
mv_ehci_probe(device_t self)
{
@@ -372,9 +330,9 @@ static device_method_t ehci_methods[] = {
DEVMETHOD(device_probe, mv_ehci_probe),
DEVMETHOD(device_attach, mv_ehci_attach),
DEVMETHOD(device_detach, mv_ehci_detach),
- DEVMETHOD(device_suspend, mv_ehci_suspend),
- DEVMETHOD(device_resume, mv_ehci_resume),
- DEVMETHOD(device_shutdown, mv_ehci_shutdown),
+ DEVMETHOD(device_suspend, bus_generic_suspend),
+ DEVMETHOD(device_resume, bus_generic_resume),
+ DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD_END
};
diff --git a/sys/dev/usb/controller/ehci_pci.c b/sys/dev/usb/controller/ehci_pci.c
index 8c19b2a..e293ec8 100644
--- a/sys/dev/usb/controller/ehci_pci.c
+++ b/sys/dev/usb/controller/ehci_pci.c
@@ -77,6 +77,7 @@ __FBSDID("$FreeBSD$");
#include <dev/usb/usb_pci.h>
#include <dev/usb/controller/ehci.h>
#include <dev/usb/controller/ehcireg.h>
+#include "usb_if.h"
#define PCI_EHCI_VENDORID_ACERLABS 0x10b9
#define PCI_EHCI_VENDORID_AMD 0x1022
@@ -92,54 +93,10 @@ __FBSDID("$FreeBSD$");
#define PCI_EHCI_VENDORID_NVIDIA2 0x10DE
#define PCI_EHCI_VENDORID_VIA 0x1106
-static void ehci_pci_takecontroller(device_t self);
-
static device_probe_t ehci_pci_probe;
static device_attach_t ehci_pci_attach;
static device_detach_t ehci_pci_detach;
-static device_suspend_t ehci_pci_suspend;
-static device_resume_t ehci_pci_resume;
-static device_shutdown_t ehci_pci_shutdown;
-
-static int
-ehci_pci_suspend(device_t self)
-{
- ehci_softc_t *sc = device_get_softc(self);
- int err;
-
- err = bus_generic_suspend(self);
- if (err)
- return (err);
- ehci_suspend(sc);
- return (0);
-}
-
-static int
-ehci_pci_resume(device_t self)
-{
- ehci_softc_t *sc = device_get_softc(self);
-
- ehci_pci_takecontroller(self);
- ehci_resume(sc);
-
- bus_generic_resume(self);
-
- return (0);
-}
-
-static int
-ehci_pci_shutdown(device_t self)
-{
- ehci_softc_t *sc = device_get_softc(self);
- int err;
-
- err = bus_generic_shutdown(self);
- if (err)
- return (err);
- ehci_shutdown(sc);
-
- return (0);
-}
+static usb_take_controller_t ehci_pci_take_controller;
static const char *
ehci_pci_match(device_t self)
@@ -418,7 +375,7 @@ ehci_pci_attach(device_t self)
sc->sc_intr_hdl = NULL;
goto error;
}
- ehci_pci_takecontroller(self);
+ ehci_pci_take_controller(self);
/* Undocumented quirks taken from Linux */
@@ -530,8 +487,8 @@ ehci_pci_detach(device_t self)
return (0);
}
-static void
-ehci_pci_takecontroller(device_t self)
+static int
+ehci_pci_take_controller(device_t self)
{
ehci_softc_t *sc = device_get_softc(self);
uint32_t cparams;
@@ -573,22 +530,25 @@ ehci_pci_takecontroller(device_t self)
usb_pause_mtx(NULL, hz / 100); /* wait 10ms */
}
}
+ return (0);
}
-static driver_t ehci_driver =
-{
+static device_method_t ehci_pci_methods[] = {
+ /* Device interface */
+ DEVMETHOD(device_probe, ehci_pci_probe),
+ DEVMETHOD(device_attach, ehci_pci_attach),
+ DEVMETHOD(device_detach, ehci_pci_detach),
+ DEVMETHOD(device_suspend, bus_generic_suspend),
+ DEVMETHOD(device_resume, bus_generic_resume),
+ DEVMETHOD(device_shutdown, bus_generic_shutdown),
+ DEVMETHOD(usb_take_controller, ehci_pci_take_controller),
+
+ DEVMETHOD_END
+};
+
+static driver_t ehci_driver = {
.name = "ehci",
- .methods = (device_method_t[]){
- /* device interface */
- DEVMETHOD(device_probe, ehci_pci_probe),
- DEVMETHOD(device_attach, ehci_pci_attach),
- DEVMETHOD(device_detach, ehci_pci_detach),
- DEVMETHOD(device_suspend, ehci_pci_suspend),
- DEVMETHOD(device_resume, ehci_pci_resume),
- DEVMETHOD(device_shutdown, ehci_pci_shutdown),
-
- DEVMETHOD_END
- },
+ .methods = ehci_pci_methods,
.size = sizeof(struct ehci_softc),
};
diff --git a/sys/dev/usb/controller/musb_otg.c b/sys/dev/usb/controller/musb_otg.c
index be32b2b..d463052 100644
--- a/sys/dev/usb/controller/musb_otg.c
+++ b/sys/dev/usb/controller/musb_otg.c
@@ -1910,16 +1910,16 @@ musbotg_uninit(struct musbotg_softc *sc)
USB_BUS_UNLOCK(&sc->sc_bus);
}
-void
+static void
musbotg_suspend(struct musbotg_softc *sc)
{
- return;
+ /* TODO */
}
-void
+static void
musbotg_resume(struct musbotg_softc *sc)
{
- return;
+ /* TODO */
}
static void
@@ -2776,6 +2776,26 @@ musbotg_ep_init(struct usb_device *udev, struct usb_endpoint_descriptor *edesc,
}
}
+static void
+musbotg_set_hw_power_sleep(struct usb_bus *bus, uint32_t state)
+{
+ struct musbotg_softc *sc = MUSBOTG_BUS2SC(bus);
+
+ switch (state) {
+ case USB_HW_POWER_SUSPEND:
+ musbotg_suspend(sc);
+ break;
+ case USB_HW_POWER_SHUTDOWN:
+ musbotg_uninit(sc);
+ break;
+ case USB_HW_POWER_RESUME:
+ musbotg_resume(sc);
+ break;
+ default:
+ break;
+ }
+}
+
struct usb_bus_methods musbotg_bus_methods =
{
.endpoint_init = &musbotg_ep_init,
@@ -2786,4 +2806,5 @@ struct usb_bus_methods musbotg_bus_methods =
.clear_stall = &musbotg_clear_stall,
.roothub_exec = &musbotg_roothub_exec,
.xfer_poll = &musbotg_do_poll,
+ .set_hw_power_sleep = &musbotg_set_hw_power_sleep,
};
diff --git a/sys/dev/usb/controller/musb_otg.h b/sys/dev/usb/controller/musb_otg.h
index e8eafca..3b889a9 100644
--- a/sys/dev/usb/controller/musb_otg.h
+++ b/sys/dev/usb/controller/musb_otg.h
@@ -398,8 +398,6 @@ struct musbotg_softc {
usb_error_t musbotg_init(struct musbotg_softc *sc);
void musbotg_uninit(struct musbotg_softc *sc);
-void musbotg_suspend(struct musbotg_softc *sc);
-void musbotg_resume(struct musbotg_softc *sc);
void musbotg_interrupt(struct musbotg_softc *sc);
void musbotg_vbus_interrupt(struct musbotg_softc *sc, uint8_t is_on);
diff --git a/sys/dev/usb/controller/musb_otg_atmelarm.c b/sys/dev/usb/controller/musb_otg_atmelarm.c
index b301e09..bb3e60a 100644
--- a/sys/dev/usb/controller/musb_otg_atmelarm.c
+++ b/sys/dev/usb/controller/musb_otg_atmelarm.c
@@ -62,7 +62,6 @@ __FBSDID("$FreeBSD$");
static device_probe_t musbotg_probe;
static device_attach_t musbotg_attach;
static device_detach_t musbotg_detach;
-static device_shutdown_t musbotg_shutdown;
struct musbotg_super_softc {
struct musbotg_softc sc_otg; /* must be first */
@@ -218,35 +217,22 @@ musbotg_detach(device_t dev)
return (0);
}
-static int
-musbotg_shutdown(device_t dev)
-{
- struct musbotg_super_softc *sc = device_get_softc(dev);
- int err;
-
- err = bus_generic_shutdown(dev);
- if (err)
- return (err);
-
- musbotg_uninit(&sc->sc_otg);
-
- return (0);
-}
-
static device_method_t musbotg_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, musbotg_probe),
DEVMETHOD(device_attach, musbotg_attach),
DEVMETHOD(device_detach, musbotg_detach),
- DEVMETHOD(device_shutdown, musbotg_shutdown),
+ DEVMETHOD(device_suspend, bus_generic_suspend),
+ DEVMETHOD(device_resume, bus_generic_resume),
+ DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD_END
};
static driver_t musbotg_driver = {
- "musbotg",
- musbotg_methods,
- sizeof(struct musbotg_super_softc),
+ .name = "musbotg",
+ .methods = musbotg_methods,
+ .size = sizeof(struct musbotg_super_softc),
};
static devclass_t musbotg_devclass;
diff --git a/sys/dev/usb/controller/ohci.c b/sys/dev/usb/controller/ohci.c
index fa2d607..93c2bb2 100644
--- a/sys/dev/usb/controller/ohci.c
+++ b/sys/dev/usb/controller/ohci.c
@@ -166,7 +166,7 @@ ohci_iterate_hw_softc(struct usb_bus *bus, usb_bus_mem_sub_cb_t *cb)
}
static usb_error_t
-ohci_controller_init(ohci_softc_t *sc)
+ohci_controller_init(ohci_softc_t *sc, int do_suspend)
{
struct usb_page_search buf_res;
uint32_t i;
@@ -233,6 +233,11 @@ reset:
}
#endif
+ if (do_suspend) {
+ OWRITE4(sc, OHCI_CONTROL, OHCI_HCFS_SUSPEND);
+ return (USB_ERR_NORMAL_COMPLETION);
+ }
+
/* The controller is now in SUSPEND state, we have 2ms to finish. */
/* set up HC registers */
@@ -415,13 +420,12 @@ ohci_init(ohci_softc_t *sc)
sc->sc_bus.usbrev = USB_REV_1_0;
- if (ohci_controller_init(sc)) {
+ if (ohci_controller_init(sc, 0) != 0)
return (USB_ERR_INVAL);
- } else {
- /* catch any lost interrupts */
- ohci_do_poll(&sc->sc_bus);
- return (USB_ERR_NORMAL_COMPLETION);
- }
+
+ /* catch any lost interrupts */
+ ohci_do_poll(&sc->sc_bus);
+ return (USB_ERR_NORMAL_COMPLETION);
}
/*
@@ -445,75 +449,32 @@ ohci_detach(struct ohci_softc *sc)
usb_callout_drain(&sc->sc_tmo_rhsc);
}
-/* NOTE: suspend/resume is called from
- * interrupt context and cannot sleep!
- */
-void
+static void
ohci_suspend(ohci_softc_t *sc)
{
- uint32_t ctl;
-
- USB_BUS_LOCK(&sc->sc_bus);
+ DPRINTF("\n");
#ifdef USB_DEBUG
- DPRINTF("\n");
- if (ohcidebug > 2) {
+ if (ohcidebug > 2)
ohci_dumpregs(sc);
- }
#endif
- ctl = OREAD4(sc, OHCI_CONTROL) & ~OHCI_HCFS_MASK;
- if (sc->sc_control == 0) {
- /*
- * Preserve register values, in case that APM BIOS
- * does not recover them.
- */
- sc->sc_control = ctl;
- sc->sc_intre = OREAD4(sc, OHCI_INTERRUPT_ENABLE);
- }
- ctl |= OHCI_HCFS_SUSPEND;
- OWRITE4(sc, OHCI_CONTROL, ctl);
-
- usb_pause_mtx(&sc->sc_bus.bus_mtx,
- USB_MS_TO_TICKS(USB_RESUME_WAIT));
-
- USB_BUS_UNLOCK(&sc->sc_bus);
+ /* reset HC and leave it suspended */
+ ohci_controller_init(sc, 1);
}
-void
+static void
ohci_resume(ohci_softc_t *sc)
{
- uint32_t ctl;
+ DPRINTF("\n");
#ifdef USB_DEBUG
- DPRINTF("\n");
- if (ohcidebug > 2) {
+ if (ohcidebug > 2)
ohci_dumpregs(sc);
- }
#endif
- /* some broken BIOSes never initialize the Controller chip */
- ohci_controller_init(sc);
-
- USB_BUS_LOCK(&sc->sc_bus);
- if (sc->sc_intre) {
- OWRITE4(sc, OHCI_INTERRUPT_ENABLE,
- sc->sc_intre & (OHCI_ALL_INTRS | OHCI_MIE));
- }
- if (sc->sc_control)
- ctl = sc->sc_control;
- else
- ctl = OREAD4(sc, OHCI_CONTROL);
- ctl |= OHCI_HCFS_RESUME;
- OWRITE4(sc, OHCI_CONTROL, ctl);
- usb_pause_mtx(&sc->sc_bus.bus_mtx,
- USB_MS_TO_TICKS(USB_RESUME_DELAY));
- ctl = (ctl & ~OHCI_HCFS_MASK) | OHCI_HCFS_OPERATIONAL;
- OWRITE4(sc, OHCI_CONTROL, ctl);
- usb_pause_mtx(&sc->sc_bus.bus_mtx,
- USB_MS_TO_TICKS(USB_RESUME_RECOVERY));
- sc->sc_control = sc->sc_intre = 0;
- USB_BUS_UNLOCK(&sc->sc_bus);
+ /* some broken BIOSes never initialize the Controller chip */
+ ohci_controller_init(sc, 0);
/* catch any lost interrupts */
ohci_do_poll(&sc->sc_bus);
@@ -2713,6 +2674,24 @@ ohci_device_suspend(struct usb_device *udev)
}
static void
+ohci_set_hw_power_sleep(struct usb_bus *bus, uint32_t state)
+{
+ struct ohci_softc *sc = OHCI_BUS2SC(bus);
+
+ switch (state) {
+ case USB_HW_POWER_SUSPEND:
+ case USB_HW_POWER_SHUTDOWN:
+ ohci_suspend(sc);
+ break;
+ case USB_HW_POWER_RESUME:
+ ohci_resume(sc);
+ break;
+ default:
+ break;
+ }
+}
+
+static void
ohci_set_hw_power(struct usb_bus *bus)
{
struct ohci_softc *sc = OHCI_BUS2SC(bus);
@@ -2756,6 +2735,7 @@ struct usb_bus_methods ohci_bus_methods =
.device_resume = ohci_device_resume,
.device_suspend = ohci_device_suspend,
.set_hw_power = ohci_set_hw_power,
+ .set_hw_power_sleep = ohci_set_hw_power_sleep,
.roothub_exec = ohci_roothub_exec,
.xfer_poll = ohci_do_poll,
};
diff --git a/sys/dev/usb/controller/ohci.h b/sys/dev/usb/controller/ohci.h
index d85c2c9..9d8ac7d 100644
--- a/sys/dev/usb/controller/ohci.h
+++ b/sys/dev/usb/controller/ohci.h
@@ -241,8 +241,6 @@ typedef struct ohci_softc {
bus_space_handle_t sc_io_hdl;
uint32_t sc_eintrs; /* enabled interrupts */
- uint32_t sc_control; /* Preserved during suspend/standby */
- uint32_t sc_intre;
uint16_t sc_intr_stat[OHCI_NO_EDS];
uint16_t sc_id_vendor;
@@ -260,8 +258,6 @@ usb_bus_mem_cb_t ohci_iterate_hw_softc;
usb_error_t ohci_init(ohci_softc_t *sc);
void ohci_detach(struct ohci_softc *sc);
-void ohci_suspend(ohci_softc_t *sc);
-void ohci_resume(ohci_softc_t *sc);
void ohci_interrupt(ohci_softc_t *sc);
#endif /* _OHCI_H_ */
diff --git a/sys/dev/usb/controller/ohci_atmelarm.c b/sys/dev/usb/controller/ohci_atmelarm.c
index 177c926..643b4d1 100644
--- a/sys/dev/usb/controller/ohci_atmelarm.c
+++ b/sys/dev/usb/controller/ohci_atmelarm.c
@@ -221,15 +221,17 @@ static device_method_t ohci_methods[] = {
DEVMETHOD(device_probe, ohci_atmelarm_probe),
DEVMETHOD(device_attach, ohci_atmelarm_attach),
DEVMETHOD(device_detach, ohci_atmelarm_detach),
+ DEVMETHOD(device_suspend, bus_generic_suspend),
+ DEVMETHOD(device_resume, bus_generic_resume),
DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD_END
};
static driver_t ohci_driver = {
- "ohci",
- ohci_methods,
- sizeof(struct at91_ohci_softc),
+ .name = "ohci",
+ .methods = ohci_methods,
+ .size = sizeof(struct at91_ohci_softc),
};
static devclass_t ohci_devclass;
diff --git a/sys/dev/usb/controller/ohci_pci.c b/sys/dev/usb/controller/ohci_pci.c
index c8690c9..864376b 100644
--- a/sys/dev/usb/controller/ohci_pci.c
+++ b/sys/dev/usb/controller/ohci_pci.c
@@ -74,6 +74,7 @@ __FBSDID("$FreeBSD$");
#include <dev/usb/usb_pci.h>
#include <dev/usb/controller/ohci.h>
#include <dev/usb/controller/ohcireg.h>
+#include "usb_if.h"
#define PCI_OHCI_VENDORID_ACERLABS 0x10b9
#define PCI_OHCI_VENDORID_AMD 0x1022
@@ -92,28 +93,13 @@ __FBSDID("$FreeBSD$");
static device_probe_t ohci_pci_probe;
static device_attach_t ohci_pci_attach;
static device_detach_t ohci_pci_detach;
-static device_suspend_t ohci_pci_suspend;
-static device_resume_t ohci_pci_resume;
+static usb_take_controller_t ohci_pci_take_controller;
static int
-ohci_pci_suspend(device_t self)
+ohci_pci_take_controller(device_t self)
{
- ohci_softc_t *sc = device_get_softc(self);
- int err;
-
- err = bus_generic_suspend(self);
- if (err) {
- return (err);
- }
- ohci_suspend(sc);
- return (0);
-}
-
-static int
-ohci_pci_resume(device_t self)
-{
- ohci_softc_t *sc = device_get_softc(self);
- uint32_t reg, int_line;
+ uint32_t reg;
+ uint32_t int_line;
if (pci_get_powerstate(self) != PCI_POWERSTATE_D0) {
device_printf(self, "chip is in D%d mode "
@@ -124,9 +110,6 @@ ohci_pci_resume(device_t self)
pci_write_config(self, PCI_CBMEM, reg, 4);
pci_write_config(self, PCIR_INTLINE, int_line, 4);
}
- ohci_resume(sc);
-
- bus_generic_resume(self);
return (0);
}
@@ -381,20 +364,22 @@ ohci_pci_detach(device_t self)
return (0);
}
-static driver_t ohci_driver =
-{
+static device_method_t ohci_pci_methods[] = {
+ /* Device interface */
+ DEVMETHOD(device_probe, ohci_pci_probe),
+ DEVMETHOD(device_attach, ohci_pci_attach),
+ DEVMETHOD(device_detach, ohci_pci_detach),
+ DEVMETHOD(device_suspend, bus_generic_suspend),
+ DEVMETHOD(device_resume, bus_generic_resume),
+ DEVMETHOD(device_shutdown, bus_generic_shutdown),
+ DEVMETHOD(usb_take_controller, ohci_pci_take_controller),
+
+ DEVMETHOD_END
+};
+
+static driver_t ohci_driver = {
.name = "ohci",
- .methods = (device_method_t[]){
- /* device interface */
- DEVMETHOD(device_probe, ohci_pci_probe),
- DEVMETHOD(device_attach, ohci_pci_attach),
- DEVMETHOD(device_detach, ohci_pci_detach),
- DEVMETHOD(device_suspend, ohci_pci_suspend),
- DEVMETHOD(device_resume, ohci_pci_resume),
- DEVMETHOD(device_shutdown, bus_generic_shutdown),
-
- DEVMETHOD_END
- },
+ .methods = ohci_pci_methods,
.size = sizeof(struct ohci_softc),
};
diff --git a/sys/dev/usb/controller/ohci_s3c24x0.c b/sys/dev/usb/controller/ohci_s3c24x0.c
index b0907ad..225a2d2 100644
--- a/sys/dev/usb/controller/ohci_s3c24x0.c
+++ b/sys/dev/usb/controller/ohci_s3c24x0.c
@@ -198,15 +198,17 @@ static device_method_t ohci_methods[] = {
DEVMETHOD(device_probe, ohci_s3c24x0_probe),
DEVMETHOD(device_attach, ohci_s3c24x0_attach),
DEVMETHOD(device_detach, ohci_s3c24x0_detach),
+ DEVMETHOD(device_suspend, bus_generic_suspend),
+ DEVMETHOD(device_resume, bus_generic_resume),
DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD_END
};
static driver_t ohci_driver = {
- "ohci",
- ohci_methods,
- sizeof(struct ohci_softc),
+ .name = "ohci",
+ .methods = ohci_methods,
+ .size = sizeof(struct ohci_softc),
};
static devclass_t ohci_devclass;
diff --git a/sys/dev/usb/controller/uhci.c b/sys/dev/usb/controller/uhci.c
index c365e01..d9091c9 100644
--- a/sys/dev/usb/controller/uhci.c
+++ b/sys/dev/usb/controller/uhci.c
@@ -373,9 +373,10 @@ done_1:
done_2:
- /* reload the configuration */
- UWRITE2(sc, UHCI_FRNUM, sc->sc_saved_frnum);
- UWRITE1(sc, UHCI_SOF, sc->sc_saved_sof);
+ /* reset frame number */
+ UWRITE2(sc, UHCI_FRNUM, 0);
+ /* set default SOF value */
+ UWRITE1(sc, UHCI_SOF, 0x40);
USB_BUS_UNLOCK(&sc->sc_bus);
@@ -463,9 +464,6 @@ uhci_init(uhci_softc_t *sc)
uhci_dumpregs(sc);
}
#endif
- sc->sc_saved_sof = 0x40; /* default value */
- sc->sc_saved_frnum = 0; /* default frame number */
-
/*
* Setup QH's
*/
@@ -658,24 +656,16 @@ uhci_init(uhci_softc_t *sc)
return (0);
}
-/* NOTE: suspend/resume is called from
- * interrupt context and cannot sleep!
- */
-
-void
+static void
uhci_suspend(uhci_softc_t *sc)
{
- USB_BUS_LOCK(&sc->sc_bus);
-
#ifdef USB_DEBUG
if (uhcidebug > 2) {
uhci_dumpregs(sc);
}
#endif
- /* save some state if BIOS doesn't */
- sc->sc_saved_frnum = UREAD2(sc, UHCI_FRNUM);
- sc->sc_saved_sof = UREAD1(sc, UHCI_SOF);
+ USB_BUS_LOCK(&sc->sc_bus);
/* stop the controller */
@@ -685,13 +675,10 @@ uhci_suspend(uhci_softc_t *sc)
UHCICMD(sc, UHCI_CMD_EGSM);
- usb_pause_mtx(&sc->sc_bus.bus_mtx,
- USB_MS_TO_TICKS(USB_RESUME_WAIT));
-
USB_BUS_UNLOCK(&sc->sc_bus);
}
-void
+static void
uhci_resume(uhci_softc_t *sc)
{
USB_BUS_LOCK(&sc->sc_bus);
@@ -704,21 +691,17 @@ uhci_resume(uhci_softc_t *sc)
UHCICMD(sc, UHCI_CMD_FGR);
- usb_pause_mtx(&sc->sc_bus.bus_mtx,
- USB_MS_TO_TICKS(USB_RESUME_DELAY));
-
/* and start traffic again */
uhci_start(sc);
+ USB_BUS_UNLOCK(&sc->sc_bus);
+
#ifdef USB_DEBUG
- if (uhcidebug > 2) {
+ if (uhcidebug > 2)
uhci_dumpregs(sc);
- }
#endif
- USB_BUS_UNLOCK(&sc->sc_bus);
-
/* catch lost interrupts */
uhci_do_poll(&sc->sc_bus);
}
@@ -3179,6 +3162,24 @@ uhci_device_suspend(struct usb_device *udev)
}
static void
+uhci_set_hw_power_sleep(struct usb_bus *bus, uint32_t state)
+{
+ struct uhci_softc *sc = UHCI_BUS2SC(bus);
+
+ switch (state) {
+ case USB_HW_POWER_SUSPEND:
+ case USB_HW_POWER_SHUTDOWN:
+ uhci_suspend(sc);
+ break;
+ case USB_HW_POWER_RESUME:
+ uhci_resume(sc);
+ break;
+ default:
+ break;
+ }
+}
+
+static void
uhci_set_hw_power(struct usb_bus *bus)
{
struct uhci_softc *sc = UHCI_BUS2SC(bus);
@@ -3225,6 +3226,7 @@ struct usb_bus_methods uhci_bus_methods =
.device_resume = uhci_device_resume,
.device_suspend = uhci_device_suspend,
.set_hw_power = uhci_set_hw_power,
+ .set_hw_power_sleep = uhci_set_hw_power_sleep,
.roothub_exec = uhci_roothub_exec,
.xfer_poll = uhci_do_poll,
};
diff --git a/sys/dev/usb/controller/uhci.h b/sys/dev/usb/controller/uhci.h
index 0878e79..8a6ce44 100644
--- a/sys/dev/usb/controller/uhci.h
+++ b/sys/dev/usb/controller/uhci.h
@@ -230,13 +230,11 @@ typedef struct uhci_softc {
uint32_t sc_loops; /* number of QHs that wants looping */
uint16_t sc_intr_stat[UHCI_IFRAMELIST_COUNT];
- uint16_t sc_saved_frnum;
uint8_t sc_addr; /* device address */
uint8_t sc_conf; /* device configuration */
uint8_t sc_isreset; /* bits set if a root hub is reset */
uint8_t sc_isresumed; /* bits set if a port was resumed */
- uint8_t sc_saved_sof;
uint8_t sc_hub_idata[1];
char sc_vendor[16]; /* vendor string for root hub */
@@ -245,8 +243,6 @@ typedef struct uhci_softc {
usb_bus_mem_cb_t uhci_iterate_hw_softc;
usb_error_t uhci_init(uhci_softc_t *sc);
-void uhci_suspend(uhci_softc_t *sc);
-void uhci_resume(uhci_softc_t *sc);
void uhci_reset(uhci_softc_t *sc);
void uhci_interrupt(uhci_softc_t *sc);
diff --git a/sys/dev/usb/controller/uhci_pci.c b/sys/dev/usb/controller/uhci_pci.c
index 4b04f25..454b904 100644
--- a/sys/dev/usb/controller/uhci_pci.c
+++ b/sys/dev/usb/controller/uhci_pci.c
@@ -74,6 +74,7 @@ __FBSDID("$FreeBSD$");
#include <dev/usb/usb_pci.h>
#include <dev/usb/controller/uhci.h>
#include <dev/usb/controller/uhcireg.h>
+#include "usb_if.h"
#define PCI_UHCI_VENDORID_INTEL 0x8086
#define PCI_UHCI_VENDORID_VIA 0x1106
@@ -83,33 +84,13 @@ __FBSDID("$FreeBSD$");
static device_probe_t uhci_pci_probe;
static device_attach_t uhci_pci_attach;
static device_detach_t uhci_pci_detach;
-static device_suspend_t uhci_pci_suspend;
-static device_resume_t uhci_pci_resume;
+static usb_take_controller_t uhci_pci_take_controller;
static int
-uhci_pci_suspend(device_t self)
+uhci_pci_take_controller(device_t self)
{
- uhci_softc_t *sc = device_get_softc(self);
- int err;
-
- err = bus_generic_suspend(self);
- if (err) {
- return (err);
- }
- uhci_suspend(sc);
- return (0);
-}
-
-static int
-uhci_pci_resume(device_t self)
-{
- uhci_softc_t *sc = device_get_softc(self);
-
pci_write_config(self, PCI_LEGSUP, PCI_LEGSUP_USBPIRQDEN, 2);
- uhci_resume(sc);
-
- bus_generic_resume(self);
return (0);
}
@@ -446,21 +427,22 @@ uhci_pci_detach(device_t self)
return (0);
}
-static driver_t uhci_driver =
-{
+static device_method_t uhci_pci_methods[] = {
+ /* Device interface */
+ DEVMETHOD(device_probe, uhci_pci_probe),
+ DEVMETHOD(device_attach, uhci_pci_attach),
+ DEVMETHOD(device_detach, uhci_pci_detach),
+ DEVMETHOD(device_suspend, bus_generic_suspend),
+ DEVMETHOD(device_resume, bus_generic_resume),
+ DEVMETHOD(device_shutdown, bus_generic_shutdown),
+ DEVMETHOD(usb_take_controller, uhci_pci_take_controller),
+
+ DEVMETHOD_END
+};
+
+static driver_t uhci_driver = {
.name = "uhci",
- .methods = (device_method_t[]){
- /* device interface */
- DEVMETHOD(device_probe, uhci_pci_probe),
- DEVMETHOD(device_attach, uhci_pci_attach),
- DEVMETHOD(device_detach, uhci_pci_detach),
-
- DEVMETHOD(device_suspend, uhci_pci_suspend),
- DEVMETHOD(device_resume, uhci_pci_resume),
- DEVMETHOD(device_shutdown, bus_generic_shutdown),
-
- DEVMETHOD_END
- },
+ .methods = uhci_pci_methods,
.size = sizeof(struct uhci_softc),
};
diff --git a/sys/dev/usb/controller/usb_controller.c b/sys/dev/usb/controller/usb_controller.c
index 7ff0bc0..0f942e1 100644
--- a/sys/dev/usb/controller/usb_controller.c
+++ b/sys/dev/usb/controller/usb_controller.c
@@ -61,12 +61,16 @@
#include <dev/usb/usb_controller.h>
#include <dev/usb/usb_bus.h>
#include <dev/usb/usb_pf.h>
+#include "usb_if.h"
/* function prototypes */
static device_probe_t usb_probe;
static device_attach_t usb_attach;
static device_detach_t usb_detach;
+static device_suspend_t usb_suspend;
+static device_resume_t usb_resume;
+static device_shutdown_t usb_shutdown;
static void usb_attach_sub(device_t, struct usb_bus *);
@@ -83,7 +87,12 @@ SYSCTL_INT(_hw_usb_ctrl, OID_AUTO, debug, CTLFLAG_RW, &usb_ctrl_debug, 0,
static int usb_no_boot_wait = 0;
TUNABLE_INT("hw.usb.no_boot_wait", &usb_no_boot_wait);
SYSCTL_INT(_hw_usb, OID_AUTO, no_boot_wait, CTLFLAG_RDTUN, &usb_no_boot_wait, 0,
- "No device enumerate waiting at boot.");
+ "No USB device enumerate waiting at boot.");
+
+static int usb_no_shutdown_wait = 0;
+TUNABLE_INT("hw.usb.no_shutdown_wait", &usb_no_shutdown_wait);
+SYSCTL_INT(_hw_usb, OID_AUTO, no_shutdown_wait, CTLFLAG_RW|CTLFLAG_TUN, &usb_no_shutdown_wait, 0,
+ "No USB device waiting at system shutdown.");
static devclass_t usb_devclass;
@@ -91,9 +100,9 @@ static device_method_t usb_methods[] = {
DEVMETHOD(device_probe, usb_probe),
DEVMETHOD(device_attach, usb_attach),
DEVMETHOD(device_detach, usb_detach),
- DEVMETHOD(device_suspend, bus_generic_suspend),
- DEVMETHOD(device_resume, bus_generic_resume),
- DEVMETHOD(device_shutdown, bus_generic_shutdown),
+ DEVMETHOD(device_suspend, usb_suspend),
+ DEVMETHOD(device_resume, usb_resume),
+ DEVMETHOD(device_shutdown, usb_shutdown),
{0, 0}
};
@@ -113,6 +122,7 @@ DRIVER_MODULE(usbus, xhci, usb_driver, usb_devclass, 0, 0);
DRIVER_MODULE(usbus, at91_udp, usb_driver, usb_devclass, 0, 0);
DRIVER_MODULE(usbus, musbotg, usb_driver, usb_devclass, 0, 0);
DRIVER_MODULE(usbus, uss820, usb_driver, usb_devclass, 0, 0);
+DRIVER_MODULE(usbus, octusb, usb_driver, usb_devclass, 0, 0);
/*------------------------------------------------------------------------*
* usb_probe
@@ -182,12 +192,12 @@ usb_detach(device_t dev)
usb_root_mount_rel(bus);
USB_BUS_LOCK(bus);
- if (usb_proc_msignal(&bus->explore_proc,
- &bus->detach_msg[0], &bus->detach_msg[1])) {
- /* ignore */
- }
- /* Wait for detach to complete */
+ /* Queue detach job */
+ usb_proc_msignal(&bus->explore_proc,
+ &bus->detach_msg[0], &bus->detach_msg[1]);
+
+ /* Wait for detach to complete */
usb_proc_mwait(&bus->explore_proc,
&bus->detach_msg[0], &bus->detach_msg[1]);
@@ -213,6 +223,84 @@ usb_detach(device_t dev)
}
/*------------------------------------------------------------------------*
+ * usb_suspend
+ *------------------------------------------------------------------------*/
+static int
+usb_suspend(device_t dev)
+{
+ struct usb_bus *bus = device_get_softc(dev);
+
+ DPRINTF("\n");
+
+ if (bus == NULL) {
+ /* was never setup properly */
+ return (0);
+ }
+
+ USB_BUS_LOCK(bus);
+ usb_proc_msignal(&bus->explore_proc,
+ &bus->suspend_msg[0], &bus->suspend_msg[1]);
+ USB_BUS_UNLOCK(bus);
+
+ return (0);
+}
+
+/*------------------------------------------------------------------------*
+ * usb_resume
+ *------------------------------------------------------------------------*/
+static int
+usb_resume(device_t dev)
+{
+ struct usb_bus *bus = device_get_softc(dev);
+
+ DPRINTF("\n");
+
+ if (bus == NULL) {
+ /* was never setup properly */
+ return (0);
+ }
+
+ USB_BUS_LOCK(bus);
+ usb_proc_msignal(&bus->explore_proc,
+ &bus->resume_msg[0], &bus->resume_msg[1]);
+ USB_BUS_UNLOCK(bus);
+
+ return (0);
+}
+
+/*------------------------------------------------------------------------*
+ * usb_shutdown
+ *------------------------------------------------------------------------*/
+static int
+usb_shutdown(device_t dev)
+{
+ struct usb_bus *bus = device_get_softc(dev);
+
+ DPRINTF("\n");
+
+ if (bus == NULL) {
+ /* was never setup properly */
+ return (0);
+ }
+
+ device_printf(bus->bdev, "Controller shutdown\n");
+
+ USB_BUS_LOCK(bus);
+ usb_proc_msignal(&bus->explore_proc,
+ &bus->shutdown_msg[0], &bus->shutdown_msg[1]);
+ if (usb_no_shutdown_wait == 0) {
+ /* wait for shutdown callback to be executed */
+ usb_proc_mwait(&bus->explore_proc,
+ &bus->shutdown_msg[0], &bus->shutdown_msg[1]);
+ }
+ USB_BUS_UNLOCK(bus);
+
+ device_printf(bus->bdev, "Controller shutdown complete\n");
+
+ return (0);
+}
+
+/*------------------------------------------------------------------------*
* usb_bus_explore
*
* This function is used to explore the device tree from the root.
@@ -226,6 +314,9 @@ usb_bus_explore(struct usb_proc_msg *pm)
bus = ((struct usb_bus_msg *)pm)->bus;
udev = bus->devices[USB_ROOT_HUB_ADDR];
+ if (bus->no_explore != 0)
+ return;
+
if (udev && udev->hub) {
if (bus->do_probe) {
@@ -296,6 +387,153 @@ usb_bus_detach(struct usb_proc_msg *pm)
bus->bdev = NULL;
}
+/*------------------------------------------------------------------------*
+ * usb_bus_suspend
+ *
+ * This function is used to suspend the USB contoller.
+ *------------------------------------------------------------------------*/
+static void
+usb_bus_suspend(struct usb_proc_msg *pm)
+{
+ struct usb_bus *bus;
+ struct usb_device *udev;
+ usb_error_t err;
+
+ bus = ((struct usb_bus_msg *)pm)->bus;
+ udev = bus->devices[USB_ROOT_HUB_ADDR];
+
+ if (udev == NULL || bus->bdev == NULL)
+ return;
+
+ USB_BUS_UNLOCK(bus);
+
+ bus_generic_shutdown(bus->bdev);
+
+ usbd_enum_lock(udev);
+
+ err = usbd_set_config_index(udev, USB_UNCONFIG_INDEX);
+ if (err)
+ device_printf(bus->bdev, "Could not unconfigure root HUB\n");
+
+ USB_BUS_LOCK(bus);
+ bus->hw_power_state = 0;
+ bus->no_explore = 1;
+ USB_BUS_UNLOCK(bus);
+
+ if (bus->methods->set_hw_power != NULL)
+ (bus->methods->set_hw_power) (bus);
+
+ if (bus->methods->set_hw_power_sleep != NULL)
+ (bus->methods->set_hw_power_sleep) (bus, USB_HW_POWER_SUSPEND);
+
+ usbd_enum_unlock(udev);
+
+ USB_BUS_LOCK(bus);
+}
+
+/*------------------------------------------------------------------------*
+ * usb_bus_resume
+ *
+ * This function is used to resume the USB contoller.
+ *------------------------------------------------------------------------*/
+static void
+usb_bus_resume(struct usb_proc_msg *pm)
+{
+ struct usb_bus *bus;
+ struct usb_device *udev;
+ usb_error_t err;
+
+ bus = ((struct usb_bus_msg *)pm)->bus;
+ udev = bus->devices[USB_ROOT_HUB_ADDR];
+
+ if (udev == NULL || bus->bdev == NULL)
+ return;
+
+ USB_BUS_UNLOCK(bus);
+
+ usbd_enum_lock(udev);
+#if 0
+ DEVMETHOD(usb_take_controller, NULL); /* dummy */
+#endif
+ USB_TAKE_CONTROLLER(device_get_parent(bus->bdev));
+
+ USB_BUS_LOCK(bus);
+ bus->hw_power_state =
+ USB_HW_POWER_CONTROL |
+ USB_HW_POWER_BULK |
+ USB_HW_POWER_INTERRUPT |
+ USB_HW_POWER_ISOC |
+ USB_HW_POWER_NON_ROOT_HUB;
+ bus->no_explore = 0;
+ USB_BUS_UNLOCK(bus);
+
+ if (bus->methods->set_hw_power_sleep != NULL)
+ (bus->methods->set_hw_power_sleep) (bus, USB_HW_POWER_RESUME);
+
+ if (bus->methods->set_hw_power != NULL)
+ (bus->methods->set_hw_power) (bus);
+
+ /* restore USB configuration to index 0 */
+ err = usbd_set_config_index(udev, 0);
+ if (err)
+ device_printf(bus->bdev, "Could not configure root HUB\n");
+
+ /* probe and attach */
+ err = usb_probe_and_attach(udev, USB_IFACE_INDEX_ANY);
+ if (err) {
+ device_printf(bus->bdev, "Could not probe and "
+ "attach root HUB\n");
+ }
+
+ usbd_enum_unlock(udev);
+
+ USB_BUS_LOCK(bus);
+}
+
+/*------------------------------------------------------------------------*
+ * usb_bus_shutdown
+ *
+ * This function is used to shutdown the USB contoller.
+ *------------------------------------------------------------------------*/
+static void
+usb_bus_shutdown(struct usb_proc_msg *pm)
+{
+ struct usb_bus *bus;
+ struct usb_device *udev;
+ usb_error_t err;
+
+ bus = ((struct usb_bus_msg *)pm)->bus;
+ udev = bus->devices[USB_ROOT_HUB_ADDR];
+
+ if (udev == NULL || bus->bdev == NULL)
+ return;
+
+ USB_BUS_UNLOCK(bus);
+
+ bus_generic_shutdown(bus->bdev);
+
+ usbd_enum_lock(udev);
+
+ err = usbd_set_config_index(udev, USB_UNCONFIG_INDEX);
+ if (err)
+ device_printf(bus->bdev, "Could not unconfigure root HUB\n");
+
+ USB_BUS_LOCK(bus);
+ bus->hw_power_state = 0;
+ bus->no_explore = 1;
+ USB_BUS_UNLOCK(bus);
+
+ if (bus->methods->set_hw_power != NULL)
+ (bus->methods->set_hw_power) (bus);
+
+ if (bus->methods->set_hw_power_sleep != NULL)
+ (bus->methods->set_hw_power_sleep) (bus, USB_HW_POWER_SHUTDOWN);
+
+ usbd_enum_unlock(udev);
+
+ USB_BUS_LOCK(bus);
+}
+
static void
usb_power_wdog(void *arg)
{
@@ -374,8 +612,6 @@ usb_bus_attach(struct usb_proc_msg *pm)
return;
}
- USB_BUS_UNLOCK(bus);
-
/* default power_mask value */
bus->hw_power_state =
USB_HW_POWER_CONTROL |
@@ -384,13 +620,15 @@ usb_bus_attach(struct usb_proc_msg *pm)
USB_HW_POWER_ISOC |
USB_HW_POWER_NON_ROOT_HUB;
+ USB_BUS_UNLOCK(bus);
+
/* make sure power is set at least once */
if (bus->methods->set_hw_power != NULL) {
(bus->methods->set_hw_power) (bus);
}
- /* Allocate the Root USB device */
+ /* allocate the Root USB device */
child = usb_alloc_device(bus->bdev, bus, NULL, 0, 0, 1,
speed, USB_MODE_HOST);
@@ -456,6 +694,21 @@ usb_attach_sub(device_t dev, struct usb_bus *bus)
bus->attach_msg[1].hdr.pm_callback = &usb_bus_attach;
bus->attach_msg[1].bus = bus;
+ bus->suspend_msg[0].hdr.pm_callback = &usb_bus_suspend;
+ bus->suspend_msg[0].bus = bus;
+ bus->suspend_msg[1].hdr.pm_callback = &usb_bus_suspend;
+ bus->suspend_msg[1].bus = bus;
+
+ bus->resume_msg[0].hdr.pm_callback = &usb_bus_resume;
+ bus->resume_msg[0].bus = bus;
+ bus->resume_msg[1].hdr.pm_callback = &usb_bus_resume;
+ bus->resume_msg[1].bus = bus;
+
+ bus->shutdown_msg[0].hdr.pm_callback = &usb_bus_shutdown;
+ bus->shutdown_msg[0].bus = bus;
+ bus->shutdown_msg[1].hdr.pm_callback = &usb_bus_shutdown;
+ bus->shutdown_msg[1].bus = bus;
+
/* Create USB explore and callback processes */
if (usb_proc_create(&bus->giant_callback_proc,
@@ -477,10 +730,8 @@ usb_attach_sub(device_t dev, struct usb_bus *bus)
} else {
/* Get final attach going */
USB_BUS_LOCK(bus);
- if (usb_proc_msignal(&bus->explore_proc,
- &bus->attach_msg[0], &bus->attach_msg[1])) {
- /* ignore */
- }
+ usb_proc_msignal(&bus->explore_proc,
+ &bus->attach_msg[0], &bus->attach_msg[1]);
USB_BUS_UNLOCK(bus);
/* Do initial explore */
@@ -602,4 +853,3 @@ usb_bus_mem_free_all(struct usb_bus *bus, usb_bus_mem_cb_t *cb)
mtx_destroy(&bus->bus_mtx);
}
-
diff --git a/sys/dev/usb/controller/uss820dci.c b/sys/dev/usb/controller/uss820dci.c
index b98043e..612bc81 100644
--- a/sys/dev/usb/controller/uss820dci.c
+++ b/sys/dev/usb/controller/uss820dci.c
@@ -1513,16 +1513,16 @@ uss820dci_uninit(struct uss820dci_softc *sc)
USB_BUS_UNLOCK(&sc->sc_bus);
}
-void
+static void
uss820dci_suspend(struct uss820dci_softc *sc)
{
- return;
+ /* TODO */
}
-void
+static void
uss820dci_resume(struct uss820dci_softc *sc)
{
- return;
+ /* TODO */
}
static void
@@ -2360,6 +2360,26 @@ uss820dci_ep_init(struct usb_device *udev, struct usb_endpoint_descriptor *edesc
}
}
+static void
+uss820dci_set_hw_power_sleep(struct usb_bus *bus, uint32_t state)
+{
+ struct uss820dci_softc *sc = USS820_DCI_BUS2SC(bus);
+
+ switch (state) {
+ case USB_HW_POWER_SUSPEND:
+ uss820dci_suspend(sc);
+ break;
+ case USB_HW_POWER_SHUTDOWN:
+ uss820dci_uninit(sc);
+ break;
+ case USB_HW_POWER_RESUME:
+ uss820dci_resume(sc);
+ break;
+ default:
+ break;
+ }
+}
+
struct usb_bus_methods uss820dci_bus_methods =
{
.endpoint_init = &uss820dci_ep_init,
@@ -2370,4 +2390,5 @@ struct usb_bus_methods uss820dci_bus_methods =
.clear_stall = &uss820dci_clear_stall,
.roothub_exec = &uss820dci_roothub_exec,
.xfer_poll = &uss820dci_do_poll,
+ .set_hw_power_sleep = uss820dci_set_hw_power_sleep,
};
diff --git a/sys/dev/usb/controller/uss820dci.h b/sys/dev/usb/controller/uss820dci.h
index e158c1c..8a27f15 100644
--- a/sys/dev/usb/controller/uss820dci.h
+++ b/sys/dev/usb/controller/uss820dci.h
@@ -349,8 +349,6 @@ struct uss820dci_softc {
usb_error_t uss820dci_init(struct uss820dci_softc *sc);
void uss820dci_uninit(struct uss820dci_softc *sc);
-void uss820dci_suspend(struct uss820dci_softc *sc);
-void uss820dci_resume(struct uss820dci_softc *sc);
void uss820dci_interrupt(struct uss820dci_softc *sc);
#endif /* _USS820_DCI_H_ */
diff --git a/sys/dev/usb/controller/uss820dci_atmelarm.c b/sys/dev/usb/controller/uss820dci_atmelarm.c
index e3742b8..7fd83a2 100644
--- a/sys/dev/usb/controller/uss820dci_atmelarm.c
+++ b/sys/dev/usb/controller/uss820dci_atmelarm.c
@@ -63,18 +63,15 @@ __FBSDID("$FreeBSD$");
static device_probe_t uss820_atmelarm_probe;
static device_attach_t uss820_atmelarm_attach;
static device_detach_t uss820_atmelarm_detach;
-static device_suspend_t uss820_atmelarm_suspend;
-static device_resume_t uss820_atmelarm_resume;
-static device_shutdown_t uss820_atmelarm_shutdown;
static device_method_t uss820dci_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, uss820_atmelarm_probe),
DEVMETHOD(device_attach, uss820_atmelarm_attach),
DEVMETHOD(device_detach, uss820_atmelarm_detach),
- DEVMETHOD(device_suspend, uss820_atmelarm_suspend),
- DEVMETHOD(device_resume, uss820_atmelarm_resume),
- DEVMETHOD(device_shutdown, uss820_atmelarm_shutdown),
+ DEVMETHOD(device_suspend, bus_generic_suspend),
+ DEVMETHOD(device_resume, bus_generic_resume),
+ DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD_END
};
@@ -93,47 +90,6 @@ MODULE_DEPEND(uss820, usb, 1, 1, 1);
static const char *const uss820_desc = "USS820 USB Device Controller";
static int
-uss820_atmelarm_suspend(device_t dev)
-{
- struct uss820dci_softc *sc = device_get_softc(dev);
- int err;
-
- err = bus_generic_suspend(dev);
- if (err == 0) {
- uss820dci_suspend(sc);
- }
- return (err);
-}
-
-static int
-uss820_atmelarm_resume(device_t dev)
-{
- struct uss820dci_softc *sc = device_get_softc(dev);
- int err;
-
- uss820dci_resume(sc);
-
- err = bus_generic_resume(dev);
-
- return (err);
-}
-
-static int
-uss820_atmelarm_shutdown(device_t dev)
-{
- struct uss820dci_softc *sc = device_get_softc(dev);
- int err;
-
- err = bus_generic_shutdown(dev);
- if (err)
- return (err);
-
- uss820dci_uninit(sc);
-
- return (0);
-}
-
-static int
uss820_atmelarm_probe(device_t dev)
{
device_set_desc(dev, uss820_desc);
diff --git a/sys/dev/usb/controller/xhci.c b/sys/dev/usb/controller/xhci.c
index 9bc7d21..a9690f9 100644
--- a/sys/dev/usb/controller/xhci.c
+++ b/sys/dev/usb/controller/xhci.c
@@ -550,24 +550,27 @@ xhci_uninit(struct xhci_softc *sc)
sx_destroy(&sc->sc_cmd_sx);
}
-void
-xhci_suspend(struct xhci_softc *sc)
-{
- /* XXX TODO */
-}
-
-void
-xhci_resume(struct xhci_softc *sc)
-{
- /* XXX TODO */
-}
-
-void
-xhci_shutdown(struct xhci_softc *sc)
+static void
+xhci_set_hw_power_sleep(struct usb_bus *bus, uint32_t state)
{
- DPRINTF("Stopping the XHCI\n");
+ struct xhci_softc *sc = XHCI_BUS2SC(bus);
- xhci_halt_controller(sc);
+ switch (state) {
+ case USB_HW_POWER_SUSPEND:
+ DPRINTF("Stopping the XHCI\n");
+ xhci_halt_controller(sc);
+ break;
+ case USB_HW_POWER_SHUTDOWN:
+ DPRINTF("Stopping the XHCI\n");
+ xhci_halt_controller(sc);
+ break;
+ case USB_HW_POWER_RESUME:
+ DPRINTF("Starting the XHCI\n");
+ xhci_start_controller(sc);
+ break;
+ default:
+ break;
+ }
}
static usb_error_t
@@ -2208,9 +2211,10 @@ xhci_configure_device(struct usb_device *udev)
struct usb_device *hubdev;
uint32_t temp;
uint32_t route;
+ uint32_t rh_port;
uint8_t is_hub;
uint8_t index;
- uint8_t rh_port;
+ uint8_t depth;
index = udev->controller_slot_id;
@@ -2232,6 +2236,8 @@ xhci_configure_device(struct usb_device *udev)
if (hubdev->parent_hub == NULL)
break;
+ depth = hubdev->parent_hub->depth;
+
/*
* NOTE: HS/FS/LS devices and the SS root HUB can have
* more than 15 ports
@@ -2239,17 +2245,18 @@ xhci_configure_device(struct usb_device *udev)
rh_port = hubdev->port_no;
- if (hubdev->parent_hub->parent_hub == NULL)
+ if (depth == 0)
break;
- route *= 16;
-
if (rh_port > 15)
- route |= 15;
- else
- route |= rh_port;
+ rh_port = 15;
+
+ if (depth < 6)
+ route |= rh_port << (4 * (depth - 1));
}
+ DPRINTF("Route=0x%08x\n", route);
+
temp = XHCI_SCTX_0_ROUTE_SET(route);
switch (sc->sc_hw.devs[index].state) {
@@ -2257,7 +2264,7 @@ xhci_configure_device(struct usb_device *udev)
temp |= XHCI_SCTX_0_CTX_NUM_SET(XHCI_MAX_ENDPOINTS - 1);
break;
default:
- temp = XHCI_SCTX_0_CTX_NUM_SET(1);
+ temp |= XHCI_SCTX_0_CTX_NUM_SET(1);
break;
}
@@ -3060,6 +3067,7 @@ xhci_roothub_exec(struct usb_device *udev,
case UHF_C_PORT_CONFIG_ERROR:
XWRITE4(sc, oper, port, v | XHCI_PS_CEC);
break;
+ case UHF_C_PORT_SUSPEND:
case UHF_C_PORT_LINK_STATE:
XWRITE4(sc, oper, port, v | XHCI_PS_PLC);
break;
@@ -3186,8 +3194,13 @@ xhci_roothub_exec(struct usb_device *udev,
i |= UPS_OVERCURRENT_INDICATOR;
if (v & XHCI_PS_PR)
i |= UPS_RESET;
- if (v & XHCI_PS_PP)
+ if (v & XHCI_PS_PP) {
+ /*
+ * The USB 3.0 RH is using the
+ * USB 2.0's power bit
+ */
i |= UPS_PORT_POWER;
+ }
USETW(sc->sc_hub_desc.ps.wPortStatus, i);
i = 0;
@@ -3928,4 +3941,5 @@ struct usb_bus_methods xhci_bus_methods = {
.set_address = xhci_set_address,
.clear_stall = xhci_ep_clear_stall,
.device_state_change = xhci_device_state_change,
+ .set_hw_power_sleep = xhci_set_hw_power_sleep,
};
diff --git a/sys/dev/usb/controller/xhci.h b/sys/dev/usb/controller/xhci.h
index 81f392a..14afcaf 100644
--- a/sys/dev/usb/controller/xhci.h
+++ b/sys/dev/usb/controller/xhci.h
@@ -494,9 +494,6 @@ usb_error_t xhci_halt_controller(struct xhci_softc *);
usb_error_t xhci_init(struct xhci_softc *, device_t);
usb_error_t xhci_start_controller(struct xhci_softc *);
void xhci_interrupt(struct xhci_softc *);
-void xhci_resume(struct xhci_softc *);
-void xhci_shutdown(struct xhci_softc *);
-void xhci_suspend(struct xhci_softc *);
void xhci_uninit(struct xhci_softc *);
#endif /* _XHCI_H_ */
diff --git a/sys/dev/usb/controller/xhci_pci.c b/sys/dev/usb/controller/xhci_pci.c
index 75b3af8..80877ac 100644
--- a/sys/dev/usb/controller/xhci_pci.c
+++ b/sys/dev/usb/controller/xhci_pci.c
@@ -58,23 +58,22 @@ __FBSDID("$FreeBSD$");
#include <dev/usb/usb_pci.h>
#include <dev/usb/controller/xhci.h>
#include <dev/usb/controller/xhcireg.h>
+#include "usb_if.h"
static device_probe_t xhci_pci_probe;
static device_attach_t xhci_pci_attach;
static device_detach_t xhci_pci_detach;
-static device_suspend_t xhci_pci_suspend;
-static device_resume_t xhci_pci_resume;
-static device_shutdown_t xhci_pci_shutdown;
-static void xhci_pci_takecontroller(device_t);
+static usb_take_controller_t xhci_pci_take_controller;
static device_method_t xhci_device_methods[] = {
/* device interface */
DEVMETHOD(device_probe, xhci_pci_probe),
DEVMETHOD(device_attach, xhci_pci_attach),
DEVMETHOD(device_detach, xhci_pci_detach),
- DEVMETHOD(device_suspend, xhci_pci_suspend),
- DEVMETHOD(device_resume, xhci_pci_resume),
- DEVMETHOD(device_shutdown, xhci_pci_shutdown),
+ DEVMETHOD(device_suspend, bus_generic_suspend),
+ DEVMETHOD(device_resume, bus_generic_resume),
+ DEVMETHOD(device_shutdown, bus_generic_shutdown),
+ DEVMETHOD(usb_take_controller, xhci_pci_take_controller),
DEVMETHOD_END
};
@@ -90,45 +89,6 @@ static devclass_t xhci_devclass;
DRIVER_MODULE(xhci, pci, xhci_driver, xhci_devclass, 0, 0);
MODULE_DEPEND(xhci, usb, 1, 1, 1);
-static int
-xhci_pci_suspend(device_t self)
-{
- struct xhci_softc *sc = device_get_softc(self);
- int err;
-
- err = bus_generic_suspend(self);
- if (err)
- return (err);
- xhci_suspend(sc);
- return (0);
-}
-
-static int
-xhci_pci_resume(device_t self)
-{
- struct xhci_softc *sc = device_get_softc(self);
-
- xhci_pci_takecontroller(self);
- xhci_resume(sc);
-
- bus_generic_resume(self);
-
- return (0);
-}
-
-static int
-xhci_pci_shutdown(device_t self)
-{
- struct xhci_softc *sc = device_get_softc(self);
- int err;
-
- err = bus_generic_shutdown(self);
- if (err)
- return (err);
- xhci_shutdown(sc);
-
- return (0);
-}
static const char *
xhci_pci_match(device_t self)
@@ -209,7 +169,7 @@ xhci_pci_attach(device_t self)
sc->sc_intr_hdl = NULL;
goto error;
}
- xhci_pci_takecontroller(self);
+ xhci_pci_take_controller(self);
err = xhci_halt_controller(sc);
@@ -268,8 +228,8 @@ xhci_pci_detach(device_t self)
return (0);
}
-static void
-xhci_pci_takecontroller(device_t self)
+static int
+xhci_pci_take_controller(device_t self)
{
struct xhci_softc *sc = device_get_softc(self);
uint32_t cparams;
@@ -312,4 +272,5 @@ xhci_pci_takecontroller(device_t self)
usb_pause_mtx(NULL, hz / 100); /* wait 10ms */
}
}
+ return (0);
}
diff --git a/sys/dev/usb/controller/xhcireg.h b/sys/dev/usb/controller/xhcireg.h
index 8be502e..b14dabc 100644
--- a/sys/dev/usb/controller/xhcireg.h
+++ b/sys/dev/usb/controller/xhcireg.h
@@ -115,7 +115,7 @@
#define XHCI_PS_PR 0x00000010 /* RW - port reset */
#define XHCI_PS_PLS_GET(x) (((x) >> 5) & 0xF) /* RW - port link state */
#define XHCI_PS_PLS_SET(x) (((x) & 0xF) << 5) /* RW - port link state */
-#define XHCI_PS_PP 0x00000100 /* RW - port power */
+#define XHCI_PS_PP 0x00000200 /* RW - port power */
#define XHCI_PS_SPEED_GET(x) (((x) >> 10) & 0xF) /* RO - port speed */
#define XHCI_PS_PIC_GET(x) (((x) >> 14) & 0x3) /* RW - port indicator */
#define XHCI_PS_PIC_SET(x) (((x) & 0x3) << 14) /* RW - port indicator */
diff --git a/sys/dev/usb/input/ukbd.c b/sys/dev/usb/input/ukbd.c
index 688f17b..eb7e1d9 100644
--- a/sys/dev/usb/input/ukbd.c
+++ b/sys/dev/usb/input/ukbd.c
@@ -198,7 +198,6 @@ struct ukbd_softc {
int sc_mode; /* input mode (K_XLATE,K_RAW,K_CODE) */
int sc_state; /* shift/lock key state */
int sc_accents; /* accent key index (> 0) */
- int sc_poll_tick_last;
int sc_led_size;
int sc_kbd_size;
@@ -227,7 +226,6 @@ struct ukbd_softc {
uint8_t sc_id_events;
uint8_t sc_kbd_id;
- uint8_t sc_poll_detected;
uint8_t sc_buffer[UKBD_BUFFER_SIZE];
};
@@ -247,6 +245,33 @@ struct ukbd_softc {
SCAN_PREFIX_CTL | SCAN_PREFIX_SHIFT)
#define SCAN_CHAR(c) ((c) & 0x7f)
+#define UKBD_LOCK() mtx_lock(&Giant)
+#define UKBD_UNLOCK() mtx_unlock(&Giant)
+
+#ifdef INVARIANTS
+
+/*
+ * Assert that the lock is held in all contexts
+ * where the code can be executed.
+ */
+#define UKBD_LOCK_ASSERT() mtx_assert(&Giant, MA_OWNED)
+
+/*
+ * Assert that the lock is held in the contexts
+ * where it really has to be so.
+ */
+#define UKBD_CTX_LOCK_ASSERT() \
+ do { \
+ if (!kdb_active && panicstr == NULL) \
+ mtx_assert(&Giant, MA_OWNED); \
+ } while (0)
+#else
+
+#define UKBD_LOCK_ASSERT() (void)0
+#define UKBD_CTX_LOCK_ASSERT() (void)0
+
+#endif
+
struct ukbd_mods {
uint32_t mask, key;
};
@@ -339,8 +364,6 @@ static int ukbd_ioctl(keyboard_t *, u_long, caddr_t);
static int ukbd_enable(keyboard_t *);
static int ukbd_disable(keyboard_t *);
static void ukbd_interrupt(struct ukbd_softc *);
-static int ukbd_is_polling(struct ukbd_softc *);
-static int ukbd_polls_other_thread(struct ukbd_softc *);
static void ukbd_event_keyinput(struct ukbd_softc *);
static device_probe_t ukbd_probe;
@@ -370,7 +393,8 @@ ukbd_start_timer(struct ukbd_softc *sc)
static void
ukbd_put_key(struct ukbd_softc *sc, uint32_t key)
{
- mtx_assert(&Giant, MA_OWNED);
+
+ UKBD_CTX_LOCK_ASSERT();
DPRINTF("0x%02x (%d) %s\n", key, key,
(key & KEY_RELEASE) ? "released" : "pressed");
@@ -388,52 +412,32 @@ ukbd_put_key(struct ukbd_softc *sc, uint32_t key)
}
static void
-ukbd_yield(void)
-{
- struct thread *td = curthread;
- uint32_t old_prio;
-
- DROP_GIANT();
-
- thread_lock(td);
-
- /* get current priority */
- old_prio = td->td_base_pri;
-
- /* set new priority */
- sched_prio(td, td->td_user_pri);
-
- /* cause a task switch */
- mi_switch(SW_INVOL | SWT_RELINQUISH, NULL);
-
- /* restore priority */
- sched_prio(td, old_prio);
-
- thread_unlock(td);
-
- PICKUP_GIANT();
-}
-
-static void
ukbd_do_poll(struct ukbd_softc *sc, uint8_t wait)
{
- DPRINTFN(2, "polling\n");
- /* update stats about last polling event */
- sc->sc_poll_tick_last = ticks;
- sc->sc_poll_detected = 1;
+ UKBD_CTX_LOCK_ASSERT();
+ KASSERT((sc->sc_flags & UKBD_FLAG_POLLING) != 0,
+ ("ukbd_do_poll called when not polling\n"));
+ DPRINTFN(2, "polling\n");
- if (kdb_active == 0) {
+ if (!kdb_active && !SCHEDULER_STOPPED()) {
+ /*
+ * In this context the kernel is polling for input,
+ * but the USB subsystem works in normal interrupt-driven
+ * mode, so we just wait on the USB threads to do the job.
+ * Note that we currently hold the Giant, but it's also used
+ * as the transfer mtx, so we must release it while waiting.
+ */
while (sc->sc_inputs == 0) {
-
- /* give USB threads a chance to run */
- ukbd_yield();
-
- /* check if we should wait */
+ /*
+ * Give USB threads a chance to run. Note that
+ * kern_yield performs DROP_GIANT + PICKUP_GIANT.
+ */
+ kern_yield(PRI_UNCHANGED);
if (!wait)
break;
}
- return; /* Only poll if KDB is active */
+ return;
}
while (sc->sc_inputs == 0) {
@@ -441,7 +445,6 @@ ukbd_do_poll(struct ukbd_softc *sc, uint8_t wait)
usbd_transfer_poll(sc->sc_xfer, UKBD_N_TRANSFER);
/* Delay-optimised support for repetition of keys */
-
if (ukbd_any_key_pressed(sc)) {
/* a key is pressed - need timekeeping */
DELAY(1000);
@@ -462,16 +465,16 @@ ukbd_get_key(struct ukbd_softc *sc, uint8_t wait)
{
int32_t c;
- mtx_assert(&Giant, MA_OWNED);
+ UKBD_CTX_LOCK_ASSERT();
+ KASSERT((!kdb_active && !SCHEDULER_STOPPED())
+ || (sc->sc_flags & UKBD_FLAG_POLLING) != 0,
+ ("not polling in kdb or panic\n"));
if (sc->sc_inputs == 0) {
/* start transfer, if not already started */
usbd_transfer_start(sc->sc_xfer[UKBD_INTR_DT]);
}
- if (ukbd_polls_other_thread(sc))
- return (-1);
-
if (sc->sc_flags & UKBD_FLAG_POLLING)
ukbd_do_poll(sc, wait);
@@ -499,6 +502,8 @@ ukbd_interrupt(struct ukbd_softc *sc)
uint8_t i;
uint8_t j;
+ UKBD_CTX_LOCK_ASSERT();
+
if (sc->sc_ndata.keycode[0] == KEY_ERROR)
return;
@@ -584,7 +589,9 @@ ukbd_event_keyinput(struct ukbd_softc *sc)
{
int c;
- if (ukbd_is_polling(sc))
+ UKBD_CTX_LOCK_ASSERT();
+
+ if ((sc->sc_flags & UKBD_FLAG_POLLING) != 0)
return;
if (sc->sc_inputs == 0)
@@ -608,7 +615,7 @@ ukbd_timeout(void *arg)
{
struct ukbd_softc *sc = arg;
- mtx_assert(&Giant, MA_OWNED);
+ UKBD_LOCK_ASSERT();
sc->sc_time_ms += 25; /* milliseconds */
@@ -656,6 +663,8 @@ ukbd_intr_callback(struct usb_xfer *xfer, usb_error_t error)
uint8_t id;
int len;
+ UKBD_LOCK_ASSERT();
+
usbd_xfer_status(xfer, &len, NULL, NULL, NULL);
pc = usbd_xfer_get_frame(xfer, 0);
@@ -842,6 +851,8 @@ ukbd_set_leds_callback(struct usb_xfer *xfer, usb_error_t error)
uint8_t any;
int len;
+ UKBD_LOCK_ASSERT();
+
#ifdef USB_DEBUG
if (ukbd_no_leds)
return;
@@ -972,6 +983,7 @@ ukbd_probe(device_t dev)
int error;
uint16_t d_len;
+ UKBD_LOCK_ASSERT();
DPRINTFN(11, "\n");
if (sw == NULL) {
@@ -998,7 +1010,7 @@ ukbd_probe(device_t dev)
if (error)
return (ENXIO);
- /*
+ /*
* NOTE: we currently don't support USB mouse and USB keyboard
* on the same USB endpoint.
*/
@@ -1165,6 +1177,8 @@ ukbd_attach(device_t dev)
uint16_t n;
uint16_t hid_len;
+ UKBD_LOCK_ASSERT();
+
kbd_init_struct(kbd, UKBD_DRIVER_NAME, KB_OTHER, unit, 0, 0, 0);
kbd->kb_data = (void *)sc;
@@ -1241,14 +1255,10 @@ ukbd_attach(device_t dev)
/* ignore if SETIDLE fails, hence it is not crucial */
usbd_req_set_idle(sc->sc_udev, NULL, sc->sc_iface_index, 0, 0);
- mtx_lock(&Giant);
-
ukbd_ioctl(kbd, KDSETLED, (caddr_t)&sc->sc_state);
KBD_INIT_DONE(kbd);
- mtx_unlock(&Giant);
-
if (kbd_register(kbd) < 0) {
goto detach;
}
@@ -1266,15 +1276,10 @@ ukbd_attach(device_t dev)
if (bootverbose) {
genkbd_diag(kbd, bootverbose);
}
- /* lock keyboard mutex */
-
- mtx_lock(&Giant);
/* start the keyboard */
-
usbd_transfer_start(sc->sc_xfer[UKBD_INTR_DT]);
- mtx_unlock(&Giant);
return (0); /* success */
detach:
@@ -1288,9 +1293,9 @@ ukbd_detach(device_t dev)
struct ukbd_softc *sc = device_get_softc(dev);
int error;
- DPRINTF("\n");
+ UKBD_LOCK_ASSERT();
- mtx_lock(&Giant);
+ DPRINTF("\n");
sc->sc_flags |= UKBD_FLAG_GONE;
@@ -1318,8 +1323,6 @@ ukbd_detach(device_t dev)
}
sc->sc_kbd.kb_flags = 0;
- mtx_unlock(&Giant);
-
usbd_transfer_unsetup(sc->sc_xfer, UKBD_N_TRANSFER);
usb_callout_drain(&sc->sc_callout);
@@ -1335,12 +1338,10 @@ ukbd_resume(device_t dev)
{
struct ukbd_softc *sc = device_get_softc(dev);
- mtx_lock(&Giant);
+ UKBD_LOCK_ASSERT();
ukbd_clear_state(&sc->sc_kbd);
- mtx_unlock(&Giant);
-
return (0);
}
@@ -1400,15 +1401,11 @@ ukbd_lock(keyboard_t *kbd, int lock)
static int
ukbd_enable(keyboard_t *kbd)
{
- if (!mtx_owned(&Giant)) {
- /* XXX cludge */
- int retval;
- mtx_lock(&Giant);
- retval = ukbd_enable(kbd);
- mtx_unlock(&Giant);
- return (retval);
- }
+
+ UKBD_LOCK();
KBD_ACTIVATE(kbd);
+ UKBD_UNLOCK();
+
return (0);
}
@@ -1416,44 +1413,24 @@ ukbd_enable(keyboard_t *kbd)
static int
ukbd_disable(keyboard_t *kbd)
{
- if (!mtx_owned(&Giant)) {
- /* XXX cludge */
- int retval;
- mtx_lock(&Giant);
- retval = ukbd_disable(kbd);
- mtx_unlock(&Giant);
- return (retval);
- }
+
+ UKBD_LOCK();
KBD_DEACTIVATE(kbd);
+ UKBD_UNLOCK();
+
return (0);
}
/* check if data is waiting */
+/* Currently unused. */
static int
ukbd_check(keyboard_t *kbd)
{
struct ukbd_softc *sc = kbd->kb_data;
- if (!KBD_IS_ACTIVE(kbd))
- return (0);
+ UKBD_CTX_LOCK_ASSERT();
- if (sc->sc_flags & UKBD_FLAG_POLLING) {
- if (!mtx_owned(&Giant)) {
- /* XXX cludge */
- int retval;
- mtx_lock(&Giant);
- retval = ukbd_check(kbd);
- mtx_unlock(&Giant);
- return (retval);
- }
- } else {
- /* XXX the keyboard layer requires Giant */
- if (!mtx_owned(&Giant))
- return (0);
- }
-
- /* check if key belongs to this thread */
- if (ukbd_polls_other_thread(sc))
+ if (!KBD_IS_ACTIVE(kbd))
return (0);
if (sc->sc_flags & UKBD_FLAG_POLLING)
@@ -1472,30 +1449,13 @@ ukbd_check(keyboard_t *kbd)
/* check if char is waiting */
static int
-ukbd_check_char(keyboard_t *kbd)
+ukbd_check_char_locked(keyboard_t *kbd)
{
struct ukbd_softc *sc = kbd->kb_data;
- if (!KBD_IS_ACTIVE(kbd))
- return (0);
+ UKBD_CTX_LOCK_ASSERT();
- if (sc->sc_flags & UKBD_FLAG_POLLING) {
- if (!mtx_owned(&Giant)) {
- /* XXX cludge */
- int retval;
- mtx_lock(&Giant);
- retval = ukbd_check_char(kbd);
- mtx_unlock(&Giant);
- return (retval);
- }
- } else {
- /* XXX the keyboard layer requires Giant */
- if (!mtx_owned(&Giant))
- return (0);
- }
-
- /* check if key belongs to this thread */
- if (ukbd_polls_other_thread(sc))
+ if (!KBD_IS_ACTIVE(kbd))
return (0);
if ((sc->sc_composed_char > 0) &&
@@ -1505,39 +1465,34 @@ ukbd_check_char(keyboard_t *kbd)
return (ukbd_check(kbd));
}
+static int
+ukbd_check_char(keyboard_t *kbd)
+{
+ int result;
+
+ UKBD_LOCK();
+ result = ukbd_check_char_locked(kbd);
+ UKBD_UNLOCK();
+
+ return (result);
+}
/* read one byte from the keyboard if it's allowed */
+/* Currently unused. */
static int
ukbd_read(keyboard_t *kbd, int wait)
{
struct ukbd_softc *sc = kbd->kb_data;
int32_t usbcode;
-
#ifdef UKBD_EMULATE_ATSCANCODE
uint32_t keycode;
uint32_t scancode;
#endif
- if (!KBD_IS_ACTIVE(kbd))
- return (-1);
- if (sc->sc_flags & UKBD_FLAG_POLLING) {
- if (!mtx_owned(&Giant)) {
- /* XXX cludge */
- int retval;
- mtx_lock(&Giant);
- retval = ukbd_read(kbd, wait);
- mtx_unlock(&Giant);
- return (retval);
- }
- } else {
- /* XXX the keyboard layer requires Giant */
- if (!mtx_owned(&Giant))
- return (-1);
- }
+ UKBD_CTX_LOCK_ASSERT();
- /* check if key belongs to this thread */
- if (ukbd_polls_other_thread(sc))
+ if (!KBD_IS_ACTIVE(kbd))
return (-1);
#ifdef UKBD_EMULATE_ATSCANCODE
@@ -1574,38 +1529,19 @@ ukbd_read(keyboard_t *kbd, int wait)
/* read char from the keyboard */
static uint32_t
-ukbd_read_char(keyboard_t *kbd, int wait)
+ukbd_read_char_locked(keyboard_t *kbd, int wait)
{
struct ukbd_softc *sc = kbd->kb_data;
uint32_t action;
uint32_t keycode;
int32_t usbcode;
-
#ifdef UKBD_EMULATE_ATSCANCODE
uint32_t scancode;
-
#endif
- if (!KBD_IS_ACTIVE(kbd))
- return (NOKEY);
-
- if (sc->sc_flags & UKBD_FLAG_POLLING) {
- if (!mtx_owned(&Giant)) {
- /* XXX cludge */
- int retval;
- mtx_lock(&Giant);
- retval = ukbd_read_char(kbd, wait);
- mtx_unlock(&Giant);
- return (retval);
- }
- } else {
- /* XXX the keyboard layer requires Giant */
- if (!mtx_owned(&Giant))
- return (NOKEY);
- }
+ UKBD_CTX_LOCK_ASSERT();
- /* check if key belongs to this thread */
- if (ukbd_polls_other_thread(sc))
+ if (!KBD_IS_ACTIVE(kbd))
return (NOKEY);
next_code:
@@ -1782,39 +1718,32 @@ errkey:
return (ERRKEY);
}
+/* Currently wait is always false. */
+static uint32_t
+ukbd_read_char(keyboard_t *kbd, int wait)
+{
+ uint32_t keycode;
+
+ UKBD_LOCK();
+ keycode = ukbd_read_char_locked(kbd, wait);
+ UKBD_UNLOCK();
+
+ return (keycode);
+}
+
/* some useful control functions */
static int
-ukbd_ioctl(keyboard_t *kbd, u_long cmd, caddr_t arg)
+ukbd_ioctl_locked(keyboard_t *kbd, u_long cmd, caddr_t arg)
{
struct ukbd_softc *sc = kbd->kb_data;
int i;
-
#if defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD5) || \
defined(COMPAT_FREEBSD4) || defined(COMPAT_43)
int ival;
#endif
- if (!mtx_owned(&Giant)) {
- /*
- * XXX big problem: If scroll lock is pressed and "printf()"
- * is called, the CPU will get here, to un-scroll lock the
- * keyboard. But if "printf()" acquires the "Giant" lock,
- * there will be a locking order reversal problem, so the
- * keyboard system must get out of "Giant" first, before the
- * CPU can proceed here ...
- */
- switch (cmd) {
- case KDGKBMODE:
- case KDSKBMODE:
- /* workaround for Geli */
- mtx_lock(&Giant);
- i = ukbd_ioctl(kbd, cmd, arg);
- mtx_unlock(&Giant);
- return (i);
- default:
- return (EINVAL);
- }
- }
+
+ UKBD_LOCK_ASSERT();
switch (cmd) {
case KDGKBMODE: /* get keyboard mode */
@@ -1839,7 +1768,7 @@ ukbd_ioctl(keyboard_t *kbd, u_long cmd, caddr_t arg)
case K_RAW:
case K_CODE:
if (sc->sc_mode != *(int *)arg) {
- if (ukbd_is_polling(sc) == 0)
+ if ((sc->sc_flags & UKBD_FLAG_POLLING) == 0)
ukbd_clear_state(kbd);
sc->sc_mode = *(int *)arg;
}
@@ -1943,19 +1872,44 @@ ukbd_ioctl(keyboard_t *kbd, u_long cmd, caddr_t arg)
return (0);
}
+static int
+ukbd_ioctl(keyboard_t *kbd, u_long cmd, caddr_t arg)
+{
+ int result;
+
+ /*
+ * XXX KDGKBSTATE, KDSKBSTATE and KDSETLED can be called from any
+ * context where printf(9) can be called, which among other things
+ * includes interrupt filters and threads with any kinds of locks
+ * already held. For this reason it would be dangerous to acquire
+ * the Giant here unconditionally. On the other hand we have to
+ * have it to handle the ioctl.
+ * So we make our best effort to auto-detect whether we can grab
+ * the Giant or not. Blame syscons(4) for this.
+ */
+ switch (cmd) {
+ case KDGKBSTATE:
+ case KDSKBSTATE:
+ case KDSETLED:
+ if (!mtx_owned(&Giant) && !SCHEDULER_STOPPED())
+ return (EDEADLK); /* best I could come up with */
+ /* FALLTHROUGH */
+ default:
+ UKBD_LOCK();
+ result = ukbd_ioctl_locked(kbd, cmd, arg);
+ UKBD_UNLOCK();
+ return (result);
+ }
+}
+
+
/* clear the internal state of the keyboard */
static void
ukbd_clear_state(keyboard_t *kbd)
{
struct ukbd_softc *sc = kbd->kb_data;
- if (!mtx_owned(&Giant)) {
- /* XXX cludge */
- mtx_lock(&Giant);
- ukbd_clear_state(kbd);
- mtx_unlock(&Giant);
- return;
- }
+ UKBD_CTX_LOCK_ASSERT();
sc->sc_flags &= ~(UKBD_FLAG_COMPOSE | UKBD_FLAG_POLLING);
sc->sc_state &= LOCK_MASK; /* preserve locking key state */
@@ -1986,43 +1940,11 @@ ukbd_set_state(keyboard_t *kbd, void *buf, size_t len)
}
static int
-ukbd_is_polling(struct ukbd_softc *sc)
-{
- int delta;
-
- if (sc->sc_flags & UKBD_FLAG_POLLING)
- return (1); /* polling */
-
- delta = ticks - sc->sc_poll_tick_last;
- if ((delta < 0) || (delta >= hz)) {
- sc->sc_poll_detected = 0;
- return (0); /* not polling */
- }
-
- return (sc->sc_poll_detected);
-}
-
-static int
-ukbd_polls_other_thread(struct ukbd_softc *sc)
-{
- return (ukbd_is_polling(sc) &&
- (sc->sc_poll_thread != curthread));
-}
-
-static int
ukbd_poll(keyboard_t *kbd, int on)
{
struct ukbd_softc *sc = kbd->kb_data;
- if (!mtx_owned(&Giant)) {
- /* XXX cludge */
- int retval;
- mtx_lock(&Giant);
- retval = ukbd_poll(kbd, on);
- mtx_unlock(&Giant);
- return (retval);
- }
-
+ UKBD_LOCK();
if (on) {
sc->sc_flags |= UKBD_FLAG_POLLING;
sc->sc_poll_thread = curthread;
@@ -2030,6 +1952,8 @@ ukbd_poll(keyboard_t *kbd, int on)
sc->sc_flags &= ~UKBD_FLAG_POLLING;
ukbd_start_timer(sc); /* start timer */
}
+ UKBD_UNLOCK();
+
return (0);
}
@@ -2038,6 +1962,8 @@ ukbd_poll(keyboard_t *kbd, int on)
static void
ukbd_set_leds(struct ukbd_softc *sc, uint8_t leds)
{
+
+ UKBD_LOCK_ASSERT();
DPRINTF("leds=0x%02x\n", leds);
sc->sc_leds = leds;
diff --git a/sys/dev/usb/net/if_axe.c b/sys/dev/usb/net/if_axe.c
index 576639b..02bb358 100644
--- a/sys/dev/usb/net/if_axe.c
+++ b/sys/dev/usb/net/if_axe.c
@@ -151,6 +151,7 @@ static const STRUCT_USB_HOST_ID axe_devs[] = {
AXE_DEV(ASIX, AX88772, AXE_FLAG_772),
AXE_DEV(ASIX, AX88772A, AXE_FLAG_772A),
AXE_DEV(ASIX, AX88772B, AXE_FLAG_772B),
+ AXE_DEV(ASIX, AX88772B_1, AXE_FLAG_772B),
AXE_DEV(ATEN, UC210T, 0),
AXE_DEV(BELKIN, F5D5055, AXE_FLAG_178),
AXE_DEV(BILLIONTON, USB2AR, 0),
diff --git a/sys/dev/usb/net/usb_ethernet.c b/sys/dev/usb/net/usb_ethernet.c
index e405ae8..2a7bddf 100644
--- a/sys/dev/usb/net/usb_ethernet.c
+++ b/sys/dev/usb/net/usb_ethernet.c
@@ -219,7 +219,6 @@ ue_attach_post_task(struct usb_proc_msg *_task)
ue->ue_ifp = ifp;
error = ue->ue_methods->ue_attach_post_sub(ue);
} else {
- ifp->if_mtu = ETHERMTU;
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
if (ue->ue_methods->ue_ioctl != NULL)
ifp->if_ioctl = ue->ue_methods->ue_ioctl;
diff --git a/sys/dev/usb/quirk/usb_quirk.c b/sys/dev/usb/quirk/usb_quirk.c
index 03ab038..e07aa2d 100644
--- a/sys/dev/usb/quirk/usb_quirk.c
+++ b/sys/dev/usb/quirk/usb_quirk.c
@@ -134,6 +134,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = {
USB_QUIRK(QUALCOMM2, CDMA_MSM, 0x0000, 0xffff, UQ_ASSUME_CM_OVER_DATA),
USB_QUIRK(CURITEL, UM150, 0x0000, 0xffff, UQ_ASSUME_CM_OVER_DATA),
USB_QUIRK(CURITEL, UM175, 0x0000, 0xffff, UQ_ASSUME_CM_OVER_DATA),
+ USB_QUIRK(VERTEX, VW110L, 0x0000, 0xffff, UQ_ASSUME_CM_OVER_DATA),
/* USB Mass Storage Class Quirks */
USB_QUIRK_VP(USB_VENDOR_ASAHIOPTICAL, 0, UQ_MSC_NO_RS_CLEAR_UA,
diff --git a/sys/dev/usb/serial/u3g.c b/sys/dev/usb/serial/u3g.c
index 6db2b55..3d59ad9 100644
--- a/sys/dev/usb/serial/u3g.c
+++ b/sys/dev/usb/serial/u3g.c
@@ -354,6 +354,7 @@ static const STRUCT_USB_HOST_ID u3g_devs[] = {
U3G_DEV(QISDA, H21_2, 0),
U3G_DEV(QUALCOMM2, AC8700, 0),
U3G_DEV(QUALCOMM2, MF330, 0),
+ U3G_DEV(QUALCOMM2, VW110L, U3GINIT_SCSIEJECT),
U3G_DEV(QUALCOMMINC, AC2726, 0),
U3G_DEV(QUALCOMMINC, AC8700, 0),
U3G_DEV(QUALCOMMINC, AC8710, 0),
diff --git a/sys/dev/usb/serial/ucycom.c b/sys/dev/usb/serial/ucycom.c
index 8fef219..4a35bf5 100644
--- a/sys/dev/usb/serial/ucycom.c
+++ b/sys/dev/usb/serial/ucycom.c
@@ -2,7 +2,7 @@
__FBSDID("$FreeBSD$");
/*-
- * Copyright (c) 2004 Dag-Erling Coïdan Smørgrav
+ * Copyright (c) 2004 Dag-Erling Coïdan Smørgrav
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/usb/serial/uftdi.c b/sys/dev/usb/serial/uftdi.c
index 843a56a..85b06ff 100644
--- a/sys/dev/usb/serial/uftdi.c
+++ b/sys/dev/usb/serial/uftdi.c
@@ -217,9 +217,11 @@ static STRUCT_USB_HOST_ID uftdi_devs[] = {
UFTDI_DEV(FTDI, SERIAL_8U100AX, SIO),
UFTDI_DEV(FTDI, SERIAL_2232C, 8U232AM),
UFTDI_DEV(FTDI, SERIAL_2232D, 8U232AM),
+ UFTDI_DEV(FTDI, BEAGLEBONE, 8U232AM),
UFTDI_DEV(FTDI, SERIAL_4232H, 8U232AM),
UFTDI_DEV(FTDI, SERIAL_8U232AM, 8U232AM),
UFTDI_DEV(FTDI, SERIAL_8U232AM4, 8U232AM),
+ UFTDI_DEV(FTDI, SERIAL_BEAGLEBONE, 8U232AM),
UFTDI_DEV(FTDI, SEMC_DSS20, 8U232AM),
UFTDI_DEV(FTDI, CFA_631, 8U232AM),
UFTDI_DEV(FTDI, CFA_632, 8U232AM),
diff --git a/sys/dev/usb/serial/usb_serial.c b/sys/dev/usb/serial/usb_serial.c
index a3e6ffb..08ce2ca 100644
--- a/sys/dev/usb/serial/usb_serial.c
+++ b/sys/dev/usb/serial/usb_serial.c
@@ -248,10 +248,16 @@ ucom_attach(struct ucom_super_softc *ssc, struct ucom_softc *sc,
return (EINVAL);
}
+ /* allocate a uniq unit number */
ssc->sc_unit = ucom_unit_alloc();
if (ssc->sc_unit == -1)
return (ENOMEM);
+ /* generate TTY name string */
+ snprintf(ssc->sc_ttyname, sizeof(ssc->sc_ttyname),
+ UCOM_TTY_PREFIX "%d", ssc->sc_unit);
+
+ /* create USB request handling process */
error = usb_proc_create(&ssc->sc_tq, mtx, "ucom", USB_PRI_MED);
if (error) {
ucom_unit_free(ssc->sc_unit);
@@ -292,6 +298,16 @@ ucom_detach(struct ucom_super_softc *ssc, struct ucom_softc *sc)
if (ssc->sc_subunits == 0)
return; /* not initialized */
+ if (ssc->sc_sysctl_ttyname != NULL) {
+ sysctl_remove_oid(ssc->sc_sysctl_ttyname, 1, 0);
+ ssc->sc_sysctl_ttyname = NULL;
+ }
+
+ if (ssc->sc_sysctl_ttyports != NULL) {
+ sysctl_remove_oid(ssc->sc_sysctl_ttyports, 1, 0);
+ ssc->sc_sysctl_ttyports = NULL;
+ }
+
usb_proc_drain(&ssc->sc_tq);
for (subunit = 0; subunit < ssc->sc_subunits; subunit++) {
@@ -420,19 +436,36 @@ ucom_detach_tty(struct ucom_softc *sc)
void
ucom_set_pnpinfo_usb(struct ucom_super_softc *ssc, device_t dev)
{
- char buf[64];
- uint8_t iface_index;
- struct usb_attach_arg *uaa;
+ char buf[64];
+ uint8_t iface_index;
+ struct usb_attach_arg *uaa;
- snprintf(buf, sizeof(buf), "ttyname=%s%d ttyports=%d",
- UCOM_TTY_PREFIX, ssc->sc_unit, ssc->sc_subunits);
+ snprintf(buf, sizeof(buf), "ttyname=" UCOM_TTY_PREFIX
+ "%d ttyports=%d", ssc->sc_unit, ssc->sc_subunits);
- /* Store the PNP info in the first interface for the dev */
- uaa = device_get_ivars(dev);
- iface_index = uaa->info.bIfaceIndex;
+ /* Store the PNP info in the first interface for the device */
+ uaa = device_get_ivars(dev);
+ iface_index = uaa->info.bIfaceIndex;
- if (usbd_set_pnpinfo(uaa->device, iface_index, buf) != 0)
- device_printf(dev, "Could not set PNP info\n");
+ if (usbd_set_pnpinfo(uaa->device, iface_index, buf) != 0)
+ device_printf(dev, "Could not set PNP info\n");
+
+ /*
+ * The following information is also replicated in the PNP-info
+ * string which is registered above:
+ */
+ if (ssc->sc_sysctl_ttyname == NULL) {
+ ssc->sc_sysctl_ttyname = SYSCTL_ADD_STRING(NULL,
+ SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
+ OID_AUTO, "ttyname", CTLFLAG_RD, ssc->sc_ttyname, 0,
+ "TTY device basename");
+ }
+ if (ssc->sc_sysctl_ttyports == NULL) {
+ ssc->sc_sysctl_ttyports = SYSCTL_ADD_INT(NULL,
+ SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
+ OID_AUTO, "ttyports", CTLFLAG_RD,
+ NULL, ssc->sc_subunits, "Number of ports");
+ }
}
static void
@@ -1308,6 +1341,8 @@ static cn_init_t ucom_cninit;
static cn_term_t ucom_cnterm;
static cn_getc_t ucom_cngetc;
static cn_putc_t ucom_cnputc;
+static cn_grab_t ucom_cngrab;
+static cn_ungrab_t ucom_cnungrab;
CONSOLE_DRIVER(ucom);
@@ -1332,6 +1367,16 @@ ucom_cnterm(struct consdev *cp)
{
}
+static void
+ucom_cngrab(struct consdev *cp)
+{
+}
+
+static void
+ucom_cnungrab(struct consdev *cp)
+{
+}
+
static int
ucom_cngetc(struct consdev *cd)
{
diff --git a/sys/dev/usb/serial/usb_serial.h b/sys/dev/usb/serial/usb_serial.h
index 5b53b89..ffd2859 100644
--- a/sys/dev/usb/serial/usb_serial.h
+++ b/sys/dev/usb/serial/usb_serial.h
@@ -70,6 +70,7 @@
#include <sys/tty.h>
#include <sys/serial.h>
#include <sys/fcntl.h>
+#include <sys/sysctl.h>
/* Module interface related macros */
#define UCOM_MODVER 1
@@ -132,8 +133,11 @@ struct ucom_param_task {
struct ucom_super_softc {
struct usb_process sc_tq;
- uint32_t sc_unit;
- uint32_t sc_subunits;
+ int sc_unit;
+ int sc_subunits;
+ struct sysctl_oid *sc_sysctl_ttyname;
+ struct sysctl_oid *sc_sysctl_ttyports;
+ char sc_ttyname[16];
};
struct ucom_softc {
diff --git a/sys/dev/usb/usb.h b/sys/dev/usb/usb.h
index fb1c8e6..eac2762 100644
--- a/sys/dev/usb/usb.h
+++ b/sys/dev/usb/usb.h
@@ -688,6 +688,7 @@ struct usb_port_status {
#define UPS_PORT_LS_LOOPBACK 0x0B
#define UPS_PORT_LS_RESUME 0x0F
#define UPS_PORT_POWER 0x0100
+#define UPS_PORT_POWER_SS 0x0200 /* super-speed only */
#define UPS_LOW_SPEED 0x0200
#define UPS_HIGH_SPEED 0x0400
#define UPS_OTHER_SPEED 0x0600 /* currently FreeBSD specific */
diff --git a/sys/dev/usb/usb_bus.h b/sys/dev/usb/usb_bus.h
index 1dd9d6a..07207cf 100644
--- a/sys/dev/usb/usb_bus.h
+++ b/sys/dev/usb/usb_bus.h
@@ -69,6 +69,9 @@ struct usb_bus {
struct usb_bus_msg explore_msg[2];
struct usb_bus_msg detach_msg[2];
struct usb_bus_msg attach_msg[2];
+ struct usb_bus_msg suspend_msg[2];
+ struct usb_bus_msg resume_msg[2];
+ struct usb_bus_msg shutdown_msg[2];
/*
* This mutex protects the USB hardware:
*/
@@ -98,7 +101,8 @@ struct usb_bus {
enum usb_revision usbrev; /* USB revision. See "USB_REV_XXX". */
uint8_t devices_max; /* maximum number of USB devices */
- uint8_t do_probe; /* set if USB BUS should be re-probed */
+ uint8_t do_probe; /* set if USB should be re-probed */
+ uint8_t no_explore; /* don't explore USB ports */
/*
* The scratch area can only be used inside the explore thread
diff --git a/sys/dev/usb/usb_controller.h b/sys/dev/usb/usb_controller.h
index 6b15dab..4ffc041 100644
--- a/sys/dev/usb/usb_controller.h
+++ b/sys/dev/usb/usb_controller.h
@@ -66,7 +66,7 @@ struct usb_bus_methods {
void (*device_suspend) (struct usb_device *);
void (*device_resume) (struct usb_device *);
void (*set_hw_power) (struct usb_bus *);
-
+ void (*set_hw_power_sleep) (struct usb_bus *, uint32_t);
/*
* The following flag is set if one or more control transfers are
* active:
@@ -92,6 +92,18 @@ struct usb_bus_methods {
* are present on the given USB bus:
*/
#define USB_HW_POWER_NON_ROOT_HUB 0x10
+ /*
+ * The following flag is set if we are suspending
+ */
+#define USB_HW_POWER_SUSPEND 0x20
+ /*
+ * The following flag is set if we are resuming
+ */
+#define USB_HW_POWER_RESUME 0x40
+ /*
+ * The following flag is set if we are shutting down
+ */
+#define USB_HW_POWER_SHUTDOWN 0x60
/* USB Device mode only - Mandatory */
diff --git a/sys/dev/usb/usb_hub.c b/sys/dev/usb/usb_hub.c
index 8652661..fe40100 100644
--- a/sys/dev/usb/usb_hub.c
+++ b/sys/dev/usb/usb_hub.c
@@ -327,6 +327,7 @@ uhub_reattach_port(struct uhub_softc *sc, uint8_t portno)
enum usb_dev_speed speed;
enum usb_hc_mode mode;
usb_error_t err;
+ uint16_t power_mask;
uint8_t timeout;
DPRINTF("reattaching port %d\n", portno);
@@ -369,10 +370,27 @@ repeat:
}
/* check if there is no power on the port and print a warning */
- if (!(sc->sc_st.port_status & UPS_PORT_POWER)) {
+ switch (udev->speed) {
+ case USB_SPEED_HIGH:
+ case USB_SPEED_FULL:
+ case USB_SPEED_LOW:
+ power_mask = UPS_PORT_POWER;
+ break;
+ case USB_SPEED_SUPER:
+ if (udev->parent_hub == NULL)
+ power_mask = UPS_PORT_POWER;
+ else
+ power_mask = UPS_PORT_POWER_SS;
+ break;
+ default:
+ power_mask = 0;
+ break;
+ }
+ if (!(sc->sc_st.port_status & power_mask)) {
DPRINTF("WARNING: strange, connected port %d "
"has no power\n", portno);
}
+
/* check if the device is in Host Mode */
if (!(sc->sc_st.port_status & UPS_PORT_MODE_DEVICE)) {
@@ -609,13 +627,15 @@ uhub_suspend_resume_port(struct uhub_softc *sc, uint8_t portno)
}
} else {
switch (UPS_PORT_LINK_STATE_GET(sc->sc_st.port_status)) {
- case UPS_PORT_LS_U0:
- case UPS_PORT_LS_U1:
- case UPS_PORT_LS_RESUME:
+ case UPS_PORT_LS_U3:
+ is_suspend = 1;
+ break;
+ case UPS_PORT_LS_SS_INA:
+ usbd_req_warm_reset_port(udev, NULL, portno);
is_suspend = 0;
break;
default:
- is_suspend = 1;
+ is_suspend = 0;
break;
}
}
@@ -632,8 +652,7 @@ uhub_suspend_resume_port(struct uhub_softc *sc, uint8_t portno)
*/
if (is_suspend == 0)
usb_dev_resume_peer(child);
- else if ((child->flags.usb_mode == USB_MODE_DEVICE) ||
- (usb_device_20_compatible(child) == 0))
+ else if (child->flags.usb_mode == USB_MODE_DEVICE)
usb_dev_suspend_peer(child);
}
done:
@@ -707,6 +726,13 @@ uhub_explore(struct usb_device *udev)
DPRINTF("Device is suspended!\n");
return (0);
}
+
+ /*
+ * Make sure we don't race against user-space applications
+ * like LibUSB:
+ */
+ usbd_enum_lock(udev);
+
for (x = 0; x != hub->nports; x++) {
up = hub->ports + x;
portno = x + 1;
@@ -768,7 +794,8 @@ uhub_explore(struct usb_device *udev)
break;
}
}
- if (sc->sc_st.port_change & (UPS_C_SUSPEND | UPS_C_PORT_LINK_STATE)) {
+ if (sc->sc_st.port_change & (UPS_C_SUSPEND |
+ UPS_C_PORT_LINK_STATE)) {
err = uhub_suspend_resume_port(sc, portno);
if (err) {
/* most likely the HUB is gone */
@@ -784,6 +811,8 @@ uhub_explore(struct usb_device *udev)
up->restartcnt = 0;
}
+ usbd_enum_unlock(udev);
+
/* initial status checked */
sc->sc_flags |= UHUB_FLAG_DID_EXPLORE;
@@ -2055,7 +2084,6 @@ usb_peer_should_wakeup(struct usb_device *udev)
(udev->pwr_save.write_refs != 0) ||
((udev->pwr_save.read_refs != 0) &&
(udev->flags.usb_mode == USB_MODE_HOST) &&
- (usb_device_20_compatible(udev) != 0) &&
(usb_peer_can_wakeup(udev) == 0)));
}
@@ -2235,6 +2263,14 @@ usb_dev_resume_peer(struct usb_device *udev)
DPRINTFN(0, "Resuming port failed\n");
return;
}
+ } else {
+ /* resume current port (Valid in Host and Device Mode) */
+ err = usbd_req_set_port_link_state(udev->parent_hub,
+ NULL, udev->port_no, UPS_PORT_LS_U0);
+ if (err) {
+ DPRINTFN(0, "Resuming port failed\n");
+ return;
+ }
}
/* resume settle time */
@@ -2276,8 +2312,7 @@ usb_dev_resume_peer(struct usb_device *udev)
usbd_sr_unlock(udev);
/* check if peer has wakeup capability */
- if (usb_peer_can_wakeup(udev) &&
- usb_device_20_compatible(udev)) {
+ if (usb_peer_can_wakeup(udev)) {
/* clear remote wakeup */
err = usbd_req_clear_device_feature(udev,
NULL, UF_DEVICE_REMOTE_WAKEUP);
@@ -2338,8 +2373,7 @@ repeat:
}
}
- if (usb_peer_can_wakeup(udev) &&
- usb_device_20_compatible(udev)) {
+ if (usb_peer_can_wakeup(udev)) {
/*
* This request needs to be done before we set
* "udev->flags.self_suspended":
@@ -2371,8 +2405,7 @@ repeat:
USB_BUS_UNLOCK(udev->bus);
if (err != 0) {
- if (usb_peer_can_wakeup(udev) &&
- usb_device_20_compatible(udev)) {
+ if (usb_peer_can_wakeup(udev)) {
/* allow device to do remote wakeup */
err = usbd_req_clear_device_feature(udev,
NULL, UF_DEVICE_REMOTE_WAKEUP);
@@ -2428,6 +2461,14 @@ repeat:
DPRINTFN(0, "Suspending port failed\n");
return;
}
+ } else {
+ /* suspend current port */
+ err = usbd_req_set_port_link_state(udev->parent_hub,
+ NULL, udev->port_no, UPS_PORT_LS_U3);
+ if (err) {
+ DPRINTFN(0, "Suspending port failed\n");
+ return;
+ }
}
udev = udev->parent_hub;
diff --git a/sys/dev/usb/usb_if.m b/sys/dev/usb/usb_if.m
index 926a237..b24fc2b 100644
--- a/sys/dev/usb/usb_if.m
+++ b/sys/dev/usb/usb_if.m
@@ -54,3 +54,13 @@ METHOD int handle_request {
uint16_t offset; /* data offset */
uint8_t *pstate; /* set if transfer is complete, see USB_HR_XXX */
};
+
+# Take controller from BIOS
+#
+# Return values:
+# 0: Success
+# Else: Failure
+#
+METHOD int take_controller {
+ device_t dev;
+};
diff --git a/sys/dev/usb/usb_request.c b/sys/dev/usb/usb_request.c
index d692b93..c403a70 100644
--- a/sys/dev/usb/usb_request.c
+++ b/sys/dev/usb/usb_request.c
@@ -785,12 +785,17 @@ usbd_req_reset_port(struct usb_device *udev, struct mtx *mtx, uint8_t port)
struct usb_port_status ps;
usb_error_t err;
uint16_t n;
+ uint16_t status;
+ uint16_t change;
#ifdef USB_DEBUG
uint16_t pr_poll_delay;
uint16_t pr_recovery_delay;
#endif
+
+ DPRINTF("\n");
+
/* clear any leftover port reset changes first */
usbd_req_clear_port_feature(
udev, mtx, port, UHF_C_PORT_RESET);
@@ -817,9 +822,6 @@ usbd_req_reset_port(struct usb_device *udev, struct mtx *mtx, uint8_t port)
#endif
n = 0;
while (1) {
- uint16_t status;
- uint16_t change;
-
#ifdef USB_DEBUG
/* wait for the device to recover from reset */
usb_pause_mtx(mtx, USB_MS_TO_TICKS(pr_poll_delay));
@@ -830,9 +832,9 @@ usbd_req_reset_port(struct usb_device *udev, struct mtx *mtx, uint8_t port)
n += USB_PORT_RESET_DELAY;
#endif
err = usbd_req_get_port_status(udev, mtx, &ps, port);
- if (err) {
+ if (err)
goto done;
- }
+
status = UGETW(ps.wPortStatus);
change = UGETW(ps.wPortChange);
@@ -862,9 +864,9 @@ usbd_req_reset_port(struct usb_device *udev, struct mtx *mtx, uint8_t port)
/* clear port reset first */
err = usbd_req_clear_port_feature(
udev, mtx, port, UHF_C_PORT_RESET);
- if (err) {
+ if (err)
goto done;
- }
+
/* check for timeout */
if (n == 0) {
err = USB_ERR_TIMEOUT;
@@ -898,21 +900,50 @@ done:
* disabled.
*------------------------------------------------------------------------*/
usb_error_t
-usbd_req_warm_reset_port(struct usb_device *udev, struct mtx *mtx, uint8_t port)
+usbd_req_warm_reset_port(struct usb_device *udev, struct mtx *mtx,
+ uint8_t port)
{
struct usb_port_status ps;
usb_error_t err;
uint16_t n;
+ uint16_t status;
+ uint16_t change;
#ifdef USB_DEBUG
uint16_t pr_poll_delay;
uint16_t pr_recovery_delay;
#endif
- err = usbd_req_set_port_feature(udev, mtx, port, UHF_BH_PORT_RESET);
- if (err) {
+
+ DPRINTF("\n");
+
+ err = usbd_req_get_port_status(udev, mtx, &ps, port);
+ if (err)
goto done;
+
+ status = UGETW(ps.wPortStatus);
+
+ switch (UPS_PORT_LINK_STATE_GET(status)) {
+ case UPS_PORT_LS_U3:
+ case UPS_PORT_LS_COMP_MODE:
+ case UPS_PORT_LS_LOOPBACK:
+ case UPS_PORT_LS_SS_INA:
+ break;
+ default:
+ DPRINTF("Wrong state for warm reset\n");
+ return (0);
}
+
+ /* clear any leftover warm port reset changes first */
+ usbd_req_clear_port_feature(udev, mtx,
+ port, UHF_C_BH_PORT_RESET);
+
+ /* set warm port reset */
+ err = usbd_req_set_port_feature(udev, mtx,
+ port, UHF_BH_PORT_RESET);
+ if (err)
+ goto done;
+
#ifdef USB_DEBUG
/* range check input parameters */
pr_poll_delay = usb_pr_poll_delay;
@@ -938,17 +969,20 @@ usbd_req_warm_reset_port(struct usb_device *udev, struct mtx *mtx, uint8_t port)
n += USB_PORT_RESET_DELAY;
#endif
err = usbd_req_get_port_status(udev, mtx, &ps, port);
- if (err) {
+ if (err)
goto done;
- }
+
+ status = UGETW(ps.wPortStatus);
+ change = UGETW(ps.wPortChange);
+
/* if the device disappeared, just give up */
- if (!(UGETW(ps.wPortStatus) & UPS_CURRENT_CONNECT_STATUS)) {
+ if (!(status & UPS_CURRENT_CONNECT_STATUS))
goto done;
- }
+
/* check if reset is complete */
- if (UGETW(ps.wPortChange) & UPS_C_BH_PORT_RESET) {
+ if (change & UPS_C_BH_PORT_RESET)
break;
- }
+
/* check for timeout */
if (n > 1000) {
n = 0;
@@ -959,9 +993,9 @@ usbd_req_warm_reset_port(struct usb_device *udev, struct mtx *mtx, uint8_t port)
/* clear port reset first */
err = usbd_req_clear_port_feature(
udev, mtx, port, UHF_C_BH_PORT_RESET);
- if (err) {
+ if (err)
goto done;
- }
+
/* check for timeout */
if (n == 0) {
err = USB_ERR_TIMEOUT;
@@ -2004,6 +2038,10 @@ retry:
}
}
+ /* Try to warm reset first */
+ if (parent_hub->speed == USB_SPEED_SUPER)
+ usbd_req_warm_reset_port(parent_hub, mtx, udev->port_no);
+
/* Try to reset the parent HUB port. */
err = usbd_req_reset_port(parent_hub, mtx, udev->port_no);
if (err) {
@@ -2164,3 +2202,27 @@ usbd_req_clear_tt_buffer(struct usb_device *udev, struct mtx *mtx,
USETW(req.wLength, 0);
return (usbd_do_request(udev, mtx, &req, 0));
}
+
+/*------------------------------------------------------------------------*
+ * usbd_req_set_port_link_state
+ *
+ * USB 3.0 specific request
+ *
+ * Returns:
+ * 0: Success
+ * Else: Failure
+ *------------------------------------------------------------------------*/
+usb_error_t
+usbd_req_set_port_link_state(struct usb_device *udev, struct mtx *mtx,
+ uint8_t port, uint8_t link_state)
+{
+ struct usb_device_request req;
+
+ req.bmRequestType = UT_WRITE_CLASS_OTHER;
+ req.bRequest = UR_SET_FEATURE;
+ USETW(req.wValue, UHF_PORT_LINK_STATE);
+ req.wIndex[0] = port;
+ req.wIndex[1] = link_state;
+ USETW(req.wLength, 0);
+ return (usbd_do_request(udev, mtx, &req, 0));
+}
diff --git a/sys/dev/usb/usb_request.h b/sys/dev/usb/usb_request.h
index ac7a7c1..74823af 100644
--- a/sys/dev/usb/usb_request.h
+++ b/sys/dev/usb/usb_request.h
@@ -89,5 +89,7 @@ usb_error_t usbd_req_reset_tt(struct usb_device *udev, struct mtx *mtx,
uint8_t port);
usb_error_t usbd_req_clear_tt_buffer(struct usb_device *udev, struct mtx *mtx,
uint8_t port, uint8_t addr, uint8_t type, uint8_t endpoint);
+usb_error_t usbd_req_set_port_link_state(struct usb_device *udev,
+ struct mtx *mtx, uint8_t port, uint8_t link_state);
#endif /* _USB_REQUEST_H_ */
diff --git a/sys/dev/usb/usb_transfer.c b/sys/dev/usb/usb_transfer.c
index 6f4b678..4a5cfbd 100644
--- a/sys/dev/usb/usb_transfer.c
+++ b/sys/dev/usb/usb_transfer.c
@@ -2150,7 +2150,7 @@ usbd_callback_wrapper(struct usb_xfer_queue *pq)
struct usb_xfer_root *info = xfer->xroot;
USB_BUS_LOCK_ASSERT(info->bus, MA_OWNED);
- if (!mtx_owned(info->xfer_mtx)) {
+ if (!mtx_owned(info->xfer_mtx) && !SCHEDULER_STOPPED()) {
/*
* Cases that end up here:
*
@@ -3119,14 +3119,14 @@ usbd_transfer_poll(struct usb_xfer **ppxfer, uint16_t max)
/* make sure that the BUS mutex is not locked */
drop_bus = 0;
- while (mtx_owned(&xroot->udev->bus->bus_mtx)) {
+ while (mtx_owned(&xroot->udev->bus->bus_mtx) && !SCHEDULER_STOPPED()) {
mtx_unlock(&xroot->udev->bus->bus_mtx);
drop_bus++;
}
/* make sure that the transfer mutex is not locked */
drop_xfer = 0;
- while (mtx_owned(xroot->xfer_mtx)) {
+ while (mtx_owned(xroot->xfer_mtx) && !SCHEDULER_STOPPED()) {
mtx_unlock(xroot->xfer_mtx);
drop_xfer++;
}
diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs
index 35756e9..3525689 100644
--- a/sys/dev/usb/usbdevs
+++ b/sys/dev/usb/usbdevs
@@ -679,6 +679,7 @@ vendor QISDA 0x1da5 Qisda
vendor METAGEEK2 0x1dd5 MetaGeek
vendor ALINK 0x1e0e Alink
vendor AIRTIES 0x1eda AirTies
+vendor VERTEX 0x1fe7 Vertex Wireless Co., Ltd.
vendor DLINK 0x2001 D-Link
vendor PLANEX2 0x2019 Planex Communications
vendor HAUPPAUGE2 0x2040 Hauppauge Computer Works
@@ -1050,6 +1051,7 @@ product ASIX AX88178 0x1780 AX88178
product ASIX AX88772 0x7720 AX88772
product ASIX AX88772A 0x772a AX88772A USB 2.0 10/100 Ethernet
product ASIX AX88772B 0x772b AX88772B USB 2.0 10/100 Ethernet
+product ASIX AX88772B_1 0x7e2b AX88772B USB 2.0 10/100 Ethernet
/* ASUS products */
product ASUS2 USBN11 0x0b05 USB-N11
@@ -1602,7 +1604,9 @@ product FTDI SERIAL_8U232AM 0x6001 8U232AM Serial
product FTDI SERIAL_8U232AM4 0x6004 8U232AM Serial
product FTDI SERIAL_2232C 0x6010 FT2232C Dual port Serial
product FTDI SERIAL_2232D 0x9e90 FT2232D Dual port Serial
+product FTDI BEAGLEBONE 0xA6D0 BeagleBone
product FTDI SERIAL_4232H 0x6011 FT4232H Quad port Serial
+product FTDI SERIAL_BEAGLEBONE 0xa6d0 BeagleBone FTDI Serial
/* Gude Analog- und Digitalsysteme products also uses FTDI's id: */
product FTDI TACTRIX_OPENPORT_13M 0xcc48 OpenPort 1.3 Mitsubishi
product FTDI TACTRIX_OPENPORT_13S 0xcc49 OpenPort 1.3 Subaru
@@ -2087,7 +2091,6 @@ product LINKSYS4 RT3070 0x0078 RT3070
product LINKSYS4 WUSB600NV2 0x0079 WUSB600N v2
/* Logitech products */
-product LOGITECH LANW300NU2 0x0166 LAN-W300N/U2
product LOGITECH M2452 0x0203 M2452 keyboard
product LOGITECH M4848 0x0301 M4848 mouse
product LOGITECH PAGESCAN 0x040f PageScan
@@ -2120,6 +2123,7 @@ product LOGITEC LAN_GTJU2A 0x0160 LAN-GTJ/U2A Ethernet
product LOGITEC RT2870_1 0x0162 RT2870
product LOGITEC RT2870_2 0x0163 RT2870
product LOGITEC RT2870_3 0x0164 RT2870
+product LOGITEC LANW300NU2 0x0166 LAN-W300N/U2
/* Longcheer Holdings, Ltd. products */
product LONGCHEER WM66 0x6061 Longcheer WM66 HSDPA
@@ -2677,6 +2681,7 @@ product QUALCOMM2 MF330 0x6613 MF330
product QUALCOMM2 RWT_FCT 0x3100 RWT FCT-CDMA 2000 1xRTT modem
product QUALCOMM2 CDMA_MSM 0x3196 CDMA Technologies MSM modem
product QUALCOMM2 AC8700 0x6000 AC8700
+product QUALCOMM2 VW110L 0x1000 Vertex Wireless 110L modem
product QUALCOMMINC CDMA_MSM 0x0001 CDMA Technologies MSM modem
product QUALCOMMINC E0002 0x0002 3G modem
product QUALCOMMINC E0003 0x0003 3G modem
@@ -3372,6 +3377,9 @@ product VIA USB2IDEBRIDGE 0x6204 USB 2.0 IDE Bridge
/* Vaisala products */
product VAISALA CABLE 0x0200 USB Interface cable
+/* Vertex products */
+product VERTEX VW110L 0x0100 Vertex VW110L modem
+
/* VidzMedia products */
product VIDZMEDIA MONSTERTV 0x4fb1 MonsterTV P2H
diff --git a/sys/dev/usb/wlan/if_rum.c b/sys/dev/usb/wlan/if_rum.c
index 8cf9f47..a809819 100644
--- a/sys/dev/usb/wlan/if_rum.c
+++ b/sys/dev/usb/wlan/if_rum.c
@@ -152,9 +152,9 @@ static usb_callback_t rum_bulk_write_callback;
static usb_error_t rum_do_request(struct rum_softc *sc,
struct usb_device_request *req, void *data);
static struct ieee80211vap *rum_vap_create(struct ieee80211com *,
- const char name[IFNAMSIZ], int unit, int opmode,
- int flags, const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t mac[IEEE80211_ADDR_LEN]);
+ const char [IFNAMSIZ], int, enum ieee80211_opmode,
+ int, const uint8_t [IEEE80211_ADDR_LEN],
+ const uint8_t [IEEE80211_ADDR_LEN]);
static void rum_vap_delete(struct ieee80211vap *);
static void rum_tx_free(struct rum_tx_data *, int);
static void rum_setup_tx_list(struct rum_softc *);
@@ -580,10 +580,10 @@ rum_do_request(struct rum_softc *sc,
}
static struct ieee80211vap *
-rum_vap_create(struct ieee80211com *ic,
- const char name[IFNAMSIZ], int unit, int opmode, int flags,
- const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t mac[IEEE80211_ADDR_LEN])
+rum_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit,
+ enum ieee80211_opmode opmode, int flags,
+ const uint8_t bssid[IEEE80211_ADDR_LEN],
+ const uint8_t mac[IEEE80211_ADDR_LEN])
{
struct rum_softc *sc = ic->ic_ifp->if_softc;
struct rum_vap *rvp;
diff --git a/sys/dev/usb/wlan/if_run.c b/sys/dev/usb/wlan/if_run.c
index ad6c736..0a97c79 100644
--- a/sys/dev/usb/wlan/if_run.c
+++ b/sys/dev/usb/wlan/if_run.c
@@ -208,7 +208,7 @@ static const STRUCT_USB_HOST_ID run_devs[] = {
RUN_DEV(LOGITEC, RT2870_1),
RUN_DEV(LOGITEC, RT2870_2),
RUN_DEV(LOGITEC, RT2870_3),
- RUN_DEV(LOGITECH, LANW300NU2),
+ RUN_DEV(LOGITEC, LANW300NU2),
RUN_DEV(MELCO, RT2870_1),
RUN_DEV(MELCO, RT2870_2),
RUN_DEV(MELCO, WLIUCAG300N),
@@ -315,9 +315,9 @@ static usb_callback_t run_bulk_tx_callback5;
static void run_bulk_tx_callbackN(struct usb_xfer *xfer,
usb_error_t error, unsigned int index);
static struct ieee80211vap *run_vap_create(struct ieee80211com *,
- const char name[IFNAMSIZ], int unit, int opmode, int flags,
- const uint8_t bssid[IEEE80211_ADDR_LEN], const uint8_t
- mac[IEEE80211_ADDR_LEN]);
+ const char [IFNAMSIZ], int, enum ieee80211_opmode, int,
+ const uint8_t [IEEE80211_ADDR_LEN],
+ const uint8_t [IEEE80211_ADDR_LEN]);
static void run_vap_delete(struct ieee80211vap *);
static void run_cmdq_cb(void *, int);
static void run_setup_tx_list(struct run_softc *,
@@ -748,8 +748,8 @@ run_detach(device_t self)
}
static struct ieee80211vap *
-run_vap_create(struct ieee80211com *ic,
- const char name[IFNAMSIZ], int unit, int opmode, int flags,
+run_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit,
+ enum ieee80211_opmode opmode, int flags,
const uint8_t bssid[IEEE80211_ADDR_LEN],
const uint8_t mac[IEEE80211_ADDR_LEN])
{
@@ -2720,7 +2720,6 @@ run_bulk_tx_callbackN(struct usb_xfer *xfer, usb_error_t error, unsigned int ind
struct run_endpoint_queue *pq = &sc->sc_epq[index];
struct mbuf *m;
usb_frlength_t size;
- unsigned int len;
int actlen;
int sumlen;
@@ -2750,7 +2749,8 @@ tr_setup:
STAILQ_REMOVE_HEAD(&pq->tx_qh, next);
m = data->m;
- if (m->m_pkthdr.len > RUN_MAX_TXSZ) {
+ if ((m->m_pkthdr.len +
+ sizeof(data->desc) + 3 + 8) > RUN_MAX_TXSZ) {
DPRINTF("data overflow, %u bytes\n",
m->m_pkthdr.len);
@@ -2765,6 +2765,14 @@ tr_setup:
size = sizeof(data->desc);
usbd_copy_in(pc, 0, &data->desc, size);
usbd_m_copy_in(pc, size, m, 0, m->m_pkthdr.len);
+ size += m->m_pkthdr.len;
+ /*
+ * Align end on a 4-byte boundary, pad 8 bytes (CRC +
+ * 4-byte padding), and be sure to zero those trailing
+ * bytes:
+ */
+ usbd_frame_zero(pc, size, ((-size) & 3) + 8);
+ size += ((-size) & 3) + 8;
vap = data->ni->ni_vap;
if (ieee80211_radiotap_active_vap(vap)) {
@@ -2783,13 +2791,10 @@ tr_setup:
ieee80211_radiotap_tx(vap, m);
}
- /* align end on a 4-bytes boundary */
- len = (size + IEEE80211_CRC_LEN + m->m_pkthdr.len + 3) & ~3;
-
- DPRINTFN(11, "sending frame len=%u xferlen=%u @ index %d\n",
- m->m_pkthdr.len, len, index);
+ DPRINTFN(11, "sending frame len=%u/%u @ index %d\n",
+ m->m_pkthdr.len, size, index);
- usbd_xfer_set_frame_len(xfer, 0, len);
+ usbd_xfer_set_frame_len(xfer, 0, size);
usbd_xfer_set_priv(xfer, data);
usbd_transfer_submit(xfer);
diff --git a/sys/dev/usb/wlan/if_uath.c b/sys/dev/usb/wlan/if_uath.c
index 8bc821b..cfa8494 100644
--- a/sys/dev/usb/wlan/if_uath.c
+++ b/sys/dev/usb/wlan/if_uath.c
@@ -254,9 +254,9 @@ static const struct usb_config uath_usbconfig[UATH_N_XFERS] = {
};
static struct ieee80211vap *uath_vap_create(struct ieee80211com *,
- const char name[IFNAMSIZ], int unit, int opmode,
- int flags, const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t mac[IEEE80211_ADDR_LEN]);
+ const char [IFNAMSIZ], int, enum ieee80211_opmode, int,
+ const uint8_t [IEEE80211_ADDR_LEN],
+ const uint8_t [IEEE80211_ADDR_LEN]);
static void uath_vap_delete(struct ieee80211vap *);
static int uath_alloc_cmd_list(struct uath_softc *, struct uath_cmd [],
int, int);
@@ -1065,10 +1065,10 @@ uath_free_tx_data_list(struct uath_softc *sc)
}
static struct ieee80211vap *
-uath_vap_create(struct ieee80211com *ic,
- const char name[IFNAMSIZ], int unit, int opmode, int flags,
- const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t mac[IEEE80211_ADDR_LEN])
+uath_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit,
+ enum ieee80211_opmode opmode, int flags,
+ const uint8_t bssid[IEEE80211_ADDR_LEN],
+ const uint8_t mac[IEEE80211_ADDR_LEN])
{
struct uath_vap *uvp;
struct ieee80211vap *vap;
diff --git a/sys/dev/usb/wlan/if_upgt.c b/sys/dev/usb/wlan/if_upgt.c
index 78ac2d9..678e9c0 100644
--- a/sys/dev/usb/wlan/if_upgt.c
+++ b/sys/dev/usb/wlan/if_upgt.c
@@ -138,9 +138,9 @@ static void upgt_scan_start(struct ieee80211com *);
static void upgt_scan_end(struct ieee80211com *);
static void upgt_set_channel(struct ieee80211com *);
static struct ieee80211vap *upgt_vap_create(struct ieee80211com *,
- const char name[IFNAMSIZ], int unit, int opmode,
- int flags, const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t mac[IEEE80211_ADDR_LEN]);
+ const char [IFNAMSIZ], int, enum ieee80211_opmode, int,
+ const uint8_t [IEEE80211_ADDR_LEN],
+ const uint8_t [IEEE80211_ADDR_LEN]);
static void upgt_vap_delete(struct ieee80211vap *);
static void upgt_update_mcast(struct ifnet *);
static uint8_t upgt_rx_rate(struct upgt_softc *, const int);
@@ -1014,10 +1014,10 @@ upgt_set_chan(struct upgt_softc *sc, struct ieee80211_channel *c)
}
static struct ieee80211vap *
-upgt_vap_create(struct ieee80211com *ic,
- const char name[IFNAMSIZ], int unit, int opmode, int flags,
- const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t mac[IEEE80211_ADDR_LEN])
+upgt_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit,
+ enum ieee80211_opmode opmode, int flags,
+ const uint8_t bssid[IEEE80211_ADDR_LEN],
+ const uint8_t mac[IEEE80211_ADDR_LEN])
{
struct upgt_vap *uvp;
struct ieee80211vap *vap;
diff --git a/sys/dev/usb/wlan/if_ural.c b/sys/dev/usb/wlan/if_ural.c
index a72da83..945789f 100644
--- a/sys/dev/usb/wlan/if_ural.c
+++ b/sys/dev/usb/wlan/if_ural.c
@@ -131,9 +131,9 @@ static usb_callback_t ural_bulk_write_callback;
static usb_error_t ural_do_request(struct ural_softc *sc,
struct usb_device_request *req, void *data);
static struct ieee80211vap *ural_vap_create(struct ieee80211com *,
- const char name[IFNAMSIZ], int unit, int opmode,
- int flags, const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t mac[IEEE80211_ADDR_LEN]);
+ const char [IFNAMSIZ], int, enum ieee80211_opmode,
+ int, const uint8_t [IEEE80211_ADDR_LEN],
+ const uint8_t [IEEE80211_ADDR_LEN]);
static void ural_vap_delete(struct ieee80211vap *);
static void ural_tx_free(struct ural_tx_data *, int);
static void ural_setup_tx_list(struct ural_softc *);
@@ -568,10 +568,10 @@ ural_do_request(struct ural_softc *sc,
}
static struct ieee80211vap *
-ural_vap_create(struct ieee80211com *ic,
- const char name[IFNAMSIZ], int unit, int opmode, int flags,
- const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t mac[IEEE80211_ADDR_LEN])
+ural_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit,
+ enum ieee80211_opmode opmode, int flags,
+ const uint8_t bssid[IEEE80211_ADDR_LEN],
+ const uint8_t mac[IEEE80211_ADDR_LEN])
{
struct ural_softc *sc = ic->ic_ifp->if_softc;
struct ural_vap *uvp;
diff --git a/sys/dev/usb/wlan/if_urtw.c b/sys/dev/usb/wlan/if_urtw.c
index 2f46424..1259b2d 100644
--- a/sys/dev/usb/wlan/if_urtw.c
+++ b/sys/dev/usb/wlan/if_urtw.c
@@ -649,9 +649,9 @@ static const struct usb_config urtw_8187l_usbconfig[URTW_8187L_N_XFERS] = {
};
static struct ieee80211vap *urtw_vap_create(struct ieee80211com *,
- const char name[IFNAMSIZ], int unit, int opmode,
- int flags, const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t mac[IEEE80211_ADDR_LEN]);
+ const char [IFNAMSIZ], int, enum ieee80211_opmode,
+ int, const uint8_t [IEEE80211_ADDR_LEN],
+ const uint8_t [IEEE80211_ADDR_LEN]);
static void urtw_vap_delete(struct ieee80211vap *);
static void urtw_init(void *);
static void urtw_stop(struct ifnet *, int);
@@ -993,10 +993,10 @@ urtw_free_data_list(struct urtw_softc *sc, struct urtw_data data[], int ndata,
}
static struct ieee80211vap *
-urtw_vap_create(struct ieee80211com *ic,
- const char name[IFNAMSIZ], int unit, int opmode, int flags,
- const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t mac[IEEE80211_ADDR_LEN])
+urtw_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit,
+ enum ieee80211_opmode opmode, int flags,
+ const uint8_t bssid[IEEE80211_ADDR_LEN],
+ const uint8_t mac[IEEE80211_ADDR_LEN])
{
struct urtw_vap *uvp;
struct ieee80211vap *vap;
diff --git a/sys/dev/usb/wlan/if_zyd.c b/sys/dev/usb/wlan/if_zyd.c
index 2e81ddf..7e2cee9 100644
--- a/sys/dev/usb/wlan/if_zyd.c
+++ b/sys/dev/usb/wlan/if_zyd.c
@@ -118,9 +118,9 @@ static usb_callback_t zyd_bulk_read_callback;
static usb_callback_t zyd_bulk_write_callback;
static struct ieee80211vap *zyd_vap_create(struct ieee80211com *,
- const char name[IFNAMSIZ], int unit, int opmode,
- int flags, const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t mac[IEEE80211_ADDR_LEN]);
+ const char [IFNAMSIZ], int, enum ieee80211_opmode, int,
+ const uint8_t [IEEE80211_ADDR_LEN],
+ const uint8_t [IEEE80211_ADDR_LEN]);
static void zyd_vap_delete(struct ieee80211vap *);
static void zyd_tx_free(struct zyd_tx_data *, int);
static void zyd_setup_tx_list(struct zyd_softc *);
@@ -456,10 +456,10 @@ zyd_detach(device_t dev)
}
static struct ieee80211vap *
-zyd_vap_create(struct ieee80211com *ic,
- const char name[IFNAMSIZ], int unit, int opmode, int flags,
- const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t mac[IEEE80211_ADDR_LEN])
+zyd_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit,
+ enum ieee80211_opmode opmode, int flags,
+ const uint8_t bssid[IEEE80211_ADDR_LEN],
+ const uint8_t mac[IEEE80211_ADDR_LEN])
{
struct zyd_vap *zvp;
struct ieee80211vap *vap;
diff --git a/sys/dev/viawd/viawd.c b/sys/dev/viawd/viawd.c
new file mode 100644
index 0000000..d56b677
--- /dev/null
+++ b/sys/dev/viawd/viawd.c
@@ -0,0 +1,248 @@
+/*-
+ * Copyright (c) 2011 Fabien Thomas <fabient@FreeBSD.org>
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/kernel.h>
+#include <sys/module.h>
+#include <sys/systm.h>
+#include <sys/bus.h>
+#include <machine/bus.h>
+#include <sys/rman.h>
+#include <machine/resource.h>
+#include <sys/watchdog.h>
+
+#include <isa/isavar.h>
+#include <dev/pci/pcivar.h>
+
+#include "viawd.h"
+
+#define viawd_read_4(sc, off) bus_read_4((sc)->wd_res, (off))
+#define viawd_write_4(sc, off, val) \
+ bus_write_4((sc)->wd_res, (off), (val))
+
+static struct viawd_device viawd_devices[] = {
+ { DEVICEID_VT8251, "VIA VT8251 watchdog timer" },
+ { DEVICEID_CX700, "VIA CX700 watchdog timer" },
+ { DEVICEID_VX800, "VIA VX800 watchdog timer" },
+ { DEVICEID_VX855, "VIA VX855 watchdog timer" },
+ { DEVICEID_VX900, "VIA VX900 watchdog timer" },
+ { 0, NULL },
+};
+
+static devclass_t viawd_devclass;
+
+static void
+viawd_tmr_state(struct viawd_softc *sc, int enable)
+{
+ uint32_t reg;
+
+ reg = viawd_read_4(sc, VIAWD_MEM_CTRL);
+ if (enable)
+ reg |= VIAWD_MEM_CTRL_TRIGGER | VIAWD_MEM_CTRL_ENABLE;
+ else
+ reg &= ~VIAWD_MEM_CTRL_ENABLE;
+ viawd_write_4(sc, VIAWD_MEM_CTRL, reg);
+}
+
+static void
+viawd_tmr_set(struct viawd_softc *sc, unsigned int timeout)
+{
+
+ /* Keep value in range. */
+ if (timeout < VIAWD_MEM_COUNT_MIN)
+ timeout = VIAWD_MEM_COUNT_MIN;
+ else if (timeout > VIAWD_MEM_COUNT_MAX)
+ timeout = VIAWD_MEM_COUNT_MAX;
+
+ viawd_write_4(sc, VIAWD_MEM_COUNT, timeout);
+ sc->timeout = timeout;
+}
+
+/*
+ * Watchdog event handler - called by the framework to enable or disable
+ * the watchdog or change the initial timeout value.
+ */
+static void
+viawd_event(void *arg, unsigned int cmd, int *error)
+{
+ struct viawd_softc *sc = arg;
+ unsigned int timeout;
+
+ /* Convert from power-of-two-ns to second. */
+ cmd &= WD_INTERVAL;
+ timeout = ((uint64_t)1 << cmd) / 1000000000;
+ if (cmd) {
+ if (timeout != sc->timeout)
+ viawd_tmr_set(sc, timeout);
+ viawd_tmr_state(sc, 1);
+ *error = 0;
+ } else
+ viawd_tmr_state(sc, 0);
+}
+
+/* Look for a supported VIA south bridge. */
+static struct viawd_device *
+viawd_find(device_t dev)
+{
+ struct viawd_device *id;
+
+ if (pci_get_vendor(dev) != VENDORID_VIA)
+ return (NULL);
+ for (id = viawd_devices; id->desc != NULL; id++)
+ if (pci_get_device(dev) == id->device)
+ return (id);
+ return (NULL);
+}
+
+static void
+viawd_identify(driver_t *driver, device_t parent)
+{
+
+ if (viawd_find(parent) == NULL)
+ return;
+
+ if (device_find_child(parent, driver->name, -1) == NULL)
+ BUS_ADD_CHILD(parent, 0, driver->name, 0);
+}
+
+static int
+viawd_probe(device_t dev)
+{
+ struct viawd_device *id;
+
+ id = viawd_find(device_get_parent(dev));
+ KASSERT(id != NULL, ("parent should be a valid VIA SB"));
+ device_set_desc(dev, id->desc);
+ return (BUS_PROBE_GENERIC);
+}
+
+static int
+viawd_attach(device_t dev)
+{
+ device_t sb_dev;
+ struct viawd_softc *sc;
+ uint32_t pmbase, reg;
+
+ sc = device_get_softc(dev);
+ sc->dev = dev;
+
+ sb_dev = device_get_parent(dev);
+ if (sb_dev == NULL) {
+ device_printf(dev, "Can not find watchdog device.\n");
+ goto fail;
+ }
+ sc->sb_dev = sb_dev;
+
+ /* Get watchdog memory base. */
+ pmbase = pci_read_config(sb_dev, VIAWD_CONFIG_BASE, 4);
+ if (pmbase == 0) {
+ device_printf(dev,
+ "Watchdog disabled in BIOS or hardware\n");
+ goto fail;
+ }
+
+ /* Allocate I/O register space. */
+ sc->wd_rid = 0;
+ sc->wd_res = bus_alloc_resource(dev, SYS_RES_MEMORY, &sc->wd_rid,
+ pmbase, pmbase + VIAWD_MEM_LEN - 1, VIAWD_MEM_LEN,
+ RF_ACTIVE | RF_SHAREABLE);
+ if (sc->wd_res == NULL) {
+ device_printf(dev, "Unable to map watchdog memory\n");
+ goto fail;
+ }
+
+ /* Check if watchdog fired last boot. */
+ reg = viawd_read_4(sc, VIAWD_MEM_CTRL);
+ if (reg & VIAWD_MEM_CTRL_FIRED) {
+ device_printf(dev,
+ "ERROR: watchdog rebooted the system\n");
+ /* Reset bit state. */
+ viawd_write_4(sc, VIAWD_MEM_CTRL, reg);
+ }
+
+ /* Register the watchdog event handler. */
+ sc->ev_tag = EVENTHANDLER_REGISTER(watchdog_list, viawd_event, sc, 0);
+
+ return (0);
+fail:
+ if (sc->wd_res != NULL)
+ bus_release_resource(dev, SYS_RES_MEMORY,
+ sc->wd_rid, sc->wd_res);
+ return (ENXIO);
+}
+
+static int
+viawd_detach(device_t dev)
+{
+ struct viawd_softc *sc;
+ uint32_t reg;
+
+ sc = device_get_softc(dev);
+
+ /* Deregister event handler. */
+ if (sc->ev_tag != NULL)
+ EVENTHANDLER_DEREGISTER(watchdog_list, sc->ev_tag);
+ sc->ev_tag = NULL;
+
+ /*
+ * Do not stop the watchdog on shutdown if active but bump the
+ * timer to avoid spurious reset.
+ */
+ reg = viawd_read_4(sc, VIAWD_MEM_CTRL);
+ if (reg & VIAWD_MEM_CTRL_ENABLE) {
+ viawd_tmr_set(sc, VIAWD_TIMEOUT_SHUTDOWN);
+ viawd_tmr_state(sc, 1);
+ device_printf(dev,
+ "Keeping watchog alive during shutdown for %d seconds\n",
+ VIAWD_TIMEOUT_SHUTDOWN);
+ }
+
+ if (sc->wd_res != NULL)
+ bus_release_resource(sc->dev, SYS_RES_MEMORY,
+ sc->wd_rid, sc->wd_res);
+
+ return (0);
+}
+
+static device_method_t viawd_methods[] = {
+ DEVMETHOD(device_identify, viawd_identify),
+ DEVMETHOD(device_probe, viawd_probe),
+ DEVMETHOD(device_attach, viawd_attach),
+ DEVMETHOD(device_detach, viawd_detach),
+ DEVMETHOD(device_shutdown, viawd_detach),
+ {0,0}
+};
+
+static driver_t viawd_driver = {
+ "viawd",
+ viawd_methods,
+ sizeof(struct viawd_softc),
+};
+
+DRIVER_MODULE(viawd, isab, viawd_driver, viawd_devclass, NULL, NULL);
diff --git a/sys/dev/viawd/viawd.h b/sys/dev/viawd/viawd.h
new file mode 100644
index 0000000..d311b88
--- /dev/null
+++ b/sys/dev/viawd/viawd.h
@@ -0,0 +1,73 @@
+/*-
+ * Copyright (c) 2011 Fabien Thomas <fabient@FreeBSD.org>
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _VIAWD_H_
+#define _VIAWD_H_
+
+struct viawd_device {
+ uint16_t device;
+ char *desc;
+};
+
+struct viawd_softc {
+ device_t dev;
+ device_t sb_dev;
+
+ int wd_rid;
+ struct resource *wd_res;
+
+ eventhandler_tag ev_tag;
+ unsigned int timeout;
+};
+
+#define VENDORID_VIA 0x1106
+#define DEVICEID_VT8251 0x3287
+#define DEVICEID_CX700 0x8324
+#define DEVICEID_VX800 0x8353
+#define DEVICEID_VX855 0x8409
+#define DEVICEID_VX900 0x8410
+
+#define VIAWD_CONFIG_BASE 0xE8
+
+#define VIAWD_MEM_LEN 8
+
+#define VIAWD_MEM_CTRL 0x00
+#define VIAWD_MEM_CTRL_TRIGGER 0x000000080
+#define VIAWD_MEM_CTRL_DISABLE 0x000000008
+#define VIAWD_MEM_CTRL_POWEROFF 0x000000004
+#define VIAWD_MEM_CTRL_FIRED 0x000000002
+#define VIAWD_MEM_CTRL_ENABLE 0x000000001
+
+#define VIAWD_MEM_COUNT 0x04
+
+#define VIAWD_MEM_COUNT_MIN 1
+#define VIAWD_MEM_COUNT_MAX 1023
+
+#define VIAWD_TIMEOUT_SHUTDOWN (5 * 60)
+
+#endif
diff --git a/sys/dev/vx/if_vx.c b/sys/dev/vx/if_vx.c
index 1ea0faf..090bb0c 100644
--- a/sys/dev/vx/if_vx.c
+++ b/sys/dev/vx/if_vx.c
@@ -188,7 +188,6 @@ vx_attach(device_t dev)
eaddr[(i << 1) + 1] = x;
}
- ifp->if_mtu = ETHERMTU;
ifp->if_snd.ifq_maxlen = ifqmaxlen;
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
ifp->if_start = vx_start;
diff --git a/sys/dev/vxge/include/vxgehal-ll.h b/sys/dev/vxge/include/vxgehal-ll.h
index 85a95d4..eb0e8e5 100644
--- a/sys/dev/vxge/include/vxgehal-ll.h
+++ b/sys/dev/vxge/include/vxgehal-ll.h
@@ -367,23 +367,23 @@ typedef enum vxge_hal_frame_proto_e {
* configuration mismatch.
* @VXGE_HAL_RING_T_CODE_L3_L4_CKSUM_MISMATCH: Layer 3 and Layer 4 checksum
* presentation configuration mismatch.
- * @VXGE_HAL_RING_T_CODE_L3_PKT_ERR: Layer 3 error¸unparseable packet,
+ * @VXGE_HAL_RING_T_CODE_L3_PKT_ERR: Layer 3 error: unparseable packet,
* such as unknown IPv6 header.
- * @VXGE_HAL_RING_T_CODE_L2_FRM_ERR: Layer 2 error¸frame integrity
+ * @VXGE_HAL_RING_T_CODE_L2_FRM_ERR: Layer 2 error: frame integrity
* error, such as FCS or ECC).
- * @VXGE_HAL_RING_T_CODE_BUF_SIZE_ERR: Buffer size error¸the RxD buffer(
- * s) were not appropriately sized and data loss occurred.
- * @VXGE_HAL_RING_T_CODE_INT_ECC_ERR: Internal ECC error¸RxD corrupted.
- * @VXGE_HAL_RING_T_CODE_BENIGN_OVFLOW: Benign overflow¸the contents of
+ * @VXGE_HAL_RING_T_CODE_BUF_SIZE_ERR: Buffer size error: the RxD buffer(s)
+ * were not appropriately sized and data loss occurred.
+ * @VXGE_HAL_RING_T_CODE_INT_ECC_ERR: Internal ECC error: RxD corrupted.
+ * @VXGE_HAL_RING_T_CODE_BENIGN_OVFLOW: Benign overflow: the contents of
* Segment1 exceeded the capacity of Buffer1 and the remainder
* was placed in Buffer2. Segment2 now starts in Buffer3.
* No data loss or errors occurred.
- * @VXGE_HAL_RING_T_CODE_ZERO_LEN_BUFF: Buffer size 0¸one of the RxDs
+ * @VXGE_HAL_RING_T_CODE_ZERO_LEN_BUFF: Buffer size 0: one of the RxDs
* assigned buffers has a size of 0 bytes.
- * @VXGE_HAL_RING_T_CODE_FRM_DROP: Frame dropped¸either due to
+ * @VXGE_HAL_RING_T_CODE_FRM_DROP: Frame dropped: either due to
* VPath Reset or because of a VPIN mismatch.
* @VXGE_HAL_RING_T_CODE_UNUSED: Unused
- * @VXGE_HAL_RING_T_CODE_MULTI_ERR: Multiple errors¸more than one
+ * @VXGE_HAL_RING_T_CODE_MULTI_ERR: Multiple errors: more than one
* transfer code condition occurred.
*
* Transfer codes returned by adapter.
@@ -2535,7 +2535,7 @@ void vxge_hal_fifo_txdl_vlan_set(
* descriptor.
* @vpath_handle: virtual path handle.
* @txdlh: Descriptor handle.
- * @frag_idx: Index of the data buffer in the caller's scatter-gather list¤
+ * @frag_idx: Index of the data buffer in the caller's scatter-gather list
* (of buffers).
* @dma_pointer: DMA address of the data buffer referenced by @frag_idx.
* @size: Size of the data buffer (in bytes).
@@ -2560,7 +2560,7 @@ vxge_hal_fifo_txdl_buffer_set(
* in fifo descriptor.
* @vpath_handle: Virtual path handle.
* @txdlh: Descriptor handle.
- * @frag_idx: Index of the data buffer in the caller's scatter-gather list¤
+ * @frag_idx: Index of the data buffer in the caller's scatter-gather list
* (of buffers).
* @vaddr: Virtual address of the data buffer.
* @dma_pointer: DMA address of the data buffer referenced by @frag_idx.
diff --git a/sys/dev/vxge/vxge-osdep.h b/sys/dev/vxge/vxge-osdep.h
index cc1dbd6..f358c91 100644
--- a/sys/dev/vxge/vxge-osdep.h
+++ b/sys/dev/vxge/vxge-osdep.h
@@ -161,7 +161,9 @@ typedef uint16_t u16;
typedef int32_t s32;
typedef uint32_t u32;
typedef unsigned long long int u64;
+#ifndef __bool_true_false_are_defined
typedef boolean_t bool;
+#endif
typedef bus_addr_t dma_addr_t;
typedef struct mtx spinlock_t;
typedef struct resource *pci_irq_h;
diff --git a/sys/dev/vxge/vxge.c b/sys/dev/vxge/vxge.c
index 94ca609..0750e35 100644
--- a/sys/dev/vxge/vxge.c
+++ b/sys/dev/vxge/vxge.c
@@ -1378,7 +1378,6 @@ vxge_ifp_setup(device_t ndev)
/* Initialize interface ifnet structure */
if_initname(ifp, device_get_name(ndev), device_get_unit(ndev));
- ifp->if_mtu = ETHERMTU;
ifp->if_baudrate = VXGE_BAUDRATE;
ifp->if_init = vxge_init;
ifp->if_softc = vdev;
diff --git a/sys/dev/wb/if_wb.c b/sys/dev/wb/if_wb.c
index 9c5cd95..43d721c 100644
--- a/sys/dev/wb/if_wb.c
+++ b/sys/dev/wb/if_wb.c
@@ -660,7 +660,6 @@ wb_attach(dev)
}
ifp->if_softc = sc;
if_initname(ifp, device_get_name(dev), device_get_unit(dev));
- ifp->if_mtu = ETHERMTU;
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
ifp->if_ioctl = wb_ioctl;
ifp->if_start = wb_start;
diff --git a/sys/dev/wi/if_wi.c b/sys/dev/wi/if_wi.c
index c31ad7b..d31bdba 100644
--- a/sys/dev/wi/if_wi.c
+++ b/sys/dev/wi/if_wi.c
@@ -108,10 +108,10 @@ __FBSDID("$FreeBSD$");
#include <dev/wi/if_wireg.h>
#include <dev/wi/if_wivar.h>
-static struct ieee80211vap *wi_vap_create(struct ieee80211com *ic,
- const char name[IFNAMSIZ], int unit, int opmode, int flags,
- const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t mac[IEEE80211_ADDR_LEN]);
+static struct ieee80211vap *wi_vap_create(struct ieee80211com *,
+ const char [IFNAMSIZ], int, enum ieee80211_opmode, int,
+ const uint8_t [IEEE80211_ADDR_LEN],
+ const uint8_t [IEEE80211_ADDR_LEN]);
static void wi_vap_delete(struct ieee80211vap *vap);
static void wi_stop_locked(struct wi_softc *sc, int disable);
static void wi_start_locked(struct ifnet *);
@@ -507,10 +507,10 @@ wi_detach(device_t dev)
}
static struct ieee80211vap *
-wi_vap_create(struct ieee80211com *ic,
- const char name[IFNAMSIZ], int unit, int opmode, int flags,
- const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t mac[IEEE80211_ADDR_LEN])
+wi_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit,
+ enum ieee80211_opmode opmode, int flags,
+ const uint8_t bssid[IEEE80211_ADDR_LEN],
+ const uint8_t mac[IEEE80211_ADDR_LEN])
{
struct wi_softc *sc = ic->ic_ifp->if_softc;
struct wi_vap *wvp;
diff --git a/sys/dev/wpi/if_wpi.c b/sys/dev/wpi/if_wpi.c
index 38ebb7e..fc6f9b1 100644
--- a/sys/dev/wpi/if_wpi.c
+++ b/sys/dev/wpi/if_wpi.c
@@ -157,9 +157,9 @@ static const struct wpi_ident wpi_ident_table[] = {
};
static struct ieee80211vap *wpi_vap_create(struct ieee80211com *,
- const char name[IFNAMSIZ], int unit, int opmode,
- int flags, const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t mac[IEEE80211_ADDR_LEN]);
+ const char [IFNAMSIZ], int, enum ieee80211_opmode, int,
+ const uint8_t [IEEE80211_ADDR_LEN],
+ const uint8_t [IEEE80211_ADDR_LEN]);
static void wpi_vap_delete(struct ieee80211vap *);
static int wpi_dma_contig_alloc(struct wpi_softc *, struct wpi_dma_info *,
void **, bus_size_t, bus_size_t, int);
@@ -760,10 +760,10 @@ wpi_detach(device_t dev)
}
static struct ieee80211vap *
-wpi_vap_create(struct ieee80211com *ic,
- const char name[IFNAMSIZ], int unit, int opmode, int flags,
- const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t mac[IEEE80211_ADDR_LEN])
+wpi_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit,
+ enum ieee80211_opmode opmode, int flags,
+ const uint8_t bssid[IEEE80211_ADDR_LEN],
+ const uint8_t mac[IEEE80211_ADDR_LEN])
{
struct wpi_vap *wvp;
struct ieee80211vap *vap;
diff --git a/sys/dev/wtap/if_medium.c b/sys/dev/wtap/if_medium.c
new file mode 100644
index 0000000..74faa5b1
--- /dev/null
+++ b/sys/dev/wtap/if_medium.c
@@ -0,0 +1,120 @@
+/*-
+ * Copyright (c) 2010-2011 Monthadar Al Jaberi, TerraNet AB
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
+ * redistribution must be conditioned upon including a substantially
+ * similar Disclaimer requirement for further binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $FreeBSD$
+ */
+#include "if_wtapvar.h"
+#include "if_medium.h"
+
+void
+init_medium(struct wtap_medium *md)
+{
+
+ DWTAP_PRINTF("%s\n", __func__);
+ STAILQ_INIT(&md->md_pktbuf);
+ mtx_init(&md->md_mtx, "wtap_medium mtx", NULL, MTX_DEF | MTX_RECURSE);
+
+ /* Event handler for sending packets between wtaps */
+ struct eventhandler *eh = (struct eventhandler *)
+ malloc(sizeof(struct eventhandler), M_WTAP, M_NOWAIT | M_ZERO);
+ eh->tq = taskqueue_create("wtap_tx_taskq", M_NOWAIT | M_ZERO,
+ taskqueue_thread_enqueue, &eh->tq);
+ taskqueue_start_threads(&eh->tq, 1, PI_NET, "%s taskq", "wtap_medium");
+ md->tx_handler = eh;
+ /* Mark medium closed by default */
+ md->open = 0;
+}
+
+void
+deinit_medium(struct wtap_medium *md)
+{
+
+ DWTAP_PRINTF("%s\n", __func__);
+ taskqueue_free(md->tx_handler->tq);
+ free(md->tx_handler, M_WTAP);
+}
+
+int
+medium_transmit(struct wtap_medium *md, int id, struct mbuf*m)
+{
+
+ mtx_lock(&md->md_mtx);
+ if (md->open == 0){
+ DWTAP_PRINTF("[%d] dropping m=%p\n", id, m);
+ m_free(m);
+ mtx_unlock(&md->md_mtx);
+ return 0;
+ }
+
+ DWTAP_PRINTF("[%d] transmiting m=%p\n", id, m);
+ struct packet *p = (struct packet *)malloc(sizeof(struct packet),
+ M_WTAP_PACKET, M_ZERO | M_NOWAIT);
+ p->id = id;
+ p->m = m;
+
+ STAILQ_INSERT_TAIL(&md->md_pktbuf, p, pf_list);
+ taskqueue_enqueue(md->tx_handler->tq, &md->tx_handler->proc);
+ mtx_unlock(&md->md_mtx);
+
+ return 0;
+}
+
+struct packet *
+medium_get_next_packet(struct wtap_medium *md)
+{
+ struct packet *p;
+
+ mtx_lock(&md->md_mtx);
+ p = STAILQ_FIRST(&md->md_pktbuf);
+ if (p == NULL){
+ mtx_unlock(&md->md_mtx);
+ return NULL;
+ }
+
+ STAILQ_REMOVE_HEAD(&md->md_pktbuf, pf_list);
+ mtx_unlock(&md->md_mtx);
+ return p;
+}
+
+void
+medium_open(struct wtap_medium *md)
+{
+
+ mtx_lock(&md->md_mtx);
+ md->open = 1;
+ mtx_unlock(&md->md_mtx);
+}
+
+void
+medium_close(struct wtap_medium *md)
+{
+
+ mtx_lock(&md->md_mtx);
+ md->open = 0;
+ mtx_unlock(&md->md_mtx);
+}
diff --git a/sys/dev/wtap/if_medium.h b/sys/dev/wtap/if_medium.h
new file mode 100644
index 0000000..0650a5e
--- /dev/null
+++ b/sys/dev/wtap/if_medium.h
@@ -0,0 +1,72 @@
+/*-
+ * Copyright (c) 2010-2011 Monthadar Al Jaberi, TerraNet AB
+ * All rights reserved.
+ *
+ * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
+ * redistribution must be conditioned upon including a substantially
+ * similar Disclaimer requirement for further binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef __DEV_WTAP_MEDIUM_H__
+#define __DEV_WTAP_MEDIUM_H__
+
+#include "if_wtapvar.h"
+#include "wtap_hal/handler.h"
+
+struct packet {
+ STAILQ_ENTRY(packet) pf_list;
+ struct mbuf * m;
+ int id;
+};
+typedef STAILQ_HEAD(, packet) md_pkthead;
+
+struct wtap_medium {
+ struct mtx md_mtx;
+#if 0
+ int visibility[MAX_NBR_WTAP];
+ struct stailhead *headp;
+ packet_head pktbuf;
+ STAILQ_HEAD(stailhead, packet) pktbuf;
+ STAILQ_HEAD(stailhead, packet) pktbuf;
+ /* = STAILQ_HEAD_INITIALIZER(head); */
+#endif
+ /* 0 means we drop packets, 1 we queue them */
+ int open;
+ md_pkthead md_pktbuf; /* master queue */
+ struct eventhandler *tx_handler;
+ struct timehandler *bc_handler;
+};
+
+extern void init_medium(struct wtap_medium *);
+extern void deinit_medium(struct wtap_medium *);
+extern void medium_open(struct wtap_medium *);
+extern void medium_close(struct wtap_medium *);
+extern int medium_transmit(struct wtap_medium *, int id, struct mbuf*);
+extern struct packet *medium_get_next_packet(struct wtap_medium *);
+
+#endif /* __DEV_WTAP_MEDIUM_H__ */
diff --git a/sys/dev/wtap/if_wtap.c b/sys/dev/wtap/if_wtap.c
new file mode 100644
index 0000000..c257517
--- /dev/null
+++ b/sys/dev/wtap/if_wtap.c
@@ -0,0 +1,904 @@
+/*-
+ * Copyright (c) 2010-2011 Monthadar Al Jaberi, TerraNet AB
+ * All rights reserved.
+ *
+ * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
+ * redistribution must be conditioned upon including a substantially
+ * similar Disclaimer requirement for further binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $FreeBSD$
+ */
+#include "if_wtapvar.h"
+#include <sys/uio.h> /* uio struct */
+#include <sys/jail.h>
+#include <net/if_var.h>
+#include <net/vnet.h>
+
+#include <net80211/ieee80211_ratectl.h>
+#include "if_medium.h"
+
+/* device for IOCTL and read/write for debuggin purposes */
+/* Function prototypes */
+static d_open_t wtap_node_open;
+static d_close_t wtap_node_close;
+static d_write_t wtap_node_write;
+static d_ioctl_t wtap_node_ioctl;
+
+static struct cdevsw wtap_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = 0,
+ .d_open = wtap_node_open,
+ .d_close = wtap_node_close,
+ .d_write = wtap_node_write,
+ .d_ioctl = wtap_node_ioctl,
+ .d_name = "wtapnode",
+};
+
+static int
+wtap_node_open(struct cdev *dev, int oflags, int devtype, struct thread *p)
+{
+
+ int err = 0;
+ uprintf("Opened device \"echo\" successfully.\n");
+ return(err);
+}
+
+static int
+wtap_node_close(struct cdev *dev, int fflag, int devtype, struct thread *p)
+{
+
+ uprintf("Closing device \"echo.\"\n");
+ return(0);
+}
+
+static int
+wtap_node_write(struct cdev *dev, struct uio *uio, int ioflag)
+{
+ int err = 0;
+ struct mbuf *m;
+ struct ifnet *ifp;
+ struct wtap_softc *sc;
+ uint8_t buf[1024];
+ int buf_len;
+
+ uprintf("write device %s \"echo.\"\n", dev->si_name);
+ buf_len = MIN(uio->uio_iov->iov_len, 1024);
+ err = copyin(uio->uio_iov->iov_base, buf, buf_len);
+
+ if (err != 0) {
+ uprintf("Write failed: bad address!\n");
+ return (err);
+ }
+
+ MGETHDR(m, M_DONTWAIT, MT_DATA);
+ m_copyback(m, 0, buf_len, buf);
+
+ CURVNET_SET(TD_TO_VNET(curthread));
+ IFNET_RLOCK_NOSLEEP();
+
+ TAILQ_FOREACH(ifp, &V_ifnet, if_link) {
+ printf("ifp->if_xname = %s\n", ifp->if_xname);
+ if(strcmp(dev->si_name, ifp->if_xname) == 0){
+ printf("found match, correspoding wtap = %s\n",
+ ifp->if_xname);
+ sc = (struct wtap_softc *)ifp->if_softc;
+ printf("wtap id = %d\n", sc->id);
+ wtap_inject(sc, m);
+ }
+ }
+
+ IFNET_RUNLOCK_NOSLEEP();
+ CURVNET_RESTORE();
+
+ return(err);
+}
+
+int
+wtap_node_ioctl(struct cdev *dev, u_long cmd, caddr_t data,
+ int fflag, struct thread *td)
+{
+ int error = 0;
+
+ switch(cmd) {
+ default:
+ DWTAP_PRINTF("Unkown WTAP IOCTL\n");
+ error = EINVAL;
+ }
+ return error;
+}
+
+static int wtap_raw_xmit(struct ieee80211_node *ni, struct mbuf *m,
+ const struct ieee80211_bpf_params *params);
+
+static int
+wtap_medium_enqueue(struct wtap_vap *avp, struct mbuf *m)
+{
+
+ return medium_transmit(avp->av_md, avp->id, m);
+}
+
+static int
+wtap_media_change(struct ifnet *ifp)
+{
+
+ DWTAP_PRINTF("%s\n", __func__);
+ int error = ieee80211_media_change(ifp);
+ /* NB: only the fixed rate can change and that doesn't need a reset */
+ return (error == ENETRESET ? 0 : error);
+}
+
+/*
+ * Intercept management frames to collect beacon rssi data
+ * and to do ibss merges.
+ */
+static void
+wtap_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m,
+ int subtype, int rssi, int nf)
+{
+ struct ieee80211vap *vap = ni->ni_vap;
+#if 0
+ DWTAP_PRINTF("[%d] %s\n", myath_id(ni), __func__);
+#endif
+ WTAP_VAP(vap)->av_recv_mgmt(ni, m, subtype, rssi, nf);
+}
+
+static int
+wtap_reset_vap(struct ieee80211vap *vap, u_long cmd)
+{
+
+ DWTAP_PRINTF("%s\n", __func__);
+ return 0;
+}
+
+static void
+wtap_beacon_update(struct ieee80211vap *vap, int item)
+{
+ struct ieee80211_beacon_offsets *bo = &WTAP_VAP(vap)->av_boff;
+
+ DWTAP_PRINTF("%s\n", __func__);
+ setbit(bo->bo_flags, item);
+}
+
+/*
+ * Allocate and setup an initial beacon frame.
+ */
+static int
+wtap_beacon_alloc(struct wtap_softc *sc, struct ieee80211_node *ni)
+{
+ struct ieee80211vap *vap = ni->ni_vap;
+ struct wtap_vap *avp = WTAP_VAP(vap);
+
+ DWTAP_PRINTF("[%s] %s\n", ether_sprintf(ni->ni_macaddr), __func__);
+
+ /*
+ * NB: the beacon data buffer must be 32-bit aligned;
+ * we assume the mbuf routines will return us something
+ * with this alignment (perhaps should assert).
+ */
+ avp->beacon = ieee80211_beacon_alloc(ni, &avp->av_boff);
+ if (avp->beacon == NULL) {
+ printf("%s: cannot get mbuf\n", __func__);
+ return ENOMEM;
+ }
+ callout_init(&avp->av_swba, 0);
+ avp->bf_node = ieee80211_ref_node(ni);
+
+ return 0;
+}
+
+static void
+wtap_beacon_config(struct wtap_softc *sc, struct ieee80211vap *vap)
+{
+
+ DWTAP_PRINTF("%s\n", __func__);
+}
+
+static void
+wtap_beacon_intrp(void *arg)
+{
+ struct wtap_vap *avp = arg;
+ struct ieee80211vap *vap = arg;
+ struct mbuf *m;
+
+ KASSERT(vap->iv_state >= IEEE80211_S_RUN,
+ ("not running, state %d", vap->iv_state));
+ DWTAP_PRINTF("[%d] beacon intrp\n", avp->id); //burst mode
+ /*
+ * Update dynamic beacon contents. If this returns
+ * non-zero then we need to remap the memory because
+ * the beacon frame changed size (probably because
+ * of the TIM bitmap).
+ */
+ m = m_dup(avp->beacon, M_DONTWAIT);
+ if (ieee80211_beacon_update(avp->bf_node, &avp->av_boff, m, 0)) {
+ printf("%s, need to remap the memory because the beacon frame"
+ " changed size.\n",__func__);
+ }
+
+ if (ieee80211_radiotap_active_vap(vap))
+ ieee80211_radiotap_tx(vap, m);
+
+#if 0
+ medium_transmit(avp->av_md, avp->id, m);
+#endif
+ wtap_medium_enqueue(avp, m);
+ callout_schedule(&avp->av_swba, avp->av_bcinterval);
+}
+
+static int
+wtap_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg)
+{
+ struct ieee80211com *ic = vap->iv_ic;
+ struct wtap_softc *sc = ic->ic_ifp->if_softc;
+ struct wtap_vap *avp = WTAP_VAP(vap);
+ struct ieee80211_node *ni = NULL;
+ int error;
+
+ DWTAP_PRINTF("%s\n", __func__);
+
+ ni = vap->iv_bss;
+ /*
+ * Invoke the parent method to do net80211 work.
+ */
+ error = avp->av_newstate(vap, nstate, arg);
+ if (error != 0)
+ goto bad;
+
+ if (nstate == IEEE80211_S_RUN) {
+ /* NB: collect bss node again, it may have changed */
+ ni = vap->iv_bss;
+ switch (vap->iv_opmode) {
+ case IEEE80211_M_MBSS:
+ error = wtap_beacon_alloc(sc, ni);
+ if (error != 0)
+ goto bad;
+ wtap_beacon_config(sc, vap);
+ callout_reset(&avp->av_swba, avp->av_bcinterval,
+ wtap_beacon_intrp, vap);
+ break;
+ default:
+ goto bad;
+ }
+ }
+ return 0;
+bad:
+ printf("%s: bad\n", __func__);
+ return error;
+}
+
+static void
+wtap_bmiss(struct ieee80211vap *vap)
+{
+ struct wtap_vap *avp = (struct wtap_vap *)vap;
+
+ DWTAP_PRINTF("%s\n", __func__);
+ avp->av_bmiss(vap);
+}
+
+static struct ieee80211vap *
+wtap_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ],
+ int unit, enum ieee80211_opmode opmode, int flags,
+ const uint8_t bssid[IEEE80211_ADDR_LEN],
+ const uint8_t mac[IEEE80211_ADDR_LEN])
+{
+ struct wtap_softc *sc = ic->ic_ifp->if_softc;
+ struct ieee80211vap *vap;
+ struct wtap_vap *avp;
+ int error;
+
+ DWTAP_PRINTF("%s\n", __func__);
+
+ avp = (struct wtap_vap *) malloc(sizeof(struct wtap_vap),
+ M_80211_VAP, M_NOWAIT | M_ZERO);
+ avp->id = sc->id;
+ avp->av_md = sc->sc_md;
+ avp->av_bcinterval = BEACON_INTRERVAL + 100*sc->id;
+ vap = (struct ieee80211vap *) avp;
+ error = ieee80211_vap_setup(ic, vap, name, unit, IEEE80211_M_MBSS,
+ flags | IEEE80211_CLONE_NOBEACONS, bssid, mac);
+
+ /* override various methods */
+ avp->av_recv_mgmt = vap->iv_recv_mgmt;
+ vap->iv_recv_mgmt = wtap_recv_mgmt;
+ vap->iv_reset = wtap_reset_vap;
+ vap->iv_update_beacon = wtap_beacon_update;
+ avp->av_newstate = vap->iv_newstate;
+ vap->iv_newstate = wtap_newstate;
+ avp->av_bmiss = vap->iv_bmiss;
+ vap->iv_bmiss = wtap_bmiss;
+
+ /* complete setup */
+ ieee80211_vap_attach(vap, wtap_media_change, ieee80211_media_status);
+ avp->av_dev = make_dev(&wtap_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600,
+ (const char *)ic->ic_ifp->if_xname);
+
+ /* TODO this is a hack to force it to choose the rate we want */
+ vap->iv_bss->ni_txrate = 130;
+ return vap;
+}
+
+static void
+wtap_vap_delete(struct ieee80211vap *vap)
+{
+ struct wtap_vap *avp = WTAP_VAP(vap);
+
+ DWTAP_PRINTF("%s\n", __func__);
+ destroy_dev(avp->av_dev);
+ callout_stop(&avp->av_swba);
+ ieee80211_vap_detach(vap);
+ free((struct wtap_vap*) vap, M_80211_VAP);
+}
+
+/* NB: This function is not used.
+ * I had the problem of the queue
+ * being empty all the time.
+ * Maybe I am setting the queue wrong?
+ */
+static void
+wtap_start(struct ifnet *ifp)
+{
+ struct ieee80211com *ic = ifp->if_l2com;
+ struct ifnet *icifp = ic->ic_ifp;
+ struct wtap_softc *sc = icifp->if_softc;
+ struct ieee80211_node *ni;
+ struct mbuf *m;
+
+ DWTAP_PRINTF("my_start, with id=%u\n", sc->id);
+
+ if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || sc->up == 0)
+ return;
+ for (;;) {
+ if(IFQ_IS_EMPTY(&ifp->if_snd)){
+ printf("queue empty, just trying to see "
+ "if the other queue is empty\n");
+#if 0
+ printf("queue for id=1, %u\n",
+ IFQ_IS_EMPTY(&global_mscs[1]->ifp->if_snd));
+ printf("queue for id=0, %u\n",
+ IFQ_IS_EMPTY(&global_mscs[0]->ifp->if_snd));
+#endif
+ break;
+ }
+ IFQ_DEQUEUE(&ifp->if_snd, m);
+ if (m == NULL) {
+ printf("error dequeueing from ifp->snd\n");
+ break;
+ }
+ ni = (struct ieee80211_node *) m->m_pkthdr.rcvif;
+ /*
+ * Check for fragmentation. If this frame
+ * has been broken up verify we have enough
+ * buffers to send all the fragments so all
+ * go out or none...
+ */
+#if 0
+ STAILQ_INIT(&frags);
+#endif
+ if ((m->m_flags & M_FRAG)){
+ printf("dont support frags\n");
+ ifp->if_oerrors++;
+ return;
+ }
+ ifp->if_opackets++;
+ if(wtap_raw_xmit(ni, m, NULL) < 0){
+ printf("error raw_xmiting\n");
+ ifp->if_oerrors++;
+ return;
+ }
+ }
+}
+
+static int
+wtap_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
+{
+#if 0
+ DWTAP_PRINTF("%s\n", __func__);
+ uprintf("%s, command %lu\n", __func__, cmd);
+#endif
+#define IS_RUNNING(ifp) \
+ ((ifp->if_flags & IFF_UP) && (ifp->if_drv_flags & IFF_DRV_RUNNING))
+ struct ieee80211com *ic = ifp->if_l2com;
+ struct wtap_softc *sc = ifp->if_softc;
+ struct ifreq *ifr = (struct ifreq *)data;
+ int error = 0;
+
+ switch (cmd) {
+ case SIOCSIFFLAGS:
+ //printf("%s: %s\n", __func__, "SIOCSIFFLAGS");
+ if (IS_RUNNING(ifp)) {
+ DWTAP_PRINTF("running\n");
+#if 0
+ /*
+ * To avoid rescanning another access point,
+ * do not call ath_init() here. Instead,
+ * only reflect promisc mode settings.
+ */
+ //ath_mode_init(sc);
+#endif
+ } else if (ifp->if_flags & IFF_UP) {
+ DWTAP_PRINTF("up\n");
+ sc->up = 1;
+#if 0
+ /*
+ * Beware of being called during attach/detach
+ * to reset promiscuous mode. In that case we
+ * will still be marked UP but not RUNNING.
+ * However trying to re-init the interface
+ * is the wrong thing to do as we've already
+ * torn down much of our state. There's
+ * probably a better way to deal with this.
+ */
+ //if (!sc->sc_invalid)
+ // ath_init(sc); /* XXX lose error */
+#endif
+ ifp->if_drv_flags |= IFF_DRV_RUNNING;
+ ieee80211_start_all(ic);
+ } else {
+ DWTAP_PRINTF("stoping\n");
+#if 0
+ ath_stop_locked(ifp);
+#ifdef notyet
+ /* XXX must wakeup in places like ath_vap_delete */
+ if (!sc->sc_invalid)
+ ath_hal_setpower(sc->sc_ah, HAL_PM_FULL_SLEEP);
+#endif
+#endif
+ }
+ break;
+ case SIOCGIFMEDIA:
+ case SIOCSIFMEDIA:
+#if 0
+ DWTAP_PRINTF("%s: %s\n", __func__, "SIOCGIFMEDIA|SIOCSIFMEDIA");
+#endif
+ error = ifmedia_ioctl(ifp, ifr, &ic->ic_media, cmd);
+ break;
+ case SIOCGIFADDR:
+#if 0
+ DWTAP_PRINTF("%s: %s\n", __func__, "SIOCGIFADDR");
+#endif
+ error = ether_ioctl(ifp, cmd, data);
+ break;
+ default:
+ DWTAP_PRINTF("%s: %s [%lu]\n", __func__, "EINVAL", cmd);
+ error = EINVAL;
+ break;
+ }
+ return error;
+#undef IS_RUNNING
+}
+
+static void
+wtap_init(void *arg){
+
+ DWTAP_PRINTF("%s\n", __func__);
+}
+
+static void
+wtap_scan_start(struct ieee80211com *ic)
+{
+
+#if 0
+ DWTAP_PRINTF("%s\n", __func__);
+#endif
+}
+
+static void
+wtap_scan_end(struct ieee80211com *ic)
+{
+
+#if 0
+ DWTAP_PRINTF("%s\n", __func__);
+#endif
+}
+
+static void
+wtap_set_channel(struct ieee80211com *ic)
+{
+
+#if 0
+ DWTAP_PRINTF("%s\n", __func__);
+#endif
+}
+
+static int
+wtap_raw_xmit(struct ieee80211_node *ni, struct mbuf *m,
+ const struct ieee80211_bpf_params *params)
+{
+#if 0
+ DWTAP_PRINTF("%s, %p\n", __func__, m);
+#endif
+ struct ieee80211vap *vap = ni->ni_vap;
+ struct wtap_vap *avp = WTAP_VAP(vap);
+
+ if (ieee80211_radiotap_active_vap(vap)) {
+ ieee80211_radiotap_tx(vap, m);
+ }
+ if (m->m_flags & M_TXCB)
+ ieee80211_process_callback(ni, m, 0);
+ ieee80211_free_node(ni);
+ return wtap_medium_enqueue(avp, m);
+}
+
+void
+wtap_inject(struct wtap_softc *sc, struct mbuf *m)
+{
+ struct wtap_buf *bf = (struct wtap_buf *)malloc(sizeof(struct wtap_buf),
+ M_WTAP_RXBUF, M_NOWAIT | M_ZERO);
+ KASSERT(bf != NULL, ("could not allocated a new wtap_buf\n"));
+ bf->m = m;
+
+ mtx_lock(&sc->sc_mtx);
+ STAILQ_INSERT_TAIL(&sc->sc_rxbuf, bf, bf_list);
+ taskqueue_enqueue(sc->sc_tq, &sc->sc_rxtask);
+ mtx_unlock(&sc->sc_mtx);
+}
+
+void
+wtap_rx_deliver(struct wtap_softc *sc, struct mbuf *m)
+{
+ struct ifnet *ifp = sc->sc_ifp;
+ struct ieee80211com *ic = ifp->if_l2com;
+ struct ieee80211_node *ni;
+ int type;
+#if 0
+ DWTAP_PRINTF("%s\n", __func__);
+#endif
+
+ DWTAP_PRINTF("[%d] receiving m=%p\n", sc->id, m);
+ if (m == NULL) { /* NB: shouldn't happen */
+ if_printf(ifp, "%s: no mbuf!\n", __func__);
+ }
+
+ ifp->if_ipackets++;
+
+ ieee80211_dump_pkt(ic, mtod(m, caddr_t), 0,0,0);
+
+ /*
+ * Locate the node for sender, track state, and then
+ * pass the (referenced) node up to the 802.11 layer
+ * for its use.
+ */
+ ni = ieee80211_find_rxnode_withkey(ic,
+ mtod(m, const struct ieee80211_frame_min *),IEEE80211_KEYIX_NONE);
+ if (ni != NULL) {
+ /*
+ * Sending station is known, dispatch directly.
+ */
+ type = ieee80211_input(ni, m, 1<<7, 10);
+ ieee80211_free_node(ni);
+ } else {
+ type = ieee80211_input_all(ic, m, 1<<7, 10);
+ }
+}
+
+static void
+wtap_rx_proc(void *arg, int npending)
+{
+ struct wtap_softc *sc = (struct wtap_softc *)arg;
+ struct ifnet *ifp = sc->sc_ifp;
+ struct ieee80211com *ic = ifp->if_l2com;
+ struct mbuf *m;
+ struct ieee80211_node *ni;
+ int type;
+ struct wtap_buf *bf;
+
+#if 0
+ DWTAP_PRINTF("%s\n", __func__);
+#endif
+
+ for(;;) {
+ mtx_lock(&sc->sc_mtx);
+ bf = STAILQ_FIRST(&sc->sc_rxbuf);
+ if (bf == NULL) {
+ mtx_unlock(&sc->sc_mtx);
+ return;
+ }
+ STAILQ_REMOVE_HEAD(&sc->sc_rxbuf, bf_list);
+ mtx_unlock(&sc->sc_mtx);
+ KASSERT(bf != NULL, ("wtap_buf is NULL\n"));
+ m = bf->m;
+ DWTAP_PRINTF("[%d] receiving m=%p\n", sc->id, bf->m);
+ if (m == NULL) { /* NB: shouldn't happen */
+ if_printf(ifp, "%s: no mbuf!\n", __func__);
+ free(bf, M_WTAP_RXBUF);
+ return;
+ }
+
+ ifp->if_ipackets++;
+#if 0
+ ieee80211_dump_pkt(ic, mtod(m, caddr_t), 0,0,0);
+#endif
+
+ /*
+ * Locate the node for sender, track state, and then
+ * pass the (referenced) node up to the 802.11 layer
+ * for its use.
+ */
+ ni = ieee80211_find_rxnode_withkey(ic,
+ mtod(m, const struct ieee80211_frame_min *),
+ IEEE80211_KEYIX_NONE);
+ if (ni != NULL) {
+ /*
+ * Sending station is known, dispatch directly.
+ */
+#if 0
+ ieee80211_radiotap_rx(ni->ni_vap, m);
+#endif
+ type = ieee80211_input(ni, m, 1<<7, 10);
+ ieee80211_free_node(ni);
+ } else {
+#if 0
+ ieee80211_radiotap_rx_all(ic, m);
+#endif
+ type = ieee80211_input_all(ic, m, 1<<7, 10);
+ }
+
+ /* The mbufs are freed by the Net80211 stack */
+ free(bf, M_WTAP_RXBUF);
+ }
+}
+
+static void
+wtap_newassoc(struct ieee80211_node *ni, int isnew)
+{
+
+ DWTAP_PRINTF("%s\n", __func__);
+}
+
+/*
+ * Callback from the 802.11 layer to update WME parameters.
+ */
+static int
+wtap_wme_update(struct ieee80211com *ic)
+{
+
+ DWTAP_PRINTF("%s\n", __func__);
+ return 0;
+}
+
+static void
+wtap_update_mcast(struct ifnet *ifp)
+{
+
+ DWTAP_PRINTF("%s\n", __func__);
+}
+
+static void
+wtap_update_promisc(struct ifnet *ifp)
+{
+
+ DWTAP_PRINTF("%s\n", __func__);
+}
+
+static int
+wtap_if_transmit(struct ifnet *ifp, struct mbuf *m)
+{
+ struct ieee80211_node *ni =
+ (struct ieee80211_node *) m->m_pkthdr.rcvif;
+ struct ieee80211vap *vap = ni->ni_vap;
+ struct wtap_vap *avp = WTAP_VAP(vap);
+
+ if(ni == NULL){
+ printf("m->m_pkthdr.rcvif is NULL we cant radiotap_tx\n");
+ }else{
+ if (ieee80211_radiotap_active_vap(vap))
+ ieee80211_radiotap_tx(vap, m);
+ }
+ if (m->m_flags & M_TXCB)
+ ieee80211_process_callback(ni, m, 0);
+ ieee80211_free_node(ni);
+ return wtap_medium_enqueue(avp, m);
+}
+
+static struct ieee80211_node *
+wtap_node_alloc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN])
+{
+ struct ieee80211_node *ni;
+
+ DWTAP_PRINTF("%s\n", __func__);
+
+ ni = malloc(sizeof(struct ieee80211_node), M_80211_NODE,
+ M_NOWAIT|M_ZERO);
+
+ ni->ni_txrate = 130;
+ return ni;
+}
+
+static void
+wtap_node_free(struct ieee80211_node *ni)
+{
+ struct ieee80211com *ic = ni->ni_ic;
+ struct wtap_softc *sc = ic->ic_ifp->if_softc;
+
+ DWTAP_PRINTF("%s\n", __func__);
+ sc->sc_node_free(ni);
+}
+
+int32_t
+wtap_attach(struct wtap_softc *sc, const uint8_t *macaddr)
+{
+ struct ifnet *ifp;
+ struct ieee80211com *ic;
+ char wtap_name[] = {'w','T','a','p',sc->id,
+ '_','t','a','s','k','q','\0'};
+
+ DWTAP_PRINTF("%s\n", __func__);
+
+ ifp = if_alloc(IFT_IEEE80211);
+ if (ifp == NULL) {
+ printf("can not if_alloc()\n");
+ return -1;
+ }
+ ic = ifp->if_l2com;
+ if_initname(ifp, "wtap", sc->id);
+
+ sc->sc_ifp = ifp;
+ sc->up = 0;
+
+ STAILQ_INIT(&sc->sc_rxbuf);
+ sc->sc_tq = taskqueue_create(wtap_name, M_NOWAIT | M_ZERO,
+ taskqueue_thread_enqueue, &sc->sc_tq);
+ taskqueue_start_threads(&sc->sc_tq, 1, PI_SOFT, "%s taskQ",
+ ifp->if_xname);
+ TASK_INIT(&sc->sc_rxtask, 0, wtap_rx_proc, sc);
+
+ ifp->if_softc = sc;
+ ifp->if_flags = IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST;
+ ifp->if_start = wtap_start;
+ ifp->if_ioctl = wtap_ioctl;
+ ifp->if_init = wtap_init;
+ IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen);
+ ifp->if_snd.ifq_drv_maxlen = ifqmaxlen;
+ IFQ_SET_READY(&ifp->if_snd);
+
+ ic->ic_ifp = ifp;
+ ic->ic_phytype = IEEE80211_T_DS;
+ ic->ic_opmode = IEEE80211_M_MBSS;
+ ic->ic_caps = IEEE80211_C_MBSS;
+
+ ic->ic_max_keyix = 128; /* A value read from Atheros ATH_KEYMAX */
+
+ ic->ic_regdomain.regdomain = SKU_ETSI;
+ ic->ic_regdomain.country = CTRY_SWEDEN;
+ ic->ic_regdomain.location = 1; /* Indoors */
+ ic->ic_regdomain.isocc[0] = 'S';
+ ic->ic_regdomain.isocc[1] = 'E';
+ /*
+ * Indicate we need the 802.11 header padded to a
+ * 32-bit boundary for 4-address and QoS frames.
+ */
+ ic->ic_flags |= IEEE80211_F_DATAPAD;
+ ic->ic_nchans = 1;
+ ic->ic_channels[0].ic_flags = IEEE80211_CHAN_B;
+ ic->ic_channels[0].ic_freq = 2412;
+
+ ieee80211_ifattach(ic, macaddr);
+
+#if 0
+ /* new prototype hook-ups */
+ msc->if_input = ifp->if_input;
+ ifp->if_input = myath_if_input;
+ msc->if_output = ifp->if_output;
+ ifp->if_output = myath_if_output;
+#endif
+ sc->if_transmit = ifp->if_transmit;
+ ifp->if_transmit = wtap_if_transmit;
+
+ /* override default methods */
+ ic->ic_newassoc = wtap_newassoc;
+#if 0
+ ic->ic_updateslot = myath_updateslot;
+#endif
+ ic->ic_wme.wme_update = wtap_wme_update;
+ ic->ic_vap_create = wtap_vap_create;
+ ic->ic_vap_delete = wtap_vap_delete;
+ ic->ic_raw_xmit = wtap_raw_xmit;
+ ic->ic_update_mcast = wtap_update_mcast;
+ ic->ic_update_promisc = wtap_update_promisc;
+
+ sc->sc_node_alloc = ic->ic_node_alloc;
+ ic->ic_node_alloc = wtap_node_alloc;
+ sc->sc_node_free = ic->ic_node_free;
+ ic->ic_node_free = wtap_node_free;
+
+#if 0
+ ic->ic_node_getsignal = myath_node_getsignal;
+#endif
+ ic->ic_scan_start = wtap_scan_start;
+ ic->ic_scan_end = wtap_scan_end;
+ ic->ic_set_channel = wtap_set_channel;
+
+ ieee80211_radiotap_attach(ic,
+ &sc->sc_tx_th.wt_ihdr, sizeof(sc->sc_tx_th),
+ WTAP_TX_RADIOTAP_PRESENT,
+ &sc->sc_rx_th.wr_ihdr, sizeof(sc->sc_rx_th),
+ WTAP_RX_RADIOTAP_PRESENT);
+
+ /* Work here, we must find a way to populate the rate table */
+#if 0
+ if(ic->ic_rt == NULL){
+ printf("no table for ic_curchan\n");
+ ic->ic_rt = ieee80211_get_ratetable(&ic->ic_channels[0]);
+ }
+ printf("ic->ic_rt =%p\n", ic->ic_rt);
+ printf("rate count %d\n", ic->ic_rt->rateCount);
+
+ uint8_t code = ic->ic_rt->info[0].dot11Rate;
+ uint8_t cix = ic->ic_rt->info[0].ctlRateIndex;
+ uint8_t ctl_rate = ic->ic_rt->info[cix].dot11Rate;
+ printf("code=%d, cix=%d, ctl_rate=%d\n", code, cix, ctl_rate);
+
+ uint8_t rix0 = ic->ic_rt->rateCodeToIndex[130];
+ uint8_t rix1 = ic->ic_rt->rateCodeToIndex[132];
+ uint8_t rix2 = ic->ic_rt->rateCodeToIndex[139];
+ uint8_t rix3 = ic->ic_rt->rateCodeToIndex[150];
+ printf("rix0 %u,rix1 %u,rix2 %u,rix3 %u\n", rix0,rix1,rix2,rix3);
+ printf("lpAckDuration=%u\n", ic->ic_rt->info[0].lpAckDuration);
+ printf("rate=%d\n", ic->ic_rt->info[0].rateKbps);
+#endif
+ return 0;
+}
+
+int32_t
+wtap_detach(struct wtap_softc *sc)
+{
+ struct ifnet *ifp = sc->sc_ifp;
+ struct ieee80211com *ic = ifp->if_l2com;
+
+ DWTAP_PRINTF("%s\n", __func__);
+ ieee80211_ageq_drain(&ic->ic_stageq);
+ ieee80211_ifdetach(ic);
+ if_free(ifp);
+ return 0;
+}
+
+void
+wtap_resume(struct wtap_softc *sc)
+{
+
+ DWTAP_PRINTF("%s\n", __func__);
+}
+
+void
+wtap_suspend(struct wtap_softc *sc)
+{
+
+ DWTAP_PRINTF("%s\n", __func__);
+}
+
+void
+wtap_shutdown(struct wtap_softc *sc)
+{
+
+ DWTAP_PRINTF("%s\n", __func__);
+}
+
+void
+wtap_intr(struct wtap_softc *sc)
+{
+
+ DWTAP_PRINTF("%s\n", __func__);
+}
diff --git a/sys/dev/wtap/if_wtap_module.c b/sys/dev/wtap/if_wtap_module.c
new file mode 100644
index 0000000..d0108af
--- /dev/null
+++ b/sys/dev/wtap/if_wtap_module.c
@@ -0,0 +1,186 @@
+/*-
+ * Copyright (c) 2010-2011 Monthadar Al Jaberi, TerraNet AB
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
+ * redistribution must be conditioned upon including a substantially
+ * similar Disclaimer requirement for further binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $FreeBSD$
+ */
+#include <sys/param.h>
+#include <sys/module.h>
+#include <sys/kernel.h>
+#include <sys/systm.h>
+#include <sys/sysctl.h>
+#include <sys/mbuf.h>
+#include <sys/malloc.h>
+#include <sys/lock.h>
+#include <sys/mutex.h>
+#include <sys/proc.h>
+#include <sys/ucred.h>
+#include <sys/jail.h>
+
+#include <sys/types.h>
+#include <sys/sockio.h>
+#include <sys/socket.h>
+#include <sys/socketvar.h>
+#include <sys/errno.h>
+#include <sys/callout.h>
+#include <sys/endian.h>
+#include <sys/kthread.h>
+#include <sys/taskqueue.h>
+#include <sys/priv.h>
+#include <sys/sysctl.h>
+
+#include <machine/bus.h>
+
+#include <net/if.h>
+#include <net/if_dl.h>
+#include <net/if_media.h>
+#include <net/if_types.h>
+#include <net/if_arp.h>
+#include <net/ethernet.h>
+#include <net/if_llc.h>
+#include <net/vnet.h>
+
+#include <net80211/ieee80211_var.h>
+#include <net80211/ieee80211_regdomain.h>
+
+#include <net/bpf.h>
+
+
+#include <sys/errno.h>
+#include <sys/conf.h> /* cdevsw struct */
+#include <sys/uio.h> /* uio struct */
+
+
+#include <netinet/in.h>
+#include <netinet/if_ether.h>
+
+#include "if_wtapvar.h"
+#include "if_wtapioctl.h"
+#include "if_medium.h"
+#include "wtap_hal/hal.h"
+
+/* WTAP PLUGINS */
+#include "plugins/visibility.h"
+
+MALLOC_DEFINE(M_WTAP, "wtap", "wtap wireless simulator");
+MALLOC_DEFINE(M_WTAP_PACKET, "wtap packet", "wtap wireless simulator packet");
+MALLOC_DEFINE(M_WTAP_RXBUF, "wtap rxbuf",
+ "wtap wireless simulator recieve buffer");
+MALLOC_DEFINE(M_WTAP_PLUGIN, "wtap plugin", "wtap wireless simulator plugin");
+
+static struct wtap_hal *hal;
+
+/* Function prototypes */
+static d_ioctl_t wtap_ioctl;
+
+static struct cdev *sdev;
+static struct cdevsw wtap_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = 0,
+ .d_ioctl = wtap_ioctl,
+ .d_name = "wtapctl",
+};
+
+int
+wtap_ioctl(struct cdev *dev, u_long cmd, caddr_t data,
+ int fflag, struct thread *td)
+{
+ int error = 0;
+
+ CURVNET_SET(CRED_TO_VNET(curthread->td_ucred));
+
+ switch(cmd) {
+ case WTAPIOCTLCRT:
+ if(new_wtap(hal, *(int *)data))
+ error = EINVAL;
+ break;
+ case WTAPIOCTLDEL:
+ if(free_wtap(hal, *(int *)data))
+ error = EINVAL;
+ break;
+ default:
+ DWTAP_PRINTF("Unkown WTAP IOCTL\n");
+ error = EINVAL;
+ }
+
+ CURVNET_RESTORE();
+ return error;
+}
+
+
+/* The function called at load/unload. */
+static int
+event_handler(module_t module, int event, void *arg)
+{
+ struct visibility_plugin *plugin;
+ int e = 0; /* Error, 0 for normal return status */
+
+ switch (event) {
+ case MOD_LOAD:
+ sdev = make_dev(&wtap_cdevsw,0,UID_ROOT,
+ GID_WHEEL,0600,(const char *)"wtapctl");
+ hal = (struct wtap_hal *)malloc(sizeof(struct wtap_hal),
+ M_WTAP, M_NOWAIT | M_ZERO);
+ bzero(hal, sizeof(struct wtap_hal));
+
+ init_hal(hal);
+
+ /* Setting up a simple plugin */
+ plugin = (struct visibility_plugin *)malloc
+ (sizeof(struct visibility_plugin), M_WTAP_PLUGIN,
+ M_NOWAIT | M_ZERO);
+ plugin->base.wp_hal = hal;
+ plugin->base.init = visibility_init;
+ plugin->base.deinit = visibility_deinit;
+ plugin->base.work = visibility_work;
+ register_plugin(hal, (struct wtap_plugin *)plugin);
+
+ printf("Loaded wtap wireless simulator\n");
+ break;
+ case MOD_UNLOAD:
+ destroy_dev(sdev);
+ deregister_plugin(hal);
+ deinit_hal(hal);
+ free(hal, M_WTAP);
+ printf("Unloading wtap wireless simulator\n");
+ break;
+ default:
+ e = EOPNOTSUPP; /* Error, Operation Not Supported */
+ break;
+ }
+
+ return(e);
+}
+
+/* The second argument of DECLARE_MODULE. */
+static moduledata_t wtap_conf = {
+ "wtap", /* module name */
+ event_handler, /* event handler */
+ NULL /* extra data */
+};
+
+DECLARE_MODULE(wtap, wtap_conf, SI_SUB_DRIVERS, SI_ORDER_MIDDLE);
diff --git a/sys/dev/wtap/if_wtapioctl.h b/sys/dev/wtap/if_wtapioctl.h
new file mode 100644
index 0000000..23d0f17
--- /dev/null
+++ b/sys/dev/wtap/if_wtapioctl.h
@@ -0,0 +1,180 @@
+/*-
+ * Copyright (c) 2010-2011 Monthadar Al Jaberi, TerraNet AB
+ * All rights reserved.
+ *
+ * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
+ * redistribution must be conditioned upon including a substantially
+ * similar Disclaimer requirement for further binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $FreeBSD$
+ */
+
+/*
+ * Ioctl-related defintions for the Wireless TAP
+ * based on Atheros Wireless LAN controller driver.
+ */
+
+#ifndef _DEV_WTAP_WTAPIOCTL_H
+#define _DEV_WTAP_WTAPIOCTL_H
+
+#include <sys/param.h>
+#include <net80211/ieee80211_radiotap.h>
+
+#define SIOCGATHSTATS _IOWR('i', 137, struct ifreq)
+#define SIOCZATHSTATS _IOWR('i', 139, struct ifreq)
+
+#define WTAPIOCTLCRT _IOW('W', 1, int)
+#define WTAPIOCTLDEL _IOW('W', 2, int)
+
+struct wtap_stats {
+ u_int32_t ast_watchdog; /* device reset by watchdog */
+ u_int32_t ast_hardware; /* fatal hardware error interrupts */
+ u_int32_t ast_bmiss; /* beacon miss interrupts */
+ u_int32_t ast_bmiss_phantom;/* beacon miss interrupts */
+ u_int32_t ast_bstuck; /* beacon stuck interrupts */
+ u_int32_t ast_rxorn; /* rx overrun interrupts */
+ u_int32_t ast_rxeol; /* rx eol interrupts */
+ u_int32_t ast_txurn; /* tx underrun interrupts */
+ u_int32_t ast_mib; /* mib interrupts */
+ u_int32_t ast_intrcoal; /* interrupts coalesced */
+ u_int32_t ast_tx_packets; /* packet sent on the interface */
+ u_int32_t ast_tx_mgmt; /* management frames transmitted */
+ u_int32_t ast_tx_discard; /* frames discarded prior to assoc */
+ u_int32_t ast_tx_qstop; /* output stopped 'cuz no buffer */
+ u_int32_t ast_tx_encap; /* tx encapsulation failed */
+ u_int32_t ast_tx_nonode; /* tx failed 'cuz no node */
+ u_int32_t ast_tx_nombuf; /* tx failed 'cuz no mbuf */
+ u_int32_t ast_tx_nomcl; /* tx failed 'cuz no cluster */
+ u_int32_t ast_tx_linear; /* tx linearized to cluster */
+ u_int32_t ast_tx_nodata; /* tx discarded empty frame */
+ u_int32_t ast_tx_busdma; /* tx failed for dma resrcs */
+ u_int32_t ast_tx_xretries;/* tx failed 'cuz too many retries */
+ u_int32_t ast_tx_fifoerr; /* tx failed 'cuz FIFO underrun */
+ u_int32_t ast_tx_filtered;/* tx failed 'cuz xmit filtered */
+ u_int32_t ast_tx_shortretry;/* tx on-chip retries (short) */
+ u_int32_t ast_tx_longretry;/* tx on-chip retries (long) */
+ u_int32_t ast_tx_badrate; /* tx failed 'cuz bogus xmit rate */
+ u_int32_t ast_tx_noack; /* tx frames with no ack marked */
+ u_int32_t ast_tx_rts; /* tx frames with rts enabled */
+ u_int32_t ast_tx_cts; /* tx frames with cts enabled */
+ u_int32_t ast_tx_shortpre;/* tx frames with short preamble */
+ u_int32_t ast_tx_altrate; /* tx frames with alternate rate */
+ u_int32_t ast_tx_protect; /* tx frames with protection */
+ u_int32_t ast_tx_ctsburst;/* tx frames with cts and bursting */
+ u_int32_t ast_tx_ctsext; /* tx frames with cts extension */
+ u_int32_t ast_rx_nombuf; /* rx setup failed 'cuz no mbuf */
+ u_int32_t ast_rx_busdma; /* rx setup failed for dma resrcs */
+ u_int32_t ast_rx_orn; /* rx failed 'cuz of desc overrun */
+ u_int32_t ast_rx_crcerr; /* rx failed 'cuz of bad CRC */
+ u_int32_t ast_rx_fifoerr; /* rx failed 'cuz of FIFO overrun */
+ u_int32_t ast_rx_badcrypt;/* rx failed 'cuz decryption */
+ u_int32_t ast_rx_badmic; /* rx failed 'cuz MIC failure */
+ u_int32_t ast_rx_phyerr; /* rx failed 'cuz of PHY err */
+ u_int32_t ast_rx_phy[32]; /* rx PHY error per-code counts */
+ u_int32_t ast_rx_tooshort;/* rx discarded 'cuz frame too short */
+ u_int32_t ast_rx_toobig; /* rx discarded 'cuz frame too large */
+ u_int32_t ast_rx_packets; /* packet recv on the interface */
+ u_int32_t ast_rx_mgt; /* management frames received */
+ u_int32_t ast_rx_ctl; /* rx discarded 'cuz ctl frame */
+ int8_t ast_tx_rssi; /* tx rssi of last ack */
+ int8_t ast_rx_rssi; /* rx rssi from histogram */
+ u_int8_t ast_tx_rate; /* IEEE rate of last unicast tx */
+ u_int32_t ast_be_xmit; /* beacons transmitted */
+ u_int32_t ast_be_nombuf; /* beacon setup failed 'cuz no mbuf */
+ u_int32_t ast_per_cal; /* periodic calibration calls */
+ u_int32_t ast_per_calfail;/* periodic calibration failed */
+ u_int32_t ast_per_rfgain; /* periodic calibration rfgain reset */
+ u_int32_t ast_rate_calls; /* rate control checks */
+ u_int32_t ast_rate_raise; /* rate control raised xmit rate */
+ u_int32_t ast_rate_drop; /* rate control dropped xmit rate */
+ u_int32_t ast_ant_defswitch;/* rx/default antenna switches */
+ u_int32_t ast_ant_txswitch;/* tx antenna switches */
+ u_int32_t ast_ant_rx[8]; /* rx frames with antenna */
+ u_int32_t ast_ant_tx[8]; /* tx frames with antenna */
+ u_int32_t ast_cabq_xmit; /* cabq frames transmitted */
+ u_int32_t ast_cabq_busy; /* cabq found busy */
+ u_int32_t ast_tx_raw; /* tx frames through raw api */
+ u_int32_t ast_ff_txok; /* fast frames tx'd successfully */
+ u_int32_t ast_ff_txerr; /* fast frames tx'd w/ error */
+ u_int32_t ast_ff_rx; /* fast frames rx'd */
+ u_int32_t ast_ff_flush; /* fast frames flushed from staging q */
+ u_int32_t ast_tx_qfull; /* tx dropped 'cuz of queue limit */
+ int8_t ast_rx_noise; /* rx noise floor */
+ u_int32_t ast_tx_nobuf; /* tx dropped 'cuz no ath buffer */
+ u_int32_t ast_tdma_update;/* TDMA slot timing updates */
+ u_int32_t ast_tdma_timers;/* TDMA slot update set beacon timers */
+ u_int32_t ast_tdma_tsf; /* TDMA slot update set TSF */
+ u_int16_t ast_tdma_tsfadjp;/* TDMA slot adjust+ (usec, smoothed)*/
+ u_int16_t ast_tdma_tsfadjm;/* TDMA slot adjust- (usec, smoothed)*/
+ u_int32_t ast_tdma_ack; /* TDMA tx failed 'cuz ACK required */
+ u_int32_t ast_tx_raw_fail;/* raw tx failed 'cuz h/w down */
+ u_int32_t ast_tx_nofrag; /* tx dropped 'cuz no ath frag buffer */
+ u_int32_t ast_be_missed; /* missed beacons */
+ u_int32_t ast_pad[13];
+};
+
+/*
+ * Radio capture format.
+ */
+#define WTAP_RX_RADIOTAP_PRESENT ( \
+ 0)
+
+struct wtap_rx_radiotap_header {
+ struct ieee80211_radiotap_header wr_ihdr;
+#if 0
+ u_int64_t wr_tsf;
+ u_int8_t wr_flags;
+ u_int8_t wr_rate;
+ int8_t wr_antsignal;
+ int8_t wr_antnoise;
+ u_int8_t wr_antenna;
+ u_int8_t wr_pad[3];
+ u_int32_t wr_chan_flags;
+ u_int16_t wr_chan_freq;
+ u_int8_t wr_chan_ieee;
+ int8_t wr_chan_maxpow;
+#endif
+} __packed;
+
+#define WTAP_TX_RADIOTAP_PRESENT ( \
+ 0)
+
+struct wtap_tx_radiotap_header {
+ struct ieee80211_radiotap_header wt_ihdr;
+#if 0
+ u_int64_t wt_tsf;
+ u_int8_t wt_flags;
+ u_int8_t wt_rate;
+ u_int8_t wt_txpower;
+ u_int8_t wt_antenna;
+ u_int32_t wt_chan_flags;
+ u_int16_t wt_chan_freq;
+ u_int8_t wt_chan_ieee;
+ int8_t wt_chan_maxpow;
+#endif
+} __packed;
+
+#endif
diff --git a/sys/dev/wtap/if_wtapvar.h b/sys/dev/wtap/if_wtapvar.h
new file mode 100644
index 0000000..bb165b4
--- /dev/null
+++ b/sys/dev/wtap/if_wtapvar.h
@@ -0,0 +1,163 @@
+/*-
+ * Copyright (c) 2010-2011 Monthadar Al Jaberi, TerraNet AB
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
+ * redistribution must be conditioned upon including a substantially
+ * similar Disclaimer requirement for further binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _DEV_WTAP_WTAPVAR_H
+#define _DEV_WTAP_WTAPVAR_H
+
+#include <sys/cdefs.h>
+#include <sys/param.h>
+#include <sys/conf.h>
+#include <sys/module.h>
+#include <sys/kernel.h>
+#include <sys/systm.h>
+#include <sys/sysctl.h>
+#include <sys/mbuf.h>
+#include <sys/malloc.h>
+#include <sys/lock.h>
+#include <sys/mutex.h>
+
+#include <sys/types.h>
+#include <sys/sockio.h>
+#include <sys/socket.h>
+#include <sys/socketvar.h>
+#include <sys/errno.h>
+#include <sys/callout.h>
+#include <sys/endian.h>
+#include <sys/kthread.h>
+#include <sys/taskqueue.h>
+#include <sys/priv.h>
+#include <sys/sysctl.h>
+
+#include <machine/bus.h>
+
+#include <net/if.h>
+#include <net/if_dl.h>
+#include <net/if_media.h>
+#include <net/if_types.h>
+#include <net/if_arp.h>
+#include <net/ethernet.h>
+#include <net/if_llc.h>
+
+#include <net80211/ieee80211_var.h>
+#include <net80211/ieee80211_regdomain.h>
+
+#include <net/bpf.h>
+
+#include <net/vnet.h>
+
+#include <netinet/in.h>
+#include <netinet/if_ether.h>
+
+#if 0
+#define DWTAP_PRINTF(...) printf(__VA_ARGS__)
+#else
+#define DWTAP_PRINTF(...)
+#endif
+
+#include "if_wtapioctl.h"
+
+#define MAX_NBR_WTAP (64)
+#define BEACON_INTRERVAL (1000)
+
+MALLOC_DECLARE(M_WTAP);
+MALLOC_DECLARE(M_WTAP_PACKET);
+MALLOC_DECLARE(M_WTAP_BEACON);
+MALLOC_DECLARE(M_WTAP_RXBUF);
+MALLOC_DECLARE(M_WTAP_PLUGIN);
+
+/* driver-specific node state */
+struct wtap_node {
+ struct ieee80211_node an_node; /* base class */
+ /* future addons */
+};
+#define WTAP_NODE(ni) ((struct ath_node *)(ni))
+#define WTAP_NODE_CONST(ni) ((const struct ath_node *)(ni))
+
+struct wtap_buf {
+ STAILQ_ENTRY(wtap_buf) bf_list;
+ struct mbuf *m; /* mbuf for buf */
+};
+typedef STAILQ_HEAD(, wtap_buf) wtap_bufhead;
+
+#define WTAP_BUF_BUSY 0x00000002 /* (tx) desc owned by h/w */
+
+struct wtap_vap {
+ struct ieee80211vap av_vap; /* base class */
+ int32_t id; /* wtap id */
+ struct cdev *av_dev; /* userspace injecting frames */
+ struct wtap_medium *av_md; /* back pointer */
+ struct mbuf *beacon; /* beacon */
+ struct ieee80211_node *bf_node; /* pointer to the node */
+ struct ieee80211_beacon_offsets av_boff;/* dynamic update state */
+ struct callout av_swba; /* software beacon alert */
+ uint32_t av_bcinterval; /* beacon interval */
+ void (*av_recv_mgmt)(struct ieee80211_node *,
+ struct mbuf *, int, int, int);
+ int (*av_newstate)(struct ieee80211vap *,
+ enum ieee80211_state, int);
+ void (*av_bmiss)(struct ieee80211vap *);
+};
+#define WTAP_VAP(vap) ((struct wtap_vap *)(vap))
+
+struct taskqueue;
+
+struct wtap_softc {
+ int32_t id;
+ int32_t up;
+ struct ifnet *sc_ifp; /* interface common */
+ struct wtap_medium *sc_md; /* interface medium */
+ struct ieee80211_node* (* sc_node_alloc)
+ (struct ieee80211vap *, const uint8_t [IEEE80211_ADDR_LEN]);
+ void (*sc_node_free)(struct ieee80211_node *);
+ int (*if_output) /* output routine (enqueue) */
+ (struct ifnet *, struct mbuf *, struct sockaddr *, struct route *);
+ void (*if_input) (struct ifnet *, struct mbuf *);/* from h/w driver */
+ int (*if_transmit)(struct ifnet *, struct mbuf *);/* output routine */
+ struct mtx sc_mtx; /* master lock (recursive) */
+ struct taskqueue *sc_tq; /* private task queue */
+ wtap_bufhead sc_rxbuf; /* receive buffer */
+ struct task sc_rxtask; /* rx int processing */
+ struct wtap_tx_radiotap_header sc_tx_th;
+ int sc_tx_th_len;
+ struct wtap_rx_radiotap_header sc_rx_th;
+ int sc_rx_th_len;
+};
+
+int32_t wtap_attach(struct wtap_softc *, const uint8_t *macaddr);
+int32_t wtap_detach(struct wtap_softc *);
+void wtap_resume(struct wtap_softc *);
+void wtap_suspend(struct wtap_softc *);
+void wtap_shutdown(struct wtap_softc *);
+void wtap_intr(struct wtap_softc *);
+void wtap_inject(struct wtap_softc *, struct mbuf *);
+void wtap_rx_deliver(struct wtap_softc *, struct mbuf *);
+
+#endif
diff --git a/sys/dev/wtap/plugins/visibility.c b/sys/dev/wtap/plugins/visibility.c
new file mode 100644
index 0000000..9d2624c
--- /dev/null
+++ b/sys/dev/wtap/plugins/visibility.c
@@ -0,0 +1,241 @@
+/*-
+ * Copyright (c) 2010-2011 Monthadar Al Jaberi, TerraNet AB
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
+ * redistribution must be conditioned upon including a substantially
+ * similar Disclaimer requirement for further binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $FreeBSD$
+ */
+#include <sys/param.h>
+#include <sys/module.h>
+#include <sys/kernel.h>
+#include <sys/systm.h>
+#include <sys/sysctl.h>
+#include <sys/mbuf.h>
+#include <sys/malloc.h>
+#include <sys/lock.h>
+#include <sys/mutex.h>
+#include <sys/proc.h>
+#include <sys/ucred.h>
+#include <sys/jail.h>
+
+#include <sys/types.h>
+#include <sys/sockio.h>
+#include <sys/socket.h>
+#include <sys/socketvar.h>
+#include <sys/errno.h>
+#include <sys/callout.h>
+#include <sys/endian.h>
+#include <sys/kthread.h>
+#include <sys/taskqueue.h>
+#include <sys/priv.h>
+#include <sys/sysctl.h>
+
+#include <machine/bus.h>
+
+#include <net/if.h>
+#include <net/if_dl.h>
+#include <net/if_media.h>
+#include <net/if_types.h>
+#include <net/if_arp.h>
+#include <net/ethernet.h>
+#include <net/if_llc.h>
+#include <net/vnet.h>
+
+#include <net80211/ieee80211_var.h>
+#include <net80211/ieee80211_regdomain.h>
+
+#include <net/bpf.h>
+
+
+#include <sys/errno.h>
+#include <sys/conf.h> /* cdevsw struct */
+#include <sys/uio.h> /* uio struct */
+
+#include <netinet/in.h>
+#include <netinet/if_ether.h>
+
+#include "visibility.h"
+
+/* Function prototypes */
+static d_ioctl_t vis_ioctl;
+
+static struct cdevsw vis_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = 0,
+ .d_ioctl = vis_ioctl,
+ .d_name = "visctl",
+};
+
+void
+visibility_init(struct wtap_plugin *plugin)
+{
+ struct visibility_plugin *vis_plugin;
+
+ vis_plugin = (struct visibility_plugin *) plugin;
+ plugin->wp_sdev = make_dev(&vis_cdevsw,0,UID_ROOT,GID_WHEEL,0600,
+ (const char *)"visctl");
+ plugin->wp_sdev->si_drv1 = vis_plugin;
+ mtx_init(&vis_plugin->pl_mtx, "visibility_plugin mtx",
+ NULL, MTX_DEF | MTX_RECURSE);
+ printf("Using visibility wtap plugin...\n");
+}
+
+void
+visibility_deinit(struct wtap_plugin *plugin)
+{
+ struct visibility_plugin *vis_plugin;
+
+ vis_plugin = (struct visibility_plugin *) plugin;
+ destroy_dev(plugin->wp_sdev);
+ mtx_destroy(&vis_plugin->pl_mtx);
+ free(vis_plugin, M_WTAP_PLUGIN);
+ printf("Removing visibility wtap plugin...\n");
+}
+
+/* We need to use a mutex lock when we read out a visibility map
+ * and when we change visibility map from user space through IOCTL
+ */
+void
+visibility_work(struct wtap_plugin *plugin, struct packet *p)
+{
+ struct visibility_plugin *vis_plugin =
+ (struct visibility_plugin *) plugin;
+ struct wtap_hal *hal = (struct wtap_hal *)vis_plugin->base.wp_hal;
+ struct vis_map *map;
+
+ KASSERT(mtod(p->m, const char *) != (const char *) 0xdeadc0de ||
+ mtod(p->m, const char *) != NULL,
+ ("[%s] got a corrupt packet from master queue, p->m=%p, p->id=%d\n",
+ __func__, p->m, p->id));
+ DWTAP_PRINTF("[%d] BROADCASTING m=%p\n", p->id, p->m);
+ mtx_lock(&vis_plugin->pl_mtx);
+ map = &vis_plugin->pl_node[p->id];
+ mtx_unlock(&vis_plugin->pl_mtx);
+
+ /* This is O(n*n) which is not optimal for large
+ * number of nodes. Another way of doing it is
+ * creating groups of nodes that hear each other.
+ * Atleast for this simple static node plugin.
+ */
+ for(int i=0; i<ARRAY_SIZE; ++i){
+ uint32_t index = map->map[i];
+ for(int j=0; j<32; ++j){
+ int vis = index & 0x01;
+ if(vis){
+ int k = i*ARRAY_SIZE + j;
+ if(hal->hal_devs[k] != NULL
+ && hal->hal_devs[k]->up == 1){
+ struct wtap_softc *sc =
+ hal->hal_devs[k];
+ struct mbuf *m =
+ m_dup(p->m, M_DONTWAIT);
+ DWTAP_PRINTF("[%d] duplicated old_m=%p"
+ "to new_m=%p\n", p->id, p->m, m);
+#if 0
+ printf("[%d] sending to %d\n",
+ p->id, k);
+#endif
+ wtap_inject(sc, m);
+ }
+ }
+ index = index >> 1;
+ }
+ }
+}
+
+static void
+add_link(struct visibility_plugin *vis_plugin, struct link *l)
+{
+
+ mtx_lock(&vis_plugin->pl_mtx);
+ struct vis_map *map = &vis_plugin->pl_node[l->id1];
+ int index = l->id2/ARRAY_SIZE;
+ int bit = l->id2 % ARRAY_SIZE;
+ uint32_t value = 1 << bit;
+ map->map[index] = map->map[index] | value;
+ mtx_unlock(&vis_plugin->pl_mtx);
+#if 0
+ printf("l->id1=%d, l->id2=%d, map->map[%d] = %u, bit=%d\n",
+ l->id1, l->id2, index, map->map[index], bit);
+#endif
+}
+
+static void
+del_link(struct visibility_plugin *vis_plugin, struct link *l)
+{
+
+ mtx_lock(&vis_plugin->pl_mtx);
+ struct vis_map *map = &vis_plugin->pl_node[l->id1];
+ int index = l->id2/ARRAY_SIZE;
+ int bit = l->id2 % ARRAY_SIZE;
+ uint32_t value = 1 << bit;
+ map->map[index] = map->map[index] & ~value;
+ mtx_unlock(&vis_plugin->pl_mtx);
+#if 0
+ printf("map->map[index] = %u\n", map->map[index]);
+#endif
+}
+
+
+int
+vis_ioctl(struct cdev *sdev, u_long cmd, caddr_t data,
+ int fflag, struct thread *td)
+{
+ struct visibility_plugin *vis_plugin =
+ (struct visibility_plugin *) sdev->si_drv1;
+ struct wtap_hal *hal = vis_plugin->base.wp_hal;
+ struct link l;
+ int op;
+ int error = 0;
+
+ CURVNET_SET(CRED_TO_VNET(curthread->td_ucred));
+ switch(cmd) {
+ case VISIOCTLOPEN:
+ op = *(int *)data;
+ if(op == 0)
+ medium_close(hal->hal_md);
+ else
+ medium_open(hal->hal_md);
+ break;
+ case VISIOCTLLINK:
+ l = *(struct link *)data;
+ if(l.op == 0)
+ del_link(vis_plugin, &l);
+ else
+ add_link(vis_plugin, &l);
+#if 0
+ printf("op=%d, id1=%d, id2=%d\n", l.op, l.id1, l.id2);
+#endif
+ break;
+ default:
+ DWTAP_PRINTF("Unkown WTAP IOCTL\n");
+ error = EINVAL;
+ }
+
+ CURVNET_RESTORE();
+ return error;
+}
+
diff --git a/sys/dev/wtap/plugins/visibility.h b/sys/dev/wtap/plugins/visibility.h
new file mode 100644
index 0000000..a5e84b0
--- /dev/null
+++ b/sys/dev/wtap/plugins/visibility.h
@@ -0,0 +1,56 @@
+/*-
+ * Copyright (c) 2011 Monthadar Al Jaberi, TerraNet AB
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
+ * redistribution must be conditioned upon including a substantially
+ * similar Disclaimer requirement for further binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $FreeBSD$
+ */
+#ifndef _VISIBILITY_H_
+#define _VISIBILITY_H_
+
+#include "wtap_plugin.h"
+#include "visibility_ioctl.h"
+
+#define CDEV_GET_SOFTC(x) (x)->si_drv1
+
+#define ARRAY_SIZE (32) //We support a maximum of 1024 nodes for now
+
+struct vis_map {
+ uint32_t map[ARRAY_SIZE];
+};
+
+struct visibility_plugin {
+ struct wtap_plugin base;
+ struct mtx pl_mtx;
+ struct vis_map pl_node[MAX_NBR_WTAP];
+};
+
+void visibility_init(struct wtap_plugin *);
+void visibility_deinit(struct wtap_plugin *);
+void visibility_work(struct wtap_plugin *, struct packet *);
+
+#endif
+
diff --git a/sys/dev/wtap/plugins/visibility_ioctl.h b/sys/dev/wtap/plugins/visibility_ioctl.h
new file mode 100644
index 0000000..08760c6
--- /dev/null
+++ b/sys/dev/wtap/plugins/visibility_ioctl.h
@@ -0,0 +1,51 @@
+/*-
+ * Copyright (c) 2011 Monthadar Al Jaberi, TerraNet AB
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
+ * redistribution must be conditioned upon including a substantially
+ * similar Disclaimer requirement for further binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $FreeBSD$
+ */
+
+/*
+ * Ioctl-related defintions for the Wireless TAP plugins.
+ */
+
+#ifndef _VISIBILITY_IOCTL_H
+#define _VISIBILITY_IOCTL_H
+
+#include <sys/param.h>
+
+struct link {
+ int op; //0 remove, 1 link
+ int id1;
+ int id2;
+};
+
+#define VISIOCTLOPEN _IOW('W', 3, int) // 0 close, 1 open
+#define VISIOCTLLINK _IOW('W', 4, struct link) //
+
+#endif
+
diff --git a/sys/dev/wtap/plugins/wtap_plugin.h b/sys/dev/wtap/plugins/wtap_plugin.h
new file mode 100644
index 0000000..3ced37f
--- /dev/null
+++ b/sys/dev/wtap/plugins/wtap_plugin.h
@@ -0,0 +1,48 @@
+/*-
+ * Copyright (c) 2011 Monthadar Al Jaberi, TerraNet AB
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
+ * redistribution must be conditioned upon including a substantially
+ * similar Disclaimer requirement for further binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $FreeBSD$
+ */
+#ifndef _WTAP_PLUGIN_H_
+#define _WTAP_PLUGIN_H_
+
+#include "../if_wtapvar.h"
+#include "../if_medium.h"
+#include "../wtap_hal/hal.h"
+
+
+struct wtap_plugin {
+ struct cdev *wp_sdev;
+ struct wtap_hal *wp_hal;
+ void (*init)(struct wtap_plugin *);
+ void (*deinit)(struct wtap_plugin *);
+ void (*work)(struct wtap_plugin *, struct packet *p);
+};
+
+#endif
+
diff --git a/sys/dev/wtap/wtap_hal/hal.c b/sys/dev/wtap/wtap_hal/hal.c
new file mode 100644
index 0000000..9ec1ca8
--- /dev/null
+++ b/sys/dev/wtap/wtap_hal/hal.c
@@ -0,0 +1,213 @@
+/*-
+ * Copyright (c) 2010-2011 Monthadar Al Jaberi, TerraNet AB
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
+ * redistribution must be conditioned upon including a substantially
+ * similar Disclaimer requirement for further binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $FreeBSD$
+ */
+#include "hal.h"
+#include "../if_medium.h"
+#include "handler.h"
+
+static void
+hal_tx_proc(void *arg, int npending)
+{
+ struct wtap_hal *hal = (struct wtap_hal *)arg;
+ struct packet *p;
+
+#if 0
+ DWTAP_PRINTF("%s\n", __func__);
+#endif
+
+ hal = (struct wtap_hal *)arg;
+ for(;;){
+ p = medium_get_next_packet(hal->hal_md);
+ if(p == NULL)
+ return;
+
+ hal->plugin->work(hal->plugin, p);
+
+#if 0
+ DWTAP_PRINTF("[%d] freeing m=%p\n", p->id, p->m);
+#endif
+ m_free(p->m);
+ free(p, M_WTAP_PACKET);
+ }
+}
+
+void
+init_hal(struct wtap_hal *hal)
+{
+
+ DWTAP_PRINTF("%s\n", __func__);
+ mtx_init(&hal->hal_mtx, "wtap_hal mtx", NULL, MTX_DEF | MTX_RECURSE);
+
+ hal->hal_md = (struct wtap_medium *)malloc(sizeof(struct wtap_medium),
+ M_WTAP, M_NOWAIT | M_ZERO);
+ bzero(hal->hal_md, sizeof(struct wtap_medium));
+
+ init_medium(hal->hal_md);
+ /* register event handler for packets */
+ TASK_INIT(&hal->hal_md->tx_handler->proc, 0, hal_tx_proc, hal);
+}
+
+void
+register_plugin(struct wtap_hal *hal, struct wtap_plugin *plugin)
+{
+
+ plugin->init(plugin);
+ hal->plugin = plugin;
+}
+
+void
+deregister_plugin(struct wtap_hal *hal)
+{
+
+ hal->plugin->deinit(hal->plugin);
+ hal->plugin = NULL; /* catch illegal usages */
+}
+
+void
+deinit_hal(struct wtap_hal *hal)
+{
+
+ DWTAP_PRINTF("%s\n", __func__);
+ deinit_medium(hal->hal_md);
+ free(hal->hal_md, M_WTAP);
+ mtx_destroy(&hal->hal_mtx);
+}
+
+int32_t
+new_wtap(struct wtap_hal *hal, int32_t id)
+{
+ static const uint8_t mac_pool[64][IEEE80211_ADDR_LEN] = {
+ {0,152,154,152,150,151},
+ {0,152,154,152,150,152},
+ {0,152,154,152,150,153},
+ {0,152,154,152,150,154},
+ {0,152,154,152,150,155},
+ {0,152,154,152,150,156},
+ {0,152,154,152,150,157},
+ {0,152,154,152,150,158},
+ {0,152,154,152,151,151},
+ {0,152,154,152,151,152},
+ {0,152,154,152,151,153},
+ {0,152,154,152,151,154},
+ {0,152,154,152,151,155},
+ {0,152,154,152,151,156},
+ {0,152,154,152,151,157},
+ {0,152,154,152,151,158},
+ {0,152,154,152,152,151},
+ {0,152,154,152,152,152},
+ {0,152,154,152,152,153},
+ {0,152,154,152,152,154},
+ {0,152,154,152,152,155},
+ {0,152,154,152,152,156},
+ {0,152,154,152,152,157},
+ {0,152,154,152,152,158},
+ {0,152,154,152,153,151},
+ {0,152,154,152,153,152},
+ {0,152,154,152,153,153},
+ {0,152,154,152,153,154},
+ {0,152,154,152,153,155},
+ {0,152,154,152,153,156},
+ {0,152,154,152,153,157},
+ {0,152,154,152,153,158},
+ {0,152,154,152,154,151},
+ {0,152,154,152,154,152},
+ {0,152,154,152,154,153},
+ {0,152,154,152,154,154},
+ {0,152,154,152,154,155},
+ {0,152,154,152,154,156},
+ {0,152,154,152,154,157},
+ {0,152,154,152,154,158},
+ {0,152,154,152,155,151},
+ {0,152,154,152,155,152},
+ {0,152,154,152,155,153},
+ {0,152,154,152,155,154},
+ {0,152,154,152,155,155},
+ {0,152,154,152,155,156},
+ {0,152,154,152,155,157},
+ {0,152,154,152,155,158},
+ {0,152,154,152,156,151},
+ {0,152,154,152,156,152},
+ {0,152,154,152,156,153},
+ {0,152,154,152,156,154},
+ {0,152,154,152,156,155},
+ {0,152,154,152,156,156},
+ {0,152,154,152,156,157},
+ {0,152,154,152,156,158},
+ {0,152,154,152,157,151},
+ {0,152,154,152,157,152},
+ {0,152,154,152,157,153},
+ {0,152,154,152,157,154},
+ {0,152,154,152,157,155},
+ {0,152,154,152,157,156},
+ {0,152,154,152,157,157},
+ {0,152,154,152,157,158}
+ };
+
+ DWTAP_PRINTF("%s\n", __func__);
+ uint8_t const *macaddr = mac_pool[id];
+ if(hal->hal_devs[id] != NULL){
+ printf("error, wtap_id=%d already created\n", id);
+ return -1;
+ }
+
+ hal->hal_devs[id] = (struct wtap_softc *)malloc(
+ sizeof(struct wtap_softc), M_WTAP, M_NOWAIT | M_ZERO);
+ bzero(hal->hal_devs[id], sizeof(struct wtap_softc));
+ hal->hal_devs[id]->sc_md = hal->hal_md;
+ hal->hal_devs[id]->id = id;
+ mtx_init(&hal->hal_devs[id]->sc_mtx, "wtap_softc mtx", NULL,
+ MTX_DEF | MTX_RECURSE);
+
+ if(wtap_attach(hal->hal_devs[id], macaddr)){
+ printf("%s, cant alloc new wtap\n", __func__);
+ return -1;
+ }
+
+ return 0;
+}
+
+int32_t
+free_wtap(struct wtap_hal *hal, int32_t id)
+{
+
+ DWTAP_PRINTF("%s\n", __func__);
+ if(hal->hal_devs[id] == NULL){
+ printf("error, wtap_id=%d never created\n", id);
+ return -1;
+ }
+
+ if(wtap_detach(hal->hal_devs[id]))
+ printf("%s, cant alloc new wtap\n", __func__);
+ mtx_destroy(&hal->hal_devs[id]->sc_mtx);
+ free(hal->hal_devs[id], M_WTAP);
+ hal->hal_devs[id] = NULL;
+ return 0;
+}
+
diff --git a/sys/dev/wtap/wtap_hal/hal.h b/sys/dev/wtap/wtap_hal/hal.h
new file mode 100644
index 0000000..f41aed9
--- /dev/null
+++ b/sys/dev/wtap/wtap_hal/hal.h
@@ -0,0 +1,55 @@
+/*-
+ * Copyright (c) 2010-2011 Monthadar Al Jaberi, TerraNet AB
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
+ * redistribution must be conditioned upon including a substantially
+ * similar Disclaimer requirement for further binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _WTAP_HAL_H_
+#define _WTAP_HAL_H_
+
+#include "../if_wtapvar.h"
+#include "../plugins/wtap_plugin.h"
+#include "handler.h"
+
+struct wtap_hal {
+ struct wtap_medium *hal_md;
+ struct mtx hal_mtx;
+ struct wtap_plugin *plugin;
+ struct wtap_softc *hal_devs[MAX_NBR_WTAP];
+};
+
+void init_hal(struct wtap_hal *);
+void deinit_hal(struct wtap_hal *);
+void register_plugin(struct wtap_hal *, struct wtap_plugin *);
+void deregister_plugin(struct wtap_hal *);
+int32_t new_wtap(struct wtap_hal *, int32_t id);
+int32_t free_wtap(struct wtap_hal *, int32_t id);
+
+
+#endif
+
diff --git a/sys/dev/wtap/wtap_hal/handler.h b/sys/dev/wtap/wtap_hal/handler.h
new file mode 100644
index 0000000..ef645fe
--- /dev/null
+++ b/sys/dev/wtap/wtap_hal/handler.h
@@ -0,0 +1,50 @@
+/*-
+ * Copyright (c) 2010-2011 Monthadar Al Jaberi, TerraNet AB
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
+ * redistribution must be conditioned upon including a substantially
+ * similar Disclaimer requirement for further binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _WTAP_HANDLER_H_
+#define _WTAP_HANDLER_H_
+
+#include "../if_wtapvar.h"
+
+struct timehandler {
+ struct callout cb;
+ void (*proc)(void *);
+};
+
+struct taskqueue;
+
+struct eventhandler {
+ struct taskqueue *tq;
+ struct task proc;
+};
+
+#endif
+
diff --git a/sys/dev/xen/console/console.c b/sys/dev/xen/console/console.c
index 5a14623..6a845ca 100644
--- a/sys/dev/xen/console/console.c
+++ b/sys/dev/xen/console/console.c
@@ -50,6 +50,8 @@ static cn_init_t xc_cninit;
static cn_term_t xc_cnterm;
static cn_getc_t xc_cngetc;
static cn_putc_t xc_cnputc;
+static cn_grab_t xc_cngrab;
+static cn_ungrab_t xc_cnungrab;
#define XC_POLLTIME (hz/10)
@@ -126,6 +128,16 @@ xc_cnterm(struct consdev *cp)
{
}
+static void
+xc_cngrab(struct consdev *cp)
+{
+}
+
+static void
+xc_cnungrab(struct consdev *cp)
+{
+}
+
static int
xc_cngetc(struct consdev *dev)
{
diff --git a/sys/dev/xen/netback/netback.c b/sys/dev/xen/netback/netback.c
index f1af844..b2be6e4 100644
--- a/sys/dev/xen/netback/netback.c
+++ b/sys/dev/xen/netback/netback.c
@@ -375,7 +375,6 @@ netif_create(int handle, struct xenbus_device *xdev, char *bridge)
ifp->if_output = ether_output;
ifp->if_start = netback_start;
ifp->if_ioctl = netback_ioctl;
- ifp->if_mtu = ETHERMTU;
ifp->if_snd.ifq_maxlen = NET_TX_RING_SIZE - 1;
DPRINTF("Created %s for domid=%d handle=%d\n", IFNAME(netif), netif->domid, netif->handle);
@@ -530,7 +529,7 @@ make_tx_response(netif_t *netif,
#endif
}
-inline static void
+static inline void
net_tx_action_dealloc(void)
{
gnttab_unmap_grant_ref_t *gop;
diff --git a/sys/dev/xen/netfront/netfront.c b/sys/dev/xen/netfront/netfront.c
index 8d6444a..7dd5639 100644
--- a/sys/dev/xen/netfront/netfront.c
+++ b/sys/dev/xen/netfront/netfront.c
@@ -2145,7 +2145,6 @@ create_netdev(device_t dev)
ifp->if_watchdog = xn_watchdog;
#endif
ifp->if_init = xn_ifinit;
- ifp->if_mtu = ETHERMTU;
ifp->if_snd.ifq_maxlen = NET_TX_RING_SIZE - 1;
ifp->if_hwassist = XN_CSUM_FEATURES;
diff --git a/sys/dev/xen/xenpci/evtchn.c b/sys/dev/xen/xenpci/evtchn.c
index 96c83f0..2d9dd6d 100644
--- a/sys/dev/xen/xenpci/evtchn.c
+++ b/sys/dev/xen/xenpci/evtchn.c
@@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$");
#include <dev/xen/xenpci/xenpcivar.h>
#if defined(__i386__)
-#define __ffs(word) ffs(word)
+#define __ffs(word) (ffs(word) - 1)
#elif defined(__amd64__)
static inline unsigned long __ffs(unsigned long word)
{
diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c
index 0ad57ec..d3e360d 100644
--- a/sys/fs/cd9660/cd9660_vfsops.c
+++ b/sys/fs/cd9660/cd9660_vfsops.c
@@ -95,7 +95,7 @@ static int iso_mountfs(struct vnode *devvp, struct mount *mp);
*/
static int
-cd9660_cmount(struct mntarg *ma, void *data, int flags)
+cd9660_cmount(struct mntarg *ma, void *data, uint64_t flags)
{
struct iso_args args;
struct export_args exp;
diff --git a/sys/fs/ext2fs/ext2_alloc.c b/sys/fs/ext2fs/ext2_alloc.c
index 2f19b87..c834077 100644
--- a/sys/fs/ext2fs/ext2_alloc.c
+++ b/sys/fs/ext2fs/ext2_alloc.c
@@ -42,6 +42,7 @@
#include <sys/vnode.h>
#include <sys/stat.h>
#include <sys/mount.h>
+#include <sys/sysctl.h>
#include <sys/syslog.h>
#include <sys/buf.h>
@@ -52,6 +53,7 @@
#include <fs/ext2fs/ext2_extern.h>
static daddr_t ext2_alloccg(struct inode *, int, daddr_t, int);
+static daddr_t ext2_clusteralloc(struct inode *, int, daddr_t, int);
static u_long ext2_dirpref(struct inode *);
static void ext2_fserr(struct m_ext2fs *, uid_t, char *);
static u_long ext2_hashalloc(struct inode *, int, long, int,
@@ -59,9 +61,6 @@ static u_long ext2_hashalloc(struct inode *, int, long, int,
int));
static daddr_t ext2_nodealloccg(struct inode *, int, daddr_t, int);
static daddr_t ext2_mapsearch(struct m_ext2fs *, char *, daddr_t);
-#ifdef FANCY_REALLOC
-static int ext2_reallocblks(struct vop_reallocblks_args *);
-#endif
/*
* Allocate a block in the file system.
@@ -113,20 +112,20 @@ ext2_alloc(ip, lbn, bpref, size, cred, bnp)
if (bpref >= fs->e2fs->e2fs_bcount)
bpref = 0;
if (bpref == 0)
- cg = ino_to_cg(fs, ip->i_number);
- else
- cg = dtog(fs, bpref);
- bno = (daddr_t)ext2_hashalloc(ip, cg, bpref, fs->e2fs_bsize,
- ext2_alloccg);
- if (bno > 0) {
+ cg = ino_to_cg(fs, ip->i_number);
+ else
+ cg = dtog(fs, bpref);
+ bno = (daddr_t)ext2_hashalloc(ip, cg, bpref, fs->e2fs_bsize,
+ ext2_alloccg);
+ 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(fs->e2fs_bsize);
- ip->i_flag |= IN_CHANGE | IN_UPDATE;
- *bnp = bno;
- return (0);
+ ip->i_blocks += btodb(fs->e2fs_bsize);
+ ip->i_flag |= IN_CHANGE | IN_UPDATE;
+ *bnp = bno;
+ return (0);
}
nospace:
EXT2_UNLOCK(ump);
@@ -150,7 +149,6 @@ nospace:
* the previous block allocation will be used.
*/
-#ifdef FANCY_REALLOC
static SYSCTL_NODE(_vfs, OID_AUTO, ext2fs, CTLFLAG_RW, 0, "EXT2FS filesystem");
static int doasyncfree = 1;
@@ -159,7 +157,6 @@ SYSCTL_INT(_vfs_ext2fs, OID_AUTO, doasyncfree, CTLFLAG_RW, &doasyncfree, 0,
static int doreallocblks = 1;
SYSCTL_INT(_vfs_ext2fs, OID_AUTO, doreallocblks, CTLFLAG_RW, &doreallocblks, 0, "");
-#endif
int
ext2_reallocblks(ap)
@@ -168,11 +165,6 @@ ext2_reallocblks(ap)
struct cluster_save *a_buflist;
} */ *ap;
{
-#ifndef FANCY_REALLOC
-/* printf("ext2_reallocblks not implemented\n"); */
-return ENOSPC;
-#else
-
struct m_ext2fs *fs;
struct inode *ip;
struct vnode *vp;
@@ -184,14 +176,17 @@ return ENOSPC;
int32_t start_lbn, end_lbn, soff, newblk, blkno;
int i, len, start_lvl, end_lvl, pref, ssize;
+ if (doreallocblks == 0)
+ return (ENOSPC);
+
vp = ap->a_vp;
ip = VTOI(vp);
fs = ip->i_e2fs;
ump = ip->i_ump;
-#ifdef UNKLAR
- if (fs->fs_contigsumsize <= 0)
+
+ if (fs->e2fs_contigsumsize <= 0)
return (ENOSPC);
-#endif
+
buflist = ap->a_buflist;
len = buflist->bs_nchildren;
start_lbn = buflist->bs_children[0]->b_lblkno;
@@ -228,11 +223,6 @@ return ENOSPC;
soff = idp->in_off;
}
/*
- * Find the preferred location for the cluster.
- */
- EXT2_LOCK(ump);
- pref = ext2_blkpref(ip, start_lbn, soff, sbap, 0);
- /*
* 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) {
@@ -243,13 +233,16 @@ return ENOSPC;
panic("ext2_reallocblk: start == end");
#endif
ssize = len - (idp->in_off + 1);
- if (bread(vp, idp->in_lbn, (int)fs->e2fs_bsize, NOCRED, &ebp)){
- EXT2_UNLOCK(ump);
+ if (bread(vp, idp->in_lbn, (int)fs->e2fs_bsize, NOCRED, &ebp))
goto fail;
- }
ebap = (int32_t *)ebp->b_data;
}
/*
+ * Find the preferred location for the cluster.
+ */
+ EXT2_LOCK(ump);
+ pref = ext2_blkpref(ip, start_lbn, soff, sbap, 0);
+ /*
* Search the block map looking for an allocation of the desired size.
*/
if ((newblk = (int32_t)ext2_hashalloc(ip, dtog(fs, pref), pref,
@@ -264,15 +257,23 @@ return ENOSPC;
* block pointers in the inode and indirect blocks associated
* with the file.
*/
+#ifdef DEBUG
+ printf("realloc: ino %d, lbns %jd-%jd\n\told:", ip->i_number,
+ (intmax_t)start_lbn, (intmax_t)end_lbn);
+#endif /* DEBUG */
blkno = newblk;
for (bap = &sbap[soff], i = 0; i < len; i++, blkno += fs->e2fs_fpb) {
- if (i == ssize)
+ if (i == ssize) {
bap = ebap;
soff = -i;
+ }
#ifdef DIAGNOSTIC
if (buflist->bs_children[i]->b_blkno != fsbtodb(fs, *bap))
panic("ext2_reallocblks: alloc mismatch");
#endif
+#ifdef DEBUG
+ printf(" %d,", *bap);
+#endif /* DEBUG */
*bap++ = blkno;
}
/*
@@ -308,11 +309,20 @@ return ENOSPC;
/*
* Last, free the old blocks and assign the new blocks to the buffers.
*/
+#ifdef DEBUG
+ printf("\n\tnew:");
+#endif /* DEBUG */
for (blkno = newblk, i = 0; i < len; i++, blkno += fs->e2fs_fpb) {
ext2_blkfree(ip, dbtofsb(fs, buflist->bs_children[i]->b_blkno),
fs->e2fs_bsize);
buflist->bs_children[i]->b_blkno = fsbtodb(fs, blkno);
+#ifdef DEBUG
+ printf(" %d,", blkno);
+#endif /* DEBUG */
}
+#ifdef DEBUG
+ printf("\n");
+#endif /* DEBUG */
return (0);
fail:
@@ -321,8 +331,6 @@ fail:
if (sbap != &ip->i_db[0])
brelse(sbp);
return (ENOSPC);
-
-#endif /* FANCY_REALLOC */
}
/*
@@ -356,7 +364,7 @@ ext2_valloc(pvp, mode, cred, vpp)
* ext2_dirpref else obtain it using ino_to_cg. The preferred inode is
* always the next inode.
*/
- if((mode & IFMT) == IFDIR) {
+ if ((mode & IFMT) == IFDIR) {
cg = ext2_dirpref(pip);
if (fs->e2fs_contigdirs[cg] < 255)
fs->e2fs_contigdirs[cg]++;
@@ -549,13 +557,13 @@ ext2_blkpref(ip, lbn, indx, bap, blocknr)
/* 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 && ip->i_next_alloc_goal != 0)
+ if (ip->i_next_alloc_block == lbn && ip->i_next_alloc_goal != 0)
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)
+ if (bap)
for (tmp = indx - 1; tmp >= 0; tmp--)
if (bap[tmp])
return bap[tmp];
@@ -747,6 +755,7 @@ gotit:
#endif
setbit(bbp, bno);
EXT2_LOCK(ump);
+ ext2_clusteracct(fs, bbp, cg, bno, -1);
fs->e2fs->e2fs_fbcount--;
fs->e2fs_gd[cg].ext2bgd_nbfree--;
fs->e2fs_fmod = 1;
@@ -756,6 +765,116 @@ gotit:
}
/*
+ * Determine whether a cluster can be allocated.
+ */
+static daddr_t
+ext2_clusteralloc(struct inode *ip, int cg, daddr_t bpref, int len)
+{
+ struct m_ext2fs *fs;
+ struct ext2mount *ump;
+ struct buf *bp;
+ char *bbp;
+ int bit, error, got, i, loc, run;
+ int32_t *lp;
+ daddr_t bno;
+
+ fs = ip->i_e2fs;
+ ump = ip->i_ump;
+
+ if (fs->e2fs_maxcluster[cg] < len)
+ return (0);
+
+ EXT2_UNLOCK(ump);
+ error = bread(ip->i_devvp,
+ fsbtodb(fs, fs->e2fs_gd[cg].ext2bgd_b_bitmap),
+ (int)fs->e2fs_bsize, NOCRED, &bp);
+ if (error)
+ goto fail_lock;
+
+ bbp = (char *)bp->b_data;
+ bp->b_xflags |= BX_BKGRDWRITE;
+
+ EXT2_LOCK(ump);
+ /*
+ * Check to see if a cluster of the needed size (or bigger) is
+ * available in this cylinder group.
+ */
+ lp = &fs->e2fs_clustersum[cg].cs_sum[len];
+ for (i = len; i <= fs->e2fs_contigsumsize; i++)
+ if (*lp++ > 0)
+ break;
+ if (i > fs->e2fs_contigsumsize) {
+ /*
+ * Update the cluster summary information to reflect
+ * the true maximum-sized cluster so that future cluster
+ * allocation requests can avoid reading the bitmap only
+ * to find no cluster.
+ */
+ lp = &fs->e2fs_clustersum[cg].cs_sum[len - 1];
+ for (i = len - 1; i > 0; i--)
+ if (*lp-- > 0)
+ break;
+ fs->e2fs_maxcluster[cg] = i;
+ goto fail;
+ }
+ EXT2_UNLOCK(ump);
+
+ /* Search the bitmap to find a big enough cluster like in FFS. */
+ if (dtog(fs, bpref) != cg)
+ bpref = 0;
+ if (bpref != 0)
+ bpref = dtogd(fs, bpref);
+ loc = bpref / NBBY;
+ bit = 1 << (bpref % NBBY);
+ for (run = 0, got = bpref; got < fs->e2fs->e2fs_fpg; got++) {
+ if ((bbp[loc] & bit) != 0)
+ run = 0;
+ else {
+ run++;
+ if (run == len)
+ break;
+ }
+ if ((got & (NBBY - 1)) != (NBBY - 1))
+ bit <<= 1;
+ else {
+ loc++;
+ bit = 1;
+ }
+ }
+
+ if (got >= fs->e2fs->e2fs_fpg)
+ goto fail_lock;
+
+ /* Allocate the cluster that we found. */
+ for (i = 1; i < len; i++)
+ if (!isclr(bbp, got - run + i))
+ panic("ext2_clusteralloc: map mismatch");
+
+ bno = got - run + 1;
+ if (bno >= fs->e2fs->e2fs_fpg)
+ panic("ext2_clusteralloc: allocated out of group");
+
+ EXT2_LOCK(ump);
+ for (i = 0; i < len; i += fs->e2fs_fpb) {
+ setbit(bbp, bno + i);
+ ext2_clusteracct(fs, bbp, cg, bno + i, -1);
+ fs->e2fs->e2fs_fbcount--;
+ fs->e2fs_gd[cg].ext2bgd_nbfree--;
+ }
+ fs->e2fs_fmod = 1;
+ EXT2_UNLOCK(ump);
+
+ bdwrite(bp);
+ return (cg * fs->e2fs->e2fs_fpg + fs->e2fs->e2fs_first_dblock + bno);
+
+fail_lock:
+ EXT2_LOCK(ump);
+fail:
+ brelse(bp);
+ return (0);
+}
+
+/*
* Determine whether an inode can be allocated.
*
* Check to see if an inode is available, and if it is,
@@ -767,8 +886,8 @@ ext2_nodealloccg(struct inode *ip, int cg, daddr_t ipref, int mode)
struct m_ext2fs *fs;
struct buf *bp;
struct ext2mount *ump;
- int error, start, len, loc, map, i;
- char *ibp;
+ int error, start, len;
+ char *ibp, *loc;
ipref--; /* to avoid a lot of (ipref -1) */
if (ipref == -1)
ipref = 0;
@@ -802,25 +921,19 @@ ext2_nodealloccg(struct inode *ip, int cg, daddr_t ipref, int mode)
}
start = ipref / NBBY;
len = howmany(fs->e2fs->e2fs_ipg - ipref, NBBY);
- loc = skpc(0xff, len, &ibp[start]);
- if (loc == 0) {
+ loc = memcchr(&ibp[start], 0xff, len);
+ if (loc == NULL) {
len = start + 1;
start = 0;
- loc = skpc(0xff, len, &ibp[0]);
- if (loc == 0) {
+ loc = memcchr(&ibp[start], 0xff, len);
+ if (loc == NULL) {
printf("cg = %d, ipref = %lld, fs = %s\n",
cg, (long long)ipref, fs->e2fs_fsmnt);
panic("ext2fs_nodealloccg: map corrupted");
/* NOTREACHED */
}
}
- i = start + len - loc;
- map = ibp[i] ^ 0xff;
- if (map == 0) {
- printf("fs = %s\n", fs->e2fs_fsmnt);
- panic("ext2fs_nodealloccg: block not in map");
- }
- ipref = i * NBBY + ffs(map) - 1;
+ ipref = (loc - ibp) * NBBY + ffs(~*loc) - 1;
gotit:
setbit(ibp, ipref);
EXT2_LOCK(ump);
@@ -877,6 +990,7 @@ ext2_blkfree(ip, bno, size)
}
clrbit(bbp, bno);
EXT2_LOCK(ump);
+ ext2_clusteracct(fs, bbp, cg, bno, 1);
fs->e2fs->e2fs_fbcount++;
fs->e2fs_gd[cg].ext2bgd_nbfree++;
fs->e2fs_fmod = 1;
@@ -948,7 +1062,8 @@ ext2_vfree(pvp, ino, mode)
static daddr_t
ext2_mapsearch(struct m_ext2fs *fs, char *bbp, daddr_t bpref)
{
- int start, len, loc, i, map;
+ char *loc;
+ int start, len;
/*
* find the fragment by searching through the free block
@@ -959,25 +1074,19 @@ ext2_mapsearch(struct m_ext2fs *fs, char *bbp, daddr_t bpref)
else
start = 0;
len = howmany(fs->e2fs->e2fs_fpg, NBBY) - start;
- loc = skpc(0xff, len, &bbp[start]);
- if (loc == 0) {
+ loc = memcchr(&bbp[start], 0xff, len);
+ if (loc == NULL) {
len = start + 1;
start = 0;
- loc = skpc(0xff, len, &bbp[start]);
- if (loc == 0) {
+ loc = memcchr(&bbp[start], 0xff, len);
+ if (loc == NULL) {
printf("start = %d, len = %d, fs = %s\n",
start, len, fs->e2fs_fsmnt);
panic("ext2fs_alloccg: map corrupted");
/* NOTREACHED */
}
}
- i = start + len - loc;
- map = bbp[i] ^ 0xff;
- if (map == 0) {
- printf("fs = %s\n", fs->e2fs_fsmnt);
- panic("ext2fs_mapsearch: block not in map");
- }
- return (i * NBBY + ffs(map) - 1);
+ return ((loc - bbp) * NBBY + ffs(~*loc) - 1);
}
/*
diff --git a/sys/fs/ext2fs/ext2_balloc.c b/sys/fs/ext2fs/ext2_balloc.c
index 3fb1976..6e60c6e 100644
--- a/sys/fs/ext2fs/ext2_balloc.c
+++ b/sys/fs/ext2fs/ext2_balloc.c
@@ -156,7 +156,7 @@ ext2_balloc(ip, lbn, size, cred, bpp, flags)
*/
pref = 0;
if ((error = ext2_getlbns(vp, lbn, indirs, &num)) != 0)
- return(error);
+ return (error);
#ifdef DIAGNOSTIC
if (num < 1)
panic ("ext2_balloc: ext2_getlbns returned indirect block");
diff --git a/sys/fs/ext2fs/ext2_bmap.c b/sys/fs/ext2fs/ext2_bmap.c
index c742188..ba8eb63 100644
--- a/sys/fs/ext2fs/ext2_bmap.c
+++ b/sys/fs/ext2fs/ext2_bmap.c
@@ -215,7 +215,7 @@ ext2_bmaparray(vp, bn, bnp, runp, runb)
++bn, ++*runp);
bn = ap->in_off;
if (runb && bn) {
- for(--bn; bn >= 0 && *runb < maxrun &&
+ for (--bn; bn >= 0 && *runb < maxrun &&
is_sequential(ump, ((int32_t *)bp->b_data)[bn],
((int32_t *)bp->b_data)[bn+1]);
--bn, ++*runb);
diff --git a/sys/fs/ext2fs/ext2_extern.h b/sys/fs/ext2fs/ext2_extern.h
index 821809f..d3ab058 100644
--- a/sys/fs/ext2fs/ext2_extern.h
+++ b/sys/fs/ext2fs/ext2_extern.h
@@ -55,12 +55,13 @@ void ext2_blkfree(struct inode *, int32_t, long);
int32_t ext2_blkpref(struct inode *, int32_t, int, int32_t *, int32_t);
int ext2_bmap(struct vop_bmap_args *);
int ext2_bmaparray(struct vnode *, int32_t, int32_t *, int *, int *);
+void ext2_clusteracct(struct m_ext2fs *, char *, int, daddr_t, int);
void ext2_dirbad(struct inode *ip, doff_t offset, char *how);
void ext2_ei2i(struct ext2fs_dinode *, struct inode *);
int ext2_getlbns(struct vnode *, int32_t, struct indir *, int *);
void ext2_i2ei(struct inode *, struct ext2fs_dinode *);
+int ext2_reallocblks(struct vop_reallocblks_args *);
void ext2_itimes(struct vnode *vp);
-int ext2_reallocblks(struct vop_reallocblks_args *);
int ext2_reclaim(struct vop_reclaim_args *);
void ext2_setblock(struct m_ext2fs *, u_char *, int32_t);
int ext2_truncate(struct vnode *, off_t, int, struct ucred *, struct thread *);
diff --git a/sys/fs/ext2fs/ext2_inode.c b/sys/fs/ext2fs/ext2_inode.c
index 2768c52..8d477b2 100644
--- a/sys/fs/ext2fs/ext2_inode.c
+++ b/sys/fs/ext2fs/ext2_inode.c
@@ -229,7 +229,7 @@ ext2_truncate(vp, length, flags, cred, td)
* 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);
+ 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;
@@ -246,8 +246,8 @@ ext2_truncate(vp, length, flags, cred, td)
* 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);
+ 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, td, length, (int)fs->e2fs_bsize);
if (error && (allerror == 0))
@@ -418,7 +418,7 @@ ext2_indirtrunc(ip, lbn, dbn, lastbn, level, countp)
copy = malloc(fs->e2fs_bsize, M_TEMP, M_WAITOK);
bcopy((caddr_t)bap, (caddr_t)copy, (u_int)fs->e2fs_bsize);
bzero((caddr_t)&bap[last + 1],
- (u_int)(NINDIR(fs) - (last + 1)) * sizeof (int32_t));
+ (u_int)(NINDIR(fs) - (last + 1)) * sizeof(int32_t));
if (last == -1)
bp->b_flags |= B_INVAL;
error = bwrite(bp);
diff --git a/sys/fs/ext2fs/ext2_lookup.c b/sys/fs/ext2fs/ext2_lookup.c
index b293d7f..194cd35 100644
--- a/sys/fs/ext2fs/ext2_lookup.c
+++ b/sys/fs/ext2fs/ext2_lookup.c
@@ -1002,7 +1002,7 @@ ext2_dirempty(ip, parentino, cred)
struct dirtemplate dbuf;
struct ext2fs_direct_2 *dp = (struct ext2fs_direct_2 *)&dbuf;
int error, count, namlen;
-#define MINDIRSIZ (sizeof (struct dirtemplate) / 2)
+#define MINDIRSIZ (sizeof(struct dirtemplate) / 2)
for (off = 0; off < ip->i_size; off += dp->e2d_reclen) {
error = vn_rdwr(UIO_READ, ITOV(ip), (caddr_t)dp, MINDIRSIZ,
@@ -1070,7 +1070,7 @@ ext2_checkpath(source, target, cred)
break;
}
error = vn_rdwr(UIO_READ, vp, (caddr_t)&dirbuf,
- sizeof (struct dirtemplate), (off_t)0, UIO_SYSSPACE,
+ sizeof(struct dirtemplate), (off_t)0, UIO_SYSSPACE,
IO_NODELOCKED | IO_NOMACCHECK, cred, NOCRED, NULL,
NULL);
if (error != 0)
diff --git a/sys/fs/ext2fs/ext2_readwrite.c b/sys/fs/ext2fs/ext2_readwrite.c
deleted file mode 100644
index 005369e..0000000
--- a/sys/fs/ext2fs/ext2_readwrite.c
+++ /dev/null
@@ -1,380 +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.
- * 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$
- */
-
-/* XXX TODO: remove these obfuscations (as in ffs_vnops.c). */
-#define BLKSIZE(a, b, c) blksize(a, b, c)
-#define FS struct m_ext2fs
-#define I_FS i_e2fs
-#define READ ext2_read
-#define READ_S "ext2_read"
-#define WRITE ext2_write
-#define WRITE_S "ext2_write"
-
-#include <vm/vm.h>
-#include <vm/vm_extern.h>
-#include <vm/vm_object.h>
-#include <vm/vm_page.h>
-#include <vm/vm_pager.h>
-#include <vm/vnode_pager.h>
-
-#include "opt_directio.h"
-
-/*
- * Vnode op for reading.
- */
-static int
-READ(ap)
- struct vop_read_args /* {
- struct vnode *a_vp;
- struct uio *a_uio;
- int a_ioflag;
- struct ucred *a_cred;
- } */ *ap;
-{
- struct vnode *vp;
- struct inode *ip;
- struct uio *uio;
- FS *fs;
- struct buf *bp;
- daddr_t lbn, nextlbn;
- off_t bytesinfile;
- long size, xfersize, blkoffset;
- int error, orig_resid, seqcount;
- int ioflag;
-
- vp = ap->a_vp;
- uio = ap->a_uio;
- ioflag = ap->a_ioflag;
-
- seqcount = ap->a_ioflag >> IO_SEQSHIFT;
- ip = VTOI(vp);
-
-#ifdef INVARIANTS
- 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
- orig_resid = uio->uio_resid;
- KASSERT(orig_resid >= 0, ("ext2_read: uio->uio_resid < 0"));
- if (orig_resid == 0)
- return (0);
- KASSERT(uio->uio_offset >= 0, ("ext2_read: uio->uio_offset < 0"));
- fs = ip->I_FS;
- if (uio->uio_offset < ip->i_size &&
- uio->uio_offset >= fs->e2fs_maxfilesize)
- return (EOVERFLOW);
-
- 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->e2fs_fsize - 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, blkoffset + uio->uio_resid, seqcount, &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;
- }
-
- /*
- * If IO_DIRECT then set B_DIRECT for the buffer. This
- * will cause us to attempt to release the buffer later on
- * and will cause the buffer cache to attempt to free the
- * underlying pages.
- */
- if (ioflag & IO_DIRECT)
- bp->b_flags |= B_DIRECT;
-
- /*
- * 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;
-
- if (ioflag & (IO_VMIO|IO_DIRECT)) {
- /*
- * If it's VMIO or direct I/O, then we don't
- * need the buf, mark it available for
- * freeing. If it's non-direct VMIO, the VM has
- * the data.
- */
- bp->b_flags |= B_RELBUF;
- brelse(bp);
- } else {
- /*
- * Otherwise let whoever
- * made the request take care of
- * freeing it. We just queue
- * it onto another list.
- */
- bqrelse(bp);
- }
- }
-
- /*
- * This can only happen in the case of an error
- * because the loop above resets bp to NULL on each iteration
- * and on normal completion has not set a new value into it.
- * so it must have come from a 'break' statement
- */
- if (bp != NULL) {
- if (ioflag & (IO_VMIO|IO_DIRECT)) {
- bp->b_flags |= B_RELBUF;
- brelse(bp);
- } else {
- bqrelse(bp);
- }
- }
-
- if ((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;
-{
- struct vnode *vp;
- struct uio *uio;
- struct inode *ip;
- FS *fs;
- struct buf *bp;
- daddr_t lbn;
- off_t osize;
- int blkoffset, error, flags, ioflag, resid, size, seqcount, xfersize;
-
- ioflag = ap->a_ioflag;
- uio = ap->a_uio;
- vp = ap->a_vp;
-
- seqcount = ioflag >> IO_SEQSHIFT;
- ip = VTOI(vp);
-
-#ifdef INVARIANTS
- 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:
- /* XXX differs from ffs -- this is called from ext2_mkdir(). */
- if ((ioflag & IO_SYNC) == 0)
- panic("ext2_write: nonsync dir write");
- break;
- default:
- panic("ext2_write: type %p %d (%jd,%jd)", (void *)vp,
- vp->v_type, (intmax_t)uio->uio_offset,
- (intmax_t)uio->uio_resid);
- }
-
- KASSERT(uio->uio_resid >= 0, ("ext2_write: uio->uio_resid < 0"));
- KASSERT(uio->uio_offset >= 0, ("ext2_write: uio->uio_offset < 0"));
- fs = ip->I_FS;
- if ((uoff_t)uio->uio_offset + uio->uio_resid > fs->e2fs_maxfilesize)
- return (EFBIG);
- /*
- * Maybe this should be above the vnode op call, but so long as
- * file servers have no limits, I don't think it matters.
- */
- if (vn_rlimit_fsize(vp, uio, uio->uio_td))
- return (EFBIG);
-
- resid = uio->uio_resid;
- osize = ip->i_size;
- if (seqcount > BA_SEQMAX)
- flags = BA_SEQMAX << BA_SEQSHIFT;
- else
- flags = seqcount << BA_SEQSHIFT;
- if ((ioflag & IO_SYNC) && !DOINGASYNC(vp))
- flags |= IO_SYNC;
-
- for (error = 0; uio->uio_resid > 0;) {
- lbn = lblkno(fs, uio->uio_offset);
- blkoffset = blkoff(fs, uio->uio_offset);
- xfersize = fs->e2fs_fsize - 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);
-
- /*
- * We must perform a read-before-write if the transfer size
- * does not cover the entire buffer.
- */
- if (fs->e2fs_bsize > xfersize)
- flags |= BA_CLRBUF;
- else
- flags &= ~BA_CLRBUF;
- error = ext2_balloc(ip, lbn, blkoffset + xfersize,
- ap->a_cred, &bp, flags);
- if (error != 0)
- break;
-
- /*
- * If the buffer is not valid and we did not clear garbage
- * out above, we have to do so here even though the write
- * covers the entire buffer in order to avoid a mmap()/write
- * race where another process may see the garbage prior to
- * the uiomove() for a write replacing it.
- */
- if ((bp->b_flags & B_CACHE) == 0 && fs->e2fs_bsize <= xfersize)
- vfs_bio_clrbuf(bp);
- if ((ioflag & (IO_SYNC|IO_INVAL)) == (IO_SYNC|IO_INVAL))
- bp->b_flags |= B_NOCACHE;
- 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|IO_DIRECT)) {
- bp->b_flags |= B_RELBUF;
- }
-
- /*
- * If IO_SYNC each buffer is written synchronously. Otherwise
- * if we have a severe page deficiency write the buffer
- * asynchronously. Otherwise try to cluster, and if that
- * doesn't do it then either do an async write (if O_DIRECT),
- * or a delayed write (if not).
- */
- if (ioflag & IO_SYNC) {
- (void)bwrite(bp);
- } else if (vm_page_count_severe() ||
- buf_dirty_count_severe() ||
- (ioflag & IO_ASYNC)) {
- bp->b_flags |= B_CLUSTEROK;
- bawrite(bp);
- } else if (xfersize + blkoffset == fs->e2fs_fsize) {
- if ((vp->v_mount->mnt_flag & MNT_NOCLUSTERW) == 0) {
- bp->b_flags |= B_CLUSTEROK;
- cluster_write(vp, bp, ip->i_size, seqcount);
- } else {
- bawrite(bp);
- }
- } else if (ioflag & IO_DIRECT) {
- bp->b_flags |= B_CLUSTEROK;
- bawrite(bp);
- } else {
- bp->b_flags |= B_CLUSTEROK;
- bdwrite(bp);
- }
- if (error || xfersize == 0)
- break;
- }
- /*
- * 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 ((ip->i_mode & (ISUID | ISGID)) && resid > uio->uio_resid &&
- ap->a_cred) {
- if (priv_check_cred(ap->a_cred, PRIV_VFS_RETAINSUGID, 0))
- ip->i_mode &= ~(ISUID | ISGID);
- }
- if (error) {
- if (ioflag & IO_UNIT) {
- (void)ext2_truncate(vp, osize,
- ioflag & IO_SYNC, ap->a_cred, uio->uio_td);
- uio->uio_offset -= resid - uio->uio_resid;
- uio->uio_resid = resid;
- }
- }
- if (uio->uio_resid != resid) {
- ip->i_flag |= IN_CHANGE | IN_UPDATE;
- if (ioflag & IO_SYNC)
- error = ext2_update(vp, 1);
- }
- return (error);
-}
diff --git a/sys/fs/ext2fs/ext2_subr.c b/sys/fs/ext2fs/ext2_subr.c
index 70ade83..b8d59bc 100644
--- a/sys/fs/ext2fs/ext2_subr.c
+++ b/sys/fs/ext2fs/ext2_subr.c
@@ -120,3 +120,107 @@ ext2_checkoverlap(bp, ip)
}
}
#endif /* KDB */
+
+/*
+ * Update the cluster map because of an allocation of free like ffs.
+ *
+ * Cnt == 1 means free; cnt == -1 means allocating.
+ */
+void
+ext2_clusteracct(struct m_ext2fs *fs, char *bbp, int cg, daddr_t bno, int cnt)
+{
+ int32_t *sump = fs->e2fs_clustersum[cg].cs_sum;
+ int32_t *lp;
+ int back, bit, end, forw, i, loc, start;
+
+ /* Initialize the cluster summary array. */
+ if (fs->e2fs_clustersum[cg].cs_init == 0) {
+ int run = 0;
+ bit = 1;
+ loc = 0;
+
+ for (i = 0; i < fs->e2fs->e2fs_fpg; i++) {
+ if ((bbp[loc] & bit) == 0)
+ run++;
+ else if (run != 0) {
+ if (run > fs->e2fs_contigsumsize)
+ run = fs->e2fs_contigsumsize;
+ sump[run]++;
+ run = 0;
+ }
+ if ((i & (NBBY - 1)) != (NBBY - 1))
+ bit <<= 1;
+ else {
+ loc++;
+ bit = 1;
+ }
+ }
+ if (run != 0) {
+ if (run > fs->e2fs_contigsumsize)
+ run = fs->e2fs_contigsumsize;
+ sump[run]++;
+ }
+ fs->e2fs_clustersum[cg].cs_init = 1;
+ }
+
+ if (fs->e2fs_contigsumsize <= 0)
+ return;
+
+ /* Find the size of the cluster going forward. */
+ start = bno + 1;
+ end = start + fs->e2fs_contigsumsize;
+ if (end > fs->e2fs->e2fs_fpg)
+ end = fs->e2fs->e2fs_fpg;
+ loc = start / NBBY;
+ bit = 1 << (start % NBBY);
+ for (i = start; i < end; i++) {
+ if ((bbp[loc] & bit) != 0)
+ break;
+ if ((i & (NBBY - 1)) != (NBBY - 1))
+ bit <<= 1;
+ else {
+ loc++;
+ bit = 1;
+ }
+ }
+ forw = i - start;
+
+ /* Find the size of the cluster going backward. */
+ start = bno - 1;
+ end = start - fs->e2fs_contigsumsize;
+ if (end < 0)
+ end = -1;
+ loc = start / NBBY;
+ bit = 1 << (start % NBBY);
+ for (i = start; i > end; i--) {
+ if ((bbp[loc] & bit) != 0)
+ break;
+ if ((i & (NBBY - 1)) != 0)
+ bit >>= 1;
+ else {
+ loc--;
+ bit = 1 << (NBBY - 1);
+ }
+ }
+ back = start - i;
+
+ /*
+ * Account for old cluster and the possibly new forward and
+ * back clusters.
+ */
+ i = back + forw + 1;
+ if (i > fs->e2fs_contigsumsize)
+ i = fs->e2fs_contigsumsize;
+ sump[i] += cnt;
+ if (back > 0)
+ sump[back] -= cnt;
+ if (forw > 0)
+ sump[forw] -= cnt;
+
+ /* Update cluster summary information. */
+ lp = &sump[fs->e2fs_contigsumsize];
+ for (i = fs->e2fs_contigsumsize; i > 0; i--)
+ if (*lp-- > 0)
+ break;
+ fs->e2fs_maxcluster[cg] = i;
+}
diff --git a/sys/fs/ext2fs/ext2_vfsops.c b/sys/fs/ext2fs/ext2_vfsops.c
index 1b47e91..8f7e8b8 100644
--- a/sys/fs/ext2fs/ext2_vfsops.c
+++ b/sys/fs/ext2fs/ext2_vfsops.c
@@ -349,7 +349,7 @@ compute_sb_data(struct vnode *devvp, struct ext2fs *es,
}
fs->e2fs_ipb = fs->e2fs_bsize / EXT2_INODE_SIZE(fs);
fs->e2fs_itpg = fs->e2fs_ipg /fs->e2fs_ipb;
- fs->e2fs_descpb = fs->e2fs_bsize / sizeof (struct ext2_gd);
+ fs->e2fs_descpb = fs->e2fs_bsize / sizeof(struct ext2_gd);
/* s_resuid / s_resgid ? */
fs->e2fs_gcount = (es->e2fs_bcount - es->e2fs_first_dblock +
EXT2_BLOCKS_PER_GROUP(fs) - 1) / EXT2_BLOCKS_PER_GROUP(fs);
@@ -405,7 +405,7 @@ compute_sb_data(struct vnode *devvp, struct ext2fs *es,
* 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.
+ * 3) invalidate all cluster summary information.
* 4) invalidate all inactive vnodes.
* 5) invalidate all cached file data.
* 6) re-read inode data for all active vnodes.
@@ -419,7 +419,9 @@ ext2_reload(struct mount *mp, struct thread *td)
struct buf *bp;
struct ext2fs *es;
struct m_ext2fs *fs;
- int error;
+ struct csum *sump;
+ int error, i;
+ int32_t *lp;
if ((mp->mnt_flag & MNT_RDONLY) == 0)
return (EINVAL);
@@ -456,6 +458,19 @@ ext2_reload(struct mount *mp, struct thread *td)
#endif
brelse(bp);
+ /*
+ * Step 3: invalidate all cluster summary information.
+ */
+ if (fs->e2fs_contigsumsize > 0) {
+ lp = fs->e2fs_maxcluster;
+ sump = fs->e2fs_clustersum;
+ for (i = 0; i < fs->e2fs_gcount; i++, sump++) {
+ *lp++ = fs->e2fs_contigsumsize;
+ sump->cs_init = 0;
+ bzero(sump->cs_sum, fs->e2fs_contigsumsize + 1);
+ }
+ }
+
loop:
MNT_ILOCK(mp);
MNT_VNODE_FOREACH(vp, mp, mvp) {
@@ -511,8 +526,11 @@ ext2_mountfs(struct vnode *devvp, struct mount *mp)
struct cdev *dev = devvp->v_rdev;
struct g_consumer *cp;
struct bufobj *bo;
+ struct csum *sump;
int error;
int ronly;
+ int i, size;
+ int32_t *lp;
ronly = vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0);
/* XXX: use VOP_ACESS to check FS perms */
@@ -565,8 +583,7 @@ ext2_mountfs(struct vnode *devvp, struct mount *mp)
goto out;
}
}
- ump = malloc(sizeof *ump, M_EXT2MNT, M_WAITOK);
- bzero((caddr_t)ump, sizeof *ump);
+ ump = malloc(sizeof(*ump), M_EXT2MNT, M_WAITOK | M_ZERO);
/*
* I don't know whether this is the right strategy. Note that
@@ -582,6 +599,33 @@ ext2_mountfs(struct vnode *devvp, struct mount *mp)
if ((error = compute_sb_data(devvp, ump->um_e2fs->e2fs, ump->um_e2fs)))
goto out;
+ /*
+ * Calculate the maximum contiguous blocks and size of cluster summary
+ * array. In FFS this is done by newfs; however, the superblock
+ * in ext2fs doesn't have these variables, so we can calculate
+ * them here.
+ */
+ ump->um_e2fs->e2fs_maxcontig = MAX(1, MAXPHYS / ump->um_e2fs->e2fs_bsize);
+ if (ump->um_e2fs->e2fs_maxcontig > 0)
+ ump->um_e2fs->e2fs_contigsumsize =
+ MIN(ump->um_e2fs->e2fs_maxcontig, EXT2_MAXCONTIG);
+ else
+ ump->um_e2fs->e2fs_contigsumsize = 0;
+ if (ump->um_e2fs->e2fs_contigsumsize > 0) {
+ size = ump->um_e2fs->e2fs_gcount * sizeof(int32_t);
+ ump->um_e2fs->e2fs_maxcluster = malloc(size, M_EXT2MNT, M_WAITOK);
+ size = ump->um_e2fs->e2fs_gcount * sizeof(struct csum);
+ ump->um_e2fs->e2fs_clustersum = malloc(size, M_EXT2MNT, M_WAITOK);
+ lp = ump->um_e2fs->e2fs_maxcluster;
+ sump = ump->um_e2fs->e2fs_clustersum;
+ for (i = 0; i < ump->um_e2fs->e2fs_gcount; i++, sump++) {
+ *lp++ = ump->um_e2fs->e2fs_contigsumsize;
+ sump->cs_init = 0;
+ sump->cs_sum = malloc((ump->um_e2fs->e2fs_contigsumsize + 1) *
+ sizeof(int32_t), M_EXT2MNT, M_WAITOK | M_ZERO);
+ }
+ }
+
brelse(bp);
bp = NULL;
fs = ump->um_e2fs;
@@ -656,7 +700,8 @@ ext2_unmount(struct mount *mp, int mntflags)
{
struct ext2mount *ump;
struct m_ext2fs *fs;
- int error, flags, ronly;
+ struct csum *sump;
+ int error, flags, i, ronly;
flags = 0;
if (mntflags & MNT_FORCE) {
@@ -681,6 +726,11 @@ ext2_unmount(struct mount *mp, int mntflags)
g_topology_unlock();
PICKUP_GIANT();
vrele(ump->um_devvp);
+ sump = fs->e2fs_clustersum;
+ for (i = 0; i < fs->e2fs_gcount; i++, sump++)
+ free(sump->cs_sum, M_EXT2MNT);
+ free(fs->e2fs_clustersum, M_EXT2MNT);
+ free(fs->e2fs_maxcluster, M_EXT2MNT);
free(fs->e2fs_gd, M_EXT2MNT);
free(fs->e2fs_contigdirs, M_EXT2MNT);
free(fs->e2fs, M_EXT2MNT);
@@ -927,7 +977,7 @@ ext2_vget(struct mount *mp, ino_t ino, int flags, struct vnode **vpp)
*/
if(S_ISDIR(ip->i_mode) || S_ISREG(ip->i_mode)) {
used_blocks = (ip->i_size+fs->e2fs_bsize-1) / fs->e2fs_bsize;
- for(i = used_blocks; i < EXT2_NDIR_BLOCKS; i++)
+ for (i = used_blocks; i < EXT2_NDIR_BLOCKS; i++)
ip->i_db[i] = 0;
}
/*
diff --git a/sys/fs/ext2fs/ext2_vnops.c b/sys/fs/ext2fs/ext2_vnops.c
index f9da170..c357a2a 100644
--- a/sys/fs/ext2fs/ext2_vnops.c
+++ b/sys/fs/ext2fs/ext2_vnops.c
@@ -64,9 +64,13 @@
#include <sys/file.h>
#include <vm/vm.h>
+#include <vm/vm_page.h>
+#include <vm/vm_object.h>
#include <vm/vm_extern.h>
#include <vm/vnode_pager.h>
+#include "opt_directio.h"
+
#include <fs/fifofs/fifo.h>
#include <ufs/ufs/dir.h>
@@ -159,8 +163,6 @@ struct vop_vector ext2_fifoops = {
.vop_vptofh = ext2_vptofh,
};
-#include <fs/ext2fs/ext2_readwrite.c>
-
/*
* A virgin directory (no blushing please).
* Note that the type and namlen fields are reversed relative to ext2.
@@ -1078,7 +1080,7 @@ abortit:
dp->i_nlink--;
dp->i_flag |= IN_CHANGE;
error = vn_rdwr(UIO_READ, fvp, (caddr_t)&dirbuf,
- sizeof (struct dirtemplate), (off_t)0,
+ sizeof(struct dirtemplate), (off_t)0,
UIO_SYSSPACE, IO_NODELOCKED | IO_NOMACCHECK,
tcnp->cn_cred, NOCRED, NULL, NULL);
if (error == 0) {
@@ -1093,7 +1095,7 @@ abortit:
dirbuf.dotdot_ino = newparent;
(void) vn_rdwr(UIO_WRITE, fvp,
(caddr_t)&dirbuf,
- sizeof (struct dirtemplate),
+ sizeof(struct dirtemplate),
(off_t)0, UIO_SYSSPACE,
IO_NODELOCKED | IO_SYNC |
IO_NOMACCHECK, tcnp->cn_cred,
@@ -1231,7 +1233,7 @@ ext2_mkdir(ap)
#define DIRBLKSIZ VTOI(dvp)->i_e2fs->e2fs_bsize
dirtemplate.dotdot_reclen = DIRBLKSIZ - 12;
error = vn_rdwr(UIO_WRITE, tvp, (caddr_t)&dirtemplate,
- sizeof (dirtemplate), (off_t)0, UIO_SYSSPACE,
+ sizeof(dirtemplate), (off_t)0, UIO_SYSSPACE,
IO_NODELOCKED | IO_SYNC | IO_NOMACCHECK, cnp->cn_cred, NOCRED,
NULL, NULL);
if (error) {
@@ -1675,3 +1677,328 @@ bad:
vput(tvp);
return (error);
}
+
+/*
+ * Vnode op for reading.
+ */
+static int
+ext2_read(ap)
+ struct vop_read_args /* {
+ struct vnode *a_vp;
+ struct uio *a_uio;
+ int a_ioflag;
+ struct ucred *a_cred;
+ } */ *ap;
+{
+ struct vnode *vp;
+ struct inode *ip;
+ struct uio *uio;
+ struct m_ext2fs *fs;
+ struct buf *bp;
+ daddr_t lbn, nextlbn;
+ off_t bytesinfile;
+ long size, xfersize, blkoffset;
+ int error, orig_resid, seqcount;
+ int ioflag;
+
+ vp = ap->a_vp;
+ uio = ap->a_uio;
+ ioflag = ap->a_ioflag;
+
+ seqcount = ap->a_ioflag >> IO_SEQSHIFT;
+ ip = VTOI(vp);
+
+#ifdef INVARIANTS
+ if (uio->uio_rw != UIO_READ)
+ panic("%s: mode", "ext2_read");
+
+ if (vp->v_type == VLNK) {
+ if ((int)ip->i_size < vp->v_mount->mnt_maxsymlinklen)
+ panic("%s: short symlink", "ext2_read");
+ } else if (vp->v_type != VREG && vp->v_type != VDIR)
+ panic("%s: type %d", "ext2_read", vp->v_type);
+#endif
+ orig_resid = uio->uio_resid;
+ KASSERT(orig_resid >= 0, ("ext2_read: uio->uio_resid < 0"));
+ if (orig_resid == 0)
+ return (0);
+ KASSERT(uio->uio_offset >= 0, ("ext2_read: uio->uio_offset < 0"));
+ fs = ip->i_e2fs;
+ if (uio->uio_offset < ip->i_size &&
+ uio->uio_offset >= fs->e2fs_maxfilesize)
+ return (EOVERFLOW);
+
+ 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->e2fs_fsize - 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, blkoffset + uio->uio_resid, seqcount, &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;
+ }
+
+ /*
+ * If IO_DIRECT then set B_DIRECT for the buffer. This
+ * will cause us to attempt to release the buffer later on
+ * and will cause the buffer cache to attempt to free the
+ * underlying pages.
+ */
+ if (ioflag & IO_DIRECT)
+ bp->b_flags |= B_DIRECT;
+
+ /*
+ * 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;
+
+ if (ioflag & (IO_VMIO|IO_DIRECT)) {
+ /*
+ * If it's VMIO or direct I/O, then we don't
+ * need the buf, mark it available for
+ * freeing. If it's non-direct VMIO, the VM has
+ * the data.
+ */
+ bp->b_flags |= B_RELBUF;
+ brelse(bp);
+ } else {
+ /*
+ * Otherwise let whoever
+ * made the request take care of
+ * freeing it. We just queue
+ * it onto another list.
+ */
+ bqrelse(bp);
+ }
+ }
+
+ /*
+ * This can only happen in the case of an error
+ * because the loop above resets bp to NULL on each iteration
+ * and on normal completion has not set a new value into it.
+ * so it must have come from a 'break' statement
+ */
+ if (bp != NULL) {
+ if (ioflag & (IO_VMIO|IO_DIRECT)) {
+ bp->b_flags |= B_RELBUF;
+ brelse(bp);
+ } else {
+ bqrelse(bp);
+ }
+ }
+
+ if ((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
+ext2_write(ap)
+ struct vop_write_args /* {
+ struct vnode *a_vp;
+ struct uio *a_uio;
+ int a_ioflag;
+ struct ucred *a_cred;
+ } */ *ap;
+{
+ struct vnode *vp;
+ struct uio *uio;
+ struct inode *ip;
+ struct m_ext2fs *fs;
+ struct buf *bp;
+ daddr_t lbn;
+ off_t osize;
+ int blkoffset, error, flags, ioflag, resid, size, seqcount, xfersize;
+
+ ioflag = ap->a_ioflag;
+ uio = ap->a_uio;
+ vp = ap->a_vp;
+
+ seqcount = ioflag >> IO_SEQSHIFT;
+ ip = VTOI(vp);
+
+#ifdef INVARIANTS
+ if (uio->uio_rw != UIO_WRITE)
+ panic("%s: mode", "ext2_write");
+#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:
+ /* XXX differs from ffs -- this is called from ext2_mkdir(). */
+ if ((ioflag & IO_SYNC) == 0)
+ panic("ext2_write: nonsync dir write");
+ break;
+ default:
+ panic("ext2_write: type %p %d (%jd,%jd)", (void *)vp,
+ vp->v_type, (intmax_t)uio->uio_offset,
+ (intmax_t)uio->uio_resid);
+ }
+
+ KASSERT(uio->uio_resid >= 0, ("ext2_write: uio->uio_resid < 0"));
+ KASSERT(uio->uio_offset >= 0, ("ext2_write: uio->uio_offset < 0"));
+ fs = ip->i_e2fs;
+ if ((uoff_t)uio->uio_offset + uio->uio_resid > fs->e2fs_maxfilesize)
+ return (EFBIG);
+ /*
+ * Maybe this should be above the vnode op call, but so long as
+ * file servers have no limits, I don't think it matters.
+ */
+ if (vn_rlimit_fsize(vp, uio, uio->uio_td))
+ return (EFBIG);
+
+ resid = uio->uio_resid;
+ osize = ip->i_size;
+ if (seqcount > BA_SEQMAX)
+ flags = BA_SEQMAX << BA_SEQSHIFT;
+ else
+ flags = seqcount << BA_SEQSHIFT;
+ if ((ioflag & IO_SYNC) && !DOINGASYNC(vp))
+ flags |= IO_SYNC;
+
+ for (error = 0; uio->uio_resid > 0;) {
+ lbn = lblkno(fs, uio->uio_offset);
+ blkoffset = blkoff(fs, uio->uio_offset);
+ xfersize = fs->e2fs_fsize - 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);
+
+ /*
+ * We must perform a read-before-write if the transfer size
+ * does not cover the entire buffer.
+ */
+ if (fs->e2fs_bsize > xfersize)
+ flags |= BA_CLRBUF;
+ else
+ flags &= ~BA_CLRBUF;
+ error = ext2_balloc(ip, lbn, blkoffset + xfersize,
+ ap->a_cred, &bp, flags);
+ if (error != 0)
+ break;
+
+ /*
+ * If the buffer is not valid and we did not clear garbage
+ * out above, we have to do so here even though the write
+ * covers the entire buffer in order to avoid a mmap()/write
+ * race where another process may see the garbage prior to
+ * the uiomove() for a write replacing it.
+ */
+ if ((bp->b_flags & B_CACHE) == 0 && fs->e2fs_bsize <= xfersize)
+ vfs_bio_clrbuf(bp);
+ if ((ioflag & (IO_SYNC|IO_INVAL)) == (IO_SYNC|IO_INVAL))
+ bp->b_flags |= B_NOCACHE;
+ 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|IO_DIRECT)) {
+ bp->b_flags |= B_RELBUF;
+ }
+
+ /*
+ * If IO_SYNC each buffer is written synchronously. Otherwise
+ * if we have a severe page deficiency write the buffer
+ * asynchronously. Otherwise try to cluster, and if that
+ * doesn't do it then either do an async write (if O_DIRECT),
+ * or a delayed write (if not).
+ */
+ if (ioflag & IO_SYNC) {
+ (void)bwrite(bp);
+ } else if (vm_page_count_severe() ||
+ buf_dirty_count_severe() ||
+ (ioflag & IO_ASYNC)) {
+ bp->b_flags |= B_CLUSTEROK;
+ bawrite(bp);
+ } else if (xfersize + blkoffset == fs->e2fs_fsize) {
+ if ((vp->v_mount->mnt_flag & MNT_NOCLUSTERW) == 0) {
+ bp->b_flags |= B_CLUSTEROK;
+ cluster_write(vp, bp, ip->i_size, seqcount);
+ } else {
+ bawrite(bp);
+ }
+ } else if (ioflag & IO_DIRECT) {
+ bp->b_flags |= B_CLUSTEROK;
+ bawrite(bp);
+ } else {
+ bp->b_flags |= B_CLUSTEROK;
+ bdwrite(bp);
+ }
+ if (error || xfersize == 0)
+ break;
+ }
+ /*
+ * 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 ((ip->i_mode & (ISUID | ISGID)) && resid > uio->uio_resid &&
+ ap->a_cred) {
+ if (priv_check_cred(ap->a_cred, PRIV_VFS_RETAINSUGID, 0))
+ ip->i_mode &= ~(ISUID | ISGID);
+ }
+ if (error) {
+ if (ioflag & IO_UNIT) {
+ (void)ext2_truncate(vp, osize,
+ ioflag & IO_SYNC, ap->a_cred, uio->uio_td);
+ uio->uio_offset -= resid - uio->uio_resid;
+ uio->uio_resid = resid;
+ }
+ }
+ if (uio->uio_resid != resid) {
+ ip->i_flag |= IN_CHANGE | IN_UPDATE;
+ if (ioflag & IO_SYNC)
+ error = ext2_update(vp, 1);
+ }
+ return (error);
+}
diff --git a/sys/fs/ext2fs/ext2fs.h b/sys/fs/ext2fs/ext2fs.h
index baac2de..b57d515 100755
--- a/sys/fs/ext2fs/ext2fs.h
+++ b/sys/fs/ext2fs/ext2fs.h
@@ -34,8 +34,8 @@
*
*/
-#ifndef _FS_EXT2FS_EXT2_FS_H_
-#define _FS_EXT2FS_EXT2_FS_H_
+#ifndef _FS_EXT2FS_EXT2FS_H_
+#define _FS_EXT2FS_EXT2FS_H_
#include <sys/types.h>
@@ -45,6 +45,16 @@
#define EXT2_LINK_MAX 32000
/*
+ * A summary of contiguous blocks of various sizes is maintained
+ * in each cylinder group. Normally this is set by the initial
+ * value of fs_maxcontig.
+ *
+ * XXX:FS_MAXCONTIG is set to 16 to conserve space. Here we set
+ * EXT2_MAXCONTIG to 32 for better performance.
+ */
+#define EXT2_MAXCONTIG 32
+
+/*
* Constants relative to the data blocks
*/
#define EXT2_NDIR_BLOCKS 12
@@ -52,7 +62,7 @@
#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 (uint32_t))
+#define EXT2_MAXSYMLINKLEN (EXT2_N_BLOCKS * sizeof(uint32_t))
/*
* The path name on which the file system is mounted is maintained
@@ -151,6 +161,10 @@ struct m_ext2fs {
char e2fs_wasvalid; /* valid at mount time */
off_t e2fs_maxfilesize;
struct ext2_gd *e2fs_gd; /* Group Descriptors */
+ int32_t e2fs_maxcontig; /* max number of contiguous blks */
+ int32_t e2fs_contigsumsize; /* size of cluster summary array */
+ int32_t *e2fs_maxcluster; /* max cluster in each cyl group */
+ struct csum *e2fs_clustersum; /* cluster summary in each cyl group */
};
/*
@@ -253,6 +267,13 @@ struct ext2_gd {
uint32_t reserved2[3];
};
+/* cluster summary information */
+
+struct csum {
+ int8_t cs_init; /* cluster summary has been initialized */
+ int32_t *cs_sum; /* cluster summary array */
+};
+
/* EXT2FS metadatas are stored in little-endian byte order. These macros
* helps reading these metadatas
*/
@@ -271,7 +292,7 @@ struct ext2_gd {
#else
# define EXT2_BLOCK_SIZE(s) (EXT2_MIN_BLOCK_SIZE << (s)->e2fs_log_bsize)
#endif
-#define EXT2_ADDR_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof (uint32_t))
+#define EXT2_ADDR_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof(uint32_t))
#if defined(_KERNEL)
# define EXT2_BLOCK_SIZE_BITS(s) ((s)->e2fs_blocksize_bits)
#else
@@ -311,7 +332,7 @@ struct ext2_gd {
# define EXT2_DESC_PER_BLOCK_BITS(s) (EXT2_SB(s)->s_desc_per_block_bits)
#else
# define EXT2_BLOCKS_PER_GROUP(s) ((s)->e2fs_bpg)
-# define EXT2_DESC_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof (struct ext2_gd))
+# define EXT2_DESC_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof(struct ext2_gd))
#endif
diff --git a/sys/fs/ext2fs/fs.h b/sys/fs/ext2fs/fs.h
index 54c6b44..880c500 100644
--- a/sys/fs/ext2fs/fs.h
+++ b/sys/fs/ext2fs/fs.h
@@ -36,6 +36,9 @@
* $FreeBSD$
*/
+#ifndef _FS_EXT2FS_FS_H_
+#define _FS_EXT2FS_FS_H_
+
/*
* Each disk drive contains some number of file systems.
* A file system consists of a number of cylinder groups.
@@ -149,4 +152,4 @@
extern int inside[], around[];
extern u_char *fragtbl[];
-
+#endif /* !_FS_EXT2FS_FS_H_ */
diff --git a/sys/fs/fdescfs/fdesc_vfsops.c b/sys/fs/fdescfs/fdesc_vfsops.c
index ade38fe28..2f29f68 100644
--- a/sys/fs/fdescfs/fdesc_vfsops.c
+++ b/sys/fs/fdescfs/fdesc_vfsops.c
@@ -65,7 +65,7 @@ static vfs_root_t fdesc_root;
* Compatibility shim for old mount(2) system call.
*/
int
-fdesc_cmount(struct mntarg *ma, void *data, int flags)
+fdesc_cmount(struct mntarg *ma, void *data, uint64_t flags)
{
return kernel_mount(ma, flags);
}
diff --git a/sys/fs/hpfs/hpfs_vfsops.c b/sys/fs/hpfs/hpfs_vfsops.c
index 866004e..c0564ad 100644
--- a/sys/fs/hpfs/hpfs_vfsops.c
+++ b/sys/fs/hpfs/hpfs_vfsops.c
@@ -73,7 +73,7 @@ static int
hpfs_cmount (
struct mntarg *ma,
void *data,
- int flags)
+ uint64_t flags)
{
struct hpfs_args args;
struct export_args exp;
diff --git a/sys/fs/msdosfs/msdosfs_conv.c b/sys/fs/msdosfs/msdosfs_conv.c
index f36381b..b7120d8 100644
--- a/sys/fs/msdosfs/msdosfs_conv.c
+++ b/sys/fs/msdosfs/msdosfs_conv.c
@@ -61,9 +61,9 @@
extern struct iconv_functions *msdosfs_iconv;
static int mbsadjpos(const char **, size_t, size_t, int, int, void *handle);
-static u_char * dos2unixchr(const u_char **, size_t *, int, struct msdosfsmount *);
+static u_char * dos2unixchr(u_char *, const u_char **, size_t *, int, struct msdosfsmount *);
static u_int16_t unix2doschr(const u_char **, size_t *, struct msdosfsmount *);
-static u_char * win2unixchr(u_int16_t, struct msdosfsmount *);
+static u_char * win2unixchr(u_char *, u_int16_t, struct msdosfsmount *);
static u_int16_t unix2winchr(const u_char **, size_t *, int, struct msdosfsmount *);
/*
@@ -242,7 +242,7 @@ dos2unixfn(dn, un, lower, pmp)
{
size_t i;
int thislong = 0;
- u_char *c;
+ u_char *c, tmpbuf[5];
/*
* If first char of the filename is SLOT_E5 (0x05), then the real
@@ -257,8 +257,8 @@ dos2unixfn(dn, un, lower, pmp)
* Copy the name portion into the unix filename string.
*/
for (i = 8; i > 0 && *dn != ' ';) {
- c = dos2unixchr((const u_char **)&dn, &i, lower & LCASE_BASE,
- pmp);
+ c = dos2unixchr(tmpbuf, (const u_char **)&dn, &i,
+ lower & LCASE_BASE, pmp);
while (*c != '\0') {
*un++ = *c++;
thislong++;
@@ -274,7 +274,7 @@ dos2unixfn(dn, un, lower, pmp)
*un++ = '.';
thislong++;
for (i = 3; i > 0 && *dn != ' ';) {
- c = dos2unixchr((const u_char **)&dn, &i,
+ c = dos2unixchr(tmpbuf, (const u_char **)&dn, &i,
lower & LCASE_EXT, pmp);
while (*c != '\0') {
*un++ = *c++;
@@ -648,7 +648,7 @@ win2unixfn(nbp, wep, chksum, pmp)
int chksum;
struct msdosfsmount *pmp;
{
- u_char *c;
+ u_char *c, tmpbuf[5];
u_int8_t *cp;
u_int8_t *np, name[WIN_CHARS * 3 + 1];
u_int16_t code;
@@ -683,7 +683,7 @@ win2unixfn(nbp, wep, chksum, pmp)
*np = '\0';
return -1;
default:
- c = win2unixchr(code, pmp);
+ c = win2unixchr(tmpbuf, code, pmp);
while (*c != '\0')
*np++ = *c++;
break;
@@ -701,7 +701,7 @@ win2unixfn(nbp, wep, chksum, pmp)
*np = '\0';
return -1;
default:
- c = win2unixchr(code, pmp);
+ c = win2unixchr(tmpbuf, code, pmp);
while (*c != '\0')
*np++ = *c++;
break;
@@ -719,7 +719,7 @@ win2unixfn(nbp, wep, chksum, pmp)
*np = '\0';
return -1;
default:
- c = win2unixchr(code, pmp);
+ c = win2unixchr(tmpbuf, code, pmp);
while (*c != '\0')
*np++ = *c++;
break;
@@ -812,9 +812,9 @@ mbsadjpos(const char **instr, size_t inlen, size_t outlen, int weight, int flag,
* Convert DOS char to Local char
*/
static u_char *
-dos2unixchr(const u_char **instr, size_t *ilen, int lower, struct msdosfsmount *pmp)
+dos2unixchr(u_char *outbuf, const u_char **instr, size_t *ilen, int lower, struct msdosfsmount *pmp)
{
- u_char c, *outp, outbuf[5];
+ u_char c, *outp;
size_t len, olen;
outp = outbuf;
@@ -933,9 +933,9 @@ unix2doschr(const u_char **instr, size_t *ilen, struct msdosfsmount *pmp)
* Convert Windows char to Local char
*/
static u_char *
-win2unixchr(u_int16_t wc, struct msdosfsmount *pmp)
+win2unixchr(u_char *outbuf, u_int16_t wc, struct msdosfsmount *pmp)
{
- u_char *inp, *outp, inbuf[3], outbuf[5];
+ u_char *inp, *outp, inbuf[3];
size_t ilen, olen, len;
outp = outbuf;
diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c
index 5e93c29..5bd97d9 100644
--- a/sys/fs/msdosfs/msdosfs_vfsops.c
+++ b/sys/fs/msdosfs/msdosfs_vfsops.c
@@ -197,7 +197,7 @@ update_mp(struct mount *mp, struct thread *td)
}
static int
-msdosfs_cmount(struct mntarg *ma, void *data, int flags)
+msdosfs_cmount(struct mntarg *ma, void *data, uint64_t flags)
{
struct msdosfs_args args;
struct export_args exp;
diff --git a/sys/fs/nfs/nfs_commonkrpc.c b/sys/fs/nfs/nfs_commonkrpc.c
index 1f65380..7b72ced 100644
--- a/sys/fs/nfs/nfs_commonkrpc.c
+++ b/sys/fs/nfs/nfs_commonkrpc.c
@@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$");
* Socket operations for use by nfs
*/
-#include "opt_inet6.h"
#include "opt_kdtrace.h"
#include "opt_kgssapi.h"
#include "opt_nfs.h"
@@ -168,6 +167,7 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockreq *nrp,
struct socket *so;
int one = 1, retries, error = 0;
struct thread *td = curthread;
+ struct timeval timo;
/*
* We need to establish the socket using the credentials of
@@ -264,9 +264,18 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockreq *nrp,
CLNT_CONTROL(client, CLSET_INTERRUPTIBLE, &one);
if ((nmp->nm_flag & NFSMNT_RESVPORT))
CLNT_CONTROL(client, CLSET_PRIVPORT, &one);
- if (NFSHASSOFT(nmp))
- retries = nmp->nm_retry;
- else
+ if (NFSHASSOFT(nmp)) {
+ if (nmp->nm_sotype == SOCK_DGRAM)
+ /*
+ * For UDP, the large timeout for a reconnect
+ * will be set to "nm_retry * nm_timeo / 2", so
+ * we only want to do 2 reconnect timeout
+ * retries.
+ */
+ retries = 2;
+ else
+ retries = nmp->nm_retry;
+ } else
retries = INT_MAX;
} else {
/*
@@ -284,6 +293,27 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockreq *nrp,
}
CLNT_CONTROL(client, CLSET_RETRIES, &retries);
+ if (nmp != NULL) {
+ /*
+ * For UDP, there are 2 timeouts:
+ * - CLSET_RETRY_TIMEOUT sets the initial timeout for the timer
+ * that does a retransmit of an RPC request using the same
+ * socket and xid. This is what you normally want to do,
+ * since NFS servers depend on "same xid" for their
+ * Duplicate Request Cache.
+ * - timeout specified in CLNT_CALL_MBUF(), which specifies when
+ * retransmits on the same socket should fail and a fresh
+ * socket created. Each of these timeouts counts as one
+ * CLSET_RETRIES as set above.
+ * Set the initial retransmit timeout for UDP. This timeout
+ * doesn't exist for TCP and the following call just fails,
+ * which is ok.
+ */
+ timo.tv_sec = nmp->nm_timeo / NFS_HZ;
+ timo.tv_usec = (nmp->nm_timeo % NFS_HZ) * 1000000 / NFS_HZ;
+ CLNT_CONTROL(client, CLSET_RETRY_TIMEOUT, &timo);
+ }
+
mtx_lock(&nrp->nr_mtx);
if (nrp->nr_client != NULL) {
/*
@@ -442,7 +472,7 @@ newnfs_request(struct nfsrv_descript *nd, struct nfsmount *nmp,
{
u_int32_t *tl;
time_t waituntil;
- int i, j, set_uid = 0, set_sigset = 0;
+ int i, j, set_sigset = 0, timeo;
int trycnt, error = 0, usegssname = 0, secflavour = AUTH_SYS;
u_int16_t procnum;
u_int trylater_delay = 1;
@@ -453,8 +483,8 @@ newnfs_request(struct nfsrv_descript *nd, struct nfsmount *nmp,
enum clnt_stat stat;
struct nfsreq *rep = NULL;
char *srv_principal = NULL;
- uid_t saved_uid = (uid_t)-1;
sigset_t oldset;
+ struct ucred *authcred;
if (xidp != NULL)
*xidp = 0;
@@ -464,6 +494,14 @@ newnfs_request(struct nfsrv_descript *nd, struct nfsmount *nmp,
return (ESTALE);
}
+ /*
+ * Set authcred, which is used to acquire RPC credentials to
+ * the cred argument, by default. The crhold() should not be
+ * necessary, but will ensure that some future code change
+ * doesn't result in the credential being free'd prematurely.
+ */
+ authcred = crhold(cred);
+
/* For client side interruptible mounts, mask off the signals. */
if (nmp != NULL && td != NULL && NFSHASINT(nmp)) {
newnfs_set_sigmask(td, &oldset);
@@ -502,13 +540,16 @@ newnfs_request(struct nfsrv_descript *nd, struct nfsmount *nmp,
/*
* If there is a client side host based credential,
* use that, otherwise use the system uid, if set.
+ * The system uid is in the nmp->nm_sockreq.nr_cred
+ * credentials.
*/
if (nmp->nm_krbnamelen > 0) {
usegssname = 1;
} else if (nmp->nm_uid != (uid_t)-1) {
- saved_uid = cred->cr_uid;
- cred->cr_uid = nmp->nm_uid;
- set_uid = 1;
+ KASSERT(nmp->nm_sockreq.nr_cred != NULL,
+ ("newnfs_request: NULL nr_cred"));
+ crfree(authcred);
+ authcred = crhold(nmp->nm_sockreq.nr_cred);
}
} else if (nmp->nm_krbnamelen == 0 &&
nmp->nm_uid != (uid_t)-1 && cred->cr_uid == (uid_t)0) {
@@ -517,10 +558,13 @@ newnfs_request(struct nfsrv_descript *nd, struct nfsmount *nmp,
* the system uid is set and this is root, use the
* system uid, since root won't have user
* credentials in a credentials cache file.
+ * The system uid is in the nmp->nm_sockreq.nr_cred
+ * credentials.
*/
- saved_uid = cred->cr_uid;
- cred->cr_uid = nmp->nm_uid;
- set_uid = 1;
+ KASSERT(nmp->nm_sockreq.nr_cred != NULL,
+ ("newnfs_request: NULL nr_cred"));
+ crfree(authcred);
+ authcred = crhold(nmp->nm_sockreq.nr_cred);
}
if (NFSHASINTEGRITY(nmp))
secflavour = RPCSEC_GSS_KRB5I;
@@ -536,13 +580,13 @@ newnfs_request(struct nfsrv_descript *nd, struct nfsmount *nmp,
* Use the uid that did the mount when the RPC is doing
* NFSv4 system operations, as indicated by the
* ND_USEGSSNAME flag, for the AUTH_SYS case.
+ * The credentials in nm_sockreq.nr_cred were used for the
+ * mount.
*/
- saved_uid = cred->cr_uid;
- if (nmp->nm_uid != (uid_t)-1)
- cred->cr_uid = nmp->nm_uid;
- else
- cred->cr_uid = 0;
- set_uid = 1;
+ KASSERT(nmp->nm_sockreq.nr_cred != NULL,
+ ("newnfs_request: NULL nr_cred"));
+ crfree(authcred);
+ authcred = crhold(nmp->nm_sockreq.nr_cred);
}
if (nmp != NULL) {
@@ -558,12 +602,11 @@ newnfs_request(struct nfsrv_descript *nd, struct nfsmount *nmp,
auth = authnone_create();
else if (usegssname)
auth = nfs_getauth(nrp, secflavour, nmp->nm_krbname,
- srv_principal, NULL, cred);
+ srv_principal, NULL, authcred);
else
auth = nfs_getauth(nrp, secflavour, NULL,
- srv_principal, NULL, cred);
- if (set_uid)
- cred->cr_uid = saved_uid;
+ srv_principal, NULL, authcred);
+ crfree(authcred);
if (auth == NULL) {
m_freem(nd->nd_mreq);
if (set_sigset)
@@ -628,6 +671,12 @@ newnfs_request(struct nfsrv_descript *nd, struct nfsmount *nmp,
}
trycnt = 0;
tryagain:
+ /*
+ * This timeout specifies when a new socket should be created,
+ * along with new xid values. For UDP, this should be done
+ * infrequently, since retransmits of RPC requests should normally
+ * use the same xid.
+ */
if (nmp == NULL) {
timo.tv_usec = 0;
if (clp == NULL)
@@ -642,8 +691,22 @@ tryagain:
else
timo.tv_sec = NFS_TCPTIMEO;
} else {
- timo.tv_sec = nmp->nm_timeo / NFS_HZ;
- timo.tv_usec = (nmp->nm_timeo * 1000000) / NFS_HZ;
+ if (NFSHASSOFT(nmp)) {
+ /*
+ * CLSET_RETRIES is set to 2, so this should be
+ * half of the total timeout required.
+ */
+ timeo = nmp->nm_retry * nmp->nm_timeo / 2;
+ if (timeo < 1)
+ timeo = 1;
+ timo.tv_sec = timeo / NFS_HZ;
+ timo.tv_usec = (timeo % NFS_HZ) * 1000000 /
+ NFS_HZ;
+ } else {
+ /* For UDP hard mounts, use a large value. */
+ timo.tv_sec = NFS_MAXTIMEO / NFS_HZ;
+ timo.tv_usec = 0;
+ }
}
if (rep != NULL) {
diff --git a/sys/fs/nfs/nfs_commonport.c b/sys/fs/nfs/nfs_commonport.c
index 0320f47..aff8749 100644
--- a/sys/fs/nfs/nfs_commonport.c
+++ b/sys/fs/nfs/nfs_commonport.c
@@ -483,7 +483,6 @@ nfssvc_call(struct thread *p, struct nfssvc_args *uap, struct ucred *cred)
newnfsstats.srvcache_nonidemdonehits = 0;
newnfsstats.srvcache_misses = 0;
newnfsstats.srvcache_tcppeak = 0;
- newnfsstats.srvcache_size = 0;
newnfsstats.srvclients = 0;
newnfsstats.srvopenowners = 0;
newnfsstats.srvopens = 0;
diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c
index 168018c..af63c85 100644
--- a/sys/fs/nfs/nfs_commonsubs.c
+++ b/sys/fs/nfs/nfs_commonsubs.c
@@ -40,6 +40,8 @@ __FBSDID("$FreeBSD$");
* copy data between mbuf chains and uio lists.
*/
#ifndef APPLEKEXT
+#include "opt_inet6.h"
+
#include <fs/nfs/nfsport.h>
/*
diff --git a/sys/fs/nfs/nfsport.h b/sys/fs/nfs/nfsport.h
index 726d3b5..763e2bd 100644
--- a/sys/fs/nfs/nfsport.h
+++ b/sys/fs/nfs/nfsport.h
@@ -712,7 +712,7 @@ MALLOC_DECLARE(M_NEWNFSDROLLBACK);
/*
* Set this macro to index() or strchr(), whichever is supported.
*/
-#define STRCHR(s, c) index((s), (c))
+#define STRCHR(s, c) strchr((s), (c))
/*
* Set the n_time in the client write rpc, as required.
diff --git a/sys/fs/nfsclient/nfs_clkrpc.c b/sys/fs/nfsclient/nfs_clkrpc.c
index 0cd41b3..fceb36d 100644
--- a/sys/fs/nfsclient/nfs_clkrpc.c
+++ b/sys/fs/nfsclient/nfs_clkrpc.c
@@ -34,7 +34,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_inet6.h"
#include "opt_kgssapi.h"
#include <fs/nfs/nfsport.h>
diff --git a/sys/fs/nfsclient/nfs_clport.c b/sys/fs/nfsclient/nfs_clport.c
index acbfa6c..bf48beb 100644
--- a/sys/fs/nfsclient/nfs_clport.c
+++ b/sys/fs/nfsclient/nfs_clport.c
@@ -34,6 +34,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include "opt_inet6.h"
#include "opt_kdtrace.h"
#include <sys/capability.h>
diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c
index 4fa5460..86a0601 100644
--- a/sys/fs/nfsclient/nfs_clrpcops.c
+++ b/sys/fs/nfsclient/nfs_clrpcops.c
@@ -43,6 +43,8 @@ __FBSDID("$FreeBSD$");
*/
#ifndef APPLEKEXT
+#include "opt_inet6.h"
+
#include <fs/nfs/nfsport.h>
/*
@@ -1232,8 +1234,7 @@ nfsrpc_read(vnode_t vp, struct uio *uiop, struct ucred *cred,
newcred = cred;
if (NFSHASNFSV4(nmp)) {
nfhp = np->n_fhp;
- if (p == NULL)
- newcred = NFSNEWCRED(cred);
+ newcred = NFSNEWCRED(cred);
}
retrycnt = 0;
do {
@@ -1263,7 +1264,7 @@ nfsrpc_read(vnode_t vp, struct uio *uiop, struct ucred *cred,
expireret == 0 && clidrev != 0 && retrycnt < 4));
if (error && retrycnt >= 4)
error = EIO;
- if (NFSHASNFSV4(nmp) && p == NULL)
+ if (NFSHASNFSV4(nmp))
NFSFREECRED(newcred);
return (error);
}
@@ -1384,8 +1385,7 @@ nfsrpc_write(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit,
clidrev = nmp->nm_clp->nfsc_clientidrev;
newcred = cred;
if (NFSHASNFSV4(nmp)) {
- if (p == NULL)
- newcred = NFSNEWCRED(cred);
+ newcred = NFSNEWCRED(cred);
nfhp = np->n_fhp;
}
retrycnt = 0;
@@ -1435,7 +1435,7 @@ nfsrpc_write(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit,
((error == NFSERR_STALESTATEID ||
error == NFSERR_STALEDONTRECOVER) && called_from_strategy != 0)))
error = EIO;
- if (NFSHASNFSV4(nmp) && p == NULL)
+ if (NFSHASNFSV4(nmp))
NFSFREECRED(newcred);
return (error);
}
@@ -3317,8 +3317,9 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep,
ndp->ni_vp = newvp;
NFSCNHASH(cnp, HASHINIT);
if (cnp->cn_namelen <= NCHNAMLEN) {
- np->n_ctime = np->n_vattr.na_ctime;
- cache_enter(ndp->ni_dvp,ndp->ni_vp,cnp);
+ cache_enter_time(ndp->ni_dvp,
+ ndp->ni_vp, cnp,
+ &nfsva.na_ctime);
}
if (unlocknewvp)
vput(newvp);
diff --git a/sys/fs/nfsclient/nfs_clvfsops.c b/sys/fs/nfsclient/nfs_clvfsops.c
index 461980e..e6d146f 100644
--- a/sys/fs/nfsclient/nfs_clvfsops.c
+++ b/sys/fs/nfsclient/nfs_clvfsops.c
@@ -104,7 +104,7 @@ static void nfs_decode_args(struct mount *mp, struct nfsmount *nmp,
static int mountnfs(struct nfs_args *, struct mount *,
struct sockaddr *, char *, u_char *, int, u_char *, int,
u_char *, int, struct vnode **, struct ucred *,
- struct thread *, int);
+ struct thread *, int, int);
static void nfs_getnlminfo(struct vnode *, uint8_t *, size_t *,
struct sockaddr_storage *, int *, off_t *,
struct timeval *);
@@ -520,7 +520,8 @@ nfs_mountdiskless(char *path,
dirlen = 0;
nam = sodupsockaddr((struct sockaddr *)sin, M_WAITOK);
if ((error = mountnfs(args, mp, nam, path, NULL, 0, dirpath, dirlen,
- NULL, 0, vpp, td->td_ucred, td, NFS_DEFAULT_NEGNAMETIMEO)) != 0) {
+ NULL, 0, vpp, td->td_ucred, td, NFS_DEFAULT_NAMETIMEO,
+ NFS_DEFAULT_NEGNAMETIMEO)) != 0) {
printf("nfs_mountroot: mount %s on /: %d\n", path, error);
return (error);
}
@@ -715,7 +716,7 @@ static const char *nfs_opts[] = { "from", "nfs_args",
"retrans", "acregmin", "acregmax", "acdirmin", "acdirmax", "resvport",
"readahead", "hostname", "timeout", "addr", "fh", "nfsv3", "sec",
"principal", "nfsv4", "gssname", "allgssname", "dirpath",
- "negnametimeo", "nocto", "wcommitsize",
+ "nametimeo", "negnametimeo", "nocto", "wcommitsize",
NULL };
/*
@@ -760,6 +761,7 @@ nfs_mount(struct mount *mp)
char hst[MNAMELEN];
u_char nfh[NFSX_FHMAX], krbname[100], dirpath[100], srvkrbname[100];
char *opt, *name, *secname;
+ int nametimeo = NFS_DEFAULT_NAMETIMEO;
int negnametimeo = NFS_DEFAULT_NEGNAMETIMEO;
int dirlen, has_nfs_args_opt, krbnamelen, srvkrbnamelen;
size_t hstlen;
@@ -968,6 +970,14 @@ nfs_mount(struct mount *mp)
}
args.flags |= NFSMNT_TIMEO;
}
+ if (vfs_getopt(mp->mnt_optnew, "nametimeo", (void **)&opt, NULL) == 0) {
+ ret = sscanf(opt, "%d", &nametimeo);
+ if (ret != 1 || nametimeo < 0) {
+ vfs_mount_error(mp, "illegal nametimeo: %s", opt);
+ error = EINVAL;
+ goto out;
+ }
+ }
if (vfs_getopt(mp->mnt_optnew, "negnametimeo", (void **)&opt, NULL)
== 0) {
ret = sscanf(opt, "%d", &negnametimeo);
@@ -989,6 +999,23 @@ nfs_mount(struct mount *mp)
error = EIO;
goto out;
}
+
+ /*
+ * Cannot switch to UDP if current rsize/wsize/readdirsize is
+ * too large, since there may be an I/O RPC in progress that
+ * will get retried after the switch to the UDP socket. These
+ * retries will fail over and over and over again.
+ */
+ if (args.sotype == SOCK_DGRAM &&
+ (nmp->nm_rsize > NFS_MAXDGRAMDATA ||
+ nmp->nm_wsize > NFS_MAXDGRAMDATA ||
+ nmp->nm_readdirsize > NFS_MAXDGRAMDATA)) {
+ vfs_mount_error(mp,
+ "old rsize/wsize/readdirsize greater than UDP max");
+ error = EINVAL;
+ goto out;
+ }
+
/*
* When doing an update, we can't change version,
* security, switch lockd strategies or change cookie
@@ -1109,7 +1136,7 @@ nfs_mount(struct mount *mp)
args.fh = nfh;
error = mountnfs(&args, mp, nam, hst, krbname, krbnamelen, dirpath,
dirlen, srvkrbname, srvkrbnamelen, &vp, td->td_ucred, td,
- negnametimeo);
+ nametimeo, negnametimeo);
out:
if (!error) {
MNT_ILOCK(mp);
@@ -1131,7 +1158,7 @@ out:
*/
/* ARGSUSED */
static int
-nfs_cmount(struct mntarg *ma, void *data, int flags)
+nfs_cmount(struct mntarg *ma, void *data, uint64_t flags)
{
int error;
struct nfs_args args;
@@ -1153,7 +1180,7 @@ static int
mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam,
char *hst, u_char *krbname, int krbnamelen, u_char *dirpath, int dirlen,
u_char *srvkrbname, int srvkrbnamelen, struct vnode **vpp,
- struct ucred *cred, struct thread *td, int negnametimeo)
+ struct ucred *cred, struct thread *td, int nametimeo, int negnametimeo)
{
struct nfsmount *nmp;
struct nfsnode *np;
@@ -1220,13 +1247,14 @@ mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam,
}
vfs_getnewfsid(mp);
nmp->nm_mountp = mp;
- mtx_init(&nmp->nm_mtx, "NFSmount lock", NULL, MTX_DEF | MTX_DUPOK);
+ mtx_init(&nmp->nm_mtx, "NFSmount lock", NULL, MTX_DEF | MTX_DUPOK);
/*
- * Since nfs_decode_args() might optionally set them, these need to
- * set to defaults before the call, so that the optional settings
- * aren't overwritten.
+ * Since nfs_decode_args() might optionally set them, these
+ * need to be set to defaults before the call, so that the
+ * optional settings aren't overwritten.
*/
+ nmp->nm_nametimeo = nametimeo;
nmp->nm_negnametimeo = negnametimeo;
nmp->nm_timeo = NFS_TIMEO;
nmp->nm_retry = NFS_RETRANS;
diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c
index 8bc0be9..7443fc9 100644
--- a/sys/fs/nfsclient/nfs_clvnops.c
+++ b/sys/fs/nfsclient/nfs_clvnops.c
@@ -1016,12 +1016,12 @@ nfs_lookup(struct vop_lookup_args *ap)
struct vnode *newvp;
struct nfsmount *nmp;
struct nfsnode *np, *newnp;
- int error = 0, attrflag, dattrflag, ltype;
+ int error = 0, attrflag, dattrflag, ltype, ncticks;
struct thread *td = cnp->cn_thread;
struct nfsfh *nfhp;
struct nfsvattr dnfsva, nfsva;
struct vattr vattr;
- struct timespec dmtime;
+ struct timespec nctime;
*vpp = NULLVP;
if ((flags & ISLASTCN) && (mp->mnt_flag & MNT_RDONLY) &&
@@ -1042,15 +1042,29 @@ nfs_lookup(struct vop_lookup_args *ap)
if ((error = VOP_ACCESS(dvp, VEXEC, cnp->cn_cred, td)) != 0)
return (error);
- error = cache_lookup(dvp, vpp, cnp);
+ error = cache_lookup_times(dvp, vpp, cnp, &nctime, &ncticks);
if (error > 0 && error != ENOENT)
return (error);
if (error == -1) {
/*
+ * Lookups of "." are special and always return the
+ * current directory. cache_lookup() already handles
+ * associated locking bookkeeping, etc.
+ */
+ if (cnp->cn_namelen == 1 && cnp->cn_nameptr[0] == '.') {
+ /* XXX: Is this really correct? */
+ if (cnp->cn_nameiop != LOOKUP &&
+ (flags & ISLASTCN))
+ cnp->cn_flags |= SAVENAME;
+ return (0);
+ }
+
+ /*
* We only accept a positive hit in the cache if the
* change time of the file matches our cached copy.
* Otherwise, we discard the cache entry and fallback
- * to doing a lookup RPC.
+ * to doing a lookup RPC. We also only trust cache
+ * entries for less than nm_nametimeo seconds.
*
* To better handle stale file handles and attributes,
* clear the attribute cache of this node if it is a
@@ -1072,8 +1086,9 @@ nfs_lookup(struct vop_lookup_args *ap)
mtx_unlock(&newnp->n_mtx);
}
if (nfscl_nodeleg(newvp, 0) == 0 ||
- (VOP_GETATTR(newvp, &vattr, cnp->cn_cred) == 0 &&
- timespeccmp(&vattr.va_ctime, &newnp->n_ctime, ==))) {
+ ((u_int)(ticks - ncticks) < (nmp->nm_nametimeo * hz) &&
+ VOP_GETATTR(newvp, &vattr, cnp->cn_cred) == 0 &&
+ timespeccmp(&vattr.va_ctime, &nctime, ==))) {
NFSINCRGLOBAL(newnfsstats.lookupcache_hits);
if (cnp->cn_nameiop != LOOKUP &&
(flags & ISLASTCN))
@@ -1092,36 +1107,21 @@ nfs_lookup(struct vop_lookup_args *ap)
/*
* We only accept a negative hit in the cache if the
* modification time of the parent directory matches
- * our cached copy. Otherwise, we discard all of the
- * negative cache entries for this directory. We also
- * only trust -ve cache entries for less than
- * nm_negative_namecache_timeout seconds.
+ * the cached copy in the name cache entry.
+ * Otherwise, we discard all of the negative cache
+ * entries for this directory. We also only trust
+ * negative cache entries for up to nm_negnametimeo
+ * seconds.
*/
- if ((u_int)(ticks - np->n_dmtime_ticks) <
- (nmp->nm_negnametimeo * hz) &&
+ if ((u_int)(ticks - ncticks) < (nmp->nm_negnametimeo * hz) &&
VOP_GETATTR(dvp, &vattr, cnp->cn_cred) == 0 &&
- timespeccmp(&vattr.va_mtime, &np->n_dmtime, ==)) {
+ timespeccmp(&vattr.va_mtime, &nctime, ==)) {
NFSINCRGLOBAL(newnfsstats.lookupcache_hits);
return (ENOENT);
}
cache_purge_negative(dvp);
- mtx_lock(&np->n_mtx);
- timespecclear(&np->n_dmtime);
- mtx_unlock(&np->n_mtx);
}
- /*
- * Cache the modification time of the parent directory in case
- * the lookup fails and results in adding the first negative
- * name cache entry for the directory. Since this is reading
- * a single time_t, don't bother with locking. The
- * modification time may be a bit stale, but it must be read
- * before performing the lookup RPC to prevent a race where
- * another lookup updates the timestamp on the directory after
- * the lookup RPC has been performed on the server but before
- * n_dmtime is set at the end of this function.
- */
- dmtime = np->n_vattr.na_mtime;
error = 0;
newvp = NULLVP;
NFSINCRGLOBAL(newnfsstats.lookupcache_misses);
@@ -1157,30 +1157,22 @@ nfs_lookup(struct vop_lookup_args *ap)
return (EJUSTRETURN);
}
- if ((cnp->cn_flags & MAKEENTRY) && cnp->cn_nameiop != CREATE) {
+ if ((cnp->cn_flags & MAKEENTRY) && cnp->cn_nameiop != CREATE &&
+ dattrflag) {
/*
- * Maintain n_dmtime as the modification time
- * of the parent directory when the oldest -ve
- * name cache entry for this directory was
- * added. If a -ve cache entry has already
- * been added with a newer modification time
- * by a concurrent lookup, then don't bother
- * adding a cache entry. The modification
- * time of the directory might have changed
- * due to the file this lookup failed to find
- * being created. In that case a subsequent
- * lookup would incorrectly use the entry
- * added here instead of doing an extra
- * lookup.
+ * Cache the modification time of the parent
+ * directory from the post-op attributes in
+ * the name cache entry. The negative cache
+ * entry will be ignored once the directory
+ * has changed. Don't bother adding the entry
+ * if the directory has already changed.
*/
mtx_lock(&np->n_mtx);
- if (timespeccmp(&np->n_dmtime, &dmtime, <=)) {
- if (!timespecisset(&np->n_dmtime)) {
- np->n_dmtime = dmtime;
- np->n_dmtime_ticks = ticks;
- }
+ if (timespeccmp(&np->n_vattr.na_mtime,
+ &dnfsva.na_mtime, ==)) {
mtx_unlock(&np->n_mtx);
- cache_enter(dvp, NULL, cnp);
+ cache_enter_time(dvp, NULL, cnp,
+ &dnfsva.na_mtime);
} else
mtx_unlock(&np->n_mtx);
}
@@ -1279,9 +1271,8 @@ nfs_lookup(struct vop_lookup_args *ap)
if (cnp->cn_nameiop != LOOKUP && (flags & ISLASTCN))
cnp->cn_flags |= SAVENAME;
if ((cnp->cn_flags & MAKEENTRY) &&
- (cnp->cn_nameiop != DELETE || !(flags & ISLASTCN))) {
- np->n_ctime = np->n_vattr.na_vattr.va_ctime;
- cache_enter(dvp, newvp, cnp);
+ (cnp->cn_nameiop != DELETE || !(flags & ISLASTCN)) && attrflag) {
+ cache_enter_time(dvp, newvp, cnp, &nfsva.na_ctime);
}
*vpp = newvp;
return (0);
@@ -1442,8 +1433,6 @@ nfs_mknodrpc(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp,
}
}
if (!error) {
- if ((cnp->cn_flags & MAKEENTRY))
- cache_enter(dvp, newvp, cnp);
*vpp = newvp;
} else if (NFS_ISV4(dvp)) {
error = nfscl_maperr(cnp->cn_thread, error, vap->va_uid,
@@ -1601,8 +1590,8 @@ again:
}
}
if (!error) {
- if (cnp->cn_flags & MAKEENTRY)
- cache_enter(dvp, newvp, cnp);
+ if ((cnp->cn_flags & MAKEENTRY) && attrflag)
+ cache_enter_time(dvp, newvp, cnp, &nfsva.na_ctime);
*ap->a_vpp = newvp;
} else if (NFS_ISV4(dvp)) {
error = nfscl_maperr(cnp->cn_thread, error, vap->va_uid,
@@ -1977,8 +1966,9 @@ nfs_link(struct vop_link_args *ap)
* must care about lookup caching hit rate, so...
*/
if (VFSTONFS(vp->v_mount)->nm_negnametimeo != 0 &&
- (cnp->cn_flags & MAKEENTRY))
- cache_enter(tdvp, vp, cnp);
+ (cnp->cn_flags & MAKEENTRY) && dattrflag) {
+ cache_enter_time(tdvp, vp, cnp, &dnfsva.na_mtime);
+ }
if (error && NFS_ISV4(vp))
error = nfscl_maperr(cnp->cn_thread, error, (uid_t)0,
(gid_t)0);
@@ -2034,15 +2024,6 @@ nfs_symlink(struct vop_symlink_args *ap)
error = nfscl_maperr(cnp->cn_thread, error,
vap->va_uid, vap->va_gid);
} else {
- /*
- * If negative lookup caching is enabled, I might as well
- * add an entry for this node. Not necessary for correctness,
- * but if negative caching is enabled, then the system
- * must care about lookup caching hit rate, so...
- */
- if (VFSTONFS(dvp->v_mount)->nm_negnametimeo != 0 &&
- (cnp->cn_flags & MAKEENTRY))
- cache_enter(dvp, newvp, cnp);
*ap->a_vpp = newvp;
}
@@ -2052,6 +2033,16 @@ nfs_symlink(struct vop_symlink_args *ap)
if (dattrflag != 0) {
mtx_unlock(&dnp->n_mtx);
(void) nfscl_loadattrcache(&dvp, &dnfsva, NULL, NULL, 0, 1);
+ /*
+ * If negative lookup caching is enabled, I might as well
+ * add an entry for this node. Not necessary for correctness,
+ * but if negative caching is enabled, then the system
+ * must care about lookup caching hit rate, so...
+ */
+ if (VFSTONFS(dvp->v_mount)->nm_negnametimeo != 0 &&
+ (cnp->cn_flags & MAKEENTRY)) {
+ cache_enter_time(dvp, newvp, cnp, &dnfsva.na_mtime);
+ }
} else {
dnp->n_attrstamp = 0;
mtx_unlock(&dnp->n_mtx);
@@ -2127,8 +2118,9 @@ nfs_mkdir(struct vop_mkdir_args *ap)
* must care about lookup caching hit rate, so...
*/
if (VFSTONFS(dvp->v_mount)->nm_negnametimeo != 0 &&
- (cnp->cn_flags & MAKEENTRY))
- cache_enter(dvp, newvp, cnp);
+ (cnp->cn_flags & MAKEENTRY) && dattrflag) {
+ cache_enter_time(dvp, newvp, cnp, &dnfsva.na_mtime);
+ }
*ap->a_vpp = newvp;
}
return (error);
diff --git a/sys/fs/nfsclient/nfsmount.h b/sys/fs/nfsclient/nfsmount.h
index b62a430..8068c28 100644
--- a/sys/fs/nfsclient/nfsmount.h
+++ b/sys/fs/nfsclient/nfsmount.h
@@ -66,6 +66,7 @@ struct nfsmount {
u_int64_t nm_maxfilesize; /* maximum file size */
int nm_tprintf_initial_delay; /* initial delay */
int nm_tprintf_delay; /* interval for messages */
+ int nm_nametimeo; /* timeout for +ve entries (sec) */
int nm_negnametimeo; /* timeout for -ve entries (sec) */
/* Newnfs additions */
@@ -106,6 +107,10 @@ struct nfsmount {
*/
#define VFSTONFS(mp) ((struct nfsmount *)((mp)->mnt_data))
+#ifndef NFS_DEFAULT_NAMETIMEO
+#define NFS_DEFAULT_NAMETIMEO 60
+#endif
+
#ifndef NFS_DEFAULT_NEGNAMETIMEO
#define NFS_DEFAULT_NEGNAMETIMEO 60
#endif
diff --git a/sys/fs/nfsclient/nfsnode.h b/sys/fs/nfsclient/nfsnode.h
index c29805d..f2992c9 100644
--- a/sys/fs/nfsclient/nfsnode.h
+++ b/sys/fs/nfsclient/nfsnode.h
@@ -99,9 +99,6 @@ struct nfsnode {
time_t n_attrstamp; /* Attr. cache timestamp */
struct nfs_accesscache n_accesscache[NFS_ACCESSCACHESIZE];
struct timespec n_mtime; /* Prev modify time. */
- struct timespec n_ctime; /* Prev create time. */
- struct timespec n_dmtime; /* Prev dir modify time. */
- int n_dmtime_ticks; /* Tick of -ve cache entry */
struct nfsfh *n_fhp; /* NFS File Handle */
struct vnode *n_vnode; /* associated vnode */
struct vnode *n_dvp; /* parent vnode */
diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c
index 9fdb569..21b5e48 100644
--- a/sys/fs/nfsserver/nfs_nfsdport.c
+++ b/sys/fs/nfsserver/nfs_nfsdport.c
@@ -1254,7 +1254,13 @@ nfsvno_fsync(struct vnode *vp, u_int64_t off, int cnt, struct ucred *cred,
{
int error = 0;
- if (cnt > MAX_COMMIT_COUNT) {
+ /*
+ * RFC 1813 3.3.21: if count is 0, a flush from offset to the end of
+ * file is done. At this time VOP_FSYNC does not accept offset and
+ * byte count parameters so call VOP_FSYNC the whole file for now.
+ * The same is true for NFSv4: RFC 3530 Sec. 14.2.3.
+ */
+ if (cnt == 0 || cnt > MAX_COMMIT_COUNT) {
/*
* Give up and do the whole thing
*/
diff --git a/sys/fs/nfsserver/nfs_nfsdstate.c b/sys/fs/nfsserver/nfs_nfsdstate.c
index bd246d5..f14ad43 100644
--- a/sys/fs/nfsserver/nfs_nfsdstate.c
+++ b/sys/fs/nfsserver/nfs_nfsdstate.c
@@ -315,7 +315,7 @@ nfsrv_setclient(struct nfsrv_descript *nd, struct nfsclient **new_clpp,
for (i = 0; i < NFSSTATEHASHSIZE; i++) {
LIST_NEWHEAD(&new_clp->lc_stateid[i],
&clp->lc_stateid[i], ls_hash);
- LIST_FOREACH(tstp, &new_clp->lc_stateid[i], ls_list)
+ LIST_FOREACH(tstp, &new_clp->lc_stateid[i], ls_hash)
tstp->ls_clp = new_clp;
}
LIST_INSERT_HEAD(NFSCLIENTHASH(new_clp->lc_clientid), new_clp,
@@ -369,7 +369,7 @@ nfsrv_setclient(struct nfsrv_descript *nd, struct nfsclient **new_clpp,
for (i = 0; i < NFSSTATEHASHSIZE; i++) {
LIST_NEWHEAD(&new_clp->lc_stateid[i], &clp->lc_stateid[i],
ls_hash);
- LIST_FOREACH(tstp, &new_clp->lc_stateid[i], ls_list)
+ LIST_FOREACH(tstp, &new_clp->lc_stateid[i], ls_hash)
tstp->ls_clp = new_clp;
}
LIST_INSERT_HEAD(NFSCLIENTHASH(new_clp->lc_clientid), new_clp,
diff --git a/sys/fs/ntfs/ntfs_compr.c b/sys/fs/ntfs/ntfs_compr.c
index 6816220..dcc82a3 100644
--- a/sys/fs/ntfs/ntfs_compr.c
+++ b/sys/fs/ntfs/ntfs_compr.c
@@ -42,7 +42,7 @@
int
ntfs_uncompblock(
- u_int8_t * buf,
+ u_int8_t * dbuf,
u_int8_t * cbuf)
{
u_int32_t ctag;
@@ -60,8 +60,8 @@ ntfs_uncompblock(
dprintf(("ntfs_uncompblock: len: %x instead of %d\n",
len, 0xfff));
}
- memcpy(buf, cbuf + 2, len + 1);
- bzero(buf + len + 1, NTFS_COMPBLOCK_SIZE - 1 - len);
+ memcpy(dbuf, cbuf + 2, len + 1);
+ memset(dbuf + len + 1, 0, NTFS_COMPBLOCK_SIZE - 1 - len);
return len + 3;
}
cpos = 2;
@@ -78,12 +78,12 @@ ntfs_uncompblock(
boff = -1 - (GET_UINT16(cbuf + cpos) >> dshift);
blen = 3 + (GET_UINT16(cbuf + cpos) & lmask);
for (j = 0; (j < blen) && (pos < NTFS_COMPBLOCK_SIZE); j++) {
- buf[pos] = buf[pos + boff];
+ dbuf[pos] = dbuf[pos + boff];
pos++;
}
cpos += 2;
} else {
- buf[pos++] = cbuf[cpos++];
+ dbuf[pos++] = cbuf[cpos++];
}
ctag >>= 1;
}
diff --git a/sys/fs/ntfs/ntfs_subr.c b/sys/fs/ntfs/ntfs_subr.c
index c84bea9..9d81f71 100644
--- a/sys/fs/ntfs/ntfs_subr.c
+++ b/sys/fs/ntfs/ntfs_subr.c
@@ -670,6 +670,7 @@ ntfs_uastricmp(ntmp, ustr, ustrlen, astr, astrlen)
size_t astrlen;
{
const char *astrp = astr;
+ char tmpbuf[5];
int len, res;
size_t i, j, mbstrlen = astrlen;
@@ -712,7 +713,7 @@ ntfs_uastrcmp(ntmp, ustr, ustrlen, astr, astrlen)
const char *astr;
size_t astrlen;
{
- char *c;
+ char *c, tmpbuf[5];
size_t i, j, mbstrlen = astrlen;
int res;
@@ -1635,7 +1636,7 @@ ntfs_readntvattr_plain(
for(; remains; remains--)
uiomove("", 1, uio);
} else
- bzero(data, tocopy);
+ memset(data, 0, tocopy);
data = data + tocopy;
}
cnt++;
@@ -1782,7 +1783,7 @@ ntfs_readattr(
uiomove("", 1, uio);
}
else
- bzero(data, tocopy);
+ memset(data, 0, tocopy);
} else {
error = ntfs_uncompunit(ntmp, uup, cup);
if (error)
@@ -2131,10 +2132,11 @@ ntfs_82u_uninit(struct ntfsmount *ntmp)
*/
char *
ntfs_u28(
+ char *outbuf,
struct ntfsmount *ntmp,
wchar wc)
{
- char *p, *outp, inbuf[3], outbuf[5];;
+ char *p, *outp, inbuf[3];
size_t ilen, olen;
outp = outbuf;
diff --git a/sys/fs/ntfs/ntfs_subr.h b/sys/fs/ntfs/ntfs_subr.h
index 9f9cf4b..ce46986 100644
--- a/sys/fs/ntfs/ntfs_subr.h
+++ b/sys/fs/ntfs/ntfs_subr.h
@@ -112,9 +112,9 @@ int ntfs_u28_init(struct ntfsmount *ntmp, wchar *u2w, char *cs_local, char *cs_n
int ntfs_u28_uninit(struct ntfsmount *ntmp);
int ntfs_82u_init(struct ntfsmount *ntmp, char *cs_local, char *cs_ntfs);
int ntfs_82u_uninit(struct ntfsmount *ntmp);
-char * ntfs_u28(struct ntfsmount *ntmp, wchar wc);
+char * ntfs_u28(char *outbuf, struct ntfsmount *ntmp, wchar wc);
wchar ntfs_82u(struct ntfsmount *ntmp, const char *c, int *len);
-#define NTFS_U28(ch) ntfs_u28(ntmp, (ch))
+#define NTFS_U28(ch) ntfs_u28(tmpbuf, ntmp, (ch))
#define NTFS_82U(ch, len) ntfs_82u(ntmp, (ch), len)
#define NTFS_UASTRCMP(ustr, ustrlen, astr, astrlen) \
ntfs_uastrcmp(ntmp, (ustr), (ustrlen), (astr), (astrlen))
diff --git a/sys/fs/ntfs/ntfs_vfsops.c b/sys/fs/ntfs/ntfs_vfsops.c
index d3468af..8ec5fe6 100644
--- a/sys/fs/ntfs/ntfs_vfsops.c
+++ b/sys/fs/ntfs/ntfs_vfsops.c
@@ -117,7 +117,7 @@ static int
ntfs_cmount (
struct mntarg *ma,
void *data,
- int flags)
+ uint64_t flags)
{
struct ntfs_args args;
struct export_args exp;
diff --git a/sys/fs/ntfs/ntfs_vnops.c b/sys/fs/ntfs/ntfs_vnops.c
index 3273790..76776a1 100644
--- a/sys/fs/ntfs/ntfs_vnops.c
+++ b/sys/fs/ntfs/ntfs_vnops.c
@@ -481,7 +481,7 @@ ntfs_readdir(ap)
struct uio *uio = ap->a_uio;
struct ntfsmount *ntmp = ip->i_mp;
int i, j, error = 0;
- char *c;
+ char *c, tmpbuf[5];
u_int32_t faked = 0, num;
int ncookies = 0;
struct dirent cde;
diff --git a/sys/fs/nullfs/null_subr.c b/sys/fs/nullfs/null_subr.c
index a45ccf7..aea98f3 100644
--- a/sys/fs/nullfs/null_subr.c
+++ b/sys/fs/nullfs/null_subr.c
@@ -90,7 +90,7 @@ nullfs_uninit(vfsp)
{
mtx_destroy(&null_hashmtx);
- free(null_node_hashtbl, M_NULLFSHASH);
+ hashdestroy(null_node_hashtbl, M_NULLFSHASH, null_node_hash);
return (0);
}
@@ -171,6 +171,8 @@ null_hashins(mp, xp)
static void
null_insmntque_dtr(struct vnode *vp, void *xp)
{
+
+ vput(((struct null_node *)xp)->null_lowervp);
vp->v_data = NULL;
vp->v_vnlock = &vp->v_lock;
free(xp, M_NULLFSNODE);
@@ -198,6 +200,9 @@ null_nodeget(mp, lowervp, vpp)
struct vnode *vp;
int error;
+ ASSERT_VOP_LOCKED(lowervp, "lowervp");
+ KASSERT(lowervp->v_usecount >= 1, ("Unreferenced vnode %p\n", lowervp));
+
/* Lookup the hash firstly */
*vpp = null_hashget(mp, lowervp);
if (*vpp != NULL) {
@@ -223,6 +228,7 @@ null_nodeget(mp, lowervp, vpp)
error = getnewvnode("null", mp, &null_vnodeops, &vp);
if (error) {
+ vput(lowervp);
free(xp, M_NULLFSNODE);
return (error);
}
diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c
index 8c00f87..cf3176f 100644
--- a/sys/fs/nullfs/null_vfsops.c
+++ b/sys/fs/nullfs/null_vfsops.c
@@ -157,8 +157,7 @@ nullfs_mount(struct mount *mp)
* Make sure the node alias worked
*/
if (error) {
- vrele(lowerrootvp);
- free(xmp, M_NULLFSMNT); /* XXX */
+ free(xmp, M_NULLFSMNT);
return (error);
}
diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c
index bcf8750..e0645bd 100644
--- a/sys/fs/nullfs/null_vnops.c
+++ b/sys/fs/nullfs/null_vnops.c
@@ -365,9 +365,7 @@ null_lookup(struct vop_lookup_args *ap)
vrele(lvp);
} else {
error = null_nodeget(dvp->v_mount, lvp, &vp);
- if (error)
- vput(lvp);
- else
+ if (error == 0)
*ap->a_vpp = vp;
}
}
@@ -809,9 +807,7 @@ null_vptocnp(struct vop_vptocnp_args *ap)
NULLVPTOLOWERVP(*dvp);
#endif
VOP_UNLOCK(*dvp, 0); /* keep reference on *dvp */
- } else
- vput(ldvp);
-
+ }
vn_lock(vp, locked | LK_RETRY);
return (error);
}
diff --git a/sys/fs/nwfs/nwfs_vfsops.c b/sys/fs/nwfs/nwfs_vfsops.c
index c20159f..f319fb5 100644
--- a/sys/fs/nwfs/nwfs_vfsops.c
+++ b/sys/fs/nwfs/nwfs_vfsops.c
@@ -123,7 +123,7 @@ nwfs_initnls(struct nwmount *nmp) {
return 0;
}
-static int nwfs_cmount(struct mntarg *ma, void *data, int flags)
+static int nwfs_cmount(struct mntarg *ma, void *data, uint64_t flags)
{
struct nwfs_args args; /* will hold data from mount request */
int error;
@@ -206,10 +206,10 @@ static int nwfs_mount(struct mount *mp)
pe = pc+sizeof(mp->mnt_stat.f_mntfromname);
bzero(pc, MNAMELEN);
*(pc++) = '/';
- pc = index(strncpy(pc, conn->li.server, pe-pc-2),0);
+ pc = strchr(strncpy(pc, conn->li.server, pe - pc - 2), 0);
if (pc < pe-1) {
*(pc++) = ':';
- pc=index(strncpy(pc, conn->li.user, pe-pc-2),0);
+ pc = strchr(strncpy(pc, conn->li.user, pe - pc - 2), 0);
if (pc < pe-1) {
*(pc++) = '/';
strncpy(pc, nmp->m.mounted_vol, pe-pc-2);
diff --git a/sys/fs/portalfs/portal_vfsops.c b/sys/fs/portalfs/portal_vfsops.c
index 04e7a3d..6542090 100644
--- a/sys/fs/portalfs/portal_vfsops.c
+++ b/sys/fs/portalfs/portal_vfsops.c
@@ -69,7 +69,7 @@ static const char *portal_opts[] = {
};
static int
-portal_cmount(struct mntarg *ma, void *data, int flags)
+portal_cmount(struct mntarg *ma, void *data, uint64_t flags)
{
struct portal_args args;
int error;
diff --git a/sys/fs/procfs/procfs.c b/sys/fs/procfs/procfs.c
index 514e279..3e87895 100644
--- a/sys/fs/procfs/procfs.c
+++ b/sys/fs/procfs/procfs.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2001 Dag-Erling Smørgrav
+ * Copyright (c) 2001 Dag-Erling Smørgrav
* Copyright (c) 1993 Jan-Simon Pendry
* Copyright (c) 1993
* The Regents of the University of California. All rights reserved.
diff --git a/sys/fs/procfs/procfs_ioctl.c b/sys/fs/procfs/procfs_ioctl.c
index 522dd9c..3fa00bc 100644
--- a/sys/fs/procfs/procfs_ioctl.c
+++ b/sys/fs/procfs/procfs_ioctl.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2001 Dag-Erling Coïdan Smørgrav
+ * Copyright (c) 2001 Dag-Erling Coïdan Smørgrav
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/fs/procfs/procfs_status.c b/sys/fs/procfs/procfs_status.c
index d981e5e..a97e0a9 100644
--- a/sys/fs/procfs/procfs_status.c
+++ b/sys/fs/procfs/procfs_status.c
@@ -193,5 +193,5 @@ procfs_doproccmdline(PFS_FILL_ARGS)
PROC_UNLOCK(p);
- return (proc_getargv(td, p, sb, ARG_MAX));
+ return (proc_getargv(td, p, sb));
}
diff --git a/sys/fs/pseudofs/pseudofs.c b/sys/fs/pseudofs/pseudofs.c
index f13aa83..145aaef 100644
--- a/sys/fs/pseudofs/pseudofs.c
+++ b/sys/fs/pseudofs/pseudofs.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2001 Dag-Erling Coïdan Smørgrav
+ * Copyright (c) 2001 Dag-Erling Coïdan Smørgrav
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -330,7 +330,7 @@ pfs_mount(struct pfs_info *pi, struct mount *mp)
* Compatibility shim for old mount(2) system call
*/
int
-pfs_cmount(struct mntarg *ma, void *data, int flags)
+pfs_cmount(struct mntarg *ma, void *data, uint64_t flags)
{
int error;
diff --git a/sys/fs/pseudofs/pseudofs.h b/sys/fs/pseudofs/pseudofs.h
index 6dc5535..f2c29d4 100644
--- a/sys/fs/pseudofs/pseudofs.h
+++ b/sys/fs/pseudofs/pseudofs.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2001 Dag-Erling Coïdan Smørgrav
+ * Copyright (c) 2001 Dag-Erling Coïdan Smørgrav
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -242,7 +242,7 @@ struct pfs_node {
* VFS interface
*/
int pfs_mount (struct pfs_info *pi, struct mount *mp);
-int pfs_cmount (struct mntarg *ma, void *data, int flags);
+int pfs_cmount (struct mntarg *ma, void *data, uint64_t flags);
int pfs_unmount (struct mount *mp, int mntflags);
int pfs_root (struct mount *mp, int flags,
struct vnode **vpp);
diff --git a/sys/fs/pseudofs/pseudofs_fileno.c b/sys/fs/pseudofs/pseudofs_fileno.c
index d9dc6d2..a8c034f 100644
--- a/sys/fs/pseudofs/pseudofs_fileno.c
+++ b/sys/fs/pseudofs/pseudofs_fileno.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2001 Dag-Erling Coïdan Smørgrav
+ * Copyright (c) 2001 Dag-Erling Coïdan Smørgrav
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/fs/pseudofs/pseudofs_internal.h b/sys/fs/pseudofs/pseudofs_internal.h
index d52ae6e..204e77b 100644
--- a/sys/fs/pseudofs/pseudofs_internal.h
+++ b/sys/fs/pseudofs/pseudofs_internal.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2001 Dag-Erling Coïdan Smørgrav
+ * Copyright (c) 2001 Dag-Erling Coïdan Smørgrav
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/fs/pseudofs/pseudofs_vncache.c b/sys/fs/pseudofs/pseudofs_vncache.c
index 41a9c35..1f9c043 100644
--- a/sys/fs/pseudofs/pseudofs_vncache.c
+++ b/sys/fs/pseudofs/pseudofs_vncache.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2001 Dag-Erling Coïdan Smørgrav
+ * Copyright (c) 2001 Dag-Erling Coïdan Smørgrav
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/fs/pseudofs/pseudofs_vnops.c b/sys/fs/pseudofs/pseudofs_vnops.c
index 3f0c00e..a81d7aa 100644
--- a/sys/fs/pseudofs/pseudofs_vnops.c
+++ b/sys/fs/pseudofs/pseudofs_vnops.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2001 Dag-Erling Coïdan Smørgrav
+ * Copyright (c) 2001 Dag-Erling Coïdan Smørgrav
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -630,14 +630,14 @@ pfs_read(struct vop_read_args *va)
if (uio->uio_offset < 0 || uio->uio_resid < 0 ||
(offset = uio->uio_offset) != uio->uio_offset ||
(resid = uio->uio_resid) != uio->uio_resid ||
- (buflen = offset + resid + 1) < offset || buflen > INT_MAX) {
+ (buflen = offset + resid) < offset || buflen >= INT_MAX) {
error = EINVAL;
goto ret;
}
- if (buflen > MAXPHYS + 1)
- buflen = MAXPHYS + 1;
+ if (buflen > MAXPHYS)
+ buflen = MAXPHYS;
- sb = sbuf_new(sb, NULL, buflen, 0);
+ sb = sbuf_new(sb, NULL, buflen + 1, 0);
if (sb == NULL) {
error = EIO;
goto ret;
@@ -650,8 +650,14 @@ pfs_read(struct vop_read_args *va)
goto ret;
}
- sbuf_finish(sb);
- error = uiomove_frombuf(sbuf_data(sb), sbuf_len(sb), uio);
+ /*
+ * XXX: If the buffer overflowed, sbuf_len() will not return
+ * the data length. Then just use the full length because an
+ * overflowed sbuf must be full.
+ */
+ if (sbuf_finish(sb) == 0)
+ buflen = sbuf_len(sb);
+ error = uiomove_frombuf(sbuf_data(sb), buflen, uio);
sbuf_delete(sb);
ret:
vn_lock(vn, locked | LK_RETRY);
@@ -891,7 +897,11 @@ pfs_readlink(struct vop_readlink_args *va)
PFS_RETURN (error);
}
- sbuf_finish(&sb);
+ if (sbuf_finish(&sb) != 0) {
+ sbuf_delete(&sb);
+ PFS_RETURN (ENAMETOOLONG);
+ }
+
error = uiomove_frombuf(sbuf_data(&sb), sbuf_len(&sb), uio);
sbuf_delete(&sb);
PFS_RETURN (error);
diff --git a/sys/fs/smbfs/smbfs_vfsops.c b/sys/fs/smbfs/smbfs_vfsops.c
index ac0c5e7..f5460b5 100644
--- a/sys/fs/smbfs/smbfs_vfsops.c
+++ b/sys/fs/smbfs/smbfs_vfsops.c
@@ -98,7 +98,7 @@ MODULE_DEPEND(smbfs, libmchain, 1, 1, 1);
int smbfs_pbuf_freecnt = -1; /* start out unlimited */
static int
-smbfs_cmount(struct mntarg *ma, void * data, int flags)
+smbfs_cmount(struct mntarg *ma, void * data, uint64_t flags)
{
struct smbfs_args args;
int error;
@@ -234,10 +234,10 @@ smbfs_mount(struct mount *mp)
bzero(pc, MNAMELEN);
*pc++ = '/';
*pc++ = '/';
- pc=index(strncpy(pc, vcp->vc_username, pe - pc - 2), 0);
+ pc = strchr(strncpy(pc, vcp->vc_username, pe - pc - 2), 0);
if (pc < pe-1) {
*(pc++) = '@';
- pc = index(strncpy(pc, vcp->vc_srvname, pe - pc - 2), 0);
+ pc = strchr(strncpy(pc, vcp->vc_srvname, pe - pc - 2), 0);
if (pc < pe - 1) {
*(pc++) = '/';
strncpy(pc, ssp->ss_name, pe - pc - 2);
diff --git a/sys/fs/smbfs/smbfs_vnops.c b/sys/fs/smbfs/smbfs_vnops.c
index 830c249..a236ca7 100644
--- a/sys/fs/smbfs/smbfs_vnops.c
+++ b/sys/fs/smbfs/smbfs_vnops.c
@@ -1039,7 +1039,7 @@ smbfs_pathcheck(struct smbmount *smp, const char *name, int nmlen, int nameiop)
* Backslash characters, being a path delimiter, are prohibited
* within a path component even for LOOKUP operations.
*/
- if (index(name, '\\') != NULL)
+ if (strchr(name, '\\') != NULL)
return ENOENT;
if (nameiop == LOOKUP)
@@ -1051,20 +1051,20 @@ smbfs_pathcheck(struct smbmount *smp, const char *name, int nmlen, int nameiop)
*/
if (nmlen > 12)
return ENAMETOOLONG;
- cp = index(name, '.');
+ cp = strchr(name, '.');
if (cp == NULL)
return error;
if (cp == name || (cp - name) > 8)
return error;
- cp = index(cp + 1, '.');
+ cp = strchr(cp + 1, '.');
if (cp != NULL)
return error;
for (cp = name, i = 0; i < nmlen; i++, cp++)
- if (index(badchars83, *cp) != NULL)
+ if (strchr(badchars83, *cp) != NULL)
return error;
}
for (cp = name, i = 0; i < nmlen; i++, cp++)
- if (index(badchars, *cp) != NULL)
+ if (strchr(badchars, *cp) != NULL)
return error;
return 0;
}
diff --git a/sys/fs/tmpfs/tmpfs.h b/sys/fs/tmpfs/tmpfs.h
index fe00fea..efa7c6d 100644
--- a/sys/fs/tmpfs/tmpfs.h
+++ b/sys/fs/tmpfs/tmpfs.h
@@ -436,7 +436,7 @@ struct tmpfs_dirent * tmpfs_dir_lookupbycookie(struct tmpfs_node *, off_t);
int tmpfs_dir_getdents(struct tmpfs_node *, struct uio *, off_t *);
int tmpfs_dir_whiteout_add(struct vnode *, struct componentname *);
void tmpfs_dir_whiteout_remove(struct vnode *, struct componentname *);
-int tmpfs_reg_resize(struct vnode *, off_t);
+int tmpfs_reg_resize(struct vnode *, off_t, boolean_t);
int tmpfs_chflags(struct vnode *, int, struct ucred *, struct thread *);
int tmpfs_chmod(struct vnode *, mode_t, struct ucred *, struct thread *);
int tmpfs_chown(struct vnode *, uid_t, gid_t, struct ucred *,
diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c
index e9324cf..d2b2245 100644
--- a/sys/fs/tmpfs/tmpfs_subr.c
+++ b/sys/fs/tmpfs/tmpfs_subr.c
@@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$");
#include <vm/vm.h>
#include <vm/vm_object.h>
#include <vm/vm_page.h>
+#include <vm/vm_pageout.h>
#include <vm/vm_pager.h>
#include <vm/vm_extern.h>
@@ -881,15 +882,15 @@ tmpfs_dir_whiteout_remove(struct vnode *dvp, struct componentname *cnp)
* Returns zero on success or an appropriate error code on failure.
*/
int
-tmpfs_reg_resize(struct vnode *vp, off_t newsize)
+tmpfs_reg_resize(struct vnode *vp, off_t newsize, boolean_t ignerr)
{
struct tmpfs_mount *tmp;
struct tmpfs_node *node;
vm_object_t uobj;
- vm_page_t m;
- vm_pindex_t newpages, oldpages;
+ vm_page_t m, ma[1];
+ vm_pindex_t idx, newpages, oldpages;
off_t oldsize;
- size_t zerolen;
+ int base, rv;
MPASS(vp->v_type == VREG);
MPASS(newsize >= 0);
@@ -912,15 +913,61 @@ tmpfs_reg_resize(struct vnode *vp, off_t newsize)
newpages - oldpages > TMPFS_PAGES_AVAIL(tmp))
return (ENOSPC);
- TMPFS_LOCK(tmp);
- tmp->tm_pages_used += (newpages - oldpages);
- TMPFS_UNLOCK(tmp);
-
- node->tn_size = newsize;
- vnode_pager_setsize(vp, newsize);
VM_OBJECT_LOCK(uobj);
if (newsize < oldsize) {
/*
+ * Zero the truncated part of the last page.
+ */
+ base = newsize & PAGE_MASK;
+ if (base != 0) {
+ idx = OFF_TO_IDX(newsize);
+retry:
+ m = vm_page_lookup(uobj, idx);
+ if (m != NULL) {
+ if ((m->oflags & VPO_BUSY) != 0 ||
+ m->busy != 0) {
+ vm_page_sleep(m, "tmfssz");
+ goto retry;
+ }
+ MPASS(m->valid == VM_PAGE_BITS_ALL);
+ } else if (vm_pager_has_page(uobj, idx, NULL, NULL)) {
+ m = vm_page_alloc(uobj, idx, VM_ALLOC_NORMAL);
+ if (m == NULL) {
+ VM_OBJECT_UNLOCK(uobj);
+ VM_WAIT;
+ VM_OBJECT_LOCK(uobj);
+ goto retry;
+ } else if (m->valid != VM_PAGE_BITS_ALL) {
+ ma[0] = m;
+ rv = vm_pager_get_pages(uobj, ma, 1, 0);
+ m = vm_page_lookup(uobj, idx);
+ } else
+ /* A cached page was reactivated. */
+ rv = VM_PAGER_OK;
+ vm_page_lock(m);
+ if (rv == VM_PAGER_OK) {
+ vm_page_deactivate(m);
+ vm_page_unlock(m);
+ vm_page_wakeup(m);
+ } else {
+ vm_page_free(m);
+ vm_page_unlock(m);
+ if (ignerr)
+ m = NULL;
+ else {
+ VM_OBJECT_UNLOCK(uobj);
+ return (EIO);
+ }
+ }
+ }
+ if (m != NULL) {
+ pmap_zero_page_area(m, base, PAGE_SIZE - base);
+ vm_page_dirty(m);
+ vm_pager_page_unswapped(m);
+ }
+ }
+
+ /*
* Release any swap space and free any whole pages.
*/
if (newpages < oldpages) {
@@ -928,19 +975,16 @@ tmpfs_reg_resize(struct vnode *vp, off_t newsize)
newpages);
vm_object_page_remove(uobj, newpages, 0, 0);
}
-
- /*
- * Zero the truncated part of the last page.
- */
- zerolen = round_page(newsize) - newsize;
- if (zerolen > 0) {
- m = vm_page_grab(uobj, OFF_TO_IDX(newsize),
- VM_ALLOC_NOBUSY | VM_ALLOC_NORMAL | VM_ALLOC_RETRY);
- pmap_zero_page_area(m, PAGE_SIZE - zerolen, zerolen);
- }
}
uobj->size = newpages;
VM_OBJECT_UNLOCK(uobj);
+
+ TMPFS_LOCK(tmp);
+ tmp->tm_pages_used += (newpages - oldpages);
+ TMPFS_UNLOCK(tmp);
+
+ node->tn_size = newsize;
+ vnode_pager_setsize(vp, newsize);
return (0);
}
@@ -1311,7 +1355,7 @@ tmpfs_truncate(struct vnode *vp, off_t length)
if (length > VFS_TO_TMPFS(vp->v_mount)->tm_maxfilesize)
return (EFBIG);
- error = tmpfs_reg_resize(vp, length);
+ error = tmpfs_reg_resize(vp, length, FALSE);
if (error == 0) {
node->tn_status |= TMPFS_NODE_CHANGED | TMPFS_NODE_MODIFIED;
}
diff --git a/sys/fs/tmpfs/tmpfs_vfsops.c b/sys/fs/tmpfs/tmpfs_vfsops.c
index 74aeba1..e04c410 100644
--- a/sys/fs/tmpfs/tmpfs_vfsops.c
+++ b/sys/fs/tmpfs/tmpfs_vfsops.c
@@ -150,10 +150,12 @@ tmpfs_mount(struct mount *mp)
return (EINVAL);
if (mp->mnt_flag & MNT_UPDATE) {
- /* XXX: There is no support yet to update file system
- * settings. Should be added. */
-
- return EOPNOTSUPP;
+ /*
+ * Only support update mounts for NFS export.
+ */
+ if (vfs_flagopt(mp->mnt_optnew, "export", NULL, 0))
+ return (0);
+ return (EOPNOTSUPP);
}
vn_lock(mp->mnt_vnodecovered, LK_SHARED | LK_RETRY);
diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c
index dfe1183..3f1482e 100644
--- a/sys/fs/tmpfs/tmpfs_vnops.c
+++ b/sys/fs/tmpfs/tmpfs_vnops.c
@@ -437,18 +437,20 @@ tmpfs_nocacheread(vm_object_t tobj, vm_pindex_t idx,
vm_offset_t offset, size_t tlen, struct uio *uio)
{
vm_page_t m;
- int error;
+ int error, rv;
VM_OBJECT_LOCK(tobj);
- vm_object_pip_add(tobj, 1);
m = vm_page_grab(tobj, idx, VM_ALLOC_WIRED |
- VM_ALLOC_ZERO | VM_ALLOC_NORMAL | VM_ALLOC_RETRY);
+ VM_ALLOC_NORMAL | VM_ALLOC_RETRY);
if (m->valid != VM_PAGE_BITS_ALL) {
if (vm_pager_has_page(tobj, idx, NULL, NULL)) {
- error = vm_pager_get_pages(tobj, &m, 1, 0);
- if (error != 0) {
- printf("tmpfs get pages from pager error [read]\n");
- goto out;
+ rv = vm_pager_get_pages(tobj, &m, 1, 0);
+ if (rv != VM_PAGER_OK) {
+ vm_page_lock(m);
+ vm_page_free(m);
+ vm_page_unlock(m);
+ VM_OBJECT_UNLOCK(tobj);
+ return (EIO);
}
} else
vm_page_zero_invalid(m, TRUE);
@@ -456,12 +458,10 @@ tmpfs_nocacheread(vm_object_t tobj, vm_pindex_t idx,
VM_OBJECT_UNLOCK(tobj);
error = uiomove_fromphys(&m, offset, tlen, uio);
VM_OBJECT_LOCK(tobj);
-out:
vm_page_lock(m);
vm_page_unwire(m, TRUE);
vm_page_unlock(m);
vm_page_wakeup(m);
- vm_object_pip_subtract(tobj, 1);
VM_OBJECT_UNLOCK(tobj);
return (error);
@@ -624,7 +624,7 @@ tmpfs_mappedwrite(vm_object_t vobj, vm_object_t tobj, size_t len, struct uio *ui
vm_offset_t offset;
off_t addr;
size_t tlen;
- int error;
+ int error, rv;
error = 0;
@@ -664,14 +664,16 @@ lookupvpg:
}
nocache:
VM_OBJECT_LOCK(tobj);
- vm_object_pip_add(tobj, 1);
tpg = vm_page_grab(tobj, idx, VM_ALLOC_WIRED |
- VM_ALLOC_ZERO | VM_ALLOC_NORMAL | VM_ALLOC_RETRY);
+ VM_ALLOC_NORMAL | VM_ALLOC_RETRY);
if (tpg->valid != VM_PAGE_BITS_ALL) {
if (vm_pager_has_page(tobj, idx, NULL, NULL)) {
- error = vm_pager_get_pages(tobj, &tpg, 1, 0);
- if (error != 0) {
- printf("tmpfs get pages from pager error [write]\n");
+ rv = vm_pager_get_pages(tobj, &tpg, 1, 0);
+ if (rv != VM_PAGER_OK) {
+ vm_page_lock(tpg);
+ vm_page_free(tpg);
+ vm_page_unlock(tpg);
+ error = EIO;
goto out;
}
} else
@@ -685,9 +687,6 @@ nocache:
pmap_copy_page(vpg, tpg);
}
VM_OBJECT_LOCK(tobj);
-out:
- if (vobj != NULL)
- VM_OBJECT_LOCK(vobj);
if (error == 0) {
KASSERT(tpg->valid == VM_PAGE_BITS_ALL,
("parts of tpg invalid"));
@@ -697,12 +696,13 @@ out:
vm_page_unwire(tpg, TRUE);
vm_page_unlock(tpg);
vm_page_wakeup(tpg);
- if (vpg != NULL)
+out:
+ VM_OBJECT_UNLOCK(tobj);
+ if (vpg != NULL) {
+ VM_OBJECT_LOCK(vobj);
vm_page_wakeup(vpg);
- if (vobj != NULL)
VM_OBJECT_UNLOCK(vobj);
- vm_object_pip_subtract(tobj, 1);
- VM_OBJECT_UNLOCK(tobj);
+ }
return (error);
}
@@ -747,7 +747,8 @@ tmpfs_write(struct vop_write_args *v)
extended = uio->uio_offset + uio->uio_resid > node->tn_size;
if (extended) {
- error = tmpfs_reg_resize(vp, uio->uio_offset + uio->uio_resid);
+ error = tmpfs_reg_resize(vp, uio->uio_offset + uio->uio_resid,
+ FALSE);
if (error != 0)
goto out;
}
@@ -773,7 +774,7 @@ tmpfs_write(struct vop_write_args *v)
}
if (error != 0)
- (void)tmpfs_reg_resize(vp, oldsize);
+ (void)tmpfs_reg_resize(vp, oldsize, TRUE);
out:
MPASS(IMPLIES(error == 0, uio->uio_resid == 0));
diff --git a/sys/gdb/gdb_cons.c b/sys/gdb/gdb_cons.c
index 2e01cd4..6ecdc04 100644
--- a/sys/gdb/gdb_cons.c
+++ b/sys/gdb/gdb_cons.c
@@ -87,6 +87,16 @@ gdb_cnterm(struct consdev *cp)
{
}
+static void
+gdb_cngrab(struct consdev *cp)
+{
+}
+
+static void
+gdb_cnungrab(struct consdev *cp)
+{
+}
+
static int
gdb_cngetc(struct consdev *cp)
{
diff --git a/sys/geom/eli/g_eli.c b/sys/geom/eli/g_eli.c
index 874aa26..72f93f4 100644
--- a/sys/geom/eli/g_eli.c
+++ b/sys/geom/eli/g_eli.c
@@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/systm.h>
+#include <sys/cons.h>
#include <sys/kernel.h>
#include <sys/linker.h>
#include <sys/module.h>
@@ -1085,7 +1086,7 @@ g_eli_taste(struct g_class *mp, struct g_provider *pp, int flags __unused)
/* Ask for the passphrase if defined. */
if (md.md_iterations >= 0) {
printf("Enter passphrase for %s: ", pp->name);
- gets(passphrase, sizeof(passphrase),
+ cngets(passphrase, sizeof(passphrase),
g_eli_visible_passphrase);
}
diff --git a/sys/geom/part/g_part_ebr.c b/sys/geom/part/g_part_ebr.c
index 85b8a8a..c7657f8 100644
--- a/sys/geom/part/g_part_ebr.c
+++ b/sys/geom/part/g_part_ebr.c
@@ -333,9 +333,10 @@ g_part_ebr_dumpto(struct g_part_table *table, struct g_part_entry *baseentry)
{
struct g_part_ebr_entry *entry;
- /* Allow dumping to a FreeBSD partition only. */
+ /* Allow dumping to a FreeBSD partition or Linux swap partition only. */
entry = (struct g_part_ebr_entry *)baseentry;
- return ((entry->ent.dp_typ == DOSPTYP_386BSD) ? 1 : 0);
+ return ((entry->ent.dp_typ == DOSPTYP_386BSD ||
+ entry->ent.dp_typ == DOSPTYP_LINSWP) ? 1 : 0);
}
#if defined(GEOM_PART_EBR_COMPAT)
diff --git a/sys/geom/part/g_part_mbr.c b/sys/geom/part/g_part_mbr.c
index bebdfee..126210b 100644
--- a/sys/geom/part/g_part_mbr.c
+++ b/sys/geom/part/g_part_mbr.c
@@ -123,6 +123,7 @@ static struct g_part_mbr_alias {
{ DOSPTYP_LINUX, G_PART_ALIAS_LINUX_DATA },
{ DOSPTYP_LINLVM, G_PART_ALIAS_LINUX_LVM },
{ DOSPTYP_LINRAID, G_PART_ALIAS_LINUX_RAID },
+ { DOSPTYP_PPCBOOT, G_PART_ALIAS_FREEBSD_BOOT },
};
static int
@@ -304,9 +305,10 @@ g_part_mbr_dumpto(struct g_part_table *table, struct g_part_entry *baseentry)
{
struct g_part_mbr_entry *entry;
- /* Allow dumping to a FreeBSD partition only. */
+ /* Allow dumping to a FreeBSD partition or Linux swap partition only. */
entry = (struct g_part_mbr_entry *)baseentry;
- return ((entry->ent.dp_typ == DOSPTYP_386BSD) ? 1 : 0);
+ return ((entry->ent.dp_typ == DOSPTYP_386BSD ||
+ entry->ent.dp_typ == DOSPTYP_LINSWP) ? 1 : 0);
}
static int
diff --git a/sys/geom/raid/md_intel.c b/sys/geom/raid/md_intel.c
index 2b11d3b..0935223 100644
--- a/sys/geom/raid/md_intel.c
+++ b/sys/geom/raid/md_intel.c
@@ -64,7 +64,10 @@ struct intel_raid_map {
uint8_t total_domains;
uint8_t failed_disk_num;
uint8_t ddf;
- uint32_t filler_2[7];
+ uint32_t offset_hi;
+ uint32_t disk_sectors_hi;
+ uint32_t stripe_count_hi;
+ uint32_t filler_2[4];
uint32_t disk_idx[1]; /* total_disks entries. */
#define INTEL_DI_IDX 0x00ffffff
#define INTEL_DI_RBLD 0x01000000
@@ -111,7 +114,8 @@ struct intel_raid_vol {
uint8_t fs_state;
uint16_t verify_errors;
uint16_t bad_blocks;
- uint32_t filler_1[4];
+ uint32_t curr_migr_unit_hi;
+ uint32_t filler_1[3];
struct intel_raid_map map[1]; /* 2 entries if migr_state != 0. */
} __packed;
@@ -125,8 +129,9 @@ struct intel_raid_disk {
#define INTEL_F_ASSIGNED 0x02
#define INTEL_F_FAILED 0x04
#define INTEL_F_ONLINE 0x08
-
- uint32_t filler[5];
+ uint32_t owner_cfg_num;
+ uint32_t sectors_hi;
+ uint32_t filler[3];
} __packed;
struct intel_raid_conf {
@@ -254,6 +259,82 @@ intel_get_volume(struct intel_raid_conf *meta, int i)
return (mvol);
}
+static off_t
+intel_get_map_offset(struct intel_raid_map *mmap)
+{
+ off_t offset = (off_t)mmap->offset_hi << 32;
+
+ offset += mmap->offset;
+ return (offset);
+}
+
+static void
+intel_set_map_offset(struct intel_raid_map *mmap, off_t offset)
+{
+
+ mmap->offset = offset & 0xffffffff;
+ mmap->offset_hi = offset >> 32;
+}
+
+static off_t
+intel_get_map_disk_sectors(struct intel_raid_map *mmap)
+{
+ off_t disk_sectors = (off_t)mmap->disk_sectors_hi << 32;
+
+ disk_sectors += mmap->disk_sectors;
+ return (disk_sectors);
+}
+
+static void
+intel_set_map_disk_sectors(struct intel_raid_map *mmap, off_t disk_sectors)
+{
+
+ mmap->disk_sectors = disk_sectors & 0xffffffff;
+ mmap->disk_sectors_hi = disk_sectors >> 32;
+}
+
+static void
+intel_set_map_stripe_count(struct intel_raid_map *mmap, off_t stripe_count)
+{
+
+ mmap->stripe_count = stripe_count & 0xffffffff;
+ mmap->stripe_count_hi = stripe_count >> 32;
+}
+
+static off_t
+intel_get_disk_sectors(struct intel_raid_disk *disk)
+{
+ off_t sectors = (off_t)disk->sectors_hi << 32;
+
+ sectors += disk->sectors;
+ return (sectors);
+}
+
+static void
+intel_set_disk_sectors(struct intel_raid_disk *disk, off_t sectors)
+{
+
+ disk->sectors = sectors & 0xffffffff;
+ disk->sectors_hi = sectors >> 32;
+}
+
+static off_t
+intel_get_vol_curr_migr_unit(struct intel_raid_vol *vol)
+{
+ off_t curr_migr_unit = (off_t)vol->curr_migr_unit_hi << 32;
+
+ curr_migr_unit += vol->curr_migr_unit;
+ return (curr_migr_unit);
+}
+
+static void
+intel_set_vol_curr_migr_unit(struct intel_raid_vol *vol, off_t curr_migr_unit)
+{
+
+ vol->curr_migr_unit = curr_migr_unit & 0xffffffff;
+ vol->curr_migr_unit_hi = curr_migr_unit >> 32;
+}
+
static void
g_raid_md_intel_print(struct intel_raid_conf *meta)
{
@@ -274,10 +355,11 @@ g_raid_md_intel_print(struct intel_raid_conf *meta)
printf("attributes 0x%08x\n", meta->attributes);
printf("total_disks %u\n", meta->total_disks);
printf("total_volumes %u\n", meta->total_volumes);
- printf("DISK# serial disk_sectors disk_id flags\n");
+ printf("DISK# serial disk_sectors disk_sectors_hi disk_id flags\n");
for (i = 0; i < meta->total_disks; i++ ) {
- printf(" %d <%.16s> %u 0x%08x 0x%08x\n", i,
+ printf(" %d <%.16s> %u %u 0x%08x 0x%08x\n", i,
meta->disk[i].serial, meta->disk[i].sectors,
+ meta->disk[i].sectors_hi,
meta->disk[i].id, meta->disk[i].flags);
}
for (i = 0; i < meta->total_volumes; i++) {
@@ -288,6 +370,7 @@ g_raid_md_intel_print(struct intel_raid_conf *meta)
printf(" state %u\n", mvol->state);
printf(" reserved %u\n", mvol->reserved);
printf(" curr_migr_unit %u\n", mvol->curr_migr_unit);
+ printf(" curr_migr_unit_hi %u\n", mvol->curr_migr_unit_hi);
printf(" checkpoint_id %u\n", mvol->checkpoint_id);
printf(" migr_state %u\n", mvol->migr_state);
printf(" migr_type %u\n", mvol->migr_type);
@@ -297,8 +380,11 @@ g_raid_md_intel_print(struct intel_raid_conf *meta)
printf(" *** Map %d ***\n", j);
mmap = intel_get_map(mvol, j);
printf(" offset %u\n", mmap->offset);
+ printf(" offset_hi %u\n", mmap->offset_hi);
printf(" disk_sectors %u\n", mmap->disk_sectors);
+ printf(" disk_sectors_hi %u\n", mmap->disk_sectors_hi);
printf(" stripe_count %u\n", mmap->stripe_count);
+ printf(" stripe_count_hi %u\n", mmap->stripe_count_hi);
printf(" strip_sectors %u\n", mmap->strip_sectors);
printf(" status %u\n", mmap->status);
printf(" type %u\n", mmap->type);
@@ -660,12 +746,15 @@ g_raid_md_intel_start_disk(struct g_raid_disk *disk)
continue;
/* Make sure this disk is big enough. */
TAILQ_FOREACH(sd, &tmpdisk->d_subdisks, sd_next) {
+ off_t disk_sectors =
+ intel_get_disk_sectors(&pd->pd_disk_meta);
+
if (sd->sd_offset + sd->sd_size + 4096 >
- (off_t)pd->pd_disk_meta.sectors * 512) {
+ disk_sectors * 512) {
G_RAID_DEBUG1(1, sc,
"Disk too small (%llu < %llu)",
- ((unsigned long long)
- pd->pd_disk_meta.sectors) * 512,
+ (unsigned long long)
+ disk_sectors * 512,
(unsigned long long)
sd->sd_offset + sd->sd_size + 4096);
break;
@@ -788,7 +877,7 @@ nofit:
sd->sd_rebuild_pos = 0;
} else {
sd->sd_rebuild_pos =
- (off_t)mvol->curr_migr_unit *
+ intel_get_vol_curr_migr_unit(mvol) *
sd->sd_volume->v_strip_size *
mmap0->total_domains;
}
@@ -815,7 +904,7 @@ nofit:
sd->sd_rebuild_pos = 0;
} else {
sd->sd_rebuild_pos =
- (off_t)mvol->curr_migr_unit *
+ intel_get_vol_curr_migr_unit(mvol) *
sd->sd_volume->v_strip_size *
mmap0->total_domains;
}
@@ -967,8 +1056,8 @@ g_raid_md_intel_start(struct g_raid_softc *sc)
vol->v_sectorsize = 512; //ZZZ
for (j = 0; j < vol->v_disks_count; j++) {
sd = &vol->v_subdisks[j];
- sd->sd_offset = (off_t)mmap->offset * 512; //ZZZ
- sd->sd_size = (off_t)mmap->disk_sectors * 512; //ZZZ
+ sd->sd_offset = intel_get_map_offset(mmap) * 512; //ZZZ
+ sd->sd_size = intel_get_map_disk_sectors(mmap) * 512; //ZZZ
}
g_raid_start_volume(vol);
}
@@ -1176,9 +1265,6 @@ g_raid_md_taste_intel(struct g_raid_md_object *md, struct g_class *mp,
G_RAID_DEBUG(1,
"Intel vendor mismatch 0x%04x != 0x8086",
vendor);
- } else if (pp->mediasize / pp->sectorsize > UINT32_MAX) {
- G_RAID_DEBUG(1,
- "Intel disk '%s' is too big.", pp->name);
} else {
G_RAID_DEBUG(1,
"No Intel metadata, forcing spare.");
@@ -1195,10 +1281,10 @@ g_raid_md_taste_intel(struct g_raid_md_object *md, struct g_class *mp,
G_RAID_DEBUG(1, "Intel serial '%s' not found", serial);
goto fail1;
}
- if (meta->disk[disk_pos].sectors !=
+ if (intel_get_disk_sectors(&meta->disk[disk_pos]) !=
(pp->mediasize / pp->sectorsize)) {
G_RAID_DEBUG(1, "Intel size mismatch %ju != %ju",
- (off_t)meta->disk[disk_pos].sectors,
+ intel_get_disk_sectors(&meta->disk[disk_pos]),
(off_t)(pp->mediasize / pp->sectorsize));
goto fail1;
}
@@ -1266,7 +1352,8 @@ search:
pd->pd_disk_pos = -1;
if (spare == 2) {
memcpy(&pd->pd_disk_meta.serial[0], serial, INTEL_SERIAL_LEN);
- pd->pd_disk_meta.sectors = pp->mediasize / pp->sectorsize;
+ intel_set_disk_sectors(&pd->pd_disk_meta,
+ pp->mediasize / pp->sectorsize);
pd->pd_disk_meta.id = 0;
pd->pd_disk_meta.flags = INTEL_F_SPARE;
} else {
@@ -1372,7 +1459,7 @@ g_raid_md_ctl_intel(struct g_raid_md_object *md,
const char *verb, *volname, *levelname, *diskname;
char *tmp;
int *nargs, *force;
- off_t off, size, sectorsize, strip;
+ off_t off, size, sectorsize, strip, disk_sectors;
intmax_t *sizearg, *striparg;
int numdisks, i, len, level, qual, update;
int error;
@@ -1452,13 +1539,6 @@ g_raid_md_ctl_intel(struct g_raid_md_object *md,
cp->private = disk;
g_topology_unlock();
- if (pp->mediasize / pp->sectorsize > UINT32_MAX) {
- gctl_error(req,
- "Disk '%s' is too big.", diskname);
- error = -8;
- break;
- }
-
error = g_raid_md_get_label(cp,
&pd->pd_disk_meta.serial[0], INTEL_SERIAL_LEN);
if (error != 0) {
@@ -1479,7 +1559,8 @@ g_raid_md_ctl_intel(struct g_raid_md_object *md,
"Dumping not supported by %s.",
cp->provider->name);
- pd->pd_disk_meta.sectors = pp->mediasize / pp->sectorsize;
+ intel_set_disk_sectors(&pd->pd_disk_meta,
+ pp->mediasize / pp->sectorsize);
if (size > pp->mediasize)
size = pp->mediasize;
if (sectorsize < pp->sectorsize)
@@ -1544,10 +1625,6 @@ g_raid_md_ctl_intel(struct g_raid_md_object *md,
gctl_error(req, "Size too small.");
return (-13);
}
- if (size > 0xffffffffllu * sectorsize) {
- gctl_error(req, "Size too big.");
- return (-14);
- }
/* We have all we need, create things: volume, ... */
mdi->mdio_started = 1;
@@ -1655,8 +1732,11 @@ g_raid_md_ctl_intel(struct g_raid_md_object *md,
disk = vol1->v_subdisks[i].sd_disk;
pd = (struct g_raid_md_intel_perdisk *)
disk->d_md_data;
- if ((off_t)pd->pd_disk_meta.sectors * 512 < size)
- size = (off_t)pd->pd_disk_meta.sectors * 512;
+ disk_sectors =
+ intel_get_disk_sectors(&pd->pd_disk_meta);
+
+ if (disk_sectors * 512 < size)
+ size = disk_sectors * 512;
if (disk->d_consumer != NULL &&
disk->d_consumer->provider != NULL &&
disk->d_consumer->provider->sectorsize >
@@ -1950,14 +2030,6 @@ g_raid_md_ctl_intel(struct g_raid_md_object *md,
pp = cp->provider;
g_topology_unlock();
- if (pp->mediasize / pp->sectorsize > UINT32_MAX) {
- gctl_error(req,
- "Disk '%s' is too big.", diskname);
- g_raid_kill_consumer(sc, cp);
- error = -8;
- break;
- }
-
/* Read disk serial. */
error = g_raid_md_get_label(cp,
&serial[0], INTEL_SERIAL_LEN);
@@ -1990,7 +2062,8 @@ g_raid_md_ctl_intel(struct g_raid_md_object *md,
memcpy(&pd->pd_disk_meta.serial[0], &serial[0],
INTEL_SERIAL_LEN);
- pd->pd_disk_meta.sectors = pp->mediasize / pp->sectorsize;
+ intel_set_disk_sectors(&pd->pd_disk_meta,
+ pp->mediasize / pp->sectorsize);
pd->pd_disk_meta.id = 0;
pd->pd_disk_meta.flags = INTEL_F_SPARE;
@@ -2165,8 +2238,8 @@ g_raid_md_write_intel(struct g_raid_md_object *md, struct g_raid_volume *tvol,
mmap0 = intel_get_map(mvol, 0);
/* Write map / common part of two maps. */
- mmap0->offset = sd->sd_offset / sectorsize;
- mmap0->disk_sectors = sd->sd_size / sectorsize;
+ intel_set_map_offset(mmap0, sd->sd_offset / sectorsize);
+ intel_set_map_disk_sectors(mmap0, sd->sd_size / sectorsize);
mmap0->strip_sectors = vol->v_strip_size / sectorsize;
if (vol->v_state == G_RAID_VOLUME_S_BROKEN)
mmap0->status = INTEL_S_FAILURE;
@@ -2188,15 +2261,15 @@ g_raid_md_write_intel(struct g_raid_md_object *md, struct g_raid_volume *tvol,
mmap0->total_domains = 2;
else
mmap0->total_domains = 1;
- mmap0->stripe_count = sd->sd_size / vol->v_strip_size /
- mmap0->total_domains;
+ intel_set_map_stripe_count(mmap0,
+ sd->sd_size / vol->v_strip_size / mmap0->total_domains);
mmap0->failed_disk_num = 0xff;
mmap0->ddf = 1;
/* If there are two maps - copy common and update. */
if (mvol->migr_state) {
- mvol->curr_migr_unit = pos /
- vol->v_strip_size / mmap0->total_domains;
+ intel_set_vol_curr_migr_unit(mvol,
+ pos / vol->v_strip_size / mmap0->total_domains);
mmap1 = intel_get_map(mvol, 1);
memcpy(mmap1, mmap0, sizeof(struct intel_raid_map));
mmap0->status = INTEL_S_READY;
diff --git a/sys/geom/uncompress/g_uncompress.c b/sys/geom/uncompress/g_uncompress.c
new file mode 100644
index 0000000..778d5c6
--- /dev/null
+++ b/sys/geom/uncompress/g_uncompress.c
@@ -0,0 +1,670 @@
+/*-
+ * Copyright (c) 2010-2012 Aleksandr Rybalko
+ * Copyright (c) 2004 Max Khon
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ */
+
+/*
+ * GEOM UNCOMPRESS module - simple decompression module for use with read-only
+ * copressed images maked by mkuzip(8) or mkulzma(8) utilities.
+ *
+ * To enable module in kernel config, put this line:
+ * device geom_uncompress
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/bio.h>
+#include <sys/endian.h>
+#include <sys/errno.h>
+#include <sys/kernel.h>
+#include <sys/lock.h>
+#include <sys/mutex.h>
+#include <sys/malloc.h>
+#include <sys/systm.h>
+
+#include <geom/geom.h>
+
+#include <net/zlib.h>
+#include <contrib/xz-embedded/linux/include/linux/xz.h>
+
+#ifdef GEOM_UNCOMPRESS_DEBUG
+#define DPRINTF(a) printf a
+extern int g_debugflags;
+#else
+#define DPRINTF(a)
+#endif
+
+static MALLOC_DEFINE(M_GEOM_UNCOMPRESS, "geom_uncompress",
+ "GEOM UNCOMPRESS data structures");
+
+#define UNCOMPRESS_CLASS_NAME "UNCOMPRESS"
+#define GEOM_UZIP_MAJVER '2'
+#define GEOM_ULZMA_MAJVER '3'
+
+/*
+ * Maximum allowed valid block size (to prevent foot-shooting)
+ */
+#define MAX_BLKSZ (MAXPHYS)
+
+/*
+ * Integer values (block size, number of blocks, offsets)
+ * are stored in big-endian (network) order on disk and struct cloop_header
+ * and in native order in struct g_uncompress_softc
+ */
+
+#define CLOOP_MAGIC_LEN 128
+static char CLOOP_MAGIC_START[] = "#!/bin/sh\n";
+
+struct cloop_header {
+ char magic[CLOOP_MAGIC_LEN]; /* cloop magic */
+ uint32_t blksz; /* block size */
+ uint32_t nblocks; /* number of blocks */
+};
+
+struct g_uncompress_softc {
+ uint32_t blksz; /* block size */
+ uint32_t nblocks; /* number of blocks */
+ uint64_t *offsets;
+ enum {
+ GEOM_UZIP = 1,
+ GEOM_ULZMA
+ } type;
+
+ struct mtx last_mtx;
+ uint32_t last_blk; /* last blk no */
+ char *last_buf; /* last blk data */
+ int req_total; /* total requests */
+ int req_cached; /* cached requests */
+
+ /* XZ decoder structs */
+ struct xz_buf *b;
+ struct xz_dec *s;
+ z_stream *zs;
+};
+
+static void
+g_uncompress_softc_free(struct g_uncompress_softc *sc, struct g_geom *gp)
+{
+
+ if (gp != NULL) {
+ printf("%s: %d requests, %d cached\n",
+ gp->name, sc->req_total, sc->req_cached);
+ }
+ if (sc->offsets != NULL) {
+ free(sc->offsets, M_GEOM_UNCOMPRESS);
+ sc->offsets = 0;
+ }
+
+ switch (sc->type) {
+ case GEOM_ULZMA:
+ if (sc->b) {
+ free(sc->b, M_GEOM_UNCOMPRESS);
+ sc->b = 0;
+ }
+ if (sc->s) {
+ xz_dec_end(sc->s);
+ sc->s = 0;
+ }
+ break;
+ case GEOM_UZIP:
+ if (sc->zs) {
+ inflateEnd(sc->zs);
+ free(sc->zs, M_GEOM_UNCOMPRESS);
+ sc->zs = 0;
+ }
+ break;
+ }
+
+ mtx_destroy(&sc->last_mtx);
+ free(sc->last_buf, M_GEOM_UNCOMPRESS);
+ free(sc, M_GEOM_UNCOMPRESS);
+}
+
+static void *
+z_alloc(void *nil, u_int type, u_int size)
+{
+ void *ptr;
+
+ ptr = malloc(type * size, M_GEOM_UNCOMPRESS, M_NOWAIT);
+ return (ptr);
+}
+
+static void
+z_free(void *nil, void *ptr)
+{
+
+ free(ptr, M_GEOM_UNCOMPRESS);
+}
+
+static void
+g_uncompress_done(struct bio *bp)
+{
+ struct g_uncompress_softc *sc;
+ struct g_provider *pp, *pp2;
+ struct g_consumer *cp;
+ struct g_geom *gp;
+ struct bio *bp2;
+ uint32_t start_blk, i;
+ off_t pos, upos;
+ size_t bsize;
+ int err;
+
+ err = 0;
+ bp2 = bp->bio_parent;
+ pp = bp2->bio_to;
+ gp = pp->geom;
+ cp = LIST_FIRST(&gp->consumer);
+ pp2 = cp->provider;
+ sc = gp->softc;
+ DPRINTF(("%s: done\n", gp->name));
+
+ bp2->bio_error = bp->bio_error;
+ if (bp2->bio_error != 0)
+ goto done;
+
+ /*
+ * Example:
+ * Uncompressed block size = 65536
+ * User request: 65540-261632
+ * (4 uncompressed blocks -4B at start, -512B at end)
+ *
+ * We have 512(secsize)*63(nsec) = 32256B at offset 1024
+ * From: 1024 bp->bio_offset = 1024
+ * To: 33280 bp->bio_length = 33280 - 1024 = 32256
+ * Compressed blocks: 0-1020, 1020-1080, 1080-4845, 4845-12444,
+ * 12444-33210, 33210-44100, ...
+ *
+ * Get start_blk from user request:
+ * start_blk = bp2->bio_offset / 65536 = 65540/65536 = 1
+ * bsize (block size of parent) = pp2->sectorsize (Now is 4B)
+ * pos(in stream from parent) = sc->offsets[start_blk] % bsize =
+ * = sc->offsets[1] % 4 = 1020 % 4 = 0
+ */
+
+ /*
+ * Uncompress data.
+ */
+ start_blk = bp2->bio_offset / sc->blksz;
+ bsize = pp2->sectorsize;
+ pos = sc->offsets[start_blk] % bsize;
+ upos = 0;
+
+ DPRINTF(("%s: done: bio_length %lld bio_completed %lld start_blk %d, "
+ "pos %lld, upos %lld (%lld, %d, %d)\n",
+ gp->name, bp->bio_length, bp->bio_completed, start_blk, pos, upos,
+ bp2->bio_offset, sc->blksz, bsize));
+
+ for (i = start_blk; upos < bp2->bio_length; i++) {
+ off_t len, dlen, ulen, uoff;
+
+ uoff = i == start_blk ? bp2->bio_offset % sc->blksz : 0;
+ ulen = MIN(sc->blksz - uoff, bp2->bio_length - upos);
+ dlen = len = sc->offsets[i + 1] - sc->offsets[i];
+
+ DPRINTF(("%s: done: inflate block %d, start %lld, end %lld "
+ "len %lld\n",
+ gp->name, i, sc->offsets[i], sc->offsets[i + 1], len));
+
+ if (len == 0) {
+ /* All zero block: no cache update */
+ bzero(bp2->bio_data + upos, ulen);
+ upos += ulen;
+ bp2->bio_completed += ulen;
+ continue;
+ }
+
+ mtx_lock(&sc->last_mtx);
+
+#ifdef GEOM_UNCOMPRESS_DEBUG
+ if (g_debugflags & 32)
+ hexdump(bp->bio_data + pos, dlen, 0, 0);
+#endif
+
+ switch (sc->type) {
+ case GEOM_ULZMA:
+ sc->b->in = bp->bio_data + pos;
+ sc->b->out = sc->last_buf;
+ sc->b->in_pos = sc->b->out_pos = 0;
+ sc->b->in_size = dlen;
+ sc->b->out_size = (size_t)-1;
+
+ err = (xz_dec_run(sc->s, sc->b) != XZ_STREAM_END) ?
+ 1 : 0;
+ /* TODO decoder recovery, if needed */
+ break;
+ case GEOM_UZIP:
+ sc->zs->next_in = bp->bio_data + pos;
+ sc->zs->avail_in = dlen;
+ sc->zs->next_out = sc->last_buf;
+ sc->zs->avail_out = sc->blksz;
+
+ err = (inflate(sc->zs, Z_FINISH) != Z_STREAM_END) ?
+ 1 : 0;
+ if ((err) && (inflateReset(sc->zs) != Z_OK))
+ printf("%s: UZIP decoder reset failed\n",
+ gp->name);
+ break;
+ }
+
+ if (err) {
+ sc->last_blk = -1;
+ mtx_unlock(&sc->last_mtx);
+ DPRINTF(("%s: done: inflate failed, code=%d\n",
+ gp->name, err));
+ bp2->bio_error = EIO;
+ goto done;
+ }
+
+#ifdef GEOM_UNCOMPRESS_DEBUG
+ if (g_debugflags & 32)
+ hexdump(sc->last_buf, sc->b->out_size, 0, 0);
+#endif
+
+ sc->last_blk = i;
+ DPRINTF(("%s: done: inflated \n", gp->name));
+ memcpy(bp2->bio_data + upos, sc->last_buf + uoff, ulen);
+ mtx_unlock(&sc->last_mtx);
+
+ pos += len;
+ upos += ulen;
+ bp2->bio_completed += ulen;
+ }
+
+done:
+ /*
+ * Finish processing the request.
+ */
+ DPRINTF(("%s: done: (%d, %lld, %ld)\n",
+ gp->name, bp2->bio_error, bp2->bio_completed, bp2->bio_resid));
+ free(bp->bio_data, M_GEOM_UNCOMPRESS);
+ g_destroy_bio(bp);
+ g_io_deliver(bp2, bp2->bio_error);
+}
+
+static void
+g_uncompress_start(struct bio *bp)
+{
+ struct g_uncompress_softc *sc;
+ struct g_provider *pp, *pp2;
+ struct g_consumer *cp;
+ struct g_geom *gp;
+ struct bio *bp2;
+ uint32_t start_blk, end_blk;
+ size_t bsize;
+
+
+ pp = bp->bio_to;
+ gp = pp->geom;
+ DPRINTF(("%s: start (%s) to %s off=%lld len=%lld\n", gp->name,
+ (bp->bio_cmd==BIO_READ) ? "BIO_READ" : "BIO_WRITE*",
+ pp->name, bp->bio_offset, bp->bio_length));
+
+ if (bp->bio_cmd != BIO_READ) {
+ g_io_deliver(bp, EOPNOTSUPP);
+ return;
+ }
+
+ cp = LIST_FIRST(&gp->consumer);
+ pp2 = cp->provider;
+ sc = gp->softc;
+
+ start_blk = bp->bio_offset / sc->blksz;
+ end_blk = howmany(bp->bio_offset + bp->bio_length, sc->blksz);
+ KASSERT(start_blk < sc->nblocks,
+ ("start_blk out of range"));
+ KASSERT(end_blk <= sc->nblocks,
+ ("end_blk out of range"));
+
+ sc->req_total++;
+ if (start_blk + 1 == end_blk) {
+ mtx_lock(&sc->last_mtx);
+ if (start_blk == sc->last_blk) {
+ off_t uoff;
+
+ uoff = bp->bio_offset % sc->blksz;
+ KASSERT(bp->bio_length <= sc->blksz - uoff,
+ ("cached data error"));
+ memcpy(bp->bio_data, sc->last_buf + uoff,
+ bp->bio_length);
+ sc->req_cached++;
+ mtx_unlock(&sc->last_mtx);
+
+ DPRINTF(("%s: start: cached 0 + %lld, "
+ "%lld + 0 + %lld\n",
+ gp->name, bp->bio_length, uoff, bp->bio_length));
+ bp->bio_completed = bp->bio_length;
+ g_io_deliver(bp, 0);
+ return;
+ }
+ mtx_unlock(&sc->last_mtx);
+ }
+
+ bp2 = g_clone_bio(bp);
+ if (bp2 == NULL) {
+ g_io_deliver(bp, ENOMEM);
+ return;
+ }
+ DPRINTF(("%s: start (%d..%d), %s: %d + %llu, %s: %d + %llu\n",
+ gp->name, start_blk, end_blk,
+ pp->name, pp->sectorsize, pp->mediasize,
+ pp2->name, pp2->sectorsize, pp2->mediasize));
+
+ bsize = pp2->sectorsize;
+
+ bp2->bio_done = g_uncompress_done;
+ bp2->bio_offset = rounddown(sc->offsets[start_blk],bsize);
+ bp2->bio_length = roundup(sc->offsets[end_blk],bsize) -
+ bp2->bio_offset;
+ bp2->bio_data = malloc(bp2->bio_length, M_GEOM_UNCOMPRESS, M_NOWAIT);
+
+ DPRINTF(("%s: start %lld + %lld -> %lld + %lld -> %lld + %lld\n",
+ gp->name,
+ bp->bio_offset, bp->bio_length,
+ sc->offsets[start_blk],
+ sc->offsets[end_blk] - sc->offsets[start_blk],
+ bp2->bio_offset, bp2->bio_length));
+
+ if (bp2->bio_data == NULL) {
+ g_destroy_bio(bp2);
+ g_io_deliver(bp, ENOMEM);
+ return;
+ }
+
+ g_io_request(bp2, cp);
+ DPRINTF(("%s: start ok\n", gp->name));
+}
+
+static void
+g_uncompress_orphan(struct g_consumer *cp)
+{
+ struct g_geom *gp;
+
+ g_trace(G_T_TOPOLOGY, "%s(%p/%s)", __func__, cp,
+ cp->provider->name);
+ g_topology_assert();
+ KASSERT(cp->provider->error != 0,
+ ("g_uncompress_orphan with error == 0"));
+
+ gp = cp->geom;
+ g_uncompress_softc_free(gp->softc, gp);
+ gp->softc = NULL;
+ g_wither_geom(gp, cp->provider->error);
+}
+
+static int
+g_uncompress_access(struct g_provider *pp, int dr, int dw, int de)
+{
+ struct g_consumer *cp;
+ struct g_geom *gp;
+
+ gp = pp->geom;
+ cp = LIST_FIRST(&gp->consumer);
+ KASSERT (cp != NULL, ("g_uncompress_access but no consumer"));
+
+ if (cp->acw + dw > 0)
+ return (EROFS);
+
+ return (g_access(cp, dr, dw, de));
+}
+
+static void
+g_uncompress_spoiled(struct g_consumer *cp)
+{
+ struct g_geom *gp;
+
+ gp = cp->geom;
+ g_trace(G_T_TOPOLOGY, "%s(%p/%s)", __func__, cp, gp->name);
+ g_topology_assert();
+
+ g_uncompress_softc_free(gp->softc, gp);
+ gp->softc = NULL;
+ g_wither_geom(gp, ENXIO);
+}
+
+static struct g_geom *
+g_uncompress_taste(struct g_class *mp, struct g_provider *pp, int flags)
+{
+ struct cloop_header *header;
+ struct g_uncompress_softc *sc;
+ struct g_provider *pp2;
+ struct g_consumer *cp;
+ struct g_geom *gp;
+ uint32_t i, total_offsets, offsets_read, type;
+ uint8_t *buf;
+ int error;
+
+ g_trace(G_T_TOPOLOGY, "%s(%s,%s)", __func__, mp->name, pp->name);
+ g_topology_assert();
+
+ /* Skip providers that are already open for writing. */
+ if (pp->acw > 0)
+ return (NULL);
+
+ buf = NULL;
+
+ /*
+ * Create geom instance.
+ */
+ gp = g_new_geomf(mp, "%s.uncompress", pp->name);
+ cp = g_new_consumer(gp);
+ error = g_attach(cp, pp);
+ if (error == 0)
+ error = g_access(cp, 1, 0, 0);
+ if (error) {
+ g_detach(cp);
+ g_destroy_consumer(cp);
+ g_destroy_geom(gp);
+ return (NULL);
+ }
+ g_topology_unlock();
+
+ /*
+ * Read cloop header, look for CLOOP magic, perform
+ * other validity checks.
+ */
+ DPRINTF(("%s: media sectorsize %u, mediasize %lld\n",
+ gp->name, pp->sectorsize, pp->mediasize));
+
+ i = roundup(sizeof(struct cloop_header), pp->sectorsize);
+ buf = g_read_data(cp, 0, i, NULL);
+ if (buf == NULL)
+ goto err;
+
+ header = (struct cloop_header *) buf;
+ if (strncmp(header->magic, CLOOP_MAGIC_START,
+ sizeof(CLOOP_MAGIC_START) - 1) != 0) {
+ DPRINTF(("%s: no CLOOP magic\n", gp->name));
+ goto err;
+ }
+
+ switch (header->magic[0x0b]) {
+ case 'L':
+ type = GEOM_ULZMA;
+ if (header->magic[0x0c] < GEOM_ULZMA_MAJVER) {
+ DPRINTF(("%s: image version too old\n", gp->name));
+ goto err;
+ }
+ printf("%s: GEOM_ULZMA image found\n", gp->name);
+ break;
+ case 'V':
+ type = GEOM_UZIP;
+ if (header->magic[0x0c] < GEOM_UZIP_MAJVER) {
+ DPRINTF(("%s: image version too old\n", gp->name));
+ goto err;
+ }
+ printf("%s: GEOM_UZIP image found\n", gp->name);
+ break;
+ default:
+ DPRINTF(("%s: unsupported image type\n", gp->name));
+ goto err;
+ }
+
+ DPRINTF(("%s: found CLOOP magic\n", gp->name));
+ /*
+ * Initialize softc and read offsets.
+ */
+ sc = malloc(sizeof(*sc), M_GEOM_UNCOMPRESS, M_WAITOK | M_ZERO);
+ gp->softc = sc;
+ sc->type = type;
+ sc->blksz = ntohl(header->blksz);
+ sc->nblocks = ntohl(header->nblocks);
+ if (sc->blksz % 4 != 0) {
+ printf("%s: block size (%u) should be multiple of 4.\n",
+ gp->name, sc->blksz);
+ goto err;
+ }
+ if (sc->blksz > MAX_BLKSZ) {
+ printf("%s: block size (%u) should not be larger than %d.\n",
+ gp->name, sc->blksz, MAX_BLKSZ);
+ }
+ total_offsets = sc->nblocks + 1;
+ if (sizeof(struct cloop_header) +
+ total_offsets * sizeof(uint64_t) > pp->mediasize) {
+ printf("%s: media too small for %u blocks\n",
+ gp->name, sc->nblocks);
+ goto err;
+ }
+ sc->offsets = malloc(
+ total_offsets * sizeof(uint64_t), M_GEOM_UNCOMPRESS, M_WAITOK);
+ offsets_read = MIN(total_offsets,
+ (pp->sectorsize - sizeof(*header)) / sizeof(uint64_t));
+ for (i = 0; i < offsets_read; i++)
+ sc->offsets[i] = be64toh(((uint64_t *) (header + 1))[i]);
+ DPRINTF(("%s: %u offsets in the first sector\n",
+ gp->name, offsets_read));
+
+ free(buf, M_GEOM);
+ i = roundup((sizeof(struct cloop_header) +
+ total_offsets * sizeof(uint64_t)),pp->sectorsize);
+ buf = g_read_data(cp, 0, i, NULL);
+ if (buf == NULL)
+ goto err;
+ for (i = 0; i <= total_offsets; i++) {
+ sc->offsets[i] = be64toh(((uint64_t *)
+ (buf+sizeof(struct cloop_header)))[i]);
+ }
+ DPRINTF(("%s: done reading offsets\n", gp->name));
+ mtx_init(&sc->last_mtx, "geom_uncompress cache", NULL, MTX_DEF);
+ sc->last_blk = -1;
+ sc->last_buf = malloc(sc->blksz, M_GEOM_UNCOMPRESS, M_WAITOK);
+ sc->req_total = 0;
+ sc->req_cached = 0;
+
+ switch (sc->type) {
+ case GEOM_ULZMA:
+ xz_crc32_init();
+ sc->s = xz_dec_init(XZ_SINGLE, 0);
+ sc->b = (struct xz_buf*)malloc(sizeof(struct xz_buf),
+ M_GEOM_UNCOMPRESS, M_WAITOK);
+ break;
+ case GEOM_UZIP:
+ sc->zs = (z_stream *)malloc(sizeof(z_stream),
+ M_GEOM_UNCOMPRESS, M_WAITOK);
+ sc->zs->zalloc = z_alloc;
+ sc->zs->zfree = z_free;
+ if (inflateInit(sc->zs) != Z_OK) {
+ goto err;
+ }
+ break;
+ }
+
+ g_topology_lock();
+ pp2 = g_new_providerf(gp, "%s", gp->name);
+ pp2->sectorsize = 512;
+ pp2->mediasize = (off_t)sc->nblocks * sc->blksz;
+ pp2->flags = pp->flags & G_PF_CANDELETE;
+ if (pp->stripesize > 0) {
+ pp2->stripesize = pp->stripesize;
+ pp2->stripeoffset = pp->stripeoffset;
+ }
+ g_error_provider(pp2, 0);
+ free(buf, M_GEOM);
+ g_access(cp, -1, 0, 0);
+
+ DPRINTF(("%s: taste ok (%d, %lld), (%d, %d), %x\n",
+ gp->name,
+ pp2->sectorsize, pp2->mediasize,
+ pp2->stripeoffset, pp2->stripesize, pp2->flags));
+ printf("%s: %u x %u blocks\n",
+ gp->name, sc->nblocks, sc->blksz);
+ return (gp);
+
+err:
+ g_topology_lock();
+ g_access(cp, -1, 0, 0);
+ if (buf != NULL)
+ free(buf, M_GEOM);
+ if (gp->softc != NULL) {
+ g_uncompress_softc_free(gp->softc, NULL);
+ gp->softc = NULL;
+ }
+ g_detach(cp);
+ g_destroy_consumer(cp);
+ g_destroy_geom(gp);
+ return (NULL);
+}
+
+static int
+g_uncompress_destroy_geom(struct gctl_req *req, struct g_class *mp,
+ struct g_geom *gp)
+{
+ struct g_provider *pp;
+
+ g_trace(G_T_TOPOLOGY, "%s(%s, %s)", __func__, mp->name, gp->name);
+ g_topology_assert();
+
+ if (gp->softc == NULL) {
+ printf("%s(%s): gp->softc == NULL\n", __func__, gp->name);
+ return (ENXIO);
+ }
+
+ KASSERT(gp != NULL, ("NULL geom"));
+ pp = LIST_FIRST(&gp->provider);
+ KASSERT(pp != NULL, ("NULL provider"));
+ if (pp->acr > 0 || pp->acw > 0 || pp->ace > 0)
+ return (EBUSY);
+
+ g_uncompress_softc_free(gp->softc, gp);
+ gp->softc = NULL;
+ g_wither_geom(gp, ENXIO);
+ return (0);
+}
+
+static struct g_class g_uncompress_class = {
+ .name = UNCOMPRESS_CLASS_NAME,
+ .version = G_VERSION,
+ .taste = g_uncompress_taste,
+ .destroy_geom = g_uncompress_destroy_geom,
+
+ .start = g_uncompress_start,
+ .orphan = g_uncompress_orphan,
+ .access = g_uncompress_access,
+ .spoiled = g_uncompress_spoiled,
+};
+
+DECLARE_GEOM_CLASS(g_uncompress_class, g_uncompress);
+
diff --git a/sys/gnu/dev/sound/pci/emu10k1-alsa.h b/sys/gnu/dev/sound/pci/emu10k1-alsa.h
deleted file mode 100644
index 406aa26..0000000
--- a/sys/gnu/dev/sound/pci/emu10k1-alsa.h
+++ /dev/null
@@ -1,1601 +0,0 @@
-#ifndef __SOUND_EMU10K1_H
-#define __SOUND_EMU10K1_H
-
-/*-
- * Copyright (c) by Jaroslav Kysela <perex@suse.cz>,
- * Creative Labs, Inc.
- * Definitions for EMU10K1 (SB Live!) chips
- *
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-
-/* $FreeBSD$ */
-
-#ifdef __KERNEL__
-
-#include <sound/pcm.h>
-#include <sound/rawmidi.h>
-#include <sound/hwdep.h>
-#include <sound/ac97_codec.h>
-#include <sound/util_mem.h>
-#include <sound/pcm-indirect.h>
-#include <sound/timer.h>
-#include <linux/interrupt.h>
-#include <linux/mutex.h>
-#include <asm/io.h>
-
-/* ------------------- DEFINES -------------------- */
-
-#define EMUPAGESIZE 4096
-#define MAXREQVOICES 8
-#define MAXPAGES 8192
-#define RESERVED 0
-#define NUM_MIDI 16
-#define NUM_G 64 /* use all channels */
-#define NUM_FXSENDS 4
-#define NUM_EFX_PLAYBACK 16
-
-/* FIXME? - according to the OSS driver the EMU10K1 needs a 29 bit DMA mask */
-#define EMU10K1_DMA_MASK 0x7fffffffUL /* 31bit */
-#define AUDIGY_DMA_MASK 0x7fffffffUL /* 31bit FIXME - 32 should work? */
- /* See ALSA bug #1276 - rlrevell */
-
-#define TMEMSIZE 256*1024
-#define TMEMSIZEREG 4
-
-#define IP_TO_CP(ip) ((ip == 0) ? 0 : (((0x00001000uL | (ip & 0x00000FFFL)) << (((ip >> 12) & 0x000FL) + 4)) & 0xFFFF0000uL))
-
-// Audigy specify registers are prefixed with 'A_'
-
-/************************************************************************************************/
-/* PCI function 0 registers, address = <val> + PCIBASE0 */
-/************************************************************************************************/
-
-#define PTR 0x00 /* Indexed register set pointer register */
- /* NOTE: The CHANNELNUM and ADDRESS words can */
- /* be modified independently of each other. */
-#define PTR_CHANNELNUM_MASK 0x0000003f /* For each per-channel register, indicates the */
- /* channel number of the register to be */
- /* accessed. For non per-channel registers the */
- /* value should be set to zero. */
-#define PTR_ADDRESS_MASK 0x07ff0000 /* Register index */
-#define A_PTR_ADDRESS_MASK 0x0fff0000
-
-#define DATA 0x04 /* Indexed register set data register */
-
-#define IPR 0x08 /* Global interrupt pending register */
- /* Clear pending interrupts by writing a 1 to */
- /* the relevant bits and zero to the other bits */
-#define IPR_P16V 0x80000000 /* Bit set when the CA0151 P16V chip wishes
- to interrupt */
-#define IPR_GPIOMSG 0x20000000 /* GPIO message interrupt (RE'd, still not sure
- which INTE bits enable it) */
-
-/* The next two interrupts are for the midi port on the Audigy Drive (A_MPU1) */
-#define IPR_A_MIDITRANSBUFEMPTY2 0x10000000 /* MIDI UART transmit buffer empty */
-#define IPR_A_MIDIRECVBUFEMPTY2 0x08000000 /* MIDI UART receive buffer empty */
-
-#define IPR_SPDIFBUFFULL 0x04000000 /* SPDIF capture related, 10k2 only? (RE) */
-#define IPR_SPDIFBUFHALFFULL 0x02000000 /* SPDIF capture related? (RE) */
-
-#define IPR_SAMPLERATETRACKER 0x01000000 /* Sample rate tracker lock status change */
-#define IPR_FXDSP 0x00800000 /* Enable FX DSP interrupts */
-#define IPR_FORCEINT 0x00400000 /* Force Sound Blaster interrupt */
-#define IPR_PCIERROR 0x00200000 /* PCI bus error */
-#define IPR_VOLINCR 0x00100000 /* Volume increment button pressed */
-#define IPR_VOLDECR 0x00080000 /* Volume decrement button pressed */
-#define IPR_MUTE 0x00040000 /* Mute button pressed */
-#define IPR_MICBUFFULL 0x00020000 /* Microphone buffer full */
-#define IPR_MICBUFHALFFULL 0x00010000 /* Microphone buffer half full */
-#define IPR_ADCBUFFULL 0x00008000 /* ADC buffer full */
-#define IPR_ADCBUFHALFFULL 0x00004000 /* ADC buffer half full */
-#define IPR_EFXBUFFULL 0x00002000 /* Effects buffer full */
-#define IPR_EFXBUFHALFFULL 0x00001000 /* Effects buffer half full */
-#define IPR_GPSPDIFSTATUSCHANGE 0x00000800 /* GPSPDIF channel status change */
-#define IPR_CDROMSTATUSCHANGE 0x00000400 /* CD-ROM channel status change */
-#define IPR_INTERVALTIMER 0x00000200 /* Interval timer terminal count */
-#define IPR_MIDITRANSBUFEMPTY 0x00000100 /* MIDI UART transmit buffer empty */
-#define IPR_MIDIRECVBUFEMPTY 0x00000080 /* MIDI UART receive buffer empty */
-#define IPR_CHANNELLOOP 0x00000040 /* Channel (half) loop interrupt(s) pending */
-#define IPR_CHANNELNUMBERMASK 0x0000003f /* When IPR_CHANNELLOOP is set, indicates the */
- /* highest set channel in CLIPL, CLIPH, HLIPL, */
- /* or HLIPH. When IP is written with CL set, */
- /* the bit in H/CLIPL or H/CLIPH corresponding */
- /* to the CIN value written will be cleared. */
-
-#define INTE 0x0c /* Interrupt enable register */
-#define INTE_VIRTUALSB_MASK 0xc0000000 /* Virtual Soundblaster I/O port capture */
-#define INTE_VIRTUALSB_220 0x00000000 /* Capture at I/O base address 0x220-0x22f */
-#define INTE_VIRTUALSB_240 0x40000000 /* Capture at I/O base address 0x240 */
-#define INTE_VIRTUALSB_260 0x80000000 /* Capture at I/O base address 0x260 */
-#define INTE_VIRTUALSB_280 0xc0000000 /* Capture at I/O base address 0x280 */
-#define INTE_VIRTUALMPU_MASK 0x30000000 /* Virtual MPU I/O port capture */
-#define INTE_VIRTUALMPU_300 0x00000000 /* Capture at I/O base address 0x300-0x301 */
-#define INTE_VIRTUALMPU_310 0x10000000 /* Capture at I/O base address 0x310 */
-#define INTE_VIRTUALMPU_320 0x20000000 /* Capture at I/O base address 0x320 */
-#define INTE_VIRTUALMPU_330 0x30000000 /* Capture at I/O base address 0x330 */
-#define INTE_MASTERDMAENABLE 0x08000000 /* Master DMA emulation at 0x000-0x00f */
-#define INTE_SLAVEDMAENABLE 0x04000000 /* Slave DMA emulation at 0x0c0-0x0df */
-#define INTE_MASTERPICENABLE 0x02000000 /* Master PIC emulation at 0x020-0x021 */
-#define INTE_SLAVEPICENABLE 0x01000000 /* Slave PIC emulation at 0x0a0-0x0a1 */
-#define INTE_VSBENABLE 0x00800000 /* Enable virtual Soundblaster */
-#define INTE_ADLIBENABLE 0x00400000 /* Enable AdLib emulation at 0x388-0x38b */
-#define INTE_MPUENABLE 0x00200000 /* Enable virtual MPU */
-#define INTE_FORCEINT 0x00100000 /* Continuously assert INTAN */
-
-#define INTE_MRHANDENABLE 0x00080000 /* Enable the "Mr. Hand" logic */
- /* NOTE: There is no reason to use this under */
- /* Linux, and it will cause odd hardware */
- /* behavior and possibly random segfaults and */
- /* lockups if enabled. */
-
-/* The next two interrupts are for the midi port on the Audigy Drive (A_MPU1) */
-#define INTE_A_MIDITXENABLE2 0x00020000 /* Enable MIDI transmit-buffer-empty interrupts */
-#define INTE_A_MIDIRXENABLE2 0x00010000 /* Enable MIDI receive-buffer-empty interrupts */
-
-
-#define INTE_SAMPLERATETRACKER 0x00002000 /* Enable sample rate tracker interrupts */
- /* NOTE: This bit must always be enabled */
-#define INTE_FXDSPENABLE 0x00001000 /* Enable FX DSP interrupts */
-#define INTE_PCIERRORENABLE 0x00000800 /* Enable PCI bus error interrupts */
-#define INTE_VOLINCRENABLE 0x00000400 /* Enable volume increment button interrupts */
-#define INTE_VOLDECRENABLE 0x00000200 /* Enable volume decrement button interrupts */
-#define INTE_MUTEENABLE 0x00000100 /* Enable mute button interrupts */
-#define INTE_MICBUFENABLE 0x00000080 /* Enable microphone buffer interrupts */
-#define INTE_ADCBUFENABLE 0x00000040 /* Enable ADC buffer interrupts */
-#define INTE_EFXBUFENABLE 0x00000020 /* Enable Effects buffer interrupts */
-#define INTE_GPSPDIFENABLE 0x00000010 /* Enable GPSPDIF status interrupts */
-#define INTE_CDSPDIFENABLE 0x00000008 /* Enable CDSPDIF status interrupts */
-#define INTE_INTERVALTIMERENB 0x00000004 /* Enable interval timer interrupts */
-#define INTE_MIDITXENABLE 0x00000002 /* Enable MIDI transmit-buffer-empty interrupts */
-#define INTE_MIDIRXENABLE 0x00000001 /* Enable MIDI receive-buffer-empty interrupts */
-
-#define WC 0x10 /* Wall Clock register */
-#define WC_SAMPLECOUNTER_MASK 0x03FFFFC0 /* Sample periods elapsed since reset */
-#define WC_SAMPLECOUNTER 0x14060010
-#define WC_CURRENTCHANNEL 0x0000003F /* Channel [0..63] currently being serviced */
- /* NOTE: Each channel takes 1/64th of a sample */
- /* period to be serviced. */
-
-#define HCFG 0x14 /* Hardware config register */
- /* NOTE: There is no reason to use the legacy */
- /* SoundBlaster emulation stuff described below */
- /* under Linux, and all kinds of weird hardware */
- /* behavior can result if you try. Don't. */
-#define HCFG_LEGACYFUNC_MASK 0xe0000000 /* Legacy function number */
-#define HCFG_LEGACYFUNC_MPU 0x00000000 /* Legacy MPU */
-#define HCFG_LEGACYFUNC_SB 0x40000000 /* Legacy SB */
-#define HCFG_LEGACYFUNC_AD 0x60000000 /* Legacy AD */
-#define HCFG_LEGACYFUNC_MPIC 0x80000000 /* Legacy MPIC */
-#define HCFG_LEGACYFUNC_MDMA 0xa0000000 /* Legacy MDMA */
-#define HCFG_LEGACYFUNC_SPCI 0xc0000000 /* Legacy SPCI */
-#define HCFG_LEGACYFUNC_SDMA 0xe0000000 /* Legacy SDMA */
-#define HCFG_IOCAPTUREADDR 0x1f000000 /* The 4 LSBs of the captured I/O address. */
-#define HCFG_LEGACYWRITE 0x00800000 /* 1 = write, 0 = read */
-#define HCFG_LEGACYWORD 0x00400000 /* 1 = word, 0 = byte */
-#define HCFG_LEGACYINT 0x00200000 /* 1 = legacy event captured. Write 1 to clear. */
- /* NOTE: The rest of the bits in this register */
- /* _are_ relevant under Linux. */
-#define HCFG_CODECFORMAT_MASK 0x00070000 /* CODEC format */
-#define HCFG_CODECFORMAT_AC97 0x00000000 /* AC97 CODEC format -- Primary Output */
-#define HCFG_CODECFORMAT_I2S 0x00010000 /* I2S CODEC format -- Secondary (Rear) Output */
-#define HCFG_GPINPUT0 0x00004000 /* External pin112 */
-#define HCFG_GPINPUT1 0x00002000 /* External pin110 */
-#define HCFG_GPOUTPUT_MASK 0x00001c00 /* External pins which may be controlled */
-#define HCFG_GPOUT0 0x00001000 /* External pin? (spdif enable on 5.1) */
-#define HCFG_GPOUT1 0x00000800 /* External pin? (IR) */
-#define HCFG_GPOUT2 0x00000400 /* External pin? (IR) */
-#define HCFG_JOYENABLE 0x00000200 /* Internal joystick enable */
-#define HCFG_PHASETRACKENABLE 0x00000100 /* Phase tracking enable */
- /* 1 = Force all 3 async digital inputs to use */
- /* the same async sample rate tracker (ZVIDEO) */
-#define HCFG_AC3ENABLE_MASK 0x000000e0 /* AC3 async input control - Not implemented */
-#define HCFG_AC3ENABLE_ZVIDEO 0x00000080 /* Channels 0 and 1 replace ZVIDEO */
-#define HCFG_AC3ENABLE_CDSPDIF 0x00000040 /* Channels 0 and 1 replace CDSPDIF */
-#define HCFG_AC3ENABLE_GPSPDIF 0x00000020 /* Channels 0 and 1 replace GPSPDIF */
-#define HCFG_AUTOMUTE 0x00000010 /* When set, the async sample rate convertors */
- /* will automatically mute their output when */
- /* they are not rate-locked to the external */
- /* async audio source */
-#define HCFG_LOCKSOUNDCACHE 0x00000008 /* 1 = Cancel bustmaster accesses to soundcache */
- /* NOTE: This should generally never be used. */
-#define HCFG_LOCKTANKCACHE_MASK 0x00000004 /* 1 = Cancel bustmaster accesses to tankcache */
- /* NOTE: This should generally never be used. */
-#define HCFG_LOCKTANKCACHE 0x01020014
-#define HCFG_MUTEBUTTONENABLE 0x00000002 /* 1 = Master mute button sets AUDIOENABLE = 0. */
- /* NOTE: This is a 'cheap' way to implement a */
- /* master mute function on the mute button, and */
- /* in general should not be used unless a more */
- /* sophisticated master mute function has not */
- /* been written. */
-#define HCFG_AUDIOENABLE 0x00000001 /* 0 = CODECs transmit zero-valued samples */
- /* Should be set to 1 when the EMU10K1 is */
- /* completely initialized. */
-
-//For Audigy, MPU port move to 0x70-0x74 ptr register
-
-#define MUDATA 0x18 /* MPU401 data register (8 bits) */
-
-#define MUCMD 0x19 /* MPU401 command register (8 bits) */
-#define MUCMD_RESET 0xff /* RESET command */
-#define MUCMD_ENTERUARTMODE 0x3f /* Enter_UART_mode command */
- /* NOTE: All other commands are ignored */
-
-#define MUSTAT MUCMD /* MPU401 status register (8 bits) */
-#define MUSTAT_IRDYN 0x80 /* 0 = MIDI data or command ACK */
-#define MUSTAT_ORDYN 0x40 /* 0 = MUDATA can accept a command or data */
-
-#define A_IOCFG 0x18 /* GPIO on Audigy card (16bits) */
-#define A_GPINPUT_MASK 0xff00
-#define A_GPOUTPUT_MASK 0x00ff
-
-// Audigy output/GPIO stuff taken from the kX drivers
-#define A_IOCFG_GPOUT0 0x0044 /* analog/digital */
-#define A_IOCFG_DISABLE_ANALOG 0x0040 /* = 'enable' for Audigy2 (chiprev=4) */
-#define A_IOCFG_ENABLE_DIGITAL 0x0004
-#define A_IOCFG_ENABLE_DIGITAL_AUDIGY4 0x0080
-#define A_IOCFG_UNKNOWN_20 0x0020
-#define A_IOCFG_DISABLE_AC97_FRONT 0x0080 /* turn off ac97 front -> front (10k2.1) */
-#define A_IOCFG_GPOUT1 0x0002 /* IR? drive's internal bypass (?) */
-#define A_IOCFG_GPOUT2 0x0001 /* IR */
-#define A_IOCFG_MULTIPURPOSE_JACK 0x2000 /* center+lfe+rear_center (a2/a2ex) */
- /* + digital for generic 10k2 */
-#define A_IOCFG_DIGITAL_JACK 0x1000 /* digital for a2 platinum */
-#define A_IOCFG_FRONT_JACK 0x4000
-#define A_IOCFG_REAR_JACK 0x8000
-#define A_IOCFG_PHONES_JACK 0x0100 /* LiveDrive */
-
-/* outputs:
- * for audigy2 platinum: 0xa00
- * for a2 platinum ex: 0x1c00
- * for a1 platinum: 0x0
- */
-
-#define TIMER 0x1a /* Timer terminal count register */
- /* NOTE: After the rate is changed, a maximum */
- /* of 1024 sample periods should be allowed */
- /* before the new rate is guaranteed accurate. */
-#define TIMER_RATE_MASK 0x000003ff /* Timer interrupt rate in sample periods */
- /* 0 == 1024 periods, [1..4] are not useful */
-#define TIMER_RATE 0x0a00001a
-
-#define AC97DATA 0x1c /* AC97 register set data register (16 bit) */
-
-#define AC97ADDRESS 0x1e /* AC97 register set address register (8 bit) */
-#define AC97ADDRESS_READY 0x80 /* Read-only bit, reflects CODEC READY signal */
-#define AC97ADDRESS_ADDRESS 0x7f /* Address of indexed AC97 register */
-
-/* Available on the Audigy 2 and Audigy 4 only. This is the P16V chip. */
-#define PTR2 0x20 /* Indexed register set pointer register */
-#define DATA2 0x24 /* Indexed register set data register */
-#define IPR2 0x28 /* P16V interrupt pending register */
-#define IPR2_PLAYBACK_CH_0_LOOP 0x00001000 /* Playback Channel 0 loop */
-#define IPR2_PLAYBACK_CH_0_HALF_LOOP 0x00000100 /* Playback Channel 0 half loop */
-#define IPR2_CAPTURE_CH_0_LOOP 0x00100000 /* Capture Channel 0 loop */
-#define IPR2_CAPTURE_CH_0_HALF_LOOP 0x00010000 /* Capture Channel 0 half loop */
- /* 0x00000100 Playback. Only in once per period.
- * 0x00110000 Capture. Int on half buffer.
- */
-#define INTE2 0x2c /* P16V Interrupt enable register. */
-#define INTE2_PLAYBACK_CH_0_LOOP 0x00001000 /* Playback Channel 0 loop */
-#define INTE2_PLAYBACK_CH_0_HALF_LOOP 0x00000100 /* Playback Channel 0 half loop */
-#define INTE2_PLAYBACK_CH_1_LOOP 0x00002000 /* Playback Channel 1 loop */
-#define INTE2_PLAYBACK_CH_1_HALF_LOOP 0x00000200 /* Playback Channel 1 half loop */
-#define INTE2_PLAYBACK_CH_2_LOOP 0x00004000 /* Playback Channel 2 loop */
-#define INTE2_PLAYBACK_CH_2_HALF_LOOP 0x00000400 /* Playback Channel 2 half loop */
-#define INTE2_PLAYBACK_CH_3_LOOP 0x00008000 /* Playback Channel 3 loop */
-#define INTE2_PLAYBACK_CH_3_HALF_LOOP 0x00000800 /* Playback Channel 3 half loop */
-#define INTE2_CAPTURE_CH_0_LOOP 0x00100000 /* Capture Channel 0 loop */
-#define INTE2_CAPTURE_CH_0_HALF_LOOP 0x00010000 /* Caputre Channel 0 half loop */
-#define HCFG2 0x34 /* Defaults: 0, win2000 sets it to 00004201 */
- /* 0x00000000 2-channel output. */
- /* 0x00000200 8-channel output. */
- /* 0x00000004 pauses stream/irq fail. */
- /* Rest of bits no nothing to sound output */
- /* bit 0: Enable P16V audio.
- * bit 1: Lock P16V record memory cache.
- * bit 2: Lock P16V playback memory cache.
- * bit 3: Dummy record insert zero samples.
- * bit 8: Record 8-channel in phase.
- * bit 9: Playback 8-channel in phase.
- * bit 11-12: Playback mixer attenuation: 0=0dB, 1=-6dB, 2=-12dB, 3=Mute.
- * bit 13: Playback mixer enable.
- * bit 14: Route SRC48 mixer output to fx engine.
- * bit 15: Enable IEEE 1394 chip.
- */
-#define IPR3 0x38 /* Cdif interrupt pending register */
-#define INTE3 0x3c /* Cdif interrupt enable register. */
-/************************************************************************************************/
-/* PCI function 1 registers, address = <val> + PCIBASE1 */
-/************************************************************************************************/
-
-#define JOYSTICK1 0x00 /* Analog joystick port register */
-#define JOYSTICK2 0x01 /* Analog joystick port register */
-#define JOYSTICK3 0x02 /* Analog joystick port register */
-#define JOYSTICK4 0x03 /* Analog joystick port register */
-#define JOYSTICK5 0x04 /* Analog joystick port register */
-#define JOYSTICK6 0x05 /* Analog joystick port register */
-#define JOYSTICK7 0x06 /* Analog joystick port register */
-#define JOYSTICK8 0x07 /* Analog joystick port register */
-
-/* When writing, any write causes JOYSTICK_COMPARATOR output enable to be pulsed on write. */
-/* When reading, use these bitfields: */
-#define JOYSTICK_BUTTONS 0x0f /* Joystick button data */
-#define JOYSTICK_COMPARATOR 0xf0 /* Joystick comparator data */
-
-
-/********************************************************************************************************/
-/* Emu10k1 pointer-offset register set, accessed through the PTR and DATA registers */
-/********************************************************************************************************/
-
-#define CPF 0x00 /* Current pitch and fraction register */
-#define CPF_CURRENTPITCH_MASK 0xffff0000 /* Current pitch (linear, 0x4000 == unity pitch shift) */
-#define CPF_CURRENTPITCH 0x10100000
-#define CPF_STEREO_MASK 0x00008000 /* 1 = Even channel interleave, odd channel locked */
-#define CPF_STOP_MASK 0x00004000 /* 1 = Current pitch forced to 0 */
-#define CPF_FRACADDRESS_MASK 0x00003fff /* Linear fractional address of the current channel */
-
-#define PTRX 0x01 /* Pitch target and send A/B amounts register */
-#define PTRX_PITCHTARGET_MASK 0xffff0000 /* Pitch target of specified channel */
-#define PTRX_PITCHTARGET 0x10100001
-#define PTRX_FXSENDAMOUNT_A_MASK 0x0000ff00 /* Linear level of channel output sent to FX send bus A */
-#define PTRX_FXSENDAMOUNT_A 0x08080001
-#define PTRX_FXSENDAMOUNT_B_MASK 0x000000ff /* Linear level of channel output sent to FX send bus B */
-#define PTRX_FXSENDAMOUNT_B 0x08000001
-
-#define CVCF 0x02 /* Current volume and filter cutoff register */
-#define CVCF_CURRENTVOL_MASK 0xffff0000 /* Current linear volume of specified channel */
-#define CVCF_CURRENTVOL 0x10100002
-#define CVCF_CURRENTFILTER_MASK 0x0000ffff /* Current filter cutoff frequency of specified channel */
-#define CVCF_CURRENTFILTER 0x10000002
-
-#define VTFT 0x03 /* Volume target and filter cutoff target register */
-#define VTFT_VOLUMETARGET_MASK 0xffff0000 /* Volume target of specified channel */
-#define VTFT_VOLUMETARGET 0x10100003
-#define VTFT_FILTERTARGET_MASK 0x0000ffff /* Filter cutoff target of specified channel */
-#define VTFT_FILTERTARGET 0x10000003
-
-#define Z1 0x05 /* Filter delay memory 1 register */
-
-#define Z2 0x04 /* Filter delay memory 2 register */
-
-#define PSST 0x06 /* Send C amount and loop start address register */
-#define PSST_FXSENDAMOUNT_C_MASK 0xff000000 /* Linear level of channel output sent to FX send bus C */
-
-#define PSST_FXSENDAMOUNT_C 0x08180006
-
-#define PSST_LOOPSTARTADDR_MASK 0x00ffffff /* Loop start address of the specified channel */
-#define PSST_LOOPSTARTADDR 0x18000006
-
-#define DSL 0x07 /* Send D amount and loop start address register */
-#define DSL_FXSENDAMOUNT_D_MASK 0xff000000 /* Linear level of channel output sent to FX send bus D */
-
-#define DSL_FXSENDAMOUNT_D 0x08180007
-
-#define DSL_LOOPENDADDR_MASK 0x00ffffff /* Loop end address of the specified channel */
-#define DSL_LOOPENDADDR 0x18000007
-
-#define CCCA 0x08 /* Filter Q, interp. ROM, byte size, cur. addr register */
-#define CCCA_RESONANCE 0xf0000000 /* Lowpass filter resonance (Q) height */
-#define CCCA_INTERPROMMASK 0x0e000000 /* Selects passband of interpolation ROM */
- /* 1 == full band, 7 == lowpass */
- /* ROM 0 is used when pitch shifting downward or less */
- /* then 3 semitones upward. Increasingly higher ROM */
- /* numbers are used, typically in steps of 3 semitones, */
- /* as upward pitch shifting is performed. */
-#define CCCA_INTERPROM_0 0x00000000 /* Select interpolation ROM 0 */
-#define CCCA_INTERPROM_1 0x02000000 /* Select interpolation ROM 1 */
-#define CCCA_INTERPROM_2 0x04000000 /* Select interpolation ROM 2 */
-#define CCCA_INTERPROM_3 0x06000000 /* Select interpolation ROM 3 */
-#define CCCA_INTERPROM_4 0x08000000 /* Select interpolation ROM 4 */
-#define CCCA_INTERPROM_5 0x0a000000 /* Select interpolation ROM 5 */
-#define CCCA_INTERPROM_6 0x0c000000 /* Select interpolation ROM 6 */
-#define CCCA_INTERPROM_7 0x0e000000 /* Select interpolation ROM 7 */
-#define CCCA_8BITSELECT 0x01000000 /* 1 = Sound memory for this channel uses 8-bit samples */
-#define CCCA_CURRADDR_MASK 0x00ffffff /* Current address of the selected channel */
-#define CCCA_CURRADDR 0x18000008
-
-#define CCR 0x09 /* Cache control register */
-#define CCR_CACHEINVALIDSIZE 0x07190009
-#define CCR_CACHEINVALIDSIZE_MASK 0xfe000000 /* Number of invalid samples cache for this channel */
-#define CCR_CACHELOOPFLAG 0x01000000 /* 1 = Cache has a loop service pending */
-#define CCR_INTERLEAVEDSAMPLES 0x00800000 /* 1 = A cache service will fetch interleaved samples */
-#define CCR_WORDSIZEDSAMPLES 0x00400000 /* 1 = A cache service will fetch word sized samples */
-#define CCR_READADDRESS 0x06100009
-#define CCR_READADDRESS_MASK 0x003f0000 /* Location of cache just beyond current cache service */
-#define CCR_LOOPINVALSIZE 0x0000fe00 /* Number of invalid samples in cache prior to loop */
- /* NOTE: This is valid only if CACHELOOPFLAG is set */
-#define CCR_LOOPFLAG 0x00000100 /* Set for a single sample period when a loop occurs */
-#define CCR_CACHELOOPADDRHI 0x000000ff /* DSL_LOOPSTARTADDR's hi byte if CACHELOOPFLAG is set */
-
-#define CLP 0x0a /* Cache loop register (valid if CCR_CACHELOOPFLAG = 1) */
- /* NOTE: This register is normally not used */
-#define CLP_CACHELOOPADDR 0x0000ffff /* Cache loop address (DSL_LOOPSTARTADDR [0..15]) */
-
-#define FXRT 0x0b /* Effects send routing register */
- /* NOTE: It is illegal to assign the same routing to */
- /* two effects sends. */
-#define FXRT_CHANNELA 0x000f0000 /* Effects send bus number for channel's effects send A */
-#define FXRT_CHANNELB 0x00f00000 /* Effects send bus number for channel's effects send B */
-#define FXRT_CHANNELC 0x0f000000 /* Effects send bus number for channel's effects send C */
-#define FXRT_CHANNELD 0xf0000000 /* Effects send bus number for channel's effects send D */
-
-#define MAPA 0x0c /* Cache map A */
-
-#define MAPB 0x0d /* Cache map B */
-
-#define MAP_PTE_MASK 0xffffe000 /* The 19 MSBs of the PTE indexed by the PTI */
-#define MAP_PTI_MASK 0x00001fff /* The 13 bit index to one of the 8192 PTE dwords */
-
-#define ENVVOL 0x10 /* Volume envelope register */
-#define ENVVOL_MASK 0x0000ffff /* Current value of volume envelope state variable */
- /* 0x8000-n == 666*n usec delay */
-
-#define ATKHLDV 0x11 /* Volume envelope hold and attack register */
-#define ATKHLDV_PHASE0 0x00008000 /* 0 = Begin attack phase */
-#define ATKHLDV_HOLDTIME_MASK 0x00007f00 /* Envelope hold time (127-n == n*88.2msec) */
-#define ATKHLDV_ATTACKTIME_MASK 0x0000007f /* Envelope attack time, log encoded */
- /* 0 = infinite, 1 = 10.9msec, ... 0x7f = 5.5msec */
-
-#define DCYSUSV 0x12 /* Volume envelope sustain and decay register */
-#define DCYSUSV_PHASE1_MASK 0x00008000 /* 0 = Begin attack phase, 1 = begin release phase */
-#define DCYSUSV_SUSTAINLEVEL_MASK 0x00007f00 /* 127 = full, 0 = off, 0.75dB increments */
-#define DCYSUSV_CHANNELENABLE_MASK 0x00000080 /* 1 = Inhibit envelope engine from writing values in */
- /* this channel and from writing to pitch, filter and */
- /* volume targets. */
-#define DCYSUSV_DECAYTIME_MASK 0x0000007f /* Volume envelope decay time, log encoded */
- /* 0 = 43.7msec, 1 = 21.8msec, 0x7f = 22msec */
-
-#define LFOVAL1 0x13 /* Modulation LFO value */
-#define LFOVAL_MASK 0x0000ffff /* Current value of modulation LFO state variable */
- /* 0x8000-n == 666*n usec delay */
-
-#define ENVVAL 0x14 /* Modulation envelope register */
-#define ENVVAL_MASK 0x0000ffff /* Current value of modulation envelope state variable */
- /* 0x8000-n == 666*n usec delay */
-
-#define ATKHLDM 0x15 /* Modulation envelope hold and attack register */
-#define ATKHLDM_PHASE0 0x00008000 /* 0 = Begin attack phase */
-#define ATKHLDM_HOLDTIME 0x00007f00 /* Envelope hold time (127-n == n*42msec) */
-#define ATKHLDM_ATTACKTIME 0x0000007f /* Envelope attack time, log encoded */
- /* 0 = infinite, 1 = 11msec, ... 0x7f = 5.5msec */
-
-#define DCYSUSM 0x16 /* Modulation envelope decay and sustain register */
-#define DCYSUSM_PHASE1_MASK 0x00008000 /* 0 = Begin attack phase, 1 = begin release phase */
-#define DCYSUSM_SUSTAINLEVEL_MASK 0x00007f00 /* 127 = full, 0 = off, 0.75dB increments */
-#define DCYSUSM_DECAYTIME_MASK 0x0000007f /* Envelope decay time, log encoded */
- /* 0 = 43.7msec, 1 = 21.8msec, 0x7f = 22msec */
-
-#define LFOVAL2 0x17 /* Vibrato LFO register */
-#define LFOVAL2_MASK 0x0000ffff /* Current value of vibrato LFO state variable */
- /* 0x8000-n == 666*n usec delay */
-
-#define IP 0x18 /* Initial pitch register */
-#define IP_MASK 0x0000ffff /* Exponential initial pitch shift */
- /* 4 bits of octave, 12 bits of fractional octave */
-#define IP_UNITY 0x0000e000 /* Unity pitch shift */
-
-#define IFATN 0x19 /* Initial filter cutoff and attenuation register */
-#define IFATN_FILTERCUTOFF_MASK 0x0000ff00 /* Initial filter cutoff frequency in exponential units */
- /* 6 most significant bits are semitones */
- /* 2 least significant bits are fractions */
-#define IFATN_FILTERCUTOFF 0x08080019
-#define IFATN_ATTENUATION_MASK 0x000000ff /* Initial attenuation in 0.375dB steps */
-#define IFATN_ATTENUATION 0x08000019
-
-
-#define PEFE 0x1a /* Pitch envelope and filter envelope amount register */
-#define PEFE_PITCHAMOUNT_MASK 0x0000ff00 /* Pitch envlope amount */
- /* Signed 2's complement, +/- one octave peak extremes */
-#define PEFE_PITCHAMOUNT 0x0808001a
-#define PEFE_FILTERAMOUNT_MASK 0x000000ff /* Filter envlope amount */
- /* Signed 2's complement, +/- six octaves peak extremes */
-#define PEFE_FILTERAMOUNT 0x0800001a
-#define FMMOD 0x1b /* Vibrato/filter modulation from LFO register */
-#define FMMOD_MODVIBRATO 0x0000ff00 /* Vibrato LFO modulation depth */
- /* Signed 2's complement, +/- one octave extremes */
-#define FMMOD_MOFILTER 0x000000ff /* Filter LFO modulation depth */
- /* Signed 2's complement, +/- three octave extremes */
-
-
-#define TREMFRQ 0x1c /* Tremolo amount and modulation LFO frequency register */
-#define TREMFRQ_DEPTH 0x0000ff00 /* Tremolo depth */
- /* Signed 2's complement, with +/- 12dB extremes */
-
-#define TREMFRQ_FREQUENCY 0x000000ff /* Tremolo LFO frequency */
- /* ??Hz steps, maximum of ?? Hz. */
-#define FM2FRQ2 0x1d /* Vibrato amount and vibrato LFO frequency register */
-#define FM2FRQ2_DEPTH 0x0000ff00 /* Vibrato LFO vibrato depth */
- /* Signed 2's complement, +/- one octave extremes */
-#define FM2FRQ2_FREQUENCY 0x000000ff /* Vibrato LFO frequency */
- /* 0.039Hz steps, maximum of 9.85 Hz. */
-
-#define TEMPENV 0x1e /* Tempory envelope register */
-#define TEMPENV_MASK 0x0000ffff /* 16-bit value */
- /* NOTE: All channels contain internal variables; do */
- /* not write to these locations. */
-
-/* 1f something */
-
-#define CD0 0x20 /* Cache data 0 register */
-#define CD1 0x21 /* Cache data 1 register */
-#define CD2 0x22 /* Cache data 2 register */
-#define CD3 0x23 /* Cache data 3 register */
-#define CD4 0x24 /* Cache data 4 register */
-#define CD5 0x25 /* Cache data 5 register */
-#define CD6 0x26 /* Cache data 6 register */
-#define CD7 0x27 /* Cache data 7 register */
-#define CD8 0x28 /* Cache data 8 register */
-#define CD9 0x29 /* Cache data 9 register */
-#define CDA 0x2a /* Cache data A register */
-#define CDB 0x2b /* Cache data B register */
-#define CDC 0x2c /* Cache data C register */
-#define CDD 0x2d /* Cache data D register */
-#define CDE 0x2e /* Cache data E register */
-#define CDF 0x2f /* Cache data F register */
-
-/* 0x30-3f seem to be the same as 0x20-2f */
-
-#define PTB 0x40 /* Page table base register */
-#define PTB_MASK 0xfffff000 /* Physical address of the page table in host memory */
-
-#define TCB 0x41 /* Tank cache base register */
-#define TCB_MASK 0xfffff000 /* Physical address of the bottom of host based TRAM */
-
-#define ADCCR 0x42 /* ADC sample rate/stereo control register */
-#define ADCCR_RCHANENABLE 0x00000010 /* Enables right channel for writing to the host */
-#define ADCCR_LCHANENABLE 0x00000008 /* Enables left channel for writing to the host */
- /* NOTE: To guarantee phase coherency, both channels */
- /* must be disabled prior to enabling both channels. */
-#define A_ADCCR_RCHANENABLE 0x00000020
-#define A_ADCCR_LCHANENABLE 0x00000010
-
-#define A_ADCCR_SAMPLERATE_MASK 0x0000000F /* Audigy sample rate convertor output rate */
-#define ADCCR_SAMPLERATE_MASK 0x00000007 /* Sample rate convertor output rate */
-#define ADCCR_SAMPLERATE_48 0x00000000 /* 48kHz sample rate */
-#define ADCCR_SAMPLERATE_44 0x00000001 /* 44.1kHz sample rate */
-#define ADCCR_SAMPLERATE_32 0x00000002 /* 32kHz sample rate */
-#define ADCCR_SAMPLERATE_24 0x00000003 /* 24kHz sample rate */
-#define ADCCR_SAMPLERATE_22 0x00000004 /* 22.05kHz sample rate */
-#define ADCCR_SAMPLERATE_16 0x00000005 /* 16kHz sample rate */
-#define ADCCR_SAMPLERATE_11 0x00000006 /* 11.025kHz sample rate */
-#define ADCCR_SAMPLERATE_8 0x00000007 /* 8kHz sample rate */
-#define A_ADCCR_SAMPLERATE_12 0x00000006 /* 12kHz sample rate */
-#define A_ADCCR_SAMPLERATE_11 0x00000007 /* 11.025kHz sample rate */
-#define A_ADCCR_SAMPLERATE_8 0x00000008 /* 8kHz sample rate */
-
-#define FXWC 0x43 /* FX output write channels register */
- /* When set, each bit enables the writing of the */
- /* corresponding FX output channel (internal registers */
- /* 0x20-0x3f) to host memory. This mode of recording */
- /* is 16bit, 48KHz only. All 32 channels can be enabled */
- /* simultaneously. */
-
-#define FXWC_DEFAULTROUTE_C (1<<0) /* left emu out? */
-#define FXWC_DEFAULTROUTE_B (1<<1) /* right emu out? */
-#define FXWC_DEFAULTROUTE_A (1<<12)
-#define FXWC_DEFAULTROUTE_D (1<<13)
-#define FXWC_ADCLEFT (1<<18)
-#define FXWC_CDROMSPDIFLEFT (1<<18)
-#define FXWC_ADCRIGHT (1<<19)
-#define FXWC_CDROMSPDIFRIGHT (1<<19)
-#define FXWC_MIC (1<<20)
-#define FXWC_ZOOMLEFT (1<<20)
-#define FXWC_ZOOMRIGHT (1<<21)
-#define FXWC_SPDIFLEFT (1<<22) /* 0x00400000 */
-#define FXWC_SPDIFRIGHT (1<<23) /* 0x00800000 */
-
-#define TCBS 0x44 /* Tank cache buffer size register */
-#define TCBS_MASK 0x00000007 /* Tank cache buffer size field */
-#define TCBS_BUFFSIZE_16K 0x00000000
-#define TCBS_BUFFSIZE_32K 0x00000001
-#define TCBS_BUFFSIZE_64K 0x00000002
-#define TCBS_BUFFSIZE_128K 0x00000003
-#define TCBS_BUFFSIZE_256K 0x00000004
-#define TCBS_BUFFSIZE_512K 0x00000005
-#define TCBS_BUFFSIZE_1024K 0x00000006
-#define TCBS_BUFFSIZE_2048K 0x00000007
-
-#define MICBA 0x45 /* AC97 microphone buffer address register */
-#define MICBA_MASK 0xfffff000 /* 20 bit base address */
-
-#define ADCBA 0x46 /* ADC buffer address register */
-#define ADCBA_MASK 0xfffff000 /* 20 bit base address */
-
-#define FXBA 0x47 /* FX Buffer Address */
-#define FXBA_MASK 0xfffff000 /* 20 bit base address */
-
-/* 0x48 something - word access, defaults to 3f */
-
-#define MICBS 0x49 /* Microphone buffer size register */
-
-#define ADCBS 0x4a /* ADC buffer size register */
-
-#define FXBS 0x4b /* FX buffer size register */
-
-/* register: 0x4c..4f: ffff-ffff current amounts, per-channel */
-
-/* The following mask values define the size of the ADC, MIX and FX buffers in bytes */
-#define ADCBS_BUFSIZE_NONE 0x00000000
-#define ADCBS_BUFSIZE_384 0x00000001
-#define ADCBS_BUFSIZE_448 0x00000002
-#define ADCBS_BUFSIZE_512 0x00000003
-#define ADCBS_BUFSIZE_640 0x00000004
-#define ADCBS_BUFSIZE_768 0x00000005
-#define ADCBS_BUFSIZE_896 0x00000006
-#define ADCBS_BUFSIZE_1024 0x00000007
-#define ADCBS_BUFSIZE_1280 0x00000008
-#define ADCBS_BUFSIZE_1536 0x00000009
-#define ADCBS_BUFSIZE_1792 0x0000000a
-#define ADCBS_BUFSIZE_2048 0x0000000b
-#define ADCBS_BUFSIZE_2560 0x0000000c
-#define ADCBS_BUFSIZE_3072 0x0000000d
-#define ADCBS_BUFSIZE_3584 0x0000000e
-#define ADCBS_BUFSIZE_4096 0x0000000f
-#define ADCBS_BUFSIZE_5120 0x00000010
-#define ADCBS_BUFSIZE_6144 0x00000011
-#define ADCBS_BUFSIZE_7168 0x00000012
-#define ADCBS_BUFSIZE_8192 0x00000013
-#define ADCBS_BUFSIZE_10240 0x00000014
-#define ADCBS_BUFSIZE_12288 0x00000015
-#define ADCBS_BUFSIZE_14366 0x00000016
-#define ADCBS_BUFSIZE_16384 0x00000017
-#define ADCBS_BUFSIZE_20480 0x00000018
-#define ADCBS_BUFSIZE_24576 0x00000019
-#define ADCBS_BUFSIZE_28672 0x0000001a
-#define ADCBS_BUFSIZE_32768 0x0000001b
-#define ADCBS_BUFSIZE_40960 0x0000001c
-#define ADCBS_BUFSIZE_49152 0x0000001d
-#define ADCBS_BUFSIZE_57344 0x0000001e
-#define ADCBS_BUFSIZE_65536 0x0000001f
-
-
-#define CDCS 0x50 /* CD-ROM digital channel status register */
-
-#define GPSCS 0x51 /* General Purpose SPDIF channel status register*/
-
-#define DBG 0x52 /* DO NOT PROGRAM THIS REGISTER!!! MAY DESTROY CHIP */
-
-#define REG53 0x53 /* DO NOT PROGRAM THIS REGISTER!!! MAY DESTROY CHIP */
-
-#define A_DBG 0x53
-#define A_DBG_SINGLE_STEP 0x00020000 /* Set to zero to start dsp */
-#define A_DBG_ZC 0x40000000 /* zero tram counter */
-#define A_DBG_STEP_ADDR 0x000003ff
-#define A_DBG_SATURATION_OCCURED 0x20000000
-#define A_DBG_SATURATION_ADDR 0x0ffc0000
-
-// NOTE: 0x54,55,56: 64-bit
-#define SPCS0 0x54 /* SPDIF output Channel Status 0 register */
-
-#define SPCS1 0x55 /* SPDIF output Channel Status 1 register */
-
-#define SPCS2 0x56 /* SPDIF output Channel Status 2 register */
-
-#define SPCS_CLKACCYMASK 0x30000000 /* Clock accuracy */
-#define SPCS_CLKACCY_1000PPM 0x00000000 /* 1000 parts per million */
-#define SPCS_CLKACCY_50PPM 0x10000000 /* 50 parts per million */
-#define SPCS_CLKACCY_VARIABLE 0x20000000 /* Variable accuracy */
-#define SPCS_SAMPLERATEMASK 0x0f000000 /* Sample rate */
-#define SPCS_SAMPLERATE_44 0x00000000 /* 44.1kHz sample rate */
-#define SPCS_SAMPLERATE_48 0x02000000 /* 48kHz sample rate */
-#define SPCS_SAMPLERATE_32 0x03000000 /* 32kHz sample rate */
-#define SPCS_CHANNELNUMMASK 0x00f00000 /* Channel number */
-#define SPCS_CHANNELNUM_UNSPEC 0x00000000 /* Unspecified channel number */
-#define SPCS_CHANNELNUM_LEFT 0x00100000 /* Left channel */
-#define SPCS_CHANNELNUM_RIGHT 0x00200000 /* Right channel */
-#define SPCS_SOURCENUMMASK 0x000f0000 /* Source number */
-#define SPCS_SOURCENUM_UNSPEC 0x00000000 /* Unspecified source number */
-#define SPCS_GENERATIONSTATUS 0x00008000 /* Originality flag (see IEC-958 spec) */
-#define SPCS_CATEGORYCODEMASK 0x00007f00 /* Category code (see IEC-958 spec) */
-#define SPCS_MODEMASK 0x000000c0 /* Mode (see IEC-958 spec) */
-#define SPCS_EMPHASISMASK 0x00000038 /* Emphasis */
-#define SPCS_EMPHASIS_NONE 0x00000000 /* No emphasis */
-#define SPCS_EMPHASIS_50_15 0x00000008 /* 50/15 usec 2 channel */
-#define SPCS_COPYRIGHT 0x00000004 /* Copyright asserted flag -- do not modify */
-#define SPCS_NOTAUDIODATA 0x00000002 /* 0 = Digital audio, 1 = not audio */
-#define SPCS_PROFESSIONAL 0x00000001 /* 0 = Consumer (IEC-958), 1 = pro (AES3-1992) */
-
-/* The 32-bit CLIx and SOLx registers all have one bit per channel control/status */
-#define CLIEL 0x58 /* Channel loop interrupt enable low register */
-
-#define CLIEH 0x59 /* Channel loop interrupt enable high register */
-
-#define CLIPL 0x5a /* Channel loop interrupt pending low register */
-
-#define CLIPH 0x5b /* Channel loop interrupt pending high register */
-
-#define SOLEL 0x5c /* Stop on loop enable low register */
-
-#define SOLEH 0x5d /* Stop on loop enable high register */
-
-#define SPBYPASS 0x5e /* SPDIF BYPASS mode register */
-#define SPBYPASS_SPDIF0_MASK 0x00000003 /* SPDIF 0 bypass mode */
-#define SPBYPASS_SPDIF1_MASK 0x0000000c /* SPDIF 1 bypass mode */
-/* bypass mode: 0 - DSP; 1 - SPDIF A, 2 - SPDIF B, 3 - SPDIF C */
-#define SPBYPASS_FORMAT 0x00000f00 /* If 1, SPDIF XX uses 24 bit, if 0 - 20 bit */
-
-#define AC97SLOT 0x5f /* additional AC97 slots enable bits */
-#define AC97SLOT_REAR_RIGHT 0x01 /* Rear left */
-#define AC97SLOT_REAR_LEFT 0x02 /* Rear right */
-#define AC97SLOT_CNTR 0x10 /* Center enable */
-#define AC97SLOT_LFE 0x20 /* LFE enable */
-
-// NOTE: 0x60,61,62: 64-bit
-#define CDSRCS 0x60 /* CD-ROM Sample Rate Converter status register */
-
-#define GPSRCS 0x61 /* General Purpose SPDIF sample rate cvt status */
-
-#define ZVSRCS 0x62 /* ZVideo sample rate converter status */
- /* NOTE: This one has no SPDIFLOCKED field */
- /* Assumes sample lock */
-
-/* These three bitfields apply to CDSRCS, GPSRCS, and (except as noted) ZVSRCS. */
-#define SRCS_SPDIFVALID 0x04000000 /* SPDIF stream valid */
-#define SRCS_SPDIFLOCKED 0x02000000 /* SPDIF stream locked */
-#define SRCS_RATELOCKED 0x01000000 /* Sample rate locked */
-#define SRCS_ESTSAMPLERATE 0x0007ffff /* Do not modify this field. */
-
-/* Note that these values can vary +/- by a small amount */
-#define SRCS_SPDIFRATE_44 0x0003acd9
-#define SRCS_SPDIFRATE_48 0x00040000
-#define SRCS_SPDIFRATE_96 0x00080000
-
-#define MICIDX 0x63 /* Microphone recording buffer index register */
-#define MICIDX_MASK 0x0000ffff /* 16-bit value */
-#define MICIDX_IDX 0x10000063
-
-#define ADCIDX 0x64 /* ADC recording buffer index register */
-#define ADCIDX_MASK 0x0000ffff /* 16 bit index field */
-#define ADCIDX_IDX 0x10000064
-
-#define A_ADCIDX 0x63
-#define A_ADCIDX_IDX 0x10000063
-
-#define A_MICIDX 0x64
-#define A_MICIDX_IDX 0x10000064
-
-#define FXIDX 0x65 /* FX recording buffer index register */
-#define FXIDX_MASK 0x0000ffff /* 16-bit value */
-#define FXIDX_IDX 0x10000065
-
-/* The 32-bit HLIx and HLIPx registers all have one bit per channel control/status */
-#define HLIEL 0x66 /* Channel half loop interrupt enable low register */
-
-#define HLIEH 0x67 /* Channel half loop interrupt enable high register */
-
-#define HLIPL 0x68 /* Channel half loop interrupt pending low register */
-
-#define HLIPH 0x69 /* Channel half loop interrupt pending high register */
-
-// 0x6a,6b,6c used for some recording
-// 0x6d unused
-// 0x6e,6f - tanktable base / offset
-
-/* This is the MPU port on the card (via the game port) */
-#define A_MUDATA1 0x70
-#define A_MUCMD1 0x71
-#define A_MUSTAT1 A_MUCMD1
-
-/* This is the MPU port on the Audigy Drive */
-#define A_MUDATA2 0x72
-#define A_MUCMD2 0x73
-#define A_MUSTAT2 A_MUCMD2
-
-/* The next two are the Audigy equivalent of FXWC */
-/* the Audigy can record any output (16bit, 48kHz, up to 64 channel simultaneously) */
-/* Each bit selects a channel for recording */
-#define A_FXWC1 0x74 /* Selects 0x7f-0x60 for FX recording */
-#define A_FXWC2 0x75 /* Selects 0x9f-0x80 for FX recording */
-
-#define A_SPDIF_SAMPLERATE 0x76 /* Set the sample rate of SPDIF output */
-#define A_SAMPLE_RATE 0x76 /* Various sample rate settings. */
-#define A_SAMPLE_RATE_NOT_USED 0x0ffc111e /* Bits that are not used and cannot be set. */
-#define A_SAMPLE_RATE_UNKNOWN 0xf0030001 /* Bits that can be set, but have unknown use. */
-#define A_SPDIF_RATE_MASK 0x000000e0 /* Any other values for rates, just use 48000 */
-#define A_SPDIF_48000 0x00000000
-#define A_SPDIF_192000 0x00000020
-#define A_SPDIF_96000 0x00000040
-#define A_SPDIF_44100 0x00000080
-
-#define A_I2S_CAPTURE_RATE_MASK 0x00000e00 /* This sets the capture PCM rate, but it is */
-#define A_I2S_CAPTURE_48000 0x00000000 /* unclear if this sets the ADC rate as well. */
-#define A_I2S_CAPTURE_192000 0x00000200
-#define A_I2S_CAPTURE_96000 0x00000400
-#define A_I2S_CAPTURE_44100 0x00000800
-
-#define A_PCM_RATE_MASK 0x0000e000 /* This sets the playback PCM rate on the P16V */
-#define A_PCM_48000 0x00000000
-#define A_PCM_192000 0x00002000
-#define A_PCM_96000 0x00004000
-#define A_PCM_44100 0x00008000
-
-/* 0x77,0x78,0x79 "something i2s-related" - default to 0x01080000 on my audigy 2 ZS --rlrevell */
-/* 0x7a, 0x7b - lookup tables */
-
-#define A_FXRT2 0x7c
-#define A_FXRT_CHANNELE 0x0000003f /* Effects send bus number for channel's effects send E */
-#define A_FXRT_CHANNELF 0x00003f00 /* Effects send bus number for channel's effects send F */
-#define A_FXRT_CHANNELG 0x003f0000 /* Effects send bus number for channel's effects send G */
-#define A_FXRT_CHANNELH 0x3f000000 /* Effects send bus number for channel's effects send H */
-
-#define A_SENDAMOUNTS 0x7d
-#define A_FXSENDAMOUNT_E_MASK 0xFF000000
-#define A_FXSENDAMOUNT_F_MASK 0x00FF0000
-#define A_FXSENDAMOUNT_G_MASK 0x0000FF00
-#define A_FXSENDAMOUNT_H_MASK 0x000000FF
-/* 0x7c, 0x7e "high bit is used for filtering" */
-
-/* The send amounts for this one are the same as used with the emu10k1 */
-#define A_FXRT1 0x7e
-#define A_FXRT_CHANNELA 0x0000003f
-#define A_FXRT_CHANNELB 0x00003f00
-#define A_FXRT_CHANNELC 0x003f0000
-#define A_FXRT_CHANNELD 0x3f000000
-
-
-/* Each FX general purpose register is 32 bits in length, all bits are used */
-#define FXGPREGBASE 0x100 /* FX general purpose registers base */
-#define A_FXGPREGBASE 0x400 /* Audigy GPRs, 0x400 to 0x5ff */
-
-#define A_TANKMEMCTLREGBASE 0x100 /* Tank memory control registers base - only for Audigy */
-#define A_TANKMEMCTLREG_MASK 0x1f /* only 5 bits used - only for Audigy */
-
-/* Tank audio data is logarithmically compressed down to 16 bits before writing to TRAM and is */
-/* decompressed back to 20 bits on a read. There are a total of 160 locations, the last 32 */
-/* locations are for external TRAM. */
-#define TANKMEMDATAREGBASE 0x200 /* Tank memory data registers base */
-#define TANKMEMDATAREG_MASK 0x000fffff /* 20 bit tank audio data field */
-
-/* Combined address field and memory opcode or flag field. 160 locations, last 32 are external */
-#define TANKMEMADDRREGBASE 0x300 /* Tank memory address registers base */
-#define TANKMEMADDRREG_ADDR_MASK 0x000fffff /* 20 bit tank address field */
-#define TANKMEMADDRREG_CLEAR 0x00800000 /* Clear tank memory */
-#define TANKMEMADDRREG_ALIGN 0x00400000 /* Align read or write relative to tank access */
-#define TANKMEMADDRREG_WRITE 0x00200000 /* Write to tank memory */
-#define TANKMEMADDRREG_READ 0x00100000 /* Read from tank memory */
-
-#define MICROCODEBASE 0x400 /* Microcode data base address */
-
-/* Each DSP microcode instruction is mapped into 2 doublewords */
-/* NOTE: When writing, always write the LO doubleword first. Reads can be in either order. */
-#define LOWORD_OPX_MASK 0x000ffc00 /* Instruction operand X */
-#define LOWORD_OPY_MASK 0x000003ff /* Instruction operand Y */
-#define HIWORD_OPCODE_MASK 0x00f00000 /* Instruction opcode */
-#define HIWORD_RESULT_MASK 0x000ffc00 /* Instruction result */
-#define HIWORD_OPA_MASK 0x000003ff /* Instruction operand A */
-
-
-/* Audigy Soundcard have a different instruction format */
-#define A_MICROCODEBASE 0x600
-#define A_LOWORD_OPY_MASK 0x000007ff
-#define A_LOWORD_OPX_MASK 0x007ff000
-#define A_HIWORD_OPCODE_MASK 0x0f000000
-#define A_HIWORD_RESULT_MASK 0x007ff000
-#define A_HIWORD_OPA_MASK 0x000007ff
-
-
-/* ------------------- STRUCTURES -------------------- */
-
-enum {
- EMU10K1_EFX,
- EMU10K1_PCM,
- EMU10K1_SYNTH,
- EMU10K1_MIDI
-};
-
-struct snd_emu10k1;
-
-struct snd_emu10k1_voice {
- struct snd_emu10k1 *emu;
- int number;
- unsigned int use: 1,
- pcm: 1,
- efx: 1,
- synth: 1,
- midi: 1;
- void (*interrupt)(struct snd_emu10k1 *emu, struct snd_emu10k1_voice *pvoice);
-
- struct snd_emu10k1_pcm *epcm;
-};
-
-enum {
- PLAYBACK_EMUVOICE,
- PLAYBACK_EFX,
- CAPTURE_AC97ADC,
- CAPTURE_AC97MIC,
- CAPTURE_EFX
-};
-
-struct snd_emu10k1_pcm {
- struct snd_emu10k1 *emu;
- int type;
- struct snd_pcm_substream *substream;
- struct snd_emu10k1_voice *voices[NUM_EFX_PLAYBACK];
- struct snd_emu10k1_voice *extra;
- unsigned short running;
- unsigned short first_ptr;
- struct snd_util_memblk *memblk;
- unsigned int start_addr;
- unsigned int ccca_start_addr;
- unsigned int capture_ipr; /* interrupt acknowledge mask */
- unsigned int capture_inte; /* interrupt enable mask */
- unsigned int capture_ba_reg; /* buffer address register */
- unsigned int capture_bs_reg; /* buffer size register */
- unsigned int capture_idx_reg; /* buffer index register */
- unsigned int capture_cr_val; /* control value */
- unsigned int capture_cr_val2; /* control value2 (for audigy) */
- unsigned int capture_bs_val; /* buffer size value */
- unsigned int capture_bufsize; /* buffer size in bytes */
-};
-
-struct snd_emu10k1_pcm_mixer {
- /* mono, left, right x 8 sends (4 on emu10k1) */
- unsigned char send_routing[3][8];
- unsigned char send_volume[3][8];
- unsigned short attn[3];
- struct snd_emu10k1_pcm *epcm;
-};
-
-#define snd_emu10k1_compose_send_routing(route) \
-((route[0] | (route[1] << 4) | (route[2] << 8) | (route[3] << 12)) << 16)
-
-#define snd_emu10k1_compose_audigy_fxrt1(route) \
-((unsigned int)route[0] | ((unsigned int)route[1] << 8) | ((unsigned int)route[2] << 16) | ((unsigned int)route[3] << 24))
-
-#define snd_emu10k1_compose_audigy_fxrt2(route) \
-((unsigned int)route[4] | ((unsigned int)route[5] << 8) | ((unsigned int)route[6] << 16) | ((unsigned int)route[7] << 24))
-
-struct snd_emu10k1_memblk {
- struct snd_util_memblk mem;
- /* private part */
- int first_page, last_page, pages, mapped_page;
- unsigned int map_locked;
- struct list_head mapped_link;
- struct list_head mapped_order_link;
-};
-
-#define snd_emu10k1_memblk_offset(blk) (((blk)->mapped_page << PAGE_SHIFT) | ((blk)->mem.offset & (PAGE_SIZE - 1)))
-
-#define EMU10K1_MAX_TRAM_BLOCKS_PER_CODE 16
-
-struct snd_emu10k1_fx8010_ctl {
- struct list_head list; /* list link container */
- unsigned int vcount;
- unsigned int count; /* count of GPR (1..16) */
- unsigned short gpr[32]; /* GPR number(s) */
- unsigned int value[32];
- unsigned int min; /* minimum range */
- unsigned int max; /* maximum range */
- unsigned int translation; /* translation type (EMU10K1_GPR_TRANSLATION*) */
- struct snd_kcontrol *kcontrol;
-};
-
-typedef void (snd_fx8010_irq_handler_t)(struct snd_emu10k1 *emu, void *private_data);
-
-struct snd_emu10k1_fx8010_irq {
- struct snd_emu10k1_fx8010_irq *next;
- snd_fx8010_irq_handler_t *handler;
- unsigned short gpr_running;
- void *private_data;
-};
-
-struct snd_emu10k1_fx8010_pcm {
- unsigned int valid: 1,
- opened: 1,
- active: 1;
- unsigned int channels; /* 16-bit channels count */
- unsigned int tram_start; /* initial ring buffer position in TRAM (in samples) */
- unsigned int buffer_size; /* count of buffered samples */
- unsigned short gpr_size; /* GPR containing size of ring buffer in samples (host) */
- unsigned short gpr_ptr; /* GPR containing current pointer in the ring buffer (host = reset, FX8010) */
- unsigned short gpr_count; /* GPR containing count of samples between two interrupts (host) */
- unsigned short gpr_tmpcount; /* GPR containing current count of samples to interrupt (host = set, FX8010) */
- unsigned short gpr_trigger; /* GPR containing trigger (activate) information (host) */
- unsigned short gpr_running; /* GPR containing info if PCM is running (FX8010) */
- unsigned char etram[32]; /* external TRAM address & data */
- struct snd_pcm_indirect pcm_rec;
- unsigned int tram_pos;
- unsigned int tram_shift;
- struct snd_emu10k1_fx8010_irq *irq;
-};
-
-struct snd_emu10k1_fx8010 {
- unsigned short fxbus_mask; /* used FX buses (bitmask) */
- unsigned short extin_mask; /* used external inputs (bitmask) */
- unsigned short extout_mask; /* used external outputs (bitmask) */
- unsigned short pad1;
- unsigned int itram_size; /* internal TRAM size in samples */
- struct snd_dma_buffer etram_pages; /* external TRAM pages and size */
- unsigned int dbg; /* FX debugger register */
- unsigned char name[128];
- int gpr_size; /* size of allocated GPR controls */
- int gpr_count; /* count of used kcontrols */
- struct list_head gpr_ctl; /* GPR controls */
- struct mutex lock;
- struct snd_emu10k1_fx8010_pcm pcm[8];
- spinlock_t irq_lock;
- struct snd_emu10k1_fx8010_irq *irq_handlers;
-};
-
-#define emu10k1_gpr_ctl(n) list_entry(n, struct snd_emu10k1_fx8010_ctl, list)
-
-struct snd_emu10k1_midi {
- struct snd_emu10k1 *emu;
- struct snd_rawmidi *rmidi;
- struct snd_rawmidi_substream *substream_input;
- struct snd_rawmidi_substream *substream_output;
- unsigned int midi_mode;
- spinlock_t input_lock;
- spinlock_t output_lock;
- spinlock_t open_lock;
- int tx_enable, rx_enable;
- int port;
- int ipr_tx, ipr_rx;
- void (*interrupt)(struct snd_emu10k1 *emu, unsigned int status);
-};
-
-struct snd_emu_chip_details {
- u32 vendor;
- u32 device;
- u32 subsystem;
- unsigned char revision;
- unsigned char emu10k1_chip; /* Original SB Live. Not SB Live 24bit. */
- unsigned char emu10k2_chip; /* Audigy 1 or Audigy 2. */
- unsigned char ca0102_chip; /* Audigy 1 or Audigy 2. Not SB Audigy 2 Value. */
- unsigned char ca0108_chip; /* Audigy 2 Value */
- unsigned char ca_cardbus_chip; /* Audigy 2 ZS Notebook */
- unsigned char ca0151_chip; /* P16V */
- unsigned char spk71; /* Has 7.1 speakers */
- unsigned char sblive51; /* SBLive! 5.1 - extout 0x11 -> center, 0x12 -> lfe */
- unsigned char spdif_bug; /* Has Spdif phasing bug */
- unsigned char ac97_chip; /* Has an AC97 chip: 1 = mandatory, 2 = optional */
- unsigned char ecard; /* APS EEPROM */
- unsigned char emu1212m; /* EMU 1212m card */
- unsigned char spi_dac; /* SPI interface for DAC */
- unsigned char i2c_adc; /* I2C interface for ADC */
- unsigned char adc_1361t; /* Use Philips 1361T ADC */
- const char *driver;
- const char *name;
- const char *id; /* for backward compatibility - can be NULL if not needed */
-};
-
-struct snd_emu10k1 {
- int irq;
-
- unsigned long port; /* I/O port number */
- unsigned int tos_link: 1, /* tos link detected */
- rear_ac97: 1, /* rear channels are on AC'97 */
- enable_ir: 1;
- /* Contains profile of card capabilities */
- const struct snd_emu_chip_details *card_capabilities;
- unsigned int audigy; /* is Audigy? */
- unsigned int revision; /* chip revision */
- unsigned int serial; /* serial number */
- unsigned short model; /* subsystem id */
- unsigned int card_type; /* EMU10K1_CARD_* */
- unsigned int ecard_ctrl; /* ecard control bits */
- unsigned long dma_mask; /* PCI DMA mask */
- int max_cache_pages; /* max memory size / PAGE_SIZE */
- struct snd_dma_buffer silent_page; /* silent page */
- struct snd_dma_buffer ptb_pages; /* page table pages */
- struct snd_dma_device p16v_dma_dev;
- struct snd_dma_buffer p16v_buffer;
-
- struct snd_util_memhdr *memhdr; /* page allocation list */
- struct snd_emu10k1_memblk *reserved_page; /* reserved page */
-
- struct list_head mapped_link_head;
- struct list_head mapped_order_link_head;
- void **page_ptr_table;
- unsigned long *page_addr_table;
- spinlock_t memblk_lock;
-
- unsigned int spdif_bits[3]; /* s/pdif out setup */
-
- struct snd_emu10k1_fx8010 fx8010; /* FX8010 info */
- int gpr_base;
-
- struct snd_ac97 *ac97;
-
- struct pci_dev *pci;
- struct snd_card *card;
- struct snd_pcm *pcm;
- struct snd_pcm *pcm_mic;
- struct snd_pcm *pcm_efx;
- struct snd_pcm *pcm_multi;
- struct snd_pcm *pcm_p16v;
-
- spinlock_t synth_lock;
- void *synth;
- int (*get_synth_voice)(struct snd_emu10k1 *emu);
-
- spinlock_t reg_lock;
- spinlock_t emu_lock;
- spinlock_t voice_lock;
-
- struct snd_emu10k1_voice voices[NUM_G];
- struct snd_emu10k1_voice p16v_voices[4];
- struct snd_emu10k1_voice p16v_capture_voice;
- int p16v_device_offset;
- u32 p16v_capture_source;
- u32 p16v_capture_channel;
- struct snd_emu10k1_pcm_mixer pcm_mixer[32];
- struct snd_emu10k1_pcm_mixer efx_pcm_mixer[NUM_EFX_PLAYBACK];
- struct snd_kcontrol *ctl_send_routing;
- struct snd_kcontrol *ctl_send_volume;
- struct snd_kcontrol *ctl_attn;
- struct snd_kcontrol *ctl_efx_send_routing;
- struct snd_kcontrol *ctl_efx_send_volume;
- struct snd_kcontrol *ctl_efx_attn;
-
- void (*hwvol_interrupt)(struct snd_emu10k1 *emu, unsigned int status);
- void (*capture_interrupt)(struct snd_emu10k1 *emu, unsigned int status);
- void (*capture_mic_interrupt)(struct snd_emu10k1 *emu, unsigned int status);
- void (*capture_efx_interrupt)(struct snd_emu10k1 *emu, unsigned int status);
- void (*spdif_interrupt)(struct snd_emu10k1 *emu, unsigned int status);
- void (*dsp_interrupt)(struct snd_emu10k1 *emu);
-
- struct snd_pcm_substream *pcm_capture_substream;
- struct snd_pcm_substream *pcm_capture_mic_substream;
- struct snd_pcm_substream *pcm_capture_efx_substream;
- struct snd_pcm_substream *pcm_playback_efx_substream;
-
- struct snd_timer *timer;
-
- struct snd_emu10k1_midi midi;
- struct snd_emu10k1_midi midi2; /* for audigy */
-
- unsigned int efx_voices_mask[2];
- unsigned int next_free_voice;
-
-#ifdef CONFIG_PM
- unsigned int *saved_ptr;
- unsigned int *saved_gpr;
- unsigned int *tram_val_saved;
- unsigned int *tram_addr_saved;
- unsigned int *saved_icode;
- unsigned int *p16v_saved;
- unsigned int saved_a_iocfg, saved_hcfg;
-#endif
-
-};
-
-int snd_emu10k1_create(struct snd_card *card,
- struct pci_dev *pci,
- unsigned short extin_mask,
- unsigned short extout_mask,
- long max_cache_bytes,
- int enable_ir,
- uint subsystem,
- struct snd_emu10k1 ** remu);
-
-int snd_emu10k1_pcm(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm);
-int snd_emu10k1_pcm_mic(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm);
-int snd_emu10k1_pcm_efx(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm);
-int snd_p16v_pcm(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm);
-int snd_p16v_free(struct snd_emu10k1 * emu);
-int snd_p16v_mixer(struct snd_emu10k1 * emu);
-int snd_emu10k1_pcm_multi(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm);
-int snd_emu10k1_fx8010_pcm(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm);
-int snd_emu10k1_mixer(struct snd_emu10k1 * emu, int pcm_device, int multi_device);
-int snd_emu10k1_timer(struct snd_emu10k1 * emu, int device);
-int snd_emu10k1_fx8010_new(struct snd_emu10k1 *emu, int device, struct snd_hwdep ** rhwdep);
-
-irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id, struct pt_regs *regs);
-
-void snd_emu10k1_voice_init(struct snd_emu10k1 * emu, int voice);
-int snd_emu10k1_init_efx(struct snd_emu10k1 *emu);
-void snd_emu10k1_free_efx(struct snd_emu10k1 *emu);
-int snd_emu10k1_fx8010_tram_setup(struct snd_emu10k1 *emu, u32 size);
-int snd_emu10k1_done(struct snd_emu10k1 * emu);
-
-/* I/O functions */
-unsigned int snd_emu10k1_ptr_read(struct snd_emu10k1 * emu, unsigned int reg, unsigned int chn);
-void snd_emu10k1_ptr_write(struct snd_emu10k1 *emu, unsigned int reg, unsigned int chn, unsigned int data);
-unsigned int snd_emu10k1_ptr20_read(struct snd_emu10k1 * emu, unsigned int reg, unsigned int chn);
-void snd_emu10k1_ptr20_write(struct snd_emu10k1 *emu, unsigned int reg, unsigned int chn, unsigned int data);
-int snd_emu10k1_spi_write(struct snd_emu10k1 * emu, unsigned int data);
-unsigned int snd_emu10k1_efx_read(struct snd_emu10k1 *emu, unsigned int pc);
-void snd_emu10k1_intr_enable(struct snd_emu10k1 *emu, unsigned int intrenb);
-void snd_emu10k1_intr_disable(struct snd_emu10k1 *emu, unsigned int intrenb);
-void snd_emu10k1_voice_intr_enable(struct snd_emu10k1 *emu, unsigned int voicenum);
-void snd_emu10k1_voice_intr_disable(struct snd_emu10k1 *emu, unsigned int voicenum);
-void snd_emu10k1_voice_intr_ack(struct snd_emu10k1 *emu, unsigned int voicenum);
-void snd_emu10k1_voice_half_loop_intr_enable(struct snd_emu10k1 *emu, unsigned int voicenum);
-void snd_emu10k1_voice_half_loop_intr_disable(struct snd_emu10k1 *emu, unsigned int voicenum);
-void snd_emu10k1_voice_half_loop_intr_ack(struct snd_emu10k1 *emu, unsigned int voicenum);
-void snd_emu10k1_voice_set_loop_stop(struct snd_emu10k1 *emu, unsigned int voicenum);
-void snd_emu10k1_voice_clear_loop_stop(struct snd_emu10k1 *emu, unsigned int voicenum);
-void snd_emu10k1_wait(struct snd_emu10k1 *emu, unsigned int wait);
-static inline unsigned int snd_emu10k1_wc(struct snd_emu10k1 *emu) { return (inl(emu->port + WC) >> 6) & 0xfffff; }
-unsigned short snd_emu10k1_ac97_read(struct snd_ac97 *ac97, unsigned short reg);
-void snd_emu10k1_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short data);
-unsigned int snd_emu10k1_rate_to_pitch(unsigned int rate);
-
-#ifdef CONFIG_PM
-void snd_emu10k1_suspend_regs(struct snd_emu10k1 *emu);
-void snd_emu10k1_resume_init(struct snd_emu10k1 *emu);
-void snd_emu10k1_resume_regs(struct snd_emu10k1 *emu);
-int snd_emu10k1_efx_alloc_pm_buffer(struct snd_emu10k1 *emu);
-void snd_emu10k1_efx_free_pm_buffer(struct snd_emu10k1 *emu);
-void snd_emu10k1_efx_suspend(struct snd_emu10k1 *emu);
-void snd_emu10k1_efx_resume(struct snd_emu10k1 *emu);
-int snd_p16v_alloc_pm_buffer(struct snd_emu10k1 *emu);
-void snd_p16v_free_pm_buffer(struct snd_emu10k1 *emu);
-void snd_p16v_suspend(struct snd_emu10k1 *emu);
-void snd_p16v_resume(struct snd_emu10k1 *emu);
-#endif
-
-/* memory allocation */
-struct snd_util_memblk *snd_emu10k1_alloc_pages(struct snd_emu10k1 *emu, struct snd_pcm_substream *substream);
-int snd_emu10k1_free_pages(struct snd_emu10k1 *emu, struct snd_util_memblk *blk);
-struct snd_util_memblk *snd_emu10k1_synth_alloc(struct snd_emu10k1 *emu, unsigned int size);
-int snd_emu10k1_synth_free(struct snd_emu10k1 *emu, struct snd_util_memblk *blk);
-int snd_emu10k1_synth_bzero(struct snd_emu10k1 *emu, struct snd_util_memblk *blk, int offset, int size);
-int snd_emu10k1_synth_copy_from_user(struct snd_emu10k1 *emu, struct snd_util_memblk *blk, int offset, const char __user *data, int size);
-int snd_emu10k1_memblk_map(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *blk);
-
-/* voice allocation */
-int snd_emu10k1_voice_alloc(struct snd_emu10k1 *emu, int type, int pair, struct snd_emu10k1_voice **rvoice);
-int snd_emu10k1_voice_free(struct snd_emu10k1 *emu, struct snd_emu10k1_voice *pvoice);
-
-/* MIDI uart */
-int snd_emu10k1_midi(struct snd_emu10k1 * emu);
-int snd_emu10k1_audigy_midi(struct snd_emu10k1 * emu);
-
-/* proc interface */
-int snd_emu10k1_proc_init(struct snd_emu10k1 * emu);
-
-/* fx8010 irq handler */
-int snd_emu10k1_fx8010_register_irq_handler(struct snd_emu10k1 *emu,
- snd_fx8010_irq_handler_t *handler,
- unsigned char gpr_running,
- void *private_data,
- struct snd_emu10k1_fx8010_irq **r_irq);
-int snd_emu10k1_fx8010_unregister_irq_handler(struct snd_emu10k1 *emu,
- struct snd_emu10k1_fx8010_irq *irq);
-
-#endif /* __KERNEL__ */
-
-/*
- * ---- FX8010 ----
- */
-
-#define EMU10K1_CARD_CREATIVE 0x00000000
-#define EMU10K1_CARD_EMUAPS 0x00000001
-
-#define EMU10K1_FX8010_PCM_COUNT 8
-
-/* instruction set */
-#define iMAC0 0x00 /* R = A + (X * Y >> 31) ; saturation */
-#define iMAC1 0x01 /* R = A + (-X * Y >> 31) ; saturation */
-#define iMAC2 0x02 /* R = A + (X * Y >> 31) ; wraparound */
-#define iMAC3 0x03 /* R = A + (-X * Y >> 31) ; wraparound */
-#define iMACINT0 0x04 /* R = A + X * Y ; saturation */
-#define iMACINT1 0x05 /* R = A + X * Y ; wraparound (31-bit) */
-#define iACC3 0x06 /* R = A + X + Y ; saturation */
-#define iMACMV 0x07 /* R = A, acc += X * Y >> 31 */
-#define iANDXOR 0x08 /* R = (A & X) ^ Y */
-#define iTSTNEG 0x09 /* R = (A >= Y) ? X : ~X */
-#define iLIMITGE 0x0a /* R = (A >= Y) ? X : Y */
-#define iLIMITLT 0x0b /* R = (A < Y) ? X : Y */
-#define iLOG 0x0c /* R = linear_data, A (log_data), X (max_exp), Y (format_word) */
-#define iEXP 0x0d /* R = log_data, A (linear_data), X (max_exp), Y (format_word) */
-#define iINTERP 0x0e /* R = A + (X * (Y - A) >> 31) ; saturation */
-#define iSKIP 0x0f /* R = A (cc_reg), X (count), Y (cc_test) */
-
-/* GPRs */
-#define FXBUS(x) (0x00 + (x)) /* x = 0x00 - 0x0f */
-#define EXTIN(x) (0x10 + (x)) /* x = 0x00 - 0x0f */
-#define EXTOUT(x) (0x20 + (x)) /* x = 0x00 - 0x0f physical outs -> FXWC low 16 bits */
-#define FXBUS2(x) (0x30 + (x)) /* x = 0x00 - 0x0f copies of fx buses for capture -> FXWC high 16 bits */
- /* NB: 0x31 and 0x32 are shared with Center/LFE on SB live 5.1 */
-
-#define C_00000000 0x40
-#define C_00000001 0x41
-#define C_00000002 0x42
-#define C_00000003 0x43
-#define C_00000004 0x44
-#define C_00000008 0x45
-#define C_00000010 0x46
-#define C_00000020 0x47
-#define C_00000100 0x48
-#define C_00010000 0x49
-#define C_00080000 0x4a
-#define C_10000000 0x4b
-#define C_20000000 0x4c
-#define C_40000000 0x4d
-#define C_80000000 0x4e
-#define C_7fffffff 0x4f
-#define C_ffffffff 0x50
-#define C_fffffffe 0x51
-#define C_c0000000 0x52
-#define C_4f1bbcdc 0x53
-#define C_5a7ef9db 0x54
-#define C_00100000 0x55 /* ?? */
-#define GPR_ACCU 0x56 /* ACCUM, accumulator */
-#define GPR_COND 0x57 /* CCR, condition register */
-#define GPR_NOISE0 0x58 /* noise source */
-#define GPR_NOISE1 0x59 /* noise source */
-#define GPR_IRQ 0x5a /* IRQ register */
-#define GPR_DBAC 0x5b /* TRAM Delay Base Address Counter */
-#define GPR(x) (FXGPREGBASE + (x)) /* free GPRs: x = 0x00 - 0xff */
-#define ITRAM_DATA(x) (TANKMEMDATAREGBASE + 0x00 + (x)) /* x = 0x00 - 0x7f */
-#define ETRAM_DATA(x) (TANKMEMDATAREGBASE + 0x80 + (x)) /* x = 0x00 - 0x1f */
-#define ITRAM_ADDR(x) (TANKMEMADDRREGBASE + 0x00 + (x)) /* x = 0x00 - 0x7f */
-#define ETRAM_ADDR(x) (TANKMEMADDRREGBASE + 0x80 + (x)) /* x = 0x00 - 0x1f */
-
-#define A_ITRAM_DATA(x) (TANKMEMDATAREGBASE + 0x00 + (x)) /* x = 0x00 - 0xbf */
-#define A_ETRAM_DATA(x) (TANKMEMDATAREGBASE + 0xc0 + (x)) /* x = 0x00 - 0x3f */
-#define A_ITRAM_ADDR(x) (TANKMEMADDRREGBASE + 0x00 + (x)) /* x = 0x00 - 0xbf */
-#define A_ETRAM_ADDR(x) (TANKMEMADDRREGBASE + 0xc0 + (x)) /* x = 0x00 - 0x3f */
-#define A_ITRAM_CTL(x) (A_TANKMEMCTLREGBASE + 0x00 + (x)) /* x = 0x00 - 0xbf */
-#define A_ETRAM_CTL(x) (A_TANKMEMCTLREGBASE + 0xc0 + (x)) /* x = 0x00 - 0x3f */
-
-#define A_FXBUS(x) (0x00 + (x)) /* x = 0x00 - 0x3f FX buses */
-#define A_EXTIN(x) (0x40 + (x)) /* x = 0x00 - 0x0f physical ins */
-#define A_P16VIN(x) (0x50 + (x)) /* x = 0x00 - 0x0f p16v ins (A2 only) "EMU32 inputs" */
-#define A_EXTOUT(x) (0x60 + (x)) /* x = 0x00 - 0x1f physical outs -> A_FXWC1 0x79-7f unknown */
-#define A_FXBUS2(x) (0x80 + (x)) /* x = 0x00 - 0x1f extra outs used for EFX capture -> A_FXWC2 */
-#define A_EMU32OUTH(x) (0xa0 + (x)) /* x = 0x00 - 0x0f "EMU32_OUT_10 - _1F" - ??? */
-#define A_EMU32OUTL(x) (0xb0 + (x)) /* x = 0x00 - 0x0f "EMU32_OUT_1 - _F" - ??? */
-#define A_GPR(x) (A_FXGPREGBASE + (x))
-
-/* cc_reg constants */
-#define CC_REG_NORMALIZED C_00000001
-#define CC_REG_BORROW C_00000002
-#define CC_REG_MINUS C_00000004
-#define CC_REG_ZERO C_00000008
-#define CC_REG_SATURATE C_00000010
-#define CC_REG_NONZERO C_00000100
-
-/* FX buses */
-#define FXBUS_PCM_LEFT 0x00
-#define FXBUS_PCM_RIGHT 0x01
-#define FXBUS_PCM_LEFT_REAR 0x02
-#define FXBUS_PCM_RIGHT_REAR 0x03
-#define FXBUS_MIDI_LEFT 0x04
-#define FXBUS_MIDI_RIGHT 0x05
-#define FXBUS_PCM_CENTER 0x06
-#define FXBUS_PCM_LFE 0x07
-#define FXBUS_PCM_LEFT_FRONT 0x08
-#define FXBUS_PCM_RIGHT_FRONT 0x09
-#define FXBUS_MIDI_REVERB 0x0c
-#define FXBUS_MIDI_CHORUS 0x0d
-#define FXBUS_PCM_LEFT_SIDE 0x0e
-#define FXBUS_PCM_RIGHT_SIDE 0x0f
-#define FXBUS_PT_LEFT 0x14
-#define FXBUS_PT_RIGHT 0x15
-
-/* Inputs */
-#define EXTIN_AC97_L 0x00 /* AC'97 capture channel - left */
-#define EXTIN_AC97_R 0x01 /* AC'97 capture channel - right */
-#define EXTIN_SPDIF_CD_L 0x02 /* internal S/PDIF CD - onboard - left */
-#define EXTIN_SPDIF_CD_R 0x03 /* internal S/PDIF CD - onboard - right */
-#define EXTIN_ZOOM_L 0x04 /* Zoom Video I2S - left */
-#define EXTIN_ZOOM_R 0x05 /* Zoom Video I2S - right */
-#define EXTIN_TOSLINK_L 0x06 /* LiveDrive - TOSLink Optical - left */
-#define EXTIN_TOSLINK_R 0x07 /* LiveDrive - TOSLink Optical - right */
-#define EXTIN_LINE1_L 0x08 /* LiveDrive - Line/Mic 1 - left */
-#define EXTIN_LINE1_R 0x09 /* LiveDrive - Line/Mic 1 - right */
-#define EXTIN_COAX_SPDIF_L 0x0a /* LiveDrive - Coaxial S/PDIF - left */
-#define EXTIN_COAX_SPDIF_R 0x0b /* LiveDrive - Coaxial S/PDIF - right */
-#define EXTIN_LINE2_L 0x0c /* LiveDrive - Line/Mic 2 - left */
-#define EXTIN_LINE2_R 0x0d /* LiveDrive - Line/Mic 2 - right */
-
-/* Outputs */
-#define EXTOUT_AC97_L 0x00 /* AC'97 playback channel - left */
-#define EXTOUT_AC97_R 0x01 /* AC'97 playback channel - right */
-#define EXTOUT_TOSLINK_L 0x02 /* LiveDrive - TOSLink Optical - left */
-#define EXTOUT_TOSLINK_R 0x03 /* LiveDrive - TOSLink Optical - right */
-#define EXTOUT_AC97_CENTER 0x04 /* SB Live 5.1 - center */
-#define EXTOUT_AC97_LFE 0x05 /* SB Live 5.1 - LFE */
-#define EXTOUT_HEADPHONE_L 0x06 /* LiveDrive - Headphone - left */
-#define EXTOUT_HEADPHONE_R 0x07 /* LiveDrive - Headphone - right */
-#define EXTOUT_REAR_L 0x08 /* Rear channel - left */
-#define EXTOUT_REAR_R 0x09 /* Rear channel - right */
-#define EXTOUT_ADC_CAP_L 0x0a /* ADC Capture buffer - left */
-#define EXTOUT_ADC_CAP_R 0x0b /* ADC Capture buffer - right */
-#define EXTOUT_MIC_CAP 0x0c /* MIC Capture buffer */
-#define EXTOUT_AC97_REAR_L 0x0d /* SB Live 5.1 (c) 2003 - Rear Left */
-#define EXTOUT_AC97_REAR_R 0x0e /* SB Live 5.1 (c) 2003 - Rear Right */
-#define EXTOUT_ACENTER 0x11 /* Analog Center */
-#define EXTOUT_ALFE 0x12 /* Analog LFE */
-
-/* Audigy Inputs */
-#define A_EXTIN_AC97_L 0x00 /* AC'97 capture channel - left */
-#define A_EXTIN_AC97_R 0x01 /* AC'97 capture channel - right */
-#define A_EXTIN_SPDIF_CD_L 0x02 /* digital CD left */
-#define A_EXTIN_SPDIF_CD_R 0x03 /* digital CD left */
-#define A_EXTIN_OPT_SPDIF_L 0x04 /* audigy drive Optical SPDIF - left */
-#define A_EXTIN_OPT_SPDIF_R 0x05 /* right */
-#define A_EXTIN_LINE2_L 0x08 /* audigy drive line2/mic2 - left */
-#define A_EXTIN_LINE2_R 0x09 /* right */
-#define A_EXTIN_ADC_L 0x0a /* Philips ADC - left */
-#define A_EXTIN_ADC_R 0x0b /* right */
-#define A_EXTIN_AUX2_L 0x0c /* audigy drive aux2 - left */
-#define A_EXTIN_AUX2_R 0x0d /* - right */
-
-/* Audigiy Outputs */
-#define A_EXTOUT_FRONT_L 0x00 /* digital front left */
-#define A_EXTOUT_FRONT_R 0x01 /* right */
-#define A_EXTOUT_CENTER 0x02 /* digital front center */
-#define A_EXTOUT_LFE 0x03 /* digital front lfe */
-#define A_EXTOUT_HEADPHONE_L 0x04 /* headphone audigy drive left */
-#define A_EXTOUT_HEADPHONE_R 0x05 /* right */
-#define A_EXTOUT_REAR_L 0x06 /* digital rear left */
-#define A_EXTOUT_REAR_R 0x07 /* right */
-#define A_EXTOUT_AFRONT_L 0x08 /* analog front left */
-#define A_EXTOUT_AFRONT_R 0x09 /* right */
-#define A_EXTOUT_ACENTER 0x0a /* analog center */
-#define A_EXTOUT_ALFE 0x0b /* analog LFE */
-#define A_EXTOUT_ASIDE_L 0x0c /* analog side left - Audigy 2 ZS */
-#define A_EXTOUT_ASIDE_R 0x0d /* right - Audigy 2 ZS */
-#define A_EXTOUT_AREAR_L 0x0e /* analog rear left */
-#define A_EXTOUT_AREAR_R 0x0f /* right */
-#define A_EXTOUT_AC97_L 0x10 /* AC97 left (front) */
-#define A_EXTOUT_AC97_R 0x11 /* right */
-#define A_EXTOUT_ADC_CAP_L 0x16 /* ADC capture buffer left */
-#define A_EXTOUT_ADC_CAP_R 0x17 /* right */
-#define A_EXTOUT_MIC_CAP 0x18 /* Mic capture buffer */
-
-/* Audigy constants */
-#define A_C_00000000 0xc0
-#define A_C_00000001 0xc1
-#define A_C_00000002 0xc2
-#define A_C_00000003 0xc3
-#define A_C_00000004 0xc4
-#define A_C_00000008 0xc5
-#define A_C_00000010 0xc6
-#define A_C_00000020 0xc7
-#define A_C_00000100 0xc8
-#define A_C_00010000 0xc9
-#define A_C_00000800 0xca
-#define A_C_10000000 0xcb
-#define A_C_20000000 0xcc
-#define A_C_40000000 0xcd
-#define A_C_80000000 0xce
-#define A_C_7fffffff 0xcf
-#define A_C_ffffffff 0xd0
-#define A_C_fffffffe 0xd1
-#define A_C_c0000000 0xd2
-#define A_C_4f1bbcdc 0xd3
-#define A_C_5a7ef9db 0xd4
-#define A_C_00100000 0xd5
-#define A_GPR_ACCU 0xd6 /* ACCUM, accumulator */
-#define A_GPR_COND 0xd7 /* CCR, condition register */
-#define A_GPR_NOISE0 0xd8 /* noise source */
-#define A_GPR_NOISE1 0xd9 /* noise source */
-#define A_GPR_IRQ 0xda /* IRQ register */
-#define A_GPR_DBAC 0xdb /* TRAM Delay Base Address Counter - internal */
-#define A_GPR_DBACE 0xde /* TRAM Delay Base Address Counter - external */
-
-/* definitions for debug register */
-#define EMU10K1_DBG_ZC 0x80000000 /* zero tram counter */
-#define EMU10K1_DBG_SATURATION_OCCURED 0x02000000 /* saturation control */
-#define EMU10K1_DBG_SATURATION_ADDR 0x01ff0000 /* saturation address */
-#define EMU10K1_DBG_SINGLE_STEP 0x00008000 /* single step mode */
-#define EMU10K1_DBG_STEP 0x00004000 /* start single step */
-#define EMU10K1_DBG_CONDITION_CODE 0x00003e00 /* condition code */
-#define EMU10K1_DBG_SINGLE_STEP_ADDR 0x000001ff /* single step address */
-
-/* tank memory address line */
-#ifndef __KERNEL__
-#define TANKMEMADDRREG_ADDR_MASK 0x000fffff /* 20 bit tank address field */
-#define TANKMEMADDRREG_CLEAR 0x00800000 /* Clear tank memory */
-#define TANKMEMADDRREG_ALIGN 0x00400000 /* Align read or write relative to tank access */
-#define TANKMEMADDRREG_WRITE 0x00200000 /* Write to tank memory */
-#define TANKMEMADDRREG_READ 0x00100000 /* Read from tank memory */
-#endif
-
-struct snd_emu10k1_fx8010_info {
- unsigned int internal_tram_size; /* in samples */
- unsigned int external_tram_size; /* in samples */
- char fxbus_names[16][32]; /* names of FXBUSes */
- char extin_names[16][32]; /* names of external inputs */
- char extout_names[32][32]; /* names of external outputs */
- unsigned int gpr_controls; /* count of GPR controls */
-};
-
-#define EMU10K1_GPR_TRANSLATION_NONE 0
-#define EMU10K1_GPR_TRANSLATION_TABLE100 1
-#define EMU10K1_GPR_TRANSLATION_BASS 2
-#define EMU10K1_GPR_TRANSLATION_TREBLE 3
-#define EMU10K1_GPR_TRANSLATION_ONOFF 4
-
-struct snd_emu10k1_fx8010_control_gpr {
- struct snd_ctl_elem_id id; /* full control ID definition */
- unsigned int vcount; /* visible count */
- unsigned int count; /* count of GPR (1..16) */
- unsigned short gpr[32]; /* GPR number(s) */
- unsigned int value[32]; /* initial values */
- unsigned int min; /* minimum range */
- unsigned int max; /* maximum range */
- unsigned int translation; /* translation type (EMU10K1_GPR_TRANSLATION*) */
-};
-
-struct snd_emu10k1_fx8010_code {
- char name[128];
-
- DECLARE_BITMAP(gpr_valid, 0x200); /* bitmask of valid initializers */
- u_int32_t __user *gpr_map; /* initializers */
-
- unsigned int gpr_add_control_count; /* count of GPR controls to add/replace */
- struct snd_emu10k1_fx8010_control_gpr __user *gpr_add_controls; /* GPR controls to add/replace */
-
- unsigned int gpr_del_control_count; /* count of GPR controls to remove */
- struct snd_ctl_elem_id __user *gpr_del_controls; /* IDs of GPR controls to remove */
-
- unsigned int gpr_list_control_count; /* count of GPR controls to list */
- unsigned int gpr_list_control_total; /* total count of GPR controls */
- struct snd_emu10k1_fx8010_control_gpr __user *gpr_list_controls; /* listed GPR controls */
-
- DECLARE_BITMAP(tram_valid, 0x100); /* bitmask of valid initializers */
- u_int32_t __user *tram_data_map; /* data initializers */
- u_int32_t __user *tram_addr_map; /* map initializers */
-
- DECLARE_BITMAP(code_valid, 1024); /* bitmask of valid instructions */
- u_int32_t __user *code; /* one instruction - 64 bits */
-};
-
-struct snd_emu10k1_fx8010_tram {
- unsigned int address; /* 31.bit == 1 -> external TRAM */
- unsigned int size; /* size in samples (4 bytes) */
- unsigned int *samples; /* pointer to samples (20-bit) */
- /* NULL->clear memory */
-};
-
-struct snd_emu10k1_fx8010_pcm_rec {
- unsigned int substream; /* substream number */
- unsigned int res1; /* reserved */
- unsigned int channels; /* 16-bit channels count, zero = remove this substream */
- unsigned int tram_start; /* ring buffer position in TRAM (in samples) */
- unsigned int buffer_size; /* count of buffered samples */
- unsigned short gpr_size; /* GPR containing size of ringbuffer in samples (host) */
- unsigned short gpr_ptr; /* GPR containing current pointer in the ring buffer (host = reset, FX8010) */
- unsigned short gpr_count; /* GPR containing count of samples between two interrupts (host) */
- unsigned short gpr_tmpcount; /* GPR containing current count of samples to interrupt (host = set, FX8010) */
- unsigned short gpr_trigger; /* GPR containing trigger (activate) information (host) */
- unsigned short gpr_running; /* GPR containing info if PCM is running (FX8010) */
- unsigned char pad; /* reserved */
- unsigned char etram[32]; /* external TRAM address & data (one per channel) */
- unsigned int res2; /* reserved */
-};
-
-#define SNDRV_EMU10K1_IOCTL_INFO _IOR ('H', 0x10, struct snd_emu10k1_fx8010_info)
-#define SNDRV_EMU10K1_IOCTL_CODE_POKE _IOW ('H', 0x11, struct snd_emu10k1_fx8010_code)
-#define SNDRV_EMU10K1_IOCTL_CODE_PEEK _IOWR('H', 0x12, struct snd_emu10k1_fx8010_code)
-#define SNDRV_EMU10K1_IOCTL_TRAM_SETUP _IOW ('H', 0x20, int)
-#define SNDRV_EMU10K1_IOCTL_TRAM_POKE _IOW ('H', 0x21, struct snd_emu10k1_fx8010_tram)
-#define SNDRV_EMU10K1_IOCTL_TRAM_PEEK _IOWR('H', 0x22, struct snd_emu10k1_fx8010_tram)
-#define SNDRV_EMU10K1_IOCTL_PCM_POKE _IOW ('H', 0x30, struct snd_emu10k1_fx8010_pcm_rec)
-#define SNDRV_EMU10K1_IOCTL_PCM_PEEK _IOWR('H', 0x31, struct snd_emu10k1_fx8010_pcm_rec)
-#define SNDRV_EMU10K1_IOCTL_STOP _IO ('H', 0x80)
-#define SNDRV_EMU10K1_IOCTL_CONTINUE _IO ('H', 0x81)
-#define SNDRV_EMU10K1_IOCTL_ZERO_TRAM_COUNTER _IO ('H', 0x82)
-#define SNDRV_EMU10K1_IOCTL_SINGLE_STEP _IOW ('H', 0x83, int)
-#define SNDRV_EMU10K1_IOCTL_DBG_READ _IOR ('H', 0x84, int)
-
-/* typedefs for compatibility to user-space */
-typedef struct snd_emu10k1_fx8010_info emu10k1_fx8010_info_t;
-typedef struct snd_emu10k1_fx8010_control_gpr emu10k1_fx8010_control_gpr_t;
-typedef struct snd_emu10k1_fx8010_code emu10k1_fx8010_code_t;
-typedef struct snd_emu10k1_fx8010_tram emu10k1_fx8010_tram_t;
-typedef struct snd_emu10k1_fx8010_pcm_rec emu10k1_fx8010_pcm_t;
-
-#endif /* __SOUND_EMU10K1_H */
diff --git a/sys/gnu/dev/sound/pci/maestro3_dsp.h b/sys/gnu/dev/sound/pci/maestro3_dsp.h
deleted file mode 100644
index 908abca5..0000000
--- a/sys/gnu/dev/sound/pci/maestro3_dsp.h
+++ /dev/null
@@ -1,214 +0,0 @@
-/* $FreeBSD$ */
-/*-
- * ESS Technology allegro audio driver.
- *
- * Copyright (C) 1992-2000 Don Kim (don.kim@esstech.com)
- *
- * 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.
- *
- * Hacked for the maestro3 driver by zab
- */
-
-/*
- * DSP Code images
- */
-
-u_int16_t assp_kernel_image[] = {
- 0x7980, 0x0030, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x00FB, 0x7980, 0x00DD, 0x7980, 0x03B4,
- 0x7980, 0x0332, 0x7980, 0x0287, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4,
- 0x7980, 0x031A, 0x7980, 0x03B4, 0x7980, 0x022F, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4,
- 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x0063, 0x7980, 0x006B, 0x7980, 0x03B4, 0x7980, 0x03B4,
- 0xBF80, 0x2C7C, 0x8806, 0x8804, 0xBE40, 0xBC20, 0xAE09, 0x1000, 0xAE0A, 0x0001, 0x6938, 0xEB08,
- 0x0053, 0x695A, 0xEB08, 0x00D6, 0x0009, 0x8B88, 0x6980, 0xE388, 0x0036, 0xBE30, 0xBC20, 0x6909,
- 0xB801, 0x9009, 0xBE41, 0xBE41, 0x6928, 0xEB88, 0x0078, 0xBE41, 0xBE40, 0x7980, 0x0038, 0xBE41,
- 0xBE41, 0x903A, 0x6938, 0xE308, 0x0056, 0x903A, 0xBE41, 0xBE40, 0xEF00, 0x903A, 0x6939, 0xE308,
- 0x005E, 0x903A, 0xEF00, 0x690B, 0x660C, 0xEF8C, 0x690A, 0x660C, 0x620B, 0x6609, 0xEF00, 0x6910,
- 0x660F, 0xEF04, 0xE388, 0x0075, 0x690E, 0x660F, 0x6210, 0x660D, 0xEF00, 0x690E, 0x660D, 0xEF00,
- 0xAE70, 0x0001, 0xBC20, 0xAE27, 0x0001, 0x6939, 0xEB08, 0x005D, 0x6926, 0xB801, 0x9026, 0x0026,
- 0x8B88, 0x6980, 0xE388, 0x00CB, 0x9028, 0x0D28, 0x4211, 0xE100, 0x007A, 0x4711, 0xE100, 0x00A0,
- 0x7A80, 0x0063, 0xB811, 0x660A, 0x6209, 0xE304, 0x007A, 0x0C0B, 0x4005, 0x100A, 0xBA01, 0x9012,
- 0x0C12, 0x4002, 0x7980, 0x00AF, 0x7A80, 0x006B, 0xBE02, 0x620E, 0x660D, 0xBA10, 0xE344, 0x007A,
- 0x0C10, 0x4005, 0x100E, 0xBA01, 0x9012, 0x0C12, 0x4002, 0x1003, 0xBA02, 0x9012, 0x0C12, 0x4000,
- 0x1003, 0xE388, 0x00BA, 0x1004, 0x7980, 0x00BC, 0x1004, 0xBA01, 0x9012, 0x0C12, 0x4001, 0x0C05,
- 0x4003, 0x0C06, 0x4004, 0x1011, 0xBFB0, 0x01FF, 0x9012, 0x0C12, 0x4006, 0xBC20, 0xEF00, 0xAE26,
- 0x1028, 0x6970, 0xBFD0, 0x0001, 0x9070, 0xE388, 0x007A, 0xAE28, 0x0000, 0xEF00, 0xAE70, 0x0300,
- 0x0C70, 0xB00C, 0xAE5A, 0x0000, 0xEF00, 0x7A80, 0x038A, 0x697F, 0xB801, 0x907F, 0x0056, 0x8B88,
- 0x0CA0, 0xB008, 0xAF71, 0xB000, 0x4E71, 0xE200, 0x00F3, 0xAE56, 0x1057, 0x0056, 0x0CA0, 0xB008,
- 0x8056, 0x7980, 0x03A1, 0x0810, 0xBFA0, 0x1059, 0xE304, 0x03A1, 0x8056, 0x7980, 0x03A1, 0x7A80,
- 0x038A, 0xBF01, 0xBE43, 0xBE59, 0x907C, 0x6937, 0xE388, 0x010D, 0xBA01, 0xE308, 0x010C, 0xAE71,
- 0x0004, 0x0C71, 0x5000, 0x6936, 0x9037, 0xBF0A, 0x109E, 0x8B8A, 0xAF80, 0x8014, 0x4C80, 0xBF0A,
- 0x0560, 0xF500, 0xBF0A, 0x0520, 0xB900, 0xBB17, 0x90A0, 0x6917, 0xE388, 0x0148, 0x0D17, 0xE100,
- 0x0127, 0xBF0C, 0x0578, 0xBF0D, 0x057C, 0x7980, 0x012B, 0xBF0C, 0x0538, 0xBF0D, 0x053C, 0x6900,
- 0xE308, 0x0135, 0x8B8C, 0xBE59, 0xBB07, 0x90A0, 0xBC20, 0x7980, 0x0157, 0x030C, 0x8B8B, 0xB903,
- 0x8809, 0xBEC6, 0x013E, 0x69AC, 0x90AB, 0x69AD, 0x90AB, 0x0813, 0x660A, 0xE344, 0x0144, 0x0309,
- 0x830C, 0xBC20, 0x7980, 0x0157, 0x6955, 0xE388, 0x0157, 0x7C38, 0xBF0B, 0x0578, 0xF500, 0xBF0B,
- 0x0538, 0xB907, 0x8809, 0xBEC6, 0x0156, 0x10AB, 0x90AA, 0x6974, 0xE388, 0x0163, 0xAE72, 0x0540,
- 0xF500, 0xAE72, 0x0500, 0xAE61, 0x103B, 0x7A80, 0x02F6, 0x6978, 0xE388, 0x0182, 0x8B8C, 0xBF0C,
- 0x0560, 0xE500, 0x7C40, 0x0814, 0xBA20, 0x8812, 0x733D, 0x7A80, 0x0380, 0x733E, 0x7A80, 0x0380,
- 0x8B8C, 0xBF0C, 0x056C, 0xE500, 0x7C40, 0x0814, 0xBA2C, 0x8812, 0x733F, 0x7A80, 0x0380, 0x7340,
- 0x7A80, 0x0380, 0x6975, 0xE388, 0x018E, 0xAE72, 0x0548, 0xF500, 0xAE72, 0x0508, 0xAE61, 0x1041,
- 0x7A80, 0x02F6, 0x6979, 0xE388, 0x01AD, 0x8B8C, 0xBF0C, 0x0560, 0xE500, 0x7C40, 0x0814, 0xBA18,
- 0x8812, 0x7343, 0x7A80, 0x0380, 0x7344, 0x7A80, 0x0380, 0x8B8C, 0xBF0C, 0x056C, 0xE500, 0x7C40,
- 0x0814, 0xBA24, 0x8812, 0x7345, 0x7A80, 0x0380, 0x7346, 0x7A80, 0x0380, 0x6976, 0xE388, 0x01B9,
- 0xAE72, 0x0558, 0xF500, 0xAE72, 0x0518, 0xAE61, 0x1047, 0x7A80, 0x02F6, 0x697A, 0xE388, 0x01D8,
- 0x8B8C, 0xBF0C, 0x0560, 0xE500, 0x7C40, 0x0814, 0xBA08, 0x8812, 0x7349, 0x7A80, 0x0380, 0x734A,
- 0x7A80, 0x0380, 0x8B8C, 0xBF0C, 0x056C, 0xE500, 0x7C40, 0x0814, 0xBA14, 0x8812, 0x734B, 0x7A80,
- 0x0380, 0x734C, 0x7A80, 0x0380, 0xBC21, 0xAE1C, 0x1090, 0x8B8A, 0xBF0A, 0x0560, 0xE500, 0x7C40,
- 0x0812, 0xB804, 0x8813, 0x8B8D, 0xBF0D, 0x056C, 0xE500, 0x7C40, 0x0815, 0xB804, 0x8811, 0x7A80,
- 0x034A, 0x8B8A, 0xBF0A, 0x0560, 0xE500, 0x7C40, 0x731F, 0xB903, 0x8809, 0xBEC6, 0x01F9, 0x548A,
- 0xBE03, 0x98A0, 0x7320, 0xB903, 0x8809, 0xBEC6, 0x0201, 0x548A, 0xBE03, 0x98A0, 0x1F20, 0x2F1F,
- 0x9826, 0xBC20, 0x6935, 0xE388, 0x03A1, 0x6933, 0xB801, 0x9033, 0xBFA0, 0x02EE, 0xE308, 0x03A1,
- 0x9033, 0xBF00, 0x6951, 0xE388, 0x021F, 0x7334, 0xBE80, 0x5760, 0xBE03, 0x9F7E, 0xBE59, 0x9034,
- 0x697E, 0x0D51, 0x9013, 0xBC20, 0x695C, 0xE388, 0x03A1, 0x735E, 0xBE80, 0x5760, 0xBE03, 0x9F7E,
- 0xBE59, 0x905E, 0x697E, 0x0D5C, 0x9013, 0x7980, 0x03A1, 0x7A80, 0x038A, 0xBF01, 0xBE43, 0x6977,
- 0xE388, 0x024E, 0xAE61, 0x104D, 0x0061, 0x8B88, 0x6980, 0xE388, 0x024E, 0x9071, 0x0D71, 0x000B,
- 0xAFA0, 0x8010, 0xAFA0, 0x8010, 0x0810, 0x660A, 0xE308, 0x0249, 0x0009, 0x0810, 0x660C, 0xE388,
- 0x024E, 0x800B, 0xBC20, 0x697B, 0xE388, 0x03A1, 0xBF0A, 0x109E, 0x8B8A, 0xAF80, 0x8014, 0x4C80,
- 0xE100, 0x0266, 0x697C, 0xBF90, 0x0560, 0x9072, 0x0372, 0x697C, 0xBF90, 0x0564, 0x9073, 0x0473,
- 0x7980, 0x0270, 0x697C, 0xBF90, 0x0520, 0x9072, 0x0372, 0x697C, 0xBF90, 0x0524, 0x9073, 0x0473,
- 0x697C, 0xB801, 0x907C, 0xBF0A, 0x10FD, 0x8B8A, 0xAF80, 0x8010, 0x734F, 0x548A, 0xBE03, 0x9880,
- 0xBC21, 0x7326, 0x548B, 0xBE03, 0x618B, 0x988C, 0xBE03, 0x6180, 0x9880, 0x7980, 0x03A1, 0x7A80,
- 0x038A, 0x0D28, 0x4711, 0xE100, 0x02BE, 0xAF12, 0x4006, 0x6912, 0xBFB0, 0x0C00, 0xE388, 0x02B6,
- 0xBFA0, 0x0800, 0xE388, 0x02B2, 0x6912, 0xBFB0, 0x0C00, 0xBFA0, 0x0400, 0xE388, 0x02A3, 0x6909,
- 0x900B, 0x7980, 0x02A5, 0xAF0B, 0x4005, 0x6901, 0x9005, 0x6902, 0x9006, 0x4311, 0xE100, 0x02ED,
- 0x6911, 0xBFC0, 0x2000, 0x9011, 0x7980, 0x02ED, 0x6909, 0x900B, 0x7980, 0x02B8, 0xAF0B, 0x4005,
- 0xAF05, 0x4003, 0xAF06, 0x4004, 0x7980, 0x02ED, 0xAF12, 0x4006, 0x6912, 0xBFB0, 0x0C00, 0xE388,
- 0x02E7, 0xBFA0, 0x0800, 0xE388, 0x02E3, 0x6912, 0xBFB0, 0x0C00, 0xBFA0, 0x0400, 0xE388, 0x02D4,
- 0x690D, 0x9010, 0x7980, 0x02D6, 0xAF10, 0x4005, 0x6901, 0x9005, 0x6902, 0x9006, 0x4311, 0xE100,
- 0x02ED, 0x6911, 0xBFC0, 0x2000, 0x9011, 0x7980, 0x02ED, 0x690D, 0x9010, 0x7980, 0x02E9, 0xAF10,
- 0x4005, 0xAF05, 0x4003, 0xAF06, 0x4004, 0xBC20, 0x6970, 0x9071, 0x7A80, 0x0078, 0x6971, 0x9070,
- 0x7980, 0x03A1, 0xBC20, 0x0361, 0x8B8B, 0x6980, 0xEF88, 0x0272, 0x0372, 0x7804, 0x9071, 0x0D71,
- 0x8B8A, 0x000B, 0xB903, 0x8809, 0xBEC6, 0x0309, 0x69A8, 0x90AB, 0x69A8, 0x90AA, 0x0810, 0x660A,
- 0xE344, 0x030F, 0x0009, 0x0810, 0x660C, 0xE388, 0x0314, 0x800B, 0xBC20, 0x6961, 0xB801, 0x9061,
- 0x7980, 0x02F7, 0x7A80, 0x038A, 0x5D35, 0x0001, 0x6934, 0xB801, 0x9034, 0xBF0A, 0x109E, 0x8B8A,
- 0xAF80, 0x8014, 0x4880, 0xAE72, 0x0550, 0xF500, 0xAE72, 0x0510, 0xAE61, 0x1051, 0x7A80, 0x02F6,
- 0x7980, 0x03A1, 0x7A80, 0x038A, 0x5D35, 0x0002, 0x695E, 0xB801, 0x905E, 0xBF0A, 0x109E, 0x8B8A,
- 0xAF80, 0x8014, 0x4780, 0xAE72, 0x0558, 0xF500, 0xAE72, 0x0518, 0xAE61, 0x105C, 0x7A80, 0x02F6,
- 0x7980, 0x03A1, 0x001C, 0x8B88, 0x6980, 0xEF88, 0x901D, 0x0D1D, 0x100F, 0x6610, 0xE38C, 0x0358,
- 0x690E, 0x6610, 0x620F, 0x660D, 0xBA0F, 0xE301, 0x037A, 0x0410, 0x8B8A, 0xB903, 0x8809, 0xBEC6,
- 0x036C, 0x6A8C, 0x61AA, 0x98AB, 0x6A8C, 0x61AB, 0x98AD, 0x6A8C, 0x61AD, 0x98A9, 0x6A8C, 0x61A9,
- 0x98AA, 0x7C04, 0x8B8B, 0x7C04, 0x8B8D, 0x7C04, 0x8B89, 0x7C04, 0x0814, 0x660E, 0xE308, 0x0379,
- 0x040D, 0x8410, 0xBC21, 0x691C, 0xB801, 0x901C, 0x7980, 0x034A, 0xB903, 0x8809, 0x8B8A, 0xBEC6,
- 0x0388, 0x54AC, 0xBE03, 0x618C, 0x98AA, 0xEF00, 0xBC20, 0xBE46, 0x0809, 0x906B, 0x080A, 0x906C,
- 0x080B, 0x906D, 0x081A, 0x9062, 0x081B, 0x9063, 0x081E, 0x9064, 0xBE59, 0x881E, 0x8065, 0x8166,
- 0x8267, 0x8368, 0x8469, 0x856A, 0xEF00, 0xBC20, 0x696B, 0x8809, 0x696C, 0x880A, 0x696D, 0x880B,
- 0x6962, 0x881A, 0x6963, 0x881B, 0x6964, 0x881E, 0x0065, 0x0166, 0x0267, 0x0368, 0x0469, 0x056A,
- 0xBE3A,
-};
-
-/*
- * Mini sample rate converter code image
- * that is to be loaded at 0x400 on the DSP.
- */
-u_int16_t assp_minisrc_image[] = {
- 0xBF80, 0x101E, 0x906E, 0x006E, 0x8B88, 0x6980, 0xEF88, 0x906F, 0x0D6F, 0x6900, 0xEB08, 0x0412,
- 0xBC20, 0x696E, 0xB801, 0x906E, 0x7980, 0x0403, 0xB90E, 0x8807, 0xBE43, 0xBF01, 0xBE47, 0xBE41,
- 0x7A80, 0x002A, 0xBE40, 0x3029, 0xEFCC, 0xBE41, 0x7A80, 0x0028, 0xBE40, 0x3028, 0xEFCC, 0x6907,
- 0xE308, 0x042A, 0x6909, 0x902C, 0x7980, 0x042C, 0x690D, 0x902C, 0x1009, 0x881A, 0x100A, 0xBA01,
- 0x881B, 0x100D, 0x881C, 0x100E, 0xBA01, 0x881D, 0xBF80, 0x00ED, 0x881E, 0x050C, 0x0124, 0xB904,
- 0x9027, 0x6918, 0xE308, 0x04B3, 0x902D, 0x6913, 0xBFA0, 0x7598, 0xF704, 0xAE2D, 0x00FF, 0x8B8D,
- 0x6919, 0xE308, 0x0463, 0x691A, 0xE308, 0x0456, 0xB907, 0x8809, 0xBEC6, 0x0453, 0x10A9, 0x90AD,
- 0x7980, 0x047C, 0xB903, 0x8809, 0xBEC6, 0x0460, 0x1889, 0x6C22, 0x90AD, 0x10A9, 0x6E23, 0x6C22,
- 0x90AD, 0x7980, 0x047C, 0x101A, 0xE308, 0x046F, 0xB903, 0x8809, 0xBEC6, 0x046C, 0x10A9, 0x90A0,
- 0x90AD, 0x7980, 0x047C, 0xB901, 0x8809, 0xBEC6, 0x047B, 0x1889, 0x6C22, 0x90A0, 0x90AD, 0x10A9,
- 0x6E23, 0x6C22, 0x90A0, 0x90AD, 0x692D, 0xE308, 0x049C, 0x0124, 0xB703, 0xB902, 0x8818, 0x8B89,
- 0x022C, 0x108A, 0x7C04, 0x90A0, 0x692B, 0x881F, 0x7E80, 0x055B, 0x692A, 0x8809, 0x8B89, 0x99A0,
- 0x108A, 0x90A0, 0x692B, 0x881F, 0x7E80, 0x055B, 0x692A, 0x8809, 0x8B89, 0x99AF, 0x7B99, 0x0484,
- 0x0124, 0x060F, 0x101B, 0x2013, 0x901B, 0xBFA0, 0x7FFF, 0xE344, 0x04AC, 0x901B, 0x8B89, 0x7A80,
- 0x051A, 0x6927, 0xBA01, 0x9027, 0x7A80, 0x0523, 0x6927, 0xE308, 0x049E, 0x7980, 0x050F, 0x0624,
- 0x1026, 0x2013, 0x9026, 0xBFA0, 0x7FFF, 0xE304, 0x04C0, 0x8B8D, 0x7A80, 0x051A, 0x7980, 0x04B4,
- 0x9026, 0x1013, 0x3026, 0x901B, 0x8B8D, 0x7A80, 0x051A, 0x7A80, 0x0523, 0x1027, 0xBA01, 0x9027,
- 0xE308, 0x04B4, 0x0124, 0x060F, 0x8B89, 0x691A, 0xE308, 0x04EA, 0x6919, 0xE388, 0x04E0, 0xB903,
- 0x8809, 0xBEC6, 0x04DD, 0x1FA0, 0x2FAE, 0x98A9, 0x7980, 0x050F, 0xB901, 0x8818, 0xB907, 0x8809,
- 0xBEC6, 0x04E7, 0x10EE, 0x90A9, 0x7980, 0x050F, 0x6919, 0xE308, 0x04FE, 0xB903, 0x8809, 0xBE46,
- 0xBEC6, 0x04FA, 0x17A0, 0xBE1E, 0x1FAE, 0xBFBF, 0xFF00, 0xBE13, 0xBFDF, 0x8080, 0x99A9, 0xBE47,
- 0x7980, 0x050F, 0xB901, 0x8809, 0xBEC6, 0x050E, 0x16A0, 0x26A0, 0xBFB7, 0xFF00, 0xBE1E, 0x1EA0,
- 0x2EAE, 0xBFBF, 0xFF00, 0xBE13, 0xBFDF, 0x8080, 0x99A9, 0x850C, 0x860F, 0x6907, 0xE388, 0x0516,
- 0x0D07, 0x8510, 0xBE59, 0x881E, 0xBE4A, 0xEF00, 0x101E, 0x901C, 0x101F, 0x901D, 0x10A0, 0x901E,
- 0x10A0, 0x901F, 0xEF00, 0x101E, 0x301C, 0x9020, 0x731B, 0x5420, 0xBE03, 0x9825, 0x1025, 0x201C,
- 0x9025, 0x7325, 0x5414, 0xBE03, 0x8B8E, 0x9880, 0x692F, 0xE388, 0x0539, 0xBE59, 0xBB07, 0x6180,
- 0x9880, 0x8BA0, 0x101F, 0x301D, 0x9021, 0x731B, 0x5421, 0xBE03, 0x982E, 0x102E, 0x201D, 0x902E,
- 0x732E, 0x5415, 0xBE03, 0x9880, 0x692F, 0xE388, 0x054F, 0xBE59, 0xBB07, 0x6180, 0x9880, 0x8BA0,
- 0x6918, 0xEF08, 0x7325, 0x5416, 0xBE03, 0x98A0, 0x732E, 0x5417, 0xBE03, 0x98A0, 0xEF00, 0x8BA0,
- 0xBEC6, 0x056B, 0xBE59, 0xBB04, 0xAA90, 0xBE04, 0xBE1E, 0x99E0, 0x8BE0, 0x69A0, 0x90D0, 0x69A0,
- 0x90D0, 0x081F, 0xB805, 0x881F, 0x8B90, 0x69A0, 0x90D0, 0x69A0, 0x9090, 0x8BD0, 0x8BD8, 0xBE1F,
- 0xEF00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-};
-
-u_int16_t minisrc_lpf_image[] = {
- 0X0743, 0X1104, 0X0A4C, 0XF88D, 0X242C,
- 0X1023, 0X1AA9, 0X0B60, 0XEFDD, 0X186F
-};
-
-/*
- * an arbitrary volume we set the internal volume settings to so that the
- * ac97 volume range is a little less insane. 0x7fff is max.
- */
-#define ARB_VOLUME 0x6800
-
-static struct play_vals {
- u_int16_t addr, val;
-} pv[] = {
- {CDATA_LEFT_VOLUME, ARB_VOLUME},
- {CDATA_RIGHT_VOLUME, ARB_VOLUME},
- {SRC3_DIRECTION_OFFSET, 0} ,
- /* +1, +2 are stereo/16 bit */
- {SRC3_DIRECTION_OFFSET + 3, 0x0000}, /* fraction? */
- {SRC3_DIRECTION_OFFSET + 4, 0}, /* first l */
- {SRC3_DIRECTION_OFFSET + 5, 0}, /* first r */
- {SRC3_DIRECTION_OFFSET + 6, 0}, /* second l */
- {SRC3_DIRECTION_OFFSET + 7, 0}, /* second r */
- {SRC3_DIRECTION_OFFSET + 8, 0}, /* delta l */
- {SRC3_DIRECTION_OFFSET + 9, 0}, /* delta r */
- {SRC3_DIRECTION_OFFSET + 10, 0x8000}, /* round */
- {SRC3_DIRECTION_OFFSET + 11, 0xFF00}, /* higher bute mark */
- {SRC3_DIRECTION_OFFSET + 13, 0}, /* temp0 */
- {SRC3_DIRECTION_OFFSET + 14, 0}, /* c fraction */
- {SRC3_DIRECTION_OFFSET + 15, 0}, /* counter */
- {SRC3_DIRECTION_OFFSET + 16, 8}, /* numin */
- {SRC3_DIRECTION_OFFSET + 17, 50*2}, /* numout */
- {SRC3_DIRECTION_OFFSET + 18, MINISRC_BIQUAD_STAGE - 1}, /* numstage */
- {SRC3_DIRECTION_OFFSET + 20, 0}, /* filtertap */
- {SRC3_DIRECTION_OFFSET + 21, 0} /* booster */
-};
-
-static struct rec_vals {
- u_int16_t addr, val;
-} rv[] = {
- {CDATA_LEFT_VOLUME, ARB_VOLUME},
- {CDATA_RIGHT_VOLUME, ARB_VOLUME},
- {SRC3_DIRECTION_OFFSET, 1},
- /* +1, +2 are stereo/16 bit */
- {SRC3_DIRECTION_OFFSET + 3, 0x0000}, /* fraction? */
- {SRC3_DIRECTION_OFFSET + 4, 0}, /* first l */
- {SRC3_DIRECTION_OFFSET + 5, 0}, /* first r */
- {SRC3_DIRECTION_OFFSET + 6, 0}, /* second l */
- {SRC3_DIRECTION_OFFSET + 7, 0}, /* second r */
- {SRC3_DIRECTION_OFFSET + 8, 0}, /* delta l */
- {SRC3_DIRECTION_OFFSET + 9, 0}, /* delta r */
- {SRC3_DIRECTION_OFFSET + 10, 0x8000}, /* round */
- {SRC3_DIRECTION_OFFSET + 11, 0xFF00}, /* higher bute mark */
- {SRC3_DIRECTION_OFFSET + 13, 0}, /* temp0 */
- {SRC3_DIRECTION_OFFSET + 14, 0}, /* c fraction */
- {SRC3_DIRECTION_OFFSET + 15, 0}, /* counter */
- {SRC3_DIRECTION_OFFSET + 16, 50},/* numin */
- {SRC3_DIRECTION_OFFSET + 17, 8}, /* numout */
- {SRC3_DIRECTION_OFFSET + 18, 0}, /* numstage */
- {SRC3_DIRECTION_OFFSET + 19, 0}, /* coef */
- {SRC3_DIRECTION_OFFSET + 20, 0}, /* filtertap */
- {SRC3_DIRECTION_OFFSET + 21, 0}, /* booster */
- {SRC3_DIRECTION_OFFSET + 22, 0xff} /* skip lpf */
-};
diff --git a/sys/gnu/dev/sound/pci/maestro3_reg.h b/sys/gnu/dev/sound/pci/maestro3_reg.h
deleted file mode 100644
index 2e60a1c..0000000
--- a/sys/gnu/dev/sound/pci/maestro3_reg.h
+++ /dev/null
@@ -1,692 +0,0 @@
-/* $FreeBSD$ */
-/*-
- * ESS Technology allegro audio driver.
- *
- * Copyright (C) 1992-2000 Don Kim (don.kim@esstech.com)
- *
- * 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.
- *
- * Hacked for the maestro3 driver by zab
- */
-
-/* Allegro PCI configuration registers */
-#define PCI_LEGACY_AUDIO_CTRL 0x40
-#define SOUND_BLASTER_ENABLE 0x00000001
-#define FM_SYNTHESIS_ENABLE 0x00000002
-#define GAME_PORT_ENABLE 0x00000004
-#define MPU401_IO_ENABLE 0x00000008
-#define MPU401_IRQ_ENABLE 0x00000010
-#define ALIAS_10BIT_IO 0x00000020
-#define SB_DMA_MASK 0x000000C0
-#define SB_DMA_0 0x00000040
-#define SB_DMA_1 0x00000040
-#define SB_DMA_R 0x00000080
-#define SB_DMA_3 0x000000C0
-#define SB_IRQ_MASK 0x00000700
-#define SB_IRQ_5 0x00000000
-#define SB_IRQ_7 0x00000100
-#define SB_IRQ_9 0x00000200
-#define SB_IRQ_10 0x00000300
-#define MIDI_IRQ_MASK 0x00003800
-#define SERIAL_IRQ_ENABLE 0x00004000
-#define DISABLE_LEGACY 0x00008000
-
-#define PCI_ALLEGRO_CONFIG 0x50
-#define SB_ADDR_240 0x00000004
-#define MPU_ADDR_MASK 0x00000018
-#define MPU_ADDR_330 0x00000000
-#define MPU_ADDR_300 0x00000008
-#define MPU_ADDR_320 0x00000010
-#define MPU_ADDR_340 0x00000018
-#define USE_PCI_TIMING 0x00000040
-#define POSTED_WRITE_ENABLE 0x00000080
-#define DMA_POLICY_MASK 0x00000700
-#define DMA_DDMA 0x00000000
-#define DMA_TDMA 0x00000100
-#define DMA_PCPCI 0x00000200
-#define DMA_WBDMA16 0x00000400
-#define DMA_WBDMA4 0x00000500
-#define DMA_WBDMA2 0x00000600
-#define DMA_WBDMA1 0x00000700
-#define DMA_SAFE_GUARD 0x00000800
-#define HI_PERF_GP_ENABLE 0x00001000
-#define PIC_SNOOP_MODE_0 0x00002000
-#define PIC_SNOOP_MODE_1 0x00004000
-#define SOUNDBLASTER_IRQ_MASK 0x00008000
-#define RING_IN_ENABLE 0x00010000
-#define SPDIF_TEST_MODE 0x00020000
-#define CLK_MULT_MODE_SELECT_2 0x00040000
-#define EEPROM_WRITE_ENABLE 0x00080000
-#define CODEC_DIR_IN 0x00100000
-#define HV_BUTTON_FROM_GD 0x00200000
-#define REDUCED_DEBOUNCE 0x00400000
-#define HV_CTRL_ENABLE 0x00800000
-#define SPDIF_ENABLE 0x01000000
-#define CLK_DIV_SELECT 0x06000000
-#define CLK_DIV_BY_48 0x00000000
-#define CLK_DIV_BY_49 0x02000000
-#define CLK_DIV_BY_50 0x04000000
-#define CLK_DIV_RESERVED 0x06000000
-#define PM_CTRL_ENABLE 0x08000000
-#define CLK_MULT_MODE_SELECT 0x30000000
-#define CLK_MULT_MODE_SHIFT 28
-#define CLK_MULT_MODE_0 0x00000000
-#define CLK_MULT_MODE_1 0x10000000
-#define CLK_MULT_MODE_2 0x20000000
-#define CLK_MULT_MODE_3 0x30000000
-#define INT_CLK_SELECT 0x40000000
-#define INT_CLK_MULT_RESET 0x80000000
-
-/* M3 */
-#define INT_CLK_SRC_NOT_PCI 0x00100000
-#define INT_CLK_MULT_ENABLE 0x80000000
-
-#define PCI_ACPI_CONTROL 0x54
-#define PCI_ACPI_D0 0x00000000
-#define PCI_ACPI_D1 0xB4F70000
-#define PCI_ACPI_D2 0xB4F7B4F7
-
-#define PCI_USER_CONFIG 0x58
-#define EXT_PCI_MASTER_ENABLE 0x00000001
-#define SPDIF_OUT_SELECT 0x00000002
-#define TEST_PIN_DIR_CTRL 0x00000004
-#define AC97_CODEC_TEST 0x00000020
-#define TRI_STATE_BUFFER 0x00000080
-#define IN_CLK_12MHZ_SELECT 0x00000100
-#define MULTI_FUNC_DISABLE 0x00000200
-#define EXT_MASTER_PAIR_SEL 0x00000400
-#define PCI_MASTER_SUPPORT 0x00000800
-#define STOP_CLOCK_ENABLE 0x00001000
-#define EAPD_DRIVE_ENABLE 0x00002000
-#define REQ_TRI_STATE_ENABLE 0x00004000
-#define REQ_LOW_ENABLE 0x00008000
-#define MIDI_1_ENABLE 0x00010000
-#define MIDI_2_ENABLE 0x00020000
-#define SB_AUDIO_SYNC 0x00040000
-#define HV_CTRL_TEST 0x00100000
-#define SOUNDBLASTER_TEST 0x00400000
-
-#define PCI_USER_CONFIG_C 0x5C
-
-#define PCI_DDMA_CTRL 0x60
-#define DDMA_ENABLE 0x00000001
-
-
-/* Allegro registers */
-#define HOST_INT_CTRL 0x18
-#define SB_INT_ENABLE 0x0001
-#define MPU401_INT_ENABLE 0x0002
-#define ASSP_INT_ENABLE 0x0010
-#define RING_INT_ENABLE 0x0020
-#define HV_INT_ENABLE 0x0040
-#define CLKRUN_GEN_ENABLE 0x0100
-#define HV_CTRL_TO_PME 0x0400
-#define SOFTWARE_RESET_ENABLE 0x8000
-
-/*
- * should be using the above defines, probably.
- */
-#define REGB_ENABLE_RESET 0x01
-#define REGB_STOP_CLOCK 0x10
-
-#define HOST_INT_STATUS 0x1A
-#define SB_INT_PENDING 0x01
-#define MPU401_INT_PENDING 0x02
-#define ASSP_INT_PENDING 0x10
-#define RING_INT_PENDING 0x20
-#define HV_INT_PENDING 0x40
-
-#define HARDWARE_VOL_CTRL 0x1B
-#define SHADOW_MIX_REG_VOICE 0x1C
-#define HW_VOL_COUNTER_VOICE 0x1D
-#define SHADOW_MIX_REG_MASTER 0x1E
-#define HW_VOL_COUNTER_MASTER 0x1F
-
-#define CODEC_COMMAND 0x30
-#define CODEC_READ_B 0x80
-
-#define CODEC_STATUS 0x30
-#define CODEC_BUSY_B 0x01
-
-#define CODEC_DATA 0x32
-
-#define RING_BUS_CTRL_A 0x36
-#define RAC_PME_ENABLE 0x0100
-#define RAC_SDFS_ENABLE 0x0200
-#define LAC_PME_ENABLE 0x0400
-#define LAC_SDFS_ENABLE 0x0800
-#define SERIAL_AC_LINK_ENABLE 0x1000
-#define IO_SRAM_ENABLE 0x2000
-#define IIS_INPUT_ENABLE 0x8000
-
-#define RING_BUS_CTRL_B 0x38
-#define SECOND_CODEC_ID_MASK 0x0003
-#define SPDIF_FUNC_ENABLE 0x0010
-#define SECOND_AC_ENABLE 0x0020
-#define SB_MODULE_INTF_ENABLE 0x0040
-#define SSPE_ENABLE 0x0040
-#define M3I_DOCK_ENABLE 0x0080
-
-#define SDO_OUT_DEST_CTRL 0x3A
-#define COMMAND_ADDR_OUT 0x0003
-#define PCM_LR_OUT_LOCAL 0x0000
-#define PCM_LR_OUT_REMOTE 0x0004
-#define PCM_LR_OUT_MUTE 0x0008
-#define PCM_LR_OUT_BOTH 0x000C
-#define LINE1_DAC_OUT_LOCAL 0x0000
-#define LINE1_DAC_OUT_REMOTE 0x0010
-#define LINE1_DAC_OUT_MUTE 0x0020
-#define LINE1_DAC_OUT_BOTH 0x0030
-#define PCM_CLS_OUT_LOCAL 0x0000
-#define PCM_CLS_OUT_REMOTE 0x0040
-#define PCM_CLS_OUT_MUTE 0x0080
-#define PCM_CLS_OUT_BOTH 0x00C0
-#define PCM_RLF_OUT_LOCAL 0x0000
-#define PCM_RLF_OUT_REMOTE 0x0100
-#define PCM_RLF_OUT_MUTE 0x0200
-#define PCM_RLF_OUT_BOTH 0x0300
-#define LINE2_DAC_OUT_LOCAL 0x0000
-#define LINE2_DAC_OUT_REMOTE 0x0400
-#define LINE2_DAC_OUT_MUTE 0x0800
-#define LINE2_DAC_OUT_BOTH 0x0C00
-#define HANDSET_OUT_LOCAL 0x0000
-#define HANDSET_OUT_REMOTE 0x1000
-#define HANDSET_OUT_MUTE 0x2000
-#define HANDSET_OUT_BOTH 0x3000
-#define IO_CTRL_OUT_LOCAL 0x0000
-#define IO_CTRL_OUT_REMOTE 0x4000
-#define IO_CTRL_OUT_MUTE 0x8000
-#define IO_CTRL_OUT_BOTH 0xC000
-
-#define SDO_IN_DEST_CTRL 0x3C
-#define STATUS_ADDR_IN 0x0003
-#define PCM_LR_IN_LOCAL 0x0000
-#define PCM_LR_IN_REMOTE 0x0004
-#define PCM_LR_RESERVED 0x0008
-#define PCM_LR_IN_BOTH 0x000C
-#define LINE1_ADC_IN_LOCAL 0x0000
-#define LINE1_ADC_IN_REMOTE 0x0010
-#define LINE1_ADC_IN_MUTE 0x0020
-#define MIC_ADC_IN_LOCAL 0x0000
-#define MIC_ADC_IN_REMOTE 0x0040
-#define MIC_ADC_IN_MUTE 0x0080
-#define LINE2_DAC_IN_LOCAL 0x0000
-#define LINE2_DAC_IN_REMOTE 0x0400
-#define LINE2_DAC_IN_MUTE 0x0800
-#define HANDSET_IN_LOCAL 0x0000
-#define HANDSET_IN_REMOTE 0x1000
-#define HANDSET_IN_MUTE 0x2000
-#define IO_STATUS_IN_LOCAL 0x0000
-#define IO_STATUS_IN_REMOTE 0x4000
-
-#define SPDIF_IN_CTRL 0x3E
-#define SPDIF_IN_ENABLE 0x0001
-
-#define GPIO_DATA 0x60
-#define GPIO_DATA_MASK 0x0FFF
-#define GPIO_HV_STATUS 0x3000
-#define GPIO_PME_STATUS 0x4000
-
-#define GPIO_MASK 0x64
-#define GPIO_DIRECTION 0x68
-#define GPO_PRIMARY_AC97 0x0001
-#define GPI_LINEOUT_SENSE 0x0004
-#define GPO_SECONDARY_AC97 0x0008
-#define GPI_VOL_DOWN 0x0010
-#define GPI_VOL_UP 0x0020
-#define GPI_IIS_CLK 0x0040
-#define GPI_IIS_LRCLK 0x0080
-#define GPI_IIS_DATA 0x0100
-#define GPI_DOCKING_STATUS 0x0100
-#define GPI_HEADPHONE_SENSE 0x0200
-#define GPO_EXT_AMP_SHUTDOWN 0x1000
-
-/* M3 */
-#define GPO_M3_EXT_AMP_SHUTDN 0x0002
-
-#define ASSP_INDEX_PORT 0x80
-#define ASSP_MEMORY_PORT 0x82
-#define ASSP_DATA_PORT 0x84
-
-#define MPU401_DATA_PORT 0x98
-#define MPU401_STATUS_PORT 0x99
-
-#define CLK_MULT_DATA_PORT 0x9C
-
-#define ASSP_CONTROL_A 0xA2
-#define ASSP_0_WS_ENABLE 0x01
-#define ASSP_CTRL_A_RESERVED1 0x02
-#define ASSP_CTRL_A_RESERVED2 0x04
-#define ASSP_CLK_49MHZ_SELECT 0x08
-#define FAST_PLU_ENABLE 0x10
-#define ASSP_CTRL_A_RESERVED3 0x20
-#define DSP_CLK_36MHZ_SELECT 0x40
-
-#define ASSP_CONTROL_B 0xA4
-#define RESET_ASSP 0x00
-#define RUN_ASSP 0x01
-#define ENABLE_ASSP_CLOCK 0x00
-#define STOP_ASSP_CLOCK 0x10
-#define RESET_TOGGLE 0x40
-
-#define ASSP_CONTROL_C 0xA6
-#define ASSP_HOST_INT_ENABLE 0x01
-#define FM_ADDR_REMAP_DISABLE 0x02
-#define HOST_WRITE_PORT_ENABLE 0x08
-
-#define ASSP_HOST_INT_STATUS 0xAC
-#define DSP2HOST_REQ_PIORECORD 0x01
-#define DSP2HOST_REQ_I2SRATE 0x02
-#define DSP2HOST_REQ_TIMER 0x04
-
-/* AC97 registers */
-/* XXX fix this crap up */
-/*#define AC97_RESET 0x00*/
-
-#define AC97_VOL_MUTE_B 0x8000
-#define AC97_VOL_M 0x1F
-#define AC97_LEFT_VOL_S 8
-
-#define AC97_MASTER_VOL 0x02
-#define AC97_LINE_LEVEL_VOL 0x04
-#define AC97_MASTER_MONO_VOL 0x06
-#define AC97_PC_BEEP_VOL 0x0A
-#define AC97_PC_BEEP_VOL_M 0x0F
-#define AC97_SROUND_MASTER_VOL 0x38
-#define AC97_PC_BEEP_VOL_S 1
-
-/*#define AC97_PHONE_VOL 0x0C
-#define AC97_MIC_VOL 0x0E*/
-#define AC97_MIC_20DB_ENABLE 0x40
-
-/*#define AC97_LINEIN_VOL 0x10
-#define AC97_CD_VOL 0x12
-#define AC97_VIDEO_VOL 0x14
-#define AC97_AUX_VOL 0x16*/
-#define AC97_PCM_OUT_VOL 0x18
-/*#define AC97_RECORD_SELECT 0x1A*/
-#define AC97_RECORD_MIC 0x00
-#define AC97_RECORD_CD 0x01
-#define AC97_RECORD_VIDEO 0x02
-#define AC97_RECORD_AUX 0x03
-#define AC97_RECORD_MONO_MUX 0x02
-#define AC97_RECORD_DIGITAL 0x03
-#define AC97_RECORD_LINE 0x04
-#define AC97_RECORD_STEREO 0x05
-#define AC97_RECORD_MONO 0x06
-#define AC97_RECORD_PHONE 0x07
-
-/*#define AC97_RECORD_GAIN 0x1C*/
-#define AC97_RECORD_VOL_M 0x0F
-
-/*#define AC97_GENERAL_PURPOSE 0x20*/
-#define AC97_POWER_DOWN_CTRL 0x26
-#define AC97_ADC_READY 0x0001
-#define AC97_DAC_READY 0x0002
-#define AC97_ANALOG_READY 0x0004
-#define AC97_VREF_ON 0x0008
-#define AC97_PR0 0x0100
-#define AC97_PR1 0x0200
-#define AC97_PR2 0x0400
-#define AC97_PR3 0x0800
-#define AC97_PR4 0x1000
-
-#define AC97_RESERVED1 0x28
-
-#define AC97_VENDOR_TEST 0x5A
-
-#define AC97_CLOCK_DELAY 0x5C
-#define AC97_LINEOUT_MUX_SEL 0x0001
-#define AC97_MONO_MUX_SEL 0x0002
-#define AC97_CLOCK_DELAY_SEL 0x1F
-#define AC97_DAC_CDS_SHIFT 6
-#define AC97_ADC_CDS_SHIFT 11
-
-#define AC97_MULTI_CHANNEL_SEL 0x74
-
-/*#define AC97_VENDOR_ID1 0x7C
-#define AC97_VENDOR_ID2 0x7E*/
-
-/*
- * ASSP control regs
- */
-#define DSP_PORT_TIMER_COUNT 0x06
-
-#define DSP_PORT_MEMORY_INDEX 0x80
-
-#define DSP_PORT_MEMORY_TYPE 0x82
-#define MEMTYPE_INTERNAL_CODE 0x0002
-#define MEMTYPE_INTERNAL_DATA 0x0003
-#define MEMTYPE_MASK 0x0003
-
-#define DSP_PORT_MEMORY_DATA 0x84
-
-#define DSP_PORT_CONTROL_REG_A 0xA2
-#define DSP_PORT_CONTROL_REG_B 0xA4
-#define DSP_PORT_CONTROL_REG_C 0xA6
-
-#define REV_A_CODE_MEMORY_BEGIN 0x0000
-#define REV_A_CODE_MEMORY_END 0x0FFF
-#define REV_A_CODE_MEMORY_UNIT_LENGTH 0x0040
-#define REV_A_CODE_MEMORY_LENGTH (REV_A_CODE_MEMORY_END - REV_A_CODE_MEMORY_BEGIN + 1)
-
-#define REV_B_CODE_MEMORY_BEGIN 0x0000
-#define REV_B_CODE_MEMORY_END 0x0BFF
-#define REV_B_CODE_MEMORY_UNIT_LENGTH 0x0040
-#define REV_B_CODE_MEMORY_LENGTH (REV_B_CODE_MEMORY_END - REV_B_CODE_MEMORY_BEGIN + 1)
-
-#define REV_A_DATA_MEMORY_BEGIN 0x1000
-#define REV_A_DATA_MEMORY_END 0x2FFF
-#define REV_A_DATA_MEMORY_UNIT_LENGTH 0x0080
-#define REV_A_DATA_MEMORY_LENGTH (REV_A_DATA_MEMORY_END - REV_A_DATA_MEMORY_BEGIN + 1)
-
-#define REV_B_DATA_MEMORY_BEGIN 0x1000
-#define REV_B_DATA_MEMORY_END 0x2BFF
-#define REV_B_DATA_MEMORY_UNIT_LENGTH 0x0080
-#define REV_B_DATA_MEMORY_LENGTH (REV_B_DATA_MEMORY_END - REV_B_DATA_MEMORY_BEGIN + 1)
-
-
-#define NUM_UNITS_KERNEL_CODE 16
-#define NUM_UNITS_KERNEL_DATA 2
-
-#define NUM_UNITS_KERNEL_CODE_WITH_HSP 16
-#define NUM_UNITS_KERNEL_DATA_WITH_HSP 5
-
-/*
- * Kernel data layout
- */
-
-#define DP_SHIFT_COUNT 7
-
-#define KDATA_BASE_ADDR 0x1000
-#define KDATA_BASE_ADDR2 0x1080
-
-#define KDATA_TASK0 (KDATA_BASE_ADDR + 0x0000)
-#define KDATA_TASK1 (KDATA_BASE_ADDR + 0x0001)
-#define KDATA_TASK2 (KDATA_BASE_ADDR + 0x0002)
-#define KDATA_TASK3 (KDATA_BASE_ADDR + 0x0003)
-#define KDATA_TASK4 (KDATA_BASE_ADDR + 0x0004)
-#define KDATA_TASK5 (KDATA_BASE_ADDR + 0x0005)
-#define KDATA_TASK6 (KDATA_BASE_ADDR + 0x0006)
-#define KDATA_TASK7 (KDATA_BASE_ADDR + 0x0007)
-#define KDATA_TASK_ENDMARK (KDATA_BASE_ADDR + 0x0008)
-
-#define KDATA_CURRENT_TASK (KDATA_BASE_ADDR + 0x0009)
-#define KDATA_TASK_SWITCH (KDATA_BASE_ADDR + 0x000A)
-
-#define KDATA_INSTANCE0_POS3D (KDATA_BASE_ADDR + 0x000B)
-#define KDATA_INSTANCE1_POS3D (KDATA_BASE_ADDR + 0x000C)
-#define KDATA_INSTANCE2_POS3D (KDATA_BASE_ADDR + 0x000D)
-#define KDATA_INSTANCE3_POS3D (KDATA_BASE_ADDR + 0x000E)
-#define KDATA_INSTANCE4_POS3D (KDATA_BASE_ADDR + 0x000F)
-#define KDATA_INSTANCE5_POS3D (KDATA_BASE_ADDR + 0x0010)
-#define KDATA_INSTANCE6_POS3D (KDATA_BASE_ADDR + 0x0011)
-#define KDATA_INSTANCE7_POS3D (KDATA_BASE_ADDR + 0x0012)
-#define KDATA_INSTANCE8_POS3D (KDATA_BASE_ADDR + 0x0013)
-#define KDATA_INSTANCE_POS3D_ENDMARK (KDATA_BASE_ADDR + 0x0014)
-
-#define KDATA_INSTANCE0_SPKVIRT (KDATA_BASE_ADDR + 0x0015)
-#define KDATA_INSTANCE_SPKVIRT_ENDMARK (KDATA_BASE_ADDR + 0x0016)
-
-#define KDATA_INSTANCE0_SPDIF (KDATA_BASE_ADDR + 0x0017)
-#define KDATA_INSTANCE_SPDIF_ENDMARK (KDATA_BASE_ADDR + 0x0018)
-
-#define KDATA_INSTANCE0_MODEM (KDATA_BASE_ADDR + 0x0019)
-#define KDATA_INSTANCE_MODEM_ENDMARK (KDATA_BASE_ADDR + 0x001A)
-
-#define KDATA_INSTANCE0_SRC (KDATA_BASE_ADDR + 0x001B)
-#define KDATA_INSTANCE1_SRC (KDATA_BASE_ADDR + 0x001C)
-#define KDATA_INSTANCE_SRC_ENDMARK (KDATA_BASE_ADDR + 0x001D)
-
-#define KDATA_INSTANCE0_MINISRC (KDATA_BASE_ADDR + 0x001E)
-#define KDATA_INSTANCE1_MINISRC (KDATA_BASE_ADDR + 0x001F)
-#define KDATA_INSTANCE2_MINISRC (KDATA_BASE_ADDR + 0x0020)
-#define KDATA_INSTANCE3_MINISRC (KDATA_BASE_ADDR + 0x0021)
-#define KDATA_INSTANCE_MINISRC_ENDMARK (KDATA_BASE_ADDR + 0x0022)
-
-#define KDATA_INSTANCE0_CPYTHRU (KDATA_BASE_ADDR + 0x0023)
-#define KDATA_INSTANCE1_CPYTHRU (KDATA_BASE_ADDR + 0x0024)
-#define KDATA_INSTANCE_CPYTHRU_ENDMARK (KDATA_BASE_ADDR + 0x0025)
-
-#define KDATA_CURRENT_DMA (KDATA_BASE_ADDR + 0x0026)
-#define KDATA_DMA_SWITCH (KDATA_BASE_ADDR + 0x0027)
-#define KDATA_DMA_ACTIVE (KDATA_BASE_ADDR + 0x0028)
-
-#define KDATA_DMA_XFER0 (KDATA_BASE_ADDR + 0x0029)
-#define KDATA_DMA_XFER1 (KDATA_BASE_ADDR + 0x002A)
-#define KDATA_DMA_XFER2 (KDATA_BASE_ADDR + 0x002B)
-#define KDATA_DMA_XFER3 (KDATA_BASE_ADDR + 0x002C)
-#define KDATA_DMA_XFER4 (KDATA_BASE_ADDR + 0x002D)
-#define KDATA_DMA_XFER5 (KDATA_BASE_ADDR + 0x002E)
-#define KDATA_DMA_XFER6 (KDATA_BASE_ADDR + 0x002F)
-#define KDATA_DMA_XFER7 (KDATA_BASE_ADDR + 0x0030)
-#define KDATA_DMA_XFER8 (KDATA_BASE_ADDR + 0x0031)
-#define KDATA_DMA_XFER_ENDMARK (KDATA_BASE_ADDR + 0x0032)
-
-#define KDATA_I2S_SAMPLE_COUNT (KDATA_BASE_ADDR + 0x0033)
-#define KDATA_I2S_INT_METER (KDATA_BASE_ADDR + 0x0034)
-#define KDATA_I2S_ACTIVE (KDATA_BASE_ADDR + 0x0035)
-
-#define KDATA_TIMER_COUNT_RELOAD (KDATA_BASE_ADDR + 0x0036)
-#define KDATA_TIMER_COUNT_CURRENT (KDATA_BASE_ADDR + 0x0037)
-
-#define KDATA_HALT_SYNCH_CLIENT (KDATA_BASE_ADDR + 0x0038)
-#define KDATA_HALT_SYNCH_DMA (KDATA_BASE_ADDR + 0x0039)
-#define KDATA_HALT_ACKNOWLEDGE (KDATA_BASE_ADDR + 0x003A)
-
-#define KDATA_ADC1_XFER0 (KDATA_BASE_ADDR + 0x003B)
-#define KDATA_ADC1_XFER_ENDMARK (KDATA_BASE_ADDR + 0x003C)
-#define KDATA_ADC1_LEFT_VOLUME (KDATA_BASE_ADDR + 0x003D)
-#define KDATA_ADC1_RIGHT_VOLUME (KDATA_BASE_ADDR + 0x003E)
-#define KDATA_ADC1_LEFT_SUR_VOL (KDATA_BASE_ADDR + 0x003F)
-#define KDATA_ADC1_RIGHT_SUR_VOL (KDATA_BASE_ADDR + 0x0040)
-
-#define KDATA_ADC2_XFER0 (KDATA_BASE_ADDR + 0x0041)
-#define KDATA_ADC2_XFER_ENDMARK (KDATA_BASE_ADDR + 0x0042)
-#define KDATA_ADC2_LEFT_VOLUME (KDATA_BASE_ADDR + 0x0043)
-#define KDATA_ADC2_RIGHT_VOLUME (KDATA_BASE_ADDR + 0x0044)
-#define KDATA_ADC2_LEFT_SUR_VOL (KDATA_BASE_ADDR + 0x0045)
-#define KDATA_ADC2_RIGHT_SUR_VOL (KDATA_BASE_ADDR + 0x0046)
-
-#define KDATA_CD_XFER0 (KDATA_BASE_ADDR + 0x0047)
-#define KDATA_CD_XFER_ENDMARK (KDATA_BASE_ADDR + 0x0048)
-#define KDATA_CD_LEFT_VOLUME (KDATA_BASE_ADDR + 0x0049)
-#define KDATA_CD_RIGHT_VOLUME (KDATA_BASE_ADDR + 0x004A)
-#define KDATA_CD_LEFT_SUR_VOL (KDATA_BASE_ADDR + 0x004B)
-#define KDATA_CD_RIGHT_SUR_VOL (KDATA_BASE_ADDR + 0x004C)
-
-#define KDATA_MIC_XFER0 (KDATA_BASE_ADDR + 0x004D)
-#define KDATA_MIC_XFER_ENDMARK (KDATA_BASE_ADDR + 0x004E)
-#define KDATA_MIC_VOLUME (KDATA_BASE_ADDR + 0x004F)
-#define KDATA_MIC_SUR_VOL (KDATA_BASE_ADDR + 0x0050)
-
-#define KDATA_I2S_XFER0 (KDATA_BASE_ADDR + 0x0051)
-#define KDATA_I2S_XFER_ENDMARK (KDATA_BASE_ADDR + 0x0052)
-
-#define KDATA_CHI_XFER0 (KDATA_BASE_ADDR + 0x0053)
-#define KDATA_CHI_XFER_ENDMARK (KDATA_BASE_ADDR + 0x0054)
-
-#define KDATA_SPDIF_XFER (KDATA_BASE_ADDR + 0x0055)
-#define KDATA_SPDIF_CURRENT_FRAME (KDATA_BASE_ADDR + 0x0056)
-#define KDATA_SPDIF_FRAME0 (KDATA_BASE_ADDR + 0x0057)
-#define KDATA_SPDIF_FRAME1 (KDATA_BASE_ADDR + 0x0058)
-#define KDATA_SPDIF_FRAME2 (KDATA_BASE_ADDR + 0x0059)
-
-#define KDATA_SPDIF_REQUEST (KDATA_BASE_ADDR + 0x005A)
-#define KDATA_SPDIF_TEMP (KDATA_BASE_ADDR + 0x005B)
-
-#define KDATA_SPDIFIN_XFER0 (KDATA_BASE_ADDR + 0x005C)
-#define KDATA_SPDIFIN_XFER_ENDMARK (KDATA_BASE_ADDR + 0x005D)
-#define KDATA_SPDIFIN_INT_METER (KDATA_BASE_ADDR + 0x005E)
-
-#define KDATA_DSP_RESET_COUNT (KDATA_BASE_ADDR + 0x005F)
-#define KDATA_DEBUG_OUTPUT (KDATA_BASE_ADDR + 0x0060)
-
-#define KDATA_KERNEL_ISR_LIST (KDATA_BASE_ADDR + 0x0061)
-
-#define KDATA_KERNEL_ISR_CBSR1 (KDATA_BASE_ADDR + 0x0062)
-#define KDATA_KERNEL_ISR_CBER1 (KDATA_BASE_ADDR + 0x0063)
-#define KDATA_KERNEL_ISR_CBCR (KDATA_BASE_ADDR + 0x0064)
-#define KDATA_KERNEL_ISR_AR0 (KDATA_BASE_ADDR + 0x0065)
-#define KDATA_KERNEL_ISR_AR1 (KDATA_BASE_ADDR + 0x0066)
-#define KDATA_KERNEL_ISR_AR2 (KDATA_BASE_ADDR + 0x0067)
-#define KDATA_KERNEL_ISR_AR3 (KDATA_BASE_ADDR + 0x0068)
-#define KDATA_KERNEL_ISR_AR4 (KDATA_BASE_ADDR + 0x0069)
-#define KDATA_KERNEL_ISR_AR5 (KDATA_BASE_ADDR + 0x006A)
-#define KDATA_KERNEL_ISR_BRCR (KDATA_BASE_ADDR + 0x006B)
-#define KDATA_KERNEL_ISR_PASR (KDATA_BASE_ADDR + 0x006C)
-#define KDATA_KERNEL_ISR_PAER (KDATA_BASE_ADDR + 0x006D)
-
-#define KDATA_CLIENT_SCRATCH0 (KDATA_BASE_ADDR + 0x006E)
-#define KDATA_CLIENT_SCRATCH1 (KDATA_BASE_ADDR + 0x006F)
-#define KDATA_KERNEL_SCRATCH (KDATA_BASE_ADDR + 0x0070)
-#define KDATA_KERNEL_ISR_SCRATCH (KDATA_BASE_ADDR + 0x0071)
-
-#define KDATA_OUEUE_LEFT (KDATA_BASE_ADDR + 0x0072)
-#define KDATA_QUEUE_RIGHT (KDATA_BASE_ADDR + 0x0073)
-
-#define KDATA_ADC1_REQUEST (KDATA_BASE_ADDR + 0x0074)
-#define KDATA_ADC2_REQUEST (KDATA_BASE_ADDR + 0x0075)
-#define KDATA_CD_REQUEST (KDATA_BASE_ADDR + 0x0076)
-#define KDATA_MIC_REQUEST (KDATA_BASE_ADDR + 0x0077)
-
-#define KDATA_ADC1_MIXER_REQUEST (KDATA_BASE_ADDR + 0x0078)
-#define KDATA_ADC2_MIXER_REQUEST (KDATA_BASE_ADDR + 0x0079)
-#define KDATA_CD_MIXER_REQUEST (KDATA_BASE_ADDR + 0x007A)
-#define KDATA_MIC_MIXER_REQUEST (KDATA_BASE_ADDR + 0x007B)
-#define KDATA_MIC_SYNC_COUNTER (KDATA_BASE_ADDR + 0x007C)
-
-/*
- * second 'segment' (?) reserved for mixer
- * buffers..
- */
-
-#define KDATA_MIXER_WORD0 (KDATA_BASE_ADDR2 + 0x0000)
-#define KDATA_MIXER_WORD1 (KDATA_BASE_ADDR2 + 0x0001)
-#define KDATA_MIXER_WORD2 (KDATA_BASE_ADDR2 + 0x0002)
-#define KDATA_MIXER_WORD3 (KDATA_BASE_ADDR2 + 0x0003)
-#define KDATA_MIXER_WORD4 (KDATA_BASE_ADDR2 + 0x0004)
-#define KDATA_MIXER_WORD5 (KDATA_BASE_ADDR2 + 0x0005)
-#define KDATA_MIXER_WORD6 (KDATA_BASE_ADDR2 + 0x0006)
-#define KDATA_MIXER_WORD7 (KDATA_BASE_ADDR2 + 0x0007)
-#define KDATA_MIXER_WORD8 (KDATA_BASE_ADDR2 + 0x0008)
-#define KDATA_MIXER_WORD9 (KDATA_BASE_ADDR2 + 0x0009)
-#define KDATA_MIXER_WORDA (KDATA_BASE_ADDR2 + 0x000A)
-#define KDATA_MIXER_WORDB (KDATA_BASE_ADDR2 + 0x000B)
-#define KDATA_MIXER_WORDC (KDATA_BASE_ADDR2 + 0x000C)
-#define KDATA_MIXER_WORDD (KDATA_BASE_ADDR2 + 0x000D)
-#define KDATA_MIXER_WORDE (KDATA_BASE_ADDR2 + 0x000E)
-#define KDATA_MIXER_WORDF (KDATA_BASE_ADDR2 + 0x000F)
-
-#define KDATA_MIXER_XFER0 (KDATA_BASE_ADDR2 + 0x0010)
-#define KDATA_MIXER_XFER1 (KDATA_BASE_ADDR2 + 0x0011)
-#define KDATA_MIXER_XFER2 (KDATA_BASE_ADDR2 + 0x0012)
-#define KDATA_MIXER_XFER3 (KDATA_BASE_ADDR2 + 0x0013)
-#define KDATA_MIXER_XFER4 (KDATA_BASE_ADDR2 + 0x0014)
-#define KDATA_MIXER_XFER5 (KDATA_BASE_ADDR2 + 0x0015)
-#define KDATA_MIXER_XFER6 (KDATA_BASE_ADDR2 + 0x0016)
-#define KDATA_MIXER_XFER7 (KDATA_BASE_ADDR2 + 0x0017)
-#define KDATA_MIXER_XFER8 (KDATA_BASE_ADDR2 + 0x0018)
-#define KDATA_MIXER_XFER9 (KDATA_BASE_ADDR2 + 0x0019)
-#define KDATA_MIXER_XFER_ENDMARK (KDATA_BASE_ADDR2 + 0x001A)
-
-#define KDATA_MIXER_TASK_NUMBER (KDATA_BASE_ADDR2 + 0x001B)
-#define KDATA_CURRENT_MIXER (KDATA_BASE_ADDR2 + 0x001C)
-#define KDATA_MIXER_ACTIVE (KDATA_BASE_ADDR2 + 0x001D)
-#define KDATA_MIXER_BANK_STATUS (KDATA_BASE_ADDR2 + 0x001E)
-#define KDATA_DAC_LEFT_VOLUME (KDATA_BASE_ADDR2 + 0x001F)
-#define KDATA_DAC_RIGHT_VOLUME (KDATA_BASE_ADDR2 + 0x0020)
-
-#define MAX_INSTANCE_MINISRC (KDATA_INSTANCE_MINISRC_ENDMARK - KDATA_INSTANCE0_MINISRC)
-#define MAX_VIRTUAL_DMA_CHANNELS (KDATA_DMA_XFER_ENDMARK - KDATA_DMA_XFER0)
-#define MAX_VIRTUAL_MIXER_CHANNELS (KDATA_MIXER_XFER_ENDMARK - KDATA_MIXER_XFER0)
-#define MAX_VIRTUAL_ADC1_CHANNELS (KDATA_ADC1_XFER_ENDMARK - KDATA_ADC1_XFER0)
-
-/*
- * client data area offsets
- */
-#define CDATA_INSTANCE_READY 0x00
-
-#define CDATA_HOST_SRC_ADDRL 0x01
-#define CDATA_HOST_SRC_ADDRH 0x02
-#define CDATA_HOST_SRC_END_PLUS_1L 0x03
-#define CDATA_HOST_SRC_END_PLUS_1H 0x04
-#define CDATA_HOST_SRC_CURRENTL 0x05
-#define CDATA_HOST_SRC_CURRENTH 0x06
-
-#define CDATA_IN_BUF_CONNECT 0x07
-#define CDATA_OUT_BUF_CONNECT 0x08
-
-#define CDATA_IN_BUF_BEGIN 0x09
-#define CDATA_IN_BUF_END_PLUS_1 0x0A
-#define CDATA_IN_BUF_HEAD 0x0B
-#define CDATA_IN_BUF_TAIL 0x0C
-#define CDATA_OUT_BUF_BEGIN 0x0D
-#define CDATA_OUT_BUF_END_PLUS_1 0x0E
-#define CDATA_OUT_BUF_HEAD 0x0F
-#define CDATA_OUT_BUF_TAIL 0x10
-
-#define CDATA_DMA_CONTROL 0x11
-#define CDATA_RESERVED 0x12
-
-#define CDATA_FREQUENCY 0x13
-#define CDATA_LEFT_VOLUME 0x14
-#define CDATA_RIGHT_VOLUME 0x15
-#define CDATA_LEFT_SUR_VOL 0x16
-#define CDATA_RIGHT_SUR_VOL 0x17
-
-#define CDATA_HEADER_LEN 0x18
-
-#define SRC3_DIRECTION_OFFSET CDATA_HEADER_LEN
-#define SRC3_MODE_OFFSET (CDATA_HEADER_LEN + 1)
-#define SRC3_WORD_LENGTH_OFFSET (CDATA_HEADER_LEN + 2)
-#define SRC3_PARAMETER_OFFSET (CDATA_HEADER_LEN + 3)
-#define SRC3_COEFF_ADDR_OFFSET (CDATA_HEADER_LEN + 8)
-#define SRC3_FILTAP_ADDR_OFFSET (CDATA_HEADER_LEN + 10)
-#define SRC3_TEMP_INBUF_ADDR_OFFSET (CDATA_HEADER_LEN + 16)
-#define SRC3_TEMP_OUTBUF_ADDR_OFFSET (CDATA_HEADER_LEN + 17)
-
-#define MINISRC_IN_BUFFER_SIZE ( 0x50 * 2 )
-#define MINISRC_OUT_BUFFER_SIZE ( 0x50 * 2 * 2)
-#define MINISRC_OUT_BUFFER_SIZE ( 0x50 * 2 * 2)
-#define MINISRC_TMP_BUFFER_SIZE ( 112 + ( MINISRC_BIQUAD_STAGE * 3 + 4 ) * 2 * 2 )
-#define MINISRC_BIQUAD_STAGE 2
-#define MINISRC_COEF_LOC 0X175
-
-#define DMACONTROL_BLOCK_MASK 0x000F
-#define DMAC_BLOCK0_SELECTOR 0x0000
-#define DMAC_BLOCK1_SELECTOR 0x0001
-#define DMAC_BLOCK2_SELECTOR 0x0002
-#define DMAC_BLOCK3_SELECTOR 0x0003
-#define DMAC_BLOCK4_SELECTOR 0x0004
-#define DMAC_BLOCK5_SELECTOR 0x0005
-#define DMAC_BLOCK6_SELECTOR 0x0006
-#define DMAC_BLOCK7_SELECTOR 0x0007
-#define DMAC_BLOCK8_SELECTOR 0x0008
-#define DMAC_BLOCK9_SELECTOR 0x0009
-#define DMAC_BLOCKA_SELECTOR 0x000A
-#define DMAC_BLOCKB_SELECTOR 0x000B
-#define DMAC_BLOCKC_SELECTOR 0x000C
-#define DMAC_BLOCKD_SELECTOR 0x000D
-#define DMAC_BLOCKE_SELECTOR 0x000E
-#define DMAC_BLOCKF_SELECTOR 0x000F
-#define DMACONTROL_PAGE_MASK 0x00F0
-#define DMAC_PAGE0_SELECTOR 0x0030
-#define DMAC_PAGE1_SELECTOR 0x0020
-#define DMAC_PAGE2_SELECTOR 0x0010
-#define DMAC_PAGE3_SELECTOR 0x0000
-#define DMACONTROL_AUTOREPEAT 0x1000
-#define DMACONTROL_STOPPED 0x2000
-#define DMACONTROL_DIRECTION 0x0100
diff --git a/sys/gnu/dev/sound/pci/p16v-alsa.h b/sys/gnu/dev/sound/pci/p16v-alsa.h
deleted file mode 100644
index 0f9f8e8..0000000
--- a/sys/gnu/dev/sound/pci/p16v-alsa.h
+++ /dev/null
@@ -1,301 +0,0 @@
-/*-
- * Copyright (c) by James Courtier-Dutton <James@superbug.demon.co.uk>
- * Driver p16v chips
- * Version: 0.21
- *
- * FEATURES currently supported:
- * Output fixed at S32_LE, 2 channel to hw:0,0
- * Rates: 44.1, 48, 96, 192.
- *
- * Changelog:
- * 0.8
- * Use separate card based buffer for periods table.
- * 0.9
- * Use 2 channel output streams instead of 8 channel.
- * (8 channel output streams might be good for ASIO type output)
- * Corrected speaker output, so Front -> Front etc.
- * 0.10
- * Fixed missed interrupts.
- * 0.11
- * Add Sound card model number and names.
- * Add Analog volume controls.
- * 0.12
- * Corrected playback interrupts. Now interrupt per period, instead of half period.
- * 0.13
- * Use single trigger for multichannel.
- * 0.14
- * Mic capture now works at fixed: S32_LE, 96000Hz, Stereo.
- * 0.15
- * Force buffer_size / period_size == INTEGER.
- * 0.16
- * Update p16v.c to work with changed alsa api.
- * 0.17
- * Update p16v.c to work with changed alsa api. Removed boot_devs.
- * 0.18
- * Merging with snd-emu10k1 driver.
- * 0.19
- * One stereo channel at 24bit now works.
- * 0.20
- * Added better register defines.
- * 0.21
- * Split from p16v.c
- *
- *
- * BUGS:
- * Some stability problems when unloading the snd-p16v kernel module.
- * --
- *
- * TODO:
- * SPDIF out.
- * Find out how to change capture sample rates. E.g. To record SPDIF at 48000Hz.
- * Currently capture fixed at 48000Hz.
- *
- * --
- * GENERAL INFO:
- * Model: SB0240
- * P16V Chip: CA0151-DBS
- * Audigy 2 Chip: CA0102-IAT
- * AC97 Codec: STAC 9721
- * ADC: Philips 1361T (Stereo 24bit)
- * DAC: CS4382-K (8-channel, 24bit, 192Khz)
- *
- * This code was initally based on code from ALSA's emu10k1x.c which is:
- * Copyright (c) by Francisco Moraes <fmoraes@nc.rr.com>
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-
-/* $FreeBSD$ */
-
-/********************************************************************************************************/
-/* Audigy2 P16V pointer-offset register set, accessed through the PTR2 and DATA2 registers */
-/********************************************************************************************************/
-
-/* The sample rate of the SPDIF outputs is set by modifying a register in the EMU10K2 PTR register A_SPDIF_SAMPLERATE.
- * The sample rate is also controlled by the same registers that control the rate of the EMU10K2 sample rate converters.
- */
-
-/* Initally all registers from 0x00 to 0x3f have zero contents. */
-#define PLAYBACK_LIST_ADDR 0x00 /* Base DMA address of a list of pointers to each period/size */
- /* One list entry: 4 bytes for DMA address,
- * 4 bytes for period_size << 16.
- * One list entry is 8 bytes long.
- * One list entry for each period in the buffer.
- */
-#define PLAYBACK_LIST_SIZE 0x01 /* Size of list in bytes << 16. E.g. 8 periods -> 0x00380000 */
-#define PLAYBACK_LIST_PTR 0x02 /* Pointer to the current period being played */
-#define PLAYBACK_UNKNOWN3 0x03 /* Not used */
-#define PLAYBACK_DMA_ADDR 0x04 /* Playback DMA addresss */
-#define PLAYBACK_PERIOD_SIZE 0x05 /* Playback period size. win2000 uses 0x04000000 */
-#define PLAYBACK_POINTER 0x06 /* Playback period pointer. Used with PLAYBACK_LIST_PTR to determine buffer position currently in DAC */
-#define PLAYBACK_FIFO_END_ADDRESS 0x07 /* Playback FIFO end address */
-#define PLAYBACK_FIFO_POINTER 0x08 /* Playback FIFO pointer and number of valid sound samples in cache */
-#define PLAYBACK_UNKNOWN9 0x09 /* Not used */
-#define CAPTURE_DMA_ADDR 0x10 /* Capture DMA address */
-#define CAPTURE_BUFFER_SIZE 0x11 /* Capture buffer size */
-#define CAPTURE_POINTER 0x12 /* Capture buffer pointer. Sample currently in ADC */
-#define CAPTURE_FIFO_POINTER 0x13 /* Capture FIFO pointer and number of valid sound samples in cache */
-#define CAPTURE_P16V_VOLUME1 0x14 /* Low: Capture volume 0xXXXX3030 */
-#define CAPTURE_P16V_VOLUME2 0x15 /* High:Has no effect on capture volume */
-#define CAPTURE_P16V_SOURCE 0x16 /* P16V source select. Set to 0x0700E4E5 for AC97 CAPTURE */
- /* [0:1] Capture input 0 channel select. 0 = Capture output 0.
- * 1 = Capture output 1.
- * 2 = Capture output 2.
- * 3 = Capture output 3.
- * [3:2] Capture input 1 channel select. 0 = Capture output 0.
- * 1 = Capture output 1.
- * 2 = Capture output 2.
- * 3 = Capture output 3.
- * [5:4] Capture input 2 channel select. 0 = Capture output 0.
- * 1 = Capture output 1.
- * 2 = Capture output 2.
- * 3 = Capture output 3.
- * [7:6] Capture input 3 channel select. 0 = Capture output 0.
- * 1 = Capture output 1.
- * 2 = Capture output 2.
- * 3 = Capture output 3.
- * [9:8] Playback input 0 channel select. 0 = Play output 0.
- * 1 = Play output 1.
- * 2 = Play output 2.
- * 3 = Play output 3.
- * [11:10] Playback input 1 channel select. 0 = Play output 0.
- * 1 = Play output 1.
- * 2 = Play output 2.
- * 3 = Play output 3.
- * [13:12] Playback input 2 channel select. 0 = Play output 0.
- * 1 = Play output 1.
- * 2 = Play output 2.
- * 3 = Play output 3.
- * [15:14] Playback input 3 channel select. 0 = Play output 0.
- * 1 = Play output 1.
- * 2 = Play output 2.
- * 3 = Play output 3.
- * [19:16] Playback mixer output enable. 1 bit per channel.
- * [23:20] Capture mixer output enable. 1 bit per channel.
- * [26:24] FX engine channel capture 0 = 0x60-0x67.
- * 1 = 0x68-0x6f.
- * 2 = 0x70-0x77.
- * 3 = 0x78-0x7f.
- * 4 = 0x80-0x87.
- * 5 = 0x88-0x8f.
- * 6 = 0x90-0x97.
- * 7 = 0x98-0x9f.
- * [31:27] Not used.
- */
-
- /* 0x1 = capture on.
- * 0x100 = capture off.
- * 0x200 = capture off.
- * 0x1000 = capture off.
- */
-#define CAPTURE_RATE_STATUS 0x17 /* Capture sample rate. Read only */
- /* [15:0] Not used.
- * [18:16] Channel 0 Detected sample rate. 0 - 44.1khz
- * 1 - 48 khz
- * 2 - 96 khz
- * 3 - 192 khz
- * 7 - undefined rate.
- * [19] Channel 0. 1 - Valid, 0 - Not Valid.
- * [22:20] Channel 1 Detected sample rate.
- * [23] Channel 1. 1 - Valid, 0 - Not Valid.
- * [26:24] Channel 2 Detected sample rate.
- * [27] Channel 2. 1 - Valid, 0 - Not Valid.
- * [30:28] Channel 3 Detected sample rate.
- * [31] Channel 3. 1 - Valid, 0 - Not Valid.
- */
-/* 0x18 - 0x1f unused */
-#define PLAYBACK_LAST_SAMPLE 0x20 /* The sample currently being played. Read only */
-/* 0x21 - 0x3f unused */
-#define BASIC_INTERRUPT 0x40 /* Used by both playback and capture interrupt handler */
- /* Playback (0x1<<channel_id) Don't touch high 16bits. */
- /* Capture (0x100<<channel_id). not tested */
- /* Start Playback [3:0] (one bit per channel)
- * Start Capture [11:8] (one bit per channel)
- * Record source select for channel 0 [18:16]
- * Record source select for channel 1 [22:20]
- * Record source select for channel 2 [26:24]
- * Record source select for channel 3 [30:28]
- * 0 - SPDIF channel.
- * 1 - I2S channel.
- * 2 - SRC48 channel.
- * 3 - SRCMulti_SPDIF channel.
- * 4 - SRCMulti_I2S channel.
- * 5 - SPDIF channel.
- * 6 - fxengine capture.
- * 7 - AC97 capture.
- */
- /* Default 41110000.
- * Writing 0xffffffff hangs the PC.
- * Writing 0xffff0000 -> 77770000 so it must be some sort of route.
- * bit 0x1 starts DMA playback on channel_id 0
- */
-/* 0x41,42 take values from 0 - 0xffffffff, but have no effect on playback */
-/* 0x43,0x48 do not remember settings */
-/* 0x41-45 unused */
-#define WATERMARK 0x46 /* Test bit to indicate cache level usage */
- /* Values it can have while playing on channel 0.
- * 0000f000, 0000f004, 0000f008, 0000f00c.
- * Readonly.
- */
-/* 0x47-0x4f unused */
-/* 0x50-0x5f Capture cache data */
-#define SRCSel 0x60 /* SRCSel. Default 0x4. Bypass P16V 0x14 */
- /* [0] 0 = 10K2 audio, 1 = SRC48 mixer output.
- * [2] 0 = 10K2 audio, 1 = SRCMulti SPDIF mixer output.
- * [4] 0 = 10K2 audio, 1 = SRCMulti I2S mixer output.
- */
- /* SRC48 converts samples rates 44.1, 48, 96, 192 to 48 khz. */
- /* SRCMulti converts 48khz samples rates to 44.1, 48, 96, 192 to 48. */
- /* SRC48 and SRCMULTI sample rate select and output select. */
- /* 0xffffffff -> 0xC0000015
- * 0xXXXXXXX4 = Enable Front Left/Right
- * Enable PCMs
- */
-
-/* 0x61 -> 0x6c are Volume controls */
-#define PLAYBACK_VOLUME_MIXER1 0x61 /* SRC48 Low to mixer input volume control. */
-#define PLAYBACK_VOLUME_MIXER2 0x62 /* SRC48 High to mixer input volume control. */
-#define PLAYBACK_VOLUME_MIXER3 0x63 /* SRCMULTI SPDIF Low to mixer input volume control. */
-#define PLAYBACK_VOLUME_MIXER4 0x64 /* SRCMULTI SPDIF High to mixer input volume control. */
-#define PLAYBACK_VOLUME_MIXER5 0x65 /* SRCMULTI I2S Low to mixer input volume control. */
-#define PLAYBACK_VOLUME_MIXER6 0x66 /* SRCMULTI I2S High to mixer input volume control. */
-#define PLAYBACK_VOLUME_MIXER7 0x67 /* P16V Low to SRCMULTI SPDIF mixer input volume control. */
-#define PLAYBACK_VOLUME_MIXER8 0x68 /* P16V High to SRCMULTI SPDIF mixer input volume control. */
-#define PLAYBACK_VOLUME_MIXER9 0x69 /* P16V Low to SRCMULTI I2S mixer input volume control. */
- /* 0xXXXX3030 = PCM0 Volume (Front).
- * 0x3030XXXX = PCM1 Volume (Center)
- */
-#define PLAYBACK_VOLUME_MIXER10 0x6a /* P16V High to SRCMULTI I2S mixer input volume control. */
- /* 0x3030XXXX = PCM3 Volume (Rear). */
-#define PLAYBACK_VOLUME_MIXER11 0x6b /* E10K2 Low to SRC48 mixer input volume control. */
-#define PLAYBACK_VOLUME_MIXER12 0x6c /* E10K2 High to SRC48 mixer input volume control. */
-
-#define SRC48_ENABLE 0x6d /* SRC48 input audio enable */
- /* SRC48 converts samples rates 44.1, 48, 96, 192 to 48 khz. */
- /* [23:16] The corresponding P16V channel to SRC48 enabled if == 1.
- * [31:24] The corresponding E10K2 channel to SRC48 enabled.
- */
-#define SRCMULTI_ENABLE 0x6e /* SRCMulti input audio enable. Default 0xffffffff */
- /* SRCMulti converts 48khz samples rates to 44.1, 48, 96, 192 to 48. */
- /* [7:0] The corresponding P16V channel to SRCMulti_I2S enabled if == 1.
- * [15:8] The corresponding E10K2 channel to SRCMulti I2S enabled.
- * [23:16] The corresponding P16V channel to SRCMulti SPDIF enabled.
- * [31:24] The corresponding E10K2 channel to SRCMulti SPDIF enabled.
- */
- /* Bypass P16V 0xff00ff00
- * Bitmap. 0 = Off, 1 = On.
- * P16V playback outputs:
- * 0xXXXXXXX1 = PCM0 Left. (Front)
- * 0xXXXXXXX2 = PCM0 Right.
- * 0xXXXXXXX4 = PCM1 Left. (Center/LFE)
- * 0xXXXXXXX8 = PCM1 Right.
- * 0xXXXXXX1X = PCM2 Left. (Unknown)
- * 0xXXXXXX2X = PCM2 Right.
- * 0xXXXXXX4X = PCM3 Left. (Rear)
- * 0xXXXXXX8X = PCM3 Right.
- */
-#define AUDIO_OUT_ENABLE 0x6f /* Default: 000100FF */
- /* [3:0] Does something, but not documented. Probably capture enable.
- * [7:4] Playback channels enable. not documented.
- * [16] AC97 output enable if == 1
- * [30] 0 = SRCMulti_I2S input from fxengine 0x68-0x6f.
- * 1 = SRCMulti_I2S input from SRC48 output.
- * [31] 0 = SRCMulti_SPDIF input from fxengine 0x60-0x67.
- * 1 = SRCMulti_SPDIF input from SRC48 output.
- */
- /* 0xffffffff -> C00100FF */
- /* 0 -> Not playback sound, irq still running */
- /* 0xXXXXXX10 = PCM0 Left/Right On. (Front)
- * 0xXXXXXX20 = PCM1 Left/Right On. (Center/LFE)
- * 0xXXXXXX40 = PCM2 Left/Right On. (Unknown)
- * 0xXXXXXX80 = PCM3 Left/Right On. (Rear)
- */
-#define PLAYBACK_SPDIF_SELECT 0x70 /* Default: 12030F00 */
- /* 0xffffffff -> 3FF30FFF */
- /* 0x00000001 pauses stream/irq fail. */
- /* All other bits do not effect playback */
-#define PLAYBACK_SPDIF_SRC_SELECT 0x71 /* Default: 0000E4E4 */
- /* 0xffffffff -> F33FFFFF */
- /* All bits do not effect playback */
-#define PLAYBACK_SPDIF_USER_DATA0 0x72 /* SPDIF out user data 0 */
-#define PLAYBACK_SPDIF_USER_DATA1 0x73 /* SPDIF out user data 1 */
-/* 0x74-0x75 unknown */
-#define CAPTURE_SPDIF_CONTROL 0x76 /* SPDIF in control setting */
-#define CAPTURE_SPDIF_STATUS 0x77 /* SPDIF in status */
-#define CAPURE_SPDIF_USER_DATA0 0x78 /* SPDIF in user data 0 */
-#define CAPURE_SPDIF_USER_DATA1 0x79 /* SPDIF in user data 1 */
-#define CAPURE_SPDIF_USER_DATA2 0x7a /* SPDIF in user data 2 */
-
diff --git a/sys/gnu/dev/sound/pci/p17v-alsa.h b/sys/gnu/dev/sound/pci/p17v-alsa.h
deleted file mode 100644
index 3e27a17..0000000
--- a/sys/gnu/dev/sound/pci/p17v-alsa.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/*-
- * Copyright (c) by James Courtier-Dutton <James@superbug.demon.co.uk>
- * Driver p17v chips
- * Version: 0.01
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-
-/* $FreeBSD$ */
-
-/******************************************************************************/
-/* Audigy2Value Tina (P17V) pointer-offset register set,
- * accessed through the PTR20 and DATA24 registers */
-/******************************************************************************/
-
-/* 00 - 07: Not used */
-#define P17V_PLAYBACK_FIFO_PTR 0x08 /* Current playback fifo pointer
- * and number of sound samples in cache.
- */
-/* 09 - 12: Not used */
-#define P17V_CAPTURE_FIFO_PTR 0x13 /* Current capture fifo pointer
- * and number of sound samples in cache.
- */
-/* 14 - 17: Not used */
-#define P17V_PB_CHN_SEL 0x18 /* P17v playback channel select */
-#define P17V_SE_SLOT_SEL_L 0x19 /* Sound Engine slot select low */
-#define P17V_SE_SLOT_SEL_H 0x1a /* Sound Engine slot select high */
-/* 1b - 1f: Not used */
-/* 20 - 2f: Not used */
-/* 30 - 3b: Not used */
-#define P17V_SPI 0x3c /* SPI interface register */
-#define P17V_I2C_ADDR 0x3d /* I2C Address */
-#define P17V_I2C_0 0x3e /* I2C Data */
-#define P17V_I2C_1 0x3f /* I2C Data */
-
-#define P17V_START_AUDIO 0x40 /* Start Audio bit */
-/* 41 - 47: Reserved */
-#define P17V_START_CAPTURE 0x48 /* Start Capture bit */
-#define P17V_CAPTURE_FIFO_BASE 0x49 /* Record FIFO base address */
-#define P17V_CAPTURE_FIFO_SIZE 0x4a /* Record FIFO buffer size */
-#define P17V_CAPTURE_FIFO_INDEX 0x4b /* Record FIFO capture index */
-#define P17V_CAPTURE_VOL_H 0x4c /* P17v capture volume control */
-#define P17V_CAPTURE_VOL_L 0x4d /* P17v capture volume control */
-/* 4e - 4f: Not used */
-/* 50 - 5f: Not used */
-#define P17V_SRCSel 0x60 /* SRC48 and SRCMulti sample rate select
- * and output select
- */
-#define P17V_MIXER_AC97_10K1_VOL_L 0x61 /* 10K to Mixer_AC97 input volume control */
-#define P17V_MIXER_AC97_10K1_VOL_H 0x62 /* 10K to Mixer_AC97 input volume control */
-#define P17V_MIXER_AC97_P17V_VOL_L 0x63 /* P17V to Mixer_AC97 input volume control */
-#define P17V_MIXER_AC97_P17V_VOL_H 0x64 /* P17V to Mixer_AC97 input volume control */
-#define P17V_MIXER_AC97_SRP_REC_VOL_L 0x65 /* SRP Record to Mixer_AC97 input volume control */
-#define P17V_MIXER_AC97_SRP_REC_VOL_H 0x66 /* SRP Record to Mixer_AC97 input volume control */
-/* 67 - 68: Reserved */
-#define P17V_MIXER_Spdif_10K1_VOL_L 0x69 /* 10K to Mixer_Spdif input volume control */
-#define P17V_MIXER_Spdif_10K1_VOL_H 0x6A /* 10K to Mixer_Spdif input volume control */
-#define P17V_MIXER_Spdif_P17V_VOL_L 0x6B /* P17V to Mixer_Spdif input volume control */
-#define P17V_MIXER_Spdif_P17V_VOL_H 0x6C /* P17V to Mixer_Spdif input volume control */
-#define P17V_MIXER_Spdif_SRP_REC_VOL_L 0x6D /* SRP Record to Mixer_Spdif input volume control */
-#define P17V_MIXER_Spdif_SRP_REC_VOL_H 0x6E /* SRP Record to Mixer_Spdif input volume control */
-/* 6f - 70: Reserved */
-#define P17V_MIXER_I2S_10K1_VOL_L 0x71 /* 10K to Mixer_I2S input volume control */
-#define P17V_MIXER_I2S_10K1_VOL_H 0x72 /* 10K to Mixer_I2S input volume control */
-#define P17V_MIXER_I2S_P17V_VOL_L 0x73 /* P17V to Mixer_I2S input volume control */
-#define P17V_MIXER_I2S_P17V_VOL_H 0x74 /* P17V to Mixer_I2S input volume control */
-#define P17V_MIXER_I2S_SRP_REC_VOL_L 0x75 /* SRP Record to Mixer_I2S input volume control */
-#define P17V_MIXER_I2S_SRP_REC_VOL_H 0x76 /* SRP Record to Mixer_I2S input volume control */
-/* 77 - 78: Reserved */
-#define P17V_MIXER_AC97_ENABLE 0x79 /* Mixer AC97 input audio enable */
-#define P17V_MIXER_SPDIF_ENABLE 0x7A /* Mixer SPDIF input audio enable */
-#define P17V_MIXER_I2S_ENABLE 0x7B /* Mixer I2S input audio enable */
-#define P17V_AUDIO_OUT_ENABLE 0x7C /* Audio out enable */
-#define P17V_MIXER_ATT 0x7D /* SRP Mixer Attenuation Select */
-#define P17V_SRP_RECORD_SRR 0x7E /* SRP Record channel source Select */
-#define P17V_SOFT_RESET_SRP_MIXER 0x7F /* SRP and mixer soft reset */
-
-#define P17V_AC97_OUT_MASTER_VOL_L 0x80 /* AC97 Output master volume control */
-#define P17V_AC97_OUT_MASTER_VOL_H 0x81 /* AC97 Output master volume control */
-#define P17V_SPDIF_OUT_MASTER_VOL_L 0x82 /* SPDIF Output master volume control */
-#define P17V_SPDIF_OUT_MASTER_VOL_H 0x83 /* SPDIF Output master volume control */
-#define P17V_I2S_OUT_MASTER_VOL_L 0x84 /* I2S Output master volume control */
-#define P17V_I2S_OUT_MASTER_VOL_H 0x85 /* I2S Output master volume control */
-/* 86 - 87: Not used */
-#define P17V_I2S_CHANNEL_SWAP_PHASE_INVERSE 0x88 /* I2S out mono channel swap
- * and phase inverse */
-#define P17V_SPDIF_CHANNEL_SWAP_PHASE_INVERSE 0x89 /* SPDIF out mono channel swap
- * and phase inverse */
-/* 8A: Not used */
-#define P17V_SRP_P17V_ESR 0x8B /* SRP_P17V estimated sample rate and rate lock */
-#define P17V_SRP_REC_ESR 0x8C /* SRP_REC estimated sample rate and rate lock */
-#define P17V_SRP_BYPASS 0x8D /* srps channel bypass and srps bypass */
-/* 8E - 92: Not used */
-#define P17V_I2S_SRC_SEL 0x93 /* I2SIN mode sel */
-
-
-
-
-
-
diff --git a/sys/gnu/fs/reiserfs/reiserfs_fs.h b/sys/gnu/fs/reiserfs/reiserfs_fs.h
index 5ad021b..7aed2f2 100644
--- a/sys/gnu/fs/reiserfs/reiserfs_fs.h
+++ b/sys/gnu/fs/reiserfs/reiserfs_fs.h
@@ -2,7 +2,7 @@
* Copyright 2000 Hans Reiser
* See README for licensing and copyright details
*
- * Ported to FreeBSD by Jean-Sébastien Pédron <jspedron@club-internet.fr>
+ * Ported to FreeBSD by Jean-Sébastien Pédron <jspedron@club-internet.fr>
*
* $FreeBSD$
*/
diff --git a/sys/gnu/fs/reiserfs/reiserfs_fs_i.h b/sys/gnu/fs/reiserfs/reiserfs_fs_i.h
index a9aa7e5..d9e358e 100644
--- a/sys/gnu/fs/reiserfs/reiserfs_fs_i.h
+++ b/sys/gnu/fs/reiserfs/reiserfs_fs_i.h
@@ -2,7 +2,7 @@
* Copyright 2000 Hans Reiser
* See README for licensing and copyright details
*
- * Ported to FreeBSD by Jean-Sébastien Pédron <jspedron@club-internet.fr>
+ * Ported to FreeBSD by Jean-Sébastien Pédron <jspedron@club-internet.fr>
*
* $FreeBSD$
*/
diff --git a/sys/gnu/fs/reiserfs/reiserfs_fs_sb.h b/sys/gnu/fs/reiserfs/reiserfs_fs_sb.h
index 184e01c..982729b 100644
--- a/sys/gnu/fs/reiserfs/reiserfs_fs_sb.h
+++ b/sys/gnu/fs/reiserfs/reiserfs_fs_sb.h
@@ -2,7 +2,7 @@
* Copyright 2000 Hans Reiser
* See README for licensing and copyright details
*
- * Ported to FreeBSD by Jean-Sébastien Pédron <jspedron@club-internet.fr>
+ * Ported to FreeBSD by Jean-Sébastien Pédron <jspedron@club-internet.fr>
*
* $FreeBSD$
*/
diff --git a/sys/gnu/fs/reiserfs/reiserfs_hashes.c b/sys/gnu/fs/reiserfs/reiserfs_hashes.c
index c42bbe2..3545dbf 100644
--- a/sys/gnu/fs/reiserfs/reiserfs_hashes.c
+++ b/sys/gnu/fs/reiserfs/reiserfs_hashes.c
@@ -2,7 +2,7 @@
* Copyright 2000 Hans Reiser
* See README for licensing and copyright details
*
- * Ported to FreeBSD by Jean-Sébastien Pédron <jspedron@club-internet.fr>
+ * Ported to FreeBSD by Jean-Sébastien Pédron <jspedron@club-internet.fr>
*
* $FreeBSD$
*/
diff --git a/sys/gnu/fs/reiserfs/reiserfs_inode.c b/sys/gnu/fs/reiserfs/reiserfs_inode.c
index b63ed74..f043c5f 100644
--- a/sys/gnu/fs/reiserfs/reiserfs_inode.c
+++ b/sys/gnu/fs/reiserfs/reiserfs_inode.c
@@ -2,7 +2,7 @@
* Copyright 2000 Hans Reiser
* See README for licensing and copyright details
*
- * Ported to FreeBSD by Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
+ * Ported to FreeBSD by Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
*
* $FreeBSD$
*/
diff --git a/sys/gnu/fs/reiserfs/reiserfs_item_ops.c b/sys/gnu/fs/reiserfs/reiserfs_item_ops.c
index 7b10183..f3593c3 100644
--- a/sys/gnu/fs/reiserfs/reiserfs_item_ops.c
+++ b/sys/gnu/fs/reiserfs/reiserfs_item_ops.c
@@ -2,7 +2,7 @@
* Copyright 2000 Hans Reiser
* See README for licensing and copyright details
*
- * Ported to FreeBSD by Jean-Sébastien Pédron <jspedron@club-internet.fr>
+ * Ported to FreeBSD by Jean-Sébastien Pédron <jspedron@club-internet.fr>
*
* $FreeBSD$
*/
diff --git a/sys/gnu/fs/reiserfs/reiserfs_mount.h b/sys/gnu/fs/reiserfs/reiserfs_mount.h
index fbb0b50..93b8c7f 100644
--- a/sys/gnu/fs/reiserfs/reiserfs_mount.h
+++ b/sys/gnu/fs/reiserfs/reiserfs_mount.h
@@ -2,7 +2,7 @@
* Copyright 2000 Hans Reiser
* See README for licensing and copyright details
*
- * Ported to FreeBSD by Jean-Sébastien Pédron <jspedron@club-internet.fr>
+ * Ported to FreeBSD by Jean-Sébastien Pédron <jspedron@club-internet.fr>
*
* $FreeBSD$
*/
diff --git a/sys/gnu/fs/reiserfs/reiserfs_namei.c b/sys/gnu/fs/reiserfs/reiserfs_namei.c
index 61e88f4..cde867a 100644
--- a/sys/gnu/fs/reiserfs/reiserfs_namei.c
+++ b/sys/gnu/fs/reiserfs/reiserfs_namei.c
@@ -2,7 +2,7 @@
* Copyright 2000 Hans Reiser
* See README for licensing and copyright details
*
- * Ported to FreeBSD by Jean-Sébastien Pédron <jspedron@club-internet.fr>
+ * Ported to FreeBSD by Jean-Sébastien Pédron <jspedron@club-internet.fr>
*
* $FreeBSD$
*/
diff --git a/sys/gnu/fs/reiserfs/reiserfs_prints.c b/sys/gnu/fs/reiserfs/reiserfs_prints.c
index e48433b..a3c872d 100644
--- a/sys/gnu/fs/reiserfs/reiserfs_prints.c
+++ b/sys/gnu/fs/reiserfs/reiserfs_prints.c
@@ -2,7 +2,7 @@
* Copyright 2000 Hans Reiser
* See README for licensing and copyright details
*
- * Ported to FreeBSD by Jean-Sébastien Pédron <jspedron@club-internet.fr>
+ * Ported to FreeBSD by Jean-Sébastien Pédron <jspedron@club-internet.fr>
*
* $FreeBSD$
*/
diff --git a/sys/gnu/fs/reiserfs/reiserfs_stree.c b/sys/gnu/fs/reiserfs/reiserfs_stree.c
index d786ad8..d1d775c 100644
--- a/sys/gnu/fs/reiserfs/reiserfs_stree.c
+++ b/sys/gnu/fs/reiserfs/reiserfs_stree.c
@@ -2,7 +2,7 @@
* Copyright 2000 Hans Reiser
* See README for licensing and copyright details
*
- * Ported to FreeBSD by Jean-Sébastien Pédron <jspedron@club-internet.fr>
+ * Ported to FreeBSD by Jean-Sébastien Pédron <jspedron@club-internet.fr>
*
* $FreeBSD$
*/
@@ -321,7 +321,7 @@ key_in_buffer(
}
#if 0
-/* XXX Il ne semble pas y avoir de compteur de référence dans struct buf */
+/* XXX Il ne semble pas y avoir de compteur de référence dans struct buf */
inline void
decrement_bcount(struct buf *p_s_bp)
{
diff --git a/sys/gnu/fs/reiserfs/reiserfs_vfsops.c b/sys/gnu/fs/reiserfs/reiserfs_vfsops.c
index 9b7ccd9..ecec3ad 100644
--- a/sys/gnu/fs/reiserfs/reiserfs_vfsops.c
+++ b/sys/gnu/fs/reiserfs/reiserfs_vfsops.c
@@ -2,7 +2,7 @@
* Copyright 2000 Hans Reiser
* See README for licensing and copyright details
*
- * Ported to FreeBSD by Jean-Sébastien Pédron <jspedron@club-internet.fr>
+ * Ported to FreeBSD by Jean-Sébastien Pédron <jspedron@club-internet.fr>
*
* $FreeBSD$
*/
@@ -49,7 +49,7 @@ MALLOC_DEFINE(M_REISERFSNODE, "reiserfs_node", "ReiserFS vnode private part");
* -------------------------------------------------------------------*/
static int
-reiserfs_cmount(struct mntarg *ma, void *data, int flags)
+reiserfs_cmount(struct mntarg *ma, void *data, uint64_t flags)
{
struct reiserfs_args args;
struct export_args exp;
diff --git a/sys/gnu/fs/reiserfs/reiserfs_vnops.c b/sys/gnu/fs/reiserfs/reiserfs_vnops.c
index 12fe409..8ac1910 100644
--- a/sys/gnu/fs/reiserfs/reiserfs_vnops.c
+++ b/sys/gnu/fs/reiserfs/reiserfs_vnops.c
@@ -2,7 +2,7 @@
* Copyright 2000 Hans Reiser
* See README for licensing and copyright details
*
- * Ported to FreeBSD by Jean-Sébastien Pédron <jspedron@club-internet.fr>
+ * Ported to FreeBSD by Jean-Sébastien Pédron <jspedron@club-internet.fr>
*
* $FreeBSD$
*/
diff --git a/sys/gnu/fs/xfs/xfs_vfsops.c b/sys/gnu/fs/xfs/xfs_vfsops.c
index 63d568b..e97a363 100644
--- a/sys/gnu/fs/xfs/xfs_vfsops.c
+++ b/sys/gnu/fs/xfs/xfs_vfsops.c
@@ -1743,8 +1743,7 @@ xfs_parseargs(
while ((this_char = strsep(&options, ",")) != NULL) {
if (!*this_char)
continue;
-
- if ((value = index(this_char, '=')) != NULL)
+ if ((value = strchr(this_char, '=')) != NULL)
*value++ = 0;
if (!strcmp(this_char, MNTOPT_LOGBUFS)) {
diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC
index 3c851fa..0db2bbf 100644
--- a/sys/i386/conf/GENERIC
+++ b/sys/i386/conf/GENERIC
@@ -61,6 +61,8 @@ options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed.
options KBD_INSTALL_CDEV # install a CDEV entry in /dev
options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4)
options AUDIT # Security event auditing
+options CAPABILITY_MODE # Capsicum capability mode
+options CAPABILITIES # Capsicum capabilities
options MAC # TrustedBSD MAC Framework
#options KDTRACE_HOOKS # Kernel DTrace hooks
options INCLUDE_CONFIG_FILE # Include this file in kernel
@@ -137,7 +139,8 @@ device da # Direct Access (disks)
device sa # Sequential Access (tape etc)
device cd # CD
device pass # Passthrough device (direct ATA/SCSI access)
-device ses # SCSI Environmental Services (and SAF-TE)
+device ses # Enclosure Services (SES and SAF-TE)
+device ctl # CAM Target Layer
# RAID controllers interfaced to the SCSI subsystem
device amr # AMI MegaRAID
diff --git a/sys/i386/conf/NOTES b/sys/i386/conf/NOTES
index 8b69e45..0cd0080 100644
--- a/sys/i386/conf/NOTES
+++ b/sys/i386/conf/NOTES
@@ -706,6 +706,10 @@ device aacp # SCSI Passthrough interface (optional, CAM required)
device asr
#
+# Highpoint RocketRAID 27xx.
+device hpt27xx
+
+#
# Highpoint RocketRAID 182x.
device hptmv
@@ -833,9 +837,11 @@ hint.pcf.0.irq="5"
#
# ichwd: Intel ICH watchdog timer
# amdsbwd: AMD SB7xx watchdog timer
+# viawd: VIA south bridge watchdog timer
#
device ichwd
device amdsbwd
+device viawd
#
# Temperature sensors:
diff --git a/sys/i386/conf/PAE b/sys/i386/conf/PAE
index 613b7d7..ebf010e 100644
--- a/sys/i386/conf/PAE
+++ b/sys/i386/conf/PAE
@@ -23,6 +23,7 @@ device ispfw
# address properly may cause data corruption when used in a machine with more
# than 4 gigabytes of memory.
+
nodevice ahb
nodevice sym
nodevice trm
@@ -37,6 +38,8 @@ nodevice ncv
nodevice nsp
nodevice stg
+nodevice ctl
+
nodevice asr
nodevice dpt
nodevice mly
diff --git a/sys/i386/conf/XEN b/sys/i386/conf/XEN
index ad453bf..61fdbb4 100644
--- a/sys/i386/conf/XEN
+++ b/sys/i386/conf/XEN
@@ -83,6 +83,10 @@ device md # Memory "disks"
device gif # IPv6 and IPv4 tunneling
device faith # IPv6-to-IPv4 relaying (translation)
+# Wireless cards
+options IEEE80211_SUPPORT_MESH
+options AH_SUPPORT_AR5416
+
# The `bpf' device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
# Note that 'bpf' is required for DHCP.
diff --git a/sys/i386/conf/XENHVM b/sys/i386/conf/XENHVM
new file mode 100644
index 0000000..672716b
--- /dev/null
+++ b/sys/i386/conf/XENHVM
@@ -0,0 +1,24 @@
+#
+# XENHVM -- Xen HVM kernel configuration file for FreeBSD/i386
+#
+# $FreeBSD$
+#
+include GENERIC
+ident XENHVM
+
+makeoptions MODULES_OVERRIDE=""
+
+#
+# Adaptive locks rely on a lock-free pointer read to determine the run state
+# of the thread holding a lock when under contention; under a virtualisation
+# system, the thread run state may not accurately reflect whether the thread
+# (or rather its host VCPU) is actually executing. As such, disable this
+# optimisation.
+#
+options NO_ADAPTIVE_MUTEXES
+options NO_ADAPTIVE_RWLOCKS
+options NO_ADAPTIVE_SX
+
+# Xen HVM support
+options XENHVM
+device xenpci
diff --git a/sys/i386/i386/locore.s b/sys/i386/i386/locore.s
index 107cbcf..68cb430 100644
--- a/sys/i386/i386/locore.s
+++ b/sys/i386/i386/locore.s
@@ -775,8 +775,7 @@ no_kernend:
* if we've enabled PSE above, we'll just switch the corresponding kernel
* PDEs before we turn on paging.
*
- * XXX: We waste some pages here in the PSE case! DON'T BLINDLY REMOVE
- * THIS! SMP needs the page table to be there to map the kernel P==V.
+ * XXX: We waste some pages here in the PSE case!
*/
xorl %eax, %eax
movl R(KERNend),%ecx
diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c
index c7352d9..126b618 100644
--- a/sys/i386/i386/machdep.c
+++ b/sys/i386/i386/machdep.c
@@ -653,8 +653,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
sdp = &td->td_pcb->pcb_gsd;
sf.sf_uc.uc_mcontext.mc_gsbase = sdp->sd_hibase << 24 |
sdp->sd_lobase;
- bzero(sf.sf_uc.uc_mcontext.mc_spare1,
- sizeof(sf.sf_uc.uc_mcontext.mc_spare1));
+ sf.sf_uc.uc_mcontext.mc_flags = 0;
bzero(sf.sf_uc.uc_mcontext.mc_spare2,
sizeof(sf.sf_uc.uc_mcontext.mc_spare2));
bzero(sf.sf_uc.__spare__, sizeof(sf.sf_uc.__spare__));
@@ -2369,10 +2368,13 @@ physmap_done:
Maxmem = atop(physmap[physmap_idx + 1]);
/*
- * By default keep the memtest enabled. Use a general name so that
+ * By default enable the memory test on real hardware, and disable
+ * it if we appear to be running in a VM. This avoids touching all
+ * pages unnecessarily, which doesn't matter on real hardware but is
+ * bad for shared VM hosts. Use a general name so that
* one could eventually do more with the code than just disable it.
*/
- memtest = 1;
+ memtest = (vm_guest > VM_GUEST_NO) ? 0 : 1;
TUNABLE_ULONG_FETCH("hw.memtest.tests", &memtest);
if (atop(physmap[physmap_idx + 1]) != Maxmem &&
@@ -3379,7 +3381,7 @@ get_mcontext(struct thread *td, mcontext_t *mcp, int flags)
mcp->mc_fsbase = sdp->sd_hibase << 24 | sdp->sd_lobase;
sdp = &td->td_pcb->pcb_gsd;
mcp->mc_gsbase = sdp->sd_hibase << 24 | sdp->sd_lobase;
- bzero(mcp->mc_spare1, sizeof(mcp->mc_spare1));
+ mcp->mc_flags = 0;
bzero(mcp->mc_spare2, sizeof(mcp->mc_spare2));
return (0);
}
diff --git a/sys/i386/i386/mp_machdep.c b/sys/i386/i386/mp_machdep.c
index 11d23ba..b67a39f 100644
--- a/sys/i386/i386/mp_machdep.c
+++ b/sys/i386/i386/mp_machdep.c
@@ -145,9 +145,6 @@ static int bootAP;
void *bootstacks[MAXCPU];
static void *dpcpu;
-/* Hotwire a 0->4MB V==P mapping */
-extern pt_entry_t *KPTphys;
-
struct pcb stoppcbs[MAXCPU];
/* Variables needed for SMP tlb shootdown. */
@@ -931,7 +928,6 @@ start_all_aps(void)
#ifndef PC98
u_char mpbiosreason;
#endif
- uintptr_t kptbase;
u_int32_t mpbioswarmvec;
int apic_id, cpu, i;
@@ -949,11 +945,8 @@ start_all_aps(void)
/* set up temporary P==V mapping for AP boot */
/* XXX this is a hack, we should boot the AP on its own stack/PTD */
-
- kptbase = (uintptr_t)(void *)KPTphys;
for (i = TMPMAP_START; i < NKPT; i++)
- PTD[i] = (pd_entry_t)(PG_V | PG_RW |
- ((kptbase + i * PAGE_SIZE) & PG_FRAME));
+ PTD[i] = PTD[KPTDI + i];
invltlb();
/* start each AP */
diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c
index 3c9d83b..cdafc43 100644
--- a/sys/i386/i386/pmap.c
+++ b/sys/i386/i386/pmap.c
@@ -330,7 +330,7 @@ static void pmap_update_pde_invalidate(vm_offset_t va, pd_entry_t newpde);
static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_t va, int flags);
-static vm_page_t _pmap_allocpte(pmap_t pmap, unsigned ptepindex, int flags);
+static vm_page_t _pmap_allocpte(pmap_t pmap, u_int ptepindex, int flags);
static int _pmap_unwire_pte_hold(pmap_t pmap, vm_page_t m, vm_page_t *free);
static pt_entry_t *pmap_pte_quick(pmap_t pmap, vm_offset_t va);
static void pmap_pte_release(pt_entry_t *pte);
@@ -340,6 +340,8 @@ static void *pmap_pdpt_allocf(uma_zone_t zone, int bytes, u_int8_t *flags, int w
#endif
static void pmap_set_pg(void);
+static __inline void pagezero(void *page);
+
CTASSERT(1 << PDESHIFT == sizeof(pd_entry_t));
CTASSERT(1 << PTESHIFT == sizeof(pt_entry_t));
@@ -1216,7 +1218,7 @@ pmap_is_current(pmap_t pmap)
{
return (pmap == kernel_pmap ||
- (pmap == vmspace_pmap(curthread->td_proc->p_vmspace) &&
+ (pmap == vmspace_pmap(curthread->td_proc->p_vmspace) &&
(pmap->pm_pdir[PTDPTDI] & PG_FRAME) == (PTDpde[0] & PG_FRAME)));
}
@@ -1366,8 +1368,8 @@ retry:
if (pde != 0) {
if (pde & PG_PS) {
if ((pde & PG_RW) || (prot & VM_PROT_WRITE) == 0) {
- if (vm_page_pa_tryrelock(pmap, (pde & PG_PS_FRAME) |
- (va & PDRMASK), &pa))
+ if (vm_page_pa_tryrelock(pmap, (pde &
+ PG_PS_FRAME) | (va & PDRMASK), &pa))
goto retry;
m = PHYS_TO_VM_PAGE((pde & PG_PS_FRAME) |
(va & PDRMASK));
@@ -1379,7 +1381,8 @@ retry:
pmap_pte_release(ptep);
if (pte != 0 &&
((pte & PG_RW) || (prot & VM_PROT_WRITE) == 0)) {
- if (vm_page_pa_tryrelock(pmap, pte & PG_FRAME, &pa))
+ if (vm_page_pa_tryrelock(pmap, pte & PG_FRAME,
+ &pa))
goto retry;
m = PHYS_TO_VM_PAGE(pte & PG_FRAME);
vm_page_hold(m);
@@ -1450,12 +1453,40 @@ vm_offset_t
pmap_map(vm_offset_t *virt, vm_paddr_t start, vm_paddr_t end, int prot)
{
vm_offset_t va, sva;
+ vm_paddr_t superpage_offset;
+ pd_entry_t newpde;
- va = sva = *virt;
+ va = *virt;
+ /*
+ * Does the physical address range's size and alignment permit at
+ * least one superpage mapping to be created?
+ */
+ superpage_offset = start & PDRMASK;
+ if ((end - start) - ((NBPDR - superpage_offset) & PDRMASK) >= NBPDR) {
+ /*
+ * Increase the starting virtual address so that its alignment
+ * does not preclude the use of superpage mappings.
+ */
+ if ((va & PDRMASK) < superpage_offset)
+ va = (va & ~PDRMASK) + superpage_offset;
+ else if ((va & PDRMASK) > superpage_offset)
+ va = ((va + PDRMASK) & ~PDRMASK) + superpage_offset;
+ }
+ sva = va;
while (start < end) {
- pmap_kenter(va, start);
- va += PAGE_SIZE;
- start += PAGE_SIZE;
+ if ((start & PDRMASK) == 0 && end - start >= NBPDR &&
+ pseflag) {
+ KASSERT((va & PDRMASK) == 0,
+ ("pmap_map: misaligned va %#x", va));
+ newpde = start | PG_PS | pgeflag | PG_RW | PG_V;
+ pmap_kenter_pde(va, newpde);
+ va += NBPDR;
+ start += NBPDR;
+ } else {
+ pmap_kenter(va, start);
+ va += PAGE_SIZE;
+ start += PAGE_SIZE;
+ }
}
pmap_invalidate_range(kernel_pmap, sva, va);
*virt = va;
@@ -1731,7 +1762,6 @@ pmap_pinit(pmap_t pmap)
if (pmap->pm_pdir == NULL) {
pmap->pm_pdir = (pd_entry_t *)kmem_alloc_nofault(kernel_map,
NBPTD);
-
if (pmap->pm_pdir == NULL) {
PMAP_LOCK_DESTROY(pmap);
return (0);
@@ -1764,10 +1794,9 @@ pmap_pinit(pmap_t pmap)
pmap_qenter((vm_offset_t)pmap->pm_pdir, ptdpg, NPGPTD);
- for (i = 0; i < NPGPTD; i++) {
+ for (i = 0; i < NPGPTD; i++)
if ((ptdpg[i]->flags & PG_ZERO) == 0)
- bzero(pmap->pm_pdir + (i * NPDEPG), PAGE_SIZE);
- }
+ pagezero(pmap->pm_pdir + (i * NPDEPG));
mtx_lock_spin(&allpmaps_lock);
LIST_INSERT_HEAD(&allpmaps, pmap, pm_list);
@@ -1796,7 +1825,7 @@ pmap_pinit(pmap_t pmap)
* mapped correctly.
*/
static vm_page_t
-_pmap_allocpte(pmap_t pmap, unsigned ptepindex, int flags)
+_pmap_allocpte(pmap_t pmap, u_int ptepindex, int flags)
{
vm_paddr_t ptepa;
vm_page_t m;
@@ -1844,7 +1873,7 @@ _pmap_allocpte(pmap_t pmap, unsigned ptepindex, int flags)
static vm_page_t
pmap_allocpte(pmap_t pmap, vm_offset_t va, int flags)
{
- unsigned ptepindex;
+ u_int ptepindex;
pd_entry_t ptepa;
vm_page_t m;
@@ -1992,7 +2021,7 @@ pmap_lazyfix(pmap_t pmap)
cr3 = vtophys(pmap->pm_pdir);
if (cr3 == rcr3()) {
load_cr3(PCPU_GET(curpcb)->pcb_cr3);
- CPU_CLR(PCPU_GET(cpuid), &pmap->pm_active);
+ CPU_CLR(PCPU_GET(cpuid), &pmap->pm_active);
}
}
#endif /* SMP */
@@ -2821,7 +2850,7 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t eva)
}
for (; sva < eva; sva = pdnxt) {
- unsigned pdirindex;
+ u_int pdirindex;
/*
* Calculate index for next page table.
@@ -3042,7 +3071,7 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot)
PMAP_LOCK(pmap);
for (; sva < eva; sva = pdnxt) {
pt_entry_t obits, pbits;
- unsigned pdirindex;
+ u_int pdirindex;
pdnxt = (sva + NBPDR) & ~PDRMASK;
if (pdnxt < sva)
@@ -3568,7 +3597,7 @@ pmap_enter_object(pmap_t pmap, vm_offset_t start, vm_offset_t end,
m = TAILQ_NEXT(m, listq);
}
vm_page_unlock_queues();
- PMAP_UNLOCK(pmap);
+ PMAP_UNLOCK(pmap);
}
/*
@@ -3610,7 +3639,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m,
* resident, we are creating it here.
*/
if (va < VM_MAXUSER_ADDRESS) {
- unsigned ptepindex;
+ u_int ptepindex;
pd_entry_t ptepa;
/*
@@ -3876,7 +3905,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, vm_size_t len,
pt_entry_t *src_pte, *dst_pte;
vm_page_t dstmpte, srcmpte;
pd_entry_t srcptepaddr;
- unsigned ptepindex;
+ u_int ptepindex;
KASSERT(addr < UPT_MIN_ADDRESS,
("pmap_copy: invalid to pmap_copy page tables"));
@@ -5216,7 +5245,7 @@ pmap_pid_dump(int pid)
#if defined(DEBUG)
static void pads(pmap_t pm);
-void pmap_pvdump(vm_offset_t pa);
+void pmap_pvdump(vm_paddr_t pa);
/* print address space of pmap*/
static void
diff --git a/sys/i386/i386/sys_machdep.c b/sys/i386/i386/sys_machdep.c
index beffff2..374690f 100644
--- a/sys/i386/i386/sys_machdep.c
+++ b/sys/i386/i386/sys_machdep.c
@@ -553,7 +553,7 @@ user_ldt_free(struct thread *td)
return;
}
- if (td == PCPU_GET(curthread)) {
+ if (td == curthread) {
#ifdef XEN
i386_reset_ldt(&default_proc_ldt);
PCPU_SET(currentldt, (int)&default_proc_ldt);
diff --git a/sys/i386/ibcs2/coff.h b/sys/i386/ibcs2/coff.h
index a0eecd9..5527515 100644
--- a/sys/i386/ibcs2/coff.h
+++ b/sys/i386/ibcs2/coff.h
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 1994 Sean Eric Fagan
- * Copyright (c) 1994 Søren Schmidt
+ * Copyright (c) 1994 Søren Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/i386/ibcs2/ibcs2_isc.c b/sys/i386/ibcs2/ibcs2_isc.c
index adafc99..5b25c12 100644
--- a/sys/i386/ibcs2/ibcs2_isc.c
+++ b/sys/i386/ibcs2/ibcs2_isc.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1994 Søren Schmidt
+ * Copyright (c) 1994 Søren Schmidt
* Copyright (c) 1994 Sean Eric Fagan
* Copyright (c) 1995 Steven Wallace
* All rights reserved.
diff --git a/sys/i386/ibcs2/ibcs2_socksys.c b/sys/i386/ibcs2/ibcs2_socksys.c
index ce96fc9..80b1216 100644
--- a/sys/i386/ibcs2/ibcs2_socksys.c
+++ b/sys/i386/ibcs2/ibcs2_socksys.c
@@ -152,7 +152,7 @@ ibcs2_getipdomainname(td, uap)
/* Get the domain name. */
getcredhostname(td->td_ucred, hname, sizeof(hname));
- dptr = index(hname, '.');
+ dptr = strchr(hname, '.');
if ( dptr )
dptr++;
else
@@ -182,7 +182,7 @@ ibcs2_setipdomainname(td, uap)
return EINVAL;
/* Get the host's unqualified name (strip off the domain) */
- ptr = index(hname, '.');
+ ptr = strchr(hname, '.');
if ( ptr != NULL ) {
ptr++;
*ptr = '\0';
diff --git a/sys/i386/ibcs2/ibcs2_stat.c b/sys/i386/ibcs2/ibcs2_stat.c
index b61e45e..c1097a3 100644
--- a/sys/i386/ibcs2/ibcs2_stat.c
+++ b/sys/i386/ibcs2/ibcs2_stat.c
@@ -212,7 +212,7 @@ ibcs2_utssys(td, uap)
IBCS2_UNAME_VERSION, sizeof(sut.version) - 1);
getcredhostname(td->td_ucred, machine_name,
sizeof(machine_name) - 1);
- p = index(machine_name, '.');
+ p = strchr(machine_name, '.');
if ( p )
*p = '\0';
strncpy(sut.nodename, machine_name, sizeof(sut.nodename) - 1);
diff --git a/sys/i386/ibcs2/ibcs2_sysi86.c b/sys/i386/ibcs2/ibcs2_sysi86.c
index 8d85bc1..17964af 100644
--- a/sys/i386/ibcs2/ibcs2_sysi86.c
+++ b/sys/i386/ibcs2/ibcs2_sysi86.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1994 Søren Schmidt
+ * Copyright (c) 1994 Søren Schmidt
* Copyright (c) 1995 Steven Wallace
* All rights reserved.
*
diff --git a/sys/i386/ibcs2/ibcs2_xenix.c b/sys/i386/ibcs2/ibcs2_xenix.c
index 74abbb1..c5416fb 100644
--- a/sys/i386/ibcs2/ibcs2_xenix.c
+++ b/sys/i386/ibcs2/ibcs2_xenix.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 1994 Sean Eric Fagan
- * Copyright (c) 1994 Søren Schmidt
+ * Copyright (c) 1994 Søren Schmidt
* Copyright (c) 1995 Steven Wallace
* All rights reserved.
*
diff --git a/sys/i386/ibcs2/imgact_coff.c b/sys/i386/ibcs2/imgact_coff.c
index 44a243c..abafe54 100644
--- a/sys/i386/ibcs2/imgact_coff.c
+++ b/sys/i386/ibcs2/imgact_coff.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 1994 Sean Eric Fagan
- * Copyright (c) 1994 Søren Schmidt
+ * Copyright (c) 1994 Søren Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/i386/include/_types.h b/sys/i386/include/_types.h
index 3194fd6..9f5ab90 100644
--- a/sys/i386/include/_types.h
+++ b/sys/i386/include/_types.h
@@ -48,7 +48,7 @@
/*
* Basic types upon which most other types are built.
*/
-typedef __signed char __int8_t;
+typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef short __int16_t;
typedef unsigned short __uint16_t;
diff --git a/sys/i386/include/asm.h b/sys/i386/include/asm.h
index 3148bb7..7ce3d57 100644
--- a/sys/i386/include/asm.h
+++ b/sys/i386/include/asm.h
@@ -89,6 +89,20 @@
#define ENTRY(x) _ENTRY(x)
#endif
+/*
+ * WEAK_ALIAS: create a weak alias.
+ */
+#define WEAK_ALIAS(alias,sym) \
+ .weak alias; \
+ alias = sym
+
+/*
+ * STRONG_ALIAS: create a strong alias.
+ */
+#define STRONG_ALIAS(alias,sym) \
+ .globl alias; \
+ alias = sym
+
#define RCSID(x) .text; .asciz x
#undef __FBSDID
diff --git a/sys/i386/include/float.h b/sys/i386/include/float.h
index 52b899f..2669298 100644
--- a/sys/i386/include/float.h
+++ b/sys/i386/include/float.h
@@ -55,6 +55,11 @@ __END_DECLS
#define FLT_MAX_EXP 128 /* emax */
#define FLT_MAX 3.40282347E+38F /* (1-b**(-p))*b**emax */
#define FLT_MAX_10_EXP 38 /* floor(log10((1-b**(-p))*b**emax)) */
+#if __ISO_C_VISIBLE >= 2011
+#define FLT_TRUE_MIN 1.40129846E-45F /* b**(emin-p) */
+#define FLT_DECIMAL_DIG 9 /* ceil(1+p*log10(b)) */
+#define FLT_HAS_SUBNORM 1
+#endif /* __ISO_C_VISIBLE >= 2011 */
#define DBL_MANT_DIG 53
#define DBL_EPSILON 2.2204460492503131E-16
@@ -65,6 +70,11 @@ __END_DECLS
#define DBL_MAX_EXP 1024
#define DBL_MAX 1.7976931348623157E+308
#define DBL_MAX_10_EXP 308
+#if __ISO_C_VISIBLE >= 2011
+#define DBL_TRUE_MIN 4.9406564584124654E-324
+#define DBL_DECIMAL_DIG 17
+#define DBL_HAS_SUBNORM 1
+#endif /* __ISO_C_VISIBLE >= 2011 */
#define LDBL_MANT_DIG 64
#define LDBL_EPSILON 1.0842021724855044340E-19L
@@ -75,4 +85,10 @@ __END_DECLS
#define LDBL_MAX_EXP 16384
#define LDBL_MAX 1.1897314953572317650E+4932L
#define LDBL_MAX_10_EXP 4932
+#if __ISO_C_VISIBLE >= 2011
+#define LDBL_TRUE_MIN 3.6451995318824746025E-4951L
+#define LDBL_DECIMAL_DIG 21
+#define LDBL_HAS_SUBNORM 1
+#endif /* __ISO_C_VISIBLE >= 2011 */
+
#endif /* _MACHINE_FLOAT_H_ */
diff --git a/sys/i386/include/npx.h b/sys/i386/include/npx.h
index 6b56bb4..932ba67 100644
--- a/sys/i386/include/npx.h
+++ b/sys/i386/include/npx.h
@@ -101,6 +101,11 @@ struct xmmacc {
u_char xmm_bytes[16];
};
+/* Contents of the upper 16 bytes of each AVX extended accumulator */
+struct ymmacc {
+ uint8_t ymm_bytes[16];
+};
+
struct savexmm {
struct envxmm sv_env;
struct {
@@ -116,6 +121,28 @@ union savefpu {
struct savexmm sv_xmm;
};
+struct xstate_hdr {
+ uint64_t xstate_bv;
+ uint8_t xstate_rsrv0[16];
+ uint8_t xstate_rsrv[40];
+};
+
+struct savexmm_xstate {
+ struct xstate_hdr sx_hd;
+ struct ymmacc sx_ymm[16];
+};
+
+struct savexmm_ymm {
+ struct envxmm sv_env;
+ struct {
+ struct fpacc87 fp_acc;
+ int8_t fp_pad[6]; /* padding */
+ } sv_fp[8];
+ struct xmmacc sv_xmm[16];
+ uint8_t sv_pad[96];
+ struct savexmm_xstate sv_xstate;
+} __aligned(64);
+
/*
* The hardware default control word for i387's and later coprocessors is
* 0x37F, giving:
@@ -138,13 +165,6 @@ union savefpu {
#ifdef _KERNEL
-struct fpu_kern_ctx {
- union savefpu hwstate;
- union savefpu *prev;
- uint32_t flags;
-};
-#define FPU_KERN_CTX_NPXINITDONE 0x01
-
#define PCB_USER_FPU(pcb) (((pcb)->pcb_flags & PCB_KERNNPX) == 0)
int npxdna(void);
@@ -157,6 +177,8 @@ void npxsave(union savefpu *addr);
void npxsetregs(struct thread *td, union savefpu *addr);
int npxtrap(void);
void npxuserinited(struct thread *);
+struct fpu_kern_ctx *fpu_kern_alloc_ctx(u_int flags);
+void fpu_kern_free_ctx(struct fpu_kern_ctx *ctx);
int fpu_kern_enter(struct thread *td, struct fpu_kern_ctx *ctx,
u_int flags);
int fpu_kern_leave(struct thread *td, struct fpu_kern_ctx *ctx);
@@ -167,6 +189,7 @@ int is_fpu_kern_thread(u_int flags);
* Flags for fpu_kern_enter() and fpu_kern_thread().
*/
#define FPU_KERN_NORMAL 0x0000
+#define FPU_KERN_NOWAIT 0x0001
#endif
diff --git a/sys/i386/include/pcaudioio.h b/sys/i386/include/pcaudioio.h
index 969f910..c67d866 100644
--- a/sys/i386/include/pcaudioio.h
+++ b/sys/i386/include/pcaudioio.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1994 Søren Schmidt
+ * Copyright (c) 1994 Søren Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/i386/include/ptrace.h b/sys/i386/include/ptrace.h
index 24eb411..c64d3e8 100644
--- a/sys/i386/include/ptrace.h
+++ b/sys/i386/include/ptrace.h
@@ -37,5 +37,7 @@
#define PT_GETXMMREGS (PT_FIRSTMACH + 0)
#define PT_SETXMMREGS (PT_FIRSTMACH + 1)
+#define PT_GETXSTATE (PT_FIRSTMACH + 2)
+#define PT_SETXSTATE (PT_FIRSTMACH + 3)
#endif
diff --git a/sys/i386/include/specialreg.h b/sys/i386/include/specialreg.h
index e3199f7..601b3e9 100644
--- a/sys/i386/include/specialreg.h
+++ b/sys/i386/include/specialreg.h
@@ -66,6 +66,7 @@
#define CR4_PCE 0x00000100 /* Performance monitoring counter enable */
#define CR4_FXSR 0x00000200 /* Fast FPU save/restore used by OS */
#define CR4_XMM 0x00000400 /* enable SIMD/MMX2 to use except 16 */
+#define CR4_XSAVE 0x00040000 /* XSETBV/XGETBV */
/*
* Bits in AMD64 special registers. EFER is 64 bits wide.
diff --git a/sys/i386/include/sysarch.h b/sys/i386/include/sysarch.h
index 454d64c..316a5ab 100644
--- a/sys/i386/include/sysarch.h
+++ b/sys/i386/include/sysarch.h
@@ -47,6 +47,7 @@
#define I386_SET_FSBASE 8
#define I386_GET_GSBASE 9
#define I386_SET_GSBASE 10
+#define I386_GET_XFPUSTATE 11
/* These four only exist when running an i386 binary on amd64 */
#define _AMD64_GET_FSBASE 128
@@ -71,6 +72,11 @@ struct i386_vm86_args {
char *sub_args; /* args */
};
+struct i386_get_xfpustate {
+ void *addr;
+ int len;
+};
+
#ifndef _KERNEL
#include <sys/cdefs.h>
diff --git a/sys/i386/include/ucontext.h b/sys/i386/include/ucontext.h
index d9f8344..79aabd7 100644
--- a/sys/i386/include/ucontext.h
+++ b/sys/i386/include/ucontext.h
@@ -31,11 +31,18 @@
#ifndef _MACHINE_UCONTEXT_H_
#define _MACHINE_UCONTEXT_H_
+/* Keep _MC_* values similar to amd64 */
+#define _MC_HASSEGS 0x1
+#define _MC_HASBASES 0x2
+#define _MC_HASFPXSTATE 0x4
+#define _MC_FLAG_MASK (_MC_HASSEGS | _MC_HASBASES | _MC_HASFPXSTATE)
+
typedef struct __mcontext {
/*
- * The definition of mcontext_t shall match the layout of
- * struct sigcontext after the sc_mask member. So that we can
- * support sigcontext and ucontext_t at the same time.
+ * The definition of mcontext_t must match the layout of
+ * struct sigcontext after the sc_mask member. This is so
+ * that we can support sigcontext and ucontext_t at the same
+ * time.
*/
__register_t mc_onstack; /* XXX - sigcontext compat. */
__register_t mc_gs; /* machine state (struct trapframe) */
@@ -67,7 +74,7 @@ typedef struct __mcontext {
#define _MC_FPOWNED_FPU 0x20001 /* FP state came from FPU */
#define _MC_FPOWNED_PCB 0x20002 /* FP state came from PCB */
int mc_ownedfp;
- int mc_spare1[1]; /* align next field to 16 bytes */
+ __register_t mc_flags;
/*
* See <machine/npx.h> for the internals of mc_fpstate[].
*/
@@ -76,11 +83,13 @@ typedef struct __mcontext {
__register_t mc_fsbase;
__register_t mc_gsbase;
- int mc_spare2[6];
+ __register_t mc_xfpustate;
+ __register_t mc_xfpustate_len;
+
+ int mc_spare2[4];
} mcontext_t;
#if defined(_KERNEL) && defined(COMPAT_FREEBSD4)
-
struct mcontext4 {
__register_t mc_onstack; /* XXX - sigcontext compat. */
__register_t mc_gs; /* machine state (struct trapframe) */
diff --git a/sys/i386/include/vmparam.h b/sys/i386/include/vmparam.h
index 8fe9b2b..56ab4b3 100644
--- a/sys/i386/include/vmparam.h
+++ b/sys/i386/include/vmparam.h
@@ -186,11 +186,12 @@
#endif
/*
- * Ceiling on amount of kmem_map kva space.
+ * Ceiling on the amount of kmem_map KVA space: 40% of the entire KVA space
+ * rounded to the nearest multiple of the superpage size.
*/
#ifndef VM_KMEM_SIZE_MAX
-#define VM_KMEM_SIZE_MAX ((VM_MAX_KERNEL_ADDRESS - \
- VM_MIN_KERNEL_ADDRESS) * 2 / 5)
+#define VM_KMEM_SIZE_MAX (((((VM_MAX_KERNEL_ADDRESS - \
+ VM_MIN_KERNEL_ADDRESS) >> (PDRSHIFT - 2)) + 5) / 10) << PDRSHIFT)
#endif
/* initial pagein size of beginning of executable file */
diff --git a/sys/i386/isa/npx.c b/sys/i386/isa/npx.c
index f314e44..0da580f 100644
--- a/sys/i386/isa/npx.c
+++ b/sys/i386/isa/npx.c
@@ -985,6 +985,50 @@ DRIVER_MODULE(npxisa, acpi, npxisa_driver, npxisa_devclass, 0, 0);
#endif
#endif /* DEV_ISA */
+static MALLOC_DEFINE(M_FPUKERN_CTX, "fpukern_ctx",
+ "Kernel contexts for FPU state");
+
+#define XSAVE_AREA_ALIGN 64
+
+#define FPU_KERN_CTX_NPXINITDONE 0x01
+
+struct fpu_kern_ctx {
+ union savefpu *prev;
+ uint32_t flags;
+ char hwstate1[];
+};
+
+struct fpu_kern_ctx *
+fpu_kern_alloc_ctx(u_int flags)
+{
+ struct fpu_kern_ctx *res;
+ size_t sz;
+
+ sz = sizeof(struct fpu_kern_ctx) + XSAVE_AREA_ALIGN +
+ sizeof(union savefpu);
+ res = malloc(sz, M_FPUKERN_CTX, ((flags & FPU_KERN_NOWAIT) ?
+ M_NOWAIT : M_WAITOK) | M_ZERO);
+ return (res);
+}
+
+void
+fpu_kern_free_ctx(struct fpu_kern_ctx *ctx)
+{
+
+ /* XXXKIB clear the memory ? */
+ free(ctx, M_FPUKERN_CTX);
+}
+
+static union savefpu *
+fpu_kern_ctx_savefpu(struct fpu_kern_ctx *ctx)
+{
+ vm_offset_t p;
+
+ p = (vm_offset_t)&ctx->hwstate1;
+ p = roundup2(p, XSAVE_AREA_ALIGN);
+ return ((union savefpu *)p);
+}
+
int
fpu_kern_enter(struct thread *td, struct fpu_kern_ctx *ctx, u_int flags)
{
@@ -998,7 +1042,7 @@ fpu_kern_enter(struct thread *td, struct fpu_kern_ctx *ctx, u_int flags)
ctx->flags |= FPU_KERN_CTX_NPXINITDONE;
npxexit(td);
ctx->prev = pcb->pcb_save;
- pcb->pcb_save = &ctx->hwstate;
+ pcb->pcb_save = fpu_kern_ctx_savefpu(ctx);
pcb->pcb_flags |= PCB_KERNNPX;
pcb->pcb_flags &= ~PCB_NPXINITDONE;
return (0);
diff --git a/sys/i386/linux/imgact_linux.c b/sys/i386/linux/imgact_linux.c
index 3a66e87..3a42e81 100644
--- a/sys/i386/linux/imgact_linux.c
+++ b/sys/i386/linux/imgact_linux.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1994-1996 Søren Schmidt
+ * Copyright (c) 1994-1996 Søren Schmidt
* All rights reserved.
*
* Based heavily on /sys/kern/imgact_aout.c which is:
diff --git a/sys/i386/linux/linux.h b/sys/i386/linux/linux.h
index d02614b..8b5bcbf 100644
--- a/sys/i386/linux/linux.h
+++ b/sys/i386/linux/linux.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1994-1996 Søren Schmidt
+ * Copyright (c) 1994-1996 Søren Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -573,6 +573,16 @@ int linux_ioctl_unregister_handler(struct linux_ioctl_handler *h);
#define LINUX_F_UNLCK 2
/*
+ * posix_fadvise advice
+ */
+#define LINUX_POSIX_FADV_NORMAL 0
+#define LINUX_POSIX_FADV_RANDOM 1
+#define LINUX_POSIX_FADV_SEQUENTIAL 2
+#define LINUX_POSIX_FADV_WILLNEED 3
+#define LINUX_POSIX_FADV_DONTNEED 4
+#define LINUX_POSIX_FADV_NOREUSE 5
+
+/*
* mount flags
*/
#define LINUX_MS_RDONLY 0x0001
diff --git a/sys/i386/linux/linux_dummy.c b/sys/i386/linux/linux_dummy.c
index bc300b1..054cb60 100644
--- a/sys/i386/linux/linux_dummy.c
+++ b/sys/i386/linux/linux_dummy.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1994-1995 Søren Schmidt
+ * Copyright (c) 1994-1995 Søren Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -62,14 +62,12 @@ DUMMY(setfsuid);
DUMMY(setfsgid);
DUMMY(pivot_root);
DUMMY(mincore);
-DUMMY(fadvise64);
DUMMY(lookup_dcookie);
DUMMY(epoll_create);
DUMMY(epoll_ctl);
DUMMY(epoll_wait);
DUMMY(remap_file_pages);
DUMMY(fstatfs64);
-DUMMY(fadvise64_64);
DUMMY(mbind);
DUMMY(get_mempolicy);
DUMMY(set_mempolicy);
diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h
index d480012..53c804b 100644
--- a/sys/i386/linux/linux_proto.h
+++ b/sys/i386/linux/linux_proto.h
@@ -3,7 +3,7 @@
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
- * created from FreeBSD: head/sys/i386/linux/syscalls.master 227693 2011-11-19 07:19:37Z ed
+ * created from FreeBSD: head/sys/i386/linux/syscalls.master 228957 2011-12-29 15:34:59Z jhb
*/
#ifndef _LINUX_SYSPROTO_H_
@@ -756,7 +756,10 @@ struct linux_get_thread_area_args {
char desc_l_[PADL_(struct l_user_desc *)]; struct l_user_desc * desc; char desc_r_[PADR_(struct l_user_desc *)];
};
struct linux_fadvise64_args {
- register_t dummy;
+ char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+ char offset_l_[PADL_(l_loff_t)]; l_loff_t offset; char offset_r_[PADR_(l_loff_t)];
+ char len_l_[PADL_(l_size_t)]; l_size_t len; char len_r_[PADR_(l_size_t)];
+ char advice_l_[PADL_(int)]; int advice; char advice_r_[PADR_(int)];
};
struct linux_exit_group_args {
char error_code_l_[PADL_(int)]; int error_code; char error_code_r_[PADR_(int)];
@@ -835,7 +838,10 @@ struct linux_utimes_args {
char tptr_l_[PADL_(struct l_timeval *)]; struct l_timeval * tptr; char tptr_r_[PADR_(struct l_timeval *)];
};
struct linux_fadvise64_64_args {
- register_t dummy;
+ char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+ char offset_l_[PADL_(l_loff_t)]; l_loff_t offset; char offset_r_[PADR_(l_loff_t)];
+ char len_l_[PADL_(l_loff_t)]; l_loff_t len; char len_r_[PADR_(l_loff_t)];
+ char advice_l_[PADL_(int)]; int advice; char advice_r_[PADR_(int)];
};
struct linux_mbind_args {
register_t dummy;
diff --git a/sys/i386/linux/linux_syscall.h b/sys/i386/linux/linux_syscall.h
index 367dbf7..c206be8 100644
--- a/sys/i386/linux/linux_syscall.h
+++ b/sys/i386/linux/linux_syscall.h
@@ -3,7 +3,7 @@
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
- * created from FreeBSD: head/sys/i386/linux/syscalls.master 227693 2011-11-19 07:19:37Z ed
+ * created from FreeBSD: head/sys/i386/linux/syscalls.master 228957 2011-12-29 15:34:59Z jhb
*/
#define LINUX_SYS_exit 1
diff --git a/sys/i386/linux/linux_syscalls.c b/sys/i386/linux/linux_syscalls.c
index 5ebe4f9..53f7ca8 100644
--- a/sys/i386/linux/linux_syscalls.c
+++ b/sys/i386/linux/linux_syscalls.c
@@ -3,7 +3,7 @@
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
- * created from FreeBSD: head/sys/i386/linux/syscalls.master 227693 2011-11-19 07:19:37Z ed
+ * created from FreeBSD: head/sys/i386/linux/syscalls.master 228957 2011-12-29 15:34:59Z jhb
*/
const char *linux_syscallnames[] = {
diff --git a/sys/i386/linux/linux_sysent.c b/sys/i386/linux/linux_sysent.c
index 27b2d3b..27481ae 100644
--- a/sys/i386/linux/linux_sysent.c
+++ b/sys/i386/linux/linux_sysent.c
@@ -3,7 +3,7 @@
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
- * created from FreeBSD: head/sys/i386/linux/syscalls.master 227693 2011-11-19 07:19:37Z ed
+ * created from FreeBSD: head/sys/i386/linux/syscalls.master 228957 2011-12-29 15:34:59Z jhb
*/
#include <sys/param.h>
@@ -268,7 +268,7 @@ struct sysent linux_sysent[] = {
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 247 = linux_io_getevents */
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 248 = linux_io_submit */
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 249 = linux_io_cancel */
- { 0, (sy_call_t *)linux_fadvise64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 250 = linux_fadvise64 */
+ { AS(linux_fadvise64_args), (sy_call_t *)linux_fadvise64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 250 = linux_fadvise64 */
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 251 = */
{ AS(linux_exit_group_args), (sy_call_t *)linux_exit_group, AUE_EXIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 252 = linux_exit_group */
{ 0, (sy_call_t *)linux_lookup_dcookie, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 253 = linux_lookup_dcookie */
@@ -290,7 +290,7 @@ struct sysent linux_sysent[] = {
{ 0, (sy_call_t *)linux_fstatfs64, AUE_FSTATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 269 = linux_fstatfs64 */
{ AS(linux_tgkill_args), (sy_call_t *)linux_tgkill, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 270 = linux_tgkill */
{ AS(linux_utimes_args), (sy_call_t *)linux_utimes, AUE_UTIMES, NULL, 0, 0, 0, SY_THR_STATIC }, /* 271 = linux_utimes */
- { 0, (sy_call_t *)linux_fadvise64_64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 272 = linux_fadvise64_64 */
+ { AS(linux_fadvise64_64_args), (sy_call_t *)linux_fadvise64_64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 272 = linux_fadvise64_64 */
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 273 = */
{ 0, (sy_call_t *)linux_mbind, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 274 = linux_mbind */
{ 0, (sy_call_t *)linux_get_mempolicy, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 275 = linux_get_mempolicy */
diff --git a/sys/i386/linux/linux_systrace_args.c b/sys/i386/linux/linux_systrace_args.c
index 4c06a7f..f9c3cdc 100644
--- a/sys/i386/linux/linux_systrace_args.c
+++ b/sys/i386/linux/linux_systrace_args.c
@@ -1724,7 +1724,12 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
}
/* linux_fadvise64 */
case 250: {
- *n_args = 0;
+ struct linux_fadvise64_args *p = params;
+ iarg[0] = p->fd; /* int */
+ iarg[1] = p->offset; /* l_loff_t */
+ iarg[2] = p->len; /* l_size_t */
+ iarg[3] = p->advice; /* int */
+ *n_args = 4;
break;
}
/* linux_exit_group */
@@ -1873,7 +1878,12 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
}
/* linux_fadvise64_64 */
case 272: {
- *n_args = 0;
+ struct linux_fadvise64_64_args *p = params;
+ iarg[0] = p->fd; /* int */
+ iarg[1] = p->offset; /* l_loff_t */
+ iarg[2] = p->len; /* l_loff_t */
+ iarg[3] = p->advice; /* int */
+ *n_args = 4;
break;
}
/* linux_mbind */
@@ -4776,6 +4786,22 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
/* linux_fadvise64 */
case 250:
+ switch(ndx) {
+ case 0:
+ p = "int";
+ break;
+ case 1:
+ p = "l_loff_t";
+ break;
+ case 2:
+ p = "l_size_t";
+ break;
+ case 3:
+ p = "int";
+ break;
+ default:
+ break;
+ };
break;
/* linux_exit_group */
case 252:
@@ -4985,6 +5011,22 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
/* linux_fadvise64_64 */
case 272:
+ switch(ndx) {
+ case 0:
+ p = "int";
+ break;
+ case 1:
+ p = "l_loff_t";
+ break;
+ case 2:
+ p = "l_loff_t";
+ break;
+ case 3:
+ p = "int";
+ break;
+ default:
+ break;
+ };
break;
/* linux_mbind */
case 274:
@@ -6414,6 +6456,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
/* linux_fadvise64 */
case 250:
+ if (ndx == 0 || ndx == 1)
+ p = "int";
+ break;
/* linux_exit_group */
case 252:
if (ndx == 0 || ndx == 1)
@@ -6498,6 +6543,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
/* linux_fadvise64_64 */
case 272:
+ if (ndx == 0 || ndx == 1)
+ p = "int";
+ break;
/* linux_mbind */
case 274:
/* linux_get_mempolicy */
diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c
index a4443bd..7634138 100644
--- a/sys/i386/linux/linux_sysvec.c
+++ b/sys/i386/linux/linux_sysvec.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1994-1996 Søren Schmidt
+ * Copyright (c) 1994-1996 Søren Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/i386/linux/syscalls.master b/sys/i386/linux/syscalls.master
index 7e7965f..618d0ad 100644
--- a/sys/i386/linux/syscalls.master
+++ b/sys/i386/linux/syscalls.master
@@ -421,7 +421,8 @@
247 AUE_NULL UNIMPL linux_io_getevents
248 AUE_NULL UNIMPL linux_io_submit
249 AUE_NULL UNIMPL linux_io_cancel
-250 AUE_NULL STD { int linux_fadvise64(void); }
+250 AUE_NULL STD { int linux_fadvise64(int fd, l_loff_t offset, \
+ l_size_t len, int advice); }
251 AUE_NULL UNIMPL
252 AUE_EXIT STD { int linux_exit_group(int error_code); }
253 AUE_NULL STD { int linux_lookup_dcookie(void); }
@@ -447,7 +448,9 @@
270 AUE_NULL STD { int linux_tgkill(int tgid, int pid, int sig); }
271 AUE_UTIMES STD { int linux_utimes(char *fname, \
struct l_timeval *tptr); }
-272 AUE_NULL STD { int linux_fadvise64_64(void); }
+272 AUE_NULL STD { int linux_fadvise64_64(int fd, \
+ l_loff_t offset, l_loff_t len, \
+ int advice); }
273 AUE_NULL UNIMPL
274 AUE_NULL STD { int linux_mbind(void); }
275 AUE_NULL STD { int linux_get_mempolicy(void); }
diff --git a/sys/i386/xen/mp_machdep.c b/sys/i386/xen/mp_machdep.c
index a0ef1e8..b878884 100644
--- a/sys/i386/xen/mp_machdep.c
+++ b/sys/i386/xen/mp_machdep.c
@@ -810,12 +810,11 @@ cpu_initialize_context(unsigned int cpu)
{
/* vcpu_guest_context_t is too large to allocate on the stack.
* Hence we allocate statically and protect it with a lock */
- vm_page_t m[4];
+ vm_page_t m[NPGPTD + 2];
static vcpu_guest_context_t ctxt;
vm_offset_t boot_stack;
vm_offset_t newPTD;
vm_paddr_t ma[NPGPTD];
- static int color;
int i;
/*
@@ -825,15 +824,15 @@ cpu_initialize_context(unsigned int cpu)
*
*/
for (i = 0; i < NPGPTD + 2; i++) {
- m[i] = vm_page_alloc(NULL, color++,
+ m[i] = vm_page_alloc(NULL, 0,
VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED |
VM_ALLOC_ZERO);
pmap_zero_page(m[i]);
}
- boot_stack = kmem_alloc_nofault(kernel_map, 1);
- newPTD = kmem_alloc_nofault(kernel_map, NPGPTD);
+ boot_stack = kmem_alloc_nofault(kernel_map, PAGE_SIZE);
+ newPTD = kmem_alloc_nofault(kernel_map, NPGPTD * PAGE_SIZE);
ma[0] = VM_PAGE_TO_MACH(m[0])|PG_V;
#ifdef PAE
@@ -855,7 +854,7 @@ cpu_initialize_context(unsigned int cpu)
nkpt*sizeof(vm_paddr_t));
pmap_qremove(newPTD, 4);
- kmem_free(kernel_map, newPTD, 4);
+ kmem_free(kernel_map, newPTD, 4 * PAGE_SIZE);
/*
* map actual idle stack to boot_stack
*/
diff --git a/sys/i386/xen/pmap.c b/sys/i386/xen/pmap.c
index c81834b..189f311 100644
--- a/sys/i386/xen/pmap.c
+++ b/sys/i386/xen/pmap.c
@@ -125,6 +125,8 @@ __FBSDID("$FreeBSD$");
#include <sys/sysctl.h>
#ifdef SMP
#include <sys/smp.h>
+#else
+#include <sys/cpuset.h>
#endif
#include <vm/vm.h>
@@ -184,9 +186,6 @@ __FBSDID("$FreeBSD$");
#define PV_STAT(x) do { } while (0)
#endif
-#define pa_index(pa) ((pa) >> PDRSHIFT)
-#define pa_to_pvh(pa) (&pv_table[pa_index(pa)])
-
/*
* Get PDEs and PTEs for user/kernel address space
*/
@@ -224,13 +223,14 @@ extern u_int32_t KERNend;
pt_entry_t pg_nx;
#endif
+static SYSCTL_NODE(_vm, OID_AUTO, pmap, CTLFLAG_RD, 0, "VM/pmap parameters");
+
static int pat_works; /* Is page attribute table sane? */
/*
* Data for the pv entry allocation mechanism
*/
static int pv_entry_count = 0, pv_entry_max = 0, pv_entry_high_water = 0;
-static struct md_page *pv_table;
static int shpgperproc = PMAP_SHPGPERPROC;
struct pv_chunk *pv_chunkbase; /* KVA block for pv_chunks */
@@ -277,22 +277,6 @@ SYSCTL_INT(_debug, OID_AUTO, PMAP1unchanged, CTLFLAG_RD,
"Number of times pmap_pte_quick didn't change PMAP1");
static struct mtx PMAP2mutex;
-static SYSCTL_NODE(_vm, OID_AUTO, pmap, CTLFLAG_RD, 0, "VM/pmap parameters");
-static int pg_ps_enabled;
-SYSCTL_INT(_vm_pmap, OID_AUTO, pg_ps_enabled, CTLFLAG_RDTUN, &pg_ps_enabled, 0,
- "Are large page mappings enabled?");
-
-SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_max, CTLFLAG_RD, &pv_entry_max, 0,
- "Max number of PV entries");
-SYSCTL_INT(_vm_pmap, OID_AUTO, shpgperproc, CTLFLAG_RD, &shpgperproc, 0,
- "Page share factor per proc");
-static SYSCTL_NODE(_vm_pmap, OID_AUTO, pde, CTLFLAG_RD, 0,
- "2/4MB page mapping counters");
-
-static u_long pmap_pde_mappings;
-SYSCTL_ULONG(_vm_pmap_pde, OID_AUTO, mappings, CTLFLAG_RD,
- &pmap_pde_mappings, 0, "2/4MB page mappings");
-
static void free_pv_entry(pmap_t pmap, pv_entry_t pv);
static pv_entry_t get_pv_entry(pmap_t locked_pmap, int try);
static void pmap_pvh_free(struct md_page *pvh, pmap_t pmap, vm_offset_t va);
@@ -301,6 +285,8 @@ static pv_entry_t pmap_pvh_remove(struct md_page *pvh, pmap_t pmap,
static vm_page_t pmap_enter_quick_locked(multicall_entry_t **mcl, int *count, pmap_t pmap, vm_offset_t va,
vm_page_t m, vm_prot_t prot, vm_page_t mpte);
+static void pmap_flush_page(vm_page_t m);
+static void pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode);
static int pmap_remove_pte(pmap_t pmap, pt_entry_t *ptq, vm_offset_t sva,
vm_page_t *free);
static void pmap_remove_page(struct pmap *pmap, vm_offset_t va,
@@ -312,14 +298,12 @@ static boolean_t pmap_try_insert_pv_entry(pmap_t pmap, vm_offset_t va,
static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_t va, int flags);
-static vm_page_t _pmap_allocpte(pmap_t pmap, unsigned ptepindex, int flags);
+static vm_page_t _pmap_allocpte(pmap_t pmap, u_int ptepindex, int flags);
static int _pmap_unwire_pte_hold(pmap_t pmap, vm_page_t m, vm_page_t *free);
static pt_entry_t *pmap_pte_quick(pmap_t pmap, vm_offset_t va);
static void pmap_pte_release(pt_entry_t *pte);
static int pmap_unuse_pt(pmap_t, vm_offset_t, vm_page_t *);
-static vm_offset_t pmap_kmem_choose(vm_offset_t addr);
static boolean_t pmap_is_prefaultable_locked(pmap_t pmap, vm_offset_t addr);
-static void pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode);
static __inline void pagezero(void *page);
@@ -333,8 +317,6 @@ CTASSERT(1 << PTESHIFT == sizeof(pt_entry_t));
*/
CTASSERT(KERNBASE % (1 << 24) == 0);
-
-
void
pd_set(struct pmap *pmap, int ptepindex, vm_paddr_t val, int type)
{
@@ -366,24 +348,6 @@ pd_set(struct pmap *pmap, int ptepindex, vm_paddr_t val, int type)
}
/*
- * Move the kernel virtual free pointer to the next
- * 4MB. This is used to help improve performance
- * by using a large (4MB) page for much of the kernel
- * (.text, .data, .bss)
- */
-static vm_offset_t
-pmap_kmem_choose(vm_offset_t addr)
-{
- vm_offset_t newaddr = addr;
-
-#ifndef DISABLE_PSE
- if (cpu_feature & CPUID_PSE)
- newaddr = (addr + PDRMASK) & ~PDRMASK;
-#endif
- return newaddr;
-}
-
-/*
* Bootstrap the system enough to run with virtual memory.
*
* On the i386 this is called after mapping has already been enabled
@@ -402,15 +366,13 @@ pmap_bootstrap(vm_paddr_t firstaddr)
int i;
/*
- * XXX The calculation of virtual_avail is wrong. It's NKPT*PAGE_SIZE too
- * large. It should instead be correctly calculated in locore.s and
- * not based on 'first' (which is a physical address, not a virtual
- * address, for the start of unused physical memory). The kernel
- * page tables are NOT double mapped and thus should not be included
- * in this calculation.
+ * Initialize the first available kernel virtual address. However,
+ * using "firstaddr" may waste a few pages of the kernel virtual
+ * address space, because locore may not have mapped every physical
+ * page that it allocated. Preferably, locore would provide a first
+ * unused virtual address in addition to "firstaddr".
*/
virtual_avail = (vm_offset_t) KERNBASE + firstaddr;
- virtual_avail = pmap_kmem_choose(virtual_avail);
virtual_end = VM_MAX_KERNEL_ADDRESS;
@@ -475,8 +437,8 @@ pmap_bootstrap(vm_paddr_t firstaddr)
/*
* ptemap is used for pmap_pte_quick
*/
- SYSMAP(pt_entry_t *, PMAP1, PADDR1, 1);
- SYSMAP(pt_entry_t *, PMAP2, PADDR2, 1);
+ SYSMAP(pt_entry_t *, PMAP1, PADDR1, 1)
+ SYSMAP(pt_entry_t *, PMAP2, PADDR2, 1)
mtx_init(&PMAP2mutex, "PMAP2", NULL, MTX_DEF);
@@ -636,24 +598,8 @@ pmap_ptelist_init(vm_offset_t *head, void *base, int npages)
void
pmap_init(void)
{
- vm_page_t mpte;
- vm_size_t s;
- int i, pv_npg;
/*
- * Initialize the vm page array entries for the kernel pmap's
- * page table pages.
- */
- for (i = 0; i < nkpt; i++) {
- mpte = PHYS_TO_VM_PAGE(xpmap_mtop(PTD[i + KPTDI] & PG_FRAME));
- KASSERT(mpte >= vm_page_array &&
- mpte < &vm_page_array[vm_page_array_size],
- ("pmap_init: page table page is out of range"));
- mpte->pindex = i + KPTDI;
- mpte->phys_addr = xpmap_mtop(PTD[i + KPTDI] & PG_FRAME);
- }
-
- /*
* Initialize the address space (zone) for the pv entries. Set a
* high water mark so that the system can recover from excessive
* numbers of pv entries.
@@ -664,26 +610,6 @@ pmap_init(void)
pv_entry_max = roundup(pv_entry_max, _NPCPV);
pv_entry_high_water = 9 * (pv_entry_max / 10);
- /*
- * Are large page mappings enabled?
- */
- TUNABLE_INT_FETCH("vm.pmap.pg_ps_enabled", &pg_ps_enabled);
-
- /*
- * Calculate the size of the pv head table for superpages.
- */
- for (i = 0; phys_avail[i + 1]; i += 2);
- pv_npg = round_4mpage(phys_avail[(i - 2) + 1]) / NBPDR;
-
- /*
- * Allocate memory for the pv head table for superpages.
- */
- s = (vm_size_t)(pv_npg * sizeof(struct md_page));
- s = round_page(s);
- pv_table = (struct md_page *)kmem_alloc(kernel_map, s);
- for (i = 0; i < pv_npg; i++)
- TAILQ_INIT(&pv_table[i].pv_list);
-
pv_maxchunks = MAX(pv_entry_max / _NPCPV, maxproc);
pv_chunkbase = (struct pv_chunk *)kmem_alloc_nofault(kernel_map,
PAGE_SIZE * pv_maxchunks);
@@ -693,6 +619,18 @@ pmap_init(void)
}
+SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_max, CTLFLAG_RD, &pv_entry_max, 0,
+ "Max number of PV entries");
+SYSCTL_INT(_vm_pmap, OID_AUTO, shpgperproc, CTLFLAG_RD, &shpgperproc, 0,
+ "Page share factor per proc");
+
+static SYSCTL_NODE(_vm_pmap, OID_AUTO, pde, CTLFLAG_RD, 0,
+ "2/4MB page mapping counters");
+
+static u_long pmap_pde_mappings;
+SYSCTL_ULONG(_vm_pmap_pde, OID_AUTO, mappings, CTLFLAG_RD,
+ &pmap_pde_mappings, 0, "2/4MB page mappings");
+
/***************************************************
* Low level helper routines.....
***************************************************/
@@ -939,6 +877,8 @@ pmap_invalidate_cache(void)
}
#endif /* !SMP */
+#define PMAP_CLFLUSH_THRESHOLD (2 * 1024 * 1024)
+
void
pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva)
{
@@ -950,7 +890,8 @@ pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva)
if (cpu_feature & CPUID_SS)
; /* If "Self Snoop" is supported, do nothing. */
- else if (cpu_feature & CPUID_CLFSH) {
+ else if ((cpu_feature & CPUID_CLFSH) != 0 &&
+ eva - sva < PMAP_CLFLUSH_THRESHOLD) {
/*
* Otherwise, do per-cache line flush. Use the mfence
@@ -967,12 +908,27 @@ pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva)
/*
* No targeted cache flush methods are supported by CPU,
- * globally invalidate cache as a last resort.
+ * or the supplied range is bigger than 2MB.
+ * Globally invalidate cache.
*/
pmap_invalidate_cache();
}
}
+void
+pmap_invalidate_cache_pages(vm_page_t *pages, int count)
+{
+ int i;
+
+ if (count >= PMAP_CLFLUSH_THRESHOLD / PAGE_SIZE ||
+ (cpu_feature & CPUID_CLFSH) == 0) {
+ pmap_invalidate_cache();
+ } else {
+ for (i = 0; i < count; i++)
+ pmap_flush_page(pages[i]);
+ }
+}
+
/*
* Are we current address space or kernel? N.B. We return FALSE when
* a pmap's page table is in use because a kernel thread is borrowing
@@ -985,7 +941,7 @@ pmap_is_current(pmap_t pmap)
return (pmap == kernel_pmap ||
(pmap == vmspace_pmap(curthread->td_proc->p_vmspace) &&
- (pmap->pm_pdir[PTDPTDI] & PG_FRAME) == (PTDpde[0] & PG_FRAME)));
+ (pmap->pm_pdir[PTDPTDI] & PG_FRAME) == (PTDpde[0] & PG_FRAME)));
}
/*
@@ -1014,10 +970,9 @@ pmap_pte(pmap_t pmap, vm_offset_t va)
CTR3(KTR_PMAP, "pmap_pte: pmap=%p va=0x%x newpte=0x%08x",
pmap, va, (*PMAP2 & 0xffffffff));
}
-
return (PADDR2 + (i386_btop(va) & (NPTEPG - 1)));
}
- return (0);
+ return (NULL);
}
/*
@@ -1108,7 +1063,7 @@ pmap_extract(pmap_t pmap, vm_offset_t va)
pt_entry_t *pte;
pd_entry_t pde;
pt_entry_t pteval;
-
+
rtval = 0;
PMAP_LOCK(pmap);
pde = pmap->pm_pdir[va >> PDRSHIFT];
@@ -1167,7 +1122,7 @@ vm_page_t
pmap_extract_and_hold(pmap_t pmap, vm_offset_t va, vm_prot_t prot)
{
pd_entry_t pde;
- pt_entry_t pte;
+ pt_entry_t pte, *ptep;
vm_page_t m;
vm_paddr_t pa;
@@ -1179,26 +1134,25 @@ retry:
if (pde != 0) {
if (pde & PG_PS) {
if ((pde & PG_RW) || (prot & VM_PROT_WRITE) == 0) {
- if (vm_page_pa_tryrelock(pmap, (pde & PG_PS_FRAME) |
- (va & PDRMASK), &pa))
+ if (vm_page_pa_tryrelock(pmap, (pde &
+ PG_PS_FRAME) | (va & PDRMASK), &pa))
goto retry;
m = PHYS_TO_VM_PAGE((pde & PG_PS_FRAME) |
(va & PDRMASK));
vm_page_hold(m);
}
} else {
- sched_pin();
- pte = PT_GET(pmap_pte_quick(pmap, va));
- if (*PMAP1)
- PT_SET_MA(PADDR1, 0);
- if ((pte & PG_V) &&
+ ptep = pmap_pte(pmap, va);
+ pte = PT_GET(ptep);
+ pmap_pte_release(ptep);
+ if (pte != 0 &&
((pte & PG_RW) || (prot & VM_PROT_WRITE) == 0)) {
- if (vm_page_pa_tryrelock(pmap, pte & PG_FRAME, &pa))
+ if (vm_page_pa_tryrelock(pmap, pte & PG_FRAME,
+ &pa))
goto retry;
m = PHYS_TO_VM_PAGE(pte & PG_FRAME);
vm_page_hold(m);
}
- sched_unpin();
}
}
PA_UNLOCK_COND(pa);
@@ -1213,10 +1167,13 @@ retry:
/*
* Add a wired page to the kva.
* Note: not SMP coherent.
+ *
+ * This function may be used before pmap_bootstrap() is called.
*/
void
pmap_kenter(vm_offset_t va, vm_paddr_t pa)
{
+
PT_SET_MA(va, xpmap_ptom(pa)| PG_RW | PG_V | pgeflag);
}
@@ -1229,16 +1186,18 @@ pmap_kenter_ma(vm_offset_t va, vm_paddr_t ma)
pte_store_ma(pte, ma | PG_RW | PG_V | pgeflag);
}
-
-static __inline void
+static __inline void
pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode)
{
+
PT_SET_MA(va, pa | PG_RW | PG_V | pgeflag | pmap_cache_bits(mode, 0));
}
/*
* Remove a page from the kernel pagetables.
* Note: not SMP coherent.
+ *
+ * This function may be used before pmap_bootstrap() is called.
*/
PMAP_INLINE void
pmap_kremove(vm_offset_t va)
@@ -1335,7 +1294,6 @@ pmap_qenter(vm_offset_t sva, vm_page_t *ma, int count)
#endif
}
-
/*
* This routine tears out page mappings from the
* kernel -- it is meant only for temporary mappings.
@@ -1385,9 +1343,9 @@ pmap_unwire_pte_hold(pmap_t pmap, vm_page_t m, vm_page_t *free)
--m->wire_count;
if (m->wire_count == 0)
- return _pmap_unwire_pte_hold(pmap, m, free);
+ return (_pmap_unwire_pte_hold(pmap, m, free));
else
- return 0;
+ return (0);
}
static int
@@ -1428,7 +1386,7 @@ _pmap_unwire_pte_hold(pmap_t pmap, vm_page_t m, vm_page_t *free)
m->right = *free;
*free = m;
- return 1;
+ return (1);
}
/*
@@ -1442,17 +1400,25 @@ pmap_unuse_pt(pmap_t pmap, vm_offset_t va, vm_page_t *free)
vm_page_t mpte;
if (va >= VM_MAXUSER_ADDRESS)
- return 0;
+ return (0);
ptepde = PT_GET(pmap_pde(pmap, va));
mpte = PHYS_TO_VM_PAGE(ptepde & PG_FRAME);
- return pmap_unwire_pte_hold(pmap, mpte, free);
+ return (pmap_unwire_pte_hold(pmap, mpte, free));
}
+/*
+ * Initialize the pmap for the swapper process.
+ */
void
pmap_pinit0(pmap_t pmap)
{
PMAP_LOCK_INIT(pmap);
+ /*
+ * Since the page table directory is shared with the kernel pmap,
+ * which is already included in the list "allpmaps", this pmap does
+ * not need to be inserted into that list.
+ */
pmap->pm_pdir = (pd_entry_t *)(KERNBASE + (vm_offset_t)IdlePTD);
#ifdef PAE
pmap->pm_pdpt = (pdpt_entry_t *)(KERNBASE + (vm_offset_t)IdlePDPT);
@@ -1461,9 +1427,6 @@ pmap_pinit0(pmap_t pmap)
PCPU_SET(curpmap, pmap);
TAILQ_INIT(&pmap->pm_pvchunk);
bzero(&pmap->pm_stats, sizeof pmap->pm_stats);
- mtx_lock_spin(&allpmaps_lock);
- LIST_INSERT_HEAD(&allpmaps, pmap, pm_list);
- mtx_unlock_spin(&allpmaps_lock);
}
/*
@@ -1514,18 +1477,19 @@ pmap_pinit(pmap_t pmap)
ptdpg[i++] = m;
}
}
+
pmap_qenter((vm_offset_t)pmap->pm_pdir, ptdpg, NPGPTD);
- for (i = 0; i < NPGPTD; i++) {
+
+ for (i = 0; i < NPGPTD; i++)
if ((ptdpg[i]->flags & PG_ZERO) == 0)
- pagezero(&pmap->pm_pdir[i*NPTEPG]);
- }
+ pagezero(pmap->pm_pdir + (i * NPDEPG));
mtx_lock_spin(&allpmaps_lock);
LIST_INSERT_HEAD(&allpmaps, pmap, pm_list);
+ /* Copy the kernel page table directory entries. */
+ bcopy(PTD + KPTDI, pmap->pm_pdir + KPTDI, nkpt * sizeof(pd_entry_t));
mtx_unlock_spin(&allpmaps_lock);
- /* Wire in kernel global address entries. */
- bcopy(PTD + KPTDI, pmap->pm_pdir + KPTDI, nkpt * sizeof(pd_entry_t));
#ifdef PAE
pmap_qenter((vm_offset_t)pmap->pm_pdpt, &ptdpg[NPGPTD], 1);
if ((ptdpg[NPGPTD]->flags & PG_ZERO) == 0)
@@ -1577,7 +1541,7 @@ pmap_pinit(pmap_t pmap)
* mapped correctly.
*/
static vm_page_t
-_pmap_allocpte(pmap_t pmap, unsigned int ptepindex, int flags)
+_pmap_allocpte(pmap_t pmap, u_int ptepindex, int flags)
{
vm_paddr_t ptema;
vm_page_t m;
@@ -1612,6 +1576,7 @@ _pmap_allocpte(pmap_t pmap, unsigned int ptepindex, int flags)
* Map the pagetable page into the process address space, if
* it isn't already there.
*/
+
pmap->pm_stats.resident_count++;
ptema = VM_PAGE_TO_MACH(m);
@@ -1627,7 +1592,7 @@ _pmap_allocpte(pmap_t pmap, unsigned int ptepindex, int flags)
static vm_page_t
pmap_allocpte(pmap_t pmap, vm_offset_t va, int flags)
{
- unsigned ptepindex;
+ u_int ptepindex;
pd_entry_t ptema;
vm_page_t m;
@@ -1805,6 +1770,7 @@ pmap_release(pmap_t pmap)
#else
int npgptd = NPGPTD;
#endif
+
KASSERT(pmap->pm_stats.resident_count == 0,
("pmap_release: pmap resident count %ld != 0",
pmap->pm_stats.resident_count));
@@ -1860,7 +1826,7 @@ kvm_size(SYSCTL_HANDLER_ARGS)
{
unsigned long ksize = VM_MAX_KERNEL_ADDRESS - KERNBASE;
- return sysctl_handle_long(oidp, &ksize, 0, req);
+ return (sysctl_handle_long(oidp, &ksize, 0, req));
}
SYSCTL_PROC(_vm, OID_AUTO, kvm_size, CTLTYPE_LONG|CTLFLAG_RD,
0, 0, kvm_size, "IU", "Size of KVM");
@@ -1870,7 +1836,7 @@ kvm_free(SYSCTL_HANDLER_ARGS)
{
unsigned long kfree = VM_MAX_KERNEL_ADDRESS - kernel_vm_end;
- return sysctl_handle_long(oidp, &kfree, 0, req);
+ return (sysctl_handle_long(oidp, &kfree, 0, req));
}
SYSCTL_PROC(_vm, OID_AUTO, kvm_free, CTLTYPE_LONG|CTLFLAG_RD,
0, 0, kvm_free, "IU", "Amount of KVM free");
@@ -1899,12 +1865,12 @@ pmap_growkernel(vm_offset_t addr)
}
}
}
- addr = roundup2(addr, PAGE_SIZE * NPTEPG);
+ addr = roundup2(addr, NBPDR);
if (addr - 1 >= kernel_map->max_offset)
addr = kernel_map->max_offset;
while (kernel_vm_end < addr) {
if (pdir_pde(PTD, kernel_vm_end)) {
- kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NPTEPG) & ~(PAGE_SIZE * NPTEPG - 1);
+ kernel_vm_end = (kernel_vm_end + NBPDR) & ~PDRMASK;
if (kernel_vm_end - 1 >= kernel_map->max_offset) {
kernel_vm_end = kernel_map->max_offset;
break;
@@ -1912,17 +1878,16 @@ pmap_growkernel(vm_offset_t addr)
continue;
}
- /*
- * This index is bogus, but out of the way
- */
- nkpg = vm_page_alloc(NULL, nkpt,
- VM_ALLOC_NOOBJ | VM_ALLOC_SYSTEM | VM_ALLOC_WIRED);
- if (!nkpg)
+ nkpg = vm_page_alloc(NULL, kernel_vm_end >> PDRSHIFT,
+ VM_ALLOC_INTERRUPT | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED |
+ VM_ALLOC_ZERO);
+ if (nkpg == NULL)
panic("pmap_growkernel: no memory to grow kernel");
nkpt++;
- pmap_zero_page(nkpg);
+ if ((nkpg->flags & PG_ZERO) == 0)
+ pmap_zero_page(nkpg);
ptppaddr = VM_PAGE_TO_PHYS(nkpg);
newpdir = (pd_entry_t) (ptppaddr | PG_V | PG_RW | PG_A | PG_M);
vm_page_lock_queues();
@@ -1934,7 +1899,7 @@ pmap_growkernel(vm_offset_t addr)
mtx_unlock_spin(&allpmaps_lock);
vm_page_unlock_queues();
- kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NPTEPG) & ~(PAGE_SIZE * NPTEPG - 1);
+ kernel_vm_end = (kernel_vm_end + NBPDR) & ~PDRMASK;
if (kernel_vm_end - 1 >= kernel_map->max_offset) {
kernel_vm_end = kernel_map->max_offset;
break;
@@ -1954,7 +1919,7 @@ static __inline struct pv_chunk *
pv_to_chunk(pv_entry_t pv)
{
- return (struct pv_chunk *)((uintptr_t)pv & ~(uintptr_t)PAGE_MASK);
+ return ((struct pv_chunk *)((uintptr_t)pv & ~(uintptr_t)PAGE_MASK));
}
#define PV_PMAP(pv) (pv_to_chunk(pv)->pc_pmap)
@@ -2076,15 +2041,15 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv)
pc->pc_map[field] |= 1ul << bit;
/* move to head of list */
TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list);
- TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list);
for (idx = 0; idx < _NPCM; idx++)
- if (pc->pc_map[idx] != pc_freemask[idx])
+ if (pc->pc_map[idx] != pc_freemask[idx]) {
+ TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list);
return;
+ }
PV_STAT(pv_entry_spare -= _NPCPV);
PV_STAT(pc_chunk_count--);
PV_STAT(pc_chunk_frees++);
/* entire chunk is free, return it */
- TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list);
m = PHYS_TO_VM_PAGE(pmap_kextract((vm_offset_t)pc));
pmap_qremove((vm_offset_t)pc, 1);
vm_page_unwire(m, 0);
@@ -2313,10 +2278,10 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t eva)
pt_entry_t *pte;
vm_page_t free = NULL;
int anyvalid;
-
+
CTR3(KTR_PMAP, "pmap_remove: pmap=%p sva=0x%x eva=0x%x",
pmap, sva, eva);
-
+
/*
* Perform an unsynchronized read. This is, however, safe.
*/
@@ -2341,12 +2306,14 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t eva)
}
for (; sva < eva; sva = pdnxt) {
- unsigned pdirindex;
+ u_int pdirindex;
/*
* Calculate index for next page table.
*/
pdnxt = (sva + NBPDR) & ~PDRMASK;
+ if (pdnxt < sva)
+ pdnxt = eva;
if (pmap->pm_stats.resident_count == 0)
break;
@@ -2436,7 +2403,6 @@ pmap_remove_all(vm_page_t m)
PMAP_LOCK(pmap);
pmap->pm_stats.resident_count--;
pte = pmap_pte_quick(pmap, pv->pv_va);
-
tpte = *pte;
PT_SET_VA_MA(pte, 0, TRUE);
if (tpte & PG_W)
@@ -2500,9 +2466,11 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot)
PMAP_LOCK(pmap);
for (; sva < eva; sva = pdnxt) {
pt_entry_t obits, pbits;
- unsigned pdirindex;
+ u_int pdirindex;
pdnxt = (sva + NBPDR) & ~PDRMASK;
+ if (pdnxt < sva)
+ pdnxt = eva;
pdirindex = sva >> PDRSHIFT;
ptpaddr = pmap->pm_pdir[pdirindex];
@@ -2612,7 +2580,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_prot_t access, vm_page_t m,
KASSERT(va < UPT_MIN_ADDRESS || va >= UPT_MAX_ADDRESS,
("pmap_enter: invalid to pmap_enter page table pages (va: 0x%x)",
va));
- KASSERT((m->oflags & (VPO_UNMANAGED | VPO_BUSY)) != 0,
+ KASSERT((m->oflags & (VPO_UNMANAGED | VPO_BUSY)) != 0 ||
+ VM_OBJECT_LOCKED(m->object),
("pmap_enter: page %p is not busy", m));
mpte = NULL;
@@ -2815,10 +2784,9 @@ pmap_enter_object(pmap_t pmap, vm_offset_t start, vm_offset_t end,
multicall_entry_t mcl[16];
multicall_entry_t *mclp = mcl;
int error, count = 0;
-
+
VM_OBJECT_LOCK_ASSERT(m_start->object, MA_OWNED);
psize = atop(end - start);
-
mpte = NULL;
m = m_start;
vm_page_lock_queues();
@@ -2857,7 +2825,7 @@ pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot)
multicall_entry_t mcl, *mclp;
int count = 0;
mclp = &mcl;
-
+
CTR4(KTR_PMAP, "pmap_enter_quick: pmap=%p va=0x%x m=%p prot=0x%x",
pmap, va, m, prot);
@@ -2908,7 +2876,7 @@ pmap_enter_quick_locked(multicall_entry_t **mclpp, int *count, pmap_t pmap, vm_o
vm_paddr_t pa;
vm_page_t free;
multicall_entry_t *mcl = *mclpp;
-
+
KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva ||
(m->oflags & VPO_UNMANAGED) != 0,
("pmap_enter_quick_locked: managed mapping within the clean submap"));
@@ -2920,7 +2888,7 @@ pmap_enter_quick_locked(multicall_entry_t **mclpp, int *count, pmap_t pmap, vm_o
* resident, we are creating it here.
*/
if (va < VM_MAXUSER_ADDRESS) {
- unsigned ptepindex;
+ u_int ptepindex;
pd_entry_t ptema;
/*
@@ -3024,7 +2992,7 @@ pmap_enter_quick_locked(multicall_entry_t **mclpp, int *count, pmap_t pmap, vm_o
*mclpp = mcl + 1;
*count = *count + 1;
#endif
- return mpte;
+ return (mpte);
}
/*
@@ -3049,9 +3017,8 @@ pmap_kenter_temporary(vm_paddr_t pa, int i)
* are taken, but the code works.
*/
void
-pmap_object_init_pt(pmap_t pmap, vm_offset_t addr,
- vm_object_t object, vm_pindex_t pindex,
- vm_size_t size)
+pmap_object_init_pt(pmap_t pmap, vm_offset_t addr, vm_object_t object,
+ vm_pindex_t pindex, vm_size_t size)
{
pd_entry_t *pde;
vm_paddr_t pa, ptepa;
@@ -3069,6 +3036,7 @@ pmap_object_init_pt(pmap_t pmap, vm_offset_t addr,
KASSERT(p->valid == VM_PAGE_BITS_ALL,
("pmap_object_init_pt: invalid page %p", p));
pat_mode = p->md.pat_mode;
+
/*
* Abort the mapping if the first page is not physically
* aligned to a 2/4MB page boundary.
@@ -3076,6 +3044,7 @@ pmap_object_init_pt(pmap_t pmap, vm_offset_t addr,
ptepa = VM_PAGE_TO_PHYS(p);
if (ptepa & (NBPDR - 1))
return;
+
/*
* Skip the first page. Abort the mapping if the rest of
* the pages are not physically contiguous or have differing
@@ -3091,7 +3060,12 @@ pmap_object_init_pt(pmap_t pmap, vm_offset_t addr,
return;
p = TAILQ_NEXT(p, listq);
}
- /* Map using 2/4MB pages. */
+
+ /*
+ * Map using 2/4MB pages. Since "ptepa" is 2/4M aligned and
+ * "size" is a multiple of 2/4M, adding the PAT setting to
+ * "pa" will not affect the termination of this loop.
+ */
PMAP_LOCK(pmap);
for (pa = ptepa | pmap_cache_bits(pat_mode, 1); pa < ptepa +
size; pa += NBPDR) {
@@ -3155,7 +3129,7 @@ pmap_change_wiring(pmap_t pmap, vm_offset_t va, boolean_t wired)
void
pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, vm_size_t len,
- vm_offset_t src_addr)
+ vm_offset_t src_addr)
{
vm_page_t free;
vm_offset_t addr;
@@ -3192,12 +3166,14 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, vm_size_t len,
pt_entry_t *src_pte, *dst_pte;
vm_page_t dstmpte, srcmpte;
pd_entry_t srcptepaddr;
- unsigned ptepindex;
+ u_int ptepindex;
KASSERT(addr < UPT_MIN_ADDRESS,
("pmap_copy: invalid to pmap_copy page tables"));
pdnxt = (addr + NBPDR) & ~PDRMASK;
+ if (pdnxt < addr)
+ pdnxt = end_addr;
ptepindex = addr >> PDRSHIFT;
srcptepaddr = PT_GET(&src_pmap->pm_pdir[ptepindex]);
@@ -3231,7 +3207,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, vm_size_t len,
dstmpte = pmap_allocpte(dst_pmap, addr,
M_NOWAIT);
if (dstmpte == NULL)
- break;
+ goto out;
dst_pte = pmap_pte_quick(dst_pmap, addr);
if (*dst_pte == 0 &&
pmap_try_insert_pv_entry(dst_pmap, addr,
@@ -3255,6 +3231,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, vm_size_t len,
addr);
pmap_free_zero_pages(free);
}
+ goto out;
}
if (dstmpte->wire_count >= srcmpte->wire_count)
break;
@@ -3263,6 +3240,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, vm_size_t len,
src_pte++;
}
}
+out:
PT_UPDATES_FLUSH();
sched_unpin();
vm_page_unlock_queues();
@@ -3325,7 +3303,7 @@ pmap_zero_page_area(vm_page_t m, int off, int size)
sysmaps = &sysmaps_pcpu[PCPU_GET(cpuid)];
mtx_lock(&sysmaps->lock);
if (*sysmaps->CMAP2)
- panic("pmap_zero_page: CMAP2 busy");
+ panic("pmap_zero_page_area: CMAP2 busy");
sched_pin();
PT_SET_MA(sysmaps->CADDR2, PG_V | PG_RW | VM_PAGE_TO_MACH(m) | PG_A | PG_M);
@@ -3349,7 +3327,7 @@ pmap_zero_page_idle(vm_page_t m)
{
if (*CMAP3)
- panic("pmap_zero_page: CMAP3 busy");
+ panic("pmap_zero_page_idle: CMAP3 busy");
sched_pin();
PT_SET_MA(CADDR3, PG_V | PG_RW | VM_PAGE_TO_MACH(m) | PG_A | PG_M);
pagezero(CADDR3);
@@ -3448,21 +3426,15 @@ pmap_page_wired_mappings(vm_page_t m)
}
/*
- * Returns TRUE if the given page is mapped individually or as part of
- * a 4mpage. Otherwise, returns FALSE.
+ * Returns TRUE if the given page is mapped. Otherwise, returns FALSE.
*/
boolean_t
pmap_page_is_mapped(vm_page_t m)
{
- boolean_t rv;
if ((m->oflags & VPO_UNMANAGED) != 0)
return (FALSE);
- vm_page_lock_queues();
- rv = !TAILQ_EMPTY(&m->md.pv_list) ||
- !TAILQ_EMPTY(&pa_to_pvh(VM_PAGE_TO_PHYS(m))->pv_list);
- vm_page_unlock_queues();
- return (rv);
+ return (!TAILQ_EMPTY(&m->md.pv_list));
}
/*
@@ -3819,7 +3791,6 @@ pmap_ts_referenced(vm_page_t m)
PT_UPDATES_FLUSH();
if (*PMAP1)
PT_SET_MA(PADDR1, 0);
-
sched_unpin();
vm_page_unlock_queues();
return (rtval);
@@ -3854,7 +3825,7 @@ pmap_clear_modify(vm_page_t m)
pmap = PV_PMAP(pv);
PMAP_LOCK(pmap);
pte = pmap_pte_quick(pmap, pv->pv_va);
- if ((*pte & PG_M) != 0) {
+ if ((*pte & (PG_M | PG_RW)) == (PG_M | PG_RW)) {
/*
* Regardless of whether a pte is 32 or 64 bits
* in size, PG_M is among the least significant
@@ -3976,8 +3947,6 @@ pmap_unmapdev(vm_offset_t va, vm_size_t size)
void
pmap_page_set_memattr(vm_page_t m, vm_memattr_t ma)
{
- struct sysmaps *sysmaps;
- vm_offset_t sva, eva;
m->md.pat_mode = ma;
if ((m->flags & PG_FICTITIOUS) != 0)
@@ -4000,11 +3969,21 @@ pmap_page_set_memattr(vm_page_t m, vm_memattr_t ma)
* invalidation. In the worst case, whole cache is flushed by
* pmap_invalidate_cache_range().
*/
- if ((cpu_feature & (CPUID_SS|CPUID_CLFSH)) == CPUID_CLFSH) {
+ if ((cpu_feature & CPUID_SS) == 0)
+ pmap_flush_page(m);
+}
+
+static void
+pmap_flush_page(vm_page_t m)
+{
+ struct sysmaps *sysmaps;
+ vm_offset_t sva, eva;
+
+ if ((cpu_feature & CPUID_CLFSH) != 0) {
sysmaps = &sysmaps_pcpu[PCPU_GET(cpuid)];
mtx_lock(&sysmaps->lock);
if (*sysmaps->CMAP2)
- panic("pmap_page_set_memattr: CMAP2 busy");
+ panic("pmap_flush_page: CMAP2 busy");
sched_pin();
PT_SET_MA(sysmaps->CADDR2, PG_V | PG_RW |
VM_PAGE_TO_MACH(m) | PG_A | PG_M |
@@ -4012,21 +3991,35 @@ pmap_page_set_memattr(vm_page_t m, vm_memattr_t ma)
invlcaddr(sysmaps->CADDR2);
sva = (vm_offset_t)sysmaps->CADDR2;
eva = sva + PAGE_SIZE;
- } else
- sva = eva = 0; /* gcc */
- pmap_invalidate_cache_range(sva, eva);
- if (sva != 0) {
+
+ /*
+ * Use mfence despite the ordering implied by
+ * mtx_{un,}lock() because clflush is not guaranteed
+ * to be ordered by any other instruction.
+ */
+ mfence();
+ for (; sva < eva; sva += cpu_clflush_line_size)
+ clflush(sva);
+ mfence();
PT_SET_MA(sysmaps->CADDR2, 0);
sched_unpin();
mtx_unlock(&sysmaps->lock);
- }
+ } else
+ pmap_invalidate_cache();
}
+/*
+ * Changes the specified virtual address range's memory type to that given by
+ * the parameter "mode". The specified virtual address range must be
+ * completely contained within either the kernel map.
+ *
+ * Returns zero if the change completed successfully, and either EINVAL or
+ * ENOMEM if the change failed. Specifically, EINVAL is returned if some part
+ * of the virtual address range was not mapped, and ENOMEM is returned if
+ * there was insufficient memory available to complete the change.
+ */
int
-pmap_change_attr(va, size, mode)
- vm_offset_t va;
- vm_size_t size;
- int mode;
+pmap_change_attr(vm_offset_t va, vm_size_t size, int mode)
{
vm_offset_t base, offset, tmpva;
pt_entry_t *pte;
@@ -4080,8 +4073,8 @@ pmap_change_attr(va, size, mode)
}
/*
- * Flush CPU caches to make sure any data isn't cached that shouldn't
- * be, etc.
+ * Flush CPU caches to make sure any data isn't cached that
+ * shouldn't be, etc.
*/
if (changed) {
pmap_invalidate_range(kernel_pmap, base, tmpva);
@@ -4099,7 +4092,7 @@ pmap_mincore(pmap_t pmap, vm_offset_t addr, vm_paddr_t *locked_pa)
pt_entry_t *ptep, pte;
vm_paddr_t pa;
int val;
-
+
PMAP_LOCK(pmap);
retry:
ptep = pmap_pte(pmap, addr);
@@ -4282,7 +4275,7 @@ pmap_pid_dump(int pid)
printf("\n");
}
sx_sunlock(&allproc_lock);
- return npte;
+ return (npte);
}
pte = pmap_pte(pmap, va);
if (pte && pmap_pte_v(pte)) {
@@ -4307,7 +4300,7 @@ pmap_pid_dump(int pid)
}
}
sx_sunlock(&allproc_lock);
- return npte;
+ return (npte);
}
#endif
diff --git a/sys/ia64/conf/GENERIC b/sys/ia64/conf/GENERIC
index 542b832..2a88215 100644
--- a/sys/ia64/conf/GENERIC
+++ b/sys/ia64/conf/GENERIC
@@ -26,6 +26,8 @@ ident GENERIC
makeoptions DEBUG=-g # Build kernel with debug information.
options AUDIT # Security event auditing
+options CAPABILITY_MODE # Capsicum capability mode
+options CAPABILITIES # Capsicum capabilities
options CD9660 # ISO 9660 Filesystem
options COMPAT_FREEBSD7 # Compatible with FreeBSD7
options FFS # Berkeley Fast Filesystem
@@ -111,7 +113,8 @@ device ch # Media changer
device da # Direct Access (ie disk)
device pass # Passthrough (direct ATA/SCSI access)
device sa # Sequential Access (ie tape)
-device ses # Environmental Services (and SAF-TE)
+device ses # Enclosure Services (SES and SAF-TE)
+device ctl # CAM Target Layer
# RAID controllers
device aac # Adaptec FSA RAID
@@ -178,6 +181,15 @@ device uslcom # SI Labs CP2101/CP2102 serial adapters
device uvisor # Visor and Palm devices
device uvscom # USB serial support for DDI pocket's PHS
+# Wireless NIC cards.
+# The wlan(4) module assumes this, so just define it so it
+# at least correctly loads.
+options IEEE80211_SUPPORT_MESH
+
+# The ath(4) and ath_hal(4) code requires this. The module currently
+# builds everything including AR5416 (and later 11n NIC) support.
+options AH_SUPPORT_AR5416
+
# FireWire support
device fwip # IP over FireWire (RFC 2734,3146)
# sbp(4) works for some systems but causes boot failure on others
diff --git a/sys/ia64/ia64/ssc.c b/sys/ia64/ia64/ssc.c
index ff810fc..95a6165 100644
--- a/sys/ia64/ia64/ssc.c
+++ b/sys/ia64/ia64/ssc.c
@@ -102,6 +102,16 @@ ssc_cnterm(struct consdev *cp)
}
static void
+ssc_cngrab(struct consdev *cp)
+{
+}
+
+static void
+ssc_cnungrab(struct consdev *cp)
+{
+}
+
+static void
ssc_cnattach(void *arg)
{
struct tty *tp;
diff --git a/sys/ia64/ia64/uma_machdep.c b/sys/ia64/ia64/uma_machdep.c
index c8084ba..37353ff 100644
--- a/sys/ia64/ia64/uma_machdep.c
+++ b/sys/ia64/ia64/uma_machdep.c
@@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$");
void *
uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait)
{
- static vm_pindex_t color;
void *va;
vm_page_t m;
int pflags;
@@ -55,7 +54,7 @@ uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait)
pflags |= VM_ALLOC_ZERO;
for (;;) {
- m = vm_page_alloc(NULL, color++, pflags | VM_ALLOC_NOOBJ);
+ m = vm_page_alloc(NULL, 0, pflags | VM_ALLOC_NOOBJ);
if (m == NULL) {
if (wait & M_NOWAIT)
return (NULL);
diff --git a/sys/ia64/include/_types.h b/sys/ia64/include/_types.h
index 0c2f5cc..66ac0cc 100644
--- a/sys/ia64/include/_types.h
+++ b/sys/ia64/include/_types.h
@@ -46,7 +46,7 @@
/*
* Basic types upon which most other types are built.
*/
-typedef __signed char __int8_t;
+typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef short __int16_t;
typedef unsigned short __uint16_t;
diff --git a/sys/ia64/include/float.h b/sys/ia64/include/float.h
index 2ae58a9..171be6b 100644
--- a/sys/ia64/include/float.h
+++ b/sys/ia64/include/float.h
@@ -49,22 +49,32 @@ __END_DECLS
#define FLT_MANT_DIG 24 /* p */
#define FLT_EPSILON 1.19209290E-07F /* b**(1-p) */
#define FLT_DIG 6 /* floor((p-1)*log10(b))+(b == 10) */
-#define FLT_MIN_EXP -125 /* emin */
+#define FLT_MIN_EXP (-125) /* emin */
#define FLT_MIN 1.17549435E-38F /* b**(emin-1) */
-#define FLT_MIN_10_EXP -37 /* ceil(log10(b**(emin-1))) */
+#define FLT_MIN_10_EXP (-37) /* ceil(log10(b**(emin-1))) */
#define FLT_MAX_EXP 128 /* emax */
#define FLT_MAX 3.40282347E+38F /* (1-b**(-p))*b**emax */
#define FLT_MAX_10_EXP 38 /* floor(log10((1-b**(-p))*b**emax)) */
+#if __ISO_C_VISIBLE >= 2011
+#define FLT_TRUE_MIN 1.40129846E-45F /* b**(emin-p) */
+#define FLT_DECIMAL_DIG 9 /* ceil(1+p*log10(b)) */
+#define FLT_HAS_SUBNORM 1
+#endif /* __ISO_C_VISIBLE >= 2011 */
#define DBL_MANT_DIG 53
#define DBL_EPSILON 2.2204460492503131E-16
#define DBL_DIG 15
-#define DBL_MIN_EXP -1021
+#define DBL_MIN_EXP (-1021)
#define DBL_MIN 2.2250738585072014E-308
-#define DBL_MIN_10_EXP -307
+#define DBL_MIN_10_EXP (-307)
#define DBL_MAX_EXP 1024
#define DBL_MAX 1.7976931348623157E+308
#define DBL_MAX_10_EXP 308
+#if __ISO_C_VISIBLE >= 2011
+#define DBL_TRUE_MIN 4.9406564584124654E-324
+#define DBL_DECIMAL_DIG 17
+#define DBL_HAS_SUBNORM 1
+#endif /* __ISO_C_VISIBLE >= 2011 */
#define LDBL_MANT_DIG 64
#define LDBL_EPSILON 1.0842021724855044340E-19L
@@ -75,5 +85,10 @@ __END_DECLS
#define LDBL_MAX_EXP 16384
#define LDBL_MAX 1.1897314953572317650E+4932L
#define LDBL_MAX_10_EXP 4932
+#if __ISO_C_VISIBLE >= 2011
+#define LDBL_TRUE_MIN 3.6451995318824746025E-4951L
+#define LDBL_DECIMAL_DIG 21
+#define LDBL_HAS_SUBNORM 1
+#endif /* __ISO_C_VISIBLE >= 2011 */
#endif /* _MACHINE_FLOAT_H_ */
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
index 8455f48..4da2ad78 100644
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2000 David O'Brien
- * Copyright (c) 1995-1996 Søren Schmidt
+ * Copyright (c) 1995-1996 Søren Schmidt
* Copyright (c) 1996 Peter Wemm
* All rights reserved.
*
@@ -86,9 +86,9 @@ static Elf_Brandinfo *__elfN(get_brandinfo)(struct image_params *imgp,
const char *interp, int32_t *osrel);
static int __elfN(load_file)(struct proc *p, const char *file, u_long *addr,
u_long *entry, size_t pagesize);
-static int __elfN(load_section)(struct vmspace *vmspace, vm_object_t object,
- vm_offset_t offset, caddr_t vmaddr, size_t memsz, size_t filsz,
- vm_prot_t prot, size_t pagesize);
+static int __elfN(load_section)(struct image_params *imgp, vm_offset_t offset,
+ caddr_t vmaddr, size_t memsz, size_t filsz, vm_prot_t prot,
+ size_t pagesize);
static int __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp);
static boolean_t __elfN(freebsd_trans_osrel)(const Elf_Note *note,
int32_t *osrel);
@@ -445,13 +445,14 @@ __elfN(map_insert)(vm_map_t map, vm_object_t object, vm_ooffset_t offset,
}
static int
-__elfN(load_section)(struct vmspace *vmspace,
- vm_object_t object, vm_offset_t offset,
- caddr_t vmaddr, size_t memsz, size_t filsz, vm_prot_t prot,
- size_t pagesize)
+__elfN(load_section)(struct image_params *imgp, vm_offset_t offset,
+ caddr_t vmaddr, size_t memsz, size_t filsz, vm_prot_t prot,
+ size_t pagesize)
{
struct sf_buf *sf;
size_t map_len;
+ vm_map_t map;
+ vm_object_t object;
vm_offset_t map_addr;
int error, rv, cow;
size_t copy_len;
@@ -466,12 +467,13 @@ __elfN(load_section)(struct vmspace *vmspace,
* While I'm here, might as well check for something else that
* is invalid: filsz cannot be greater than memsz.
*/
- if ((off_t)filsz + offset > object->un_pager.vnp.vnp_size ||
- filsz > memsz) {
+ if ((off_t)filsz + offset > imgp->attr->va_size || filsz > memsz) {
uprintf("elf_load_section: truncated ELF file\n");
return (ENOEXEC);
}
+ object = imgp->object;
+ map = &imgp->proc->p_vmspace->vm_map;
map_addr = trunc_page_ps((vm_offset_t)vmaddr, pagesize);
file_addr = trunc_page_ps(offset, pagesize);
@@ -491,7 +493,7 @@ __elfN(load_section)(struct vmspace *vmspace,
cow = MAP_COPY_ON_WRITE | MAP_PREFAULT |
(prot & VM_PROT_WRITE ? 0 : MAP_DISABLE_COREDUMP);
- rv = __elfN(map_insert)(&vmspace->vm_map,
+ rv = __elfN(map_insert)(map,
object,
file_addr, /* file offset */
map_addr, /* virtual start */
@@ -521,8 +523,8 @@ __elfN(load_section)(struct vmspace *vmspace,
/* This had damn well better be true! */
if (map_len != 0) {
- rv = __elfN(map_insert)(&vmspace->vm_map, NULL, 0, map_addr,
- map_addr + map_len, VM_PROT_ALL, 0);
+ rv = __elfN(map_insert)(map, NULL, 0, map_addr, map_addr +
+ map_len, VM_PROT_ALL, 0);
if (rv != KERN_SUCCESS) {
return (EINVAL);
}
@@ -550,8 +552,8 @@ __elfN(load_section)(struct vmspace *vmspace,
* set it to the specified protection.
* XXX had better undo the damage from pasting over the cracks here!
*/
- vm_map_protect(&vmspace->vm_map, trunc_page(map_addr),
- round_page(map_addr + map_len), prot, FALSE);
+ vm_map_protect(map, trunc_page(map_addr), round_page(map_addr +
+ map_len), prot, FALSE);
return (0);
}
@@ -580,7 +582,6 @@ __elfN(load_file)(struct proc *p, const char *file, u_long *addr,
const Elf_Ehdr *hdr = NULL;
const Elf_Phdr *phdr = NULL;
struct nameidata *nd;
- struct vmspace *vmspace = p->p_vmspace;
struct vattr *attr;
struct image_params *imgp;
vm_prot_t prot;
@@ -672,11 +673,10 @@ __elfN(load_file)(struct proc *p, const char *file, u_long *addr,
if (phdr[i].p_type == PT_LOAD && phdr[i].p_memsz != 0) {
/* Loadable segment */
prot = __elfN(trans_prot)(phdr[i].p_flags);
- if ((error = __elfN(load_section)(vmspace,
- imgp->object, phdr[i].p_offset,
+ error = __elfN(load_section)(imgp, phdr[i].p_offset,
(caddr_t)(uintptr_t)phdr[i].p_vaddr + rbase,
- phdr[i].p_memsz, phdr[i].p_filesz, prot,
- pagesize)) != 0)
+ phdr[i].p_memsz, phdr[i].p_filesz, prot, pagesize);
+ if (error != 0)
goto fail;
/*
* Establish the base address if this is the
@@ -800,6 +800,9 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp)
* than zero. Consequently, the vnode lock is not needed by vrele().
* However, in cases where the vnode lock is external, such as nullfs,
* v_usecount may become zero.
+ *
+ * The VV_TEXT flag prevents modifications to the executable while
+ * the vnode is unlocked.
*/
VOP_UNLOCK(imgp->vp, 0);
@@ -810,8 +813,6 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp)
if (error)
return (error);
- vmspace = imgp->proc->p_vmspace;
-
for (i = 0; i < hdr->e_phnum; i++) {
switch (phdr[i].p_type) {
case PT_LOAD: /* Loadable segment */
@@ -828,11 +829,11 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp)
prot |= VM_PROT_EXECUTE;
#endif
- if ((error = __elfN(load_section)(vmspace,
- imgp->object, phdr[i].p_offset,
+ error = __elfN(load_section)(imgp, phdr[i].p_offset,
(caddr_t)(uintptr_t)phdr[i].p_vaddr + et_dyn_addr,
phdr[i].p_memsz, phdr[i].p_filesz, prot,
- sv->sv_pagesize)) != 0)
+ sv->sv_pagesize);
+ if (error != 0)
return (error);
/*
@@ -901,6 +902,7 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp)
return (ENOMEM);
}
+ vmspace = imgp->proc->p_vmspace;
vmspace->vm_tsize = text_size >> PAGE_SHIFT;
vmspace->vm_taddr = (caddr_t)(uintptr_t)text_addr;
vmspace->vm_dsize = data_size >> PAGE_SHIFT;
@@ -912,8 +914,8 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp)
* calculation is that it leaves room for the heap to grow to
* its maximum allowed size.
*/
- addr = round_page((vm_offset_t)imgp->proc->p_vmspace->vm_daddr +
- lim_max(imgp->proc, RLIMIT_DATA));
+ addr = round_page((vm_offset_t)vmspace->vm_daddr + lim_max(imgp->proc,
+ RLIMIT_DATA));
PROC_UNLOCK(imgp->proc);
imgp->entry_addr = entry;
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 61bf595..d6cd3d7 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -467,7 +467,8 @@ proc0_init(void *dummy __unused)
td->td_priority = PVM;
td->td_base_pri = PVM;
td->td_oncpu = 0;
- td->td_flags = TDF_INMEM|TDP_KTHREAD;
+ td->td_flags = TDF_INMEM;
+ td->td_pflags = TDP_KTHREAD;
td->td_cpuset = cpuset_thread0();
prison0.pr_cpuset = cpuset_ref(td->td_cpuset);
p->p_peers = 0;
diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c
index 267a207..85737e8 100644
--- a/sys/kern/kern_conf.c
+++ b/sys/kern/kern_conf.c
@@ -55,6 +55,7 @@ struct mtx devmtx;
static void destroy_devl(struct cdev *dev);
static int destroy_dev_sched_cbl(struct cdev *dev,
void (*cb)(void *), void *arg);
+static void destroy_dev_tq(void *ctx, int pending);
static int make_dev_credv(int flags, struct cdev **dres, struct cdevsw *devsw,
int unit, struct ucred *cr, uid_t uid, gid_t gid, int mode, const char *fmt,
va_list ap);
@@ -1298,7 +1299,7 @@ clone_cleanup(struct clonedevs **cdp)
static TAILQ_HEAD(, cdev_priv) dev_ddtr =
TAILQ_HEAD_INITIALIZER(dev_ddtr);
-static struct task dev_dtr_task;
+static struct task dev_dtr_task = TASK_INITIALIZER(0, destroy_dev_tq, NULL);
static void
destroy_dev_tq(void *ctx, int pending)
@@ -1386,15 +1387,6 @@ drain_dev_clone_events(void)
sx_xunlock(&clone_drain_lock);
}
-static void
-devdtr_init(void *dummy __unused)
-{
-
- TASK_INIT(&dev_dtr_task, 0, destroy_dev_tq, NULL);
-}
-
-SYSINIT(devdtr, SI_SUB_DEVFS, SI_ORDER_SECOND, devdtr_init, NULL);
-
#include "opt_ddb.h"
#ifdef DDB
#include <sys/kernel.h>
diff --git a/sys/kern/kern_cons.c b/sys/kern/kern_cons.c
index 42b98cf..5346bc3 100644
--- a/sys/kern/kern_cons.c
+++ b/sys/kern/kern_cons.c
@@ -1,6 +1,9 @@
/*-
* Copyright (c) 1988 University of Utah.
* Copyright (c) 1991 The Regents of the University of California.
+ * Copyright (c) 1999 Michael Smith
+ * Copyright (c) 2005 Pawel Jakub Dawidek <pjd@FreeBSD.org>
+ *
* All rights reserved.
*
* This code is derived from software contributed to Berkeley by
@@ -344,6 +347,32 @@ SYSCTL_PROC(_kern, OID_AUTO, consmute, CTLTYPE_INT|CTLFLAG_RW,
0, sizeof(cn_mute), sysctl_kern_consmute, "I",
"State of the console muting");
+void
+cngrab()
+{
+ struct cn_device *cnd;
+ struct consdev *cn;
+
+ STAILQ_FOREACH(cnd, &cn_devlist, cnd_next) {
+ cn = cnd->cnd_cn;
+ if (!kdb_active || !(cn->cn_flags & CN_FLAG_NODEBUG))
+ cn->cn_ops->cn_grab(cn);
+ }
+}
+
+void
+cnungrab()
+{
+ struct cn_device *cnd;
+ struct consdev *cn;
+
+ STAILQ_FOREACH(cnd, &cn_devlist, cnd_next) {
+ cn = cnd->cnd_cn;
+ if (!kdb_active || !(cn->cn_flags & CN_FLAG_NODEBUG))
+ cn->cn_ops->cn_ungrab(cn);
+ }
+}
+
/*
* Low level console routines.
*/
@@ -382,6 +411,55 @@ cncheckc(void)
}
void
+cngets(char *cp, size_t size, int visible)
+{
+ char *lp, *end;
+ int c;
+
+ cngrab();
+
+ lp = cp;
+ end = cp + size - 1;
+ for (;;) {
+ c = cngetc() & 0177;
+ switch (c) {
+ case '\n':
+ case '\r':
+ cnputc(c);
+ *lp = '\0';
+ cnungrab();
+ return;
+ case '\b':
+ case '\177':
+ if (lp > cp) {
+ if (visible) {
+ cnputc(c);
+ cnputs(" \b");
+ }
+ lp--;
+ }
+ continue;
+ case '\0':
+ continue;
+ default:
+ if (lp < end) {
+ switch (visible) {
+ case GETS_NOECHO:
+ break;
+ case GETS_ECHOPASS:
+ cnputc('*');
+ break;
+ default:
+ cnputc(c);
+ break;
+ }
+ *lp++ = c;
+ }
+ }
+ }
+}
+
+void
cnputc(int c)
{
struct cn_device *cnd;
@@ -401,8 +479,10 @@ cnputc(int c)
if (console_pausing && c == '\n' && !kdb_active) {
for (cp = console_pausestr; *cp != '\0'; cp++)
cnputc(*cp);
+ cngrab();
if (cngetc() == '.')
console_pausing = 0;
+ cnungrab();
cnputc('\r');
for (cp = console_pausestr; *cp != '\0'; cp++)
cnputc(' ');
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index 4545848..135f798 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -471,6 +471,7 @@ interpret:
* actually an executable image.
*/
textset = imgp->vp->v_vflag & VV_TEXT;
+ ASSERT_VOP_ELOCKED(imgp->vp, "vv_text");
imgp->vp->v_vflag |= VV_TEXT;
error = exec_map_first_page(imgp);
@@ -502,8 +503,10 @@ interpret:
if (error) {
if (error == -1) {
- if (textset == 0)
+ if (textset == 0) {
+ ASSERT_VOP_ELOCKED(imgp->vp, "vv_text");
imgp->vp->v_vflag &= ~VV_TEXT;
+ }
error = ENOEXEC;
}
goto exec_fail_dealloc;
@@ -596,7 +599,7 @@ interpret:
/* close files on exec */
fdcloseexec(td);
- vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY);
+ vn_lock(imgp->vp, LK_SHARED | LK_RETRY);
/* Get a reference to the vnode prior to locking the proc */
VREF(binvp);
@@ -701,7 +704,7 @@ interpret:
VOP_UNLOCK(imgp->vp, 0);
setugidsafety(td);
error = fdcheckstd(td);
- vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY);
+ vn_lock(imgp->vp, LK_SHARED | LK_RETRY);
if (error != 0)
goto done1;
PROC_LOCK(p);
@@ -805,7 +808,7 @@ interpret:
pe.pm_entryaddr = imgp->entry_addr;
PMC_CALL_HOOK_X(td, PMC_FN_PROCESS_EXEC, (void *) &pe);
- vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY);
+ vn_lock(imgp->vp, LK_SHARED | LK_RETRY);
} else
PROC_UNLOCK(p);
#else /* !HWPMC_HOOKS */
@@ -857,7 +860,7 @@ done1:
if (tracecred != NULL)
crfree(tracecred);
#endif
- vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY);
+ vn_lock(imgp->vp, LK_SHARED | LK_RETRY);
pargs_drop(oldargs);
pargs_drop(newargs);
if (oldsigacts != NULL)
diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c
index b9ed881..c2562de 100644
--- a/sys/kern/kern_intr.c
+++ b/sys/kern/kern_intr.c
@@ -633,7 +633,7 @@ intr_event_add_handler(struct intr_event *ie, const char *name,
mtx_lock(&ie->ie_lock);
it->it_event = ie;
ih->ih_thread = it;
- ithread_update(it); // XXX - do we really need this?!?!?
+ ithread_update(it); /* XXX - do we really need this?!?!? */
} else { /* Create the global per-event thread if we need one. */
while (ie->ie_thread == NULL && handler != NULL) {
if (ie->ie_flags & IE_ADDING_THREAD)
@@ -693,9 +693,9 @@ intr_event_describe_handler(struct intr_event *ie, void *cookie,
* description at that point. If one is not found, find the
* end of the name to use as the insertion point.
*/
- start = index(ih->ih_name, ':');
+ start = strchr(ih->ih_name, ':');
if (start == NULL)
- start = index(ih->ih_name, 0);
+ start = strchr(ih->ih_name, 0);
/*
* See if there is enough remaining room in the string for the
@@ -1832,8 +1832,8 @@ DB_SHOW_COMMAND(intr, db_show_intr)
struct intr_event *ie;
int all, verbose;
- verbose = index(modif, 'v') != NULL;
- all = index(modif, 'a') != NULL;
+ verbose = strchr(modif, 'v') != NULL;
+ all = strchr(modif, 'a') != NULL;
TAILQ_FOREACH(ie, &event_list, ie_list) {
if (!all && TAILQ_EMPTY(&ie->ie_handlers))
continue;
diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c
index 84f5575..9f5e8b8 100644
--- a/sys/kern/kern_jail.c
+++ b/sys/kern/kern_jail.c
@@ -521,6 +521,7 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags)
struct prison *pr, *deadpr, *mypr, *ppr, *tpr;
struct vnode *root;
char *domain, *errmsg, *host, *name, *namelc, *p, *path, *uuid;
+ char *g_path;
#if defined(INET) || defined(INET6)
struct prison *tppr;
void *op;
@@ -531,6 +532,7 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags)
int gotchildmax, gotenforce, gothid, gotslevel;
int fi, jid, jsys, len, level;
int childmax, slevel, vfslocked;
+ int fullpath_disabled;
#if defined(INET) || defined(INET6)
int ii, ij;
#endif
@@ -574,6 +576,7 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags)
#ifdef INET6
ip6 = NULL;
#endif
+ g_path = NULL;
error = vfs_copyopt(opts, "jid", &jid, sizeof(jid));
if (error == ENOENT)
@@ -880,6 +883,7 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags)
}
#endif
+ fullpath_disabled = 0;
root = NULL;
error = vfs_getopt(opts, "path", (void **)&path, &len);
if (error == ENOENT)
@@ -897,30 +901,44 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags)
error = EINVAL;
goto done_free;
}
- if (len < 2 || (len == 2 && path[0] == '/'))
- path = NULL;
- else {
+ NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | MPSAFE, UIO_SYSSPACE,
+ path, td);
+ error = namei(&nd);
+ if (error)
+ goto done_free;
+ vfslocked = NDHASGIANT(&nd);
+ root = nd.ni_vp;
+ NDFREE(&nd, NDF_ONLY_PNBUF);
+ g_path = malloc(MAXPATHLEN, M_TEMP, M_WAITOK);
+ strlcpy(g_path, path, MAXPATHLEN);
+ error = vn_path_to_global_path(td, root, g_path, MAXPATHLEN);
+ if (error == 0)
+ path = g_path;
+ else if (error == ENODEV) {
+ /* proceed if sysctl debug.disablefullpath == 1 */
+ fullpath_disabled = 1;
+ if (len < 2 || (len == 2 && path[0] == '/'))
+ path = NULL;
+ } else {
+ /* exit on other errors */
+ VFS_UNLOCK_GIANT(vfslocked);
+ goto done_free;
+ }
+ if (root->v_type != VDIR) {
+ error = ENOTDIR;
+ vput(root);
+ VFS_UNLOCK_GIANT(vfslocked);
+ goto done_free;
+ }
+ VOP_UNLOCK(root, 0);
+ VFS_UNLOCK_GIANT(vfslocked);
+ if (fullpath_disabled) {
/* Leave room for a real-root full pathname. */
if (len + (path[0] == '/' && strcmp(mypr->pr_path, "/")
? strlen(mypr->pr_path) : 0) > MAXPATHLEN) {
error = ENAMETOOLONG;
goto done_free;
}
- NDINIT(&nd, LOOKUP, MPSAFE | FOLLOW, UIO_SYSSPACE,
- path, td);
- error = namei(&nd);
- if (error)
- goto done_free;
- vfslocked = NDHASGIANT(&nd);
- root = nd.ni_vp;
- NDFREE(&nd, NDF_ONLY_PNBUF);
- if (root->v_type != VDIR) {
- error = ENOTDIR;
- vrele(root);
- VFS_UNLOCK_GIANT(vfslocked);
- goto done_free;
- }
- VFS_UNLOCK_GIANT(vfslocked);
}
}
@@ -1583,7 +1601,8 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags)
}
if (path != NULL) {
/* Try to keep a real-rooted full pathname. */
- if (path[0] == '/' && strcmp(mypr->pr_path, "/"))
+ if (fullpath_disabled && path[0] == '/' &&
+ strcmp(mypr->pr_path, "/"))
snprintf(pr->pr_path, sizeof(pr->pr_path), "%s%s",
mypr->pr_path, path);
else
@@ -1806,6 +1825,8 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags)
#ifdef INET6
free(ip6, M_PRISON);
#endif
+ if (g_path != NULL)
+ free(g_path, M_TEMP);
vfs_freeopts(opts);
return (error);
}
diff --git a/sys/kern/kern_ktr.c b/sys/kern/kern_ktr.c
index 004a19e..60bc9c8 100644
--- a/sys/kern/kern_ktr.c
+++ b/sys/kern/kern_ktr.c
@@ -341,9 +341,9 @@ DB_SHOW_COMMAND(ktr, db_ktr_all)
tstate.cur = (ktr_idx - 1) & (KTR_ENTRIES - 1);
tstate.first = -1;
db_ktr_verbose = 0;
- db_ktr_verbose |= (index(modif, 'v') != NULL) ? 2 : 0;
- db_ktr_verbose |= (index(modif, 'V') != NULL) ? 1 : 0; /* just timestap please */
- if (index(modif, 'a') != NULL) {
+ db_ktr_verbose |= (strchr(modif, 'v') != NULL) ? 2 : 0;
+ db_ktr_verbose |= (strchr(modif, 'V') != NULL) ? 1 : 0; /* just timestap please */
+ if (strchr(modif, 'a') != NULL) {
db_disable_pager();
while (cncheckc() != -1)
if (db_mach_vtrace() == 0)
diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c
index d7e5ade..74fe19f 100644
--- a/sys/kern/kern_linker.c
+++ b/sys/kern/kern_linker.c
@@ -1013,7 +1013,7 @@ kern_kldload(struct thread *td, const char *file, int *fileid)
* (kldname.ko, or kldname.ver.ko) treat it as an interface
* name.
*/
- if (index(file, '/') || index(file, '.')) {
+ if (strchr(file, '/') || strchr(file, '.')) {
kldname = file;
modname = NULL;
} else {
@@ -1906,7 +1906,7 @@ linker_search_kld(const char *name)
int len;
/* qualified at all? */
- if (index(name, '/'))
+ if (strchr(name, '/'))
return (linker_strdup(name));
/* traverse the linker path */
@@ -1927,7 +1927,7 @@ linker_basename(const char *path)
{
const char *filename;
- filename = rindex(path, '/');
+ filename = strrchr(path, '/');
if (filename == NULL)
return path;
if (filename[1])
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c
index 459811e..614beb2 100644
--- a/sys/kern/kern_lock.c
+++ b/sys/kern/kern_lock.c
@@ -1232,6 +1232,9 @@ _lockmgr_disown(struct lock *lk, const char *file, int line)
{
uintptr_t tid, x;
+ if (SCHEDULER_STOPPED())
+ return;
+
tid = (uintptr_t)curthread;
_lockmgr_assert(lk, KA_XLOCKED | KA_NOTRECURSED, file, line);
diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c
index eddb0d3..bfb6547 100644
--- a/sys/kern/kern_mutex.c
+++ b/sys/kern/kern_mutex.c
@@ -192,6 +192,8 @@ void
_mtx_lock_flags(struct mtx *m, int opts, const char *file, int line)
{
+ if (SCHEDULER_STOPPED())
+ return;
MPASS(curthread != NULL);
KASSERT(m->mtx_lock != MTX_DESTROYED,
("mtx_lock() of destroyed mutex @ %s:%d", file, line));
@@ -211,6 +213,9 @@ _mtx_lock_flags(struct mtx *m, int opts, const char *file, int line)
void
_mtx_unlock_flags(struct mtx *m, int opts, const char *file, int line)
{
+
+ if (SCHEDULER_STOPPED())
+ return;
MPASS(curthread != NULL);
KASSERT(m->mtx_lock != MTX_DESTROYED,
("mtx_unlock() of destroyed mutex @ %s:%d", file, line));
@@ -232,6 +237,8 @@ void
_mtx_lock_spin_flags(struct mtx *m, int opts, const char *file, int line)
{
+ if (SCHEDULER_STOPPED())
+ return;
MPASS(curthread != NULL);
KASSERT(m->mtx_lock != MTX_DESTROYED,
("mtx_lock_spin() of destroyed mutex @ %s:%d", file, line));
@@ -254,6 +261,8 @@ void
_mtx_unlock_spin_flags(struct mtx *m, int opts, const char *file, int line)
{
+ if (SCHEDULER_STOPPED())
+ return;
MPASS(curthread != NULL);
KASSERT(m->mtx_lock != MTX_DESTROYED,
("mtx_unlock_spin() of destroyed mutex @ %s:%d", file, line));
@@ -282,6 +291,9 @@ mtx_trylock_flags_(struct mtx *m, int opts, const char *file, int line)
#endif
int rval;
+ if (SCHEDULER_STOPPED())
+ return (1);
+
MPASS(curthread != NULL);
KASSERT(m->mtx_lock != MTX_DESTROYED,
("mtx_trylock() of destroyed mutex @ %s:%d", file, line));
@@ -338,6 +350,9 @@ _mtx_lock_sleep(struct mtx *m, uintptr_t tid, int opts, const char *file,
int64_t sleep_time = 0;
#endif
+ if (SCHEDULER_STOPPED())
+ return;
+
if (mtx_owned(m)) {
KASSERT((m->lock_object.lo_flags & LO_RECURSABLE) != 0,
("_mtx_lock_sleep: recursed on non-recursive mutex %s @ %s:%d\n",
@@ -508,6 +523,9 @@ _mtx_lock_spin(struct mtx *m, uintptr_t tid, int opts, const char *file,
uint64_t waittime = 0;
#endif
+ if (SCHEDULER_STOPPED())
+ return;
+
if (LOCK_LOG_TEST(&m->lock_object, opts))
CTR1(KTR_LOCK, "_mtx_lock_spin: %p spinning", m);
@@ -555,6 +573,10 @@ thread_lock_flags_(struct thread *td, int opts, const char *file, int line)
i = 0;
tid = (uintptr_t)curthread;
+
+ if (SCHEDULER_STOPPED())
+ return;
+
for (;;) {
retry:
spinlock_enter();
@@ -656,6 +678,9 @@ _mtx_unlock_sleep(struct mtx *m, int opts, const char *file, int line)
{
struct turnstile *ts;
+ if (SCHEDULER_STOPPED())
+ return;
+
if (mtx_recursed(m)) {
if (--(m->mtx_recurse) == 0)
atomic_clear_ptr(&m->mtx_lock, MTX_RECURSED);
diff --git a/sys/kern/kern_ntptime.c b/sys/kern/kern_ntptime.c
index 1e56acf..7da7de2 100644
--- a/sys/kern/kern_ntptime.c
+++ b/sys/kern/kern_ntptime.c
@@ -148,13 +148,13 @@ typedef int64_t l_fp;
#define SHIFT_FLL 2 /* FLL loop gain (shift) */
static int time_state = TIME_OK; /* clock state */
-static int time_status = STA_UNSYNC; /* clock status bits */
+int time_status = STA_UNSYNC; /* clock status bits */
static long time_tai; /* TAI offset (s) */
static long time_monitor; /* last time offset scaled (ns) */
static long time_constant; /* poll interval (shift) (s) */
static long time_precision = 1; /* clock precision (ns) */
static long time_maxerror = MAXPHASE / 1000; /* maximum error (us) */
-static long time_esterror = MAXPHASE / 1000; /* estimated error (us) */
+long time_esterror = MAXPHASE / 1000; /* estimated error (us) */
static long time_reftime; /* time at last adjustment (s) */
static l_fp time_offset; /* time offset (ns) */
static l_fp time_freq; /* frequency offset (ns/s) */
@@ -301,13 +301,17 @@ SYSCTL_PROC(_kern_ntp_pll, OID_AUTO, gettime, CTLTYPE_OPAQUE|CTLFLAG_RD,
0, sizeof(struct ntptimeval) , ntp_sysctl, "S,ntptimeval", "");
#ifdef PPS_SYNC
-SYSCTL_INT(_kern_ntp_pll, OID_AUTO, pps_shiftmax, CTLFLAG_RW, &pps_shiftmax, 0, "");
-SYSCTL_INT(_kern_ntp_pll, OID_AUTO, pps_shift, CTLFLAG_RW, &pps_shift, 0, "");
+SYSCTL_INT(_kern_ntp_pll, OID_AUTO, pps_shiftmax, CTLFLAG_RW,
+ &pps_shiftmax, 0, "Max interval duration (sec) (shift)");
+SYSCTL_INT(_kern_ntp_pll, OID_AUTO, pps_shift, CTLFLAG_RW,
+ &pps_shift, 0, "Interval duration (sec) (shift)");
SYSCTL_LONG(_kern_ntp_pll, OID_AUTO, time_monitor, CTLFLAG_RD,
- &time_monitor, 0, "");
+ &time_monitor, 0, "Last time offset scaled (ns)");
-SYSCTL_OPAQUE(_kern_ntp_pll, OID_AUTO, pps_freq, CTLFLAG_RD, &pps_freq, sizeof(pps_freq), "I", "");
-SYSCTL_OPAQUE(_kern_ntp_pll, OID_AUTO, time_freq, CTLFLAG_RD, &time_freq, sizeof(time_freq), "I", "");
+SYSCTL_OPAQUE(_kern_ntp_pll, OID_AUTO, pps_freq, CTLFLAG_RD,
+ &pps_freq, sizeof(pps_freq), "I", "Scaled frequency offset (ns/sec)");
+SYSCTL_OPAQUE(_kern_ntp_pll, OID_AUTO, time_freq, CTLFLAG_RD,
+ &time_freq, sizeof(time_freq), "I", "Frequency offset (ns/sec)");
#endif
/*
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c
index 83da94e..41b6f2b 100644
--- a/sys/kern/kern_proc.c
+++ b/sys/kern/kern_proc.c
@@ -330,6 +330,55 @@ pgfind(pgid)
}
/*
+ * Locate process and do additional manipulations, depending on flags.
+ */
+int
+pget(pid_t pid, int flags, struct proc **pp)
+{
+ struct proc *p;
+ int error;
+
+ p = pfind(pid);
+ if (p == NULL)
+ return (ESRCH);
+ if ((flags & PGET_CANSEE) != 0) {
+ error = p_cansee(curthread, p);
+ if (error != 0)
+ goto errout;
+ }
+ if ((flags & PGET_CANDEBUG) != 0) {
+ error = p_candebug(curthread, p);
+ if (error != 0)
+ goto errout;
+ }
+ if ((flags & PGET_ISCURRENT) != 0 && curproc != p) {
+ error = EPERM;
+ goto errout;
+ }
+ if ((flags & PGET_NOTWEXIT) != 0 && (p->p_flag & P_WEXIT) != 0) {
+ error = ESRCH;
+ goto errout;
+ }
+ if ((flags & PGET_NOTINEXEC) != 0 && (p->p_flag & P_INEXEC) != 0) {
+ /*
+ * XXXRW: Not clear ESRCH is the right error during proc
+ * execve().
+ */
+ error = ESRCH;
+ goto errout;
+ }
+ if ((flags & PGET_HOLD) != 0) {
+ _PHOLD(p);
+ PROC_UNLOCK(p);
+ }
+ *pp = p;
+ return (0);
+errout:
+ PROC_UNLOCK(p);
+ return (error);
+}
+
+/*
* Create a new process group.
* pgid must be equal to the pid of p.
* Begin a new session if required.
@@ -1157,7 +1206,7 @@ sysctl_out_proc(struct proc *p, struct sysctl_req *req, int flags)
static int
sysctl_kern_proc(SYSCTL_HANDLER_ARGS)
{
- int *name = (int*) arg1;
+ int *name = (int *)arg1;
u_int namelen = arg2;
struct proc *p;
int flags, doingzomb, oid_number;
@@ -1172,18 +1221,14 @@ sysctl_kern_proc(SYSCTL_HANDLER_ARGS)
oid_number &= ~KERN_PROC_INC_THREAD;
}
if (oid_number == KERN_PROC_PID) {
- if (namelen != 1)
+ if (namelen != 1)
return (EINVAL);
error = sysctl_wire_old_buffer(req, 0);
if (error)
- return (error);
- p = pfind((pid_t)name[0]);
- if (!p)
- return (ESRCH);
- if ((error = p_cansee(curthread, p))) {
- PROC_UNLOCK(p);
return (error);
- }
+ error = pget((pid_t)name[0], PGET_CANSEE, &p);
+ if (error != 0)
+ return (error);
error = sysctl_out_proc(p, req, flags);
return (error);
}
@@ -1202,7 +1247,7 @@ sysctl_kern_proc(SYSCTL_HANDLER_ARGS)
return (EINVAL);
break;
}
-
+
if (!req->oldptr) {
/* overestimate by 5 procs */
error = SYSCTL_OUT(req, 0, sizeof (struct kinfo_proc) * 5);
@@ -1282,7 +1327,7 @@ sysctl_kern_proc(SYSCTL_HANDLER_ARGS)
/* XXX proctree_lock */
SESS_LOCK(p->p_session);
if (p->p_session->s_ttyp == NULL ||
- tty_udev(p->p_session->s_ttyp) !=
+ tty_udev(p->p_session->s_ttyp) !=
(dev_t)name[0]) {
SESS_UNLOCK(p->p_session);
PROC_UNLOCK(p);
@@ -1586,20 +1631,19 @@ get_proc_vector(struct thread *td, struct proc *p, char ***proc_vectorp,
static int
get_ps_strings(struct thread *td, struct proc *p, struct sbuf *sb,
- enum proc_vector_type type, size_t nchr)
+ enum proc_vector_type type)
{
- size_t done, len, vsize;
+ size_t done, len, nchr, vsize;
int error, i;
char **proc_vector, *sptr;
char pss_string[GET_PS_STRINGS_CHUNK_SZ];
PROC_ASSERT_HELD(p);
- /*
- * We are not going to read more than 2 * (PATH_MAX + ARG_MAX) bytes.
- */
- if (nchr > 2 * (PATH_MAX + ARG_MAX))
- nchr = 2 * (PATH_MAX + ARG_MAX);
+ /*
+ * We are not going to read more than 2 * (PATH_MAX + ARG_MAX) bytes.
+ */
+ nchr = 2 * (PATH_MAX + ARG_MAX);
error = get_proc_vector(td, p, &proc_vector, &vsize, type);
if (error != 0)
@@ -1634,17 +1678,17 @@ done:
}
int
-proc_getargv(struct thread *td, struct proc *p, struct sbuf *sb, size_t nchr)
+proc_getargv(struct thread *td, struct proc *p, struct sbuf *sb)
{
- return (get_ps_strings(curthread, p, sb, PROC_ARG, nchr));
+ return (get_ps_strings(curthread, p, sb, PROC_ARG));
}
int
-proc_getenvv(struct thread *td, struct proc *p, struct sbuf *sb, size_t nchr)
+proc_getenvv(struct thread *td, struct proc *p, struct sbuf *sb)
{
- return (get_ps_strings(curthread, p, sb, PROC_ENV, nchr));
+ return (get_ps_strings(curthread, p, sb, PROC_ENV));
}
/*
@@ -1656,29 +1700,22 @@ proc_getenvv(struct thread *td, struct proc *p, struct sbuf *sb, size_t nchr)
static int
sysctl_kern_proc_args(SYSCTL_HANDLER_ARGS)
{
- int *name = (int*) arg1;
+ int *name = (int *)arg1;
u_int namelen = arg2;
struct pargs *newpa, *pa;
struct proc *p;
struct sbuf sb;
- int error = 0, error2;
+ int flags, error = 0, error2;
- if (namelen != 1)
+ if (namelen != 1)
return (EINVAL);
- p = pfind((pid_t)name[0]);
- if (!p)
- return (ESRCH);
-
- if ((error = p_cansee(curthread, p)) != 0) {
- PROC_UNLOCK(p);
+ flags = PGET_CANSEE;
+ if (req->newptr != NULL)
+ flags |= PGET_ISCURRENT;
+ error = pget((pid_t)name[0], flags, &p);
+ if (error)
return (error);
- }
-
- if (req->newptr && curproc != p) {
- PROC_UNLOCK(p);
- return (EPERM);
- }
pa = p->p_args;
if (pa != NULL) {
@@ -1690,7 +1727,7 @@ sysctl_kern_proc_args(SYSCTL_HANDLER_ARGS)
_PHOLD(p);
PROC_UNLOCK(p);
sbuf_new_for_sysctl(&sb, NULL, GET_PS_STRINGS_CHUNK_SZ, req);
- error = proc_getargv(curthread, p, &sb, req->oldlen);
+ error = proc_getargv(curthread, p, &sb);
error2 = sbuf_finish(&sb);
PRELE(p);
sbuf_delete(&sb);
@@ -1724,7 +1761,7 @@ sysctl_kern_proc_args(SYSCTL_HANDLER_ARGS)
static int
sysctl_kern_proc_env(SYSCTL_HANDLER_ARGS)
{
- int *name = (int*) arg1;
+ int *name = (int *)arg1;
u_int namelen = arg2;
struct proc *p;
struct sbuf sb;
@@ -1733,25 +1770,16 @@ sysctl_kern_proc_env(SYSCTL_HANDLER_ARGS)
if (namelen != 1)
return (EINVAL);
- p = pfind((pid_t)name[0]);
- if (p == NULL)
- return (ESRCH);
- if ((p->p_flag & P_WEXIT) != 0) {
- PROC_UNLOCK(p);
- return (ESRCH);
- }
- if ((error = p_candebug(curthread, p)) != 0) {
- PROC_UNLOCK(p);
+ error = pget((pid_t)name[0], PGET_WANTREAD, &p);
+ if (error != 0)
return (error);
- }
if ((p->p_flag & P_SYSTEM) != 0) {
- PROC_UNLOCK(p);
+ PRELE(p);
return (0);
}
- _PHOLD(p);
- PROC_UNLOCK(p);
+
sbuf_new_for_sysctl(&sb, NULL, GET_PS_STRINGS_CHUNK_SZ, req);
- error = proc_getenvv(curthread, p, &sb, req->oldlen);
+ error = proc_getenvv(curthread, p, &sb);
error2 = sbuf_finish(&sb);
PRELE(p);
sbuf_delete(&sb);
@@ -1765,7 +1793,7 @@ sysctl_kern_proc_env(SYSCTL_HANDLER_ARGS)
static int
sysctl_kern_proc_auxv(SYSCTL_HANDLER_ARGS)
{
- int *name = (int*) arg1;
+ int *name = (int *)arg1;
u_int namelen = arg2;
struct proc *p;
size_t vsize, size;
@@ -1775,24 +1803,13 @@ sysctl_kern_proc_auxv(SYSCTL_HANDLER_ARGS)
if (namelen != 1)
return (EINVAL);
- p = pfind((pid_t)name[0]);
- if (p == NULL)
- return (ESRCH);
- if (p->p_flag & P_WEXIT) {
- PROC_UNLOCK(p);
- return (ESRCH);
- }
- error = p_candebug(curthread, p);
- if (error != 0) {
- PROC_UNLOCK(p);
+ error = pget((pid_t)name[0], PGET_WANTREAD, &p);
+ if (error != 0)
return (error);
- }
if ((p->p_flag & P_SYSTEM) != 0) {
- PROC_UNLOCK(p);
+ PRELE(p);
return (0);
}
- _PHOLD(p);
- PROC_UNLOCK(p);
error = get_proc_vector(curthread, p, &auxv, &vsize, PROC_AUX);
if (error == 0) {
#ifdef COMPAT_FREEBSD32
@@ -1829,13 +1846,9 @@ sysctl_kern_proc_pathname(SYSCTL_HANDLER_ARGS)
if (*pidp == -1) { /* -1 means this process */
p = req->td->td_proc;
} else {
- p = pfind(*pidp);
- if (p == NULL)
- return (ESRCH);
- if ((error = p_cansee(curthread, p)) != 0) {
- PROC_UNLOCK(p);
+ error = pget(*pidp, PGET_CANSEE, &p);
+ if (error != 0)
return (error);
- }
}
vp = p->p_textvp;
@@ -1868,16 +1881,13 @@ sysctl_kern_proc_sv_name(SYSCTL_HANDLER_ARGS)
int error;
namelen = arg2;
- if (namelen != 1)
+ if (namelen != 1)
return (EINVAL);
name = (int *)arg1;
- if ((p = pfind((pid_t)name[0])) == NULL)
- return (ESRCH);
- if ((error = p_cansee(curthread, p))) {
- PROC_UNLOCK(p);
+ error = pget((pid_t)name[0], PGET_CANSEE, &p);
+ if (error != 0)
return (error);
- }
sv_name = p->p_sysent->sv_name;
PROC_UNLOCK(p);
return (sysctl_handle_string(oidp, sv_name, 0, req));
@@ -1904,18 +1914,9 @@ sysctl_kern_proc_ovmmap(SYSCTL_HANDLER_ARGS)
struct vmspace *vm;
name = (int *)arg1;
- if ((p = pfind((pid_t)name[0])) == NULL)
- return (ESRCH);
- if (p->p_flag & P_WEXIT) {
- PROC_UNLOCK(p);
- return (ESRCH);
- }
- if ((error = p_candebug(curthread, p))) {
- PROC_UNLOCK(p);
+ error = pget((pid_t)name[0], PGET_WANTREAD, &p);
+ if (error != 0)
return (error);
- }
- _PHOLD(p);
- PROC_UNLOCK(p);
vm = vmspace_acquire_ref(p);
if (vm == NULL) {
PRELE(p);
@@ -2082,18 +2083,9 @@ sysctl_kern_proc_vmmap(SYSCTL_HANDLER_ARGS)
vm_map_t map;
name = (int *)arg1;
- if ((p = pfind((pid_t)name[0])) == NULL)
- return (ESRCH);
- if (p->p_flag & P_WEXIT) {
- PROC_UNLOCK(p);
- return (ESRCH);
- }
- if ((error = p_candebug(curthread, p))) {
- PROC_UNLOCK(p);
+ error = pget((pid_t)name[0], PGET_WANTREAD, &p);
+ if (error != 0)
return (error);
- }
- _PHOLD(p);
- PROC_UNLOCK(p);
vm = vmspace_acquire_ref(p);
if (vm == NULL) {
PRELE(p);
@@ -2267,19 +2259,9 @@ sysctl_kern_proc_kstack(SYSCTL_HANDLER_ARGS)
struct proc *p;
name = (int *)arg1;
- if ((p = pfind((pid_t)name[0])) == NULL)
- return (ESRCH);
- /* XXXRW: Not clear ESRCH is the right error during proc execve(). */
- if (p->p_flag & P_WEXIT || p->p_flag & P_INEXEC) {
- PROC_UNLOCK(p);
- return (ESRCH);
- }
- if ((error = p_candebug(curthread, p))) {
- PROC_UNLOCK(p);
+ error = pget((pid_t)name[0], PGET_NOTINEXEC | PGET_WANTREAD, &p);
+ if (error != 0)
return (error);
- }
- _PHOLD(p);
- PROC_UNLOCK(p);
kkstp = malloc(sizeof(*kkstp), M_TEMP, M_WAITOK);
st = stack_create();
@@ -2374,13 +2356,9 @@ sysctl_kern_proc_groups(SYSCTL_HANDLER_ARGS)
if (*pidp == -1) { /* -1 means this process */
p = req->td->td_proc;
} else {
- p = pfind(*pidp);
- if (p == NULL)
- return (ESRCH);
- if ((error = p_cansee(curthread, p)) != 0) {
- PROC_UNLOCK(p);
+ error = pget(*pidp, PGET_CANSEE, &p);
+ if (error != 0)
return (error);
- }
}
cred = crhold(p->p_ucred);
@@ -2394,44 +2372,61 @@ sysctl_kern_proc_groups(SYSCTL_HANDLER_ARGS)
}
/*
- * This sysctl allows a process to retrieve the resource limits for
+ * This sysctl allows a process to retrieve or/and set the resource limit for
* another process.
*/
static int
sysctl_kern_proc_rlimit(SYSCTL_HANDLER_ARGS)
{
- int *name = (int*) arg1;
+ int *name = (int *)arg1;
u_int namelen = arg2;
- struct plimit *limp;
+ struct rlimit rlim;
struct proc *p;
- int error = 0;
+ u_int which;
+ int flags, error;
- if (namelen != 1)
+ if (namelen != 2)
return (EINVAL);
- p = pfind((pid_t)name[0]);
- if (p == NULL)
- return (ESRCH);
+ which = (u_int)name[1];
+ if (which >= RLIM_NLIMITS)
+ return (EINVAL);
- if ((error = p_cansee(curthread, p)) != 0) {
- PROC_UNLOCK(p);
+ if (req->newptr != NULL && req->newlen != sizeof(rlim))
+ return (EINVAL);
+
+ flags = PGET_HOLD | PGET_NOTWEXIT;
+ if (req->newptr != NULL)
+ flags |= PGET_CANDEBUG;
+ else
+ flags |= PGET_CANSEE;
+ error = pget((pid_t)name[0], flags, &p);
+ if (error != 0)
return (error);
- }
/*
- * Check the request size. We alow sizes smaller rlimit array for
- * backward binary compatibility: the number of resource limits may
- * grow.
+ * Retrieve limit.
*/
- if (sizeof(limp->pl_rlimit) < req->oldlen) {
+ if (req->oldptr != NULL) {
+ PROC_LOCK(p);
+ lim_rlimit(p, which, &rlim);
PROC_UNLOCK(p);
- return (EINVAL);
}
+ error = SYSCTL_OUT(req, &rlim, sizeof(rlim));
+ if (error != 0)
+ goto errout;
- limp = lim_hold(p->p_limit);
- PROC_UNLOCK(p);
- error = SYSCTL_OUT(req, limp->pl_rlimit, req->oldlen);
- lim_free(limp);
+ /*
+ * Set limit.
+ */
+ if (req->newptr != NULL) {
+ error = SYSCTL_IN(req, &rlim, sizeof(rlim));
+ if (error == 0)
+ error = kern_proc_setrlimit(curthread, p, which, &rlim);
+ }
+
+errout:
+ PRELE(p);
return (error);
}
@@ -2442,7 +2437,7 @@ sysctl_kern_proc_rlimit(SYSCTL_HANDLER_ARGS)
static int
sysctl_kern_proc_ps_strings(SYSCTL_HANDLER_ARGS)
{
- int *name = (int*) arg1;
+ int *name = (int *)arg1;
u_int namelen = arg2;
struct proc *p;
vm_offset_t ps_strings;
@@ -2454,14 +2449,9 @@ sysctl_kern_proc_ps_strings(SYSCTL_HANDLER_ARGS)
if (namelen != 1)
return (EINVAL);
- p = pfind((pid_t)name[0]);
- if (p == NULL)
- return (ESRCH);
- error = p_candebug(curthread, p);
- if (error != 0) {
- PROC_UNLOCK(p);
+ error = pget((pid_t)name[0], PGET_CANDEBUG, &p);
+ if (error != 0)
return (error);
- }
#ifdef COMPAT_FREEBSD32
if ((req->flags & SCTL_MASK32) != 0) {
/*
@@ -2499,10 +2489,10 @@ static SYSCTL_NODE(_kern_proc, KERN_PROC_RGID, rgid, CTLFLAG_RD | CTLFLAG_MPSAFE
static SYSCTL_NODE(_kern_proc, KERN_PROC_SESSION, sid, CTLFLAG_RD |
CTLFLAG_MPSAFE, sysctl_kern_proc, "Process table");
-static SYSCTL_NODE(_kern_proc, KERN_PROC_TTY, tty, CTLFLAG_RD | CTLFLAG_MPSAFE,
+static SYSCTL_NODE(_kern_proc, KERN_PROC_TTY, tty, CTLFLAG_RD | CTLFLAG_MPSAFE,
sysctl_kern_proc, "Process table");
-static SYSCTL_NODE(_kern_proc, KERN_PROC_UID, uid, CTLFLAG_RD | CTLFLAG_MPSAFE,
+static SYSCTL_NODE(_kern_proc, KERN_PROC_UID, uid, CTLFLAG_RD | CTLFLAG_MPSAFE,
sysctl_kern_proc, "Process table");
static SYSCTL_NODE(_kern_proc, KERN_PROC_RUID, ruid, CTLFLAG_RD | CTLFLAG_MPSAFE,
@@ -2518,13 +2508,11 @@ static SYSCTL_NODE(_kern_proc, KERN_PROC_ARGS, args,
CTLFLAG_RW | CTLFLAG_ANYBODY | CTLFLAG_MPSAFE,
sysctl_kern_proc_args, "Process argument list");
-static SYSCTL_NODE(_kern_proc, KERN_PROC_ENV, env,
- CTLFLAG_RW | CTLFLAG_ANYBODY | CTLFLAG_MPSAFE,
+static SYSCTL_NODE(_kern_proc, KERN_PROC_ENV, env, CTLFLAG_RD | CTLFLAG_MPSAFE,
sysctl_kern_proc_env, "Process environment");
-static SYSCTL_NODE(_kern_proc, KERN_PROC_AUXV, auxv,
- CTLFLAG_RW | CTLFLAG_ANYBODY | CTLFLAG_MPSAFE,
- sysctl_kern_proc_auxv, "Process ELF auxiliary vector");
+static SYSCTL_NODE(_kern_proc, KERN_PROC_AUXV, auxv, CTLFLAG_RD |
+ CTLFLAG_MPSAFE, sysctl_kern_proc_auxv, "Process ELF auxiliary vector");
static SYSCTL_NODE(_kern_proc, KERN_PROC_PATHNAME, pathname, CTLFLAG_RD |
CTLFLAG_MPSAFE, sysctl_kern_proc_pathname, "Process executable path");
@@ -2577,9 +2565,10 @@ static SYSCTL_NODE(_kern_proc, KERN_PROC_KSTACK, kstack, CTLFLAG_RD |
static SYSCTL_NODE(_kern_proc, KERN_PROC_GROUPS, groups, CTLFLAG_RD |
CTLFLAG_MPSAFE, sysctl_kern_proc_groups, "Process groups");
-static SYSCTL_NODE(_kern_proc, KERN_PROC_RLIMIT, rlimit, CTLFLAG_RD |
- CTLFLAG_MPSAFE, sysctl_kern_proc_rlimit, "Process resource limits");
+static SYSCTL_NODE(_kern_proc, KERN_PROC_RLIMIT, rlimit, CTLFLAG_RW |
+ CTLFLAG_ANYBODY | CTLFLAG_MPSAFE, sysctl_kern_proc_rlimit,
+ "Process resource limits");
-static SYSCTL_NODE(_kern_proc, KERN_PROC_PS_STRINGS, ps_strings,
- CTLFLAG_RW | CTLFLAG_ANYBODY | CTLFLAG_MPSAFE,
- sysctl_kern_proc_ps_strings, "Process ps_strings location");
+static SYSCTL_NODE(_kern_proc, KERN_PROC_PS_STRINGS, ps_strings, CTLFLAG_RD |
+ CTLFLAG_MPSAFE, sysctl_kern_proc_ps_strings,
+ "Process ps_strings location");
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c
index cf93984..53af793 100644
--- a/sys/kern/kern_prot.c
+++ b/sys/kern/kern_prot.c
@@ -73,7 +73,7 @@ __FBSDID("$FreeBSD$");
#ifdef REGRESSION
FEATURE(regression,
- "Kernel support for interfaces nessesary for regression testing (SECURITY RISK!)");
+ "Kernel support for interfaces necessary for regression testing (SECURITY RISK!)");
#endif
#if defined(INET) || defined(INET6)
diff --git a/sys/kern/kern_racct.c b/sys/kern/kern_racct.c
index a32814f..ac0e98d 100644
--- a/sys/kern/kern_racct.c
+++ b/sys/kern/kern_racct.c
@@ -35,8 +35,8 @@ __FBSDID("$FreeBSD$");
#include "opt_kdtrace.h"
#include <sys/param.h>
+#include <sys/systm.h>
#include <sys/eventhandler.h>
-#include <sys/param.h>
#include <sys/jail.h>
#include <sys/kernel.h>
#include <sys/kthread.h>
@@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$");
#include <sys/sx.h>
#include <sys/sysent.h>
#include <sys/sysproto.h>
-#include <sys/systm.h>
#include <sys/umtx.h>
#ifdef RCTL
diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c
index cccb040..590cfcb 100644
--- a/sys/kern/kern_resource.c
+++ b/sys/kern/kern_resource.c
@@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$");
#include <sys/sched.h>
#include <sys/sx.h>
#include <sys/syscallsubr.h>
+#include <sys/sysctl.h>
#include <sys/sysent.h>
#include <sys/time.h>
#include <sys/umtx.h>
@@ -273,6 +274,10 @@ donice(struct thread *td, struct proc *p, int n)
return (0);
}
+static int unprivileged_idprio;
+SYSCTL_INT(_security_bsd, OID_AUTO, unprivileged_idprio, CTLFLAG_RW,
+ &unprivileged_idprio, 0, "Allow non-root users to set an idle priority");
+
/*
* Set realtime priority for LWP.
*/
@@ -321,18 +326,26 @@ sys_rtprio_thread(struct thread *td, struct rtprio_thread_args *uap)
break;
/* Disallow setting rtprio in most cases if not superuser. */
-/*
- * Realtime priority has to be restricted for reasons which should be
- * obvious. However, for idle priority, there is a potential for
- * system deadlock if an idleprio process gains a lock on a resource
- * that other processes need (and the idleprio process can't run
- * due to a CPU-bound normal process). Fix me! XXX
- */
-#if 0
- if (RTP_PRIO_IS_REALTIME(rtp.type)) {
-#else
- if (rtp.type != RTP_PRIO_NORMAL) {
-#endif
+
+ /*
+ * Realtime priority has to be restricted for reasons which
+ * should be obvious. However, for idleprio processes, there is
+ * a potential for system deadlock if an idleprio process gains
+ * a lock on a resource that other processes need (and the
+ * idleprio process can't run due to a CPU-bound normal
+ * process). Fix me! XXX
+ *
+ * This problem is not only related to idleprio process.
+ * A user level program can obtain a file lock and hold it
+ * indefinitely. Additionally, without idleprio processes it is
+ * still conceivable that a program with low priority will never
+ * get to run. In short, allowing this feature might make it
+ * easier to lock a resource indefinitely, but it is not the
+ * only thing that makes it possible.
+ */
+ if (RTP_PRIO_BASE(rtp.type) == RTP_PRIO_REALTIME ||
+ (RTP_PRIO_BASE(rtp.type) == RTP_PRIO_IDLE &&
+ unprivileged_idprio == 0)) {
error = priv_check(td, PRIV_SCHED_RTPRIO);
if (error)
break;
@@ -417,19 +430,14 @@ sys_rtprio(td, uap)
if ((error = p_cansched(td, p)) || (error = cierror))
break;
- /* Disallow setting rtprio in most cases if not superuser. */
-/*
- * Realtime priority has to be restricted for reasons which should be
- * obvious. However, for idle priority, there is a potential for
- * system deadlock if an idleprio process gains a lock on a resource
- * that other processes need (and the idleprio process can't run
- * due to a CPU-bound normal process). Fix me! XXX
- */
-#if 0
- if (RTP_PRIO_IS_REALTIME(rtp.type)) {
-#else
- if (rtp.type != RTP_PRIO_NORMAL) {
-#endif
+ /*
+ * Disallow setting rtprio in most cases if not superuser.
+ * See the comment in sys_rtprio_thread about idprio
+ * threads holding a lock.
+ */
+ if (RTP_PRIO_BASE(rtp.type) == RTP_PRIO_REALTIME ||
+ (RTP_PRIO_BASE(rtp.type) == RTP_PRIO_IDLE &&
+ !unprivileged_idprio)) {
error = priv_check(td, PRIV_SCHED_RTPRIO);
if (error)
break;
@@ -489,7 +497,7 @@ rtp_to_pri(struct rtprio *rtp, struct thread *td)
oldpri = td->td_user_pri;
sched_user_prio(td, newpri);
if (td->td_user_pri != oldpri && (td == curthread ||
- td->td_priority == oldpri || td->td_user_pri >= PRI_MAX_REALTIME))
+ td->td_priority == oldpri || td->td_user_pri <= PRI_MAX_REALTIME))
sched_prio(td, td->td_user_pri);
if (TD_ON_UPILOCK(td) && oldpri != newpri) {
critical_enter();
@@ -641,13 +649,17 @@ lim_cb(void *arg)
}
int
-kern_setrlimit(td, which, limp)
- struct thread *td;
- u_int which;
- struct rlimit *limp;
+kern_setrlimit(struct thread *td, u_int which, struct rlimit *limp)
+{
+
+ return (kern_proc_setrlimit(td, td->td_proc, which, limp));
+}
+
+int
+kern_proc_setrlimit(struct thread *td, struct proc *p, u_int which,
+ struct rlimit *limp)
{
struct plimit *newlim, *oldlim;
- struct proc *p;
register struct rlimit *alimp;
struct rlimit oldssiz;
int error;
@@ -664,7 +676,6 @@ kern_setrlimit(td, which, limp)
limp->rlim_max = RLIM_INFINITY;
oldssiz.rlim_cur = 0;
- p = td->td_proc;
newlim = lim_alloc();
PROC_LOCK(p);
oldlim = p->p_limit;
diff --git a/sys/kern/kern_rmlock.c b/sys/kern/kern_rmlock.c
index 181825a..27d0462 100644
--- a/sys/kern/kern_rmlock.c
+++ b/sys/kern/kern_rmlock.c
@@ -344,6 +344,9 @@ _rm_rlock(struct rmlock *rm, struct rm_priotracker *tracker, int trylock)
struct thread *td = curthread;
struct pcpu *pc;
+ if (SCHEDULER_STOPPED())
+ return (1);
+
tracker->rmp_flags = 0;
tracker->rmp_thread = td;
tracker->rmp_rmlock = rm;
@@ -413,6 +416,9 @@ _rm_runlock(struct rmlock *rm, struct rm_priotracker *tracker)
struct pcpu *pc;
struct thread *td = tracker->rmp_thread;
+ if (SCHEDULER_STOPPED())
+ return;
+
td->td_critnest++; /* critical_enter(); */
pc = cpuid_to_pcpu[td->td_oncpu]; /* pcpu_find(td->td_oncpu); */
rm_tracker_remove(pc, tracker);
@@ -432,6 +438,9 @@ _rm_wlock(struct rmlock *rm)
struct turnstile *ts;
cpuset_t readcpus;
+ if (SCHEDULER_STOPPED())
+ return;
+
if (rm->lock_object.lo_flags & RM_SLEEPABLE)
sx_xlock(&rm->rm_lock_sx);
else
@@ -486,6 +495,9 @@ _rm_wunlock(struct rmlock *rm)
void _rm_wlock_debug(struct rmlock *rm, const char *file, int line)
{
+ if (SCHEDULER_STOPPED())
+ return;
+
WITNESS_CHECKORDER(&rm->lock_object, LOP_NEWORDER | LOP_EXCLUSIVE,
file, line, NULL);
@@ -507,6 +519,9 @@ void
_rm_wunlock_debug(struct rmlock *rm, const char *file, int line)
{
+ if (SCHEDULER_STOPPED())
+ return;
+
curthread->td_locks--;
if (rm->lock_object.lo_flags & RM_SLEEPABLE)
WITNESS_UNLOCK(&rm->rm_lock_sx.lock_object, LOP_EXCLUSIVE,
@@ -521,6 +536,10 @@ int
_rm_rlock_debug(struct rmlock *rm, struct rm_priotracker *tracker,
int trylock, const char *file, int line)
{
+
+ if (SCHEDULER_STOPPED())
+ return (1);
+
if (!trylock && (rm->lock_object.lo_flags & RM_SLEEPABLE))
WITNESS_CHECKORDER(&rm->rm_lock_sx.lock_object, LOP_NEWORDER,
file, line, NULL);
@@ -544,6 +563,9 @@ _rm_runlock_debug(struct rmlock *rm, struct rm_priotracker *tracker,
const char *file, int line)
{
+ if (SCHEDULER_STOPPED())
+ return;
+
curthread->td_locks--;
WITNESS_UNLOCK(&rm->lock_object, 0, file, line);
LOCK_LOG_LOCK("RMRUNLOCK", &rm->lock_object, 0, 0, file, line);
diff --git a/sys/kern/kern_rwlock.c b/sys/kern/kern_rwlock.c
index a4d3e96..b571532 100644
--- a/sys/kern/kern_rwlock.c
+++ b/sys/kern/kern_rwlock.c
@@ -233,6 +233,8 @@ void
_rw_wlock(struct rwlock *rw, const char *file, int line)
{
+ if (SCHEDULER_STOPPED())
+ return;
MPASS(curthread != NULL);
KASSERT(rw->rw_lock != RW_DESTROYED,
("rw_wlock() of destroyed rwlock @ %s:%d", file, line));
@@ -249,6 +251,9 @@ _rw_try_wlock(struct rwlock *rw, const char *file, int line)
{
int rval;
+ if (SCHEDULER_STOPPED())
+ return (1);
+
KASSERT(rw->rw_lock != RW_DESTROYED,
("rw_try_wlock() of destroyed rwlock @ %s:%d", file, line));
@@ -273,6 +278,8 @@ void
_rw_wunlock(struct rwlock *rw, const char *file, int line)
{
+ if (SCHEDULER_STOPPED())
+ return;
MPASS(curthread != NULL);
KASSERT(rw->rw_lock != RW_DESTROYED,
("rw_wunlock() of destroyed rwlock @ %s:%d", file, line));
@@ -317,6 +324,9 @@ _rw_rlock(struct rwlock *rw, const char *file, int line)
int64_t sleep_time = 0;
#endif
+ if (SCHEDULER_STOPPED())
+ return;
+
KASSERT(rw->rw_lock != RW_DESTROYED,
("rw_rlock() of destroyed rwlock @ %s:%d", file, line));
KASSERT(rw_wowner(rw) != curthread,
@@ -499,6 +509,9 @@ _rw_try_rlock(struct rwlock *rw, const char *file, int line)
{
uintptr_t x;
+ if (SCHEDULER_STOPPED())
+ return (1);
+
for (;;) {
x = rw->rw_lock;
KASSERT(rw->rw_lock != RW_DESTROYED,
@@ -525,6 +538,9 @@ _rw_runlock(struct rwlock *rw, const char *file, int line)
struct turnstile *ts;
uintptr_t x, v, queue;
+ if (SCHEDULER_STOPPED())
+ return;
+
KASSERT(rw->rw_lock != RW_DESTROYED,
("rw_runlock() of destroyed rwlock @ %s:%d", file, line));
_rw_assert(rw, RA_RLOCKED, file, line);
@@ -650,6 +666,9 @@ _rw_wlock_hard(struct rwlock *rw, uintptr_t tid, const char *file, int line)
int64_t sleep_time = 0;
#endif
+ if (SCHEDULER_STOPPED())
+ return;
+
if (rw_wlocked(rw)) {
KASSERT(rw->lock_object.lo_flags & LO_RECURSABLE,
("%s: recursing but non-recursive rw %s @ %s:%d\n",
@@ -814,6 +833,9 @@ _rw_wunlock_hard(struct rwlock *rw, uintptr_t tid, const char *file, int line)
uintptr_t v;
int queue;
+ if (SCHEDULER_STOPPED())
+ return;
+
if (rw_wlocked(rw) && rw_recursed(rw)) {
rw->rw_recurse--;
if (LOCK_LOG_TEST(&rw->lock_object, 0))
@@ -876,6 +898,9 @@ _rw_try_upgrade(struct rwlock *rw, const char *file, int line)
struct turnstile *ts;
int success;
+ if (SCHEDULER_STOPPED())
+ return (1);
+
KASSERT(rw->rw_lock != RW_DESTROYED,
("rw_try_upgrade() of destroyed rwlock @ %s:%d", file, line));
_rw_assert(rw, RA_RLOCKED, file, line);
@@ -946,6 +971,9 @@ _rw_downgrade(struct rwlock *rw, const char *file, int line)
uintptr_t tid, v;
int rwait, wwait;
+ if (SCHEDULER_STOPPED())
+ return;
+
KASSERT(rw->rw_lock != RW_DESTROYED,
("rw_downgrade() of destroyed rwlock @ %s:%d", file, line));
_rw_assert(rw, RA_WLOCKED | RA_NOTRECURSED, file, line);
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c
index 2b5a5ae..55c77c4 100644
--- a/sys/kern/kern_shutdown.c
+++ b/sys/kern/kern_shutdown.c
@@ -102,8 +102,9 @@ int debugger_on_panic = 0;
#else
int debugger_on_panic = 1;
#endif
-SYSCTL_INT(_debug, OID_AUTO, debugger_on_panic, CTLFLAG_RW | CTLFLAG_TUN,
- &debugger_on_panic, 0, "Run debugger on kernel panic");
+SYSCTL_INT(_debug, OID_AUTO, debugger_on_panic,
+ CTLFLAG_RW | CTLFLAG_SECURE | CTLFLAG_TUN,
+ &debugger_on_panic, 0, "Run debugger on kernel panic");
TUNABLE_INT("debug.debugger_on_panic", &debugger_on_panic);
#ifdef KDB_TRACE
@@ -111,8 +112,9 @@ static int trace_on_panic = 1;
#else
static int trace_on_panic = 0;
#endif
-SYSCTL_INT(_debug, OID_AUTO, trace_on_panic, CTLFLAG_RW | CTLFLAG_TUN,
- &trace_on_panic, 0, "Print stack trace on kernel panic");
+SYSCTL_INT(_debug, OID_AUTO, trace_on_panic,
+ CTLFLAG_RW | CTLFLAG_SECURE | CTLFLAG_TUN,
+ &trace_on_panic, 0, "Print stack trace on kernel panic");
TUNABLE_INT("debug.trace_on_panic", &trace_on_panic);
#endif /* KDB */
@@ -121,6 +123,11 @@ SYSCTL_INT(_kern, OID_AUTO, sync_on_panic, CTLFLAG_RW | CTLFLAG_TUN,
&sync_on_panic, 0, "Do a sync before rebooting from a panic");
TUNABLE_INT("kern.sync_on_panic", &sync_on_panic);
+static int stop_scheduler_on_panic = 1;
+SYSCTL_INT(_kern, OID_AUTO, stop_scheduler_on_panic, CTLFLAG_RW | CTLFLAG_TUN,
+ &stop_scheduler_on_panic, 0, "stop scheduler upon entering panic");
+TUNABLE_INT("kern.stop_scheduler_on_panic", &stop_scheduler_on_panic);
+
static SYSCTL_NODE(_kern, OID_AUTO, shutdown, CTLFLAG_RW, 0,
"Shutdown environment");
@@ -138,6 +145,7 @@ SYSCTL_INT(_kern_shutdown, OID_AUTO, show_busybufs, CTLFLAG_RW,
*/
const char *panicstr;
+int stop_scheduler; /* system stopped CPUs for panic */
int dumping; /* system is dumping */
int rebooting; /* system is rebooting */
static struct dumperinfo dumper; /* our selected dumper */
@@ -294,10 +302,12 @@ kern_reboot(int howto)
* systems don't shutdown properly (i.e., ACPI power off) if we
* run on another processor.
*/
- thread_lock(curthread);
- sched_bind(curthread, 0);
- thread_unlock(curthread);
- KASSERT(PCPU_GET(cpuid) == 0, ("%s: not running on cpu 0", __func__));
+ if (!SCHEDULER_STOPPED()) {
+ thread_lock(curthread);
+ sched_bind(curthread, 0);
+ thread_unlock(curthread);
+ KASSERT(PCPU_GET(cpuid) == 0, ("boot: not running on cpu 0"));
+ }
#endif
/* We're in the process of rebooting. */
rebooting = 1;
@@ -433,6 +443,8 @@ kern_reboot(int howto)
print_uptime();
+ cngrab();
+
/*
* Ok, now do things that assume all filesystem activity has
* been completed.
@@ -547,13 +559,18 @@ panic(const char *fmt, ...)
{
#ifdef SMP
static volatile u_int panic_cpu = NOCPU;
+ cpuset_t other_cpus;
#endif
struct thread *td = curthread;
int bootopt, newpanic;
va_list ap;
static char buf[256];
- critical_enter();
+ if (stop_scheduler_on_panic)
+ spinlock_enter();
+ else
+ critical_enter();
+
#ifdef SMP
/*
* We don't want multiple CPU's to panic at the same time, so we
@@ -566,6 +583,22 @@ panic(const char *fmt, ...)
PCPU_GET(cpuid)) == 0)
while (panic_cpu != NOCPU)
; /* nothing */
+
+ if (stop_scheduler_on_panic) {
+ if (panicstr == NULL && !kdb_active) {
+ other_cpus = all_cpus;
+ CPU_CLR(PCPU_GET(cpuid), &other_cpus);
+ stop_cpus_hard(other_cpus);
+ }
+
+ /*
+ * We set stop_scheduler here and not in the block above,
+ * because we want to ensure that if panic has been called and
+ * stop_scheduler_on_panic is true, then stop_scheduler will
+ * always be set. Even if panic has been entered from kdb.
+ */
+ stop_scheduler = 1;
+ }
#endif
bootopt = RB_AUTOBOOT;
@@ -582,6 +615,7 @@ panic(const char *fmt, ...)
if (newpanic) {
(void)vsnprintf(buf, sizeof(buf), fmt, ap);
panicstr = buf;
+ cngrab();
printf("panic: %s\n", buf);
} else {
printf("panic: ");
@@ -604,7 +638,8 @@ panic(const char *fmt, ...)
/* thread_unlock(td); */
if (!sync_on_panic)
bootopt |= RB_NOSYNC;
- critical_exit();
+ if (!stop_scheduler_on_panic)
+ critical_exit();
kern_reboot(bootopt);
}
@@ -621,7 +656,7 @@ panic(const char *fmt, ...)
static int poweroff_delay = POWEROFF_DELAY;
SYSCTL_INT(_kern_shutdown, OID_AUTO, poweroff_delay, CTLFLAG_RW,
- &poweroff_delay, 0, "");
+ &poweroff_delay, 0, "Delay before poweroff to write disk caches (msec)");
static void
poweroff_wait(void *junk, int howto)
@@ -641,7 +676,7 @@ poweroff_wait(void *junk, int howto)
*/
static int kproc_shutdown_wait = 60;
SYSCTL_INT(_kern_shutdown, OID_AUTO, kproc_shutdown_wait, CTLFLAG_RW,
- &kproc_shutdown_wait, 0, "");
+ &kproc_shutdown_wait, 0, "Max wait time (sec) to stop for each process");
void
kproc_shutdown(void *arg, int howto)
diff --git a/sys/kern/kern_sx.c b/sys/kern/kern_sx.c
index 8121d00..9cb9995 100644
--- a/sys/kern/kern_sx.c
+++ b/sys/kern/kern_sx.c
@@ -44,6 +44,7 @@
__FBSDID("$FreeBSD$");
#include <sys/param.h>
+#include <sys/systm.h>
#include <sys/ktr.h>
#include <sys/lock.h>
#include <sys/mutex.h>
@@ -51,7 +52,6 @@ __FBSDID("$FreeBSD$");
#include <sys/sleepqueue.h>
#include <sys/sx.h>
#include <sys/sysctl.h>
-#include <sys/systm.h>
#if defined(SMP) && !defined(NO_ADAPTIVE_SX)
#include <machine/cpu.h>
@@ -241,6 +241,8 @@ _sx_slock(struct sx *sx, int opts, const char *file, int line)
{
int error = 0;
+ if (SCHEDULER_STOPPED())
+ return (0);
MPASS(curthread != NULL);
KASSERT(sx->sx_lock != SX_LOCK_DESTROYED,
("sx_slock() of destroyed sx @ %s:%d", file, line));
@@ -260,6 +262,9 @@ sx_try_slock_(struct sx *sx, const char *file, int line)
{
uintptr_t x;
+ if (SCHEDULER_STOPPED())
+ return (1);
+
for (;;) {
x = sx->sx_lock;
KASSERT(x != SX_LOCK_DESTROYED,
@@ -283,6 +288,8 @@ _sx_xlock(struct sx *sx, int opts, const char *file, int line)
{
int error = 0;
+ if (SCHEDULER_STOPPED())
+ return (0);
MPASS(curthread != NULL);
KASSERT(sx->sx_lock != SX_LOCK_DESTROYED,
("sx_xlock() of destroyed sx @ %s:%d", file, line));
@@ -304,6 +311,9 @@ sx_try_xlock_(struct sx *sx, const char *file, int line)
{
int rval;
+ if (SCHEDULER_STOPPED())
+ return (1);
+
MPASS(curthread != NULL);
KASSERT(sx->sx_lock != SX_LOCK_DESTROYED,
("sx_try_xlock() of destroyed sx @ %s:%d", file, line));
@@ -330,6 +340,8 @@ void
_sx_sunlock(struct sx *sx, const char *file, int line)
{
+ if (SCHEDULER_STOPPED())
+ return;
MPASS(curthread != NULL);
KASSERT(sx->sx_lock != SX_LOCK_DESTROYED,
("sx_sunlock() of destroyed sx @ %s:%d", file, line));
@@ -345,6 +357,8 @@ void
_sx_xunlock(struct sx *sx, const char *file, int line)
{
+ if (SCHEDULER_STOPPED())
+ return;
MPASS(curthread != NULL);
KASSERT(sx->sx_lock != SX_LOCK_DESTROYED,
("sx_xunlock() of destroyed sx @ %s:%d", file, line));
@@ -369,6 +383,9 @@ sx_try_upgrade_(struct sx *sx, const char *file, int line)
uintptr_t x;
int success;
+ if (SCHEDULER_STOPPED())
+ return (1);
+
KASSERT(sx->sx_lock != SX_LOCK_DESTROYED,
("sx_try_upgrade() of destroyed sx @ %s:%d", file, line));
_sx_assert(sx, SA_SLOCKED, file, line);
@@ -399,6 +416,9 @@ sx_downgrade_(struct sx *sx, const char *file, int line)
uintptr_t x;
int wakeup_swapper;
+ if (SCHEDULER_STOPPED())
+ return;
+
KASSERT(sx->sx_lock != SX_LOCK_DESTROYED,
("sx_downgrade() of destroyed sx @ %s:%d", file, line));
_sx_assert(sx, SA_XLOCKED | SA_NOTRECURSED, file, line);
@@ -481,6 +501,9 @@ _sx_xlock_hard(struct sx *sx, uintptr_t tid, int opts, const char *file,
int64_t sleep_time = 0;
#endif
+ if (SCHEDULER_STOPPED())
+ return (0);
+
/* If we already hold an exclusive lock, then recurse. */
if (sx_xlocked(sx)) {
KASSERT((sx->lock_object.lo_flags & LO_RECURSABLE) != 0,
@@ -681,6 +704,9 @@ _sx_xunlock_hard(struct sx *sx, uintptr_t tid, const char *file, int line)
uintptr_t x;
int queue, wakeup_swapper;
+ if (SCHEDULER_STOPPED())
+ return;
+
MPASS(!(sx->sx_lock & SX_LOCK_SHARED));
/* If the lock is recursed, then unrecurse one level. */
@@ -753,6 +779,9 @@ _sx_slock_hard(struct sx *sx, int opts, const char *file, int line)
int64_t sleep_time = 0;
#endif
+ if (SCHEDULER_STOPPED())
+ return (0);
+
/*
* As with rwlocks, we don't make any attempt to try to block
* shared locks once there is an exclusive waiter.
@@ -919,6 +948,9 @@ _sx_sunlock_hard(struct sx *sx, const char *file, int line)
uintptr_t x;
int wakeup_swapper;
+ if (SCHEDULER_STOPPED())
+ return;
+
for (;;) {
x = sx->sx_lock;
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index fdfe8bb..a7945d2 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c
@@ -158,7 +158,7 @@ _sleep(void *ident, struct lock_object *lock, int priority,
else
class = NULL;
- if (cold) {
+ if (cold || SCHEDULER_STOPPED()) {
/*
* During autoconfiguration, just return;
* don't run any other threads or panic below,
@@ -260,7 +260,7 @@ msleep_spin(void *ident, struct mtx *mtx, const char *wmesg, int timo)
KASSERT(p != NULL, ("msleep1"));
KASSERT(ident != NULL && TD_IS_RUNNING(td), ("msleep"));
- if (cold) {
+ if (cold || SCHEDULER_STOPPED()) {
/*
* During autoconfiguration, just return;
* don't run any other threads or panic below,
@@ -429,6 +429,8 @@ mi_switch(int flags, struct thread *newtd)
*/
if (kdb_active)
kdb_switch();
+ if (SCHEDULER_STOPPED())
+ return;
if (flags & SW_VOL) {
td->td_ru.ru_nvcsw++;
td->td_swvoltick = ticks;
diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c
index e2ba80d..d8d53a2 100644
--- a/sys/kern/kern_tc.c
+++ b/sys/kern/kern_tc.c
@@ -28,9 +28,7 @@ __FBSDID("$FreeBSD$");
#include <sys/sysctl.h>
#include <sys/syslog.h>
#include <sys/systm.h>
-#ifdef FFCLOCK
#include <sys/timeffc.h>
-#endif
#include <sys/timepps.h>
#include <sys/timetc.h>
#include <sys/timex.h>
@@ -461,8 +459,6 @@ getmicrotime(struct timeval *tvp)
* necessary.
*/
-int sysclock_active = SYSCLOCK_FBCK;
-
/* Feed-forward clock estimates kept updated by the synchronization daemon. */
struct ffclock_estimate ffclock_estimate;
struct bintime ffclock_boottime; /* Feed-forward boot time estimate. */
@@ -956,9 +952,149 @@ getmicrotime(struct timeval *tvp)
getmicrouptime_fromclock(tvp, sysclock_active);
}
+
#endif /* FFCLOCK */
/*
+ * System clock currently providing time to the system. Modifiable via sysctl
+ * when the FFCLOCK option is defined.
+ */
+int sysclock_active = SYSCLOCK_FBCK;
+
+/* Internal NTP status and error estimates. */
+extern int time_status;
+extern long time_esterror;
+
+/*
+ * Take a snapshot of sysclock data which can be used to compare system clocks
+ * and generate timestamps after the fact.
+ */
+void
+sysclock_getsnapshot(struct sysclock_snap *clock_snap, int fast)
+{
+ struct fbclock_info *fbi;
+ struct timehands *th;
+ struct bintime bt;
+ unsigned int delta, gen;
+#ifdef FFCLOCK
+ ffcounter ffcount;
+ struct fftimehands *ffth;
+ struct ffclock_info *ffi;
+ struct ffclock_estimate cest;
+
+ ffi = &clock_snap->ff_info;
+#endif
+
+ fbi = &clock_snap->fb_info;
+ delta = 0;
+
+ do {
+ th = timehands;
+ gen = th->th_generation;
+ fbi->th_scale = th->th_scale;
+ fbi->tick_time = th->th_offset;
+#ifdef FFCLOCK
+ ffth = fftimehands;
+ ffi->tick_time = ffth->tick_time_lerp;
+ ffi->tick_time_lerp = ffth->tick_time_lerp;
+ ffi->period = ffth->cest.period;
+ ffi->period_lerp = ffth->period_lerp;
+ clock_snap->ffcount = ffth->tick_ffcount;
+ cest = ffth->cest;
+#endif
+ if (!fast)
+ delta = tc_delta(th);
+ } while (gen == 0 || gen != th->th_generation);
+
+ clock_snap->delta = delta;
+ clock_snap->sysclock_active = sysclock_active;
+
+ /* Record feedback clock status and error. */
+ clock_snap->fb_info.status = time_status;
+ /* XXX: Very crude estimate of feedback clock error. */
+ bt.sec = time_esterror / 1000000;
+ bt.frac = ((time_esterror - bt.sec) * 1000000) *
+ (uint64_t)18446744073709ULL;
+ clock_snap->fb_info.error = bt;
+
+#ifdef FFCLOCK
+ if (!fast)
+ clock_snap->ffcount += delta;
+
+ /* Record feed-forward clock leap second adjustment. */
+ ffi->leapsec_adjustment = cest.leapsec_total;
+ if (clock_snap->ffcount > cest.leapsec_next)
+ ffi->leapsec_adjustment -= cest.leapsec;
+
+ /* Record feed-forward clock status and error. */
+ clock_snap->ff_info.status = cest.status;
+ ffcount = clock_snap->ffcount - cest.update_ffcount;
+ ffclock_convert_delta(ffcount, cest.period, &bt);
+ /* 18446744073709 = int(2^64/1e12), err_bound_rate in [ps/s]. */
+ bintime_mul(&bt, cest.errb_rate * (uint64_t)18446744073709ULL);
+ /* 18446744073 = int(2^64 / 1e9), since err_abs in [ns]. */
+ bintime_addx(&bt, cest.errb_abs * (uint64_t)18446744073ULL);
+ clock_snap->ff_info.error = bt;
+#endif
+}
+
+/*
+ * Convert a sysclock snapshot into a struct bintime based on the specified
+ * clock source and flags.
+ */
+int
+sysclock_snap2bintime(struct sysclock_snap *cs, struct bintime *bt,
+ int whichclock, uint32_t flags)
+{
+#ifdef FFCLOCK
+ struct bintime bt2;
+ uint64_t period;
+#endif
+
+ switch (whichclock) {
+ case SYSCLOCK_FBCK:
+ *bt = cs->fb_info.tick_time;
+
+ /* If snapshot was created with !fast, delta will be >0. */
+ if (cs->delta > 0)
+ bintime_addx(bt, cs->fb_info.th_scale * cs->delta);
+
+ if ((flags & FBCLOCK_UPTIME) == 0)
+ bintime_add(bt, &boottimebin);
+ break;
+#ifdef FFCLOCK
+ case SYSCLOCK_FFWD:
+ if (flags & FFCLOCK_LERP) {
+ *bt = cs->ff_info.tick_time_lerp;
+ period = cs->ff_info.period_lerp;
+ } else {
+ *bt = cs->ff_info.tick_time;
+ period = cs->ff_info.period;
+ }
+
+ /* If snapshot was created with !fast, delta will be >0. */
+ if (cs->delta > 0) {
+ ffclock_convert_delta(cs->delta, period, &bt2);
+ bintime_add(bt, &bt2);
+ }
+
+ /* Leap second adjustment. */
+ if (flags & FFCLOCK_LEAPSEC)
+ bt->sec -= cs->ff_info.leapsec_adjustment;
+
+ /* Boot time adjustment, for uptime/monotonic clocks. */
+ if (flags & FFCLOCK_UPTIME)
+ bintime_sub(bt, &ffclock_boottime);
+#endif
+ default:
+ return (EINVAL);
+ break;
+ }
+
+ return (0);
+}
+
+/*
* Initialize a new timecounter and possibly use it.
*/
void
diff --git a/sys/kern/kern_thr.c b/sys/kern/kern_thr.c
index 24c6cfd..a5d9692 100644
--- a/sys/kern/kern_thr.c
+++ b/sys/kern/kern_thr.c
@@ -63,11 +63,11 @@ static SYSCTL_NODE(_kern, OID_AUTO, threads, CTLFLAG_RW, 0,
static int max_threads_per_proc = 1500;
SYSCTL_INT(_kern_threads, OID_AUTO, max_threads_per_proc, CTLFLAG_RW,
- &max_threads_per_proc, 0, "Limit on threads per proc");
+ &max_threads_per_proc, 0, "Limit on threads per proc");
static int max_threads_hits;
SYSCTL_INT(_kern_threads, OID_AUTO, max_threads_hits, CTLFLAG_RD,
- &max_threads_hits, 0, "");
+ &max_threads_hits, 0, "kern.threads.max_threads_per_proc hit count");
#ifdef COMPAT_FREEBSD32
diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c
index d9df5c3..d4c5c4c 100644
--- a/sys/kern/kern_thread.c
+++ b/sys/kern/kern_thread.c
@@ -381,7 +381,7 @@ thread_free(struct thread *td)
void
thread_exit(void)
{
- uint64_t new_switchtime;
+ uint64_t runtime, new_switchtime;
struct thread *td;
struct thread *td2;
struct proc *p;
@@ -410,15 +410,6 @@ thread_exit(void)
*/
cpu_thread_exit(td); /* XXXSMP */
- /* Do the same timestamp bookkeeping that mi_switch() would do. */
- new_switchtime = cpu_ticks();
- p->p_rux.rux_runtime += (new_switchtime - PCPU_GET(switchtime));
- PCPU_SET(switchtime, new_switchtime);
- PCPU_SET(switchticks, ticks);
- PCPU_INC(cnt.v_swtch);
- /* Save our resource usage in our process. */
- td->td_ru.ru_nvcsw++;
- rucollect(&p->p_ru, &td->td_ru);
/*
* The last thread is left attached to the process
* So that the whole bundle gets recycled. Skip
@@ -467,7 +458,21 @@ thread_exit(void)
PMC_SWITCH_CONTEXT(td, PMC_FN_CSW_OUT);
#endif
PROC_UNLOCK(p);
+
+ /* Do the same timestamp bookkeeping that mi_switch() would do. */
+ new_switchtime = cpu_ticks();
+ runtime = new_switchtime - PCPU_GET(switchtime);
+ td->td_runtime += runtime;
+ td->td_incruntime += runtime;
+ PCPU_SET(switchtime, new_switchtime);
+ PCPU_SET(switchticks, ticks);
+ PCPU_INC(cnt.v_swtch);
+
+ /* Save our resource usage in our process. */
+ td->td_ru.ru_nvcsw++;
ruxagg(p, td);
+ rucollect(&p->p_ru, &td->td_ru);
+
thread_lock(td);
PROC_SUNLOCK(p);
td->td_state = TDS_INACTIVE;
diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c
index 7d8a781..896f77c 100644
--- a/sys/kern/kern_umtx.c
+++ b/sys/kern/kern_umtx.c
@@ -2804,9 +2804,8 @@ do_sem_wait(struct thread *td, struct _usem *sem, struct timespec *timeout)
umtxq_insert(uq);
umtxq_unlock(&uq->uq_key);
- if (fuword32(__DEVOLATILE(uint32_t *, &sem->_has_waiters)) == 0)
- casuword32(__DEVOLATILE(uint32_t *, &sem->_has_waiters), 0, 1);
-
+ casuword32(__DEVOLATILE(uint32_t *, &sem->_has_waiters), 0, 1);
+ rmb();
count = fuword32(__DEVOLATILE(uint32_t *, &sem->_count));
if (count != 0) {
umtxq_lock(&uq->uq_key);
diff --git a/sys/kern/kern_uuid.c b/sys/kern/kern_uuid.c
index 693bb25..14ace89 100644
--- a/sys/kern/kern_uuid.c
+++ b/sys/kern/kern_uuid.c
@@ -98,20 +98,20 @@ uuid_node(uint16_t *node)
IFNET_RLOCK_NOSLEEP();
TAILQ_FOREACH(ifp, &V_ifnet, if_link) {
/* Walk the address list */
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
sdl = (struct sockaddr_dl*)ifa->ifa_addr;
if (sdl != NULL && sdl->sdl_family == AF_LINK &&
sdl->sdl_type == IFT_ETHER) {
/* Got a MAC address. */
bcopy(LLADDR(sdl), node, UUID_NODE_LEN);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
IFNET_RUNLOCK_NOSLEEP();
CURVNET_RESTORE();
return;
}
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
}
IFNET_RUNLOCK_NOSLEEP();
diff --git a/sys/kern/link_elf_obj.c b/sys/kern/link_elf_obj.c
index a5a815d..135614c 100644
--- a/sys/kern/link_elf_obj.c
+++ b/sys/kern/link_elf_obj.c
@@ -684,7 +684,11 @@ link_elf_load_file(linker_class_t cls, const char *filename,
* location of code and data in the kernel's address space, request a
* mapping that is above the kernel.
*/
+#ifdef __amd64__
mapbase = KERNBASE;
+#else
+ mapbase = VM_MIN_KERNEL_ADDRESS;
+#endif
error = vm_map_find(kernel_map, ef->object, 0, &mapbase,
round_page(mapsize), TRUE, VM_PROT_ALL, VM_PROT_ALL, FALSE);
if (error) {
diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c
index 0fd6481..16cc033 100644
--- a/sys/kern/sched_4bsd.c
+++ b/sys/kern/sched_4bsd.c
@@ -1572,14 +1572,14 @@ sched_throw(struct thread *td)
if (td == NULL) {
mtx_lock_spin(&sched_lock);
spinlock_exit();
+ PCPU_SET(switchtime, cpu_ticks());
+ PCPU_SET(switchticks, ticks);
} else {
lock_profile_release_lock(&sched_lock.lock_object);
MPASS(td->td_lock == &sched_lock);
}
mtx_assert(&sched_lock, MA_OWNED);
KASSERT(curthread->td_md.md_spinlock_count == 1, ("invalid count"));
- PCPU_SET(switchtime, cpu_ticks());
- PCPU_SET(switchticks, ticks);
cpu_throw(td, choosethread()); /* doesn't return */
}
diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c
index 31d3d11..2065b9f 100644
--- a/sys/kern/sched_ule.c
+++ b/sys/kern/sched_ule.c
@@ -125,6 +125,7 @@ static struct td_sched td_sched0;
*/
#define PRI_TIMESHARE_RANGE (PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE + 1)
#define PRI_INTERACT_RANGE ((PRI_TIMESHARE_RANGE - SCHED_PRI_NRESV) / 2)
+#define PRI_BATCH_RANGE (PRI_TIMESHARE_RANGE - PRI_INTERACT_RANGE)
#define PRI_MIN_INTERACT PRI_MIN_TIMESHARE
#define PRI_MAX_INTERACT (PRI_MIN_TIMESHARE + PRI_INTERACT_RANGE - 1)
@@ -416,7 +417,6 @@ sched_shouldpreempt(int pri, int cpri, int remote)
return (0);
}
-#define TS_RQ_PPQ (((PRI_MAX_BATCH - PRI_MIN_BATCH) + 1) / RQ_NQS)
/*
* Add a thread to the actual run-queue. Keeps transferable counts up to
* date with what is actually on the run-queue. Selects the correct
@@ -449,7 +449,7 @@ tdq_runq_add(struct tdq *tdq, struct thread *td, int flags)
* realtime. Use the whole queue to represent these values.
*/
if ((flags & (SRQ_BORROWING|SRQ_PREEMPTED)) == 0) {
- pri = (pri - PRI_MIN_BATCH) / TS_RQ_PPQ;
+ pri = RQ_NQS * (pri - PRI_MIN_BATCH) / PRI_BATCH_RANGE;
pri = (pri + tdq->tdq_idx) % RQ_NQS;
/*
* This effectively shortens the queue by one so we
@@ -1434,7 +1434,8 @@ sched_priority(struct thread *td)
} else {
pri = SCHED_PRI_MIN;
if (td->td_sched->ts_ticks)
- pri += SCHED_PRI_TICKS(td->td_sched);
+ pri += min(SCHED_PRI_TICKS(td->td_sched),
+ SCHED_PRI_RANGE);
pri += SCHED_PRI_NICE(td->td_proc->p_nice);
KASSERT(pri >= PRI_MIN_BATCH && pri <= PRI_MAX_BATCH,
("sched_priority: invalid priority %d: nice %d, "
@@ -2586,6 +2587,8 @@ sched_throw(struct thread *td)
/* Correct spinlock nesting and acquire the correct lock. */
TDQ_LOCK(tdq);
spinlock_exit();
+ PCPU_SET(switchtime, cpu_ticks());
+ PCPU_SET(switchticks, ticks);
} else {
MPASS(td->td_lock == TDQ_LOCKPTR(tdq));
tdq_load_rem(tdq, td);
@@ -2594,8 +2597,6 @@ sched_throw(struct thread *td)
KASSERT(curthread->td_md.md_spinlock_count == 1, ("invalid count"));
newtd = choosethread();
TDQ_LOCKPTR(tdq)->mtx_lock = (uintptr_t)newtd;
- PCPU_SET(switchtime, cpu_ticks());
- PCPU_SET(switchticks, ticks);
cpu_throw(td, newtd); /* doesn't return */
}
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c
index a95bdb9..cc74204 100644
--- a/sys/kern/subr_bus.c
+++ b/sys/kern/subr_bus.c
@@ -2020,9 +2020,15 @@ device_probe_child(device_t dev, device_t child)
if (!hasclass) {
if (device_set_devclass(child,
dl->driver->name) != 0) {
+ char const * devname =
+ device_get_name(child);
+ if (devname == NULL)
+ devname = "(unknown)";
printf("driver bug: Unable to set "
- "devclass (devname: %s)\n",
- device_get_name(child));
+ "devclass (class: %s "
+ "devname: %s)\n",
+ dl->driver->name,
+ devname);
(void)device_set_driver(child, NULL);
continue;
}
diff --git a/sys/kern/subr_hash.c b/sys/kern/subr_hash.c
index 8ffbc9c..5533882 100644
--- a/sys/kern/subr_hash.c
+++ b/sys/kern/subr_hash.c
@@ -52,9 +52,7 @@ hashinit_flags(int elements, struct malloc_type *type, u_long *hashmask,
LIST_HEAD(generic, generic) *hashtbl;
int i;
- if (elements <= 0)
- panic("hashinit: bad elements");
-
+ KASSERT(elements > 0, ("%s: bad elements", __func__));
/* Exactly one of HASH_WAITOK and HASH_NOWAIT must be set. */
KASSERT((flags & HASH_WAITOK) ^ (flags & HASH_NOWAIT),
("Bad flags (0x%x) passed to hashinit_flags", flags));
@@ -95,8 +93,7 @@ hashdestroy(void *vhashtbl, struct malloc_type *type, u_long hashmask)
hashtbl = vhashtbl;
for (hp = hashtbl; hp <= &hashtbl[hashmask]; hp++)
- if (!LIST_EMPTY(hp))
- panic("hashdestroy: hash not empty");
+ KASSERT(LIST_EMPTY(hp), ("%s: hash not empty", __func__));
free(hashtbl, type);
}
@@ -115,8 +112,7 @@ phashinit(int elements, struct malloc_type *type, u_long *nentries)
LIST_HEAD(generic, generic) *hashtbl;
int i;
- if (elements <= 0)
- panic("phashinit: bad elements");
+ KASSERT(elements > 0, ("%s: bad elements", __func__));
for (i = 1, hashsize = primes[1]; hashsize <= elements;) {
i++;
if (i == NPRIMES)
diff --git a/sys/kern/subr_hints.c b/sys/kern/subr_hints.c
index a46b938..afa959d 100644
--- a/sys/kern/subr_hints.c
+++ b/sys/kern/subr_hints.c
@@ -133,8 +133,7 @@ res_find(int *line, int *startln,
r_name, &r_unit, r_resname, r_value);
if (hit && n != 4) {
printf("CONFIG: invalid hint '%s'\n", cp);
- /* XXX: abuse bogus index() declaration */
- p = index(cp, 'h');
+ p = strchr(cp, 'h');
*p = 'H';
hit = 0;
}
@@ -172,18 +171,18 @@ res_find(int *line, int *startln,
s = cp;
/* This is a bit of a hack, but at least is reentrant */
/* Note that it returns some !unterminated! strings. */
- s = index(s, '.') + 1; /* start of device */
+ s = strchr(s, '.') + 1; /* start of device */
if (ret_name)
*ret_name = s;
- s = index(s, '.') + 1; /* start of unit */
+ s = strchr(s, '.') + 1; /* start of unit */
if (ret_namelen && ret_name)
*ret_namelen = s - *ret_name - 1; /* device length */
if (ret_unit)
*ret_unit = r_unit;
- s = index(s, '.') + 1; /* start of resname */
+ s = strchr(s, '.') + 1; /* start of resname */
if (ret_resname)
*ret_resname = s;
- s = index(s, '=') + 1; /* start of value */
+ s = strchr(s, '=') + 1; /* start of value */
if (ret_resnamelen && ret_resname)
*ret_resnamelen = s - *ret_resname - 1; /* value len */
if (ret_value)
diff --git a/sys/kern/subr_kdb.c b/sys/kern/subr_kdb.c
index 42e188b..9ca34b1 100644
--- a/sys/kern/subr_kdb.c
+++ b/sys/kern/subr_kdb.c
@@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/systm.h>
+#include <sys/cons.h>
#include <sys/kdb.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
@@ -226,13 +227,7 @@ kdb_sysctl_trap_code(SYSCTL_HANDLER_ARGS)
void
kdb_panic(const char *msg)
{
-#ifdef SMP
- cpuset_t other_cpus;
- other_cpus = all_cpus;
- CPU_CLR(PCPU_GET(cpuid), &other_cpus);
- stop_cpus_hard(other_cpus);
-#endif
printf("KDB: panic\n");
panic("%s", msg);
}
@@ -594,6 +589,9 @@ kdb_trap(int type, int code, struct trapframe *tf)
struct kdb_dbbe *be;
register_t intr;
int handled;
+#ifdef SMP
+ int did_stop_cpus;
+#endif
be = kdb_dbbe;
if (be == NULL || be->dbbe_trap == NULL)
@@ -606,9 +604,13 @@ kdb_trap(int type, int code, struct trapframe *tf)
intr = intr_disable();
#ifdef SMP
- other_cpus = all_cpus;
- CPU_CLR(PCPU_GET(cpuid), &other_cpus);
- stop_cpus_hard(other_cpus);
+ if (!SCHEDULER_STOPPED()) {
+ other_cpus = all_cpus;
+ CPU_CLR(PCPU_GET(cpuid), &other_cpus);
+ stop_cpus_hard(other_cpus);
+ did_stop_cpus = 1;
+ } else
+ did_stop_cpus = 0;
#endif
kdb_active++;
@@ -621,6 +623,8 @@ kdb_trap(int type, int code, struct trapframe *tf)
makectx(tf, &kdb_pcb);
kdb_thr_select(curthread);
+ cngrab();
+
for (;;) {
handled = be->dbbe_trap(type, code);
if (be == kdb_dbbe)
@@ -631,10 +635,13 @@ kdb_trap(int type, int code, struct trapframe *tf)
printf("Switching to %s back-end\n", be->dbbe_name);
}
+ cnungrab();
+
kdb_active--;
#ifdef SMP
- restart_cpus(stopped_cpus);
+ if (did_stop_cpus)
+ restart_cpus(stopped_cpus);
#endif
intr_restore(intr);
diff --git a/sys/kern/subr_lock.c b/sys/kern/subr_lock.c
index 1c18f65..b040c7b 100644
--- a/sys/kern/subr_lock.c
+++ b/sys/kern/subr_lock.c
@@ -532,6 +532,9 @@ lock_profile_obtain_lock_success(struct lock_object *lo, int contested,
struct lock_profile_object *l;
int spin;
+ if (SCHEDULER_STOPPED())
+ return;
+
/* don't reset the timer when/if recursing */
if (!lock_prof_enable || (lo->lo_flags & LO_NOPROFILE))
return;
@@ -596,6 +599,8 @@ lock_profile_release_lock(struct lock_object *lo)
struct lpohead *head;
int spin;
+ if (SCHEDULER_STOPPED())
+ return;
if (lo->lo_flags & LO_NOPROFILE)
return;
spin = (LOCK_CLASS(lo)->lc_flags & LC_SPINLOCK) ? 1 : 0;
diff --git a/sys/kern/subr_mchain.c b/sys/kern/subr_mchain.c
index 3fd265b..faf8f67 100644
--- a/sys/kern/subr_mchain.c
+++ b/sys/kern/subr_mchain.c
@@ -139,7 +139,7 @@ mb_put_padbyte(struct mbchain *mbp)
if ((unsigned long)dst & 1)
return mb_put_mem(mbp, (caddr_t)&x, 1, MB_MSYSTEM);
else
- return 0;
+ return 0;
}
int
diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c
index bbf9a97..bd2a5cb 100644
--- a/sys/kern/subr_witness.c
+++ b/sys/kern/subr_witness.c
@@ -520,7 +520,7 @@ static struct witness_order_list_entry order_lists[] = {
{ "udpinp", &lock_class_rw },
{ "in_multi_mtx", &lock_class_mtx_sleep },
{ "igmp_mtx", &lock_class_mtx_sleep },
- { "if_addr_mtx", &lock_class_mtx_sleep },
+ { "if_addr_lock", &lock_class_rw },
{ NULL, NULL },
/*
* IPv6 multicast:
@@ -529,7 +529,7 @@ static struct witness_order_list_entry order_lists[] = {
{ "udpinp", &lock_class_rw },
{ "in6_multi_mtx", &lock_class_mtx_sleep },
{ "mld_mtx", &lock_class_mtx_sleep },
- { "if_addr_mtx", &lock_class_mtx_sleep },
+ { "if_addr_lock", &lock_class_rw },
{ NULL, NULL },
/*
* UNIX Domain Sockets
@@ -2162,6 +2162,13 @@ witness_save(struct lock_object *lock, const char **filep, int *linep)
struct lock_instance *instance;
struct lock_class *class;
+ /*
+ * This function is used independently in locking code to deal with
+ * Giant, SCHEDULER_STOPPED() check can be removed here after Giant
+ * is gone.
+ */
+ if (SCHEDULER_STOPPED())
+ return;
KASSERT(witness_cold == 0, ("%s: witness_cold", __func__));
if (lock->lo_witness == NULL || witness_watch == -1 || panicstr != NULL)
return;
@@ -2188,6 +2195,13 @@ witness_restore(struct lock_object *lock, const char *file, int line)
struct lock_instance *instance;
struct lock_class *class;
+ /*
+ * This function is used independently in locking code to deal with
+ * Giant, SCHEDULER_STOPPED() check can be removed here after Giant
+ * is gone.
+ */
+ if (SCHEDULER_STOPPED())
+ return;
KASSERT(witness_cold == 0, ("%s: witness_cold", __func__));
if (lock->lo_witness == NULL || witness_watch == -1 || panicstr != NULL)
return;
diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c
index 9a4448a..9edcb74 100644
--- a/sys/kern/sys_pipe.c
+++ b/sys/kern/sys_pipe.c
@@ -1349,7 +1349,8 @@ pipe_poll(fp, events, active_cred, td)
if (wpipe->pipe_present != PIPE_ACTIVE ||
(wpipe->pipe_state & PIPE_EOF) ||
(((wpipe->pipe_state & PIPE_DIRECTW) == 0) &&
- (wpipe->pipe_buffer.size - wpipe->pipe_buffer.cnt) >= PIPE_BUF))
+ ((wpipe->pipe_buffer.size - wpipe->pipe_buffer.cnt) >= PIPE_BUF ||
+ wpipe->pipe_buffer.size == 0)))
revents |= events & (POLLOUT | POLLWRNORM);
if ((events & POLLINIGNEOF) == 0) {
@@ -1660,7 +1661,8 @@ filt_pipewrite(struct knote *kn, long hint)
PIPE_UNLOCK(rpipe);
return (1);
}
- kn->kn_data = wpipe->pipe_buffer.size - wpipe->pipe_buffer.cnt;
+ kn->kn_data = (wpipe->pipe_buffer.size > 0) ?
+ (wpipe->pipe_buffer.size - wpipe->pipe_buffer.cnt) : PIPE_BUF;
if (wpipe->pipe_state & PIPE_DIRECTW)
kn->kn_data = 0;
diff --git a/sys/kern/tty_inq.c b/sys/kern/tty_inq.c
index 0c39a29..97017ac 100644
--- a/sys/kern/tty_inq.c
+++ b/sys/kern/tty_inq.c
@@ -355,7 +355,7 @@ ttyinq_findchar(struct ttyinq *ti, const char *breakc, size_t maxlen,
return (0);
while (boff < bend) {
- if (index(breakc, tib->tib_data[boff]) && !GETBIT(tib, boff)) {
+ if (strchr(breakc, tib->tib_data[boff]) && !GETBIT(tib, boff)) {
*lastc = tib->tib_data[boff];
return (boff - ti->ti_begin + 1);
}
diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c
index 696f974..212daba 100644
--- a/sys/kern/uipc_mqueue.c
+++ b/sys/kern/uipc_mqueue.c
@@ -1974,7 +1974,7 @@ kern_kmq_open(struct thread *td, const char *upath, int flags, mode_t mode,
* characters.
*/
len = strlen(path);
- if (len < 2 || path[0] != '/' || index(path + 1, '/') != NULL)
+ if (len < 2 || path[0] != '/' || strchr(path + 1, '/') != NULL)
return (EINVAL);
error = falloc(td, &fp, &fd, 0);
@@ -2077,7 +2077,7 @@ sys_kmq_unlink(struct thread *td, struct kmq_unlink_args *uap)
return (error);
len = strlen(path);
- if (len < 2 || path[0] != '/' || index(path + 1, '/') != NULL)
+ if (len < 2 || path[0] != '/' || strchr(path + 1, '/') != NULL)
return (EINVAL);
sx_xlock(&mqfs_data.mi_lock);
diff --git a/sys/kern/uipc_shm.c b/sys/kern/uipc_shm.c
index 3a639fb..ce7c722 100644
--- a/sys/kern/uipc_shm.c
+++ b/sys/kern/uipc_shm.c
@@ -39,13 +39,6 @@
*
* (3) Resource limits? Does this need its own resource limits or are the
* existing limits in mmap(2) sufficient?
- *
- * (4) Partial page truncation. vnode_pager_setsize() will zero any parts
- * of a partially mapped page as a result of ftruncate(2)/truncate(2).
- * We can do the same (with the same pmap evil), but do we need to
- * worry about the bits on disk if the page is swapped out or will the
- * swapper zero the parts of a page that are invalid if the page is
- * swapped back in for us?
*/
#include <sys/cdefs.h>
@@ -81,9 +74,12 @@ __FBSDID("$FreeBSD$");
#include <vm/vm.h>
#include <vm/vm_param.h>
#include <vm/pmap.h>
+#include <vm/vm_extern.h>
#include <vm/vm_map.h>
+#include <vm/vm_kern.h>
#include <vm/vm_object.h>
#include <vm/vm_page.h>
+#include <vm/vm_pageout.h>
#include <vm/vm_pager.h>
#include <vm/swap_pager.h>
@@ -251,9 +247,10 @@ static int
shm_dotruncate(struct shmfd *shmfd, off_t length)
{
vm_object_t object;
- vm_page_t m;
- vm_pindex_t nobjsize;
+ vm_page_t m, ma[1];
+ vm_pindex_t idx, nobjsize;
vm_ooffset_t delta;
+ int base, rv;
object = shmfd->shm_object;
VM_OBJECT_LOCK(object);
@@ -265,6 +262,64 @@ shm_dotruncate(struct shmfd *shmfd, off_t length)
/* Are we shrinking? If so, trim the end. */
if (length < shmfd->shm_size) {
+ /*
+ * Disallow any requests to shrink the size if this
+ * object is mapped into the kernel.
+ */
+ if (shmfd->shm_kmappings > 0) {
+ VM_OBJECT_UNLOCK(object);
+ return (EBUSY);
+ }
+
+ /*
+ * Zero the truncated part of the last page.
+ */
+ base = length & PAGE_MASK;
+ if (base != 0) {
+ idx = OFF_TO_IDX(length);
+retry:
+ m = vm_page_lookup(object, idx);
+ if (m != NULL) {
+ if ((m->oflags & VPO_BUSY) != 0 ||
+ m->busy != 0) {
+ vm_page_sleep(m, "shmtrc");
+ goto retry;
+ }
+ } else if (vm_pager_has_page(object, idx, NULL, NULL)) {
+ m = vm_page_alloc(object, idx, VM_ALLOC_NORMAL);
+ if (m == NULL) {
+ VM_OBJECT_UNLOCK(object);
+ VM_WAIT;
+ VM_OBJECT_LOCK(object);
+ goto retry;
+ } else if (m->valid != VM_PAGE_BITS_ALL) {
+ ma[0] = m;
+ rv = vm_pager_get_pages(object, ma, 1,
+ 0);
+ m = vm_page_lookup(object, idx);
+ } else
+ /* A cached page was reactivated. */
+ rv = VM_PAGER_OK;
+ vm_page_lock(m);
+ if (rv == VM_PAGER_OK) {
+ vm_page_deactivate(m);
+ vm_page_unlock(m);
+ vm_page_wakeup(m);
+ } else {
+ vm_page_free(m);
+ vm_page_unlock(m);
+ VM_OBJECT_UNLOCK(object);
+ return (EIO);
+ }
+ }
+ if (m != NULL) {
+ pmap_zero_page_area(m, base, PAGE_SIZE - base);
+ KASSERT(m->valid == VM_PAGE_BITS_ALL,
+ ("shm_dotruncate: page %p is invalid", m));
+ vm_page_dirty(m);
+ vm_pager_page_unswapped(m);
+ }
+ }
delta = ptoa(object->size - nobjsize);
/* Toss in memory pages. */
@@ -279,45 +334,7 @@ shm_dotruncate(struct shmfd *shmfd, off_t length)
/* Free the swap accounted for shm */
swap_release_by_cred(delta, object->cred);
object->charge -= delta;
-
- /*
- * If the last page is partially mapped, then zero out
- * the garbage at the end of the page. See comments
- * in vnode_pager_setsize() for more details.
- *
- * XXXJHB: This handles in memory pages, but what about
- * a page swapped out to disk?
- */
- if ((length & PAGE_MASK) &&
- (m = vm_page_lookup(object, OFF_TO_IDX(length))) != NULL &&
- m->valid != 0) {
- int base = (int)length & PAGE_MASK;
- int size = PAGE_SIZE - base;
-
- pmap_zero_page_area(m, base, size);
-
- /*
- * Update the valid bits to reflect the blocks that
- * have been zeroed. Some of these valid bits may
- * have already been set.
- */
- vm_page_set_valid_range(m, base, size);
-
- /*
- * Round "base" to the next block boundary so that the
- * dirty bit for a partially zeroed block is not
- * cleared.
- */
- base = roundup2(base, DEV_BSIZE);
-
- vm_page_clear_dirty(m, base, PAGE_SIZE - base);
- } else if ((length & PAGE_MASK) &&
- __predict_false(object->cache != NULL)) {
- vm_page_cache_free(object, OFF_TO_IDX(length),
- nobjsize);
- }
} else {
-
/* Attempt to reserve the swap */
delta = ptoa(nobjsize - object->size);
if (!swap_reserve_by_cred(delta, object->cred)) {
@@ -725,3 +742,105 @@ out:
mtx_unlock(&shm_timestamp_lock);
return (error);
}
+
+/*
+ * Helper routines to allow the backing object of a shared memory file
+ * descriptor to be mapped in the kernel.
+ */
+int
+shm_map(struct file *fp, size_t size, off_t offset, void **memp)
+{
+ struct shmfd *shmfd;
+ vm_offset_t kva, ofs;
+ vm_object_t obj;
+ int rv;
+
+ if (fp->f_type != DTYPE_SHM)
+ return (EINVAL);
+ shmfd = fp->f_data;
+ obj = shmfd->shm_object;
+ VM_OBJECT_LOCK(obj);
+ /*
+ * XXXRW: This validation is probably insufficient, and subject to
+ * sign errors. It should be fixed.
+ */
+ if (offset >= shmfd->shm_size ||
+ offset + size > round_page(shmfd->shm_size)) {
+ VM_OBJECT_UNLOCK(obj);
+ return (EINVAL);
+ }
+
+ shmfd->shm_kmappings++;
+ vm_object_reference_locked(obj);
+ VM_OBJECT_UNLOCK(obj);
+
+ /* Map the object into the kernel_map and wire it. */
+ kva = vm_map_min(kernel_map);
+ ofs = offset & PAGE_MASK;
+ offset = trunc_page(offset);
+ size = round_page(size + ofs);
+ rv = vm_map_find(kernel_map, obj, offset, &kva, size,
+ VMFS_ALIGNED_SPACE, VM_PROT_READ | VM_PROT_WRITE,
+ VM_PROT_READ | VM_PROT_WRITE, 0);
+ if (rv == KERN_SUCCESS) {
+ rv = vm_map_wire(kernel_map, kva, kva + size,
+ VM_MAP_WIRE_SYSTEM | VM_MAP_WIRE_NOHOLES);
+ if (rv == KERN_SUCCESS) {
+ *memp = (void *)(kva + ofs);
+ return (0);
+ }
+ vm_map_remove(kernel_map, kva, kva + size);
+ } else
+ vm_object_deallocate(obj);
+
+ /* On failure, drop our mapping reference. */
+ VM_OBJECT_LOCK(obj);
+ shmfd->shm_kmappings--;
+ VM_OBJECT_UNLOCK(obj);
+
+ return (vm_mmap_to_errno(rv));
+}
+
+/*
+ * We require the caller to unmap the entire entry. This allows us to
+ * safely decrement shm_kmappings when a mapping is removed.
+ */
+int
+shm_unmap(struct file *fp, void *mem, size_t size)
+{
+ struct shmfd *shmfd;
+ vm_map_entry_t entry;
+ vm_offset_t kva, ofs;
+ vm_object_t obj;
+ vm_pindex_t pindex;
+ vm_prot_t prot;
+ boolean_t wired;
+ vm_map_t map;
+ int rv;
+
+ if (fp->f_type != DTYPE_SHM)
+ return (EINVAL);
+ shmfd = fp->f_data;
+ kva = (vm_offset_t)mem;
+ ofs = kva & PAGE_MASK;
+ kva = trunc_page(kva);
+ size = round_page(size + ofs);
+ map = kernel_map;
+ rv = vm_map_lookup(&map, kva, VM_PROT_READ | VM_PROT_WRITE, &entry,
+ &obj, &pindex, &prot, &wired);
+ if (rv != KERN_SUCCESS)
+ return (EINVAL);
+ if (entry->start != kva || entry->end != kva + size) {
+ vm_map_lookup_done(map, entry);
+ return (EINVAL);
+ }
+ vm_map_lookup_done(map, entry);
+ if (obj != shmfd->shm_object)
+ return (EINVAL);
+ vm_map_remove(map, kva, kva + size);
+ VM_OBJECT_LOCK(obj);
+ KASSERT(shmfd->shm_kmappings > 0, ("shm_unmap: object not mapped"));
+ shmfd->shm_kmappings--;
+ VM_OBJECT_UNLOCK(obj);
+ return (0);
+}
diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c
index 551afac..272f939 100644
--- a/sys/kern/uipc_sockbuf.c
+++ b/sys/kern/uipc_sockbuf.c
@@ -1048,4 +1048,4 @@ SYSCTL_INT(_kern, KERN_DUMMY, dummy, CTLFLAG_RW, &dummy, 0, "");
SYSCTL_OID(_kern_ipc, KIPC_MAXSOCKBUF, maxsockbuf, CTLTYPE_ULONG|CTLFLAG_RW,
&sb_max, 0, sysctl_handle_sb_max, "LU", "Maximum socket buffer size");
SYSCTL_ULONG(_kern_ipc, KIPC_SOCKBUF_WASTE, sockbuf_waste_factor, CTLFLAG_RW,
- &sb_efficiency, 0, "");
+ &sb_efficiency, 0, "Socket buffer size waste factor");
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c
index 177fd56..4562ebc 100644
--- a/sys/kern/vfs_cache.c
+++ b/sys/kern/vfs_cache.c
@@ -39,11 +39,13 @@ __FBSDID("$FreeBSD$");
#include "opt_ktrace.h"
#include <sys/param.h>
+#include <sys/systm.h>
#include <sys/filedesc.h>
#include <sys/fnv_hash.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/malloc.h>
+#include <sys/fcntl.h>
#include <sys/mount.h>
#include <sys/namei.h>
#include <sys/proc.h>
@@ -52,7 +54,6 @@ __FBSDID("$FreeBSD$");
#include <sys/syscallsubr.h>
#include <sys/sysctl.h>
#include <sys/sysproto.h>
-#include <sys/systm.h>
#include <sys/vnode.h>
#ifdef KTRACE
#include <sys/ktrace.h>
@@ -102,6 +103,30 @@ struct namecache {
};
/*
+ * struct namecache_ts repeats struct namecache layout up to the
+ * nc_nlen member.
+ */
+struct namecache_ts {
+ LIST_ENTRY(namecache) nc_hash; /* hash chain */
+ LIST_ENTRY(namecache) nc_src; /* source vnode list */
+ TAILQ_ENTRY(namecache) nc_dst; /* destination vnode list */
+ struct vnode *nc_dvp; /* vnode of parent of name */
+ struct vnode *nc_vp; /* vnode the name refers to */
+ u_char nc_flag; /* flag bits */
+ u_char nc_nlen; /* length of name */
+ struct timespec nc_time; /* timespec provided by fs */
+ int nc_ticks; /* ticks value when entry was added */
+ char nc_name[0]; /* segment name + nul */
+};
+
+/*
+ * Flags in namecache.nc_flag
+ */
+#define NCF_WHITE 0x01
+#define NCF_ISDOTDOT 0x02
+#define NCF_TS 0x04
+
+/*
* Name caching works as follows:
*
* Names found by directory scans are retained in a cache
@@ -163,20 +188,64 @@ RW_SYSINIT(vfscache, &cache_lock, "Name Cache");
* fit in the small cache.
*/
static uma_zone_t cache_zone_small;
+static uma_zone_t cache_zone_small_ts;
static uma_zone_t cache_zone_large;
#define CACHE_PATH_CUTOFF 35
-#define CACHE_ZONE_SMALL (sizeof(struct namecache) + CACHE_PATH_CUTOFF \
- + 1)
-#define CACHE_ZONE_LARGE (sizeof(struct namecache) + NAME_MAX + 1)
-
-#define cache_alloc(len) uma_zalloc(((len) <= CACHE_PATH_CUTOFF) ? \
- cache_zone_small : cache_zone_large, M_WAITOK)
-#define cache_free(ncp) do { \
- if (ncp != NULL) \
- uma_zfree(((ncp)->nc_nlen <= CACHE_PATH_CUTOFF) ? \
- cache_zone_small : cache_zone_large, (ncp)); \
-} while (0)
+
+static struct namecache *
+cache_alloc(int len, int ts)
+{
+
+ if (len > CACHE_PATH_CUTOFF)
+ return (uma_zalloc(cache_zone_large, M_WAITOK));
+ if (ts)
+ return (uma_zalloc(cache_zone_small_ts, M_WAITOK));
+ else
+ return (uma_zalloc(cache_zone_small, M_WAITOK));
+}
+
+static void
+cache_free(struct namecache *ncp)
+{
+ int ts;
+
+ if (ncp == NULL)
+ return;
+ ts = ncp->nc_flag & NCF_TS;
+ if (ncp->nc_nlen <= CACHE_PATH_CUTOFF) {
+ if (ts)
+ uma_zfree(cache_zone_small_ts, ncp);
+ else
+ uma_zfree(cache_zone_small, ncp);
+ } else
+ uma_zfree(cache_zone_large, ncp);
+}
+
+static char *
+nc_get_name(struct namecache *ncp)
+{
+ struct namecache_ts *ncp_ts;
+
+ if ((ncp->nc_flag & NCF_TS) == 0)
+ return (ncp->nc_name);
+ ncp_ts = (struct namecache_ts *)ncp;
+ return (ncp_ts->nc_name);
+}
+
+static void
+cache_out_ts(struct namecache *ncp, struct timespec *tsp, int *ticksp)
+{
+
+ KASSERT((ncp->nc_flag & NCF_TS) != 0 ||
+ (tsp == NULL && ticksp == NULL),
+ ("No NCF_TS"));
+
+ if (tsp != NULL)
+ *tsp = ((struct namecache_ts *)ncp)->nc_time;
+ if (ticksp != NULL)
+ *ticksp = ((struct namecache_ts *)ncp)->nc_ticks;
+}
static int doingcache = 1; /* 1 => enable the cache */
SYSCTL_INT(_debug, OID_AUTO, vfscache, CTLFLAG_RW, &doingcache, 0,
@@ -232,12 +301,6 @@ static int vn_fullpath1(struct thread *td, struct vnode *vp, struct vnode *rdir,
static MALLOC_DEFINE(M_VFSCACHE, "vfscache", "VFS name cache entries");
-/*
- * Flags in namecache.nc_flag
- */
-#define NCF_WHITE 0x01
-#define NCF_ISDOTDOT 0x02
-
#ifdef DIAGNOSTIC
/*
* Grab an atomic snapshot of the name cache hash chain lengths
@@ -343,10 +406,10 @@ cache_zap(ncp)
#ifdef KDTRACE_HOOKS
if (ncp->nc_vp != NULL) {
SDT_PROBE(vfs, namecache, zap, done, ncp->nc_dvp,
- ncp->nc_name, ncp->nc_vp, 0, 0);
+ nc_get_name(ncp), ncp->nc_vp, 0, 0);
} else {
SDT_PROBE(vfs, namecache, zap_negative, done, ncp->nc_dvp,
- ncp->nc_name, 0, 0, 0);
+ nc_get_name(ncp), 0, 0, 0);
}
#endif
vp = NULL;
@@ -393,10 +456,12 @@ cache_zap(ncp)
*/
int
-cache_lookup(dvp, vpp, cnp)
+cache_lookup_times(dvp, vpp, cnp, tsp, ticksp)
struct vnode *dvp;
struct vnode **vpp;
struct componentname *cnp;
+ struct timespec *tsp;
+ int *ticksp;
{
struct namecache *ncp;
uint32_t hash;
@@ -421,6 +486,10 @@ retry_wlocked:
dothits++;
SDT_PROBE(vfs, namecache, lookup, hit, dvp, ".",
*vpp, 0, 0);
+ if (tsp != NULL)
+ timespecclear(tsp);
+ if (ticksp != NULL)
+ *ticksp = ticks;
goto success;
}
if (cnp->cn_namelen == 2 && cnp->cn_nameptr[1] == '.') {
@@ -439,19 +508,19 @@ retry_wlocked:
CACHE_WUNLOCK();
return (0);
}
- if (dvp->v_cache_dd->nc_flag & NCF_ISDOTDOT)
- *vpp = dvp->v_cache_dd->nc_vp;
+ ncp = dvp->v_cache_dd;
+ if (ncp->nc_flag & NCF_ISDOTDOT)
+ *vpp = ncp->nc_vp;
else
- *vpp = dvp->v_cache_dd->nc_dvp;
+ *vpp = ncp->nc_dvp;
/* Return failure if negative entry was found. */
- if (*vpp == NULL) {
- ncp = dvp->v_cache_dd;
+ if (*vpp == NULL)
goto negative_success;
- }
CTR3(KTR_VFS, "cache_lookup(%p, %s) found %p via ..",
dvp, cnp->cn_nameptr, *vpp);
SDT_PROBE(vfs, namecache, lookup, hit, dvp, "..",
*vpp, 0, 0);
+ cache_out_ts(ncp, tsp, ticksp);
goto success;
}
}
@@ -461,7 +530,7 @@ retry_wlocked:
LIST_FOREACH(ncp, (NCHHASH(hash)), nc_hash) {
numchecks++;
if (ncp->nc_dvp == dvp && ncp->nc_nlen == cnp->cn_namelen &&
- !bcmp(ncp->nc_name, cnp->cn_nameptr, ncp->nc_nlen))
+ !bcmp(nc_get_name(ncp), cnp->cn_nameptr, ncp->nc_nlen))
break;
}
@@ -496,8 +565,9 @@ retry_wlocked:
*vpp = ncp->nc_vp;
CTR4(KTR_VFS, "cache_lookup(%p, %s) found %p via ncp %p",
dvp, cnp->cn_nameptr, *vpp, ncp);
- SDT_PROBE(vfs, namecache, lookup, hit, dvp, ncp->nc_name,
+ SDT_PROBE(vfs, namecache, lookup, hit, dvp, nc_get_name(ncp),
*vpp, 0, 0);
+ cache_out_ts(ncp, tsp, ticksp);
goto success;
}
@@ -527,8 +597,9 @@ negative_success:
nchstats.ncs_neghits++;
if (ncp->nc_flag & NCF_WHITE)
cnp->cn_flags |= ISWHITEOUT;
- SDT_PROBE(vfs, namecache, lookup, hit_negative, dvp, ncp->nc_name,
+ SDT_PROBE(vfs, namecache, lookup, hit_negative, dvp, nc_get_name(ncp),
0, 0, 0);
+ cache_out_ts(ncp, tsp, ticksp);
CACHE_WUNLOCK();
return (ENOENT);
@@ -615,12 +686,14 @@ unlock:
* Add an entry to the cache.
*/
void
-cache_enter(dvp, vp, cnp)
+cache_enter_time(dvp, vp, cnp, tsp)
struct vnode *dvp;
struct vnode *vp;
struct componentname *cnp;
+ struct timespec *tsp;
{
struct namecache *ncp, *n2;
+ struct namecache_ts *n3;
struct nchashhead *ncpp;
uint32_t hash;
int flag;
@@ -687,13 +760,19 @@ cache_enter(dvp, vp, cnp)
* Calculate the hash key and setup as much of the new
* namecache entry as possible before acquiring the lock.
*/
- ncp = cache_alloc(cnp->cn_namelen);
+ ncp = cache_alloc(cnp->cn_namelen, tsp != NULL);
ncp->nc_vp = vp;
ncp->nc_dvp = dvp;
ncp->nc_flag = flag;
+ if (tsp != NULL) {
+ n3 = (struct namecache_ts *)ncp;
+ n3->nc_time = *tsp;
+ n3->nc_ticks = ticks;
+ n3->nc_flag |= NCF_TS;
+ }
len = ncp->nc_nlen = cnp->cn_namelen;
hash = fnv_32_buf(cnp->cn_nameptr, len, FNV1_32_INIT);
- strlcpy(ncp->nc_name, cnp->cn_nameptr, len + 1);
+ strlcpy(nc_get_name(ncp), cnp->cn_nameptr, len + 1);
hash = fnv_32_buf(&dvp, sizeof(dvp), hash);
CACHE_WLOCK();
@@ -706,7 +785,16 @@ cache_enter(dvp, vp, cnp)
LIST_FOREACH(n2, ncpp, nc_hash) {
if (n2->nc_dvp == dvp &&
n2->nc_nlen == cnp->cn_namelen &&
- !bcmp(n2->nc_name, cnp->cn_nameptr, n2->nc_nlen)) {
+ !bcmp(nc_get_name(n2), cnp->cn_nameptr, n2->nc_nlen)) {
+ if (tsp != NULL) {
+ KASSERT((n2->nc_flag & NCF_TS) != 0,
+ ("no NCF_TS"));
+ n3 = (struct namecache_ts *)n2;
+ n3->nc_time =
+ ((struct namecache_ts *)ncp)->nc_time;
+ n3->nc_ticks =
+ ((struct namecache_ts *)ncp)->nc_ticks;
+ }
CACHE_WUNLOCK();
cache_free(ncp);
return;
@@ -764,12 +852,12 @@ cache_enter(dvp, vp, cnp)
*/
if (vp) {
TAILQ_INSERT_HEAD(&vp->v_cache_dst, ncp, nc_dst);
- SDT_PROBE(vfs, namecache, enter, done, dvp, ncp->nc_name, vp,
- 0, 0);
+ SDT_PROBE(vfs, namecache, enter, done, dvp, nc_get_name(ncp),
+ vp, 0, 0);
} else {
TAILQ_INSERT_TAIL(&ncneg, ncp, nc_dst);
SDT_PROBE(vfs, namecache, enter_negative, done, dvp,
- ncp->nc_name, 0, 0, 0);
+ nc_get_name(ncp), 0, 0, 0);
}
if (numneg * ncnegfactor > numcache) {
ncp = TAILQ_FIRST(&ncneg);
@@ -791,10 +879,15 @@ nchinit(void *dummy __unused)
TAILQ_INIT(&ncneg);
- cache_zone_small = uma_zcreate("S VFS Cache", CACHE_ZONE_SMALL, NULL,
- NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_ZINIT);
- cache_zone_large = uma_zcreate("L VFS Cache", CACHE_ZONE_LARGE, NULL,
- NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_ZINIT);
+ cache_zone_small = uma_zcreate("S VFS Cache",
+ sizeof(struct namecache) + CACHE_PATH_CUTOFF + 1,
+ NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_ZINIT);
+ cache_zone_small_ts = uma_zcreate("STS VFS Cache",
+ sizeof(struct namecache_ts) + CACHE_PATH_CUTOFF + 1,
+ NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_ZINIT);
+ cache_zone_large = uma_zcreate("L VFS Cache",
+ sizeof(struct namecache_ts) + NAME_MAX + 1,
+ NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_ZINIT);
nchashtbl = hashinit(desiredvnodes * 2, M_VFSCACHE, &nchash);
}
@@ -1098,9 +1191,9 @@ vn_vptocnp_locked(struct vnode **vp, struct ucred *cred, char *buf,
return (error);
}
*buflen -= ncp->nc_nlen;
- memcpy(buf + *buflen, ncp->nc_name, ncp->nc_nlen);
+ memcpy(buf + *buflen, nc_get_name(ncp), ncp->nc_nlen);
SDT_PROBE(vfs, namecache, fullpath, hit, ncp->nc_dvp,
- ncp->nc_name, vp, 0, 0);
+ nc_get_name(ncp), vp, 0, 0);
dvp = *vp;
*vp = ncp->nc_dvp;
vref(*vp);
@@ -1273,8 +1366,104 @@ vn_commname(struct vnode *vp, char *buf, u_int buflen)
return (ENOENT);
}
l = min(ncp->nc_nlen, buflen - 1);
- memcpy(buf, ncp->nc_name, l);
+ memcpy(buf, nc_get_name(ncp), l);
CACHE_RUNLOCK();
buf[l] = '\0';
return (0);
}
+
+/* ABI compat shims for old kernel modules. */
+#undef cache_enter
+#undef cache_lookup
+
+void cache_enter(struct vnode *dvp, struct vnode *vp,
+ struct componentname *cnp);
+int cache_lookup(struct vnode *dvp, struct vnode **vpp,
+ struct componentname *cnp);
+
+void
+cache_enter(struct vnode *dvp, struct vnode *vp, struct componentname *cnp)
+{
+
+ cache_enter_time(dvp, vp, cnp, NULL);
+}
+
+int
+cache_lookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp)
+{
+
+ return (cache_lookup_times(dvp, vpp, cnp, NULL, NULL));
+}
+
+/*
+ * This function updates path string to vnode's full global path
+ * and checks the size of the new path string against the pathlen argument.
+ *
+ * Requires a locked, referenced vnode and GIANT lock held.
+ * Vnode is re-locked on success or ENODEV, otherwise unlocked.
+ *
+ * If sysctl debug.disablefullpath is set, ENODEV is returned,
+ * vnode is left locked and path remain untouched.
+ *
+ * If vp is a directory, the call to vn_fullpath_global() always succeeds
+ * because it falls back to the ".." lookup if the namecache lookup fails.
+ */
+int
+vn_path_to_global_path(struct thread *td, struct vnode *vp, char *path,
+ u_int pathlen)
+{
+ struct nameidata nd;
+ struct vnode *vp1;
+ char *rpath, *fbuf;
+ int error, vfslocked;
+
+ VFS_ASSERT_GIANT(vp->v_mount);
+ ASSERT_VOP_ELOCKED(vp, __func__);
+
+ /* Return ENODEV if sysctl debug.disablefullpath==1 */
+ if (disablefullpath)
+ return (ENODEV);
+
+ /* Construct global filesystem path from vp. */
+ VOP_UNLOCK(vp, 0);
+ error = vn_fullpath_global(td, vp, &rpath, &fbuf);
+
+ if (error != 0) {
+ vrele(vp);
+ return (error);
+ }
+
+ if (strlen(rpath) >= pathlen) {
+ vrele(vp);
+ error = ENAMETOOLONG;
+ goto out;
+ }
+
+ /*
+ * Re-lookup the vnode by path to detect a possible rename.
+ * As a side effect, the vnode is relocked.
+ * If vnode was renamed, return ENOENT.
+ */
+ NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | MPSAFE | AUDITVNODE1,
+ UIO_SYSSPACE, path, td);
+ error = namei(&nd);
+ if (error != 0) {
+ vrele(vp);
+ goto out;
+ }
+ vfslocked = NDHASGIANT(&nd);
+ NDFREE(&nd, NDF_ONLY_PNBUF);
+ vp1 = nd.ni_vp;
+ vrele(vp);
+ if (vp1 == vp)
+ strcpy(path, rpath);
+ else {
+ vput(vp1);
+ error = ENOENT;
+ }
+ VFS_UNLOCK_GIANT(vfslocked);
+
+out:
+ free(fbuf, M_TEMP);
+ return (error);
+}
diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c
index e2aad7c..29ad019 100644
--- a/sys/kern/vfs_lookup.c
+++ b/sys/kern/vfs_lookup.c
@@ -508,12 +508,14 @@ lookup(struct nameidata *ndp)
int dvfslocked; /* VFS Giant state for parent */
int tvfslocked;
int lkflags_save;
+ int ni_dvp_unlocked;
/*
* Setup: break out flag bits into variables.
*/
dvfslocked = (ndp->ni_cnd.cn_flags & GIANTHELD) != 0;
vfslocked = 0;
+ ni_dvp_unlocked = 0;
ndp->ni_cnd.cn_flags &= ~GIANTHELD;
wantparent = cnp->cn_flags & (LOCKPARENT | WANTPARENT);
KASSERT(cnp->cn_nameiop == LOOKUP || wantparent,
@@ -861,8 +863,10 @@ unionlookup:
/*
* Symlink code always expects an unlocked dvp.
*/
- if (ndp->ni_dvp != ndp->ni_vp)
+ if (ndp->ni_dvp != ndp->ni_vp) {
VOP_UNLOCK(ndp->ni_dvp, 0);
+ ni_dvp_unlocked = 1;
+ }
goto success;
}
@@ -909,14 +913,17 @@ nextname:
VREF(ndp->ni_startdir);
}
if (!wantparent) {
+ ni_dvp_unlocked = 2;
if (ndp->ni_dvp != dp)
vput(ndp->ni_dvp);
else
vrele(ndp->ni_dvp);
VFS_UNLOCK_GIANT(dvfslocked);
dvfslocked = 0;
- } else if ((cnp->cn_flags & LOCKPARENT) == 0 && ndp->ni_dvp != dp)
+ } else if ((cnp->cn_flags & LOCKPARENT) == 0 && ndp->ni_dvp != dp) {
VOP_UNLOCK(ndp->ni_dvp, 0);
+ ni_dvp_unlocked = 1;
+ }
if (cnp->cn_flags & AUDITVNODE1)
AUDIT_ARG_VNODE1(dp);
@@ -945,10 +952,12 @@ success:
return (0);
bad2:
- if (dp != ndp->ni_dvp)
- vput(ndp->ni_dvp);
- else
- vrele(ndp->ni_dvp);
+ if (ni_dvp_unlocked != 2) {
+ if (dp != ndp->ni_dvp && !ni_dvp_unlocked)
+ vput(ndp->ni_dvp);
+ else
+ vrele(ndp->ni_dvp);
+ }
bad:
if (!dpunlocked)
vput(dp);
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c
index 873f425..5fa086c 100644
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -72,8 +72,8 @@ __FBSDID("$FreeBSD$");
#define VFS_MOUNTARG_SIZE_MAX (1024 * 64)
-static int vfs_domount(struct thread *td, const char *fstype,
- char *fspath, int fsflags, struct vfsoptlist **optlist);
+static int vfs_domount(struct thread *td, const char *fstype, char *fspath,
+ uint64_t fsflags, struct vfsoptlist **optlist);
static void free_mntarg(struct mntarg *ma);
static int usermount = 0;
@@ -378,10 +378,18 @@ sys_nmount(td, uap)
struct uio *auio;
int error;
u_int iovcnt;
+ uint64_t flags;
- AUDIT_ARG_FFLAGS(uap->flags);
+ /*
+ * Mount flags are now 64-bits. On 32-bit archtectures only
+ * 32-bits are passed in, but from here on everything handles
+ * 64-bit flags correctly.
+ */
+ flags = uap->flags;
+
+ AUDIT_ARG_FFLAGS(flags);
CTR4(KTR_VFS, "%s: iovp %p with iovcnt %d and flags %d", __func__,
- uap->iovp, uap->iovcnt, uap->flags);
+ uap->iovp, uap->iovcnt, flags);
/*
* Filter out MNT_ROOTFS. We do not want clients of nmount() in
@@ -390,7 +398,7 @@ sys_nmount(td, uap)
* MNT_ROOTFS should only be set by the kernel when mounting its
* root file system.
*/
- uap->flags &= ~MNT_ROOTFS;
+ flags &= ~MNT_ROOTFS;
iovcnt = uap->iovcnt;
/*
@@ -409,7 +417,7 @@ sys_nmount(td, uap)
__func__, error);
return (error);
}
- error = vfs_donmount(td, uap->flags, auio);
+ error = vfs_donmount(td, flags, auio);
free(auio, M_IOV);
return (error);
@@ -520,7 +528,7 @@ vfs_mount_destroy(struct mount *mp)
}
int
-vfs_donmount(struct thread *td, int fsflags, struct uio *fsoptions)
+vfs_donmount(struct thread *td, uint64_t fsflags, struct uio *fsoptions)
{
struct vfsoptlist *optlist;
struct vfsopt *opt, *tmp_opt;
@@ -696,9 +704,17 @@ sys_mount(td, uap)
char *fstype;
struct vfsconf *vfsp = NULL;
struct mntarg *ma = NULL;
+ uint64_t flags;
int error;
- AUDIT_ARG_FFLAGS(uap->flags);
+ /*
+ * Mount flags are now 64-bits. On 32-bit archtectures only
+ * 32-bits are passed in, but from here on everything handles
+ * 64-bit flags correctly.
+ */
+ flags = uap->flags;
+
+ AUDIT_ARG_FFLAGS(flags);
/*
* Filter out MNT_ROOTFS. We do not want clients of mount() in
@@ -707,7 +723,7 @@ sys_mount(td, uap)
* MNT_ROOTFS should only be set by the kernel when mounting its
* root file system.
*/
- uap->flags &= ~MNT_ROOTFS;
+ flags &= ~MNT_ROOTFS;
fstype = malloc(MFSNAMELEN, M_TEMP, M_WAITOK);
error = copyinstr(uap->type, fstype, MFSNAMELEN, NULL);
@@ -731,11 +747,11 @@ sys_mount(td, uap)
ma = mount_argsu(ma, "fstype", uap->type, MNAMELEN);
ma = mount_argsu(ma, "fspath", uap->path, MNAMELEN);
- ma = mount_argb(ma, uap->flags & MNT_RDONLY, "noro");
- ma = mount_argb(ma, !(uap->flags & MNT_NOSUID), "nosuid");
- ma = mount_argb(ma, !(uap->flags & MNT_NOEXEC), "noexec");
+ ma = mount_argb(ma, flags & MNT_RDONLY, "noro");
+ ma = mount_argb(ma, !(flags & MNT_NOSUID), "nosuid");
+ ma = mount_argb(ma, !(flags & MNT_NOEXEC), "noexec");
- error = vfsp->vfc_vfsops->vfs_cmount(ma, uap->data, uap->flags);
+ error = vfsp->vfc_vfsops->vfs_cmount(ma, uap->data, flags);
mtx_unlock(&Giant);
return (error);
}
@@ -749,7 +765,7 @@ vfs_domount_first(
struct vfsconf *vfsp, /* File system type. */
char *fspath, /* Mount path. */
struct vnode *vp, /* Vnode to be covered. */
- int fsflags, /* Flags common to all filesystems. */
+ uint64_t fsflags, /* Flags common to all filesystems. */
struct vfsoptlist **optlist /* Options local to the filesystem. */
)
{
@@ -871,14 +887,15 @@ static int
vfs_domount_update(
struct thread *td, /* Calling thread. */
struct vnode *vp, /* Mount point vnode. */
- int fsflags, /* Flags common to all filesystems. */
+ uint64_t fsflags, /* Flags common to all filesystems. */
struct vfsoptlist **optlist /* Options local to the filesystem. */
)
{
struct oexport_args oexport;
struct export_args export;
struct mount *mp;
- int error, export_error, flag;
+ int error, export_error;
+ uint64_t flag;
mtx_assert(&Giant, MA_OWNED);
ASSERT_VOP_ELOCKED(vp, __func__);
@@ -1015,7 +1032,7 @@ vfs_domount(
struct thread *td, /* Calling thread. */
const char *fstype, /* Filesystem type. */
char *fspath, /* Mount path. */
- int fsflags, /* Flags common to all filesystems. */
+ uint64_t fsflags, /* Flags common to all filesystems. */
struct vfsoptlist **optlist /* Options local to the filesystem. */
)
{
@@ -1085,11 +1102,14 @@ vfs_domount(
NDFREE(&nd, NDF_ONLY_PNBUF);
vp = nd.ni_vp;
if ((fsflags & MNT_UPDATE) == 0) {
- error = vfs_domount_first(td, vfsp, fspath, vp, fsflags,
- optlist);
- } else {
+ error = vn_path_to_global_path(td, vp, fspath, MNAMELEN);
+ /* debug.disablefullpath == 1 results in ENODEV */
+ if (error == 0 || error == ENODEV) {
+ error = vfs_domount_first(td, vfsp, fspath, vp,
+ fsflags, optlist);
+ }
+ } else
error = vfs_domount_update(td, vp, fsflags, optlist);
- }
mtx_unlock(&Giant);
ASSERT_VI_UNLOCKED(vp, __func__);
@@ -1119,9 +1139,10 @@ sys_unmount(td, uap)
int flags;
} */ *uap;
{
+ struct nameidata nd;
struct mount *mp;
char *pathbuf;
- int error, id0, id1;
+ int error, id0, id1, vfslocked;
AUDIT_ARG_VALUE(uap->flags);
if (jailed(td->td_ucred) || usermount == 0) {
@@ -1155,6 +1176,21 @@ sys_unmount(td, uap)
mtx_unlock(&mountlist_mtx);
} else {
AUDIT_ARG_UPATH1(td, pathbuf);
+ /*
+ * Try to find global path for path argument.
+ */
+ NDINIT(&nd, LOOKUP,
+ FOLLOW | LOCKLEAF | MPSAFE | AUDITVNODE1,
+ UIO_SYSSPACE, pathbuf, td);
+ if (namei(&nd) == 0) {
+ vfslocked = NDHASGIANT(&nd);
+ NDFREE(&nd, NDF_ONLY_PNBUF);
+ error = vn_path_to_global_path(td, nd.ni_vp, pathbuf,
+ MNAMELEN);
+ if (error == 0 || error == ENODEV)
+ vput(nd.ni_vp);
+ VFS_UNLOCK_GIANT(vfslocked);
+ }
mtx_lock(&mountlist_mtx);
TAILQ_FOREACH_REVERSE(mp, &mountlist, mntlist, mnt_list) {
if (strcmp(mp->mnt_stat.f_mntonname, pathbuf) == 0)
@@ -1197,7 +1233,7 @@ dounmount(mp, flags, td)
{
struct vnode *coveredvp, *fsrootvp;
int error;
- int async_flag;
+ uint64_t async_flag;
int mnt_gen_r;
mtx_assert(&Giant, MA_OWNED);
@@ -1906,7 +1942,7 @@ free_mntarg(struct mntarg *ma)
* Mount a filesystem
*/
int
-kernel_mount(struct mntarg *ma, int flags)
+kernel_mount(struct mntarg *ma, uint64_t flags)
{
struct uio auio;
int error;
diff --git a/sys/kern/vfs_mountroot.c b/sys/kern/vfs_mountroot.c
index 98e252e..c722bd3 100644
--- a/sys/kern/vfs_mountroot.c
+++ b/sys/kern/vfs_mountroot.c
@@ -42,10 +42,10 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/conf.h>
+#include <sys/cons.h>
#include <sys/fcntl.h>
#include <sys/jail.h>
#include <sys/kernel.h>
-#include <sys/libkern.h>
#include <sys/malloc.h>
#include <sys/mdioctl.h>
#include <sys/mount.h>
@@ -486,7 +486,7 @@ parse_dir_ask(char **conf)
do {
error = EINVAL;
printf("\nmountroot> ");
- gets(name, sizeof(name), GETS_ECHO);
+ cngets(name, sizeof(name), GETS_ECHO);
if (name[0] == '\0')
break;
if (name[0] == '?' && name[1] == '\0') {
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 2872f77..6cdd372 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -2496,6 +2496,18 @@ loop:
* vnodes open for writing.
*/
if (flags & WRITECLOSE) {
+ if (vp->v_object != NULL) {
+ VM_OBJECT_LOCK(vp->v_object);
+ vm_object_page_clean(vp->v_object, 0, 0, 0);
+ VM_OBJECT_UNLOCK(vp->v_object);
+ }
+ error = VOP_FSYNC(vp, MNT_WAIT, td);
+ if (error != 0) {
+ VOP_UNLOCK(vp, 0);
+ vdrop(vp);
+ MNT_VNODE_FOREACH_ABORT(mp, mvp);
+ return (error);
+ }
error = VOP_GETATTR(vp, &vattr, td->td_ucred);
VI_LOCK(vp);
@@ -2836,6 +2848,7 @@ DB_SHOW_COMMAND(mount, db_show_mount)
struct statfs *sp;
struct vnode *vp;
char buf[512];
+ uint64_t mflags;
u_int flags;
if (!have_addr) {
@@ -2857,13 +2870,13 @@ DB_SHOW_COMMAND(mount, db_show_mount)
mp->mnt_stat.f_mntonname, mp->mnt_stat.f_fstypename);
buf[0] = '\0';
- flags = mp->mnt_flag;
+ mflags = mp->mnt_flag;
#define MNT_FLAG(flag) do { \
- if (flags & (flag)) { \
+ if (mflags & (flag)) { \
if (buf[0] != '\0') \
strlcat(buf, ", ", sizeof(buf)); \
strlcat(buf, (#flag) + 4, sizeof(buf)); \
- flags &= ~(flag); \
+ mflags &= ~(flag); \
} \
} while (0)
MNT_FLAG(MNT_RDONLY);
@@ -2901,11 +2914,11 @@ DB_SHOW_COMMAND(mount, db_show_mount)
MNT_FLAG(MNT_SNAPSHOT);
MNT_FLAG(MNT_BYFSID);
#undef MNT_FLAG
- if (flags != 0) {
+ if (mflags != 0) {
if (buf[0] != '\0')
strlcat(buf, ", ", sizeof(buf));
snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
- "0x%08x", flags);
+ "0x%016jx", mflags);
}
db_printf(" mnt_flag = %s\n", buf);
@@ -4033,6 +4046,15 @@ vop_create_post(void *ap, int rc)
}
void
+vop_deleteextattr_post(void *ap, int rc)
+{
+ struct vop_deleteextattr_args *a = ap;
+
+ if (!rc)
+ VFS_KNOTE_LOCKED(a->a_vp, NOTE_ATTRIB);
+}
+
+void
vop_link_post(void *ap, int rc)
{
struct vop_link_args *a = ap;
@@ -4114,6 +4136,15 @@ vop_setattr_post(void *ap, int rc)
}
void
+vop_setextattr_post(void *ap, int rc)
+{
+ struct vop_setextattr_args *a = ap;
+
+ if (!rc)
+ VFS_KNOTE_LOCKED(a->a_vp, NOTE_ATTRIB);
+}
+
+void
vop_symlink_post(void *ap, int rc)
{
struct vop_symlink_args *a = ap;
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index b3920d3..31ad276 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -86,6 +86,8 @@ __FBSDID("$FreeBSD$");
#include <vm/vm_page.h>
#include <vm/uma.h>
+#include <ufs/ufs/quota.h>
+
static MALLOC_DEFINE(M_FADVISE, "fadvise", "posix_fadvise(2) information");
SDT_PROVIDER_DEFINE(vfs);
@@ -212,7 +214,20 @@ sys_quotactl(td, uap)
return (error);
}
error = VFS_QUOTACTL(mp, uap->cmd, uap->uid, uap->arg);
- vfs_unbusy(mp);
+
+ /*
+ * Since quota on operation typically needs to open quota
+ * file, the Q_QUOTAON handler needs to unbusy the mount point
+ * before calling into namei. Otherwise, unmount might be
+ * started between two vfs_busy() invocations (first is our,
+ * second is from mount point cross-walk code in lookup()),
+ * causing deadlock.
+ *
+ * Require that Q_QUOTAON handles the vfs_busy() reference on
+ * its own, always returning with ubusied mount point.
+ */
+ if ((uap->cmd >> SUBCMDSHIFT) != Q_QUOTAON)
+ vfs_unbusy(mp);
VFS_UNLOCK_GIANT(vfslocked);
return (error);
}
@@ -880,7 +895,8 @@ chroot_refuse_vdir_fds(fdp)
static int chroot_allow_open_directories = 1;
SYSCTL_INT(_kern, OID_AUTO, chroot_allow_open_directories, CTLFLAG_RW,
- &chroot_allow_open_directories, 0, "");
+ &chroot_allow_open_directories, 0,
+ "Allow a process to chroot(2) if it has a directory open");
/*
* Change notion of root (``/'') directory.
@@ -2049,6 +2065,7 @@ sys_lseek(td, uap)
if (error != 0)
goto drop;
fp->f_offset = offset;
+ VFS_KNOTE_UNLOCKED(vp, 0);
*(off_t *)(td->td_retval) = fp->f_offset;
drop:
fdrop(fp, td);
diff --git a/sys/kern/vnode_if.src b/sys/kern/vnode_if.src
index 6f24d17..5da4c1c 100644
--- a/sys/kern/vnode_if.src
+++ b/sys/kern/vnode_if.src
@@ -50,7 +50,7 @@
# X: locked if not nil.
#
# The paramater named "vpp" is assumed to be always used with double
-# indirection (**vpp) and that name is hard-codeed in vnode_if.awk !
+# indirection (**vpp) and that name is hard-coded in vnode_if.awk !
#
# Lines starting with %! specify a pre or post-condition function
# to call before/after the vop call.
@@ -569,6 +569,7 @@ vop_openextattr {
%% deleteextattr vp E E E
+%! deleteextattr post vop_deleteextattr_post
vop_deleteextattr {
IN struct vnode *vp;
@@ -580,6 +581,7 @@ vop_deleteextattr {
%% setextattr vp E E E
+%! setextattr post vop_setextattr_post
vop_setextattr {
IN struct vnode *vp;
@@ -637,3 +639,28 @@ vop_advise {
IN off_t end;
IN int advice;
};
+
+# The VOPs below are spares at the end of the table to allow new VOPs to be
+# added in stable branches without breaking the KBI. New VOPs in HEAD should
+# be added above these spares. When merging a new VOP to a stable branch,
+# the new VOP should replace one of the spares.
+
+vop_spare1 {
+ IN struct vnode *vp;
+};
+
+vop_spare2 {
+ IN struct vnode *vp;
+};
+
+vop_spare3 {
+ IN struct vnode *vp;
+};
+
+vop_spare4 {
+ IN struct vnode *vp;
+};
+
+vop_spare5 {
+ IN struct vnode *vp;
+};
diff --git a/sys/libkern/fnmatch.c b/sys/libkern/fnmatch.c
index d6cdc85..5e7bda6 100644
--- a/sys/libkern/fnmatch.c
+++ b/sys/libkern/fnmatch.c
@@ -89,12 +89,12 @@ fnmatch(const char *pattern, const char *string, int flags)
if (c == EOS)
if (flags & FNM_PATHNAME)
return ((flags & FNM_LEADING_DIR) ||
- index(string, '/') == NULL ?
+ strchr(string, '/') == NULL ?
0 : FNM_NOMATCH);
else
return (0);
else if (c == '/' && flags & FNM_PATHNAME) {
- if ((string = index(string, '/')) == NULL)
+ if ((string = strchr(string, '/')) == NULL)
return (FNM_NOMATCH);
break;
}
diff --git a/sys/libkern/gets.c b/sys/libkern/gets.c
deleted file mode 100644
index 64452f3..0000000
--- a/sys/libkern/gets.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/*-
- * Copyright (c) 1999 Michael Smith
- * Copyright (c) 2005 Pawel Jakub Dawidek <pjd@FreeBSD.org>
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS 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 AUTHORS 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.
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <sys/param.h>
-#include <sys/cons.h>
-#include <sys/libkern.h>
-
-void
-gets(char *cp, size_t size, int visible)
-{
- char *lp, *end;
- int c;
-
- lp = cp;
- end = cp + size - 1;
- for (;;) {
- c = cngetc() & 0177;
- switch (c) {
- case '\n':
- case '\r':
- printf("%c", c);
- *lp = '\0';
- return;
- case '\b':
- case '\177':
- if (lp > cp) {
- if (visible)
- printf("%c \b", c);
- lp--;
- }
- continue;
- case '\0':
- continue;
- default:
- if (lp < end) {
- switch (visible) {
- case GETS_NOECHO:
- break;
- case GETS_ECHOPASS:
- printf("*");
- break;
- default:
- printf("%c", c);
- break;
- }
- *lp++ = c;
- }
- }
- }
-}
diff --git a/sys/libkern/index.c b/sys/libkern/index.c
deleted file mode 100644
index a12d706..0000000
--- a/sys/libkern/index.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*-
- * Copyright (c) 1990, 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.
- * 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.
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <sys/param.h>
-#include <sys/libkern.h>
-
-/*
- * index() is also present as the strchr() in the kernel; it does exactly the
- * same thing as it's userland equivalent.
- */
-char *
-index(p, ch)
- const char *p;
- int ch;
-{
- union {
- const char *cp;
- char *p;
- } u;
-
- u.cp = p;
- for (;; ++u.p) {
- if (*u.p == ch)
- return(u.p);
- if (*u.p == '\0')
- return(NULL);
- }
- /* NOTREACHED */
-}
diff --git a/sys/libkern/memcchr.c b/sys/libkern/memcchr.c
new file mode 100644
index 0000000..eebb23a
--- /dev/null
+++ b/sys/libkern/memcchr.c
@@ -0,0 +1,115 @@
+/*-
+ * Copyright (c) 2012 Ed Schouten <ed@FreeBSD.org>
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/libkern.h>
+#include <sys/limits.h>
+#include <sys/param.h>
+
+/*
+ * memcchr(): find first character in buffer not matching `c'.
+ *
+ * This function performs the complement of memchr(). To provide decent
+ * performance, this function compares data from the buffer one word at
+ * a time.
+ *
+ * This code is inspired by libc's strlen(), written by Xin Li.
+ */
+
+#if LONG_BIT != 32 && LONG_BIT != 64
+#error Unsupported word size
+#endif
+
+#define LONGPTR_MASK (sizeof(long) - 1)
+
+#define TESTBYTE \
+ do { \
+ if (*p != (unsigned char)c) \
+ goto done; \
+ p++; \
+ } while (0)
+
+void *
+memcchr(const void *begin, int c, size_t n)
+{
+ const unsigned long *lp;
+ const unsigned char *p, *end;
+ unsigned long word;
+
+ /* Four or eight repetitions of `c'. */
+ word = (unsigned char)c;
+ word |= word << 8;
+ word |= word << 16;
+#if LONG_BIT >= 64
+ word |= word << 32;
+#endif
+
+ /* Don't perform memory I/O when passing a zero-length buffer. */
+ if (n == 0)
+ return (NULL);
+
+ /*
+ * First determine whether there is a character unequal to `c'
+ * in the first word. As this word may contain bytes before
+ * `begin', we may execute this loop spuriously.
+ */
+ lp = (const unsigned long *)((uintptr_t)begin & ~LONGPTR_MASK);
+ end = (const unsigned char *)begin + n;
+ if (*lp++ != word)
+ for (p = begin; p < (const unsigned char *)lp;)
+ TESTBYTE;
+
+ /* Now compare the data one word at a time. */
+ for (; (const unsigned char *)lp < end; lp++) {
+ if (*lp != word) {
+ p = (const unsigned char *)lp;
+ TESTBYTE;
+ TESTBYTE;
+ TESTBYTE;
+#if LONG_BIT >= 64
+ TESTBYTE;
+ TESTBYTE;
+ TESTBYTE;
+ TESTBYTE;
+#endif
+ goto done;
+ }
+ }
+
+ return (NULL);
+
+done:
+ /*
+ * If the end of the buffer is not word aligned, the previous
+ * loops may obtain an address that's beyond the end of the
+ * buffer.
+ */
+ if (p < end)
+ return (__DECONST(void *, p));
+ return (NULL);
+}
diff --git a/sys/libkern/rindex.c b/sys/libkern/rindex.c
deleted file mode 100644
index 19bed70..0000000
--- a/sys/libkern/rindex.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*-
- * Copyright (c) 1988, 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.
- * 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.
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <sys/param.h>
-#include <sys/libkern.h>
-
-/*
- * rindex() is also present as the strrchr() in the kernel; it does exactly the
- * same thing as it's userland equivalent.
- */
-char *
-rindex(p, ch)
- const char *p;
- int ch;
-{
- union {
- const char *cp;
- char *p;
- } u;
- char *save;
-
- u.cp = p;
- for (save = NULL;; ++u.p) {
- if (*u.p == ch)
- save = u.p;
- if (*u.p == '\0')
- return(save);
- }
- /* NOTREACHED */
-}
diff --git a/sys/libkern/skpc.c b/sys/libkern/skpc.c
deleted file mode 100644
index 9f4124b..0000000
--- a/sys/libkern/skpc.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*-
- * Copyright (c) 1992, 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.
- * 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.
- *
- * @(#)skpc.c 8.1 (Berkeley) 6/10/93
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <sys/libkern.h>
-
-int
-skpc(mask0, size, cp0)
- int mask0;
- int size;
- char *cp0;
-{
- register u_char *cp, *end, mask;
-
- mask = mask0;
- cp = (u_char *)cp0;
- for (end = &cp[size]; cp < end && *cp == mask; ++cp);
- return (end - cp);
-}
diff --git a/sys/libkern/strchr.c b/sys/libkern/strchr.c
new file mode 100644
index 0000000..6ee4798
--- /dev/null
+++ b/sys/libkern/strchr.c
@@ -0,0 +1,52 @@
+/*-
+ * Copyright (c) 1990, 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.
+ * 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.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/libkern.h>
+
+char *
+strchr(const char *p, int ch)
+{
+ union {
+ const char *cp;
+ char *p;
+ } u;
+
+ u.cp = p;
+ for (;; ++u.p) {
+ if (*u.p == ch)
+ return(u.p);
+ if (*u.p == '\0')
+ return(NULL);
+ }
+ /* NOTREACHED */
+}
diff --git a/sys/libkern/strrchr.c b/sys/libkern/strrchr.c
new file mode 100644
index 0000000..6ff7eb4
--- /dev/null
+++ b/sys/libkern/strrchr.c
@@ -0,0 +1,53 @@
+/*-
+ * Copyright (c) 1988, 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.
+ * 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.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/libkern.h>
+
+char *
+strrchr(const char *p, int ch)
+{
+ union {
+ const char *cp;
+ char *p;
+ } u;
+ char *save;
+
+ u.cp = p;
+ for (save = NULL;; ++u.p) {
+ if (*u.p == ch)
+ save = u.p;
+ if (*u.p == '\0')
+ return(save);
+ }
+ /* NOTREACHED */
+}
diff --git a/sys/mips/adm5120/console.c b/sys/mips/adm5120/console.c
index 899aa5b..20cd53d 100644
--- a/sys/mips/adm5120/console.c
+++ b/sys/mips/adm5120/console.c
@@ -49,6 +49,8 @@ static cn_init_t uart_cninit;
static cn_term_t uart_cnterm;
static cn_getc_t uart_cngetc;
static cn_putc_t uart_cnputc;
+static cn_grab_t uart_cngrab;
+static cn_ungrab_t uart_cnungrab;
static void
uart_cnprobe(struct consdev *cp)
@@ -90,4 +92,16 @@ uart_cnterm(struct consdev * cp)
}
+static void
+uart_cngrab(struct consdev *cp)
+{
+
+}
+
+static void
+uart_cnungrab(struct consdev *cp)
+{
+
+}
+
CONSOLE_DRIVER(uart);
diff --git a/sys/mips/atheros/ar71xx_chip.c b/sys/mips/atheros/ar71xx_chip.c
index 67a89ab..62ae300 100644
--- a/sys/mips/atheros/ar71xx_chip.c
+++ b/sys/mips/atheros/ar71xx_chip.c
@@ -37,12 +37,12 @@ __FBSDID("$FreeBSD$");
#include <sys/cons.h>
#include <sys/kdb.h>
#include <sys/reboot.h>
-
+
#include <vm/vm.h>
#include <vm/vm_page.h>
-
+
#include <net/ethernet.h>
-
+
#include <machine/clock.h>
#include <machine/cpu.h>
#include <machine/cpuregs.h>
@@ -50,11 +50,9 @@ __FBSDID("$FreeBSD$");
#include <machine/md_var.h>
#include <machine/trap.h>
#include <machine/vmparam.h>
-
-#include <mips/atheros/ar71xxreg.h>
+#include <mips/atheros/ar71xxreg.h>
#include <mips/atheros/ar71xx_chip.h>
-
#include <mips/atheros/ar71xx_cpudef.h>
#include <mips/sentry5/s5reg.h>
@@ -135,7 +133,7 @@ ar71xx_chip_device_stopped(uint32_t mask)
uint32_t reg;
reg = ATH_READ_REG(AR71XX_RST_RESET);
- return ((reg & mask) == mask);
+ return ((reg & mask) == mask);
}
/* Speed is either 10, 100 or 1000 */
@@ -144,20 +142,20 @@ ar71xx_chip_set_pll_ge(int unit, int speed)
{
uint32_t pll;
- switch(speed) {
- case 10:
- pll = PLL_ETH_INT_CLK_10;
- break;
- case 100:
- pll = PLL_ETH_INT_CLK_100;
- break;
- case 1000:
- pll = PLL_ETH_INT_CLK_1000;
- break;
- default:
- printf("%s%d: invalid speed %d\n",
- __func__, unit, speed);
- return;
+ switch (speed) {
+ case 10:
+ pll = PLL_ETH_INT_CLK_10;
+ break;
+ case 100:
+ pll = PLL_ETH_INT_CLK_100;
+ break;
+ case 1000:
+ pll = PLL_ETH_INT_CLK_1000;
+ break;
+ default:
+ printf("%s%d: invalid speed %d\n",
+ __func__, unit, speed);
+ return;
}
switch (unit) {
case 0:
@@ -180,6 +178,7 @@ ar71xx_chip_set_pll_ge(int unit, int speed)
static void
ar71xx_chip_ddr_flush_ge(int unit)
{
+
switch (unit) {
case 0:
ar71xx_ddr_flush(AR71XX_WB_FLUSH_GE0);
@@ -209,18 +208,24 @@ ar71xx_chip_get_eth_pll(unsigned int mac, int speed)
static void
ar71xx_chip_init_usb_peripheral(void)
{
- ar71xx_device_stop(RST_RESET_USB_OHCI_DLL | RST_RESET_USB_HOST | RST_RESET_USB_PHY);
+
+ ar71xx_device_stop(RST_RESET_USB_OHCI_DLL |
+ RST_RESET_USB_HOST | RST_RESET_USB_PHY);
DELAY(1000);
- ar71xx_device_start(RST_RESET_USB_OHCI_DLL | RST_RESET_USB_HOST | RST_RESET_USB_PHY);
+ ar71xx_device_start(RST_RESET_USB_OHCI_DLL |
+ RST_RESET_USB_HOST | RST_RESET_USB_PHY);
DELAY(1000);
ATH_WRITE_REG(AR71XX_USB_CTRL_CONFIG,
- USB_CTRL_CONFIG_OHCI_DES_SWAP | USB_CTRL_CONFIG_OHCI_BUF_SWAP |
- USB_CTRL_CONFIG_EHCI_DES_SWAP | USB_CTRL_CONFIG_EHCI_BUF_SWAP);
+ USB_CTRL_CONFIG_OHCI_DES_SWAP |
+ USB_CTRL_CONFIG_OHCI_BUF_SWAP |
+ USB_CTRL_CONFIG_EHCI_DES_SWAP |
+ USB_CTRL_CONFIG_EHCI_BUF_SWAP);
ATH_WRITE_REG(AR71XX_USB_CTRL_FLADJ,
- (32 << USB_CTRL_FLADJ_HOST_SHIFT) | (3 << USB_CTRL_FLADJ_A5_SHIFT));
+ (32 << USB_CTRL_FLADJ_HOST_SHIFT) |
+ (3 << USB_CTRL_FLADJ_A5_SHIFT));
DELAY(1000);
}
diff --git a/sys/mips/atheros/ar71xx_ehci.c b/sys/mips/atheros/ar71xx_ehci.c
index 1f24d7c..c04e069 100644
--- a/sys/mips/atheros/ar71xx_ehci.c
+++ b/sys/mips/atheros/ar71xx_ehci.c
@@ -65,53 +65,11 @@ struct ar71xx_ehci_softc {
static device_attach_t ar71xx_ehci_attach;
static device_detach_t ar71xx_ehci_detach;
-static device_shutdown_t ar71xx_ehci_shutdown;
-static device_suspend_t ar71xx_ehci_suspend;
-static device_resume_t ar71xx_ehci_resume;
bs_r_1_proto(reversed);
bs_w_1_proto(reversed);
static int
-ar71xx_ehci_suspend(device_t self)
-{
- ehci_softc_t *sc = device_get_softc(self);
- int err;
-
- err = bus_generic_suspend(self);
- if (err)
- return (err);
- ehci_suspend(sc);
- return (0);
-}
-
-static int
-ar71xx_ehci_resume(device_t self)
-{
- ehci_softc_t *sc = device_get_softc(self);
-
- ehci_resume(sc);
-
- bus_generic_resume(self);
-
- return (0);
-}
-
-static int
-ar71xx_ehci_shutdown(device_t self)
-{
- ehci_softc_t *sc = device_get_softc(self);
- int err;
-
- err = bus_generic_shutdown(self);
- if (err)
- return (err);
- ehci_shutdown(sc);
-
- return (0);
-}
-
-static int
ar71xx_ehci_probe(device_t self)
{
@@ -280,17 +238,17 @@ static device_method_t ehci_methods[] = {
DEVMETHOD(device_probe, ar71xx_ehci_probe),
DEVMETHOD(device_attach, ar71xx_ehci_attach),
DEVMETHOD(device_detach, ar71xx_ehci_detach),
- DEVMETHOD(device_suspend, ar71xx_ehci_suspend),
- DEVMETHOD(device_resume, ar71xx_ehci_resume),
- DEVMETHOD(device_shutdown, ar71xx_ehci_shutdown),
+ DEVMETHOD(device_suspend, bus_generic_suspend),
+ DEVMETHOD(device_resume, bus_generic_resume),
+ DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD_END
};
static driver_t ehci_driver = {
- "ehci",
- ehci_methods,
- sizeof(struct ar71xx_ehci_softc),
+ .name = "ehci",
+ .methods = ehci_methods,
+ .size = sizeof(struct ar71xx_ehci_softc),
};
static devclass_t ehci_devclass;
diff --git a/sys/mips/atheros/ar71xx_gpio.c b/sys/mips/atheros/ar71xx_gpio.c
index 09b4d50..592cd2b 100644
--- a/sys/mips/atheros/ar71xx_gpio.c
+++ b/sys/mips/atheros/ar71xx_gpio.c
@@ -54,18 +54,6 @@ __FBSDID("$FreeBSD$");
#define DEFAULT_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)
-struct ar71xx_gpio_pin {
- const char *name;
- int pin;
- int flags;
-};
-
-static struct ar71xx_gpio_pin ar71xx_gpio_pins[] = {
- { "RFled", 2, GPIO_PIN_OUTPUT},
- { "SW4", 8, GPIO_PIN_INPUT},
- { NULL, 0, 0},
-};
-
/*
* Helpers
*/
@@ -101,17 +89,13 @@ static int ar71xx_gpio_pin_toggle(device_t dev, uint32_t pin);
static void
ar71xx_gpio_function_enable(struct ar71xx_gpio_softc *sc, uint32_t mask)
{
- GPIO_LOCK(sc);
GPIO_SET_BITS(sc, AR71XX_GPIO_FUNCTION, mask);
- GPIO_UNLOCK(sc);
}
static void
ar71xx_gpio_function_disable(struct ar71xx_gpio_softc *sc, uint32_t mask)
{
- GPIO_LOCK(sc);
GPIO_CLEAR_BITS(sc, AR71XX_GPIO_FUNCTION, mask);
- GPIO_UNLOCK(sc);
}
static void
@@ -121,7 +105,6 @@ ar71xx_gpio_pin_configure(struct ar71xx_gpio_softc *sc, struct gpio_pin *pin,
uint32_t mask;
mask = 1 << pin->gp_pin;
- GPIO_LOCK(sc);
/*
* Manage input/output
@@ -137,8 +120,6 @@ ar71xx_gpio_pin_configure(struct ar71xx_gpio_softc *sc, struct gpio_pin *pin,
GPIO_CLEAR_BITS(sc, AR71XX_GPIO_OE, mask);
}
}
-
- GPIO_UNLOCK(sc);
}
static int
@@ -265,12 +246,10 @@ ar71xx_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value)
if (i >= sc->gpio_npins)
return (EINVAL);
- GPIO_LOCK(sc);
if (value)
GPIO_WRITE(sc, AR71XX_GPIO_SET, (1 << pin));
else
GPIO_WRITE(sc, AR71XX_GPIO_CLEAR, (1 << pin));
- GPIO_UNLOCK(sc);
return (0);
}
@@ -289,9 +268,7 @@ ar71xx_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *val)
if (i >= sc->gpio_npins)
return (EINVAL);
- GPIO_LOCK(sc);
*val = (GPIO_READ(sc, AR71XX_GPIO_IN) & (1 << pin)) ? 1 : 0;
- GPIO_UNLOCK(sc);
return (0);
}
@@ -310,13 +287,11 @@ ar71xx_gpio_pin_toggle(device_t dev, uint32_t pin)
if (i >= sc->gpio_npins)
return (EINVAL);
- GPIO_LOCK(sc);
res = (GPIO_READ(sc, AR71XX_GPIO_IN) & (1 << pin)) ? 1 : 0;
if (res)
GPIO_WRITE(sc, AR71XX_GPIO_CLEAR, (1 << pin));
else
GPIO_WRITE(sc, AR71XX_GPIO_SET, (1 << pin));
- GPIO_UNLOCK(sc);
return (0);
}
@@ -353,8 +328,9 @@ ar71xx_gpio_attach(device_t dev)
{
struct ar71xx_gpio_softc *sc = device_get_softc(dev);
int error = 0;
- struct ar71xx_gpio_pin *pinp;
- int i;
+ int i, j, maxpin;
+ int mask;
+ int old = 0;
KASSERT((device_get_unit(dev) == 0),
("ar71xx_gpio: Only one gpio module supported"));
@@ -388,25 +364,49 @@ ar71xx_gpio_attach(device_t dev)
}
sc->dev = dev;
- ar71xx_gpio_function_enable(sc, GPIO_FUNC_SPI_CS1_EN);
- ar71xx_gpio_function_enable(sc, GPIO_FUNC_SPI_CS2_EN);
+
+ /* Enable function bits that are required */
+ if (resource_int_value(device_get_name(dev), device_get_unit(dev),
+ "function_set", &mask) == 0) {
+ device_printf(dev, "function_set: 0x%x\n", mask);
+ ar71xx_gpio_function_enable(sc, mask);
+ old = 1;
+ }
+ /* Disable function bits that are required */
+ if (resource_int_value(device_get_name(dev), device_get_unit(dev),
+ "function_clear", &mask) == 0) {
+ device_printf(dev, "function_clear: 0x%x\n", mask);
+ ar71xx_gpio_function_disable(sc, mask);
+ old = 1;
+ }
+ /* Handle previous behaviour */
+ if (old == 0) {
+ ar71xx_gpio_function_enable(sc, GPIO_FUNC_SPI_CS1_EN);
+ ar71xx_gpio_function_enable(sc, GPIO_FUNC_SPI_CS2_EN);
+ }
+
/* Configure all pins as input */
/* disable interrupts for all pins */
GPIO_WRITE(sc, AR71XX_GPIO_INT_MASK, 0);
- pinp = ar71xx_gpio_pins;
- i = 0;
- while (pinp->name) {
- strncpy(sc->gpio_pins[i].gp_name, pinp->name, GPIOMAXNAME);
- sc->gpio_pins[i].gp_pin = pinp->pin;
+
+ /* Initialise all pins specified in the mask, up to the pin count */
+ (void) ar71xx_gpio_pin_max(dev, &maxpin);
+ if (resource_int_value(device_get_name(dev), device_get_unit(dev),
+ "pinmask", &mask) != 0)
+ mask = 0;
+ device_printf(dev, "gpio pinmask=0x%x\n", mask);
+ for (i = 0, j = 0; j < maxpin; j++) {
+ if ((mask & (1 << j)) == 0)
+ continue;
+ snprintf(sc->gpio_pins[i].gp_name, GPIOMAXNAME,
+ "pin %d", j);
+ sc->gpio_pins[i].gp_pin = j;
sc->gpio_pins[i].gp_caps = DEFAULT_CAPS;
sc->gpio_pins[i].gp_flags = 0;
- ar71xx_gpio_pin_configure(sc, &sc->gpio_pins[i], pinp->flags);
- pinp++;
+ ar71xx_gpio_pin_configure(sc, &sc->gpio_pins[i], DEFAULT_CAPS);
i++;
}
-
sc->gpio_npins = i;
-
device_add_child(dev, "gpioc", device_get_unit(dev));
device_add_child(dev, "gpiobus", device_get_unit(dev));
return (bus_generic_attach(dev));
diff --git a/sys/mips/atheros/ar71xx_machdep.c b/sys/mips/atheros/ar71xx_machdep.c
index bcb5807..e9f7c2d 100644
--- a/sys/mips/atheros/ar71xx_machdep.c
+++ b/sys/mips/atheros/ar71xx_machdep.c
@@ -28,6 +28,7 @@
__FBSDID("$FreeBSD$");
#include "opt_ddb.h"
+#include "opt_ar71xx.h"
#include <sys/param.h>
#include <sys/conf.h>
diff --git a/sys/mips/atheros/ar71xx_ohci.c b/sys/mips/atheros/ar71xx_ohci.c
index 9e0a63f..6292372 100644
--- a/sys/mips/atheros/ar71xx_ohci.c
+++ b/sys/mips/atheros/ar71xx_ohci.c
@@ -194,15 +194,17 @@ static device_method_t ohci_methods[] = {
DEVMETHOD(device_probe, ar71xx_ohci_probe),
DEVMETHOD(device_attach, ar71xx_ohci_attach),
DEVMETHOD(device_detach, ar71xx_ohci_detach),
+ DEVMETHOD(device_suspend, bus_generic_suspend),
+ DEVMETHOD(device_resume, bus_generic_resume),
DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD_END
};
static driver_t ohci_driver = {
- "ohci",
- ohci_methods,
- sizeof(struct ar71xx_ohci_softc),
+ .name = "ohci",
+ .methods = ohci_methods,
+ .size = sizeof(struct ar71xx_ohci_softc),
};
static devclass_t ohci_devclass;
diff --git a/sys/mips/atheros/ar71xx_pci.c b/sys/mips/atheros/ar71xx_pci.c
index a6c7c1b..d7f7715 100644
--- a/sys/mips/atheros/ar71xx_pci.c
+++ b/sys/mips/atheros/ar71xx_pci.c
@@ -28,6 +28,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include "opt_ar71xx.h"
+
#include <sys/param.h>
#include <sys/systm.h>
@@ -248,6 +250,77 @@ ar71xx_pci_write_config(device_t dev, u_int bus, u_int slot, u_int func,
}
}
+#ifdef AR71XX_ATH_EEPROM
+/*
+ * Some embedded boards (eg AP94) have the MAC attached via PCI but they
+ * don't have the MAC-attached EEPROM. The register initialisation
+ * values and calibration data are stored in the on-board flash.
+ * This routine initialises the NIC via the EEPROM register contents
+ * before the probe/attach routines get a go at things.
+ */
+static void
+ar71xx_pci_fixup(device_t dev, u_int bus, u_int slot, u_int func,
+ long flash_addr)
+{
+ uint16_t *cal_data = (uint16_t *) MIPS_PHYS_TO_KSEG1(flash_addr);
+ uint32_t reg, val, bar0;
+
+ printf("%s: flash_addr=%lx, cal_data=%p\n",
+ __func__, flash_addr, cal_data);
+
+ /* XXX check 0xa55a */
+ /* Save bar(0) address - just to flush bar(0) (SoC WAR) ? */
+ bar0 = ar71xx_pci_read_config(dev, bus, slot, func, PCIR_BAR(0), 4);
+ ar71xx_pci_write_config(dev, bus, slot, func, PCIR_BAR(0),
+ AR71XX_PCI_MEM_BASE, 4);
+
+ val = ar71xx_pci_read_config(dev, bus, slot, func, PCIR_COMMAND, 2);
+ val |= (PCIM_CMD_BUSMASTEREN | PCIM_CMD_MEMEN);
+ ar71xx_pci_write_config(dev, bus, slot, func, PCIR_COMMAND, val, 2);
+
+ cal_data += 3;
+ while (*cal_data != 0xffff) {
+ reg = *cal_data++;
+ val = *cal_data++;
+ val |= (*cal_data++) << 16;
+ printf(" reg: %x, val=%x\n", reg, val);
+
+ /* Write eeprom fixup data to device memory */
+ ATH_WRITE_REG(AR71XX_PCI_MEM_BASE + reg, val);
+ DELAY(100);
+ }
+
+ val = ar71xx_pci_read_config(dev, bus, slot, func, PCIR_COMMAND, 2);
+ val &= ~(PCIM_CMD_BUSMASTEREN | PCIM_CMD_MEMEN);
+ ar71xx_pci_write_config(dev, bus, slot, func, PCIR_COMMAND, val, 2);
+
+ /* Write the saved bar(0) address */
+ ar71xx_pci_write_config(dev, bus, slot, func, PCIR_BAR(0), bar0, 4);
+}
+
+static void
+ar71xx_pci_slot_fixup(device_t dev, u_int bus, u_int slot, u_int func)
+{
+ long int flash_addr;
+ char buf[32];
+
+ /*
+ * Check whether the given slot has a hint to poke.
+ */
+ printf("%s: checking dev %s, %d/%d/%d\n",
+ __func__, device_get_nameunit(dev), bus, slot, func);
+ snprintf(buf, sizeof(buf), "bus.%d.%d.%d.ath_fixup_addr",
+ bus, slot, func);
+
+ if (resource_long_value(device_get_name(dev), device_get_unit(dev),
+ buf, &flash_addr) == 0) {
+ printf("%s: found fixupaddr at %lx: updating\n",
+ __func__, flash_addr);
+ ar71xx_pci_fixup(dev, bus, slot, func, flash_addr);
+ }
+}
+#endif /* AR71XX_ATH_EEPROM */
+
static int
ar71xx_pci_probe(device_t dev)
{
@@ -321,6 +394,16 @@ ar71xx_pci_attach(device_t dev)
| PCIM_CMD_SERRESPEN | PCIM_CMD_BACKTOBACK
| PCIM_CMD_PERRESPEN | PCIM_CMD_MWRICEN, 2);
+#ifdef AR71XX_ATH_EEPROM
+ /*
+ * Hard-code a check for slot 17 and 18 - these are
+ * the two PCI slots which may have a PCI device that
+ * requires "fixing".
+ */
+ ar71xx_pci_slot_fixup(dev, 0, 17, 0);
+ ar71xx_pci_slot_fixup(dev, 0, 18, 0);
+#endif /* AR71XX_ATH_EEPROM */
+
device_add_child(dev, "pci", busno);
return (bus_generic_attach(dev));
}
diff --git a/sys/mips/atheros/ar724x_chip.c b/sys/mips/atheros/ar724x_chip.c
index 446fe16..14106dd 100644
--- a/sys/mips/atheros/ar724x_chip.c
+++ b/sys/mips/atheros/ar724x_chip.c
@@ -37,12 +37,12 @@ __FBSDID("$FreeBSD$");
#include <sys/cons.h>
#include <sys/kdb.h>
#include <sys/reboot.h>
-
+
#include <vm/vm.h>
#include <vm/vm_page.h>
-
+
#include <net/ethernet.h>
-
+
#include <machine/clock.h>
#include <machine/cpu.h>
#include <machine/cpuregs.h>
@@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$");
#include <machine/md_var.h>
#include <machine/trap.h>
#include <machine/vmparam.h>
-
+
#include <mips/atheros/ar71xxreg.h>
#include <mips/atheros/ar724xreg.h>
@@ -71,20 +71,20 @@ ar724x_chip_detect_sys_frequency(void)
uint32_t pll;
uint32_t freq;
uint32_t div;
-
+
pll = ATH_READ_REG(AR724X_PLL_REG_CPU_CONFIG);
-
+
div = ((pll >> AR724X_PLL_DIV_SHIFT) & AR724X_PLL_DIV_MASK);
freq = div * AR724X_BASE_FREQ;
div = ((pll >> AR724X_PLL_REF_DIV_SHIFT) & AR724X_PLL_REF_DIV_MASK);
freq *= div;
-
+
u_ar71xx_cpu_freq = freq;
-
+
div = ((pll >> AR724X_DDR_DIV_SHIFT) & AR724X_DDR_DIV_MASK) + 1;
u_ar71xx_ddr_freq = freq / div;
-
+
div = (((pll >> AR724X_AHB_DIV_SHIFT) & AR724X_AHB_DIV_MASK) + 1) * 2;
u_ar71xx_ahb_freq = u_ar71xx_cpu_freq / div;
}
@@ -125,12 +125,13 @@ ar724x_chip_device_stopped(uint32_t mask)
static void
ar724x_chip_set_pll_ge(int unit, int speed)
{
+
switch (unit) {
case 0:
- /* TODO */
+ /* XXX TODO */
break;
case 1:
- /* TODO */
+ /* XXX TODO */
break;
default:
printf("%s: invalid PLL set for arge unit: %d\n",
@@ -142,6 +143,7 @@ ar724x_chip_set_pll_ge(int unit, int speed)
static void
ar724x_chip_ddr_flush_ge(int unit)
{
+
switch (unit) {
case 0:
ar71xx_ddr_flush(AR724X_DDR_REG_FLUSH_GE0);
@@ -159,14 +161,15 @@ ar724x_chip_ddr_flush_ge(int unit)
static void
ar724x_chip_ddr_flush_ip2(void)
{
+
ar71xx_ddr_flush(AR724X_DDR_REG_FLUSH_PCIE);
}
-
static uint32_t
ar724x_chip_get_eth_pll(unsigned int mac, int speed)
{
- return 0;
+
+ return 0;
}
static void
@@ -174,42 +177,39 @@ ar724x_chip_init_usb_peripheral(void)
{
switch (ar71xx_soc) {
- case AR71XX_SOC_AR7240:
-
- ar71xx_device_stop(AR724X_RESET_MODULE_USB_OHCI_DLL |
- AR724X_RESET_USB_HOST);
- DELAY(1000);
-
- ar71xx_device_start(AR724X_RESET_MODULE_USB_OHCI_DLL |
- AR724X_RESET_USB_HOST);
- DELAY(1000);
-
- /*
- * WAR for HW bug. Here it adjusts the duration
- * between two SOFS.
- */
- ATH_WRITE_REG(AR71XX_USB_CTRL_FLADJ,
- (3 << USB_CTRL_FLADJ_A0_SHIFT));
+ case AR71XX_SOC_AR7240:
+ ar71xx_device_stop(AR724X_RESET_MODULE_USB_OHCI_DLL |
+ AR724X_RESET_USB_HOST);
+ DELAY(1000);
+
+ ar71xx_device_start(AR724X_RESET_MODULE_USB_OHCI_DLL |
+ AR724X_RESET_USB_HOST);
+ DELAY(1000);
+
+ /*
+ * WAR for HW bug. Here it adjusts the duration
+ * between two SOFS.
+ */
+ ATH_WRITE_REG(AR71XX_USB_CTRL_FLADJ,
+ (3 << USB_CTRL_FLADJ_A0_SHIFT));
- break;
-
- case AR71XX_SOC_AR7241:
- case AR71XX_SOC_AR7242:
+ break;
- ar71xx_device_start(AR724X_RESET_MODULE_USB_OHCI_DLL);
- DELAY(100);
+ case AR71XX_SOC_AR7241:
+ case AR71XX_SOC_AR7242:
+ ar71xx_device_start(AR724X_RESET_MODULE_USB_OHCI_DLL);
+ DELAY(100);
- ar71xx_device_start(AR724X_RESET_USB_HOST);
- DELAY(100);
+ ar71xx_device_start(AR724X_RESET_USB_HOST);
+ DELAY(100);
- ar71xx_device_start(AR724X_RESET_USB_PHY);
- DELAY(100);
+ ar71xx_device_start(AR724X_RESET_USB_PHY);
+ DELAY(100);
- break;
+ break;
- default:
- /* fallthrough */
- break;
+ default:
+ break;
}
}
diff --git a/sys/mips/atheros/ar724x_pci.c b/sys/mips/atheros/ar724x_pci.c
index 59be9c0..f3519c6 100644
--- a/sys/mips/atheros/ar724x_pci.c
+++ b/sys/mips/atheros/ar724x_pci.c
@@ -93,7 +93,7 @@ ar724x_pci_write(uint32_t reg, uint32_t offset, uint32_t data, int bytes)
uint32_t val, mask, shift;
/* Register access is 32-bit aligned */
- shift = 8 * (offset & (bytes % 4));
+ shift = (offset & 3) * 8;
if (bytes % 4)
mask = (1 << (bytes * 8)) - 1;
else
diff --git a/sys/mips/atheros/ar91xx_chip.c b/sys/mips/atheros/ar91xx_chip.c
index 8b510a3..9498046 100644
--- a/sys/mips/atheros/ar91xx_chip.c
+++ b/sys/mips/atheros/ar91xx_chip.c
@@ -37,12 +37,12 @@ __FBSDID("$FreeBSD$");
#include <sys/cons.h>
#include <sys/kdb.h>
#include <sys/reboot.h>
-
+
#include <vm/vm.h>
#include <vm/vm_page.h>
-
+
#include <net/ethernet.h>
-
+
#include <machine/clock.h>
#include <machine/cpu.h>
#include <machine/cpuregs.h>
@@ -50,11 +50,10 @@ __FBSDID("$FreeBSD$");
#include <machine/md_var.h>
#include <machine/trap.h>
#include <machine/vmparam.h>
-
-#include <mips/atheros/ar71xxreg.h>
-#include <mips/atheros/ar91xxreg.h>
+#include <mips/atheros/ar71xxreg.h>
#include <mips/atheros/ar71xx_cpudef.h>
+#include <mips/atheros/ar91xxreg.h>
#include <mips/atheros/ar91xx_chip.h>
#include <mips/sentry5/s5reg.h>
@@ -67,49 +66,48 @@ ar91xx_chip_detect_mem_size(void)
static void
ar91xx_chip_detect_sys_frequency(void)
{
- uint32_t pll;
- uint32_t freq;
- uint32_t div;
-
- pll = ATH_READ_REG(AR91XX_PLL_REG_CPU_CONFIG);
-
- div = ((pll >> AR91XX_PLL_DIV_SHIFT) & AR91XX_PLL_DIV_MASK);
- freq = div * AR91XX_BASE_FREQ;
-
- u_ar71xx_cpu_freq = freq;
-
- div = ((pll >> AR91XX_DDR_DIV_SHIFT) & AR91XX_DDR_DIV_MASK) + 1;
- u_ar71xx_ddr_freq = freq / div;
-
- div = (((pll >> AR91XX_AHB_DIV_SHIFT) & AR91XX_AHB_DIV_MASK) + 1) * 2;
- u_ar71xx_ahb_freq = u_ar71xx_cpu_freq / div;
+ uint32_t pll;
+ uint32_t freq;
+ uint32_t div;
+
+ pll = ATH_READ_REG(AR91XX_PLL_REG_CPU_CONFIG);
+
+ div = ((pll >> AR91XX_PLL_DIV_SHIFT) & AR91XX_PLL_DIV_MASK);
+ freq = div * AR91XX_BASE_FREQ;
+ u_ar71xx_cpu_freq = freq;
+
+ div = ((pll >> AR91XX_DDR_DIV_SHIFT) & AR91XX_DDR_DIV_MASK) + 1;
+ u_ar71xx_ddr_freq = freq / div;
+
+ div = (((pll >> AR91XX_AHB_DIV_SHIFT) & AR91XX_AHB_DIV_MASK) + 1) * 2;
+ u_ar71xx_ahb_freq = u_ar71xx_cpu_freq / div;
}
static void
ar91xx_chip_device_stop(uint32_t mask)
{
- uint32_t reg;
-
- reg = ATH_READ_REG(AR91XX_RESET_REG_RESET_MODULE);
- ATH_WRITE_REG(AR91XX_RESET_REG_RESET_MODULE, reg | mask);
+ uint32_t reg;
+
+ reg = ATH_READ_REG(AR91XX_RESET_REG_RESET_MODULE);
+ ATH_WRITE_REG(AR91XX_RESET_REG_RESET_MODULE, reg | mask);
}
static void
ar91xx_chip_device_start(uint32_t mask)
{
- uint32_t reg;
-
- reg = ATH_READ_REG(AR91XX_RESET_REG_RESET_MODULE);
- ATH_WRITE_REG(AR91XX_RESET_REG_RESET_MODULE, reg & ~mask);
+ uint32_t reg;
+
+ reg = ATH_READ_REG(AR91XX_RESET_REG_RESET_MODULE);
+ ATH_WRITE_REG(AR91XX_RESET_REG_RESET_MODULE, reg & ~mask);
}
static int
ar91xx_chip_device_stopped(uint32_t mask)
{
- uint32_t reg;
-
- reg = ATH_READ_REG(AR91XX_RESET_REG_RESET_MODULE);
- return ((reg & mask) == mask);
+ uint32_t reg;
+
+ reg = ATH_READ_REG(AR91XX_RESET_REG_RESET_MODULE);
+ return ((reg & mask) == mask);
}
static void
@@ -118,19 +116,19 @@ ar91xx_chip_set_pll_ge(int unit, int speed)
uint32_t pll;
switch(speed) {
- case 10:
- pll = AR91XX_PLL_VAL_10;
- break;
- case 100:
- pll = AR91XX_PLL_VAL_100;
- break;
- case 1000:
- pll = AR91XX_PLL_VAL_1000;
- break;
- default:
- printf("%s%d: invalid speed %d\n",
- __func__, unit, speed);
- return;
+ case 10:
+ pll = AR91XX_PLL_VAL_10;
+ break;
+ case 100:
+ pll = AR91XX_PLL_VAL_100;
+ break;
+ case 1000:
+ pll = AR91XX_PLL_VAL_1000;
+ break;
+ default:
+ printf("%s%d: invalid speed %d\n",
+ __func__, unit, speed);
+ return;
}
switch (unit) {
case 0:
@@ -153,6 +151,7 @@ ar91xx_chip_set_pll_ge(int unit, int speed)
static void
ar91xx_chip_ddr_flush_ge(int unit)
{
+
switch (unit) {
case 0:
ar71xx_ddr_flush(AR91XX_DDR_REG_FLUSH_GE0);
@@ -170,6 +169,7 @@ ar91xx_chip_ddr_flush_ge(int unit)
static void
ar91xx_chip_ddr_flush_ip2(void)
{
+
ar71xx_ddr_flush(AR91XX_DDR_REG_FLUSH_WMAC);
}
@@ -177,12 +177,14 @@ ar91xx_chip_ddr_flush_ip2(void)
static uint32_t
ar91xx_chip_get_eth_pll(unsigned int mac, int speed)
{
- return 0;
+
+ return 0;
}
static void
ar91xx_chip_init_usb_peripheral(void)
{
+
ar71xx_device_stop(AR91XX_RST_RESET_MODULE_USBSUS_OVERRIDE);
DELAY(100);
@@ -201,14 +203,14 @@ ar91xx_chip_init_usb_peripheral(void)
}
struct ar71xx_cpu_def ar91xx_chip_def = {
- &ar91xx_chip_detect_mem_size,
- &ar91xx_chip_detect_sys_frequency,
- &ar91xx_chip_device_stop,
- &ar91xx_chip_device_start,
- &ar91xx_chip_device_stopped,
- &ar91xx_chip_set_pll_ge,
- &ar91xx_chip_ddr_flush_ge,
- &ar91xx_chip_get_eth_pll,
- &ar91xx_chip_ddr_flush_ip2,
+ &ar91xx_chip_detect_mem_size,
+ &ar91xx_chip_detect_sys_frequency,
+ &ar91xx_chip_device_stop,
+ &ar91xx_chip_device_start,
+ &ar91xx_chip_device_stopped,
+ &ar91xx_chip_set_pll_ge,
+ &ar91xx_chip_ddr_flush_ge,
+ &ar91xx_chip_get_eth_pll,
+ &ar91xx_chip_ddr_flush_ip2,
&ar91xx_chip_init_usb_peripheral,
};
diff --git a/sys/mips/cavium/cryptocteon/cavium_crypto.c b/sys/mips/cavium/cryptocteon/cavium_crypto.c
index f983cfa..ea01b8d 100644
--- a/sys/mips/cavium/cryptocteon/cavium_crypto.c
+++ b/sys/mips/cavium/cryptocteon/cavium_crypto.c
@@ -87,22 +87,6 @@ __FBSDID("$FreeBSD$");
} \
} while (0)
-static inline unsigned long octeon_crypto_enable(void)
-{
- register_t s;
-
- s = intr_disable();
- mips_wr_status(mips_rd_status() | MIPS_SR_COP_2_BIT);
-
- return (s);
-}
-
-static inline void octeon_crypto_disable(register_t s)
-{
- mips_wr_status(mips_rd_status() & ~MIPS_SR_COP_2_BIT);
- intr_restore(s);
-}
-
#define ESP_HEADER_LENGTH 8
#define DES_CBC_IV_LENGTH 8
#define AES_CBC_IV_LENGTH 16
@@ -252,14 +236,12 @@ octo_calc_hash(uint8_t auth, unsigned char *key, uint64_t *inner, uint64_t *oute
uint64_t *key1;
register uint64_t xor1 = 0x3636363636363636ULL;
register uint64_t xor2 = 0x5c5c5c5c5c5c5c5cULL;
- register_t s;
dprintf("%s()\n", __func__);
memset(hash_key, 0, sizeof(hash_key));
memcpy(hash_key, (uint8_t *) key, (auth ? 20 : 16));
key1 = (uint64_t *) hash_key;
- s = octeon_crypto_enable();
if (auth) {
CVMX_MT_HSH_IV(0x67452301EFCDAB89ULL, 0);
CVMX_MT_HSH_IV(0x98BADCFE10325476ULL, 1);
@@ -332,7 +314,6 @@ octo_calc_hash(uint8_t auth, unsigned char *key, uint64_t *inner, uint64_t *oute
outer[2] = 0;
CVMX_MF_HSH_IV(outer[2], 2);
}
- octeon_crypto_disable(s);
return;
}
@@ -349,7 +330,6 @@ octo_des_cbc_encrypt(
{
uint64_t *data;
int data_i, data_l;
- register_t s;
dprintf("%s()\n", __func__);
@@ -367,7 +347,6 @@ octo_des_cbc_encrypt(
CVMX_PREFETCH0(ivp);
CVMX_PREFETCH0(od->octo_enckey);
- s = octeon_crypto_enable();
/* load 3DES Key */
CVMX_MT_3DES_KEY(((uint64_t *) od->octo_enckey)[0], 0);
@@ -378,7 +357,6 @@ octo_des_cbc_encrypt(
CVMX_MT_3DES_KEY(((uint64_t *) od->octo_enckey)[0], 1);
CVMX_MT_3DES_KEY(((uint64_t *) od->octo_enckey)[0], 2);
} else {
- octeon_crypto_disable(s);
dprintf("%s: Bad key length %d\n", __func__, od->octo_encklen);
return -EINVAL;
}
@@ -397,7 +375,6 @@ octo_des_cbc_encrypt(
crypt_len -= 8;
}
- octeon_crypto_disable(s);
return 0;
}
@@ -412,7 +389,6 @@ octo_des_cbc_decrypt(
{
uint64_t *data;
int data_i, data_l;
- register_t s;
dprintf("%s()\n", __func__);
@@ -430,8 +406,6 @@ octo_des_cbc_decrypt(
CVMX_PREFETCH0(ivp);
CVMX_PREFETCH0(od->octo_enckey);
- s = octeon_crypto_enable();
-
/* load 3DES Key */
CVMX_MT_3DES_KEY(((uint64_t *) od->octo_enckey)[0], 0);
if (od->octo_encklen == 24) {
@@ -441,7 +415,6 @@ octo_des_cbc_decrypt(
CVMX_MT_3DES_KEY(((uint64_t *) od->octo_enckey)[0], 1);
CVMX_MT_3DES_KEY(((uint64_t *) od->octo_enckey)[0], 2);
} else {
- octeon_crypto_disable(s);
dprintf("%s: Bad key length %d\n", __func__, od->octo_encklen);
return -EINVAL;
}
@@ -460,7 +433,6 @@ octo_des_cbc_decrypt(
crypt_len -= 8;
}
- octeon_crypto_disable(s);
return 0;
}
@@ -477,7 +449,6 @@ octo_aes_cbc_encrypt(
{
uint64_t *data, *pdata;
int data_i, data_l;
- register_t s;
dprintf("%s()\n", __func__);
@@ -495,8 +466,6 @@ octo_aes_cbc_encrypt(
CVMX_PREFETCH0(ivp);
CVMX_PREFETCH0(od->octo_enckey);
- s = octeon_crypto_enable();
-
/* load AES Key */
CVMX_MT_AES_KEY(((uint64_t *) od->octo_enckey)[0], 0);
CVMX_MT_AES_KEY(((uint64_t *) od->octo_enckey)[1], 1);
@@ -511,7 +480,6 @@ octo_aes_cbc_encrypt(
CVMX_MT_AES_KEY(((uint64_t *) od->octo_enckey)[2], 2);
CVMX_MT_AES_KEY(((uint64_t *) od->octo_enckey)[3], 3);
} else {
- octeon_crypto_disable(s);
dprintf("%s: Bad key length %d\n", __func__, od->octo_encklen);
return -EINVAL;
}
@@ -536,7 +504,6 @@ octo_aes_cbc_encrypt(
crypt_len -= 16;
}
- octeon_crypto_disable(s);
return 0;
}
@@ -551,7 +518,6 @@ octo_aes_cbc_decrypt(
{
uint64_t *data, *pdata;
int data_i, data_l;
- register_t s;
dprintf("%s()\n", __func__);
@@ -569,8 +535,6 @@ octo_aes_cbc_decrypt(
CVMX_PREFETCH0(ivp);
CVMX_PREFETCH0(od->octo_enckey);
- s = octeon_crypto_enable();
-
/* load AES Key */
CVMX_MT_AES_KEY(((uint64_t *) od->octo_enckey)[0], 0);
CVMX_MT_AES_KEY(((uint64_t *) od->octo_enckey)[1], 1);
@@ -585,7 +549,6 @@ octo_aes_cbc_decrypt(
CVMX_MT_AES_KEY(((uint64_t *) od->octo_enckey)[2], 2);
CVMX_MT_AES_KEY(((uint64_t *) od->octo_enckey)[3], 3);
} else {
- octeon_crypto_disable(s);
dprintf("%s: Bad key length %d\n", __func__, od->octo_encklen);
return -EINVAL;
}
@@ -610,7 +573,6 @@ octo_aes_cbc_decrypt(
crypt_len -= 16;
}
- octeon_crypto_disable(s);
return 0;
}
@@ -629,7 +591,6 @@ octo_null_md5_encrypt(
uint64_t *data;
uint64_t tmp1, tmp2;
int data_i, data_l, alen = auth_len;
- register_t s;
dprintf("%s()\n", __func__);
@@ -644,8 +605,6 @@ octo_null_md5_encrypt(
IOV_INIT(iov, data, data_i, data_l);
- s = octeon_crypto_enable();
-
/* Load MD5 IV */
CVMX_MT_HSH_IV(od->octo_hminner[0], 0);
CVMX_MT_HSH_IV(od->octo_hminner[1], 1);
@@ -716,7 +675,6 @@ octo_null_md5_encrypt(
CVMX_MF_HSH_IV(tmp1, 1);
*(uint32_t *)data = (uint32_t) (tmp1 >> 32);
- octeon_crypto_disable(s);
return 0;
}
@@ -735,7 +693,6 @@ octo_null_sha1_encrypt(
uint64_t *data;
uint64_t tmp1, tmp2, tmp3;
int data_i, data_l, alen = auth_len;
- register_t s;
dprintf("%s()\n", __func__);
@@ -750,8 +707,6 @@ octo_null_sha1_encrypt(
IOV_INIT(iov, data, data_i, data_l);
- s = octeon_crypto_enable();
-
/* Load SHA1 IV */
CVMX_MT_HSH_IV(od->octo_hminner[0], 0);
CVMX_MT_HSH_IV(od->octo_hminner[1], 1);
@@ -825,7 +780,6 @@ octo_null_sha1_encrypt(
CVMX_MF_HSH_IV(tmp1, 1);
*(uint32_t *)data = (uint32_t) (tmp1 >> 32);
- octeon_crypto_disable(s);
return 0;
}
@@ -849,7 +803,6 @@ octo_des_cbc_md5_encrypt(
uint32_t *data32;
uint64_t tmp1, tmp2;
int data_i, data_l, alen = auth_len;
- register_t s;
dprintf("%s()\n", __func__);
@@ -870,8 +823,6 @@ octo_des_cbc_md5_encrypt(
CVMX_PREFETCH0(ivp);
CVMX_PREFETCH0(od->octo_enckey);
- s = octeon_crypto_enable();
-
/* load 3DES Key */
CVMX_MT_3DES_KEY(((uint64_t *) od->octo_enckey)[0], 0);
if (od->octo_encklen == 24) {
@@ -881,7 +832,6 @@ octo_des_cbc_md5_encrypt(
CVMX_MT_3DES_KEY(((uint64_t *) od->octo_enckey)[0], 1);
CVMX_MT_3DES_KEY(((uint64_t *) od->octo_enckey)[0], 2);
} else {
- octeon_crypto_disable(s);
dprintf("%s: Bad key length %d\n", __func__, od->octo_encklen);
return -EINVAL;
}
@@ -981,7 +931,6 @@ octo_des_cbc_md5_encrypt(
CVMX_MF_HSH_IV(tmp1, 1);
*data32 = (uint32_t) (tmp1 >> 32);
- octeon_crypto_disable(s);
return 0;
}
@@ -1002,7 +951,6 @@ octo_des_cbc_md5_decrypt(
uint32_t *data32;
uint64_t tmp1, tmp2;
int data_i, data_l, alen = auth_len;
- register_t s;
dprintf("%s()\n", __func__);
@@ -1023,8 +971,6 @@ octo_des_cbc_md5_decrypt(
CVMX_PREFETCH0(ivp);
CVMX_PREFETCH0(od->octo_enckey);
- s = octeon_crypto_enable();
-
/* load 3DES Key */
CVMX_MT_3DES_KEY(((uint64_t *) od->octo_enckey)[0], 0);
if (od->octo_encklen == 24) {
@@ -1034,7 +980,6 @@ octo_des_cbc_md5_decrypt(
CVMX_MT_3DES_KEY(((uint64_t *) od->octo_enckey)[0], 1);
CVMX_MT_3DES_KEY(((uint64_t *) od->octo_enckey)[0], 2);
} else {
- octeon_crypto_disable(s);
dprintf("%s: Bad key length %d\n", __func__, od->octo_encklen);
return -EINVAL;
}
@@ -1134,7 +1079,6 @@ octo_des_cbc_md5_decrypt(
CVMX_MF_HSH_IV(tmp1, 1);
*data32 = (uint32_t) (tmp1 >> 32);
- octeon_crypto_disable(s);
return 0;
}
@@ -1158,7 +1102,6 @@ octo_des_cbc_sha1_encrypt(
uint32_t *data32;
uint64_t tmp1, tmp2, tmp3;
int data_i, data_l, alen = auth_len;
- register_t s;
dprintf("%s()\n", __func__);
@@ -1179,8 +1122,6 @@ octo_des_cbc_sha1_encrypt(
CVMX_PREFETCH0(ivp);
CVMX_PREFETCH0(od->octo_enckey);
- s = octeon_crypto_enable();
-
/* load 3DES Key */
CVMX_MT_3DES_KEY(((uint64_t *) od->octo_enckey)[0], 0);
if (od->octo_encklen == 24) {
@@ -1190,7 +1131,6 @@ octo_des_cbc_sha1_encrypt(
CVMX_MT_3DES_KEY(((uint64_t *) od->octo_enckey)[0], 1);
CVMX_MT_3DES_KEY(((uint64_t *) od->octo_enckey)[0], 2);
} else {
- octeon_crypto_disable(s);
dprintf("%s: Bad key length %d\n", __func__, od->octo_encklen);
return -EINVAL;
}
@@ -1293,7 +1233,6 @@ octo_des_cbc_sha1_encrypt(
CVMX_MF_HSH_IV(tmp1, 1);
*data32 = (uint32_t) (tmp1 >> 32);
- octeon_crypto_disable(s);
return 0;
}
@@ -1314,7 +1253,6 @@ octo_des_cbc_sha1_decrypt(
uint32_t *data32;
uint64_t tmp1, tmp2, tmp3;
int data_i, data_l, alen = auth_len;
- register_t s;
dprintf("%s()\n", __func__);
@@ -1335,8 +1273,6 @@ octo_des_cbc_sha1_decrypt(
CVMX_PREFETCH0(ivp);
CVMX_PREFETCH0(od->octo_enckey);
- s = octeon_crypto_enable();
-
/* load 3DES Key */
CVMX_MT_3DES_KEY(((uint64_t *) od->octo_enckey)[0], 0);
if (od->octo_encklen == 24) {
@@ -1346,7 +1282,6 @@ octo_des_cbc_sha1_decrypt(
CVMX_MT_3DES_KEY(((uint64_t *) od->octo_enckey)[0], 1);
CVMX_MT_3DES_KEY(((uint64_t *) od->octo_enckey)[0], 2);
} else {
- octeon_crypto_disable(s);
dprintf("%s: Bad key length %d\n", __func__, od->octo_encklen);
return -EINVAL;
}
@@ -1448,7 +1383,6 @@ octo_des_cbc_sha1_decrypt(
CVMX_MF_HSH_IV(tmp1, 1);
*data32 = (uint32_t) (tmp1 >> 32);
- octeon_crypto_disable(s);
return 0;
}
@@ -1473,7 +1407,6 @@ octo_aes_cbc_md5_encrypt(
uint32_t *data32;
uint64_t tmp1, tmp2;
int data_i, data_l, alen = auth_len;
- register_t s;
dprintf("%s()\n", __func__);
@@ -1494,8 +1427,6 @@ octo_aes_cbc_md5_encrypt(
CVMX_PREFETCH0(ivp);
CVMX_PREFETCH0(od->octo_enckey);
- s = octeon_crypto_enable();
-
/* load AES Key */
CVMX_MT_AES_KEY(((uint64_t *) od->octo_enckey)[0], 0);
CVMX_MT_AES_KEY(((uint64_t *) od->octo_enckey)[1], 1);
@@ -1510,7 +1441,6 @@ octo_aes_cbc_md5_encrypt(
CVMX_MT_AES_KEY(((uint64_t *) od->octo_enckey)[2], 2);
CVMX_MT_AES_KEY(((uint64_t *) od->octo_enckey)[3], 3);
} else {
- octeon_crypto_disable(s);
dprintf("%s: Bad key length %d\n", __func__, od->octo_encklen);
return -EINVAL;
}
@@ -1633,7 +1563,6 @@ octo_aes_cbc_md5_encrypt(
CVMX_MF_HSH_IV(tmp1, 1);
*data32 = (uint32_t) (tmp1 >> 32);
- octeon_crypto_disable(s);
return 0;
}
@@ -1655,7 +1584,6 @@ octo_aes_cbc_md5_decrypt(
uint32_t *data32;
uint64_t tmp1, tmp2;
int data_i, data_l, alen = auth_len;
- register_t s;
dprintf("%s()\n", __func__);
@@ -1676,8 +1604,6 @@ octo_aes_cbc_md5_decrypt(
CVMX_PREFETCH0(ivp);
CVMX_PREFETCH0(od->octo_enckey);
- s = octeon_crypto_enable();
-
/* load AES Key */
CVMX_MT_AES_KEY(((uint64_t *) od->octo_enckey)[0], 0);
CVMX_MT_AES_KEY(((uint64_t *) od->octo_enckey)[1], 1);
@@ -1692,7 +1618,6 @@ octo_aes_cbc_md5_decrypt(
CVMX_MT_AES_KEY(((uint64_t *) od->octo_enckey)[2], 2);
CVMX_MT_AES_KEY(((uint64_t *) od->octo_enckey)[3], 3);
} else {
- octeon_crypto_disable(s);
dprintf("%s: Bad key length %d\n", __func__, od->octo_encklen);
return -EINVAL;
}
@@ -1811,7 +1736,6 @@ octo_aes_cbc_md5_decrypt(
CVMX_MF_HSH_IV(tmp1, 1);
*data32 = (uint32_t) (tmp1 >> 32);
- octeon_crypto_disable(s);
return 0;
}
@@ -1836,7 +1760,6 @@ octo_aes_cbc_sha1_encrypt(
uint32_t *data32;
uint64_t tmp1, tmp2, tmp3;
int data_i, data_l, alen = auth_len;
- register_t s;
dprintf("%s()\n", __func__);
@@ -1857,8 +1780,6 @@ octo_aes_cbc_sha1_encrypt(
CVMX_PREFETCH0(ivp);
CVMX_PREFETCH0(od->octo_enckey);
- s = octeon_crypto_enable();
-
/* load AES Key */
CVMX_MT_AES_KEY(((uint64_t *) od->octo_enckey)[0], 0);
CVMX_MT_AES_KEY(((uint64_t *) od->octo_enckey)[1], 1);
@@ -1873,7 +1794,6 @@ octo_aes_cbc_sha1_encrypt(
CVMX_MT_AES_KEY(((uint64_t *) od->octo_enckey)[2], 2);
CVMX_MT_AES_KEY(((uint64_t *) od->octo_enckey)[3], 3);
} else {
- octeon_crypto_disable(s);
dprintf("%s: Bad key length %d\n", __func__, od->octo_encklen);
return -EINVAL;
}
@@ -2015,7 +1935,6 @@ octo_aes_cbc_sha1_encrypt(
CVMX_MF_HSH_IV(tmp1, 1);
*data32 = (uint32_t) (tmp1 >> 32);
- octeon_crypto_disable(s);
return 0;
}
@@ -2037,7 +1956,6 @@ octo_aes_cbc_sha1_decrypt(
uint32_t *data32;
uint64_t tmp1, tmp2, tmp3;
int data_i, data_l, alen = auth_len;
- register_t s;
dprintf("%s()\n", __func__);
@@ -2058,8 +1976,6 @@ octo_aes_cbc_sha1_decrypt(
CVMX_PREFETCH0(ivp);
CVMX_PREFETCH0(od->octo_enckey);
- s = octeon_crypto_enable();
-
/* load AES Key */
CVMX_MT_AES_KEY(((uint64_t *) od->octo_enckey)[0], 0);
CVMX_MT_AES_KEY(((uint64_t *) od->octo_enckey)[1], 1);
@@ -2074,7 +1990,6 @@ octo_aes_cbc_sha1_decrypt(
CVMX_MT_AES_KEY(((uint64_t *) od->octo_enckey)[2], 2);
CVMX_MT_AES_KEY(((uint64_t *) od->octo_enckey)[3], 3);
} else {
- octeon_crypto_disable(s);
dprintf("%s: Bad key length %d\n", __func__, od->octo_encklen);
return -EINVAL;
}
@@ -2215,7 +2130,6 @@ octo_aes_cbc_sha1_decrypt(
CVMX_MF_HSH_IV(tmp1, 1);
*data32 = (uint32_t) (tmp1 >> 32);
- octeon_crypto_disable(s);
return 0;
}
diff --git a/sys/mips/cavium/files.octeon1 b/sys/mips/cavium/files.octeon1
index b6c7e79..1e4fdb0 100644
--- a/sys/mips/cavium/files.octeon1
+++ b/sys/mips/cavium/files.octeon1
@@ -21,6 +21,8 @@ mips/cavium/octeon_nmi.S optional octeon_wdog
mips/cavium/cryptocteon/cavium_crypto.c optional cryptocteon
mips/cavium/cryptocteon/cryptocteon.c optional cryptocteon
+mips/mips/octeon_cop2_swtch.S standard
+mips/mips/octeon_cop2.c standard
mips/cavium/octe/ethernet.c optional octe
mips/cavium/octe/ethernet-mv88e61xx.c optional octe octeon_vendor_lanner
@@ -49,6 +51,8 @@ mips/cavium/usb/octusb_octeon.c optional usb octusb
contrib/octeon-sdk/cvmx-usb.c optional octusb
+mips/cavium/octeon_gpio.c optional gpio
+
# XXX Some files could be excluded in some configurations. Making them
# optional but on in the default config would seem reasonable.
contrib/octeon-sdk/cvmx-cmd-queue.c standard
diff --git a/sys/mips/cavium/octeon_cop2.S b/sys/mips/cavium/octeon_cop2.S
new file mode 100644
index 0000000..0a983f9
--- /dev/null
+++ b/sys/mips/cavium/octeon_cop2.S
@@ -0,0 +1,225 @@
+/*-
+ * Copyright (c) 2011 Oleksandr Tymoshenko
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ */
+
+#include <machine/asm.h>
+#include <mips/cavium/octeon_cop2.h>
+
+#include "assym.s"
+
+.set noreorder
+
+#define SAVE_COP2_REGISTER(reg) \
+ dmfc2 t1, reg; sd t1, reg##_OFFSET(a0)
+
+
+#define RESTORE_COP2_REGISTER(reg) \
+ ld t1, reg##_OFFSET(a0); dmtc2 t1, reg##_SET
+
+LEAF(octeon_cop2_save)
+ /* Get CvmCtl register */
+ dmfc0 t0, $9, 7
+
+ /* CRC state */
+ SAVE_COP2_REGISTER(COP2_CRC_IV)
+ SAVE_COP2_REGISTER(COP2_CRC_LENGTH)
+ SAVE_COP2_REGISTER(COP2_CRC_POLY)
+
+ /* if CvmCtl[NODFA_CP2] -> save_nodfa */
+ bbit1 t0, 28, save_nodfa
+ nop
+
+ /* LLM state */
+ SAVE_COP2_REGISTER(COP2_LLM_DAT0)
+ SAVE_COP2_REGISTER(COP2_LLM_DAT1)
+
+save_nodfa:
+ /* crypto stuff is irrelevant if CvmCtl[NOCRYPTO] */
+ bbit1 t0, 26, save_done
+ nop
+
+ SAVE_COP2_REGISTER(COP2_3DES_IV)
+ SAVE_COP2_REGISTER(COP2_3DES_KEY0)
+ SAVE_COP2_REGISTER(COP2_3DES_KEY1)
+ SAVE_COP2_REGISTER(COP2_3DES_KEY2)
+ SAVE_COP2_REGISTER(COP2_3DES_RESULT)
+
+ SAVE_COP2_REGISTER(COP2_AES_INP0)
+ SAVE_COP2_REGISTER(COP2_AES_IV0)
+ SAVE_COP2_REGISTER(COP2_AES_IV1)
+ SAVE_COP2_REGISTER(COP2_AES_KEY0)
+ SAVE_COP2_REGISTER(COP2_AES_KEY1)
+ SAVE_COP2_REGISTER(COP2_AES_KEY2)
+ SAVE_COP2_REGISTER(COP2_AES_KEY3)
+ SAVE_COP2_REGISTER(COP2_AES_KEYLEN)
+ SAVE_COP2_REGISTER(COP2_AES_RESULT0)
+ SAVE_COP2_REGISTER(COP2_AES_RESULT1)
+
+ dmfc0 t0, $15
+ li t1, 0x000d0000 /* Octeon Pass1 */
+ beq t0, t1, save_pass1
+ nop
+
+ SAVE_COP2_REGISTER(COP2_HSH_DATW0)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW1)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW2)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW3)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW4)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW5)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW6)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW7)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW8)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW9)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW10)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW11)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW12)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW13)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW14)
+ SAVE_COP2_REGISTER(COP2_HSH_IVW0)
+ SAVE_COP2_REGISTER(COP2_HSH_IVW1)
+ SAVE_COP2_REGISTER(COP2_HSH_IVW2)
+ SAVE_COP2_REGISTER(COP2_HSH_IVW3)
+ SAVE_COP2_REGISTER(COP2_HSH_IVW4)
+ SAVE_COP2_REGISTER(COP2_HSH_IVW5)
+ SAVE_COP2_REGISTER(COP2_HSH_IVW6)
+ SAVE_COP2_REGISTER(COP2_HSH_IVW7)
+ SAVE_COP2_REGISTER(COP2_GFM_MULT0)
+ SAVE_COP2_REGISTER(COP2_GFM_MULT1)
+ SAVE_COP2_REGISTER(COP2_GFM_POLY)
+ SAVE_COP2_REGISTER(COP2_GFM_RESULT0)
+ SAVE_COP2_REGISTER(COP2_GFM_RESULT1)
+ jr ra
+ nop
+
+save_pass1:
+ SAVE_COP2_REGISTER(COP2_HSH_DATW0_PASS1)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW1_PASS1)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW2_PASS1)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW3_PASS1)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW4_PASS1)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW5_PASS1)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW6_PASS1)
+ SAVE_COP2_REGISTER(COP2_HSH_IVW0_PASS1)
+ SAVE_COP2_REGISTER(COP2_HSH_IVW1_PASS1)
+ SAVE_COP2_REGISTER(COP2_HSH_IVW2_PASS1)
+
+save_done:
+ jr ra
+ nop
+END(octeon_cop2_save)
+
+LEAF(octeon_cop2_restore)
+ /* Get CvmCtl register */
+ dmfc0 t0, $9, 7
+
+ /* CRC state */
+ RESTORE_COP2_REGISTER(COP2_CRC_IV)
+ RESTORE_COP2_REGISTER(COP2_CRC_LENGTH)
+ RESTORE_COP2_REGISTER(COP2_CRC_POLY)
+
+ /* if CvmCtl[NODFA_CP2] -> save_nodfa */
+ bbit1 t0, 28, restore_nodfa
+ nop
+
+ /* LLM state */
+ RESTORE_COP2_REGISTER(COP2_LLM_DAT0)
+ RESTORE_COP2_REGISTER(COP2_LLM_DAT1)
+
+restore_nodfa:
+ /* crypto stuff is irrelevant if CvmCtl[NOCRYPTO] */
+ bbit1 t0, 26, restore_done
+ nop
+
+ RESTORE_COP2_REGISTER(COP2_3DES_IV)
+ RESTORE_COP2_REGISTER(COP2_3DES_KEY0)
+ RESTORE_COP2_REGISTER(COP2_3DES_KEY1)
+ RESTORE_COP2_REGISTER(COP2_3DES_KEY2)
+ RESTORE_COP2_REGISTER(COP2_3DES_RESULT)
+
+ RESTORE_COP2_REGISTER(COP2_AES_INP0)
+ RESTORE_COP2_REGISTER(COP2_AES_IV0)
+ RESTORE_COP2_REGISTER(COP2_AES_IV1)
+ RESTORE_COP2_REGISTER(COP2_AES_KEY0)
+ RESTORE_COP2_REGISTER(COP2_AES_KEY1)
+ RESTORE_COP2_REGISTER(COP2_AES_KEY2)
+ RESTORE_COP2_REGISTER(COP2_AES_KEY3)
+ RESTORE_COP2_REGISTER(COP2_AES_KEYLEN)
+ RESTORE_COP2_REGISTER(COP2_AES_RESULT0)
+ RESTORE_COP2_REGISTER(COP2_AES_RESULT1)
+
+ dmfc0 t0, $15
+ li t1, 0x000d0000 /* Octeon Pass1 */
+ beq t0, t1, restore_pass1
+ nop
+
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW0)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW1)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW2)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW3)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW4)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW5)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW6)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW7)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW8)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW9)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW10)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW11)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW12)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW13)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW14)
+ RESTORE_COP2_REGISTER(COP2_HSH_IVW0)
+ RESTORE_COP2_REGISTER(COP2_HSH_IVW1)
+ RESTORE_COP2_REGISTER(COP2_HSH_IVW2)
+ RESTORE_COP2_REGISTER(COP2_HSH_IVW3)
+ RESTORE_COP2_REGISTER(COP2_HSH_IVW4)
+ RESTORE_COP2_REGISTER(COP2_HSH_IVW5)
+ RESTORE_COP2_REGISTER(COP2_HSH_IVW6)
+ RESTORE_COP2_REGISTER(COP2_HSH_IVW7)
+ RESTORE_COP2_REGISTER(COP2_GFM_MULT0)
+ RESTORE_COP2_REGISTER(COP2_GFM_MULT1)
+ RESTORE_COP2_REGISTER(COP2_GFM_POLY)
+ RESTORE_COP2_REGISTER(COP2_GFM_RESULT0)
+ RESTORE_COP2_REGISTER(COP2_GFM_RESULT1)
+ jr ra
+ nop
+
+restore_pass1:
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW0_PASS1)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW1_PASS1)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW2_PASS1)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW3_PASS1)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW4_PASS1)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW5_PASS1)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW6_PASS1)
+ RESTORE_COP2_REGISTER(COP2_HSH_IVW0_PASS1)
+ RESTORE_COP2_REGISTER(COP2_HSH_IVW1_PASS1)
+ RESTORE_COP2_REGISTER(COP2_HSH_IVW2_PASS1)
+
+restore_done:
+ jr ra
+ nop
+END(octeon_cop2_restore)
diff --git a/sys/mips/cavium/octeon_cop2.h b/sys/mips/cavium/octeon_cop2.h
new file mode 100644
index 0000000..b7aa031
--- /dev/null
+++ b/sys/mips/cavium/octeon_cop2.h
@@ -0,0 +1,210 @@
+/*-
+ * Copyright (c) 2011, Oleksandr Tymoshenko <gonzo@FreeBSD.org>
+ * 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 unmodified, 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ *
+ */
+
+#ifndef __OCTEON_COP2_H__
+#define __OCTEON_COP2_H__
+
+/*
+ * COP2 registers of interest
+ */
+#define COP2_CRC_IV 0x201
+#define COP2_CRC_IV_SET COP2_CRC_IV
+#define COP2_CRC_LENGTH 0x202
+#define COP2_CRC_LENGTH_SET 0x1202
+#define COP2_CRC_POLY 0x200
+#define COP2_CRC_POLY_SET 0x4200
+#define COP2_LLM_DAT0 0x402
+#define COP2_LLM_DAT0_SET COP2_LLM_DAT0
+#define COP2_LLM_DAT1 0x40A
+#define COP2_LLM_DAT1_SET COP2_LLM_DAT1
+#define COP2_3DES_IV 0x084
+#define COP2_3DES_IV_SET COP2_3DES_IV
+#define COP2_3DES_KEY0 0x080
+#define COP2_3DES_KEY0_SET COP2_3DES_KEY0
+#define COP2_3DES_KEY1 0x081
+#define COP2_3DES_KEY1_SET COP2_3DES_KEY1
+#define COP2_3DES_KEY2 0x082
+#define COP2_3DES_KEY2_SET COP2_3DES_KEY2
+#define COP2_3DES_RESULT 0x088
+#define COP2_3DES_RESULT_SET 0x098
+#define COP2_AES_INP0 0x111
+#define COP2_AES_INP0_SET COP2_AES_INP0
+#define COP2_AES_IV0 0x102
+#define COP2_AES_IV0_SET COP2_AES_IV0
+#define COP2_AES_IV1 0x103
+#define COP2_AES_IV1_SET COP2_AES_IV1
+#define COP2_AES_KEY0 0x104
+#define COP2_AES_KEY0_SET COP2_AES_KEY0
+#define COP2_AES_KEY1 0x105
+#define COP2_AES_KEY1_SET COP2_AES_KEY1
+#define COP2_AES_KEY2 0x106
+#define COP2_AES_KEY2_SET COP2_AES_KEY2
+#define COP2_AES_KEY3 0x107
+#define COP2_AES_KEY3_SET COP2_AES_KEY3
+#define COP2_AES_KEYLEN 0x110
+#define COP2_AES_KEYLEN_SET COP2_AES_KEYLEN
+#define COP2_AES_RESULT0 0x100
+#define COP2_AES_RESULT0_SET COP2_AES_RESULT0
+#define COP2_AES_RESULT1 0x101
+#define COP2_AES_RESULT1_SET COP2_AES_RESULT1
+#define COP2_HSH_DATW0 0x240
+#define COP2_HSH_DATW0_SET COP2_HSH_DATW0
+#define COP2_HSH_DATW1 0x241
+#define COP2_HSH_DATW1_SET COP2_HSH_DATW1
+#define COP2_HSH_DATW2 0x242
+#define COP2_HSH_DATW2_SET COP2_HSH_DATW2
+#define COP2_HSH_DATW3 0x243
+#define COP2_HSH_DATW3_SET COP2_HSH_DATW3
+#define COP2_HSH_DATW4 0x244
+#define COP2_HSH_DATW4_SET COP2_HSH_DATW4
+#define COP2_HSH_DATW5 0x245
+#define COP2_HSH_DATW5_SET COP2_HSH_DATW5
+#define COP2_HSH_DATW6 0x246
+#define COP2_HSH_DATW6_SET COP2_HSH_DATW6
+#define COP2_HSH_DATW7 0x247
+#define COP2_HSH_DATW7_SET COP2_HSH_DATW7
+#define COP2_HSH_DATW8 0x248
+#define COP2_HSH_DATW8_SET COP2_HSH_DATW8
+#define COP2_HSH_DATW9 0x249
+#define COP2_HSH_DATW9_SET COP2_HSH_DATW9
+#define COP2_HSH_DATW10 0x24A
+#define COP2_HSH_DATW10_SET COP2_HSH_DATW10
+#define COP2_HSH_DATW11 0x24B
+#define COP2_HSH_DATW11_SET COP2_HSH_DATW11
+#define COP2_HSH_DATW12 0x24C
+#define COP2_HSH_DATW12_SET COP2_HSH_DATW12
+#define COP2_HSH_DATW13 0x24D
+#define COP2_HSH_DATW13_SET COP2_HSH_DATW13
+#define COP2_HSH_DATW14 0x24E
+#define COP2_HSH_DATW14_SET COP2_HSH_DATW14
+#define COP2_HSH_IVW0 0x250
+#define COP2_HSH_IVW0_SET COP2_HSH_IVW0
+#define COP2_HSH_IVW1 0x251
+#define COP2_HSH_IVW1_SET COP2_HSH_IVW1
+#define COP2_HSH_IVW2 0x252
+#define COP2_HSH_IVW2_SET COP2_HSH_IVW2
+#define COP2_HSH_IVW3 0x253
+#define COP2_HSH_IVW3_SET COP2_HSH_IVW3
+#define COP2_HSH_IVW4 0x254
+#define COP2_HSH_IVW4_SET COP2_HSH_IVW4
+#define COP2_HSH_IVW5 0x255
+#define COP2_HSH_IVW5_SET COP2_HSH_IVW5
+#define COP2_HSH_IVW6 0x256
+#define COP2_HSH_IVW6_SET COP2_HSH_IVW6
+#define COP2_HSH_IVW7 0x257
+#define COP2_HSH_IVW7_SET COP2_HSH_IVW7
+#define COP2_GFM_MULT0 0x258
+#define COP2_GFM_MULT0_SET COP2_GFM_MULT0
+#define COP2_GFM_MULT1 0x259
+#define COP2_GFM_MULT1_SET COP2_GFM_MULT1
+#define COP2_GFM_POLY 0x25E
+#define COP2_GFM_POLY_SET COP2_GFM_POLY
+#define COP2_GFM_RESULT0 0x25A
+#define COP2_GFM_RESULT0_SET COP2_GFM_RESULT0
+#define COP2_GFM_RESULT1 0x25B
+#define COP2_GFM_RESULT1_SET COP2_GFM_RESULT1
+#define COP2_HSH_DATW0_PASS1 0x040
+#define COP2_HSH_DATW0_PASS1_SET COP2_HSH_DATW0_PASS1
+#define COP2_HSH_DATW1_PASS1 0x041
+#define COP2_HSH_DATW1_PASS1_SET COP2_HSH_DATW1_PASS1
+#define COP2_HSH_DATW2_PASS1 0x042
+#define COP2_HSH_DATW2_PASS1_SET COP2_HSH_DATW2_PASS1
+#define COP2_HSH_DATW3_PASS1 0x043
+#define COP2_HSH_DATW3_PASS1_SET COP2_HSH_DATW3_PASS1
+#define COP2_HSH_DATW4_PASS1 0x044
+#define COP2_HSH_DATW4_PASS1_SET COP2_HSH_DATW4_PASS1
+#define COP2_HSH_DATW5_PASS1 0x045
+#define COP2_HSH_DATW5_PASS1_SET COP2_HSH_DATW5_PASS1
+#define COP2_HSH_DATW6_PASS1 0x046
+#define COP2_HSH_DATW6_PASS1_SET COP2_HSH_DATW6_PASS1
+#define COP2_HSH_IVW0_PASS1 0x048
+#define COP2_HSH_IVW0_PASS1_SET COP2_HSH_IVW0_PASS1
+#define COP2_HSH_IVW1_PASS1 0x049
+#define COP2_HSH_IVW1_PASS1_SET COP2_HSH_IVW1_PASS1
+#define COP2_HSH_IVW2_PASS1 0x04A
+#define COP2_HSH_IVW2_PASS1_SET COP2_HSH_IVW2_PASS1
+
+#ifndef LOCORE
+
+struct octeon_cop2_state {
+ /* 3DES */
+ /* 0x0084 */
+ unsigned long _3des_iv;
+ /* 0x0080..0x0082 */
+ unsigned long _3des_key[3];
+ /* 0x0088, set: 0x0098 */
+ unsigned long _3des_result;
+
+ /* AES */
+ /* 0x0111 */
+ unsigned long aes_inp0;
+ /* 0x0102..0x0103 */
+ unsigned long aes_iv[2];
+ /* 0x0104..0x0107 */
+ unsigned long aes_key[4];
+ /* 0x0110 */
+ unsigned long aes_keylen;
+ /* 0x0100..0x0101 */
+ unsigned long aes_result[2];
+
+ /* CRC */
+ /* 0x0201 */
+ unsigned long crc_iv;
+ /* 0x0202, set: 0x1202 */
+ unsigned long crc_length;
+ /* 0x0200, set: 0x4200 */
+ unsigned long crc_poly;
+
+ /* Low-latency memory stuff */
+ /* 0x0402, 0x040A */
+ unsigned long llm_dat[2];
+
+ /* SHA & MD5 */
+ /* 0x0240..0x024E */
+ unsigned long hsh_datw[15];
+ /* 0x0250..0x0257 */
+ unsigned long hsh_ivw[8];
+
+ /* GFM */
+ /* 0x0258..0x0259 */
+ unsigned long gfm_mult[2];
+ /* 0x025E */
+ unsigned long gfm_poly;
+ /* 0x025A..0x025B */
+ unsigned long gfm_result[2];
+};
+
+/* Prototypes */
+
+void octeon_cop2_save(struct octeon_cop2_state *);
+void octeon_cop2_restore(struct octeon_cop2_state *);
+
+#endif /* LOCORE */
+#endif /* __OCTEON_COP2_H__ */
diff --git a/sys/mips/cavium/octeon_ds1337.c b/sys/mips/cavium/octeon_ds1337.c
index b79d734..a5cba94 100644
--- a/sys/mips/cavium/octeon_ds1337.c
+++ b/sys/mips/cavium/octeon_ds1337.c
@@ -81,9 +81,9 @@ static int validate_ct_struct(struct clocktime *ct)
CT_CHECK(ct->min < 0 || ct->min > 59, "minute");
CT_CHECK(ct->hour < 0 || ct->hour > 23, "hour");
CT_CHECK(ct->day < 1 || ct->day > 31, "day");
- CT_CHECK(ct->dow < 0 || ct->dow > 6, "day of week");
- CT_CHECK(ct->mon < 0 || ct->mon > 11, "month");
- CT_CHECK(ct->year < 0 || ct->year > 200,"year");
+ CT_CHECK(ct->dow < 1 || ct->dow > 7, "day of week");
+ CT_CHECK(ct->mon < 1 || ct->mon > 12, "month");
+ CT_CHECK(ct->year > 2037,"year");
return rc;
}
@@ -124,10 +124,17 @@ uint32_t cvmx_rtc_ds1337_read(void)
{
ct.hour = (ct.hour + 12) % 24;
}
- ct.dow = (reg[3] & 0x7) - 1; /* Day of week field is 0..6 */
+ ct.dow = (reg[3] & 0x7); /* Day of week field is 1..7 */
ct.day = bcd2bin(reg[4] & 0x3f);
- ct.mon = bcd2bin(reg[5] & 0x1f) - 1; /* Month field is 0..11 */
- ct.year = ((reg[5] & 0x80) ? 100 : 0) + bcd2bin(reg[6]);
+ ct.mon = bcd2bin(reg[5] & 0x1f); /* Month field is 1..12 */
+#if defined(OCTEON_BOARD_CAPK_0100ND)
+ /*
+ * CAPK-0100ND uses DS1307 that does not have century bit
+ */
+ ct.year = 2000 + bcd2bin(reg[6]);
+#else
+ ct.year = ((reg[5] & 0x80) ? 2000 : 1900) + bcd2bin(reg[6]);
+#endif
if (validate_ct_struct(&ct))
@@ -166,11 +173,11 @@ int cvmx_rtc_ds1337_write(uint32_t time)
reg[0] = bin2bcd(ct.sec);
reg[1] = bin2bcd(ct.min);
- reg[2] = bin2bcd(ct.hour); /* Force 0..23 format even if using AM/PM */
- reg[3] = bin2bcd(ct.dow + 1);
+ reg[2] = bin2bcd(ct.hour); /* Force 0..23 format even if using AM/PM */
+ reg[3] = bin2bcd(ct.dow);
reg[4] = bin2bcd(ct.day);
- reg[5] = bin2bcd(ct.mon + 1);
- if (ct.year >= 100) /* Set century bit*/
+ reg[5] = bin2bcd(ct.mon);
+ if (ct.year >= 2000) /* Set century bit*/
{
reg[5] |= 0x80;
}
diff --git a/sys/mips/cavium/octeon_gpio.c b/sys/mips/cavium/octeon_gpio.c
new file mode 100644
index 0000000..a1253bb
--- /dev/null
+++ b/sys/mips/cavium/octeon_gpio.c
@@ -0,0 +1,494 @@
+/*-
+ * Copyright (c) 2011, Oleksandr Tymoshenko <gonzo@FreeBSD.org>
+ * 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 unmodified, 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ */
+
+/*
+ * GPIO driver for Cavium Octeon
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/bus.h>
+
+#include <sys/kernel.h>
+#include <sys/module.h>
+#include <sys/rman.h>
+#include <sys/lock.h>
+#include <sys/mutex.h>
+#include <sys/gpio.h>
+
+#include <machine/bus.h>
+#include <machine/resource.h>
+
+#include <contrib/octeon-sdk/cvmx.h>
+#include <contrib/octeon-sdk/cvmx-gpio.h>
+#include <contrib/octeon-sdk/cvmx-interrupt.h>
+
+#include <mips/cavium/octeon_gpiovar.h>
+
+#include "gpio_if.h"
+
+#define DEFAULT_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)
+
+struct octeon_gpio_pin {
+ const char *name;
+ int pin;
+ int flags;
+};
+
+/*
+ * on CAP100 GPIO 7 is "Factory defaults" button
+ *
+ */
+static struct octeon_gpio_pin octeon_gpio_pins[] = {
+ { "F/D", 7, GPIO_PIN_INPUT},
+ { NULL, 0, 0},
+};
+
+/*
+ * Helpers
+ */
+static void octeon_gpio_pin_configure(struct octeon_gpio_softc *sc,
+ struct gpio_pin *pin, uint32_t flags);
+
+/*
+ * Driver stuff
+ */
+static void octeon_gpio_identify(driver_t *, device_t);
+static int octeon_gpio_probe(device_t dev);
+static int octeon_gpio_attach(device_t dev);
+static int octeon_gpio_detach(device_t dev);
+static int octeon_gpio_filter(void *arg);
+static void octeon_gpio_intr(void *arg);
+
+/*
+ * GPIO interface
+ */
+static int octeon_gpio_pin_max(device_t dev, int *maxpin);
+static int octeon_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps);
+static int octeon_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t
+ *flags);
+static int octeon_gpio_pin_getname(device_t dev, uint32_t pin, char *name);
+static int octeon_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags);
+static int octeon_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value);
+static int octeon_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *val);
+static int octeon_gpio_pin_toggle(device_t dev, uint32_t pin);
+
+static void
+octeon_gpio_pin_configure(struct octeon_gpio_softc *sc, struct gpio_pin *pin,
+ unsigned int flags)
+{
+ uint32_t mask;
+ cvmx_gpio_bit_cfgx_t gpio_cfgx;
+
+ mask = 1 << pin->gp_pin;
+ GPIO_LOCK(sc);
+
+ /*
+ * Manage input/output
+ */
+ if (flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) {
+ gpio_cfgx.u64 = cvmx_read_csr(CVMX_GPIO_BIT_CFGX(pin->gp_pin));
+ pin->gp_flags &= ~(GPIO_PIN_INPUT|GPIO_PIN_OUTPUT);
+ if (flags & GPIO_PIN_OUTPUT) {
+ pin->gp_flags |= GPIO_PIN_OUTPUT;
+ gpio_cfgx.s.tx_oe = 1;
+ }
+ else {
+ pin->gp_flags |= GPIO_PIN_INPUT;
+ gpio_cfgx.s.tx_oe = 0;
+ }
+ if (flags & GPIO_PIN_INVIN)
+ gpio_cfgx.s.rx_xor = 1;
+ else
+ gpio_cfgx.s.rx_xor = 0;
+ cvmx_write_csr(CVMX_GPIO_BIT_CFGX(pin->gp_pin), gpio_cfgx.u64);
+ }
+
+ GPIO_UNLOCK(sc);
+}
+
+static int
+octeon_gpio_pin_max(device_t dev, int *maxpin)
+{
+
+ *maxpin = OCTEON_GPIO_PINS - 1;
+ return (0);
+}
+
+static int
+octeon_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps)
+{
+ struct octeon_gpio_softc *sc = device_get_softc(dev);
+ int i;
+
+ for (i = 0; i < sc->gpio_npins; i++) {
+ if (sc->gpio_pins[i].gp_pin == pin)
+ break;
+ }
+
+ if (i >= sc->gpio_npins)
+ return (EINVAL);
+
+ GPIO_LOCK(sc);
+ *caps = sc->gpio_pins[i].gp_caps;
+ GPIO_UNLOCK(sc);
+
+ return (0);
+}
+
+static int
+octeon_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t *flags)
+{
+ struct octeon_gpio_softc *sc = device_get_softc(dev);
+ int i;
+
+ for (i = 0; i < sc->gpio_npins; i++) {
+ if (sc->gpio_pins[i].gp_pin == pin)
+ break;
+ }
+
+ if (i >= sc->gpio_npins)
+ return (EINVAL);
+
+ GPIO_LOCK(sc);
+ *flags = sc->gpio_pins[i].gp_flags;
+ GPIO_UNLOCK(sc);
+
+ return (0);
+}
+
+static int
+octeon_gpio_pin_getname(device_t dev, uint32_t pin, char *name)
+{
+ struct octeon_gpio_softc *sc = device_get_softc(dev);
+ int i;
+
+ for (i = 0; i < sc->gpio_npins; i++) {
+ if (sc->gpio_pins[i].gp_pin == pin)
+ break;
+ }
+
+ if (i >= sc->gpio_npins)
+ return (EINVAL);
+
+ GPIO_LOCK(sc);
+ memcpy(name, sc->gpio_pins[i].gp_name, GPIOMAXNAME);
+ GPIO_UNLOCK(sc);
+
+ return (0);
+}
+
+static int
+octeon_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags)
+{
+ int i;
+ struct octeon_gpio_softc *sc = device_get_softc(dev);
+
+ for (i = 0; i < sc->gpio_npins; i++) {
+ if (sc->gpio_pins[i].gp_pin == pin)
+ break;
+ }
+
+ if (i >= sc->gpio_npins)
+ return (EINVAL);
+
+ /* Filter out unwanted flags */
+ if ((flags &= sc->gpio_pins[i].gp_caps) != flags)
+ return (EINVAL);
+
+ /* Can't mix input/output together */
+ if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) ==
+ (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT))
+ return (EINVAL);
+
+ octeon_gpio_pin_configure(sc, &sc->gpio_pins[i], flags);
+ return (0);
+}
+
+static int
+octeon_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value)
+{
+ struct octeon_gpio_softc *sc = device_get_softc(dev);
+ int i;
+
+ for (i = 0; i < sc->gpio_npins; i++) {
+ if (sc->gpio_pins[i].gp_pin == pin)
+ break;
+ }
+
+ if (i >= sc->gpio_npins)
+ return (EINVAL);
+
+ GPIO_LOCK(sc);
+ if (value)
+ cvmx_gpio_set(1 << pin);
+ else
+ cvmx_gpio_clear(1 << pin);
+ GPIO_UNLOCK(sc);
+
+ return (0);
+}
+
+static int
+octeon_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *val)
+{
+ struct octeon_gpio_softc *sc = device_get_softc(dev);
+ int i;
+ uint64_t state;
+
+ for (i = 0; i < sc->gpio_npins; i++) {
+ if (sc->gpio_pins[i].gp_pin == pin)
+ break;
+ }
+
+ if (i >= sc->gpio_npins)
+ return (EINVAL);
+
+ GPIO_LOCK(sc);
+ state = cvmx_gpio_read();
+ *val = (state & (1 << pin)) ? 1 : 0;
+ GPIO_UNLOCK(sc);
+
+ return (0);
+}
+
+static int
+octeon_gpio_pin_toggle(device_t dev, uint32_t pin)
+{
+ int i;
+ uint64_t state;
+ struct octeon_gpio_softc *sc = device_get_softc(dev);
+
+ for (i = 0; i < sc->gpio_npins; i++) {
+ if (sc->gpio_pins[i].gp_pin == pin)
+ break;
+ }
+
+ if (i >= sc->gpio_npins)
+ return (EINVAL);
+
+ GPIO_LOCK(sc);
+ /*
+ * XXX: Need to check if read returns actual state of output
+ * pins or we need to keep this information by ourself
+ */
+ state = cvmx_gpio_read();
+ if (state & (1 << pin))
+ cvmx_gpio_clear(1 << pin);
+ else
+ cvmx_gpio_set(1 << pin);
+ GPIO_UNLOCK(sc);
+
+ return (0);
+}
+
+static int
+octeon_gpio_filter(void *arg)
+{
+ cvmx_gpio_bit_cfgx_t gpio_cfgx;
+ void **cookie = arg;
+ struct octeon_gpio_softc *sc = *cookie;
+ long int irq = (cookie - sc->gpio_intr_cookies);
+
+ if ((irq < 0) || (irq >= OCTEON_GPIO_IRQS))
+ return (FILTER_STRAY);
+
+ gpio_cfgx.u64 = cvmx_read_csr(CVMX_GPIO_BIT_CFGX(irq));
+ /* Clear rising edge detector */
+ if (gpio_cfgx.s.int_type == OCTEON_GPIO_IRQ_EDGE)
+ cvmx_gpio_interrupt_clear(1 << irq);
+ /* disable interrupt */
+ gpio_cfgx.s.int_en = 0;
+ cvmx_write_csr(CVMX_GPIO_BIT_CFGX(irq), gpio_cfgx.u64);
+
+ return (FILTER_SCHEDULE_THREAD);
+}
+
+static void
+octeon_gpio_intr(void *arg)
+{
+ cvmx_gpio_bit_cfgx_t gpio_cfgx;
+ void **cookie = arg;
+ struct octeon_gpio_softc *sc = *cookie;
+ long int irq = (cookie - sc->gpio_intr_cookies);
+
+ if ((irq < 0) || (irq >= OCTEON_GPIO_IRQS)) {
+ printf("%s: invalid GPIO IRQ: %ld\n",
+ __func__, irq);
+ return;
+ }
+
+ GPIO_LOCK(sc);
+ gpio_cfgx.u64 = cvmx_read_csr(CVMX_GPIO_BIT_CFGX(irq));
+ /* disable interrupt */
+ gpio_cfgx.s.int_en = 1;
+ cvmx_write_csr(CVMX_GPIO_BIT_CFGX(irq), gpio_cfgx.u64);
+
+ /* TODO: notify bus here or something */
+ printf("GPIO IRQ for pin %ld\n", irq);
+ GPIO_UNLOCK(sc);
+}
+
+static void
+octeon_gpio_identify(driver_t *drv, device_t parent)
+{
+
+ BUS_ADD_CHILD(parent, 0, "gpio", 0);
+}
+
+static int
+octeon_gpio_probe(device_t dev)
+{
+
+ device_set_desc(dev, "Cavium Octeon GPIO driver");
+ return (0);
+}
+
+static int
+octeon_gpio_attach(device_t dev)
+{
+ struct octeon_gpio_softc *sc = device_get_softc(dev);
+ struct octeon_gpio_pin *pinp;
+ cvmx_gpio_bit_cfgx_t gpio_cfgx;
+
+ int i;
+
+ KASSERT((device_get_unit(dev) == 0),
+ ("octeon_gpio: Only one gpio module supported"));
+
+ mtx_init(&sc->gpio_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK,
+ MTX_DEF);
+
+ for ( i = 0; i < OCTEON_GPIO_IRQS; i++) {
+ if ((sc->gpio_irq_res[i] = bus_alloc_resource(dev,
+ SYS_RES_IRQ, &sc->gpio_irq_rid[i],
+ CVMX_IRQ_GPIO0 + i, CVMX_IRQ_GPIO0 + i, 1,
+ RF_SHAREABLE | RF_ACTIVE)) == NULL) {
+ device_printf(dev, "unable to allocate IRQ resource\n");
+ return (ENXIO);
+ }
+
+ sc->gpio_intr_cookies[i] = sc;
+ if ((bus_setup_intr(dev, sc->gpio_irq_res[i], INTR_TYPE_MISC,
+ octeon_gpio_filter, octeon_gpio_intr,
+ &(sc->gpio_intr_cookies[i]), &sc->gpio_ih[i]))) {
+ device_printf(dev,
+ "WARNING: unable to register interrupt handler\n");
+ return (ENXIO);
+ }
+ }
+
+ sc->dev = dev;
+ /* Configure all pins as input */
+ /* disable interrupts for all pins */
+ pinp = octeon_gpio_pins;
+ i = 0;
+ while (pinp->name) {
+ strncpy(sc->gpio_pins[i].gp_name, pinp->name, GPIOMAXNAME);
+ sc->gpio_pins[i].gp_pin = pinp->pin;
+ sc->gpio_pins[i].gp_caps = DEFAULT_CAPS;
+ sc->gpio_pins[i].gp_flags = 0;
+ octeon_gpio_pin_configure(sc, &sc->gpio_pins[i], pinp->flags);
+ pinp++;
+ i++;
+ }
+
+ sc->gpio_npins = i;
+
+#if 0
+ /*
+ * Sample: how to enable edge-triggered interrupt
+ * for GPIO pin
+ */
+ gpio_cfgx.u64 = cvmx_read_csr(CVMX_GPIO_BIT_CFGX(7));
+ gpio_cfgx.s.int_en = 1;
+ gpio_cfgx.s.int_type = OCTEON_GPIO_IRQ_EDGE;
+ cvmx_write_csr(CVMX_GPIO_BIT_CFGX(7), gpio_cfgx.u64);
+#endif
+
+ if (bootverbose) {
+ for (i = 0; i < 16; i++) {
+ gpio_cfgx.u64 = cvmx_read_csr(CVMX_GPIO_BIT_CFGX(i));
+ device_printf(dev, "[pin%d] output=%d, invinput=%d, intr=%d, intr_type=%s\n",
+ i, gpio_cfgx.s.tx_oe, gpio_cfgx.s.rx_xor,
+ gpio_cfgx.s.int_en, gpio_cfgx.s.int_type ? "rising edge" : "level");
+ }
+ }
+
+ device_add_child(dev, "gpioc", device_get_unit(dev));
+ device_add_child(dev, "gpiobus", device_get_unit(dev));
+ return (bus_generic_attach(dev));
+}
+
+static int
+octeon_gpio_detach(device_t dev)
+{
+ struct octeon_gpio_softc *sc = device_get_softc(dev);
+ int i;
+
+ KASSERT(mtx_initialized(&sc->gpio_mtx), ("gpio mutex not initialized"));
+
+ for ( i = 0; i < OCTEON_GPIO_IRQS; i++) {
+ bus_release_resource(dev, SYS_RES_IRQ,
+ sc->gpio_irq_rid[i], sc->gpio_irq_res[i]);
+ }
+ bus_generic_detach(dev);
+
+ mtx_destroy(&sc->gpio_mtx);
+
+ return(0);
+}
+
+static device_method_t octeon_gpio_methods[] = {
+ DEVMETHOD(device_identify, octeon_gpio_identify),
+ DEVMETHOD(device_probe, octeon_gpio_probe),
+ DEVMETHOD(device_attach, octeon_gpio_attach),
+ DEVMETHOD(device_detach, octeon_gpio_detach),
+
+ /* GPIO protocol */
+ DEVMETHOD(gpio_pin_max, octeon_gpio_pin_max),
+ DEVMETHOD(gpio_pin_getname, octeon_gpio_pin_getname),
+ DEVMETHOD(gpio_pin_getflags, octeon_gpio_pin_getflags),
+ DEVMETHOD(gpio_pin_getcaps, octeon_gpio_pin_getcaps),
+ DEVMETHOD(gpio_pin_setflags, octeon_gpio_pin_setflags),
+ DEVMETHOD(gpio_pin_get, octeon_gpio_pin_get),
+ DEVMETHOD(gpio_pin_set, octeon_gpio_pin_set),
+ DEVMETHOD(gpio_pin_toggle, octeon_gpio_pin_toggle),
+ {0, 0},
+};
+
+static driver_t octeon_gpio_driver = {
+ "gpio",
+ octeon_gpio_methods,
+ sizeof(struct octeon_gpio_softc),
+};
+static devclass_t octeon_gpio_devclass;
+
+DRIVER_MODULE(octeon_gpio, ciu, octeon_gpio_driver, octeon_gpio_devclass, 0, 0);
diff --git a/sys/mips/cavium/octeon_gpiovar.h b/sys/mips/cavium/octeon_gpiovar.h
new file mode 100644
index 0000000..5717b7c
--- /dev/null
+++ b/sys/mips/cavium/octeon_gpiovar.h
@@ -0,0 +1,55 @@
+/*-
+ * Copyright (c) 2011, Oleksandr Tymoshenko <gonzo@FreeBSD.org>
+ * 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 unmodified, 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ *
+ */
+
+#ifndef __OCTEON_GPIOVAR_H__
+#define __OCTEON_GPIOVAR_H__
+
+#define GPIO_LOCK(_sc) mtx_lock(&(_sc)->gpio_mtx)
+#define GPIO_UNLOCK(_sc) mtx_unlock(&(_sc)->gpio_mtx)
+#define GPIO_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->gpio_mtx, MA_OWNED)
+
+#define OCTEON_GPIO_IRQ_LEVEL 0
+#define OCTEON_GPIO_IRQ_EDGE 1
+
+#define OCTEON_GPIO_PINS 24
+#define OCTEON_GPIO_IRQS 16
+
+struct octeon_gpio_softc {
+ device_t dev;
+ struct mtx gpio_mtx;
+ struct resource *gpio_irq_res[OCTEON_GPIO_IRQS];
+ int gpio_irq_rid[OCTEON_GPIO_IRQS];
+ void *gpio_ih[OCTEON_GPIO_IRQS];
+ void *gpio_intr_cookies[OCTEON_GPIO_IRQS];
+ int gpio_npins;
+ struct gpio_pin gpio_pins[OCTEON_GPIO_PINS];
+};
+
+#endif /* __OCTEON_GPIOVAR_H__ */
diff --git a/sys/mips/cavium/octeon_machdep.c b/sys/mips/cavium/octeon_machdep.c
index 2303fbd..cfd13bf 100644
--- a/sys/mips/cavium/octeon_machdep.c
+++ b/sys/mips/cavium/octeon_machdep.c
@@ -571,6 +571,10 @@ octeon_process_app_desc_ver_6(void)
octeon_bootinfo->eclock_hz);
memcpy(cvmx_sysinfo_get()->mac_addr_base, octeon_bootinfo->mac_addr_base, 6);
cvmx_sysinfo_get()->mac_addr_count = octeon_bootinfo->mac_addr_count;
+ cvmx_sysinfo_get()->compact_flash_common_base_addr =
+ octeon_bootinfo->compact_flash_common_base_addr;
+ cvmx_sysinfo_get()->compact_flash_attribute_base_addr =
+ octeon_bootinfo->compact_flash_attribute_base_addr;
}
static void
diff --git a/sys/mips/cavium/usb/octusb.c b/sys/mips/cavium/usb/octusb.c
index d8ea9fb..01328c5 100644
--- a/sys/mips/cavium/usb/octusb.c
+++ b/sys/mips/cavium/usb/octusb.c
@@ -159,25 +159,27 @@ octusb_host_alloc_endpoint(struct octusb_td *td)
sc = td->qh->sc;
ep_handle = cvmx_usb_open_pipe(
- &sc->sc_port[td->qh->port_index].state,
+ &sc->sc_port[td->qh->root_port_index].state,
0,
td->qh->dev_addr,
- td->qh->ep_num,
+ td->qh->ep_num & UE_ADDR,
octusb_convert_speed(td->qh->dev_speed),
td->qh->max_packet_size,
octusb_convert_ep_type(td->qh->ep_type),
(td->qh->ep_num & UE_DIR_IN) ? CVMX_USB_DIRECTION_IN :
CVMX_USB_DIRECTION_OUT,
td->qh->ep_interval,
- td->qh->ep_mult,
+ (td->qh->dev_speed == USB_SPEED_HIGH) ? td->qh->ep_mult : 0,
td->qh->hs_hub_addr,
td->qh->hs_hub_port);
- if (ep_handle < 0)
+ if (ep_handle < 0) {
+ DPRINTFN(1, "cvmx_usb_open_pipe failed: %d\n", ep_handle);
return (1); /* busy */
+ }
cvmx_usb_set_toggle(
- &sc->sc_port[td->qh->port_index].state,
+ &sc->sc_port[td->qh->root_port_index].state,
ep_handle, td->qh->ep_toggle_next);
td->qh->fixup_handle = -1;
@@ -206,10 +208,10 @@ octusb_host_free_endpoint(struct octusb_td *td)
if (td->qh->fixup_handle >= 0) {
/* cancel, if any */
- cvmx_usb_cancel(&sc->sc_port[td->qh->port_index].state,
+ cvmx_usb_cancel(&sc->sc_port[td->qh->root_port_index].state,
td->qh->ep_handle, td->qh->fixup_handle);
}
- cvmx_usb_close_pipe(&sc->sc_port[td->qh->port_index].state, td->qh->ep_handle);
+ cvmx_usb_close_pipe(&sc->sc_port[td->qh->root_port_index].state, td->qh->ep_handle);
td->qh->ep_allocated = 0;
}
@@ -301,7 +303,7 @@ octusb_host_control_header_tx(struct octusb_td *td)
usb_pc_cpu_flush(td->qh->fixup_pc);
status = cvmx_usb_submit_control(
- &sc->sc_port[td->qh->port_index].state,
+ &sc->sc_port[td->qh->root_port_index].state,
td->qh->ep_handle, td->qh->fixup_phys,
td->qh->fixup_phys + 8, td->qh->fixup_len,
&octusb_complete_cb, td);
@@ -410,7 +412,7 @@ octusb_host_control_status_tx(struct octusb_td *td)
/* start USB transfer */
status = cvmx_usb_submit_control(
- &sc->sc_port[td->qh->port_index].state,
+ &sc->sc_port[td->qh->root_port_index].state,
td->qh->ep_handle, td->qh->fixup_phys,
td->qh->fixup_phys + 8, td->qh->fixup_len,
&octusb_complete_cb, td);
@@ -493,19 +495,19 @@ octusb_non_control_data_tx(struct octusb_td *td)
td->qh->iso_pkt.length = rem;
td->qh->iso_pkt.status = 0;
/* start USB transfer */
- status = cvmx_usb_submit_isochronous(&sc->sc_port[td->qh->port_index].state,
+ status = cvmx_usb_submit_isochronous(&sc->sc_port[td->qh->root_port_index].state,
td->qh->ep_handle, 1, CVMX_USB_ISOCHRONOUS_FLAGS_ALLOW_SHORT |
CVMX_USB_ISOCHRONOUS_FLAGS_ASAP, 1, &td->qh->iso_pkt,
td->qh->fixup_phys, rem, &octusb_complete_cb, td);
break;
case UE_BULK:
/* start USB transfer */
- status = cvmx_usb_submit_bulk(&sc->sc_port[td->qh->port_index].state,
+ status = cvmx_usb_submit_bulk(&sc->sc_port[td->qh->root_port_index].state,
td->qh->ep_handle, td->qh->fixup_phys, rem, &octusb_complete_cb, td);
break;
case UE_INTERRUPT:
/* start USB transfer (interrupt or interrupt) */
- status = cvmx_usb_submit_interrupt(&sc->sc_port[td->qh->port_index].state,
+ status = cvmx_usb_submit_interrupt(&sc->sc_port[td->qh->root_port_index].state,
td->qh->ep_handle, td->qh->fixup_phys, rem, &octusb_complete_cb, td);
break;
default:
@@ -612,19 +614,19 @@ octusb_non_control_data_rx(struct octusb_td *td)
td->qh->iso_pkt.length = rem;
td->qh->iso_pkt.status = 0;
/* start USB transfer */
- status = cvmx_usb_submit_isochronous(&sc->sc_port[td->qh->port_index].state,
+ status = cvmx_usb_submit_isochronous(&sc->sc_port[td->qh->root_port_index].state,
td->qh->ep_handle, 1, CVMX_USB_ISOCHRONOUS_FLAGS_ALLOW_SHORT |
CVMX_USB_ISOCHRONOUS_FLAGS_ASAP, 1, &td->qh->iso_pkt,
td->qh->fixup_phys, rem, &octusb_complete_cb, td);
break;
case UE_BULK:
/* start USB transfer */
- status = cvmx_usb_submit_bulk(&sc->sc_port[td->qh->port_index].state,
+ status = cvmx_usb_submit_bulk(&sc->sc_port[td->qh->root_port_index].state,
td->qh->ep_handle, td->qh->fixup_phys, rem, &octusb_complete_cb, td);
break;
case UE_INTERRUPT:
/* start USB transfer */
- status = cvmx_usb_submit_interrupt(&sc->sc_port[td->qh->port_index].state,
+ status = cvmx_usb_submit_interrupt(&sc->sc_port[td->qh->root_port_index].state,
td->qh->ep_handle, td->qh->fixup_phys, rem, &octusb_complete_cb, td);
break;
default:
@@ -798,7 +800,7 @@ done:
xfer->endpoint->toggle_next =
cvmx_usb_get_toggle(
- &sc->sc_port[qh->port_index].state,
+ &sc->sc_port[qh->root_port_index].state,
qh->ep_handle) ? 1 : 0;
octusb_device_done(xfer, error);
@@ -913,16 +915,16 @@ octusb_uninit(struct octusb_softc *sc)
}
-void
+static void
octusb_suspend(struct octusb_softc *sc)
{
-
+ /* TODO */
}
-void
+static void
octusb_resume(struct octusb_softc *sc)
{
-
+ /* TODO */
}
/*------------------------------------------------------------------------*
@@ -1729,6 +1731,7 @@ octusb_xfer_setup(struct usb_setup_params *parm)
struct octusb_softc *sc;
struct octusb_qh *qh;
struct usb_xfer *xfer;
+ struct usb_device *hub;
void *last_obj;
uint32_t n;
uint32_t ntd;
@@ -1774,7 +1777,13 @@ octusb_xfer_setup(struct usb_setup_params *parm)
qh->ep_type = xfer->endpoint->edesc->bmAttributes;
qh->dev_addr = xfer->address;
qh->dev_speed = usbd_get_speed(xfer->xroot->udev);
- qh->port_index = xfer->xroot->udev->port_index;
+ qh->root_port_index = xfer->xroot->udev->port_index;
+ /* We need Octeon USB HUB's port index, not the local port */
+ hub = xfer->xroot->udev->parent_hub;
+ while(hub && hub->parent_hub) {
+ qh->root_port_index = hub->port_index;
+ hub = hub->parent_hub;
+ }
switch (xfer->endpoint->edesc->bmAttributes & UE_XFERTYPE) {
case UE_INTERRUPT:
@@ -1908,6 +1917,26 @@ octusb_set_hw_power(struct usb_bus *bus)
DPRINTF("Nothing to do.\n");
}
+static void
+octusb_set_hw_power_sleep(struct usb_bus *bus, uint32_t state)
+{
+ struct octusb_softc *sc = OCTUSB_BUS2SC(bus);
+
+ switch (state) {
+ case USB_HW_POWER_SUSPEND:
+ octusb_suspend(sc);
+ break;
+ case USB_HW_POWER_SHUTDOWN:
+ octusb_uninit(sc);
+ break;
+ case USB_HW_POWER_RESUME:
+ octusb_resume(sc);
+ break;
+ default:
+ break;
+ }
+}
+
struct usb_bus_methods octusb_bus_methods = {
.endpoint_init = octusb_ep_init,
.xfer_setup = octusb_xfer_setup,
@@ -1916,6 +1945,7 @@ struct usb_bus_methods octusb_bus_methods = {
.device_resume = octusb_device_resume,
.device_suspend = octusb_device_suspend,
.set_hw_power = octusb_set_hw_power,
+ .set_hw_power_sleep = octusb_set_hw_power_sleep,
.roothub_exec = octusb_roothub_exec,
.xfer_poll = octusb_do_poll,
};
diff --git a/sys/mips/cavium/usb/octusb.h b/sys/mips/cavium/usb/octusb.h
index 31f4fc0..8b8a5e2 100644
--- a/sys/mips/cavium/usb/octusb.h
+++ b/sys/mips/cavium/usb/octusb.h
@@ -29,14 +29,7 @@
#define _OCTUSB_H_
#define OCTUSB_MAX_DEVICES MIN(USB_MAX_DEVICES, 64)
-/*
- * The second port is on a different IRQ and so we disable it for now.
- */
-#if 1
-#define OCTUSB_MAX_PORTS 1 /* hardcoded */
-#else
#define OCTUSB_MAX_PORTS 2 /* hardcoded */
-#endif
#define OCTUSB_MAX_FIXUP 4096 /* bytes */
#define OCTUSB_INTR_ENDPT 0x01
@@ -87,7 +80,7 @@ struct octusb_qh {
uint8_t ep_num;
uint8_t ep_type;
uint8_t ep_toggle_next;
- uint8_t port_index;
+ uint8_t root_port_index;
uint8_t fixup_complete;
uint8_t fixup_pending;
uint8_t hs_hub_addr;
@@ -121,8 +114,8 @@ struct octusb_softc {
struct usb_device *sc_devices[OCTUSB_MAX_DEVICES];
- struct resource *sc_irq_res;
- void *sc_intr_hdl;
+ struct resource *sc_irq_res[OCTUSB_MAX_PORTS];
+ void *sc_intr_hdl[OCTUSB_MAX_PORTS];
struct octusb_port sc_port[OCTUSB_MAX_PORTS];
device_t sc_dev;
@@ -140,8 +133,6 @@ struct octusb_softc {
usb_bus_mem_cb_t octusb_iterate_hw_softc;
usb_error_t octusb_init(struct octusb_softc *);
usb_error_t octusb_uninit(struct octusb_softc *);
-void octusb_suspend(struct octusb_softc *);
-void octusb_resume(struct octusb_softc *);
void octusb_interrupt(struct octusb_softc *);
#endif /* _OCTUSB_H_ */
diff --git a/sys/mips/cavium/usb/octusb_octeon.c b/sys/mips/cavium/usb/octusb_octeon.c
index d160eda..3108758 100644
--- a/sys/mips/cavium/usb/octusb_octeon.c
+++ b/sys/mips/cavium/usb/octusb_octeon.c
@@ -69,7 +69,6 @@ static device_identify_t octusb_octeon_identify;
static device_probe_t octusb_octeon_probe;
static device_attach_t octusb_octeon_attach;
static device_detach_t octusb_octeon_detach;
-static device_shutdown_t octusb_octeon_shutdown;
struct octusb_octeon_softc {
struct octusb_softc sc_dci; /* must be first */
@@ -95,6 +94,8 @@ octusb_octeon_attach(device_t dev)
struct octusb_octeon_softc *sc = device_get_softc(dev);
int err;
int rid;
+ int nports;
+ int i;
/* setup controller interface softc */
@@ -108,12 +109,29 @@ octusb_octeon_attach(device_t dev)
USB_GET_DMA_TAG(dev), NULL)) {
return (ENOMEM);
}
- rid = 0;
- sc->sc_dci.sc_irq_res =
- bus_alloc_resource(dev, SYS_RES_IRQ, &rid,
- CVMX_IRQ_USB, CVMX_IRQ_USB, 1, RF_ACTIVE);
- if (!(sc->sc_dci.sc_irq_res)) {
- goto error;
+ nports = cvmx_usb_get_num_ports();
+ if (nports > OCTUSB_MAX_PORTS)
+ panic("octusb: too many USB ports %d", nports);
+ for (i = 0; i < nports; i++) {
+ rid = 0;
+ sc->sc_dci.sc_irq_res[i] =
+ bus_alloc_resource(dev, SYS_RES_IRQ, &rid,
+ CVMX_IRQ_USB0 + i, CVMX_IRQ_USB0 + i, 1, RF_ACTIVE);
+ if (!(sc->sc_dci.sc_irq_res[i])) {
+ goto error;
+ }
+
+#if (__FreeBSD_version >= 700031)
+ err = bus_setup_intr(dev, sc->sc_dci.sc_irq_res[i], INTR_TYPE_BIO | INTR_MPSAFE,
+ NULL, (driver_intr_t *)octusb_interrupt, sc, &sc->sc_dci.sc_intr_hdl[i]);
+#else
+ err = bus_setup_intr(dev, sc->sc_dci.sc_irq_res[i], INTR_TYPE_BIO | INTR_MPSAFE,
+ (driver_intr_t *)octusb_interrupt, sc, &sc->sc_dci.sc_intr_hdl[i]);
+#endif
+ if (err) {
+ sc->sc_dci.sc_intr_hdl[i] = NULL;
+ goto error;
+ }
}
sc->sc_dci.sc_bus.bdev = device_add_child(dev, "usbus", -1);
@@ -122,17 +140,7 @@ octusb_octeon_attach(device_t dev)
}
device_set_ivars(sc->sc_dci.sc_bus.bdev, &sc->sc_dci.sc_bus);
-#if (__FreeBSD_version >= 700031)
- err = bus_setup_intr(dev, sc->sc_dci.sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE,
- NULL, (driver_intr_t *)octusb_interrupt, sc, &sc->sc_dci.sc_intr_hdl);
-#else
- err = bus_setup_intr(dev, sc->sc_dci.sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE,
- (driver_intr_t *)octusb_interrupt, sc, &sc->sc_dci.sc_intr_hdl);
-#endif
- if (err) {
- sc->sc_dci.sc_intr_hdl = NULL;
- goto error;
- }
+
err = octusb_init(&sc->sc_dci);
if (!err) {
err = device_probe_and_attach(sc->sc_dci.sc_bus.bdev);
@@ -153,6 +161,8 @@ octusb_octeon_detach(device_t dev)
struct octusb_octeon_softc *sc = device_get_softc(dev);
device_t bdev;
int err;
+ int nports;
+ int i;
if (sc->sc_dci.sc_bus.bdev) {
bdev = sc->sc_dci.sc_bus.bdev;
@@ -162,56 +172,49 @@ octusb_octeon_detach(device_t dev)
/* during module unload there are lots of children leftover */
device_delete_children(dev);
- if (sc->sc_dci.sc_irq_res && sc->sc_dci.sc_intr_hdl) {
+ if (sc->sc_dci.sc_irq_res[0] && sc->sc_dci.sc_intr_hdl[0])
/*
- * only call octusb_octeon_uninit() after octusb_octeon_init()
- */
+ * only call octusb_octeon_uninit() after octusb_octeon_init()
+ */
octusb_uninit(&sc->sc_dci);
- err = bus_teardown_intr(dev, sc->sc_dci.sc_irq_res,
- sc->sc_dci.sc_intr_hdl);
- sc->sc_dci.sc_intr_hdl = NULL;
- }
- if (sc->sc_dci.sc_irq_res) {
- bus_release_resource(dev, SYS_RES_IRQ, 0,
- sc->sc_dci.sc_irq_res);
- sc->sc_dci.sc_irq_res = NULL;
+ nports = cvmx_usb_get_num_ports();
+ if (nports > OCTUSB_MAX_PORTS)
+ panic("octusb: too many USB ports %d", nports);
+ for (i = 0; i < nports; i++) {
+ if (sc->sc_dci.sc_irq_res[0] && sc->sc_dci.sc_intr_hdl[0]) {
+ err = bus_teardown_intr(dev, sc->sc_dci.sc_irq_res[i],
+ sc->sc_dci.sc_intr_hdl[i]);
+ sc->sc_dci.sc_intr_hdl[i] = NULL;
+ }
+ if (sc->sc_dci.sc_irq_res) {
+ bus_release_resource(dev, SYS_RES_IRQ, 0,
+ sc->sc_dci.sc_irq_res[i]);
+ sc->sc_dci.sc_irq_res[i] = NULL;
+ }
}
usb_bus_mem_free_all(&sc->sc_dci.sc_bus, NULL);
return (0);
}
-static int
-octusb_octeon_shutdown(device_t dev)
-{
- struct octusb_octeon_softc *sc = device_get_softc(dev);
- int err;
-
- err = bus_generic_shutdown(dev);
- if (err)
- return (err);
-
- octusb_uninit(&sc->sc_dci);
-
- return (0);
-}
-
static device_method_t octusb_octeon_methods[] = {
/* Device interface */
DEVMETHOD(device_identify, octusb_octeon_identify),
DEVMETHOD(device_probe, octusb_octeon_probe),
DEVMETHOD(device_attach, octusb_octeon_attach),
DEVMETHOD(device_detach, octusb_octeon_detach),
- DEVMETHOD(device_shutdown, octusb_octeon_shutdown),
+ DEVMETHOD(device_resume, bus_generic_resume),
+ DEVMETHOD(device_suspend, bus_generic_suspend),
+ DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD_END
};
static driver_t octusb_octeon_driver = {
- "octusb",
- octusb_octeon_methods,
- sizeof(struct octusb_octeon_softc),
+ .name = "octusb",
+ .methods = octusb_octeon_methods,
+ .size = sizeof(struct octusb_octeon_softc),
};
static devclass_t octusb_octeon_devclass;
diff --git a/sys/mips/conf/AR71XX b/sys/mips/conf/AR71XX
deleted file mode 100644
index c340f78..0000000
--- a/sys/mips/conf/AR71XX
+++ /dev/null
@@ -1,93 +0,0 @@
-#
-# AR71XX -- Kernel configuration file for FreeBSD/mips for Atheros 71xx systems
-#
-# $FreeBSD$
-#
-
-ident AR71XX
-makeoptions KERNLOADADDR=0x80050000
-options HZ=1000
-
-hints "AR71XX.hints"
-include "../atheros/std.ar71xx"
-
-makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
-#makeoptions MODULES_OVERRIDE=""
-
-options DDB
-options KDB
-
-options SCHED_4BSD #4BSD scheduler
-options INET #InterNETworking
-options NFSCL #Network Filesystem Client
-options NFS_ROOT #NFS usable as /, requires NFSCL
-options PSEUDOFS #Pseudo-filesystem framework
-options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions
-
-# options NFS_LEGACYRPC
-# Debugging for use in -current
-options DEADLKRES
-options INVARIANTS
-options INVARIANT_SUPPORT
-options WITNESS
-options WITNESS_SKIPSPIN
-options FFS #Berkeley Fast Filesystem
-options SOFTUPDATES #Enable FFS soft updates support
-options UFS_ACL #Support for access control lists
-options UFS_DIRHASH #Improve performance on big directories
-
-
-options BOOTP
-options BOOTP_NFSROOT
-options BOOTP_NFSV3
-options BOOTP_WIRED_TO=arge0
-options BOOTP_COMPAT
-options ROOTDEVNAME=\"nfs:192.168.10.1:/mnt/bsd\"
-
-device pci
-device ar71xx_pci
-
-# Wireless NIC cards
-options IEEE80211_DEBUG
-options IEEE80211_SUPPORT_MESH
-options IEEE80211_SUPPORT_TDMA
-device wlan # 802.11 support
-device wlan_wep # 802.11 WEP support
-device wlan_ccmp # 802.11 CCMP support
-device wlan_tkip # 802.11 TKIP support
-
-device ath # Atheros NIC's
-device ath_pci # Atheros pci/cardbus glue
-options ATH_DEBUG
-device ath_hal
-option AH_SUPPORT_AR5416
-option AH_RXCFG_SDMAMW_4BYTES # See NOTES for details of this WAR
-device ath_rate_sample
-
-device mii
-device arge
-
-device usb
-options USB_EHCI_BIG_ENDIAN_DESC # handle big-endian byte order
-# options USB_DEBUG
-device ohci
-device ehci
-
-device gpio
-device gpioled
-
-device spibus
-device ar71xx_spi
-device mx25l
-# device geom_redboot
-
-device ar71xx_wdog
-
-device uart
-
-device loop
-device ether
-device md
-device bpf
-device random
-device if_bridge
diff --git a/sys/mips/conf/AR71XX.hints b/sys/mips/conf/AR71XX.hints
deleted file mode 100644
index 6719d16..0000000
--- a/sys/mips/conf/AR71XX.hints
+++ /dev/null
@@ -1,77 +0,0 @@
-# $FreeBSD$
-hint.apb.0.at="nexus0"
-hint.apb.0.irq=4
-
-# uart0
-hint.uart.0.at="apb0"
-# see atheros/uart_cpu_ar71xx.c why +3
-hint.uart.0.maddr=0x18020003
-hint.uart.0.msize=0x18
-hint.uart.0.irq=3
-
-#ohci
-hint.ohci.0.at="apb0"
-hint.ohci.0.maddr=0x1c000000
-hint.ohci.0.msize=0x01000000
-hint.ohci.0.irq=6
-
-#ehci
-hint.ehci.0.at="nexus0"
-hint.ehci.0.maddr=0x1b000000
-hint.ehci.0.msize=0x01000000
-hint.ehci.0.irq=1
-
-# pci
-hint.pcib.0.at="nexus0"
-hint.pcib.0.irq=0
-
-hint.arge.0.at="nexus0"
-hint.arge.0.maddr=0x19000000
-hint.arge.0.msize=0x1000
-hint.arge.0.irq=2
-# PHY4 = 1 << 4
-hint.arge.0.phymask=0x10
-# Uncomment this hint for RS (not PRO)
-# PHY20 = 1 << 20
-# hint.arge.0.phymask=0x100000
-
-hint.arge.1.at="nexus0"
-hint.arge.1.maddr=0x1a000000
-hint.arge.1.msize=0x1000
-hint.arge.1.irq=3
-# PHY1, PHY2, PHY3
-hint.arge.1.phymask=0x0e
-# should be 100 for RS
-hint.arge.1.media=1000
-hint.arge.1.fduplex=1
-# Uncomment this hint for RS (not PRO)
-# hint.arge.0.phymask=70000
-
-# GPIO
-hint.gpio.0.at="apb0"
-hint.gpio.0.maddr=0x18040000
-hint.gpio.0.msize=0x1000
-hint.gpio.0.irq=2
-
-# RF led
-hint.gpioled.0.at="gpiobus0"
-hint.gpioled.0.name="rf"
-# pin 2
-hint.gpioled.0.pins=0x0004
-
-# SPI flash
-hint.spi.0.at="nexus0"
-hint.spi.0.maddr=0x1f000000
-hint.spi.0.msize=0x10
-
-hint.mx25l.0.at="spibus0"
-hint.mx25l.0.cs=0
-
-# shares the same bus with mx25l.
-# CE low for flash, CE high for RTC
-# at the moment it's just stub until SPI bus is ready for such hacks
-# hint.rtc.0.at="spibus0"
-# hint.rtc.0.cs=0
-
-# Watchdog
-hint.ar71xx_wdog.0.at="nexus0"
diff --git a/sys/mips/conf/AR71XX_BASE b/sys/mips/conf/AR71XX_BASE
new file mode 100644
index 0000000..4b447cf
--- /dev/null
+++ b/sys/mips/conf/AR71XX_BASE
@@ -0,0 +1,127 @@
+#
+# AR71XX -- Kernel configuration file for FreeBSD/MIPS for Atheros 71xx systems
+#
+# This includes all the common drivers for the AR71XX boards along with
+# the usb, net80211 and atheros driver code.
+#
+# $FreeBSD$
+#
+
+machine mips mipseb
+ident AR71XX_BASE
+cpu CPU_MIPS4KC
+options ISA_MIPS32
+makeoptions TARGET_BIG_ENDIAN
+makeoptions KERNLOADADDR=0x80050000
+options HZ=1000
+options HWPMC_HOOKS
+
+files "../atheros/files.ar71xx"
+
+# For now, hints are per-board.
+
+hints "AR71XX_BASE.hints"
+
+makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
+
+# Build these as modules so small platform builds will have the
+# modules already built.
+makeoptions MODULES_OVERRIDE="random gpio ar71xx if_gif if_gre if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr ath ath_pci"
+
+options DDB
+options KDB
+
+options SCHED_4BSD #4BSD scheduler
+options INET #InterNETworking
+options INET6 # IPv6
+
+# options NFS_CL #Network Filesystem Client
+
+options PSEUDOFS #Pseudo-filesystem framework
+options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions
+
+# options NFS_LEGACYRPC
+# Debugging for use in -current
+options INVARIANTS
+options INVARIANT_SUPPORT
+options WITNESS
+options WITNESS_SKIPSPIN
+options DEBUG_REDZONE
+options DEBUG_MEMGUARD
+
+options FFS #Berkeley Fast Filesystem
+# options SOFTUPDATES #Enable FFS soft updates support
+# options UFS_ACL #Support for access control lists
+# options UFS_DIRHASH #Improve performance on big directories
+# options MSDOSFS # Read MSDOS filesystems; useful for USB/CF
+
+device pci
+device ar71xx_pci
+
+# 802.11 framework
+options IEEE80211_DEBUG
+options IEEE80211_ALQ
+options IEEE80211_SUPPORT_MESH
+# This option is currently broken for if_ath_tx.
+options IEEE80211_SUPPORT_TDMA
+options IEEE80211_AMPDU_AGE
+device wlan # 802.11 support
+device wlan_wep # 802.11 WEP support
+device wlan_ccmp # 802.11 CCMP support
+device wlan_tkip # 802.11 TKIP support
+device wlan_xauth # 802.11 hostap support
+
+# Atheros wireless NICs
+device ath # Atheros interface support
+device ath_pci # Atheros PCI/Cardbus bus
+options ATH_DEBUG
+options ATH_DIAGAPI
+options ATH_ENABLE_11N
+options AH_DEBUG
+options AH_DEBUG_ALQ
+options ALQ
+device ath_hal
+option AH_SUPPORT_AR5416
+device ath_rate_sample
+option AH_RXCFG_SDMAMW_4BYTES
+option AH_AR5416_INTERRUPT_MITIGATION
+# There's no DFS radar detection support yet so this won't actually
+# detect radars. It however does enable the rest of the channel change
+# machinery so DFS can be debugged.
+option ATH_ENABLE_DFS
+
+device mii
+device arge
+
+device usb
+options USB_EHCI_BIG_ENDIAN_DESC # handle big-endian byte order
+options USB_DEBUG
+options USB_HOST_ALIGN=32 # AR71XX (MIPS in general?) requires this
+device ehci
+
+device scbus
+device umass
+device da
+
+# On-board SPI flash
+device spibus
+device ar71xx_spi
+device mx25l
+device ar71xx_wdog
+
+device uart
+
+device loop
+device ether
+device md
+device bpf
+device random
+device if_bridge
+device gif # ip[46] in ip[46] tunneling protocol
+device gre # generic encapsulation - only for IPv4 in IPv4 though atm
+
+options ARGE_DEBUG # Enable if_arge debugging for now
+
+# Enable GPIO
+device gpio
+device gpioled
diff --git a/sys/mips/conf/AR71XX_BASE.hints b/sys/mips/conf/AR71XX_BASE.hints
new file mode 100644
index 0000000..43f0aea
--- /dev/null
+++ b/sys/mips/conf/AR71XX_BASE.hints
@@ -0,0 +1,66 @@
+#
+# $FreeBSD$
+#
+hint.apb.0.at="nexus0"
+hint.apb.0.irq=4
+
+# uart0
+hint.uart.0.at="apb0"
+# see atheros/uart_cpu_ar71xx.c why +3
+hint.uart.0.maddr=0x18020003
+hint.uart.0.msize=0x18
+hint.uart.0.irq=3
+
+#ohci
+hint.ohci.0.at="apb0"
+hint.ohci.0.maddr=0x1c000000
+hint.ohci.0.msize=0x01000000
+hint.ohci.0.irq=6
+
+#ehci
+hint.ehci.0.at="nexus0"
+hint.ehci.0.maddr=0x1b000000
+hint.ehci.0.msize=0x01000000
+hint.ehci.0.irq=1
+
+# pci
+hint.pcib.0.at="nexus0"
+hint.pcib.0.irq=0
+
+hint.arge.0.at="nexus0"
+hint.arge.0.maddr=0x19000000
+hint.arge.0.msize=0x1000
+hint.arge.0.irq=2
+
+# phymask, media and fduplex depend upon the specific
+# board.
+# So each board will override the settings as needed.
+
+hint.arge.1.at="nexus0"
+hint.arge.1.maddr=0x1a000000
+hint.arge.1.msize=0x1000
+hint.arge.1.irq=3
+
+# SPI flash
+hint.spi.0.at="nexus0"
+hint.spi.0.maddr=0x1f000000
+hint.spi.0.msize=0x10
+
+hint.mx25l.0.at="spibus0"
+hint.mx25l.0.cs=0
+
+# Watchdog
+hint.ar71xx_wdog.0.at="nexus0"
+
+# GPIO
+hint.gpio.0.at="apb0"
+hint.gpio.0.maddr=0x18040000
+hint.gpio.0.msize=0x1000
+hint.gpio.0.irq=2
+
+# Each board should override the GPIO bus pins with the configuration
+# relevant to it. Thus no pins are defined here.
+
+# hwpmc device
+hint.ar71xx_pmc.0.at="apb0"
+hint.ar71xx_pmc.0.irq=5
diff --git a/sys/mips/conf/AR91XX_BASE b/sys/mips/conf/AR91XX_BASE
index 71aaab0..ec86e5a 100644
--- a/sys/mips/conf/AR91XX_BASE
+++ b/sys/mips/conf/AR91XX_BASE
@@ -72,10 +72,6 @@ option ATH_ENABLE_11N
device ath_ar5212
device ath_ar5416
device ath_ar9130
-# This is needed so at least one RF backend is present, or the current
-# HAL setup won't compile. Remove this once the 11n chip RF backends
-# are converted over to be in the linker set.
-device ath_rf5111
options AH_DEBUG
option AH_SUPPORT_AR5416
@@ -109,3 +105,5 @@ device md
device bpf
device random
device if_bridge
+device gpio
+device gpioled
diff --git a/sys/mips/conf/AR91XX_BASE.hints b/sys/mips/conf/AR91XX_BASE.hints
index d6a4911..81442f3 100644
--- a/sys/mips/conf/AR91XX_BASE.hints
+++ b/sys/mips/conf/AR91XX_BASE.hints
@@ -51,3 +51,9 @@ hint.mx25l.0.cs=0
# Watchdog
hint.ar71xx_wdog.0.at="nexus0"
+
+# The GPIO function and pin mask is configured per-board
+hint.gpio.0.at="apb0"
+hint.gpio.0.maddr=0x18040000
+hint.gpio.0.msize=0x1000
+hint.gpio.0.irq=2
diff --git a/sys/mips/conf/PB47 b/sys/mips/conf/PB47
new file mode 100644
index 0000000..785d564
--- /dev/null
+++ b/sys/mips/conf/PB47
@@ -0,0 +1,42 @@
+#
+# Atheros PB47 reference board.
+#
+# * one MiniPCI+ slot (modified to allow two idsel lines
+# on the one slot, for a specific kind of internal-only
+# NIC;
+# * one XMII slot
+# * One ethernet PHY
+# * Akros Silicon AS1834
+# * 8MB NOR SPI flash
+# * 64MB RAM
+#
+# $FreeBSD$
+#
+
+include "AR71XX_BASE"
+ident "PB47"
+hints "PB47.hints"
+
+# Enable the uboot environment stuff rather then the
+# redboot stuff.
+options AR71XX_ENV_UBOOT
+
+# XXX TODO: add uboot boot parameter parsing to extract MAC, RAM.
+# Right now it will just detect 32mb out of 64mb, as well as
+# return a garbage MAC address.
+options AR71XX_REALMEM=64*1024*1024
+
+# For DOS - enable if required
+options GEOM_PART_BSD
+options GEOM_PART_MBR
+options MSDOSFS
+
+# uncompress - to boot read-only lzma natively from flash
+device geom_uncompress
+options GEOM_UNCOMPRESS
+
+# Used for the static uboot partition map
+device geom_map
+
+# Boot off of the rootfs, as defined in the geom_map setup.
+options ROOTDEVNAME=\"ufs:map/rootfs.uncompress\"
diff --git a/sys/mips/conf/PB47.hints b/sys/mips/conf/PB47.hints
new file mode 100644
index 0000000..2bcdc77
--- /dev/null
+++ b/sys/mips/conf/PB47.hints
@@ -0,0 +1,79 @@
+
+# $FreeBSD$
+
+# There's two interfaces, but only one socket is populated.
+#
+# There's an AR8021 PHY attached to arge1.
+#
+# XXX TODO: figure out where to extract the MAC from.
+hint.arge.1.phymask=0x01
+
+# XXX TODO: pass in hints for the GPIO -> LED mapping for the
+# minipci slot. The specific customer reference design NIC
+# wires GPIO5 from each AR9220 to one of two GPIO pins on the
+# MiniPCI bus. However, this may be very specific to the NIC
+# being used.
+
+# The default flash layout:
+# uboot: 192k
+# env: 64k
+# rootfs: 6144k
+# uimage (kernel): 1728k
+# caldata: 64k
+#
+# We steal 64k from the end of rootfs to store the local config.
+
+hint.map.0.at="flash/spi0"
+hint.map.0.start=0x00000000
+hint.map.0.end=0x000030000
+hint.map.0.name="uboot"
+hint.map.0.readonly=1
+
+hint.map.1.at="flash/spi0"
+hint.map.1.start=0x00030000
+hint.map.1.end=0x00040000
+hint.map.1.name="uboot-env"
+hint.map.1.readonly=1
+
+hint.map.2.at="flash/spi0"
+hint.map.2.start=0x00040000
+hint.map.2.end=0x00630000
+hint.map.2.name="rootfs"
+hint.map.2.readonly=1
+
+hint.map.3.at="flash/spi0"
+hint.map.3.start=0x00630000
+hint.map.3.end=0x00640000
+hint.map.3.name="cfg"
+hint.map.3.readonly=0
+
+hint.map.4.at="flash/spi0"
+hint.map.4.start=0x00640000
+hint.map.4.end=0x007f0000
+hint.map.4.name="kernel"
+hint.map.4.readonly=1
+
+hint.map.5.at="flash/spi0"
+hint.map.5.start=0x007f0000
+hint.map.5.end=0x00800000
+hint.map.5.name="art"
+hint.map.5.readonly=1
+
+# Don't flip on anything that isn't already enabled by the
+# bootloader.
+hint.gpio.0.function_set=0x00000000
+hint.gpio.0.function_clear=0x00000000
+
+# Which GPIO lines to enable - just GPIO2/3 for the LEDs.
+hint.gpio.0.pinmask=0x0000000c
+
+# GPIO2 and GPIO3 are LEDs, where 0=on and 1=off.
+# XXX TODO: teach gpioled about polarity?
+hint.gpioled.0.at="gpiobus0"
+hint.gpioled.0.pins="0x0004"
+hint.gpioled.0.name="led1"
+
+hint.gpioled.1.at="gpiobus0"
+hint.gpioled.1.pins="0x0008"
+hint.gpioled.1.name="led2"
+
diff --git a/sys/mips/conf/ROUTERSTATION b/sys/mips/conf/ROUTERSTATION
new file mode 100644
index 0000000..de6a3d9
--- /dev/null
+++ b/sys/mips/conf/ROUTERSTATION
@@ -0,0 +1,24 @@
+#
+# Ubiquiti Routerstation: Boot from onboard flash
+#
+# $FreeBSD$
+#
+
+include "AR71XX_BASE"
+ident "ROUTERSTATION"
+hints "ROUTERSTATION.hints"
+
+# XXX Is there an RTC on the RS?
+
+# GEOM modules
+device geom_redboot # to get access to the SPI flash partitions
+device geom_uzip # compressed in-memory filesystem support
+options GEOM_UZIP
+
+# For DOS
+options GEOM_PART_BSD
+options GEOM_PART_MBR
+options MSDOSFS
+
+# Boot path - redboot MFS
+options ROOTDEVNAME=\"ufs:redboot/rootfs.uzip\"
diff --git a/sys/mips/conf/ROUTERSTATION.hints b/sys/mips/conf/ROUTERSTATION.hints
new file mode 100644
index 0000000..faad82d
--- /dev/null
+++ b/sys/mips/conf/ROUTERSTATION.hints
@@ -0,0 +1,19 @@
+#
+# $FreeBSD$
+#
+
+# Uncomment this hint for RS (not PRO)
+# PHY20 = 1 << 20
+hint.arge.0.phymask=0x100000
+
+# should be 100 for RS
+hint.arge.1.media=100
+hint.arge.1.fduplex=1
+# Uncomment this hint for RS (not PRO)
+hint.arge.1.phymask=0x30000
+
+# RF led
+hint.gpioled.0.at="gpiobus0"
+hint.gpioled.0.name="rf"
+# pin 2
+hint.gpioled.0.pins=0x0004
diff --git a/sys/mips/conf/ROUTERSTATION_MFS b/sys/mips/conf/ROUTERSTATION_MFS
new file mode 100644
index 0000000..087659b
--- /dev/null
+++ b/sys/mips/conf/ROUTERSTATION_MFS
@@ -0,0 +1,19 @@
+#
+# Ubiquiti Routerstation: boot from MFS
+#
+# $FreeBSD$
+#
+
+include "AR71XX_BASE"
+ident "ROUTERSTATION_MFS"
+hints "ROUTERSTATION.hints"
+
+# GEOM modules
+device geom_redboot # to get access to the SPI flash partitions
+device geom_uzip # compressed in-memory filesystem hackery!
+options GEOM_UZIP
+
+options ROOTDEVNAME=\"ufs:md0.uzip\"
+
+options MD_ROOT
+options MD_ROOT_SIZE="6144"
diff --git a/sys/mips/conf/RSPRO b/sys/mips/conf/RSPRO
new file mode 100644
index 0000000..8684f07
--- /dev/null
+++ b/sys/mips/conf/RSPRO
@@ -0,0 +1,26 @@
+#
+# Routerstation Pro: boot from on-board flash
+#
+# $FreeBSD$
+#
+
+include "AR71XX_BASE"
+ident "RSPRO"
+hints "RSPRO.hints"
+
+# RTC - requires hackery in the spibus code to work
+device pcf2123_rtc
+
+# GEOM modules
+device geom_redboot # to get access to the SPI flash partitions
+device geom_uzip # compressed in-memory filesystem support
+options GEOM_UZIP
+
+# For DOS
+options GEOM_PART_BSD
+options GEOM_PART_MBR
+options MSDOSFS
+
+# Boot off of flash
+options ROOTDEVNAME=\"ufs:redboot/rootfs.uzip\"
+
diff --git a/sys/mips/conf/RSPRO.hints b/sys/mips/conf/RSPRO.hints
new file mode 100644
index 0000000..68edb28
--- /dev/null
+++ b/sys/mips/conf/RSPRO.hints
@@ -0,0 +1,31 @@
+# $FreeBSD$
+
+hint.arge.0.phymask=0x10
+
+hint.arge.1.media=1000
+hint.arge.1.fduplex=1
+hint.arge.1.phymask=0x0e
+
+# Don't flip on anything that isn't already enabled.
+# This includes leaving the SPI CS1/CS2 pins as GPIO pins as they're
+# not used here.
+hint.gpio.0.function_set=0x00000000
+hint.gpio.0.function_clear=0x00000000
+
+# These are the GPIO LEDs and buttons which can be software controlled.
+hint.gpio.0.pinmask=0x000000ff
+
+# GPIO 0: Pin 1
+# GPIO 1: Pin 2
+# GPIO 2: RF LED
+# GPIO 3: Pin 3
+# GPIO 4: Pin 4
+# GPIO 5: Pin 5
+# GPIO 6: Pin 6
+# GPIO 7: Pin 7
+
+# RF led
+hint.gpioled.0.at="gpiobus0"
+hint.gpioled.0.name="rf"
+# pin 2
+hint.gpioled.0.pins=0x0004
diff --git a/sys/mips/conf/RSPRO_MFS b/sys/mips/conf/RSPRO_MFS
new file mode 100644
index 0000000..b9598f1
--- /dev/null
+++ b/sys/mips/conf/RSPRO_MFS
@@ -0,0 +1,23 @@
+#
+# Ubiquiti Routerstation Pro: boot from MFS
+#
+# $FreeBSD$
+#
+
+include "AR71XX_BASE"
+ident "RSPRO_MFS"
+hints "RSPRO.hints"
+
+# RTC - requires hackery in the spibus code to work
+device pcf2123_rtc
+
+# GEOM modules
+device geom_redboot # to get access to the SPI flash partitions
+device geom_uzip # compressed in-memory filesystem hackery!
+options GEOM_UZIP
+
+# Boot from the first MFS uzip
+options ROOTDEVNAME=\"ufs:md0.uzip\"
+
+options MD_ROOT
+options MD_ROOT_SIZE="6144"
diff --git a/sys/mips/conf/RSPRO_STANDALONE b/sys/mips/conf/RSPRO_STANDALONE
new file mode 100644
index 0000000..bf01cb3
--- /dev/null
+++ b/sys/mips/conf/RSPRO_STANDALONE
@@ -0,0 +1,26 @@
+#
+# Ubiquiti Routerstation Pro: boot from first DOS-partitioned, BSD
+# sliced flash disk.
+#
+# $FreeBSD$
+#
+
+include "AR71XX_BASE"
+ident "RSPRO_STANDALONE"
+hints "RSPRO.hints"
+
+# RTC - requires hackery in the spibus code to work
+device pcf2123_rtc
+
+# GEOM modules
+device geom_redboot # to get access to the SPI flash partitions
+device geom_uzip # compressed in-memory filesystem support
+options GEOM_UZIP
+
+# For DOS
+options GEOM_PART_BSD
+options GEOM_PART_MBR
+options MSDOSFS
+
+# .. first DOS-partitioned, BSD sliced flash disk
+options ROOTDEVNAME=\"ufs:da0s1a\"
diff --git a/sys/mips/conf/TP-WN1043ND.hints b/sys/mips/conf/TP-WN1043ND.hints
index d438e43..dce3fea 100644
--- a/sys/mips/conf/TP-WN1043ND.hints
+++ b/sys/mips/conf/TP-WN1043ND.hints
@@ -75,3 +75,44 @@ hint.map.4.start=0x007f0000
hint.map.4.end=0x00800000
hint.map.4.name="art"
hint.map.4.readonly=1
+
+# GPIO specific configuration block
+
+# Don't flip on anything that isn't already enabled.
+# This includes leaving the SPI CS1/CS2 pins as GPIO pins as they're
+# not used here.
+hint.gpio.0.function_set=0x00000000
+hint.gpio.0.function_clear=0x00000000
+
+# These are the GPIO LEDs and buttons which can be software controlled.
+hint.gpio.0.pinmask=0x001c02ae
+
+# pin 1 - USB (LED)
+# pin 2 - System (LED)
+# Pin 3 - Reset (input)
+# Pin 5 - QSS (LED)
+# Pin 7 - QSS Button (input)
+# Pin 8 - wired into the chip reset line
+# Pin 9 - WLAN
+# Pin 10 - UART TX (not GPIO)
+# Pin 13 - UART RX (not GPIO)
+# Pin 18 - RTL8366RB switch data line
+# Pin 19 - RTL8366RB switch clock line
+# Pin 20 - "GPIO20"
+
+# LEDs are configured separately and driven by the LED device
+hint.gpioled.0.at="gpiobus0"
+hint.gpioled.0.name="usb"
+hint.gpioled.0.pins=0x0002
+
+hint.gpioled.1.at="gpiobus0"
+hint.gpioled.1.name="system"
+hint.gpioled.1.pins=0x0004
+
+hint.gpioled.2.at="gpiobus0"
+hint.gpioled.2.name="qss"
+hint.gpioled.2.pins=0x0020
+
+hint.gpioled.3.at="gpiobus0"
+hint.gpioled.3.name="wlan"
+hint.gpioled.3.pins=0x0200
diff --git a/sys/mips/include/_stdint.h b/sys/mips/include/_stdint.h
index e71f93d..cf18373 100644
--- a/sys/mips/include/_stdint.h
+++ b/sys/mips/include/_stdint.h
@@ -66,6 +66,14 @@
#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
+#ifdef __mips_n64
+#define __INT64_C(c) (c ## L)
+#define __UINT64_C(c) (c ## UL)
+#else
+#define __INT64_C(c) (c ## LL)
+#define __UINT64_C(c) (c ## ULL)
+#endif
+
/*
* ISO/IEC 9899:1999
* 7.18.2.1 Limits of exact-width integer types
@@ -74,19 +82,19 @@
#define INT8_MIN (-0x7f-1)
#define INT16_MIN (-0x7fff-1)
#define INT32_MIN (-0x7fffffff-1)
-#define INT64_MIN (-INT64_C(0x7fffffffffffffff)-1)
+#define INT64_MIN (-__INT64_C(0x7fffffffffffffff)-1)
/* Maximum values of exact-width signed integer types. */
#define INT8_MAX 0x7f
#define INT16_MAX 0x7fff
#define INT32_MAX 0x7fffffff
-#define INT64_MAX INT64_C(0x7fffffffffffffff)
+#define INT64_MAX __INT64_C(0x7fffffffffffffff)
/* Maximum values of exact-width unsigned integer types. */
#define UINT8_MAX 0xff
#define UINT16_MAX 0xffff
#define UINT32_MAX 0xffffffff
-#define UINT64_MAX UINT64_C(0xffffffffffffffff)
+#define UINT64_MAX __UINT64_C(0xffffffffffffffff)
/*
* ISO/IEC 9899:1999
diff --git a/sys/mips/include/_types.h b/sys/mips/include/_types.h
index 2f23db6..a92f7fb 100644
--- a/sys/mips/include/_types.h
+++ b/sys/mips/include/_types.h
@@ -47,7 +47,7 @@
/*
* Basic types upon which most other types are built.
*/
-typedef __signed char __int8_t;
+typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef short __int16_t;
typedef unsigned short __uint16_t;
@@ -74,7 +74,7 @@ typedef unsigned long long __uint64_t;
*/
typedef __int32_t __clock_t; /* clock()... */
typedef double __double_t;
-typedef double __float_t;
+typedef float __float_t;
#ifdef __mips_n64
typedef __int64_t __critical_t;
typedef __int64_t __intfptr_t;
diff --git a/sys/mips/include/cpuregs.h b/sys/mips/include/cpuregs.h
index b47b264..eec9621 100644
--- a/sys/mips/include/cpuregs.h
+++ b/sys/mips/include/cpuregs.h
@@ -233,6 +233,7 @@
#define MIPS3_CR_EXC_CODE 0x0000007C /* five bits */
#define MIPS_CR_IP 0x0000FF00
#define MIPS_CR_EXC_CODE_SHIFT 2
+#define MIPS_CR_COP_ERR_SHIFT 28
/*
* The bits in the status register. All bits are active when set to 1.
diff --git a/sys/mips/include/db_machdep.h b/sys/mips/include/db_machdep.h
index 657e303..a495955 100644
--- a/sys/mips/include/db_machdep.h
+++ b/sys/mips/include/db_machdep.h
@@ -93,6 +93,7 @@ db_addr_t next_instr_address(db_addr_t, boolean_t);
int db_inst_type(int);
db_addr_t branch_taken(int inst, db_addr_t pc);
void stacktrace_subr(register_t pc, register_t sp, register_t ra, int (*)(const char *, ...));
-int kdbpeek(int *);
+int32_t kdbpeek(int *);
+int64_t kdbpeekd(int *);
#endif /* !_MIPS_DB_MACHDEP_H_ */
diff --git a/sys/mips/include/float.h b/sys/mips/include/float.h
index ff7e65c..2aa661a 100644
--- a/sys/mips/include/float.h
+++ b/sys/mips/include/float.h
@@ -45,14 +45,13 @@ __END_DECLS
#ifdef CPU_HAVEFPU
#define FLT_ROUNDS __flt_rounds() /* FP addition rounds to nearest */
#else
-#define FLT_ROUNDS -1
+#define FLT_ROUNDS (-1)
#endif
-/*
- * XXXMIPS: MIPS32 has both float and double type, so set FLT_EVAL_METHOD
- * to 0. Check it for 64-bits systems.
- */
+
+#if __ISO_C_VISIBLE >= 1999
#define FLT_EVAL_METHOD 0
#define DECIMAL_DIG 17
+#endif
#define FLT_MANT_DIG 24 /* p */
#define FLT_EPSILON 1.19209290E-07F /* b**(1-p) */
@@ -63,6 +62,11 @@ __END_DECLS
#define FLT_MAX_EXP 128 /* emax */
#define FLT_MAX 3.40282347E+38F /* (1-b**(-p))*b**emax */
#define FLT_MAX_10_EXP 38 /* floor(log10((1-b**(-p))*b**emax)) */
+#if __ISO_C_VISIBLE >= 2011
+#define FLT_TRUE_MIN 1.40129846E-45F /* b**(emin-p) */
+#define FLT_DECIMAL_DIG 9 /* ceil(1+p*log10(b)) */
+#define FLT_HAS_SUBNORM 1
+#endif /* __ISO_C_VISIBLE >= 2011 */
#define DBL_MANT_DIG 53
#define DBL_EPSILON 2.2204460492503131E-16
@@ -73,15 +77,25 @@ __END_DECLS
#define DBL_MAX_EXP 1024
#define DBL_MAX 1.7976931348623157E+308
#define DBL_MAX_10_EXP 308
+#if __ISO_C_VISIBLE >= 2011
+#define DBL_TRUE_MIN 4.9406564584124654E-324
+#define DBL_DECIMAL_DIG 17
+#define DBL_HAS_SUBNORM 1
+#endif /* __ISO_C_VISIBLE >= 2011 */
#define LDBL_MANT_DIG DBL_MANT_DIG
-#define LDBL_EPSILON DBL_EPSILON
+#define LDBL_EPSILON ((long double)DBL_EPSILON)
#define LDBL_DIG DBL_DIG
#define LDBL_MIN_EXP DBL_MIN_EXP
-#define LDBL_MIN DBL_MIN
+#define LDBL_MIN ((long double)DBL_MIN)
#define LDBL_MIN_10_EXP DBL_MIN_10_EXP
#define LDBL_MAX_EXP DBL_MAX_EXP
-#define LDBL_MAX DBL_MAX
+#define LDBL_MAX ((long double)DBL_MAX)
#define LDBL_MAX_10_EXP DBL_MAX_10_EXP
+#if __ISO_C_VISIBLE >= 2011
+#define LDBL_TRUE_MIN ((long double)DBL_TRUE_MIN)
+#define LDBL_DECIMAL_DIG DBL_DECIMAL_DIG
+#define LDBL_HAS_SUBNORM DBL_HAS_SUBNORM
+#endif /* __ISO_C_VISIBLE >= 2011 */
#endif /* _MACHINE_FLOAT_H_ */
diff --git a/sys/mips/include/frame.h b/sys/mips/include/frame.h
index b08d88c..de7f94c 100644
--- a/sys/mips/include/frame.h
+++ b/sys/mips/include/frame.h
@@ -122,11 +122,6 @@ struct trapframe {
f_register_t f31;
register_t fsr;
register_t fdummy;
- /*
- * COP2 registers may need to be saved here based on the CPU, and those
- * might need to be per process, or even for the kernel, so we need
- * some thought here.
- */
};
/* REVISIT */
diff --git a/sys/mips/include/intr_machdep.h b/sys/mips/include/intr_machdep.h
index 75190f5..547e75a 100644
--- a/sys/mips/include/intr_machdep.h
+++ b/sys/mips/include/intr_machdep.h
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD$
+ * $FreeBSD$
*/
#ifndef _MACHINE_INTR_MACHDEP_H_
@@ -32,7 +32,7 @@
#include <machine/atomic.h>
#if defined(CPU_RMI) || defined(CPU_NLM)
-#define XLR_MAX_INTR 64
+#define XLR_MAX_INTR 64
#else
#define NHARD_IRQS 6
#define NSOFT_IRQS 2
@@ -41,9 +41,9 @@
struct trapframe;
void cpu_init_interrupts(void);
-void cpu_establish_hardintr(const char *, driver_filter_t *, driver_intr_t *,
+void cpu_establish_hardintr(const char *, driver_filter_t *, driver_intr_t *,
void *, int, int, void **);
-void cpu_establish_softintr(const char *, driver_filter_t *, void (*)(void*),
+void cpu_establish_softintr(const char *, driver_filter_t *, void (*)(void*),
void *, int, int, void **);
void cpu_intr(struct trapframe *);
diff --git a/sys/mips/include/octeon_cop2.h b/sys/mips/include/octeon_cop2.h
new file mode 100644
index 0000000..d5161dc
--- /dev/null
+++ b/sys/mips/include/octeon_cop2.h
@@ -0,0 +1,215 @@
+/*-
+ * Copyright (c) 2011, Oleksandr Tymoshenko <gonzo@FreeBSD.org>
+ * 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 unmodified, 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ *
+ */
+
+#ifndef __OCTEON_COP2_H__
+#define __OCTEON_COP2_H__
+
+/*
+ * COP2 registers of interest
+ */
+#define COP2_CRC_IV 0x201
+#define COP2_CRC_IV_SET COP2_CRC_IV
+#define COP2_CRC_LENGTH 0x202
+#define COP2_CRC_LENGTH_SET 0x1202
+#define COP2_CRC_POLY 0x200
+#define COP2_CRC_POLY_SET 0x4200
+#define COP2_LLM_DAT0 0x402
+#define COP2_LLM_DAT0_SET COP2_LLM_DAT0
+#define COP2_LLM_DAT1 0x40A
+#define COP2_LLM_DAT1_SET COP2_LLM_DAT1
+#define COP2_3DES_IV 0x084
+#define COP2_3DES_IV_SET COP2_3DES_IV
+#define COP2_3DES_KEY0 0x080
+#define COP2_3DES_KEY0_SET COP2_3DES_KEY0
+#define COP2_3DES_KEY1 0x081
+#define COP2_3DES_KEY1_SET COP2_3DES_KEY1
+#define COP2_3DES_KEY2 0x082
+#define COP2_3DES_KEY2_SET COP2_3DES_KEY2
+#define COP2_3DES_RESULT 0x088
+#define COP2_3DES_RESULT_SET 0x098
+#define COP2_AES_INP0 0x111
+#define COP2_AES_INP0_SET COP2_AES_INP0
+#define COP2_AES_IV0 0x102
+#define COP2_AES_IV0_SET COP2_AES_IV0
+#define COP2_AES_IV1 0x103
+#define COP2_AES_IV1_SET COP2_AES_IV1
+#define COP2_AES_KEY0 0x104
+#define COP2_AES_KEY0_SET COP2_AES_KEY0
+#define COP2_AES_KEY1 0x105
+#define COP2_AES_KEY1_SET COP2_AES_KEY1
+#define COP2_AES_KEY2 0x106
+#define COP2_AES_KEY2_SET COP2_AES_KEY2
+#define COP2_AES_KEY3 0x107
+#define COP2_AES_KEY3_SET COP2_AES_KEY3
+#define COP2_AES_KEYLEN 0x110
+#define COP2_AES_KEYLEN_SET COP2_AES_KEYLEN
+#define COP2_AES_RESULT0 0x100
+#define COP2_AES_RESULT0_SET COP2_AES_RESULT0
+#define COP2_AES_RESULT1 0x101
+#define COP2_AES_RESULT1_SET COP2_AES_RESULT1
+#define COP2_HSH_DATW0 0x240
+#define COP2_HSH_DATW0_SET COP2_HSH_DATW0
+#define COP2_HSH_DATW1 0x241
+#define COP2_HSH_DATW1_SET COP2_HSH_DATW1
+#define COP2_HSH_DATW2 0x242
+#define COP2_HSH_DATW2_SET COP2_HSH_DATW2
+#define COP2_HSH_DATW3 0x243
+#define COP2_HSH_DATW3_SET COP2_HSH_DATW3
+#define COP2_HSH_DATW4 0x244
+#define COP2_HSH_DATW4_SET COP2_HSH_DATW4
+#define COP2_HSH_DATW5 0x245
+#define COP2_HSH_DATW5_SET COP2_HSH_DATW5
+#define COP2_HSH_DATW6 0x246
+#define COP2_HSH_DATW6_SET COP2_HSH_DATW6
+#define COP2_HSH_DATW7 0x247
+#define COP2_HSH_DATW7_SET COP2_HSH_DATW7
+#define COP2_HSH_DATW8 0x248
+#define COP2_HSH_DATW8_SET COP2_HSH_DATW8
+#define COP2_HSH_DATW9 0x249
+#define COP2_HSH_DATW9_SET COP2_HSH_DATW9
+#define COP2_HSH_DATW10 0x24A
+#define COP2_HSH_DATW10_SET COP2_HSH_DATW10
+#define COP2_HSH_DATW11 0x24B
+#define COP2_HSH_DATW11_SET COP2_HSH_DATW11
+#define COP2_HSH_DATW12 0x24C
+#define COP2_HSH_DATW12_SET COP2_HSH_DATW12
+#define COP2_HSH_DATW13 0x24D
+#define COP2_HSH_DATW13_SET COP2_HSH_DATW13
+#define COP2_HSH_DATW14 0x24E
+#define COP2_HSH_DATW14_SET COP2_HSH_DATW14
+#define COP2_HSH_IVW0 0x250
+#define COP2_HSH_IVW0_SET COP2_HSH_IVW0
+#define COP2_HSH_IVW1 0x251
+#define COP2_HSH_IVW1_SET COP2_HSH_IVW1
+#define COP2_HSH_IVW2 0x252
+#define COP2_HSH_IVW2_SET COP2_HSH_IVW2
+#define COP2_HSH_IVW3 0x253
+#define COP2_HSH_IVW3_SET COP2_HSH_IVW3
+#define COP2_HSH_IVW4 0x254
+#define COP2_HSH_IVW4_SET COP2_HSH_IVW4
+#define COP2_HSH_IVW5 0x255
+#define COP2_HSH_IVW5_SET COP2_HSH_IVW5
+#define COP2_HSH_IVW6 0x256
+#define COP2_HSH_IVW6_SET COP2_HSH_IVW6
+#define COP2_HSH_IVW7 0x257
+#define COP2_HSH_IVW7_SET COP2_HSH_IVW7
+#define COP2_GFM_MULT0 0x258
+#define COP2_GFM_MULT0_SET COP2_GFM_MULT0
+#define COP2_GFM_MULT1 0x259
+#define COP2_GFM_MULT1_SET COP2_GFM_MULT1
+#define COP2_GFM_POLY 0x25E
+#define COP2_GFM_POLY_SET COP2_GFM_POLY
+#define COP2_GFM_RESULT0 0x25A
+#define COP2_GFM_RESULT0_SET COP2_GFM_RESULT0
+#define COP2_GFM_RESULT1 0x25B
+#define COP2_GFM_RESULT1_SET COP2_GFM_RESULT1
+#define COP2_HSH_DATW0_PASS1 0x040
+#define COP2_HSH_DATW0_PASS1_SET COP2_HSH_DATW0_PASS1
+#define COP2_HSH_DATW1_PASS1 0x041
+#define COP2_HSH_DATW1_PASS1_SET COP2_HSH_DATW1_PASS1
+#define COP2_HSH_DATW2_PASS1 0x042
+#define COP2_HSH_DATW2_PASS1_SET COP2_HSH_DATW2_PASS1
+#define COP2_HSH_DATW3_PASS1 0x043
+#define COP2_HSH_DATW3_PASS1_SET COP2_HSH_DATW3_PASS1
+#define COP2_HSH_DATW4_PASS1 0x044
+#define COP2_HSH_DATW4_PASS1_SET COP2_HSH_DATW4_PASS1
+#define COP2_HSH_DATW5_PASS1 0x045
+#define COP2_HSH_DATW5_PASS1_SET COP2_HSH_DATW5_PASS1
+#define COP2_HSH_DATW6_PASS1 0x046
+#define COP2_HSH_DATW6_PASS1_SET COP2_HSH_DATW6_PASS1
+#define COP2_HSH_IVW0_PASS1 0x048
+#define COP2_HSH_IVW0_PASS1_SET COP2_HSH_IVW0_PASS1
+#define COP2_HSH_IVW1_PASS1 0x049
+#define COP2_HSH_IVW1_PASS1_SET COP2_HSH_IVW1_PASS1
+#define COP2_HSH_IVW2_PASS1 0x04A
+#define COP2_HSH_IVW2_PASS1_SET COP2_HSH_IVW2_PASS1
+
+#ifndef LOCORE
+
+struct octeon_cop2_state {
+ /* 3DES */
+ /* 0x0084 */
+ unsigned long _3des_iv;
+ /* 0x0080..0x0082 */
+ unsigned long _3des_key[3];
+ /* 0x0088, set: 0x0098 */
+ unsigned long _3des_result;
+
+ /* AES */
+ /* 0x0111 */
+ unsigned long aes_inp0;
+ /* 0x0102..0x0103 */
+ unsigned long aes_iv[2];
+ /* 0x0104..0x0107 */
+ unsigned long aes_key[4];
+ /* 0x0110 */
+ unsigned long aes_keylen;
+ /* 0x0100..0x0101 */
+ unsigned long aes_result[2];
+
+ /* CRC */
+ /* 0x0201 */
+ unsigned long crc_iv;
+ /* 0x0202, set: 0x1202 */
+ unsigned long crc_length;
+ /* 0x0200, set: 0x4200 */
+ unsigned long crc_poly;
+
+ /* Low-latency memory stuff */
+ /* 0x0402, 0x040A */
+ unsigned long llm_dat[2];
+
+ /* SHA & MD5 */
+ /* 0x0240..0x024E */
+ unsigned long hsh_datw[15];
+ /* 0x0250..0x0257 */
+ unsigned long hsh_ivw[8];
+
+ /* GFM */
+ /* 0x0258..0x0259 */
+ unsigned long gfm_mult[2];
+ /* 0x025E */
+ unsigned long gfm_poly;
+ /* 0x025A..0x025B */
+ unsigned long gfm_result[2];
+};
+
+/* Prototypes */
+
+struct octeon_cop2_state* octeon_cop2_alloc_ctx(void);
+void octeon_cop2_free_ctx(struct octeon_cop2_state *);
+/*
+ * Save/restore part
+ */
+void octeon_cop2_save(struct octeon_cop2_state *);
+void octeon_cop2_restore(struct octeon_cop2_state *);
+
+#endif /* LOCORE */
+#endif /* __OCTEON_COP2_H__ */
diff --git a/sys/mips/include/proc.h b/sys/mips/include/proc.h
index 8b575dd..beba9167 100644
--- a/sys/mips/include/proc.h
+++ b/sys/mips/include/proc.h
@@ -39,6 +39,10 @@
#ifndef _MACHINE_PROC_H_
#define _MACHINE_PROC_H_
+#ifdef CPU_CNMIPS
+#include <machine/octeon_cop2.h>
+#endif
+
/*
* Machine-dependent part of the proc structure.
*/
@@ -58,10 +62,18 @@ struct mdthread {
int md_pc_count; /* performance counter */
int md_pc_spill; /* performance counter spill */
void *md_tls;
+#ifdef CPU_CNMIPS
+ struct octeon_cop2_state *md_cop2; /* kernel context */
+ struct octeon_cop2_state *md_ucop2; /* userland context */
+#define COP2_OWNER_USERLAND 0x0000 /* Userland owns COP2 */
+#define COP2_OWNER_KERNEL 0x0001 /* Kernel owns COP2 */
+ int md_cop2owner;
+#endif
};
/* md_flags */
#define MDTD_FPUSED 0x0001 /* Process used the FPU */
+#define MDTD_COP2USED 0x0002 /* Process used the COP2 */
struct mdproc {
/* empty */
diff --git a/sys/mips/mips/db_disasm.c b/sys/mips/mips/db_disasm.c
index 21e5c90..c7e5223 100644
--- a/sys/mips/mips/db_disasm.c
+++ b/sys/mips/mips/db_disasm.c
@@ -388,5 +388,6 @@ md_printins(int ins, int mdbdot)
reg_name[i.IType.rt], reg_name[i.IType.rs],
(short)i.IType.imm);
}
+ db_printf("\n");
return (delay);
}
diff --git a/sys/mips/mips/db_trace.c b/sys/mips/mips/db_trace.c
index ebb9e1b..062ad30 100644
--- a/sys/mips/mips/db_trace.c
+++ b/sys/mips/mips/db_trace.c
@@ -49,10 +49,13 @@ extern char edata[];
*/
#define MIPS_END_OF_FUNCTION(ins) ((ins) == 0x03e00008)
-/*
- * kdbpeekD(addr) - skip one word starting at 'addr', then read the second word
- */
-#define kdbpeekD(addr) kdbpeek(((int *)(addr)) + 1)
+#if defined(__mips_n64)
+# define MIPS_IS_VALID_KERNELADDR(reg) ((((reg) & 3) == 0) && \
+ ((vm_offset_t)(reg) >= MIPS_XKPHYS_START))
+#else
+# define MIPS_IS_VALID_KERNELADDR(reg) ((((reg) & 3) == 0) && \
+ ((vm_offset_t)(reg) >= MIPS_KSEG0_START))
+#endif
/*
* Functions ``special'' enough to print by name
@@ -141,8 +144,8 @@ loop:
}
/* check for bad SP: could foul up next frame */
/*XXX MIPS64 bad: this hard-coded SP is lame */
- if (sp & 3 || (uintptr_t)sp < 0x80000000u) {
- (*printfn) ("SP 0x%x: not in kernel\n", sp);
+ if (!MIPS_IS_VALID_KERNELADDR(sp)) {
+ (*printfn) ("SP 0x%jx: not in kernel\n", sp);
ra = 0;
subr = 0;
goto done;
@@ -182,8 +185,8 @@ loop:
}
/* check for bad PC */
/*XXX MIPS64 bad: These hard coded constants are lame */
- if (pc & 3 || pc < (uintptr_t)0x80000000) {
- (*printfn) ("PC 0x%x: not in kernel\n", pc);
+ if (!MIPS_IS_VALID_KERNELADDR(pc)) {
+ (*printfn) ("PC 0x%jx: not in kernel\n", pc);
ra = 0;
goto done;
}
@@ -304,27 +307,27 @@ loop:
mask |= (1 << i.IType.rt);
switch (i.IType.rt) {
case 4:/* a0 */
- args[0] = kdbpeekD((int *)(sp + (short)i.IType.imm));
+ args[0] = kdbpeekd((int *)(sp + (short)i.IType.imm));
valid_args[0] = 1;
break;
case 5:/* a1 */
- args[1] = kdbpeekD((int *)(sp + (short)i.IType.imm));
+ args[1] = kdbpeekd((int *)(sp + (short)i.IType.imm));
valid_args[1] = 1;
break;
case 6:/* a2 */
- args[2] = kdbpeekD((int *)(sp + (short)i.IType.imm));
+ args[2] = kdbpeekd((int *)(sp + (short)i.IType.imm));
valid_args[2] = 1;
break;
case 7:/* a3 */
- args[3] = kdbpeekD((int *)(sp + (short)i.IType.imm));
+ args[3] = kdbpeekd((int *)(sp + (short)i.IType.imm));
valid_args[3] = 1;
break;
case 31: /* ra */
- ra = kdbpeekD((int *)(sp + (short)i.IType.imm));
+ ra = kdbpeekd((int *)(sp + (short)i.IType.imm));
}
break;
@@ -350,7 +353,7 @@ done:
(*printfn)("?");
}
- (*printfn) (") ra %x sp %x sz %d\n", ra, sp, stksize);
+ (*printfn) (") ra %jx sp %jx sz %d\n", ra, sp, stksize);
if (ra) {
if (pc == ra && stksize == 0)
diff --git a/sys/mips/mips/elf_machdep.c b/sys/mips/mips/elf_machdep.c
index 85ada0b..d374713 100644
--- a/sys/mips/mips/elf_machdep.c
+++ b/sys/mips/mips/elf_machdep.c
@@ -168,25 +168,41 @@ static int
elf_reloc_internal(linker_file_t lf, Elf_Addr relocbase, const void *data,
int type, int local, elf_lookup_fn lookup)
{
- Elf_Addr *where = (Elf_Addr *)NULL;
+ Elf32_Addr *where = (Elf32_Addr *)NULL;
Elf_Addr addr;
Elf_Addr addend = (Elf_Addr)0;
Elf_Word rtype = (Elf_Word)0, symidx;
- const Elf_Rel *rel;
+ const Elf_Rel *rel = NULL;
+ const Elf_Rela *rela = NULL;
/*
* Stash R_MIPS_HI16 info so we can use it when processing R_MIPS_LO16
*/
static Elf_Addr ahl;
- static Elf_Addr *where_hi16;
+ static Elf32_Addr *where_hi16;
switch (type) {
case ELF_RELOC_REL:
rel = (const Elf_Rel *)data;
- where = (Elf_Addr *) (relocbase + rel->r_offset);
- addend = *where;
+ where = (Elf32_Addr *) (relocbase + rel->r_offset);
rtype = ELF_R_TYPE(rel->r_info);
symidx = ELF_R_SYM(rel->r_info);
+ switch (rtype) {
+ case R_MIPS_64:
+ addend = *(Elf64_Addr *)where;
+ break;
+ default:
+ addend = *where;
+ break;
+ }
+
+ break;
+ case ELF_RELOC_RELA:
+ rela = (const Elf_Rela *)data;
+ where = (Elf32_Addr *) (relocbase + rela->r_offset);
+ addend = rela->r_addend;
+ rtype = ELF_R_TYPE(rela->r_info);
+ symidx = ELF_R_SYM(rela->r_info);
break;
default:
panic("unknown reloc type %d\n", type);
@@ -202,7 +218,7 @@ elf_reloc_internal(linker_file_t lf, Elf_Addr relocbase, const void *data,
return (-1);
addr += addend;
if (*where != addr)
- *where = addr;
+ *where = (Elf32_Addr)addr;
break;
case R_MIPS_26: /* ((A << 2) | (P & 0xf0000000) + S) >> 2 */
@@ -211,7 +227,11 @@ elf_reloc_internal(linker_file_t lf, Elf_Addr relocbase, const void *data,
return (-1);
addend &= 0x03ffffff;
- addend <<= 2;
+ /*
+ * Addendum for .rela R_MIPS_26 is not shifted right
+ */
+ if (rela == NULL)
+ addend <<= 2;
addr += ((Elf_Addr)where & 0xf0000000) | addend;
addr >>= 2;
@@ -220,25 +240,73 @@ elf_reloc_internal(linker_file_t lf, Elf_Addr relocbase, const void *data,
*where |= addr & 0x03ffffff;
break;
+ case R_MIPS_64: /* S + A */
+ addr = lookup(lf, symidx, 1);
+ if (addr == 0)
+ return (-1);
+ addr += addend;
+ if (*(Elf64_Addr*)where != addr)
+ *(Elf64_Addr*)where = addr;
+ break;
+
case R_MIPS_HI16: /* ((AHL + S) - ((short)(AHL + S)) >> 16 */
- ahl = addend << 16;
- where_hi16 = where;
+ if (rela != NULL) {
+ addr = lookup(lf, symidx, 1);
+ if (addr == 0)
+ return (-1);
+ addr += addend;
+ *where &= 0xffff0000;
+ *where |= ((((long long) addr + 0x8000LL) >> 16) & 0xffff);
+ }
+ else {
+ ahl = addend << 16;
+ where_hi16 = where;
+ }
break;
case R_MIPS_LO16: /* AHL + S */
- ahl += (int16_t)addend;
+ if (rela != NULL) {
+ addr = lookup(lf, symidx, 1);
+ if (addr == 0)
+ return (-1);
+ addr += addend;
+ *where &= 0xffff0000;
+ *where |= addr & 0xffff;
+ }
+ else {
+ ahl += (int16_t)addend;
+ addr = lookup(lf, symidx, 1);
+ if (addr == 0)
+ return (-1);
+
+ addend &= 0xffff0000;
+ addend |= (uint16_t)(ahl + addr);
+ *where = addend;
+
+ addend = *where_hi16;
+ addend &= 0xffff0000;
+ addend |= ((ahl + addr) - (int16_t)(ahl + addr)) >> 16;
+ *where_hi16 = addend;
+ }
+
+ break;
+
+ case R_MIPS_HIGHER: /* %higher(A+S) */
addr = lookup(lf, symidx, 1);
if (addr == 0)
return (-1);
+ addr += addend;
+ *where &= 0xffff0000;
+ *where |= (((long long)addr + 0x80008000LL) >> 32) & 0xffff;
+ break;
- addend &= 0xffff0000;
- addend |= (uint16_t)(ahl + addr);
- *where = addend;
-
- addend = *where_hi16;
- addend &= 0xffff0000;
- addend |= ((ahl + addr) - (int16_t)(ahl + addr)) >> 16;
- *where_hi16 = addend;
+ case R_MIPS_HIGHEST: /* %highest(A+S) */
+ addr = lookup(lf, symidx, 1);
+ if (addr == 0)
+ return (-1);
+ addr += addend;
+ *where &= 0xffff0000;
+ *where |= (((long long)addr + 0x800080008000LL) >> 48) & 0xffff;
break;
default:
@@ -246,6 +314,7 @@ elf_reloc_internal(linker_file_t lf, Elf_Addr relocbase, const void *data,
rtype);
return (-1);
}
+
return(0);
}
diff --git a/sys/mips/mips/exception.S b/sys/mips/mips/exception.S
index 8b7307c..b73b3d3 100644
--- a/sys/mips/mips/exception.S
+++ b/sys/mips/mips/exception.S
@@ -375,15 +375,15 @@ NNON_LEAF(MipsKernGenException, KERN_EXC_FRAME_SIZE, ra)
REG_S a3, CALLFRAME_RA + KERN_REG_SIZE(sp) # for debugging
/*
- * Update interrupt mask in saved status register
+ * Update interrupt and CPU mask in saved status register
* Some of interrupts could be disabled by
* intr filters if interrupts are enabled later
* in trap handler
*/
mfc0 a0, MIPS_COP_0_STATUS
- and a0, a0, MIPS_SR_INT_MASK
+ and a0, a0, (MIPS_SR_INT_MASK|MIPS_SR_COP_USABILITY)
RESTORE_REG(a1, SR, sp)
- and a1, a1, ~MIPS_SR_INT_MASK
+ and a1, a1, ~(MIPS_SR_INT_MASK|MIPS_SR_COP_USABILITY)
or a1, a1, a0
SAVE_REG(a1, SR, sp)
RESTORE_CPU # v0 contains the return address.
@@ -469,6 +469,7 @@ NNON_LEAF(MipsUserGenException, CALLFRAME_SIZ, ra)
# Turn off fpu and enter kernel mode
and t0, a0, ~(MIPS_SR_COP_1_BIT | MIPS_SR_EXL | MIPS3_SR_KSU_MASK | MIPS_SR_INT_IE)
#if defined(CPU_CNMIPS)
+ and t0, t0, ~(MIPS_SR_COP_2_BIT)
or t0, t0, (MIPS_SR_KX | MIPS_SR_SX | MIPS_SR_UX | MIPS_SR_PX)
#elif defined(CPU_RMI) || defined(CPU_NLM)
or t0, t0, (MIPS_SR_KX | MIPS_SR_UX | MIPS_SR_COP_2_BIT)
@@ -631,15 +632,15 @@ NNON_LEAF(MipsKernIntr, KERN_EXC_FRAME_SIZE, ra)
REG_S a3, CALLFRAME_RA + KERN_REG_SIZE(sp) # for debugging
/*
- * Update interrupt mask in saved status register
+ * Update interrupt and CPU mask in saved status register
* Some of interrupts could be disabled by
* intr filters if interrupts are enabled later
* in trap handler
*/
mfc0 a0, MIPS_COP_0_STATUS
- and a0, a0, MIPS_SR_INT_MASK
+ and a0, a0, (MIPS_SR_INT_MASK|MIPS_SR_COP_USABILITY)
RESTORE_REG(a1, SR, sp)
- and a1, a1, ~MIPS_SR_INT_MASK
+ and a1, a1, ~(MIPS_SR_INT_MASK|MIPS_SR_COP_USABILITY)
or a1, a1, a0
SAVE_REG(a1, SR, sp)
REG_L v0, CALLFRAME_RA + KERN_REG_SIZE(sp)
@@ -727,6 +728,7 @@ NNON_LEAF(MipsUserIntr, CALLFRAME_SIZ, ra)
# Turn off fpu, disable interrupts, set kernel mode kernel mode, clear exception level.
and t0, a0, ~(MIPS_SR_COP_1_BIT | MIPS_SR_EXL | MIPS_SR_INT_IE | MIPS3_SR_KSU_MASK)
#ifdef CPU_CNMIPS
+ and t0, t0, ~(MIPS_SR_COP_2_BIT)
or t0, t0, (MIPS_SR_KX | MIPS_SR_SX | MIPS_SR_UX | MIPS_SR_PX)
#elif defined(CPU_RMI) || defined(CPU_NLM)
or t0, t0, (MIPS_SR_KX | MIPS_SR_UX | MIPS_SR_COP_2_BIT)
diff --git a/sys/mips/mips/gdb_machdep.c b/sys/mips/mips/gdb_machdep.c
index 780a4f1..e8702f4 100644
--- a/sys/mips/mips/gdb_machdep.c
+++ b/sys/mips/mips/gdb_machdep.c
@@ -116,7 +116,7 @@ gdb_cpu_getreg(int regnum, size_t *regsz)
{
*regsz = gdb_cpu_regsz(regnum);
- if (kdb_thread == PCPU_GET(curthread)) {
+ if (kdb_thread == curthread) {
register_t *zero_ptr = &kdb_frame->zero;
return zero_ptr + regnum;
}
@@ -154,7 +154,7 @@ gdb_cpu_setreg(int regnum, void *val)
switch (regnum) {
case GDB_REG_PC:
kdb_thrctx->pcb_context[10] = *(register_t *)val;
- if (kdb_thread == PCPU_GET(curthread))
+ if (kdb_thread == curthread)
kdb_frame->pc = *(register_t *)val;
}
}
diff --git a/sys/mips/mips/genassym.c b/sys/mips/mips/genassym.c
index 2cb046d..58b1d86 100644
--- a/sys/mips/mips/genassym.c
+++ b/sys/mips/mips/genassym.c
@@ -58,11 +58,14 @@ __FBSDID("$FreeBSD$");
#include <machine/sigframe.h>
#include <machine/proc.h>
+#ifdef CPU_CNMIPS
+#include <machine/octeon_cop2.h>
+#endif
+
#ifndef offsetof
#define offsetof(t,m) (int)((&((t *)0L)->m))
#endif
-
ASSYM(TD_PCB, offsetof(struct thread, td_pcb));
ASSYM(TD_UPTE, offsetof(struct thread, td_md.md_upte));
ASSYM(TD_KSTACK, offsetof(struct thread, td_kstack));
@@ -70,6 +73,7 @@ ASSYM(TD_FLAGS, offsetof(struct thread, td_flags));
ASSYM(TD_LOCK, offsetof(struct thread, td_lock));
ASSYM(TD_FRAME, offsetof(struct thread, td_frame));
ASSYM(TD_TLS, offsetof(struct thread, td_md.md_tls));
+ASSYM(TD_MDFLAGS, offsetof(struct thread, td_md.md_flags));
ASSYM(TF_REG_SR, offsetof(struct trapframe, sr));
@@ -99,8 +103,73 @@ ASSYM(TDF_NEEDRESCHED, TDF_NEEDRESCHED);
ASSYM(TDF_ASTPENDING, TDF_ASTPENDING);
ASSYM(PCPU_SIZE, sizeof(struct pcpu));
ASSYM(MAXCOMLEN, MAXCOMLEN);
+ASSYM(MDTD_COP2USED, MDTD_COP2USED);
ASSYM(MIPS_KSEG0_START, MIPS_KSEG0_START);
ASSYM(MIPS_KSEG1_START, MIPS_KSEG1_START);
ASSYM(MIPS_KSEG2_START, MIPS_KSEG2_START);
ASSYM(MIPS_XKSEG_START, MIPS_XKSEG_START);
+
+#ifdef CPU_CNMIPS
+ASSYM(TD_COP2OWNER, offsetof(struct thread, td_md.md_cop2owner));
+ASSYM(TD_COP2, offsetof(struct thread, td_md.md_cop2));
+ASSYM(TD_UCOP2, offsetof(struct thread, td_md.md_ucop2));
+ASSYM(COP2_CRC_IV_OFFSET, offsetof(struct octeon_cop2_state, crc_iv));
+ASSYM(COP2_CRC_LENGTH_OFFSET, offsetof(struct octeon_cop2_state, crc_length));
+ASSYM(COP2_CRC_POLY_OFFSET, offsetof(struct octeon_cop2_state, crc_poly));
+ASSYM(COP2_LLM_DAT0_OFFSET, offsetof(struct octeon_cop2_state, llm_dat));
+ASSYM(COP2_LLM_DAT1_OFFSET, offsetof(struct octeon_cop2_state, llm_dat) + 8);
+ASSYM(COP2_3DES_IV_OFFSET, offsetof(struct octeon_cop2_state, _3des_iv));
+ASSYM(COP2_3DES_KEY0_OFFSET, offsetof(struct octeon_cop2_state, _3des_key));
+ASSYM(COP2_3DES_KEY1_OFFSET, offsetof(struct octeon_cop2_state, _3des_key) + 8);
+ASSYM(COP2_3DES_KEY2_OFFSET, offsetof(struct octeon_cop2_state, _3des_key) + 16);
+ASSYM(COP2_3DES_RESULT_OFFSET, offsetof(struct octeon_cop2_state, _3des_result));
+ASSYM(COP2_AES_INP0_OFFSET, offsetof(struct octeon_cop2_state, aes_inp0));
+ASSYM(COP2_AES_IV0_OFFSET, offsetof(struct octeon_cop2_state, aes_iv));
+ASSYM(COP2_AES_IV1_OFFSET, offsetof(struct octeon_cop2_state, aes_iv) + 8);
+ASSYM(COP2_AES_KEY0_OFFSET, offsetof(struct octeon_cop2_state, aes_key));
+ASSYM(COP2_AES_KEY1_OFFSET, offsetof(struct octeon_cop2_state, aes_key) + 8);
+ASSYM(COP2_AES_KEY2_OFFSET, offsetof(struct octeon_cop2_state, aes_key) + 16);
+ASSYM(COP2_AES_KEY3_OFFSET, offsetof(struct octeon_cop2_state, aes_key) + 24);
+ASSYM(COP2_AES_KEYLEN_OFFSET, offsetof(struct octeon_cop2_state, aes_keylen));
+ASSYM(COP2_AES_RESULT0_OFFSET, offsetof(struct octeon_cop2_state, aes_result));
+ASSYM(COP2_AES_RESULT1_OFFSET, offsetof(struct octeon_cop2_state, aes_result) + 8);
+ASSYM(COP2_HSH_DATW0_OFFSET, offsetof(struct octeon_cop2_state, hsh_datw));
+ASSYM(COP2_HSH_DATW1_OFFSET, offsetof(struct octeon_cop2_state, hsh_datw) + 8);
+ASSYM(COP2_HSH_DATW2_OFFSET, offsetof(struct octeon_cop2_state, hsh_datw) + 16);
+ASSYM(COP2_HSH_DATW3_OFFSET, offsetof(struct octeon_cop2_state, hsh_datw) + 24);
+ASSYM(COP2_HSH_DATW4_OFFSET, offsetof(struct octeon_cop2_state, hsh_datw) + 32);
+ASSYM(COP2_HSH_DATW5_OFFSET, offsetof(struct octeon_cop2_state, hsh_datw) + 40);
+ASSYM(COP2_HSH_DATW6_OFFSET, offsetof(struct octeon_cop2_state, hsh_datw) + 48);
+ASSYM(COP2_HSH_DATW7_OFFSET, offsetof(struct octeon_cop2_state, hsh_datw) + 56);
+ASSYM(COP2_HSH_DATW8_OFFSET, offsetof(struct octeon_cop2_state, hsh_datw) + 64);
+ASSYM(COP2_HSH_DATW9_OFFSET, offsetof(struct octeon_cop2_state, hsh_datw) + 72);
+ASSYM(COP2_HSH_DATW10_OFFSET, offsetof(struct octeon_cop2_state, hsh_datw) + 80);
+ASSYM(COP2_HSH_DATW11_OFFSET, offsetof(struct octeon_cop2_state, hsh_datw) + 88);
+ASSYM(COP2_HSH_DATW12_OFFSET, offsetof(struct octeon_cop2_state, hsh_datw) + 96);
+ASSYM(COP2_HSH_DATW13_OFFSET, offsetof(struct octeon_cop2_state, hsh_datw) + 104);
+ASSYM(COP2_HSH_DATW14_OFFSET, offsetof(struct octeon_cop2_state, hsh_datw) + 112);
+ASSYM(COP2_HSH_IVW0_OFFSET, offsetof(struct octeon_cop2_state, hsh_ivw));
+ASSYM(COP2_HSH_IVW1_OFFSET, offsetof(struct octeon_cop2_state, hsh_ivw) + 8);
+ASSYM(COP2_HSH_IVW2_OFFSET, offsetof(struct octeon_cop2_state, hsh_ivw) + 16);
+ASSYM(COP2_HSH_IVW3_OFFSET, offsetof(struct octeon_cop2_state, hsh_ivw) + 24);
+ASSYM(COP2_HSH_IVW4_OFFSET, offsetof(struct octeon_cop2_state, hsh_ivw) + 32);
+ASSYM(COP2_HSH_IVW5_OFFSET, offsetof(struct octeon_cop2_state, hsh_ivw) + 40);
+ASSYM(COP2_HSH_IVW6_OFFSET, offsetof(struct octeon_cop2_state, hsh_ivw) + 48);
+ASSYM(COP2_HSH_IVW7_OFFSET, offsetof(struct octeon_cop2_state, hsh_ivw) + 56);
+ASSYM(COP2_GFM_MULT0_OFFSET, offsetof(struct octeon_cop2_state, gfm_mult));
+ASSYM(COP2_GFM_MULT1_OFFSET, offsetof(struct octeon_cop2_state, gfm_mult) + 8);
+ASSYM(COP2_GFM_POLY_OFFSET, offsetof(struct octeon_cop2_state, gfm_poly));
+ASSYM(COP2_GFM_RESULT0_OFFSET, offsetof(struct octeon_cop2_state, gfm_result));
+ASSYM(COP2_GFM_RESULT1_OFFSET, offsetof(struct octeon_cop2_state, gfm_result) + 8);
+ASSYM(COP2_HSH_DATW0_PASS1_OFFSET, offsetof(struct octeon_cop2_state, hsh_datw));
+ASSYM(COP2_HSH_DATW1_PASS1_OFFSET, offsetof(struct octeon_cop2_state, hsh_datw) + 8);
+ASSYM(COP2_HSH_DATW2_PASS1_OFFSET, offsetof(struct octeon_cop2_state, hsh_datw) + 16);
+ASSYM(COP2_HSH_DATW3_PASS1_OFFSET, offsetof(struct octeon_cop2_state, hsh_datw) + 24);
+ASSYM(COP2_HSH_DATW4_PASS1_OFFSET, offsetof(struct octeon_cop2_state, hsh_datw) + 32);
+ASSYM(COP2_HSH_DATW5_PASS1_OFFSET, offsetof(struct octeon_cop2_state, hsh_datw) + 40);
+ASSYM(COP2_HSH_DATW6_PASS1_OFFSET, offsetof(struct octeon_cop2_state, hsh_datw) + 48);
+ASSYM(COP2_HSH_IVW0_PASS1_OFFSET, offsetof(struct octeon_cop2_state, hsh_ivw));
+ASSYM(COP2_HSH_IVW1_PASS1_OFFSET, offsetof(struct octeon_cop2_state, hsh_ivw) + 8);
+ASSYM(COP2_HSH_IVW2_PASS1_OFFSET, offsetof(struct octeon_cop2_state, hsh_ivw) + 16);
+#endif
diff --git a/sys/mips/mips/locore.S b/sys/mips/mips/locore.S
index 4b28f19..c6e78a2 100644
--- a/sys/mips/mips/locore.S
+++ b/sys/mips/mips/locore.S
@@ -95,10 +95,10 @@ VECTOR(_locore, unknown)
*/
/* Set these bits */
- li t1, (MIPS_SR_COP_2_BIT | MIPS_SR_COP_0_BIT | MIPS_SR_PX | MIPS_SR_KX | MIPS_SR_UX | MIPS_SR_SX | MIPS_SR_BEV)
+ li t1, (MIPS_SR_COP_0_BIT | MIPS_SR_PX | MIPS_SR_KX | MIPS_SR_UX | MIPS_SR_SX | MIPS_SR_BEV)
/* Reset these bits */
- li t0, ~(MIPS_SR_DE | MIPS_SR_SOFT_RESET | MIPS_SR_ERL | MIPS_SR_EXL | MIPS_SR_INT_IE)
+ li t0, ~(MIPS_SR_DE | MIPS_SR_SOFT_RESET | MIPS_SR_ERL | MIPS_SR_EXL | MIPS_SR_INT_IE | MIPS_SR_COP_2_BIT)
#elif defined (CPU_RMI) || defined (CPU_NLM)
/* Set these bits */
li t1, (MIPS_SR_COP_2_BIT | MIPS_SR_COP_0_BIT | MIPS_SR_KX | MIPS_SR_UX)
diff --git a/sys/mips/mips/octeon_cop2.c b/sys/mips/mips/octeon_cop2.c
new file mode 100644
index 0000000..c85522d
--- /dev/null
+++ b/sys/mips/mips/octeon_cop2.c
@@ -0,0 +1,62 @@
+/*-
+ * Copyright (c) 2011, Oleksandr Tymoshenko <gonzo@FreeBSD.org>
+ * 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 unmodified, 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/types.h>
+#include <sys/systm.h>
+#include <sys/param.h>
+#include <sys/kernel.h>
+#include <vm/uma.h>
+
+#include <machine/octeon_cop2.h>
+
+static uma_zone_t ctxzone;
+
+static void
+octeon_cop2_init(void* dummy)
+{
+ printf("Create COP2 context zone\n");
+ ctxzone = uma_zcreate("COP2 context",
+ sizeof(struct octeon_cop2_state),
+ NULL, NULL, NULL, NULL, 8, 0);
+}
+
+struct octeon_cop2_state *
+octeon_cop2_alloc_ctx()
+{
+ return uma_zalloc(ctxzone, M_NOWAIT);
+}
+
+void
+octeon_cop2_free_ctx(struct octeon_cop2_state *ctx)
+{
+ uma_zfree(ctxzone, ctx);
+}
+
+SYSINIT(octeon_cop2, SI_SUB_CPU, SI_ORDER_FIRST, octeon_cop2_init, NULL);
diff --git a/sys/mips/mips/octeon_cop2_swtch.S b/sys/mips/mips/octeon_cop2_swtch.S
new file mode 100644
index 0000000..688db6b
--- /dev/null
+++ b/sys/mips/mips/octeon_cop2_swtch.S
@@ -0,0 +1,246 @@
+/*-
+ * Copyright (c) 2011 Oleksandr Tymoshenko
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ */
+
+#include <machine/asm.h>
+#include <machine/cpuregs.h>
+#include <machine/octeon_cop2.h>
+
+#include "assym.s"
+
+.set noreorder
+
+#define SAVE_COP2_REGISTER(reg) \
+ dmfc2 t1, reg; sd t1, reg##_OFFSET(a0)
+
+
+#define RESTORE_COP2_REGISTER(reg) \
+ ld t1, reg##_OFFSET(a0); dmtc2 t1, reg##_SET
+
+LEAF(octeon_cop2_save)
+
+ /* save original cop2 status in t2*/
+ mfc0 t2, MIPS_COP_0_STATUS
+ or t0, t2, MIPS_SR_COP_2_BIT
+ and t0, t0, ~MIPS_SR_INT_IE
+ mtc0 t0, MIPS_COP_0_STATUS
+
+ /* Get CvmCtl register */
+ dmfc0 t0, $9, 7
+
+ /* CRC state */
+ SAVE_COP2_REGISTER(COP2_CRC_IV)
+ SAVE_COP2_REGISTER(COP2_CRC_LENGTH)
+ SAVE_COP2_REGISTER(COP2_CRC_POLY)
+
+ /* if CvmCtl[NODFA_CP2] -> save_nodfa */
+ bbit1 t0, 28, save_nodfa
+ nop
+
+ /* LLM state */
+ SAVE_COP2_REGISTER(COP2_LLM_DAT0)
+ SAVE_COP2_REGISTER(COP2_LLM_DAT1)
+
+save_nodfa:
+ /* crypto stuff is irrelevant if CvmCtl[NOCRYPTO] */
+ bbit1 t0, 26, save_done
+ nop
+
+ SAVE_COP2_REGISTER(COP2_3DES_IV)
+ SAVE_COP2_REGISTER(COP2_3DES_KEY0)
+ SAVE_COP2_REGISTER(COP2_3DES_KEY1)
+ SAVE_COP2_REGISTER(COP2_3DES_KEY2)
+ SAVE_COP2_REGISTER(COP2_3DES_RESULT)
+
+ SAVE_COP2_REGISTER(COP2_AES_INP0)
+ SAVE_COP2_REGISTER(COP2_AES_IV0)
+ SAVE_COP2_REGISTER(COP2_AES_IV1)
+ SAVE_COP2_REGISTER(COP2_AES_KEY0)
+ SAVE_COP2_REGISTER(COP2_AES_KEY1)
+ SAVE_COP2_REGISTER(COP2_AES_KEY2)
+ SAVE_COP2_REGISTER(COP2_AES_KEY3)
+ SAVE_COP2_REGISTER(COP2_AES_KEYLEN)
+ SAVE_COP2_REGISTER(COP2_AES_RESULT0)
+ SAVE_COP2_REGISTER(COP2_AES_RESULT1)
+
+ dmfc0 t0, $15
+ li t1, 0x000d0000 /* Octeon Pass1 */
+ beq t0, t1, save_pass1
+ nop
+
+ SAVE_COP2_REGISTER(COP2_HSH_DATW0)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW1)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW2)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW3)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW4)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW5)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW6)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW7)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW8)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW9)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW10)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW11)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW12)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW13)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW14)
+ SAVE_COP2_REGISTER(COP2_HSH_IVW0)
+ SAVE_COP2_REGISTER(COP2_HSH_IVW1)
+ SAVE_COP2_REGISTER(COP2_HSH_IVW2)
+ SAVE_COP2_REGISTER(COP2_HSH_IVW3)
+ SAVE_COP2_REGISTER(COP2_HSH_IVW4)
+ SAVE_COP2_REGISTER(COP2_HSH_IVW5)
+ SAVE_COP2_REGISTER(COP2_HSH_IVW6)
+ SAVE_COP2_REGISTER(COP2_HSH_IVW7)
+ SAVE_COP2_REGISTER(COP2_GFM_MULT0)
+ SAVE_COP2_REGISTER(COP2_GFM_MULT1)
+ SAVE_COP2_REGISTER(COP2_GFM_POLY)
+ SAVE_COP2_REGISTER(COP2_GFM_RESULT0)
+ SAVE_COP2_REGISTER(COP2_GFM_RESULT1)
+ /* restore saved COP2 status */
+ mtc0 t2, MIPS_COP_0_STATUS
+ jr ra
+ nop
+
+save_pass1:
+ SAVE_COP2_REGISTER(COP2_HSH_DATW0_PASS1)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW1_PASS1)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW2_PASS1)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW3_PASS1)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW4_PASS1)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW5_PASS1)
+ SAVE_COP2_REGISTER(COP2_HSH_DATW6_PASS1)
+ SAVE_COP2_REGISTER(COP2_HSH_IVW0_PASS1)
+ SAVE_COP2_REGISTER(COP2_HSH_IVW1_PASS1)
+ SAVE_COP2_REGISTER(COP2_HSH_IVW2_PASS1)
+
+save_done:
+ /* restore saved COP2 status */
+ mtc0 t2, MIPS_COP_0_STATUS
+ jr ra
+ nop
+END(octeon_cop2_save)
+
+LEAF(octeon_cop2_restore)
+ /* save original cop2 status in t2*/
+ mfc0 t2, MIPS_COP_0_STATUS
+ or t0, t2, MIPS_SR_COP_2_BIT
+ and t0, t0, ~MIPS_SR_INT_IE
+ mtc0 t0, MIPS_COP_0_STATUS
+ /* Get CvmCtl register */
+ dmfc0 t0, $9, 7
+
+ /* CRC state */
+ RESTORE_COP2_REGISTER(COP2_CRC_IV)
+ RESTORE_COP2_REGISTER(COP2_CRC_LENGTH)
+ RESTORE_COP2_REGISTER(COP2_CRC_POLY)
+
+ /* if CvmCtl[NODFA_CP2] -> save_nodfa */
+ bbit1 t0, 28, restore_nodfa
+ nop
+
+ /* LLM state */
+ RESTORE_COP2_REGISTER(COP2_LLM_DAT0)
+ RESTORE_COP2_REGISTER(COP2_LLM_DAT1)
+
+restore_nodfa:
+ /* crypto stuff is irrelevant if CvmCtl[NOCRYPTO] */
+ bbit1 t0, 26, restore_done
+ nop
+
+ RESTORE_COP2_REGISTER(COP2_3DES_IV)
+ RESTORE_COP2_REGISTER(COP2_3DES_KEY0)
+ RESTORE_COP2_REGISTER(COP2_3DES_KEY1)
+ RESTORE_COP2_REGISTER(COP2_3DES_KEY2)
+ RESTORE_COP2_REGISTER(COP2_3DES_RESULT)
+
+ RESTORE_COP2_REGISTER(COP2_AES_INP0)
+ RESTORE_COP2_REGISTER(COP2_AES_IV0)
+ RESTORE_COP2_REGISTER(COP2_AES_IV1)
+ RESTORE_COP2_REGISTER(COP2_AES_KEY0)
+ RESTORE_COP2_REGISTER(COP2_AES_KEY1)
+ RESTORE_COP2_REGISTER(COP2_AES_KEY2)
+ RESTORE_COP2_REGISTER(COP2_AES_KEY3)
+ RESTORE_COP2_REGISTER(COP2_AES_KEYLEN)
+ RESTORE_COP2_REGISTER(COP2_AES_RESULT0)
+ RESTORE_COP2_REGISTER(COP2_AES_RESULT1)
+
+ dmfc0 t0, $15
+ li t1, 0x000d0000 /* Octeon Pass1 */
+ beq t0, t1, restore_pass1
+ nop
+
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW0)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW1)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW2)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW3)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW4)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW5)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW6)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW7)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW8)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW9)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW10)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW11)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW12)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW13)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW14)
+ RESTORE_COP2_REGISTER(COP2_HSH_IVW0)
+ RESTORE_COP2_REGISTER(COP2_HSH_IVW1)
+ RESTORE_COP2_REGISTER(COP2_HSH_IVW2)
+ RESTORE_COP2_REGISTER(COP2_HSH_IVW3)
+ RESTORE_COP2_REGISTER(COP2_HSH_IVW4)
+ RESTORE_COP2_REGISTER(COP2_HSH_IVW5)
+ RESTORE_COP2_REGISTER(COP2_HSH_IVW6)
+ RESTORE_COP2_REGISTER(COP2_HSH_IVW7)
+ RESTORE_COP2_REGISTER(COP2_GFM_MULT0)
+ RESTORE_COP2_REGISTER(COP2_GFM_MULT1)
+ RESTORE_COP2_REGISTER(COP2_GFM_POLY)
+ RESTORE_COP2_REGISTER(COP2_GFM_RESULT0)
+ RESTORE_COP2_REGISTER(COP2_GFM_RESULT1)
+ /* restore saved COP2 status */
+ mtc0 t2, MIPS_COP_0_STATUS
+ jr ra
+ nop
+
+restore_pass1:
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW0_PASS1)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW1_PASS1)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW2_PASS1)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW3_PASS1)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW4_PASS1)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW5_PASS1)
+ RESTORE_COP2_REGISTER(COP2_HSH_DATW6_PASS1)
+ RESTORE_COP2_REGISTER(COP2_HSH_IVW0_PASS1)
+ RESTORE_COP2_REGISTER(COP2_HSH_IVW1_PASS1)
+ RESTORE_COP2_REGISTER(COP2_HSH_IVW2_PASS1)
+
+restore_done:
+ /* restore saved COP2 status */
+ mtc0 t2, MIPS_COP_0_STATUS
+ jr ra
+ nop
+END(octeon_cop2_restore)
diff --git a/sys/mips/mips/pm_machdep.c b/sys/mips/mips/pm_machdep.c
index d730ccb..d136f5f 100644
--- a/sys/mips/mips/pm_machdep.c
+++ b/sys/mips/mips/pm_machdep.c
@@ -520,7 +520,7 @@ exec_setregs(struct thread *td, struct image_params *imgp, u_long stack)
td->td_frame->sr |= MIPS_SR_PX | MIPS_SR_UX | MIPS_SR_KX;
#endif
#ifdef CPU_CNMIPS
- td->td_frame->sr |= MIPS_SR_COP_2_BIT | MIPS_SR_PX | MIPS_SR_UX |
+ td->td_frame->sr |= MIPS_SR_PX | MIPS_SR_UX |
MIPS_SR_KX | MIPS_SR_SX;
#endif
/*
diff --git a/sys/mips/mips/support.S b/sys/mips/mips/support.S
index 6623d0a..9173f49 100644
--- a/sys/mips/mips/support.S
+++ b/sys/mips/mips/support.S
@@ -1340,6 +1340,25 @@ LEAF(kdbpeek)
PTR_S zero, U_PCB_ONFAULT(t1)
END(kdbpeek)
+LEAF(kdbpeekd)
+ PTR_LA v1, ddberr
+ and v0, a0, 3 # unaligned ?
+ GET_CPU_PCPU(t1)
+ PTR_L t1, PC_CURPCB(t1)
+ bne v0, zero, 1f
+ PTR_S v1, U_PCB_ONFAULT(t1)
+
+ ld v0, (a0)
+ jr ra
+ PTR_S zero, U_PCB_ONFAULT(t1)
+
+1:
+ REG_LHI v0, 0(a0)
+ REG_LLO v0, 7(a0)
+ jr ra
+ PTR_S zero, U_PCB_ONFAULT(t1)
+END(kdbpeekd)
+
ddberr:
jr ra
nop
diff --git a/sys/mips/mips/swtch.S b/sys/mips/mips/swtch.S
index 699c206..8b285dd 100644
--- a/sys/mips/mips/swtch.S
+++ b/sys/mips/mips/swtch.S
@@ -250,6 +250,61 @@ NON_LEAF(cpu_switch, CALLFRAME_SIZ, ra)
getpc:
SAVE_U_PCB_CONTEXT(ra, PREG_PC, a0) # save return address
+#ifdef CPU_CNMIPS
+
+ lw t2, TD_MDFLAGS(a3) # get md_flags
+ and t1, t2, MDTD_COP2USED
+ beqz t1, cop2_untouched
+ nop
+
+ /* Clear cop2used flag */
+ and t2, t2, ~MDTD_COP2USED
+ sw t2, TD_MDFLAGS(a3)
+
+ and t2, t0, ~MIPS_SR_COP_2_BIT # clear COP_2 enable bit
+ SAVE_U_PCB_CONTEXT(t2, PREG_SR, a0) # save status register
+
+ RESTORE_U_PCB_REG(t0, PS, a0) # get CPU status register
+ and t2, t0, ~MIPS_SR_COP_2_BIT # clear COP_2 enable bit
+ SAVE_U_PCB_REG(t2, PS, a0) # save stratus register
+
+ /* preserve a0..a3 */
+ move s0, a0
+ move s1, a1
+ move s2, a2
+ move s3, a3
+
+ /* does kernel own COP2 context? */
+ lw t1, TD_COP2OWNER(a3) # get md_cop2owner
+ beqz t1, userland_cop2 # 0 - it's userland context
+ nop
+
+ PTR_L a0, TD_COP2(a3)
+ beqz a0, no_cop2_context
+ nop
+
+ j do_cop2_save
+ nop
+
+userland_cop2:
+
+ PTR_L a0, TD_UCOP2(a3)
+ beqz a0, no_cop2_context
+ nop
+
+do_cop2_save:
+ jal octeon_cop2_save
+ nop
+
+no_cop2_context:
+ move a3, s3
+ move a2, s2
+ move a1, s1
+ move a0, s0
+
+cop2_untouched:
+#endif
+
PTR_S a2, TD_LOCK(a3) # Switchout td_lock
mips_sw1:
diff --git a/sys/mips/mips/trap.c b/sys/mips/mips/trap.c
index 97374a7..3b632d0 100644
--- a/sys/mips/mips/trap.c
+++ b/sys/mips/mips/trap.c
@@ -251,6 +251,9 @@ char *access_name[] = {
"Store Doubleword"
};
+#ifdef CPU_CNMIPS
+#include <machine/octeon_cop2.h>
+#endif
static int allow_unaligned_acc = 1;
@@ -410,6 +413,7 @@ trap(struct trapframe *trapframe)
char *msg = NULL;
intptr_t addr = 0;
register_t pc;
+ int cop;
trapdebug_enter(trapframe, 0);
@@ -767,28 +771,91 @@ dofault:
goto err;
break;
case T_COP_UNUSABLE:
+#ifdef CPU_CNMIPS
+ cop = (trapframe->cause & MIPS_CR_COP_ERR) >> MIPS_CR_COP_ERR_SHIFT;
+ /* Handle only COP2 exception */
+ if (cop != 2)
+ goto err;
+
+ addr = trapframe->pc;
+ /* save userland cop2 context if it has been touched */
+ if ((td->td_md.md_flags & MDTD_COP2USED) &&
+ (td->td_md.md_cop2owner == COP2_OWNER_USERLAND)) {
+ if (td->td_md.md_ucop2)
+ octeon_cop2_save(td->td_md.md_ucop2);
+ else
+ panic("COP2 was used in user mode but md_ucop2 is NULL");
+ }
+
+ if (td->td_md.md_cop2 == NULL) {
+ td->td_md.md_cop2 = octeon_cop2_alloc_ctx();
+ if (td->td_md.md_cop2 == NULL)
+ panic("Failed to allocate COP2 context");
+ memset(td->td_md.md_cop2, 0, sizeof(*td->td_md.md_cop2));
+ }
+
+ octeon_cop2_restore(td->td_md.md_cop2);
+
+ /* Make userland re-request its context */
+ td->td_frame->sr &= ~MIPS_SR_COP_2_BIT;
+ td->td_md.md_flags |= MDTD_COP2USED;
+ td->td_md.md_cop2owner = COP2_OWNER_KERNEL;
+ /* Enable COP2, it will be disabled in cpu_switch */
+ mips_wr_status(mips_rd_status() | MIPS_SR_COP_2_BIT);
+ return (trapframe->pc);
+#else
goto err;
break;
+#endif
+
case T_COP_UNUSABLE + T_USER:
+ cop = (trapframe->cause & MIPS_CR_COP_ERR) >> MIPS_CR_COP_ERR_SHIFT;
+ if (cop == 1) {
#if !defined(CPU_HAVEFPU)
/* FP (COP1) instruction */
- if ((trapframe->cause & MIPS_CR_COP_ERR) == 0x10000000) {
log_illegal_instruction("COP1_UNUSABLE", trapframe);
i = SIGILL;
break;
+#else
+ addr = trapframe->pc;
+ MipsSwitchFPState(PCPU_GET(fpcurthread), td->td_frame);
+ PCPU_SET(fpcurthread, td);
+ td->td_frame->sr |= MIPS_SR_COP_1_BIT;
+ td->td_md.md_flags |= MDTD_FPUSED;
+ goto out;
+#endif
+ }
+#ifdef CPU_CNMIPS
+ else if (cop == 2) {
+ addr = trapframe->pc;
+ if ((td->td_md.md_flags & MDTD_COP2USED) &&
+ (td->td_md.md_cop2owner == COP2_OWNER_KERNEL)) {
+ if (td->td_md.md_cop2)
+ octeon_cop2_save(td->td_md.md_cop2);
+ else
+ panic("COP2 was used in kernel mode but md_cop2 is NULL");
+ }
+
+ if (td->td_md.md_ucop2 == NULL) {
+ td->td_md.md_ucop2 = octeon_cop2_alloc_ctx();
+ if (td->td_md.md_ucop2 == NULL)
+ panic("Failed to allocate userland COP2 context");
+ memset(td->td_md.md_ucop2, 0, sizeof(*td->td_md.md_ucop2));
+ }
+
+ octeon_cop2_restore(td->td_md.md_ucop2);
+
+ td->td_frame->sr |= MIPS_SR_COP_2_BIT;
+ td->td_md.md_flags |= MDTD_COP2USED;
+ td->td_md.md_cop2owner = COP2_OWNER_USERLAND;
+ goto out;
}
#endif
- if ((trapframe->cause & MIPS_CR_COP_ERR) != 0x10000000) {
+ else {
log_illegal_instruction("COPn_UNUSABLE", trapframe);
i = SIGILL; /* only FPU instructions allowed */
break;
}
- addr = trapframe->pc;
- MipsSwitchFPState(PCPU_GET(fpcurthread), td->td_frame);
- PCPU_SET(fpcurthread, td);
- td->td_frame->sr |= MIPS_SR_COP_1_BIT;
- td->td_md.md_flags |= MDTD_FPUSED;
- goto out;
case T_FPE:
#if !defined(SMP) && (defined(DDB) || defined(DEBUG))
diff --git a/sys/mips/mips/vm_machdep.c b/sys/mips/mips/vm_machdep.c
index 47058ee..bdd73e7 100644
--- a/sys/mips/mips/vm_machdep.c
+++ b/sys/mips/mips/vm_machdep.c
@@ -163,7 +163,36 @@ cpu_fork(register struct thread *td1,register struct proc *p2,
td2->td_md.md_saved_intr = MIPS_SR_INT_IE;
td2->td_md.md_spinlock_count = 1;
#ifdef CPU_CNMIPS
- pcb2->pcb_context[PCB_REG_SR] |= MIPS_SR_COP_2_BIT | MIPS_SR_PX | MIPS_SR_UX | MIPS_SR_KX | MIPS_SR_SX;
+ if (td1->td_md.md_flags & MDTD_COP2USED) {
+ if (td1->td_md.md_cop2owner == COP2_OWNER_USERLAND) {
+ if (td1->td_md.md_ucop2)
+ octeon_cop2_save(td1->td_md.md_ucop2);
+ else
+ panic("cpu_fork: ucop2 is NULL but COP2 is enabled");
+ }
+ else {
+ if (td1->td_md.md_cop2)
+ octeon_cop2_save(td1->td_md.md_cop2);
+ else
+ panic("cpu_fork: cop2 is NULL but COP2 is enabled");
+ }
+ }
+
+ if (td1->td_md.md_cop2) {
+ td2->td_md.md_cop2 = octeon_cop2_alloc_ctx();
+ memcpy(td2->td_md.md_cop2, td1->td_md.md_cop2,
+ sizeof(*td1->td_md.md_cop2));
+ }
+ if (td1->td_md.md_ucop2) {
+ td2->td_md.md_ucop2 = octeon_cop2_alloc_ctx();
+ memcpy(td2->td_md.md_ucop2, td1->td_md.md_ucop2,
+ sizeof(*td1->td_md.md_ucop2));
+ }
+ td2->td_md.md_cop2owner = td1->td_md.md_cop2owner;
+ pcb2->pcb_context[PCB_REG_SR] |= MIPS_SR_PX | MIPS_SR_UX | MIPS_SR_KX | MIPS_SR_SX;
+ /* Clear COP2 bits for userland & kernel */
+ td2->td_frame->sr &= ~MIPS_SR_COP_2_BIT;
+ pcb2->pcb_context[PCB_REG_SR] &= ~MIPS_SR_COP_2_BIT;
#endif
}
@@ -195,11 +224,27 @@ cpu_thread_exit(struct thread *td)
if (PCPU_GET(fpcurthread) == td)
PCPU_GET(fpcurthread) = (struct thread *)0;
+#ifdef CPU_CNMIPS
+ if (td->td_md.md_cop2)
+ memset(td->td_md.md_cop2, 0,
+ sizeof(*td->td_md.md_cop2));
+ if (td->td_md.md_ucop2)
+ memset(td->td_md.md_ucop2, 0,
+ sizeof(*td->td_md.md_ucop2));
+#endif
}
void
cpu_thread_free(struct thread *td)
{
+#ifdef CPU_CNMIPS
+ if (td->td_md.md_cop2)
+ octeon_cop2_free_ctx(td->td_md.md_cop2);
+ if (td->td_md.md_ucop2)
+ octeon_cop2_free_ctx(td->td_md.md_ucop2);
+ td->td_md.md_cop2 = NULL;
+ td->td_md.md_ucop2 = NULL;
+#endif
}
void
@@ -357,7 +402,7 @@ cpu_set_upcall(struct thread *td, struct thread *td0)
(MIPS_SR_KX | MIPS_SR_UX | MIPS_SR_INT_MASK);
#ifdef CPU_CNMIPS
- pcb2->pcb_context[PCB_REG_SR] |= MIPS_SR_COP_2_BIT | MIPS_SR_COP_0_BIT |
+ pcb2->pcb_context[PCB_REG_SR] |= MIPS_SR_COP_0_BIT |
MIPS_SR_PX | MIPS_SR_UX | MIPS_SR_KX | MIPS_SR_SX;
#endif
diff --git a/sys/mips/rmi/xls_ehci.c b/sys/mips/rmi/xls_ehci.c
index 4870872..c4ae065 100644
--- a/sys/mips/rmi/xls_ehci.c
+++ b/sys/mips/rmi/xls_ehci.c
@@ -69,50 +69,8 @@ __FBSDID("$FreeBSD$");
#include <dev/usb/controller/ehcireg.h>
#include <mips/rmi/pic.h>
-static int ehci_xls_attach(device_t self);
-static int ehci_xls_detach(device_t self);
-static int ehci_xls_shutdown(device_t self);
-static int ehci_xls_suspend(device_t self);
-static int ehci_xls_resume(device_t self);
-
-static int
-ehci_xls_suspend(device_t self)
-{
- ehci_softc_t *sc = device_get_softc(self);
- int err;
-
- err = bus_generic_suspend(self);
- if (err)
- return (err);
- ehci_suspend(sc);
- return (0);
-}
-
-static int
-ehci_xls_resume(device_t self)
-{
- ehci_softc_t *sc = device_get_softc(self);
-
- ehci_resume(sc);
-
- bus_generic_resume(self);
-
- return (0);
-}
-
-static int
-ehci_xls_shutdown(device_t self)
-{
- ehci_softc_t *sc = device_get_softc(self);
- int err;
-
- err = bus_generic_shutdown(self);
- if (err)
- return (err);
- ehci_shutdown(sc);
-
- return (0);
-}
+static device_attach_t ehci_xls_attach;
+static device_detach_t ehci_xls_detach;
static const char *xlr_usb_dev_desc = "RMI XLR USB 2.0 controller";
static const char *xlr_vendor_desc = "RMI Corp";
@@ -248,17 +206,17 @@ static device_method_t ehci_methods[] = {
DEVMETHOD(device_probe, ehci_xls_probe),
DEVMETHOD(device_attach, ehci_xls_attach),
DEVMETHOD(device_detach, ehci_xls_detach),
- DEVMETHOD(device_suspend, ehci_xls_suspend),
- DEVMETHOD(device_resume, ehci_xls_resume),
- DEVMETHOD(device_shutdown, ehci_xls_shutdown),
+ DEVMETHOD(device_suspend, bus_generic_suspend),
+ DEVMETHOD(device_resume, bus_generic_resume),
+ DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD_END
};
static driver_t ehci_driver = {
- "ehci",
- ehci_methods,
- sizeof(struct ehci_softc),
+ .name = "ehci",
+ .methods = ehci_methods,
+ .size = sizeof(struct ehci_softc),
};
static devclass_t ehci_devclass;
diff --git a/sys/mips/rt305x/rt305x_dotg.c b/sys/mips/rt305x/rt305x_dotg.c
index 67666f7..89b4933 100644
--- a/sys/mips/rt305x/rt305x_dotg.c
+++ b/sys/mips/rt305x/rt305x_dotg.c
@@ -67,7 +67,6 @@ __FBSDID("$FreeBSD$");
static device_probe_t dotg_obio_probe;
static device_attach_t dotg_obio_attach;
static device_detach_t dotg_obio_detach;
-static device_shutdown_t dotg_obio_shutdown;
struct dotg_obio_softc {
struct dotg_softc sc_dci; /* must be first */
@@ -208,35 +207,22 @@ dotg_obio_detach(device_t dev)
return (0);
}
-static int
-dotg_obio_shutdown(device_t dev)
-{
- struct dotg_obio_softc *sc = device_get_softc(dev);
- int err;
-
- err = bus_generic_shutdown(dev);
- if (err)
- return (err);
-
- dotg_uninit(&sc->sc_dci);
-
- return (0);
-}
-
static device_method_t dotg_obio_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, dotg_obio_probe),
DEVMETHOD(device_attach, dotg_obio_attach),
DEVMETHOD(device_detach, dotg_obio_detach),
- DEVMETHOD(device_shutdown, dotg_obio_shutdown),
+ DEVMETHOD(device_suspend, bus_generic_suspend),
+ DEVMETHOD(device_resume, bus_generic_resume),
+ DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD_END
};
static driver_t dotg_obio_driver = {
- "dotg",
- dotg_obio_methods,
- sizeof(struct dotg_obio_softc),
+ .name = "dotg",
+ .methods = dotg_obio_methods,
+ .size = sizeof(struct dotg_obio_softc),
};
static devclass_t dotg_obio_devclass;
diff --git a/sys/modules/Makefile b/sys/modules/Makefile
index b65c5eb..e16f8de 100644
--- a/sys/modules/Makefile
+++ b/sys/modules/Makefile
@@ -50,12 +50,14 @@ SUBDIR= ${_3dfx} \
${_canbepm} \
${_canbus} \
${_cardbus} \
+ ${_carp} \
cas \
${_cbb} \
cc \
cd9660 \
cd9660_iconv \
${_ce} \
+ ${_cfi} \
${_ciss} \
${_cm} \
${_cmx} \
@@ -107,6 +109,7 @@ SUBDIR= ${_3dfx} \
hatm \
hifn \
hme \
+ ${_hpt27xx} \
${_hptiop} \
${_hptmv} \
${_hptrr} \
@@ -117,7 +120,6 @@ SUBDIR= ${_3dfx} \
${_ida} \
${_ie} \
if_bridge \
- ${_if_carp} \
if_disc \
if_edsc \
if_ef \
@@ -134,7 +136,7 @@ SUBDIR= ${_3dfx} \
${_igb} \
${_iir} \
${_io} \
- ipdivert \
+ ${_ipdivert} \
${_ipfilter} \
${_ipfw} \
ipfw_nat \
@@ -319,6 +321,7 @@ SUBDIR= ${_3dfx} \
${_vesa} \
${_virtio} \
vge \
+ ${_viawd} \
vkbd \
${_vpo} \
vr \
@@ -368,13 +371,13 @@ _random= random
.endif
.endif
-.if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
-_if_gre= if_gre
-.endif
-
.if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \
defined(ALL_MODULES)
-_if_carp= if_carp
+_carp= carp
+.endif
+
+.if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
+_if_gre= if_gre
.endif
.if ${MK_IPFILTER} != "no" || defined(ALL_MODULES)
@@ -382,6 +385,7 @@ _ipfilter= ipfilter
.endif
.if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
+_ipdivert= ipdivert
_ipfw= ipfw
.endif
@@ -507,6 +511,7 @@ _coretemp= coretemp
_ctau= ctau
_dpt= dpt
_ex= ex
+_hpt27xx= hpt27xx
_hptiop= hptiop
_hptmv= hptmv
_hptrr= hptrr
@@ -530,6 +535,7 @@ _nve= nve
_nvram= nvram
_nxge= nxge
_tpm= tpm
+_viawd= viawd
_wpi= wpi
_wpifw= wpifw
.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
@@ -561,6 +567,7 @@ _amdsbwd= amdsbwd
_amdtemp= amdtemp
_arcmsr= arcmsr
_asmc= asmc
+_bktr= bktr
_bxe= bxe
_cardbus= cardbus
_cbb= cbb
@@ -582,6 +589,7 @@ _et= et
_em= em
_exca= exca
_ext2fs= ext2fs
+_hpt27xx= hpt27xx
_hptiop= hptiop
_hptmv= hptmv
_hptrr= hptrr
@@ -640,6 +648,7 @@ _sppp= sppp
_tpm= tpm
_twa= twa
_vesa= vesa
+_viawd= viawd
_virtio= virtio
_vxge= vxge
_x86bios= x86bios
@@ -651,6 +660,10 @@ _zfs= zfs
.endif
.endif
+.if ${MACHINE_CPUARCH} == "arm"
+_cfi= cfi
+.endif
+
.if ${MACHINE_CPUARCH} == "ia64"
_aac= aac
_aic= aic
@@ -694,6 +707,7 @@ _xe= xe
_agp= agp
_an= an
_bm= bm
+_cfi= cfi
_cpufreq= cpufreq
_nvram= powermac_nvram
_smbfs= smbfs
diff --git a/sys/modules/acpi/acpi/Makefile b/sys/modules/acpi/acpi/Makefile
index 43cb989..3c2e7ba 100644
--- a/sys/modules/acpi/acpi/Makefile
+++ b/sys/modules/acpi/acpi/Makefile
@@ -55,9 +55,10 @@ SRCS+= pswalk.c psxface.c
SRCS+= rsaddr.c rscalc.c rscreate.c rsdump.c rsinfo.c rsio.c rsirq.c rslist.c
SRCS+= rsmemory.c rsmisc.c rsserial.c rsutils.c rsxface.c
SRCS+= tbfadt.c tbfind.c tbinstal.c tbutils.c tbxface.c tbxfroot.c
-SRCS+= utalloc.c utcache.c utcopy.c utdebug.c utdecode.c utdelete.c uteval.c
-SRCS+= utglobal.c utids.c utinit.c utlock.c utmath.c utmisc.c utmutex.c
-SRCS+= utobject.c utosi.c utresrc.c utstate.c utxface.c utxferror.c
+SRCS+= utaddress.c utalloc.c utcache.c utcopy.c utdebug.c utdecode.c
+SRCS+= utdelete.c uteval.c utglobal.c utids.c utinit.c utlock.c utmath.c
+SRCS+= utmisc.c utmutex.c utobject.c utosi.c utresrc.c utstate.c utxface.c
+SRCS+= utxferror.c
#SRCS+= utxfmutex.c
# OSPM layer and core hardware drivers
diff --git a/sys/modules/aic7xxx/ahc/ahc_pci/Makefile b/sys/modules/aic7xxx/ahc/ahc_pci/Makefile
index 9a59580..c6e8559 100644
--- a/sys/modules/aic7xxx/ahc/ahc_pci/Makefile
+++ b/sys/modules/aic7xxx/ahc/ahc_pci/Makefile
@@ -14,3 +14,6 @@ SRCS+= opt_scsi.h opt_cam.h opt_aic7xxx.h
CFLAGS+= -I${.CURDIR}/../../../../dev/aic7xxx -I..
.include <bsd.kmod.mk>
+
+CWARNFLAGS.ahc_pci.c= ${NO_WCONSTANT_CONVERSION}
+CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}}
diff --git a/sys/modules/aic7xxx/ahd/Makefile b/sys/modules/aic7xxx/ahd/Makefile
index 25f312f..77885c7 100644
--- a/sys/modules/aic7xxx/ahd/Makefile
+++ b/sys/modules/aic7xxx/ahd/Makefile
@@ -36,3 +36,6 @@ SRCS+= device_if.h bus_if.h pci_if.h
CLEANFILES= ${GENSRCS}
.include <bsd.kmod.mk>
+
+CWARNFLAGS.ahd_pci.c= ${NO_WCONSTANT_CONVERSION}
+CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}}
diff --git a/sys/modules/ar71xx/Makefile b/sys/modules/ar71xx/Makefile
new file mode 100644
index 0000000..2c6055b
--- /dev/null
+++ b/sys/modules/ar71xx/Makefile
@@ -0,0 +1,30 @@
+#
+# $FreeBSD$
+#
+# Copyright (c) 2011 Adrian Chadd. 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.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+#
+
+SUBDIR = ar71xx_ehci ar71xx_ohci
+
+.include <bsd.subdir.mk>
diff --git a/sys/modules/ar71xx/ar71xx_ehci/Makefile b/sys/modules/ar71xx/ar71xx_ehci/Makefile
new file mode 100644
index 0000000..96f3261
--- /dev/null
+++ b/sys/modules/ar71xx/ar71xx_ehci/Makefile
@@ -0,0 +1,43 @@
+#
+# Copyright (c) 2012 Adrian Chadd, Xenion Pty Ltd
+# 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,
+# without modification.
+# 2. Redistributions in binary form must reproduce at minimum a disclaimer
+# similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
+# redistribution must be conditioned upon including a substantially
+# similar Disclaimer requirement for further binary redistribution.
+#
+# NO WARRANTY
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
+# AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+# THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+#
+# $FreeBSD$
+#
+
+.PATH: ${.CURDIR}/../../../mips/atheros/
+
+KMOD= ar71xx_ehci
+SRCS= ar71xx_ehci.c
+SRCS+= device_if.h bus_if.h usb_if.h opt_usb.h opt_bus.h
+
+.PATH: ${.CURDIR}/../../../dev/usb/controller/
+SRCS+= ehci.c
+
+CFLAGS+= -I. -I${.CURDIR}/../../../mips/atheros
+
+.include <bsd.kmod.mk>
diff --git a/sys/modules/ar71xx/ar71xx_ohci/Makefile b/sys/modules/ar71xx/ar71xx_ohci/Makefile
new file mode 100644
index 0000000..6fcee34
--- /dev/null
+++ b/sys/modules/ar71xx/ar71xx_ohci/Makefile
@@ -0,0 +1,43 @@
+#
+# Copyright (c) 2012 Adrian Chadd, Xenion Pty Ltd
+# 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,
+# without modification.
+# 2. Redistributions in binary form must reproduce at minimum a disclaimer
+# similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
+# redistribution must be conditioned upon including a substantially
+# similar Disclaimer requirement for further binary redistribution.
+#
+# NO WARRANTY
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
+# AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+# THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+#
+# $FreeBSD$
+#
+
+.PATH: ${.CURDIR}/../../../mips/atheros/
+
+KMOD= ar71xx_ohci
+SRCS= ar71xx_ohci.c
+SRCS+= device_if.h bus_if.h usb_if.h opt_usb.h opt_bus.h
+
+CFLAGS+= -I. -I${.CURDIR}/../../../mips/atheros
+
+.PATH: ${.CURDIR}/../../../dev/usb/controller/
+SRCS+= ohci.c
+
+.include <bsd.kmod.mk>
diff --git a/sys/modules/asr/Makefile b/sys/modules/asr/Makefile
index 5873415..c225b25 100644
--- a/sys/modules/asr/Makefile
+++ b/sys/modules/asr/Makefile
@@ -12,3 +12,6 @@ SRCS+= opt_asr.h
.endif
.include <bsd.kmod.mk>
+
+CWARNFLAGS.asr.c= ${NO_WARRAY_BOUNDS}
+CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}}
diff --git a/sys/modules/ath/Makefile b/sys/modules/ath/Makefile
index 50571aa..d3d2a22 100644
--- a/sys/modules/ath/Makefile
+++ b/sys/modules/ath/Makefile
@@ -36,7 +36,7 @@ ATH_RATE?= sample # tx rate control algorithm
KMOD= if_ath
SRCS= if_ath.c if_ath_debug.c if_ath_keycache.c if_ath_sysctl.c
-SRCS+= if_ath_tx.c if_ath_tx_ht.c
+SRCS+= if_ath_tx.c if_ath_tx_ht.c if_ath_led.c
# NB: v3 eeprom support used by both AR5211 and AR5212; just include it
SRCS+= ah_osdep.c ah.c ah_regdomain.c ah_eeprom_v3.c
SRCS+= device_if.h bus_if.h pci_if.h opt_inet.h opt_ath.h opt_ah.h opt_wlan.h
@@ -140,7 +140,12 @@ SRCS+= dfs_null.c
CFLAGS+= -I. -I${.CURDIR}/../../dev/ath -I${.CURDIR}/../../dev/ath/ath_hal
+.if !defined(KERNBUILDDIR)
opt_ah.h:
echo '#define AH_SUPPORT_AR5416 1' > $@
+.endif
.include <bsd.kmod.mk>
+
+CWARNFLAGS.ah_regdomain.c= ${NO_WSHIFT_COUNT_NEGATIVE} ${NO_WSHIFT_COUNT_OVERFLOW}
+CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}}
diff --git a/sys/modules/carp/Makefile b/sys/modules/carp/Makefile
new file mode 100644
index 0000000..ca3d5da
--- /dev/null
+++ b/sys/modules/carp/Makefile
@@ -0,0 +1,25 @@
+# $FreeBSD$
+
+.PATH: ${.CURDIR}/../../netinet
+.PATH: ${.CURDIR}/../../crypto
+
+.include <bsd.own.mk>
+
+KMOD= carp
+SRCS= ip_carp.c sha1.c
+SRCS+= device_if.h bus_if.h vnode_if.h
+SRCS+= opt_carp.h opt_bpf.h opt_inet.h opt_inet6.h opt_ofed.h
+
+.if !defined(KERNBUILDDIR)
+.if ${MK_INET_SUPPORT} != "no"
+opt_inet.h:
+ @echo "#define INET 1" > ${.TARGET}
+.endif
+
+.if ${MK_INET6_SUPPORT} != "no"
+opt_inet6.h:
+ @echo "#define INET6 1" > ${.TARGET}
+.endif
+.endif
+
+.include <bsd.kmod.mk>
diff --git a/sys/modules/ce/Makefile b/sys/modules/ce/Makefile
index a7bccff..2d54680 100644
--- a/sys/modules/ce/Makefile
+++ b/sys/modules/ce/Makefile
@@ -26,3 +26,6 @@ opt_ng_cronyx.h:
.endif
.include <bsd.kmod.mk>
+
+CWARNFLAGS.tau32-ddk.c= ${NO_WCONSTANT_CONVERSION}
+CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}}
diff --git a/sys/modules/cfi/Makefile b/sys/modules/cfi/Makefile
new file mode 100644
index 0000000..bb3fa5d
--- /dev/null
+++ b/sys/modules/cfi/Makefile
@@ -0,0 +1,19 @@
+# $FreeBSD$
+
+.PATH: ${.CURDIR}/../../dev/cfi
+
+KMOD= cfi
+SRCS= ${_cfi_bus} cfi_core.c cfi_dev.c
+SRCS+= bus_if.h device_if.h opt_cfi.h
+
+.if ${MACHINE} == "arm"
+_cfi_bus= cfi_bus_fdt.c cfi_bus_ixp4xx.c ofw_bus_if.h
+.endif
+.if ${MACHINE} == "powerpc"
+_cfi_bus= cfi_bus_fdt.c ofw_bus_if.h
+.endif
+
+opt_cfi.h:
+ echo "#define CFI_SUPPORT_STRATAFLASH 1" > ${.TARGET}
+
+.include <bsd.kmod.mk>
diff --git a/sys/modules/cxgbe/Makefile b/sys/modules/cxgbe/Makefile
index 2e83446..1d69f76 100644
--- a/sys/modules/cxgbe/Makefile
+++ b/sys/modules/cxgbe/Makefile
@@ -3,5 +3,6 @@
#
SUBDIR = if_cxgbe
+SUBDIR+= firmware
.include <bsd.subdir.mk>
diff --git a/sys/modules/cxgbe/firmware/Makefile b/sys/modules/cxgbe/firmware/Makefile
new file mode 100644
index 0000000..035de02
--- /dev/null
+++ b/sys/modules/cxgbe/firmware/Makefile
@@ -0,0 +1,27 @@
+#
+# $FreeBSD$
+#
+
+T4FW = ${.CURDIR}/../../../dev/cxgbe/firmware
+.PATH: ${T4FW}
+
+KMOD = t4fw_cfg
+FIRMWS = ${KMOD}.txt:${KMOD}:1.0.0.0
+
+# You can have additional configuration files in the ${T4FW} directory.
+# t4fw_cfg_<name>.txt
+CFG_FILES != cd ${T4FW} && echo ${KMOD}_*.txt
+.for F in ${CFG_FILES}
+.if exists(${F})
+FIRMWS += ${F}:${F:C/.txt//}:1.0.0.0
+.endif
+.endfor
+
+# The firmware binary is optional.
+# t4fw-<a>.<b>.<c>.<d>.bin
+FW_BIN != cd ${T4FW} && echo t4fw-*.bin
+.if exists(${FW_BIN})
+FIRMWS += ${FW_BIN}:t4fw:${FW_BIN:C/t4fw-//:C/.bin//}
+.endif
+
+.include <bsd.kmod.mk>
diff --git a/sys/modules/drm/r128/Makefile b/sys/modules/drm/r128/Makefile
index e80a0d8..215397a 100644
--- a/sys/modules/drm/r128/Makefile
+++ b/sys/modules/drm/r128/Makefile
@@ -6,3 +6,7 @@ SRCS = r128_cce.c r128_drv.c r128_irq.c r128_state.c
SRCS +=device_if.h bus_if.h pci_if.h opt_drm.h
.include <bsd.kmod.mk>
+
+CWARNFLAGS.r128_cce.c= ${NO_WUNUSED_VALUE} ${NO_WCONSTANT_CONVERSION}
+CWARNFLAGS.r128_state.c= ${NO_WUNUSED_VALUE}
+CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}}
diff --git a/sys/modules/drm/radeon/Makefile b/sys/modules/drm/radeon/Makefile
index 72c364b..d6413c4 100644
--- a/sys/modules/drm/radeon/Makefile
+++ b/sys/modules/drm/radeon/Makefile
@@ -7,3 +7,7 @@ SRCS = r300_cmdbuf.c r600_blit.c r600_cp.c radeon_cp.c radeon_cs.c \
SRCS +=device_if.h bus_if.h pci_if.h opt_drm.h
.include <bsd.kmod.mk>
+
+CWARNFLAGS.r600_cp.c= ${NO_WUNUSED_VALUE} ${NO_WCONSTANT_CONVERSION}
+CWARNFLAGS.radeon_cp.c= ${NO_WUNUSED_VALUE} ${NO_WCONSTANT_CONVERSION}
+CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}}
diff --git a/sys/modules/drm/via/Makefile b/sys/modules/drm/via/Makefile
index 96d9fd7..c9b4c54 100644
--- a/sys/modules/drm/via/Makefile
+++ b/sys/modules/drm/via/Makefile
@@ -20,3 +20,7 @@ opt_drm.h:
echo $(DRM_LINUX_OPT) >> opt_drm.h
.include <bsd.kmod.mk>
+
+CWARNFLAGS.via_dma.c= ${NO_WUNUSED_VALUE}
+CWARNFLAGS.via_dmablit.c= ${NO_WUNUSED_VALUE}
+CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}}
diff --git a/sys/modules/geom/geom_uncompress/Makefile b/sys/modules/geom/geom_uncompress/Makefile
new file mode 100644
index 0000000..3bec55a
--- /dev/null
+++ b/sys/modules/geom/geom_uncompress/Makefile
@@ -0,0 +1,17 @@
+# $FreeBSD$
+
+.PATH: ${.CURDIR}/../../../geom/uncompress \
+ ${.CURDIR}/../../../contrib/xz-embedded/freebsd/ \
+ ${.CURDIR}/../../../contrib/xz-embedded/linux/lib/xz/ \
+ ${.CURDIR}/../../../contrib/xz-embedded/linux/include/linux/ \
+ ${.CURDIR}/../../../net
+
+KMOD= geom_uncompress
+CFLAGS= -I${.CURDIR}/../../../geom/uncompress/ \
+ -I${.CURDIR}/../../../contrib/xz-embedded/freebsd \
+ -I${.CURDIR}/../../../contrib/xz-embedded/linux/lib/xz/
+SRCS= g_uncompress.c xz_crc32.c xz_dec_bcj.c xz_dec_lzma2.c xz_dec_stream.c \
+ xz_malloc.c zlib.c
+SRCS+= xz.h xz_config.h xz_lzma2.h xz_malloc.h xz_private.h xz_stream.h zlib.h
+
+.include <bsd.kmod.mk>
diff --git a/sys/modules/gpio/Makefile b/sys/modules/gpio/Makefile
new file mode 100644
index 0000000..648c33a
--- /dev/null
+++ b/sys/modules/gpio/Makefile
@@ -0,0 +1,30 @@
+#
+# $FreeBSD$
+#
+# Copyright (c) 2011 Adrian Chadd. 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.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+#
+
+SUBDIR = gpiobus gpioiic gpioled
+
+.include <bsd.subdir.mk>
diff --git a/sys/modules/gpio/gpiobus/Makefile b/sys/modules/gpio/gpiobus/Makefile
new file mode 100644
index 0000000..1b7afe8
--- /dev/null
+++ b/sys/modules/gpio/gpiobus/Makefile
@@ -0,0 +1,40 @@
+#
+# Copyright (c) 2012 Adrian Chadd, Xenion Pty Ltd
+# 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,
+# without modification.
+# 2. Redistributions in binary form must reproduce at minimum a disclaimer
+# similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
+# redistribution must be conditioned upon including a substantially
+# similar Disclaimer requirement for further binary redistribution.
+#
+# NO WARRANTY
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
+# AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+# THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+#
+# $FreeBSD$
+#
+
+.PATH: ${.CURDIR}/../../../dev/gpio/
+
+KMOD= gpiobus
+SRCS= gpiobus.c
+SRCS+= device_if.h bus_if.h gpio_if.h gpiobus_if.h
+
+CFLAGS+= -I. -I${.CURDIR}/../../../dev/gpio/
+
+.include <bsd.kmod.mk>
diff --git a/sys/modules/gpio/gpioiic/Makefile b/sys/modules/gpio/gpioiic/Makefile
new file mode 100644
index 0000000..be59861
--- /dev/null
+++ b/sys/modules/gpio/gpioiic/Makefile
@@ -0,0 +1,40 @@
+#
+# Copyright (c) 2012 Adrian Chadd, Xenion Pty Ltd
+# 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,
+# without modification.
+# 2. Redistributions in binary form must reproduce at minimum a disclaimer
+# similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
+# redistribution must be conditioned upon including a substantially
+# similar Disclaimer requirement for further binary redistribution.
+#
+# NO WARRANTY
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
+# AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+# THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+#
+# $FreeBSD$
+#
+
+.PATH: ${.CURDIR}/../../../dev/gpio/
+
+KMOD= gpioiic
+SRCS= gpioiic.c
+SRCS+= device_if.h bus_if.h gpio_if.h gpiobus_if.h iicbus_if.h iicbb_if.h
+
+CFLAGS+= -I. -I${.CURDIR}/../../../dev/gpio/
+
+.include <bsd.kmod.mk>
diff --git a/sys/modules/gpio/gpioled/Makefile b/sys/modules/gpio/gpioled/Makefile
new file mode 100644
index 0000000..0420b1b
--- /dev/null
+++ b/sys/modules/gpio/gpioled/Makefile
@@ -0,0 +1,40 @@
+#
+# Copyright (c) 2012 Adrian Chadd, Xenion Pty Ltd
+# 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,
+# without modification.
+# 2. Redistributions in binary form must reproduce at minimum a disclaimer
+# similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
+# redistribution must be conditioned upon including a substantially
+# similar Disclaimer requirement for further binary redistribution.
+#
+# NO WARRANTY
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
+# AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+# THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+#
+# $FreeBSD$
+#
+
+.PATH: ${.CURDIR}/../../../dev/gpio/
+
+KMOD= gpioled
+SRCS= gpioled.c
+SRCS+= device_if.h bus_if.h gpio_if.h gpiobus_if.h
+
+CFLAGS+= -I. -I${.CURDIR}/../../../dev/gpio/
+
+.include <bsd.kmod.mk>
diff --git a/sys/modules/hpt27xx/Makefile b/sys/modules/hpt27xx/Makefile
new file mode 100644
index 0000000..82b51408
--- /dev/null
+++ b/sys/modules/hpt27xx/Makefile
@@ -0,0 +1,14 @@
+# $FreeBSD$
+HPT27XX= ${.CURDIR}/../../dev/hpt27xx
+.PATH: ${HPT27XX}
+
+KMOD= hpt27xx
+SRCS= bus_if.h device_if.h pci_if.h
+SRCS+= opt_cam.h opt_scsi.h
+SRCS+= os_bsd.h os_bsd.c osm_bsd.c hpt27xx_config.c
+OBJS+= hpt27xx_lib.o
+
+hpt27xx_lib.o:
+ uudecode -p < ${HPT27XX}/$(MACHINE_ARCH)-elf.hpt27xx_lib.o.uu > ${.TARGET}
+
+.include <bsd.kmod.mk>
diff --git a/sys/modules/if_carp/Makefile b/sys/modules/if_carp/Makefile
deleted file mode 100644
index f1a0dea..0000000
--- a/sys/modules/if_carp/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
-# $FreeBSD$
-
-.PATH: ${.CURDIR}/../../netinet
-
-.include <bsd.own.mk>
-
-KMOD= if_carp
-SRCS= ip_carp.c
-SRCS+= opt_carp.h opt_bpf.h opt_inet.h opt_inet6.h vnode_if.h
-
-.if !defined(KERNBUILDDIR)
-.if ${MK_INET_SUPPORT} != "no"
-opt_inet.h:
- @echo "#define INET 1" > ${.TARGET}
-.endif
-
-.if ${MK_INET6_SUPPORT} != "no"
-opt_inet6.h:
- @echo "#define INET6 1" > ${.TARGET}
-.endif
-.endif
-
-.include <bsd.kmod.mk>
diff --git a/sys/modules/ipdivert/Makefile b/sys/modules/ipdivert/Makefile
index 886802a..14f92ad 100644
--- a/sys/modules/ipdivert/Makefile
+++ b/sys/modules/ipdivert/Makefile
@@ -1,13 +1,21 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
.PATH: ${.CURDIR}/../../netinet
KMOD= ipdivert
-SRCS= ip_divert.c opt_inet6.h
+SRCS= ip_divert.c opt_inet.h opt_inet6.h
.if !defined(KERNBUILDDIR)
+.if ${MK_INET_SUPPORT} != "no"
+opt_inet.h:
+ echo "#define INET 1" > ${.TARGET}
+.endif
+.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
.endif
+.endif
.include <bsd.kmod.mk>
diff --git a/sys/modules/ipfilter/Makefile b/sys/modules/ipfilter/Makefile
index 9cfb0f6..db780e9 100644
--- a/sys/modules/ipfilter/Makefile
+++ b/sys/modules/ipfilter/Makefile
@@ -26,3 +26,8 @@ CFLAGS+= -DIPFILTER=1 -DIPFILTER_LKM -DIPFILTER_LOG -DIPFILTER_LOOKUP
#
.include <bsd.kmod.mk>
+
+CWARNFLAGS.fil.c= ${NO_WSELF_ASSIGN}
+CWARNFLAGS.ip_proxy.c= ${NO_WSELF_ASSIGN}
+CWARNFLAGS.ip_lookup.c= ${NO_WSELF_ASSIGN}
+CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}}
diff --git a/sys/modules/kgssapi_krb5/Makefile b/sys/modules/kgssapi_krb5/Makefile
index e5c3e30..9dbb946 100644
--- a/sys/modules/kgssapi_krb5/Makefile
+++ b/sys/modules/kgssapi_krb5/Makefile
@@ -13,6 +13,7 @@ SRCS= krb5_mech.c \
SRCS+= kgss_if.h gssd.h
MFILES= kgssapi/kgss_if.m
+CLEANFILES= gssd.h
S= ${.CURDIR}/../..
diff --git a/sys/modules/nve/Makefile b/sys/modules/nve/Makefile
index 33d5c2d..111a8fd 100644
--- a/sys/modules/nve/Makefile
+++ b/sys/modules/nve/Makefile
@@ -7,6 +7,7 @@ SRCS= if_nve.c if_nvereg.h miidevs.h \
device_if.h bus_if.h pci_if.h miibus_if.h \
os+%DIKED-nve.h
OBJS+= nvenetlib.o
+WERROR=
CLEANFILES+= nvenetlib.o os+%DIKED-nve.h
nvenetlib.o: ${.CURDIR}/../../contrib/dev/nve/${MACHINE}/${.TARGET}.bz2.uu
diff --git a/sys/modules/nxge/Makefile b/sys/modules/nxge/Makefile
index 4994b90..a21239e 100644
--- a/sys/modules/nxge/Makefile
+++ b/sys/modules/nxge/Makefile
@@ -39,3 +39,13 @@ SRCS+= xgehal-mgmt.c
SRCS+= device_if.h bus_if.h pci_if.h
.include <bsd.kmod.mk>
+
+CWARNFLAGS.if_nxge.c= ${NO_WSELF_ASSIGN}
+CWARNFLAGS.xgehal-device.c= ${NO_WSELF_ASSIGN}
+CWARNFLAGS.xgehal-driver.c= ${NO_WSELF_ASSIGN}
+CWARNFLAGS.xgehal-ring.c= ${NO_WSELF_ASSIGN}
+CWARNFLAGS.xgehal-channel.c= ${NO_WSELF_ASSIGN}
+CWARNFLAGS.xgehal-fifo.c= ${NO_WSELF_ASSIGN}
+CWARNFLAGS.xgehal-stats.c= ${NO_WSELF_ASSIGN}
+CWARNFLAGS.xgehal-mgmt.c= ${NO_WSELF_ASSIGN}
+CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}}
diff --git a/sys/modules/pfsync/Makefile b/sys/modules/pfsync/Makefile
index ad08b45..8c9bb1b 100644
--- a/sys/modules/pfsync/Makefile
+++ b/sys/modules/pfsync/Makefile
@@ -6,7 +6,7 @@
KMOD= pfsync
SRCS= if_pfsync.c \
- opt_pf.h opt_inet.h opt_inet6.h opt_bpf.h
+ opt_pf.h opt_inet.h opt_inet6.h
CFLAGS+= -I${.CURDIR}/../../contrib/pf
SRCS+= bus_if.h device_if.h
@@ -24,9 +24,6 @@ opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
.endif
-opt_bpf.h:
- echo "#define DEV_BPF 1" > ${.TARGET}
-
.if defined(VIMAGE)
opt_global.h:
echo "#define VIMAGE 1" >> ${.TARGET}
diff --git a/sys/modules/random/Makefile b/sys/modules/random/Makefile
index 37c4d82..746f45a 100644
--- a/sys/modules/random/Makefile
+++ b/sys/modules/random/Makefile
@@ -6,7 +6,7 @@
KMOD= random
SRCS= randomdev.c probe.c
-.if ${MACHINE} == "i386"
+.if ${MACHINE} == "amd64" || ${MACHINE} == "i386"
SRCS+= nehemiah.c
.endif
SRCS+= randomdev_soft.c yarrow.c hash.c
diff --git a/sys/modules/sound/driver/emu10k1/Makefile b/sys/modules/sound/driver/emu10k1/Makefile
index 14fc0c9..ab745f8 100644
--- a/sys/modules/sound/driver/emu10k1/Makefile
+++ b/sys/modules/sound/driver/emu10k1/Makefile
@@ -4,16 +4,8 @@
${.CURDIR}/../../../../gnu/dev/sound/pci
KMOD= snd_emu10k1
-SRCS= device_if.h bus_if.h pci_if.h emu10k1-alsa%diked.h
+SRCS= device_if.h bus_if.h emuxkireg.h pci_if.h
SRCS+= mpufoi_if.h
SRCS+= emu10k1.c
-CLEANFILES+= emu10k1-alsa%diked.h
-
-emu10k1-alsa%diked.h: emu10k1-alsa.h
- grep -v '#include' ${.OODATE} | $(CC) -E -D__KERNEL__ -dM - \
- | awk -F"[ (]" '/define/ \
- { print "#ifndef " $$2 ; print ; print "#endif" }' \
- >${.TARGET}
-
.include <bsd.kmod.mk>
diff --git a/sys/modules/sound/driver/emu10kx/Makefile b/sys/modules/sound/driver/emu10kx/Makefile
index 0b77711..0481e6c 100644
--- a/sys/modules/sound/driver/emu10kx/Makefile
+++ b/sys/modules/sound/driver/emu10kx/Makefile
@@ -11,29 +11,6 @@ SRCS+= vnode_if.h
SRCS+= emu10kx.c
SRCS+= emu10kx-pcm.c
SRCS+= emu10kx-midi.c
-# de-GPLed Makefiles
-SRCS+= emu10k1-alsa%diked.h
-SRCS+= p16v-alsa%diked.h
-SRCS+= p17v-alsa%diked.h
-
-emu10k1-alsa%diked.h: emu10k1-alsa.h
- grep -v '#include' ${.OODATE} | $(CC) -E -D__KERNEL__ -dM - \
- | awk -F"[ (]" '/define/ \
- { print "#ifndef " $$2 ; print ; print "#endif" }' \
- >${.TARGET}
-p16v-alsa%diked.h: p16v-alsa.h
- grep -v '#include' ${.OODATE} | $(CC) -E -D__KERNEL__ -dM - \
- | awk -F"[ (]" '/define/ \
- { print "#ifndef " $$2 ; print ; print "#endif" }' \
- >${.TARGET}
-p17v-alsa%diked.h: p17v-alsa.h
- grep -v '#include' ${.OODATE} | $(CC) -E -D__KERNEL__ -dM - \
- | awk -F"[ (]" '/define/ \
- { print "#ifndef " $$2 ; print ; print "#endif" }' \
- >${.TARGET}
-
-CLEANFILES+= emu10k1-alsa%diked.h
-CLEANFILES+= p16v-alsa%diked.h
-CLEANFILES+= p17v-alsa%diked.h
+SRCS+= emuxkireg.h
.include <bsd.kmod.mk>
diff --git a/sys/modules/sound/driver/hda/Makefile b/sys/modules/sound/driver/hda/Makefile
index 8508b5d..f136936 100644
--- a/sys/modules/sound/driver/hda/Makefile
+++ b/sys/modules/sound/driver/hda/Makefile
@@ -3,7 +3,8 @@
.PATH: ${.CURDIR}/../../../../dev/sound/pci/hda
KMOD= snd_hda
-SRCS= device_if.h bus_if.h pci_if.h channel_if.h mixer_if.h
-SRCS+= hdac.c hdac_private.h hdac_reg.h hda_reg.h hdac.h
+SRCS= device_if.h bus_if.h pci_if.h channel_if.h mixer_if.h hdac_if.h
+SRCS+= hdaa.c hdaa.h hdaa_patches.c hdac.c hdac_if.h hdac_if.c
+SRCS+= hdacc.c hdac_private.h hdac_reg.h hda_reg.h hdac.h
.include <bsd.kmod.mk>
diff --git a/sys/modules/sound/driver/maestro3/Makefile b/sys/modules/sound/driver/maestro3/Makefile
index d4378b8..4bf494c 100644
--- a/sys/modules/sound/driver/maestro3/Makefile
+++ b/sys/modules/sound/driver/maestro3/Makefile
@@ -4,6 +4,7 @@
KMOD= snd_maestro3
SRCS= device_if.h bus_if.h pci_if.h
+SRCS+= allegro_code.h allegro_reg.h
SRCS+= maestro3.c
CFLAGS+= -Wall -DM3_DEBUG_LEVEL=-1
diff --git a/sys/modules/splash/Makefile b/sys/modules/splash/Makefile
index 1c634bf..3b21d86 100644
--- a/sys/modules/splash/Makefile
+++ b/sys/modules/splash/Makefile
@@ -1,5 +1,5 @@
# $FreeBSD$
-SUBDIR= bmp pcx
+SUBDIR= bmp pcx txt
.include <bsd.subdir.mk>
diff --git a/sys/modules/splash/txt/Makefile b/sys/modules/splash/txt/Makefile
new file mode 100644
index 0000000..7b41a17
--- /dev/null
+++ b/sys/modules/splash/txt/Makefile
@@ -0,0 +1,7 @@
+# $FreeBSD$
+.PATH: ${.CURDIR}/../../../dev/fb
+
+KMOD= splash_txt
+SRCS= splash_txt.c
+
+.include <bsd.kmod.mk>
diff --git a/sys/modules/usb/Makefile b/sys/modules/usb/Makefile
index abcfcbe..3df35bc 100644
--- a/sys/modules/usb/Makefile
+++ b/sys/modules/usb/Makefile
@@ -26,7 +26,7 @@
#
SUBDIR = usb
-SUBDIR += ehci musb ohci uhci xhci uss820dci ${_at91dci} ${_atmegadci}
+SUBDIR += ehci musb ohci uhci xhci uss820dci ${_at91dci} ${_atmegadci} ${_avr32dci}
SUBDIR += rum run uath upgt usie ural zyd ${_urtw}
SUBDIR += atp uhid ukbd ums udbp ufm uep
SUBDIR += ucom u3g uark ubsa ubser uchcom ucycom ufoma uftdi ugensa uipaq ulpt \
@@ -48,4 +48,8 @@ _atmegadci= atmegadci
_urtw= urtw
.endif
+.if ${MACHINE_CPUARCH} == "avr32"
+_avr32dci= avr32dci
+.endif
+
.include <bsd.subdir.mk>
diff --git a/sys/modules/usb/avr32dci/Makefile b/sys/modules/usb/avr32dci/Makefile
new file mode 100644
index 0000000..ea7d9c2
--- /dev/null
+++ b/sys/modules/usb/avr32dci/Makefile
@@ -0,0 +1,38 @@
+#
+# $FreeBSD$
+#
+# Copyright (c) 2011 Hans Petter Selasky. 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.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+#
+
+S= ${.CURDIR}/../../..
+
+.PATH: $S/dev/usb/controller
+
+KMOD= avr32dci
+SRCS= bus_if.h device_if.h usb_if.h \
+ opt_bus.h opt_usb.h \
+ avr32dci.c \
+ pci_if.h
+
+.include <bsd.kmod.mk>
diff --git a/sys/modules/viawd/Makefile b/sys/modules/viawd/Makefile
new file mode 100644
index 0000000..c14c3e0
--- /dev/null
+++ b/sys/modules/viawd/Makefile
@@ -0,0 +1,8 @@
+# $FreeBSD$
+
+.PATH: ${.CURDIR}/../../dev/viawd
+
+KMOD= viawd
+SRCS= viawd.c device_if.h bus_if.h pci_if.h isa_if.h
+
+.include <bsd.kmod.mk>
diff --git a/sys/modules/wlan/Makefile b/sys/modules/wlan/Makefile
index f96ad32..8eb83bf 100644
--- a/sys/modules/wlan/Makefile
+++ b/sys/modules/wlan/Makefile
@@ -11,7 +11,8 @@ SRCS= ieee80211.c ieee80211_action.c ieee80211_ageq.c \
ieee80211_scan_sta.c ieee80211_radiotap.c ieee80211_ratectl.c \
ieee80211_ratectl_none.c ieee80211_regdomain.c \
ieee80211_ht.c ieee80211_hwmp.c ieee80211_adhoc.c ieee80211_hostap.c \
- ieee80211_monitor.c ieee80211_sta.c ieee80211_wds.c ieee80211_ddb.c
+ ieee80211_monitor.c ieee80211_sta.c ieee80211_wds.c ieee80211_ddb.c \
+ ieee80211_tdma.c
SRCS+= bus_if.h device_if.h opt_inet.h opt_inet6.h opt_ipx.h opt_wlan.h \
opt_ddb.h
diff --git a/sys/modules/wtap/Makefile b/sys/modules/wtap/Makefile
new file mode 100644
index 0000000..68b905f
--- /dev/null
+++ b/sys/modules/wtap/Makefile
@@ -0,0 +1,30 @@
+# $FreeBSD$
+
+
+# Declare Name of kernel module
+KMOD = wtap
+
+# Enumerate Source files for kernel module
+.PATH: ${.CURDIR}/../../dev/wtap
+SRCS = if_wtap_module.c if_wtap.c if_medium.c
+
+.PATH: ${.CURDIR}/../../dev/wtap/wtap_hal
+SRCS += hal.c
+
+.PATH: ${.CURDIR}/../../dev/wtap/plugins
+SRCS += visibility.c
+
+SRCS += opt_global.h
+
+.if defined(KERNBUILDDIR)
+MKDEP= -include ${KERNBUILDDIR}/opt_global.h
+.else
+CFLAGS+= -include opt_global.h
+MKDEP= -include opt_global.h
+
+opt_global.h:
+ echo "#define VIMAGE 1" > ${.TARGET}
+.endif
+
+# Include kernel module makefile
+.include <bsd.kmod.mk>
diff --git a/sys/modules/xfs/Makefile b/sys/modules/xfs/Makefile
index e713b05..7135019 100644
--- a/sys/modules/xfs/Makefile
+++ b/sys/modules/xfs/Makefile
@@ -86,8 +86,5 @@ CFLAGS+= -I${.CURDIR}/../../gnu/fs/xfs/FreeBSD \
-I${.CURDIR}/../../gnu/fs/xfs/FreeBSD/support \
-I${.CURDIR}/../../gnu/fs/xfs
-#
-# XFS sources trigger missing-prototypes warnings.
-# Disable them here.
-#
-CWARNFLAGS+= -Wno-missing-prototypes
+CWARNFLAGS.xfs_ioctl.c= ${NO_WSELF_ASSIGN}
+CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}}
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index 3dd2f93..80f5636 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -2253,33 +2253,42 @@ bpfdetach(struct ifnet *ifp)
{
struct bpf_if *bp;
struct bpf_d *d;
+#ifdef INVARIANTS
+ int ndetached;
- /* Locate BPF interface information */
- mtx_lock(&bpf_mtx);
- LIST_FOREACH(bp, &bpf_iflist, bif_next) {
- if (ifp == bp->bif_ifp)
- break;
- }
+ ndetached = 0;
+#endif
- /* Interface wasn't attached */
- if ((bp == NULL) || (bp->bif_ifp == NULL)) {
+ /* Find all bpf_if struct's which reference ifp and detach them. */
+ do {
+ mtx_lock(&bpf_mtx);
+ LIST_FOREACH(bp, &bpf_iflist, bif_next) {
+ if (ifp == bp->bif_ifp)
+ break;
+ }
+ if (bp != NULL)
+ LIST_REMOVE(bp, bif_next);
mtx_unlock(&bpf_mtx);
- printf("bpfdetach: %s was not attached\n", ifp->if_xname);
- return;
- }
-
- LIST_REMOVE(bp, bif_next);
- mtx_unlock(&bpf_mtx);
- while ((d = LIST_FIRST(&bp->bif_dlist)) != NULL) {
- bpf_detachd(d);
- BPFD_LOCK(d);
- bpf_wakeup(d);
- BPFD_UNLOCK(d);
- }
+ if (bp != NULL) {
+#ifdef INVARIANTS
+ ndetached++;
+#endif
+ while ((d = LIST_FIRST(&bp->bif_dlist)) != NULL) {
+ bpf_detachd(d);
+ BPFD_LOCK(d);
+ bpf_wakeup(d);
+ BPFD_UNLOCK(d);
+ }
+ mtx_destroy(&bp->bif_mtx);
+ free(bp, M_BPF);
+ }
+ } while (bp != NULL);
- mtx_destroy(&bp->bif_mtx);
- free(bp, M_BPF);
+#ifdef INVARIANTS
+ if (ndetached == 0)
+ printf("bpfdetach: %s was not attached\n", ifp->if_xname);
+#endif
}
/*
diff --git a/sys/net/bpf_buffer.c b/sys/net/bpf_buffer.c
index 6920c70..d338fca 100644
--- a/sys/net/bpf_buffer.c
+++ b/sys/net/bpf_buffer.c
@@ -2,7 +2,7 @@
* Copyright (c) 2007 Seccuris Inc.
* All rights reserved.
*
- * This sofware was developed by Robert N. M. Watson under contract to
+ * This software was developed by Robert N. M. Watson under contract to
* Seccuris Inc.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/net/bpf_buffer.h b/sys/net/bpf_buffer.h
index 82d0310..733137f 100644
--- a/sys/net/bpf_buffer.h
+++ b/sys/net/bpf_buffer.h
@@ -2,7 +2,7 @@
* Copyright (c) 2007 Seccuris Inc.
* All rights reserved.
*
- * This sofware was developed by Robert N. M. Watson under contract to
+ * This software was developed by Robert N. M. Watson under contract to
* Seccuris Inc.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/net/bpf_zerocopy.c b/sys/net/bpf_zerocopy.c
index 7a3e6cd..1b32629 100644
--- a/sys/net/bpf_zerocopy.c
+++ b/sys/net/bpf_zerocopy.c
@@ -2,7 +2,7 @@
* Copyright (c) 2007 Seccuris Inc.
* All rights reserved.
*
- * This sofware was developed by Robert N. M. Watson under contract to
+ * This software was developed by Robert N. M. Watson under contract to
* Seccuris Inc.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/net/bpf_zerocopy.h b/sys/net/bpf_zerocopy.h
index c541a15..a5709b8 100644
--- a/sys/net/bpf_zerocopy.h
+++ b/sys/net/bpf_zerocopy.h
@@ -2,7 +2,7 @@
* Copyright (c) 2007 Seccuris Inc.
* All rights reserved.
*
- * This sofware was developed by Robert N. M. Watson under contract to
+ * This software was developed by Robert N. M. Watson under contract to
* Seccuris Inc.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/net/if.c b/sys/net/if.c
index 8f26279..63ae79b 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -129,18 +129,21 @@ void (*ng_ether_link_state_p)(struct ifnet *ifp, int state);
void (*lagg_linkstate_p)(struct ifnet *ifp, int state);
/* These are external hooks for CARP. */
void (*carp_linkstate_p)(struct ifnet *ifp);
+void (*carp_demote_adj_p)(int, char *);
#if defined(INET) || defined(INET6)
-struct ifnet *(*carp_forus_p)(struct ifnet *ifp, u_char *dhost);
+int (*carp_forus_p)(struct ifnet *ifp, u_char *dhost);
int (*carp_output_p)(struct ifnet *ifp, struct mbuf *m,
- struct sockaddr *sa, struct rtentry *rt);
+ struct sockaddr *sa);
+int (*carp_ioctl_p)(struct ifreq *, u_long, struct thread *);
+int (*carp_attach_p)(struct ifaddr *, int);
+void (*carp_detach_p)(struct ifaddr *);
#endif
#ifdef INET
-int (*carp_iamatch_p)(struct ifnet *, struct in_ifaddr *, struct in_addr *,
- u_int8_t **);
+int (*carp_iamatch_p)(struct ifaddr *, uint8_t **);
#endif
#ifdef INET6
struct ifaddr *(*carp_iamatch6_p)(struct ifnet *ifp, struct in6_addr *taddr6);
-caddr_t (*carp_macmatch6_p)(struct ifnet *ifp, struct mbuf *m,
+caddr_t (*carp_macmatch6_p)(struct ifnet *ifp, struct mbuf *m,
const struct in6_addr *taddr);
#endif
@@ -494,19 +497,12 @@ if_free_internal(struct ifnet *ifp)
}
/*
- * This version should only be called by intefaces that switch their type
- * after calling if_alloc(). if_free_type() will go away again now that we
- * have if_alloctype to cache the original allocation type. For now, assert
- * that they match, since we require that in practice.
+ * Deregister an interface and free the associated storage.
*/
void
-if_free_type(struct ifnet *ifp, u_char type)
+if_free(struct ifnet *ifp)
{
- KASSERT(ifp->if_alloctype == type,
- ("if_free_type: type (%d) != alloctype (%d)", type,
- ifp->if_alloctype));
-
ifp->if_flags |= IFF_DYING; /* XXX: Locking */
IFNET_WLOCK();
@@ -522,18 +518,6 @@ if_free_type(struct ifnet *ifp, u_char type)
}
/*
- * This is the normal version of if_free(), used by device drivers to free a
- * detached network interface. The contents of if_free_type() will move into
- * here when if_free_type() goes away.
- */
-void
-if_free(struct ifnet *ifp)
-{
-
- if_free_type(ifp, ifp->if_alloctype);
-}
-
-/*
* Interfaces to keep an ifnet type-stable despite the possibility of the
* driver calling if_free(). If there are additional references, we defer
* freeing the underlying data structure.
@@ -802,10 +786,10 @@ if_purgemaddrs(struct ifnet *ifp)
struct ifmultiaddr *ifma;
struct ifmultiaddr *next;
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_WLOCK(ifp);
TAILQ_FOREACH_SAFE(ifma, &ifp->if_multiaddrs, ifma_link, next)
if_delmulti_locked(ifp, ifma, 1);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_WUNLOCK(ifp);
}
/*
@@ -1149,10 +1133,10 @@ if_addgroup(struct ifnet *ifp, const char *groupname)
ifgl->ifgl_group = ifg;
ifgm->ifgm_ifp = ifp;
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_WLOCK(ifp);
TAILQ_INSERT_TAIL(&ifg->ifg_members, ifgm, ifgm_next);
TAILQ_INSERT_TAIL(&ifp->if_groups, ifgl, ifgl_next);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_WUNLOCK(ifp);
IFNET_WUNLOCK();
@@ -1179,9 +1163,9 @@ if_delgroup(struct ifnet *ifp, const char *groupname)
return (ENOENT);
}
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_WLOCK(ifp);
TAILQ_REMOVE(&ifp->if_groups, ifgl, ifgl_next);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_WUNLOCK(ifp);
TAILQ_FOREACH(ifgm, &ifgl->ifgl_group->ifg_members, ifgm_next)
if (ifgm->ifgm_ifp == ifp)
@@ -1222,9 +1206,9 @@ if_delgroups(struct ifnet *ifp)
strlcpy(groupname, ifgl->ifgl_group->ifg_group, IFNAMSIZ);
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_WLOCK(ifp);
TAILQ_REMOVE(&ifp->if_groups, ifgl, ifgl_next);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_WUNLOCK(ifp);
TAILQ_FOREACH(ifgm, &ifgl->ifgl_group->ifg_members, ifgm_next)
if (ifgm->ifgm_ifp == ifp)
@@ -1266,33 +1250,33 @@ if_getgroup(struct ifgroupreq *data, struct ifnet *ifp)
struct ifgroupreq *ifgr = data;
if (ifgr->ifgr_len == 0) {
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifgl, &ifp->if_groups, ifgl_next)
ifgr->ifgr_len += sizeof(struct ifg_req);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
return (0);
}
len = ifgr->ifgr_len;
ifgp = ifgr->ifgr_groups;
/* XXX: wire */
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifgl, &ifp->if_groups, ifgl_next) {
if (len < sizeof(ifgrq)) {
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
return (EINVAL);
}
bzero(&ifgrq, sizeof ifgrq);
strlcpy(ifgrq.ifgrq_group, ifgl->ifgl_group->ifg_group,
sizeof(ifgrq.ifgrq_group));
if ((error = copyout(&ifgrq, ifgp, sizeof(struct ifg_req)))) {
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
return (error);
}
len -= sizeof(ifgrq);
ifgp++;
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
return (0);
}
@@ -1399,28 +1383,28 @@ void
if_addr_rlock(struct ifnet *ifp)
{
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
}
void
if_addr_runlock(struct ifnet *ifp)
{
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
}
void
if_maddr_rlock(struct ifnet *ifp)
{
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
}
void
if_maddr_runlock(struct ifnet *ifp)
{
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
}
/*
@@ -1532,14 +1516,14 @@ ifa_ifwithaddr_internal(struct sockaddr *addr, int getref)
IFNET_RLOCK_NOSLEEP();
TAILQ_FOREACH(ifp, &V_ifnet, if_link) {
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
if (ifa->ifa_addr->sa_family != addr->sa_family)
continue;
if (sa_equal(addr, ifa->ifa_addr)) {
if (getref)
ifa_ref(ifa);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
goto done;
}
/* IP6 doesn't have broadcast */
@@ -1549,11 +1533,11 @@ ifa_ifwithaddr_internal(struct sockaddr *addr, int getref)
sa_equal(ifa->ifa_broadaddr, addr)) {
if (getref)
ifa_ref(ifa);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
goto done;
}
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
}
ifa = NULL;
done:
@@ -1587,7 +1571,7 @@ ifa_ifwithbroadaddr(struct sockaddr *addr)
IFNET_RLOCK_NOSLEEP();
TAILQ_FOREACH(ifp, &V_ifnet, if_link) {
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
if (ifa->ifa_addr->sa_family != addr->sa_family)
continue;
@@ -1596,11 +1580,11 @@ ifa_ifwithbroadaddr(struct sockaddr *addr)
ifa->ifa_broadaddr->sa_len != 0 &&
sa_equal(ifa->ifa_broadaddr, addr)) {
ifa_ref(ifa);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
goto done;
}
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
}
ifa = NULL;
done:
@@ -1622,18 +1606,18 @@ ifa_ifwithdstaddr(struct sockaddr *addr)
TAILQ_FOREACH(ifp, &V_ifnet, if_link) {
if ((ifp->if_flags & IFF_POINTOPOINT) == 0)
continue;
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
if (ifa->ifa_addr->sa_family != addr->sa_family)
continue;
if (ifa->ifa_dstaddr != NULL &&
sa_equal(addr, ifa->ifa_dstaddr)) {
ifa_ref(ifa);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
goto done;
}
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
}
ifa = NULL;
done:
@@ -1667,12 +1651,12 @@ ifa_ifwithnet(struct sockaddr *addr, int ignore_ptp)
/*
* Scan though each interface, looking for ones that have addresses
* in this address family. Maintain a reference on ifa_maybe once
- * we find one, as we release the IF_ADDR_LOCK() that kept it stable
+ * we find one, as we release the IF_ADDR_RLOCK() that kept it stable
* when we move onto the next interface.
*/
IFNET_RLOCK_NOSLEEP();
TAILQ_FOREACH(ifp, &V_ifnet, if_link) {
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
char *cp, *cp2, *cp3;
@@ -1691,7 +1675,7 @@ next: continue;
if (ifa->ifa_dstaddr != NULL &&
sa_equal(addr, ifa->ifa_dstaddr)) {
ifa_ref(ifa);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
goto done;
}
} else {
@@ -1702,7 +1686,7 @@ next: continue;
if (ifa->ifa_claim_addr) {
if ((*ifa->ifa_claim_addr)(ifa, addr)) {
ifa_ref(ifa);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
goto done;
}
continue;
@@ -1742,7 +1726,7 @@ next: continue;
}
}
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
}
ifa = ifa_maybe;
ifa_maybe = NULL;
@@ -1768,7 +1752,7 @@ ifaof_ifpforaddr(struct sockaddr *addr, struct ifnet *ifp)
if (af >= AF_MAX)
return (NULL);
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
if (ifa->ifa_addr->sa_family != af)
continue;
@@ -1800,7 +1784,7 @@ ifaof_ifpforaddr(struct sockaddr *addr, struct ifnet *ifp)
done:
if (ifa != NULL)
ifa_ref(ifa);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
return (ifa);
}
@@ -2350,9 +2334,9 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, struct thread *td)
* lose a race while we check if the membership
* already exists.
*/
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
ifma = if_findmulti(ifp, &ifr->ifr_addr);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
if (ifma != NULL)
error = EADDRINUSE;
else
@@ -2525,6 +2509,16 @@ ifioctl(struct socket *so, u_long cmd, caddr_t data, struct thread *td)
error = if_getgroupmembers((struct ifgroupreq *)data);
CURVNET_RESTORE();
return (error);
+#if defined(INET) || defined(INET6)
+ case SIOCSVH:
+ case SIOCGVH:
+ if (carp_ioctl_p == NULL)
+ error = EPROTONOSUPPORT;
+ else
+ error = (*carp_ioctl_p)(ifr, cmd, td);
+ CURVNET_RESTORE();
+ return (error);
+#endif
}
ifp = ifunit_ref(ifr->ifr_name);
@@ -2768,7 +2762,7 @@ again:
}
addrs = 0;
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
struct sockaddr *sa = ifa->ifa_addr;
@@ -2800,7 +2794,7 @@ again:
if (sbuf_error(sb) == 0)
valid_len = sbuf_len(sb);
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
if (addrs == 0) {
bzero((caddr_t)&ifr.ifr_addr, sizeof(ifr.ifr_addr));
sbuf_bcat(sb, &ifr, sizeof(ifr));
@@ -2958,13 +2952,13 @@ if_addmulti(struct ifnet *ifp, struct sockaddr *sa,
* If the address is already present, return a new reference to it;
* otherwise, allocate storage and set up a new address.
*/
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_WLOCK(ifp);
ifma = if_findmulti(ifp, sa);
if (ifma != NULL) {
ifma->ifma_refcount++;
if (retifma != NULL)
*retifma = ifma;
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_WUNLOCK(ifp);
return (0);
}
@@ -3030,7 +3024,7 @@ if_addmulti(struct ifnet *ifp, struct sockaddr *sa,
* pointer is still valid.
*/
rt_newmaddrmsg(RTM_NEWMADDR, ifma);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_WUNLOCK(ifp);
/*
* We are certain we have added something, so call down to the
@@ -3050,7 +3044,7 @@ free_llsa_out:
free(llsa, M_IFMADDR);
unlock_out:
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_WUNLOCK(ifp);
return (error);
}
@@ -3084,12 +3078,12 @@ if_delmulti(struct ifnet *ifp, struct sockaddr *sa)
if (ifp == NULL)
return (ENOENT);
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_WLOCK(ifp);
lastref = 0;
ifma = if_findmulti(ifp, sa);
if (ifma != NULL)
lastref = if_delmulti_locked(ifp, ifma, 0);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_WUNLOCK(ifp);
if (ifma == NULL)
return (ENOENT);
@@ -3111,10 +3105,10 @@ if_delallmulti(struct ifnet *ifp)
struct ifmultiaddr *ifma;
struct ifmultiaddr *next;
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_WLOCK(ifp);
TAILQ_FOREACH_SAFE(ifma, &ifp->if_multiaddrs, ifma_link, next)
if_delmulti_locked(ifp, ifma, 0);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_WUNLOCK(ifp);
}
/*
@@ -3151,7 +3145,7 @@ if_delmulti_ifma(struct ifmultiaddr *ifma)
* If and only if the ifnet instance exists: Acquire the address lock.
*/
if (ifp != NULL)
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_WLOCK(ifp);
lastref = if_delmulti_locked(ifp, ifma, 0);
@@ -3161,7 +3155,7 @@ if_delmulti_ifma(struct ifmultiaddr *ifma)
* Release the address lock.
* If the group was left: update the hardware hash filter.
*/
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_WUNLOCK(ifp);
if (lastref && ifp->if_ioctl != NULL) {
(void)(*ifp->if_ioctl)(ifp, SIOCDELMULTI, 0);
}
@@ -3183,7 +3177,7 @@ if_delmulti_locked(struct ifnet *ifp, struct ifmultiaddr *ifma, int detaching)
if (ifp != NULL && ifma->ifma_ifp != NULL) {
KASSERT(ifma->ifma_ifp == ifp,
("%s: inconsistent ifp %p", __func__, ifp));
- IF_ADDR_LOCK_ASSERT(ifp);
+ IF_ADDR_WLOCK_ASSERT(ifp);
}
ifp = ifma->ifma_ifp;
@@ -3256,14 +3250,14 @@ if_setlladdr(struct ifnet *ifp, const u_char *lladdr, int len)
struct ifaddr *ifa;
struct ifreq ifr;
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
ifa = ifp->if_addr;
if (ifa == NULL) {
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
return (EINVAL);
}
ifa_ref(ifa);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
sdl = (struct sockaddr_dl *)ifa->ifa_addr;
if (sdl == NULL) {
ifa_free(ifa);
diff --git a/sys/net/if.h b/sys/net/if.h
index 4f2dc6f..e17dac2 100644
--- a/sys/net/if.h
+++ b/sys/net/if.h
@@ -85,7 +85,7 @@ struct if_data {
u_char ifi_addrlen; /* media address length */
u_char ifi_hdrlen; /* media header length */
u_char ifi_link_state; /* current link state */
- u_char ifi_spare_char1; /* spare byte */
+ u_char ifi_vhid; /* carp vhid */
u_char ifi_spare_char2; /* spare byte */
u_char ifi_datalen; /* length of this data struct */
u_long ifi_mtu; /* maximum transmission unit */
@@ -267,6 +267,8 @@ struct ifa_msghdr {
int ifam_flags; /* value of ifa_flags */
u_short ifam_index; /* index for associated ifp */
int ifam_metric; /* value of ifa_metric */
+ struct if_data ifam_data;/* statistics and other data about if or
+ * address */
};
/*
@@ -357,6 +359,15 @@ struct ifaliasreq {
struct sockaddr ifra_addr;
struct sockaddr ifra_broadaddr;
struct sockaddr ifra_mask;
+ int ifra_vhid;
+};
+
+/* Compat with pre-10.x */
+struct oifaliasreq {
+ char ifra_name[IFNAMSIZ];
+ struct sockaddr ifra_addr;
+ struct sockaddr ifra_broadaddr;
+ struct sockaddr ifra_mask;
};
struct ifmediareq {
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index 9eae683..253371a 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -397,7 +397,7 @@ ether_output(struct ifnet *ifp, struct mbuf *m,
#if defined(INET) || defined(INET6)
if (ifp->if_carp &&
- (error = (*carp_output_p)(ifp, m, dst, NULL)))
+ (error = (*carp_output_p)(ifp, m, dst)))
goto bad;
#endif
diff --git a/sys/net/if_llatbl.c b/sys/net/if_llatbl.c
index b19a0a4..559a174 100644
--- a/sys/net/if_llatbl.c
+++ b/sys/net/if_llatbl.c
@@ -65,9 +65,6 @@ MALLOC_DEFINE(M_LLTABLE, "lltable", "link level address tables");
static VNET_DEFINE(SLIST_HEAD(, lltable), lltables);
#define V_lltables VNET(lltables)
-extern void arprequest(struct ifnet *, struct in_addr *, struct in_addr *,
- u_char *);
-
static void vnet_lltable_init(void);
struct rwlock lltable_rwlock;
diff --git a/sys/net/if_media.h b/sys/net/if_media.h
index b6fd316..6014e2f 100644
--- a/sys/net/if_media.h
+++ b/sys/net/if_media.h
@@ -247,11 +247,6 @@ uint64_t ifmedia_baudrate(int);
#define IFM_ATM_UNASSIGNED 0x00000400 /* unassigned cells */
/*
- * CARP Common Address Redundancy Protocol
- */
-#define IFM_CARP 0x000000c0
-
-/*
* Shared media sub-types
*/
#define IFM_AUTO 0 /* Autoselect best media */
@@ -337,7 +332,6 @@ struct ifmedia_description {
{ IFM_FDDI, "FDDI" }, \
{ IFM_IEEE80211, "IEEE 802.11 Wireless Ethernet" }, \
{ IFM_ATM, "ATM" }, \
- { IFM_CARP, "Common Address Redundancy Protocol" }, \
{ 0, NULL }, \
}
@@ -718,8 +712,6 @@ struct ifmedia_status_description {
{ "no network", "active" } }, \
{ IFM_ATM, IFM_AVALID, IFM_ACTIVE, \
{ "no network", "active" } }, \
- { IFM_CARP, IFM_AVALID, IFM_ACTIVE, \
- { "backup", "master" } }, \
{ 0, 0, 0, \
{ NULL, NULL } } \
}
diff --git a/sys/net/if_types.h b/sys/net/if_types.h
index c2effac..fe6ab5e 100644
--- a/sys/net/if_types.h
+++ b/sys/net/if_types.h
@@ -250,6 +250,5 @@
#define IFT_ENC 0xf4
#define IFT_PFLOG 0xf6
#define IFT_PFSYNC 0xf7
-#define IFT_CARP 0xf8 /* Common Address Redundancy Protocol */
#define IFT_IPXIP 0xf9 /* IPX over IP tunneling; no longer used. */
#endif /* !_NET_IF_TYPES_H_ */
diff --git a/sys/net/if_var.h b/sys/net/if_var.h
index e06a086..d1157af 100644
--- a/sys/net/if_var.h
+++ b/sys/net/if_var.h
@@ -69,6 +69,7 @@ struct rt_addrinfo;
struct socket;
struct ether_header;
struct carp_if;
+struct carp_softc;
struct ifvlantrunk;
struct route;
struct vnet;
@@ -188,11 +189,11 @@ struct ifnet {
int if_afdata_initialized;
struct rwlock if_afdata_lock;
struct task if_linktask; /* task for link change events */
- struct mtx if_addr_mtx; /* mutex to protect address lists */
+ struct rwlock if_addr_lock; /* lock to protect address lists */
LIST_ENTRY(ifnet) if_clones; /* interfaces of a cloner */
TAILQ_HEAD(, ifg_list) if_groups; /* linked list of groups per if */
- /* protected by if_addr_mtx */
+ /* protected by if_addr_lock */
void *if_pf_kif;
void *if_lagg; /* lagg glue */
char *if_description; /* interface description */
@@ -245,12 +246,17 @@ typedef void if_init_f_t(void *);
/*
* Locks for address lists on the network interface.
*/
-#define IF_ADDR_LOCK_INIT(if) mtx_init(&(if)->if_addr_mtx, \
- "if_addr_mtx", NULL, MTX_DEF)
-#define IF_ADDR_LOCK_DESTROY(if) mtx_destroy(&(if)->if_addr_mtx)
-#define IF_ADDR_LOCK(if) mtx_lock(&(if)->if_addr_mtx)
-#define IF_ADDR_UNLOCK(if) mtx_unlock(&(if)->if_addr_mtx)
-#define IF_ADDR_LOCK_ASSERT(if) mtx_assert(&(if)->if_addr_mtx, MA_OWNED)
+#define IF_ADDR_LOCK_INIT(if) rw_init(&(if)->if_addr_lock, "if_addr_lock")
+#define IF_ADDR_LOCK_DESTROY(if) rw_destroy(&(if)->if_addr_lock)
+#define IF_ADDR_WLOCK(if) rw_wlock(&(if)->if_addr_lock)
+#define IF_ADDR_WUNLOCK(if) rw_wunlock(&(if)->if_addr_lock)
+#define IF_ADDR_RLOCK(if) rw_rlock(&(if)->if_addr_lock)
+#define IF_ADDR_RUNLOCK(if) rw_runlock(&(if)->if_addr_lock)
+#define IF_ADDR_LOCK_ASSERT(if) rw_assert(&(if)->if_addr_lock, RA_LOCKED)
+#define IF_ADDR_WLOCK_ASSERT(if) rw_assert(&(if)->if_addr_lock, RA_WLOCKED)
+/* XXX: Compat. */
+#define IF_ADDR_LOCK(if) IF_ADDR_WLOCK(if)
+#define IF_ADDR_UNLOCK(if) IF_ADDR_WUNLOCK(if)
/*
* Function variations on locking macros intended to be used by loadable
@@ -729,6 +735,7 @@ struct ifaddr {
struct sockaddr *ifa_netmask; /* used to determine subnet */
struct if_data if_data; /* not all members are meaningful */
struct ifnet *ifa_ifp; /* back-pointer to interface */
+ struct carp_softc *ifa_carp; /* pointer to CARP data */
TAILQ_ENTRY(ifaddr) ifa_link; /* queue macro glue */
void (*ifa_rtrequest) /* check or clean routes (+ or -)'d */
(int, struct rtentry *, struct rt_addrinfo *);
@@ -865,7 +872,6 @@ void if_down(struct ifnet *);
struct ifmultiaddr *
if_findmulti(struct ifnet *, struct sockaddr *);
void if_free(struct ifnet *);
-void if_free_type(struct ifnet *, u_char);
void if_initname(struct ifnet *, const char *, int);
void if_link_state_change(struct ifnet *, int);
int if_printf(struct ifnet *, const char *, ...) __printflike(2, 3);
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c
index 51e1c6c..95ed455 100644
--- a/sys/net/if_vlan.c
+++ b/sys/net/if_vlan.c
@@ -114,7 +114,7 @@ struct ifvlan {
#endif
};
#define ifv_proto ifv_mib.ifvm_proto
-#define ifv_tag ifv_mib.ifvm_tag
+#define ifv_vid ifv_mib.ifvm_tag
#define ifv_encaplen ifv_mib.ifvm_encaplen
#define ifv_mtufudge ifv_mib.ifvm_mtufudge
#define ifv_mintu ifv_mib.ifvm_mintu
@@ -178,7 +178,7 @@ static int vlan_inshash(struct ifvlantrunk *trunk, struct ifvlan *ifv);
static int vlan_remhash(struct ifvlantrunk *trunk, struct ifvlan *ifv);
static void vlan_growhash(struct ifvlantrunk *trunk, int howmuch);
static __inline struct ifvlan * vlan_gethash(struct ifvlantrunk *trunk,
- uint16_t tag);
+ uint16_t vid);
#endif
static void trunk_destroy(struct ifvlantrunk *trunk);
@@ -198,7 +198,7 @@ static void vlan_link_state(struct ifnet *ifp);
static void vlan_capabilities(struct ifvlan *ifv);
static void vlan_trunk_capabilities(struct ifnet *ifp);
-static struct ifnet *vlan_clone_match_ethertag(struct if_clone *,
+static struct ifnet *vlan_clone_match_ethervid(struct if_clone *,
const char *, int *);
static int vlan_clone_match(struct if_clone *, const char *);
static int vlan_clone_create(struct if_clone *, char *, size_t, caddr_t);
@@ -266,9 +266,9 @@ vlan_inshash(struct ifvlantrunk *trunk, struct ifvlan *ifv)
KASSERT(trunk->hwidth > 0, ("%s: hwidth not positive", __func__));
b = 1 << trunk->hwidth;
- i = HASH(ifv->ifv_tag, trunk->hmask);
+ i = HASH(ifv->ifv_vid, trunk->hmask);
LIST_FOREACH(ifv2, &trunk->hash[i], ifv_list)
- if (ifv->ifv_tag == ifv2->ifv_tag)
+ if (ifv->ifv_vid == ifv2->ifv_vid)
return (EEXIST);
/*
@@ -278,7 +278,7 @@ vlan_inshash(struct ifvlantrunk *trunk, struct ifvlan *ifv)
*/
if (trunk->refcnt > (b * b) / 2) {
vlan_growhash(trunk, 1);
- i = HASH(ifv->ifv_tag, trunk->hmask);
+ i = HASH(ifv->ifv_vid, trunk->hmask);
}
LIST_INSERT_HEAD(&trunk->hash[i], ifv, ifv_list);
trunk->refcnt++;
@@ -296,7 +296,7 @@ vlan_remhash(struct ifvlantrunk *trunk, struct ifvlan *ifv)
KASSERT(trunk->hwidth > 0, ("%s: hwidth not positive", __func__));
b = 1 << trunk->hwidth;
- i = HASH(ifv->ifv_tag, trunk->hmask);
+ i = HASH(ifv->ifv_vid, trunk->hmask);
LIST_FOREACH(ifv2, &trunk->hash[i], ifv_list)
if (ifv2 == ifv) {
trunk->refcnt--;
@@ -348,7 +348,7 @@ vlan_growhash(struct ifvlantrunk *trunk, int howmuch)
for (i = 0; i < n; i++)
while ((ifv = LIST_FIRST(&trunk->hash[i])) != NULL) {
LIST_REMOVE(ifv, ifv_list);
- j = HASH(ifv->ifv_tag, n2 - 1);
+ j = HASH(ifv->ifv_vid, n2 - 1);
LIST_INSERT_HEAD(&hash2[j], ifv, ifv_list);
}
free(trunk->hash, M_VLAN);
@@ -362,14 +362,14 @@ vlan_growhash(struct ifvlantrunk *trunk, int howmuch)
}
static __inline struct ifvlan *
-vlan_gethash(struct ifvlantrunk *trunk, uint16_t tag)
+vlan_gethash(struct ifvlantrunk *trunk, uint16_t vid)
{
struct ifvlan *ifv;
TRUNK_LOCK_RASSERT(trunk);
- LIST_FOREACH(ifv, &trunk->hash[HASH(tag, trunk->hmask)], ifv_list)
- if (ifv->ifv_tag == tag)
+ LIST_FOREACH(ifv, &trunk->hash[HASH(vid, trunk->hmask)], ifv_list)
+ if (ifv->ifv_vid == vid)
return (ifv);
return (NULL);
}
@@ -393,19 +393,19 @@ vlan_dumphash(struct ifvlantrunk *trunk)
#else
static __inline struct ifvlan *
-vlan_gethash(struct ifvlantrunk *trunk, uint16_t tag)
+vlan_gethash(struct ifvlantrunk *trunk, uint16_t vid)
{
- return trunk->vlans[tag];
+ return trunk->vlans[vid];
}
static __inline int
vlan_inshash(struct ifvlantrunk *trunk, struct ifvlan *ifv)
{
- if (trunk->vlans[ifv->ifv_tag] != NULL)
+ if (trunk->vlans[ifv->ifv_vid] != NULL)
return EEXIST;
- trunk->vlans[ifv->ifv_tag] = ifv;
+ trunk->vlans[ifv->ifv_vid] = ifv;
trunk->refcnt++;
return (0);
@@ -415,7 +415,7 @@ static __inline int
vlan_remhash(struct ifvlantrunk *trunk, struct ifvlan *ifv)
{
- trunk->vlans[ifv->ifv_tag] = NULL;
+ trunk->vlans[ifv->ifv_vid] = NULL;
trunk->refcnt--;
return (0);
@@ -617,17 +617,21 @@ vlan_trunkdev(struct ifnet *ifp)
}
/*
- * Return the 16bit vlan tag for this interface.
+ * Return the 12-bit VLAN VID for this interface, for use by external
+ * components such as Infiniband.
+ *
+ * XXXRW: Note that the function name here is historical; it should be named
+ * vlan_vid().
*/
static int
-vlan_tag(struct ifnet *ifp, uint16_t *tagp)
+vlan_tag(struct ifnet *ifp, uint16_t *vidp)
{
struct ifvlan *ifv;
if (ifp->if_type != IFT_L2VLAN)
return (EINVAL);
ifv = ifp->if_softc;
- *tagp = ifv->ifv_tag;
+ *vidp = ifv->ifv_vid;
return (0);
}
@@ -663,10 +667,10 @@ vlan_setcookie(struct ifnet *ifp, void *cookie)
}
/*
- * Return the vlan device present at the specific tag.
+ * Return the vlan device present at the specific VID.
*/
static struct ifnet *
-vlan_devat(struct ifnet *ifp, uint16_t tag)
+vlan_devat(struct ifnet *ifp, uint16_t vid)
{
struct ifvlantrunk *trunk;
struct ifvlan *ifv;
@@ -676,7 +680,7 @@ vlan_devat(struct ifnet *ifp, uint16_t tag)
return (NULL);
ifp = NULL;
TRUNK_RLOCK(trunk);
- ifv = vlan_gethash(trunk, tag);
+ ifv = vlan_gethash(trunk, vid);
if (ifv)
ifp = ifv->ifv_ifp;
TRUNK_RUNLOCK(trunk);
@@ -786,11 +790,11 @@ VNET_SYSUNINIT(vnet_vlan_uninit, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_FIRST,
#endif
static struct ifnet *
-vlan_clone_match_ethertag(struct if_clone *ifc, const char *name, int *tag)
+vlan_clone_match_ethervid(struct if_clone *ifc, const char *name, int *vidp)
{
const char *cp;
struct ifnet *ifp;
- int t;
+ int vid;
/* Check for <etherif>.<vlan> style interface names. */
IFNET_RLOCK_NOSLEEP();
@@ -809,13 +813,13 @@ vlan_clone_match_ethertag(struct if_clone *ifc, const char *name, int *tag)
continue;
if (*cp == '\0')
continue;
- t = 0;
+ vid = 0;
for(; *cp >= '0' && *cp <= '9'; cp++)
- t = (t * 10) + (*cp - '0');
+ vid = (vid * 10) + (*cp - '0');
if (*cp != '\0')
continue;
- if (tag != NULL)
- *tag = t;
+ if (vidp != NULL)
+ *vidp = vid;
break;
}
IFNET_RUNLOCK_NOSLEEP();
@@ -828,7 +832,7 @@ vlan_clone_match(struct if_clone *ifc, const char *name)
{
const char *cp;
- if (vlan_clone_match_ethertag(ifc, name, NULL) != NULL)
+ if (vlan_clone_match_ethervid(ifc, name, NULL) != NULL)
return (1);
if (strncmp(VLANNAME, name, strlen(VLANNAME)) != 0)
@@ -848,7 +852,7 @@ vlan_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params)
int wildcard;
int unit;
int error;
- int tag;
+ int vid;
int ethertag;
struct ifvlan *ifv;
struct ifnet *ifp;
@@ -866,6 +870,9 @@ vlan_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params)
* must be configured separately.
* The first technique is preferred; the latter two are
* supported for backwards compatibilty.
+ *
+ * XXXRW: Note historic use of the word "tag" here. New ioctls may be
+ * called for.
*/
if (params) {
error = copyin(params, &vlr, sizeof(vlr));
@@ -875,7 +882,7 @@ vlan_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params)
if (p == NULL)
return ENXIO;
/*
- * Don't let the caller set up a VLAN tag with
+ * Don't let the caller set up a VLAN VID with
* anything except VLID bits.
*/
if (vlr.vlr_tag & ~EVL_VLID_MASK)
@@ -885,18 +892,18 @@ vlan_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params)
return (error);
ethertag = 1;
- tag = vlr.vlr_tag;
+ vid = vlr.vlr_tag;
wildcard = (unit < 0);
- } else if ((p = vlan_clone_match_ethertag(ifc, name, &tag)) != NULL) {
+ } else if ((p = vlan_clone_match_ethervid(ifc, name, &vid)) != NULL) {
ethertag = 1;
unit = -1;
wildcard = 0;
/*
- * Don't let the caller set up a VLAN tag with
+ * Don't let the caller set up a VLAN VID with
* anything except VLID bits.
*/
- if (tag & ~EVL_VLID_MASK)
+ if (vid & ~EVL_VLID_MASK)
return (EINVAL);
} else {
ethertag = 0;
@@ -958,7 +965,7 @@ vlan_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params)
sdl->sdl_type = IFT_L2VLAN;
if (ethertag) {
- error = vlan_config(ifv, p, tag);
+ error = vlan_config(ifv, p, vid);
if (error != 0) {
/*
* Since we've partialy failed, we need to back
@@ -1012,10 +1019,12 @@ vlan_transmit(struct ifnet *ifp, struct mbuf *m)
{
struct ifvlan *ifv;
struct ifnet *p;
- int error;
+ int error, len, mcast;
ifv = ifp->if_softc;
p = PARENT(ifv);
+ len = m->m_pkthdr.len;
+ mcast = (m->m_flags & (M_MCAST | M_BCAST)) ? 1 : 0;
BPF_MTAP(ifp, m);
@@ -1025,7 +1034,7 @@ vlan_transmit(struct ifnet *ifp, struct mbuf *m)
*/
if (!UP_AND_RUNNING(p)) {
m_freem(m);
- ifp->if_collisions++;
+ ifp->if_oerrors++;
return (0);
}
@@ -1066,10 +1075,10 @@ vlan_transmit(struct ifnet *ifp, struct mbuf *m)
* packet tag that holds it.
*/
if (p->if_capenable & IFCAP_VLAN_HWTAGGING) {
- m->m_pkthdr.ether_vtag = ifv->ifv_tag;
+ m->m_pkthdr.ether_vtag = ifv->ifv_vid;
m->m_flags |= M_VLANTAG;
} else {
- m = ether_vlanencap(m, ifv->ifv_tag);
+ m = ether_vlanencap(m, ifv->ifv_vid);
if (m == NULL) {
if_printf(ifp, "unable to prepend VLAN header\n");
ifp->if_oerrors++;
@@ -1081,9 +1090,11 @@ vlan_transmit(struct ifnet *ifp, struct mbuf *m)
* Send it, precisely as ether_output() would have.
*/
error = (p->if_transmit)(p, m);
- if (!error)
+ if (!error) {
ifp->if_opackets++;
- else
+ ifp->if_omcasts += mcast;
+ ifp->if_obytes += len;
+ } else
ifp->if_oerrors++;
return (error);
}
@@ -1101,7 +1112,7 @@ vlan_input(struct ifnet *ifp, struct mbuf *m)
{
struct ifvlantrunk *trunk = ifp->if_vlantrunk;
struct ifvlan *ifv;
- uint16_t tag;
+ uint16_t vid;
KASSERT(trunk != NULL, ("%s: no trunk", __func__));
@@ -1110,7 +1121,7 @@ vlan_input(struct ifnet *ifp, struct mbuf *m)
* Packet is tagged, but m contains a normal
* Ethernet frame; the tag is stored out-of-band.
*/
- tag = EVL_VLANOFTAG(m->m_pkthdr.ether_vtag);
+ vid = EVL_VLANOFTAG(m->m_pkthdr.ether_vtag);
m->m_flags &= ~M_VLANTAG;
} else {
struct ether_vlan_header *evl;
@@ -1126,7 +1137,7 @@ vlan_input(struct ifnet *ifp, struct mbuf *m)
return;
}
evl = mtod(m, struct ether_vlan_header *);
- tag = EVL_VLANOFTAG(ntohs(evl->evl_tag));
+ vid = EVL_VLANOFTAG(ntohs(evl->evl_tag));
/*
* Remove the 802.1q header by copying the Ethernet
@@ -1151,7 +1162,7 @@ vlan_input(struct ifnet *ifp, struct mbuf *m)
}
TRUNK_RLOCK(trunk);
- ifv = vlan_gethash(trunk, tag);
+ ifv = vlan_gethash(trunk, vid);
if (ifv == NULL || !UP_AND_RUNNING(ifv->ifv_ifp)) {
TRUNK_RUNLOCK(trunk);
m_freem(m);
@@ -1168,14 +1179,14 @@ vlan_input(struct ifnet *ifp, struct mbuf *m)
}
static int
-vlan_config(struct ifvlan *ifv, struct ifnet *p, uint16_t tag)
+vlan_config(struct ifvlan *ifv, struct ifnet *p, uint16_t vid)
{
struct ifvlantrunk *trunk;
struct ifnet *ifp;
int error = 0;
/* VID numbers 0x0 and 0xFFF are reserved */
- if (tag == 0 || tag == 0xFFF)
+ if (vid == 0 || vid == 0xFFF)
return (EINVAL);
if (p->if_type != IFT_ETHER &&
(p->if_capenable & IFCAP_VLAN_HWTAGGING) == 0)
@@ -1207,7 +1218,7 @@ exists:
TRUNK_LOCK(trunk);
}
- ifv->ifv_tag = tag; /* must set this before vlan_inshash() */
+ ifv->ifv_vid = vid; /* must set this before vlan_inshash() */
error = vlan_inshash(trunk, ifv);
if (error)
goto done;
@@ -1285,7 +1296,7 @@ exists:
done:
TRUNK_UNLOCK(trunk);
if (error == 0)
- EVENTHANDLER_INVOKE(vlan_config, p, ifv->ifv_tag);
+ EVENTHANDLER_INVOKE(vlan_config, p, ifv->ifv_vid);
VLAN_UNLOCK();
return (error);
@@ -1373,7 +1384,7 @@ vlan_unconfig_locked(struct ifnet *ifp)
* to cleanup anyway.
*/
if (parent != NULL)
- EVENTHANDLER_INVOKE(vlan_unconfig, parent, ifv->ifv_tag);
+ EVENTHANDLER_INVOKE(vlan_unconfig, parent, ifv->ifv_vid);
}
/* Handle a reference counted flag that should be set on the parent as well */
@@ -1593,6 +1604,13 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
case SIOCSETVLAN:
#ifdef VIMAGE
+ /*
+ * XXXRW/XXXBZ: The goal in these checks is to allow a VLAN
+ * interface to be delegated to a jail without allowing the
+ * jail to change what underlying interface/VID it is
+ * associated with. We are not entirely convinced that this
+ * is the right way to accomplish that policy goal.
+ */
if (ifp->if_vnet != ifp->if_home_vnet) {
error = EPERM;
break;
@@ -1611,7 +1629,7 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
break;
}
/*
- * Don't let the caller set up a VLAN tag with
+ * Don't let the caller set up a VLAN VID with
* anything except VLID bits.
*/
if (vlr.vlr_tag & ~EVL_VLID_MASK) {
@@ -1638,7 +1656,7 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
if (TRUNK(ifv) != NULL) {
strlcpy(vlr.vlr_parent, PARENT(ifv)->if_xname,
sizeof(vlr.vlr_parent));
- vlr.vlr_tag = ifv->ifv_tag;
+ vlr.vlr_tag = ifv->ifv_vid;
}
VLAN_UNLOCK();
error = copyout(&vlr, ifr->ifr_data, sizeof(vlr));
diff --git a/sys/net/if_vlan_var.h b/sys/net/if_vlan_var.h
index fd3fc4f..4eb3b09 100644
--- a/sys/net/if_vlan_var.h
+++ b/sys/net/if_vlan_var.h
@@ -108,7 +108,7 @@ struct vlanreq {
* received VLAN tag (containing both vlan and priority information)
* into the ether_vtag mbuf packet header field:
*
- * m->m_pkthdr.ether_vtag = vlan_id; // ntohs()?
+ * m->m_pkthdr.ether_vtag = vtag; // ntohs()?
* m->m_flags |= M_VLANTAG;
*
* to mark the packet m with the specified VLAN tag.
@@ -133,15 +133,15 @@ struct vlanreq {
#define VLAN_TRUNKDEV(_ifp) \
(_ifp)->if_type == IFT_L2VLAN ? (*vlan_trunkdev_p)((_ifp)) : NULL
-#define VLAN_TAG(_ifp, _tag) \
- (_ifp)->if_type == IFT_L2VLAN ? (*vlan_tag_p)((_ifp), (_tag)) : EINVAL
+#define VLAN_TAG(_ifp, _vid) \
+ (_ifp)->if_type == IFT_L2VLAN ? (*vlan_tag_p)((_ifp), (_vid)) : EINVAL
#define VLAN_COOKIE(_ifp) \
(_ifp)->if_type == IFT_L2VLAN ? (*vlan_cookie_p)((_ifp)) : NULL
#define VLAN_SETCOOKIE(_ifp, _cookie) \
(_ifp)->if_type == IFT_L2VLAN ? \
(*vlan_setcookie_p)((_ifp), (_cookie)) : EINVAL
-#define VLAN_DEVAT(_ifp, _tag) \
- (_ifp)->if_vlantrunk != NULL ? (*vlan_devat_p)((_ifp), (_tag)) : NULL
+#define VLAN_DEVAT(_ifp, _vid) \
+ (_ifp)->if_vlantrunk != NULL ? (*vlan_devat_p)((_ifp), (_vid)) : NULL
extern void (*vlan_trunk_cap_p)(struct ifnet *);
extern struct ifnet *(*vlan_trunkdev_p)(struct ifnet *);
diff --git a/sys/net/route.c b/sys/net/route.c
index 85a2c84..296914b 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -1128,8 +1128,7 @@ rtrequest1_fib(int req, struct rt_addrinfo *info, struct rtentry **ret_nrt,
ifa = info->rti_ifa;
rt = uma_zalloc(V_rtzone, M_NOWAIT | M_ZERO);
if (rt == NULL) {
- if (ifa != NULL)
- ifa_free(ifa);
+ ifa_free(ifa);
senderr(ENOBUFS);
}
RT_LOCK_INIT(rt);
@@ -1142,8 +1141,7 @@ rtrequest1_fib(int req, struct rt_addrinfo *info, struct rtentry **ret_nrt,
RT_LOCK(rt);
if ((error = rt_setgate(rt, dst, gateway)) != 0) {
RT_LOCK_DESTROY(rt);
- if (ifa != NULL)
- ifa_free(ifa);
+ ifa_free(ifa);
uma_zfree(V_rtzone, rt);
senderr(error);
}
@@ -1174,9 +1172,7 @@ rtrequest1_fib(int req, struct rt_addrinfo *info, struct rtentry **ret_nrt,
/* do not permit exactly the same dst/mask/gw pair */
if (rn_mpath_capable(rnh) &&
rt_mpath_conflict(rnh, rt, netmask)) {
- if (rt->rt_ifa) {
- ifa_free(rt->rt_ifa);
- }
+ ifa_free(rt->rt_ifa);
Free(rt_key(rt));
RT_LOCK_DESTROY(rt);
uma_zfree(V_rtzone, rt);
@@ -1241,8 +1237,7 @@ rtrequest1_fib(int req, struct rt_addrinfo *info, struct rtentry **ret_nrt,
* then un-make it (this should be a function)
*/
if (rn == NULL) {
- if (rt->rt_ifa)
- ifa_free(rt->rt_ifa);
+ ifa_free(rt->rt_ifa);
Free(rt_key(rt));
RT_LOCK_DESTROY(rt);
uma_zfree(V_rtzone, rt);
@@ -1503,10 +1498,10 @@ rtinit1(struct ifaddr *ifa, int cmd, int flags, int fibnum)
#ifdef RADIX_MPATH
/*
* in case address alias finds the first address
- * e.g. ifconfig bge0 192.103.54.246/24
- * e.g. ifconfig bge0 192.103.54.247/24
- * the address set in the route is 192.103.54.246
- * so we need to replace it with 192.103.54.247
+ * e.g. ifconfig bge0 192.0.2.246/24
+ * e.g. ifconfig bge0 192.0.2.247/24
+ * the address set in the route is 192.0.2.246
+ * so we need to replace it with 192.0.2.247
*/
if (memcmp(rt->rt_ifa->ifa_addr,
ifa->ifa_addr, ifa->ifa_addr->sa_len)) {
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c
index b2313c0..4da2e1b 100644
--- a/sys/net/rtsock.c
+++ b/sys/net/rtsock.c
@@ -63,6 +63,7 @@
#include <netinet/in.h>
#include <netinet/if_ether.h>
+#include <netinet/ip_carp.h>
#ifdef INET6
#include <netinet6/scope6_var.h>
#endif
@@ -83,7 +84,7 @@ struct if_data32 {
uint8_t ifi_addrlen;
uint8_t ifi_hdrlen;
uint8_t ifi_link_state;
- uint8_t ifi_spare_char1;
+ uint8_t ifi_vhid;
uint8_t ifi_spare_char2;
uint8_t ifi_datalen;
uint32_t ifi_mtu;
@@ -122,6 +123,9 @@ MALLOC_DEFINE(M_RTABLE, "routetbl", "routing tables");
static struct sockaddr route_src = { 2, PF_ROUTE, };
static struct sockaddr sa_zero = { sizeof(sa_zero), AF_INET, };
+/* These are external hooks for CARP. */
+int (*carp_get_vhid_p)(struct ifaddr *);
+
/*
* Used by rtsock/raw_input callback code to decide whether to filter the update
* notification to a socket bound to a particular FIB.
@@ -452,7 +456,7 @@ rtm_get_jailed(struct rt_addrinfo *info, struct ifnet *ifp,
* Try to find an address on the given outgoing interface
* that belongs to the jail.
*/
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
struct sockaddr *sa;
sa = ifa->ifa_addr;
@@ -464,7 +468,7 @@ rtm_get_jailed(struct rt_addrinfo *info, struct ifnet *ifp,
break;
}
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
if (!found) {
/*
* As a last resort return the 'default' jail address.
@@ -494,7 +498,7 @@ rtm_get_jailed(struct rt_addrinfo *info, struct ifnet *ifp,
* Try to find an address on the given outgoing interface
* that belongs to the jail.
*/
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
struct sockaddr *sa;
sa = ifa->ifa_addr;
@@ -507,7 +511,7 @@ rtm_get_jailed(struct rt_addrinfo *info, struct ifnet *ifp,
break;
}
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
if (!found) {
/*
* As a last resort return the 'default' jail address.
@@ -1508,6 +1512,7 @@ copy_ifdata32(struct if_data *src, struct if_data32 *dst)
CP(*src, *dst, ifi_addrlen);
CP(*src, *dst, ifi_hdrlen);
CP(*src, *dst, ifi_link_state);
+ CP(*src, *dst, ifi_vhid);
dst->ifi_datalen = sizeof(struct if_data32);
CP(*src, *dst, ifi_mtu);
CP(*src, *dst, ifi_metric);
@@ -1542,7 +1547,7 @@ sysctl_iflist(int af, struct walkarg *w)
TAILQ_FOREACH(ifp, &V_ifnet, if_link) {
if (w->w_arg && w->w_arg != ifp->if_index)
continue;
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
ifa = ifp->if_addr;
info.rti_info[RTAX_IFP] = ifa->ifa_addr;
len = rt_msg2(RTM_IFINFO, &info, NULL, w);
@@ -1559,6 +1564,9 @@ sysctl_iflist(int af, struct walkarg *w)
ifm32->ifm_flags = ifp->if_flags |
ifp->if_drv_flags;
copy_ifdata32(&ifp->if_data, &ifm32->ifm_data);
+ if (carp_get_vhid_p != NULL)
+ ifm32->ifm_data.ifi_vhid =
+ (*carp_get_vhid_p)(ifa);
ifm32->ifm_addrs = info.rti_addrs;
error = SYSCTL_OUT(w->w_req, (caddr_t)ifm32,
len);
@@ -1569,6 +1577,9 @@ sysctl_iflist(int af, struct walkarg *w)
ifm->ifm_index = ifp->if_index;
ifm->ifm_flags = ifp->if_flags | ifp->if_drv_flags;
ifm->ifm_data = ifp->if_data;
+ if (carp_get_vhid_p != NULL)
+ ifm->ifm_data.ifi_vhid =
+ (*carp_get_vhid_p)(ifa);
ifm->ifm_addrs = info.rti_addrs;
error = SYSCTL_OUT(w->w_req, (caddr_t)ifm, len);
#ifdef COMPAT_FREEBSD32
@@ -1595,18 +1606,22 @@ sysctl_iflist(int af, struct walkarg *w)
ifam->ifam_flags = ifa->ifa_flags;
ifam->ifam_metric = ifa->ifa_metric;
ifam->ifam_addrs = info.rti_addrs;
+ ifam->ifam_data = ifa->if_data;
+ if (carp_get_vhid_p != NULL)
+ ifam->ifam_data.ifi_vhid =
+ (*carp_get_vhid_p)(ifa);
error = SYSCTL_OUT(w->w_req, w->w_tmem, len);
if (error)
goto done;
}
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
info.rti_info[RTAX_IFA] = info.rti_info[RTAX_NETMASK] =
info.rti_info[RTAX_BRD] = NULL;
}
done:
if (ifp != NULL)
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
IFNET_RUNLOCK();
return (error);
}
@@ -1627,7 +1642,7 @@ sysctl_ifmalist(int af, struct walkarg *w)
continue;
ifa = ifp->if_addr;
info.rti_info[RTAX_IFP] = ifa ? ifa->ifa_addr : NULL;
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
if (af && af != ifma->ifma_addr->sa_family)
continue;
@@ -1648,12 +1663,12 @@ sysctl_ifmalist(int af, struct walkarg *w)
ifmam->ifmam_addrs = info.rti_addrs;
error = SYSCTL_OUT(w->w_req, w->w_tmem, len);
if (error) {
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
goto done;
}
}
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
}
done:
IFNET_RUNLOCK();
diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c
index cf5945a..d866bbf 100644
--- a/sys/net80211/ieee80211.c
+++ b/sys/net80211/ieee80211.c
@@ -276,7 +276,7 @@ ieee80211_ifattach(struct ieee80211com *ic,
/* Create a taskqueue for all state changes */
ic->ic_tq = taskqueue_create("ic_taskq", M_WAITOK | M_ZERO,
taskqueue_thread_enqueue, &ic->ic_tq);
- taskqueue_start_threads(&ic->ic_tq, 1, PI_NET, "%s taskq",
+ taskqueue_start_threads(&ic->ic_tq, 1, PI_NET, "%s net80211 taskq",
ifp->if_xname);
/*
* Fill in 802.11 available channel set, mark all
@@ -384,9 +384,9 @@ default_reset(struct ieee80211vap *vap, u_long cmd)
*/
int
ieee80211_vap_setup(struct ieee80211com *ic, struct ieee80211vap *vap,
- const char name[IFNAMSIZ], int unit, int opmode, int flags,
- const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t macaddr[IEEE80211_ADDR_LEN])
+ const char name[IFNAMSIZ], int unit, enum ieee80211_opmode opmode,
+ int flags, const uint8_t bssid[IEEE80211_ADDR_LEN],
+ const uint8_t macaddr[IEEE80211_ADDR_LEN])
{
struct ifnet *ifp;
@@ -447,6 +447,8 @@ ieee80211_vap_setup(struct ieee80211com *ic, struct ieee80211vap *vap,
}
break;
#endif
+ default:
+ break;
}
/* auto-enable s/w beacon miss support */
if (flags & IEEE80211_CLONE_NOBEACONS)
@@ -1008,7 +1010,8 @@ ieee80211_media_setup(struct ieee80211com *ic,
struct ifmedia *media, int caps, int addsta,
ifm_change_cb_t media_change, ifm_stat_cb_t media_stat)
{
- int i, j, mode, rate, maxrate, mword, r;
+ int i, j, rate, maxrate, mword, r;
+ enum ieee80211_phymode mode;
const struct ieee80211_rateset *rs;
struct ieee80211_rateset allrates;
@@ -1137,7 +1140,8 @@ void
ieee80211_announce(struct ieee80211com *ic)
{
struct ifnet *ifp = ic->ic_ifp;
- int i, mode, rate, mword;
+ int i, rate, mword;
+ enum ieee80211_phymode mode;
const struct ieee80211_rateset *rs;
/* NB: skip AUTO since it has no rates */
diff --git a/sys/net80211/ieee80211_acl.c b/sys/net80211/ieee80211_acl.c
index d39c428..ac604fb 100644
--- a/sys/net80211/ieee80211_acl.c
+++ b/sys/net80211/ieee80211_acl.c
@@ -152,7 +152,7 @@ _acl_free(struct aclstate *as, struct acl *acl)
}
static int
-acl_check(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN])
+acl_check(struct ieee80211vap *vap, const struct ieee80211_frame *wh)
{
struct aclstate *as = vap->iv_as;
@@ -161,9 +161,9 @@ acl_check(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN])
case ACL_POLICY_RADIUS:
return 1;
case ACL_POLICY_ALLOW:
- return _find_acl(as, mac) != NULL;
+ return _find_acl(as, wh->i_addr2) != NULL;
case ACL_POLICY_DENY:
- return _find_acl(as, mac) == NULL;
+ return _find_acl(as, wh->i_addr2) == NULL;
}
return 0; /* should not happen */
}
diff --git a/sys/net80211/ieee80211_hostap.c b/sys/net80211/ieee80211_hostap.c
index e190450..72e1771 100644
--- a/sys/net80211/ieee80211_hostap.c
+++ b/sys/net80211/ieee80211_hostap.c
@@ -1795,6 +1795,15 @@ hostap_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0,
return;
}
/*
+ * Consult the ACL policy module if setup.
+ */
+ if (vap->iv_acl != NULL && !vap->iv_acl->iac_check(vap, wh)) {
+ IEEE80211_DISCARD(vap, IEEE80211_MSG_ACL,
+ wh, NULL, "%s", "disallowed by ACL");
+ vap->iv_stats.is_rx_acl++;
+ return;
+ }
+ /*
* prreq frame format
* [tlv] ssid
* [tlv] supported rates
@@ -1873,8 +1882,7 @@ hostap_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0,
/*
* Consult the ACL policy module if setup.
*/
- if (vap->iv_acl != NULL &&
- !vap->iv_acl->iac_check(vap, wh->i_addr2)) {
+ if (vap->iv_acl != NULL && !vap->iv_acl->iac_check(vap, wh)) {
IEEE80211_DISCARD(vap, IEEE80211_MSG_ACL,
wh, NULL, "%s", "disallowed by ACL");
vap->iv_stats.is_rx_acl++;
diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c
index c49a178..23a765f 100644
--- a/sys/net80211/ieee80211_ht.c
+++ b/sys/net80211/ieee80211_ht.c
@@ -307,7 +307,8 @@ ieee80211_ht_vdetach(struct ieee80211vap *vap)
}
static int
-ht_getrate(struct ieee80211com *ic, int index, int mode, int ratetype)
+ht_getrate(struct ieee80211com *ic, int index, enum ieee80211_phymode mode,
+ int ratetype)
{
int mword, rate;
@@ -350,7 +351,7 @@ static struct printranges {
};
static void
-ht_rateprint(struct ieee80211com *ic, int mode, int ratetype)
+ht_rateprint(struct ieee80211com *ic, enum ieee80211_phymode mode, int ratetype)
{
struct ifnet *ifp = ic->ic_ifp;
int minrate, maxrate;
@@ -379,7 +380,7 @@ ht_rateprint(struct ieee80211com *ic, int mode, int ratetype)
}
static void
-ht_announce(struct ieee80211com *ic, int mode)
+ht_announce(struct ieee80211com *ic, enum ieee80211_phymode mode)
{
struct ifnet *ifp = ic->ic_ifp;
const char *modestr = ieee80211_phymode_name[mode];
@@ -432,7 +433,7 @@ ieee80211_get_suphtrates(struct ieee80211com *ic,
ADDRATE(i);
if ((ic->ic_htcaps & IEEE80211_HTCAP_CHWIDTH40) &&
(ic->ic_htcaps & IEEE80211_HTC_TXMCS32))
- ADDRATE(i);
+ ADDRATE(32);
if (ic->ic_htcaps & IEEE80211_HTC_TXUNEQUAL) {
if (ic->ic_txstream >= 2) {
for (i = 33; i <= 38; i++)
diff --git a/sys/net80211/ieee80211_hwmp.c b/sys/net80211/ieee80211_hwmp.c
index 93a9e55..86d8e36 100644
--- a/sys/net80211/ieee80211_hwmp.c
+++ b/sys/net80211/ieee80211_hwmp.c
@@ -33,15 +33,15 @@ __FBSDID("$FreeBSD$");
/*
* IEEE 802.11s Hybrid Wireless Mesh Protocol, HWMP.
- *
+ *
* Based on March 2009, D3.0 802.11s draft spec.
*/
#include "opt_inet.h"
#include "opt_wlan.h"
#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/mbuf.h>
+#include <sys/systm.h>
+#include <sys/mbuf.h>
#include <sys/malloc.h>
#include <sys/kernel.h>
@@ -139,9 +139,13 @@ static const uint8_t broadcastaddr[IEEE80211_ADDR_LEN] =
typedef uint32_t ieee80211_hwmp_seq;
#define HWMP_SEQ_LT(a, b) ((int32_t)((a)-(b)) < 0)
#define HWMP_SEQ_LEQ(a, b) ((int32_t)((a)-(b)) <= 0)
+#define HWMP_SEQ_EQ(a, b) ((int32_t)((a)-(b)) == 0)
#define HWMP_SEQ_GT(a, b) ((int32_t)((a)-(b)) > 0)
#define HWMP_SEQ_GEQ(a, b) ((int32_t)((a)-(b)) >= 0)
+/* The longer one of the lifetime should be stored as new lifetime */
+#define MESH_ROUTE_LIFETIME_MAX(a, b) (a > b ? a : b)
+
/*
* Private extension of ieee80211_mesh_route.
*/
@@ -677,7 +681,9 @@ hwmp_recv_preq(struct ieee80211vap *vap, struct ieee80211_node *ni,
struct ieee80211_mesh_state *ms = vap->iv_mesh;
struct ieee80211_mesh_route *rt = NULL;
struct ieee80211_mesh_route *rtorig = NULL;
- struct ieee80211_hwmp_route *hrorig;
+ struct ieee80211_mesh_route *rttarg = NULL;
+ struct ieee80211_hwmp_route *hrorig = NULL;
+ struct ieee80211_hwmp_route *hrtarg = NULL;
struct ieee80211_hwmp_state *hs = vap->iv_hwmp;
struct ieee80211_meshprep_ie prep;
@@ -692,46 +698,89 @@ hwmp_recv_preq(struct ieee80211vap *vap, struct ieee80211_node *ni,
return;
IEEE80211_NOTE(vap, IEEE80211_MSG_HWMP, ni,
- "received PREQ, source %s", ether_sprintf(preq->preq_origaddr));
+ "received PREQ, source %6D", preq->preq_origaddr, ":");
/*
- * Acceptance criteria: if the PREQ is not for us and
- * forwarding is disabled, discard this PREQ.
+ * Acceptance criteria: if the PREQ is not for us or not broadcast
+ * AND forwarding is disabled, discard this PREQ.
+ * XXX: need to check PROXY
*/
- if (!IEEE80211_ADDR_EQ(vap->iv_myaddr, PREQ_TADDR(0)) &&
+ if ((!IEEE80211_ADDR_EQ(vap->iv_myaddr, PREQ_TADDR(0)) ||
+ !IEEE80211_IS_MULTICAST(PREQ_TADDR(0))) &&
!(ms->ms_flags & IEEE80211_MESHFLAGS_FWD)) {
IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_HWMP,
preq->preq_origaddr, NULL, "%s", "not accepting PREQ");
return;
}
+ /*
+ * Acceptance criteria: if unicast addressed
+ * AND no valid forwarding for Target of PREQ, discard this PREQ.
+ */
+ rttarg = ieee80211_mesh_rt_find(vap, PREQ_TADDR(0));
+ if(rttarg != NULL)
+ hrtarg = IEEE80211_MESH_ROUTE_PRIV(rttarg,
+ struct ieee80211_hwmp_route);
+ /* Address mode: ucast */
+ if((preq->preq_flags & IEEE80211_MESHPREQ_FLAGS_AM) == 0 &&
+ rttarg == NULL &&
+ !IEEE80211_ADDR_EQ(vap->iv_myaddr, PREQ_TADDR(0))) {
+ IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_HWMP,
+ preq->preq_origaddr, NULL,
+ "unicast addressed PREQ of unknown target %6D",
+ PREQ_TADDR(0), ":");
+ return;
+ }
+
+ /* PREQ ACCEPTED */
+
rtorig = ieee80211_mesh_rt_find(vap, preq->preq_origaddr);
- if (rtorig == NULL)
+ if (rtorig == NULL) {
rtorig = ieee80211_mesh_rt_add(vap, preq->preq_origaddr);
+ IEEE80211_NOTE(vap, IEEE80211_MSG_HWMP, ni,
+ "adding originator %6D", preq->preq_origaddr, ":");
+ }
if (rtorig == NULL) {
/* XXX stat */
return;
}
hrorig = IEEE80211_MESH_ROUTE_PRIV(rtorig, struct ieee80211_hwmp_route);
- /*
- * Sequence number validation.
+
+ /* Data creation and update of forwarding information
+ * according to Table 11C-8 for originator mesh STA.
*/
- if (HWMP_SEQ_LEQ(preq->preq_id, hrorig->hr_preqid) &&
- HWMP_SEQ_LEQ(preq->preq_origseq, hrorig->hr_seq)) {
+ if(HWMP_SEQ_GT(preq->preq_origseq, hrorig->hr_seq) ||
+ (HWMP_SEQ_EQ(preq->preq_origseq, hrorig->hr_seq) &&
+ preq->preq_metric < rtorig->rt_metric)) {
+ hrorig->hr_seq = preq->preq_origseq;
+ IEEE80211_ADDR_COPY(rtorig->rt_nexthop, wh->i_addr2);
+ rtorig->rt_metric = preq->preq_metric +
+ ms->ms_pmetric->mpm_metric(ni);
+ rtorig->rt_nhops = preq->preq_hopcount + 1;
+ rtorig->rt_lifetime = MESH_ROUTE_LIFETIME_MAX(
+ preq->preq_lifetime, rtorig->rt_lifetime);
+ /* path to orig is valid now */
+ rtorig->rt_flags |= IEEE80211_MESHRT_FLAGS_VALID;
+ }else if(hrtarg != NULL &&
+ HWMP_SEQ_EQ(hrtarg->hr_seq, PREQ_TSEQ(0)) &&
+ (rtorig->rt_flags & IEEE80211_MESHRT_FLAGS_VALID) == 0) {
IEEE80211_NOTE(vap, IEEE80211_MSG_HWMP, ni,
- "discard PREQ from %s, old seq no %u <= %u",
- ether_sprintf(preq->preq_origaddr),
+ "discard PREQ from %6D, old seq no %u <= %u",
+ preq->preq_origaddr, ":",
preq->preq_origseq, hrorig->hr_seq);
return;
}
- hrorig->hr_preqid = preq->preq_id;
- hrorig->hr_seq = preq->preq_origseq;
+
+ /*
+ * Forwarding information for transmitter mesh STA
+ * [OPTIONAL: if metric improved]
+ */
/*
* Check if the PREQ is addressed to us.
*/
if (IEEE80211_ADDR_EQ(vap->iv_myaddr, PREQ_TADDR(0))) {
IEEE80211_NOTE(vap, IEEE80211_MSG_HWMP, ni,
- "reply to %s", ether_sprintf(preq->preq_origaddr));
+ "reply to %6D", preq->preq_origaddr, ":");
/*
* Build and send a PREP frame.
*/
@@ -771,14 +820,14 @@ hwmp_recv_preq(struct ieee80211vap *vap, struct ieee80211_node *ni,
rt = ieee80211_mesh_rt_add(vap, rootmac);
if (rt == NULL) {
IEEE80211_NOTE(vap, IEEE80211_MSG_HWMP, ni,
- "unable to add root mesh path to %s",
- ether_sprintf(rootmac));
+ "unable to add root mesh path to %6D",
+ rootmac, ":");
vap->iv_stats.is_mesh_rtaddfailed++;
return;
}
}
IEEE80211_NOTE(vap, IEEE80211_MSG_HWMP, ni,
- "root mesh station @ %s", ether_sprintf(rootmac));
+ "root mesh station @ %6D", rootmac, ":");
/*
* Reply with a PREP if we don't have a path to the root
@@ -819,25 +868,28 @@ hwmp_recv_preq(struct ieee80211vap *vap, struct ieee80211_node *ni,
if (preq->preq_ttl > 1 &&
preq->preq_hopcount < hs->hs_maxhops) {
IEEE80211_NOTE(vap, IEEE80211_MSG_HWMP, ni,
- "forward PREQ from %s",
- ether_sprintf(preq->preq_origaddr));
+ "forward PREQ from %6D",
+ preq->preq_origaddr, ":");
/*
* Propagate the original PREQ.
+ * PREQ is unicast now to rt->rt_nexthop
*/
+ ppreq.preq_flags &=
+ ~IEEE80211_MESHPREQ_FLAGS_AM;
ppreq.preq_hopcount += 1;
ppreq.preq_ttl -= 1;
ppreq.preq_metric +=
ms->ms_pmetric->mpm_metric(ni);
/*
- * Set TO and unset RF bits because we are going
- * to send a PREP next.
+ * Set TO and unset RF bits because we are
+ * going to send a PREP next.
*/
ppreq.preq_targets[0].target_flags |=
IEEE80211_MESHPREQ_TFLAGS_TO;
ppreq.preq_targets[0].target_flags &=
~IEEE80211_MESHPREQ_TFLAGS_RF;
hwmp_send_preq(ni, vap->iv_myaddr,
- broadcastaddr, &ppreq);
+ rt->rt_nexthop, &ppreq);
}
/*
* Check if we can send an intermediate Path Reply,
@@ -847,8 +899,8 @@ hwmp_recv_preq(struct ieee80211vap *vap, struct ieee80211_node *ni,
struct ieee80211_meshprep_ie prep;
IEEE80211_NOTE(vap, IEEE80211_MSG_HWMP, ni,
- "intermediate reply for PREQ from %s",
- ether_sprintf(preq->preq_origaddr));
+ "intermediate reply for PREQ from %6D",
+ preq->preq_origaddr, ":");
prep.prep_flags = 0;
prep.prep_hopcount = rt->rt_nhops + 1;
prep.prep_ttl = ms->ms_ttl;
@@ -873,9 +925,10 @@ hwmp_recv_preq(struct ieee80211vap *vap, struct ieee80211_node *ni,
if (rt == NULL) {
rt = ieee80211_mesh_rt_add(vap, PREQ_TADDR(0));
if (rt == NULL) {
- IEEE80211_NOTE(vap, IEEE80211_MSG_HWMP,
- ni, "unable to add PREQ path to %s",
- ether_sprintf(PREQ_TADDR(0)));
+ IEEE80211_NOTE(vap,
+ IEEE80211_MSG_HWMP, ni,
+ "unable to add PREQ path to %6D",
+ PREQ_TADDR(0), ":");
vap->iv_stats.is_mesh_rtaddfailed++;
return;
}
@@ -888,8 +941,8 @@ hwmp_recv_preq(struct ieee80211vap *vap, struct ieee80211_node *ni,
hrorig->hr_preqid = preq->preq_id;
IEEE80211_NOTE(vap, IEEE80211_MSG_HWMP, ni,
- "forward PREQ from %s",
- ether_sprintf(preq->preq_origaddr));
+ "forward PREQ from %6D",
+ preq->preq_origaddr, ":");
ppreq.preq_hopcount += 1;
ppreq.preq_ttl -= 1;
ppreq.preq_metric += ms->ms_pmetric->mpm_metric(ni);
@@ -897,7 +950,6 @@ hwmp_recv_preq(struct ieee80211vap *vap, struct ieee80211_node *ni,
&ppreq);
}
}
-
}
#undef PREQ_TFLAGS
#undef PREQ_TADDR
@@ -921,7 +973,7 @@ hwmp_send_preq(struct ieee80211_node *ni,
/*
* mesh preq action frame format
* [6] da
- * [6] sa
+ * [6] sa
* [6] addr3 = sa
* [1] action
* [1] category
@@ -943,6 +995,7 @@ hwmp_recv_prep(struct ieee80211vap *vap, struct ieee80211_node *ni,
struct ieee80211com *ic = vap->iv_ic;
struct ifnet *ifp = vap->iv_ifp;
struct mbuf *m, *next;
+ uint32_t metric = 0;
/*
* Acceptance criteria: if the corresponding PREQ was not generated
@@ -956,19 +1009,21 @@ hwmp_recv_prep(struct ieee80211vap *vap, struct ieee80211_node *ni,
return;
IEEE80211_NOTE(vap, IEEE80211_MSG_HWMP, ni,
- "received PREP from %s", ether_sprintf(prep->prep_targetaddr));
+ "received PREP from %6D", prep->prep_targetaddr, ":");
rt = ieee80211_mesh_rt_find(vap, prep->prep_targetaddr);
if (rt == NULL) {
/*
* If we have no entry this could be a reply to a root PREQ.
+ * XXX: not true anymore cause we dont create entry for target
+ * when propagating PREQs like the old code did.
*/
if (hs->hs_rootmode != IEEE80211_HWMP_ROOTMODE_DISABLED) {
rt = ieee80211_mesh_rt_add(vap, prep->prep_targetaddr);
if (rt == NULL) {
IEEE80211_NOTE(vap, IEEE80211_MSG_HWMP,
- ni, "unable to add PREP path to %s",
- ether_sprintf(prep->prep_targetaddr));
+ ni, "unable to add PREP path to %6D",
+ prep->prep_targetaddr, ":");
vap->iv_stats.is_mesh_rtaddfailed++;
return;
}
@@ -978,11 +1033,11 @@ hwmp_recv_prep(struct ieee80211vap *vap, struct ieee80211_node *ni,
rt->rt_metric = prep->prep_metric;
rt->rt_flags |= IEEE80211_MESHRT_FLAGS_VALID;
IEEE80211_NOTE(vap, IEEE80211_MSG_HWMP, ni,
- "add root path to %s nhops %d metric %d (PREP)",
- ether_sprintf(prep->prep_targetaddr),
+ "add root path to %6D nhops %d metric %lu (PREP)",
+ prep->prep_targetaddr, ":",
rt->rt_nhops, rt->rt_metric);
return;
- }
+ }
return;
}
/*
@@ -991,11 +1046,12 @@ hwmp_recv_prep(struct ieee80211vap *vap, struct ieee80211_node *ni,
hr = IEEE80211_MESH_ROUTE_PRIV(rt, struct ieee80211_hwmp_route);
if (HWMP_SEQ_LEQ(prep->prep_targetseq, hr->hr_seq)) {
IEEE80211_NOTE(vap, IEEE80211_MSG_HWMP, ni,
- "discard PREP from %s, old seq no %u <= %u",
- ether_sprintf(prep->prep_targetaddr),
+ "discard PREP from %6D, old seq no %u <= %u",
+ prep->prep_targetaddr, ":",
prep->prep_targetseq, hr->hr_seq);
return;
}
+
hr->hr_seq = prep->prep_targetseq;
/*
* If it's NOT for us, propagate the PREP.
@@ -1003,26 +1059,26 @@ hwmp_recv_prep(struct ieee80211vap *vap, struct ieee80211_node *ni,
if (!IEEE80211_ADDR_EQ(vap->iv_myaddr, prep->prep_origaddr) &&
prep->prep_ttl > 1 && prep->prep_hopcount < hs->hs_maxhops) {
struct ieee80211_meshprep_ie pprep; /* propagated PREP */
-
IEEE80211_NOTE(vap, IEEE80211_MSG_HWMP, ni,
- "propagate PREP from %s",
- ether_sprintf(prep->prep_targetaddr));
+ "propagate PREP from %6D",
+ prep->prep_targetaddr, ":");
memcpy(&pprep, prep, sizeof(pprep));
pprep.prep_hopcount += 1;
pprep.prep_ttl -= 1;
pprep.prep_metric += ms->ms_pmetric->mpm_metric(ni);
- IEEE80211_ADDR_COPY(pprep.prep_targetaddr, vap->iv_myaddr);
hwmp_send_prep(ni, vap->iv_myaddr, broadcastaddr, &pprep);
}
hr = IEEE80211_MESH_ROUTE_PRIV(rt, struct ieee80211_hwmp_route);
if (rt->rt_flags & IEEE80211_MESHRT_FLAGS_PROXY) {
/* NB: never clobber a proxy entry */;
IEEE80211_NOTE(vap, IEEE80211_MSG_HWMP, ni,
- "discard PREP for %s, route is marked PROXY",
- ether_sprintf(prep->prep_targetaddr));
+ "discard PREP for %6D, route is marked PROXY",
+ prep->prep_targetaddr, ":");
vap->iv_stats.is_hwmp_proxy++;
- } else if (prep->prep_origseq == hr->hr_origseq) {
+ /* NB: first path discovery always fails */
+ } else if (hr->hr_origseq == 0 ||
+ prep->prep_origseq == hr->hr_origseq) {
/*
* Check if we already have a path to this node.
* If we do, check if this path reply contains a
@@ -1031,32 +1087,35 @@ hwmp_recv_prep(struct ieee80211vap *vap, struct ieee80211_node *ni,
if ((rt->rt_flags & IEEE80211_MESHRT_FLAGS_VALID) == 0 ||
(prep->prep_hopcount < rt->rt_nhops ||
prep->prep_metric < rt->rt_metric)) {
+ hr->hr_origseq = prep->prep_origseq;
+ metric = prep->prep_metric +
+ ms->ms_pmetric->mpm_metric(ni);
IEEE80211_NOTE(vap, IEEE80211_MSG_HWMP, ni,
- "%s path to %s, hopcount %d:%d metric %d:%d",
+ "%s path to %6D, hopcount %d:%d metric %d:%d",
rt->rt_flags & IEEE80211_MESHRT_FLAGS_VALID ?
"prefer" : "update",
- ether_sprintf(prep->prep_origaddr),
+ prep->prep_origaddr, ":",
rt->rt_nhops, prep->prep_hopcount,
rt->rt_metric, prep->prep_metric);
IEEE80211_ADDR_COPY(rt->rt_nexthop, wh->i_addr2);
- rt->rt_nhops = prep->prep_hopcount;
+ rt->rt_nhops = prep->prep_hopcount + 1;
rt->rt_lifetime = prep->prep_lifetime;
- rt->rt_metric = prep->prep_metric;
+ rt->rt_metric = metric;
rt->rt_flags |= IEEE80211_MESHRT_FLAGS_VALID;
} else {
IEEE80211_NOTE(vap, IEEE80211_MSG_HWMP, ni,
- "ignore PREP for %s, hopcount %d:%d metric %d:%d",
- ether_sprintf(prep->prep_targetaddr),
+ "ignore PREP for %6D, hopcount %d:%d metric %d:%d",
+ prep->prep_targetaddr, ":",
rt->rt_nhops, prep->prep_hopcount,
rt->rt_metric, prep->prep_metric);
}
} else {
IEEE80211_NOTE(vap, IEEE80211_MSG_HWMP, ni,
- "discard PREP for %s, wrong seqno %u != %u",
- ether_sprintf(prep->prep_targetaddr), prep->prep_origseq,
- hr->hr_seq);
+ "discard PREP for %6D, wrong orig seqno %u != %u",
+ prep->prep_targetaddr, ":", prep->prep_origseq,
+ hr->hr_origseq);
vap->iv_stats.is_hwmp_wrongseq++;
- }
+ }
/*
* Check for frames queued awaiting path discovery.
* XXX probably can tell exactly and avoid remove call
@@ -1064,9 +1123,9 @@ hwmp_recv_prep(struct ieee80211vap *vap, struct ieee80211_node *ni,
* stuck back on the stageq because there won't be
* a path.
*/
- m = ieee80211_ageq_remove(&ic->ic_stageq,
+ m = ieee80211_ageq_remove(&ic->ic_stageq,
(struct ieee80211_node *)(uintptr_t)
- ieee80211_mac_hash(ic, rt->rt_dest));
+ ieee80211_mac_hash(ic, rt->rt_dest));
for (; m != NULL; m = next) {
next = m->m_nextpkt;
m->m_nextpkt = NULL;
@@ -1087,7 +1146,7 @@ hwmp_send_prep(struct ieee80211_node *ni,
/*
* mesh prep action frame format
* [6] da
- * [6] sa
+ * [6] sa
* [6] addr3 = sa
* [1] action
* [1] category
@@ -1146,7 +1205,7 @@ hwmp_recv_perr(struct ieee80211vap *vap, struct ieee80211_node *ni,
struct ieee80211_mesh_state *ms = vap->iv_mesh;
struct ieee80211_mesh_route *rt = NULL;
struct ieee80211_hwmp_route *hr;
- struct ieee80211_meshperr_ie pperr;
+ struct ieee80211_meshperr_ie pperr;
int i, forward = 0;
/*
@@ -1165,7 +1224,7 @@ hwmp_recv_perr(struct ieee80211vap *vap, struct ieee80211_node *ni,
if (rt == NULL)
continue;
hr = IEEE80211_MESH_ROUTE_PRIV(rt, struct ieee80211_hwmp_route);
- if (!(PERR_DFLAGS(0) & IEEE80211_MESHPERR_DFLAGS_USN) &&
+ if (!(PERR_DFLAGS(0) & IEEE80211_MESHPERR_DFLAGS_USN) &&
HWMP_SEQ_GEQ(PERR_DSEQ(i), hr->hr_seq)) {
ieee80211_mesh_rt_del(vap, rt->rt_dest);
ieee80211_mesh_rt_flush_peer(vap, rt->rt_dest);
@@ -1179,7 +1238,7 @@ hwmp_recv_perr(struct ieee80211vap *vap, struct ieee80211_node *ni,
*/
if (forward && perr->perr_ttl > 1) {
IEEE80211_NOTE(vap, IEEE80211_MSG_HWMP, ni,
- "propagate PERR from %s", ether_sprintf(wh->i_addr2));
+ "propagate PERR from %6D", wh->i_addr2, ":");
memcpy(&pperr, perr, sizeof(*perr));
pperr.perr_ttl--;
hwmp_send_perr(vap->iv_bss, vap->iv_myaddr, broadcastaddr,
@@ -1267,7 +1326,7 @@ hwmp_send_rann(struct ieee80211_node *ni,
/*
* mesh rann action frame format
* [6] da
- * [6] sa
+ * [6] sa
* [6] addr3 = sa
* [1] action
* [1] category
@@ -1306,8 +1365,8 @@ hwmp_discover(struct ieee80211vap *vap,
rt = ieee80211_mesh_rt_add(vap, dest);
if (rt == NULL) {
IEEE80211_NOTE(vap, IEEE80211_MSG_HWMP,
- ni, "unable to add discovery path to %s",
- ether_sprintf(dest));
+ ni, "unable to add discovery path to %6D",
+ dest, ":");
vap->iv_stats.is_mesh_rtaddfailed++;
goto done;
}
@@ -1323,13 +1382,15 @@ hwmp_discover(struct ieee80211vap *vap,
/* XXX check preq retries */
sendpreq = 1;
IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_HWMP, dest,
- "start path discovery (src %s)",
+ "start path discovery (src %s), target seq %u",
m == NULL ? "<none>" : ether_sprintf(
- mtod(m, struct ether_header *)->ether_shost));
+ mtod(m, struct ether_header *)->ether_shost),
+ hr->hr_seq);
/*
* Try to discover the path for this node.
+ * Group addressed PREQ Case A
*/
- preq.preq_flags = 0;
+ preq.preq_flags = IEEE80211_MESHPREQ_FLAGS_AM;
preq.preq_hopcount = 0;
preq.preq_ttl = ms->ms_ttl;
preq.preq_id = ++hs->hs_preqid;
@@ -1345,7 +1406,7 @@ hwmp_discover(struct ieee80211vap *vap,
if (ieee80211_hwmp_replyforward)
PREQ_TFLAGS(0) |= IEEE80211_MESHPREQ_TFLAGS_RF;
PREQ_TFLAGS(0) |= IEEE80211_MESHPREQ_TFLAGS_USN;
- PREQ_TSEQ(0) = 0;
+ PREQ_TSEQ(0) = hr->hr_seq;
/* XXX check return value */
hwmp_send_preq(vap->iv_bss, vap->iv_myaddr,
broadcastaddr, &preq);
@@ -1391,7 +1452,7 @@ hwmp_ioctl_get80211(struct ieee80211vap *vap, struct ieee80211req *ireq)
{
struct ieee80211_hwmp_state *hs = vap->iv_hwmp;
int error;
-
+
if (vap->iv_opmode != IEEE80211_M_MBSS)
return ENOSYS;
error = 0;
diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c
index 2e388ae..4118c57 100644
--- a/sys/net80211/ieee80211_ioctl.c
+++ b/sys/net80211/ieee80211_ioctl.c
@@ -1397,6 +1397,17 @@ setmlme_common(struct ieee80211vap *vap, int op,
IEEE80211_FC0_SUBTYPE_DEAUTH, reason);
ieee80211_free_node(ni);
break;
+ case IEEE80211_M_MBSS:
+ IEEE80211_NODE_LOCK(nt);
+ ni = ieee80211_find_node_locked(nt, mac);
+ if (ni != NULL) {
+ ieee80211_node_leave(ni);
+ ieee80211_free_node(ni);
+ } else {
+ error = ENOENT;
+ }
+ IEEE80211_NODE_UNLOCK(nt);
+ break;
default:
error = EINVAL;
break;
@@ -2737,7 +2748,7 @@ ieee80211_ioctl_set80211(struct ieee80211vap *vap, u_long cmd, struct ieee80211r
case IEEE80211_IOC_PROTMODE:
if (ireq->i_val > IEEE80211_PROT_RTSCTS)
return EINVAL;
- ic->ic_protmode = ireq->i_val;
+ ic->ic_protmode = (enum ieee80211_protmode)ireq->i_val;
/* NB: if not operating in 11g this can wait */
if (ic->ic_bsschan != IEEE80211_CHAN_ANYC &&
IEEE80211_IS_CHAN_ANYG(ic->ic_bsschan))
@@ -2756,7 +2767,7 @@ ieee80211_ioctl_set80211(struct ieee80211vap *vap, u_long cmd, struct ieee80211r
if (!(IEEE80211_ROAMING_DEVICE <= ireq->i_val &&
ireq->i_val <= IEEE80211_ROAMING_MANUAL))
return EINVAL;
- vap->iv_roaming = ireq->i_val;
+ vap->iv_roaming = (enum ieee80211_roamingmode)ireq->i_val;
/* XXXX reset? */
break;
case IEEE80211_IOC_PRIVACY:
diff --git a/sys/net80211/ieee80211_mesh.c b/sys/net80211/ieee80211_mesh.c
index cfffd87..b92f695 100644
--- a/sys/net80211/ieee80211_mesh.c
+++ b/sys/net80211/ieee80211_mesh.c
@@ -1120,7 +1120,7 @@ mesh_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf)
*
* NB: this check is also done upon peering link initiation.
*/
- if (vap->iv_acl != NULL && !vap->iv_acl->iac_check(vap, wh->i_addr2)) {
+ if (vap->iv_acl != NULL && !vap->iv_acl->iac_check(vap, wh)) {
IEEE80211_DISCARD(vap, IEEE80211_MSG_ACL,
wh, NULL, "%s", "disallowed by ACL");
vap->iv_stats.is_rx_acl++;
@@ -1378,8 +1378,7 @@ mesh_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, int subtype,
/*
* Peer only based on the current ACL policy.
*/
- if (vap->iv_acl != NULL &&
- !vap->iv_acl->iac_check(vap, wh->i_addr2)) {
+ if (vap->iv_acl != NULL && !vap->iv_acl->iac_check(vap, wh)) {
IEEE80211_DISCARD(vap, IEEE80211_MSG_ACL,
wh, NULL, "%s", "disallowed by ACL");
vap->iv_stats.is_rx_acl++;
diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c
index 0e45e8c..f6177d9 100644
--- a/sys/net80211/ieee80211_output.c
+++ b/sys/net80211/ieee80211_output.c
@@ -834,7 +834,7 @@ ieee80211_classify(struct ieee80211_node *ni, struct mbuf *m)
uint32_t flow;
uint8_t tos;
/*
- * IPv6 frame, map the DSCP bits from the TOS field.
+ * IPv6 frame, map the DSCP bits from the traffic class field.
*/
m_copydata(m, sizeof(struct ether_header) +
offsetof(struct ip6_hdr, ip6_flow), sizeof(flow),
diff --git a/sys/net80211/ieee80211_proto.h b/sys/net80211/ieee80211_proto.h
index 54af007..f8bce62 100644
--- a/sys/net80211/ieee80211_proto.h
+++ b/sys/net80211/ieee80211_proto.h
@@ -215,7 +215,7 @@ struct ieee80211_aclator {
int (*iac_attach)(struct ieee80211vap *);
void (*iac_detach)(struct ieee80211vap *);
int (*iac_check)(struct ieee80211vap *,
- const uint8_t mac[IEEE80211_ADDR_LEN]);
+ const struct ieee80211_frame *wh);
int (*iac_add)(struct ieee80211vap *,
const uint8_t mac[IEEE80211_ADDR_LEN]);
int (*iac_remove)(struct ieee80211vap *,
diff --git a/sys/net80211/ieee80211_radiotap.c b/sys/net80211/ieee80211_radiotap.c
index fc3dbdc..0ae6896 100644
--- a/sys/net80211/ieee80211_radiotap.c
+++ b/sys/net80211/ieee80211_radiotap.c
@@ -325,6 +325,10 @@ radiotap_offset(struct ieee80211_radiotap_header *rh, int item)
.align = sizeof(uint32_t),
.width = 2*sizeof(uint32_t),
},
+ [IEEE80211_RADIOTAP_MCS] = {
+ .align = sizeof(uint8_t),
+ .width = 3*sizeof(uint8_t),
+ },
};
uint32_t present = le32toh(rh->it_present);
int off, i;
diff --git a/sys/net80211/ieee80211_radiotap.h b/sys/net80211/ieee80211_radiotap.h
index b8a8b51..0c2c6b5 100644
--- a/sys/net80211/ieee80211_radiotap.h
+++ b/sys/net80211/ieee80211_radiotap.h
@@ -190,6 +190,8 @@ enum ieee80211_radiotap_type {
IEEE80211_RADIOTAP_DB_ANTNOISE = 13,
/* NB: gap for netbsd definitions */
IEEE80211_RADIOTAP_XCHANNEL = 18,
+ IEEE80211_RADIOTAP_MCS = 19,
+ IEEE80211_RADIOTAP_VENDOREXT = 30,
IEEE80211_RADIOTAP_EXT = 31,
};
diff --git a/sys/net80211/ieee80211_tdma.c b/sys/net80211/ieee80211_tdma.c
index 077b9e4..ece82ff 100644
--- a/sys/net80211/ieee80211_tdma.c
+++ b/sys/net80211/ieee80211_tdma.c
@@ -36,6 +36,8 @@ __FBSDID("$FreeBSD$");
#include "opt_tdma.h"
#include "opt_wlan.h"
+#ifdef IEEE80211_SUPPORT_TDMA
+
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/mbuf.h>
@@ -820,3 +822,5 @@ restart:
return ERESTART;
}
IEEE80211_IOCTL_SET(tdma, tdma_ioctl_set80211);
+
+#endif /* IEEE80211_SUPPORT_TDMA */
diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h
index 60fbacb..feb9fb8 100644
--- a/sys/net80211/ieee80211_var.h
+++ b/sys/net80211/ieee80211_var.h
@@ -228,10 +228,10 @@ struct ieee80211com {
/* virtual ap create/delete */
struct ieee80211vap* (*ic_vap_create)(struct ieee80211com *,
- const char name[IFNAMSIZ], int unit,
- int opmode, int flags,
- const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t macaddr[IEEE80211_ADDR_LEN]);
+ const char [IFNAMSIZ], int,
+ enum ieee80211_opmode, int,
+ const uint8_t [IEEE80211_ADDR_LEN],
+ const uint8_t [IEEE80211_ADDR_LEN]);
void (*ic_vap_delete)(struct ieee80211vap *);
/* operating mode attachment */
ieee80211vap_attach ic_vattach[IEEE80211_OPMODE_MAX];
@@ -662,7 +662,8 @@ void ieee80211_ifattach(struct ieee80211com *,
const uint8_t macaddr[IEEE80211_ADDR_LEN]);
void ieee80211_ifdetach(struct ieee80211com *);
int ieee80211_vap_setup(struct ieee80211com *, struct ieee80211vap *,
- const char name[IFNAMSIZ], int unit, int opmode, int flags,
+ const char name[IFNAMSIZ], int unit,
+ enum ieee80211_opmode opmode, int flags,
const uint8_t bssid[IEEE80211_ADDR_LEN],
const uint8_t macaddr[IEEE80211_ADDR_LEN]);
int ieee80211_vap_attach(struct ieee80211vap *,
diff --git a/sys/netatalk/aarp.c b/sys/netatalk/aarp.c
index 24dc7a1..bac838f 100644
--- a/sys/netatalk/aarp.c
+++ b/sys/netatalk/aarp.c
@@ -406,7 +406,7 @@ at_aarpinput(struct ifnet *ifp, struct mbuf *m)
* Since we don't know the net, we just look for the first
* phase 1 address on the interface.
*/
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
for (aa = (struct at_ifaddr *)TAILQ_FIRST(&ifp->if_addrhead);
aa;
aa = (struct at_ifaddr *)aa->aa_ifa.ifa_link.tqe_next) {
@@ -416,12 +416,12 @@ at_aarpinput(struct ifnet *ifp, struct mbuf *m)
}
}
if (aa == NULL) {
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
m_freem(m);
return;
}
ifa_ref(&aa->aa_ifa);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
tpa.s_net = spa.s_net = AA_SAT(aa)->sat_addr.s_net;
}
diff --git a/sys/netatalk/at_control.c b/sys/netatalk/at_control.c
index b2d8422..cf470da 100644
--- a/sys/netatalk/at_control.c
+++ b/sys/netatalk/at_control.c
@@ -254,9 +254,9 @@ at_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp,
*/
aa->aa_ifp = ifp;
ifa_ref(&aa->aa_ifa); /* if_addrhead */
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_WLOCK(ifp);
TAILQ_INSERT_TAIL(&ifp->if_addrhead, ifa, ifa_link);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_WUNLOCK(ifp);
} else {
/*
* If we DID find one then we clobber any routes
@@ -357,9 +357,9 @@ at_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp,
* remove the ifaddr from the interface
*/
ifa = (struct ifaddr *)aa;
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_WLOCK(ifp);
TAILQ_REMOVE(&ifp->if_addrhead, ifa, ifa_link);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_WUNLOCK(ifp);
ifa_free(ifa); /* if_addrhead */
/*
diff --git a/sys/netgraph/ng_base.c b/sys/netgraph/ng_base.c
index 2f8e99f..6bd86be 100644
--- a/sys/netgraph/ng_base.c
+++ b/sys/netgraph/ng_base.c
@@ -1,7 +1,3 @@
-/*
- * ng_base.c
- */
-
/*-
* Copyright (c) 1996-1999 Whistle Communications, Inc.
* All rights reserved.
@@ -54,6 +50,7 @@
#include <sys/kernel.h>
#include <sys/ktr.h>
#include <sys/limits.h>
+#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
#include <sys/queue.h>
@@ -61,6 +58,7 @@
#include <sys/syslog.h>
#include <sys/refcount.h>
#include <sys/proc.h>
+#include <sys/rwlock.h>
#include <sys/unistd.h>
#include <sys/kthread.h>
#include <sys/smp.h>
@@ -167,19 +165,28 @@ static struct mtx ng_worklist_mtx; /* MUST LOCK NODE FIRST */
/* List of installed types */
static LIST_HEAD(, ng_type) ng_typelist;
-static struct mtx ng_typelist_mtx;
+static struct rwlock ng_typelist_lock;
+#define TYPELIST_RLOCK() rw_rlock(&ng_typelist_lock)
+#define TYPELIST_RUNLOCK() rw_runlock(&ng_typelist_lock)
+#define TYPELIST_WLOCK() rw_wlock(&ng_typelist_lock)
+#define TYPELIST_WUNLOCK() rw_wunlock(&ng_typelist_lock)
/* Hash related definitions */
/* XXX Don't need to initialise them because it's a LIST */
static VNET_DEFINE(LIST_HEAD(, ng_node), ng_ID_hash[NG_ID_HASH_SIZE]);
#define V_ng_ID_hash VNET(ng_ID_hash)
-static struct mtx ng_idhash_mtx;
+static struct rwlock ng_idhash_lock;
+#define IDHASH_RLOCK() rw_rlock(&ng_idhash_lock)
+#define IDHASH_RUNLOCK() rw_runlock(&ng_idhash_lock)
+#define IDHASH_WLOCK() rw_wlock(&ng_idhash_lock)
+#define IDHASH_WUNLOCK() rw_wunlock(&ng_idhash_lock)
+
/* Method to find a node.. used twice so do it here */
#define NG_IDHASH_FN(ID) ((ID) % (NG_ID_HASH_SIZE))
#define NG_IDHASH_FIND(ID, node) \
do { \
- mtx_assert(&ng_idhash_mtx, MA_OWNED); \
+ rw_assert(&ng_idhash_lock, RA_LOCKED); \
LIST_FOREACH(node, &V_ng_ID_hash[NG_IDHASH_FN(ID)], \
nd_idnodes) { \
if (NG_NODE_IS_VALID(node) \
@@ -192,7 +199,6 @@ static struct mtx ng_idhash_mtx;
static VNET_DEFINE(LIST_HEAD(, ng_node), ng_name_hash[NG_NAME_HASH_SIZE]);
#define V_ng_name_hash VNET(ng_name_hash)
-static struct mtx ng_namehash_mtx;
#define NG_NAMEHASH(NAME, HASH) \
do { \
u_char h = 0; \
@@ -202,6 +208,11 @@ static struct mtx ng_namehash_mtx;
(HASH) = h % (NG_NAME_HASH_SIZE); \
} while (0)
+static struct rwlock ng_namehash_lock;
+#define NAMEHASH_RLOCK() rw_rlock(&ng_namehash_lock)
+#define NAMEHASH_RUNLOCK() rw_runlock(&ng_namehash_lock)
+#define NAMEHASH_WLOCK() rw_wlock(&ng_namehash_lock)
+#define NAMEHASH_WUNLOCK() rw_wunlock(&ng_namehash_lock)
/* Internal functions */
static int ng_add_hook(node_p node, const char *name, hook_p * hookp);
@@ -333,18 +344,18 @@ ng_alloc_node(void)
#define NG_FREE_HOOK(hook) \
do { \
- mtx_lock(&ng_nodelist_mtx); \
+ mtx_lock(&ng_nodelist_mtx); \
LIST_INSERT_HEAD(&ng_freehooks, hook, hk_hooks); \
hook->hk_magic = 0; \
- mtx_unlock(&ng_nodelist_mtx); \
+ mtx_unlock(&ng_nodelist_mtx); \
} while (0)
#define NG_FREE_NODE(node) \
do { \
- mtx_lock(&ng_nodelist_mtx); \
+ mtx_lock(&ng_nodelist_mtx); \
LIST_INSERT_HEAD(&ng_freenodes, node, nd_nodes); \
node->nd_magic = 0; \
- mtx_unlock(&ng_nodelist_mtx); \
+ mtx_unlock(&ng_nodelist_mtx); \
} while (0)
#else /* NETGRAPH_DEBUG */ /*----------------------------------------------*/
@@ -654,12 +665,12 @@ ng_make_node_common(struct ng_type *type, node_p *nodepp)
LIST_INIT(&node->nd_hooks);
/* Link us into the name hash. */
- mtx_lock(&ng_namehash_mtx);
+ NAMEHASH_WLOCK();
LIST_INSERT_HEAD(&V_ng_name_hash[0], node, nd_nodes);
- mtx_unlock(&ng_namehash_mtx);
+ NAMEHASH_WUNLOCK();
/* get an ID and put us in the hash chain */
- mtx_lock(&ng_idhash_mtx);
+ IDHASH_WLOCK();
for (;;) { /* wrap protection, even if silly */
node_p node2 = NULL;
node->nd_ID = V_nextID++; /* 137/sec for 1 year before wrap */
@@ -670,9 +681,9 @@ ng_make_node_common(struct ng_type *type, node_p *nodepp)
break;
}
}
- LIST_INSERT_HEAD(&V_ng_ID_hash[NG_IDHASH_FN(node->nd_ID)],
- node, nd_idnodes);
- mtx_unlock(&ng_idhash_mtx);
+ LIST_INSERT_HEAD(&V_ng_ID_hash[NG_IDHASH_FN(node->nd_ID)], node,
+ nd_idnodes);
+ IDHASH_WUNLOCK();
/* Done */
*nodepp = node;
@@ -784,14 +795,14 @@ ng_unref_node(node_p node)
if (refcount_release(&node->nd_refs)) { /* we were the last */
- mtx_lock(&ng_namehash_mtx);
node->nd_type->refs--; /* XXX maybe should get types lock? */
+ NAMEHASH_WLOCK();
LIST_REMOVE(node, nd_nodes);
- mtx_unlock(&ng_namehash_mtx);
+ NAMEHASH_WUNLOCK();
- mtx_lock(&ng_idhash_mtx);
+ IDHASH_WLOCK();
LIST_REMOVE(node, nd_idnodes);
- mtx_unlock(&ng_idhash_mtx);
+ IDHASH_WUNLOCK();
mtx_destroy(&node->nd_input_queue.q_mtx);
NG_FREE_NODE(node);
@@ -805,11 +816,11 @@ static node_p
ng_ID2noderef(ng_ID_t ID)
{
node_p node;
- mtx_lock(&ng_idhash_mtx);
+ IDHASH_RLOCK();
NG_IDHASH_FIND(ID, node);
if(node)
NG_NODE_REF(node);
- mtx_unlock(&ng_idhash_mtx);
+ IDHASH_RUNLOCK();
return(node);
}
@@ -824,7 +835,7 @@ ng_node2ID(node_p node)
************************************************************************/
/*
- * Assign a node a name. Once assigned, the name cannot be changed.
+ * Assign a node a name.
*/
int
ng_name_node(node_p node, const char *name)
@@ -858,10 +869,10 @@ ng_name_node(node_p node, const char *name)
/* Update name hash. */
NG_NAMEHASH(name, hash);
- mtx_lock(&ng_namehash_mtx);
+ NAMEHASH_WLOCK();
LIST_REMOVE(node, nd_nodes);
LIST_INSERT_HEAD(&V_ng_name_hash[hash], node, nd_nodes);
- mtx_unlock(&ng_namehash_mtx);
+ NAMEHASH_WUNLOCK();
return (0);
}
@@ -896,16 +907,15 @@ ng_name2noderef(node_p here, const char *name)
/* Find node by name */
NG_NAMEHASH(name, hash);
- mtx_lock(&ng_namehash_mtx);
- LIST_FOREACH(node, &V_ng_name_hash[hash], nd_nodes) {
+ NAMEHASH_RLOCK();
+ LIST_FOREACH(node, &V_ng_name_hash[hash], nd_nodes)
if (NG_NODE_IS_VALID(node) &&
(strcmp(NG_NODE_NAME(node), name) == 0)) {
+ NG_NODE_REF(node);
break;
}
- }
- if (node)
- NG_NODE_REF(node);
- mtx_unlock(&ng_namehash_mtx);
+ NAMEHASH_RUNLOCK();
+
return (node);
}
@@ -921,27 +931,21 @@ ng_decodeidname(const char *name)
u_long val;
/* Check for proper length, brackets, no leading junk */
- if ((len < 3)
- || (name[0] != '[')
- || (name[len - 1] != ']')
- || (!isxdigit(name[1]))) {
+ if ((len < 3) || (name[0] != '[') || (name[len - 1] != ']') ||
+ (!isxdigit(name[1])))
return ((ng_ID_t)0);
- }
/* Decode number */
val = strtoul(name + 1, &eptr, 16);
- if ((eptr - name != len - 1)
- || (val == ULONG_MAX)
- || (val == 0)) {
+ if ((eptr - name != len - 1) || (val == ULONG_MAX) || (val == 0))
return ((ng_ID_t)0);
- }
- return (ng_ID_t)val;
+
+ return ((ng_ID_t)val);
}
/*
* Remove a name from a node. This should only be called
* when shutting down and removing the node.
- * IF we allow name changing this may be more resurrected.
*/
void
ng_unname(node_p node)
@@ -1045,8 +1049,8 @@ ng_findhook(node_p node, const char *name)
if (node->nd_type->findhook != NULL)
return (*node->nd_type->findhook)(node, name);
LIST_FOREACH(hook, &node->nd_hooks, hk_hooks) {
- if (NG_HOOK_IS_VALID(hook)
- && (strcmp(NG_HOOK_NAME(hook), name) == 0))
+ if (NG_HOOK_IS_VALID(hook) &&
+ (strcmp(NG_HOOK_NAME(hook), name) == 0))
return (hook);
}
return (NULL);
@@ -1182,12 +1186,12 @@ ng_newtype(struct ng_type *tp)
const size_t namelen = strlen(tp->name);
/* Check version and type name fields */
- if ((tp->version != NG_ABI_VERSION)
- || (namelen == 0)
- || (namelen >= NG_TYPESIZ)) {
+ if ((tp->version != NG_ABI_VERSION) || (namelen == 0) ||
+ (namelen >= NG_TYPESIZ)) {
TRAP_ERROR();
if (tp->version != NG_ABI_VERSION) {
- printf("Netgraph: Node type rejected. ABI mismatch. Suggest recompile\n");
+ printf("Netgraph: Node type rejected. ABI mismatch. "
+ "Suggest recompile\n");
}
return (EINVAL);
}
@@ -1200,10 +1204,10 @@ ng_newtype(struct ng_type *tp)
/* Link in new type */
- mtx_lock(&ng_typelist_mtx);
+ TYPELIST_WLOCK();
LIST_INSERT_HEAD(&ng_typelist, tp, types);
tp->refs = 1; /* first ref is linked list */
- mtx_unlock(&ng_typelist_mtx);
+ TYPELIST_WUNLOCK();
return (0);
}
@@ -1221,9 +1225,9 @@ ng_rmtype(struct ng_type *tp)
}
/* Unlink type */
- mtx_lock(&ng_typelist_mtx);
+ TYPELIST_WLOCK();
LIST_REMOVE(tp, types);
- mtx_unlock(&ng_typelist_mtx);
+ TYPELIST_WUNLOCK();
return (0);
}
@@ -1235,12 +1239,12 @@ ng_findtype(const char *typename)
{
struct ng_type *type;
- mtx_lock(&ng_typelist_mtx);
+ TYPELIST_RLOCK();
LIST_FOREACH(type, &ng_typelist, types) {
if (strcmp(type->name, typename) == 0)
break;
}
- mtx_unlock(&ng_typelist_mtx);
+ TYPELIST_RUNLOCK();
return (type);
}
@@ -1635,8 +1639,8 @@ ng_path_parse(char *addr, char **nodep, char **pathp, char **hookp)
* return the destination node.
*/
int
-ng_path2noderef(node_p here, const char *address,
- node_p *destp, hook_p *lasthook)
+ng_path2noderef(node_p here, const char *address, node_p *destp,
+ hook_p *lasthook)
{
char fullpath[NG_PATHSIZ];
char *nodename, *path;
@@ -1715,10 +1719,9 @@ ng_path2noderef(node_p here, const char *address,
mtx_lock(&ng_topo_mtx);
/* Can't get there from here... */
- if (hook == NULL
- || NG_HOOK_PEER(hook) == NULL
- || NG_HOOK_NOT_VALID(hook)
- || NG_HOOK_NOT_VALID(NG_HOOK_PEER(hook))) {
+ if (hook == NULL || NG_HOOK_PEER(hook) == NULL ||
+ NG_HOOK_NOT_VALID(hook) ||
+ NG_HOOK_NOT_VALID(NG_HOOK_PEER(hook))) {
TRAP_ERROR();
NG_NODE_UNREF(node);
mtx_unlock(&ng_topo_mtx);
@@ -1882,9 +1885,9 @@ ng_dequeue(node_p node, int *rw)
long t = ngq->q_flags;
if (t & WRITER_ACTIVE) {
/* There is writer, reader can't proceed. */
- CTR4(KTR_NET, "%20s: node [%x] (%p) queued reader "
- "can't proceed; queue flags 0x%lx", __func__,
- node->nd_ID, node, t);
+ CTR4(KTR_NET, "%20s: node [%x] (%p) queued "
+ "reader can't proceed; queue flags 0x%lx",
+ __func__, node->nd_ID, node, t);
return (NULL);
}
if (atomic_cmpset_acq_int(&ngq->q_flags, t,
@@ -1900,9 +1903,9 @@ ng_dequeue(node_p node, int *rw)
*rw = NGQRW_W;
} else {
/* There is somebody other, writer can't proceed. */
- CTR4(KTR_NET, "%20s: node [%x] (%p) queued writer "
- "can't proceed; queue flags 0x%lx", __func__,
- node->nd_ID, node, ngq->q_flags);
+ CTR4(KTR_NET, "%20s: node [%x] (%p) queued writer can't "
+ "proceed; queue flags 0x%lx", __func__, node->nd_ID, node,
+ ngq->q_flags);
return (NULL);
}
@@ -1914,10 +1917,9 @@ ng_dequeue(node_p node, int *rw)
STAILQ_REMOVE_HEAD(&ngq->queue, el_next);
if (STAILQ_EMPTY(&ngq->queue))
atomic_clear_int(&ngq->q_flags, OP_PENDING);
- CTR6(KTR_NET, "%20s: node [%x] (%p) returning item %p as %s; "
- "queue flags 0x%lx", __func__,
- node->nd_ID, node, item, *rw ? "WRITER" : "READER" ,
- ngq->q_flags);
+ CTR6(KTR_NET, "%20s: node [%x] (%p) returning item %p as %s; queue "
+ "flags 0x%lx", __func__, node->nd_ID, node, item, *rw ? "WRITER" :
+ "READER", ngq->q_flags);
return (item);
}
@@ -1941,7 +1943,7 @@ ng_queue_rw(node_p node, item_p item, int rw)
CTR5(KTR_NET, "%20s: node [%x] (%p) queued item %p as %s", __func__,
node->nd_ID, node, item, rw ? "WRITER" : "READER" );
-
+
/*
* We can take the worklist lock with the node locked
* BUT NOT THE REVERSE!
@@ -1959,12 +1961,12 @@ ng_acquire_read(node_p node, item_p item)
("%s: working on deadnode", __func__));
/* Reader needs node without writer and pending items. */
- while (1) {
+ for (;;) {
long t = node->nd_input_queue.q_flags;
if (t & NGQ_RMASK)
break; /* Node is not ready for reader. */
- if (atomic_cmpset_acq_int(&node->nd_input_queue.q_flags,
- t, t + READER_INCREMENT)) {
+ if (atomic_cmpset_acq_int(&node->nd_input_queue.q_flags, t,
+ t + READER_INCREMENT)) {
/* Successfully grabbed node */
CTR4(KTR_NET, "%20s: node [%x] (%p) acquired item %p",
__func__, node->nd_ID, node, item);
@@ -1987,8 +1989,8 @@ ng_acquire_write(node_p node, item_p item)
("%s: working on deadnode", __func__));
/* Writer needs completely idle node. */
- if (atomic_cmpset_acq_int(&node->nd_input_queue.q_flags,
- 0, WRITER_ACTIVE)) {
+ if (atomic_cmpset_acq_int(&node->nd_input_queue.q_flags, 0,
+ WRITER_ACTIVE)) {
/* Successfully grabbed node */
CTR4(KTR_NET, "%20s: node [%x] (%p) acquired item %p",
__func__, node->nd_ID, node, item);
@@ -2032,11 +2034,10 @@ ng_upgrade_write(node_p node, item_p item)
ng_apply_item(node, item, 0);
/*
- * Having acted on the item, atomically
- * down grade back to READER and finish up
+ * Having acted on the item, atomically
+ * downgrade back to READER and finish up.
*/
- atomic_add_int(&ngq->q_flags,
- READER_INCREMENT - WRITER_ACTIVE);
+ atomic_add_int(&ngq->q_flags, READER_INCREMENT - WRITER_ACTIVE);
/* Our caller will call ng_leave_read() */
return;
@@ -2204,11 +2205,10 @@ ng_snd_item(item_p item, int flags)
size_t st, su, sl;
GET_STACK_USAGE(st, su);
sl = st - su;
- if ((sl * 4 < st) ||
- ((sl * 2 < st) && ((node->nd_flags & NGF_HI_STACK) ||
- (hook && (hook->hk_flags & HK_HI_STACK))))) {
+ if ((sl * 4 < st) || ((sl * 2 < st) &&
+ ((node->nd_flags & NGF_HI_STACK) || (hook &&
+ (hook->hk_flags & HK_HI_STACK)))))
queue = 1;
- }
#endif
}
@@ -2310,10 +2310,10 @@ ng_apply_item(node_p node, item_p item, int rw)
}
/*
* If no receive method, just silently drop it.
- * Give preference to the hook over-ride method
+ * Give preference to the hook over-ride method.
*/
- if ((!(rcvdata = hook->hk_rcvdata))
- && (!(rcvdata = NG_HOOK_NODE(hook)->nd_type->rcvdata))) {
+ if ((!(rcvdata = hook->hk_rcvdata)) &&
+ (!(rcvdata = NG_HOOK_NODE(hook)->nd_type->rcvdata))) {
error = 0;
NG_FREE_ITEM(item);
break;
@@ -2533,8 +2533,8 @@ ng_generic_msg(node_p here, item_p item, hook_p lasthook)
hook_p hook;
/* Get response struct */
- NG_MKRESPONSE(resp, msg, sizeof(*hl)
- + (nhooks * sizeof(struct linkinfo)), M_NOWAIT);
+ NG_MKRESPONSE(resp, msg, sizeof(*hl) +
+ (nhooks * sizeof(struct linkinfo)), M_NOWAIT);
if (resp == NULL) {
error = ENOMEM;
break;
@@ -2582,7 +2582,7 @@ ng_generic_msg(node_p here, item_p item, hook_p lasthook)
node_p node;
int num = 0, i;
- mtx_lock(&ng_namehash_mtx);
+ NAMEHASH_RLOCK();
/* Count number of nodes */
for (i = 0; i < NG_NAME_HASH_SIZE; i++) {
LIST_FOREACH(node, &V_ng_name_hash[i], nd_nodes) {
@@ -2592,12 +2592,12 @@ ng_generic_msg(node_p here, item_p item, hook_p lasthook)
}
}
}
- mtx_unlock(&ng_namehash_mtx);
/* Get response struct */
- NG_MKRESPONSE(resp, msg, sizeof(*nl)
- + (num * sizeof(struct nodeinfo)), M_NOWAIT);
+ NG_MKRESPONSE(resp, msg, sizeof(*nl) +
+ (num * sizeof(struct nodeinfo)), M_NOWAIT);
if (resp == NULL) {
+ NAMEHASH_RUNLOCK();
error = ENOMEM;
break;
}
@@ -2605,7 +2605,6 @@ ng_generic_msg(node_p here, item_p item, hook_p lasthook)
/* Cycle through the linked list of nodes */
nl->numnames = 0;
- mtx_lock(&ng_namehash_mtx);
for (i = 0; i < NG_NAME_HASH_SIZE; i++) {
LIST_FOREACH(node, &V_ng_name_hash[i], nd_nodes) {
struct nodeinfo *const np =
@@ -2615,20 +2614,17 @@ ng_generic_msg(node_p here, item_p item, hook_p lasthook)
continue;
if (!unnamed && (! NG_NODE_HAS_NAME(node)))
continue;
- if (nl->numnames >= num) {
- log(LOG_ERR, "%s: number of nodes changed\n",
- __func__);
- break;
- }
if (NG_NODE_HAS_NAME(node))
strcpy(np->name, NG_NODE_NAME(node));
strcpy(np->type, node->nd_type->name);
np->id = ng_node2ID(node);
np->hooks = node->nd_numhooks;
+ KASSERT(nl->numnames < num, ("%s: no space",
+ __func__));
nl->numnames++;
}
}
- mtx_unlock(&ng_namehash_mtx);
+ NAMEHASH_RUNLOCK();
break;
}
@@ -2638,17 +2634,16 @@ ng_generic_msg(node_p here, item_p item, hook_p lasthook)
struct ng_type *type;
int num = 0;
- mtx_lock(&ng_typelist_mtx);
+ TYPELIST_RLOCK();
/* Count number of types */
- LIST_FOREACH(type, &ng_typelist, types) {
+ LIST_FOREACH(type, &ng_typelist, types)
num++;
- }
- mtx_unlock(&ng_typelist_mtx);
/* Get response struct */
- NG_MKRESPONSE(resp, msg, sizeof(*tl)
- + (num * sizeof(struct typeinfo)), M_NOWAIT);
+ NG_MKRESPONSE(resp, msg, sizeof(*tl) +
+ (num * sizeof(struct typeinfo)), M_NOWAIT);
if (resp == NULL) {
+ TYPELIST_RUNLOCK();
error = ENOMEM;
break;
}
@@ -2656,20 +2651,15 @@ ng_generic_msg(node_p here, item_p item, hook_p lasthook)
/* Cycle through the linked list of types */
tl->numtypes = 0;
- mtx_lock(&ng_typelist_mtx);
LIST_FOREACH(type, &ng_typelist, types) {
struct typeinfo *const tp = &tl->typeinfo[tl->numtypes];
- if (tl->numtypes >= num) {
- log(LOG_ERR, "%s: number of %s changed\n",
- __func__, "types");
- break;
- }
strcpy(tp->type_name, type->name);
tp->numnodes = type->refs - 1; /* don't count list */
+ KASSERT(tl->numtypes < num, ("%s: no space", __func__));
tl->numtypes++;
}
- mtx_unlock(&ng_typelist_mtx);
+ TYPELIST_RUNLOCK();
break;
}
@@ -2702,16 +2692,16 @@ ng_generic_msg(node_p here, item_p item, hook_p lasthook)
bcopy(binary, ascii, sizeof(*binary));
/* Find command by matching typecookie and command number */
- for (c = here->nd_type->cmdlist;
- c != NULL && c->name != NULL; c++) {
- if (binary->header.typecookie == c->cookie
- && binary->header.cmd == c->cmd)
+ for (c = here->nd_type->cmdlist; c != NULL && c->name != NULL;
+ c++) {
+ if (binary->header.typecookie == c->cookie &&
+ binary->header.cmd == c->cmd)
break;
}
if (c == NULL || c->name == NULL) {
for (c = ng_generic_cmds; c->name != NULL; c++) {
- if (binary->header.typecookie == c->cookie
- && binary->header.cmd == c->cmd)
+ if (binary->header.typecookie == c->cookie &&
+ binary->header.cmd == c->cmd)
break;
}
if (c->name == NULL) {
@@ -2805,8 +2795,8 @@ ng_generic_msg(node_p here, item_p item, hook_p lasthook)
if (argstype == NULL) {
bufSize = 0;
} else {
- if ((error = ng_parse(argstype, ascii->data,
- &off, (u_char *)binary->data, &bufSize)) != 0) {
+ if ((error = ng_parse(argstype, ascii->data, &off,
+ (u_char *)binary->data, &bufSize)) != 0) {
NG_FREE_MSG(resp);
break;
}
@@ -2837,7 +2827,7 @@ ng_generic_msg(node_p here, item_p item, hook_p lasthook)
}
/*
* Sometimes a generic message may be statically allocated
- * to avoid problems with allocating when in tight memeory situations.
+ * to avoid problems with allocating when in tight memory situations.
* Don't free it if it is so.
* I break them appart here, because erros may cause a free if the item
* in which case we'd be doing it twice.
@@ -2871,7 +2861,7 @@ SYSCTL_INT(_net_graph, OID_AUTO, maxdata, CTLFLAG_RDTUN, &maxdata,
#ifdef NETGRAPH_DEBUG
static TAILQ_HEAD(, ng_item) ng_itemlist = TAILQ_HEAD_INITIALIZER(ng_itemlist);
-static int allocated; /* number of items malloc'd */
+static int allocated; /* number of items malloc'd */
#endif
/*
@@ -2889,7 +2879,7 @@ ng_alloc_item(int type, int flags)
KASSERT(((type & ~NGQF_TYPE) == 0),
("%s: incorrect item type: %d", __func__, type));
- item = uma_zalloc((type == NGQF_DATA)?ng_qdzone:ng_qzone,
+ item = uma_zalloc((type == NGQF_DATA) ? ng_qdzone : ng_qzone,
((flags & NG_WAITOK) ? M_WAITOK : M_NOWAIT) | M_ZERO);
if (item) {
@@ -2945,8 +2935,8 @@ ng_free_item(item_p item)
allocated--;
mtx_unlock(&ngq_mtx);
#endif
- uma_zfree(((item->el_flags & NGQF_TYPE) == NGQF_DATA)?
- ng_qdzone:ng_qzone, item);
+ uma_zfree(((item->el_flags & NGQF_TYPE) == NGQF_DATA) ?
+ ng_qdzone : ng_qzone, item);
}
/*
@@ -2991,51 +2981,40 @@ int
ng_mod_event(module_t mod, int event, void *data)
{
struct ng_type *const type = data;
- int s, error = 0;
+ int error = 0;
switch (event) {
case MOD_LOAD:
/* Register new netgraph node type */
- s = splnet();
- if ((error = ng_newtype(type)) != 0) {
- splx(s);
+ if ((error = ng_newtype(type)) != 0)
break;
- }
/* Call type specific code */
if (type->mod_event != NULL)
if ((error = (*type->mod_event)(mod, event, data))) {
- mtx_lock(&ng_typelist_mtx);
+ TYPELIST_WLOCK();
type->refs--; /* undo it */
LIST_REMOVE(type, types);
- mtx_unlock(&ng_typelist_mtx);
+ TYPELIST_WUNLOCK();
}
- splx(s);
break;
case MOD_UNLOAD:
- s = splnet();
if (type->refs > 1) { /* make sure no nodes exist! */
error = EBUSY;
} else {
- if (type->refs == 0) {
- /* failed load, nothing to undo */
- splx(s);
+ if (type->refs == 0) /* failed load, nothing to undo */
break;
- }
if (type->mod_event != NULL) { /* check with type */
error = (*type->mod_event)(mod, event, data);
- if (error != 0) { /* type refuses.. */
- splx(s);
+ if (error != 0) /* type refuses.. */
break;
- }
}
- mtx_lock(&ng_typelist_mtx);
+ TYPELIST_WLOCK();
LIST_REMOVE(type, types);
- mtx_unlock(&ng_typelist_mtx);
+ TYPELIST_WUNLOCK();
}
- splx(s);
break;
default:
@@ -3048,7 +3027,7 @@ ng_mod_event(module_t mod, int event, void *data)
return (error);
}
-#ifdef VIMAGE
+#ifdef VIMAGE
static void
vnet_netgraph_uninit(const void *unused __unused)
{
@@ -3057,7 +3036,7 @@ vnet_netgraph_uninit(const void *unused __unused)
do {
/* Find a node to kill */
- mtx_lock(&ng_namehash_mtx);
+ NAMEHASH_RLOCK();
for (i = 0; i < NG_NAME_HASH_SIZE; i++) {
LIST_FOREACH(node, &V_ng_name_hash[i], nd_nodes) {
if (node != &ng_deadnode) {
@@ -3068,14 +3047,14 @@ vnet_netgraph_uninit(const void *unused __unused)
if (node != NULL)
break;
}
- mtx_unlock(&ng_namehash_mtx);
+ NAMEHASH_RUNLOCK();
/* Attempt to kill it only if it is a regular node */
if (node != NULL) {
if (node == last_killed) {
/* This should never happen */
- printf("ng node %s needs"
- "NGF_REALLY_DIE\n", node->nd_name);
+ printf("ng node %s needs NGF_REALLY_DIE\n",
+ node->nd_name);
if (node->nd_flags & NGF_REALLY_DIE)
panic("ng node %s won't die",
node->nd_name);
@@ -3106,12 +3085,9 @@ ngb_mod_event(module_t mod, int event, void *data)
case MOD_LOAD:
/* Initialize everything. */
NG_WORKLIST_LOCK_INIT();
- mtx_init(&ng_typelist_mtx, "netgraph types mutex", NULL,
- MTX_DEF);
- mtx_init(&ng_idhash_mtx, "netgraph idhash mutex", NULL,
- MTX_DEF);
- mtx_init(&ng_namehash_mtx, "netgraph namehash mutex", NULL,
- MTX_DEF);
+ rw_init(&ng_typelist_lock, "netgraph types");
+ rw_init(&ng_idhash_lock, "netgraph idhash");
+ rw_init(&ng_namehash_lock, "netgraph namehash");
mtx_init(&ng_topo_mtx, "netgraph topology mutex", NULL,
MTX_DEF);
#ifdef NETGRAPH_DEBUG
@@ -3123,8 +3099,9 @@ ngb_mod_event(module_t mod, int event, void *data)
ng_qzone = uma_zcreate("NetGraph items", sizeof(struct ng_item),
NULL, NULL, NULL, NULL, UMA_ALIGN_CACHE, 0);
uma_zone_set_max(ng_qzone, maxalloc);
- ng_qdzone = uma_zcreate("NetGraph data items", sizeof(struct ng_item),
- NULL, NULL, NULL, NULL, UMA_ALIGN_CACHE, 0);
+ ng_qdzone = uma_zcreate("NetGraph data items",
+ sizeof(struct ng_item), NULL, NULL, NULL, NULL,
+ UMA_ALIGN_CACHE, 0);
uma_zone_set_max(ng_qdzone, maxdata);
/* Autoconfigure number of threads. */
if (numthreads <= 0)
@@ -3365,7 +3342,7 @@ ng_worklist_add(node_p node)
* then put us on.
*/
node->nd_input_queue.q_flags2 |= NGQ2_WORKQ;
- NG_NODE_REF(node); /* XXX fafe in mutex? */
+ NG_NODE_REF(node); /* XXX safe in mutex? */
NG_WORKLIST_LOCK();
STAILQ_INSERT_TAIL(&ng_worklist, node, nd_input_queue.q_work);
NG_WORKLIST_UNLOCK();
@@ -3493,8 +3470,7 @@ ng_address_hook(node_p here, item_p item, hook_p hook, ng_ID_t retaddr)
* that the peer node is present, though maybe invalid.
*/
mtx_lock(&ng_topo_mtx);
- if ((hook == NULL) ||
- NG_HOOK_NOT_VALID(hook) ||
+ if ((hook == NULL) || NG_HOOK_NOT_VALID(hook) ||
NG_HOOK_NOT_VALID(peer = NG_HOOK_PEER(hook)) ||
NG_NODE_NOT_VALID(peernode = NG_PEER_NODE(hook))) {
NG_FREE_ITEM(item);
@@ -3786,4 +3762,3 @@ ng_macro_test(item_p item)
NG_FWD_MSG_HOOK(error, node, item, hook, retaddr);
}
#endif /* TESTING */
-
diff --git a/sys/netgraph/ng_ipfw.c b/sys/netgraph/ng_ipfw.c
index 117c608..fe8ea89 100644
--- a/sys/netgraph/ng_ipfw.c
+++ b/sys/netgraph/ng_ipfw.c
@@ -194,7 +194,7 @@ ng_ipfw_connect(hook_p hook)
}
/* Look up hook by name */
-hook_p
+static hook_p
ng_ipfw_findhook(node_p node, const char *name)
{
u_int16_t n; /* numeric representation of hook */
diff --git a/sys/netgraph/ng_ksocket.c b/sys/netgraph/ng_ksocket.c
index 20121ba..d2e3a26 100644
--- a/sys/netgraph/ng_ksocket.c
+++ b/sys/netgraph/ng_ksocket.c
@@ -223,7 +223,7 @@ ng_ksocket_sockaddr_parse(const struct ng_parse_type *type,
/* Get socket address family followed by a slash */
while (isspace(s[*off]))
(*off)++;
- if ((t = index(s + *off, '/')) == NULL)
+ if ((t = strchr(s + *off, '/')) == NULL)
return (EINVAL);
if ((len = t - (s + *off)) > sizeof(fambuf) - 1)
return (EINVAL);
@@ -565,14 +565,14 @@ ng_ksocket_newhook(node_p node, hook_p hook, const char *name0)
/* Extract family, type, and protocol from hook name */
snprintf(name, sizeof(name), "%s", name0);
s1 = name;
- if ((s2 = index(s1, '/')) == NULL)
+ if ((s2 = strchr(s1, '/')) == NULL)
return (EINVAL);
*s2++ = '\0';
family = ng_ksocket_parse(ng_ksocket_families, s1, 0);
if (family == -1)
return (EINVAL);
s1 = s2;
- if ((s2 = index(s1, '/')) == NULL)
+ if ((s2 = strchr(s1, '/')) == NULL)
return (EINVAL);
*s2++ = '\0';
type = ng_ksocket_parse(ng_ksocket_types, s1, 0);
diff --git a/sys/netgraph/ng_socket.c b/sys/netgraph/ng_socket.c
index d2053e3..f997d49 100644
--- a/sys/netgraph/ng_socket.c
+++ b/sys/netgraph/ng_socket.c
@@ -51,6 +51,7 @@
#include <sys/param.h>
#include <sys/domain.h>
+#include <sys/hash.h>
#include <sys/kernel.h>
#include <sys/linker.h>
#include <sys/lock.h>
@@ -64,9 +65,6 @@
#include <sys/socketvar.h>
#include <sys/syscallsubr.h>
#include <sys/sysctl.h>
-#ifdef NOTYET
-#include <sys/vnode.h>
-#endif
#include <net/vnet.h>
@@ -115,6 +113,7 @@ static ng_rcvmsg_t ngs_rcvmsg;
static ng_shutdown_t ngs_shutdown;
static ng_newhook_t ngs_newhook;
static ng_connect_t ngs_connect;
+static ng_findhook_t ngs_findhook;
static ng_rcvdata_t ngs_rcvdata;
static ng_disconnect_t ngs_disconnect;
@@ -124,9 +123,6 @@ static int ng_attach_cntl(struct socket *so);
static int ng_attach_common(struct socket *so, int type);
static void ng_detach_common(struct ngpcb *pcbp, int type);
static void ng_socket_free_priv(struct ngsock *priv);
-#ifdef NOTYET
-static int ng_internalize(struct mbuf *m, struct thread *p);
-#endif
static int ng_connect_data(struct sockaddr *nam, struct ngpcb *pcbp);
static int ng_bind(struct sockaddr *nam, struct ngpcb *pcbp);
@@ -143,6 +139,7 @@ static struct ng_type typestruct = {
.shutdown = ngs_shutdown,
.newhook = ngs_newhook,
.connect = ngs_connect,
+ .findhook = ngs_findhook,
.rcvdata = ngs_rcvdata,
.disconnect = ngs_disconnect,
};
@@ -168,6 +165,27 @@ static struct mtx ngsocketlist_mtx;
#define TRAP_ERROR
#endif
+struct hookpriv {
+ LIST_ENTRY(hookpriv) next;
+ hook_p hook;
+};
+LIST_HEAD(ngshash, hookpriv);
+
+/* Per-node private data */
+struct ngsock {
+ struct ng_node *node; /* the associated netgraph node */
+ struct ngpcb *datasock; /* optional data socket */
+ struct ngpcb *ctlsock; /* optional control socket */
+ struct ngshash *hash; /* hash for hook names */
+ u_long hmask; /* hash mask */
+ int flags;
+ int refs;
+ struct mtx mtx; /* mtx to wait on */
+ int error; /* place to store error */
+};
+
+#define NGS_FLAG_NOLINGER 1 /* close with last hook */
+
/***************************************************************
Control sockets
***************************************************************/
@@ -209,19 +227,10 @@ ngc_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr,
int len, error = 0;
struct ng_apply_info apply;
-#ifdef NOTYET
- if (control && (error = ng_internalize(control, td))) {
- if (pcbp->sockdata == NULL) {
- error = ENOTCONN;
- goto release;
- }
- }
-#else /* NOTYET */
if (control) {
error = EINVAL;
goto release;
}
-#endif /* NOTYET */
/* Require destination as there may be >= 1 hooks on this node. */
if (addr == NULL) {
@@ -539,8 +548,14 @@ ng_attach_cntl(struct socket *so)
return (error);
}
- /* Allocate node private info */
+ /*
+ * Allocate node private info and hash. We start
+ * with 16 hash entries, however we may grow later
+ * in ngs_newhook(). We can't predict how much hooks
+ * does this node plan to have.
+ */
priv = malloc(sizeof(*priv), M_NETGRAPH_SOCK, M_WAITOK | M_ZERO);
+ priv->hash = hashinit(16, M_NETGRAPH_SOCK, &priv->hmask);
/* Initialize mutex. */
mtx_init(&priv->mtx, "ng_socket", NULL, MTX_DEF);
@@ -550,9 +565,7 @@ ng_attach_cntl(struct socket *so)
pcbp->sockdata = priv;
priv->refs++;
priv->node = node;
-
- /* Store a hint for netstat(1). */
- priv->node_id = priv->node->nd_ID;
+ pcbp->node_id = node->nd_ID; /* hint for netstat(1) */
/* Link the node and the private data. */
NG_NODE_SET_PRIVATE(priv->node, priv);
@@ -623,6 +636,7 @@ ng_detach_common(struct ngpcb *pcbp, int which)
panic("%s", __func__);
}
pcbp->sockdata = NULL;
+ pcbp->node_id = 0;
ng_socket_free_priv(priv);
}
@@ -646,6 +660,7 @@ ng_socket_free_priv(struct ngsock *priv)
if (priv->refs == 0) {
mtx_destroy(&priv->mtx);
+ hashdestroy(priv->hash, M_NETGRAPH_SOCK, priv->hmask);
free(priv, M_NETGRAPH_SOCK);
return;
}
@@ -661,69 +676,6 @@ ng_socket_free_priv(struct ngsock *priv)
mtx_unlock(&priv->mtx);
}
-#ifdef NOTYET
-/*
- * File descriptors can be passed into an AF_NETGRAPH socket.
- * Note, that file descriptors cannot be passed OUT.
- * Only character device descriptors are accepted.
- * Character devices are useful to connect a graph to a device,
- * which after all is the purpose of this whole system.
- */
-static int
-ng_internalize(struct mbuf *control, struct thread *td)
-{
- const struct cmsghdr *cm = mtod(control, const struct cmsghdr *);
- struct file *fp;
- struct vnode *vn;
- int oldfds;
- int fd;
-
- if (cm->cmsg_type != SCM_RIGHTS || cm->cmsg_level != SOL_SOCKET ||
- cm->cmsg_len != control->m_len) {
- TRAP_ERROR;
- return (EINVAL);
- }
-
- /* Check there is only one FD. XXX what would more than one signify? */
- oldfds = ((caddr_t)cm + cm->cmsg_len - (caddr_t)data) / sizeof (int);
- if (oldfds != 1) {
- TRAP_ERROR;
- return (EINVAL);
- }
-
- /* Check that the FD given is legit. and change it to a pointer to a
- * struct file. */
- fd = CMSG_DATA(cm);
- if ((error = fget(td, fd, 0, &fp)) != 0)
- return (error);
-
- /* Depending on what kind of resource it is, act differently. For
- * devices, we treat it as a file. For an AF_NETGRAPH socket,
- * shortcut straight to the node. */
- switch (fp->f_type) {
- case DTYPE_VNODE:
- vn = fp->f_data;
- if (vn && (vn->v_type == VCHR)) {
- /* for a VCHR, actually reference the FILE */
- fhold(fp);
- /* XXX then what :) */
- /* how to pass on to other modules? */
- } else {
- fdrop(fp, td);
- TRAP_ERROR;
- return (EINVAL);
- }
- break;
- default:
- fdrop(fp, td);
- TRAP_ERROR;
- return (EINVAL);
- }
- fdrop(fp, td);
- return (0);
-}
-#endif /* NOTYET */
-
/*
* Connect the data socket to a named control socket node.
*/
@@ -776,6 +728,7 @@ ng_connect_data(struct sockaddr *nam, struct ngpcb *pcbp)
mtx_lock(&priv->mtx);
priv->datasock = pcbp;
pcbp->sockdata = priv;
+ pcbp->node_id = priv->node->nd_ID; /* hint for netstat(1) */
priv->refs++;
mtx_unlock(&priv->mtx);
NG_FREE_ITEM(item); /* drop the reference to the node */
@@ -817,6 +770,35 @@ ngs_constructor(node_p nodep)
return (EINVAL);
}
+static void
+ngs_rehash(node_p node)
+{
+ struct ngsock *priv = NG_NODE_PRIVATE(node);
+ struct ngshash *new;
+ struct hookpriv *hp;
+ hook_p hook;
+ uint32_t h;
+ u_long hmask;
+
+ new = hashinit_flags((priv->hmask + 1) * 2, M_NETGRAPH_SOCK, &hmask,
+ HASH_NOWAIT);
+ if (new == NULL)
+ return;
+
+ LIST_FOREACH(hook, &node->nd_hooks, hk_hooks) {
+ hp = NG_HOOK_PRIVATE(hook);
+#ifdef INVARIANTS
+ LIST_REMOVE(hp, next);
+#endif
+ h = hash32_str(NG_HOOK_NAME(hook), HASHINIT) & hmask;
+ LIST_INSERT_HEAD(&new[h], hp, next);
+ }
+
+ hashdestroy(priv->hash, M_NETGRAPH_SOCK, priv->hmask);
+ priv->hash = new;
+ priv->hmask = hmask;
+}
+
/*
* We allow any hook to be connected to the node.
* There is no per-hook private information though.
@@ -824,7 +806,20 @@ ngs_constructor(node_p nodep)
static int
ngs_newhook(node_p node, hook_p hook, const char *name)
{
- NG_HOOK_SET_PRIVATE(hook, NG_NODE_PRIVATE(node));
+ struct ngsock *const priv = NG_NODE_PRIVATE(node);
+ struct hookpriv *hp;
+ uint32_t h;
+
+ hp = malloc(sizeof(*hp), M_NETGRAPH_SOCK, M_NOWAIT);
+ if (hp == NULL)
+ return (ENOMEM);
+ if (node->nd_numhooks * 2 > priv->hmask)
+ ngs_rehash(node);
+ hp->hook = hook;
+ h = hash32_str(name, HASHINIT) & priv->hmask;
+ LIST_INSERT_HEAD(&priv->hash[h], hp, next);
+ NG_HOOK_SET_PRIVATE(hook, hp);
+
return (0);
}
@@ -846,6 +841,41 @@ ngs_connect(hook_p hook)
return (0);
}
+/* Look up hook by name */
+static hook_p
+ngs_findhook(node_p node, const char *name)
+{
+ struct ngsock *priv = NG_NODE_PRIVATE(node);
+ struct hookpriv *hp;
+ uint32_t h;
+
+ /*
+ * Microoptimisations for a ng_socket with no
+ * hooks, or with a single hook, which is a
+ * common case.
+ */
+ if (node->nd_numhooks == 0)
+ return (NULL);
+ if (node->nd_numhooks == 1) {
+ hook_p hook;
+
+ hook = LIST_FIRST(&node->nd_hooks);
+
+ if (strcmp(NG_HOOK_NAME(hook), name) == 0)
+ return (hook);
+ else
+ return (NULL);
+ }
+
+ h = hash32_str(name, HASHINIT) & priv->hmask;
+
+ LIST_FOREACH(hp, &priv->hash[h], next)
+ if (strcmp(NG_HOOK_NAME(hp->hook), name) == 0)
+ return (hp->hook);
+
+ return (NULL);
+}
+
/*
* Incoming messages get passed up to the control socket.
* Unless they are for us specifically (socket_type)
@@ -1013,6 +1043,10 @@ ngs_disconnect(hook_p hook)
{
node_p node = NG_HOOK_NODE(hook);
struct ngsock *const priv = NG_NODE_PRIVATE(node);
+ struct hookpriv *hp = NG_HOOK_PRIVATE(hook);
+
+ LIST_REMOVE(hp, next);
+ free(hp, M_NETGRAPH_SOCK);
if ((priv->datasock) && (priv->datasock->ng_socket)) {
if (NG_NODE_NUMHOOKS(node) == 1)
diff --git a/sys/netgraph/ng_socketvar.h b/sys/netgraph/ng_socketvar.h
index c1e59dc..59080d2 100644
--- a/sys/netgraph/ng_socketvar.h
+++ b/sys/netgraph/ng_socketvar.h
@@ -50,20 +50,6 @@ struct ngpcb {
struct ngsock *sockdata; /* netgraph info */
LIST_ENTRY(ngpcb) socks; /* linked list of sockets */
int type; /* NG_CONTROL or NG_DATA */
-};
-
-/* Per-node private data */
-struct ngsock {
- struct ng_node *node; /* the associated netgraph node */
- struct ngpcb *datasock; /* optional data socket */
- struct ngpcb *ctlsock; /* optional control socket */
- int flags;
- int refs;
- struct mtx mtx; /* mtx to wait on */
- int error; /* place to store error */
ng_ID_t node_id; /* a hint for netstat(1) to find the node */
};
-#define NGS_FLAG_NOLINGER 1 /* close with last hook */
-
#endif /* _NETGRAPH_NG_SOCKETVAR_H_ */
-
diff --git a/sys/netgraph/ng_tag.c b/sys/netgraph/ng_tag.c
index 150a0f2..22d45a3 100644
--- a/sys/netgraph/ng_tag.c
+++ b/sys/netgraph/ng_tag.c
@@ -303,8 +303,9 @@ ng_tag_newhook(node_p node, hook_p hook, const char *name)
int error;
/* Create hook private structure. */
- hip = malloc(sizeof(*hip), M_NETGRAPH_TAG, M_WAITOK | M_ZERO);
- /* M_WAITOK can't return NULL. */
+ hip = malloc(sizeof(*hip), M_NETGRAPH_TAG, M_NOWAIT | M_ZERO);
+ if (hip == NULL)
+ return (ENOMEM);
NG_HOOK_SET_PRIVATE(hook, hip);
/*
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index 60fa944..bdb4efc 100644
--- a/sys/netinet/if_ether.c
+++ b/sys/netinet/if_ether.c
@@ -64,7 +64,7 @@ __FBSDID("$FreeBSD$");
#include <netinet/in_var.h>
#include <net/if_llatbl.h>
#include <netinet/if_ether.h>
-#if defined(INET) || defined(INET6)
+#ifdef INET
#include <netinet/ip_carp.h>
#endif
@@ -123,8 +123,6 @@ SYSCTL_VNET_INT(_net_link_ether_inet, OID_AUTO, maxhold, CTLFLAG_RW,
"Number of packets to hold per ARP entry");
static void arp_init(void);
-void arprequest(struct ifnet *,
- struct in_addr *, struct in_addr *, u_char *);
static void arpintr(struct mbuf *);
static void arptimer(void *);
#ifdef INET
@@ -139,8 +137,6 @@ static const struct netisr_handler arp_nh = {
};
#ifdef AF_INET
-void arp_ifscrub(struct ifnet *ifp, uint32_t addr);
-
/*
* called by in_ifscrub to remove entry from the table when
* the interface goes away
@@ -215,29 +211,41 @@ arprequest(struct ifnet *ifp, struct in_addr *sip, struct in_addr *tip,
struct mbuf *m;
struct arphdr *ah;
struct sockaddr sa;
+ u_char *carpaddr = NULL;
if (sip == NULL) {
- /* XXX don't believe this can happen (or explain why) */
/*
* The caller did not supply a source address, try to find
* a compatible one among those assigned to this interface.
*/
struct ifaddr *ifa;
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
- if (!ifa->ifa_addr ||
- ifa->ifa_addr->sa_family != AF_INET)
+ if (ifa->ifa_addr->sa_family != AF_INET)
continue;
- sip = &SIN(ifa->ifa_addr)->sin_addr;
+
+ if (ifa->ifa_carp) {
+ if ((*carp_iamatch_p)(ifa, &carpaddr) == 0)
+ continue;
+ sip = &IA_SIN(ifa)->sin_addr;
+ } else {
+ carpaddr = NULL;
+ sip = &IA_SIN(ifa)->sin_addr;
+ }
+
if (0 == ((sip->s_addr ^ tip->s_addr) &
- SIN(ifa->ifa_netmask)->sin_addr.s_addr) )
+ IA_MASKSIN(ifa)->sin_addr.s_addr))
break; /* found it. */
}
+ IF_ADDR_RUNLOCK(ifp);
if (sip == NULL) {
printf("%s: cannot find matching address\n", __func__);
return;
}
}
+ if (enaddr == NULL)
+ enaddr = carpaddr ? carpaddr : (u_char *)IF_LLADDR(ifp);
if ((m = m_gethdr(M_DONTWAIT, MT_DATA)) == NULL)
return;
@@ -332,9 +340,7 @@ retry:
*/
if (!(la->la_flags & LLE_STATIC) &&
time_uptime + la->la_preempt > la->la_expire) {
- arprequest(ifp, NULL,
- &SIN(dst)->sin_addr, IF_LLADDR(ifp));
-
+ arprequest(ifp, NULL, &SIN(dst)->sin_addr, NULL);
la->la_preempt--;
}
@@ -410,8 +416,7 @@ retry:
LLE_REMREF(la);
la->la_asked++;
LLE_WUNLOCK(la);
- arprequest(ifp, NULL, &SIN(dst)->sin_addr,
- IF_LLADDR(ifp));
+ arprequest(ifp, NULL, &SIN(dst)->sin_addr, NULL);
return (error);
}
done:
@@ -516,7 +521,7 @@ in_arpinput(struct mbuf *m)
int op, flags;
int req_len;
int bridged = 0, is_bridge = 0;
- int carp_match = 0;
+ int carped;
struct sockaddr_in sin;
sin.sin_len = sizeof(struct sockaddr_in);
sin.sin_family = AF_INET;
@@ -561,24 +566,14 @@ in_arpinput(struct mbuf *m)
* For a bridge, we want to check the address irrespective
* of the receive interface. (This will change slightly
* when we have clusters of interfaces).
- * If the interface does not match, but the recieving interface
- * is part of carp, we call carp_iamatch to see if this is a
- * request for the virtual host ip.
- * XXX: This is really ugly!
*/
IN_IFADDR_RLOCK();
LIST_FOREACH(ia, INADDR_HASH(itaddr.s_addr), ia_hash) {
if (((bridged && ia->ia_ifp->if_bridge == ifp->if_bridge) ||
ia->ia_ifp == ifp) &&
- itaddr.s_addr == ia->ia_addr.sin_addr.s_addr) {
- ifa_ref(&ia->ia_ifa);
- IN_IFADDR_RUNLOCK();
- goto match;
- }
- if (ifp->if_carp != NULL &&
- (*carp_iamatch_p)(ifp, ia, &isaddr, &enaddr) &&
- itaddr.s_addr == ia->ia_addr.sin_addr.s_addr) {
- carp_match = 1;
+ itaddr.s_addr == ia->ia_addr.sin_addr.s_addr &&
+ (ia->ia_ifa.ifa_carp == NULL ||
+ (*carp_iamatch_p)(&ia->ia_ifa, &enaddr))) {
ifa_ref(&ia->ia_ifa);
IN_IFADDR_RUNLOCK();
goto match;
@@ -620,15 +615,17 @@ in_arpinput(struct mbuf *m)
* No match, use the first inet address on the receive interface
* as a dummy address for the rest of the function.
*/
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link)
- if (ifa->ifa_addr->sa_family == AF_INET) {
+ if (ifa->ifa_addr->sa_family == AF_INET &&
+ (ifa->ifa_carp == NULL ||
+ (*carp_iamatch_p)(ifa, &enaddr))) {
ia = ifatoia(ifa);
ifa_ref(ifa);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
goto match;
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
/*
* If bridging, fall back to using any inet address.
@@ -643,6 +640,7 @@ in_arpinput(struct mbuf *m)
match:
if (!enaddr)
enaddr = (u_int8_t *)IF_LLADDR(ifp);
+ carped = (ia->ia_ifa.ifa_carp != NULL);
myaddr = ia->ia_addr.sin_addr;
ifa_free(&ia->ia_ifa);
if (!bcmp(ar_sha(ah), enaddr, ifp->if_addrlen))
@@ -659,9 +657,9 @@ match:
* case we suppress the warning to avoid false positive complaints of
* potential misconfiguration.
*/
- if (!bridged && isaddr.s_addr == myaddr.s_addr && myaddr.s_addr != 0) {
- log(LOG_ERR,
- "arp: %*D is using my IP address %s on %s!\n",
+ if (!bridged && !carped && isaddr.s_addr == myaddr.s_addr &&
+ myaddr.s_addr != 0) {
+ log(LOG_ERR, "arp: %*D is using my IP address %s on %s!\n",
ifp->if_addrlen, (u_char *)ar_sha(ah), ":",
inet_ntoa(isaddr), ifp->if_xname);
itaddr = myaddr;
@@ -682,7 +680,7 @@ match:
IF_AFDATA_UNLOCK(ifp);
if (la != NULL) {
/* the following is not an error when doing bridging */
- if (!bridged && la->lle_tbl->llt_ifp != ifp && !carp_match) {
+ if (!bridged && la->lle_tbl->llt_ifp != ifp) {
if (log_arp_wrong_iface)
log(LOG_WARNING, "arp: %s is on %s "
"but got reply from %*D on %s\n",
@@ -879,6 +877,9 @@ arp_ifinit(struct ifnet *ifp, struct ifaddr *ifa)
{
struct llentry *lle;
+ if (ifa->ifa_carp != NULL)
+ return;
+
if (ntohl(IA_SIN(ifa)->sin_addr.s_addr) != INADDR_ANY) {
arprequest(ifp, &IA_SIN(ifa)->sin_addr,
&IA_SIN(ifa)->sin_addr, IF_LLADDR(ifp));
diff --git a/sys/netinet/if_ether.h b/sys/netinet/if_ether.h
index 1b69436..8d44d35 100644
--- a/sys/netinet/if_ether.h
+++ b/sys/netinet/if_ether.h
@@ -115,8 +115,11 @@ struct ifaddr;
int arpresolve(struct ifnet *ifp, struct rtentry *rt,
struct mbuf *m, struct sockaddr *dst, u_char *desten,
struct llentry **lle);
+void arprequest(struct ifnet *, struct in_addr *, struct in_addr *,
+ u_char *);
void arp_ifinit(struct ifnet *, struct ifaddr *);
void arp_ifinit2(struct ifnet *, struct ifaddr *, u_char *);
+void arp_ifscrub(struct ifnet *, uint32_t);
#include <sys/eventhandler.h>
typedef void (*llevent_arp_update_fn)(void *, struct llentry *);
diff --git a/sys/netinet/igmp.c b/sys/netinet/igmp.c
index e50d158..4c0b105 100644
--- a/sys/netinet/igmp.c
+++ b/sys/netinet/igmp.c
@@ -618,7 +618,7 @@ igmp_ifdetach(struct ifnet *ifp)
igi = ((struct in_ifinfo *)ifp->if_afdata[AF_INET])->ii_igmp;
if (igi->igi_version == IGMP_VERSION_3) {
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
if (ifma->ifma_addr->sa_family != AF_INET ||
ifma->ifma_protospec == NULL)
@@ -634,7 +634,7 @@ igmp_ifdetach(struct ifnet *ifp)
}
inm_clear_recorded(inm);
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
/*
* Free the in_multi reference(s) for this IGMP lifecycle.
*/
@@ -751,7 +751,7 @@ igmp_input_v1_query(struct ifnet *ifp, const struct ip *ip,
* for the interface on which the query arrived,
* except those which are already running.
*/
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
if (ifma->ifma_addr->sa_family != AF_INET ||
ifma->ifma_protospec == NULL)
@@ -779,7 +779,7 @@ igmp_input_v1_query(struct ifnet *ifp, const struct ip *ip,
break;
}
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
out_locked:
IGMP_UNLOCK();
@@ -852,7 +852,7 @@ igmp_input_v2_query(struct ifnet *ifp, const struct ip *ip,
*/
CTR2(KTR_IGMPV3, "process v2 general query on ifp %p(%s)",
ifp, ifp->if_xname);
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
if (ifma->ifma_addr->sa_family != AF_INET ||
ifma->ifma_protospec == NULL)
@@ -860,7 +860,7 @@ igmp_input_v2_query(struct ifnet *ifp, const struct ip *ip,
inm = (struct in_multi *)ifma->ifma_protospec;
igmp_v2_update_group(inm, timer);
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
} else {
/*
* Group-specific IGMPv2 query, we need only
@@ -1642,7 +1642,7 @@ igmp_fasttimo_vnet(void)
struct ifqueue qrq; /* Query response packets */
struct ifnet *ifp;
struct igmp_ifinfo *igi;
- struct ifmultiaddr *ifma, *tifma;
+ struct ifmultiaddr *ifma;
struct in_multi *inm;
int loop, uri_fasthz;
@@ -1708,9 +1708,8 @@ igmp_fasttimo_vnet(void)
IFQ_SET_MAXLEN(&scq, IGMP_MAX_STATE_CHANGE_PACKETS);
}
- IF_ADDR_LOCK(ifp);
- TAILQ_FOREACH_SAFE(ifma, &ifp->if_multiaddrs, ifma_link,
- tifma) {
+ IF_ADDR_RLOCK(ifp);
+ TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
if (ifma->ifma_addr->sa_family != AF_INET ||
ifma->ifma_protospec == NULL)
continue;
@@ -1727,7 +1726,7 @@ igmp_fasttimo_vnet(void)
break;
}
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
if (igi->igi_version == IGMP_VERSION_3) {
struct in_multi *tinm;
@@ -2004,7 +2003,7 @@ igmp_v3_cancel_link_timers(struct igmp_ifinfo *igi)
{
struct ifmultiaddr *ifma;
struct ifnet *ifp;
- struct in_multi *inm;
+ struct in_multi *inm, *tinm;
CTR3(KTR_IGMPV3, "%s: cancel v3 timers on ifp %p(%s)", __func__,
igi->igi_ifp, igi->igi_ifp->if_xname);
@@ -2024,7 +2023,7 @@ igmp_v3_cancel_link_timers(struct igmp_ifinfo *igi)
* for all memberships scoped to this link.
*/
ifp = igi->igi_ifp;
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
if (ifma->ifma_addr->sa_family != AF_INET ||
ifma->ifma_protospec == NULL)
@@ -2050,14 +2049,8 @@ igmp_v3_cancel_link_timers(struct igmp_ifinfo *igi)
* transition to REPORTING to ensure the host leave
* message is sent upstream to the old querier --
* transition to NOT would lose the leave and race.
- *
- * SMPNG: Must drop and re-acquire IF_ADDR_LOCK
- * around inm_release_locked(), as it is not
- * a recursive mutex.
*/
- IF_ADDR_UNLOCK(ifp);
- inm_release_locked(inm);
- IF_ADDR_LOCK(ifp);
+ SLIST_INSERT_HEAD(&igi->igi_relinmhead, inm, inm_nrele);
/* FALLTHROUGH */
case IGMP_G_QUERY_PENDING_MEMBER:
case IGMP_SG_QUERY_PENDING_MEMBER:
@@ -2075,7 +2068,11 @@ igmp_v3_cancel_link_timers(struct igmp_ifinfo *igi)
inm->inm_timer = 0;
_IF_DRAIN(&inm->inm_scq);
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
+ SLIST_FOREACH_SAFE(inm, &igi->igi_relinmhead, inm_nrele, tinm) {
+ SLIST_REMOVE_HEAD(&igi->igi_relinmhead, inm_nrele);
+ inm_release_locked(inm);
+ }
}
/*
@@ -3321,7 +3318,7 @@ igmp_v3_merge_state_changes(struct in_multi *inm, struct ifqueue *ifscq)
static void
igmp_v3_dispatch_general_query(struct igmp_ifinfo *igi)
{
- struct ifmultiaddr *ifma, *tifma;
+ struct ifmultiaddr *ifma;
struct ifnet *ifp;
struct in_multi *inm;
int retval, loop;
@@ -3334,8 +3331,8 @@ igmp_v3_dispatch_general_query(struct igmp_ifinfo *igi)
ifp = igi->igi_ifp;
- IF_ADDR_LOCK(ifp);
- TAILQ_FOREACH_SAFE(ifma, &ifp->if_multiaddrs, ifma_link, tifma) {
+ IF_ADDR_RLOCK(ifp);
+ TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
if (ifma->ifma_addr->sa_family != AF_INET ||
ifma->ifma_protospec == NULL)
continue;
@@ -3365,7 +3362,7 @@ igmp_v3_dispatch_general_query(struct igmp_ifinfo *igi)
break;
}
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
loop = (igi->igi_flags & IGIF_LOOPBACK) ? 1 : 0;
igmp_dispatch_queue(&igi->igi_gq, IGMP_MAX_RESPONSE_BURST, loop);
diff --git a/sys/netinet/in.c b/sys/netinet/in.c
index 4d7c657..ee9259c 100644
--- a/sys/netinet/in.c
+++ b/sys/netinet/in.c
@@ -56,10 +56,12 @@ __FBSDID("$FreeBSD$");
#include <net/route.h>
#include <net/vnet.h>
+#include <netinet/if_ether.h>
#include <netinet/in.h>
#include <netinet/in_var.h>
#include <netinet/in_pcb.h>
#include <netinet/ip_var.h>
+#include <netinet/ip_carp.h>
#include <netinet/igmp_var.h>
#include <netinet/udp.h>
#include <netinet/udp_var.h>
@@ -69,17 +71,15 @@ static void in_len2mask(struct in_addr *, int);
static int in_lifaddr_ioctl(struct socket *, u_long, caddr_t,
struct ifnet *, struct thread *);
-static int in_addprefix(struct in_ifaddr *, int);
-static int in_scrubprefix(struct in_ifaddr *, u_int);
static void in_socktrim(struct sockaddr_in *);
-static int in_ifinit(struct ifnet *,
- struct in_ifaddr *, struct sockaddr_in *, int, int);
+static int in_ifinit(struct ifnet *, struct in_ifaddr *,
+ struct sockaddr_in *, int, int);
static void in_purgemaddrs(struct ifnet *);
-static VNET_DEFINE(int, sameprefixcarponly);
-#define V_sameprefixcarponly VNET(sameprefixcarponly)
-SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, same_prefix_carp_only, CTLFLAG_RW,
- &VNET_NAME(sameprefixcarponly), 0,
+static VNET_DEFINE(int, nosameprefix);
+#define V_nosameprefix VNET(nosameprefix)
+SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, no_same_prefix, CTLFLAG_RW,
+ &VNET_NAME(nosameprefix), 0,
"Refuse to create same prefixes on different interfaces");
VNET_DECLARE(struct inpcbinfo, ripcbinfo);
@@ -220,9 +220,16 @@ in_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp,
struct in_addr dst;
struct in_ifinfo *ii;
struct in_aliasreq *ifra = (struct in_aliasreq *)data;
- struct sockaddr_in oldaddr;
int error, hostIsNew, iaIsNew, maskIsNew;
int iaIsFirst;
+ u_long ocmd = cmd;
+
+ /*
+ * Pre-10.x compat: OSIOCAIFADDR passes a shorter
+ * struct in_aliasreq, without ifra_vhid.
+ */
+ if (cmd == OSIOCAIFADDR)
+ cmd = SIOCAIFADDR;
ia = NULL;
iaIsFirst = 0;
@@ -255,8 +262,10 @@ in_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp,
return (EINVAL);
#if 0
/*
- * ifconfig(8) historically doesn't set af_family for mask
- * for unknown reason.
+ * ifconfig(8) in pre-10.x doesn't set sin_family for the
+ * mask. The code is disabled for the 10.x timeline, to
+ * make SIOCAIFADDR compatible with 9.x ifconfig(8).
+ * The code should be enabled in 11.x
*/
if (ifra->ifra_mask.sin_len != 0 &&
(ifra->ifra_mask.sin_len != sizeof(struct sockaddr_in) ||
@@ -268,10 +277,8 @@ in_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp,
case SIOCSIFBRDADDR:
case SIOCSIFDSTADDR:
case SIOCSIFNETMASK:
- if (ifr->ifr_addr.sa_family != AF_INET ||
- ifr->ifr_addr.sa_len != sizeof(struct sockaddr_in))
- return (EINVAL);
- break;
+ /* We no longer support that old commands. */
+ return (EINVAL);
case SIOCALIFADDR:
if (td != NULL) {
@@ -312,10 +319,6 @@ in_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp,
*/
switch (cmd) {
case SIOCAIFADDR:
- case SIOCSIFADDR:
- case SIOCSIFBRDADDR:
- case SIOCSIFNETMASK:
- case SIOCSIFDSTADDR:
if (td != NULL) {
error = priv_check(td, PRIV_NET_ADDIFADDR);
if (error)
@@ -353,7 +356,7 @@ in_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp,
ifa_ref(&ia->ia_ifa);
IN_IFADDR_RUNLOCK();
if (ia == NULL) {
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
iap = ifatoia(ifa);
if (iap->ia_addr.sin_family == AF_INET) {
@@ -367,7 +370,7 @@ in_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp,
}
if (ia != NULL)
ifa_ref(&ia->ia_ifa);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
}
if (ia == NULL)
iaIsFirst = 1;
@@ -403,10 +406,6 @@ in_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp,
error = EADDRNOTAVAIL;
goto out;
}
- /* FALLTHROUGH */
- case SIOCSIFADDR:
- case SIOCSIFNETMASK:
- case SIOCSIFDSTADDR:
if (ia == NULL) {
ia = (struct in_ifaddr *)
malloc(sizeof *ia, M_IFADDR, M_NOWAIT |
@@ -431,9 +430,9 @@ in_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp,
ia->ia_ifp = ifp;
ifa_ref(ifa); /* if_addrhead */
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_WLOCK(ifp);
TAILQ_INSERT_TAIL(&ifp->if_addrhead, ifa, ifa_link);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_WUNLOCK(ifp);
ifa_ref(ifa); /* in_ifaddrhead */
IN_IFADDR_WLOCK();
TAILQ_INSERT_TAIL(&V_in_ifaddrhead, ia, ia_link);
@@ -442,7 +441,6 @@ in_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp,
}
break;
- case SIOCSIFBRDADDR:
case SIOCGIFADDR:
case SIOCGIFNETMASK:
case SIOCGIFDSTADDR:
@@ -483,61 +481,6 @@ in_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp,
*((struct sockaddr_in *)&ifr->ifr_addr) = ia->ia_sockmask;
goto out;
- case SIOCSIFDSTADDR:
- if ((ifp->if_flags & IFF_POINTOPOINT) == 0) {
- error = EINVAL;
- goto out;
- }
- oldaddr = ia->ia_dstaddr;
- ia->ia_dstaddr = *(struct sockaddr_in *)&ifr->ifr_dstaddr;
- if (ifp->if_ioctl != NULL) {
- error = (*ifp->if_ioctl)(ifp, SIOCSIFDSTADDR,
- (caddr_t)ia);
- if (error) {
- ia->ia_dstaddr = oldaddr;
- goto out;
- }
- }
- if (ia->ia_flags & IFA_ROUTE) {
- ia->ia_ifa.ifa_dstaddr = (struct sockaddr *)&oldaddr;
- rtinit(&(ia->ia_ifa), (int)RTM_DELETE, RTF_HOST);
- ia->ia_ifa.ifa_dstaddr =
- (struct sockaddr *)&ia->ia_dstaddr;
- rtinit(&(ia->ia_ifa), (int)RTM_ADD, RTF_HOST|RTF_UP);
- }
- goto out;
-
- case SIOCSIFBRDADDR:
- if ((ifp->if_flags & IFF_BROADCAST) == 0) {
- error = EINVAL;
- goto out;
- }
- ia->ia_broadaddr = *(struct sockaddr_in *)&ifr->ifr_broadaddr;
- goto out;
-
- case SIOCSIFADDR:
- error = in_ifinit(ifp, ia,
- (struct sockaddr_in *) &ifr->ifr_addr, 1, 0);
- if (error != 0 && iaIsNew)
- break;
- if (error == 0) {
- ii = ((struct in_ifinfo *)ifp->if_afdata[AF_INET]);
- if (iaIsFirst &&
- (ifp->if_flags & IFF_MULTICAST) != 0) {
- error = in_joingroup(ifp, &allhosts_addr,
- NULL, &ii->ii_allhosts);
- }
- EVENTHANDLER_INVOKE(ifaddr_event, ifp);
- }
- error = 0;
- goto out;
-
- case SIOCSIFNETMASK:
- ia->ia_sockmask.sin_addr = ((struct sockaddr_in *)
- &ifr->ifr_addr)->sin_addr;
- ia->ia_subnetmask = ntohl(ia->ia_sockmask.sin_addr.s_addr);
- goto out;
-
case SIOCAIFADDR:
maskIsNew = 0;
hostIsNew = 1;
@@ -569,8 +512,8 @@ in_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp,
maskIsNew = 1; /* We lie; but the effect's the same */
}
if (hostIsNew || maskIsNew)
- error = in_ifinit(ifp, ia, &ifra->ifra_addr, 0,
- maskIsNew);
+ error = in_ifinit(ifp, ia, &ifra->ifra_addr, maskIsNew,
+ (ocmd == cmd ? ifra->ifra_vhid : 0));
if (error != 0 && iaIsNew)
break;
@@ -609,7 +552,10 @@ in_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp,
panic("in_control: unsupported ioctl");
}
- IF_ADDR_LOCK(ifp);
+ if (ia->ia_ifa.ifa_carp)
+ (*carp_detach_p)(&ia->ia_ifa);
+
+ IF_ADDR_WLOCK(ifp);
/* Re-check that ia is still part of the list. */
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
if (ifa == &ia->ia_ifa)
@@ -621,12 +567,12 @@ in_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp,
* try it again for the next loop as there is no other exit
* path between here and out.
*/
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_WUNLOCK(ifp);
error = EADDRNOTAVAIL;
goto out;
}
TAILQ_REMOVE(&ifp->if_addrhead, &ia->ia_ifa, ifa_link);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_WUNLOCK(ifp);
ifa_free(&ia->ia_ifa); /* if_addrhead */
IN_IFADDR_WLOCK();
@@ -722,7 +668,7 @@ in_lifaddr_ioctl(struct socket *so, u_long cmd, caddr_t data,
if (iflr->flags & IFLR_PREFIX)
return (EINVAL);
- /* copy args to in_aliasreq, perform ioctl(SIOCAIFADDR_IN6). */
+ /* copy args to in_aliasreq, perform ioctl(SIOCAIFADDR). */
bzero(&ifra, sizeof(ifra));
bcopy(iflr->iflr_name, ifra.ifra_name,
sizeof(ifra.ifra_name));
@@ -771,16 +717,21 @@ in_lifaddr_ioctl(struct socket *so, u_long cmd, caddr_t data,
}
}
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
- if (ifa->ifa_addr->sa_family != AF_INET6)
+ if (ifa->ifa_addr->sa_family != AF_INET)
continue;
if (match.s_addr == 0)
break;
- candidate.s_addr = ((struct sockaddr_in *)&ifa->ifa_addr)->sin_addr.s_addr;
+ sin = (struct sockaddr_in *)&ifa->ifa_addr;
+ candidate.s_addr = sin->sin_addr.s_addr;
candidate.s_addr &= mask.s_addr;
if (candidate.s_addr == match.s_addr)
break;
}
+ if (ifa != NULL)
+ ifa_ref(ifa);
+ IF_ADDR_RUNLOCK(ifp);
if (ifa == NULL)
return (EADDRNOTAVAIL);
ia = (struct in_ifaddr *)ifa;
@@ -799,12 +750,13 @@ in_lifaddr_ioctl(struct socket *so, u_long cmd, caddr_t data,
in_mask2len(&ia->ia_sockmask.sin_addr);
iflr->flags = 0; /*XXX*/
+ ifa_free(ifa);
return (0);
} else {
struct in_aliasreq ifra;
- /* fill in_aliasreq and do ioctl(SIOCDIFADDR_IN6) */
+ /* fill in_aliasreq and do ioctl(SIOCDIFADDR) */
bzero(&ifra, sizeof(ifra));
bcopy(iflr->iflr_name, ifra.ifra_name,
sizeof(ifra.ifra_name));
@@ -817,6 +769,7 @@ in_lifaddr_ioctl(struct socket *so, u_long cmd, caddr_t data,
}
bcopy(&ia->ia_sockmask, &ifra.ifra_dstaddr,
ia->ia_sockmask.sin_len);
+ ifa_free(ifa);
return (in_control(so, SIOCDIFADDR, (caddr_t)&ifra,
ifp, td));
@@ -843,14 +796,11 @@ in_ifscrub(struct ifnet *ifp, struct in_ifaddr *ia, u_int flags)
*/
static int
in_ifinit(struct ifnet *ifp, struct in_ifaddr *ia, struct sockaddr_in *sin,
- int scrub, int masksupplied)
+ int masksupplied, int vhid)
{
register u_long i = ntohl(sin->sin_addr.s_addr);
int flags = RTF_UP, error = 0;
- if (scrub)
- in_scrubprefix(ia, LLE_STATIC);
-
IN_IFADDR_WLOCK();
if (ia->ia_addr.sin_family == AF_INET)
LIST_REMOVE(ia, ia_hash);
@@ -859,6 +809,15 @@ in_ifinit(struct ifnet *ifp, struct in_ifaddr *ia, struct sockaddr_in *sin,
ia, ia_hash);
IN_IFADDR_WUNLOCK();
+ if (vhid > 0) {
+ if (carp_attach_p != NULL)
+ error = (*carp_attach_p)(&ia->ia_ifa, vhid);
+ else
+ error = EPROTONOSUPPORT;
+ }
+ if (error)
+ return (error);
+
/*
* Give the interface a chance to initialize
* if this is its first address,
@@ -885,11 +844,6 @@ in_ifinit(struct ifnet *ifp, struct in_ifaddr *ia, struct sockaddr_in *sin,
ia->ia_subnet = i & ia->ia_subnetmask;
in_socktrim(&ia->ia_sockmask);
/*
- * XXX: carp(4) does not have interface route
- */
- if (ifp->if_type == IFT_CARP)
- return (0);
- /*
* Add route for the network.
*/
ia->ia_ifa.ifa_metric = ifp->if_metric;
@@ -907,7 +861,7 @@ in_ifinit(struct ifnet *ifp, struct in_ifaddr *ia, struct sockaddr_in *sin,
return (0);
flags |= RTF_HOST;
}
- if ((error = in_addprefix(ia, flags)) != 0)
+ if (!vhid && (error = in_addprefix(ia, flags)) != 0)
return (error);
if (ia->ia_addr.sin_addr.s_addr == INADDR_ANY)
@@ -920,7 +874,7 @@ in_ifinit(struct ifnet *ifp, struct in_ifaddr *ia, struct sockaddr_in *sin,
/*
* add a loopback route to self
*/
- if (V_useloopback && !(ifp->if_flags & IFF_LOOPBACK)) {
+ if (V_useloopback && !vhid && !(ifp->if_flags & IFF_LOOPBACK)) {
struct route ia_ro;
bzero(&ia_ro, sizeof(ia_ro));
@@ -992,7 +946,7 @@ static void in_addralias_rtmsg(int cmd, struct in_addr *prefix,
/*
* Check if we have a route for the given prefix already or add one accordingly.
*/
-static int
+int
in_addprefix(struct in_ifaddr *target, int flags)
{
struct in_ifaddr *ia;
@@ -1038,9 +992,7 @@ in_addprefix(struct in_ifaddr *target, int flags)
} else
break;
#endif
- if (V_sameprefixcarponly &&
- target->ia_ifp->if_type != IFT_CARP &&
- ia->ia_ifp->if_type != IFT_CARP) {
+ if (V_nosameprefix) {
IN_IFADDR_RUNLOCK();
return (EEXIST);
} else {
@@ -1061,18 +1013,16 @@ in_addprefix(struct in_ifaddr *target, int flags)
return (error);
}
-extern void arp_ifscrub(struct ifnet *ifp, uint32_t addr);
-
/*
* If there is no other address in the system that can serve a route to the
* same prefix, remove the route. Hand over the route to the new address
* otherwise.
*/
-static int
+int
in_scrubprefix(struct in_ifaddr *target, u_int flags)
{
struct in_ifaddr *ia;
- struct in_addr prefix, mask, p;
+ struct in_addr prefix, mask, p, m;
int error = 0;
struct sockaddr_in prefix0, mask0;
@@ -1118,9 +1068,10 @@ in_scrubprefix(struct in_ifaddr *target, u_int flags)
arp_ifscrub(target->ia_ifp, IA_SIN(target)->sin_addr.s_addr);
}
- if (rtinitflags(target))
+ if (rtinitflags(target)) {
prefix = target->ia_dstaddr.sin_addr;
- else {
+ mask.s_addr = 0;
+ } else {
prefix = target->ia_addr.sin_addr;
mask = target->ia_sockmask.sin_addr;
prefix.s_addr &= mask.s_addr;
@@ -1133,28 +1084,30 @@ in_scrubprefix(struct in_ifaddr *target, u_int flags)
IN_IFADDR_RLOCK();
TAILQ_FOREACH(ia, &V_in_ifaddrhead, ia_link) {
- if (rtinitflags(ia))
+ if (rtinitflags(ia)) {
p = ia->ia_dstaddr.sin_addr;
- else {
+
+ if (prefix.s_addr != p.s_addr)
+ continue;
+ } else {
p = ia->ia_addr.sin_addr;
- p.s_addr &= ia->ia_sockmask.sin_addr.s_addr;
+ m = ia->ia_sockmask.sin_addr;
+ p.s_addr &= m.s_addr;
+
+ if (prefix.s_addr != p.s_addr ||
+ mask.s_addr != m.s_addr)
+ continue;
}
- if ((prefix.s_addr != p.s_addr) ||
- !(ia->ia_ifp->if_flags & IFF_UP))
+ if ((ia->ia_ifp->if_flags & IFF_UP) == 0)
continue;
/*
* If we got a matching prefix address, move IFA_ROUTE and
* the route itself to it. Make sure that routing daemons
* get a heads-up.
- *
- * XXX: a special case for carp(4) interface - this should
- * be more generally specified as an interface that
- * doesn't support such action.
*/
- if ((ia->ia_flags & IFA_ROUTE) == 0
- && (ia->ia_ifp->if_type != IFT_CARP)) {
+ if ((ia->ia_flags & IFA_ROUTE) == 0) {
ifa_ref(&ia->ia_ifa);
IN_IFADDR_RUNLOCK();
error = rtinit(&(target->ia_ifa), (int)RTM_DELETE,
@@ -1279,7 +1232,7 @@ in_purgemaddrs(struct ifnet *ifp)
* We need to do this as IF_ADDR_LOCK() may be re-acquired
* by code further down.
*/
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
if (ifma->ifma_addr->sa_family != AF_INET ||
ifma->ifma_protospec == NULL)
@@ -1291,7 +1244,7 @@ in_purgemaddrs(struct ifnet *ifp)
inm = (struct in_multi *)ifma->ifma_protospec;
LIST_INSERT_HEAD(&purgeinms, inm, inm_link);
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
LIST_FOREACH_SAFE(inm, &purgeinms, inm_link, tinm) {
LIST_REMOVE(inm, inm_link);
@@ -1302,9 +1255,6 @@ in_purgemaddrs(struct ifnet *ifp)
IN_MULTI_UNLOCK();
}
-#include <net/if_dl.h>
-#include <netinet/if_ether.h>
-
struct in_llentry {
struct llentry base;
struct sockaddr_in l3_addr4;
diff --git a/sys/netinet/in_mcast.c b/sys/netinet/in_mcast.c
index 6c62dca..b0d53b0 100644
--- a/sys/netinet/in_mcast.c
+++ b/sys/netinet/in_mcast.c
@@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$");
#include <sys/protosw.h>
#include <sys/sysctl.h>
#include <sys/ktr.h>
+#include <sys/taskqueue.h>
#include <sys/tree.h>
#include <net/if.h>
@@ -144,6 +145,8 @@ static void inm_purge(struct in_multi *);
static void inm_reap(struct in_multi *);
static struct ip_moptions *
inp_findmoptions(struct inpcb *);
+static void inp_freemoptions_internal(struct ip_moptions *);
+static void inp_gcmoptions(void *, int);
static int inp_get_source_filters(struct inpcb *, struct sockopt *);
static int inp_join_group(struct inpcb *, struct sockopt *);
static int inp_leave_group(struct inpcb *, struct sockopt *);
@@ -179,6 +182,10 @@ static SYSCTL_NODE(_net_inet_ip_mcast, OID_AUTO, filters,
CTLFLAG_RD | CTLFLAG_MPSAFE, sysctl_ip_mcast_filters,
"Per-interface stack-wide source filters");
+static STAILQ_HEAD(, ip_moptions) imo_gc_list =
+ STAILQ_HEAD_INITIALIZER(imo_gc_list);
+static struct task imo_gc_task = TASK_INITIALIZER(0, inp_gcmoptions, NULL);
+
/*
* Inline function which wraps assertions for a valid ifp.
* The ifnet layer will set the ifma's ifp pointer to NULL if the ifp
@@ -422,7 +429,7 @@ in_getmulti(struct ifnet *ifp, const struct in_addr *group,
return (error);
/* XXX ifma_protospec must be covered by IF_ADDR_LOCK */
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_WLOCK(ifp);
/*
* If something other than netinet is occupying the link-layer
@@ -446,11 +453,11 @@ in_getmulti(struct ifnet *ifp, const struct in_addr *group,
#endif
++inm->inm_refcount;
*pinm = inm;
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_WUNLOCK(ifp);
return (0);
}
- IF_ADDR_LOCK_ASSERT(ifp);
+ IF_ADDR_WLOCK_ASSERT(ifp);
/*
* A new in_multi record is needed; allocate and initialize it.
@@ -462,7 +469,7 @@ in_getmulti(struct ifnet *ifp, const struct in_addr *group,
inm = malloc(sizeof(*inm), M_IPMADDR, M_NOWAIT | M_ZERO);
if (inm == NULL) {
if_delmulti_ifma(ifma);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_WUNLOCK(ifp);
return (ENOMEM);
}
inm->inm_addr = *group;
@@ -485,7 +492,7 @@ in_getmulti(struct ifnet *ifp, const struct in_addr *group,
*pinm = inm;
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_WUNLOCK(ifp);
return (0);
}
@@ -1171,11 +1178,8 @@ out_inm_release:
int
in_leavegroup(struct in_multi *inm, /*const*/ struct in_mfilter *imf)
{
- struct ifnet *ifp;
int error;
- ifp = inm->inm_ifp;
-
IN_MULTI_LOCK();
error = in_leavegroup_locked(inm, imf);
IN_MULTI_UNLOCK();
@@ -1518,17 +1522,29 @@ inp_findmoptions(struct inpcb *inp)
}
/*
- * Discard the IP multicast options (and source filters).
+ * Discard the IP multicast options (and source filters). To minimize
+ * the amount of work done while holding locks such as the INP's
+ * pcbinfo lock (which is used in the receive path), the free
+ * operation is performed asynchronously in a separate task.
*
* SMPng: NOTE: assumes INP write lock is held.
*/
void
inp_freemoptions(struct ip_moptions *imo)
{
- struct in_mfilter *imf;
- size_t idx, nmships;
KASSERT(imo != NULL, ("%s: ip_moptions is NULL", __func__));
+ IN_MULTI_LOCK();
+ STAILQ_INSERT_TAIL(&imo_gc_list, imo, imo_link);
+ IN_MULTI_UNLOCK();
+ taskqueue_enqueue(taskqueue_thread, &imo_gc_task);
+}
+
+static void
+inp_freemoptions_internal(struct ip_moptions *imo)
+{
+ struct in_mfilter *imf;
+ size_t idx, nmships;
nmships = imo->imo_num_memberships;
for (idx = 0; idx < nmships; ++idx) {
@@ -1546,6 +1562,22 @@ inp_freemoptions(struct ip_moptions *imo)
free(imo, M_IPMOPTS);
}
+static void
+inp_gcmoptions(void *context, int pending)
+{
+ struct ip_moptions *imo;
+
+ IN_MULTI_LOCK();
+ while (!STAILQ_EMPTY(&imo_gc_list)) {
+ imo = STAILQ_FIRST(&imo_gc_list);
+ STAILQ_REMOVE_HEAD(&imo_gc_list, imo_link);
+ IN_MULTI_UNLOCK();
+ inp_freemoptions_internal(imo);
+ IN_MULTI_LOCK();
+ }
+ IN_MULTI_UNLOCK();
+}
+
/*
* Atomically get source filters on a socket for an IPv4 multicast group.
* Called with INP lock held; returns with lock released.
@@ -2797,7 +2829,7 @@ sysctl_ip_mcast_filters(SYSCTL_HANDLER_ARGS)
IN_MULTI_LOCK();
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
if (ifma->ifma_addr->sa_family != AF_INET ||
ifma->ifma_protospec == NULL)
@@ -2830,7 +2862,7 @@ sysctl_ip_mcast_filters(SYSCTL_HANDLER_ARGS)
break;
}
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
IN_MULTI_UNLOCK();
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index f8f397c..e509610 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -196,7 +196,7 @@ SYSCTL_VNET_INT(_net_inet_ip_portrange, OID_AUTO, randomtime, CTLFLAG_RW,
&VNET_NAME(ipport_randomtime), 0,
"Minimum time to keep sequental port "
"allocation before switching to a random one");
-#endif
+#endif /* INET */
/*
* in_pcb.c: manage the Protocol Control Blocks.
@@ -745,7 +745,7 @@ in_pcbladdr(struct inpcb *inp, struct in_addr *faddr, struct in_addr *laddr,
ifp = ia->ia_ifp;
ifa_free(&ia->ia_ifa);
ia = NULL;
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
sa = ifa->ifa_addr;
@@ -759,10 +759,10 @@ in_pcbladdr(struct inpcb *inp, struct in_addr *faddr, struct in_addr *laddr,
}
if (ia != NULL) {
laddr->s_addr = ia->ia_addr.sin_addr.s_addr;
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
goto done;
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
/* 3. As a last resort return the 'default' jail address. */
error = prison_get_ip4(cred, laddr);
@@ -804,7 +804,7 @@ in_pcbladdr(struct inpcb *inp, struct in_addr *faddr, struct in_addr *laddr,
*/
ia = NULL;
ifp = sro.ro_rt->rt_ifp;
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
sa = ifa->ifa_addr;
if (sa->sa_family != AF_INET)
@@ -817,10 +817,10 @@ in_pcbladdr(struct inpcb *inp, struct in_addr *faddr, struct in_addr *laddr,
}
if (ia != NULL) {
laddr->s_addr = ia->ia_addr.sin_addr.s_addr;
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
goto done;
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
/* 3. As a last resort return the 'default' jail address. */
error = prison_get_ip4(cred, laddr);
@@ -868,7 +868,7 @@ in_pcbladdr(struct inpcb *inp, struct in_addr *faddr, struct in_addr *laddr,
ifp = ia->ia_ifp;
ifa_free(&ia->ia_ifa);
ia = NULL;
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
sa = ifa->ifa_addr;
@@ -883,10 +883,10 @@ in_pcbladdr(struct inpcb *inp, struct in_addr *faddr, struct in_addr *laddr,
}
if (ia != NULL) {
laddr->s_addr = ia->ia_addr.sin_addr.s_addr;
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
goto done;
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
}
/* 3. As a last resort return the 'default' jail address. */
@@ -1038,7 +1038,7 @@ in_pcbdisconnect(struct inpcb *inp)
inp->inp_fport = 0;
in_pcbrehash(inp);
}
-#endif
+#endif /* INET */
/*
* in_pcbdetach() is responsibe for disassociating a socket from an inpcb.
@@ -1169,7 +1169,7 @@ in_pcbfree(struct inpcb *inp)
#ifdef IPSEC
if (inp->inp_sp != NULL)
ipsec_delete_pcbpolicy(inp);
-#endif /* IPSEC */
+#endif
inp->inp_gencnt = ++pcbinfo->ipi_gencnt;
in_pcbremlists(inp);
#ifdef INET6
@@ -1586,7 +1586,7 @@ in_pcblookup_group(struct inpcbinfo *pcbinfo, struct inpcbgroup *pcbgroup,
if (inp->inp_vflag & INP_IPV6PROTO)
local_wild_mapped = inp;
else
-#endif /* INET6 */
+#endif
if (injail)
jail_wild = inp;
else
@@ -1601,7 +1601,7 @@ in_pcblookup_group(struct inpcbinfo *pcbinfo, struct inpcbgroup *pcbgroup,
#ifdef INET6
if (inp == NULL)
inp = local_wild_mapped;
-#endif /* defined(INET6) */
+#endif
if (inp != NULL)
goto found;
} /* if (lookupflags & INPLOOKUP_WILDCARD) */
@@ -1731,7 +1731,7 @@ in_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, struct in_addr faddr,
if (inp->inp_vflag & INP_IPV6PROTO)
local_wild_mapped = inp;
else
-#endif /* INET6 */
+#endif
if (injail)
jail_wild = inp;
else
@@ -1747,7 +1747,7 @@ in_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, struct in_addr faddr,
#ifdef INET6
if (local_wild_mapped != NULL)
return (local_wild_mapped);
-#endif /* defined(INET6) */
+#endif
} /* if ((lookupflags & INPLOOKUP_WILDCARD) != 0) */
return (NULL);
@@ -1871,7 +1871,7 @@ in_pcbinshash_internal(struct inpcb *inp, int do_pcbgroup_update)
if (inp->inp_vflag & INP_IPV6)
hashkey_faddr = inp->in6p_faddr.s6_addr32[3] /* XXX */;
else
-#endif /* INET6 */
+#endif
hashkey_faddr = inp->inp_faddr.s_addr;
pcbhash = &pcbinfo->ipi_hashbase[INP_PCBHASH(hashkey_faddr,
@@ -1958,7 +1958,7 @@ in_pcbrehash_mbuf(struct inpcb *inp, struct mbuf *m)
if (inp->inp_vflag & INP_IPV6)
hashkey_faddr = inp->in6p_faddr.s6_addr32[3] /* XXX */;
else
-#endif /* INET6 */
+#endif
hashkey_faddr = inp->inp_faddr.s_addr;
head = &pcbinfo->ipi_hashbase[INP_PCBHASH(hashkey_faddr,
@@ -2226,14 +2226,13 @@ db_print_inconninfo(struct in_conninfo *inc, const char *name, int indent)
/* IPv6. */
ip6_sprintf(laddr_str, &inc->inc6_laddr);
ip6_sprintf(faddr_str, &inc->inc6_faddr);
- } else {
+ } else
#endif
+ {
/* IPv4. */
inet_ntoa_r(inc->inc_laddr, laddr_str);
inet_ntoa_r(inc->inc_faddr, faddr_str);
-#ifdef INET6
}
-#endif
db_print_indent(indent);
db_printf("inc_laddr %s inc_lport %u\n", laddr_str,
ntohs(inc->inc_lport));
@@ -2446,4 +2445,4 @@ DB_SHOW_COMMAND(inpcb, db_show_inpcb)
db_print_inpcb(inp, "inpcb", 0);
}
-#endif
+#endif /* DDB */
diff --git a/sys/netinet/in_proto.c b/sys/netinet/in_proto.c
index a9a3890..b7dc82a 100644
--- a/sys/netinet/in_proto.c
+++ b/sys/netinet/in_proto.c
@@ -37,7 +37,6 @@ __FBSDID("$FreeBSD$");
#include "opt_ipsec.h"
#include "opt_inet.h"
#include "opt_inet6.h"
-#include "opt_pf.h"
#include "opt_sctp.h"
#include "opt_mpath.h"
@@ -101,11 +100,6 @@ static struct pr_usrreqs nousrreqs;
#include <netinet/sctp_var.h>
#endif /* SCTP */
-#ifdef DEV_PFSYNC
-#include <net/pfvar.h>
-#include <net/if_pfsync.h>
-#endif
-
FEATURE(inet, "Internet Protocol version 4");
extern struct domain inetdomain;
@@ -317,17 +311,6 @@ struct protosw inetsw[] = {
.pr_ctloutput = rip_ctloutput,
.pr_usrreqs = &rip_usrreqs
},
-#ifdef DEV_PFSYNC
-{
- .pr_type = SOCK_RAW,
- .pr_domain = &inetdomain,
- .pr_protocol = IPPROTO_PFSYNC,
- .pr_flags = PR_ATOMIC|PR_ADDR,
- .pr_input = pfsync_input,
- .pr_ctloutput = rip_ctloutput,
- .pr_usrreqs = &rip_usrreqs
-},
-#endif /* DEV_PFSYNC */
/* Spacer n-times for loadable protocols. */
IPPROTOSPACER,
IPPROTOSPACER,
@@ -397,6 +380,3 @@ SYSCTL_NODE(_net_inet, IPPROTO_IPCOMP, ipcomp, CTLFLAG_RW, 0, "IPCOMP");
SYSCTL_NODE(_net_inet, IPPROTO_IPIP, ipip, CTLFLAG_RW, 0, "IPIP");
#endif /* IPSEC */
SYSCTL_NODE(_net_inet, IPPROTO_RAW, raw, CTLFLAG_RW, 0, "RAW");
-#ifdef DEV_PFSYNC
-SYSCTL_NODE(_net_inet, IPPROTO_PFSYNC, pfsync, CTLFLAG_RW, 0, "PFSYNC");
-#endif
diff --git a/sys/netinet/in_var.h b/sys/netinet/in_var.h
index 3a5e328..26803d9 100644
--- a/sys/netinet/in_var.h
+++ b/sys/netinet/in_var.h
@@ -77,6 +77,7 @@ struct in_aliasreq {
struct sockaddr_in ifra_broadaddr;
#define ifra_dstaddr ifra_broadaddr
struct sockaddr_in ifra_mask;
+ int ifra_vhid;
};
/*
* Given a pointer to an in_ifaddr (ifaddr),
@@ -84,6 +85,7 @@ struct in_aliasreq {
*/
#define IA_SIN(ia) (&(((struct in_ifaddr *)(ia))->ia_addr))
#define IA_DSTSIN(ia) (&(((struct in_ifaddr *)(ia))->ia_dstaddr))
+#define IA_MASKSIN(ia) (&(((struct in_ifaddr *)(ia))->ia_sockmask))
#define IN_LNAOF(in, ifa) \
((ntohl((in).s_addr) & ~((struct in_ifaddr *)(ifa)->ia_subnetmask))
@@ -393,9 +395,9 @@ inm_lookup(struct ifnet *ifp, const struct in_addr ina)
struct in_multi *inm;
IN_MULTI_LOCK_ASSERT();
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
inm = inm_lookup_locked(ifp, ina);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
return (inm);
}
@@ -442,6 +444,8 @@ int in_leavegroup_locked(struct in_multi *,
int in_control(struct socket *, u_long, caddr_t, struct ifnet *,
struct thread *);
void in_rtqdrain(void);
+int in_addprefix(struct in_ifaddr *, int);
+int in_scrubprefix(struct in_ifaddr *, u_int);
void ip_input(struct mbuf *);
int in_ifadown(struct ifaddr *ifa, int);
void in_ifscrub(struct ifnet *, struct in_ifaddr *, u_int);
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c
index 73024f7..e23f369 100644
--- a/sys/netinet/ip_carp.c
+++ b/sys/netinet/ip_carp.c
@@ -1,6 +1,8 @@
-/*
- * Copyright (c) 2002 Michael Shalayeff. All rights reserved.
- * Copyright (c) 2003 Ryan McBride. All rights reserved.
+/*-
+ * Copyright (c) 2002 Michael Shalayeff.
+ * Copyright (c) 2003 Ryan McBride.
+ * Copyright (c) 2011 Gleb Smirnoff <glebius@FreeBSD.org>
+ * All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -31,38 +33,31 @@ __FBSDID("$FreeBSD$");
#include "opt_inet.h"
#include "opt_inet6.h"
-#include <sys/types.h>
#include <sys/param.h>
#include <sys/systm.h>
-#include <sys/conf.h>
+#include <sys/bus.h>
+#include <sys/jail.h>
#include <sys/kernel.h>
#include <sys/limits.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
#include <sys/module.h>
-#include <sys/time.h>
#include <sys/priv.h>
#include <sys/proc.h>
#include <sys/protosw.h>
+#include <sys/socket.h>
+#include <sys/sockio.h>
#include <sys/sysctl.h>
#include <sys/syslog.h>
-#include <sys/signalvar.h>
-#include <sys/filio.h>
-#include <sys/sockio.h>
-
-#include <sys/socket.h>
-#include <sys/vnode.h>
-
-#include <machine/stdarg.h>
+#include <sys/taskqueue.h>
-#include <net/bpf.h>
#include <net/ethernet.h>
#include <net/fddi.h>
-#include <net/iso88025.h>
#include <net/if.h>
-#include <net/if_clone.h>
#include <net/if_dl.h>
+#include <net/if_llatbl.h>
#include <net/if_types.h>
+#include <net/iso88025.h>
#include <net/route.h>
#include <net/vnet.h>
@@ -71,12 +66,9 @@ __FBSDID("$FreeBSD$");
#include <netinet/in_var.h>
#include <netinet/ip_carp.h>
#include <netinet/ip.h>
-
#include <machine/in_cksum.h>
#endif
-
#ifdef INET
-#include <netinet/in_systm.h>
#include <netinet/ip_var.h>
#include <netinet/if_ether.h>
#endif
@@ -85,171 +77,208 @@ __FBSDID("$FreeBSD$");
#include <netinet/icmp6.h>
#include <netinet/ip6.h>
#include <netinet6/ip6protosw.h>
+#include <netinet6/in6_var.h>
#include <netinet6/ip6_var.h>
#include <netinet6/scope6_var.h>
-#include <netinet6/in6_var.h>
#include <netinet6/nd6.h>
#endif
#include <crypto/sha1.h>
-#define CARP_IFNAME "carp"
-static MALLOC_DEFINE(M_CARP, "CARP", "CARP interfaces");
-SYSCTL_DECL(_net_inet_carp);
+static MALLOC_DEFINE(M_CARP, "CARP", "CARP addresses");
struct carp_softc {
- struct ifnet *sc_ifp; /* Interface clue */
- struct ifnet *sc_carpdev; /* Pointer to parent interface */
- struct in_ifaddr *sc_ia; /* primary iface address */
+ struct ifnet *sc_carpdev; /* Pointer to parent ifnet. */
+ struct ifaddr **sc_ifas; /* Our ifaddrs. */
+ struct sockaddr_dl sc_addr; /* Our link level address. */
+ struct callout sc_ad_tmo; /* Advertising timeout. */
#ifdef INET
- struct ip_moptions sc_imo;
+ struct callout sc_md_tmo; /* Master down timeout. */
#endif
#ifdef INET6
- struct in6_ifaddr *sc_ia6; /* primary iface address v6 */
- struct ip6_moptions sc_im6o;
-#endif /* INET6 */
- TAILQ_ENTRY(carp_softc) sc_list;
-
- enum { INIT = 0, BACKUP, MASTER } sc_state;
+ struct callout sc_md6_tmo; /* XXX: Master down timeout. */
+#endif
+ struct mtx sc_mtx;
- int sc_flags_backup;
- int sc_suppress;
+ int sc_vhid;
+ int sc_advskew;
+ int sc_advbase;
- int sc_sendad_errors;
+ int sc_naddrs;
+ int sc_naddrs6;
+ int sc_ifasiz;
+ enum { INIT = 0, BACKUP, MASTER } sc_state;
+ int sc_suppress;
+ int sc_sendad_errors;
#define CARP_SENDAD_MAX_ERRORS 3
- int sc_sendad_success;
+ int sc_sendad_success;
#define CARP_SENDAD_MIN_SUCCESS 3
- int sc_vhid;
- int sc_advskew;
- int sc_naddrs;
- int sc_naddrs6;
- int sc_advbase; /* seconds */
- int sc_init_counter;
- u_int64_t sc_counter;
+ int sc_init_counter;
+ uint64_t sc_counter;
/* authentication */
-#define CARP_HMAC_PAD 64
+#define CARP_HMAC_PAD 64
unsigned char sc_key[CARP_KEY_LEN];
unsigned char sc_pad[CARP_HMAC_PAD];
SHA1_CTX sc_sha1;
- struct callout sc_ad_tmo; /* advertisement timeout */
- struct callout sc_md_tmo; /* master down timeout */
- struct callout sc_md6_tmo; /* master down timeout */
-
- LIST_ENTRY(carp_softc) sc_next; /* Interface clue */
+ TAILQ_ENTRY(carp_softc) sc_list; /* On the carp_if list. */
+ LIST_ENTRY(carp_softc) sc_next; /* On the global list. */
};
-#define SC2IFP(sc) ((sc)->sc_ifp)
-
-int carp_suppress_preempt = 0;
-int carp_opts[CARPCTL_MAXID] = { 0, 1, 0, 1, 0, 0 }; /* XXX for now */
-SYSCTL_NODE(_net_inet, IPPROTO_CARP, carp, CTLFLAG_RW, 0, "CARP");
-SYSCTL_INT(_net_inet_carp, CARPCTL_ALLOW, allow, CTLFLAG_RW,
- &carp_opts[CARPCTL_ALLOW], 0, "Accept incoming CARP packets");
-SYSCTL_INT(_net_inet_carp, CARPCTL_PREEMPT, preempt, CTLFLAG_RW,
- &carp_opts[CARPCTL_PREEMPT], 0, "high-priority backup preemption mode");
-SYSCTL_INT(_net_inet_carp, CARPCTL_LOG, log, CTLFLAG_RW,
- &carp_opts[CARPCTL_LOG], 0, "log bad carp packets");
-SYSCTL_INT(_net_inet_carp, CARPCTL_ARPBALANCE, arpbalance, CTLFLAG_RW,
- &carp_opts[CARPCTL_ARPBALANCE], 0, "balance arp responses");
-SYSCTL_INT(_net_inet_carp, OID_AUTO, suppress_preempt, CTLFLAG_RD,
- &carp_suppress_preempt, 0, "Preemption is suppressed");
-
-struct carpstats carpstats;
-SYSCTL_STRUCT(_net_inet_carp, CARPCTL_STATS, stats, CTLFLAG_RW,
- &carpstats, carpstats,
- "CARP statistics (struct carpstats, netinet/ip_carp.h)");
struct carp_if {
- TAILQ_HEAD(, carp_softc) vhif_vrs;
- int vhif_nvrs;
-
- struct ifnet *vhif_ifp;
- struct mtx vhif_mtx;
+#ifdef INET
+ int cif_naddrs;
+#endif
+#ifdef INET6
+ int cif_naddrs6;
+#endif
+ TAILQ_HEAD(, carp_softc) cif_vrs;
+#ifdef INET
+ struct ip_moptions cif_imo;
+#endif
+#ifdef INET6
+ struct ip6_moptions cif_im6o;
+#endif
+ struct ifnet *cif_ifp;
+ struct mtx cif_mtx;
};
#define CARP_INET 0
#define CARP_INET6 1
static int proto_reg[] = {-1, -1};
-/* Get carp_if from softc. Valid after carp_set_addr{,6}. */
-#define SC2CIF(sc) ((struct carp_if *)(sc)->sc_carpdev->if_carp)
+/*
+ * Brief design of carp(4).
+ *
+ * Any carp-capable ifnet may have a list of carp softcs hanging off
+ * its ifp->if_carp pointer. Each softc represents one unique virtual
+ * host id, or vhid. The softc has a back pointer to the ifnet. All
+ * softcs are joined in a global list, which has quite limited use.
+ *
+ * Any interface address that takes part in CARP negotiation has a
+ * pointer to the softc of its vhid, ifa->ifa_carp. That could be either
+ * AF_INET or AF_INET6 address.
+ *
+ * Although, one can get the softc's backpointer to ifnet and traverse
+ * through its ifp->if_addrhead queue to find all interface addresses
+ * involved in CARP, we keep a growable array of ifaddr pointers. This
+ * allows us to avoid grabbing the IF_ADDR_LOCK() in many traversals that
+ * do calls into the network stack, thus avoiding LORs.
+ *
+ * Locking:
+ *
+ * Each softc has a lock sc_mtx. It is used to synchronise carp_input_c(),
+ * callout-driven events and ioctl()s.
+ *
+ * To traverse the list of softcs on an ifnet we use CIF_LOCK(), to
+ * traverse the global list we use the mutex carp_mtx.
+ *
+ * Known issues with locking:
+ *
+ * - There is no protection for races between two ioctl() requests,
+ * neither SIOCSVH, nor SIOCAIFADDR & SIOCAIFADDR_IN6. I think that all
+ * interface ioctl()s should be serialized right in net/if.c.
+ * - Sending ad, we put the pointer to the softc in an mtag, and no reference
+ * counting is done on the softc.
+ * - On module unload we may race (?) with packet processing thread
+ * dereferencing our function pointers.
+ */
-/* lock per carp_if queue */
-#define CARP_LOCK_INIT(cif) mtx_init(&(cif)->vhif_mtx, "carp_if", \
- NULL, MTX_DEF)
-#define CARP_LOCK_DESTROY(cif) mtx_destroy(&(cif)->vhif_mtx)
-#define CARP_LOCK_ASSERT(cif) mtx_assert(&(cif)->vhif_mtx, MA_OWNED)
-#define CARP_LOCK(cif) mtx_lock(&(cif)->vhif_mtx)
-#define CARP_UNLOCK(cif) mtx_unlock(&(cif)->vhif_mtx)
+static int carp_allow = 1; /* Accept incoming CARP packets. */
+static int carp_preempt = 0; /* Preempt slower nodes. */
+static int carp_log = 1; /* Log level. */
+static int carp_demotion = 0; /* Global advskew demotion. */
+static int carp_senderr_adj = CARP_MAXSKEW; /* Send error demotion factor */
+static int carp_ifdown_adj = CARP_MAXSKEW; /* Iface down demotion factor */
-#define CARP_SCLOCK(sc) mtx_lock(&SC2CIF(sc)->vhif_mtx)
-#define CARP_SCUNLOCK(sc) mtx_unlock(&SC2CIF(sc)->vhif_mtx)
-#define CARP_SCLOCK_ASSERT(sc) mtx_assert(&SC2CIF(sc)->vhif_mtx, MA_OWNED)
+SYSCTL_NODE(_net_inet, IPPROTO_CARP, carp, CTLFLAG_RW, 0, "CARP");
+SYSCTL_INT(_net_inet_carp, OID_AUTO, allow, CTLFLAG_RW, &carp_allow, 0,
+ "Accept incoming CARP packets");
+SYSCTL_INT(_net_inet_carp, OID_AUTO, preempt, CTLFLAG_RW, &carp_preempt, 0,
+ "High-priority backup preemption mode");
+SYSCTL_INT(_net_inet_carp, OID_AUTO, log, CTLFLAG_RW, &carp_log, 0,
+ "CARP log level");
+SYSCTL_INT(_net_inet_carp, OID_AUTO, demotion, CTLFLAG_RW, &carp_demotion, 0,
+ "Demotion factor (skew of advskew)");
+SYSCTL_INT(_net_inet_carp, OID_AUTO, senderr_demotion_factor, CTLFLAG_RW,
+ &carp_senderr_adj, 0, "Send error demotion factor adjustment");
+SYSCTL_INT(_net_inet_carp, OID_AUTO, ifdown_demotion_factor, CTLFLAG_RW,
+ &carp_ifdown_adj, 0, "Interface down demotion factor adjustment");
+
+static struct carpstats carpstats;
+SYSCTL_STRUCT(_net_inet_carp, OID_AUTO, stats, CTLFLAG_RW, &carpstats,
+ carpstats, "CARP statistics (struct carpstats, netinet/ip_carp.h)");
+
+#define CARP_LOCK_INIT(sc) mtx_init(&(sc)->sc_mtx, "carp_softc", \
+ NULL, MTX_DEF)
+#define CARP_LOCK_DESTROY(sc) mtx_destroy(&(sc)->sc_mtx)
+#define CARP_LOCK_ASSERT(sc) mtx_assert(&(sc)->sc_mtx, MA_OWNED)
+#define CARP_LOCK(sc) mtx_lock(&(sc)->sc_mtx)
+#define CARP_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx)
+#define CIF_LOCK_INIT(cif) mtx_init(&(cif)->cif_mtx, "carp_if", \
+ NULL, MTX_DEF)
+#define CIF_LOCK_DESTROY(cif) mtx_destroy(&(cif)->cif_mtx)
+#define CIF_LOCK_ASSERT(cif) mtx_assert(&(cif)->cif_mtx, MA_OWNED)
+#define CIF_LOCK(cif) mtx_lock(&(cif)->cif_mtx)
+#define CIF_UNLOCK(cif) mtx_unlock(&(cif)->cif_mtx)
#define CARP_LOG(...) do { \
- if (carp_opts[CARPCTL_LOG] > 0) \
- log(LOG_INFO, __VA_ARGS__); \
+ if (carp_log > 0) \
+ log(LOG_INFO, "carp: " __VA_ARGS__); \
} while (0)
#define CARP_DEBUG(...) do { \
- if (carp_opts[CARPCTL_LOG] > 1) \
+ if (carp_log > 1) \
log(LOG_DEBUG, __VA_ARGS__); \
} while (0)
-static void carp_hmac_prepare(struct carp_softc *);
-static void carp_hmac_generate(struct carp_softc *, u_int32_t *,
- unsigned char *);
-static int carp_hmac_verify(struct carp_softc *, u_int32_t *,
- unsigned char *);
-static void carp_setroute(struct carp_softc *, int);
+#define IFNET_FOREACH_IFA(ifp, ifa) \
+ IF_ADDR_LOCK_ASSERT(ifp); \
+ TAILQ_FOREACH((ifa), &(ifp)->if_addrhead, ifa_link) \
+ if ((ifa)->ifa_carp != NULL)
+
+#define CARP_FOREACH_IFA(sc, ifa) \
+ CARP_LOCK_ASSERT(sc); \
+ for (int _i = 0; \
+ _i < (sc)->sc_naddrs + (sc)->sc_naddrs6 && \
+ ((ifa) = sc->sc_ifas[_i]) != NULL; \
+ ++_i)
+
+#define IFNET_FOREACH_CARP(ifp, sc) \
+ CIF_LOCK_ASSERT(ifp->if_carp); \
+ TAILQ_FOREACH((sc), &(ifp)->if_carp->cif_vrs, sc_list)
+
+#define DEMOTE_ADVSKEW(sc) \
+ (((sc)->sc_advskew + carp_demotion > CARP_MAXSKEW) ? \
+ CARP_MAXSKEW : ((sc)->sc_advskew + carp_demotion))
+
static void carp_input_c(struct mbuf *, struct carp_header *, sa_family_t);
-static int carp_clone_create(struct if_clone *, int, caddr_t);
-static void carp_clone_destroy(struct ifnet *);
-static void carpdetach(struct carp_softc *, int);
-static int carp_prepare_ad(struct mbuf *, struct carp_softc *,
- struct carp_header *);
-static void carp_send_ad_all(void);
-static void carp_send_ad(void *);
-static void carp_send_ad_locked(struct carp_softc *);
-#ifdef INET
-static void carp_send_arp(struct carp_softc *);
-#endif
+static struct carp_softc
+ *carp_alloc(struct ifnet *);
+static void carp_destroy(struct carp_softc *);
+static struct carp_if
+ *carp_alloc_if(struct ifnet *);
+static void carp_free_if(struct carp_if *);
+static void carp_set_state(struct carp_softc *, int);
+static void carp_sc_state(struct carp_softc *);
+static void carp_setrun(struct carp_softc *, sa_family_t);
static void carp_master_down(void *);
static void carp_master_down_locked(struct carp_softc *);
-static int carp_ioctl(struct ifnet *, u_long, caddr_t);
-static int carp_looutput(struct ifnet *, struct mbuf *, struct sockaddr *,
- struct route *);
-static void carp_start(struct ifnet *);
-static void carp_setrun(struct carp_softc *, sa_family_t);
-static void carp_set_state(struct carp_softc *, int);
-#ifdef INET
-static int carp_addrcount(struct carp_if *, struct in_ifaddr *, int);
-#endif
-enum { CARP_COUNT_MASTER, CARP_COUNT_RUNNING };
-
-#ifdef INET
-static void carp_multicast_cleanup(struct carp_softc *, int dofree);
-static int carp_set_addr(struct carp_softc *, struct sockaddr_in *);
-static int carp_del_addr(struct carp_softc *, struct sockaddr_in *);
-#endif
-static void carp_carpdev_state_locked(struct carp_if *);
-static void carp_sc_state_locked(struct carp_softc *);
-#ifdef INET6
-static void carp_send_na(struct carp_softc *);
-static int carp_set_addr6(struct carp_softc *, struct sockaddr_in6 *);
-static int carp_del_addr6(struct carp_softc *, struct sockaddr_in6 *);
-static void carp_multicast6_cleanup(struct carp_softc *, int dofree);
-#endif
+static void carp_send_ad(void *);
+static void carp_send_ad_locked(struct carp_softc *);
+static void carp_addroute(struct carp_softc *);
+static void carp_delroute(struct carp_softc *);
+static void carp_send_ad_all(void *, int);
+static void carp_demote_adj(int, char *);
-static LIST_HEAD(, carp_softc) carpif_list;
+static LIST_HEAD(, carp_softc) carp_list;
static struct mtx carp_mtx;
-IFC_SIMPLE_DECLARE(carp, 0);
+static struct task carp_sendall_task =
+ TASK_INITIALIZER(0, carp_send_ad_all, NULL);
-static eventhandler_tag if_detach_event_tag;
-
-static __inline u_int16_t
+static __inline uint16_t
carp_cksum(struct mbuf *m, int len)
{
return (in_cksum(m, len));
@@ -258,8 +287,8 @@ carp_cksum(struct mbuf *m, int len)
static void
carp_hmac_prepare(struct carp_softc *sc)
{
- u_int8_t version = CARP_VERSION, type = CARP_ADVERTISEMENT;
- u_int8_t vhid = sc->sc_vhid & 0xff;
+ uint8_t version = CARP_VERSION, type = CARP_ADVERTISEMENT;
+ uint8_t vhid = sc->sc_vhid & 0xff;
struct ifaddr *ifa;
int i, found;
#ifdef INET
@@ -269,18 +298,15 @@ carp_hmac_prepare(struct carp_softc *sc)
struct in6_addr last6, cur6, in6;
#endif
- if (sc->sc_carpdev)
- CARP_SCLOCK(sc);
-
- /* XXX: possible race here */
+ CARP_LOCK_ASSERT(sc);
- /* compute ipad from key */
+ /* Compute ipad from key. */
bzero(sc->sc_pad, sizeof(sc->sc_pad));
bcopy(sc->sc_key, sc->sc_pad, sizeof(sc->sc_key));
for (i = 0; i < sizeof(sc->sc_pad); i++)
sc->sc_pad[i] ^= 0x36;
- /* precompute first part of inner hash */
+ /* Precompute first part of inner hash. */
SHA1Init(&sc->sc_sha1);
SHA1Update(&sc->sc_sha1, sc->sc_pad, sizeof(sc->sc_pad));
SHA1Update(&sc->sc_sha1, (void *)&version, sizeof(version));
@@ -292,8 +318,7 @@ carp_hmac_prepare(struct carp_softc *sc)
found = 0;
last = cur;
cur.s_addr = 0xffffffff;
- IF_ADDR_LOCK(SC2IFP(sc));
- TAILQ_FOREACH(ifa, &SC2IFP(sc)->if_addrlist, ifa_list) {
+ CARP_FOREACH_IFA(sc, ifa) {
in.s_addr = ifatoia(ifa)->ia_addr.sin_addr.s_addr;
if (ifa->ifa_addr->sa_family == AF_INET &&
ntohl(in.s_addr) > ntohl(last.s_addr) &&
@@ -302,7 +327,6 @@ carp_hmac_prepare(struct carp_softc *sc)
found++;
}
}
- IF_ADDR_UNLOCK(SC2IFP(sc));
if (found)
SHA1Update(&sc->sc_sha1, (void *)&cur, sizeof(cur));
} while (found);
@@ -313,8 +337,7 @@ carp_hmac_prepare(struct carp_softc *sc)
found = 0;
last6 = cur6;
memset(&cur6, 0xff, sizeof(cur6));
- IF_ADDR_LOCK(SC2IFP(sc));
- TAILQ_FOREACH(ifa, &SC2IFP(sc)->if_addrlist, ifa_list) {
+ CARP_FOREACH_IFA(sc, ifa) {
in6 = ifatoia6(ifa)->ia_addr.sin6_addr;
if (IN6_IS_SCOPE_EMBED(&in6))
in6.s6_addr16[1] = 0;
@@ -325,7 +348,6 @@ carp_hmac_prepare(struct carp_softc *sc)
found++;
}
}
- IF_ADDR_UNLOCK(SC2IFP(sc));
if (found)
SHA1Update(&sc->sc_sha1, (void *)&cur6, sizeof(cur6));
} while (found);
@@ -334,17 +356,16 @@ carp_hmac_prepare(struct carp_softc *sc)
/* convert ipad to opad */
for (i = 0; i < sizeof(sc->sc_pad); i++)
sc->sc_pad[i] ^= 0x36 ^ 0x5c;
-
- if (sc->sc_carpdev)
- CARP_SCUNLOCK(sc);
}
static void
-carp_hmac_generate(struct carp_softc *sc, u_int32_t counter[2],
+carp_hmac_generate(struct carp_softc *sc, uint32_t counter[2],
unsigned char md[20])
{
SHA1_CTX sha1ctx;
+ CARP_LOCK_ASSERT(sc);
+
/* fetch first half of inner hash */
bcopy(&sc->sc_sha1, &sha1ctx, sizeof(sha1ctx));
@@ -359,203 +380,18 @@ carp_hmac_generate(struct carp_softc *sc, u_int32_t counter[2],
}
static int
-carp_hmac_verify(struct carp_softc *sc, u_int32_t counter[2],
+carp_hmac_verify(struct carp_softc *sc, uint32_t counter[2],
unsigned char md[20])
{
unsigned char md2[20];
- CARP_SCLOCK_ASSERT(sc);
+ CARP_LOCK_ASSERT(sc);
carp_hmac_generate(sc, counter, md2);
return (bcmp(md, md2, sizeof(md2)));
}
-static void
-carp_setroute(struct carp_softc *sc, int cmd)
-{
- struct ifaddr *ifa;
- int s;
-
- if (sc->sc_carpdev)
- CARP_SCLOCK_ASSERT(sc);
-
- s = splnet();
- TAILQ_FOREACH(ifa, &SC2IFP(sc)->if_addrlist, ifa_list) {
-#ifdef INET
- if (ifa->ifa_addr->sa_family == AF_INET &&
- sc->sc_carpdev != NULL) {
- int count = carp_addrcount(
- (struct carp_if *)sc->sc_carpdev->if_carp,
- ifatoia(ifa), CARP_COUNT_MASTER);
-
- if ((cmd == RTM_ADD && count == 1) ||
- (cmd == RTM_DELETE && count == 0))
- rtinit(ifa, cmd, RTF_UP | RTF_HOST);
- }
-#endif
- }
- splx(s);
-}
-
-static int
-carp_clone_create(struct if_clone *ifc, int unit, caddr_t params)
-{
-
- struct carp_softc *sc;
- struct ifnet *ifp;
-
- sc = malloc(sizeof(*sc), M_CARP, M_WAITOK|M_ZERO);
- ifp = SC2IFP(sc) = if_alloc(IFT_ETHER);
- if (ifp == NULL) {
- free(sc, M_CARP);
- return (ENOSPC);
- }
-
- sc->sc_flags_backup = 0;
- sc->sc_suppress = 0;
- sc->sc_advbase = CARP_DFLTINTV;
- sc->sc_vhid = -1; /* required setting */
- sc->sc_advskew = 0;
- sc->sc_init_counter = 1;
- sc->sc_naddrs = sc->sc_naddrs6 = 0; /* M_ZERO? */
-#ifdef INET
- sc->sc_imo.imo_membership = (struct in_multi **)malloc(
- (sizeof(struct in_multi *) * IP_MIN_MEMBERSHIPS), M_CARP,
- M_WAITOK);
- sc->sc_imo.imo_mfilters = NULL;
- sc->sc_imo.imo_max_memberships = IP_MIN_MEMBERSHIPS;
- sc->sc_imo.imo_multicast_vif = -1;
-#endif
-#ifdef INET6
- sc->sc_im6o.im6o_membership = (struct in6_multi **)malloc(
- (sizeof(struct in6_multi *) * IPV6_MIN_MEMBERSHIPS), M_CARP,
- M_WAITOK);
- sc->sc_im6o.im6o_mfilters = NULL;
- sc->sc_im6o.im6o_max_memberships = IPV6_MIN_MEMBERSHIPS;
- sc->sc_im6o.im6o_multicast_hlim = CARP_DFLTTL;
-#endif
-
- callout_init(&sc->sc_ad_tmo, CALLOUT_MPSAFE);
- callout_init(&sc->sc_md_tmo, CALLOUT_MPSAFE);
- callout_init(&sc->sc_md6_tmo, CALLOUT_MPSAFE);
-
- ifp->if_softc = sc;
- if_initname(ifp, CARP_IFNAME, unit);
- ifp->if_mtu = ETHERMTU;
- ifp->if_flags = IFF_LOOPBACK;
- ifp->if_ioctl = carp_ioctl;
- ifp->if_output = carp_looutput;
- ifp->if_start = carp_start;
- ifp->if_type = IFT_CARP;
- ifp->if_snd.ifq_maxlen = ifqmaxlen;
- ifp->if_hdrlen = 0;
- if_attach(ifp);
- bpfattach(SC2IFP(sc), DLT_NULL, sizeof(u_int32_t));
- mtx_lock(&carp_mtx);
- LIST_INSERT_HEAD(&carpif_list, sc, sc_next);
- mtx_unlock(&carp_mtx);
- return (0);
-}
-
-static void
-carp_clone_destroy(struct ifnet *ifp)
-{
- struct carp_softc *sc = ifp->if_softc;
-
- if (sc->sc_carpdev)
- CARP_SCLOCK(sc);
- carpdetach(sc, 1); /* Returns unlocked. */
-
- mtx_lock(&carp_mtx);
- LIST_REMOVE(sc, sc_next);
- mtx_unlock(&carp_mtx);
- bpfdetach(ifp);
- if_detach(ifp);
- if_free(ifp);
-#ifdef INET
- free(sc->sc_imo.imo_membership, M_CARP);
-#endif
-#ifdef INET6
- free(sc->sc_im6o.im6o_membership, M_CARP);
-#endif
- free(sc, M_CARP);
-}
-
-/*
- * This function can be called on CARP interface destroy path,
- * and in case of the removal of the underlying interface as
- * well. We differentiate these two cases: in case of destruction
- * of the underlying interface, we do not cleanup our multicast
- * memberships, since they are already freed. But we purge pointers
- * to multicast structures, since they are no longer valid, to
- * avoid panic in future calls to carpdetach(). Also, we do not
- * release the lock on return, because the function will be
- * called once more, for another CARP instance on the same
- * interface.
- */
-static void
-carpdetach(struct carp_softc *sc, int unlock)
-{
- struct carp_if *cif;
-
- callout_stop(&sc->sc_ad_tmo);
- callout_stop(&sc->sc_md_tmo);
- callout_stop(&sc->sc_md6_tmo);
-
- if (sc->sc_suppress)
- carp_suppress_preempt--;
- sc->sc_suppress = 0;
-
- if (sc->sc_sendad_errors >= CARP_SENDAD_MAX_ERRORS)
- carp_suppress_preempt--;
- sc->sc_sendad_errors = 0;
-
- carp_set_state(sc, INIT);
- SC2IFP(sc)->if_flags &= ~IFF_UP;
- carp_setrun(sc, 0);
-#ifdef INET
- carp_multicast_cleanup(sc, unlock);
-#endif
-#ifdef INET6
- carp_multicast6_cleanup(sc, unlock);
-#endif
-
- if (sc->sc_carpdev != NULL) {
- cif = (struct carp_if *)sc->sc_carpdev->if_carp;
- CARP_LOCK_ASSERT(cif);
- TAILQ_REMOVE(&cif->vhif_vrs, sc, sc_list);
- if (!--cif->vhif_nvrs) {
- ifpromisc(sc->sc_carpdev, 0);
- sc->sc_carpdev->if_carp = NULL;
- CARP_LOCK_DESTROY(cif);
- free(cif, M_CARP);
- } else if (unlock)
- CARP_UNLOCK(cif);
- sc->sc_carpdev = NULL;
- }
-}
-
-/* Detach an interface from the carp. */
-static void
-carp_ifdetach(void *arg __unused, struct ifnet *ifp)
-{
- struct carp_if *cif = (struct carp_if *)ifp->if_carp;
- struct carp_softc *sc, *nextsc;
-
- if (cif == NULL)
- return;
-
- /*
- * XXX: At the end of for() cycle the lock will be destroyed.
- */
- CARP_LOCK(cif);
- for (sc = TAILQ_FIRST(&cif->vhif_vrs); sc; sc = nextsc) {
- nextsc = TAILQ_NEXT(sc, sc_list);
- carpdetach(sc, 0);
- }
-}
-
/*
* process input packet.
* we have rearranged checks order compared to the rfc,
@@ -571,17 +407,7 @@ carp_input(struct mbuf *m, int hlen)
CARPSTATS_INC(carps_ipackets);
- if (!carp_opts[CARPCTL_ALLOW]) {
- m_freem(m);
- return;
- }
-
- /* check if received on a valid carp interface */
- if (m->m_pkthdr.rcvif->if_carp == NULL) {
- CARPSTATS_INC(carps_badif);
- CARP_DEBUG("carp_input: packet received on non-carp "
- "interface: %s\n",
- m->m_pkthdr.rcvif->if_xname);
+ if (!carp_allow) {
m_freem(m);
return;
}
@@ -589,7 +415,7 @@ carp_input(struct mbuf *m, int hlen)
/* verify that the IP TTL is 255. */
if (ip->ip_ttl != CARP_DFLTTL) {
CARPSTATS_INC(carps_badttl);
- CARP_DEBUG("carp_input: received ttl %d != 255 on %s\n",
+ CARP_DEBUG("%s: received ttl %d != 255 on %s\n", __func__,
ip->ip_ttl,
m->m_pkthdr.rcvif->if_xname);
m_freem(m);
@@ -600,9 +426,8 @@ carp_input(struct mbuf *m, int hlen)
if (m->m_pkthdr.len < iplen + sizeof(*ch)) {
CARPSTATS_INC(carps_badlen);
- CARP_DEBUG("carp_input: received len %zd < "
- "sizeof(struct carp_header) on %s\n",
- m->m_len - sizeof(struct ip),
+ CARP_DEBUG("%s: received len %zd < sizeof(struct carp_header) "
+ "on %s\n", __func__, m->m_len - sizeof(struct ip),
m->m_pkthdr.rcvif->if_xname);
m_freem(m);
return;
@@ -611,7 +436,7 @@ carp_input(struct mbuf *m, int hlen)
if (iplen + sizeof(*ch) < m->m_len) {
if ((m = m_pullup(m, iplen + sizeof(*ch))) == NULL) {
CARPSTATS_INC(carps_hdrops);
- CARP_DEBUG("carp_input: pullup failed\n");
+ CARP_DEBUG("%s: pullup failed\n", __func__);
return;
}
ip = mtod(m, struct ip *);
@@ -625,7 +450,7 @@ carp_input(struct mbuf *m, int hlen)
len = iplen + sizeof(*ch);
if (len > m->m_pkthdr.len) {
CARPSTATS_INC(carps_badlen);
- CARP_DEBUG("carp_input: packet too short %d on %s\n",
+ CARP_DEBUG("%s: packet too short %d on %s\n", __func__,
m->m_pkthdr.len,
m->m_pkthdr.rcvif->if_xname);
m_freem(m);
@@ -643,7 +468,7 @@ carp_input(struct mbuf *m, int hlen)
m->m_data += iplen;
if (carp_cksum(m, len - iplen)) {
CARPSTATS_INC(carps_badsum);
- CARP_DEBUG("carp_input: checksum failed on %s\n",
+ CARP_DEBUG("%s: checksum failed on %s\n", __func__,
m->m_pkthdr.rcvif->if_xname);
m_freem(m);
return;
@@ -665,7 +490,7 @@ carp6_input(struct mbuf **mp, int *offp, int proto)
CARPSTATS_INC(carps_ipackets6);
- if (!carp_opts[CARPCTL_ALLOW]) {
+ if (!carp_allow) {
m_freem(m);
return (IPPROTO_DONE);
}
@@ -673,9 +498,8 @@ carp6_input(struct mbuf **mp, int *offp, int proto)
/* check if received on a valid carp interface */
if (m->m_pkthdr.rcvif->if_carp == NULL) {
CARPSTATS_INC(carps_badif);
- CARP_DEBUG("carp6_input: packet received on non-carp "
- "interface: %s\n",
- m->m_pkthdr.rcvif->if_xname);
+ CARP_DEBUG("%s: packet received on non-carp interface: %s\n",
+ __func__, m->m_pkthdr.rcvif->if_xname);
m_freem(m);
return (IPPROTO_DONE);
}
@@ -683,9 +507,8 @@ carp6_input(struct mbuf **mp, int *offp, int proto)
/* verify that the IP TTL is 255 */
if (ip6->ip6_hlim != CARP_DFLTTL) {
CARPSTATS_INC(carps_badttl);
- CARP_DEBUG("carp6_input: received ttl %d != 255 on %s\n",
- ip6->ip6_hlim,
- m->m_pkthdr.rcvif->if_xname);
+ CARP_DEBUG("%s: received ttl %d != 255 on %s\n", __func__,
+ ip6->ip6_hlim, m->m_pkthdr.rcvif->if_xname);
m_freem(m);
return (IPPROTO_DONE);
}
@@ -695,7 +518,7 @@ carp6_input(struct mbuf **mp, int *offp, int proto)
IP6_EXTHDR_GET(ch, struct carp_header *, m, *offp, sizeof(*ch));
if (ch == NULL) {
CARPSTATS_INC(carps_badlen);
- CARP_DEBUG("carp6_input: packet size %u too small\n", len);
+ CARP_DEBUG("%s: packet size %u too small\n", __func__, len);
return (IPPROTO_DONE);
}
@@ -704,7 +527,7 @@ carp6_input(struct mbuf **mp, int *offp, int proto)
m->m_data += *offp;
if (carp_cksum(m, sizeof(*ch))) {
CARPSTATS_INC(carps_badsum);
- CARP_DEBUG("carp6_input: checksum failed, on %s\n",
+ CARP_DEBUG("%s: checksum failed, on %s\n", __func__,
m->m_pkthdr.rcvif->if_xname);
m_freem(m);
return (IPPROTO_DONE);
@@ -720,62 +543,46 @@ static void
carp_input_c(struct mbuf *m, struct carp_header *ch, sa_family_t af)
{
struct ifnet *ifp = m->m_pkthdr.rcvif;
+ struct ifaddr *ifa;
struct carp_softc *sc;
- u_int64_t tmp_counter;
+ uint64_t tmp_counter;
struct timeval sc_tv, ch_tv;
/* verify that the VHID is valid on the receiving interface */
- CARP_LOCK(ifp->if_carp);
- TAILQ_FOREACH(sc, &((struct carp_if *)ifp->if_carp)->vhif_vrs, sc_list)
- if (sc->sc_vhid == ch->carp_vhid)
+ IF_ADDR_RLOCK(ifp);
+ IFNET_FOREACH_IFA(ifp, ifa)
+ if (ifa->ifa_addr->sa_family == af &&
+ ifa->ifa_carp->sc_vhid == ch->carp_vhid) {
+ ifa_ref(ifa);
break;
+ }
+ IF_ADDR_RUNLOCK(ifp);
- if (!sc || !((SC2IFP(sc)->if_flags & IFF_UP) &&
- (SC2IFP(sc)->if_drv_flags & IFF_DRV_RUNNING))) {
+ if (ifa == NULL) {
CARPSTATS_INC(carps_badvhid);
- CARP_UNLOCK(ifp->if_carp);
m_freem(m);
return;
}
- getmicrotime(&SC2IFP(sc)->if_lastchange);
- SC2IFP(sc)->if_ipackets++;
- SC2IFP(sc)->if_ibytes += m->m_pkthdr.len;
-
- if (bpf_peers_present(SC2IFP(sc)->if_bpf)) {
- uint32_t af1 = af;
-#ifdef INET
- struct ip *ip = mtod(m, struct ip *);
-
- /* BPF wants net byte order */
- if (af == AF_INET) {
- ip->ip_len = htons(ip->ip_len + (ip->ip_hl << 2));
- ip->ip_off = htons(ip->ip_off);
- }
-#endif
- bpf_mtap2(SC2IFP(sc)->if_bpf, &af1, sizeof(af1), m);
- }
-
/* verify the CARP version. */
if (ch->carp_version != CARP_VERSION) {
CARPSTATS_INC(carps_badver);
- SC2IFP(sc)->if_ierrors++;
- CARP_UNLOCK(ifp->if_carp);
- CARP_DEBUG("%s; invalid version %d\n",
- SC2IFP(sc)->if_xname,
+ CARP_DEBUG("%s: invalid version %d\n", ifp->if_xname,
ch->carp_version);
+ ifa_free(ifa);
m_freem(m);
return;
}
- /* verify the hash */
+ sc = ifa->ifa_carp;
+ CARP_LOCK(sc);
+ ifa_free(ifa);
+
if (carp_hmac_verify(sc, ch->carp_counter, ch->carp_md)) {
CARPSTATS_INC(carps_badauth);
- SC2IFP(sc)->if_ierrors++;
- CARP_UNLOCK(ifp->if_carp);
- CARP_DEBUG("%s: incorrect hash\n", SC2IFP(sc)->if_xname);
- m_freem(m);
- return;
+ CARP_DEBUG("%s: incorrect hash for VHID %u@%s\n", __func__,
+ sc->sc_vhid, ifp->if_xname);
+ goto out;
}
tmp_counter = ntohl(ch->carp_counter[0]);
@@ -788,10 +595,7 @@ carp_input_c(struct mbuf *m, struct carp_header *ch, sa_family_t af)
sc->sc_counter = tmp_counter;
sc_tv.tv_sec = sc->sc_advbase;
- if (carp_suppress_preempt && sc->sc_advskew < 240)
- sc_tv.tv_usec = 240 * 1000000 / 256;
- else
- sc_tv.tv_usec = sc->sc_advskew * 1000000 / 256;
+ sc_tv.tv_usec = DEMOTE_ADVSKEW(sc) * 1000000 / 256;
ch_tv.tv_sec = ch->carp_advbase;
ch_tv.tv_usec = ch->carp_advskew * 1000000 / 256;
@@ -806,12 +610,13 @@ carp_input_c(struct mbuf *m, struct carp_header *ch, sa_family_t af)
if (timevalcmp(&sc_tv, &ch_tv, >) ||
timevalcmp(&sc_tv, &ch_tv, ==)) {
callout_stop(&sc->sc_ad_tmo);
- CARP_LOG("%s: MASTER -> BACKUP "
- "(more frequent advertisement received)\n",
- SC2IFP(sc)->if_xname);
+ CARP_LOG("VHID %u@%s: MASTER -> BACKUP "
+ "(more frequent advertisement received)\n",
+ sc->sc_vhid,
+ sc->sc_carpdev->if_xname);
carp_set_state(sc, BACKUP);
carp_setrun(sc, 0);
- carp_setroute(sc, RTM_DELETE);
+ carp_delroute(sc);
}
break;
case BACKUP:
@@ -819,11 +624,11 @@ carp_input_c(struct mbuf *m, struct carp_header *ch, sa_family_t af)
* If we're pre-empting masters who advertise slower than us,
* and this one claims to be slower, treat him as down.
*/
- if (carp_opts[CARPCTL_PREEMPT] &&
- timevalcmp(&sc_tv, &ch_tv, <)) {
- CARP_LOG("%s: BACKUP -> MASTER "
+ if (carp_preempt && timevalcmp(&sc_tv, &ch_tv, <)) {
+ CARP_LOG("VHID %u@%s: BACKUP -> MASTER "
"(preempting a slower master)\n",
- SC2IFP(sc)->if_xname);
+ sc->sc_vhid,
+ sc->sc_carpdev->if_xname);
carp_master_down_locked(sc);
break;
}
@@ -835,9 +640,10 @@ carp_input_c(struct mbuf *m, struct carp_header *ch, sa_family_t af)
*/
sc_tv.tv_sec = sc->sc_advbase * 3;
if (timevalcmp(&sc_tv, &ch_tv, <)) {
- CARP_LOG("%s: BACKUP -> MASTER "
+ CARP_LOG("VHID %u@%s: BACKUP -> MASTER "
"(master timed out)\n",
- SC2IFP(sc)->if_xname);
+ sc->sc_vhid,
+ sc->sc_carpdev->if_xname);
carp_master_down_locked(sc);
break;
}
@@ -850,17 +656,15 @@ carp_input_c(struct mbuf *m, struct carp_header *ch, sa_family_t af)
break;
}
- CARP_UNLOCK(ifp->if_carp);
-
+out:
+ CARP_UNLOCK(sc);
m_freem(m);
- return;
}
static int
carp_prepare_ad(struct mbuf *m, struct carp_softc *sc, struct carp_header *ch)
{
struct m_tag *mtag;
- struct ifnet *ifp = SC2IFP(sc);
if (sc->sc_init_counter) {
/* this could also be seconds since unix epoch */
@@ -876,34 +680,34 @@ carp_prepare_ad(struct mbuf *m, struct carp_softc *sc, struct carp_header *ch)
carp_hmac_generate(sc, ch->carp_counter, ch->carp_md);
/* Tag packet for carp_output */
- mtag = m_tag_get(PACKET_TAG_CARP, sizeof(struct ifnet *), M_NOWAIT);
- if (mtag == NULL) {
+ if ((mtag = m_tag_get(PACKET_TAG_CARP, sizeof(struct carp_softc *),
+ M_NOWAIT)) == NULL) {
m_freem(m);
- SC2IFP(sc)->if_oerrors++;
+ CARPSTATS_INC(carps_onomem);
return (ENOMEM);
}
- bcopy(&ifp, (caddr_t)(mtag + 1), sizeof(struct ifnet *));
+ bcopy(&sc, (caddr_t)(mtag + 1), sizeof(struct carp_softc *));
m_tag_prepend(m, mtag);
return (0);
}
+/*
+ * To avoid LORs and possible recursions this function shouldn't
+ * be called directly, but scheduled via taskqueue.
+ */
static void
-carp_send_ad_all(void)
+carp_send_ad_all(void *ctx __unused, int pending __unused)
{
struct carp_softc *sc;
mtx_lock(&carp_mtx);
- LIST_FOREACH(sc, &carpif_list, sc_next) {
- if (sc->sc_carpdev == NULL)
- continue;
- CARP_SCLOCK(sc);
- if ((SC2IFP(sc)->if_flags & IFF_UP) &&
- (SC2IFP(sc)->if_drv_flags & IFF_DRV_RUNNING) &&
- sc->sc_state == MASTER)
+ LIST_FOREACH(sc, &carp_list, sc_next)
+ if (sc->sc_state == MASTER) {
+ CARP_LOCK(sc);
carp_send_ad_locked(sc);
- CARP_SCUNLOCK(sc);
- }
+ CARP_UNLOCK(sc);
+ }
mtx_unlock(&carp_mtx);
}
@@ -912,9 +716,9 @@ carp_send_ad(void *v)
{
struct carp_softc *sc = v;
- CARP_SCLOCK(sc);
+ CARP_LOCK_ASSERT(sc);
carp_send_ad_locked(sc);
- CARP_SCUNLOCK(sc);
+ CARP_UNLOCK(sc);
}
static void
@@ -922,48 +726,39 @@ carp_send_ad_locked(struct carp_softc *sc)
{
struct carp_header ch;
struct timeval tv;
+ struct sockaddr sa;
+ struct ifaddr *ifa;
struct carp_header *ch_ptr;
struct mbuf *m;
- int len, advbase, advskew;
+ int len, advskew;
- CARP_SCLOCK_ASSERT(sc);
+ CARP_LOCK_ASSERT(sc);
- /* bow out if we've lost our UPness or RUNNINGuiness */
- if (!((SC2IFP(sc)->if_flags & IFF_UP) &&
- (SC2IFP(sc)->if_drv_flags & IFF_DRV_RUNNING))) {
- advbase = 255;
- advskew = 255;
- } else {
- advbase = sc->sc_advbase;
- if (!carp_suppress_preempt || sc->sc_advskew > 240)
- advskew = sc->sc_advskew;
- else
- advskew = 240;
- tv.tv_sec = advbase;
- tv.tv_usec = advskew * 1000000 / 256;
- }
+ advskew = DEMOTE_ADVSKEW(sc);
+ tv.tv_sec = sc->sc_advbase;
+ tv.tv_usec = advskew * 1000000 / 256;
ch.carp_version = CARP_VERSION;
ch.carp_type = CARP_ADVERTISEMENT;
ch.carp_vhid = sc->sc_vhid;
- ch.carp_advbase = advbase;
+ ch.carp_advbase = sc->sc_advbase;
ch.carp_advskew = advskew;
ch.carp_authlen = 7; /* XXX DEFINE */
ch.carp_pad1 = 0; /* must be zero */
ch.carp_cksum = 0;
+ /* XXXGL: OpenBSD picks first ifaddr with needed family. */
+
#ifdef INET
- if (sc->sc_ia) {
+ if (sc->sc_naddrs) {
struct ip *ip;
- MGETHDR(m, M_DONTWAIT, MT_HEADER);
+ MGETHDR(m, M_NOWAIT, MT_HEADER);
if (m == NULL) {
- SC2IFP(sc)->if_oerrors++;
CARPSTATS_INC(carps_onomem);
/* XXX maybe less ? */
- if (advbase != 255 || advskew != 255)
- callout_reset(&sc->sc_ad_tmo, tvtohz(&tv),
- carp_send_ad, sc);
+ callout_reset(&sc->sc_ad_tmo, tvtohz(&tv),
+ carp_send_ad, sc);
return;
}
len = sizeof(*ip) + sizeof(ch);
@@ -982,7 +777,16 @@ carp_send_ad_locked(struct carp_softc *sc)
ip->ip_ttl = CARP_DFLTTL;
ip->ip_p = IPPROTO_CARP;
ip->ip_sum = 0;
- ip->ip_src.s_addr = sc->sc_ia->ia_addr.sin_addr.s_addr;
+
+ bzero(&sa, sizeof(sa));
+ sa.sa_family = AF_INET;
+ ifa = ifaof_ifpforaddr(&sa, sc->sc_carpdev);
+ if (ifa != NULL) {
+ ip->ip_src.s_addr =
+ ifatoia(ifa)->ia_addr.sin_addr.s_addr;
+ ifa_free(ifa);
+ } else
+ ip->ip_src.s_addr = 0;
ip->ip_dst.s_addr = htonl(INADDR_CARP_GROUP);
ch_ptr = (struct carp_header *)(&ip[1]);
@@ -994,29 +798,21 @@ carp_send_ad_locked(struct carp_softc *sc)
ch_ptr->carp_cksum = carp_cksum(m, len - sizeof(*ip));
m->m_data -= sizeof(*ip);
- getmicrotime(&SC2IFP(sc)->if_lastchange);
- SC2IFP(sc)->if_opackets++;
- SC2IFP(sc)->if_obytes += len;
CARPSTATS_INC(carps_opackets);
- if (ip_output(m, NULL, NULL, IP_RAWOUTPUT, &sc->sc_imo, NULL)) {
- SC2IFP(sc)->if_oerrors++;
+ if (ip_output(m, NULL, NULL, IP_RAWOUTPUT,
+ &sc->sc_carpdev->if_carp->cif_imo, NULL)) {
if (sc->sc_sendad_errors < INT_MAX)
sc->sc_sendad_errors++;
- if (sc->sc_sendad_errors == CARP_SENDAD_MAX_ERRORS) {
- carp_suppress_preempt++;
- if (carp_suppress_preempt == 1) {
- CARP_SCUNLOCK(sc);
- carp_send_ad_all();
- CARP_SCLOCK(sc);
- }
- }
+ if (sc->sc_sendad_errors == CARP_SENDAD_MAX_ERRORS)
+ carp_demote_adj(carp_senderr_adj, "send error");
sc->sc_sendad_success = 0;
} else {
if (sc->sc_sendad_errors >= CARP_SENDAD_MAX_ERRORS) {
if (++sc->sc_sendad_success >=
CARP_SENDAD_MIN_SUCCESS) {
- carp_suppress_preempt--;
+ carp_demote_adj(-carp_senderr_adj,
+ "send ok");
sc->sc_sendad_errors = 0;
}
} else
@@ -1025,17 +821,15 @@ carp_send_ad_locked(struct carp_softc *sc)
}
#endif /* INET */
#ifdef INET6
- if (sc->sc_ia6) {
+ if (sc->sc_naddrs6) {
struct ip6_hdr *ip6;
- MGETHDR(m, M_DONTWAIT, MT_HEADER);
+ MGETHDR(m, M_NOWAIT, MT_HEADER);
if (m == NULL) {
- SC2IFP(sc)->if_oerrors++;
CARPSTATS_INC(carps_onomem);
/* XXX maybe less ? */
- if (advbase != 255 || advskew != 255)
- callout_reset(&sc->sc_ad_tmo, tvtohz(&tv),
- carp_send_ad, sc);
+ callout_reset(&sc->sc_ad_tmo, tvtohz(&tv),
+ carp_send_ad, sc);
return;
}
len = sizeof(*ip6) + sizeof(ch);
@@ -1049,14 +843,23 @@ carp_send_ad_locked(struct carp_softc *sc)
ip6->ip6_vfc |= IPV6_VERSION;
ip6->ip6_hlim = CARP_DFLTTL;
ip6->ip6_nxt = IPPROTO_CARP;
- bcopy(&sc->sc_ia6->ia_addr.sin6_addr, &ip6->ip6_src,
- sizeof(struct in6_addr));
- /* set the multicast destination */
+ bzero(&sa, sizeof(sa));
+
+ /* set the source address */
+ sa.sa_family = AF_INET6;
+ ifa = ifaof_ifpforaddr(&sa, sc->sc_carpdev);
+ if (ifa != NULL) {
+ bcopy(IFA_IN6(ifa), &ip6->ip6_src,
+ sizeof(struct in6_addr));
+ ifa_free(ifa);
+ } else
+ /* This should never happen with IPv6. */
+ bzero(&ip6->ip6_src, sizeof(struct in6_addr));
+ /* Set the multicast destination. */
ip6->ip6_dst.s6_addr16[0] = htons(0xff02);
ip6->ip6_dst.s6_addr8[15] = 0x12;
if (in6_setscope(&ip6->ip6_dst, sc->sc_carpdev, NULL) != 0) {
- SC2IFP(sc)->if_oerrors++;
m_freem(m);
CARP_DEBUG("%s: in6_setscope failed\n", __func__);
return;
@@ -1071,29 +874,22 @@ carp_send_ad_locked(struct carp_softc *sc)
ch_ptr->carp_cksum = carp_cksum(m, len - sizeof(*ip6));
m->m_data -= sizeof(*ip6);
- getmicrotime(&SC2IFP(sc)->if_lastchange);
- SC2IFP(sc)->if_opackets++;
- SC2IFP(sc)->if_obytes += len;
CARPSTATS_INC(carps_opackets6);
- if (ip6_output(m, NULL, NULL, 0, &sc->sc_im6o, NULL, NULL)) {
- SC2IFP(sc)->if_oerrors++;
+ if (ip6_output(m, NULL, NULL, 0,
+ &sc->sc_carpdev->if_carp->cif_im6o, NULL, NULL)) {
if (sc->sc_sendad_errors < INT_MAX)
sc->sc_sendad_errors++;
- if (sc->sc_sendad_errors == CARP_SENDAD_MAX_ERRORS) {
- carp_suppress_preempt++;
- if (carp_suppress_preempt == 1) {
- CARP_SCUNLOCK(sc);
- carp_send_ad_all();
- CARP_SCLOCK(sc);
- }
- }
+ if (sc->sc_sendad_errors == CARP_SENDAD_MAX_ERRORS)
+ carp_demote_adj(carp_senderr_adj,
+ "send6 error");
sc->sc_sendad_success = 0;
} else {
if (sc->sc_sendad_errors >= CARP_SENDAD_MAX_ERRORS) {
if (++sc->sc_sendad_success >=
CARP_SENDAD_MIN_SUCCESS) {
- carp_suppress_preempt--;
+ carp_demote_adj(-carp_senderr_adj,
+ "send6 ok");
sc->sc_sendad_errors = 0;
}
} else
@@ -1102,10 +898,55 @@ carp_send_ad_locked(struct carp_softc *sc)
}
#endif /* INET6 */
- if (advbase != 255 || advskew != 255)
- callout_reset(&sc->sc_ad_tmo, tvtohz(&tv),
- carp_send_ad, sc);
+ callout_reset(&sc->sc_ad_tmo, tvtohz(&tv), carp_send_ad, sc);
+}
+
+static void
+carp_addroute(struct carp_softc *sc)
+{
+ struct ifaddr *ifa;
+ CARP_FOREACH_IFA(sc, ifa)
+ switch (ifa->ifa_addr->sa_family) {
+#ifdef INET
+ case AF_INET:
+ in_addprefix(ifatoia(ifa), RTF_UP);
+ ifa_add_loopback_route(ifa,
+ (struct sockaddr *)&ifatoia(ifa)->ia_addr);
+ break;
+#endif
+#ifdef INET6
+ case AF_INET6:
+ ifa_add_loopback_route(ifa,
+ (struct sockaddr *)&ifatoia6(ifa)->ia_addr);
+ in6_ifaddloop(ifa);
+ break;
+#endif
+ }
+}
+
+static void
+carp_delroute(struct carp_softc *sc)
+{
+ struct ifaddr *ifa;
+
+ CARP_FOREACH_IFA(sc, ifa)
+ switch (ifa->ifa_addr->sa_family) {
+#ifdef INET
+ case AF_INET:
+ ifa_del_loopback_route(ifa,
+ (struct sockaddr *)&ifatoia(ifa)->ia_addr);
+ in_scrubprefix(ifatoia(ifa), LLE_STATIC);
+ break;
+#endif
+#ifdef INET6
+ case AF_INET6:
+ ifa_del_loopback_route(ifa,
+ (struct sockaddr *)&ifatoia6(ifa)->ia_addr);
+ in6_ifremloop(ifa);
+ break;
+#endif
+ }
}
#ifdef INET
@@ -1119,16 +960,22 @@ carp_send_arp(struct carp_softc *sc)
{
struct ifaddr *ifa;
- TAILQ_FOREACH(ifa, &SC2IFP(sc)->if_addrlist, ifa_list) {
-
- if (ifa->ifa_addr->sa_family != AF_INET)
- continue;
+ CARP_FOREACH_IFA(sc, ifa)
+ if (ifa->ifa_addr->sa_family == AF_INET)
+ arp_ifinit2(sc->sc_carpdev, ifa, LLADDR(&sc->sc_addr));
+}
-/* arprequest(sc->sc_carpdev, &in, &in, IF_LLADDR(sc->sc_ifp)); */
- arp_ifinit2(sc->sc_carpdev, ifa, IF_LLADDR(sc->sc_ifp));
+int
+carp_iamatch(struct ifaddr *ifa, uint8_t **enaddr)
+{
+ struct carp_softc *sc = ifa->ifa_carp;
- DELAY(1000); /* XXX */
+ if (sc->sc_state == MASTER) {
+ *enaddr = LLADDR(&sc->sc_addr);
+ return (1);
}
+
+ return (0);
}
#endif
@@ -1136,226 +983,95 @@ carp_send_arp(struct carp_softc *sc)
static void
carp_send_na(struct carp_softc *sc)
{
+ static struct in6_addr mcast = IN6ADDR_LINKLOCAL_ALLNODES_INIT;
struct ifaddr *ifa;
struct in6_addr *in6;
- static struct in6_addr mcast = IN6ADDR_LINKLOCAL_ALLNODES_INIT;
-
- TAILQ_FOREACH(ifa, &SC2IFP(sc)->if_addrlist, ifa_list) {
+ CARP_FOREACH_IFA(sc, ifa) {
if (ifa->ifa_addr->sa_family != AF_INET6)
continue;
- in6 = &ifatoia6(ifa)->ia_addr.sin6_addr;
+ in6 = IFA_IN6(ifa);
nd6_na_output(sc->sc_carpdev, &mcast, in6,
ND_NA_FLAG_OVERRIDE, 1, NULL);
DELAY(1000); /* XXX */
}
}
-#endif /* INET6 */
-#ifdef INET
-static int
-carp_addrcount(struct carp_if *cif, struct in_ifaddr *ia, int type)
-{
- struct carp_softc *vh;
- struct ifaddr *ifa;
- int count = 0;
-
- CARP_LOCK_ASSERT(cif);
-
- TAILQ_FOREACH(vh, &cif->vhif_vrs, sc_list) {
- if ((type == CARP_COUNT_RUNNING &&
- (SC2IFP(vh)->if_flags & IFF_UP) &&
- (SC2IFP(vh)->if_drv_flags & IFF_DRV_RUNNING)) ||
- (type == CARP_COUNT_MASTER && vh->sc_state == MASTER)) {
- IF_ADDR_LOCK(SC2IFP(vh));
- TAILQ_FOREACH(ifa, &SC2IFP(vh)->if_addrlist,
- ifa_list) {
- if (ifa->ifa_addr->sa_family == AF_INET &&
- ia->ia_addr.sin_addr.s_addr ==
- ifatoia(ifa)->ia_addr.sin_addr.s_addr)
- count++;
- }
- IF_ADDR_UNLOCK(SC2IFP(vh));
- }
- }
- return (count);
-}
-
-int
-carp_iamatch(struct ifnet *ifp, struct in_ifaddr *ia,
- struct in_addr *isaddr, u_int8_t **enaddr)
-{
- struct carp_if *cif;
- struct carp_softc *vh;
- int index, count = 0;
- struct ifaddr *ifa;
-
- cif = ifp->if_carp;
- CARP_LOCK(cif);
-
- if (carp_opts[CARPCTL_ARPBALANCE]) {
- /*
- * XXX proof of concept implementation.
- * We use the source ip to decide which virtual host should
- * handle the request. If we're master of that virtual host,
- * then we respond, otherwise, just drop the arp packet on
- * the floor.
- */
- count = carp_addrcount(cif, ia, CARP_COUNT_RUNNING);
- if (count == 0) {
- /* should never reach this */
- CARP_UNLOCK(cif);
- return (0);
- }
-
- /* this should be a hash, like pf_hash() */
- index = ntohl(isaddr->s_addr) % count;
- count = 0;
-
- TAILQ_FOREACH(vh, &cif->vhif_vrs, sc_list) {
- if ((SC2IFP(vh)->if_flags & IFF_UP) &&
- (SC2IFP(vh)->if_drv_flags & IFF_DRV_RUNNING)) {
- IF_ADDR_LOCK(SC2IFP(vh));
- TAILQ_FOREACH(ifa, &SC2IFP(vh)->if_addrlist,
- ifa_list) {
- if (ifa->ifa_addr->sa_family ==
- AF_INET &&
- ia->ia_addr.sin_addr.s_addr ==
- ifatoia(ifa)->ia_addr.sin_addr.s_addr) {
- if (count == index) {
- if (vh->sc_state ==
- MASTER) {
- *enaddr = IF_LLADDR(vh->sc_ifp);
- IF_ADDR_UNLOCK(SC2IFP(vh));
- CARP_UNLOCK(cif);
- return (1);
- } else {
- IF_ADDR_UNLOCK(SC2IFP(vh));
- CARP_UNLOCK(cif);
- return (0);
- }
- }
- count++;
- }
- }
- IF_ADDR_UNLOCK(SC2IFP(vh));
- }
- }
- } else {
- TAILQ_FOREACH(vh, &cif->vhif_vrs, sc_list) {
- if ((SC2IFP(vh)->if_flags & IFF_UP) &&
- (SC2IFP(vh)->if_drv_flags & IFF_DRV_RUNNING) &&
- ia->ia_ifp == SC2IFP(vh) &&
- vh->sc_state == MASTER) {
- *enaddr = IF_LLADDR(vh->sc_ifp);
- CARP_UNLOCK(cif);
- return (1);
- }
- }
- }
- CARP_UNLOCK(cif);
- return (0);
-}
-#endif
-
-#ifdef INET6
struct ifaddr *
carp_iamatch6(struct ifnet *ifp, struct in6_addr *taddr)
{
- struct carp_if *cif;
- struct carp_softc *vh;
struct ifaddr *ifa;
- cif = ifp->if_carp;
- CARP_LOCK(cif);
- TAILQ_FOREACH(vh, &cif->vhif_vrs, sc_list) {
- IF_ADDR_LOCK(SC2IFP(vh));
- TAILQ_FOREACH(ifa, &SC2IFP(vh)->if_addrlist, ifa_list) {
- if (IN6_ARE_ADDR_EQUAL(taddr,
- &ifatoia6(ifa)->ia_addr.sin6_addr) &&
- (SC2IFP(vh)->if_flags & IFF_UP) &&
- (SC2IFP(vh)->if_drv_flags & IFF_DRV_RUNNING) &&
- vh->sc_state == MASTER) {
- ifa_ref(ifa);
- IF_ADDR_UNLOCK(SC2IFP(vh));
- CARP_UNLOCK(cif);
- return (ifa);
- }
+ IF_ADDR_RLOCK(ifp);
+ IFNET_FOREACH_IFA(ifp, ifa)
+ if (ifa->ifa_addr->sa_family == AF_INET6 &&
+ ifa->ifa_carp->sc_state == MASTER &&
+ IN6_ARE_ADDR_EQUAL(taddr, IFA_IN6(ifa))) {
+ ifa_ref(ifa);
+ IF_ADDR_RUNLOCK(ifp);
+ return (ifa);
}
- IF_ADDR_UNLOCK(SC2IFP(vh));
- }
- CARP_UNLOCK(cif);
-
+ IF_ADDR_RUNLOCK(ifp);
+
return (NULL);
}
caddr_t
carp_macmatch6(struct ifnet *ifp, struct mbuf *m, const struct in6_addr *taddr)
{
- struct m_tag *mtag;
- struct carp_if *cif;
- struct carp_softc *sc;
struct ifaddr *ifa;
- cif = ifp->if_carp;
- CARP_LOCK(cif);
- TAILQ_FOREACH(sc, &cif->vhif_vrs, sc_list) {
- IF_ADDR_LOCK(SC2IFP(sc));
- TAILQ_FOREACH(ifa, &SC2IFP(sc)->if_addrlist, ifa_list) {
- if (IN6_ARE_ADDR_EQUAL(taddr,
- &ifatoia6(ifa)->ia_addr.sin6_addr) &&
- (SC2IFP(sc)->if_flags & IFF_UP) &&
- (SC2IFP(sc)->if_drv_flags & IFF_DRV_RUNNING)) {
- struct ifnet *ifp = SC2IFP(sc);
- mtag = m_tag_get(PACKET_TAG_CARP,
- sizeof(struct ifnet *), M_NOWAIT);
- if (mtag == NULL) {
- /* better a bit than nothing */
- IF_ADDR_UNLOCK(SC2IFP(sc));
- CARP_UNLOCK(cif);
- return (IF_LLADDR(sc->sc_ifp));
- }
- bcopy(&ifp, (caddr_t)(mtag + 1),
- sizeof(struct ifnet *));
- m_tag_prepend(m, mtag);
+ IF_ADDR_RLOCK(ifp);
+ IFNET_FOREACH_IFA(ifp, ifa)
+ if (ifa->ifa_addr->sa_family == AF_INET6 &&
+ IN6_ARE_ADDR_EQUAL(taddr, IFA_IN6(ifa))) {
+ struct carp_softc *sc = ifa->ifa_carp;
+ struct m_tag *mtag;
- IF_ADDR_UNLOCK(SC2IFP(sc));
- CARP_UNLOCK(cif);
- return (IF_LLADDR(sc->sc_ifp));
- }
+ IF_ADDR_RUNLOCK(ifp);
+
+ mtag = m_tag_get(PACKET_TAG_CARP,
+ sizeof(struct ifnet *), M_NOWAIT);
+ if (mtag == NULL)
+ /* Better a bit than nothing. */
+ return (LLADDR(&sc->sc_addr));
+
+ bcopy(&ifp, (caddr_t)(mtag + 1),
+ sizeof(struct ifnet *));
+ m_tag_prepend(m, mtag);
+
+ return (LLADDR(&sc->sc_addr));
}
- IF_ADDR_UNLOCK(SC2IFP(sc));
- }
- CARP_UNLOCK(cif);
+ IF_ADDR_RUNLOCK(ifp);
return (NULL);
}
-#endif
+#endif /* INET6 */
-struct ifnet *
+int
carp_forus(struct ifnet *ifp, u_char *dhost)
{
- struct carp_if *cif;
- struct carp_softc *vh;
- u_int8_t *ena = dhost;
+ struct carp_softc *sc;
+ uint8_t *ena = dhost;
if (ena[0] || ena[1] || ena[2] != 0x5e || ena[3] || ena[4] != 1)
- return (NULL);
-
- cif = ifp->if_carp;
- CARP_LOCK(cif);
- TAILQ_FOREACH(vh, &cif->vhif_vrs, sc_list)
- if ((SC2IFP(vh)->if_flags & IFF_UP) &&
- (SC2IFP(vh)->if_drv_flags & IFF_DRV_RUNNING) &&
- vh->sc_state == MASTER &&
- !bcmp(dhost, IF_LLADDR(vh->sc_ifp), ETHER_ADDR_LEN)) {
- CARP_UNLOCK(cif);
- return (SC2IFP(vh));
+ return (0);
+
+ CIF_LOCK(ifp->if_carp);
+ IFNET_FOREACH_CARP(ifp, sc) {
+ CARP_LOCK(sc);
+ if (sc->sc_state == MASTER && !bcmp(dhost, LLADDR(&sc->sc_addr),
+ ETHER_ADDR_LEN)) {
+ CARP_UNLOCK(sc);
+ CIF_UNLOCK(ifp->if_carp);
+ return (1);
}
+ CARP_UNLOCK(sc);
+ }
+ CIF_UNLOCK(ifp->if_carp);
- CARP_UNLOCK(cif);
- return (NULL);
+ return (0);
}
static void
@@ -1363,24 +1079,25 @@ carp_master_down(void *v)
{
struct carp_softc *sc = v;
- CARP_SCLOCK(sc);
- carp_master_down_locked(sc);
- CARP_SCUNLOCK(sc);
+ CARP_LOCK_ASSERT(sc);
+
+ if (sc->sc_state == BACKUP) {
+ CARP_LOG("VHID %u@%s: BACKUP -> MASTER (master down)\n",
+ sc->sc_vhid,
+ sc->sc_carpdev->if_xname);
+ carp_master_down_locked(sc);
+ }
+
+ CARP_UNLOCK(sc);
}
static void
carp_master_down_locked(struct carp_softc *sc)
{
- if (sc->sc_carpdev)
- CARP_SCLOCK_ASSERT(sc);
+
+ CARP_LOCK_ASSERT(sc);
switch (sc->sc_state) {
- case INIT:
- printf("%s: master_down event in INIT state\n",
- SC2IFP(sc)->if_xname);
- break;
- case MASTER:
- break;
case BACKUP:
carp_set_state(sc, MASTER);
carp_send_ad_locked(sc);
@@ -1389,9 +1106,18 @@ carp_master_down_locked(struct carp_softc *sc)
#endif
#ifdef INET6
carp_send_na(sc);
-#endif /* INET6 */
+#endif
carp_setrun(sc, 0);
- carp_setroute(sc, RTM_ADD);
+ carp_addroute(sc);
+ break;
+ case INIT:
+ case MASTER:
+#ifdef INVARIANTS
+ panic("carp: VHID %u@%s: master_down event in %s state\n",
+ sc->sc_vhid,
+ sc->sc_carpdev->if_xname,
+ sc->sc_state ? "MASTER" : "INIT");
+#endif
break;
}
}
@@ -1405,28 +1131,19 @@ carp_setrun(struct carp_softc *sc, sa_family_t af)
{
struct timeval tv;
- if (sc->sc_carpdev == NULL) {
- SC2IFP(sc)->if_drv_flags &= ~IFF_DRV_RUNNING;
- carp_set_state(sc, INIT);
- return;
- } else
- CARP_SCLOCK_ASSERT(sc);
-
- if (SC2IFP(sc)->if_flags & IFF_UP &&
- sc->sc_vhid > 0 && (sc->sc_naddrs || sc->sc_naddrs6) &&
- sc->sc_carpdev->if_link_state == LINK_STATE_UP)
- SC2IFP(sc)->if_drv_flags |= IFF_DRV_RUNNING;
- else {
- SC2IFP(sc)->if_drv_flags &= ~IFF_DRV_RUNNING;
- carp_setroute(sc, RTM_DELETE);
+ CARP_LOCK_ASSERT(sc);
+
+ if ((sc->sc_carpdev->if_flags & IFF_UP) == 0 ||
+ sc->sc_carpdev->if_link_state != LINK_STATE_UP ||
+ (sc->sc_naddrs == 0 && sc->sc_naddrs6 == 0))
return;
- }
switch (sc->sc_state) {
case INIT:
- CARP_LOG("%s: INIT -> BACKUP\n", SC2IFP(sc)->if_xname);
+ CARP_LOG("VHID %u@%s: INIT -> BACKUP\n",
+ sc->sc_vhid,
+ sc->sc_carpdev->if_xname);
carp_set_state(sc, BACKUP);
- carp_setroute(sc, RTM_DELETE);
carp_setrun(sc, 0);
break;
case BACKUP:
@@ -1439,20 +1156,24 @@ carp_setrun(struct carp_softc *sc, sa_family_t af)
callout_reset(&sc->sc_md_tmo, tvtohz(&tv),
carp_master_down, sc);
break;
-#endif /* INET */
+#endif
#ifdef INET6
case AF_INET6:
callout_reset(&sc->sc_md6_tmo, tvtohz(&tv),
carp_master_down, sc);
break;
-#endif /* INET6 */
+#endif
default:
+#ifdef INET
if (sc->sc_naddrs)
callout_reset(&sc->sc_md_tmo, tvtohz(&tv),
carp_master_down, sc);
+#endif
+#ifdef INET6
if (sc->sc_naddrs6)
callout_reset(&sc->sc_md6_tmo, tvtohz(&tv),
carp_master_down, sc);
+#endif
break;
}
break;
@@ -1465,546 +1186,475 @@ carp_setrun(struct carp_softc *sc, sa_family_t af)
}
}
-#ifdef INET
-static void
-carp_multicast_cleanup(struct carp_softc *sc, int dofree)
+/*
+ * Setup multicast structures.
+ */
+static int
+carp_multicast_setup(struct carp_softc *sc, sa_family_t sa)
{
- struct ip_moptions *imo = &sc->sc_imo;
- u_int16_t n = imo->imo_num_memberships;
-
- /* Clean up our own multicast memberships */
- while (n-- > 0) {
- if (imo->imo_membership[n] != NULL) {
- if (dofree)
- in_delmulti(imo->imo_membership[n]);
- imo->imo_membership[n] = NULL;
+ struct ifnet *ifp = sc->sc_carpdev;
+ struct carp_if *cif = ifp->if_carp;
+ int error = 0;
+
+ switch (sa) {
+#ifdef INET
+ case AF_INET:
+ {
+ struct ip_moptions *imo = &cif->cif_imo;
+ struct in_addr addr;
+
+ if (imo->imo_membership)
+ return (0);
+
+ imo->imo_membership = (struct in_multi **)malloc(
+ (sizeof(struct in_multi *) * IP_MIN_MEMBERSHIPS), M_CARP,
+ M_WAITOK);
+ imo->imo_mfilters = NULL;
+ imo->imo_max_memberships = IP_MIN_MEMBERSHIPS;
+ imo->imo_multicast_vif = -1;
+
+ addr.s_addr = htonl(INADDR_CARP_GROUP);
+ if ((error = in_joingroup(ifp, &addr, NULL,
+ &imo->imo_membership[0])) != 0) {
+ free(imo->imo_membership, M_CARP);
+ break;
}
+ imo->imo_num_memberships++;
+ imo->imo_multicast_ifp = ifp;
+ imo->imo_multicast_ttl = CARP_DFLTTL;
+ imo->imo_multicast_loop = 0;
+ break;
+ }
+#endif
+#ifdef INET6
+ case AF_INET6:
+ {
+ struct ip6_moptions *im6o = &cif->cif_im6o;
+ struct in6_addr in6;
+ struct in6_multi *in6m;
+
+ if (im6o->im6o_membership)
+ return (0);
+
+ im6o->im6o_membership = (struct in6_multi **)malloc(
+ (sizeof(struct in6_multi *) * IPV6_MIN_MEMBERSHIPS), M_CARP,
+ M_ZERO|M_WAITOK);
+ im6o->im6o_mfilters = NULL;
+ im6o->im6o_max_memberships = IPV6_MIN_MEMBERSHIPS;
+ im6o->im6o_multicast_hlim = CARP_DFLTTL;
+ im6o->im6o_multicast_ifp = ifp;
+
+ /* Join IPv6 CARP multicast group. */
+ bzero(&in6, sizeof(in6));
+ in6.s6_addr16[0] = htons(0xff02);
+ in6.s6_addr8[15] = 0x12;
+ if ((error = in6_setscope(&in6, ifp, NULL)) != 0) {
+ free(im6o->im6o_membership, M_CARP);
+ break;
+ }
+ in6m = NULL;
+ if ((error = in6_mc_join(ifp, &in6, NULL, &in6m, 0)) != 0) {
+ free(im6o->im6o_membership, M_CARP);
+ break;
+ }
+ im6o->im6o_membership[0] = in6m;
+ im6o->im6o_num_memberships++;
+
+ /* Join solicited multicast address. */
+ bzero(&in6, sizeof(in6));
+ in6.s6_addr16[0] = htons(0xff02);
+ in6.s6_addr32[1] = 0;
+ in6.s6_addr32[2] = htonl(1);
+ in6.s6_addr32[3] = 0;
+ in6.s6_addr8[12] = 0xff;
+ if ((error = in6_setscope(&in6, ifp, NULL)) != 0) {
+ in6_mc_leave(im6o->im6o_membership[0], NULL);
+ free(im6o->im6o_membership, M_CARP);
+ break;
+ }
+ in6m = NULL;
+ if ((error = in6_mc_join(ifp, &in6, NULL, &in6m, 0)) != 0) {
+ in6_mc_leave(im6o->im6o_membership[0], NULL);
+ free(im6o->im6o_membership, M_CARP);
+ break;
+ }
+ im6o->im6o_membership[1] = in6m;
+ im6o->im6o_num_memberships++;
+ break;
+ }
+#endif
}
- KASSERT(imo->imo_mfilters == NULL,
- ("%s: imo_mfilters != NULL", __func__));
- imo->imo_num_memberships = 0;
- imo->imo_multicast_ifp = NULL;
+
+ return (error);
}
-#endif
-#ifdef INET6
+/*
+ * Free multicast structures.
+ */
static void
-carp_multicast6_cleanup(struct carp_softc *sc, int dofree)
+carp_multicast_cleanup(struct carp_softc *sc, sa_family_t sa)
{
- struct ip6_moptions *im6o = &sc->sc_im6o;
- u_int16_t n = im6o->im6o_num_memberships;
-
- while (n-- > 0) {
- if (im6o->im6o_membership[n] != NULL) {
- if (dofree)
- in6_mc_leave(im6o->im6o_membership[n], NULL);
- im6o->im6o_membership[n] = NULL;
+ struct ifnet *ifp = sc->sc_carpdev;
+ struct carp_if *cif = ifp->if_carp;
+
+ switch (sa) {
+#ifdef INET
+ case AF_INET:
+ if (sc->sc_naddrs == 0) {
+ struct ip_moptions *imo = &cif->cif_imo;
+
+ in_leavegroup(imo->imo_membership[0], NULL);
+ KASSERT(imo->imo_mfilters == NULL,
+ ("%s: imo_mfilters != NULL", __func__));
+ free(imo->imo_membership, M_CARP);
+ imo->imo_membership = NULL;
+
+ }
+ break;
+#endif
+#ifdef INET6
+ case AF_INET6:
+ if (sc->sc_naddrs6 == 0) {
+ struct ip6_moptions *im6o = &cif->cif_im6o;
+
+ in6_mc_leave(im6o->im6o_membership[0], NULL);
+ in6_mc_leave(im6o->im6o_membership[1], NULL);
+ KASSERT(im6o->im6o_mfilters == NULL,
+ ("%s: im6o_mfilters != NULL", __func__));
+ free(im6o->im6o_membership, M_CARP);
+ im6o->im6o_membership = NULL;
}
+ break;
+#endif
}
- KASSERT(im6o->im6o_mfilters == NULL,
- ("%s: im6o_mfilters != NULL", __func__));
- im6o->im6o_num_memberships = 0;
- im6o->im6o_multicast_ifp = NULL;
}
-#endif
-#ifdef INET
-static int
-carp_set_addr(struct carp_softc *sc, struct sockaddr_in *sin)
+int
+carp_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *sa)
{
- struct ifnet *ifp;
- struct carp_if *cif;
- struct in_ifaddr *ia, *ia_if;
- struct ip_moptions *imo = &sc->sc_imo;
- struct in_addr addr;
- u_long iaddr = htonl(sin->sin_addr.s_addr);
- int own, error;
-
- if (sin->sin_addr.s_addr == 0) {
- if (!(SC2IFP(sc)->if_flags & IFF_UP))
- carp_set_state(sc, INIT);
- if (sc->sc_naddrs)
- SC2IFP(sc)->if_flags |= IFF_UP;
- if (sc->sc_carpdev)
- CARP_SCLOCK(sc);
- carp_setrun(sc, 0);
- if (sc->sc_carpdev)
- CARP_SCUNLOCK(sc);
- return (0);
- }
+ struct m_tag *mtag;
+ struct carp_softc *sc;
- /* we have to do it by hands to check we won't match on us */
- ia_if = NULL; own = 0;
- IN_IFADDR_RLOCK();
- TAILQ_FOREACH(ia, &V_in_ifaddrhead, ia_link) {
- /* and, yeah, we need a multicast-capable iface too */
- if (ia->ia_ifp != SC2IFP(sc) &&
- (ia->ia_ifp->if_flags & IFF_MULTICAST) &&
- (iaddr & ia->ia_subnetmask) == ia->ia_subnet) {
- if (!ia_if)
- ia_if = ia;
- if (sin->sin_addr.s_addr ==
- ia->ia_addr.sin_addr.s_addr)
- own++;
- }
- }
+ if (!sa)
+ return (0);
- if (!ia_if) {
- IN_IFADDR_RUNLOCK();
- return (EADDRNOTAVAIL);
+ switch (sa->sa_family) {
+#ifdef INET
+ case AF_INET:
+ break;
+#endif
+#ifdef INET6
+ case AF_INET6:
+ break;
+#endif
+ default:
+ return (0);
}
- ia = ia_if;
- ifa_ref(&ia->ia_ifa);
- IN_IFADDR_RUNLOCK();
+ mtag = m_tag_find(m, PACKET_TAG_CARP, NULL);
+ if (mtag == NULL)
+ return (0);
- ifp = ia->ia_ifp;
+ bcopy(mtag + 1, &sc, sizeof(struct carp_softc *));
- if (ifp == NULL || (ifp->if_flags & IFF_MULTICAST) == 0 ||
- (imo->imo_multicast_ifp && imo->imo_multicast_ifp != ifp)) {
- ifa_free(&ia->ia_ifa);
- return (EADDRNOTAVAIL);
- }
+ /* Set the source MAC address to the Virtual Router MAC Address. */
+ switch (ifp->if_type) {
+ case IFT_ETHER:
+ case IFT_L2VLAN: {
+ struct ether_header *eh;
- if (imo->imo_num_memberships == 0) {
- addr.s_addr = htonl(INADDR_CARP_GROUP);
- if ((imo->imo_membership[0] = in_addmulti(&addr, ifp)) ==
- NULL) {
- ifa_free(&ia->ia_ifa);
- return (ENOBUFS);
+ eh = mtod(m, struct ether_header *);
+ eh->ether_shost[0] = 0;
+ eh->ether_shost[1] = 0;
+ eh->ether_shost[2] = 0x5e;
+ eh->ether_shost[3] = 0;
+ eh->ether_shost[4] = 1;
+ eh->ether_shost[5] = sc->sc_vhid;
}
- imo->imo_num_memberships++;
- imo->imo_multicast_ifp = ifp;
- imo->imo_multicast_ttl = CARP_DFLTTL;
- imo->imo_multicast_loop = 0;
- }
-
- if (!ifp->if_carp) {
+ break;
+ case IFT_FDDI: {
+ struct fddi_header *fh;
- cif = malloc(sizeof(*cif), M_CARP,
- M_WAITOK|M_ZERO);
- if (!cif) {
- error = ENOBUFS;
- goto cleanup;
+ fh = mtod(m, struct fddi_header *);
+ fh->fddi_shost[0] = 0;
+ fh->fddi_shost[1] = 0;
+ fh->fddi_shost[2] = 0x5e;
+ fh->fddi_shost[3] = 0;
+ fh->fddi_shost[4] = 1;
+ fh->fddi_shost[5] = sc->sc_vhid;
}
- if ((error = ifpromisc(ifp, 1))) {
- free(cif, M_CARP);
- goto cleanup;
+ break;
+ case IFT_ISO88025: {
+ struct iso88025_header *th;
+ th = mtod(m, struct iso88025_header *);
+ th->iso88025_shost[0] = 3;
+ th->iso88025_shost[1] = 0;
+ th->iso88025_shost[2] = 0x40 >> (sc->sc_vhid - 1);
+ th->iso88025_shost[3] = 0x40000 >> (sc->sc_vhid - 1);
+ th->iso88025_shost[4] = 0;
+ th->iso88025_shost[5] = 0;
}
-
- CARP_LOCK_INIT(cif);
- CARP_LOCK(cif);
- cif->vhif_ifp = ifp;
- TAILQ_INIT(&cif->vhif_vrs);
- ifp->if_carp = cif;
-
- } else {
- struct carp_softc *vr;
-
- cif = (struct carp_if *)ifp->if_carp;
- CARP_LOCK(cif);
- TAILQ_FOREACH(vr, &cif->vhif_vrs, sc_list)
- if (vr != sc && vr->sc_vhid == sc->sc_vhid) {
- CARP_UNLOCK(cif);
- error = EEXIST;
- goto cleanup;
- }
+ break;
+ default:
+ printf("%s: carp is not supported for the %d interface type\n",
+ ifp->if_xname, ifp->if_type);
+ return (EOPNOTSUPP);
}
- sc->sc_ia = ia;
- sc->sc_carpdev = ifp;
- { /* XXX prevent endless loop if already in queue */
- struct carp_softc *vr, *after = NULL;
- int myself = 0;
- cif = (struct carp_if *)ifp->if_carp;
+ return (0);
+}
- /* XXX: cif should not change, right? So we still hold the lock */
- CARP_LOCK_ASSERT(cif);
+static struct carp_softc*
+carp_alloc(struct ifnet *ifp)
+{
+ struct carp_softc *sc;
+ struct carp_if *cif;
- TAILQ_FOREACH(vr, &cif->vhif_vrs, sc_list) {
- if (vr == sc)
- myself = 1;
- if (vr->sc_vhid < sc->sc_vhid)
- after = vr;
+ if ((cif = ifp->if_carp) == NULL) {
+ cif = carp_alloc_if(ifp);
+ if (cif == NULL)
+ return (NULL);
}
- if (!myself) {
- /* We're trying to keep things in order */
- if (after == NULL) {
- TAILQ_INSERT_TAIL(&cif->vhif_vrs, sc, sc_list);
- } else {
- TAILQ_INSERT_AFTER(&cif->vhif_vrs, after, sc, sc_list);
- }
- cif->vhif_nvrs++;
- }
- }
+ sc = malloc(sizeof(*sc), M_CARP, M_WAITOK|M_ZERO);
+
+ sc->sc_advbase = CARP_DFLTINTV;
+ sc->sc_vhid = -1; /* required setting */
+ sc->sc_init_counter = 1;
+ sc->sc_state = INIT;
- sc->sc_naddrs++;
- SC2IFP(sc)->if_flags |= IFF_UP;
- if (own)
- sc->sc_advskew = 0;
- carp_sc_state_locked(sc);
- carp_setrun(sc, 0);
+ sc->sc_ifasiz = sizeof(struct ifaddr *);
+ sc->sc_ifas = malloc(sc->sc_ifasiz, M_CARP, M_WAITOK|M_ZERO);
+ sc->sc_carpdev = ifp;
- CARP_UNLOCK(cif);
- ifa_free(&ia->ia_ifa); /* XXXRW: should hold reference for softc. */
+ CARP_LOCK_INIT(sc);
+#ifdef INET
+ callout_init_mtx(&sc->sc_md_tmo, &sc->sc_mtx, CALLOUT_RETURNUNLOCKED);
+#endif
+#ifdef INET6
+ callout_init_mtx(&sc->sc_md6_tmo, &sc->sc_mtx, CALLOUT_RETURNUNLOCKED);
+#endif
+ callout_init_mtx(&sc->sc_ad_tmo, &sc->sc_mtx, CALLOUT_RETURNUNLOCKED);
- return (0);
+ CIF_LOCK(cif);
+ TAILQ_INSERT_TAIL(&cif->cif_vrs, sc, sc_list);
+ CIF_UNLOCK(cif);
-cleanup:
- in_delmulti(imo->imo_membership[--imo->imo_num_memberships]);
- ifa_free(&ia->ia_ifa);
- return (error);
+ mtx_lock(&carp_mtx);
+ LIST_INSERT_HEAD(&carp_list, sc, sc_next);
+ mtx_unlock(&carp_mtx);
+
+ return (sc);
}
static int
-carp_del_addr(struct carp_softc *sc, struct sockaddr_in *sin)
+carp_grow_ifas(struct carp_softc *sc)
{
- int error = 0;
+ struct ifaddr **new;
- if (!--sc->sc_naddrs) {
- struct carp_if *cif = (struct carp_if *)sc->sc_carpdev->if_carp;
- struct ip_moptions *imo = &sc->sc_imo;
+ CARP_LOCK_ASSERT(sc);
- CARP_LOCK(cif);
- callout_stop(&sc->sc_ad_tmo);
- SC2IFP(sc)->if_flags &= ~IFF_UP;
- SC2IFP(sc)->if_drv_flags &= ~IFF_DRV_RUNNING;
- sc->sc_vhid = -1;
- in_delmulti(imo->imo_membership[--imo->imo_num_memberships]);
- imo->imo_multicast_ifp = NULL;
- TAILQ_REMOVE(&cif->vhif_vrs, sc, sc_list);
- if (!--cif->vhif_nvrs) {
- sc->sc_carpdev->if_carp = NULL;
- CARP_LOCK_DESTROY(cif);
- free(cif, M_CARP);
- } else {
- CARP_UNLOCK(cif);
- }
- }
+ new = malloc(sc->sc_ifasiz * 2, M_CARP, M_NOWAIT|M_ZERO);
+ if (new == NULL)
+ return (ENOMEM);
+ bcopy(sc->sc_ifas, new, sc->sc_ifasiz);
+ free(sc->sc_ifas, M_CARP);
+ sc->sc_ifas = new;
+ sc->sc_ifasiz *= 2;
- return (error);
+ return (0);
}
-#endif
-#ifdef INET6
-static int
-carp_set_addr6(struct carp_softc *sc, struct sockaddr_in6 *sin6)
+static void
+carp_destroy(struct carp_softc *sc)
{
- struct ifnet *ifp;
- struct carp_if *cif;
- struct in6_ifaddr *ia, *ia_if;
- struct ip6_moptions *im6o = &sc->sc_im6o;
- struct in6_addr in6;
- int own, error;
-
- error = 0;
-
- if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) {
- if (!(SC2IFP(sc)->if_flags & IFF_UP))
- carp_set_state(sc, INIT);
- if (sc->sc_naddrs6)
- SC2IFP(sc)->if_flags |= IFF_UP;
- if (sc->sc_carpdev)
- CARP_SCLOCK(sc);
- carp_setrun(sc, 0);
- if (sc->sc_carpdev)
- CARP_SCUNLOCK(sc);
- return (0);
- }
+ struct ifnet *ifp = sc->sc_carpdev;
+ struct carp_if *cif = ifp->if_carp;
- /* we have to do it by hands to check we won't match on us */
- ia_if = NULL; own = 0;
- IN6_IFADDR_RLOCK();
- TAILQ_FOREACH(ia, &V_in6_ifaddrhead, ia_link) {
- int i;
-
- for (i = 0; i < 4; i++) {
- if ((sin6->sin6_addr.s6_addr32[i] &
- ia->ia_prefixmask.sin6_addr.s6_addr32[i]) !=
- (ia->ia_addr.sin6_addr.s6_addr32[i] &
- ia->ia_prefixmask.sin6_addr.s6_addr32[i]))
- break;
- }
- /* and, yeah, we need a multicast-capable iface too */
- if (ia->ia_ifp != SC2IFP(sc) &&
- (ia->ia_ifp->if_flags & IFF_MULTICAST) &&
- (i == 4)) {
- if (!ia_if)
- ia_if = ia;
- if (IN6_ARE_ADDR_EQUAL(&sin6->sin6_addr,
- &ia->ia_addr.sin6_addr))
- own++;
- }
- }
+ CIF_LOCK(cif);
+ TAILQ_REMOVE(&cif->cif_vrs, sc, sc_list);
+ if (TAILQ_EMPTY(&cif->cif_vrs))
+ carp_free_if(cif);
+ else
+ CIF_UNLOCK(cif);
- if (!ia_if) {
- IN6_IFADDR_RUNLOCK();
- return (EADDRNOTAVAIL);
- }
- ia = ia_if;
- ifa_ref(&ia->ia_ifa);
- IN6_IFADDR_RUNLOCK();
- ifp = ia->ia_ifp;
-
- if (ifp == NULL || (ifp->if_flags & IFF_MULTICAST) == 0 ||
- (im6o->im6o_multicast_ifp && im6o->im6o_multicast_ifp != ifp)) {
- ifa_free(&ia->ia_ifa);
- return (EADDRNOTAVAIL);
- }
+ mtx_lock(&carp_mtx);
+ LIST_REMOVE(sc, sc_next);
+ mtx_unlock(&carp_mtx);
- if (!sc->sc_naddrs6) {
- struct in6_multi *in6m;
+ CARP_LOCK(sc);
+ if (sc->sc_suppress)
+ carp_demote_adj(-carp_ifdown_adj, "vhid removed");
+ callout_drain(&sc->sc_ad_tmo);
+#ifdef INET
+ callout_drain(&sc->sc_md_tmo);
+#endif
+#ifdef INET6
+ callout_drain(&sc->sc_md6_tmo);
+#endif
+ CARP_LOCK_DESTROY(sc);
- im6o->im6o_multicast_ifp = ifp;
+ free(sc->sc_ifas, M_CARP);
+ free(sc, M_CARP);
+}
- /* join CARP multicast address */
- bzero(&in6, sizeof(in6));
- in6.s6_addr16[0] = htons(0xff02);
- in6.s6_addr8[15] = 0x12;
- if (in6_setscope(&in6, ifp, NULL) != 0)
- goto cleanup;
- in6m = NULL;
- error = in6_mc_join(ifp, &in6, NULL, &in6m, 0);
- if (error)
- goto cleanup;
- im6o->im6o_membership[0] = in6m;
- im6o->im6o_num_memberships++;
+static struct carp_if*
+carp_alloc_if(struct ifnet *ifp)
+{
+ struct carp_if *cif;
- /* join solicited multicast address */
- bzero(&in6, sizeof(in6));
- in6.s6_addr16[0] = htons(0xff02);
- in6.s6_addr32[1] = 0;
- in6.s6_addr32[2] = htonl(1);
- in6.s6_addr32[3] = sin6->sin6_addr.s6_addr32[3];
- in6.s6_addr8[12] = 0xff;
- if (in6_setscope(&in6, ifp, NULL) != 0)
- goto cleanup;
- in6m = NULL;
- error = in6_mc_join(ifp, &in6, NULL, &in6m, 0);
- if (error)
- goto cleanup;
- im6o->im6o_membership[1] = in6m;
- im6o->im6o_num_memberships++;
- }
+ cif = malloc(sizeof(*cif), M_CARP, M_WAITOK|M_ZERO);
- if (!ifp->if_carp) {
- cif = malloc(sizeof(*cif), M_CARP,
- M_WAITOK|M_ZERO);
- if (!cif) {
- error = ENOBUFS;
- goto cleanup;
- }
- if ((error = ifpromisc(ifp, 1))) {
- free(cif, M_CARP);
- goto cleanup;
- }
+ if (ifpromisc(ifp, 1) != 0)
+ goto cleanup;
- CARP_LOCK_INIT(cif);
- CARP_LOCK(cif);
- cif->vhif_ifp = ifp;
- TAILQ_INIT(&cif->vhif_vrs);
- ifp->if_carp = cif;
+ CIF_LOCK_INIT(cif);
+ cif->cif_ifp = ifp;
+ TAILQ_INIT(&cif->cif_vrs);
- } else {
- struct carp_softc *vr;
+ IF_ADDR_WLOCK(ifp);
+ ifp->if_carp = cif;
+ if_ref(ifp);
+ IF_ADDR_WUNLOCK(ifp);
- cif = (struct carp_if *)ifp->if_carp;
- CARP_LOCK(cif);
- TAILQ_FOREACH(vr, &cif->vhif_vrs, sc_list)
- if (vr != sc && vr->sc_vhid == sc->sc_vhid) {
- CARP_UNLOCK(cif);
- error = EINVAL;
- goto cleanup;
- }
- }
- sc->sc_ia6 = ia;
- sc->sc_carpdev = ifp;
+ return (cif);
- { /* XXX prevent endless loop if already in queue */
- struct carp_softc *vr, *after = NULL;
- int myself = 0;
- cif = (struct carp_if *)ifp->if_carp;
- CARP_LOCK_ASSERT(cif);
-
- TAILQ_FOREACH(vr, &cif->vhif_vrs, sc_list) {
- if (vr == sc)
- myself = 1;
- if (vr->sc_vhid < sc->sc_vhid)
- after = vr;
- }
+cleanup:
+ free(cif, M_CARP);
- if (!myself) {
- /* We're trying to keep things in order */
- if (after == NULL) {
- TAILQ_INSERT_TAIL(&cif->vhif_vrs, sc, sc_list);
- } else {
- TAILQ_INSERT_AFTER(&cif->vhif_vrs, after, sc, sc_list);
- }
- cif->vhif_nvrs++;
- }
- }
+ return (NULL);
+}
- sc->sc_naddrs6++;
- SC2IFP(sc)->if_flags |= IFF_UP;
- if (own)
- sc->sc_advskew = 0;
- carp_sc_state_locked(sc);
- carp_setrun(sc, 0);
+static void
+carp_free_if(struct carp_if *cif)
+{
+ struct ifnet *ifp = cif->cif_ifp;
- CARP_UNLOCK(cif);
- ifa_free(&ia->ia_ifa); /* XXXRW: should hold reference for softc. */
+ CIF_LOCK_ASSERT(cif);
+ KASSERT(TAILQ_EMPTY(&cif->cif_vrs), ("%s: softc list not empty",
+ __func__));
- return (0);
+ IF_ADDR_WLOCK(ifp);
+ ifp->if_carp = NULL;
+ if_rele(ifp);
+ IF_ADDR_WUNLOCK(ifp);
-cleanup:
- if (!sc->sc_naddrs6)
- carp_multicast6_cleanup(sc, 1);
- ifa_free(&ia->ia_ifa);
- return (error);
-}
+ CIF_LOCK_DESTROY(cif);
-static int
-carp_del_addr6(struct carp_softc *sc, struct sockaddr_in6 *sin6)
-{
- int error = 0;
+ ifpromisc(ifp, 0);
- if (!--sc->sc_naddrs6) {
- struct carp_if *cif = (struct carp_if *)sc->sc_carpdev->if_carp;
+ free(cif, M_CARP);
+}
- CARP_LOCK(cif);
- callout_stop(&sc->sc_ad_tmo);
- SC2IFP(sc)->if_flags &= ~IFF_UP;
- SC2IFP(sc)->if_drv_flags &= ~IFF_DRV_RUNNING;
- sc->sc_vhid = -1;
- carp_multicast6_cleanup(sc, 1);
- TAILQ_REMOVE(&cif->vhif_vrs, sc, sc_list);
- if (!--cif->vhif_nvrs) {
- CARP_LOCK_DESTROY(cif);
- sc->sc_carpdev->if_carp = NULL;
- free(cif, M_CARP);
- } else
- CARP_UNLOCK(cif);
- }
+static void
+carp_carprcp(struct carpreq *carpr, struct carp_softc *sc, int priv)
+{
- return (error);
+ CARP_LOCK(sc);
+ carpr->carpr_state = sc->sc_state;
+ carpr->carpr_vhid = sc->sc_vhid;
+ carpr->carpr_advbase = sc->sc_advbase;
+ carpr->carpr_advskew = sc->sc_advskew;
+ if (priv)
+ bcopy(sc->sc_key, carpr->carpr_key, sizeof(carpr->carpr_key));
+ else
+ bzero(carpr->carpr_key, sizeof(carpr->carpr_key));
+ CARP_UNLOCK(sc);
}
-#endif /* INET6 */
-static int
-carp_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr)
+int
+carp_ioctl(struct ifreq *ifr, u_long cmd, struct thread *td)
{
- struct carp_softc *sc = ifp->if_softc, *vr;
struct carpreq carpr;
- struct ifaddr *ifa;
- struct ifreq *ifr;
- struct ifaliasreq *ifra;
- int locked = 0, error = 0;
+ struct ifnet *ifp;
+ struct carp_softc *sc = NULL;
+ int error = 0, locked = 0;
- ifa = (struct ifaddr *)addr;
- ifra = (struct ifaliasreq *)addr;
- ifr = (struct ifreq *)addr;
+ if ((error = copyin(ifr->ifr_data, &carpr, sizeof carpr)))
+ return (error);
- switch (cmd) {
- case SIOCSIFADDR:
- switch (ifa->ifa_addr->sa_family) {
-#ifdef INET
- case AF_INET:
- SC2IFP(sc)->if_flags |= IFF_UP;
- bcopy(ifa->ifa_addr, ifa->ifa_dstaddr,
- sizeof(struct sockaddr));
- error = carp_set_addr(sc, satosin(ifa->ifa_addr));
- break;
-#endif /* INET */
-#ifdef INET6
- case AF_INET6:
- SC2IFP(sc)->if_flags |= IFF_UP;
- error = carp_set_addr6(sc, satosin6(ifa->ifa_addr));
- break;
-#endif /* INET6 */
- default:
- error = EAFNOSUPPORT;
- break;
- }
+ ifp = ifunit_ref(ifr->ifr_name);
+ if (ifp == NULL)
+ return (ENXIO);
+
+ switch (ifp->if_type) {
+ case IFT_ETHER:
+ case IFT_L2VLAN:
+ case IFT_FDDI:
+ case IFT_ISO88025:
break;
+ default:
+ error = EOPNOTSUPP;
+ goto out;
+ }
- case SIOCAIFADDR:
- switch (ifa->ifa_addr->sa_family) {
-#ifdef INET
- case AF_INET:
- SC2IFP(sc)->if_flags |= IFF_UP;
- bcopy(ifa->ifa_addr, ifa->ifa_dstaddr,
- sizeof(struct sockaddr));
- error = carp_set_addr(sc, satosin(&ifra->ifra_addr));
- break;
-#endif /* INET */
-#ifdef INET6
- case AF_INET6:
- SC2IFP(sc)->if_flags |= IFF_UP;
- error = carp_set_addr6(sc, satosin6(&ifra->ifra_addr));
+ if ((ifp->if_flags & IFF_MULTICAST) == 0) {
+ error = EADDRNOTAVAIL;
+ goto out;
+ }
+
+ switch (cmd) {
+ case SIOCSVH:
+ if ((error = priv_check(td, PRIV_NETINET_CARP)))
break;
-#endif /* INET6 */
- default:
- error = EAFNOSUPPORT;
+ if (carpr.carpr_vhid <= 0 || carpr.carpr_vhid > CARP_MAXVHID ||
+ carpr.carpr_advbase < 0 || carpr.carpr_advskew < 0) {
+ error = EINVAL;
break;
}
- break;
- case SIOCDIFADDR:
- switch (ifa->ifa_addr->sa_family) {
-#ifdef INET
- case AF_INET:
- error = carp_del_addr(sc, satosin(&ifra->ifra_addr));
- break;
-#endif /* INET */
-#ifdef INET6
- case AF_INET6:
- error = carp_del_addr6(sc, satosin6(&ifra->ifra_addr));
- break;
-#endif /* INET6 */
- default:
- error = EAFNOSUPPORT;
- break;
+ if (ifp->if_carp) {
+ CIF_LOCK(ifp->if_carp);
+ IFNET_FOREACH_CARP(ifp, sc)
+ if (sc->sc_vhid == carpr.carpr_vhid)
+ break;
+ CIF_UNLOCK(ifp->if_carp);
}
- break;
+ if (sc == NULL) {
+ sc = carp_alloc(ifp);
+ if (sc == NULL) {
+ error = EINVAL; /* XXX: ifpromisc failed */
+ break;
+ }
- case SIOCSIFFLAGS:
- if (sc->sc_carpdev) {
- locked = 1;
- CARP_SCLOCK(sc);
+ CARP_LOCK(sc);
+ sc->sc_vhid = carpr.carpr_vhid;
+ LLADDR(&sc->sc_addr)[0] = 0;
+ LLADDR(&sc->sc_addr)[1] = 0;
+ LLADDR(&sc->sc_addr)[2] = 0x5e;
+ LLADDR(&sc->sc_addr)[3] = 0;
+ LLADDR(&sc->sc_addr)[4] = 1;
+ LLADDR(&sc->sc_addr)[5] = sc->sc_vhid;
+ } else
+ CARP_LOCK(sc);
+ locked = 1;
+ if (carpr.carpr_advbase > 0) {
+ if (carpr.carpr_advbase > 255 ||
+ carpr.carpr_advbase < CARP_DFLTINTV) {
+ error = EINVAL;
+ break;
+ }
+ sc->sc_advbase = carpr.carpr_advbase;
}
- if (sc->sc_state != INIT && !(ifr->ifr_flags & IFF_UP)) {
- callout_stop(&sc->sc_ad_tmo);
- callout_stop(&sc->sc_md_tmo);
- callout_stop(&sc->sc_md6_tmo);
- if (sc->sc_state == MASTER)
- carp_send_ad_locked(sc);
- carp_set_state(sc, INIT);
- carp_setrun(sc, 0);
- } else if (sc->sc_state == INIT && (ifr->ifr_flags & IFF_UP)) {
- SC2IFP(sc)->if_flags |= IFF_UP;
- carp_setrun(sc, 0);
+ if (carpr.carpr_advskew > 0) {
+ if (carpr.carpr_advskew >= 255) {
+ error = EINVAL;
+ break;
+ }
+ sc->sc_advskew = carpr.carpr_advskew;
}
- break;
-
- case SIOCSVH:
- error = priv_check(curthread, PRIV_NETINET_CARP);
- if (error)
- break;
- if ((error = copyin(ifr->ifr_data, &carpr, sizeof carpr)))
- break;
- error = 1;
- if (sc->sc_carpdev) {
- locked = 1;
- CARP_SCLOCK(sc);
+ if (carpr.carpr_key[0] != '\0') {
+ bcopy(carpr.carpr_key, sc->sc_key, sizeof(sc->sc_key));
+ carp_hmac_prepare(sc);
}
- if (sc->sc_state != INIT && carpr.carpr_state != sc->sc_state) {
+ if (sc->sc_state != INIT &&
+ carpr.carpr_state != sc->sc_state) {
switch (carpr.carpr_state) {
case BACKUP:
callout_stop(&sc->sc_ad_tmo);
carp_set_state(sc, BACKUP);
carp_setrun(sc, 0);
- carp_setroute(sc, RTM_DELETE);
+ carp_delroute(sc);
break;
case MASTER:
carp_master_down_locked(sc);
@@ -2013,294 +1663,281 @@ carp_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr)
break;
}
}
- if (carpr.carpr_vhid > 0) {
- if (carpr.carpr_vhid > 255) {
- error = EINVAL;
- break;
- }
- if (sc->sc_carpdev) {
- struct carp_if *cif;
- cif = (struct carp_if *)sc->sc_carpdev->if_carp;
- TAILQ_FOREACH(vr, &cif->vhif_vrs, sc_list)
- if (vr != sc &&
- vr->sc_vhid == carpr.carpr_vhid) {
- error = EEXIST;
- break;
- }
- if (error == EEXIST)
- break;
- }
- sc->sc_vhid = carpr.carpr_vhid;
- IF_LLADDR(sc->sc_ifp)[0] = 0;
- IF_LLADDR(sc->sc_ifp)[1] = 0;
- IF_LLADDR(sc->sc_ifp)[2] = 0x5e;
- IF_LLADDR(sc->sc_ifp)[3] = 0;
- IF_LLADDR(sc->sc_ifp)[4] = 1;
- IF_LLADDR(sc->sc_ifp)[5] = sc->sc_vhid;
- error--;
+ break;
+
+ case SIOCGVH:
+ {
+ int priveleged;
+
+ if (carpr.carpr_vhid < 0 || carpr.carpr_vhid > CARP_MAXVHID) {
+ error = EINVAL;
+ break;
}
- if (carpr.carpr_advbase > 0 || carpr.carpr_advskew > 0) {
- if (carpr.carpr_advskew >= 255) {
- error = EINVAL;
+ if (carpr.carpr_count < 1) {
+ error = EMSGSIZE;
+ break;
+ }
+ if (ifp->if_carp == NULL) {
+ error = ENOENT;
+ break;
+ }
+
+ priveleged = (priv_check(td, PRIV_NETINET_CARP) == 0);
+ if (carpr.carpr_vhid != 0) {
+ CIF_LOCK(ifp->if_carp);
+ IFNET_FOREACH_CARP(ifp, sc)
+ if (sc->sc_vhid == carpr.carpr_vhid)
+ break;
+ CIF_UNLOCK(ifp->if_carp);
+ if (sc == NULL) {
+ error = ENOENT;
break;
}
- if (carpr.carpr_advbase > 255) {
- error = EINVAL;
+ carp_carprcp(&carpr, sc, priveleged);
+ error = copyout(&carpr, ifr->ifr_data, sizeof(carpr));
+ } else {
+ int i, count;
+
+ count = 0;
+ CIF_LOCK(ifp->if_carp);
+ IFNET_FOREACH_CARP(ifp, sc)
+ count++;
+
+ if (count > carpr.carpr_count) {
+ CIF_UNLOCK(ifp->if_carp);
+ error = EMSGSIZE;
break;
}
- sc->sc_advbase = carpr.carpr_advbase;
- sc->sc_advskew = carpr.carpr_advskew;
- error--;
- }
- bcopy(carpr.carpr_key, sc->sc_key, sizeof(sc->sc_key));
- if (error > 0)
- error = EINVAL;
- else {
- error = 0;
- carp_setrun(sc, 0);
- }
- break;
- case SIOCGVH:
- /* XXX: lockless read */
- bzero(&carpr, sizeof(carpr));
- carpr.carpr_state = sc->sc_state;
- carpr.carpr_vhid = sc->sc_vhid;
- carpr.carpr_advbase = sc->sc_advbase;
- carpr.carpr_advskew = sc->sc_advskew;
- error = priv_check(curthread, PRIV_NETINET_CARP);
- if (error == 0)
- bcopy(sc->sc_key, carpr.carpr_key,
- sizeof(carpr.carpr_key));
- error = copyout(&carpr, ifr->ifr_data, sizeof(carpr));
+ i = 0;
+ IFNET_FOREACH_CARP(ifp, sc) {
+ carp_carprcp(&carpr, sc, priveleged);
+ carpr.carpr_count = count;
+ error = copyout(&carpr, ifr->ifr_data +
+ (i * sizeof(carpr)), sizeof(carpr));
+ if (error) {
+ CIF_UNLOCK(ifp->if_carp);
+ break;
+ }
+ i++;
+ }
+ CIF_UNLOCK(ifp->if_carp);
+ }
break;
-
+ }
default:
error = EINVAL;
}
+out:
if (locked)
- CARP_SCUNLOCK(sc);
-
- carp_hmac_prepare(sc);
+ CARP_UNLOCK(sc);
+ if_rele(ifp);
return (error);
}
-/*
- * XXX: this is looutput. We should eventually use it from there.
- */
static int
-carp_looutput(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
- struct route *ro)
+carp_get_vhid(struct ifaddr *ifa)
{
- u_int32_t af;
- struct rtentry *rt = NULL;
-
- M_ASSERTPKTHDR(m); /* check if we have the packet header */
-
- if (ro != NULL)
- rt = ro->ro_rt;
- if (rt && rt->rt_flags & (RTF_REJECT|RTF_BLACKHOLE)) {
- m_freem(m);
- return (rt->rt_flags & RTF_BLACKHOLE ? 0 :
- rt->rt_flags & RTF_HOST ? EHOSTUNREACH : ENETUNREACH);
- }
-
- ifp->if_opackets++;
- ifp->if_obytes += m->m_pkthdr.len;
-
- /* BPF writes need to be handled specially. */
- if (dst->sa_family == AF_UNSPEC) {
- bcopy(dst->sa_data, &af, sizeof(af));
- dst->sa_family = af;
- }
-#if 1 /* XXX */
- switch (dst->sa_family) {
- case AF_INET:
- case AF_INET6:
- case AF_IPX:
- case AF_APPLETALK:
- break;
- default:
- printf("carp_looutput: af=%d unexpected\n", dst->sa_family);
- m_freem(m);
- return (EAFNOSUPPORT);
- }
-#endif
- return(if_simloop(ifp, m, dst->sa_family, 0));
-}
+ if (ifa == NULL || ifa->ifa_carp == NULL)
+ return (0);
-/*
- * Start output on carp interface. This function should never be called.
- */
-static void
-carp_start(struct ifnet *ifp)
-{
-#ifdef DEBUG
- printf("%s: start called\n", ifp->if_xname);
-#endif
+ return (ifa->ifa_carp->sc_vhid);
}
int
-carp_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *sa,
- struct rtentry *rt)
+carp_attach(struct ifaddr *ifa, int vhid)
{
- struct m_tag *mtag;
+ struct ifnet *ifp = ifa->ifa_ifp;
struct carp_softc *sc;
- struct ifnet *carp_ifp;
+ int index, error;
- if (!sa)
- return (0);
+ if (ifp->if_carp == NULL)
+ return (ENOPROTOOPT);
- switch (sa->sa_family) {
+ switch (ifa->ifa_addr->sa_family) {
#ifdef INET
case AF_INET:
- break;
-#endif /* INET */
+#endif
#ifdef INET6
case AF_INET6:
+#endif
break;
-#endif /* INET6 */
default:
- return (0);
+ return (EPROTOTYPE);
}
- mtag = m_tag_find(m, PACKET_TAG_CARP, NULL);
- if (mtag == NULL)
- return (0);
+ CIF_LOCK(ifp->if_carp);
+ IFNET_FOREACH_CARP(ifp, sc)
+ if (sc->sc_vhid == vhid)
+ break;
+ CIF_UNLOCK(ifp->if_carp);
+ if (sc == NULL)
+ return (ENOENT);
- bcopy(mtag + 1, &carp_ifp, sizeof(struct ifnet *));
- sc = carp_ifp->if_softc;
+ if (ifa->ifa_carp) {
+ if (ifa->ifa_carp->sc_vhid != vhid)
+ carp_detach(ifa);
+ else
+ return (0);
+ }
- /* Set the source MAC address to Virtual Router MAC Address */
- switch (ifp->if_type) {
- case IFT_ETHER:
- case IFT_L2VLAN: {
- struct ether_header *eh;
+ error = carp_multicast_setup(sc, ifa->ifa_addr->sa_family);
+ if (error)
+ return (error);
- eh = mtod(m, struct ether_header *);
- eh->ether_shost[0] = 0;
- eh->ether_shost[1] = 0;
- eh->ether_shost[2] = 0x5e;
- eh->ether_shost[3] = 0;
- eh->ether_shost[4] = 1;
- eh->ether_shost[5] = sc->sc_vhid;
+ CARP_LOCK(sc);
+ index = sc->sc_naddrs + sc->sc_naddrs6 + 1;
+ if (index > sc->sc_ifasiz / sizeof(struct ifaddr *))
+ if ((error = carp_grow_ifas(sc)) != 0) {
+ carp_multicast_cleanup(sc,
+ ifa->ifa_addr->sa_family);
+ CARP_UNLOCK(sc);
+ return (error);
}
- break;
- case IFT_FDDI: {
- struct fddi_header *fh;
- fh = mtod(m, struct fddi_header *);
- fh->fddi_shost[0] = 0;
- fh->fddi_shost[1] = 0;
- fh->fddi_shost[2] = 0x5e;
- fh->fddi_shost[3] = 0;
- fh->fddi_shost[4] = 1;
- fh->fddi_shost[5] = sc->sc_vhid;
- }
+ switch (ifa->ifa_addr->sa_family) {
+#ifdef INET
+ case AF_INET:
+ sc->sc_naddrs++;
break;
- case IFT_ISO88025: {
- struct iso88025_header *th;
- th = mtod(m, struct iso88025_header *);
- th->iso88025_shost[0] = 3;
- th->iso88025_shost[1] = 0;
- th->iso88025_shost[2] = 0x40 >> (sc->sc_vhid - 1);
- th->iso88025_shost[3] = 0x40000 >> (sc->sc_vhid - 1);
- th->iso88025_shost[4] = 0;
- th->iso88025_shost[5] = 0;
- }
+#endif
+#ifdef INET6
+ case AF_INET6:
+ sc->sc_naddrs6++;
break;
- default:
- printf("%s: carp is not supported for this interface type\n",
- ifp->if_xname);
- return (EOPNOTSUPP);
+#endif
}
+ ifa_ref(ifa);
+ sc->sc_ifas[index - 1] = ifa;
+ ifa->ifa_carp = sc;
+
+ carp_hmac_prepare(sc);
+ carp_sc_state(sc);
+
+ CARP_UNLOCK(sc);
+
return (0);
}
-static void
-carp_set_state(struct carp_softc *sc, int state)
+void
+carp_detach(struct ifaddr *ifa)
{
- int link_state;
+ struct carp_softc *sc = ifa->ifa_carp;
+ int i, index;
- if (sc->sc_carpdev)
- CARP_SCLOCK_ASSERT(sc);
+ KASSERT(sc != NULL, ("%s: %p not attached", __func__, ifa));
- if (sc->sc_state == state)
- return;
+ CARP_LOCK(sc);
- sc->sc_state = state;
- switch (state) {
- case BACKUP:
- link_state = LINK_STATE_DOWN;
- break;
- case MASTER:
- link_state = LINK_STATE_UP;
+ /* Shift array. */
+ index = sc->sc_naddrs + sc->sc_naddrs6;
+ for (i = 0; i < index; i++)
+ if (sc->sc_ifas[i] == ifa)
+ break;
+ KASSERT(i < index, ("%s: %p no backref", __func__, ifa));
+ for (; i < index - 1; i++)
+ sc->sc_ifas[i] = sc->sc_ifas[i+1];
+ sc->sc_ifas[index - 1] = NULL;
+
+ switch (ifa->ifa_addr->sa_family) {
+#ifdef INET
+ case AF_INET:
+ sc->sc_naddrs--;
break;
- default:
- link_state = LINK_STATE_UNKNOWN;
+#endif
+#ifdef INET6
+ case AF_INET6:
+ sc->sc_naddrs6--;
break;
+#endif
}
- if_link_state_change(SC2IFP(sc), link_state);
+
+ carp_multicast_cleanup(sc, ifa->ifa_addr->sa_family);
+
+ ifa->ifa_carp = NULL;
+ ifa_free(ifa);
+
+ carp_hmac_prepare(sc);
+ carp_sc_state(sc);
+
+ if (sc->sc_naddrs == 0 && sc->sc_naddrs6 == 0) {
+ CARP_UNLOCK(sc);
+ carp_destroy(sc);
+ } else
+ CARP_UNLOCK(sc);
}
-void
-carp_carpdev_state(struct ifnet *ifp)
+static void
+carp_set_state(struct carp_softc *sc, int state)
{
- struct carp_if *cif;
- cif = ifp->if_carp;
- CARP_LOCK(cif);
- carp_carpdev_state_locked(cif);
- CARP_UNLOCK(cif);
+ CARP_LOCK_ASSERT(sc);
+
+ if (sc->sc_state != state) {
+ const char *carp_states[] = { CARP_STATES };
+ char subsys[IFNAMSIZ+5];
+
+ sc->sc_state = state;
+
+ snprintf(subsys, IFNAMSIZ+5, "%u@%s", sc->sc_vhid,
+ sc->sc_carpdev->if_xname);
+ devctl_notify("CARP", subsys, carp_states[state], NULL);
+ }
}
static void
-carp_carpdev_state_locked(struct carp_if *cif)
+carp_linkstate(struct ifnet *ifp)
{
struct carp_softc *sc;
- TAILQ_FOREACH(sc, &cif->vhif_vrs, sc_list)
- carp_sc_state_locked(sc);
+ CIF_LOCK(ifp->if_carp);
+ IFNET_FOREACH_CARP(ifp, sc) {
+ CARP_LOCK(sc);
+ carp_sc_state(sc);
+ CARP_UNLOCK(sc);
+ }
+ CIF_UNLOCK(ifp->if_carp);
}
static void
-carp_sc_state_locked(struct carp_softc *sc)
+carp_sc_state(struct carp_softc *sc)
{
- CARP_SCLOCK_ASSERT(sc);
+
+ CARP_LOCK_ASSERT(sc);
if (sc->sc_carpdev->if_link_state != LINK_STATE_UP ||
!(sc->sc_carpdev->if_flags & IFF_UP)) {
- sc->sc_flags_backup = SC2IFP(sc)->if_flags;
- SC2IFP(sc)->if_flags &= ~IFF_UP;
- SC2IFP(sc)->if_drv_flags &= ~IFF_DRV_RUNNING;
callout_stop(&sc->sc_ad_tmo);
+#ifdef INET
callout_stop(&sc->sc_md_tmo);
+#endif
+#ifdef INET6
callout_stop(&sc->sc_md6_tmo);
+#endif
carp_set_state(sc, INIT);
carp_setrun(sc, 0);
- if (!sc->sc_suppress) {
- carp_suppress_preempt++;
- if (carp_suppress_preempt == 1) {
- CARP_SCUNLOCK(sc);
- carp_send_ad_all();
- CARP_SCLOCK(sc);
- }
- }
+ if (!sc->sc_suppress)
+ carp_demote_adj(carp_ifdown_adj, "interface down");
sc->sc_suppress = 1;
} else {
- SC2IFP(sc)->if_flags |= sc->sc_flags_backup;
carp_set_state(sc, INIT);
carp_setrun(sc, 0);
if (sc->sc_suppress)
- carp_suppress_preempt--;
+ carp_demote_adj(-carp_ifdown_adj, "interface up");
sc->sc_suppress = 0;
}
+}
- return;
+static void
+carp_demote_adj(int adj, char *reason)
+{
+ carp_demotion += adj;
+ CARP_LOG("demoted by %d to %d (%s)\n", adj, carp_demotion, reason);
+ taskqueue_enqueue(taskqueue_swi, &carp_sendall_task);
}
#ifdef INET
@@ -2335,10 +1972,6 @@ static void
carp_mod_cleanup(void)
{
- if (if_detach_event_tag == NULL)
- return;
- EVENTHANDLER_DEREGISTER(ifnet_departure_event, if_detach_event_tag);
- if_clone_detach(&carp_cloner);
#ifdef INET
if (proto_reg[CARP_INET] == 0) {
(void)ipproto_unregister(IPPROTO_CARP);
@@ -2356,9 +1989,16 @@ carp_mod_cleanup(void)
carp_iamatch6_p = NULL;
carp_macmatch6_p = NULL;
#endif
+ carp_ioctl_p = NULL;
+ carp_attach_p = NULL;
+ carp_detach_p = NULL;
+ carp_get_vhid_p = NULL;
carp_linkstate_p = NULL;
carp_forus_p = NULL;
carp_output_p = NULL;
+ carp_demote_adj_p = NULL;
+ mtx_unlock(&carp_mtx);
+ taskqueue_drain(taskqueue_swi, &carp_sendall_task);
mtx_destroy(&carp_mtx);
}
@@ -2367,22 +2007,22 @@ carp_mod_load(void)
{
int err;
- if_detach_event_tag = EVENTHANDLER_REGISTER(ifnet_departure_event,
- carp_ifdetach, NULL, EVENTHANDLER_PRI_ANY);
- if (if_detach_event_tag == NULL)
- return (ENOMEM);
mtx_init(&carp_mtx, "carp_mtx", NULL, MTX_DEF);
- LIST_INIT(&carpif_list);
- if_clone_attach(&carp_cloner);
- carp_linkstate_p = carp_carpdev_state;
+ LIST_INIT(&carp_list);
+ carp_get_vhid_p = carp_get_vhid;
carp_forus_p = carp_forus;
carp_output_p = carp_output;
+ carp_linkstate_p = carp_linkstate;
+ carp_ioctl_p = carp_ioctl;
+ carp_attach_p = carp_attach;
+ carp_detach_p = carp_detach;
+ carp_demote_adj_p = carp_demote_adj;
#ifdef INET6
carp_iamatch6_p = carp_iamatch6;
carp_macmatch6_p = carp_macmatch6;
proto_reg[CARP_INET6] = pf_proto_register(PF_INET6,
(struct protosw *)&in6_carp_protosw);
- if (proto_reg[CARP_INET6] != 0) {
+ if (proto_reg[CARP_INET6]) {
printf("carp: error %d attaching to PF_INET6\n",
proto_reg[CARP_INET6]);
carp_mod_cleanup();
@@ -2398,7 +2038,7 @@ carp_mod_load(void)
#ifdef INET
carp_iamatch_p = carp_iamatch;
proto_reg[CARP_INET] = pf_proto_register(PF_INET, &in_carp_protosw);
- if (proto_reg[CARP_INET] != 0) {
+ if (proto_reg[CARP_INET]) {
printf("carp: error %d attaching to PF_INET\n",
proto_reg[CARP_INET]);
carp_mod_cleanup();
@@ -2411,7 +2051,7 @@ carp_mod_load(void)
return (err);
}
#endif
- return 0;
+ return (0);
}
static int
@@ -2422,17 +2062,13 @@ carp_modevent(module_t mod, int type, void *data)
return carp_mod_load();
/* NOTREACHED */
case MOD_UNLOAD:
- /*
- * XXX: For now, disallow module unloading by default due to
- * a race condition where a thread may dereference one of the
- * function pointer hooks after the module has been
- * unloaded, during processing of a packet, causing a panic.
- */
-#ifdef CARPMOD_CAN_UNLOAD
- carp_mod_cleanup();
-#else
- return (EBUSY);
-#endif
+ mtx_lock(&carp_mtx);
+ if (LIST_EMPTY(&carp_list))
+ carp_mod_cleanup();
+ else {
+ mtx_unlock(&carp_mtx);
+ return (EBUSY);
+ }
break;
default:
diff --git a/sys/netinet/ip_carp.h b/sys/netinet/ip_carp.h
index 2f2b4f2..7be91c0 100644
--- a/sys/netinet/ip_carp.h
+++ b/sys/netinet/ip_carp.h
@@ -126,60 +126,50 @@ struct carpstats {
* Configuration structure for SIOCSVH SIOCGVH
*/
struct carpreq {
+ int carpr_count;
+ int carpr_vhid;
+#define CARP_MAXVHID 255
int carpr_state;
#define CARP_STATES "INIT", "BACKUP", "MASTER"
#define CARP_MAXSTATE 2
- int carpr_vhid;
int carpr_advskew;
+#define CARP_MAXSKEW 240
int carpr_advbase;
unsigned char carpr_key[CARP_KEY_LEN];
};
#define SIOCSVH _IOWR('i', 245, struct ifreq)
#define SIOCGVH _IOWR('i', 246, struct ifreq)
-/*
- * Names for CARP sysctl objects
- */
-#define CARPCTL_ALLOW 1 /* accept incoming CARP packets */
-#define CARPCTL_PREEMPT 2 /* high-pri backup preemption mode */
-#define CARPCTL_LOG 3 /* log bad packets */
-#define CARPCTL_STATS 4 /* statistics (read-only) */
-#define CARPCTL_ARPBALANCE 5 /* balance arp responses */
-#define CARPCTL_MAXID 6
-
-#define CARPCTL_NAMES { \
- { 0, 0 }, \
- { "allow", CTLTYPE_INT }, \
- { "preempt", CTLTYPE_INT }, \
- { "log", CTLTYPE_INT }, \
- { "stats", CTLTYPE_STRUCT }, \
- { "arpbalance", CTLTYPE_INT }, \
-}
-
#ifdef _KERNEL
-void carp_carpdev_state(struct ifnet *);
-void carp_input (struct mbuf *, int);
-int carp6_input (struct mbuf **, int *, int);
-int carp_output (struct ifnet *, struct mbuf *, struct sockaddr *,
- struct rtentry *);
-int carp_iamatch (struct ifnet *, struct in_ifaddr *, struct in_addr *,
- u_int8_t **);
+int carp_ioctl(struct ifreq *, u_long, struct thread *);
+int carp_attach(struct ifaddr *, int);
+void carp_detach(struct ifaddr *);
+void carp_carpdev_state(struct ifnet *);
+void carp_input (struct mbuf *, int);
+int carp6_input (struct mbuf **, int *, int);
+int carp_output (struct ifnet *, struct mbuf *, struct sockaddr *);
+int carp_iamatch(struct ifaddr *, uint8_t **);
struct ifaddr *carp_iamatch6(struct ifnet *, struct in6_addr *);
caddr_t carp_macmatch6(struct ifnet *, struct mbuf *, const struct in6_addr *);
-struct ifnet *carp_forus (struct ifnet *, u_char *);
+int carp_forus(struct ifnet *, u_char *);
/* These are external networking stack hooks for CARP */
/* net/if.c */
+extern int (*carp_ioctl_p)(struct ifreq *, u_long, struct thread *);
+extern int (*carp_attach_p)(struct ifaddr *, int);
+extern void (*carp_detach_p)(struct ifaddr *);
extern void (*carp_linkstate_p)(struct ifnet *);
+extern void (*carp_demote_adj_p)(int, char *);
/* net/if_bridge.c net/if_ethersubr.c */
-extern struct ifnet *(*carp_forus_p)(struct ifnet *, u_char *);
+extern int (*carp_forus_p)(struct ifnet *, u_char *);
/* net/if_ethersubr.c */
extern int (*carp_output_p)(struct ifnet *, struct mbuf *,
- struct sockaddr *, struct rtentry *);
+ struct sockaddr *);
+/* net/rtsock.c */
+extern int (*carp_get_vhid_p)(struct ifaddr *);
#ifdef INET
/* netinet/if_ether.c */
-extern int (*carp_iamatch_p)(struct ifnet *, struct in_ifaddr *,
- struct in_addr *, u_int8_t **);
+extern int (*carp_iamatch_p)(struct ifaddr *, uint8_t **);
#endif
#ifdef INET6
/* netinet6/nd6_nbr.c */
diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c
index 5892c9d..b366a65 100644
--- a/sys/netinet/ip_divert.c
+++ b/sys/netinet/ip_divert.c
@@ -30,14 +30,12 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#if !defined(KLD_MODULE)
#include "opt_inet.h"
+#include "opt_inet6.h"
#include "opt_sctp.h"
#ifndef INET
-#error "IPDIVERT requires INET."
-#endif
+#error "IPDIVERT requires INET"
#endif
-#include "opt_inet6.h"
#include <sys/param.h>
#include <sys/kernel.h>
diff --git a/sys/netinet/ip_gre.c b/sys/netinet/ip_gre.c
index ae85e9f..d0274de 100644
--- a/sys/netinet/ip_gre.c
+++ b/sys/netinet/ip_gre.c
@@ -70,7 +70,7 @@ __FBSDID("$FreeBSD$");
#include <netinet/ip_gre.h>
#include <machine/in_cksum.h>
#else
-#error ip_gre input without IP?
+#error "ip_gre requires INET"
#endif
#ifdef NETATALK
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c
index ec8a2f0..55c28b2 100644
--- a/sys/netinet/ip_icmp.c
+++ b/sys/netinet/ip_icmp.c
@@ -89,7 +89,7 @@ static VNET_DEFINE(int, icmplim_output) = 1;
#define V_icmplim_output VNET(icmplim_output)
SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, icmplim_output, CTLFLAG_RW,
&VNET_NAME(icmplim_output), 0,
- "Enable rate limiting of ICMP responses");
+ "Enable logging of ICMP response rate limiting");
#ifdef INET
VNET_DEFINE(struct icmpstat, icmpstat);
@@ -703,7 +703,7 @@ icmp_reflect(struct mbuf *m)
*/
ifp = m->m_pkthdr.rcvif;
if (ifp != NULL && ifp->if_flags & IFF_BROADCAST) {
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
if (ifa->ifa_addr->sa_family != AF_INET)
continue;
@@ -711,11 +711,11 @@ icmp_reflect(struct mbuf *m)
if (satosin(&ia->ia_broadaddr)->sin_addr.s_addr ==
t.s_addr) {
t = IA_SIN(ia)->sin_addr;
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
goto match;
}
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
}
/*
* If the packet was transiting through us, use the address of
@@ -724,16 +724,16 @@ icmp_reflect(struct mbuf *m)
* criteria apply.
*/
if (V_icmp_rfi && ifp != NULL) {
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
if (ifa->ifa_addr->sa_family != AF_INET)
continue;
ia = ifatoia(ifa);
t = IA_SIN(ia)->sin_addr;
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
goto match;
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
}
/*
* If the incoming packet was not addressed directly to us, use
@@ -742,16 +742,16 @@ icmp_reflect(struct mbuf *m)
* with normal source selection.
*/
if (V_reply_src[0] != '\0' && (ifp = ifunit(V_reply_src))) {
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
if (ifa->ifa_addr->sa_family != AF_INET)
continue;
ia = ifatoia(ifa);
t = IA_SIN(ia)->sin_addr;
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
goto match;
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
}
/*
* If the packet was transiting through us, use the address of
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index 0664acc..728b50b 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -611,7 +611,7 @@ passin:
* into the stack for SIMPLEX interfaces handled by ether_output().
*/
if (ifp != NULL && ifp->if_flags & IFF_BROADCAST) {
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
if (ifa->ifa_addr->sa_family != AF_INET)
continue;
@@ -619,18 +619,18 @@ passin:
if (satosin(&ia->ia_broadaddr)->sin_addr.s_addr ==
ip->ip_dst.s_addr) {
ifa_ref(ifa);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
goto ours;
}
#ifdef BOOTP_COMPAT
if (IA_SIN(ia)->sin_addr.s_addr == INADDR_ANY) {
ifa_ref(ifa);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
goto ours;
}
#endif
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
ia = NULL;
}
/* RFC 3927 2.7: Do not forward datagrams for 169.254.0.0/16. */
diff --git a/sys/netinet/ip_ipsec.c b/sys/netinet/ip_ipsec.c
index a3c87f5..389b74e 100644
--- a/sys/netinet/ip_ipsec.c
+++ b/sys/netinet/ip_ipsec.c
@@ -92,7 +92,7 @@ SYSCTL_VNET_INT(_net_inet_ipsec, OID_AUTO, filtertunnel,
int
ip_ipsec_filtertunnel(struct mbuf *m)
{
-#if defined(IPSEC)
+#ifdef IPSEC
/*
* Bypass packet filtering for packets previously handled by IPsec.
diff --git a/sys/netinet/ip_var.h b/sys/netinet/ip_var.h
index cd30093..0ebcea5 100644
--- a/sys/netinet/ip_var.h
+++ b/sys/netinet/ip_var.h
@@ -93,6 +93,7 @@ struct ip_moptions {
u_short imo_max_memberships; /* max memberships this socket */
struct in_multi **imo_membership; /* group memberships */
struct in_mfilter *imo_mfilters; /* source filters */
+ STAILQ_ENTRY(ip_moptions) imo_link;
};
struct ipstat {
diff --git a/sys/netinet/ipfw/ip_fw2.c b/sys/netinet/ipfw/ip_fw2.c
index eec67cc..12a7fb9 100644
--- a/sys/netinet/ipfw/ip_fw2.c
+++ b/sys/netinet/ipfw/ip_fw2.c
@@ -34,7 +34,7 @@ __FBSDID("$FreeBSD$");
#include "opt_ipdivert.h"
#include "opt_inet.h"
#ifndef INET
-#error IPFIREWALL requires INET.
+#error "IPFIREWALL requires INET"
#endif /* INET */
#include "opt_inet6.h"
#include "opt_ipsec.h"
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c
index dc7d965..d2b841a 100644
--- a/sys/netinet/raw_ip.c
+++ b/sys/netinet/raw_ip.c
@@ -544,6 +544,8 @@ rip_output(struct mbuf *m, struct socket *so, u_long dst)
*
* When adding new socket options here, make sure to add access control
* checks here as necessary.
+ *
+ * XXX-BZ inp locking?
*/
int
rip_ctloutput(struct socket *so, struct sockopt *sopt)
diff --git a/sys/netinet/sctp.h b/sys/netinet/sctp.h
index 5ad5f85..192a79b 100644
--- a/sys/netinet/sctp.h
+++ b/sys/netinet/sctp.h
@@ -7,11 +7,11 @@
* modification, are permitted provided that the following conditions are met:
*
* a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
*
* b) 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.
+ * the documentation and/or other materials provided with the distribution.
*
* c) Neither the name of Cisco Systems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
diff --git a/sys/netinet/sctp_asconf.c b/sys/netinet/sctp_asconf.c
index b4985aa..ec030d5 100644
--- a/sys/netinet/sctp_asconf.c
+++ b/sys/netinet/sctp_asconf.c
@@ -7,11 +7,11 @@
* modification, are permitted provided that the following conditions are met:
*
* a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
*
* b) 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.
+ * the documentation and/or other materials provided with the distribution.
*
* c) Neither the name of Cisco Systems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
@@ -138,7 +138,7 @@ sctp_asconf_success_response(uint32_t id)
if (m_reply == NULL) {
SCTPDBG(SCTP_DEBUG_ASCONF1,
"asconf_success_response: couldn't get mbuf!\n");
- return NULL;
+ return (NULL);
}
aph = mtod(m_reply, struct sctp_asconf_paramhdr *);
aph->correlation_id = id;
@@ -147,7 +147,7 @@ sctp_asconf_success_response(uint32_t id)
SCTP_BUF_LEN(m_reply) = aph->ph.param_length;
aph->ph.param_length = htons(aph->ph.param_length);
- return m_reply;
+ return (m_reply);
}
static struct mbuf *
@@ -166,7 +166,7 @@ sctp_asconf_error_response(uint32_t id, uint16_t cause, uint8_t * error_tlv,
if (m_reply == NULL) {
SCTPDBG(SCTP_DEBUG_ASCONF1,
"asconf_error_response: couldn't get mbuf!\n");
- return NULL;
+ return (NULL);
}
aph = mtod(m_reply, struct sctp_asconf_paramhdr *);
error = (struct sctp_error_cause *)(aph + 1);
@@ -183,7 +183,7 @@ sctp_asconf_error_response(uint32_t id, uint16_t cause, uint8_t * error_tlv,
"asconf_error_response: tlv_length (%xh) too big\n",
tlv_length);
sctp_m_freem(m_reply); /* discard */
- return NULL;
+ return (NULL);
}
if (error_tlv != NULL) {
tlv = (uint8_t *) (error + 1);
@@ -193,7 +193,7 @@ sctp_asconf_error_response(uint32_t id, uint16_t cause, uint8_t * error_tlv,
error->length = htons(error->length);
aph->ph.param_length = htons(aph->ph.param_length);
- return m_reply;
+ return (m_reply);
}
static struct mbuf *
@@ -231,7 +231,7 @@ sctp_process_asconf_add_ip(struct mbuf *m, struct sctp_asconf_paramhdr *aph,
case SCTP_IPV4_ADDRESS:
if (param_length != sizeof(struct sctp_ipv4addr_param)) {
/* invalid param size */
- return NULL;
+ return (NULL);
}
v4addr = (struct sctp_ipv4addr_param *)ph;
sin = (struct sockaddr_in *)&sa_store;
@@ -254,7 +254,7 @@ sctp_process_asconf_add_ip(struct mbuf *m, struct sctp_asconf_paramhdr *aph,
case SCTP_IPV6_ADDRESS:
if (param_length != sizeof(struct sctp_ipv6addr_param)) {
/* invalid param size */
- return NULL;
+ return (NULL);
}
v6addr = (struct sctp_ipv6addr_param *)ph;
sin6 = (struct sockaddr_in6 *)&sa_store;
@@ -277,7 +277,7 @@ sctp_process_asconf_add_ip(struct mbuf *m, struct sctp_asconf_paramhdr *aph,
m_reply = sctp_asconf_error_response(aph->correlation_id,
SCTP_CAUSE_INVALID_PARAM, (uint8_t *) aph,
aparam_length);
- return m_reply;
+ return (m_reply);
} /* end switch */
/* if 0.0.0.0/::0, add the source address instead */
@@ -314,7 +314,7 @@ sctp_process_asconf_add_ip(struct mbuf *m, struct sctp_asconf_paramhdr *aph,
sctp_send_hb(stcb, net, SCTP_SO_NOT_LOCKED);
}
}
- return m_reply;
+ return (m_reply);
}
static int
@@ -326,7 +326,7 @@ sctp_asconf_del_remote_addrs_except(struct sctp_tcb *stcb, struct sockaddr *src)
src_net = sctp_findnet(stcb, src);
if (src_net == NULL) {
/* not found */
- return -1;
+ return (-1);
}
/* delete all destination addresses except the source */
TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
@@ -342,7 +342,7 @@ sctp_asconf_del_remote_addrs_except(struct sctp_tcb *stcb, struct sockaddr *src)
(struct sockaddr *)&net->ro._l_addr, SCTP_SO_NOT_LOCKED);
}
}
- return 0;
+ return (0);
}
static struct mbuf *
@@ -382,7 +382,7 @@ sctp_process_asconf_delete_ip(struct mbuf *m, struct sctp_asconf_paramhdr *aph,
case SCTP_IPV4_ADDRESS:
if (param_length != sizeof(struct sctp_ipv4addr_param)) {
/* invalid param size */
- return NULL;
+ return (NULL);
}
v4addr = (struct sctp_ipv4addr_param *)ph;
sin = (struct sockaddr_in *)&sa_store;
@@ -402,7 +402,7 @@ sctp_process_asconf_delete_ip(struct mbuf *m, struct sctp_asconf_paramhdr *aph,
case SCTP_IPV6_ADDRESS:
if (param_length != sizeof(struct sctp_ipv6addr_param)) {
/* invalid param size */
- return NULL;
+ return (NULL);
}
v6addr = (struct sctp_ipv6addr_param *)ph;
sin6 = (struct sockaddr_in6 *)&sa_store;
@@ -423,7 +423,7 @@ sctp_process_asconf_delete_ip(struct mbuf *m, struct sctp_asconf_paramhdr *aph,
m_reply = sctp_asconf_error_response(aph->correlation_id,
SCTP_CAUSE_UNRESOLVABLE_ADDR, (uint8_t *) aph,
aparam_length);
- return m_reply;
+ return (m_reply);
}
/* make sure the source address is not being deleted */
@@ -433,7 +433,7 @@ sctp_process_asconf_delete_ip(struct mbuf *m, struct sctp_asconf_paramhdr *aph,
m_reply = sctp_asconf_error_response(aph->correlation_id,
SCTP_CAUSE_DELETING_SRC_ADDR, (uint8_t *) aph,
aparam_length);
- return m_reply;
+ return (m_reply);
}
/* if deleting 0.0.0.0/::0, delete all addresses except src addr */
if (zero_address && SCTP_BASE_SYSCTL(sctp_nat_friendly)) {
@@ -452,7 +452,7 @@ sctp_process_asconf_delete_ip(struct mbuf *m, struct sctp_asconf_paramhdr *aph,
m_reply =
sctp_asconf_success_response(aph->correlation_id);
}
- return m_reply;
+ return (m_reply);
}
/* delete the address */
result = sctp_del_remote_addr(stcb, sa);
@@ -474,7 +474,7 @@ sctp_process_asconf_delete_ip(struct mbuf *m, struct sctp_asconf_paramhdr *aph,
/* notify upper layer */
sctp_ulp_notify(SCTP_NOTIFY_ASCONF_DELETE_IP, stcb, 0, sa, SCTP_SO_NOT_LOCKED);
}
- return m_reply;
+ return (m_reply);
}
static struct mbuf *
@@ -511,7 +511,7 @@ sctp_process_asconf_set_primary(struct mbuf *m,
case SCTP_IPV4_ADDRESS:
if (param_length != sizeof(struct sctp_ipv4addr_param)) {
/* invalid param size */
- return NULL;
+ return (NULL);
}
v4addr = (struct sctp_ipv4addr_param *)ph;
sin = (struct sockaddr_in *)&sa_store;
@@ -529,7 +529,7 @@ sctp_process_asconf_set_primary(struct mbuf *m,
case SCTP_IPV6_ADDRESS:
if (param_length != sizeof(struct sctp_ipv6addr_param)) {
/* invalid param size */
- return NULL;
+ return (NULL);
}
v6addr = (struct sctp_ipv6addr_param *)ph;
sin6 = (struct sockaddr_in6 *)&sa_store;
@@ -548,7 +548,7 @@ sctp_process_asconf_set_primary(struct mbuf *m,
m_reply = sctp_asconf_error_response(aph->correlation_id,
SCTP_CAUSE_UNRESOLVABLE_ADDR, (uint8_t *) aph,
aparam_length);
- return m_reply;
+ return (m_reply);
}
/* if 0.0.0.0/::0, use the source address instead */
@@ -620,7 +620,7 @@ sctp_process_asconf_set_primary(struct mbuf *m,
aparam_length);
}
- return m_reply;
+ return (m_reply);
}
/*
@@ -1261,8 +1261,7 @@ sctp_path_check_and_react(struct sctp_tcb *stcb, struct sctp_ifa *newifa)
* flag: 1=success, 0=failure.
*/
static void
-sctp_asconf_addr_mgmt_ack(struct sctp_tcb *stcb, struct sctp_ifa *addr,
- uint16_t type, uint32_t flag)
+sctp_asconf_addr_mgmt_ack(struct sctp_tcb *stcb, struct sctp_ifa *addr, uint32_t flag)
{
/*
* do the necessary asoc list work- if we get a failure indication,
@@ -1712,7 +1711,7 @@ sctp_asconf_process_param_ack(struct sctp_tcb *stcb,
case SCTP_ADD_IP_ADDRESS:
SCTPDBG(SCTP_DEBUG_ASCONF1,
"process_param_ack: added IP address\n");
- sctp_asconf_addr_mgmt_ack(stcb, aparam->ifa, param_type, flag);
+ sctp_asconf_addr_mgmt_ack(stcb, aparam->ifa, flag);
break;
case SCTP_DEL_IP_ADDRESS:
SCTPDBG(SCTP_DEBUG_ASCONF1,
@@ -2102,7 +2101,7 @@ sctp_addr_mgmt_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
int
-sctp_asconf_iterator_ep(struct sctp_inpcb *inp, void *ptr, uint32_t val)
+sctp_asconf_iterator_ep(struct sctp_inpcb *inp, void *ptr, uint32_t val SCTP_UNUSED)
{
struct sctp_asconf_iterator *asc;
struct sctp_ifa *ifa;
@@ -2150,7 +2149,7 @@ sctp_asconf_iterator_ep(struct sctp_inpcb *inp, void *ptr, uint32_t val)
}
static int
-sctp_asconf_iterator_ep_end(struct sctp_inpcb *inp, void *ptr, uint32_t val)
+sctp_asconf_iterator_ep_end(struct sctp_inpcb *inp, void *ptr, uint32_t val SCTP_UNUSED)
{
struct sctp_ifa *ifa;
struct sctp_asconf_iterator *asc;
@@ -2182,7 +2181,7 @@ sctp_asconf_iterator_ep_end(struct sctp_inpcb *inp, void *ptr, uint32_t val)
void
sctp_asconf_iterator_stcb(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
- void *ptr, uint32_t val)
+ void *ptr, uint32_t val SCTP_UNUSED)
{
struct sctp_asconf_iterator *asc;
struct sctp_ifa *ifa;
@@ -2350,7 +2349,7 @@ sctp_asconf_iterator_stcb(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
}
void
-sctp_asconf_iterator_end(void *ptr, uint32_t val)
+sctp_asconf_iterator_end(void *ptr, uint32_t val SCTP_UNUSED)
{
struct sctp_asconf_iterator *asc;
struct sctp_ifa *ifa;
@@ -2531,9 +2530,9 @@ sctp_is_addr_pending(struct sctp_tcb *stcb, struct sctp_ifa *sctp_ifa)
*/
if (add_cnt > del_cnt ||
(add_cnt == del_cnt && last_param_type == SCTP_ADD_IP_ADDRESS)) {
- return 1;
+ return (1);
}
- return 0;
+ return (0);
}
static struct sockaddr *
@@ -3009,8 +3008,7 @@ next_addr:
* 1 if found, 0 if not
*/
static uint32_t
-sctp_addr_in_initack(struct sctp_tcb *stcb, struct mbuf *m, uint32_t offset,
- uint32_t length, struct sockaddr *sa)
+sctp_addr_in_initack(struct mbuf *m, uint32_t offset, uint32_t length, struct sockaddr *sa)
{
struct sctp_paramhdr tmp_param, *ph;
uint16_t plen, ptype;
@@ -3155,8 +3153,7 @@ sctp_check_address_list_ep(struct sctp_tcb *stcb, struct mbuf *m, int offset,
continue;
}
/* check to see if in the init-ack */
- if (!sctp_addr_in_initack(stcb, m, offset, length,
- &laddr->ifa->address.sa)) {
+ if (!sctp_addr_in_initack(m, offset, length, &laddr->ifa->address.sa)) {
/* try to add it */
sctp_addr_mgmt_assoc(stcb->sctp_ep, stcb, laddr->ifa,
SCTP_ADD_IP_ADDRESS, SCTP_ADDR_NOT_LOCKED);
@@ -3179,6 +3176,15 @@ sctp_check_address_list_all(struct sctp_tcb *stcb, struct mbuf *m, int offset,
struct sctp_ifa *sctp_ifa;
uint32_t vrf_id;
+#ifdef INET
+ struct sockaddr_in *sin;
+
+#endif
+#ifdef INET6
+ struct sockaddr_in6 *sin6;
+
+#endif
+
if (stcb) {
vrf_id = stcb->asoc.vrf_id;
} else {
@@ -3202,9 +3208,35 @@ sctp_check_address_list_all(struct sctp_tcb *stcb, struct mbuf *m, int offset,
if (sctp_cmpaddr(&sctp_ifa->address.sa, init_addr)) {
continue;
}
+ switch (sctp_ifa->address.sa.sa_family) {
+#ifdef INET
+ case AF_INET:
+ sin = (struct sockaddr_in *)&sctp_ifa->address.sin;
+ if ((ipv4_scope == 0) &&
+ (IN4_ISPRIVATE_ADDRESS(&sin->sin_addr))) {
+ /* private address not in scope */
+ continue;
+ }
+ break;
+#endif
+#ifdef INET6
+ case AF_INET6:
+ sin6 = (struct sockaddr_in6 *)&sctp_ifa->address.sin6;
+ if ((local_scope == 0) &&
+ (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr))) {
+ continue;
+ }
+ if ((site_scope == 0) &&
+ (IN6_IS_ADDR_SITELOCAL(&sin6->sin6_addr))) {
+ continue;
+ }
+ break;
+#endif
+ default:
+ break;
+ }
/* check to see if in the init-ack */
- if (!sctp_addr_in_initack(stcb, m, offset, length,
- &sctp_ifa->address.sa)) {
+ if (!sctp_addr_in_initack(m, offset, length, &sctp_ifa->address.sa)) {
/* try to add it */
sctp_addr_mgmt_assoc(stcb->sctp_ep, stcb,
sctp_ifa, SCTP_ADD_IP_ADDRESS,
diff --git a/sys/netinet/sctp_asconf.h b/sys/netinet/sctp_asconf.h
index 25c895e..1b9ac86 100644
--- a/sys/netinet/sctp_asconf.h
+++ b/sys/netinet/sctp_asconf.h
@@ -7,11 +7,11 @@
* modification, are permitted provided that the following conditions are met:
*
* a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
*
* b) 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.
+ * the documentation and/or other materials provided with the distribution.
*
* c) Neither the name of Cisco Systems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
diff --git a/sys/netinet/sctp_auth.c b/sys/netinet/sctp_auth.c
index b68c840..b5bae4d 100644
--- a/sys/netinet/sctp_auth.c
+++ b/sys/netinet/sctp_auth.c
@@ -7,11 +7,11 @@
* modification, are permitted provided that the following conditions are met:
*
* a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
*
* b) 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.
+ * the documentation and/or other materials provided with the distribution.
*
* c) Neither the name of Cisco Systems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
@@ -469,7 +469,6 @@ sctp_compute_hashkey(sctp_key_t * key1, sctp_key_t * key2, sctp_key_t * shared)
}
if (sctp_get_keylen(key2)) {
bcopy(key2->key, key_ptr, key2->keylen);
- key_ptr += key2->keylen;
}
} else {
/* key is shared + key2 + key1 */
@@ -483,7 +482,6 @@ sctp_compute_hashkey(sctp_key_t * key1, sctp_key_t * key2, sctp_key_t * shared)
}
if (sctp_get_keylen(key1)) {
bcopy(key1->key, key_ptr, key1->keylen);
- key_ptr += key1->keylen;
}
}
return (new_key);
@@ -1891,7 +1889,7 @@ sctp_notify_authentication(struct sctp_tcb *stcb, uint32_t indication,
/* append to socket */
control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination,
- 0, 0, 0, 0, 0, 0, m_notify);
+ 0, 0, stcb->asoc.context, 0, 0, 0, m_notify);
if (control == NULL) {
/* no memory */
sctp_m_freem(m_notify);
diff --git a/sys/netinet/sctp_auth.h b/sys/netinet/sctp_auth.h
index e3600d8..7034ba0 100644
--- a/sys/netinet/sctp_auth.h
+++ b/sys/netinet/sctp_auth.h
@@ -7,11 +7,11 @@
* modification, are permitted provided that the following conditions are met:
*
* a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
*
* b) 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.
+ * the documentation and/or other materials provided with the distribution.
*
* c) Neither the name of Cisco Systems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
diff --git a/sys/netinet/sctp_bsd_addr.c b/sys/netinet/sctp_bsd_addr.c
index 7d15826..3e30422 100644
--- a/sys/netinet/sctp_bsd_addr.c
+++ b/sys/netinet/sctp_bsd_addr.c
@@ -7,11 +7,11 @@
* modification, are permitted provided that the following conditions are met:
*
* a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
*
* b) 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.
+ * the documentation and/or other materials provided with the distribution.
*
* c) Neither the name of Cisco Systems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
@@ -83,11 +83,11 @@ sctp_wakeup_iterator(void)
}
static void
-sctp_iterator_thread(void *v)
+sctp_iterator_thread(void *v SCTP_UNUSED)
{
SCTP_IPI_ITERATOR_WQ_LOCK();
/* In FreeBSD this thread never terminates. */
- while (1) {
+ for (;;) {
msleep(&sctp_it_ctl.iterator_running,
&sctp_it_ctl.ipi_iterator_wq_mtx,
0, "waiting_for_work", 0);
@@ -216,7 +216,7 @@ sctp_init_ifns_for_vrf(int vrfid)
IFNET_RLOCK();
TAILQ_FOREACH(ifn, &MODULE_GLOBAL(ifnet), if_list) {
- IF_ADDR_LOCK(ifn);
+ IF_ADDR_RLOCK(ifn);
TAILQ_FOREACH(ifa, &ifn->if_addrlist, ifa_list) {
if (ifa->ifa_addr == NULL) {
continue;
@@ -273,7 +273,7 @@ sctp_init_ifns_for_vrf(int vrfid)
sctp_ifa->localifa_flags &= ~SCTP_ADDR_DEFER_USE;
}
}
- IF_ADDR_UNLOCK(ifn);
+ IF_ADDR_RUNLOCK(ifn);
}
IFNET_RUNLOCK();
}
diff --git a/sys/netinet/sctp_bsd_addr.h b/sys/netinet/sctp_bsd_addr.h
index 9f44e85..1c3fe3c 100644
--- a/sys/netinet/sctp_bsd_addr.h
+++ b/sys/netinet/sctp_bsd_addr.h
@@ -7,11 +7,11 @@
* modification, are permitted provided that the following conditions are met:
*
* a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
*
* b) 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.
+ * the documentation and/or other materials provided with the distribution.
*
* c) Neither the name of Cisco Systems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
diff --git a/sys/netinet/sctp_cc_functions.c b/sys/netinet/sctp_cc_functions.c
index b1596cc..cd0cbba 100644
--- a/sys/netinet/sctp_cc_functions.c
+++ b/sys/netinet/sctp_cc_functions.c
@@ -7,11 +7,11 @@
* modification, are permitted provided that the following conditions are met:
*
* a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
*
* b) 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.
+ * the documentation and/or other materials provided with the distribution.
*
* c) Neither the name of Cisco Systems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
@@ -80,7 +80,6 @@ sctp_set_initial_cc_param(struct sctp_tcb *stcb, struct sctp_nets *net)
}
}
net->ssthresh = assoc->peers_rwnd;
-
SDT_PROBE(sctp, cwnd, net, init,
stcb->asoc.my_vtag, ((stcb->sctp_ep->sctp_lport << 16) | (stcb->rport)), net,
0, net->cwnd);
@@ -339,7 +338,6 @@ cc_bw_same(struct sctp_tcb *stcb, struct sctp_nets *net, uint64_t nbw,
((net->cc_mod.rtcc.lbw_rtt << 32) | net->rtt),
net->flight_size,
probepoint);
-
if ((net->cc_mod.rtcc.steady_step) && (inst_ind != SCTP_INST_LOOSING)) {
if (net->cc_mod.rtcc.last_step_state == 5)
net->cc_mod.rtcc.step_cnt++;
@@ -389,7 +387,6 @@ cc_bw_decrease(struct sctp_tcb *stcb, struct sctp_nets *net, uint64_t nbw, uint6
((net->cc_mod.rtcc.lbw_rtt << 32) | net->rtt),
net->flight_size,
probepoint);
-
if (net->cc_mod.rtcc.ret_from_eq) {
/*
* Switch over to CA if we are less
@@ -408,7 +405,6 @@ cc_bw_decrease(struct sctp_tcb *stcb, struct sctp_nets *net, uint64_t nbw, uint6
((net->cc_mod.rtcc.lbw_rtt << 32) | net->rtt),
net->flight_size,
probepoint);
-
/* Someone else - fight for more? */
if (net->cc_mod.rtcc.steady_step) {
oth = net->cc_mod.rtcc.vol_reduce;
@@ -508,8 +504,7 @@ out_decision:
}
static int
-cc_bw_increase(struct sctp_tcb *stcb, struct sctp_nets *net, uint64_t nbw,
- uint64_t vtag, uint8_t inst_ind)
+cc_bw_increase(struct sctp_tcb *stcb, struct sctp_nets *net, uint64_t nbw, uint64_t vtag)
{
uint64_t oth, probepoint;
@@ -554,7 +549,8 @@ cc_bw_increase(struct sctp_tcb *stcb, struct sctp_nets *net, uint64_t nbw,
static int
cc_bw_limit(struct sctp_tcb *stcb, struct sctp_nets *net, uint64_t nbw)
{
- uint64_t bw_offset, rtt_offset, rtt, vtag, probepoint;
+ uint64_t bw_offset, rtt_offset;
+ uint64_t probepoint, rtt, vtag;
uint64_t bytes_for_this_rtt, inst_bw;
uint64_t div, inst_off;
int bw_shift;
@@ -620,15 +616,15 @@ cc_bw_limit(struct sctp_tcb *stcb, struct sctp_nets *net, uint64_t nbw)
inst_ind = SCTP_INST_NEUTRAL;
probepoint |= ((0xb << 16) | inst_ind);
} else {
+ inst_ind = net->cc_mod.rtcc.last_inst_ind;
inst_bw = bytes_for_this_rtt / (uint64_t) (net->rtt);
/* Can't determine do not change */
- inst_ind = net->cc_mod.rtcc.last_inst_ind;
probepoint |= ((0xc << 16) | inst_ind);
}
} else {
+ inst_ind = net->cc_mod.rtcc.last_inst_ind;
inst_bw = bytes_for_this_rtt;
/* Can't determine do not change */
- inst_ind = net->cc_mod.rtcc.last_inst_ind;
probepoint |= ((0xd << 16) | inst_ind);
}
SDT_PROBE(sctp, cwnd, net, rttvar,
@@ -643,7 +639,7 @@ cc_bw_limit(struct sctp_tcb *stcb, struct sctp_nets *net, uint64_t nbw)
}
bw_offset = net->cc_mod.rtcc.lbw >> bw_shift;
if (nbw > net->cc_mod.rtcc.lbw + bw_offset) {
- ret = cc_bw_increase(stcb, net, nbw, vtag, inst_ind);
+ ret = cc_bw_increase(stcb, net, nbw, vtag);
goto out;
}
rtt_offset = net->cc_mod.rtcc.lbw_rtt >> SCTP_BASE_SYSCTL(sctp_rttvar_rtt);
@@ -664,7 +660,7 @@ out:
static void
sctp_cwnd_update_after_sack_common(struct sctp_tcb *stcb,
struct sctp_association *asoc,
- int accum_moved, int reneged_all, int will_exit, int use_rtcc)
+ int accum_moved, int reneged_all SCTP_UNUSED, int will_exit, int use_rtcc)
{
struct sctp_nets *net;
int old_cwnd;
@@ -703,15 +699,18 @@ sctp_cwnd_update_after_sack_common(struct sctp_tcb *stcb,
}
}
}
- if (t_ucwnd_sbw == 0) {
- t_ucwnd_sbw = 1;
- }
if (t_path_mptcp > 0) {
mptcp_like_alpha = max_path / (t_path_mptcp * t_path_mptcp);
} else {
mptcp_like_alpha = 1;
}
}
+ if (t_ssthresh == 0) {
+ t_ssthresh = 1;
+ }
+ if (t_ucwnd_sbw == 0) {
+ t_ucwnd_sbw = 1;
+ }
/******************************/
/* update cwnd and Early FR */
/******************************/
@@ -1013,6 +1012,9 @@ sctp_cwnd_update_after_timeout(struct sctp_tcb *stcb, struct sctp_nets *net)
t_ucwnd_sbw += (uint64_t) lnet->cwnd / (uint64_t) srtt;
}
}
+ if (t_ssthresh < 1) {
+ t_ssthresh = 1;
+ }
if (t_ucwnd_sbw < 1) {
t_ucwnd_sbw = 1;
}
@@ -1301,7 +1303,7 @@ sctp_cwnd_update_rtcc_tsn_acknowledged(struct sctp_nets *net,
}
static void
-sctp_cwnd_prepare_rtcc_net_for_sack(struct sctp_tcb *stcb,
+sctp_cwnd_prepare_rtcc_net_for_sack(struct sctp_tcb *stcb SCTP_UNUSED,
struct sctp_nets *net)
{
if (net->cc_mod.rtcc.tls_needs_set > 0) {
@@ -1473,7 +1475,7 @@ sctp_cwnd_rtcc_socket_option(struct sctp_tcb *stcb, int setorget,
}
static void
-sctp_cwnd_update_rtcc_packet_transmitted(struct sctp_tcb *stcb,
+sctp_cwnd_update_rtcc_packet_transmitted(struct sctp_tcb *stcb SCTP_UNUSED,
struct sctp_nets *net)
{
if (net->cc_mod.rtcc.tls_needs_set == 0) {
@@ -1492,8 +1494,9 @@ sctp_cwnd_update_rtcc_after_sack(struct sctp_tcb *stcb,
}
static void
-sctp_rtt_rtcc_calculated(struct sctp_tcb *stcb,
- struct sctp_nets *net, struct timeval *now)
+sctp_rtt_rtcc_calculated(struct sctp_tcb *stcb SCTP_UNUSED,
+ struct sctp_nets *net,
+ struct timeval *now SCTP_UNUSED)
{
net->cc_mod.rtcc.rtt_set_this_sack = 1;
}
@@ -1731,7 +1734,7 @@ sctp_hs_cwnd_update_after_fr(struct sctp_tcb *stcb,
static void
sctp_hs_cwnd_update_after_sack(struct sctp_tcb *stcb,
struct sctp_association *asoc,
- int accum_moved, int reneged_all, int will_exit)
+ int accum_moved, int reneged_all SCTP_UNUSED, int will_exit)
{
struct sctp_nets *net;
@@ -1841,19 +1844,19 @@ static int use_bandwidth_switch = 1;
static inline int
between(uint32_t seq1, uint32_t seq2, uint32_t seq3)
{
- return seq3 - seq2 >= seq1 - seq2;
+ return (seq3 - seq2 >= seq1 - seq2);
}
static inline uint32_t
htcp_cong_time(struct htcp *ca)
{
- return sctp_get_tick_count() - ca->last_cong;
+ return (sctp_get_tick_count() - ca->last_cong);
}
static inline uint32_t
htcp_ccount(struct htcp *ca)
{
- return htcp_cong_time(ca) / ca->minRTT;
+ return (htcp_cong_time(ca) / ca->minRTT);
}
static inline void
@@ -1873,13 +1876,13 @@ htcp_cwnd_undo(struct sctp_tcb *stcb, struct sctp_nets *net)
net->cc_mod.htcp_ca.last_cong = net->cc_mod.htcp_ca.undo_last_cong;
net->cc_mod.htcp_ca.maxRTT = net->cc_mod.htcp_ca.undo_maxRTT;
net->cc_mod.htcp_ca.old_maxB = net->cc_mod.htcp_ca.undo_old_maxB;
- return max(net->cwnd, ((net->ssthresh / net->mtu << 7) / net->cc_mod.htcp_ca.beta) * net->mtu);
+ return (max(net->cwnd, ((net->ssthresh / net->mtu << 7) / net->cc_mod.htcp_ca.beta) * net->mtu));
}
#endif
static inline void
-measure_rtt(struct sctp_tcb *stcb, struct sctp_nets *net)
+measure_rtt(struct sctp_nets *net)
{
uint32_t srtt = net->lastsa >> SCTP_RTT_SHIFT;
@@ -1897,7 +1900,7 @@ measure_rtt(struct sctp_tcb *stcb, struct sctp_nets *net)
}
static void
-measure_achieved_throughput(struct sctp_tcb *stcb, struct sctp_nets *net)
+measure_achieved_throughput(struct sctp_nets *net)
{
uint32_t now = sctp_get_tick_count();
@@ -1997,7 +2000,7 @@ htcp_alpha_update(struct htcp *ca)
* were getting just too full now).
*/
static void
-htcp_param_update(struct sctp_tcb *stcb, struct sctp_nets *net)
+htcp_param_update(struct sctp_nets *net)
{
uint32_t minRTT = net->cc_mod.htcp_ca.minRTT;
uint32_t maxRTT = net->cc_mod.htcp_ca.maxRTT;
@@ -2014,10 +2017,10 @@ htcp_param_update(struct sctp_tcb *stcb, struct sctp_nets *net)
}
static uint32_t
-htcp_recalc_ssthresh(struct sctp_tcb *stcb, struct sctp_nets *net)
+htcp_recalc_ssthresh(struct sctp_nets *net)
{
- htcp_param_update(stcb, net);
- return max(((net->cwnd / net->mtu * net->cc_mod.htcp_ca.beta) >> 7) * net->mtu, 2U * net->mtu);
+ htcp_param_update(net);
+ return (max(((net->cwnd / net->mtu * net->cc_mod.htcp_ca.beta) >> 7) * net->mtu, 2U * net->mtu));
}
static void
@@ -2051,7 +2054,7 @@ htcp_cong_avoid(struct sctp_tcb *stcb, struct sctp_nets *net)
}
}
} else {
- measure_rtt(stcb, net);
+ measure_rtt(net);
/*
* In dangerous area, increase slowly. In theory this is
@@ -2087,13 +2090,13 @@ htcp_cong_avoid(struct sctp_tcb *stcb, struct sctp_nets *net)
static uint32_t
htcp_min_cwnd(struct sctp_tcb *stcb, struct sctp_nets *net)
{
- return net->ssthresh;
+ return (net->ssthresh);
}
#endif
static void
-htcp_init(struct sctp_tcb *stcb, struct sctp_nets *net)
+htcp_init(struct sctp_nets *net)
{
memset(&net->cc_mod.htcp_ca, 0, sizeof(struct htcp));
net->cc_mod.htcp_ca.alpha = ALPHA_BASE;
@@ -2111,7 +2114,7 @@ sctp_htcp_set_initial_cc_param(struct sctp_tcb *stcb, struct sctp_nets *net)
*/
net->cwnd = min((net->mtu * 4), max((2 * net->mtu), SCTP_INITIAL_CWND));
net->ssthresh = stcb->asoc.peers_rwnd;
- htcp_init(stcb, net);
+ htcp_init(net);
if (SCTP_BASE_SYSCTL(sctp_logging_level) & (SCTP_CWND_MONITOR_ENABLE | SCTP_CWND_LOGGING_ENABLE)) {
sctp_log_cwnd(stcb, net, 0, SCTP_CWND_INITIALIZATION);
@@ -2121,7 +2124,7 @@ sctp_htcp_set_initial_cc_param(struct sctp_tcb *stcb, struct sctp_nets *net)
static void
sctp_htcp_cwnd_update_after_sack(struct sctp_tcb *stcb,
struct sctp_association *asoc,
- int accum_moved, int reneged_all, int will_exit)
+ int accum_moved, int reneged_all SCTP_UNUSED, int will_exit)
{
struct sctp_nets *net;
@@ -2176,7 +2179,7 @@ sctp_htcp_cwnd_update_after_sack(struct sctp_tcb *stcb,
if (accum_moved ||
((asoc->sctp_cmt_on_off > 0) && net->new_pseudo_cumack)) {
htcp_cong_avoid(stcb, net);
- measure_achieved_throughput(stcb, net);
+ measure_achieved_throughput(net);
} else {
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_LOGGING_ENABLE) {
sctp_log_cwnd(stcb, net, net->mtu,
@@ -2212,7 +2215,7 @@ sctp_htcp_cwnd_update_after_fr(struct sctp_tcb *stcb,
/* JRS - reset as if state were changed */
htcp_reset(&net->cc_mod.htcp_ca);
- net->ssthresh = htcp_recalc_ssthresh(stcb, net);
+ net->ssthresh = htcp_recalc_ssthresh(net);
net->cwnd = net->ssthresh;
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) {
sctp_log_cwnd(stcb, net, (net->cwnd - old_cwnd),
@@ -2266,7 +2269,7 @@ sctp_htcp_cwnd_update_after_timeout(struct sctp_tcb *stcb,
/* JRS - reset as if the state were being changed to timeout */
htcp_reset(&net->cc_mod.htcp_ca);
- net->ssthresh = htcp_recalc_ssthresh(stcb, net);
+ net->ssthresh = htcp_recalc_ssthresh(net);
net->cwnd = net->mtu;
net->partial_bytes_acked = 0;
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) {
@@ -2276,7 +2279,7 @@ sctp_htcp_cwnd_update_after_timeout(struct sctp_tcb *stcb,
static void
sctp_htcp_cwnd_update_after_ecn_echo(struct sctp_tcb *stcb,
- struct sctp_nets *net, int in_window, int num_pkt_lost)
+ struct sctp_nets *net, int in_window, int num_pkt_lost SCTP_UNUSED)
{
int old_cwnd;
@@ -2286,7 +2289,7 @@ sctp_htcp_cwnd_update_after_ecn_echo(struct sctp_tcb *stcb,
if (in_window == 0) {
htcp_reset(&net->cc_mod.htcp_ca);
SCTP_STAT_INCR(sctps_ecnereducedcwnd);
- net->ssthresh = htcp_recalc_ssthresh(stcb, net);
+ net->ssthresh = htcp_recalc_ssthresh(net);
if (net->ssthresh < net->mtu) {
net->ssthresh = net->mtu;
/* here back off the timer as well, to slow us down */
diff --git a/sys/netinet/sctp_constants.h b/sys/netinet/sctp_constants.h
index 5b74056..55e3be9 100644
--- a/sys/netinet/sctp_constants.h
+++ b/sys/netinet/sctp_constants.h
@@ -7,11 +7,11 @@
* modification, are permitted provided that the following conditions are met:
*
* a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
*
* b) 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.
+ * the documentation and/or other materials provided with the distribution.
*
* c) Neither the name of Cisco Systems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
@@ -391,10 +391,12 @@ __FBSDID("$FreeBSD$");
#define SCTP_OUTPUT_FROM_COOKIE_ACK 14
#define SCTP_OUTPUT_FROM_DRAIN 15
#define SCTP_OUTPUT_FROM_CLOSING 16
+#define SCTP_OUTPUT_FROM_SOCKOPT 17
+
/* SCTP chunk types are moved sctp.h for application (NAT, FW) use */
/* align to 32-bit sizes */
-#define SCTP_SIZE32(x) ((((x)+3) >> 2) << 2)
+#define SCTP_SIZE32(x) ((((x) + 3) >> 2) << 2)
#define IS_SCTP_CONTROL(a) ((a)->chunk_type != SCTP_DATA)
#define IS_SCTP_DATA(a) ((a)->chunk_type == SCTP_DATA)
@@ -931,7 +933,7 @@ __FBSDID("$FreeBSD$");
} else { \
gap = (MAX_TSN - mapping_tsn) + tsn + 1; \
} \
- } while(0)
+ } while (0)
#define SCTP_RETRAN_DONE -1
@@ -1015,20 +1017,9 @@ __FBSDID("$FreeBSD$");
#if defined(_KERNEL)
-
-#define SCTP_GETTIME_TIMESPEC(x) (getnanouptime(x))
-#define SCTP_GETTIME_TIMEVAL(x) (getmicrouptime(x))
-#define SCTP_GETPTIME_TIMEVAL(x) (microuptime(x))
+#define SCTP_GETTIME_TIMEVAL(x) (getmicrouptime(x))
+#define SCTP_GETPTIME_TIMEVAL(x) (microuptime(x))
#endif
-/*#if defined(__FreeBSD__) || defined(__APPLE__)*/
-/*#define SCTP_GETTIME_TIMEVAL(x) { \*/
-/* (x)->tv_sec = ticks / 1000; \*/
-/* (x)->tv_usec = (ticks % 1000) * 1000; \*/
-/*}*/
-
-/*#else*/
-/*#define SCTP_GETTIME_TIMEVAL(x) (microtime(x))*/
-/*#endif __FreeBSD__ */
#if defined(_KERNEL) || defined(__Userspace__)
#define sctp_sowwakeup(inp, so) \
diff --git a/sys/netinet/sctp_crc32.h b/sys/netinet/sctp_crc32.h
index c2ef842..0f22cab 100644
--- a/sys/netinet/sctp_crc32.h
+++ b/sys/netinet/sctp_crc32.h
@@ -7,11 +7,11 @@
* modification, are permitted provided that the following conditions are met:
*
* a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
*
* b) 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.
+ * the documentation and/or other materials provided with the distribution.
*
* c) Neither the name of Cisco Systems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
diff --git a/sys/netinet/sctp_dtrace_declare.h b/sys/netinet/sctp_dtrace_declare.h
index 6f0f8b1..1dcb835 100644
--- a/sys/netinet/sctp_dtrace_declare.h
+++ b/sys/netinet/sctp_dtrace_declare.h
@@ -6,11 +6,11 @@
* modification, are permitted provided that the following conditions are met:
*
* a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
*
* b) 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.
+ * the documentation and/or other materials provided with the distribution.
*
* c) Neither the name of Cisco Systems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
diff --git a/sys/netinet/sctp_dtrace_define.h b/sys/netinet/sctp_dtrace_define.h
index 5f7bf14..34929dd 100644
--- a/sys/netinet/sctp_dtrace_define.h
+++ b/sys/netinet/sctp_dtrace_define.h
@@ -6,11 +6,11 @@
* modification, are permitted provided that the following conditions are met:
*
* a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
*
* b) 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.
+ * the documentation and/or other materials provided with the distribution.
*
* c) Neither the name of Cisco Systems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
diff --git a/sys/netinet/sctp_header.h b/sys/netinet/sctp_header.h
index ce75901..9c285a7 100644
--- a/sys/netinet/sctp_header.h
+++ b/sys/netinet/sctp_header.h
@@ -7,11 +7,11 @@
* modification, are permitted provided that the following conditions are met:
*
* a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
*
* b) 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.
+ * the documentation and/or other materials provided with the distribution.
*
* c) Neither the name of Cisco Systems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
diff --git a/sys/netinet/sctp_indata.c b/sys/netinet/sctp_indata.c
index 48b79fb..54372ac 100644
--- a/sys/netinet/sctp_indata.c
+++ b/sys/netinet/sctp_indata.c
@@ -7,11 +7,11 @@
* modification, are permitted provided that the following conditions are met:
*
* a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
*
* b) 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.
+ * the documentation and/or other materials provided with the distribution.
*
* c) Neither the name of Cisco Systems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
@@ -137,7 +137,7 @@ sctp_build_readq_entry(struct sctp_tcb *stcb,
read_queue_e->sinfo_ssn = stream_seq;
read_queue_e->sinfo_flags = (flags << 8);
read_queue_e->sinfo_ppid = ppid;
- read_queue_e->sinfo_context = stcb->asoc.context;
+ read_queue_e->sinfo_context = context;
read_queue_e->sinfo_timetolive = 0;
read_queue_e->sinfo_tsn = tsn;
read_queue_e->sinfo_cumtsn = tsn;
@@ -845,8 +845,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc,
struct sctp_tmit_chunk *chk, int *abort_flag)
{
struct mbuf *oper;
- uint32_t cum_ackp1, last_tsn, prev_tsn, post_tsn;
- u_char last_flags;
+ uint32_t cum_ackp1, prev_tsn, post_tsn;
struct sctp_tmit_chunk *at, *prev, *next;
prev = next = NULL;
@@ -1033,8 +1032,6 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc,
sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED);
return;
} else {
- last_flags = at->rec.data.rcv_flags;
- last_tsn = at->rec.data.TSN_seq;
prev = at;
if (TAILQ_NEXT(at, sctp_next) == NULL) {
/*
@@ -1455,7 +1452,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struct sctp_association *asoc,
struct sctp_tmit_chunk *chk;
uint32_t tsn, gap;
struct mbuf *dmbuf;
- int indx, the_len;
+ int the_len;
int need_reasm_check = 0;
uint16_t strmno, strmseq;
struct mbuf *oper;
@@ -1587,7 +1584,6 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struct sctp_association *asoc,
} else {
SCTP_STAT_INCR(sctps_datadroprwnd);
}
- indx = *break_flag;
*break_flag = 1;
return (0);
}
@@ -1701,12 +1697,10 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struct sctp_association *asoc,
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MBUF_LOGGING_ENABLE) {
struct mbuf *mat;
- mat = dmbuf;
- while (mat) {
+ for (mat = dmbuf; mat; mat = SCTP_BUF_NEXT(mat)) {
if (SCTP_BUF_IS_EXTENDED(mat)) {
sctp_log_mb(mat, SCTP_MBUF_ICOPY);
}
- mat = SCTP_BUF_NEXT(mat);
}
}
#endif
@@ -1727,10 +1721,8 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struct sctp_association *asoc,
struct mbuf *lat;
l_len = 0;
- lat = dmbuf;
- while (lat) {
+ for (lat = dmbuf; lat; lat = SCTP_BUF_NEXT(lat)) {
l_len += SCTP_BUF_LEN(lat);
- lat = SCTP_BUF_NEXT(lat);
}
}
if (l_len > the_len) {
@@ -1807,15 +1799,10 @@ failed_express_del:
if (tsn == (control->sinfo_tsn + 1)) {
/* Yep, we can add it on */
int end = 0;
- uint32_t cumack;
if (chunk_flags & SCTP_DATA_LAST_FRAG) {
end = 1;
}
- cumack = asoc->cumulative_tsn;
- if ((cumack + 1) == tsn)
- cumack = tsn;
-
if (sctp_append_to_readq(stcb->sctp_ep, stcb, control, dmbuf, end,
tsn,
&stcb->sctp_socket->so_rcv)) {
@@ -2259,7 +2246,6 @@ sctp_slide_mapping_arrays(struct sctp_tcb *stcb)
uint32_t old_cumack, old_base, old_highest, highest_tsn;
asoc = &stcb->asoc;
- at = 0;
old_cumack = asoc->cumulative_tsn;
old_base = asoc->mapping_array_base_tsn;
@@ -2408,7 +2394,7 @@ sctp_slide_mapping_arrays(struct sctp_tcb *stcb)
}
void
-sctp_sack_check(struct sctp_tcb *stcb, int was_a_gap, int *abort_flag)
+sctp_sack_check(struct sctp_tcb *stcb, int was_a_gap)
{
struct sctp_association *asoc;
uint32_t highest_tsn;
@@ -2638,7 +2624,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *offset, int length,
if (length - *offset < chk_length) {
/* all done, mutulated chunk */
stop_proc = 1;
- break;
+ continue;
}
if (ch->ch.chunk_type == SCTP_DATA) {
if ((size_t)chk_length < sizeof(struct sctp_data_chunk) + 1) {
@@ -2694,7 +2680,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *offset, int length,
* drop rep space left.
*/
stop_proc = 1;
- break;
+ continue;
}
} else {
/* not a data chunk in the data region */
@@ -2702,7 +2688,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *offset, int length,
case SCTP_INITIATION:
case SCTP_INITIATION_ACK:
case SCTP_SELECTIVE_ACK:
- case SCTP_NR_SELECTIVE_ACK: /* EY */
+ case SCTP_NR_SELECTIVE_ACK:
case SCTP_HEARTBEAT_REQUEST:
case SCTP_HEARTBEAT_ACK:
case SCTP_ABORT_ASSOCIATION:
@@ -2776,7 +2762,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *offset, int length,
} /* else skip this bad chunk and
* continue... */
break;
- }; /* switch of chunk type */
+ } /* switch of chunk type */
}
*offset += SCTP_SIZE32(chk_length);
if ((*offset >= length) || stop_proc) {
@@ -2789,10 +2775,9 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *offset, int length,
if (ch == NULL) {
*offset = length;
stop_proc = 1;
- break;
-
+ continue;
}
- } /* while */
+ }
if (break_flag) {
/*
* we need to report rwnd overrun drops.
@@ -2824,10 +2809,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *offset, int length,
stcb->asoc.send_sack = 1;
}
/* Start a sack timer or QUEUE a SACK for sending */
- sctp_sack_check(stcb, was_a_gap, &abort_flag);
- if (abort_flag)
- return (2);
-
+ sctp_sack_check(stcb, was_a_gap);
return (0);
}
@@ -2837,7 +2819,7 @@ sctp_process_segment_range(struct sctp_tcb *stcb, struct sctp_tmit_chunk **p_tp1
int *num_frs,
uint32_t * biggest_newly_acked_tsn,
uint32_t * this_sack_lowest_newack,
- int *ecn_seg_sums, int *rto_ok)
+ int *rto_ok)
{
struct sctp_tmit_chunk *tp1;
unsigned int theTSN;
@@ -3059,8 +3041,7 @@ static int
sctp_handle_segments(struct mbuf *m, int *offset, struct sctp_tcb *stcb, struct sctp_association *asoc,
uint32_t last_tsn, uint32_t * biggest_tsn_acked,
uint32_t * biggest_newly_acked_tsn, uint32_t * this_sack_lowest_newack,
- int num_seg, int num_nr_seg, int *ecn_seg_sums,
- int *rto_ok)
+ int num_seg, int num_nr_seg, int *rto_ok)
{
struct sctp_gap_ack_block *frag, block;
struct sctp_tmit_chunk *tp1;
@@ -3106,7 +3087,7 @@ sctp_handle_segments(struct mbuf *m, int *offset, struct sctp_tcb *stcb, struct
}
if (sctp_process_segment_range(stcb, &tp1, last_tsn, frag_strt, frag_end,
non_revocable, &num_frs, biggest_newly_acked_tsn,
- this_sack_lowest_newack, ecn_seg_sums, rto_ok)) {
+ this_sack_lowest_newack, rto_ok)) {
chunk_freed = 1;
}
prev_frag_end = frag_end;
@@ -3606,7 +3587,8 @@ sctp_strike_gap_ack_chunks(struct sctp_tcb *stcb, struct sctp_association *asoc,
* this guy had a RTO calculation pending on
* it, cancel it
*/
- if (tp1->whoTo->rto_needed == 0) {
+ if ((tp1->whoTo != NULL) &&
+ (tp1->whoTo->rto_needed == 0)) {
tp1->whoTo->rto_needed = 1;
}
tp1->do_rtt = 0;
@@ -3761,7 +3743,6 @@ sctp_fs_audit(struct sctp_association *asoc)
static void
sctp_window_probe_recovery(struct sctp_tcb *stcb,
struct sctp_association *asoc,
- struct sctp_nets *net,
struct sctp_tmit_chunk *tp1)
{
tp1->window_probe = 0;
@@ -4029,7 +4010,7 @@ sctp_express_handle_sack(struct sctp_tcb *stcb, uint32_t cumack,
SOCKBUF_LOCK(&stcb->sctp_socket->so_snd);
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_WAKE_LOGGING_ENABLE) {
/* sa_ignore NO_NULL_CHK */
- sctp_wakeup_log(stcb, cumack, 1, SCTP_WAKESND_FROM_SACK);
+ sctp_wakeup_log(stcb, 1, SCTP_WAKESND_FROM_SACK);
}
#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING)
so = SCTP_INP_SO(stcb->sctp_ep);
@@ -4050,7 +4031,7 @@ sctp_express_handle_sack(struct sctp_tcb *stcb, uint32_t cumack,
#endif
} else {
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_WAKE_LOGGING_ENABLE) {
- sctp_wakeup_log(stcb, cumack, 1, SCTP_NOWAKE_FROM_SACK);
+ sctp_wakeup_log(stcb, 1, SCTP_NOWAKE_FROM_SACK);
}
}
@@ -4136,7 +4117,7 @@ again:
TAILQ_FOREACH(tp1, &asoc->sent_queue, sctp_next) {
if (tp1->window_probe) {
/* move back to data send queue */
- sctp_window_probe_recovery(stcb, asoc, net, tp1);
+ sctp_window_probe_recovery(stcb, asoc, tp1);
break;
}
}
@@ -4344,7 +4325,7 @@ again:
void
sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup,
- struct sctp_tcb *stcb, struct sctp_nets *net_from,
+ struct sctp_tcb *stcb,
uint16_t num_seg, uint16_t num_nr_seg, uint16_t num_dup,
int *abort_now, uint8_t flags,
uint32_t cum_ack, uint32_t rwnd, int ecne_seen)
@@ -4352,7 +4333,6 @@ sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup,
struct sctp_association *asoc;
struct sctp_tmit_chunk *tp1, *tp2;
uint32_t last_tsn, biggest_tsn_acked, biggest_tsn_newly_acked, this_sack_lowest_newack;
- uint32_t sav_cum_ack;
uint16_t wake_him = 0;
uint32_t send_s = 0;
long j;
@@ -4362,7 +4342,6 @@ sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup,
int win_probe_recovery = 0;
int win_probe_recovered = 0;
struct sctp_nets *net = NULL;
- int ecn_seg_sums = 0;
int done_once;
int rto_ok = 1;
uint8_t reneged_all = 0;
@@ -4392,7 +4371,6 @@ sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup,
SCTP_TCB_LOCK_ASSERT(stcb);
/* CMT DAC algo */
this_sack_lowest_newack = 0;
- j = 0;
SCTP_STAT_INCR(sctps_slowpath_sack);
last_tsn = cum_ack;
cmt_dac_flag = flags & SCTP_SACK_CMT_DAC;
@@ -4492,8 +4470,6 @@ sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup,
/* acking something behind */
return;
}
- sav_cum_ack = asoc->last_acked_seq;
-
/* update the Rwnd of the peer */
if (TAILQ_EMPTY(&asoc->sent_queue) &&
TAILQ_EMPTY(&asoc->send_queue) &&
@@ -4690,8 +4666,7 @@ sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup,
*/
if (sctp_handle_segments(m, &offset_seg, stcb, asoc, last_tsn, &biggest_tsn_acked,
&biggest_tsn_newly_acked, &this_sack_lowest_newack,
- num_seg, num_nr_seg, &ecn_seg_sums,
- &rto_ok)) {
+ num_seg, num_nr_seg, &rto_ok)) {
wake_him++;
}
if (SCTP_BASE_SYSCTL(sctp_strict_sacks)) {
@@ -4788,7 +4763,7 @@ sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup,
#endif
SOCKBUF_LOCK(&stcb->sctp_socket->so_snd);
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_WAKE_LOGGING_ENABLE) {
- sctp_wakeup_log(stcb, cum_ack, wake_him, SCTP_WAKESND_FROM_SACK);
+ sctp_wakeup_log(stcb, wake_him, SCTP_WAKESND_FROM_SACK);
}
#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING)
so = SCTP_INP_SO(stcb->sctp_ep);
@@ -4809,7 +4784,7 @@ sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup,
#endif
} else {
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_WAKE_LOGGING_ENABLE) {
- sctp_wakeup_log(stcb, cum_ack, wake_him, SCTP_NOWAKE_FROM_SACK);
+ sctp_wakeup_log(stcb, wake_him, SCTP_NOWAKE_FROM_SACK);
}
}
@@ -5112,7 +5087,7 @@ again:
*/
TAILQ_FOREACH(tp1, &asoc->sent_queue, sctp_next) {
if (tp1->window_probe) {
- sctp_window_probe_recovery(stcb, asoc, net, tp1);
+ sctp_window_probe_recovery(stcb, asoc, tp1);
break;
}
}
@@ -5222,8 +5197,7 @@ again:
}
void
-sctp_update_acked(struct sctp_tcb *stcb, struct sctp_shutdown_chunk *cp,
- struct sctp_nets *netp, int *abort_flag)
+sctp_update_acked(struct sctp_tcb *stcb, struct sctp_shutdown_chunk *cp, int *abort_flag)
{
/* Copy cum-ack */
uint32_t cum_ack, a_rwnd;
@@ -5389,13 +5363,12 @@ sctp_handle_forward_tsn(struct sctp_tcb *stcb,
*/
struct sctp_association *asoc;
uint32_t new_cum_tsn, gap;
- unsigned int i, fwd_sz, cumack_set_flag, m_size;
+ unsigned int i, fwd_sz, m_size;
uint32_t str_seq;
struct sctp_stream_in *strm;
struct sctp_tmit_chunk *chk, *nchk;
struct sctp_queued_to_read *ctl, *sv;
- cumack_set_flag = 0;
asoc = &stcb->asoc;
if ((fwd_sz = ntohs(fwd->ch.chunk_length)) < sizeof(struct sctp_forward_tsn_chunk)) {
SCTPDBG(SCTP_DEBUG_INDATA1,
diff --git a/sys/netinet/sctp_indata.h b/sys/netinet/sctp_indata.h
index 1dbd364..fc0136b 100644
--- a/sys/netinet/sctp_indata.h
+++ b/sys/netinet/sctp_indata.h
@@ -7,11 +7,11 @@
* modification, are permitted provided that the following conditions are met:
*
* a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
*
* b) 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.
+ * the documentation and/or other materials provided with the distribution.
*
* c) Neither the name of Cisco Systems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
@@ -94,7 +94,7 @@ sctp_express_handle_sack(struct sctp_tcb *stcb, uint32_t cumack,
void
sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup,
- struct sctp_tcb *stcb, struct sctp_nets *net_from,
+ struct sctp_tcb *stcb,
uint16_t num_seg, uint16_t num_nr_seg, uint16_t num_dup,
int *abort_now, uint8_t flags,
uint32_t cum_ack, uint32_t rwnd, int ecne_seen);
@@ -110,8 +110,7 @@ struct sctp_tmit_chunk *
void sctp_service_queues(struct sctp_tcb *, struct sctp_association *);
void
-sctp_update_acked(struct sctp_tcb *, struct sctp_shutdown_chunk *,
- struct sctp_nets *, int *);
+ sctp_update_acked(struct sctp_tcb *, struct sctp_shutdown_chunk *, int *);
int
sctp_process_data(struct mbuf **, int, int *, int, struct sctphdr *,
@@ -120,7 +119,7 @@ sctp_process_data(struct mbuf **, int, int *, int, struct sctphdr *,
void sctp_slide_mapping_arrays(struct sctp_tcb *stcb);
-void sctp_sack_check(struct sctp_tcb *, int, int *);
+void sctp_sack_check(struct sctp_tcb *, int);
#endif
#endif
diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c
index d8f0ae5..bd3f26d 100644
--- a/sys/netinet/sctp_input.c
+++ b/sys/netinet/sctp_input.c
@@ -7,11 +7,11 @@
* modification, are permitted provided that the following conditions are met:
*
* a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
*
* b) 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.
+ * the documentation and/or other materials provided with the distribution.
*
* c) Neither the name of Cisco Systems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
@@ -84,47 +84,18 @@ sctp_stop_all_cookie_timers(struct sctp_tcb *stcb)
static void
sctp_handle_init(struct mbuf *m, int iphlen, int offset, struct sctphdr *sh,
struct sctp_init_chunk *cp, struct sctp_inpcb *inp, struct sctp_tcb *stcb,
- struct sctp_nets *net, int *abort_no_unlock, uint32_t vrf_id, uint16_t port)
+ int *abort_no_unlock, uint32_t vrf_id, uint16_t port)
{
struct sctp_init *init;
struct mbuf *op_err;
- uint32_t init_limit;
SCTPDBG(SCTP_DEBUG_INPUT2, "sctp_handle_init: handling INIT tcb:%p\n",
stcb);
if (stcb == NULL) {
SCTP_INP_RLOCK(inp);
- if (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) {
- goto outnow;
- }
- }
- op_err = NULL;
- init = &cp->init;
- /* First are we accepting? */
- if ((inp->sctp_socket->so_qlimit == 0) && (stcb == NULL)) {
- SCTPDBG(SCTP_DEBUG_INPUT2,
- "sctp_handle_init: Abort, so_qlimit:%d\n",
- inp->sctp_socket->so_qlimit);
- /*
- * FIX ME ?? What about TCP model and we have a
- * match/restart case? Actually no fix is needed. the lookup
- * will always find the existing assoc so stcb would not be
- * NULL. It may be questionable to do this since we COULD
- * just send back the INIT-ACK and hope that the app did
- * accept()'s by the time the COOKIE was sent. But there is
- * a price to pay for COOKIE generation and I don't want to
- * pay it on the chance that the app will actually do some
- * accepts(). The App just looses and should NOT be in this
- * state :-)
- */
- sctp_abort_association(inp, stcb, m, iphlen, sh, op_err,
- vrf_id, port);
- if (stcb)
- *abort_no_unlock = 1;
- goto outnow;
}
+ /* validate length */
if (ntohs(cp->ch.chunk_length) < sizeof(struct sctp_init_chunk)) {
- /* Invalid length */
op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM);
sctp_abort_association(inp, stcb, m, iphlen, sh, op_err,
vrf_id, port);
@@ -133,6 +104,7 @@ sctp_handle_init(struct mbuf *m, int iphlen, int offset, struct sctphdr *sh,
goto outnow;
}
/* validate parameters */
+ init = &cp->init;
if (init->initiate_tag == 0) {
/* protocol error... send abort */
op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM);
@@ -169,19 +141,50 @@ sctp_handle_init(struct mbuf *m, int iphlen, int offset, struct sctphdr *sh,
*abort_no_unlock = 1;
goto outnow;
}
- init_limit = offset + ntohs(cp->ch.chunk_length);
if (sctp_validate_init_auth_params(m, offset + sizeof(*cp),
- init_limit)) {
+ offset + ntohs(cp->ch.chunk_length))) {
/* auth parameter(s) error... send abort */
sctp_abort_association(inp, stcb, m, iphlen, sh, NULL, vrf_id, port);
if (stcb)
*abort_no_unlock = 1;
goto outnow;
}
- /* send an INIT-ACK w/cookie */
- SCTPDBG(SCTP_DEBUG_INPUT3, "sctp_handle_init: sending INIT-ACK\n");
- sctp_send_initiate_ack(inp, stcb, m, iphlen, offset, sh, cp, vrf_id, port,
- ((stcb == NULL) ? SCTP_HOLDS_LOCK : SCTP_NOT_LOCKED));
+ /*
+ * We are only accepting if we have a socket with positive
+ * so_qlimit.
+ */
+ if ((stcb == NULL) &&
+ ((inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) ||
+ (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE) ||
+ (inp->sctp_socket == NULL) ||
+ (inp->sctp_socket->so_qlimit == 0))) {
+ /*
+ * FIX ME ?? What about TCP model and we have a
+ * match/restart case? Actually no fix is needed. the lookup
+ * will always find the existing assoc so stcb would not be
+ * NULL. It may be questionable to do this since we COULD
+ * just send back the INIT-ACK and hope that the app did
+ * accept()'s by the time the COOKIE was sent. But there is
+ * a price to pay for COOKIE generation and I don't want to
+ * pay it on the chance that the app will actually do some
+ * accepts(). The App just looses and should NOT be in this
+ * state :-)
+ */
+ if (SCTP_BASE_SYSCTL(sctp_blackhole) == 0) {
+ sctp_send_abort(m, iphlen, sh, 0, NULL, vrf_id, port);
+ }
+ goto outnow;
+ }
+ if ((stcb != NULL) &&
+ (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_SHUTDOWN_ACK_SENT)) {
+ SCTPDBG(SCTP_DEBUG_INPUT3, "sctp_handle_init: sending SHUTDOWN-ACK\n");
+ sctp_send_shutdown_ack(stcb, NULL);
+ sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_CONTROL_PROC, SCTP_SO_NOT_LOCKED);
+ } else {
+ SCTPDBG(SCTP_DEBUG_INPUT3, "sctp_handle_init: sending INIT-ACK\n");
+ sctp_send_initiate_ack(inp, stcb, m, iphlen, offset, sh, cp, vrf_id, port,
+ ((stcb == NULL) ? SCTP_HOLDS_LOCK : SCTP_NOT_LOCKED));
+ }
outnow:
if (stcb == NULL) {
SCTP_INP_RUNLOCK(inp);
@@ -258,8 +261,7 @@ sctp_is_there_unsent_data(struct sctp_tcb *stcb, int so_locked
}
static int
-sctp_process_init(struct sctp_init_chunk *cp, struct sctp_tcb *stcb,
- struct sctp_nets *net)
+sctp_process_init(struct sctp_init_chunk *cp, struct sctp_tcb *stcb)
{
struct sctp_init *init;
struct sctp_association *asoc;
@@ -433,13 +435,13 @@ sctp_process_init_ack(struct mbuf *m, int iphlen, int offset,
asoc = &stcb->asoc;
asoc->peer_supports_nat = (uint8_t) nat_friendly;
/* process the peer's parameters in the INIT-ACK */
- retval = sctp_process_init((struct sctp_init_chunk *)cp, stcb, net);
+ retval = sctp_process_init((struct sctp_init_chunk *)cp, stcb);
if (retval < 0) {
return (retval);
}
initack_limit = offset + ntohs(cp->ch.chunk_length);
/* load all addresses */
- if ((retval = sctp_load_addresses_from_init(stcb, m, iphlen,
+ if ((retval = sctp_load_addresses_from_init(stcb, m,
(offset + sizeof(struct sctp_init_chunk)), initack_limit, sh,
NULL))) {
/* Huh, we should abort */
@@ -521,7 +523,7 @@ sctp_process_init_ack(struct mbuf *m, int iphlen, int offset,
mp->resv = 0;
}
sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen,
- sh, op_err, 0, net->port);
+ sh, op_err, vrf_id, net->port);
*abort_no_unlock = 1;
}
return (retval);
@@ -871,7 +873,7 @@ sctp_handle_shutdown(struct sctp_shutdown_chunk *cp,
/* Shutdown NOT the expected size */
return;
} else {
- sctp_update_acked(stcb, cp, net, abort_flag);
+ sctp_update_acked(stcb, cp, abort_flag);
if (*abort_flag) {
return;
}
@@ -953,7 +955,7 @@ sctp_handle_shutdown(struct sctp_shutdown_chunk *cp,
}
static void
-sctp_handle_shutdown_ack(struct sctp_shutdown_ack_chunk *cp,
+sctp_handle_shutdown_ack(struct sctp_shutdown_ack_chunk *cp SCTP_UNUSED,
struct sctp_tcb *stcb,
struct sctp_nets *net)
{
@@ -1022,12 +1024,11 @@ sctp_handle_shutdown_ack(struct sctp_shutdown_ack_chunk *cp,
sctp_send_shutdown_complete(stcb, net, 0);
/* notify upper layer protocol */
if (stcb->sctp_socket) {
- sctp_ulp_notify(SCTP_NOTIFY_ASSOC_DOWN, stcb, 0, NULL, SCTP_SO_NOT_LOCKED);
if ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) ||
(stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) {
- /* Set the connected flag to disconnected */
- stcb->sctp_ep->sctp_socket->so_snd.sb_cc = 0;
+ stcb->sctp_socket->so_snd.sb_cc = 0;
}
+ sctp_ulp_notify(SCTP_NOTIFY_ASSOC_DOWN, stcb, 0, NULL, SCTP_SO_NOT_LOCKED);
}
SCTP_STAT_INCR_COUNTER32(sctps_shutdown);
/* free the TCB but first save off the ep */
@@ -1410,7 +1411,7 @@ static struct sctp_tcb *
sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset,
struct sctphdr *sh, struct sctp_state_cookie *cookie, int cookie_len,
struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets **netp,
- struct sockaddr *init_src, int *notification, sctp_assoc_t * sac_assoc_id,
+ struct sockaddr *init_src, int *notification,
uint32_t vrf_id, int auth_skipped, uint32_t auth_offset, uint32_t auth_len, uint16_t port)
{
struct sctp_association *asoc;
@@ -1419,7 +1420,6 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset,
struct sctp_nets *net;
struct mbuf *op_err;
struct sctp_paramhdr *ph;
- int chk_length;
int init_offset, initack_offset, i;
int retval;
int spec_flag = 0;
@@ -1469,7 +1469,6 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset,
/* could not pull a INIT chunk in cookie */
return (NULL);
}
- chk_length = ntohs(init_cp->ch.chunk_length);
if (init_cp->ch.chunk_type != SCTP_INITIATION) {
return (NULL);
}
@@ -1477,7 +1476,7 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset,
* find and validate the INIT-ACK chunk in the cookie (my info) the
* INIT-ACK follows the INIT chunk
*/
- initack_offset = init_offset + SCTP_SIZE32(chk_length);
+ initack_offset = init_offset + SCTP_SIZE32(ntohs(init_cp->ch.chunk_length));
initack_cp = (struct sctp_init_ack_chunk *)
sctp_m_getptr(m, initack_offset, sizeof(struct sctp_init_ack_chunk),
(uint8_t *) & initack_buf);
@@ -1485,7 +1484,6 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset,
/* could not pull INIT-ACK chunk in cookie */
return (NULL);
}
- chk_length = ntohs(initack_cp->ch.chunk_length);
if (initack_cp->ch.chunk_type != SCTP_INITIATION_ACK) {
return (NULL);
}
@@ -1526,7 +1524,7 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset,
* the right seq no's.
*/
/* First we must process the INIT !! */
- retval = sctp_process_init(init_cp, stcb, net);
+ retval = sctp_process_init(init_cp, stcb);
if (retval < 0) {
if (how_indx < sizeof(asoc->cookie_how))
asoc->cookie_how[how_indx] = 3;
@@ -1613,7 +1611,7 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset,
* somehow abort.. but we do have an existing asoc. This
* really should not fail.
*/
- if (sctp_load_addresses_from_init(stcb, m, iphlen,
+ if (sctp_load_addresses_from_init(stcb, m,
init_offset + sizeof(struct sctp_init_chunk),
initack_offset, sh, init_src)) {
if (how_indx < sizeof(asoc->cookie_how))
@@ -1749,13 +1747,13 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset,
}
/* process the INIT info (peer's info) */
- retval = sctp_process_init(init_cp, stcb, net);
+ retval = sctp_process_init(init_cp, stcb);
if (retval < 0) {
if (how_indx < sizeof(asoc->cookie_how))
asoc->cookie_how[how_indx] = 9;
return (NULL);
}
- if (sctp_load_addresses_from_init(stcb, m, iphlen,
+ if (sctp_load_addresses_from_init(stcb, m,
init_offset + sizeof(struct sctp_init_chunk),
initack_offset, sh, init_src)) {
if (how_indx < sizeof(asoc->cookie_how))
@@ -1852,7 +1850,6 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset,
sctp_timer_stop(SCTP_TIMER_TYPE_INIT, inp, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_15);
sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_16);
- *sac_assoc_id = sctp_get_associd(stcb);
/* notify upper layer */
*notification = SCTP_NOTIFY_ASSOC_RESTART;
atomic_add_int(&stcb->asoc.refcnt, 1);
@@ -1928,7 +1925,7 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset,
SCTP_INP_WUNLOCK(stcb->sctp_ep);
SCTP_INP_INFO_WUNLOCK();
- retval = sctp_process_init(init_cp, stcb, net);
+ retval = sctp_process_init(init_cp, stcb);
if (retval < 0) {
if (how_indx < sizeof(asoc->cookie_how))
asoc->cookie_how[how_indx] = 13;
@@ -1941,7 +1938,7 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset,
*/
net->hb_responded = 1;
- if (sctp_load_addresses_from_init(stcb, m, iphlen,
+ if (sctp_load_addresses_from_init(stcb, m,
init_offset + sizeof(struct sctp_init_chunk),
initack_offset, sh, init_src)) {
if (how_indx < sizeof(asoc->cookie_how))
@@ -1986,11 +1983,9 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, int offset,
struct sockaddr_storage sa_store;
struct sockaddr *initack_src = (struct sockaddr *)&sa_store;
struct sctp_association *asoc;
- int chk_length;
int init_offset, initack_offset, initack_limit;
int retval;
int error = 0;
- uint32_t old_tag;
uint8_t auth_chunk_buf[SCTP_PARAM_BUFFER_SIZE];
#ifdef INET
@@ -2022,12 +2017,11 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, int offset,
"process_cookie_new: could not pull INIT chunk hdr\n");
return (NULL);
}
- chk_length = ntohs(init_cp->ch.chunk_length);
if (init_cp->ch.chunk_type != SCTP_INITIATION) {
SCTPDBG(SCTP_DEBUG_INPUT1, "HUH? process_cookie_new: could not find INIT chunk!\n");
return (NULL);
}
- initack_offset = init_offset + SCTP_SIZE32(chk_length);
+ initack_offset = init_offset + SCTP_SIZE32(ntohs(init_cp->ch.chunk_length));
/*
* find and validate the INIT-ACK chunk in the cookie (my info) the
* INIT-ACK follows the INIT chunk
@@ -2040,7 +2034,6 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, int offset,
SCTPDBG(SCTP_DEBUG_INPUT1, "process_cookie_new: could not pull INIT-ACK chunk hdr\n");
return (NULL);
}
- chk_length = ntohs(initack_cp->ch.chunk_length);
if (initack_cp->ch.chunk_type != SCTP_INITIATION_ACK) {
return (NULL);
}
@@ -2117,7 +2110,6 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, int offset,
return (NULL);
}
/* process the INIT-ACK info (my info) */
- old_tag = asoc->my_vtag;
asoc->my_vtag = ntohl(initack_cp->init.initiate_tag);
asoc->my_rwnd = ntohl(initack_cp->init.a_rwnd);
asoc->pre_open_streams = ntohs(initack_cp->init.num_outbound_streams);
@@ -2131,7 +2123,7 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, int offset,
/* process the INIT info (peer's info) */
if (netp)
- retval = sctp_process_init(init_cp, stcb, *netp);
+ retval = sctp_process_init(init_cp, stcb);
else
retval = 0;
if (retval < 0) {
@@ -2149,7 +2141,7 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, int offset,
return (NULL);
}
/* load all addresses */
- if (sctp_load_addresses_from_init(stcb, m, iphlen,
+ if (sctp_load_addresses_from_init(stcb, m,
init_offset + sizeof(struct sctp_init_chunk), initack_offset, sh,
init_src)) {
atomic_add_int(&stcb->asoc.refcnt, 1);
@@ -2356,7 +2348,6 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset,
struct sctp_tcb *l_stcb = *stcb;
struct sctp_inpcb *l_inp;
struct sockaddr *to;
- sctp_assoc_t sac_restart_id;
struct sctp_pcb *ep;
struct mbuf *m_sig;
uint8_t calc_sig[SCTP_SIGNATURE_SIZE], tmp_sig[SCTP_SIGNATURE_SIZE];
@@ -2682,7 +2673,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset,
had_a_existing_tcb = 1;
*stcb = sctp_process_cookie_existing(m, iphlen, offset, sh,
cookie, cookie_len, *inp_p, *stcb, netp, to,
- &notification, &sac_restart_id, vrf_id, auth_skipped, auth_offset, auth_len, port);
+ &notification, vrf_id, auth_skipped, auth_offset, auth_len, port);
}
if (*stcb == NULL) {
@@ -2705,10 +2696,9 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset,
*/
if (netl == NULL) {
/* TSNH! Huh, why do I need to add this address here? */
- int ret;
-
- ret = sctp_add_remote_addr(*stcb, to, NULL, SCTP_DONOT_SETSCOPE,
- SCTP_IN_COOKIE_PROC);
+ if (sctp_add_remote_addr(*stcb, to, NULL, SCTP_DONOT_SETSCOPE, SCTP_IN_COOKIE_PROC)) {
+ return (NULL);
+ }
netl = sctp_findnet(*stcb, to);
}
if (netl) {
@@ -2736,7 +2726,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset,
* For a restart we will keep the same
* socket, no need to do anything. I THINK!!
*/
- sctp_ulp_notify(notification, *stcb, 0, (void *)&sac_restart_id, SCTP_SO_NOT_LOCKED);
+ sctp_ulp_notify(notification, *stcb, 0, NULL, SCTP_SO_NOT_LOCKED);
if (send_int_conf) {
sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_CONFIRMED,
(*stcb), 0, (void *)netl, SCTP_SO_NOT_LOCKED);
@@ -2890,7 +2880,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset,
}
static void
-sctp_handle_cookie_ack(struct sctp_cookie_ack_chunk *cp,
+sctp_handle_cookie_ack(struct sctp_cookie_ack_chunk *cp SCTP_UNUSED,
struct sctp_tcb *stcb, struct sctp_nets *net)
{
/* cp must not be used, others call this without a c-ack :-) */
@@ -3006,7 +2996,7 @@ sctp_handle_ecn_echo(struct sctp_ecne_chunk *cp,
struct sctp_nets *net;
struct sctp_tmit_chunk *lchk;
struct sctp_ecne_chunk bkup;
- uint8_t override_bit = 0;
+ uint8_t override_bit;
uint32_t tsn, window_data_tsn;
int len;
unsigned int pkt_cnt;
@@ -3053,27 +3043,33 @@ sctp_handle_ecn_echo(struct sctp_ecne_chunk *cp,
TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
if (tsn == net->last_cwr_tsn) {
/* Found him, send it off */
- goto out;
+ break;
}
}
- /*
- * If we reach here, we need to send a special CWR that says
- * hey, we did this a long time ago and you lost the
- * response.
- */
- net = TAILQ_FIRST(&stcb->asoc.nets);
- override_bit = SCTP_CWR_REDUCE_OVERRIDE;
+ if (net == NULL) {
+ /*
+ * If we reach here, we need to send a special CWR
+ * that says hey, we did this a long time ago and
+ * you lost the response.
+ */
+ net = TAILQ_FIRST(&stcb->asoc.nets);
+ if (net == NULL) {
+ /* TSNH */
+ return;
+ }
+ override_bit = SCTP_CWR_REDUCE_OVERRIDE;
+ } else {
+ override_bit = 0;
+ }
+ } else {
+ override_bit = 0;
}
-out:
if (SCTP_TSN_GT(tsn, net->cwr_window_tsn) &&
((override_bit & SCTP_CWR_REDUCE_OVERRIDE) == 0)) {
/*
* JRS - Use the congestion control given in the pluggable
* CC module
*/
- int ocwnd;
-
- ocwnd = net->cwnd;
stcb->asoc.cc_functions.sctp_cwnd_update_after_ecn_echo(stcb, net, 0, pkt_cnt);
/*
* We reduce once every RTT. So we will only lower cwnd at
@@ -3160,7 +3156,7 @@ sctp_handle_ecn_cwr(struct sctp_cwr_chunk *cp, struct sctp_tcb *stcb, struct sct
}
static void
-sctp_handle_shutdown_complete(struct sctp_shutdown_complete_chunk *cp,
+sctp_handle_shutdown_complete(struct sctp_shutdown_complete_chunk *cp SCTP_UNUSED,
struct sctp_tcb *stcb, struct sctp_nets *net)
{
struct sctp_association *asoc;
@@ -4401,7 +4397,7 @@ __attribute__((noinline))
asconf_len = ntohs(asconf_ch->chunk_length);
if (asconf_len < sizeof(struct sctp_asconf_paramhdr))
break;
- stcb = sctp_findassociation_ep_asconf(m, iphlen,
+ stcb = sctp_findassociation_ep_asconf(m,
*offset, sh, &inp, netp, vrf_id);
if (stcb != NULL)
break;
@@ -4505,7 +4501,6 @@ __attribute__((noinline))
* process all control chunks...
*/
if (((ch->chunk_type == SCTP_SELECTIVE_ACK) ||
- /* EY */
(ch->chunk_type == SCTP_NR_SELECTIVE_ACK) ||
(ch->chunk_type == SCTP_HEARTBEAT_REQUEST)) &&
(SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_COOKIE_ECHOED)) {
@@ -4619,54 +4614,30 @@ process_control_chunks:
}
switch (ch->chunk_type) {
case SCTP_INITIATION:
- /* must be first and only chunk */
SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_INIT\n");
- if (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) {
- /* We are not interested anymore? */
- if ((stcb) && (stcb->asoc.total_output_queue_size)) {
- /*
- * collision case where we are
- * sending to them too
- */
- ;
- } else {
- if (locked_tcb) {
- SCTP_TCB_UNLOCK(locked_tcb);
- }
- *offset = length;
- return (NULL);
- }
- }
- if ((chk_length > SCTP_LARGEST_INIT_ACCEPTED) ||
- (num_chunks > 1) ||
- (SCTP_BASE_SYSCTL(sctp_strict_init) && (length - *offset > (int)SCTP_SIZE32(chk_length)))) {
+ /* The INIT chunk must be the only chunk. */
+ if ((num_chunks > 1) ||
+ (length - *offset > (int)SCTP_SIZE32(chk_length))) {
+ sctp_abort_association(inp, stcb, m,
+ iphlen, sh, NULL, vrf_id, port);
*offset = length;
- if (locked_tcb) {
- SCTP_TCB_UNLOCK(locked_tcb);
- }
return (NULL);
}
- if ((stcb != NULL) &&
- (SCTP_GET_STATE(&stcb->asoc) ==
- SCTP_STATE_SHUTDOWN_ACK_SENT)) {
- sctp_send_shutdown_ack(stcb, NULL);
+ /* Honor our resource limit. */
+ if (chk_length > SCTP_LARGEST_INIT_ACCEPTED) {
+ struct mbuf *op_err;
+
+ op_err = sctp_generate_invmanparam(SCTP_CAUSE_OUT_OF_RESC);
+ sctp_abort_association(inp, stcb, m,
+ iphlen, sh, op_err, vrf_id, port);
*offset = length;
- sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_CONTROL_PROC, SCTP_SO_NOT_LOCKED);
- if (locked_tcb) {
- SCTP_TCB_UNLOCK(locked_tcb);
- }
return (NULL);
}
- if (netp) {
- sctp_handle_init(m, iphlen, *offset, sh,
- (struct sctp_init_chunk *)ch, inp,
- stcb, *netp, &abort_no_unlock, vrf_id, port);
- }
- if (abort_no_unlock)
- return (NULL);
-
+ sctp_handle_init(m, iphlen, *offset, sh,
+ (struct sctp_init_chunk *)ch, inp,
+ stcb, &abort_no_unlock, vrf_id, port);
*offset = length;
- if (locked_tcb) {
+ if ((!abort_no_unlock) && (locked_tcb)) {
SCTP_TCB_UNLOCK(locked_tcb);
}
return (NULL);
@@ -4674,7 +4645,6 @@ process_control_chunks:
case SCTP_PAD_CHUNK:
break;
case SCTP_INITIATION_ACK:
- /* must be first and only chunk */
SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_INIT-ACK\n");
if (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) {
/* We are not interested anymore */
@@ -4703,8 +4673,9 @@ process_control_chunks:
return (NULL);
}
}
+ /* The INIT-ACK chunk must be the only chunk. */
if ((num_chunks > 1) ||
- (SCTP_BASE_SYSCTL(sctp_strict_init) && (length - *offset > (int)SCTP_SIZE32(chk_length)))) {
+ (length - *offset > (int)SCTP_SIZE32(chk_length))) {
*offset = length;
if (locked_tcb) {
SCTP_TCB_UNLOCK(locked_tcb);
@@ -4717,16 +4688,17 @@ process_control_chunks:
} else {
ret = -1;
}
+ *offset = length;
+ if (abort_no_unlock) {
+ return (NULL);
+ }
/*
* Special case, I must call the output routine to
* get the cookie echoed
*/
- if (abort_no_unlock)
- return (NULL);
-
- if ((stcb) && ret == 0)
+ if ((stcb != NULL) && (ret == 0)) {
sctp_chunk_output(stcb->sctp_ep, stcb, SCTP_OUTPUT_FROM_CONTROL_PROC, SCTP_SO_NOT_LOCKED);
- *offset = length;
+ }
if (locked_tcb) {
SCTP_TCB_UNLOCK(locked_tcb);
}
@@ -4795,8 +4767,7 @@ process_control_chunks:
sctp_express_handle_sack(stcb, cum_ack, a_rwnd, &abort_now, ecne_seen);
} else {
if (netp && *netp)
- sctp_handle_sack(m, offset_seg, offset_dup,
- stcb, *netp,
+ sctp_handle_sack(m, offset_seg, offset_dup, stcb,
num_seg, 0, num_dup, &abort_now, flags,
cum_ack, a_rwnd, ecne_seen);
}
@@ -4884,8 +4855,7 @@ process_control_chunks:
&abort_now, ecne_seen);
} else {
if (netp && *netp)
- sctp_handle_sack(m, offset_seg, offset_dup,
- stcb, *netp,
+ sctp_handle_sack(m, offset_seg, offset_dup, stcb,
num_seg, num_nr_seg, num_dup, &abort_now, flags,
cum_ack, a_rwnd, ecne_seen);
}
@@ -4985,7 +4955,6 @@ process_control_chunks:
case SCTP_OPERATION_ERROR:
SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_OP-ERR\n");
if ((stcb) && netp && *netp && sctp_handle_error(ch, stcb, *netp) < 0) {
-
*offset = length;
return (NULL);
}
@@ -5017,23 +4986,11 @@ process_control_chunks:
if ((stcb == NULL) && (inp->sctp_socket->so_qlen >= inp->sctp_socket->so_qlimit)) {
if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) &&
(SCTP_BASE_SYSCTL(sctp_abort_if_one_2_one_hits_limit))) {
- struct mbuf *oper;
- struct sctp_paramhdr *phdr;
-
- oper = sctp_get_mbuf_for_msg(sizeof(struct sctp_paramhdr),
- 0, M_DONTWAIT, 1, MT_DATA);
- if (oper) {
- SCTP_BUF_LEN(oper) =
- sizeof(struct sctp_paramhdr);
- phdr = mtod(oper,
- struct sctp_paramhdr *);
- phdr->param_type =
- htons(SCTP_CAUSE_OUT_OF_RESC);
- phdr->param_length =
- htons(sizeof(struct sctp_paramhdr));
- }
+ struct mbuf *op_err;
+
+ op_err = sctp_generate_invmanparam(SCTP_CAUSE_OUT_OF_RESC);
sctp_abort_association(inp, stcb, m,
- iphlen, sh, oper, vrf_id, port);
+ iphlen, sh, op_err, vrf_id, port);
}
*offset = length;
return (NULL);
@@ -5079,7 +5036,6 @@ process_control_chunks:
}
SCTPDBG(SCTP_DEBUG_INPUT3,
"GAK, null buffer\n");
- auth_skipped = 0;
*offset = length;
return (NULL);
}
@@ -5526,7 +5482,6 @@ sctp_common_input_processing(struct mbuf **mm, int iphlen, int offset,
uint32_t high_tsn;
int fwd_tsn_seen = 0, data_processed = 0;
struct mbuf *m = *mm;
- int abort_flag = 0;
int un_sent;
int cnt_ctrl_ready = 0;
@@ -5572,7 +5527,7 @@ sctp_common_input_processing(struct mbuf **mm, int iphlen, int offset,
inp = stcb->sctp_ep;
if ((net) && (port)) {
if (net->port == 0) {
- sctp_pathmtu_adjustment(inp, stcb, net, net->mtu - sizeof(struct udphdr));
+ sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr));
}
net->port = port;
}
@@ -5703,7 +5658,8 @@ sctp_common_input_processing(struct mbuf **mm, int iphlen, int offset,
*/
}
/* take care of ecn */
- if ((stcb->asoc.ecn_allowed == 1) &&
+ if ((data_processed == 1) &&
+ (stcb->asoc.ecn_allowed == 1) &&
((ecn_bits & SCTP_CE_BITS) == SCTP_CE_BITS)) {
/* Yep, we need to add a ECNE */
sctp_send_ecn_echo(stcb, net, high_tsn);
@@ -5719,11 +5675,7 @@ sctp_common_input_processing(struct mbuf **mm, int iphlen, int offset,
}
was_a_gap = SCTP_TSN_GT(highest_tsn, stcb->asoc.cumulative_tsn);
stcb->asoc.send_sack = 1;
- sctp_sack_check(stcb, was_a_gap, &abort_flag);
- if (abort_flag) {
- /* Again, we aborted so NO UNLOCK needed */
- goto out_now;
- }
+ sctp_sack_check(stcb, was_a_gap);
} else if (fwd_tsn_seen) {
stcb->asoc.send_sack = 1;
}
@@ -5817,12 +5769,10 @@ sctp_input_with_port(struct mbuf *i_pak, int off, uint16_t port)
#ifdef SCTP_MBUF_LOGGING
/* Log in any input mbufs */
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MBUF_LOGGING_ENABLE) {
- mat = m;
- while (mat) {
+ for (mat = m; mat; mat = SCTP_BUF_NEXT(mat)) {
if (SCTP_BUF_IS_EXTENDED(mat)) {
sctp_log_mb(mat, SCTP_MBUF_INPUT);
}
- mat = SCTP_BUF_NEXT(mat);
}
}
#endif
@@ -5891,13 +5841,13 @@ sctp_input_with_port(struct mbuf *i_pak, int off, uint16_t port)
SCTPDBG(SCTP_DEBUG_INPUT1, "Bad CSUM on SCTP packet calc_check:%x check:%x m:%p mlen:%d iphlen:%d\n",
calc_check, check, m, mlen, iphlen);
- stcb = sctp_findassociation_addr(m, iphlen,
+ stcb = sctp_findassociation_addr(m,
offset - sizeof(*ch),
sh, ch, &inp, &net,
vrf_id);
if ((net) && (port)) {
if (net->port == 0) {
- sctp_pathmtu_adjustment(inp, stcb, net, net->mtu - sizeof(struct udphdr));
+ sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr));
}
net->port = port;
}
@@ -5928,11 +5878,11 @@ sctp_skip_csum_4:
* Locate pcb and tcb for datagram sctp_findassociation_addr() wants
* IP/SCTP/first chunk header...
*/
- stcb = sctp_findassociation_addr(m, iphlen, offset - sizeof(*ch),
+ stcb = sctp_findassociation_addr(m, offset - sizeof(*ch),
sh, ch, &inp, &net, vrf_id);
if ((net) && (port)) {
if (net->port == 0) {
- sctp_pathmtu_adjustment(inp, stcb, net, net->mtu - sizeof(struct udphdr));
+ sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr));
}
net->port = port;
}
@@ -5971,14 +5921,19 @@ sctp_skip_csum_4:
sh->v_tag = init_chk->init.initiate_tag;
}
if (ch->chunk_type == SCTP_SHUTDOWN_ACK) {
- sctp_send_shutdown_complete2(m, iphlen, sh, vrf_id, port);
+ sctp_send_shutdown_complete2(m, sh, vrf_id, port);
goto bad;
}
if (ch->chunk_type == SCTP_SHUTDOWN_COMPLETE) {
goto bad;
}
- if (ch->chunk_type != SCTP_ABORT_ASSOCIATION)
- sctp_send_abort(m, iphlen, sh, 0, NULL, vrf_id, port);
+ if (ch->chunk_type != SCTP_ABORT_ASSOCIATION) {
+ if ((SCTP_BASE_SYSCTL(sctp_blackhole) == 0) ||
+ ((SCTP_BASE_SYSCTL(sctp_blackhole) == 1) &&
+ (ch->chunk_type != SCTP_INIT))) {
+ sctp_send_abort(m, iphlen, sh, 0, NULL, vrf_id, port);
+ }
+ }
goto bad;
} else if (stcb == NULL) {
refcount_up = 1;
diff --git a/sys/netinet/sctp_input.h b/sys/netinet/sctp_input.h
index fe7bf77..9a9a420 100644
--- a/sys/netinet/sctp_input.h
+++ b/sys/netinet/sctp_input.h
@@ -7,11 +7,11 @@
* modification, are permitted provided that the following conditions are met:
*
* a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
*
* b) 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.
+ * the documentation and/or other materials provided with the distribution.
*
* c) Neither the name of Cisco Systems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
diff --git a/sys/netinet/sctp_os.h b/sys/netinet/sctp_os.h
index 592574e..b3a7cf4 100644
--- a/sys/netinet/sctp_os.h
+++ b/sys/netinet/sctp_os.h
@@ -7,11 +7,11 @@
* modification, are permitted provided that the following conditions are met:
*
* a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
*
* b) 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.
+ * the documentation and/or other materials provided with the distribution.
*
* c) Neither the name of Cisco Systems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c
index fdd965a..a366036 100644
--- a/sys/netinet/sctp_output.c
+++ b/sys/netinet/sctp_output.c
@@ -7,11 +7,11 @@
* modification, are permitted provided that the following conditions are met:
*
* a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
*
* b) 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.
+ * the documentation and/or other materials provided with the distribution.
*
* c) Neither the name of Cisco Systems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
@@ -1868,7 +1868,7 @@ sctp_is_address_in_scope(struct sctp_ifa *ifa,
int ipv6_addr_legal,
int loopback_scope,
int ipv4_local_scope,
- int local_scope,
+ int local_scope SCTP_UNUSED,/* XXX */
int site_scope,
int do_update)
{
@@ -2156,23 +2156,20 @@ skip_count:
}
cnt++;
}
- if (cnt > SCTP_ADDRESS_LIMIT) {
- limit_out = 1;
- }
/*
* To get through a NAT we only list addresses if we have
* more than one. That way if you just bind a single address
* we let the source of the init dictate our address.
*/
if (cnt > 1) {
+ cnt = cnt_inits_to;
LIST_FOREACH(laddr, &inp->sctp_addr_list, sctp_nxt_addr) {
- cnt = 0;
if (laddr->ifa == NULL) {
continue;
}
- if (laddr->ifa->localifa_flags & SCTP_BEING_DELETED)
+ if (laddr->ifa->localifa_flags & SCTP_BEING_DELETED) {
continue;
-
+ }
if (sctp_is_address_in_scope(laddr->ifa,
scope->ipv4_addr_legal,
scope->ipv6_addr_legal,
@@ -2546,7 +2543,6 @@ once_again_too:
static struct sctp_ifa *
sctp_choose_boundspecific_stcb(struct sctp_inpcb *inp,
struct sctp_tcb *stcb,
- struct sctp_nets *net,
sctp_route_t * ro,
uint32_t vrf_id,
uint8_t dest_is_priv,
@@ -2865,8 +2861,7 @@ sctp_count_num_preferred_boundall(struct sctp_ifn *ifn,
}
static struct sctp_ifa *
-sctp_choose_boundall(struct sctp_inpcb *inp,
- struct sctp_tcb *stcb,
+sctp_choose_boundall(struct sctp_tcb *stcb,
struct sctp_nets *net,
sctp_route_t * ro,
uint32_t vrf_id,
@@ -2886,6 +2881,7 @@ sctp_choose_boundall(struct sctp_inpcb *inp,
int retried = 0;
#endif
+
/*-
* For boundall we can use any address in the association.
* If non_asoc_addr_ok is set we can use any address (at least in
@@ -3330,7 +3326,7 @@ sctp_source_address_selection(struct sctp_inpcb *inp,
/*
* Bound all case
*/
- answer = sctp_choose_boundall(inp, stcb, net, ro, vrf_id,
+ answer = sctp_choose_boundall(stcb, net, ro, vrf_id,
dest_is_priv, dest_is_loop,
non_asoc_addr_ok, fam);
SCTP_IPI_ADDR_RUNLOCK();
@@ -3340,7 +3336,7 @@ sctp_source_address_selection(struct sctp_inpcb *inp,
* Subset bound case
*/
if (stcb) {
- answer = sctp_choose_boundspecific_stcb(inp, stcb, net, ro,
+ answer = sctp_choose_boundspecific_stcb(inp, stcb, ro,
vrf_id, dest_is_priv,
dest_is_loop,
non_asoc_addr_ok, fam);
@@ -3691,7 +3687,7 @@ sctp_findassociation_cmsgs(struct sctp_inpcb **inp_p,
}
static struct mbuf *
-sctp_add_cookie(struct sctp_inpcb *inp, struct mbuf *init, int init_offset,
+sctp_add_cookie(struct mbuf *init, int init_offset,
struct mbuf *initack, int initack_offset, struct sctp_state_cookie *stc_in, uint8_t ** signature)
{
struct mbuf *copy_init, *copy_initack, *m_at, *sig, *mret;
@@ -3759,7 +3755,6 @@ sctp_add_cookie(struct sctp_inpcb *inp, struct mbuf *init, int init_offset,
/* tack the INIT and then the INIT-ACK onto the chain */
cookie_sz = 0;
- m_at = mret;
for (m_at = mret; m_at; m_at = SCTP_BUF_NEXT(m_at)) {
cookie_sz += SCTP_BUF_LEN(m_at);
if (SCTP_BUF_NEXT(m_at) == NULL) {
@@ -3767,7 +3762,6 @@ sctp_add_cookie(struct sctp_inpcb *inp, struct mbuf *init, int init_offset,
break;
}
}
-
for (m_at = copy_init; m_at; m_at = SCTP_BUF_NEXT(m_at)) {
cookie_sz += SCTP_BUF_LEN(m_at);
if (SCTP_BUF_NEXT(m_at) == NULL) {
@@ -3775,7 +3769,6 @@ sctp_add_cookie(struct sctp_inpcb *inp, struct mbuf *init, int init_offset,
break;
}
}
-
for (m_at = copy_initack; m_at; m_at = SCTP_BUF_NEXT(m_at)) {
cookie_sz += SCTP_BUF_LEN(m_at);
if (SCTP_BUF_NEXT(m_at) == NULL) {
@@ -3802,8 +3795,7 @@ sctp_add_cookie(struct sctp_inpcb *inp, struct mbuf *init, int init_offset,
static uint8_t
-sctp_get_ect(struct sctp_tcb *stcb,
- struct sctp_tmit_chunk *chk)
+sctp_get_ect(struct sctp_tcb *stcb)
{
if ((stcb != NULL) && (stcb->asoc.ecn_allowed == 1)) {
return (SCTP_ECT0_BIT);
@@ -3868,15 +3860,15 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp,
uint16_t auth_keyid,
int nofragment_flag,
int ecn_ok,
- struct sctp_tmit_chunk *chk,
int out_of_asoc_ok,
uint16_t src_port,
uint16_t dest_port,
uint32_t v_tag,
uint16_t port,
- int so_locked,
#if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING)
- SCTP_UNUSED
+ int so_locked SCTP_UNUSED,
+#else
+ int so_locked,
#endif
union sctp_sockstore *over_addr,
struct mbuf *init
@@ -3984,7 +3976,7 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp,
}
tos_value &= 0xfc;
if (ecn_ok) {
- tos_value |= sctp_get_ect(stcb, chk);
+ tos_value |= sctp_get_ect(stcb);
}
if ((nofragment_flag) && (port == 0)) {
ip->ip_off = IP_DF;
@@ -4296,7 +4288,7 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp,
}
tos_value &= 0xfc;
if (ecn_ok) {
- tos_value |= sctp_get_ect(stcb, chk);
+ tos_value |= sctp_get_ect(stcb);
}
flowinfo = 0x06;
flowinfo <<= 8;
@@ -4806,7 +4798,6 @@ sctp_send_initiate(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int so_locked
SCTP_BUF_LEN(m) += SCTP_SIZE32(p_len);
}
}
- m_at = m;
/* now the addresses */
{
struct sctp_scoping scp;
@@ -4815,9 +4806,10 @@ sctp_send_initiate(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int so_locked
* To optimize this we could put the scoping stuff into a
* structure and remove the individual uint8's from the
* assoc structure. Then we could just sifa in the address
- * within the stcb.. but for now this is a quick hack to get
+ * within the stcb. But for now this is a quick hack to get
* the address stuff teased apart.
*/
+
scp.ipv4_addr_legal = stcb->asoc.ipv4_addr_legal;
scp.ipv6_addr_legal = stcb->asoc.ipv6_addr_legal;
scp.loopback_scope = stcb->asoc.loopback_scope;
@@ -4825,7 +4817,7 @@ sctp_send_initiate(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int so_locked
scp.local_scope = stcb->asoc.local_scope;
scp.site_scope = stcb->asoc.site_scope;
- m_at = sctp_add_addresses_to_i_ia(inp, stcb, &scp, m_at, cnt_inits_to);
+ sctp_add_addresses_to_i_ia(inp, stcb, &scp, m, cnt_inits_to);
}
/* calulate the size and update pkt header and chunk header */
@@ -4855,12 +4847,11 @@ sctp_send_initiate(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int so_locked
sctp_m_freem(m);
return;
}
- p_len += padval;
}
SCTPDBG(SCTP_DEBUG_OUTPUT4, "Sending INIT - calls lowlevel_output\n");
ret = sctp_lowlevel_chunk_output(inp, stcb, net,
(struct sockaddr *)&net->ro._l_addr,
- m, 0, NULL, 0, 0, 0, NULL, 0,
+ m, 0, NULL, 0, 0, 0, 0,
inp->sctp_lport, stcb->rport, htonl(0),
net->port, so_locked, NULL, NULL);
SCTPDBG(SCTP_DEBUG_OUTPUT4, "lowlevel_output - %d\n", ret);
@@ -5076,7 +5067,6 @@ sctp_arethere_unrecognized_parameters(struct mbuf *in_initpkt,
return (NULL);
}
m_copyback(op_err, err_at, plen, (caddr_t)phdr);
- err_at += plen;
}
return (op_err);
break;
@@ -5209,7 +5199,7 @@ invalid_size:
static int
sctp_are_there_new_addresses(struct sctp_association *asoc,
- struct mbuf *in_initpkt, int iphlen, int offset)
+ struct mbuf *in_initpkt, int offset)
{
/*
* Given a INIT packet, look through the packet to verify that there
@@ -5319,6 +5309,7 @@ sctp_are_there_new_addresses(struct sctp_association *asoc,
p4 = (struct sctp_ipv4addr_param *)phdr;
sin4.sin_addr.s_addr = p4->addr;
sa_touse = (struct sockaddr *)&sin4;
+ break;
}
#endif
#ifdef INET6
@@ -5336,10 +5327,12 @@ sctp_are_there_new_addresses(struct sctp_association *asoc,
memcpy((caddr_t)&sin6.sin6_addr, p6->addr,
sizeof(p6->addr));
sa_touse = (struct sockaddr *)&sin6;
+ break;
}
#endif
default:
sa_touse = NULL;
+ break;
}
if (sa_touse) {
/* ok, sa_touse points to one to check */
@@ -5434,7 +5427,7 @@ sctp_send_initiate_ack(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
mp_last = NULL;
if ((asoc != NULL) &&
(SCTP_GET_STATE(asoc) != SCTP_STATE_COOKIE_WAIT) &&
- (sctp_are_there_new_addresses(asoc, init_pkt, iphlen, offset))) {
+ (sctp_are_there_new_addresses(asoc, init_pkt, offset))) {
/* new addresses, out of here in non-cookie-wait states */
/*
* Send a ABORT, we don't add the new address error clause
@@ -5548,7 +5541,7 @@ do_a_abort:
default:
goto do_a_abort;
break;
- };
+ }
if (net == NULL) {
to = (struct sockaddr *)&store;
@@ -5968,6 +5961,7 @@ do_a_abort:
llen = 0;
ol = op_err;
+
while (ol) {
llen += SCTP_BUF_LEN(ol);
ol = SCTP_BUF_NEXT(ol);
@@ -5999,7 +5993,7 @@ do_a_abort:
}
/* Now we must build a cookie */
- m_cookie = sctp_add_cookie(inp, init_pkt, offset, m, 0, &stc, &signature);
+ m_cookie = sctp_add_cookie(init_pkt, offset, m, 0, &stc, &signature);
if (m_cookie == NULL) {
/* memory problem */
sctp_m_freem(m);
@@ -6037,15 +6031,11 @@ do_a_abort:
padval = p_len % 4;
if ((padval) && (mp_last)) {
/* see my previous comments on mp_last */
- int ret;
-
- ret = sctp_add_pad_tombuf(mp_last, (4 - padval));
- if (ret) {
+ if (sctp_add_pad_tombuf(mp_last, (4 - padval))) {
/* Houston we have a problem, no space */
sctp_m_freem(m);
return;
}
- p_len += padval;
}
if (stc.loopback_scope) {
over_addr = &store1;
@@ -6054,7 +6044,7 @@ do_a_abort:
}
(void)sctp_lowlevel_chunk_output(inp, NULL, NULL, to, m, 0, NULL, 0, 0,
- 0, NULL, 0,
+ 0, 0,
inp->sctp_lport, sh->src_port, init_chk->init.initiate_tag,
port, SCTP_SO_NOT_LOCKED, over_addr, init_pkt);
SCTP_STAT_INCR_COUNTER64(sctps_outcontrolchunks);
@@ -6244,7 +6234,7 @@ sctp_msg_append(struct sctp_tcb *stcb,
struct mbuf *m,
struct sctp_sndrcvinfo *srcv, int hold_stcb_lock)
{
- int error = 0, holds_lock;
+ int error = 0;
struct mbuf *at;
struct sctp_stream_queue_pending *sp = NULL;
struct sctp_stream_out *strm;
@@ -6253,7 +6243,6 @@ sctp_msg_append(struct sctp_tcb *stcb,
* Given an mbuf chain, put it into the association send queue and
* place it on the wheel
*/
- holds_lock = hold_stcb_lock;
if (srcv->sinfo_stream >= stcb->asoc.streamoutcnt) {
/* Invalid stream number */
SCTP_LTRACE_ERR_RET_PKT(m, NULL, stcb, net, SCTP_FROM_SCTP_OUTPUT, EINVAL);
@@ -6322,7 +6311,9 @@ sctp_msg_append(struct sctp_tcb *stcb,
sctp_auth_key_acquire(stcb, sp->auth_keyid);
sp->holds_key_ref = 1;
}
- SCTP_TCB_SEND_LOCK(stcb);
+ if (hold_stcb_lock == 0) {
+ SCTP_TCB_SEND_LOCK(stcb);
+ }
sctp_snd_sb_alloc(stcb, sp->length);
atomic_add_int(&stcb->asoc.stream_queue_cnt, 1);
TAILQ_INSERT_TAIL(&strm->outqueue, sp, next);
@@ -6332,7 +6323,9 @@ sctp_msg_append(struct sctp_tcb *stcb,
}
stcb->asoc.ss_functions.sctp_ss_add_to_stream(stcb, &stcb->asoc, strm, sp, 1);
m = NULL;
- SCTP_TCB_SEND_UNLOCK(stcb);
+ if (hold_stcb_lock == 0) {
+ SCTP_TCB_SEND_UNLOCK(stcb);
+ }
out_now:
if (m) {
sctp_m_freem(m);
@@ -6518,7 +6511,7 @@ sctp_med_chunk_output(struct sctp_inpcb *inp,
static void
sctp_sendall_iterator(struct sctp_inpcb *inp, struct sctp_tcb *stcb, void *ptr,
- uint32_t val)
+ uint32_t val SCTP_UNUSED)
{
struct sctp_copy_all *ca;
struct mbuf *m;
@@ -6718,7 +6711,7 @@ no_chunk_output:
}
static void
-sctp_sendall_completes(void *ptr, uint32_t val)
+sctp_sendall_completes(void *ptr, uint32_t val SCTP_UNUSED)
{
struct sctp_copy_all *ca;
@@ -7599,7 +7592,6 @@ dont_do_it:
out_of:
if (send_lock_up) {
SCTP_TCB_SEND_UNLOCK(stcb);
- send_lock_up = 0;
}
return (to_move);
}
@@ -7614,7 +7606,7 @@ sctp_fill_outqueue(struct sctp_tcb *stcb,
)
{
struct sctp_association *asoc;
- struct sctp_stream_out *strq, *strqn;
+ struct sctp_stream_out *strq;
int goal_mtu, moved_how_much, total_moved = 0, bail = 0;
int locked, giveup;
@@ -7643,7 +7635,6 @@ sctp_fill_outqueue(struct sctp_tcb *stcb,
strq = stcb->asoc.ss_functions.sctp_ss_select_stream(stcb, net, asoc);
locked = 0;
}
- strqn = strq;
while ((goal_mtu > 0) && strq) {
giveup = 0;
bail = 0;
@@ -7956,7 +7947,7 @@ again_one_more_time:
*/
continue;
}
- ctl_cnt = bundle_at = 0;
+ bundle_at = 0;
endoutchain = outchain = NULL;
no_fragmentflg = 1;
one_chunk = 0;
@@ -8138,7 +8129,7 @@ again_one_more_time:
(struct sockaddr *)&net->ro._l_addr,
outchain, auth_offset, auth,
stcb->asoc.authinfo.active_keyid,
- no_fragmentflg, 0, NULL, asconf,
+ no_fragmentflg, 0, asconf,
inp->sctp_lport, stcb->rport,
htonl(stcb->asoc.peer_vtag),
net->port, so_locked, NULL, NULL))) {
@@ -8399,7 +8390,7 @@ again_one_more_time:
outchain,
auth_offset, auth,
stcb->asoc.authinfo.active_keyid,
- no_fragmentflg, 0, NULL, asconf,
+ no_fragmentflg, 0, asconf,
inp->sctp_lport, stcb->rport,
htonl(stcb->asoc.peer_vtag),
net->port, so_locked, NULL, NULL))) {
@@ -8654,7 +8645,6 @@ again_one_more_time:
chk->window_probe = 0;
data_list[bundle_at++] = chk;
if (bundle_at >= SCTP_MAX_DATA_BUNDLING) {
- mtu = 0;
break;
}
if (chk->sent == SCTP_DATAGRAM_UNSENT) {
@@ -8728,7 +8718,6 @@ no_data_fill:
auth_keyid,
no_fragmentflg,
bundle_at,
- data_list[0],
asconf,
inp->sctp_lport, stcb->rport,
htonl(stcb->asoc.peer_vtag),
@@ -8772,7 +8761,7 @@ no_data_fill:
} else {
asoc->ifp_had_enobuf = 0;
}
- outchain = endoutchain = NULL;
+ endoutchain = NULL;
auth = NULL;
auth_offset = 0;
if (bundle_at || hbflag) {
@@ -9236,7 +9225,7 @@ sctp_send_asconf_ack(struct sctp_tcb *stcb)
*/
struct sctp_tmit_chunk *chk;
struct sctp_asconf_ack *ack, *latest_ack;
- struct mbuf *m_ack, *m;
+ struct mbuf *m_ack;
struct sctp_nets *net = NULL;
SCTP_TCB_LOCK_ASSERT(stcb);
@@ -9315,7 +9304,6 @@ sctp_send_asconf_ack(struct sctp_tcb *stcb)
chk->data = m_ack;
chk->send_size = 0;
/* Get size */
- m = m_ack;
chk->send_size = ack->len;
chk->rec.chunk_id.id = SCTP_ASCONF_ACK;
chk->rec.chunk_id.can_take_data = 1;
@@ -9408,7 +9396,6 @@ sctp_chunk_retransmission(struct sctp_inpcb *inp,
ctl_cnt++;
if (chk->rec.chunk_id.id == SCTP_FORWARD_CUM_TSN) {
fwd_tsn = 1;
- fwd = chk;
}
/*
* Add an AUTH chunk, if chunk requires it save the
@@ -9440,13 +9427,13 @@ sctp_chunk_retransmission(struct sctp_inpcb *inp,
if ((error = sctp_lowlevel_chunk_output(inp, stcb, chk->whoTo,
(struct sockaddr *)&chk->whoTo->ro._l_addr, m,
auth_offset, auth, stcb->asoc.authinfo.active_keyid,
- no_fragmentflg, 0, NULL, 0,
+ no_fragmentflg, 0, 0,
inp->sctp_lport, stcb->rport, htonl(stcb->asoc.peer_vtag),
chk->whoTo->port, so_locked, NULL, NULL))) {
SCTP_STAT_INCR(sctps_lowlevelerr);
return (error);
}
- m = endofchain = NULL;
+ endofchain = NULL;
auth = NULL;
auth_offset = 0;
/*
@@ -9616,16 +9603,13 @@ one_chunk_around:
* now are there anymore forward from chk to pick
* up?
*/
- fwd = TAILQ_NEXT(chk, sctp_next);
- while (fwd) {
+ for (fwd = TAILQ_NEXT(chk, sctp_next); fwd != NULL; fwd = TAILQ_NEXT(fwd, sctp_next)) {
if (fwd->sent != SCTP_DATAGRAM_RESEND) {
/* Nope, not for retran */
- fwd = TAILQ_NEXT(fwd, sctp_next);
continue;
}
if (fwd->whoTo != net) {
/* Nope, not the net in question */
- fwd = TAILQ_NEXT(fwd, sctp_next);
continue;
}
if (data_auth_reqd && (auth == NULL)) {
@@ -9673,7 +9657,6 @@ one_chunk_around:
if (bundle_at >= SCTP_MAX_DATA_BUNDLING) {
break;
}
- fwd = TAILQ_NEXT(fwd, sctp_next);
} else {
/* can't fit so we are done */
break;
@@ -9698,14 +9681,14 @@ one_chunk_around:
if ((error = sctp_lowlevel_chunk_output(inp, stcb, net,
(struct sockaddr *)&net->ro._l_addr, m,
auth_offset, auth, auth_keyid,
- no_fragmentflg, 0, NULL, 0,
+ no_fragmentflg, 0, 0,
inp->sctp_lport, stcb->rport, htonl(stcb->asoc.peer_vtag),
net->port, so_locked, NULL, NULL))) {
/* error, we could not output */
SCTP_STAT_INCR(sctps_lowlevelerr);
return (error);
}
- m = endofchain = NULL;
+ endofchain = NULL;
auth = NULL;
auth_offset = 0;
/* For HB's */
@@ -10137,13 +10120,13 @@ sctp_chunk_output(struct sctp_inpcb *inp,
int
-sctp_output(inp, m, addr, control, p, flags)
- struct sctp_inpcb *inp;
- struct mbuf *m;
- struct sockaddr *addr;
- struct mbuf *control;
- struct thread *p;
- int flags;
+sctp_output(
+ struct sctp_inpcb *inp,
+ struct mbuf *m,
+ struct sockaddr *addr,
+ struct mbuf *control,
+ struct thread *p,
+ int flags)
{
if (inp == NULL) {
SCTP_LTRACE_ERR_RET_PKT(m, inp, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, EINVAL);
@@ -10267,12 +10250,14 @@ sctp_fill_in_rest:
* we report.
*/
at = TAILQ_FIRST(&asoc->sent_queue);
- for (i = 0; i < cnt_of_skipped; i++) {
- tp1 = TAILQ_NEXT(at, sctp_next);
- if (tp1 == NULL) {
- break;
+ if (at != NULL) {
+ for (i = 0; i < cnt_of_skipped; i++) {
+ tp1 = TAILQ_NEXT(at, sctp_next);
+ if (tp1 == NULL) {
+ break;
+ }
+ at = tp1;
}
- at = tp1;
}
if (at && SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOG_TRY_ADVANCE) {
sctp_misc_ints(SCTP_FWD_TSN_CHECK,
@@ -10336,7 +10321,6 @@ sctp_fill_in_rest:
}
}
return;
-
}
void
@@ -10817,7 +10801,7 @@ sctp_send_abort_tcb(struct sctp_tcb *stcb, struct mbuf *operr, int so_locked
(void)sctp_lowlevel_chunk_output(stcb->sctp_ep, stcb, net,
(struct sockaddr *)&net->ro._l_addr,
- m_out, auth_offset, auth, stcb->asoc.authinfo.active_keyid, 1, 0, NULL, 0,
+ m_out, auth_offset, auth, stcb->asoc.authinfo.active_keyid, 1, 0, 0,
stcb->sctp_ep->sctp_lport, stcb->rport, htonl(stcb->asoc.peer_vtag),
stcb->asoc.primary_destination->port, so_locked, NULL, NULL);
SCTP_STAT_INCR_COUNTER64(sctps_outcontrolchunks);
@@ -10853,7 +10837,7 @@ sctp_send_shutdown_complete(struct sctp_tcb *stcb,
SCTP_BUF_LEN(m_shutdown_comp) = sizeof(struct sctp_shutdown_complete_chunk);
(void)sctp_lowlevel_chunk_output(stcb->sctp_ep, stcb, net,
(struct sockaddr *)&net->ro._l_addr,
- m_shutdown_comp, 0, NULL, 0, 1, 0, NULL, 0,
+ m_shutdown_comp, 0, NULL, 0, 1, 0, 0,
stcb->sctp_ep->sctp_lport, stcb->rport,
htonl(vtag),
net->port, SCTP_SO_NOT_LOCKED, NULL, NULL);
@@ -10862,7 +10846,7 @@ sctp_send_shutdown_complete(struct sctp_tcb *stcb,
}
void
-sctp_send_shutdown_complete2(struct mbuf *m, int iphlen, struct sctphdr *sh,
+sctp_send_shutdown_complete2(struct mbuf *m, struct sctphdr *sh,
uint32_t vrf_id, uint16_t port)
{
/* formulate and SEND a SHUTDOWN-COMPLETE */
@@ -12348,9 +12332,7 @@ sctp_send_operr_to(struct mbuf *m, int iphlen, struct mbuf *scm, uint32_t vtag,
}
static struct mbuf *
-sctp_copy_resume(struct sctp_stream_queue_pending *sp,
- struct uio *uio,
- struct sctp_sndrcvinfo *srcv,
+sctp_copy_resume(struct uio *uio,
int max_send_len,
int user_marks_eor,
int *error,
@@ -12399,8 +12381,7 @@ sctp_copy_it_in(struct sctp_tcb *stcb,
struct sctp_nets *net,
int max_send_len,
int user_marks_eor,
- int *error,
- int non_blocking)
+ int *error)
{
/*-
* This routine must be very careful in its work. Protocol
@@ -12858,9 +12839,9 @@ sctp_lower_sosend(struct socket *so,
goto out_unlocked;
}
}
- if ((SCTP_SO_IS_NBIO(so)
+ if (SCTP_SO_IS_NBIO(so)
|| (flags & MSG_NBIO)
- )) {
+ ) {
non_blocking = 1;
}
/* would we block? */
@@ -12949,15 +12930,12 @@ sctp_lower_sosend(struct socket *so,
if (top) {
struct mbuf *cntm = NULL;
- mm = sctp_get_mbuf_for_msg(1, 0, M_WAIT, 1, MT_DATA);
+ mm = sctp_get_mbuf_for_msg(sizeof(struct sctp_paramhdr), 0, M_WAIT, 1, MT_DATA);
if (sndlen != 0) {
- cntm = top;
- while (cntm) {
+ for (cntm = top; cntm; cntm = SCTP_BUF_NEXT(cntm)) {
tot_out += SCTP_BUF_LEN(cntm);
- cntm = SCTP_BUF_NEXT(cntm);
}
}
- tot_demand = (tot_out + sizeof(struct sctp_paramhdr));
} else {
/* Must fit in a MTU */
tot_out = sndlen;
@@ -13008,7 +12986,6 @@ sctp_lower_sosend(struct socket *so,
}
if (hold_tcblock == 0) {
SCTP_TCB_LOCK(stcb);
- hold_tcblock = 1;
}
atomic_add_int(&stcb->asoc.refcnt, -1);
free_cnt_applied = 0;
@@ -13105,7 +13082,7 @@ sctp_lower_sosend(struct socket *so,
stcb->asoc.chunks_on_out_queue,
SCTP_BASE_SYSCTL(sctp_max_chunks_on_queue));
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_BLK_LOGGING_ENABLE) {
- sctp_log_block(SCTP_BLOCK_LOG_INTO_BLKA, so, asoc, sndlen);
+ sctp_log_block(SCTP_BLOCK_LOG_INTO_BLKA, asoc, sndlen);
}
be.error = 0;
stcb->block_entry = &be;
@@ -13124,7 +13101,7 @@ sctp_lower_sosend(struct socket *so,
}
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_BLK_LOGGING_ENABLE) {
sctp_log_block(SCTP_BLOCK_LOG_OUTOF_BLK,
- so, asoc, stcb->asoc.total_output_queue_size);
+ asoc, stcb->asoc.total_output_queue_size);
}
if (stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) {
goto out_unlocked;
@@ -13174,7 +13151,7 @@ skip_preblock:
strm = &stcb->asoc.strmout[srcv->sinfo_stream];
if (strm->last_msg_incomplete == 0) {
do_a_copy_in:
- sp = sctp_copy_it_in(stcb, asoc, srcv, uio, net, max_len, user_marks_eor, &error, non_blocking);
+ sp = sctp_copy_it_in(stcb, asoc, srcv, uio, net, max_len, user_marks_eor, &error);
if ((sp == NULL) || (error)) {
goto out;
}
@@ -13242,7 +13219,7 @@ skip_preblock:
SCTP_TCB_UNLOCK(stcb);
hold_tcblock = 0;
}
- mm = sctp_copy_resume(sp, uio, srcv, max_len, user_marks_eor, &error, &sndout, &new_tail);
+ mm = sctp_copy_resume(uio, max_len, user_marks_eor, &error, &sndout, &new_tail);
if ((mm == NULL) || error) {
if (mm) {
sctp_m_freem(mm);
@@ -13424,7 +13401,7 @@ skip_preblock:
min(SCTP_BASE_SYSCTL(sctp_add_more_threshold), SCTP_SB_LIMIT_SND(so)))) {
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_BLK_LOGGING_ENABLE) {
sctp_log_block(SCTP_BLOCK_LOG_INTO_BLK,
- so, asoc, uio->uio_resid);
+ asoc, uio->uio_resid);
}
be.error = 0;
stcb->block_entry = &be;
@@ -13444,7 +13421,7 @@ skip_preblock:
}
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_BLK_LOGGING_ENABLE) {
sctp_log_block(SCTP_BLOCK_LOG_OUTOF_BLK,
- so, asoc, stcb->asoc.total_output_queue_size);
+ asoc, stcb->asoc.total_output_queue_size);
}
}
SOCKBUF_UNLOCK(&so->so_snd);
@@ -13646,8 +13623,6 @@ skip_out_eof:
stcb->asoc.total_flight,
stcb->asoc.chunks_on_out_queue, stcb->asoc.total_flight_count);
}
- if (queue_only_for_init)
- queue_only_for_init = 0;
if ((queue_only == 0) && (nagle_applies == 0) && (stcb->asoc.peers_rwnd && un_sent)) {
/* we can attempt to send too. */
if (hold_tcblock == 0) {
@@ -13693,11 +13668,9 @@ out_unlocked:
if (local_soresv && stcb) {
atomic_subtract_int(&stcb->asoc.sb_send_resv, sndlen);
- local_soresv = 0;
}
if (create_lock_applied) {
SCTP_ASOC_CREATE_UNLOCK(inp);
- create_lock_applied = 0;
}
if ((stcb) && hold_tcblock) {
SCTP_TCB_UNLOCK(stcb);
@@ -13743,6 +13716,7 @@ sctp_add_auth_chunk(struct mbuf *m, struct mbuf **m_end,
struct mbuf *m_auth;
struct sctp_auth_chunk *auth;
int chunk_len;
+ struct mbuf *cn;
if ((m_end == NULL) || (auth_ret == NULL) || (offset == NULL) ||
(stcb == NULL))
@@ -13780,17 +13754,10 @@ sctp_add_auth_chunk(struct mbuf *m, struct mbuf **m_end,
/* key id and hmac digest will be computed and filled in upon send */
/* save the offset where the auth was inserted into the chain */
- if (m != NULL) {
- struct mbuf *cn;
-
- *offset = 0;
- cn = m;
- while (cn) {
- *offset += SCTP_BUF_LEN(cn);
- cn = SCTP_BUF_NEXT(cn);
- }
- } else
- *offset = 0;
+ *offset = 0;
+ for (cn = m; cn; cn = SCTP_BUF_NEXT(cn)) {
+ *offset += SCTP_BUF_LEN(cn);
+ }
/* update length and return pointer to the auth chunk */
SCTP_BUF_LEN(m_auth) = chunk_len;
@@ -13830,8 +13797,7 @@ sctp_v6src_match_nexthop(struct sockaddr_in6 *src6, sctp_route_t * ro)
SCTPDBG_ADDR(SCTP_DEBUG_OUTPUT2, (struct sockaddr *)src6);
/* search installed gateway from prefix entry */
- for (pfxrtr = pfx->ndpr_advrtrs.lh_first; pfxrtr; pfxrtr =
- pfxrtr->pfr_next) {
+ LIST_FOREACH(pfxrtr, &pfx->ndpr_advrtrs, pfr_entry) {
memset(&gw6, 0, sizeof(struct sockaddr_in6));
gw6.sin6_family = AF_INET6;
gw6.sin6_len = sizeof(struct sockaddr_in6);
diff --git a/sys/netinet/sctp_output.h b/sys/netinet/sctp_output.h
index 68a08c1..01b2821 100644
--- a/sys/netinet/sctp_output.h
+++ b/sys/netinet/sctp_output.h
@@ -7,11 +7,11 @@
* modification, are permitted provided that the following conditions are met:
*
* a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
*
* b) 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.
+ * the documentation and/or other materials provided with the distribution.
*
* c) Neither the name of Cisco Systems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
@@ -117,7 +117,7 @@ void sctp_send_shutdown_ack(struct sctp_tcb *, struct sctp_nets *);
void sctp_send_shutdown_complete(struct sctp_tcb *, struct sctp_nets *, int);
void
-sctp_send_shutdown_complete2(struct mbuf *, int, struct sctphdr *,
+sctp_send_shutdown_complete2(struct mbuf *, struct sctphdr *,
uint32_t, uint16_t);
void sctp_send_asconf(struct sctp_tcb *, struct sctp_nets *, int addr_locked);
diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c
index feff4f9..f81d638 100644
--- a/sys/netinet/sctp_pcb.c
+++ b/sys/netinet/sctp_pcb.c
@@ -7,11 +7,11 @@
* modification, are permitted provided that the following conditions are met:
*
* a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
*
* b) 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.
+ * the documentation and/or other materials provided with the distribution.
*
* c) Neither the name of Cisco Systems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
@@ -69,11 +69,11 @@ SCTP6_ARE_ADDR_EQUAL(struct sockaddr_in6 *a, struct sockaddr_in6 *b)
memcpy(&tmp_a, a, sizeof(struct sockaddr_in6));
if (sa6_embedscope(&tmp_a, MODULE_GLOBAL(ip6_use_defzone)) != 0) {
- return 0;
+ return (0);
}
memcpy(&tmp_b, b, sizeof(struct sockaddr_in6));
if (sa6_embedscope(&tmp_b, MODULE_GLOBAL(ip6_use_defzone)) != 0) {
- return 0;
+ return (0);
}
return (IN6_ARE_ADDR_EQUAL(&tmp_a.sin6_addr, &tmp_b.sin6_addr));
}
@@ -439,8 +439,6 @@ sctp_add_ifa_to_ifn(struct sctp_ifn *sctp_ifnp, struct sctp_ifa *sctp_ifap)
static void
sctp_remove_ifa_from_ifn(struct sctp_ifa *sctp_ifap)
{
- uint32_t ifn_index;
-
LIST_REMOVE(sctp_ifap, next_ifa);
if (sctp_ifap->ifn_p) {
/* update address counts */
@@ -460,7 +458,6 @@ sctp_remove_ifa_from_ifn(struct sctp_ifa *sctp_ifap)
break;
}
- ifn_index = sctp_ifap->ifn_p->ifn_index;
if (LIST_EMPTY(&sctp_ifap->ifn_p->ifalist)) {
/* remove the ifn, possibly freeing it */
sctp_delete_ifn(sctp_ifap->ifn_p, SCTP_ADDR_LOCKED);
@@ -468,13 +465,13 @@ sctp_remove_ifa_from_ifn(struct sctp_ifa *sctp_ifap)
/* re-register address family type, if needed */
if ((sctp_ifap->ifn_p->num_v6 == 0) &&
(sctp_ifap->ifn_p->registered_af == AF_INET6)) {
- SCTP_DEREGISTER_INTERFACE(ifn_index, AF_INET6);
- SCTP_REGISTER_INTERFACE(ifn_index, AF_INET);
+ SCTP_DEREGISTER_INTERFACE(sctp_ifap->ifn_p->ifn_index, AF_INET6);
+ SCTP_REGISTER_INTERFACE(sctp_ifap->ifn_p->ifn_index, AF_INET);
sctp_ifap->ifn_p->registered_af = AF_INET;
} else if ((sctp_ifap->ifn_p->num_v4 == 0) &&
(sctp_ifap->ifn_p->registered_af == AF_INET)) {
- SCTP_DEREGISTER_INTERFACE(ifn_index, AF_INET);
- SCTP_REGISTER_INTERFACE(ifn_index, AF_INET6);
+ SCTP_DEREGISTER_INTERFACE(sctp_ifap->ifn_p->ifn_index, AF_INET);
+ SCTP_REGISTER_INTERFACE(sctp_ifap->ifn_p->ifn_index, AF_INET6);
sctp_ifap->ifn_p->registered_af = AF_INET6;
}
/* free the ifn refcount */
@@ -1837,13 +1834,13 @@ sctp_pcb_findep(struct sockaddr *nam, int find_tcp_pool, int have_lock,
#ifdef INET
case AF_INET:
sin = (struct sockaddr_in *)nam;
- lport = ((struct sockaddr_in *)nam)->sin_port;
+ lport = sin->sin_port;
break;
#endif
#ifdef INET6
case AF_INET6:
sin6 = (struct sockaddr_in6 *)nam;
- lport = ((struct sockaddr_in6 *)nam)->sin6_port;
+ lport = sin6->sin6_port;
break;
#endif
default:
@@ -1949,7 +1946,7 @@ sctp_findassociation_addr_sa(struct sockaddr *to, struct sockaddr *from,
* address will be used to lookup the TCB and see if one exits.
*/
static struct sctp_tcb *
-sctp_findassociation_special_addr(struct mbuf *m, int iphlen, int offset,
+sctp_findassociation_special_addr(struct mbuf *m, int offset,
struct sctphdr *sh, struct sctp_inpcb **inp_p, struct sctp_nets **netp,
struct sockaddr *dest)
{
@@ -2069,6 +2066,10 @@ sctp_findassoc_by_vtag(struct sockaddr *from, struct sockaddr *to, uint32_t vtag
SCTP_INP_RUNLOCK(stcb->sctp_ep);
continue;
}
+ if (stcb->sctp_ep->def_vrf_id != vrf_id) {
+ SCTP_INP_RUNLOCK(stcb->sctp_ep);
+ continue;
+ }
SCTP_TCB_LOCK(stcb);
SCTP_INP_RUNLOCK(stcb->sctp_ep);
if (stcb->asoc.my_vtag == vtag) {
@@ -2108,7 +2109,7 @@ sctp_findassoc_by_vtag(struct sockaddr *from, struct sockaddr *to, uint32_t vtag
if (skip_src_check) {
conclusive:
if (from) {
- net = sctp_findnet(stcb, from);
+ *netp = sctp_findnet(stcb, from);
} else {
*netp = NULL; /* unknown */
}
@@ -2144,7 +2145,7 @@ sctp_findassoc_by_vtag(struct sockaddr *from, struct sockaddr *to, uint32_t vtag
* a IPv4 or IPv6 packet.
*/
struct sctp_tcb *
-sctp_findassociation_addr(struct mbuf *m, int iphlen, int offset,
+sctp_findassociation_addr(struct mbuf *m, int offset,
struct sctphdr *sh, struct sctp_chunkhdr *ch,
struct sctp_inpcb **inp_p, struct sctp_nets **netp, uint32_t vrf_id)
{
@@ -2284,7 +2285,7 @@ sctp_findassociation_addr(struct mbuf *m, int iphlen, int offset,
}
return (NULL);
}
- retval = sctp_findassociation_special_addr(m, iphlen,
+ retval = sctp_findassociation_special_addr(m,
offset, sh, &inp, netp, to);
if (inp_p != NULL) {
*inp_p = inp;
@@ -2300,7 +2301,7 @@ sctp_findassociation_addr(struct mbuf *m, int iphlen, int offset,
* if the lookup address is 0.0.0.0 or ::0, use the vtag to do the lookup
*/
struct sctp_tcb *
-sctp_findassociation_ep_asconf(struct mbuf *m, int iphlen, int offset,
+sctp_findassociation_ep_asconf(struct mbuf *m, int offset,
struct sctphdr *sh, struct sctp_inpcb **inp_p, struct sctp_nets **netp, uint32_t vrf_id)
{
struct sctp_tcb *stcb;
@@ -3306,7 +3307,6 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, int from)
* freeing. a) Any local lists. b) Any associations. c) The hash of
* all associations. d) finally the ep itself.
*/
- struct sctp_pcb *m;
struct sctp_tcb *asoc, *nasoc;
struct sctp_laddr *laddr, *nladdr;
struct inpcb *ip_pcb;
@@ -3357,7 +3357,6 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, int from)
sctp_m_freem(inp->pkt);
inp->pkt = NULL;
}
- m = &inp->sctp_ep;
ip_pcb = &inp->ip_inp.inp; /* we could just cast the main pointer
* here but I will be nice :> (i.e.
* ip_pcb = ep;) */
@@ -3405,8 +3404,7 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, int from)
if ((asoc->asoc.size_on_reasm_queue > 0) ||
(asoc->asoc.control_pdapi) ||
(asoc->asoc.size_on_all_streams > 0) ||
- (so && (so->so_rcv.sb_cc > 0))
- ) {
+ (so && (so->so_rcv.sb_cc > 0))) {
/* Left with Data unread */
struct mbuf *op_err;
@@ -3714,7 +3712,6 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, int from)
* macro here since le_next will get freed as part of the
* sctp_free_assoc() call.
*/
- cnt = 0;
if (so) {
#ifdef IPSEC
ipsec_delete_pcbpolicy(ip_pcb);
@@ -5544,7 +5541,6 @@ sctp_del_local_addr_ep(struct sctp_inpcb *inp, struct sctp_ifa *ifa)
void
sctp_add_local_addr_restricted(struct sctp_tcb *stcb, struct sctp_ifa *ifa)
{
- struct sctp_inpcb *inp;
struct sctp_laddr *laddr;
struct sctpladdr *list;
@@ -5554,7 +5550,6 @@ sctp_add_local_addr_restricted(struct sctp_tcb *stcb, struct sctp_ifa *ifa)
*/
list = &stcb->asoc.sctp_restricted_addrs;
- inp = stcb->sctp_ep;
#ifdef INET6
if (ifa->address.sa.sa_family == AF_INET6) {
if (ifa->localifa_flags & SCTP_ADDR_IFA_UNUSEABLE) {
@@ -5734,7 +5729,7 @@ sctp_mcore_thread(void *arg)
/* Now lets start working */
SCTP_MCORE_LOCK(wkq);
/* Now grab lock and go */
- while (1) {
+ for (;;) {
SCTP_MCORE_QLOCK(wkq);
skip_sleep:
wkq->running = 1;
@@ -5764,7 +5759,7 @@ skip_sleep:
msleep(&wkq->running,
&wkq->core_mtx,
0, "wait for pkt", 0);
- };
+ }
}
static void
@@ -6101,7 +6096,7 @@ sctp_pcb_finish(void)
int
sctp_load_addresses_from_init(struct sctp_tcb *stcb, struct mbuf *m,
- int iphlen, int offset, int limit, struct sctphdr *sh,
+ int offset, int limit, struct sctphdr *sh,
struct sockaddr *altsa)
{
/*
@@ -6111,7 +6106,7 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, struct mbuf *m,
* with either INIT or INIT-ACK's as long as the m points to the IP
* packet and the offset points to the beginning of the parameters.
*/
- struct sctp_inpcb *inp, *l_inp;
+ struct sctp_inpcb *inp;
struct sctp_nets *net, *nnet, *net_tmp;
struct ip *iph;
struct sctp_paramhdr *phdr, parm_buf;
@@ -6225,8 +6220,7 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, struct mbuf *m,
net->dest_state |= SCTP_ADDR_NOT_IN_ASSOC;
}
/* does the source address already exist? if so skip it */
- l_inp = inp = stcb->sctp_ep;
-
+ inp = stcb->sctp_ep;
atomic_add_int(&stcb->asoc.refcnt, 1);
stcb_tmp = sctp_findassociation_ep_addr(&inp, sa, &net_tmp, local_sa, stcb);
atomic_add_int(&stcb->asoc.refcnt, -1);
@@ -6816,7 +6810,7 @@ sctp_set_primary_addr(struct sctp_tcb *stcb, struct sockaddr *sa,
}
int
-sctp_is_vtag_good(struct sctp_inpcb *inp, uint32_t tag, uint16_t lport, uint16_t rport, struct timeval *now, int save_in_twait)
+sctp_is_vtag_good(uint32_t tag, uint16_t lport, uint16_t rport, struct timeval *now)
{
/*
* This function serves two purposes. It will see if a TAG can be
@@ -6896,7 +6890,7 @@ skip_vtag_check:
}
static void
-sctp_drain_mbufs(struct sctp_inpcb *inp, struct sctp_tcb *stcb)
+sctp_drain_mbufs(struct sctp_tcb *stcb)
{
/*
* We must hunt this association for MBUF's past the cumack (i.e.
@@ -7041,7 +7035,7 @@ sctp_drain()
LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) {
/* For each association */
SCTP_TCB_LOCK(stcb);
- sctp_drain_mbufs(inp, stcb);
+ sctp_drain_mbufs(stcb);
SCTP_TCB_UNLOCK(stcb);
}
SCTP_INP_RUNLOCK(inp);
diff --git a/sys/netinet/sctp_pcb.h b/sys/netinet/sctp_pcb.h
index ce12265..d8e7484 100644
--- a/sys/netinet/sctp_pcb.h
+++ b/sys/netinet/sctp_pcb.h
@@ -6,11 +6,11 @@
* modification, are permitted provided that the following conditions are met:
*
* a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
*
* b) 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.
+ * the documentation and/or other materials provided with the distribution.
*
* c) Neither the name of Cisco Systems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
@@ -527,7 +527,7 @@ sctp_inpcb_bind(struct socket *, struct sockaddr *,
struct sctp_ifa *, struct thread *);
struct sctp_tcb *
-sctp_findassociation_addr(struct mbuf *, int, int,
+sctp_findassociation_addr(struct mbuf *, int,
struct sctphdr *, struct sctp_chunkhdr *, struct sctp_inpcb **,
struct sctp_nets **, uint32_t vrf_id);
@@ -558,7 +558,7 @@ sctp_findassociation_ep_asocid(struct sctp_inpcb *,
sctp_assoc_t, int);
struct sctp_tcb *
-sctp_findassociation_ep_asconf(struct mbuf *, int, int,
+sctp_findassociation_ep_asconf(struct mbuf *, int,
struct sctphdr *, struct sctp_inpcb **, struct sctp_nets **, uint32_t vrf_id);
int sctp_inpcb_alloc(struct socket *so, uint32_t vrf_id);
@@ -603,14 +603,14 @@ void sctp_add_local_addr_restricted(struct sctp_tcb *, struct sctp_ifa *);
void sctp_del_local_addr_restricted(struct sctp_tcb *, struct sctp_ifa *);
int
-sctp_load_addresses_from_init(struct sctp_tcb *, struct mbuf *, int, int,
+sctp_load_addresses_from_init(struct sctp_tcb *, struct mbuf *, int,
int, struct sctphdr *, struct sockaddr *);
int
sctp_set_primary_addr(struct sctp_tcb *, struct sockaddr *,
struct sctp_nets *);
-int sctp_is_vtag_good(struct sctp_inpcb *, uint32_t, uint16_t lport, uint16_t rport, struct timeval *, int);
+int sctp_is_vtag_good(uint32_t, uint16_t lport, uint16_t rport, struct timeval *);
/* void sctp_drain(void); */
diff --git a/sys/netinet/sctp_peeloff.c b/sys/netinet/sctp_peeloff.c
index 548966d..b425add 100644
--- a/sys/netinet/sctp_peeloff.c
+++ b/sys/netinet/sctp_peeloff.c
@@ -7,11 +7,11 @@
* modification, are permitted provided that the following conditions are met:
*
* a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
*
* b) 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.
+ * the documentation and/or other materials provided with the distribution.
*
* c) Neither the name of Cisco Systems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
diff --git a/sys/netinet/sctp_peeloff.h b/sys/netinet/sctp_peeloff.h
index 5499bfd..e552f56 100644
--- a/sys/netinet/sctp_peeloff.h
+++ b/sys/netinet/sctp_peeloff.h
@@ -7,11 +7,11 @@
* modification, are permitted provided that the following conditions are met:
*
* a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
*
* b) 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.
+ * the documentation and/or other materials provided with the distribution.
*
* c) Neither the name of Cisco Systems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
diff --git a/sys/netinet/sctp_ss_functions.c b/sys/netinet/sctp_ss_functions.c
index 2212181..e586647 100644
--- a/sys/netinet/sctp_ss_functions.c
+++ b/sys/netinet/sctp_ss_functions.c
@@ -7,11 +7,11 @@
* modification, are permitted provided that the following conditions are met:
*
* a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
*
* b) 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.
+ * the documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
@@ -68,7 +68,7 @@ sctp_ss_default_init(struct sctp_tcb *stcb, struct sctp_association *asoc,
static void
sctp_ss_default_clear(struct sctp_tcb *stcb, struct sctp_association *asoc,
- int clear_values, int holds_lock)
+ int clear_values SCTP_UNUSED, int holds_lock)
{
if (holds_lock == 0) {
SCTP_TCB_SEND_LOCK(stcb);
@@ -88,7 +88,7 @@ sctp_ss_default_clear(struct sctp_tcb *stcb, struct sctp_association *asoc,
}
static void
-sctp_ss_default_init_stream(struct sctp_stream_out *strq, struct sctp_stream_out *with_strq)
+sctp_ss_default_init_stream(struct sctp_stream_out *strq, struct sctp_stream_out *with_strq SCTP_UNUSED)
{
strq->ss_params.rr.next_spoke.tqe_next = NULL;
strq->ss_params.rr.next_spoke.tqe_prev = NULL;
@@ -98,7 +98,7 @@ sctp_ss_default_init_stream(struct sctp_stream_out *strq, struct sctp_stream_out
static void
sctp_ss_default_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
struct sctp_stream_out *strq,
- struct sctp_stream_queue_pending *sp, int holds_lock)
+ struct sctp_stream_queue_pending *sp SCTP_UNUSED, int holds_lock)
{
if (holds_lock == 0) {
SCTP_TCB_SEND_LOCK(stcb);
@@ -117,7 +117,7 @@ sctp_ss_default_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
}
static int
-sctp_ss_default_is_empty(struct sctp_tcb *stcb, struct sctp_association *asoc)
+sctp_ss_default_is_empty(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_association *asoc)
{
if (TAILQ_EMPTY(&asoc->ss_data.out_wheel)) {
return (1);
@@ -129,7 +129,7 @@ sctp_ss_default_is_empty(struct sctp_tcb *stcb, struct sctp_association *asoc)
static void
sctp_ss_default_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
struct sctp_stream_out *strq,
- struct sctp_stream_queue_pending *sp, int holds_lock)
+ struct sctp_stream_queue_pending *sp SCTP_UNUSED, int holds_lock)
{
if (holds_lock == 0) {
SCTP_TCB_SEND_LOCK(stcb);
@@ -165,7 +165,7 @@ sctp_ss_default_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
static struct sctp_stream_out *
-sctp_ss_default_select(struct sctp_tcb *stcb, struct sctp_nets *net,
+sctp_ss_default_select(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_nets *net,
struct sctp_association *asoc)
{
struct sctp_stream_out *strq, *strqt;
@@ -208,33 +208,33 @@ default_again:
}
static void
-sctp_ss_default_scheduled(struct sctp_tcb *stcb, struct sctp_nets *net,
- struct sctp_association *asoc,
- struct sctp_stream_out *strq, int moved_how_much)
+sctp_ss_default_scheduled(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_nets *net SCTP_UNUSED,
+ struct sctp_association *asoc SCTP_UNUSED,
+ struct sctp_stream_out *strq, int moved_how_much SCTP_UNUSED)
{
asoc->last_out_stream = strq;
return;
}
static void
-sctp_ss_default_packet_done(struct sctp_tcb *stcb, struct sctp_nets *net,
- struct sctp_association *asoc)
+sctp_ss_default_packet_done(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_nets *net SCTP_UNUSED,
+ struct sctp_association *asoc SCTP_UNUSED)
{
/* Nothing to be done here */
return;
}
static int
-sctp_ss_default_get_value(struct sctp_tcb *stcb, struct sctp_association *asoc,
- struct sctp_stream_out *strq, uint16_t * value)
+sctp_ss_default_get_value(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_association *asoc SCTP_UNUSED,
+ struct sctp_stream_out *strq SCTP_UNUSED, uint16_t * value SCTP_UNUSED)
{
/* Nothing to be done here */
return (-1);
}
static int
-sctp_ss_default_set_value(struct sctp_tcb *stcb, struct sctp_association *asoc,
- struct sctp_stream_out *strq, uint16_t value)
+sctp_ss_default_set_value(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_association *asoc SCTP_UNUSED,
+ struct sctp_stream_out *strq SCTP_UNUSED, uint16_t value SCTP_UNUSED)
{
/* Nothing to be done here */
return (-1);
@@ -247,7 +247,7 @@ sctp_ss_default_set_value(struct sctp_tcb *stcb, struct sctp_association *asoc,
static void
sctp_ss_rr_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
struct sctp_stream_out *strq,
- struct sctp_stream_queue_pending *sp, int holds_lock)
+ struct sctp_stream_queue_pending *sp SCTP_UNUSED, int holds_lock)
{
struct sctp_stream_out *strqt;
@@ -283,14 +283,14 @@ sctp_ss_rr_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
* only fills messages of the same stream in a packet.
*/
static struct sctp_stream_out *
-sctp_ss_rrp_select(struct sctp_tcb *stcb, struct sctp_nets *net,
+sctp_ss_rrp_select(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_nets *net SCTP_UNUSED,
struct sctp_association *asoc)
{
- return asoc->last_out_stream;
+ return (asoc->last_out_stream);
}
static void
-sctp_ss_rrp_packet_done(struct sctp_tcb *stcb, struct sctp_nets *net,
+sctp_ss_rrp_packet_done(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_nets *net,
struct sctp_association *asoc)
{
struct sctp_stream_out *strq, *strqt;
@@ -378,7 +378,7 @@ sctp_ss_prio_init_stream(struct sctp_stream_out *strq, struct sctp_stream_out *w
static void
sctp_ss_prio_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
- struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp,
+ struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp SCTP_UNUSED,
int holds_lock)
{
struct sctp_stream_out *strqt;
@@ -412,7 +412,7 @@ sctp_ss_prio_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
static void
sctp_ss_prio_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
- struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp,
+ struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp SCTP_UNUSED,
int holds_lock)
{
if (holds_lock == 0) {
@@ -447,7 +447,7 @@ sctp_ss_prio_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
}
static struct sctp_stream_out *
-sctp_ss_prio_select(struct sctp_tcb *stcb, struct sctp_nets *net,
+sctp_ss_prio_select(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_nets *net,
struct sctp_association *asoc)
{
struct sctp_stream_out *strq, *strqt, *strqn;
@@ -493,7 +493,7 @@ prio_again:
}
static int
-sctp_ss_prio_get_value(struct sctp_tcb *stcb, struct sctp_association *asoc,
+sctp_ss_prio_get_value(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_association *asoc SCTP_UNUSED,
struct sctp_stream_out *strq, uint16_t * value)
{
if (strq == NULL) {
@@ -559,7 +559,7 @@ sctp_ss_fb_init_stream(struct sctp_stream_out *strq, struct sctp_stream_out *wit
static void
sctp_ss_fb_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
- struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp,
+ struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp SCTP_UNUSED,
int holds_lock)
{
if (holds_lock == 0) {
@@ -580,7 +580,7 @@ sctp_ss_fb_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
static void
sctp_ss_fb_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
- struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp,
+ struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp SCTP_UNUSED,
int holds_lock)
{
if (holds_lock == 0) {
@@ -615,7 +615,7 @@ sctp_ss_fb_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
}
static struct sctp_stream_out *
-sctp_ss_fb_select(struct sctp_tcb *stcb, struct sctp_nets *net,
+sctp_ss_fb_select(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_nets *net,
struct sctp_association *asoc)
{
struct sctp_stream_out *strq = NULL, *strqt;
@@ -648,9 +648,9 @@ sctp_ss_fb_select(struct sctp_tcb *stcb, struct sctp_nets *net,
}
static void
-sctp_ss_fb_scheduled(struct sctp_tcb *stcb, struct sctp_nets *net,
+sctp_ss_fb_scheduled(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_nets *net SCTP_UNUSED,
struct sctp_association *asoc, struct sctp_stream_out *strq,
- int moved_how_much)
+ int moved_how_much SCTP_UNUSED)
{
struct sctp_stream_out *strqt;
int subtract;
@@ -732,7 +732,7 @@ sctp_ss_fcfs_clear(struct sctp_tcb *stcb, struct sctp_association *asoc,
}
static void
-sctp_ss_fcfs_init_stream(struct sctp_stream_out *strq, struct sctp_stream_out *with_strq)
+sctp_ss_fcfs_init_stream(struct sctp_stream_out *strq SCTP_UNUSED, struct sctp_stream_out *with_strq SCTP_UNUSED)
{
/* Nothing to be done here */
return;
@@ -740,7 +740,7 @@ sctp_ss_fcfs_init_stream(struct sctp_stream_out *strq, struct sctp_stream_out *w
static void
sctp_ss_fcfs_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
- struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp,
+ struct sctp_stream_out *strq SCTP_UNUSED, struct sctp_stream_queue_pending *sp,
int holds_lock)
{
if (holds_lock == 0) {
@@ -757,7 +757,7 @@ sctp_ss_fcfs_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
}
static int
-sctp_ss_fcfs_is_empty(struct sctp_tcb *stcb, struct sctp_association *asoc)
+sctp_ss_fcfs_is_empty(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_association *asoc)
{
if (TAILQ_EMPTY(&asoc->ss_data.out_list)) {
return (1);
@@ -768,7 +768,7 @@ sctp_ss_fcfs_is_empty(struct sctp_tcb *stcb, struct sctp_association *asoc)
static void
sctp_ss_fcfs_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
- struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp,
+ struct sctp_stream_out *strq SCTP_UNUSED, struct sctp_stream_queue_pending *sp,
int holds_lock)
{
if (holds_lock == 0) {
@@ -787,7 +787,7 @@ sctp_ss_fcfs_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
static struct sctp_stream_out *
-sctp_ss_fcfs_select(struct sctp_tcb *stcb, struct sctp_nets *net,
+sctp_ss_fcfs_select(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_nets *net,
struct sctp_association *asoc)
{
struct sctp_stream_out *strq;
diff --git a/sys/netinet/sctp_structs.h b/sys/netinet/sctp_structs.h
index 20ca2c6..0f36924 100644
--- a/sys/netinet/sctp_structs.h
+++ b/sys/netinet/sctp_structs.h
@@ -7,11 +7,11 @@
* modification, are permitted provided that the following conditions are met:
*
* a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
*
* b) 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.
+ * the documentation and/or other materials provided with the distribution.
*
* c) Neither the name of Cisco Systems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
diff --git a/sys/netinet/sctp_sysctl.c b/sys/netinet/sctp_sysctl.c
index aa031dc..2186832 100644
--- a/sys/netinet/sctp_sysctl.c
+++ b/sys/netinet/sctp_sysctl.c
@@ -7,11 +7,11 @@
* modification, are permitted provided that the following conditions are met:
*
* a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
*
* b) 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.
+ * the documentation and/or other materials provided with the distribution.
*
* c) Neither the name of Cisco Systems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
@@ -58,7 +58,6 @@ sctp_init_sysctls()
#if !defined(SCTP_WITH_NO_CSUM)
SCTP_BASE_SYSCTL(sctp_no_csum_on_loopback) = SCTPCTL_LOOPBACK_NOCSUM_DEFAULT;
#endif
- SCTP_BASE_SYSCTL(sctp_strict_init) = SCTPCTL_STRICT_INIT_DEFAULT;
SCTP_BASE_SYSCTL(sctp_peer_chunk_oh) = SCTPCTL_PEER_CHKOH_DEFAULT;
SCTP_BASE_SYSCTL(sctp_max_burst_default) = SCTPCTL_MAXBURST_DEFAULT;
SCTP_BASE_SYSCTL(sctp_fr_max_burst_default) = SCTPCTL_FRMAXBURST_DEFAULT;
@@ -118,6 +117,7 @@ sctp_init_sysctls()
SCTP_BASE_SYSCTL(sctp_rttvar_eqret) = SCTPCTL_RTTVAR_EQRET_DEFAULT;
SCTP_BASE_SYSCTL(sctp_steady_step) = SCTPCTL_RTTVAR_STEADYS_DEFAULT;
SCTP_BASE_SYSCTL(sctp_use_dccc_ecn) = SCTPCTL_RTTVAR_DCCCECN_DEFAULT;
+ SCTP_BASE_SYSCTL(sctp_blackhole) = SCTPCTL_BLACKHOLE_DEFAULT;
#if defined(SCTP_LOCAL_TRACE_BUF)
memset(&SCTP_BASE_SYSCTL(sctp_log), 0, sizeof(struct sctp_log));
@@ -138,7 +138,7 @@ sctp_init_sysctls()
static unsigned int
number_of_addresses(struct sctp_inpcb *inp)
{
- int cnt;
+ unsigned int cnt;
struct sctp_vrf *vrf;
struct sctp_ifn *sctp_ifn;
struct sctp_ifa *sctp_ifa;
@@ -388,12 +388,12 @@ sctp_assoclist(SYSCTL_HANDLER_ARGS)
/* request some more memory than needed */
req->oldidx = (n + n / 8);
- return 0;
+ return (0);
}
if (req->newptr != USER_ADDR_NULL) {
SCTP_INP_INFO_RUNLOCK();
SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_SYSCTL, EPERM);
- return EPERM;
+ return (EPERM);
}
LIST_FOREACH(inp, &SCTP_BASE_INFO(listhead), sctp_list) {
SCTP_INP_RLOCK(inp);
@@ -424,14 +424,14 @@ sctp_assoclist(SYSCTL_HANDLER_ARGS)
error = SYSCTL_OUT(req, &xinpcb, sizeof(struct xsctp_inpcb));
if (error) {
SCTP_INP_DECR_REF(inp);
- return error;
+ return (error);
}
SCTP_INP_INFO_RLOCK();
SCTP_INP_RLOCK(inp);
error = copy_out_local_addresses(inp, NULL, req);
if (error) {
SCTP_INP_DECR_REF(inp);
- return error;
+ return (error);
}
LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) {
SCTP_TCB_LOCK(stcb);
@@ -475,7 +475,7 @@ sctp_assoclist(SYSCTL_HANDLER_ARGS)
if (error) {
SCTP_INP_DECR_REF(inp);
atomic_subtract_int(&stcb->asoc.refcnt, 1);
- return error;
+ return (error);
}
SCTP_INP_INFO_RLOCK();
SCTP_INP_RLOCK(inp);
@@ -483,7 +483,7 @@ sctp_assoclist(SYSCTL_HANDLER_ARGS)
if (error) {
SCTP_INP_DECR_REF(inp);
atomic_subtract_int(&stcb->asoc.refcnt, 1);
- return error;
+ return (error);
}
TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
xraddr.last = 0;
@@ -509,7 +509,7 @@ sctp_assoclist(SYSCTL_HANDLER_ARGS)
if (error) {
SCTP_INP_DECR_REF(inp);
atomic_subtract_int(&stcb->asoc.refcnt, 1);
- return error;
+ return (error);
}
SCTP_INP_INFO_RLOCK();
SCTP_INP_RLOCK(inp);
@@ -522,7 +522,7 @@ sctp_assoclist(SYSCTL_HANDLER_ARGS)
error = SYSCTL_OUT(req, &xraddr, sizeof(struct xsctp_raddr));
if (error) {
SCTP_INP_DECR_REF(inp);
- return error;
+ return (error);
}
SCTP_INP_INFO_RLOCK();
SCTP_INP_RLOCK(inp);
@@ -534,7 +534,7 @@ sctp_assoclist(SYSCTL_HANDLER_ARGS)
xstcb.last = 1;
error = SYSCTL_OUT(req, &xstcb, sizeof(struct xsctp_tcb));
if (error) {
- return error;
+ return (error);
}
skip:
SCTP_INP_INFO_RLOCK();
@@ -544,7 +544,7 @@ skip:
memset((void *)&xinpcb, 0, sizeof(struct xsctp_inpcb));
xinpcb.last = 1;
error = SYSCTL_OUT(req, &xinpcb, sizeof(struct xsctp_inpcb));
- return error;
+ return (error);
}
@@ -607,7 +607,6 @@ sysctl_sctp_check(SYSCTL_HANDLER_ARGS)
#if !defined(SCTP_WITH_NO_CSUM)
RANGECHK(SCTP_BASE_SYSCTL(sctp_no_csum_on_loopback), SCTPCTL_LOOPBACK_NOCSUM_MIN, SCTPCTL_LOOPBACK_NOCSUM_MAX);
#endif
- RANGECHK(SCTP_BASE_SYSCTL(sctp_strict_init), SCTPCTL_STRICT_INIT_MIN, SCTPCTL_STRICT_INIT_MAX);
RANGECHK(SCTP_BASE_SYSCTL(sctp_peer_chunk_oh), SCTPCTL_PEER_CHKOH_MIN, SCTPCTL_PEER_CHKOH_MAX);
RANGECHK(SCTP_BASE_SYSCTL(sctp_max_burst_default), SCTPCTL_MAXBURST_MIN, SCTPCTL_MAXBURST_MAX);
RANGECHK(SCTP_BASE_SYSCTL(sctp_fr_max_burst_default), SCTPCTL_FRMAXBURST_MIN, SCTPCTL_FRMAXBURST_MAX);
@@ -667,6 +666,7 @@ sysctl_sctp_check(SYSCTL_HANDLER_ARGS)
RANGECHK(SCTP_BASE_SYSCTL(sctp_mobility_fasthandoff), SCTPCTL_MOBILITY_FASTHANDOFF_MIN, SCTPCTL_MOBILITY_FASTHANDOFF_MAX);
RANGECHK(SCTP_BASE_SYSCTL(sctp_enable_sack_immediately), SCTPCTL_SACK_IMMEDIATELY_ENABLE_MIN, SCTPCTL_SACK_IMMEDIATELY_ENABLE_MAX);
RANGECHK(SCTP_BASE_SYSCTL(sctp_inits_include_nat_friendly), SCTPCTL_NAT_FRIENDLY_INITS_MIN, SCTPCTL_NAT_FRIENDLY_INITS_MAX);
+ RANGECHK(SCTP_BASE_SYSCTL(sctp_blackhole), SCTPCTL_BLACKHOLE_MIN, SCTPCTL_BLACKHOLE_MAX);
#ifdef SCTP_DEBUG
RANGECHK(SCTP_BASE_SYSCTL(sctp_debug_on), SCTPCTL_DEBUG_MIN, SCTPCTL_DEBUG_MAX);
@@ -876,10 +876,6 @@ SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, loopback_nocsum, CTLTYPE_UINT | CTLFL
SCTPCTL_LOOPBACK_NOCSUM_DESC);
#endif
-SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, strict_init, CTLTYPE_UINT | CTLFLAG_RW,
- &SCTP_BASE_SYSCTL(sctp_strict_init), 0, sysctl_sctp_check, "IU",
- SCTPCTL_STRICT_INIT_DESC);
-
SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, peer_chkoh, CTLTYPE_UINT | CTLFLAG_RW,
&SCTP_BASE_SYSCTL(sctp_peer_chunk_oh), 0, sysctl_sctp_check, "IU",
SCTPCTL_PEER_CHKOH_DESC);
@@ -1129,6 +1125,10 @@ SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, use_dcccecn, CTLTYPE_UINT | CTLFLAG_R
&SCTP_BASE_SYSCTL(sctp_use_dccc_ecn), 0, sysctl_sctp_check, "IU",
SCTPCTL_RTTVAR_DCCCECN_DESC);
+SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, blackhole, CTLTYPE_UINT | CTLFLAG_RW,
+ &SCTP_BASE_SYSCTL(sctp_blackhole), 0, sysctl_sctp_check, "IU",
+ SCTPCTL_BLACKHOLE_DESC);
+
#ifdef SCTP_DEBUG
SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, debug, CTLTYPE_UINT | CTLFLAG_RW,
&SCTP_BASE_SYSCTL(sctp_debug_on), 0, sysctl_sctp_check, "IU",
diff --git a/sys/netinet/sctp_sysctl.h b/sys/netinet/sctp_sysctl.h
index ec87c2a..cbb2826 100644
--- a/sys/netinet/sctp_sysctl.h
+++ b/sys/netinet/sctp_sysctl.h
@@ -7,11 +7,11 @@
* modification, are permitted provided that the following conditions are met:
*
* a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
*
* b) 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.
+ * the documentation and/or other materials provided with the distribution.
*
* c) Neither the name of Cisco Systems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
@@ -50,7 +50,6 @@ struct sctp_sysctl {
#if !defined(SCTP_WITH_NO_CSUM)
uint32_t sctp_no_csum_on_loopback;
#endif
- uint32_t sctp_strict_init;
uint32_t sctp_peer_chunk_oh;
uint32_t sctp_max_burst_default;
uint32_t sctp_max_chunks_on_queue;
@@ -115,6 +114,7 @@ struct sctp_sysctl {
uint32_t sctp_vtag_time_wait;
uint32_t sctp_buffer_splitting;
uint32_t sctp_initial_cwnd;
+ uint32_t sctp_blackhole;
#if defined(SCTP_DEBUG)
uint32_t sctp_debug_on;
#endif
@@ -168,12 +168,6 @@ struct sctp_sysctl {
#define SCTPCTL_LOOPBACK_NOCSUM_MAX 1
#define SCTPCTL_LOOPBACK_NOCSUM_DEFAULT 1
-/* strict_init: Enable strict INIT/INIT-ACK singleton enforcement */
-#define SCTPCTL_STRICT_INIT_DESC "Enable strict INIT/INIT-ACK singleton enforcement"
-#define SCTPCTL_STRICT_INIT_MIN 0
-#define SCTPCTL_STRICT_INIT_MAX 1
-#define SCTPCTL_STRICT_INIT_DEFAULT 1
-
/* peer_chkoh: Amount to debit peers rwnd per chunk sent */
#define SCTPCTL_PEER_CHKOH_DESC "Amount to debit peers rwnd per chunk sent"
#define SCTPCTL_PEER_CHKOH_MIN 0
@@ -526,6 +520,11 @@ struct sctp_sysctl {
#define SCTPCTL_RTTVAR_DCCCECN_MAX 1
#define SCTPCTL_RTTVAR_DCCCECN_DEFAULT 1 /* 0 means disable feature */
+#define SCTPCTL_BLACKHOLE_DESC "Enable SCTP blackholing"
+#define SCTPCTL_BLACKHOLE_MIN 0
+#define SCTPCTL_BLACKHOLE_MAX 2
+#define SCTPCTL_BLACKHOLE_DEFAULT SCTPCTL_BLACKHOLE_MIN
+
#if defined(SCTP_DEBUG)
/* debug: Configure debug output */
#define SCTPCTL_DEBUG_DESC "Configure debug output"
diff --git a/sys/netinet/sctp_timer.c b/sys/netinet/sctp_timer.c
index a33e792..f347105 100644
--- a/sys/netinet/sctp_timer.c
+++ b/sys/netinet/sctp_timer.c
@@ -7,11 +7,11 @@
* modification, are permitted provided that the following conditions are met:
*
* a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
*
* b) 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.
+ * the documentation and/or other materials provided with the distribution.
*
* c) Neither the name of Cisco Systems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
@@ -1035,7 +1035,7 @@ sctp_t1init_timer(struct sctp_inpcb *inp,
int
sctp_cookie_timer(struct sctp_inpcb *inp,
struct sctp_tcb *stcb,
- struct sctp_nets *net)
+ struct sctp_nets *net SCTP_UNUSED)
{
struct sctp_nets *alt;
struct sctp_tmit_chunk *cookie;
@@ -1264,7 +1264,7 @@ sctp_asconf_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
/* Mobility adaptation */
void
sctp_delete_prim_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
- struct sctp_nets *net)
+ struct sctp_nets *net SCTP_UNUSED)
{
if (stcb->asoc.deleted_primary == NULL) {
SCTPDBG(SCTP_DEBUG_ASCONF1, "delete_prim_timer: deleted_primary is not stored...\n");
@@ -1402,32 +1402,31 @@ sctp_heartbeat_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
{
uint8_t net_was_pf;
- net_was_pf = 0;
- if (net) {
- if (net->dest_state & SCTP_ADDR_PF) {
- net_was_pf = 1;
- }
- if (net->hb_responded == 0) {
- if (net->ro._s_addr) {
- /*
- * Invalidate the src address if we did not
- * get a response last time.
- */
- sctp_free_ifa(net->ro._s_addr);
- net->ro._s_addr = NULL;
- net->src_addr_selected = 0;
- }
- sctp_backoff_on_timeout(stcb, net, 1, 0, 0);
- if (sctp_threshold_management(inp, stcb, net, stcb->asoc.max_send_times)) {
- /* Assoc is over */
- return (1);
- }
+ if (net->dest_state & SCTP_ADDR_PF) {
+ net_was_pf = 1;
+ } else {
+ net_was_pf = 0;
+ }
+ if (net->hb_responded == 0) {
+ if (net->ro._s_addr) {
+ /*
+ * Invalidate the src address if we did not get a
+ * response last time.
+ */
+ sctp_free_ifa(net->ro._s_addr);
+ net->ro._s_addr = NULL;
+ net->src_addr_selected = 0;
}
- /* Zero PBA, if it needs it */
- if (net->partial_bytes_acked) {
- net->partial_bytes_acked = 0;
+ sctp_backoff_on_timeout(stcb, net, 1, 0, 0);
+ if (sctp_threshold_management(inp, stcb, net, stcb->asoc.max_send_times)) {
+ /* Assoc is over */
+ return (1);
}
}
+ /* Zero PBA, if it needs it */
+ if (net->partial_bytes_acked) {
+ net->partial_bytes_acked = 0;
+ }
if ((stcb->asoc.total_output_queue_size > 0) &&
(TAILQ_EMPTY(&stcb->asoc.send_queue)) &&
(TAILQ_EMPTY(&stcb->asoc.sent_queue))) {
@@ -1451,7 +1450,7 @@ sctp_pathmtu_timer(struct sctp_inpcb *inp,
{
uint32_t next_mtu, mtu;
- next_mtu = sctp_get_next_mtu(inp, net->mtu);
+ next_mtu = sctp_get_next_mtu(net->mtu);
if ((next_mtu > net->mtu) && (net->port == 0)) {
if ((net->src_addr_selected == 0) ||
diff --git a/sys/netinet/sctp_timer.h b/sys/netinet/sctp_timer.h
index 7b1341a..6f5b35a 100644
--- a/sys/netinet/sctp_timer.h
+++ b/sys/netinet/sctp_timer.h
@@ -7,11 +7,11 @@
* modification, are permitted provided that the following conditions are met:
*
* a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
*
* b) 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.
+ * the documentation and/or other materials provided with the distribution.
*
* c) Neither the name of Cisco Systems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
diff --git a/sys/netinet/sctp_uio.h b/sys/netinet/sctp_uio.h
index c720721..ec24984 100644
--- a/sys/netinet/sctp_uio.h
+++ b/sys/netinet/sctp_uio.h
@@ -7,11 +7,11 @@
* modification, are permitted provided that the following conditions are met:
*
* a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
*
* b) 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.
+ * the documentation and/or other materials provided with the distribution.
*
* c) Neither the name of Cisco Systems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c
index c638e9c..c08872c 100644
--- a/sys/netinet/sctp_usrreq.c
+++ b/sys/netinet/sctp_usrreq.c
@@ -7,11 +7,11 @@
* modification, are permitted provided that the following conditions are met:
*
* a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
*
* b) 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.
+ * the documentation and/or other materials provided with the distribution.
*
* c) Neither the name of Cisco Systems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
@@ -101,10 +101,7 @@ sctp_finish(void)
void
-sctp_pathmtu_adjustment(struct sctp_inpcb *inp,
- struct sctp_tcb *stcb,
- struct sctp_nets *net,
- uint16_t nxtsz)
+sctp_pathmtu_adjustment(struct sctp_tcb *stcb, uint16_t nxtsz)
{
struct sctp_tmit_chunk *chk;
uint16_t overhead;
@@ -213,7 +210,7 @@ sctp_notify_mbuf(struct sctp_inpcb *inp,
}
/* now what about the ep? */
if (stcb->asoc.smallest_mtu > nxtsz) {
- sctp_pathmtu_adjustment(inp, stcb, net, nxtsz);
+ sctp_pathmtu_adjustment(stcb, nxtsz);
}
if (tmr_stopped)
sctp_timer_start(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, net);
@@ -490,7 +487,7 @@ sctp_must_try_again:
}
static int
-sctp_attach(struct socket *so, int proto, struct thread *p)
+sctp_attach(struct socket *so, int proto SCTP_UNUSED, struct thread *p SCTP_UNUSED)
{
struct sctp_inpcb *inp;
struct inpcb *ip_inp;
@@ -505,17 +502,17 @@ sctp_attach(struct socket *so, int proto, struct thread *p)
inp = (struct sctp_inpcb *)so->so_pcb;
if (inp != 0) {
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
- return EINVAL;
+ return (EINVAL);
}
if (so->so_snd.sb_hiwat == 0 || so->so_rcv.sb_hiwat == 0) {
error = SCTP_SORESERVE(so, SCTP_BASE_SYSCTL(sctp_sendspace), SCTP_BASE_SYSCTL(sctp_recvspace));
if (error) {
- return error;
+ return (error);
}
}
error = sctp_inpcb_alloc(so, vrf_id);
if (error) {
- return error;
+ return (error);
}
inp = (struct sctp_inpcb *)so->so_pcb;
SCTP_INP_WLOCK(inp);
@@ -547,11 +544,11 @@ try_again:
SCTP_INP_WUNLOCK(inp);
}
}
- return error;
+ return (error);
}
#endif /* IPSEC */
SCTP_INP_WUNLOCK(inp);
- return 0;
+ return (0);
}
static int
@@ -564,20 +561,20 @@ sctp_bind(struct socket *so, struct sockaddr *addr, struct thread *p)
if (addr && addr->sa_family != AF_INET) {
/* must be a v4 address! */
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
- return EINVAL;
+ return (EINVAL);
}
#endif /* INET6 */
if (addr && (addr->sa_len != sizeof(struct sockaddr_in))) {
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
- return EINVAL;
+ return (EINVAL);
}
inp = (struct sctp_inpcb *)so->so_pcb;
if (inp == 0) {
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
- return EINVAL;
+ return (EINVAL);
}
error = sctp_inpcb_bind(so, addr, NULL, p);
- return error;
+ return (error);
}
#endif
@@ -660,13 +657,12 @@ sctp_sendm(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr,
}
SCTP_LTRACE_ERR_RET_PKT(m, inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
sctp_m_freem(m);
- return EINVAL;
+ return (EINVAL);
}
/* Got to have an to address if we are NOT a connected socket */
if ((addr == NULL) &&
((inp->sctp_flags & SCTP_PCB_FLAGS_CONNECTED) ||
- (inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE))
- ) {
+ (inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE))) {
goto connected_type;
} else if (addr == NULL) {
SCTP_LTRACE_ERR_RET_PKT(m, inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EDESTADDRREQ);
@@ -923,7 +919,7 @@ sctp_disconnect(struct socket *so)
/* UDP model does not support this */
SCTP_INP_RUNLOCK(inp);
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EOPNOTSUPP);
- return EOPNOTSUPP;
+ return (EOPNOTSUPP);
}
}
@@ -941,7 +937,7 @@ sctp_flush(struct socket *so, int how)
inp = (struct sctp_inpcb *)so->so_pcb;
if (inp == NULL) {
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
- return EINVAL;
+ return (EINVAL);
}
SCTP_INP_RLOCK(inp);
/* For the 1 to many model this does nothing */
@@ -985,7 +981,7 @@ sctp_shutdown(struct socket *so)
inp = (struct sctp_inpcb *)so->so_pcb;
if (inp == 0) {
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
- return EINVAL;
+ return (EINVAL);
}
SCTP_INP_RLOCK(inp);
/* For UDP model this is a invalid call */
@@ -1126,7 +1122,7 @@ sctp_shutdown(struct socket *so)
}
skip_unlock:
SCTP_INP_RUNLOCK(inp);
- return 0;
+ return (0);
}
/*
@@ -1595,7 +1591,7 @@ out_now:
SCTP_ASOC_CREATE_UNLOCK(inp);
}
SCTP_INP_DECR_REF(inp);
- return error;
+ return (error);
}
#define SCTP_FIND_STCB(inp, stcb, assoc_id) { \
@@ -3023,7 +3019,7 @@ flags_out:
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
error = EINVAL;
} else {
- SCTP_INP_RUNLOCK(inp);
+ SCTP_INP_RLOCK(inp);
onoff = sctp_is_feature_on(inp, SCTP_PCB_FLAGS_RECVRCVINFO);
SCTP_INP_RUNLOCK(inp);
}
@@ -3042,7 +3038,7 @@ flags_out:
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
error = EINVAL;
} else {
- SCTP_INP_RUNLOCK(inp);
+ SCTP_INP_RLOCK(inp);
onoff = sctp_is_feature_on(inp, SCTP_PCB_FLAGS_RECVNXTINFO);
SCTP_INP_RUNLOCK(inp);
}
@@ -3324,7 +3320,7 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize,
if (inp == 0) {
SCTP_PRINTF("inp is NULL?\n");
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
- return EINVAL;
+ return (EINVAL);
}
vrf_id = inp->def_vrf_id;
@@ -4727,6 +4723,7 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize,
if (paddrp->spp_flags & SPP_HB_DEMAND) {
/* on demand HB */
sctp_send_hb(stcb, net, SCTP_SO_LOCKED);
+ sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_SOCKOPT, SCTP_SO_LOCKED);
sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net);
}
if ((paddrp->spp_flags & SPP_PMTUD_DISABLE) && (paddrp->spp_pathmtu >= SCTP_SMALLEST_PMTU)) {
@@ -4738,7 +4735,7 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize,
if (paddrp->spp_pathmtu > SCTP_DEFAULT_MINSEGMENT) {
net->mtu = paddrp->spp_pathmtu + ovh;
if (net->mtu < stcb->asoc.smallest_mtu) {
- sctp_pathmtu_adjustment(inp, stcb, net, net->mtu);
+ sctp_pathmtu_adjustment(stcb, net->mtu);
}
}
}
@@ -4862,7 +4859,7 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize,
if (paddrp->spp_pathmtu > SCTP_DEFAULT_MINSEGMENT) {
net->mtu = paddrp->spp_pathmtu + ovh;
if (net->mtu < stcb->asoc.smallest_mtu) {
- sctp_pathmtu_adjustment(inp, stcb, net, net->mtu);
+ sctp_pathmtu_adjustment(stcb, net->mtu);
}
}
}
@@ -5286,7 +5283,7 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize,
error = EAFNOSUPPORT;
break;
}
- sctp_bindx_delete_address(so, inp, addrs->addr,
+ sctp_bindx_delete_address(inp, addrs->addr,
addrs->sget_assoc_id, vrf_id,
&error);
break;
@@ -5970,7 +5967,7 @@ out_now:
SCTP_ASOC_CREATE_UNLOCK(inp);
}
SCTP_INP_DECR_REF(inp);
- return error;
+ return (error);
}
#endif
@@ -6280,7 +6277,7 @@ sctp_ingetaddr(struct socket *so, struct sockaddr **addr)
if (!inp) {
SCTP_FREE_SONAME(sin);
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
- return ECONNRESET;
+ return (ECONNRESET);
}
SCTP_INP_RLOCK(inp);
sin->sin_port = inp->sctp_lport;
@@ -6349,7 +6346,7 @@ sctp_ingetaddr(struct socket *so, struct sockaddr **addr)
SCTP_FREE_SONAME(sin);
SCTP_INP_RUNLOCK(inp);
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, ENOENT);
- return ENOENT;
+ return (ENOENT);
}
}
SCTP_INP_RUNLOCK(inp);
@@ -6368,25 +6365,19 @@ sctp_peeraddr(struct socket *so, struct sockaddr **addr)
struct sctp_nets *net;
/* Do the malloc first in case it blocks. */
- inp = (struct sctp_inpcb *)so->so_pcb;
- if ((inp == NULL) ||
- ((inp->sctp_flags & SCTP_PCB_FLAGS_CONNECTED) == 0)) {
- /* UDP type and listeners will drop out here */
- SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, ENOTCONN);
- return (ENOTCONN);
- }
SCTP_MALLOC_SONAME(sin, struct sockaddr_in *, sizeof *sin);
if (sin == NULL)
return (ENOMEM);
sin->sin_family = AF_INET;
sin->sin_len = sizeof(*sin);
- /* We must recapture incase we blocked */
inp = (struct sctp_inpcb *)so->so_pcb;
- if (!inp) {
+ if ((inp == NULL) ||
+ ((inp->sctp_flags & SCTP_PCB_FLAGS_CONNECTED) == 0)) {
+ /* UDP type and listeners will drop out here */
SCTP_FREE_SONAME(sin);
- SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
- return ECONNRESET;
+ SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, ENOTCONN);
+ return (ENOTCONN);
}
SCTP_INP_RLOCK(inp);
stcb = LIST_FIRST(&inp->sctp_asoc_list);
@@ -6397,7 +6388,7 @@ sctp_peeraddr(struct socket *so, struct sockaddr **addr)
if (stcb == NULL) {
SCTP_FREE_SONAME(sin);
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
- return ECONNRESET;
+ return (ECONNRESET);
}
fnd = 0;
TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
@@ -6414,7 +6405,7 @@ sctp_peeraddr(struct socket *so, struct sockaddr **addr)
/* No IPv4 address */
SCTP_FREE_SONAME(sin);
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, ENOENT);
- return ENOENT;
+ return (ENOENT);
}
(*addr) = (struct sockaddr *)sin;
return (0);
diff --git a/sys/netinet/sctp_var.h b/sys/netinet/sctp_var.h
index b41f5c8..24c5544 100644
--- a/sys/netinet/sctp_var.h
+++ b/sys/netinet/sctp_var.h
@@ -7,11 +7,11 @@
* modification, are permitted provided that the following conditions are met:
*
* a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
*
* b) 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.
+ * the documentation and/or other materials provided with the distribution.
*
* c) Neither the name of Cisco Systems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
@@ -53,27 +53,28 @@ extern struct pr_usrreqs sctp_usrreqs;
#define sctp_stcb_feature_on(inp, stcb, feature) {\
if (stcb) { \
stcb->asoc.sctp_features |= feature; \
- } else { \
+ } else if (inp) { \
inp->sctp_features |= feature; \
} \
}
#define sctp_stcb_feature_off(inp, stcb, feature) {\
if (stcb) { \
stcb->asoc.sctp_features &= ~feature; \
- } else { \
+ } else if (inp) { \
inp->sctp_features &= ~feature; \
} \
}
#define sctp_stcb_is_feature_on(inp, stcb, feature) \
(((stcb != NULL) && \
((stcb->asoc.sctp_features & feature) == feature)) || \
- ((stcb == NULL) && \
+ ((stcb == NULL) && (inp != NULL) && \
((inp->sctp_features & feature) == feature)))
#define sctp_stcb_is_feature_off(inp, stcb, feature) \
(((stcb != NULL) && \
((stcb->asoc.sctp_features & feature) == 0)) || \
- ((stcb == NULL) && \
- ((inp->sctp_features & feature) == 0)))
+ ((stcb == NULL) && (inp != NULL) && \
+ ((inp->sctp_features & feature) == 0)) || \
+ ((stcb == NULL) && (inp == NULL)))
/* managing mobility_feature in inpcb (by micchie) */
#define sctp_mobility_feature_on(inp, feature) (inp->sctp_mobility_features |= feature)
@@ -235,7 +236,7 @@ extern struct pr_usrreqs sctp_usrreqs;
#define sctp_mbuf_crush(data) do { \
struct mbuf *_m; \
_m = (data); \
- while(_m && (SCTP_BUF_LEN(_m) == 0)) { \
+ while (_m && (SCTP_BUF_LEN(_m) == 0)) { \
(data) = SCTP_BUF_NEXT(_m); \
SCTP_BUF_NEXT(_m) = NULL; \
sctp_m_free(_m); \
@@ -334,7 +335,7 @@ void sctp_input_with_port __P((struct mbuf *, int, uint16_t));
void sctp_input __P((struct mbuf *, int));
#endif
-void sctp_pathmtu_adjustment __P((struct sctp_inpcb *, struct sctp_tcb *, struct sctp_nets *, uint16_t));
+void sctp_pathmtu_adjustment __P((struct sctp_tcb *, uint16_t));
void sctp_drain __P((void));
void sctp_init __P((void));
diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c
index a9d120b..6f466f1 100644
--- a/sys/netinet/sctputil.c
+++ b/sys/netinet/sctputil.c
@@ -7,11 +7,11 @@
* modification, are permitted provided that the following conditions are met:
*
* a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
*
* b) 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.
+ * the documentation and/or other materials provided with the distribution.
*
* c) Neither the name of Cisco Systems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
@@ -121,7 +121,6 @@ rto_logging(struct sctp_nets *net, int from)
sctp_clog.x.misc.log2,
sctp_clog.x.misc.log3,
sctp_clog.x.misc.log4);
-
}
void
@@ -142,7 +141,6 @@ sctp_log_strm_del_alt(struct sctp_tcb *stcb, uint32_t tsn, uint16_t sseq, uint16
sctp_clog.x.misc.log2,
sctp_clog.x.misc.log3,
sctp_clog.x.misc.log4);
-
}
void
@@ -164,7 +162,6 @@ sctp_log_nagle_event(struct sctp_tcb *stcb, int action)
sctp_clog.x.misc.log4);
}
-
void
sctp_log_sack(uint32_t old_cumack, uint32_t cumack, uint32_t tsn, uint16_t gaps, uint16_t dups, int from)
{
@@ -219,10 +216,8 @@ sctp_log_fr(uint32_t biggest_tsn, uint32_t biggest_new_tsn, uint32_t tsn,
sctp_clog.x.misc.log2,
sctp_clog.x.misc.log3,
sctp_clog.x.misc.log4);
-
}
-
void
sctp_log_mb(struct mbuf *m, int from)
{
@@ -248,7 +243,6 @@ sctp_log_mb(struct mbuf *m, int from)
sctp_clog.x.misc.log4);
}
-
void
sctp_log_strm_del(struct sctp_queued_to_read *control, struct sctp_queued_to_read *poschk,
int from)
@@ -277,7 +271,6 @@ sctp_log_strm_del(struct sctp_queued_to_read *control, struct sctp_queued_to_rea
sctp_clog.x.misc.log2,
sctp_clog.x.misc.log3,
sctp_clog.x.misc.log4);
-
}
void
@@ -313,7 +306,6 @@ sctp_log_cwnd(struct sctp_tcb *stcb, struct sctp_nets *net, int augment, uint8_t
sctp_clog.x.misc.log2,
sctp_clog.x.misc.log3,
sctp_clog.x.misc.log4);
-
}
void
@@ -358,7 +350,6 @@ sctp_log_lock(struct sctp_inpcb *inp, struct sctp_tcb *stcb, uint8_t from)
sctp_clog.x.misc.log2,
sctp_clog.x.misc.log3,
sctp_clog.x.misc.log4);
-
}
void
@@ -386,7 +377,6 @@ sctp_log_maxburst(struct sctp_tcb *stcb, struct sctp_nets *net, int error, int b
sctp_clog.x.misc.log2,
sctp_clog.x.misc.log3,
sctp_clog.x.misc.log4);
-
}
void
@@ -441,7 +431,6 @@ sctp_log_mbcnt(uint8_t from, uint32_t total_oq, uint32_t book, uint32_t total_mb
sctp_clog.x.misc.log2,
sctp_clog.x.misc.log3,
sctp_clog.x.misc.log4);
-
}
void
@@ -454,7 +443,7 @@ sctp_misc_ints(uint8_t from, uint32_t a, uint32_t b, uint32_t c, uint32_t d)
}
void
-sctp_wakeup_log(struct sctp_tcb *stcb, uint32_t cumtsn, uint32_t wake_cnt, int from)
+sctp_wakeup_log(struct sctp_tcb *stcb, uint32_t wake_cnt, int from)
{
struct sctp_cwnd_log sctp_clog;
@@ -497,11 +486,10 @@ sctp_wakeup_log(struct sctp_tcb *stcb, uint32_t cumtsn, uint32_t wake_cnt, int f
sctp_clog.x.misc.log2,
sctp_clog.x.misc.log3,
sctp_clog.x.misc.log4);
-
}
void
-sctp_log_block(uint8_t from, struct socket *so, struct sctp_association *asoc, int sendlen)
+sctp_log_block(uint8_t from, struct sctp_association *asoc, int sendlen)
{
struct sctp_cwnd_log sctp_clog;
@@ -519,11 +507,10 @@ sctp_log_block(uint8_t from, struct socket *so, struct sctp_association *asoc, i
sctp_clog.x.misc.log2,
sctp_clog.x.misc.log3,
sctp_clog.x.misc.log4);
-
}
int
-sctp_fill_stat_log(void *optval, size_t *optsize)
+sctp_fill_stat_log(void *optval SCTP_UNUSED, size_t *optsize SCTP_UNUSED)
{
/* May need to fix this if ktrdump does not work */
return (0);
@@ -800,7 +787,7 @@ sctp_get_prev_mtu(uint32_t val)
* entry, just return val.
*/
uint32_t
-sctp_get_next_mtu(struct sctp_inpcb *inp, uint32_t val)
+sctp_get_next_mtu(uint32_t val)
{
/* select another MTU that is just bigger than this one */
uint32_t i;
@@ -871,21 +858,22 @@ retry:
}
uint32_t
-sctp_select_a_tag(struct sctp_inpcb *inp, uint16_t lport, uint16_t rport, int save_in_twait)
+sctp_select_a_tag(struct sctp_inpcb *inp, uint16_t lport, uint16_t rport, int check)
{
- uint32_t x, not_done;
+ uint32_t x;
struct timeval now;
- (void)SCTP_GETTIME_TIMEVAL(&now);
- not_done = 1;
- while (not_done) {
+ if (check) {
+ (void)SCTP_GETTIME_TIMEVAL(&now);
+ }
+ for (;;) {
x = sctp_select_initial_TSN(&inp->sctp_ep);
if (x == 0) {
/* we never use 0 */
continue;
}
- if (sctp_is_vtag_good(inp, x, lport, rport, &now, save_in_twait)) {
- not_done = 0;
+ if (!check || sctp_is_vtag_good(x, lport, rport, &now)) {
+ break;
}
}
return (x);
@@ -1146,7 +1134,7 @@ sctp_print_mapping_array(struct sctp_association *asoc)
asoc->highest_tsn_inside_map,
asoc->highest_tsn_inside_nr_map);
for (limit = asoc->mapping_array_size; limit > 1; limit--) {
- if (asoc->mapping_array[limit - 1]) {
+ if (asoc->mapping_array[limit - 1] != 0) {
break;
}
}
@@ -1418,9 +1406,6 @@ sctp_handle_addr_wq(void)
}
}
-int retcode = 0;
-int cur_oerr = 0;
-
void
sctp_timeout_handler(void *t)
{
@@ -1475,7 +1460,7 @@ sctp_timeout_handler(void *t)
type = tmr->type;
if (inp) {
SCTP_INP_INCR_REF(inp);
- if ((inp->sctp_socket == 0) &&
+ if ((inp->sctp_socket == NULL) &&
((tmr->type != SCTP_TIMER_TYPE_INPKILL) &&
(tmr->type != SCTP_TIMER_TYPE_INIT) &&
(tmr->type != SCTP_TIMER_TYPE_SEND) &&
@@ -1581,9 +1566,7 @@ sctp_timeout_handler(void *t)
stcb->asoc.num_send_timers_up = 0;
}
SCTP_TCB_LOCK_ASSERT(stcb);
- cur_oerr = stcb->asoc.overall_error_count;
- retcode = sctp_t3rxt_timer(inp, stcb, net);
- if (retcode) {
+ if (sctp_t3rxt_timer(inp, stcb, net)) {
/* no need to unlock on tcb its gone */
goto out_decr;
@@ -1834,7 +1817,7 @@ sctp_timeout_handler(void *t)
SCTPDBG(SCTP_DEBUG_TIMER1, "sctp_timeout_handler:unknown timer %d\n",
tmr->type);
break;
- };
+ }
#ifdef SCTP_AUDITING_ENABLED
sctp_audit_log(0xF1, (uint8_t) tmr->type);
if (inp)
@@ -1874,8 +1857,6 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, struct sctp_tcb *stcb,
if ((t_type != SCTP_TIMER_TYPE_ADDR_WQ) && (inp == NULL))
return;
- to_ticks = 0;
-
tmr = NULL;
if (stcb) {
SCTP_TCB_LOCK_ASSERT(stcb);
@@ -2131,7 +2112,7 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, struct sctp_tcb *stcb,
__FUNCTION__, t_type);
return;
break;
- };
+ }
if ((to_ticks <= 0) || (tmr == NULL)) {
SCTPDBG(SCTP_DEBUG_TIMER1, "%s: %d:software error to_ticks:%d tmr:%p not set ??\n",
__FUNCTION__, t_type, to_ticks, tmr);
@@ -2292,7 +2273,7 @@ sctp_timer_stop(int t_type, struct sctp_inpcb *inp, struct sctp_tcb *stcb,
SCTPDBG(SCTP_DEBUG_TIMER1, "%s: Unknown timer type %d\n",
__FUNCTION__, t_type);
break;
- };
+ }
if (tmr == NULL) {
return;
}
@@ -2612,7 +2593,7 @@ sctp_pad_lastmbuf(struct mbuf *m, int padval, struct mbuf *last_mbuf)
static void
sctp_notify_assoc_change(uint32_t event, struct sctp_tcb *stcb,
- uint32_t error, void *data, int so_locked
+ uint32_t error, int so_locked
#if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING)
SCTP_UNUSED
#endif
@@ -2688,7 +2669,7 @@ sctp_notify_assoc_change(uint32_t event, struct sctp_tcb *stcb,
SCTP_BUF_LEN(m_notify) = sizeof(struct sctp_assoc_change);
SCTP_BUF_NEXT(m_notify) = NULL;
control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination,
- 0, 0, 0, 0, 0, 0,
+ 0, 0, stcb->asoc.context, 0, 0, 0,
m_notify);
if (control == NULL) {
/* no memory */
@@ -2736,7 +2717,8 @@ sctp_notify_peer_addr_change(struct sctp_tcb *stcb, uint32_t state,
struct sctp_paddr_change *spc;
struct sctp_queued_to_read *control;
- if (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVPADDREVNT)) {
+ if ((stcb == NULL) ||
+ sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVPADDREVNT)) {
/* event not enabled */
return;
}
@@ -2787,7 +2769,7 @@ sctp_notify_peer_addr_change(struct sctp_tcb *stcb, uint32_t state,
/* append to socket */
control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination,
- 0, 0, 0, 0, 0, 0,
+ 0, 0, stcb->asoc.context, 0, 0, 0,
m_notify);
if (control == NULL) {
/* no memory */
@@ -2819,7 +2801,8 @@ sctp_notify_send_failed(struct sctp_tcb *stcb, uint32_t error,
struct sctp_queued_to_read *control;
int length;
- if (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVSENDFAILEVNT)) {
+ if ((stcb == NULL) ||
+ sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVSENDFAILEVNT)) {
/* event not enabled */
return;
}
@@ -2873,7 +2856,7 @@ sctp_notify_send_failed(struct sctp_tcb *stcb, uint32_t error,
}
/* append to socket */
control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination,
- 0, 0, 0, 0, 0, 0,
+ 0, 0, stcb->asoc.context, 0, 0, 0,
m_notify);
if (control == NULL) {
/* no memory */
@@ -2902,7 +2885,8 @@ sctp_notify_send_failed2(struct sctp_tcb *stcb, uint32_t error,
struct sctp_queued_to_read *control;
int length;
- if (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVSENDFAILEVNT)) {
+ if ((stcb == NULL) ||
+ sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVSENDFAILEVNT)) {
/* event not enabled */
return;
}
@@ -2949,7 +2933,7 @@ sctp_notify_send_failed2(struct sctp_tcb *stcb, uint32_t error,
}
/* append to socket */
control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination,
- 0, 0, 0, 0, 0, 0,
+ 0, 0, stcb->asoc.context, 0, 0, 0,
m_notify);
if (control == NULL) {
/* no memory */
@@ -2965,14 +2949,14 @@ sctp_notify_send_failed2(struct sctp_tcb *stcb, uint32_t error,
static void
-sctp_notify_adaptation_layer(struct sctp_tcb *stcb,
- uint32_t error)
+sctp_notify_adaptation_layer(struct sctp_tcb *stcb)
{
struct mbuf *m_notify;
struct sctp_adaptation_event *sai;
struct sctp_queued_to_read *control;
- if (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_ADAPTATIONEVNT)) {
+ if ((stcb == NULL) ||
+ sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_ADAPTATIONEVNT)) {
/* event not enabled */
return;
}
@@ -2993,7 +2977,7 @@ sctp_notify_adaptation_layer(struct sctp_tcb *stcb,
/* append to socket */
control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination,
- 0, 0, 0, 0, 0, 0,
+ 0, 0, stcb->asoc.context, 0, 0, 0,
m_notify);
if (control == NULL) {
/* no memory */
@@ -3023,7 +3007,8 @@ sctp_notify_partial_delivery_indication(struct sctp_tcb *stcb, uint32_t error,
struct sctp_queued_to_read *control;
struct sockbuf *sb;
- if (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_PDAPIEVNT)) {
+ if ((stcb == NULL) ||
+ sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_PDAPIEVNT)) {
/* event not enabled */
return;
}
@@ -3047,7 +3032,7 @@ sctp_notify_partial_delivery_indication(struct sctp_tcb *stcb, uint32_t error,
SCTP_BUF_LEN(m_notify) = sizeof(struct sctp_pdapi_event);
SCTP_BUF_NEXT(m_notify) = NULL;
control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination,
- 0, 0, 0, 0, 0, 0,
+ 0, 0, stcb->asoc.context, 0, 0, 0,
m_notify);
if (control == NULL) {
/* no memory */
@@ -3155,7 +3140,7 @@ sctp_notify_shutdown_event(struct sctp_tcb *stcb)
/* append to socket */
control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination,
- 0, 0, 0, 0, 0, 0,
+ 0, 0, stcb->asoc.context, 0, 0, 0,
m_notify);
if (control == NULL) {
/* no memory */
@@ -3183,7 +3168,8 @@ sctp_notify_sender_dry_event(struct sctp_tcb *stcb,
struct sctp_sender_dry_event *event;
struct sctp_queued_to_read *control;
- if (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_DRYEVNT)) {
+ if ((stcb == NULL) ||
+ sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_DRYEVNT)) {
/* event not enabled */
return;
}
@@ -3204,7 +3190,8 @@ sctp_notify_sender_dry_event(struct sctp_tcb *stcb,
/* append to socket */
control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination,
- 0, 0, 0, 0, 0, 0, m_notify);
+ 0, 0, stcb->asoc.context, 0, 0, 0,
+ m_notify);
if (control == NULL) {
/* no memory */
sctp_m_freem(m_notify);
@@ -3258,7 +3245,7 @@ sctp_notify_stream_reset_add(struct sctp_tcb *stcb, int number_entries, int flag
}
/* append to socket */
control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination,
- 0, 0, 0, 0, 0, 0,
+ 0, 0, stcb->asoc.context, 0, 0, 0,
m_notify);
if (control == NULL) {
/* no memory */
@@ -3324,7 +3311,7 @@ sctp_notify_stream_reset(struct sctp_tcb *stcb,
}
/* append to socket */
control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination,
- 0, 0, 0, 0, 0, 0,
+ 0, 0, stcb->asoc.context, 0, 0, 0,
m_notify);
if (control == NULL) {
/* no memory */
@@ -3371,11 +3358,11 @@ sctp_ulp_notify(uint32_t notification, struct sctp_tcb *stcb,
switch (notification) {
case SCTP_NOTIFY_ASSOC_UP:
if (stcb->asoc.assoc_up_sent == 0) {
- sctp_notify_assoc_change(SCTP_COMM_UP, stcb, error, NULL, so_locked);
+ sctp_notify_assoc_change(SCTP_COMM_UP, stcb, error, so_locked);
stcb->asoc.assoc_up_sent = 1;
}
if (stcb->asoc.adaptation_needed && (stcb->asoc.adaptation_sent == 0)) {
- sctp_notify_adaptation_layer(stcb, error);
+ sctp_notify_adaptation_layer(stcb);
}
if (stcb->asoc.peer_supports_auth == 0) {
sctp_ulp_notify(SCTP_NOTIFY_NO_PEER_AUTH, stcb, 0,
@@ -3383,7 +3370,7 @@ sctp_ulp_notify(uint32_t notification, struct sctp_tcb *stcb,
}
break;
case SCTP_NOTIFY_ASSOC_DOWN:
- sctp_notify_assoc_change(SCTP_SHUTDOWN_COMP, stcb, error, NULL, so_locked);
+ sctp_notify_assoc_change(SCTP_SHUTDOWN_COMP, stcb, error, so_locked);
break;
case SCTP_NOTIFY_INTERFACE_DOWN:
{
@@ -3434,9 +3421,9 @@ sctp_ulp_notify(uint32_t notification, struct sctp_tcb *stcb,
case SCTP_NOTIFY_ASSOC_ABORTED:
if ((stcb) && (((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_WAIT) ||
((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_ECHOED))) {
- sctp_notify_assoc_change(SCTP_CANT_STR_ASSOC, stcb, error, NULL, so_locked);
+ sctp_notify_assoc_change(SCTP_CANT_STR_ASSOC, stcb, error, so_locked);
} else {
- sctp_notify_assoc_change(SCTP_COMM_LOST, stcb, error, NULL, so_locked);
+ sctp_notify_assoc_change(SCTP_COMM_LOST, stcb, error, so_locked);
}
break;
case SCTP_NOTIFY_PEER_OPENED_STREAM:
@@ -3444,7 +3431,7 @@ sctp_ulp_notify(uint32_t notification, struct sctp_tcb *stcb,
case SCTP_NOTIFY_STREAM_OPENED_OK:
break;
case SCTP_NOTIFY_ASSOC_RESTART:
- sctp_notify_assoc_change(SCTP_RESTART, stcb, error, data, so_locked);
+ sctp_notify_assoc_change(SCTP_RESTART, stcb, error, so_locked);
if (stcb->asoc.peer_supports_auth == 0) {
sctp_ulp_notify(SCTP_NOTIFY_NO_PEER_AUTH, stcb, 0,
NULL, so_locked);
@@ -3814,6 +3801,7 @@ sctp_handle_ootb(struct mbuf *m, int iphlen, int offset, struct sctphdr *sh,
{
struct sctp_chunkhdr *ch, chunk_buf;
unsigned int chk_length;
+ int contains_init_chunk;
SCTP_STAT_INCR_COUNTER32(sctps_outoftheblue);
/* Generate a TO address for future reference */
@@ -3823,6 +3811,7 @@ sctp_handle_ootb(struct mbuf *m, int iphlen, int offset, struct sctphdr *sh,
SCTP_CALLED_DIRECTLY_NOCMPSET);
}
}
+ contains_init_chunk = 0;
ch = (struct sctp_chunkhdr *)sctp_m_getptr(m, offset,
sizeof(*ch), (uint8_t *) & chunk_buf);
while (ch != NULL) {
@@ -3832,6 +3821,9 @@ sctp_handle_ootb(struct mbuf *m, int iphlen, int offset, struct sctphdr *sh,
break;
}
switch (ch->chunk_type) {
+ case SCTP_INIT:
+ contains_init_chunk = 1;
+ break;
case SCTP_COOKIE_ECHO:
/* We hit here only if the assoc is being freed */
return;
@@ -3848,7 +3840,7 @@ sctp_handle_ootb(struct mbuf *m, int iphlen, int offset, struct sctphdr *sh,
*/
return;
case SCTP_SHUTDOWN_ACK:
- sctp_send_shutdown_complete2(m, iphlen, sh, vrf_id, port);
+ sctp_send_shutdown_complete2(m, sh, vrf_id, port);
return;
default:
break;
@@ -3857,7 +3849,11 @@ sctp_handle_ootb(struct mbuf *m, int iphlen, int offset, struct sctphdr *sh,
ch = (struct sctp_chunkhdr *)sctp_m_getptr(m, offset,
sizeof(*ch), (uint8_t *) & chunk_buf);
}
- sctp_send_abort(m, iphlen, sh, 0, op_err, vrf_id, port);
+ if ((SCTP_BASE_SYSCTL(sctp_blackhole) == 0) ||
+ ((SCTP_BASE_SYSCTL(sctp_blackhole) == 1) &&
+ (contains_init_chunk == 0))) {
+ sctp_send_abort(m, iphlen, sh, 0, op_err, vrf_id, port);
+ }
}
/*
@@ -4279,11 +4275,15 @@ sctp_add_to_readq(struct sctp_inpcb *inp,
so = SCTP_INP_SO(inp);
if (!so_locked) {
- atomic_add_int(&stcb->asoc.refcnt, 1);
- SCTP_TCB_UNLOCK(stcb);
+ if (stcb) {
+ atomic_add_int(&stcb->asoc.refcnt, 1);
+ SCTP_TCB_UNLOCK(stcb);
+ }
SCTP_SOCKET_LOCK(so, 1);
- SCTP_TCB_LOCK(stcb);
- atomic_subtract_int(&stcb->asoc.refcnt, 1);
+ if (stcb) {
+ SCTP_TCB_LOCK(stcb);
+ atomic_subtract_int(&stcb->asoc.refcnt, 1);
+ }
if (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) {
SCTP_SOCKET_UNLOCK(so, 1);
return;
@@ -4334,7 +4334,7 @@ get_out:
}
if (inp && (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_CANT_READ)) {
SCTP_INP_READ_UNLOCK(inp);
- return 0;
+ return (0);
}
if (control->end_added) {
/* huh this one is complete? */
@@ -4428,11 +4428,15 @@ get_out:
struct socket *so;
so = SCTP_INP_SO(inp);
- atomic_add_int(&stcb->asoc.refcnt, 1);
- SCTP_TCB_UNLOCK(stcb);
+ if (stcb) {
+ atomic_add_int(&stcb->asoc.refcnt, 1);
+ SCTP_TCB_UNLOCK(stcb);
+ }
SCTP_SOCKET_LOCK(so, 1);
- SCTP_TCB_LOCK(stcb);
- atomic_subtract_int(&stcb->asoc.refcnt, 1);
+ if (stcb) {
+ SCTP_TCB_LOCK(stcb);
+ atomic_subtract_int(&stcb->asoc.refcnt, 1);
+ }
if (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) {
SCTP_SOCKET_UNLOCK(so, 1);
return (0);
@@ -5169,7 +5173,6 @@ restart_nosblocks:
*/
if (hold_rlock == 0) {
SCTP_INP_READ_LOCK(inp);
- hold_rlock = 1;
}
control = TAILQ_FIRST(&inp->read_queue);
if ((control == NULL) && (so->so_rcv.sb_cc != 0)) {
@@ -5815,7 +5818,9 @@ wait_some_more:
}
if (control->end_added) {
out_flags |= MSG_EOR;
- if ((control->do_not_ref_stcb == 0) && ((control->spec_flags & M_NOTIFICATION) == 0))
+ if ((control->do_not_ref_stcb == 0) &&
+ (control->stcb != NULL) &&
+ ((control->spec_flags & M_NOTIFICATION) == 0))
control->stcb->asoc.strmin[control->sinfo_stream].delivery_started = 0;
}
if (control->spec_flags & M_NOTIFICATION) {
@@ -5884,11 +5889,9 @@ out:
}
if (hold_rlock == 1) {
SCTP_INP_READ_UNLOCK(inp);
- hold_rlock = 0;
}
if (hold_sblock) {
SOCKBUF_UNLOCK(&so->so_rcv);
- hold_sblock = 0;
}
if (sockbuf_lock) {
sbunlock(&so->so_rcv);
@@ -5909,7 +5912,6 @@ out:
#endif
}
atomic_add_int(&stcb->asoc.refcnt, -1);
- freecnt_applied = 0;
/* Save the value back for next time */
stcb->freed_by_sorcv_sincelast = freed_so_far;
}
@@ -6353,7 +6355,7 @@ sctp_bindx_add_address(struct socket *so, struct sctp_inpcb *inp,
* assumes all arguments are valid/checked by caller.
*/
void
-sctp_bindx_delete_address(struct socket *so, struct sctp_inpcb *inp,
+sctp_bindx_delete_address(struct sctp_inpcb *inp,
struct sockaddr *sa, sctp_assoc_t assoc_id,
uint32_t vrf_id, int *error)
{
@@ -6371,7 +6373,7 @@ sctp_bindx_delete_address(struct socket *so, struct sctp_inpcb *inp,
return;
}
addr_touse = sa;
-#if defined(INET6) && !defined(__Userspace__) /* TODO port in6_sin6_2_sin */
+#if defined(INET6)
if (sa->sa_family == AF_INET6) {
struct sockaddr_in6 *sin6;
diff --git a/sys/netinet/sctputil.h b/sys/netinet/sctputil.h
index 460adc7..bbaaaa4 100644
--- a/sys/netinet/sctputil.h
+++ b/sys/netinet/sctputil.h
@@ -7,11 +7,11 @@
* modification, are permitted provided that the following conditions are met:
*
* a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
*
* b) 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.
+ * the documentation and/or other materials provided with the distribution.
*
* c) Neither the name of Cisco Systems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
@@ -127,7 +127,7 @@ sctp_append_to_readq(struct sctp_inpcb *inp,
void sctp_iterator_worker(void);
uint32_t sctp_get_prev_mtu(uint32_t);
-uint32_t sctp_get_next_mtu(struct sctp_inpcb *, uint32_t);
+uint32_t sctp_get_next_mtu(uint32_t);
void
sctp_timeout_handler(void *);
@@ -250,7 +250,7 @@ sctp_bindx_add_address(struct socket *so, struct sctp_inpcb *inp,
struct sockaddr *sa, sctp_assoc_t assoc_id,
uint32_t vrf_id, int *error, void *p);
void
-sctp_bindx_delete_address(struct socket *so, struct sctp_inpcb *inp,
+sctp_bindx_delete_address(struct sctp_inpcb *inp,
struct sockaddr *sa, sctp_assoc_t assoc_id,
uint32_t vrf_id, int *error);
@@ -333,7 +333,6 @@ void
void
sctp_wakeup_log(struct sctp_tcb *stcb,
- uint32_t cumtsn,
uint32_t wake_cnt, int from);
void sctp_log_strm_del_alt(struct sctp_tcb *stcb, uint32_t, uint16_t, uint16_t, int);
@@ -359,7 +358,7 @@ void sctp_log_closing(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int16_t loc
void sctp_log_lock(struct sctp_inpcb *inp, struct sctp_tcb *stcb, uint8_t from);
void sctp_log_maxburst(struct sctp_tcb *stcb, struct sctp_nets *, int, int, uint8_t);
-void sctp_log_block(uint8_t, struct socket *, struct sctp_association *, int);
+void sctp_log_block(uint8_t, struct sctp_association *, int);
void sctp_log_rwnd(uint8_t, uint32_t, uint32_t, uint32_t);
void sctp_log_mbcnt(uint8_t, uint32_t, uint32_t, uint32_t, uint32_t);
void sctp_log_rwnd_set(uint8_t, uint32_t, uint32_t, uint32_t, uint32_t);
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index e9ff355..db373cd 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -1795,9 +1795,6 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
win = sbspace(&so->so_rcv);
if (win < 0)
win = 0;
- KASSERT(SEQ_GEQ(tp->rcv_adv, tp->rcv_nxt),
- ("tcp_input negative window: tp %p rcv_nxt %u rcv_adv %u", tp,
- tp->rcv_nxt, tp->rcv_adv));
tp->rcv_wnd = imax(win, (int)(tp->rcv_adv - tp->rcv_nxt));
/* Reset receive buffer auto scaling when not in bulk receive mode. */
diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c
index fbcd601..469c7c0 100644
--- a/sys/netinet/tcp_timewait.c
+++ b/sys/netinet/tcp_timewait.c
@@ -242,10 +242,10 @@ tcp_twstart(struct tcpcb *tp)
/*
* Recover last window size sent.
*/
- KASSERT(SEQ_GEQ(tp->rcv_adv, tp->rcv_nxt),
- ("tcp_twstart negative window: tp %p rcv_nxt %u rcv_adv %u", tp,
- tp->rcv_nxt, tp->rcv_adv));
- tw->last_win = (tp->rcv_adv - tp->rcv_nxt) >> tp->rcv_scale;
+ if (SEQ_GT(tp->rcv_adv, tp->rcv_nxt))
+ tw->last_win = (tp->rcv_adv - tp->rcv_nxt) >> tp->rcv_scale;
+ else
+ tw->last_win = 0;
/*
* Set t_recent if timestamps are used on the connection.
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index 7a7e1ce..5e2af8f 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -204,8 +204,10 @@ tcp_detach(struct socket *so, struct inpcb *inp)
tcp_discardcb(tp);
in_pcbdetach(inp);
in_pcbfree(inp);
- } else
+ } else {
in_pcbdetach(inp);
+ INP_WUNLOCK(inp);
+ }
}
}
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c
index 2114a0a..7d7467a 100644
--- a/sys/netinet6/icmp6.c
+++ b/sys/netinet6/icmp6.c
@@ -1780,9 +1780,9 @@ ni6_addrs(struct icmp6_nodeinfo *ni6, struct mbuf *m, struct ifnet **ifpp,
}
IFNET_RLOCK_NOSLEEP();
- for (ifp = TAILQ_FIRST(&V_ifnet); ifp; ifp = TAILQ_NEXT(ifp, if_list)) {
+ TAILQ_FOREACH(ifp, &V_ifnet, if_list) {
addrsofif = 0;
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
if (ifa->ifa_addr->sa_family != AF_INET6)
continue;
@@ -1833,7 +1833,7 @@ ni6_addrs(struct icmp6_nodeinfo *ni6, struct mbuf *m, struct ifnet **ifpp,
}
addrsofif++; /* count the address */
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
if (iffound) {
*ifpp = ifp;
IFNET_RUNLOCK_NOSLEEP();
@@ -1851,7 +1851,7 @@ static int
ni6_store_addrs(struct icmp6_nodeinfo *ni6, struct icmp6_nodeinfo *nni6,
struct ifnet *ifp0, int resid)
{
- struct ifnet *ifp = ifp0 ? ifp0 : TAILQ_FIRST(&V_ifnet);
+ struct ifnet *ifp;
struct in6_ifaddr *ifa6;
struct ifaddr *ifa;
struct ifnet *ifp_dep = NULL;
@@ -1864,10 +1864,11 @@ ni6_store_addrs(struct icmp6_nodeinfo *ni6, struct icmp6_nodeinfo *nni6,
return (0); /* needless to copy */
IFNET_RLOCK_NOSLEEP();
+ ifp = ifp0 ? ifp0 : TAILQ_FIRST(&V_ifnet);
again:
for (; ifp; ifp = TAILQ_NEXT(ifp, if_list)) {
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
if (ifa->ifa_addr->sa_family != AF_INET6)
continue;
@@ -1922,7 +1923,7 @@ ni6_store_addrs(struct icmp6_nodeinfo *ni6, struct icmp6_nodeinfo *nni6,
/* now we can copy the address */
if (resid < sizeof(struct in6_addr) +
sizeof(u_int32_t)) {
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
/*
* We give up much more copy.
* Set the truncate flag and return.
@@ -1969,7 +1970,7 @@ ni6_store_addrs(struct icmp6_nodeinfo *ni6, struct icmp6_nodeinfo *nni6,
resid -= (sizeof(struct in6_addr) + sizeof(u_int32_t));
copied += (sizeof(struct in6_addr) + sizeof(u_int32_t));
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
if (ifp0) /* we need search only on the specified IF */
break;
}
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
index 8514f73..cf5eb35 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -95,6 +95,7 @@ __FBSDID("$FreeBSD$");
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netinet/in_pcb.h>
+#include <netinet/ip_carp.h>
#include <netinet/ip6.h>
#include <netinet6/ip6_var.h>
@@ -153,10 +154,6 @@ in6_ifaddloop(struct ifaddr *ifa)
ifp = ifa->ifa_ifp;
IF_AFDATA_LOCK(ifp);
ifa->ifa_rtrequest = nd6_rtrequest;
-
- /* XXX QL
- * we need to report rt_newaddrmsg
- */
ln = lla_lookup(LLTABLE6(ifp), (LLE_CREATE | LLE_IFADDR |
LLE_EXCLUSIVE), (struct sockaddr *)&ia->ia_addr);
IF_AFDATA_UNLOCK(ifp);
@@ -272,7 +269,15 @@ in6_control(struct socket *so, u_long cmd, caddr_t data,
struct in6_ifaddr *ia = NULL;
struct in6_aliasreq *ifra = (struct in6_aliasreq *)data;
struct sockaddr_in6 *sa6;
+ int carp_attached = 0;
int error;
+ u_long ocmd = cmd;
+
+ /*
+ * Compat to make pre-10.x ifconfig(8) operable.
+ */
+ if (cmd == OSIOCAIFADDR_IN6)
+ cmd = SIOCAIFADDR_IN6;
switch (cmd) {
case SIOCGETSGCNT_IN6:
@@ -652,6 +657,18 @@ in6_control(struct socket *so, u_long cmd, caddr_t data,
break;
}
+ if (cmd == ocmd && ifra->ifra_vhid > 0) {
+ if (carp_attach_p != NULL)
+ error = (*carp_attach_p)(&ia->ia_ifa,
+ ifra->ifra_vhid);
+ else
+ error = EPROTONOSUPPORT;
+ if (error)
+ goto out;
+ else
+ carp_attached = 1;
+ }
+
/*
* then, make the prefix on-link on the interface.
* XXX: we'd rather create the prefix before the address, but
@@ -695,9 +712,14 @@ in6_control(struct socket *so, u_long cmd, caddr_t data,
* nd6_prelist_add will install the corresponding
* interface route.
*/
- if ((error = nd6_prelist_add(&pr0, NULL, &pr)) != 0)
+ if ((error = nd6_prelist_add(&pr0, NULL, &pr)) != 0) {
+ if (carp_attached)
+ (*carp_detach_p)(&ia->ia_ifa);
goto out;
+ }
if (pr == NULL) {
+ if (carp_attached)
+ (*carp_detach_p)(&ia->ia_ifa);
log(LOG_ERR, "nd6_prelist_add succeeded but "
"no prefix\n");
error = EINVAL;
@@ -952,9 +974,9 @@ in6_update_ifa(struct ifnet *ifp, struct in6_aliasreq *ifra,
ia->ia_ifa.ifa_netmask = (struct sockaddr *)&ia->ia_prefixmask;
ia->ia_ifp = ifp;
ifa_ref(&ia->ia_ifa); /* if_addrhead */
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_WLOCK(ifp);
TAILQ_INSERT_TAIL(&ifp->if_addrhead, &ia->ia_ifa, ifa_link);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_WUNLOCK(ifp);
ifa_ref(&ia->ia_ifa); /* in6_ifaddrhead */
IN6_IFADDR_WLOCK();
@@ -1299,15 +1321,18 @@ in6_purgeaddr(struct ifaddr *ifa)
struct sockaddr_in6 mltaddr, mltmask;
int plen, error;
struct rtentry *rt;
- struct ifaddr *ifa0, *nifa;
+ struct ifaddr *ifa0;
+
+ if (ifa->ifa_carp)
+ (*carp_detach_p)(ifa);
/*
* find another IPv6 address as the gateway for the
* link-local and node-local all-nodes multicast
* address routes
*/
- IF_ADDR_LOCK(ifp);
- TAILQ_FOREACH_SAFE(ifa0, &ifp->if_addrhead, ifa_link, nifa) {
+ IF_ADDR_RLOCK(ifp);
+ TAILQ_FOREACH(ifa0, &ifp->if_addrhead, ifa_link) {
if ((ifa0->ifa_addr->sa_family != AF_INET6) ||
memcmp(&satosin6(ifa0->ifa_addr)->sin6_addr,
&ia->ia_addr.sin6_addr,
@@ -1318,7 +1343,7 @@ in6_purgeaddr(struct ifaddr *ifa)
}
if (ifa0 != NULL)
ifa_ref(ifa0);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
/*
* Remove the loopback route to the interface address.
@@ -1340,7 +1365,7 @@ in6_purgeaddr(struct ifaddr *ifa)
/*
* leave from multicast groups we have joined for the interface
*/
- while ((imm = ia->ia6_memberships.lh_first) != NULL) {
+ while ((imm = LIST_FIRST(&ia->ia6_memberships)) != NULL) {
LIST_REMOVE(imm, i6mm_chain);
in6_leavegroup(imm);
}
@@ -1358,8 +1383,7 @@ in6_purgeaddr(struct ifaddr *ifa)
mltaddr.sin6_family = AF_INET6;
mltaddr.sin6_addr = in6addr_linklocal_allnodes;
- if ((error = in6_setscope(&mltaddr.sin6_addr, ifp, NULL)) !=
- 0)
+ if ((error = in6_setscope(&mltaddr.sin6_addr, ifp, NULL)) != 0)
goto cleanup;
rt = rtalloc1((struct sockaddr *)&mltaddr, 0, 0UL);
@@ -1453,6 +1477,8 @@ in6_purgeaddr(struct ifaddr *ifa)
}
cleanup:
+ if (ifa0 != NULL)
+ ifa_free(ifa0);
plen = in6_mask2len(&ia->ia_prefixmask.sin6_addr, NULL); /* XXX */
if ((ia->ia_flags & IFA_ROUTE) && plen == 128) {
@@ -1477,8 +1503,6 @@ cleanup:
return;
ia->ia_flags &= ~IFA_ROUTE;
}
- if (ifa0 != NULL)
- ifa_free(ifa0);
in6_unlink_ifa(ia, ifp);
}
@@ -1488,9 +1512,9 @@ in6_unlink_ifa(struct in6_ifaddr *ia, struct ifnet *ifp)
{
int s = splnet();
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_WLOCK(ifp);
TAILQ_REMOVE(&ifp->if_addrhead, &ia->ia_ifa, ifa_link);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_WUNLOCK(ifp);
ifa_free(&ia->ia_ifa); /* if_addrhead */
/*
@@ -1717,7 +1741,7 @@ in6_lifaddr_ioctl(struct socket *so, u_long cmd, caddr_t data,
}
}
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
if (ifa->ifa_addr->sa_family != AF_INET6)
continue;
@@ -1738,7 +1762,9 @@ in6_lifaddr_ioctl(struct socket *so, u_long cmd, caddr_t data,
if (IN6_ARE_ADDR_EQUAL(&candidate, &match))
break;
}
- IF_ADDR_UNLOCK(ifp);
+ if (ifa != NULL)
+ ifa_ref(ifa);
+ IF_ADDR_RUNLOCK(ifp);
if (!ifa)
return EADDRNOTAVAIL;
ia = ifa2ia6(ifa);
@@ -1750,16 +1776,20 @@ in6_lifaddr_ioctl(struct socket *so, u_long cmd, caddr_t data,
bcopy(&ia->ia_addr, &iflr->addr, ia->ia_addr.sin6_len);
error = sa6_recoverscope(
(struct sockaddr_in6 *)&iflr->addr);
- if (error != 0)
+ if (error != 0) {
+ ifa_free(ifa);
return (error);
+ }
if ((ifp->if_flags & IFF_POINTOPOINT) != 0) {
bcopy(&ia->ia_dstaddr, &iflr->dstaddr,
ia->ia_dstaddr.sin6_len);
error = sa6_recoverscope(
(struct sockaddr_in6 *)&iflr->dstaddr);
- if (error != 0)
+ if (error != 0) {
+ ifa_free(ifa);
return (error);
+ }
} else
bzero(&iflr->dstaddr, sizeof(iflr->dstaddr));
@@ -1767,6 +1797,7 @@ in6_lifaddr_ioctl(struct socket *so, u_long cmd, caddr_t data,
in6_mask2len(&ia->ia_prefixmask.sin6_addr, NULL);
iflr->flags = ia->ia6_flags; /* XXX */
+ ifa_free(ifa);
return 0;
} else {
@@ -1790,6 +1821,7 @@ in6_lifaddr_ioctl(struct socket *so, u_long cmd, caddr_t data,
ia->ia_prefixmask.sin6_len);
ifra.ifra_flags = ia->ia6_flags;
+ ifa_free(ifa);
return in6_control(so, SIOCDIFADDR_IN6, (caddr_t)&ifra,
ifp, td);
}
@@ -1816,13 +1848,13 @@ in6_ifinit(struct ifnet *ifp, struct in6_ifaddr *ia,
* if this is its first address,
* and to validate the address if necessary.
*/
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
if (ifa->ifa_addr->sa_family != AF_INET6)
continue;
ifacount++;
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
ia->ia_addr = *sin6;
@@ -1893,7 +1925,7 @@ in6ifa_ifpforlinklocal(struct ifnet *ifp, int ignoreflags)
{
struct ifaddr *ifa;
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
if (ifa->ifa_addr->sa_family != AF_INET6)
continue;
@@ -1905,7 +1937,7 @@ in6ifa_ifpforlinklocal(struct ifnet *ifp, int ignoreflags)
break;
}
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
return ((struct in6_ifaddr *)ifa);
}
@@ -1920,7 +1952,7 @@ in6ifa_ifpwithaddr(struct ifnet *ifp, struct in6_addr *addr)
{
struct ifaddr *ifa;
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
if (ifa->ifa_addr->sa_family != AF_INET6)
continue;
@@ -1929,7 +1961,7 @@ in6ifa_ifpwithaddr(struct ifnet *ifp, struct in6_addr *addr)
break;
}
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
return ((struct in6_ifaddr *)ifa);
}
@@ -2170,7 +2202,7 @@ in6_ifawithifp(struct ifnet *ifp, struct in6_addr *dst)
* If two or more, return one which matches the dst longest.
* If none, return one of global addresses assigned other ifs.
*/
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
if (ifa->ifa_addr->sa_family != AF_INET6)
continue;
@@ -2204,12 +2236,10 @@ in6_ifawithifp(struct ifnet *ifp, struct in6_addr *dst)
}
if (besta) {
ifa_ref(&besta->ia_ifa);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
return (besta);
}
- IF_ADDR_UNLOCK(ifp);
- IN6_IFADDR_RLOCK();
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
if (ifa->ifa_addr->sa_family != AF_INET6)
continue;
@@ -2227,10 +2257,10 @@ in6_ifawithifp(struct ifnet *ifp, struct in6_addr *dst)
if (ifa != NULL)
ifa_ref(ifa);
- IN6_IFADDR_RUNLOCK();
+ IF_ADDR_RUNLOCK(ifp);
return (struct in6_ifaddr *)ifa;
}
- IN6_IFADDR_RUNLOCK();
+ IF_ADDR_RUNLOCK(ifp);
/* use the last-resort values, that are, deprecated addresses */
if (dep[0])
@@ -2250,7 +2280,7 @@ in6_if_up(struct ifnet *ifp)
struct ifaddr *ifa;
struct in6_ifaddr *ia;
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
if (ifa->ifa_addr->sa_family != AF_INET6)
continue;
@@ -2266,7 +2296,7 @@ in6_if_up(struct ifnet *ifp)
arc4random() % (MAX_RTR_SOLICITATION_DELAY * hz));
}
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
/*
* special cases, like 6to4, are handled in in6_ifattach
@@ -2324,8 +2354,7 @@ in6_setmaxmtu(void)
struct ifnet *ifp;
IFNET_RLOCK_NOSLEEP();
- for (ifp = TAILQ_FIRST(&V_ifnet); ifp;
- ifp = TAILQ_NEXT(ifp, if_list)) {
+ TAILQ_FOREACH(ifp, &V_ifnet, if_list) {
/* this function can be called during ifnet initialization */
if (!ifp->if_afdata[AF_INET6])
continue;
diff --git a/sys/netinet6/in6_ifattach.c b/sys/netinet6/in6_ifattach.c
index 2ff7455..f8134ca 100644
--- a/sys/netinet6/in6_ifattach.c
+++ b/sys/netinet6/in6_ifattach.c
@@ -243,7 +243,7 @@ in6_get_hw_ifid(struct ifnet *ifp, struct in6_addr *in6)
static u_int8_t allone[8] =
{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
if (ifa->ifa_addr->sa_family != AF_LINK)
continue;
@@ -255,7 +255,7 @@ in6_get_hw_ifid(struct ifnet *ifp, struct in6_addr *in6)
goto found;
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
return -1;
@@ -282,7 +282,7 @@ found:
/* look at IEEE802/EUI64 only */
if (addrlen != 8 && addrlen != 6) {
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
return -1;
}
@@ -292,11 +292,11 @@ found:
* card insertion.
*/
if (bcmp(addr, allzero, addrlen) == 0) {
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
return -1;
}
if (bcmp(addr, allone, addrlen) == 0) {
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
return -1;
}
@@ -317,11 +317,11 @@ found:
case IFT_ARCNET:
if (addrlen != 1) {
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
return -1;
}
if (!addr[0]) {
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
return -1;
}
@@ -345,17 +345,17 @@ found:
* identifier source (can be renumbered).
* we don't do this.
*/
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
return -1;
default:
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
return -1;
}
/* sanity check: g bit must not indicate "group" */
if (EUI64_GROUP(in6)) {
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
return -1;
}
@@ -368,11 +368,11 @@ found:
*/
if ((in6->s6_addr[8] & ~(EUI64_GBIT | EUI64_UBIT)) == 0x00 &&
bcmp(&in6->s6_addr[9], allzero, 7) == 0) {
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
return -1;
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
return 0;
}
@@ -405,7 +405,7 @@ get_ifid(struct ifnet *ifp0, struct ifnet *altifp,
/* next, try to get it from some other hardware interface */
IFNET_RLOCK_NOSLEEP();
- for (ifp = V_ifnet.tqh_first; ifp; ifp = ifp->if_list.tqe_next) {
+ TAILQ_FOREACH(ifp, &V_ifnet, if_list) {
if (ifp == ifp0)
continue;
if (in6_get_hw_ifid(ifp, in6) != 0)
@@ -513,12 +513,8 @@ in6_ifattach_linklocal(struct ifnet *ifp, struct ifnet *altifp)
}
ia = in6ifa_ifpforlinklocal(ifp, 0); /* ia must not be NULL */
-#ifdef DIAGNOSTIC
- if (!ia) {
- panic("ia == NULL in in6_ifattach_linklocal");
- /* NOTREACHED */
- }
-#endif
+ KASSERT(ia != NULL, ("%s: ia == NULL, ifp=%p", __func__, ifp));
+
ifa_free(&ia->ia_ifa);
/*
@@ -705,7 +701,6 @@ in6_ifattach(struct ifnet *ifp, struct ifnet *altifp)
switch (ifp->if_type) {
case IFT_PFLOG:
case IFT_PFSYNC:
- case IFT_CARP:
return;
}
@@ -821,7 +816,7 @@ in6_ifdetach(struct ifnet *ifp)
/*
* leave from multicast groups we have joined for the interface
*/
- while ((imm = ia->ia6_memberships.lh_first) != NULL) {
+ while ((imm = LIST_FIRST(&ia->ia6_memberships)) != NULL) {
LIST_REMOVE(imm, i6mm_chain);
in6_leavegroup(imm);
}
@@ -838,9 +833,9 @@ in6_ifdetach(struct ifnet *ifp)
}
/* remove from the linked list */
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_WLOCK(ifp);
TAILQ_REMOVE(&ifp->if_addrhead, ifa, ifa_link);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_WUNLOCK(ifp);
ifa_free(ifa); /* if_addrhead */
IN6_IFADDR_WLOCK();
@@ -924,8 +919,7 @@ in6_tmpaddrtimer(void *arg)
V_ip6_temp_regen_advance) * hz, in6_tmpaddrtimer, curvnet);
bzero(nullbuf, sizeof(nullbuf));
- for (ifp = TAILQ_FIRST(&V_ifnet); ifp;
- ifp = TAILQ_NEXT(ifp, if_list)) {
+ TAILQ_FOREACH(ifp, &V_ifnet, if_list) {
ndi = ND_IFINFO(ifp);
if (bcmp(ndi->randomid, nullbuf, sizeof(nullbuf)) != 0) {
/*
@@ -956,7 +950,7 @@ in6_purgemaddrs(struct ifnet *ifp)
* We need to do this as IF_ADDR_LOCK() may be re-acquired
* by code further down.
*/
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
if (ifma->ifma_addr->sa_family != AF_INET6 ||
ifma->ifma_protospec == NULL)
@@ -964,7 +958,7 @@ in6_purgemaddrs(struct ifnet *ifp)
inm = (struct in6_multi *)ifma->ifma_protospec;
LIST_INSERT_HEAD(&purgeinms, inm, in6m_entry);
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
LIST_FOREACH_SAFE(inm, &purgeinms, in6m_entry, tinm) {
LIST_REMOVE(inm, in6m_entry);
diff --git a/sys/netinet6/in6_mcast.c b/sys/netinet6/in6_mcast.c
index a1f233a..e53597b 100644
--- a/sys/netinet6/in6_mcast.c
+++ b/sys/netinet6/in6_mcast.c
@@ -400,7 +400,7 @@ in6_mc_get(struct ifnet *ifp, const struct in6_addr *group,
* re-acquire around the call.
*/
IN6_MULTI_LOCK_ASSERT();
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_WLOCK(ifp);
inm = in6m_lookup_locked(ifp, group);
if (inm != NULL) {
@@ -424,11 +424,11 @@ in6_mc_get(struct ifnet *ifp, const struct in6_addr *group,
* Check if a link-layer group is already associated
* with this network-layer group on the given ifnet.
*/
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_WUNLOCK(ifp);
error = if_addmulti(ifp, (struct sockaddr *)&gsin6, &ifma);
if (error != 0)
return (error);
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_WLOCK(ifp);
/*
* If something other than netinet6 is occupying the link-layer
@@ -455,7 +455,7 @@ in6_mc_get(struct ifnet *ifp, const struct in6_addr *group,
goto out_locked;
}
- IF_ADDR_LOCK_ASSERT(ifp);
+ IF_ADDR_WLOCK_ASSERT(ifp);
/*
* A new in6_multi record is needed; allocate and initialize it.
@@ -487,7 +487,7 @@ in6_mc_get(struct ifnet *ifp, const struct in6_addr *group,
*pinm = inm;
out_locked:
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_WUNLOCK(ifp);
return (error);
}
@@ -2719,7 +2719,7 @@ sysctl_ip6_mcast_filters(SYSCTL_HANDLER_ARGS)
IN6_MULTI_LOCK();
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
if (ifma->ifma_addr->sa_family != AF_INET6 ||
ifma->ifma_protospec == NULL)
@@ -2748,7 +2748,7 @@ sysctl_ip6_mcast_filters(SYSCTL_HANDLER_ARGS)
break;
}
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
IN6_MULTI_UNLOCK();
diff --git a/sys/netinet6/in6_proto.c b/sys/netinet6/in6_proto.c
index 254ec88..ef948c0 100644
--- a/sys/netinet6/in6_proto.c
+++ b/sys/netinet6/in6_proto.c
@@ -520,7 +520,7 @@ SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_SENDREDIRECTS, redirect, CTLFLAG_RW,
&VNET_NAME(ip6_sendredirects), 0, "");
SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_DEFHLIM, hlim, CTLFLAG_RW,
&VNET_NAME(ip6_defhlim), 0, "");
-SYSCTL_VNET_STRUCT(_net_inet6_ip6, IPV6CTL_STATS, stats, CTLFLAG_RD,
+SYSCTL_VNET_STRUCT(_net_inet6_ip6, IPV6CTL_STATS, stats, CTLFLAG_RW,
&VNET_NAME(ip6stat), ip6stat, "");
SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_MAXFRAGPACKETS, maxfragpackets,
CTLFLAG_RW, &VNET_NAME(ip6_maxfragpackets), 0, "");
@@ -573,7 +573,7 @@ SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_AUTO_LINKLOCAL, auto_linklocal,
CTLFLAG_RW, &VNET_NAME(ip6_auto_linklocal), 0,
"Default value of per-interface flag for automatically adding an IPv6"
" link-local address to interfaces when attached");
-SYSCTL_VNET_STRUCT(_net_inet6_ip6, IPV6CTL_RIP6STATS, rip6stats, CTLFLAG_RD,
+SYSCTL_VNET_STRUCT(_net_inet6_ip6, IPV6CTL_RIP6STATS, rip6stats, CTLFLAG_RW,
&VNET_NAME(rip6stat), rip6stat, "");
SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_PREFER_TEMPADDR, prefer_tempaddr,
CTLFLAG_RW, &VNET_NAME(ip6_prefer_tempaddr), 0, "");
@@ -603,7 +603,7 @@ SYSCTL_VNET_INT(_net_inet6_icmp6, ICMPV6CTL_REDIRACCEPT, rediraccept,
CTLFLAG_RW, &VNET_NAME(icmp6_rediraccept), 0, "");
SYSCTL_VNET_INT(_net_inet6_icmp6, ICMPV6CTL_REDIRTIMEOUT, redirtimeout,
CTLFLAG_RW, &VNET_NAME(icmp6_redirtimeout), 0, "");
-SYSCTL_VNET_STRUCT(_net_inet6_icmp6, ICMPV6CTL_STATS, stats, CTLFLAG_RD,
+SYSCTL_VNET_STRUCT(_net_inet6_icmp6, ICMPV6CTL_STATS, stats, CTLFLAG_RW,
&VNET_NAME(icmp6stat), icmp6stat, "");
SYSCTL_VNET_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_PRUNE, nd6_prune, CTLFLAG_RW,
&VNET_NAME(nd6_prune), 0, "");
diff --git a/sys/netinet6/in6_var.h b/sys/netinet6/in6_var.h
index 00342fd..c491649 100644
--- a/sys/netinet6/in6_var.h
+++ b/sys/netinet6/in6_var.h
@@ -287,6 +287,17 @@ struct in6_aliasreq {
struct sockaddr_in6 ifra_prefixmask;
int ifra_flags;
struct in6_addrlifetime ifra_lifetime;
+ int ifra_vhid;
+};
+
+/* pre-10.x compat */
+struct oin6_aliasreq {
+ char ifra_name[IFNAMSIZ];
+ struct sockaddr_in6 ifra_addr;
+ struct sockaddr_in6 ifra_dstaddr;
+ struct sockaddr_in6 ifra_prefixmask;
+ int ifra_flags;
+ struct in6_addrlifetime ifra_lifetime;
};
/* prefix type macro */
@@ -409,7 +420,8 @@ struct in6_rrenumreq {
#define SIOCGIFNETMASK_IN6 _IOWR('i', 37, struct in6_ifreq)
#define SIOCDIFADDR_IN6 _IOW('i', 25, struct in6_ifreq)
-#define SIOCAIFADDR_IN6 _IOW('i', 26, struct in6_aliasreq)
+#define OSIOCAIFADDR_IN6 _IOW('i', 26, struct oin6_aliasreq)
+#define SIOCAIFADDR_IN6 _IOW('i', 27, struct in6_aliasreq)
#define SIOCSIFPHYADDR_IN6 _IOW('i', 70, struct in6_aliasreq)
#define SIOCGIFPSRCADDR_IN6 _IOWR('i', 71, struct in6_ifreq)
@@ -704,9 +716,9 @@ in6m_lookup(struct ifnet *ifp, const struct in6_addr *mcaddr)
struct in6_multi *inm;
IN6_MULTI_LOCK();
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
inm = in6m_lookup_locked(ifp, mcaddr);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
IN6_MULTI_UNLOCK();
return (inm);
@@ -779,8 +791,7 @@ void in6_ifremloop(struct ifaddr *);
void in6_ifaddloop(struct ifaddr *);
int in6_is_addr_deprecated __P((struct sockaddr_in6 *));
-struct inpcb;
-int in6_src_ioctl __P((u_long, caddr_t));
+int in6_src_ioctl __P((u_long, caddr_t));
#endif /* _KERNEL */
#endif /* _NETINET6_IN6_VAR_H_ */
diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c
index 1fdde16..245f8f4 100644
--- a/sys/netinet6/ip6_input.c
+++ b/sys/netinet6/ip6_input.c
@@ -617,7 +617,7 @@ passin:
bad = 1;
#define sa_equal(a1, a2) \
(bcmp((a1), (a2), ((a1))->sin6_len) == 0)
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
if (ifa->ifa_addr->sa_family != dst6.sin6_family)
continue;
@@ -649,7 +649,7 @@ passin:
ip6_sprintf(ip6bufs, &ip6->ip6_src),
ip6_sprintf(ip6bufd, &ip6->ip6_dst)));
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
LLE_RUNLOCK(lle);
if (bad)
goto bad;
diff --git a/sys/netinet6/ip6_ipsec.c b/sys/netinet6/ip6_ipsec.c
index bbbc9c9..e868917 100644
--- a/sys/netinet6/ip6_ipsec.c
+++ b/sys/netinet6/ip6_ipsec.c
@@ -103,7 +103,7 @@ SYSCTL_VNET_INT(_net_inet6_ipsec6, OID_AUTO,
int
ip6_ipsec_filtertunnel(struct mbuf *m)
{
-#if defined(IPSEC)
+#ifdef IPSEC
/*
* Bypass packet filtering for packets previously handled by IPsec.
diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c
index a4f5044..98bf0ac 100644
--- a/sys/netinet6/ip6_mroute.c
+++ b/sys/netinet6/ip6_mroute.c
@@ -250,7 +250,7 @@ static mifi_t nummifs = 0;
static mifi_t reg_mif_num = (mifi_t)-1;
static struct pim6stat pim6stat;
-SYSCTL_STRUCT(_net_inet6_pim, PIM6CTL_STATS, stats, CTLFLAG_RD,
+SYSCTL_STRUCT(_net_inet6_pim, PIM6CTL_STATS, stats, CTLFLAG_RW,
&pim6stat, pim6stat,
"PIM Statistics (struct pim6stat, netinet6/pim_var.h)");
diff --git a/sys/netinet6/mld6.c b/sys/netinet6/mld6.c
index 740b569..065ed7e 100644
--- a/sys/netinet6/mld6.c
+++ b/sys/netinet6/mld6.c
@@ -121,7 +121,8 @@ static int mld_v1_input_query(struct ifnet *, const struct ip6_hdr *,
/*const*/ struct mld_hdr *);
static int mld_v1_input_report(struct ifnet *, const struct ip6_hdr *,
/*const*/ struct mld_hdr *);
-static void mld_v1_process_group_timer(struct in6_multi *, const int);
+static void mld_v1_process_group_timer(struct mld_ifinfo *,
+ struct in6_multi *);
static void mld_v1_process_querier_timers(struct mld_ifinfo *);
static int mld_v1_transmit_report(struct in6_multi *, const int);
static void mld_v1_update_group(struct in6_multi *, const int);
@@ -542,7 +543,7 @@ mld_ifdetach(struct ifnet *ifp)
mli = MLD_IFINFO(ifp);
if (mli->mli_version == MLD_VERSION_2) {
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
if (ifma->ifma_addr->sa_family != AF_INET6 ||
ifma->ifma_protospec == NULL)
@@ -554,7 +555,7 @@ mld_ifdetach(struct ifnet *ifp)
}
in6m_clear_recorded(inm);
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
SLIST_FOREACH_SAFE(inm, &mli->mli_relinmhead, in6m_nrele,
tinm) {
SLIST_REMOVE_HEAD(&mli->mli_relinmhead, in6m_nrele);
@@ -693,7 +694,7 @@ mld_v1_input_query(struct ifnet *ifp, const struct ip6_hdr *ip6,
if (timer == 0)
timer = 1;
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
if (is_general_query) {
/*
* For each reporting group joined on this
@@ -725,7 +726,7 @@ mld_v1_input_query(struct ifnet *ifp, const struct ip6_hdr *ip6,
in6_clearscope(&mld->mld_addr);
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
MLD_UNLOCK();
IN6_MULTI_UNLOCK();
@@ -936,10 +937,10 @@ mld_v2_input_query(struct ifnet *ifp, const struct ip6_hdr *ip6,
* Queries for groups we are not a member of on this
* link are simply ignored.
*/
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
inm = in6m_lookup_locked(ifp, &mld->mld_addr);
if (inm == NULL) {
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
goto out_locked;
}
if (nsrc > 0) {
@@ -947,7 +948,7 @@ mld_v2_input_query(struct ifnet *ifp, const struct ip6_hdr *ip6,
&V_mld_gsrdelay)) {
CTR1(KTR_MLD, "%s: GS query throttled.",
__func__);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
goto out_locked;
}
}
@@ -965,7 +966,7 @@ mld_v2_input_query(struct ifnet *ifp, const struct ip6_hdr *ip6,
/* XXX Clear embedded scope ID as userland won't expect it. */
in6_clearscope(&mld->mld_addr);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
}
out_locked:
@@ -1175,7 +1176,7 @@ mld_v1_input_report(struct ifnet *ifp, const struct ip6_hdr *ip6,
IN6_MULTI_LOCK();
MLD_LOCK();
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
/*
* MLDv1 report suppression.
@@ -1223,8 +1224,8 @@ mld_v1_input_report(struct ifnet *ifp, const struct ip6_hdr *ip6,
}
out_locked:
+ IF_ADDR_RUNLOCK(ifp);
MLD_UNLOCK();
- IF_ADDR_UNLOCK(ifp);
IN6_MULTI_UNLOCK();
/* XXX Clear embedded scope ID as userland won't expect it. */
@@ -1336,8 +1337,8 @@ mld_fasttimo_vnet(void)
struct ifqueue qrq; /* Query response packets */
struct ifnet *ifp;
struct mld_ifinfo *mli;
- struct ifmultiaddr *ifma, *tifma;
- struct in6_multi *inm;
+ struct ifmultiaddr *ifma;
+ struct in6_multi *inm, *tinm;
int uri_fasthz;
uri_fasthz = 0;
@@ -1400,25 +1401,15 @@ mld_fasttimo_vnet(void)
IFQ_SET_MAXLEN(&scq, MLD_MAX_STATE_CHANGE_PACKETS);
}
- IF_ADDR_LOCK(ifp);
- TAILQ_FOREACH_SAFE(ifma, &ifp->if_multiaddrs, ifma_link,
- tifma) {
+ IF_ADDR_RLOCK(ifp);
+ TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
if (ifma->ifma_addr->sa_family != AF_INET6 ||
ifma->ifma_protospec == NULL)
continue;
inm = (struct in6_multi *)ifma->ifma_protospec;
switch (mli->mli_version) {
case MLD_VERSION_1:
- /*
- * XXX Drop IF_ADDR lock temporarily to
- * avoid recursion caused by a potential
- * call by in6ifa_ifpforlinklocal().
- * rwlock candidate?
- */
- IF_ADDR_UNLOCK(ifp);
- mld_v1_process_group_timer(inm,
- mli->mli_version);
- IF_ADDR_LOCK(ifp);
+ mld_v1_process_group_timer(mli, inm);
break;
case MLD_VERSION_2:
mld_v2_process_group_timers(mli, &qrq,
@@ -1426,11 +1417,27 @@ mld_fasttimo_vnet(void)
break;
}
}
- IF_ADDR_UNLOCK(ifp);
-
- if (mli->mli_version == MLD_VERSION_2) {
- struct in6_multi *tinm;
+ IF_ADDR_RUNLOCK(ifp);
+ switch (mli->mli_version) {
+ case MLD_VERSION_1:
+ /*
+ * Transmit reports for this lifecycle. This
+ * is done while not holding IF_ADDR_LOCK
+ * since this can call
+ * in6ifa_ifpforlinklocal() which locks
+ * IF_ADDR_LOCK internally as well as
+ * ip6_output() to transmit a packet.
+ */
+ SLIST_FOREACH_SAFE(inm, &mli->mli_relinmhead,
+ in6m_nrele, tinm) {
+ SLIST_REMOVE_HEAD(&mli->mli_relinmhead,
+ in6m_nrele);
+ (void)mld_v1_transmit_report(inm,
+ MLD_LISTENER_REPORT);
+ }
+ break;
+ case MLD_VERSION_2:
mld_dispatch_queue(&qrq, 0);
mld_dispatch_queue(&scq, 0);
@@ -1444,6 +1451,7 @@ mld_fasttimo_vnet(void)
in6m_nrele);
in6m_release_locked(inm);
}
+ break;
}
}
@@ -1457,7 +1465,7 @@ out_locked:
* Will update the global pending timer flags.
*/
static void
-mld_v1_process_group_timer(struct in6_multi *inm, const int version)
+mld_v1_process_group_timer(struct mld_ifinfo *mli, struct in6_multi *inm)
{
int report_timer_expired;
@@ -1484,8 +1492,8 @@ mld_v1_process_group_timer(struct in6_multi *inm, const int version)
case MLD_REPORTING_MEMBER:
if (report_timer_expired) {
inm->in6m_state = MLD_IDLE_MEMBER;
- (void)mld_v1_transmit_report(inm,
- MLD_LISTENER_REPORT);
+ SLIST_INSERT_HEAD(&mli->mli_relinmhead, inm,
+ in6m_nrele);
}
break;
case MLD_G_QUERY_PENDING_MEMBER:
@@ -1656,7 +1664,7 @@ mld_v2_cancel_link_timers(struct mld_ifinfo *mli)
{
struct ifmultiaddr *ifma;
struct ifnet *ifp;
- struct in6_multi *inm;
+ struct in6_multi *inm, *tinm;
CTR3(KTR_MLD, "%s: cancel v2 timers on ifp %p(%s)", __func__,
mli->mli_ifp, mli->mli_ifp->if_xname);
@@ -1677,7 +1685,7 @@ mld_v2_cancel_link_timers(struct mld_ifinfo *mli)
ifp = mli->mli_ifp;
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
if (ifma->ifma_addr->sa_family != AF_INET6)
continue;
@@ -1695,14 +1703,9 @@ mld_v2_cancel_link_timers(struct mld_ifinfo *mli)
* If we are leaving the group and switching
* version, we need to release the final
* reference held for issuing the INCLUDE {}.
- *
- * SMPNG: Must drop and re-acquire IF_ADDR_LOCK
- * around in6m_release_locked(), as it is not
- * a recursive mutex.
*/
- IF_ADDR_UNLOCK(ifp);
- in6m_release_locked(inm);
- IF_ADDR_LOCK(ifp);
+ SLIST_INSERT_HEAD(&mli->mli_relinmhead, inm,
+ in6m_nrele);
/* FALLTHROUGH */
case MLD_G_QUERY_PENDING_MEMBER:
case MLD_SG_QUERY_PENDING_MEMBER:
@@ -1719,7 +1722,11 @@ mld_v2_cancel_link_timers(struct mld_ifinfo *mli)
break;
}
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
+ SLIST_FOREACH_SAFE(inm, &mli->mli_relinmhead, in6m_nrele, tinm) {
+ SLIST_REMOVE_HEAD(&mli->mli_relinmhead, in6m_nrele);
+ in6m_release_locked(inm);
+ }
}
/*
@@ -2976,7 +2983,7 @@ mld_v2_merge_state_changes(struct in6_multi *inm, struct ifqueue *ifscq)
static void
mld_v2_dispatch_general_query(struct mld_ifinfo *mli)
{
- struct ifmultiaddr *ifma, *tifma;
+ struct ifmultiaddr *ifma;
struct ifnet *ifp;
struct in6_multi *inm;
int retval;
@@ -2989,8 +2996,8 @@ mld_v2_dispatch_general_query(struct mld_ifinfo *mli)
ifp = mli->mli_ifp;
- IF_ADDR_LOCK(ifp);
- TAILQ_FOREACH_SAFE(ifma, &ifp->if_multiaddrs, ifma_link, tifma) {
+ IF_ADDR_RLOCK(ifp);
+ TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
if (ifma->ifma_addr->sa_family != AF_INET6 ||
ifma->ifma_protospec == NULL)
continue;
@@ -3020,7 +3027,7 @@ mld_v2_dispatch_general_query(struct mld_ifinfo *mli)
break;
}
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
mld_dispatch_queue(&mli->mli_gq, MLD_MAX_RESPONSE_BURST);
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
index 875daa0..ec523fc 100644
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -572,26 +572,18 @@ nd6_timer(void *arg)
{
CURVNET_SET((struct vnet *) arg);
int s;
- struct nd_defrouter *dr;
- struct nd_prefix *pr;
+ struct nd_defrouter *dr, *ndr;
+ struct nd_prefix *pr, *npr;
struct in6_ifaddr *ia6, *nia6;
- struct in6_addrlifetime *lt6;
callout_reset(&V_nd6_timer_ch, V_nd6_prune * hz,
nd6_timer, curvnet);
/* expire default router list */
s = splnet();
- dr = TAILQ_FIRST(&V_nd_defrouter);
- while (dr) {
- if (dr->expire && dr->expire < time_second) {
- struct nd_defrouter *t;
- t = TAILQ_NEXT(dr, dr_entry);
+ TAILQ_FOREACH_SAFE(dr, &V_nd_defrouter, dr_entry, ndr) {
+ if (dr->expire && dr->expire < time_second)
defrtrlist_del(dr);
- dr = t;
- } else {
- dr = TAILQ_NEXT(dr, dr_entry);
- }
}
/*
@@ -605,7 +597,6 @@ nd6_timer(void *arg)
addrloop:
TAILQ_FOREACH_SAFE(ia6, &V_in6_ifaddrhead, ia_link, nia6) {
/* check address lifetime */
- lt6 = &ia6->ia6_lifetime;
if (IFA6_IS_INVALID(ia6)) {
int regen = 0;
@@ -668,8 +659,7 @@ nd6_timer(void *arg)
}
/* expire prefix list */
- pr = V_nd_prefix.lh_first;
- while (pr) {
+ LIST_FOREACH_SAFE(pr, &V_nd_prefix, ndpr_entry, npr) {
/*
* check prefix lifetime.
* since pltime is just for autoconf, pltime processing for
@@ -677,18 +667,13 @@ nd6_timer(void *arg)
*/
if (pr->ndpr_vltime != ND6_INFINITE_LIFETIME &&
time_second - pr->ndpr_lastupdate > pr->ndpr_vltime) {
- struct nd_prefix *t;
- t = pr->ndpr_next;
/*
* address expiration and prefix expiration are
* separate. NEVER perform in6_purgeaddr here.
*/
-
prelist_remove(pr);
- pr = t;
- } else
- pr = pr->ndpr_next;
+ }
}
splx(s);
CURVNET_RESTORE();
@@ -705,7 +690,7 @@ regen_tmpaddr(struct in6_ifaddr *ia6)
struct in6_ifaddr *public_ifa6 = NULL;
ifp = ia6->ia_ifa.ifa_ifp;
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
struct in6_ifaddr *it6;
@@ -747,7 +732,7 @@ regen_tmpaddr(struct in6_ifaddr *ia6)
if (public_ifa6 != NULL)
ifa_ref(&public_ifa6->ia_ifa);
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
if (public_ifa6 != NULL) {
int e;
@@ -781,8 +766,7 @@ nd6_purge(struct ifnet *ifp)
* in the routing table, in order to keep additional side effects as
* small as possible.
*/
- for (dr = TAILQ_FIRST(&V_nd_defrouter); dr; dr = ndr) {
- ndr = TAILQ_NEXT(dr, dr_entry);
+ TAILQ_FOREACH_SAFE(dr, &V_nd_defrouter, dr_entry, ndr) {
if (dr->installed)
continue;
@@ -790,8 +774,7 @@ nd6_purge(struct ifnet *ifp)
defrtrlist_del(dr);
}
- for (dr = TAILQ_FIRST(&V_nd_defrouter); dr; dr = ndr) {
- ndr = TAILQ_NEXT(dr, dr_entry);
+ TAILQ_FOREACH_SAFE(dr, &V_nd_defrouter, dr_entry, ndr) {
if (!dr->installed)
continue;
@@ -800,8 +783,7 @@ nd6_purge(struct ifnet *ifp)
}
/* Nuke prefix list entries toward ifp */
- for (pr = V_nd_prefix.lh_first; pr; pr = npr) {
- npr = pr->ndpr_next;
+ LIST_FOREACH_SAFE(pr, &V_nd_prefix, ndpr_entry, npr) {
if (pr->ndpr_ifp == ifp) {
/*
* Because if_detach() does *not* release prefixes
@@ -912,7 +894,7 @@ nd6_is_new_addr_neighbor(struct sockaddr_in6 *addr, struct ifnet *ifp)
* If the address matches one of our on-link prefixes, it should be a
* neighbor.
*/
- for (pr = V_nd_prefix.lh_first; pr; pr = pr->ndpr_next) {
+ LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) {
if (pr->ndpr_ifp != ifp)
continue;
@@ -962,7 +944,7 @@ nd6_is_new_addr_neighbor(struct sockaddr_in6 *addr, struct ifnet *ifp)
* as on-link, and thus, as a neighbor.
*/
if (ND_IFINFO(ifp)->flags & ND6_IFF_ACCEPT_RTADV &&
- TAILQ_FIRST(&V_nd_defrouter) == NULL &&
+ TAILQ_EMPTY(&V_nd_defrouter) &&
V_nd6_defifindex == ifp->if_index) {
return (1);
}
@@ -1234,8 +1216,9 @@ nd6_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp)
*/
bzero(drl, sizeof(*drl));
s = splnet();
- dr = TAILQ_FIRST(&V_nd_defrouter);
- while (dr && i < DRLSTSIZ) {
+ TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) {
+ if (i >= DRLSTSIZ)
+ break;
drl->defrouter[i].rtaddr = dr->rtaddr;
in6_clearscope(&drl->defrouter[i].rtaddr);
@@ -1244,7 +1227,6 @@ nd6_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp)
drl->defrouter[i].expire = dr->expire;
drl->defrouter[i].if_index = dr->ifp->if_index;
i++;
- dr = TAILQ_NEXT(dr, dr_entry);
}
splx(s);
break;
@@ -1263,11 +1245,12 @@ nd6_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp)
*/
bzero(oprl, sizeof(*oprl));
s = splnet();
- pr = V_nd_prefix.lh_first;
- while (pr && i < PRLSTSIZ) {
+ LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) {
struct nd_pfxrouter *pfr;
int j;
+ if (i >= PRLSTSIZ)
+ break;
oprl->prefix[i].prefix = pr->ndpr_prefix.sin6_addr;
oprl->prefix[i].raflags = pr->ndpr_raf;
oprl->prefix[i].prefixlen = pr->ndpr_plen;
@@ -1292,9 +1275,8 @@ nd6_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp)
oprl->prefix[i].expire = maxexpire;
}
- pfr = pr->ndpr_advrtrs.lh_first;
j = 0;
- while (pfr) {
+ LIST_FOREACH(pfr, &pr->ndpr_advrtrs, pfr_entry) {
if (j < DRLSTSIZ) {
#define RTRADDR oprl->prefix[i].advrtr[j]
RTRADDR = pfr->router->rtaddr;
@@ -1302,13 +1284,11 @@ nd6_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp)
#undef RTRADDR
}
j++;
- pfr = pfr->pfr_next;
}
oprl->prefix[i].advrtrs = j;
oprl->prefix[i].origin = PR_ORIG_RA;
i++;
- pr = pr->ndpr_next;
}
splx(s);
@@ -1384,7 +1364,7 @@ nd6_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp)
*/
int duplicated_linklocal = 0;
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
if (ifa->ifa_addr->sa_family != AF_INET6)
continue;
@@ -1395,7 +1375,7 @@ nd6_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp)
break;
}
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
if (duplicated_linklocal) {
ND.flags |= ND6_IFF_IFDISABLED;
@@ -1413,14 +1393,14 @@ nd6_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp)
/* Mark all IPv6 address as tentative. */
ND_IFINFO(ifp)->flags |= ND6_IFF_IFDISABLED;
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
if (ifa->ifa_addr->sa_family != AF_INET6)
continue;
ia = (struct in6_ifaddr *)ifa;
ia->ia6_flags |= IN6_IFF_TENTATIVE;
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
}
if (ND.flags & ND6_IFF_AUTO_LINKLOCAL) {
@@ -1440,7 +1420,7 @@ nd6_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp)
*/
int haslinklocal = 0;
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
if (ifa->ifa_addr->sa_family != AF_INET6)
continue;
@@ -1450,7 +1430,7 @@ nd6_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp)
break;
}
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
if (!haslinklocal)
in6_ifattach(ifp, NULL);
}
@@ -1470,11 +1450,9 @@ nd6_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp)
struct nd_prefix *pr, *next;
s = splnet();
- for (pr = V_nd_prefix.lh_first; pr; pr = next) {
+ LIST_FOREACH_SAFE(pr, &V_nd_prefix, ndpr_entry, next) {
struct in6_ifaddr *ia, *ia_next;
- next = pr->ndpr_next;
-
if (IN6_IS_ADDR_LINKLOCAL(&pr->ndpr_prefix.sin6_addr))
continue; /* XXX */
@@ -1500,8 +1478,7 @@ nd6_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp)
s = splnet();
defrouter_reset();
- for (dr = TAILQ_FIRST(&V_nd_defrouter); dr; dr = next) {
- next = TAILQ_NEXT(dr, dr_entry);
+ TAILQ_FOREACH_SAFE(dr, &V_nd_defrouter, dr_entry, next) {
defrtrlist_del(dr);
}
defrouter_select();
@@ -1824,8 +1801,7 @@ nd6_slowtimo(void *arg)
callout_reset(&V_nd6_slowtimo_ch, ND6_SLOWTIMER_INTERVAL * hz,
nd6_slowtimo, curvnet);
IFNET_RLOCK_NOSLEEP();
- for (ifp = TAILQ_FIRST(&V_ifnet); ifp;
- ifp = TAILQ_NEXT(ifp, if_list)) {
+ TAILQ_FOREACH(ifp, &V_ifnet, if_list) {
nd6if = ND_IFINFO(ifp);
if (nd6if->basereachable && /* already initialized */
(nd6if->recalctm -= ND6_SLOWTIMER_INTERVAL) <= 0) {
@@ -2173,9 +2149,6 @@ nd6_need_cache(struct ifnet *ifp)
#ifdef IFT_IEEE80211
case IFT_IEEE80211:
#endif
-#ifdef IFT_CARP
- case IFT_CARP:
-#endif
case IFT_INFINIBAND:
case IFT_GIF: /* XXX need more cases? */
case IFT_PPP:
@@ -2297,8 +2270,7 @@ nd6_sysctl_drlist(SYSCTL_HANDLER_ARGS)
return EPERM;
error = 0;
- for (dr = TAILQ_FIRST(&V_nd_defrouter); dr;
- dr = TAILQ_NEXT(dr, dr_entry)) {
+ TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) {
d = (struct in6_defrouter *)buf;
de = (struct in6_defrouter *)(buf + sizeof(buf));
@@ -2338,7 +2310,7 @@ nd6_sysctl_prlist(SYSCTL_HANDLER_ARGS)
return EPERM;
error = 0;
- for (pr = V_nd_prefix.lh_first; pr; pr = pr->ndpr_next) {
+ LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) {
u_short advrtrs;
size_t advance;
struct sockaddr_in6 *sin6, *s6;
@@ -2383,8 +2355,7 @@ nd6_sysctl_prlist(SYSCTL_HANDLER_ARGS)
p->flags = pr->ndpr_stateflags;
p->origin = PR_ORIG_RA;
advrtrs = 0;
- for (pfr = pr->ndpr_advrtrs.lh_first; pfr;
- pfr = pfr->pfr_next) {
+ LIST_FOREACH(pfr, &pr->ndpr_advrtrs, pfr_entry) {
if ((void *)&sin6[advrtrs + 1] > (void *)pe) {
advrtrs++;
continue;
diff --git a/sys/netinet6/nd6.h b/sys/netinet6/nd6.h
index ca981d0..c44e704 100644
--- a/sys/netinet6/nd6.h
+++ b/sys/netinet6/nd6.h
@@ -278,8 +278,6 @@ struct nd_prefix {
int ndpr_refcnt; /* reference couter from addresses */
};
-#define ndpr_next ndpr_entry.le_next
-
#define ndpr_raf ndpr_flags
#define ndpr_raf_onlink ndpr_flags.onlink
#define ndpr_raf_auto ndpr_flags.autonomous
@@ -313,7 +311,6 @@ struct inet6_ndpr_msghdr {
struct nd_pfxrouter {
LIST_ENTRY(nd_pfxrouter) pfr_entry;
-#define pfr_next pfr_entry.le_next
struct nd_defrouter *router;
};
@@ -437,15 +434,12 @@ void nd6_dad_duplicated __P((struct ifaddr *));
void nd6_rs_input __P((struct mbuf *, int, int));
void nd6_ra_input __P((struct mbuf *, int, int));
void prelist_del __P((struct nd_prefix *));
-void defrouter_addreq __P((struct nd_defrouter *));
void defrouter_reset __P((void));
void defrouter_select __P((void));
void defrtrlist_del __P((struct nd_defrouter *));
void prelist_remove __P((struct nd_prefix *));
int nd6_prelist_add __P((struct nd_prefixctl *, struct nd_defrouter *,
struct nd_prefix **));
-int nd6_prefix_onlink __P((struct nd_prefix *));
-int nd6_prefix_offlink __P((struct nd_prefix *));
void pfxlist_onlink_check __P((void));
struct nd_defrouter *defrouter_lookup __P((struct in6_addr *, struct ifnet *));
struct nd_prefix *nd6_prefix_lookup __P((struct nd_prefixctl *));
diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c
index 0221c72..a2aaeea 100644
--- a/sys/netinet6/nd6_nbr.c
+++ b/sys/netinet6/nd6_nbr.c
@@ -225,7 +225,7 @@ nd6_ns_input(struct mbuf *m, int off, int icmp6len)
/* (1) and (3) check. */
if (ifp->if_carp)
ifa = (*carp_iamatch6_p)(ifp, &taddr6);
- if (ifa == NULL)
+ else
ifa = (struct ifaddr *)in6ifa_ifpwithaddr(ifp, &taddr6);
/* (2) check. */
@@ -688,7 +688,14 @@ nd6_na_input(struct mbuf *m, int off, int icmp6len)
lladdrlen = ndopts.nd_opts_tgt_lladdr->nd_opt_len << 3;
}
- ifa = (struct ifaddr *)in6ifa_ifpwithaddr(ifp, &taddr6);
+ /*
+ * This effectively disables the DAD check on a non-master CARP
+ * address.
+ */
+ if (ifp->if_carp)
+ ifa = (*carp_iamatch6_p)(ifp, &taddr6);
+ else
+ ifa = (struct ifaddr *)in6ifa_ifpwithaddr(ifp, &taddr6);
/*
* Target address matches one of my interface address.
@@ -1133,9 +1140,6 @@ nd6_ifptomac(struct ifnet *ifp)
#ifdef IFT_IEEE80211
case IFT_IEEE80211:
#endif
-#ifdef IFT_CARP
- case IFT_CARP:
-#endif
case IFT_INFINIBAND:
case IFT_BRIDGE:
case IFT_ISO88025:
diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c
index 237f14c..e77767f 100644
--- a/sys/netinet6/nd6_rtr.c
+++ b/sys/netinet6/nd6_rtr.c
@@ -84,6 +84,9 @@ static int in6_init_prefix_ltimes(struct nd_prefix *);
static void in6_init_address_ltimes __P((struct nd_prefix *,
struct in6_addrlifetime *));
+static int nd6_prefix_onlink(struct nd_prefix *);
+static int nd6_prefix_offlink(struct nd_prefix *);
+
static int rt6_deleteroute(struct radix_node *, void *);
VNET_DECLARE(int, nd6_recalc_reachtm_interval);
@@ -451,11 +454,11 @@ nd6_rtmsg(int cmd, struct rtentry *rt)
info.rti_info[RTAX_NETMASK] = rt_mask(rt);
ifp = rt->rt_ifp;
if (ifp != NULL) {
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
ifa = TAILQ_FIRST(&ifp->if_addrhead);
info.rti_info[RTAX_IFP] = ifa->ifa_addr;
ifa_ref(ifa);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
info.rti_info[RTAX_IFA] = rt->rt_ifa->ifa_addr;
} else
ifa = NULL;
@@ -465,7 +468,7 @@ nd6_rtmsg(int cmd, struct rtentry *rt)
ifa_free(ifa);
}
-void
+static void
defrouter_addreq(struct nd_defrouter *new)
{
struct sockaddr_in6 def, mask, gate;
@@ -501,8 +504,7 @@ defrouter_lookup(struct in6_addr *addr, struct ifnet *ifp)
{
struct nd_defrouter *dr;
- for (dr = TAILQ_FIRST(&V_nd_defrouter); dr;
- dr = TAILQ_NEXT(dr, dr_entry)) {
+ TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) {
if (dr->ifp == ifp && IN6_ARE_ADDR_EQUAL(addr, &dr->rtaddr))
return (dr);
}
@@ -549,8 +551,7 @@ defrouter_reset(void)
{
struct nd_defrouter *dr;
- for (dr = TAILQ_FIRST(&V_nd_defrouter); dr;
- dr = TAILQ_NEXT(dr, dr_entry))
+ TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry)
defrouter_delreq(dr);
/*
@@ -581,7 +582,7 @@ defrtrlist_del(struct nd_defrouter *dr)
/*
* Also delete all the pointers to the router in each prefix lists.
*/
- for (pr = V_nd_prefix.lh_first; pr; pr = pr->ndpr_next) {
+ LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) {
struct nd_pfxrouter *pfxrtr;
if ((pfxrtr = pfxrtr_lookup(pr, dr)) != NULL)
pfxrtr_del(pfxrtr);
@@ -631,7 +632,7 @@ defrouter_select(void)
* Let's handle easy case (3) first:
* If default router list is empty, there's nothing to be done.
*/
- if (!TAILQ_FIRST(&V_nd_defrouter)) {
+ if (TAILQ_EMPTY(&V_nd_defrouter)) {
splx(s);
return;
}
@@ -641,8 +642,7 @@ defrouter_select(void)
* We just pick up the first reachable one (if any), assuming that
* the ordering rule of the list described in defrtrlist_update().
*/
- for (dr = TAILQ_FIRST(&V_nd_defrouter); dr;
- dr = TAILQ_NEXT(dr, dr_entry)) {
+ TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) {
IF_AFDATA_LOCK(dr->ifp);
if (selected_dr == NULL &&
(ln = nd6_lookup(&dr->rtaddr, 0, dr->ifp)) &&
@@ -799,8 +799,7 @@ insert:
*/
/* insert at the end of the group */
- for (dr = TAILQ_FIRST(&V_nd_defrouter); dr;
- dr = TAILQ_NEXT(dr, dr_entry)) {
+ TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) {
if (rtpref(n) > rtpref(dr))
break;
}
@@ -821,7 +820,7 @@ pfxrtr_lookup(struct nd_prefix *pr, struct nd_defrouter *dr)
{
struct nd_pfxrouter *search;
- for (search = pr->ndpr_advrtrs.lh_first; search; search = search->pfr_next) {
+ LIST_FOREACH(search, &pr->ndpr_advrtrs, pfr_entry) {
if (search->router == dr)
break;
}
@@ -857,8 +856,7 @@ nd6_prefix_lookup(struct nd_prefixctl *key)
{
struct nd_prefix *search;
- for (search = V_nd_prefix.lh_first;
- search; search = search->ndpr_next) {
+ LIST_FOREACH(search, &V_nd_prefix, ndpr_entry) {
if (key->ndpr_ifp == search->ndpr_ifp &&
key->ndpr_plen == search->ndpr_plen &&
in6_are_prefix_equal(&key->ndpr_prefix.sin6_addr,
@@ -964,9 +962,7 @@ prelist_remove(struct nd_prefix *pr)
LIST_REMOVE(pr, ndpr_entry);
/* free list of routers that adversed the prefix */
- for (pfr = pr->ndpr_advrtrs.lh_first; pfr; pfr = next) {
- next = pfr->pfr_next;
-
+ LIST_FOREACH_SAFE(pfr, &pr->ndpr_advrtrs, pfr_entry, next) {
free(pfr, M_IP6NDP);
}
splx(s);
@@ -1114,7 +1110,7 @@ prelist_update(struct nd_prefixctl *new, struct nd_defrouter *dr,
* consider autoconfigured addresses while RFC2462 simply said
* "address".
*/
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
struct in6_ifaddr *ifa6;
u_int32_t remaininglifetime;
@@ -1237,7 +1233,7 @@ prelist_update(struct nd_prefixctl *new, struct nd_defrouter *dr,
ifa6->ia6_lifetime = lt6_tmp;
ifa6->ia6_updatetime = time_second;
}
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
if (ia6_match == NULL && new->ndpr_vltime) {
int ifidlen;
@@ -1329,8 +1325,7 @@ find_pfxlist_reachable_router(struct nd_prefix *pr)
struct llentry *ln;
int canreach;
- for (pfxrtr = LIST_FIRST(&pr->ndpr_advrtrs); pfxrtr != NULL;
- pfxrtr = LIST_NEXT(pfxrtr, pfr_entry)) {
+ LIST_FOREACH(pfxrtr, &pr->ndpr_advrtrs, pfr_entry) {
IF_AFDATA_LOCK(pfxrtr->router->ifp);
ln = nd6_lookup(&pfxrtr->router->rtaddr, 0, pfxrtr->router->ifp);
IF_AFDATA_UNLOCK(pfxrtr->router->ifp);
@@ -1369,7 +1364,7 @@ pfxlist_onlink_check()
* Check if there is a prefix that has a reachable advertising
* router.
*/
- for (pr = V_nd_prefix.lh_first; pr; pr = pr->ndpr_next) {
+ LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) {
if (pr->ndpr_raf_onlink && find_pfxlist_reachable_router(pr))
break;
}
@@ -1379,12 +1374,10 @@ pfxlist_onlink_check()
* that does not advertise any prefixes.
*/
if (pr == NULL) {
- for (dr = TAILQ_FIRST(&V_nd_defrouter); dr;
- dr = TAILQ_NEXT(dr, dr_entry)) {
+ TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) {
struct nd_prefix *pr0;
- for (pr0 = V_nd_prefix.lh_first; pr0;
- pr0 = pr0->ndpr_next) {
+ LIST_FOREACH(pr0, &V_nd_prefix, ndpr_entry) {
if ((pfxrtr = pfxrtr_lookup(pr0, dr)) != NULL)
break;
}
@@ -1392,7 +1385,7 @@ pfxlist_onlink_check()
break;
}
}
- if (pr != NULL || (TAILQ_FIRST(&V_nd_defrouter) && pfxrtr == NULL)) {
+ if (pr != NULL || (!TAILQ_EMPTY(&V_nd_defrouter) && pfxrtr == NULL)) {
/*
* There is at least one prefix that has a reachable router,
* or at least a router which probably does not advertise
@@ -1402,7 +1395,7 @@ pfxlist_onlink_check()
* Detach prefixes which have no reachable advertising
* router, and attach other prefixes.
*/
- for (pr = V_nd_prefix.lh_first; pr; pr = pr->ndpr_next) {
+ LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) {
/* XXX: a link-local prefix should never be detached */
if (IN6_IS_ADDR_LINKLOCAL(&pr->ndpr_prefix.sin6_addr))
continue;
@@ -1426,7 +1419,7 @@ pfxlist_onlink_check()
}
} else {
/* there is no prefix that has a reachable router */
- for (pr = V_nd_prefix.lh_first; pr; pr = pr->ndpr_next) {
+ LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) {
if (IN6_IS_ADDR_LINKLOCAL(&pr->ndpr_prefix.sin6_addr))
continue;
@@ -1449,7 +1442,7 @@ pfxlist_onlink_check()
* interfaces. Such cases will be handled in nd6_prefix_onlink,
* so we don't have to care about them.
*/
- for (pr = V_nd_prefix.lh_first; pr; pr = pr->ndpr_next) {
+ LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) {
int e;
char ip6buf[INET6_ADDRSTRLEN];
@@ -1547,7 +1540,7 @@ pfxlist_onlink_check()
}
}
-int
+static int
nd6_prefix_onlink(struct nd_prefix *pr)
{
struct ifaddr *ifa;
@@ -1577,7 +1570,7 @@ nd6_prefix_onlink(struct nd_prefix *pr)
* Although such a configuration is expected to be rare, we explicitly
* allow it.
*/
- for (opr = V_nd_prefix.lh_first; opr; opr = opr->ndpr_next) {
+ LIST_FOREACH(opr, &V_nd_prefix, ndpr_entry) {
if (opr == pr)
continue;
@@ -1598,14 +1591,14 @@ nd6_prefix_onlink(struct nd_prefix *pr)
IN6_IFF_NOTREADY | IN6_IFF_ANYCAST);
if (ifa == NULL) {
/* XXX: freebsd does not have ifa_ifwithaf */
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
if (ifa->ifa_addr->sa_family == AF_INET6)
break;
}
if (ifa != NULL)
ifa_ref(ifa);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_RUNLOCK(ifp);
/* should we care about ia6_flags? */
}
if (ifa == NULL) {
@@ -1672,7 +1665,7 @@ nd6_prefix_onlink(struct nd_prefix *pr)
return (error);
}
-int
+static int
nd6_prefix_offlink(struct nd_prefix *pr)
{
int error = 0;
@@ -1716,7 +1709,7 @@ nd6_prefix_offlink(struct nd_prefix *pr)
* If there's one, try to make the prefix on-link on the
* interface.
*/
- for (opr = V_nd_prefix.lh_first; opr; opr = opr->ndpr_next) {
+ LIST_FOREACH(opr, &V_nd_prefix, ndpr_entry) {
if (opr == pr)
continue;
diff --git a/sys/netinet6/scope6_var.h b/sys/netinet6/scope6_var.h
index 55e0c8e..8ec6f10 100644
--- a/sys/netinet6/scope6_var.h
+++ b/sys/netinet6/scope6_var.h
@@ -49,7 +49,6 @@ int scope6_set __P((struct ifnet *, struct scope6_id *));
int scope6_get __P((struct ifnet *, struct scope6_id *));
void scope6_setdefault __P((struct ifnet *));
int scope6_get_default __P((struct scope6_id *));
-u_int32_t scope6_in6_addrscope __P((struct in6_addr *));
u_int32_t scope6_addr2default __P((struct in6_addr *));
int sa6_embedscope __P((struct sockaddr_in6 *, int));
int sa6_recoverscope __P((struct sockaddr_in6 *));
diff --git a/sys/netinet6/sctp6_usrreq.c b/sys/netinet6/sctp6_usrreq.c
index 7512f5b..c100713 100644
--- a/sys/netinet6/sctp6_usrreq.c
+++ b/sys/netinet6/sctp6_usrreq.c
@@ -7,11 +7,11 @@
* modification, are permitted provided that the following conditions are met:
*
* a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
*
* b) 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.
+ * the documentation and/or other materials provided with the distribution.
*
* c) Neither the name of Cisco Systems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
@@ -110,7 +110,7 @@ sctp6_input(struct mbuf **i_pak, int *offp, int proto)
(int)(sizeof(*sh) + sizeof(*ch)));
if (sh == NULL) {
SCTP_STAT_INCR(sctps_hdrops);
- return IPPROTO_DONE;
+ return (IPPROTO_DONE);
}
ch = (struct sctp_chunkhdr *)((caddr_t)sh + sizeof(struct sctphdr));
iphlen = off;
@@ -162,11 +162,11 @@ sctp6_input(struct mbuf **i_pak, int *offp, int proto)
if (calc_check != check) {
SCTPDBG(SCTP_DEBUG_INPUT1, "Bad CSUM on SCTP packet calc_check:%x check:%x m:%p phlen:%d\n",
calc_check, check, m, iphlen);
- stcb = sctp_findassociation_addr(m, iphlen, offset - sizeof(*ch),
+ stcb = sctp_findassociation_addr(m, offset - sizeof(*ch),
sh, ch, &in6p, &net, vrf_id);
if ((net) && (port)) {
if (net->port == 0) {
- sctp_pathmtu_adjustment(in6p, stcb, net, net->mtu - sizeof(struct udphdr));
+ sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr));
}
net->port = port;
}
@@ -196,11 +196,11 @@ sctp_skip_csum:
* Locate pcb and tcb for datagram sctp_findassociation_addr() wants
* IP/SCTP/first chunk header...
*/
- stcb = sctp_findassociation_addr(m, iphlen, offset - sizeof(*ch),
+ stcb = sctp_findassociation_addr(m, offset - sizeof(*ch),
sh, ch, &in6p, &net, vrf_id);
if ((net) && (port)) {
if (net->port == 0) {
- sctp_pathmtu_adjustment(in6p, stcb, net, net->mtu - sizeof(struct udphdr));
+ sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr));
}
net->port = port;
}
@@ -230,14 +230,19 @@ sctp_skip_csum:
sh->v_tag = 0;
}
if (ch->chunk_type == SCTP_SHUTDOWN_ACK) {
- sctp_send_shutdown_complete2(m, iphlen, sh, vrf_id, port);
+ sctp_send_shutdown_complete2(m, sh, vrf_id, port);
goto bad;
}
if (ch->chunk_type == SCTP_SHUTDOWN_COMPLETE) {
goto bad;
}
- if (ch->chunk_type != SCTP_ABORT_ASSOCIATION)
- sctp_send_abort(m, iphlen, sh, 0, NULL, vrf_id, port);
+ if (ch->chunk_type != SCTP_ABORT_ASSOCIATION) {
+ if ((SCTP_BASE_SYSCTL(sctp_blackhole) == 0) ||
+ ((SCTP_BASE_SYSCTL(sctp_blackhole) == 1) &&
+ (ch->chunk_type != SCTP_INIT))) {
+ sctp_send_abort(m, iphlen, sh, 0, NULL, vrf_id, port);
+ }
+ }
goto bad;
} else if (stcb == NULL) {
refcount_up = 1;
@@ -276,7 +281,7 @@ sctp_skip_csum:
SCTP_INP_DECR_REF(in6p);
SCTP_INP_WUNLOCK(in6p);
}
- return IPPROTO_DONE;
+ return (IPPROTO_DONE);
bad:
if (stcb) {
@@ -290,7 +295,7 @@ bad:
}
if (m)
sctp_m_freem(m);
- return IPPROTO_DONE;
+ return (IPPROTO_DONE);
}
@@ -663,7 +668,7 @@ sctp_must_try_again:
}
static int
-sctp6_attach(struct socket *so, int proto, struct thread *p)
+sctp6_attach(struct socket *so, int proto SCTP_UNUSED, struct thread *p SCTP_UNUSED)
{
struct in6pcb *inp6;
int error;
@@ -673,16 +678,16 @@ sctp6_attach(struct socket *so, int proto, struct thread *p)
inp = (struct sctp_inpcb *)so->so_pcb;
if (inp != NULL) {
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP6_USRREQ, EINVAL);
- return EINVAL;
+ return (EINVAL);
}
if (so->so_snd.sb_hiwat == 0 || so->so_rcv.sb_hiwat == 0) {
error = SCTP_SORESERVE(so, SCTP_BASE_SYSCTL(sctp_sendspace), SCTP_BASE_SYSCTL(sctp_recvspace));
if (error)
- return error;
+ return (error);
}
error = sctp_inpcb_alloc(so, vrf_id);
if (error)
- return error;
+ return (error);
inp = (struct sctp_inpcb *)so->so_pcb;
SCTP_INP_WLOCK(inp);
inp->sctp_flags |= SCTP_PCB_FLAGS_BOUND_V6; /* I'm v6! */
@@ -704,7 +709,7 @@ sctp6_attach(struct socket *so, int proto, struct thread *p)
* sctp_attach()?
*/
SCTP_INP_WUNLOCK(inp);
- return 0;
+ return (0);
}
static int
@@ -717,7 +722,7 @@ sctp6_bind(struct socket *so, struct sockaddr *addr, struct thread *p)
inp = (struct sctp_inpcb *)so->so_pcb;
if (inp == 0) {
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP6_USRREQ, EINVAL);
- return EINVAL;
+ return (EINVAL);
}
if (addr) {
switch (addr->sa_family) {
@@ -725,7 +730,7 @@ sctp6_bind(struct socket *so, struct sockaddr *addr, struct thread *p)
case AF_INET:
if (addr->sa_len != sizeof(struct sockaddr_in)) {
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP6_USRREQ, EINVAL);
- return EINVAL;
+ return (EINVAL);
}
break;
#endif
@@ -733,13 +738,13 @@ sctp6_bind(struct socket *so, struct sockaddr *addr, struct thread *p)
case AF_INET6:
if (addr->sa_len != sizeof(struct sockaddr_in6)) {
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP6_USRREQ, EINVAL);
- return EINVAL;
+ return (EINVAL);
}
break;
#endif
default:
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP6_USRREQ, EINVAL);
- return EINVAL;
+ return (EINVAL);
}
}
inp6 = (struct in6pcb *)inp;
@@ -772,7 +777,7 @@ sctp6_bind(struct socket *so, struct sockaddr *addr, struct thread *p)
inp6->inp_vflag |= INP_IPV4;
inp6->inp_vflag &= ~INP_IPV6;
error = sctp_inpcb_bind(so, (struct sockaddr *)&sin, NULL, p);
- return error;
+ return (error);
}
#endif
break;
@@ -789,7 +794,7 @@ sctp6_bind(struct socket *so, struct sockaddr *addr, struct thread *p)
if (addr->sa_family == AF_INET) {
/* can't bind v4 addr to v6 only socket! */
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP6_USRREQ, EINVAL);
- return EINVAL;
+ return (EINVAL);
}
#endif
sin6_p = (struct sockaddr_in6 *)addr;
@@ -798,11 +803,11 @@ sctp6_bind(struct socket *so, struct sockaddr *addr, struct thread *p)
/* can't bind v4-mapped addrs either! */
/* NOTE: we don't support SIIT */
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP6_USRREQ, EINVAL);
- return EINVAL;
+ return (EINVAL);
}
}
error = sctp_inpcb_bind(so, addr, NULL, p);
- return error;
+ return (error);
}
@@ -848,7 +853,7 @@ sctp6_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr,
}
SCTP_RELEASE_PKT(m);
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP6_USRREQ, EINVAL);
- return EINVAL;
+ return (EINVAL);
}
inp6 = (struct in6pcb *)inp;
/*
@@ -877,11 +882,11 @@ sctp6_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr,
*/
if (addr->sa_family == AF_INET) {
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP6_USRREQ, EINVAL);
- return EINVAL;
+ return (EINVAL);
}
if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) {
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP6_USRREQ, EINVAL);
- return EINVAL;
+ return (EINVAL);
}
}
if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) {
@@ -890,12 +895,12 @@ sctp6_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr,
/* convert v4-mapped into v4 addr and send */
in6_sin6_2_sin(&sin, sin6);
- return sctp_sendm(so, flags, m, (struct sockaddr *)&sin,
- control, p);
+ return (sctp_sendm(so, flags, m, (struct sockaddr *)&sin,
+ control, p));
} else {
/* mapped addresses aren't enabled */
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP6_USRREQ, EINVAL);
- return EINVAL;
+ return (EINVAL);
}
}
#endif /* INET */
@@ -1020,13 +1025,13 @@ sctp6_connect(struct socket *so, struct sockaddr *addr, struct thread *p)
SCTP_INP_RUNLOCK(inp);
SCTP_ASOC_CREATE_UNLOCK(inp);
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP6_USRREQ, EINVAL);
- return EINVAL;
+ return (EINVAL);
}
if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) {
SCTP_INP_RUNLOCK(inp);
SCTP_ASOC_CREATE_UNLOCK(inp);
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP6_USRREQ, EINVAL);
- return EINVAL;
+ return (EINVAL);
}
}
if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) {
@@ -1039,7 +1044,7 @@ sctp6_connect(struct socket *so, struct sockaddr *addr, struct thread *p)
SCTP_INP_RUNLOCK(inp);
SCTP_ASOC_CREATE_UNLOCK(inp);
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP6_USRREQ, EINVAL);
- return EINVAL;
+ return (EINVAL);
}
}
#endif /* INET */
@@ -1090,7 +1095,7 @@ sctp6_connect(struct socket *so, struct sockaddr *addr, struct thread *p)
sctp_send_initiate(inp, stcb, SCTP_SO_LOCKED);
SCTP_TCB_UNLOCK(stcb);
- return error;
+ return (error);
}
static int
@@ -1108,7 +1113,7 @@ sctp6_getaddr(struct socket *so, struct sockaddr **addr)
*/
SCTP_MALLOC_SONAME(sin6, struct sockaddr_in6 *, sizeof(*sin6));
if (sin6 == NULL)
- return ENOMEM;
+ return (ENOMEM);
sin6->sin6_family = AF_INET6;
sin6->sin6_len = sizeof(*sin6);
@@ -1116,7 +1121,7 @@ sctp6_getaddr(struct socket *so, struct sockaddr **addr)
if (inp == NULL) {
SCTP_FREE_SONAME(sin6);
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP6_USRREQ, ECONNRESET);
- return ECONNRESET;
+ return (ECONNRESET);
}
SCTP_INP_RLOCK(inp);
sin6->sin6_port = inp->sctp_lport;
@@ -1178,7 +1183,7 @@ sctp6_getaddr(struct socket *so, struct sockaddr **addr)
SCTP_FREE_SONAME(sin6);
SCTP_INP_RUNLOCK(inp);
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP6_USRREQ, ENOENT);
- return ENOENT;
+ return (ENOENT);
}
}
SCTP_INP_RUNLOCK(inp);
@@ -1200,30 +1205,22 @@ sctp6_peeraddr(struct socket *so, struct sockaddr **addr)
struct sctp_inpcb *inp;
struct sctp_tcb *stcb;
struct sctp_nets *net;
-
int error;
- /*
- * Do the malloc first in case it blocks.
- */
- inp = (struct sctp_inpcb *)so->so_pcb;
- if ((inp->sctp_flags & SCTP_PCB_FLAGS_CONNECTED) == 0) {
- /* UDP type and listeners will drop out here */
- SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP6_USRREQ, ENOTCONN);
- return (ENOTCONN);
- }
+ /* Do the malloc first in case it blocks. */
SCTP_MALLOC_SONAME(sin6, struct sockaddr_in6 *, sizeof *sin6);
if (sin6 == NULL)
return (ENOMEM);
sin6->sin6_family = AF_INET6;
sin6->sin6_len = sizeof(*sin6);
- /* We must recapture incase we blocked */
inp = (struct sctp_inpcb *)so->so_pcb;
- if (inp == NULL) {
+ if ((inp == NULL) ||
+ ((inp->sctp_flags & SCTP_PCB_FLAGS_CONNECTED) == 0)) {
+ /* UDP type and listeners will drop out here */
SCTP_FREE_SONAME(sin6);
- SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP6_USRREQ, ECONNRESET);
- return ECONNRESET;
+ SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP6_USRREQ, ENOTCONN);
+ return (ENOTCONN);
}
SCTP_INP_RLOCK(inp);
stcb = LIST_FIRST(&inp->sctp_asoc_list);
@@ -1234,7 +1231,7 @@ sctp6_peeraddr(struct socket *so, struct sockaddr **addr)
if (stcb == NULL) {
SCTP_FREE_SONAME(sin6);
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP6_USRREQ, ECONNRESET);
- return ECONNRESET;
+ return (ECONNRESET);
}
fnd = 0;
TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
@@ -1251,7 +1248,7 @@ sctp6_peeraddr(struct socket *so, struct sockaddr **addr)
/* No IPv4 address */
SCTP_FREE_SONAME(sin6);
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP6_USRREQ, ENOENT);
- return ENOENT;
+ return (ENOENT);
}
if ((error = sa6_recoverscope(sin6)) != 0)
return (error);
@@ -1271,7 +1268,7 @@ sctp6_in6getaddr(struct socket *so, struct sockaddr **nam)
if (inp6 == NULL) {
SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP6_USRREQ, EINVAL);
- return EINVAL;
+ return (EINVAL);
}
/* allow v6 addresses precedence */
error = sctp6_getaddr(so, nam);
@@ -1308,7 +1305,7 @@ sctp6_getpeeraddr(struct socket *so, struct sockaddr **nam)
if (inp6 == NULL) {
SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP6_USRREQ, EINVAL);
- return EINVAL;
+ return (EINVAL);
}
/* allow v6 addresses precedence */
error = sctp6_peeraddr(so, nam);
@@ -1329,7 +1326,7 @@ sctp6_getpeeraddr(struct socket *so, struct sockaddr **nam)
}
}
#endif
- return error;
+ return (error);
}
struct pr_usrreqs sctp6_usrreqs = {
diff --git a/sys/netinet6/sctp6_var.h b/sys/netinet6/sctp6_var.h
index af292001..711caa1 100644
--- a/sys/netinet6/sctp6_var.h
+++ b/sys/netinet6/sctp6_var.h
@@ -7,11 +7,11 @@
* modification, are permitted provided that the following conditions are met:
*
* a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
*
* b) 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.
+ * the documentation and/or other materials provided with the distribution.
*
* c) Neither the name of Cisco Systems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
@@ -37,7 +37,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-/* TODO __Userspace__ IPv6 stuff... */
#if defined(_KERNEL)
SYSCTL_DECL(_net_inet6_sctp6);
diff --git a/sys/netipsec/xform_ipip.c b/sys/netipsec/xform_ipip.c
index 0eb8b6a..0d5fdb4 100644
--- a/sys/netipsec/xform_ipip.c
+++ b/sys/netipsec/xform_ipip.c
@@ -687,7 +687,7 @@ static struct ip6protosw ipe6_protosw = {
};
#endif /* INET6 && INET */
-#if defined(INET)
+#ifdef INET
/*
* Check the encapsulated packet to see if we want it
*/
diff --git a/sys/netipx/ipx.c b/sys/netipx/ipx.c
index ce19cdd..b3e8aa2 100644
--- a/sys/netipx/ipx.c
+++ b/sys/netipx/ipx.c
@@ -214,9 +214,9 @@ ipx_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp,
IPX_IFADDR_WUNLOCK();
ifa_ref(&ia->ia_ifa); /* if_addrhead */
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_WLOCK(ifp);
TAILQ_INSERT_TAIL(&ifp->if_addrhead, ifa, ifa_link);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_WUNLOCK(ifp);
}
break;
@@ -253,9 +253,9 @@ ipx_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp,
ipx_ifscrub(ifp, ia);
ifa = (struct ifaddr *)ia;
- IF_ADDR_LOCK(ifp);
+ IF_ADDR_WLOCK(ifp);
TAILQ_REMOVE(&ifp->if_addrhead, ifa, ifa_link);
- IF_ADDR_UNLOCK(ifp);
+ IF_ADDR_WUNLOCK(ifp);
ifa_free(ifa); /* if_addrhead */
IPX_IFADDR_WLOCK();
diff --git a/sys/nfs/bootp_subr.c b/sys/nfs/bootp_subr.c
index bd4a826..1e5e066 100644
--- a/sys/nfs/bootp_subr.c
+++ b/sys/nfs/bootp_subr.c
@@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$");
#include <net/route.h>
#include <netinet/in.h>
+#include <netinet/in_var.h>
#include <net/if_types.h>
#include <net/if_dl.h>
#include <net/vnet.h>
@@ -109,19 +110,22 @@ struct bootp_packet {
};
struct bootpc_ifcontext {
- struct bootpc_ifcontext *next;
+ STAILQ_ENTRY(bootpc_ifcontext) next;
struct bootp_packet call;
struct bootp_packet reply;
int replylen;
int overload;
- struct socket *so;
- struct ifreq ireq;
+ union {
+ struct ifreq _ifreq;
+ struct in_aliasreq _in_alias_req;
+ } _req;
+#define ireq _req._ifreq
+#define iareq _req._in_alias_req
struct ifnet *ifp;
struct sockaddr_dl *sdl;
struct sockaddr_in myaddr;
struct sockaddr_in netmask;
struct sockaddr_in gw;
- struct sockaddr_in broadcast; /* Different for each interface */
int gotgw;
int gotnetmask;
int gotrootpath;
@@ -153,8 +157,7 @@ struct bootpc_tagcontext {
};
struct bootpc_globalcontext {
- struct bootpc_ifcontext *interfaces;
- struct bootpc_ifcontext *lastinterface;
+ STAILQ_HEAD(, bootpc_ifcontext) interfaces;
u_int32_t xid;
int gotrootpath;
int gotgw;
@@ -215,6 +218,7 @@ struct bootpc_globalcontext {
#endif
static char bootp_cookie[128];
+static struct socket *bootp_so;
SYSCTL_STRING(_kern, OID_AUTO, bootp_cookie, CTLFLAG_RD,
bootp_cookie, 0, "Cookie (T134) supplied by bootp server");
@@ -233,7 +237,7 @@ static void print_sin_addr(struct sockaddr_in *addr);
static void clear_sinaddr(struct sockaddr_in *sin);
static void allocifctx(struct bootpc_globalcontext *gctx);
static void bootpc_compose_query(struct bootpc_ifcontext *ifctx,
- struct bootpc_globalcontext *gctx, struct thread *td);
+ struct thread *td);
static unsigned char *bootpc_tag(struct bootpc_tagcontext *tctx,
struct bootp_packet *bp, int len, int tag);
static void bootpc_tag_helper(struct bootpc_tagcontext *tctx,
@@ -251,8 +255,8 @@ void bootpboot_p_iflist(void);
static int bootpc_call(struct bootpc_globalcontext *gctx,
struct thread *td);
-static int bootpc_fakeup_interface(struct bootpc_ifcontext *ifctx,
- struct bootpc_globalcontext *gctx, struct thread *td);
+static void bootpc_fakeup_interface(struct bootpc_ifcontext *ifctx,
+ struct thread *td);
static int bootpc_adjust_interface(struct bootpc_ifcontext *ifctx,
struct bootpc_globalcontext *gctx, struct thread *td);
@@ -270,14 +274,9 @@ static __inline int bootpc_ifctx_isfailed(struct bootpc_ifcontext *ifctx);
/*
* In order to have multiple active interfaces with address 0.0.0.0
- * and be able to send data to a selected interface, we perform
- * some tricks:
- *
- * - The 'broadcast' address is different for each interface.
- *
- * - We temporarily add routing pointing 255.255.255.255 to the
- * selected interface broadcast address, thus the packet sent
- * goes to that interface.
+ * and be able to send data to a selected interface, we first set
+ * mask to /8 on all interfaces, and temporarily set it to /0 when
+ * doing sosend().
*/
#ifdef BOOTP_DEBUG
@@ -419,11 +418,8 @@ static void
allocifctx(struct bootpc_globalcontext *gctx)
{
struct bootpc_ifcontext *ifctx;
- ifctx = (struct bootpc_ifcontext *) malloc(sizeof(*ifctx),
- M_TEMP, M_WAITOK | M_ZERO);
- if (ifctx == NULL)
- panic("Failed to allocate bootp interface context structure");
+ ifctx = malloc(sizeof(*ifctx), M_TEMP, M_WAITOK | M_ZERO);
ifctx->xid = gctx->xid;
#ifdef BOOTP_NO_DHCP
ifctx->state = IF_BOOTP_UNRESOLVED;
@@ -431,11 +427,7 @@ allocifctx(struct bootpc_globalcontext *gctx)
ifctx->state = IF_DHCP_UNRESOLVED;
#endif
gctx->xid += 0x100;
- if (gctx->interfaces != NULL)
- gctx->lastinterface->next = ifctx;
- else
- gctx->interfaces = ifctx;
- gctx->lastinterface = ifctx;
+ STAILQ_INSERT_TAIL(&gctx->interfaces, ifctx, next);
}
static __inline int
@@ -570,7 +562,6 @@ bootpc_received(struct bootpc_globalcontext *gctx,
static int
bootpc_call(struct bootpc_globalcontext *gctx, struct thread *td)
{
- struct socket *so;
struct sockaddr_in *sin, dst;
struct uio auio;
struct sockopt sopt;
@@ -585,13 +576,6 @@ bootpc_call(struct bootpc_globalcontext *gctx, struct thread *td)
int retry;
const char *s;
- /*
- * Create socket and set its recieve timeout.
- */
- error = socreate(AF_INET, &so, SOCK_DGRAM, 0, td->td_ucred, td);
- if (error != 0)
- goto out0;
-
tv.tv_sec = 1;
tv.tv_usec = 0;
bzero(&sopt, sizeof(sopt));
@@ -601,7 +585,7 @@ bootpc_call(struct bootpc_globalcontext *gctx, struct thread *td)
sopt.sopt_val = &tv;
sopt.sopt_valsize = sizeof tv;
- error = sosetopt(so, &sopt);
+ error = sosetopt(bootp_so, &sopt);
if (error != 0)
goto out;
@@ -613,7 +597,7 @@ bootpc_call(struct bootpc_globalcontext *gctx, struct thread *td)
sopt.sopt_val = &on;
sopt.sopt_valsize = sizeof on;
- error = sosetopt(so, &sopt);
+ error = sosetopt(bootp_so, &sopt);
if (error != 0)
goto out;
@@ -626,7 +610,7 @@ bootpc_call(struct bootpc_globalcontext *gctx, struct thread *td)
sopt.sopt_val = &on;
sopt.sopt_valsize = sizeof on;
- error = sosetopt(so, &sopt);
+ error = sosetopt(bootp_so, &sopt);
if (error != 0)
goto out;
@@ -636,7 +620,7 @@ bootpc_call(struct bootpc_globalcontext *gctx, struct thread *td)
sin = &dst;
clear_sinaddr(sin);
sin->sin_port = htons(IPPORT_BOOTPC);
- error = sobind(so, (struct sockaddr *)sin, td);
+ error = sobind(bootp_so, (struct sockaddr *)sin, td);
if (error != 0) {
printf("bind failed\n");
goto out;
@@ -662,9 +646,7 @@ bootpc_call(struct bootpc_globalcontext *gctx, struct thread *td)
outstanding = 0;
gotrootpath = 0;
- for (ifctx = gctx->interfaces;
- ifctx != NULL;
- ifctx = ifctx->next) {
+ STAILQ_FOREACH(ifctx, &gctx->interfaces, next) {
if (bootpc_ifctx_isresolved(ifctx) != 0 &&
bootpc_tag(&gctx->tmptag, &ifctx->reply,
ifctx->replylen,
@@ -672,9 +654,10 @@ bootpc_call(struct bootpc_globalcontext *gctx, struct thread *td)
gotrootpath = 1;
}
- for (ifctx = gctx->interfaces;
- ifctx != NULL;
- ifctx = ifctx->next) {
+ STAILQ_FOREACH(ifctx, &gctx->interfaces, next) {
+ struct in_aliasreq *ifra = &ifctx->iareq;
+ sin = (struct sockaddr_in *)&ifra->ifra_mask;
+
ifctx->outstanding = 0;
if (bootpc_ifctx_isresolved(ifctx) != 0 &&
gotrootpath != 0) {
@@ -694,7 +677,7 @@ bootpc_call(struct bootpc_globalcontext *gctx, struct thread *td)
(ifctx->state == IF_BOOTP_UNRESOLVED &&
ifctx->dhcpquerytype != DHCP_NOMSG)) {
ifctx->sentmsg = 0;
- bootpc_compose_query(ifctx, gctx, td);
+ bootpc_compose_query(ifctx, td);
}
/* Send BOOTP request (or re-send). */
@@ -734,44 +717,32 @@ bootpc_call(struct bootpc_globalcontext *gctx, struct thread *td)
auio.uio_td = td;
/* Set netmask to 0.0.0.0 */
-
- sin = (struct sockaddr_in *) &ifctx->ireq.ifr_addr;
clear_sinaddr(sin);
- error = ifioctl(ifctx->so, SIOCSIFNETMASK,
- (caddr_t) &ifctx->ireq, td);
+ error = ifioctl(bootp_so, SIOCAIFADDR, (caddr_t)ifra,
+ td);
if (error != 0)
- panic("bootpc_call:"
- "set if netmask, error=%d",
- error);
+ panic("%s: SIOCAIFADDR, error=%d", __func__,
+ error);
- error = sosend(so, (struct sockaddr *) &dst,
+ error = sosend(bootp_so, (struct sockaddr *) &dst,
&auio, NULL, NULL, 0, td);
- if (error != 0) {
- printf("bootpc_call: sosend: %d state %08x\n",
- error, (int) so->so_state);
- }
-
- /* XXX: Is this needed ? */
- pause("bootpw", hz/10);
+ if (error != 0)
+ printf("%s: sosend: %d state %08x\n", __func__,
+ error, (int )bootp_so->so_state);
/* Set netmask to 255.0.0.0 */
-
- sin = (struct sockaddr_in *) &ifctx->ireq.ifr_addr;
- clear_sinaddr(sin);
- sin->sin_addr.s_addr = htonl(0xff000000u);
- error = ifioctl(ifctx->so, SIOCSIFNETMASK,
- (caddr_t) &ifctx->ireq, td);
+ sin->sin_addr.s_addr = htonl(IN_CLASSA_NET);
+ error = ifioctl(bootp_so, SIOCAIFADDR, (caddr_t)ifra,
+ td);
if (error != 0)
- panic("bootpc_call:"
- "set if netmask, error=%d",
- error);
-
+ panic("%s: SIOCAIFADDR, error=%d", __func__,
+ error);
}
if (outstanding == 0 &&
(rtimo == 0 || time_second >= rtimo)) {
error = 0;
- goto gotreply;
+ goto out;
}
/* Determine new timeout. */
@@ -801,12 +772,10 @@ bootpc_call(struct bootpc_globalcontext *gctx, struct thread *td)
auio.uio_td = td;
rcvflg = 0;
- error = soreceive(so, NULL, &auio,
+ error = soreceive(bootp_so, NULL, &auio,
NULL, NULL, &rcvflg);
gctx->secs = time_second - gctx->starttime;
- for (ifctx = gctx->interfaces;
- ifctx != NULL;
- ifctx = ifctx->next) {
+ STAILQ_FOREACH(ifctx, &gctx->interfaces, next) {
if (bootpc_ifctx_isresolved(ifctx) != 0 ||
bootpc_ifctx_isfailed(ifctx) != 0)
continue;
@@ -829,9 +798,7 @@ bootpc_call(struct bootpc_globalcontext *gctx, struct thread *td)
continue;
/* Is this an answer to our query */
- for (ifctx = gctx->interfaces;
- ifctx != NULL;
- ifctx = ifctx->next) {
+ STAILQ_FOREACH(ifctx, &gctx->interfaces, next) {
if (gctx->reply.xid != ifctx->call.xid)
continue;
@@ -906,15 +873,13 @@ bootpc_call(struct bootpc_globalcontext *gctx, struct thread *td)
#endif
/* Force a retry if halfway in DHCP negotiation */
retry = 0;
- for (ifctx = gctx->interfaces; ifctx != NULL;
- ifctx = ifctx->next) {
+ STAILQ_FOREACH(ifctx, &gctx->interfaces, next)
if (ifctx->state == IF_DHCP_OFFERED) {
if (ifctx->dhcpquerytype == DHCP_DISCOVER)
retry = 1;
else
ifctx->state = IF_DHCP_UNRESOLVED;
}
- }
if (retry != 0)
continue;
@@ -931,14 +896,14 @@ bootpc_call(struct bootpc_globalcontext *gctx, struct thread *td)
* ignored
*/
- for (ifctx = gctx->interfaces; ifctx != NULL; ifctx = ifctx->next) {
+ STAILQ_FOREACH(ifctx, &gctx->interfaces, next)
if (bootpc_ifctx_isresolved(ifctx) == 0) {
printf("%s timeout for interface %s\n",
ifctx->dhcpquerytype != DHCP_NOMSG ?
"DHCP" : "BOOTP",
ifctx->ireq.ifr_name);
}
- }
+
if (gctx->gotrootpath != 0) {
#if 0
printf("Got a root path, ignoring remaining timeout\n");
@@ -947,40 +912,28 @@ bootpc_call(struct bootpc_globalcontext *gctx, struct thread *td)
goto out;
}
#ifndef BOOTP_NFSROOT
- for (ifctx = gctx->interfaces; ifctx != NULL; ifctx = ifctx->next) {
+ STAILQ_FOREACH(ifctx, &gctx->interfaces, next)
if (bootpc_ifctx_isresolved(ifctx) != 0) {
error = 0;
goto out;
}
- }
#endif
error = ETIMEDOUT;
- goto out;
-gotreply:
out:
- soclose(so);
-out0:
- return error;
+ return (error);
}
-static int
-bootpc_fakeup_interface(struct bootpc_ifcontext *ifctx,
- struct bootpc_globalcontext *gctx, struct thread *td)
+static void
+bootpc_fakeup_interface(struct bootpc_ifcontext *ifctx, struct thread *td)
{
+ struct ifreq *ifr;
+ struct in_aliasreq *ifra;
struct sockaddr_in *sin;
int error;
- struct ifreq *ireq;
- struct socket *so;
- struct ifaddr *ifa;
- struct sockaddr_dl *sdl;
-
- error = socreate(AF_INET, &ifctx->so, SOCK_DGRAM, 0, td->td_ucred, td);
- if (error != 0)
- panic("nfs_boot: socreate, error=%d", error);
- ireq = &ifctx->ireq;
- so = ifctx->so;
+ ifr = &ifctx->ireq;
+ ifra = &ifctx->iareq;
/*
* Bring up the interface.
@@ -988,71 +941,57 @@ bootpc_fakeup_interface(struct bootpc_ifcontext *ifctx,
* Get the old interface flags and or IFF_UP into them; if
* IFF_UP set blindly, interface selection can be clobbered.
*/
- error = ifioctl(so, SIOCGIFFLAGS, (caddr_t)ireq, td);
+ error = ifioctl(bootp_so, SIOCGIFFLAGS, (caddr_t)ifr, td);
if (error != 0)
- panic("bootpc_fakeup_interface: GIFFLAGS, error=%d", error);
- ireq->ifr_flags |= IFF_UP;
- error = ifioctl(so, SIOCSIFFLAGS, (caddr_t)ireq, td);
+ panic("%s: SIOCGIFFLAGS, error=%d", __func__, error);
+ ifr->ifr_flags |= IFF_UP;
+ error = ifioctl(bootp_so, SIOCSIFFLAGS, (caddr_t)ifr, td);
if (error != 0)
- panic("bootpc_fakeup_interface: SIFFLAGS, error=%d", error);
+ panic("%s: SIOCSIFFLAGS, error=%d", __func__, error);
/*
* Do enough of ifconfig(8) so that the chosen interface
- * can talk to the servers. (just set the address)
+ * can talk to the servers. Set address to 0.0.0.0/8 and
+ * broadcast address to local broadcast.
*/
-
- /* addr is 0.0.0.0 */
-
- sin = (struct sockaddr_in *) &ireq->ifr_addr;
+ sin = (struct sockaddr_in *)&ifra->ifra_addr;
clear_sinaddr(sin);
- error = ifioctl(so, SIOCSIFADDR, (caddr_t) ireq, td);
- if (error != 0 && (error != EEXIST || ifctx == gctx->interfaces))
- panic("bootpc_fakeup_interface: "
- "set if addr, error=%d", error);
-
- /* netmask is 255.0.0.0 */
-
- sin = (struct sockaddr_in *) &ireq->ifr_addr;
+ sin = (struct sockaddr_in *)&ifra->ifra_mask;
clear_sinaddr(sin);
- sin->sin_addr.s_addr = htonl(0xff000000u);
- error = ifioctl(so, SIOCSIFNETMASK, (caddr_t)ireq, td);
- if (error != 0)
- panic("bootpc_fakeup_interface: set if netmask, error=%d",
- error);
-
- /* Broadcast is 255.255.255.255 */
-
- sin = (struct sockaddr_in *)&ireq->ifr_addr;
+ sin->sin_addr.s_addr = htonl(IN_CLASSA_NET);
+ sin = (struct sockaddr_in *)&ifra->ifra_broadaddr;
clear_sinaddr(sin);
- clear_sinaddr(&ifctx->broadcast);
sin->sin_addr.s_addr = htonl(INADDR_BROADCAST);
- ifctx->broadcast.sin_addr.s_addr = sin->sin_addr.s_addr;
-
- error = ifioctl(so, SIOCSIFBRDADDR, (caddr_t)ireq, td);
+ error = ifioctl(bootp_so, SIOCAIFADDR, (caddr_t)ifra, td);
if (error != 0)
- panic("bootpc_fakeup_interface: "
- "set if broadcast addr, error=%d",
- error);
+ panic("%s: SIOCAIFADDR, error=%d", __func__, error);
+}
- /* Get HW address */
+static void
+bootpc_shutdown_interface(struct bootpc_ifcontext *ifctx, struct thread *td)
+{
+ struct ifreq *ifr;
+ struct sockaddr_in *sin;
+ int error;
- sdl = NULL;
- TAILQ_FOREACH(ifa, &ifctx->ifp->if_addrhead, ifa_link)
- if (ifa->ifa_addr->sa_family == AF_LINK) {
- sdl = (struct sockaddr_dl *)ifa->ifa_addr;
- if (sdl->sdl_type == IFT_ETHER)
- break;
- }
+ ifr = &ifctx->ireq;
- if (sdl == NULL)
- panic("bootpc: Unable to find HW address for %s",
- ifctx->ireq.ifr_name);
- ifctx->sdl = sdl;
+ printf("Shutdown interface %s\n", ifctx->ireq.ifr_name);
+ error = ifioctl(bootp_so, SIOCGIFFLAGS, (caddr_t)ifr, td);
+ if (error != 0)
+ panic("%s: SIOCGIFFLAGS, error=%d", __func__, error);
+ ifr->ifr_flags &= ~IFF_UP;
+ error = ifioctl(bootp_so, SIOCSIFFLAGS, (caddr_t)ifr, td);
+ if (error != 0)
+ panic("%s: SIOCSIFFLAGS, error=%d", __func__, error);
- return error;
+ sin = (struct sockaddr_in *) &ifr->ifr_addr;
+ clear_sinaddr(sin);
+ error = ifioctl(bootp_so, SIOCDIFADDR, (caddr_t) ifr, td);
+ if (error != 0)
+ panic("%s: SIOCDIFADDR, error=%d", __func__, error);
}
-
static int
bootpc_adjust_interface(struct bootpc_ifcontext *ifctx,
struct bootpc_globalcontext *gctx, struct thread *td)
@@ -1061,42 +1000,22 @@ bootpc_adjust_interface(struct bootpc_ifcontext *ifctx,
struct sockaddr_in defdst;
struct sockaddr_in defmask;
struct sockaddr_in *sin;
- struct ifreq *ireq;
- struct socket *so;
+ struct ifreq *ifr;
+ struct in_aliasreq *ifra;
struct sockaddr_in *myaddr;
struct sockaddr_in *netmask;
struct sockaddr_in *gw;
- ireq = &ifctx->ireq;
- so = ifctx->so;
+ ifr = &ifctx->ireq;
+ ifra = &ifctx->iareq;
myaddr = &ifctx->myaddr;
netmask = &ifctx->netmask;
gw = &ifctx->gw;
if (bootpc_ifctx_isresolved(ifctx) == 0) {
-
/* Shutdown interfaces where BOOTP failed */
-
- printf("Shutdown interface %s\n", ifctx->ireq.ifr_name);
- error = ifioctl(so, SIOCGIFFLAGS, (caddr_t)ireq, td);
- if (error != 0)
- panic("bootpc_adjust_interface: "
- "SIOCGIFFLAGS, error=%d", error);
- ireq->ifr_flags &= ~IFF_UP;
- error = ifioctl(so, SIOCSIFFLAGS, (caddr_t)ireq, td);
- if (error != 0)
- panic("bootpc_adjust_interface: "
- "SIOCSIFFLAGS, error=%d", error);
-
- sin = (struct sockaddr_in *) &ireq->ifr_addr;
- clear_sinaddr(sin);
- error = ifioctl(so, SIOCDIFADDR, (caddr_t) ireq, td);
- if (error != 0 && (error != EEXIST ||
- ifctx == gctx->interfaces))
- panic("bootpc_adjust_interface: "
- "SIOCDIFADDR, error=%d", error);
-
- return 0;
+ bootpc_shutdown_interface(ifctx, td);
+ return (0);
}
printf("Adjusted interface %s\n", ifctx->ireq.ifr_name);
@@ -1104,28 +1023,21 @@ bootpc_adjust_interface(struct bootpc_ifcontext *ifctx,
* Do enough of ifconfig(8) so that the chosen interface
* can talk to the servers. (just set the address)
*/
- bcopy(netmask, &ireq->ifr_addr, sizeof(*netmask));
- error = ifioctl(so, SIOCSIFNETMASK, (caddr_t) ireq, td);
+ sin = (struct sockaddr_in *) &ifr->ifr_addr;
+ clear_sinaddr(sin);
+ error = ifioctl(bootp_so, SIOCDIFADDR, (caddr_t) ifr, td);
if (error != 0)
- panic("bootpc_adjust_interface: "
- "set if netmask, error=%d", error);
+ panic("%s: SIOCDIFADDR, error=%d", __func__, error);
- /* Broadcast is with host part of IP address all 1's */
+ bcopy(myaddr, &ifra->ifra_addr, sizeof(*myaddr));
+ bcopy(netmask, &ifra->ifra_mask, sizeof(*netmask));
+ clear_sinaddr(&ifra->ifra_broadaddr);
+ ifra->ifra_broadaddr.sin_addr.s_addr = myaddr->sin_addr.s_addr |
+ ~netmask->sin_addr.s_addr;
- sin = (struct sockaddr_in *) &ireq->ifr_addr;
- clear_sinaddr(sin);
- sin->sin_addr.s_addr = myaddr->sin_addr.s_addr |
- ~ netmask->sin_addr.s_addr;
- error = ifioctl(so, SIOCSIFBRDADDR, (caddr_t) ireq, td);
+ error = ifioctl(bootp_so, SIOCAIFADDR, (caddr_t)ifra, td);
if (error != 0)
- panic("bootpc_adjust_interface: "
- "set if broadcast addr, error=%d", error);
-
- bcopy(myaddr, &ireq->ifr_addr, sizeof(*myaddr));
- error = ifioctl(so, SIOCSIFADDR, (caddr_t) ireq, td);
- if (error != 0 && (error != EEXIST || ifctx == gctx->interfaces))
- panic("bootpc_adjust_interface: "
- "set if addr, error=%d", error);
+ panic("%s: SIOCAIFADDR, error=%d", __func__, error);
/* Add new default route */
@@ -1139,13 +1051,12 @@ bootpc_adjust_interface(struct bootpc_ifcontext *ifctx,
(struct sockaddr *) &defmask,
(RTF_UP | RTF_GATEWAY | RTF_STATIC), NULL, 0);
if (error != 0) {
- printf("bootpc_adjust_interface: "
- "add net route, error=%d\n", error);
- return error;
+ printf("%s: RTM_ADD, error=%d\n", __func__, error);
+ return (error);
}
}
- return 0;
+ return (0);
}
static int
@@ -1288,8 +1199,7 @@ print_in_addr(struct in_addr addr)
}
static void
-bootpc_compose_query(struct bootpc_ifcontext *ifctx,
- struct bootpc_globalcontext *gctx, struct thread *td)
+bootpc_compose_query(struct bootpc_ifcontext *ifctx, struct thread *td)
{
unsigned char *vendp;
unsigned char vendor_client[64];
@@ -1595,9 +1505,11 @@ bootpc_decode_reply(struct nfsv3_diskless *nd, struct bootpc_ifcontext *ifctx,
void
bootpc_init(void)
{
- struct bootpc_ifcontext *ifctx, *nctx; /* Interface BOOTP contexts */
+ struct bootpc_ifcontext *ifctx; /* Interface BOOTP contexts */
struct bootpc_globalcontext *gctx; /* Global BOOTP context */
struct ifnet *ifp;
+ struct sockaddr_dl *sdl;
+ struct ifaddr *ifa;
int error;
#ifndef BOOTP_WIRED_TO
int ifcnt;
@@ -1615,9 +1527,7 @@ bootpc_init(void)
return;
gctx = malloc(sizeof(*gctx), M_TEMP, M_WAITOK | M_ZERO);
- if (gctx == NULL)
- panic("Failed to allocate bootp global context structure");
-
+ STAILQ_INIT(&gctx->interfaces);
gctx->xid = ~0xFFFF;
gctx->starttime = time_second;
@@ -1626,7 +1536,7 @@ bootpc_init(void)
*/
CURVNET_SET(TD_TO_VNET(td));
#ifdef BOOTP_WIRED_TO
- printf("bootpc_init: wired to interface '%s'\n",
+ printf("%s: wired to interface '%s'\n", __func__,
__XSTRING(BOOTP_WIRED_TO));
allocifctx(gctx);
#else
@@ -1634,60 +1544,94 @@ bootpc_init(void)
* Preallocate interface context storage, if another interface
* attaches and wins the race, it won't be eligible for bootp.
*/
+ ifcnt = 0;
IFNET_RLOCK();
- for (ifp = TAILQ_FIRST(&V_ifnet), ifcnt = 0;
- ifp != NULL;
- ifp = TAILQ_NEXT(ifp, if_link)) {
+ TAILQ_FOREACH(ifp, &V_ifnet, if_link) {
if ((ifp->if_flags &
(IFF_LOOPBACK | IFF_POINTOPOINT | IFF_BROADCAST)) !=
IFF_BROADCAST)
continue;
+ switch (ifp->if_alloctype) {
+ case IFT_ETHER:
+ case IFT_FDDI:
+ case IFT_ISO88025:
+ break;
+ default:
+ continue;
+ }
ifcnt++;
}
IFNET_RUNLOCK();
if (ifcnt == 0)
- panic("bootpc_init: no eligible interfaces");
+ panic("%s: no eligible interfaces", __func__);
for (; ifcnt > 0; ifcnt--)
allocifctx(gctx);
#endif
+ ifctx = STAILQ_FIRST(&gctx->interfaces);
IFNET_RLOCK();
- for (ifp = TAILQ_FIRST(&V_ifnet), ifctx = gctx->interfaces;
- ifp != NULL && ifctx != NULL;
- ifp = TAILQ_NEXT(ifp, if_link)) {
- strlcpy(ifctx->ireq.ifr_name, ifp->if_xname,
- sizeof(ifctx->ireq.ifr_name));
+ TAILQ_FOREACH(ifp, &V_ifnet, if_link) {
+ if (ifctx == NULL)
+ break;
#ifdef BOOTP_WIRED_TO
- if (strcmp(ifctx->ireq.ifr_name,
- __XSTRING(BOOTP_WIRED_TO)) != 0)
+ if (strcmp(ifp->if_xname, __XSTRING(BOOTP_WIRED_TO)) != 0)
continue;
#else
if ((ifp->if_flags &
(IFF_LOOPBACK | IFF_POINTOPOINT | IFF_BROADCAST)) !=
IFF_BROADCAST)
continue;
+ switch (ifp->if_alloctype) {
+ case IFT_ETHER:
+ case IFT_FDDI:
+ case IFT_ISO88025:
+ break;
+ default:
+ continue;
+ }
#endif
+ strlcpy(ifctx->ireq.ifr_name, ifp->if_xname,
+ sizeof(ifctx->ireq.ifr_name));
ifctx->ifp = ifp;
- ifctx = ifctx->next;
+
+ /* Get HW address */
+ sdl = NULL;
+ TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link)
+ if (ifa->ifa_addr->sa_family == AF_LINK) {
+ sdl = (struct sockaddr_dl *)ifa->ifa_addr;
+ if (sdl->sdl_type == IFT_ETHER)
+ break;
+ }
+ if (sdl == NULL)
+ panic("bootpc: Unable to find HW address for %s",
+ ifctx->ireq.ifr_name);
+ ifctx->sdl = sdl;
+
+ ifctx = STAILQ_NEXT(ifctx, next);
}
IFNET_RUNLOCK();
CURVNET_RESTORE();
- if (gctx->interfaces == NULL || gctx->interfaces->ifp == NULL) {
+ if (STAILQ_EMPTY(&gctx->interfaces) ||
+ STAILQ_FIRST(&gctx->interfaces)->ifp == NULL) {
#ifdef BOOTP_WIRED_TO
- panic("bootpc_init: Could not find interface specified "
+ panic("%s: Could not find interface specified "
"by BOOTP_WIRED_TO: "
- __XSTRING(BOOTP_WIRED_TO));
+ __XSTRING(BOOTP_WIRED_TO), __func__);
#else
- panic("bootpc_init: no suitable interface");
+ panic("%s: no suitable interface", __func__);
#endif
}
- for (ifctx = gctx->interfaces; ifctx != NULL; ifctx = ifctx->next)
- bootpc_fakeup_interface(ifctx, gctx, td);
+ error = socreate(AF_INET, &bootp_so, SOCK_DGRAM, 0, td->td_ucred, td);
+ if (error != 0)
+ panic("%s: socreate, error=%d", __func__, error);
- for (ifctx = gctx->interfaces; ifctx != NULL; ifctx = ifctx->next)
- bootpc_compose_query(ifctx, gctx, td);
+ STAILQ_FOREACH(ifctx, &gctx->interfaces, next)
+ bootpc_fakeup_interface(ifctx, td);
+
+ STAILQ_FOREACH(ifctx, &gctx->interfaces, next)
+ bootpc_compose_query(ifctx, td);
error = bootpc_call(gctx, td);
@@ -1705,7 +1649,7 @@ bootpc_init(void)
#endif
mountopts(&nd->root_args, NULL);
- for (ifctx = gctx->interfaces; ifctx != NULL; ifctx = ifctx->next)
+ STAILQ_FOREACH(ifctx, &gctx->interfaces, next)
if (bootpc_ifctx_isresolved(ifctx) != 0)
bootpc_decode_reply(nd, ifctx, gctx);
@@ -1714,19 +1658,16 @@ bootpc_init(void)
panic("bootpc: No root path offered");
#endif
- for (ifctx = gctx->interfaces; ifctx != NULL; ifctx = ifctx->next) {
+ STAILQ_FOREACH(ifctx, &gctx->interfaces, next)
bootpc_adjust_interface(ifctx, gctx, td);
- soclose(ifctx->so);
- }
+ soclose(bootp_so);
- for (ifctx = gctx->interfaces; ifctx != NULL; ifctx = ifctx->next)
+ STAILQ_FOREACH(ifctx, &gctx->interfaces, next)
if (ifctx->gotrootpath != 0)
break;
if (ifctx == NULL) {
- for (ifctx = gctx->interfaces;
- ifctx != NULL;
- ifctx = ifctx->next)
+ STAILQ_FOREACH(ifctx, &gctx->interfaces, next)
if (bootpc_ifctx_isresolved(ifctx) != 0)
break;
}
@@ -1755,8 +1696,8 @@ bootpc_init(void)
bcopy(&ifctx->netmask, &nd->myif.ifra_mask, sizeof(ifctx->netmask));
out:
- for (ifctx = gctx->interfaces; ifctx != NULL; ifctx = nctx) {
- nctx = ifctx->next;
+ while((ifctx = STAILQ_FIRST(&gctx->interfaces)) != NULL) {
+ STAILQ_REMOVE_HEAD(&gctx->interfaces, next);
free(ifctx, M_TEMP);
}
free(gctx, M_TEMP);
diff --git a/sys/nfsclient/nfs_krpc.c b/sys/nfsclient/nfs_krpc.c
index c2406d9..0389d29 100644
--- a/sys/nfsclient/nfs_krpc.c
+++ b/sys/nfsclient/nfs_krpc.c
@@ -191,6 +191,7 @@ nfs_connect(struct nfsmount *nmp)
struct netconfig *nconf;
rpcvers_t vers;
int one = 1, retries;
+ struct timeval timo;
/*
* We need to establish the socket using the credentials of
@@ -258,12 +259,37 @@ nfs_connect(struct nfsmount *nmp)
CLNT_CONTROL(client, CLSET_INTERRUPTIBLE, &one);
if (nmp->nm_flag & NFSMNT_RESVPORT)
CLNT_CONTROL(client, CLSET_PRIVPORT, &one);
- if (nmp->nm_flag & NFSMNT_SOFT)
- retries = nmp->nm_retry;
- else
+ if ((nmp->nm_flag & NFSMNT_SOFT) != 0) {
+ if (nmp->nm_sotype == SOCK_DGRAM)
+ /*
+ * For UDP, the large timeout for a reconnect will
+ * be set to "nm_retry * nm_timeo / 2", so we only
+ * want to do 2 reconnect timeout retries.
+ */
+ retries = 2;
+ else
+ retries = nmp->nm_retry;
+ } else
retries = INT_MAX;
CLNT_CONTROL(client, CLSET_RETRIES, &retries);
+ /*
+ * For UDP, there are 2 timeouts:
+ * - CLSET_RETRY_TIMEOUT sets the initial timeout for the timer
+ * that does a retransmit of an RPC request using the same socket
+ * and xid. This is what you normally want to do, since NFS
+ * servers depend on "same xid" for their Duplicate Request Cache.
+ * - timeout specified in CLNT_CALL_MBUF(), which specifies when
+ * retransmits on the same socket should fail and a fresh socket
+ * created. Each of these timeouts counts as one CLSET_RETRIES,
+ * as set above.
+ * Set the initial retransmit timeout for UDP. This timeout doesn't
+ * exist for TCP and the following call just fails, which is ok.
+ */
+ timo.tv_sec = nmp->nm_timeo / NFS_HZ;
+ timo.tv_usec = (nmp->nm_timeo % NFS_HZ) * 1000000 / NFS_HZ;
+ CLNT_CONTROL(client, CLSET_RETRY_TIMEOUT, &timo);
+
mtx_lock(&nmp->nm_mtx);
if (nmp->nm_client) {
/*
@@ -411,7 +437,7 @@ nfs_request(struct vnode *vp, struct mbuf *mreq, int procnum,
struct mbuf *md;
time_t waituntil;
caddr_t dpos;
- int error = 0;
+ int error = 0, timeo;
struct timeval now;
AUTH *auth = NULL;
enum nfs_rto_timer_t timer;
@@ -486,8 +512,32 @@ nfs_request(struct vnode *vp, struct mbuf *mreq, int procnum,
nfsstats.rpcrequests++;
tryagain:
- timo.tv_sec = nmp->nm_timeo / NFS_HZ;
- timo.tv_usec = (nmp->nm_timeo * 1000000) / NFS_HZ;
+ /*
+ * This timeout specifies when a new socket should be created,
+ * along with new xid values. For UDP, this should be done
+ * infrequently, since retransmits of RPC requests should normally
+ * use the same xid.
+ */
+ if (nmp->nm_sotype == SOCK_DGRAM) {
+ if ((nmp->nm_flag & NFSMNT_SOFT) != 0) {
+ /*
+ * CLSET_RETRIES is set to 2, so this should be half
+ * of the total timeout required.
+ */
+ timeo = nmp->nm_retry * nmp->nm_timeo / 2;
+ if (timeo < 1)
+ timeo = 1;
+ timo.tv_sec = timeo / NFS_HZ;
+ timo.tv_usec = (timeo % NFS_HZ) * 1000000 / NFS_HZ;
+ } else {
+ /* For UDP hard mounts, use a large value. */
+ timo.tv_sec = NFS_MAXTIMEO / NFS_HZ;
+ timo.tv_usec = 0;
+ }
+ } else {
+ timo.tv_sec = nmp->nm_timeo / NFS_HZ;
+ timo.tv_usec = (nmp->nm_timeo % NFS_HZ) * 1000000 / NFS_HZ;
+ }
mrep = NULL;
stat = CLNT_CALL_MBUF(nmp->nm_client, &ext,
(nmp->nm_flag & NFSMNT_NFSV3) ? procnum : nfsv2_procid[procnum],
diff --git a/sys/nfsclient/nfs_subs.c b/sys/nfsclient/nfs_subs.c
index 19fde06..d00a025 100644
--- a/sys/nfsclient/nfs_subs.c
+++ b/sys/nfsclient/nfs_subs.c
@@ -978,8 +978,8 @@ nfsm_loadattr_xx(struct vnode **v, struct vattr *va, struct mbuf **md,
}
int
-nfsm_postop_attr_xx(struct vnode **v, int *f, struct mbuf **md,
- caddr_t *dpos)
+nfsm_postop_attr_xx(struct vnode **v, int *f, struct vattr *va,
+ struct mbuf **md, caddr_t *dpos)
{
u_int32_t *tl;
int t1;
@@ -990,7 +990,7 @@ nfsm_postop_attr_xx(struct vnode **v, int *f, struct mbuf **md,
return EBADRPC;
*f = fxdr_unsigned(int, *tl);
if (*f != 0) {
- t1 = nfs_loadattrcache(&ttvp, md, dpos, NULL, 1);
+ t1 = nfs_loadattrcache(&ttvp, md, dpos, va, 1);
if (t1 != 0) {
*f = 0;
return t1;
@@ -1020,7 +1020,7 @@ nfsm_wcc_data_xx(struct vnode **v, int *f, struct mbuf **md, caddr_t *dpos)
VTONFS(*v)->n_mtime.tv_nsec == fxdr_unsigned(u_int32_t, *(tl + 3)));
mtx_unlock(&(VTONFS(*v))->n_mtx);
}
- t1 = nfsm_postop_attr_xx(v, &ttattrf, md, dpos);
+ t1 = nfsm_postop_attr_xx(v, &ttattrf, NULL, md, dpos);
if (t1)
return t1;
if (*f)
diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c
index 42895d0..5c257fc 100644
--- a/sys/nfsclient/nfs_vfsops.c
+++ b/sys/nfsclient/nfs_vfsops.c
@@ -117,7 +117,7 @@ static void nfs_decode_args(struct mount *mp, struct nfsmount *nmp,
struct nfs_args *argp, const char *hostname);
static int mountnfs(struct nfs_args *, struct mount *,
struct sockaddr *, char *, struct vnode **,
- struct ucred *cred, int);
+ struct ucred *cred, int, int);
static void nfs_getnlminfo(struct vnode *, uint8_t *, size_t *,
struct sockaddr_storage *, int *, off_t *,
struct timeval *);
@@ -559,8 +559,8 @@ nfs_mountdiskless(char *path,
int error;
nam = sodupsockaddr((struct sockaddr *)sin, M_WAITOK);
- if ((error = mountnfs(args, mp, nam, path, vpp,
- td->td_ucred, NFS_DEFAULT_NEGNAMETIMEO)) != 0) {
+ if ((error = mountnfs(args, mp, nam, path, vpp, td->td_ucred,
+ NFS_DEFAULT_NAMETIMEO, NFS_DEFAULT_NEGNAMETIMEO)) != 0) {
printf("nfs_mountroot: mount %s on /: %d\n", path, error);
return (error);
}
@@ -788,6 +788,7 @@ static const char *nfs_opts[] = { "from", "nfs_args",
"wsize", "rsize", "retrans", "acregmin", "acregmax", "acdirmin",
"acdirmax", "deadthresh", "hostname", "timeout", "addr", "fh", "nfsv3",
"sec", "maxgroups", "principal", "negnametimeo", "nocto", "wcommitsize",
+ "nametimeo",
NULL };
/*
@@ -836,6 +837,7 @@ nfs_mount(struct mount *mp)
size_t len;
u_char nfh[NFSX_V3FHMAX];
char *opt;
+ int nametimeo = NFS_DEFAULT_NAMETIMEO;
int negnametimeo = NFS_DEFAULT_NEGNAMETIMEO;
has_nfs_args_opt = 0;
@@ -1058,6 +1060,14 @@ nfs_mount(struct mount *mp)
}
args.flags |= NFSMNT_MAXGRPS;
}
+ if (vfs_getopt(mp->mnt_optnew, "nametimeo", (void **)&opt, NULL) == 0) {
+ ret = sscanf(opt, "%d", &nametimeo);
+ if (ret != 1 || nametimeo < 0) {
+ vfs_mount_error(mp, "illegal nametimeo: %s", opt);
+ error = EINVAL;
+ goto out;
+ }
+ }
if (vfs_getopt(mp->mnt_optnew, "negnametimeo", (void **)&opt, NULL)
== 0) {
ret = sscanf(opt, "%d", &negnametimeo);
@@ -1106,6 +1116,23 @@ nfs_mount(struct mount *mp)
error = EIO;
goto out;
}
+
+ /*
+ * Cannot switch to UDP if current rsize/wsize/readdirsize is
+ * too large, since there may be an I/O RPC in progress that
+ * will get retried after the switch to the UDP socket. These
+ * retries will fail over and over and over again.
+ */
+ if (args.sotype == SOCK_DGRAM &&
+ (nmp->nm_rsize > NFS_MAXDGRAMDATA ||
+ nmp->nm_wsize > NFS_MAXDGRAMDATA ||
+ nmp->nm_readdirsize > NFS_MAXDGRAMDATA)) {
+ vfs_mount_error(mp,
+ "old rsize/wsize/readdirsize greater than UDP max");
+ error = EINVAL;
+ goto out;
+ }
+
/*
* When doing an update, we can't change from or to
* v3, switch lockd strategies or change cookie translation
@@ -1165,7 +1192,7 @@ nfs_mount(struct mount *mp)
goto out;
}
error = mountnfs(&args, mp, nam, args.hostname, &vp,
- curthread->td_ucred, negnametimeo);
+ curthread->td_ucred, nametimeo, negnametimeo);
out:
if (!error) {
MNT_ILOCK(mp);
@@ -1187,7 +1214,7 @@ out:
*/
/* ARGSUSED */
static int
-nfs_cmount(struct mntarg *ma, void *data, int flags)
+nfs_cmount(struct mntarg *ma, void *data, uint64_t flags)
{
int error;
struct nfs_args args;
@@ -1207,7 +1234,8 @@ nfs_cmount(struct mntarg *ma, void *data, int flags)
*/
static int
mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam,
- char *hst, struct vnode **vpp, struct ucred *cred, int negnametimeo)
+ char *hst, struct vnode **vpp, struct ucred *cred, int nametimeo,
+ int negnametimeo)
{
struct nfsmount *nmp;
struct nfsnode *np;
@@ -1257,6 +1285,7 @@ mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam,
nmp->nm_numgrps = NFS_MAXGRPS;
nmp->nm_readahead = NFS_DEFRAHEAD;
nmp->nm_deadthresh = NFS_MAXDEADTHRESH;
+ nmp->nm_nametimeo = nametimeo;
nmp->nm_negnametimeo = negnametimeo;
nmp->nm_tprintf_delay = nfs_tprintf_delay;
if (nmp->nm_tprintf_delay < 0)
diff --git a/sys/nfsclient/nfs_vnops.c b/sys/nfsclient/nfs_vnops.c
index a9f746d..4ba1f7b 100644
--- a/sys/nfsclient/nfs_vnops.c
+++ b/sys/nfsclient/nfs_vnops.c
@@ -913,7 +913,7 @@ nfs_lookup(struct vop_lookup_args *ap)
struct vnode **vpp = ap->a_vpp;
struct mount *mp = dvp->v_mount;
struct vattr vattr;
- struct timespec dmtime;
+ struct timespec nctime;
int flags = cnp->cn_flags;
struct vnode *newvp;
struct nfsmount *nmp;
@@ -922,7 +922,7 @@ nfs_lookup(struct vop_lookup_args *ap)
long len;
nfsfh_t *fhp;
struct nfsnode *np, *newnp;
- int error = 0, attrflag, fhsize, ltype;
+ int error = 0, attrflag, dattrflag, fhsize, ltype, ncticks;
int v3 = NFS_ISV3(dvp);
struct thread *td = cnp->cn_thread;
@@ -938,15 +938,29 @@ nfs_lookup(struct vop_lookup_args *ap)
*vpp = NULLVP;
return (error);
}
- error = cache_lookup(dvp, vpp, cnp);
+ error = cache_lookup_times(dvp, vpp, cnp, &nctime, &ncticks);
if (error > 0 && error != ENOENT)
return (error);
if (error == -1) {
/*
+ * Lookups of "." are special and always return the
+ * current directory. cache_lookup() already handles
+ * associated locking bookkeeping, etc.
+ */
+ if (cnp->cn_namelen == 1 && cnp->cn_nameptr[0] == '.') {
+ /* XXX: Is this really correct? */
+ if (cnp->cn_nameiop != LOOKUP &&
+ (flags & ISLASTCN))
+ cnp->cn_flags |= SAVENAME;
+ return (0);
+ }
+
+ /*
* We only accept a positive hit in the cache if the
* change time of the file matches our cached copy.
* Otherwise, we discard the cache entry and fallback
- * to doing a lookup RPC.
+ * to doing a lookup RPC. We also only trust cache
+ * entries for less than nm_nametimeo seconds.
*
* To better handle stale file handles and attributes,
* clear the attribute cache of this node if it is a
@@ -967,8 +981,9 @@ nfs_lookup(struct vop_lookup_args *ap)
KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(newvp);
mtx_unlock(&newnp->n_mtx);
}
- if (VOP_GETATTR(newvp, &vattr, cnp->cn_cred) == 0 &&
- timespeccmp(&vattr.va_ctime, &newnp->n_ctime, ==)) {
+ if ((u_int)(ticks - ncticks) < (nmp->nm_nametimeo * hz) &&
+ VOP_GETATTR(newvp, &vattr, cnp->cn_cred) == 0 &&
+ timespeccmp(&vattr.va_ctime, &nctime, ==)) {
nfsstats.lookupcache_hits++;
if (cnp->cn_nameiop != LOOKUP &&
(flags & ISLASTCN))
@@ -987,36 +1002,22 @@ nfs_lookup(struct vop_lookup_args *ap)
/*
* We only accept a negative hit in the cache if the
* modification time of the parent directory matches
- * our cached copy. Otherwise, we discard all of the
- * negative cache entries for this directory. We also
- * only trust -ve cache entries for less than
- * nm_negative_namecache_timeout seconds.
+ * the cached copy in the name cache entry.
+ * Otherwise, we discard all of the negative cache
+ * entries for this directory. We also only trust
+ * negative cache entries for up to nm_negnametimeo
+ * seconds.
*/
- if ((u_int)(ticks - np->n_dmtime_ticks) <
- (nmp->nm_negnametimeo * hz) &&
+ if ((u_int)(ticks - ncticks) < (nmp->nm_negnametimeo * hz) &&
VOP_GETATTR(dvp, &vattr, cnp->cn_cred) == 0 &&
- timespeccmp(&vattr.va_mtime, &np->n_dmtime, ==)) {
+ timespeccmp(&vattr.va_mtime, &nctime, ==)) {
nfsstats.lookupcache_hits++;
return (ENOENT);
}
cache_purge_negative(dvp);
- mtx_lock(&np->n_mtx);
- timespecclear(&np->n_dmtime);
- mtx_unlock(&np->n_mtx);
}
- /*
- * Cache the modification time of the parent directory in case
- * the lookup fails and results in adding the first negative
- * name cache entry for the directory. Since this is reading
- * a single time_t, don't bother with locking. The
- * modification time may be a bit stale, but it must be read
- * before performing the lookup RPC to prevent a race where
- * another lookup updates the timestamp on the directory after
- * the lookup RPC has been performed on the server but before
- * n_dmtime is set at the end of this function.
- */
- dmtime = np->n_vattr.va_mtime;
+ attrflag = dattrflag = 0;
error = 0;
newvp = NULLVP;
nfsstats.lookupcache_misses++;
@@ -1031,7 +1032,7 @@ nfs_lookup(struct vop_lookup_args *ap)
nfsm_request(dvp, NFSPROC_LOOKUP, cnp->cn_thread, cnp->cn_cred);
if (error) {
if (v3) {
- nfsm_postop_attr(dvp, attrflag);
+ nfsm_postop_attr_va(dvp, dattrflag, &vattr);
m_freem(mrep);
}
goto nfsmout;
@@ -1127,16 +1128,17 @@ nfs_lookup(struct vop_lookup_args *ap)
}
}
if (v3) {
- nfsm_postop_attr(newvp, attrflag);
- nfsm_postop_attr(dvp, attrflag);
- } else
- nfsm_loadattr(newvp, NULL);
+ nfsm_postop_attr_va(newvp, attrflag, &vattr);
+ nfsm_postop_attr(dvp, dattrflag);
+ } else {
+ nfsm_loadattr(newvp, &vattr);
+ attrflag = 1;
+ }
if (cnp->cn_nameiop != LOOKUP && (flags & ISLASTCN))
cnp->cn_flags |= SAVENAME;
if ((cnp->cn_flags & MAKEENTRY) &&
- (cnp->cn_nameiop != DELETE || !(flags & ISLASTCN))) {
- np->n_ctime = np->n_vattr.va_ctime;
- cache_enter(dvp, newvp, cnp);
+ (cnp->cn_nameiop != DELETE || !(flags & ISLASTCN)) && attrflag) {
+ cache_enter_time(dvp, newvp, cnp, &vattr.va_ctime);
}
*vpp = newvp;
m_freem(mrep);
@@ -1164,30 +1166,22 @@ nfsmout:
return (EJUSTRETURN);
}
- if ((cnp->cn_flags & MAKEENTRY) && cnp->cn_nameiop != CREATE) {
+ if ((cnp->cn_flags & MAKEENTRY) && cnp->cn_nameiop != CREATE &&
+ dattrflag) {
/*
- * Maintain n_dmtime as the modification time
- * of the parent directory when the oldest -ve
- * name cache entry for this directory was
- * added. If a -ve cache entry has already
- * been added with a newer modification time
- * by a concurrent lookup, then don't bother
- * adding a cache entry. The modification
- * time of the directory might have changed
- * due to the file this lookup failed to find
- * being created. In that case a subsequent
- * lookup would incorrectly use the entry
- * added here instead of doing an extra
- * lookup.
+ * Cache the modification time of the parent
+ * directory from the post-op attributes in
+ * the name cache entry. The negative cache
+ * entry will be ignored once the directory
+ * has changed. Don't bother adding the entry
+ * if the directory has already changed.
*/
mtx_lock(&np->n_mtx);
- if (timespeccmp(&np->n_dmtime, &dmtime, <=)) {
- if (!timespecisset(&np->n_dmtime)) {
- np->n_dmtime = dmtime;
- np->n_dmtime_ticks = ticks;
- }
+ if (timespeccmp(&np->n_vattr.va_mtime,
+ &vattr.va_mtime, ==)) {
mtx_unlock(&np->n_mtx);
- cache_enter(dvp, NULL, cnp);
+ cache_enter_time(dvp, NULL, cnp,
+ &vattr.va_mtime);
} else
mtx_unlock(&np->n_mtx);
}
@@ -1538,8 +1532,6 @@ nfsmout:
if (newvp)
vput(newvp);
} else {
- if (cnp->cn_flags & MAKEENTRY)
- cache_enter(dvp, newvp, cnp);
*vpp = newvp;
}
mtx_lock(&(VTONFS(dvp))->n_mtx);
@@ -1678,8 +1670,6 @@ nfsmout:
vput(newvp);
}
if (!error) {
- if (cnp->cn_flags & MAKEENTRY)
- cache_enter(dvp, newvp, cnp);
*ap->a_vpp = newvp;
}
mtx_lock(&(VTONFS(dvp))->n_mtx);
@@ -2473,6 +2463,7 @@ nfs_readdirplusrpc(struct vnode *vp, struct uio *uiop, struct ucred *cred)
nfsuint64 cookie;
struct nfsmount *nmp = VFSTONFS(vp->v_mount);
struct nfsnode *dnp = VTONFS(vp), *np;
+ struct vattr vattr;
nfsfh_t *fhp;
u_quad_t fileno;
int error = 0, tlen, more_dirs = 1, blksiz = 0, doit, bigenough = 1, i;
@@ -2653,18 +2644,13 @@ nfs_readdirplusrpc(struct vnode *vp, struct uio *uiop, struct ucred *cred)
dpos = dpossav1;
mdsav2 = md;
md = mdsav1;
- nfsm_loadattr(newvp, NULL);
+ nfsm_loadattr(newvp, &vattr);
dpos = dpossav2;
md = mdsav2;
- dp->d_type =
- IFTODT(VTTOIF(np->n_vattr.va_type));
+ dp->d_type = IFTODT(VTTOIF(vattr.va_type));
ndp->ni_vp = newvp;
- /*
- * Update n_ctime so subsequent lookup
- * doesn't purge entry.
- */
- np->n_ctime = np->n_vattr.va_ctime;
- cache_enter(ndp->ni_dvp, ndp->ni_vp, cnp);
+ cache_enter_time(ndp->ni_dvp, ndp->ni_vp, cnp,
+ &vattr.va_ctime);
}
} else {
/* Just skip over the file handle */
diff --git a/sys/nfsclient/nfsm_subs.h b/sys/nfsclient/nfsm_subs.h
index 583aec1..c12badd 100644
--- a/sys/nfsclient/nfsm_subs.h
+++ b/sys/nfsclient/nfsm_subs.h
@@ -152,8 +152,8 @@ int nfsm_getfh_xx(nfsfh_t **f, int *s, int v3, struct mbuf **md,
caddr_t *dpos);
int nfsm_loadattr_xx(struct vnode **v, struct vattr *va, struct mbuf **md,
caddr_t *dpos);
-int nfsm_postop_attr_xx(struct vnode **v, int *f, struct mbuf **md,
- caddr_t *dpos);
+int nfsm_postop_attr_xx(struct vnode **v, int *f, struct vattr *va,
+ struct mbuf **md, caddr_t *dpos);
int nfsm_wcc_data_xx(struct vnode **v, int *f, struct mbuf **md,
caddr_t *dpos);
@@ -181,7 +181,14 @@ do { \
#define nfsm_postop_attr(v, f) \
do { \
int32_t t1; \
- t1 = nfsm_postop_attr_xx(&v, &f, &md, &dpos); \
+ t1 = nfsm_postop_attr_xx(&v, &f, NULL, &md, &dpos); \
+ nfsm_dcheck(t1, mrep); \
+} while (0)
+
+#define nfsm_postop_attr_va(v, f, va) \
+do { \
+ int32_t t1; \
+ t1 = nfsm_postop_attr_xx(&v, &f, va, &md, &dpos); \
nfsm_dcheck(t1, mrep); \
} while (0)
diff --git a/sys/nfsclient/nfsmount.h b/sys/nfsclient/nfsmount.h
index 6b84bdd..77171a1 100644
--- a/sys/nfsclient/nfsmount.h
+++ b/sys/nfsclient/nfsmount.h
@@ -83,6 +83,7 @@ struct nfsmount {
struct rpc_timers nm_timers[NFS_MAX_TIMER]; /* RTT Timers for rpcs */
char nm_principal[MNAMELEN]; /* GSS-API principal of server */
gss_OID nm_mech_oid; /* OID of selected GSS-API mechanism */
+ int nm_nametimeo; /* timeout for +ve entries (sec) */
int nm_negnametimeo; /* timeout for -ve entries (sec) */
/* NFSv4 */
@@ -116,6 +117,10 @@ struct nfsmount {
#define NFS_TPRINTF_DELAY 30
#endif
+#ifndef NFS_DEFAULT_NAMETIMEO
+#define NFS_DEFAULT_NAMETIMEO 60
+#endif
+
#ifndef NFS_DEFAULT_NEGNAMETIMEO
#define NFS_DEFAULT_NEGNAMETIMEO 60
#endif
diff --git a/sys/nfsclient/nfsnode.h b/sys/nfsclient/nfsnode.h
index 8e35fdd..60e5613 100644
--- a/sys/nfsclient/nfsnode.h
+++ b/sys/nfsclient/nfsnode.h
@@ -104,9 +104,6 @@ struct nfsnode {
time_t n_attrstamp; /* Attr. cache timestamp */
struct nfs_accesscache n_accesscache[NFS_ACCESSCACHESIZE];
struct timespec n_mtime; /* Prev modify time. */
- struct timespec n_ctime; /* Prev create time. */
- struct timespec n_dmtime; /* Prev dir modify time. */
- int n_dmtime_ticks; /* Tick of -ve cache entry */
nfsfh_t *n_fhp; /* NFS File Handle */
struct vnode *n_vnode; /* associated vnode */
struct vnode *n_dvp; /* parent vnode */
diff --git a/sys/nfsserver/nfs_serv.c b/sys/nfsserver/nfs_serv.c
index 3ee804d..e51c761 100644
--- a/sys/nfsserver/nfs_serv.c
+++ b/sys/nfsserver/nfs_serv.c
@@ -3454,7 +3454,12 @@ nfsrv_commit(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
}
for_ret = VOP_GETATTR(vp, &bfor, cred);
- if (cnt > MAX_COMMIT_COUNT) {
+ /*
+ * RFC 1813 3.3.21: if count is 0, a flush from offset to the end of file
+ * is done. At this time VOP_FSYNC does not accept offset and byte count
+ * parameters so call VOP_FSYNC the whole file for now.
+ */
+ if (cnt == 0 || cnt > MAX_COMMIT_COUNT) {
/*
* Give up and do the whole thing
*/
diff --git a/sys/ofed/drivers/infiniband/core/local_sa.c b/sys/ofed/drivers/infiniband/core/local_sa.c
index eb62c42..9b9c60a 100644
--- a/sys/ofed/drivers/infiniband/core/local_sa.c
+++ b/sys/ofed/drivers/infiniband/core/local_sa.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006 Intel Corporation.  All rights reserved.
+ * Copyright (c) 2006 Intel Corporation. All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
diff --git a/sys/ofed/drivers/infiniband/core/notice.c b/sys/ofed/drivers/infiniband/core/notice.c
index 4a8d98f..ca91d96d 100644
--- a/sys/ofed/drivers/infiniband/core/notice.c
+++ b/sys/ofed/drivers/infiniband/core/notice.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006 Intel Corporation.  All rights reserved.
+ * Copyright (c) 2006 Intel Corporation. All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
diff --git a/sys/ofed/include/asm/types.h b/sys/ofed/include/asm/types.h
index 70dd2be..5745727 100644
--- a/sys/ofed/include/asm/types.h
+++ b/sys/ofed/include/asm/types.h
@@ -30,17 +30,17 @@
typedef unsigned short umode_t;
-typedef __signed__ char __s8;
+typedef signed char __s8;
typedef unsigned char __u8;
-typedef __signed__ short __s16;
+typedef signed short __s16;
typedef unsigned short __u16;
-typedef __signed__ int __s32;
+typedef signed int __s32;
typedef unsigned int __u32;
#if defined(__GNUC__) // && !defined(__STRICT_ANSI__)
-typedef __signed__ long long __s64;
+typedef signed long long __s64;
typedef unsigned long long __u64;
#endif
diff --git a/sys/ofed/include/linux/types.h b/sys/ofed/include/linux/types.h
index 496d6f9..331c8b6 100644
--- a/sys/ofed/include/linux/types.h
+++ b/sys/ofed/include/linux/types.h
@@ -39,9 +39,11 @@ typedef __u32 __le32;
typedef __u32 __be32;
typedef __u64 __le64;
typedef __u64 __be64;
+#ifndef __bool_true_false_are_defined
typedef _Bool bool;
#define true TRUE
#define false FALSE
+#endif
typedef unsigned long kernel_ulong_t;
typedef unsigned int uint;
diff --git a/sys/pc98/cbus/scterm-sck.c b/sys/pc98/cbus/scterm-sck.c
index b4bf70f..5232b20 100644
--- a/sys/pc98/cbus/scterm-sck.c
+++ b/sys/pc98/cbus/scterm-sck.c
@@ -133,7 +133,7 @@ static void scterm_scan_esc(scr_stat *scp, term_stat *tcp,
static int mask2attr(term_stat *tcp);
#ifdef KANJI
-__inline static u_char
+static inline u_char
iskanji1(u_char mode, u_char c)
{
if (c > 0x80) {
@@ -186,7 +186,7 @@ iskanji1(u_char mode, u_char c)
return KTYPE_ASCII;
}
-__inline static u_char
+static inline u_char
iskanji2(u_char mode, u_char c)
{
switch (mode) {
diff --git a/sys/pc98/cbus/scvtb.c b/sys/pc98/cbus/scvtb.c
index 2d0ea3f..c25ef14 100644
--- a/sys/pc98/cbus/scvtb.c
+++ b/sys/pc98/cbus/scvtb.c
@@ -174,7 +174,7 @@ sc_vtb_geta(sc_vtb_t *vtb, int at)
return (*(u_int16_t *)(p + attr_offset(vtb)) & 0xff00);
}
-__inline static void
+static inline void
vtb_putc(sc_vtb_t *vtb, vm_offset_t p, int c, int a)
{
if (vtb->vtb_type == VTB_FRAMEBUFFER) {
diff --git a/sys/pc98/cbus/sio.c b/sys/pc98/cbus/sio.c
index 959726f..754d4ad 100644
--- a/sys/pc98/cbus/sio.c
+++ b/sys/pc98/cbus/sio.c
@@ -3460,6 +3460,8 @@ static cn_init_t sio_cninit;
static cn_term_t sio_cnterm;
static cn_getc_t sio_cngetc;
static cn_putc_t sio_cnputc;
+static cn_grab_t sio_cngrab;
+static cn_ungrab_t sio_cnungrab;
CONSOLE_DRIVER(sio);
@@ -3679,6 +3681,16 @@ sio_cnterm(cp)
comconsole = -1;
}
+static void
+sio_cngrab(struct consdev *cp)
+{
+}
+
+static void
+sio_cnungrab(struct consdev *cp)
+{
+}
+
static int
sio_cngetc(struct consdev *cd)
{
diff --git a/sys/pc98/conf/GENERIC b/sys/pc98/conf/GENERIC
index bc2dadb..bcc13e6 100644
--- a/sys/pc98/conf/GENERIC
+++ b/sys/pc98/conf/GENERIC
@@ -63,6 +63,8 @@ options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
options KBD_INSTALL_CDEV # install a CDEV entry in /dev
options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4)
options AUDIT # Security event auditing
+options CAPABILITY_MODE # Capsicum capability mode
+options CAPABILITIES # Capsicum capabilities
options MAC # TrustedBSD MAC Framework
options INCLUDE_CONFIG_FILE # Include this file in kernel
@@ -212,7 +214,7 @@ device xe # Xircom pccard Ethernet
#device wlan # 802.11 support
#options IEEE80211_DEBUG # enable debug msgs
#options IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's
-#options IEEE80211_SUPPORT_MESH # enable 802.11s draft support
+options IEEE80211_SUPPORT_MESH # enable 802.11s draft support
#device wlan_wep # 802.11 WEP support
#device wlan_ccmp # 802.11 CCMP support
#device wlan_tkip # 802.11 TKIP support
@@ -221,7 +223,7 @@ device xe # Xircom pccard Ethernet
#device ath # Atheros NIC's
#device ath_pci # Atheros pci/cardbus glue
#device ath_hal # pci/cardbus chip support
-#options AH_SUPPORT_AR5416 # enable AR5416 tx/rx descriptors
+options AH_SUPPORT_AR5416 # enable AR5416 tx/rx descriptors
#device ath_rate_sample # SampleRate tx rate control for ath
#device ral # Ralink Technology RT2500 wireless NICs.
#device wi # WaveLAN/Intersil/Symbol 802.11 wireless NICs.
diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c
index c9e1a91..9fdefaf 100644
--- a/sys/pc98/pc98/machdep.c
+++ b/sys/pc98/pc98/machdep.c
@@ -588,8 +588,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
sdp = &td->td_pcb->pcb_gsd;
sf.sf_uc.uc_mcontext.mc_gsbase = sdp->sd_hibase << 24 |
sdp->sd_lobase;
- bzero(sf.sf_uc.uc_mcontext.mc_spare1,
- sizeof(sf.sf_uc.uc_mcontext.mc_spare1));
+ sf.sf_uc.uc_mcontext.mc_flags = 0;
bzero(sf.sf_uc.uc_mcontext.mc_spare2,
sizeof(sf.sf_uc.uc_mcontext.mc_spare2));
bzero(sf.sf_uc.__spare__, sizeof(sf.sf_uc.__spare__));
@@ -2694,7 +2693,7 @@ get_mcontext(struct thread *td, mcontext_t *mcp, int flags)
mcp->mc_fsbase = sdp->sd_hibase << 24 | sdp->sd_lobase;
sdp = &td->td_pcb->pcb_gsd;
mcp->mc_gsbase = sdp->sd_hibase << 24 | sdp->sd_lobase;
- bzero(mcp->mc_spare1, sizeof(mcp->mc_spare1));
+ mcp->mc_flags = 0;
bzero(mcp->mc_spare2, sizeof(mcp->mc_spare2));
return (0);
}
diff --git a/sys/powerpc/aim/locore32.S b/sys/powerpc/aim/locore32.S
index 020d22d..9ad74fa 100644
--- a/sys/powerpc/aim/locore32.S
+++ b/sys/powerpc/aim/locore32.S
@@ -128,6 +128,17 @@ __start:
sync
isync
+ /* Zero bss, in case we were started by something unhelpful */
+ li 0,0
+ lis 8,_edata@ha
+ addi 8,8,_edata@l
+ lis 9,_end@ha
+ addi 9,9,_end@l
+2: stw 0,0(8)
+ addi 8,8,4
+ cmplw 8,9
+ blt 2b
+
/* Save the argument pointer and length */
mr 20,6
mr 21,7
diff --git a/sys/powerpc/aim/locore64.S b/sys/powerpc/aim/locore64.S
index 64e4e62..83d9048 100644
--- a/sys/powerpc/aim/locore64.S
+++ b/sys/powerpc/aim/locore64.S
@@ -115,7 +115,7 @@ kernel_text:
* segment!
*/
.text
-ASENTRY(__start)
+ASENTRY_NOPROF(__start)
li 8,0
li 9,0x100
mtctr 9
@@ -202,7 +202,7 @@ tocbase:
* or the (currently used) C code optimized, so it doesn't use any non-volatile
* registers.
*/
-ASENTRY(setfault)
+ASENTRY_NOPROF(setfault)
mflr 0
mfcr 12
mfsprg 4,0
diff --git a/sys/powerpc/aim/machdep.c b/sys/powerpc/aim/machdep.c
index 2049949..b31f15c 100644
--- a/sys/powerpc/aim/machdep.c
+++ b/sys/powerpc/aim/machdep.c
@@ -238,6 +238,7 @@ extern void *trapcode64;
extern void *rstcode, *rstsize;
#endif
extern void *trapcode, *trapsize;
+extern void *slbtrap, *slbtrapsize;
extern void *alitrap, *alisize;
extern void *dsitrap, *dsisize;
extern void *decrint, *decrsize;
@@ -490,8 +491,8 @@ powerpc_init(vm_offset_t startkernel, vm_offset_t endkernel,
bcopy(&dsitrap, (void *)(EXC_DSI + trap_offset), (size_t)&dsisize);
bcopy(generictrap, (void *)EXC_ISI, (size_t)&trapsize);
#ifdef __powerpc64__
- bcopy(generictrap, (void *)EXC_DSE, (size_t)&trapsize);
- bcopy(generictrap, (void *)EXC_ISE, (size_t)&trapsize);
+ bcopy(&slbtrap, (void *)EXC_DSE, (size_t)&slbtrapsize);
+ bcopy(&slbtrap, (void *)EXC_ISE, (size_t)&slbtrapsize);
#endif
bcopy(generictrap, (void *)EXC_EXI, (size_t)&trapsize);
bcopy(generictrap, (void *)EXC_FPU, (size_t)&trapsize);
@@ -499,6 +500,7 @@ powerpc_init(vm_offset_t startkernel, vm_offset_t endkernel,
bcopy(generictrap, (void *)EXC_SC, (size_t)&trapsize);
bcopy(generictrap, (void *)EXC_FPA, (size_t)&trapsize);
bcopy(generictrap, (void *)EXC_VEC, (size_t)&trapsize);
+ bcopy(generictrap, (void *)EXC_PERF, (size_t)&trapsize);
bcopy(generictrap, (void *)EXC_VECAST_G4, (size_t)&trapsize);
bcopy(generictrap, (void *)EXC_VECAST_G5, (size_t)&trapsize);
#ifndef __powerpc64__
diff --git a/sys/powerpc/aim/mmu_oea.c b/sys/powerpc/aim/mmu_oea.c
index 88ca0f7..5a8967d 100644
--- a/sys/powerpc/aim/mmu_oea.c
+++ b/sys/powerpc/aim/mmu_oea.c
@@ -153,6 +153,7 @@ __FBSDID("$FreeBSD$");
#include <machine/smp.h>
#include <machine/sr.h>
#include <machine/mmuvar.h>
+#include <machine/trap_aim.h>
#include "mmu_if.h"
@@ -759,6 +760,38 @@ moea_bootstrap(mmu_t mmup, vm_offset_t kernelstart, vm_offset_t kernelend)
phys_avail_count++;
physsz += regions[i].mr_size;
}
+
+ /* Check for overlap with the kernel and exception vectors */
+ for (j = 0; j < 2*phys_avail_count; j+=2) {
+ if (phys_avail[j] < EXC_LAST)
+ phys_avail[j] += EXC_LAST;
+
+ if (kernelstart >= phys_avail[j] &&
+ kernelstart < phys_avail[j+1]) {
+ if (kernelend < phys_avail[j+1]) {
+ phys_avail[2*phys_avail_count] =
+ (kernelend & ~PAGE_MASK) + PAGE_SIZE;
+ phys_avail[2*phys_avail_count + 1] =
+ phys_avail[j+1];
+ phys_avail_count++;
+ }
+
+ phys_avail[j+1] = kernelstart & ~PAGE_MASK;
+ }
+
+ if (kernelend >= phys_avail[j] &&
+ kernelend < phys_avail[j+1]) {
+ if (kernelstart > phys_avail[j]) {
+ phys_avail[2*phys_avail_count] = phys_avail[j];
+ phys_avail[2*phys_avail_count + 1] =
+ kernelstart & ~PAGE_MASK;
+ phys_avail_count++;
+ }
+
+ phys_avail[j] = (kernelend & ~PAGE_MASK) + PAGE_SIZE;
+ }
+ }
+
physmem = btoc(physsz);
/*
@@ -824,48 +857,48 @@ moea_bootstrap(mmu_t mmup, vm_offset_t kernelstart, vm_offset_t kernelend)
for (i = 0; i < 16; i++)
kernel_pmap->pm_sr[i] = EMPTY_SEGMENT + i;
CPU_FILL(&kernel_pmap->pm_active);
+ LIST_INIT(&kernel_pmap->pmap_pvo);
/*
* Set up the Open Firmware mappings
*/
- if ((chosen = OF_finddevice("/chosen")) == -1)
- panic("moea_bootstrap: can't find /chosen");
- OF_getprop(chosen, "mmu", &mmui, 4);
- if ((mmu = OF_instance_to_package(mmui)) == -1)
- panic("moea_bootstrap: can't get mmu package");
- if ((sz = OF_getproplen(mmu, "translations")) == -1)
- panic("moea_bootstrap: can't get ofw translation count");
- translations = NULL;
- for (i = 0; phys_avail[i] != 0; i += 2) {
- if (phys_avail[i + 1] >= sz) {
- translations = (struct ofw_map *)phys_avail[i];
- break;
+ chosen = OF_finddevice("/chosen");
+ if (chosen != -1 && OF_getprop(chosen, "mmu", &mmui, 4) != -1 &&
+ (mmu = OF_instance_to_package(mmui)) != -1 &&
+ (sz = OF_getproplen(mmu, "translations")) != -1) {
+ translations = NULL;
+ for (i = 0; phys_avail[i] != 0; i += 2) {
+ if (phys_avail[i + 1] >= sz) {
+ translations = (struct ofw_map *)phys_avail[i];
+ break;
+ }
}
- }
- if (translations == NULL)
- panic("moea_bootstrap: no space to copy translations");
- bzero(translations, sz);
- if (OF_getprop(mmu, "translations", translations, sz) == -1)
- panic("moea_bootstrap: can't get ofw translations");
- CTR0(KTR_PMAP, "moea_bootstrap: translations");
- sz /= sizeof(*translations);
- qsort(translations, sz, sizeof (*translations), om_cmp);
- for (i = 0; i < sz; i++) {
- CTR3(KTR_PMAP, "translation: pa=%#x va=%#x len=%#x",
- translations[i].om_pa, translations[i].om_va,
- translations[i].om_len);
+ if (translations == NULL)
+ panic("moea_bootstrap: no space to copy translations");
+ bzero(translations, sz);
+ if (OF_getprop(mmu, "translations", translations, sz) == -1)
+ panic("moea_bootstrap: can't get ofw translations");
+ CTR0(KTR_PMAP, "moea_bootstrap: translations");
+ sz /= sizeof(*translations);
+ qsort(translations, sz, sizeof (*translations), om_cmp);
+ for (i = 0; i < sz; i++) {
+ CTR3(KTR_PMAP, "translation: pa=%#x va=%#x len=%#x",
+ translations[i].om_pa, translations[i].om_va,
+ translations[i].om_len);
- /*
- * If the mapping is 1:1, let the RAM and device on-demand
- * BAT tables take care of the translation.
- */
- if (translations[i].om_va == translations[i].om_pa)
- continue;
+ /*
+ * If the mapping is 1:1, let the RAM and device
+ * on-demand BAT tables take care of the translation.
+ */
+ if (translations[i].om_va == translations[i].om_pa)
+ continue;
- /* Enter the pages */
- for (off = 0; off < translations[i].om_len; off += PAGE_SIZE)
- moea_kenter(mmup, translations[i].om_va + off,
- translations[i].om_pa + off);
+ /* Enter the pages */
+ for (off = 0; off < translations[i].om_len;
+ off += PAGE_SIZE)
+ moea_kenter(mmup, translations[i].om_va + off,
+ translations[i].om_pa + off);
+ }
}
/*
@@ -1582,6 +1615,7 @@ moea_pinit(mmu_t mmu, pmap_t pmap)
KASSERT((int)pmap < VM_MIN_KERNEL_ADDRESS, ("moea_pinit: virt pmap"));
PMAP_LOCK_INIT(pmap);
+ LIST_INIT(&pmap->pmap_pvo);
entropy = 0;
__asm __volatile("mftb %0" : "=r"(entropy));
@@ -1765,10 +1799,17 @@ moea_remove(mmu_t mmu, pmap_t pm, vm_offset_t sva, vm_offset_t eva)
vm_page_lock_queues();
PMAP_LOCK(pm);
- for (; sva < eva; sva += PAGE_SIZE) {
- pvo = moea_pvo_find_va(pm, sva, &pteidx);
- if (pvo != NULL) {
- moea_pvo_remove(pvo, pteidx);
+ if ((eva - sva)/PAGE_SIZE < 10) {
+ for (; sva < eva; sva += PAGE_SIZE) {
+ pvo = moea_pvo_find_va(pm, sva, &pteidx);
+ if (pvo != NULL)
+ moea_pvo_remove(pvo, pteidx);
+ }
+ } else {
+ LIST_FOREACH(pvo, &pm->pmap_pvo, pvo_plink) {
+ if (PVO_VADDR(pvo) < sva || PVO_VADDR(pvo) >= eva)
+ continue;
+ moea_pvo_remove(pvo, -1);
}
}
PMAP_UNLOCK(pm);
@@ -1931,6 +1972,11 @@ moea_pvo_enter(pmap_t pm, uma_zone_t zone, struct pvo_head *pvo_head,
moea_pte_create(&pvo->pvo_pte.pte, sr, va, pa | pte_lo);
/*
+ * Add to pmap list
+ */
+ LIST_INSERT_HEAD(&pm->pmap_pvo, pvo, pvo_plink);
+
+ /*
* Remember if the list was empty and therefore will be the first
* item.
*/
@@ -1996,9 +2042,10 @@ moea_pvo_remove(struct pvo_entry *pvo, int pteidx)
}
/*
- * Remove this PVO from the PV list.
+ * Remove this PVO from the PV and pmap lists.
*/
LIST_REMOVE(pvo, pvo_vlink);
+ LIST_REMOVE(pvo, pvo_plink);
/*
* Remove this from the overflow list and return it to the pool
diff --git a/sys/powerpc/aim/mmu_oea64.c b/sys/powerpc/aim/mmu_oea64.c
index 7500462..d58e8de 100644
--- a/sys/powerpc/aim/mmu_oea64.c
+++ b/sys/powerpc/aim/mmu_oea64.c
@@ -831,6 +831,7 @@ moea64_mid_bootstrap(mmu_t mmup, vm_offset_t kernelstart, vm_offset_t kernelend)
kernel_pmap->pmap_phys = kernel_pmap;
CPU_FILL(&kernel_pmap->pm_active);
+ LIST_INIT(&kernel_pmap->pmap_pvo);
PMAP_LOCK_INIT(kernel_pmap);
@@ -1401,7 +1402,6 @@ moea64_uma_page_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait)
* kmem allocation routines, calling kmem for a new address here
* can lead to multiply locking non-recursive mutexes.
*/
- static vm_pindex_t color;
vm_offset_t va;
vm_page_t m;
@@ -1421,7 +1421,7 @@ moea64_uma_page_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait)
pflags |= VM_ALLOC_ZERO;
for (;;) {
- m = vm_page_alloc(NULL, color++, pflags | VM_ALLOC_NOOBJ);
+ m = vm_page_alloc(NULL, 0, pflags | VM_ALLOC_NOOBJ);
if (m == NULL) {
if (wait & M_NOWAIT)
return (NULL);
@@ -1855,6 +1855,7 @@ void
moea64_pinit(mmu_t mmu, pmap_t pmap)
{
PMAP_LOCK_INIT(pmap);
+ LIST_INIT(&pmap->pmap_pvo);
pmap->pm_slb_tree_root = slb_alloc_tree();
pmap->pm_slb = slb_alloc_user_cache();
@@ -1868,6 +1869,7 @@ moea64_pinit(mmu_t mmu, pmap_t pmap)
uint32_t hash;
PMAP_LOCK_INIT(pmap);
+ LIST_INIT(&pmap->pmap_pvo);
if (pmap_bootstrapped)
pmap->pmap_phys = (pmap_t)moea64_kextract(mmu,
@@ -2034,10 +2036,18 @@ moea64_remove(mmu_t mmu, pmap_t pm, vm_offset_t sva, vm_offset_t eva)
vm_page_lock_queues();
PMAP_LOCK(pm);
- for (; sva < eva; sva += PAGE_SIZE) {
- pvo = moea64_pvo_find_va(pm, sva);
- if (pvo != NULL)
+ if ((eva - sva)/PAGE_SIZE < 10) {
+ for (; sva < eva; sva += PAGE_SIZE) {
+ pvo = moea64_pvo_find_va(pm, sva);
+ if (pvo != NULL)
+ moea64_pvo_remove(mmu, pvo);
+ }
+ } else {
+ LIST_FOREACH(pvo, &pm->pmap_pvo, pvo_plink) {
+ if (PVO_VADDR(pvo) < sva || PVO_VADDR(pvo) >= eva)
+ continue;
moea64_pvo_remove(mmu, pvo);
+ }
}
vm_page_unlock_queues();
PMAP_UNLOCK(pm);
@@ -2231,6 +2241,11 @@ moea64_pvo_enter(mmu_t mmu, pmap_t pm, uma_zone_t zone,
(uint64_t)(pa) | pte_lo, flags);
/*
+ * Add to pmap list
+ */
+ LIST_INSERT_HEAD(&pm->pmap_pvo, pvo, pvo_plink);
+
+ /*
* Remember if the list was empty and therefore will be the first
* item.
*/
@@ -2311,9 +2326,10 @@ moea64_pvo_remove(mmu_t mmu, struct pvo_entry *pvo)
}
/*
- * Remove this PVO from the PV list.
+ * Remove this PVO from the PV and pmap lists.
*/
LIST_REMOVE(pvo, pvo_vlink);
+ LIST_REMOVE(pvo, pvo_plink);
/*
* Remove this from the overflow list and return it to the pool
diff --git a/sys/powerpc/aim/slb.c b/sys/powerpc/aim/slb.c
index 1a5ce65..7f4b2ef 100644
--- a/sys/powerpc/aim/slb.c
+++ b/sys/powerpc/aim/slb.c
@@ -409,15 +409,11 @@ slb_alloc_tree(void)
/* Lock entries mapping kernel text and stacks */
-#define SLB_SPILLABLE(slbe) \
- (((slbe & SLBE_ESID_MASK) < VM_MIN_KERNEL_ADDRESS && \
- (slbe & SLBE_ESID_MASK) > 16*SEGMENT_LENGTH) || \
- (slbe & SLBE_ESID_MASK) > VM_MAX_KERNEL_ADDRESS)
void
slb_insert_kernel(uint64_t slbe, uint64_t slbv)
{
struct slb *slbcache;
- int i, j;
+ int i;
/* We don't want to be preempted while modifying the kernel map */
critical_enter();
@@ -437,15 +433,9 @@ slb_insert_kernel(uint64_t slbe, uint64_t slbv)
slbcache[USER_SLB_SLOT].slbe = 1;
}
- for (i = mftb() % n_slbs, j = 0; j < n_slbs; j++, i = (i+1) % n_slbs) {
- if (i == USER_SLB_SLOT)
- continue;
-
- if (SLB_SPILLABLE(slbcache[i].slbe))
- break;
- }
-
- KASSERT(j < n_slbs, ("All kernel SLB slots locked!"));
+ i = mftb() % n_slbs;
+ if (i == USER_SLB_SLOT)
+ i = (i+1) % n_slbs;
fillkernslb:
KASSERT(i != USER_SLB_SLOT,
diff --git a/sys/powerpc/aim/swtch64.S b/sys/powerpc/aim/swtch64.S
index c5cdcbc..489ec40 100644
--- a/sys/powerpc/aim/swtch64.S
+++ b/sys/powerpc/aim/swtch64.S
@@ -68,7 +68,7 @@
/*
* void cpu_throw(struct thread *old, struct thread *new)
*/
-ENTRY(cpu_throw)
+ENTRY_NOPROF(cpu_throw)
mr %r13, %r4
b cpu_switchin
@@ -79,7 +79,7 @@ ENTRY(cpu_throw)
*
* Switch to a new thread saving the current state in the old thread.
*/
-ENTRY(cpu_switch)
+ENTRY_NOPROF(cpu_switch)
ld %r6,TD_PCB(%r3) /* Get the old thread's PCB ptr */
std %r12,PCB_CONTEXT(%r6) /* Save the non-volatile GP regs.
These can now be used for scratch */
@@ -237,7 +237,7 @@ blocked_loop:
* savectx(pcb)
* Update pcb, saving current processor state
*/
-ENTRY(savectx)
+ENTRY_NOPROF(savectx)
std %r12,PCB_CONTEXT(%r3) /* Save the non-volatile GP regs. */
std %r13,PCB_CONTEXT+1*8(%r3)
std %r14,PCB_CONTEXT+2*8(%r3)
@@ -268,7 +268,8 @@ ENTRY(savectx)
* fork_trampoline()
* Set up the return from cpu_fork()
*/
-ENTRY(fork_trampoline)
+
+ENTRY_NOPROF(fork_trampoline)
ld %r3,CF_FUNC(%r1)
ld %r4,CF_ARG0(%r1)
ld %r5,CF_ARG1(%r1)
diff --git a/sys/powerpc/aim/trap.c b/sys/powerpc/aim/trap.c
index 93feb51..d419e43 100644
--- a/sys/powerpc/aim/trap.c
+++ b/sys/powerpc/aim/trap.c
@@ -34,6 +34,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include "opt_hwpmc_hooks.h"
+
#include <sys/param.h>
#include <sys/kdb.h>
#include <sys/proc.h>
@@ -49,6 +51,9 @@ __FBSDID("$FreeBSD$");
#include <sys/uio.h>
#include <sys/signalvar.h>
#include <sys/vmmeter.h>
+#ifdef HWPMC_HOOKS
+#include <sys/pmckern.h>
+#endif
#include <security/audit/audit.h>
@@ -83,7 +88,9 @@ static int handle_onfault(struct trapframe *frame);
static void syscall(struct trapframe *frame);
#ifdef __powerpc64__
-static int handle_slb_spill(pmap_t pm, vm_offset_t addr);
+ void handle_kernel_slb_spill(int, register_t, register_t);
+static int handle_user_slb_spill(pmap_t pm, vm_offset_t addr);
+extern int n_slbs;
#endif
int setfault(faultbuf); /* defined in locore.S */
@@ -159,6 +166,16 @@ trap(struct trapframe *frame)
CTR3(KTR_TRAP, "trap: %s type=%s (%s)", td->td_name,
trapname(type), user ? "user" : "kernel");
+#ifdef HWPMC_HOOKS
+ if (type == EXC_PERF && (pmc_intr != NULL)) {
+#ifdef notyet
+ (*pmc_intr)(PCPU_GET(cpuid), frame);
+ if (!user)
+ return;
+#endif
+ }
+ else
+#endif
if (user) {
td->td_pticks = 0;
td->td_frame = frame;
@@ -176,7 +193,7 @@ trap(struct trapframe *frame)
#ifdef __powerpc64__
case EXC_ISE:
case EXC_DSE:
- if (handle_slb_spill(&p->p_vmspace->vm_pmap,
+ if (handle_user_slb_spill(&p->p_vmspace->vm_pmap,
(type == EXC_ISE) ? frame->srr0 :
frame->cpu.aim.dar) != 0)
sig = SIGSEGV;
@@ -244,27 +261,20 @@ trap(struct trapframe *frame)
KASSERT(cold || td->td_ucred != NULL,
("kernel trap doesn't have ucred"));
switch (type) {
- case EXC_DSI:
- if (trap_pfault(frame, 0) == 0)
- return;
- break;
#ifdef __powerpc64__
case EXC_DSE:
if ((frame->cpu.aim.dar & SEGMENT_MASK) == USER_ADDR) {
__asm __volatile ("slbmte %0, %1" ::
- "r"(td->td_pcb->pcb_cpu.aim.usr_vsid),
- "r"(USER_SLB_SLBE));
+ "r"(td->td_pcb->pcb_cpu.aim.usr_vsid),
+ "r"(USER_SLB_SLBE));
return;
}
-
- /* FALLTHROUGH */
- case EXC_ISE:
- if (handle_slb_spill(kernel_pmap,
- (type == EXC_ISE) ? frame->srr0 :
- frame->cpu.aim.dar) != 0)
- panic("Fault handling kernel SLB miss");
- return;
+ break;
#endif
+ case EXC_DSI:
+ if (trap_pfault(frame, 0) == 0)
+ return;
+ break;
case EXC_MCHK:
if (handle_onfault(frame))
return;
@@ -311,8 +321,7 @@ printtrap(u_int vector, struct trapframe *frame, int isfatal, int user)
printf("%s %s trap:\n", isfatal ? "fatal" : "handled",
user ? "user" : "kernel");
printf("\n");
- printf(" exception = 0x%x (%s)\n", vector >> 8,
- trapname(vector));
+ printf(" exception = 0x%x (%s)\n", vector, trapname(vector));
switch (vector) {
case EXC_DSE:
case EXC_DSI:
@@ -471,8 +480,54 @@ syscall(struct trapframe *frame)
}
#ifdef __powerpc64__
+/* Handle kernel SLB faults -- runs in real mode, all seat belts off */
+void
+handle_kernel_slb_spill(int type, register_t dar, register_t srr0)
+{
+ struct slb *slbcache;
+ uint64_t slbe, slbv;
+ uint64_t esid, addr;
+ int i;
+
+ addr = (type == EXC_ISE) ? srr0 : dar;
+ slbcache = PCPU_GET(slb);
+ esid = (uintptr_t)addr >> ADDR_SR_SHFT;
+ slbe = (esid << SLBE_ESID_SHIFT) | SLBE_VALID;
+
+ /* See if the hardware flushed this somehow (can happen in LPARs) */
+ for (i = 0; i < n_slbs; i++)
+ if (slbcache[i].slbe == (slbe | (uint64_t)i))
+ return;
+
+ /* Not in the map, needs to actually be added */
+ slbv = kernel_va_to_slbv(addr);
+ if (slbcache[USER_SLB_SLOT].slbe == 0) {
+ for (i = 0; i < n_slbs; i++) {
+ if (i == USER_SLB_SLOT)
+ continue;
+ if (!(slbcache[i].slbe & SLBE_VALID))
+ goto fillkernslb;
+ }
+
+ if (i == n_slbs)
+ slbcache[USER_SLB_SLOT].slbe = 1;
+ }
+
+ /* Sacrifice a random SLB entry that is not the user entry */
+ i = mftb() % n_slbs;
+ if (i == USER_SLB_SLOT)
+ i = (i+1) % n_slbs;
+
+fillkernslb:
+ /* Write new entry */
+ slbcache[i].slbv = slbv;
+ slbcache[i].slbe = slbe | (uint64_t)i;
+
+ /* Trap handler will restore from cache on exit */
+}
+
static int
-handle_slb_spill(pmap_t pm, vm_offset_t addr)
+handle_user_slb_spill(pmap_t pm, vm_offset_t addr)
{
struct slb *user_entry;
uint64_t esid;
@@ -480,12 +535,6 @@ handle_slb_spill(pmap_t pm, vm_offset_t addr)
esid = (uintptr_t)addr >> ADDR_SR_SHFT;
- if (pm == kernel_pmap) {
- slb_insert_kernel((esid << SLBE_ESID_SHIFT) | SLBE_VALID,
- kernel_va_to_slbv(addr));
- return (0);
- }
-
PMAP_LOCK(pm);
user_entry = user_va_to_slb_entry(pm, addr);
diff --git a/sys/powerpc/aim/trap_subr64.S b/sys/powerpc/aim/trap_subr64.S
index 6f3a2de..8243dc7 100644
--- a/sys/powerpc/aim/trap_subr64.S
+++ b/sys/powerpc/aim/trap_subr64.S
@@ -112,6 +112,9 @@ restore_kernsrs:
* r31 scratch
* r1 kernel stack
* SRR0/1 as at start of trap
+ *
+ * NOTE: SPRG1 is never used while the MMU is on, making it safe to reuse
+ * in any real-mode fault handler, including those handling double faults.
*/
#define FRAME_SETUP(savearea) \
/* Have to enable translation to allow access of kernel stack: */ \
@@ -120,11 +123,11 @@ restore_kernsrs:
std %r30,(savearea+CPUSAVE_SRR0)(%r31); /* save SRR0 */ \
mfsrr1 %r30; \
std %r30,(savearea+CPUSAVE_SRR1)(%r31); /* save SRR1 */ \
+ mfsprg1 %r31; /* get saved SP (clears SPRG1) */ \
mfmsr %r30; \
ori %r30,%r30,(PSL_DR|PSL_IR|PSL_RI)@l; /* relocation on */ \
mtmsr %r30; /* stack can now be accessed */ \
isync; \
- mfsprg1 %r31; /* get saved SP */ \
stdu %r31,-(FRAMELEN+288)(%r1); /* save it in the callframe */ \
std %r0, FRAME_0+48(%r1); /* save r0 in the trapframe */ \
std %r31,FRAME_1+48(%r1); /* save SP " " */ \
@@ -201,7 +204,7 @@ restore_kernsrs:
mtctr %r4; \
mtxer %r5; \
mtlr %r6; \
- mtsprg1 %r7; /* save cr */ \
+ mtsprg2 %r7; /* save cr */ \
ld %r31,FRAME_31+48(%r1); /* restore r0-31 */ \
ld %r30,FRAME_30+48(%r1); \
ld %r29,FRAME_29+48(%r1); \
@@ -235,16 +238,15 @@ restore_kernsrs:
ld %r0, FRAME_0+48(%r1); \
ld %r1, FRAME_1+48(%r1); \
/* Can't touch %r1 from here on */ \
- mtsprg2 %r2; /* save r2 & r3 */ \
- mtsprg3 %r3; \
+ mtsprg3 %r3; /* save r3 */ \
/* Disable translation, machine check and recoverability: */ \
- mfmsr %r2; \
- andi. %r2,%r2,~(PSL_DR|PSL_IR|PSL_ME|PSL_RI)@l; \
- mtmsr %r2; \
+ mfmsr %r3; \
+ andi. %r3,%r3,~(PSL_DR|PSL_IR|PSL_ME|PSL_RI)@l; \
+ mtmsr %r3; \
isync; \
/* Decide whether we return to user mode: */ \
- GET_CPUINFO(%r2); \
- ld %r3,(savearea+CPUSAVE_SRR1)(%r2); \
+ GET_CPUINFO(%r3); \
+ ld %r3,(savearea+CPUSAVE_SRR1)(%r3); \
mtcr %r3; \
bf 17,1f; /* branch if PSL_PR is false */ \
/* Restore user SRs */ \
@@ -262,15 +264,15 @@ restore_kernsrs:
ld %r29,(savearea+CPUSAVE_R29)(%r3); \
ld %r28,(savearea+CPUSAVE_R28)(%r3); \
ld %r27,(savearea+CPUSAVE_R27)(%r3); \
-1: mfsprg1 %r2; /* restore cr */ \
- mtcr %r2; \
- GET_CPUINFO(%r2); \
- ld %r3,(savearea+CPUSAVE_SRR0)(%r2); /* restore srr0 */ \
+1: mfsprg2 %r3; /* restore cr */ \
+ mtcr %r3; \
+ GET_CPUINFO(%r3); \
+ ld %r3,(savearea+CPUSAVE_SRR0)(%r3); /* restore srr0 */ \
mtsrr0 %r3; \
- ld %r3,(savearea+CPUSAVE_SRR1)(%r2); /* restore srr1 */ \
+ GET_CPUINFO(%r3); \
+ ld %r3,(savearea+CPUSAVE_SRR1)(%r3); /* restore srr1 */ \
mtsrr1 %r3; \
- mfsprg2 %r2; /* restore r2 & r3 */ \
- mfsprg3 %r3
+ mfsprg3 %r3 /* restore r3 */
#ifdef SMP
/*
@@ -330,6 +332,151 @@ CNAME(trapcode):
CNAME(trapsize) = .-CNAME(trapcode)
/*
+ * For SLB misses: do special things for the kernel
+ *
+ * Note: SPRG1 is always safe to overwrite any time the MMU is on, which is
+ * the only time this can be called.
+ */
+ .globl CNAME(slbtrap),CNAME(slbtrapsize)
+CNAME(slbtrap):
+ mtsprg1 %r1 /* save SP */
+ GET_CPUINFO(%r1)
+ std %r2,(PC_SLBSAVE+16)(%r1)
+ mfcr %r2 /* save CR */
+ std %r2,(PC_SLBSAVE+104)(%r1)
+ mfsrr1 %r2 /* test kernel mode */
+ mtcr %r2
+ bf 17,1f /* branch if PSL_PR is false */
+ /* User mode */
+ ld %r2,(PC_SLBSAVE+104)(%r1) /* Restore CR */
+ mtcr %r2
+ ld %r2,(PC_SLBSAVE+16)(%r1) /* Restore R2 */
+ mflr %r1 /* Save the old LR in r1 */
+ mtsprg2 %r1 /* And then in SPRG2 */
+ li %r1, 0x80 /* How to get the vector from LR */
+ bla generictrap /* LR & SPRG3 is exception # */
+1: mflr %r2 /* Save the old LR in r2 */
+ bla kern_slbtrap
+CNAME(slbtrapsize) = .-CNAME(slbtrap)
+
+kern_slbtrap:
+ std %r2,(PC_SLBSAVE+136)(%r1) /* old LR */
+ std %r3,(PC_SLBSAVE+24)(%r1) /* save R3 */
+
+ /* Check if this needs to be handled as a regular trap (userseg miss) */
+ mflr %r2
+ andi. %r2,%r2,0xff80
+ cmpwi %r2,0x380
+ bne 1f
+ mfdar %r2
+ b 2f
+1: mfsrr0 %r2
+2: /* r2 now contains the fault address */
+ lis %r3,SEGMENT_MASK@highesta
+ ori %r3,%r3,SEGMENT_MASK@highera
+ sldi %r3,%r3,32
+ oris %r3,%r3,SEGMENT_MASK@ha
+ ori %r3,%r3,SEGMENT_MASK@l
+ and %r2,%r2,%r3 /* R2 = segment base address */
+ lis %r3,USER_ADDR@highesta
+ ori %r3,%r3,USER_ADDR@highera
+ sldi %r3,%r3,32
+ oris %r3,%r3,USER_ADDR@ha
+ ori %r3,%r3,USER_ADDR@l
+ cmpd %r2,%r3 /* Compare fault base to USER_ADDR */
+ bne 3f
+
+ /* User seg miss, handle as a regular trap */
+ ld %r2,(PC_SLBSAVE+104)(%r1) /* Restore CR */
+ mtcr %r2
+ ld %r2,(PC_SLBSAVE+16)(%r1) /* Restore R2,R3 */
+ ld %r3,(PC_SLBSAVE+24)(%r1)
+ ld %r1,(PC_SLBSAVE+136)(%r1) /* Save the old LR in r1 */
+ mtsprg2 %r1 /* And then in SPRG2 */
+ li %r1, 0x80 /* How to get the vector from LR */
+ b generictrap /* Retain old LR using b */
+
+3: /* Real kernel SLB miss */
+ std %r0,(PC_SLBSAVE+0)(%r1) /* free all volatile regs */
+ mfsprg1 %r2 /* Old R1 */
+ std %r2,(PC_SLBSAVE+8)(%r1)
+ /* R2,R3 already saved */
+ std %r4,(PC_SLBSAVE+32)(%r1)
+ std %r5,(PC_SLBSAVE+40)(%r1)
+ std %r6,(PC_SLBSAVE+48)(%r1)
+ std %r7,(PC_SLBSAVE+56)(%r1)
+ std %r8,(PC_SLBSAVE+64)(%r1)
+ std %r9,(PC_SLBSAVE+72)(%r1)
+ std %r10,(PC_SLBSAVE+80)(%r1)
+ std %r11,(PC_SLBSAVE+88)(%r1)
+ std %r12,(PC_SLBSAVE+96)(%r1)
+ /* CR already saved */
+ mfxer %r2 /* save XER */
+ std %r2,(PC_SLBSAVE+112)(%r1)
+ mflr %r2 /* save LR (SP already saved) */
+ std %r2,(PC_SLBSAVE+120)(%r1)
+ mfctr %r2 /* save CTR */
+ std %r2,(PC_SLBSAVE+128)(%r1)
+
+ /* Call handler */
+ addi %r1,%r1,PC_SLBSTACK-48+1024
+ li %r2,~15
+ and %r1,%r1,%r2
+ lis %r3,tocbase@ha
+ ld %r2,tocbase@l(%r3)
+ mflr %r3
+ andi. %r3,%r3,0xff80
+ mfdar %r4
+ mfsrr0 %r5
+ bl handle_kernel_slb_spill
+ nop
+
+ /* Save r28-31, restore r4-r12 */
+ GET_CPUINFO(%r1)
+ ld %r4,(PC_SLBSAVE+32)(%r1)
+ ld %r5,(PC_SLBSAVE+40)(%r1)
+ ld %r6,(PC_SLBSAVE+48)(%r1)
+ ld %r7,(PC_SLBSAVE+56)(%r1)
+ ld %r8,(PC_SLBSAVE+64)(%r1)
+ ld %r9,(PC_SLBSAVE+72)(%r1)
+ ld %r10,(PC_SLBSAVE+80)(%r1)
+ ld %r11,(PC_SLBSAVE+88)(%r1)
+ ld %r12,(PC_SLBSAVE+96)(%r1)
+ std %r28,(PC_SLBSAVE+64)(%r1)
+ std %r29,(PC_SLBSAVE+72)(%r1)
+ std %r30,(PC_SLBSAVE+80)(%r1)
+ std %r31,(PC_SLBSAVE+88)(%r1)
+
+ /* Restore kernel mapping */
+ bl restore_kernsrs
+
+ /* Restore remaining registers */
+ ld %r28,(PC_SLBSAVE+64)(%r1)
+ ld %r29,(PC_SLBSAVE+72)(%r1)
+ ld %r30,(PC_SLBSAVE+80)(%r1)
+ ld %r31,(PC_SLBSAVE+88)(%r1)
+
+ ld %r2,(PC_SLBSAVE+104)(%r1)
+ mtcr %r2
+ ld %r2,(PC_SLBSAVE+112)(%r1)
+ mtxer %r2
+ ld %r2,(PC_SLBSAVE+120)(%r1)
+ mtlr %r2
+ ld %r2,(PC_SLBSAVE+128)(%r1)
+ mtctr %r2
+ ld %r2,(PC_SLBSAVE+136)(%r1)
+ mtlr %r2
+
+ /* Restore r0-r3 */
+ ld %r0,(PC_SLBSAVE+0)(%r1)
+ ld %r2,(PC_SLBSAVE+16)(%r1)
+ ld %r3,(PC_SLBSAVE+24)(%r1)
+ mfsprg1 %r1
+
+ /* Back to whatever we were doing */
+ rfid
+
+/*
* For ALI: has to save DSISR and DAR
*/
.globl CNAME(alitrap),CNAME(alisize)
@@ -556,7 +703,7 @@ CNAME(asttrapexit):
/*
* Deliberate entry to dbtrap
*/
-ASENTRY(breakpoint)
+ASENTRY_NOPROF(breakpoint)
mtsprg1 %r1
mfmsr %r3
mtsrr1 %r3
diff --git a/sys/powerpc/aim/uma_machdep.c b/sys/powerpc/aim/uma_machdep.c
index 6b28d67..39deb43 100644
--- a/sys/powerpc/aim/uma_machdep.c
+++ b/sys/powerpc/aim/uma_machdep.c
@@ -51,7 +51,6 @@ SYSCTL_INT(_hw, OID_AUTO, uma_mdpages, CTLFLAG_RD, &hw_uma_mdpages, 0,
void *
uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait)
{
- static vm_pindex_t color;
void *va;
vm_page_t m;
int pflags;
@@ -65,7 +64,7 @@ uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait)
pflags |= VM_ALLOC_ZERO;
for (;;) {
- m = vm_page_alloc(NULL, color++, pflags | VM_ALLOC_NOOBJ);
+ m = vm_page_alloc(NULL, 0, pflags | VM_ALLOC_NOOBJ);
if (m == NULL) {
if (wait & M_NOWAIT)
return (NULL);
diff --git a/sys/powerpc/conf/GENERIC b/sys/powerpc/conf/GENERIC
index d0646c3..cc7045a 100644
--- a/sys/powerpc/conf/GENERIC
+++ b/sys/powerpc/conf/GENERIC
@@ -64,6 +64,8 @@ options SYSVSEM #SYSV-style semaphores
options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions
options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4)
options AUDIT # Security event auditing
+options CAPABILITY_MODE # Capsicum capability mode
+options CAPABILITIES # Capsicum capabilities
options MAC # TrustedBSD MAC Framework
options INCLUDE_CONFIG_FILE # Include this file in kernel
@@ -172,6 +174,10 @@ device cdce # Generic USB over Ethernet
device cue # CATC USB Ethernet
device kue # Kawasaki LSI USB Ethernet
+# Wireless NIC cards
+options IEEE80211_SUPPORT_MESH
+options AH_SUPPORT_AR5416
+
# FireWire support
device firewire # FireWire bus code
# sbp(4) works for some systems but causes boot failure on others
diff --git a/sys/powerpc/conf/GENERIC64 b/sys/powerpc/conf/GENERIC64
index e1e4aad..c7959b8 100644
--- a/sys/powerpc/conf/GENERIC64
+++ b/sys/powerpc/conf/GENERIC64
@@ -170,6 +170,10 @@ device cdce # Generic USB over Ethernet
device cue # CATC USB Ethernet
device kue # Kawasaki LSI USB Ethernet
+# Wireless NIC cards
+options IEEE80211_SUPPORT_MESH
+options AH_SUPPORT_AR5416
+
# FireWire support
device firewire # FireWire bus code
device sbp # SCSI over FireWire (Requires scbus and da)
diff --git a/sys/powerpc/include/_stdint.h b/sys/powerpc/include/_stdint.h
index 3e34966..a014ac6 100644
--- a/sys/powerpc/include/_stdint.h
+++ b/sys/powerpc/include/_stdint.h
@@ -65,6 +65,14 @@
#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
+#ifdef __LP64__
+#define __INT64_C(c) (c ## L)
+#define __UINT64_C(c) (c ## UL)
+#else
+#define __INT64_C(c) (c ## LL)
+#define __UINT64_C(c) (c ## ULL)
+#endif
+
/*
* ISO/IEC 9899:1999
* 7.18.2.1 Limits of exact-width integer types
@@ -73,19 +81,19 @@
#define INT8_MIN (-0x7f-1)
#define INT16_MIN (-0x7fff-1)
#define INT32_MIN (-0x7fffffff-1)
-#define INT64_MIN (-INT64_C(0x7fffffffffffffff)-1)
+#define INT64_MIN (-__INT64_C(0x7fffffffffffffff)-1)
/* Maximum values of exact-width signed integer types. */
#define INT8_MAX 0x7f
#define INT16_MAX 0x7fff
#define INT32_MAX 0x7fffffff
-#define INT64_MAX INT64_C(0x7fffffffffffffff)
+#define INT64_MAX __INT64_C(0x7fffffffffffffff)
/* Maximum values of exact-width unsigned integer types. */
#define UINT8_MAX 0xff
#define UINT16_MAX 0xffff
#define UINT32_MAX 0xffffffff
-#define UINT64_MAX UINT64_C(0xffffffffffffffff)
+#define UINT64_MAX __UINT64_C(0xffffffffffffffff)
/*
* ISO/IEC 9899:1999
diff --git a/sys/powerpc/include/_types.h b/sys/powerpc/include/_types.h
index b0b582e..8c09ae7 100644
--- a/sys/powerpc/include/_types.h
+++ b/sys/powerpc/include/_types.h
@@ -46,7 +46,7 @@
/*
* Basic types upon which most other types are built.
*/
-typedef __signed char __int8_t;
+typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef short __int16_t;
typedef unsigned short __uint16_t;
@@ -73,7 +73,7 @@ typedef unsigned long long __uint64_t;
*/
typedef __uint32_t __clock_t; /* clock()... */
typedef double __double_t;
-typedef double __float_t;
+typedef float __float_t;
#ifdef __LP64__
typedef __int64_t __critical_t;
typedef __int64_t __intfptr_t;
diff --git a/sys/powerpc/include/asm.h b/sys/powerpc/include/asm.h
index 0c6b6a5..bfc939b 100644
--- a/sys/powerpc/include/asm.h
+++ b/sys/powerpc/include/asm.h
@@ -76,15 +76,35 @@
#endif
#if defined(PROF) || (defined(_KERNEL) && defined(GPROF))
-# define _PROF_PROLOGUE mflr 0; stw 0,4(1); bl _mcount
+# ifdef __powerpc64__
+# define _PROF_PROLOGUE mflr 0; \
+ std 3,48(1); \
+ std 4,56(1); \
+ std 5,64(1); \
+ std 0,16(1); \
+ stdu 1,-112(1); \
+ bl _mcount; \
+ nop; \
+ ld 0,112+16(1); \
+ ld 3,112+48(1); \
+ ld 4,112+56(1); \
+ ld 5,112+64(1); \
+ mtlr 0; \
+ addi 1,1,112
+# else
+# define _PROF_PROLOGUE mflr 0; stw 0,4(1); bl _mcount
+# endif
#else
# define _PROF_PROLOGUE
#endif
-#define ENTRY(y) _ENTRY(CNAME(y)); _PROF_PROLOGUE
#define ASENTRY(y) _ENTRY(ASMNAME(y)); _PROF_PROLOGUE
+#define ENTRY(y) _ENTRY(CNAME(y)); _PROF_PROLOGUE
#define GLOBAL(y) _GLOBAL(CNAME(y))
+#define ASENTRY_NOPROF(y) _ENTRY(ASMNAME(y))
+#define ENTRY_NOPROF(y) _ENTRY(CNAME(y))
+
#define ASMSTR .asciz
#define RCSID(x) .text; .asciz x
diff --git a/sys/powerpc/include/float.h b/sys/powerpc/include/float.h
index ca6568f..50da262 100644
--- a/sys/powerpc/include/float.h
+++ b/sys/powerpc/include/float.h
@@ -42,12 +42,12 @@ extern int __flt_rounds(void);
__END_DECLS
#define FLT_ROUNDS __flt_rounds()
#else
-#define FLT_ROUNDS -1
+#define FLT_ROUNDS (-1)
#endif
#define FLT_RADIX 2 /* b */
#if __ISO_C_VISIBLE >= 1999
-#define FLT_EVAL_METHOD 1 /* operands promoted to double */
+#define FLT_EVAL_METHOD 0
#define DECIMAL_DIG 17 /* max precision in decimal digits */
#endif
@@ -60,6 +60,11 @@ __END_DECLS
#define FLT_MAX_EXP 128 /* emax */
#define FLT_MAX 3.40282347E+38F /* (1-b**(-p))*b**emax */
#define FLT_MAX_10_EXP 38 /* floor(log10((1-b**(-p))*b**emax)) */
+#if __ISO_C_VISIBLE >= 2011
+#define FLT_TRUE_MIN 1.40129846E-45F /* b**(emin-p) */
+#define FLT_DECIMAL_DIG 9 /* ceil(1+p*log10(b)) */
+#define FLT_HAS_SUBNORM 1
+#endif /* __ISO_C_VISIBLE >= 2011 */
#define DBL_MANT_DIG 53
#define DBL_EPSILON 2.2204460492503131E-16
@@ -70,15 +75,25 @@ __END_DECLS
#define DBL_MAX_EXP 1024
#define DBL_MAX 1.7976931348623157E+308
#define DBL_MAX_10_EXP 308
+#if __ISO_C_VISIBLE >= 2011
+#define DBL_TRUE_MIN 4.9406564584124654E-324
+#define DBL_DECIMAL_DIG 17
+#define DBL_HAS_SUBNORM 1
+#endif /* __ISO_C_VISIBLE >= 2011 */
#define LDBL_MANT_DIG DBL_MANT_DIG
-#define LDBL_EPSILON (long double)DBL_EPSILON
+#define LDBL_EPSILON ((long double)DBL_EPSILON)
#define LDBL_DIG DBL_DIG
#define LDBL_MIN_EXP DBL_MIN_EXP
-#define LDBL_MIN (long double)DBL_MIN
+#define LDBL_MIN ((long double)DBL_MIN)
#define LDBL_MIN_10_EXP DBL_MIN_10_EXP
#define LDBL_MAX_EXP DBL_MAX_EXP
-#define LDBL_MAX (long double)DBL_MAX
+#define LDBL_MAX ((long double)DBL_MAX)
#define LDBL_MAX_10_EXP DBL_MAX_10_EXP
+#if __ISO_C_VISIBLE >= 2011
+#define LDBL_TRUE_MIN ((long double)DBL_TRUE_MIN)
+#define LDBL_DECIMAL_DIG DBL_DECIMAL_DIG
+#define LDBL_HAS_SUBNORM DBL_HAS_SUBNORM
+#endif /* __ISO_C_VISIBLE >= 2011 */
#endif /* _MACHINE_FLOAT_H_ */
diff --git a/sys/powerpc/include/pcpu.h b/sys/powerpc/include/pcpu.h
index 2dac1b4..62094f8 100644
--- a/sys/powerpc/include/pcpu.h
+++ b/sys/powerpc/include/pcpu.h
@@ -55,7 +55,9 @@ struct pmap;
#define PCPU_MD_AIM64_FIELDS \
struct slb pc_slb[64]; \
- struct slb **pc_userslb;
+ struct slb **pc_userslb; \
+ register_t pc_slbsave[18]; \
+ uint8_t pc_slbstack[1024];
#ifdef __powerpc64__
#define PCPU_MD_AIM_FIELDS PCPU_MD_AIM64_FIELDS
diff --git a/sys/powerpc/include/pmap.h b/sys/powerpc/include/pmap.h
index 688975d..ca13c18 100644
--- a/sys/powerpc/include/pmap.h
+++ b/sys/powerpc/include/pmap.h
@@ -88,28 +88,13 @@ struct pmap_md {
#endif /* !defined(NPMAPS) */
struct slbtnode;
-
-struct pmap {
- struct mtx pm_mtx;
-
- #ifdef __powerpc64__
- struct slbtnode *pm_slb_tree_root;
- struct slb **pm_slb;
- int pm_slb_len;
- #else
- register_t pm_sr[16];
- #endif
- cpuset_t pm_active;
-
- struct pmap *pmap_phys;
- struct pmap_statistics pm_stats;
-};
-
+struct pmap;
typedef struct pmap *pmap_t;
struct pvo_entry {
LIST_ENTRY(pvo_entry) pvo_vlink; /* Link to common virt page */
LIST_ENTRY(pvo_entry) pvo_olink; /* Link to overflow entry */
+ LIST_ENTRY(pvo_entry) pvo_plink; /* Link to pmap entries */
union {
struct pte pte; /* 32 bit PTE */
struct lpte lpte; /* 64 bit PTE */
@@ -137,6 +122,23 @@ LIST_HEAD(pvo_head, pvo_entry);
((void)((pvo)->pvo_vaddr |= (i)|PVO_PTEGIDX_VALID))
#define PVO_VSID(pvo) ((pvo)->pvo_vpn >> 16)
+struct pmap {
+ struct mtx pm_mtx;
+
+ #ifdef __powerpc64__
+ struct slbtnode *pm_slb_tree_root;
+ struct slb **pm_slb;
+ int pm_slb_len;
+ #else
+ register_t pm_sr[16];
+ #endif
+ cpuset_t pm_active;
+
+ struct pmap *pmap_phys;
+ struct pmap_statistics pm_stats;
+ struct pvo_head pmap_pvo;
+};
+
struct md_page {
u_int64_t mdpg_attrs;
vm_memattr_t mdpg_cache_attrs;
diff --git a/sys/powerpc/include/pmc_mdep.h b/sys/powerpc/include/pmc_mdep.h
index 81a41fd..37531f2 100644
--- a/sys/powerpc/include/pmc_mdep.h
+++ b/sys/powerpc/include/pmc_mdep.h
@@ -7,6 +7,7 @@
#ifndef _MACHINE_PMC_MDEP_H_
#define _MACHINE_PMC_MDEP_H_
+#define PMC_MDEP_CLASS_INDEX_PPC7450 0
union pmc_md_op_pmcallocate {
uint64_t __pad[4];
};
@@ -17,7 +18,12 @@ union pmc_md_op_pmcallocate {
#if _KERNEL
+struct pmc_md_powerpc_pmc {
+ uint32_t pm_powerpc_evsel;
+};
+
union pmc_md_pmc {
+ struct pmc_md_powerpc_pmc pm_powerpc;
};
#define PMC_TRAPFRAME_TO_PC(TF) (0) /* Stubs */
diff --git a/sys/powerpc/include/profile.h b/sys/powerpc/include/profile.h
index a354e38..9192cee 100644
--- a/sys/powerpc/include/profile.h
+++ b/sys/powerpc/include/profile.h
@@ -85,6 +85,7 @@ __asm( " .text \n" \
"_mcount: \n" \
" .quad .L._mcount,.TOC.@tocbase,0\n" \
" .previous \n" \
+ " .size main,24 \n" \
" .type _mcount,@function \n" \
" .align 4 \n" \
".L._mcount: \n" \
diff --git a/sys/powerpc/include/spr.h b/sys/powerpc/include/spr.h
index 4f675c3..e356987 100644
--- a/sys/powerpc/include/spr.h
+++ b/sys/powerpc/include/spr.h
@@ -348,8 +348,8 @@
#define SPR_MMCR0_PMC1CE 0x00008000 /* PMC1 condition enable */
#define SPR_MMCR0_PMCNCE 0x00004000 /* PMCn condition enable */
#define SPR_MMCR0_TRIGGER 0x00002000 /* Trigger */
-#define SPR_MMCR0_PMC1SEL(x) ((x) << 6) /* PMC1 selector */
-#define SPR_MMCR0_PMC2SEL(x) ((x) << 0) /* PMC2 selector */
+#define SPR_MMCR0_PMC1SEL(x) (((x) & 0x3f) << 6) /* PMC1 selector */
+#define SPR_MMCR0_PMC2SEL(x) (((x) & 0x3f) << 0) /* PMC2 selector */
#define SPR_970MMCR0_PMC1SEL(x) ((x) << 8) /* PMC1 selector (970) */
#define SPR_970MMCR0_PMC2SEL(x) ((x) << 1) /* PMC2 selector (970) */
#define SPR_SGR 0x3b9 /* 4.. Storage Guarded Register */
@@ -359,10 +359,10 @@
#define SPR_SLER 0x3bb /* 4.. Storage Little Endian Register */
#define SPR_SIA 0x3bb /* .6. Sampled Instruction Address */
#define SPR_MMCR1 0x3bc /* .6. Monitor Mode Control Register 2 */
-#define SPR_MMCR1_PMC3SEL(x) ((x) << 27) /* PMC 3 selector */
-#define SPR_MMCR1_PMC4SEL(x) ((x) << 22) /* PMC 4 selector */
-#define SPR_MMCR1_PMC5SEL(x) ((x) << 17) /* PMC 5 selector */
-#define SPR_MMCR1_PMC6SEL(x) ((x) << 11) /* PMC 6 selector */
+#define SPR_MMCR1_PMC3SEL(x) (((x) & 0x1f) << 27) /* PMC 3 selector */
+#define SPR_MMCR1_PMC4SEL(x) (((x) & 0x1f) << 22) /* PMC 4 selector */
+#define SPR_MMCR1_PMC5SEL(x) (((x) & 0x1f) << 17) /* PMC 5 selector */
+#define SPR_MMCR1_PMC6SEL(x) (((x) & 0x3f) << 11) /* PMC 6 selector */
#define SPR_SU0R 0x3bc /* 4.. Storage User-defined 0 Register */
#define SPR_PMC3 0x3bd /* .6. Performance Counter Register 3 */
diff --git a/sys/powerpc/include/vmparam.h b/sys/powerpc/include/vmparam.h
index cec455f..36afd1f 100644
--- a/sys/powerpc/include/vmparam.h
+++ b/sys/powerpc/include/vmparam.h
@@ -57,29 +57,34 @@
#define MAXSSIZ (64*1024*1024) /* max stack size */
#endif
+#ifdef AIM
+#define VM_MAXUSER_ADDRESS32 ((vm_offset_t)0xfffff000)
+#else
+#define VM_MAXUSER_ADDRESS32 ((vm_offset_t)0x7ffff000)
+#endif
+
/*
* Would like to have MAX addresses = 0, but this doesn't (currently) work
*/
#if !defined(LOCORE)
#ifdef __powerpc64__
#define VM_MIN_ADDRESS (0x0000000000000000UL)
-#define VM_MAXUSER_ADDRESS (0x7ffffffffffff000UL)
-#define SHAREDPAGE (VM_MAXUSER_ADDRESS - PAGE_SIZE)
+#define VM_MAXUSER_ADDRESS (0xfffffffffffff000UL)
#define VM_MAX_ADDRESS (0xffffffffffffffffUL)
#else
#define VM_MIN_ADDRESS ((vm_offset_t)0)
-#define VM_MAXUSER_ADDRESS ((vm_offset_t)0x7ffff000)
-#define SHAREDPAGE (VM_MAXUSER_ADDRESS - PAGE_SIZE)
-#define VM_MAX_ADDRESS VM_MAXUSER_ADDRESS
+#define VM_MAXUSER_ADDRESS VM_MAXUSER_ADDRESS32
+#define VM_MAX_ADDRESS ((vm_offset_t)0xffffffff)
#endif
+#define SHAREDPAGE (VM_MAXUSER_ADDRESS - PAGE_SIZE)
#else /* LOCORE */
-#ifndef __powerpc64__
+#if !defined(__powerpc64__) && defined(E500)
#define VM_MIN_ADDRESS 0
#define VM_MAXUSER_ADDRESS 0x7ffff000
#endif
#endif /* LOCORE */
-#define FREEBSD32_SHAREDPAGE (0x7ffff000 - PAGE_SIZE)
+#define FREEBSD32_SHAREDPAGE (VM_MAXUSER_ADDRESS32 - PAGE_SIZE)
#define FREEBSD32_USRSTACK FREEBSD32_SHAREDPAGE
#ifdef AIM
diff --git a/sys/powerpc/mambo/mambo_console.c b/sys/powerpc/mambo/mambo_console.c
index 880ef57..c8b0ad7 100644
--- a/sys/powerpc/mambo/mambo_console.c
+++ b/sys/powerpc/mambo/mambo_console.c
@@ -69,6 +69,8 @@ static cn_init_t mambo_cninit;
static cn_term_t mambo_cnterm;
static cn_getc_t mambo_cngetc;
static cn_putc_t mambo_cnputc;
+static cn_grab_t mambo_cngrab;
+static cn_ungrab_t mambo_cnungrab;
CONSOLE_DRIVER(mambo);
@@ -146,6 +148,16 @@ mambo_cnterm(struct consdev *cp)
{
}
+static void
+mambo_cngrab(struct consdev *cp)
+{
+}
+
+static void
+mambo_cnungrab(struct consdev *cp)
+{
+}
+
static int
mambo_cngetc(struct consdev *cp)
{
diff --git a/sys/powerpc/ofw/ofw_machdep.c b/sys/powerpc/ofw/ofw_machdep.c
index fcdc953..448393d 100644
--- a/sys/powerpc/ofw/ofw_machdep.c
+++ b/sys/powerpc/ofw/ofw_machdep.c
@@ -171,10 +171,10 @@ parse_ofw_memory(phandle_t node, const char *prop, struct mem_region *output)
*/
phandle = OF_finddevice("/");
if (OF_getprop(phandle, "#address-cells", &address_cells,
- sizeof(address_cells)) < sizeof(address_cells))
+ sizeof(address_cells)) < (ssize_t)sizeof(address_cells))
address_cells = 1;
if (OF_getprop(phandle, "#size-cells", &size_cells,
- sizeof(size_cells)) < sizeof(size_cells))
+ sizeof(size_cells)) < (ssize_t)sizeof(size_cells))
size_cells = 1;
/*
diff --git a/sys/powerpc/ofw/ofwcall64.S b/sys/powerpc/ofw/ofwcall64.S
index 1fb78e8..beb6bdc 100644
--- a/sys/powerpc/ofw/ofwcall64.S
+++ b/sys/powerpc/ofw/ofwcall64.S
@@ -56,7 +56,7 @@ GLOBAL(rtas_entry)
* Open Firmware Real-mode Entry Point. This is a huge pain.
*/
-ASENTRY(ofwcall)
+ASENTRY_NOPROF(ofwcall)
mflr %r0
std %r0,16(%r1)
stdu %r1,-208(%r1)
@@ -175,7 +175,7 @@ ASENTRY(ofwcall)
* C prototype: int rtascall(void *callbuffer, void *rtas_privdat);
*/
-ASENTRY(rtascall)
+ASENTRY_NOPROF(rtascall)
mflr %r0
std %r0,16(%r1)
stdu %r1,-208(%r1)
diff --git a/sys/powerpc/powermac/macio.c b/sys/powerpc/powermac/macio.c
index 7b38060..eae6386 100644
--- a/sys/powerpc/powermac/macio.c
+++ b/sys/powerpc/powermac/macio.c
@@ -293,7 +293,7 @@ macio_attach(device_t dev)
* Locate the device node and it's base address
*/
if (OF_getprop(root, "assigned-addresses",
- reg, sizeof(reg)) < sizeof(reg)) {
+ reg, sizeof(reg)) < (ssize_t)sizeof(reg)) {
return (ENXIO);
}
diff --git a/sys/powerpc/powermac/windtunnel.c b/sys/powerpc/powermac/windtunnel.c
index b4aeca3..6a28a73 100644
--- a/sys/powerpc/powermac/windtunnel.c
+++ b/sys/powerpc/powermac/windtunnel.c
@@ -59,8 +59,7 @@ struct adm1030_softc {
device_t sc_dev;
struct intr_config_hook enum_hook;
uint32_t sc_addr;
- phandle_t sc_thermostat_phandle;
- device_t sc_thermostat_dev;
+ int sc_pwm;
};
/* Regular bus attachment functions */
@@ -70,7 +69,8 @@ static int adm1030_attach(device_t);
/* Utility functions */
static void adm1030_start(void *xdev);
static int adm1030_write_byte(device_t dev, uint32_t addr, uint8_t reg, uint8_t buf);
-static int adm1030_set(struct adm1030_softc *fan, int pwm);
+static int adm1030_set(struct adm1030_softc *fan, int pwm);
+static int adm1030_sysctl(SYSCTL_HANDLER_ARGS);
static device_method_t adm1030_methods[] = {
/* Device interface */
@@ -151,6 +151,8 @@ static int
adm1030_attach(device_t dev)
{
struct adm1030_softc *sc;
+ struct sysctl_ctx_list *ctx;
+ struct sysctl_oid *tree;
sc = device_get_softc(dev);
@@ -158,17 +160,19 @@ adm1030_attach(device_t dev)
sc->enum_hook.ich_arg = dev;
/*
- * We have to wait until interrupts are enabled. I2C read and write
- * only works if the interrupts are available. The unin/i2c is
- * controlled by the htpic on unin. But this is not the master. The
- * openpic on mac-io is controlling the htpic. This one gets attached
- * after the mac-io probing and then the interrupts will be
- * available.
+ * Wait until interrupts are available, which won't be until the openpic is
+ * intialized.
*/
if (config_intrhook_establish(&sc->enum_hook) != 0)
return (ENOMEM);
+ ctx = device_get_sysctl_ctx(dev);
+ tree = device_get_sysctl_tree(dev);
+ SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "pwm",
+ CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, dev,
+ 0, adm1030_sysctl, "I", "Fan PWM Rate");
+
return (0);
}
@@ -188,7 +192,7 @@ adm1030_start(void *xdev)
/* Use the RPM fields as PWM duty cycles. */
sc->fan.min_rpm = 0;
- sc->fan.max_rpm = 15;
+ sc->fan.max_rpm = 0x0F;
sc->fan.default_rpm = 2;
strcpy(sc->fan.name, "MDD Case fan");
@@ -211,6 +215,26 @@ static int adm1030_set(struct adm1030_softc *fan, int pwm)
if (adm1030_write_byte(fan->sc_dev, fan->sc_addr, 0x22, pwm) < 0)
return (-1);
+ fan->sc_pwm = pwm;
return (0);
}
+static int
+adm1030_sysctl(SYSCTL_HANDLER_ARGS)
+{
+ device_t adm1030;
+ struct adm1030_softc *sc;
+ int pwm, error;
+
+ adm1030 = arg1;
+ sc = device_get_softc(adm1030);
+
+ pwm = sc->sc_pwm;
+
+ error = sysctl_handle_int(oidp, &pwm, 0, req);
+
+ if (error || !req->newptr)
+ return (error);
+
+ return (adm1030_set(sc, pwm));
+}
diff --git a/sys/powerpc/powerpc/atomic.S b/sys/powerpc/powerpc/atomic.S
index c6f669a..4d0d1c6 100644
--- a/sys/powerpc/powerpc/atomic.S
+++ b/sys/powerpc/powerpc/atomic.S
@@ -30,7 +30,7 @@
.text
-ASENTRY(atomic_set_8)
+ASENTRY_NOPROF(atomic_set_8)
0: lwarx 0, 0, 3 /* load old value */
slwi 4, 4, 24 /* shift the byte so it's in the right place */
or 0, 0, 4 /* generate new value */
@@ -40,7 +40,7 @@ ASENTRY(atomic_set_8)
sync
blr /* return */
-ASENTRY(atomic_clear_8)
+ASENTRY_NOPROF(atomic_clear_8)
0: lwarx 0, 0, 3 /* load old value */
slwi 4, 4, 24 /* shift the byte so it's in the right place */
andc 0, 0, 4 /* generate new value */
@@ -50,7 +50,7 @@ ASENTRY(atomic_clear_8)
sync
blr /* return */
-ASENTRY(atomic_add_8)
+ASENTRY_NOPROF(atomic_add_8)
0: lwarx 9, 0, 3 /* load old value */
srwi 0, 9, 24 /* byte alignment */
add 0, 4, 0 /* calculate new value */
@@ -63,7 +63,7 @@ ASENTRY(atomic_add_8)
sync
blr /* return */
-ASENTRY(atomic_subtract_8)
+ASENTRY_NOPROF(atomic_subtract_8)
0: lwarx 9, 0, 3 /* load old value */
srwi 0, 9, 24 /* byte alignment */
subf 0, 4, 0 /* calculate new value */
@@ -76,7 +76,7 @@ ASENTRY(atomic_subtract_8)
sync
blr /* return */
-ASENTRY(atomic_set_16)
+ASENTRY_NOPROF(atomic_set_16)
li 11, 3 /* mask to test for alignment */
andc. 11, 3, 11 /* force address to be word-aligned */
0: lwarx 12, 0, 11 /* load old value */
@@ -89,7 +89,7 @@ ASENTRY(atomic_set_16)
sync
blr /* return */
-ASENTRY(atomic_clear_16)
+ASENTRY_NOPROF(atomic_clear_16)
li 11, 3 /* mask to test for alignment */
andc. 11, 3, 11 /* force address to be word-aligned */
0: lwarx 12, 0, 11 /* load old value */
@@ -102,7 +102,7 @@ ASENTRY(atomic_clear_16)
sync
blr /* return */
-ASENTRY(atomic_add_16)
+ASENTRY_NOPROF(atomic_add_16)
li 11, 3 /* mask to test for alignment */
andc. 11, 3, 11 /* force address to be word-aligned */
0: lwarx 12, 0, 11 /* load old value */
@@ -119,7 +119,7 @@ ASENTRY(atomic_add_16)
sync
blr /* return */
-ASENTRY(atomic_subtract_16)
+ASENTRY_NOPROF(atomic_subtract_16)
li 11, 3 /* mask to test for alignment */
andc. 11, 3, 11 /* force address to be word-aligned */
0: lwarx 12, 0, 11 /* load old value */
diff --git a/sys/powerpc/powerpc/busdma_machdep.c b/sys/powerpc/powerpc/busdma_machdep.c
index 9ebc097..7f9f8ec 100644
--- a/sys/powerpc/powerpc/busdma_machdep.c
+++ b/sys/powerpc/powerpc/busdma_machdep.c
@@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$");
#include <machine/atomic.h>
#include <machine/bus.h>
+#include <machine/cpufunc.h>
#include <machine/md_var.h>
#include "iommu_if.h"
@@ -979,6 +980,8 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op)
dmat->bounce_zone->total_bounced++;
}
}
+
+ powerpc_sync();
}
static void
diff --git a/sys/powerpc/powerpc/genassym.c b/sys/powerpc/powerpc/genassym.c
index 9f59498..e228b10 100644
--- a/sys/powerpc/powerpc/genassym.c
+++ b/sys/powerpc/powerpc/genassym.c
@@ -107,8 +107,11 @@ ASSYM(USER_ADDR, USER_ADDR);
#ifdef __powerpc64__
ASSYM(PC_KERNSLB, offsetof(struct pcpu, pc_slb));
ASSYM(PC_USERSLB, offsetof(struct pcpu, pc_userslb));
+ASSYM(PC_SLBSAVE, offsetof(struct pcpu, pc_slbsave));
+ASSYM(PC_SLBSTACK, offsetof(struct pcpu, pc_slbstack));
ASSYM(USER_SLB_SLOT, USER_SLB_SLOT);
ASSYM(USER_SLB_SLBE, USER_SLB_SLBE);
+ASSYM(SEGMENT_MASK, SEGMENT_MASK);
#else
ASSYM(PM_SR, offsetof(struct pmap, pm_sr));
ASSYM(USER_SR, USER_SR);
diff --git a/sys/powerpc/powerpc/setjmp.S b/sys/powerpc/powerpc/setjmp.S
index 3f6d259..3884b11 100644
--- a/sys/powerpc/powerpc/setjmp.S
+++ b/sys/powerpc/powerpc/setjmp.S
@@ -42,7 +42,7 @@
#define JMP_xer 24*REGWIDTH
#define JMP_sig 25*REGWIDTH
-ASENTRY(setjmp)
+ASENTRY_NOPROF(setjmp)
ST_REG 31, JMP_r31(3)
/* r1, r2, r14-r30 */
ST_REG 1, JMP_r1 (3)
@@ -79,7 +79,7 @@ ASENTRY(setjmp)
.extern sigsetmask
-ASENTRY(longjmp)
+ASENTRY_NOPROF(longjmp)
LD_REG 31, JMP_r31(3)
/* r1, r2, r14-r30 */
LD_REG 1, JMP_r1 (3)
diff --git a/sys/powerpc/ps3/ehci_ps3.c b/sys/powerpc/ps3/ehci_ps3.c
index c85c9bb..d516160 100644
--- a/sys/powerpc/ps3/ehci_ps3.c
+++ b/sys/powerpc/ps3/ehci_ps3.c
@@ -152,14 +152,17 @@ static device_method_t ehci_ps3_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, ehci_ps3_probe),
DEVMETHOD(device_attach, ehci_ps3_attach),
+ DEVMETHOD(device_resume, bus_generic_resume),
+ DEVMETHOD(device_suspend, bus_generic_suspend),
+ DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD_END
};
static driver_t ehci_ps3_driver = {
- "ehci",
- ehci_ps3_methods,
- sizeof(ehci_softc_t),
+ .name = "ehci",
+ .methods = ehci_ps3_methods,
+ .size = sizeof(ehci_softc_t),
};
static devclass_t ehci_ps3_devclass;
diff --git a/sys/powerpc/ps3/ohci_ps3.c b/sys/powerpc/ps3/ohci_ps3.c
index c16daba..a047617 100644
--- a/sys/powerpc/ps3/ohci_ps3.c
+++ b/sys/powerpc/ps3/ohci_ps3.c
@@ -150,14 +150,17 @@ static device_method_t ohci_ps3_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, ohci_ps3_probe),
DEVMETHOD(device_attach, ohci_ps3_attach),
+ DEVMETHOD(device_resume, bus_generic_resume),
+ DEVMETHOD(device_suspend, bus_generic_suspend),
+ DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD_END
};
static driver_t ohci_ps3_driver = {
- "ohci",
- ohci_ps3_methods,
- sizeof(ohci_softc_t),
+ .name = "ohci",
+ .methods = ohci_ps3_methods,
+ .size = sizeof(ohci_softc_t),
};
static devclass_t ohci_ps3_devclass;
diff --git a/sys/powerpc/ps3/platform_ps3.c b/sys/powerpc/ps3/platform_ps3.c
index cb22cc3..f06c2cf 100644
--- a/sys/powerpc/ps3/platform_ps3.c
+++ b/sys/powerpc/ps3/platform_ps3.c
@@ -247,16 +247,6 @@ ps3_real_maxaddr(platform_t plat)
static void
ps3_cpu_idle(void)
{
- static volatile int pausing = 0;
-
- /*
- * XXX: It appears that the PS3 can livelock if both threads
- * call lv1_pause(0) simultaneously.
- */
- if (!atomic_cmpset_int(&pausing, 0, 1))
- return;
-
lv1_pause(0);
- pausing = 0;
}
diff --git a/sys/powerpc/ps3/ps3-hv-asm.awk b/sys/powerpc/ps3/ps3-hv-asm.awk
index 21241a8..8b8165b 100644
--- a/sys/powerpc/ps3/ps3-hv-asm.awk
+++ b/sys/powerpc/ps3/ps3-hv-asm.awk
@@ -9,6 +9,7 @@
# $FreeBSD$
BEGIN {
+ printf("/* $FreeBSD$ */\n\n");
printf("#include <machine/asm.h>\n\n");
printf("#define hc .long 0x44000022\n\n");
}
diff --git a/sys/powerpc/ps3/ps3-hvcall.S b/sys/powerpc/ps3/ps3-hvcall.S
index 135c601..6a99264 100644
--- a/sys/powerpc/ps3/ps3-hvcall.S
+++ b/sys/powerpc/ps3/ps3-hvcall.S
@@ -1081,13 +1081,25 @@ ASENTRY(lv1_gpu_memory_free)
ASENTRY(lv1_gpu_context_allocate)
mflr %r0
std %r0,16(%r1)
- stdu %r1,-56(%r1)
+ stdu %r1,-88(%r1)
std %r5,48(%r1)
+ std %r6,56(%r1)
+ std %r7,64(%r1)
+ std %r8,72(%r1)
+ std %r9,80(%r1)
li %r11,217
hc
extsw %r3,%r3
ld %r11,48(%r1)
std %r4,0(%r11)
+ ld %r11,56(%r1)
+ std %r5,0(%r11)
+ ld %r11,64(%r1)
+ std %r6,0(%r11)
+ ld %r11,72(%r1)
+ std %r7,0(%r11)
+ ld %r11,80(%r1)
+ std %r8,0(%r11)
ld %r1,0(%r1)
ld %r0,16(%r1)
mtlr %r0
@@ -1144,6 +1156,18 @@ ASENTRY(lv1_gpu_context_intr)
mtlr %r0
blr
+ASENTRY(lv1_gpu_attribute)
+ mflr %r0
+ std %r0,16(%r1)
+ stdu %r1,-48(%r1)
+ li %r11,228
+ hc
+ extsw %r3,%r3
+ ld %r1,0(%r1)
+ ld %r0,16(%r1)
+ mtlr %r0
+ blr
+
ASENTRY(lv1_get_rtc)
mflr %r0
std %r0,16(%r1)
diff --git a/sys/powerpc/ps3/ps3-hvcall.h b/sys/powerpc/ps3/ps3-hvcall.h
index 0875a62..c2e45d2 100644
--- a/sys/powerpc/ps3/ps3-hvcall.h
+++ b/sys/powerpc/ps3/ps3-hvcall.h
@@ -124,11 +124,12 @@ int lv1_gpu_device_map(uint64_t dev, uint64_t *lpar_addr, uint64_t *lpar_size);
int lv1_gpu_device_unmap(uint64_t dev);
int lv1_gpu_memory_allocate(uint64_t ddr_size, uint64_t zero1, uint64_t zero2, uint64_t zero3, uint64_t zero4, uint64_t *handle, uint64_t *ddr_lpar);
int lv1_gpu_memory_free(uint64_t handle);
-int lv1_gpu_context_allocate(uint64_t handle, uint64_t , uint64_t *zero);
+int lv1_gpu_context_allocate(uint64_t handle, uint64_t flags, uint64_t *chandle, uint64_t *lpar_dma_control, uint64_t *lpar_driver_info, uint64_t *lpar_reports, uint64_t *lpar_reports_size);
int lv1_gpu_context_free(uint64_t chandle);
int lv1_gpu_context_iomap(uint64_t changle, uint64_t gpu_ioif, uint64_t xdr_lpar, uint64_t fbsize, uint64_t ioflags);
int lv1_gpu_context_attribute(uint64_t chandle, uint64_t op, uint64_t p1, uint64_t p2, uint64_t p3, uint64_t p4);
int lv1_gpu_context_intr(uint64_t chandle, uint64_t *v1);
+int lv1_gpu_attribute(uint64_t p1, uint64_t p2, uint64_t p3, uint64_t p4, uint64_t p5);
int lv1_get_rtc(uint64_t *rtc_val, uint64_t *timebase);
int lv1_storage_read(uint64_t dev, uint64_t region, uint64_t sector, uint64_t nsectors, uint64_t flags, uint64_t buf, uint64_t *dma_tag);
int lv1_storage_write(uint64_t dev, uint64_t region, uint64_t sector, uint64_t nsectors, uint64_t flags, uint64_t buf, uint64_t *dma_tag);
diff --git a/sys/powerpc/ps3/ps3-hvcall.master b/sys/powerpc/ps3/ps3-hvcall.master
index a9abe94..d4b7a0a 100644
--- a/sys/powerpc/ps3/ps3-hvcall.master
+++ b/sys/powerpc/ps3/ps3-hvcall.master
@@ -125,11 +125,12 @@ HVCALL 212 lv1_gpu_device_map dev lpar_addr,lpar_size
HVCALL 213 lv1_gpu_device_unmap dev
HVCALL 214 lv1_gpu_memory_allocate ddr_size,zero1,zero2,zero3,zero4 handle,ddr_lpar
HVCALL 216 lv1_gpu_memory_free handle
-HVCALL 217 lv1_gpu_context_allocate handle, zero chandle,lpar_dma_control,lpar_driver_info,lpar_reports,lpar_reports_size
+HVCALL 217 lv1_gpu_context_allocate handle,flags chandle,lpar_dma_control,lpar_driver_info,lpar_reports,lpar_reports_size
HVCALL 218 lv1_gpu_context_free chandle
HVCALL 221 lv1_gpu_context_iomap changle,gpu_ioif,xdr_lpar,fbsize,ioflags
HVCALL 225 lv1_gpu_context_attribute chandle,op,p1,p2,p3,p4
HVCALL 227 lv1_gpu_context_intr chandle v1
+HVCALL 228 lv1_gpu_attribute p1,p2,p3,p4,p5
HVCALL 232 lv1_get_rtc UNUSED rtc_val,timebase
HVCALL 245 lv1_storage_read dev,region,sector,nsectors,flags,buf dma_tag
HVCALL 246 lv1_storage_write dev,region,sector,nsectors,flags,buf dma_tag
diff --git a/sys/powerpc/ps3/ps3_syscons.c b/sys/powerpc/ps3/ps3_syscons.c
index e0e9cc8..c53c275 100644
--- a/sys/powerpc/ps3/ps3_syscons.c
+++ b/sys/powerpc/ps3/ps3_syscons.c
@@ -121,6 +121,13 @@ struct ps3fb_softc {
u_char *sc_font;
int sc_font_height;
+
+ uint64_t sc_fbhandle;
+ uint64_t sc_fbcontext;
+ uint64_t sc_dma_control;
+ uint64_t sc_driver_info;
+ uint64_t sc_reports;
+ uint64_t sc_reports_size;
};
static video_switch_t ps3fbvidsw = {
@@ -276,8 +283,10 @@ ps3fb_configure(int flags)
void
ps3fb_remap(void)
{
+ struct ps3fb_softc *sc;
vm_offset_t va, fb_paddr;
- uint64_t fbhandle, fbcontext;
+
+ sc = &ps3fb_softc;
lv1_gpu_close();
lv1_gpu_open(0);
@@ -290,12 +299,13 @@ ps3fb_remap(void)
0,L1GPU_DISPLAY_SYNC_VSYNC,0,0);
lv1_gpu_context_attribute(0, L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_SYNC,
1,L1GPU_DISPLAY_SYNC_VSYNC,0,0);
- lv1_gpu_memory_allocate(PS3FB_SIZE, 0, 0, 0, 0, &fbhandle, &fb_paddr);
- lv1_gpu_context_allocate(fbhandle, 0, &fbcontext);
+ lv1_gpu_memory_allocate(PS3FB_SIZE, 0, 0, 0, 0, &sc->sc_fbhandle, &fb_paddr);
+ lv1_gpu_context_allocate(sc->sc_fbhandle, 0, &sc->sc_fbcontext, &sc->sc_dma_control,
+ &sc->sc_driver_info, &sc->sc_reports, &sc->sc_reports_size);
- lv1_gpu_context_attribute(fbcontext,
+ lv1_gpu_context_attribute(sc->sc_fbcontext,
L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP, 0, 0, 0, 0);
- lv1_gpu_context_attribute(fbcontext,
+ lv1_gpu_context_attribute(sc->sc_fbcontext,
L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP, 1, 0, 0, 0);
for (va = 0; va < PS3FB_SIZE; va += PAGE_SIZE)
@@ -405,6 +415,11 @@ ps3fb_set_mode(video_adapter_t *adp, int mode)
ps3fb_blank_display(&sc->sc_va, V_DISPLAY_ON);
+ lv1_gpu_context_attribute(sc->sc_fbcontext,
+ L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP, 0, 0, 0, 0);
+ lv1_gpu_context_attribute(sc->sc_fbcontext,
+ L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP, 1, 0, 0, 0);
+
return (0);
}
diff --git a/sys/powerpc/ps3/ps3pic.c b/sys/powerpc/ps3/ps3pic.c
index c9b5c0e..9b40f6c 100644
--- a/sys/powerpc/ps3/ps3pic.c
+++ b/sys/powerpc/ps3/ps3pic.c
@@ -62,6 +62,7 @@ struct ps3pic_softc {
volatile uint64_t *mask_thread1;
uint64_t sc_ipi_outlet[2];
+ uint64_t sc_ipi_virq;
int sc_vector[64];
};
@@ -131,22 +132,23 @@ ps3pic_attach(device_t dev)
thread = 32 - fls(mfctrl());
lv1_configure_irq_state_bitmap(ppe, thread,
vtophys(sc->bitmap_thread0));
+
+ sc->sc_ipi_virq = 63;
+
#ifdef SMP
lv1_configure_irq_state_bitmap(ppe, !thread,
vtophys(sc->bitmap_thread1));
/* Map both IPIs to the same VIRQ to avoid changes in intr_machdep */
lv1_construct_event_receive_port(&sc->sc_ipi_outlet[0]);
- lv1_connect_irq_plug_ext(ppe, thread, sc->sc_ipi_outlet[0],
+ lv1_connect_irq_plug_ext(ppe, thread, sc->sc_ipi_virq,
sc->sc_ipi_outlet[0], 0);
lv1_construct_event_receive_port(&sc->sc_ipi_outlet[1]);
- lv1_connect_irq_plug_ext(ppe, !thread, sc->sc_ipi_outlet[0],
+ lv1_connect_irq_plug_ext(ppe, !thread, sc->sc_ipi_virq,
sc->sc_ipi_outlet[1], 0);
-#else
- sc->sc_ipi_outlet[0] = sc->sc_ipi_outlet[1] = 63;
#endif
- powerpc_register_pic(dev, 0, sc->sc_ipi_outlet[0], 1, FALSE);
+ powerpc_register_pic(dev, 0, sc->sc_ipi_virq, 1, FALSE);
return (0);
}
@@ -218,7 +220,7 @@ ps3pic_mask(device_t dev, u_int irq)
sc = device_get_softc(dev);
/* Do not mask IPIs! */
- if (irq == sc->sc_ipi_outlet[0])
+ if (irq == sc->sc_ipi_virq)
return;
atomic_clear_64(&sc->mask_thread0[0], 1UL << (63 - irq));
diff --git a/sys/security/mac/mac_framework.c b/sys/security/mac/mac_framework.c
index d4960f9..816bb0b 100644
--- a/sys/security/mac/mac_framework.c
+++ b/sys/security/mac/mac_framework.c
@@ -73,6 +73,7 @@
__FBSDID("$FreeBSD$");
#include <sys/param.h>
+#include <sys/systm.h>
#include <sys/condvar.h>
#include <sys/kernel.h>
#include <sys/lock.h>
@@ -81,7 +82,6 @@ __FBSDID("$FreeBSD$");
#include <sys/rmlock.h>
#include <sys/sdt.h>
#include <sys/sx.h>
-#include <sys/systm.h>
#include <sys/sysctl.h>
#include <security/mac/mac_framework.h>
diff --git a/sys/security/mac_lomac/mac_lomac.c b/sys/security/mac_lomac/mac_lomac.c
index fe71681..8dc92e4 100644
--- a/sys/security/mac_lomac/mac_lomac.c
+++ b/sys/security/mac_lomac/mac_lomac.c
@@ -762,10 +762,10 @@ lomac_parse(struct mac_lomac *ml, char *string)
/* Do we have a range? */
single = string;
- range = index(string, '(');
+ range = strchr(string, '(');
if (range == single)
single = NULL;
- auxsingle = index(string, '[');
+ auxsingle = strchr(string, '[');
if (auxsingle == single)
single = NULL;
if (range != NULL && auxsingle != NULL)
@@ -776,13 +776,13 @@ lomac_parse(struct mac_lomac *ml, char *string)
*range = '\0';
range++;
rangelow = range;
- rangehigh = index(rangelow, '-');
+ rangehigh = strchr(rangelow, '-');
if (rangehigh == NULL)
return (EINVAL);
rangehigh++;
if (*rangelow == '\0' || *rangehigh == '\0')
return (EINVAL);
- rangeend = index(rangehigh, ')');
+ rangeend = strchr(rangehigh, ')');
if (rangeend == NULL)
return (EINVAL);
if (*(rangeend + 1) != '\0')
@@ -798,7 +798,7 @@ lomac_parse(struct mac_lomac *ml, char *string)
/* Nul terminate the end of the single string. */
*auxsingle = '\0';
auxsingle++;
- auxsingleend = index(auxsingle, ']');
+ auxsingleend = strchr(auxsingle, ']');
if (auxsingleend == NULL)
return (EINVAL);
if (*(auxsingleend + 1) != '\0')
diff --git a/sys/sparc64/conf/GENERIC b/sys/sparc64/conf/GENERIC
index 667e9e4..12d4c15 100644
--- a/sys/sparc64/conf/GENERIC
+++ b/sys/sparc64/conf/GENERIC
@@ -60,6 +60,8 @@ options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed.
options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4)
options AUDIT # Security event auditing
+options CAPABILITY_MODE # Capsicum capability mode
+options CAPABILITIES # Capsicum capabilities
options MAC # TrustedBSD MAC Framework
options INCLUDE_CONFIG_FILE # Include this file in kernel
@@ -117,6 +119,7 @@ device sa # Sequential Access (tape etc)
device cd # CD
device pass # Passthrough device (direct ATA/SCSI access)
device ses # SCSI Environmental Services (and SAF-TE)
+device ctl # CAM Target Layer
# RAID controllers
#device amr # AMI MegaRAID
diff --git a/sys/sparc64/include/_types.h b/sys/sparc64/include/_types.h
index 7e993c4..5899401 100644
--- a/sys/sparc64/include/_types.h
+++ b/sys/sparc64/include/_types.h
@@ -42,7 +42,7 @@
/*
* Basic types upon which most other types are built.
*/
-typedef __signed char __int8_t;
+typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef short __int16_t;
typedef unsigned short __uint16_t;
diff --git a/sys/sparc64/include/float.h b/sys/sparc64/include/float.h
index de1d7fe..dcc626f 100644
--- a/sys/sparc64/include/float.h
+++ b/sys/sparc64/include/float.h
@@ -60,6 +60,11 @@ __END_DECLS
#define FLT_MAX_EXP 128 /* emax */
#define FLT_MAX 3.40282347E+38F /* (1-b**(-p))*b**emax */
#define FLT_MAX_10_EXP 38 /* floor(log10((1-b**(-p))*b**emax)) */
+#if __ISO_C_VISIBLE >= 2011
+#define FLT_TRUE_MIN 1.40129846E-45F /* b**(emin-p) */
+#define FLT_DECIMAL_DIG 9 /* ceil(1+p*log10(b)) */
+#define FLT_HAS_SUBNORM 1
+#endif /* __ISO_C_VISIBLE >= 2011 */
#define DBL_MANT_DIG 53
#define DBL_EPSILON 2.2204460492503131E-16
@@ -70,6 +75,11 @@ __END_DECLS
#define DBL_MAX_EXP 1024
#define DBL_MAX 1.7976931348623157E+308
#define DBL_MAX_10_EXP 308
+#if __ISO_C_VISIBLE >= 2011
+#define DBL_TRUE_MIN 4.9406564584124654E-324
+#define DBL_DECIMAL_DIG 17
+#define DBL_HAS_SUBNORM 1
+#endif /* __ISO_C_VISIBLE >= 2011 */
#define LDBL_MANT_DIG 113
#define LDBL_EPSILON 1.925929944387235853055977942584927319E-34L
@@ -80,5 +90,10 @@ __END_DECLS
#define LDBL_MAX_EXP (+16384)
#define LDBL_MAX 1.189731495357231765085759326628007016E+4932L
#define LDBL_MAX_10_EXP (+4932)
+#if __ISO_C_VISIBLE >= 2011
+#define LDBL_TRUE_MIN 6.475175119438025110924438958227646552E-4966L
+#define LDBL_DECIMAL_DIG 36
+#define LDBL_HAS_SUBNORM 1
+#endif /* __ISO_C_VISIBLE >= 2011 */
#endif /* _MACHINE_FLOAT_H_ */
diff --git a/sys/sparc64/sparc64/vm_machdep.c b/sys/sparc64/sparc64/vm_machdep.c
index 36f1cc5..cdb94c7 100644
--- a/sys/sparc64/sparc64/vm_machdep.c
+++ b/sys/sparc64/sparc64/vm_machdep.c
@@ -493,7 +493,6 @@ swi_vm(void *v)
void *
uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait)
{
- static vm_pindex_t color;
vm_paddr_t pa;
vm_page_t m;
int pflags;
@@ -512,7 +511,7 @@ uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait)
pflags |= VM_ALLOC_ZERO;
for (;;) {
- m = vm_page_alloc(NULL, color++, pflags | VM_ALLOC_NOOBJ);
+ m = vm_page_alloc(NULL, 0, pflags | VM_ALLOC_NOOBJ);
if (m == NULL) {
if (wait & M_NOWAIT)
return (NULL);
diff --git a/sys/sys/_kstack_cache.h b/sys/sys/_kstack_cache.h
new file mode 100644
index 0000000..5b33734
--- /dev/null
+++ b/sys/sys/_kstack_cache.h
@@ -0,0 +1,43 @@
+/*-
+ * Copyright (c) 2009 Konstantin Belousov <kib@FreeBSD.org>
+ *
+ * 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.
+ * 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.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _SYS__KSTACK_CACHE_H
+#define _SYS__KSTACK_CACHE_H
+
+struct kstack_cache_entry {
+ struct vm_object *ksobj;
+ struct kstack_cache_entry *next_ks_entry;
+};
+
+extern struct kstack_cache_entry *kstack_cache;
+
+#endif
+
+
diff --git a/sys/sys/_null.h b/sys/sys/_null.h
index ed6804c..92706c6 100644
--- a/sys/sys/_null.h
+++ b/sys/sys/_null.h
@@ -31,7 +31,9 @@
#if !defined(__cplusplus)
#define NULL ((void *)0)
#else
-#if defined(__GNUG__) && defined(__GNUC__) && __GNUC__ >= 4
+#if __cplusplus >= 201103L
+#define NULL nullptr
+#elif defined(__GNUG__) && defined(__GNUC__) && __GNUC__ >= 4
#define NULL __null
#else
#if defined(__LP64__)
diff --git a/sys/sys/ata.h b/sys/sys/ata.h
index 1d46dc1..4baaafa 100644
--- a/sys/sys/ata.h
+++ b/sys/sys/ata.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2000 - 2008 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 2000 - 2008 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h
index e7f447d..b80a090 100644
--- a/sys/sys/cdefs.h
+++ b/sys/sys/cdefs.h
@@ -218,15 +218,52 @@
#endif
#endif
+#if !__GNUC_PREREQ__(2, 95)
+#define __alignof(x) __offsetof(struct { char __a; x __b; }, __b)
+#endif
+/*
+ * Keywords added in C11.
+ */
#if defined(__cplusplus) && __cplusplus >= 201103L
+#define _Alignas(e) alignas(e)
+#define _Alignof(e) alignof(e)
#define _Noreturn [[noreturn]]
-#elif defined(__STDC_VERSION__) && __STDC_VERSION__ > 201000L
-/* Do nothing - _Noreturn is a keyword */
-#elif defined(__GNUC__)
-#define _Noreturn __attribute__((__noreturn__))
+#define _Static_assert(e, s) static_assert(e, s)
+#define _Thread_local thread_local
+#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
+/* Do nothing. They are language keywords. */
#else
-#define _Noreturn
+/* Not supported. Implement them using our versions. */
+#define _Alignas(x) __aligned(x)
+#define _Alignof(x) __alignof(x)
+#define _Noreturn __dead2
+#define _Thread_local __thread
+#ifdef __COUNTER__
+#define _Static_assert(x, y) __Static_assert(x, __COUNTER__)
+#define __Static_assert(x, y) ___Static_assert(x, y)
+#define ___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : -1]
+#else
+#define _Static_assert(x, y) struct __hack
+#endif
+#endif
+
+/*
+ * Emulation of C11 _Generic(). Unlike the previously defined C11
+ * keywords, it is not possible to implement this using exactly the same
+ * syntax. Therefore implement something similar under the name
+ * __generic(). Unlike _Generic(), this macro can only distinguish
+ * between a single type, so it requires nested invocations to
+ * distinguish multiple cases.
+ */
+
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
+#define __generic(expr, t, yes, no) \
+ _Generic(expr, t: yes, default: no)
+#elif __GNUC_PREREQ__(3, 1) && !defined(__cplusplus)
+#define __generic(expr, t, yes, no) \
+ __builtin_choose_expr( \
+ __builtin_types_compatible_p(__typeof(expr), t), yes, no)
#endif
#if __GNUC_PREREQ__(2, 96)
@@ -341,10 +378,11 @@
#define __offsetof(type, field) __builtin_offsetof(type, field)
#else
#ifndef __cplusplus
-#define __offsetof(type, field) ((size_t)(&((type *)0)->field))
+#define __offsetof(type, field) \
+ ((__size_t)(__uintptr_t)((const volatile void *)&((type *)0)->field))
#else
#define __offsetof(type, field) \
- (__offsetof__ (reinterpret_cast <size_t> \
+ (__offsetof__ (reinterpret_cast <__size_t> \
(&reinterpret_cast <const volatile char &> \
(static_cast<type *> (0)->field))))
#endif
@@ -473,15 +511,15 @@
#endif
#ifndef __DECONST
-#define __DECONST(type, var) ((type)(uintptr_t)(const void *)(var))
+#define __DECONST(type, var) ((type)(__uintptr_t)(const void *)(var))
#endif
#ifndef __DEVOLATILE
-#define __DEVOLATILE(type, var) ((type)(uintptr_t)(volatile void *)(var))
+#define __DEVOLATILE(type, var) ((type)(__uintptr_t)(volatile void *)(var))
#endif
#ifndef __DEQUALIFY
-#define __DEQUALIFY(type, var) ((type)(uintptr_t)(const volatile void *)(var))
+#define __DEQUALIFY(type, var) ((type)(__uintptr_t)(const volatile void *)(var))
#endif
/*-
@@ -589,12 +627,27 @@
#define __XSI_VISIBLE 0
#define __BSD_VISIBLE 0
#define __ISO_C_VISIBLE 1999
+#elif defined(_C11_SOURCE) /* Localism to specify strict C11 env. */
+#define __POSIX_VISIBLE 0
+#define __XSI_VISIBLE 0
+#define __BSD_VISIBLE 0
+#define __ISO_C_VISIBLE 2011
#else /* Default environment: show everything. */
#define __POSIX_VISIBLE 200809
#define __XSI_VISIBLE 700
#define __BSD_VISIBLE 1
-#define __ISO_C_VISIBLE 1999
+#define __ISO_C_VISIBLE 2011
+#endif
+#endif
+
+#ifndef __has_feature
+#define __has_feature(x) 0
+#endif
+#ifndef __has_include
+#define __has_include(x) 0
#endif
+#ifndef __has_builtin
+#define __has_builtin(x) 0
#endif
#endif /* !_SYS_CDEFS_H_ */
diff --git a/sys/sys/cdrio.h b/sys/sys/cdrio.h
index b664a58..0f86772 100644
--- a/sys/sys/cdrio.h
+++ b/sys/sys/cdrio.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2000,2001,2002 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 2000,2001,2002 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/sys/cons.h b/sys/sys/cons.h
index e84318f..8442bf3 100644
--- a/sys/sys/cons.h
+++ b/sys/sys/cons.h
@@ -44,6 +44,8 @@ struct tty;
typedef void cn_probe_t(struct consdev *);
typedef void cn_init_t(struct consdev *);
typedef void cn_term_t(struct consdev *);
+typedef void cn_grab_t(struct consdev *);
+typedef void cn_ungrab_t(struct consdev *);
typedef int cn_getc_t(struct consdev *);
typedef void cn_putc_t(struct consdev *, int);
@@ -58,6 +60,10 @@ struct consdev_ops {
/* kernel getchar interface */
cn_putc_t *cn_putc;
/* kernel putchar interface */
+ cn_grab_t *cn_grab;
+ /* grab console for exclusive kernel use */
+ cn_ungrab_t *cn_ungrab;
+ /* ungrab console */
};
struct consdev {
@@ -80,6 +86,11 @@ struct consdev {
#define CN_FLAG_NODEBUG 0x00000001 /* Not supported with debugger. */
#define CN_FLAG_NOAVAIL 0x00000002 /* Temporarily not available. */
+/* Visibility of characters in cngets() */
+#define GETS_NOECHO 0 /* Disable echoing of characters. */
+#define GETS_ECHO 1 /* Enable echoing of characters. */
+#define GETS_ECHOPASS 2 /* Print a * for every character. */
+
#ifdef _KERNEL
extern struct msgbuf consmsgbuf; /* Message buffer for constty. */
@@ -99,6 +110,8 @@ extern struct tty *constty; /* Temporary virtual console. */
.cn_term = name##_cnterm, \
.cn_getc = name##_cngetc, \
.cn_putc = name##_cnputc, \
+ .cn_grab = name##_cngrab, \
+ .cn_ungrab = name##_cnungrab, \
}; \
CONSOLE_DEVICE(name##_consdev, name##_consdev_ops, NULL)
@@ -109,8 +122,11 @@ int cnadd(struct consdev *);
void cnavailable(struct consdev *, int);
void cnremove(struct consdev *);
void cnselect(struct consdev *);
+void cngrab(void);
+void cnungrab(void);
int cncheckc(void);
int cngetc(void);
+void cngets(char *, size_t, int);
void cnputc(int);
void cnputs(char *);
int cnunavailable(void);
diff --git a/sys/sys/consio.h b/sys/sys/consio.h
index 7b18ade..a0022e8 100644
--- a/sys/sys/consio.h
+++ b/sys/sys/consio.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1991-1996 Søren Schmidt
+ * Copyright (c) 1991-1996 Søren Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/sys/copyright.h b/sys/sys/copyright.h
index 24a6887..0bc59b7 100644
--- a/sys/sys/copyright.h
+++ b/sys/sys/copyright.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (C) 1992-2011 The FreeBSD Project. All rights reserved.
+ * Copyright (C) 1992-2012 The FreeBSD Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -30,7 +30,7 @@
/* FreeBSD */
#define COPYRIGHT_FreeBSD \
- "Copyright (c) 1992-2011 The FreeBSD Project.\n"
+ "Copyright (c) 1992-2012 The FreeBSD Project.\n"
/* Foundation */
#define TRADEMARK_Foundation \
diff --git a/sys/sys/diskmbr.h b/sys/sys/diskmbr.h
index 5b62e64..0caf0d7 100644
--- a/sys/sys/diskmbr.h
+++ b/sys/sys/diskmbr.h
@@ -48,6 +48,7 @@
#define DOSPTYP_NTFS 0x07 /* NTFS partition */
#define DOSPTYP_FAT32 0x0b /* FAT32 partition */
#define DOSPTYP_EXTLBA 0x0f /* DOS extended partition */
+#define DOSPTYP_PPCBOOT 0x41 /* PReP/CHRP boot partition */
#define DOSPTYP_386BSD 0xa5 /* 386BSD partition type */
#define DOSPTYP_LINSWP 0x82 /* Linux swap partition */
#define DOSPTYP_LINUX 0x83 /* Linux partition */
diff --git a/sys/sys/dvdio.h b/sys/sys/dvdio.h
index 3794071..71e4d96 100644
--- a/sys/sys/dvdio.h
+++ b/sys/sys/dvdio.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1999,2000,2001,2002 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 1999,2000,2001,2002 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/sys/elf_common.h b/sys/sys/elf_common.h
index 42165ce..489851a 100644
--- a/sys/sys/elf_common.h
+++ b/sys/sys/elf_common.h
@@ -384,7 +384,7 @@ typedef struct {
#define DT_INIT_ARRAYSZ 27 /* Size in bytes of the array of
initialization functions. */
#define DT_FINI_ARRAYSZ 28 /* Size in bytes of the array of
- terminationfunctions. */
+ termination functions. */
#define DT_RUNPATH 29 /* String table offset of a null-terminated
library search path string. */
#define DT_FLAGS 30 /* Object specific flag values. */
@@ -503,6 +503,7 @@ typedef struct {
#define STT_TLS 6 /* TLS object. */
#define STT_NUM 7
#define STT_LOOS 10 /* Reserved range for operating system */
+#define STT_GNU_IFUNC 10
#define STT_HIOS 12 /* specific semantics. */
#define STT_LOPROC 13 /* reserved range for processor */
#define STT_HIPROC 15 /* specific semantics. */
@@ -612,6 +613,7 @@ typedef struct {
#define R_386_TLS_DTPMOD32 35 /* GOT entry containing TLS index */
#define R_386_TLS_DTPOFF32 36 /* GOT entry containing TLS offset */
#define R_386_TLS_TPOFF32 37 /* GOT entry of -ve static TLS offset */
+#define R_386_IRELATIVE 42 /* PLT entry resolved indirectly at runtime */
#define R_ARM_NONE 0 /* No relocation. */
#define R_ARM_PC24 1
@@ -961,6 +963,7 @@ typedef struct {
#define R_X86_64_DTPOFF32 21 /* Offset in TLS block */
#define R_X86_64_GOTTPOFF 22 /* PC relative offset to IE GOT entry */
#define R_X86_64_TPOFF32 23 /* Offset in static TLS block */
+#define R_X86_64_IRELATIVE 37
#endif /* !_SYS_ELF_COMMON_H_ */
diff --git a/sys/sys/imgact_elf.h b/sys/sys/imgact_elf.h
index b41661c..faef5f8 100644
--- a/sys/sys/imgact_elf.h
+++ b/sys/sys/imgact_elf.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1995-1996 Søren Schmidt
+ * Copyright (c) 1995-1996 Søren Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/sys/sys/libkern.h b/sys/sys/libkern.h
index 65405d0..4cf2188 100644
--- a/sys/sys/libkern.h
+++ b/sys/sys/libkern.h
@@ -90,22 +90,20 @@ int fls(int);
int flsl(long);
#endif
int fnmatch(const char *, const char *, int);
-void gets(char *, size_t, int);
int locc(int, char *, u_int);
void *memchr(const void *s, int c, size_t n);
+void *memcchr(const void *s, int c, size_t n);
int memcmp(const void *b1, const void *b2, size_t len);
void qsort(void *base, size_t nmemb, size_t size,
int (*compar)(const void *, const void *));
void qsort_r(void *base, size_t nmemb, size_t size, void *thunk,
int (*compar)(void *, const void *, const void *));
u_long random(void);
-char *index(const char *, int);
-char *rindex(const char *, int);
int scanc(u_int, const u_char *, const u_char *, int);
-int skpc(int, int, char *);
void srandom(u_long);
int strcasecmp(const char *, const char *);
char *strcat(char * __restrict, const char * __restrict);
+char *strchr(const char *, int);
int strcmp(const char *, const char *);
char *strcpy(char * __restrict, const char * __restrict);
size_t strcspn(const char * __restrict, const char * __restrict) __pure;
@@ -117,6 +115,7 @@ int strncasecmp(const char *, const char *, size_t);
int strncmp(const char *, const char *, size_t);
char *strncpy(char * __restrict, const char * __restrict, size_t);
size_t strnlen(const char *, size_t);
+char *strrchr(const char *, int);
char *strsep(char **, const char *delim);
size_t strspn(const char *, const char *);
char *strstr(const char *, const char *);
@@ -165,15 +164,17 @@ memset(void *b, int c, size_t len)
#endif
static __inline char *
-strchr(const char *p, int ch)
+index(const char *p, int ch)
{
- return (index(p, ch));
+
+ return (strchr(p, ch));
}
static __inline char *
-strrchr(const char *p, int ch)
+rindex(const char *p, int ch)
{
- return (rindex(p, ch));
+
+ return (strrchr(p, ch));
}
/* fnmatch() return values. */
@@ -188,9 +189,4 @@ strrchr(const char *p, int ch)
#define FNM_IGNORECASE FNM_CASEFOLD
#define FNM_FILE_NAME FNM_PATHNAME
-/* Visibility of characters in gets() */
-#define GETS_NOECHO 0 /* Disable echoing of characters. */
-#define GETS_ECHO 1 /* Enable echoing of characters. */
-#define GETS_ECHOPASS 2 /* Print a * for every character. */
-
#endif /* !_SYS_LIBKERN_H_ */
diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h
index b186f79..2a6c8aa 100644
--- a/sys/sys/mbuf.h
+++ b/sys/sys/mbuf.h
@@ -398,6 +398,8 @@ extern uma_zone_t zone_ext_refcnt;
static __inline struct mbuf *m_getcl(int how, short type, int flags);
static __inline struct mbuf *m_get(int how, short type);
+static __inline struct mbuf *m_get2(int how, short type, int flags,
+ int size);
static __inline struct mbuf *m_gethdr(int how, short type);
static __inline struct mbuf *m_getjcl(int how, short type, int flags,
int size);
@@ -436,7 +438,7 @@ m_gettype(int size)
type = EXT_JUMBO16;
break;
default:
- panic("%s: m_getjcl: invalid cluster size", __func__);
+ panic("%s: invalid cluster size", __func__);
}
return (type);
@@ -448,9 +450,6 @@ m_getzone(int size)
uma_zone_t zone;
switch (size) {
- case MSIZE:
- zone = zone_mbuf;
- break;
case MCLBYTES:
zone = zone_clust;
break;
@@ -466,7 +465,7 @@ m_getzone(int size)
zone = zone_jumbo16;
break;
default:
- panic("%s: m_getjcl: invalid cluster type", __func__);
+ panic("%s: invalid cluster size", __func__);
}
return (zone);
@@ -547,6 +546,52 @@ m_getcl(int how, short type, int flags)
}
/*
+ * m_get2() allocates minimum mbuf that would fit "size" argument.
+ *
+ * XXX: This is rather large, should be real function maybe.
+ */
+static __inline struct mbuf *
+m_get2(int how, short type, int flags, int size)
+{
+ struct mb_args args;
+ struct mbuf *m, *n;
+ uma_zone_t zone;
+
+ args.flags = flags;
+ args.type = type;
+
+ if (size <= MHLEN || (size <= MLEN && (flags & M_PKTHDR) == 0))
+ return ((struct mbuf *)(uma_zalloc_arg(zone_mbuf, &args, how)));
+ if (size <= MCLBYTES)
+ return ((struct mbuf *)(uma_zalloc_arg(zone_pack, &args, how)));
+
+ if (size > MJUM16BYTES)
+ return (NULL);
+
+ m = uma_zalloc_arg(zone_mbuf, &args, how);
+ if (m == NULL)
+ return (NULL);
+
+#if MJUMPAGESIZE != MCLBYTES
+ if (size <= MJUMPAGESIZE)
+ zone = zone_jumbop;
+ else
+#endif
+ if (size <= MJUM9BYTES)
+ zone = zone_jumbo9;
+ else
+ zone = zone_jumbo16;
+
+ n = uma_zalloc_arg(zone, m, how);
+ if (n == NULL) {
+ uma_zfree(zone_mbuf, m);
+ return (NULL);
+ }
+
+ return (m);
+}
+
+/*
* m_getjcl() returns an mbuf with a cluster of the specified size attached.
* For size it takes MCLBYTES, MJUMPAGESIZE, MJUM9BYTES, MJUM16BYTES.
*
@@ -666,7 +711,7 @@ m_cljset(struct mbuf *m, void *cl, int type)
zone = zone_jumbo16;
break;
default:
- panic("unknown cluster type");
+ panic("%s: unknown cluster type", __func__);
break;
}
diff --git a/sys/sys/mdioctl.h b/sys/sys/mdioctl.h
index be63b8c..82ac397 100644
--- a/sys/sys/mdioctl.h
+++ b/sys/sys/mdioctl.h
@@ -86,6 +86,6 @@ struct md_ioctl {
#define MD_READONLY 0x08 /* Readonly mode */
#define MD_COMPRESS 0x10 /* Compression mode */
#define MD_FORCE 0x20 /* Don't try to prevent foot-shooting */
-#define MD_ASYNC 0x40 /* Don't try to prevent foot-shooting */
+#define MD_ASYNC 0x40 /* Asynchronous mode */
#endif /* _SYS_MDIOCTL_H_*/
diff --git a/sys/sys/mman.h b/sys/sys/mman.h
index 379ed14..4033023 100644
--- a/sys/sys/mman.h
+++ b/sys/sys/mman.h
@@ -181,6 +181,8 @@ typedef __size_t size_t;
#ifdef _KERNEL
#include <vm/vm.h>
+struct file;
+
struct shmfd {
size_t shm_size;
vm_object_t shm_object;
@@ -188,6 +190,7 @@ struct shmfd {
uid_t shm_uid;
gid_t shm_gid;
mode_t shm_mode;
+ int shm_kmappings;
/*
* Values maintained solely to make this a better-behaved file
@@ -203,6 +206,8 @@ struct shmfd {
int shm_mmap(struct shmfd *shmfd, vm_size_t objsize, vm_ooffset_t foff,
vm_object_t *obj);
+int shm_map(struct file *fp, size_t size, off_t offset, void **memp);
+int shm_unmap(struct file *fp, void *mem, size_t size);
#else /* !_KERNEL */
diff --git a/sys/sys/mount.h b/sys/sys/mount.h
index ecaf7b8..f68a046b 100644
--- a/sys/sys/mount.h
+++ b/sys/sys/mount.h
@@ -557,7 +557,7 @@ struct nameidata;
struct sysctl_req;
struct mntarg;
-typedef int vfs_cmount_t(struct mntarg *ma, void *data, int flags);
+typedef int vfs_cmount_t(struct mntarg *ma, void *data, uint64_t flags);
typedef int vfs_unmount_t(struct mount *mp, int mntflags);
typedef int vfs_root_t(struct mount *mp, int flags, struct vnode **vpp);
typedef int vfs_quotactl_t(struct mount *mp, int cmds, uid_t uid, void *arg);
@@ -700,7 +700,7 @@ extern char *mountrootfsname;
int dounmount(struct mount *, int, struct thread *);
-int kernel_mount(struct mntarg *ma, int flags);
+int kernel_mount(struct mntarg *ma, uint64_t flags);
int kernel_vmount(int flags, ...);
struct mntarg *mount_arg(struct mntarg *ma, const char *name, const void *val, int len);
struct mntarg *mount_argb(struct mntarg *ma, int flag, const char *name);
@@ -737,7 +737,8 @@ int vfs_export /* process mount export info */
(struct mount *, struct export_args *);
void vfs_allocate_syncvnode(struct mount *);
void vfs_deallocate_syncvnode(struct mount *);
-int vfs_donmount(struct thread *td, int fsflags, struct uio *fsoptions);
+int vfs_donmount(struct thread *td, uint64_t fsflags,
+ struct uio *fsoptions);
void vfs_getnewfsid(struct mount *);
struct cdev *vfs_getrootfsid(struct mount *);
struct mount *vfs_getvfs(fsid_t *); /* return vfs given fsid */
diff --git a/sys/sys/mutex.h b/sys/sys/mutex.h
index 1e88e10..d39df0f 100644
--- a/sys/sys/mutex.h
+++ b/sys/sys/mutex.h
@@ -370,7 +370,8 @@ do { \
\
if (mtx_owned(&Giant)) { \
WITNESS_SAVE(&Giant.lock_object, Giant); \
- for (_giantcnt = 0; mtx_owned(&Giant); _giantcnt++) \
+ for (_giantcnt = 0; mtx_owned(&Giant) && \
+ !SCHEDULER_STOPPED(); _giantcnt++) \
mtx_unlock(&Giant); \
}
diff --git a/sys/sys/namei.h b/sys/sys/namei.h
index c68a7f7..30e61e6 100644
--- a/sys/sys/namei.h
+++ b/sys/sys/namei.h
@@ -107,7 +107,7 @@ struct nameidata {
/*
* namei operational modifier flags, stored in ni_cnd.flags
*/
-#define LOCKLEAF 0x0004 /* lock inode on return */
+#define LOCKLEAF 0x0004 /* lock vnode on return */
#define LOCKPARENT 0x0008 /* want parent vnode returned locked */
#define WANTPARENT 0x0010 /* want parent vnode returned unlocked */
#define NOCACHE 0x0020 /* name must not be left in cache */
diff --git a/sys/sys/param.h b/sys/sys/param.h
index 87eba11..921ba46 100644
--- a/sys/sys/param.h
+++ b/sys/sys/param.h
@@ -58,7 +58,7 @@
* in the range 5 to 9.
*/
#undef __FreeBSD_version
-#define __FreeBSD_version 1000001 /* Master, propagated to newvers */
+#define __FreeBSD_version 1000005 /* Master, propagated to newvers */
/*
* __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
diff --git a/sys/sys/pmc.h b/sys/sys/pmc.h
index 8f5f769..53827b4 100644
--- a/sys/sys/pmc.h
+++ b/sys/sys/pmc.h
@@ -87,7 +87,8 @@
__PMC_CPU(INTEL_COREI7, 0x8B, "Intel Core i7") \
__PMC_CPU(INTEL_WESTMERE, 0x8C, "Intel Westmere") \
__PMC_CPU(INTEL_XSCALE, 0x100, "Intel XScale") \
- __PMC_CPU(MIPS_24K, 0x200, "MIPS 24K")
+ __PMC_CPU(MIPS_24K, 0x200, "MIPS 24K") \
+ __PMC_CPU(PPC_7450, 0x300, "PowerPC MPC7450")
enum pmc_cputype {
#undef __PMC_CPU
@@ -96,7 +97,7 @@ enum pmc_cputype {
};
#define PMC_CPU_FIRST PMC_CPU_AMD_K7
-#define PMC_CPU_LAST PMC_CPU_MIPS_24K
+#define PMC_CPU_LAST PMC_CPU_PPC_7450
/*
* Classes of PMCs
@@ -114,7 +115,8 @@ enum pmc_cputype {
__PMC_CLASS(UCF) /* Intel Uncore fixed function */ \
__PMC_CLASS(UCP) /* Intel Uncore programmable */ \
__PMC_CLASS(XSCALE) /* Intel XScale counters */ \
- __PMC_CLASS(MIPS24K) /* MIPS 24K */
+ __PMC_CLASS(MIPS24K) /* MIPS 24K */ \
+ __PMC_CLASS(PPC7450) /* Motorola MPC7450 class */
enum pmc_class {
#undef __PMC_CLASS
@@ -123,7 +125,7 @@ enum pmc_class {
};
#define PMC_CLASS_FIRST PMC_CLASS_TSC
-#define PMC_CLASS_LAST PMC_CLASS_MIPS24K
+#define PMC_CLASS_LAST PMC_CLASS_PPC7450
/*
* A PMC can be in the following states:
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
index efb5889..ba00a88 100644
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@@ -818,6 +818,20 @@ struct proc *pfind(pid_t); /* Find process by id. */
struct pgrp *pgfind(pid_t); /* Find process group by id. */
struct proc *zpfind(pid_t); /* Find zombie process by id. */
+/*
+ * pget() flags.
+ */
+#define PGET_HOLD 0x00001 /* Hold the process. */
+#define PGET_CANSEE 0x00002 /* Check against p_cansee(). */
+#define PGET_CANDEBUG 0x00004 /* Check against p_candebug(). */
+#define PGET_ISCURRENT 0x00008 /* Check that the found process is current. */
+#define PGET_NOTWEXIT 0x00010 /* Check that the process is not in P_WEXIT. */
+#define PGET_NOTINEXEC 0x00020 /* Check that the process is not in P_INEXEC. */
+
+#define PGET_WANTREAD (PGET_HOLD | PGET_CANDEBUG | PGET_NOTWEXIT)
+
+int pget(pid_t pid, int flags, struct proc **pp);
+
void ast(struct trapframe *framep);
struct thread *choosethread(void);
int cr_cansignal(struct ucred *cred, struct proc *proc, int signum);
@@ -845,10 +859,8 @@ int p_canwait(struct thread *td, struct proc *p);
struct pargs *pargs_alloc(int len);
void pargs_drop(struct pargs *pa);
void pargs_hold(struct pargs *pa);
-int proc_getargv(struct thread *td, struct proc *p, struct sbuf *sb,
- size_t nchr);
-int proc_getenvv(struct thread *td, struct proc *p, struct sbuf *sb,
- size_t nchr);
+int proc_getargv(struct thread *td, struct proc *p, struct sbuf *sb);
+int proc_getenvv(struct thread *td, struct proc *p, struct sbuf *sb);
void procinit(void);
void proc_linkup0(struct proc *p, struct thread *td);
void proc_linkup(struct proc *p, struct thread *td);
diff --git a/sys/sys/resourcevar.h b/sys/sys/resourcevar.h
index d091d85..0c91948 100644
--- a/sys/sys/resourcevar.h
+++ b/sys/sys/resourcevar.h
@@ -120,6 +120,8 @@ int chgsbsize(struct uidinfo *uip, u_int *hiwat, u_int to,
rlim_t maxval);
int chgptscnt(struct uidinfo *uip, int diff, rlim_t maxval);
int fuswintr(void *base);
+int kern_proc_setrlimit(struct thread *td, struct proc *p, u_int which,
+ struct rlimit *limp);
struct plimit
*lim_alloc(void);
void lim_copy(struct plimit *dst, struct plimit *src);
diff --git a/sys/sys/sockio.h b/sys/sys/sockio.h
index 8922699..df0d4b2 100644
--- a/sys/sys/sockio.h
+++ b/sys/sys/sockio.h
@@ -68,8 +68,7 @@
#define SIOCGIFMETRIC _IOWR('i', 23, struct ifreq) /* get IF metric */
#define SIOCSIFMETRIC _IOW('i', 24, struct ifreq) /* set IF metric */
#define SIOCDIFADDR _IOW('i', 25, struct ifreq) /* delete IF addr */
-#define SIOCAIFADDR _IOW('i', 26, struct ifaliasreq)/* add/chg IF alias */
-
+#define OSIOCAIFADDR _IOW('i', 26, struct oifaliasreq)/* add/chg IF alias */
#define SIOCALIFADDR _IOW('i', 27, struct if_laddrreq) /* add IF addr */
#define SIOCGLIFADDR _IOWR('i', 28, struct if_laddrreq) /* get IF addr */
#define SIOCDLIFADDR _IOW('i', 29, struct if_laddrreq) /* delete IF addr */
@@ -81,6 +80,7 @@
#define SIOCSIFNAME _IOW('i', 40, struct ifreq) /* set IF name */
#define SIOCSIFDESCR _IOW('i', 41, struct ifreq) /* set ifnet descr */
#define SIOCGIFDESCR _IOWR('i', 42, struct ifreq) /* get ifnet descr */
+#define SIOCAIFADDR _IOW('i', 43, struct ifaliasreq)/* add/chg IF alias */
#define SIOCADDMULTI _IOW('i', 49, struct ifreq) /* add m'cast addr */
#define SIOCDELMULTI _IOW('i', 50, struct ifreq) /* del m'cast addr */
diff --git a/sys/sys/stdint.h b/sys/sys/stdint.h
index d5d92a5..aa5ac81 100644
--- a/sys/sys/stdint.h
+++ b/sys/sys/stdint.h
@@ -64,4 +64,11 @@ typedef __uintmax_t uintmax_t;
#define _UINTMAX_T_DECLARED
#endif
+/* GNU and Darwin define this and people seem to think it's portable */
+#if defined(UINTPTR_MAX) && defined(UINT64_MAX) && (UINTPTR_MAX == UINT64_MAX)
+#define __WORDSIZE 64
+#else
+#define __WORDSIZE 32
+#endif
+
#endif /* !_SYS_STDINT_H_ */
diff --git a/sys/sys/systm.h b/sys/sys/systm.h
index 7e537ee..e5d60d4 100644
--- a/sys/sys/systm.h
+++ b/sys/sys/systm.h
@@ -47,6 +47,7 @@
extern int cold; /* nonzero if we are doing a cold boot */
extern int rebooting; /* kern_reboot() has been called. */
+extern int stop_scheduler; /* only one thread runs after panic */
extern const char *panicstr; /* panic message */
extern char version[]; /* system version */
extern char copyright[]; /* system copyright */
@@ -91,10 +92,8 @@ enum VM_GUEST { VM_GUEST_NO = 0, VM_GUEST_VM, VM_GUEST_XEN };
} while (0)
#endif
-#ifndef CTASSERT /* Allow lint to override */
-#define CTASSERT(x) _CTASSERT(x, __LINE__)
-#define _CTASSERT(x, y) __CTASSERT(x, y)
-#define __CTASSERT(x, y) typedef char __assert ## y[(x) ? 1 : -1]
+#ifndef CTASSERT /* Allow lint to override */
+#define CTASSERT(x) _Static_assert(x, "compile-time assertion failed")
#endif
/*
@@ -109,6 +108,14 @@ enum VM_GUEST { VM_GUEST_NO = 0, VM_GUEST_VM, VM_GUEST_XEN };
((uintptr_t)&(var) & (sizeof(void *) - 1)) == 0, msg)
/*
+ * If we have already panic'd and this is the thread that called
+ * panic(), then don't block on any mutexes but silently succeed.
+ * Otherwise, the kernel will deadlock since the scheduler isn't
+ * going to run the thread that holds any lock we need.
+ */
+#define SCHEDULER_STOPPED() __predict_false(stop_scheduler)
+
+/*
* XXX the hints declarations are even more misplaced than most declarations
* in this file, since they are needed in one file (per arch) and only used
* in two files.
diff --git a/sys/sys/taskqueue.h b/sys/sys/taskqueue.h
index dda64cc..b4c7d20 100644
--- a/sys/sys/taskqueue.h
+++ b/sys/sys/taskqueue.h
@@ -77,6 +77,12 @@ void taskqueue_block(struct taskqueue *queue);
void taskqueue_unblock(struct taskqueue *queue);
int taskqueue_member(struct taskqueue *queue, struct thread *td);
+#define TASK_INITIALIZER(priority, func, context) \
+ { .ta_pending = 0, \
+ .ta_priority = (priority), \
+ .ta_func = (func), \
+ .ta_context = (context) }
+
/*
* Functions for dedicated thread taskqueues
*/
diff --git a/sys/sys/timeffc.h b/sys/sys/timeffc.h
index 6a5bcc0..3bda5d4 100644
--- a/sys/sys/timeffc.h
+++ b/sys/sys/timeffc.h
@@ -81,19 +81,75 @@ extern int sysclock_active;
#define FFCLOCK_STA_WARMUP 2
/*
- * Clock flags to select how the feed-forward counter is converted to absolute
- * time by ffclock_convert_abs().
- * FAST: do not read the hardware counter, return feed-forward clock time
- * at last tick. The time returned has the resolution of the kernel
- * tick (1/hz [s]).
- * LERP: linear interpolation of ffclock time to guarantee monotonic time.
- * LEAPSEC: include leap seconds.
- * UPTIME: removes time of boot.
+ * Flags for use by sysclock_snap2bintime() and various ffclock_ functions to
+ * control how the timecounter hardware is read and how the hardware snapshot is
+ * converted into absolute time.
+ * {FB|FF}CLOCK_FAST: Do not read the hardware counter, instead using the
+ * value at last tick. The time returned has a resolution
+ * of the kernel tick timer (1/hz [s]).
+ * FFCLOCK_LERP: Linear interpolation of ffclock time to guarantee
+ * monotonic time.
+ * FFCLOCK_LEAPSEC: Include leap seconds.
+ * {FB|FF}CLOCK_UPTIME: Time stamp should be relative to system boot, not epoch.
*/
-#define FFCLOCK_FAST 1
-#define FFCLOCK_LERP 2
-#define FFCLOCK_LEAPSEC 4
-#define FFCLOCK_UPTIME 8
+#define FFCLOCK_FAST 0x00000001
+#define FFCLOCK_LERP 0x00000002
+#define FFCLOCK_LEAPSEC 0x00000004
+#define FFCLOCK_UPTIME 0x00000008
+#define FFCLOCK_MASK 0x0000ffff
+
+#define FBCLOCK_FAST 0x00010000 /* Currently unused. */
+#define FBCLOCK_UPTIME 0x00020000
+#define FBCLOCK_MASK 0xffff0000
+
+/*
+ * Feedback clock specific info structure. The feedback clock's estimation of
+ * clock error is an absolute figure determined by the NTP algorithm. The status
+ * is determined by the userland daemon.
+ */
+struct fbclock_info {
+ struct bintime error;
+ struct bintime tick_time;
+ uint64_t th_scale;
+ int status;
+};
+
+/*
+ * Feed-forward clock specific info structure. The feed-forward clock's
+ * estimation of clock error is an upper bound, which although potentially
+ * looser than the feedback clock equivalent, is much more reliable. The status
+ * is determined by the userland daemon.
+ */
+struct ffclock_info {
+ struct bintime error;
+ struct bintime tick_time;
+ struct bintime tick_time_lerp;
+ uint64_t period;
+ uint64_t period_lerp;
+ int leapsec_adjustment;
+ int status;
+};
+
+/*
+ * Snapshot of system clocks and related information. Holds time read from each
+ * clock based on a single read of the active hardware timecounter, as well as
+ * respective clock information such as error estimates and the ffcounter value
+ * at the time of the read.
+ */
+struct sysclock_snap {
+ struct fbclock_info fb_info;
+ struct ffclock_info ff_info;
+ ffcounter ffcount;
+ unsigned int delta;
+ int sysclock_active;
+};
+
+/* Take a snapshot of the system clocks and related information. */
+void sysclock_getsnapshot(struct sysclock_snap *clock_snap, int fast);
+
+/* Convert a timestamp from the selected system clock into bintime. */
+int sysclock_snap2bintime(struct sysclock_snap *cs, struct bintime *bt,
+ int whichclock, uint32_t flags);
/* Resets feed-forward clock from RTC */
void ffclock_reset_clock(struct timespec *ts);
diff --git a/sys/sys/types.h b/sys/sys/types.h
index 1b994d3..d2256e7 100644
--- a/sys/sys/types.h
+++ b/sys/sys/types.h
@@ -72,7 +72,7 @@ typedef __int64_t quad_t;
typedef quad_t * qaddr_t;
typedef char * caddr_t; /* core address */
-typedef __const char * c_caddr_t; /* core address, pointer to const */
+typedef const char * c_caddr_t; /* core address, pointer to const */
typedef __volatile char *v_caddr_t; /* core address, pointer to volatile */
#ifndef _BLKSIZE_T_DECLARED
@@ -261,6 +261,16 @@ typedef __uint64_t uoff_t;
typedef char vm_memattr_t; /* memory attribute codes */
typedef struct vm_page *vm_page_t;
+#if !defined(__bool_true_false_are_defined) && !defined(__cplusplus)
+#define __bool_true_false_are_defined 1
+#define false 0
+#define true 1
+#if __STDC_VERSION__ < 199901L && __GNUC__ < 3 && !defined(__INTEL_COMPILER)
+typedef int _Bool;
+#endif
+typedef _Bool bool;
+#endif /* !__bool_true_false_are_defined && !__cplusplus */
+
#define offsetof(type, field) __offsetof(type, field)
#endif /* !_KERNEL */
diff --git a/sys/sys/ucontext.h b/sys/sys/ucontext.h
index baa179e..87a2fb1 100644
--- a/sys/sys/ucontext.h
+++ b/sys/sys/ucontext.h
@@ -72,11 +72,17 @@ struct ucontext4 {
__BEGIN_DECLS
int getcontext(ucontext_t *);
+ucontext_t *getcontextx(void);
int setcontext(const ucontext_t *);
void makecontext(ucontext_t *, void (*)(void), int, ...);
int signalcontext(ucontext_t *, int, __sighandler_t *);
int swapcontext(ucontext_t *, const ucontext_t *);
+#if __BSD_VISIBLE
+size_t __getcontextx_size(void);
+int __fillcontextx(char *ctx);
+#endif
+
__END_DECLS
#else /* _KERNEL */
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h
index 7382336..0ef4979 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -578,10 +578,14 @@ struct vattr;
struct vnode;
/* cache_* may belong in namei.h. */
-void cache_enter(struct vnode *dvp, struct vnode *vp,
- struct componentname *cnp);
-int cache_lookup(struct vnode *dvp, struct vnode **vpp,
- struct componentname *cnp);
+#define cache_enter(dvp, vp, cnp) \
+ cache_enter_time(dvp, vp, cnp, NULL)
+void cache_enter_time(struct vnode *dvp, struct vnode *vp,
+ struct componentname *cnp, struct timespec *tsp);
+#define cache_lookup(dvp, vpp, cnp) \
+ cache_lookup_times(dvp, vpp, cnp, NULL, NULL)
+int cache_lookup_times(struct vnode *dvp, struct vnode **vpp,
+ struct componentname *cnp, struct timespec *tsp, int *ticksp);
void cache_purge(struct vnode *vp);
void cache_purge_negative(struct vnode *vp);
void cache_purgevfs(struct mount *mp);
@@ -605,6 +609,8 @@ int vn_fullpath(struct thread *td, struct vnode *vn,
int vn_fullpath_global(struct thread *td, struct vnode *vn,
char **retbuf, char **freebuf);
int vn_commname(struct vnode *vn, char *buf, u_int buflen);
+int vn_path_to_global_path(struct thread *td, struct vnode *vp,
+ char *path, u_int pathlen);
int vaccess(enum vtype type, mode_t file_mode, uid_t file_uid,
gid_t file_gid, accmode_t accmode, struct ucred *cred,
int *privused);
@@ -705,6 +711,7 @@ int vop_panic(struct vop_generic_args *ap);
/* These are called from within the actual VOPS. */
void vop_create_post(void *a, int rc);
+void vop_deleteextattr_post(void *a, int rc);
void vop_link_post(void *a, int rc);
void vop_lock_pre(void *a);
void vop_lock_post(void *a, int rc);
@@ -717,6 +724,7 @@ void vop_rename_post(void *a, int rc);
void vop_rename_pre(void *a);
void vop_rmdir_post(void *a, int rc);
void vop_setattr_post(void *a, int rc);
+void vop_setextattr_post(void *a, int rc);
void vop_strategy_pre(void *a);
void vop_symlink_post(void *a, int rc);
void vop_unlock_post(void *a, int rc);
diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c
index 5f984b4..68ea172 100644
--- a/sys/ufs/ffs/ffs_alloc.c
+++ b/sys/ufs/ffs/ffs_alloc.c
@@ -1745,9 +1745,9 @@ ffs_nodealloccg(ip, cg, ipref, mode, unused)
struct cg *cgp;
struct buf *bp, *ibp;
struct ufsmount *ump;
- u_int8_t *inosused;
+ u_int8_t *inosused, *loc;
struct ufs2_dinode *dp2;
- int error, start, len, loc, map, i;
+ int error, start, len, i;
fs = ip->i_fs;
ump = ip->i_ump;
@@ -1777,25 +1777,19 @@ ffs_nodealloccg(ip, cg, ipref, mode, unused)
}
start = cgp->cg_irotor / NBBY;
len = howmany(fs->fs_ipg - cgp->cg_irotor, NBBY);
- loc = skpc(0xff, len, &inosused[start]);
- if (loc == 0) {
+ loc = memcchr(&inosused[start], 0xff, len);
+ if (loc == NULL) {
len = start + 1;
start = 0;
- loc = skpc(0xff, len, &inosused[0]);
- if (loc == 0) {
+ loc = memcchr(&inosused[start], 0xff, len);
+ if (loc == NULL) {
printf("cg = %d, irotor = %ld, fs = %s\n",
cg, (long)cgp->cg_irotor, fs->fs_fsmnt);
panic("ffs_nodealloccg: map corrupted");
/* NOTREACHED */
}
}
- i = start + len - loc;
- map = inosused[i] ^ 0xff;
- if (map == 0) {
- printf("fs = %s\n", fs->fs_fsmnt);
- panic("ffs_nodealloccg: block not in map");
- }
- ipref = i * NBBY + ffs(map) - 1;
+ ipref = (loc - inosused) * NBBY + ffs(~*loc) - 1;
cgp->cg_irotor = ipref;
gotit:
/*
diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c
index c8d8969..adc1d78 100644
--- a/sys/ufs/ffs/ffs_snapshot.c
+++ b/sys/ufs/ffs/ffs_snapshot.c
@@ -225,10 +225,18 @@ ffs_snapshot(mp, snapfile)
ump = VFSTOUFS(mp);
fs = ump->um_fs;
sn = NULL;
+ /*
+ * At the moment, journaled soft updates cannot support
+ * taking snapshots.
+ */
+ if (MOUNTEDSUJ(mp)) {
+ vfs_mount_error(mp, "%s: Snapshots are not yet supported when "
+ "running with journaled soft updates", fs->fs_fsmnt);
+ return (EOPNOTSUPP);
+ }
MNT_ILOCK(mp);
flag = mp->mnt_flag;
MNT_IUNLOCK(mp);
-
/*
* Need to serialize access to snapshot code per filesystem.
*/
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index 4f688a2..a97d23a 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -144,7 +144,7 @@ ffs_mount(struct mount *mp)
struct fs *fs;
pid_t fsckpid = 0;
int error, flags;
- u_int mntorflags;
+ uint64_t mntorflags;
accmode_t accmode;
struct nameidata ndp;
char *fspec;
@@ -196,11 +196,13 @@ ffs_mount(struct mount *mp)
if (mp->mnt_flag & MNT_UPDATE) {
if (VFSTOUFS(mp)->um_fs->fs_ronly == 0 &&
vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0) == 0) {
- printf("Checker enable: Must be read-only\n");
+ vfs_mount_error(mp,
+ "Checker enable: Must be read-only");
return (EINVAL);
}
} else if (vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0) == 0) {
- printf("Checker enable: Must be read-only\n");
+ vfs_mount_error(mp,
+ "Checker enable: Must be read-only");
return (EINVAL);
}
/* Set to -1 if we are done */
@@ -210,8 +212,9 @@ ffs_mount(struct mount *mp)
if (vfs_getopt(mp->mnt_optnew, "nfsv4acls", NULL, NULL) == 0) {
if (mntorflags & MNT_ACLS) {
- printf("WARNING: \"acls\" and \"nfsv4acls\" "
- "options are mutually exclusive\n");
+ vfs_mount_error(mp,
+ "\"acls\" and \"nfsv4acls\" options "
+ "are mutually exclusive");
return (EINVAL);
}
mntorflags |= MNT_NFS4ACLS;
@@ -292,8 +295,8 @@ ffs_mount(struct mount *mp)
}
if (fs->fs_pendingblocks != 0 ||
fs->fs_pendinginodes != 0) {
- printf("%s: %s: blocks %jd files %d\n",
- fs->fs_fsmnt, "update error",
+ printf("WARNING: %s Update error: blocks %jd "
+ "files %d\n", fs->fs_fsmnt,
(intmax_t)fs->fs_pendingblocks,
fs->fs_pendinginodes);
fs->fs_pendingblocks = 0;
@@ -336,7 +339,8 @@ ffs_mount(struct mount *mp)
* If we are running a checker, do not allow upgrade.
*/
if (ump->um_fsckpid > 0) {
- printf("Active checker, cannot rw upgrade\n");
+ vfs_mount_error(mp,
+ "Active checker, cannot upgrade to write");
return (EINVAL);
}
/*
@@ -360,15 +364,16 @@ ffs_mount(struct mount *mp)
((fs->fs_flags &
(FS_SUJ | FS_NEEDSFSCK)) == 0 &&
(fs->fs_flags & FS_DOSOFTDEP))) {
- printf("WARNING: %s was not %s\n",
- fs->fs_fsmnt, "properly dismounted");
+ 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);
- if (fs->fs_flags & FS_SUJ)
- printf(
-"WARNING: Forced mount will invalidate journal contents\n");
+ vfs_mount_error(mp,
+ "R/W mount of %s denied. %s.%s",
+ fs->fs_fsmnt,
+ "Filesystem is not clean - run fsck",
+ (fs->fs_flags & FS_SUJ) == 0 ? "" :
+ " Forced mount will invalidate"
+ " journal contents");
return (EPERM);
}
}
@@ -439,7 +444,8 @@ ffs_mount(struct mount *mp)
*/
if (fsckpid > 0) {
if (ump->um_fsckpid != 0) {
- printf("Active checker already running on %s\n",
+ vfs_mount_error(mp,
+ "Active checker already running on %s",
fs->fs_fsmnt);
return (EINVAL);
}
@@ -454,7 +460,8 @@ ffs_mount(struct mount *mp)
g_topology_unlock();
PICKUP_GIANT();
if (error) {
- printf("Checker activation failed on %s\n",
+ vfs_mount_error(mp,
+ "Checker activation failed on %s",
fs->fs_fsmnt);
return (error);
}
@@ -543,8 +550,8 @@ ffs_mount(struct mount *mp)
g_topology_unlock();
PICKUP_GIANT();
if (error) {
- printf("Checker activation failed on %s\n",
- fs->fs_fsmnt);
+ printf("WARNING: %s: Checker activation "
+ "failed\n", fs->fs_fsmnt);
} else {
ump->um_fsckpid = fsckpid;
if (fs->fs_snapinum[0] != 0)
@@ -564,7 +571,7 @@ ffs_mount(struct mount *mp)
*/
static int
-ffs_cmount(struct mntarg *ma, void *data, int flags)
+ffs_cmount(struct mntarg *ma, void *data, uint64_t flags)
{
struct ufs_args args;
struct export_args exp;
@@ -655,8 +662,8 @@ ffs_reload(struct mount *mp, struct thread *td)
ffs_oldfscompat_read(fs, VFSTOUFS(mp), sblockloc);
UFS_LOCK(ump);
if (fs->fs_pendingblocks != 0 || fs->fs_pendinginodes != 0) {
- printf("%s: reload pending error: blocks %jd files %d\n",
- fs->fs_fsmnt, (intmax_t)fs->fs_pendingblocks,
+ printf("WARNING: %s: reload pending error: blocks %jd "
+ "files %d\n", fs->fs_fsmnt, (intmax_t)fs->fs_pendingblocks,
fs->fs_pendinginodes);
fs->fs_pendingblocks = 0;
fs->fs_pendinginodes = 0;
@@ -822,27 +829,25 @@ ffs_mountfs(devvp, mp, td)
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);
- if (fs->fs_flags & FS_SUJ)
- printf(
-"WARNING: Forced mount will invalidate journal contents\n");
+ vfs_mount_error(mp, "R/W mount of %s denied. %s%s",
+ fs->fs_fsmnt, "Filesystem is not clean - run fsck.",
+ (fs->fs_flags & FS_SUJ) == 0 ? "" :
+ " Forced mount will invalidate journal contents");
error = EPERM;
goto out;
}
if ((fs->fs_pendingblocks != 0 || fs->fs_pendinginodes != 0) &&
(mp->mnt_flag & MNT_FORCE)) {
- printf("%s: lost blocks %jd files %d\n", fs->fs_fsmnt,
- (intmax_t)fs->fs_pendingblocks,
+ printf("WARNING: %s: lost blocks %jd files %d\n",
+ fs->fs_fsmnt, (intmax_t)fs->fs_pendingblocks,
fs->fs_pendinginodes);
fs->fs_pendingblocks = 0;
fs->fs_pendinginodes = 0;
}
}
if (fs->fs_pendingblocks != 0 || fs->fs_pendinginodes != 0) {
- printf("%s: mount pending error: blocks %jd files %d\n",
- fs->fs_fsmnt, (intmax_t)fs->fs_pendingblocks,
+ printf("WARNING: %s: mount pending error: blocks %jd "
+ "files %d\n", fs->fs_fsmnt, (intmax_t)fs->fs_pendingblocks,
fs->fs_pendinginodes);
fs->fs_pendingblocks = 0;
fs->fs_pendinginodes = 0;
@@ -862,16 +867,15 @@ ffs_mountfs(devvp, mp, td)
mp->mnt_flag |= MNT_GJOURNAL;
MNT_IUNLOCK(mp);
} else {
- printf(
-"WARNING: %s: GJOURNAL flag on fs but no gjournal provider below\n",
+ printf("WARNING: %s: GJOURNAL flag on fs "
+ "but no gjournal provider below\n",
mp->mnt_stat.f_mntonname);
free(mp->mnt_gjprovider, M_UFSMNT);
mp->mnt_gjprovider = NULL;
}
#else
- printf(
-"WARNING: %s: GJOURNAL flag on fs but no UFS_GJOURNAL support\n",
- mp->mnt_stat.f_mntonname);
+ printf("WARNING: %s: GJOURNAL flag on fs but no "
+ "UFS_GJOURNAL support\n", mp->mnt_stat.f_mntonname);
#endif
} else {
mp->mnt_gjprovider = NULL;
@@ -955,9 +959,8 @@ ffs_mountfs(devvp, mp, td)
mp->mnt_flag |= MNT_MULTILABEL;
MNT_IUNLOCK(mp);
#else
- printf(
-"WARNING: %s: multilabel flag on fs but no MAC support\n",
- mp->mnt_stat.f_mntonname);
+ printf("WARNING: %s: multilabel flag on fs but "
+ "no MAC support\n", mp->mnt_stat.f_mntonname);
#endif
}
if ((fs->fs_flags & FS_ACLS) != 0) {
@@ -965,8 +968,9 @@ ffs_mountfs(devvp, mp, td)
MNT_ILOCK(mp);
if (mp->mnt_flag & MNT_NFS4ACLS)
- printf("WARNING: ACLs flag on fs conflicts with "
- "\"nfsv4acls\" mount option; option ignored\n");
+ printf("WARNING: %s: ACLs flag on fs conflicts with "
+ "\"nfsv4acls\" mount option; option ignored\n",
+ mp->mnt_stat.f_mntonname);
mp->mnt_flag &= ~MNT_NFS4ACLS;
mp->mnt_flag |= MNT_ACLS;
@@ -981,16 +985,16 @@ ffs_mountfs(devvp, mp, td)
MNT_ILOCK(mp);
if (mp->mnt_flag & MNT_ACLS)
- printf("WARNING: NFSv4 ACLs flag on fs conflicts with "
- "\"acls\" mount option; option ignored\n");
+ printf("WARNING: %s: NFSv4 ACLs flag on fs conflicts "
+ "with \"acls\" mount option; option ignored\n",
+ mp->mnt_stat.f_mntonname);
mp->mnt_flag &= ~MNT_ACLS;
mp->mnt_flag |= MNT_NFS4ACLS;
MNT_IUNLOCK(mp);
#else
- printf(
-"WARNING: %s: NFSv4 ACLs flag on fs but no ACLs support\n",
- mp->mnt_stat.f_mntonname);
+ printf("WARNING: %s: NFSv4 ACLs flag on fs but no "
+ "ACLs support\n", mp->mnt_stat.f_mntonname);
#endif
}
if ((fs->fs_flags & FS_TRIM) != 0) {
@@ -998,12 +1002,12 @@ ffs_mountfs(devvp, mp, td)
if (g_io_getattr("GEOM::candelete", cp, &size,
&ump->um_candelete) == 0) {
if (!ump->um_candelete)
- printf(
-"WARNING: %s: TRIM flag on fs but disk does not support TRIM\n",
+ printf("WARNING: %s: TRIM flag on fs but disk "
+ "does not support TRIM\n",
mp->mnt_stat.f_mntonname);
} else {
- printf(
-"WARNING: %s: TRIM flag on fs but cannot get whether disk supports TRIM\n",
+ printf("WARNING: %s: TRIM flag on fs but disk does "
+ "not confirm that it supports TRIM\n",
mp->mnt_stat.f_mntonname);
ump->um_candelete = 0;
}
@@ -1210,15 +1214,16 @@ ffs_unmount(mp, mntflags)
flags = 0;
td = curthread;
fs = ump->um_fs;
+ susp = 0;
if (mntflags & MNT_FORCE) {
flags |= FORCECLOSE;
susp = fs->fs_ronly != 0;
- } else
- susp = 0;
+ }
#ifdef UFS_EXTATTR
if ((error = ufs_extattr_stop(mp, td))) {
if (error != EOPNOTSUPP)
- printf("ffs_unmount: ufs_extattr_stop returned %d\n",
+ printf("WARNING: unmount %s: ufs_extattr_stop "
+ "returned errno %d\n", mp->mnt_stat.f_mntonname,
error);
e_restart = 0;
} else {
@@ -1256,8 +1261,8 @@ ffs_unmount(mp, mntflags)
UFS_LOCK(ump);
if (fs->fs_pendingblocks != 0 || fs->fs_pendinginodes != 0) {
- printf("%s: unmount pending error: blocks %jd files %d\n",
- fs->fs_fsmnt, (intmax_t)fs->fs_pendingblocks,
+ printf("WARNING: unmount %s: pending error: blocks %jd "
+ "files %d\n", fs->fs_fsmnt, (intmax_t)fs->fs_pendingblocks,
fs->fs_pendinginodes);
fs->fs_pendingblocks = 0;
fs->fs_pendinginodes = 0;
@@ -1433,10 +1438,9 @@ ffs_sync(mp, waitfor)
td = curthread;
fs = ump->um_fs;
- if (fs->fs_fmod != 0 && fs->fs_ronly != 0 && ump->um_fsckpid == 0) {
- printf("fs = %s\n", fs->fs_fsmnt);
- panic("ffs_sync: rofs mod");
- }
+ if (fs->fs_fmod != 0 && fs->fs_ronly != 0 && ump->um_fsckpid == 0)
+ panic("%s: ffs_sync: modification on read-only filesystem",
+ fs->fs_fsmnt);
/*
* Write back each (modified) inode.
*/
@@ -1844,13 +1848,13 @@ ffs_sbupdate(ump, waitfor, suspended)
bp = sbbp;
if (fs->fs_magic == FS_UFS1_MAGIC && fs->fs_sblockloc != SBLOCK_UFS1 &&
(fs->fs_flags & FS_FLAGS_UPDATED) == 0) {
- printf("%s: correcting fs_sblockloc from %jd to %d\n",
+ printf("WARNING: %s: correcting fs_sblockloc from %jd to %d\n",
fs->fs_fsmnt, fs->fs_sblockloc, SBLOCK_UFS1);
fs->fs_sblockloc = SBLOCK_UFS1;
}
if (fs->fs_magic == FS_UFS2_MAGIC && fs->fs_sblockloc != SBLOCK_UFS2 &&
(fs->fs_flags & FS_FLAGS_UPDATED) == 0) {
- printf("%s: correcting fs_sblockloc from %jd to %d\n",
+ printf("WARNING: %s: correcting fs_sblockloc from %jd to %d\n",
fs->fs_fsmnt, fs->fs_sblockloc, SBLOCK_UFS2);
fs->fs_sblockloc = SBLOCK_UFS2;
}
diff --git a/sys/ufs/ufs/ufs_dirhash.c b/sys/ufs/ufs/ufs_dirhash.c
index 248a101..b51fdff 100644
--- a/sys/ufs/ufs/ufs_dirhash.c
+++ b/sys/ufs/ufs/ufs_dirhash.c
@@ -1248,7 +1248,12 @@ ufsdirhash_lowmem()
{
struct dirhash *dh, *dh_temp;
int memfreed = 0;
- /* XXX: this 10% may need to be adjusted */
+ /*
+ * Will free a *minimum* of 10% of the dirhash, but possibly much
+ * more (depending on dirhashreclaimage). System with large dirhashes
+ * probably also need a much larger dirhashreclaimage.
+ * XXX: this percentage may need to be adjusted.
+ */
int memwanted = ufs_dirhashmem / 10;
ufs_dirhashlowmemcount++;
diff --git a/sys/ufs/ufs/ufs_quota.c b/sys/ufs/ufs/ufs_quota.c
index 59e89f9..ce89efa 100644
--- a/sys/ufs/ufs/ufs_quota.c
+++ b/sys/ufs/ufs/ufs_quota.c
@@ -512,17 +512,29 @@ quotaon(struct thread *td, struct mount *mp, int type, void *fname)
NDINIT(&nd, LOOKUP, FOLLOW | MPSAFE, UIO_USERSPACE, fname, td);
flags = FREAD | FWRITE;
+ vfs_ref(mp);
+ vfs_unbusy(mp);
error = vn_open(&nd, &flags, 0, NULL);
- if (error)
+ if (error != 0) {
+ vfs_rel(mp);
return (error);
+ }
vfslocked = NDHASGIANT(&nd);
NDFREE(&nd, NDF_ONLY_PNBUF);
vp = nd.ni_vp;
- if (vp->v_type != VREG) {
+ error = vfs_busy(mp, MBF_NOWAIT);
+ vfs_rel(mp);
+ if (error == 0) {
+ if (vp->v_type != VREG) {
+ error = EACCES;
+ vfs_unbusy(mp);
+ }
+ }
+ if (error != 0) {
VOP_UNLOCK(vp, 0);
(void) vn_close(vp, FREAD|FWRITE, td->td_ucred, td);
VFS_UNLOCK_GIANT(vfslocked);
- return (EACCES);
+ return (error);
}
UFS_LOCK(ump);
@@ -531,6 +543,7 @@ quotaon(struct thread *td, struct mount *mp, int type, void *fname)
VOP_UNLOCK(vp, 0);
(void) vn_close(vp, FREAD|FWRITE, td->td_ucred, td);
VFS_UNLOCK_GIANT(vfslocked);
+ vfs_unbusy(mp);
return (EALREADY);
}
ump->um_qflags[type] |= QTF_OPENING|QTF_CLOSING;
@@ -542,6 +555,7 @@ quotaon(struct thread *td, struct mount *mp, int type, void *fname)
UFS_UNLOCK(ump);
(void) vn_close(vp, FREAD|FWRITE, td->td_ucred, td);
VFS_UNLOCK_GIANT(vfslocked);
+ vfs_unbusy(mp);
return (error);
}
VOP_UNLOCK(vp, 0);
@@ -619,6 +633,7 @@ again:
("quotaon: leaking flags"));
UFS_UNLOCK(ump);
+ vfs_unbusy(mp);
return (error);
}
diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c
index 058c155..dba624b 100644
--- a/sys/vm/swap_pager.c
+++ b/sys/vm/swap_pager.c
@@ -233,7 +233,7 @@ swap_reserve_by_cred(vm_ooffset_t incr, struct ucred *cred)
}
if (!res && ppsratecheck(&lastfail, &curfail, 1)) {
printf("uid %d, pid %d: swap reservation for %jd bytes failed\n",
- curproc->p_pid, uip->ui_uid, incr);
+ uip->ui_uid, curproc->p_pid, incr);
}
#ifdef RACCT
diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c
index c552cb7..e4a4bd8 100644
--- a/sys/vm/vm_glue.c
+++ b/sys/vm/vm_glue.c
@@ -77,7 +77,7 @@ __FBSDID("$FreeBSD$");
#include <sys/vmmeter.h>
#include <sys/sx.h>
#include <sys/sysctl.h>
-
+#include <sys/_kstack_cache.h>
#include <sys/eventhandler.h>
#include <sys/kernel.h>
#include <sys/ktr.h>
@@ -331,12 +331,7 @@ vm_sync_icache(vm_map_t map, vm_offset_t va, vm_offset_t sz)
pmap_sync_icache(map->pmap, va, sz);
}
-struct kstack_cache_entry {
- vm_object_t ksobj;
- struct kstack_cache_entry *next_ks_entry;
-};
-
-static struct kstack_cache_entry *kstack_cache;
+struct kstack_cache_entry *kstack_cache;
static int kstack_cache_size = 128;
static int kstacks;
static struct mtx kstack_cache_mtx;
diff --git a/sys/vm/vm_meter.c b/sys/vm/vm_meter.c
index f1fd4fe..784bc61 100644
--- a/sys/vm/vm_meter.c
+++ b/sys/vm/vm_meter.c
@@ -55,21 +55,21 @@ __FBSDID("$FreeBSD$");
struct vmmeter cnt;
SYSCTL_UINT(_vm, VM_V_FREE_MIN, v_free_min,
- CTLFLAG_RW, &cnt.v_free_min, 0, "");
+ CTLFLAG_RW, &cnt.v_free_min, 0, "Minimum low-free-pages threshold");
SYSCTL_UINT(_vm, VM_V_FREE_TARGET, v_free_target,
- CTLFLAG_RW, &cnt.v_free_target, 0, "");
+ CTLFLAG_RW, &cnt.v_free_target, 0, "Desired free pages");
SYSCTL_UINT(_vm, VM_V_FREE_RESERVED, v_free_reserved,
- CTLFLAG_RW, &cnt.v_free_reserved, 0, "");
+ CTLFLAG_RW, &cnt.v_free_reserved, 0, "Pages reserved for deadlock");
SYSCTL_UINT(_vm, VM_V_INACTIVE_TARGET, v_inactive_target,
- CTLFLAG_RW, &cnt.v_inactive_target, 0, "");
+ CTLFLAG_RW, &cnt.v_inactive_target, 0, "Pages desired inactive");
SYSCTL_UINT(_vm, VM_V_CACHE_MIN, v_cache_min,
- CTLFLAG_RW, &cnt.v_cache_min, 0, "");
+ CTLFLAG_RW, &cnt.v_cache_min, 0, "Min pages on cache queue");
SYSCTL_UINT(_vm, VM_V_CACHE_MAX, v_cache_max,
- CTLFLAG_RW, &cnt.v_cache_max, 0, "");
+ CTLFLAG_RW, &cnt.v_cache_max, 0, "Max pages on cache queue");
SYSCTL_UINT(_vm, VM_V_PAGEOUT_FREE_MIN, v_pageout_free_min,
- CTLFLAG_RW, &cnt.v_pageout_free_min, 0, "");
+ CTLFLAG_RW, &cnt.v_pageout_free_min, 0, "Min pages reserved for kernel");
SYSCTL_UINT(_vm, OID_AUTO, v_free_severe,
- CTLFLAG_RW, &cnt.v_free_severe, 0, "");
+ CTLFLAG_RW, &cnt.v_free_severe, 0, "Severe page depletion point");
static int
sysctl_vm_loadavg(SYSCTL_HANDLER_ARGS)
@@ -270,104 +270,62 @@ static SYSCTL_NODE(_vm_stats, OID_AUTO, vm, CTLFLAG_RW, 0,
"VM meter vm stats");
SYSCTL_NODE(_vm_stats, OID_AUTO, misc, CTLFLAG_RW, 0, "VM meter misc stats");
-SYSCTL_PROC(_vm_stats_sys, OID_AUTO, v_swtch, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_swtch, 0, vcnt, "IU", "Context switches");
-SYSCTL_PROC(_vm_stats_sys, OID_AUTO, v_trap, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_trap, 0, vcnt, "IU", "Traps");
-SYSCTL_PROC(_vm_stats_sys, OID_AUTO, v_syscall, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_syscall, 0, vcnt, "IU", "Syscalls");
-SYSCTL_PROC(_vm_stats_sys, OID_AUTO, v_intr, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_intr, 0, vcnt, "IU", "Hardware interrupts");
-SYSCTL_PROC(_vm_stats_sys, OID_AUTO, v_soft, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_soft, 0, vcnt, "IU", "Software interrupts");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_vm_faults, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_vm_faults, 0, vcnt, "IU", "VM faults");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_cow_faults, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_cow_faults, 0, vcnt, "IU", "COW faults");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_cow_optim, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_cow_optim, 0, vcnt, "IU", "Optimized COW faults");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_zfod, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_zfod, 0, vcnt, "IU", "Zero fill");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_ozfod, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_ozfod, 0, vcnt, "IU", "Optimized zero fill");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_swapin, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_swapin, 0, vcnt, "IU", "Swapin operations");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_swapout, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_swapout, 0, vcnt, "IU", "Swapout operations");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_swappgsin, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_swappgsin, 0, vcnt, "IU", "Swapin pages");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_swappgsout, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_swappgsout, 0, vcnt, "IU", "Swapout pages");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_vnodein, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_vnodein, 0, vcnt, "IU", "Vnodein operations");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_vnodeout, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_vnodeout, 0, vcnt, "IU", "Vnodeout operations");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_vnodepgsin, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_vnodepgsin, 0, vcnt, "IU", "Vnodein pages");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_vnodepgsout, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_vnodepgsout, 0, vcnt, "IU", "Vnodeout pages");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_intrans, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_intrans, 0, vcnt, "IU", "In transit page blocking");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_reactivated, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_reactivated, 0, vcnt, "IU", "Reactivated pages");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_pdwakeups, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_pdwakeups, 0, vcnt, "IU", "Pagedaemon wakeups");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_pdpages, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_pdpages, 0, vcnt, "IU", "Pagedaemon page scans");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_tcached, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_tcached, 0, vcnt, "IU", "Total pages cached");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_dfree, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_dfree, 0, vcnt, "IU", "");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_pfree, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_pfree, 0, vcnt, "IU", "");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_tfree, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_tfree, 0, vcnt, "IU", "");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_page_size, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_page_size, 0, vcnt, "IU", "");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_page_count, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_page_count, 0, vcnt, "IU", "");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_free_reserved, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_free_reserved, 0, vcnt, "IU", "");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_free_target, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_free_target, 0, vcnt, "IU", "");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_free_min, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_free_min, 0, vcnt, "IU", "");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_free_count, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_free_count, 0, vcnt, "IU", "");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_wire_count, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_wire_count, 0, vcnt, "IU", "");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_active_count, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_active_count, 0, vcnt, "IU", "");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_inactive_target, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_inactive_target, 0, vcnt, "IU", "");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_inactive_count, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_inactive_count, 0, vcnt, "IU", "");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_cache_count, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_cache_count, 0, vcnt, "IU", "");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_cache_min, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_cache_min, 0, vcnt, "IU", "");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_cache_max, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_cache_max, 0, vcnt, "IU", "");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_pageout_free_min, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_pageout_free_min, 0, vcnt, "IU", "");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_interrupt_free_min, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_interrupt_free_min, 0, vcnt, "IU", "");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_forks, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_forks, 0, vcnt, "IU", "Number of fork() calls");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_vforks, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_vforks, 0, vcnt, "IU", "Number of vfork() calls");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_rforks, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_rforks, 0, vcnt, "IU", "Number of rfork() calls");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_kthreads, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_kthreads, 0, vcnt, "IU", "Number of fork() calls by kernel");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_forkpages, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_forkpages, 0, vcnt, "IU", "VM pages affected by fork()");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_vforkpages, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_vforkpages, 0, vcnt, "IU", "VM pages affected by vfork()");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_rforkpages, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_rforkpages, 0, vcnt, "IU", "VM pages affected by rfork()");
-SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_kthreadpages, CTLTYPE_UINT|CTLFLAG_RD|CTLFLAG_MPSAFE,
- &cnt.v_kthreadpages, 0, vcnt, "IU", "VM pages affected by fork() by kernel");
+#define VM_STATS(parent, var, descr) \
+ SYSCTL_PROC(parent, OID_AUTO, var, \
+ CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_MPSAFE, &cnt.var, 0, vcnt, \
+ "IU", descr)
+#define VM_STATS_VM(var, descr) VM_STATS(_vm_stats_vm, var, descr)
+#define VM_STATS_SYS(var, descr) VM_STATS(_vm_stats_sys, var, descr)
-SYSCTL_INT(_vm_stats_misc, OID_AUTO,
- zero_page_count, CTLFLAG_RD, &vm_page_zero_count, 0, "");
+VM_STATS_SYS(v_swtch, "Context switches");
+VM_STATS_SYS(v_trap, "Traps");
+VM_STATS_SYS(v_syscall, "System calls");
+VM_STATS_SYS(v_intr, "Device interrupts");
+VM_STATS_SYS(v_soft, "Software interrupts");
+VM_STATS_VM(v_vm_faults, "Address memory faults");
+VM_STATS_VM(v_cow_faults, "Copy-on-write faults");
+VM_STATS_VM(v_cow_optim, "Optimized COW faults");
+VM_STATS_VM(v_zfod, "Pages zero-filled on demand");
+VM_STATS_VM(v_ozfod, "Optimized zero fill pages");
+VM_STATS_VM(v_swapin, "Swap pager pageins");
+VM_STATS_VM(v_swapout, "Swap pager pageouts");
+VM_STATS_VM(v_swappgsin, "Swap pages swapped in");
+VM_STATS_VM(v_swappgsout, "Swap pages swapped out");
+VM_STATS_VM(v_vnodein, "Vnode pager pageins");
+VM_STATS_VM(v_vnodeout, "Vnode pager pageouts");
+VM_STATS_VM(v_vnodepgsin, "Vnode pages paged in");
+VM_STATS_VM(v_vnodepgsout, "Vnode pages paged out");
+VM_STATS_VM(v_intrans, "In transit page faults");
+VM_STATS_VM(v_reactivated, "Pages reactivated from free list");
+VM_STATS_VM(v_pdwakeups, "Pagedaemon wakeups");
+VM_STATS_VM(v_pdpages, "Pages analyzed by pagedaemon");
+VM_STATS_VM(v_tcached, "Total pages cached");
+VM_STATS_VM(v_dfree, "Pages freed by pagedaemon");
+VM_STATS_VM(v_pfree, "Pages freed by exiting processes");
+VM_STATS_VM(v_tfree, "Total pages freed");
+VM_STATS_VM(v_page_size, "Page size in bytes");
+VM_STATS_VM(v_page_count, "Total number of pages in system");
+VM_STATS_VM(v_free_reserved, "Pages reserved for deadlock");
+VM_STATS_VM(v_free_target, "Pages desired free");
+VM_STATS_VM(v_free_min, "Minimum low-free-pages threshold");
+VM_STATS_VM(v_free_count, "Free pages");
+VM_STATS_VM(v_wire_count, "Wired pages");
+VM_STATS_VM(v_active_count, "Active pages");
+VM_STATS_VM(v_inactive_target, "Desired inactive pages");
+VM_STATS_VM(v_inactive_count, "Inactive pages");
+VM_STATS_VM(v_cache_count, "Pages on cache queue");
+VM_STATS_VM(v_cache_min, "Min pages on cache queue");
+VM_STATS_VM(v_cache_max, "Max pages on cached queue");
+VM_STATS_VM(v_pageout_free_min, "Min pages reserved for kernel");
+VM_STATS_VM(v_interrupt_free_min, "Reserved pages for interrupt code");
+VM_STATS_VM(v_forks, "Number of fork() calls");
+VM_STATS_VM(v_vforks, "Number of vfork() calls");
+VM_STATS_VM(v_rforks, "Number of rfork() calls");
+VM_STATS_VM(v_kthreads, "Number of fork() calls by kernel");
+VM_STATS_VM(v_forkpages, "VM pages affected by fork()");
+VM_STATS_VM(v_vforkpages, "VM pages affected by vfork()");
+VM_STATS_VM(v_rforkpages, "VM pages affected by rfork()");
+VM_STATS_VM(v_kthreadpages, "VM pages affected by fork() by kernel");
+
+SYSCTL_INT(_vm_stats_misc, OID_AUTO, zero_page_count, CTLFLAG_RD,
+ &vm_page_zero_count, 0, "Number of zero-ed free pages");
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index 250b769..1a8ce65 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -841,8 +841,12 @@ rescan:
if (p->valid == 0)
continue;
if (vm_page_sleep_if_busy(p, TRUE, "vpcwai")) {
- if (object->generation != curgeneration)
- goto rescan;
+ if (object->generation != curgeneration) {
+ if ((flags & OBJPC_SYNC) != 0)
+ goto rescan;
+ else
+ clearobjflags = 0;
+ }
np = vm_page_find_least(object, pi);
continue;
}
@@ -851,8 +855,12 @@ rescan:
n = vm_object_page_collect_flush(object, p, pagerflags,
flags, &clearobjflags);
- if (object->generation != curgeneration)
- goto rescan;
+ if (object->generation != curgeneration) {
+ if ((flags & OBJPC_SYNC) != 0)
+ goto rescan;
+ else
+ clearobjflags = 0;
+ }
/*
* If the VOP_PUTPAGES() did a truncated write, so
@@ -938,7 +946,7 @@ vm_object_sync(vm_object_t object, vm_ooffset_t offset, vm_size_t size,
vm_object_t backing_object;
struct vnode *vp;
struct mount *mp;
- int flags;
+ int flags, fsync_after;
if (object == NULL)
return;
@@ -971,11 +979,26 @@ vm_object_sync(vm_object_t object, vm_ooffset_t offset, vm_size_t size,
(void) vn_start_write(vp, &mp, V_WAIT);
vfslocked = VFS_LOCK_GIANT(vp->v_mount);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
- flags = (syncio || invalidate) ? OBJPC_SYNC : 0;
- flags |= invalidate ? OBJPC_INVAL : 0;
+ if (syncio && !invalidate && offset == 0 &&
+ OFF_TO_IDX(size) == object->size) {
+ /*
+ * If syncing the whole mapping of the file,
+ * it is faster to schedule all the writes in
+ * async mode, also allowing the clustering,
+ * and then wait for i/o to complete.
+ */
+ flags = 0;
+ fsync_after = TRUE;
+ } else {
+ flags = (syncio || invalidate) ? OBJPC_SYNC : 0;
+ flags |= invalidate ? (OBJPC_SYNC | OBJPC_INVAL) : 0;
+ fsync_after = FALSE;
+ }
VM_OBJECT_LOCK(object);
vm_object_page_clean(object, offset, offset + size, flags);
VM_OBJECT_UNLOCK(object);
+ if (fsync_after)
+ (void) VOP_FSYNC(vp, MNT_WAIT, curthread);
VOP_UNLOCK(vp, 0);
VFS_UNLOCK_GIANT(vfslocked);
vn_finished_write(mp);
@@ -1308,6 +1331,21 @@ retry:
VM_OBJECT_LOCK(new_object);
goto retry;
}
+#if VM_NRESERVLEVEL > 0
+ /*
+ * If some of the reservation's allocated pages remain with
+ * the original object, then transferring the reservation to
+ * the new object is neither particularly beneficial nor
+ * particularly harmful as compared to leaving the reservation
+ * with the original object. If, however, all of the
+ * reservation's allocated pages are transferred to the new
+ * object, then transferring the reservation is typically
+ * beneficial. Determining which of these two cases applies
+ * would be more costly than unconditionally renaming the
+ * reservation.
+ */
+ vm_reserv_rename(m, new_object, orig_object, offidxstart);
+#endif
vm_page_lock(m);
vm_page_rename(m, new_object, idx);
vm_page_unlock(m);
diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h
index 0c6c875..599df51 100644
--- a/sys/vm/vm_object.h
+++ b/sys/vm/vm_object.h
@@ -96,7 +96,7 @@ struct vm_object {
objtype_t type; /* type of pager */
u_short flags; /* see below */
u_short pg_color; /* (c) color of first page in obj */
- u_short paging_in_progress; /* Paging (in or out) so don't collapse or destroy */
+ u_int paging_in_progress; /* Paging (in or out) so don't collapse or destroy */
int resident_page_count; /* number of resident pages */
struct vm_object *backing_object; /* object that I'm a shadow of */
vm_ooffset_t backing_object_offset;/* Offset in backing object */
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c
index 5dd450e..7e63689 100644
--- a/sys/vm/vm_pageout.c
+++ b/sys/vm/vm_pageout.c
@@ -714,11 +714,8 @@ vm_pageout_map_deactivate_pages(map, desired)
* table pages.
*/
if (desired == 0 && nothingwired) {
- tmpe = map->header.next;
- while (tmpe != &map->header) {
- pmap_remove(vm_map_pmap(map), tmpe->start, tmpe->end);
- tmpe = tmpe->next;
- }
+ pmap_remove(vm_map_pmap(map), vm_map_min(map),
+ vm_map_max(map));
}
vm_map_unlock(map);
}
diff --git a/sys/x86/acpica/srat.c b/sys/x86/acpica/srat.c
index cd04f87..6c6eb8f 100644
--- a/sys/x86/acpica/srat.c
+++ b/sys/x86/acpica/srat.c
@@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$");
#include <dev/acpica/acpivar.h>
+#if VM_NDOMAIN > 1
struct cpu_info {
int enabled:1;
int has_memory:1;
@@ -237,9 +238,9 @@ check_phys_avail(void)
/*
* Renumber the memory domains to be compact and zero-based if not
- * already.
+ * already. Returns an error if there are too many domains.
*/
-static void
+static int
renumber_domains(void)
{
int domains[VM_PHYSSEG_MAX];
@@ -261,6 +262,11 @@ renumber_domains(void)
for (j = ndomain; j > slot; j--)
domains[j] = domains[j - 1];
domains[slot] = mem_info[i].domain;
+ ndomain++;
+ if (ndomain > VM_NDOMAIN) {
+ printf("SRAT: Too many memory domains\n");
+ return (EFBIG);
+ }
}
/* Renumber each domain to its index in the sorted 'domains' list. */
@@ -280,6 +286,7 @@ renumber_domains(void)
if (cpus[j].enabled && cpus[j].domain == domains[i])
cpus[j].domain = i;
}
+ return (0);
}
/*
@@ -306,13 +313,12 @@ parse_srat(void *dummy)
srat_walk_table(srat_parse_entry, &error);
acpi_unmap_table(srat);
srat = NULL;
- if (error || check_domains() != 0 || check_phys_avail() != 0) {
+ if (error || check_domains() != 0 || check_phys_avail() != 0 ||
+ renumber_domains() != 0) {
srat_physaddr = 0;
return;
}
- renumber_domains();
-
/* Point vm_phys at our memory affinity table. */
mem_affinity = mem_info;
}
@@ -354,3 +360,4 @@ srat_set_cpus(void *dummy)
}
}
SYSINIT(srat_set_cpus, SI_SUB_CPU, SI_ORDER_ANY, srat_set_cpus, NULL);
+#endif /* VM_NDOMAIN > 1 */
diff --git a/sys/xen/xenstore/xenstore.c b/sys/xen/xenstore/xenstore.c
index 284bad3..15b7f9c 100644
--- a/sys/xen/xenstore/xenstore.c
+++ b/sys/xen/xenstore/xenstore.c
@@ -559,7 +559,7 @@ xs_read_store(void *tdata, unsigned len)
* when msleep returns.
*/
error = msleep(xen_store, &xs.ring_lock, PCATCH|PDROP,
- "xbread", /*timout*/0);
+ "xbread", /*timeout*/0);
if (error && error != EWOULDBLOCK)
return (error);
continue;
diff --git a/tools/KSE/ksetest/kse_threads_test.c b/tools/KSE/ksetest/kse_threads_test.c
index 3ab09f9..69ea727 100644
--- a/tools/KSE/ksetest/kse_threads_test.c
+++ b/tools/KSE/ksetest/kse_threads_test.c
@@ -418,7 +418,7 @@ uts(struct kse_mailbox *km)
simplelock_lock(&data->runq->lock);
/*
- * Process any signals we've recieved (but only if we have
+ * Process any signals we've received (but only if we have
* somewhere to deliver them to).
*/
if ((data->runq->head != NULL) && SIGNOTEMPTY(km->km_sigscaught)) {
diff --git a/tools/bsdbox/Makefile b/tools/bsdbox/Makefile
new file mode 100644
index 0000000..8656da6
--- /dev/null
+++ b/tools/bsdbox/Makefile
@@ -0,0 +1,115 @@
+#$FreeBSD$
+# @(#)Makefile 8.1 (Berkeley) 6/2/93
+
+NO_MAN=
+
+.include <bsd.own.mk>
+MK_SSP= no
+
+PROG= bsdbox
+BINDIR?=/sbin
+
+#################################################################
+#
+# General notes:
+#
+# A number of Make variables are used to generate the crunchgen config file.
+#
+# CRUNCH_SRCDIRS: lists directories to search for included programs
+# CRUNCH_PROGS: lists programs to be included
+# CRUNCH_LIBS: libraries to statically link with
+# CRUNCH_SHLIBS: libraries to dynamically link with
+# CRUNCH_BUILDOPTS: generic build options to be added to every program
+# CRUNCH_BUILDTOOLS: lists programs that need build tools built in the
+# local architecture.
+#
+# Special options can be specified for individual programs
+# CRUNCH_SRCDIR_$(P): base source directory for program $(P)
+# CRUNCH_BUILDOPTS_$(P): additional build options for $(P)
+# CRUNCH_ALIAS_$(P): additional names to be used for $(P)
+#
+# By default, any name appearing in CRUNCH_PROGS or CRUNCH_ALIAS_${P}
+# will be used to generate a hard link to the resulting binary.
+# Specific links can be suppressed by setting
+# CRUNCH_SUPPRESS_LINK_$(NAME) to 1.
+#
+
+# Define Makefile variable RESCUE
+CRUNCH_BUILDOPTS+= -DRESCUE
+
+# Don't do symlinks as part of the install
+CRUNCH_GENERATE_LINKS= no
+
+# Which sources have local-arch build tools?
+# Define as blank; othrs need to override
+CRUNCH_BUILDTOOLS=
+
+###################################################################
+# Programs from stock /bin
+#
+# WARNING: Changing this list may require adjusting
+# /usr/include/paths.h as well! You were warned!
+#
+CRUNCH_SRCDIRS+= bin
+# These are required to be shared so login and su can run as
+# setuid binaries - they use these libraries. PAM needs to be
+# built dynamically or it tries to build _all_ of the modules
+# statically - and that ends very badly.
+CRUNCH_SHLIBS+= -lc -lutil
+CRUNCH_LIBS+= -lkvm -lmemstat -lnetgraph
+CRUNCH_LIBS+= -lcrypt -ledit -ll -ltermcap
+
+###################################################################
+# Programs from standard /sbin
+#
+# WARNING: Changing this list may require adjusting
+# /usr/include/paths.h as well! You were warned!
+#
+# Note that mdmfs have their own private 'pathnames.h'
+# headers in addition to the standard 'paths.h' header.
+#
+CRUNCH_SRCDIRS+= sbin
+
+CRUNCH_LIBS+= -lalias -lcam -lcurses -ldevstat -lipsec
+# Don't forget this - ifconfig, etc -adrian
+.if ${MK_IPX} != "no"
+CRUNCH_LIBS+= -lipx
+.endif
+CRUNCH_LIBS+= -lgeom -lbsdxml -ljail -lkiconv -lmd -lsbuf -lufs
+
+##################################################################
+# Programs from stock /usr/bin
+#
+CRUNCH_SRCDIRS+= usr.bin
+# grep
+CRUNCH_LIBS+= -lbz2
+
+##################################################################
+# Programs from stock /usr/sbin
+#
+CRUNCH_SRCDIRS+= usr.sbin
+
+##################################################################
+
+CRUNCH_SRCDIRS+= libexec
+
+CRUNCH_LIBS+= -lm
+
+.include "Makefile.base"
+.include "Makefile.net"
+.include "Makefile.hostapd"
+.include "Makefile.textproc"
+.include "Makefile.login"
+.include "Makefile.kld"
+# telnet/telnetd are too broken to include as a crunchgen'ed binary,
+# thanks to some of the horrible layering violations going on.
+# .include "Makefile.telnetd"
+.include "Makefile.fs"
+
+CRUNCH_LIBS+= -lcrypto -lssl -lz
+
+# the crunchgen build environment
+.include <bsd.crunchgen.mk>
+
+# and since it creates a program..
+.include <bsd.prog.mk>
diff --git a/tools/bsdbox/Makefile.base b/tools/bsdbox/Makefile.base
new file mode 100644
index 0000000..5e8e9a3
--- /dev/null
+++ b/tools/bsdbox/Makefile.base
@@ -0,0 +1,55 @@
+#
+# This builds a variety of "base" tools, useful for an embedded
+# system.
+#
+# $FreeBSD$
+#
+CRUNCH_PROGS_sbin+= dmesg sysctl init reboot
+CRUNCH_PROGS_bin+= ls cat dd df cp hostname kill mkdir sleep ps ln rm hostname
+CRUNCH_PROGS_usr.bin+= true false hexdump tail nc w head uname tset
+CRUNCH_PROGS_usr.sbin+= gpioctl
+CRUNCH_ALIAS_w= uptime
+CRUNCH_ALIAS_tset= reset
+
+CRUNCH_PROGS_usr.bin+= vmstat systat
+CRUNCH_LIBS+= -ldevstat -lncursesw -lncurses -lmemstat -lkvm
+
+CRUNCH_PROGS_usr.bin+= tar cpio
+# XXX SSL ?
+CRUNCH_LIBS+= -larchive -lbz2 -lz -llzma -lbsdxml -lssl -lcrypto
+
+# Clear requires tput, and it's a shell script so it won't be crunched
+CRUNCH_PROGS_usr.bin+= tput
+
+# sh
+CRUNCH_PROGS_bin+= sh
+CRUNCH_ALIAS_sh= -sh
+CRUNCH_SUPPRESS_LINK_-sh= 1
+CRUNCH_BUILDTOOLS+= bin/sh
+
+# chown
+CRUNCH_PROGS_usr.sbin+= chown
+CRUNCH_ALIAS_chown= chgrp
+
+# Basic filesystem stuff
+CRUNCH_PROGS_sbin+= mount umount
+
+# grep
+# grep doesn't yet work -adrian
+CRUNCH_PROGS_usr.bin+= grep
+
+# less/more
+CRUNCH_PROGS_usr.bin+= less
+CRUNCH_ALIAS_less= more
+
+# passwd
+CRUNCH_PROGS_usr.bin+= passwd
+# These need to be shared, or PAM wants to include _all_ of the libraries
+# at runtime.
+CRUNCH_SHLIBS+= -lpam -lbsm
+
+# gzip/gunzip
+CRUNCH_PROGS_usr.bin+= gzip
+CRUNCH_ALIAS_gunzip= gzip
+CRUNCH_ALIAS_gzcat= gzip
+CRUNCH_LIBS+= -lz -llzma -lbz2
diff --git a/tools/bsdbox/Makefile.fs b/tools/bsdbox/Makefile.fs
new file mode 100644
index 0000000..03fe4b5
--- /dev/null
+++ b/tools/bsdbox/Makefile.fs
@@ -0,0 +1,17 @@
+#
+# Filesystem related tools
+#
+# $FreeBSD$
+
+# mfs
+CRUNCH_PROGS_sbin+= mdmfs mdconfig newfs
+CRUNCH_ALIAS_mdmfs= mount_mfs
+
+# UFS
+CRUNCH_PROGS_sbin+= fsck_ffs
+CRUNCH_LIBS+= -lgeom
+CRUNCH_LIBS+= -lufs
+
+# msdos
+# CRUNCH_PROGS_sbin+= mount_msdosfs
+# CRUNCH_LIBS+= -lkiconv
diff --git a/tools/bsdbox/Makefile.hostapd b/tools/bsdbox/Makefile.hostapd
new file mode 100644
index 0000000..e16a0d1
--- /dev/null
+++ b/tools/bsdbox/Makefile.hostapd
@@ -0,0 +1,15 @@
+#
+# Build hostap/wpa_supplicant and supporting utilities.
+#
+# $FreeBSD$
+#
+CRUNCH_PROGS_usr.sbin+= hostapd hostapd_cli
+CRUNCH_SRCDIR_hostapd= $(.CURDIR)/../../usr.sbin/wpa/hostapd
+CRUNCH_SRCDIR_hostapd_cli= $(.CURDIR)/../../usr.sbin/wpa/hostapd_cli
+
+CRUNCH_PROGS_usr.sbin+= wpa_supplicant wpa_cli
+CRUNCH_SRCDIR_wpa_supplicant= $(.CURDIR)/../../usr.sbin/wpa/wpa_supplicant
+CRUNCH_SRCDIR_wpa_cli= $(.CURDIR)/../../usr.sbin/wpa/wpa_cli
+
+CRUNCH_LIBS+= -lpcap
+
diff --git a/tools/bsdbox/Makefile.kld b/tools/bsdbox/Makefile.kld
new file mode 100644
index 0000000..96be779
--- /dev/null
+++ b/tools/bsdbox/Makefile.kld
@@ -0,0 +1,6 @@
+#
+# This builds the kld related programs.
+#
+# $FreeBSD$
+#
+CRUNCH_PROGS_sbin+= kldload kldunload kldstat
diff --git a/tools/bsdbox/Makefile.login b/tools/bsdbox/Makefile.login
new file mode 100644
index 0000000..a4574ec
--- /dev/null
+++ b/tools/bsdbox/Makefile.login
@@ -0,0 +1,9 @@
+#
+# This builds login and friends.
+#
+# $FreeBSD$
+#
+
+CRUNCH_PROGS_libexec+= getty
+CRUNCH_PROGS_usr.bin+= cap_mkdb
+CRUNCH_PROGS_usr.sbin+= pwd_mkdb
diff --git a/tools/bsdbox/Makefile.net b/tools/bsdbox/Makefile.net
new file mode 100644
index 0000000..1b9bc78
--- /dev/null
+++ b/tools/bsdbox/Makefile.net
@@ -0,0 +1,32 @@
+#
+# This builds network tools.
+#
+# $FreeBSD$
+#
+
+CRUNCH_PROGS_sbin+= route ping
+CRUNCH_PROGS_usr.sbin+= arp
+
+# inetd
+CRUNCH_PROGS_usr.sbin+= inetd
+CRUNCH_LIBS+= -lwrap
+
+#.if ${MK_INET6_SUPPORT} != "no"
+#CRUNCH_PROGS_sbin+= ping6
+#.endif
+
+# netstat
+CRUNCH_PROGS_usr.bin+= netstat
+CRUNCH_LIBS+= -lmemstat -lnetgraph
+CRUNCH_BUILDOPTS_netstat=-DMK_IPX_SUPPORT=no
+
+# ifconfig
+CRUNCH_PROGS_sbin+= ifconfig
+CRUNCH_BUILDOPTS_ifconfig=-DMK_IPX_SUPPORT=no
+
+# wlan stuff
+CRUNCH_PROGS_usr.sbin+= wlandebug
+
+# tcpdump
+CRUNCH_PROGS_usr.sbin+= tcpdump
+# CRUNCH_LIBS+= -lpcap -lcrypto
diff --git a/tools/bsdbox/Makefile.telnetd b/tools/bsdbox/Makefile.telnetd
new file mode 100644
index 0000000..c0d6c4b
--- /dev/null
+++ b/tools/bsdbox/Makefile.telnetd
@@ -0,0 +1,14 @@
+# Build telnetd
+# Question - why is telnetds objects ending up in the srcdir? -adrian
+
+# This won't work yet - because telnetd relies on libtelnet.a which includes
+# kerberos support by default; building telnetd without kerberos support
+# requires the cross-build world to be built the same.
+# -adrian
+
+# $FreeBSD$
+
+CRUNCH_PROGS_libexec+= telnetd
+CRUNCH_PROGS_usr.bin+= telnet
+CRUNCH_LIBS+= -lkrb5 -lhx509 -lasn1 -lcom_err -lroken -ltelnetd
+# CRUNCH_BUILDOPTS_telnetd= WITHOUT_KERBEROS_SUPPORT=yes
diff --git a/tools/bsdbox/Makefile.textproc b/tools/bsdbox/Makefile.textproc
new file mode 100644
index 0000000..a913d46
--- /dev/null
+++ b/tools/bsdbox/Makefile.textproc
@@ -0,0 +1,20 @@
+#
+# This builds a variety of text processing tools that
+# may be useful on an embedded device.
+#
+# $FreeBSD$
+#
+
+# Sed
+CRUNCH_PROGS_usr.bin+= sed
+
+# Awk
+# Disable - it's big! -adrian
+#CRUNCH_PROGS_usr.bin+= awk
+#CRUNCH_BUILDTOOLS+= usr.bin/awk
+
+# vi
+# Disable - it's big! -adrian
+#CRUNCH_PROGS_usr.bin+= vi
+
+CRUNCH_PROGS_usr.bin+= ee
diff --git a/tools/bsdbox/README b/tools/bsdbox/README
new file mode 100644
index 0000000..2f63652
--- /dev/null
+++ b/tools/bsdbox/README
@@ -0,0 +1,12 @@
+$FreeBSD$
+
+This is a very cut down implementation of a "busybox" style binary
+for FreeBSD.
+
+It's based on the rescue build system, which uses the crunchgen functionality
+to build binaries.
+
+It's a work in progress.
+
+ -- adrian
+
diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc
index 3de090d..1ec1ce1 100644
--- a/tools/build/mk/OptionalObsoleteFiles.inc
+++ b/tools/build/mk/OptionalObsoleteFiles.inc
@@ -627,6 +627,8 @@ OLD_FILES+=usr/share/man/man8/zpool.8.gz
.if ${MK_CLANG} == no
OLD_FILES+=usr/bin/clang
OLD_FILES+=usr/bin/clang++
+OLD_FILES+=usr/bin/clang-cpp
+OLD_FILES+=usr/bin/clang-tblgen
OLD_FILES+=usr/bin/tblgen
OLD_FILES+=usr/include/clang/2.8/emmintrin.h
OLD_FILES+=usr/include/clang/2.8/mm_malloc.h
@@ -634,6 +636,39 @@ OLD_FILES+=usr/include/clang/2.8/mmintrin.h
OLD_FILES+=usr/include/clang/2.8/pmmintrin.h
OLD_FILES+=usr/include/clang/2.8/tmmintrin.h
OLD_FILES+=usr/include/clang/2.8/xmmintrin.h
+OLD_DIRS+=usr/include/clang/2.8
+OLD_FILES+=usr/include/clang/2.9/emmintrin.h
+OLD_FILES+=usr/include/clang/2.9/mm_malloc.h
+OLD_FILES+=usr/include/clang/2.9/mmintrin.h
+OLD_FILES+=usr/include/clang/2.9/pmmintrin.h
+OLD_FILES+=usr/include/clang/2.9/tmmintrin.h
+OLD_FILES+=usr/include/clang/2.9/xmmintrin.h
+OLD_DIRS+=usr/include/clang/2.9
+OLD_FILES+=usr/include/clang/3.0/altivec.h
+OLD_FILES+=usr/include/clang/3.0/avxintrin.h
+OLD_FILES+=usr/include/clang/3.0/emmintrin.h
+OLD_FILES+=usr/include/clang/3.0/immintrin.h
+OLD_FILES+=usr/include/clang/3.0/mm3dnow.h
+OLD_FILES+=usr/include/clang/3.0/mm_malloc.h
+OLD_FILES+=usr/include/clang/3.0/mmintrin.h
+OLD_FILES+=usr/include/clang/3.0/nmmintrin.h
+OLD_FILES+=usr/include/clang/3.0/pmmintrin.h
+OLD_FILES+=usr/include/clang/3.0/smmintrin.h
+OLD_FILES+=usr/include/clang/3.0/tmmintrin.h
+OLD_FILES+=usr/include/clang/3.0/wmmintrin.h
+OLD_FILES+=usr/include/clang/3.0/x86intrin.h
+OLD_FILES+=usr/include/clang/3.0/xmmintrin.h
+OLD_DIRS+=usr/include/clang/3.0
+OLD_DIRS+=usr/include/clang
+OLD_FILES+=usr/share/doc/llvm/clang/LICENSE.TXT
+OLD_DIRS+=usr/share/doc/llvm/clang
+OLD_FILES+=usr/share/doc/llvm/COPYRIGHT.regex
+OLD_FILES+=usr/share/doc/llvm/LICENSE.TXT
+OLD_DIRS+=usr/share/doc/llvm
+OLD_FILES+=usr/share/man/man1/clang.1.gz
+OLD_FILES+=usr/share/man/man1/clang++.1.gz
+OLD_FILES+=usr/share/man/man1/clang-cpp.1.gz
+OLD_FILES+=usr/share/man/man1/tblgen.1.gz
.endif
.if ${MK_CPP} == no
diff --git a/tools/build/options/WITHOUT_CAPSICUM b/tools/build/options/WITHOUT_CAPSICUM
new file mode 100644
index 0000000..8d719e9
--- /dev/null
+++ b/tools/build/options/WITHOUT_CAPSICUM
@@ -0,0 +1,2 @@
+.\" $FreeBSD$
+Set to not build Capsicum support into system programs.
diff --git a/tools/build/options/WITHOUT_UTMPX b/tools/build/options/WITHOUT_UTMPX
index 205ca5c..3c98f28 100644
--- a/tools/build/options/WITHOUT_UTMPX
+++ b/tools/build/options/WITHOUT_UTMPX
@@ -3,7 +3,6 @@ Set to not build user accounting tools such as
.Xr last 1 ,
.Xr users 1 ,
.Xr who 1 ,
-.Xr wtmpcvt 1 ,
.Xr ac 8 ,
.Xr lastlogin 8
and
diff --git a/tools/debugscripts/gdbinit.i386 b/tools/debugscripts/gdbinit.i386
index e02b206..95dbf6e 100644
--- a/tools/debugscripts/gdbinit.i386
+++ b/tools/debugscripts/gdbinit.i386
@@ -268,7 +268,7 @@ while (*(int *) $frame > 0xc0000000)
end
end
document btr
-Show a backtrace from the ebp address specified. This can be used to get a backtrace from any stack resident in memory. It's the user's responsiblity to ensure that the address is meaningful.
+Show a backtrace from the ebp address specified. This can be used to get a backtrace from any stack resident in memory. It's the user's responsibility to ensure that the address is meaningful.
end
# btp <pid>
diff --git a/tools/debugscripts/kld_deb.py b/tools/debugscripts/kld_deb.py
index 0ea12ab..5cf0167 100644
--- a/tools/debugscripts/kld_deb.py
+++ b/tools/debugscripts/kld_deb.py
@@ -68,9 +68,9 @@ gdb = popen2.popen4(gdb_cmd)
def searchfor(inp, re, j = 0, l = None):
"""searchfor(inp, re, j, l): Searches for regex re in inp. It will
-automaticly add more lines. If j is set, the lines will be joined together.
+automatically add more lines. If j is set, the lines will be joined together.
l can provide a starting line to help search against. Return value is a
-tupple of the last line, and the match if any."""
+tuple of the last line, and the match if any."""
ret = None
if not l:
l = inp.readline()
@@ -87,7 +87,7 @@ tupple of the last line, and the match if any."""
def get_addresses(inp, out):
"""get_addresses(inp, out): It will search for addresses from gdb.
inp and out, are the gdb input and output respectively. Return value is
-a list of tupples. The tupples contain the filename and the address the
+a list of tuples. The tuples contain the filename and the address the
filename was loaded."""
addr = []
nxad = 1
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_aac b/tools/kerneldoc/subsys/Doxyfile-dev_aac
new file mode 100644
index 0000000..5e5264d
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_aac
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel AAC device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_aac/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/aac/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/aac/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_aac/dev_aac.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_acpi_support b/tools/kerneldoc/subsys/Doxyfile-dev_acpi_support
new file mode 100644
index 0000000..d73861d
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_acpi_support
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel ACPI_SUPPORT device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_acpi_support/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/acpi_support/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/acpi_support/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_acpi_support/dev_acpi_support.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_acpica b/tools/kerneldoc/subsys/Doxyfile-dev_acpica
new file mode 100644
index 0000000..70a1bbc
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_acpica
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel ACPICA device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_acpica/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/acpica/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/acpica/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_acpica/dev_acpica.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_adb b/tools/kerneldoc/subsys/Doxyfile-dev_adb
new file mode 100644
index 0000000..73c9ccb
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_adb
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel ADB device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_adb/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/adb/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/adb/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_adb/dev_adb.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_adlink b/tools/kerneldoc/subsys/Doxyfile-dev_adlink
new file mode 100644
index 0000000..b167e45
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_adlink
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel ADLINK device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_adlink/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/adlink/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/adlink/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_adlink/dev_adlink.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_advansys b/tools/kerneldoc/subsys/Doxyfile-dev_advansys
new file mode 100644
index 0000000..8faa894
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_advansys
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel ADVANSYS device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_advansys/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/advansys/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/advansys/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_advansys/dev_advansys.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_ae b/tools/kerneldoc/subsys/Doxyfile-dev_ae
new file mode 100644
index 0000000..86d85d9
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_ae
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel AE device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_ae/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/ae/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/ae/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_ae/dev_ae.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_age b/tools/kerneldoc/subsys/Doxyfile-dev_age
new file mode 100644
index 0000000..d0629e9
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_age
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel AGE device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_age/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/age/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/age/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_age/dev_age.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_agp b/tools/kerneldoc/subsys/Doxyfile-dev_agp
new file mode 100644
index 0000000..3cc4b29
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_agp
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel AGP device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_agp/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/agp/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/agp/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_agp/dev_agp.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_aha b/tools/kerneldoc/subsys/Doxyfile-dev_aha
new file mode 100644
index 0000000..ee74e3e
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_aha
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel AHA device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_aha/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/aha/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/aha/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_aha/dev_aha.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_ahb b/tools/kerneldoc/subsys/Doxyfile-dev_ahb
new file mode 100644
index 0000000..b55a7a5
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_ahb
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel AHB device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_ahb/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/ahb/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/ahb/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_ahb/dev_ahb.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_ahci b/tools/kerneldoc/subsys/Doxyfile-dev_ahci
new file mode 100644
index 0000000..5fe4062
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_ahci
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel AHCI device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_ahci/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/ahci/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/ahci/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_ahci/dev_ahci.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_aic b/tools/kerneldoc/subsys/Doxyfile-dev_aic
new file mode 100644
index 0000000..fbb1b5d
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_aic
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel AIC device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_aic/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/aic/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/aic/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_aic/dev_aic.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_aic7xxx b/tools/kerneldoc/subsys/Doxyfile-dev_aic7xxx
new file mode 100644
index 0000000..d214bc6
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_aic7xxx
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel AIC7XXX device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_aic7xxx/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/aic7xxx/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/aic7xxx/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_aic7xxx/dev_aic7xxx.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_alc b/tools/kerneldoc/subsys/Doxyfile-dev_alc
new file mode 100644
index 0000000..a75e3fc
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_alc
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel ALC device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_alc/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/alc/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/alc/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_alc/dev_alc.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_ale b/tools/kerneldoc/subsys/Doxyfile-dev_ale
new file mode 100644
index 0000000..4c23f12
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_ale
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel ALE device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_ale/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/ale/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/ale/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_ale/dev_ale.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_amdsbwd b/tools/kerneldoc/subsys/Doxyfile-dev_amdsbwd
new file mode 100644
index 0000000..f97d4fd
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_amdsbwd
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel AMDSBWD device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_amdsbwd/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/amdsbwd/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/amdsbwd/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_amdsbwd/dev_amdsbwd.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_amdtemp b/tools/kerneldoc/subsys/Doxyfile-dev_amdtemp
new file mode 100644
index 0000000..68b0537
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_amdtemp
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel AMDTEMP device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_amdtemp/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/amdtemp/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/amdtemp/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_amdtemp/dev_amdtemp.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_amr b/tools/kerneldoc/subsys/Doxyfile-dev_amr
new file mode 100644
index 0000000..00bf56c
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_amr
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel AMR device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_amr/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/amr/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/amr/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_amr/dev_amr.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_an b/tools/kerneldoc/subsys/Doxyfile-dev_an
new file mode 100644
index 0000000..2073580
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_an
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel AN device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_an/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/an/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/an/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_an/dev_an.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_arcmsr b/tools/kerneldoc/subsys/Doxyfile-dev_arcmsr
new file mode 100644
index 0000000..f14c75d
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_arcmsr
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel ARCMSR device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_arcmsr/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/arcmsr/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/arcmsr/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_arcmsr/dev_arcmsr.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_asmc b/tools/kerneldoc/subsys/Doxyfile-dev_asmc
new file mode 100644
index 0000000..5596f6e
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_asmc
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel ASMC device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_asmc/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/asmc/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/asmc/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_asmc/dev_asmc.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_asr b/tools/kerneldoc/subsys/Doxyfile-dev_asr
new file mode 100644
index 0000000..28554d2
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_asr
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel ASR device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_asr/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/asr/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/asr/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_asr/dev_asr.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_ata b/tools/kerneldoc/subsys/Doxyfile-dev_ata
new file mode 100644
index 0000000..3d16698
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_ata
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel ATA device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_ata/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/ata/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/ata/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_ata/dev_ata.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_ath b/tools/kerneldoc/subsys/Doxyfile-dev_ath
new file mode 100644
index 0000000..6d900eb
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_ath
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel ATH device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_ath/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/ath/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/ath/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_ath/dev_ath.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_atkbdc b/tools/kerneldoc/subsys/Doxyfile-dev_atkbdc
new file mode 100644
index 0000000..996eb4a
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_atkbdc
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel ATKBDC device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_atkbdc/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/atkbdc/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/atkbdc/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_atkbdc/dev_atkbdc.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_auxio b/tools/kerneldoc/subsys/Doxyfile-dev_auxio
new file mode 100644
index 0000000..968c66d
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_auxio
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel AUXIO device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_auxio/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/auxio/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/auxio/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_auxio/dev_auxio.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_bce b/tools/kerneldoc/subsys/Doxyfile-dev_bce
new file mode 100644
index 0000000..4bf67b1
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_bce
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel BCE device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_bce/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/bce/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/bce/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_bce/dev_bce.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_bfe b/tools/kerneldoc/subsys/Doxyfile-dev_bfe
new file mode 100644
index 0000000..dd2ba5b
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_bfe
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel BFE device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_bfe/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/bfe/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/bfe/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_bfe/dev_bfe.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_bge b/tools/kerneldoc/subsys/Doxyfile-dev_bge
new file mode 100644
index 0000000..c05e742
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_bge
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel BGE device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_bge/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/bge/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/bge/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_bge/dev_bge.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_bktr b/tools/kerneldoc/subsys/Doxyfile-dev_bktr
new file mode 100644
index 0000000..f13c32f
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_bktr
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel BKTR device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_bktr/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/bktr/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/bktr/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_bktr/dev_bktr.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_bm b/tools/kerneldoc/subsys/Doxyfile-dev_bm
new file mode 100644
index 0000000..b57002a
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_bm
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel BM device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_bm/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/bm/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/bm/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_bm/dev_bm.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_buslogic b/tools/kerneldoc/subsys/Doxyfile-dev_buslogic
new file mode 100644
index 0000000..392644a
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_buslogic
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel BUSLOGIC device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_buslogic/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/buslogic/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/buslogic/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_buslogic/dev_buslogic.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_bwi b/tools/kerneldoc/subsys/Doxyfile-dev_bwi
new file mode 100644
index 0000000..a399886
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_bwi
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel BWI device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_bwi/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/bwi/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/bwi/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_bwi/dev_bwi.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_bwn b/tools/kerneldoc/subsys/Doxyfile-dev_bwn
new file mode 100644
index 0000000..2d94538
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_bwn
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel BWN device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_bwn/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/bwn/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/bwn/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_bwn/dev_bwn.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_bxe b/tools/kerneldoc/subsys/Doxyfile-dev_bxe
new file mode 100644
index 0000000..19bcf1f
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_bxe
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel BXE device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_bxe/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/bxe/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/bxe/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_bxe/dev_bxe.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_cardbus b/tools/kerneldoc/subsys/Doxyfile-dev_cardbus
new file mode 100644
index 0000000..2c5d136
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_cardbus
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel CARDBUS device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_cardbus/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/cardbus/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/cardbus/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_cardbus/dev_cardbus.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_cas b/tools/kerneldoc/subsys/Doxyfile-dev_cas
new file mode 100644
index 0000000..b91b6b0
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_cas
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel CAS device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_cas/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/cas/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/cas/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_cas/dev_cas.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_ce b/tools/kerneldoc/subsys/Doxyfile-dev_ce
new file mode 100644
index 0000000..25e9114
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_ce
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel CE device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_ce/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/ce/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/ce/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_ce/dev_ce.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_cesa b/tools/kerneldoc/subsys/Doxyfile-dev_cesa
new file mode 100644
index 0000000..5eccc45
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_cesa
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel CESA device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_cesa/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/cesa/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/cesa/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_cesa/dev_cesa.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_cfe b/tools/kerneldoc/subsys/Doxyfile-dev_cfe
new file mode 100644
index 0000000..3a0d48e
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_cfe
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel CFE device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_cfe/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/cfe/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/cfe/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_cfe/dev_cfe.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_cfi b/tools/kerneldoc/subsys/Doxyfile-dev_cfi
new file mode 100644
index 0000000..a1a51d5
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_cfi
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel CFI device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_cfi/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/cfi/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/cfi/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_cfi/dev_cfi.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_ciss b/tools/kerneldoc/subsys/Doxyfile-dev_ciss
new file mode 100644
index 0000000..7c78b81
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_ciss
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel CISS device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_ciss/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/ciss/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/ciss/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_ciss/dev_ciss.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_cm b/tools/kerneldoc/subsys/Doxyfile-dev_cm
new file mode 100644
index 0000000..e12f7d9
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_cm
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel CM device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_cm/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/cm/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/cm/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_cm/dev_cm.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_cmx b/tools/kerneldoc/subsys/Doxyfile-dev_cmx
new file mode 100644
index 0000000..946815d
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_cmx
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel CMX device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_cmx/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/cmx/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/cmx/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_cmx/dev_cmx.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_coretemp b/tools/kerneldoc/subsys/Doxyfile-dev_coretemp
new file mode 100644
index 0000000..26e17d5
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_coretemp
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel CORETEMP device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_coretemp/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/coretemp/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/coretemp/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_coretemp/dev_coretemp.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_cp b/tools/kerneldoc/subsys/Doxyfile-dev_cp
new file mode 100644
index 0000000..6327f33
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_cp
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel CP device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_cp/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/cp/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/cp/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_cp/dev_cp.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_cpuctl b/tools/kerneldoc/subsys/Doxyfile-dev_cpuctl
new file mode 100644
index 0000000..4181acd
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_cpuctl
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel CPUCTL device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_cpuctl/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/cpuctl/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/cpuctl/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_cpuctl/dev_cpuctl.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_cpufreq b/tools/kerneldoc/subsys/Doxyfile-dev_cpufreq
new file mode 100644
index 0000000..4a5fd66
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_cpufreq
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel CPUFREQ device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_cpufreq/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/cpufreq/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/cpufreq/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_cpufreq/dev_cpufreq.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_cs b/tools/kerneldoc/subsys/Doxyfile-dev_cs
new file mode 100644
index 0000000..5dcd247
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_cs
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel CS device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_cs/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/cs/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/cs/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_cs/dev_cs.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_ct b/tools/kerneldoc/subsys/Doxyfile-dev_ct
new file mode 100644
index 0000000..50a9e34
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_ct
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel CT device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_ct/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/ct/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/ct/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_ct/dev_ct.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_ctau b/tools/kerneldoc/subsys/Doxyfile-dev_ctau
new file mode 100644
index 0000000..f1ee4fd
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_ctau
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel CTAU device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_ctau/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/ctau/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/ctau/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_ctau/dev_ctau.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_cx b/tools/kerneldoc/subsys/Doxyfile-dev_cx
new file mode 100644
index 0000000..55a9fed
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_cx
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel CX device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_cx/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/cx/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/cx/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_cx/dev_cx.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_cxgb b/tools/kerneldoc/subsys/Doxyfile-dev_cxgb
new file mode 100644
index 0000000..b52492d
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_cxgb
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel CXGB device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_cxgb/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/cxgb/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/cxgb/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_cxgb/dev_cxgb.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_cxgbe b/tools/kerneldoc/subsys/Doxyfile-dev_cxgbe
new file mode 100644
index 0000000..2de2d0a
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_cxgbe
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel CXGBE device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_cxgbe/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/cxgbe/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/cxgbe/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_cxgbe/dev_cxgbe.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_cy b/tools/kerneldoc/subsys/Doxyfile-dev_cy
new file mode 100644
index 0000000..dccc0b5
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_cy
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel CY device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_cy/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/cy/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/cy/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_cy/dev_cy.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_dc b/tools/kerneldoc/subsys/Doxyfile-dev_dc
new file mode 100644
index 0000000..ea5185e
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_dc
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel DC device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_dc/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/dc/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/dc/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_dc/dev_dc.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_dcons b/tools/kerneldoc/subsys/Doxyfile-dev_dcons
new file mode 100644
index 0000000..b74bfe3
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_dcons
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel DCONS device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_dcons/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/dcons/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/dcons/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_dcons/dev_dcons.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_de b/tools/kerneldoc/subsys/Doxyfile-dev_de
new file mode 100644
index 0000000..8a08a46
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_de
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel DE device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_de/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/de/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/de/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_de/dev_de.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_digi b/tools/kerneldoc/subsys/Doxyfile-dev_digi
new file mode 100644
index 0000000..0807eb9
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_digi
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel DIGI device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_digi/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/digi/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/digi/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_digi/dev_digi.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_dpms b/tools/kerneldoc/subsys/Doxyfile-dev_dpms
new file mode 100644
index 0000000..989503d
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_dpms
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel DPMS device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_dpms/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/dpms/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/dpms/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_dpms/dev_dpms.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_dpt b/tools/kerneldoc/subsys/Doxyfile-dev_dpt
new file mode 100644
index 0000000..e9b8e14
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_dpt
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel DPT device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_dpt/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/dpt/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/dpt/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_dpt/dev_dpt.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_drm b/tools/kerneldoc/subsys/Doxyfile-dev_drm
new file mode 100644
index 0000000..ce32017
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_drm
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel DRM device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_drm/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/drm/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/drm/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_drm/dev_drm.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_e1000 b/tools/kerneldoc/subsys/Doxyfile-dev_e1000
new file mode 100644
index 0000000..15d9a60
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_e1000
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel E1000 device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_e1000/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/e1000/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/e1000/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_e1000/dev_e1000.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_ed b/tools/kerneldoc/subsys/Doxyfile-dev_ed
new file mode 100644
index 0000000..86710dd
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_ed
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel ED device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_ed/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/ed/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/ed/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_ed/dev_ed.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_eisa b/tools/kerneldoc/subsys/Doxyfile-dev_eisa
new file mode 100644
index 0000000..820c12d
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_eisa
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel EISA device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_eisa/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/eisa/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/eisa/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_eisa/dev_eisa.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_en b/tools/kerneldoc/subsys/Doxyfile-dev_en
new file mode 100644
index 0000000..1ea7776
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_en
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel EN device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_en/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/en/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/en/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_en/dev_en.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_ep b/tools/kerneldoc/subsys/Doxyfile-dev_ep
new file mode 100644
index 0000000..c637843
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_ep
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel EP device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_ep/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/ep/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/ep/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_ep/dev_ep.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_esp b/tools/kerneldoc/subsys/Doxyfile-dev_esp
new file mode 100644
index 0000000..5807f3b
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_esp
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel ESP device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_esp/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/esp/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/esp/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_esp/dev_esp.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_et b/tools/kerneldoc/subsys/Doxyfile-dev_et
new file mode 100644
index 0000000..d74ca42
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_et
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel ET device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_et/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/et/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/et/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_et/dev_et.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_ex b/tools/kerneldoc/subsys/Doxyfile-dev_ex
new file mode 100644
index 0000000..0a3b495
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_ex
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel EX device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_ex/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/ex/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/ex/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_ex/dev_ex.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_exca b/tools/kerneldoc/subsys/Doxyfile-dev_exca
new file mode 100644
index 0000000..2cbfac0
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_exca
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel EXCA device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_exca/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/exca/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/exca/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_exca/dev_exca.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_fatm b/tools/kerneldoc/subsys/Doxyfile-dev_fatm
new file mode 100644
index 0000000..73c7724
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_fatm
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel FATM device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_fatm/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/fatm/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/fatm/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_fatm/dev_fatm.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_fb b/tools/kerneldoc/subsys/Doxyfile-dev_fb
new file mode 100644
index 0000000..00e6532
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_fb
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel FB device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_fb/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/fb/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/fb/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_fb/dev_fb.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_fdc b/tools/kerneldoc/subsys/Doxyfile-dev_fdc
new file mode 100644
index 0000000..1605133
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_fdc
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel FDC device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_fdc/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/fdc/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/fdc/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_fdc/dev_fdc.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_fdt b/tools/kerneldoc/subsys/Doxyfile-dev_fdt
new file mode 100644
index 0000000..428d31d
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_fdt
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel FDT device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_fdt/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/fdt/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/fdt/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_fdt/dev_fdt.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_fe b/tools/kerneldoc/subsys/Doxyfile-dev_fe
new file mode 100644
index 0000000..c493070
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_fe
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel FE device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_fe/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/fe/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/fe/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_fe/dev_fe.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_firewire b/tools/kerneldoc/subsys/Doxyfile-dev_firewire
new file mode 100644
index 0000000..c43e054
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_firewire
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel FIREWIRE device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_firewire/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/firewire/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/firewire/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_firewire/dev_firewire.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_flash b/tools/kerneldoc/subsys/Doxyfile-dev_flash
new file mode 100644
index 0000000..98e1f98
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_flash
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel FLASH device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_flash/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/flash/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/flash/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_flash/dev_flash.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_fxp b/tools/kerneldoc/subsys/Doxyfile-dev_fxp
new file mode 100644
index 0000000..4d46740
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_fxp
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel FXP device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_fxp/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/fxp/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/fxp/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_fxp/dev_fxp.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_gem b/tools/kerneldoc/subsys/Doxyfile-dev_gem
new file mode 100644
index 0000000..5d51d13
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_gem
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel GEM device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_gem/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/gem/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/gem/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_gem/dev_gem.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_glxiic b/tools/kerneldoc/subsys/Doxyfile-dev_glxiic
new file mode 100644
index 0000000..23247f6
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_glxiic
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel GLXIIC device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_glxiic/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/glxiic/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/glxiic/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_glxiic/dev_glxiic.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_glxsb b/tools/kerneldoc/subsys/Doxyfile-dev_glxsb
new file mode 100644
index 0000000..2c59b27
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_glxsb
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel GLXSB device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_glxsb/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/glxsb/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/glxsb/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_glxsb/dev_glxsb.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_gpio b/tools/kerneldoc/subsys/Doxyfile-dev_gpio
new file mode 100644
index 0000000..26c8be5
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_gpio
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel GPIO device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_gpio/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/gpio/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/gpio/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_gpio/dev_gpio.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_hatm b/tools/kerneldoc/subsys/Doxyfile-dev_hatm
new file mode 100644
index 0000000..f9dfa24
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_hatm
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel HATM device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_hatm/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/hatm/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/hatm/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_hatm/dev_hatm.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_hifn b/tools/kerneldoc/subsys/Doxyfile-dev_hifn
new file mode 100644
index 0000000..9437234
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_hifn
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel HIFN device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_hifn/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/hifn/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/hifn/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_hifn/dev_hifn.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_hme b/tools/kerneldoc/subsys/Doxyfile-dev_hme
new file mode 100644
index 0000000..43ce9ee
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_hme
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel HME device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_hme/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/hme/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/hme/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_hme/dev_hme.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_hpt27xx b/tools/kerneldoc/subsys/Doxyfile-dev_hpt27xx
new file mode 100644
index 0000000..412a8b3
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_hpt27xx
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel HPT27XX device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_hpt27xx/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/hpt27xx/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/hpt27xx/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_hpt27xx/dev_hpt27xx.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_hptiop b/tools/kerneldoc/subsys/Doxyfile-dev_hptiop
new file mode 100644
index 0000000..5bdc13c
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_hptiop
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel HPTIOP device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_hptiop/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/hptiop/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/hptiop/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_hptiop/dev_hptiop.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_hptmv b/tools/kerneldoc/subsys/Doxyfile-dev_hptmv
new file mode 100644
index 0000000..d3adcd0
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_hptmv
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel HPTMV device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_hptmv/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/hptmv/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/hptmv/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_hptmv/dev_hptmv.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_hptrr b/tools/kerneldoc/subsys/Doxyfile-dev_hptrr
new file mode 100644
index 0000000..fa16405
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_hptrr
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel HPTRR device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_hptrr/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/hptrr/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/hptrr/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_hptrr/dev_hptrr.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_hwpmc b/tools/kerneldoc/subsys/Doxyfile-dev_hwpmc
new file mode 100644
index 0000000..0fa5c03
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_hwpmc
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel HWPMC device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_hwpmc/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/hwpmc/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/hwpmc/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_hwpmc/dev_hwpmc.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_ic b/tools/kerneldoc/subsys/Doxyfile-dev_ic
new file mode 100644
index 0000000..4583f71
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_ic
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel IC device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_ic/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/ic/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/ic/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_ic/dev_ic.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_ichsmb b/tools/kerneldoc/subsys/Doxyfile-dev_ichsmb
new file mode 100644
index 0000000..7719a50
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_ichsmb
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel ICHSMB device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_ichsmb/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/ichsmb/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/ichsmb/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_ichsmb/dev_ichsmb.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_ichwd b/tools/kerneldoc/subsys/Doxyfile-dev_ichwd
new file mode 100644
index 0000000..2bbffec
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_ichwd
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel ICHWD device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_ichwd/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/ichwd/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/ichwd/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_ichwd/dev_ichwd.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_ida b/tools/kerneldoc/subsys/Doxyfile-dev_ida
new file mode 100644
index 0000000..fc027c9
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_ida
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel IDA device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_ida/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/ida/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/ida/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_ida/dev_ida.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_ie b/tools/kerneldoc/subsys/Doxyfile-dev_ie
new file mode 100644
index 0000000..92c3355
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_ie
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel IE device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_ie/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/ie/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/ie/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_ie/dev_ie.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_ieee488 b/tools/kerneldoc/subsys/Doxyfile-dev_ieee488
new file mode 100644
index 0000000..8070fc9
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_ieee488
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel IEEE488 device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_ieee488/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/ieee488/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/ieee488/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_ieee488/dev_ieee488.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_if_ndis b/tools/kerneldoc/subsys/Doxyfile-dev_if_ndis
new file mode 100644
index 0000000..bd2b803
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_if_ndis
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel IF_NDIS device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_if_ndis/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/if_ndis/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/if_ndis/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_if_ndis/dev_if_ndis.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_iicbus b/tools/kerneldoc/subsys/Doxyfile-dev_iicbus
new file mode 100644
index 0000000..31ce5d6
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_iicbus
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel IICBUS device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_iicbus/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/iicbus/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/iicbus/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_iicbus/dev_iicbus.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_iir b/tools/kerneldoc/subsys/Doxyfile-dev_iir
new file mode 100644
index 0000000..97b9f4e
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_iir
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel IIR device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_iir/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/iir/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/iir/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_iir/dev_iir.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_io b/tools/kerneldoc/subsys/Doxyfile-dev_io
new file mode 100644
index 0000000..183ac47
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_io
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel IO device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_io/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/io/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/io/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_io/dev_io.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_ipmi b/tools/kerneldoc/subsys/Doxyfile-dev_ipmi
new file mode 100644
index 0000000..40ab030
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_ipmi
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel IPMI device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_ipmi/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/ipmi/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/ipmi/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_ipmi/dev_ipmi.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_ips b/tools/kerneldoc/subsys/Doxyfile-dev_ips
new file mode 100644
index 0000000..68218a8
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_ips
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel IPS device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_ips/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/ips/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/ips/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_ips/dev_ips.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_ipw b/tools/kerneldoc/subsys/Doxyfile-dev_ipw
new file mode 100644
index 0000000..7a6beb6
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_ipw
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel IPW device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_ipw/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/ipw/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/ipw/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_ipw/dev_ipw.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_iscsi b/tools/kerneldoc/subsys/Doxyfile-dev_iscsi
new file mode 100644
index 0000000..0601154
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_iscsi
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel ISCSI device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_iscsi/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/iscsi/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/iscsi/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_iscsi/dev_iscsi.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_isp b/tools/kerneldoc/subsys/Doxyfile-dev_isp
new file mode 100644
index 0000000..a905e21
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_isp
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel ISP device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_isp/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/isp/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/isp/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_isp/dev_isp.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_ispfw b/tools/kerneldoc/subsys/Doxyfile-dev_ispfw
new file mode 100644
index 0000000..c19dcf1
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_ispfw
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel ISPFW device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_ispfw/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/ispfw/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/ispfw/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_ispfw/dev_ispfw.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_iwi b/tools/kerneldoc/subsys/Doxyfile-dev_iwi
new file mode 100644
index 0000000..c3b4c44
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_iwi
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel IWI device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_iwi/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/iwi/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/iwi/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_iwi/dev_iwi.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_iwn b/tools/kerneldoc/subsys/Doxyfile-dev_iwn
new file mode 100644
index 0000000..b96a2ae
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_iwn
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel IWN device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_iwn/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/iwn/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/iwn/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_iwn/dev_iwn.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_ixgb b/tools/kerneldoc/subsys/Doxyfile-dev_ixgb
new file mode 100644
index 0000000..7a04aad
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_ixgb
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel IXGB device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_ixgb/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/ixgb/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/ixgb/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_ixgb/dev_ixgb.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_ixgbe b/tools/kerneldoc/subsys/Doxyfile-dev_ixgbe
new file mode 100644
index 0000000..c1f6faf
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_ixgbe
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel IXGBE device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_ixgbe/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/ixgbe/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/ixgbe/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_ixgbe/dev_ixgbe.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_jme b/tools/kerneldoc/subsys/Doxyfile-dev_jme
new file mode 100644
index 0000000..6356c3f
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_jme
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel JME device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_jme/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/jme/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/jme/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_jme/dev_jme.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_joy b/tools/kerneldoc/subsys/Doxyfile-dev_joy
new file mode 100644
index 0000000..c573a83
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_joy
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel JOY device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_joy/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/joy/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/joy/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_joy/dev_joy.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_kbd b/tools/kerneldoc/subsys/Doxyfile-dev_kbd
new file mode 100644
index 0000000..c9558e0
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_kbd
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel KBD device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_kbd/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/kbd/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/kbd/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_kbd/dev_kbd.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_kbdmux b/tools/kerneldoc/subsys/Doxyfile-dev_kbdmux
new file mode 100644
index 0000000..cb993e5
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_kbdmux
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel KBDMUX device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_kbdmux/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/kbdmux/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/kbdmux/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_kbdmux/dev_kbdmux.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_ksyms b/tools/kerneldoc/subsys/Doxyfile-dev_ksyms
new file mode 100644
index 0000000..1715a1e
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_ksyms
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel KSYMS device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_ksyms/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/ksyms/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/ksyms/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_ksyms/dev_ksyms.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_le b/tools/kerneldoc/subsys/Doxyfile-dev_le
new file mode 100644
index 0000000..bf04437
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_le
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel LE device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_le/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/le/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/le/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_le/dev_le.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_led b/tools/kerneldoc/subsys/Doxyfile-dev_led
new file mode 100644
index 0000000..a4e89e3
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_led
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel LED device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_led/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/led/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/led/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_led/dev_led.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_lge b/tools/kerneldoc/subsys/Doxyfile-dev_lge
new file mode 100644
index 0000000..95a243f
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_lge
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel LGE device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_lge/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/lge/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/lge/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_lge/dev_lge.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_lindev b/tools/kerneldoc/subsys/Doxyfile-dev_lindev
new file mode 100644
index 0000000..729609e
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_lindev
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel LINDEV device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_lindev/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/lindev/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/lindev/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_lindev/dev_lindev.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_lmc b/tools/kerneldoc/subsys/Doxyfile-dev_lmc
new file mode 100644
index 0000000..a9456db
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_lmc
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel LMC device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_lmc/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/lmc/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/lmc/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_lmc/dev_lmc.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_malo b/tools/kerneldoc/subsys/Doxyfile-dev_malo
new file mode 100644
index 0000000..98cbcd32
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_malo
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel MALO device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_malo/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/malo/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/malo/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_malo/dev_malo.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_mc146818 b/tools/kerneldoc/subsys/Doxyfile-dev_mc146818
new file mode 100644
index 0000000..2ccf142
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_mc146818
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel MC146818 device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_mc146818/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/mc146818/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/mc146818/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_mc146818/dev_mc146818.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_mca b/tools/kerneldoc/subsys/Doxyfile-dev_mca
new file mode 100644
index 0000000..0b10b2c
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_mca
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel MCA device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_mca/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/mca/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/mca/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_mca/dev_mca.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_mcd b/tools/kerneldoc/subsys/Doxyfile-dev_mcd
new file mode 100644
index 0000000..435841e
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_mcd
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel MCD device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_mcd/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/mcd/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/mcd/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_mcd/dev_mcd.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_md b/tools/kerneldoc/subsys/Doxyfile-dev_md
new file mode 100644
index 0000000..e1120ea
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_md
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel MD device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_md/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/md/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/md/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_md/dev_md.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_mem b/tools/kerneldoc/subsys/Doxyfile-dev_mem
new file mode 100644
index 0000000..d35580a
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_mem
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel MEM device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_mem/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/mem/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/mem/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_mem/dev_mem.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_mfi b/tools/kerneldoc/subsys/Doxyfile-dev_mfi
new file mode 100644
index 0000000..cdff4aa
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_mfi
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel MFI device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_mfi/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/mfi/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/mfi/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_mfi/dev_mfi.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_mge b/tools/kerneldoc/subsys/Doxyfile-dev_mge
new file mode 100644
index 0000000..e17599d
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_mge
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel MGE device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_mge/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/mge/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/mge/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_mge/dev_mge.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_mii b/tools/kerneldoc/subsys/Doxyfile-dev_mii
new file mode 100644
index 0000000..f959740
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_mii
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel MII device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_mii/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/mii/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/mii/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_mii/dev_mii.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_mk48txx b/tools/kerneldoc/subsys/Doxyfile-dev_mk48txx
new file mode 100644
index 0000000..7e4b70b
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_mk48txx
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel MK48TXX device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_mk48txx/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/mk48txx/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/mk48txx/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_mk48txx/dev_mk48txx.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_mlx b/tools/kerneldoc/subsys/Doxyfile-dev_mlx
new file mode 100644
index 0000000..afbaac9
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_mlx
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel MLX device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_mlx/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/mlx/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/mlx/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_mlx/dev_mlx.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_mly b/tools/kerneldoc/subsys/Doxyfile-dev_mly
new file mode 100644
index 0000000..da36c86
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_mly
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel MLY device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_mly/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/mly/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/mly/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_mly/dev_mly.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_mmc b/tools/kerneldoc/subsys/Doxyfile-dev_mmc
new file mode 100644
index 0000000..23dc7041
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_mmc
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel MMC device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_mmc/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/mmc/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/mmc/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_mmc/dev_mmc.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_mn b/tools/kerneldoc/subsys/Doxyfile-dev_mn
new file mode 100644
index 0000000..c16e4c8
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_mn
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel MN device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_mn/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/mn/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/mn/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_mn/dev_mn.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_mps b/tools/kerneldoc/subsys/Doxyfile-dev_mps
new file mode 100644
index 0000000..9b33a87
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_mps
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel MPS device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_mps/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/mps/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/mps/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_mps/dev_mps.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_mpt b/tools/kerneldoc/subsys/Doxyfile-dev_mpt
new file mode 100644
index 0000000..87fb4dc
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_mpt
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel MPT device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_mpt/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/mpt/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/mpt/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_mpt/dev_mpt.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_mse b/tools/kerneldoc/subsys/Doxyfile-dev_mse
new file mode 100644
index 0000000..4792a5d
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_mse
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel MSE device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_mse/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/mse/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/mse/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_mse/dev_mse.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_msk b/tools/kerneldoc/subsys/Doxyfile-dev_msk
new file mode 100644
index 0000000..cebd95c
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_msk
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel MSK device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_msk/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/msk/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/msk/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_msk/dev_msk.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_mvs b/tools/kerneldoc/subsys/Doxyfile-dev_mvs
new file mode 100644
index 0000000..7cbdc83
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_mvs
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel MVS device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_mvs/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/mvs/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/mvs/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_mvs/dev_mvs.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_mwl b/tools/kerneldoc/subsys/Doxyfile-dev_mwl
new file mode 100644
index 0000000..863ab1b
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_mwl
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel MWL device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_mwl/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/mwl/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/mwl/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_mwl/dev_mwl.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_mxge b/tools/kerneldoc/subsys/Doxyfile-dev_mxge
new file mode 100644
index 0000000..bfdbc07
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_mxge
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel MXGE device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_mxge/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/mxge/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/mxge/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_mxge/dev_mxge.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_my b/tools/kerneldoc/subsys/Doxyfile-dev_my
new file mode 100644
index 0000000..aebed3d
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_my
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel MY device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_my/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/my/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/my/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_my/dev_my.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_ncv b/tools/kerneldoc/subsys/Doxyfile-dev_ncv
new file mode 100644
index 0000000..af26872
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_ncv
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel NCV device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_ncv/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/ncv/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/ncv/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_ncv/dev_ncv.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_netmap b/tools/kerneldoc/subsys/Doxyfile-dev_netmap
new file mode 100644
index 0000000..1e32148
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_netmap
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel NETMAP device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_netmap/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/netmap/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/netmap/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_netmap/dev_netmap.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_nfe b/tools/kerneldoc/subsys/Doxyfile-dev_nfe
new file mode 100644
index 0000000..aa7af0b
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_nfe
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel NFE device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_nfe/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/nfe/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/nfe/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_nfe/dev_nfe.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_nge b/tools/kerneldoc/subsys/Doxyfile-dev_nge
new file mode 100644
index 0000000..3f03d17
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_nge
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel NGE device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_nge/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/nge/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/nge/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_nge/dev_nge.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_nmdm b/tools/kerneldoc/subsys/Doxyfile-dev_nmdm
new file mode 100644
index 0000000..5d56207
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_nmdm
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel NMDM device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_nmdm/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/nmdm/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/nmdm/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_nmdm/dev_nmdm.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_nsp b/tools/kerneldoc/subsys/Doxyfile-dev_nsp
new file mode 100644
index 0000000..eb5f351
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_nsp
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel NSP device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_nsp/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/nsp/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/nsp/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_nsp/dev_nsp.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_null b/tools/kerneldoc/subsys/Doxyfile-dev_null
new file mode 100644
index 0000000..3bda782
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_null
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel NULL device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_null/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/null/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/null/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_null/dev_null.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_nve b/tools/kerneldoc/subsys/Doxyfile-dev_nve
new file mode 100644
index 0000000..a64c518
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_nve
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel NVE device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_nve/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/nve/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/nve/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_nve/dev_nve.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_nvram b/tools/kerneldoc/subsys/Doxyfile-dev_nvram
new file mode 100644
index 0000000..7d6b2f5
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_nvram
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel NVRAM device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_nvram/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/nvram/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/nvram/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_nvram/dev_nvram.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_nvram2env b/tools/kerneldoc/subsys/Doxyfile-dev_nvram2env
new file mode 100644
index 0000000..27d4352
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_nvram2env
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel NVRAM2ENV device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_nvram2env/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/nvram2env/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/nvram2env/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_nvram2env/dev_nvram2env.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_nxge b/tools/kerneldoc/subsys/Doxyfile-dev_nxge
new file mode 100644
index 0000000..2f5d788
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_nxge
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel NXGE device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_nxge/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/nxge/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/nxge/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_nxge/dev_nxge.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_ofw b/tools/kerneldoc/subsys/Doxyfile-dev_ofw
new file mode 100644
index 0000000..584c1be
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_ofw
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel OFW device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_ofw/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/ofw/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/ofw/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_ofw/dev_ofw.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_patm b/tools/kerneldoc/subsys/Doxyfile-dev_patm
new file mode 100644
index 0000000..ae7e199
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_patm
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel PATM device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_patm/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/patm/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/patm/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_patm/dev_patm.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_pbio b/tools/kerneldoc/subsys/Doxyfile-dev_pbio
new file mode 100644
index 0000000..fe9b95b
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_pbio
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel PBIO device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_pbio/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/pbio/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/pbio/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_pbio/dev_pbio.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_pccard b/tools/kerneldoc/subsys/Doxyfile-dev_pccard
new file mode 100644
index 0000000..af7163d
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_pccard
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel PCCARD device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_pccard/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/pccard/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/pccard/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_pccard/dev_pccard.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_pccbb b/tools/kerneldoc/subsys/Doxyfile-dev_pccbb
new file mode 100644
index 0000000..af25d11
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_pccbb
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel PCCBB device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_pccbb/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/pccbb/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/pccbb/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_pccbb/dev_pccbb.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_pcf b/tools/kerneldoc/subsys/Doxyfile-dev_pcf
new file mode 100644
index 0000000..31ca922
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_pcf
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel PCF device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_pcf/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/pcf/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/pcf/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_pcf/dev_pcf.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_pcn b/tools/kerneldoc/subsys/Doxyfile-dev_pcn
new file mode 100644
index 0000000..d3fe70e
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_pcn
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel PCN device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_pcn/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/pcn/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/pcn/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_pcn/dev_pcn.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_pdq b/tools/kerneldoc/subsys/Doxyfile-dev_pdq
new file mode 100644
index 0000000..0b7eb9e
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_pdq
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel PDQ device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_pdq/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/pdq/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/pdq/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_pdq/dev_pdq.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_powermac_nvram b/tools/kerneldoc/subsys/Doxyfile-dev_powermac_nvram
new file mode 100644
index 0000000..0505dbc
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_powermac_nvram
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel POWERMAC_NVRAM device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_powermac_nvram/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/powermac_nvram/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/powermac_nvram/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_powermac_nvram/dev_powermac_nvram.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_ppbus b/tools/kerneldoc/subsys/Doxyfile-dev_ppbus
new file mode 100644
index 0000000..f07f36f
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_ppbus
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel PPBUS device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_ppbus/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/ppbus/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/ppbus/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_ppbus/dev_ppbus.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_ppc b/tools/kerneldoc/subsys/Doxyfile-dev_ppc
new file mode 100644
index 0000000..a90d69f
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_ppc
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel PPC device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_ppc/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/ppc/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/ppc/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_ppc/dev_ppc.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_pst b/tools/kerneldoc/subsys/Doxyfile-dev_pst
new file mode 100644
index 0000000..8a42e13
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_pst
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel PST device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_pst/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/pst/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/pst/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_pst/dev_pst.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_pty b/tools/kerneldoc/subsys/Doxyfile-dev_pty
new file mode 100644
index 0000000..180ee64
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_pty
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel PTY device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_pty/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/pty/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/pty/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_pty/dev_pty.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_puc b/tools/kerneldoc/subsys/Doxyfile-dev_puc
new file mode 100644
index 0000000..40e42db
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_puc
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel PUC device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_puc/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/puc/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/puc/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_puc/dev_puc.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_qlxgb b/tools/kerneldoc/subsys/Doxyfile-dev_qlxgb
new file mode 100644
index 0000000..6724a66
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_qlxgb
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel QLXGB device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_qlxgb/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/qlxgb/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/qlxgb/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_qlxgb/dev_qlxgb.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_quicc b/tools/kerneldoc/subsys/Doxyfile-dev_quicc
new file mode 100644
index 0000000..df6e2fc
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_quicc
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel QUICC device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_quicc/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/quicc/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/quicc/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_quicc/dev_quicc.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_ral b/tools/kerneldoc/subsys/Doxyfile-dev_ral
new file mode 100644
index 0000000..97d2e07
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_ral
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel RAL device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_ral/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/ral/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/ral/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_ral/dev_ral.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_random b/tools/kerneldoc/subsys/Doxyfile-dev_random
new file mode 100644
index 0000000..53f7e18
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_random
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel RANDOM device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_random/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/random/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/random/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_random/dev_random.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_rc b/tools/kerneldoc/subsys/Doxyfile-dev_rc
new file mode 100644
index 0000000..d3f4d36
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_rc
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel RC device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_rc/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/rc/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/rc/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_rc/dev_rc.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_re b/tools/kerneldoc/subsys/Doxyfile-dev_re
new file mode 100644
index 0000000..1229151
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_re
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel RE device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_re/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/re/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/re/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_re/dev_re.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_rndtest b/tools/kerneldoc/subsys/Doxyfile-dev_rndtest
new file mode 100644
index 0000000..5e7b213
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_rndtest
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel RNDTEST device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_rndtest/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/rndtest/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/rndtest/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_rndtest/dev_rndtest.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_rp b/tools/kerneldoc/subsys/Doxyfile-dev_rp
new file mode 100644
index 0000000..880d480
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_rp
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel RP device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_rp/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/rp/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/rp/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_rp/dev_rp.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_rt b/tools/kerneldoc/subsys/Doxyfile-dev_rt
new file mode 100644
index 0000000..0579bb4
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_rt
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel RT device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_rt/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/rt/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/rt/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_rt/dev_rt.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_safe b/tools/kerneldoc/subsys/Doxyfile-dev_safe
new file mode 100644
index 0000000..4f38ac7
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_safe
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel SAFE device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_safe/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/safe/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/safe/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_safe/dev_safe.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_sbni b/tools/kerneldoc/subsys/Doxyfile-dev_sbni
new file mode 100644
index 0000000..60f723e
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_sbni
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel SBNI device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_sbni/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/sbni/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/sbni/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_sbni/dev_sbni.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_scc b/tools/kerneldoc/subsys/Doxyfile-dev_scc
new file mode 100644
index 0000000..70088f2
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_scc
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel SCC device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_scc/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/scc/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/scc/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_scc/dev_scc.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_scd b/tools/kerneldoc/subsys/Doxyfile-dev_scd
new file mode 100644
index 0000000..de19df5
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_scd
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel SCD device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_scd/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/scd/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/scd/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_scd/dev_scd.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_sdhci b/tools/kerneldoc/subsys/Doxyfile-dev_sdhci
new file mode 100644
index 0000000..efcde48
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_sdhci
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel SDHCI device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_sdhci/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/sdhci/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/sdhci/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_sdhci/dev_sdhci.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_sec b/tools/kerneldoc/subsys/Doxyfile-dev_sec
new file mode 100644
index 0000000..ab65262
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_sec
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel SEC device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_sec/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/sec/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/sec/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_sec/dev_sec.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_sf b/tools/kerneldoc/subsys/Doxyfile-dev_sf
new file mode 100644
index 0000000..591b40a
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_sf
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel SF device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_sf/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/sf/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/sf/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_sf/dev_sf.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_sfxge b/tools/kerneldoc/subsys/Doxyfile-dev_sfxge
new file mode 100644
index 0000000..0dbb9fa
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_sfxge
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel SFXGE device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_sfxge/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/sfxge/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/sfxge/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_sfxge/dev_sfxge.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_sge b/tools/kerneldoc/subsys/Doxyfile-dev_sge
new file mode 100644
index 0000000..d3f5408
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_sge
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel SGE device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_sge/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/sge/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/sge/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_sge/dev_sge.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_si b/tools/kerneldoc/subsys/Doxyfile-dev_si
new file mode 100644
index 0000000..26364ef
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_si
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel SI device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_si/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/si/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/si/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_si/dev_si.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_siba b/tools/kerneldoc/subsys/Doxyfile-dev_siba
new file mode 100644
index 0000000..5d55c80
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_siba
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel SIBA device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_siba/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/siba/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/siba/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_siba/dev_siba.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_siis b/tools/kerneldoc/subsys/Doxyfile-dev_siis
new file mode 100644
index 0000000..c5d3ced
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_siis
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel SIIS device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_siis/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/siis/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/siis/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_siis/dev_siis.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_sio b/tools/kerneldoc/subsys/Doxyfile-dev_sio
new file mode 100644
index 0000000..ffc1f8e
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_sio
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel SIO device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_sio/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/sio/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/sio/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_sio/dev_sio.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_sis b/tools/kerneldoc/subsys/Doxyfile-dev_sis
new file mode 100644
index 0000000..2054620
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_sis
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel SIS device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_sis/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/sis/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/sis/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_sis/dev_sis.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_sk b/tools/kerneldoc/subsys/Doxyfile-dev_sk
new file mode 100644
index 0000000..8faf15d
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_sk
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel SK device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_sk/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/sk/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/sk/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_sk/dev_sk.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_smbus b/tools/kerneldoc/subsys/Doxyfile-dev_smbus
new file mode 100644
index 0000000..3f516a8
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_smbus
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel SMBUS device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_smbus/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/smbus/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/smbus/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_smbus/dev_smbus.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_smc b/tools/kerneldoc/subsys/Doxyfile-dev_smc
new file mode 100644
index 0000000..c03c08c
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_smc
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel SMC device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_smc/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/smc/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/smc/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_smc/dev_smc.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_sn b/tools/kerneldoc/subsys/Doxyfile-dev_sn
new file mode 100644
index 0000000..59db7e2
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_sn
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel SN device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_sn/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/sn/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/sn/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_sn/dev_sn.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_snc b/tools/kerneldoc/subsys/Doxyfile-dev_snc
new file mode 100644
index 0000000..be91249
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_snc
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel SNC device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_snc/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/snc/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/snc/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_snc/dev_snc.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_snp b/tools/kerneldoc/subsys/Doxyfile-dev_snp
new file mode 100644
index 0000000..9197661
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_snp
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel SNP device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_snp/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/snp/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/snp/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_snp/dev_snp.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_speaker b/tools/kerneldoc/subsys/Doxyfile-dev_speaker
new file mode 100644
index 0000000..f940048
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_speaker
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel SPEAKER device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_speaker/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/speaker/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/speaker/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_speaker/dev_speaker.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_spibus b/tools/kerneldoc/subsys/Doxyfile-dev_spibus
new file mode 100644
index 0000000..93c18a4
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_spibus
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel SPIBUS device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_spibus/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/spibus/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/spibus/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_spibus/dev_spibus.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_ste b/tools/kerneldoc/subsys/Doxyfile-dev_ste
new file mode 100644
index 0000000..5c62296
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_ste
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel STE device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_ste/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/ste/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/ste/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_ste/dev_ste.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_stg b/tools/kerneldoc/subsys/Doxyfile-dev_stg
new file mode 100644
index 0000000..74cc3dd
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_stg
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel STG device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_stg/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/stg/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/stg/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_stg/dev_stg.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_stge b/tools/kerneldoc/subsys/Doxyfile-dev_stge
new file mode 100644
index 0000000..8ea49cb
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_stge
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel STGE device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_stge/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/stge/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/stge/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_stge/dev_stge.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_streams b/tools/kerneldoc/subsys/Doxyfile-dev_streams
new file mode 100644
index 0000000..6e12914
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_streams
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel STREAMS device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_streams/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/streams/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/streams/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_streams/dev_streams.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_sym b/tools/kerneldoc/subsys/Doxyfile-dev_sym
new file mode 100644
index 0000000..2931118
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_sym
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel SYM device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_sym/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/sym/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/sym/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_sym/dev_sym.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_syscons b/tools/kerneldoc/subsys/Doxyfile-dev_syscons
new file mode 100644
index 0000000..af7fc2d
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_syscons
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel SYSCONS device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_syscons/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/syscons/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/syscons/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_syscons/dev_syscons.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_tdfx b/tools/kerneldoc/subsys/Doxyfile-dev_tdfx
new file mode 100644
index 0000000..cbd15f0
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_tdfx
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel TDFX device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_tdfx/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/tdfx/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/tdfx/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_tdfx/dev_tdfx.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_ti b/tools/kerneldoc/subsys/Doxyfile-dev_ti
new file mode 100644
index 0000000..0d27141
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_ti
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel TI device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_ti/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/ti/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/ti/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_ti/dev_ti.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_tl b/tools/kerneldoc/subsys/Doxyfile-dev_tl
new file mode 100644
index 0000000..b0ac397
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_tl
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel TL device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_tl/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/tl/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/tl/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_tl/dev_tl.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_tpm b/tools/kerneldoc/subsys/Doxyfile-dev_tpm
new file mode 100644
index 0000000..c7d830f
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_tpm
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel TPM device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_tpm/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/tpm/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/tpm/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_tpm/dev_tpm.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_trm b/tools/kerneldoc/subsys/Doxyfile-dev_trm
new file mode 100644
index 0000000..48695f3
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_trm
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel TRM device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_trm/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/trm/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/trm/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_trm/dev_trm.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_tsec b/tools/kerneldoc/subsys/Doxyfile-dev_tsec
new file mode 100644
index 0000000..25ad52f
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_tsec
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel TSEC device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_tsec/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/tsec/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/tsec/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_tsec/dev_tsec.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_twa b/tools/kerneldoc/subsys/Doxyfile-dev_twa
new file mode 100644
index 0000000..4830d78
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_twa
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel TWA device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_twa/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/twa/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/twa/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_twa/dev_twa.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_twe b/tools/kerneldoc/subsys/Doxyfile-dev_twe
new file mode 100644
index 0000000..6c6b719
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_twe
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel TWE device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_twe/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/twe/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/twe/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_twe/dev_twe.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_tws b/tools/kerneldoc/subsys/Doxyfile-dev_tws
new file mode 100644
index 0000000..b4e3687
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_tws
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel TWS device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_tws/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/tws/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/tws/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_tws/dev_tws.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_tx b/tools/kerneldoc/subsys/Doxyfile-dev_tx
new file mode 100644
index 0000000..ec58e01
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_tx
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel TX device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_tx/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/tx/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/tx/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_tx/dev_tx.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_txp b/tools/kerneldoc/subsys/Doxyfile-dev_txp
new file mode 100644
index 0000000..c8f2166
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_txp
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel TXP device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_txp/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/txp/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/txp/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_txp/dev_txp.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_uart b/tools/kerneldoc/subsys/Doxyfile-dev_uart
new file mode 100644
index 0000000..5e6d2d7
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_uart
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel UART device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_uart/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/uart/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/uart/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_uart/dev_uart.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_ubsec b/tools/kerneldoc/subsys/Doxyfile-dev_ubsec
new file mode 100644
index 0000000..af1b478
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_ubsec
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel UBSEC device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_ubsec/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/ubsec/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/ubsec/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_ubsec/dev_ubsec.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_utopia b/tools/kerneldoc/subsys/Doxyfile-dev_utopia
new file mode 100644
index 0000000..54ded35
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_utopia
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel UTOPIA device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_utopia/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/utopia/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/utopia/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_utopia/dev_utopia.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_vge b/tools/kerneldoc/subsys/Doxyfile-dev_vge
new file mode 100644
index 0000000..a3b94f8
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_vge
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel VGE device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_vge/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/vge/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/vge/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_vge/dev_vge.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_viawd b/tools/kerneldoc/subsys/Doxyfile-dev_viawd
new file mode 100644
index 0000000..cfbea0f
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_viawd
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel VIAWD device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_viawd/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/viawd/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/viawd/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_viawd/dev_viawd.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_virtio b/tools/kerneldoc/subsys/Doxyfile-dev_virtio
new file mode 100644
index 0000000..61988ef
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_virtio
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel VIRTIO device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_virtio/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/virtio/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/virtio/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_virtio/dev_virtio.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_vkbd b/tools/kerneldoc/subsys/Doxyfile-dev_vkbd
new file mode 100644
index 0000000..19d0600
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_vkbd
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel VKBD device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_vkbd/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/vkbd/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/vkbd/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_vkbd/dev_vkbd.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_vr b/tools/kerneldoc/subsys/Doxyfile-dev_vr
new file mode 100644
index 0000000..8dd1ac7
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_vr
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel VR device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_vr/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/vr/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/vr/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_vr/dev_vr.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_vte b/tools/kerneldoc/subsys/Doxyfile-dev_vte
new file mode 100644
index 0000000..5b6ab5d
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_vte
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel VTE device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_vte/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/vte/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/vte/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_vte/dev_vte.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_vx b/tools/kerneldoc/subsys/Doxyfile-dev_vx
new file mode 100644
index 0000000..bc91126
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_vx
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel VX device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_vx/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/vx/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/vx/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_vx/dev_vx.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_vxge b/tools/kerneldoc/subsys/Doxyfile-dev_vxge
new file mode 100644
index 0000000..c7a1927
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_vxge
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel VXGE device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_vxge/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/vxge/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/vxge/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_vxge/dev_vxge.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_watchdog b/tools/kerneldoc/subsys/Doxyfile-dev_watchdog
new file mode 100644
index 0000000..5f6e8a2
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_watchdog
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel WATCHDOG device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_watchdog/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/watchdog/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/watchdog/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_watchdog/dev_watchdog.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_wb b/tools/kerneldoc/subsys/Doxyfile-dev_wb
new file mode 100644
index 0000000..650bcb1
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_wb
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel WB device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_wb/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/wb/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/wb/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_wb/dev_wb.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_wds b/tools/kerneldoc/subsys/Doxyfile-dev_wds
new file mode 100644
index 0000000..2532b0e
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_wds
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel WDS device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_wds/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/wds/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/wds/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_wds/dev_wds.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_wi b/tools/kerneldoc/subsys/Doxyfile-dev_wi
new file mode 100644
index 0000000..672c4b2
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_wi
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel WI device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_wi/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/wi/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/wi/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_wi/dev_wi.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_wl b/tools/kerneldoc/subsys/Doxyfile-dev_wl
new file mode 100644
index 0000000..4a705b2
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_wl
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel WL device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_wl/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/wl/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/wl/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_wl/dev_wl.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_wpi b/tools/kerneldoc/subsys/Doxyfile-dev_wpi
new file mode 100644
index 0000000..94bcc58
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_wpi
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel WPI device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_wpi/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/wpi/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/wpi/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_wpi/dev_wpi.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_wtap b/tools/kerneldoc/subsys/Doxyfile-dev_wtap
new file mode 100644
index 0000000..65e1d59
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_wtap
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel WTAP device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_wtap/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/wtap/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/wtap/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_wtap/dev_wtap.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_xe b/tools/kerneldoc/subsys/Doxyfile-dev_xe
new file mode 100644
index 0000000..4b7cd20
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_xe
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel XE device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_xe/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/xe/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/xe/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_xe/dev_xe.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_xen b/tools/kerneldoc/subsys/Doxyfile-dev_xen
new file mode 100644
index 0000000..30e1545
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_xen
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel XEN device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_xen/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/xen/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/xen/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_xen/dev_xen.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/Doxyfile-dev_xl b/tools/kerneldoc/subsys/Doxyfile-dev_xl
new file mode 100644
index 0000000..aa2e2f0
--- /dev/null
+++ b/tools/kerneldoc/subsys/Doxyfile-dev_xl
@@ -0,0 +1,22 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "FreeBSD kernel XL device code"
+OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_xl/
+EXTRACT_ALL = YES # for undocumented src, no warnings enabled
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(DOXYGEN_SRC_PATH)/dev/xl/ \
+ $(DOXYGEN_SRC_PATH)/$(DOXYGEN_TARGET_ARCH)/xl/ \
+ $(NOTREVIEWED)
+
+GENERATE_TAGFILE = dev_xl/dev_xl.tag
+
+@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
+@INCLUDE = common-Doxyfile
+
diff --git a/tools/kerneldoc/subsys/common-Doxyfile b/tools/kerneldoc/subsys/common-Doxyfile
index cdac7ab..608258e 100644
--- a/tools/kerneldoc/subsys/common-Doxyfile
+++ b/tools/kerneldoc/subsys/common-Doxyfile
@@ -230,8 +230,12 @@ SEARCH_INCLUDES = YES
INCLUDE_PATH = $(DOXYGEN_SRC_INCLUDE_PATH) \
.
INCLUDE_FILE_PATTERNS = *.h
+# __FreeBSD__ is normally defined to the the major version number of
+# FreeBSD. In the kernel source it is just checked for != 0, and
+# __FreeBSD_version is used for version dependend code.
+# To make live simple on major version bumps, just define __FreeBSD__ to 1.
PREDEFINED = _KERNEL \
- __FreeBSD__=9 \
+ __FreeBSD__=1 \
__${TARGET_ARCH}__=1 \
__${TARGET_ARCH}=1
EXPAND_AS_DEFINED =
diff --git a/tools/regression/README b/tools/regression/README
index d29ff11..4879a65 100644
--- a/tools/regression/README
+++ b/tools/regression/README
@@ -37,7 +37,7 @@ test name. For example,
A test may be flagged as 'todo'. This indicates that you expect the test
to fail (perhaps because the necessary functionality hasn't been written
yet). 'todo' tests are expected to fail, so when they start working the
-test framework can alert you to this happy occurence. Flag these tests
+test framework can alert you to this happy occurrence. Flag these tests
with a '# TODO' comment after the test name
not ok 1 - infiniteloop # TODO write test for an infinite loop
diff --git a/tools/regression/bin/sh/builtins/case13.0 b/tools/regression/bin/sh/builtins/case13.0
new file mode 100644
index 0000000..78f4e9b
--- /dev/null
+++ b/tools/regression/bin/sh/builtins/case13.0
@@ -0,0 +1,12 @@
+# $FreeBSD$
+
+case ^ in
+[\^^]) ;;
+*) echo Failed at $LINENO ;;
+esac
+
+case s in
+[\^^]) echo Failed at $LINENO ;;
+[s\]]) ;;
+*) echo Failed at $LINENO ;;
+esac
diff --git a/tools/regression/bin/sh/builtins/case14.0 b/tools/regression/bin/sh/builtins/case14.0
new file mode 100644
index 0000000..0338e8a
--- /dev/null
+++ b/tools/regression/bin/sh/builtins/case14.0
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+case `false` in
+no) exit 3 ;;
+esac
diff --git a/tools/regression/bin/sh/builtins/case15.0 b/tools/regression/bin/sh/builtins/case15.0
new file mode 100644
index 0000000..09b0e11
--- /dev/null
+++ b/tools/regression/bin/sh/builtins/case15.0
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+case x in
+`false`) exit 3 ;;
+esac
diff --git a/tools/regression/bin/sh/builtins/case16.0 b/tools/regression/bin/sh/builtins/case16.0
new file mode 100644
index 0000000..2430302
--- /dev/null
+++ b/tools/regression/bin/sh/builtins/case16.0
@@ -0,0 +1,7 @@
+# $FreeBSD$
+
+f() { return 42; }
+f
+case x in
+x) [ $? = 42 ] ;;
+esac
diff --git a/tools/regression/bin/sh/builtins/case17.0 b/tools/regression/bin/sh/builtins/case17.0
new file mode 100644
index 0000000..ed1d25f
--- /dev/null
+++ b/tools/regression/bin/sh/builtins/case17.0
@@ -0,0 +1,3 @@
+# $FreeBSD$
+
+! case x in x) false ;& y) esac
diff --git a/tools/regression/bin/sh/builtins/case18.0 b/tools/regression/bin/sh/builtins/case18.0
new file mode 100644
index 0000000..470253f
--- /dev/null
+++ b/tools/regression/bin/sh/builtins/case18.0
@@ -0,0 +1,7 @@
+# $FreeBSD$
+
+case x$(false) in
+x) ;&
+y) [ $? != 0 ] ;;
+z) false ;;
+esac
diff --git a/tools/regression/bin/sh/builtins/case19.0 b/tools/regression/bin/sh/builtins/case19.0
new file mode 100644
index 0000000..215066a
--- /dev/null
+++ b/tools/regression/bin/sh/builtins/case19.0
@@ -0,0 +1,7 @@
+# $FreeBSD$
+
+[ "`case x in
+x) false ;&
+y) ;&
+z) echo $? ;;
+esac`" != 0 ]
diff --git a/tools/regression/bin/sh/builtins/cd1.0 b/tools/regression/bin/sh/builtins/cd1.0
index 8c69536..bc5108e 100644
--- a/tools/regression/bin/sh/builtins/cd1.0
+++ b/tools/regression/bin/sh/builtins/cd1.0
@@ -7,7 +7,7 @@ T=$(mktemp -d sh-test.XXXXXX)
chmod 0 $T
if [ `id -u` -ne 0 ]; then
- # Root can always cd, irregardless of directory permissions.
+ # Root can always cd, regardless of directory permissions.
cd -L $T 2>/dev/null && exit 1
[ "$PWD" = "$P" ]
[ "$(pwd)" = "$P" ]
diff --git a/tools/regression/bin/sh/builtins/cd8.0 b/tools/regression/bin/sh/builtins/cd8.0
new file mode 100644
index 0000000..a68f77f
--- /dev/null
+++ b/tools/regression/bin/sh/builtins/cd8.0
@@ -0,0 +1,26 @@
+# $FreeBSD$
+
+# The exact wording of the error message is not standardized, but giving
+# a description of the errno is useful.
+
+LC_ALL=C
+export LC_ALL
+r=0
+
+t() {
+ exec 3>&1
+ errmsg=`cd "$1" 2>&1 >&3 3>&-`
+ exec 3>&-
+ case $errmsg in
+ *[Nn]ot\ a\ directory*)
+ ;;
+ *)
+ printf "Wrong error message for %s: %s\n" "$1" "$errmsg"
+ r=3
+ ;;
+ esac
+}
+
+t /dev/tty
+t /dev/tty/x
+exit $r
diff --git a/tools/regression/bin/sh/builtins/for2.0 b/tools/regression/bin/sh/builtins/for2.0
new file mode 100644
index 0000000..48c22ce
--- /dev/null
+++ b/tools/regression/bin/sh/builtins/for2.0
@@ -0,0 +1,9 @@
+# $FreeBSD$
+
+r=x
+f() { return 42; }
+f
+for i in x; do
+ r=$?
+done
+[ "$r" = 42 ]
diff --git a/tools/regression/bin/sh/builtins/for3.0 b/tools/regression/bin/sh/builtins/for3.0
new file mode 100644
index 0000000..cc37238
--- /dev/null
+++ b/tools/regression/bin/sh/builtins/for3.0
@@ -0,0 +1,8 @@
+# $FreeBSD$
+
+r=x
+f() { return 42; }
+for i in x`f`; do
+ r=$?
+done
+[ "$r" = 42 ]
diff --git a/tools/regression/bin/sh/builtins/getopts1.0 b/tools/regression/bin/sh/builtins/getopts1.0
index 0473aaf..af31d55 100644
--- a/tools/regression/bin/sh/builtins/getopts1.0
+++ b/tools/regression/bin/sh/builtins/getopts1.0
@@ -1,6 +1,6 @@
# $FreeBSD$
-echo '-1-'
+printf -- '-1-\n'
set -- -abc
getopts "ab:" OPTION
echo ${OPTION}
@@ -11,7 +11,7 @@ echo ${OPTION}
# ksh93 20090505; pdksh 5.2.14p2; mksh R39c; bash 4.1 PL7; and zsh 4.3.10.
# all recognize that "b" is missing its argument on the *first* iteration
# of 'getopts' and do not produce the "a" in $OPTION.
-echo '-2-'
+printf -- '-2-\n'
set -- -ab
getopts "ab:" OPTION
echo ${OPTION}
@@ -19,7 +19,7 @@ getopts "ab:" OPTION
echo ${OPTION}
# The 'shift' is aimed at causing an error.
-echo '-3-'
+printf -- '-3-\n'
shift 1
getopts "ab:" OPTION
echo ${OPTION}
diff --git a/tools/regression/bin/sh/builtins/trap10.0 b/tools/regression/bin/sh/builtins/trap10.0
new file mode 100644
index 0000000..fa0e35d
--- /dev/null
+++ b/tools/regression/bin/sh/builtins/trap10.0
@@ -0,0 +1,6 @@
+# $FreeBSD$
+
+# Check that the return statement will not break the EXIT trap, ie. all
+# trap commands are executed before the script exits.
+
+test "$(trap 'printf trap; echo ped' EXIT; f() { return; }; f)" = trapped || exit 1
diff --git a/tools/regression/bin/sh/builtins/trap11.0 b/tools/regression/bin/sh/builtins/trap11.0
new file mode 100644
index 0000000..cfeea9e
--- /dev/null
+++ b/tools/regression/bin/sh/builtins/trap11.0
@@ -0,0 +1,8 @@
+# $FreeBSD$
+
+# Check that the return statement will not break the USR1 trap, ie. all
+# trap commands are executed before the script resumes.
+
+result=$(${SH} -c 'trap "printf trap; echo ped" USR1; f() { return $(kill -USR1 $$); }; f')
+test $? -eq 0 || exit 1
+test "$result" = trapped || exit 1
diff --git a/tools/regression/bin/sh/builtins/trap9.0 b/tools/regression/bin/sh/builtins/trap9.0
new file mode 100644
index 0000000..0f584ec
--- /dev/null
+++ b/tools/regression/bin/sh/builtins/trap9.0
@@ -0,0 +1,3 @@
+# $FreeBSD$
+
+test "$(trap 'printf trap; echo ped' EXIT; f() { :; }; f)" = trapped || exit 1
diff --git a/tools/regression/bin/sh/expansion/cmdsubst12.0 b/tools/regression/bin/sh/expansion/cmdsubst12.0
new file mode 100644
index 0000000..50394db
--- /dev/null
+++ b/tools/regression/bin/sh/expansion/cmdsubst12.0
@@ -0,0 +1,6 @@
+# $FreeBSD$
+
+f() {
+ echo x$(printf foo >&2)y
+}
+[ "$(f 2>&1)" = "fooxy" ]
diff --git a/tools/regression/bin/sh/expansion/cmdsubst13.0 b/tools/regression/bin/sh/expansion/cmdsubst13.0
new file mode 100644
index 0000000..7fdc5b2
--- /dev/null
+++ b/tools/regression/bin/sh/expansion/cmdsubst13.0
@@ -0,0 +1,12 @@
+# $FreeBSD$
+
+x=1 y=2
+[ "$(
+ case $((x+=1)) in
+ ($((y+=1))) echo bad1 ;;
+ ($((y-1))) echo $x.$y ;;
+ ($((y=2))) echo bad2 ;;
+ (*) echo bad3 ;;
+ esac
+)" = "2.3" ] || echo "Error at $LINENO"
+[ "$x.$y" = "1.2" ] || echo "Error at $LINENO"
diff --git a/tools/regression/bin/sh/parameters/positional2.0 b/tools/regression/bin/sh/parameters/positional2.0
new file mode 100644
index 0000000..fcec2a4
--- /dev/null
+++ b/tools/regression/bin/sh/parameters/positional2.0
@@ -0,0 +1,65 @@
+# $FreeBSD$
+
+failures=''
+ok=''
+
+testcase() {
+ code="$1"
+ expected="$2"
+ oIFS="$IFS"
+ eval "$code"
+ IFS='|'
+ result="$#|$*"
+ IFS="$oIFS"
+ if [ "x$result" = "x$expected" ]; then
+ ok=x$ok
+ else
+ failures=x$failures
+ echo "For $code, expected $expected actual $result"
+ fi
+}
+
+testcase 'set -- a b; set -- p$@q' '2|pa|bq'
+testcase 'set -- a b; set -- $@q' '2|a|bq'
+testcase 'set -- a b; set -- p$@' '2|pa|b'
+testcase 'set -- a b; set -- p$@q' '2|pa|bq'
+testcase 'set -- a b; set -- $@q' '2|a|bq'
+testcase 'set -- a b; set -- p$@' '2|pa|b'
+testcase 'set -- a b; set -- p$*q' '2|pa|bq'
+testcase 'set -- a b; set -- $*q' '2|a|bq'
+testcase 'set -- a b; set -- p$*' '2|pa|b'
+testcase 'set -- a b; set -- p$*q' '2|pa|bq'
+testcase 'set -- a b; set -- $*q' '2|a|bq'
+testcase 'set -- a b; set -- p$*' '2|pa|b'
+testcase 'set -- a b; set -- "p$@q"' '2|pa|bq'
+testcase 'set -- a b; set -- "$@q"' '2|a|bq'
+testcase 'set -- a b; set -- "p$@"' '2|pa|b'
+testcase 'set -- a b; set -- p"$@"q' '2|pa|bq'
+testcase 'set -- a b; set -- "$@"q' '2|a|bq'
+testcase 'set -- a b; set -- p"$@"' '2|pa|b'
+testcase 'set -- "" a b; set -- "p$@q"' '3|p|a|bq'
+testcase 'set -- "" a b; set -- "$@q"' '3||a|bq'
+testcase 'set -- "" a b; set -- "p$@"' '3|p|a|b'
+testcase 'set -- "" a b; set -- p"$@"q' '3|p|a|bq'
+testcase 'set -- "" a b; set -- "$@"q' '3||a|bq'
+testcase 'set -- "" a b; set -- p"$@"' '3|p|a|b'
+testcase 'set -- a; set -- p$@q' '1|paq'
+testcase 'set -- a; set -- $@q' '1|aq'
+testcase 'set -- a; set -- p$@' '1|pa'
+testcase 'set -- a; set -- p$@q' '1|paq'
+testcase 'set -- a; set -- $@q' '1|aq'
+testcase 'set -- a; set -- p$@' '1|pa'
+testcase 'set -- a; set -- p$*q' '1|paq'
+testcase 'set -- a; set -- $*q' '1|aq'
+testcase 'set -- a; set -- p$*' '1|pa'
+testcase 'set -- a; set -- p$*q' '1|paq'
+testcase 'set -- a; set -- $*q' '1|aq'
+testcase 'set -- a; set -- p$*' '1|pa'
+testcase 'set -- a; set -- "p$@q"' '1|paq'
+testcase 'set -- a; set -- "$@q"' '1|aq'
+testcase 'set -- a; set -- "p$@"' '1|pa'
+testcase 'set -- a; set -- p"$@"q' '1|paq'
+testcase 'set -- a; set -- "$@"q' '1|aq'
+testcase 'set -- a; set -- p"$@"' '1|pa'
+
+test "x$failures" = x
diff --git a/tools/regression/fifo/fifo_io/fifo_io.c b/tools/regression/fifo/fifo_io/fifo_io.c
index 96ef9b4..4d3c54e 100644
--- a/tools/regression/fifo/fifo_io/fifo_io.c
+++ b/tools/regression/fifo/fifo_io/fifo_io.c
@@ -395,7 +395,7 @@ timed_read(int fd, void *data, size_t len, ssize_t *read_lenp,
*
* We use a timeout of 5 seconds, concluding that in 5 seconds either all I/O
* that can take place will, and that if we reach the end of the timeout,
- * then blocking has occured.
+ * then blocking has occurred.
*
* We assume that the buffer size on a fifo is <512K, and as such, that
* writing that much data without an active reader will result in blocking.
diff --git a/tools/regression/file/dup/dup.c b/tools/regression/file/dup/dup.c
index d6dd0ff..b0d9af2 100644
--- a/tools/regression/file/dup/dup.c
+++ b/tools/regression/file/dup/dup.c
@@ -104,7 +104,7 @@ main(int __unused argc, char __unused *argv[])
* Normally dup and dup2 will clear the close-on-exec
* flag on the new fd (which appears to be an implementation
* mistake from start and not some planned behavior).
- * In todays implementations of dup and dup2 we have to make
+ * In today's implementations of dup and dup2 we have to make
* an effort to really clear that flag. But all tested
* implementations of dup2 have another tweak. If we
* dup2(old, new) when old == new, the syscall short-circuits
diff --git a/tools/regression/kthread/kld/kthrdlk.c b/tools/regression/kthread/kld/kthrdlk.c
index 6485c11..67825b6 100644
--- a/tools/regression/kthread/kld/kthrdlk.c
+++ b/tools/regression/kthread/kld/kthrdlk.c
@@ -164,7 +164,7 @@ kthrdlk_done(void)
while (test_thrcnt != 0) {
ret = mtx_sleep(&global_condvar, &test_global_lock, 0, "waiting thrs end", 30 * hz);
if (ret == EWOULDBLOCK) {
- panic("some threads not die! remaing: %d", test_thrcnt);
+ panic("some threads not die! remaining: %d", test_thrcnt);
break;
}
}
diff --git a/tools/regression/lib/libc/nss/README b/tools/regression/lib/libc/nss/README
index ba0373d..bf32913 100644
--- a/tools/regression/lib/libc/nss/README
+++ b/tools/regression/lib/libc/nss/README
@@ -5,7 +5,7 @@ A brief how-to
Each nsswitch regression test does 2 kinds of actions:
1. It runs a series of queries and tests the correctness of results.
- There are 2 basic criterias which are used for that:
+ There are 2 basic criteria which are used for that:
- numbers must be in the correct range
- certain pointers should not be NULL
diff --git a/tools/regression/lib/libc/stdio/test-getdelim.t b/tools/regression/lib/libc/stdio/test-getdelim.t
new file mode 100644
index 0000000..8bdfd03
--- /dev/null
+++ b/tools/regression/lib/libc/stdio/test-getdelim.t
@@ -0,0 +1,10 @@
+#!/bin/sh
+# $FreeBSD$
+
+cd `dirname $0`
+
+executable=`basename $0 .t`
+
+make $executable 2>&1 > /dev/null
+
+exec ./$executable
diff --git a/tools/regression/lib/libc/stdio/test-print-positional.t b/tools/regression/lib/libc/stdio/test-print-positional.t
new file mode 100644
index 0000000..8bdfd03
--- /dev/null
+++ b/tools/regression/lib/libc/stdio/test-print-positional.t
@@ -0,0 +1,10 @@
+#!/bin/sh
+# $FreeBSD$
+
+cd `dirname $0`
+
+executable=`basename $0 .t`
+
+make $executable 2>&1 > /dev/null
+
+exec ./$executable
diff --git a/tools/regression/lib/libc/stdio/test-printbasic.t b/tools/regression/lib/libc/stdio/test-printbasic.t
new file mode 100644
index 0000000..8bdfd03
--- /dev/null
+++ b/tools/regression/lib/libc/stdio/test-printbasic.t
@@ -0,0 +1,10 @@
+#!/bin/sh
+# $FreeBSD$
+
+cd `dirname $0`
+
+executable=`basename $0 .t`
+
+make $executable 2>&1 > /dev/null
+
+exec ./$executable
diff --git a/tools/regression/lib/libc/stdio/test-printfloat.c b/tools/regression/lib/libc/stdio/test-printfloat.c
index 97bb1a8..806a85e 100644
--- a/tools/regression/lib/libc/stdio/test-printfloat.c
+++ b/tools/regression/lib/libc/stdio/test-printfloat.c
@@ -266,9 +266,9 @@ main(int argc, char *argv[])
testfmt("0x1p-16494", "%La", 0x1p-16494L);
testfmt("0x1.2345p-16384", "%La", 0x1.2345p-16384L);
#else
- testfmt("0xc.90fdaa22168cp-2", "%La", 0x3.243f6a8885a31p0L);
- testfmt("0x8p-1077", "%La", 0x1p-1074L);
- testfmt("0x9.8765p-1024", "%La", 0x9.8765p-1024L);
+ testfmt("0x1.921fb54442d18p+1", "%La", 0x3.243f6a8885a31p0L);
+ testfmt("0x1p-1074", "%La", 0x1p-1074L);
+ testfmt("0x1.30ecap-1021", "%La", 0x9.8765p-1024L);
#endif
printf("ok 10 - printfloat\n");
diff --git a/tools/regression/lib/msun/test-next.c b/tools/regression/lib/msun/test-next.c
index 78f3c57..68e4361 100644
--- a/tools/regression/lib/msun/test-next.c
+++ b/tools/regression/lib/msun/test-next.c
@@ -211,7 +211,9 @@ main(int argc, char *argv[])
test(idd(nextafter(DBL_MAX, INFINITY)), INFINITY, ex_over);
test(idd(nextafter(INFINITY, 0.0)), DBL_MAX, 0);
test(idd(nexttoward(DBL_MAX, DBL_MAX * 2.0L)), INFINITY, ex_over);
+#if LDBL_MANT_DIG > 53
test(idd(nexttoward(INFINITY, DBL_MAX * 2.0L)), DBL_MAX, 0);
+#endif
testf(idf(nextafterf(FLT_MAX, INFINITY)), INFINITY, ex_over);
testf(idf(nextafterf(INFINITY, 0.0)), FLT_MAX, 0);
diff --git a/tools/regression/msdosfs/msdosfstest-3.sh b/tools/regression/msdosfs/msdosfstest-3.sh
index 4d3a8fe..bfffc58 100644
--- a/tools/regression/msdosfs/msdosfstest-3.sh
+++ b/tools/regression/msdosfs/msdosfstest-3.sh
@@ -9,8 +9,10 @@ mdconfig -a -t swap -s 128m -u 10
bsdlabel -w md10 auto
newfs_msdos -F 16 -b 8192 /dev/md10a
mount_msdosfs -L zh_TW.Big5 -D CP950 /dev/md10a /tmp/msdosfstest/
-mkdir /tmp/msdosfstest/012345678_¨¸´c¤§¬ü
-cd /tmp/msdosfstest/012345678_¨¸´c¤§¬ü
+# The comment is UTF-8, the actual command uses the Big5 representation.
+# mkdir /tmp/msdosfstest/012345678_邪惡之美
+mkdir /tmp/msdosfstest/012345678_$'\250\270\264\143\244\247\254\374'
+cd /tmp/msdosfstest/012345678_$'\250\270\264\143\244\247\254\374'
if [ $? -eq 0 ]; then
echo "ok 3";
else
diff --git a/tools/regression/msdosfs/msdosfstest-4.sh b/tools/regression/msdosfs/msdosfstest-4.sh
index 46b9db9..5e3c88e 100644
--- a/tools/regression/msdosfs/msdosfstest-4.sh
+++ b/tools/regression/msdosfs/msdosfstest-4.sh
@@ -8,12 +8,12 @@ mdconfig -a -t swap -s 128m -u 10
bsdlabel -w md10 auto
newfs_msdos -F 16 -b 8192 /dev/md10a
mount_msdosfs -L uk_UA.KOI8-U -D CP866 -l /dev/md10a /tmp/msdosfstest
-# mkdir /tmp/msdosfstest/U+0456 (CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I)
-mkdir /tmp/msdosfstest/¦
+# The comment is UTF-8, the actual command uses the KOI8-U representation.
+# mkdir /tmp/msdosfstest/Ñ– (CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I)
+mkdir /tmp/msdosfstest/$'\246'
if [ $? -eq 0 ]; then
echo "ok 4 (pass stage 1/3)"
- # cd /tmp/msdosfstest/U+0456 (CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I)
- cd /tmp/msdosfstest/¦
+ cd /tmp/msdosfstest/$'\246'
if [ $? -eq 0 ]; then
echo "ok 4 (pass stage 2/3)"
cd /tmp
diff --git a/tools/regression/msdosfs/msdosfstest-5.sh b/tools/regression/msdosfs/msdosfstest-5.sh
index f6a5581..6c8a45d 100644
--- a/tools/regression/msdosfs/msdosfstest-5.sh
+++ b/tools/regression/msdosfs/msdosfstest-5.sh
@@ -10,18 +10,20 @@ mdconfig -a -t swap -s 128m -u 10
bsdlabel -w md10 auto
newfs_msdos -F 16 -b 8192 /dev/md10a
mount_msdosfs -L ja_JP.eucJP -D CP932 -l /dev/md10a /tmp/msdosfstest
-# touch /tmp/msdosfstest/U+FF71 (HALFWIDTH KATAKANA LETTER A)
-touch /tmp/msdosfstest/Ž±
+# The comment is UTF-8, the actual command uses the eucJP representation.
+# touch /tmp/msdosfstest/ï½± (HALFWIDTH KATAKANA LETTER A)
+touch /tmp/msdosfstest/$'\216\261'
if [ $? -eq 0 ]; then
umount /tmp/msdosfstest
mount_msdosfs -L ja_JP.eucJP -D CP932 -s /dev/md10a /tmp/msdosfstest
- ls /tmp/msdosfstest/Ž±
+ ls /tmp/msdosfstest/$'\216\261'
if [ $? -eq 0 ]; then
echo "ok 5 (pass stage 1/2)"
umount /tmp/msdosfstest
mount_msdosfs -L uk_UA.KOI8-U -D CP866 -l /dev/md10a /tmp/msdosfstest
- # ls /tmp/msdosfstest/0xb1 (MEDIUM SHADE)
- ls /tmp/msdosfstest/‘
+ # The comment is UTF-8, the actual command uses the KOI8-U representation.
+ # ls /tmp/msdosfstest/â–’ (MEDIUM SHADE)
+ ls /tmp/msdosfstest/$'\221'
if [ $? -ne 0 ]; then
# assume that U+FF71 was recorded with long name
echo "ok 5 (pass stage 2/2)"
diff --git a/tools/regression/msdosfs/msdosfstest-6.sh b/tools/regression/msdosfs/msdosfstest-6.sh
index d64472d..c580b3e 100644
--- a/tools/regression/msdosfs/msdosfstest-6.sh
+++ b/tools/regression/msdosfs/msdosfstest-6.sh
@@ -9,8 +9,13 @@ mdconfig -a -t swap -s 128m -u 10
bsdlabel -w md10 auto
newfs_msdos -F 32 -b 8192 /dev/md10a
mount_msdosfs -L zh_TW.Big5 -D CP950 /dev/md10a /tmp/msdosfstest/
-mkdir '/tmp/msdosfstest/¬O§_¬Ý¹L§{¶¡±`¨£ªº³\¯øªå²\®ü¼y¥\®b¦Y»\¶º²Ä¥|¶°'
-cd '/tmp/msdosfstest/¬O§_¬Ý¹L§{¶¡±`¨£ªº³\¯øªå²\®ü¼y¥\®b¦Y»\¶º²Ä¥|¶°'
+# The comment is UTF-8, the actual command uses the Big5 representation.
+# mkdir /tmp/msdosfstest/是å¦çœ‹éŽåŠé–“常見的許茹芸淚海慶功宴åƒè“‹é£¯ç¬¬å››é›†
+subdir=$'\254\117\247\137\254\335\271\114\247\173\266\241\261\140\250\243'\
+$'\252\272\263\134\257\370\252\345\262\134\256\374\274\171\245\134'\
+$'\256\142\246\131\273\134\266\272\262\304\245\174\266\260'
+mkdir /tmp/msdosfstest/$subdir
+cd /tmp/msdosfstest/$subdir
if [ $? -eq 0 ]; then
echo "ok 6";
else
diff --git a/tools/regression/nfsmmap/Makefile b/tools/regression/nfsmmap/Makefile
index c731d42..9597256 100644
--- a/tools/regression/nfsmmap/Makefile
+++ b/tools/regression/nfsmmap/Makefile
@@ -1,3 +1,5 @@
+# $FreeBSD$
+
SUBDIR= test1 test2
.include <bsd.subdir.mk>
diff --git a/tools/regression/nfsmmap/README b/tools/regression/nfsmmap/README
index 81c4ad5..055ed65 100644
--- a/tools/regression/nfsmmap/README
+++ b/tools/regression/nfsmmap/README
@@ -1,3 +1,4 @@
+$FreeBSD$
These tests are intended to make sure that NFS's use of the
b_{valid,dirty}{off,end} fields of struct buf is consistent with the
VM system's use of the underlying VM pages.
@@ -17,4 +18,4 @@ Test2:
should first write out the dirty range and then read the rest
of the page. This is currently broken since the vnode_pager
doesn't use the original buf for its i/o and therefore the
- information in b_dirtyoff, b_dirtyend is not avalable.
+ information in b_dirtyoff, b_dirtyend is not available.
diff --git a/tools/regression/pipe/pipe-reverse2.c b/tools/regression/pipe/pipe-reverse2.c
new file mode 100644
index 0000000..cd54190
--- /dev/null
+++ b/tools/regression/pipe/pipe-reverse2.c
@@ -0,0 +1,67 @@
+/*-
+ * Copyright (c) 2010 Jilles Tjoelker
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ */
+
+#include <sys/select.h>
+
+#include <err.h>
+#include <stdio.h>
+#include <unistd.h>
+
+/*
+ * Check that pipes can be selected for writing in the reverse direction.
+ */
+int
+main(int argc, char *argv[])
+{
+ int pip[2];
+ fd_set set;
+ int n;
+
+ if (pipe(pip) == -1)
+ err(1, "FAIL: pipe");
+
+ FD_ZERO(&set);
+ FD_SET(pip[0], &set);
+ n = select(pip[1] + 1, NULL, &set, NULL, &(struct timeval){ 0, 0 });
+ if (n != 1)
+ errx(1, "FAIL: select initial reverse direction");
+
+ n = write(pip[0], "x", 1);
+ if (n != 1)
+ err(1, "FAIL: write reverse direction");
+
+ FD_ZERO(&set);
+ FD_SET(pip[0], &set);
+ n = select(pip[1] + 1, NULL, &set, NULL, &(struct timeval){ 0, 0 });
+ if (n != 1)
+ errx(1, "FAIL: select reverse direction after write");
+
+ printf("PASS\n");
+
+ return (0);
+}
diff --git a/tools/regression/pjdfstest/tests/chown/00.t b/tools/regression/pjdfstest/tests/chown/00.t
index 36b1fe7..a3ccbac 100644
--- a/tools/regression/pjdfstest/tests/chown/00.t
+++ b/tools/regression/pjdfstest/tests/chown/00.t
@@ -296,7 +296,7 @@ for type in regular dir fifo block char socket symlink; do
fi
done
-# successfull chown(2) call (except uid and gid equal to -1) updates ctime.
+# successful chown(2) call (except uid and gid equal to -1) updates ctime.
for type in regular dir fifo block char socket symlink; do
if [ "${type}" != "symlink" ]; then
create_file ${type} ${n0}
diff --git a/tools/regression/priv/priv_cred.c b/tools/regression/priv/priv_cred.c
index 6e060cf..2fd0e2c 100644
--- a/tools/regression/priv/priv_cred.c
+++ b/tools/regression/priv/priv_cred.c
@@ -31,7 +31,7 @@
/*
* Confirm that various UID/GID/etc-related system calls require root
- * privilege in the absense of any saved/real/etc variations in the
+ * privilege in the absence of any saved/real/etc variations in the
* credential. It would be nice to also check cases where those bits of the
* credential are more interesting.
*
diff --git a/tools/regression/pthread/mutex_isowned_np/mutex_isowned_np.c b/tools/regression/pthread/mutex_isowned_np/mutex_isowned_np.c
index 865b426..5c23568 100644
--- a/tools/regression/pthread/mutex_isowned_np/mutex_isowned_np.c
+++ b/tools/regression/pthread/mutex_isowned_np/mutex_isowned_np.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2008 Dag-Erling Coïdan Smørgrav
+ * Copyright (c) 2008 Dag-Erling Coïdan Smørgrav
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/tools/regression/sbin/dhclient/fake.c b/tools/regression/sbin/dhclient/fake.c
index 91d57b6..c204d49 100644
--- a/tools/regression/sbin/dhclient/fake.c
+++ b/tools/regression/sbin/dhclient/fake.c
@@ -32,7 +32,11 @@ warning(char *fmt, ...)
va_end(ap);
fprintf(stderr, "\n");
- return ret;
+ /*
+ * The original warning() would return "ret" here. We do this to
+ * check warnings explicitely.
+ */
+ longjmp(env, 1);
}
int
diff --git a/tools/regression/sbin/mdconfig/00.t b/tools/regression/sbin/mdconfig/00.t
new file mode 100644
index 0000000..94d1934
--- /dev/null
+++ b/tools/regression/sbin/mdconfig/00.t
@@ -0,0 +1,47 @@
+#!/bin/sh
+#
+# Copyright (c) 2012 Edward Tomasz Napierała <trasz@FreeBSD.org>
+# 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.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+#
+# $FreeBSD$
+#
+
+# This is a wrapper script to run mdconfig.test.
+
+echo "1..1"
+
+if [ `whoami` != "root" ]; then
+ echo "not ok 1 - you need to be root to run this test."
+ exit 1
+fi
+
+TESTDIR=$(dirname $(realpath $0))
+
+perl $TESTDIR/run $TESTDIR/mdconfig.test > /dev/null
+
+if [ $? -eq 0 ]; then
+ echo "ok 1"
+else
+ echo "not ok 1"
+fi
diff --git a/tools/regression/sbin/mdconfig/mdconfig.test b/tools/regression/sbin/mdconfig/mdconfig.test
new file mode 100644
index 0000000..69bcec6
--- /dev/null
+++ b/tools/regression/sbin/mdconfig/mdconfig.test
@@ -0,0 +1,192 @@
+# Copyright (c) 2012 Edward Tomasz Napierała <trasz@FreeBSD.org>
+# 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.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+#
+# $FreeBSD$
+#
+
+# This is a test for mdconfig(8) functionality. Run it as root:
+#
+# /usr/src/tools/regression/mdconfig/run /usr/src/tools/regression/mdconfig/mdconfig.test
+#
+# WARNING: Creates files in unsafe way.
+
+$ whoami
+> root
+$ umask 022
+$ truncate -s 1gb xxx
+
+$ mdconfig -l
+
+$ mdconfig -af xxx
+> md0
+
+# This awk thing is to strip the file path.
+$ mdconfig -lv | awk '{ print $1, $2, $3 }'
+> md0 vnode 1024M
+
+$ diskinfo -v /dev/md0 | expand
+> /dev/md0
+> 512 # sectorsize
+> 1073741824 # mediasize in bytes (1.0G)
+> 2097152 # mediasize in sectors
+> 0 # stripesize
+> 0 # stripeoffset
+>
+
+$ mdconfig -du 0
+
+# Check different valid syntax variations: implicit -a.
+
+$ mdconfig xxx
+> md0
+
+$ mdconfig -lv | awk '{ print $1, $2, $3 }'
+> md0 vnode 1024M
+
+$ diskinfo -v /dev/md0 | expand
+> /dev/md0
+> 512 # sectorsize
+> 1073741824 # mediasize in bytes (1.0G)
+> 2097152 # mediasize in sectors
+> 0 # stripesize
+> 0 # stripeoffset
+>
+
+$ mdconfig -du 0
+
+# Explicit -t vnode.
+
+$ mdconfig -a -t vnode -f xxx
+> md0
+
+$ mdconfig -lv | awk '{ print $1, $2, $3 }'
+> md0 vnode 1024M
+
+$ diskinfo -v /dev/md0 | expand
+> /dev/md0
+> 512 # sectorsize
+> 1073741824 # mediasize in bytes (1.0G)
+> 2097152 # mediasize in sectors
+> 0 # stripesize
+> 0 # stripeoffset
+>
+
+$ mdconfig -du 0
+
+# Size for vnodes - smaller than the actual file.
+
+$ mdconfig -a -t vnode -f xxx -s 128m
+> md0
+
+$ mdconfig -lv | awk '{ print $1, $2, $3 }'
+> md0 vnode 128M
+
+$ diskinfo -v /dev/md0 | expand
+> /dev/md0
+> 512 # sectorsize
+> 134217728 # mediasize in bytes (128M)
+> 262144 # mediasize in sectors
+> 0 # stripesize
+> 0 # stripeoffset
+>
+
+$ mdconfig -du 0
+
+# Size for vnodes - larger than the actual file.
+
+$ mdconfig -a -t vnode -f xxx -s 128g
+> md0
+
+$ mdconfig -lv | awk '{ print $1, $2, $3 }'
+> md0 vnode 128G
+
+$ diskinfo -v /dev/md0 | expand
+> /dev/md0
+> 512 # sectorsize
+> 137438953472 # mediasize in bytes (128G)
+> 268435456 # mediasize in sectors
+> 0 # stripesize
+> 0 # stripeoffset
+>
+
+$ mdconfig -du 0
+
+# Sector size for vnodes.
+
+$ mdconfig -a -t vnode -f xxx -S 2048
+> md0
+
+$ mdconfig -lv | awk '{ print $1, $2, $3 }'
+> md0 vnode 1024M
+
+$ diskinfo -v /dev/md0 | expand
+> /dev/md0
+> 2048 # sectorsize
+> 1073741824 # mediasize in bytes (1.0G)
+> 524288 # mediasize in sectors
+> 0 # stripesize
+> 0 # stripeoffset
+>
+
+$ mdconfig -du 0
+
+# Malloc type.
+
+$ mdconfig -a -t malloc -s 1g
+> md0
+
+$ mdconfig -lv | awk '{ print $1, $2, $3 }'
+> md0 malloc 1024M
+
+$ diskinfo -v /dev/md0 | expand
+> /dev/md0
+> 512 # sectorsize
+> 1073741824 # mediasize in bytes (1.0G)
+> 2097152 # mediasize in sectors
+> 0 # stripesize
+> 0 # stripeoffset
+>
+
+$ mdconfig -du 0
+
+# Swap type.
+
+$ mdconfig -a -t swap -s 1g
+> md0
+
+$ mdconfig -lv | awk '{ print $1, $2, $3 }'
+> md0 swap 1024M
+
+$ diskinfo -v /dev/md0 | expand
+> /dev/md0
+> 512 # sectorsize
+> 1073741824 # mediasize in bytes (1.0G)
+> 2097152 # mediasize in sectors
+> 0 # stripesize
+> 0 # stripeoffset
+>
+
+$ mdconfig -du 0
+
+$ rm xxx
diff --git a/tools/regression/sbin/mdconfig/run b/tools/regression/sbin/mdconfig/run
new file mode 100755
index 0000000..383f47e
--- /dev/null
+++ b/tools/regression/sbin/mdconfig/run
@@ -0,0 +1,329 @@
+#!/usr/bin/perl -w -U
+
+# Copyright (c) 2007, 2008 Andreas Gruenbacher.
+# 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,
+# without modification, immediately at the beginning of the file.
+# 2. The name of the author may not be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# Alternatively, this software may be distributed under the terms of the
+# GNU Public License ("GPL").
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+#
+# $FreeBSD$
+#
+
+#
+# Possible improvements:
+#
+# - distinguish stdout and stderr output
+# - add environment variable like assignments
+# - run up to a specific line
+# - resume at a specific line
+#
+
+use strict;
+use FileHandle;
+use Getopt::Std;
+use POSIX qw(isatty setuid getcwd);
+use vars qw($opt_l $opt_v);
+
+no warnings qw(taint);
+
+$opt_l = ~0; # a really huge number
+getopts('l:v');
+
+my ($OK, $FAILED) = ("ok", "failed");
+if (isatty(fileno(STDOUT))) {
+ $OK = "\033[32m" . $OK . "\033[m";
+ $FAILED = "\033[31m\033[1m" . $FAILED . "\033[m";
+}
+
+sub exec_test($$);
+sub process_test($$$$);
+
+my ($prog, $in, $out) = ([], [], []);
+my $prog_line = 0;
+my ($tests, $failed) = (0,0);
+my $lineno;
+my $width = ($ENV{COLUMNS} || 80) >> 1;
+
+for (;;) {
+ my $line = <>; $lineno++;
+ if (defined $line) {
+ # Substitute %VAR and %{VAR} with environment variables.
+ $line =~ s[%(\w+)][$ENV{$1}]eg;
+ $line =~ s[%{(\w+)}][$ENV{$1}]eg;
+ }
+ if (defined $line) {
+ if ($line =~ s/^\s*< ?//) {
+ push @$in, $line;
+ } elsif ($line =~ s/^\s*> ?//) {
+ push @$out, $line;
+ } else {
+ process_test($prog, $prog_line, $in, $out);
+ last if $prog_line >= $opt_l;
+
+ $prog = [];
+ $prog_line = 0;
+ }
+ if ($line =~ s/^\s*\$ ?//) {
+ $prog = [ map { s/\\(.)/$1/g; $_ } split /(?<!\\)\s+/, $line ];
+ $prog_line = $lineno;
+ $in = [];
+ $out = [];
+ }
+ } else {
+ process_test($prog, $prog_line, $in, $out);
+ last;
+ }
+}
+
+my $status = sprintf("%d commands (%d passed, %d failed)",
+ $tests, $tests-$failed, $failed);
+if (isatty(fileno(STDOUT))) {
+ if ($failed) {
+ $status = "\033[31m\033[1m" . $status . "\033[m";
+ } else {
+ $status = "\033[32m" . $status . "\033[m";
+ }
+}
+print $status, "\n";
+exit $failed ? 1 : 0;
+
+
+sub process_test($$$$) {
+ my ($prog, $prog_line, $in, $out) = @_;
+
+ return unless @$prog;
+
+ my $p = [ @$prog ];
+ print "[$prog_line] \$ ", join(' ',
+ map { s/\s/\\$&/g; $_ } @$p), " -- ";
+ my $result = exec_test($prog, $in);
+ my @good = ();
+ my $nmax = (@$out > @$result) ? @$out : @$result;
+ for (my $n=0; $n < $nmax; $n++) {
+ my $use_re;
+ if (defined $out->[$n] && $out->[$n] =~ /^~ /) {
+ $use_re = 1;
+ $out->[$n] =~ s/^~ //g;
+ }
+
+ if (!defined($out->[$n]) || !defined($result->[$n]) ||
+ (!$use_re && $result->[$n] ne $out->[$n]) ||
+ ( $use_re && $result->[$n] !~ /^$out->[$n]/)) {
+ push @good, ($use_re ? '!~' : '!=');
+ }
+ else {
+ push @good, ($use_re ? '=~' : '==');
+ }
+ }
+ my $good = !(grep /!/, @good);
+ $tests++;
+ $failed++ unless $good;
+ print $good ? $OK : $FAILED, "\n";
+ if (!$good || $opt_v) {
+ for (my $n=0; $n < $nmax; $n++) {
+ my $l = defined($out->[$n]) ? $out->[$n] : "~";
+ chomp $l;
+ my $r = defined($result->[$n]) ? $result->[$n] : "~";
+ chomp $r;
+ print sprintf("%-" . ($width-3) . "s %s %s\n",
+ $r, $good[$n], $l);
+ }
+ }
+}
+
+
+sub su($) {
+ my ($user) = @_;
+
+ $user ||= "root";
+
+ my ($login, $pass, $uid, $gid) = getpwnam($user)
+ or return [ "su: user $user does not exist\n" ];
+ my @groups = ();
+ my $fh = new FileHandle("/etc/group")
+ or return [ "opening /etc/group: $!\n" ];
+ while (<$fh>) {
+ chomp;
+ my ($group, $passwd, $gid, $users) = split /:/;
+ foreach my $u (split /,/, $users) {
+ push @groups, $gid
+ if ($user eq $u);
+ }
+ }
+ $fh->close;
+
+ my $groups = join(" ", ($gid, $gid, @groups));
+ #print STDERR "[[$groups]]\n";
+ $! = 0; # reset errno
+ $> = 0;
+ $( = $gid;
+ $) = $groups;
+ if ($!) {
+ return [ "su: $!\n" ];
+ }
+ if ($uid != 0) {
+ $> = $uid;
+ #$< = $uid;
+ if ($!) {
+ return [ "su: $prog->[1]: $!\n" ];
+ }
+ }
+ #print STDERR "[($>,$<)($(,$))]";
+ return [];
+}
+
+
+sub sg($) {
+ my ($group) = @_;
+
+ my $gid = getgrnam($group)
+ or return [ "sg: group $group does not exist\n" ];
+ my %groups = map { $_ eq $gid ? () : ($_ => 1) } (split /\s/, $));
+
+ #print STDERR "<<", join("/", keys %groups), ">>\n";
+ my $groups = join(" ", ($gid, $gid, keys %groups));
+ #print STDERR "[[$groups]]\n";
+ $! = 0; # reset errno
+ if ($> != 0) {
+ my $uid = $>;
+ $> = 0;
+ $( = $gid;
+ $) = $groups;
+ $> = $uid;
+ } else {
+ $( = $gid;
+ $) = $groups;
+ }
+ if ($!) {
+ return [ "sg: $!\n" ];
+ }
+ print STDERR "[($>,$<)($(,$))]";
+ return [];
+}
+
+
+sub exec_test($$) {
+ my ($prog, $in) = @_;
+ local (*IN, *IN_DUP, *IN2, *OUT_DUP, *OUT, *OUT2);
+ my $needs_shell = (join('', @$prog) =~ /[][|<>"'`\$\*\?]/);
+
+ if ($prog->[0] eq "umask") {
+ umask oct $prog->[1];
+ return [];
+ } elsif ($prog->[0] eq "cd") {
+ if (!chdir $prog->[1]) {
+ return [ "chdir: $prog->[1]: $!\n" ];
+ }
+ $ENV{PWD} = getcwd;
+ return [];
+ } elsif ($prog->[0] eq "su") {
+ return su($prog->[1]);
+ } elsif ($prog->[0] eq "sg") {
+ return sg($prog->[1]);
+ } elsif ($prog->[0] eq "export") {
+ my ($name, $value) = split /=/, $prog->[1];
+ # FIXME: need to evaluate $value, so that things like this will work:
+ # export dir=$PWD/dir
+ $ENV{$name} = $value;
+ return [];
+ } elsif ($prog->[0] eq "unset") {
+ delete $ENV{$prog->[1]};
+ return [];
+ }
+
+ pipe *IN2, *OUT
+ or die "Can't create pipe for reading: $!";
+ open *IN_DUP, "<&STDIN"
+ or *IN_DUP = undef;
+ open *STDIN, "<&IN2"
+ or die "Can't duplicate pipe for reading: $!";
+ close *IN2;
+
+ open *OUT_DUP, ">&STDOUT"
+ or die "Can't duplicate STDOUT: $!";
+ pipe *IN, *OUT2
+ or die "Can't create pipe for writing: $!";
+ open *STDOUT, ">&OUT2"
+ or die "Can't duplicate pipe for writing: $!";
+ close *OUT2;
+
+ *STDOUT->autoflush();
+ *OUT->autoflush();
+
+ $SIG{CHLD} = 'IGNORE';
+
+ if (fork()) {
+ # Server
+ if (*IN_DUP) {
+ open *STDIN, "<&IN_DUP"
+ or die "Can't duplicate STDIN: $!";
+ close *IN_DUP
+ or die "Can't close STDIN duplicate: $!";
+ }
+ open *STDOUT, ">&OUT_DUP"
+ or die "Can't duplicate STDOUT: $!";
+ close *OUT_DUP
+ or die "Can't close STDOUT duplicate: $!";
+
+ foreach my $line (@$in) {
+ #print "> $line";
+ print OUT $line;
+ }
+ close *OUT
+ or die "Can't close pipe for writing: $!";
+
+ my $result = [];
+ while (<IN>) {
+ #print "< $_";
+ if ($needs_shell) {
+ s#^/bin/sh: line \d+: ##;
+ }
+ push @$result, $_;
+ }
+ return $result;
+ } else {
+ # Client
+ $< = $>;
+ close IN
+ or die "Can't close read end for input pipe: $!";
+ close OUT
+ or die "Can't close write end for output pipe: $!";
+ close OUT_DUP
+ or die "Can't close STDOUT duplicate: $!";
+ local *ERR_DUP;
+ open ERR_DUP, ">&STDERR"
+ or die "Can't duplicate STDERR: $!";
+ open STDERR, ">&STDOUT"
+ or die "Can't join STDOUT and STDERR: $!";
+
+ if ($needs_shell) {
+ exec ('/bin/sh', '-c', join(" ", @$prog));
+ } else {
+ exec @$prog;
+ }
+ print STDERR $prog->[0], ": $!\n";
+ exit;
+ }
+}
+
diff --git a/tools/regression/security/open_to_operation/open_to_operation.c b/tools/regression/security/open_to_operation/open_to_operation.c
index 358e118..38af3c6 100644
--- a/tools/regression/security/open_to_operation/open_to_operation.c
+++ b/tools/regression/security/open_to_operation/open_to_operation.c
@@ -796,7 +796,7 @@ check_write(const char *testname, write_fn fn, const char *path,
} else {
if (!((mode & O_ACCMODE) == O_WRONLY ||
(mode & O_ACCMODE) == O_RDWR))
- notok_mode(testname, "write suceeded", mode);
+ notok_mode(testname, "write succeeded", mode);
else
ok_mode(testname, "write succeeded", mode);
}
@@ -880,7 +880,7 @@ check_read(const char *testname, read_fn fn, const char *path,
} else {
if (!((mode & O_ACCMODE) == O_RDONLY ||
(mode & O_ACCMODE) == O_RDWR))
- notok_mode(testname, "read suceeded", mode);
+ notok_mode(testname, "read succeeded", mode);
else
ok_mode(testname, "read succeeded", mode);
}
diff --git a/tools/regression/usr.bin/cc/Makefile b/tools/regression/usr.bin/cc/Makefile
new file mode 100644
index 0000000..e5b1b90
--- /dev/null
+++ b/tools/regression/usr.bin/cc/Makefile
@@ -0,0 +1,12 @@
+# $FreeBSD$
+
+TESTS= float
+CFLAGS+=-lm
+
+.PHONY: tests
+tests: ${TESTS}
+ for p in ${TESTS}; do ${.OBJDIR}/$$p; done
+
+.PHONY: clean
+clean:
+ -rm -f ${TESTS}
diff --git a/tools/regression/usr.bin/cc/float.c b/tools/regression/usr.bin/cc/float.c
new file mode 100644
index 0000000..9bdd7d9
--- /dev/null
+++ b/tools/regression/usr.bin/cc/float.c
@@ -0,0 +1,271 @@
+/*-
+ * Copyright (c) 2012 David Schultz <das@FreeBSD.org>
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ */
+
+/*
+ * Test that floating-point arithmetic works as specified by the C standard.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <fenv.h>
+#include <float.h>
+#include <math.h>
+#include <stdio.h>
+
+#ifdef __i386__
+#include <ieeefp.h>
+#endif
+
+#define ALL_STD_EXCEPT (FE_DIVBYZERO | FE_INEXACT | FE_INVALID | \
+ FE_OVERFLOW | FE_UNDERFLOW)
+
+#define TWICE(x) ((x) + (x))
+#define test(desc, pass) test1((desc), (pass), 0)
+#define skiptest(desc, pass) test1((desc), (pass), 1)
+
+#pragma STDC FENV_ACCESS ON
+
+static const float one_f = 1.0 + FLT_EPSILON / 2;
+static const double one_d = 1.0 + DBL_EPSILON / 2;
+static const long double one_ld = 1.0L + LDBL_EPSILON / 2;
+
+static int testnum, failures;
+
+static void
+test1(const char *testdesc, int pass, int skip)
+{
+
+ testnum++;
+ printf("%sok %d - %s%s\n", pass || skip ? "" : "not ", testnum,
+ skip ? "(SKIPPED) " : "", testdesc);
+ if (!pass && !skip)
+ failures++;
+}
+
+/*
+ * Compare d1 and d2 using special rules: NaN == NaN and +0 != -0.
+ */
+static int
+fpequal(long double d1, long double d2)
+{
+
+ if (d1 != d2)
+ return (isnan(d1) && isnan(d2));
+ return (copysignl(1.0, d1) == copysignl(1.0, d2));
+}
+
+void
+run_zero_opt_test(double d1, double d2)
+{
+
+ test("optimizations don't break the sign of 0",
+ fpequal(d1 - d2, 0.0)
+ && fpequal(-d1 + 0.0, 0.0)
+ && fpequal(-d1 - d2, -0.0)
+ && fpequal(-(d1 - d2), -0.0)
+ && fpequal(-d1 - (-d2), 0.0));
+}
+
+void
+run_inf_opt_test(double d)
+{
+
+ test("optimizations don't break infinities",
+ fpequal(d / d, NAN) && fpequal(0.0 * d, NAN));
+}
+
+static inline double
+todouble(long double ld)
+{
+
+ return (ld);
+}
+
+static inline float
+tofloat(double d)
+{
+
+ return (d);
+}
+
+void
+run_tests(void)
+{
+ volatile long double vld;
+ long double ld;
+ volatile double vd;
+ double d;
+ volatile float vf;
+ float f;
+ int x;
+
+ test("sign bits", fpequal(-0.0, -0.0) && !fpequal(0.0, -0.0));
+
+ vd = NAN;
+ test("NaN equality", fpequal(NAN, NAN) && NAN != NAN && vd != vd);
+
+ feclearexcept(ALL_STD_EXCEPT);
+ test("NaN comparison returns false", !(vd <= vd));
+ /*
+ * XXX disabled; gcc/amd64 botches this IEEE 754 requirement by
+ * emitting ucomisd instead of comisd.
+ */
+ skiptest("FENV_ACCESS: NaN comparison raises invalid exception",
+ fetestexcept(ALL_STD_EXCEPT) == FE_INVALID);
+
+ vd = 0.0;
+ run_zero_opt_test(vd, vd);
+
+ vd = INFINITY;
+ run_inf_opt_test(vd);
+
+ feclearexcept(ALL_STD_EXCEPT);
+ vd = INFINITY;
+ x = (int)vd;
+ /* XXX disabled (works with -O0); gcc doesn't support FENV_ACCESS */
+ skiptest("FENV_ACCESS: Inf->int conversion raises invalid exception",
+ fetestexcept(ALL_STD_EXCEPT) == FE_INVALID);
+
+ /* Raising an inexact exception here is an IEEE-854 requirement. */
+ feclearexcept(ALL_STD_EXCEPT);
+ vd = 0.75;
+ x = (int)vd;
+ test("0.75->int conversion rounds toward 0, raises inexact exception",
+ x == 0 && fetestexcept(ALL_STD_EXCEPT) == FE_INEXACT);
+
+ feclearexcept(ALL_STD_EXCEPT);
+ vd = -42.0;
+ x = (int)vd;
+ test("-42.0->int conversion is exact, raises no exception",
+ x == -42 && fetestexcept(ALL_STD_EXCEPT) == 0);
+
+ feclearexcept(ALL_STD_EXCEPT);
+ x = (int)INFINITY;
+ /* XXX disabled; gcc doesn't support FENV_ACCESS */
+ skiptest("FENV_ACCESS: const Inf->int conversion raises invalid",
+ fetestexcept(ALL_STD_EXCEPT) == FE_INVALID);
+
+ feclearexcept(ALL_STD_EXCEPT);
+ x = (int)0.5;
+ /* XXX disabled; gcc doesn't support FENV_ACCESS */
+ skiptest("FENV_ACCESS: const double->int conversion raises inexact",
+ x == 0 && fetestexcept(ALL_STD_EXCEPT) == FE_INEXACT);
+
+ test("compile-time constants don't have too much precision",
+ one_f == 1.0L && one_d == 1.0L && one_ld == 1.0L);
+
+ test("const minimum rounding precision",
+ 1.0F + FLT_EPSILON != 1.0F &&
+ 1.0 + DBL_EPSILON != 1.0 &&
+ 1.0L + LDBL_EPSILON != 1.0L);
+
+ /* It isn't the compiler's fault if this fails on FreeBSD/i386. */
+ vf = FLT_EPSILON;
+ vd = DBL_EPSILON;
+ vld = LDBL_EPSILON;
+ test("runtime minimum rounding precision",
+ 1.0F + vf != 1.0F && 1.0 + vd != 1.0 && 1.0L + vld != 1.0L);
+
+ test("explicit float to float conversion discards extra precision",
+ (float)(1.0F + FLT_EPSILON * 0.5F) == 1.0F &&
+ (float)(1.0F + vf * 0.5F) == 1.0F);
+ test("explicit double to float conversion discards extra precision",
+ (float)(1.0 + FLT_EPSILON * 0.5) == 1.0F &&
+ (float)(1.0 + vf * 0.5) == 1.0F);
+ test("explicit ldouble to float conversion discards extra precision",
+ (float)(1.0L + FLT_EPSILON * 0.5L) == 1.0F &&
+ (float)(1.0L + vf * 0.5L) == 1.0F);
+
+ test("explicit double to double conversion discards extra precision",
+ (double)(1.0 + DBL_EPSILON * 0.5) == 1.0 &&
+ (double)(1.0 + vd * 0.5) == 1.0);
+ test("explicit ldouble to double conversion discards extra precision",
+ (double)(1.0L + DBL_EPSILON * 0.5L) == 1.0 &&
+ (double)(1.0L + vd * 0.5L) == 1.0);
+
+ /*
+ * FLT_EVAL_METHOD > 1 implies that float expressions are always
+ * evaluated in double precision or higher, but some compilers get
+ * this wrong when registers spill to memory. The following expression
+ * forces a spill when there are at most 8 FP registers.
+ */
+ test("implicit promption to double or higher precision is consistent",
+#if FLT_EVAL_METHOD == 1 || FLT_EVAL_METHOD == 2 || defined(__i386__)
+ TWICE(TWICE(TWICE(TWICE(TWICE(
+ TWICE(TWICE(TWICE(TWICE(1.0F + vf * 0.5F)))))))))
+ == (1.0 + FLT_EPSILON * 0.5) * 512.0
+#else
+ 1
+#endif
+ );
+
+ f = 1.0 + FLT_EPSILON * 0.5;
+ d = 1.0L + DBL_EPSILON * 0.5L;
+ test("const assignment discards extra precision", f == 1.0F && d == 1.0);
+
+ f = 1.0 + vf * 0.5;
+ d = 1.0L + vd * 0.5L;
+ test("variable assignment discards explicit extra precision",
+ f == 1.0F && d == 1.0);
+ f = 1.0F + vf * 0.5F;
+ d = 1.0 + vd * 0.5;
+ test("variable assignment discards implicit extra precision",
+ f == 1.0F && d == 1.0);
+
+ test("return discards extra precision",
+ tofloat(1.0 + vf * 0.5) == 1.0F &&
+ todouble(1.0L + vd * 0.5L) == 1.0);
+
+ fesetround(FE_UPWARD);
+ /* XXX disabled (works with -frounding-math) */
+ skiptest("FENV_ACCESS: constant arithmetic respects rounding mode",
+ 1.0F + FLT_MIN == 1.0F + FLT_EPSILON &&
+ 1.0 + DBL_MIN == 1.0 + DBL_EPSILON &&
+ 1.0L + LDBL_MIN == 1.0L + LDBL_EPSILON);
+ fesetround(FE_TONEAREST);
+
+ ld = vld * 0.5;
+ test("associativity is respected",
+ 1.0L + ld + (LDBL_EPSILON * 0.5) == 1.0L &&
+ 1.0L + (LDBL_EPSILON * 0.5) + ld == 1.0L &&
+ ld + 1.0 + (LDBL_EPSILON * 0.5) == 1.0L &&
+ ld + (LDBL_EPSILON * 0.5) + 1.0 == 1.0L + LDBL_EPSILON);
+}
+
+int
+main(int argc, char *argv[])
+{
+
+ printf("1..26\n");
+
+#ifdef __i386__
+ fpsetprec(FP_PE);
+#endif
+ run_tests();
+
+ return (failures);
+}
diff --git a/tools/regression/usr.bin/cc/float.t b/tools/regression/usr.bin/cc/float.t
new file mode 100644
index 0000000..8bdfd03
--- /dev/null
+++ b/tools/regression/usr.bin/cc/float.t
@@ -0,0 +1,10 @@
+#!/bin/sh
+# $FreeBSD$
+
+cd `dirname $0`
+
+executable=`basename $0 .t`
+
+make $executable 2>&1 > /dev/null
+
+exec ./$executable
diff --git a/tools/regression/usr.bin/env/regress-sb.rb b/tools/regression/usr.bin/env/regress-sb.rb
index b692ef2..f6333aa 100644
--- a/tools/regression/usr.bin/env/regress-sb.rb
+++ b/tools/regression/usr.bin/env/regress-sb.rb
@@ -341,7 +341,7 @@ class RGTestOptions
# for test data. Format of all recognized values should be:
# [%-object.value-%]
# which is hopefully distinctive-enough that they will never
- # conflict with any naturally-occuring string. Also note that
+ # conflict with any naturally-occurring string. Also note that
# we only match the specific values that we recognize, and not
# "just anything" that matches the general pattern. There are
# no blanks in the recognized values, but I use an x-tended
diff --git a/tools/regression/usr.bin/make/README b/tools/regression/usr.bin/make/README
index 6c577ad..32b4ddc 100644
--- a/tools/regression/usr.bin/make/README
+++ b/tools/regression/usr.bin/make/README
@@ -8,7 +8,7 @@ output for '^not ok'.
----------------------------------------------------------------------------
-The rest of this file is intented for developers.
+The rest of this file is intended for developers.
The tests are invoked via the test.sh script or prove(1) from p5-Test-Harness.
Tests are normally executed in a special test directory that is built under
diff --git a/tools/regression/usr.bin/make/execution/joberr/Makefile b/tools/regression/usr.bin/make/execution/joberr/Makefile
new file mode 100644
index 0000000..aca86e8
--- /dev/null
+++ b/tools/regression/usr.bin/make/execution/joberr/Makefile
@@ -0,0 +1,10 @@
+# $FreeBSD$
+
+check-joberr:
+.for _t in 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9
+ @-${MAKE} -f ${MAKEFILE} -j2 do-$@
+.endfor
+
+do-check-joberr:
+ @echo "Error: build failed"
+ @exit 1
diff --git a/tools/regression/usr.bin/make/execution/joberr/expected.status.1 b/tools/regression/usr.bin/make/execution/joberr/expected.status.1
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tools/regression/usr.bin/make/execution/joberr/expected.status.1
@@ -0,0 +1 @@
+0
diff --git a/tools/regression/usr.bin/make/execution/joberr/expected.stderr.1 b/tools/regression/usr.bin/make/execution/joberr/expected.stderr.1
new file mode 100644
index 0000000..d0c8a2e
--- /dev/null
+++ b/tools/regression/usr.bin/make/execution/joberr/expected.stderr.1
@@ -0,0 +1,30 @@
+1 error
+1 error
+1 error
+1 error
+1 error
+1 error
+1 error
+1 error
+1 error
+1 error
+1 error
+1 error
+1 error
+1 error
+1 error
+1 error
+1 error
+1 error
+1 error
+1 error
+1 error
+1 error
+1 error
+1 error
+1 error
+1 error
+1 error
+1 error
+1 error
+1 error
diff --git a/tools/regression/usr.bin/make/execution/joberr/expected.stdout.1 b/tools/regression/usr.bin/make/execution/joberr/expected.stdout.1
new file mode 100644
index 0000000..eb17363
--- /dev/null
+++ b/tools/regression/usr.bin/make/execution/joberr/expected.stdout.1
@@ -0,0 +1,90 @@
+Error: build failed
+*** Error code 1
+Error: build failed
+*** Error code 1
+Error: build failed
+*** Error code 1
+Error: build failed
+*** Error code 1
+Error: build failed
+*** Error code 1
+Error: build failed
+*** Error code 1
+Error: build failed
+*** Error code 1
+Error: build failed
+*** Error code 1
+Error: build failed
+*** Error code 1
+Error: build failed
+*** Error code 1
+Error: build failed
+*** Error code 1
+Error: build failed
+*** Error code 1
+Error: build failed
+*** Error code 1
+Error: build failed
+*** Error code 1
+Error: build failed
+*** Error code 1
+Error: build failed
+*** Error code 1
+Error: build failed
+*** Error code 1
+Error: build failed
+*** Error code 1
+Error: build failed
+*** Error code 1
+Error: build failed
+*** Error code 1
+Error: build failed
+*** Error code 1
+Error: build failed
+*** Error code 1
+Error: build failed
+*** Error code 1
+Error: build failed
+*** Error code 1
+Error: build failed
+*** Error code 1
+Error: build failed
+*** Error code 1
+Error: build failed
+*** Error code 1
+Error: build failed
+*** Error code 1
+Error: build failed
+*** Error code 1
+Error: build failed
+*** Error code 1
+*** Error code 2 (ignored)
+*** Error code 2 (ignored)
+*** Error code 2 (ignored)
+*** Error code 2 (ignored)
+*** Error code 2 (ignored)
+*** Error code 2 (ignored)
+*** Error code 2 (ignored)
+*** Error code 2 (ignored)
+*** Error code 2 (ignored)
+*** Error code 2 (ignored)
+*** Error code 2 (ignored)
+*** Error code 2 (ignored)
+*** Error code 2 (ignored)
+*** Error code 2 (ignored)
+*** Error code 2 (ignored)
+*** Error code 2 (ignored)
+*** Error code 2 (ignored)
+*** Error code 2 (ignored)
+*** Error code 2 (ignored)
+*** Error code 2 (ignored)
+*** Error code 2 (ignored)
+*** Error code 2 (ignored)
+*** Error code 2 (ignored)
+*** Error code 2 (ignored)
+*** Error code 2 (ignored)
+*** Error code 2 (ignored)
+*** Error code 2 (ignored)
+*** Error code 2 (ignored)
+*** Error code 2 (ignored)
+*** Error code 2 (ignored)
diff --git a/tools/regression/usr.bin/make/execution/joberr/test.t b/tools/regression/usr.bin/make/execution/joberr/test.t
new file mode 100644
index 0000000..8e07958
--- /dev/null
+++ b/tools/regression/usr.bin/make/execution/joberr/test.t
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# $FreeBSD$
+
+cd `dirname $0`
+. ../../common.sh
+
+# Description
+DESC="Test job make error output"
+
+# Run
+TEST_N=1
+TEST_1=
+
+eval_cmd $*
diff --git a/tools/regression/usr.bin/make/variables/modifier_M/Makefile b/tools/regression/usr.bin/make/variables/modifier_M/Makefile
index f8f6d3f..34d4cd4 100644
--- a/tools/regression/usr.bin/make/variables/modifier_M/Makefile
+++ b/tools/regression/usr.bin/make/variables/modifier_M/Makefile
@@ -12,7 +12,7 @@ test1:
@echo "all files: ${FILES}"
@echo "cfiles: ${FILES:M*.c}"
@echo "hfiles: ${FILES:M*.h}"
- @echo "grammer and lexer: ${FILES:M*.[ly]}"
+ @echo "grammar and lexer: ${FILES:M*.[ly]}"
@echo "man page: ${FILES:M*.[1-9]}"
@echo "utility files: ${FILES:Mutil.?}"
@echo "m files: ${FILES:Mm*}"
diff --git a/tools/regression/usr.bin/make/variables/modifier_M/expected.stdout.1 b/tools/regression/usr.bin/make/variables/modifier_M/expected.stdout.1
index e00d5a7..b29e6df 100644
--- a/tools/regression/usr.bin/make/variables/modifier_M/expected.stdout.1
+++ b/tools/regression/usr.bin/make/variables/modifier_M/expected.stdout.1
@@ -1,7 +1,7 @@
all files: main.c globals.h util.c util.h map.c map.h parser.y lexer.l cmdman.1 format.5
cfiles: main.c util.c map.c
hfiles: globals.h util.h map.h
-grammer and lexer: parser.y lexer.l
+grammar and lexer: parser.y lexer.l
man page: cmdman.1 format.5
utility files: util.c util.h
m files: main.c map.c map.h
diff --git a/tools/regression/usr.bin/sed/math.sed b/tools/regression/usr.bin/sed/math.sed
index cdd18d6..8c8de37 100644
--- a/tools/regression/usr.bin/sed/math.sed
+++ b/tools/regression/usr.bin/sed/math.sed
@@ -57,7 +57,7 @@ x
s//\1(\2)/
b loop
}
-# pull any burried exponents
+# pull any buried exponents
/^\(.*[^0-9]\)\([0-9][0-9]*^[0-9][0-9]*\)$/{
s//\1(\2)/
b loop
diff --git a/tools/regression/usr.sbin/newsyslog/regress.sh b/tools/regression/usr.sbin/newsyslog/regress.sh
index dd16796..70c4240 100755
--- a/tools/regression/usr.sbin/newsyslog/regress.sh
+++ b/tools/regression/usr.sbin/newsyslog/regress.sh
@@ -70,8 +70,8 @@ cknt()
fi
}
-# Check if a file is there, depending of if it's suposed to or not -
-# basically how many log files we are suposed to keep vs. how many we
+# Check if a file is there, depending of if it's supposed to or not -
+# basically how many log files we are supposed to keep vs. how many we
# actually keep.
ckntfe()
{
diff --git a/tools/test/posixshm/shm_test.c b/tools/test/posixshm/shm_test.c
index 6cee558..3ab4732 100644
--- a/tools/test/posixshm/shm_test.c
+++ b/tools/test/posixshm/shm_test.c
@@ -1,6 +1,6 @@
/*
* Test the POSIX shared-memory API.
- * Dedicated to tyhe public domain by Garrett A. Wollman, 2000.
+ * Dedicated to the public domain by Garrett A. Wollman, 2000.
* $FreeBSD$
*/
diff --git a/tools/test/testfloat/systemBugs.txt b/tools/test/testfloat/systemBugs.txt
index a0d171a..ec95894 100644
--- a/tools/test/testfloat/systemBugs.txt
+++ b/tools/test/testfloat/systemBugs.txt
@@ -27,7 +27,7 @@ For some reason, most of the bugs found involve conversions from floating-
point to integer formats.
The bugs are shown as actual TestFloat error lines, along with a brief
-explanation. The error lines given are not necesarily exhaustive and were
+explanation. The error lines given are not necessarily exhaustive and were
not necessarily output in the order shown.
This document does not pretend to be an authoritative bug listing for all
diff --git a/tools/test/testfloat/testfloat-source.txt b/tools/test/testfloat/testfloat-source.txt
index b8f7e9b..8c5efa9 100644
--- a/tools/test/testfloat/testfloat-source.txt
+++ b/tools/test/testfloat/testfloat-source.txt
@@ -46,7 +46,7 @@ name has been obsolete for some time.
Limitations
TestFloat as written requires an ISO/ANSI-style C compiler. No attempt has
-been made to accomodate compilers that are not ISO-conformant. Older ``K&R-
+been made to accommodate compilers that are not ISO-conformant. Older ``K&R-
style'' compilers are not adequate for compiling TestFloat. All testing I
have done so far has been with the GNU C Compiler. Compilation with other
compilers should be possible but has not been tested.
@@ -168,7 +168,7 @@ intended to be identical to that included with the SoftFloat source.
These are the defaults, but other organizations of the sources are possible.
The TestFloat makefiles and `milieu.h' files (see below) are easily edited
-to accomodate other arrangements.
+to accommodate other arrangements.
-------------------------------------------------------------------------------
diff --git a/tools/test/testfloat/testfloat.txt b/tools/test/testfloat/testfloat.txt
index 6e72c1d..3c5e837 100644
--- a/tools/test/testfloat/testfloat.txt
+++ b/tools/test/testfloat/testfloat.txt
@@ -289,7 +289,7 @@ raise the invalid exception if the source value cannot be rounded to a
representable integer of the desired size (32 or 64 bits). If such a
conversion overflows, TestFloat expects the largest integer with the same
sign as the operand to be returned. If the floating-point operand is a NaN,
-TestFloat allows either the largest postive or largest negative integer to
+TestFloat allows either the largest positive or largest negative integer to
be returned.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -629,7 +629,7 @@ TestFloat assumes that conversions to integer will raise the invalid
exception if the source value cannot be rounded to a representable integer.
When the conversion overflows, TestFloat expects the largest integer with
the same sign as the operand to be returned. If the floating-point operand
-is a NaN, TestFloat allows either the largest postive or largest negative
+is a NaN, TestFloat allows either the largest positive or largest negative
integer to be returned. The current version of TestFloat provides no means
to alter these conventions.
diff --git a/tools/tools/ansify/ansify.pl b/tools/tools/ansify/ansify.pl
index 801d693..e355465 100644
--- a/tools/tools/ansify/ansify.pl
+++ b/tools/tools/ansify/ansify.pl
@@ -1,6 +1,6 @@
#!/usr/bin/perl -w
#-
-# Copyright (c) 2005 Dag-Erling Coïdan Smørgrav
+# Copyright (c) 2005 Dag-Erling Coïdan Smørgrav
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/tools/tools/ath/Makefile b/tools/tools/ath/Makefile
index 03269bc..3d603e6 100644
--- a/tools/tools/ath/Makefile
+++ b/tools/tools/ath/Makefile
@@ -1,7 +1,7 @@
# $FreeBSD$
SUBDIR= arcode athdebug athdecode athkey athpoke athprom athrd athregs
-SUBDIR+= athstats ath_ee_v14_print ath_prom_read ath_ee_v4k_print
-SUBDIR+= athradar
+SUBDIR+= athstats ath_prom_read athradar
+SUBDIR+= ath_ee_v14_print ath_ee_v4k_print ath_ee_9287_print
.include <bsd.subdir.mk>
diff --git a/tools/tools/bus_autoconf/bus_autoconf.c b/tools/tools/bus_autoconf/bus_autoconf.c
index adbf6e4..bd5d11e 100644
--- a/tools/tools/bus_autoconf/bus_autoconf.c
+++ b/tools/tools/bus_autoconf/bus_autoconf.c
@@ -27,7 +27,7 @@
/*
* Disclaimer: This utility and format is subject to change and not a
- * comitted interface.
+ * committed interface.
*/
#include <stdio.h>
diff --git a/tools/tools/cd2dvd/cd2dvd.sh b/tools/tools/cd2dvd/cd2dvd.sh
index c591080..c741344 100755
--- a/tools/tools/cd2dvd/cd2dvd.sh
+++ b/tools/tools/cd2dvd/cd2dvd.sh
@@ -229,7 +229,7 @@ then
echo "Error: less than two CD images specified."
fi
-## Some usefull variables
+## Some useful variables
pwd=`pwd`
tmpdirin="${pwd}/tmp-$$-in"
tmpdirout="${pwd}/tmp-$$-out"
diff --git a/tools/tools/cxgbetool/cxgbetool.c b/tools/tools/cxgbetool/cxgbetool.c
index da6bfba..92ac978 100644
--- a/tools/tools/cxgbetool/cxgbetool.c
+++ b/tools/tools/cxgbetool/cxgbetool.c
@@ -30,14 +30,17 @@ __FBSDID("$FreeBSD$");
#include <stdint.h>
#include <stdlib.h>
+#include <unistd.h>
#include <errno.h>
#include <err.h>
#include <fcntl.h>
#include <string.h>
#include <stdio.h>
#include <sys/ioctl.h>
+#include <sys/mman.h>
#include <sys/types.h>
#include <sys/socket.h>
+#include <sys/stat.h>
#include <net/ethernet.h>
#include <netinet/in.h>
#include <arpa/inet.h>
@@ -83,10 +86,13 @@ usage(FILE *fp)
"\tfilter <idx> delete|clear delete a filter\n"
"\tfilter list list all filters\n"
"\tfilter mode [<match>] ... get/set global filter mode\n"
+ "\tloadfw <fw-image.bin> install firmware\n"
+ "\tmemdump <addr> <len> dump a memory range\n"
"\treg <address>[=<val>] read/write register\n"
"\treg64 <address>[=<val>] read/write 64 bit register\n"
"\tregdump [<module>] ... dump registers\n"
"\tstdio interactive mode\n"
+ "\ttcb <tid> read TCB\n"
);
}
@@ -396,12 +402,12 @@ do_show_info_header(uint32_t mode)
printf (" Port");
break;
- case T4_FILTER_OVLAN:
- printf (" vld:oVLAN");
+ case T4_FILTER_VNIC:
+ printf (" vld:VNIC");
break;
- case T4_FILTER_IVLAN:
- printf (" vld:iVLAN");
+ case T4_FILTER_VLAN:
+ printf (" vld:VLAN");
break;
case T4_FILTER_IP_TOS:
@@ -653,18 +659,18 @@ do_show_one_filter_info(struct t4_filter *t, uint32_t mode)
printf(" %1d/%1d", t->fs.val.iport, t->fs.mask.iport);
break;
- case T4_FILTER_OVLAN:
+ case T4_FILTER_VNIC:
printf(" %1d:%1x:%02x/%1d:%1x:%02x",
- t->fs.val.ovlan_vld, (t->fs.val.ovlan >> 7) & 0x7,
- t->fs.val.ovlan & 0x7f, t->fs.mask.ovlan_vld,
- (t->fs.mask.ovlan >> 7) & 0x7,
- t->fs.mask.ovlan & 0x7f);
+ t->fs.val.vnic_vld, (t->fs.val.vnic >> 7) & 0x7,
+ t->fs.val.vnic & 0x7f, t->fs.mask.vnic_vld,
+ (t->fs.mask.vnic >> 7) & 0x7,
+ t->fs.mask.vnic & 0x7f);
break;
- case T4_FILTER_IVLAN:
+ case T4_FILTER_VLAN:
printf(" %1d:%04x/%1d:%04x",
- t->fs.val.ivlan_vld, t->fs.val.ivlan,
- t->fs.mask.ivlan_vld, t->fs.mask.ivlan);
+ t->fs.val.vlan_vld, t->fs.val.vlan,
+ t->fs.mask.vlan_vld, t->fs.mask.vlan);
break;
case T4_FILTER_IP_TOS:
@@ -830,11 +836,11 @@ get_filter_mode(void)
if (mode & T4_FILTER_IP_TOS)
printf("tos ");
- if (mode & T4_FILTER_IVLAN)
- printf("ivlan ");
+ if (mode & T4_FILTER_VLAN)
+ printf("vlan ");
- if (mode & T4_FILTER_OVLAN)
- printf("ovlan ");
+ if (mode & T4_FILTER_VNIC)
+ printf("vnic ");
if (mode & T4_FILTER_PORT)
printf("iport ");
@@ -868,11 +874,12 @@ set_filter_mode(int argc, const char *argv[])
if (!strcmp(argv[0], "tos"))
mode |= T4_FILTER_IP_TOS;
- if (!strcmp(argv[0], "ivlan"))
- mode |= T4_FILTER_IVLAN;
+ if (!strcmp(argv[0], "vlan"))
+ mode |= T4_FILTER_VLAN;
- if (!strcmp(argv[0], "ovlan"))
- mode |= T4_FILTER_OVLAN;
+ if (!strcmp(argv[0], "ovlan") ||
+ !strcmp(argv[0], "vnic"))
+ mode |= T4_FILTER_VNIC;
if (!strcmp(argv[0], "iport"))
mode |= T4_FILTER_PORT;
@@ -936,15 +943,20 @@ set_filter(uint32_t idx, int argc, const char *argv[])
t.fs.val.iport = val;
t.fs.mask.iport = mask;
} else if (!parse_val_mask("ovlan", args, &val, &mask)) {
- t.fs.val.ovlan = val;
- t.fs.mask.ovlan = mask;
- t.fs.val.ovlan_vld = 1;
- t.fs.mask.ovlan_vld = 1;
- } else if (!parse_val_mask("ivlan", args, &val, &mask)) {
- t.fs.val.ivlan = val;
- t.fs.mask.ivlan = mask;
- t.fs.val.ivlan_vld = 1;
- t.fs.mask.ivlan_vld = 1;
+ t.fs.val.vnic = val;
+ t.fs.mask.vnic = mask;
+ t.fs.val.vnic_vld = 1;
+ t.fs.mask.vnic_vld = 1;
+ } else if (!parse_val_mask("vnic", args, &val, &mask)) {
+ t.fs.val.vnic = val;
+ t.fs.mask.vnic = mask;
+ t.fs.val.vnic_vld = 1;
+ t.fs.mask.vnic_vld = 1;
+ } else if (!parse_val_mask("vlan", args, &val, &mask)) {
+ t.fs.val.vlan = val;
+ t.fs.mask.vlan = mask;
+ t.fs.val.vlan_vld = 1;
+ t.fs.mask.vlan_vld = 1;
} else if (!parse_val_mask("tos", args, &val, &mask)) {
t.fs.val.tos = val;
t.fs.mask.tos = mask;
@@ -1347,6 +1359,169 @@ get_sge_context(int argc, const char *argv[])
}
static int
+loadfw(int argc, const char *argv[])
+{
+ int rc, fd;
+ struct t4_data data = {0};
+ const char *fname = argv[0];
+ struct stat st = {0};
+
+ if (argc != 1) {
+ warnx("loadfw: incorrect number of arguments.");
+ return (EINVAL);
+ }
+
+ fd = open(fname, O_RDONLY);
+ if (fd < 0) {
+ warn("open(%s)", fname);
+ return (errno);
+ }
+
+ if (fstat(fd, &st) < 0) {
+ warn("fstat");
+ close(fd);
+ return (errno);
+ }
+
+ data.len = st.st_size;
+ data.data = mmap(0, data.len, PROT_READ, 0, fd, 0);
+ if (data.data == MAP_FAILED) {
+ warn("mmap");
+ close(fd);
+ return (errno);
+ }
+
+ rc = doit(CHELSIO_T4_LOAD_FW, &data);
+ munmap(data.data, data.len);
+ close(fd);
+ return (rc);
+}
+
+static int
+read_mem(uint32_t addr, uint32_t len, void (*output)(uint32_t *, uint32_t))
+{
+ int rc;
+ struct t4_mem_range mr;
+
+ mr.addr = addr;
+ mr.len = len;
+ mr.data = malloc(mr.len);
+
+ if (mr.data == 0) {
+ warn("read_mem: malloc");
+ return (errno);
+ }
+
+ rc = doit(CHELSIO_T4_GET_MEM, &mr);
+ if (rc != 0)
+ goto done;
+
+ if (output)
+ (*output)(mr.data, mr.len);
+done:
+ free(mr.data);
+ return (rc);
+}
+
+/*
+ * Display memory as list of 'n' 4-byte values per line.
+ */
+static void
+show_mem(uint32_t *buf, uint32_t len)
+{
+ const char *s;
+ int i, n = 8;
+
+ while (len) {
+ for (i = 0; len && i < n; i++, buf++, len -= 4) {
+ s = i ? " " : "";
+ printf("%s%08x", s, htonl(*buf));
+ }
+ printf("\n");
+ }
+}
+
+static int
+memdump(int argc, const char *argv[])
+{
+ char *p;
+ long l;
+ uint32_t addr, len;
+
+ if (argc != 2) {
+ warnx("incorrect number of arguments.");
+ return (EINVAL);
+ }
+
+ p = str_to_number(argv[0], &l, NULL);
+ if (*p) {
+ warnx("invalid address \"%s\"", argv[0]);
+ return (EINVAL);
+ }
+ addr = l;
+
+ p = str_to_number(argv[1], &l, NULL);
+ if (*p) {
+ warnx("memdump: invalid length \"%s\"", argv[1]);
+ return (EINVAL);
+ }
+ len = l;
+
+ return (read_mem(addr, len, show_mem));
+}
+
+/*
+ * Display TCB as list of 'n' 4-byte values per line.
+ */
+static void
+show_tcb(uint32_t *buf, uint32_t len)
+{
+ const char *s;
+ int i, n = 8;
+
+ while (len) {
+ for (i = 0; len && i < n; i++, buf++, len -= 4) {
+ s = i ? " " : "";
+ printf("%s%08x", s, htonl(*buf));
+ }
+ printf("\n");
+ }
+}
+
+#define A_TP_CMM_TCB_BASE 0x7d10
+#define TCB_SIZE 128
+static int
+read_tcb(int argc, const char *argv[])
+{
+ char *p;
+ long l;
+ long long val;
+ unsigned int tid;
+ uint32_t addr;
+ int rc;
+
+ if (argc != 1) {
+ warnx("incorrect number of arguments.");
+ return (EINVAL);
+ }
+
+ p = str_to_number(argv[0], &l, NULL);
+ if (*p) {
+ warnx("invalid tid \"%s\"", argv[0]);
+ return (EINVAL);
+ }
+ tid = l;
+
+ rc = read_reg(A_TP_CMM_TCB_BASE, 4, &val);
+ if (rc != 0)
+ return (rc);
+
+ addr = val + tid * TCB_SIZE;
+
+ return (read_mem(addr, TCB_SIZE, show_tcb));
+}
+
+static int
run_cmd(int argc, const char *argv[])
{
int rc = -1;
@@ -1366,6 +1541,12 @@ run_cmd(int argc, const char *argv[])
rc = filter_cmd(argc, argv);
else if (!strcmp(cmd, "context"))
rc = get_sge_context(argc, argv);
+ else if (!strcmp(cmd, "loadfw"))
+ rc = loadfw(argc, argv);
+ else if (!strcmp(cmd, "memdump"))
+ rc = memdump(argc, argv);
+ else if (!strcmp(cmd, "tcb"))
+ rc = read_tcb(argc, argv);
else {
rc = EINVAL;
warnx("invalid command \"%s\"", cmd);
diff --git a/tools/tools/genericize/genericize.pl b/tools/tools/genericize/genericize.pl
index 2f8d694..6ba135e 100755
--- a/tools/tools/genericize/genericize.pl
+++ b/tools/tools/genericize/genericize.pl
@@ -1,6 +1,6 @@
#!/usr/bin/perl -w
#-
-# Copyright (c) 2004 Dag-Erling Coïdan Smørgrav
+# Copyright (c) 2004 Dag-Erling Coïdan Smørgrav
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/tools/tools/hcomp/hcomp.pl b/tools/tools/hcomp/hcomp.pl
index 9c48bba..36e3bda 100644
--- a/tools/tools/hcomp/hcomp.pl
+++ b/tools/tools/hcomp/hcomp.pl
@@ -1,6 +1,6 @@
#!/usr/bin/perl -w
#-
-# Copyright (c) 2003 Dag-Erling Coïdan Smørgrav
+# Copyright (c) 2003 Dag-Erling Coïdan Smørgrav
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/tools/tools/mtxstat/mtxstat.pl b/tools/tools/mtxstat/mtxstat.pl
index cfa7edd..c621389 100644
--- a/tools/tools/mtxstat/mtxstat.pl
+++ b/tools/tools/mtxstat/mtxstat.pl
@@ -1,6 +1,6 @@
#!/usr/bin/perl -Tw
#-
-# Copyright (c) 2002 Dag-Erling Coïdan Smørgrav
+# Copyright (c) 2002 Dag-Erling Coïdan Smørgrav
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/tools/tools/nanobsd/pcengines/Files/root/.cshrc b/tools/tools/nanobsd/pcengines/Files/root/.cshrc
index 313af8e..36df9c6 100644
--- a/tools/tools/nanobsd/pcengines/Files/root/.cshrc
+++ b/tools/tools/nanobsd/pcengines/Files/root/.cshrc
@@ -14,7 +14,7 @@ alias ll ls -lA
# A righteous umask
umask 22
-set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin /usr/X11R6/bin $HOME/bin)
+set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin $HOME/bin)
setenv EDITOR vi
setenv PAGER more
diff --git a/tools/tools/net80211/wesside/wesside/wesside.c b/tools/tools/net80211/wesside/wesside/wesside.c
index 6b276db..76f539e 100644
--- a/tools/tools/net80211/wesside/wesside/wesside.c
+++ b/tools/tools/net80211/wesside/wesside/wesside.c
@@ -2091,7 +2091,7 @@ void save_key(unsigned char *key, int len)
strcat(k, ":");
}
- fd = open(KEY_FILE, O_WRONLY | O_CREAT | 0644);
+ fd = open(KEY_FILE, O_WRONLY | O_CREAT, 0644);
if (fd == -1)
err(1, "open()");
diff --git a/tools/tools/net80211/wlaninject/README b/tools/tools/net80211/wlaninject/README
index 706e3ae..16caa01 100644
--- a/tools/tools/net80211/wlaninject/README
+++ b/tools/tools/net80211/wlaninject/README
@@ -46,7 +46,7 @@ Interesting 802.11 header options.
will be calculated. Symbolic names are:
preq, probereq Probe Request
auth Authenticate
- areq, assocreq Assocation Request
+ areq, assocreq Association Request
data Data
Otherwise the numerical subtype must be supplied.
-4 The 4th MAC addr used for WDS. Make sure you specify this before
diff --git a/tools/tools/netmap/bridge.c b/tools/tools/netmap/bridge.c
index 2385a08..2b9122c 100644
--- a/tools/tools/netmap/bridge.c
+++ b/tools/tools/netmap/bridge.c
@@ -227,7 +227,7 @@ process_rings(struct netmap_ring *rxring, struct netmap_ring *txring,
ts->buf_idx = rs->buf_idx;
rs->buf_idx = pkt;
- /* copy the packet lenght. */
+ /* copy the packet length. */
if (rs->len < 14 || rs->len > 2048)
D("wrong len %d rx[%d] -> tx[%d]", rs->len, j, k);
else if (verbose > 1)
diff --git a/tools/tools/netmap/pkt-gen.c b/tools/tools/netmap/pkt-gen.c
index 21dc8de..f2f4e40 100644
--- a/tools/tools/netmap/pkt-gen.c
+++ b/tools/tools/netmap/pkt-gen.c
@@ -432,7 +432,7 @@ sender_body(void *data)
if (setaffinity(targ->thread, targ->affinity))
goto quit;
- /* setup poll(2) machanism. */
+ /* setup poll(2) mechanism. */
memset(fds, 0, sizeof(fds));
fds[0].fd = targ->fd;
fds[0].events = (POLLOUT);
@@ -543,7 +543,7 @@ receiver_body(void *data)
if (setaffinity(targ->thread, targ->affinity))
goto quit;
- /* setup poll(2) machanism. */
+ /* setup poll(2) mechanism. */
memset(fds, 0, sizeof(fds));
fds[0].fd = targ->fd;
fds[0].events = (POLLIN);
@@ -568,7 +568,7 @@ receiver_body(void *data)
before quitting. */
if (poll(fds, 1, 1 * 1000) <= 0) {
gettimeofday(&targ->toc, NULL);
- targ->toc.tv_sec -= 1; /* Substract timeout time. */
+ targ->toc.tv_sec -= 1; /* Subtract timeout time. */
break;
}
@@ -994,8 +994,8 @@ main(int arc, char **argv)
continue;
/*
- * Collect threads o1utput and extract information about
- * how log it took to send all the packets.
+ * Collect threads output and extract information about
+ * how long it took to send all the packets.
*/
count += targs[i].count;
if (!timerisset(&tic) || timercmp(&targs[i].tic, &tic, <))
diff --git a/tools/tools/netrate/netreceive/netreceive.c b/tools/tools/netrate/netreceive/netreceive.c
index b54ee7f..9300109 100644
--- a/tools/tools/netrate/netreceive/netreceive.c
+++ b/tools/tools/netrate/netreceive/netreceive.c
@@ -126,7 +126,7 @@ main(int argc, char *argv[])
while (1) {
if (poll(fds, nsock, -1) < 0)
perror("poll");
- for (i = 0; i > nsock; i++) {
+ for (i = 0; i < nsock; i++) {
if (fds[i].revents & POLLIN) {
if (recv(s[i], packet, 65536, 0) < 0)
perror("recv");
diff --git a/tools/tools/netrate/tcpp/tcpp_client.c b/tools/tools/netrate/tcpp/tcpp_client.c
index 888c895..70620ce 100644
--- a/tools/tools/netrate/tcpp/tcpp_client.c
+++ b/tools/tools/netrate/tcpp/tcpp_client.c
@@ -99,7 +99,7 @@ tcpp_client_newconn(void)
int fd, i;
/*
- * Spread load over available IPs, roating through them as we go. No
+ * Spread load over available IPs, rotating through them as we go. No
* attempt to localize IPs to particular workers.
*/
sin = localipbase;
diff --git a/tools/tools/prstats/prstats.pl b/tools/tools/prstats/prstats.pl
index bb437a6..c31241e 100644
--- a/tools/tools/prstats/prstats.pl
+++ b/tools/tools/prstats/prstats.pl
@@ -1,6 +1,6 @@
#!/usr/bin/perl -w
#-
-# Copyright (c) 2001 Dag-Erling Coïdan Smørgrav
+# Copyright (c) 2001 Dag-Erling Coïdan Smørgrav
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/tools/tools/sysbuild/README b/tools/tools/sysbuild/README
index 56340b0..3b280d1 100644
--- a/tools/tools/sysbuild/README
+++ b/tools/tools/sysbuild/README
@@ -22,7 +22,7 @@ If you know how nanobsd works, you will find a lot of similarity.
HOWTO
=====
-In all likelyhood, it is easier if we imagine you start with a blank
+In all likelihood, it is easier if we imagine you start with a blank
computer.
Grab a FreeBSD install ISO and boot it.
diff --git a/tools/tools/tinybsd/README b/tools/tools/tinybsd/README
index eec7944..7f3fc05 100644
--- a/tools/tools/tinybsd/README
+++ b/tools/tools/tinybsd/README
@@ -105,7 +105,7 @@ do that step-by-step.
3) Edit the tinybsd.basefiles file and add/remove all binaries you'll need on
your system.
-4) Copy all your /etc configuration wich you want to conf/YOURIMAGE/etc/.
+4) Copy all your /etc configuration which you want to conf/YOURIMAGE/etc/.
5) Gather the right information on your destination media. To do that, plug in
the device on the system and fetch the information using diskinfo(8):
diff --git a/tools/tools/whereintheworld/whereintheworld.pl b/tools/tools/whereintheworld/whereintheworld.pl
index 6a8e21e..6e358cf 100644
--- a/tools/tools/whereintheworld/whereintheworld.pl
+++ b/tools/tools/whereintheworld/whereintheworld.pl
@@ -4,7 +4,7 @@
# Parses "make world" output and summarize where it's been so far.
#
# Bill Fenner <fenner@freebsd.org> 11 January 2000
-# Dag-Erling Smørgrav <des@freebsd.org> 09 January 2003
+# Dag-Erling Smørgrav <des@freebsd.org> 09 January 2003
#
# $Id: whereintheworld,v 1.3 2000/01/28 00:42:32 fenner Exp $
# $FreeBSD$
diff --git a/tools/tools/wtap/Makefile b/tools/tools/wtap/Makefile
new file mode 100644
index 0000000..79531bf
--- /dev/null
+++ b/tools/tools/wtap/Makefile
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+SUBDIR= wtap vis_map
+
+.include <bsd.subdir.mk>
diff --git a/tools/tools/wtap/vis_map/Makefile b/tools/tools/wtap/vis_map/Makefile
new file mode 100644
index 0000000..87347d4
--- /dev/null
+++ b/tools/tools/wtap/vis_map/Makefile
@@ -0,0 +1,9 @@
+# $FreeBSD$
+
+PROG= vis_map
+SRC= vis_map.c
+NO_MAN= 1
+
+CFLAGS+= -I${.CURDIR}/../../../../sys/dev/wtap/
+
+.include <bsd.prog.mk>
diff --git a/tools/tools/wtap/vis_map/vis_map.c b/tools/tools/wtap/vis_map/vis_map.c
new file mode 100644
index 0000000..4a0109e
--- /dev/null
+++ b/tools/tools/wtap/vis_map/vis_map.c
@@ -0,0 +1,117 @@
+/*-
+ * Copyright (c) 2010-2011 Monthadar Al Jaberi, TerraNet AB
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
+ * redistribution must be conditioned upon including a substantially
+ * similar Disclaimer requirement for further binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $FreeBSD$
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+/*
+ * From the driver itself
+ */
+#include <plugins/visibility_ioctl.h>
+
+static int dev = -1;
+
+static void
+toggle_medium(int op)
+{
+ if (ioctl(dev, VISIOCTLOPEN, &op) < 0) {
+ printf("error opening/closing medium\n");
+ }
+}
+
+static void
+link_op(struct link *l)
+{
+ if (ioctl(dev, VISIOCTLLINK, l) < 0) {
+ printf("error making a link operation\n");
+ }
+}
+
+static void
+usage(const char *argv[])
+{
+ printf("usage: %s [o | c | [ [a|d] wtap_id1 wtap_id2]]\n",
+ argv[0]);
+}
+
+int
+main(int argc, const char* argv[])
+{
+ struct link l;
+ char cmd;
+
+ if (argc < 2) {
+ usage(argv);
+ exit(1);
+ }
+
+ dev = open("/dev/visctl", O_RDONLY);
+ if (dev < 0) {
+ printf("error opening visctl cdev\n");
+ exit(1);
+ }
+
+ cmd = (char)*argv[1];
+
+ switch (cmd) {
+ case 'o':
+ toggle_medium(1);
+ break;
+ case 'c':
+ toggle_medium(0);
+ break;
+ case 'a':
+ if (argc < 4) {
+ usage(argv);
+ exit(1);
+ }
+ l.op = 1;
+ l.id1 = atoi(argv[2]);
+ l.id2 = atoi(argv[3]);
+ link_op(&l);
+ break;
+ case 'd':
+ if (argc < 4) {
+ usage(argv);
+ exit(1);
+ }
+ l.op = 0;
+ l.id1 = atoi(argv[2]);
+ l.id2 = atoi(argv[3]);
+ link_op(&l);
+ break;
+ default:
+ printf("wtap ioctl: unkown command '%c'\n", *argv[1]);
+ exit(1);
+ }
+ exit(0);
+}
diff --git a/tools/tools/wtap/wtap/Makefile b/tools/tools/wtap/wtap/Makefile
new file mode 100644
index 0000000..10aed10
--- /dev/null
+++ b/tools/tools/wtap/wtap/Makefile
@@ -0,0 +1,9 @@
+# $FreeBSD$
+
+PROG= wtap
+SRC= wtap.c
+NO_MAN= 1
+
+CFLAGS+= -I${.CURDIR}/../../../../sys/dev/wtap/
+
+.include <bsd.prog.mk>
diff --git a/tools/tools/wtap/wtap/wtap.c b/tools/tools/wtap/wtap/wtap.c
new file mode 100644
index 0000000..9e8ce5d
--- /dev/null
+++ b/tools/tools/wtap/wtap/wtap.c
@@ -0,0 +1,82 @@
+/*-
+ * Copyright (c) 2010-2011 Monthadar Al Jaberi, TerraNet AB
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
+ * redistribution must be conditioned upon including a substantially
+ * similar Disclaimer requirement for further binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $FreeBSD$
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+#include "if_wtapioctl.h"
+
+static int dev = -1;
+
+static void create(int id)
+{
+ if(ioctl(dev, WTAPIOCTLCRT, &id) < 0){
+ printf("error creating wtap with id=%d\n", id);
+ }
+}
+
+static void delete(int id)
+{
+ if(ioctl(dev, WTAPIOCTLDEL, &id) < 0){
+ printf("error deleting wtap with id=%d\n", id);
+ }
+}
+
+int main( int argc, const char* argv[])
+{
+ if(argc != 3){
+ printf("usage: %s [c | d] wtap_id\n", argv[0]);
+ return -1;
+ }
+ int id = atoi(argv[2]);
+ if(!(id >= 0 && id < 64)){
+ printf("wtap_id must be between 0 and 7\n");
+ return -1;
+ }
+ dev = open("/dev/wtapctl", O_RDONLY);
+ if(dev < 0){
+ printf("error opening wtapctl cdev\n");
+ return -1;
+ }
+ switch((char)*argv[1]){
+ case 'c':
+ create(id);
+ break;
+ case 'd':
+ delete(id);
+ break;
+ default:
+ printf("wtap ioctl: unkown command '%c'\n", *argv[1]);
+ return -1;
+ }
+ return 0;
+}
diff --git a/usr.bin/Makefile b/usr.bin/Makefile
index 87e8cad..b957cf7 100644
--- a/usr.bin/Makefile
+++ b/usr.bin/Makefile
@@ -33,6 +33,7 @@ SUBDIR= alias \
compress \
cpuset \
csplit \
+ ctlstat \
cut \
dirname \
du \
@@ -250,10 +251,11 @@ SUBDIR+= bc
SUBDIR+= chkey
SUBDIR+= dc
SUBDIR+= newkey
+.endif
+
.if ${MK_LIBTHR} != "no"
SUBDIR+= csup
.endif
-.endif
.if ${MK_LOCATE} != "no"
SUBDIR+= locate
@@ -338,7 +340,6 @@ SUBDIR+= usbhidctl
SUBDIR+= last
SUBDIR+= users
SUBDIR+= who
-SUBDIR+= wtmpcvt
.endif
.include <bsd.arch.inc.mk>
diff --git a/usr.bin/ar/ar.1 b/usr.bin/ar/ar.1
index f606e8e..2c4deae 100644
--- a/usr.bin/ar/ar.1
+++ b/usr.bin/ar/ar.1
@@ -23,7 +23,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd May 17, 2010
+.Dd December 22, 2011
.Dt AR 1
.Os
.Sh NAME
@@ -198,11 +198,11 @@ from the archive specified by argument
The archive's symbol table, if present, is updated to reflect
the new contents of the archive.
.It Fl D
-When used in combination with the
+When used in combination with the
.Fl r
or
.Fl q
-option, insert 0's instead of the real mtime, uid and gid values
+option, insert 0's instead of the real mtime, uid and gid values
and 0644 instead of file mode from the members named by arguments
.Ar .
This ensures that checksums on the resulting archives are reproducible
@@ -414,7 +414,7 @@ character.
The
.Dq Li *
and
-.Dq Li "\;"
+.Dq Li "\&;"
characters start a comment.
Comments extend till the end of the line.
.Pp
@@ -531,7 +531,7 @@ using MRI librarian commands, use the following script:
.Bd -literal -offset indent
create ex.a * specify the output archive
addmod ex1.o ex2.o * add modules
-save * save pending changes
+save * save pending changes
end * exit the utility
.Ed
.Sh DIAGNOSTICS
diff --git a/usr.bin/bc/bc.1 b/usr.bin/bc/bc.1
index 8fe21c6..4f071e0 100644
--- a/usr.bin/bc/bc.1
+++ b/usr.bin/bc/bc.1
@@ -82,8 +82,6 @@ Prints usage information.
Allow specification of an arbitrary precision math library.
The definitions in the library are available to command line
expressions.
-Synonym for
-.Fl l .
.It Fl v , Fl Fl version
Prints version information.
.El
diff --git a/usr.bin/brandelf/brandelf.c b/usr.bin/brandelf/brandelf.c
index 9cd391e..ce462e9 100644
--- a/usr.bin/brandelf/brandelf.c
+++ b/usr.bin/brandelf/brandelf.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2000, 2001 David O'Brien
- * Copyright (c) 1996 Søren Schmidt
+ * Copyright (c) 1996 Søren Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -64,7 +64,7 @@ main(int argc, char **argv)
const char *strtype = "FreeBSD";
int type = ELFOSABI_FREEBSD;
int retval = 0;
- int ch, change = 0, verbose = 0, force = 0, listed = 0;
+ int ch, change = 0, force = 0, listed = 0;
while ((ch = getopt(argc, argv, "f:lt:v")) != -1)
switch (ch) {
@@ -84,7 +84,7 @@ main(int argc, char **argv)
listed = 1;
break;
case 'v':
- verbose = 1;
+ /* does nothing */
break;
case 't':
if (force)
diff --git a/usr.bin/bsdiff/bsdiff/bsdiff.c b/usr.bin/bsdiff/bsdiff/bsdiff.c
index 005ad4d..8b764da 100644
--- a/usr.bin/bsdiff/bsdiff/bsdiff.c
+++ b/usr.bin/bsdiff/bsdiff/bsdiff.c
@@ -272,7 +272,7 @@ int main(int argc,char *argv[])
/* Compute the differences, writing ctrl as we go */
if ((pfbz2 = BZ2_bzWriteOpen(&bz2err, pf, 9, 0, 0)) == NULL)
errx(1, "BZ2_bzWriteOpen, bz2err = %d", bz2err);
- scan=0;len=0;
+ scan=0;len=0;pos=0;
lastscan=0;lastpos=0;lastoffset=0;
while(scan<newsize) {
oldscore=0;
diff --git a/usr.bin/calendar/calendars/calendar.birthday b/usr.bin/calendar/calendars/calendar.birthday
index c517799..ad78d8f 100644
--- a/usr.bin/calendar/calendars/calendar.birthday
+++ b/usr.bin/calendar/calendars/calendar.birthday
@@ -291,7 +291,7 @@
12/12 E.G. Robinson born, 1893
12/14 George Washington dies, 1799
12/17 William Safire (Safir) born, 1929
-12/18 Konrad Zuse died in Hünfeld, 1995
+12/18 Konrad Zuse died in Hünfeld, 1995
12/20 Carl Sagan died, 1996
12/21 Benjamin Disraeli born, 1804
12/22 Giacomo Puccini born, 1858
diff --git a/usr.bin/calendar/calendars/calendar.freebsd b/usr.bin/calendar/calendars/calendar.freebsd
index b5f86b2..b0c8e49 100644
--- a/usr.bin/calendar/calendars/calendar.freebsd
+++ b/usr.bin/calendar/calendars/calendar.freebsd
@@ -48,6 +48,7 @@
02/02 Michael W Lucas <mwlucas@FreeBSD.org> born in Detroit, Michigan, United States, 1967
02/02 Dmitry Chagin <dchagin@FreeBSD.org> born in Stalingrad, USSR, 1976
02/02 Yoichi Nakayama <yoichi@FreeBSD.org> born in Tsu, Mie, Japan, 1976
+02/03 Jason Helfman <jgh@FreeBSD.org> born in Royal Oak, Michigan, United States, 1972
02/04 Eitan Adler <eadler@FreeBSD.org> born in West Hempstead, New York, United States, 1991
02/05 Frank Laszlo <laszlof@FreeBSD.org> born in Howell, Michigan, United States, 1983
02/10 David Greenman <dg@FreeBSD.org> born in Portland, Oregon, United States, 1968
@@ -326,7 +327,7 @@
11/28 Stanislav Sedov <stas@FreeBSD.org> born in Chelyabinsk, USSR, 1985
12/01 Hajimu Umemoto <ume@FreeBSD.org> born in Nara, Japan, 1961
12/01 Alexey Dokuchaev <danfe@FreeBSD.org> born in Magadan, USSR, 1980
-12/02 Ermal Luçi <eri@FreeBSD.org> born in Tirane, Albania, 1980
+12/02 Ermal Luçi <eri@FreeBSD.org> born in Tirane, Albania, 1980
12/03 Diane Bruce <db@FreeBSD.org> born in Ottawa, Ontario, Canada, 1952
12/05 Ivan Voras <ivoras@FreeBSD.org> born in Slavonski Brod, Croatia, 1981
12/06 Stefan Farfeleder <stefanf@FreeBSD.org> born in Wien, Austria, 1980
diff --git a/usr.bin/calendar/calendars/calendar.history b/usr.bin/calendar/calendars/calendar.history
index b170f43..de8fb00 100644
--- a/usr.bin/calendar/calendars/calendar.history
+++ b/usr.bin/calendar/calendars/calendar.history
@@ -302,7 +302,7 @@
09/11 Terrorists destroy World Trade Center in New York, 2001
09/12 German paratroopers rescue Mussolini from captivity in Rome, 1943
09/12 Germany annexes Sudetenland, 1938
-09/13 58° C (136.4° F) measured at el Azizia, Libya, 1922
+09/13 58 °C (136.4 °F) measured at el Azizia, Libya, 1922
09/13 British defeat the French at the Plains of Abraham, just outside the walls of Quebec City, 1759
09/13 Building of Hadrian's Wall begun, 122
09/13 Chiang Kai-Shek becomes president of China, 1943
diff --git a/usr.bin/calendar/calendars/calendar.music b/usr.bin/calendar/calendars/calendar.music
index 557e63b..967f6af 100644
--- a/usr.bin/calendar/calendars/calendar.music
+++ b/usr.bin/calendar/calendars/calendar.music
@@ -225,7 +225,7 @@
12/08 Jim Morrison is born in Melbourne, Florida, 1943
12/08 John Lennon is shot and killed in New York City, 1980
12/09 The Who's "Tommy" premieres in London, 1973
-12/11 (Louis) Hector Berlioz born in La-Côte-Saint-André, 1803
+12/11 (Louis) Hector Berlioz born in La-Côte-Saint-André, 1803
12/13 Ted Nugent, the motor city madman, born in Detroit, 1949
12/15 Thomas Edison receives patent on the phonograph, 1877
12/16 Don McLean's "American Pie" is released, 1971
diff --git a/usr.bin/cksum/cksum.c b/usr.bin/cksum/cksum.c
index dacf572..05dc8bb 100644
--- a/usr.bin/cksum/cksum.c
+++ b/usr.bin/cksum/cksum.c
@@ -68,7 +68,7 @@ main(int argc, char **argv)
int (*cfncn)(int, uint32_t *, off_t *);
void (*pfncn)(char *, uint32_t, off_t);
- if ((p = rindex(argv[0], '/')) == NULL)
+ if ((p = strrchr(argv[0], '/')) == NULL)
p = argv[0];
else
++p;
diff --git a/usr.bin/compress/compress.c b/usr.bin/compress/compress.c
index f73419d..1f458e5 100644
--- a/usr.bin/compress/compress.c
+++ b/usr.bin/compress/compress.c
@@ -75,7 +75,7 @@ main(int argc, char *argv[])
char *p, newname[MAXPATHLEN];
cat = 0;
- if ((p = rindex(argv[0], '/')) == NULL)
+ if ((p = strrchr(argv[0], '/')) == NULL)
p = argv[0];
else
++p;
@@ -141,7 +141,7 @@ main(int argc, char *argv[])
compress(*argv, "/dev/stdout", bits);
break;
}
- if ((p = rindex(*argv, '.')) != NULL &&
+ if ((p = strrchr(*argv, '.')) != NULL &&
!strcmp(p, ".Z")) {
cwarnx("%s: name already has trailing .Z",
*argv);
@@ -164,7 +164,7 @@ main(int argc, char *argv[])
break;
}
len = strlen(*argv);
- if ((p = rindex(*argv, '.')) == NULL ||
+ if ((p = strrchr(*argv, '.')) == NULL ||
strcmp(p, ".Z")) {
if (len > sizeof(newname) - 3) {
cwarnx("%s: name too long", *argv);
diff --git a/usr.bin/cpio/Makefile b/usr.bin/cpio/Makefile
index 4c2bddb..f13b626 100644
--- a/usr.bin/cpio/Makefile
+++ b/usr.bin/cpio/Makefile
@@ -2,17 +2,20 @@
.include <bsd.own.mk>
+LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive
+
PROG= bsdcpio
-BSDCPIO_VERSION_STRING=2.8.4
+BSDCPIO_VERSION_STRING=2.8.5
+.PATH: ${LIBARCHIVEDIR}/cpio
SRCS= cpio.c cmdline.c
-.PATH: ${.CURDIR}/../../lib/libarchive/libarchive_fe
+.PATH: ${LIBARCHIVEDIR}/libarchive_fe
SRCS+= err.c line_reader.c matching.c pathmatch.c
CFLAGS+= -DBSDCPIO_VERSION_STRING=\"${BSDCPIO_VERSION_STRING}\"
-CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\"
-CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../../lib/libarchive/libarchive_fe
+CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/config_freebsd.h\"
+CFLAGS+= -I${LIBARCHIVEDIR}/cpio -I${LIBARCHIVEDIR}/libarchive_fe
.ifdef RELEASE_CRUNCH
# FreeBSD's installer uses cpio in crunched binaries that are
@@ -32,9 +35,12 @@ LDADD+= -lmd
SYMLINKS=bsdcpio ${BINDIR}/cpio
MLINKS= bsdcpio.1 cpio.1
-.PHONY: check test
+.PHONY: check test clean-test
check test: $(PROG) bsdcpio.1.gz
- cd ${.CURDIR}/test && make clean test
+ cd ${.CURDIR}/test && make obj && make test
+
+clean-test:
+ cd ${.CURDIR}/test && make clean
.include <bsd.prog.mk>
diff --git a/usr.bin/cpio/test/Makefile b/usr.bin/cpio/test/Makefile
index e1b94f1..850373b 100644
--- a/usr.bin/cpio/test/Makefile
+++ b/usr.bin/cpio/test/Makefile
@@ -1,14 +1,14 @@
# $FreeBSD$
-# Where to find the cpio sources (for the internal unit tests)
-CPIO_SRCDIR=${.CURDIR}/..
+LIBARCHIVEDIR= ${.CURDIR}/../../../contrib/libarchive
-.PATH: ${CPIO_SRCDIR}
+.PATH: ${LIBARCHIVEDIR}/cpio
CPIO_SRCS= cmdline.c
-.PATH: ${.CURDIR}/../../../lib/libarchive/libarchive_fe
+.PATH: ${LIBARCHIVEDIR}/libarchive_fe
CPIO_SRCS+= err.c pathmatch.c
+.PATH: ${LIBARCHIVEDIR}/cpio/test
TESTS= \
test_0.c \
test_basic.c \
@@ -49,29 +49,30 @@ NO_MAN=yes
PROG=bsdcpio_test
DPADD=${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBLZMA}
-CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\"
-CFLAGS+= -I..
+CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/../config_freebsd.h\"
+CFLAGS+= -I${.CURDIR}/..
LDADD= -larchive -lz -lbz2 -llzma
#CFLAGS+= -static -g -O2 -Wall
CFLAGS+= -g -O2 -Wall
CFLAGS+= -I${.OBJDIR}
-CFLAGS+= -I${CPIO_SRCDIR}
-CFLAGS+= -I${.CURDIR}/../../../lib/libarchive/libarchive_fe
+CFLAGS+= -I${LIBARCHIVEDIR}/cpio -I${LIBARCHIVEDIR}/libarchive_fe
# Uncomment to link against dmalloc
#LDADD+= -L/usr/local/lib -ldmalloc
#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC
check test: bsdcpio_test
- ${.OBJDIR}/bsdcpio_test -p ${.OBJDIR}/../bsdcpio -r ${.CURDIR}
+ ${.OBJDIR}/bsdcpio_test -p ${.OBJDIR}/../bsdcpio \
+ -r ${LIBARCHIVEDIR}/cpio/test
${.OBJDIR}/list.h list.h: ${TESTS} Makefile
- (cd ${.CURDIR}; cat ${TESTS}) | grep DEFINE_TEST > list.h
+ (cd ${LIBARCHIVEDIR}/cpio/test; cat ${TESTS}) | \
+ grep DEFINE_TEST > ${.OBJDIR}/list.h
clean:
rm -f ${CLEANFILES}
rm -f *~
-chmod -R +w /tmp/bsdcpio_test.*
- rm -rf /tmp/bsdcpio_test.*
+ rm -rf /tmp/bsdcpio_test
.include <bsd.prog.mk>
diff --git a/usr.bin/cpio/test/test_gcpio_compat_ref_nosym.bin.uu b/usr.bin/cpio/test/test_gcpio_compat_ref_nosym.bin.uu
deleted file mode 100644
index 7a2a272..0000000
--- a/usr.bin/cpio/test/test_gcpio_compat_ref_nosym.bin.uu
+++ /dev/null
@@ -1,17 +0,0 @@
-$FreeBSD$
-
-begin 644 test_gcpio_compat_ref_nosym.bin
-MQW%4`-[Z_4'H`^@#`@`VNZU*NQX$``````!D:7(`QW%4`-SZI('H`^@#`@`G
-MNZU*NQX%````"@!F:6QE```Q,C,T-38W.#D*QW%4`-SZI('H`^@#`@`GNZU*
-MNQX)````"@!L:6YK9FEL90``,3(S-#4V-S@Y"L=Q``````````````$`````
-M````"P``````5%)!24Q%4B$A(0``````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-1````````````````````````
-`
-end
diff --git a/usr.bin/cpio/test/test_gcpio_compat_ref_nosym.crc.uu b/usr.bin/cpio/test/test_gcpio_compat_ref_nosym.crc.uu
deleted file mode 100644
index 0147df7..0000000
--- a/usr.bin/cpio/test/test_gcpio_compat_ref_nosym.crc.uu
+++ /dev/null
@@ -1,17 +0,0 @@
-$FreeBSD$
-
-begin 644 test_gcpio_compat_ref_nosym.crc
-M,#<P-S`R,#`U-D9!1$4P,#`P-#%&1#`P,#`P,T4X,#`P,#`S13@P,#`P,#`P
-M,C1!040Q14)",#`P,#`P,#`P,#`P,#`P,#`P,#`P,#4T,#`P,#`P0D(P,35"
-M,#`S-C`P,#`P,#`T,#`P,#`P,#!D:7(````P-S`W,#(P,#4V1D%$0S`P,#`X
-M,4$T,#`P,#`S13@P,#`P,#-%.#`P,#`P,#`R-$%!1#%%0D(P,#`P,#`P,#`P
-M,#`P,#`P,#`P,#`P-30P,#`P,#!"0C`Q-4(P,#(W,#`P,#`P,#4P,#`P,#`P
-M,&9I;&4``#`W,#<P,C`P-39&041#,#`P,#@Q030P,#`P,#-%.#`P,#`P,T4X
-M,#`P,#`P,#(T04%$,45"0C`P,#`P,#!!,#`P,#`P,#`P,#`P,#`U-#`P,#`P
-M,$)",#$U0C`P,C<P,#`P,#`P.3`P,#`P,44W;&EN:V9I;&4``#$R,S0U-C<X
-M.0H``#`W,#<P,C`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P
-M,#`P,#$P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P
-M,#`P,#`P,#`P,#`P,#`P0C`P,#`P,#`P5%)!24Q%4B$A(0``````````````
-1````````````````````````
-`
-end
diff --git a/usr.bin/cpio/test/test_gcpio_compat_ref_nosym.newc.uu b/usr.bin/cpio/test/test_gcpio_compat_ref_nosym.newc.uu
deleted file mode 100644
index e2a4900..0000000
--- a/usr.bin/cpio/test/test_gcpio_compat_ref_nosym.newc.uu
+++ /dev/null
@@ -1,17 +0,0 @@
-$FreeBSD$
-
-begin 644 test_gcpio_compat_ref_nosym.newc
-M,#<P-S`Q,#`U-D9!1$4P,#`P-#%&1#`P,#`P,T4X,#`P,#`S13@P,#`P,#`P
-M,C1!040Q14)",#`P,#`P,#`P,#`P,#`P,#`P,#`P,#4T,#`P,#`P0D(P,35"
-M,#`S-C`P,#`P,#`T,#`P,#`P,#!D:7(````P-S`W,#$P,#4V1D%$0S`P,#`X
-M,4$T,#`P,#`S13@P,#`P,#-%.#`P,#`P,#`R-$%!1#%%0D(P,#`P,#`P,#`P
-M,#`P,#`P,#`P,#`P-30P,#`P,#!"0C`Q-4(P,#(W,#`P,#`P,#4P,#`P,#`P
-M,&9I;&4``#`W,#<P,3`P-39&041#,#`P,#@Q030P,#`P,#-%.#`P,#`P,T4X
-M,#`P,#`P,#(T04%$,45"0C`P,#`P,#!!,#`P,#`P,#`P,#`P,#`U-#`P,#`P
-M,$)",#$U0C`P,C<P,#`P,#`P.3`P,#`P,#`P;&EN:V9I;&4``#$R,S0U-C<X
-M.0H``#`W,#<P,3`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P
-M,#`P,#$P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P
-M,#`P,#`P,#`P,#`P,#`P0C`P,#`P,#`P5%)!24Q%4B$A(0``````````````
-1````````````````````````
-`
-end
diff --git a/usr.bin/cpio/test/test_gcpio_compat_ref_nosym.ustar.uu b/usr.bin/cpio/test/test_gcpio_compat_ref_nosym.ustar.uu
deleted file mode 100644
index b5cbd66..0000000
--- a/usr.bin/cpio/test/test_gcpio_compat_ref_nosym.ustar.uu
+++ /dev/null
@@ -1,74 +0,0 @@
-$FreeBSD$
-
-begin 644 test_gcpio_compat_ref_nosym.ustar
-M9&ER+P``````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````#`P,#`W-S4`,#`P,3<U,``P,#`Q-S4P`#`P,#`P,#`P,#`P
-M`#$Q,C4S,C$W,C<S`#`P,3$S-3$`-0``````````````````````````````
-M````````````````````````````````````````````````````````````
-M``````````````````````````````````````````!U<W1A<@`P,'1I;0``
-M````````````````````````````````````=&EM````````````````````
-M```````````````````P,#`P,C<S`#8V,#`P-C8`````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M``````````````````````!F:6QE````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````,#`P,#8T-``P,#`Q-S4P`#`P
-M,#$W-3``,#`P,#`P,#`P,3(`,3$R-3,R,3<R-S,`,#`Q,30R,P`P````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````'5S=&%R`#`P=&EM``````````````````````````````````````!T
-M:6T``````````````````````````````````````#`P,#`R-S,`-C8P,#`T
-M-P``````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````````````````````````````#$R,S0U-C<X.0H`
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````;&EN:V9I;&4`````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````#`P,#`V-#0`,#`P,3<U,``P,#`Q-S4P`#`P,#`P
-M,#`P,#`P`#$Q,C4S,C$W,C<S`#`P,3,Q,S<`,69I;&4`````````````````
-M````````````````````````````````````````````````````````````
-M``````````````````````````````````````````````````!U<W1A<@`P
-M,'1I;0``````````````````````````````````````=&EM````````````
-M```````````````````````````P,#`P,C<S`#8V,#`P-#<`````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-,````````````````
-`
-end
diff --git a/usr.bin/cpio/test/test_option_c.c b/usr.bin/cpio/test/test_option_c.c
deleted file mode 100644
index 241bcf6..0000000
--- a/usr.bin/cpio/test/test_option_c.c
+++ /dev/null
@@ -1,221 +0,0 @@
-/*-
- * Copyright (c) 2003-2007 Tim Kientzle
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-#include "test.h"
-__FBSDID("$FreeBSD$");
-
-static int
-is_octal(const char *p, size_t l)
-{
- while (l > 0) {
- if (*p < '0' || *p > '7')
- return (0);
- --l;
- ++p;
- }
- return (1);
-}
-
-static int
-from_octal(const char *p, size_t l)
-{
- int r = 0;
-
- while (l > 0) {
- r *= 8;
- r += *p - '0';
- --l;
- ++p;
- }
- return (r);
-}
-
-DEFINE_TEST(test_option_c)
-{
- FILE *filelist;
- int r;
- int uid = -1;
- int dev, ino, gid;
- time_t t, now;
- char *p, *e;
- size_t s;
-
- assertUmask(0);
-
-#if !defined(_WIN32)
- uid = getuid();
-#endif
-
- /*
- * Create an assortment of files.
- * TODO: Extend this to cover more filetypes.
- */
- filelist = fopen("filelist", "w");
-
- /* "file" */
- assertMakeFile("file", 0644, "1234567890");
- fprintf(filelist, "file\n");
-
- /* "symlink" */
- if (canSymlink()) {
- assertMakeSymlink("symlink", "file");
- fprintf(filelist, "symlink\n");
- }
-
- /* "dir" */
- assertMakeDir("dir", 0775);
- /* Record some facts about what we just created: */
- now = time(NULL); /* They were all created w/in last two seconds. */
- fprintf(filelist, "dir\n");
-
- /* Use the cpio program to create an archive. */
- fclose(filelist);
- r = systemf("%s -oc <filelist >basic.out 2>basic.err", testprog);
- /* Verify that nothing went to stderr. */
- assertTextFileContents("1 block\n", "basic.err");
-
- /* Assert that the program finished. */
- failure("%s -oc crashed", testprog);
- if (!assertEqualInt(r, 0))
- return;
-
- /* Verify that stdout is a well-formed cpio file in "odc" format. */
- p = slurpfile(&s, "basic.out");
- assertEqualInt(s, 512);
- e = p;
-
- /*
- * Some of these assertions could be stronger, but it's
- * a little tricky because they depend on the local environment.
- */
-
- /* First entry is "file" */
- assert(is_octal(e, 76)); /* Entire header is octal digits. */
- assertEqualMem(e + 0, "070707", 6); /* Magic */
- assert(is_octal(e + 6, 6)); /* dev */
- dev = from_octal(e + 6, 6);
- assert(is_octal(e + 12, 6)); /* ino */
- ino = from_octal(e + 12, 6);
-#if defined(_WIN32) && !defined(__CYGWIN__)
- /* Group members bits and others bits do not work. */
- assertEqualMem(e + 18, "100666", 6); /* Mode */
-#else
- assertEqualMem(e + 18, "100644", 6); /* Mode */
-#endif
- if (uid < 0)
- uid = from_octal(e + 24, 6);
- assertEqualInt(from_octal(e + 24, 6), uid); /* uid */
- assert(is_octal(e + 30, 6)); /* gid */
- gid = from_octal(e + 30, 6);
- assertEqualMem(e + 36, "000001", 6); /* nlink */
- failure("file entries should not have rdev set (dev field was 0%o)",
- dev);
- assertEqualMem(e + 42, "000000", 6); /* rdev */
- t = from_octal(e + 48, 11); /* mtime */
- assert(t <= now); /* File wasn't created in future. */
- assert(t >= now - 2); /* File was created w/in last 2 secs. */
- assertEqualMem(e + 59, "000005", 6); /* Name size */
- assertEqualMem(e + 65, "00000000012", 11); /* File size */
- assertEqualMem(e + 76, "file\0", 5); /* Name contents */
- assertEqualMem(e + 81, "1234567890", 10); /* File contents */
- e += 91;
-
- /* "symlink" pointing to "file" */
- if (canSymlink()) {
- assert(is_octal(e, 76)); /* Entire header is octal digits. */
- assertEqualMem(e + 0, "070707", 6); /* Magic */
- assertEqualInt(dev, from_octal(e + 6, 6)); /* dev */
- assert(ino != from_octal(e + 12, 6)); /* ino */
-#if !defined(_WIN32) || defined(__CYGWIN__)
- /* On Windows, symbolic link and group members bits and
- * others bits do not work. */
- assertEqualMem(e + 18, "120777", 6); /* Mode */
-#endif
- assertEqualInt(from_octal(e + 24, 6), uid); /* uid */
- assertEqualInt(gid, from_octal(e + 30, 6)); /* gid */
- assertEqualMem(e + 36, "000001", 6); /* nlink */
- failure("file entries should have rdev == 0 (dev was 0%o)",
- from_octal(e + 6, 6));
- assertEqualMem(e + 42, "000000", 6); /* rdev */
- t = from_octal(e + 48, 11); /* mtime */
- assert(t <= now); /* File wasn't created in future. */
- assert(t >= now - 2); /* File was created w/in last 2 secs. */
- assertEqualMem(e + 59, "000010", 6); /* Name size */
- assertEqualMem(e + 65, "00000000004", 11); /* File size */
- assertEqualMem(e + 76, "symlink\0", 8); /* Name contents */
- assertEqualMem(e + 84, "file", 4); /* Symlink target. */
- e += 88;
- }
-
- /* "dir" */
- assert(is_octal(e, 76));
- assertEqualMem(e + 0, "070707", 6); /* Magic */
- /* Dev should be same as first entry. */
- assert(is_octal(e + 6, 6)); /* dev */
- assertEqualInt(dev, from_octal(e + 6, 6));
- /* Ino must be different from first entry. */
- assert(is_octal(e + 12, 6)); /* ino */
- assert(dev != from_octal(e + 12, 6));
-#if defined(_WIN32) && !defined(__CYGWIN__)
- /* Group members bits and others bits do not work. */
- assertEqualMem(e + 18, "040777", 6); /* Mode */
-#else
- /* Accept 042775 to accomodate systems where sgid bit propagates. */
- if (memcmp(e + 18, "042775", 6) != 0)
- assertEqualMem(e + 18, "040775", 6); /* Mode */
-#endif
- assertEqualInt(from_octal(e + 24, 6), uid); /* uid */
- /* Gid should be same as first entry. */
- assert(is_octal(e + 30, 6)); /* gid */
- assertEqualInt(gid, from_octal(e + 30, 6));
-#ifndef NLINKS_INACCURATE_FOR_DIRS
- assertEqualMem(e + 36, "000002", 6); /* Nlink */
-#endif
- t = from_octal(e + 48, 11); /* mtime */
- assert(t <= now); /* File wasn't created in future. */
- assert(t >= now - 2); /* File was created w/in last 2 secs. */
- assertEqualMem(e + 59, "000004", 6); /* Name size */
- assertEqualMem(e + 65, "00000000000", 11); /* File size */
- assertEqualMem(e + 76, "dir\0", 4); /* name */
- e += 80;
-
- /* TODO: Verify other types of entries. */
-
- /* Last entry is end-of-archive marker. */
- assert(is_octal(e, 76));
- assertEqualMem(e + 0, "070707", 6); /* Magic */
- assertEqualMem(e + 6, "000000", 6); /* dev */
- assertEqualMem(e + 12, "000000", 6); /* ino */
- assertEqualMem(e + 18, "000000", 6); /* Mode */
- assertEqualMem(e + 24, "000000", 6); /* uid */
- assertEqualMem(e + 30, "000000", 6); /* gid */
- assertEqualMem(e + 36, "000001", 6); /* Nlink */
- assertEqualMem(e + 42, "000000", 6); /* rdev */
- assertEqualMem(e + 48, "00000000000", 11); /* mtime */
- assertEqualMem(e + 59, "000013", 6); /* Name size */
- assertEqualMem(e + 65, "00000000000", 11); /* File size */
- assertEqualMem(e + 76, "TRAILER!!!\0", 11); /* Name */
-
- free(p);
-}
diff --git a/usr.bin/csup/Makefile b/usr.bin/csup/Makefile
index 7fda5b0..0cea821 100644
--- a/usr.bin/csup/Makefile
+++ b/usr.bin/csup/Makefile
@@ -33,8 +33,8 @@ CFLAGS+= -I. -I${.CURDIR}
CFLAGS+= -DHAVE_FFLAGS -DNDEBUG
WARNS?= 1
-DPADD= ${LIBCRYPTO} ${LIBZ} ${LIBPTHREAD}
-LDADD= -lcrypto -lz -lpthread
+DPADD= ${LIBMD} ${LIBZ} ${LIBPTHREAD}
+LDADD= -lmd -lz -lpthread
SCRIPTS= cpasswd.sh
MAN= csup.1 cpasswd.1
diff --git a/usr.bin/csup/auth.c b/usr.bin/csup/auth.c
index f24cd00..c90d719 100644
--- a/usr.bin/csup/auth.c
+++ b/usr.bin/csup/auth.c
@@ -35,7 +35,6 @@
#include <netinet/in.h>
#include <ctype.h>
-#include <openssl/md5.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -254,7 +253,7 @@ auth_makesecret(struct srvrecord *auth, char *secret)
MD5_Update(&md5, ":", 1);
MD5_Update(&md5, auth->password, strlen(auth->password));
MD5_Final(md5sum, &md5);
- memset(secret, 0, sizeof(secret));
+ memset(secret, 0, MD5_CHARS_MAX);
strcpy(secret, md5salt);
auth_readablesum(md5sum, secret + strlen(md5salt));
}
@@ -302,8 +301,9 @@ auth_makechallenge(struct config *config, char *challenge)
}
gettimeofday(&tv, NULL);
MD5_Init(&md5);
- snprintf(buf, sizeof(buf), "%s:%ld:%ld:%ld:%d:%d",
- inet_ntoa(laddr.sin_addr), tv.tv_sec, tv.tv_usec, random(), pid, ppid);
+ snprintf(buf, sizeof(buf), "%s:%jd:%ld:%ld:%d:%d",
+ inet_ntoa(laddr.sin_addr), (intmax_t)tv.tv_sec, tv.tv_usec,
+ random(), pid, ppid);
MD5_Update(&md5, buf, strlen(buf));
MD5_Final(md5sum, &md5);
auth_readablesum(md5sum, challenge);
diff --git a/usr.bin/csup/fixups.c b/usr.bin/csup/fixups.c
index a83ad1c..a1df115 100644
--- a/usr.bin/csup/fixups.c
+++ b/usr.bin/csup/fixups.c
@@ -38,7 +38,7 @@
/*
* A synchronized queue to implement fixups. The updater thread adds
* fixup requests to the queue with fixups_put() when a checksum
- * mismatch error occured. It then calls fixups_close() when he's
+ * mismatch error occurred. It then calls fixups_close() when he's
* done requesting fixups. The detailer thread gets the fixups with
* fixups_get() and then send the requests to the server.
*
diff --git a/usr.bin/csup/misc.c b/usr.bin/csup/misc.c
index ae16b59..f4170df 100644
--- a/usr.bin/csup/misc.c
+++ b/usr.bin/csup/misc.c
@@ -28,7 +28,6 @@
#include <sys/types.h>
#include <sys/stat.h>
-#include <openssl/md5.h>
#include <assert.h>
#include <err.h>
diff --git a/usr.bin/csup/misc.h b/usr.bin/csup/misc.h
index a7ca3a6..b01b77a 100644
--- a/usr.bin/csup/misc.h
+++ b/usr.bin/csup/misc.h
@@ -28,10 +28,18 @@
#ifndef _MISC_H_
#define _MISC_H_
-#include <openssl/md5.h>
-
#include <sys/types.h>
+#ifdef __FreeBSD__
+#include <md5.h>
+#define MD5_DIGEST_LENGTH 16
+#define MD5_Init MD5Init
+#define MD5_Final MD5Final
+#define MD5_Update MD5Update
+#else
+#include <openssl/md5.h>
+#endif
+
/* If we're not compiling in a C99 environment, define the C99 types. */
#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901
diff --git a/usr.bin/csup/mux.c b/usr.bin/csup/mux.c
index b344be1..9335fa9 100644
--- a/usr.bin/csup/mux.c
+++ b/usr.bin/csup/mux.c
@@ -680,7 +680,7 @@ mux_init(struct mux *m)
/*
* Close all the channels, terminate the sender and receiver thread.
- * This is an important function because it is used everytime we need
+ * This is an important function because it is used every time we need
* to wake up all the worker threads to abort the program.
*
* This function accepts an error message that will be printed if the
diff --git a/usr.bin/csup/proto.c b/usr.bin/csup/proto.c
index 166a134..145deb3 100644
--- a/usr.bin/csup/proto.c
+++ b/usr.bin/csup/proto.c
@@ -35,6 +35,7 @@
#include <assert.h>
#include <err.h>
#include <errno.h>
+#include <inttypes.h>
#include <netdb.h>
#include <pthread.h>
#include <signal.h>
@@ -751,7 +752,7 @@ proto_printf(struct stream *wr, const char *format, ...)
break;
case 'O':
off = va_arg(ap, off_t);
- rv = stream_printf(wr, "%llu", off);
+ rv = stream_printf(wr, "%" PRId64, off);
break;
case 'S':
s = va_arg(ap, char *);
diff --git a/usr.bin/csup/rcsfile.c b/usr.bin/csup/rcsfile.c
index 33caa03..dcc2002 100644
--- a/usr.bin/csup/rcsfile.c
+++ b/usr.bin/csup/rcsfile.c
@@ -1254,8 +1254,8 @@ rcsfile_insertsorteddelta(struct rcsfile *rf, struct delta *d)
/*
* Insert a delta into the correct place in branch. A trunk branch will have
* different ordering scheme and be sorted by revision number, but a normal
- * branch will be sorted by date to maintain compability with branches that is
- * "hand-hacked".
+ * branch will be sorted by date to maintain compatibility with branches that
+ * is "hand-hacked".
*/
static void
rcsfile_insertdelta(struct branch *b, struct delta *d, int trunk)
diff --git a/usr.bin/ctlstat/Makefile b/usr.bin/ctlstat/Makefile
new file mode 100644
index 0000000..0c09184
--- /dev/null
+++ b/usr.bin/ctlstat/Makefile
@@ -0,0 +1,8 @@
+# $FreeBSD$
+
+PROG= ctlstat
+MAN= ctlstat.8
+SDIR= ${.CURDIR}/../../sys
+CFLAGS+= -I${SDIR}
+
+.include <bsd.prog.mk>
diff --git a/usr.bin/ctlstat/ctlstat.8 b/usr.bin/ctlstat/ctlstat.8
new file mode 100644
index 0000000..a213cc9
--- /dev/null
+++ b/usr.bin/ctlstat/ctlstat.8
@@ -0,0 +1,122 @@
+.\"
+.\" Copyright (c) 2010 Silicon Graphics International Corp.
+.\" 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,
+.\" without modification.
+.\" 2. Redistributions in binary form must reproduce at minimum a disclaimer
+.\" substantially similar to the "NO WARRANTY" disclaimer below
+.\" ("Disclaimer") and any redistribution must be conditioned upon
+.\" including a substantially similar Disclaimer requirement for further
+.\" binary redistribution.
+.\"
+.\" NO WARRANTY
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+.\" HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+.\"
+.\" ctlstat utility man page.
+.\"
+.\" Author: Ken Merry <ken@FreeBSD.org>
+.\"
+.\" $Id: //depot/users/kenm/FreeBSD-test2/usr.bin/ctlstat/ctlstat.8#2 $
+.\" $FreeBSD$
+.\"
+.Dd June 4, 2010
+.Dt CTLSTAT 8
+.Os
+.Sh NAME
+.Nm ctlstat
+.Nd CAM Target Layer statistics utility
+.Sh SYNOPSIS
+.Nm
+.Op Fl t
+.Op Fl c Ar count
+.Op Fl C
+.Op Fl d
+.Op Fl D
+.Op Fl j
+.Op Fl l Ar lun
+.Op Fl n Ar numdevs
+.Op Fl w Ar wait
+.Sh DESCRIPTION
+The
+.Nm
+utility provides statistics information for the CAM Target Layer.
+The first display (except for dump and JSON modes) shows average statistics
+since system startup.
+Subsequent displays show average statistics during the measurement
+interval.
+.Pp
+The options are as follows:
+.Bl -tag -width 10n
+.It Fl t
+Total mode.
+This displays separate columns with the total CTL read and write output,
+and a combined total column that also includes non I/O operations.
+.It Fl c Ar count
+Display statistics this many times.
+.It Fl C
+Disable display of CPU statistics.
+.It Fl d
+Display DMA operation time (latency) instead of overall I/O time (latency).
+.It Fl D
+Text dump mode.
+Dump all available statistics every 30 seconds in a text format suitable
+for parsing.
+No statistics are computed in this mode, only raw numbers are displayed.
+.It Fl h
+Suppress display of the header.
+.It Fl j
+JSON dump mode.
+Dump all available statistics every 30 seconds in JavaScript Object
+Notation (JSON) format.
+No statistics are computed in this mode, only raw numbers are displayed.
+.It Fl l Ar lun
+Request statistics for the specified LUN.
+This option is incompatible with total (
+.Fl t )
+mode.
+.It Fl n Ar numdevs
+Display statistics for this many devices.
+.It Fl w Ar wait
+Wait this many seconds in between displays.
+If this option is not specified,
+.Nm
+defaults to a 1 second interval.
+.El
+.Sh EXAMPLES
+.Dl ctlstat -t
+.Pp
+Display total statistics for the system with a one second interval.
+.Pp
+.Dl ctlstat -d -l 5 -C
+.Pp
+Display average DMA time for LUN 5 and omit CPU utilization.
+.Pp
+.Dl ctlstat -n 7 -w 10
+.Pp
+Display statistics for the first 7 LUNs, and display average statistics
+every 10 seconds.
+.Sh SEE ALSO
+.Xr cam 3 ,
+.Xr cam 4 ,
+.Xr xpt 4 ,
+.Xr camcontrol 8 ,
+.Xr ctladm 8 ,
+.Xr iostat 8
+.Sh AUTHORS
+.An Ken Merry Aq ken@FreeBSD.org
+.An Will Andrews Aq will@FreeBSD.org
diff --git a/usr.bin/ctlstat/ctlstat.c b/usr.bin/ctlstat/ctlstat.c
new file mode 100644
index 0000000..4d73401
--- /dev/null
+++ b/usr.bin/ctlstat/ctlstat.c
@@ -0,0 +1,730 @@
+/*-
+ * Copyright (c) 2004, 2008, 2009 Silicon Graphics International Corp.
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $Id: //depot/users/kenm/FreeBSD-test2/usr.bin/ctlstat/ctlstat.c#4 $
+ */
+/*
+ * CAM Target Layer statistics program
+ *
+ * Authors: Ken Merry <ken@FreeBSD.org>, Will Andrews <will@FreeBSD.org>
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/ioctl.h>
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/time.h>
+#include <sys/sysctl.h>
+#include <sys/resource.h>
+#include <sys/queue.h>
+#include <sys/callout.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <getopt.h>
+#include <string.h>
+#include <errno.h>
+#include <err.h>
+#include <ctype.h>
+#include <bitstring.h>
+#include <cam/scsi/scsi_all.h>
+#include <cam/ctl/ctl.h>
+#include <cam/ctl/ctl_io.h>
+#include <cam/ctl/ctl_scsi_all.h>
+#include <cam/ctl/ctl_util.h>
+#include <cam/ctl/ctl_frontend_internal.h>
+#include <cam/ctl/ctl_backend.h>
+#include <cam/ctl/ctl_ioctl.h>
+
+/*
+ * The default amount of space we allocate for LUN storage space. We
+ * dynamically allocate more if needed.
+ */
+#define CTL_STAT_NUM_LUNS 30
+
+/*
+ * The default number of LUN selection bits we allocate. This is large
+ * because we don't currently increase it if the user specifies a LUN
+ * number of 1024 or larger.
+ */
+#define CTL_STAT_LUN_BITS 1024L
+
+static const char *ctlstat_opts = "Cc:Ddhjl:n:tw:";
+static const char *ctlstat_usage = "Usage: ctlstat [-CDdjht] [-l lunnum]"
+ "[-c count] [-n numdevs] [-w wait]\n";
+
+struct ctl_cpu_stats {
+ uint64_t user;
+ uint64_t nice;
+ uint64_t system;
+ uint64_t intr;
+ uint64_t idle;
+};
+
+typedef enum {
+ CTLSTAT_MODE_STANDARD,
+ CTLSTAT_MODE_DUMP,
+ CTLSTAT_MODE_JSON,
+} ctlstat_mode_types;
+
+#define CTLSTAT_FLAG_CPU (1 << 0)
+#define CTLSTAT_FLAG_HEADER (1 << 1)
+#define CTLSTAT_FLAG_FIRST_RUN (1 << 2)
+#define CTLSTAT_FLAG_TOTALS (1 << 3)
+#define CTLSTAT_FLAG_DMA_TIME (1 << 4)
+#define CTLSTAT_FLAG_LUN_TIME_VALID (1 << 5)
+#define F_CPU(ctx) ((ctx)->flags & CTLSTAT_FLAG_CPU)
+#define F_HDR(ctx) ((ctx)->flags & CTLSTAT_FLAG_HEADER)
+#define F_FIRST(ctx) ((ctx)->flags & CTLSTAT_FLAG_FIRST_RUN)
+#define F_TOTALS(ctx) ((ctx)->flags & CTLSTAT_FLAG_TOTALS)
+#define F_DMA(ctx) ((ctx)->flags & CTLSTAT_FLAG_DMA_TIME)
+#define F_LUNVAL(ctx) ((ctx)->flags & CTLSTAT_FLAG_LUN_TIME_VALID)
+
+struct ctlstat_context {
+ ctlstat_mode_types mode;
+ int flags;
+ struct ctl_lun_io_stats *cur_lun_stats, *prev_lun_stats,
+ *tmp_lun_stats;
+ struct ctl_lun_io_stats cur_total_stats[3], prev_total_stats[3];
+ struct timespec cur_time, prev_time;
+ struct ctl_cpu_stats cur_cpu, prev_cpu;
+ uint64_t cur_total_jiffies, prev_total_jiffies;
+ uint64_t cur_idle, prev_idle;
+ bitstr_t bit_decl(lun_mask, CTL_STAT_LUN_BITS);
+ int num_luns;
+ int numdevs;
+ int header_interval;
+};
+
+#ifndef min
+#define min(x,y) (((x) < (y)) ? (x) : (y))
+#endif
+
+static void usage(int error);
+static int getstats(int fd, int *num_luns, struct ctl_lun_io_stats **xlun_stats,
+ struct timespec *cur_time, int *lun_time_valid);
+static int getcpu(struct ctl_cpu_stats *cpu_stats);
+static void compute_stats(struct ctl_lun_io_stats *cur_stats,
+ struct ctl_lun_io_stats *prev_stats,
+ long double etime, long double *mbsec,
+ long double *kb_per_transfer,
+ long double *transfers_per_second,
+ long double *ms_per_transfer,
+ long double *ms_per_dma,
+ long double *dmas_per_second);
+
+static void
+usage(int error)
+{
+ fputs(ctlstat_usage, error ? stderr : stdout);
+}
+
+static int
+getstats(int fd, int *num_luns, struct ctl_lun_io_stats **xlun_stats,
+ struct timespec *cur_time, int *flags)
+{
+ struct ctl_lun_io_stats *lun_stats;
+ struct ctl_stats stats;
+ int more_space_count;
+
+ more_space_count = 0;
+
+ if (*num_luns == 0)
+ *num_luns = CTL_STAT_NUM_LUNS;
+
+ lun_stats = *xlun_stats;
+retry:
+
+ if (lun_stats == NULL) {
+ lun_stats = (struct ctl_lun_io_stats *)malloc(
+ sizeof(*lun_stats) * *num_luns);
+ }
+
+ memset(&stats, 0, sizeof(stats));
+ stats.alloc_len = *num_luns * sizeof(*lun_stats);
+ memset(lun_stats, 0, stats.alloc_len);
+ stats.lun_stats = lun_stats;
+
+ if (ioctl(fd, CTL_GETSTATS, &stats) == -1)
+ err(1, "error returned from CTL_GETSTATS ioctl");
+
+ switch (stats.status) {
+ case CTL_SS_OK:
+ break;
+ case CTL_SS_ERROR:
+ err(1, "CTL_SS_ERROR returned from CTL_GETSTATS ioctl");
+ break;
+ case CTL_SS_NEED_MORE_SPACE:
+ if (more_space_count > 0) {
+ errx(1, "CTL_GETSTATS returned NEED_MORE_SPACE again");
+ }
+ *num_luns = stats.num_luns;
+ free(lun_stats);
+ lun_stats = NULL;
+ more_space_count++;
+ goto retry;
+ break; /* NOTREACHED */
+ default:
+ errx(1, "unknown status %d returned from CTL_GETSTATS ioctl",
+ stats.status);
+ break;
+ }
+
+ *xlun_stats = lun_stats;
+ *num_luns = stats.num_luns;
+ cur_time->tv_sec = stats.timestamp.tv_sec;
+ cur_time->tv_nsec = stats.timestamp.tv_nsec;
+ if (stats.flags & CTL_STATS_FLAG_TIME_VALID)
+ *flags |= CTLSTAT_FLAG_LUN_TIME_VALID;
+ else
+ *flags &= ~CTLSTAT_FLAG_LUN_TIME_VALID;
+
+ return (0);
+}
+
+static int
+getcpu(struct ctl_cpu_stats *cpu_stats)
+{
+ long cp_time[CPUSTATES];
+ size_t cplen;
+
+ cplen = sizeof(cp_time);
+
+ if (sysctlbyname("kern.cp_time", &cp_time, &cplen, NULL, 0) == -1) {
+ warn("sysctlbyname(kern.cp_time...) failed");
+ return (1);
+ }
+
+ cpu_stats->user = cp_time[CP_USER];
+ cpu_stats->nice = cp_time[CP_NICE];
+ cpu_stats->system = cp_time[CP_SYS];
+ cpu_stats->intr = cp_time[CP_INTR];
+ cpu_stats->idle = cp_time[CP_IDLE];
+
+ return (0);
+}
+
+static void
+compute_stats(struct ctl_lun_io_stats *cur_stats,
+ struct ctl_lun_io_stats *prev_stats, long double etime,
+ long double *mbsec, long double *kb_per_transfer,
+ long double *transfers_per_second, long double *ms_per_transfer,
+ long double *ms_per_dma, long double *dmas_per_second)
+{
+ uint64_t total_bytes = 0, total_operations = 0, total_dmas = 0;
+ uint32_t port;
+ struct bintime total_time_bt, total_dma_bt;
+ struct timespec total_time_ts, total_dma_ts;
+ int i;
+
+ bzero(&total_time_bt, sizeof(total_time_bt));
+ bzero(&total_dma_bt, sizeof(total_dma_bt));
+ bzero(&total_time_ts, sizeof(total_time_ts));
+ bzero(&total_dma_ts, sizeof(total_dma_ts));
+ for (port = 0; port < CTL_MAX_PORTS; port++) {
+ for (i = 0; i < CTL_STATS_NUM_TYPES; i++) {
+ total_bytes += cur_stats->ports[port].bytes[i];
+ total_operations +=
+ cur_stats->ports[port].operations[i];
+ total_dmas += cur_stats->ports[port].num_dmas[i];
+ bintime_add(&total_time_bt,
+ &cur_stats->ports[port].time[i]);
+ bintime_add(&total_dma_bt,
+ &cur_stats->ports[port].dma_time[i]);
+ if (prev_stats != NULL) {
+ total_bytes -=
+ prev_stats->ports[port].bytes[i];
+ total_operations -=
+ prev_stats->ports[port].operations[i];
+ total_dmas -=
+ prev_stats->ports[port].num_dmas[i];
+ bintime_sub(&total_time_bt,
+ &prev_stats->ports[port].time[i]);
+ bintime_sub(&total_dma_bt,
+ &prev_stats->ports[port].dma_time[i]);
+ }
+ }
+ }
+
+ *mbsec = total_bytes;
+ *mbsec /= 1024 * 1024;
+ if (etime > 0.0)
+ *mbsec /= etime;
+ else
+ *mbsec = 0;
+ *kb_per_transfer = total_bytes;
+ *kb_per_transfer /= 1024;
+ if (total_operations > 0)
+ *kb_per_transfer /= total_operations;
+ else
+ *kb_per_transfer = 0;
+ *transfers_per_second = total_operations;
+ *dmas_per_second = total_dmas;
+ if (etime > 0.0) {
+ *transfers_per_second /= etime;
+ *dmas_per_second /= etime;
+ } else {
+ *transfers_per_second = 0;
+ *dmas_per_second = 0;
+ }
+
+ bintime2timespec(&total_time_bt, &total_time_ts);
+ bintime2timespec(&total_dma_bt, &total_dma_ts);
+ if (total_operations > 0) {
+ /*
+ * Convert the timespec to milliseconds.
+ */
+ *ms_per_transfer = total_time_ts.tv_sec * 1000;
+ *ms_per_transfer += total_time_ts.tv_nsec / 1000000;
+ *ms_per_transfer /= total_operations;
+ } else
+ *ms_per_transfer = 0;
+
+ if (total_dmas > 0) {
+ /*
+ * Convert the timespec to milliseconds.
+ */
+ *ms_per_dma = total_dma_ts.tv_sec * 1000;
+ *ms_per_dma += total_dma_ts.tv_nsec / 1000000;
+ *ms_per_dma /= total_dmas;
+ } else
+ *ms_per_dma = 0;
+}
+
+/* The dump_stats() and json_stats() functions perform essentially the same
+ * purpose, but dump the statistics in different formats. JSON is more
+ * conducive to programming, however.
+ */
+
+#define PRINT_BINTIME(prefix, bt) \
+ printf("%s %jd s %ju frac\n", prefix, (intmax_t)(bt).sec, \
+ (uintmax_t)(bt).frac)
+const char *iotypes[] = {"NO IO", "READ", "WRITE"};
+
+static void
+ctlstat_dump(struct ctlstat_context *ctx) {
+ int iotype, lun, port;
+ struct ctl_lun_io_stats *stats = ctx->cur_lun_stats;
+
+ for (lun = 0; lun < ctx->num_luns;lun++) {
+ printf("lun %d\n", lun);
+ for (port = 0; port < CTL_MAX_PORTS; port++) {
+ printf(" port %d\n",
+ stats[lun].ports[port].targ_port);
+ for (iotype = 0; iotype < CTL_STATS_NUM_TYPES;
+ iotype++) {
+ printf(" io type %d (%s)\n", iotype,
+ iotypes[iotype]);
+ printf(" bytes %ju\n", (uintmax_t)
+ stats[lun].ports[port].bytes[iotype]);
+ printf(" operations %ju\n", (uintmax_t)
+ stats[lun].ports[port].operations[iotype]);
+ PRINT_BINTIME(" io time",
+ stats[lun].ports[port].time[iotype]);
+ printf(" num dmas %ju\n", (uintmax_t)
+ stats[lun].ports[port].num_dmas[iotype]);
+ PRINT_BINTIME(" dma time",
+ stats[lun].ports[port].dma_time[iotype]);
+ }
+ }
+ }
+}
+
+#define JSON_BINTIME(prefix, bt) \
+ printf("\"%s\":{\"sec\":%jd,\"frac\":%ju},", \
+ prefix, (intmax_t)(bt).sec, (uintmax_t)(bt).frac)
+
+static void
+ctlstat_json(struct ctlstat_context *ctx) {
+ int iotype, lun, port;
+ struct ctl_lun_io_stats *stats = ctx->cur_lun_stats;
+
+ printf("{\"luns\":[");
+ for (lun = 0; lun < ctx->num_luns; lun++) {
+ printf("{\"ports\":[");
+ for (port = 0; port < CTL_MAX_PORTS;port++) {
+ printf("{\"num\":%d,\"io\":[",
+ stats[lun].ports[port].targ_port);
+ for (iotype = 0; iotype < CTL_STATS_NUM_TYPES;
+ iotype++) {
+ printf("{\"type\":\"%s\",", iotypes[iotype]);
+ printf("\"bytes\":%ju,", (uintmax_t)stats[
+ lun].ports[port].bytes[iotype]);
+ printf("\"operations\":%ju,", (uintmax_t)stats[
+ lun].ports[port].operations[iotype]);
+ JSON_BINTIME("io time",
+ stats[lun].ports[port].time[iotype]);
+ JSON_BINTIME("dma time",
+ stats[lun].ports[port].dma_time[iotype]);
+ printf("\"num dmas\":%ju}", (uintmax_t)
+ stats[lun].ports[port].num_dmas[iotype]);
+ if (iotype < (CTL_STATS_NUM_TYPES - 1))
+ printf(","); /* continue io array */
+ }
+ printf("]}"); /* close port */
+ if (port < (CTL_MAX_PORTS - 1))
+ printf(","); /* continue port array */
+ }
+ printf("]}"); /* close lun */
+ if (lun < (ctx->num_luns - 1))
+ printf(","); /* continue lun array */
+ }
+ printf("]}"); /* close luns and toplevel */
+}
+
+static void
+ctlstat_standard(struct ctlstat_context *ctx) {
+ long double cur_secs, prev_secs, etime;
+ uint64_t delta_jiffies, delta_idle;
+ uint32_t port;
+ long double cpu_percentage;
+ int i;
+ int j;
+
+ cpu_percentage = 0;
+
+ if (F_CPU(ctx) && (getcpu(&ctx->cur_cpu) != 0))
+ errx(1, "error returned from getcpu()");
+
+ cur_secs = ctx->cur_time.tv_sec + (ctx->cur_time.tv_nsec / 1000000000);
+ prev_secs = ctx->prev_time.tv_sec +
+ (ctx->prev_time.tv_nsec / 1000000000);
+
+ etime = cur_secs - prev_secs;
+
+ if (F_CPU(ctx)) {
+ ctx->prev_total_jiffies = ctx->cur_total_jiffies;
+ ctx->cur_total_jiffies = ctx->cur_cpu.user +
+ ctx->cur_cpu.nice + ctx->cur_cpu.system +
+ ctx->cur_cpu.intr + ctx->cur_cpu.idle;
+ delta_jiffies = ctx->cur_total_jiffies;
+ if (F_FIRST(ctx) == 0)
+ delta_jiffies -= ctx->prev_total_jiffies;
+ ctx->prev_idle = ctx->cur_idle;
+ ctx->cur_idle = ctx->cur_cpu.idle;
+ delta_idle = ctx->cur_idle - ctx->prev_idle;
+
+ cpu_percentage = delta_jiffies - delta_idle;
+ cpu_percentage /= delta_jiffies;
+ cpu_percentage *= 100;
+ }
+
+ if (F_HDR(ctx)) {
+ ctx->header_interval--;
+ if (ctx->header_interval <= 0) {
+ int hdr_devs;
+
+ hdr_devs = 0;
+
+ if (F_TOTALS(ctx)) {
+ fprintf(stdout, "%s System Read %s"
+ "System Write %sSystem Total%s\n",
+ (F_LUNVAL(ctx) != 0) ? " " : "",
+ (F_LUNVAL(ctx) != 0) ? " " : "",
+ (F_LUNVAL(ctx) != 0) ? " " : "",
+ (F_CPU(ctx) == 0) ? " CPU" : "");
+ hdr_devs = 3;
+ } else {
+ if (F_CPU(ctx))
+ fprintf(stdout, " CPU ");
+ for (i = 0; i < min(CTL_STAT_LUN_BITS,
+ ctx->num_luns); i++) {
+ int lun;
+
+ /*
+ * Obviously this won't work with
+ * LUN numbers greater than a signed
+ * integer.
+ */
+ lun = (int)ctx->cur_lun_stats[i
+ ].lun_number;
+
+ if (bit_test(ctx->lun_mask, lun) == 0)
+ continue;
+ fprintf(stdout, "%15.6s%d ",
+ "lun", lun);
+ hdr_devs++;
+ }
+ fprintf(stdout, "\n");
+ }
+ for (i = 0; i < hdr_devs; i++)
+ fprintf(stdout, "%s %sKB/t %s MB/s ",
+ ((F_CPU(ctx) != 0) && (i == 0) &&
+ (F_TOTALS(ctx) == 0)) ? " " : "",
+ (F_LUNVAL(ctx) != 0) ? " ms " : "",
+ (F_DMA(ctx) == 0) ? "tps" : "dps");
+ fprintf(stdout, "\n");
+ ctx->header_interval = 20;
+ }
+ }
+
+ if (F_TOTALS(ctx) != 0) {
+ long double mbsec[3];
+ long double kb_per_transfer[3];
+ long double transfers_per_sec[3];
+ long double ms_per_transfer[3];
+ long double ms_per_dma[3];
+ long double dmas_per_sec[3];
+
+ for (i = 0; i < 3; i++)
+ ctx->prev_total_stats[i] = ctx->cur_total_stats[i];
+
+ memset(&ctx->cur_total_stats, 0, sizeof(ctx->cur_total_stats));
+
+ /* Use macros to make the next loop more readable. */
+#define ADD_STATS_BYTES(st, p, i, j) \
+ ctx->cur_total_stats[st].ports[p].bytes[j] += \
+ ctx->cur_lun_stats[i].ports[p].bytes[j]
+#define ADD_STATS_OPERATIONS(st, p, i, j) \
+ ctx->cur_total_stats[st].ports[p].operations[j] += \
+ ctx->cur_lun_stats[i].ports[p].operations[j]
+#define ADD_STATS_NUM_DMAS(st, p, i, j) \
+ ctx->cur_total_stats[st].ports[p].num_dmas[j] += \
+ ctx->cur_lun_stats[i].ports[p].num_dmas[j]
+#define ADD_STATS_TIME(st, p, i, j) \
+ bintime_add(&ctx->cur_total_stats[st].ports[p].time[j], \
+ &ctx->cur_lun_stats[i].ports[p].time[j])
+#define ADD_STATS_DMA_TIME(st, p, i, j) \
+ bintime_add(&ctx->cur_total_stats[st].ports[p].dma_time[j], \
+ &ctx->cur_lun_stats[i].ports[p].dma_time[j])
+
+ for (i = 0; i < ctx->num_luns; i++) {
+ for (port = 0; port < CTL_MAX_PORTS; port++) {
+ for (j = 0; j < CTL_STATS_NUM_TYPES; j++) {
+ ADD_STATS_BYTES(2, port, i, j);
+ ADD_STATS_OPERATIONS(2, port, i, j);
+ ADD_STATS_NUM_DMAS(2, port, i, j);
+ ADD_STATS_TIME(2, port, i, j);
+ ADD_STATS_DMA_TIME(2, port, i, j);
+ }
+ ADD_STATS_BYTES(0, port, i, CTL_STATS_READ);
+ ADD_STATS_OPERATIONS(0, port, i,
+ CTL_STATS_READ);
+ ADD_STATS_NUM_DMAS(0, port, i, CTL_STATS_READ);
+ ADD_STATS_TIME(0, port, i, CTL_STATS_READ);
+ ADD_STATS_DMA_TIME(0, port, i, CTL_STATS_READ);
+
+ ADD_STATS_BYTES(1, port, i, CTL_STATS_WRITE);
+ ADD_STATS_OPERATIONS(1, port, i,
+ CTL_STATS_WRITE);
+ ADD_STATS_NUM_DMAS(1, port, i, CTL_STATS_WRITE);
+ ADD_STATS_TIME(1, port, i, CTL_STATS_WRITE);
+ ADD_STATS_DMA_TIME(1, port, i, CTL_STATS_WRITE);
+ }
+ }
+
+ for (i = 0; i < 3; i++) {
+ compute_stats(&ctx->cur_total_stats[i],
+ F_FIRST(ctx) ? NULL : &ctx->prev_total_stats[i],
+ etime, &mbsec[i], &kb_per_transfer[i],
+ &transfers_per_sec[i],
+ &ms_per_transfer[i], &ms_per_dma[i],
+ &dmas_per_sec[i]);
+ if (F_DMA(ctx) != 0)
+ fprintf(stdout, " %2.2Lf",
+ ms_per_dma[i]);
+ else if (F_LUNVAL(ctx) != 0)
+ fprintf(stdout, " %2.2Lf",
+ ms_per_transfer[i]);
+ fprintf(stdout, " %5.2Lf %3.0Lf %5.2Lf ",
+ kb_per_transfer[i],
+ (F_DMA(ctx) == 0) ? transfers_per_sec[i] :
+ dmas_per_sec[i], mbsec[i]);
+ }
+ if (F_CPU(ctx))
+ fprintf(stdout, " %5.1Lf%%", cpu_percentage);
+ } else {
+ if (F_CPU(ctx))
+ fprintf(stdout, "%5.1Lf%% ", cpu_percentage);
+
+ for (i = 0; i < min(CTL_STAT_LUN_BITS, ctx->num_luns); i++) {
+ long double mbsec, kb_per_transfer;
+ long double transfers_per_sec;
+ long double ms_per_transfer;
+ long double ms_per_dma;
+ long double dmas_per_sec;
+
+ if (bit_test(ctx->lun_mask,
+ (int)ctx->cur_lun_stats[i].lun_number) == 0)
+ continue;
+ compute_stats(&ctx->cur_lun_stats[i], F_FIRST(ctx) ?
+ NULL : &ctx->prev_lun_stats[i], etime,
+ &mbsec, &kb_per_transfer,
+ &transfers_per_sec, &ms_per_transfer,
+ &ms_per_dma, &dmas_per_sec);
+ if (F_DMA(ctx))
+ fprintf(stdout, " %2.2Lf",
+ ms_per_dma);
+ else if (F_LUNVAL(ctx) != 0)
+ fprintf(stdout, " %2.2Lf",
+ ms_per_transfer);
+ fprintf(stdout, " %5.2Lf %3.0Lf %5.2Lf ",
+ kb_per_transfer, (F_DMA(ctx) == 0) ?
+ transfers_per_sec : dmas_per_sec, mbsec);
+ }
+ }
+}
+
+int
+main(int argc, char **argv)
+{
+ int c;
+ int count, waittime;
+ int set_lun;
+ int fd, retval;
+ struct ctlstat_context ctx;
+
+ /* default values */
+ retval = 0;
+ waittime = 1;
+ count = -1;
+ memset(&ctx, 0, sizeof(ctx));
+ ctx.numdevs = 3;
+ ctx.mode = CTLSTAT_MODE_STANDARD;
+ ctx.flags |= CTLSTAT_FLAG_CPU;
+ ctx.flags |= CTLSTAT_FLAG_FIRST_RUN;
+ ctx.flags |= CTLSTAT_FLAG_HEADER;
+
+ while ((c = getopt(argc, argv, ctlstat_opts)) != -1) {
+ switch (c) {
+ case 'C':
+ ctx.flags &= ~CTLSTAT_FLAG_CPU;
+ break;
+ case 'c':
+ count = atoi(optarg);
+ break;
+ case 'd':
+ ctx.flags |= CTLSTAT_FLAG_DMA_TIME;
+ break;
+ case 'D':
+ ctx.mode = CTLSTAT_MODE_DUMP;
+ waittime = 30;
+ break;
+ case 'h':
+ ctx.flags &= ~CTLSTAT_FLAG_HEADER;
+ break;
+ case 'j':
+ ctx.mode = CTLSTAT_MODE_JSON;
+ waittime = 30;
+ break;
+ case 'l': {
+ int cur_lun;
+
+ cur_lun = atoi(optarg);
+ if (cur_lun > CTL_STAT_LUN_BITS)
+ errx(1, "Invalid LUN number %d", cur_lun);
+
+ bit_ffs(ctx.lun_mask, CTL_STAT_LUN_BITS, &set_lun);
+ if (set_lun == -1)
+ ctx.numdevs = 1;
+ else
+ ctx.numdevs++;
+ bit_set(ctx.lun_mask, cur_lun);
+ break;
+ }
+ case 'n':
+ ctx.numdevs = atoi(optarg);
+ break;
+ case 't':
+ ctx.flags |= CTLSTAT_FLAG_TOTALS;
+ ctx.numdevs = 3;
+ break;
+ case 'w':
+ waittime = atoi(optarg);
+ break;
+ default:
+ retval = 1;
+ usage(retval);
+ exit(retval);
+ break;
+ }
+ }
+
+ bit_ffs(ctx.lun_mask, CTL_STAT_LUN_BITS, &set_lun);
+
+ if ((F_TOTALS(&ctx))
+ && (set_lun != -1)) {
+ errx(1, "Total Mode (-t) is incompatible with individual "
+ "LUN mode (-l)");
+ } else if (set_lun == -1) {
+ /*
+ * Note that this just selects the first N LUNs to display,
+ * but at this point we have no knoweledge of which LUN
+ * numbers actually exist. So we may select LUNs that
+ * aren't there.
+ */
+ bit_nset(ctx.lun_mask, 0, min(ctx.numdevs - 1,
+ CTL_STAT_LUN_BITS - 1));
+ }
+
+ if ((fd = open(CTL_DEFAULT_DEV, O_RDWR)) == -1)
+ err(1, "cannot open %s", CTL_DEFAULT_DEV);
+
+ for (;count != 0;) {
+ ctx.tmp_lun_stats = ctx.prev_lun_stats;
+ ctx.prev_lun_stats = ctx.cur_lun_stats;
+ ctx.cur_lun_stats = ctx.tmp_lun_stats;
+ ctx.prev_time = ctx.cur_time;
+ ctx.prev_cpu = ctx.cur_cpu;
+ if (getstats(fd, &ctx.num_luns, &ctx.cur_lun_stats,
+ &ctx.cur_time, &ctx.flags) != 0)
+ errx(1, "error returned from getstats()");
+
+ switch(ctx.mode) {
+ case CTLSTAT_MODE_STANDARD:
+ ctlstat_standard(&ctx);
+ break;
+ case CTLSTAT_MODE_DUMP:
+ ctlstat_dump(&ctx);
+ break;
+ case CTLSTAT_MODE_JSON:
+ ctlstat_json(&ctx);
+ break;
+ default:
+ break;
+ }
+
+ fprintf(stdout, "\n");
+ ctx.flags &= ~CTLSTAT_FLAG_FIRST_RUN;
+ if (count != 1)
+ sleep(waittime);
+ if (count > 0)
+ count--;
+ }
+
+ exit (retval);
+}
+
+/*
+ * vim: ts=8
+ */
diff --git a/usr.bin/du/du.1 b/usr.bin/du/du.1
index 508dd6e..3db1367 100644
--- a/usr.bin/du/du.1
+++ b/usr.bin/du/du.1
@@ -28,7 +28,7 @@
.\" @(#)du.1 8.2 (Berkeley) 4/1/94
.\" $FreeBSD$
.\"
-.Dd December 8, 2011
+.Dd December 17, 2011
.Dt DU 1
.Os
.Sh NAME
@@ -155,6 +155,13 @@ or
.Fl L
option is specified, storage used by any symbolic links which are
followed is not counted (or displayed).
+The
+.Fl H ,
+.Fl L
+and
+.Fl P
+options override each other and the command's actions are determined
+by the last one specified.
.Pp
The
.Fl h, k
diff --git a/usr.bin/du/du.c b/usr.bin/du/du.c
index 061a019..7b47b71 100644
--- a/usr.bin/du/du.c
+++ b/usr.bin/du/du.c
@@ -89,18 +89,18 @@ main(int argc, char *argv[])
off_t threshold, threshold_sign;
int ftsoptions;
int depth;
- int Hflag, Lflag, Pflag, aflag, sflag, dflag, cflag;
+ int Hflag, Lflag, aflag, sflag, dflag, cflag;
int hflag, lflag, ch, notused, rval;
char **save;
static char dot[] = ".";
setlocale(LC_ALL, "");
- Hflag = Lflag = Pflag = aflag = sflag = dflag = cflag = hflag =
+ Hflag = Lflag = aflag = sflag = dflag = cflag = hflag =
lflag = Aflag = 0;
save = argv;
- ftsoptions = 0;
+ ftsoptions = FTS_PHYSICAL;
savednumber = 0;
threshold = 0;
threshold_sign = 1;
@@ -125,19 +125,17 @@ main(int argc, char *argv[])
break;
case 'H':
Hflag = 1;
+ Lflag = 0;
break;
case 'I':
ignoreadd(optarg);
break;
case 'L':
- if (Pflag)
- usage();
Lflag = 1;
+ Hflag = 0;
break;
case 'P':
- if (Lflag)
- usage();
- Pflag = 1;
+ Hflag = Lflag = 0;
break;
case 'a':
aflag = 1;
@@ -210,20 +208,12 @@ main(int argc, char *argv[])
* the man page, so it's a feature.
*/
- if (Hflag + Lflag + Pflag > 1)
- usage();
-
- if (Hflag + Lflag + Pflag == 0)
- Pflag = 1; /* -P (physical) is default */
-
if (Hflag)
ftsoptions |= FTS_COMFOLLOW;
-
- if (Lflag)
+ if (Lflag) {
+ ftsoptions &= ~FTS_PHYSICAL;
ftsoptions |= FTS_LOGICAL;
-
- if (Pflag)
- ftsoptions |= FTS_PHYSICAL;
+ }
if (!Aflag && (cblocksize % DEV_BSIZE) != 0)
cblocksize = howmany(cblocksize, DEV_BSIZE) * DEV_BSIZE;
diff --git a/usr.bin/fetch/fetch.c b/usr.bin/fetch/fetch.c
index 8d26671..e8b7318 100644
--- a/usr.bin/fetch/fetch.c
+++ b/usr.bin/fetch/fetch.c
@@ -317,7 +317,7 @@ fetch(char *URL, const char *path)
struct stat sb, nsb;
struct xferstat xs;
FILE *f, *of;
- size_t size, wr;
+ size_t size, readcnt, wr;
off_t count;
char flags[8];
const char *slash;
@@ -636,21 +636,26 @@ fetch(char *URL, const char *path)
stat_end(&xs);
siginfo = 0;
}
- if ((size = fread(buf, 1, size, f)) == 0) {
+
+ if (size == 0)
+ break;
+
+ if ((readcnt = fread(buf, 1, size, f)) < size) {
if (ferror(f) && errno == EINTR && !sigint)
clearerr(f);
- else
+ else if (readcnt == 0)
break;
}
- stat_update(&xs, count += size);
- for (ptr = buf; size > 0; ptr += wr, size -= wr)
- if ((wr = fwrite(ptr, 1, size, of)) < size) {
+
+ stat_update(&xs, count += readcnt);
+ for (ptr = buf; readcnt > 0; ptr += wr, readcnt -= wr)
+ if ((wr = fwrite(ptr, 1, readcnt, of)) < readcnt) {
if (ferror(of) && errno == EINTR && !sigint)
clearerr(of);
else
break;
}
- if (size != 0)
+ if (readcnt != 0)
break;
}
if (!sigalrm)
diff --git a/usr.bin/find/main.c b/usr.bin/find/main.c
index d901623..4f7064b 100644
--- a/usr.bin/find/main.c
+++ b/usr.bin/find/main.c
@@ -31,7 +31,7 @@
*/
#ifndef lint
-char copyright[] =
+static const char copyright[] =
"@(#) Copyright (c) 1990, 1993, 1994\n\
The Regents of the University of California. All rights reserved.\n";
#endif /* not lint */
diff --git a/usr.bin/finger/finger.c b/usr.bin/finger/finger.c
index 6586f0a..7519f15 100644
--- a/usr.bin/finger/finger.c
+++ b/usr.bin/finger/finger.c
@@ -287,7 +287,7 @@ userlist(int argc, char **argv)
/* Pull out all network requests. */
for (ap = p = argv, np = nargv; *p; ++p)
- if (index(*p, '@'))
+ if (strchr(*p, '@'))
*np++ = *p;
else
*ap++ = *p;
@@ -299,8 +299,8 @@ userlist(int argc, char **argv)
goto net;
/*
- * Mark any arguments beginning with '/' as invalid so that we
- * don't accidently confuse them with expansions from finger.conf
+ * Mark any arguments beginning with '/' as invalid so that we
+ * don't accidentally confuse them with expansions from finger.conf
*/
for (p = argv, ip = used; *p; ++p, ++ip)
if (**p == '/') {
diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c
index 159ceb9..6014ddd 100644
--- a/usr.bin/fstat/fstat.c
+++ b/usr.bin/fstat/fstat.c
@@ -150,7 +150,7 @@ do_fstat(int argc, char **argv)
if (getfname(*argv))
checkfile = 1;
}
- if (!checkfile) /* file(s) specified, but none accessable */
+ if (!checkfile) /* file(s) specified, but none accessible */
exit(1);
}
diff --git a/usr.bin/gprof/aout.c b/usr.bin/gprof/aout.c
index 6c59256..f64d672 100644
--- a/usr.bin/gprof/aout.c
+++ b/usr.bin/gprof/aout.c
@@ -134,7 +134,7 @@ getsymtab(FILE *nfile, const char *filename)
askfor = nname + 1;
nl = (nltype *) calloc( askfor , sizeof(nltype) );
if (nl == 0)
- errx( 1 , "no room for %d bytes of symbol table" ,
+ errx( 1 , "no room for %zu bytes of symbol table" ,
askfor * sizeof(nltype) );
/* pass2 - read symbols */
@@ -175,7 +175,7 @@ gettextspace(FILE *nfile)
textspace = (u_char *) malloc( xbuf.a_text );
if ( textspace == 0 ) {
- warnx("no room for %lu bytes of text space: can't do -c" ,
+ warnx("no room for %u bytes of text space: can't do -c" ,
xbuf.a_text );
return;
}
diff --git a/usr.bin/gprof/arcs.c b/usr.bin/gprof/arcs.c
index 3f0e34d..ad5cb56 100644
--- a/usr.bin/gprof/arcs.c
+++ b/usr.bin/gprof/arcs.c
@@ -378,7 +378,7 @@ cyclelink()
*/
cyclenl = (nltype *) calloc( ncycle + 1 , sizeof( nltype ) );
if ( cyclenl == 0 )
- errx( 1 , "no room for %d bytes of cycle headers" ,
+ errx( 1 , "no room for %zu bytes of cycle headers" ,
( ncycle + 1 ) * sizeof( nltype ) );
/*
* now link cycles to true cycleheads,
@@ -481,7 +481,7 @@ cycleanalyze()
done = FALSE;
cyclestack = (arctype **) calloc( size + 1 , sizeof( arctype *) );
if ( cyclestack == 0 )
- errx( 1, "no room for %d bytes of cycle stack" ,
+ errx( 1, "no room for %zu bytes of cycle stack" ,
( size + 1 ) * sizeof( arctype * ) );
# ifdef DEBUG
if ( debug & BREAKCYCLE ) {
@@ -599,7 +599,7 @@ addcycle( stkstart , stkend )
clp = (cltype *)
calloc( 1 , sizeof ( cltype ) + ( size - 1 ) * sizeof( arctype * ) );
if ( clp == 0 ) {
- warnx( "no room for %d bytes of subcycle storage" ,
+ warnx( "no room for %zu bytes of subcycle storage" ,
sizeof ( cltype ) + ( size - 1 ) * sizeof( arctype * ) );
return( FALSE );
}
diff --git a/usr.bin/grep/grep.c b/usr.bin/grep/grep.c
index 4eb4727..8133f44 100644
--- a/usr.bin/grep/grep.c
+++ b/usr.bin/grep/grep.c
@@ -158,7 +158,6 @@ usage(void)
{
fprintf(stderr, getstr(4), getprogname());
fprintf(stderr, "%s", getstr(5));
- fprintf(stderr, "%s", getstr(5));
fprintf(stderr, "%s", getstr(6));
fprintf(stderr, "%s", getstr(7));
exit(2);
@@ -166,7 +165,7 @@ usage(void)
static const char *optstr = "0123456789A:B:C:D:EFGHIJMLOPSRUVZabcd:e:f:hilm:nopqrsuvwxXy";
-struct option long_options[] =
+static const struct option long_options[] =
{
{"binary-files", required_argument, NULL, BIN_OPT},
{"help", no_argument, NULL, HELP_OPT},
diff --git a/usr.bin/hexdump/conv.c b/usr.bin/hexdump/conv.c
index 7dd2c7f..2253dff 100644
--- a/usr.bin/hexdump/conv.c
+++ b/usr.bin/hexdump/conv.c
@@ -53,7 +53,7 @@ conv_c(PR *pr, u_char *p, size_t bufsize)
wchar_t wc;
size_t clen, oclen;
int converr, pad, width;
- char peekbuf[MB_LEN_MAX];
+ u_char peekbuf[MB_LEN_MAX];
if (pr->mbleft > 0) {
str = "**";
@@ -103,7 +103,7 @@ retry:
if (clen == 0)
clen = 1;
else if (clen == (size_t)-1 || (clen == (size_t)-2 &&
- buf == peekbuf)) {
+ p == peekbuf)) {
memset(&pr->mbstate, 0, sizeof(pr->mbstate));
wc = *p;
clen = 1;
diff --git a/usr.bin/hexdump/display.c b/usr.bin/hexdump/display.c
index 991509d..a5f2a47 100644
--- a/usr.bin/hexdump/display.c
+++ b/usr.bin/hexdump/display.c
@@ -220,7 +220,7 @@ bpad(PR *pr)
pr->cchar[0] = 's';
pr->cchar[1] = '\0';
for (p1 = pr->fmt; *p1 != '%'; ++p1);
- for (p2 = ++p1; *p1 && index(spec, *p1); ++p1);
+ for (p2 = ++p1; *p1 && strchr(spec, *p1); ++p1);
while ((*p2++ = *p1++));
}
diff --git a/usr.bin/hexdump/hexdump.c b/usr.bin/hexdump/hexdump.c
index c3aaab5..d3c4bb5 100644
--- a/usr.bin/hexdump/hexdump.c
+++ b/usr.bin/hexdump/hexdump.c
@@ -61,7 +61,7 @@ main(int argc, char *argv[])
(void)setlocale(LC_ALL, "");
- if (!(p = rindex(argv[0], 'o')) || strcmp(p, "od"))
+ if (!(p = strrchr(argv[0], 'o')) || strcmp(p, "od"))
newsyntax(argc, &argv);
else
oldsyntax(argc, &argv);
diff --git a/usr.bin/hexdump/hexsyntax.c b/usr.bin/hexdump/hexsyntax.c
index a1b2099..ac1971a 100644
--- a/usr.bin/hexdump/hexsyntax.c
+++ b/usr.bin/hexdump/hexsyntax.c
@@ -54,7 +54,7 @@ newsyntax(int argc, char ***argvp)
char *p, **argv;
argv = *argvp;
- if ((p = rindex(argv[0], 'h')) != NULL &&
+ if ((p = strrchr(argv[0], 'h')) != NULL &&
strcmp(p, "hd") == 0) {
/* "Canonical" format, implies -C. */
add("\"%08.8_Ax\n\"");
diff --git a/usr.bin/hexdump/od.1 b/usr.bin/hexdump/od.1
index 6f7192c..f98190d 100644
--- a/usr.bin/hexdump/od.1
+++ b/usr.bin/hexdump/od.1
@@ -28,7 +28,7 @@
.\" @(#)od.1 8.1 (Berkeley) 6/6/93
.\" $FreeBSD$
.\"
-.Dd February 18, 2010
+.Dd December 22, 2011
.Dt OD 1
.Os
.Sh NAME
@@ -146,12 +146,12 @@ Named characters
.Pq Tn ASCII .
Control characters are displayed using the following names:
.Bl -column "000 NUL" "001 SOH" "002 STX" "003 ETX" "004 EOT" "005 ENQ"
-.It 000 NUL 001 SOH 002 STX 003 ETX 004 EOT 005 ENQ
-.It 006 ACK 007 BEL 008 BS 009 HT 00A NL 00B VT
-.It 00C FF 00D CR 00E SO 00F SI 010 DLE 011 DC1
-.It 012 DC2 013 DC3 014 DC4 015 NAK 016 SYN 017 ETB
-.It 018 CAN 019 EM 01A SUB 01B ESC 01C FS 01D GS
-.It 01E RS 01F US 020 SP 07F DEL
+.It "000 NUL 001 SOH 002 STX 003 ETX 004 EOT 005 ENQ"
+.It "006 ACK 007 BEL 008 BS 009 HT 00A NL 00B VT"
+.It "00C FF 00D CR 00E SO 00F SI 010 DLE 011 DC1"
+.It "012 DC2 013 DC3 014 DC4 015 NAK 016 SYN 017 ETB"
+.It "018 CAN 019 EM 01A SUB 01B ESC 01C FS 01D GS"
+.It "01E RS 01F US 020 SP 07F DEL"
.El
.It Cm c
Characters in the default character set.
diff --git a/usr.bin/hexdump/parse.c b/usr.bin/hexdump/parse.c
index b550bd6..a87eddb 100644
--- a/usr.bin/hexdump/parse.c
+++ b/usr.bin/hexdump/parse.c
@@ -58,7 +58,7 @@ addfile(char *name)
if ((fp = fopen(name, "r")) == NULL)
err(1, "%s", name);
while (fgets(buf, sizeof(buf), fp)) {
- if (!(p = index(buf, '\n'))) {
+ if (!(p = strchr(buf, '\n'))) {
warnx("line too long");
while ((ch = getchar()) != '\n' && ch != EOF);
continue;
@@ -167,7 +167,7 @@ size(FS *fs)
* skip any special chars -- save precision in
* case it's a %s format.
*/
- while (index(spec + 1, *++fmt));
+ while (strchr(spec + 1, *++fmt));
if (*fmt == '.' && isdigit(*++fmt)) {
prec = atoi(fmt);
while (isdigit(*++fmt));
@@ -243,10 +243,10 @@ rewrite(FS *fs)
if (fu->bcnt) {
sokay = USEBCNT;
/* Skip to conversion character. */
- for (++p1; index(spec, *p1); ++p1);
+ for (++p1; strchr(spec, *p1); ++p1);
} else {
/* Skip any special chars, field width. */
- while (index(spec + 1, *++p1));
+ while (strchr(spec + 1, *++p1));
if (*p1 == '.' && isdigit(*++p1)) {
sokay = USEPREC;
prec = atoi(p1);
@@ -255,7 +255,9 @@ rewrite(FS *fs)
sokay = NOTOKAY;
}
- p2 = p1 + 1; /* Set end pointer. */
+ p2 = *p1 ? p1 + 1 : p1; /* Set end pointer -- make sure
+ * that it's non-NUL/-NULL first
+ * though. */
cs[0] = *p1; /* Set conversion string. */
cs[1] = '\0';
@@ -449,13 +451,21 @@ escape(char *p1)
char *p2;
/* alphabetic escape sequences have to be done in place */
- for (p2 = p1;; ++p1, ++p2) {
- if (!*p1) {
- *p2 = *p1;
- break;
- }
- if (*p1 == '\\')
- switch(*++p1) {
+ for (p2 = p1; *p1; p1++, p2++) {
+ /*
+ * Let's take a peak at the next item and see whether or not
+ * we need to escape the value...
+ */
+ if (*p1 == '\\') {
+
+ p1++;
+
+ switch(*p1) {
+ /* A standalone `\' */
+ case '\0':
+ *p2 = '\\';
+ *++p2 = '\0';
+ break;
case 'a':
/* *p2 = '\a'; */
*p2 = '\007';
@@ -482,7 +492,12 @@ escape(char *p1)
*p2 = *p1;
break;
}
+
+ } else
+ *p2 = *p1;
+
}
+
}
void
diff --git a/usr.bin/indent/indent.c b/usr.bin/indent/indent.c
index 161a758..3035faa 100644
--- a/usr.bin/indent/indent.c
+++ b/usr.bin/indent/indent.c
@@ -326,7 +326,7 @@ main(int argc, char **argv)
case lbrace: /* this is a brace that starts the compound
* stmt */
- if (sc_end == 0) { /* ignore buffering if a comment wasnt
+ if (sc_end == 0) { /* ignore buffering if a comment wasn't
* stored up */
ps.search_brace = false;
goto check_type;
@@ -384,7 +384,7 @@ main(int argc, char **argv)
&& e_code != s_code && e_code[-1] == '}'))
force_nl = false;
- if (sc_end == 0) { /* ignore buffering if comment wasnt
+ if (sc_end == 0) { /* ignore buffering if comment wasn't
* saved up */
ps.search_brace = false;
goto check_type;
@@ -794,8 +794,8 @@ check_type:
/* ? dec_ind = 0; */
}
else {
- ps.decl_on_line = false; /* we cant be in the middle of
- * a declaration, so dont do
+ ps.decl_on_line = false; /* we can't be in the middle of
+ * a declaration, so don't do
* special indentation of
* comments */
if (blanklines_after_declarations_at_proctop
diff --git a/usr.bin/indent/io.c b/usr.bin/indent/io.c
index 1e36582..4a3db83 100644
--- a/usr.bin/indent/io.c
+++ b/usr.bin/indent/io.c
@@ -232,7 +232,7 @@ dump_line(void)
target = ((target - 1) & ~7) + 9, com_st++;
else
target = 1;
- if (cur_col > target) { /* if comment cant fit on this line,
+ if (cur_col > target) { /* if comment can't fit on this line,
* put it on next line */
putc('\n', output);
cur_col = 1;
@@ -581,12 +581,12 @@ diag2(int level, const char *msg)
found_err = 1;
if (output == stdout) {
fprintf(stdout, "/**INDENT** %s@%d: ", level == 0 ? "Warning" : "Error", line_no);
- fprintf(stdout, msg);
+ fprintf(stdout, "%s", msg);
fprintf(stdout, " */\n");
}
else {
fprintf(stderr, "%s@%d: ", level == 0 ? "Warning" : "Error", line_no);
- fprintf(stderr, msg);
+ fprintf(stderr, "%s", msg);
fprintf(stderr, "\n");
}
}
diff --git a/usr.bin/ipcs/ipc.c b/usr.bin/ipcs/ipc.c
index e0601dc..4c62743 100644
--- a/usr.bin/ipcs/ipc.c
+++ b/usr.bin/ipcs/ipc.c
@@ -24,7 +24,7 @@
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * The split of ipcs.c into ipcs.c and ipc.c to accomodate the
+ * The split of ipcs.c into ipcs.c and ipc.c to accommodate the
* changes in ipcrm.c was done by Edwin Groothuis <edwin@FreeBSD.org>
*/
diff --git a/usr.bin/ipcs/ipc.h b/usr.bin/ipcs/ipc.h
index a7a70de..640c3fd 100644
--- a/usr.bin/ipcs/ipc.h
+++ b/usr.bin/ipcs/ipc.h
@@ -24,7 +24,7 @@
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * The split of ipcs.c into ipcs.c and ipc.c to accomodate the
+ * The split of ipcs.c into ipcs.c and ipc.c to accommodate the
* changes in ipcrm.c was done by Edwin Groothuis <edwin@FreeBSD.org>
*
* $FreeBSD$
diff --git a/usr.bin/last/last.1 b/usr.bin/last/last.1
index e4b21d4..4ac12bf 100644
--- a/usr.bin/last/last.1
+++ b/usr.bin/last/last.1
@@ -198,6 +198,7 @@ login data base
.El
.Sh SEE ALSO
.Xr lastcomm 1 ,
+.Xr lastlogin 8 ,
.Xr getutxent 3 ,
.Xr ac 8
.Sh HISTORY
diff --git a/usr.bin/last/last.c b/usr.bin/last/last.c
index 3ac744e..e587def 100644
--- a/usr.bin/last/last.c
+++ b/usr.bin/last/last.c
@@ -83,7 +83,7 @@ struct idtab {
static const char *crmsg; /* cause of last reboot */
static time_t currentout; /* current logout value */
static long maxrec; /* records to display */
-static const char *file = NULL; /* wtmp file */
+static const char *file = NULL; /* utx.log file */
static int sflag = 0; /* show delta in seconds */
static int width = 5; /* show seconds in delta */
static int yflag; /* show year */
@@ -194,7 +194,7 @@ main(int argc, char *argv[])
/*
* wtmp --
- * read through the wtmp file
+ * read through the utx.log file
*/
static void
wtmp(void)
@@ -229,13 +229,13 @@ wtmp(void)
doentry(&buf[--amount]);
tm = localtime(&t);
- (void) strftime(ct, sizeof(ct), "\nwtmp begins %+\n", tm);
- printf("%s", ct);
+ (void) strftime(ct, sizeof(ct), "%+", tm);
+ printf("\n%s begins %s\n", ((file == NULL) ? "utx.log" : file), ct);
}
/*
* doentry --
- * process a single wtmp entry
+ * process a single utx.log entry
*/
static void
doentry(struct utmpx *bp)
diff --git a/usr.bin/lex/NEWS b/usr.bin/lex/NEWS
index 3e23e7d..e632885 100644
--- a/usr.bin/lex/NEWS
+++ b/usr.bin/lex/NEWS
@@ -1,3 +1,5 @@
+$FreeBSD$
+
Changes between release 2.5.4 (11Sep96) and release 2.5.3:
- Fixed a bug introduced in 2.5.3 that blew it when a call
@@ -944,7 +946,7 @@ Changes between 2.3 (full) release of 28Jun90 and 2.2 (alpha) release:
given. To specify an end-of-file action for just the initial
state, use <INITIAL><<EOF>>.
- - -d debug output is now contigent on the global yy_flex_debug
+ - -d debug output is now contingent on the global yy_flex_debug
being set to a non-zero value, which it is by default.
- A new macro, YY_USER_INIT, is provided for the user to specify
@@ -987,7 +989,7 @@ Changes between 2.3 (full) release of 28Jun90 and 2.2 (alpha) release:
- yy_switch_to_buffer() can be used in the yywrap() macro/routine.
- flex scanners do not use stdio for their input, and hence when
- writing an interactive scanner one must explictly call fflush()
+ writing an interactive scanner one must explicitly call fflush()
after writing out a prompt.
- flex scanner can be made reentrant (after a fashion) by using
diff --git a/usr.bin/lex/flexdef.h b/usr.bin/lex/flexdef.h
index ddc8768..1c51ec9 100644
--- a/usr.bin/lex/flexdef.h
+++ b/usr.bin/lex/flexdef.h
@@ -869,7 +869,7 @@ extern void mark_defs1 PROTO((void));
/* Mark the current position in the action array as the end of the prolog. */
extern void mark_prolog PROTO((void));
-/* Generate a data statment for a two-dimensional array. */
+/* Generate a data statement for a two-dimensional array. */
extern void mk2data PROTO((int));
extern void mkdata PROTO((int)); /* generate a data statement */
diff --git a/usr.bin/lex/main.c b/usr.bin/lex/main.c
index f6adaa7..a037ce9 100644
--- a/usr.bin/lex/main.c
+++ b/usr.bin/lex/main.c
@@ -27,7 +27,7 @@
*/
#ifndef lint
-char copyright[] =
+static const char copyright[] =
"@(#) Copyright (c) 1990 The Regents of the University of California.\n\
All rights reserved.\n";
#endif /* not lint */
diff --git a/usr.bin/lex/tblcmp.c b/usr.bin/lex/tblcmp.c
index 12af3dc..d5d623d 100644
--- a/usr.bin/lex/tblcmp.c
+++ b/usr.bin/lex/tblcmp.c
@@ -510,7 +510,7 @@ void mkdeftbl()
* (i.e., jam entries) into the table. It is assumed that by linking to
* "JAMSTATE" they will be taken care of. In any case, entries in "state"
* marking transitions to "SAME_TRANS" are treated as though they will be
- * taken care of by whereever "deflink" points. "totaltrans" is the total
+ * taken care of by wherever "deflink" points. "totaltrans" is the total
* number of transitions out of the state. If it is below a certain threshold,
* the tables are searched for an interior spot that will accommodate the
* state array.
diff --git a/usr.bin/limits/limits.1 b/usr.bin/limits/limits.1
index 72d4535..3ec4845 100644
--- a/usr.bin/limits/limits.1
+++ b/usr.bin/limits/limits.1
@@ -19,7 +19,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd April 10, 2011
+.Dd January 23, 2011
.Dt LIMITS 1
.Os
.Sh NAME
@@ -27,7 +27,7 @@
.Nd set or display process resource limits
.Sh SYNOPSIS
.Nm
-.Op Fl C Ar class | Fl U Ar user
+.Op Fl C Ar class | Fl P Ar pid | Fl U Ar user
.Op Fl SHB
.Op Fl ea
.Op Fl bcdflmnstuvpw Op Ar val
@@ -143,6 +143,9 @@ for the
class are used, if it exists, or the
.Dq Li root
class if the user is a superuser account.
+.It Fl P Ar pid
+Select or set limits for the process identified by the
+.Ar pid .
.It Fl S
Select display or setting of
.Dq soft
diff --git a/usr.bin/limits/limits.c b/usr.bin/limits/limits.c
index 2da69a2..3c5fd6d 100644
--- a/usr.bin/limits/limits.c
+++ b/usr.bin/limits/limits.c
@@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$");
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/sysctl.h>
#include <sys/param.h>
#include <stdlib.h>
#include <unistd.h>
@@ -236,7 +237,7 @@ static struct {
/*
* One letter for each resource levels.
- * NOTE: There is a dependancy on the corresponding
+ * NOTE: There is a dependency on the corresponding
* letter index being equal to the resource number.
* If sys/resource.h defines are changed, this needs
* to be modified accordingly!
@@ -249,6 +250,8 @@ static void usage(void);
static int getshelltype(void);
static void print_limit(rlim_t limit, unsigned divisor, const char *inf,
const char *pfx, const char *sfx, const char *which);
+static void getrlimit_proc(pid_t pid, int resource, struct rlimit *rlp);
+static void setrlimit_proc(pid_t pid, int resource, const struct rlimit *rlp);
extern char **environ;
static const char rcs_string[] = RCS_STRING;
@@ -262,24 +265,24 @@ main(int argc, char *argv[])
int rcswhich, shelltype;
int i, num_limits = 0;
int ch, doeval = 0, doall = 0;
- int rtrn;
+ int rtrn, setproc;
login_cap_t * lc = NULL;
enum { ANY=0, SOFT=1, HARD=2, BOTH=3, DISPLAYONLY=4 } type = ANY;
enum { RCSUNKNOWN=0, RCSSET=1, RCSSEL=2 } todo = RCSUNKNOWN;
int which_limits[RLIM_NLIMITS];
rlim_t set_limits[RLIM_NLIMITS];
struct rlimit limits[RLIM_NLIMITS];
+ pid_t pid;
/* init resource tables */
for (i = 0; i < RLIM_NLIMITS; i++) {
which_limits[i] = 0; /* Don't set/display any */
set_limits[i] = RLIM_INFINITY;
- /* Get current resource values */
- getrlimit(i, &limits[i]);
}
+ pid = -1;
optarg = NULL;
- while ((ch = getopt(argc, argv, ":EeC:U:BSHab:c:d:f:l:m:n:s:t:u:v:p:w:")) != -1) {
+ while ((ch = getopt(argc, argv, ":EeC:U:BSHP:ab:c:d:f:l:m:n:s:t:u:v:p:w:")) != -1) {
switch(ch) {
case 'a':
doall = 1;
@@ -312,6 +315,12 @@ main(int argc, char *argv[])
case 'B':
type = SOFT|HARD;
break;
+ case 'P':
+ if (!isdigit(*optarg) || (pid = atoi(optarg)) < 0) {
+ warnx("invalid pid `%s'", optarg);
+ usage();
+ }
+ break;
default:
case ':': /* Without arg */
if ((p = strchr(rcs_string, optopt)) != NULL) {
@@ -335,6 +344,30 @@ main(int argc, char *argv[])
optarg = NULL;
}
+ if (pid != -1) {
+ if (cls != NULL) {
+ warnx("-C cannot be used with -P option");
+ usage();
+ }
+ if (pwd != NULL) {
+ warnx("-U cannot be used with -P option");
+ usage();
+ }
+ }
+
+ /* Get current resource values */
+ setproc = 0;
+ for (i = 0; i < RLIM_NLIMITS; i++) {
+ if (pid == -1) {
+ getrlimit(i, &limits[i]);
+ } else if (doall || num_limits == 0) {
+ getrlimit_proc(pid, i, &limits[i]);
+ } else if (which_limits[i] != 0) {
+ getrlimit_proc(pid, i, &limits[i]);
+ setproc = 1;
+ }
+ }
+
/* If user was specified, get class from that */
if (pwd != NULL)
lc = login_getpwclass(pwd);
@@ -414,6 +447,10 @@ main(int argc, char *argv[])
warnx("-e cannot be used with `cmd' option");
usage();
}
+ if (pid != -1) {
+ warnx("-P cannot be used with `cmd' option");
+ usage();
+ }
login_close(lc);
@@ -440,6 +477,14 @@ main(int argc, char *argv[])
err(1, "%s", *argv);
}
+ if (setproc) {
+ for (rcswhich = 0; rcswhich < RLIM_NLIMITS; rcswhich++) {
+ if (which_limits[rcswhich] != 0)
+ setrlimit_proc(pid, rcswhich, &limits[rcswhich]);
+ }
+ exit(EXIT_SUCCESS);
+ }
+
shelltype = doeval ? getshelltype() : SH_NONE;
if (type == ANY) /* Default to soft limits */
@@ -493,7 +538,8 @@ static void
usage(void)
{
(void)fprintf(stderr,
-"usage: limits [-C class|-U user] [-eaSHBE] [-bcdflmnstuvpw [val]] [[name=val ...] cmd]\n");
+ "usage: limits [-C class|-P pid|-U user] [-eaSHBE] "
+ "[-bcdflmnstuvpw [val]] [[name=val ...] cmd]\n");
exit(EXIT_FAILURE);
}
@@ -677,3 +723,38 @@ getshelltype(void)
return SH_SH;
}
+static void
+getrlimit_proc(pid_t pid, int resource, struct rlimit *rlp)
+{
+ int error;
+ int name[5];
+ size_t len;
+
+ name[0] = CTL_KERN;
+ name[1] = KERN_PROC;
+ name[2] = KERN_PROC_RLIMIT;
+ name[3] = pid;
+ name[4] = resource;
+ len = sizeof(*rlp);
+ error = sysctl(name, 5, rlp, &len, NULL, 0);
+ if (error == -1)
+ err(EXIT_FAILURE, "sysctl: kern.proc.rlimit: %d", pid);
+ if (len != sizeof(*rlp))
+ errx(EXIT_FAILURE, "sysctl() returns wrong size");
+}
+
+static void
+setrlimit_proc(pid_t pid, int resource, const struct rlimit *rlp)
+{
+ int error;
+ int name[5];
+
+ name[0] = CTL_KERN;
+ name[1] = KERN_PROC;
+ name[2] = KERN_PROC_RLIMIT;
+ name[3] = pid;
+ name[4] = resource;
+ error = sysctl(name, 5, NULL, 0, rlp, sizeof(*rlp));
+ if (error == -1)
+ err(EXIT_FAILURE, "sysctl: kern.proc.rlimit: %d", pid);
+}
diff --git a/usr.bin/locate/locate/fastfind.c b/usr.bin/locate/locate/fastfind.c
index 21148bc..c15730b 100644
--- a/usr.bin/locate/locate/fastfind.c
+++ b/usr.bin/locate/locate/fastfind.c
@@ -167,7 +167,7 @@ fastfind
/* find optimal (last) char for searching */
for (p = pathpart; *p != '\0'; p++)
- if (index(LOCATE_REG, *p) != NULL)
+ if (strchr(LOCATE_REG, *p) != NULL)
break;
if (*p == '\0')
diff --git a/usr.bin/locate/locate/locate.c b/usr.bin/locate/locate/locate.c
index 67a97da..b0faefb 100644
--- a/usr.bin/locate/locate/locate.c
+++ b/usr.bin/locate/locate/locate.c
@@ -188,7 +188,7 @@ main(argc, argv)
/* no (valid) database as argument */
if (dbv == NULL || *dbv == NULL) {
- /* try to read database from enviroment */
+ /* try to read database from environment */
if ((path_fcodes = getenv("LOCATE_PATH")) == NULL ||
*path_fcodes == '\0')
/* use default database */
diff --git a/usr.bin/locate/locate/util.c b/usr.bin/locate/locate/util.c
index 9cd02b0..a28690a 100644
--- a/usr.bin/locate/locate/util.c
+++ b/usr.bin/locate/locate/util.c
@@ -162,7 +162,7 @@ patprep(name)
/* skip trailing metacharacters */
for (; p >= name; p--)
- if (index(LOCATE_REG, *p) == NULL)
+ if (strchr(LOCATE_REG, *p) == NULL)
break;
/*
@@ -172,7 +172,7 @@ patprep(name)
* |----< p
*/
if (p >= name &&
- (index(p, '[') != NULL || index(p, ']') != NULL)) {
+ (strchr(p, '[') != NULL || strchr(p, ']') != NULL)) {
for (p = name; *p != '\0'; p++)
if (*p == ']' || *p == '[')
break;
@@ -183,7 +183,7 @@ patprep(name)
* '*\*[a-z]'
* |-------< p
*/
- if (p >= name && index(LOCATE_REG, *p) != NULL)
+ if (p >= name && strchr(LOCATE_REG, *p) != NULL)
p = name - 1;
}
@@ -193,7 +193,7 @@ patprep(name)
else {
for (endmark = p; p >= name; p--)
- if (index(LOCATE_REG, *p) != NULL)
+ if (strchr(LOCATE_REG, *p) != NULL)
break;
for (++p;
(p <= endmark) && subp < (globfree + sizeof(globfree));)
@@ -218,16 +218,16 @@ tolower_word(word)
/*
- * Read integer from mmap pointer.
- * Essential a simple ``return *(int *)p'' but avoid sigbus
+ * Read integer from mmap pointer.
+ * Essentially a simple ``return *(int *)p'' but avoids sigbus
* for integer alignment (SunOS 4.x, 5.x).
*
- * Convert network byte order to host byte order if neccessary.
- * So we can read on FreeBSD/i386 (little endian) a locate database
+ * Convert network byte order to host byte order if necessary.
+ * So we can read a locate database on FreeBSD/i386 (little endian)
* which was built on SunOS/sparc (big endian).
*/
-int
+int
getwm(p)
caddr_t p;
{
@@ -254,7 +254,7 @@ getwm(p)
/*
* Read integer from stream.
*
- * Convert network byte order to host byte order if neccessary.
+ * Convert network byte order to host byte order if necessary.
* So we can read on FreeBSD/i386 (little endian) a locate database
* which was built on SunOS/sparc (big endian).
*/
diff --git a/usr.bin/login/login_fbtab.c b/usr.bin/login/login_fbtab.c
index afa320f..ad64e4f 100644
--- a/usr.bin/login/login_fbtab.c
+++ b/usr.bin/login/login_fbtab.c
@@ -25,7 +25,7 @@
SunOS 4.1.x fbtab(5) and SunOS 5.x logindevperm(4) manual
pages. The program first looks for /etc/fbtab. If that file
cannot be opened it attempts to process /etc/logindevperm.
- We expect entries with the folowing format:
+ We expect entries with the following format:
Comments start with a # and extend to the end of the line.
diff --git a/usr.bin/logins/logins.1 b/usr.bin/logins/logins.1
index fcd12b3..6ac7acc 100644
--- a/usr.bin/logins/logins.1
+++ b/usr.bin/logins/logins.1
@@ -1,5 +1,5 @@
.\"-
-.\" Copyright (c) 2004 Dag-Erling Coïdan Smørgrav
+.\" Copyright (c) 2004 Dag-Erling Coïdan Smørgrav
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
diff --git a/usr.bin/logins/logins.c b/usr.bin/logins/logins.c
index abf342e..5cc60d7 100644
--- a/usr.bin/logins/logins.c
+++ b/usr.bin/logins/logins.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2004 Dag-Erling Coïdan Smørgrav
+ * Copyright (c) 2004 Dag-Erling Coïdan Smørgrav
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/usr.bin/m4/Makefile b/usr.bin/m4/Makefile
index ce93ede..fefaf4d 100644
--- a/usr.bin/m4/Makefile
+++ b/usr.bin/m4/Makefile
@@ -6,7 +6,7 @@
PROG= m4
CFLAGS+=-DEXTENDED -I${.CURDIR}/lib
-LDADD= -ly -ll
+LDADD= -ly -ll -lm
# clang needs 1 while with gcc we can use 2
#WARNS= 1
diff --git a/usr.bin/m4/eval.c b/usr.bin/m4/eval.c
index 9e5162f..7cdad63 100644
--- a/usr.bin/m4/eval.c
+++ b/usr.bin/m4/eval.c
@@ -268,9 +268,14 @@ expand_builtin(const char *argv[], int argc, int td)
break;
case INCLTYPE:
if (argc > 2)
- if (!doincl(argv[2]))
- err(1, "%s at line %lu: include(%s)",
- CURRENT_NAME, CURRENT_LINE, argv[2]);
+ if (!doincl(argv[2])) {
+ if (mimic_gnu)
+ warn("%s at line %lu: include(%s)",
+ CURRENT_NAME, CURRENT_LINE, argv[2]);
+ else
+ err(1, "%s at line %lu: include(%s)",
+ CURRENT_NAME, CURRENT_LINE, argv[2]);
+ }
break;
case SINCTYPE:
diff --git a/usr.bin/m4/parser.y b/usr.bin/m4/parser.y
index fac6709..deda962 100644
--- a/usr.bin/m4/parser.y
+++ b/usr.bin/m4/parser.y
@@ -18,6 +18,7 @@
* $FreeBSD$
*/
#include <stdint.h>
+#include <math.h>
#define YYSTYPE int32_t
extern int32_t end_result;
extern int yylex(void);
@@ -34,6 +35,7 @@ extern int yyparse(void);
%left EQ NE
%left '<' LE '>' GE
%left LSHIFT RSHIFT
+%right EXPONENT
%left '+' '-'
%left '*' '/' '%'
%right UMINUS UPLUS '!' '~'
@@ -44,6 +46,7 @@ top : expr { end_result = $1; }
;
expr : expr '+' expr { $$ = $1 + $3; }
| expr '-' expr { $$ = $1 - $3; }
+ | expr EXPONENT expr { $$ = pow($1, $3); }
| expr '*' expr { $$ = $1 * $3; }
| expr '/' expr {
if ($3 == 0) {
diff --git a/usr.bin/m4/tokenizer.l b/usr.bin/m4/tokenizer.l
index e9c9e12..ca3612e 100644
--- a/usr.bin/m4/tokenizer.l
+++ b/usr.bin/m4/tokenizer.l
@@ -57,6 +57,7 @@ radix 0[rR][0-9]+:[0-9a-zA-Z]+
"!=" { return(NE); }
"&&" { return(LAND); }
"||" { return(LOR); }
+"**" { if (mimic_gnu) { return (EXPONENT); } }
. { return yytext[0]; }
%%
diff --git a/usr.bin/mail/cmd1.c b/usr.bin/mail/cmd1.c
index 634381d..4782ec9 100644
--- a/usr.bin/mail/cmd1.c
+++ b/usr.bin/mail/cmd1.c
@@ -210,7 +210,7 @@ printhead(int mesg)
int
pdot(void)
{
- printf("%d\n", dot - &message[0] + 1);
+ printf("%td\n", dot - &message[0] + 1);
return (0);
}
diff --git a/usr.bin/mail/edit.c b/usr.bin/mail/edit.c
index d1ff37f..ad8aa53 100644
--- a/usr.bin/mail/edit.c
+++ b/usr.bin/mail/edit.c
@@ -89,7 +89,7 @@ edit1(int *msgvec, int type)
char *p;
printf("Edit message %d [ynq]? ", msgvec[i]);
- if (fgets(buf, sizeof(buf), stdin) == 0)
+ if (fgets(buf, sizeof(buf), stdin) == NULL)
break;
for (p = buf; *p == ' ' || *p == '\t'; p++)
;
diff --git a/usr.bin/mail/extern.h b/usr.bin/mail/extern.h
index f5f2872..2578d65 100644
--- a/usr.bin/mail/extern.h
+++ b/usr.bin/mail/extern.h
@@ -154,7 +154,7 @@ int ishead(char []);
int isign(const char *, struct ignoretab []);
int isprefix(const char *, const char *);
void istrncpy(char *, const char *, size_t);
-__const struct cmd *
+const struct cmd *
lex(char []);
void load(char *);
struct var *
diff --git a/usr.bin/mail/head.c b/usr.bin/mail/head.c
index 29b1426..d836ce4 100644
--- a/usr.bin/mail/head.c
+++ b/usr.bin/mail/head.c
@@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$");
/*
* See if the passed line buffer is a mail header.
* Return true if yes. Note the extreme pains to
- * accomodate all funny formats.
+ * accommodate all funny formats.
*/
int
ishead(char linebuf[])
diff --git a/usr.bin/mail/lex.c b/usr.bin/mail/lex.c
index 3232001..4d799e7 100644
--- a/usr.bin/mail/lex.c
+++ b/usr.bin/mail/lex.c
@@ -482,7 +482,7 @@ setmsize(int sz)
* to the passed command "word"
*/
-__const struct cmd *
+const struct cmd *
lex(char word[])
{
const struct cmd *cp;
diff --git a/usr.bin/mail/main.c b/usr.bin/mail/main.c
index 0d56580..31372d0 100644
--- a/usr.bin/mail/main.c
+++ b/usr.bin/mail/main.c
@@ -206,7 +206,7 @@ Usage: %s [-dEiInv] [-s subject] [-c cc-addr] [-b bcc-addr] [-F] to-addr ...\n\
%*s [-sendmail-option ...]\n\
%s [-dEHiInNv] [-F] -f [name]\n\
%s [-dEHiInNv] [-F] [-u user]\n\
- %s [-d] -e [-f name]\n", __progname, strlen(__progname), "",
+ %s [-d] -e [-f name]\n", __progname, (int)strlen(__progname), "",
__progname, __progname, __progname);
exit(1);
}
@@ -259,7 +259,7 @@ Usage: %s [-dEiInv] [-s subject] [-c cc-addr] [-b bcc-addr] [-F] to-addr ...\n\
if (ef == NULL)
ef = "%";
if (setfile(ef) <= 0)
- /* Either an error has occured, or no mail */
+ /* Either an error has occurred, or no mail */
exit(1);
else
exit(0);
diff --git a/usr.bin/mail/util.c b/usr.bin/mail/util.c
index 461738d..c90fe90 100644
--- a/usr.bin/mail/util.c
+++ b/usr.bin/mail/util.c
@@ -550,7 +550,7 @@ newname:
}
/*
- * Count the occurances of c in str
+ * Count the occurrences of c in str
*/
int
charcount(char *str, int c)
diff --git a/usr.bin/make/GNode.h b/usr.bin/make/GNode.h
index 71d2afd..05af1d0 100644
--- a/usr.bin/make/GNode.h
+++ b/usr.bin/make/GNode.h
@@ -139,7 +139,7 @@ typedef struct GNode {
UPTODATE, /* Was already up-to-date */
/*
- * An error occured while it was being
+ * An error occurred while it was being
* made (used only in compat mode)
*/
ERROR,
diff --git a/usr.bin/make/arch.c b/usr.bin/make/arch.c
index 9cd0a1c..e4f6b0d 100644
--- a/usr.bin/make/arch.c
+++ b/usr.bin/make/arch.c
@@ -179,8 +179,8 @@ Boolean arch_fatal = TRUE;
/**
* ArchError
- * An error happend while handling an archive. BSDmake traditionally
- * ignored these errors. Now this is dependend on the global arch_fatal
+ * An error happened while handling an archive. BSDmake traditionally
+ * ignored these errors. Now this is dependent on the global arch_fatal
* which, if true, makes these errors fatal and, if false, just emits an
* error message.
*/
@@ -529,7 +529,7 @@ ArchArchiveOpen(const char *archive, const char *mode)
/*
* Read the next header from the archive. The return value will be +1 if
- * the header is read successfully, 0 on EOF and -1 if an error happend.
+ * the header is read successfully, 0 on EOF and -1 if an error happened.
* On a successful return sname contains the truncated member name and
* member the full name. hdr contains the member header. For the symbol table
* names of length 0 are returned. The entry for the file name table is never
@@ -830,7 +830,7 @@ ArchFindMember(const char *archive, const char *member, const char *mode)
* (3) the name is longer and the archive doesn't support long
* names.
* Because we don't know whether the archive supports long
- * names or not we need to be carefull.
+ * names or not we need to be careful.
*/
if (member == NULL) {
/* special case - symbol table */
@@ -942,7 +942,7 @@ ArchStatMember(const char *archive, const char *member, Boolean hash)
ArchArchiveClose(arf);
if (t < 0) {
- /* error happend - throw away everything */
+ /* error happened - throw away everything */
Hash_DeleteTable(&ar->members);
free(ar->name);
free(ar);
diff --git a/usr.bin/make/buf.c b/usr.bin/make/buf.c
index 7c6c01f..fa866d3 100644
--- a/usr.bin/make/buf.c
+++ b/usr.bin/make/buf.c
@@ -206,7 +206,7 @@ Buf_Destroy(Buffer *buf, Boolean freeData)
/**
* Replace the last byte in a buffer. If the buffer was empty
- * intially, then a new byte will be added.
+ * initially, then a new byte will be added.
*/
void
Buf_ReplaceLastByte(Buffer *bp, Byte byte)
diff --git a/usr.bin/make/for.c b/usr.bin/make/for.c
index f2eccce..1b2e578 100644
--- a/usr.bin/make/for.c
+++ b/usr.bin/make/for.c
@@ -218,7 +218,7 @@ For_Eval(char *line)
/*-
*-----------------------------------------------------------------------
* For_Run --
- * Run the for loop, immitating the actions of an include file
+ * Run the for loop, imitating the actions of an include file
*
* Results:
* None.
diff --git a/usr.bin/make/job.c b/usr.bin/make/job.c
index 75f7949..2798181 100644
--- a/usr.bin/make/job.c
+++ b/usr.bin/make/job.c
@@ -1897,7 +1897,7 @@ JobOutput(Job *job, char *cp, char *endp, int msg)
* this makes up a line, we print it tagged by the job's identifier,
* as necessary.
* If output has been collected in a temporary file, we open the
- * file and read it line by line, transfering it to our own
+ * file and read it line by line, transferring it to our own
* output channel until the file is empty. At which point we
* remove the temporary file.
* In both cases, however, we keep our figurative eye out for the
diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c
index daeada4..8079cc9 100644
--- a/usr.bin/make/main.c
+++ b/usr.bin/make/main.c
@@ -146,6 +146,14 @@ uint32_t warn_nocmd; /* command line no-warning flags */
time_t now; /* Time at start of make */
struct GNode *DEFAULT; /* .DEFAULT node */
+static struct {
+ const char *foreign_name;
+ const char *freebsd_name;
+} arch_aliases[] = {
+ { "x86_64", "amd64" },
+ { "mipsel", "mips" },
+};
+
/**
* Exit with usage message.
*/
@@ -267,13 +275,13 @@ ReadMakefile(const char p[])
* XXX The realpath stuff breaks relative includes
* XXX in some cases. The problem likely is in
* XXX parse.c where it does special things in
- * XXX ParseDoInclude if the file is relateive
+ * XXX ParseDoInclude if the file is relative
* XXX or absolute and not a system file. There
* XXX it assumes that if the current file that's
* XXX being included is absolute, that any files
* XXX that it includes shouldn't do the -I path
- * XXX stuff, which is inconsistant with historical
- * XXX behavior. However, I can't pentrate the mists
+ * XXX stuff, which is inconsistent with historical
+ * XXX behavior. However, I can't penetrate the mists
* XXX further, so I'm putting this workaround in
* XXX here until such time as the underlying bug
* XXX can be fixed.
@@ -675,7 +683,7 @@ chdir_verify_path(const char *path, char *obpath)
* prevent a forkbomb from happening, in a dumb and mechanical way.
*
* Side Effects:
- * Creates or modifies enviornment variable MKLVL_ENVVAR via setenv().
+ * Creates or modifies environment variable MKLVL_ENVVAR via setenv().
*/
static void
check_make_level(void)
@@ -939,10 +947,19 @@ main(int argc, char **argv)
*/
if ((machine = getenv("MACHINE")) == NULL) {
static struct utsname utsname;
+ unsigned int i;
if (uname(&utsname) == -1)
err(2, "uname");
machine = utsname.machine;
+
+ /* Canonicalize non-FreeBSD naming conventions */
+ for (i = 0; i < sizeof(arch_aliases)
+ / sizeof(arch_aliases[0]); i++)
+ if (!strcmp(machine, arch_aliases[i].foreign_name)) {
+ machine = arch_aliases[i].freebsd_name;
+ break;
+ }
}
if ((machine_arch = getenv("MACHINE_ARCH")) == NULL) {
@@ -954,7 +971,7 @@ main(int argc, char **argv)
}
/*
- * Set machine_cpu to the minumum supported CPU revision based
+ * Set machine_cpu to the minimum supported CPU revision based
* on the target architecture, if not already set.
*/
if ((machine_cpu = getenv("MACHINE_CPU")) == NULL) {
@@ -1047,7 +1064,7 @@ main(int argc, char **argv)
*
* Once things are initted,
* have to add the original directory to the search path,
- * and modify the paths for the Makefiles apropriately. The
+ * and modify the paths for the Makefiles appropriately. The
* current directory is also placed as a variable for make scripts.
*/
if (!(pathp = getenv("MAKEOBJDIRPREFIX"))) {
diff --git a/usr.bin/make/str.c b/usr.bin/make/str.c
index 286eac5..ce4ac05 100644
--- a/usr.bin/make/str.c
+++ b/usr.bin/make/str.c
@@ -50,10 +50,10 @@ __FBSDID("$FreeBSD$");
/**
* Initialize the argument array object. The array is initially
- * eight positions, and will be expaned as neccessary. The first
+ * eight positions, and will be expanded as necessary. The first
* position is set to NULL since everything ignores it. We allocate
* (size + 1) since we need space for the terminating NULL. The
- * buffer is set to NULL, since no common buffer is alloated yet.
+ * buffer is set to NULL, since no common buffer is allocated yet.
*/
void
ArgArray_Init(ArgArray *aa)
diff --git a/usr.bin/make/var.c b/usr.bin/make/var.c
index 534abca..a7babaf 100644
--- a/usr.bin/make/var.c
+++ b/usr.bin/make/var.c
@@ -842,7 +842,7 @@ VarLocal(const char name[])
}
/**
- * Find the given variable in the given context and the enviornment.
+ * Find the given variable in the given context and the environment.
*
* Results:
* A pointer to the structure describing the desired variable or
diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh
index 98749a6..0725e0b 100755
--- a/usr.bin/man/man.sh
+++ b/usr.bin/man/man.sh
@@ -369,7 +369,7 @@ man_display_page() {
while getopts 'egprtv' preproc_arg; do
case "${preproc_arg}" in
e) pipeline="$pipeline | $EQN" ;;
- g) ;; # Ignore for compatability.
+ g) ;; # Ignore for compatibility.
p) pipeline="$pipeline | $PIC" ;;
r) pipeline="$pipeline | $REFER" ;;
t) pipeline="$pipeline | $TBL" ;;
diff --git a/usr.bin/mkesdb/Makefile.inc b/usr.bin/mkesdb/Makefile.inc
index 33d0b36..ce817fa 100644
--- a/usr.bin/mkesdb/Makefile.inc
+++ b/usr.bin/mkesdb/Makefile.inc
@@ -2,5 +2,4 @@
SRCS+= lex.l yacc.y
CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../mkesdb \
- -I${.CURDIR}/../../lib/libc/iconv \
- --param max-inline-insns-single=64
+ -I${.CURDIR}/../../lib/libc/iconv
diff --git a/usr.bin/mkulzma/Makefile b/usr.bin/mkulzma/Makefile
new file mode 100644
index 0000000..8147ebf
--- /dev/null
+++ b/usr.bin/mkulzma/Makefile
@@ -0,0 +1,8 @@
+# $FreeBSD$
+
+PROG= mkulzma
+MAN= mkulzma.8
+DPADD= ${LIBLZMA}
+LDADD= -llzma
+
+.include <bsd.prog.mk>
diff --git a/usr.bin/mkulzma/mkulzma.8 b/usr.bin/mkulzma/mkulzma.8
new file mode 100644
index 0000000..8f7338e
--- /dev/null
+++ b/usr.bin/mkulzma/mkulzma.8
@@ -0,0 +1,107 @@
+.\" ----------------------------------------------------------------------------
+.\" Derived from mkuzip.8 by Aleksandr Rybalko <ray@ddteam.net>
+.\" ----------------------------------------------------------------------------
+.\" "THE BEER-WARE LICENSE" (Revision 42):
+.\" <sobomax@FreeBSD.ORG> wrote this file. As long as you retain this notice you
+.\" can do whatever you want with this stuff. If we meet some day, and you think
+.\" this stuff is worth it, you can buy me a beer in return. Maxim Sobolev
+.\" ----------------------------------------------------------------------------
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 17, 2006
+.Dt mkulzma 8
+.Os
+.Sh NAME
+.Nm mkulzma
+.Nd compress disk image for use with
+.Xr geom_uncompress 4
+class
+.Sh SYNOPSIS
+.Nm
+.Op Fl v
+.Op Fl o Ar outfile
+.Op Fl s Ar cluster_size
+.Ar infile
+.Sh DESCRIPTION
+The
+.Nm
+utility compresses a disk image file so that the
+.Xr geom_uncompress 4
+class will be able to decompress the resulting image at run-time.
+This allows for a significant reduction of size of disk image at
+the expense of some CPU time required to decompress the data each
+time it is read.
+The
+.Nm
+utility
+works in two phases:
+.Bl -enum
+.It
+An
+.Ar infile
+image is split into clusters; each cluster is compressed using liblzma.
+.It
+The resulting set of compressed clusters along with headers that allow
+locating each individual cluster is written to the output file.
+.El
+.Pp
+The options are:
+.Bl -tag -width indent
+.It Fl o Ar outfile
+Name of the output file
+.Ar outfile .
+The default is to use the input name with the suffix
+.Pa .ulzma .
+.It Fl s Ar cluster_size
+Split the image into clusters of
+.Ar cluster_size
+bytes, 16384 bytes by default.
+The
+.Ar cluster_size
+should be a multiple of 512 bytes.
+.It Fl v
+Display verbose messages.
+.El
+.Sh NOTES
+The compression ratio largely depends on the cluster size used.
+.\" The following two sentences are unclear: how can xz(1) be
+.\" used in a comparable fashion, and wouldn't a lzma-compressed
+.\" image suffer from larger cluster sizes as well?
+For large cluster sizes (16K and higher), typical compression ratios
+are only 1-2% less than those achieved with
+.Xr lzma 1 .
+However, it should be kept in mind that larger cluster
+sizes lead to higher overhead in the
+.Xr geom_uncompress 4
+class, as the class has to decompress the whole cluster even if
+only a few bytes from that cluster have to be read.
+.Pp
+The
+.Nm
+utility
+inserts a short shell script at the beginning of the generated image,
+which makes it possible to
+.Dq run
+the image just like any other shell script.
+The script tries to load the
+.Xr geom_uncompress 4
+class if it is not loaded, configure the image as an
+.Xr md 4
+disk device using
+.Xr mdconfig 8 ,
+and automatically mount it using
+.Xr mount_cd9660 8
+on the mount point provided as the first argument to the script.
+.Sh EXIT STATUS
+.Ex -std
+.Sh SEE ALSO
+.Xr lzma 1 ,
+.Xr geom 4 ,
+.Xr geom_uncompress 4 ,
+.Xr md 4 ,
+.Xr mdconfig 8 ,
+.Xr mount_cd9660 8
+.Sh AUTHORS
+.An Maxim Sobolev Aq sobomax@FreeBSD.org
+.An Aleksandr Rybalko Aq ray@ddteam.net
diff --git a/usr.bin/mkulzma/mkulzma.c b/usr.bin/mkulzma/mkulzma.c
new file mode 100644
index 0000000..b046c1e
--- /dev/null
+++ b/usr.bin/mkulzma/mkulzma.c
@@ -0,0 +1,330 @@
+/*
+ * ----------------------------------------------------------------------------
+ * Derived from mkuzip.c by Aleksandr Rybalko <ray@ddteam.net>
+ * ----------------------------------------------------------------------------
+ * "THE BEER-WARE LICENSE" (Revision 42):
+ * <sobomax@FreeBSD.ORG> wrote this file. As long as you retain this notice you
+ * can do whatever you want with this stuff. If we meet some day, and you think
+ * this stuff is worth it, you can buy me a beer in return. Maxim Sobolev
+ * ----------------------------------------------------------------------------
+ *
+ * $FreeBSD$
+ *
+ */
+
+#include <sys/disk.h>
+#include <sys/endian.h>
+#include <sys/param.h>
+#include <sys/stat.h>
+#include <sys/uio.h>
+#include <netinet/in.h>
+#include <err.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include <lzma.h>
+
+#define CLSTSIZE 16384
+#define DEFAULT_SUFX ".ulzma"
+
+#define USED_BLOCKSIZE DEV_BSIZE
+
+#define CLOOP_MAGIC_LEN 128
+/* Format L3.0, since we move to XZ API */
+static char CLOOP_MAGIC_START[] =
+ "#!/bin/sh\n"
+ "#L3.0\n"
+ "n=uncompress\n"
+ "m=geom_$n\n"
+ "(kldstat -m $m 2>&-||kldload $m)>&-&&"
+ "mount_cd9660 /dev/`mdconfig -af $0`.$n $1\n"
+ "exit $?\n";
+
+static char *readblock(int, char *, u_int32_t);
+static void usage(void);
+static void *safe_malloc(size_t);
+static void cleanup(void);
+
+static char *cleanfile = NULL;
+
+int main(int argc, char **argv)
+{
+ char *iname, *oname, *obuf, *ibuf;
+ int fdr, fdw, i, opt, verbose, tmp;
+ struct iovec iov[2];
+ struct stat sb;
+ uint32_t destlen;
+ uint64_t offset;
+ uint64_t *toc;
+ lzma_filter filters[2];
+ lzma_options_lzma opt_lzma;
+ lzma_ret ret;
+ lzma_stream strm = LZMA_STREAM_INIT;
+ struct cloop_header {
+ char magic[CLOOP_MAGIC_LEN]; /* cloop magic */
+ uint32_t blksz; /* block size */
+ uint32_t nblocks; /* number of blocks */
+ } hdr;
+
+ memset(&hdr, 0, sizeof(hdr));
+ hdr.blksz = CLSTSIZE;
+ strcpy(hdr.magic, CLOOP_MAGIC_START);
+ oname = NULL;
+ verbose = 0;
+
+ while((opt = getopt(argc, argv, "o:s:v")) != -1) {
+ switch(opt) {
+ case 'o':
+ oname = optarg;
+ break;
+
+ case 's':
+ tmp = atoi(optarg);
+ if (tmp <= 0) {
+ errx(1,
+ "invalid cluster size specified: %s",
+ optarg);
+ /* Not reached */
+ }
+ if (tmp % USED_BLOCKSIZE != 0) {
+ errx(1,
+ "cluster size should be multiple of %d",
+ USED_BLOCKSIZE);
+ /* Not reached */
+ }
+ if ( tmp > MAXPHYS) {
+ errx(1, "cluster size is too large");
+ /* Not reached */
+ }
+ hdr.blksz = tmp;
+ break;
+
+ case 'v':
+ verbose = 1;
+ break;
+
+ default:
+ usage();
+ /* Not reached */
+ }
+ }
+ argc -= optind;
+ argv += optind;
+
+ if (argc != 1) {
+ usage();
+ /* Not reached */
+ }
+
+ iname = argv[0];
+ if (oname == NULL) {
+ asprintf(&oname, "%s%s", iname, DEFAULT_SUFX);
+ if (oname == NULL) {
+ err(1, "can't allocate memory");
+ /* Not reached */
+ }
+ }
+
+ obuf = safe_malloc(hdr.blksz*2);
+ ibuf = safe_malloc(hdr.blksz);
+
+ signal(SIGHUP, exit);
+ signal(SIGINT, exit);
+ signal(SIGTERM, exit);
+ signal(SIGXCPU, exit);
+ signal(SIGXFSZ, exit);
+ atexit(cleanup);
+
+ fdr = open(iname, O_RDONLY);
+ if (fdr < 0) {
+ err(1, "open(%s)", iname);
+ /* Not reached */
+ }
+ if (fstat(fdr, &sb) != 0) {
+ err(1, "fstat(%s)", iname);
+ /* Not reached */
+ }
+ if (S_ISCHR(sb.st_mode)) {
+ off_t ms;
+
+ if (ioctl(fdr, DIOCGMEDIASIZE, &ms) < 0) {
+ err(1, "ioctl(DIOCGMEDIASIZE)");
+ /* Not reached */
+ }
+ sb.st_size = ms;
+ } else if (!S_ISREG(sb.st_mode)) {
+ fprintf(stderr,
+ "%s: not a character device or regular file\n",
+ iname);
+ exit(1);
+ }
+ hdr.nblocks = sb.st_size / hdr.blksz;
+ if ((sb.st_size % hdr.blksz) != 0) {
+ if (verbose != 0)
+ fprintf(stderr, "file size is not multiple "
+ "of %d, padding data\n", hdr.blksz);
+ hdr.nblocks++;
+ }
+ toc = safe_malloc((hdr.nblocks + 1) * sizeof(*toc));
+
+ fdw = open(oname, O_WRONLY | O_TRUNC | O_CREAT,
+ S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
+ if (fdw < 0) {
+ err(1, "open(%s)", oname);
+ /* Not reached */
+ }
+ cleanfile = oname;
+
+ /*
+ * Prepare header that we will write later when we have index ready.
+ */
+ iov[0].iov_base = (char *)&hdr;
+ iov[0].iov_len = sizeof(hdr);
+ iov[1].iov_base = (char *)toc;
+ iov[1].iov_len = (hdr.nblocks + 1) * sizeof(*toc);
+ offset = iov[0].iov_len + iov[1].iov_len;
+
+ /* Reserve space for header */
+ lseek(fdw, offset, SEEK_SET);
+
+ if (verbose != 0)
+ fprintf(stderr, "data size %ju bytes, number of clusters "
+ "%u, index length %zu bytes\n", sb.st_size,
+ hdr.nblocks, iov[1].iov_len);
+
+ /* Init lzma encoder */
+ if (lzma_lzma_preset(&opt_lzma, LZMA_PRESET_DEFAULT))
+ errx(1, "Error loading LZMA preset");
+
+ filters[0].id = LZMA_FILTER_LZMA2;
+ filters[0].options = &opt_lzma;
+ filters[1].id = LZMA_VLI_UNKNOWN;
+
+ for(i = 0; i == 0 || ibuf != NULL; i++) {
+ ibuf = readblock(fdr, ibuf, hdr.blksz);
+ if (ibuf != NULL) {
+ destlen = hdr.blksz*2;
+
+ ret = lzma_stream_encoder(&strm, filters,
+ LZMA_CHECK_CRC32);
+ if (ret != LZMA_OK) {
+ if (ret == LZMA_MEMLIMIT_ERROR)
+ errx(1, "can't compress data: "
+ "LZMA_MEMLIMIT_ERROR");
+
+ errx(1, "can't compress data: "
+ "LZMA compressor ERROR");
+ }
+
+ strm.next_in = ibuf;
+ strm.avail_in = hdr.blksz;
+ strm.next_out = obuf;
+ strm.avail_out = hdr.blksz*2;
+
+ ret = lzma_code(&strm, LZMA_FINISH);
+
+ if (ret != LZMA_STREAM_END) {
+ /* Error */
+ errx(1, "lzma_code FINISH failed, code=%d, "
+ "pos(in=%zd, out=%zd)",
+ ret,
+ (hdr.blksz - strm.avail_in),
+ (hdr.blksz*2 - strm.avail_out));
+ }
+
+ destlen -= strm.avail_out;
+
+ lzma_end(&strm);
+
+ if (verbose != 0)
+ fprintf(stderr, "cluster #%d, in %u bytes, "
+ "out %u bytes\n", i, hdr.blksz, destlen);
+ } else {
+ destlen = USED_BLOCKSIZE - (offset % USED_BLOCKSIZE);
+ memset(obuf, 0, destlen);
+ if (verbose != 0)
+ fprintf(stderr, "padding data with %u bytes"
+ " so that file size is multiple of %d\n",
+ destlen,
+ USED_BLOCKSIZE);
+ }
+ if (write(fdw, obuf, destlen) < 0) {
+ err(1, "write(%s)", oname);
+ /* Not reached */
+ }
+ toc[i] = htobe64(offset);
+ offset += destlen;
+ }
+ close(fdr);
+
+ if (verbose != 0)
+ fprintf(stderr, "compressed data to %ju bytes, saved %lld "
+ "bytes, %.2f%% decrease.\n", offset,
+ (long long)(sb.st_size - offset),
+ 100.0 * (long long)(sb.st_size - offset) /
+ (float)sb.st_size);
+
+ /* Convert to big endian */
+ hdr.blksz = htonl(hdr.blksz);
+ hdr.nblocks = htonl(hdr.nblocks);
+ /* Write headers into pre-allocated space */
+ lseek(fdw, 0, SEEK_SET);
+ if (writev(fdw, iov, 2) < 0) {
+ err(1, "writev(%s)", oname);
+ /* Not reached */
+ }
+ cleanfile = NULL;
+ close(fdw);
+
+ exit(0);
+}
+
+static char *
+readblock(int fd, char *ibuf, u_int32_t clstsize)
+{
+ int numread;
+
+ bzero(ibuf, clstsize);
+ numread = read(fd, ibuf, clstsize);
+ if (numread < 0) {
+ err(1, "read() failed");
+ /* Not reached */
+ }
+ if (numread == 0) {
+ return NULL;
+ }
+ return ibuf;
+}
+
+static void
+usage(void)
+{
+
+ fprintf(stderr, "usage: mkulzma [-v] [-o outfile] [-s cluster_size] "
+ "infile\n");
+ exit(1);
+}
+
+static void *
+safe_malloc(size_t size)
+{
+ void *retval;
+
+ retval = malloc(size);
+ if (retval == NULL) {
+ err(1, "can't allocate memory");
+ /* Not reached */
+ }
+ return retval;
+}
+
+static void
+cleanup(void)
+{
+
+ if (cleanfile != NULL)
+ unlink(cleanfile);
+}
diff --git a/usr.bin/mt/mt.c b/usr.bin/mt/mt.c
index 766ca2f..3fbbdf3 100644
--- a/usr.bin/mt/mt.c
+++ b/usr.bin/mt/mt.c
@@ -75,7 +75,7 @@ __FBSDID("$FreeBSD$");
static const struct commands {
const char *c_name;
- int c_code;
+ unsigned long c_code;
int c_ronly;
int c_flags;
} com[] = {
diff --git a/usr.bin/ncplist/Makefile b/usr.bin/ncplist/Makefile
index 8e6d189..fdddb6c 100644
--- a/usr.bin/ncplist/Makefile
+++ b/usr.bin/ncplist/Makefile
@@ -1,6 +1,7 @@
# $FreeBSD$
PROG= ncplist
+NO_WCAST_ALIGN=
DPADD= ${LIBNCP} ${LIBIPX}
LDADD= -lncp -lipx
diff --git a/usr.bin/ncplist/ncplist.c b/usr.bin/ncplist/ncplist.c
index 9478718..ae3d22c 100644
--- a/usr.bin/ncplist/ncplist.c
+++ b/usr.bin/ncplist/ncplist.c
@@ -375,7 +375,7 @@ enum listop {
int
main(int argc, char *argv[])
{
- int opt, wdone = 0, nargs = 0, i;
+ int opt, nargs = 0, i;
enum listop what;
char *args[MAX_ARGS];
@@ -438,23 +438,18 @@ main(int argc, char *argv[])
switch(what) {
case LO_SERVERS:
show_serverlist(args[0]);
- wdone = 1;
break;
case LO_USERS:
show_userlist(args[0]);
- wdone = 1;
break;
case LO_QUEUES:
show_queuelist(args[0], args[1]);
- wdone = 1;
break;
case LO_VOLUMES:
list_volumes(args[0]);
- wdone = 1;
break;
case LO_BINDERY:
list_bindery(args[0], args[1], args[2]);
- wdone = 1;
break;
default:
help();
diff --git a/usr.bin/ncplogin/ncplogin.c b/usr.bin/ncplogin/ncplogin.c
index edb903e..e64f63a 100644
--- a/usr.bin/ncplogin/ncplogin.c
+++ b/usr.bin/ncplogin/ncplogin.c
@@ -188,8 +188,8 @@ main(int argc, char *argv[]) {
error = 0;
} while(0);
if (error)
- errx(EX_DATAERR,
- "an error occured while parsing '%s'",
+ errx(EX_DATAERR,
+ "an error occurred while parsing '%s'",
argv[argc - 1]);
}
diff --git a/usr.bin/netstat/Makefile b/usr.bin/netstat/Makefile
index ce5cdab..3f7fe9f 100644
--- a/usr.bin/netstat/Makefile
+++ b/usr.bin/netstat/Makefile
@@ -8,6 +8,11 @@ SRCS= if.c inet.c main.c mbuf.c mroute.c netisr.c route.c \
unix.c atalk.c mroute6.c ipsec.c bpf.c pfkey.c sctp.c
WARNS?= 3
+.if ${CC:T:Mclang} == "clang"
+# XXX: Work around a clang false positive with format string warnings
+# and ntohs macros (see LLVM PR 11313).
+NO_WFORMAT=
+.endif
CFLAGS+=-fno-strict-aliasing
CFLAGS+=-DIPSEC
diff --git a/usr.bin/netstat/if.c b/usr.bin/netstat/if.c
index 8a11270..7629dd4 100644
--- a/usr.bin/netstat/if.c
+++ b/usr.bin/netstat/if.c
@@ -188,7 +188,6 @@ intpr(int interval1, u_long ifnetaddr, void (*pfunc)(char *))
} ifaddr;
u_long ifaddraddr;
u_long ifaddrfound;
- u_long ifnetfound;
u_long opackets;
u_long ipackets;
u_long obytes;
@@ -249,14 +248,13 @@ intpr(int interval1, u_long ifnetaddr, void (*pfunc)(char *))
link_layer = 0;
if (ifaddraddr == 0) {
- ifnetfound = ifnetaddr;
if (kread(ifnetaddr, (char *)&ifnet, sizeof ifnet) != 0)
return;
strlcpy(name, ifnet.if_xname, sizeof(name));
ifnetaddr = (u_long)TAILQ_NEXT(&ifnet, if_link);
if (interface != 0 && strcmp(name, interface) != 0)
continue;
- cp = index(name, '\0');
+ cp = strchr(name, '\0');
if (pfunc) {
(*pfunc)(name);
diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c
index 1653018..7309951 100644
--- a/usr.bin/netstat/inet.c
+++ b/usr.bin/netstat/inet.c
@@ -1247,7 +1247,7 @@ inetprint(struct in_addr *in, int port, const char *proto, int num_port)
sprintf(line, "%s.", inetname(in));
else
sprintf(line, "%.*s.", (Aflag && !num_port) ? 12 : 16, inetname(in));
- cp = index(line, '\0');
+ cp = strchr(line, '\0');
if (!num_port && port)
sp = getservbyport((int)port, proto);
if (sp || port == 0)
diff --git a/usr.bin/netstat/inet6.c b/usr.bin/netstat/inet6.c
index 411b0ca..1a19fa5 100644
--- a/usr.bin/netstat/inet6.c
+++ b/usr.bin/netstat/inet6.c
@@ -360,15 +360,17 @@ static char *srcrule_str[] = {
void
ip6_stats(u_long off, const char *name, int af1 __unused, int proto __unused)
{
- struct ip6stat ip6stat;
+ struct ip6stat ip6stat, zerostat;
int first, i;
size_t len;
len = sizeof ip6stat;
if (live) {
memset(&ip6stat, 0, len);
- if (sysctlbyname("net.inet6.ip6.stats", &ip6stat, &len, NULL,
- 0) < 0) {
+ if (zflag)
+ memset(&zerostat, 0, len);
+ if (sysctlbyname("net.inet6.ip6.stats", &ip6stat, &len,
+ zflag ? &zerostat : NULL, zflag ? len : 0) < 0) {
if (errno != ENOENT)
warn("sysctl: net.inet6.ip6.stats");
return;
@@ -840,15 +842,17 @@ static const char *icmp6names[] = {
void
icmp6_stats(u_long off, const char *name, int af1 __unused, int proto __unused)
{
- struct icmp6stat icmp6stat;
+ struct icmp6stat icmp6stat, zerostat;
int i, first;
size_t len;
len = sizeof icmp6stat;
if (live) {
memset(&icmp6stat, 0, len);
+ if (zflag)
+ memset(&zerostat, 0, len);
if (sysctlbyname("net.inet6.icmp6.stats", &icmp6stat, &len,
- NULL, 0) < 0) {
+ zflag ? &zerostat : NULL, zflag ? len : 0) < 0) {
if (errno != ENOENT)
warn("sysctl: net.inet6.icmp6.stats");
return;
@@ -1033,14 +1037,16 @@ pim6_stats(u_long off, const char *name, int af1 __unused, int proto __unused)
void
rip6_stats(u_long off, const char *name, int af1 __unused, int proto __unused)
{
- struct rip6stat rip6stat;
+ struct rip6stat rip6stat, zerostat;
u_quad_t delivered;
size_t len;
len = sizeof(rip6stat);
if (live) {
+ if (zflag)
+ memset(&zerostat, 0, len);
if (sysctlbyname("net.inet6.ip6.rip6stats", &rip6stat, &len,
- NULL, 0) < 0) {
+ zflag ? &zerostat : NULL, zflag ? len : 0) < 0) {
if (errno != ENOENT)
warn("sysctl: net.inet6.ip6.rip6stats");
return;
@@ -1094,7 +1100,7 @@ inet6print(struct in6_addr *in6, int port, const char *proto, int numeric)
sprintf(line, "%.*s.", Wflag ? 39 :
(Aflag && !numeric) ? 12 : 16, inet6name(in6));
- cp = index(line, '\0');
+ cp = strchr(line, '\0');
if (!numeric && port)
GETSERVBYPORT6(port, proto, sp);
if (sp || port == 0)
@@ -1123,7 +1129,7 @@ inet6name(struct in6_addr *in6p)
if (first && !numeric_addr) {
first = 0;
if (gethostname(domain, MAXHOSTNAMELEN) == 0 &&
- (cp = index(domain, '.')))
+ (cp = strchr(domain, '.')))
(void) strcpy(domain, cp + 1);
else
domain[0] = 0;
@@ -1132,7 +1138,7 @@ inet6name(struct in6_addr *in6p)
if (!numeric_addr && !IN6_IS_ADDR_UNSPECIFIED(in6p)) {
hp = gethostbyaddr((char *)in6p, sizeof(*in6p), AF_INET6);
if (hp) {
- if ((cp = index(hp->h_name, '.')) &&
+ if ((cp = strchr(hp->h_name, '.')) &&
!strcmp(cp + 1, domain))
*cp = 0;
cp = hp->h_name;
diff --git a/usr.bin/netstat/ipx.c b/usr.bin/netstat/ipx.c
index b79a93b..aa3dd40 100644
--- a/usr.bin/netstat/ipx.c
+++ b/usr.bin/netstat/ipx.c
@@ -201,7 +201,7 @@ spx_stats(u_long off, const char *name, int af1 __unused, int proto __unused)
ANYl(spxstat.spxs_sndurg, "packet", " sent with URG only");
ANYl(spxstat.spxs_sndwinup, "window update-only packet", " sent");
ANYl(spxstat.spxs_sndctrl, "control (SYN|FIN|RST) packet", " sent");
- ANYl(spxstat.spxs_sndvoid, "request", " to send a non-existant packet");
+ ANYl(spxstat.spxs_sndvoid, "request", " to send a non-existent packet");
ANYl(spxstat.spxs_rcvtotal, "total packet", " received");
ANYl(spxstat.spxs_rcvpack, "packet", " received in sequence");
ANYl(spxstat.spxs_rcvbyte, "byte", " received in sequence");
diff --git a/usr.bin/netstat/netgraph.c b/usr.bin/netstat/netgraph.c
index d510414..3427dd3 100644
--- a/usr.bin/netstat/netgraph.c
+++ b/usr.bin/netstat/netgraph.c
@@ -67,7 +67,6 @@ netgraphprotopr(u_long off, const char *name, int af1 __unused,
{
struct ngpcb *this, *next;
struct ngpcb ngpcb;
- struct ngsock info;
struct socket sockb;
int debug = 1;
@@ -165,15 +164,10 @@ netgraphprotopr(u_long off, const char *name, int af1 __unused,
printf("%-5.5s %6u %6u ",
name, sockb.so_rcv.sb_cc, sockb.so_snd.sb_cc);
- /* Get ngsock structure */
- if (ngpcb.sockdata == NULL) /* unconnected data socket */
- goto finish;
- kread((u_long)ngpcb.sockdata, (char *)&info, sizeof(info));
-
/* Get info on associated node */
- if (info.node_id == 0 || csock == -1)
+ if (ngpcb.node_id == 0 || csock == -1)
goto finish;
- snprintf(path, sizeof(path), "[%x]:", info.node_id);
+ snprintf(path, sizeof(path), "[%x]:", ngpcb.node_id);
if (NgSendMsg(csock, path,
NGM_GENERIC_COOKIE, NGM_NODEINFO, NULL, 0) < 0)
goto finish;
diff --git a/usr.bin/netstat/sctp.c b/usr.bin/netstat/sctp.c
index d5ad70e..3f13b71 100644
--- a/usr.bin/netstat/sctp.c
+++ b/usr.bin/netstat/sctp.c
@@ -162,7 +162,7 @@ inet6name(struct in6_addr *in6p)
if (first && !numeric_addr) {
first = 0;
if (gethostname(domain, MAXHOSTNAMELEN) == 0 &&
- (cp = index(domain, '.')))
+ (cp = strchr(domain, '.')))
(void) strcpy(domain, cp + 1);
else
domain[0] = 0;
@@ -171,7 +171,7 @@ inet6name(struct in6_addr *in6p)
if (!numeric_addr && !IN6_IS_ADDR_UNSPECIFIED(in6p)) {
hp = gethostbyaddr((char *)in6p, sizeof(*in6p), AF_INET6);
if (hp) {
- if ((cp = index(hp->h_name, '.')) &&
+ if ((cp = strchr(hp->h_name, '.')) &&
!strcmp(cp + 1, domain))
*cp = 0;
cp = hp->h_name;
@@ -209,7 +209,7 @@ sctp_print_address(union sctp_sockstore *address, int port, int num_port)
sprintf(line, "%.*s.", Wflag ? 39 : 16, "");
break;
}
- cp = index(line, '\0');
+ cp = strchr(line, '\0');
if (!num_port && port)
sp = getservbyport((int)port, "sctp");
if (sp || port == 0)
@@ -611,7 +611,8 @@ sctp_stats(u_long off, const char *name, int af1 __unused, int proto __unused)
memset(&zerostat, 0, len);
if (sysctlbyname("net.inet.sctp.stats", &sctpstat, &len,
zflag ? &zerostat : NULL, zflag ? len : 0) < 0) {
- warn("sysctl: net.inet.sctp.stats");
+ if (errno != ENOENT)
+ warn("sysctl: net.inet.sctp.stats");
return;
}
} else
diff --git a/usr.bin/newgrp/newgrp.c b/usr.bin/newgrp/newgrp.c
index 5381b15..751e8be 100644
--- a/usr.bin/newgrp/newgrp.c
+++ b/usr.bin/newgrp/newgrp.c
@@ -190,7 +190,7 @@ addgroup(const char *grpname)
err(1, "malloc");
if ((ngrps = getgroups(ngrps_max, (gid_t *)grps)) < 0) {
warn("getgroups");
- return;
+ goto end;
}
/* Remove requested gid from supp. list if it exists. */
@@ -204,7 +204,7 @@ addgroup(const char *grpname)
if (setgroups(ngrps, (const gid_t *)grps) < 0) {
PRIV_END;
warn("setgroups");
- return;
+ goto end;
}
PRIV_END;
}
@@ -213,7 +213,7 @@ addgroup(const char *grpname)
if (setgid(grp->gr_gid)) {
PRIV_END;
warn("setgid");
- return;
+ goto end;
}
PRIV_END;
grps[0] = grp->gr_gid;
@@ -228,12 +228,12 @@ addgroup(const char *grpname)
if (setgroups(ngrps, (const gid_t *)grps)) {
PRIV_END;
warn("setgroups");
- return;
+ goto end;
}
PRIV_END;
}
}
-
+end:
free(grps);
}
diff --git a/usr.bin/pr/pr.c b/usr.bin/pr/pr.c
index 510f9e8..947d768 100644
--- a/usr.bin/pr/pr.c
+++ b/usr.bin/pr/pr.c
@@ -822,7 +822,7 @@ mulfile(int argc, char *argv[])
* do not know how many columns yet. The number of operands provide an
* upper bound on the number of columns. We use the number of files
* we can open successfully to set the number of columns. The operation
- * of the merge operation (-m) in relation to unsuccesful file opens
+ * of the merge operation (-m) in relation to unsuccessful file opens
* is unspecified by posix.
*/
j = 0;
@@ -841,7 +841,7 @@ mulfile(int argc, char *argv[])
return(1);
/*
- * calculate page boundries based on open file count
+ * calculate page boundaries based on open file count
*/
clcnt = j;
if (nmwd) {
@@ -987,7 +987,7 @@ mulfile(int argc, char *argv[])
* inf: file
* buf: buffer
* lim: buffer length
- * cps: column positon 1st char in buffer (large line support)
+ * cps: column position 1st char in buffer (large line support)
* trnc: throw away data more than lim up to \n
* mor: set if more data in line (not truncated)
*/
diff --git a/usr.bin/printf/printf.c b/usr.bin/printf/printf.c
index eace370..89149dcda 100644
--- a/usr.bin/printf/printf.c
+++ b/usr.bin/printf/printf.c
@@ -66,21 +66,21 @@ static const char rcsid[] =
#include "error.h"
#endif
-#define PF(f, func) do { \
- char *b = NULL; \
- if (havewidth) \
- if (haveprec) \
+#define PF(f, func) do { \
+ char *b = NULL; \
+ if (havewidth) \
+ if (haveprec) \
(void)asprintf(&b, f, fieldwidth, precision, func); \
- else \
- (void)asprintf(&b, f, fieldwidth, func); \
- else if (haveprec) \
- (void)asprintf(&b, f, precision, func); \
- else \
- (void)asprintf(&b, f, func); \
- if (b) { \
- (void)fputs(b, stdout); \
- free(b); \
- } \
+ else \
+ (void)asprintf(&b, f, fieldwidth, func); \
+ else if (haveprec) \
+ (void)asprintf(&b, f, precision, func); \
+ else \
+ (void)asprintf(&b, f, func); \
+ if (b) { \
+ (void)fputs(b, stdout); \
+ free(b); \
+ } \
} while (0)
static int asciicode(void);
@@ -357,10 +357,10 @@ mknum(char *str, char ch)
static int
escape(char *fmt, int percent, size_t *len)
{
- char *save, *store;
- int value, c;
+ char *save, *store, c;
+ int value;
- for (save = store = fmt; (c = *fmt); ++fmt, ++store) {
+ for (save = store = fmt; ((c = *fmt) != 0); ++fmt, ++store) {
if (c != '\\') {
*store = c;
continue;
@@ -414,7 +414,7 @@ escape(char *fmt, int percent, size_t *len)
*store++ = '%';
*store = '%';
} else
- *store = value;
+ *store = (char)value;
break;
default:
*store = *fmt;
diff --git a/usr.bin/procstat/procstat_auxv.c b/usr.bin/procstat/procstat_auxv.c
index 543738c..73a85cd 100644
--- a/usr.bin/procstat/procstat_auxv.c
+++ b/usr.bin/procstat/procstat_auxv.c
@@ -43,39 +43,110 @@
#include "procstat.h"
-static Elf_Auxinfo auxv[256];
+#define PROC_AUXV_MAX 256
+
+static Elf_Auxinfo auxv[PROC_AUXV_MAX];
static char prefix[256];
+#if __ELF_WORD_SIZE == 64
+static Elf32_Auxinfo auxv32[PROC_AUXV_MAX];
+
+static const char *elf32_sv_names[] = {
+ "Linux ELF32",
+ "FreeBSD ELF32",
+};
+
+static int
+is_elf32(pid_t pid)
+{
+ int error, name[4];
+ size_t len, i;
+ static char sv_name[256];
+
+ name[0] = CTL_KERN;
+ name[1] = KERN_PROC;
+ name[2] = KERN_PROC_SV_NAME;
+ name[3] = pid;
+ len = sizeof(sv_name);
+ error = sysctl(name, 4, sv_name, &len, NULL, 0);
+ if (error != 0 || len == 0)
+ return (0);
+ for (i = 0; i < sizeof(elf32_sv_names) / sizeof(*elf32_sv_names); i++) {
+ if (strncmp(sv_name, elf32_sv_names[i], sizeof(sv_name)) == 0)
+ return (1);
+ }
+ return (0);
+}
+
+static size_t
+retrieve_auxv32(pid_t pid)
+{
+ int error, name[4];
+ size_t len, i;
+ void *ptr;
+
+ name[0] = CTL_KERN;
+ name[1] = KERN_PROC;
+ name[2] = KERN_PROC_AUXV;
+ name[3] = pid;
+ len = sizeof(auxv32);
+ error = sysctl(name, 4, auxv32, &len, NULL, 0);
+ if (error < 0 && errno != ESRCH && errno != EPERM) {
+ warn("sysctl: kern.proc.auxv: %d: %d", pid, errno);
+ return (0);
+ }
+ for (i = 0; i < len; i++) {
+ /*
+ * XXX: We expect that values for a_type on a 32-bit platform
+ * are directly mapped to those on 64-bit one, which is not
+ * necessarily true.
+ */
+ auxv[i].a_type = auxv32[i].a_type;
+ ptr = &auxv32[i].a_un;
+ auxv[i].a_un.a_val = *((uint32_t *)ptr);
+ }
+ return (len);
+}
+#endif /* __ELF_WORD_SIZE == 64 */
+
#define PRINT(name, spec, val) \
printf("%s %-16s " #spec "\n", prefix, #name, (val))
#define PRINT_UNKNOWN(type, val) \
printf("%s %16ld %#lx\n", prefix, (long)type, (u_long)(val))
-void
-procstat_auxv(struct kinfo_proc *kipp)
+static size_t
+retrieve_auxv(pid_t pid)
{
int error, name[4];
- size_t len, i;
-
- if (!hflag)
- printf("%5s %-16s %-16s %-16s\n", "PID", "COMM", "AUXV", "VALUE");
+ size_t len;
+#if __ELF_WORD_SIZE == 64
+ if (is_elf32(pid))
+ return (retrieve_auxv32(pid));
+#endif
name[0] = CTL_KERN;
name[1] = KERN_PROC;
name[2] = KERN_PROC_AUXV;
- name[3] = kipp->ki_pid;
- len = sizeof(auxv) * sizeof(*auxv);
+ name[3] = pid;
+ len = sizeof(auxv);
error = sysctl(name, 4, auxv, &len, NULL, 0);
if (error < 0 && errno != ESRCH && errno != EPERM) {
- warn("sysctl: kern.proc.auxv: %d: %d", kipp->ki_pid, errno);
- return;
+ warn("sysctl: kern.proc.auxv: %d: %d", pid, errno);
+ return (0);
}
- if (error < 0 || len == 0)
- return;
- if (len == 0) {
- printf(" -\n");
+ return (len);
+}
+
+void
+procstat_auxv(struct kinfo_proc *kipp)
+{
+ size_t len, i;
+
+ if (!hflag)
+ printf("%5s %-16s %-16s %-16s\n", "PID", "COMM", "AUXV", "VALUE");
+ len = retrieve_auxv(kipp->ki_pid);
+ if (len == 0)
return;
- }
snprintf(prefix, sizeof(prefix), "%5d %-16s", kipp->ki_pid,
kipp->ki_comm);
for (i = 0; i < len; i++) {
diff --git a/usr.bin/procstat/procstat_rlimit.c b/usr.bin/procstat/procstat_rlimit.c
index 44d8d79..c5429c4 100644
--- a/usr.bin/procstat/procstat_rlimit.c
+++ b/usr.bin/procstat/procstat_rlimit.c
@@ -28,7 +28,6 @@
#include <sys/param.h>
#include <sys/time.h>
-#define _RLIMIT_IDENT
#include <sys/resourcevar.h>
#include <sys/sysctl.h>
#include <sys/user.h>
@@ -36,6 +35,7 @@
#include <err.h>
#include <errno.h>
#include <libprocstat.h>
+#include <libutil.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
@@ -43,36 +43,77 @@
#include "procstat.h"
-static struct rlimit rlimit[RLIM_NLIMITS];
+static struct {
+ const char *name;
+ const char *suffix;
+} rlimit_param[13] = {
+ {"cputime", "sec"},
+ {"filesize", "B "},
+ {"datasize", "B "},
+ {"stacksize", "B "},
+ {"coredumpsize", "B "},
+ {"memoryuse", "B "},
+ {"memorylocked", "B "},
+ {"maxprocesses", " "},
+ {"openfiles", " "},
+ {"sbsize", "B "},
+ {"vmemoryuse", "B "},
+ {"pseudo-terminals", " "},
+ {"swapuse", "B "},
+};
+
+#if RLIM_NLIMITS > 13
+#error "Resource limits have grown. Add new entries to rlimit_param[]."
+#endif
+
+static
+const char *humanize_rlimit(int indx, rlim_t limit)
+{
+ static char buf[14];
+ int scale;
+
+ if (limit == RLIM_INFINITY)
+ return ("infinity ");
+
+ scale = humanize_number(buf, sizeof(buf) - 1, (int64_t)limit,
+ rlimit_param[indx].suffix, HN_AUTOSCALE | HN_GETSCALE, HN_DECIMAL);
+ (void)humanize_number(buf, sizeof(buf) - 1, (int64_t)limit,
+ rlimit_param[indx].suffix, HN_AUTOSCALE, HN_DECIMAL);
+ /* Pad with one space if there is no suffix prefix. */
+ if (scale == 0)
+ sprintf(buf + strlen(buf), " ");
+ return (buf);
+}
void
procstat_rlimit(struct kinfo_proc *kipp)
{
- int error, i, name[4];
+ struct rlimit rlimit;
+ int error, i, name[5];
size_t len;
- if (!hflag)
- printf("%5s %-16s %-10s %12s %12s\n", "PID", "COMM", "RLIMIT",
- "CURRENT", "MAX");
+ if (!hflag) {
+ printf("%5s %-16s %-16s %16s %16s\n",
+ "PID", "COMM", "RLIMIT", "SOFT ", "HARD ");
+ }
+ len = sizeof(struct rlimit);
name[0] = CTL_KERN;
name[1] = KERN_PROC;
name[2] = KERN_PROC_RLIMIT;
name[3] = kipp->ki_pid;
- len = sizeof(rlimit);
- error = sysctl(name, 4, rlimit, &len, NULL, 0);
- if (error < 0 && errno != ESRCH) {
- warn("sysctl: kern.proc.rlimit: %d", kipp->ki_pid);
- return;
- }
- if (error < 0 || len != sizeof(rlimit))
- return;
-
for (i = 0; i < RLIM_NLIMITS; i++) {
- printf("%5d %-16s %-10s %12jd %12jd\n", kipp->ki_pid,
- kipp->ki_comm, rlimit_ident[i],
- rlimit[i].rlim_cur == RLIM_INFINITY ?
- -1 : rlimit[i].rlim_cur,
- rlimit[i].rlim_max == RLIM_INFINITY ?
- -1 : rlimit[i].rlim_max);
- }
+ name[4] = i;
+ error = sysctl(name, 5, &rlimit, &len, NULL, 0);
+ if (error < 0 && errno != ESRCH) {
+ warn("sysctl: kern.proc.rlimit: %d", kipp->ki_pid);
+ return;
+ }
+ if (error < 0 || len != sizeof(struct rlimit))
+ return;
+
+ printf("%5d %-16s %-16s ", kipp->ki_pid, kipp->ki_comm,
+ rlimit_param[i].name);
+ printf("%16s ", humanize_rlimit(i, rlimit.rlim_cur));
+ printf("%16s\n", humanize_rlimit(i, rlimit.rlim_max));
+ }
}
diff --git a/usr.bin/rctl/rctl.8 b/usr.bin/rctl/rctl.8
index f8f8ddb..0b5d648 100644
--- a/usr.bin/rctl/rctl.8
+++ b/usr.bin/rctl/rctl.8
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 14, 2011
+.Dd December 22, 2011
.Dt RCTL 8
.Os
.Sh NAME
@@ -89,8 +89,8 @@ Syntax for a rule is subject:subject-id:resource:action=amount/per.
Subject defines the kind of entity the rule applies to.
It can be either process, user, login class, or jail.
.Pp
-Subject ID identifies the subject. It can be user name,
-numerical user ID, login class name, or jail name.
+Subject ID identifies the subject.
+It can be user name, numerical user ID, login class name, or jail name.
.Pp
Resource identifies the resource the rule controls.
.Pp
@@ -122,35 +122,35 @@ A filter that matches all defined rules for nproc resource would be
.Pp
.Sh RESOURCES
.Bl -column -offset 3n "pseudoterminals"
-.It cputime CPU time, in seconds
-.It datasize data size, in bytes
-.It stacksize stack size, in bytes
-.It coredumpsize core dump size, in bytes
-.It memoryuse resident set size, in bytes
-.It memorylocked locked memory, in bytes
-.It maxproc number of processes
-.It openfiles file descriptor table size
-.It vmemoryuse address space limit, in bytes
-.It pseudoterminals number of PTYs
-.It swapuse swap usage, in bytes
-.It nthr number of threads
-.It msgqqueued number of queued SysV messages
-.It msgqsize SysV message queue size, in bytes
-.It nmsgq number of SysV message queues
-.It nsem number of SysV semaphores
-.It nsemop number of SysV semaphores modified in a single semop(2) call
-.It nshm number of SysV shared memory segments
-.It shmsize SysV shared memory size, in bytes
-.It wallclock wallclock time, in seconds
+.It "cputime CPU time, in seconds"
+.It "datasize data size, in bytes"
+.It "stacksize stack size, in bytes"
+.It "coredumpsize core dump size, in bytes"
+.It "memoryuse resident set size, in bytes"
+.It "memorylocked locked memory, in bytes"
+.It "maxproc number of processes"
+.It "openfiles file descriptor table size"
+.It "vmemoryuse address space limit, in bytes"
+.It "pseudoterminals number of PTYs"
+.It "swapuse swap usage, in bytes"
+.It "nthr number of threads"
+.It "msgqqueued number of queued SysV messages"
+.It "msgqsize SysV message queue size, in bytes"
+.It "nmsgq number of SysV message queues"
+.It "nsem number of SysV semaphores"
+.It "nsemop number of SysV semaphores modified in a single semop(2) call"
+.It "nshm number of SysV shared memory segments"
+.It "shmsize SysV shared memory size, in bytes"
+.It "wallclock wallclock time, in seconds"
.El
.Pp
.Sh ACTIONS
.Bl -column -offset 3n "pseudoterminals"
-.It deny deny the allocation; not supported for cpu and wallclock
-.It log log a warning to the console
-.It devctl send notification to
+.It "deny deny the allocation; not supported for cpu and wallclock"
+.It "log log a warning to the console"
+.It "devctl send notification to"
.Xr devd 8
-.It sig* e.g. sigterm; send a signal to the offending process
+.It "sig* e.g. sigterm; send a signal to the offending process"
.El
.Pp
See
diff --git a/usr.bin/rlogin/rlogin.c b/usr.bin/rlogin/rlogin.c
index 4d1f7b0..b134679 100644
--- a/usr.bin/rlogin/rlogin.c
+++ b/usr.bin/rlogin/rlogin.c
@@ -142,7 +142,7 @@ main(int argc, char *argv[])
one = 1;
host = localname = user = NULL;
- if ((p = rindex(argv[0], '/')))
+ if ((p = strrchr(argv[0], '/')))
++p;
else
p = argv[0];
diff --git a/usr.bin/rpcgen/rpc_main.c b/usr.bin/rpcgen/rpc_main.c
index 00d85b8..c9b2e7a 100644
--- a/usr.bin/rpcgen/rpc_main.c
+++ b/usr.bin/rpcgen/rpc_main.c
@@ -64,10 +64,6 @@ static void clnt_output(const char *, const char *, int, const char * );
static char *generate_guard(const char *);
static void c_initialize(void);
-#if !defined(__FreeBSD__) && !defined(__NetBSD__)
-char * rindex();
-#endif
-
static void usage(void);
static void options_usage(void);
static int do_registers(int, const char **);
@@ -233,7 +229,7 @@ extendfile(const char *path, const char *ext)
const char *p;
const char *file;
- if ((file = rindex(path, '/')) == NULL)
+ if ((file = strrchr(path, '/')) == NULL)
file = path;
else
file++;
@@ -821,7 +817,7 @@ static void mkfile_output(struct commandline *cmd)
if (allfiles){
mkftemp = xmalloc(strlen("makefile.") +
strlen(cmd->infile) + 1);
- temp = (char *)rindex(cmd->infile, '.');
+ temp = strrchr(cmd->infile, '.');
strcpy(mkftemp, "makefile.");
(void) strncat(mkftemp, cmd->infile,
(temp - cmd->infile));
diff --git a/usr.bin/rpcgen/rpc_svcout.c b/usr.bin/rpcgen/rpc_svcout.c
index 122408b..08cf94c 100644
--- a/usr.bin/rpcgen/rpc_svcout.c
+++ b/usr.bin/rpcgen/rpc_svcout.c
@@ -325,7 +325,7 @@ write_programs(const char *storage)
/*
* write out definition of internal function (e.g. _printmsg_1(...))
- * which calls server's defintion of actual function (e.g. printmsg_1(...)).
+ * which calls server's definition of actual function (e.g. printmsg_1(...)).
* Unpacks single user argument of printmsg_1 to call-by-value format
* expected by printmsg_1.
*/
diff --git a/usr.bin/rpcinfo/rpcinfo.c b/usr.bin/rpcinfo/rpcinfo.c
index a9e76d9..ed21cd7 100644
--- a/usr.bin/rpcinfo/rpcinfo.c
+++ b/usr.bin/rpcinfo/rpcinfo.c
@@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$");
*/
/*
- * We are for now defining PORTMAP here. It doesnt even compile
+ * We are for now defining PORTMAP here. It doesn't even compile
* unless it is defined.
*/
#ifndef PORTMAP
diff --git a/usr.bin/sockstat/sockstat.1 b/usr.bin/sockstat/sockstat.1
index 64e163b..f38d9d7 100644
--- a/usr.bin/sockstat/sockstat.1
+++ b/usr.bin/sockstat/sockstat.1
@@ -1,5 +1,5 @@
.\"-
-.\" Copyright (c) 1999 Dag-Erling Coïdan Smørgrav
+.\" Copyright (c) 1999 Dag-Erling Coïdan Smørgrav
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -27,7 +27,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 9, 2009
+.Dd January 24, 2012
.Dt SOCKSTAT 1
.Os
.Sh NAME
@@ -137,19 +137,10 @@ The address the foreign end of the socket is bound to (see
.Xr getpeername 2 ) .
.El
.Pp
-Note that TCP sockets in the
-.Dv AF_INET
-or
-.Dv AF_INET6
-domains that are not in one of the
-.Dv LISTEN , SYN_SENT ,
-or
-.Dv ESTABLISHED
-states may not be shown by
-.Nm ;
-use
-.Xr netstat 1
-to examine them instead.
+If a socket is associated with more than one file descriptor,
+it is shown multiple times.
+If a socket is not associated with any file descriptor,
+the first four columns have no meaning.
.Sh SEE ALSO
.Xr fstat 1 ,
.Xr netstat 1 ,
@@ -167,10 +158,3 @@ The
.Nm
command and this manual page were written by
.An Dag-Erling Sm\(/orgrav Aq des@FreeBSD.org .
-.Sh BUGS
-Unlike
-.Xr netstat 1 ,
-.Nm
-lists sockets by walking file descriptor tables and will not output
-the ones owned by the kernel, e.g. NLM sockets created by
-.Xr rpc.lockd 8 .
diff --git a/usr.bin/sockstat/sockstat.c b/usr.bin/sockstat/sockstat.c
index 2242c4e..dff7761 100644
--- a/usr.bin/sockstat/sockstat.c
+++ b/usr.bin/sockstat/sockstat.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2002 Dag-Erling Coïdan Smørgrav
+ * Copyright (c) 2002 Dag-Erling Coïdan Smørgrav
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -86,6 +86,7 @@ static int *ports;
struct sock {
void *socket;
void *pcb;
+ int shown;
int vflag;
int family;
int proto;
@@ -571,12 +572,67 @@ check_ports(struct sock *s)
}
static void
+displaysock(struct sock *s, int pos)
+{
+ void *p;
+ int hash;
+
+ while (pos < 29)
+ pos += xprintf(" ");
+ pos += xprintf("%s", s->protoname);
+ if (s->vflag & INP_IPV4)
+ pos += xprintf("4 ");
+ if (s->vflag & INP_IPV6)
+ pos += xprintf("6 ");
+ while (pos < 36)
+ pos += xprintf(" ");
+ switch (s->family) {
+ case AF_INET:
+ case AF_INET6:
+ pos += printaddr(s->family, &s->laddr);
+ if (s->family == AF_INET6 && pos >= 58)
+ pos += xprintf(" ");
+ while (pos < 58)
+ pos += xprintf(" ");
+ pos += printaddr(s->family, &s->faddr);
+ break;
+ case AF_UNIX:
+ /* server */
+ if (s->laddr.ss_len > 0) {
+ pos += printaddr(s->family, &s->laddr);
+ break;
+ }
+ /* client */
+ p = *(void **)&s->faddr;
+ if (p == NULL) {
+ pos += xprintf("(not connected)");
+ break;
+ }
+ pos += xprintf("-> ");
+ for (hash = 0; hash < HASHSIZE; ++hash) {
+ for (s = sockhash[hash]; s != NULL; s = s->next)
+ if (s->pcb == p)
+ break;
+ if (s != NULL)
+ break;
+ }
+ if (s == NULL || s->laddr.ss_len == 0)
+ pos += xprintf("??");
+ else
+ pos += printaddr(s->family, &s->laddr);
+ break;
+ default:
+ abort();
+ }
+ xprintf("\n");
+}
+
+static void
display(void)
{
struct passwd *pwd;
struct xfile *xf;
struct sock *s;
- void *p;
int hash, n, pos;
printf("%-8s %-10s %-5s %-2s %-6s %-21s %-21s\n",
@@ -594,6 +650,7 @@ display(void)
continue;
if (!check_ports(s))
continue;
+ s->shown = 1;
pos = 0;
if ((pwd = getpwuid(xf->xf_uid)) == NULL)
pos += xprintf("%lu ", (u_long)xf->xf_uid);
@@ -608,54 +665,19 @@ display(void)
while (pos < 26)
pos += xprintf(" ");
pos += xprintf("%d ", xf->xf_fd);
- while (pos < 29)
- pos += xprintf(" ");
- pos += xprintf("%s", s->protoname);
- if (s->vflag & INP_IPV4)
- pos += xprintf("4 ");
- if (s->vflag & INP_IPV6)
- pos += xprintf("6 ");
- while (pos < 36)
- pos += xprintf(" ");
- switch (s->family) {
- case AF_INET:
- case AF_INET6:
- pos += printaddr(s->family, &s->laddr);
- if (s->family == AF_INET6 && pos >= 58)
- pos += xprintf(" ");
- while (pos < 58)
- pos += xprintf(" ");
- pos += printaddr(s->family, &s->faddr);
- break;
- case AF_UNIX:
- /* server */
- if (s->laddr.ss_len > 0) {
- pos += printaddr(s->family, &s->laddr);
- break;
- }
- /* client */
- p = *(void **)&s->faddr;
- if (p == NULL) {
- pos += xprintf("(not connected)");
- break;
- }
- pos += xprintf("-> ");
- for (hash = 0; hash < HASHSIZE; ++hash) {
- for (s = sockhash[hash]; s != NULL; s = s->next)
- if (s->pcb == p)
- break;
- if (s != NULL)
- break;
- }
- if (s == NULL || s->laddr.ss_len == 0)
- pos += xprintf("??");
- else
- pos += printaddr(s->family, &s->laddr);
- break;
- default:
- abort();
+ displaysock(s, pos);
+ }
+ for (hash = 0; hash < HASHSIZE; hash++) {
+ for (s = sockhash[hash]; s != NULL; s = s->next) {
+ if (s->shown)
+ continue;
+ if (!check_ports(s))
+ continue;
+ pos = 0;
+ pos += xprintf("%-8s %-10s %-5s %-2s ",
+ "?", "?", "?", "?");
+ displaysock(s, pos);
}
- xprintf("\n");
}
}
diff --git a/usr.bin/split/split.c b/usr.bin/split/split.c
index 0258c8c..be4befe 100644
--- a/usr.bin/split/split.c
+++ b/usr.bin/split/split.c
@@ -347,17 +347,14 @@ newfile(void)
{
long i, maxfiles, tfnum;
static long fnum;
- static int defname;
static char *fpnt;
if (ofd == -1) {
if (fname[0] == '\0') {
fname[0] = 'x';
fpnt = fname + 1;
- defname = 1;
} else {
fpnt = fname + strlen(fname);
- defname = 0;
}
ofd = fileno(stdout);
}
diff --git a/usr.bin/systat/devs.c b/usr.bin/systat/devs.c
index 09a1838..3c74fb7 100644
--- a/usr.bin/systat/devs.c
+++ b/usr.bin/systat/devs.c
@@ -265,7 +265,7 @@ dsselect(const char *args, devstat_select_mode select_mode, int maxshowdevs,
specified_devices = (char **)malloc(sizeof(char *));
tmpstr = tmpstr1 = strdup(args);
- cp = index(tmpstr1, '\n');
+ cp = strchr(tmpstr1, '\n');
if (cp)
*cp = '\0';
for (;;) {
diff --git a/usr.bin/systat/icmp6.c b/usr.bin/systat/icmp6.c
index ed46344..366d026 100644
--- a/usr.bin/systat/icmp6.c
+++ b/usr.bin/systat/icmp6.c
@@ -75,7 +75,7 @@ static struct icmp6stat icmp6stat, initstat, oldstat;
12999999999 time-to-live exceeded 999999999 time-to-line exceeded
13999999999 parameter problem 999999999 parameter problem
14999999999 neighbor solicitation 999999999 neighbor solicitation
-15999999999 neighbor advertisment 999999999 neighbor advertisment
+15999999999 neighbor advertisement 999999999 neighbor advertisement
16999999999 router advertisement 999999999 router solicitation
17
18
@@ -121,7 +121,7 @@ labelicmp6(void)
B(12, "time-to-live exceeded");
B(13, "parameter problem");
B(14, "neighbor solicitation");
- B(15, "neighbor advertisment");
+ B(15, "neighbor advertisement");
L(16, "router advertisement"); R(16, "router solicitation");
#undef L
#undef R
diff --git a/usr.bin/systat/netcmds.c b/usr.bin/systat/netcmds.c
index c7f1178..e627329 100644
--- a/usr.bin/systat/netcmds.c
+++ b/usr.bin/systat/netcmds.c
@@ -131,7 +131,7 @@ changeitems(const char *args, int onoff)
struct in_addr in;
tmpstr = tmpstr1 = strdup(args);
- cp = index(tmpstr1, '\n');
+ cp = strchr(tmpstr1, '\n');
if (cp)
*cp = '\0';
for (;;tmpstr1 = cp) {
diff --git a/usr.bin/systat/netstat.c b/usr.bin/systat/netstat.c
index d96fb16..a5e0608 100644
--- a/usr.bin/systat/netstat.c
+++ b/usr.bin/systat/netstat.c
@@ -554,7 +554,7 @@ inetprint(struct sockaddr *sa, const char *proto)
break;
}
snprintf(line, sizeof(line), "%.*s.", 16, inetname(sa));
- cp = index(line, '\0');
+ cp = strchr(line, '\0');
if (!nflag && port)
sp = getservbyport(port, proto);
if (sp || port == 0)
@@ -564,7 +564,7 @@ inetprint(struct sockaddr *sa, const char *proto)
snprintf(cp, sizeof(line) - (cp - line), "%d",
ntohs((u_short)port));
/* pad to full column to clear any garbage */
- cp = index(line, '\0');
+ cp = strchr(line, '\0');
while (cp - line < 22)
*cp++ = ' ';
line[22] = '\0';
diff --git a/usr.bin/talk/ctl_transact.c b/usr.bin/talk/ctl_transact.c
index c803941..81fead6 100644
--- a/usr.bin/talk/ctl_transact.c
+++ b/usr.bin/talk/ctl_transact.c
@@ -46,7 +46,7 @@ static const char sccsid[] = "@(#)ctl_transact.c 8.1 (Berkeley) 6/6/93";
/*
* SOCKDGRAM is unreliable, so we must repeat messages if we have
- * not recieved an acknowledgement within a reasonable amount
+ * not received an acknowledgement within a reasonable amount
* of time
*/
void
diff --git a/usr.bin/talk/get_names.c b/usr.bin/talk/get_names.c
index 965120a..8da8e4a 100644
--- a/usr.bin/talk/get_names.c
+++ b/usr.bin/talk/get_names.c
@@ -80,8 +80,7 @@ get_names(int argc, char *argv[])
gethostname(hostname, sizeof (hostname));
my_machine_name = hostname;
/* check for, and strip out, the machine name of the target */
- for (cp = argv[1]; *cp && !index("@:!", *cp); cp++)
- ;
+ cp = argv[1] + strcspn(argv[1], "@:!");
if (*cp == '\0') {
/* this is a local to local talk */
his_name = argv[1];
diff --git a/usr.bin/talk/invite.c b/usr.bin/talk/invite.c
index 12b69b5..e48302f 100644
--- a/usr.bin/talk/invite.c
+++ b/usr.bin/talk/invite.c
@@ -87,7 +87,7 @@ invite_remote(void)
announce_invite();
/*
* Shut off the automatic messages for a while,
- * so we can use the interupt timer to resend the invitation
+ * so we can use the interrupt timer to resend the invitation
*/
end_msgs();
setitimer(ITIMER_REAL, &itimer, (struct itimerval *)0);
@@ -117,7 +117,7 @@ invite_remote(void)
}
/*
- * Routine called on interupt to re-invite the callee
+ * Routine called on interrupt to re-invite the callee
*/
/* ARGSUSED */
void
diff --git a/usr.bin/tar/COPYING b/usr.bin/tar/COPYING
deleted file mode 100644
index 9a88a80..0000000
--- a/usr.bin/tar/COPYING
+++ /dev/null
@@ -1,62 +0,0 @@
-$FreeBSD$
-
-All of the C source code and documentation in this package is subject
-to the following:
-
-Copyright (c) 2003-2007 Tim Kientzle
-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.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Some of the filename pattern matching code is based on code subject
-to the following license:
-
-/*
- * Copyright (c) 1989, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Guido van Rossum.
- *
- * 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.
- * 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.
- */
diff --git a/usr.bin/tar/Makefile b/usr.bin/tar/Makefile
index 3cd4ec3..7d3abf8 100644
--- a/usr.bin/tar/Makefile
+++ b/usr.bin/tar/Makefile
@@ -1,8 +1,12 @@
# $FreeBSD$
.include <bsd.own.mk>
+LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive
+
PROG= bsdtar
-BSDTAR_VERSION_STRING=2.8.4
+BSDTAR_VERSION_STRING=2.8.5
+
+.PATH: ${LIBARCHIVEDIR}/tar
SRCS= bsdtar.c \
cmdline.c \
getdate.c \
@@ -12,7 +16,7 @@ SRCS= bsdtar.c \
util.c \
write.c
-.PATH: ${.CURDIR}/../../lib/libarchive/libarchive_fe
+.PATH: ${LIBARCHIVEDIR}/libarchive_fe
SRCS+= err.c \
line_reader.c \
matching.c \
@@ -29,15 +33,18 @@ LDADD+= -lmd
.endif
CFLAGS+= -DBSDTAR_VERSION_STRING=\"${BSDTAR_VERSION_STRING}\"
-CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\"
-CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../../lib/libarchive
-CFLAGS+= -I${.CURDIR}/../../lib/libarchive/libarchive_fe
+CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/config_freebsd.h\"
+CFLAGS+= -I${LIBARCHIVEDIR}/tar -I${LIBARCHIVEDIR}/libarchive
+CFLAGS+= -I${LIBARCHIVEDIR}/libarchive_fe
SYMLINKS= bsdtar ${BINDIR}/tar
MLINKS= bsdtar.1 tar.1
DEBUG_FLAGS=-g
-.PHONY: check test
+.PHONY: check test clean-test
check test: $(PROG) bsdtar.1.gz
- cd ${.CURDIR}/test && make test
+ cd ${.CURDIR}/test && make obj && make test
+
+clean-test:
+ cd ${.CURDIR}/test && make clean
.include <bsd.prog.mk>
diff --git a/usr.bin/tar/bsdtar.c b/usr.bin/tar/bsdtar.c
deleted file mode 100644
index 1f250b6..0000000
--- a/usr.bin/tar/bsdtar.c
+++ /dev/null
@@ -1,756 +0,0 @@
-/*-
- * Copyright (c) 2003-2008 Tim Kientzle
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "bsdtar_platform.h"
-__FBSDID("$FreeBSD$");
-
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#ifdef HAVE_LANGINFO_H
-#include <langinfo.h>
-#endif
-#ifdef HAVE_LOCALE_H
-#include <locale.h>
-#endif
-#ifdef HAVE_PATHS_H
-#include <paths.h>
-#endif
-#ifdef HAVE_SIGNAL_H
-#include <signal.h>
-#endif
-#include <stdio.h>
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-#ifdef HAVE_TIME_H
-#include <time.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#if HAVE_ZLIB_H
-#include <zlib.h>
-#endif
-
-#include "bsdtar.h"
-#include "err.h"
-
-/*
- * Per POSIX.1-1988, tar defaults to reading/writing archives to/from
- * the default tape device for the system. Pick something reasonable here.
- */
-#ifdef __linux
-#define _PATH_DEFTAPE "/dev/st0"
-#endif
-#if defined(_WIN32) && !defined(__CYGWIN__)
-#define _PATH_DEFTAPE "\\\\.\\tape0"
-#endif
-
-#ifndef _PATH_DEFTAPE
-#define _PATH_DEFTAPE "/dev/tape"
-#endif
-
-#ifdef __MINGW32__
-int _CRT_glob = 0; /* Disable broken CRT globbing. */
-#endif
-
-static struct bsdtar *_bsdtar;
-
-#if defined(HAVE_SIGACTION) && (defined(SIGINFO) || defined(SIGUSR1))
-static volatile int siginfo_occurred;
-
-static void
-siginfo_handler(int sig)
-{
- (void)sig; /* UNUSED */
- siginfo_occurred = 1;
-}
-
-int
-need_report(void)
-{
- int r = siginfo_occurred;
- siginfo_occurred = 0;
- return (r);
-}
-#else
-int
-need_report(void)
-{
- return (0);
-}
-#endif
-
-/* External function to parse a date/time string */
-time_t get_date(time_t, const char *);
-
-static void long_help(void);
-static void only_mode(struct bsdtar *, const char *opt,
- const char *valid);
-static void set_mode(struct bsdtar *, char opt);
-static void version(void);
-
-/* A basic set of security flags to request from libarchive. */
-#define SECURITY \
- (ARCHIVE_EXTRACT_SECURE_SYMLINKS \
- | ARCHIVE_EXTRACT_SECURE_NODOTDOT)
-
-int
-main(int argc, char **argv)
-{
- struct bsdtar *bsdtar, bsdtar_storage;
- int opt, t;
- char option_o;
- char possible_help_request;
- char buff[16];
- time_t now;
-
- /*
- * Use a pointer for consistency, but stack-allocated storage
- * for ease of cleanup.
- */
- _bsdtar = bsdtar = &bsdtar_storage;
- memset(bsdtar, 0, sizeof(*bsdtar));
- bsdtar->fd = -1; /* Mark as "unused" */
- bsdtar->gid = -1;
- bsdtar->uid = -1;
- option_o = 0;
-
-#if defined(HAVE_SIGACTION) && (defined(SIGINFO) || defined(SIGUSR1))
- { /* Catch SIGINFO and SIGUSR1, if they exist. */
- struct sigaction sa;
- sa.sa_handler = siginfo_handler;
- sigemptyset(&sa.sa_mask);
- sa.sa_flags = 0;
-#ifdef SIGINFO
- if (sigaction(SIGINFO, &sa, NULL))
- lafe_errc(1, errno, "sigaction(SIGINFO) failed");
-#endif
-#ifdef SIGUSR1
- /* ... and treat SIGUSR1 the same way as SIGINFO. */
- if (sigaction(SIGUSR1, &sa, NULL))
- lafe_errc(1, errno, "sigaction(SIGUSR1) failed");
-#endif
- }
-#endif
-
- /* Need lafe_progname before calling lafe_warnc. */
- if (*argv == NULL)
- lafe_progname = "bsdtar";
- else {
-#if defined(_WIN32) && !defined(__CYGWIN__)
- lafe_progname = strrchr(*argv, '\\');
-#else
- lafe_progname = strrchr(*argv, '/');
-#endif
- if (lafe_progname != NULL)
- lafe_progname++;
- else
- lafe_progname = *argv;
- }
-
- time(&now);
-
-#if HAVE_SETLOCALE
- if (setlocale(LC_ALL, "") == NULL)
- lafe_warnc(0, "Failed to set default locale");
-#endif
-#if defined(HAVE_NL_LANGINFO) && defined(HAVE_D_MD_ORDER)
- bsdtar->day_first = (*nl_langinfo(D_MD_ORDER) == 'd');
-#endif
- possible_help_request = 0;
-
- /* Look up uid of current user for future reference */
- bsdtar->user_uid = geteuid();
-
- /* Default: open tape drive. */
- bsdtar->filename = getenv("TAPE");
- if (bsdtar->filename == NULL)
- bsdtar->filename = _PATH_DEFTAPE;
-
- /* Default: preserve mod time on extract */
- bsdtar->extract_flags = ARCHIVE_EXTRACT_TIME;
-
- /* Default: Perform basic security checks. */
- bsdtar->extract_flags |= SECURITY;
-
-#ifndef _WIN32
- /* On POSIX systems, assume --same-owner and -p when run by
- * the root user. This doesn't make any sense on Windows. */
- if (bsdtar->user_uid == 0) {
- /* --same-owner */
- bsdtar->extract_flags |= ARCHIVE_EXTRACT_OWNER;
- /* -p */
- bsdtar->extract_flags |= ARCHIVE_EXTRACT_PERM;
- bsdtar->extract_flags |= ARCHIVE_EXTRACT_ACL;
- bsdtar->extract_flags |= ARCHIVE_EXTRACT_XATTR;
- bsdtar->extract_flags |= ARCHIVE_EXTRACT_FFLAGS;
- }
-#endif
-
- bsdtar->argv = argv;
- bsdtar->argc = argc;
-
- /*
- * Comments following each option indicate where that option
- * originated: SUSv2, POSIX, GNU tar, star, etc. If there's
- * no such comment, then I don't know of anyone else who
- * implements that option.
- */
- while ((opt = bsdtar_getopt(bsdtar)) != -1) {
- switch (opt) {
- case 'B': /* GNU tar */
- /* libarchive doesn't need this; just ignore it. */
- break;
- case 'b': /* SUSv2 */
- t = atoi(bsdtar->optarg);
- if (t <= 0 || t > 8192)
- lafe_errc(1, 0,
- "Argument to -b is out of range (1..8192)");
- bsdtar->bytes_per_block = 512 * t;
- break;
- case 'C': /* GNU tar */
- set_chdir(bsdtar, bsdtar->optarg);
- break;
- case 'c': /* SUSv2 */
- set_mode(bsdtar, opt);
- break;
- case OPTION_CHECK_LINKS: /* GNU tar */
- bsdtar->option_warn_links = 1;
- break;
- case OPTION_CHROOT: /* NetBSD */
- bsdtar->option_chroot = 1;
- break;
- case OPTION_EXCLUDE: /* GNU tar */
- if (lafe_exclude(&bsdtar->matching, bsdtar->optarg))
- lafe_errc(1, 0,
- "Couldn't exclude %s\n", bsdtar->optarg);
- break;
- case OPTION_FORMAT: /* GNU tar, others */
- bsdtar->create_format = bsdtar->optarg;
- break;
- case 'f': /* SUSv2 */
- bsdtar->filename = bsdtar->optarg;
- if (strcmp(bsdtar->filename, "-") == 0)
- bsdtar->filename = NULL;
- break;
- case OPTION_GID: /* cpio */
- t = atoi(bsdtar->optarg);
- if (t < 0)
- lafe_errc(1, 0,
- "Argument to --gid must be positive");
- bsdtar->gid = t;
- break;
- case OPTION_GNAME: /* cpio */
- bsdtar->gname = bsdtar->optarg;
- break;
- case 'H': /* BSD convention */
- bsdtar->symlink_mode = 'H';
- break;
- case 'h': /* Linux Standards Base, gtar; synonym for -L */
- bsdtar->symlink_mode = 'L';
- /* Hack: -h by itself is the "help" command. */
- possible_help_request = 1;
- break;
- case OPTION_HELP: /* GNU tar, others */
- long_help();
- exit(0);
- break;
- case 'I': /* GNU tar */
- /*
- * TODO: Allow 'names' to come from an archive,
- * not just a text file. Design a good UI for
- * allowing names and mode/owner to be read
- * from an archive, with contents coming from
- * disk. This can be used to "refresh" an
- * archive or to design archives with special
- * permissions without having to create those
- * permissions on disk.
- */
- bsdtar->names_from_file = bsdtar->optarg;
- break;
- case OPTION_INCLUDE:
- /*
- * Noone else has the @archive extension, so
- * noone else needs this to filter entries
- * when transforming archives.
- */
- if (lafe_include(&bsdtar->matching, bsdtar->optarg))
- lafe_errc(1, 0,
- "Failed to add %s to inclusion list",
- bsdtar->optarg);
- break;
- case 'j': /* GNU tar */
- if (bsdtar->create_compression != '\0')
- lafe_errc(1, 0,
- "Can't specify both -%c and -%c", opt,
- bsdtar->create_compression);
- bsdtar->create_compression = opt;
- break;
- case 'J': /* GNU tar 1.21 and later */
- if (bsdtar->create_compression != '\0')
- lafe_errc(1, 0,
- "Can't specify both -%c and -%c", opt,
- bsdtar->create_compression);
- bsdtar->create_compression = opt;
- break;
- case 'k': /* GNU tar */
- bsdtar->extract_flags |= ARCHIVE_EXTRACT_NO_OVERWRITE;
- break;
- case OPTION_KEEP_NEWER_FILES: /* GNU tar */
- bsdtar->extract_flags |= ARCHIVE_EXTRACT_NO_OVERWRITE_NEWER;
- break;
- case 'L': /* BSD convention */
- bsdtar->symlink_mode = 'L';
- break;
- case 'l': /* SUSv2 and GNU tar beginning with 1.16 */
- /* GNU tar 1.13 used -l for --one-file-system */
- bsdtar->option_warn_links = 1;
- break;
- case OPTION_LZMA:
- if (bsdtar->create_compression != '\0')
- lafe_errc(1, 0,
- "Can't specify both -%c and -%c", opt,
- bsdtar->create_compression);
- bsdtar->create_compression = opt;
- break;
- case 'm': /* SUSv2 */
- bsdtar->extract_flags &= ~ARCHIVE_EXTRACT_TIME;
- break;
- case 'n': /* GNU tar */
- bsdtar->option_no_subdirs = 1;
- break;
- /*
- * Selecting files by time:
- * --newer-?time='date' Only files newer than 'date'
- * --newer-?time-than='file' Only files newer than time
- * on specified file (useful for incremental backups)
- * TODO: Add corresponding "older" options to reverse these.
- */
- case OPTION_NEWER_CTIME: /* GNU tar */
- bsdtar->newer_ctime_sec = get_date(now, bsdtar->optarg);
- break;
- case OPTION_NEWER_CTIME_THAN:
- {
- struct stat st;
- if (stat(bsdtar->optarg, &st) != 0)
- lafe_errc(1, 0,
- "Can't open file %s", bsdtar->optarg);
- bsdtar->newer_ctime_sec = st.st_ctime;
- bsdtar->newer_ctime_nsec =
- ARCHIVE_STAT_CTIME_NANOS(&st);
- }
- break;
- case OPTION_NEWER_MTIME: /* GNU tar */
- bsdtar->newer_mtime_sec = get_date(now, bsdtar->optarg);
- break;
- case OPTION_NEWER_MTIME_THAN:
- {
- struct stat st;
- if (stat(bsdtar->optarg, &st) != 0)
- lafe_errc(1, 0,
- "Can't open file %s", bsdtar->optarg);
- bsdtar->newer_mtime_sec = st.st_mtime;
- bsdtar->newer_mtime_nsec =
- ARCHIVE_STAT_MTIME_NANOS(&st);
- }
- break;
- case OPTION_NODUMP: /* star */
- bsdtar->option_honor_nodump = 1;
- break;
- case OPTION_NO_SAME_OWNER: /* GNU tar */
- bsdtar->extract_flags &= ~ARCHIVE_EXTRACT_OWNER;
- break;
- case OPTION_NO_SAME_PERMISSIONS: /* GNU tar */
- bsdtar->extract_flags &= ~ARCHIVE_EXTRACT_PERM;
- bsdtar->extract_flags &= ~ARCHIVE_EXTRACT_ACL;
- bsdtar->extract_flags &= ~ARCHIVE_EXTRACT_XATTR;
- bsdtar->extract_flags &= ~ARCHIVE_EXTRACT_FFLAGS;
- break;
- case OPTION_NULL: /* GNU tar */
- bsdtar->option_null++;
- break;
- case OPTION_NUMERIC_OWNER: /* GNU tar */
- bsdtar->uname = "";
- bsdtar->gname = "";
- break;
- case 'O': /* GNU tar */
- bsdtar->option_stdout = 1;
- break;
- case 'o': /* SUSv2 and GNU conflict here, but not fatally */
- option_o = 1; /* Record it and resolve it later. */
- break;
- case OPTION_ONE_FILE_SYSTEM: /* GNU tar */
- bsdtar->option_dont_traverse_mounts = 1;
- break;
- case OPTION_OPTIONS:
- bsdtar->option_options = bsdtar->optarg;
- break;
-#if 0
- /*
- * The common BSD -P option is not necessary, since
- * our default is to archive symlinks, not follow
- * them. This is convenient, as -P conflicts with GNU
- * tar anyway.
- */
- case 'P': /* BSD convention */
- /* Default behavior, no option necessary. */
- break;
-#endif
- case 'P': /* GNU tar */
- bsdtar->extract_flags &= ~SECURITY;
- bsdtar->option_absolute_paths = 1;
- break;
- case 'p': /* GNU tar, star */
- bsdtar->extract_flags |= ARCHIVE_EXTRACT_PERM;
- bsdtar->extract_flags |= ARCHIVE_EXTRACT_ACL;
- bsdtar->extract_flags |= ARCHIVE_EXTRACT_XATTR;
- bsdtar->extract_flags |= ARCHIVE_EXTRACT_FFLAGS;
- break;
- case OPTION_POSIX: /* GNU tar */
- bsdtar->create_format = "pax";
- break;
- case 'q': /* FreeBSD GNU tar --fast-read, NetBSD -q */
- bsdtar->option_fast_read = 1;
- break;
- case 'r': /* SUSv2 */
- set_mode(bsdtar, opt);
- break;
- case 'S': /* NetBSD pax-as-tar */
- bsdtar->extract_flags |= ARCHIVE_EXTRACT_SPARSE;
- break;
- case 's': /* NetBSD pax-as-tar */
-#if HAVE_REGEX_H
- add_substitution(bsdtar, bsdtar->optarg);
-#else
- lafe_warnc(0,
- "-s is not supported by this version of bsdtar");
- usage();
-#endif
- break;
- case OPTION_SAME_OWNER: /* GNU tar */
- bsdtar->extract_flags |= ARCHIVE_EXTRACT_OWNER;
- break;
- case OPTION_STRIP_COMPONENTS: /* GNU tar 1.15 */
- bsdtar->strip_components = atoi(bsdtar->optarg);
- break;
- case 'T': /* GNU tar */
- bsdtar->names_from_file = bsdtar->optarg;
- break;
- case 't': /* SUSv2 */
- set_mode(bsdtar, opt);
- bsdtar->verbose++;
- break;
- case OPTION_TOTALS: /* GNU tar */
- bsdtar->option_totals++;
- break;
- case 'U': /* GNU tar */
- bsdtar->extract_flags |= ARCHIVE_EXTRACT_UNLINK;
- bsdtar->option_unlink_first = 1;
- break;
- case 'u': /* SUSv2 */
- set_mode(bsdtar, opt);
- break;
- case OPTION_UID: /* cpio */
- t = atoi(bsdtar->optarg);
- if (t < 0)
- lafe_errc(1, 0,
- "Argument to --uid must be positive");
- bsdtar->uid = t;
- break;
- case OPTION_UNAME: /* cpio */
- bsdtar->uname = bsdtar->optarg;
- break;
- case 'v': /* SUSv2 */
- bsdtar->verbose++;
- break;
- case OPTION_VERSION: /* GNU convention */
- version();
- break;
-#if 0
- /*
- * The -W longopt feature is handled inside of
- * bsdtar_getopt(), so -W is not available here.
- */
- case 'W': /* Obscure GNU convention. */
- break;
-#endif
- case 'w': /* SUSv2 */
- bsdtar->option_interactive = 1;
- break;
- case 'X': /* GNU tar */
- if (lafe_exclude_from_file(&bsdtar->matching, bsdtar->optarg))
- lafe_errc(1, 0,
- "failed to process exclusions from file %s",
- bsdtar->optarg);
- break;
- case 'x': /* SUSv2 */
- set_mode(bsdtar, opt);
- break;
- case 'y': /* FreeBSD version of GNU tar */
- if (bsdtar->create_compression != '\0')
- lafe_errc(1, 0,
- "Can't specify both -%c and -%c", opt,
- bsdtar->create_compression);
- bsdtar->create_compression = opt;
- break;
- case 'Z': /* GNU tar */
- if (bsdtar->create_compression != '\0')
- lafe_errc(1, 0,
- "Can't specify both -%c and -%c", opt,
- bsdtar->create_compression);
- bsdtar->create_compression = opt;
- break;
- case 'z': /* GNU tar, star, many others */
- if (bsdtar->create_compression != '\0')
- lafe_errc(1, 0,
- "Can't specify both -%c and -%c", opt,
- bsdtar->create_compression);
- bsdtar->create_compression = opt;
- break;
- case OPTION_USE_COMPRESS_PROGRAM:
- bsdtar->compress_program = bsdtar->optarg;
- break;
- default:
- usage();
- }
- }
-
- /*
- * Sanity-check options.
- */
-
- /* If no "real" mode was specified, treat -h as --help. */
- if ((bsdtar->mode == '\0') && possible_help_request) {
- long_help();
- exit(0);
- }
-
- /* Otherwise, a mode is required. */
- if (bsdtar->mode == '\0')
- lafe_errc(1, 0,
- "Must specify one of -c, -r, -t, -u, -x");
-
- /* Check boolean options only permitted in certain modes. */
- if (bsdtar->option_dont_traverse_mounts)
- only_mode(bsdtar, "--one-file-system", "cru");
- if (bsdtar->option_fast_read)
- only_mode(bsdtar, "--fast-read", "xt");
- if (bsdtar->option_honor_nodump)
- only_mode(bsdtar, "--nodump", "cru");
- if (option_o > 0) {
- switch (bsdtar->mode) {
- case 'c':
- /*
- * In GNU tar, -o means "old format." The
- * "ustar" format is the closest thing
- * supported by libarchive.
- */
- bsdtar->create_format = "ustar";
- /* TODO: bsdtar->create_format = "v7"; */
- break;
- case 'x':
- /* POSIX-compatible behavior. */
- bsdtar->option_no_owner = 1;
- bsdtar->extract_flags &= ~ARCHIVE_EXTRACT_OWNER;
- break;
- default:
- only_mode(bsdtar, "-o", "xc");
- break;
- }
- }
- if (bsdtar->option_no_subdirs)
- only_mode(bsdtar, "-n", "cru");
- if (bsdtar->option_stdout)
- only_mode(bsdtar, "-O", "xt");
- if (bsdtar->option_unlink_first)
- only_mode(bsdtar, "-U", "x");
- if (bsdtar->option_warn_links)
- only_mode(bsdtar, "--check-links", "cr");
-
- /* Check other parameters only permitted in certain modes. */
- if (bsdtar->create_compression != '\0') {
- strcpy(buff, "-?");
- buff[1] = bsdtar->create_compression;
- only_mode(bsdtar, buff, "cxt");
- }
- if (bsdtar->create_format != NULL)
- only_mode(bsdtar, "--format", "cru");
- if (bsdtar->symlink_mode != '\0') {
- strcpy(buff, "-?");
- buff[1] = bsdtar->symlink_mode;
- only_mode(bsdtar, buff, "cru");
- }
- if (bsdtar->strip_components != 0)
- only_mode(bsdtar, "--strip-components", "xt");
-
- switch(bsdtar->mode) {
- case 'c':
- tar_mode_c(bsdtar);
- break;
- case 'r':
- tar_mode_r(bsdtar);
- break;
- case 't':
- tar_mode_t(bsdtar);
- break;
- case 'u':
- tar_mode_u(bsdtar);
- break;
- case 'x':
- tar_mode_x(bsdtar);
- break;
- }
-
- lafe_cleanup_exclusions(&bsdtar->matching);
-#if HAVE_REGEX_H
- cleanup_substitution(bsdtar);
-#endif
-
- if (bsdtar->return_value != 0)
- lafe_warnc(0,
- "Error exit delayed from previous errors.");
- return (bsdtar->return_value);
-}
-
-static void
-set_mode(struct bsdtar *bsdtar, char opt)
-{
- if (bsdtar->mode != '\0' && bsdtar->mode != opt)
- lafe_errc(1, 0,
- "Can't specify both -%c and -%c", opt, bsdtar->mode);
- bsdtar->mode = opt;
-}
-
-/*
- * Verify that the mode is correct.
- */
-static void
-only_mode(struct bsdtar *bsdtar, const char *opt, const char *valid_modes)
-{
- if (strchr(valid_modes, bsdtar->mode) == NULL)
- lafe_errc(1, 0,
- "Option %s is not permitted in mode -%c",
- opt, bsdtar->mode);
-}
-
-
-void
-usage(void)
-{
- const char *p;
-
- p = lafe_progname;
-
- fprintf(stderr, "Usage:\n");
- fprintf(stderr, " List: %s -tf <archive-filename>\n", p);
- fprintf(stderr, " Extract: %s -xf <archive-filename>\n", p);
- fprintf(stderr, " Create: %s -cf <archive-filename> [filenames...]\n", p);
- fprintf(stderr, " Help: %s --help\n", p);
- exit(1);
-}
-
-static void
-version(void)
-{
- printf("bsdtar %s - %s\n",
- BSDTAR_VERSION_STRING,
- archive_version());
- exit(0);
-}
-
-static const char *long_help_msg =
- "First option must be a mode specifier:\n"
- " -c Create -r Add/Replace -t List -u Update -x Extract\n"
- "Common Options:\n"
- " -b # Use # 512-byte records per I/O block\n"
- " -f <filename> Location of archive (default " _PATH_DEFTAPE ")\n"
- " -v Verbose\n"
- " -w Interactive\n"
- "Create: %p -c [options] [<file> | <dir> | @<archive> | -C <dir> ]\n"
- " <file>, <dir> add these items to archive\n"
- " -z, -j, -J, --lzma Compress archive with gzip/bzip2/xz/lzma\n"
- " --format {ustar|pax|cpio|shar} Select archive format\n"
- " --exclude <pattern> Skip files that match pattern\n"
- " -C <dir> Change to <dir> before processing remaining files\n"
- " @<archive> Add entries from <archive> to output\n"
- "List: %p -t [options] [<patterns>]\n"
- " <patterns> If specified, list only entries that match\n"
- "Extract: %p -x [options] [<patterns>]\n"
- " <patterns> If specified, extract only entries that match\n"
- " -k Keep (don't overwrite) existing files\n"
- " -m Don't restore modification times\n"
- " -O Write entries to stdout, don't restore to disk\n"
- " -p Restore permissions (including ACLs, owner, file flags)\n";
-
-
-/*
- * Note that the word 'bsdtar' will always appear in the first line
- * of output.
- *
- * In particular, /bin/sh scripts that need to test for the presence
- * of bsdtar can use the following template:
- *
- * if (tar --help 2>&1 | grep bsdtar >/dev/null 2>&1 ) then \
- * echo bsdtar; else echo not bsdtar; fi
- */
-static void
-long_help(void)
-{
- const char *prog;
- const char *p;
-
- prog = lafe_progname;
-
- fflush(stderr);
-
- p = (strcmp(prog,"bsdtar") != 0) ? "(bsdtar)" : "";
- printf("%s%s: manipulate archive files\n", prog, p);
-
- for (p = long_help_msg; *p != '\0'; p++) {
- if (*p == '%') {
- if (p[1] == 'p') {
- fputs(prog, stdout);
- p++;
- } else
- putchar('%');
- } else
- putchar(*p);
- }
- version();
-}
diff --git a/usr.bin/tar/bsdtar.h b/usr.bin/tar/bsdtar.h
deleted file mode 100644
index ede96d9..0000000
--- a/usr.bin/tar/bsdtar.h
+++ /dev/null
@@ -1,164 +0,0 @@
-/*-
- * Copyright (c) 2003-2007 Tim Kientzle
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#include "bsdtar_platform.h"
-#include <stdio.h>
-
-#include "matching.h"
-
-#define DEFAULT_BYTES_PER_BLOCK (20*512)
-
-/*
- * The internal state for the "bsdtar" program.
- *
- * Keeping all of the state in a structure like this simplifies memory
- * leak testing (at exit, anything left on the heap is suspect). A
- * pointer to this structure is passed to most bsdtar internal
- * functions.
- */
-struct bsdtar {
- /* Options */
- const char *filename; /* -f filename */
- const char *create_format; /* -F format */
- char *pending_chdir; /* -C dir */
- const char *names_from_file; /* -T file */
- time_t newer_ctime_sec; /* --newer/--newer-than */
- long newer_ctime_nsec; /* --newer/--newer-than */
- time_t newer_mtime_sec; /* --newer-mtime */
- long newer_mtime_nsec; /* --newer-mtime-than */
- int bytes_per_block; /* -b block_size */
- int verbose; /* -v */
- int extract_flags; /* Flags for extract operation */
- int strip_components; /* Remove this many leading dirs */
- int gid; /* --gid */
- const char *gname; /* --gname */
- int uid; /* --uid */
- const char *uname; /* --uname */
- char mode; /* Program mode: 'c', 't', 'r', 'u', 'x' */
- char symlink_mode; /* H or L, per BSD conventions */
- char create_compression; /* j, y, or z */
- const char *compress_program;
- char option_absolute_paths; /* -P */
- char option_chroot; /* --chroot */
- char option_dont_traverse_mounts; /* --one-file-system */
- char option_fast_read; /* --fast-read */
- const char *option_options; /* --options */
- char option_honor_nodump; /* --nodump */
- char option_interactive; /* -w */
- char option_no_owner; /* -o */
- char option_no_subdirs; /* -n */
- char option_null; /* --null */
- char option_stdout; /* -O */
- char option_totals; /* --totals */
- char option_unlink_first; /* -U */
- char option_warn_links; /* --check-links */
- char day_first; /* show day before month in -tv output */
-
- /* If >= 0, then close this when done. */
- int fd;
-
- /* Miscellaneous state information */
- int argc;
- char **argv;
- const char *optarg;
- size_t gs_width; /* For 'list_item' in read.c */
- size_t u_width; /* for 'list_item' in read.c */
- uid_t user_uid; /* UID running this program */
- int return_value; /* Value returned by main() */
- char warned_lead_slash; /* Already displayed warning */
- char next_line_is_dir; /* Used for -C parsing in -cT */
-
- /*
- * Data for various subsystems. Full definitions are located in
- * the file where they are used.
- */
- struct archive *diskreader; /* for write.c */
- struct archive_entry_linkresolver *resolver; /* for write.c */
- struct archive_dir *archive_dir; /* for write.c */
- struct name_cache *gname_cache; /* for write.c */
- char *buff; /* for write.c */
- struct lafe_matching *matching; /* for matching.c */
- struct security *security; /* for read.c */
- struct name_cache *uname_cache; /* for write.c */
- struct siginfo_data *siginfo; /* for siginfo.c */
- struct substitution *substitution; /* for subst.c */
-};
-
-/* Fake short equivalents for long options that otherwise lack them. */
-enum {
- OPTION_CHECK_LINKS = 1,
- OPTION_CHROOT,
- OPTION_EXCLUDE,
- OPTION_FORMAT,
- OPTION_GID,
- OPTION_GNAME,
- OPTION_HELP,
- OPTION_INCLUDE,
- OPTION_KEEP_NEWER_FILES,
- OPTION_LZMA,
- OPTION_NEWER_CTIME,
- OPTION_NEWER_CTIME_THAN,
- OPTION_NEWER_MTIME,
- OPTION_NEWER_MTIME_THAN,
- OPTION_NODUMP,
- OPTION_NO_SAME_OWNER,
- OPTION_NO_SAME_PERMISSIONS,
- OPTION_NULL,
- OPTION_NUMERIC_OWNER,
- OPTION_ONE_FILE_SYSTEM,
- OPTION_OPTIONS,
- OPTION_POSIX,
- OPTION_SAME_OWNER,
- OPTION_STRIP_COMPONENTS,
- OPTION_TOTALS,
- OPTION_UID,
- OPTION_UNAME,
- OPTION_USE_COMPRESS_PROGRAM,
- OPTION_VERSION
-};
-
-int bsdtar_getopt(struct bsdtar *);
-void do_chdir(struct bsdtar *);
-int edit_pathname(struct bsdtar *, struct archive_entry *);
-int need_report(void);
-int pathcmp(const char *a, const char *b);
-void safe_fprintf(FILE *, const char *fmt, ...);
-void set_chdir(struct bsdtar *, const char *newdir);
-const char *tar_i64toa(int64_t);
-void tar_mode_c(struct bsdtar *bsdtar);
-void tar_mode_r(struct bsdtar *bsdtar);
-void tar_mode_t(struct bsdtar *bsdtar);
-void tar_mode_u(struct bsdtar *bsdtar);
-void tar_mode_x(struct bsdtar *bsdtar);
-void usage(void);
-int yes(const char *fmt, ...);
-
-#if HAVE_REGEX_H
-void add_substitution(struct bsdtar *, const char *);
-int apply_substitution(struct bsdtar *, const char *, char **, int);
-void cleanup_substitution(struct bsdtar *);
-#endif
diff --git a/usr.bin/tar/test/Makefile b/usr.bin/tar/test/Makefile
index 4342cdf..3e99fc2 100644
--- a/usr.bin/tar/test/Makefile
+++ b/usr.bin/tar/test/Makefile
@@ -1,13 +1,13 @@
# $FreeBSD$
-# Where to find the tar sources (for the internal unit tests)
-TAR_SRCDIR=${.CURDIR}/..
-.PATH: ${TAR_SRCDIR}
+LIBARCHIVEDIR= ${.CURDIR}/../../../contrib/libarchive
+.PATH: ${LIBARCHIVEDIR}/tar
# Some tar sources are pulled in for white-box tests
-TAR_SRCS= \
+TAR_SRCS= \
getdate.c
+.PATH: ${LIBARCHIVEDIR}/tar/test
TESTS= \
test_0.c \
test_basic.c \
@@ -26,7 +26,7 @@ TESTS= \
test_version.c
# Build the test program
-SRCS= ${TAR_SRCS} \
+SRCS= ${TAR_SRCS} \
${TESTS} \
list.h \
main.c
@@ -37,24 +37,25 @@ NO_MAN=yes
PROG=bsdtar_test
DPADD=${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBLZMA}
-CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\"
-CFLAGS+= -I..
+CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/../config_freebsd.h\"
LDADD= -larchive -lz -lbz2 -llzma
CFLAGS+= -static -g -O2 -Wall
-CFLAGS+= -I${.OBJDIR}
-CFLAGS+= -I${TAR_SRCDIR}
+CFLAGS+= -I${.CURDIR}/.. -I${.OBJDIR}
+CFLAGS+= -I${LIBARCHIVEDIR}/tar
# Uncomment to link against dmalloc
#LDADD+= -L/usr/local/lib -ldmalloc
#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC
check test: bsdtar_test
- ./bsdtar_test -p ${.OBJDIR}/../bsdtar -r ${.CURDIR}
+ ./bsdtar_test -p ${.OBJDIR}/../bsdtar -r ${LIBARCHIVEDIR}/tar/test
list.h: ${TESTS} Makefile
- (cd ${.CURDIR}; cat ${TESTS}) | grep DEFINE_TEST > list.h
+ (cd ${LIBARCHIVEDIR}/tar/test; cat ${TESTS}) | \
+ grep DEFINE_TEST > ${.OBJDIR}/list.h
clean:
+ rm -f ${CLEANFILES}
rm -f *.out
rm -f *.o
rm -f *.core
diff --git a/usr.bin/tar/test/test_option_s.c b/usr.bin/tar/test/test_option_s.c
deleted file mode 100644
index 94d6345..0000000
--- a/usr.bin/tar/test/test_option_s.c
+++ /dev/null
@@ -1,107 +0,0 @@
-/*-
- * Copyright (c) 2003-2008 Tim Kientzle
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-#include "test.h"
-__FBSDID("$FreeBSD$");
-
-static int
-mkfile(const char *fn, const char *contents)
-{
- FILE *f = fopen(fn, "w");
- failure("Couldn't create file '%s', errno=%d (%s)\n",
- fn, errno, strerror(errno));
- if (!assert(f != NULL))
- return (1); /* Failure. */
- if (contents != NULL)
- assertEqualInt(strlen(contents),
- fwrite(contents, 1, strlen(contents), f));
- assertEqualInt(0, fclose(f));
- return (0); /* Success */
-}
-
-DEFINE_TEST(test_option_s)
-{
- struct stat st;
-
- /* Create a sample file heirarchy. */
- assertMakeDir("in", 0755);
- assertMakeDir("in/d1", 0755);
- assertEqualInt(0, mkfile("in/d1/foo", "foo"));
- assertEqualInt(0, mkfile("in/d1/bar", "bar"));
-
- /* Does bsdtar support -s option ? */
- systemf("%s -cf - -s /foo/bar/ in/d1/foo > NUL 2> check.err",
- testprog);
- assertEqualInt(0, stat("check.err", &st));
- if (st.st_size != 0) {
- skipping("%s does not support -s option on this platform",
- testprog);
- return;
- }
-
- /*
- * Test 1: Filename substitution when creating archives.
- */
- assertMakeDir("test1", 0755);
- systemf("%s -cf - -s /foo/bar/ in/d1/foo | %s -xf - -C test1",
- testprog, testprog);
- assertFileContents("foo", 3, "test1/in/d1/bar");
- systemf("%s -cf - -s /d1/d2/ in/d1/foo | %s -xf - -C test1",
- testprog, testprog);
- assertFileContents("foo", 3, "test1/in/d2/foo");
-
-
- /*
- * Test 2: Basic substitution when extracting archive.
- */
- assertMakeDir("test2", 0755);
- systemf("%s -cf - in/d1/foo | %s -xf - -s /foo/bar/ -C test2",
- testprog, testprog);
- assertFileContents("foo", 3, "test2/in/d1/bar");
-
- /*
- * Test 3: Files with empty names shouldn't be archived.
- */
- systemf("%s -cf - -s ,in/d1/foo,, in/d1/foo | %s -tvf - > in.lst",
- testprog, testprog);
- assertEmptyFile("in.lst");
-
- /*
- * Test 4: Multiple substitutions when extracting archive.
- */
- assertMakeDir("test4", 0755);
- systemf("%s -cf - in/d1/foo in/d1/bar | %s -xf - -s /foo/bar/ -s }bar}baz} -C test4",
- testprog, testprog);
- assertFileContents("foo", 3, "test4/in/d1/bar");
- assertFileContents("bar", 3, "test4/in/d1/baz");
-
- /*
- * Test 5: Name-switching substitutions when extracting archive.
- */
- assertMakeDir("test5", 0755);
- systemf("%s -cf - in/d1/foo in/d1/bar | %s -xf - -s /foo/bar/ -s }bar}foo} -C test5",
- testprog, testprog);
- assertFileContents("foo", 3, "test5/in/d1/bar");
- assertFileContents("bar", 3, "test5/in/d1/foo");
-}
diff --git a/usr.bin/tar/test/test_patterns_2.tar.uu b/usr.bin/tar/test/test_patterns_2.tar.uu
deleted file mode 100644
index f3a0a75..0000000
--- a/usr.bin/tar/test/test_patterns_2.tar.uu
+++ /dev/null
@@ -1,233 +0,0 @@
-$FreeBSD$
-
-begin 644 test_patterns_2.tar
-M+W1M<"]F;V\O````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````#`P,#<U-2``,#`Q-S4P(``P,#`P,#`@`#`P,#`P,#`P,#`P
-M(#$Q,#4Q,C$R-C4V(#`Q,C0T,0`@-0``````````````````````````````
-M````````````````````````````````````````````````````````````
-M``````````````````````````````````````````!U<W1A<@`P,'1I;0``
-M````````````````````````````````````=VAE96P`````````````````
-M```````````````````P,#`P,#`@`#`P,#`P,"``````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M```````````````````````O=&UP+V9O;R]B87(O````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````,#`P-S4U(``P,#$W-3`@`#`P
-M,#`P,"``,#`P,#`P,#`P,#`@,3$P-3$R,3(V-3,@,#$S,C`R`"`U````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````'5S=&%R`#`P=&EM``````````````````````````````````````!W
-M:&5E;````````````````````````````````````#`P,#`P,"``,#`P,#`P
-M(```````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````````````````````````````"]T;7`O9F]O+V)A
-M>@``````````````````````````````````````````````````````````
-M```````````````````````````````````````````````````````````P
-M,#`V-#0@`#`P,3<U,"``,#`P,#`P(``P,#`P,#`P,#`P,"`Q,3`U,3(Q,C8U
-M-B`P,3,Q,C8`(#``````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````=7-T87(`,#!T:6T`````````````````
-M`````````````````````'=H965L````````````````````````````````
-M````,#`P,#`P(``P,#`P,#`@````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````+W1M<"]F;V\O8F%R+V)A>@``````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````#`P,#8T-"``,#`Q-S4P(``P,#`P,#`@`#`P,#`P
-M,#`P,#`P(#$Q,#4Q,C$R-C4S(#`Q,S8V-P`@,```````````````````````
-M````````````````````````````````````````````````````````````
-M``````````````````````````````````````````````````!U<W1A<@`P
-M,'1I;0``````````````````````````````````````=VAE96P`````````
-M```````````````````````````P,#`P,#`@`#`P,#`P,"``````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-9````````````````````````````````````
-`
-end
diff --git a/usr.bin/tar/test/test_patterns_3.tar.uu b/usr.bin/tar/test/test_patterns_3.tar.uu
deleted file mode 100644
index 8a19f80..0000000
--- a/usr.bin/tar/test/test_patterns_3.tar.uu
+++ /dev/null
@@ -1,233 +0,0 @@
-$FreeBSD$
-
-begin 644 test_patterns_3.tar
-M+W1M<"]F;V\O8F%R+P``````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````#`P,#<U-2``,#`Q-S4P(``P,#`P,#`@`#`P,#`P,#`P,#`P
-M(#$Q,#4S,C`W-34R(#`Q,S(P-@`@-0``````````````````````````````
-M````````````````````````````````````````````````````````````
-M``````````````````````````````````````````!U<W1A<@`P,'1I;0``
-M````````````````````````````````````=VAE96P`````````````````
-M```````````````````P,#`P,#`@`#`P,#`P,"``````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M```````````````````````O=&UP+V9O;R]B87(O8F%Z+P``````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````,#`P-S4U(``P,#$W-3`@`#`P
-M,#`P,"``,#`P,#`P,#`P,#`@,3$P-3,R,#<U-3(@,#$S-S8R`"`U````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````'5S=&%R`#`P=&EM``````````````````````````````````````!W
-M:&5E;````````````````````````````````````#`P,#`P,"``,#`P,#`P
-M(```````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````````````````````````````'1M<"]F;V\O8F%Z
-M+P``````````````````````````````````````````````````````````
-M```````````````````````````````````````````````````````````P
-M,#`W-34@`#`P,3<U,"``,#`P,#`P(``P,#`P,#`P,#`P,"`Q,3`U,S(P-S4V
-M,"`P,3,Q,S8`(#4`````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````=7-T87(`,#!T:6T`````````````````
-M`````````````````````'=H965L````````````````````````````````
-M````,#`P,#`P(``P,#`P,#`@````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````=&UP+V9O;R]B87HO8F%R+P``````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````#`P,#<U-2``,#`Q-S4P(``P,#`P,#`@`#`P,#`P
-M,#`P,#`P(#$Q,#4S,C`W-38P(#`Q,S<P,@`@-0``````````````````````
-M````````````````````````````````````````````````````````````
-M``````````````````````````````````````````````````!U<W1A<@`P
-M,'1I;0``````````````````````````````````````=VAE96P`````````
-M```````````````````````````P,#`P,#`@`#`P,#`P,"``````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-9````````````````````````````````````
-`
-end
diff --git a/usr.bin/tar/test/test_patterns_4.tar.uu b/usr.bin/tar/test/test_patterns_4.tar.uu
deleted file mode 100644
index 3fc62e4..0000000
--- a/usr.bin/tar/test/test_patterns_4.tar.uu
+++ /dev/null
@@ -1,643 +0,0 @@
-$FreeBSD$
-
-begin 644 test_patterns_4.tar
-M+V9I;&4P,0``````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````#`P,#8T-"``,#`Q-S4Q(``P,#$W-3$@`#`P,#`P,#`P,#`P
-M(#$Q,34P-C<T-C0R(#`Q,#,S-@`@,```````````````````````````````
-M````````````````````````````````````````````````````````````
-M``````````````````````````````````````````!U<W1A<@`P,```````
-M````````````````````````````````````````````````````````````
-M```````````````````P,#`P,#`@`#`P,#`P,"``````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M```````````````````````O+BXO9FEL93`R````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````,#`P-C0T(``P,#$W-3$@`#`P
-M,3<U,2``,#`P,#`P,#`P,#`@,3$Q-3`V-S0V-#(@,#$P-34R`"`P````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````'5S=&%R`#`P````````````````````````````````````````````
-M`````````````````````````````````````````#`P,#`P,"``,#`P,#`P
-M(```````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````````````````````````````"\N+B\N+B]F:6QE
-M,#,`````````````````````````````````````````````````````````
-M```````````````````````````````````````````````````````````P
-M,#`V-#0@`#`P,3<U,2``,#`Q-S4Q(``P,#`P,#`P,#`P,"`Q,3$U,#8W-#8T
-M,B`P,3`W-C8`(#``````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````=7-T87(`,#``````````````````````
-M````````````````````````````````````````````````````````````
-M````,#`P,#`P(``P,#`P,#`@````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````8SHO9FEL93`T````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````#`P,#8T-"``,#`Q-S4Q(``P,#$W-3$@`#`P,#`P
-M,#`P,#`P(#$Q,34P-C<T-C0R(#`Q,#4W-@`@,```````````````````````
-M````````````````````````````````````````````````````````````
-M``````````````````````````````````````````````````!U<W1A<@`P
-M,```````````````````````````````````````````````````````````
-M```````````````````````````P,#`P,#`@`#`P,#`P,"``````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M``````````````````````````````!$.BXN+V9I;&4P-0``````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````,#`P-C0T(``P,#$W
-M-3$@`#`P,3<U,2``,#`P,#`P,#`P,#`@,3$Q-3`V-S0V-#(@,#$P-C<T`"`P
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````'5S=&%R`#`P````````````````````````````````````
-M`````````````````````````````````````````````````#`P,#`P,"``
-M,#`P,#`P(```````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````````````````````````````````````&,Z+BXO
-M+BXO9FEL93`V````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M```````P,#`V-#0@`#`P,3<U,2``,#`Q-S4Q(``P,#`P,#`P,#`P,"`Q,3$U
-M,#8W-#8T,B`P,3$Q-#<`(#``````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````=7-T87(`,#``````````````
-M````````````````````````````````````````````````````````````
-M````````````,#`P,#`P(``P,#`P,#`@````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````0SHO+BXO9FEL93`W````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````````````#`P,#8T-"``,#`Q-S4Q(``P,#$W-3$@
-M`#`P,#`P,#`P,#`P(#$Q,34P-C<T-C0R(#`Q,#<U-``@,```````````````
-M````````````````````````````````````````````````````````````
-M``````````````````````````````````````````````````````````!U
-M<W1A<@`P,```````````````````````````````````````````````````
-M```````````````````````````````````P,#`P,#`@`#`P,#`P,"``````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M``````````````````````````````````````!A.B\N+B\N+B]F:6QE,#@`
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````,#`P-C0T
-M(``P,#$W-3$@`#`P,3<U,2``,#`P,#`P,#`P,#`@,3$Q-3`V-S0V-#(@,#$Q
-M,C(V`"`P````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````'5S=&%R`#`P````````````````````````````
-M`````````````````````````````````````````````````````````#`P
-M,#`P,"``,#`P,#`P(```````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`"\O+B]C.B]F:6QE,#D`````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M```````````````P,#`V-#0@`#`P,3<U,2``,#`Q-S4Q(``P,#`P,#`P,#`P
-M,"`Q,3$U,#8W-#8T,B`P,3$P-S8`(#``````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````=7-T87(`,#``````
-M````````````````````````````````````````````````````````````
-M````````````````````,#`P,#`P(``P,#`P,#`@````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````+R\N+T,Z+RXN+V9I;&4Q,```````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````````````````````#`P,#8T-"``,#`Q-S4Q(``P
-M,#$W-3$@`#`P,#`P,#`P,#`P(#$Q,34P-C<T-C0R(#`Q,3(T,0`@,```````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M``````!U<W1A<@`P,```````````````````````````````````````````
-M```````````````````````````````````````````P,#`P,#`@`#`P,#`P
-M,"``````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M```````````````````````````````````````````````O+S\O8SHO9FEL
-M93$Q````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M,#`P-C0T(``P,#$W-3$@`#`P,3<U,2``,#`P,#`P,#`P,#`@,3$Q-3`V-S0V
-M-#(@,#$Q,3$P`"`P````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````````````'5S=&%R`#`P````````````````````
-M````````````````````````````````````````````````````````````
-M`````#`P,#`P,"``,#`P,#`P(```````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````"\O/R]#.B\N+B]F:6QE,3(`````````````````````````````
-M````````````````````````````````````````````````````````````
-M```````````````````````P,#`V-#0@`#`P,3<U,2``,#`Q-S4Q(``P,#`P
-M,#`P,#`P,"`Q,3$U,#8W-#8T,B`P,3$R-C0`(#``````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````=7-T87(`
-M,#``````````````````````````````````````````````````````````
-M````````````````````````````,#`P,#`P(``P,#`P,#`@````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````+R\O+V,Z+V9I;&4Q,P``````````
-M````````````````````````````````````````````````````````````
-M`````````````````````````````````````````````#`P,#8T-"``,#`Q
-M-S4Q(``P,#$W-3$@`#`P,#`P,#`P,#`P(#$Q,34P-C<T-C0R(#`Q,3`W,@`@
-M,```````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M``````````````!U<W1A<@`P,```````````````````````````````````
-M```````````````````````````````````````````````````P,#`P,#`@
-M`#`P,#`P,"``````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M```````````````````````````````````````````````````````O+R\O
-M0SHO+R\O+V9I;&4Q-```````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````,#`P-C0T(``P,#$W-3$@`#`P,3<U,2``,#`P,#`P,#`P,#`@,3$Q
-M-3`V-S0V-#(@,#$Q,S(W`"`P````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````````````````````'5S=&%R`#`P````````````
-M````````````````````````````````````````````````````````````
-M`````````````#`P,#`P,"``,#`P,#`P(```````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````"\O/R]53D,O<V5R=F5R+W-H87)E+V9I;&4Q-0``````
-M````````````````````````````````````````````````````````````
-M```````````````````````````````P,#`V-#0@`#`P,3<U,2``,#`Q-S4Q
-M(``P,#`P,#`P,#`P,"`Q,3$U,#8W-#8T,B`P,3,V,S4`(#``````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M=7-T87(`,#``````````````````````````````````````````````````
-M````````````````````````````````````,#`P,#`P(``P,#`P,#`@````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````+R\_+U5.0R]F:6QE,38`
-M````````````````````````````````````````````````````````````
-M`````````````````````````````````````````````````````#`P,#8T
-M-"``,#`Q-S4Q(``P,#$W-3$@`#`P,#`P,#`P,#`P(#$Q,34P-C<T-C0R(#`Q
-M,3(R-@`@,```````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M``````````````````````!U<W1A<@`P,```````````````````````````
-M```````````````````````````````````````````````````````````P
-M,#`P,#`@`#`P,#`P,"``````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M```O+S\O54Y#+RXN+V9I;&4Q-P``````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````,#`P-C0T(``P,#$W-3$@`#`P,3<U,2``,#`P,#`P,#`P
-M,#`@,3$Q-3`V-S0V-#(@,#$Q-#0R`"`P````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````````````````````````````'5S=&%R`#`P````
-M````````````````````````````````````````````````````````````
-M`````````````````````#`P,#`P,"``,#`P,#`P(```````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````````"\O/R]U;F,O<V5R=F5R+W-H87)E+V9I;&4Q
-M.```````````````````````````````````````````````````````````
-M```````````````````````````````````````P,#`V-#0@`#`P,3<U,2``
-M,#`Q-S4Q(``P,#`P,#`P,#`P,"`Q,3$U,#8W-#8T,B`P,30P,#``(#``````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````=7-T87(`,#``````````````````````````````````````````
-M````````````````````````````````````````````,#`P,#`P(``P,#`P
-M,#`@````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````+R\_+W5N8R]F
-M:6QE,3D`````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`#`P,#8T-"``,#`Q-S4Q(``P,#$W-3$@`#`P,#`P,#`P,#`P(#$Q,34P-C<T
-M-C0R(#`Q,3,W,0`@,```````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M``````````````````````````````!U<W1A<@`P,```````````````````
-M````````````````````````````````````````````````````````````
-M```````P,#`P,#`@`#`P,#`P,"``````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M```````````O+S\O=6YC+RXN+V9I;&4R,```````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````,#`P-C0T(``P,#$W-3$@`#`P,3<U,2``,#`P
-M,#`P,#`P,#`@,3$Q-3`V-S0V-#(@,#$Q-3<T`"`P````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````````````````````````````````````'5S=&%R
-M`#`P````````````````````````````````````````````````````````
-M`````````````````````````````#`P,#`P,"``,#`P,#`P(```````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````````````````%QF:6QE,C$`````````````````
-M````````````````````````````````````````````````````````````
-M```````````````````````````````````````````````P,#`V-#0@`#`P
-M,3<U,2``,#`Q-S4Q(``P,#`P,#`P,#`P,"`Q,3$U,#8W-#8T,B`P,3`T,34`
-M(#``````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````=7-T87(`,#``````````````````````````````````
-M````````````````````````````````````````````````````,#`P,#`P
-M(``P,#`P,#`@````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````7"XN
-M7&9I;&4R,@``````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````#`P,#8T-"``,#`Q-S4Q(``P,#$W-3$@`#`P,#`P,#`P,#`P(#$Q
-M,34P-C<T-C0R(#`Q,#<P-@`@,```````````````````````````````````
-M````````````````````````````````````````````````````````````
-M``````````````````````````````````````!U<W1A<@`P,```````````
-M````````````````````````````````````````````````````````````
-M```````````````P,#`P,#`@`#`P,#`P,"``````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M``````````````````!<+BY<+BY<9FEL93(S````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````,#`P-C0T(``P,#$W-3$@`#`P,3<U
-M,2``,#`P,#`P,#`P,#`@,3$Q-3`V-S0V-#(@,#$Q,3<W`"`P````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`'5S=&%R`#`P````````````````````````````````````````````````
-M`````````````````````````````````````#`P,#`P,"``,#`P,#`P(```
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````````````````````````$,Z7&9I;&4R-```````
-M````````````````````````````````````````````````````````````
-M```````````````````````````````````````````````````````P,#`V
-M-#0@`#`P,3<U,2``,#`Q-S4Q(``P,#`P,#`P,#`P,"`Q,3$U,#8W-#8T,B`P
-M,3`V,34`(#``````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````=7-T87(`,#``````````````````````````
-M````````````````````````````````````````````````````````````
-M,#`P,#`P(``P,#`P,#`@````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````>CHN+EQF:6QE,C4`````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````#`P,#8T-"``,#`Q-S4Q(``P,#$W-3$@`#`P,#`P,#`P
-M,#`P(#$Q,34P-C<T-C0R(#`Q,3`T,0`@,```````````````````````````
-M````````````````````````````````````````````````````````````
-M``````````````````````````````````````````````!U<W1A<@`P,```
-M````````````````````````````````````````````````````````````
-M```````````````````````P,#`P,#`@`#`P,#`P,"``````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M``````````````````````````!C.BXN7"XN7&9I;&4R-@``````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````,#`P-C0T(``P,#$W-3$@
-M`#`P,3<U,2``,#`P,#`P,#`P,#`@,3$Q-3`V-S0V-#(@,#$Q,S`S`"`P````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````'5S=&%R`#`P````````````````````````````````````````
-M`````````````````````````````````````````````#`P,#`P,"``,#`P
-M,#`P(```````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````````````````````````````````%HZ7"XN7&9I
-M;&4R-P``````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M```P,#`V-#0@`#`P,3<U,2``,#`Q-S4Q(``P,#`P,#`P,#`P,"`Q,3$U,#8W
-M-#8T,B`P,3$Q,S<`(#``````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````=7-T87(`,#``````````````````
-M````````````````````````````````````````````````````````````
-M````````,#`P,#`P(``P,#`P,#`@````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````0SI<+BY<+BY<9FEL93(X````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````````#`P,#8T-"``,#`Q-S4Q(``P,#$W-3$@`#`P
-M,#`P,#`P,#`P(#$Q,34P-C<T-C0R(#`Q,30P,0`@,```````````````````
-M````````````````````````````````````````````````````````````
-M``````````````````````````````````````````````````````!U<W1A
-M<@`P,```````````````````````````````````````````````````````
-M```````````````````````````````P,#`P,#`@`#`P,#`P,"``````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M``````````````````````````````````!<7"Y<8SI<9FEL93(Y````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````,#`P-C0T(``P
-M,#$W-3$@`#`P,3<U,2``,#`P,#`P,#`P,#`@,3$Q-3`V-S0V-#(@,#$Q,S8T
-M`"`P````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````'5S=&%R`#`P````````````````````````````````
-M`````````````````````````````````````````````````````#`P,#`P
-M,"``,#`P,#`P(```````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````````````````````````````````````````%Q<
-M+EQ#.EPN+EQF:6QE,S``````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M```````````P,#`V-#0@`#`P,3<U,2``,#`Q-S4Q(``P,#`P,#`P,#`P,"`Q
-M,3$U,#8W-#8T,B`P,3$V,#0`(#``````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````=7-T87(`,#``````````
-M````````````````````````````````````````````````````````````
-M````````````````,#`P,#`P(``P,#`P,#`@````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````7%P_7&,Z7&9I;&4S,0``````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````````````````#`P,#8T-"``,#`Q-S4Q(``P,#$W
-M-3$@`#`P,#`P,#`P,#`P(#$Q,34P-C<T-C0R(#`Q,3,W-@`@,```````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M``!U<W1A<@`P,```````````````````````````````````````````````
-M```````````````````````````````````````P,#`P,#`@`#`P,#`P,"``
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M``````````````````````````````````````````!<7#]<1#I<+BY<9FEL
-M93,R````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````,#`P
-M-C0T(``P,#$W-3$@`#`P,3<U,2``,#`P,#`P,#`P,#`@,3$Q-3`V-S0V-#(@
-M,#$Q-C,P`"`P````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````````'5S=&%R`#`P````````````````````````
-M````````````````````````````````````````````````````````````
-M`#`P,#`P,"``,#`P,#`P(```````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````%Q<7%QC.EQF:6QE,S,`````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M```````````````````P,#`V-#0@`#`P,3<U,2``,#`Q-S4Q(``P,#`P,#`P
-M,#`P,"`Q,3$U,#8W-#8T,B`P,3$T,S4`(#``````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````=7-T87(`,#``
-M````````````````````````````````````````````````````````````
-M````````````````````````,#`P,#`P(``P,#`P,#`@````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````7%Q<7$,Z7%Q<7%QF:6QE,S0`````````
-M````````````````````````````````````````````````````````````
-M`````````````````````````````````````````#`P,#8T-"``,#`Q-S4Q
-M(``P,#$W-3$@`#`P,#`P,#`P,#`P(#$Q,34P-C<T-C0R(#`Q,C$U-@`@,```
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M``````````!U<W1A<@`P,```````````````````````````````````````
-M```````````````````````````````````````````````P,#`P,#`@`#`P
-M,#`P,"``````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M``````````````````````````````````````````````````!<7#]<54Y#
-M7'-E<G9E<EQS:&%R95QF:6QE,S4`````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````,#`P-C0T(``P,#$W-3$@`#`P,3<U,2``,#`P,#`P,#`P,#`@,3$Q-3`V
-M-S0V-#(@,#$T,C4U`"`P````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````````````````'5S=&%R`#`P````````````````
-M````````````````````````````````````````````````````````````
-M`````````#`P,#`P,"``,#`P,#`P(```````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````%Q</UQ53D-<9FEL93,V````````````````````````````
-M````````````````````````````````````````````````````````````
-M```````````````````````````P,#`V-#0@`#`P,3<U,2``,#`Q-S4Q(``P
-M,#`P,#`P,#`P,"`Q,3$U,#8W-#8T,B`P,3$U,30`(#``````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````=7-T
-M87(`,#``````````````````````````````````````````````````````
-M````````````````````````````````,#`P,#`P(``P,#`P,#`@````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````7%P_7%5.0UPN+EQF:6QE,S<`
-M````````````````````````````````````````````````````````````
-M`````````````````````````````````````````````````#`P,#8T-"``
-M,#`Q-S4Q(``P,#$W-3$@`#`P,#`P,#`P,#`P(#$Q,34P-C<T-C0R(#`Q,C`P
-M-0`@,```````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M``````````````````!U<W1A<@`P,```````````````````````````````
-M```````````````````````````````````````````````````````P,#`P
-M,#`@`#`P,#`P,"``````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M``````````````````````````````````````````````````````````!<
-M7#]<=6YC7'-E<G9E<EQS:&%R95QF:6QE,S@`````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````,#`P-C0T(``P,#$W-3$@`#`P,3<U,2``,#`P,#`P,#`P,#`@
-M,3$Q-3`V-S0V-#(@,#$T-#(P`"`P````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````````````````````````'5S=&%R`#`P````````
-M````````````````````````````````````````````````````````````
-M`````````````````#`P,#`P,"``,#`P,#`P(```````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````%Q</UQU;F-<9FEL93,Y````````````````````
-M````````````````````````````````````````````````````````````
-M```````````````````````````````````P,#`V-#0@`#`P,3<U,2``,#`Q
-M-S4Q(``P,#`P,#`P,#`P,"`Q,3$U,#8W-#8T,B`P,3$V-3<`(#``````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````=7-T87(`,#``````````````````````````````````````````````
-M````````````````````````````````````````,#`P,#`P(``P,#`P,#`@
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````7%P_7'5N8UPN+EQF
-M:6QE-#``````````````````````````````````````````````````````
-M`````````````````````````````````````````````````````````#`P
-M,#8T-"``,#`Q-S4Q(``P,#$W-3$@`#`P,#`P,#`P,#`P(#$Q,34P-C<T-C0R
-M(#`Q,C$S-P`@,```````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M``````````````````````````!U<W1A<@`P,```````````````````````
-M````````````````````````````````````````````````````````````
-M```P,#`P,#`@`#`P,#`P,"``````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M``````!<+BXO9FEL930Q````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````,#`P-C0T(``P,#$W-3$@`#`P,3<U,2``,#`P,#`P
-M,#`P,#`@,3$Q-3`V-S0V-#(@,#$P-C,R`"`P````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````````````````````````````````'5S=&%R`#`P
-M````````````````````````````````````````````````````````````
-M`````````````````````````#`P,#`P,"``,#`P,#`P(```````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````````````%PN+B\N+EQF:6QE-#(`````````````
-M````````````````````````````````````````````````````````````
-M```````````````````````````````````````````P,#`V-#0@`#`P,3<U
-M,2``,#`Q-S4Q(``P,#`P,#`P,#`P,"`Q,3$U,#8W-#8T,B`P,3$Q,C,`(#``
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````=7-T87(`,#``````````````````````````````````````
-M````````````````````````````````````````````````,#`P,#`P(``P
-M,#`P,#`@````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````8SHN+B\N
-M+EQF:6QE-#,`````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````#`P,#8T-"``,#`Q-S4Q(``P,#$W-3$@`#`P,#`P,#`P,#`P(#$Q,34P
-M-C<T-C0R(#`Q,3(R-0`@,```````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M``````````````````````````````````!U<W1A<@`P,```````````````
-M````````````````````````````````````````````````````````````
-M```````````P,#`P,#`@`#`P,#`P,"``````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M``````````````!#.B\N+EQF:6QE-#0`````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````,#`P-C0T(``P,#$W-3$@`#`P,3<U,2``
-M,#`P,#`P,#`P,#`@,3$Q-3`V-S0V-#(@,#$Q,#,R`"`P````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````````````````````````````````````````'5S
-M=&%R`#`P````````````````````````````````````````````````````
-M`````````````````````````````````#`P,#`P,"``,#`P,#`P(```````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````````````````````$0Z7"XN+RXN7&9I;&4T-0``
-M````````````````````````````````````````````````````````````
-M```````````````````````````````````````````````````P,#`V-#0@
-M`#`P,3<U,2``,#`Q-S4Q(``P,#`P,#`P,#`P,"`Q,3$U,#8W-#8T,B`P,3$S
-M,C0`(#``````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````=7-T87(`,#``````````````````````````````
-M````````````````````````````````````````````````````````,#`P
-M,#`P(``P,#`P,#`@````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M7"\N+V,Z7&9I;&4T-@``````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````#`P,#8T-"``,#`Q-S4Q(``P,#$W-3$@`#`P,#`P,#`P,#`P
-M(#$Q,34P-C<T-C0R(#`Q,3(S,0`@,```````````````````````````````
-M````````````````````````````````````````````````````````````
-M``````````````````````````````````````````!U<W1A<@`P,```````
-M````````````````````````````````````````````````````````````
-M```````````````````P,#`P,#`@`#`P,#`P,"``````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M``````````````````````!<7"XO0SI<+BY<9FEL930W````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````,#`P-C0T(``P,#$W-3$@`#`P
-M,3<U,2``,#`P,#`P,#`P,#`@,3$Q-3`V-S0V-#(@,#$Q-3,W`"`P````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````'5S=&%R`#`P````````````````````````````````````````````
-M`````````````````````````````````````````#`P,#`P,"``,#`P,#`P
-M(```````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````````````````````````````%PO/UQC.B]F:6QE
-M-#@`````````````````````````````````````````````````````````
-M```````````````````````````````````````````````````````````P
-M,#`V-#0@`#`P,3<U,2``,#`Q-S4Q(``P,#`P,#`P,#`P,"`Q,3$U,#8W-#8T
-M,B`P,3$R-30`(#``````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````=7-T87(`,#``````````````````````
-M````````````````````````````````````````````````````````````
-M````,#`P,#`P(``P,#`P,#`@````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````7%P_+T0Z+RXN7&9I;&4T.0``````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````#`P,#8T-"``,#`Q-S4Q(``P,#$W-3$@`#`P,#`P
-M,#`P,#`P(#$Q,34P-C<T-C0R(#`Q,34P-@`@,```````````````````````
-M````````````````````````````````````````````````````````````
-M``````````````````````````````````````````````````!U<W1A<@`P
-M,```````````````````````````````````````````````````````````
-M```````````````````````````P,#`P,#`@`#`P,#`P,"``````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M``````````````````````````````!<+R]<1#I<9FEL934P````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````,#`P-C0T(``P,#$W
-M-3$@`#`P,3<U,2``,#`P,#`P,#`P,#`@,3$Q-3`V-S0V-#(@,#$Q,C0S`"`P
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````'5S=&%R`#`P````````````````````````````````````
-M`````````````````````````````````````````````````#`P,#`P,"``
-M,#`P,#`P(```````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````````````````````````````````````%Q<+R]C
-M.EPO+UQ<9FEL934Q````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M```````P,#`V-#0@`#`P,3<U,2``,#`Q-S4Q(``P,#`P,#`P,#`P,"`Q,3$U
-M,#8W-#8T,B`P,3$W,S$`(#``````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````=7-T87(`,#``````````````
-M````````````````````````````````````````````````````````````
-M````````````,#`P,#`P(``P,#`P,#`@````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````7"\_+W5.8R]S97)V97)<<VAA<F5<9FEL934R````````
-M````````````````````````````````````````````````````````````
-M`````````````````````````````#`P,#8T-"``,#`Q-S4Q(``P,#$W-3$@
-M`#`P,#`P,#`P,#`P(#$Q,34P-C<T-C0R(#`Q-#$T-0`@,```````````````
-M````````````````````````````````````````````````````````````
-M``````````````````````````````````````````````````````````!U
-M<W1A<@`P,```````````````````````````````````````````````````
-M```````````````````````````````````P,#`P,#`@`#`P,#`P,"``````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M``````````````````````````````````````!<7#\O54YC7&9I;&4U,P``
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````,#`P-C0T
-M(``P,#$W-3$@`#`P,3<U,2``,#`P,#`P,#`P,#`@,3$Q-3`V-S0V-#(@,#$Q
-M-#<V`"`P````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````'5S=&%R`#`P````````````````````````````
-M`````````````````````````````````````````````````````````#`P
-M,#`P,"``,#`P,#`P(```````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`%PO/UQ5;D-<+BXO9FEL934T````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M```````````````P,#`V-#0@`#`P,3<U,2``,#`Q-S4Q(``P,#`P,#`P,#`P
-M,"`Q,3$U,#8W-#8T,B`P,3$W,3(`(#``````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````=7-T87(`,#``````
-M````````````````````````````````````````````````````````````
-M````````````````````,#`P,#`P(``P,#`P,#`@````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-'````````````
-`
-end
diff --git a/usr.bin/tar/tree.c b/usr.bin/tar/tree.c
deleted file mode 100644
index 58e9feb..0000000
--- a/usr.bin/tar/tree.c
+++ /dev/null
@@ -1,602 +0,0 @@
-/*-
- * Copyright (c) 2003-2007 Tim Kientzle
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*-
- * This is a new directory-walking system that addresses a number
- * of problems I've had with fts(3). In particular, it has no
- * pathname-length limits (other than the size of 'int'), handles
- * deep logical traversals, uses considerably less memory, and has
- * an opaque interface (easier to modify in the future).
- *
- * Internally, it keeps a single list of "tree_entry" items that
- * represent filesystem objects that require further attention.
- * Non-directories are not kept in memory: they are pulled from
- * readdir(), returned to the client, then freed as soon as possible.
- * Any directory entry to be traversed gets pushed onto the stack.
- *
- * There is surprisingly little information that needs to be kept for
- * each item on the stack. Just the name, depth (represented here as the
- * string length of the parent directory's pathname), and some markers
- * indicating how to get back to the parent (via chdir("..") for a
- * regular dir or via fchdir(2) for a symlink).
- */
-#include "bsdtar_platform.h"
-__FBSDID("$FreeBSD$");
-
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-#ifdef HAVE_DIRENT_H
-#include <dirent.h>
-#endif
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#include "tree.h"
-
-/*
- * TODO:
- * 1) Loop checking.
- * 3) Arbitrary logical traversals by closing/reopening intermediate fds.
- */
-
-struct tree_entry {
- struct tree_entry *next;
- struct tree_entry *parent;
- char *name;
- size_t dirname_length;
- dev_t dev;
- ino_t ino;
-#ifdef HAVE_FCHDIR
- int fd;
-#elif defined(_WIN32) && !defined(__CYGWIN__)
- char *fullpath;
-#else
-#error fchdir function required.
-#endif
- int flags;
-};
-
-/* Definitions for tree_entry.flags bitmap. */
-#define isDir 1 /* This entry is a regular directory. */
-#define isDirLink 2 /* This entry is a symbolic link to a directory. */
-#define needsPreVisit 4 /* This entry needs to be previsited. */
-#define needsPostVisit 8 /* This entry needs to be postvisited. */
-
-/*
- * Local data for this package.
- */
-struct tree {
- struct tree_entry *stack;
- struct tree_entry *current;
- DIR *d;
-#ifdef HAVE_FCHDIR
- int initialDirFd;
-#elif defined(_WIN32) && !defined(__CYGWIN__)
- char *initialDir;
-#endif
- int flags;
- int visit_type;
- int tree_errno; /* Error code from last failed operation. */
-
- char *buff;
- const char *basename;
- size_t buff_length;
- size_t path_length;
- size_t dirname_length;
-
- int depth;
- int openCount;
- int maxOpenCount;
-
- struct stat lst;
- struct stat st;
-};
-
-/* Definitions for tree.flags bitmap. */
-#define needsReturn 8 /* Marks first entry as not having been returned yet. */
-#define hasStat 16 /* The st entry is set. */
-#define hasLstat 32 /* The lst entry is set. */
-
-
-#ifdef HAVE_DIRENT_D_NAMLEN
-/* BSD extension; avoids need for a strlen() call. */
-#define D_NAMELEN(dp) (dp)->d_namlen
-#else
-#define D_NAMELEN(dp) (strlen((dp)->d_name))
-#endif
-
-#if 0
-#include <stdio.h>
-void
-tree_dump(struct tree *t, FILE *out)
-{
- struct tree_entry *te;
-
- fprintf(out, "\tdepth: %d\n", t->depth);
- fprintf(out, "\tbuff: %s\n", t->buff);
- fprintf(out, "\tpwd: "); fflush(stdout); system("pwd");
- fprintf(out, "\taccess: %s\n", t->basename);
- fprintf(out, "\tstack:\n");
- for (te = t->stack; te != NULL; te = te->next) {
- fprintf(out, "\t\tte->name: %s%s%s\n", te->name,
- te->flags & needsPreVisit ? "" : " *",
- t->current == te ? " (current)" : "");
- }
-}
-#endif
-
-/*
- * Add a directory path to the current stack.
- */
-static void
-tree_push(struct tree *t, const char *path)
-{
- struct tree_entry *te;
-
- te = malloc(sizeof(*te));
- memset(te, 0, sizeof(*te));
- te->next = t->stack;
- t->stack = te;
-#ifdef HAVE_FCHDIR
- te->fd = -1;
-#elif defined(_WIN32) && !defined(__CYGWIN__)
- te->fullpath = NULL;
-#endif
- te->name = strdup(path);
- te->flags = needsPreVisit | needsPostVisit;
- te->dirname_length = t->dirname_length;
-}
-
-/*
- * Append a name to the current path.
- */
-static void
-tree_append(struct tree *t, const char *name, size_t name_length)
-{
- char *p;
-
- if (t->buff != NULL)
- t->buff[t->dirname_length] = '\0';
- /* Strip trailing '/' from name, unless entire name is "/". */
- while (name_length > 1 && name[name_length - 1] == '/')
- name_length--;
-
- /* Resize pathname buffer as needed. */
- while (name_length + 1 + t->dirname_length >= t->buff_length) {
- t->buff_length *= 2;
- if (t->buff_length < 1024)
- t->buff_length = 1024;
- t->buff = realloc(t->buff, t->buff_length);
- }
- p = t->buff + t->dirname_length;
- t->path_length = t->dirname_length + name_length;
- /* Add a separating '/' if it's needed. */
- if (t->dirname_length > 0 && p[-1] != '/') {
- *p++ = '/';
- t->path_length ++;
- }
- strncpy(p, name, name_length);
- p[name_length] = '\0';
- t->basename = p;
-}
-
-/*
- * Open a directory tree for traversal.
- */
-struct tree *
-tree_open(const char *path)
-{
- struct tree *t;
-
- t = malloc(sizeof(*t));
- memset(t, 0, sizeof(*t));
- tree_append(t, path, strlen(path));
-#ifdef HAVE_FCHDIR
- t->initialDirFd = open(".", O_RDONLY);
-#elif defined(_WIN32) && !defined(__CYGWIN__)
- t->initialDir = getcwd(NULL, 0);
-#endif
- /*
- * During most of the traversal, items are set up and then
- * returned immediately from tree_next(). That doesn't work
- * for the very first entry, so we set a flag for this special
- * case.
- */
- t->flags = needsReturn;
- return (t);
-}
-
-/*
- * We've finished a directory; ascend back to the parent.
- */
-static int
-tree_ascend(struct tree *t)
-{
- struct tree_entry *te;
- int r = 0;
-
- te = t->stack;
- t->depth--;
- if (te->flags & isDirLink) {
-#ifdef HAVE_FCHDIR
- if (fchdir(te->fd) != 0) {
- t->tree_errno = errno;
- r = TREE_ERROR_FATAL;
- }
- close(te->fd);
-#elif defined(_WIN32) && !defined(__CYGWIN__)
- if (chdir(te->fullpath) != 0) {
- t->tree_errno = errno;
- r = TREE_ERROR_FATAL;
- }
- free(te->fullpath);
- te->fullpath = NULL;
-#endif
- t->openCount--;
- } else {
- if (chdir("..") != 0) {
- t->tree_errno = errno;
- r = TREE_ERROR_FATAL;
- }
- }
- return (r);
-}
-
-/*
- * Pop the working stack.
- */
-static void
-tree_pop(struct tree *t)
-{
- struct tree_entry *te;
-
- t->buff[t->dirname_length] = '\0';
- if (t->stack == t->current && t->current != NULL)
- t->current = t->current->parent;
- te = t->stack;
- t->stack = te->next;
- t->dirname_length = te->dirname_length;
- t->basename = t->buff + t->dirname_length;
- /* Special case: starting dir doesn't skip leading '/'. */
- if (t->dirname_length > 0)
- t->basename++;
- free(te->name);
- free(te);
-}
-
-/*
- * Get the next item in the tree traversal.
- */
-int
-tree_next(struct tree *t)
-{
- struct dirent *de = NULL;
- int r;
-
- /* If we're called again after a fatal error, that's an API
- * violation. Just crash now. */
- if (t->visit_type == TREE_ERROR_FATAL) {
- const char *msg = "Unable to continue traversing"
- " directory hierarchy after a fatal error.";
- write(2, msg, strlen(msg));
- *(int *)0 = 1; /* Deliberate SEGV; NULL pointer dereference. */
- exit(1); /* In case the SEGV didn't work. */
- }
-
- /* Handle the startup case by returning the initial entry. */
- if (t->flags & needsReturn) {
- t->flags &= ~needsReturn;
- return (t->visit_type = TREE_REGULAR);
- }
-
- while (t->stack != NULL) {
- /* If there's an open dir, get the next entry from there. */
- while (t->d != NULL) {
- de = readdir(t->d);
- if (de == NULL) {
- closedir(t->d);
- t->d = NULL;
- } else if (de->d_name[0] == '.'
- && de->d_name[1] == '\0') {
- /* Skip '.' */
- } else if (de->d_name[0] == '.'
- && de->d_name[1] == '.'
- && de->d_name[2] == '\0') {
- /* Skip '..' */
- } else {
- /*
- * Append the path to the current path
- * and return it.
- */
- tree_append(t, de->d_name, D_NAMELEN(de));
- t->flags &= ~hasLstat;
- t->flags &= ~hasStat;
- return (t->visit_type = TREE_REGULAR);
- }
- }
-
- /* If the current dir needs to be visited, set it up. */
- if (t->stack->flags & needsPreVisit) {
- t->current = t->stack;
- tree_append(t, t->stack->name, strlen(t->stack->name));
- t->stack->flags &= ~needsPreVisit;
- /* If it is a link, set up fd for the ascent. */
- if (t->stack->flags & isDirLink) {
-#ifdef HAVE_FCHDIR
- t->stack->fd = open(".", O_RDONLY);
-#elif defined(_WIN32) && !defined(__CYGWIN__)
- t->stack->fullpath = getcwd(NULL, 0);
-#endif
- t->openCount++;
- if (t->openCount > t->maxOpenCount)
- t->maxOpenCount = t->openCount;
- }
- t->dirname_length = t->path_length;
- if (chdir(t->stack->name) != 0) {
- /* chdir() failed; return error */
- tree_pop(t);
- t->tree_errno = errno;
- return (t->visit_type = TREE_ERROR_DIR);
- }
- t->depth++;
- t->d = opendir(".");
- if (t->d == NULL) {
- r = tree_ascend(t); /* Undo "chdir" */
- tree_pop(t);
- t->tree_errno = errno;
- t->visit_type = r != 0 ? r : TREE_ERROR_DIR;
- return (t->visit_type);
- }
- t->flags &= ~hasLstat;
- t->flags &= ~hasStat;
- t->basename = ".";
- return (t->visit_type = TREE_POSTDESCENT);
- }
-
- /* We've done everything necessary for the top stack entry. */
- if (t->stack->flags & needsPostVisit) {
- r = tree_ascend(t);
- tree_pop(t);
- t->flags &= ~hasLstat;
- t->flags &= ~hasStat;
- t->visit_type = r != 0 ? r : TREE_POSTASCENT;
- return (t->visit_type);
- }
- }
- return (t->visit_type = 0);
-}
-
-/*
- * Return error code.
- */
-int
-tree_errno(struct tree *t)
-{
- return (t->tree_errno);
-}
-
-/*
- * Called by the client to mark the directory just returned from
- * tree_next() as needing to be visited.
- */
-void
-tree_descend(struct tree *t)
-{
- if (t->visit_type != TREE_REGULAR)
- return;
-
- if (tree_current_is_physical_dir(t)) {
- tree_push(t, t->basename);
- t->stack->flags |= isDir;
- } else if (tree_current_is_dir(t)) {
- tree_push(t, t->basename);
- t->stack->flags |= isDirLink;
- }
-}
-
-/*
- * Get the stat() data for the entry just returned from tree_next().
- */
-const struct stat *
-tree_current_stat(struct tree *t)
-{
- if (!(t->flags & hasStat)) {
- if (stat(t->basename, &t->st) != 0)
- return NULL;
- t->flags |= hasStat;
- }
- return (&t->st);
-}
-
-/*
- * Get the lstat() data for the entry just returned from tree_next().
- */
-const struct stat *
-tree_current_lstat(struct tree *t)
-{
- if (!(t->flags & hasLstat)) {
- if (lstat(t->basename, &t->lst) != 0)
- return NULL;
- t->flags |= hasLstat;
- }
- return (&t->lst);
-}
-
-/*
- * Test whether current entry is a dir or link to a dir.
- */
-int
-tree_current_is_dir(struct tree *t)
-{
- const struct stat *st;
-
- /*
- * If we already have lstat() info, then try some
- * cheap tests to determine if this is a dir.
- */
- if (t->flags & hasLstat) {
- /* If lstat() says it's a dir, it must be a dir. */
- if (S_ISDIR(tree_current_lstat(t)->st_mode))
- return 1;
- /* Not a dir; might be a link to a dir. */
- /* If it's not a link, then it's not a link to a dir. */
- if (!S_ISLNK(tree_current_lstat(t)->st_mode))
- return 0;
- /*
- * It's a link, but we don't know what it's a link to,
- * so we'll have to use stat().
- */
- }
-
- st = tree_current_stat(t);
- /* If we can't stat it, it's not a dir. */
- if (st == NULL)
- return 0;
- /* Use the definitive test. Hopefully this is cached. */
- return (S_ISDIR(st->st_mode));
-}
-
-/*
- * Test whether current entry is a physical directory. Usually, we
- * already have at least one of stat() or lstat() in memory, so we
- * use tricks to try to avoid an extra trip to the disk.
- */
-int
-tree_current_is_physical_dir(struct tree *t)
-{
- const struct stat *st;
-
- /*
- * If stat() says it isn't a dir, then it's not a dir.
- * If stat() data is cached, this check is free, so do it first.
- */
- if ((t->flags & hasStat)
- && (!S_ISDIR(tree_current_stat(t)->st_mode)))
- return 0;
-
- /*
- * Either stat() said it was a dir (in which case, we have
- * to determine whether it's really a link to a dir) or
- * stat() info wasn't available. So we use lstat(), which
- * hopefully is already cached.
- */
-
- st = tree_current_lstat(t);
- /* If we can't stat it, it's not a dir. */
- if (st == NULL)
- return 0;
- /* Use the definitive test. Hopefully this is cached. */
- return (S_ISDIR(st->st_mode));
-}
-
-/*
- * Test whether current entry is a symbolic link.
- */
-int
-tree_current_is_physical_link(struct tree *t)
-{
- const struct stat *st = tree_current_lstat(t);
- if (st == NULL)
- return 0;
- return (S_ISLNK(st->st_mode));
-}
-
-/*
- * Return the access path for the entry just returned from tree_next().
- */
-const char *
-tree_current_access_path(struct tree *t)
-{
- return (t->basename);
-}
-
-/*
- * Return the full path for the entry just returned from tree_next().
- */
-const char *
-tree_current_path(struct tree *t)
-{
- return (t->buff);
-}
-
-/*
- * Return the length of the path for the entry just returned from tree_next().
- */
-size_t
-tree_current_pathlen(struct tree *t)
-{
- return (t->path_length);
-}
-
-/*
- * Return the nesting depth of the entry just returned from tree_next().
- */
-int
-tree_current_depth(struct tree *t)
-{
- return (t->depth);
-}
-
-/*
- * Terminate the traversal and release any resources.
- */
-void
-tree_close(struct tree *t)
-{
- /* Release anything remaining in the stack. */
- while (t->stack != NULL)
- tree_pop(t);
- if (t->buff)
- free(t->buff);
- /* chdir() back to where we started. */
-#ifdef HAVE_FCHDIR
- if (t->initialDirFd >= 0) {
- fchdir(t->initialDirFd);
- close(t->initialDirFd);
- t->initialDirFd = -1;
- }
-#elif defined(_WIN32) && !defined(__CYGWIN__)
- if (t->initialDir != NULL) {
- chdir(t->initialDir);
- free(t->initialDir);
- t->initialDir = NULL;
- }
-#endif
- free(t);
-}
diff --git a/usr.bin/tar/write.c b/usr.bin/tar/write.c
deleted file mode 100644
index a0a9b75..0000000
--- a/usr.bin/tar/write.c
+++ /dev/null
@@ -1,1177 +0,0 @@
-/*-
- * Copyright (c) 2003-2007 Tim Kientzle
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "bsdtar_platform.h"
-__FBSDID("$FreeBSD$");
-
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-#ifdef HAVE_ATTR_XATTR_H
-#include <attr/xattr.h>
-#endif
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#ifdef HAVE_GRP_H
-#include <grp.h>
-#endif
-#ifdef HAVE_IO_H
-#include <io.h>
-#endif
-#ifdef HAVE_LIMITS_H
-#include <limits.h>
-#endif
-#ifdef HAVE_LINUX_FS_H
-#include <linux/fs.h> /* for Linux file flags */
-#endif
-/*
- * Some Linux distributions have both linux/ext2_fs.h and ext2fs/ext2_fs.h.
- * As the include guards don't agree, the order of include is important.
- */
-#ifdef HAVE_LINUX_EXT2_FS_H
-#include <linux/ext2_fs.h> /* for Linux file flags */
-#endif
-#if defined(HAVE_EXT2FS_EXT2_FS_H) && !defined(__CYGWIN__)
-/* This header exists but is broken on Cygwin. */
-#include <ext2fs/ext2_fs.h>
-#endif
-#ifdef HAVE_PWD_H
-#include <pwd.h>
-#endif
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
-#include <stdio.h>
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#include "bsdtar.h"
-#include "err.h"
-#include "line_reader.h"
-#include "tree.h"
-
-/* Size of buffer for holding file data prior to writing. */
-#define FILEDATABUFLEN 65536
-
-/* Fixed size of uname/gname caches. */
-#define name_cache_size 101
-
-#ifndef O_BINARY
-#define O_BINARY 0
-#endif
-
-static const char * const NO_NAME = "(noname)";
-
-struct archive_dir_entry {
- struct archive_dir_entry *next;
- time_t mtime_sec;
- int mtime_nsec;
- char *name;
-};
-
-struct archive_dir {
- struct archive_dir_entry *head, *tail;
-};
-
-struct name_cache {
- int probes;
- int hits;
- size_t size;
- struct {
- id_t id;
- const char *name;
- } cache[name_cache_size];
-};
-
-static void add_dir_list(struct bsdtar *bsdtar, const char *path,
- time_t mtime_sec, int mtime_nsec);
-static int append_archive(struct bsdtar *, struct archive *,
- struct archive *ina);
-static int append_archive_filename(struct bsdtar *,
- struct archive *, const char *fname);
-static void archive_names_from_file(struct bsdtar *bsdtar,
- struct archive *a);
-static int copy_file_data(struct bsdtar *, struct archive *a,
- struct archive *ina, struct archive_entry *);
-static int new_enough(struct bsdtar *, const char *path,
- const struct stat *);
-static void report_write(struct bsdtar *, struct archive *,
- struct archive_entry *, int64_t progress);
-static void test_for_append(struct bsdtar *);
-static void write_archive(struct archive *, struct bsdtar *);
-static void write_entry_backend(struct bsdtar *, struct archive *,
- struct archive_entry *);
-static int write_file_data(struct bsdtar *, struct archive *,
- struct archive_entry *, int fd);
-static void write_hierarchy(struct bsdtar *, struct archive *,
- const char *);
-
-#if defined(_WIN32) && !defined(__CYGWIN__)
-/* Not a full lseek() emulation, but enough for our needs here. */
-static int
-seek_file(int fd, int64_t offset, int whence)
-{
- LARGE_INTEGER distance;
- (void)whence; /* UNUSED */
- distance.QuadPart = offset;
- return (SetFilePointerEx((HANDLE)_get_osfhandle(fd),
- distance, NULL, FILE_BEGIN) ? 1 : -1);
-}
-#define open _open
-#define close _close
-#define read _read
-#define lseek seek_file
-#endif
-
-void
-tar_mode_c(struct bsdtar *bsdtar)
-{
- struct archive *a;
- int r;
-
- if (*bsdtar->argv == NULL && bsdtar->names_from_file == NULL)
- lafe_errc(1, 0, "no files or directories specified");
-
- a = archive_write_new();
-
- /* Support any format that the library supports. */
- if (bsdtar->create_format == NULL) {
- r = archive_write_set_format_pax_restricted(a);
- bsdtar->create_format = "pax restricted";
- } else {
- r = archive_write_set_format_by_name(a, bsdtar->create_format);
- }
- if (r != ARCHIVE_OK) {
- fprintf(stderr, "Can't use format %s: %s\n",
- bsdtar->create_format,
- archive_error_string(a));
- usage();
- }
-
- /*
- * If user explicitly set the block size, then assume they
- * want the last block padded as well. Otherwise, use the
- * default block size and accept archive_write_open_file()'s
- * default padding decisions.
- */
- if (bsdtar->bytes_per_block != 0) {
- archive_write_set_bytes_per_block(a, bsdtar->bytes_per_block);
- archive_write_set_bytes_in_last_block(a,
- bsdtar->bytes_per_block);
- } else
- archive_write_set_bytes_per_block(a, DEFAULT_BYTES_PER_BLOCK);
-
- if (bsdtar->compress_program) {
- archive_write_set_compression_program(a, bsdtar->compress_program);
- } else {
- switch (bsdtar->create_compression) {
- case 0:
- r = archive_write_set_compression_none(a);
- break;
- case 'j': case 'y':
- r = archive_write_set_compression_bzip2(a);
- break;
- case 'J':
- r = archive_write_set_compression_xz(a);
- break;
- case OPTION_LZMA:
- r = archive_write_set_compression_lzma(a);
- break;
- case 'z':
- r = archive_write_set_compression_gzip(a);
- break;
- case 'Z':
- r = archive_write_set_compression_compress(a);
- break;
- default:
- lafe_errc(1, 0,
- "Unrecognized compression option -%c",
- bsdtar->create_compression);
- }
- if (r != ARCHIVE_OK) {
- lafe_errc(1, 0,
- "Unsupported compression option -%c",
- bsdtar->create_compression);
- }
- }
-
- if (ARCHIVE_OK != archive_write_set_options(a, bsdtar->option_options))
- lafe_errc(1, 0, "%s", archive_error_string(a));
- if (ARCHIVE_OK != archive_write_open_file(a, bsdtar->filename))
- lafe_errc(1, 0, "%s", archive_error_string(a));
- write_archive(a, bsdtar);
-}
-
-/*
- * Same as 'c', except we only support tar or empty formats in
- * uncompressed files on disk.
- */
-void
-tar_mode_r(struct bsdtar *bsdtar)
-{
- int64_t end_offset;
- int format;
- struct archive *a;
- struct archive_entry *entry;
- int r;
-
- /* Sanity-test some arguments and the file. */
- test_for_append(bsdtar);
-
- format = ARCHIVE_FORMAT_TAR_PAX_RESTRICTED;
-
-#if defined(__BORLANDC__)
- bsdtar->fd = open(bsdtar->filename, O_RDWR | O_CREAT | O_BINARY);
-#else
- bsdtar->fd = open(bsdtar->filename, O_RDWR | O_CREAT | O_BINARY, 0666);
-#endif
- if (bsdtar->fd < 0)
- lafe_errc(1, errno,
- "Cannot open %s", bsdtar->filename);
-
- a = archive_read_new();
- archive_read_support_compression_all(a);
- archive_read_support_format_tar(a);
- archive_read_support_format_gnutar(a);
- r = archive_read_open_fd(a, bsdtar->fd, 10240);
- if (r != ARCHIVE_OK)
- lafe_errc(1, archive_errno(a),
- "Can't read archive %s: %s", bsdtar->filename,
- archive_error_string(a));
- while (0 == archive_read_next_header(a, &entry)) {
- if (archive_compression(a) != ARCHIVE_COMPRESSION_NONE) {
- archive_read_finish(a);
- close(bsdtar->fd);
- lafe_errc(1, 0,
- "Cannot append to compressed archive.");
- }
- /* Keep going until we hit end-of-archive */
- format = archive_format(a);
- }
-
- end_offset = archive_read_header_position(a);
- archive_read_finish(a);
-
- /* Re-open archive for writing */
- a = archive_write_new();
- archive_write_set_compression_none(a);
- /*
- * Set the format to be used for writing. To allow people to
- * extend empty files, we need to allow them to specify the format,
- * which opens the possibility that they will specify a format that
- * doesn't match the existing format. Hence, the following bit
- * of arcane ugliness.
- */
-
- if (bsdtar->create_format != NULL) {
- /* If the user requested a format, use that, but ... */
- archive_write_set_format_by_name(a,
- bsdtar->create_format);
- /* ... complain if it's not compatible. */
- format &= ARCHIVE_FORMAT_BASE_MASK;
- if (format != (int)(archive_format(a) & ARCHIVE_FORMAT_BASE_MASK)
- && format != ARCHIVE_FORMAT_EMPTY) {
- lafe_errc(1, 0,
- "Format %s is incompatible with the archive %s.",
- bsdtar->create_format, bsdtar->filename);
- }
- } else {
- /*
- * Just preserve the current format, with a little care
- * for formats that libarchive can't write.
- */
- if (format == ARCHIVE_FORMAT_TAR_GNUTAR)
- /* TODO: When gtar supports pax, use pax restricted. */
- format = ARCHIVE_FORMAT_TAR_USTAR;
- if (format == ARCHIVE_FORMAT_EMPTY)
- format = ARCHIVE_FORMAT_TAR_PAX_RESTRICTED;
- archive_write_set_format(a, format);
- }
- if (lseek(bsdtar->fd, end_offset, SEEK_SET) < 0)
- lafe_errc(1, errno, "Could not seek to archive end");
- if (ARCHIVE_OK != archive_write_set_options(a, bsdtar->option_options))
- lafe_errc(1, 0, "%s", archive_error_string(a));
- if (ARCHIVE_OK != archive_write_open_fd(a, bsdtar->fd))
- lafe_errc(1, 0, "%s", archive_error_string(a));
-
- write_archive(a, bsdtar); /* XXX check return val XXX */
-
- close(bsdtar->fd);
- bsdtar->fd = -1;
-}
-
-void
-tar_mode_u(struct bsdtar *bsdtar)
-{
- int64_t end_offset;
- struct archive *a;
- struct archive_entry *entry;
- int format;
- struct archive_dir_entry *p;
- struct archive_dir archive_dir;
-
- bsdtar->archive_dir = &archive_dir;
- memset(&archive_dir, 0, sizeof(archive_dir));
-
- format = ARCHIVE_FORMAT_TAR_PAX_RESTRICTED;
-
- /* Sanity-test some arguments and the file. */
- test_for_append(bsdtar);
-
- bsdtar->fd = open(bsdtar->filename, O_RDWR | O_BINARY);
- if (bsdtar->fd < 0)
- lafe_errc(1, errno,
- "Cannot open %s", bsdtar->filename);
-
- a = archive_read_new();
- archive_read_support_compression_all(a);
- archive_read_support_format_tar(a);
- archive_read_support_format_gnutar(a);
- if (archive_read_open_fd(a, bsdtar->fd,
- bsdtar->bytes_per_block != 0 ? bsdtar->bytes_per_block :
- DEFAULT_BYTES_PER_BLOCK) != ARCHIVE_OK) {
- lafe_errc(1, 0,
- "Can't open %s: %s", bsdtar->filename,
- archive_error_string(a));
- }
-
- /* Build a list of all entries and their recorded mod times. */
- while (0 == archive_read_next_header(a, &entry)) {
- if (archive_compression(a) != ARCHIVE_COMPRESSION_NONE) {
- archive_read_finish(a);
- close(bsdtar->fd);
- lafe_errc(1, 0,
- "Cannot append to compressed archive.");
- }
- add_dir_list(bsdtar, archive_entry_pathname(entry),
- archive_entry_mtime(entry),
- archive_entry_mtime_nsec(entry));
- /* Record the last format determination we see */
- format = archive_format(a);
- /* Keep going until we hit end-of-archive */
- }
-
- end_offset = archive_read_header_position(a);
- archive_read_finish(a);
-
- /* Re-open archive for writing. */
- a = archive_write_new();
- archive_write_set_compression_none(a);
- /*
- * Set format to same one auto-detected above, except that
- * we don't write GNU tar format, so use ustar instead.
- */
- if (format == ARCHIVE_FORMAT_TAR_GNUTAR)
- format = ARCHIVE_FORMAT_TAR_USTAR;
- archive_write_set_format(a, format);
- if (bsdtar->bytes_per_block != 0) {
- archive_write_set_bytes_per_block(a, bsdtar->bytes_per_block);
- archive_write_set_bytes_in_last_block(a,
- bsdtar->bytes_per_block);
- } else
- archive_write_set_bytes_per_block(a, DEFAULT_BYTES_PER_BLOCK);
- if (lseek(bsdtar->fd, end_offset, SEEK_SET) < 0)
- lafe_errc(1, errno, "Could not seek to archive end");
- if (ARCHIVE_OK != archive_write_set_options(a, bsdtar->option_options))
- lafe_errc(1, 0, "%s", archive_error_string(a));
- if (ARCHIVE_OK != archive_write_open_fd(a, bsdtar->fd))
- lafe_errc(1, 0, "%s", archive_error_string(a));
-
- write_archive(a, bsdtar);
-
- close(bsdtar->fd);
- bsdtar->fd = -1;
-
- while (bsdtar->archive_dir->head != NULL) {
- p = bsdtar->archive_dir->head->next;
- free(bsdtar->archive_dir->head->name);
- free(bsdtar->archive_dir->head);
- bsdtar->archive_dir->head = p;
- }
- bsdtar->archive_dir->tail = NULL;
-}
-
-
-/*
- * Write user-specified files/dirs to opened archive.
- */
-static void
-write_archive(struct archive *a, struct bsdtar *bsdtar)
-{
- const char *arg;
- struct archive_entry *entry, *sparse_entry;
-
- /* Allocate a buffer for file data. */
- if ((bsdtar->buff = malloc(FILEDATABUFLEN)) == NULL)
- lafe_errc(1, 0, "cannot allocate memory");
-
- if ((bsdtar->resolver = archive_entry_linkresolver_new()) == NULL)
- lafe_errc(1, 0, "cannot create link resolver");
- archive_entry_linkresolver_set_strategy(bsdtar->resolver,
- archive_format(a));
- if ((bsdtar->diskreader = archive_read_disk_new()) == NULL)
- lafe_errc(1, 0, "Cannot create read_disk object");
- archive_read_disk_set_standard_lookup(bsdtar->diskreader);
-
- if (bsdtar->names_from_file != NULL)
- archive_names_from_file(bsdtar, a);
-
- while (*bsdtar->argv) {
- arg = *bsdtar->argv;
- if (arg[0] == '-' && arg[1] == 'C') {
- arg += 2;
- if (*arg == '\0') {
- bsdtar->argv++;
- arg = *bsdtar->argv;
- if (arg == NULL) {
- lafe_warnc(0, "%s",
- "Missing argument for -C");
- bsdtar->return_value = 1;
- goto cleanup;
- }
- }
- set_chdir(bsdtar, arg);
- } else {
- if (*arg != '/' && (arg[0] != '@' || arg[1] != '/'))
- do_chdir(bsdtar); /* Handle a deferred -C */
- if (*arg == '@') {
- if (append_archive_filename(bsdtar, a,
- arg + 1) != 0)
- break;
- } else
- write_hierarchy(bsdtar, a, arg);
- }
- bsdtar->argv++;
- }
-
- entry = NULL;
- archive_entry_linkify(bsdtar->resolver, &entry, &sparse_entry);
- while (entry != NULL) {
- write_entry_backend(bsdtar, a, entry);
- archive_entry_free(entry);
- entry = NULL;
- archive_entry_linkify(bsdtar->resolver, &entry, &sparse_entry);
- }
-
- if (archive_write_close(a)) {
- lafe_warnc(0, "%s", archive_error_string(a));
- bsdtar->return_value = 1;
- }
-
-cleanup:
- /* Free file data buffer. */
- free(bsdtar->buff);
- archive_entry_linkresolver_free(bsdtar->resolver);
- bsdtar->resolver = NULL;
- archive_read_finish(bsdtar->diskreader);
- bsdtar->diskreader = NULL;
-
- if (bsdtar->option_totals) {
- fprintf(stderr, "Total bytes written: %s\n",
- tar_i64toa(archive_position_compressed(a)));
- }
-
- archive_write_finish(a);
-}
-
-/*
- * Archive names specified in file.
- *
- * Unless --null was specified, a line containing exactly "-C" will
- * cause the next line to be a directory to pass to chdir(). If
- * --null is specified, then a line "-C" is just another filename.
- */
-static void
-archive_names_from_file(struct bsdtar *bsdtar, struct archive *a)
-{
- struct lafe_line_reader *lr;
- const char *line;
-
- bsdtar->next_line_is_dir = 0;
-
- lr = lafe_line_reader(bsdtar->names_from_file, bsdtar->option_null);
- while ((line = lafe_line_reader_next(lr)) != NULL) {
- if (bsdtar->next_line_is_dir) {
- set_chdir(bsdtar, line);
- bsdtar->next_line_is_dir = 0;
- } else if (!bsdtar->option_null && strcmp(line, "-C") == 0)
- bsdtar->next_line_is_dir = 1;
- else {
- if (*line != '/')
- do_chdir(bsdtar); /* Handle a deferred -C */
- write_hierarchy(bsdtar, a, line);
- }
- }
- lafe_line_reader_free(lr);
- if (bsdtar->next_line_is_dir)
- lafe_errc(1, errno,
- "Unexpected end of filename list; "
- "directory expected after -C");
-}
-
-/*
- * Copy from specified archive to current archive. Returns non-zero
- * for write errors (which force us to terminate the entire archiving
- * operation). If there are errors reading the input archive, we set
- * bsdtar->return_value but return zero, so the overall archiving
- * operation will complete and return non-zero.
- */
-static int
-append_archive_filename(struct bsdtar *bsdtar, struct archive *a,
- const char *filename)
-{
- struct archive *ina;
- int rc;
-
- if (strcmp(filename, "-") == 0)
- filename = NULL; /* Library uses NULL for stdio. */
-
- ina = archive_read_new();
- archive_read_support_format_all(ina);
- archive_read_support_compression_all(ina);
- if (archive_read_open_file(ina, filename, 10240)) {
- lafe_warnc(0, "%s", archive_error_string(ina));
- bsdtar->return_value = 1;
- return (0);
- }
-
- rc = append_archive(bsdtar, a, ina);
-
- if (rc != ARCHIVE_OK) {
- lafe_warnc(0, "Error reading archive %s: %s",
- filename, archive_error_string(ina));
- bsdtar->return_value = 1;
- }
- archive_read_finish(ina);
-
- return (rc);
-}
-
-static int
-append_archive(struct bsdtar *bsdtar, struct archive *a, struct archive *ina)
-{
- struct archive_entry *in_entry;
- int e;
-
- while (0 == archive_read_next_header(ina, &in_entry)) {
- if (!new_enough(bsdtar, archive_entry_pathname(in_entry),
- archive_entry_stat(in_entry)))
- continue;
- if (lafe_excluded(bsdtar->matching, archive_entry_pathname(in_entry)))
- continue;
- if (bsdtar->option_interactive &&
- !yes("copy '%s'", archive_entry_pathname(in_entry)))
- continue;
- if (bsdtar->verbose)
- safe_fprintf(stderr, "a %s",
- archive_entry_pathname(in_entry));
- if (need_report())
- report_write(bsdtar, a, in_entry, 0);
-
- e = archive_write_header(a, in_entry);
- if (e != ARCHIVE_OK) {
- if (!bsdtar->verbose)
- lafe_warnc(0, "%s: %s",
- archive_entry_pathname(in_entry),
- archive_error_string(a));
- else
- fprintf(stderr, ": %s", archive_error_string(a));
- }
- if (e == ARCHIVE_FATAL)
- exit(1);
-
- if (e >= ARCHIVE_WARN) {
- if (archive_entry_size(in_entry) == 0)
- archive_read_data_skip(ina);
- else if (copy_file_data(bsdtar, a, ina, in_entry))
- exit(1);
- }
-
- if (bsdtar->verbose)
- fprintf(stderr, "\n");
- }
-
- /* Note: If we got here, we saw no write errors, so return success. */
- return (0);
-}
-
-/* Helper function to copy data between archives. */
-static int
-copy_file_data(struct bsdtar *bsdtar, struct archive *a,
- struct archive *ina, struct archive_entry *entry)
-{
- ssize_t bytes_read;
- ssize_t bytes_written;
- int64_t progress = 0;
-
- bytes_read = archive_read_data(ina, bsdtar->buff, FILEDATABUFLEN);
- while (bytes_read > 0) {
- if (need_report())
- report_write(bsdtar, a, entry, progress);
-
- bytes_written = archive_write_data(a, bsdtar->buff,
- bytes_read);
- if (bytes_written < bytes_read) {
- lafe_warnc(0, "%s", archive_error_string(a));
- return (-1);
- }
- progress += bytes_written;
- bytes_read = archive_read_data(ina, bsdtar->buff,
- FILEDATABUFLEN);
- }
-
- return (0);
-}
-
-/*
- * Add the file or dir hierarchy named by 'path' to the archive
- */
-static void
-write_hierarchy(struct bsdtar *bsdtar, struct archive *a, const char *path)
-{
- struct archive_entry *entry = NULL, *spare_entry = NULL;
- struct tree *tree;
- char symlink_mode = bsdtar->symlink_mode;
- dev_t first_dev = 0;
- int dev_recorded = 0;
- int tree_ret;
-
- tree = tree_open(path);
-
- if (!tree) {
- lafe_warnc(errno, "%s: Cannot open", path);
- bsdtar->return_value = 1;
- return;
- }
-
- while ((tree_ret = tree_next(tree)) != 0) {
- int r;
- const char *name = tree_current_path(tree);
- const struct stat *st = NULL; /* info to use for this entry */
- const struct stat *lst = NULL; /* lstat() information */
- int descend;
-
- if (tree_ret == TREE_ERROR_FATAL)
- lafe_errc(1, tree_errno(tree),
- "%s: Unable to continue traversing directory tree",
- name);
- if (tree_ret == TREE_ERROR_DIR) {
- lafe_warnc(errno,
- "%s: Couldn't visit directory", name);
- bsdtar->return_value = 1;
- }
- if (tree_ret != TREE_REGULAR)
- continue;
-
- /*
- * If this file/dir is excluded by a filename
- * pattern, skip it.
- */
- if (lafe_excluded(bsdtar->matching, name))
- continue;
-
- /*
- * Get lstat() info from the tree library.
- */
- lst = tree_current_lstat(tree);
- if (lst == NULL) {
- /* Couldn't lstat(); must not exist. */
- lafe_warnc(errno, "%s: Cannot stat", name);
- /* Return error if files disappear during traverse. */
- bsdtar->return_value = 1;
- continue;
- }
-
- /*
- * Distinguish 'L'/'P'/'H' symlink following.
- */
- switch(symlink_mode) {
- case 'H':
- /* 'H': After the first item, rest like 'P'. */
- symlink_mode = 'P';
- /* 'H': First item (from command line) like 'L'. */
- /* FALLTHROUGH */
- case 'L':
- /* 'L': Do descend through a symlink to dir. */
- descend = tree_current_is_dir(tree);
- /* 'L': Follow symlinks to files. */
- archive_read_disk_set_symlink_logical(bsdtar->diskreader);
- /* 'L': Archive symlinks as targets, if we can. */
- st = tree_current_stat(tree);
- if (st != NULL)
- break;
- /* If stat fails, we have a broken symlink;
- * in that case, don't follow the link. */
- /* FALLTHROUGH */
- default:
- /* 'P': Don't descend through a symlink to dir. */
- descend = tree_current_is_physical_dir(tree);
- /* 'P': Don't follow symlinks to files. */
- archive_read_disk_set_symlink_physical(bsdtar->diskreader);
- /* 'P': Archive symlinks as symlinks. */
- st = lst;
- break;
- }
-
- if (bsdtar->option_no_subdirs)
- descend = 0;
-
- /*
- * Are we about to cross to a new filesystem?
- */
- if (!dev_recorded) {
- /* This is the initial file system. */
- first_dev = lst->st_dev;
- dev_recorded = 1;
- } else if (lst->st_dev == first_dev) {
- /* The starting file system is always acceptable. */
- } else if (descend == 0) {
- /* We're not descending, so no need to check. */
- } else if (bsdtar->option_dont_traverse_mounts) {
- descend = 0;
- } else {
- /* We're prepared to cross a mount point. */
-
- /* XXX TODO: check whether this filesystem is
- * synthetic and/or local. Add a new
- * --local-only option to skip non-local
- * filesystems. Skip synthetic filesystems
- * regardless.
- *
- * The results should be cached, since
- * tree.c doesn't usually visit a directory
- * and the directory contents together. A simple
- * move-to-front list should perform quite well.
- *
- * This is going to be heavily OS dependent:
- * FreeBSD's statfs() in conjunction with getvfsbyname()
- * provides all of this; NetBSD's statvfs() does
- * most of it; other systems will vary.
- */
- }
-
- /*
- * In -u mode, check that the file is newer than what's
- * already in the archive; in all modes, obey --newerXXX flags.
- */
- if (!new_enough(bsdtar, name, st)) {
- if (!descend)
- continue;
- if (bsdtar->option_interactive &&
- !yes("add '%s'", name))
- continue;
- tree_descend(tree);
- continue;
- }
-
- archive_entry_free(entry);
- entry = archive_entry_new();
-
- archive_entry_set_pathname(entry, name);
- archive_entry_copy_sourcepath(entry,
- tree_current_access_path(tree));
-
- /* Populate the archive_entry with metadata from the disk. */
- /* XXX TODO: Arrange to open a regular file before
- * calling this so we can pass in an fd and shorten
- * the race to query metadata. The linkify dance
- * makes this more complex than it might sound. */
-#if defined(_WIN32) && !defined(__CYGWIN__)
- /* TODO: tree.c uses stat(), which is badly broken
- * on Windows. To fix this, we should
- * deprecate tree_current_stat() and provide a new
- * call tree_populate_entry(t, entry). This call
- * would use stat() internally on POSIX and
- * GetInfoByFileHandle() internally on Windows.
- * This would be another step towards a tree-walker
- * that can be integrated deep into libarchive.
- * For now, just set st to NULL on Windows;
- * archive_read_disk_entry_from_file() should
- * be smart enough to use platform-appropriate
- * ways to probe file information.
- */
- st = NULL;
-#endif
- r = archive_read_disk_entry_from_file(bsdtar->diskreader,
- entry, -1, st);
- if (bsdtar->uid >= 0) {
- archive_entry_set_uid(entry, bsdtar->uid);
- if (!bsdtar->uname)
- archive_entry_set_uname(entry,
- archive_read_disk_uname(bsdtar->diskreader,
- bsdtar->uid));
- }
- if (bsdtar->gid >= 0) {
- archive_entry_set_gid(entry, bsdtar->gid);
- if (!bsdtar->gname)
- archive_entry_set_gname(entry,
- archive_read_disk_gname(bsdtar->diskreader,
- bsdtar->gid));
- }
- if (bsdtar->uname)
- archive_entry_set_uname(entry, bsdtar->uname);
- if (bsdtar->gname)
- archive_entry_set_gname(entry, bsdtar->gname);
- if (r != ARCHIVE_OK)
- lafe_warnc(archive_errno(bsdtar->diskreader),
- "%s", archive_error_string(bsdtar->diskreader));
- if (r < ARCHIVE_WARN)
- continue;
-
- /* XXX TODO: Just use flag data from entry; avoid the
- * duplicate check here. */
-
- /*
- * If this file/dir is flagged "nodump" and we're
- * honoring such flags, skip this file/dir.
- */
-#if defined(HAVE_STRUCT_STAT_ST_FLAGS) && defined(UF_NODUMP)
- /* BSD systems store flags in struct stat */
- if (bsdtar->option_honor_nodump &&
- (lst->st_flags & UF_NODUMP))
- continue;
-#endif
-
-#if defined(EXT2_IOC_GETFLAGS) && defined(EXT2_NODUMP_FL)
- /* Linux uses ioctl to read flags. */
- if (bsdtar->option_honor_nodump) {
- int fd = open(name, O_RDONLY | O_NONBLOCK | O_BINARY);
- if (fd >= 0) {
- unsigned long fflags;
- int r = ioctl(fd, EXT2_IOC_GETFLAGS, &fflags);
- close(fd);
- if (r >= 0 && (fflags & EXT2_NODUMP_FL))
- continue;
- }
- }
-#endif
-
- /*
- * If the user vetoes this file/directory, skip it.
- * We want this to be fairly late; if some other
- * check would veto this file, we shouldn't bother
- * the user with it.
- */
- if (bsdtar->option_interactive &&
- !yes("add '%s'", name))
- continue;
-
- if (descend)
- tree_descend(tree);
-
- /*
- * Rewrite the pathname to be archived. If rewrite
- * fails, skip the entry.
- */
- if (edit_pathname(bsdtar, entry))
- continue;
-
- /* Display entry as we process it.
- * This format is required by SUSv2. */
- if (bsdtar->verbose)
- safe_fprintf(stderr, "a %s",
- archive_entry_pathname(entry));
-
- /* Non-regular files get archived with zero size. */
- if (archive_entry_filetype(entry) != AE_IFREG)
- archive_entry_set_size(entry, 0);
-
- archive_entry_linkify(bsdtar->resolver, &entry, &spare_entry);
-
- while (entry != NULL) {
- write_entry_backend(bsdtar, a, entry);
- archive_entry_free(entry);
- entry = spare_entry;
- spare_entry = NULL;
- }
-
- if (bsdtar->verbose)
- fprintf(stderr, "\n");
- }
- archive_entry_free(entry);
- tree_close(tree);
-}
-
-/*
- * Backend for write_entry.
- */
-static void
-write_entry_backend(struct bsdtar *bsdtar, struct archive *a,
- struct archive_entry *entry)
-{
- int fd = -1;
- int e;
-
- if (archive_entry_size(entry) > 0) {
- const char *pathname = archive_entry_sourcepath(entry);
- fd = open(pathname, O_RDONLY | O_BINARY);
- if (fd == -1) {
- bsdtar->return_value = 1;
- if (!bsdtar->verbose)
- lafe_warnc(errno,
- "%s: could not open file", pathname);
- else
- fprintf(stderr, ": %s", strerror(errno));
- return;
- }
- }
-
- e = archive_write_header(a, entry);
- if (e != ARCHIVE_OK) {
- if (!bsdtar->verbose)
- lafe_warnc(0, "%s: %s",
- archive_entry_pathname(entry),
- archive_error_string(a));
- else
- fprintf(stderr, ": %s", archive_error_string(a));
- }
-
- if (e == ARCHIVE_FATAL)
- exit(1);
-
- /*
- * If we opened a file earlier, write it out now. Note that
- * the format handler might have reset the size field to zero
- * to inform us that the archive body won't get stored. In
- * that case, just skip the write.
- */
- if (e >= ARCHIVE_WARN && fd >= 0 && archive_entry_size(entry) > 0) {
- if (write_file_data(bsdtar, a, entry, fd))
- exit(1);
- }
-
- /*
- * If we opened a file, close it now even if there was an error
- * which made us decide not to write the archive body.
- */
- if (fd >= 0)
- close(fd);
-}
-
-static void
-report_write(struct bsdtar *bsdtar, struct archive *a,
- struct archive_entry *entry, int64_t progress)
-{
- uint64_t comp, uncomp;
- int compression;
-
- if (bsdtar->verbose)
- fprintf(stderr, "\n");
- comp = archive_position_compressed(a);
- uncomp = archive_position_uncompressed(a);
- fprintf(stderr, "In: %d files, %s bytes;",
- archive_file_count(a), tar_i64toa(uncomp));
- if (comp > uncomp)
- compression = 0;
- else
- compression = (int)((uncomp - comp) * 100 / uncomp);
- fprintf(stderr,
- " Out: %s bytes, compression %d%%\n",
- tar_i64toa(comp), compression);
- /* Can't have two calls to tar_i64toa() pending, so split the output. */
- safe_fprintf(stderr, "Current: %s (%s",
- archive_entry_pathname(entry),
- tar_i64toa(progress));
- fprintf(stderr, "/%s bytes)\n",
- tar_i64toa(archive_entry_size(entry)));
-}
-
-
-/* Helper function to copy file to archive. */
-static int
-write_file_data(struct bsdtar *bsdtar, struct archive *a,
- struct archive_entry *entry, int fd)
-{
- ssize_t bytes_read;
- ssize_t bytes_written;
- int64_t progress = 0;
-
- bytes_read = read(fd, bsdtar->buff, FILEDATABUFLEN);
- while (bytes_read > 0) {
- if (need_report())
- report_write(bsdtar, a, entry, progress);
-
- bytes_written = archive_write_data(a, bsdtar->buff,
- bytes_read);
- if (bytes_written < 0) {
- /* Write failed; this is bad */
- lafe_warnc(0, "%s", archive_error_string(a));
- return (-1);
- }
- if (bytes_written < bytes_read) {
- /* Write was truncated; warn but continue. */
- lafe_warnc(0,
- "%s: Truncated write; file may have grown while being archived.",
- archive_entry_pathname(entry));
- return (0);
- }
- progress += bytes_written;
- bytes_read = read(fd, bsdtar->buff, FILEDATABUFLEN);
- }
- if (bytes_read < 0) {
- lafe_warnc(errno,
- "%s: Read error",
- archive_entry_pathname(entry));
- bsdtar->return_value = 1;
- }
- return 0;
-}
-
-/*
- * Test if the specified file is new enough to include in the archive.
- */
-static int
-new_enough(struct bsdtar *bsdtar, const char *path, const struct stat *st)
-{
- struct archive_dir_entry *p;
-
- /*
- * If this file/dir is excluded by a time comparison, skip it.
- */
- if (bsdtar->newer_ctime_sec > 0) {
- if (st->st_ctime < bsdtar->newer_ctime_sec)
- return (0); /* Too old, skip it. */
- if (st->st_ctime == bsdtar->newer_ctime_sec
- && ARCHIVE_STAT_CTIME_NANOS(st)
- <= bsdtar->newer_ctime_nsec)
- return (0); /* Too old, skip it. */
- }
- if (bsdtar->newer_mtime_sec > 0) {
- if (st->st_mtime < bsdtar->newer_mtime_sec)
- return (0); /* Too old, skip it. */
- if (st->st_mtime == bsdtar->newer_mtime_sec
- && ARCHIVE_STAT_MTIME_NANOS(st)
- <= bsdtar->newer_mtime_nsec)
- return (0); /* Too old, skip it. */
- }
-
- /*
- * In -u mode, we only write an entry if it's newer than
- * what was already in the archive.
- */
- if (bsdtar->archive_dir != NULL &&
- bsdtar->archive_dir->head != NULL) {
- for (p = bsdtar->archive_dir->head; p != NULL; p = p->next) {
- if (pathcmp(path, p->name)==0)
- return (p->mtime_sec < st->st_mtime ||
- (p->mtime_sec == st->st_mtime &&
- p->mtime_nsec
- < ARCHIVE_STAT_MTIME_NANOS(st)));
- }
- }
-
- /* If the file wasn't rejected, include it. */
- return (1);
-}
-
-/*
- * Add an entry to the dir list for 'u' mode.
- *
- * XXX TODO: Make this fast.
- */
-static void
-add_dir_list(struct bsdtar *bsdtar, const char *path,
- time_t mtime_sec, int mtime_nsec)
-{
- struct archive_dir_entry *p;
-
- /*
- * Search entire list to see if this file has appeared before.
- * If it has, override the timestamp data.
- */
- p = bsdtar->archive_dir->head;
- while (p != NULL) {
- if (strcmp(path, p->name)==0) {
- p->mtime_sec = mtime_sec;
- p->mtime_nsec = mtime_nsec;
- return;
- }
- p = p->next;
- }
-
- p = malloc(sizeof(*p));
- if (p == NULL)
- lafe_errc(1, ENOMEM, "Can't read archive directory");
-
- p->name = strdup(path);
- if (p->name == NULL)
- lafe_errc(1, ENOMEM, "Can't read archive directory");
- p->mtime_sec = mtime_sec;
- p->mtime_nsec = mtime_nsec;
- p->next = NULL;
- if (bsdtar->archive_dir->tail == NULL) {
- bsdtar->archive_dir->head = bsdtar->archive_dir->tail = p;
- } else {
- bsdtar->archive_dir->tail->next = p;
- bsdtar->archive_dir->tail = p;
- }
-}
-
-static void
-test_for_append(struct bsdtar *bsdtar)
-{
- struct stat s;
-
- if (*bsdtar->argv == NULL && bsdtar->names_from_file == NULL)
- lafe_errc(1, 0, "no files or directories specified");
- if (bsdtar->filename == NULL)
- lafe_errc(1, 0, "Cannot append to stdout.");
-
- if (bsdtar->create_compression != 0)
- lafe_errc(1, 0,
- "Cannot append to %s with compression", bsdtar->filename);
-
- if (stat(bsdtar->filename, &s) != 0)
- return;
-
- if (!S_ISREG(s.st_mode) && !S_ISBLK(s.st_mode))
- lafe_errc(1, 0,
- "Cannot append to %s: not a regular file.",
- bsdtar->filename);
-
-/* Is this an appropriate check here on Windows? */
-/*
- if (GetFileType(handle) != FILE_TYPE_DISK)
- lafe_errc(1, 0, "Cannot append");
-*/
-
-}
diff --git a/usr.bin/tftp/main.c b/usr.bin/tftp/main.c
index 2b0172e..669299b 100644
--- a/usr.bin/tftp/main.c
+++ b/usr.bin/tftp/main.c
@@ -437,16 +437,16 @@ put(int argc, char *argv[])
return;
}
targ = argv[argc - 1];
- if (rindex(argv[argc - 1], ':')) {
+ if (strrchr(argv[argc - 1], ':')) {
char *lcp;
for (n = 1; n < argc - 1; n++)
- if (index(argv[n], ':')) {
+ if (strchr(argv[n], ':')) {
putusage(argv[0]);
return;
}
lcp = argv[argc - 1];
- targ = rindex(lcp, ':');
+ targ = strrchr(lcp, ':');
*targ++ = 0;
if (lcp[0] == '[' && lcp[strlen(lcp) - 1] == ']') {
lcp[strlen(lcp) - 1] = '\0';
@@ -477,7 +477,7 @@ put(int argc, char *argv[])
}
/* this assumes the target is a directory */
/* on a remote unix system. hmmmm. */
- cp = index(targ, '\0');
+ cp = strchr(targ, '\0');
*cp++ = '/';
for (n = 1; n < argc - 1; n++) {
strcpy(cp, tail(argv[n]));
@@ -532,7 +532,7 @@ get(int argc, char *argv[])
}
if (!connected) {
for (n = 1; n < argc ; n++)
- if (rindex(argv[n], ':') == 0) {
+ if (strrchr(argv[n], ':') == 0) {
printf("No remote host specified and "
"no host given for file '%s'\n", argv[n]);
getusage(argv[0]);
@@ -540,7 +540,7 @@ get(int argc, char *argv[])
}
}
for (n = 1; n < argc ; n++) {
- src = rindex(argv[n], ':');
+ src = strrchr(argv[n], ':');
if (src == NULL)
src = argv[n];
else {
@@ -681,7 +681,7 @@ tail(char *filename)
char *s;
while (*filename) {
- s = rindex(filename, '/');
+ s = strrchr(filename, '/');
if (s == NULL)
break;
if (s[1])
@@ -734,7 +734,7 @@ command(void)
history(hist, &he, H_ENTER, bp);
} else {
line[0] = 0;
- if (fgets(line, sizeof line , stdin) == 0) {
+ if (fgets(line, sizeof line , stdin) == NULL) {
if (feof(stdin)) {
exit(txrx_error);
} else {
diff --git a/usr.bin/tip/tip/tip.h b/usr.bin/tip/tip/tip.h
index 2aa248a..7e7faa6 100644
--- a/usr.bin/tip/tip/tip.h
+++ b/usr.bin/tip/tip/tip.h
@@ -99,7 +99,7 @@ typedef
char *v_name; /* whose name is it */
char v_type; /* for interpreting set's */
char v_access; /* protection of touchy ones */
- char *v_abrev; /* possible abreviation */
+ char *v_abrev; /* possible abbreviation */
char *v_value; /* casted to a union later */
}
value_t;
@@ -162,7 +162,7 @@ typedef
/*
* Escape command table definitions --
* lookup in this table is performed when ``escapec'' is recognized
- * at the begining of a line (as defined by the eolmarks variable).
+ * at the beginning of a line (as defined by the eolmarks variable).
*/
typedef
diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c
index b815ffc..8d44bee 100644
--- a/usr.bin/top/machine.c
+++ b/usr.bin/top/machine.c
@@ -1404,7 +1404,7 @@ compare_ivcsw(void *arg1, void *arg2)
/*
* proc_owner(pid) - returns the uid that owns process "pid", or -1 if
* the process does not exist.
- * It is EXTREMLY IMPORTANT that this function work correctly.
+ * It is EXTREMELY IMPORTANT that this function work correctly.
* If top runs setuid root (as in SVR4), then this function
* is the only thing that stands in the way of a serious
* security problem. It validates requests for the "kill"
diff --git a/usr.bin/tr/str.c b/usr.bin/tr/str.c
index abfd0d6..333ca5c 100644
--- a/usr.bin/tr/str.c
+++ b/usr.bin/tr/str.c
@@ -161,7 +161,7 @@ bracket(STR *s)
repeat:
if ((p = strpbrk(s->str + 2, "*]")) == NULL)
return (0);
- if (p[0] != '*' || index(p, ']') == NULL)
+ if (p[0] != '*' || strchr(p, ']') == NULL)
return (0);
s->str += 1;
genseq(s);
diff --git a/usr.bin/truss/amd64-linux32.c b/usr.bin/truss/amd64-linux32.c
index f392a4b..3de40da 100644
--- a/usr.bin/truss/amd64-linux32.c
+++ b/usr.bin/truss/amd64-linux32.c
@@ -228,7 +228,7 @@ amd64_linux32_syscall_entry(struct trussinfo *trussinfo, int nargs) {
/*
* Linux syscalls return negative errno's, we do positive and map them
*/
-const int bsd_to_linux_errno[] = {
+static const int bsd_to_linux_errno[] = {
-0, -1, -2, -3, -4, -5, -6, -7, -8, -9,
-10, -35, -12, -13, -14, -15, -16, -17, -18, -19,
-20, -21, -22, -23, -24, -25, -26, -27, -28, -29,
diff --git a/usr.bin/truss/i386-linux.c b/usr.bin/truss/i386-linux.c
index 8e0aa04..66bccf9 100644
--- a/usr.bin/truss/i386-linux.c
+++ b/usr.bin/truss/i386-linux.c
@@ -228,7 +228,7 @@ i386_linux_syscall_entry(struct trussinfo *trussinfo, int nargs) {
/*
* Linux syscalls return negative errno's, we do positive and map them
*/
-const int bsd_to_linux_errno[] = {
+static const int bsd_to_linux_errno[] = {
-0, -1, -2, -3, -4, -5, -6, -7, -8, -9,
-10, -35, -12, -13, -14, -15, -16, -17, -18, -19,
-20, -21, -22, -23, -24, -25, -26, -27, -28, -29,
diff --git a/usr.bin/truss/main.c b/usr.bin/truss/main.c
index a74fe1c..e04e810 100644
--- a/usr.bin/truss/main.c
+++ b/usr.bin/truss/main.c
@@ -74,7 +74,7 @@ usage(void)
* WARNING! "FreeBSD a.out" must be first, or set_etype will not
* work correctly.
*/
-struct ex_types {
+static struct ex_types {
const char *type;
void (*enter_syscall)(struct trussinfo *, int);
long (*exit_syscall)(struct trussinfo *, int);
diff --git a/usr.bin/truss/syscalls.c b/usr.bin/truss/syscalls.c
index f19553d2..bcdc6ce 100644
--- a/usr.bin/truss/syscalls.c
+++ b/usr.bin/truss/syscalls.c
@@ -89,7 +89,7 @@ static const char rcsid[] =
/*
* This should probably be in its own file, sorted alphabetically.
*/
-struct syscall syscalls[] = {
+static struct syscall syscalls[] = {
{ .name = "fcntl", .ret_type = 1, .nargs = 3,
.args = { { Int, 0 } , { Fcntl, 1 }, { Fcntlflag | OUT, 2 } } },
{ .name = "fork", .ret_type = 1, .nargs = 0 },
@@ -283,7 +283,7 @@ static struct xlat kevent_flags[] = {
X(EV_CLEAR) X(EV_FLAG1) X(EV_ERROR) X(EV_EOF) XEND
};
-struct xlat poll_flags[] = {
+static struct xlat poll_flags[] = {
X(POLLSTANDARD) X(POLLIN) X(POLLPRI) X(POLLOUT) X(POLLERR)
X(POLLHUP) X(POLLNVAL) X(POLLRDNORM) X(POLLRDBAND)
X(POLLWRBAND) X(POLLINIGNEOF) XEND
diff --git a/usr.bin/tset/map.c b/usr.bin/tset/map.c
index 18ee135..8de594f 100644
--- a/usr.bin/tset/map.c
+++ b/usr.bin/tset/map.c
@@ -132,7 +132,7 @@ next: if (*arg == ':') {
goto badmopt;
++arg;
} else { /* Optional baudrate. */
- arg = index(p = arg, ':');
+ arg = strchr(p = arg, ':');
if (arg == NULL)
goto badmopt;
*arg++ = '\0';
diff --git a/usr.bin/tset/term.c b/usr.bin/tset/term.c
index 7082e5f..544e928 100644
--- a/usr.bin/tset/term.c
+++ b/usr.bin/tset/term.c
@@ -74,7 +74,7 @@ get_termcap_entry(char *userarg, char **tcapbufp)
/* Try ttyname(3); check for dialup or other mapping. */
if ((ttypath = ttyname(STDERR_FILENO))) {
- if ((p = rindex(ttypath, '/')))
+ if ((p = strrchr(ttypath, '/')))
++p;
else
p = ttypath;
@@ -146,7 +146,7 @@ askuser(const char *dflt)
return (dflt);
}
- if ((p = index(answer, '\n')))
+ if ((p = strchr(answer, '\n')))
*p = '\0';
if (answer[0])
return (answer);
diff --git a/usr.bin/tset/wrterm.c b/usr.bin/tset/wrterm.c
index e258e16..77751fa 100644
--- a/usr.bin/tset/wrterm.c
+++ b/usr.bin/tset/wrterm.c
@@ -56,7 +56,7 @@ wrtermcap(char *bp)
char *t, *sep;
/* Find the end of the terminal names. */
- if ((t = index(bp, ':')) == NULL)
+ if ((t = strchr(bp, ':')) == NULL)
errx(1, "termcap names not colon terminated");
*t++ = '\0';
diff --git a/usr.bin/unzip/unzip.1 b/usr.bin/unzip/unzip.1
index d115554..fd93b85 100644
--- a/usr.bin/unzip/unzip.1
+++ b/usr.bin/unzip/unzip.1
@@ -1,5 +1,5 @@
.\"-
-.\" Copyright (c) 2007-2008 Dag-Erling Coïdan Smørgrav
+.\" Copyright (c) 2007-2008 Dag-Erling Coïdan Smørgrav
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
diff --git a/usr.bin/unzip/unzip.c b/usr.bin/unzip/unzip.c
index a3852f7..accd653 100644
--- a/usr.bin/unzip/unzip.c
+++ b/usr.bin/unzip/unzip.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2009 Joerg Sonnenberger <joerg@NetBSD.org>
- * Copyright (c) 2007-2008 Dag-Erling Coïdan Smørgrav
+ * Copyright (c) 2007-2008 Dag-Erling Coïdan Smørgrav
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -422,7 +422,7 @@ handle_existing_file(char **path)
fprintf(stderr,
"replace %s? [y]es, [n]o, [A]ll, [N]one, [r]ename: ",
*path);
- if (fgets(buf, sizeof(buf), stdin) == 0) {
+ if (fgets(buf, sizeof(buf), stdin) == NULL) {
clearerr(stdin);
printf("NULL\n(EOF or read error, "
"treating as \"[N]one\"...)\n");
diff --git a/usr.bin/vacation/Makefile b/usr.bin/vacation/Makefile
index 056f576..2b13a28 100644
--- a/usr.bin/vacation/Makefile
+++ b/usr.bin/vacation/Makefile
@@ -11,6 +11,13 @@ CFLAGS+=-D_FFR_LISTDB -D_FFR_DEBUG
WARNS?= 2
+.if ${CC:T:Mclang} == "clang"
+# Unfortunately, clang gives warnings about sendmail code that cannot
+# be turned off yet. Since this is contrib code, and we don't really
+# care about the warnings, just make them non-fatal for now.
+NO_WERROR=
+.endif
+
LIBSMDIR= ${.OBJDIR}/../../lib/libsm
LIBSM= ${LIBSMDIR}/libsm.a
diff --git a/usr.bin/vgrind/extern.h b/usr.bin/vgrind/extern.h
index 08fefec..6616ca9 100644
--- a/usr.bin/vgrind/extern.h
+++ b/usr.bin/vgrind/extern.h
@@ -37,7 +37,7 @@ extern boolean _escaped; /* if last character was an escape */
extern char *s_start; /* start of the current string */
extern char *l_acmbeg; /* string introducing a comment */
extern char *l_acmend; /* string ending a comment */
-extern char *l_blkbeg; /* string begining of a block */
+extern char *l_blkbeg; /* string beginning of a block */
extern char *l_blkend; /* string ending a block */
extern char *l_chrbeg; /* delimiter for character constant */
extern char *l_chrend; /* delimiter for character constant */
diff --git a/usr.bin/vgrind/vfontedpr.c b/usr.bin/vgrind/vfontedpr.c
index 2fb62c4..5baaec0 100644
--- a/usr.bin/vgrind/vfontedpr.c
+++ b/usr.bin/vgrind/vfontedpr.c
@@ -110,7 +110,7 @@ static char pstack[PSMAX][PNAMELEN+1]; /* the procedure name stack */
char *l_acmbeg; /* string introducing a comment */
char *l_acmend; /* string ending a comment */
-char *l_blkbeg; /* string begining of a block */
+char *l_blkbeg; /* string beginning of a block */
char *l_blkend; /* string ending a block */
char *l_chrbeg; /* delimiter for character constant */
char *l_chrend; /* delimiter for character constant */
diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c
index ba5df87..9055ed2 100644
--- a/usr.bin/vmstat/vmstat.c
+++ b/usr.bin/vmstat/vmstat.c
@@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$");
#include <devstat.h>
#include <err.h>
#include <errno.h>
+#include <inttypes.h>
#include <kvm.h>
#include <limits.h>
#include <memstat.h>
@@ -1185,18 +1186,18 @@ dointr(void)
istrnamlen = clen;
tintrname += clen + 1;
}
- (void)printf("%-*s %20s %10s\n", istrnamlen, "interrupt", "total",
+ (void)printf("%-*s %20s %10s\n", (int)istrnamlen, "interrupt", "total",
"rate");
inttotal = 0;
for (i = 0; i < nintr; i++) {
if (intrname[0] != '\0' && (*intrcnt != 0 || aflag))
- (void)printf("%-*s %20lu %10lu\n", istrnamlen, intrname,
- *intrcnt, *intrcnt / uptime);
+ (void)printf("%-*s %20lu %10lu\n", (int)istrnamlen,
+ intrname, *intrcnt, *intrcnt / uptime);
intrname += strlen(intrname) + 1;
inttotal += *intrcnt++;
}
- (void)printf("%-*s %20llu %10llu\n", istrnamlen, "Total",
- (long long)inttotal, (long long)(inttotal / uptime));
+ (void)printf("%-*s %20" PRIu64 " %10" PRIu64 "\n", (int)istrnamlen,
+ "Total", inttotal, inttotal / uptime);
}
static void
@@ -1235,9 +1236,9 @@ domemstat_malloc(void)
if (memstat_get_numallocs(mtp) == 0 &&
memstat_get_count(mtp) == 0)
continue;
- printf("%13s %5lld %5lldK %7s %8lld ",
+ printf("%13s %5" PRIu64 " %5" PRIu64 "K %7s %8" PRIu64 " ",
memstat_get_name(mtp), memstat_get_count(mtp),
- ((int64_t)memstat_get_bytes(mtp) + 1023) / 1024, "-",
+ (memstat_get_bytes(mtp) + 1023) / 1024, "-",
memstat_get_numallocs(mtp));
first = 1;
for (i = 0; i < 32; i++) {
@@ -1289,7 +1290,8 @@ domemstat_zone(void)
mtp = memstat_mtl_next(mtp)) {
strlcpy(name, memstat_get_name(mtp), MEMTYPE_MAXNAME);
strcat(name, ":");
- printf("%-20s %6llu, %6llu,%8llu,%8llu,%8llu,%4llu,%4llu\n",name,
+ printf("%-20s %6" PRIu64 ", %6" PRIu64 ",%8" PRIu64 ",%8" PRIu64
+ ",%8" PRIu64 ",%4" PRIu64 ",%4" PRIu64 "\n", name,
memstat_get_size(mtp), memstat_get_countlimit(mtp),
memstat_get_count(mtp), memstat_get_free(mtp),
memstat_get_numallocs(mtp), memstat_get_failures(mtp),
diff --git a/usr.bin/whereis/pathnames.h b/usr.bin/whereis/pathnames.h
index 09084ae..1668d90 100644
--- a/usr.bin/whereis/pathnames.h
+++ b/usr.bin/whereis/pathnames.h
@@ -1,5 +1,5 @@
/*
- * Copyright © 2002, Jörg Wunsch
+ * Copyright © 2002, Jörg Wunsch
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/usr.bin/whereis/whereis.c b/usr.bin/whereis/whereis.c
index 91df6dc..401461f 100644
--- a/usr.bin/whereis/whereis.c
+++ b/usr.bin/whereis/whereis.c
@@ -1,5 +1,5 @@
/*
- * Copyright © 2002, Jörg Wunsch
+ * Copyright © 2002, Jörg Wunsch
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/usr.bin/wtmpcvt/Makefile b/usr.bin/wtmpcvt/Makefile
deleted file mode 100644
index 0caa097..0000000
--- a/usr.bin/wtmpcvt/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-# $FreeBSD$
-
-PROG= wtmpcvt
-
-.include <bsd.prog.mk>
diff --git a/usr.bin/wtmpcvt/wtmpcvt.1 b/usr.bin/wtmpcvt/wtmpcvt.1
deleted file mode 100644
index 04acfde..0000000
--- a/usr.bin/wtmpcvt/wtmpcvt.1
+++ /dev/null
@@ -1,66 +0,0 @@
-.\" Copyright (c) 2010 Ed Schouten <ed@FreeBSD.org>
-.\" 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.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
-.\"
-.\" $FreeBSD$
-.\"
-.Dd January 14, 2010
-.Dt WTMPCVT 1
-.Os
-.Sh NAME
-.Nm wtmpcvt
-.Nd convert wtmp files to the utmpx format
-.Sh SYNOPSIS
-.Nm
-.Ar input
-.Ar output
-.Sh DESCRIPTION
-The
-.Nm
-utility converts traditional
-.Pa wtmp
-user accounting database files to the same format that is used by
-.Pa /var/log/utx.log .
-This makes it possible to view their contents using existing accounting
-utilities, such as
-.Xr last 1
-and
-.Xr ac 8 .
-.Sh SEE ALSO
-.Xr last 1 ,
-.Xr getutxent 3 ,
-.Xr ac 8
-.Sh HISTORY
-The
-.Nm
-utility appeared in
-.Fx 9.0 .
-.Sh AUTHORS
-.An Ed Schouten Aq ed@FreeBSD.org
-.Sh BUGS
-The application assumes the
-.Ar input
-file has the same byte order as the host system.
-The
-.Ar output
-file can be used on any architecture.
diff --git a/usr.bin/wtmpcvt/wtmpcvt.c b/usr.bin/wtmpcvt/wtmpcvt.c
deleted file mode 100644
index c2ba681..0000000
--- a/usr.bin/wtmpcvt/wtmpcvt.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/*-
- * Copyright (c) 2010 Ed Schouten <ed@FreeBSD.org>
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <sys/endian.h>
-#include <sys/param.h>
-
-#include <err.h>
-#include <stdio.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-#include <utmpx.h>
-
-#include "../../lib/libc/gen/utxdb.h"
-
-struct outmp {
- char ut_line[8];
- char ut_user[16];
- char ut_host[16];
- int32_t ut_time;
-};
-
-static void
-usage(void)
-{
-
- fprintf(stderr, "usage: wtmpcvt input output\n");
- exit(1);
-}
-
-static void
-outmp_to_futx(const struct outmp *ui, struct futx *uo)
-{
-
- memset(uo, 0, sizeof *uo);
-#define COPY_STRING(field) do { \
- strncpy(uo->fu_ ## field, ui->ut_ ## field, \
- MIN(sizeof uo->fu_ ## field, sizeof ui->ut_ ## field)); \
-} while (0)
-#define COPY_LINE_TO_ID() do { \
- strncpy(uo->fu_id, ui->ut_line, \
- MIN(sizeof uo->fu_id, sizeof ui->ut_line)); \
-} while (0)
-#define MATCH(field, value) (strncmp(ui->ut_ ## field, (value), \
- sizeof(ui->ut_ ## field)) == 0)
- if (MATCH(user, "reboot") && MATCH(line, "~"))
- uo->fu_type = BOOT_TIME;
- else if (MATCH(user, "date") && MATCH(line, "|"))
- uo->fu_type = OLD_TIME;
- else if (MATCH(user, "date") && MATCH(line, "{"))
- uo->fu_type = NEW_TIME;
- else if (MATCH(user, "shutdown") && MATCH(line, "~"))
- uo->fu_type = SHUTDOWN_TIME;
- else if (MATCH(user, "") && MATCH(host, "") && !MATCH(line, "")) {
- uo->fu_type = DEAD_PROCESS;
- COPY_LINE_TO_ID();
- } else if (!MATCH(user, "") && !MATCH(line, "") && ui->ut_time != 0) {
- uo->fu_type = USER_PROCESS;
- COPY_STRING(user);
- COPY_STRING(line);
- COPY_STRING(host);
- COPY_LINE_TO_ID();
- } else {
- uo->fu_type = EMPTY;
- return;
- }
-#undef COPY_STRING
-#undef COPY_LINE_TO_ID
-#undef MATCH
-
- /* Timestamp conversion. XXX: Assumes host byte order! */
- uo->fu_tv = htobe64((uint64_t)ui->ut_time * 1000000);
-}
-
-int
-main(int argc, char *argv[])
-{
- FILE *in, *out;
- struct outmp ui;
- struct futx uo;
- size_t l;
- uint16_t lo;
-
- if (argc != 3)
- usage();
-
- /* Open files. */
- in = fopen(argv[1], "r");
- if (in == NULL)
- err(1, "%s", argv[1]);
- out = fopen(argv[2], "w");
- if (out == NULL)
- err(1, "%s", argv[2]);
-
- /* Process entries. */
- while (fread(&ui, sizeof ui, 1, in) == 1) {
- outmp_to_futx(&ui, &uo);
- if (uo.fu_type == EMPTY)
- continue;
-
- /* Write new entry to output file. */
- for (l = sizeof uo; l > 0 &&
- ((const char *)&uo)[l - 1] == '\0'; l--);
- lo = htobe16(l);
- fwrite(&lo, sizeof lo, 1, out);
- fwrite(&uo, l, 1, out);
- }
-
- fclose(in);
- fclose(out);
- return (0);
-}
diff --git a/usr.bin/xlint/lint1/decl.c b/usr.bin/xlint/lint1/decl.c
index 06a412c..e62882f 100644
--- a/usr.bin/xlint/lint1/decl.c
+++ b/usr.bin/xlint/lint1/decl.c
@@ -308,7 +308,7 @@ addtype(type_t *tp)
/* now it can be only a combination of arithmetic types and void */
if (t == SIGNED || t == UNSIGN) {
- /* remeber specifiers "signed" and "unsigned" in dcs->d_smod */
+ /* remember specifiers "signed" and "unsigned" in dcs->d_smod */
if (dcs->d_smod != NOTSPEC)
/*
* more than one "signed" and/or "unsigned"; print
@@ -545,7 +545,7 @@ popdecl(void)
/*
* casts and sizeof
* Append all symbols declared in the abstract declaration
- * to the list of symbols declared in the surounding decl.
+ * to the list of symbols declared in the surrounding decl.
* or block.
* XXX I'm not sure whether they should be removed from the
* symbol table now or later.
@@ -2580,8 +2580,8 @@ ledecl(sym_t *dsym)
}
/*
- * Print an error or a warning if the symbol cant be initialized due
- * to type/storage class. Returnvalue is 1 if an error has been
+ * Print an error or a warning if the symbol can't be initialized due
+ * to type/storage class. Return value is 1 if an error has been
* detected.
*/
static int
@@ -2613,7 +2613,7 @@ chkinit(sym_t *sym)
}
/*
- * Create a symbole for an abstract declaration.
+ * Create a symbol for an abstract declaration.
*/
sym_t *
aname(void)
@@ -2895,7 +2895,7 @@ chktusg(sym_t *sym)
if (!incompl(sym->s_type))
return;
- /* complain alwasy about incomplet tags declared inside blocks */
+ /* complain always about incomplete tags declared inside blocks */
if (!zflag || dcs->d_ctx != EXTERN)
return;
diff --git a/usr.bin/xlint/lint1/emit1.c b/usr.bin/xlint/lint1/emit1.c
index e62549c..762945f 100644
--- a/usr.bin/xlint/lint1/emit1.c
+++ b/usr.bin/xlint/lint1/emit1.c
@@ -81,7 +81,7 @@ static void outfstrg(strg_t *);
* 2 n typename only type name
*
* spaces are only for better readability
- * additionaly it is possible to prepend the characters 'c' (for const)
+ * additionally it is possible to prepend the characters 'c' (for const)
* and 'v' (for volatile)
*/
void
diff --git a/usr.bin/xlint/lint1/func.c b/usr.bin/xlint/lint1/func.c
index 68ade02..f34baa1 100644
--- a/usr.bin/xlint/lint1/func.c
+++ b/usr.bin/xlint/lint1/func.c
@@ -59,15 +59,15 @@ int reached = 1;
int rchflg;
/*
- * In conjunction with reached ontrols printing of "fallthrough on ..."
+ * In conjunction with reached controls printing of "fallthrough on ..."
* warnings.
* Reset by each statement and set by FALLTHROUGH, switch (switch1())
* and case (label()).
*
* Control statements if, for, while and switch do not reset ftflg because
- * this must be done by the controled statement. At least for if this is
+ * this must be done by the controlled statement. At least for if this is
* important because ** FALLTHROUGH ** after "if (expr) stmnt" is evaluated
- * befor the following token, wich causes reduction of above, is read.
+ * before the following token, which causes reduction of above, is read.
* This means that ** FALLTHROUGH ** after "if ..." would always be ignored.
*/
int ftflg;
@@ -107,13 +107,13 @@ pos_t prflpos;
pos_t scflpos;
/*
- * Are both plibflg and llibflg set, prototypes are writen as function
+ * Are both plibflg and llibflg set, prototypes are written as function
* definitions to the output file.
*/
int plibflg;
/*
- * Nonzero means that no warnings about constands in conditional
+ * Nonzero means that no warnings about constants in conditional
* context are printed.
*/
int ccflg;
@@ -323,7 +323,7 @@ funcdef(sym_t *fsym)
if (fsym->s_osdef && !fsym->s_type->t_proto) {
if (sflag && hflag && strcmp(fsym->s_name, "main") != 0)
- /* function definition is not a prototyp */
+ /* function definition is not a prototype */
warning(286);
}
@@ -353,7 +353,7 @@ funcend(void)
}
/*
- * This warning is printed only if the return value was implizitly
+ * This warning is printed only if the return value was implicitly
* declared to be int. Otherwise the wrong return statement
* has already printed a warning.
*/
diff --git a/usr.bin/xlint/lint1/mem1.c b/usr.bin/xlint/lint1/mem1.c
index 735115c..3edc6db 100644
--- a/usr.bin/xlint/lint1/mem1.c
+++ b/usr.bin/xlint/lint1/mem1.c
@@ -133,7 +133,7 @@ getfnid(const char *s)
/*
* Memory for declarations and other things which must be available
* until the end of a block (or the end of the translation unit)
- * are assoziated with the level (mblklev) of the block (or wiht 0).
+ * are associated with the level (mblklev) of the block (or with 0).
* Because these memory is allocated in large blocks associated with
* a given level it can be freed easily at the end of a block.
*/
diff --git a/usr.bin/xlint/lint2/chk.c b/usr.bin/xlint/lint2/chk.c
index ddb9df6..4062246 100644
--- a/usr.bin/xlint/lint2/chk.c
+++ b/usr.bin/xlint/lint2/chk.c
@@ -447,11 +447,11 @@ chkau(hte_t *hte, int n, sym_t *def, sym_t *decl, pos_t *pos1p,
char *pos1;
/*
- * If a function definition is available (def != NULL), we compair the
+ * If a function definition is available (def != NULL), we compare the
* function call (call) with the definition. Otherwise, if a function
* definition is available and it is not an old style definition
- * (decl != NULL && TP(decl->s_type)->t_proto), we compair the call
- * with this declaration. Otherwise we compair it with the first
+ * (decl != NULL && TP(decl->s_type)->t_proto), we compare the call
+ * with this declaration. Otherwise we compare it with the first
* call we have found (call1).
*/
@@ -474,7 +474,7 @@ chkau(hte_t *hte, int n, sym_t *def, sym_t *decl, pos_t *pos1p,
* of an argument does not match exactly the expected type. The
* result are lots of warnings which are really not necessary.
* We print a warning only if
- * (0) at least one type is not an interger type and types differ
+ * (0) at least one type is not an integer type and types differ
* (1) hflag is set and types differ
* (2) types differ, except in signedness
* If the argument is an integer constant whose msb is not set,
@@ -482,7 +482,7 @@ chkau(hte_t *hte, int n, sym_t *def, sym_t *decl, pos_t *pos1p,
* int). This is with and without hflag.
* If the argument is an integer constant with value 0 and the
* expected argument is of type pointer and the width of the
- * interger constant is the same as the width of the pointer,
+ * integer constant is the same as the width of the pointer,
* no warning is printed.
*/
t1 = arg1->t_tspec;
@@ -490,7 +490,7 @@ chkau(hte_t *hte, int n, sym_t *def, sym_t *decl, pos_t *pos1p,
if (isityp(t1) && isityp(t2) && !arg1->t_isenum && !arg2->t_isenum) {
if (promote) {
/*
- * XXX Here is a problem: Althrough it is possible to
+ * XXX Here is a problem: Although it is possible to
* pass an int where a char/short it expected, there
* may be loss in significant digits. We should first
* check for const arguments if they can be converted
diff --git a/usr.bin/xlint/lint2/read.c b/usr.bin/xlint/lint2/read.c
index 9dfecfd..0ffd611 100644
--- a/usr.bin/xlint/lint2/read.c
+++ b/usr.bin/xlint/lint2/read.c
@@ -506,7 +506,7 @@ decldef(pos_t *posp, const char *cp)
}
/*
- * Read an u-record (emited by lint1 if a symbol was used).
+ * Read an u-record (emitted by lint1 if a symbol was used).
*/
static void
usedsym(pos_t *posp, const char *cp)
diff --git a/usr.bin/xlint/xlint/xlint.c b/usr.bin/xlint/xlint/xlint.c
index de3b527..7980d6c 100644
--- a/usr.bin/xlint/xlint/xlint.c
+++ b/usr.bin/xlint/xlint/xlint.c
@@ -80,7 +80,7 @@ static char *p2out;
/* flags always passed to cc(1) */
static char **cflags;
-/* flags for cc(1), controled by sflag/tflag */
+/* flags for cc(1), controlled by sflag/tflag */
static char **lcflags;
/* flags for lint1 */
diff --git a/usr.bin/yacc/NEW_FEATURES b/usr.bin/yacc/NEW_FEATURES
index b030c62..baab2ee 100644
--- a/usr.bin/yacc/NEW_FEATURES
+++ b/usr.bin/yacc/NEW_FEATURES
@@ -1,3 +1,5 @@
+$FreeBSD$
+
The -r option has been implemented. The -r option tells Yacc to
put the read-only tables in y.tab.c and the code and variables in
y.code.c. Keith Bostic asked for this option so that :yyfix could be
@@ -35,7 +37,7 @@ is
%ident string
-where string is a sequence of characters begining with a double quote
+where string is a sequence of characters beginning with a double quote
and ending with either a double quote or the next end-of-line, whichever
comes first. The declaration will cause a #ident directive to be written
near the start of the output file.
diff --git a/usr.bin/yacc/reader.c b/usr.bin/yacc/reader.c
index 0521891..f81f173 100644
--- a/usr.bin/yacc/reader.c
+++ b/usr.bin/yacc/reader.c
@@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$");
/* The line size must be a positive integer. One hundred was chosen */
/* because few lines in Yacc input grammars exceed 100 characters. */
/* Note that if a line exceeds LINESIZE characters, the line buffer */
-/* will be expanded to accomodate it. */
+/* will be expanded to accommodate it. */
#define LINESIZE 100
diff --git a/usr.sbin/IPXrouted/sap_input.c b/usr.sbin/IPXrouted/sap_input.c
index 59281b2..a503471 100644
--- a/usr.sbin/IPXrouted/sap_input.c
+++ b/usr.sbin/IPXrouted/sap_input.c
@@ -136,7 +136,7 @@ sap_input(from, size)
* The idea here is that if the hop count is more
* than INFINITY it is bogus and should be discarded.
* If it is equal to INFINITY it is a message to say
- * that a service went down. If we don't allready
+ * that a service went down. If we don't already
* have it in our tables discard it. Otherwise
* update our table and set the timer to EXPIRE_TIME
* so that it is removed next time we go through the
diff --git a/usr.sbin/IPXrouted/sap_tables.c b/usr.sbin/IPXrouted/sap_tables.c
index e1572d1..57b5af5 100644
--- a/usr.sbin/IPXrouted/sap_tables.c
+++ b/usr.sbin/IPXrouted/sap_tables.c
@@ -178,7 +178,7 @@ sap_add(struct sap_info *si, struct sockaddr *from)
/*
* Change an existing SAP entry. If a clone exist for the old one,
- * check if it is cheaper. If it is change tothe clone, otherwise
+ * check if it is cheaper. If it is change to the clone, otherwise
* delete all the clones.
*/
void
diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile
index 2063ea6..b7ea932 100644
--- a/usr.sbin/Makefile
+++ b/usr.sbin/Makefile
@@ -16,6 +16,7 @@ SUBDIR= adduser \
clear_locks \
crashinfo \
cron \
+ ctladm \
daemon \
dconschat \
devinfo \
diff --git a/usr.sbin/acpi/acpiconf/acpiconf.8 b/usr.sbin/acpi/acpiconf/acpiconf.8
index 05d3a5d..8a949d7 100644
--- a/usr.sbin/acpi/acpiconf/acpiconf.8
+++ b/usr.sbin/acpi/acpiconf/acpiconf.8
@@ -1,5 +1,5 @@
.\"-
-.\" Copyright (c) 2000 Dag-Erling Coïdan Smørgrav
+.\" Copyright (c) 2000 Dag-Erling Coïdan Smørgrav
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
diff --git a/usr.sbin/acpi/acpidb/Makefile b/usr.sbin/acpi/acpidb/Makefile
index 3918108..5c48dc6 100644
--- a/usr.sbin/acpi/acpidb/Makefile
+++ b/usr.sbin/acpi/acpidb/Makefile
@@ -15,7 +15,7 @@ SRCS+= dmbuffer.c dmnames.c dmobject.c dmopcode.c dmresrc.c \
# events
SRCS+= evevent.c evglock.c evgpe.c evgpeblk.c evgpeinit.c \
evgpeutil.c evmisc.c evregion.c evrgnini.c evsci.c \
- evxface.c evxfevnt.c evxfgpe.c evxfregn.c
+ evxface.c evxfevnt.c evxfregn.c
# hardware
SRCS+= hwacpi.c hwgpe.c hwpci.c hwregs.c hwsleep.c hwvalid.c \
@@ -52,14 +52,14 @@ SRCS+= rsaddr.c rscalc.c rscreate.c rsdump.c rsinfo.c \
rsserial.c rsutils.c rsxface.c
# tables
-SRCS+= tbfadt.c tbfind.c tbinstal.c tbutils.c tbxface.c \
- tbxfroot.c
+SRCS+= tbfadt.c tbfind.c tbinstal.c tbutils.c tbxface.c
# utilities
-SRCS+= utalloc.c utcache.c utcopy.c utdebug.c utdecode.c \
- utdelete.c uteval.c utglobal.c utids.c utinit.c \
- utlock.c utmath.c utmisc.c utmutex.c utobject.c utosi.c \
- utresrc.c utstate.c uttrack.c utxface.c utxferror.c
+SRCS+= utaddress.c utalloc.c utcache.c utcopy.c utdebug.c \
+ utdecode.c utdelete.c uteval.c utglobal.c utids.c \
+ utinit.c utlock.c utmath.c utmisc.c utmutex.c \
+ utobject.c utosi.c utresrc.c utstate.c uttrack.c \
+ utxface.c utxferror.c
MAN= acpidb.8
WARNS?= 2
diff --git a/usr.sbin/acpi/iasl/Makefile b/usr.sbin/acpi/iasl/Makefile
index 993ecae..32942a1 100644
--- a/usr.sbin/acpi/iasl/Makefile
+++ b/usr.sbin/acpi/iasl/Makefile
@@ -26,8 +26,8 @@ SRCS+= aslanalyze.c aslbtypes.c aslcodegen.c aslcompile.c \
SRCS+= dbfileio.c
# disassembler
-SRCS+= dmbuffer.c dmnames.c dmobject.c dmopcode.c dmresrc.c \
- dmresrcl.c dmresrcl2.c dmresrcs.c dmutils.c dmwalk.c
+SRCS+= dmbuffer.c dmnames.c dmopcode.c dmresrc.c dmresrcl.c \
+ dmresrcl2.c dmresrcs.c dmutils.c dmwalk.c
# interpreter/dispatcher
SRCS+= dsargs.c dscontrol.c dsfield.c dsobject.c dsopcode.c \
@@ -37,8 +37,8 @@ SRCS+= dsargs.c dscontrol.c dsfield.c dsobject.c dsopcode.c \
# interpreter/executer
SRCS+= exconvrt.c excreate.c exdump.c exmisc.c exmutex.c \
exnames.c exoparg1.c exoparg2.c exoparg3.c exoparg6.c \
- exprep.c exregion.c exresnte.c exresolv.c exresop.c \
- exstore.c exstoren.c exstorob.c exsystem.c exutils.c
+ exprep.c exresnte.c exresolv.c exresop.c exstore.c \
+ exstoren.c exstorob.c exsystem.c exutils.c
# interpreter/parser
SRCS+= psargs.c psloop.c psopcode.c psparse.c psscope.c \
@@ -46,7 +46,7 @@ SRCS+= psargs.c psloop.c psopcode.c psparse.c psscope.c \
# namespace
SRCS+= nsaccess.c nsalloc.c nsdump.c nsnames.c nsobject.c \
- nsparse.c nssearch.c nsutils.c nswalk.c nsxfobj.c
+ nsparse.c nssearch.c nsutils.c nswalk.c
# os_specific/service_layers
SRCS+= osunixxf.c
@@ -55,9 +55,9 @@ SRCS+= osunixxf.c
SRCS+= tbfadt.c tbinstal.c tbutils.c tbxface.c
# utilities
-SRCS+= utalloc.c utcache.c utcopy.c utdebug.c utdecode.c \
- utdelete.c utglobal.c utinit.c utlock.c utmath.c \
- utmisc.c utmutex.c utobject.c utosi.c utresrc.c \
+SRCS+= utaddress.c utalloc.c utcache.c utcopy.c utdebug.c \
+ utdecode.c utdelete.c utglobal.c utinit.c utlock.c \
+ utmath.c utmisc.c utmutex.c utobject.c utresrc.c \
utstate.c utxface.c utxferror.c
WARNS?= 2
diff --git a/usr.sbin/adduser/adduser.sh b/usr.sbin/adduser/adduser.sh
index 8e05f33..f645f59 100644
--- a/usr.sbin/adduser/adduser.sh
+++ b/usr.sbin/adduser/adduser.sh
@@ -894,7 +894,7 @@ if [ "$procowner" != "0" ]; then
exit 1
fi
-# Overide from our conf file
+# Override from our conf file
# Quickly go through the commandline line to see if we should read
# from our configuration file. The actual parsing of the commandline
# arguments happens after we read in our configuration file (commandline
@@ -914,7 +914,7 @@ if [ -n "$readconfig" ]; then
fi
fi
-# Proccess command-line options
+# Process command-line options
#
for _switch ; do
case $_switch in
diff --git a/usr.sbin/bluetooth/btpand/event.h b/usr.sbin/bluetooth/btpand/event.h
index 75515e3..e53ba77 100644
--- a/usr.sbin/bluetooth/btpand/event.h
+++ b/usr.sbin/bluetooth/btpand/event.h
@@ -40,7 +40,7 @@
#define EV_READ 0x02
#define EV_WRITE 0x04
-#define EV_PERSIST 0x10 /* Persistant event */
+#define EV_PERSIST 0x10 /* Persistent event */
#define EV_PENDING (1 << 13) /* internal use only! */
#define EV_HAS_TIMEOUT (1 << 14) /* internal use only! */
#define EV_CURRENT (1 << 15) /* internal use only! */
diff --git a/usr.sbin/bluetooth/hccontrol/host_controller_baseband.c b/usr.sbin/bluetooth/hccontrol/host_controller_baseband.c
index 38f77eb..aae5dd1 100644
--- a/usr.sbin/bluetooth/hccontrol/host_controller_baseband.c
+++ b/usr.sbin/bluetooth/hccontrol/host_controller_baseband.c
@@ -1632,8 +1632,8 @@ struct hci_command host_controller_baseband_commands[] = {
"begins the next page scan. The Page_Scan_Window configuration parameter\n" \
"defines the amount of time for the duration of the page scan. \n" \
"The Page_Scan_Window can only be less than or equal to the Page_Scan_Interval.\n\n" \
-"\t<interval> - Range: 0x0012 -– 0x100, Time = N * 0.625 msec\n" \
-"\t<window> - Range: 0x0012 -– 0x100, Time = N * 0.625 msen",
+"\t<interval> - Range: 0x0012 -- 0x100, Time = N * 0.625 msec\n" \
+"\t<window> - Range: 0x0012 -- 0x100, Time = N * 0.625 msec",
&hci_write_page_scan_activity
},
{
@@ -1654,8 +1654,8 @@ struct hci_command host_controller_baseband_commands[] = {
"until it begins the next inquiry scan. The Inquiry_Scan_Window configuration\n" \
"parameter defines the amount of time for the duration of the inquiry scan.\n" \
"The Inquiry_Scan_Window can only be less than or equal to the Inquiry_Scan_Interval.\n\n" \
-"\t<interval> - Range: 0x0012 -– 0x100, Time = N * 0.625 msec\n" \
-"\t<window> - Range: 0x0012 -– 0x100, Time = N * 0.625 msen",
+"\t<interval> - Range: 0x0012 -- 0x100, Time = N * 0.625 msec\n" \
+"\t<window> - Range: 0x0012 -- 0x100, Time = N * 0.625 msec",
&hci_write_inquiry_scan_activity
},
{
diff --git a/usr.sbin/bluetooth/sdpd/server.c b/usr.sbin/bluetooth/sdpd/server.c
index 816c6f5..4ef153b 100644
--- a/usr.sbin/bluetooth/sdpd/server.c
+++ b/usr.sbin/bluetooth/sdpd/server.c
@@ -73,7 +73,7 @@ server_init(server_p srv, char const *control)
assert(srv != NULL);
assert(control != NULL);
- memset(srv, 0, sizeof(srv));
+ memset(srv, 0, sizeof(*srv));
/* Open control socket */
if (unlink(control) < 0 && errno != ENOENT) {
@@ -334,7 +334,7 @@ server_accept_client(server_p srv, int32_t fd)
* The minimum L2CAP MTU is 43 bytes. That means we need
* 65536 / 43 = ~1524 chunks to transfer maximum packet
* size with minimum MTU. The "rsp_cs" field in fd_idx_t
- * is 11 bit wide that gives us upto 2048 chunks.
+ * is 11 bits wide, which gives us up to 2048 chunks.
*/
if (omtu < NG_L2CAP_MTU_MINIMUM) {
diff --git a/usr.sbin/boot0cfg/Makefile b/usr.sbin/boot0cfg/Makefile
index 9b46701..bb7fe07 100644
--- a/usr.sbin/boot0cfg/Makefile
+++ b/usr.sbin/boot0cfg/Makefile
@@ -6,4 +6,6 @@ MAN= boot0cfg.8
DPADD= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF}
LDADD= -lgeom -lbsdxml -lsbuf
+NO_WCAST_ALIGN=
+
.include <bsd.prog.mk>
diff --git a/usr.sbin/boot0cfg/boot0cfg.8 b/usr.sbin/boot0cfg/boot0cfg.8
index a359ffa..1efd305 100644
--- a/usr.sbin/boot0cfg/boot0cfg.8
+++ b/usr.sbin/boot0cfg/boot0cfg.8
@@ -146,6 +146,9 @@ Set the default boot selection to
.Ar slice .
Values between 1 and 4 refer to slices; a value of 5 refers to the
option of booting from a second disk.
+The special string
+.Dq PXE
+or a value of 6 can be used to boot via PXE.
.It Fl t Ar ticks
Set the timeout value to
.Ar ticks .
diff --git a/usr.sbin/boot0cfg/boot0cfg.c b/usr.sbin/boot0cfg/boot0cfg.c
index 935f85b..2602e50 100644
--- a/usr.sbin/boot0cfg/boot0cfg.c
+++ b/usr.sbin/boot0cfg/boot0cfg.c
@@ -169,7 +169,10 @@ main(int argc, char *argv[])
o_flag = 1;
break;
case 's':
- s_arg = argtoi(optarg, 1, 5, 's');
+ if (strcasecmp(optarg, "pxe") == 0)
+ s_arg = 6;
+ else
+ s_arg = argtoi(optarg, 1, 6, 's');
break;
case 't':
t_arg = argtoi(optarg, 1, 0xffff, 't');
@@ -472,8 +475,10 @@ display_mbr(u_int8_t *mbr)
printf("default_selection=F%d (", mbr[OFF_OPT] + 1);
if (mbr[OFF_OPT] < 4)
printf("Slice %d", mbr[OFF_OPT] + 1);
- else
+ else if (mbr[OFF_OPT] == 4)
printf("Drive 1");
+ else
+ printf("PXE");
printf(")\n");
}
diff --git a/usr.sbin/bootparamd/bootparamd/README b/usr.sbin/bootparamd/bootparamd/README
index 508ee0f..c49b990 100644
--- a/usr.sbin/bootparamd/bootparamd/README
+++ b/usr.sbin/bootparamd/bootparamd/README
@@ -19,7 +19,7 @@ RPC.BOOTPARAMD
The rpc.bootparamd program does NOT use the yellow pages for the bootparams
-database. This data should recide in /etc/bootparams on the local host,
+database. This data should reside in /etc/bootparams on the local host,
or another file given when the server is started.
The default router is set to the address of the machine running the server.
@@ -59,17 +59,3 @@ Cache the date, instead of rereading it.
Maybe match by comparing the inet address instead. (But beware that caching
will prevent the server from detecting that a machine has changed name
or address.)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/usr.sbin/bootparamd/bootparamd/bootparamd.c b/usr.sbin/bootparamd/bootparamd/bootparamd.c
index 5c1d264..0921305 100644
--- a/usr.sbin/bootparamd/bootparamd/bootparamd.c
+++ b/usr.sbin/bootparamd/bootparamd/bootparamd.c
@@ -114,7 +114,7 @@ bp_getfile_res *
bp_getfile_arg *getfile;
struct svc_req *req;
{
- char *where, *index();
+ char *where;
static bp_getfile_res res;
if (debug)
@@ -133,7 +133,7 @@ struct svc_req *req;
askname[sizeof(askname)-1] = 0;
if (getthefile(askname, getfile->file_id,buffer,sizeof(buffer))) {
- if ( (where = index(buffer,':')) ) {
+ if ( (where = strchr(buffer,':')) ) {
/* buffer is re-written to contain the name of the info of file */
strncpy(hostname, buffer, where - buffer);
hostname[where - buffer] = '\0';
diff --git a/usr.sbin/bootparamd/callbootd/callbootd.c b/usr.sbin/bootparamd/callbootd/callbootd.c
index 4ec16df..a0a4ef6 100644
--- a/usr.sbin/bootparamd/callbootd/callbootd.c
+++ b/usr.sbin/bootparamd/callbootd/callbootd.c
@@ -81,7 +81,6 @@ char **argv;
long the_inet_addr;
CLIENT *clnt;
- enum clnt_stat clnt_stat;
stat_whoami_res.client_name = cln;
stat_whoami_res.domain_name = dmn;
@@ -117,7 +116,7 @@ char **argv;
} else
exit(0);
} else {
- clnt_stat=clnt_broadcast(BOOTPARAMPROG, BOOTPARAMVERS,
+ (void)clnt_broadcast(BOOTPARAMPROG, BOOTPARAMVERS,
BOOTPARAMPROC_WHOAMI,
(xdrproc_t)xdr_bp_whoami_arg,
(char *)&whoami_arg,
@@ -140,7 +139,7 @@ char **argv;
} else
exit(0);
} else {
- clnt_stat=clnt_broadcast(BOOTPARAMPROG, BOOTPARAMVERS,
+ (void)clnt_broadcast(BOOTPARAMPROG, BOOTPARAMVERS,
BOOTPARAMPROC_GETFILE,
(xdrproc_t)xdr_bp_getfile_arg,
(char *)&getfile_arg,
diff --git a/usr.sbin/bsdinstall/partedit/partedit.c b/usr.sbin/bsdinstall/partedit/partedit.c
index cddf790..2436f08 100644
--- a/usr.sbin/bsdinstall/partedit/partedit.c
+++ b/usr.sbin/bsdinstall/partedit/partedit.c
@@ -240,23 +240,41 @@ delete_part_metadata(const char *name)
static int
validate_setup(void)
{
- struct partition_metadata *md;
- int root_found = FALSE;
+ struct partition_metadata *md, *root = NULL;
+ int cancel;
TAILQ_FOREACH(md, &part_metadata, metadata) {
if (md->fstab != NULL && strcmp(md->fstab->fs_file, "/") == 0)
- root_found = TRUE;
+ root = md;
/* XXX: Check for duplicate mountpoints */
}
- if (!root_found) {
+ if (root == NULL) {
dialog_msgbox("Error", "No root partition was found. "
"The root FreeBSD partition must have a mountpoint of '/'.",
0, 0, TRUE);
return (FALSE);
}
+ /*
+ * Check for root partitions that we aren't formatting, which is
+ * usually a mistake
+ */
+ if (root->newfs == NULL) {
+ dialog_vars.defaultno = TRUE;
+ cancel = dialog_yesno("Warning", "The chosen root partition "
+ "has a preexisting filesystem. If it contains an existing "
+ "FreeBSD system, please update it with freebsd-update "
+ "instead of installing a new system on it. The partition "
+ "can also be erased by pressing \"No\" and then deleting "
+ "and recreating it. Are you sure you want to proceed?",
+ 0, 0);
+ dialog_vars.defaultno = FALSE;
+ if (cancel)
+ return (FALSE);
+ }
+
return (TRUE);
}
diff --git a/usr.sbin/bsdinstall/partedit/partedit_powerpc.c b/usr.sbin/bsdinstall/partedit/partedit_powerpc.c
index 13d2536..ef23eb6 100644
--- a/usr.sbin/bsdinstall/partedit/partedit_powerpc.c
+++ b/usr.sbin/bsdinstall/partedit/partedit_powerpc.c
@@ -67,7 +67,7 @@ is_scheme_bootable(const char *part_type) {
size_t
bootpart_size(const char *part_type) {
- if (strcmp(part_type, "APM") == 0)
+ if (strcmp(part_type, "APM") == 0 || strcmp(part_type, "MBR") == 0)
return (800*1024);
return (0);
}
@@ -81,6 +81,8 @@ const char *
partcode_path(const char *part_type) {
if (strcmp(part_type, "APM") == 0)
return ("/boot/boot1.hfs");
+ if (strcmp(part_type, "MBR") == 0)
+ return ("/boot/boot1.elf");
return (NULL);
}
diff --git a/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_addrs.c b/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_addrs.c
index 781517f..0daceec 100644
--- a/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_addrs.c
+++ b/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_addrs.c
@@ -108,7 +108,7 @@ bridge_compare_macs(const uint8_t *m1, const uint8_t *m2)
/*
* Insert an address entry in the bridge address TAILQ starting to search
* for its place from the position of the first bridge address for the bridge
- * interface. Update the first bridge address if neccessary.
+ * interface. Update the first bridge address if necessary.
*/
static void
bridge_addrs_insert_at(struct tp_entries *headp,
@@ -136,7 +136,7 @@ bridge_addrs_insert_at(struct tp_entries *headp,
}
/*
- * Find an address entry's possition in the address list
+ * Find an address entry's position in the address list
* according to bridge interface name.
*/
static struct tp_entry *
diff --git a/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_if.c b/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_if.c
index 4586e32..e5f5c50 100644
--- a/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_if.c
+++ b/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_if.c
@@ -378,7 +378,7 @@ bridge_get_time_since_tc(struct bridge_if *bif, uint32_t *ticks)
* Return:
* 1, if successful
* 0, if the interface was deleted
- * -1, error occured while fetching the info from the kernel.
+ * -1, error occurred while fetching the info from the kernel.
*/
static int
bridge_update_bif(struct bridge_if *bif)
diff --git a/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c b/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
index fe2af04..0127cea 100644
--- a/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
+++ b/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
@@ -87,7 +87,7 @@ bridge_port_memif_free(struct bridge_ports *headp,
/*
* Insert a port entry in the base port TAILQ starting to search
* for its place from the position of the first bridge port for the bridge
- * interface. Update the first bridge port if neccessary.
+ * interface. Update the first bridge port if necessary.
*/
static void
bridge_port_insert_at(struct bridge_ports *headp,
@@ -119,7 +119,7 @@ bridge_port_insert_at(struct bridge_ports *headp,
}
/*
- * Find a port entry's possition in the ports list according
+ * Find a port entry's position in the ports list according
* to it's parent bridge interface name. Returns a NULL if
* we should be at the TAILQ head, otherwise the entry after
* which we should be inserted.
diff --git a/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c b/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
index 9684d68..f8644f4 100644
--- a/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
+++ b/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
@@ -1167,7 +1167,7 @@ bridge_port_find_ifstplist(uint8_t port_no, struct ifbpstpreq *buf,
/*
* Read the initial info for all members of a bridge interface.
* Returns the number of ports, 0 - if none, otherwise
- * -1 if some other error occured.
+ * -1 if some other error occurred.
*/
int
bridge_getinfo_bif_ports(struct bridge_if *bif)
@@ -1358,7 +1358,7 @@ bridge_addrs_getinfo_ifalist(struct bridge_if *bif, struct ifbareq **buf)
/*
* Read the initial info for all addresses on a bridge interface.
* Returns the number of addresses, 0 - if none, otherwise
- * -1 if some other error occured.
+ * -1 if some other error occurred.
*/
int
bridge_getinfo_bif_addrs(struct bridge_if *bif)
diff --git a/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_device_tbl.c b/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_device_tbl.c
index 99d55ee..1741502 100644
--- a/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_device_tbl.c
+++ b/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_device_tbl.c
@@ -200,7 +200,7 @@ device_entry_create(const char *name, const char *location, const char *descr)
/*
* From here till the end of this function we reuse name_len
- * for a diferrent purpose - for device_entry::descr
+ * for a different purpose - for device_entry::descr
*/
if (name[0] != '\0')
name_len = strlen(name) + strlen(descr) +
diff --git a/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_scalars.c b/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_scalars.c
index f86334e..87b78e8 100644
--- a/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_scalars.c
+++ b/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_scalars.c
@@ -170,8 +170,8 @@ OS_getSystemDate(struct snmp_value *value)
/**
* Get kernel boot path. For FreeBSD it seems that no arguments are
- * present. Returns NULL if an error occured. The returned data is a
- * pointer to a global strorage.
+ * present. Returns NULL if an error occurred. The returned data is a
+ * pointer to a global storage.
*/
int
OS_getSystemInitialLoadParameters(u_char **params)
diff --git a/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.h b/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.h
index 567368a..04928d2 100644
--- a/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.h
+++ b/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.h
@@ -218,7 +218,7 @@ void fs_tbl_process_statfs_entry(const struct statfs *, int32_t);
/* Called after refreshing fs part of hrStorageTable */
void fs_tbl_post_refresh(void);
-/* Refresh the FS table if neccessary. */
+/* Refresh the FS table if necessary. */
void refresh_fs_tbl(void);
/* Finalization routine for hrFSTable. */
diff --git a/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_storage_tbl.c b/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_storage_tbl.c
index 488d9f5..ee8bdcc 100644
--- a/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_storage_tbl.c
+++ b/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_storage_tbl.c
@@ -133,7 +133,7 @@ static const struct asn_oid OIDX_hrStorageVirtualMemory_c =
OIDX_hrStorageVirtualMemory;
/**
- * Create a new entry into the storage table and, if neccessary, an
+ * Create a new entry into the storage table and, if necessary, an
* entry into the storage map.
*/
static struct storage_entry *
diff --git a/usr.sbin/bsnmpd/modules/snmp_wlan/BEGEMOT-WIRELESS-MIB.txt b/usr.sbin/bsnmpd/modules/snmp_wlan/BEGEMOT-WIRELESS-MIB.txt
index 194ecd1..27f5be7 100644
--- a/usr.sbin/bsnmpd/modules/snmp_wlan/BEGEMOT-WIRELESS-MIB.txt
+++ b/usr.sbin/bsnmpd/modules/snmp_wlan/BEGEMOT-WIRELESS-MIB.txt
@@ -82,8 +82,8 @@ WlanMgmtReasonCode ::= TEXTUAL-CONVENTION
associationLeave(8),
associationNotAuthenticated(9),
-- XXX: TODO - FIXME
- dissasocPwrcapBad(10),
- dissasocSuperchanBad(11),
+ dissassocPwrcapBad(10),
+ dissassocSuperchanBad(11),
ieInvalid(13),
micFailure(14),
fourWayHandshakeTimeout(15),
@@ -579,10 +579,10 @@ wlanIfaceCountryCode OBJECT-TYPE
interface is operating include all environments in the specified
country.
- 2. an ASCII 'O' character, if the country's regulastions are for
+ 2. an ASCII 'O' character, if the country's regulations are for
Outdoor environment only.
- 3. an ASCII 'I' character, if the country's regulastions are for
+ 3. an ASCII 'I' character, if the country's regulations are for
Indoor environment only."
::= { wlanIfaceConfigEntry 2 }
@@ -634,7 +634,7 @@ wlanIfaceFastFrames OBJECT-TYPE
DESCRIPTION
"The value of this object controls whether use of Atheros Fast
Frames is enabled when when communicating with another Fast
- Frames-capable station. The value is only meaningfull for
+ Frames-capable station. The value is only meaningful for
interfaces that support Atheros Fast Frames."
::= { wlanIfaceConfigEntry 7 }
@@ -645,7 +645,7 @@ wlanIfaceDturbo OBJECT-TYPE
DESCRIPTION
"The value of this object controls whether use of Atheros Dynamic
Turbo mode is enabled when when communicating with another Dynamic
- Turbo-capable station. The value is only meaningfull for interfaces
+ Turbo-capable station. The value is only meaningful for interfaces
that support Atheros Dynamic Turbo mode."
::= { wlanIfaceConfigEntry 8 }
@@ -731,7 +731,7 @@ wlanIfaceBeaconMissedThreshold OBJECT-TYPE
MAX-ACCESS read-write
STATUS current
DESCRIPTION
- "The value of this object specifies the number of consequtive missed
+ "The value of this object specifies the number of consecutive missed
beacons before an interface operating in station mode will attempt
to search for a new access point."
DEFVAL { 7 }
@@ -788,7 +788,7 @@ wlanIfaceDynamicWds OBJECT-TYPE
STATUS current
DESCRIPTION
"The value of this object specifies whether Dynamic WDS (DWDS)
- support is enabled. The value is only meaningfull for interfaces
+ support is enabled. The value is only meaningful for interfaces
that support Dynamic WDS."
::= { wlanIfaceConfigEntry 21 }
@@ -798,7 +798,7 @@ wlanIfacePowerSave OBJECT-TYPE
STATUS current
DESCRIPTION
"The value of this object specifies whether powersave operation
- is enabled. The value is only meaningfull for interfaces that
+ is enabled. The value is only meaningful for interfaces that
support powersave operation."
::= { wlanIfaceConfigEntry 22 }
@@ -809,7 +809,7 @@ wlanIfaceApBridge OBJECT-TYPE
DESCRIPTION
"The value of this object specifies whether packets between
wireless clients will be passed directly by an interface
- operating in host ap mode. Disabling it may be usefull in
+ operating in host ap mode. Disabling it may be useful in
situations when traffic between wireless clients needs to be
processed with packet filtering."
DEFVAL { true }
@@ -1308,7 +1308,7 @@ wlanIfaceChannelFrequency OBJECT-TYPE
MAX-ACCESS read-only
STATUS current
DESCRIPTION
- "The channel frequency setting in Mhz."
+ "The channel frequency setting in MHz."
::= { wlanIfaceChannelEntry 5 }
wlanIfaceChannelMaxRegPower OBJECT-TYPE
@@ -2741,7 +2741,7 @@ wlanStatsDwdsMcastDiscard OBJECT-TYPE
MAX-ACCESS read-only
STATUS current
DESCRIPTION
- "The number of multicast over DWDS frames discared by this interface."
+ "The number of multicast over DWDS frames discarded by this interface."
::= { wlanIfaceStatisticsEntry 98 }
wlanStatsHTAssocRejectNoHT OBJECT-TYPE
@@ -2759,7 +2759,7 @@ wlanStatsHTAssocDowngrade OBJECT-TYPE
MAX-ACCESS read-only
STATUS current
DESCRIPTION
- "The number of times HT was dissallowed for an association on
+ "The number of times HT was disallowed for an association on
this interface due to WEP or TKIP requested."
::= { wlanIfaceStatisticsEntry 100 }
@@ -2769,7 +2769,7 @@ wlanStatsHTAssocRateMismatch OBJECT-TYPE
MAX-ACCESS read-only
STATUS current
DESCRIPTION
- "The number of times rate mismatch occured furing HT rate set
+ "The number of times rate mismatch occurred during HT rate set
handling on this interface."
::= { wlanIfaceStatisticsEntry 101 }
@@ -2787,7 +2787,7 @@ wlanStatsAMPDUMoved OBJECT-TYPE
MAX-ACCESS read-only
STATUS current
DESCRIPTION
- "The number of time A-MPDU MSDU moved window occured for this
+ "The number of time A-MPDU MSDU moved window occurred for this
interface."
::= { wlanIfaceStatisticsEntry 103 }
@@ -2807,7 +2807,7 @@ wlanStatsADDBANoRequest OBJECT-TYPE
MAX-ACCESS read-only
STATUS current
DESCRIPTION
- "The number of received ADDBA responces frames that were discarded
+ "The number of received ADDBA responses frames that were discarded
by this interface due to no pending ADDBA."
::= { wlanIfaceStatisticsEntry 105 }
@@ -2817,7 +2817,7 @@ wlanStatsADDBABadToken OBJECT-TYPE
MAX-ACCESS read-only
STATUS current
DESCRIPTION
- "The number of received ADDBA responce frames that were discarded
+ "The number of received ADDBA response frames that were discarded
by this interface since ADDBA response caused dialogtoken mismatch."
::= { wlanIfaceStatisticsEntry 106 }
@@ -2827,7 +2827,7 @@ wlanStatsADDBABadPolicy OBJECT-TYPE
MAX-ACCESS read-only
STATUS current
DESCRIPTION
- "The number of received ADDBA responce frames that were discarded
+ "The number of received ADDBA response frames that were discarded
by this interface since ADDBA response caused policy mismatch."
::= { wlanIfaceStatisticsEntry 107 }
@@ -2877,7 +2877,7 @@ wlanLastDissasocReason OBJECT-TYPE
MAX-ACCESS read-only
STATUS current
DESCRIPTION
- "The last received dissasociate reason on this interface."
+ "The last received disassociate reason on this interface."
::= { wlanIfaceStatisticsEntry 113 }
wlanLastAuthFailReason OBJECT-TYPE
@@ -2942,7 +2942,7 @@ wlanStatsAMPDURexmtFailed OBJECT-TYPE
MAX-ACCESS read-only
STATUS current
DESCRIPTION
- "The number of A-MPDU frames for which retransmition failed on
+ "The number of A-MPDU frames for which retransmission failed on
this interface."
::= { wlanIfaceStatisticsEntry 120 }
@@ -3696,7 +3696,7 @@ wlanMeshDroppedMisaligned OBJECT-TYPE
STATUS current
DESCRIPTION
"The number of frames that were dropped by this interface due to
- bad alighment."
+ bad alignment."
::= { wlanMeshStatsEntry 11 }
-- ---------------------------------------------------------- --
diff --git a/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_snmp.h b/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_snmp.h
index 16632d3..9e184f5 100644
--- a/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_snmp.h
+++ b/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_snmp.h
@@ -175,8 +175,8 @@ struct wlan_iface {
struct wlan_maclist mac_maclist;
uint32_t mesh_ttl;
- enum TruthValue mesh_peering;
- enum TruthValue mesh_forwarding;
+ enum wlanMeshPeeringEnabled mesh_peering;
+ enum wlanMeshForwardingEnabled mesh_forwarding;
enum wlanMeshMetric mesh_metric;
enum wlanMeshPath mesh_path;
enum wlanHWMPRootMode hwmp_root_mode;
diff --git a/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_tree.def b/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_tree.def
index 7c695c4..e0ae2a0 100644
--- a/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_tree.def
+++ b/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_tree.def
@@ -75,8 +75,8 @@ typedef WlanMgmtReasonCode ENUM (
7 notAssociated
8 associationLeave
9 associationNotAuthenticated
- 10 dissasocPwrcapBad
- 11 dissasocSuperchanBad
+ 10 dissassocPwrcapBad
+ 11 dissassocSuperchanBad
13 ieInvalid
14 micFailure
15 fourWayHandshakeTimeout
diff --git a/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.1 b/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.1
index 97ef694..950c114 100644
--- a/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.1
+++ b/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.1
@@ -33,7 +33,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd September 17, 2007
+.Dd January 10, 2012
.Dt BSNMPGET 1
.Os
.Sh NAME
@@ -102,7 +102,7 @@
and
.Nm bsnmpset
are simple tools for retrieving management information from and setting
-management information to a Simple Network Managment Protocol (SNMP) agent.
+management information to a Simple Network Management Protocol (SNMP) agent.
.Pp
Depending on the options
.Nm bsnmpget
@@ -112,14 +112,14 @@ objects whose values will be retrived, waits for a response and prints it if
received successfully.
.Pp
.Nm Bsnmpwalk
-queries an agent with SMNP GetNextRequest packets,
+queries an agent with ether SMNP GetNextRequest or GetBulkRequest packets,
asking for values of OID instances that are a part of the object subtree
rooted at the provided OIDs.
.Pp
.Nm Bsnmpset
constructs a SMNP SetRequest packet, fills in the OIDs (object identifiers),
syntaxes and values of the objects whose values are to be set and waits for a
-responce from server.
+response from server.
.Sh OPTIONS
.Pp
The options are as follows (not all apply to all three programs):
@@ -165,7 +165,7 @@ terminal.
Retry on error.
If an error is returned in the response PDU, resend the request removing the
variable that caused the error until a valid response is received.
-This is only usefull for a GetRequest- and a GetNextRequest-PDU.
+This is only useful for a GetRequest- and a GetNextRequest-PDU.
.It Fl h
Print a short help text with default values for various options.
.It Fl I Ar options
@@ -220,7 +220,7 @@ The path of the posix local (unix domain) socket if local
transport is used.
.It Fl M Ar max-repetitions
The value for the max-repetitions field in a GetBulk PDU.
-Default is 1.
+Default is 10.
.It Fl N Ar non-repeaters
The value for the non-repeaters field in a GetBulk PDU.
Default is 0.
@@ -251,8 +251,17 @@ A binary localized privacy key to use when encypting/decrypting SNMPv3 PDU data.
By default plain text SNMPv3 PDUs are sent.
.It Fl p Ar [get|getnext|getbulk]
The PDU type to send by
-.Nm bsmpget .
-Default is get.
+.Nm bsmpget
+and
+.Nm bsnmpwalk .
+Default is get
+for
+.Nm bsmpget
+and getnext for
+.Nm bsnmpwalk .
+Getbulk allows executing the so called SNMP "bulkwalks" allowing the values of
+multiple columns to be retrived in a single PDU by
+.Nm bsnmpwalk .
.It Fl r Ar retries
Number of resends of request packets before giving up if the agent does
not respond after the first try.
diff --git a/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.c b/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.c
index c05a05a..fb0c7e5 100644
--- a/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.c
+++ b/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.c
@@ -76,8 +76,9 @@ usage(void)
(program == BSNMPWALK) ? "[-dhnK]" :
(program == BSNMPSET) ? "[-adehnK]" :
"",
- (program == BSNMPGET) ? " [-M max-repetitions] [-N non-repeaters]" : "",
- (program == BSNMPGET) ? "[-p pdu] " : "",
+ (program == BSNMPGET || program == BSNMPWALK) ?
+ " [-M max-repetitions] [-N non-repeaters]" : "",
+ (program == BSNMPGET || program == BSNMPWALK) ? "[-p pdu] " : "",
(program == BSNMPGET) ? " OID [OID ...]" :
(program == BSNMPWALK || program == BSNMPSET) ? " [OID ...]" :
""
@@ -150,7 +151,7 @@ snmptool_parse_options(struct snmp_toolinfo *snmptoolctx, int argc, char **argv)
switch (program) {
case BSNMPWALK:
- opts = "dhnKA:b:C:I:i:l:o:P:r:s:t:U:v:";
+ opts = "dhnKA:b:C:I:i:l:M:N:o:P:p:r:s:t:U:v:";
break;
case BSNMPGET:
opts = "aDdehnKA:b:C:I:i:l:M:N:o:P:p:r:s:t:U:v:";
@@ -248,9 +249,9 @@ snmptool_parse_options(struct snmp_toolinfo *snmptoolctx, int argc, char **argv)
/*
* Read user input OID - one of following formats:
- * 1) 1.2.1.1.2.1.0 - that is if option numeric was giveni;
+ * 1) 1.2.1.1.2.1.0 - that is if option numeric was given;
* 2) string - in such case append .0 to the asn_oid subs;
- * 3) string.1 - no additional proccessing required in such case.
+ * 3) string.1 - no additional processing required in such case.
*/
static char *
snmptools_parse_stroid(struct snmp_toolinfo *snmptoolctx,
@@ -398,7 +399,7 @@ snmptool_get(struct snmp_toolinfo *snmptoolctx)
}
if (snmp_parse_resp(&resp, &req) >= 0) {
- snmp_output_resp(snmptoolctx, &resp);
+ snmp_output_resp(snmptoolctx, &resp, NULL);
break;
}
@@ -458,10 +459,16 @@ static int
snmptool_walk(struct snmp_toolinfo *snmptoolctx)
{
struct snmp_pdu req, resp;
- struct asn_oid root; /* Keep the inital oid. */
+ struct asn_oid root; /* Keep the initial oid. */
int32_t outputs, rc;
+ uint32_t op;
- snmp_pdu_create(&req, SNMP_PDU_GETNEXT);
+ if (GET_PDUTYPE(snmptoolctx) == SNMP_PDU_GETBULK)
+ op = SNMP_PDU_GETBULK;
+ else
+ op = SNMP_PDU_GETNEXT;
+
+ snmp_pdu_create(&req, op);
while ((rc = snmp_pdu_add_bindings(snmptoolctx, NULL,
snmptool_add_vbind, &req, 1)) > 0) {
@@ -470,6 +477,10 @@ snmptool_walk(struct snmp_toolinfo *snmptoolctx)
memset(&root, 0, sizeof(struct asn_oid));
asn_append_oid(&root, &(req.bindings[0].var));
+ if (op == SNMP_PDU_GETBULK)
+ snmpget_fix_getbulk(&req, GET_MAXREP(snmptoolctx),
+ GET_NONREP(snmptoolctx));
+
outputs = 0;
while (snmp_dialog(&req, &resp) >= 0) {
if ((snmp_parse_resp(&resp, &req)) < 0) {
@@ -479,21 +490,24 @@ snmptool_walk(struct snmp_toolinfo *snmptoolctx)
break;
}
- if (!(asn_is_suboid(&root, &(resp.bindings[0].var)))) {
- snmp_pdu_free(&resp);
- break;
- }
-
- if (snmp_output_resp(snmptoolctx, &resp)!= 0) {
+ rc = snmp_output_resp(snmptoolctx, &resp, &root);
+ if (rc < 0) {
snmp_pdu_free(&resp);
outputs = -1;
break;
}
- outputs++;
+
+ outputs += rc;
snmp_pdu_free(&resp);
- snmpwalk_nextpdu_create(SNMP_PDU_GETNEXT,
- &(resp.bindings[0].var), &req);
+ if (rc < resp.nbindings)
+ break;
+
+ snmpwalk_nextpdu_create(op,
+ &(resp.bindings[resp.nbindings - 1].var), &req);
+ if (op == SNMP_PDU_GETBULK)
+ snmpget_fix_getbulk(&req, GET_MAXREP(snmptoolctx),
+ GET_NONREP(snmptoolctx));
}
/* Just in case our root was a leaf. */
@@ -503,7 +517,7 @@ snmptool_walk(struct snmp_toolinfo *snmptoolctx)
if (snmp_parse_resp(&resp,&req) < 0)
snmp_output_err_resp(snmptoolctx, &resp);
else
- snmp_output_resp(snmptoolctx, &(resp));
+ snmp_output_resp(snmptoolctx, &(resp), NULL);
snmp_pdu_free(&resp);
} else
@@ -515,7 +529,7 @@ snmptool_walk(struct snmp_toolinfo *snmptoolctx)
break;
}
- snmp_pdu_create(&req, SNMP_PDU_GETNEXT);
+ snmp_pdu_create(&req, op);
}
if (rc == 0)
@@ -1076,7 +1090,7 @@ snmptool_set(struct snmp_toolinfo *snmptoolctx)
if (snmp_pdu_check(&req, &resp) > 0) {
if (GET_OUTPUT(snmptoolctx) != OUTPUT_QUIET)
- snmp_output_resp(snmptoolctx, &resp);
+ snmp_output_resp(snmptoolctx, &resp, NULL);
break;
}
@@ -1105,13 +1119,13 @@ snmptool_set(struct snmp_toolinfo *snmptoolctx)
*/
/*
* According to command line options prepare SNMP Get | GetNext | GetBulk PDU.
- * Wait for a responce and print it.
+ * Wait for a response and print it.
*/
/*
* Do a 'snmp walk' - according to command line options request for values
* lexicographically subsequent and subrooted at a common node. Send a GetNext
- * PDU requesting the value for each next variable and print the responce. Stop
- * when a Responce PDU is received that contains the value of a variable not
+ * PDU requesting the value for each next variable and print the response. Stop
+ * when a Response PDU is received that contains the value of a variable not
* subrooted at the variable the walk started.
*/
int
diff --git a/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.c b/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.c
index a6d14a2..4f71c58 100644
--- a/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.c
+++ b/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.c
@@ -469,7 +469,7 @@ snmp_leaf_insert(struct snmp_toolinfo *snmptoolctx, struct snmp_oid2str *entry)
static int32_t
snmp_index_insert(struct snmp_idxlist *headp, struct index *idx)
{
- if (headp == NULL || index == NULL)
+ if (headp == NULL || idx == NULL)
return (-1);
STAILQ_INSERT_TAIL(headp, idx, link);
diff --git a/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c b/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c
index dbaac5b..52aa1a9 100755
--- a/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c
+++ b/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c
@@ -87,7 +87,7 @@ static const struct {
{ "General error", SNMP_ERR_GENERR },
{ "No access", SNMP_ERR_NO_ACCESS },
{ "Wrong type", SNMP_ERR_WRONG_TYPE },
- { "Wrong lenght", SNMP_ERR_WRONG_LENGTH },
+ { "Wrong length", SNMP_ERR_WRONG_LENGTH },
{ "Wrong encoding", SNMP_ERR_WRONG_ENCODING },
{ "Wrong value", SNMP_ERR_WRONG_VALUE },
{ "No creation", SNMP_ERR_NO_CREATION },
@@ -132,6 +132,7 @@ snmptool_init(struct snmp_toolinfo *snmptoolctx)
snmptoolctx->flags = SNMP_PDU_GET; /* XXX */
SLIST_INIT(&snmptoolctx->filelist);
snmp_client_init(&snmp_client);
+ SET_MAXREP(snmptoolctx, SNMP_MAX_REPETITIONS);
if (add_filename(snmptoolctx, bsnmpd_defs, &IsoOrgDod_OID, 0) < 0)
warnx("Error adding file %s to list", bsnmpd_defs);
@@ -227,12 +228,12 @@ snmp_import_all(struct snmp_toolinfo *snmptoolctx)
}
/*
- * Add a filename to the file list - the initail idea of keeping a list with all
+ * Add a filename to the file list - the initial idea of keeping a list with all
* files to read OIDs from was that an application might want to have loaded in
* memory the OIDs from a single file only and when done with them read the OIDs
* from another file. This is not used yet but might be a good idea at some
* point. Size argument is number of bytes in string including trailing '\0',
- * not string lenght.
+ * not string length.
*/
int32_t
add_filename(struct snmp_toolinfo *snmptoolctx, const char *filename,
@@ -449,7 +450,7 @@ parse_ascii(char *ascii, uint8_t *binstr, size_t binlen)
uint32_t val;
char dptr[3];
- /* Filter 0x at the beggining */
+ /* Filter 0x at the beginning */
if ((alen = strlen(ascii)) > 2 && ascii[0] == '0' && ascii[1] == 'x')
i = 2;
else
@@ -468,7 +469,7 @@ parse_ascii(char *ascii, uint8_t *binstr, size_t binlen)
}
binstr[count] = (uint8_t) val;
if (++count >= binlen) {
- warnx("Key %s too long - truncating to %zu octest",
+ warnx("Key %s too long - truncating to %zu octets",
ascii, binlen);
break;
}
@@ -1523,10 +1524,10 @@ snmp_object_seterror(struct snmp_toolinfo *snmptoolctx,
}
/*
- * Check a PDU received in responce to a SNMP_PDU_GET/SNMP_PDU_GETBULK request
+ * Check a PDU received in response to a SNMP_PDU_GET/SNMP_PDU_GETBULK request
* but don't compare syntaxes - when sending a request PDU they must be null.
* This is a (almost) complete copy of snmp_pdu_check() - with matching syntaxes
- * checks and some other checks skiped.
+ * checks and some other checks skipped.
*/
int32_t
snmp_parse_get_resp(struct snmp_pdu *resp, struct snmp_pdu *req)
@@ -1605,7 +1606,7 @@ snmp_parse_getnext_resp(struct snmp_pdu *resp, struct snmp_pdu *req)
}
/*
- * Should be called to check a responce to get/getnext/getbulk.
+ * Should be called to check a response to get/getnext/getbulk.
*/
int32_t
snmp_parse_resp(struct snmp_pdu *resp, struct snmp_pdu *req)
@@ -1624,7 +1625,7 @@ snmp_parse_resp(struct snmp_pdu *resp, struct snmp_pdu *req)
}
if (resp->error_status != SNMP_ERR_NOERROR) {
- warnx("Error %d in responce", resp->error_status);
+ warnx("Error %d in response", resp->error_status);
return (-1);
}
@@ -2039,14 +2040,20 @@ snmp_output_err_resp(struct snmp_toolinfo *snmptoolctx, struct snmp_pdu *pdu)
}
int32_t
-snmp_output_resp(struct snmp_toolinfo *snmptoolctx, struct snmp_pdu *pdu)
+snmp_output_resp(struct snmp_toolinfo *snmptoolctx, struct snmp_pdu *pdu,
+ struct asn_oid *root)
{
int32_t error;
char p[ASN_OIDSTRLEN];
uint32_t i;
struct snmp_object object;
- for (i = 0, error = 0; i < pdu->nbindings; i++) {
+ i = error = 0;
+ while (i < pdu->nbindings) {
+ if (root != NULL && !(asn_is_suboid(root,
+ &(pdu->bindings[i].var))))
+ break;
+
if (GET_OUTPUT(snmptoolctx) != OUTPUT_QUIET) {
if (!ISSET_NUMERIC(snmptoolctx) &&
(snmp_fill_object(snmptoolctx, &object,
@@ -2058,9 +2065,13 @@ snmp_output_resp(struct snmp_toolinfo *snmptoolctx, struct snmp_pdu *pdu)
}
}
error |= snmp_output_numval(snmptoolctx, &(pdu->bindings[i]), object.info);
+ i++;
}
- return (error);
+ if (error)
+ return (-1);
+
+ return (i);
}
void
diff --git a/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.h b/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.h
index 6e62186..c14fe52 100644
--- a/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.h
+++ b/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.h
@@ -47,6 +47,8 @@
#define SNMP_DEFS_DIR "/usr/share/snmp/defs/"
#define SNMP_DEFAULT_LOCAL "/var/run/snmpd.sock"
+#define SNMP_MAX_REPETITIONS 10
+
enum snmp_access {
SNMP_ACCESS_NONE = 0,
SNMP_ACCESS_GET,
@@ -185,14 +187,14 @@ extern struct snmp_toolinfo snmptool;
/* Definitions for some flags' bits. */
#define OUTPUT_BITS 0x00000003 /* bits 0-1 for output type */
#define NUMERIC_BIT 0x00000004 /* bit 2 for numeric oids */
-#define RETRY_BIT 0x00000008 /* bit 3 for retry on error responce */
+#define RETRY_BIT 0x00000008 /* bit 3 for retry on error response */
#define ERRIGNORE_BIT 0x00000010 /* bit 4 for skip sanity checking */
#define ERRIGNORE_BIT 0x00000010 /* bit 4 for skip sanity checking */
#define EDISCOVER_BIT 0x00000020 /* bit 5 for SNMP Engine Discovery */
#define LOCALKEY_BIT 0x00000040 /* bit 6 for using localized key */
- /* 0x00000080 */ /* bit 7 reserverd */
+ /* 0x00000080 */ /* bit 7 reserved */
#define PDUTYPE_BITS 0x00000f00 /* bits 8-11 for pdu type */
- /* 0x0000f000 */ /* bit 12-15 reserverd */
+ /* 0x0000f000 */ /* bit 12-15 reserved */
#define MAXREP_BITS 0x00ff0000 /* bits 16-23 for max-repetit. value */
#define NONREP_BITS 0xff000000 /* bits 24-31 for non-repeaters value */
@@ -323,7 +325,7 @@ int32_t snmp_parse_resp(struct snmp_pdu *, struct snmp_pdu *);
int32_t snmp_output_numval(struct snmp_toolinfo *, struct snmp_value *,
struct snmp_oid2str *);
void snmp_output_val(struct snmp_value *);
-int32_t snmp_output_resp(struct snmp_toolinfo *, struct snmp_pdu *);
+int32_t snmp_output_resp(struct snmp_toolinfo *, struct snmp_pdu *, struct asn_oid *);
void snmp_output_err_resp(struct snmp_toolinfo *, struct snmp_pdu *);
void snmp_output_engine(void);
void snmp_output_keys(void);
diff --git a/usr.sbin/burncd/burncd.8 b/usr.sbin/burncd/burncd.8
index 64387c3..ae9ffd9 100644
--- a/usr.sbin/burncd/burncd.8
+++ b/usr.sbin/burncd/burncd.8
@@ -1,5 +1,5 @@
.\"
-.\" Copyright (c) 2000,2001,2002 Søren Schmidt <sos@FreeBSD.org>
+.\" Copyright (c) 2000,2001,2002 Søren Schmidt <sos@FreeBSD.org>
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
diff --git a/usr.sbin/burncd/burncd.c b/usr.sbin/burncd/burncd.c
index ab31997..c8b22ac 100644
--- a/usr.sbin/burncd/burncd.c
+++ b/usr.sbin/burncd/burncd.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2000,2001,2002 Søren Schmidt <sos@freebsd.org>
+ * Copyright (c) 2000,2001,2002 Søren Schmidt <sos@freebsd.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/usr.sbin/chkgrp/chkgrp.8 b/usr.sbin/chkgrp/chkgrp.8
index 581fd64..abdaecc 100644
--- a/usr.sbin/chkgrp/chkgrp.8
+++ b/usr.sbin/chkgrp/chkgrp.8
@@ -1,4 +1,4 @@
-.\" Copyright (c) 1998 Dag-Erling Coïdan Smørgrav
+.\" Copyright (c) 1998 Dag-Erling Coïdan Smørgrav
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
diff --git a/usr.sbin/chkgrp/chkgrp.c b/usr.sbin/chkgrp/chkgrp.c
index eca26af..ac40ed5 100644
--- a/usr.sbin/chkgrp/chkgrp.c
+++ b/usr.sbin/chkgrp/chkgrp.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1998 Dag-Erling Coïdan Smørgrav
+ * Copyright (c) 1998 Dag-Erling Coïdan Smørgrav
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/usr.sbin/config/main.c b/usr.sbin/config/main.c
index ceee035..28d4f8a 100644
--- a/usr.sbin/config/main.c
+++ b/usr.sbin/config/main.c
@@ -626,7 +626,7 @@ remember(const char *file)
else
s = ns(file);
- if (index(s, '_') && strncmp(s, "opt_", 4) != 0) {
+ if (strchr(s, '_') && strncmp(s, "opt_", 4) != 0) {
free(s);
return;
}
diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c
index 9ae52af..8a7f55a 100644
--- a/usr.sbin/config/mkmakefile.c
+++ b/usr.sbin/config/mkmakefile.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1993, 19801990
+ * Copyright (c) 1980, 1990, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -154,7 +154,7 @@ makefile(void)
fprintf(ofp, "PROFLEVEL=%d\n", profiling);
if (*srcdir != '\0')
fprintf(ofp,"S=%s\n", srcdir);
- while (fgets(line, BUFSIZ, ifp) != 0) {
+ while (fgets(line, BUFSIZ, ifp) != NULL) {
if (*line != '%') {
fprintf(ofp, "%s", line);
continue;
@@ -204,14 +204,14 @@ makehints(void)
ifp = fopen(hint->hint_name, "r");
if (ifp == NULL)
err(1, "%s", hint->hint_name);
- while (fgets(line, BUFSIZ, ifp) != 0) {
+ while (fgets(line, BUFSIZ, ifp) != NULL) {
/* zap trailing CR and/or LF */
- while ((s = rindex(line, '\n')) != NULL)
+ while ((s = strrchr(line, '\n')) != NULL)
*s = '\0';
- while ((s = rindex(line, '\r')) != NULL)
+ while ((s = strrchr(line, '\r')) != NULL)
*s = '\0';
/* remove # comments */
- s = index(line, '#');
+ s = strchr(line, '#');
if (s)
*s = '\0';
/* remove any whitespace and " characters */
@@ -266,14 +266,14 @@ makeenv(void)
fprintf(ofp, "int envmode = %d;\n", envmode);
fprintf(ofp, "char static_env[] = {\n");
if (ifp) {
- while (fgets(line, BUFSIZ, ifp) != 0) {
+ while (fgets(line, BUFSIZ, ifp) != NULL) {
/* zap trailing CR and/or LF */
- while ((s = rindex(line, '\n')) != NULL)
+ while ((s = strrchr(line, '\n')) != NULL)
*s = '\0';
- while ((s = rindex(line, '\r')) != NULL)
+ while ((s = strrchr(line, '\r')) != NULL)
*s = '\0';
/* remove # comments */
- s = index(line, '#');
+ s = strchr(line, '#');
if (s)
*s = '\0';
/* remove any whitespace and " characters */
@@ -689,7 +689,7 @@ tail(char *fn)
{
char *cp;
- cp = rindex(fn, '/');
+ cp = strrchr(fn, '/');
if (cp == 0)
return (fn);
return (cp+1);
diff --git a/usr.sbin/cpucontrol/Makefile b/usr.sbin/cpucontrol/Makefile
index a048dd7..2d51429 100644
--- a/usr.sbin/cpucontrol/Makefile
+++ b/usr.sbin/cpucontrol/Makefile
@@ -2,6 +2,8 @@
PROG= cpucontrol
MAN= cpucontrol.8
-SRCS= cpucontrol.c intel.c amd.c
+SRCS= cpucontrol.c intel.c amd.c via.c
+
+NO_WCAST_ALIGN=
.include <bsd.prog.mk>
diff --git a/usr.sbin/cpucontrol/cpucontrol.c b/usr.sbin/cpucontrol/cpucontrol.c
index 82bbf05..7477007 100644
--- a/usr.sbin/cpucontrol/cpucontrol.c
+++ b/usr.sbin/cpucontrol/cpucontrol.c
@@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$");
#include "cpucontrol.h"
#include "amd.h"
#include "intel.h"
+#include "via.h"
int verbosity_level = 0;
@@ -91,6 +92,7 @@ struct ucode_handler {
} handlers[] = {
{ intel_probe, intel_update },
{ amd_probe, amd_update },
+ { via_probe, via_update },
};
#define NHANDLERS (sizeof(handlers) / sizeof(*handlers))
diff --git a/usr.sbin/cpucontrol/via.c b/usr.sbin/cpucontrol/via.c
new file mode 100644
index 0000000..71ae406
--- /dev/null
+++ b/usr.sbin/cpucontrol/via.c
@@ -0,0 +1,221 @@
+/*-
+ * Copyright (c) 2011 Fabien Thomas <fabient@FreeBSD.org>.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <err.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <sys/ioccom.h>
+#include <sys/cpuctl.h>
+
+#include <machine/cpufunc.h>
+#include <machine/specialreg.h>
+
+#include "cpucontrol.h"
+#include "via.h"
+
+int
+via_probe(int fd)
+{
+ char vendor[13];
+ int error;
+ cpuctl_cpuid_args_t idargs = {
+ .level = 0,
+ };
+
+ error = ioctl(fd, CPUCTL_CPUID, &idargs);
+ if (error < 0) {
+ WARN(0, "ioctl()");
+ return (1);
+ }
+ ((uint32_t *)vendor)[0] = idargs.data[1];
+ ((uint32_t *)vendor)[1] = idargs.data[3];
+ ((uint32_t *)vendor)[2] = idargs.data[2];
+ vendor[12] = '\0';
+ if (strncmp(vendor, CENTAUR_VENDOR_ID, sizeof(CENTAUR_VENDOR_ID)) != 0)
+ return (1);
+
+ /* TODO: detect Nano CPU. */
+ return (0);
+}
+
+void
+via_update(const char *dev, const char *path)
+{
+ int fd, devfd;
+ struct stat st;
+ uint32_t *fw_image;
+ uint32_t sum;
+ unsigned int i;
+ size_t payload_size;
+ via_fw_header_t *fw_header;
+ uint32_t signature;
+ int32_t revision;
+ void *fw_data;
+ size_t data_size, total_size;
+ cpuctl_msr_args_t msrargs = {
+ .msr = MSR_IA32_PLATFORM_ID,
+ };
+ cpuctl_cpuid_args_t idargs = {
+ .level = 1, /* Signature. */
+ };
+ cpuctl_update_args_t args;
+ int error;
+
+ assert(path);
+ assert(dev);
+
+ fd = -1;
+ devfd = -1;
+ fw_image = MAP_FAILED;
+ devfd = open(dev, O_RDWR);
+ if (devfd < 0) {
+ WARN(0, "could not open %s for writing", dev);
+ return;
+ }
+ error = ioctl(devfd, CPUCTL_CPUID, &idargs);
+ if (error < 0) {
+ WARN(0, "ioctl(%s)", dev);
+ goto fail;
+ }
+ signature = idargs.data[0];
+ error = ioctl(devfd, CPUCTL_RDMSR, &msrargs);
+ if (error < 0) {
+ WARN(0, "ioctl(%s)", dev);
+ goto fail;
+ }
+
+ /*
+ * MSR_IA32_PLATFORM_ID contains flag in BCD in bits 52-50.
+ */
+ msrargs.msr = MSR_BIOS_SIGN;
+ error = ioctl(devfd, CPUCTL_RDMSR, &msrargs);
+ if (error < 0) {
+ WARN(0, "ioctl(%s)", dev);
+ goto fail;
+ }
+ revision = msrargs.data >> 32; /* Revision in the high dword. */
+ WARNX(2, "found cpu type %#x family %#x model %#x stepping %#x.",
+ (signature >> 12) & 0x03, (signature >> 8) & 0x0f,
+ (signature >> 4) & 0x0f, (signature >> 0) & 0x0f);
+ /*
+ * Open firmware image.
+ */
+ fd = open(path, O_RDONLY, 0);
+ if (fd < 0) {
+ WARN(0, "open(%s)", path);
+ return;
+ }
+ error = fstat(fd, &st);
+ if (error != 0) {
+ WARN(0, "fstat(%s)", path);
+ goto fail;
+ }
+ if (st.st_size < 0 || (unsigned)st.st_size < sizeof(*fw_header)) {
+ WARNX(2, "file too short: %s", path);
+ goto fail;
+ }
+
+ /*
+ * mmap the whole image.
+ */
+ fw_image = (uint32_t *)mmap(NULL, st.st_size, PROT_READ,
+ MAP_PRIVATE, fd, 0);
+ if (fw_image == MAP_FAILED) {
+ WARN(0, "mmap(%s)", path);
+ goto fail;
+ }
+ fw_header = (via_fw_header_t *)fw_image;
+ if (fw_header->signature != VIA_HEADER_SIGNATURE ||
+ fw_header->loader_revision != VIA_LOADER_REVISION) {
+ WARNX(2, "%s is not a valid via firmware: version mismatch",
+ path);
+ goto fail;
+ }
+ data_size = fw_header->data_size;
+ total_size = fw_header->total_size;
+ if (total_size > (unsigned)st.st_size || st.st_size < 0) {
+ WARNX(2, "file too short: %s", path);
+ goto fail;
+ }
+ payload_size = data_size + sizeof(*fw_header);
+
+ /*
+ * Check the primary checksum.
+ */
+ sum = 0;
+ for (i = 0; i < (payload_size / sizeof(uint32_t)); i++)
+ sum += *((uint32_t *)fw_image + i);
+ if (sum != 0) {
+ WARNX(2, "%s: update data checksum invalid", path);
+ goto fail;
+ }
+
+ fw_data = fw_header + 1; /* Pointer to the update data. */
+
+ /*
+ * Check if the given image is ok for this cpu.
+ */
+ if (signature != fw_header->cpu_signature)
+ goto fail;
+
+ if (fw_header->revision != 0 && revision >= fw_header->revision) {
+ WARNX(1, "skipping %s of rev %#x: up to date",
+ path, fw_header->revision);
+ goto fail;
+ }
+ fprintf(stderr, "%s: updating cpu %s from rev %#x to rev %#x... ",
+ path, dev, revision, fw_header->revision);
+ args.data = fw_data;
+ args.size = data_size;
+ error = ioctl(devfd, CPUCTL_UPDATE, &args);
+ if (error < 0) {
+ fprintf(stderr, "failed.\n");
+ WARN(0, "ioctl()");
+ goto fail;
+ }
+ fprintf(stderr, "done.\n");
+
+fail:
+ if (fw_image != MAP_FAILED)
+ if (munmap(fw_image, st.st_size) != 0)
+ warn("munmap(%s)", path);
+ if (devfd >= 0)
+ close(devfd);
+ if (fd >= 0)
+ close(fd);
+ return;
+}
diff --git a/usr.sbin/cpucontrol/via.h b/usr.sbin/cpucontrol/via.h
new file mode 100644
index 0000000..ea99eac
--- /dev/null
+++ b/usr.sbin/cpucontrol/via.h
@@ -0,0 +1,63 @@
+/*-
+ * Copyright (c) 2011 Fabien Thomas <fabient@FreeBSD.org>.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef VIA_H
+#define VIA_H
+
+/*
+ * Prototypes.
+ */
+ucode_probe_t via_probe;
+ucode_update_t via_update;
+
+typedef struct via_fw_header {
+ uint32_t signature; /* Signature. */
+ int32_t revision; /* Unique version number. */
+ uint32_t date; /* Date of creation in BCD. */
+ uint32_t cpu_signature; /* Extended family, extended
+ model, type, family, model
+ and stepping. */
+ uint32_t checksum; /* Sum of all DWORDS should
+ be 0. */
+ uint32_t loader_revision; /* Version of the loader
+ required to load update. */
+ uint32_t reserverd1; /* Platform IDs encoded in
+ the lower 8 bits. */
+ uint32_t data_size;
+ uint32_t total_size;
+ uint8_t reserved2[12];
+} via_fw_header_t;
+
+typedef struct via_cpu_signature {
+ uint32_t cpu_signature;
+ uint32_t checksum;
+} via_cpu_signature_t;
+
+#define VIA_HEADER_SIGNATURE 0x53415252
+#define VIA_LOADER_REVISION 0x00000001
+
+#endif /* !VIA_H */
diff --git a/usr.sbin/cron/cron/do_command.c b/usr.sbin/cron/cron/do_command.c
index daf695f..fee4131 100644
--- a/usr.sbin/cron/cron/do_command.c
+++ b/usr.sbin/cron/cron/do_command.c
@@ -147,7 +147,7 @@ child_process(e, u)
#ifdef USE_SIGCHLD
/* our parent is watching for our death by catching SIGCHLD. we
* do not care to watch for our children's deaths this way -- we
- * use wait() explictly. so we have to disable the signal (which
+ * use wait() explicitly. so we have to disable the signal (which
* was inherited from the parent).
*/
(void) signal(SIGCHLD, SIG_DFL);
diff --git a/usr.sbin/cron/doc/CHANGES b/usr.sbin/cron/doc/CHANGES
index 59f6803..ed52a65 100644
--- a/usr.sbin/cron/doc/CHANGES
+++ b/usr.sbin/cron/doc/CHANGES
@@ -1,3 +1,6 @@
+$FreeBSD$
+--------
+
Vixie Cron Changes from V2 to V3
Paul Vixie
29-Dec-1993
@@ -20,7 +23,7 @@ be reread whenever it changes.
I also added a "-e" option to crontab(1). Nine people also sent me diffs
to add this option, but I had already implemented it on my own. I actually
-released an interrim version (V2.2, I think) for limited testing, and got a
+released an interim version (V2.2, I think) for limited testing, and got a
chance to fix a bad security bug in the "-e" option thanks to XXX.
The daemon used to be extraordinarily sloppy in its use of file descriptors.
@@ -57,7 +60,7 @@ which explains why a lot of other people complained that it wasn't using
syslog even when they configured it that way :-). Steve Simmons told me
first, though, so he gets the point.
-An interrim version of the daemon tried to "stat" every file before
+An interim version of the daemon tried to "stat" every file before
executing it; this turned out to be a horribly bad idea since finding the
name of a file from a shell command is a hard job (that's why we have
shells, right?) I removed this bogus code. Dave Burgess gets the point.
diff --git a/usr.sbin/cron/doc/MAIL b/usr.sbin/cron/doc/MAIL
index 3549e94..624f7c4 100644
--- a/usr.sbin/cron/doc/MAIL
+++ b/usr.sbin/cron/doc/MAIL
@@ -186,7 +186,7 @@ five fields. Examples:
(run command if day-of-month AND day-of-week are true)
-Get the picture? This would be compatable with existing versions of
+Get the picture? This would be compatible with existing versions of
cron (which wouldn't currently be using any special characters, so
that old crontabs would be handled correctly).
diff --git a/usr.sbin/cron/lib/entry.c b/usr.sbin/cron/lib/entry.c
index b6be69c..ea015da 100644
--- a/usr.sbin/cron/lib/entry.c
+++ b/usr.sbin/cron/lib/entry.c
@@ -254,7 +254,7 @@ load_entry(file, error_func, pw, envp)
}
}
- /* make sundays equivilent */
+ /* make sundays equivalent */
if (bit_test(e->dow, 0) || bit_test(e->dow, 7)) {
bit_set(e->dow, 0);
bit_set(e->dow, 7);
diff --git a/usr.sbin/ctladm/Makefile b/usr.sbin/ctladm/Makefile
new file mode 100644
index 0000000..88e82f4
--- /dev/null
+++ b/usr.sbin/ctladm/Makefile
@@ -0,0 +1,21 @@
+# $FreeBSD$
+
+PROG= ctladm
+SRCS= ctladm.c util.c ctl_util.c ctl_scsi_all.c
+.PATH: ${.CURDIR}/../../sys/cam/ctl
+SDIR= ${.CURDIR}/../../sys
+CFLAGS+= -I${SDIR}
+# This is necessary because of these warnings:
+# warning: cast increases required alignment of target type
+# The solution is to either upgrade the compiler (preferred), or do void
+# pointer gymnastics to get around the warning. For now, disable the
+# warning instead of doing the void pointer workaround.
+.if ${MACHINE_CPUARCH} == "arm"
+WARNS?= 3
+.endif
+
+DPADD= ${LIBCAM} ${LIBSBUF}
+LDADD= -lcam -lsbuf -lbsdxml
+MAN= ctladm.8
+
+.include <bsd.prog.mk>
diff --git a/usr.sbin/ctladm/ctladm.8 b/usr.sbin/ctladm/ctladm.8
new file mode 100644
index 0000000..027d89e
--- /dev/null
+++ b/usr.sbin/ctladm/ctladm.8
@@ -0,0 +1,963 @@
+.\"
+.\" Copyright (c) 2003 Silicon Graphics International Corp.
+.\" 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,
+.\" without modification.
+.\" 2. Redistributions in binary form must reproduce at minimum a disclaimer
+.\" substantially similar to the "NO WARRANTY" disclaimer below
+.\" ("Disclaimer") and any redistribution must be conditioned upon
+.\" including a substantially similar Disclaimer requirement for further
+.\" binary redistribution.
+.\"
+.\" NO WARRANTY
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+.\" HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+.\"
+.\" ctladm utility man page.
+.\"
+.\" Author: Ken Merry <ken@FreeBSD.org>
+.\"
+.\" $Id: //depot/users/kenm/FreeBSD-test2/usr.sbin/ctladm/ctladm.8#3 $
+.\" $FreeBSD$
+.\"
+.Dd July 8, 2011
+.Dt CTLADM 8
+.Os
+.Sh NAME
+.Nm ctladm
+.Nd CAM Target Layer control utility
+.Sh SYNOPSIS
+.Nm
+.Aq Ar command
+.Op target:lun
+.Op generic args
+.Op command args
+.Nm
+.Ic tur
+.Aq target:lun
+.Op general options
+.Nm
+.Ic inquiry
+.Aq target:lun
+.Op general options
+.Nm
+.Ic reqsense
+.Aq target:lun
+.Op general options
+.Nm
+.Ic reportluns
+.Aq target:lun
+.Op general options
+.Nm
+.Ic read
+.Aq target:lun
+.Op general options
+.Aq Fl l Ar lba
+.Aq Fl d Ar datalen
+.Aq Fl f Ar file|-
+.Aq Fl b Ar blocksize_bytes
+.Op Fl c Ar cdbsize
+.Op Fl N
+.Nm
+.Ic write
+.Aq target:lun
+.Op general options
+.Aq Fl l Ar lba
+.Aq Fl d Ar datalen
+.Aq Fl f Ar file|-
+.Aq Fl b Ar blocksize_bytes
+.Op Fl c Ar cdbsize
+.Op Fl N
+.Nm
+.Ic bbrread
+.Aq target:lun
+.Op general options
+.Aq Fl -l Ar lba
+.Aq Fl -d Ar datalen
+.Nm
+.Ic readcap
+.Aq target:lun
+.Op general options
+.Op Fl c Ar cdbsize
+.Nm
+.Ic modesense
+.Aq target:lun
+.Aq Fl m Ar page | Fl l
+.Op Fl P Ar pc
+.Op Fl d
+.Op Fl S Ar subpage
+.Op Fl c Ar size
+.Nm
+.Ic start
+.Aq target:lun
+.Op general options
+.Op Fl i
+.Op Fl o
+.Nm
+.Ic stop
+.Aq target:lun
+.Op general options
+.Op Fl i
+.Op Fl o
+.Nm
+.Ic synccache
+.Aq target:lun
+.Op general options
+.Op Fl l Ar lba
+.Op Fl b Ar blockcount
+.Op Fl r
+.Op Fl i
+.Op Fl c Ar cdbsize
+.Nm
+.Ic shutdown
+.Op general options
+.Nm
+.Ic startup
+.Op general options
+.Nm
+.Ic hardstop
+.Nm
+.Ic hardstart
+.Nm
+.Ic lunlist
+.Nm
+.Ic delay
+.Aq target:lun
+.Aq Fl l Ar datamove|done
+.Aq Fl t Ar secs
+.Op Fl T Ar oneshot|cont
+.Nm
+.Ic realsync Aq on|off|query
+.Nm
+.Ic setsync interval
+.Aq target:lun
+.Aq Fl i Ar interval
+.Nm
+.Ic getsync
+.Aq target:lun
+.Nm
+.Ic inject
+.Aq Fl i Ar action
+.Aq Fl p Ar pattern
+.Op Fl r Ar lba,len
+.Op Fl s Ar len fmt Op Ar args
+.Op Fl c
+.Op Fl d Ar delete_id
+.Nm
+.Ic create
+.Aq Fl b Ar backend
+.Op Fl B Ar blocksize
+.Op Fl d Ar device_id
+.Op Fl l Ar lun_id
+.Op Fl o Ar name=value
+.Op Fl s Ar size_bytes
+.Op Fl S Ar serial_num
+.Op Fl t Ar device_type
+.Nm
+.Ic remove
+.Aq Fl b Ar backend
+.Aq Fl l Ar lun_id
+.Op Fl o Ar name=value
+.Nm
+.Ic devlist
+.Op Fl b Ar backend
+.Op Fl v
+.Op Fl x
+.Nm
+.Ic port
+.Op Fl l
+.Op Fl o Ar on|off
+.Op Fl w Ar wwpn
+.Op Fl W Ar wwnn
+.Op Fl p Ar targ_port
+.Op Fl t Ar fe_type
+.Op Fl q
+.Op Fl x
+.Nm
+.Ic dumpooa
+.Nm
+.Ic dumpstructs
+.Nm
+.Ic help
+.Sh DESCRIPTION
+The
+.Nm
+utility is designed to provide a way to access and control the CAM Target
+Layer (CTL).
+It provides a way to send
+.Tn SCSI
+commands to the CTL layer, and also provides
+some meta-commands that utilize
+.Tn SCSI
+commands.
+(For instance, the
+.Ic lunlist
+command is implemented using the
+.Tn SCSI
+REPORT LUNS and INQUIRY commands.)
+.Pp
+The
+.Nm
+utility has a number of primary functions, many of which require a device
+identifier.
+The device identifier takes the following form:
+.Bl -tag -width 14n
+.It target:lun
+Specify the target (almost always 0) and LUN number to operate on.
+.El
+Many of the primary functions of the
+.Nm
+utility take the following optional arguments:
+.Pp
+.Bl -tag -width 10n
+.It Fl C Ar retries
+Specify the number of times to retry a command in the event of failure.
+.It Fl D Ar device
+Specify the device to open. This allows opening a device other than the
+default device,
+.Pa /dev/cam/ctl ,
+to be opened for sending commands.
+.It Fl I Ar id
+Specify the initiator number to use.
+By default,
+.Nm
+will use 7 as the initiator number.
+.El
+.Pp
+Primary commands:
+.Bl -tag -width 11n
+.It Ic tur
+Send the
+.Tn SCSI
+TEST UNIT READY command to the device and report whether or not it is
+ready.
+.It Ic inquiry
+Send the
+.Tn SCSI
+INQUIRY command to the device and display some of the returned inquiry
+data.
+.It Ic reqsense
+Send the
+.Tn SCSI
+REQUEST SENSE command to the device and display the returned sense
+information.
+.It Ic reportluns
+Send the
+.Tn SCSI
+REPORT LUNS command to the device and display supported LUNs.
+.It Ic read
+Send a
+.Tn SCSI
+READ command to the device, and write the requested data to a file or
+stdout.
+.Bl -tag -width 12n
+.It Fl l Ar lba
+Specify the starting Logical Block Address for the READ. This can be
+specified in decimal, octal (starting with 0), hexadecimal (starting with
+0x) or any other base supported by
+.Xr strtoull 3 .
+.It Fl d Ar datalen
+Specify the length, in 512 byte blocks, of the READ request.
+.It Fl f Ar file
+Specify the destination for the data read by the READ command. Either a
+filename or
+.Sq -
+for stdout may be specified.
+.It Fl c Ar cdbsize
+Specify the minimum
+.Tn SCSI
+CDB (Command Data Block) size to be used for the READ request. Allowable
+values are 6, 10, 12 and 16. Depending upon the LBA and amount of data
+requested, a larger CDB size may be used to satisfy the request. (e.g.,
+for LBAs above 0xffffffff, READ(16) must be used to satisfy the request.)
+.It Fl b Ar blocksize
+Specify the blocksize of the underlying
+.Tn SCSI
+device, so the transfer length
+can be calculated accurately. The blocksize can be obtained via the
+.Tn SCSI
+READ CAPACITY command.
+.It Fl N
+Do not copy data to
+.Nm
+from the kernel when doing a read, just execute the command without copying
+data.
+This is to be used for performance testing.
+.El
+.It Ic write
+Read data from a file or stdin, and write the data to the device using the
+.Tn SCSI
+WRITE command.
+.Bl -tag -width 12n
+.It Fl l Ar lba
+Specify the starting Logical Block Address for the WRITE. This can be
+specified in decimal, octal (starting with 0), hexadecimal (starting with
+0x) or any other base supported by
+.Xr strtoull 3 .
+.It Fl d Ar atalen
+Specify the length, in 512 byte blocks, of the WRITE request.
+.It Fl f Ar file
+Specify the source for the data to be written by the WRITE command. Either a
+filename or
+.Sq -
+for stdin may be specified.
+.It Fl c Ar cdbsize
+Specify the minimum
+.Tn SCSI
+CDB (Command Data Block) size to be used for the READ request. Allowable
+values are 6, 10, 12 and 16. Depending upon the LBA and amount of data
+requested, a larger CDB size may be used to satisfy the request. (e.g.,
+for LBAs above 0xffffffff, READ(16) must be used to satisfy the request.)
+.It Fl b Ar blocksize
+Specify the blocksize of the underlying
+.Tn SCSI
+device, so the transfer length
+can be calculated accurately. The blocksize can be obtained via the
+.Tn SCSI
+READ CAPACITY command.
+.It Fl N
+Do not copy data to
+.Nm
+to the kernel when doing a write, just execute the command without copying
+data.
+This is to be used for performance testing.
+.El
+.It Ic bbrread
+Issue a SCSI READ command to the logical device to potentially force a bad
+block on a disk in the RAID set to be reconstructed from the other disks in
+the array. This command should only be used on an array that is in the
+normal state. If used on a critical array, it could cause the array to go
+offline if the bad block to be remapped is on one of the disks that is
+still active in the array.
+.Pp
+The data for this particular command will be discarded, and not returned to
+the user.
+.Pp
+In order to determine which LUN to read from, the user should first
+determine which LUN the disk with a bad block belongs to. Then he should
+map the bad disk block back to the logical block address for the array in
+order to determine which LBA to pass in to the
+.Ic bbrread
+command.
+.Pp
+This command is primarily intended for testing. In practice, bad block
+remapping will generally be triggered by the in-kernel Disk Aerobics and
+Disk Scrubbing code.
+.Bl -tag -width 10n
+.It Fl l Ar lba
+Specify the starting Logical Block Address.
+.It Fl d Ar datalen
+Specify the amount of data in bytes to read from the LUN. This must be a
+multiple of the LUN blocksize.
+.El
+.It Ic readcap
+Send the
+.Tn SCSI
+READ CAPACITY command to the device and display the device size and device
+block size. By default, READ CAPACITY(10) is
+used. If the device returns a maximum LBA of 0xffffffff, however,
+.Nm
+will automatically issue a READ CAPACITY(16), which is implemented as a
+service action of the SERVICE ACTION IN(16) opcode. The user can specify
+the minimum CDB size with the
+.Fl c
+argument. Valid values for the
+.Fl c
+option are 10 and 16. If a 10 byte CDB is specified, the request will be
+automatically reissued with a 16 byte CDB if the maximum LBA returned is
+0xffffffff.
+.It Ic modesense
+Send a
+.Tn SCSI
+MODE SENSE command to the device, and display the requested mode page(s) or
+page list.
+.Bl -tag -width 10n
+.It Fl m Ar page
+Specify the mode page to display. This option and the
+.Fl l
+option are mutually exclusive. One of the two must be specified, though.
+Mode page numbers may be specified in decimal or hexadecimal.
+.It Fl l
+Request that the list of mode pages supported by the device be returned.
+This option and the
+.Fl m
+option are mutually exclusive. One of the two must be specified, though.
+.It Fl P Ar pc
+Specify the mode page page control value. Possible values are:
+.Bl -tag -width 2n -compact
+.It 0
+Current values.
+.It 1
+Changeable value bitmask.
+.It 2
+Default values.
+.It 3
+Saved values.
+.El
+.It Fl d
+Disable block descriptors when sending the mode sense request.
+.It Fl S Ar subpage
+Specify the subpage used with the mode sense request.
+.It Fl c Ar cdbsize
+Specify the CDB size used for the mode sense request. Supported values are
+6 and 10.
+.El
+.It Ic start
+Send the
+.Tn SCSI
+START STOP UNIT command to the specified LUN with the start
+bit set.
+.Bl -tag -width 4n
+.It Fl i
+Set the immediate bit in the CDB. Note that CTL does not support the
+immediate bit, so this is primarily useful for making sure that CTL returns
+the proper error.
+.It Fl o
+Set the Copan proprietary on/offline bit in the CDB. When this flag is
+used, the LUN will be marked online again (see the description of the
+.Ic shutdown
+and
+.Ic startup
+commands). When this flag is used with a
+start command, the LUN will NOT be spun up. You need to use a start
+command without the
+.Fl o
+flag to spin up the disks in the LUN.
+.El
+.It Ic stop
+Send the
+.Tn SCSI
+START STOP UNIT command to the specified LUN with the start
+bit cleared. We use an ordered tag to stop the LUN, so we can guarantee
+that all pending I/O executes before it is stopped. (CTL guarantees this
+anyway, but
+.Nm
+sends an ordered tag for completeness.)
+.Bl -tag -width 4n
+.It Fl i
+Set the immediate bit in the CDB. Note that CTL does not support the
+immediate bit, so this is primarily useful for making sure that CTL returns
+the proper error.
+.It Fl o
+Set the Copan proprietary on/offline bit in the CDB. When this flag is
+used, the LUN will be spun down and taken offline ("Logical unit not ready,
+manual intervention required"). See the description of the
+.Ic shutdown
+and
+.Ic startup
+options.
+.El
+.It Ic synccache
+Send the
+.Tn SCSI
+SYNCHRONIZE CACHE command to the device. By default, SYNCHRONIZE
+CACHE(10) is used. If the specified starting LBA is greater than
+0xffffffff or the length is greater than 0xffff, though,
+SYNCHRONIZE CACHE(16) will be used. The 16 byte command will also be used
+if the user specifies a 16 byte CDB with the
+.Fl c
+argument.
+.Bl -tag -width 14n
+.It Fl l Ar lba
+Specify the starting LBA of the cache region to synchronize. This option is a
+no-op for CTL. If you send a SYNCHRONIZE CACHE command, it will sync the
+cache for the entire LUN.
+.It Fl b Ar blockcount
+Specify the length of the cache region to synchronize. This option is a
+no-op for CTL. If you send a SYNCHRONIZE CACHE command, it will sync the
+cache for the entire LUN.
+.It Fl r
+Specify relative addressing for the starting LBA. CTL does not support
+relative addressing, since it only works for linked commands, and CTL
+doesn't support linked commands.
+.It Fl i
+Tell the target to return status immediately after issuing the SYHCHRONIZE CACHE
+command rather than waiting for the cache to finish syncing. CTL does not
+support this bit.
+.It Fl c Ar cdbsize
+Specify the minimum CDB size. Valid values are 10 and 16 bytes.
+.El
+.It Ic shutdown
+Issue a
+.Tn SCSI
+START STOP UNIT command with the start bit cleared and the on/offline bit
+set to all direct access LUNs. This will spin down all direct access LUNs,
+and mark them offline ("Logical unit not ready, manual intervention
+required"). Once marked offline, the state can only be cleared by sending
+a START STOP UNIT command with the start bit set and the on/offline bit
+set. The
+.Nm
+commands
+.Ic startup
+and
+.Ic start
+will accomplish this. Note that the
+on/offline bit is a non-standard Copan extension to the
+.Tn SCSI
+START STOP UNIT command, so merely sending a normal start command from an
+initiator will not clear the condition. (This is by design.)
+.It Ic startup
+Issue a
+.Tn SCSI
+START STOP UNIT command with the start bit set and the on/offline bit set
+to all direct access LUNs. This will mark all direct access LUNs "online"
+again. It will not cause any LUNs to start up. A separate start command
+without the on/offline bit set is necessary for that.
+.It Ic hardstop
+Use the kernel facility for stopping all direct access LUNs and setting the
+offline bit. Unlike the
+.Ic shutdown
+command above, this command allows shutting down LUNs with I/O active. It
+will also issue a LUN reset to any reserved LUNs to break the reservation
+so that the LUN can be stopped.
+.Ic shutdown
+command instead.
+.It Ic hardstart
+This command is functionally identical to the
+.Ic startup
+command described above. The primary difference is that the LUNs are
+enumerated and commands sent by the in-kernel Front End Target Driver
+instead of by
+.Nm .
+.It Ic lunlist
+List all LUNs registered with CTL.
+Because this command uses the ioctl port, it will only work when the FETDs
+(Front End Target Drivers) are enabled.
+This command is the equivalent of doing a REPORT LUNS on one LUN and then
+and then an INQUIRY on each LUN in the system.
+.It Ic delay
+Delay commands at the given location. There are two places where commands
+may be delayed currently: before data is transferred
+.Pq Dq datamove
+and just prior to sending status to the host
+.Pq Dq done .
+One of the two must be supplied as an argument to the
+.Fl l
+option. The
+.Fl t
+option must also be specified.
+.Bl -tag -width 12n
+.It Fl l Ar delayloc
+Delay command(s) at the specified location.
+This can either be at the data movement stage (datamove) or prior to
+command completion (done).
+.It Fl t Ar delaytime
+Delay command(s) for the specified number of seconds. This must be
+specified. If set to 0, it will clear out any previously set delay for
+this particular location (datamove or done).
+.It Fl T Ar delaytype
+Specify the delay type.
+By default, the
+.Ic delay
+option will delay the next command sent to the given LUN.
+With the
+.Fl T Ar cont
+option, every command will be delayed by the specified period of time.
+With the
+.Fl T Ar oneshot
+the next command sent to the given LUN will be delayed and all subsequent
+commands will be completed normally.
+This is the default.
+.El
+.It Ic realsync
+Query and control CTL's SYNCHRONIZE CACHE behavior. The
+.Sq query
+argument
+will show whether SYNCHRONIZE CACHE commands are being sent to the backend
+or not.
+The default is to send SYNCHRONIZE CACHE commands to the backend.
+The
+.Sq on
+argument will cause all SYNCHRONIZE CACHE commands sent to all LUNs to be
+sent to the backend.
+The
+.Sq off
+argument will cause all SYNCHRONIZE CACHE commands sent to all LUNs to be
+immediately returned to the initiator with successful status.
+.It Ic setsync
+For a given lun, only actually service every Nth SYNCHRONIZE CACHE command
+that is sent. This can be used for debugging the optimal time period for
+sending SYNCHRONIZE cache commands. An interval of 0 means that the cache
+will be flushed for this LUN every time a SYNCHRONIZE CACHE command is
+received.
+.Pp
+You must specify the target and LUN you want to modify.
+.It Ic getsync
+Get the interval at which we actually service the SYNCHRONIZE CACHE
+command, as set by the
+.Ic setsync
+command above.
+The reported number means that we will actually flush the cache on every
+Nth SYNCHRONIZE CACHE command. A value of 0 means that we will flush the
+cache every time.
+.Pp
+You must specify the target and LUN you want to query.
+.It Ic inject
+Inject the specified type of error for the LUN specified, when a command
+that matches the given pattern is seen.
+The sense data returned is in either fixed or descriptor format, depending
+upon the status of the D_SENSE bit in the control mode page (page 0xa) for
+the LUN.
+.Pp
+Errors are only injected for commands that have not already failed for
+other reasons.
+By default, only the first command matching the pattern specified is
+returned with the supplied error.
+.Pp
+If the
+.Fl c
+flag is specified, all commands matching the pattern will be returned with
+the specified error until the error injection command is deleted with
+.Fl d
+flag.
+.Bl -tag -width 17n
+.It Fl i Ar action
+Specify the error to return:
+.Bl -tag -width 10n
+.It aborted
+Return the next matching command on the specified LUN with the sense key
+ABORTED COMMAND (0x0b), and the ASC/ASCQ 0x45,0x00 ("Select or reselect
+failure").
+.It mediumerr
+Return the next matching command on the specified LUN with the sense key
+MEDIUM ERROR (0x03) and the ASC/ASCQ 0x11,0x00 ("Unrecovered read error") for
+reads, or ASC/ASCQ 0x0c,0x02 ("Write error - auto reallocation failed")
+for write errors.
+.It ua
+Return the next matching command on the specified LUN with the sense key
+UNIT ATTENTION (0x06) and the ASC/ASCQ 0x29,0x00 ("POWER ON, RESET, OR BUS
+DEVICE RESET OCCURRED").
+.It custom
+Return the next matching command on the specified LUN with the supplied
+sense data.
+The
+.Fl s
+argument must be specified.
+.El
+.It Fl p Ar pattern
+Specify which commands should be returned with the given error.
+.Bl -tag -width 10n
+.It read
+The error should apply to READ(6), READ(10), READ(12), READ(16), etc.
+.It write
+The error should apply to WRITE(6), WRITE(10), WRITE(12), WRITE(16), WRITE
+AND VERIFY(10), etc.
+.It rw
+The error should apply to both read and write type commands.
+.It readcap
+The error should apply to READ CAPACITY(10) and READ CAPACITY(16) commands.
+.It tur
+The error should apply to TEST UNIT READY commands.
+.It any
+The error should apply to any command.
+.El
+.It Fl r Ar lba,len
+Specify the starting lba and length of the range of LBAs which should
+trigger an error.
+This option is only applies when read and/or write patterns are specified.
+If used with other command types, the error will never be triggered.
+.It Fl s Ar len fmt Op Ar args
+Specify the sense data that is to be returned for custom actions.
+If the format is
+.Sq - ,
+len bytes of sense data will be read from standard input and written to the
+sense buffer.
+If len is longer than 252 bytes (the maximum allowable
+.Tn SCSI
+sense data length), it will be truncated to that length.
+The sense data format is described in
+.Xr cam_cdparse 3 .
+.It Fl c
+The error injection should be persistent, instead of happening once.
+Persistent errors must be deleted with the
+.Fl d
+argument.
+.It Fl d Ar delete_id
+Delete the specified error injection serial number.
+The serial number is returned when the error is injected.
+.El
+.It Ic port
+Perform one of several CTL frontend port operations.
+Either get a list of frontend ports
+.Pq Fl l ,
+turn one or more frontends on
+or off
+.Pq Fl o Ar on|off ,
+or set the World Wide Node Name
+.Pq Fl w Ar wwnn
+or World Wide Port Name
+.Pq Fl W Ar wwpn
+for a given port.
+One of
+.Fl l ,
+.Fl o ,
+or
+.Fl w
+or
+.Fl W
+must be specified.
+The WWNN and WWPN may both be specified at the same time, but cannot be
+combined with enabling/disabling or listing ports.
+.Bl -tag -width 12n
+.It Fl l
+List all CTL frontend ports or a specific port type or number.
+.It Fl o Ar on|off
+Turn the specified CTL frontend ports off or on.
+If no port number or port type is specified, all ports are turned on or
+off.
+.It Fl p Ar targ_port
+Specify the frontend port number.
+The port numbers can be found in the frontend port list.
+.It Fl q
+Omit the header in the port list output.
+.It Fl t Ar fe_type
+Specify the frontend type.
+Currently defined port types are
+.Dq fc
+(Fibre Channel),
+.Dq scsi
+(Parallel SCSI),
+.Dq ioctl
+(CTL ioctl interface),
+and
+.Dq internal
+(CTL CAM SIM).
+.It Fl w Ar wwnn
+Set the World Wide Node Name for the given port.
+The
+.Fl n
+argument must be specified, since this is only possible to implement on a
+single port.
+As a general rule, the WWNN should be the same across all ports on the
+system.
+.It Fl W Ar wwpn
+Set the World Wide Node Name for the given port.
+The
+.Fl n
+argument must be specified, since this is only possible to implement on a
+single port.
+As a general rule, the WWPN must be different for every port in the system.
+.It Fl x
+Output the port list in XML format.
+.El
+.It Ic dumpooa
+Dump the OOA (Order Of Arrival) queue for each LUN registered with CTL.
+.It Ic dumpstructs
+Dump the CTL structures to the console.
+.It Ic create
+Create a new LUN.
+The backend must be specified, and depending upon the backend requested,
+some of the other options may be required.
+If the LUN is created successfully, the LUN configuration will be
+displayed.
+If LUN creation fails, a message will be displayed describing the failure.
+.Bl -tag -width 14n
+.It Fl b Ar backend
+The
+.Fl b
+flag is required.
+This specifies the name backend to use when creating the LUN.
+Examples are
+.Dq ramdisk
+and
+.Dq block .
+.It Fl B Ar blocksize
+Specify the blocksize of the backend in bytes.
+.It Fl d Ar device_id
+Specify the LUN-associated string to use in the
+.Tn SCSI
+INQUIRY VPD page 0x83 data.
+.It Fl l Ar lun_id
+Request that a particular LUN number be assigned.
+If the requested LUN number is not available, the request will fail.
+.It Fl o Ar name=value
+Specify a backend-specific name/value pair.
+Multiple
+.Fl o
+arguments may be specified.
+Refer to the backend documentation for arguments that may be used.
+.It Fl s Ar size_bytes
+Specify the size of the LUN in bytes.
+Some backends may allow setting the size (e.g. the ramdisk backend) and for
+others the size may be implicit (e.g. the block backend).
+.It Fl S Ar serial_num
+Specify the serial number to be used in the
+.Tn SCSI
+INQUIRY VPD page 0x80 data.
+.It Fl t Ar device_type
+Specify the numeric SCSI device type to use when creating the LUN.
+For example, the Direct Access type is 0.
+If this flag is not used, the type of LUN created is backend-specific.
+Not all LUN types are supported.
+Currently CTL only supports Direct Access (type 0) and Processor (type 3)
+LUNs.
+The backend requested may or may not support all of the LUN types that CTL
+supports.
+.El
+.It Ic remove
+Remove a LUN.
+The backend must be specified, and the LUN number must also be specified.
+Backend-specific options may also be specified with the
+.Fl o
+flag.
+.Bl -tag -width 14n
+.It Fl b Ar backend
+Specify the backend that owns the LUN to be removed.
+Examples are
+.Dq ramdisk
+and
+.Dq block .
+.It Fl l Ar lun_id
+Specify the LUN number to remove.
+.It Fl o Ar name=value
+Specify a backend-specific name/value pair.
+Multiple
+.Fl o
+arguments may be specified.
+Refer to the backend documentation for arguments that may be used.
+.El
+.It Ic devlist
+Get a list of all configured LUNs.
+This also includes the LUN size and blocksize, serial number and device ID.
+.Bl -tag -width 11n
+.It Fl b Ar backend
+Specify the backend.
+This restricts the LUN list to the named backend.
+Examples are
+.Dq ramdisk
+and
+.Dq block .
+.It Fl v
+Be verbose.
+This will also display any backend-specific LUN attributes in addition to
+the standard per-LUN information.
+.It Fl x
+Dump the raw XML.
+The LUN list information from the kernel comes in XML format, and this
+option allows the display of the raw XML data.
+This option and the
+.Fl v
+and
+.Fl b
+options are mutually exclusive.
+If you specify
+.Fl x ,
+the entire LUN database is displayed in XML format.
+.El
+.It Ic help
+Display
+.Nm
+usage information.
+.El
+.Sh EXAMPLES
+.Dl ctladm tur 0:1
+.Pp
+Send a
+.Tn SCSI
+TEST UNIT READY command to LUN 1.
+.Pp
+.Dl ctladm modesense 0:1 -l
+.Pp
+Display the list of mode pages supported by LUN 1.
+.Pp
+.Dl ctladm modesense 0:0 -m 10 -P 3 -d -c 10
+.Pp
+Display the saved version of the Control mode page (page 10) on LUN 0.
+Disable fetching block descriptors, and use a 10 byte MODE SENSE command
+instead of the default 6 byte command.
+.Pp
+.Bd -literal
+ctladm read 0:2 -l 0 -d 1 -b 512 -f - > foo
+.Ed
+.Pp
+Read the first 512 byte block from LUN 2 and dump it to the file
+.Pa foo .
+.Bd -literal
+ctladm write 0:3 -l 0xff432140 -d 20 -b 512 -f /tmp/bar
+.Ed
+.Pp
+Read 10240 bytes from the file
+.Pa /tmp/bar
+and write it to target 0, LUN 3.
+starting at LBA 0xff432140.
+.Pp
+.Dl ctladm create -b ramdisk -s 10485760000000000
+.Pp
+Create a LUN with the
+.Dq fake
+ramdisk as a backing store.
+The LUN will claim to have a size of approximately 10 terabytes.
+.Pp
+.Dl ctladm create -b block -o file=src/usr.sbin/ctladm/ctladm.8
+.Pp
+Create a LUN using the block backend, and specify the file
+.Pa src/usr.sbin/ctladm/ctladm.8
+as the backing store.
+The size of the LUN will be derived from the size of the file.
+.Pp
+.Dl ctladm create -b block -o file=src/usr.sbin/ctladm/ctladm.8 -S MYSERIAL321 -d MYDEVID123
+.Pp
+Create a LUN using the block backend, specify the file
+.Pa src/usr.sbin/ctladm/ctladm.8
+as the backing store, and specify the
+.Tn SCSI
+VPD page 0x80 and 0x83 serial number (
+.Fl S)
+and device ID (
+.Fl d).
+.Pp
+.Dl ctladm remove -b block -l 12
+.Pp
+Remove LUN 12, which is handled by the block backend, from the system.
+.Pp
+.Dl ctladm devlist
+.Pp
+List configured LUNs in the system, along with their backend and serial
+number.
+This works when the Front End Target Drivers are enabled or disabled.
+.Pp
+.Dl ctladm lunlist
+.Pp
+List all LUNs in the system, along with their inquiry data and device type.
+This only works when the FETDs are enabled, since the commands go through the
+ioctl port.
+.Pp
+.Dl ctladm inject 0:6 -i mediumerr -p read -r 0,512 -c
+.Pp
+Inject a medium error on LUN 6 for every read that covers the first 512
+blocks of the LUN.
+.Pp
+.Bd -literal -offset indent
+ctladm inject 0:6 -i custom -p tur -s 18 "f0 0 02 s12 04 02"
+.Ed
+.Pp
+Inject a custom error on LUN 6 for the next TEST UNIT READY command only.
+This will result in a sense key of NOT READY (0x02), and an ASC/ASCQ of
+0x04,0x02 ("Logical unit not ready, initializing command required").
+.Sh SEE ALSO
+.Xr cam 3 ,
+.Xr cam_cdbparse 3 ,
+.Xr cam 4 ,
+.Xr xpt 4 ,
+.Xr camcontrol 8
+.Sh HISTORY
+The
+.Nm
+utility was originally written during the Winter/Spring of 2003 as an
+interface to CTL.
+.Sh AUTHORS
+.An Ken Merry Aq ken@FreeBSD.org
diff --git a/usr.sbin/ctladm/ctladm.c b/usr.sbin/ctladm/ctladm.c
new file mode 100644
index 0000000..77e7b02
--- /dev/null
+++ b/usr.sbin/ctladm/ctladm.c
@@ -0,0 +1,4005 @@
+/*-
+ * Copyright (c) 2003, 2004 Silicon Graphics International Corp.
+ * Copyright (c) 1997-2007 Kenneth D. Merry
+ * 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,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $Id: //depot/users/kenm/FreeBSD-test2/usr.sbin/ctladm/ctladm.c#4 $
+ */
+/*
+ * CAM Target Layer exercise program.
+ *
+ * Author: Ken Merry <ken@FreeBSD.org>
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/ioctl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/param.h>
+#include <sys/queue.h>
+#include <sys/callout.h>
+#include <sys/sbuf.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <getopt.h>
+#include <string.h>
+#include <errno.h>
+#include <err.h>
+#include <ctype.h>
+#include <bsdxml.h>
+#include <cam/scsi/scsi_all.h>
+#include <cam/scsi/scsi_message.h>
+#include <cam/ctl/ctl.h>
+#include <cam/ctl/ctl_io.h>
+#include <cam/ctl/ctl_frontend_internal.h>
+#include <cam/ctl/ctl_backend.h>
+#include <cam/ctl/ctl_ioctl.h>
+#include <cam/ctl/ctl_backend_block.h>
+#include <cam/ctl/ctl_util.h>
+#include <cam/ctl/ctl_scsi_all.h>
+#include <camlib.h>
+#include "ctladm.h"
+
+#ifdef min
+#undef min
+#endif
+#define min(x,y) (x < y) ? x : y
+
+typedef enum {
+ CTLADM_CMD_TUR,
+ CTLADM_CMD_INQUIRY,
+ CTLADM_CMD_REQ_SENSE,
+ CTLADM_CMD_ARRAYLIST,
+ CTLADM_CMD_REPORT_LUNS,
+ CTLADM_CMD_HELP,
+ CTLADM_CMD_DEVLIST,
+ CTLADM_CMD_ADDDEV,
+ CTLADM_CMD_RM,
+ CTLADM_CMD_CREATE,
+ CTLADM_CMD_READ,
+ CTLADM_CMD_WRITE,
+ CTLADM_CMD_PORT,
+ CTLADM_CMD_READCAPACITY,
+ CTLADM_CMD_MODESENSE,
+ CTLADM_CMD_DUMPOOA,
+ CTLADM_CMD_DUMPSTRUCTS,
+ CTLADM_CMD_START,
+ CTLADM_CMD_STOP,
+ CTLADM_CMD_SYNC_CACHE,
+ CTLADM_CMD_SHUTDOWN,
+ CTLADM_CMD_STARTUP,
+ CTLADM_CMD_LUNLIST,
+ CTLADM_CMD_HARDSTOP,
+ CTLADM_CMD_HARDSTART,
+ CTLADM_CMD_DELAY,
+ CTLADM_CMD_REALSYNC,
+ CTLADM_CMD_SETSYNC,
+ CTLADM_CMD_GETSYNC,
+ CTLADM_CMD_ERR_INJECT,
+ CTLADM_CMD_BBRREAD,
+ CTLADM_CMD_PRES_IN,
+ CTLADM_CMD_PRES_OUT,
+ CTLADM_CMD_INQ_VPD_DEVID,
+ CTLADM_CMD_RTPG
+} ctladm_cmdfunction;
+
+typedef enum {
+ CTLADM_ARG_NONE = 0x0000000,
+ CTLADM_ARG_AUTOSENSE = 0x0000001,
+ CTLADM_ARG_DEVICE = 0x0000002,
+ CTLADM_ARG_ARRAYSIZE = 0x0000004,
+ CTLADM_ARG_BACKEND = 0x0000008,
+ CTLADM_ARG_CDBSIZE = 0x0000010,
+ CTLADM_ARG_DATALEN = 0x0000020,
+ CTLADM_ARG_FILENAME = 0x0000040,
+ CTLADM_ARG_LBA = 0x0000080,
+ CTLADM_ARG_PC = 0x0000100,
+ CTLADM_ARG_PAGE_CODE = 0x0000200,
+ CTLADM_ARG_PAGE_LIST = 0x0000400,
+ CTLADM_ARG_SUBPAGE = 0x0000800,
+ CTLADM_ARG_PAGELIST = 0x0001000,
+ CTLADM_ARG_DBD = 0x0002000,
+ CTLADM_ARG_TARG_LUN = 0x0004000,
+ CTLADM_ARG_BLOCKSIZE = 0x0008000,
+ CTLADM_ARG_IMMED = 0x0010000,
+ CTLADM_ARG_RELADR = 0x0020000,
+ CTLADM_ARG_RETRIES = 0x0040000,
+ CTLADM_ARG_ONOFFLINE = 0x0080000,
+ CTLADM_ARG_ONESHOT = 0x0100000,
+ CTLADM_ARG_TIMEOUT = 0x0200000,
+ CTLADM_ARG_INITIATOR = 0x0400000,
+ CTLADM_ARG_NOCOPY = 0x0800000,
+ CTLADM_ARG_NEED_TL = 0x1000000
+} ctladm_cmdargs;
+
+struct ctladm_opts {
+ const char *optname;
+ uint32_t cmdnum;
+ ctladm_cmdargs argnum;
+ const char *subopt;
+};
+
+typedef enum {
+ CC_OR_NOT_FOUND,
+ CC_OR_AMBIGUOUS,
+ CC_OR_FOUND
+} ctladm_optret;
+
+static const char rw_opts[] = "Nb:c:d:f:l:";
+static const char startstop_opts[] = "io";
+
+struct ctladm_opts option_table[] = {
+ {"adddev", CTLADM_CMD_ADDDEV, CTLADM_ARG_NONE, NULL},
+ {"bbrread", CTLADM_CMD_BBRREAD, CTLADM_ARG_NEED_TL, "d:l:"},
+ {"create", CTLADM_CMD_CREATE, CTLADM_ARG_NONE, "b:B:d:l:o:s:S:t:"},
+ {"delay", CTLADM_CMD_DELAY, CTLADM_ARG_NEED_TL, "T:l:t:"},
+ {"devid", CTLADM_CMD_INQ_VPD_DEVID, CTLADM_ARG_NEED_TL, NULL},
+ {"devlist", CTLADM_CMD_DEVLIST, CTLADM_ARG_NONE, "b:vx"},
+ {"dumpooa", CTLADM_CMD_DUMPOOA, CTLADM_ARG_NONE, NULL},
+ {"dumpstructs", CTLADM_CMD_DUMPSTRUCTS, CTLADM_ARG_NONE, NULL},
+ {"getsync", CTLADM_CMD_GETSYNC, CTLADM_ARG_NEED_TL, NULL},
+ {"hardstart", CTLADM_CMD_HARDSTART, CTLADM_ARG_NONE, NULL},
+ {"hardstop", CTLADM_CMD_HARDSTOP, CTLADM_ARG_NONE, NULL},
+ {"help", CTLADM_CMD_HELP, CTLADM_ARG_NONE, NULL},
+ {"inject", CTLADM_CMD_ERR_INJECT, CTLADM_ARG_NEED_TL, "cd:i:p:r:s:"},
+ {"inquiry", CTLADM_CMD_INQUIRY, CTLADM_ARG_NEED_TL, NULL},
+ {"lunlist", CTLADM_CMD_LUNLIST, CTLADM_ARG_NONE, NULL},
+ {"modesense", CTLADM_CMD_MODESENSE, CTLADM_ARG_NEED_TL, "P:S:dlm:c:"},
+ {"port", CTLADM_CMD_PORT, CTLADM_ARG_NONE, "lo:p:qt:w:W:x"},
+ {"prin", CTLADM_CMD_PRES_IN, CTLADM_ARG_NEED_TL, "a:"},
+ {"prout", CTLADM_CMD_PRES_OUT, CTLADM_ARG_NEED_TL, "a:k:r:s:"},
+ {"read", CTLADM_CMD_READ, CTLADM_ARG_NEED_TL, rw_opts},
+ {"readcapacity", CTLADM_CMD_READCAPACITY, CTLADM_ARG_NEED_TL, "c:"},
+ {"realsync", CTLADM_CMD_REALSYNC, CTLADM_ARG_NONE, NULL},
+ {"remove", CTLADM_CMD_RM, CTLADM_ARG_NONE, "b:l:o:"},
+ {"reportluns", CTLADM_CMD_REPORT_LUNS, CTLADM_ARG_NEED_TL, NULL},
+ {"reqsense", CTLADM_CMD_REQ_SENSE, CTLADM_ARG_NEED_TL, NULL},
+ {"rtpg", CTLADM_CMD_RTPG, CTLADM_ARG_NEED_TL, NULL},
+ {"setsync", CTLADM_CMD_SETSYNC, CTLADM_ARG_NEED_TL, "i:"},
+ {"shutdown", CTLADM_CMD_SHUTDOWN, CTLADM_ARG_NONE, NULL},
+ {"start", CTLADM_CMD_START, CTLADM_ARG_NEED_TL, startstop_opts},
+ {"startup", CTLADM_CMD_STARTUP, CTLADM_ARG_NONE, NULL},
+ {"stop", CTLADM_CMD_STOP, CTLADM_ARG_NEED_TL, startstop_opts},
+ {"synccache", CTLADM_CMD_SYNC_CACHE, CTLADM_ARG_NEED_TL, "b:c:il:r"},
+ {"tur", CTLADM_CMD_TUR, CTLADM_ARG_NEED_TL, NULL},
+ {"write", CTLADM_CMD_WRITE, CTLADM_ARG_NEED_TL, rw_opts},
+ {"-?", CTLADM_CMD_HELP, CTLADM_ARG_NONE, NULL},
+ {"-h", CTLADM_CMD_HELP, CTLADM_ARG_NONE, NULL},
+ {NULL, 0, 0, NULL}
+};
+
+
+ctladm_optret getoption(struct ctladm_opts *table, char *arg, uint32_t *cmdnum,
+ ctladm_cmdargs *argnum, const char **subopt);
+static int cctl_parse_tl(char *str, int *target, int *lun);
+static int cctl_dump_ooa(int fd, int argc, char **argv);
+static int cctl_port_dump(int fd, int quiet, int xml, int32_t fe_num,
+ ctl_port_type port_type);
+static int cctl_port(int fd, int argc, char **argv, char *combinedopt);
+static int cctl_do_io(int fd, int retries, union ctl_io *io, const char *func);
+static int cctl_delay(int fd, int target, int lun, int argc, char **argv,
+ char *combinedopt);
+static int cctl_lunlist(int fd);
+static void cctl_cfi_mt_statusstr(cfi_mt_status status, char *str, int str_len);
+static void cctl_cfi_bbr_statusstr(cfi_bbrread_status, char *str, int str_len);
+static int cctl_hardstopstart(int fd, ctladm_cmdfunction command);
+static int cctl_bbrread(int fd, int target, int lun, int iid, int argc,
+ char **argv, char *combinedopt);
+static int cctl_startup_shutdown(int fd, int target, int lun, int iid,
+ ctladm_cmdfunction command);
+static int cctl_sync_cache(int fd, int target, int lun, int iid, int retries,
+ int argc, char **argv, char *combinedopt);
+static int cctl_start_stop(int fd, int target, int lun, int iid, int retries,
+ int start, int argc, char **argv, char *combinedopt);
+static int cctl_mode_sense(int fd, int target, int lun, int iid, int retries,
+ int argc, char **argv, char *combinedopt);
+static int cctl_read_capacity(int fd, int target, int lun, int iid,
+ int retries, int argc, char **argv,
+ char *combinedopt);
+static int cctl_read_write(int fd, int target, int lun, int iid, int retries,
+ int argc, char **argv, char *combinedopt,
+ ctladm_cmdfunction command);
+static int cctl_get_luns(int fd, int target, int lun, int iid, int retries,
+ struct scsi_report_luns_data **lun_data,
+ uint32_t *num_luns);
+static int cctl_report_luns(int fd, int target, int lun, int iid, int retries);
+static int cctl_tur(int fd, int target, int lun, int iid, int retries);
+static int cctl_get_inquiry(int fd, int target, int lun, int iid, int retries,
+ char *path_str, int path_len,
+ struct scsi_inquiry_data *inq_data);
+static int cctl_inquiry(int fd, int target, int lun, int iid, int retries);
+static int cctl_req_sense(int fd, int target, int lun, int iid, int retries);
+static int cctl_persistent_reserve_in(int fd, int target, int lun,
+ int initiator, int argc, char **argv,
+ char *combinedopt, int retry_count);
+static int cctl_persistent_reserve_out(int fd, int target, int lun,
+ int initiator, int argc, char **argv,
+ char *combinedopt, int retry_count);
+static int cctl_create_lun(int fd, int argc, char **argv, char *combinedopt);
+static int cctl_inquiry_vpd_devid(int fd, int target, int lun, int initiator);
+static int cctl_report_target_port_group(int fd, int target, int lun,
+ int initiator);
+
+ctladm_optret
+getoption(struct ctladm_opts *table, char *arg, uint32_t *cmdnum,
+ ctladm_cmdargs *argnum, const char **subopt)
+{
+ struct ctladm_opts *opts;
+ int num_matches = 0;
+
+ for (opts = table; (opts != NULL) && (opts->optname != NULL);
+ opts++) {
+ if (strncmp(opts->optname, arg, strlen(arg)) == 0) {
+ *cmdnum = opts->cmdnum;
+ *argnum = opts->argnum;
+ *subopt = opts->subopt;
+
+ if (strcmp(opts->optname, arg) == 0)
+ return (CC_OR_FOUND);
+
+ if (++num_matches > 1)
+ return(CC_OR_AMBIGUOUS);
+ }
+ }
+
+ if (num_matches > 0)
+ return(CC_OR_FOUND);
+ else
+ return(CC_OR_NOT_FOUND);
+}
+
+
+static int
+cctl_parse_tl(char *str, int *target, int *lun)
+{
+ char *tmpstr;
+ int retval;
+
+ retval = 0;
+
+ while (isspace(*str) && (*str != '\0'))
+ str++;
+
+ tmpstr = (char *)strtok(str, ":");
+ if ((tmpstr != NULL) && (*tmpstr != '\0')) {
+ *target = strtol(tmpstr, NULL, 0);
+ tmpstr = (char *)strtok(NULL, ":");
+ if ((tmpstr != NULL) && (*tmpstr != '\0')) {
+ *lun = strtol(tmpstr, NULL, 0);
+ } else
+ retval = -1;
+ } else
+ retval = -1;
+
+ return (retval);
+}
+
+static int
+cctl_dump_ooa(int fd, int argc, char **argv)
+{
+ struct ctl_ooa ooa;
+ long double cmd_latency;
+ int num_entries, len;
+ int target = -1, lun = -1;
+ int retval;
+ unsigned int i;
+
+ num_entries = 104;
+
+ if ((argc > 2)
+ && (isdigit(argv[2][0]))) {
+ retval = cctl_parse_tl(argv[2], &target, &lun);
+ if (retval != 0)
+ warnx("invalid target:lun argument %s", argv[2]);
+ }
+retry:
+
+ len = num_entries * sizeof(struct ctl_ooa_entry);
+
+ bzero(&ooa, sizeof(ooa));
+
+ ooa.entries = malloc(len);
+
+ if (ooa.entries == NULL) {
+ warn("%s: error mallocing %d bytes", __func__, len);
+ return (1);
+ }
+
+ if (argc > 2) {
+ ooa.lun_num = lun;
+ } else
+ ooa.flags |= CTL_OOA_FLAG_ALL_LUNS;
+
+ ooa.alloc_len = len;
+ ooa.alloc_num = num_entries;
+ if (ioctl(fd, CTL_GET_OOA, &ooa) == -1) {
+ warn("%s: CTL_GET_OOA ioctl failed", __func__);
+ retval = 1;
+ goto bailout;
+ }
+
+ if (ooa.status == CTL_OOA_NEED_MORE_SPACE) {
+ num_entries = num_entries * 2;
+ free(ooa.entries);
+ ooa.entries = NULL;
+ goto retry;
+ }
+
+ if (ooa.status != CTL_OOA_OK) {
+ warnx("%s: CTL_GET_OOA ioctl returned error %d", __func__,
+ ooa.status);
+ retval = 1;
+ goto bailout;
+ }
+
+ fprintf(stdout, "Dumping OOA queues\n");
+ for (i = 0; i < ooa.fill_num; i++) {
+ struct ctl_ooa_entry *entry;
+ char cdb_str[(SCSI_MAX_CDBLEN * 3) +1];
+ struct bintime delta_bt;
+ struct timespec ts;
+
+ entry = &ooa.entries[i];
+
+ delta_bt = ooa.cur_bt;
+ bintime_sub(&delta_bt, &entry->start_bt);
+ bintime2timespec(&delta_bt, &ts);
+ cmd_latency = ts.tv_sec * 1000;
+ if (ts.tv_nsec > 0)
+ cmd_latency += ts.tv_nsec / 1000000;
+
+ fprintf(stdout, "LUN %jd tag 0x%04x%s%s%s%s%s: %s. CDB: %s "
+ "(%0.0Lf ms)\n",
+ (intmax_t)entry->lun_num, entry->tag_num,
+ (entry->cmd_flags & CTL_OOACMD_FLAG_BLOCKED) ?
+ " BLOCKED" : "",
+ (entry->cmd_flags & CTL_OOACMD_FLAG_DMA) ? " DMA" : "",
+ (entry->cmd_flags & CTL_OOACMD_FLAG_DMA_QUEUED) ?
+ " DMAQUEUED" : "",
+ (entry->cmd_flags & CTL_OOACMD_FLAG_ABORT) ?
+ " ABORT" : "",
+ (entry->cmd_flags & CTL_OOACMD_FLAG_RTR) ? " RTR" :"",
+ scsi_op_desc(entry->cdb[0], NULL),
+ scsi_cdb_string(entry->cdb, cdb_str, sizeof(cdb_str)),
+ cmd_latency);
+ }
+ fprintf(stdout, "OOA queues dump done\n");
+#if 0
+ if (ioctl(fd, CTL_DUMP_OOA) == -1) {
+ warn("%s: CTL_DUMP_OOA ioctl failed", __func__);
+ return (1);
+ }
+#endif
+
+bailout:
+ free(ooa.entries);
+
+ return (0);
+}
+
+static int
+cctl_dump_structs(int fd, ctladm_cmdargs cmdargs __unused)
+{
+ if (ioctl(fd, CTL_DUMP_STRUCTS) == -1) {
+ warn(__func__);
+ return (1);
+ }
+ return (0);
+}
+
+static int
+cctl_port_dump(int fd, int quiet, int xml, int32_t targ_port,
+ ctl_port_type port_type)
+{
+ struct ctl_port_list port_list;
+ struct ctl_port_entry *entries;
+ struct sbuf *sb = NULL;
+ int num_entries;
+ int did_print = 0;
+ unsigned int i;
+
+ num_entries = 16;
+
+retry:
+
+ entries = malloc(sizeof(*entries) * num_entries);
+ bzero(&port_list, sizeof(port_list));
+ port_list.entries = entries;
+ port_list.alloc_num = num_entries;
+ port_list.alloc_len = num_entries * sizeof(*entries);
+ if (ioctl(fd, CTL_GET_PORT_LIST, &port_list) != 0) {
+ warn("%s: CTL_GET_PORT_LIST ioctl failed", __func__);
+ return (1);
+ }
+ if (port_list.status == CTL_PORT_LIST_NEED_MORE_SPACE) {
+ printf("%s: allocated %d, need %d, retrying\n", __func__,
+ num_entries, port_list.fill_num + port_list.dropped_num);
+ free(entries);
+ num_entries = port_list.fill_num + port_list.dropped_num;
+ goto retry;
+ }
+
+ if ((quiet == 0)
+ && (xml == 0))
+ printf("Port Online Type Name pp vp %-18s %-18s\n",
+ "WWNN", "WWPN");
+
+ if (xml != 0) {
+ sb = sbuf_new_auto();
+ sbuf_printf(sb, "<ctlfelist>\n");
+ }
+ for (i = 0; i < port_list.fill_num; i++) {
+ struct ctl_port_entry *entry;
+ const char *type;
+
+ entry = &entries[i];
+
+ switch (entry->port_type) {
+ case CTL_PORT_FC:
+ type = "FC";
+ break;
+ case CTL_PORT_SCSI:
+ type = "SCSI";
+ break;
+ case CTL_PORT_IOCTL:
+ type = "IOCTL";
+ break;
+ case CTL_PORT_INTERNAL:
+ type = "INTERNAL";
+ break;
+ case CTL_PORT_ISC:
+ type = "ISC";
+ break;
+ default:
+ type = "UNKNOWN";
+ break;
+ }
+
+ /*
+ * If the user specified a frontend number or a particular
+ * frontend type, only print out that particular frontend
+ * or frontend type.
+ */
+ if ((targ_port != -1)
+ && (targ_port != entry->targ_port))
+ continue;
+ else if ((port_type != CTL_PORT_NONE)
+ && ((port_type & entry->port_type) == 0))
+ continue;
+
+ did_print = 1;
+
+#if 0
+ printf("Num: %ju Type: %s (%#x) Name: %s Physical Port: %d "
+ "Virtual Port: %d\n", (uintmax_t)entry->fe_num, type,
+ entry->port_type, entry->fe_name, entry->physical_port,
+ entry->virtual_port);
+ printf("WWNN %#jx WWPN %#jx Online: %s\n",
+ (uintmax_t)entry->wwnn, (uintmax_t)entry->wwpn,
+ (entry->online) ? "YES" : "NO" );
+#endif
+ if (xml == 0) {
+ printf("%-4d %-6s %-8s %-12s %-2d %-2d %#-18jx "
+ "%#-18jx\n",
+ entry->targ_port, (entry->online) ? "YES" : "NO",
+ type, entry->port_name, entry->physical_port,
+ entry->virtual_port, (uintmax_t)entry->wwnn,
+ (uintmax_t)entry->wwpn);
+ } else {
+ sbuf_printf(sb, "<targ_port id=\"%d\">\n",
+ entry->targ_port);
+ sbuf_printf(sb, "<online>%s</online>\n",
+ (entry->online) ? "YES" : "NO");
+ sbuf_printf(sb, "<port_type>%s</port_type>\n", type);
+ sbuf_printf(sb, "<port_name>%s</port_name>\n",
+ entry->port_name);
+ sbuf_printf(sb, "<physical_port>%d</physical_port>\n",
+ entry->physical_port);
+ sbuf_printf(sb, "<virtual_port>%d</virtual_port>\n",
+ entry->virtual_port);
+ sbuf_printf(sb, "<wwnn>%#jx</wwnn>\n",
+ (uintmax_t)entry->wwnn);
+ sbuf_printf(sb, "<wwpn>%#jx</wwpn>\n",
+ (uintmax_t)entry->wwpn);
+ sbuf_printf(sb, "</targ_port>\n");
+ }
+
+ }
+ if (xml != 0) {
+ sbuf_printf(sb, "</ctlfelist>\n");
+ sbuf_finish(sb);
+ printf("%s", sbuf_data(sb));
+ sbuf_delete(sb);
+ }
+
+ /*
+ * Give some indication that we didn't find the frontend or
+ * frontend type requested by the user. We could print something
+ * out, but it would probably be better to hide that behind a
+ * verbose flag.
+ */
+ if ((did_print == 0)
+ && ((targ_port != -1)
+ || (port_type != CTL_PORT_NONE)))
+ return (1);
+ else
+ return (0);
+}
+
+typedef enum {
+ CCTL_PORT_MODE_NONE,
+ CCTL_PORT_MODE_LIST,
+ CCTL_PORT_MODE_SET,
+ CCTL_PORT_MODE_ON,
+ CCTL_PORT_MODE_OFF
+} cctl_port_mode;
+
+struct ctladm_opts cctl_fe_table[] = {
+ {"fc", CTL_PORT_FC, CTLADM_ARG_NONE, NULL},
+ {"scsi", CTL_PORT_SCSI, CTLADM_ARG_NONE, NULL},
+ {"internal", CTL_PORT_INTERNAL, CTLADM_ARG_NONE, NULL},
+ {"all", CTL_PORT_ALL, CTLADM_ARG_NONE, NULL},
+ {NULL, 0, 0, NULL}
+};
+
+static int
+cctl_port(int fd, int argc, char **argv, char *combinedopt)
+{
+ int c;
+ int32_t targ_port = -1;
+ int retval = 0;
+ int wwnn_set = 0, wwpn_set = 0;
+ uint64_t wwnn = 0, wwpn = 0;
+ cctl_port_mode port_mode = CCTL_PORT_MODE_NONE;
+ struct ctl_port_entry entry;
+ ctl_port_type port_type = CTL_PORT_NONE;
+ int quiet = 0, xml = 0;
+
+ while ((c = getopt(argc, argv, combinedopt)) != -1) {
+ switch (c) {
+ case 'l':
+ if (port_mode != CCTL_PORT_MODE_NONE)
+ goto bailout_badarg;
+
+ port_mode = CCTL_PORT_MODE_LIST;
+ break;
+ case 'o':
+ if (port_mode != CCTL_PORT_MODE_NONE)
+ goto bailout_badarg;
+
+ if (strcasecmp(optarg, "on") == 0)
+ port_mode = CCTL_PORT_MODE_ON;
+ else if (strcasecmp(optarg, "off") == 0)
+ port_mode = CCTL_PORT_MODE_OFF;
+ else {
+ warnx("Invalid -o argument %s, \"on\" or "
+ "\"off\" are the only valid args",
+ optarg);
+ retval = 1;
+ goto bailout;
+ }
+ break;
+ case 'p':
+ targ_port = strtol(optarg, NULL, 0);
+ break;
+ case 'q':
+ quiet = 1;
+ break;
+ case 't': {
+ ctladm_optret optret;
+ ctladm_cmdargs argnum;
+ const char *subopt;
+ ctl_port_type tmp_port_type;
+
+ optret = getoption(cctl_fe_table, optarg, &tmp_port_type,
+ &argnum, &subopt);
+ if (optret == CC_OR_AMBIGUOUS) {
+ warnx("%s: ambiguous frontend type %s",
+ __func__, optarg);
+ retval = 1;
+ goto bailout;
+ } else if (optret == CC_OR_NOT_FOUND) {
+ warnx("%s: invalid frontend type %s",
+ __func__, optarg);
+ retval = 1;
+ goto bailout;
+ }
+
+ port_type |= tmp_port_type;
+ break;
+ }
+ case 'w':
+ if ((port_mode != CCTL_PORT_MODE_NONE)
+ && (port_mode != CCTL_PORT_MODE_SET))
+ goto bailout_badarg;
+
+ port_mode = CCTL_PORT_MODE_SET;
+
+ wwnn = strtoull(optarg, NULL, 0);
+ wwnn_set = 1;
+ break;
+ case 'W':
+ if ((port_mode != CCTL_PORT_MODE_NONE)
+ && (port_mode != CCTL_PORT_MODE_SET))
+ goto bailout_badarg;
+
+ port_mode = CCTL_PORT_MODE_SET;
+
+ wwpn = strtoull(optarg, NULL, 0);
+ wwpn_set = 1;
+ break;
+ case 'x':
+ xml = 1;
+ break;
+ }
+ }
+
+ /*
+ * The user can specify either one or more frontend types (-t), or
+ * a specific frontend, but not both.
+ *
+ * If the user didn't specify a frontend type or number, set it to
+ * all. This is primarily needed for the enable/disable ioctls.
+ * This will be a no-op for the listing code. For the set ioctl,
+ * we'll throw an error, since that only works on one port at a time.
+ */
+ if ((port_type != CTL_PORT_NONE) && (targ_port != -1)) {
+ warnx("%s: can only specify one of -t or -n", __func__);
+ retval = 1;
+ goto bailout;
+ } else if ((targ_port == -1) && (port_type == CTL_PORT_NONE))
+ port_type = CTL_PORT_ALL;
+
+ bzero(&entry, sizeof(&entry));
+
+ /*
+ * These are needed for all but list/dump mode.
+ */
+ entry.port_type = port_type;
+ entry.targ_port = targ_port;
+
+ switch (port_mode) {
+ case CCTL_PORT_MODE_LIST:
+ cctl_port_dump(fd, quiet, xml, targ_port, port_type);
+ break;
+ case CCTL_PORT_MODE_SET:
+ if (targ_port == -1) {
+ warnx("%s: -w and -W require -n", __func__);
+ retval = 1;
+ goto bailout;
+ }
+
+ if (wwnn_set) {
+ entry.flags |= CTL_PORT_WWNN_VALID;
+ entry.wwnn = wwnn;
+ }
+ if (wwpn_set) {
+ entry.flags |= CTL_PORT_WWPN_VALID;
+ entry.wwpn = wwpn;
+ }
+
+ if (ioctl(fd, CTL_SET_PORT_WWNS, &entry) == -1) {
+ warn("%s: CTL_SET_PORT_WWNS ioctl failed", __func__);
+ retval = 1;
+ goto bailout;
+ }
+ break;
+ case CCTL_PORT_MODE_ON:
+ if (ioctl(fd, CTL_ENABLE_PORT, &entry) == -1) {
+ warn("%s: CTL_ENABLE_PORT ioctl failed", __func__);
+ retval = 1;
+ goto bailout;
+ }
+ fprintf(stdout, "Front End Ports enabled\n");
+ break;
+ case CCTL_PORT_MODE_OFF:
+ if (ioctl(fd, CTL_DISABLE_PORT, &entry) == -1) {
+ warn("%s: CTL_DISABLE_PORT ioctl failed", __func__);
+ retval = 1;
+ goto bailout;
+ }
+ fprintf(stdout, "Front End Ports disabled\n");
+ break;
+ default:
+ warnx("%s: one of -l, -o or -w/-W must be specified", __func__);
+ retval = 1;
+ goto bailout;
+ break;
+ }
+
+bailout:
+
+ return (retval);
+
+bailout_badarg:
+ warnx("%s: only one of -l, -o or -w/-W may be specified", __func__);
+ return (1);
+}
+
+static int
+cctl_do_io(int fd, int retries, union ctl_io *io, const char *func)
+{
+ do {
+ if (ioctl(fd, CTL_IO, io) == -1) {
+ warn("%s: error sending CTL_IO ioctl", func);
+ return (-1);
+ }
+ } while (((io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS)
+ && (retries-- > 0));
+
+ return (0);
+}
+
+static int
+cctl_delay(int fd, int target, int lun, int argc, char **argv,
+ char *combinedopt)
+{
+ int datamove_delay;
+ struct ctl_io_delay_info delay_info;
+ char *delayloc = NULL;
+ char *delaytype = NULL;
+ int delaytime = -1;
+ int retval;
+ int c;
+
+ retval = 0;
+ datamove_delay = 0;
+
+ memset(&delay_info, 0, sizeof(delay_info));
+
+ while ((c = getopt(argc, argv, combinedopt)) != -1) {
+ switch (c) {
+ case 'T':
+ delaytype = strdup(optarg);
+ break;
+ case 'l':
+ delayloc = strdup(optarg);
+ break;
+ case 't':
+ delaytime = strtoul(optarg, NULL, 0);
+ break;
+ }
+ }
+
+ if (delaytime == -1) {
+ warnx("%s: you must specify the delaytime with -t", __func__);
+ retval = 1;
+ goto bailout;
+ }
+
+ if (strcasecmp(delayloc, "datamove") == 0)
+ delay_info.delay_loc = CTL_DELAY_LOC_DATAMOVE;
+ else if (strcasecmp(delayloc, "done") == 0)
+ delay_info.delay_loc = CTL_DELAY_LOC_DONE;
+ else {
+ warnx("%s: invalid delay location %s", __func__, delayloc);
+ retval = 1;
+ goto bailout;
+ }
+
+ if ((delaytype == NULL)
+ || (strcmp(delaytype, "oneshot") == 0))
+ delay_info.delay_type = CTL_DELAY_TYPE_ONESHOT;
+ else if (strcmp(delaytype, "cont") == 0)
+ delay_info.delay_type = CTL_DELAY_TYPE_CONT;
+ else {
+ warnx("%s: invalid delay type %s", __func__, delaytype);
+ retval = 1;
+ goto bailout;
+ }
+
+ delay_info.target_id = target;
+ delay_info.lun_id = lun;
+ delay_info.delay_secs = delaytime;
+
+ if (ioctl(fd, CTL_DELAY_IO, &delay_info) == -1) {
+ warn("%s: CTL_DELAY_IO ioctl failed", __func__);
+ retval = 1;
+ goto bailout;
+ }
+ switch (delay_info.status) {
+ case CTL_DELAY_STATUS_NONE:
+ warnx("%s: no delay status??", __func__);
+ retval = 1;
+ break;
+ case CTL_DELAY_STATUS_OK:
+ break;
+ case CTL_DELAY_STATUS_INVALID_LUN:
+ warnx("%s: invalid lun %d", __func__, lun);
+ retval = 1;
+ break;
+ case CTL_DELAY_STATUS_INVALID_TYPE:
+ warnx("%s: invalid delay type %d", __func__,
+ delay_info.delay_type);
+ retval = 1;
+ break;
+ case CTL_DELAY_STATUS_INVALID_LOC:
+ warnx("%s: delay location %s not implemented?", __func__,
+ delayloc);
+ retval = 1;
+ break;
+ case CTL_DELAY_STATUS_NOT_IMPLEMENTED:
+ warnx("%s: delay not implemented in the kernel", __func__);
+ warnx("%s: recompile with the CTL_IO_DELAY flag set", __func__);
+ retval = 1;
+ break;
+ default:
+ warnx("%s: unknown delay return status %d", __func__,
+ delay_info.status);
+ retval = 1;
+ break;
+ }
+bailout:
+
+ /* delayloc should never be NULL, but just in case...*/
+ if (delayloc != NULL)
+ free(delayloc);
+
+ return (retval);
+}
+
+static int
+cctl_realsync(int fd, int argc, char **argv)
+{
+ int syncstate;
+ int retval;
+ char *syncarg;
+
+ retval = 0;
+
+ if (argc != 3) {
+ warnx("%s %s takes exactly one argument", argv[0], argv[1]);
+ retval = 1;
+ goto bailout;
+ }
+
+ syncarg = argv[2];
+
+ if (strncasecmp(syncarg, "query", min(strlen(syncarg),
+ strlen("query"))) == 0) {
+ if (ioctl(fd, CTL_REALSYNC_GET, &syncstate) == -1) {
+ warn("%s: CTL_REALSYNC_GET ioctl failed", __func__);
+ retval = 1;
+ goto bailout;
+ }
+ fprintf(stdout, "SYNCHRONIZE CACHE support is: ");
+ switch (syncstate) {
+ case 0:
+ fprintf(stdout, "OFF\n");
+ break;
+ case 1:
+ fprintf(stdout, "ON\n");
+ break;
+ default:
+ fprintf(stdout, "unknown (%d)\n", syncstate);
+ break;
+ }
+ goto bailout;
+ } else if (strcasecmp(syncarg, "on") == 0) {
+ syncstate = 1;
+ } else if (strcasecmp(syncarg, "off") == 0) {
+ syncstate = 0;
+ } else {
+ warnx("%s: invalid realsync argument %s", __func__, syncarg);
+ retval = 1;
+ goto bailout;
+ }
+
+ if (ioctl(fd, CTL_REALSYNC_SET, &syncstate) == -1) {
+ warn("%s: CTL_REALSYNC_SET ioctl failed", __func__);
+ retval = 1;
+ goto bailout;
+ }
+bailout:
+ return (retval);
+}
+
+static int
+cctl_getsetsync(int fd, int target, int lun, ctladm_cmdfunction command,
+ int argc, char **argv, char *combinedopt)
+{
+ struct ctl_sync_info sync_info;
+ uint32_t ioctl_cmd;
+ int sync_interval = -1;
+ int retval;
+ int c;
+
+ retval = 0;
+
+ memset(&sync_info, 0, sizeof(sync_info));
+ sync_info.target_id = target;
+ sync_info.lun_id = lun;
+
+ while ((c = getopt(argc, argv, combinedopt)) != -1) {
+ switch (c) {
+ case 'i':
+ sync_interval = strtoul(optarg, NULL, 0);
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (command == CTLADM_CMD_SETSYNC) {
+ if (sync_interval == -1) {
+ warnx("%s: you must specify the sync interval with -i",
+ __func__);
+ retval = 1;
+ goto bailout;
+ }
+ sync_info.sync_interval = sync_interval;
+ ioctl_cmd = CTL_SETSYNC;
+ } else {
+ ioctl_cmd = CTL_GETSYNC;
+ }
+
+ if (ioctl(fd, ioctl_cmd, &sync_info) == -1) {
+ warn("%s: CTL_%sSYNC ioctl failed", __func__,
+ (command == CTLADM_CMD_SETSYNC) ? "SET" : "GET");
+ retval = 1;
+ goto bailout;
+ }
+
+ switch (sync_info.status) {
+ case CTL_GS_SYNC_OK:
+ if (command == CTLADM_CMD_GETSYNC) {
+ fprintf(stdout, "%d:%d: sync interval: %d\n",
+ target, lun, sync_info.sync_interval);
+ }
+ break;
+ case CTL_GS_SYNC_NO_LUN:
+ warnx("%s: unknown target:LUN %d:%d", __func__, target, lun);
+ retval = 1;
+ break;
+ case CTL_GS_SYNC_NONE:
+ default:
+ warnx("%s: unknown CTL_%sSYNC status %d", __func__,
+ (command == CTLADM_CMD_SETSYNC) ? "SET" : "GET",
+ sync_info.status);
+ retval = 1;
+ break;
+ }
+bailout:
+ return (retval);
+}
+
+struct ctladm_opts cctl_err_types[] = {
+ {"aborted", CTL_LUN_INJ_ABORTED, CTLADM_ARG_NONE, NULL},
+ {"mediumerr", CTL_LUN_INJ_MEDIUM_ERR, CTLADM_ARG_NONE, NULL},
+ {"ua", CTL_LUN_INJ_UA, CTLADM_ARG_NONE, NULL},
+ {"custom", CTL_LUN_INJ_CUSTOM, CTLADM_ARG_NONE, NULL},
+ {NULL, 0, 0, NULL}
+
+};
+
+struct ctladm_opts cctl_err_patterns[] = {
+ {"read", CTL_LUN_PAT_READ, CTLADM_ARG_NONE, NULL},
+ {"write", CTL_LUN_PAT_WRITE, CTLADM_ARG_NONE, NULL},
+ {"rw", CTL_LUN_PAT_READWRITE, CTLADM_ARG_NONE, NULL},
+ {"readwrite", CTL_LUN_PAT_READWRITE, CTLADM_ARG_NONE, NULL},
+ {"readcap", CTL_LUN_PAT_READCAP, CTLADM_ARG_NONE, NULL},
+ {"tur", CTL_LUN_PAT_TUR, CTLADM_ARG_NONE, NULL},
+ {"any", CTL_LUN_PAT_ANY, CTLADM_ARG_NONE, NULL},
+#if 0
+ {"cmd", CTL_LUN_PAT_CMD, CTLADM_ARG_NONE, NULL},
+#endif
+ {NULL, 0, 0, NULL}
+};
+
+static int
+cctl_error_inject(int fd, uint32_t target, uint32_t lun, int argc, char **argv,
+ char *combinedopt)
+{
+ int retval;
+ struct ctl_error_desc err_desc;
+ uint64_t lba = 0;
+ uint32_t len = 0;
+ uint64_t delete_id = 0;
+ int delete_id_set = 0;
+ int continuous = 0;
+ int sense_len = 0;
+ int fd_sense = 0;
+ int c;
+
+ bzero(&err_desc, sizeof(err_desc));
+ err_desc.target_id = target;
+ err_desc.lun_id = lun;
+
+ while ((c = getopt(argc, argv, combinedopt)) != -1) {
+ switch (c) {
+ case 'c':
+ continuous = 1;
+ break;
+ case 'd':
+ delete_id = strtoull(optarg, NULL, 0);
+ delete_id_set = 1;
+ break;
+ case 'i':
+ case 'p': {
+ ctladm_optret optret;
+ ctladm_cmdargs argnum;
+ const char *subopt;
+
+ if (c == 'i') {
+ ctl_lun_error err_type;
+
+ if (err_desc.lun_error != CTL_LUN_INJ_NONE) {
+ warnx("%s: can't specify multiple -i "
+ "arguments", __func__);
+ retval = 1;
+ goto bailout;
+ }
+ optret = getoption(cctl_err_types, optarg,
+ &err_type, &argnum, &subopt);
+ err_desc.lun_error = err_type;
+ } else {
+ ctl_lun_error_pattern pattern;
+
+ optret = getoption(cctl_err_patterns, optarg,
+ &pattern, &argnum, &subopt);
+ err_desc.error_pattern |= pattern;
+ }
+
+ if (optret == CC_OR_AMBIGUOUS) {
+ warnx("%s: ambiguous argument %s", __func__,
+ optarg);
+ retval = 1;
+ goto bailout;
+ } else if (optret == CC_OR_NOT_FOUND) {
+ warnx("%s: argument %s not found", __func__,
+ optarg);
+ retval = 1;
+ goto bailout;
+ }
+ break;
+ }
+ case 'r': {
+ char *tmpstr, *tmpstr2;
+
+ tmpstr = strdup(optarg);
+ if (tmpstr == NULL) {
+ warn("%s: error duplicating string %s",
+ __func__, optarg);
+ retval = 1;
+ goto bailout;
+ }
+
+ tmpstr2 = strsep(&tmpstr, ",");
+ if (tmpstr2 == NULL) {
+ warnx("%s: invalid -r argument %s", __func__,
+ optarg);
+ retval = 1;
+ free(tmpstr);
+ goto bailout;
+ }
+ lba = strtoull(tmpstr2, NULL, 0);
+ tmpstr2 = strsep(&tmpstr, ",");
+ if (tmpstr2 == NULL) {
+ warnx("%s: no len argument for -r lba,len, got"
+ " %s", __func__, optarg);
+ retval = 1;
+ free(tmpstr);
+ goto bailout;
+ }
+ len = strtoul(tmpstr2, NULL, 0);
+ free(tmpstr);
+ break;
+ }
+ case 's': {
+ struct get_hook hook;
+ char *sensestr;
+
+ sense_len = strtol(optarg, NULL, 0);
+ if (sense_len <= 0) {
+ warnx("invalid number of sense bytes %d",
+ sense_len);
+ retval = 1;
+ goto bailout;
+ }
+
+ sense_len = MIN(sense_len, SSD_FULL_SIZE);
+
+ hook.argc = argc - optind;
+ hook.argv = argv + optind;
+ hook.got = 0;
+
+ sensestr = cget(&hook, NULL);
+ if ((sensestr != NULL)
+ && (sensestr[0] == '-')) {
+ fd_sense = 1;
+ } else {
+ buff_encode_visit(
+ (uint8_t *)&err_desc.custom_sense,
+ sense_len, sensestr, iget, &hook);
+ }
+ optind += hook.got;
+ break;
+ }
+ default:
+ break;
+ }
+ }
+
+ if (delete_id_set != 0) {
+ err_desc.serial = delete_id;
+ if (ioctl(fd, CTL_ERROR_INJECT_DELETE, &err_desc) == -1) {
+ warn("%s: error issuing CTL_ERROR_INJECT_DELETE ioctl",
+ __func__);
+ retval = 1;
+ }
+ goto bailout;
+ }
+
+ if (err_desc.lun_error == CTL_LUN_INJ_NONE) {
+ warnx("%s: error injection command (-i) needed",
+ __func__);
+ retval = 1;
+ goto bailout;
+ } else if ((err_desc.lun_error == CTL_LUN_INJ_CUSTOM)
+ && (sense_len == 0)) {
+ warnx("%s: custom error requires -s", __func__);
+ retval = 1;
+ goto bailout;
+ }
+
+ if (continuous != 0)
+ err_desc.lun_error |= CTL_LUN_INJ_CONTINUOUS;
+
+ /*
+ * If fd_sense is set, we need to read the sense data the user
+ * wants returned from stdin.
+ */
+ if (fd_sense == 1) {
+ ssize_t amt_read;
+ int amt_to_read = sense_len;
+ u_int8_t *buf_ptr = (uint8_t *)&err_desc.custom_sense;
+
+ for (amt_read = 0; amt_to_read > 0;
+ amt_read = read(STDIN_FILENO, buf_ptr, amt_to_read)) {
+ if (amt_read == -1) {
+ warn("error reading sense data from stdin");
+ retval = 1;
+ goto bailout;
+ }
+ amt_to_read -= amt_read;
+ buf_ptr += amt_read;
+ }
+ }
+
+ if (err_desc.error_pattern == CTL_LUN_PAT_NONE) {
+ warnx("%s: command pattern (-p) needed", __func__);
+ retval = 1;
+ goto bailout;
+ }
+
+ if (len != 0) {
+ err_desc.error_pattern |= CTL_LUN_PAT_RANGE;
+ /*
+ * We could check here to see whether it's a read/write
+ * command, but that will be pointless once we allow
+ * custom patterns. At that point, the user could specify
+ * a READ(6) CDB type, and we wouldn't have an easy way here
+ * to verify whether range checking is possible there. The
+ * user will just figure it out when his error never gets
+ * executed.
+ */
+#if 0
+ if ((err_desc.pattern & CTL_LUN_PAT_READWRITE) == 0) {
+ warnx("%s: need read and/or write pattern if range "
+ "is specified", __func__);
+ retval = 1;
+ goto bailout;
+ }
+#endif
+ err_desc.lba_range.lba = lba;
+ err_desc.lba_range.len = len;
+ }
+
+ if (ioctl(fd, CTL_ERROR_INJECT, &err_desc) == -1) {
+ warn("%s: error issuing CTL_ERROR_INJECT ioctl", __func__);
+ retval = 1;
+ } else {
+ printf("Error injection succeeded, serial number is %ju\n",
+ (uintmax_t)err_desc.serial);
+ }
+bailout:
+
+ return (retval);
+}
+
+static int
+cctl_lunlist(int fd)
+{
+ struct scsi_report_luns_data *lun_data;
+ struct scsi_inquiry_data *inq_data;
+ uint32_t num_luns;
+ int target;
+ int initid;
+ unsigned int i;
+ int retval;
+
+ retval = 0;
+ inq_data = NULL;
+
+ target = 6;
+ initid = 7;
+
+ /*
+ * XXX KDM assuming LUN 0 is fine, but we may need to change this
+ * if we ever acquire the ability to have multiple targets.
+ */
+ if ((retval = cctl_get_luns(fd, target, /*lun*/ 0, initid,
+ /*retries*/ 2, &lun_data, &num_luns)) != 0)
+ goto bailout;
+
+ inq_data = malloc(sizeof(*inq_data));
+ if (inq_data == NULL) {
+ warn("%s: couldn't allocate memory for inquiry data\n",
+ __func__);
+ retval = 1;
+ goto bailout;
+ }
+ for (i = 0; i < num_luns; i++) {
+ char scsi_path[40];
+ int lun_val;
+
+ switch (lun_data->luns[i].lundata[0] & RPL_LUNDATA_ATYP_MASK) {
+ case RPL_LUNDATA_ATYP_PERIPH:
+ lun_val = lun_data->luns[i].lundata[1];
+ break;
+ case RPL_LUNDATA_ATYP_FLAT:
+ lun_val = (lun_data->luns[i].lundata[0] &
+ RPL_LUNDATA_FLAT_LUN_MASK) |
+ (lun_data->luns[i].lundata[1] <<
+ RPL_LUNDATA_FLAT_LUN_BITS);
+ break;
+ case RPL_LUNDATA_ATYP_LUN:
+ case RPL_LUNDATA_ATYP_EXTLUN:
+ default:
+ fprintf(stdout, "Unsupported LUN format %d\n",
+ lun_data->luns[i].lundata[0] &
+ RPL_LUNDATA_ATYP_MASK);
+ lun_val = -1;
+ break;
+ }
+ if (lun_val == -1)
+ continue;
+
+ if ((retval = cctl_get_inquiry(fd, target, lun_val, initid,
+ /*retries*/ 2, scsi_path,
+ sizeof(scsi_path),
+ inq_data)) != 0) {
+ goto bailout;
+ }
+ printf("%s", scsi_path);
+ scsi_print_inquiry(inq_data);
+ }
+bailout:
+
+ if (lun_data != NULL)
+ free(lun_data);
+
+ if (inq_data != NULL)
+ free(inq_data);
+
+ return (retval);
+}
+
+static void
+cctl_cfi_mt_statusstr(cfi_mt_status status, char *str, int str_len)
+{
+ switch (status) {
+ case CFI_MT_PORT_OFFLINE:
+ snprintf(str, str_len, "Port Offline");
+ break;
+ case CFI_MT_ERROR:
+ snprintf(str, str_len, "Error");
+ break;
+ case CFI_MT_SUCCESS:
+ snprintf(str, str_len, "Success");
+ break;
+ case CFI_MT_NONE:
+ snprintf(str, str_len, "None??");
+ break;
+ default:
+ snprintf(str, str_len, "Unknown status: %d", status);
+ break;
+ }
+}
+
+static void
+cctl_cfi_bbr_statusstr(cfi_bbrread_status status, char *str, int str_len)
+{
+ switch (status) {
+ case CFI_BBR_SUCCESS:
+ snprintf(str, str_len, "Success");
+ break;
+ case CFI_BBR_LUN_UNCONFIG:
+ snprintf(str, str_len, "LUN not configured");
+ break;
+ case CFI_BBR_NO_LUN:
+ snprintf(str, str_len, "LUN does not exist");
+ break;
+ case CFI_BBR_NO_MEM:
+ snprintf(str, str_len, "Memory allocation error");
+ break;
+ case CFI_BBR_BAD_LEN:
+ snprintf(str, str_len, "Length is not a multiple of blocksize");
+ break;
+ case CFI_BBR_RESERV_CONFLICT:
+ snprintf(str, str_len, "Reservation conflict");
+ break;
+ case CFI_BBR_LUN_STOPPED:
+ snprintf(str, str_len, "LUN is powered off");
+ break;
+ case CFI_BBR_LUN_OFFLINE_CTL:
+ snprintf(str, str_len, "LUN is offline");
+ break;
+ case CFI_BBR_LUN_OFFLINE_RC:
+ snprintf(str, str_len, "RAIDCore array is offline (double "
+ "failure?)");
+ break;
+ case CFI_BBR_SCSI_ERROR:
+ snprintf(str, str_len, "SCSI Error");
+ break;
+ case CFI_BBR_ERROR:
+ snprintf(str, str_len, "Error");
+ break;
+ default:
+ snprintf(str, str_len, "Unknown status: %d", status);
+ break;
+ }
+}
+
+static int
+cctl_hardstopstart(int fd, ctladm_cmdfunction command)
+{
+ struct ctl_hard_startstop_info hs_info;
+ char error_str[256];
+ int do_start;
+ int retval;
+
+ retval = 0;
+
+ if (command == CTLADM_CMD_HARDSTART)
+ do_start = 1;
+ else
+ do_start = 0;
+
+ if (ioctl(fd, (do_start == 1) ? CTL_HARD_START : CTL_HARD_STOP,
+ &hs_info) == -1) {
+ warn("%s: CTL_HARD_%s ioctl failed", __func__,
+ (do_start == 1) ? "START" : "STOP");
+ retval = 1;
+ goto bailout;
+ }
+
+ fprintf(stdout, "Hard %s Status: ", (command == CTLADM_CMD_HARDSTOP) ?
+ "Stop" : "Start");
+ cctl_cfi_mt_statusstr(hs_info.status, error_str, sizeof(error_str));
+ fprintf(stdout, "%s\n", error_str);
+ fprintf(stdout, "Total LUNs: %d\n", hs_info.total_luns);
+ fprintf(stdout, "LUNs complete: %d\n", hs_info.luns_complete);
+ fprintf(stdout, "LUNs failed: %d\n", hs_info.luns_failed);
+
+bailout:
+ return (retval);
+}
+
+static int
+cctl_bbrread(int fd, int target __unused, int lun, int iid __unused,
+ int argc, char **argv, char *combinedopt)
+{
+ struct ctl_bbrread_info bbr_info;
+ char error_str[256];
+ int datalen = -1;
+ uint64_t lba = 0;
+ int lba_set = 0;
+ int retval;
+ int c;
+
+ retval = 0;
+
+ while ((c = getopt(argc, argv, combinedopt)) != -1) {
+ switch (c) {
+ case 'd':
+ datalen = strtoul(optarg, NULL, 0);
+ break;
+ case 'l':
+ lba = strtoull(optarg, NULL, 0);
+ lba_set = 1;
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (lba_set == 0) {
+ warnx("%s: you must specify an LBA with -l", __func__);
+ retval = 1;
+ goto bailout;
+ }
+
+ if (datalen == -1) {
+ warnx("%s: you must specify a length with -d", __func__);
+ retval = 1;
+ goto bailout;
+ }
+
+ bbr_info.lun_num = lun;
+ bbr_info.lba = lba;
+ /*
+ * XXX KDM get the blocksize first??
+ */
+ if ((datalen % 512) != 0) {
+ warnx("%s: data length %d is not a multiple of 512 bytes",
+ __func__, datalen);
+ retval = 1;
+ goto bailout;
+ }
+ bbr_info.len = datalen;
+
+ if (ioctl(fd, CTL_BBRREAD, &bbr_info) == -1) {
+ warn("%s: CTL_BBRREAD ioctl failed", __func__);
+ retval = 1;
+ goto bailout;
+ }
+ cctl_cfi_mt_statusstr(bbr_info.status, error_str, sizeof(error_str));
+ fprintf(stdout, "BBR Read Overall Status: %s\n", error_str);
+ cctl_cfi_bbr_statusstr(bbr_info.bbr_status, error_str,
+ sizeof(error_str));
+ fprintf(stdout, "BBR Read Status: %s\n", error_str);
+ /*
+ * XXX KDM should we bother printing out SCSI status if we get
+ * CFI_BBR_SCSI_ERROR back?
+ *
+ * Return non-zero if this fails?
+ */
+bailout:
+ return (retval);
+}
+
+static int
+cctl_startup_shutdown(int fd, int target, int lun, int iid,
+ ctladm_cmdfunction command)
+{
+ union ctl_io *io;
+ struct ctl_id id;
+ struct scsi_report_luns_data *lun_data;
+ struct scsi_inquiry_data *inq_data;
+ uint32_t num_luns;
+ unsigned int i;
+ int retval;
+
+ retval = 0;
+ inq_data = NULL;
+
+ /*
+ * - report luns
+ * - step through each lun, do an inquiry
+ * - check OOA queue on direct access luns
+ * - send stop with offline bit to each direct access device with a
+ * clear OOA queue
+ * - if we get a reservation conflict, reset the LUN to clear it
+ * and reissue the stop with the offline bit set
+ */
+
+ id.id = iid;
+
+ io = ctl_scsi_alloc_io(id);
+ if (io == NULL) {
+ warnx("%s: can't allocate memory", __func__);
+ return (1);
+ }
+
+ if ((retval = cctl_get_luns(fd, target, lun, iid, /*retries*/ 2,
+ &lun_data, &num_luns)) != 0)
+ goto bailout;
+
+ inq_data = malloc(sizeof(*inq_data));
+ if (inq_data == NULL) {
+ warn("%s: couldn't allocate memory for inquiry data\n",
+ __func__);
+ retval = 1;
+ goto bailout;
+ }
+ for (i = 0; i < num_luns; i++) {
+ char scsi_path[40];
+ int lun_val;
+
+ /*
+ * XXX KDM figure out a way to share this code with
+ * cctl_lunlist()?
+ */
+ switch (lun_data->luns[i].lundata[0] & RPL_LUNDATA_ATYP_MASK) {
+ case RPL_LUNDATA_ATYP_PERIPH:
+ lun_val = lun_data->luns[i].lundata[1];
+ break;
+ case RPL_LUNDATA_ATYP_FLAT:
+ lun_val = (lun_data->luns[i].lundata[0] &
+ RPL_LUNDATA_FLAT_LUN_MASK) |
+ (lun_data->luns[i].lundata[1] <<
+ RPL_LUNDATA_FLAT_LUN_BITS);
+ break;
+ case RPL_LUNDATA_ATYP_LUN:
+ case RPL_LUNDATA_ATYP_EXTLUN:
+ default:
+ fprintf(stdout, "Unsupported LUN format %d\n",
+ lun_data->luns[i].lundata[0] &
+ RPL_LUNDATA_ATYP_MASK);
+ lun_val = -1;
+ break;
+ }
+ if (lun_val == -1)
+ continue;
+
+ if ((retval = cctl_get_inquiry(fd, target, lun_val, iid,
+ /*retries*/ 2, scsi_path,
+ sizeof(scsi_path),
+ inq_data)) != 0) {
+ goto bailout;
+ }
+ printf("%s", scsi_path);
+ scsi_print_inquiry(inq_data);
+ /*
+ * We only want to shutdown direct access devices.
+ */
+ if (SID_TYPE(inq_data) != T_DIRECT) {
+ printf("%s LUN is not direct access, skipped\n",
+ scsi_path);
+ continue;
+ }
+
+ if (command == CTLADM_CMD_SHUTDOWN) {
+ struct ctl_ooa_info ooa_info;
+
+ ooa_info.target_id = target;
+ ooa_info.lun_id = lun_val;
+
+ if (ioctl(fd, CTL_CHECK_OOA, &ooa_info) == -1) {
+ printf("%s CTL_CHECK_OOA ioctl failed\n",
+ scsi_path);
+ continue;
+ }
+
+ if (ooa_info.status != CTL_OOA_SUCCESS) {
+ printf("%s CTL_CHECK_OOA returned status %d\n",
+ scsi_path, ooa_info.status);
+ continue;
+ }
+ if (ooa_info.num_entries != 0) {
+ printf("%s %d entr%s in the OOA queue, "
+ "skipping shutdown\n", scsi_path,
+ ooa_info.num_entries,
+ (ooa_info.num_entries > 1)?"ies" : "y" );
+ continue;
+ }
+ }
+
+ ctl_scsi_start_stop(/*io*/ io,
+ /*start*/(command == CTLADM_CMD_STARTUP) ?
+ 1 : 0,
+ /*load_eject*/ 0,
+ /*immediate*/ 0,
+ /*power_conditions*/ SSS_PC_START_VALID,
+ /*onoffline*/ 1,
+ /*ctl_tag_type*/
+ (command == CTLADM_CMD_STARTUP) ?
+ CTL_TAG_SIMPLE :CTL_TAG_ORDERED,
+ /*control*/ 0);
+
+ io->io_hdr.nexus.targ_target.id = target;
+ io->io_hdr.nexus.targ_lun = lun_val;
+ io->io_hdr.nexus.initid = id;
+
+ if (cctl_do_io(fd, /*retries*/ 3, io, __func__) != 0) {
+ retval = 1;
+ goto bailout;
+ }
+
+ if ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS)
+ ctl_io_error_print(io, inq_data, stderr);
+ else {
+ printf("%s LUN is now %s\n", scsi_path,
+ (command == CTLADM_CMD_STARTUP) ? "online" :
+ "offline");
+ }
+ }
+bailout:
+ if (lun_data != NULL)
+ free(lun_data);
+
+ if (inq_data != NULL)
+ free(inq_data);
+
+ if (io != NULL)
+ ctl_scsi_free_io(io);
+
+ return (retval);
+}
+
+static int
+cctl_sync_cache(int fd, int target, int lun, int iid, int retries,
+ int argc, char **argv, char *combinedopt)
+{
+ union ctl_io *io;
+ struct ctl_id id;
+ int cdb_size = -1;
+ int retval;
+ uint64_t our_lba = 0;
+ uint32_t our_block_count = 0;
+ int reladr = 0, immed = 0;
+ int c;
+
+ id.id = iid;
+ retval = 0;
+
+ io = ctl_scsi_alloc_io(id);
+ if (io == NULL) {
+ warnx("%s: can't allocate memory", __func__);
+ return (1);
+ }
+
+ while ((c = getopt(argc, argv, combinedopt)) != -1) {
+ switch (c) {
+ case 'b':
+ our_block_count = strtoul(optarg, NULL, 0);
+ break;
+ case 'c':
+ cdb_size = strtol(optarg, NULL, 0);
+ break;
+ case 'i':
+ immed = 1;
+ break;
+ case 'l':
+ our_lba = strtoull(optarg, NULL, 0);
+ break;
+ case 'r':
+ reladr = 1;
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (cdb_size != -1) {
+ switch (cdb_size) {
+ case 10:
+ case 16:
+ break;
+ default:
+ warnx("%s: invalid cdbsize %d, valid sizes are 10 "
+ "and 16", __func__, cdb_size);
+ retval = 1;
+ goto bailout;
+ break; /* NOTREACHED */
+ }
+ } else
+ cdb_size = 10;
+
+ ctl_scsi_sync_cache(/*io*/ io,
+ /*immed*/ immed,
+ /*reladr*/ reladr,
+ /*minimum_cdb_size*/ cdb_size,
+ /*starting_lba*/ our_lba,
+ /*block_count*/ our_block_count,
+ /*tag_type*/ CTL_TAG_SIMPLE,
+ /*control*/ 0);
+
+ io->io_hdr.nexus.targ_target.id = target;
+ io->io_hdr.nexus.targ_lun = lun;
+ io->io_hdr.nexus.initid = id;
+
+ if (cctl_do_io(fd, retries, io, __func__) != 0) {
+ retval = 1;
+ goto bailout;
+ }
+
+ if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS) {
+ fprintf(stdout, "Cache synchronized successfully\n");
+ } else
+ ctl_io_error_print(io, NULL, stderr);
+bailout:
+ ctl_scsi_free_io(io);
+
+ return (retval);
+}
+
+static int
+cctl_start_stop(int fd, int target, int lun, int iid, int retries, int start,
+ int argc, char **argv, char *combinedopt)
+{
+ union ctl_io *io;
+ struct ctl_id id;
+ char scsi_path[40];
+ int immed = 0, onoffline = 0;
+ int retval, c;
+
+ id.id = iid;
+ retval = 0;
+
+ io = ctl_scsi_alloc_io(id);
+ if (io == NULL) {
+ warnx("%s: can't allocate memory", __func__);
+ return (1);
+ }
+
+ while ((c = getopt(argc, argv, combinedopt)) != -1) {
+ switch (c) {
+ case 'i':
+ immed = 1;
+ break;
+ case 'o':
+ onoffline = 1;
+ break;
+ default:
+ break;
+ }
+ }
+ /*
+ * Use an ordered tag for the stop command, to guarantee that any
+ * pending I/O will finish before the stop command executes. This
+ * would normally be the case anyway, since CTL will basically
+ * treat the start/stop command as an ordered command with respect
+ * to any other command except an INQUIRY. (See ctl_ser_table.c.)
+ */
+ ctl_scsi_start_stop(/*io*/ io,
+ /*start*/ start,
+ /*load_eject*/ 0,
+ /*immediate*/ immed,
+ /*power_conditions*/ SSS_PC_START_VALID,
+ /*onoffline*/ onoffline,
+ /*ctl_tag_type*/ start ? CTL_TAG_SIMPLE :
+ CTL_TAG_ORDERED,
+ /*control*/ 0);
+
+ io->io_hdr.nexus.targ_target.id = target;
+ io->io_hdr.nexus.targ_lun = lun;
+ io->io_hdr.nexus.initid = id;
+
+ if (cctl_do_io(fd, retries, io, __func__) != 0) {
+ retval = 1;
+ goto bailout;
+ }
+
+ ctl_scsi_path_string(io, scsi_path, sizeof(scsi_path));
+ if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS) {
+ fprintf(stdout, "%s LUN %s successfully\n", scsi_path,
+ (start) ? "started" : "stopped");
+ } else
+ ctl_io_error_print(io, NULL, stderr);
+
+bailout:
+ ctl_scsi_free_io(io);
+
+ return (retval);
+}
+
+static int
+cctl_mode_sense(int fd, int target, int lun, int iid, int retries,
+ int argc, char **argv, char *combinedopt)
+{
+ union ctl_io *io;
+ struct ctl_id id;
+ uint32_t datalen;
+ uint8_t *dataptr;
+ int pc = -1, cdbsize, retval, dbd = 0, subpage = -1;
+ int list = 0;
+ int page_code = -1;
+ int c;
+
+ id.id = iid;
+ cdbsize = 0;
+ retval = 0;
+ dataptr = NULL;
+
+ io = ctl_scsi_alloc_io(id);
+ if (io == NULL) {
+ warn("%s: can't allocate memory", __func__);
+ return (1);
+ }
+
+ while ((c = getopt(argc, argv, combinedopt)) != -1) {
+ switch (c) {
+ case 'P':
+ pc = strtoul(optarg, NULL, 0);
+ break;
+ case 'S':
+ subpage = strtoul(optarg, NULL, 0);
+ break;
+ case 'd':
+ dbd = 1;
+ break;
+ case 'l':
+ list = 1;
+ break;
+ case 'm':
+ page_code = strtoul(optarg, NULL, 0);
+ break;
+ case 'c':
+ cdbsize = strtol(optarg, NULL, 0);
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (((list == 0) && (page_code == -1))
+ || ((list != 0) && (page_code != -1))) {
+ warnx("%s: you must specify either a page code (-m) or -l",
+ __func__);
+ retval = 1;
+ goto bailout;
+ }
+
+ if ((page_code != -1)
+ && ((page_code > SMS_ALL_PAGES_PAGE)
+ || (page_code < 0))) {
+ warnx("%s: page code %d is out of range", __func__,
+ page_code);
+ retval = 1;
+ goto bailout;
+ }
+
+ if (list == 1) {
+ page_code = SMS_ALL_PAGES_PAGE;
+ if (pc != -1) {
+ warnx("%s: arg -P makes no sense with -l",
+ __func__);
+ retval = 1;
+ goto bailout;
+ }
+ if (subpage != -1) {
+ warnx("%s: arg -S makes no sense with -l", __func__);
+ retval = 1;
+ goto bailout;
+ }
+ }
+
+ if (pc == -1)
+ pc = SMS_PAGE_CTRL_CURRENT;
+ else {
+ if ((pc > 3)
+ || (pc < 0)) {
+ warnx("%s: page control value %d is out of range: 0-3",
+ __func__, pc);
+ retval = 1;
+ goto bailout;
+ }
+ }
+
+
+ if ((subpage != -1)
+ && ((subpage > 255)
+ || (subpage < 0))) {
+ warnx("%s: subpage code %d is out of range: 0-255", __func__,
+ subpage);
+ retval = 1;
+ goto bailout;
+ }
+ if (cdbsize != 0) {
+ switch (cdbsize) {
+ case 6:
+ case 10:
+ break;
+ default:
+ warnx("%s: invalid cdbsize %d, valid sizes are 6 "
+ "and 10", __func__, cdbsize);
+ retval = 1;
+ goto bailout;
+ break;
+ }
+ } else
+ cdbsize = 6;
+
+ if (subpage == -1)
+ subpage = 0;
+
+ if (cdbsize == 6)
+ datalen = 255;
+ else
+ datalen = 65535;
+
+ dataptr = (uint8_t *)malloc(datalen);
+ if (dataptr == NULL) {
+ warn("%s: can't allocate %d bytes", __func__, datalen);
+ retval = 1;
+ goto bailout;
+ }
+
+ memset(dataptr, 0, datalen);
+
+ ctl_scsi_mode_sense(io,
+ /*data_ptr*/ dataptr,
+ /*data_len*/ datalen,
+ /*dbd*/ dbd,
+ /*llbaa*/ 0,
+ /*page_code*/ page_code,
+ /*pc*/ pc << 6,
+ /*subpage*/ subpage,
+ /*minimum_cdb_size*/ cdbsize,
+ /*tag_type*/ CTL_TAG_SIMPLE,
+ /*control*/ 0);
+
+ io->io_hdr.nexus.targ_target.id = target;
+ io->io_hdr.nexus.targ_lun = lun;
+ io->io_hdr.nexus.initid = id;
+
+ if (cctl_do_io(fd, retries, io, __func__) != 0) {
+ retval = 1;
+ goto bailout;
+ }
+
+ if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS) {
+ int pages_len, used_len;
+ uint32_t returned_len;
+ uint8_t *ndataptr;
+
+ if (io->scsiio.cdb[0] == MODE_SENSE_6) {
+ struct scsi_mode_hdr_6 *hdr6;
+ int bdlen;
+
+ hdr6 = (struct scsi_mode_hdr_6 *)dataptr;
+
+ returned_len = hdr6->datalen + 1;
+ bdlen = hdr6->block_descr_len;
+
+ ndataptr = (uint8_t *)((uint8_t *)&hdr6[1] + bdlen);
+ } else {
+ struct scsi_mode_hdr_10 *hdr10;
+ int bdlen;
+
+ hdr10 = (struct scsi_mode_hdr_10 *)dataptr;
+
+ returned_len = scsi_2btoul(hdr10->datalen) + 2;
+ bdlen = scsi_2btoul(hdr10->block_descr_len);
+
+ ndataptr = (uint8_t *)((uint8_t *)&hdr10[1] + bdlen);
+ }
+ /* just in case they can give us more than we allocated for */
+ returned_len = min(returned_len, datalen);
+ pages_len = returned_len - (ndataptr - dataptr);
+#if 0
+ fprintf(stdout, "returned_len = %d, pages_len = %d\n",
+ returned_len, pages_len);
+#endif
+ if (list == 1) {
+ fprintf(stdout, "Supported mode pages:\n");
+ for (used_len = 0; used_len < pages_len;) {
+ struct scsi_mode_page_header *header;
+
+ header = (struct scsi_mode_page_header *)
+ &ndataptr[used_len];
+ fprintf(stdout, "%d\n", header->page_code);
+ used_len += header->page_length + 2;
+ }
+ } else {
+ for (used_len = 0; used_len < pages_len; used_len++) {
+ fprintf(stdout, "0x%x ", ndataptr[used_len]);
+ if (((used_len+1) % 16) == 0)
+ fprintf(stdout, "\n");
+ }
+ fprintf(stdout, "\n");
+ }
+ } else
+ ctl_io_error_print(io, NULL, stderr);
+bailout:
+
+ ctl_scsi_free_io(io);
+
+ if (dataptr != NULL)
+ free(dataptr);
+
+ return (retval);
+}
+
+static int
+cctl_read_capacity(int fd, int target, int lun, int iid, int retries,
+ int argc, char **argv, char *combinedopt)
+{
+ union ctl_io *io;
+ struct ctl_id id;
+ struct scsi_read_capacity_data *data;
+ struct scsi_read_capacity_data_long *longdata;
+ int cdbsize = -1, retval;
+ uint8_t *dataptr;
+ int c;
+
+ cdbsize = 10;
+ dataptr = NULL;
+ retval = 0;
+ id.id = iid;
+
+ io = ctl_scsi_alloc_io(id);
+ if (io == NULL) {
+ warn("%s: can't allocate memory\n", __func__);
+ return (1);
+ }
+
+ while ((c = getopt(argc, argv, combinedopt)) != -1) {
+ switch (c) {
+ case 'c':
+ cdbsize = strtol(optarg, NULL, 0);
+ break;
+ default:
+ break;
+ }
+ }
+ if (cdbsize != -1) {
+ switch (cdbsize) {
+ case 10:
+ case 16:
+ break;
+ default:
+ warnx("%s: invalid cdbsize %d, valid sizes are 10 "
+ "and 16", __func__, cdbsize);
+ retval = 1;
+ goto bailout;
+ break; /* NOTREACHED */
+ }
+ } else
+ cdbsize = 10;
+
+ dataptr = (uint8_t *)malloc(sizeof(*longdata));
+ if (dataptr == NULL) {
+ warn("%s: can't allocate %zd bytes\n", __func__,
+ sizeof(*longdata));
+ retval = 1;
+ goto bailout;
+ }
+ memset(dataptr, 0, sizeof(*longdata));
+
+retry:
+
+ switch (cdbsize) {
+ case 10:
+ ctl_scsi_read_capacity(io,
+ /*data_ptr*/ dataptr,
+ /*data_len*/ sizeof(*longdata),
+ /*addr*/ 0,
+ /*reladr*/ 0,
+ /*pmi*/ 0,
+ /*tag_type*/ CTL_TAG_SIMPLE,
+ /*control*/ 0);
+ break;
+ case 16:
+ ctl_scsi_read_capacity_16(io,
+ /*data_ptr*/ dataptr,
+ /*data_len*/ sizeof(*longdata),
+ /*addr*/ 0,
+ /*reladr*/ 0,
+ /*pmi*/ 0,
+ /*tag_type*/ CTL_TAG_SIMPLE,
+ /*control*/ 0);
+ break;
+ }
+
+ io->io_hdr.nexus.initid = id;
+ io->io_hdr.nexus.targ_target.id = target;
+ io->io_hdr.nexus.targ_lun = lun;
+
+ if (cctl_do_io(fd, retries, io, __func__) != 0) {
+ retval = 1;
+ goto bailout;
+ }
+
+ if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS) {
+ uint64_t maxlba;
+ uint32_t blocksize;
+
+ if (cdbsize == 10) {
+
+ data = (struct scsi_read_capacity_data *)dataptr;
+
+ maxlba = scsi_4btoul(data->addr);
+ blocksize = scsi_4btoul(data->length);
+
+ if (maxlba == 0xffffffff) {
+ cdbsize = 16;
+ goto retry;
+ }
+ } else {
+ longdata=(struct scsi_read_capacity_data_long *)dataptr;
+
+ maxlba = scsi_8btou64(longdata->addr);
+ blocksize = scsi_4btoul(longdata->length);
+ }
+
+ fprintf(stdout, "Disk Capacity: %ju, Blocksize: %d\n",
+ (uintmax_t)maxlba, blocksize);
+ } else {
+ ctl_io_error_print(io, NULL, stderr);
+ }
+bailout:
+ ctl_scsi_free_io(io);
+
+ if (dataptr != NULL)
+ free(dataptr);
+
+ return (retval);
+}
+
+static int
+cctl_read_write(int fd, int target, int lun, int iid, int retries,
+ int argc, char **argv, char *combinedopt,
+ ctladm_cmdfunction command)
+{
+ union ctl_io *io;
+ struct ctl_id id;
+ int file_fd, do_stdio;
+ int cdbsize = -1, databytes;
+ uint8_t *dataptr;
+ char *filename = NULL;
+ int datalen = -1, blocksize = -1;
+ uint64_t lba = 0;
+ int lba_set = 0;
+ int retval;
+ int c;
+
+ retval = 0;
+ do_stdio = 0;
+ dataptr = NULL;
+ file_fd = -1;
+ id.id = iid;
+
+ io = ctl_scsi_alloc_io(id);
+ if (io == NULL) {
+ warn("%s: can't allocate memory\n", __func__);
+ return (1);
+ }
+
+ while ((c = getopt(argc, argv, combinedopt)) != -1) {
+ switch (c) {
+ case 'N':
+ io->io_hdr.flags |= CTL_FLAG_NO_DATAMOVE;
+ break;
+ case 'b':
+ blocksize = strtoul(optarg, NULL, 0);
+ break;
+ case 'c':
+ cdbsize = strtoul(optarg, NULL, 0);
+ break;
+ case 'd':
+ datalen = strtoul(optarg, NULL, 0);
+ break;
+ case 'f':
+ filename = strdup(optarg);
+ break;
+ case 'l':
+ lba = strtoull(optarg, NULL, 0);
+ lba_set = 1;
+ break;
+ default:
+ break;
+ }
+ }
+ if (filename == NULL) {
+ warnx("%s: you must supply a filename using -f", __func__);
+ retval = 1;
+ goto bailout;
+ }
+
+ if (datalen == -1) {
+ warnx("%s: you must specify the data length with -d", __func__);
+ retval = 1;
+ goto bailout;
+ }
+
+ if (lba_set == 0) {
+ warnx("%s: you must specify the LBA with -l", __func__);
+ retval = 1;
+ goto bailout;
+ }
+
+ if (blocksize == -1) {
+ warnx("%s: you must specify the blocksize with -b", __func__);
+ retval = 1;
+ goto bailout;
+ }
+
+ if (cdbsize != -1) {
+ switch (cdbsize) {
+ case 6:
+ case 10:
+ case 12:
+ case 16:
+ break;
+ default:
+ warnx("%s: invalid cdbsize %d, valid sizes are 6, "
+ "10, 12 or 16", __func__, cdbsize);
+ retval = 1;
+ goto bailout;
+ break; /* NOTREACHED */
+ }
+ } else
+ cdbsize = 6;
+
+ databytes = datalen * blocksize;
+ dataptr = (uint8_t *)malloc(databytes);
+
+ if (dataptr == NULL) {
+ warn("%s: can't allocate %d bytes\n", __func__, databytes);
+ retval = 1;
+ goto bailout;
+ }
+ if (strcmp(filename, "-") == 0) {
+ if (command == CTLADM_CMD_READ)
+ file_fd = STDOUT_FILENO;
+ else
+ file_fd = STDIN_FILENO;
+ do_stdio = 1;
+ } else {
+ file_fd = open(filename, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
+ if (file_fd == -1) {
+ warn("%s: can't open file %s", __func__, filename);
+ retval = 1;
+ goto bailout;
+ }
+ }
+
+ memset(dataptr, 0, databytes);
+
+ if (command == CTLADM_CMD_WRITE) {
+ int bytes_read;
+
+ bytes_read = read(file_fd, dataptr, databytes);
+ if (bytes_read == -1) {
+ warn("%s: error reading file %s", __func__, filename);
+ retval = 1;
+ goto bailout;
+ }
+ if (bytes_read != databytes) {
+ warnx("%s: only read %d bytes from file %s",
+ __func__, bytes_read, filename);
+ retval = 1;
+ goto bailout;
+ }
+ }
+ ctl_scsi_read_write(io,
+ /*data_ptr*/ dataptr,
+ /*data_len*/ databytes,
+ /*read_op*/ (command == CTLADM_CMD_READ) ? 1 : 0,
+ /*byte2*/ 0,
+ /*minimum_cdb_size*/ cdbsize,
+ /*lba*/ lba,
+ /*num_blocks*/ datalen,
+ /*tag_type*/ CTL_TAG_SIMPLE,
+ /*control*/ 0);
+
+ io->io_hdr.nexus.targ_target.id = target;
+ io->io_hdr.nexus.targ_lun = lun;
+ io->io_hdr.nexus.initid = id;
+
+ if (cctl_do_io(fd, retries, io, __func__) != 0) {
+ retval = 1;
+ goto bailout;
+ }
+
+ if (((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)
+ && (command == CTLADM_CMD_READ)) {
+ int bytes_written;
+
+ bytes_written = write(file_fd, dataptr, databytes);
+ if (bytes_written == -1) {
+ warn("%s: can't write to %s", __func__, filename);
+ goto bailout;
+ }
+ } else if ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS)
+ ctl_io_error_print(io, NULL, stderr);
+
+
+bailout:
+
+ ctl_scsi_free_io(io);
+
+ if (dataptr != NULL)
+ free(dataptr);
+
+ if ((do_stdio == 0)
+ && (file_fd != -1))
+ close(file_fd);
+
+ return (retval);
+}
+
+static int
+cctl_get_luns(int fd, int target, int lun, int iid, int retries, struct
+ scsi_report_luns_data **lun_data, uint32_t *num_luns)
+{
+ union ctl_io *io;
+ struct ctl_id id;
+ uint32_t nluns;
+ int lun_datalen;
+ int retval;
+
+ retval = 0;
+ id.id = iid;
+
+ io = ctl_scsi_alloc_io(id);
+ if (io == NULL) {
+ warnx("%s: can't allocate memory", __func__);
+ return (1);
+ }
+
+ /*
+ * lun_data includes space for 1 lun, allocate space for 4 initially.
+ * If that isn't enough, we'll allocate more.
+ */
+ nluns = 4;
+retry:
+ lun_datalen = sizeof(*lun_data) +
+ (nluns * sizeof(struct scsi_report_luns_lundata));
+ *lun_data = malloc(lun_datalen);
+
+ if (*lun_data == NULL) {
+ warnx("%s: can't allocate memory", __func__);
+ ctl_scsi_free_io(io);
+ return (1);
+ }
+
+ ctl_scsi_report_luns(io,
+ /*data_ptr*/ (uint8_t *)*lun_data,
+ /*data_len*/ lun_datalen,
+ /*select_report*/ RPL_REPORT_ALL,
+ /*tag_type*/ CTL_TAG_SIMPLE,
+ /*control*/ 0);
+
+ io->io_hdr.nexus.initid = id;
+ io->io_hdr.nexus.targ_target.id = target;
+ io->io_hdr.nexus.targ_lun = lun;
+
+ if (cctl_do_io(fd, retries, io, __func__) != 0) {
+ retval = 1;
+ goto bailout;
+ }
+
+ if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS) {
+ uint32_t returned_len, returned_luns;
+
+ returned_len = scsi_4btoul((*lun_data)->length);
+ returned_luns = returned_len / 8;
+ if (returned_luns > nluns) {
+ nluns = returned_luns;
+ free(*lun_data);
+ goto retry;
+ }
+ /* These should be the same */
+ *num_luns = MIN(returned_luns, nluns);
+ } else {
+ ctl_io_error_print(io, NULL, stderr);
+ retval = 1;
+ }
+bailout:
+ ctl_scsi_free_io(io);
+
+ return (retval);
+}
+
+static int
+cctl_report_luns(int fd, int target, int lun, int iid, int retries)
+{
+ struct scsi_report_luns_data *lun_data;
+ uint32_t num_luns, i;
+ int retval;
+
+ lun_data = NULL;
+
+ if ((retval = cctl_get_luns(fd, target, lun, iid, retries, &lun_data,
+ &num_luns)) != 0)
+ goto bailout;
+
+ fprintf(stdout, "%u LUNs returned\n", num_luns);
+ for (i = 0; i < num_luns; i++) {
+ int lun_val;
+
+ /*
+ * XXX KDM figure out a way to share this code with
+ * cctl_lunlist()?
+ */
+ switch (lun_data->luns[i].lundata[0] & RPL_LUNDATA_ATYP_MASK) {
+ case RPL_LUNDATA_ATYP_PERIPH:
+ lun_val = lun_data->luns[i].lundata[1];
+ break;
+ case RPL_LUNDATA_ATYP_FLAT:
+ lun_val = (lun_data->luns[i].lundata[0] &
+ RPL_LUNDATA_FLAT_LUN_MASK) |
+ (lun_data->luns[i].lundata[1] <<
+ RPL_LUNDATA_FLAT_LUN_BITS);
+ break;
+ case RPL_LUNDATA_ATYP_LUN:
+ case RPL_LUNDATA_ATYP_EXTLUN:
+ default:
+ fprintf(stdout, "Unsupported LUN format %d\n",
+ lun_data->luns[i].lundata[0] &
+ RPL_LUNDATA_ATYP_MASK);
+ lun_val = -1;
+ break;
+ }
+ if (lun_val == -1)
+ continue;
+
+ fprintf(stdout, "%d\n", lun_val);
+ }
+
+bailout:
+ if (lun_data != NULL)
+ free(lun_data);
+
+ return (retval);
+}
+
+static int
+cctl_tur(int fd, int target, int lun, int iid, int retries)
+{
+ union ctl_io *io;
+ struct ctl_id id;
+
+ id.id = iid;
+
+ io = ctl_scsi_alloc_io(id);
+ if (io == NULL) {
+ fprintf(stderr, "can't allocate memory\n");
+ return (1);
+ }
+
+ ctl_scsi_tur(io,
+ /* tag_type */ CTL_TAG_SIMPLE,
+ /* control */ 0);
+
+ io->io_hdr.nexus.targ_target.id = target;
+ io->io_hdr.nexus.targ_lun = lun;
+ io->io_hdr.nexus.initid = id;
+
+ if (cctl_do_io(fd, retries, io, __func__) != 0) {
+ ctl_scsi_free_io(io);
+ return (1);
+ }
+
+ if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)
+ fprintf(stdout, "Unit is ready\n");
+ else
+ ctl_io_error_print(io, NULL, stderr);
+
+ return (0);
+}
+
+static int
+cctl_get_inquiry(int fd, int target, int lun, int iid, int retries,
+ char *path_str, int path_len,
+ struct scsi_inquiry_data *inq_data)
+{
+ union ctl_io *io;
+ struct ctl_id id;
+ int retval;
+
+ retval = 0;
+
+ id.id = iid;
+
+ io = ctl_scsi_alloc_io(id);
+ if (io == NULL) {
+ warnx("cctl_inquiry: can't allocate memory\n");
+ return (1);
+ }
+
+ ctl_scsi_inquiry(/*io*/ io,
+ /*data_ptr*/ (uint8_t *)inq_data,
+ /*data_len*/ sizeof(*inq_data),
+ /*byte2*/ 0,
+ /*page_code*/ 0,
+ /*tag_type*/ CTL_TAG_SIMPLE,
+ /*control*/ 0);
+
+ io->io_hdr.nexus.targ_target.id = target;
+ io->io_hdr.nexus.targ_lun = lun;
+ io->io_hdr.nexus.initid = id;
+
+ if (cctl_do_io(fd, retries, io, __func__) != 0) {
+ retval = 1;
+ goto bailout;
+ }
+
+ if ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS) {
+ retval = 1;
+ ctl_io_error_print(io, NULL, stderr);
+ } else if (path_str != NULL)
+ ctl_scsi_path_string(io, path_str, path_len);
+
+bailout:
+ ctl_scsi_free_io(io);
+
+ return (retval);
+}
+
+static int
+cctl_inquiry(int fd, int target, int lun, int iid, int retries)
+{
+ struct scsi_inquiry_data *inq_data;
+ char scsi_path[40];
+ int retval;
+
+ retval = 0;
+
+ inq_data = malloc(sizeof(*inq_data));
+ if (inq_data == NULL) {
+ warnx("%s: can't allocate inquiry data", __func__);
+ retval = 1;
+ goto bailout;
+ }
+
+ if ((retval = cctl_get_inquiry(fd, target, lun, iid, retries, scsi_path,
+ sizeof(scsi_path), inq_data)) != 0)
+ goto bailout;
+
+ printf("%s", scsi_path);
+ scsi_print_inquiry(inq_data);
+
+bailout:
+ if (inq_data != NULL)
+ free(inq_data);
+
+ return (retval);
+}
+
+static int
+cctl_req_sense(int fd, int target, int lun, int iid, int retries)
+{
+ union ctl_io *io;
+ struct scsi_sense_data *sense_data;
+ struct ctl_id id;
+ int retval;
+
+ retval = 0;
+
+ id.id = iid;
+
+ io = ctl_scsi_alloc_io(id);
+ if (io == NULL) {
+ warnx("cctl_req_sense: can't allocate memory\n");
+ return (1);
+ }
+ sense_data = malloc(sizeof(*sense_data));
+ memset(sense_data, 0, sizeof(*sense_data));
+
+ ctl_scsi_request_sense(/*io*/ io,
+ /*data_ptr*/ (uint8_t *)sense_data,
+ /*data_len*/ sizeof(*sense_data),
+ /*byte2*/ 0,
+ /*tag_type*/ CTL_TAG_SIMPLE,
+ /*control*/ 0);
+
+ io->io_hdr.nexus.targ_target.id = target;
+ io->io_hdr.nexus.targ_lun = lun;
+ io->io_hdr.nexus.initid = id;
+
+ if (cctl_do_io(fd, retries, io, __func__) != 0) {
+ retval = 1;
+ goto bailout;
+ }
+
+ if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS) {
+ bcopy(sense_data, &io->scsiio.sense_data, sizeof(*sense_data));
+ io->scsiio.sense_len = sizeof(*sense_data);
+ ctl_scsi_sense_print(&io->scsiio, NULL, stdout);
+ } else
+ ctl_io_error_print(io, NULL, stderr);
+
+bailout:
+
+ ctl_scsi_free_io(io);
+ free(sense_data);
+
+ return (retval);
+}
+
+static int
+cctl_report_target_port_group(int fd, int target, int lun, int initiator)
+{
+ union ctl_io *io;
+ struct ctl_id id;
+ uint32_t datalen;
+ uint8_t *dataptr;
+ int retval;
+
+ id.id = initiator;
+ dataptr = NULL;
+ retval = 0;
+
+ io = ctl_scsi_alloc_io(id);
+ if (io == NULL) {
+ warn("%s: can't allocate memory", __func__);
+ return (1);
+ }
+
+ datalen = 64;
+ dataptr = (uint8_t *)malloc(datalen);
+ if (dataptr == NULL) {
+ warn("%s: can't allocate %d bytes", __func__, datalen);
+ retval = 1;
+ goto bailout;
+ }
+
+ memset(dataptr, 0, datalen);
+
+ ctl_scsi_maintenance_in(/*io*/ io,
+ /*data_ptr*/ dataptr,
+ /*data_len*/ datalen,
+ /*action*/ SA_RPRT_TRGT_GRP,
+ /*tag_type*/ CTL_TAG_SIMPLE,
+ /*control*/ 0);
+
+ io->io_hdr.nexus.targ_target.id = target;
+ io->io_hdr.nexus.targ_lun = lun;
+ io->io_hdr.nexus.initid = id;
+
+ if (cctl_do_io(fd, 0, io, __func__) != 0) {
+ retval = 1;
+ goto bailout;
+ }
+
+ if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS) {
+ int returned_len, used_len;
+
+ returned_len = scsi_4btoul(&dataptr[0]) + 4;
+
+ for (used_len = 0; used_len < returned_len; used_len++) {
+ fprintf(stdout, "0x%02x ", dataptr[used_len]);
+ if (((used_len+1) % 8) == 0)
+ fprintf(stdout, "\n");
+ }
+ fprintf(stdout, "\n");
+ } else
+ ctl_io_error_print(io, NULL, stderr);
+
+bailout:
+ ctl_scsi_free_io(io);
+
+ if (dataptr != NULL)
+ free(dataptr);
+
+ return (retval);
+}
+
+static int
+cctl_inquiry_vpd_devid(int fd, int target, int lun, int initiator)
+{
+ union ctl_io *io;
+ struct ctl_id id;
+ uint32_t datalen;
+ uint8_t *dataptr;
+ int retval;
+
+ id.id = initiator;
+ retval = 0;
+ dataptr = NULL;
+
+ io = ctl_scsi_alloc_io(id);
+ if (io == NULL) {
+ warn("%s: can't allocate memory", __func__);
+ return (1);
+ }
+
+ datalen = 256;
+ dataptr = (uint8_t *)malloc(datalen);
+ if (dataptr == NULL) {
+ warn("%s: can't allocate %d bytes", __func__, datalen);
+ retval = 1;
+ goto bailout;
+ }
+
+ memset(dataptr, 0, datalen);
+
+ ctl_scsi_inquiry(/*io*/ io,
+ /*data_ptr*/ dataptr,
+ /*data_len*/ datalen,
+ /*byte2*/ SI_EVPD,
+ /*page_code*/ SVPD_DEVICE_ID,
+ /*tag_type*/ CTL_TAG_SIMPLE,
+ /*control*/ 0);
+
+ io->io_hdr.nexus.targ_target.id = target;
+ io->io_hdr.nexus.targ_lun = lun;
+ io->io_hdr.nexus.initid = id;
+
+ if (cctl_do_io(fd, 0, io, __func__) != 0) {
+ retval = 1;
+ goto bailout;
+ }
+
+ if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS) {
+ int returned_len, used_len;
+
+ returned_len = scsi_2btoul(&dataptr[2]) + 4;
+
+ for (used_len = 0; used_len < returned_len; used_len++) {
+ fprintf(stdout, "0x%02x ", dataptr[used_len]);
+ if (((used_len+1) % 8) == 0)
+ fprintf(stdout, "\n");
+ }
+ fprintf(stdout, "\n");
+ } else
+ ctl_io_error_print(io, NULL, stderr);
+
+bailout:
+ ctl_scsi_free_io(io);
+
+ if (dataptr != NULL)
+ free(dataptr);
+
+ return (retval);
+}
+
+static int
+cctl_persistent_reserve_in(int fd, int target, int lun, int initiator,
+ int argc, char **argv, char *combinedopt,
+ int retry_count)
+{
+ union ctl_io *io;
+ struct ctl_id id;
+ uint32_t datalen;
+ uint8_t *dataptr;
+ int action = -1;
+ int retval;
+ int c;
+
+ id.id = initiator;
+ retval = 0;
+ dataptr = NULL;
+
+ io = ctl_scsi_alloc_io(id);
+ if (io == NULL) {
+ warn("%s: can't allocate memory", __func__);
+ return (1);
+ }
+
+ while ((c = getopt(argc, argv, combinedopt)) != -1) {
+ switch (c) {
+ case 'a':
+ action = strtol(optarg, NULL, 0);
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (action < 0 || action > 2) {
+ warn("action must be specified and in the range: 0-2");
+ retval = 1;
+ goto bailout;
+ }
+
+
+ datalen = 256;
+ dataptr = (uint8_t *)malloc(datalen);
+ if (dataptr == NULL) {
+ warn("%s: can't allocate %d bytes", __func__, datalen);
+ retval = 1;
+ goto bailout;
+ }
+
+ memset(dataptr, 0, datalen);
+
+ ctl_scsi_persistent_res_in(io,
+ /*data_ptr*/ dataptr,
+ /*data_len*/ datalen,
+ /*action*/ action,
+ /*tag_type*/ CTL_TAG_SIMPLE,
+ /*control*/ 0);
+
+ io->io_hdr.nexus.targ_target.id = target;
+ io->io_hdr.nexus.targ_lun = lun;
+ io->io_hdr.nexus.initid = id;
+
+ if (cctl_do_io(fd, retry_count, io, __func__) != 0) {
+ retval = 1;
+ goto bailout;
+ }
+
+ if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS) {
+ int returned_len, used_len;
+
+ returned_len = 0;
+
+ switch (action) {
+ case 0:
+ returned_len = scsi_4btoul(&dataptr[4]) + 8;
+ returned_len = min(returned_len, 256);
+ break;
+ case 1:
+ returned_len = scsi_4btoul(&dataptr[4]) + 8;
+ break;
+ case 2:
+ returned_len = 8;
+ break;
+ default:
+ warnx("%s: invalid action %d", __func__, action);
+ goto bailout;
+ break; /* NOTREACHED */
+ }
+
+ for (used_len = 0; used_len < returned_len; used_len++) {
+ fprintf(stdout, "0x%02x ", dataptr[used_len]);
+ if (((used_len+1) % 8) == 0)
+ fprintf(stdout, "\n");
+ }
+ fprintf(stdout, "\n");
+ } else
+ ctl_io_error_print(io, NULL, stderr);
+
+bailout:
+ ctl_scsi_free_io(io);
+
+ if (dataptr != NULL)
+ free(dataptr);
+
+ return (retval);
+}
+
+static int
+cctl_persistent_reserve_out(int fd, int target, int lun, int initiator,
+ int argc, char **argv, char *combinedopt,
+ int retry_count)
+{
+ union ctl_io *io;
+ struct ctl_id id;
+ uint32_t datalen;
+ uint64_t key = 0, sa_key = 0;
+ int action = -1, restype = -1;
+ uint8_t *dataptr;
+ int retval;
+ int c;
+
+ id.id = initiator;
+ retval = 0;
+ dataptr = NULL;
+
+ io = ctl_scsi_alloc_io(id);
+ if (io == NULL) {
+ warn("%s: can't allocate memory", __func__);
+ return (1);
+ }
+
+ while ((c = getopt(argc, argv, combinedopt)) != -1) {
+ switch (c) {
+ case 'a':
+ action = strtol(optarg, NULL, 0);
+ break;
+ case 'k':
+ key = strtoull(optarg, NULL, 0);
+ break;
+ case 'r':
+ restype = strtol(optarg, NULL, 0);
+ break;
+ case 's':
+ sa_key = strtoull(optarg, NULL, 0);
+ break;
+ default:
+ break;
+ }
+ }
+ if (action < 0 || action > 5) {
+ warn("action must be specified and in the range: 0-5");
+ retval = 1;
+ goto bailout;
+ }
+
+ if (restype < 0 || restype > 5) {
+ if (action != 0 && action != 5 && action != 3) {
+ warn("'restype' must specified and in the range: 0-5");
+ retval = 1;
+ goto bailout;
+ }
+ }
+
+ datalen = 24;
+ dataptr = (uint8_t *)malloc(datalen);
+ if (dataptr == NULL) {
+ warn("%s: can't allocate %d bytes", __func__, datalen);
+ retval = 1;
+ goto bailout;
+ }
+
+ memset(dataptr, 0, datalen);
+
+ ctl_scsi_persistent_res_out(io,
+ /*data_ptr*/ dataptr,
+ /*data_len*/ datalen,
+ /*action*/ action,
+ /*type*/ restype,
+ /*key*/ key,
+ /*sa key*/ sa_key,
+ /*tag_type*/ CTL_TAG_SIMPLE,
+ /*control*/ 0);
+
+ io->io_hdr.nexus.targ_target.id = target;
+ io->io_hdr.nexus.targ_lun = lun;
+ io->io_hdr.nexus.initid = id;
+
+ if (cctl_do_io(fd, retry_count, io, __func__) != 0) {
+ retval = 1;
+ goto bailout;
+ }
+ if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS) {
+ char scsi_path[40];
+ ctl_scsi_path_string(io, scsi_path, sizeof(scsi_path));
+ fprintf( stdout, "%sPERSISTENT RESERVE OUT executed "
+ "successfully\n", scsi_path);
+ } else
+ ctl_io_error_print(io, NULL, stderr);
+
+bailout:
+ ctl_scsi_free_io(io);
+
+ if (dataptr != NULL)
+ free(dataptr);
+
+ return (retval);
+}
+
+struct cctl_req_option {
+ char *name;
+ int namelen;
+ char *value;
+ int vallen;
+ STAILQ_ENTRY(cctl_req_option) links;
+};
+
+static int
+cctl_create_lun(int fd, int argc, char **argv, char *combinedopt)
+{
+ struct ctl_lun_req req;
+ int device_type = -1;
+ uint64_t lun_size = 0;
+ uint32_t blocksize = 0, req_lun_id = 0;
+ char *serial_num = NULL;
+ char *device_id = NULL;
+ int lun_size_set = 0, blocksize_set = 0, lun_id_set = 0;
+ char *backend_name = NULL;
+ STAILQ_HEAD(, cctl_req_option) option_list;
+ int num_options = 0;
+ int retval = 0, c;
+
+ STAILQ_INIT(&option_list);
+
+ while ((c = getopt(argc, argv, combinedopt)) != -1) {
+ switch (c) {
+ case 'b':
+ backend_name = strdup(optarg);
+ break;
+ case 'B':
+ blocksize = strtoul(optarg, NULL, 0);
+ blocksize_set = 1;
+ break;
+ case 'd':
+ device_id = strdup(optarg);
+ break;
+ case 'l':
+ req_lun_id = strtoul(optarg, NULL, 0);
+ lun_id_set = 1;
+ break;
+ case 'o': {
+ struct cctl_req_option *option;
+ char *tmpstr;
+ char *name, *value;
+
+ tmpstr = strdup(optarg);
+ name = strsep(&tmpstr, "=");
+ if (name == NULL) {
+ warnx("%s: option -o takes \"name=value\""
+ "argument", __func__);
+ retval = 1;
+ goto bailout;
+ }
+ value = strsep(&tmpstr, "=");
+ if (value == NULL) {
+ warnx("%s: option -o takes \"name=value\""
+ "argument", __func__);
+ retval = 1;
+ goto bailout;
+ }
+ option = malloc(sizeof(*option));
+ if (option == NULL) {
+ warn("%s: error allocating %zd bytes",
+ __func__, sizeof(*option));
+ retval = 1;
+ goto bailout;
+ }
+ option->name = strdup(name);
+ option->namelen = strlen(name) + 1;
+ option->value = strdup(value);
+ option->vallen = strlen(value) + 1;
+ free(tmpstr);
+
+ STAILQ_INSERT_TAIL(&option_list, option, links);
+ num_options++;
+ break;
+ }
+ case 's':
+ lun_size = strtoull(optarg, NULL, 0);
+ lun_size_set = 1;
+ break;
+ case 'S':
+ serial_num = strdup(optarg);
+ break;
+ case 't':
+ device_type = strtoul(optarg, NULL, 0);
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (backend_name == NULL) {
+ warnx("%s: backend name (-b) must be specified", __func__);
+ retval = 1;
+ goto bailout;
+ }
+
+ bzero(&req, sizeof(req));
+
+ strlcpy(req.backend, backend_name, sizeof(req.backend));
+ req.reqtype = CTL_LUNREQ_CREATE;
+
+ if (blocksize_set != 0)
+ req.reqdata.create.blocksize_bytes = blocksize;
+
+ if (lun_size_set != 0)
+ req.reqdata.create.lun_size_bytes = lun_size;
+
+ if (lun_id_set != 0) {
+ req.reqdata.create.flags |= CTL_LUN_FLAG_ID_REQ;
+ req.reqdata.create.req_lun_id = req_lun_id;
+ }
+
+ req.reqdata.create.flags |= CTL_LUN_FLAG_DEV_TYPE;
+
+ if (device_type != -1)
+ req.reqdata.create.device_type = device_type;
+ else
+ req.reqdata.create.device_type = T_DIRECT;
+
+ if (serial_num != NULL) {
+ strlcpy(req.reqdata.create.serial_num, serial_num,
+ sizeof(req.reqdata.create.serial_num));
+ req.reqdata.create.flags |= CTL_LUN_FLAG_SERIAL_NUM;
+ }
+
+ if (device_id != NULL) {
+ strlcpy(req.reqdata.create.device_id, device_id,
+ sizeof(req.reqdata.create.device_id));
+ req.reqdata.create.flags |= CTL_LUN_FLAG_DEVID;
+ }
+
+ req.num_be_args = num_options;
+ if (num_options > 0) {
+ struct cctl_req_option *option, *next_option;
+ int i;
+
+ req.be_args = malloc(num_options * sizeof(*req.be_args));
+ if (req.be_args == NULL) {
+ warn("%s: error allocating %zd bytes", __func__,
+ num_options * sizeof(*req.be_args));
+ retval = 1;
+ goto bailout;
+ }
+
+ for (i = 0, option = STAILQ_FIRST(&option_list);
+ i < num_options; i++, option = next_option) {
+ next_option = STAILQ_NEXT(option, links);
+
+ req.be_args[i].namelen = option->namelen;
+ req.be_args[i].name = strdup(option->name);
+ req.be_args[i].vallen = option->vallen;
+ req.be_args[i].value = strdup(option->value);
+ /*
+ * XXX KDM do we want a way to specify a writeable
+ * flag of some sort? Do we want a way to specify
+ * binary data?
+ */
+ req.be_args[i].flags = CTL_BEARG_ASCII | CTL_BEARG_RD;
+
+ STAILQ_REMOVE(&option_list, option, cctl_req_option,
+ links);
+ free(option->name);
+ free(option->value);
+ free(option);
+ }
+ }
+
+ if (ioctl(fd, CTL_LUN_REQ, &req) == -1) {
+ warn("%s: error issuing CTL_LUN_REQ ioctl", __func__);
+ retval = 1;
+ goto bailout;
+ }
+
+ if (req.status == CTL_LUN_ERROR) {
+ warnx("%s: error returned from LUN creation request:\n%s",
+ __func__, req.error_str);
+ retval = 1;
+ goto bailout;
+ } else if (req.status != CTL_LUN_OK) {
+ warnx("%s: unknown LUN creation request status %d",
+ __func__, req.status);
+ retval = 1;
+ goto bailout;
+ }
+
+ fprintf(stdout, "LUN created successfully\n");
+ fprintf(stdout, "backend: %s\n", req.backend);
+ fprintf(stdout, "device type: %d\n",req.reqdata.create.device_type);
+ fprintf(stdout, "LUN size: %ju bytes\n",
+ (uintmax_t)req.reqdata.create.lun_size_bytes);
+ fprintf(stdout, "blocksize %u bytes\n",
+ req.reqdata.create.blocksize_bytes);
+ fprintf(stdout, "LUN ID: %d\n", req.reqdata.create.req_lun_id);
+ fprintf(stdout, "Serial Number: %s\n", req.reqdata.create.serial_num);
+ fprintf(stdout, "Device ID; %s\n", req.reqdata.create.device_id);
+
+bailout:
+ return (retval);
+}
+
+static int
+cctl_rm_lun(int fd, int argc, char **argv, char *combinedopt)
+{
+ struct ctl_lun_req req;
+ uint32_t lun_id = 0;
+ int lun_id_set = 0;
+ char *backend_name = NULL;
+ STAILQ_HEAD(, cctl_req_option) option_list;
+ int num_options = 0;
+ int retval = 0, c;
+
+ STAILQ_INIT(&option_list);
+
+ while ((c = getopt(argc, argv, combinedopt)) != -1) {
+ switch (c) {
+ case 'b':
+ backend_name = strdup(optarg);
+ break;
+ case 'l':
+ lun_id = strtoul(optarg, NULL, 0);
+ lun_id_set = 1;
+ break;
+ case 'o': {
+ struct cctl_req_option *option;
+ char *tmpstr;
+ char *name, *value;
+
+ tmpstr = strdup(optarg);
+ name = strsep(&tmpstr, "=");
+ if (name == NULL) {
+ warnx("%s: option -o takes \"name=value\""
+ "argument", __func__);
+ retval = 1;
+ goto bailout;
+ }
+ value = strsep(&tmpstr, "=");
+ if (value == NULL) {
+ warnx("%s: option -o takes \"name=value\""
+ "argument", __func__);
+ retval = 1;
+ goto bailout;
+ }
+ option = malloc(sizeof(*option));
+ if (option == NULL) {
+ warn("%s: error allocating %zd bytes",
+ __func__, sizeof(*option));
+ retval = 1;
+ goto bailout;
+ }
+ option->name = strdup(name);
+ option->namelen = strlen(name) + 1;
+ option->value = strdup(value);
+ option->vallen = strlen(value) + 1;
+ free(tmpstr);
+
+ STAILQ_INSERT_TAIL(&option_list, option, links);
+ num_options++;
+ break;
+ }
+ default:
+ break;
+ }
+ }
+
+ if (backend_name == NULL)
+ errx(1, "%s: backend name (-b) must be specified", __func__);
+
+ if (lun_id_set == 0)
+ errx(1, "%s: LUN id (-l) must be specified", __func__);
+
+ bzero(&req, sizeof(req));
+
+ strlcpy(req.backend, backend_name, sizeof(req.backend));
+ req.reqtype = CTL_LUNREQ_RM;
+
+ req.reqdata.rm.lun_id = lun_id;
+
+ req.num_be_args = num_options;
+ if (num_options > 0) {
+ struct cctl_req_option *option, *next_option;
+ int i;
+
+ req.be_args = malloc(num_options * sizeof(*req.be_args));
+ if (req.be_args == NULL) {
+ warn("%s: error allocating %zd bytes", __func__,
+ num_options * sizeof(*req.be_args));
+ retval = 1;
+ goto bailout;
+ }
+
+ for (i = 0, option = STAILQ_FIRST(&option_list);
+ i < num_options; i++, option = next_option) {
+ next_option = STAILQ_NEXT(option, links);
+
+ req.be_args[i].namelen = option->namelen;
+ req.be_args[i].name = strdup(option->name);
+ req.be_args[i].vallen = option->vallen;
+ req.be_args[i].value = strdup(option->value);
+ /*
+ * XXX KDM do we want a way to specify a writeable
+ * flag of some sort? Do we want a way to specify
+ * binary data?
+ */
+ req.be_args[i].flags = CTL_BEARG_ASCII | CTL_BEARG_RD;
+
+ STAILQ_REMOVE(&option_list, option, cctl_req_option,
+ links);
+ free(option->name);
+ free(option->value);
+ free(option);
+ }
+ }
+
+ if (ioctl(fd, CTL_LUN_REQ, &req) == -1) {
+ warn("%s: error issuing CTL_LUN_REQ ioctl", __func__);
+ retval = 1;
+ goto bailout;
+ }
+
+ if (req.status == CTL_LUN_ERROR) {
+ warnx("%s: error returned from LUN creation request:\n%s",
+ __func__, req.error_str);
+ retval = 1;
+ goto bailout;
+ } else if (req.status != CTL_LUN_OK) {
+ warnx("%s: unknown LUN creation request status %d",
+ __func__, req.status);
+ retval = 1;
+ goto bailout;
+ }
+
+ printf("LUN %d deleted successfully\n", lun_id);
+
+bailout:
+ return (retval);
+}
+
+/*
+ * Name/value pair used for per-LUN attributes.
+ */
+struct cctl_lun_nv {
+ char *name;
+ char *value;
+ STAILQ_ENTRY(cctl_lun_nv) links;
+};
+
+/*
+ * Backend LUN information.
+ */
+struct cctl_lun {
+ uint64_t lun_id;
+ char *backend_type;
+ uint64_t size_blocks;
+ uint32_t blocksize;
+ char *serial_number;
+ char *device_id;
+ STAILQ_HEAD(,cctl_lun_nv) attr_list;
+ STAILQ_ENTRY(cctl_lun) links;
+};
+
+struct cctl_devlist_data {
+ int num_luns;
+ STAILQ_HEAD(,cctl_lun) lun_list;
+ struct cctl_lun *cur_lun;
+ int level;
+ struct sbuf *cur_sb[32];
+};
+
+static void
+cctl_start_element(void *user_data, const char *name, const char **attr)
+{
+ int i;
+ struct cctl_devlist_data *devlist;
+ struct cctl_lun *cur_lun;
+
+ devlist = (struct cctl_devlist_data *)user_data;
+ cur_lun = devlist->cur_lun;
+ devlist->level++;
+ if ((u_int)devlist->level > (sizeof(devlist->cur_sb) /
+ sizeof(devlist->cur_sb[0])))
+ errx(1, "%s: too many nesting levels, %zd max", __func__,
+ sizeof(devlist->cur_sb) / sizeof(devlist->cur_sb[0]));
+
+ devlist->cur_sb[devlist->level] = sbuf_new_auto();
+ if (devlist->cur_sb[devlist->level] == NULL)
+ err(1, "%s: Unable to allocate sbuf", __func__);
+
+ if (strcmp(name, "lun") == 0) {
+ if (cur_lun != NULL)
+ errx(1, "%s: improper lun element nesting", __func__);
+
+ cur_lun = calloc(1, sizeof(*cur_lun));
+ if (cur_lun == NULL)
+ err(1, "%s: cannot allocate %zd bytes", __func__,
+ sizeof(*cur_lun));
+
+ devlist->num_luns++;
+ devlist->cur_lun = cur_lun;
+
+ STAILQ_INIT(&cur_lun->attr_list);
+ STAILQ_INSERT_TAIL(&devlist->lun_list, cur_lun, links);
+
+ for (i = 0; attr[i] != NULL; i += 2) {
+ if (strcmp(attr[i], "id") == 0) {
+ cur_lun->lun_id = strtoull(attr[i+1], NULL, 0);
+ } else {
+ errx(1, "%s: invalid LUN attribute %s = %s",
+ __func__, attr[i], attr[i+1]);
+ }
+ }
+ }
+}
+
+static void
+cctl_end_element(void *user_data, const char *name)
+{
+ struct cctl_devlist_data *devlist;
+ struct cctl_lun *cur_lun;
+ char *str;
+
+ devlist = (struct cctl_devlist_data *)user_data;
+ cur_lun = devlist->cur_lun;
+
+ if ((cur_lun == NULL)
+ && (strcmp(name, "ctllunlist") != 0))
+ errx(1, "%s: cur_lun == NULL! (name = %s)", __func__, name);
+
+ if (devlist->cur_sb[devlist->level] == NULL)
+ errx(1, "%s: no valid sbuf at level %d (name %s)", __func__,
+ devlist->level, name);
+
+ sbuf_finish(devlist->cur_sb[devlist->level]);
+ str = strdup(sbuf_data(devlist->cur_sb[devlist->level]));
+ if (str == NULL)
+ err(1, "%s can't allocate %zd bytes for string", __func__,
+ sbuf_len(devlist->cur_sb[devlist->level]));
+
+ if (strlen(str) == 0) {
+ free(str);
+ str = NULL;
+ }
+
+ sbuf_delete(devlist->cur_sb[devlist->level]);
+ devlist->cur_sb[devlist->level] = NULL;
+ devlist->level--;
+
+ if (strcmp(name, "backend_type") == 0) {
+ cur_lun->backend_type = str;
+ str = NULL;
+ } else if (strcmp(name, "size") == 0) {
+ cur_lun->size_blocks = strtoull(str, NULL, 0);
+ } else if (strcmp(name, "blocksize") == 0) {
+ cur_lun->blocksize = strtoul(str, NULL, 0);
+ } else if (strcmp(name, "serial_number") == 0) {
+ cur_lun->serial_number = str;
+ str = NULL;
+ } else if (strcmp(name, "device_id") == 0) {
+ cur_lun->device_id = str;
+ str = NULL;
+ } else if (strcmp(name, "lun") == 0) {
+ devlist->cur_lun = NULL;
+ } else if (strcmp(name, "ctllunlist") == 0) {
+
+ } else {
+ struct cctl_lun_nv *nv;
+
+ nv = calloc(1, sizeof(*nv));
+ if (nv == NULL)
+ err(1, "%s: can't allocate %zd bytes for nv pair",
+ __func__, sizeof(*nv));
+
+ nv->name = strdup(name);
+ if (nv->name == NULL)
+ err(1, "%s: can't allocated %zd bytes for string",
+ __func__, strlen(name));
+
+ nv->value = str;
+ str = NULL;
+ STAILQ_INSERT_TAIL(&cur_lun->attr_list, nv, links);
+ }
+
+ free(str);
+}
+
+static void
+cctl_char_handler(void *user_data, const XML_Char *str, int len)
+{
+ struct cctl_devlist_data *devlist;
+
+ devlist = (struct cctl_devlist_data *)user_data;
+
+ sbuf_bcat(devlist->cur_sb[devlist->level], str, len);
+}
+
+static int
+cctl_devlist(int fd, int argc, char **argv, char *combinedopt)
+{
+ struct ctl_lun_list list;
+ struct cctl_devlist_data devlist;
+ struct cctl_lun *lun;
+ XML_Parser parser;
+ char *lun_str;
+ int lun_len;
+ int dump_xml = 0;
+ int retval, c;
+ char *backend = NULL;
+ int verbose = 0;
+
+ retval = 0;
+ lun_len = 4096;
+
+ bzero(&devlist, sizeof(devlist));
+ STAILQ_INIT(&devlist.lun_list);
+
+ while ((c = getopt(argc, argv, combinedopt)) != -1) {
+ switch (c) {
+ case 'b':
+ backend = strdup(optarg);
+ break;
+ case 'v':
+ verbose++;
+ break;
+ case 'x':
+ dump_xml = 1;
+ break;
+ default:
+ break;
+ }
+ }
+
+retry:
+ lun_str = malloc(lun_len);
+
+ bzero(&list, sizeof(list));
+ list.alloc_len = lun_len;
+ list.status = CTL_LUN_LIST_NONE;
+ list.lun_xml = lun_str;
+
+ if (ioctl(fd, CTL_LUN_LIST, &list) == -1) {
+ warn("%s: error issuing CTL_LUN_LIST ioctl", __func__);
+ retval = 1;
+ goto bailout;
+ }
+
+ if (list.status == CTL_LUN_LIST_ERROR) {
+ warnx("%s: error returned from CTL_LUN_LIST ioctl:\n%s",
+ __func__, list.error_str);
+ } else if (list.status == CTL_LUN_LIST_NEED_MORE_SPACE) {
+ lun_len = lun_len << 1;
+ goto retry;
+ }
+
+ if (dump_xml != 0) {
+ printf("%s", lun_str);
+ goto bailout;
+ }
+
+ parser = XML_ParserCreate(NULL);
+ if (parser == NULL) {
+ warn("%s: Unable to create XML parser", __func__);
+ retval = 1;
+ goto bailout;
+ }
+
+ XML_SetUserData(parser, &devlist);
+ XML_SetElementHandler(parser, cctl_start_element, cctl_end_element);
+ XML_SetCharacterDataHandler(parser, cctl_char_handler);
+
+ retval = XML_Parse(parser, lun_str, strlen(lun_str), 1);
+ XML_ParserFree(parser);
+ if (retval != 1) {
+ retval = 1;
+ goto bailout;
+ }
+
+ printf("LUN Backend %18s %4s %-16s %-16s\n", "Size (Blocks)", "BS",
+ "Serial Number", "Device ID");
+ STAILQ_FOREACH(lun, &devlist.lun_list, links) {
+ struct cctl_lun_nv *nv;
+
+ if ((backend != NULL)
+ && (strcmp(lun->backend_type, backend) != 0))
+ continue;
+
+ printf("%3ju %-8s %18ju %4u %-16s %-16s\n",
+ (uintmax_t)lun->lun_id,
+ lun->backend_type, (uintmax_t)lun->size_blocks,
+ lun->blocksize, lun->serial_number, lun->device_id);
+
+ if (verbose == 0)
+ continue;
+
+ STAILQ_FOREACH(nv, &lun->attr_list, links) {
+ printf(" %s=%s\n", nv->name, nv->value);
+ }
+ }
+bailout:
+ free(lun_str);
+
+ return (retval);
+}
+
+void
+usage(int error)
+{
+ fprintf(error ? stderr : stdout,
+"Usage:\n"
+"Primary commands:\n"
+" ctladm tur [dev_id][general options]\n"
+" ctladm inquiry [dev_id][general options]\n"
+" ctladm devid [dev_id][general options]\n"
+" ctladm reqsense [dev_id][general options]\n"
+" ctladm reportluns [dev_id][general options]\n"
+" ctladm read [dev_id][general options] <-l lba> <-d len>\n"
+" <-f file|-> <-b blocksize> [-c cdbsize][-N]\n"
+" ctladm write [dev_id][general options] <-l lba> <-d len>\n"
+" <-f file|-> <-b blocksize> [-c cdbsize][-N]\n"
+" ctladm readcap [dev_id][general options] [-c cdbsize]\n"
+" ctladm modesense [dev_id][general options] <-m page|-l> [-P pc]\n"
+" [-d] [-S subpage] [-c cdbsize]\n"
+" ctladm prin [dev_id][general options] <-a action>\n"
+" ctladm prout [dev_id][general options] <-a action>\n"
+" <-r restype] [-k key] [-s sa_key]\n"
+" ctladm rtpg [dev_id][general options]\n"
+" ctladm start [dev_id][general options] [-i] [-o]\n"
+" ctladm stop [dev_id][general options] [-i] [-o]\n"
+" ctladm synccache [dev_id][general options] [-l lba]\n"
+" [-b blockcount] [-r] [-i] [-c cdbsize]\n"
+" ctladm create <-b backend> [-B blocksize] [-d device_id]\n"
+" [-l lun_id] [-o name=value] [-s size_bytes]\n"
+" [-S serial_num] [-t dev_type]\n"
+" ctladm remove <-b backend> <-l lun_id> [-o name=value]\n"
+" ctladm devlist [-b][-v][-x]\n"
+" ctladm shutdown\n"
+" ctladm startup\n"
+" ctladm hardstop\n"
+" ctladm hardstart\n"
+" ctladm lunlist\n"
+" ctladm bbrread [dev_id] <-l lba> <-d datalen>\n"
+" ctladm delay [dev_id] <-l datamove|done> [-T oneshot|cont]\n"
+" [-t secs]\n"
+" ctladm realsync <on|off|query>\n"
+" ctladm setsync [dev_id] <-i interval>\n"
+" ctladm getsync [dev_id]\n"
+" ctladm inject [dev_id] <-i action> <-p pattern> [-r lba,len]\n"
+" [-s len fmt [args]] [-c] [-d delete_id]\n"
+" ctladm port <-l | -o <on|off> | [-w wwnn][-W wwpn]>\n"
+" [-p targ_port] [-t port_type] [-q] [-x]\n"
+" ctladm dumpooa\n"
+" ctladm dumpstructs\n"
+" ctladm help\n"
+"General Options:\n"
+"-I intiator_id : defaults to 7, used to change the initiator id\n"
+"-C retries : specify the number of times to retry this command\n"
+"-D devicename : specify the device to operate on\n"
+" : (default is %s)\n"
+"read/write options:\n"
+"-l lba : logical block address\n"
+"-d len : read/write length, in blocks\n"
+"-f file|- : write/read data to/from file or stdout/stdin\n"
+"-b blocksize : block size, in bytes\n"
+"-c cdbsize : specify minimum cdb size: 6, 10, 12 or 16\n"
+"-N : do not copy data to/from userland\n"
+"readcapacity options:\n"
+"-c cdbsize : specify minimum cdb size: 10 or 16\n"
+"modesense options:\n"
+"-m page : specify the mode page to view\n"
+"-l : request a list of supported pages\n"
+"-P pc : specify the page control value: 0-3 (current,\n"
+" changeable, default, saved, respectively)\n"
+"-d : disable block descriptors for mode sense\n"
+"-S subpage : specify a subpage\n"
+"-c cdbsize : specify minimum cdb size: 6 or 10\n"
+"persistent reserve in options:\n"
+"-a action : specify the action value: 0-2 (read key, read\n"
+" reservation, read capabilities, respectively)\n"
+"persistent reserve out options:\n"
+"-a action : specify the action value: 0-5 (register, reserve,\n"
+" release, clear, preempt, register and ignore)\n"
+"-k key : key value\n"
+"-s sa_key : service action value\n"
+"-r restype : specify the reservation type: 0-5(wr ex, ex ac,\n"
+" wr ex ro, ex ac ro, wr ex ar, ex ac ar)\n"
+"start/stop options:\n"
+"-i : set the immediate bit (CTL does not support this)\n"
+"-o : set the on/offline bit\n"
+"synccache options:\n"
+"-l lba : set the starting LBA\n"
+"-b blockcount : set the length to sync in blocks\n"
+"-r : set the relative addressing bit\n"
+"-i : set the immediate bit\n"
+"-c cdbsize : specify minimum cdb size: 10 or 16\n"
+"create options:\n"
+"-b backend : backend name (\"block\", \"ramdisk\", etc.)\n"
+"-B blocksize : LUN blocksize in bytes (some backends)\n"
+"-d device_id : SCSI VPD page 0x83 ID\n"
+"-l lun_id : requested LUN number\n"
+"-o name=value : backend-specific options, multiple allowed\n"
+"-s size_bytes : LUN size in bytes (some backends)\n"
+"-S serial_num : SCSI VPD page 0x80 serial number\n"
+"-t dev_type : SCSI device type (0=disk, 3=processor)\n"
+"remove options:\n"
+"-b backend : backend name (\"block\", \"ramdisk\", etc.)\n"
+"-l lun_id : LUN number to delete\n"
+"-o name=value : backend-specific options, multiple allowed\n"
+"devlist options:\n"
+"-b backend : list devices from specified backend only\n"
+"-v : be verbose, show backend attributes\n"
+"-x : dump raw XML\n"
+"delay options:\n"
+"-l datamove|done : delay command at datamove or done phase\n"
+"-T oneshot : delay one command, then resume normal completion\n"
+"-T cont : delay all commands\n"
+"-t secs : number of seconds to delay\n"
+"inject options:\n"
+"-i error_action : action to perform\n"
+"-p pattern : command pattern to look for\n"
+"-r lba,len : LBA range for pattern\n"
+"-s len fmt [args] : sense data for custom sense action\n"
+"-c : continuous operation\n"
+"-d delete_id : error id to delete\n"
+"port options:\n"
+"-l : list frontend ports\n"
+"-o on|off : turn frontend ports on or off\n"
+"-w wwnn : set WWNN for one frontend\n"
+"-W wwpn : set WWPN for one frontend\n"
+"-t port_type : specify fc, scsi, ioctl, internal frontend type\n"
+"-p targ_port : specify target port number\n"
+"-q : omit header in list output\n"
+"-x : output port list in XML format\n"
+"bbrread options:\n"
+"-l lba : starting LBA\n"
+"-d datalen : length, in bytes, to read\n",
+CTL_DEFAULT_DEV);
+}
+
+int
+main(int argc, char **argv)
+{
+ int option_index, c;
+ ctladm_cmdfunction command;
+ ctladm_cmdargs cmdargs;
+ ctladm_optret optreturn;
+ char *device;
+ const char *mainopt = "C:D:I:";
+ const char *subopt = NULL;
+ char combinedopt[256];
+ int target, lun;
+ int optstart = 2;
+ int retval, fd;
+ int retries, timeout;
+ int initid;
+
+ option_index = 0;
+ retval = 0;
+ cmdargs = CTLADM_ARG_NONE;
+ command = CTLADM_CMD_HELP;
+ device = NULL;
+ fd = -1;
+ retries = 0;
+ target = 0;
+ lun = 0;
+ timeout = 0;
+ initid = 7;
+
+ if (argc < 2) {
+ usage(1);
+ retval = 1;
+ goto bailout;
+ }
+
+ /*
+ * Get the base option.
+ */
+ optreturn = getoption(option_table,argv[1], &command, &cmdargs,&subopt);
+
+ if (optreturn == CC_OR_AMBIGUOUS) {
+ warnx("ambiguous option %s", argv[1]);
+ usage(0);
+ exit(1);
+ } else if (optreturn == CC_OR_NOT_FOUND) {
+ warnx("option %s not found", argv[1]);
+ usage(0);
+ exit(1);
+ }
+
+ if (cmdargs & CTLADM_ARG_NEED_TL) {
+ if ((argc < 3)
+ || (!isdigit(argv[2][0]))) {
+ warnx("option %s requires a target:lun argument",
+ argv[1]);
+ usage(0);
+ exit(1);
+ }
+ retval = cctl_parse_tl(argv[2], &target, &lun);
+ if (retval != 0)
+ errx(1, "invalid target:lun argument %s", argv[2]);
+
+ cmdargs |= CTLADM_ARG_TARG_LUN;
+ optstart++;
+ }
+
+ /*
+ * Ahh, getopt(3) is a pain.
+ *
+ * This is a gross hack. There really aren't many other good
+ * options (excuse the pun) for parsing options in a situation like
+ * this. getopt is kinda braindead, so you end up having to run
+ * through the options twice, and give each invocation of getopt
+ * the option string for the other invocation.
+ *
+ * You would think that you could just have two groups of options.
+ * The first group would get parsed by the first invocation of
+ * getopt, and the second group would get parsed by the second
+ * invocation of getopt. It doesn't quite work out that way. When
+ * the first invocation of getopt finishes, it leaves optind pointing
+ * to the argument _after_ the first argument in the second group.
+ * So when the second invocation of getopt comes around, it doesn't
+ * recognize the first argument it gets and then bails out.
+ *
+ * A nice alternative would be to have a flag for getopt that says
+ * "just keep parsing arguments even when you encounter an unknown
+ * argument", but there isn't one. So there's no real clean way to
+ * easily parse two sets of arguments without having one invocation
+ * of getopt know about the other.
+ *
+ * Without this hack, the first invocation of getopt would work as
+ * long as the generic arguments are first, but the second invocation
+ * (in the subfunction) would fail in one of two ways. In the case
+ * where you don't set optreset, it would fail because optind may be
+ * pointing to the argument after the one it should be pointing at.
+ * In the case where you do set optreset, and reset optind, it would
+ * fail because getopt would run into the first set of options, which
+ * it doesn't understand.
+ *
+ * All of this would "sort of" work if you could somehow figure out
+ * whether optind had been incremented one option too far. The
+ * mechanics of that, however, are more daunting than just giving
+ * both invocations all of the expect options for either invocation.
+ *
+ * Needless to say, I wouldn't mind if someone invented a better
+ * (non-GPL!) command line parsing interface than getopt. I
+ * wouldn't mind if someone added more knobs to getopt to make it
+ * work better. Who knows, I may talk myself into doing it someday,
+ * if the standards weenies let me. As it is, it just leads to
+ * hackery like this and causes people to avoid it in some cases.
+ *
+ * KDM, September 8th, 1998
+ */
+ if (subopt != NULL)
+ sprintf(combinedopt, "%s%s", mainopt, subopt);
+ else
+ sprintf(combinedopt, "%s", mainopt);
+
+ /*
+ * Start getopt processing at argv[2/3], since we've already
+ * accepted argv[1..2] as the command name, and as a possible
+ * device name.
+ */
+ optind = optstart;
+
+ /*
+ * Now we run through the argument list looking for generic
+ * options, and ignoring options that possibly belong to
+ * subfunctions.
+ */
+ while ((c = getopt(argc, argv, combinedopt))!= -1){
+ switch (c) {
+ case 'C':
+ cmdargs |= CTLADM_ARG_RETRIES;
+ retries = strtol(optarg, NULL, 0);
+ break;
+ case 'D':
+ device = strdup(optarg);
+ cmdargs |= CTLADM_ARG_DEVICE;
+ break;
+ case 'I':
+ cmdargs |= CTLADM_ARG_INITIATOR;
+ initid = strtol(optarg, NULL, 0);
+ break;
+ default:
+ break;
+ }
+ }
+
+ if ((cmdargs & CTLADM_ARG_INITIATOR) == 0)
+ initid = 7;
+
+ optind = optstart;
+ optreset = 1;
+
+ /*
+ * Default to opening the CTL device for now.
+ */
+ if (((cmdargs & CTLADM_ARG_DEVICE) == 0)
+ && (command != CTLADM_CMD_HELP)) {
+ device = strdup(CTL_DEFAULT_DEV);
+ cmdargs |= CTLADM_ARG_DEVICE;
+ }
+
+ if ((cmdargs & CTLADM_ARG_DEVICE)
+ && (command != CTLADM_CMD_HELP)) {
+ fd = open(device, O_RDWR);
+ if (fd == -1) {
+ fprintf(stderr, "%s: error opening %s: %s\n",
+ argv[0], device, strerror(errno));
+ retval = 1;
+ goto bailout;
+ }
+ } else if ((command != CTLADM_CMD_HELP)
+ && ((cmdargs & CTLADM_ARG_DEVICE) == 0)) {
+ fprintf(stderr, "%s: you must specify a device with the "
+ "--device argument for this command\n", argv[0]);
+ command = CTLADM_CMD_HELP;
+ retval = 1;
+ }
+
+ switch (command) {
+ case CTLADM_CMD_TUR:
+ retval = cctl_tur(fd, target, lun, initid, retries);
+ break;
+ case CTLADM_CMD_INQUIRY:
+ retval = cctl_inquiry(fd, target, lun, initid, retries);
+ break;
+ case CTLADM_CMD_REQ_SENSE:
+ retval = cctl_req_sense(fd, target, lun, initid, retries);
+ break;
+ case CTLADM_CMD_REPORT_LUNS:
+ retval = cctl_report_luns(fd, target, lun, initid, retries);
+ break;
+ case CTLADM_CMD_CREATE:
+ retval = cctl_create_lun(fd, argc, argv, combinedopt);
+ break;
+ case CTLADM_CMD_RM:
+ retval = cctl_rm_lun(fd, argc, argv, combinedopt);
+ break;
+ case CTLADM_CMD_DEVLIST:
+ retval = cctl_devlist(fd, argc, argv, combinedopt);
+ break;
+ case CTLADM_CMD_READ:
+ case CTLADM_CMD_WRITE:
+ retval = cctl_read_write(fd, target, lun, initid, retries,
+ argc, argv, combinedopt, command);
+ break;
+ case CTLADM_CMD_PORT:
+ retval = cctl_port(fd, argc, argv, combinedopt);
+ break;
+ case CTLADM_CMD_READCAPACITY:
+ retval = cctl_read_capacity(fd, target, lun, initid, retries,
+ argc, argv, combinedopt);
+ break;
+ case CTLADM_CMD_MODESENSE:
+ retval = cctl_mode_sense(fd, target, lun, initid, retries,
+ argc, argv, combinedopt);
+ break;
+ case CTLADM_CMD_START:
+ case CTLADM_CMD_STOP:
+ retval = cctl_start_stop(fd, target, lun, initid, retries,
+ (command == CTLADM_CMD_START) ? 1 : 0,
+ argc, argv, combinedopt);
+ break;
+ case CTLADM_CMD_SYNC_CACHE:
+ retval = cctl_sync_cache(fd, target, lun, initid, retries,
+ argc, argv, combinedopt);
+ break;
+ case CTLADM_CMD_SHUTDOWN:
+ case CTLADM_CMD_STARTUP:
+ retval = cctl_startup_shutdown(fd, target, lun, initid,
+ command);
+ break;
+ case CTLADM_CMD_HARDSTOP:
+ case CTLADM_CMD_HARDSTART:
+ retval = cctl_hardstopstart(fd, command);
+ break;
+ case CTLADM_CMD_BBRREAD:
+ retval = cctl_bbrread(fd, target, lun, initid, argc, argv,
+ combinedopt);
+ break;
+ case CTLADM_CMD_LUNLIST:
+ retval = cctl_lunlist(fd);
+ break;
+ case CTLADM_CMD_DELAY:
+ retval = cctl_delay(fd, target, lun, argc, argv, combinedopt);
+ break;
+ case CTLADM_CMD_REALSYNC:
+ retval = cctl_realsync(fd, argc, argv);
+ break;
+ case CTLADM_CMD_SETSYNC:
+ case CTLADM_CMD_GETSYNC:
+ retval = cctl_getsetsync(fd, target, lun, command,
+ argc, argv, combinedopt);
+ break;
+ case CTLADM_CMD_ERR_INJECT:
+ retval = cctl_error_inject(fd, target, lun, argc, argv,
+ combinedopt);
+ break;
+ case CTLADM_CMD_DUMPOOA:
+ retval = cctl_dump_ooa(fd, argc, argv);
+ break;
+ case CTLADM_CMD_DUMPSTRUCTS:
+ retval = cctl_dump_structs(fd, cmdargs);
+ break;
+ case CTLADM_CMD_PRES_IN:
+ retval = cctl_persistent_reserve_in(fd, target, lun, initid,
+ argc, argv, combinedopt,
+ retries);
+ break;
+ case CTLADM_CMD_PRES_OUT:
+ retval = cctl_persistent_reserve_out(fd, target, lun, initid,
+ argc, argv, combinedopt,
+ retries);
+ break;
+ case CTLADM_CMD_INQ_VPD_DEVID:
+ retval = cctl_inquiry_vpd_devid(fd, target, lun, initid);
+ break;
+ case CTLADM_CMD_RTPG:
+ retval = cctl_report_target_port_group(fd, target, lun, initid);
+ break;
+ case CTLADM_CMD_HELP:
+ default:
+ usage(retval);
+ break;
+ }
+bailout:
+
+ if (fd != -1)
+ close(fd);
+
+ exit (retval);
+}
+
+/*
+ * vim: ts=8
+ */
diff --git a/usr.sbin/ctladm/ctladm.h b/usr.sbin/ctladm/ctladm.h
new file mode 100644
index 0000000..b2e9f12
--- /dev/null
+++ b/usr.sbin/ctladm/ctladm.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 1998 Kenneth D. Merry.
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ * $Id: //depot/users/kenm/FreeBSD-test2/usr.sbin/ctladm/ctladm.h#1 $
+ */
+
+#ifndef _CTLADM_H
+#define _CTLADM_H
+
+/*
+ * get_hook: Structure for evaluating args in a callback.
+ */
+struct get_hook
+{
+ int argc;
+ char **argv;
+ int got;
+};
+
+char *cget(void *hook, char *name);
+int iget(void *hook, char *name);
+void arg_put(void *hook, int letter, void *arg, int count, char *name);
+void usage(int error);
+
+#endif /* _CTLADM_H */
diff --git a/usr.sbin/ctladm/util.c b/usr.sbin/ctladm/util.c
new file mode 100644
index 0000000..df13357
--- /dev/null
+++ b/usr.sbin/ctladm/util.c
@@ -0,0 +1,156 @@
+/*
+ * Written By Julian ELischer
+ * Copyright julian Elischer 1993.
+ * Permission is granted to use or redistribute this file in any way as long
+ * as this notice remains. Julian Elischer does not guarantee that this file
+ * is totally correct for any given task and users of this file must
+ * accept responsibility for any damage that occurs from the application of this
+ * file.
+ *
+ * (julian@tfs.com julian@dialix.oz.au)
+ *
+ * User SCSI hooks added by Peter Dufault:
+ *
+ * Copyright (c) 1994 HD Associates
+ * (contact: dufault@hda.com)
+ * 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. The name of HD Associates
+ * may not be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY HD ASSOCIATES ``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 HD ASSOCIATES 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.
+ */
+/*
+ * Taken from the original scsi(8) program.
+ * from: scsi.c,v 1.17 1998/01/12 07:57:57 charnier Exp $";
+ */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/stdint.h>
+#include <sys/types.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include <camlib.h>
+#include "ctladm.h"
+
+int verbose;
+
+/* iget: Integer argument callback
+ */
+int
+iget(void *hook, char *name)
+{
+ struct get_hook *h = (struct get_hook *)hook;
+ int arg;
+
+ if (h->got >= h->argc)
+ {
+ fprintf(stderr, "Expecting an integer argument.\n");
+ usage(0);
+ exit(1);
+ }
+ arg = strtol(h->argv[h->got], 0, 0);
+ h->got++;
+
+ if (verbose && name && *name)
+ printf("%s: %d\n", name, arg);
+
+ return arg;
+}
+
+/* cget: char * argument callback
+ */
+char *
+cget(void *hook, char *name)
+{
+ struct get_hook *h = (struct get_hook *)hook;
+ char *arg;
+
+ if (h->got >= h->argc)
+ {
+ fprintf(stderr, "Expecting a character pointer argument.\n");
+ usage(0);
+ exit(1);
+ }
+ arg = h->argv[h->got];
+ h->got++;
+
+ if (verbose && name)
+ printf("cget: %s: %s", name, arg);
+
+ return arg;
+}
+
+/* arg_put: "put argument" callback
+ */
+void
+arg_put(void *hook __unused, int letter, void *arg, int count, char *name)
+{
+ if (verbose && name && *name)
+ printf("%s: ", name);
+
+ switch(letter)
+ {
+ case 'i':
+ case 'b':
+ printf("%jd ", (intmax_t)(intptr_t)arg);
+ break;
+
+ case 'c':
+ case 'z':
+ {
+ char *p;
+
+ p = malloc(count + 1);
+ if (p == NULL) {
+ fprintf(stderr, "can't malloc memory for p\n");
+ exit(1);
+ }
+
+ bzero(p, count +1);
+ strncpy(p, (char *)arg, count);
+ if (letter == 'z')
+ {
+ int i;
+ for (i = count - 1; i >= 0; i--)
+ if (p[i] == ' ')
+ p[i] = 0;
+ else
+ break;
+ }
+ printf("%s ", p);
+
+ free(p);
+ }
+
+ break;
+
+ default:
+ printf("Unknown format letter: '%c'\n", letter);
+ }
+ if (verbose)
+ putchar('\n');
+}
diff --git a/usr.sbin/ctm/ctm_dequeue/ctm_dequeue.c b/usr.sbin/ctm/ctm_dequeue/ctm_dequeue.c
index 783fd3f..2dd6e86 100644
--- a/usr.sbin/ctm/ctm_dequeue/ctm_dequeue.c
+++ b/usr.sbin/ctm/ctm_dequeue/ctm_dequeue.c
@@ -143,7 +143,7 @@ main(int argc, char **argv)
*/
npieces = atoi(&ftsent->fts_name[ftsent->fts_namelen-3]);
piece = atoi(&ftsent->fts_name[ftsent->fts_namelen-7]);
- err("%.*s %d/%d sent", ftsent->fts_namelen-8, ftsent->fts_name,
+ err("%.*s %d/%d sent", (int)(ftsent->fts_namelen-8), ftsent->fts_name,
piece, npieces);
if (chunk++ == num_to_send)
diff --git a/usr.sbin/daemon/daemon.8 b/usr.sbin/daemon/daemon.8
index bdebd83..7dde24b 100644
--- a/usr.sbin/daemon/daemon.8
+++ b/usr.sbin/daemon/daemon.8
@@ -59,6 +59,10 @@ Write the ID of the created process into the
using the
.Xr pidfile 3
functionality.
+If the
+.Fl u
+option is used, the directory to contain the pidfile must be writable
+by the specified user.
Note, that the file will be created shortly before the process is
actually executed, and will remain after the process exits (although
it will be removed if the execution fails).
diff --git a/usr.sbin/edquota/edquota.c b/usr.sbin/edquota/edquota.c
index 69ea497..0957011 100644
--- a/usr.sbin/edquota/edquota.c
+++ b/usr.sbin/edquota/edquota.c
@@ -426,7 +426,7 @@ putprivs(long id, struct quotause *quplist)
}
/*
- * Take a list of priviledges and get it edited.
+ * Take a list of privileges and get it edited.
*/
int
editit(char *tmpf)
diff --git a/usr.sbin/faithd/prefix.c b/usr.sbin/faithd/prefix.c
index 6a3f66b..bdb763a 100644
--- a/usr.sbin/faithd/prefix.c
+++ b/usr.sbin/faithd/prefix.c
@@ -63,7 +63,6 @@ prefix_set(const char *s, struct prefix *prefix, int slash)
char *p = NULL, *q, *r;
struct addrinfo hints, *res = NULL;
int max;
- char *a;
p = strdup(s);
if (!p)
@@ -88,14 +87,11 @@ prefix_set(const char *s, struct prefix *prefix, int slash)
switch (prefix->a.ss_family) {
case AF_INET:
max = 32;
- a = (char *)&((struct sockaddr_in *)&prefix->a)->sin_addr;
break;
case AF_INET6:
max = 128;
- a = (char *)&((struct sockaddr_in6 *)&prefix->a)->sin6_addr;
break;
default:
- a = NULL;
max = -1;
break;
}
diff --git a/usr.sbin/fwcontrol/fwcontrol.c b/usr.sbin/fwcontrol/fwcontrol.c
index 6aa365a..36efea1 100644
--- a/usr.sbin/fwcontrol/fwcontrol.c
+++ b/usr.sbin/fwcontrol/fwcontrol.c
@@ -152,8 +152,7 @@ str2node(int fd, const char *nodestr)
fweui2eui64(&data->dev[i].eui, &tmpeui);
if (memcmp(&eui, &tmpeui, sizeof(struct eui64)) == 0) {
node = data->dev[i].dst;
- if (data != NULL)
- free(data);
+ free(data);
goto gotnode;
}
}
@@ -1057,7 +1056,7 @@ main(int argc, char **argv)
show_topology_map(fd);
/*
- * Recieve data file from node "-R"
+ * Receive data file from node "-R"
*/
#define TAG (1<<6)
#define CHANNEL 63
diff --git a/usr.sbin/fwcontrol/fwmpegts.c b/usr.sbin/fwcontrol/fwmpegts.c
index d90b6dd..4f84789 100644
--- a/usr.sbin/fwcontrol/fwmpegts.c
+++ b/usr.sbin/fwcontrol/fwmpegts.c
@@ -94,7 +94,7 @@ MPEG-2 Transport Stream (MPEG TS) packet format according to IEC 61883:
N.b. that CRCs are removed by firewire layer!
-The following fiels are fixed for IEEE-1394:
+The following fields are fixed for IEEE-1394:
tag = 01b
tcode = 1010b
The length is payload length, i.e. includes CIP header and data size.
diff --git a/usr.sbin/i2c/i2c.c b/usr.sbin/i2c/i2c.c
index c0b3663..3a61aa5 100644
--- a/usr.sbin/i2c/i2c.c
+++ b/usr.sbin/i2c/i2c.c
@@ -360,7 +360,7 @@ err1:
fprintf(stderr, "error sending stop condtion\n");
err2:
if (err_msg)
- fprintf(stderr, err_msg);
+ fprintf(stderr, "%s", err_msg);
close(fd);
return (1);
@@ -453,7 +453,7 @@ err1:
fprintf(stderr, "error sending stop condtion\n");
err2:
if (err_msg)
- fprintf(stderr, err_msg);
+ fprintf(stderr, "%s", err_msg);
close(fd);
return (1);
@@ -464,7 +464,7 @@ main(int argc, char** argv)
{
struct iiccmd cmd;
struct options i2c_opt;
- char *dev, *skip_addr, *err_msg, *i2c_buf;
+ char *dev, *skip_addr, *i2c_buf;
int error, chunk_size, i, j, ch;
errno = 0;
@@ -474,7 +474,6 @@ main(int argc, char** argv)
chunk_size = 16;
dev = I2C_DEV;
- err_msg = NULL;
/* Default values */
i2c_opt.addr_set = 0;
diff --git a/usr.sbin/ifmcstat/ifmcstat.c b/usr.sbin/ifmcstat/ifmcstat.c
index 5ee4328..139058c 100644
--- a/usr.sbin/ifmcstat/ifmcstat.c
+++ b/usr.sbin/ifmcstat/ifmcstat.c
@@ -888,7 +888,7 @@ out_free:
/*
* Retrieve MLD per-group source filter mode and lists via sysctl.
*
- * Note: The 128-bit IPv6 group addres needs to be segmented into
+ * Note: The 128-bit IPv6 group address needs to be segmented into
* 32-bit pieces for marshaling to sysctl. So the MIB name ends
* up looking like this:
* a.b.c.d.e.ifindex.g[0].g[1].g[2].g[3]
diff --git a/usr.sbin/inetd/builtins.c b/usr.sbin/inetd/builtins.c
index ad7a82e..974e54f 100644
--- a/usr.sbin/inetd/builtins.c
+++ b/usr.sbin/inetd/builtins.c
@@ -745,7 +745,7 @@ machtime_stream(int s, struct servtab *sep __unused)
#define MAX_SERV_LEN (256+2) /* 2 bytes for \r\n */
#define strwrite(fd, buf) (void) write(fd, buf, sizeof(buf)-1)
-static int /* # of characters upto \r,\n or \0 */
+static int /* # of characters up to \r,\n or \0 */
getline(int fd, char *buf, int len)
{
int count = 0, n;
diff --git a/usr.sbin/inetd/inetd.c b/usr.sbin/inetd/inetd.c
index 0a39fdf..7dc77b3 100644
--- a/usr.sbin/inetd/inetd.c
+++ b/usr.sbin/inetd/inetd.c
@@ -1764,7 +1764,7 @@ more:
sep->se_rpc_lowvers = 0;
memcpy(&sep->se_ctrladdr4, bind_sa4,
sizeof(sep->se_ctrladdr4));
- if ((versp = rindex(sep->se_service, '/'))) {
+ if ((versp = strrchr(sep->se_service, '/'))) {
*versp++ = '\0';
switch (sscanf(versp, "%u-%u",
&sep->se_rpc_lowvers,
@@ -1936,7 +1936,7 @@ more:
} else
sep->se_group = NULL;
sep->se_server = newstr(sskip(&cp));
- if ((sep->se_server_name = rindex(sep->se_server, '/')))
+ if ((sep->se_server_name = strrchr(sep->se_server, '/')))
sep->se_server_name++;
if (strcmp(sep->se_server, "internal") == 0) {
struct biltin *bi;
diff --git a/usr.sbin/iostat/iostat.c b/usr.sbin/iostat/iostat.c
index 87099d9..1c32f94 100644
--- a/usr.sbin/iostat/iostat.c
+++ b/usr.sbin/iostat/iostat.c
@@ -101,19 +101,20 @@
#include <sys/resource.h>
#include <sys/sysctl.h>
-#include <err.h>
#include <ctype.h>
+#include <devstat.h>
+#include <err.h>
#include <fcntl.h>
+#include <inttypes.h>
#include <kvm.h>
+#include <limits.h>
+#include <math.h>
#include <nlist.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <termios.h>
#include <unistd.h>
-#include <limits.h>
-#include <devstat.h>
-#include <math.h>
struct nlist namelist[] = {
#define X_TK_NIN 0
@@ -818,7 +819,7 @@ devstats(int perf_select, long double etime, int havelast)
mb_per_second_write > ((long double).0005)/1024 ||
busy_pct > 0.5) {
if (Iflag == 0)
- printf("%-8.8s %5.1Lf %5.1Lf %7.1Lf %7.1Lf %4qu %5.1Lf %3.0Lf ",
+ printf("%-8.8s %5.1Lf %5.1Lf %7.1Lf %7.1Lf %4" PRIu64 " %5.1Lf %3.0Lf ",
devname, transfers_per_second_read,
transfers_per_second_write,
mb_per_second_read * 1024,
@@ -826,7 +827,7 @@ devstats(int perf_select, long double etime, int havelast)
queue_len,
ms_per_transaction, busy_pct);
else
- printf("%-8.8s %5.1Lf %5.1Lf %7.1Lf %7.1Lf %4qu %5.1Lf %3.0Lf ",
+ printf("%-8.8s %5.1Lf %5.1Lf %7.1Lf %7.1Lf %4" PRIu64 " %5.1Lf %3.0Lf ",
devname,
(long double)total_transfers_read,
(long double)total_transfers_write,
@@ -863,7 +864,7 @@ devstats(int perf_select, long double etime, int havelast)
msdig,
ms_per_transaction);
else
- printf("%4.1qu%4.1qu%5.*Lf ",
+ printf("%4.1" PRIu64 "%4.1" PRIu64 "%5.*Lf ",
total_blocks,
total_transfers,
msdig,
@@ -878,7 +879,7 @@ devstats(int perf_select, long double etime, int havelast)
total_mb = total_bytes;
total_mb /= 1024 * 1024;
- printf(" %5.2Lf %3.1qu %5.2Lf ",
+ printf(" %5.2Lf %3.1" PRIu64 " %5.2Lf ",
kb_per_transfer,
total_transfers,
total_mb);
diff --git a/usr.sbin/ipfwpcap/ipfwpcap.c b/usr.sbin/ipfwpcap/ipfwpcap.c
index c7543ef..d579bd9 100644
--- a/usr.sbin/ipfwpcap/ipfwpcap.c
+++ b/usr.sbin/ipfwpcap/ipfwpcap.c
@@ -87,7 +87,7 @@ okay(int pn)
char *p, numbuf[80];
if (pidfile[0] == '\0') {
- p = rindex(prog, '/');
+ p = strrchr(prog, '/');
p = (p == NULL) ? prog : p + 1;
snprintf(pidfile, sizeof pidfile,
diff --git a/usr.sbin/jail/jail.c b/usr.sbin/jail/jail.c
index fc4f71c..69c5e53 100644
--- a/usr.sbin/jail/jail.c
+++ b/usr.sbin/jail/jail.c
@@ -508,6 +508,7 @@ static void
set_param(const char *name, char *value)
{
struct jailparam *param;
+ char path[PATH_MAX];
int i;
static int paramlistsize;
@@ -520,8 +521,13 @@ set_param(const char *name, char *value)
}
/* jail_set won't chdir along with its chroot, so do it here. */
- if (!strcmp(name, "path") && chdir(value) < 0)
- err(1, "chdir: %s", value);
+ if (!strcmp(name, "path")) {
+ /* resolve the path with realpath(3) */
+ if (realpath(value, path) != NULL)
+ value = path;
+ if (chdir(value) < 0)
+ err(1, "chdir: %s", value);
+ }
/* Check for repeat parameters */
for (i = 0; i < nparams; i++)
diff --git a/usr.sbin/kbdcontrol/kbdcontrol.c b/usr.sbin/kbdcontrol/kbdcontrol.c
index 280faa1..8c9bb81 100644
--- a/usr.sbin/kbdcontrol/kbdcontrol.c
+++ b/usr.sbin/kbdcontrol/kbdcontrol.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1994-1995 Søren Schmidt
+ * Copyright (c) 1994-1995 Søren Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -57,26 +57,26 @@ __FBSDID("$FreeBSD$");
#define SPECIAL 0x80000000
-char ctrl_names[32][4] = {
+static const char ctrl_names[32][4] = {
"nul", "soh", "stx", "etx", "eot", "enq", "ack", "bel",
"bs ", "ht ", "nl ", "vt ", "ff ", "cr ", "so ", "si ",
"dle", "dc1", "dc2", "dc3", "dc4", "nak", "syn", "etb",
"can", "em ", "sub", "esc", "fs ", "gs ", "rs ", "us "
};
-char acc_names[15][5] = {
+static const char acc_names[15][5] = {
"dgra", "dacu", "dcir", "dtil", "dmac", "dbre", "ddot",
"duml", "dsla", "drin", "dced", "dapo", "ddac", "dogo",
"dcar",
};
-char acc_names_u[15][5] = {
+static const char acc_names_u[15][5] = {
"DGRA", "DACU", "DCIR", "DTIL", "DMAC", "DBRE", "DDOT",
"DUML", "DSLA", "DRIN", "DCED", "DAPO", "DDAC", "DOGO",
"DCAR",
};
-char fkey_table[96][MAXFK] = {
+static const char fkey_table[96][MAXFK] = {
/* 01-04 */ "\033[M", "\033[N", "\033[O", "\033[P",
/* 05-08 */ "\033[Q", "\033[R", "\033[S", "\033[T",
/* 09-12 */ "\033[U", "\033[V", "\033[W", "\033[X",
@@ -103,44 +103,45 @@ char fkey_table[96][MAXFK] = {
/* 93-96 */ "" , "" , "" , "" ,
};
-const int delays[] = {250, 500, 750, 1000};
-const int repeats[] = { 34, 38, 42, 46, 50, 55, 59, 63,
- 68, 76, 84, 92, 100, 110, 118, 126,
- 136, 152, 168, 184, 200, 220, 236, 252,
- 272, 304, 336, 368, 400, 440, 472, 504};
-const int ndelays = (sizeof(delays) / sizeof(int));
-const int nrepeats = (sizeof(repeats) / sizeof(int));
-int hex = 0;
-int number;
-char letter;
-int token;
-
-void dump_accent_definition(char *name, accentmap_t *accentmap);
-void dump_entry(int value);
-void dump_key_definition(char *name, keymap_t *keymap);
-int get_accent_definition_line(accentmap_t *);
-int get_entry(void);
-int get_key_definition_line(keymap_t *);
-void load_keymap(char *opt, int dumponly);
-void load_default_functionkeys(void);
-char * nextarg(int ac, char **av, int *indp, int oc);
-char * mkfullname(const char *s1, const char *s2, const char *s3);
-void print_accent_definition_line(FILE *fp, int accent,
- struct acc_t *key);
-void print_entry(FILE *fp, int value);
-void print_key_definition_line(FILE *fp, int scancode,
- struct keyent_t *key);
-void print_keymap(void);
-void release_keyboard(void);
-void mux_keyboard(u_int op, char *kbd);
-void set_bell_values(char *opt);
-void set_functionkey(char *keynumstr, char *string);
-void set_keyboard(char *device);
-void set_keyrates(char *opt);
-void show_kbd_info(void);
-void usage(void) __dead2;
-
-char *
+static const int delays[] = {250, 500, 750, 1000};
+static const int repeats[] = { 34, 38, 42, 46, 50, 55, 59, 63,
+ 68, 76, 84, 92, 100, 110, 118, 126,
+ 136, 152, 168, 184, 200, 220, 236, 252,
+ 272, 304, 336, 368, 400, 440, 472, 504};
+static const int ndelays = (sizeof(delays) / sizeof(int));
+static const int nrepeats = (sizeof(repeats) / sizeof(int));
+static int hex = 0;
+static int token;
+
+int number;
+char letter;
+
+static void dump_accent_definition(char *name, accentmap_t *accentmap);
+static void dump_entry(int value);
+static void dump_key_definition(char *name, keymap_t *keymap);
+static int get_accent_definition_line(accentmap_t *);
+static int get_entry(void);
+static int get_key_definition_line(keymap_t *);
+static void load_keymap(char *opt, int dumponly);
+static void load_default_functionkeys(void);
+static char * nextarg(int ac, char **av, int *indp, int oc);
+static char * mkfullname(const char *s1, const char *s2, const char *s3);
+static void print_accent_definition_line(FILE *fp, int accent,
+ struct acc_t *key);
+static void print_entry(FILE *fp, int value);
+static void print_key_definition_line(FILE *fp, int scancode,
+ struct keyent_t *key);
+static void print_keymap(void);
+static void release_keyboard(void);
+static void mux_keyboard(u_int op, char *kbd);
+static void set_bell_values(char *opt);
+static void set_functionkey(char *keynumstr, char *string);
+static void set_keyboard(char *device);
+static void set_keyrates(char *opt);
+static void show_kbd_info(void);
+static void usage(void) __dead2;
+
+static char *
nextarg(int ac, char **av, int *indp, int oc)
{
if (*indp < ac)
@@ -150,7 +151,7 @@ nextarg(int ac, char **av, int *indp, int oc)
}
-char *
+static char *
mkfullname(const char *s1, const char *s2, const char *s3)
{
static char *buf = NULL;
@@ -177,7 +178,7 @@ mkfullname(const char *s1, const char *s2, const char *s3)
}
-int
+static int
get_entry(void)
{
switch ((token = yylex())) {
@@ -297,7 +298,7 @@ get_definition_line(FILE *fd, keymap_t *keymap, accentmap_t *accentmap)
return c;
}
-int
+static int
get_key_definition_line(keymap_t *map)
{
int i, def, scancode;
@@ -324,7 +325,7 @@ get_key_definition_line(keymap_t *map)
return (scancode + 1);
}
-int
+static int
get_accent_definition_line(accentmap_t *map)
{
int accent;
@@ -385,7 +386,7 @@ get_accent_definition_line(accentmap_t *map)
return (accent + 1);
}
-void
+static void
print_entry(FILE *fp, int value)
{
int val = value & ~SPECIAL;
@@ -509,7 +510,7 @@ print_entry(FILE *fp, int value)
}
}
-void
+static void
print_key_definition_line(FILE *fp, int scancode, struct keyent_t *key)
{
int i;
@@ -545,7 +546,7 @@ print_key_definition_line(FILE *fp, int scancode, struct keyent_t *key)
}
}
-void
+static void
print_accent_definition_line(FILE *fp, int accent, struct acc_t *key)
{
int c;
@@ -586,7 +587,7 @@ print_accent_definition_line(FILE *fp, int accent, struct acc_t *key)
fprintf(fp, "\n");
}
-void
+static void
dump_entry(int value)
{
if (value & SPECIAL) {
@@ -704,7 +705,7 @@ dump_entry(int value)
}
}
-void
+static void
dump_key_definition(char *name, keymap_t *keymap)
{
int i, j;
@@ -732,7 +733,7 @@ dump_key_definition(char *name, keymap_t *keymap)
printf("} };\n\n");
}
-void
+static void
dump_accent_definition(char *name, accentmap_t *accentmap)
{
int i, j;
@@ -776,7 +777,7 @@ dump_accent_definition(char *name, accentmap_t *accentmap)
printf("} };\n\n");
}
-void
+static void
load_keymap(char *opt, int dumponly)
{
keymap_t keymap;
@@ -835,7 +836,7 @@ load_keymap(char *opt, int dumponly)
}
}
-void
+static void
print_keymap(void)
{
keymap_t keymap;
@@ -861,7 +862,7 @@ print_keymap(void)
}
-void
+static void
load_default_functionkeys(void)
{
fkeyarg_t fkey;
@@ -876,7 +877,7 @@ load_default_functionkeys(void)
}
}
-void
+static void
set_functionkey(char *keynumstr, char *string)
{
fkeyarg_t fkey;
@@ -902,7 +903,7 @@ set_functionkey(char *keynumstr, char *string)
warn("setting function key");
}
-void
+static void
set_bell_values(char *opt)
{
int bell, duration, pitch;
@@ -942,7 +943,7 @@ badopt:
fprintf(stderr, "[=%d;%dB", pitch, duration);
}
-void
+static void
set_keyrates(char *opt)
{
int arg[2];
@@ -1011,7 +1012,7 @@ get_kbd_type_name(int type)
return "unknown";
}
-void
+static void
show_kbd_info(void)
{
keyboard_info_t info;
@@ -1026,7 +1027,7 @@ show_kbd_info(void)
get_kbd_type_name(info.kb_type), info.kb_type);
}
-void
+static void
set_keyboard(char *device)
{
keyboard_info_t info;
@@ -1060,7 +1061,7 @@ set_keyboard(char *device)
warn("unable to set keyboard");
}
-void
+static void
release_keyboard(void)
{
keyboard_info_t info;
@@ -1083,7 +1084,7 @@ release_keyboard(void)
warn("unable to release the keyboard");
}
-void
+static void
mux_keyboard(u_int op, char *kbd)
{
keyboard_info_t info;
@@ -1147,7 +1148,7 @@ mux_keyboard(u_int op, char *kbd)
warn("unable to (un)mux the keyboard");
}
-void
+static void
usage(void)
{
fprintf(stderr, "%s\n%s\n%s\n",
diff --git a/usr.sbin/kbdcontrol/lex.h b/usr.sbin/kbdcontrol/lex.h
index 17e10c2..3806dc7 100644
--- a/usr.sbin/kbdcontrol/lex.h
+++ b/usr.sbin/kbdcontrol/lex.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1994-1995 Søren Schmidt
+ * Copyright (c) 1994-1995 Søren Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/usr.sbin/kbdcontrol/lex.l b/usr.sbin/kbdcontrol/lex.l
index e9ca2bc..ea165ef 100644
--- a/usr.sbin/kbdcontrol/lex.l
+++ b/usr.sbin/kbdcontrol/lex.l
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1994-1995 Søren Schmidt
+ * Copyright (c) 1994-1995 Søren Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/usr.sbin/kbdmap/kbdmap.c b/usr.sbin/kbdmap/kbdmap.c
index 726652f..c6348a6 100644
--- a/usr.sbin/kbdmap/kbdmap.c
+++ b/usr.sbin/kbdmap/kbdmap.c
@@ -547,7 +547,7 @@ check_file(const char *keym)
}
/*
- * Read options from the relevent configuration file, then
+ * Read options from the relevant configuration file, then
* present to user.
*/
static void
diff --git a/usr.sbin/keyserv/crypt_server.c b/usr.sbin/keyserv/crypt_server.c
index 45f6f6e..b4c6036 100644
--- a/usr.sbin/keyserv/crypt_server.c
+++ b/usr.sbin/keyserv/crypt_server.c
@@ -223,8 +223,8 @@ des_crypt_1_svc(desargs *argp, struct svc_req *rqstp)
bcopy(argp->des_key, dparm.des_key, 8);
bcopy(argp->des_ivec, dparm.des_ivec, 8);
- dparm.des_mode = argp->des_mode;
- dparm.des_dir = argp->des_dir;
+ dparm.des_mode = (argp->des_mode == CBC_DES) ? CBC : ECB;
+ dparm.des_dir = (argp->des_dir == ENCRYPT_DES) ? ENCRYPT : DECRYPT;
#ifdef BROKEN_DES
dparm.UDES.UDES_buf = argp->desbuf.desbuf_val;
#endif
diff --git a/usr.sbin/keyserv/keyserv.c b/usr.sbin/keyserv/keyserv.c
index 04e4972..2366ba0 100644
--- a/usr.sbin/keyserv/keyserv.c
+++ b/usr.sbin/keyserv/keyserv.c
@@ -361,7 +361,7 @@ key_set_1_svc_prog(uid, key)
static keystatus status;
if (debugging) {
- (void) fprintf(stderr, "set(%ld, %.*s) = ", uid,
+ (void) fprintf(stderr, "set(%u, %.*s) = ", uid,
(int) sizeof (keybuf), key);
}
status = pk_setkey(uid, key);
@@ -380,7 +380,7 @@ key_encrypt_pk_2_svc_prog(uid, arg)
static cryptkeyres res;
if (debugging) {
- (void) fprintf(stderr, "encrypt(%ld, %s, %08x%08x) = ", uid,
+ (void) fprintf(stderr, "encrypt(%u, %s, %08x%08x) = ", uid,
arg->remotename, arg->deskey.key.high,
arg->deskey.key.low);
}
@@ -408,7 +408,7 @@ key_decrypt_pk_2_svc_prog(uid, arg)
static cryptkeyres res;
if (debugging) {
- (void) fprintf(stderr, "decrypt(%ld, %s, %08x%08x) = ", uid,
+ (void) fprintf(stderr, "decrypt(%u, %s, %08x%08x) = ", uid,
arg->remotename, arg->deskey.key.high,
arg->deskey.key.low);
}
@@ -460,7 +460,7 @@ key_net_get_2_svc_prog(uid, arg)
static key_netstres keynetname;
if (debugging)
- (void) fprintf(stderr, "net_get(%ld) = ", uid);
+ (void) fprintf(stderr, "net_get(%u) = ", uid);
keynetname.status = pk_netget(uid, &keynetname.key_netstres_u.knet);
if (debugging) {
@@ -489,8 +489,8 @@ key_get_conv_2_svc_prog(uid, arg)
static cryptkeyres res;
if (debugging)
- (void) fprintf(stderr, "get_conv(%ld, %.*s) = ", uid,
- (int)sizeof (arg), arg);
+ (void) fprintf(stderr, "get_conv(%u, %.*s) = ", uid,
+ (int)sizeof (keybuf), arg);
res.status = pk_get_conv_key(uid, arg, &res);
@@ -517,7 +517,7 @@ key_encrypt_1_svc_prog(uid, arg)
static cryptkeyres res;
if (debugging) {
- (void) fprintf(stderr, "encrypt(%ld, %s, %08x%08x) = ", uid,
+ (void) fprintf(stderr, "encrypt(%u, %s, %08x%08x) = ", uid,
arg->remotename, arg->deskey.key.high,
arg->deskey.key.low);
}
@@ -545,7 +545,7 @@ key_decrypt_1_svc_prog(uid, arg)
static cryptkeyres res;
if (debugging) {
- (void) fprintf(stderr, "decrypt(%ld, %s, %08x%08x) = ", uid,
+ (void) fprintf(stderr, "decrypt(%u, %s, %08x%08x) = ", uid,
arg->remotename, arg->deskey.key.high,
arg->deskey.key.low);
}
@@ -789,7 +789,7 @@ root_auth(trans, rqstp)
}
if (debugging)
- fprintf(stderr, "local_uid %ld\n", uid);
+ fprintf(stderr, "local_uid %u\n", uid);
if (uid == 0)
return (1);
if (rqstp->rq_cred.oa_flavor == AUTH_SYS) {
@@ -800,7 +800,7 @@ root_auth(trans, rqstp)
} else {
if (debugging)
fprintf(stderr,
- "local_uid %ld mismatches auth %ld\n", uid,
+ "local_uid %u mismatches auth %u\n", uid,
((uid_t) ((struct authunix_parms *)rqstp->rq_clntcred)->aup_uid));
return (0);
}
diff --git a/usr.sbin/kgmon/kgmon.c b/usr.sbin/kgmon/kgmon.c
index bdb2da2..d5cdf96 100644
--- a/usr.sbin/kgmon/kgmon.c
+++ b/usr.sbin/kgmon/kgmon.c
@@ -240,13 +240,13 @@ kern_readonly(mode)
if (pflag && (mode == GMON_PROF_HIRES || mode == GMON_PROF_ON))
(void)fprintf(stderr, "data may be inconsistent\n");
if (rflag)
- (void)fprintf(stderr, "-r supressed\n");
+ (void)fprintf(stderr, "-r suppressed\n");
if (Bflag)
- (void)fprintf(stderr, "-B supressed\n");
+ (void)fprintf(stderr, "-B suppressed\n");
if (bflag)
- (void)fprintf(stderr, "-b supressed\n");
+ (void)fprintf(stderr, "-b suppressed\n");
if (hflag)
- (void)fprintf(stderr, "-h supressed\n");
+ (void)fprintf(stderr, "-h suppressed\n");
rflag = Bflag = bflag = hflag = 0;
}
diff --git a/usr.sbin/kldxref/kldxref.8 b/usr.sbin/kldxref/kldxref.8
index a6174b6..a69af33 100644
--- a/usr.sbin/kldxref/kldxref.8
+++ b/usr.sbin/kldxref/kldxref.8
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2001 Boris Popov
-.\" Copyright (c) 2001 Dag-Erling Coïdan Smørgrav
+.\" Copyright (c) 2001 Dag-Erling Coïdan Smørgrav
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
diff --git a/usr.sbin/lpr/common_source/rmjob.c b/usr.sbin/lpr/common_source/rmjob.c
index 2a6b0e9..912a48f 100644
--- a/usr.sbin/lpr/common_source/rmjob.c
+++ b/usr.sbin/lpr/common_source/rmjob.c
@@ -78,7 +78,7 @@ void
rmjob(const char *printer)
{
register int i, nitems;
- int assasinated = 0;
+ int assassinated = 0;
struct dirent **files;
char *cp;
struct printer myprinter, *pp = &myprinter;
@@ -125,9 +125,9 @@ rmjob(const char *printer)
*/
if (lockchk(pp, pp->lock_file) && chk(current)) {
seteuid(euid);
- assasinated = kill(cur_daemon, SIGINT) == 0;
+ assassinated = kill(cur_daemon, SIGINT) == 0;
seteuid(uid);
- if (!assasinated)
+ if (!assassinated)
fatal(pp, "cannot kill printer daemon");
}
/*
@@ -140,7 +140,7 @@ rmjob(const char *printer)
/*
* Restart the printer daemon if it was killed
*/
- if (assasinated && !startdaemon(pp))
+ if (assassinated && !startdaemon(pp))
fatal(pp, "cannot restart printer daemon\n");
exit(0);
}
diff --git a/usr.sbin/lpr/filters/lpf.c b/usr.sbin/lpr/filters/lpf.c
index f88752a..b277d17 100644
--- a/usr.sbin/lpr/filters/lpf.c
+++ b/usr.sbin/lpr/filters/lpf.c
@@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$");
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
#define MAXWIDTH 132
#define MAXREP 10
@@ -115,7 +116,7 @@ main(int argc, char *argv[])
acctfile = cp;
}
- for (cp = buf[0], limit = buf[MAXREP]; cp < limit; *cp++ = ' ');
+ memset(buf, ' ', sizeof(buf));
done = 0;
while (!done) {
diff --git a/usr.sbin/lpr/lpc/cmds.c b/usr.sbin/lpr/lpc/cmds.c
index f8843f9..287825f 100644
--- a/usr.sbin/lpr/lpc/cmds.c
+++ b/usr.sbin/lpr/lpc/cmds.c
@@ -496,7 +496,7 @@ sortq(const void *a, const void *b)
fname_b = (*(const struct dirent * const *)b)->d_name;
/*
- * First separate filenames into cagatories. Catagories are
+ * First separate filenames into categories. Categories are
* legitimate `cf', `df', `rf' & `tf' filenames, and "other" - in
* that order. It is critical that the mapping be exactly the
* same for 'a' vs 'b', so define a macro for the job.
@@ -562,7 +562,7 @@ sortq(const void *a, const void *b)
/*
* We have two files which belong to the same job. Sort based
- * on the catagory of file (`c' before `d', etc).
+ * on the category of file (`c' before `d', etc).
*/
if (cat_a < cat_b) {
res = a_lt_b;
@@ -573,8 +573,8 @@ sortq(const void *a, const void *b)
}
/*
- * Two files in the same catagory for a single job. Sort based
- * on the sequence letter(s). (usually `A' thru `Z', etc).
+ * Two files in the same category for a single job. Sort based
+ * on the sequence letter(s). (usually `A' through `Z', etc).
*/
if (seq_a < seq_b) {
res = a_lt_b;
diff --git a/usr.sbin/lpr/lpc/lpc.c b/usr.sbin/lpr/lpc/lpc.c
index bd95c59..f9fb920 100644
--- a/usr.sbin/lpr/lpc/lpc.c
+++ b/usr.sbin/lpr/lpc/lpc.c
@@ -188,7 +188,7 @@ cmdscanner(void)
history(hist, &he, H_ENTER, bp);
} else {
- if (fgets(cmdline, MAX_CMDLINE, stdin) == 0)
+ if (fgets(cmdline, MAX_CMDLINE, stdin) == NULL)
quit(0, NULL);
if (cmdline[0] == 0 || cmdline[0] == '\n')
break;
diff --git a/usr.sbin/lpr/lpd/printjob.c b/usr.sbin/lpr/lpd/printjob.c
index 2bc211c..2407c3c 100644
--- a/usr.sbin/lpr/lpd/printjob.c
+++ b/usr.sbin/lpr/lpd/printjob.c
@@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$");
#include <fcntl.h>
#include <dirent.h>
#include <errno.h>
+#include <inttypes.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -603,7 +604,7 @@ pass2:
/*
* Print a file.
* Set up the chain [ PR [ | {IF, OF} ] ] or {IF, RF, TF, NF, DF, CF, VF}.
- * Return -1 if a non-recoverable error occured,
+ * Return -1 if a non-recoverable error occurred,
* 2 if the filter detected some errors (but printed the job anyway),
* 1 if we should try to reprint this job and
* 0 if all is well.
@@ -886,7 +887,7 @@ start:
/*
* Send the daemon control file (cf) and any data files.
- * Return -1 if a non-recoverable error occured, 1 if a recoverable error and
+ * Return -1 if a non-recoverable error occurred, 1 if a recoverable error and
* 0 if all is well.
*/
static int
@@ -1138,9 +1139,10 @@ sendagain:
copycnt++;
if (copycnt < 2)
- (void) sprintf(buf, "%c%qd %s\n", type, stb.st_size, file);
+ (void) sprintf(buf, "%c%" PRId64 " %s\n", type, stb.st_size,
+ file);
else
- (void) sprintf(buf, "%c%qd %s_c%d\n", type, stb.st_size,
+ (void) sprintf(buf, "%c%" PRId64 " %s_c%d\n", type, stb.st_size,
file, copycnt);
amt = strlen(buf);
for (i = 0; ; i++) {
diff --git a/usr.sbin/lpr/pac/pac.c b/usr.sbin/lpr/pac/pac.c
index 9cc9708..5fdd54f 100644
--- a/usr.sbin/lpr/pac/pac.c
+++ b/usr.sbin/lpr/pac/pac.c
@@ -203,7 +203,7 @@ usage(void)
* Read the entire accounting file, accumulating statistics
* for the users that we have in the hash table. If allflag
* is set, then just gather the facts on everyone.
- * Note that we must accomodate both the active and summary file
+ * Note that we must accommodate both the active and summary file
* formats here.
* Host names are ignored if the -m flag is present.
*/
diff --git a/usr.sbin/makefs/cd9660.c b/usr.sbin/makefs/cd9660.c
index b9e800d..5d207c7 100644
--- a/usr.sbin/makefs/cd9660.c
+++ b/usr.sbin/makefs/cd9660.c
@@ -623,10 +623,6 @@ static void
cd9660_finalize_PVD(void)
{
time_t tim;
- unsigned char *temp;
-
- /* Copy the root directory record */
- temp = (unsigned char *) &diskStructure.primaryDescriptor;
/* root should be a fixed size of 34 bytes since it has no name */
memcpy(diskStructure.primaryDescriptor.root_directory_record,
@@ -1053,7 +1049,7 @@ static cd9660node *
cd9660_rename_filename(cd9660node *iter, int num, int delete_chars)
{
int i = 0;
- int numbts, dot, semi, digit, digits, temp, powers, multiplier, count;
+ int numbts, digit, digits, temp, powers, count;
char *naming;
int maxlength;
char *tmp;
@@ -1075,7 +1071,6 @@ cd9660_rename_filename(cd9660node *iter, int num, int delete_chars)
powers = 1;
count = 0;
digits = 1;
- multiplier = 1;
while (((int)(i / powers) ) >= 10) {
digits++;
powers = powers * 10;
@@ -1090,15 +1085,9 @@ cd9660_rename_filename(cd9660node *iter, int num, int delete_chars)
}
*/
- dot = -1;
- semi = -1;
while (count < maxlength) {
- if (*naming == '.')
- dot = count;
- else if (*naming == ';') {
- semi = count;
+ if (*naming == ';')
break;
- }
naming++;
count++;
}
@@ -1529,7 +1518,6 @@ cd9660_generate_path_table(void)
cd9660node *last = dirNode;
int pathTableSize = 0; /* computed as we go */
int counter = 1; /* root gets a count of 0 */
- int parentRecNum = 0; /* root's parent is '0' */
TAILQ_HEAD(cd9660_pt_head, ptq_entry) pt_head;
TAILQ_INIT(&pt_head);
@@ -1559,10 +1547,6 @@ cd9660_generate_path_table(void)
}
last = dirNode;
- parentRecNum = 1;
- if (dirNode->parent != 0)
- parentRecNum = dirNode->parent->ptnumber;
-
/* Push children onto queue */
TAILQ_FOREACH(cn, &dirNode->cn_children, cn_next_child) {
/*
diff --git a/usr.sbin/makefs/cd9660/cd9660_eltorito.c b/usr.sbin/makefs/cd9660/cd9660_eltorito.c
index ca3dfd9..f25dae7 100644
--- a/usr.sbin/makefs/cd9660/cd9660_eltorito.c
+++ b/usr.sbin/makefs/cd9660/cd9660_eltorito.c
@@ -589,7 +589,7 @@ cd9660_write_boot(FILE *fd)
e->entry_type);
}
/*
- * It doesnt matter which one gets written
+ * It doesn't matter which one gets written
* since they are the same size
*/
fwrite(&(e->entry_data.VE), 1, 32, fd);
diff --git a/usr.sbin/makefs/cd9660/cd9660_write.c b/usr.sbin/makefs/cd9660/cd9660_write.c
index 4c2a24a..2db4ab3 100644
--- a/usr.sbin/makefs/cd9660/cd9660_write.c
+++ b/usr.sbin/makefs/cd9660/cd9660_write.c
@@ -305,10 +305,10 @@ cd9660_write_file(FILE *fd, cd9660node *writenode)
}
} else {
/*
- * Here is a new revelation that ECMA didnt explain
+ * Here is a new revelation that ECMA didn't explain
* (at least not well).
* ALL . and .. records store the name "\0" and "\1"
- * resepctively. So, for each directory, we have to
+ * respectively. So, for each directory, we have to
* make a new node.
*
* This is where it gets kinda messy, since we have to
diff --git a/usr.sbin/makefs/cd9660/iso9660_rrip.c b/usr.sbin/makefs/cd9660/iso9660_rrip.c
index 68de7cc..39e0acf 100644
--- a/usr.sbin/makefs/cd9660/iso9660_rrip.c
+++ b/usr.sbin/makefs/cd9660/iso9660_rrip.c
@@ -298,7 +298,7 @@ cd9660_susp_initialize_node(cd9660node *node)
* CE: is added for us where needed
* ST: not sure if it is even required, but if so, should be
* handled by the CE code
- * PD: isnt needed (though might be added for testing)
+ * PD: isn't needed (though might be added for testing)
* SP: is stored ONLY on the . record of the root directory
* ES: not sure
*/
diff --git a/usr.sbin/makefs/ffs.c b/usr.sbin/makefs/ffs.c
index 26843b6..cdbd2c3 100644
--- a/usr.sbin/makefs/ffs.c
+++ b/usr.sbin/makefs/ffs.c
@@ -145,7 +145,7 @@ static void *ffs_build_dinode2(struct ufs2_dinode *, dirbuf_t *, fsnode *,
int sectorsize; /* XXX: for buf.c::getblk() */
- /* publically visible functions */
+ /* publicly visible functions */
void
ffs_prep_opts(fsinfo_t *fsopts)
diff --git a/usr.sbin/makefs/ffs/ffs_extern.h b/usr.sbin/makefs/ffs/ffs_extern.h
index d95e69b..1c3442f5 100644
--- a/usr.sbin/makefs/ffs/ffs_extern.h
+++ b/usr.sbin/makefs/ffs/ffs_extern.h
@@ -35,6 +35,8 @@
#include "ffs/buf.h"
+struct inode;
+
/*
* Structure used to pass around logical block paths generated by
* ufs_getlbns and used by truncate and bmap code.
@@ -46,8 +48,7 @@ struct indir {
};
/* ffs.c */
-void panic(const char *, ...)
- __attribute__((__noreturn__,__format__(__printf__,1,2)));
+_Noreturn void panic(const char *, ...) __printflike(1, 2);
/* ffs_alloc.c */
int ffs_alloc(struct inode *, daddr_t, daddr_t, int, daddr_t *);
diff --git a/usr.sbin/makefs/ffs/ffs_subr.c b/usr.sbin/makefs/ffs/ffs_subr.c
index b857a58..b55174d 100644
--- a/usr.sbin/makefs/ffs/ffs_subr.c
+++ b/usr.sbin/makefs/ffs/ffs_subr.c
@@ -38,11 +38,9 @@ __FBSDID("$FreeBSD$");
#include <ufs/ufs/dinode.h>
#include <ufs/ffs/fs.h>
+#include "ffs/ffs_extern.h"
#include "ffs/ufs_bswap.h"
-void panic __P((const char *, ...))
- __attribute__((__noreturn__,__format__(__printf__,1,2)));
-
/*
* Update the frsum fields to reflect addition or deletion
* of some frags.
@@ -80,8 +78,8 @@ ffs_fragacct_swap(struct fs *fs, int fragmap, int32_t fraglist[], int cnt, int n
* block operations
*
* check if a block is available
- * returns true if all the correponding bits in the free map are 1
- * returns false if any corresponding bit in the free map is 0
+ * returns true if all the corresponding bits in the free map are 1
+ * returns false if any corresponding bit in the free map is 0
*/
int
ffs_isblock(fs, cp, h)
diff --git a/usr.sbin/makefs/walk.c b/usr.sbin/makefs/walk.c
index 0d7bd8e..93eb2a2 100644
--- a/usr.sbin/makefs/walk.c
+++ b/usr.sbin/makefs/walk.c
@@ -172,7 +172,7 @@ create_fsnode(const char *name, struct stat *stbuf)
/*
* free_fsnodes --
* Removes node from tree and frees it and all of
- * its decendents.
+ * its descendants.
*/
void
free_fsnodes(fsnode *node)
diff --git a/usr.sbin/mlxcontrol/interface.c b/usr.sbin/mlxcontrol/interface.c
index 2c7e12b..c0c241b 100644
--- a/usr.sbin/mlxcontrol/interface.c
+++ b/usr.sbin/mlxcontrol/interface.c
@@ -253,7 +253,7 @@ mlx_scsi_inquiry(int unit, int channel, int target, char **vendor, char **device
/* build the cdb */
inq_cmd->opcode = INQUIRY;
- inq_cmd->length = SHORT_INQUIRY_LENGTH;
+ scsi_ulto2b(SHORT_INQUIRY_LENGTH, inq_cmd->length);
/* hand it off for processing */
mlx_perform(unit, mlx_command, &cmd);
diff --git a/usr.sbin/mount_portalfs/cred.c b/usr.sbin/mount_portalfs/cred.c
index 9e5d9f3..2bd3623 100644
--- a/usr.sbin/mount_portalfs/cred.c
+++ b/usr.sbin/mount_portalfs/cred.c
@@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$");
/*
* Set the process's credentials to those specified in user,
- * saveing the existing ones in save.
+ * saving the existing ones in save.
* Return 0 on success, -1 (with errno set) on error.
*/
int
diff --git a/usr.sbin/mount_portalfs/mount_portalfs.c b/usr.sbin/mount_portalfs/mount_portalfs.c
index 3c37b95..3bffbb1 100644
--- a/usr.sbin/mount_portalfs/mount_portalfs.c
+++ b/usr.sbin/mount_portalfs/mount_portalfs.c
@@ -31,7 +31,7 @@
*/
#ifndef lint
-char copyright[] =
+static const char copyright[] =
"@(#) Copyright (c) 1992, 1993, 1994\n\
The Regents of the University of California. All rights reserved.\n";
#endif /* not lint */
@@ -140,7 +140,8 @@ main(int argc, char *argv[])
}
/* resolve the mountpoint with realpath(3) */
- (void)checkpath(argv[optind+1], mountpt);
+ if (checkpath(argv[optind+1], mountpt) != 0)
+ err(EX_USAGE, "%s", mountpt);
/*
* Construct the listening socket
diff --git a/usr.sbin/mount_portalfs/pt_pipe.c b/usr.sbin/mount_portalfs/pt_pipe.c
index fd54b7e..84ee6e4 100644
--- a/usr.sbin/mount_portalfs/pt_pipe.c
+++ b/usr.sbin/mount_portalfs/pt_pipe.c
@@ -92,7 +92,7 @@ int portal_pipe(struct portal_cred *pcr, char *key, char **v,
if (argc == 0)
return (ENOENT);
- /* Swap priviledges. */
+ /* Swap privileges. */
if (set_user_credentials(pcr, &save_area) < 0)
return (errno);
@@ -137,7 +137,7 @@ int portal_pipe(struct portal_cred *pcr, char *key, char **v,
}
done:
- /* Re-establish our priviledges. */
+ /* Re-establish our privileges. */
if (restore_credentials(&save_area) < 0)
error = errno;
diff --git a/usr.sbin/mount_portalfs/pt_tcplisten.c b/usr.sbin/mount_portalfs/pt_tcplisten.c
index b7febb1..3bd29c1 100644
--- a/usr.sbin/mount_portalfs/pt_tcplisten.c
+++ b/usr.sbin/mount_portalfs/pt_tcplisten.c
@@ -59,7 +59,7 @@ __FBSDID("$FreeBSD$");
* Key will be tcplisten/host/port
*
* Create a TCP socket bound to the requested host and port.
- * If the host is "ANY" the receving address will be set to INADDR_ANY.
+ * If the host is "ANY" the receiving address will be set to INADDR_ANY.
* If the port is 0 the caller must find out the returned port number
* using a call to getsockname.
*
diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c
index a1e83c3..1e56e10 100644
--- a/usr.sbin/mountd/mountd.c
+++ b/usr.sbin/mountd/mountd.c
@@ -1642,9 +1642,8 @@ get_exportlist(void)
struct iovec *iov;
struct statfs *fsp, *mntbufp;
struct xvfsconf vfc;
- char *dirp;
char errmsg[255];
- int dirplen, num, i;
+ int num, i;
int iovlen;
int done;
struct nfsex_args eargs;
@@ -1652,8 +1651,6 @@ get_exportlist(void)
v4root_dirpath[0] = '\0';
bzero(&export, sizeof(export));
export.ex_flags = MNT_DELEXPORT;
- dirp = NULL;
- dirplen = 0;
iov = NULL;
iovlen = 0;
bzero(errmsg, sizeof(errmsg));
@@ -3092,7 +3089,7 @@ checkmask(struct sockaddr *sa)
/*
* Compare two sockaddrs according to a specified mask. Return zero if
* `sa1' matches `sa2' when filtered by the netmask in `samask'.
- * If samask is NULL, perform a full comparision.
+ * If samask is NULL, perform a full comparison.
*/
int
sacmp(struct sockaddr *sa1, struct sockaddr *sa2, struct sockaddr *samask)
diff --git a/usr.sbin/moused/moused.c b/usr.sbin/moused/moused.c
index 84e5c0b..39c2eb9 100644
--- a/usr.sbin/moused/moused.c
+++ b/usr.sbin/moused/moused.c
@@ -1025,7 +1025,7 @@ moused(void)
{
struct mouse_info mouse;
mousestatus_t action0; /* original mouse action */
- mousestatus_t action; /* interrim buffer */
+ mousestatus_t action; /* interim buffer */
mousestatus_t action2; /* mapped action */
struct timeval timeout;
fd_set fds;
@@ -2278,7 +2278,7 @@ r_protocol(u_char rBuf, mousestatus_t *act)
act->button |= ((pBuf[0] & MOUSE_PS2_TAP)) ? 0 : MOUSE_BUTTON4DOWN;
break;
case MOUSE_MODEL_NETSCROLL:
- /* three addtional bytes encode buttons and wheel events */
+ /* three additional bytes encode buttons and wheel events */
act->button |= (pBuf[3] & MOUSE_PS2_BUTTON3DOWN)
? MOUSE_BUTTON4DOWN : 0;
act->button |= (pBuf[3] & MOUSE_PS2_BUTTON1DOWN)
@@ -3242,7 +3242,7 @@ kidspad(u_char rxc, mousestatus_t *act)
static int buf[5];
static int buflen = 0, b_prev = 0 , x_prev = -1, y_prev = -1;
static k_status status = S_IDLE;
- static struct timespec old, now;
+ static struct timespec now;
int x, y;
@@ -3280,7 +3280,6 @@ kidspad(u_char rxc, mousestatus_t *act)
x_prev = x;
y_prev = y;
}
- old = now;
act->dx = x - x_prev;
act->dy = y - y_prev;
if (act->dx || act->dy)
diff --git a/usr.sbin/mptable/mptable.c b/usr.sbin/mptable/mptable.c
index 92279bc..3c38ccf 100644
--- a/usr.sbin/mptable/mptable.c
+++ b/usr.sbin/mptable/mptable.c
@@ -828,7 +828,7 @@ MPConfigTableHeader( u_int32_t pap )
int ofd;
u_char dumpbuf[ 4096 ];
- ofd = open( "/tmp/mpdump", O_CREAT | O_RDWR );
+ ofd = open( "/tmp/mpdump", O_CREAT | O_RDWR, 0666 );
seekEntry( paddr );
readEntry( dumpbuf, 1024 );
write( ofd, dumpbuf, 1024 );
diff --git a/usr.sbin/mptutil/mpt_config.c b/usr.sbin/mptutil/mpt_config.c
index d914d66..17b9945 100644
--- a/usr.sbin/mptutil/mpt_config.c
+++ b/usr.sbin/mptutil/mpt_config.c
@@ -482,7 +482,7 @@ restart:
if (state->list->drives[i]->PhysDiskID == state->target_id)
goto restart;
- /* Seach volumes second. */
+ /* Search volumes second. */
vol = state->ioc2->RaidVolume;
for (i = 0; i < state->ioc2->NumActiveVolumes; vol++, i++)
if (vol->VolumeID == state->target_id)
diff --git a/usr.sbin/mtree/spec.c b/usr.sbin/mtree/spec.c
index c7c6460..417932d 100644
--- a/usr.sbin/mtree/spec.c
+++ b/usr.sbin/mtree/spec.c
@@ -73,7 +73,7 @@ mtree_readspec(FILE *fi)
continue;
/* Find end of line. */
- if ((p = index(buf, '\n')) == NULL)
+ if ((p = strchr(buf, '\n')) == NULL)
errx(1, "line %d too long", lineno);
/* See if next line is continuation line. */
@@ -118,7 +118,7 @@ mtree_readspec(FILE *fi)
continue;
}
- if (index(p, '/'))
+ if (strchr(p, '/'))
errx(1, "line %d: slash character in file name",
lineno);
diff --git a/usr.sbin/ndiscvt/Makefile b/usr.sbin/ndiscvt/Makefile
index 90ecebb..b11b4b0 100644
--- a/usr.sbin/ndiscvt/Makefile
+++ b/usr.sbin/ndiscvt/Makefile
@@ -11,6 +11,7 @@ MAN= ndiscvt.8
MAN+= ndisgen.8
WARNS?= 4
+NO_WCAST_ALIGN=
DPADD= ${LIBL}
LDADD= -ll
diff --git a/usr.sbin/ndiscvt/inf-token.l b/usr.sbin/ndiscvt/inf-token.l
index cc1508b..1f290e1 100644
--- a/usr.sbin/ndiscvt/inf-token.l
+++ b/usr.sbin/ndiscvt/inf-token.l
@@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$");
int lineno = 1;
#define YY_NO_UNPUT
+#define YY_NO_INPUT
int yylex(void);
void yyerror(const char *);
diff --git a/usr.sbin/newsyslog/newsyslog.c b/usr.sbin/newsyslog/newsyslog.c
index 191f077..8cbfde7 100644
--- a/usr.sbin/newsyslog/newsyslog.c
+++ b/usr.sbin/newsyslog/newsyslog.c
@@ -1597,10 +1597,10 @@ delete_oldest_timelog(const struct conf_entry *ent, const char *archive_dir)
}
/*
- * Generate a log filename, when using clasic filenames.
+ * Generate a log filename, when using classic filenames.
*/
static void
-gen_clasiclog_fname(char *fname, size_t fname_sz, const char *archive_dir,
+gen_classiclog_fname(char *fname, size_t fname_sz, const char *archive_dir,
const char *namepart, int numlogs_c)
{
@@ -1612,15 +1612,15 @@ gen_clasiclog_fname(char *fname, size_t fname_sz, const char *archive_dir,
}
/*
- * Delete a rotated logfiles, when using clasic filenames.
+ * Delete a rotated logfile, when using classic filenames.
*/
static void
-delete_clasiclog(const char *archive_dir, const char *namepart, int numlog_c)
+delete_classiclog(const char *archive_dir, const char *namepart, int numlog_c)
{
char file1[MAXPATHLEN], zfile1[MAXPATHLEN];
int c;
- gen_clasiclog_fname(file1, sizeof(file1), archive_dir, namepart,
+ gen_classiclog_fname(file1, sizeof(file1), archive_dir, namepart,
numlog_c);
for (c = 0; c < COMPRESS_TYPES; c++) {
@@ -1710,7 +1710,7 @@ do_rotate(const struct conf_entry *ent)
} else { /* relative */
/* get directory part of logfile */
strlcpy(dirpart, ent->log, sizeof(dirpart));
- if ((p = rindex(dirpart, '/')) == NULL)
+ if ((p = strrchr(dirpart, '/')) == NULL)
dirpart[0] = '\0';
else
*(p + 1) = '\0';
@@ -1722,7 +1722,7 @@ do_rotate(const struct conf_entry *ent)
createdir(ent, dirpart);
/* get filename part of logfile */
- if ((p = rindex(ent->log, '/')) == NULL)
+ if ((p = strrchr(ent->log, '/')) == NULL)
strlcpy(namepart, ent->log, sizeof(namepart));
else
strlcpy(namepart, p + 1, sizeof(namepart));
@@ -1744,10 +1744,10 @@ do_rotate(const struct conf_entry *ent)
* kept ent->numlogs + 1 files. This code can go away
* at some point in the future.
*/
- delete_clasiclog(dirpart, namepart, ent->numlogs);
+ delete_classiclog(dirpart, namepart, ent->numlogs);
if (ent->numlogs > 0)
- delete_clasiclog(dirpart, namepart, ent->numlogs - 1);
+ delete_classiclog(dirpart, namepart, ent->numlogs - 1);
}
@@ -1768,7 +1768,7 @@ do_rotate(const struct conf_entry *ent)
/* Don't run the code to move down logs */
numlogs_c = -1;
} else {
- gen_clasiclog_fname(file1, sizeof(file1), dirpart, namepart,
+ gen_classiclog_fname(file1, sizeof(file1), dirpart, namepart,
ent->numlogs - 1);
numlogs_c = ent->numlogs - 2; /* copy for countdown */
}
@@ -1777,7 +1777,7 @@ do_rotate(const struct conf_entry *ent)
for (; numlogs_c >= 0; numlogs_c--) {
(void) strlcpy(file2, file1, sizeof(file2));
- gen_clasiclog_fname(file1, sizeof(file1), dirpart, namepart,
+ gen_classiclog_fname(file1, sizeof(file1), dirpart, namepart,
numlogs_c);
logfile_suffix = get_logfile_suffix(file1);
@@ -1946,9 +1946,10 @@ do_zipwork(struct zipwork_entry *zwork)
char zresult[MAXPATHLEN];
int c;
+ assert(zwork != NULL);
pgm_path = NULL;
strlcpy(zresult, zwork->zw_fname, sizeof(zresult));
- if (zwork != NULL && zwork->zw_conf != NULL &&
+ if (zwork->zw_conf != NULL &&
zwork->zw_conf->compress > COMPRESS_NONE)
for (c = 1; c < COMPRESS_TYPES; c++) {
if (zwork->zw_conf->compress == c) {
@@ -2254,7 +2255,7 @@ age_old_log(char *file)
} else { /* relative */
/* get directory part of logfile */
strlcpy(tmp, file, sizeof(tmp));
- if ((p = rindex(tmp, '/')) == NULL)
+ if ((p = strrchr(tmp, '/')) == NULL)
tmp[0] = '\0';
else
*(p + 1) = '\0';
@@ -2264,7 +2265,7 @@ age_old_log(char *file)
strlcat(tmp, "/", sizeof(tmp));
/* get filename part of logfile */
- if ((p = rindex(file, '/')) == NULL)
+ if ((p = strrchr(file, '/')) == NULL)
strlcat(tmp, file, sizeof(tmp));
else
strlcat(tmp, p + 1, sizeof(tmp));
diff --git a/usr.sbin/nscd/protocol.h b/usr.sbin/nscd/protocol.h
index dea2397..270335c 100644
--- a/usr.sbin/nscd/protocol.h
+++ b/usr.sbin/nscd/protocol.h
@@ -67,7 +67,7 @@ struct cache_read_response {
};
enum transformation_type {
- TT_USER = 0, // tranform only the entries of the caller
+ TT_USER = 0, // transform only the entries of the caller
TT_ALL = 1 // transform all entries
};
diff --git a/usr.sbin/ntp/doc/ntp.conf.5 b/usr.sbin/ntp/doc/ntp.conf.5
index 361c123..c19bc29 100644
--- a/usr.sbin/ntp/doc/ntp.conf.5
+++ b/usr.sbin/ntp/doc/ntp.conf.5
@@ -783,7 +783,7 @@ The remaining files are necessary only for the
Autokey protocol.
.Pp
Certificates imported from OpenSSL or public certificate
-authorities have certian limitations.
+authorities have certain limitations.
The certificate should be in ASN.1 syntax, X.509 Version 3
format and encoded in PEM, which is the same format
used by OpenSSL.
diff --git a/usr.sbin/pc-sysinstall/backend-partmanager/delete-part.sh b/usr.sbin/pc-sysinstall/backend-partmanager/delete-part.sh
index c444f65..1db01ff 100755
--- a/usr.sbin/pc-sysinstall/backend-partmanager/delete-part.sh
+++ b/usr.sbin/pc-sysinstall/backend-partmanager/delete-part.sh
@@ -73,7 +73,7 @@ DISK="`echo $PARTITION | cut -c 1-${CHARS}`"
# Make sure we have a valid disk name still
if [ ! -e "/dev/${DISK}" ] ; then
- echo "Error: Disk: ${DISK} doesnt exist!"
+ echo "Error: Disk: ${DISK} doesn't exist!"
exit 1
fi
diff --git a/usr.sbin/pc-sysinstall/backend/functions-disk.sh b/usr.sbin/pc-sysinstall/backend/functions-disk.sh
index 51a659e..84534f9 100755
--- a/usr.sbin/pc-sysinstall/backend/functions-disk.sh
+++ b/usr.sbin/pc-sysinstall/backend/functions-disk.sh
@@ -417,7 +417,7 @@ setup_disk_slice()
if [ $LASTSLICE -gt 4 ]
then
- exit_err "ERROR: BSD only supports primary partitions, and there are none availble on $DISK"
+ exit_err "ERROR: BSD only supports primary partitions, and there are none available on $DISK"
fi
fi
diff --git a/usr.sbin/pc-sysinstall/backend/functions-parse.sh b/usr.sbin/pc-sysinstall/backend/functions-parse.sh
index 8b9d418..fecb018 100755
--- a/usr.sbin/pc-sysinstall/backend/functions-parse.sh
+++ b/usr.sbin/pc-sysinstall/backend/functions-parse.sh
@@ -69,7 +69,7 @@ if_check_value_exists()
{
if [ -n "${1}" -a -n "${2}" ]
then
- # Get the first occurance of the setting from the config, strip out whitespace
+ # Get the first occurrence of the setting from the config, strip out whitespace
VAL=`grep "^${1}" ${CFGF} | head -n 1 | cut -d '=' -f 2 | tr -d ' '`
if [ -z "${VAL}" ]
@@ -103,7 +103,7 @@ check_value()
{
if [ -n "${1}" -a -n "${2}" ]
then
- # Get the first occurance of the setting from the config, strip out whitespace
+ # Get the first occurrence of the setting from the config, strip out whitespace
VAL=`grep "^${1}" ${CFGF} | head -n 1 | cut -d '=' -f 2 | tr -d ' '`
VALID="1"
for i in ${2}
@@ -122,7 +122,7 @@ check_value()
fi
};
-# Checks for the presense of the supplied arguements in the config file
+# Checks for the presence of the supplied arguments in the config file
# 1 = values to confirm exist
file_sanity_check()
{
diff --git a/usr.sbin/pciconf/pciconf.c b/usr.sbin/pciconf/pciconf.c
index bb19160..919cc85 100644
--- a/usr.sbin/pciconf/pciconf.c
+++ b/usr.sbin/pciconf/pciconf.c
@@ -188,10 +188,10 @@ list_devs(int verbose, int bars, int caps)
/*
* 255 entries should be more than enough for most people,
* but if someone has more devices, and then changes things
- * around between ioctls, we'll do the cheezy thing and
+ * around between ioctls, we'll do the cheesy thing and
* just bail. The alternative would be to go back to the
* beginning of the list, and print things twice, which may
- * not be desireable.
+ * not be desirable.
*/
if (pc.status == PCI_GETCONF_LIST_CHANGED) {
warnx("PCI device list changed, please try again");
diff --git a/usr.sbin/pkg_install/README b/usr.sbin/pkg_install/README
index a5a517d..874b588 100644
--- a/usr.sbin/pkg_install/README
+++ b/usr.sbin/pkg_install/README
@@ -1,4 +1,6 @@
-This is the pkg_install suite of tools for doing maintainance of
+$FreeBSD$
+
+This is the pkg_install suite of tools for doing maintenance of
software "packages". More documentation is available in the man pages
for each individual command.
diff --git a/usr.sbin/pkg_install/add/add.h b/usr.sbin/pkg_install/add/add.h
index f1607ee..d9892ad 100644
--- a/usr.sbin/pkg_install/add/add.h
+++ b/usr.sbin/pkg_install/add/add.h
@@ -1,7 +1,7 @@
/* $FreeBSD$ */
/*
- * FreeBSD install - a package for the installation and maintainance
+ * FreeBSD install - a package for the installation and maintenance
* of non-core utilities.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/usr.sbin/pkg_install/add/extract.c b/usr.sbin/pkg_install/add/extract.c
index 732a13f..90c33c0 100644
--- a/usr.sbin/pkg_install/add/extract.c
+++ b/usr.sbin/pkg_install/add/extract.c
@@ -1,5 +1,5 @@
/*
- * FreeBSD install - a package for the installation and maintainance
+ * FreeBSD install - a package for the installation and maintenance
* of non-core utilities.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/usr.sbin/pkg_install/add/futil.c b/usr.sbin/pkg_install/add/futil.c
index ca095ea..8f9d369 100644
--- a/usr.sbin/pkg_install/add/futil.c
+++ b/usr.sbin/pkg_install/add/futil.c
@@ -1,5 +1,5 @@
/*
- * FreeBSD install - a package for the installation and maintainance
+ * FreeBSD install - a package for the installation and maintenance
* of non-core utilities.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/usr.sbin/pkg_install/add/main.c b/usr.sbin/pkg_install/add/main.c
index b1eec7a..3a483cf 100644
--- a/usr.sbin/pkg_install/add/main.c
+++ b/usr.sbin/pkg_install/add/main.c
@@ -1,6 +1,6 @@
/*
*
- * FreeBSD install - a package for the installation and maintainance
+ * FreeBSD install - a package for the installation and maintenance
* of non-core utilities.
*
* Redistribution and use in source and binary forms, with or without
@@ -285,7 +285,7 @@ main(int argc, char **argv)
}
/* Make sure the sub-execs we invoke get found */
setenv("PATH",
- "/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin",
+ "/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin",
1);
/* Set a reasonable umask */
diff --git a/usr.sbin/pkg_install/add/perform.c b/usr.sbin/pkg_install/add/perform.c
index b23cd52..1b88888 100644
--- a/usr.sbin/pkg_install/add/perform.c
+++ b/usr.sbin/pkg_install/add/perform.c
@@ -1,5 +1,5 @@
/*
- * FreeBSD install - a package for the installation and maintainance
+ * FreeBSD install - a package for the installation and maintenance
* of non-core utilities.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/usr.sbin/pkg_install/add/pkg_add.1 b/usr.sbin/pkg_install/add/pkg_add.1
index d090cb5..71963d1 100644
--- a/usr.sbin/pkg_install/add/pkg_add.1
+++ b/usr.sbin/pkg_install/add/pkg_add.1
@@ -1,5 +1,5 @@
.\"
-.\" FreeBSD install - a package for the installation and maintainance
+.\" FreeBSD install - a package for the installation and maintenance
.\" of non-core utilities.
.\"
.\" Redistribution and use in source and binary forms, with or without
diff --git a/usr.sbin/pkg_install/create/create.h b/usr.sbin/pkg_install/create/create.h
index cbade82..301bcff 100644
--- a/usr.sbin/pkg_install/create/create.h
+++ b/usr.sbin/pkg_install/create/create.h
@@ -1,7 +1,7 @@
/* $FreeBSD$ */
/*
- * FreeBSD install - a package for the installation and maintainance
+ * FreeBSD install - a package for the installation and maintenance
* of non-core utilities.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/usr.sbin/pkg_install/create/main.c b/usr.sbin/pkg_install/create/main.c
index e4af621..5b5ecb2 100644
--- a/usr.sbin/pkg_install/create/main.c
+++ b/usr.sbin/pkg_install/create/main.c
@@ -1,5 +1,5 @@
/*
- * FreeBSD install - a package for the installation and maintainance
+ * FreeBSD install - a package for the installation and maintenance
* of non-core utilities.
*
* Jordan K. Hubbard
diff --git a/usr.sbin/pkg_install/create/perform.c b/usr.sbin/pkg_install/create/perform.c
index 45786b6..0834ecd 100644
--- a/usr.sbin/pkg_install/create/perform.c
+++ b/usr.sbin/pkg_install/create/perform.c
@@ -1,5 +1,5 @@
/*
- * FreeBSD install - a package for the installation and maintainance
+ * FreeBSD install - a package for the installation and maintenance
* of non-core utilities.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/usr.sbin/pkg_install/create/pkg_create.1 b/usr.sbin/pkg_install/create/pkg_create.1
index 5b46374..fa0365e 100644
--- a/usr.sbin/pkg_install/create/pkg_create.1
+++ b/usr.sbin/pkg_install/create/pkg_create.1
@@ -1,5 +1,5 @@
.\"
-.\" FreeBSD install - a package for the installation and maintainance
+.\" FreeBSD install - a package for the installation and maintenance
.\" of non-core utilities.
.\"
.\" Redistribution and use in source and binary forms, with or without
diff --git a/usr.sbin/pkg_install/create/pl.c b/usr.sbin/pkg_install/create/pl.c
index 18bbaf2..716fd05 100644
--- a/usr.sbin/pkg_install/create/pl.c
+++ b/usr.sbin/pkg_install/create/pl.c
@@ -1,5 +1,5 @@
/*
- * FreeBSD install - a package for the installation and maintainance
+ * FreeBSD install - a package for the installation and maintenance
* of non-core utilities.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/usr.sbin/pkg_install/delete/delete.h b/usr.sbin/pkg_install/delete/delete.h
index e0aeca5..f2f4057 100644
--- a/usr.sbin/pkg_install/delete/delete.h
+++ b/usr.sbin/pkg_install/delete/delete.h
@@ -1,7 +1,7 @@
/* $FreeBSD$ */
/*
- * FreeBSD install - a package for the installation and maintainance
+ * FreeBSD install - a package for the installation and maintenance
* of non-core utilities.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/usr.sbin/pkg_install/delete/main.c b/usr.sbin/pkg_install/delete/main.c
index f09a432..7cd4677 100644
--- a/usr.sbin/pkg_install/delete/main.c
+++ b/usr.sbin/pkg_install/delete/main.c
@@ -1,6 +1,6 @@
/*
*
- * FreeBSD install - a package for the installation and maintainance
+ * FreeBSD install - a package for the installation and maintenance
* of non-core utilities.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/usr.sbin/pkg_install/delete/perform.c b/usr.sbin/pkg_install/delete/perform.c
index 113df31..ea00055 100644
--- a/usr.sbin/pkg_install/delete/perform.c
+++ b/usr.sbin/pkg_install/delete/perform.c
@@ -1,5 +1,5 @@
/*
- * FreeBSD install - a package for the installation and maintainance
+ * FreeBSD install - a package for the installation and maintenance
* of non-core utilities.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/usr.sbin/pkg_install/delete/pkg_delete.1 b/usr.sbin/pkg_install/delete/pkg_delete.1
index aa56a44..f10651c 100644
--- a/usr.sbin/pkg_install/delete/pkg_delete.1
+++ b/usr.sbin/pkg_install/delete/pkg_delete.1
@@ -1,5 +1,5 @@
.\"
-.\" FreeBSD install - a package for the installation and maintainance
+.\" FreeBSD install - a package for the installation and maintenance
.\" of non-core utilities.
.\"
.\" Redistribution and use in source and binary forms, with or without
diff --git a/usr.sbin/pkg_install/info/info.h b/usr.sbin/pkg_install/info/info.h
index 46e29b1..6aa1aa7 100644
--- a/usr.sbin/pkg_install/info/info.h
+++ b/usr.sbin/pkg_install/info/info.h
@@ -1,7 +1,7 @@
/* $FreeBSD$ */
/*
- * FreeBSD install - a package for the installation and maintainance
+ * FreeBSD install - a package for the installation and maintenance
* of non-core utilities.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/usr.sbin/pkg_install/info/main.c b/usr.sbin/pkg_install/info/main.c
index 2de638e..6692148 100644
--- a/usr.sbin/pkg_install/info/main.c
+++ b/usr.sbin/pkg_install/info/main.c
@@ -1,6 +1,6 @@
/*
*
- * FreeBSD install - a package for the installation and maintainance
+ * FreeBSD install - a package for the installation and maintenance
* of non-core utilities.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/usr.sbin/pkg_install/info/perform.c b/usr.sbin/pkg_install/info/perform.c
index 09cad78..bba2de8 100644
--- a/usr.sbin/pkg_install/info/perform.c
+++ b/usr.sbin/pkg_install/info/perform.c
@@ -1,5 +1,5 @@
/*
- * FreeBSD install - a package for the installation and maintainance
+ * FreeBSD install - a package for the installation and maintenance
* of non-core utilities.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/usr.sbin/pkg_install/info/show.c b/usr.sbin/pkg_install/info/show.c
index 8b434be..3dc47f9 100644
--- a/usr.sbin/pkg_install/info/show.c
+++ b/usr.sbin/pkg_install/info/show.c
@@ -1,5 +1,5 @@
/*
- * FreeBSD install - a package for the installation and maintainance
+ * FreeBSD install - a package for the installation and maintenance
* of non-core utilities.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/usr.sbin/pkg_install/lib/deps.c b/usr.sbin/pkg_install/lib/deps.c
index 66f44a9..c6e70fe 100644
--- a/usr.sbin/pkg_install/lib/deps.c
+++ b/usr.sbin/pkg_install/lib/deps.c
@@ -1,5 +1,5 @@
/*
- * FreeBSD install - a package for the installation and maintainance
+ * FreeBSD install - a package for the installation and maintenance
* of non-core utilities.
*
* Redistribution and use in source and binary forms, with or without
@@ -168,7 +168,7 @@ void list_deps(const char *pkgname, char **pkgs, char *listed,
/*
* Load +REQUIRED_BY file and return a list with names of
- * packages that require package reffered to by `pkgname'.
+ * packages that require package referred to by `pkgname'.
*
* Optionally check that packages listed there are actually
* installed and filter out those that don't (filter == TRUE).
diff --git a/usr.sbin/pkg_install/lib/exec.c b/usr.sbin/pkg_install/lib/exec.c
index fc8220c..3647376 100644
--- a/usr.sbin/pkg_install/lib/exec.c
+++ b/usr.sbin/pkg_install/lib/exec.c
@@ -1,5 +1,5 @@
/*
- * FreeBSD install - a package for the installation and maintainance
+ * FreeBSD install - a package for the installation and maintenance
* of non-core utilities.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/usr.sbin/pkg_install/lib/file.c b/usr.sbin/pkg_install/lib/file.c
index c7ab9d6..79d4df7 100644
--- a/usr.sbin/pkg_install/lib/file.c
+++ b/usr.sbin/pkg_install/lib/file.c
@@ -1,5 +1,5 @@
/*
- * FreeBSD install - a package for the installation and maintainance
+ * FreeBSD install - a package for the installation and maintenance
* of non-core utilities.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/usr.sbin/pkg_install/lib/global.c b/usr.sbin/pkg_install/lib/global.c
index e136ec8..25d2a53 100644
--- a/usr.sbin/pkg_install/lib/global.c
+++ b/usr.sbin/pkg_install/lib/global.c
@@ -1,5 +1,5 @@
/*
- * FreeBSD install - a package for the installation and maintainance
+ * FreeBSD install - a package for the installation and maintenance
* of non-core utilities.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/usr.sbin/pkg_install/lib/lib.h b/usr.sbin/pkg_install/lib/lib.h
index 089bfa3..fcf051e 100644
--- a/usr.sbin/pkg_install/lib/lib.h
+++ b/usr.sbin/pkg_install/lib/lib.h
@@ -1,7 +1,7 @@
/* $FreeBSD$ */
/*
- * FreeBSD install - a package for the installation and maintainance
+ * FreeBSD install - a package for the installation and maintenance
* of non-core utilities.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/usr.sbin/pkg_install/lib/match.c b/usr.sbin/pkg_install/lib/match.c
index 6c1b2bf..905d7cb 100644
--- a/usr.sbin/pkg_install/lib/match.c
+++ b/usr.sbin/pkg_install/lib/match.c
@@ -1,5 +1,5 @@
/*
- * FreeBSD install - a package for the installation and maintainance
+ * FreeBSD install - a package for the installation and maintenance
* of non-core utilities.
*
* Redistribution and use in source and binary forms, with or without
@@ -361,7 +361,7 @@ LIST_HEAD(, iip_memo) iip_memo = LIST_HEAD_INITIALIZER(iip_memo);
/*
*
* Return 1 if the specified package is installed,
- * 0 if not, and -1 if an error occured.
+ * 0 if not, and -1 if an error occurred.
*/
int
isinstalledpkg(const char *name)
diff --git a/usr.sbin/pkg_install/lib/msg.c b/usr.sbin/pkg_install/lib/msg.c
index 5b17624..2b0ee07 100644
--- a/usr.sbin/pkg_install/lib/msg.c
+++ b/usr.sbin/pkg_install/lib/msg.c
@@ -1,5 +1,5 @@
/*
- * FreeBSD install - a package for the installation and maintainance
+ * FreeBSD install - a package for the installation and maintenance
* of non-core utilities.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/usr.sbin/pkg_install/lib/pen.c b/usr.sbin/pkg_install/lib/pen.c
index 2b405a3..f4ecd75 100644
--- a/usr.sbin/pkg_install/lib/pen.c
+++ b/usr.sbin/pkg_install/lib/pen.c
@@ -1,5 +1,5 @@
/*
- * FreeBSD install - a package for the installation and maintainance
+ * FreeBSD install - a package for the installation and maintenance
* of non-core utilities.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/usr.sbin/pkg_install/lib/plist.c b/usr.sbin/pkg_install/lib/plist.c
index 545b541..f760c61 100644
--- a/usr.sbin/pkg_install/lib/plist.c
+++ b/usr.sbin/pkg_install/lib/plist.c
@@ -1,5 +1,5 @@
/*
- * FreeBSD install - a package for the installation and maintainance
+ * FreeBSD install - a package for the installation and maintenance
* of non-core utilities.
*
* Redistribution and use in source and binary forms, with or without
@@ -123,7 +123,7 @@ find_plist_option(Package *pkg, const char *name)
/*
* Delete plist item 'type' in the list (if 'name' is non-null, match it
- * too.) If 'all' is set, delete all items, not just the first occurance.
+ * too.) If 'all' is set, delete all items, not just the first occurrence.
*/
void
delete_plist(Package *pkg, Boolean all, plist_t type, const char *name)
diff --git a/usr.sbin/pkg_install/lib/str.c b/usr.sbin/pkg_install/lib/str.c
index 0d9e288..f1a087f 100644
--- a/usr.sbin/pkg_install/lib/str.c
+++ b/usr.sbin/pkg_install/lib/str.c
@@ -1,5 +1,5 @@
/*
- * FreeBSD install - a package for the installation and maintainance
+ * FreeBSD install - a package for the installation and maintenance
* of non-core utilities.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/usr.sbin/pkg_install/lib/url.c b/usr.sbin/pkg_install/lib/url.c
index 8c55347..0097a91 100644
--- a/usr.sbin/pkg_install/lib/url.c
+++ b/usr.sbin/pkg_install/lib/url.c
@@ -1,5 +1,5 @@
/*
- * FreeBSD install - a package for the installation and maintainance
+ * FreeBSD install - a package for the installation and maintenance
* of non-core utilities.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/usr.sbin/pkg_install/updating/main.c b/usr.sbin/pkg_install/updating/main.c
index 0ab2ec0..e7a840f 100644
--- a/usr.sbin/pkg_install/updating/main.c
+++ b/usr.sbin/pkg_install/updating/main.c
@@ -3,7 +3,7 @@
* "THE BEER-WARE LICENSE" (Revision 42):
* <beat@chruetertee.ch> wrote this file. As long as you retain this notice you
* can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Beat Gätzi
+ * this stuff is worth it, you can buy me a beer in return. Beat Gätzi
* ----------------------------------------------------------------------------
*/
@@ -141,7 +141,7 @@ main(int argc, char *argv[])
strcmp(pkgdbdir->d_name, "..") != 0) {
/* Create path to +CONTENTS file for each installed port */
- n = strlcpy(tmp_file, pkgdbpath, strlen(pkgdbpath)+1);
+ n = strlcpy(tmp_file, pkgdbpath, sizeof(tmp_file));
n = strlcpy(tmp_file + n, "/", sizeof(tmp_file) - n);
n = strlcat(tmp_file + n, pkgdbdir->d_name,
sizeof(tmp_file) - n);
@@ -181,7 +181,7 @@ main(int argc, char *argv[])
(void)exit(EXIT_FAILURE);
if (pname[strlen(pname) - 1] == '\n')
pname[strlen(pname) - 1] = '\0';
- strlcpy (curr->name, pname, strlen(pname)+1);
+ strlcpy (curr->name, pname, sizeof(curr->name));
curr->next = head;
head = curr;
}
diff --git a/usr.sbin/pkg_install/updating/pathnames.h b/usr.sbin/pkg_install/updating/pathnames.h
index 7eed1b4..b9a94ed 100644
--- a/usr.sbin/pkg_install/updating/pathnames.h
+++ b/usr.sbin/pkg_install/updating/pathnames.h
@@ -3,7 +3,7 @@
* "THE BEER-WARE LICENSE" (Revision 42):
* <beat@chruetertee.ch> wrote this file. As long as you retain this notice you
* can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Beat Gätzi
+ * this stuff is worth it, you can buy me a beer in return. Beat Gätzi
* ----------------------------------------------------------------------------
*
* $FreeBSD$
diff --git a/usr.sbin/pkg_install/updating/pkg_updating.1 b/usr.sbin/pkg_install/updating/pkg_updating.1
index d7ac123..9ab6dc8 100644
--- a/usr.sbin/pkg_install/updating/pkg_updating.1
+++ b/usr.sbin/pkg_install/updating/pkg_updating.1
@@ -6,7 +6,7 @@
.\" "THE BEER-WARE LICENSE" (Revision 42):
.\" <beat@chruetertee.ch> wrote this file. As long as you retain this notice you
.\" can do whatever you want with this stuff. If we meet some day, and you think
-.\" this stuff is worth it, you can buy me a beer in return. Beat Gätzi
+.\" this stuff is worth it, you can buy me a beer in return. Beat Gätzi
.\"
.\" $FreeBSD$
.\"
diff --git a/usr.sbin/pkg_install/version/main.c b/usr.sbin/pkg_install/version/main.c
index cad8583..39c603e 100644
--- a/usr.sbin/pkg_install/version/main.c
+++ b/usr.sbin/pkg_install/version/main.c
@@ -1,5 +1,5 @@
/*
- * FreeBSD install - a package for the installation and maintainance
+ * FreeBSD install - a package for the installation and maintenance
* of non-core utilities.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/usr.sbin/pkg_install/version/perform.c b/usr.sbin/pkg_install/version/perform.c
index dc85696..733cb5e 100644
--- a/usr.sbin/pkg_install/version/perform.c
+++ b/usr.sbin/pkg_install/version/perform.c
@@ -1,5 +1,5 @@
/*
- * FreeBSD install - a package for the installation and maintainance
+ * FreeBSD install - a package for the installation and maintenance
* of non-core utilities.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/usr.sbin/pkg_install/version/version.h b/usr.sbin/pkg_install/version/version.h
index 412c395..1f265d4 100644
--- a/usr.sbin/pkg_install/version/version.h
+++ b/usr.sbin/pkg_install/version/version.h
@@ -1,7 +1,7 @@
/* $FreeBSD$ */
/*
- * FreeBSD install - a package for the installation and maintainance
+ * FreeBSD install - a package for the installation and maintenance
* of non-core utilities.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/usr.sbin/pmccontrol/pmccontrol.c b/usr.sbin/pmccontrol/pmccontrol.c
index f0bd31f..bc0ebdc 100644
--- a/usr.sbin/pmccontrol/pmccontrol.c
+++ b/usr.sbin/pmccontrol/pmccontrol.c
@@ -452,7 +452,7 @@ main(int argc, char **argv)
case '?':
warnx("Unrecognized option \"-%c\"", optopt);
- errx(EX_USAGE, usage_message);
+ errx(EX_USAGE, "%s", usage_message);
break;
default:
@@ -462,7 +462,7 @@ main(int argc, char **argv)
}
if (command == PMCC_PRINT_USAGE)
- (void) errx(EX_USAGE, usage_message);
+ (void) errx(EX_USAGE, "%s", usage_message);
if (error)
exit(EX_USAGE);
diff --git a/usr.sbin/pmcstat/pmcpl_calltree.c b/usr.sbin/pmcstat/pmcpl_calltree.c
index 3f3f717..0069330 100644
--- a/usr.sbin/pmcstat/pmcpl_calltree.c
+++ b/usr.sbin/pmcstat/pmcpl_calltree.c
@@ -862,7 +862,7 @@ pmcpl_ct_node_printchild(struct pmcpl_ct_node *ct)
/*
* Child cost.
- * TODO: attach child cost to the real position in the funtion.
+ * TODO: attach child cost to the real position in the function.
* TODO: cfn=<fn> / call <ncall> addr(<fn>) / addr(call <fn>) <arccost>
*/
for (i=0 ; i<ct->pct_narc; i++) {
diff --git a/usr.sbin/pmcstat/pmcpl_gprof.c b/usr.sbin/pmcstat/pmcpl_gprof.c
index 8e4cc79..9ff78e8 100644
--- a/usr.sbin/pmcstat/pmcpl_gprof.c
+++ b/usr.sbin/pmcstat/pmcpl_gprof.c
@@ -326,7 +326,7 @@ pmcpl_gmon_initimage(struct pmcstat_image *pi)
else {
/*
* Otherwise use a prefix from the original name and
- * upto 3 digits.
+ * up to 3 digits.
*/
nlen = strlen(sn);
nlen = min(nlen, (int) (sizeof(name)-sizeof("~NNN.gmon")));
diff --git a/usr.sbin/pmcstat/pmcstat.c b/usr.sbin/pmcstat/pmcstat.c
index 8c54a29..0133119 100644
--- a/usr.sbin/pmcstat/pmcstat.c
+++ b/usr.sbin/pmcstat/pmcstat.c
@@ -98,7 +98,7 @@ __FBSDID("$FreeBSD$");
* and starts them. Sets up
* monitoring for the child.
* - Signals child to start.
- * - Recieves signal, attempts exec().
+ * - Receives signal, attempts exec().
*
* After this point normal processing can happen.
*/
@@ -551,7 +551,7 @@ main(int argc, char **argv)
cpuset_t cpumask;
double interval;
int hcpu, option, npmc, ncpu;
- int c, check_driver_stats, current_cpu, current_sampling_count;
+ int c, check_driver_stats, current_sampling_count;
int do_callchain, do_descendants, do_logproccsw, do_logprocexit;
int do_print, do_read;
size_t dummy;
@@ -571,7 +571,6 @@ main(int argc, char **argv)
char buffer[PATH_MAX];
check_driver_stats = 0;
- current_cpu = 0;
current_sampling_count = DEFAULT_SAMPLE_COUNT;
do_callchain = 1;
do_descendants = 0;
diff --git a/usr.sbin/pmcstat/pmcstat_log.c b/usr.sbin/pmcstat/pmcstat_log.c
index 6c0eb14..db526e3 100644
--- a/usr.sbin/pmcstat/pmcstat_log.c
+++ b/usr.sbin/pmcstat/pmcstat_log.c
@@ -254,7 +254,7 @@ static void pmcstat_stats_reset(int _reset_global);
/*
* A simple implementation of interned strings. Each interned string
* is assigned a unique address, so that subsequent string compares
- * can be done by a simple pointer comparision instead of using
+ * can be done by a simple pointer comparison instead of using
* strcmp(). This speeds up hash table lookups and saves memory if
* duplicate strings are the norm.
*/
diff --git a/usr.sbin/powerd/powerd.c b/usr.sbin/powerd/powerd.c
index a1a5126..8db875b 100644
--- a/usr.sbin/powerd/powerd.c
+++ b/usr.sbin/powerd/powerd.c
@@ -71,7 +71,7 @@ typedef enum {
SRC_UNKNOWN,
} power_src_t;
-const char *modes[] = {
+static const char *modes[] = {
"AC",
"battery",
"unknown"
diff --git a/usr.sbin/ppp/cbcp.c b/usr.sbin/ppp/cbcp.c
index be68e48..23366c8 100644
--- a/usr.sbin/ppp/cbcp.c
+++ b/usr.sbin/ppp/cbcp.c
@@ -353,7 +353,7 @@ static int
cbcp_AdjustResponse(struct cbcp *cbcp, struct cbcp_data *data)
{
/*
- * We've received a REQ (data). Adjust our reponse (cbcp->fsm.*)
+ * We've received a REQ (data). Adjust our response (cbcp->fsm.*)
* so that we (hopefully) agree with the peer
*/
struct cbcp_addr *addr;
diff --git a/usr.sbin/ppp/chat.h b/usr.sbin/ppp/chat.h
index b8162bf..91fc7b4 100644
--- a/usr.sbin/ppp/chat.h
+++ b/usr.sbin/ppp/chat.h
@@ -52,8 +52,8 @@ struct chat {
char *nargptr; /* Our next for expect-send-expect */
char buf[LINE_LEN*2]; /* Our input */
- char *bufstart; /* start of relevent data */
- char *bufend; /* end of relevent data */
+ char *bufstart; /* start of relevant data */
+ char *bufend; /* end of relevant data */
int TimeoutSec; /* Expect timeout value */
int TimedOut; /* We timed out */
diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c
index 0468b32..91fe028 100644
--- a/usr.sbin/ppp/command.c
+++ b/usr.sbin/ppp/command.c
@@ -416,7 +416,7 @@ DialCommand(struct cmdargs const *arg)
static char *
strstrword(char *big, const char *little)
{
- /* Get the first occurance of the word ``little'' in ``big'' */
+ /* Get the first occurrance of the word ``little'' in ``big'' */
char *pos;
int len;
@@ -1852,13 +1852,13 @@ SetVariable(struct cmdargs const *arg)
case PHASE_ESTABLISH:
/* Make sure none of our links are DATALINK_LCP or greater */
if (bundle_HighestState(arg->bundle) >= DATALINK_LCP) {
- log_Printf(LogWARN, "mrru: Only changable before LCP negotiations\n");
+ log_Printf(LogWARN, "mrru: Only changeable before LCP negotiations\n");
res = 1;
break;
}
break;
default:
- log_Printf(LogWARN, "mrru: Only changable at phase DEAD/ESTABLISH\n");
+ log_Printf(LogWARN, "mrru: Only changeable at phase DEAD/ESTABLISH\n");
res = 1;
break;
}
@@ -2944,13 +2944,13 @@ NegotiateSet(struct cmdargs const *arg)
case PHASE_ESTABLISH:
/* Make sure none of our links are DATALINK_LCP or greater */
if (bundle_HighestState(arg->bundle) >= DATALINK_LCP) {
- log_Printf(LogWARN, "shortseq: Only changable before"
+ log_Printf(LogWARN, "shortseq: Only changeable before"
" LCP negotiations\n");
return 1;
}
break;
default:
- log_Printf(LogWARN, "shortseq: Only changable at phase"
+ log_Printf(LogWARN, "shortseq: Only changeable at phase"
" DEAD/ESTABLISH\n");
return 1;
}
diff --git a/usr.sbin/ppp/iface.c b/usr.sbin/ppp/iface.c
index 7437502..8fee189 100644
--- a/usr.sbin/ppp/iface.c
+++ b/usr.sbin/ppp/iface.c
@@ -471,12 +471,11 @@ iface_Descr(struct cmdargs const *arg)
void
iface_Clear(struct iface *iface, struct ncp *ncp, int family, int how)
{
- int addrs, af, inskip, in6skip, s4 = -1, s6 = -1, *s;
+ int af, inskip, in6skip, s4 = -1, s6 = -1, *s;
unsigned n;
if (iface->addrs) {
inskip = in6skip = how == IFACE_CLEAR_ALL ? 0 : 1;
- addrs = 0;
for (n = 0; n < iface->addrs; n++) {
af = ncprange_family(&iface->addr[n].ifa);
diff --git a/usr.sbin/ppp/lqr.c b/usr.sbin/ppp/lqr.c
index cb04741..7aca17a 100644
--- a/usr.sbin/ppp/lqr.c
+++ b/usr.sbin/ppp/lqr.c
@@ -417,7 +417,7 @@ lqr_LayerPush(struct bundle *b __unused, struct link *l, struct mbuf *bp,
int pri __unused, u_short *proto)
{
struct physical *p = link2physical(l);
- int len, layer, extra_async_bytes;
+ int len, layer;
if (!p) {
/* Oops - can't happen :-] */
@@ -445,7 +445,6 @@ lqr_LayerPush(struct bundle *b __unused, struct link *l, struct mbuf *bp,
* acf layers (to avoid alignment issues), so deal with this too.
*/
- extra_async_bytes = 0;
p->hdlc.lqm.ifOutUniPackets++;
p->hdlc.lqm.ifOutOctets += len + 1; /* plus 1 flag octet! */
for (layer = 0; layer < l->nlayers; layer++)
diff --git a/usr.sbin/ppp/mp.c b/usr.sbin/ppp/mp.c
index 095f9bb..b2cb46c 100644
--- a/usr.sbin/ppp/mp.c
+++ b/usr.sbin/ppp/mp.c
@@ -965,13 +965,13 @@ mp_SetEnddisc(struct cmdargs const *arg)
case PHASE_ESTABLISH:
/* Make sure none of our links are DATALINK_LCP or greater */
if (bundle_HighestState(arg->bundle) >= DATALINK_LCP) {
- log_Printf(LogWARN, "enddisc: Only changable before"
+ log_Printf(LogWARN, "enddisc: Only changeable before"
" LCP negotiations\n");
return 1;
}
break;
default:
- log_Printf(LogWARN, "enddisc: Only changable at phase DEAD/ESTABLISH\n");
+ log_Printf(LogWARN, "enddisc: Only changeable at phase DEAD/ESTABLISH\n");
return 1;
}
diff --git a/usr.sbin/ppp/physical.c b/usr.sbin/ppp/physical.c
index 4083aa9..e2892ae 100644
--- a/usr.sbin/ppp/physical.c
+++ b/usr.sbin/ppp/physical.c
@@ -585,7 +585,7 @@ iov2physical(struct datalink *dl, struct iovec *iov, int *niov, int maxiov,
int fd, int *auxfd, int *nauxfd)
{
struct physical *p;
- int len, type;
+ int type;
unsigned h;
p = (struct physical *)iov[(*niov)++].iov_base;
@@ -598,7 +598,6 @@ iov2physical(struct datalink *dl, struct iovec *iov, int *niov, int maxiov,
p->desc.Write = physical_DescriptorWrite;
p->type = PHYS_DIRECT;
p->dl = dl;
- len = strlen(_PATH_DEV);
p->out = NULL;
p->connect_count = 1;
diff --git a/usr.sbin/ppp/ppp.8.m4 b/usr.sbin/ppp/ppp.8.m4
index fcf62d6..935814e 100644
--- a/usr.sbin/ppp/ppp.8.m4
+++ b/usr.sbin/ppp/ppp.8.m4
@@ -1594,7 +1594,7 @@ is the IP number that your route to
.Dq ui-gate
would normally use.
.Pp
-When routing your connection accross a public network such as the Internet,
+When routing your connection across a public network such as the Internet,
it is preferable to encrypt the data.
This can be done with the help of the MPPE protocol, although currently this
means that you will not be able to also compress the traffic as MPPE is
diff --git a/usr.sbin/ppp/vjcomp.c b/usr.sbin/ppp/vjcomp.c
index f3c6b71..97166af 100644
--- a/usr.sbin/ppp/vjcomp.c
+++ b/usr.sbin/ppp/vjcomp.c
@@ -137,7 +137,7 @@ VjUncompressTcp(struct ipcp *ipcp, struct mbuf *bp, u_char type)
}
/*
- * Handle compressed packet. 1) Read upto MAX_VJHEADER bytes into work
+ * Handle compressed packet. 1) Read up to MAX_VJHEADER bytes into work
* space. 2) Try to uncompress it. 3) Compute amount of necessary space. 4)
* Copy unread data info there.
*/
diff --git a/usr.sbin/pw/cpdir.c b/usr.sbin/pw/cpdir.c
index 017c200..c5534e5 100644
--- a/usr.sbin/pw/cpdir.c
+++ b/usr.sbin/pw/cpdir.c
@@ -83,14 +83,14 @@ copymkdir(char const * dir, char const * skel, mode_t mode, uid_t uid, gid_t gid
if (S_ISDIR(st.st_mode)) { /* Recurse for this */
if (strcmp(e->d_name, ".") != 0 && strcmp(e->d_name, "..") != 0)
copymkdir(dst, src, st.st_mode & _DEF_DIRMODE, uid, gid);
- chflags(dst, st.st_flags); /* propogate flags */
+ chflags(dst, st.st_flags); /* propagate flags */
} else if (S_ISLNK(st.st_mode) && (len = readlink(src, lnk, sizeof(lnk))) != -1) {
lnk[len] = '\0';
symlink(lnk, dst);
lchown(dst, uid, gid);
/*
- * Note: don't propogate special attributes
- * but do propogate file flags
+ * Note: don't propagate special attributes
+ * but do propagate file flags
*/
} else if (S_ISREG(st.st_mode) && (outfd = open(dst, O_RDWR | O_CREAT | O_EXCL, st.st_mode)) != -1) {
if ((infd = open(src, O_RDONLY)) == -1) {
@@ -108,7 +108,7 @@ copymkdir(char const * dir, char const * skel, mode_t mode, uid_t uid, gid_t gid
write(outfd, copybuf, b);
close(infd);
/*
- * Propogate special filesystem flags
+ * Propagate special filesystem flags
*/
fchown(outfd, uid, gid);
fchflags(outfd, st.st_flags);
diff --git a/usr.sbin/pw/pw.8 b/usr.sbin/pw/pw.8
index 6e79d56..8b21107 100644
--- a/usr.sbin/pw/pw.8
+++ b/usr.sbin/pw/pw.8
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd March 30, 2007
+.Dd December 21, 2011
.Dt PW 8
.Os
.Sh NAME
@@ -714,6 +714,17 @@ are also removed if the user's uid is unique and not also used by another accoun
system.
.Pp
The
+.Ar usermod
+command adds one additional option:
+.Bl -tag -width "-G grouplist"
+.It Fl l Ar name
+This option allows changing of an existing account name to
+.Ql \&name .
+The new name must not already exist, and any attempt to duplicate an
+existing account name will be rejected.
+.El
+.Pp
+The
.Ar usershow
command allows viewing of an account in one of two formats.
By default, the format is identical to the format used in
diff --git a/usr.sbin/pw/pw_user.c b/usr.sbin/pw/pw_user.c
index db33746..0001a41 100644
--- a/usr.sbin/pw/pw_user.c
+++ b/usr.sbin/pw/pw_user.c
@@ -1208,7 +1208,7 @@ pw_checkname(u_char *name, int gecos)
if (reject) {
snprintf(showch, sizeof(showch), (*ch >= ' ' && *ch < 127)
? "`%c'" : "0x%02x", *ch);
- errx(EX_DATAERR, "invalid character %s at position %d in %s",
+ errx(EX_DATAERR, "invalid character %s at position %td in %s",
showch, (ch - name), showtype);
}
if (!gecos && (ch - name) > LOGNAMESIZE)
diff --git a/usr.sbin/quotaon/quotaon.c b/usr.sbin/quotaon/quotaon.c
index d510e80..8d52983 100644
--- a/usr.sbin/quotaon/quotaon.c
+++ b/usr.sbin/quotaon/quotaon.c
@@ -75,13 +75,11 @@ int
main(int argc, char **argv)
{
struct fstab *fs;
- char *whoami;
+ const char *whoami;
long argnum, done = 0;
int ch, i, offmode = 0, errs = 0;
- whoami = rindex(*argv, '/') + 1;
- if (whoami == (char *)1)
- whoami = *argv;
+ whoami = getprogname();
if (strcmp(whoami, "quotaoff") == 0)
offmode++;
else if (strcmp(whoami, "quotaon") != 0)
diff --git a/usr.sbin/rarpd/rarpd.c b/usr.sbin/rarpd/rarpd.c
index 66055f3..25d98c6 100644
--- a/usr.sbin/rarpd/rarpd.c
+++ b/usr.sbin/rarpd/rarpd.c
@@ -122,7 +122,7 @@ int
main(int argc, char *argv[])
{
int op;
- char *ifname, *hostname, *name;
+ char *ifname, *name;
int aflag = 0; /* listen on "all" interfaces */
int fflag = 0; /* don't fork */
@@ -174,7 +174,6 @@ main(int argc, char *argv[])
argv += optind;
ifname = (aflag == 0) ? argv[0] : NULL;
- hostname = ifname ? argv[1] : argv[0];
if ((aflag && ifname) || (!aflag && ifname == NULL))
usage();
diff --git a/usr.sbin/route6d/route6d.c b/usr.sbin/route6d/route6d.c
index 0205a03..8723ebe 100644
--- a/usr.sbin/route6d/route6d.c
+++ b/usr.sbin/route6d/route6d.c
@@ -159,7 +159,7 @@ struct rip6 *ripbuf; /* packet buffer for sending */
* One of the major drawbacks of the linear linked list is the difficulty
* of representing the relationship between a couple of routes. This may
* be a significant problem when we have to support route aggregation with
- * supressing the specifices covered by the aggregate.
+ * suppressing the specifics covered by the aggregate.
*/
struct riprt {
@@ -1238,7 +1238,7 @@ riprecv()
if (iff_find(ifcp, 'N') != NULL)
return;
- tracet(1, "Recv(%s): from %s.%d info(%d)\n",
+ tracet(1, "Recv(%s): from %s.%d info(%zd)\n",
ifcp->ifc_name, inet6_n2p(&nh), ntohs(fsock.sin6_port), nn);
t = time(NULL);
diff --git a/usr.sbin/rpc.lockd/kern.c b/usr.sbin/rpc.lockd/kern.c
index 3c0fe04..e0f63ab 100644
--- a/usr.sbin/rpc.lockd/kern.c
+++ b/usr.sbin/rpc.lockd/kern.c
@@ -167,7 +167,7 @@ client_request(void)
goto err;
}
daemon_uid = pw->pw_uid;
- /* drop our root priviledges */
+ /* drop our root privileges */
(void)lockd_seteuid(daemon_uid);
for (;;) {
diff --git a/usr.sbin/rpc.lockd/lockd_lock.c b/usr.sbin/rpc.lockd/lockd_lock.c
index 5900bfa..6c409ad 100644
--- a/usr.sbin/rpc.lockd/lockd_lock.c
+++ b/usr.sbin/rpc.lockd/lockd_lock.c
@@ -69,7 +69,7 @@ __FBSDID("$FreeBSD$");
* A set of utilities for managing file locking
*
* XXX: All locks are in a linked list, a better structure should be used
- * to improve search/access effeciency.
+ * to improve search/access efficiency.
*/
/* struct describing a lock */
@@ -98,7 +98,7 @@ struct blockedlocklist_head blockedlocklist_head = LIST_HEAD_INITIALIZER(blocked
#define LKST_LOCKED 1 /* lock is locked */
/* XXX: Is this flag file specific or lock specific? */
#define LKST_WAITING 2 /* file is already locked by another host */
-#define LKST_PROCESSING 3 /* child is trying to aquire the lock */
+#define LKST_PROCESSING 3 /* child is trying to acquire the lock */
#define LKST_DYING 4 /* must dies when we get news from the child */
/* struct describing a monitored host */
@@ -1917,7 +1917,7 @@ testlock(struct nlm4_lock *lock, bool_t exclusive, int flags __unused)
}
/*
- * getlock: try to aquire the lock.
+ * getlock: try to acquire the lock.
* If file is already locked and we can sleep, put the lock in the list with
* status LKST_WAITING; it'll be processed later.
* Otherwise try to lock. If we're allowed to block, fork a child which
@@ -1947,7 +1947,7 @@ getlock(nlm4_lockargs *lckarg, struct svc_req *rqstp, const int flags)
}
if (lckarg->alock.fh.n_len != sizeof(fhandle_t)) {
- debuglog("recieved fhandle size %d, local size %d",
+ debuglog("received fhandle size %d, local size %d",
lckarg->alock.fh.n_len, (int)sizeof(fhandle_t));
}
diff --git a/usr.sbin/rpc.ypupdated/yp_dbupdate.c b/usr.sbin/rpc.ypupdated/yp_dbupdate.c
index 453ed2b..3481a6b 100644
--- a/usr.sbin/rpc.ypupdated/yp_dbupdate.c
+++ b/usr.sbin/rpc.ypupdated/yp_dbupdate.c
@@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$");
#include <sys/fcntl.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -130,7 +131,7 @@ ypmap_update(char *netname, char *map, unsigned int op, unsigned int keylen,
return(rval);
}
- snprintf(yplastbuf, sizeof(yplastbuf), "%lu", time(NULL));
+ snprintf(yplastbuf, sizeof(yplastbuf), "%jd", (intmax_t)time(NULL));
key.data = yp_last;
key.size = strlen(yp_last);
data.data = (char *)&yplastbuf;
diff --git a/usr.sbin/rpcbind/check_bound.c b/usr.sbin/rpcbind/check_bound.c
index 03f70b5..35e0a5a 100644
--- a/usr.sbin/rpcbind/check_bound.c
+++ b/usr.sbin/rpcbind/check_bound.c
@@ -44,7 +44,7 @@ static char sccsid[] = "@(#)check_bound.c 1.11 89/04/21 Copyr 1989 Sun Micro";
/*
* check_bound.c
* Checks to see whether the program is still bound to the
- * claimed address and returns the univeral merged address
+ * claimed address and returns the universal merged address
*
*/
diff --git a/usr.sbin/rpcbind/rpcbind.c b/usr.sbin/rpcbind/rpcbind.c
index dff0b08..3d11af1 100644
--- a/usr.sbin/rpcbind/rpcbind.c
+++ b/usr.sbin/rpcbind/rpcbind.c
@@ -366,7 +366,7 @@ init_transport(struct netconfig *nconf)
hints.ai_flags &= AI_NUMERICHOST;
} else {
/*
- * Skip if we have an AF_INET6 adress.
+ * Skip if we have an AF_INET6 address.
*/
if (inet_pton(AF_INET6,
hosts[nhostsbak], host_addr) == 1) {
@@ -381,7 +381,7 @@ init_transport(struct netconfig *nconf)
hints.ai_flags &= AI_NUMERICHOST;
} else {
/*
- * Skip if we have an AF_INET adress.
+ * Skip if we have an AF_INET address.
*/
if (inet_pton(AF_INET, hosts[nhostsbak],
host_addr) == 1) {
diff --git a/usr.sbin/rtadvd/config.c b/usr.sbin/rtadvd/config.c
index 681611f..605d76b 100644
--- a/usr.sbin/rtadvd/config.c
+++ b/usr.sbin/rtadvd/config.c
@@ -216,7 +216,7 @@ rm_ifinfo(struct ifinfo *ifi)
"<%s> ifname=%s marked as UNCONFIGURED.",
__func__, ifi->ifi_ifname);
- /* XXX: No MC leaving here becasue index is disappeared */
+ /* XXX: No MC leaving here because index is disappeared */
/* Inactivate timer */
rtadvd_remove_timer(ifi->ifi_ra_timer);
diff --git a/usr.sbin/rtadvd/rtadvd.c b/usr.sbin/rtadvd/rtadvd.c
index 092ffb6..a5f306d 100644
--- a/usr.sbin/rtadvd/rtadvd.c
+++ b/usr.sbin/rtadvd/rtadvd.c
@@ -845,7 +845,7 @@ rtadvd_input(struct sockinfo *s)
*/
if (!IN6_IS_ADDR_LINKLOCAL(&rcvfrom.sin6_addr)) {
syslog(LOG_NOTICE,
- "RA witn non-linklocal source address "
+ "RA with non-linklocal source address "
"received from %s on %s",
inet_ntop(AF_INET6, &rcvfrom.sin6_addr,
ntopbuf, sizeof(ntopbuf)),
@@ -1788,7 +1788,7 @@ ra_output(struct ifinfo *ifi)
ifi->ifi_burstcount--;
if (ifi->ifi_burstcount == 0) {
if (ifi->ifi_rainfo == ifi->ifi_rainfo_trans) {
- /* Inital burst finished. */
+ /* Initial burst finished. */
if (ifi->ifi_rainfo_trans != NULL)
ifi->ifi_rainfo_trans = NULL;
}
diff --git a/usr.sbin/rtprio/rtprio.c b/usr.sbin/rtprio/rtprio.c
index 38dade8..bb72985 100644
--- a/usr.sbin/rtprio/rtprio.c
+++ b/usr.sbin/rtprio/rtprio.c
@@ -53,20 +53,17 @@ int
main(int argc, char *argv[])
{
struct rtprio rtp;
- char *p;
- pid_t proc;
+ const char *progname;
+ pid_t proc = 0;
- /* find basename */
- if ((p = rindex(argv[0], '/')) == NULL)
- p = argv[0];
- else
- ++p;
- proc = 0;
+ progname = getprogname();
- if (!strcmp(p, "rtprio"))
+ if (strcmp(progname, "rtprio") == 0)
rtp.type = RTP_PRIO_REALTIME;
- else if (!strcmp(p, "idprio"))
+ else if (strcmp(progname, "idprio") == 0)
rtp.type = RTP_PRIO_IDLE;
+ else
+ errx(1, "invalid progname");
switch (argc) {
case 2:
@@ -76,20 +73,19 @@ main(int argc, char *argv[])
case 1:
if (rtprio(RTP_LOOKUP, proc, &rtp) != 0)
err(1, "RTP_LOOKUP");
- printf("%s: ", p);
switch (rtp.type) {
case RTP_PRIO_REALTIME:
case RTP_PRIO_FIFO:
- printf("realtime priority %d\n", rtp.prio);
+ warnx("realtime priority %d", rtp.prio);
break;
case RTP_PRIO_NORMAL:
- printf("normal priority\n");
+ warnx("normal priority");
break;
case RTP_PRIO_IDLE:
- printf("idle priority %d\n", rtp.prio);
+ warnx("idle priority %d", rtp.prio);
break;
default:
- printf("invalid priority type %d\n", rtp.type);
+ errx(1, "invalid priority type %d", rtp.type);
break;
}
exit(0);
@@ -110,18 +106,18 @@ main(int argc, char *argv[])
break;
}
- if (argv[2][0] == '-')
- proc = parseint(argv[2] + 1, "pid");
- if (rtprio(RTP_SET, proc, &rtp) != 0)
- err(1, "RTP_SET");
-
- if (proc == 0) {
+ if (argv[2][0] == '-') {
+ proc = parseint(argv[2], "pid");
+ proc = abs(proc);
+ if (rtprio(RTP_SET, proc, &rtp) != 0)
+ err(1, "RTP_SET");
+ } else {
execvp(argv[2], &argv[2]);
- err(1, "%s", argv[2]);
+ err(1, "execvp: %s", argv[2]);
}
exit(0);
}
- exit(1);
+ /* NOTREACHED */
}
static int
diff --git a/usr.sbin/rtsold/rtsold.8 b/usr.sbin/rtsold/rtsold.8
index 97b6000..946eca2 100644
--- a/usr.sbin/rtsold/rtsold.8
+++ b/usr.sbin/rtsold/rtsold.8
@@ -235,7 +235,7 @@ to
instead of the default PID file
.Pa /var/run/rtsold.pid .
.It Fl R Ar script-name
-Specifies a script to run when router advertisment options
+Specifies a script to run when router advertisement options
.Dv RDNSS Pq Recursive DNS Server
or
.Dv DNSSL Pq DNS Search List
diff --git a/usr.sbin/rtsold/rtsold.c b/usr.sbin/rtsold/rtsold.c
index 7df0ec6..d3d1289 100644
--- a/usr.sbin/rtsold/rtsold.c
+++ b/usr.sbin/rtsold/rtsold.c
@@ -881,7 +881,7 @@ autoifprobe(void)
static int n = 0;
char **a;
int s = 0, i, found;
- struct ifaddrs *ifap, *ifa, *target;
+ struct ifaddrs *ifap, *ifa;
struct in6_ndireq nd;
/* initialize */
@@ -901,7 +901,6 @@ autoifprobe(void)
exit(1);
}
- target = NULL;
/* find an ethernet */
for (ifa = ifap; ifa; ifa = ifa->ifa_next) {
if ((ifa->ifa_flags & IFF_UP) == 0)
diff --git a/usr.sbin/rwhod/rwhod.c b/usr.sbin/rwhod/rwhod.c
index 30cc2cf..16bf948 100644
--- a/usr.sbin/rwhod/rwhod.c
+++ b/usr.sbin/rwhod/rwhod.c
@@ -227,7 +227,7 @@ main(int argc, char *argv[])
syslog(LOG_ERR, "gethostname: %m");
exit(1);
}
- if ((cp = index(myname, '.')) != NULL)
+ if ((cp = strchr(myname, '.')) != NULL)
*cp = '\0';
strncpy(mywd.wd_hostname, myname, sizeof(mywd.wd_hostname) - 1);
mywd.wd_hostname[sizeof(mywd.wd_hostname) - 1] = '\0';
diff --git a/usr.sbin/sa/db.c b/usr.sbin/sa/db.c
index c6b25f3..557f406 100644
--- a/usr.sbin/sa/db.c
+++ b/usr.sbin/sa/db.c
@@ -79,7 +79,7 @@ db_copy_in(DB **mdb, const char *dbname, const char *uname, BTREEINFO *bti,
/* Obtain/set version. */
version = 1;
- key.data = &VERSION_KEY;
+ key.data = (void*)&VERSION_KEY;
key.size = sizeof(VERSION_KEY);
rv = DB_GET(ddb, &key, &data, 0);
@@ -175,7 +175,7 @@ db_copy_out(DB *mdb, const char *dbname, const char *uname, BTREEINFO *bti)
out:
/* Add a version record. */
- key.data = &VERSION_KEY;
+ key.data = (void*)&VERSION_KEY;
key.size = sizeof(VERSION_KEY);
version = 2;
data.data = &version;
diff --git a/usr.sbin/sade/devices.c b/usr.sbin/sade/devices.c
index fd7ca07..672ee20 100644
--- a/usr.sbin/sade/devices.c
+++ b/usr.sbin/sade/devices.c
@@ -169,7 +169,7 @@ deviceReset(void)
void
deviceGetAll(void)
{
- int i, j, fd;
+ int i, j;
char **names;
msgNotify("Probing devices, please wait (this can take a while)...");
@@ -183,7 +183,7 @@ deviceGetAll(void)
switch(device_names[i].type) {
case DEVICE_TYPE_DISK:
- fd = deviceTry(device_names[i], try, j);
+ deviceTry(device_names[i], try, j);
break;
default:
diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c
index 9ae08cb..e3364fe 100644
--- a/usr.sbin/sade/install.c
+++ b/usr.sbin/sade/install.c
@@ -104,10 +104,10 @@ performNewfs(PartInfo *pi, char *dname, int queue)
}
if (queue == QUEUE_YES) {
- command_shell_add(pi->mountpoint, buffer);
+ command_shell_add(pi->mountpoint, "%s", buffer);
return (0);
} else
- return (vsystem(buffer));
+ return (vsystem("%s", buffer));
}
return (0);
}
diff --git a/usr.sbin/sade/label.c b/usr.sbin/sade/label.c
index 8ae5fe2..d6b03b5 100644
--- a/usr.sbin/sade/label.c
+++ b/usr.sbin/sade/label.c
@@ -525,12 +525,12 @@ print_label_chunks(void)
int ChunkPartStartRow;
WINDOW *ChunkWin;
- /********************************************************/
- /*** These values are for controling screen resources ***/
- /*** Each label line holds up to 2 labels, so beware! ***/
- /*** strategy will be to try to always make sure the ***/
- /*** highlighted label is in the active display area. ***/
- /********************************************************/
+ /*********************************************************/
+ /*** These values are for controlling screen resources ***/
+ /*** Each label line holds up to 2 labels, so beware! ***/
+ /*** strategy will be to try to always make sure the ***/
+ /*** highlighted label is in the active display area. ***/
+ /*********************************************************/
int pslice_max, label_max;
int pslice_count, label_count, label_focus_found, pslice_focus_found;
@@ -538,7 +538,7 @@ print_label_chunks(void)
mvaddstr(0, 25, "FreeBSD Disklabel Editor");
attrset(A_NORMAL);
- /*** Count the number of parition slices ***/
+ /*** Count the number of partition slices ***/
pslice_count = 0;
for (i = 0; label_chunk_info[i].c ; i++) {
if (label_chunk_info[i].type == PART_SLICE)
@@ -933,7 +933,7 @@ diskLabel(Device *dev)
}
if (msg) {
if (req) {
- msgConfirm(msg);
+ msgConfirm("%s", msg);
clear_wins();
msg = NULL;
}
@@ -1048,7 +1048,7 @@ diskLabel(Device *dev)
#ifdef __alpha__
/*
* SRM requires that the root partition is at the
- * begining of the disk and cannot boot otherwise.
+ * beginning of the disk and cannot boot otherwise.
* Warn Alpha users if they are about to shoot themselves in
* the foot in this way.
*
diff --git a/usr.sbin/sade/variable.c b/usr.sbin/sade/variable.c
index 911eb02..ae3a6e0 100644
--- a/usr.sbin/sade/variable.c
+++ b/usr.sbin/sade/variable.c
@@ -83,7 +83,7 @@ variable_set(char *var, int dirty)
else if (!*var)
msgDebug("Warning: Zero length name & value passed to variable_set()\n");
SAFE_STRCPY(tmp, var);
- if ((cp = index(tmp, '=')) == NULL)
+ if ((cp = strchr(tmp, '=')) == NULL)
msgFatal("Invalid variable format: %s", var);
*(cp++) = '\0';
make_variable(tmp, string_skipwhite(cp), dirty);
@@ -123,7 +123,7 @@ variable_unset(char *var)
Variable *vp;
char name[512], *cp;
- if ((cp = index(var, '=')) != NULL)
+ if ((cp = strchr(var, '=')) != NULL)
sstrncpy(name, var, cp - var);
else
SAFE_STRCPY(name, var);
@@ -189,14 +189,14 @@ variable_check2(char *data)
if (data == NULL)
return -1;
SAFE_STRCPY(tmp, data);
- if ((cp = index(tmp, '=')) != NULL) {
+ if ((cp = strchr(tmp, '=')) != NULL) {
*(cp++) = '\0';
if (*cp == '"') { /* smash quotes if present */
++cp;
- if ((cp3 = index(cp, '"')) != NULL)
+ if ((cp3 = strchr(cp, '"')) != NULL)
*cp3 = '\0';
}
- else if ((cp3 = index(cp, ',')) != NULL)
+ else if ((cp3 = strchr(cp, ',')) != NULL)
*cp3 = '\0';
cp2 = variable_get(tmp);
if (cp2 != NULL) {
@@ -305,7 +305,7 @@ pvariable_set(char *var)
msgDebug("Warning: Zero length name & value passed to variable_set()\n");
/* Add a trivial namespace to whatever name the caller chooses. */
SAFE_STRCPY(tmp, "SYSINSTALL_PVAR");
- if (index(var, '=') == NULL)
+ if (strchr(var, '=') == NULL)
msgFatal("Invalid variable format: %s", var);
strlcat(tmp, var, 1024);
p = strchr(tmp, '=');
diff --git a/usr.sbin/sendmail/Makefile b/usr.sbin/sendmail/Makefile
index a9f7fbb..1eaebee 100644
--- a/usr.sbin/sendmail/Makefile
+++ b/usr.sbin/sendmail/Makefile
@@ -45,6 +45,13 @@ CFLAGS+= -DNETINET6
WARNS?= 1
+.if ${CC:T:Mclang} == "clang"
+# Unfortunately, clang gives warnings about sendmail code that cannot
+# be turned off yet. Since this is contrib code, and we don't really
+# care about the warnings, just make them non-fatal for now.
+NO_WERROR=
+.endif
+
DPADD= ${LIBUTIL} ${LIBWRAP}
LDADD= -lutil -lwrap
diff --git a/usr.sbin/tcpdump/tcpdump/tcpdump.1 b/usr.sbin/tcpdump/tcpdump/tcpdump.1
index 28c5ff2..84e75c5 100644
--- a/usr.sbin/tcpdump/tcpdump/tcpdump.1
+++ b/usr.sbin/tcpdump/tcpdump/tcpdump.1
@@ -257,7 +257,7 @@ Print the link-level header on each dump line.
.B \-E
Use \fIspi@ipaddr algo:secret\fP for decrypting IPsec ESP packets that
are addressed to \fIaddr\fP and contain Security Parameter Index value
-\fIspi\fP. This combination may be repeated with comma or newline seperation.
+\fIspi\fP. This combination may be repeated with comma or newline separation.
.IP
Note that setting the secret for IPv4 ESP packets is supported at this time.
.IP
@@ -273,7 +273,7 @@ The ability to decrypt packets is only present if \fItcpdump\fP was compiled
with cryptography enabled.
.IP
\fIsecret\fP is the ASCII text for ESP secret key.
-If preceeded by 0x, then a hex value will be read.
+If preceded by 0x, then a hex value will be read.
.IP
The option assumes RFC2406 ESP, not RFC1827 ESP.
The option is only for debugging purposes, and
diff --git a/usr.sbin/timed/timed/CHANGES b/usr.sbin/timed/timed/CHANGES
index 424ead2..e51acd1 100644
--- a/usr.sbin/timed/timed/CHANGES
+++ b/usr.sbin/timed/timed/CHANGES
@@ -94,7 +94,7 @@ Practically any users can send to the master TSP messages and this
way corrupt the reliability of the system. Authentication
of messages should be provided. Unfortunately, that would
require changing the protocol with all of the implied
- compatiblity problems. Fortunately, the new -F and -G args
+ compatibility problems. Fortunately, the new -F and -G args
can be used to cause the daemon to ignore time changes from
untrusted machines.
diff --git a/usr.sbin/timed/timed/correct.c b/usr.sbin/timed/timed/correct.c
index b3bf474..0eab083 100644
--- a/usr.sbin/timed/timed/correct.c
+++ b/usr.sbin/timed/timed/correct.c
@@ -162,8 +162,8 @@ adjclock(corr)
}
} else {
syslog(LOG_WARNING,
- "clock correction %ld sec too large to adjust",
- adj.tv_sec);
+ "clock correction %jd sec too large to adjust",
+ (intmax_t)adj.tv_sec);
(void) gettimeofday(&now, 0);
timevaladd(&now, corr);
if (settimeofday(&now, 0) < 0)
diff --git a/usr.sbin/timed/timed/globals.h b/usr.sbin/timed/timed/globals.h
index c273241..0492d79 100644
--- a/usr.sbin/timed/timed/globals.h
+++ b/usr.sbin/timed/timed/globals.h
@@ -41,6 +41,7 @@
#include <errno.h>
#include <limits.h>
#include <netdb.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/usr.sbin/timed/timed/networkdelta.c b/usr.sbin/timed/timed/networkdelta.c
index 2bfe2f5..e9a437a 100644
--- a/usr.sbin/timed/timed/networkdelta.c
+++ b/usr.sbin/timed/timed/networkdelta.c
@@ -137,7 +137,7 @@ networkdelta()
}
if (trace)
- fprintf(fd, "median of %d values starting at %ld is ",
+ fprintf(fd, "median of %td values starting at %ld is ",
xp-&x[0], med);
return median(med, &eps, &x[0], xp, 1);
}
diff --git a/usr.sbin/timed/timed/readmsg.c b/usr.sbin/timed/timed/readmsg.c
index e21979a..9bbb3d7 100644
--- a/usr.sbin/timed/timed/readmsg.c
+++ b/usr.sbin/timed/timed/readmsg.c
@@ -181,8 +181,8 @@ again:
rwait.tv_usec = 1000000/CLK_TCK;
if (trace) {
- fprintf(fd, "readmsg: wait %ld.%6ld at %s\n",
- rwait.tv_sec, rwait.tv_usec, date());
+ fprintf(fd, "readmsg: wait %jd.%6ld at %s\n",
+ (intmax_t)rwait.tv_sec, rwait.tv_usec, date());
/* Notice a full disk, as we flush trace info.
* It is better to flush periodically than at
* every line because the tracing consists of bursts
@@ -214,7 +214,7 @@ again:
*/
if (n < (ssize_t)(sizeof(struct tsp) - MAXHOSTNAMELEN + 32)) {
syslog(LOG_NOTICE,
- "short packet (%u/%u bytes) from %s",
+ "short packet (%zd/%zu bytes) from %s",
n, sizeof(struct tsp) - MAXHOSTNAMELEN + 32,
inet_ntoa(from.sin_addr));
continue;
@@ -486,7 +486,7 @@ print(msg, addr)
break;
case TSP_ADJTIME:
- fprintf(fd, "%s %d %-6u (%ld,%ld) %-15s %s\n",
+ fprintf(fd, "%s %d %-6u (%d,%d) %-15s %s\n",
tsptype[msg->tsp_type],
msg->tsp_vers,
msg->tsp_seq,
diff --git a/usr.sbin/timed/timedc/cmds.c b/usr.sbin/timed/timedc/cmds.c
index ab73341..b778b1a 100644
--- a/usr.sbin/timed/timedc/cmds.c
+++ b/usr.sbin/timed/timedc/cmds.c
@@ -267,7 +267,7 @@ msite(argc, argv)
int argc;
char *argv[];
{
- int cc;
+ ssize_t cc;
fd_set ready;
struct sockaddr_in dest;
int i, length;
@@ -333,7 +333,7 @@ msite(argc, argv)
*/
if (cc < (sizeof(struct tsp) - MAXHOSTNAMELEN + 32)) {
fprintf(stderr,
- "short packet (%u/%u bytes) from %s\n",
+ "short packet (%zd/%zu bytes) from %s\n",
cc, sizeof(struct tsp) - MAXHOSTNAMELEN + 32,
inet_ntoa(from.sin_addr));
continue;
@@ -428,7 +428,7 @@ tracing(argc, argv)
{
int onflag;
int length;
- int cc;
+ ssize_t cc;
fd_set ready;
struct sockaddr_in dest;
struct sockaddr_in from;
@@ -489,7 +489,7 @@ tracing(argc, argv)
* least long enough to hold a 4.3BSD packet.
*/
if (cc < (sizeof(struct tsp) - MAXHOSTNAMELEN + 32)) {
- fprintf(stderr, "short packet (%u/%u bytes) from %s\n",
+ fprintf(stderr, "short packet (%zd/%zu bytes) from %s\n",
cc, sizeof(struct tsp) - MAXHOSTNAMELEN + 32,
inet_ntoa(from.sin_addr));
return;
diff --git a/usr.sbin/timed/timedc/timedc.c b/usr.sbin/timed/timedc/timedc.c
index 5423cea..7047f57 100644
--- a/usr.sbin/timed/timedc/timedc.c
+++ b/usr.sbin/timed/timedc/timedc.c
@@ -105,7 +105,7 @@ main(argc, argv)
printf("timedc> ");
(void) fflush(stdout);
}
- if (fgets(cmdline, sizeof(cmdline), stdin) == 0)
+ if (fgets(cmdline, sizeof(cmdline), stdin) == NULL)
quit();
if (cmdline[0] == 0)
break;
diff --git a/usr.sbin/tzsetup/tzsetup.c b/usr.sbin/tzsetup/tzsetup.c
index 5c8c09b..5da9d72 100644
--- a/usr.sbin/tzsetup/tzsetup.c
+++ b/usr.sbin/tzsetup/tzsetup.c
@@ -57,6 +57,13 @@ __FBSDID("$FreeBSD$");
#define _PATH_DB "/var/db/zoneinfo"
#define _PATH_WALL_CMOS_CLOCK "/etc/wall_cmos_clock"
+#ifdef PATH_MAX
+#define SILLY_BUFFER_SIZE 2*PATH_MAX
+#else
+#warning "Somebody needs to fix this to dynamically size this buffer."
+#define SILLY_BUFFER_SIZE 2048
+#endif
+
/* special return codes for `fire' actions */
#define DITEM_FAILURE 1
@@ -638,7 +645,7 @@ static int
install_zoneinfo_file(const char *zoneinfo_file)
{
char buf[1024];
- char title[64], prompt[64];
+ char title[64], prompt[SILLY_BUFFER_SIZE];
struct stat sb;
ssize_t len;
int fd1, fd2, copymode;
@@ -652,16 +659,19 @@ install_zoneinfo_file(const char *zoneinfo_file)
copymode = 1;
#ifdef VERBOSE
- if (copymode)
+ snprintf(title, sizeof(title), "Info");
+ if (zoneinfo_file == NULL)
+ snprintf(prompt, sizeof(prompt),
+ "Removing %s", path_localtime);
+ else if (copymode)
snprintf(prompt, sizeof(prompt),
"Copying %s to %s", zoneinfo_file, path_localtime);
else
snprintf(prompt, sizeof(prompt),
"Creating symbolic link %s to %s",
- path_localtime,
- zoneinfo_file == NULL ? "(UTC)" : zoneinfo_file);
+ path_localtime, zoneinfo_file);
if (usedialog)
- dialog_notify(prompt);
+ dialog_msgbox(title, prompt, 8, 72, 1);
else
fprintf(stderr, "%s\n", prompt);
#endif
@@ -692,6 +702,10 @@ install_zoneinfo_file(const char *zoneinfo_file)
return (DITEM_FAILURE | DITEM_RECREATE);
}
+#ifdef VERBOSE
+ snprintf(prompt, sizeof(prompt),
+ "Removed %s", path_localtime);
+#endif
return (DITEM_LEAVE_MENU);
}
@@ -709,7 +723,18 @@ install_zoneinfo_file(const char *zoneinfo_file)
return (DITEM_FAILURE | DITEM_RECREATE);
}
- unlink(path_localtime);
+ if (unlink(path_localtime) < 0) {
+ snprintf(prompt, sizeof(prompt),
+ "Could not unlink %s: %s",
+ path_localtime, strerror(errno));
+ if (usedialog) {
+ snprintf(title, sizeof(title), "Error");
+ dialog_msgbox(title, prompt, 8, 72, 1);
+ } else
+ fprintf(stderr, "%s\n", prompt);
+ return (DITEM_FAILURE | DITEM_RECREATE);
+ }
+
fd2 = open(path_localtime, O_CREAT | O_EXCL | O_WRONLY,
S_IRUSR | S_IRGRP | S_IROTH);
if (fd2 < 0) {
@@ -755,7 +780,17 @@ install_zoneinfo_file(const char *zoneinfo_file)
fprintf(stderr, "%s\n", prompt);
return (DITEM_FAILURE | DITEM_RECREATE);
}
- unlink(path_localtime);
+ if (unlink(path_localtime) < 0) {
+ snprintf(prompt, sizeof(prompt),
+ "Could not unlink %s: %s",
+ path_localtime, strerror(errno));
+ if (usedialog) {
+ snprintf(title, sizeof(title), "Error");
+ dialog_msgbox(title, prompt, 8, 72, 1);
+ } else
+ fprintf(stderr, "%s\n", prompt);
+ return (DITEM_FAILURE | DITEM_RECREATE);
+ }
if (symlink(zoneinfo_file, path_localtime) < 0) {
snprintf(title, sizeof(title), "Error");
snprintf(prompt, sizeof(prompt),
@@ -769,23 +804,23 @@ install_zoneinfo_file(const char *zoneinfo_file)
return (DITEM_FAILURE | DITEM_RECREATE);
}
}
- }
#ifdef VERBOSE
- snprintf(title, sizeof(title), "Done");
- if (copymode)
- snprintf(prompt, sizeof(prompt),
- "Copied timezone file from %s to %s", zoneinfo_file,
- path_localtime);
- else
- snprintf(prompt, sizeof(prompt),
- "Created symbolic link from %s to %s", zoneinfo_file,
- path_localtime);
- if (usedialog)
- dialog_msgbox(title, prompt, 8, 72, 1);
- else
- fprintf(stderr, "%s\n", prompt);
+ snprintf(title, sizeof(title), "Done");
+ if (copymode)
+ snprintf(prompt, sizeof(prompt),
+ "Copied timezone file from %s to %s",
+ zoneinfo_file, path_localtime);
+ else
+ snprintf(prompt, sizeof(prompt),
+ "Created symbolic link from %s to %s",
+ zoneinfo_file, path_localtime);
+ if (usedialog)
+ dialog_msgbox(title, prompt, 8, 72, 1);
+ else
+ fprintf(stderr, "%s\n", prompt);
#endif
+ } /* reallydoit */
return (DITEM_LEAVE_MENU);
}
@@ -801,9 +836,11 @@ install_zoneinfo(const char *zoneinfo)
rv = install_zoneinfo_file(path_zoneinfo_file);
/* Save knowledge for later */
- if ((f = fopen(path_db, "w")) != NULL) {
- fprintf(f, "%s\n", zoneinfo);
- fclose(f);
+ if (reallydoit && (rv & DITEM_FAILURE) == 0) {
+ if ((f = fopen(path_db, "w")) != NULL) {
+ fprintf(f, "%s\n", zoneinfo);
+ fclose(f);
+ }
}
return (rv);
@@ -914,32 +951,16 @@ main(int argc, char **argv)
/* Override the user-supplied umask. */
(void)umask(S_IWGRP | S_IWOTH);
- read_iso3166_table();
- read_zones();
- sort_countries();
- make_menus();
-
if (reinstall == 1) {
FILE *f;
- char zonefile[MAXPATHLEN];
- char path_db[MAXPATHLEN];
-
- zonefile[0] = '\0';
- path_db[0] = '\0';
- if (chrootenv != NULL) {
- sprintf(zonefile, "%s/", chrootenv);
- sprintf(path_db, "%s/", chrootenv);
- }
- strcat(zonefile, _PATH_ZONEINFO);
- strcat(zonefile, "/");
- strcat(path_db, _PATH_DB);
+ char zoneinfo[MAXPATHLEN];
if ((f = fopen(path_db, "r")) != NULL) {
- if (fgets(zonefile, sizeof(zonefile), f) != NULL) {
- zonefile[sizeof(zonefile) - 1] = 0;
- if (strlen(zonefile) > 0) {
- zonefile[strlen(zonefile) - 1] = 0;
- rv = install_zoneinfo(zonefile);
+ if (fgets(zoneinfo, sizeof(zoneinfo), f) != NULL) {
+ zoneinfo[sizeof(zoneinfo) - 1] = 0;
+ if (strlen(zoneinfo) > 0) {
+ zoneinfo[strlen(zoneinfo) - 1] = 0;
+ rv = install_zoneinfo(zoneinfo);
exit(rv & ~DITEM_LEAVE_MENU);
}
errx(1, "Error reading %s.\n", path_db);
@@ -947,7 +968,7 @@ main(int argc, char **argv)
fclose(f);
errx(1,
"Unable to determine earlier installed zoneinfo "
- "file. Check %s", path_db);
+ "name. Check %s", path_db);
}
errx(1, "Cannot open %s for reading. Does it exist?", path_db);
}
@@ -967,6 +988,11 @@ main(int argc, char **argv)
/* FALLTHROUGH */
}
+ read_iso3166_table();
+ read_zones();
+ sort_countries();
+ make_menus();
+
init_dialog(stdin, stdout);
if (skiputc == 0) {
DIALOG_VARS save_vars;
diff --git a/usr.sbin/uhsoctl/uhsoctl.c b/usr.sbin/uhsoctl/uhsoctl.c
index a612364..46a9d0a 100644
--- a/usr.sbin/uhsoctl/uhsoctl.c
+++ b/usr.sbin/uhsoctl/uhsoctl.c
@@ -340,7 +340,7 @@ logger(int pri, const char *fmt, ...)
va_start(ap, fmt);
vasprintf(&buf, fmt, ap);
if (syslog_open)
- syslog(pri, buf);
+ syslog(pri, "%s", buf);
else {
switch (pri) {
case LOG_INFO:
@@ -455,7 +455,7 @@ set_nameservers(struct ctx *ctx, const char *respath, int ns, ...)
free(ctx->ns);
}
- fd = open(respath, O_RDWR | O_CREAT | O_NOFOLLOW);
+ fd = open(respath, O_RDWR | O_CREAT | O_NOFOLLOW, 0666);
if (fd < 0)
return (-1);
@@ -1174,7 +1174,7 @@ do_connect(struct ctx *ctx, const char *tty)
buf = ra.val[0].ptr;
if (strstr(buf[0], "+CME ERROR:") != NULL) {
buf[0] += 12;
- errx(1, buf[0]);
+ errx(1, "%s", buf[0]);
}
freeresp(&ra);
} else
diff --git a/usr.sbin/vidcontrol/decode.c b/usr.sbin/vidcontrol/decode.c
index 27691d2..c7f416e 100644
--- a/usr.sbin/vidcontrol/decode.c
+++ b/usr.sbin/vidcontrol/decode.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1994 Søren Schmidt
+ * Copyright (c) 1994 Søren Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/usr.sbin/vidcontrol/vidcontrol.c b/usr.sbin/vidcontrol/vidcontrol.c
index 48580f1..b2e41bf 100644
--- a/usr.sbin/vidcontrol/vidcontrol.c
+++ b/usr.sbin/vidcontrol/vidcontrol.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1994-1996 Søren Schmidt
+ * Copyright (c) 1994-1996 Søren Schmidt
* All rights reserved.
*
* Portions of this software are based in part on the work of
@@ -63,7 +63,7 @@ static const char rcsid[] =
/* Screen dump file format revision */
#define DUMP_FMT_REV 1
-char legal_colors[16][16] = {
+static const char *legal_colors[16] = {
"black", "blue", "green", "cyan",
"red", "magenta", "brown", "white",
"grey", "lightblue", "lightgreen", "lightcyan",
@@ -78,18 +78,16 @@ struct {
struct video_info video_mode_info;
} cur_info;
-int hex = 0;
-int number;
-int vesa_cols;
-int vesa_rows;
-int font_height;
-int colors_changed;
-int video_mode_changed;
-int normal_fore_color, normal_back_color;
-int revers_fore_color, revers_back_color;
-char letter;
-struct vid_info info;
-struct video_info new_mode_info;
+static int hex = 0;
+static int vesa_cols;
+static int vesa_rows;
+static int font_height;
+static int colors_changed;
+static int video_mode_changed;
+static int normal_fore_color, normal_back_color;
+static int revers_fore_color, revers_back_color;
+static struct vid_info info;
+static struct video_info new_mode_info;
/*
@@ -499,15 +497,15 @@ set_screensaver_timeout(char *arg)
*/
static void
-set_cursor_type(char *appearence)
+set_cursor_type(char *appearance)
{
int type;
- if (!strcmp(appearence, "normal"))
+ if (!strcmp(appearance, "normal"))
type = 0;
- else if (!strcmp(appearence, "blink"))
+ else if (!strcmp(appearance, "blink"))
type = 1;
- else if (!strcmp(appearence, "destructive"))
+ else if (!strcmp(appearance, "destructive"))
type = 3;
else {
revert();
diff --git a/usr.sbin/wpa/hostapd/driver_freebsd.c b/usr.sbin/wpa/hostapd/driver_freebsd.c
index 5fb6f85..9b9d7d4 100644
--- a/usr.sbin/wpa/hostapd/driver_freebsd.c
+++ b/usr.sbin/wpa/hostapd/driver_freebsd.c
@@ -666,10 +666,10 @@ bsd_set_radius_acl_expire(void *priv, const u8 *mac)
struct hostapd_data *hapd = drv->hapd;
/*
- * The expiry of the MAC address from RADIUS ACL cache doesn't mean
- * that we should kick off the client. Our current approach doesn't
+ * The expiry of the MAC address from RADIUS ACL cache doesn't mean
+ * that we should kick off the client. Our current approach doesn't
* require adding/removing entries from an allow/deny list; so this
- * function is likely unecessary
+ * function is likely unnecessary
*/
wpa_printf(MSG_DEBUG, "[%s] STA " MACSTR " radius acl cache "
"expired; nothing to do...", hapd->conf->iface,
diff --git a/usr.sbin/wpa/wpa_supplicant/Makefile b/usr.sbin/wpa/wpa_supplicant/Makefile
index 52c23eb..3a8584a 100644
--- a/usr.sbin/wpa/wpa_supplicant/Makefile
+++ b/usr.sbin/wpa/wpa_supplicant/Makefile
@@ -5,7 +5,7 @@
.PATH.c:${WPA_SUPPLICANT_DISTDIR} \
${WPA_DISTDIR}/src/drivers \
${WPA_DISTDIR}/src/eap_peer \
- ${WPA_DISTDIR}/src/rsn_supp
+ ${WPA_DISTDIR}/src/rsn_supp \
${WPA_DISTDIR}/src/crypto
PROG= wpa_supplicant
diff --git a/usr.sbin/yp_mkdb/yp_mkdb.c b/usr.sbin/yp_mkdb/yp_mkdb.c
index 6c3014b..f1f629a 100644
--- a/usr.sbin/yp_mkdb/yp_mkdb.c
+++ b/usr.sbin/yp_mkdb/yp_mkdb.c
@@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$");
#include <err.h>
#include <fcntl.h>
#include <limits.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -87,7 +88,8 @@ unwind(char *map)
key.data = NULL;
while (yp_next_record(dbp, &key, &data, 1, 1) == YP_TRUE)
- printf("%.*s %.*s\n", key.size,key.data,data.size,data.data);
+ printf("%.*s %.*s\n", (int)key.size, key.data, (int)data.size,
+ data.data);
(void)(dbp->close)(dbp);
return;
@@ -218,7 +220,7 @@ main(int argc, char *argv[])
key.data = "YP_LAST_MODIFIED";
key.size = sizeof("YP_LAST_MODIFIED") - 1;
- snprintf(buf, sizeof(buf), "%lu", time(NULL));
+ snprintf(buf, sizeof(buf), "%jd", (intmax_t)time(NULL));
data.data = (char *)&buf;
data.size = strlen(buf);
yp_put_record(dbp, &key, &data, 0);
diff --git a/usr.sbin/ypserv/yp_access.c b/usr.sbin/ypserv/yp_access.c
index 66d056b..c0e4804 100644
--- a/usr.sbin/ypserv/yp_access.c
+++ b/usr.sbin/ypserv/yp_access.c
@@ -287,7 +287,7 @@ not privileged", map, inet_ntoa(rqhost->sin_addr), ntohs(rqhost->sin_port));
if (status_securenets == 0) {
#endif
/*
- * One of the following two events occured:
+ * One of the following two events occurred:
*
* (1) The /var/yp/securenets exists and the remote host does not
* match any of the networks specified in it.
diff --git a/usr.sbin/ypserv/yp_main.c b/usr.sbin/ypserv/yp_main.c
index 7473e6f..69dae29 100644
--- a/usr.sbin/ypserv/yp_main.c
+++ b/usr.sbin/ypserv/yp_main.c
@@ -362,6 +362,7 @@ create_service(const int sock, const struct netconfig *nconf,
strerror(errno));
freeaddrinfo(res0);
close(s);
+ free(sname);
return -1;
}
error = getnameinfo(sap, slen,
@@ -373,6 +374,7 @@ create_service(const int sock, const struct netconfig *nconf,
strerror(errno));
freeaddrinfo(res0);
close(s);
+ free(sname);
return -1;
}
servname = sname;
@@ -441,7 +443,6 @@ create_service(const int sock, const struct netconfig *nconf,
}
/* XXX: ignore error intentionally */
rpcb_set(YPPROG, YPVERS, nconf, &svcaddr);
-
freeaddrinfo(res0);
return 0;
}
OpenPOWER on IntegriCloud